From cd998aaadd946d023567381a59512c639932e468 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 16 Sep 2007 16:23:21 +0000 Subject: [PATCH 001/430] Initial checkin of cloth files + changes --- extern/bullet2/src/Bullet-C-Api.h | 15 + .../bullet2/src/BulletDynamics/CMakeLists.txt | 1 + .../BulletDynamics/Dynamics/Bullet-C-Api.cpp | 92 + extern/bullet2/src/SConscript | 1 + source/blender/blenkernel/BKE_cloth.h | 243 +++ source/blender/blenkernel/SConscript | 1 + source/blender/blenkernel/intern/cloth.c | 1344 +++++++++++++++ source/blender/blenkernel/intern/collision.c | 638 +++++++ source/blender/blenkernel/intern/implicit.c | 1511 +++++++++++++++++ source/blender/blenkernel/intern/kdop.c | 861 ++++++++++ source/blender/blenkernel/intern/modifier.c | 105 ++ source/blender/blenloader/intern/readfile.c | 15 +- source/blender/blenloader/intern/writefile.c | 16 + source/blender/include/butspace.h | 7 + source/blender/makesdna/DNA_cloth_types.h | 150 ++ source/blender/makesdna/DNA_modifier_types.h | 11 + source/blender/makesdna/intern/makesdna.c | 2 + source/blender/src/buttons_object.c | 291 +++- 18 files changed, 5299 insertions(+), 5 deletions(-) create mode 100644 extern/bullet2/src/Bullet-C-Api.h create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp create mode 100644 source/blender/blenkernel/BKE_cloth.h create mode 100644 source/blender/blenkernel/intern/cloth.c create mode 100644 source/blender/blenkernel/intern/collision.c create mode 100644 source/blender/blenkernel/intern/implicit.c create mode 100644 source/blender/blenkernel/intern/kdop.c create mode 100644 source/blender/makesdna/DNA_cloth_types.h diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h new file mode 100644 index 00000000000..2d35383e902 --- /dev/null +++ b/extern/bullet2/src/Bullet-C-Api.h @@ -0,0 +1,15 @@ +#ifndef Bullet_C_API_H +#define Bullet_C_API_H + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float normal[3]); + +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif + diff --git a/extern/bullet2/src/BulletDynamics/CMakeLists.txt b/extern/bullet2/src/BulletDynamics/CMakeLists.txt index 79e07b7f77b..4cda87a146a 100644 --- a/extern/bullet2/src/BulletDynamics/CMakeLists.txt +++ b/extern/bullet2/src/BulletDynamics/CMakeLists.txt @@ -14,6 +14,7 @@ ADD_LIBRARY(LibBulletDynamics Dynamics/btDiscreteDynamicsWorld.cpp Dynamics/btSimpleDynamicsWorld.cpp Dynamics/btRigidBody.cpp + Dynamics/Bullet-C-Api.cpp Vehicle/btRaycastVehicle.cpp Vehicle/btWheelInfo.cpp ) diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp new file mode 100644 index 00000000000..2ae30e851dc --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp @@ -0,0 +1,92 @@ +#include "LinearMath/btVector3.h" +#include "LinearMath/btScalar.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btTransform.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" + +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" + +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "LinearMath/btStackAlloc.h" + + +extern "C" +double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float normal[3]) +{ + btTriangleShape trishapeA(btVector3(p[0][0], p[0][1], p[0][2]), btVector3(p[1][0], p[1][1], p[1][2]), btVector3(p[2][0], p[2][1], p[2][2])); + trishapeA.setMargin(0.001f); + + btTriangleShape trishapeB(btVector3(q[0][0], q[0][1], q[0][2]), btVector3(q[1][0], q[1][1], q[1][2]), btVector3(q[2][0], q[2][1], q[2][2])); + trishapeB.setMargin(0.001f); + + // btVoronoiSimplexSolver sGjkSimplexSolver; + // btGjkEpaPenetrationDepthSolver penSolverPtr; + + static btSimplexSolverInterface sGjkSimplexSolver; + sGjkSimplexSolver.reset(); + + static btGjkEpaPenetrationDepthSolver Solver0; + static btMinkowskiPenetrationDepthSolver Solver1; + + btConvexPenetrationDepthSolver* Solver = NULL; + + Solver = &Solver1; + + + btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); + + convexConvex.m_catchDegeneracies = 1; + + // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0); + + btPointCollector gjkOutput; + btGjkPairDetector::ClosestPointInput input; + + btStackAlloc gStackAlloc(1024*1024*2); + + input.m_stackAlloc = &gStackAlloc; + + btTransform tr; + tr.setIdentity(); + + input.m_transformA = tr; + input.m_transformB = tr; + + convexConvex.getClosestPoints(input, gjkOutput, 0); + + + if (gjkOutput.m_hasResult) + { + + pb[0] = pa[0] = gjkOutput.m_pointInWorld[0]; + pb[1] = pa[1] = gjkOutput.m_pointInWorld[1]; + pb[2] = pa[2] = gjkOutput.m_pointInWorld[2]; + + pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance; + pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance; + pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance; + + normal[0] = gjkOutput.m_normalOnBInWorld[0]; + normal[1] = gjkOutput.m_normalOnBInWorld[1]; + normal[2] = gjkOutput.m_normalOnBInWorld[2]; + + return gjkOutput.m_distance; + } + return -1.0f; +} + + diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index 6280c49066d..127752777c8 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -33,6 +33,7 @@ bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp", "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp", "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp", "BulletDynamics/Dynamics/btRigidBody.cpp", + "BulletDynamics/Dynamics/Bullet-C-Api.cpp", "BulletDynamics/Vehicle/btRaycastVehicle.cpp", "BulletDynamics/Vehicle/btWheelInfo.cpp"] collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp", diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h new file mode 100644 index 00000000000..e843079f412 --- /dev/null +++ b/source/blender/blenkernel/BKE_cloth.h @@ -0,0 +1,243 @@ +/** +* BKE_cloth.h +* +* $Id: BKE_cloth.h,v 1.1 2007/08/01 02:07:27 daniel Exp $ +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ +#ifndef BKE_CLOTH_H +#define BKE_CLOTH_H + +#include "BKE_DerivedMesh.h" +#include "DNA_customdata_types.h" +#include "BKE_customdata.h" +#include "DNA_meshdata_types.h" + +struct Object; +struct Cloth; +struct MFace; +struct DerivedMesh; + +// this is needed for inlining behaviour +#ifndef _WIN32 + #define LINUX + #define DO_INLINE inline +#else + #define DO_INLINE +#endif + + +/* goal defines */ +#define SOFTGOALSNAP 0.999f + +/* This is approximately the smallest number that can be +* represented by a float, given its precision. */ +#define ALMOST_ZERO 0.0000001 + +/* Bits to or into the ClothVertex.flags. */ +#define CVERT_FLAG_PINNED 1 +#define CVERT_FLAG_COLLISION 2 + + +// some macro enhancements for vector treatment +#define VECADDADD(v1,v2,v3) {*(v1)+= *(v2) + *(v3); *(v1+1)+= *(v2+1) + *(v3+1); *(v1+2)+= *(v2+2) + *(v3+2);} +#define VECSUBADD(v1,v2,v3) {*(v1)-= *(v2) + *(v3); *(v1+1)-= *(v2+1) + *(v3+1); *(v1+2)-= *(v2+2) + *(v3+2);} +#define VECADDSUB(v1,v2,v3) {*(v1)+= *(v2) - *(v3); *(v1+1)+= *(v2+1) - *(v3+1); *(v1+2)+= *(v2+2) - *(v3+2);} +#define VECSUBADDSS(v1,v2,aS,v3,bS) {*(v1)-= *(v2)*aS + *(v3)*bS; *(v1+1)-= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)-= *(v2+2)*aS + *(v3+2)*bS;} +#define VECADDSUBSS(v1,v2,aS,v3,bS) {*(v1)+= *(v2)*aS - *(v3)*bS; *(v1+1)+= *(v2+1)*aS - *(v3+1)*bS; *(v1+2)+= *(v2+2)*aS - *(v3+2)*bS;} +#define VECADDSS(v1,v2,aS,v3,bS) {*(v1)= *(v2)*aS + *(v3)*bS; *(v1+1)= *(v2+1)*aS + *(v3+1)*bS; *(v1+2)= *(v2+2)*aS + *(v3+2)*bS;} +#define VECADDS(v1,v2,v3,bS) {*(v1)= *(v2) + *(v3)*bS; *(v1+1)= *(v2+1) + *(v3+1)*bS; *(v1+2)= *(v2+2) + *(v3+2)*bS;} +#define VECSUBMUL(v1,v2,aS) {*(v1)-= *(v2) * aS; *(v1+1)-= *(v2+1) * aS; *(v1+2)-= *(v2+2) * aS;} +#define VECSUBS(v1,v2,v3,bS) {*(v1)= *(v2) - *(v3)*bS; *(v1+1)= *(v2+1) - *(v3+1)*bS; *(v1+2)= *(v2+2) - *(v3+2)*bS;} +#define VECSUBSB(v1,v2, v3,bS) {*(v1)= (*(v2)- *(v3))*bS; *(v1+1)= (*(v2+1) - *(v3+1))*bS; *(v1+2)= (*(v2+2) - *(v3+2))*bS;} +#define VECMULS(v1,aS) {*(v1)*= aS; *(v1+1)*= aS; *(v1+2)*= *aS;} +#define VECADDMUL(v1,v2,aS) {*(v1)+= *(v2) * aS; *(v1+1)+= *(v2+1) * aS; *(v1+2)+= *(v2+2) * aS;} + +/* SIMULATION FLAGS: goal flags,.. */ +/* These are the bits used in SimSettings.flags. */ +typedef enum +{ + CSIMSETT_FLAG_RESET = (1 << 1), // The CM object requires a reinitializaiton. + CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done + CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled + CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache + CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache + CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled +} CSIMSETT_FLAGS; + +/* Spring types as defined in the paper.*/ +typedef enum +{ + STRUCTURAL = 0, + SHEAR, + BENDING, +} springType; + +/* SPRING FLAGS */ +typedef enum +{ + CSPRING_FLAG_DEACTIVATE = (1 << 1), +} CSPRINGS_FLAGS; + +// needed for buttons_object.c +void cloth_cache_free(ClothModifierData *clmd, float time); + +// needed for cloth.c +void implicit_set_positions (ClothModifierData *clmd); + +// from cloth.c, needed for modifier.c +void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numverts); + +// used in collision.c +typedef struct Tree { + struct Tree *nodes[4]; // 4 children --> quad-tree + struct Tree *parent; + struct Tree *nextLeaf; + struct Tree *prevLeaf; + float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP + unsigned int tri_index; // this saves the index of the face + int count_nodes; // how many nodes are used + int traversed; // how many nodes already traversed until this level? + int isleaf; +} Tree; + +typedef struct Tree TreeNode; + +typedef struct BVH{ + unsigned int numfaces; + unsigned int numverts; + ClothVertex *verts; // just a pointer to the original datastructure + MFace *mfaces; // just a pointer to the original datastructure + struct LinkNode *tree; + TreeNode *root; // TODO: saving the root --> is this really needed? YES! + TreeNode *leaf_tree; /* Tail of the leaf linked list. */ + TreeNode *leaf_root; /* Head of the leaf linked list. */ + float epsilon; /* epslion is used for inflation of the k-dop */ + int flags; /* bvhFlags */ +} BVH; + +typedef void (*CM_COLLISION_RESPONSE) (ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2); + + +///////////////////////////////////////////////// +// collision.c +//////////////////////////////////////////////// + +// needed for implicit.c +void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2); +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt); + +//////////////////////////////////////////////// + + +///////////////////////////////////////////////// +// kdop.c +//////////////////////////////////////////////// + +// needed for implicit.c +void bvh_update_static(ClothModifierData * clmd, BVH * bvh); +void bvh_update_moving(ClothModifierData * clmd, BVH * bvh); + +// needed for cloth.c +void bvh_free(BVH * bvh); +BVH *bvh_build (ClothModifierData *clmd, float epsilon); + +// needed for collision.c +int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response); + +//////////////////////////////////////////////// + + + +///////////////////////////////////////////////// +// cloth.c +//////////////////////////////////////////////// +void cloth_free_modifier (ClothModifierData *clmd); +void cloth_init (ClothModifierData *clmd); +void cloth_deform_verts(struct Object *ob, float framenr, float (*vertexCos)[3], int numVerts, void *derivedData, ClothModifierData *clmd); +void cloth_update_normals (ClothVertex *verts, int nVerts, MFace *face, int totface); + +//////////////////////////////////////////////// + + +/* Typedefs for function pointers we need for solvers and collision detection. */ +typedef void (*CM_COLLISION_SELF) (ClothModifierData *clmd, int step); +typedef void (*CM_COLLISION_OBJ) (ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response); + + +/* This enum provides the IDs for our solvers. */ +// only one available in the moment +typedef enum { + CM_IMPLICIT = 0, +} CM_SOLVER_ID; + + +/* This structure defines how to call the solver. +*/ +typedef struct { + char *name; + CM_SOLVER_ID id; + int (*init) (Object *ob, ClothModifierData *clmd); + int (*solver) (Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors, + CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision); + int (*free) (ClothModifierData *clmd); +} CM_SOLVER_DEF; + + +/* new C implicit simulator */ +int implicit_init (Object *ob, ClothModifierData *clmd); +int implicit_free (ClothModifierData *clmd); +int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors, + CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision); + +/* used for caching in implicit.c */ +typedef struct Frame +{ + ClothVertex *verts; + ClothSpring *springs; + float time; /* we need float since we want to support sub-frames */ +} Frame; + +/* used for collisions in collision.c */ +typedef struct CollPair +{ + unsigned int face1; // cloth face + unsigned int face2; // object face + double distance; // magnitude of vector + float normal[3]; + float vector[3]; // unnormalized collision vector: p2-p1 + float p1[3], p2[3]; // collision point p1 on face1, p2 on face2 + int lastsign; // indicates if the distance sign has changed, unused itm + float time; // collision time, from 0 up to 1 + int quadA, quadB; // indicates the used triangle of the quad: 0 means verts 1,2,3; 1 means verts 4,1,3 +} CollPair; + + +#endif + diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 5316c50694a..3403490b778 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -7,6 +7,7 @@ incs = '. #/intern/guardedalloc ../include ../blenlib ../makesdna' incs += ' ../python ../render/extern/include #/intern/decimation/extern' incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes' incs += ' #/intern/iksolver/extern ../blenloader ../quicktime' +incs += ' #/extern/bullet2/src ' incs += ' ' + env['BF_OPENGL_INC'] incs += ' ' + env['BF_ZLIB_INC'] diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c new file mode 100644 index 00000000000..4b4aa2d0d1d --- /dev/null +++ b/source/blender/blenkernel/intern/cloth.c @@ -0,0 +1,1344 @@ +/* cloth.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + + +#include +#include +#include + +#include "MEM_guardedalloc.h" + +/* types */ +#include "DNA_curve_types.h" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#include "DNA_cloth_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_lattice_types.h" +#include "DNA_scene_types.h" +#include "DNA_modifier_types.h" + +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_edgehash.h" +#include "BLI_linklist.h" + +#include "BKE_curve.h" +#include "BKE_deform.h" +#include "BKE_DerivedMesh.h" +#include "BKE_cdderivedmesh.h" +#include "BKE_displist.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_key.h" +#include "BKE_mesh.h" +#include "BKE_object.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" +#include "BKE_utildefines.h" +#include "BKE_DerivedMesh.h" +#include "BIF_editdeform.h" +#include "BIF_editkey.h" +#include "DNA_screen_types.h" +#include "BSE_headerbuttons.h" +#include "BIF_screen.h" +#include "BIF_space.h" +#include "mydevice.h" + +#ifdef _WIN32 +void tstart(void) +{ +} +void tend(void) +{ + +} +double tval() +{ + return 0; +} +#else +#include +static struct timeval _tstart, _tend; +static struct timezone tz; +void tstart(void) +{ + gettimeofday(&_tstart, &tz); +} +void tend(void) +{ + gettimeofday(&_tend,&tz); +} +double tval() +{ + double t1, t2; + t1 = (double)_tstart.tv_sec + (double)_tstart.tv_usec/(1000*1000); + t2 = (double)_tend.tv_sec + (double)_tend.tv_usec/(1000*1000); + return t2-t1; +} +#endif + +/* Our available solvers. */ +// 255 is the magic reserved number, so NEVER try to put 255 solvers in here! +// 254 = MAX! +static CM_SOLVER_DEF solvers [] = { + { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, + // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, +}; + +#define DEBUG_CLOTH_VERBOSE 1000 +static int DEBUG_CLOTH = 0; +/* ********** cloth engine ******* */ +/* Prototypes for internal functions. +*/ +static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertexCos)[3], unsigned int numverts); +static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm); +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts); +static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts); +int cloth_build_springs(Cloth *cloth, DerivedMesh *dm); +static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); +/****************************************************************************** +* +* External interface called by modifier.c clothModifier functions. +* +******************************************************************************/ +/** +* cloth_init - creates a new cloth simulation. +* +* 1. create object +* 2. fill object with standard values or with the GUI settings if given +*/ +void cloth_init (ClothModifierData *clmd) +{ + /* Initialize our new data structure to reasonable values. */ + clmd->sim_parms.gravity [0] = 0.0; + clmd->sim_parms.gravity [1] = 0.0; + clmd->sim_parms.gravity [2] = -9.81; + clmd->sim_parms.structural = 100.0; + clmd->sim_parms.shear = 100.0; + clmd->sim_parms.bending = 1.0; + clmd->sim_parms.Cdis = 5.0; + clmd->sim_parms.Cvi = 1.0; + clmd->sim_parms.mass = 1.0f; + clmd->sim_parms.stepsPerFrame = 5; + clmd->sim_parms.sim_time = 1.0; + clmd->sim_parms.flags = CSIMSETT_FLAG_RESET; + clmd->sim_parms.solver_type = 0; + clmd->sim_parms.preroll = 0; + clmd->sim_parms.maxspringlen = 10; + clmd->coll_parms.self_friction = 5.0; + clmd->coll_parms.friction = 10.0; + clmd->coll_parms.loop_count = 1; + clmd->coll_parms.epsilon = 0.01f; + + /* These defaults are copied from softbody.c's + * softbody_calc_forces() function. + */ + clmd->sim_parms.eff_force_scale = 1000.0; + clmd->sim_parms.eff_wind_scale = 250.0; + + // also from softbodies + clmd->sim_parms.maxgoal = 1.0f; + clmd->sim_parms.mingoal = 0.0f; + clmd->sim_parms.defgoal = 0.7f; + clmd->sim_parms.goalspring = 100.0f; + clmd->sim_parms.goalfrict = 0.0f; + + clmd->sim_parms.cache = NULL; +} + +// unused in the moment, cloth needs quads from mesh +DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) +{ + DerivedMesh *result = NULL; + int i; + int numverts = dm->getNumVerts(dm); + int numedges = dm->getNumEdges(dm); + int numfaces = dm->getNumFaces(dm); + + MVert *mvert = CDDM_get_verts(dm); + MEdge *medge = CDDM_get_edges(dm); + MFace *mface = CDDM_get_faces(dm); + + MVert *mvert2; + MFace *mface2; + unsigned int numtris=0; + unsigned int numquads=0; + int a = 0; + int random = 0; + int firsttime = 0; + float vec1[3], vec2[3], vec3[3], vec4[3], vec5[3]; + float mag1=0, mag2=0; + + for(i = 0; i < numfaces; i++) + { + if(mface[i].v4) + numquads++; + else + numtris++; + } + + result = CDDM_from_template(dm, numverts, 0, numtris + 2*numquads); + + if(!result) + return NULL; + + // do verts + mvert2 = CDDM_get_verts(result); + for(a=0; av1 = mface[a].v2; + mf->v2 = mface[a].v3; + mf->v3 = mface[a].v4; + } + else + { + mf->v1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; + } + + mf->v4 = 0; + mf->flag |= ME_SMOOTH; + + test_index_face(mf, NULL, 0, 3); + + if(mface[a].v4) + { + MFace *mf2; + + i++; + + mf2 = &mface2[i]; + /* + DM_copy_face_data(dm, result, a, i, 1); + + *mf2 = *inMF; + */ + + if(random==1) + { + mf2->v1 = mface[a].v1; + mf2->v2 = mface[a].v2; + mf2->v3 = mface[a].v4; + } + else + { + mf2->v1 = mface[a].v4; + mf2->v2 = mface[a].v1; + mf2->v3 = mface[a].v3; + } + mf2->v4 = 0; + mf2->flag |= ME_SMOOTH; + + test_index_face(mf2, NULL, 0, 3); + } + + i++; + } + + CDDM_calc_edges(result); + CDDM_calc_normals(result); + + return result; + +} + + +DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) +{ + DerivedMesh *result = NULL; + unsigned int i = 0, a = 0, j=0; + int numverts = dm->getNumVerts(dm); + int numedges = dm->getNumEdges(dm); + int numfaces = dm->getNumFaces(dm); + + MVert *mvert = CDDM_get_verts(dm); + MEdge *medge = CDDM_get_edges(dm); + MFace *mface = CDDM_get_faces(dm); + + MVert *mvert2; + MFace *mface2; + unsigned int numtris=0; + unsigned int numquads=0; + EdgeHash *edgehash = NULL; + Cloth *cloth = clmd->clothObject; + ClothSpring *springs = cloth->springs; + unsigned int numsprings = cloth->numsprings; + + // create spring tearing hash + edgehash = BLI_edgehash_new(); + + for(i = 0; i < numsprings; i++) + { + if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) + &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) + { + BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); + BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); + j++; + } + } + + // printf("found %d tears\n", j); + + result = CDDM_from_template(dm, numverts, 0, numfaces); + + if(!result) + return NULL; + + // do verts + mvert2 = CDDM_get_verts(result); + for(a=0; av1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; + mf->v4 = mface[a].v4; + + test_index_face(mf, NULL, 0, 4); + + i++; + } + } + + CDDM_lower_num_faces(result, i); + CDDM_calc_edges(result); + CDDM_calc_normals(result); + + BLI_edgehash_free(edgehash, NULL); + + return result; +} + + +int cloth_cache_search_frame(ClothModifierData *clmd, float time) +{ + Frame *frame = NULL; + LinkNode *search = NULL; + int newtime = time + clmd->sim_parms.preroll; + + Cloth *cloth = NULL; + + if(!clmd) + return 0; + + cloth = clmd->clothObject; + + if(!cloth) + return 0; + + if(clmd->sim_parms.cache) + { + search = clmd->sim_parms.cache; + + // check if frame exists + while(search) + { + frame = search->link; + + if(frame->time == newtime) + break; + + frame = NULL; + + search = search->next; + } + } + + if(!frame) + return 0; + + return 1; +} + +void cloth_cache_get_frame(ClothModifierData *clmd, float time) +{ + Frame *frame = NULL; + LinkNode *search = NULL; + unsigned int i = 0; + Cloth *cloth = NULL; + int newtime = time + clmd->sim_parms.preroll; + + if(clmd) + { + cloth = clmd->clothObject; + + if(!cloth) + return; + + // get cache + if(clmd->sim_parms.cache) + { + search = clmd->sim_parms.cache; + frame = NULL; + // check if frame exists + while(search) + { + frame = search->link; + if(frame->time == newtime) + break; + + frame = NULL; + + search = search->next; + } + + if(frame) + { + if(frame->verts) + { + + // copy ClothVertex struct + memcpy(cloth->verts, frame->verts, cloth->numverts*sizeof(ClothVertex)); + implicit_set_positions(clmd); + } + + if(frame->springs) + { + // copy ClothSpring struct + memcpy(cloth->springs, frame->springs, cloth->numsprings*sizeof(ClothSpring)); + } + } + } + } + +} + +void cloth_cache_set_frame(ClothModifierData *clmd, float time) +{ + Frame *frame = NULL; + unsigned int i = 0; + Cloth *cloth = NULL; + int newtime = time + clmd->sim_parms.preroll; + + if(clmd) + { + cloth = clmd->clothObject; + + if(cloth) + { + // creat new frame cache + frame = (Frame *)MEM_callocN(sizeof(Frame), "cloth frame cache"); + frame->verts = (ClothVertex *)MEM_callocN(sizeof(ClothVertex)*cloth->numverts, "cloth frame vertex cache"); + frame->springs = (ClothSpring *)MEM_callocN(sizeof(ClothSpring)*cloth->numsprings, "cloth frame spring cache"); + frame->time = newtime; + + // copy ClothVertex struct + for(i = 0; i < cloth->numverts; i++) + { + memcpy(&frame->verts[i], &cloth->verts[i], sizeof(ClothVertex)); + } + + // copy ClothSpring struct + for(i = 0; i < cloth->numsprings; i++) + { + memcpy(&frame->springs[i], &cloth->springs[i], sizeof(ClothSpring)); + } + + } + if(frame) + { + if(!clmd->sim_parms.cache) + BLI_linklist_prepend(&clmd->sim_parms.cache, frame); + else + BLI_linklist_append(&clmd->sim_parms.cache, frame); + } + } +} + +void cloth_cache_free(ClothModifierData *clmd, float time) +{ + Frame *frame = NULL; + LinkNode *search, *last_search; + int newtime = time + clmd->sim_parms.preroll; + + // do never free first cached frame + if((newtime<1.0f) && !(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL)) + return; + + /* Calls the solver and collision frees first as they + * might depend on data in clmd->clothObject. */ + + if (clmd) + { + if(clmd->sim_parms.cache) + { + last_search = search = clmd->sim_parms.cache; + while(search) + { + LinkNode *next= search->next; + frame = search->link; + + // free part of cache, but not preroll cache and first framer + if((clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_PART) + && (frame->time > newtime)) // do not delete the first frame + { + MEM_freeN(frame->verts); + MEM_freeN(frame->springs); + MEM_freeN(frame); + MEM_freeN(search); + last_search->next = next; + } + else if(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL) // free COMPLETE cache + { + MEM_freeN(frame->verts); + MEM_freeN(frame->springs); + MEM_freeN(frame); + } + else + last_search = search; + search = next; + } + + if(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL) + { + BLI_linklist_free(clmd->sim_parms.cache,NULL); + clmd->sim_parms.cache = NULL; + } + } + } + + /* clear flags */ + clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_FREE_ALL; + clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_FREE_PART; + +} + + +/** +* cloth_deform_verts - simulates one step, framenr is in frames. +* +**/ +void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, + float (*vertexCos)[3], int numverts) +{ + unsigned int i; + unsigned int numedges = -1; + unsigned int numfaces = -1; + MVert *mvert = NULL; + MEdge *medge = NULL; + MFace *mface = NULL; + DerivedMesh *result = NULL, *result2 = NULL; + Cloth *cloth = clmd->clothObject; + unsigned int framenr = (float)G.scene->r.cfra; + float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); + ListBase *effectors = NULL; + ClothVertex *newframe= NULL, *verts; + Frame *frame = NULL; + LinkNode *search = NULL; + float deltaTime = current_time - clmd->sim_parms.sim_time; + + clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); + + clmd->sim_parms.sim_time = current_time; + + // check if cloth object was some collision object before and needs freeing now + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) && (clmd->clothObject != NULL) && (clmd->clothObject->old_solver_type == 255)) + { + // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing + clmd->sim_parms.flags |= CSIMSETT_FLAG_COLLOBJ; + cloth_free_modifier(clmd); + clmd->sim_parms.flags &= ~CSIMSETT_FLAG_COLLOBJ; + } + + // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ + if (clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + + // save next position + time + if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) + { + if(!collobj_from_object (ob, clmd, dm, vertexCos, framenr)) + return; + + if(clmd->clothObject == NULL) + return; + + cloth = clmd->clothObject; + } + + // Save old position + clmd->sim_parms.sim_time_old = clmd->sim_parms.sim_time; + clmd->sim_parms.sim_time = current_time; + + verts = cloth->verts; + + for (i = 0; i < clmd->clothObject->numverts; i++, verts++) + { + // Save the previous position. + VECCOPY (verts->xold, verts->x); + VECCOPY (verts->txold, verts->x); + + // Get the current position. + VECCOPY (verts->x, mvert[i].co); + Mat4MulVecfl(ob->obmat, verts->x); + + // Compute the vertices velocity. + VECSUB (verts->v, verts->x, verts->xold); + } + + return; + } + + if(deltaTime == 1.0f) + { + if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) + { + if(!cloth_from_object (ob, clmd, dm, vertexCos, numverts)) + return; + + if(clmd->clothObject == NULL) + return; + + cloth = clmd->clothObject; + } + + clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; + + // Insure we have a clmd->clothObject, in case allocation failed. + if (clmd->clothObject != NULL) + { + if(!cloth_cache_search_frame(clmd, framenr)) + { + verts = cloth->verts; + + /* Force any pinned verts to their constrained location. */ + for (i = 0; i < clmd->clothObject->numverts; i++, verts++) + { + /* Save the previous position. */ + VECCOPY (verts->xold, verts->xconst); + VECCOPY (verts->txold, verts->x); + + /* Get the current position. */ + VECCOPY (verts->xconst, vertexCos[i]); + Mat4MulVecfl(ob->obmat, verts->xconst); + + /* Compute the vertices velocity. */ + VECSUB (verts->v, verts->x, verts->xold); + } + + tstart(); + + /* Call the solver. */ + + if (solvers [clmd->sim_parms.solver_type].solver) + solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors,0,0); + + tend(); + printf("Cloth simulation time: %f\n", (float)tval()); + + cloth_cache_set_frame(clmd, framenr); + + } + else // just retrieve the cached frame + { + cloth_cache_get_frame(clmd, framenr); + } + + // Copy the result back to the object. + cloth_to_object (ob, clmd, vertexCos, numverts); + + // bvh_free(clmd->clothObject->tree); + // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + } + + } + else if((deltaTime <= 0.0f)||(deltaTime > 1.0f)) + { + if(cloth_cache_search_frame(clmd, framenr)) + { + cloth_cache_get_frame(clmd, framenr); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + } +} + +/* frees all */ +void cloth_free_modifier (ClothModifierData *clmd) +{ + Cloth *cloth = NULL; + + if(!clmd) + return; + + cloth = clmd->clothObject; + + // free our frame cache + clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; + cloth_cache_free(clmd, 0); + + /* Calls the solver and collision frees first as they + * might depend on data in clmd->clothObject. */ + + if (cloth) + { + // If our solver provides a free function, call it + if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) + { + solvers [cloth->old_solver_type].free (clmd); + } + + // Free the verts. + if (cloth->verts != NULL) + MEM_freeN (cloth->verts); + + cloth->verts = NULL; + cloth->numverts = -1; + + // Free the springs. + if (cloth->springs != NULL) + MEM_freeN (cloth->springs); + + cloth->springs = NULL; + cloth->numsprings = -1; + + // free BVH collision tree + if(cloth->tree) + bvh_free((BVH *)cloth->tree); + + // we save our faces for collision objects + if(cloth->mfaces) + MEM_freeN(cloth->mfaces); + + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + + MEM_freeN (cloth); + clmd->clothObject = NULL; + } + +} + + + +/****************************************************************************** +* +* Internal functions. +* +******************************************************************************/ + +/** +* cloth_to_object - copies the deformed vertices to the object. +* +* This function is a modified version of the softbody.c:softbody_to_object() function. +**/ +static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertexCos)[3], unsigned int numverts) +{ + ClothVertex *verts = NULL; + unsigned int i = 0; + + if (clmd->clothObject) { + verts = clmd->clothObject->verts; + + /* inverse matrix is not uptodate... */ + Mat4Invert (ob->imat, ob->obmat); + + for (i = 0; i < numverts; i++, verts++) + { + VECCOPY (vertexCos[i], verts->x); + Mat4MulVecfl (ob->imat, vertexCos[i]); /* softbody is in global coords */ + } + } + else if (DEBUG_CLOTH) + printf ("cloth_to_object: clmd->clothObject was NULL.\n"); +} + + +/** +* cloth_apply_vgroup - applies a vertex group as specified by type +* +**/ +static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) +{ + unsigned int i; + int j; + MDeformVert *dvert = NULL; + Cloth *clothObj; + unsigned int numverts = dm->getNumVerts(dm); + float goalfac = 0; + ClothVertex *verts = NULL; + + clothObj = clmd->clothObject; + + /* vgroup is 1 based, decrement so we can match the right group. */ + --vgroup; + + verts = clothObj->verts; + + for (i = 0; i < numverts; i++, verts++) + { + /* so this will definily be below SOFTGOALSNAP */ + verts->goal= 0.0f; + + // LATER ON, support also mass painting here + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + { + dvert = dm->getVertData(dm, i, CD_MDEFORMVERT); + if(dvert) + { + for(j = 0; j < dvert->totweight; j++) + { + if(dvert->dw[j].def_nr == vgroup) + { + verts->goal = dvert->dw [j].weight; + + goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); + verts->goal = (float)pow(verts->goal , 4.0f); + + if(dvert->dw [j].weight >=SOFTGOALSNAP) + { + verts->flags |= CVERT_FLAG_PINNED; + } + + // TODO enable mass painting here, for the moment i let "goals" go first + + break; + } + } + } + } + } +} + +// only meshes supported at the moment +/* collision objects */ +static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts) +{ + unsigned int i; + MVert *mvert = NULL; + ClothVertex *verts = NULL; + + switch (ob->type) + { + case OB_MESH: + + // mesh input objects need DerivedMesh + if(!dm) + return 0; + + cloth_from_mesh (ob, clmd, dm); + + if (clmd->clothObject != NULL) + { + mvert = CDDM_get_verts(dm); + verts = clmd->clothObject->verts; + + for (i = 0; i < numverts; i++, verts++) + { + VECCOPY (verts->x, mvert[i].co); + Mat4MulVecfl(ob->obmat, verts->x); + verts->flags = 0; + VECCOPY(verts->xold, verts->x); + VECCOPY(verts->txold, verts->x); + VECCOPY(verts->tx, verts->x); + VecMulf(verts->v, 0.0f); + } + clmd->clothObject->tree = bvh_build(clmd,clmd->coll_parms.epsilon); + + } + + return 1; + default: return 0; // TODO - we do not support changing meshes + } +} + +/* +helper function to get proper spring length +when object is rescaled +*/ +float cloth_globallen(float *v1,float *v2,Object *ob) +{ + float p1[3],p2[3]; + VECCOPY(p1,v1); + Mat4MulVecfl(ob->obmat, p1); + VECCOPY(p2,v2); + Mat4MulVecfl(ob->obmat, p2); + return VecLenf(p1,p2); +} + +static void curve_surf_to_cloth(Object *ob, ClothModifierData *clmd, float (*vertexCos)[3]) +{ + Curve *cu= ob->data; + Nurb *nu; + BezTriple *bezt; + float goalfac; + unsigned int a, curindex=0, i=0; + unsigned int numverts, numsprings = 0, setgoal=0; + Cloth *clothObj; + ClothVertex *verts = NULL; + + clmd->clothObject->numverts = numverts= count_curveverts(&cu->nurb); + clothObj = clmd->clothObject; + + if(ob->type==OB_CURVE) + { + numsprings = numverts - BLI_countlist(&cu->nurb); + } + + /* Allocate our vertices. + */ + clmd->clothObject->numverts = numverts; + clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); + if (clmd->clothObject->verts == NULL) + { + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); + return; + } + + verts = clmd->clothObject->verts; + + // copy vertex positions + for (i = 0; i < numverts; i++) + { + VECCOPY (verts->x, vertexCos[i]); + Mat4MulVecfl(ob->obmat, verts->x); + + verts->mass = clmd->sim_parms.mass; + // verts->goal= clmd->sim_parms.defgoal; + verts->flags = 0; + VECCOPY(verts->xold, verts->x); + VECCOPY(verts->xconst, verts->x); + VECCOPY(verts->txold, verts->x); + VecMulf(verts->v, 0.0f); + } + + clmd->clothObject->mfaces = NULL; // update face pointer + clmd->clothObject->numfaces = 0; + + clmd->clothObject->springs = MEM_callocN (sizeof (ClothSpring) * (numsprings), "cloth_springs_alloc"); + + // set vars now + goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); + // clothObj->verts [i].goal = clmd->sim_parms.mingoal + bezt->weight*goalfac; + + /* apply / set vertex groups */ + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + { + if (clmd->sim_parms.vgroup_mass > 0) + { + setgoal = 1; + } + } + +/* + for(nu= cu->nurb.first; nu; nu= nu->next) + { + if(nu->bezt) + { + for(bezt=nu->bezt, a=0; apntsu; a++, bezt++, bp+=3, curindex+=3) + { + if(setgoal) + { + bp->goal= sb->mingoal + bezt->weight*goalfac; + // a little ad hoc changing the goal control to be less *sharp* + bp->goal = (float)pow(bp->goal, 4.0f); + + // all three triples + (bp+1)->goal= bp->goal; + (bp+2)->goal= bp->goal; + } + + if(totspring) + { + if(a>0) + { + bs->v1= curindex-1; + bs->v2= curindex; + bs->strength= 1.0; + bs->order=1; + bs->len= globallen( (bezt-1)->vec[2], bezt->vec[0], ob ); + bs++; + } + bs->v1= curindex; + bs->v2= curindex+1; + bs->strength= 1.0; + bs->order=1; + bs->len= globallen( bezt->vec[0], bezt->vec[1], ob ); + bs++; + + bs->v1= curindex+1; + bs->v2= curindex+2; + bs->strength= 1.0; + bs->order=1; + bs->len= globallen( bezt->vec[1], bezt->vec[2], ob ); + bs++; + } + } + } + else { + for(bpnt=nu->bp, a=0; apntsu*nu->pntsv; a++, bpnt++, bp++, curindex++) + { + if(setgoal) + { + bp->goal= sb->mingoal + bpnt->weight*goalfac; + // a little ad hoc changing the goal control to be less *sharp* + bp->goal = (float)pow(bp->goal, 4.0f); + } + if(totspring && a>0) + { + bs->v1= curindex-1; + bs->v2= curindex; + bs->strength= 1.0; + bs->order=1; + bs->len= globallen( (bpnt-1)->vec, bpnt->vec , ob ); + bs++; + } + } + } + } + */ +} + +// only meshes supported at the moment +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts) +{ + unsigned int i = 0; + // dm->getNumVerts(dm); + MVert *mvert = NULL; // CDDM_get_verts(dm); + ClothVertex *verts = NULL; + + /* If we have a clothObject, free it. */ + if (clmd->clothObject != NULL) + cloth_free_modifier (clmd); + + /* Allocate a new cloth object. */ + clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); + if (clmd->clothObject) + { + clmd->clothObject->old_solver_type = -1; + clmd->clothObject->old_collision_type = -1; + } + else if (clmd->clothObject == NULL) + { + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); + return 0; + } + + switch (ob->type) + { + case OB_MESH: + + // mesh input objects need DerivedMesh + if(!dm) + return 0; + + cloth_from_mesh (ob, clmd, dm); + + if (clmd->clothObject != NULL) + { + /* create springs */ + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; + + if (!cloth_build_springs (clmd->clothObject, dm) ) + { + modifier_setError (&(clmd->modifier), "Can't build springs."); + return 0; + } + + mvert = CDDM_get_verts(dm); + verts = clmd->clothObject->verts; + + /* set initial values */ + for (i = 0; i < numverts; i++, verts++) + { + VECCOPY (verts->x, mvert[i].co); + Mat4MulVecfl(ob->obmat, verts->x); + + verts->mass = clmd->sim_parms.mass; + verts->goal= clmd->sim_parms.defgoal; + verts->flags = 0; + VECCOPY(verts->xold, verts->x); + VECCOPY(verts->xconst, verts->x); + VECCOPY(verts->txold, verts->x); + VecMulf(verts->v, 0.0f); + } + + /* apply / set vertex groups */ + if (clmd->sim_parms.vgroup_mass > 0) + cloth_apply_vgroup (clmd, dm, clmd->sim_parms.vgroup_mass); + + /* init our solver */ + if (solvers [clmd->sim_parms.solver_type].init) + solvers [clmd->sim_parms.solver_type].init (ob, clmd); + + clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + + cloth_cache_set_frame(clmd, 1); + } + + return 1; + case OB_LATTICE: + printf("OB_LATTICE\n"); + // lattice_to_softbody(ob); + return 1; + case OB_CURVE: + case OB_SURF: + printf("OB_SURF| OB_CURVE\n"); + curve_surf_to_cloth(ob, clmd, vertexCos); + return 1; + default: return 0; // TODO - we do not support changing meshes + } + + return 0; +} + +static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm) +{ + unsigned int numverts = dm->getNumVerts(dm); + unsigned int numfaces = dm->getNumFaces(dm); + MFace *mface = CDDM_get_faces(dm); + unsigned int i = 0; + + /* Allocate our vertices. + */ + clmd->clothObject->numverts = numverts; + clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); + if (clmd->clothObject->verts == NULL) + { + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); + return; + } + + // save face information + clmd->clothObject->numfaces = numfaces; + clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); + if (clmd->clothObject->mfaces == NULL) + { + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); + return; + } + for(i = 0; i < numfaces; i++) + memcpy(&clmd->clothObject->mfaces[i], &mface[i], sizeof(MFace)); + + + // for SIP code + // clmd->clothObject->facemarks = MEM_callocN (sizeof (unsigned char) * clmd->clothObject->numfaces, "clothFaceMarks"); + + /* Free the springs since they can't be correct if the vertices + * changed. + */ + if (clmd->clothObject->springs != NULL) + MEM_freeN (clmd->clothObject->springs); + +} + +/*************************************************************************************** +* SPRING NETWORK BUILDING IMPLEMENTATION BEGIN +***************************************************************************************/ + +int cloth_build_springs(Cloth *cloth, DerivedMesh *dm) +{ + ClothSpring *springs = NULL; + unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; + unsigned int i = 0; + unsigned int numverts = dm->getNumVerts(dm); + unsigned int numedges = dm->getNumEdges(dm); + unsigned int numfaces = dm->getNumFaces(dm); + MVert *mvert = CDDM_get_verts(dm); + MEdge *medge = CDDM_get_edges(dm); + MFace *mface = CDDM_get_faces(dm); + unsigned int index2 = 0; // our second vertex index + LinkNode **edgelist = NULL; + EdgeHash *edgehash = NULL; + LinkNode *search = NULL; + float temp[3]; + unsigned int temp_index = 0; + ClothSpring *tspring = NULL; + + // error handling + if(numedges==0) + return 0; + + edgelist = MEM_callocN (sizeof (LinkNode *) * numverts, "cloth_edgelist_alloc"); + for(i = 0; i < numverts; i++) + { + edgelist[i] = NULL; + } + + if(cloth->springs) + MEM_freeN(cloth->springs); + + // create spring network hash + edgehash = BLI_edgehash_new(); + + // should be 4 for maximal bending springs, using 5 to be sure ;) + springs = cloth->springs = MEM_callocN (sizeof (ClothSpring) * (numedges + numfaces * 2 + 6 * numverts), "cloth_springs_alloc"); + + // structural springs + for(i = 0; i < numedges; i++) + { + springs[i].ij = medge[i].v1; + springs[i].kl = medge[i].v2; + VECSUB(temp, mvert[springs[i].kl].co, mvert[springs[i].ij].co); + springs[i].restlen = sqrt(INPR(temp, temp)); + springs[i].type = STRUCTURAL; + springs[i].flags = 0; + struct_springs++; + } + + // shear springs + for(i = 0; i < numfaces; i++) + { + temp_index = struct_springs + shear_springs; + + springs[temp_index].ij = mface[i].v1; + springs[temp_index].kl = mface[i].v3; + VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); + springs[temp_index].restlen = sqrt(INPR(temp, temp)); + springs[temp_index].type = SHEAR; + + BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); + BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); + + shear_springs++; + temp_index++; + + springs[temp_index].ij = mface[i].v2; + springs[temp_index].kl = mface[i].v4; + VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); + springs[temp_index].restlen = sqrt(INPR(temp, temp)); + springs[temp_index].type = SHEAR; + + BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); + BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); + + shear_springs++; + } + + // bending springs + for(i = struct_springs; i < struct_springs+shear_springs; i++) + { + search = edgelist[springs[i].kl]; + while(search) + { + tspring = search->link; + index2 = ((tspring->ij==springs[i].kl) ? (tspring->kl) : (tspring->ij)); + + if(!BLI_edgehash_haskey(edgehash, index2, springs[i].ij) // check for existing spring + && !BLI_edgehash_haskey(edgehash, springs[i].ij, index2) // same + && (index2!=springs[i].ij)) // check if startpoint is equal to endpoint + { + temp_index = struct_springs + shear_springs + bend_springs; + + springs[temp_index].ij = springs[i].ij; + springs[temp_index].kl = index2; + VECSUB(temp, mvert[index2].co, mvert[springs[i].ij].co); + springs[temp_index].restlen = sqrt(INPR(temp, temp)); + springs[temp_index].type = BENDING; + BLI_edgehash_insert(edgehash, springs[temp_index].ij, index2, NULL); + bend_springs++; + + } + search = search->next; + } + } + + cloth->numsprings = struct_springs + shear_springs + bend_springs; + + for(i = 0; i < numverts; i++) + { + BLI_linklist_free(edgelist[i],NULL); + } + if(edgelist) + MEM_freeN(edgelist); + + BLI_edgehash_free(edgehash, NULL); + + return 1; + +} /* cloth_build_springs */ +/*************************************************************************************** +* SPRING NETWORK BUILDING IMPLEMENTATION END +***************************************************************************************/ + diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c new file mode 100644 index 00000000000..cdbac692b35 --- /dev/null +++ b/source/blender/blenkernel/intern/collision.c @@ -0,0 +1,638 @@ +/* collision.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include +#include +#include +#include "MEM_guardedalloc.h" +/* types */ +#include "DNA_curve_types.h" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#include "DNA_cloth_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_lattice_types.h" +#include "DNA_scene_types.h" +#include "DNA_modifier_types.h" +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_edgehash.h" +#include "BLI_linklist.h" +#include "BKE_curve.h" +#include "BKE_deform.h" +#include "BKE_DerivedMesh.h" +#include "BKE_cdderivedmesh.h" +#include "BKE_displist.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_mesh.h" +#include "BKE_object.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" +#include "BKE_utildefines.h" +#include "BKE_DerivedMesh.h" +#include "DNA_screen_types.h" +#include "BSE_headerbuttons.h" +#include "BIF_screen.h" +#include "BIF_space.h" +#include "mydevice.h" + +#include "Bullet-C-Api.h" + + +#define DERANDOMIZE 1 + + +enum TRIANGLE_MARK +{ + TM_MV = 1, + TM_ME = 2, + TM_V1 = 4, + TM_V2 = 8, + TM_V3 = 16, + TM_E1 = 32, + TM_E2 = 64, + TM_E3 = 128 +}; + +DO_INLINE int hasTriangleMark(unsigned char mark, unsigned char bit) { return mark & bit; } +DO_INLINE void setTriangleMark(unsigned char *mark, unsigned char bit) { mark[0] |= bit; } +DO_INLINE void clearTriangleMark(unsigned char *mark, unsigned char bit) { mark[0] &= ~bit; } + + +void generateTriangleMarks() +{ + /* + unsigned int firstEdge = 0; + + // 1. Initialization + memset(m_triangleMarks, 0, sizeof(unsigned char) * m_triangleCount); + + // 2. The Marking Process + + // 2.1 Randomly mark triangles for covering vertices. + for (unsigned int v = 0; v < m_vertexCount; ++v) + { + if (vertexCover(v) == 0) + { + + // Randomly select an edge whose first triangle we're going to flag. + +#ifndef DERANDOMIZE + firstEdge = (unsigned int)((float)(random() & 0x7FFFFFFF) / + (float)(0x80000000) * + (float)(m_vertices[v].getEdgeCount())); +#endif + for (unsigned int ofs = 0; ofs < m_vertices[v].getEdgeCount(); ++ofs) + { + unsigned int edgeIdx = (firstEdge + ofs) % m_vertices[v].getEdgeCount(); + if (m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangleCount()) + setTriangleMark(m_triangleMarks[m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangle(0)], TM_MV); + } + } + } + */ + /* If the Cloth is malformed (vertices without adjacent triangles) there might still be uncovered vertices. (Bad luck.) */ + /* + // 2.2 Randomly mark triangles for covering edges. + for (unsigned int e = 0; e < m_edgeCount; ++e) + { + if (m_edges[e].getTriangleCount() && (edgeCover(e) == 0)) + { +#ifndef DERANDOMIZE + setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(static_cast((float)(random() & 0x7FFFFFFF) / + (float)(0x80000000) * + (float)(m_edges[e].getTriangleCount())))], TM_ME); +#else + setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(0)], TM_ME); +#endif + } + } + + + // 3. The Unmarking Process + for (unsigned int t = 0; (t < m_triangleCount); ++t) + { + bool overCoveredVertices = true; + bool overCoveredEdges = true; + for (unsigned char i = 0; (i < 3) && (overCoveredVertices || overCoveredEdges); ++i) + { + + if (vertexCover(m_triangles[t].getVertex(i)) == 1) + overCoveredVertices = false; + if (edgeCover(m_triangles[t].getEdge(i)) == 1) + overCoveredEdges = false; + + assert(vertexCover(m_triangles[t].getVertex(i)) > 0); + assert(edgeCover(m_triangles[t].getEdge(i)) > 0); + } + if (overCoveredVertices) + clearTriangleMark(m_triangleMarks[t], TM_MV); + if (overCoveredEdges) + clearTriangleMark(m_triangleMarks[t], TM_ME); + } + + + // 4. The Bit Masking Process + vector vertexAssigned(m_vertexCount, false); + vector edgeAssigned(m_edgeCount, false); + for (unsigned int t = 0; (t < m_triangleCount); ++t) + { + for (unsigned char i = 0; i < 3; ++i) + { + if (!vertexAssigned[m_triangles[t].getVertex(i)]) + { + vertexAssigned[m_triangles[t].getVertex(i)] = true; + setTriangleMark(m_triangleMarks[t], 1 << (2 + i)); + } + if (!edgeAssigned[m_triangles[t].getEdge(i)]) + { + edgeAssigned[m_triangles[t].getEdge(i)] = true; + setTriangleMark(m_triangleMarks[t], 1 << (5 + i)); + } + } + } + */ +} + + +void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], double *w1, double *w2, double *w3) +{ + float tempV1[3], tempV2[3], tempV4[3]; + double a,b,c,e,f; + + VECSUB (tempV1, p1, p3); /* x1 - x3 */ + VECSUB (tempV2, p2, p3); /* x2 - x3 */ + VECSUB (tempV4, pv, p3); /* pv - x3 */ + + a = INPR (tempV1, tempV1); + b = INPR (tempV1, tempV2); + c = INPR (tempV2, tempV2); + e = INPR (tempV1, tempV4); + f = INPR (tempV2, tempV4); + + + w1[0] = (e * c - b * f) / (a * c - b * b); + w2[0] = (f - b * w1[0]) / c; + w3[0] = 1.0 - w1[0] - w2[0]; +} + +DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], float v3[3], double w1, double w2, double w3) +{ + to[0] = to[1] = to[2] = 0; + VECADDMUL(to, v1, w1); + VECADDMUL(to, v2, w2); + VECADDMUL(to, v3, w3); +} + +DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, + double frictionConstant, double delta_V_n) +{ + float vrel_t_pre[3]; + float vrel_t[3]; + VECSUBS(vrel_t_pre, vrel, normal, normalVelocity); + VECCOPY(vrel_t, vrel_t_pre); + VecMulf(vrel_t, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); + VECSUB(to, vrel_t_pre, vrel_t); + VecMulf(to, 1.0f / 2.0f); +} + +int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) +{ + unsigned int i = 0, numverts=0; + int result = 0; + LinkNode *search = NULL; + CollPair *collpair = NULL; + Cloth *cloth1, *cloth2; + MFace *face1, *face2; + double w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + numverts = clmd->clothObject->numverts; + + /* + for(i = 0; i < LIST_LENGTH; i++) + { + // calc SIP-code + // TODO for later: calculateSipCode() + + // calc distance (?) + + // calc impulse + + // apply impulse + } + */ + + for(i = 0; i < numverts; i++) + { + search = collision_list[i]; + + while(search) + { + collpair = search->link; + + face1 = &(cloth1->mfaces[collpair->face1]); + face2 = &(cloth2->mfaces[collpair->face2]); + + // compute barycentric coordinates for both collision points + if(!collpair->quadA) + bvh_compute_barycentric(collpair->p1, + cloth1->verts[face1->v1].txold, + cloth1->verts[face1->v2].txold, + cloth1->verts[face1->v3].txold, + &w1, &w2, &w3); + else + bvh_compute_barycentric(collpair->p1, + cloth1->verts[face1->v4].txold, + cloth1->verts[face1->v1].txold, + cloth1->verts[face1->v3].txold, + &w1, &w2, &w3); + + if(!collpair->quadB) + bvh_compute_barycentric(collpair->p2, + cloth2->verts[face2->v1].txold, + cloth2->verts[face2->v2].txold, + cloth2->verts[face2->v3].txold, + &u1, &u2, &u3); + else + bvh_compute_barycentric(collpair->p2, + cloth2->verts[face2->v4].txold, + cloth2->verts[face2->v1].txold, + cloth2->verts[face2->v3].txold, + &u1, &u2, &u3); + + // Calculate relative velocity. + if(!collpair->quadA) + interpolateOnTriangle(v1, cloth1->verts[face1->v1].v, cloth1->verts[face1->v2].v, cloth1->verts[face1->v3].v, w1, w2, w3); + else + interpolateOnTriangle(v1, cloth1->verts[face1->v4].v, cloth1->verts[face1->v1].v, cloth1->verts[face1->v3].v, w1, w2, w3); + + if(!collpair->quadB) + interpolateOnTriangle(v2, cloth2->verts[face2->v1].v, cloth2->verts[face2->v2].v, cloth2->verts[face2->v3].v, u1, u2, u3); + else + interpolateOnTriangle(v2, cloth2->verts[face2->v4].v, cloth2->verts[face2->v1].v, cloth2->verts[face2->v3].v, u1, u2, u3); + + VECSUB(relativeVelocity, v1, v2); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR(relativeVelocity, collpair->normal); + + // Calculate masses of points. + + // printf("relativeVelocity -> x: %f, y: %f, z: %f\n", relativeVelocity[0], relativeVelocity[1],relativeVelocity[2]); + + // If v_n_mag > 0 the edges are approaching each other. + if(magrelVel > ALMOST_ZERO) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent; + + calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + + magtangent = INPR(tangential, tangential); + + // Apply friction impulse. + if (magtangent > ALMOST_ZERO) + { + /* + printf("friction applied: %f\n", magtangent); + // TODO check original code + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); + */ + } + + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case + + // Apply the impulse and increase impulse counters. + /* + VECADDMUL(cloth1->verts[face1->v1].tv,collpair->normal, -magnitude_i); + VECADDMUL(cloth1->verts[face1->v2].tv,collpair->normal, -magnitude_i); + VECADDMUL(cloth1->verts[face1->v3].tv,collpair->normal, -magnitude_i); + VECADDMUL(cloth1->verts[face1->v4].tv,collpair->normal, -magnitude_i); + */ + + // my try + magtangent = INPR(cloth1->verts[face1->v1].tv, collpair->normal); + VECADDMUL(cloth1->verts[face1->v1].tv, collpair->normal, -magtangent); + + magtangent = INPR(cloth1->verts[face1->v2].tv, collpair->normal); + VECADDMUL(cloth1->verts[face1->v2].tv, collpair->normal, -magtangent); + + magtangent = INPR(cloth1->verts[face1->v3].tv, collpair->normal); + VECADDMUL(cloth1->verts[face1->v3].tv, collpair->normal, -magtangent); + + magtangent = INPR(cloth1->verts[face1->v4].tv, collpair->normal); + VECADDMUL(cloth1->verts[face1->v4].tv, collpair->normal, -magtangent); + + result = 1; + + } + + search = search->next; + } + } + + return result; +} + +// return distance between two triangles using bullet engine +double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData *coll_clmd, unsigned int tri_index1, unsigned int tri_index2, float pa[3], float pb[3], float normal[3], int quadA, int quadB) +{ + MFace *face1=NULL, *face2=NULL; + float a[3][3]; + float b[3][3]; + double distance=0, tempdistance=0; + Cloth *cloth1=NULL, *cloth2=NULL; + float tpa[3], tpb[3], tnormal[3]; + unsigned int indexA=0, indexB=0, indexC=0, indexD=0, indexE=0, indexF=0; + int i = 0; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + face1 = &(cloth1->mfaces[tri_index1]); + face2 = &(cloth2->mfaces[tri_index2]); + + // face a1 + face b1 + VECCOPY(a[0], cloth1->verts[face1->v1].txold); + VECCOPY(a[1], cloth1->verts[face1->v2].txold); + VECCOPY(a[2], cloth1->verts[face1->v3].txold); + + + VECCOPY(b[0], cloth2->verts[face2->v1].txold); + VECCOPY(b[1], cloth2->verts[face2->v2].txold); + VECCOPY(b[2], cloth2->verts[face2->v3].txold); + + distance = plNearestPoints(a,b,pa,pb,normal); + + quadA = quadB = 0; + + for(i = 0; i < 3; i++) + { + if(i == 0) + { + indexA = face1->v4; + indexB = face1->v1; + indexC = face1->v3; + + indexD = face2->v1; + indexE = face2->v2; + indexF = face2->v3; + } + else if(i == 1) + { + indexA = face1->v4; + indexB = face1->v1; + indexC = face1->v3; + + indexD = face2->v4; + indexE = face2->v1; + indexF = face2->v3; + } + else if(i == 2) + { + indexA = face1->v1; + indexB = face1->v2; + indexC = face1->v3; + + indexD = face2->v4; + indexE = face2->v1; + indexF = face2->v3; + } + + // face a2 + face b1 + VECCOPY(a[0], cloth1->verts[indexA].txold); + VECCOPY(a[1], cloth1->verts[indexB].txold); + VECCOPY(a[2], cloth1->verts[indexC].txold); + + + VECCOPY(b[0], cloth2->verts[indexD].txold); + VECCOPY(b[1], cloth2->verts[indexE].txold); + VECCOPY(b[2], cloth2->verts[indexF].txold); + + tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); + + if(tempdistance < distance) + { + VECCOPY(pa, tpa); + VECCOPY(pb, tpb); + VECCOPY(normal, tnormal); + distance = tempdistance; + + if(i == 0) + { + quadA = 1; quadB = 0; + } + else if(i == 1) + { + quadA = quadB = 1; + } + else if(i == 2) + { + quadA = 0; quadB = 1; + } + } + } + return distance; +} + +void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2) +{ + CollPair *collpair = NULL; + LinkNode **linknode; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + linknode = clmd->coll_parms.temp; + + // calc SIPcode (?) + + // calc distance + normal + distance = implicit_tri_check_coherence(clmd, coll_clmd, tree1->tri_index, tree2->tri_index, collpair->p1, collpair->p2, collpair->vector, collpair->quadA, collpair->quadB); + + if (ABS(distance) <= (epsilon + ALMOST_ZERO)) + { + // printf("distance: %f, epsilon: %f\n", (float)distance, epsilon + ALMOST_ZERO); + + collpair->face1 = tree1->tri_index; + collpair->face2 = tree2->tri_index; + + VECCOPY(collpair->normal, collpair->vector); + Normalize(collpair->normal); + + // printf("normal x: %f, y: %f, z: %f\n", collpair->normal[0], collpair->normal[1], collpair->normal[2]); + + collpair->distance = distance; + + BLI_linklist_append(&linknode[tree1->tri_index], collpair); + } + else + { + MEM_freeN(collpair); + } +} + + +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt) +{ + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Cloth *cloth=NULL; + Object *coll_ob=NULL; + BVH *cloth_bvh=NULL; + unsigned int i=0, numverts=0; + int result = 0; + + if ((clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + { + return 0; + } + cloth = clmd->clothObject; + cloth_bvh = (BVH *) cloth->tree; + numverts = clmd->clothObject->numverts; + + //////////////////////////////////////////////////////////// + // static collisions + //////////////////////////////////////////////////////////// + + // update cloth bvh + bvh_update_static(clmd, cloth_bvh); + + // search all objects for collision object + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + unsigned int coll_numverts = coll_clmd->clothObject->numverts; + Cloth *coll_cloth = coll_clmd->clothObject; + + LinkNode **collision_list = MEM_callocN (sizeof(LinkNode *)*numverts, "collision_list"); + BVH *coll_bvh = coll_clmd->clothObject->tree; + + if(collision_list) + { + // memset(collision_list, 0, sizeof(LinkNode *)*numverts); + + for(i = 0; i < numverts; i++) + { + collision_list[i] = NULL; + } + + clmd->coll_parms.temp = collision_list; + + // update position of collision object + for(i = 0; i < coll_numverts; i++) + { + VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); + + VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); + + VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); + } + + // update BVH of collision object + bvh_update_static(coll_clmd, coll_bvh); + + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); + + result += collision_static(clmd, coll_clmd, collision_list); + + // calculate velocities + + // free temporary list + for(i = 0; i < numverts; i++) + { + LinkNode *search = collision_list[i]; + while(search) + { + LinkNode *next= search->next; + CollPair *collpair = search->link; + + if(collpair) + MEM_freeN(collpair); + + search = next; + } + + BLI_linklist_free(collision_list[i],NULL); + } + if(collision_list) + MEM_freeN(collision_list); + + clmd->coll_parms.temp = NULL; + } + + + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + //////////////////////////////////////////////////////////// + // update positions + velocities + //////////////////////////////////////////////////////////// + + // TODO + + + //////////////////////////////////////////////////////////// + // moving collisions + //////////////////////////////////////////////////////////// + + // TODO + // bvh_update_moving(clmd, clmd->clothObject->tree); + + return MIN2(result, 1); +} diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c new file mode 100644 index 00000000000..5d386036b7b --- /dev/null +++ b/source/blender/blenkernel/intern/implicit.c @@ -0,0 +1,1511 @@ +/* implicit.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ +#include +#include +#include +#include +#include "MEM_guardedalloc.h" +/* types */ +#include "DNA_curve_types.h" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#include "DNA_cloth_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_modifier_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_lattice_types.h" +#include "DNA_scene_types.h" +#include "DNA_modifier_types.h" +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_threads.h" +#include "BKE_curve.h" +#include "BKE_displist.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_key.h" +#include "BKE_object.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" +#include "BKE_utildefines.h" +#include "BKE_global.h" +#include "BIF_editdeform.h" + + +#ifdef _WIN32 +#include +static LARGE_INTEGER _itstart, _itend; +static LARGE_INTEGER ifreq; +void itstart(void) +{ + static int first = 1; + if(first) { + QueryPerformanceFrequency(&ifreq); + first = 0; + } + QueryPerformanceCounter(&_itstart); +} +void itend(void) +{ + QueryPerformanceCounter(&_itend); +} +double itval() +{ + return ((double)_itend.QuadPart - + (double)_itstart.QuadPart)/((double)ifreq.QuadPart); +} +#else +#include +// intrinsics need better compile flag checking +// #include +// #include +#include + +static struct timeval _itstart, _itend; +static struct timezone itz; +void itstart(void) +{ + gettimeofday(&_itstart, &itz); +} +void itend(void) +{ + gettimeofday(&_itend,&itz); +} +double itval() +{ + double t1, t2; + t1 = (double)_itstart.tv_sec + (double)_itstart.tv_usec/(1000*1000); + t2 = (double)_itend.tv_sec + (double)_itend.tv_usec/(1000*1000); + return t2-t1; +} +#endif +/* +#define C99 +#ifdef C99 +#defineDO_INLINE inline +#else +#defineDO_INLINE static +#endif +*/ +struct Cloth; + +////////////////////////////////////////// +/* fast vector / matrix library, enhancements are welcome :) -dg */ +///////////////////////////////////////// + +/* DEFINITIONS */ +typedef float lfVector[3]; +typedef struct fmatrix3x3 { + float m[3][3]; /* 4x4 matrix */ + unsigned int c,r; /* column and row number */ + int pinned; /* is this vertex allowed to move? */ + float n1,n2,n3; /* three normal vectors for collision constrains */ + unsigned int vcount; /* vertex count */ + unsigned int scount; /* spring count */ +} fmatrix3x3; + +/////////////////////////// +// float[3] vector +/////////////////////////// +/* simple vector code */ +/* STATUS: verified */ +DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar) +{ + to[0] = from[0] * scalar; + to[1] = from[1] * scalar; + to[2] = from[2] * scalar; +} +/* simple cross product */ +/* STATUS: verified */ +DO_INLINE void cross_fvector(float to[3], float vectorA[3], float vectorB[3]) +{ + to[0] = vectorA[1] * vectorB[2] - vectorA[2] * vectorB[1]; + to[1] = vectorA[2] * vectorB[0] - vectorA[0] * vectorB[2]; + to[2] = vectorA[0] * vectorB[1] - vectorA[1] * vectorB[0]; +} +/* simple v^T * v product ("outer product") */ +/* STATUS: HAS TO BE verified (*should* work) */ +DO_INLINE void mul_fvectorT_fvector(float to[3][3], float vectorA[3], float vectorB[3]) +{ + mul_fvector_S(to[0], vectorB, vectorA[0]); + mul_fvector_S(to[1], vectorB, vectorA[1]); + mul_fvector_S(to[2], vectorB, vectorA[2]); +} +/* simple v^T * v product with scalar ("outer product") */ +/* STATUS: HAS TO BE verified (*should* work) */ +DO_INLINE void mul_fvectorT_fvectorS(float to[3][3], float vectorA[3], float vectorB[3], float aS) +{ + mul_fvector_S(to[0], vectorB, vectorA[0]* aS); + mul_fvector_S(to[1], vectorB, vectorA[1]* aS); + mul_fvector_S(to[2], vectorB, vectorA[2]* aS); +} + +/* printf vector[3] on console: for debug output */ +void print_fvector(float m3[3]) +{ + printf("%f\n%f\n%f\n\n",m3[0],m3[1],m3[2]); +} + +/////////////////////////// +// long float vector float (*)[3] +/////////////////////////// +/* print long vector on console: for debug output */ +DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts) +{ + unsigned int i = 0; + for(i = 0; i < verts; i++) + { + print_fvector(fLongVector[i]); + } +} +/* create long vector */ +DO_INLINE lfVector *create_lfvector(unsigned int verts) +{ + // TODO: check if memory allocation was successfull */ + return (lfVector *)MEM_callocN (verts * sizeof(lfVector), "cloth_implicit_alloc_vector"); + // return (lfVector *)cloth_aligned_malloc(&MEMORY_BASE, verts * sizeof(lfVector)); +} +/* delete long vector */ +DO_INLINE void del_lfvector(float (*fLongVector)[3]) +{ + if (fLongVector != NULL) + { + MEM_freeN (fLongVector); + // cloth_aligned_free(&MEMORY_BASE, fLongVector); + } +} +/* copy long vector */ +DO_INLINE void cp_lfvector(float (*to)[3], float (*from)[3], unsigned int verts) +{ + memcpy(to, from, verts * sizeof(lfVector)); +} +/* init long vector with float[3] */ +DO_INLINE void init_lfvector(float (*fLongVector)[3], float vector[3], unsigned int verts) +{ + unsigned int i = 0; + for(i = 0; i < verts; i++) + { + VECCOPY(fLongVector[i], vector); + } +} +/* zero long vector with float[3] */ +DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) +{ + memset(to, 0.0f, verts * sizeof(lfVector)); +} +/* multiply long vector with scalar*/ +DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) +{ + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + mul_fvector_S(to[i], fLongVector[i], scalar); + } +} +/* multiply long vector with scalar*/ +/* A -= B * float */ +DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) +{ + unsigned int i = 0; + for(i = 0; i < verts; i++) + { + VECSUBMUL(to[i], fLongVector[i], scalar); + } +} +/* dot product for big vector */ +DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +{ + unsigned int i = 0; + +#ifndef _WIN32 + float temp __attribute__ ((aligned (16) ) )= 0.0f; // __declspec(align(16)) +#else + float temp = 0.0f; +#endif + +#pragma omp parallel for reduction(+: temp) schedule(guided, 1) + for(i = 0; i < verts; i++) + { + temp += INPR(fLongVectorA[i], fLongVectorB[i]); + } + return temp; +} +/* A = B + C --> for big vector */ +DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +{ + + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECADD(to[i], fLongVectorA[i], fLongVectorB[i]); + } + +} +/* A = B + C * float --> for big vector */ +DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) +{ + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECADDS(to[i], fLongVectorA[i], fLongVectorB[i], bS); + + } +} +/* A = B * float + C * float --> for big vector */ +DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float aS, float (*fLongVectorB)[3], float bS, unsigned int verts) +{ + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECADDSS(to[i], fLongVectorA[i], aS, fLongVectorB[i], bS); + } +} +/* A = B - C * float --> for big vector */ +DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) +{ + unsigned int i = 0; + for(i = 0; i < verts; i++) + { + VECSUBS(to[i], fLongVectorA[i], fLongVectorB[i], bS); + } + +} +/* A = B - C --> for big vector */ +DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +{ + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECSUB(to[i], fLongVectorA[i], fLongVectorB[i]); + } + +} +/////////////////////////// +// 4x4 matrix +/////////////////////////// +/* printf 4x4 matrix on console: for debug output */ +void print_fmatrix(float m3[3][3]) +{ + printf("%f\t%f\t%f\n",m3[0][0],m3[0][1],m3[0][2]); + printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]); + printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]); +} +/* copy 4x4 matrix */ +DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) +{ + // memcpy(to, from, sizeof (float) * 9); + VECCOPY(to[0], from[0]); + VECCOPY(to[1], from[1]); + VECCOPY(to[2], from[2]); +} +/* calculate determinant of 4x4 matrix */ +DO_INLINE float det_fmatrix(float m[3][3]) +{ + return m[0][0]*m[1][1]*m[2][2] + m[1][0]*m[2][1]*m[0][2] + m[0][1]*m[1][2]*m[2][0] + -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; +} +DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) +{ + unsigned int i, j; + float d; + + if((d=det_fmatrix(from))==0) + { + printf("can't build inverse"); + exit(0); + } + for(i=0;i<3;i++) + { + for(j=0;j<3;j++) + { + int i1=(i+1)%3; + int i2=(i+2)%3; + int j1=(j+1)%3; + int j2=(j+2)%3; + // reverse indexs i&j to take transpose + to[j][i] = (from[i1][j1]*from[i2][j2]-from[i1][j2]*from[i2][j1])/d; + /* + if(i==j) + to[i][j] = 1.0f / from[i][j]; + else + to[i][j] = 0; + */ + } + } + +} + +/* 4x4 matrix multiplied by a scalar */ +/* STATUS: verified */ +DO_INLINE void mul_fmatrix_S(float matrix[3][3], float scalar) +{ + mul_fvector_S(matrix[0], matrix[0],scalar); + mul_fvector_S(matrix[1], matrix[1],scalar); + mul_fvector_S(matrix[2], matrix[2],scalar); +} + +/* a vector multiplied by a 4x4 matrix */ +/* STATUS: verified */ +DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][3]) +{ + to[0] = matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; + to[1] = matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; + to[2] = matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; +} + +/* 4x4 matrix multiplied by a vector */ +/* STATUS: verified */ +DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][3], float *from) +{ + to[0] = INPR(matrix[0],from); + to[1] = INPR(matrix[1],from); + to[2] = INPR(matrix[2],from); +} +/* 4x4 matrix multiplied by a 4x4 matrix */ +/* STATUS: verified */ +DO_INLINE void mul_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + mul_fvector_fmatrix(to[0], matrixA[0],matrixB); + mul_fvector_fmatrix(to[1], matrixA[1],matrixB); + mul_fvector_fmatrix(to[2], matrixA[2],matrixB); +} +/* 4x4 matrix addition with 4x4 matrix */ +DO_INLINE void add_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + VECADD(to[0], matrixA[0], matrixB[0]); + VECADD(to[1], matrixA[1], matrixB[1]); + VECADD(to[2], matrixA[2], matrixB[2]); +} +/* 4x4 matrix add-addition with 4x4 matrix */ +DO_INLINE void addadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + VECADDADD(to[0], matrixA[0], matrixB[0]); + VECADDADD(to[1], matrixA[1], matrixB[1]); + VECADDADD(to[2], matrixA[2], matrixB[2]); +} +/* 4x4 matrix sub-addition with 4x4 matrix */ +DO_INLINE void addsub_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) +{ + VECADDSUBSS(to[0], matrixA[0], aS, matrixB[0], bS); + VECADDSUBSS(to[1], matrixA[1], aS, matrixB[1], bS); + VECADDSUBSS(to[2], matrixA[2], aS, matrixB[2], bS); +} +/* A -= B + C (4x4 matrix sub-addition with 4x4 matrix) */ +DO_INLINE void subadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + VECSUBADD(to[0], matrixA[0], matrixB[0]); + VECSUBADD(to[1], matrixA[1], matrixB[1]); + VECSUBADD(to[2], matrixA[2], matrixB[2]); +} +/* A -= B*x + C*y (4x4 matrix sub-addition with 4x4 matrix) */ +DO_INLINE void subadd_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) +{ + VECSUBADDSS(to[0], matrixA[0], aS, matrixB[0], bS); + VECSUBADDSS(to[1], matrixA[1], aS, matrixB[1], bS); + VECSUBADDSS(to[2], matrixA[2], aS, matrixB[2], bS); +} +/* A = B - C (4x4 matrix subtraction with 4x4 matrix) */ +DO_INLINE void sub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + VECSUB(to[0], matrixA[0], matrixB[0]); + VECSUB(to[1], matrixA[1], matrixB[1]); + VECSUB(to[2], matrixA[2], matrixB[2]); +} +/* A += B - C (4x4 matrix add-subtraction with 4x4 matrix) */ +DO_INLINE void addsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + VECADDSUB(to[0], matrixA[0], matrixB[0]); + VECADDSUB(to[1], matrixA[1], matrixB[1]); + VECADDSUB(to[2], matrixA[2], matrixB[2]); +} +///////////////////////////////////////////////////////////////// +// special functions +///////////////////////////////////////////////////////////////// +/* a vector multiplied and added to/by a 4x4 matrix */ +DO_INLINE void muladd_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) +{ + to[0] += matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; + to[1] += matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; + to[2] += matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; +} +/* 4x4 matrix multiplied and added to/by a 4x4 matrix and added to another 4x4 matrix */ +DO_INLINE void muladd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + muladd_fvector_fmatrix(to[0], matrixA[0],matrixB); + muladd_fvector_fmatrix(to[1], matrixA[1],matrixB); + muladd_fvector_fmatrix(to[2], matrixA[2],matrixB); +} +/* a vector multiplied and sub'd to/by a 4x4 matrix */ +DO_INLINE void mulsub_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) +{ + to[0] -= matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; + to[1] -= matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; + to[2] -= matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; +} +/* 4x4 matrix multiplied and sub'd to/by a 4x4 matrix and added to another 4x4 matrix */ +DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +{ + mulsub_fvector_fmatrix(to[0], matrixA[0],matrixB); + mulsub_fvector_fmatrix(to[1], matrixA[1],matrixB); + mulsub_fvector_fmatrix(to[2], matrixA[2],matrixB); +} +/* 4x4 matrix multiplied+added by a vector */ +/* STATUS: verified */ +DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) +{ + to[0] += INPR(matrix[0],from); + to[1] += INPR(matrix[1],from); + to[2] += INPR(matrix[2],from); +} +/* 4x4 matrix multiplied+sub'ed by a vector */ +DO_INLINE void mulsub_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) +{ + to[0] -= INPR(matrix[0],from); + to[1] -= INPR(matrix[1],from); + to[2] -= INPR(matrix[2],from); +} +///////////////////////////////////////////////////////////////// + +/////////////////////////// +// SPARSE SYMMETRIC big matrix with 4x4 matrix entries +/////////////////////////// +/* printf a big matrix on console: for debug output */ +void print_bfmatrix(fmatrix3x3 *m3) +{ + unsigned int i = 0; + + for(i = 0; i < m3[0].vcount + m3[0].scount; i++) + { + print_fmatrix(m3[i].m); + } +} +/* create big matrix */ +DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs) +{ + // TODO: check if memory allocation was successfull */ + fmatrix3x3 *temp = (fmatrix3x3 *)MEM_callocN (sizeof (fmatrix3x3) * (verts + springs), "cloth_implicit_alloc_matrix"); + temp[0].vcount = verts; + temp[0].scount = springs; + return temp; +} +/* delete big matrix */ +DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix) +{ + if (matrix != NULL) + { + MEM_freeN (matrix); + } +} +/* copy big matrix */ +DO_INLINE void cp_bfmatrix(fmatrix3x3 *to, fmatrix3x3 *from) +{ + // TODO bounds checking + memcpy(to, from, sizeof(fmatrix3x3) * (from[0].vcount+from[0].scount) ); +} +/* init the diagonal of big matrix */ +// slow in parallel +DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) +{ + unsigned int i,j; + float tmatrix[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + + for(i = 0; i < matrix[0].vcount; i++) + { + cp_fmatrix(matrix[i].m, m3); + } + for(j = matrix[0].vcount; j < matrix[0].vcount+matrix[0].scount; j++) + { + cp_fmatrix(matrix[j].m, tmatrix); + } +} +/* init big matrix */ +DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) +{ + unsigned int i; + + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + cp_fmatrix(matrix[i].m, m3); + } +} +/* multiply big matrix with scalar*/ +DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) +{ + unsigned int i = 0; + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + mul_fmatrix_S(matrix[i].m, scalar); + } +} +/* SPARSE SYMMETRIC multiply big matrix with long vector*/ +/* STATUS: verified */ +DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) +{ + unsigned int i = 0,j=0; + zero_lfvector(to, from[0].vcount); + /* process diagonal elements */ + for(i = 0; i < from[0].vcount; i++) + { + muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); + } + + /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ + for(j = from[0].vcount; j < from[0].vcount+from[0].scount; j++) + { + muladd_fmatrix_fvector(to[from[j].c], from[j].m, fLongVector[from[j].r]); + muladd_fmatrix_fvector(to[from[j].r], from[j].m, fLongVector[from[j].c]); + } + +} +/* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ +DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + add_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + } + +} +/* SPARSE SYMMETRIC add big matrix with big matrix: A += B + C */ +DO_INLINE void addadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + addadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + } + +} +/* SPARSE SYMMETRIC subadd big matrix with big matrix: A -= B + C */ +DO_INLINE void subadd_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + subadd_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + } + +} +/* A = B - C (SPARSE SYMMETRIC sub big matrix with big matrix) */ +DO_INLINE void sub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + sub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + } + +} +/* SPARSE SYMMETRIC sub big matrix with big matrix S (special constraint matrix with limited entries) */ +DO_INLINE void sub_bfmatrix_Smatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount; i++) + { + sub_fmatrix_fmatrix(to[matrix[i].c].m, from[matrix[i].c].m, matrix[i].m); + } + +} +/* A += B - C (SPARSE SYMMETRIC addsub big matrix with big matrix) */ +DO_INLINE void addsub_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + addsub_fmatrix_fmatrix(to[i].m, from[i].m, matrix[i].m); + } + +} +/* SPARSE SYMMETRIC sub big matrix with big matrix*/ +/* A -= B * float + C * float --> for big matrix */ +/* VERIFIED */ +DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, float aS, fmatrix3x3 *matrix, float bS) +{ + unsigned int i = 0; + + /* process diagonal elements */ + for(i = 0; i < matrix[0].vcount+matrix[0].scount; i++) + { + subadd_fmatrixS_fmatrixS(to[i].m, from[i].m, aS, matrix[i].m, bS); + } + +} + +/////////////////////////////////////////////////////////////////// +// simulator start +/////////////////////////////////////////////////////////////////// +static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}}; +static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; +typedef struct Implicit_Data +{ + lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; + fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI; +} Implicit_Data; +int implicit_init (Object *ob, ClothModifierData *clmd) +{ + unsigned int i = 0; + unsigned int pinned = 0; + Cloth *cloth; + ClothVertex *verts; + ClothSpring *springs; + Implicit_Data *id; + + // init memory guard + // MEMORY_BASE.first = MEMORY_BASE.last = NULL; + + cloth = (Cloth *)clmd->clothObject; + verts = cloth->verts; + springs = cloth->springs; + + // create implicit base + id = (Implicit_Data *)MEM_callocN (sizeof(Implicit_Data), "implicit vecmat"); + cloth->implicit = id; + + /* process diagonal elements */ + id->A = create_bfmatrix(cloth->numverts, cloth->numsprings); + id->dFdV = create_bfmatrix(cloth->numverts, cloth->numsprings); + id->dFdX = create_bfmatrix(cloth->numverts, cloth->numsprings); + id->S = create_bfmatrix(cloth->numverts, 0); + id->Pinv = create_bfmatrix(cloth->numverts, cloth->numsprings); + id->P = create_bfmatrix(cloth->numverts, cloth->numsprings); + id->bigI = create_bfmatrix(cloth->numverts, cloth->numsprings); // TODO 0 springs + id->X = create_lfvector(cloth->numverts); + id->Xnew = create_lfvector(cloth->numverts); + id->V = create_lfvector(cloth->numverts); + id->Vnew = create_lfvector(cloth->numverts); + id->olddV = create_lfvector(cloth->numverts); + zero_lfvector(id->olddV, cloth->numverts); + id->F = create_lfvector(cloth->numverts); + id->B = create_lfvector(cloth->numverts); + id->dV = create_lfvector(cloth->numverts); + id->z = create_lfvector(cloth->numverts); + for(i=0;inumverts;i++) + { + id->A[i].r = id->A[i].c = id->dFdV[i].r = id->dFdV[i].c = id->dFdX[i].r = id->dFdX[i].c = id->P[i].c = id->P[i].r = id->Pinv[i].c = id->Pinv[i].r = id->bigI[i].c = id->bigI[i].r = i; + + if(verts [i].flags & CVERT_FLAG_PINNED) + { + id->S[pinned].pinned = 1; + id->S[pinned].c = id->S[pinned].r = i; + pinned++; + } + } + + // S is special and needs specific vcount and scount + id->S[0].vcount = pinned; id->S[0].scount = 0; + + // init springs */ + for(i=0;inumsprings;i++) + { + // dFdV_start[i].r = big_I[i].r = big_zero[i].r = + id->A[i+cloth->numverts].r = id->dFdV[i+cloth->numverts].r = id->dFdX[i+cloth->numverts].r = + id->P[i+cloth->numverts].r = id->Pinv[i+cloth->numverts].r = id->bigI[i+cloth->numverts].r = springs[i].ij; + + // dFdV_start[i].c = big_I[i].c = big_zero[i].c = + id->A[i+cloth->numverts].c = id->dFdV[i+cloth->numverts].c = id->dFdX[i+cloth->numverts].c = + id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = springs[i].kl; + + springs[i].matrix_index = i + cloth->numverts; + } + + for(i = 0; i < cloth->numverts; i++) + { + VECCOPY(id->X[i], verts[i].x); + } + + return 1; +} +int implicit_free (ClothModifierData *clmd) +{ + Implicit_Data *id; + Cloth *cloth; + cloth = (Cloth *)clmd->clothObject; + + if(cloth) + { + id = cloth->implicit; + + if(id) + { + del_bfmatrix(id->A); + del_bfmatrix(id->dFdV); + del_bfmatrix(id->dFdX); + del_bfmatrix(id->S); + del_bfmatrix(id->P); + del_bfmatrix(id->Pinv); + del_bfmatrix(id->bigI); + + del_lfvector(id->X); + del_lfvector(id->Xnew); + del_lfvector(id->V); + del_lfvector(id->Vnew); + del_lfvector(id->olddV); + del_lfvector(id->F); + del_lfvector(id->B); + del_lfvector(id->dV); + del_lfvector(id->z); + + MEM_freeN(id); + } + } + + return 1; +} +DO_INLINE float fb(float length, float L) +{ + float x = length/L; + return (-11.541f*pow(x,4)+34.193f*pow(x,3)-39.083f*pow(x,2)+23.116f*x-9.713f); +} +DO_INLINE float fbderiv(float length, float L) +{ + float x = length/L; + + return (-46.164f*pow(x,3)+102.579f*pow(x,2)-78.166f*x+23.116f); +} + +DO_INLINE float fbstar(float length, float L, float kb, float cb) +{ + float tempfb = kb * fb(length, L); + + float fbstar = cb * (length - L); + + if(tempfb < fbstar) + return fbstar; + else + return tempfb; +} +DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) +{ + float tempfb = kb * fb(length, L); + float fbstar = cb * (length - L); + + if(tempfb < fbstar) + { + return cb; + } + else + { + return kb * fbderiv(length, L); + } +} +DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) +{ + unsigned int i=0; + + for(i=0;istarget && conjgrad_loopcount < conjgrad_looplimit)) + { + // Mul(q,A,d); // q = A*d; + mul_bfmatrix_lfvector(q, lA, d); + + filter(q,S); + + a = s/dot_lfvector(d, q, numverts); + + // X = X + d*a; + add_lfvector_lfvectorS(ldV, ldV, d, a, numverts); + + // r = r - q*a; + sub_lfvector_lfvectorS(r, r, q, a, numverts); + + s_prev = s; + s = dot_lfvector(r, r, numverts); + + //d = r+d*(s/s_prev); + add_lfvector_lfvectorS(d, r, d, (s/s_prev), numverts); + + filter(d,S); + + conjgrad_loopcount++; + } + conjgrad_lasterror = s; + + del_lfvector(q); + del_lfvector(d); + del_lfvector(tmp); + del_lfvector(r); + // printf("W/O conjgrad_loopcount: %d\n", conjgrad_loopcount); + + return conjgrad_loopcount(epsilon_sqr*delta0))&& (conjgrad_loopcount++ < conjgrad_looplimit)) +{ +////////////////////////// +// (s) = q = S*A*c +////////////////////////// +// q = A*c; +mul_bfmatrix_lfvector(q, lA, c); +filter(q,S); +////////////////////////// + +////////////////////////// +// alpha = deltanew / (c^T * q) +////////////////////////// +alpha = deltanew/dot_lfvector(c, q, numverts); +////////////////////////// + +//X = X + c*alpha; +add_lfvector_lfvectorS(ldV, ldV, c, alpha, numverts); +//r = r - q*alpha; +sub_lfvector_lfvectorS(r, r, q, alpha, numverts); + +////////////////////////// +// (h) = s = P^-1 * r +////////////////////////// +// s = Pinv * r; +mul_bfmatrix_lfvector(s, Pinv, r); +filter(s,S); +////////////////////////// + +deltaold = deltanew; + +// deltanew = dot(r,s); +deltanew = dot_lfvector(r, s, numverts); + +////////////////////////// +// c = S * (s + (deltanew/deltaold)*c) +////////////////////////// +// c = s + c * (deltanew/deltaold); +add_lfvector_lfvectorS(c, s, c, (deltanew/deltaold), numverts); +filter(c,S); +////////////////////////// + +} +conjgrad_lasterror = deltanew; +del_lfvector(q); +del_lfvector(c); +del_lfvector(tmp); +del_lfvector(r); +del_lfvector(s); +del_lfvector(filterX0); +del_lfvector(p_fb); +del_lfvector(bhat); +printf("Bconjgrad_loopcount: %d\n", conjgrad_loopcount); + +return conjgrad_loopcount 1.0f) ? (1.0f): (L/length))); + sub_fmatrix_fmatrix(to, to, I); + mul_fmatrix_S(to, -k); +} +DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float vel[3],float rest,float damping) +{ + // inner spring damping vel is the relative velocity of the endpoints. + // return (I-outerprod(dir,dir)) * (-damping * -(dot(dir,vel)/Max(length,rest))); + mul_fvectorT_fvector(to, dir, dir); + sub_fmatrix_fmatrix(to, I, to); + mul_fmatrix_S(to, (-damping * -(INPR(dir,vel)/MAX2(length,rest)))); + +} + +DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +{ + float extent[3]; + float length = 0; + float dir[3] = {0,0,0}; + float vel[3]; + float k = 0.0f; + float L = s->restlen; + float cb = clmd->sim_parms.structural; + + float f[3] = {0,0,0}; + float stretch_force[3] = {0,0,0}; + float bending_force[3] = {0,0,0}; + float damping_force[3] = {0,0,0}; + float dfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; + float dfdv[3][3]; + int needed = 0; + Cloth *cloth = clmd->clothObject; + ClothVertex *verts = cloth->verts; + + // calculate elonglation + VECSUB(extent, X[s->kl], X[s->ij]); + VECSUB(vel, V[s->kl], V[s->ij]); + length = sqrt(INPR(extent, extent)); + + + + if(length > ABS(ALMOST_ZERO)) + { + if(length>L) + { + if((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms.maxspringlen))) // cut spring! + { + s->flags |= CSPRING_FLAG_DEACTIVATE; + return; + } + } + + mul_fvector_S(dir, extent, 1.0f/length); + } + else + { + mul_fvector_S(dir, extent, 0.0f); + } + + + // calculate force of structural springs + if(s->type != BENDING) + { + if(length > L) // only on elonglation + { + needed++; + + k = clmd->sim_parms.structural; + + mul_fvector_S(stretch_force, dir, (k*(length-L))); + + VECADD(f, f, stretch_force); + + // Ascher & Boxman, p.21: Damping only during elonglation + mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * ((INPR(vel,extent)/length))); + VECADD(f, f, damping_force); + + dfdx_spring_type1(dfdx, dir,length,L,k); + + dfdv_damp(dfdv, dir,clmd->sim_parms.Cdis); + sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, dfdv); + sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, dfdv); + + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, dfdv); + + } + } + else // calculate force of bending springs + { + if(length < L) + { + k = clmd->sim_parms.bending; + + needed++; + + mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); + VECADD(f, f, bending_force); + + dfdx_spring_type2(dfdx, dir,length,L,k, cb); + } + } + + if(needed) + { + VECADD(lF[s->ij], lF[s->ij], f); + VECSUB(lF[s->kl], lF[s->kl], f); + + sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, dfdx); + sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, dfdx); + + add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, dfdx); + } +} + +DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) +{ + float v1[3], v2[3]; + + VECSUB(v1, X[mface.v2], X[mface.v1]); + VECSUB(v2, X[mface.v3], X[mface.v1]); + cross_fvector(to, v1, v2); +} +DO_INLINE void calculatQuadNormal(float to[3], lfVector *X, MFace mface) +{ + float temp = CalcNormFloat4(X[mface.v1],X[mface.v2],X[mface.v3],X[mface.v4],to); + mul_fvector_S(to, to, temp); +} + +void calculateWeightedVertexNormal(ClothModifierData *clmd, MFace *mfaces, float to[3], int index, lfVector *X) +{ + float temp[3]; + int i; + Cloth *cloth = clmd->clothObject; + + for(i = 0; i < cloth->numfaces; i++) + { + // check if this triangle contains the selected vertex + if(mfaces[i].v1 == index || mfaces[i].v2 == index || mfaces[i].v3 == index || mfaces[i].v4 == index) + { + calculatQuadNormal(temp, X, mfaces[i]); + VECADD(to, to, temp); + } + } +} +float calculateVertexWindForce(int index, float wind[3], float vertexnormal[3]) +{ + return fabs(INPR(wind, vertexnormal) * 0.5f); +} + +DO_INLINE void calc_triangle_force(ClothModifierData *clmd, MFace mface, lfVector *F, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors) +{ + +} + +void calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time) +{ + /* Collect forces and derivatives: F,dFdX,dFdV */ + Cloth *cloth = clmd->clothObject; + unsigned int i = 0; + float spring_air = clmd->sim_parms.Cvi * 0.01f; /* viscosity of air scaled in percent */ + float gravity[3]; + float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; + ClothVertex *verts = cloth->verts; + ClothSpring *springs = cloth->springs; + MFace *mfaces = cloth->mfaces; + float wind_normalized[3]; + unsigned int numverts = cloth->numverts; + float auxvect[3], velgoal[3], tvect[3]; + float kd, ks; + + + VECCOPY(gravity, clmd->sim_parms.gravity); + mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */ + + /* set dFdX jacobi matrix to zero */ + init_bfmatrix(dFdX, ZERO); + /* set dFdX jacobi matrix diagonal entries to -spring_air */ + initdiag_bfmatrix(dFdV, tm2); + + init_lfvector(lF, gravity, numverts); + + submul_lfvectorS(lF, lV, spring_air, numverts); + + /* do goal stuff */ + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + { + for(i = 0; i < numverts; i++) + { + if(verts [i].goal < SOFTGOALSNAP) + { + // current_position = xold + t * (newposition - xold) + VECSUB(tvect, verts[i].xconst, verts[i].xold); + mul_fvector_S(tvect, tvect, time); + VECADD(tvect, tvect, verts[i].xold); + + VecSubf(auxvect, tvect, lX[i]); + ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; + VECADDS(lF[i], lF[i], auxvect, -ks); + + /* calulate damping forces generated by goals*/ + VECSUB(velgoal,verts[i].xold, verts[i].xconst); + kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB + VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); + + } + } + } + + /* handle external forces like wind */ + if(effectors) + { + float wind[3] = {0,1.0f,0}; + float force[3]= {0.0f, 0.0f, 0.0f}; + + for(i = 0; i < cloth->numverts; i++) + { + float vertexnormal[3]={0,0,0}; + + pdDoEffectors(effectors, lX[i], force, wind, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED); + + VECCOPY(wind_normalized, wind); + Normalize(wind_normalized); + + calculateWeightedVertexNormal(clmd, mfaces, vertexnormal, i, lX); + VECADDS(lF[i], lF[i], wind_normalized, -calculateVertexWindForce(i, wind, vertexnormal)); + } + } + + /* calculate and apply spring forces */ + for(i = 0; i < cloth->numsprings; i++) + { + // only handle active springs + if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + { + calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); + } + } + +} + +void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV) +{ + unsigned int numverts = dFdV[0].vcount; + + lfVector *dFdXmV = create_lfvector(numverts); + + initdiag_bfmatrix(A, I); + zero_lfvector(dV, numverts); + + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + + mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); + + add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); + cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ + // cg_filtered_pre(dV, A, B, z, olddV, dt); + cp_lfvector(olddV, dV, numverts); + + // advance velocities + add_lfvector_lfvector(Vnew, lV, dV, numverts); + + del_lfvector(dFdXmV); +} + +int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors, + CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision) +{ + unsigned int i=0, j; + float step=0.0f, tf=1.0f; + Cloth *cloth = clmd->clothObject; + ClothVertex *verts = cloth->verts; + unsigned int numverts = cloth->numverts; + float dt = 1.0f / clmd->sim_parms.stepsPerFrame; + Implicit_Data *id = cloth->implicit; + int result = 0; + + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) /* do goal stuff */ + { + for(i = 0; i < numverts; i++) + { + // update velocities with constrained velocities from pinned verts + if(verts [i].goal >= SOFTGOALSNAP) + { + VECSUB(id->V[i], verts[i].xconst, verts[i].xold); + } + } + } + + while(step < tf) + { + effectors= pdInitEffectors(ob,NULL); + + // calculate + calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV); + add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); + + // collisions + itstart(); + // update verts to current positions + for(i = 0; i < numverts; i++) + { + VECCOPY(verts[i].tx, id->Xnew[i]); + + VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); + } + + // call collision function + // result = cloth_bvh_objcollision(clmd, step + dt, bvh_collision_response, dt); + + // copy corrected positions back to simulation + for(i = 0; i < numverts; i++) + { + // TODO: calculate v_n+1 from v_n+1/2 + if(result) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + + VECCOPY(verts[i].txold, verts[i].tx); + + VECCOPY(id->Xnew[i], verts[i].tx); + + VECCOPY(id->Vnew[i], verts[i].tv); + VecMulf(id->Vnew[i], 1.0f / dt); + } + else + { + VECCOPY(verts[i].txold, id->Xnew[i]); + } + } + + // X = Xnew; + cp_lfvector(id->X, id->Xnew, numverts); + + // if there were collisions, advance the velocity from v_n+1/2 to v_n+1 + if(result) + { + // V = Vnew; + cp_lfvector(id->V, id->Vnew, numverts); + + // calculate + calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV); + } + + itend(); + // printf("collision time: %f\n", (float)itval()); + + // V = Vnew; + cp_lfvector(id->V, id->Vnew, numverts); + + step += dt; + + if(effectors) pdEndEffectors(effectors); + } + + for(i = 0; i < numverts; i++) + { + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + { + if(verts [i].goal < SOFTGOALSNAP) + { + VECCOPY(verts[i].txold, id->X[i]); + VECCOPY(verts[i].x, id->X[i]); + VECCOPY(verts[i].v, id->V[i]); + } + else + { + VECCOPY(verts[i].txold, verts[i].xconst); + VECCOPY(verts[i].x, verts[i].xconst); + VECCOPY(verts[i].v, id->V[i]); + } + } + else + { + VECCOPY(verts[i].txold, id->X[i]); + VECCOPY(verts[i].x, id->X[i]); + VECCOPY(verts[i].v, id->V[i]); + } + } + return 1; +} + +void implicit_set_positions (ClothModifierData *clmd) +{ + Cloth *cloth = clmd->clothObject; + ClothVertex *verts = cloth->verts; + unsigned int numverts = cloth->numverts, i; + Implicit_Data *id = cloth->implicit; + for(i = 0; i < numverts; i++) + { + VECCOPY(id->X[i], verts[i].x); + VECCOPY(id->V[i], verts[i].v); + } +} diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c new file mode 100644 index 00000000000..cdcb16c67f6 --- /dev/null +++ b/source/blender/blenkernel/intern/kdop.c @@ -0,0 +1,861 @@ +/* collision.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include +#include +#include +#include "MEM_guardedalloc.h" +/* types */ +#include "DNA_curve_types.h" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#include "DNA_cloth_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_lattice_types.h" +#include "DNA_scene_types.h" +#include "DNA_modifier_types.h" +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "BLI_edgehash.h" +#include "BLI_linklist.h" +#include "BKE_curve.h" +#include "BKE_deform.h" +#include "BKE_DerivedMesh.h" +#include "BKE_cdderivedmesh.h" +#include "BKE_displist.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_key.h" +#include "BKE_mesh.h" +#include "BKE_object.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" +#include "BKE_utildefines.h" +#include "BKE_DerivedMesh.h" +#include "BIF_editdeform.h" +#include "BIF_editkey.h" +#include "DNA_screen_types.h" +#include "BSE_headerbuttons.h" +#include "BIF_screen.h" +#include "BIF_space.h" +#include "mydevice.h" + + +//////////////////////////////////////////////////////////////////////// +// Additional fastened appending function +// It uses the link to the last inserted node as start value +// for searching the end of the list +// NEW: in compare to the original function, this one returns +// the reference to the last inserted node +//////////////////////////////////////////////////////////////////////// +LinkNode *BLI_linklist_append_fast(LinkNode **listp, void *ptr) { + LinkNode *nlink= MEM_mallocN(sizeof(*nlink), "nlink"); + LinkNode *node = *listp; + + nlink->link = ptr; + nlink->next = NULL; + + if(node == NULL){ + *listp = nlink; + } else { + while(node->next != NULL){ + node = node->next; + } + node->next = nlink; + } + return nlink; +} + + + +//////////////////////////////////////////////////////////////////////// +// Bounding Volume Hierarchy Definition +// +// Notes: From OBB until 26-DOP --> all bounding volumes possible, just choose type below +// Notes: You have to choose the type at compile time ITM +// Notes: You can choose the tree type --> binary, quad, octree, choose below +//////////////////////////////////////////////////////////////////////// + +static float KDOP_AXES[13][3] = +{ {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 1}, {1, -1, 1}, {1, 1, -1}, +{1, -1, -1}, {1, 1, 0}, {1, 0, 1}, {0, 1, 1}, {1, -1, 0}, {1, 0, -1}, +{0, 1, -1} +}; + +///////////// choose bounding volume here! ///////////// + +// #define KDOP_26 + +// #define KDOP_14 + +// AABB: +// #define KDOP_8 + +// OBB: +#define KDOP_14 + + + +#ifdef KDOP_26 +#define KDOP_END 13 +#define KDOP_START 0 +#endif + +// I didn't test this one! +#ifdef KDOP_18 +#define KDOP_END 7 +#define KDOP_START 13 +#endif + +#ifdef KDOP_14 +#define KDOP_END 7 +#define KDOP_START 0 +#endif + +// this is basicly some AABB +#ifdef KDOP_8 +#define KDOP_END 4 +#define KDOP_START 0 +#endif + +// this is basicly some OBB +#ifdef KDOP_6 +#define KDOP_END 3 +#define KDOP_START 0 +#endif + +////////////////////////////////////////////////////////////////////////////////////////////////////// +// Introsort +// with permission deriven from the following Java code: +// http://ralphunden.net/content/tutorials/a-guide-to-introsort/ +// and he derived it from the SUN STL +////////////////////////////////////////////////////////////////////////////////////////////////////// +static int size_threshold = 16; +/* +* Common methods for all algorithms +*/ +DO_INLINE void exchange(Tree **a, int i, int j) +{ + Tree *t=a[i]; + a[i]=a[j]; + a[j]=t; +} +DO_INLINE int floor_lg(int a) +{ + return (int)(floor(log(a)/log(2))); +} + +/* +* Insertion sort algorithm +*/ +static void insertionsort(Tree **a, int lo, int hi, int axis) +{ + int i,j; + Tree *t; + for (i=lo; i < hi; i++) + { + j=i; + t = a[i]; + while((j!=lo) && (t->bv[axis] < (a[j-1])->bv[axis])) + { + a[j] = a[j-1]; + j--; + } + a[j] = t; + } +} + +static int partition(Tree **a, int lo, int hi, Tree * x, int axis) +{ + int i=lo, j=hi; + while (1) + { + while ((a[i])->bv[axis] < x->bv[axis]) i++; + j=j-1; + while (x->bv[axis] < (a[j])->bv[axis]) j=j-1; + if(!(i < j)) + return i; + exchange(a, i,j); + i++; + } +} + +/* +* Heapsort algorithm +*/ +static void downheap(Tree **a, int i, int n, int lo, int axis) +{ + Tree * d = a[lo+i-1]; + int child; + while (i<=n/2) + { + child = 2*i; + if ((child < n) && ((a[lo+child-1])->bv[axis] < (a[lo+child])->bv[axis])) + { + child++; + } + if (!(d->bv[axis] < (a[lo+child-1])->bv[axis])) break; + a[lo+i-1] = a[lo+child-1]; + i = child; + } + a[lo+i-1] = d; +} + +static void heapsort(Tree **a, int lo, int hi, int axis) +{ + int n = hi-lo, i; + for (i=n/2; i>=1; i=i-1) + { + downheap(a, i,n,lo, axis); + } + for (i=n; i>1; i=i-1) + { + exchange(a, lo,lo+i-1); + downheap(a, 1,i-1,lo, axis); + } +} + +static Tree *medianof3(Tree **a, int lo, int mid, int hi, int axis) // returns Sortable +{ + if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) + { + if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) + return a[mid]; + else + { + if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) + return a[hi]; + else + return a[lo]; + } + } + else + { + if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) + { + if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) + return a[lo]; + else + return a[hi]; + } + else + return a[mid]; + } +} +/* +* Quicksort algorithm modified for Introsort +*/ +static void introsort_loop (Tree **a, int lo, int hi, int depth_limit, int axis) +{ + int p; + + while (hi-lo > size_threshold) + { + if (depth_limit == 0) + { + heapsort(a, lo, hi, axis); + return; + } + depth_limit=depth_limit-1; + p=partition(a, lo, hi, medianof3(a, lo, lo+((hi-lo)/2)+1, hi-1, axis), axis); + introsort_loop(a, p, hi, depth_limit, axis); + hi=p; + } +} + +DO_INLINE void sort(Tree **a0, int begin, int end, int axis) +{ + if (begin < end) + { + Tree **a=a0; + introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); + insertionsort(a, begin, end, axis); + } +} +DO_INLINE void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) +{ + sort(face_list, start, end, axis); +} +//////////////////////////////////////////////////////////////////////////////////////////////// +void bvh_free(BVH * bvh) +{ + LinkNode *search = NULL; + Tree *tree = NULL; + + if (bvh) + { + + search = bvh->tree; + + while(search) + { + LinkNode *next= search->next; + tree = search->link; + + MEM_freeN(tree); + + search = next; + } + + BLI_linklist_free(bvh->tree,NULL); + bvh->tree = NULL; + + MEM_freeN(bvh); + bvh = NULL; + } +} + +// only supports x,y,z axis in the moment +// but we should use a plain and simple function here for speed sake +DO_INLINE int bvh_largest_axis(float *bv) +{ + float middle_point[3]; + + middle_point[0] = (bv[1]) - (bv[0]); // x axis + middle_point[1] = (bv[3]) - (bv[2]); // y axis + middle_point[2] = (bv[5]) - (bv[4]); // z axis + if (middle_point[0] > middle_point[1]) + { + if (middle_point[0] > middle_point[2]) + return 1; // max x axis + else + return 5; // max z axis + } + else + { + if (middle_point[1] > middle_point[2]) + return 3; // max y axis + else + return 5; // max z axis + } +} + +// depends on the fact that the BVH's for each face is already build +DO_INLINE void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv) +{ + float newmin,newmax; + int i, j; + for (j = 0; j < numfaces; j++) + { + // for all Axes. + for (i = KDOP_START; i < KDOP_END; i++) + { + newmin = (tri [j])->bv[(2 * i)]; + if ((newmin < bv[(2 * i)]) || (j == 0)) + { + bv[(2 * i)] = newmin; + } + + newmax = (tri [j])->bv[(2 * i) + 1]; + if ((newmax > bv[(2 * i) + 1]) || (j == 0)) + { + bv[(2 * i) + 1] = newmax; + } + } + } +} + +DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) +{ + ClothVertex *tempMVert = bvh->verts; + MFace *tempMFace = bvh->mfaces; + float *tempBV = bv; + float newminmax; + int i, j, k; + for (j = 0; j < numfaces; j++) + { + tempMFace = bvh->mfaces + (tri [j])->tri_index; + // 3 or 4 vertices per face. + for (k = 0; k < 4; k++) + { + int temp = 0; + // If this is a triangle. + if (k == 3 && !tempMFace->v4) + continue; + // TODO: other name for "temp" this gets all vertices of a face + if (k == 0) + temp = tempMFace->v1; + else if (k == 1) + temp = tempMFace->v2; + else if (k == 2) + temp = tempMFace->v3; + else if (k == 3) + temp = tempMFace->v4; + // for all Axes. + for (i = KDOP_START; i < KDOP_END; i++) + { + newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); + if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) + tempBV[(2 * i)] = newminmax; + if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) + tempBV[(2 * i) + 1] = newminmax; + } + } + } +} +/* +DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) +{ +ClothVertex *tempMVert = bvh->verts; +MFace *tempMFace = bvh->mfaces; +float *tempBV = bv; +float newminmax; +int i, j, k; +for (j = 0; j < numfaces; j++) +{ +tempMFace = bvh->mfaces + (tri [j])->tri_index; +// 3 or 4 vertices per face. +for (k = 0; k < 4; k++) +{ +int temp = 0; +// If this is a triangle. +if (k == 3 && !tempMFace->v4) +continue; +// TODO: other name for "temp" this gets all vertices of a face +if (k == 0) +temp = tempMFace->v1; +else if (k == 1) +temp = tempMFace->v2; +else if (k == 2) +temp = tempMFace->v3; +else if (k == 3) +temp = tempMFace->v4; +// for all Axes. +for (i = KDOP_START; i < KDOP_END; i++) +{ +newminmax = INPR(tempMVert[temp].tx, KDOP_AXES[i]); +if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) +tempBV[(2 * i)] = newminmax; +// the same like some "else if" but with that condition I +// don't need to insert the first entry manually +if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) +tempBV[(2 * i) + 1] = newminmax; + +newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); +if (newminmax < tempBV[(2 * i)]) +tempBV[(2 * i)] = newminmax; +if (newminmax > tempBV[(2 * i) + 1]) +tempBV[(2 * i) + 1] = newminmax; +} +} +} +} +*/ +static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) +{ + int i = 0; + Tree *newtree = NULL; + int laxis = 0, max_nodes=4; + unsigned int tstart, tend; + LinkNode *nlink1 = nlink; + LinkNode *tnlink; + tree->traversed = 0; + // Determine which axis to split along + laxis = bvh_largest_axis(tree->bv); + + // Sort along longest axis + if(laxis!=lastaxis) + bvh_sort_along_axis(face_list, start, end, laxis); + + max_nodes = MIN2((end-start + 1 ),4); + + for (i = 0; i < max_nodes; i++) + { + tree->count_nodes++; + + if(end-start > 4) + { + int quarter = ((float)((float)(end - start + 1) / 4.0f)); + tstart = start + i * quarter; + tend = tstart + quarter - 1; + + // be sure that we get all faces + if(i==3) + { + tend = end; + } + } + else + { + tend = tstart = start + i; + } + + // Build tree until 4 node left. + if ((tend-tstart + 1 ) > 1) + { + newtree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + tnlink = BLI_linklist_append_fast(&nlink1->next, newtree); + + newtree->nodes[0] = newtree->nodes[1] = newtree->nodes[2] = newtree->nodes[3] = NULL; + newtree->count_nodes = 0; + newtree->parent = tree; + newtree->isleaf = 0; + + tree->nodes[i] = newtree; + + nlink1 = tnlink; + + bvh_calc_DOP_hull_from_faces(bvh, &face_list[tstart], tend-tstart + 1, tree->nodes[i]->bv); + + bvh_div_env_node(bvh, tree->nodes[i], face_list, tstart, tend, laxis, nlink1); + } + else // ok, we have 1 left for this node + { + Tree *tnode = face_list[tstart]; + tree->nodes[i] = tnode; + tree->nodes[i]->parent = tree; + } + } + return; +} + +BVH *bvh_build (ClothModifierData *clmd, float epsilon) +{ + unsigned int i = 0, j = 0, k = 0; + Tree **face_list=NULL; + BVH *bvh=NULL; + Cloth *cloth = NULL; + Tree *tree=NULL; + LinkNode *nlink = NULL; + EdgeHash *edgehash = NULL; + ClothSpring *springs = NULL; + unsigned int numsprings = 0; + MFace *mface = NULL; + + if(!clmd) + return NULL; + + cloth = clmd->clothObject; + + if(!cloth) + return NULL; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + springs = cloth->springs; + numsprings = cloth->numsprings; + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = cloth->numfaces; + mface = bvh->mfaces = cloth->mfaces; + + bvh->numverts = cloth->numverts; + bvh->verts = cloth->verts; + tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + // TODO: check succesfull alloc + BLI_linklist_prepend(&bvh->tree, tree); + + nlink = bvh->tree; + + if (tree == NULL) + { + printf("bvh_build: Out of memory for nodes.\n"); + bvh_free(bvh); + return NULL; + } + bvh->root = bvh->tree->link; + bvh->root->isleaf = 0; + bvh->root->parent = NULL; + bvh->root->nodes[0] = bvh->root->nodes[1] = bvh->root->nodes[1] = bvh->root->nodes[3] = NULL; + + if(bvh->numfaces<=1) + { + bvh->root->tri_index = 0; // Why that? --> only one face there + bvh->root->isleaf = 1; + bvh->root->traversed = 0; + bvh->root->count_nodes = 0; + bvh->leaf_root = bvh->root; + bvh->leaf_tree = bvh->root; + bvh->root->nextLeaf = NULL; + bvh->root->prevLeaf = NULL; + } + else + { + // create spring tearing hash + /* + edgehash = BLI_edgehash_new(); + if(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + for(i = 0; i < numsprings; i++) + { + if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) + &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) + { + BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); + BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); + } + } + */ + + // create face boxes + face_list = MEM_callocN (bvh->numfaces * sizeof (Tree *), "Tree"); + if (face_list == NULL) + { + printf("bvh_build: Out of memory for face_list.\n"); + bvh_free(bvh); + return NULL; + } + + // create face boxes + for(i = 0, k = 0; i < bvh->numfaces; i++) + { + LinkNode *tnlink; + /* + if((!BLI_edgehash_haskey(edgehash, mface[i].v1, mface[i].v2)) + &&(!BLI_edgehash_haskey(edgehash, mface[i].v2, mface[i].v3)) + &&(!BLI_edgehash_haskey(edgehash, mface[i].v3, mface[i].v4)) + &&(!BLI_edgehash_haskey(edgehash, mface[i].v4, mface[i].v1))) + */ + { + tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + // TODO: check succesfull alloc + + tnlink = BLI_linklist_append_fast(&nlink->next, tree); + + face_list[i] = tree; + tree->tri_index = i; + tree->isleaf = 1; + tree->nextLeaf = NULL; + tree->prevLeaf = bvh->leaf_tree; + tree->parent = NULL; + tree->count_nodes = 0; + + if(i==0) + { + bvh->leaf_tree = bvh->leaf_root = tree; + } + else + { + bvh->leaf_tree->nextLeaf = tree; + bvh->leaf_tree = bvh->leaf_tree->nextLeaf; + } + + tree->nodes[0] = tree->nodes[1] = tree->nodes[2] = tree->nodes[3] = NULL; + + bvh_calc_DOP_hull_static(bvh, &face_list[i], 1, tree->bv); + + // inflate the bv with some epsilon + for (j = KDOP_START; j < KDOP_END; j++) + { + tree->bv[(2 * j)] -= bvh->epsilon; // minimum + tree->bv[(2 * j) + 1] += bvh->epsilon; // maximum + } + + nlink = tnlink; + } + } + + // build root bvh + bvh_calc_DOP_hull_from_faces(bvh, face_list, bvh->numfaces, bvh->root->bv); + + // This is the traversal function. + bvh_div_env_node(bvh, bvh->root, face_list, 0, bvh->numfaces-1, 0, nlink); + if (face_list) + MEM_freeN(face_list); + + // BLI_edgehash_free(edgehash, NULL); + } + + + return bvh; +} + +// bvh_overlap - is it possbile for 2 bv's to collide ? +DO_INLINE int bvh_overlap(float *bv1, float *bv2) +{ + int i = 0; + for (i = KDOP_START; i < KDOP_END; i++) + { + // Minimum test. + if (bv1[(2 * i)] > bv2[(2 * i) + 1]) + { + return 0; + } + // Maxiumum test. + if (bv2[(2 * i)] > bv1[(2 * i) + 1]) + { + return 0; + } + } + + return 1; +} +/** + * bvh_traverse - traverse two bvh trees looking for potential collisions. + * + * max collisions are n*n collisions --> every triangle collide with + * every other triangle that doesn't require any realloc, but uses + * much memory + */ +int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response) +{ + int i = 0, ret=0; + + /* + // Shouldn't be possible + if(!tree1 || !tree2) + { + printf("Error: no tree there\n"); + return 0; +} + */ + + if (bvh_overlap(tree1->bv, tree2->bv)) + { + // Check if this node in the first tree is a leaf + if (tree1->isleaf) + { + // Check if this node in the second tree a leaf + if (tree2->isleaf) + { + // Provide the collision response. + + if(collision_response) + collision_response (clmd, coll_clmd, tree1, tree2); + return 1; + } + else + { + // Process the quad tree. + for (i = 0; i < 4; i++) + { + // Only traverse nodes that exist. + if (tree2->nodes[i] && bvh_traverse (clmd, coll_clmd, tree1, tree2->nodes[i], step, collision_response)) + ret = 1; + } + } + } + else + { + // Process the quad tree. + for (i = 0; i < 4; i++) + { + // Only traverse nodes that exist. + if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) + ret = 1; + } + } + } + return ret; +} + +// bottom up update of bvh tree: +// join the 4 children here +void bvh_join(Tree * tree) +{ + int i = 0, j = 0; + if (!tree) + return; + + for (i = 0; i < 4; i++) + { + if (tree->nodes[i]) + { + for (j = KDOP_START; j < KDOP_END; j++) + { + // update minimum + if ((tree->nodes[i]->bv[(2 * j)] < tree->bv[(2 * j)]) || (i == 0)) + { + tree->bv[(2 * j)] = tree->nodes[i]->bv[(2 * j)]; + } + // update maximum + if ((tree->nodes[i]->bv[(2 * j) + 1] > tree->bv[(2 * j) + 1])|| (i == 0)) + { + tree->bv[(2 * j) + 1] = tree->nodes[i]->bv[(2 * j) + 1]; + } + } + } + else + break; + } +} + +// update static bvh +void bvh_update_static(ClothModifierData * clmd, BVH * bvh) +{ + TreeNode *leaf, *parent; + int traversecheck = 1; // if this is zero we don't go further + unsigned int j = 0; + + for (leaf = bvh->leaf_root; leaf; leaf = leaf->nextLeaf) + { + traversecheck = 1; + if ((leaf->parent) && (leaf->parent->traversed == leaf->parent->count_nodes)) + { + leaf->parent->traversed = 0; + } + bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv); + + // inflate the bv with some epsilon + for (j = KDOP_START; j < KDOP_END; j++) + { + leaf->bv[(2 * j)] -= bvh->epsilon; // minimum + leaf->bv[(2 * j) + 1] += bvh->epsilon; // maximum + } + + for (parent = leaf->parent; parent; parent = parent->parent) + { + if (traversecheck) + { + parent->traversed++; // we tried to go up in hierarchy + if (parent->traversed < parent->count_nodes) + { + traversecheck = 0; + + if (parent->parent) + { + if (parent->parent->traversed == parent->parent->count_nodes) + { + parent->parent->traversed = 0; + } + } + break; // we do not need to check further + } + else + { + bvh_join(parent); + } + } + + } + } +} diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index bb5d4039336..0d7668e0ccc 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -51,6 +51,7 @@ #include "MEM_guardedalloc.h" #include "DNA_armature_types.h" +#include "DNA_cloth_types.h" #include "DNA_effect_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" @@ -84,6 +85,7 @@ #include "BKE_object.h" #include "BKE_mesh.h" #include "BKE_softbody.h" +#include "BKE_cloth.h" #include "BKE_material.h" #include "depsgraph_private.h" @@ -4855,6 +4857,94 @@ static void softbodyModifier_deformVerts( sbObjectStep(ob, (float)G.scene->r.cfra, vertexCos, numVerts); } + +/* Cloth */ + +static void clothModifier_initData(ModifierData *md) +{ + ClothModifierData *clmd = (ClothModifierData*) md; + cloth_init (clmd); +} + +static void clothModifier_deformVerts( + ModifierData *md, Object *ob, DerivedMesh *derivedData, + float (*vertexCos)[3], int numVerts) +{ + DerivedMesh *dm = NULL; + + // if possible use/create DerivedMesh + if(derivedData) dm = CDDM_copy(derivedData); + else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + + if(dm) + { + CDDM_apply_vert_coords(dm, vertexCos); + CDDM_calc_normals(dm); + } + + clothModifier_do((ClothModifierData *)md, ob, dm, vertexCos, numVerts); + + if(dm) + dm->release(dm); +} + +static void clothModifier_updateDepgraph( + ModifierData *md, DagForest *forest, Object *ob, + DagNode *obNode) +{ + ClothModifierData *clmd = (ClothModifierData*) md; + + Base *base; + + if(clmd) + { + for(base = G.scene->base.first; base; base= base->next) + { + Object *ob1= base->object; + if(ob1 != ob) + { + ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); + if(coll_clmd) + { + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + DagNode *curNode = dag_get_node(forest, ob1); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + } + } + } + } + } + +} + +CustomDataMask clothModifier_requiredDataMask(ModifierData *md) +{ + ClothModifierData *clmd = (HookModifierData *)md; + CustomDataMask dataMask = 0; + + /* ask for vertexgroups if we need them */ + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + if (clmd->sim_parms.vgroup_mass > 0) + dataMask |= (1 << CD_MDEFORMVERT); + + return dataMask; +} + + +static int clothModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} + +static void clothModifier_freeData(ModifierData *md) +{ + ClothModifierData *clmd = (ClothModifierData*) md; + + if (clmd) + cloth_free_modifier (clmd); +} + /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) @@ -5139,6 +5229,21 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->flags = eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_RequiresOriginalData; mti->deformVerts = softbodyModifier_deformVerts; + + mti = INIT_TYPE(Cloth); + mti->type = eModifierTypeType_OnlyDeform; + mti->initData = clothModifier_initData; + mti->flags = eModifierTypeFlag_AcceptsCVs; + // | eModifierTypeFlag_RequiresOriginalData; + // | eModifierTypeFlag_SupportsMapping + // | eModifierTypeFlag_SupportsEditmode + // | eModifierTypeFlag_EnableInEditmode; + mti->dependsOnTime = clothModifier_dependsOnTime; + mti->freeData = clothModifier_freeData; + mti->requiredDataMask = clothModifier_requiredDataMask; + // mti->copyData = clothModifier_copyData; + mti->deformVerts = clothModifier_deformVerts; + mti->updateDepgraph = clothModifier_updateDepgraph; mti = INIT_TYPE(Boolean); mti->type = eModifierTypeType_Nonconstructive; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 624bfedf6cd..19f74096e54 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -60,6 +60,7 @@ #include "DNA_actuator_types.h" #include "DNA_brush_types.h" #include "DNA_camera_types.h" +#include "DNA_cloth_types.h" #include "DNA_color_types.h" #include "DNA_controller_types.h" #include "DNA_constraint_types.h" @@ -112,6 +113,7 @@ #include "BKE_action.h" #include "BKE_armature.h" +#include "BKE_cloth.h" #include "BKE_colortools.h" #include "BKE_constraint.h" #include "BKE_curve.h" @@ -2871,7 +2873,18 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) SubsurfModifierData *smd = (SubsurfModifierData*) md; smd->emCache = smd->mCache = 0; - } else if (md->type==eModifierType_Hook) { + } + else if (md->type==eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData*) md; + + clmd->clothObject = NULL; + /* + if (clmd->sim_parms.flags & CSIMSETT_FLAG_BAKED) { + clmd->baked_data = newdataadr (fd, clmd->baked_data); + printf ("direct_link_modifiers: read cloth baked_data.\n"); + }*/ + } + else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; hmd->indexar= newdataadr(fd, hmd->indexar); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 4f09f51bc87..4203824ae65 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -107,6 +107,7 @@ Important to know is that 'streaming' has been added to files, for Blender Publi #include "DNA_actuator_types.h" #include "DNA_brush_types.h" #include "DNA_camera_types.h" +#include "DNA_cloth_types.h" #include "DNA_color_types.h" #include "DNA_constraint_types.h" #include "DNA_controller_types.h" @@ -154,6 +155,7 @@ Important to know is that 'streaming' has been added to files, for Blender Publi #include "BKE_action.h" #include "BKE_bad_level_calls.h" // build_seqar (from WHILE_SEQ) free_oops error #include "BKE_blender.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_constraint.h" @@ -826,6 +828,20 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) HookModifierData *hmd = (HookModifierData*) md; writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar); + } + else if (md->type==eModifierType_Cloth) { + int n; + ClothModifierData *clmd = (ClothModifierData *) md; + /* + if ((clmd->sim_parms.flags & CSIMSETT_FLAG_BAKED) && clmd->baked_data) { + // Compute the number of vertices we're saving. + + n = (clmd->sim_parms.bake_end_frame - clmd->sim_parms.bake_start_frame + 1) * + clmd->sim_parms.bake_num_verts; + writedata (wd, DATA, n * sizeof (clmd->baked_data [0]), clmd->baked_data); + printf ("write_modifiers: wrote %d elements of size %d for cloth baked data.\n", + n, sizeof (clmd->baked_data [0])); + }*/ } } } diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index 4f09ad716d7..cb17f81b87d 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -283,6 +283,13 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_GROUP_RELINK 1460 #define B_OBJECT_IPOFLAG 1461 + +/* Cloth sim button defines */ +#define B_CLOTH_CLEARCACHEALL 1470 +#define B_CLOTH_CLEARCACHEFRAME 1471 +#define B_CLOTH_CHANGEPREROLL 1472 +#define B_CLOTH_DEL_VG 1473 + /* *********************** */ #define B_WORLDBUTS 1600 diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h new file mode 100644 index 00000000000..bed04c2fa71 --- /dev/null +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -0,0 +1,150 @@ +/** +* $Id: DNA_cloth_types.h,v 1.1 2007/08/01 02:28:34 daniel Exp $ +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) 2006 by NaN Holding BV. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): Daniel (Genscher), Todd Koeckeritz (zaz) +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ +#ifndef DNA_CLOTH_TYPES_H +#define DNA_CLOTH_TYPES_H + +#include "DNA_listBase.h" + + +/** +* Pin and unpin frames are the frames on which the vertices stop moving. +* They will assume the position they had prior to pinFrame until unpinFrame +* is reached. +*/ +typedef struct ClothVertex { + int flags; /* General flags per vertex. */ + float v [3]; /* The velocity of the point. */ + float xconst [3]; /* constrained position */ + float x [3]; /* The current position of this vertice. */ + float xold [3]; /* The previous position of this vertice. */ + float tx [3]; + float txold [3]; + float tv[3]; + float mass; /* mass / weight of the vertex */ + float goal; /* goal, from SB */ +} ClothVertex; + + +/** +* The definition of a spring. +*/ +typedef struct ClothSpring { + int ij; /* Pij from the paper, one end of the spring. */ + int kl; /* Pkl from the paper, one end of the spring. */ + float restlen; /* The original length of the spring. */ + int matrix_index; /* needed for implicit */ + int type; + int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ +} ClothSpring; + + + +/** +* This struct contains all the global data required to run a simulation. +* At the time of this writing, this structure contains data appropriate +* to run a simulation as described in Deformation Constraints in a +* Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. +* +* I've tried to keep similar, if not exact names for the variables as +* are presented in the paper. Where I've changed the concept slightly, +* as in stepsPerFrame comapred to the time step in the paper, I've used +* variables with different names to minimize confusion. +**/ +typedef struct SimulationSettings { + short vgroup_mass; /* optional vertexgroup name for assigning weight. */ + short pad; + float mingoal; /* see SB */ + int preroll; /* How many frames of simulation to do before we start. */ + float Cdis; /* Mechanical damping of springs. */ + float Cvi; /* Viscous/fluid damping. */ + int stepsPerFrame; /* Number of time steps per frame. */ + float gravity [3]; /* Gravity/external force vector. */ + float ufluid [3]; /* Velocity vector of the fluid. */ + float dt; /* This is the duration of our time step, computed. */ + float mass; /* The mass of the entire cloth. */ + float structural; /* Structural spring stiffness. */ + float shear; /* Shear spring stiffness. */ + float bending; /* Flexion spring stiffness. */ + float sim_time; + int flags; /* flags, see CSIMSETT_FLAGS enum above. */ + short solver_type; /* which solver should be used? */ + short pad2; + float maxgoal; /* see SB */ + float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ + float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ + float sim_time_old; + struct LinkNode *cache; + float defgoal; + int goalfrict; + float goalspring; + int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ +} SimulationSettings; + + +typedef struct CollisionSettings { + float epsilon; /* The radius of a particle in the cloth. */ + float self_friction; /* Fiction/damping with self contact. */ + float friction; /* Friction/damping applied on contact with other object.*/ + short collision_type; /* which collision system is used. */ + short loop_count; /* How many iterations for the collision loop. */ + void *temp; /* e.g. pointer to temp memory for collisions */ +} CollisionSettings; + + +/** +* This structure describes a cloth object against which the +* simulation can run. +* +* The m and n members of this structure represent the assumed +* rectangular ordered grid for which the original paper is written. +* At some point they need to disappear and we need to determine out +* own connectivity of the mesh based on the actual edges in the mesh. +* +**/ +typedef struct Cloth { + struct ClothVertex *verts; /* The vertices that represent this cloth. */ + struct ClothSpring *springs; /* The springs connecting the mesh. */ + unsigned int numverts; /* The number of verts == m * n. */ + unsigned int numsprings; /* The count of springs. */ + unsigned char *facemarks; + char old_solver_type; /* Needed to allow call to free if solver changes. */ + char old_collision_type; /* Needed to allow call to free if collision changes.*/ + short pad7; + unsigned int numfaces; + int pad2; + int pad4; + void *tree; /* collision tree for this cloth object */ + struct MFace *mfaces; + void *implicit; +} Cloth; + +#endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 71e850e4368..4c9fbdcc7b7 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -9,6 +9,8 @@ /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ +#include "DNA_cloth_types.h" + typedef enum ModifierType { eModifierType_None = 0, eModifierType_Subsurf, @@ -28,6 +30,7 @@ typedef enum ModifierType { eModifierType_UVProject, eModifierType_Smooth, eModifierType_Cast, + eModifierType_Cloth, NUM_MODIFIER_TYPES } ModifierType; @@ -335,6 +338,14 @@ typedef struct SoftbodyModifierData { ModifierData modifier; } SoftbodyModifierData; +typedef struct ClothModifierData { + ModifierData modifier; + + Cloth *clothObject; /* The internal data structure for cloth. */ + SimulationSettings sim_parms; /* definition is in DNA_cloth_types.h */ + CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ +} ClothModifierData; + typedef enum { eBooleanModifierOp_Intersect, eBooleanModifierOp_Union, diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 4d437861751..d13b964622d 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -127,6 +127,7 @@ char *includefiles[] = { "DNA_color_types.h", "DNA_brush_types.h", "DNA_customdata_types.h", + "DNA_cloth_types.h", // if you add files here, please add them at the end // of makesdna.c (this file) as well @@ -1144,4 +1145,5 @@ int main(int argc, char ** argv) #include "DNA_color_types.h" #include "DNA_brush_types.h" #include "DNA_customdata_types.h" +#include "DNA_cloth_types.h" /* end of list */ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index a998c568619..de1d8f8c0ac 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -86,6 +86,7 @@ #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_camera_types.h" +#include "DNA_cloth_types.h" #include "DNA_constraint_types.h" #include "DNA_curve_types.h" #include "DNA_effect_types.h" @@ -113,6 +114,7 @@ #include "BKE_anim.h" #include "BKE_armature.h" +#include "BKE_cloth.h" #include "BKE_constraint.h" #include "BKE_curve.h" #include "BKE_deform.h" @@ -844,7 +846,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s /* Draw target parameters */ uiBlockBeginAlign(block); uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_CONSTRAINT_CHANGETARGET, "OB:", *xco+120, *yco-24, 135, 18, &data->tar, "Target Object"); - + if (is_armature_target) { but= uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "BO:", *xco+120, *yco-42,135,18, &data->subtarget, 0, 24, 0, 0, "Subtarget Bone"); uiButSetCompleteFunc(but, autocomplete_bone, (void *)data->tar); @@ -900,7 +902,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s } uiBlockEndAlign(block); - + /* Draw XYZ toggles */ uiBlockBeginAlign(block); but=uiDefButBitI(block, TOG, SIZELIKE_X, B_CONSTRAINT_TEST, "X", *xco+((width/2)-48), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy X component"); @@ -920,7 +922,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-10, *yco-height, width+40,height-1, NULL, 5.0, 0.0, 12, rb_col, ""); uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Target:", *xco+65, *yco-24, 50, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); - + /* Draw target parameters */ uiDefButBitS(block, TOG, CONSTRAINT_IK_ROT, B_CONSTRAINT_TEST, "Rot", *xco, *yco-24,60,19, &data->flag, 0, 0, 0, 0, "Chain follows rotation of target"); @@ -2144,8 +2146,61 @@ void do_object_panels(unsigned short event) case B_OBJECT_IPOFLAG: if(ob->ipo) ob->ipo->showkey= (ob->ipoflag & OB_DRAWKEY)?1:0; allqueue(REDRAWVIEW3D, 0); + case B_CLOTH_CLEARCACHEALL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_PART; + cloth_cache_free(clmd, 1); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + break; + case B_CLOTH_CLEARCACHEFRAME: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_PART; + cloth_cache_free(clmd, G.scene->r.cfra); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + break; + case B_CLOTH_CHANGEPREROLL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + if(clmd->sim_parms.cache) + { + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + } break; - + case B_CLOTH_DEL_VG: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + clmd->sim_parms.vgroup_mass = 0; + } + + allqueue(REDRAWBUTSOBJECT, 0); + } + break; default: if(event>=B_SELEFFECT && eventmodifiers, md); + } + else { + BLI_remlink(&ob->modifiers, md); + modifier_free(md); + } + + allqueue(REDRAWBUTSEDIT, 0); +} + +static void object_panel_cloth(Object *ob) +{ + uiBlock *block; + static int val, val2; + uiBut *but; + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth", UI_EMBOSS, UI_HELV, curarea->win); + if(uiNewPanel(curarea, block, "Cloth", "Physics", 640, 0, 318, 204)==0) return; + + if(ob->id.lib) uiSetButLock(1, "Can't edit library data"); + val = ((clmd)?(1):(0)); + + but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Cloth Object", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to become cloth"); + uiButSetFunc(but, object_cloth__enabletoggle, ob, NULL); + uiDefBut(block, LABEL, 0, "",10,10,300,0, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + + if(clmd) + { + but = uiDefButBitI(block, TOG, CSIMSETT_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + // uiButSetFunc(but, object_cloth__enabletoggle, ob, NULL); + + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + { + Cloth *cloth = clmd->clothObject; + int defCount; + char *clvg1, *clvg2; + char clmvg [] = "Mass Vertex Group%t|None%x0|"; + + val2=0; + + // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Enable advanced mode"); + + /* GENERAL STUFF */ + uiClearButLock(); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_DIFF, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 5000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_DIFF, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 1000.0, 1000, 0, "Wrinkle possibility"); + uiDefButI(block, NUM, B_DIFF, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_DIFF, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiBlockEndAlign(block); + + uiClearButLock(); + + uiBlockBeginAlign(block); + uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); + // uiClearButLock(); + + uiDefButF(block, NUM, B_DIFF, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_DIFF, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_DIFF, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiBlockEndAlign(block); + + /* GOAL STUFF */ + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + if (clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + { + if(ob->type==OB_MESH) + { + + defCount = sizeof (clmvg); + clvg1 = get_vertexgroup_menustr (ob); + clvg2 = MEM_callocN (strlen (clvg1) + 1 + defCount, "clothVgMS"); + if (! clvg2) { + printf ("draw_modifier: error allocating memory for cloth vertex group menu string.\n"); + return; + } + defCount = BLI_countlist (&ob->defbase); + if (defCount == 0) + { + clmd->sim_parms.vgroup_mass = 0; + } + sprintf (clvg2, "%s%s", clmvg, clvg1); + + uiDefButS(block, MENU, REDRAWVIEW3D, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + MEM_freeN (clvg1); + MEM_freeN (clvg2); + + if(clmd->sim_parms.vgroup_mass) + { + bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms.vgroup_mass-1); + if(defGroup) + uiDefBut(block, BUT, B_DIFF, defGroup->name, 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Name of current vertex group"); + else + uiDefBut(block, BUT, B_DIFF, "(no group)", 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Vertex Group doesn't exist anymore"); + + uiDefIconBut(block, BUT, B_CLOTH_DEL_VG, ICON_X, 290,70,20,20, 0, 0, 0, 0, 0, "Disable use of vertex group"); + + } + else + uiDefButF(block, NUM, REDRAWVIEW3D, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + + } + else + { + uiDefButS(block, TOG, REDRAWVIEW3D, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, REDRAWVIEW3D, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + } + + uiDefButF(block, NUM, B_DIFF, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_DIFF, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, REDRAWVIEW3D, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, REDRAWVIEW3D, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + } + uiBlockEndAlign(block); + + /* + // no tearing supported anymore since modifier stack restrictions + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + + if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + { + uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); + } + + uiBlockEndAlign(block); + */ + } + } +} + + +static void object_panel_cloth_II(Object *ob) +{ + uiBlock *block; + static int val; + uiBut *but; + ClothModifierData *clmd = NULL; + + clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + { + Cloth *cloth = clmd->clothObject; + char str[128]; + + block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_II", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Cache", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + if(clmd->sim_parms.cache) + { + int length = BLI_linklist_length(clmd->sim_parms.cache); + + /* correct spelling if only 1 frame cacheed --> only gimmick */ + if(length-clmd->sim_parms.preroll>1) + sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); + else + sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); + + uiDefBut(block, LABEL, 0, str, 10,160,290,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Clear cache:", 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); + uiBlockBeginAlign (block); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 120,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 120,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); + if(length>1) // B_CLOTH_CHANGEPREROLL + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,100,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + } + else + { + uiDefBut(block, LABEL, 0, "No frames cached.", 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); + } + uiBlockEndAlign(block); + } + } + // uiBlockEndAlign(block); +} + +static void object_panel_cloth_III(Object *ob) +{ + uiBlock *block; + static int val; + uiBut *but; + ClothModifierData *clmd = NULL; + + clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + { + Cloth *cloth = clmd->clothObject; + char str[128]; + + block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + uiBlockBeginAlign(block); + // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + uiDefButF(block, NUM, B_DIFF, "Min Distance:", 10,10,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefBut(block, LABEL, 0, "",160,10,150,20, NULL, 0.0, 0, 0, 0, ""); + uiBlockEndAlign(block); + } + } + // uiBlockEndAlign(block); +} + + static void object_panel_particles_motion(Object *ob) { uiBlock *block; @@ -3503,6 +3783,9 @@ void physics_panels() object_panel_particles_motion(ob); object_softbodies(ob); object_softbodies_II(ob); + object_panel_cloth(ob); + object_panel_cloth_II(ob); + object_panel_cloth_III(ob); object_panel_fluidsim(ob); } } From 9d0420c1acd983cc0ae6ab2f61d63d31956d081c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 16 Sep 2007 16:33:42 +0000 Subject: [PATCH 002/430] Little project: Getting fluidsim multithreaded. Can be actuvated by adding "PARALLEL" to compiler flags in elbeem folder. ----- Code already works for MAX_THREADS=1 so there seems to be some bug in openMP code in paraloopstart.h Help appeciated :) --- intern/elbeem/intern/paraloop.h | 51 ++++++++++++++++++++++++++++ intern/elbeem/intern/paraloopend.h | 14 ++++++++ intern/elbeem/intern/paraloopstart.h | 3 ++ 3 files changed, 68 insertions(+) create mode 100644 intern/elbeem/intern/paraloop.h create mode 100644 intern/elbeem/intern/paraloopend.h create mode 100644 intern/elbeem/intern/paraloopstart.h diff --git a/intern/elbeem/intern/paraloop.h b/intern/elbeem/intern/paraloop.h new file mode 100644 index 00000000000..e8bef648a8d --- /dev/null +++ b/intern/elbeem/intern/paraloop.h @@ -0,0 +1,51 @@ + +#define PERFORM_USQRMAXCHECK \ +_Pragma("omp critical") {\ +USQRMAXCHECK(usqr,ux,uy,uz, mMaxVlen, mMxvx,mMxvy,mMxvz); \ +} \ + + +#define LIST_EMPTY(x) \ +_Pragma("omp critical") {\ +mListEmpty.push_back( x ); } + +#define LIST_FULL(x) \ +_Pragma("omp critical") {\ +mListFull.push_back( x ); } + +#define FSGR_ADDPART(x) \ +_Pragma("omp critical") { \ +mpParticles->addFullParticle( x ); } \ + + +#define MAX_THREADS 2 + +#define GRID_REGION_START() \ +{ /* main_region */ \ + int kstart=getForZMinBnd(), kend=getForZMaxBnd(mMaxRefine); \ + if(gridLoopBound>0){ kstart=getForZMin1(), kend=getForZMax1(mMaxRefine); } \ + int kdir = 1; \ + const int id=omp_get_thread_num(); \ + int jstart = (id*((mLevel[mMaxRefine].lSizey-gridLoopBound) / MAX_THREADS))+gridLoopBound; \ + int jend = (id+1)*((mLevel[mMaxRefine].lSizey-gridLoopBound)/ MAX_THREADS); \ + if(id+1 == MAX_THREADS) \ + { \ + jend = mLevel[mMaxRefine].lSizey-gridLoopBound; \ + } \ + if(jstart<1) jstart = 1; \ + LbmFloat *ccel = NULL, *tcel = NULL; \ + CellFlagType *pFlagSrc=NULL, *pFlagDst=NULL; \ + if(mLevel[mMaxRefine].setCurr==1) { \ + kdir = -1; \ + int temp = kend; \ + kend = kstart-1; \ + kstart = temp-1; \ + temp = id; /* dummy remove warning */ \ +} \ + + + +#define unused_GRID_REGION_END() \ +} /* main_region */ \ + // end unusedGRID_REGION_END + diff --git a/intern/elbeem/intern/paraloopend.h b/intern/elbeem/intern/paraloopend.h new file mode 100644 index 00000000000..6ea636e8d23 --- /dev/null +++ b/intern/elbeem/intern/paraloopend.h @@ -0,0 +1,14 @@ +// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +} /* i */ + int i=0; + ADVANCE_POINTERS(2*gridLoopBound); +} /* j */ + /* COMPRESSGRIDS!=1 */ +#pragma omp barrier + + /* int i=0; */ + /* ADVANCE_POINTERS(mLevel[lev].lSizex*2); */ +} /* all cell loop k,j,i */ + if(doReduce) { } /* dummy remove warning */ +} /* main_region */ + diff --git a/intern/elbeem/intern/paraloopstart.h b/intern/elbeem/intern/paraloopstart.h new file mode 100644 index 00000000000..9f13eb3207b --- /dev/null +++ b/intern/elbeem/intern/paraloopstart.h @@ -0,0 +1,3 @@ + +#pragma omp parallel section num_threads(MAX_THREADS) \ +reduction(+: calcCurrentMass, calcCurrentVolume, calcCellsFilled, calcCellsEmptied, calcNumUsedCells) From 1138bd30145c0d961266a150d86d59f9c38418d1 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 16 Sep 2007 23:19:02 +0000 Subject: [PATCH 003/430] New: Min & MaxFrame of simulation; Fixed: Many reset problems gone --- source/blender/blenkernel/BKE_cloth.h | 1 + source/blender/blenkernel/BKE_modifier.h | 1 + source/blender/blenkernel/intern/cloth.c | 36 ++++++++----- source/blender/blenkernel/intern/implicit.c | 24 +++++++-- source/blender/blenkernel/intern/modifier.c | 11 +++- source/blender/include/butspace.h | 1 + source/blender/makesdna/DNA_cloth_types.h | 6 ++- source/blender/src/buttons_editing.c | 12 ++++- source/blender/src/buttons_object.c | 58 +++++++++++++-------- source/blender/src/editmesh.c | 8 ++- source/blender/src/editobject.c | 4 ++ source/blender/src/transform_conversions.c | 9 ++-- source/blender/src/transform_generics.c | 24 +++++++-- source/blender/src/vpaint.c | 6 +++ 14 files changed, 147 insertions(+), 54 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index e843079f412..0a50feeb9b0 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -107,6 +107,7 @@ typedef enum // needed for buttons_object.c void cloth_cache_free(ClothModifierData *clmd, float time); +void cloth_free_modifier (ClothModifierData *clmd); // needed for cloth.c void implicit_set_positions (ClothModifierData *clmd); diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 297443b883d..365381f5cdd 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -277,6 +277,7 @@ int modifiers_getCageIndex(struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled(struct Object *ob); +struct ModifierData *modifiers_isClothEnabled(struct Object *ob); struct Object *modifiers_isDeformedByArmature(struct Object *ob); struct Object *modifiers_isDeformedByLattice(struct Object *ob); int modifiers_usesArmature(struct Object *ob, struct bArmature *arm); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4b4aa2d0d1d..18e1d4a6cde 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -119,6 +119,8 @@ static CM_SOLVER_DEF solvers [] = { #define DEBUG_CLOTH_VERBOSE 1000 static int DEBUG_CLOTH = 0; + + /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ @@ -128,6 +130,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts); int cloth_build_springs(Cloth *cloth, DerivedMesh *dm); static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); + + /****************************************************************************** * * External interface called by modifier.c clothModifier functions. @@ -157,6 +161,8 @@ void cloth_init (ClothModifierData *clmd) clmd->sim_parms.solver_type = 0; clmd->sim_parms.preroll = 0; clmd->sim_parms.maxspringlen = 10; + clmd->sim_parms.firstframe = 1; + clmd->sim_parms.lastframe = 250; clmd->coll_parms.self_friction = 5.0; clmd->coll_parms.friction = 10.0; clmd->coll_parms.loop_count = 1; @@ -614,8 +620,13 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, Frame *frame = NULL; LinkNode *search = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; - - clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); + + // only be active during a specific period + if((current_time < clmd->sim_parms.firstframe)||(current_time > clmd->sim_parms.lastframe)) + return; + + // unused in the moment + clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; clmd->sim_parms.sim_time = current_time; @@ -707,7 +718,6 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, tstart(); /* Call the solver. */ - if (solvers [clmd->sim_parms.solver_type].solver) solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors,0,0); @@ -754,9 +764,6 @@ void cloth_free_modifier (ClothModifierData *clmd) clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; cloth_cache_free(clmd, 0); - /* Calls the solver and collision frees first as they - * might depend on data in clmd->clothObject. */ - if (cloth) { // If our solver provides a free function, call it @@ -793,11 +800,9 @@ void cloth_free_modifier (ClothModifierData *clmd) MEM_freeN (cloth); clmd->clothObject = NULL; } - } - /****************************************************************************** * * Internal functions. @@ -826,8 +831,6 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertex Mat4MulVecfl (ob->imat, vertexCos[i]); /* softbody is in global coords */ } } - else if (DEBUG_CLOTH) - printf ("cloth_to_object: clmd->clothObject was NULL.\n"); } @@ -837,15 +840,20 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertex **/ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) { - unsigned int i; - int j; - MDeformVert *dvert = NULL; - Cloth *clothObj; + unsigned int i = 0; + unsigned int j = 0; + MDeformVert *dvert = NULL; + Cloth *clothObj = NULL; unsigned int numverts = dm->getNumVerts(dm); float goalfac = 0; ClothVertex *verts = NULL; clothObj = clmd->clothObject; + + if(!dm) + return; + + numverts = dm->getNumVerts(dm); /* vgroup is 1 based, decrement so we can match the right group. */ --vgroup; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 5d386036b7b..c756c220fe6 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -689,14 +689,15 @@ typedef struct Implicit_Data lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI; } Implicit_Data; + int implicit_init (Object *ob, ClothModifierData *clmd) { unsigned int i = 0; unsigned int pinned = 0; - Cloth *cloth; - ClothVertex *verts; - ClothSpring *springs; - Implicit_Data *id; + Cloth *cloth = NULL; + ClothVertex *verts = NULL; + ClothSpring *springs = NULL; + Implicit_Data *id = NULL; // init memory guard // MEMORY_BASE.first = MEMORY_BASE.last = NULL; @@ -727,6 +728,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) id->B = create_lfvector(cloth->numverts); id->dV = create_lfvector(cloth->numverts); id->z = create_lfvector(cloth->numverts); + for(i=0;inumverts;i++) { id->A[i].r = id->A[i].c = id->dFdV[i].r = id->dFdV[i].c = id->dFdX[i].r = id->dFdX[i].c = id->P[i].c = id->P[i].r = id->Pinv[i].c = id->Pinv[i].r = id->bigI[i].c = id->bigI[i].r = i; @@ -1503,9 +1505,23 @@ void implicit_set_positions (ClothModifierData *clmd) ClothVertex *verts = cloth->verts; unsigned int numverts = cloth->numverts, i; Implicit_Data *id = cloth->implicit; + unsigned int pinned = 0; + + // reset pinned verts in S matrix to zero + // id->S[0].vcount = 0; id->S[0].scount = 0; + for(i = 0; i < numverts; i++) { VECCOPY(id->X[i], verts[i].x); VECCOPY(id->V[i], verts[i].v); + /* + if(verts [i].flags & CVERT_FLAG_PINNED) + { + id->S[pinned].pinned = 1; + id->S[pinned].c = id->S[pinned].r = i; + pinned++; + } + */ } + // id->S[0].vcount = pinned; } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 0d7668e0ccc..d3d41e70d57 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5233,8 +5233,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti = INIT_TYPE(Cloth); mti->type = eModifierTypeType_OnlyDeform; mti->initData = clothModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsCVs; - // | eModifierTypeFlag_RequiresOriginalData; + mti->flags = eModifierTypeFlag_AcceptsCVs + | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode // | eModifierTypeFlag_EnableInEditmode; @@ -5446,6 +5446,13 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } +ModifierData * modifiers_isClothEnabled(Object *ob) +{ + ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); + + return md; +} + LinkNode *modifiers_calcDataMasks(ModifierData *md, CustomDataMask dataMask) { LinkNode *dataMasks = NULL; diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index cb17f81b87d..b017dd950e2 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -289,6 +289,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_CLOTH_CLEARCACHEFRAME 1471 #define B_CLOTH_CHANGEPREROLL 1472 #define B_CLOTH_DEL_VG 1473 +#define B_CLOTH_RENEW 1474 /* *********************** */ #define B_WORLDBUTS 1600 diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index bed04c2fa71..c756c29f467 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -106,7 +106,9 @@ typedef struct SimulationSettings { float defgoal; int goalfrict; float goalspring; - int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ + int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ + int lastframe; /* frame on which simulation stops */ + int firstframe; /* frame on which simulation starts */ } SimulationSettings; @@ -144,7 +146,7 @@ typedef struct Cloth { int pad4; void *tree; /* collision tree for this cloth object */ struct MFace *mfaces; - void *implicit; + void *implicit; /* our implicit solver connects to this pointer */ } Cloth; #endif diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index ea90f6fdc16..2ab5397f493 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -949,7 +949,7 @@ static uiBlock *modifiers_add_menu(void *ob_v) ModifierTypeInfo *mti = modifierType_getInfo(i); /* Only allow adding through appropriate other interfaces */ - if(ELEM(i, eModifierType_Softbody, eModifierType_Hook)) continue; + if(ELEM3(i, eModifierType_Softbody, eModifierType_Hook, eModifierType_Cloth)) continue; if((mti->flags&eModifierTypeFlag_AcceptsCVs) || (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) { @@ -1600,6 +1600,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco height += 20; } else if (md->type==eModifierType_Softbody) { height = 26; + } else if (md->type==eModifierType_Cloth) { + height = 26; } else if (md->type==eModifierType_Boolean) { height = 48; } else if (md->type==eModifierType_Array) { @@ -1615,7 +1617,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiBlockBeginAlign(block); but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Apply", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Apply the current modifier and remove from the stack"); uiButSetFunc(but, modifiers_applyModifier, ob, md); - if (md->type!=eModifierType_Softbody) { + if ((md->type!=eModifierType_Softbody) && (md->type!=eModifierType_Cloth)) { but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Copy", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Duplicate the current modifier at the same position in the stack"); uiButSetFunc(but, modifiers_copyModifier, ob, md); } @@ -3308,6 +3310,9 @@ void do_latticebuts(unsigned short event) if(ob==G.obedit) resizelattice(editLatt, lt->opntsu, lt->opntsv, lt->opntsw, NULL); else resizelattice(ob->data, lt->opntsu, lt->opntsv, lt->opntsw, NULL); ob->softflag |= OB_SB_REDO; + if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); allqueue(REDRAWVIEW3D, 0); } @@ -3316,6 +3321,9 @@ void do_latticebuts(unsigned short event) lt = ob->data; resizelattice(ob->data, lt->opntsu, lt->opntsv, lt->opntsw, ob); ob->softflag |= OB_SB_REDO; + if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); allqueue(REDRAWVIEW3D, 0); } diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index de1d8f8c0ac..df6d88bddd0 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2196,11 +2196,22 @@ void do_object_panels(unsigned short event) if(clmd) { clmd->sim_parms.vgroup_mass = 0; + do_object_panels(B_CLOTH_RENEW); } allqueue(REDRAWBUTSOBJECT, 0); } break; + case B_CLOTH_RENEW: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + do_object_panels(B_CLOTH_CLEARCACHEALL); + cloth_free_modifier (clmd); + } + } + break; default: if(event>=B_SELEFFECT && eventsim_parms.structural, 1.0, 5000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_DIFF, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 1000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_DIFF, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 5000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 1000.0, 1000, 0, "Wrinkle possibility"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_DIFF, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); @@ -3123,9 +3134,9 @@ static void object_panel_cloth(Object *ob) uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); // uiClearButLock(); - uiDefButF(block, NUM, B_DIFF, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_DIFF, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_DIFF, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); /* GOAL STUFF */ @@ -3150,7 +3161,7 @@ static void object_panel_cloth(Object *ob) } sprintf (clvg2, "%s%s", clmvg, clvg1); - uiDefButS(block, MENU, REDRAWVIEW3D, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (clvg1); MEM_freeN (clvg2); @@ -3166,19 +3177,19 @@ static void object_panel_cloth(Object *ob) } else - uiDefButF(block, NUM, REDRAWVIEW3D, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } else { - uiDefButS(block, TOG, REDRAWVIEW3D, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, REDRAWVIEW3D, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } - uiDefButF(block, NUM, B_DIFF, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); - uiDefButF(block, NUM, B_DIFF, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, REDRAWVIEW3D, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); - uiDefButF(block, NUM, REDRAWVIEW3D, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); } uiBlockEndAlign(block); @@ -3219,6 +3230,9 @@ static void object_panel_cloth_II(Object *ob) if(uiNewPanel(curarea, block, "Cloth Cache", "Physics", 651, 0, 318, 204)==0) return; uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + uiDefButI(block, NUM, B_CLOTH_RENEW, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); if(clmd->sim_parms.cache) { @@ -3230,17 +3244,17 @@ static void object_panel_cloth_II(Object *ob) else sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); - uiDefBut(block, LABEL, 0, str, 10,160,290,20, NULL, 0.0, 0, 0, 0, ""); - uiDefBut(block, LABEL, 0, "Clear cache:", 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, str, 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Clear cache:", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); uiBlockBeginAlign (block); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 120,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 120,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); if(length>1) // B_CLOTH_CHANGEPREROLL - uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,100,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); } else { - uiDefBut(block, LABEL, 0, "No frames cached.", 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); } uiBlockEndAlign(block); } @@ -3271,7 +3285,7 @@ static void object_panel_cloth_III(Object *ob) uiBlockBeginAlign(block); // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_DIFF, "Min Distance:", 10,10,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,10,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); uiDefBut(block, LABEL, 0, "",160,10,150,20, NULL, 0.0, 0, 0, 0, ""); uiBlockEndAlign(block); } diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index fcfb1a5c40f..0874f4c3342 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -65,6 +65,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_depsgraph.h" +#include "BKE_cloth.h" #include "BKE_customdata.h" #include "BKE_global.h" #include "BKE_key.h" @@ -72,6 +73,7 @@ #include "BKE_main.h" #include "BKE_material.h" #include "BKE_mesh.h" +#include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_texture.h" #include "BKE_utildefines.h" @@ -1312,7 +1314,11 @@ void load_editMesh(void) if(me->id.us>1) { Base *base; for(base= G.scene->base.first; base; base= base->next) { - if(base->object->data==me) { + if(base->object->data==me) { + if(modifiers_isClothEnabled(base->object)) { + cloth_free_modifier(modifiers_isClothEnabled(base->object)); + } + base->object->softflag |= OB_SB_REDO; base->object->recalc |= OB_RECALC_DATA; } diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 44b93789690..81a111e62c2 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -1746,6 +1746,10 @@ void exit_editmode(int flag) /* freedata==0 at render, 1= freedata, 2= do undo b sbObjectToSoftbody(ob); } + if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } + if(ob->type==OB_MESH && get_mesh(ob)->mr) multires_edge_level_update(ob, get_mesh(ob)); diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 2fdf68951b8..12c1265e7ca 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -75,6 +75,7 @@ #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_blender.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_constraint.h" #include "BKE_depsgraph.h" @@ -2414,7 +2415,7 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) } } -/* inserting keys, refresh ipo-keys, softbody, redraw events... (ton) */ +/* inserting keys, refresh ipo-keys, softbody, cloth, redraw events... (ton) */ /* note; transdata has been freed already! */ void special_aftertrans_update(TransInfo *t) { @@ -2476,13 +2477,15 @@ void special_aftertrans_update(TransInfo *t) } else { base= FIRSTBASE; - while(base) { - + while(base) { if(base->flag & BA_DO_IPO) redrawipo= 1; ob= base->object; if(modifiers_isSoftbodyEnabled(ob)) ob->softflag |= OB_SB_REDO; + else if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } /* Set autokey if necessary */ if ((!cancelled) && (base->flag & SELECT)){ diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 8e92fdda38a..ae65b1d9fa6 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -67,6 +67,7 @@ #include "BKE_action.h" #include "BKE_anim.h" #include "BKE_armature.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" #include "BKE_displist.h" @@ -313,8 +314,16 @@ void recalcData(TransInfo *t) /* bah, softbody exception... recalcdata doesnt reset */ for(base= FIRSTBASE; base; base= base->next) { if(base->object->recalc & OB_RECALC_DATA) + { + ClothModifierData *clmd = NULL; + if(modifiers_isSoftbodyEnabled(base->object)) { base->object->softflag |= OB_SB_REDO; + } + else if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } + } } } @@ -347,10 +356,17 @@ void recalcData(TransInfo *t) } } - /* softbody exception */ - if(modifiers_isSoftbodyEnabled(ob)) { - if(ob->recalc & OB_RECALC_DATA) - ob->softflag |= OB_SB_REDO; + /* softbody & cloth exception */ + if(ob->recalc & OB_RECALC_DATA) + { + ClothModifierData *clmd = NULL; + + if(modifiers_isSoftbodyEnabled(ob)) { + ob->softflag |= OB_SB_REDO; + } + else if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } } /* proxy exception */ diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 2f82cd2e2b2..102aa79d47e 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -64,6 +64,7 @@ #include "BKE_armature.h" #include "BKE_DerivedMesh.h" +#include "BKE_cloth.h" #include "BKE_customdata.h" #include "BKE_depsgraph.h" #include "BKE_deform.h" @@ -1346,6 +1347,11 @@ void weight_paint(void) /* this flag is event for softbody to refresh weightpaint values */ if(ob->soft) ob->softflag |= OB_SB_REDO; + // same goes for cloth + if(modifiers_isClothEnabled(ob)) { + cloth_free_modifier(modifiers_isClothEnabled(ob)); + } + BIF_undo_push("Weight Paint"); allqueue(REDRAWVIEW3D, 0); } From 7c05d8eb2b254d2f73f50fe3b2ad95c20c689be4 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 10:41:20 +0000 Subject: [PATCH 004/430] Fixed 2 crashers when activating collision object; Also put some additional openMP code in (doesn't hurt since #pragma gets ignored if no openMP available) --- source/blender/blenkernel/intern/cloth.c | 73 +++++++++++++++++++- source/blender/blenkernel/intern/collision.c | 7 +- source/blender/blenkernel/intern/implicit.c | 42 ++++++----- source/blender/blenkernel/intern/kdop.c | 12 ++-- source/blender/src/buttons_object.c | 4 +- 5 files changed, 105 insertions(+), 33 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 18e1d4a6cde..47925e352eb 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -444,6 +444,43 @@ int cloth_cache_search_frame(ClothModifierData *clmd, float time) return 1; } +int cloth_cache_last_frame(ClothModifierData *clmd) +{ + Frame *frame = NULL; + LinkNode *search = NULL; + int temptime = 0; + + Cloth *cloth = NULL; + + if(!clmd) + return 0; + + cloth = clmd->clothObject; + + if(!cloth) + return 0; + + if(clmd->sim_parms.cache) + { + search = clmd->sim_parms.cache; + + // check if frame exists + while(search) + { + frame = search->link; + + if(frame->time > temptime) + { + temptime = frame->time; + } + + search = search->next; + } + } + + return temptime; +} + void cloth_cache_get_frame(ClothModifierData *clmd, float time) { Frame *frame = NULL; @@ -622,8 +659,23 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float deltaTime = current_time - clmd->sim_parms.sim_time; // only be active during a specific period - if((current_time < clmd->sim_parms.firstframe)||(current_time > clmd->sim_parms.lastframe)) + if(current_time < clmd->sim_parms.firstframe) return; + else if(current_time > clmd->sim_parms.lastframe) + { + int frametime = cloth_cache_last_frame(clmd); + if(cloth_cache_search_frame(clmd, frametime)) + { + cloth_cache_get_frame(clmd, frametime); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + return; + } + else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed + { + if(!cloth_cache_search_frame(clmd, framenr)) + return; + } // unused in the moment clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; @@ -668,7 +720,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, VECCOPY (verts->txold, verts->x); // Get the current position. - VECCOPY (verts->x, mvert[i].co); + VECCOPY (verts->x, vertexCos[i]); Mat4MulVecfl(ob->obmat, verts->x); // Compute the vertices velocity. @@ -902,6 +954,23 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh unsigned int i; MVert *mvert = NULL; ClothVertex *verts = NULL; + + /* If we have a clothObject, free it. */ + if (clmd->clothObject != NULL) + cloth_free_modifier (clmd); + + /* Allocate a new cloth object. */ + clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); + if (clmd->clothObject) + { + clmd->clothObject->old_solver_type = -1; + clmd->clothObject->old_collision_type = -1; + } + else if (clmd->clothObject == NULL) + { + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); + return 0; + } switch (ob->type) { diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index cdbac692b35..13327c16006 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -403,7 +403,7 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData VECCOPY(b[0], cloth2->verts[face2->v1].txold); VECCOPY(b[1], cloth2->verts[face2->v2].txold); VECCOPY(b[2], cloth2->verts[face2->v3].txold); - +#pragma omp critical distance = plNearestPoints(a,b,pa,pb,normal); quadA = quadB = 0; @@ -450,7 +450,7 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData VECCOPY(b[0], cloth2->verts[indexD].txold); VECCOPY(b[1], cloth2->verts[indexE].txold); VECCOPY(b[2], cloth2->verts[indexF].txold); - +#pragma omp critical tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); if(tempdistance < distance) @@ -483,7 +483,7 @@ void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clm LinkNode **linknode; double distance = 0; float epsilon = clmd->coll_parms.epsilon; - + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); linknode = clmd->coll_parms.temp; @@ -505,7 +505,6 @@ void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clm // printf("normal x: %f, y: %f, z: %f\n", collpair->normal[0], collpair->normal[1], collpair->normal[2]); collpair->distance = distance; - BLI_linklist_append(&linknode[tree1->tri_index], collpair); } else diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index c756c220fe6..18044db6049 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -89,7 +89,7 @@ double itval() // intrinsics need better compile flag checking // #include // #include -#include +// #include static struct timeval _itstart, _itend; static struct timezone itz; @@ -247,14 +247,9 @@ DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float s DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) { unsigned int i = 0; - -#ifndef _WIN32 - float temp __attribute__ ((aligned (16) ) )= 0.0f; // __declspec(align(16)) -#else - float temp = 0.0f; -#endif - -#pragma omp parallel for reduction(+: temp) schedule(guided, 1) + float temp = 0.0; +// schedule(guided, 2) +#pragma omp parallel for reduction(+: temp) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -264,7 +259,6 @@ DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], /* A = B + C --> for big vector */ DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) { - unsigned int i = 0; for(i = 0; i < verts; i++) @@ -576,7 +570,7 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) { - unsigned int i = 0,j=0; + int i = 0,j=0; zero_lfvector(to, from[0].vcount); /* process diagonal elements */ for(i = 0; i < from[0].vcount; i++) @@ -585,12 +579,21 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (* } /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ - for(j = from[0].vcount; j < from[0].vcount+from[0].scount; j++) +#pragma parallel for shared(to,from, fLongVector) private(i) + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { - muladd_fmatrix_fvector(to[from[j].c], from[j].m, fLongVector[from[j].r]); - muladd_fmatrix_fvector(to[from[j].r], from[j].m, fLongVector[from[j].c]); - } - + // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + + to[from[i].c][0] += INPR(from[i].m[0],fLongVector[from[i].r]); + to[from[i].c][1] += INPR(from[i].m[1],fLongVector[from[i].r]); + to[from[i].c][2] += INPR(from[i].m[2],fLongVector[from[i].r]); + + // muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); + + to[from[i].r][0] += INPR(from[i].m[0],fLongVector[from[i].c]); + to[from[i].r][1] += INPR(from[i].m[1],fLongVector[from[i].c]); + to[from[i].r][2] += INPR(from[i].m[2],fLongVector[from[i].c]); + } } /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) @@ -1195,12 +1198,13 @@ DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVect dfdx_spring_type1(dfdx, dir,length,L,k); - dfdv_damp(dfdv, dir,clmd->sim_parms.Cdis); + dfdv_damp(dfdv, dir,clmd->sim_parms.Cdis); + sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, dfdv); sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, dfdv); - + } } else // calculate force of bending springs @@ -1424,7 +1428,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } // call collision function - // result = cloth_bvh_objcollision(clmd, step + dt, bvh_collision_response, dt); + result = cloth_bvh_objcollision(clmd, step + dt, bvh_collision_response, dt); // copy corrected positions back to simulation for(i = 0; i < numverts; i++) diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index cdcb16c67f6..0d9fddf0211 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -728,7 +728,7 @@ DO_INLINE int bvh_overlap(float *bv1, float *bv2) */ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response) { - int i = 0, ret=0; + int i = 0, j = 0, ret=0; /* // Shouldn't be possible @@ -737,8 +737,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * printf("Error: no tree there\n"); return 0; } - */ - + */ if (bvh_overlap(tree1->bv, tree2->bv)) { // Check if this node in the first tree is a leaf @@ -751,7 +750,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * if(collision_response) collision_response (clmd, coll_clmd, tree1, tree2); - return 1; + ret = 1; } else { @@ -767,14 +766,15 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * else { // Process the quad tree. - for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) + if (tree1->nodes [j] && bvh_traverse (clmd, coll_clmd, tree1->nodes[j], tree2, step, collision_response)) ret = 1; } } } + return ret; } diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index df6d88bddd0..2106525e9b2 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3231,8 +3231,8 @@ static void object_panel_cloth_II(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - uiDefButI(block, NUM, B_CLOTH_RENEW, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); + uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); if(clmd->sim_parms.cache) { From 26a0473c8ca6dd0e0c86f09a74ec91a59cc90516 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 11:18:04 +0000 Subject: [PATCH 005/430] compile fix from elubie special request from mfoxdogg: place modifier where you want --- source/blender/blenkernel/intern/modifier.c | 2 +- source/blender/imbuf/intern/thumbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index d3d41e70d57..7607ce63b9d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5234,7 +5234,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->type = eModifierTypeType_OnlyDeform; mti->initData = clothModifier_initData; mti->flags = eModifierTypeFlag_AcceptsCVs - | eModifierTypeFlag_RequiresOriginalData; + // | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode // | eModifierTypeFlag_EnableInEditmode; diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index c2e30b091c2..b071331e46b 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -69,7 +69,7 @@ static int get_thumb_dir( char* dir , ThumbSize size) /* yes, applications shouldn't store data there, but so does GIMP :)*/ SHGetSpecialFolderPath(0, dir, CSIDL_PROFILE, 0); #else - home = getenv("HOME"); + char* home = getenv("HOME"); if (!home) return 0; BLI_strncpy(dir, home, FILE_MAX); #endif From ca6e59bc487afeafebdbf4bf76524cfaf767624c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 11:19:07 +0000 Subject: [PATCH 006/430] stupid missing ";" --- source/blender/blenkernel/intern/modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 7607ce63b9d..4f1e9a5644c 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5233,7 +5233,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti = INIT_TYPE(Cloth); mti->type = eModifierTypeType_OnlyDeform; mti->initData = clothModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsCVs + mti->flags = eModifierTypeFlag_AcceptsCVs; // | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode From 0e502338fc68e35412c108252e8c1c6f4a544ec2 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 13:25:29 +0000 Subject: [PATCH 007/430] disable parallel for users --- intern/elbeem/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript index 75d9b98c82a..bb6637ba32d 100644 --- a/intern/elbeem/SConscript +++ b/intern/elbeem/SConscript @@ -5,7 +5,7 @@ Import('env') sources = env.Glob('intern/*.cpp') -defs = 'PARALLEL NOGUI ELBEEM_BLENDER=1' +defs = 'NOGUI ELBEEM_BLENDER=1' if env['OURPLATFORM']=='win32-vc': defs += ' USE_MSVC6FIXES' incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC'] From deceff52d132041d3f6761a102966dc1aa1299be Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 19:32:15 +0000 Subject: [PATCH 008/430] Add WITH_BF_OPENMP for openmp usage, untested on msvc --- SConstruct | 12 ++++++++++++ intern/elbeem/SConscript | 6 +++++- source/blender/blenkernel/BKE_blender.h | 2 +- tools/btools.py | 7 +++++-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index 2cacb91d103..c7a7ac5e298 100644 --- a/SConstruct +++ b/SConstruct @@ -176,6 +176,18 @@ if env['BF_NO_ELBEEM'] == 1: env['CXXFLAGS'].append('-DDISABLE_ELBEEM') env['CCFLAGS'].append('-DDISABLE_ELBEEM') +if env['WITH_BF_OPENMP'] == 1: + if env['OURPLATFORM']=='win32-vc': + env['PLATFORM_LINKFLAGS'].append('/openmp') + env['CCFLAGS'].append('/openmp') + env['CPPFLAGS'].append('/openmp') + env['CXXFLAGS'].append('/openmp') + else: + env['PLATFORM_LINKFLAGS'].append('-lgomp') + env['CCFLAGS'].append('-fopenmp') + env['CPPFLAGS'].append('-fopenmp') + env['CXXFLAGS'].append('-fopenmp') + #check for additional debug libnames if env.has_key('BF_DEBUG_LIBS'): diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript index bb6637ba32d..bdcb0507987 100644 --- a/intern/elbeem/SConscript +++ b/intern/elbeem/SConscript @@ -5,7 +5,11 @@ Import('env') sources = env.Glob('intern/*.cpp') -defs = 'NOGUI ELBEEM_BLENDER=1' +defs = ' NOGUI ELBEEM_BLENDER=1' + +if env['WITH_BF_OPENMP'] == 1: + defs += ' PARALLEL' + if env['OURPLATFORM']=='win32-vc': defs += ' USE_MSVC6FIXES' incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC'] diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index e2d2dab9aae..6bddd9de932 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -44,7 +44,7 @@ struct ListBase; struct MemFile; #define BLENDER_VERSION 245 -#define BLENDER_SUBVERSION 0 +#define BLENDER_SUBVERSION 1 #define BLENDER_MINVERSION 240 #define BLENDER_MINSUBVERSION 0 diff --git a/tools/btools.py b/tools/btools.py index eb8f844df4d..1b91a3343dc 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -55,8 +55,9 @@ def validate_arguments(args, bc): 'BF_VERSE_INCLUDE', 'VERSE_BUILD_BINARY', 'VERSE_BUILD_DIR', 'VERSE_REGEN_PROTO', 'BF_TWEAK_MODE', - 'WITHOUT_BF_INSTALL' - ] + 'WITHOUT_BF_INSTALL', + 'WITH_BF_OPENMP' + ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', 'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME', @@ -247,6 +248,8 @@ def read_opts(cfg, args): ('BF_FREETYPE_LIB', 'Freetype library', ''), ('BF_FREETYPE_LIBPATH', 'Freetype library path', ''), + (BoolOption('WITH_BF_OPENMP', 'Use OpenMP if true', 'false')), + (BoolOption('WITH_BF_QUICKTIME', 'Use QuickTime if true', 'false')), ('BF_QUICKTIME', 'QuickTime base path', ''), ('BF_QUICKTIME_INC', 'QuickTime include path', ''), From 969397ced28159562ad350ba595da9833266f6ae Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 19:57:47 +0000 Subject: [PATCH 009/430] bf-blender/trunk/blender rev 12059 + 12060 + 12064 merged (this commit is only 12059, others are already merged) --- source/blender/src/editview.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index 176821e0cc9..bd90d887cd0 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -2063,15 +2063,23 @@ void set_render_border(void) G.scene->r.border.ymin= ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin); G.scene->r.border.xmax= ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin); G.scene->r.border.ymax= ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin); - + CLAMP(G.scene->r.border.xmin, 0.0, 1.0); CLAMP(G.scene->r.border.ymin, 0.0, 1.0); CLAMP(G.scene->r.border.xmax, 0.0, 1.0); CLAMP(G.scene->r.border.ymax, 0.0, 1.0); - + allqueue(REDRAWVIEWCAM, 1); - /* if it was not set, we do this */ - G.scene->r.mode |= R_BORDER; + + /* drawing a border surrounding the entire camera view switches off border rendering */ + if (G.scene->r.border.xmin <= 0.0 && G.scene->r.border.xmax >= 1.0 && + G.scene->r.border.ymin <= 0.0 && G.scene->r.border.ymax >= 1.0) + { + G.scene->r.mode &= ~R_BORDER; + } else { + G.scene->r.mode |= R_BORDER; + } + allqueue(REDRAWBUTSSCENE, 1); } } From f473f4ee7987e9f2d66c5f0821bb826ab194a082 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 17 Sep 2007 21:03:45 +0000 Subject: [PATCH 010/430] Fix: No GAMEENGINE=1 needed anymore, only WITH_BF_BULLET=1. Fix: (Hopefully) some fix for linking openmp --- SConstruct | 4 ++-- extern/SConscript | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index c7a7ac5e298..7fad247ec07 100644 --- a/SConstruct +++ b/SConstruct @@ -178,12 +178,12 @@ if env['BF_NO_ELBEEM'] == 1: if env['WITH_BF_OPENMP'] == 1: if env['OURPLATFORM']=='win32-vc': - env['PLATFORM_LINKFLAGS'].append('/openmp') + env.Append(LINKFLAGS=['/openmp']) env['CCFLAGS'].append('/openmp') env['CPPFLAGS'].append('/openmp') env['CXXFLAGS'].append('/openmp') else: - env['PLATFORM_LINKFLAGS'].append('-lgomp') + env.Append(LINKFLAGS=['-lgomp']) env['CCFLAGS'].append('-fopenmp') env['CPPFLAGS'].append('-fopenmp') env['CXXFLAGS'].append('-fopenmp') diff --git a/extern/SConscript b/extern/SConscript index 0cdf9676862..77e8998e359 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -5,8 +5,9 @@ Import('env') if env['WITH_BF_GAMEENGINE']: SConscript(['qhull/SConscript', 'solid/SConscript']) - if env['WITH_BF_BULLET']: - SConscript(['bullet2/src/SConscript']) + +if env['WITH_BF_BULLET']: + SConscript(['bullet2/src/SConscript']) if env['WITH_BF_INTERNATIONAL']: SConscript(['bFTGL/SConscript']) From 9dbcffadec1b537e68435d01e5b632d4763a7150 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 18 Sep 2007 07:16:57 +0000 Subject: [PATCH 011/430] Temporary fix for loading crash of .blends with cached frames. Also fixed some goal behavior/init problem to match SB behaviour --- source/blender/blenkernel/intern/cloth.c | 14 ++++++---- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/modifier.c | 1 + source/blender/blenloader/intern/readfile.c | 10 ++++--- source/blender/blenloader/intern/writefile.c | 29 +++++++++++++++++--- 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 47925e352eb..14370b59d68 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -913,13 +913,10 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v verts = clothObj->verts; for (i = 0; i < numverts; i++, verts++) - { - /* so this will definily be below SOFTGOALSNAP */ - verts->goal= 0.0f; - + { // LATER ON, support also mass painting here if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) - { + { dvert = dm->getVertData(dm, i, CD_MDEFORMVERT); if(dvert) { @@ -1211,7 +1208,12 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d Mat4MulVecfl(ob->obmat, verts->x); verts->mass = clmd->sim_parms.mass; - verts->goal= clmd->sim_parms.defgoal; + + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + verts->goal= clmd->sim_parms.defgoal; + else + verts->goal= 0.0f; + verts->flags = 0; VECCOPY(verts->xold, verts->x); VECCOPY(verts->xconst, verts->x); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 18044db6049..aa28f0a2086 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -570,7 +570,7 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) { - int i = 0,j=0; + unsigned int i = 0,j=0; zero_lfvector(to, from[0].vcount); /* process diagonal elements */ for(i = 0; i < from[0].vcount; i++) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 4f1e9a5644c..546247f8e35 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4873,6 +4873,7 @@ static void clothModifier_deformVerts( DerivedMesh *dm = NULL; // if possible use/create DerivedMesh + if(derivedData) dm = CDDM_copy(derivedData); else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 19f74096e54..3fbfef12f1f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2878,11 +2878,13 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) ClothModifierData *clmd = (ClothModifierData*) md; clmd->clothObject = NULL; - /* - if (clmd->sim_parms.flags & CSIMSETT_FLAG_BAKED) { - clmd->baked_data = newdataadr (fd, clmd->baked_data); + clmd->sim_parms.cache = NULL; + + if (clmd->sim_parms.cache) { + // TODO + // clmd->cache = newdataadr (fd, clmd->cache); printf ("direct_link_modifiers: read cloth baked_data.\n"); - }*/ + } } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 4203824ae65..0a0c49c5ef8 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -813,6 +813,23 @@ static void write_constraint_channels(WriteData *wd, ListBase *chanbase) } +/* +// TODO: finish this +static void write_cloth_cache(WriteData *wd, LinkNode *ln) +{ + + while(ln) { + writestruct(wd, DATA, "cloth_cache", 1, ln); + writestruct(wd, DATA, "cloth_cache_frame", 1, ln->link); + writestruct(wd, DATA, "cloth_cache_frame_verts", 1, ln->link); + writestruct(wd, DATA, "cloth_cache_frame_springs", 1, ln->link); + } + + ln = ln->next; + } +} +*/ + static void write_modifiers(WriteData *wd, ListBase *modbase) { ModifierData *md; @@ -832,16 +849,20 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) else if (md->type==eModifierType_Cloth) { int n; ClothModifierData *clmd = (ClothModifierData *) md; - /* - if ((clmd->sim_parms.flags & CSIMSETT_FLAG_BAKED) && clmd->baked_data) { + + if (clmd->sim_parms.cache) { // Compute the number of vertices we're saving. - + // TODO + // write_cloth_cache(); + /* + // old code n = (clmd->sim_parms.bake_end_frame - clmd->sim_parms.bake_start_frame + 1) * clmd->sim_parms.bake_num_verts; writedata (wd, DATA, n * sizeof (clmd->baked_data [0]), clmd->baked_data); printf ("write_modifiers: wrote %d elements of size %d for cloth baked data.\n", n, sizeof (clmd->baked_data [0])); - }*/ + */ + } } } } From 138b436914e6d42acae589633443477bae4425ad Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 18 Sep 2007 11:42:52 +0000 Subject: [PATCH 012/430] Fixed floating point rounding error in goal velocity computation, pointed out my mfoxdogg, additional code cleanup --- source/blender/blenkernel/intern/cloth.c | 2 +- source/blender/blenkernel/intern/implicit.c | 43 +++++++++++---------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 14370b59d68..40f3c9816a6 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -764,7 +764,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, Mat4MulVecfl(ob->obmat, verts->xconst); /* Compute the vertices velocity. */ - VECSUB (verts->v, verts->x, verts->xold); + VECSUB (verts->v, verts->xconst, verts->xold); } tstart(); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index aa28f0a2086..df5830f6a77 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -736,7 +736,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) { id->A[i].r = id->A[i].c = id->dFdV[i].r = id->dFdV[i].c = id->dFdX[i].r = id->dFdX[i].c = id->P[i].c = id->P[i].r = id->Pinv[i].c = id->Pinv[i].r = id->bigI[i].c = id->bigI[i].r = i; - if(verts [i].flags & CVERT_FLAG_PINNED) + if(verts [i].goal >= SOFTGOALSNAP) { id->S[pinned].pinned = 1; id->S[pinned].c = id->S[pinned].r = i; @@ -1199,8 +1199,9 @@ DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVect dfdx_spring_type1(dfdx, dir,length,L,k); dfdv_damp(dfdv, dir,clmd->sim_parms.Cdis); - + sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, dfdv); + sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, dfdv); @@ -1315,15 +1316,15 @@ void calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *l mul_fvector_S(tvect, tvect, time); VECADD(tvect, tvect, verts[i].xold); - VecSubf(auxvect, tvect, lX[i]); + VECSUB(auxvect, tvect, lX[i]); ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); - /* calulate damping forces generated by goals*/ + // calulate damping forces generated by goals VECSUB(velgoal,verts[i].xold, verts[i].xconst); kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); - + } } } @@ -1404,6 +1405,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase if(verts [i].goal >= SOFTGOALSNAP) { VECSUB(id->V[i], verts[i].xconst, verts[i].xold); + // VecMulf(id->V[i], 1.0 / dt); } } } @@ -1413,15 +1415,30 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); + calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV); + add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); // collisions itstart(); + // update verts to current positions for(i = 0; i < numverts; i++) { + if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) /* do goal stuff */ + { + if(verts [i].goal >= SOFTGOALSNAP) + { + float tvect[3] = {.0,.0,.0}; + // VECSUB(tvect, id->Xnew[i], verts[i].xold); + mul_fvector_S(tvect, id->V[i], step+dt); + VECADD(tvect, tvect, verts[i].xold); + VECCOPY(id->Xnew[i], tvect); + } + + } + VECCOPY(verts[i].tx, id->Xnew[i]); VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); @@ -1433,7 +1450,6 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // copy corrected positions back to simulation for(i = 0; i < numverts; i++) { - // TODO: calculate v_n+1 from v_n+1/2 if(result) { VECADD(verts[i].tx, verts[i].txold, verts[i].tv); @@ -1509,23 +1525,10 @@ void implicit_set_positions (ClothModifierData *clmd) ClothVertex *verts = cloth->verts; unsigned int numverts = cloth->numverts, i; Implicit_Data *id = cloth->implicit; - unsigned int pinned = 0; - - // reset pinned verts in S matrix to zero - // id->S[0].vcount = 0; id->S[0].scount = 0; for(i = 0; i < numverts; i++) { VECCOPY(id->X[i], verts[i].x); VECCOPY(id->V[i], verts[i].v); - /* - if(verts [i].flags & CVERT_FLAG_PINNED) - { - id->S[pinned].pinned = 1; - id->S[pinned].c = id->S[pinned].r = i; - pinned++; - } - */ } - // id->S[0].vcount = pinned; } From b852223456d9b12ee2e80488ccedc5af65be48e6 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 18 Sep 2007 14:05:36 +0000 Subject: [PATCH 013/430] arround 50% speedup in calculating spring force using OpenMP --- source/blender/blenkernel/BKE_cloth.h | 3 + source/blender/blenkernel/intern/cloth.c | 6 +- source/blender/blenkernel/intern/implicit.c | 139 +++++++++++++------- source/blender/makesdna/DNA_cloth_types.h | 3 + 4 files changed, 98 insertions(+), 53 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 0a50feeb9b0..b9861049fb4 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -52,6 +52,8 @@ struct DerivedMesh; #define DO_INLINE #endif +#define CLOTH_MAX_THREAD 2 + /* goal defines */ #define SOFTGOALSNAP 0.999f @@ -103,6 +105,7 @@ typedef enum typedef enum { CSPRING_FLAG_DEACTIVATE = (1 << 1), + CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied } CSPRINGS_FLAGS; // needed for buttons_object.c diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 40f3c9816a6..57975e56cc3 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -117,10 +117,6 @@ static CM_SOLVER_DEF solvers [] = { // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, }; -#define DEBUG_CLOTH_VERBOSE 1000 -static int DEBUG_CLOTH = 0; - - /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ @@ -774,7 +770,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors,0,0); tend(); - printf("Cloth simulation time: %f\n", (float)tval()); + // printf("Cloth simulation time: %f\n", (float)tval()); cloth_cache_set_frame(clmd, framenr); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index df5830f6a77..a6fcf7a9a5e 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -570,7 +570,7 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) { - unsigned int i = 0,j=0; + unsigned int i = 0; zero_lfvector(to, from[0].vcount); /* process diagonal elements */ for(i = 0; i < from[0].vcount; i++) @@ -579,7 +579,8 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (* } /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ -#pragma parallel for shared(to,from, fLongVector) private(i) + // TODO: pragma below is wrong, correct it! + // #pragma omp parallel for shared(to,from, fLongVector) private(i) for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); @@ -804,11 +805,13 @@ int implicit_free (ClothModifierData *clmd) return 1; } + DO_INLINE float fb(float length, float L) { float x = length/L; return (-11.541f*pow(x,4)+34.193f*pow(x,3)-39.083f*pow(x,2)+23.116f*x-9.713f); } + DO_INLINE float fbderiv(float length, float L) { float x = length/L; @@ -827,6 +830,7 @@ DO_INLINE float fbstar(float length, float L, float kb, float cb) else return tempfb; } + DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) { float tempfb = kb * fb(length, L); @@ -841,6 +845,7 @@ DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) return kb * fbderiv(length, L); } } + DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) { unsigned int i=0; @@ -850,6 +855,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) mul_fvector_fmatrix(V[S[i].r], V[S[i].r], S[i].m); } } + // block diagonalizer void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv, fmatrix3x3 *S, fmatrix3x3 *bigI) { @@ -874,6 +880,7 @@ void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv, fmatrix3x3 *S, } } + int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S) { // Solves for unknown X in equation AX=B @@ -1101,17 +1108,20 @@ DO_INLINE void dfdx_spring_type1(float to[3][3], float dir[3],float length,float mul_fmatrix_S(temp, k); add_fmatrix_fmatrix(to, temp, to); } + DO_INLINE void dfdx_spring_type2(float to[3][3], float dir[3],float length,float L,float k, float cb) { // return outerprod(dir,dir)*fbstar_jacobi(length, L, k, cb); mul_fvectorT_fvectorS(to, dir, dir, fbstar_jacobi(length, L, k, cb)); } + DO_INLINE void dfdv_damp(float to[3][3], float dir[3], float damping) { // derivative of force wrt velocity. // return outerprod(dir,dir) * damping; mul_fvectorT_fvectorS(to, dir, dir, damping); } + DO_INLINE void dfdx_spring(float to[3][3], float dir[3],float length,float L,float k) { // dir is unit length direction, rest is spring's restlength, k is spring constant. @@ -1122,6 +1132,7 @@ DO_INLINE void dfdx_spring(float to[3][3], float dir[3],float length,float L,fl sub_fmatrix_fmatrix(to, to, I); mul_fmatrix_S(to, -k); } + DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float vel[3],float rest,float damping) { // inner spring damping vel is the relative velocity of the endpoints. @@ -1132,7 +1143,7 @@ DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float } -DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) { float extent[3]; float length = 0; @@ -1142,25 +1153,28 @@ DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVect float L = s->restlen; float cb = clmd->sim_parms.structural; - float f[3] = {0,0,0}; + float nullf[3] = {0,0,0}; float stretch_force[3] = {0,0,0}; float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; - float dfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; - float dfdv[3][3]; - int needed = 0; + float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; + + VECCOPY(s->f, nullf); + cp_fmatrix(s->dfdx, nulldfdx); + cp_fmatrix(s->dfdv, nulldfdx); // calculate elonglation VECSUB(extent, X[s->kl], X[s->ij]); VECSUB(vel, V[s->kl], V[s->ij]); length = sqrt(INPR(extent, extent)); - + s->flags &= ~CSPRING_FLAG_NEEDED; if(length > ABS(ALMOST_ZERO)) { + /* if(length>L) { if((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) @@ -1170,7 +1184,7 @@ DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVect return; } } - + */ mul_fvector_S(dir, extent, 1.0f/length); } else @@ -1184,55 +1198,37 @@ DO_INLINE void calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVect { if(length > L) // only on elonglation { - needed++; + s->flags |= CSPRING_FLAG_NEEDED; k = clmd->sim_parms.structural; mul_fvector_S(stretch_force, dir, (k*(length-L))); - VECADD(f, f, stretch_force); + VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * ((INPR(vel,extent)/length))); - VECADD(f, f, damping_force); + VECADD(s->f, s->f, damping_force); - dfdx_spring_type1(dfdx, dir,length,L,k); + dfdx_spring_type1(s->dfdx, dir,length,L,k); - dfdv_damp(dfdv, dir,clmd->sim_parms.Cdis); - - sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, dfdv); - - sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, dfdv); - - add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, dfdv); - + dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis); } } else // calculate force of bending springs { if(length < L) { - k = clmd->sim_parms.bending; - - needed++; + s->flags |= CSPRING_FLAG_NEEDED; + + k = clmd->sim_parms.bending; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); - VECADD(f, f, bending_force); + VECADD(s->f, s->f, bending_force); - dfdx_spring_type2(dfdx, dir,length,L,k, cb); + dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); } } - - if(needed) - { - VECADD(lF[s->ij], lF[s->ij], f); - VECSUB(lF[s->kl], lF[s->kl], f); - - sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, dfdx); - sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, dfdx); - - add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, dfdx); - } } DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) @@ -1275,7 +1271,7 @@ DO_INLINE void calc_triangle_force(ClothModifierData *clmd, MFace mface, lfVecto } -void calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time) +void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time) { /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; @@ -1332,9 +1328,10 @@ void calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *l /* handle external forces like wind */ if(effectors) { - float wind[3] = {0,1.0f,0}; + float wind[3] = {0.0f,1.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; - + + #pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1348,17 +1345,55 @@ void calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *l VECADDS(lF[i], lF[i], wind_normalized, -calculateVertexWindForce(i, wind, vertexnormal)); } } - + /* calculate and apply spring forces */ +#pragma omp parallel private(i) + { +#pragma omp for nowait + for(i = 0; i < cloth->numsprings/2; i++) + { + // only handle active springs + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + // { + cloth_calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); + // } + } +#pragma omp for nowait + for(i = cloth->numsprings/2; i < cloth->numsprings; i++) + { + // only handle active springs + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + // { + cloth_calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); + // } + } +#pragma omp for nowait for(i = 0; i < cloth->numsprings; i++) { // only handle active springs - if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) { - calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); + ClothSpring *s = &springs[i]; + if(s->flags & CSPRING_FLAG_NEEDED) + { + if(s->type != BENDING) + { + sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); + sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); + } + + VECADD(lF[s->ij], lF[s->ij], s->f); + VECSUB(lF[s->kl], lF[s->kl], s->f); + + sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); + sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); + + add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); + } } } - + } } void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV) @@ -1375,12 +1410,20 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); + + itstart(); + cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ // cg_filtered_pre(dV, A, B, z, olddV, dt); + + itend(); + // printf("cg_filtered calc time: %f\n", (float)itval()); + cp_lfvector(olddV, dV, numverts); // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); + del_lfvector(dFdXmV); } @@ -1415,13 +1458,13 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV); add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); // collisions - itstart(); + // itstart(); // update verts to current positions for(i = 0; i < numverts; i++) @@ -1477,11 +1520,11 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase cp_lfvector(id->V, id->Vnew, numverts); // calculate - calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV); } - itend(); + // itend(); // printf("collision time: %f\n", (float)itval()); // V = Vnew; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index c756c29f467..c0a47452e3e 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -64,6 +64,9 @@ typedef struct ClothSpring { int matrix_index; /* needed for implicit */ int type; int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ + float dfdx[3][3]; + float dfdv[3][3]; + float f[3]; } ClothSpring; From 98e8486bafc3cb506bb9dead50e9ca9ddbbf857d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 18 Sep 2007 19:56:58 +0000 Subject: [PATCH 014/430] Fix: kicked springs caching since it's unused and needs lots of memory --- source/blender/blenkernel/intern/cloth.c | 16 ++++++++++------ source/blender/blenkernel/intern/implicit.c | 17 ++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 57975e56cc3..194aa06fc3b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -518,12 +518,13 @@ void cloth_cache_get_frame(ClothModifierData *clmd, float time) memcpy(cloth->verts, frame->verts, cloth->numverts*sizeof(ClothVertex)); implicit_set_positions(clmd); } - + /* if(frame->springs) { // copy ClothSpring struct memcpy(cloth->springs, frame->springs, cloth->numsprings*sizeof(ClothSpring)); } + */ } } } @@ -546,7 +547,10 @@ void cloth_cache_set_frame(ClothModifierData *clmd, float time) // creat new frame cache frame = (Frame *)MEM_callocN(sizeof(Frame), "cloth frame cache"); frame->verts = (ClothVertex *)MEM_callocN(sizeof(ClothVertex)*cloth->numverts, "cloth frame vertex cache"); + frame->springs = NULL; + /* frame->springs = (ClothSpring *)MEM_callocN(sizeof(ClothSpring)*cloth->numsprings, "cloth frame spring cache"); + */ frame->time = newtime; // copy ClothVertex struct @@ -554,13 +558,13 @@ void cloth_cache_set_frame(ClothModifierData *clmd, float time) { memcpy(&frame->verts[i], &cloth->verts[i], sizeof(ClothVertex)); } - + /* // copy ClothSpring struct for(i = 0; i < cloth->numsprings; i++) { memcpy(&frame->springs[i], &cloth->springs[i], sizeof(ClothSpring)); } - + */ } if(frame) { @@ -600,7 +604,7 @@ void cloth_cache_free(ClothModifierData *clmd, float time) && (frame->time > newtime)) // do not delete the first frame { MEM_freeN(frame->verts); - MEM_freeN(frame->springs); + // MEM_freeN(frame->springs); MEM_freeN(frame); MEM_freeN(search); last_search->next = next; @@ -608,7 +612,7 @@ void cloth_cache_free(ClothModifierData *clmd, float time) else if(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL) // free COMPLETE cache { MEM_freeN(frame->verts); - MEM_freeN(frame->springs); + // MEM_freeN(frame->springs); MEM_freeN(frame); } else @@ -770,7 +774,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors,0,0); tend(); - // printf("Cloth simulation time: %f\n", (float)tval()); + printf("Cloth simulation time: %f\n", (float)tval()); cloth_cache_set_frame(clmd, framenr); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index a6fcf7a9a5e..3b19839c77d 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -947,7 +947,7 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr return conjgrad_loopcountnumsprings/2; i++) { @@ -1367,7 +1367,8 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec cloth_calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); // } } -#pragma omp for nowait +} // pragma omp parallel + for(i = 0; i < cloth->numsprings; i++) { // only handle active springs @@ -1393,15 +1394,13 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec } } } - } } -void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV) +void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv) { unsigned int numverts = dFdV[0].vcount; lfVector *dFdXmV = create_lfvector(numverts); - initdiag_bfmatrix(A, I); zero_lfvector(dV, numverts); @@ -1414,7 +1413,7 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto itstart(); cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ - // cg_filtered_pre(dV, A, B, z, olddV, dt); + // cg_filtered_pre(dV, A, B, z, olddV, P, Pinv, dt); itend(); // printf("cg_filtered calc time: %f\n", (float)itval()); @@ -1459,7 +1458,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // calculate cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); @@ -1521,7 +1520,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // calculate cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); } // itend(); From 6e755b908951e85c03e15d1e836413ecac58f4bf Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 19 Sep 2007 08:07:47 +0000 Subject: [PATCH 015/430] Fixed wind force direction (reported by mfoxdogg) --- source/blender/blenkernel/intern/collision.c | 8 ++++---- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/kdop.c | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 13327c16006..c70bf461920 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -403,7 +403,7 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData VECCOPY(b[0], cloth2->verts[face2->v1].txold); VECCOPY(b[1], cloth2->verts[face2->v2].txold); VECCOPY(b[2], cloth2->verts[face2->v3].txold); -#pragma omp critical + distance = plNearestPoints(a,b,pa,pb,normal); quadA = quadB = 0; @@ -450,7 +450,7 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData VECCOPY(b[0], cloth2->verts[indexD].txold); VECCOPY(b[1], cloth2->verts[indexE].txold); VECCOPY(b[2], cloth2->verts[indexF].txold); -#pragma omp critical + tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); if(tempdistance < distance) @@ -531,7 +531,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE cloth = clmd->clothObject; cloth_bvh = (BVH *) cloth->tree; numverts = clmd->clothObject->numverts; - + //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// @@ -586,7 +586,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); result += collision_static(clmd, coll_clmd, collision_list); - + printf("result: %d\n", result); // calculate velocities // free temporary list diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 3b19839c77d..cfe17376797 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1342,7 +1342,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec Normalize(wind_normalized); calculateWeightedVertexNormal(clmd, mfaces, vertexnormal, i, lX); - VECADDS(lF[i], lF[i], wind_normalized, -calculateVertexWindForce(i, wind, vertexnormal)); + VECADDS(lF[i], lF[i], wind_normalized, calculateVertexWindForce(i, wind, vertexnormal)); } } diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 0d9fddf0211..0088ff92364 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -728,7 +728,7 @@ DO_INLINE int bvh_overlap(float *bv1, float *bv2) */ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response) { - int i = 0, j = 0, ret=0; + int i = 0, ret=0; /* // Shouldn't be possible @@ -750,7 +750,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * if(collision_response) collision_response (clmd, coll_clmd, tree1, tree2); - ret = 1; + return 1; } else { @@ -766,10 +766,10 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * else { // Process the quad tree. - for (j = 0; j < 4; j++) + for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [j] && bvh_traverse (clmd, coll_clmd, tree1->nodes[j], tree2, step, collision_response)) + if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) ret = 1; } } From 4c7c711b8a7fb14e15934fa300bfcef2f038c4f7 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 19 Sep 2007 12:13:16 +0000 Subject: [PATCH 016/430] Fixed collision object init, New: Apply collision impulses so minimum distance is preserved (friction still missing) --- source/blender/blenkernel/intern/cloth.c | 41 ++++----- source/blender/blenkernel/intern/collision.c | 92 +++++++++++++------- source/blender/blenkernel/intern/implicit.c | 1 + source/blender/src/buttons_object.c | 1 - 4 files changed, 84 insertions(+), 51 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 194aa06fc3b..635da0515cb 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -657,24 +657,28 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, Frame *frame = NULL; LinkNode *search = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; + // only be active during a specific period - if(current_time < clmd->sim_parms.firstframe) - return; - else if(current_time > clmd->sim_parms.lastframe) + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) { - int frametime = cloth_cache_last_frame(clmd); - if(cloth_cache_search_frame(clmd, frametime)) - { - cloth_cache_get_frame(clmd, frametime); - cloth_to_object (ob, clmd, vertexCos, numverts); - } - return; - } - else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed - { - if(!cloth_cache_search_frame(clmd, framenr)) + if(current_time < clmd->sim_parms.firstframe) return; + else if(current_time > clmd->sim_parms.lastframe) + { + int frametime = cloth_cache_last_frame(clmd); + if(cloth_cache_search_frame(clmd, frametime)) + { + cloth_cache_get_frame(clmd, frametime); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + return; + } + else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed + { + if(!cloth_cache_search_frame(clmd, framenr)) + return; + } } // unused in the moment @@ -693,8 +697,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ if (clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) - { - + { // save next position + time if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) { @@ -723,7 +726,8 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, VECCOPY (verts->x, vertexCos[i]); Mat4MulVecfl(ob->obmat, verts->x); - // Compute the vertices velocity. + // Compute the vertices "velocity". + // (no dt correction here because of float error) VECSUB (verts->v, verts->x, verts->xold); } @@ -762,9 +766,6 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, /* Get the current position. */ VECCOPY (verts->xconst, vertexCos[i]); Mat4MulVecfl(ob->obmat, verts->xconst); - - /* Compute the vertices velocity. */ - VECSUB (verts->v, verts->xconst, verts->xold); } tstart(); diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index c70bf461920..32a2f820894 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -216,18 +216,18 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa VECADDMUL(to, v3, w3); } + DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, double frictionConstant, double delta_V_n) { float vrel_t_pre[3]; float vrel_t[3]; VECSUBS(vrel_t_pre, vrel, normal, normalVelocity); - VECCOPY(vrel_t, vrel_t_pre); - VecMulf(vrel_t, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); - VECSUB(to, vrel_t_pre, vrel_t); - VecMulf(to, 1.0f / 2.0f); + VECCOPY(to, vrel_t_pre); + VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } + int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) { unsigned int i = 0, numverts=0; @@ -271,6 +271,7 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link face2 = &(cloth2->mfaces[collpair->face2]); // compute barycentric coordinates for both collision points + if(!collpair->quadA) bvh_compute_barycentric(collpair->p1, cloth1->verts[face1->v1].txold, @@ -297,16 +298,17 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link cloth2->verts[face2->v3].txold, &u1, &u2, &u3); - // Calculate relative velocity. + // Calculate relative "velocity". + if(!collpair->quadA) - interpolateOnTriangle(v1, cloth1->verts[face1->v1].v, cloth1->verts[face1->v2].v, cloth1->verts[face1->v3].v, w1, w2, w3); + interpolateOnTriangle(v1, cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv, cloth1->verts[face1->v3].tv, w1, w2, w3); else - interpolateOnTriangle(v1, cloth1->verts[face1->v4].v, cloth1->verts[face1->v1].v, cloth1->verts[face1->v3].v, w1, w2, w3); + interpolateOnTriangle(v1, cloth1->verts[face1->v4].tv, cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv, w1, w2, w3); if(!collpair->quadB) - interpolateOnTriangle(v2, cloth2->verts[face2->v1].v, cloth2->verts[face2->v2].v, cloth2->verts[face2->v3].v, u1, u2, u3); + interpolateOnTriangle(v2, cloth2->verts[face2->v1].tv, cloth2->verts[face2->v2].tv, cloth2->verts[face2->v3].tv, u1, u2, u3); else - interpolateOnTriangle(v2, cloth2->verts[face2->v4].v, cloth2->verts[face2->v1].v, cloth2->verts[face2->v3].v, u1, u2, u3); + interpolateOnTriangle(v2, cloth2->verts[face2->v4].tv, cloth2->verts[face2->v1].tv, cloth2->verts[face2->v3].tv, u1, u2, u3); VECSUB(relativeVelocity, v1, v2); @@ -323,18 +325,22 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // Calculate Impulse magnitude to stop all motion in normal direction. // const double I_mag = v_n_mag / (1/m1 + 1/m2); float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent; + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3], impulse; + float epsilon = clmd->coll_parms.epsilon; - calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); - magtangent = INPR(tangential, tangential); + // magtangent = INPR(tangential, tangential); // Apply friction impulse. if (magtangent > ALMOST_ZERO) { - /* - printf("friction applied: %f\n", magtangent); + + // printf("friction applied: %f\n", magtangent); // TODO check original code + /* VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); @@ -345,26 +351,52 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case // Apply the impulse and increase impulse counters. - /* - VECADDMUL(cloth1->verts[face1->v1].tv,collpair->normal, -magnitude_i); - VECADDMUL(cloth1->verts[face1->v2].tv,collpair->normal, -magnitude_i); - VECADDMUL(cloth1->verts[face1->v3].tv,collpair->normal, -magnitude_i); - VECADDMUL(cloth1->verts[face1->v4].tv,collpair->normal, -magnitude_i); - */ + // my try, works better than the papers ones (maybe i did just something wrong) + VECSUB(collvel, cloth1->verts[face1->v1].tv, v2); + magnormal = INPR(collvel, collpair->normal); + if(magnormalverts[face1->v1].tv, collpair->normal); - VECADDMUL(cloth1->verts[face1->v1].tv, collpair->normal, -magtangent); + impulse = (epsilon + ALMOST_ZERO-collpair->distance) / 4.0f; + VECADDMUL(cloth1->verts[face1->v1].tv, collpair->normal, -magnormal + impulse); - magtangent = INPR(cloth1->verts[face1->v2].tv, collpair->normal); - VECADDMUL(cloth1->verts[face1->v2].tv, collpair->normal, -magtangent); + // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); - magtangent = INPR(cloth1->verts[face1->v3].tv, collpair->normal); - VECADDMUL(cloth1->verts[face1->v3].tv, collpair->normal, -magtangent); +/* + VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); + // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); + magtangent = Normalize(vrel_t_pre); + VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); - magtangent = INPR(cloth1->verts[face1->v4].tv, collpair->normal); - VECADDMUL(cloth1->verts[face1->v4].tv, collpair->normal, -magtangent); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); +*/ + VECSUB(collvel, cloth1->verts[face1->v2].tv, v2); + magnormal = INPR(collvel, collpair->normal); + if(magnormaldistance) / 4.0f; + VECADDMUL(cloth1->verts[face1->v2].tv, collpair->normal, -magnormal+ impulse); + + + VECSUB(collvel, cloth1->verts[face1->v3].tv, v2); + magnormal = INPR(collvel, collpair->normal); + if(magnormaldistance) / 4.0f; + VECADDMUL(cloth1->verts[face1->v3].tv, collpair->normal, -magnormal+ impulse); + + + VECSUB(collvel, cloth1->verts[face1->v4].tv, v2); + magnormal = INPR(collvel, collpair->normal); + if(magnormaldistance) / 4.0f; + VECADDMUL(cloth1->verts[face1->v4].tv, collpair->normal, -magnormal+ impulse); + result = 1; } @@ -586,7 +618,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); result += collision_static(clmd, coll_clmd, collision_list); - printf("result: %d\n", result); + // calculate velocities // free temporary list diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index cfe17376797..c54897cc89c 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1484,6 +1484,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase VECCOPY(verts[i].tx, id->Xnew[i]); VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); + VECSUB(verts[i].v, verts[i].tx, verts[i].txold); } // call collision function diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 2106525e9b2..1e3439d41b5 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3103,7 +3103,6 @@ static void object_panel_cloth(Object *ob) if(clmd) { but = uiDefButBitI(block, TOG, CSIMSETT_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - // uiButSetFunc(but, object_cloth__enabletoggle, ob, NULL); if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) { From 5b9140a2093852f58e9d2de8fcc5c0db6b98ea3c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 21 Sep 2007 13:34:19 +0000 Subject: [PATCH 017/430] Fixed some collision response issues. (weekend commit, some half done work in) --- .../BulletDynamics/Dynamics/Bullet-C-Api.cpp | 5 +- source/blender/blenkernel/BKE_cloth.h | 3 +- source/blender/blenkernel/intern/cloth.c | 121 +++-- source/blender/blenkernel/intern/collision.c | 500 ++++++++++-------- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/modifier.c | 7 +- source/blender/makesdna/DNA_cloth_types.h | 22 +- source/blender/src/buttons_object.c | 7 +- 8 files changed, 388 insertions(+), 279 deletions(-) diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp index 2ae30e851dc..1b843774609 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp @@ -41,11 +41,10 @@ double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float static btGjkEpaPenetrationDepthSolver Solver0; static btMinkowskiPenetrationDepthSolver Solver1; - + btConvexPenetrationDepthSolver* Solver = NULL; - Solver = &Solver1; - + Solver = &Solver0; btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index b9861049fb4..e4d1fb0ca99 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -60,7 +60,7 @@ struct DerivedMesh; /* This is approximately the smallest number that can be * represented by a float, given its precision. */ -#define ALMOST_ZERO 0.0000001 +#define ALMOST_ZERO 0.00001 /* Bits to or into the ClothVertex.flags. */ #define CVERT_FLAG_PINNED 1 @@ -91,6 +91,7 @@ typedef enum CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled + CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled } CSIMSETT_FLAGS; /* Spring types as defined in the paper.*/ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 635da0515cb..7059c59c65b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -153,7 +153,7 @@ void cloth_init (ClothModifierData *clmd) clmd->sim_parms.mass = 1.0f; clmd->sim_parms.stepsPerFrame = 5; clmd->sim_parms.sim_time = 1.0; - clmd->sim_parms.flags = CSIMSETT_FLAG_RESET; + clmd->sim_parms.flags = CSIMSETT_FLAG_RESET | CSIMSETT_FLAG_CCACHE_PROTECT; clmd->sim_parms.solver_type = 0; clmd->sim_parms.preroll = 0; clmd->sim_parms.maxspringlen = 10; @@ -576,6 +576,7 @@ void cloth_cache_set_frame(ClothModifierData *clmd, float time) } } +// free cloth cache void cloth_cache_free(ClothModifierData *clmd, float time) { Frame *frame = NULL; @@ -659,7 +660,8 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float deltaTime = current_time - clmd->sim_parms.sim_time; - // only be active during a specific period + // only be active during a specific period: + // that's "first frame" and "last frame" on GUI if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) { if(current_time < clmd->sim_parms.firstframe) @@ -681,7 +683,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } } - // unused in the moment + // unused in the moment, calculated seperately in implicit.c clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; clmd->sim_parms.sim_time = current_time; @@ -812,46 +814,49 @@ void cloth_free_modifier (ClothModifierData *clmd) return; cloth = clmd->clothObject; - - // free our frame cache - clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; - cloth_cache_free(clmd, 0); - - if (cloth) - { - // If our solver provides a free function, call it - if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) - { - solvers [cloth->old_solver_type].free (clmd); - } - - // Free the verts. - if (cloth->verts != NULL) - MEM_freeN (cloth->verts); - - cloth->verts = NULL; - cloth->numverts = -1; - - // Free the springs. - if (cloth->springs != NULL) - MEM_freeN (cloth->springs); - - cloth->springs = NULL; - cloth->numsprings = -1; - - // free BVH collision tree - if(cloth->tree) - bvh_free((BVH *)cloth->tree); - - // we save our faces for collision objects - if(cloth->mfaces) - MEM_freeN(cloth->mfaces); - if(clmd->clothObject->facemarks) - MEM_freeN(clmd->clothObject->facemarks); + if(!(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_PROTECT)) + { + // free our frame cache + clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; + cloth_cache_free(clmd, 0); + + if (cloth) + { + // If our solver provides a free function, call it + if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) + { + solvers [cloth->old_solver_type].free (clmd); + } + + // Free the verts. + if (cloth->verts != NULL) + MEM_freeN (cloth->verts); + + cloth->verts = NULL; + cloth->numverts = -1; + + // Free the springs. + if (cloth->springs != NULL) + MEM_freeN (cloth->springs); + + cloth->springs = NULL; + cloth->numsprings = -1; + + // free BVH collision tree + if(cloth->tree) + bvh_free((BVH *)cloth->tree); + + // we save our faces for collision objects + if(cloth->mfaces) + MEM_freeN(cloth->mfaces); - MEM_freeN (cloth); - clmd->clothObject = NULL; + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + + MEM_freeN (cloth); + clmd->clothObject = NULL; + } } } @@ -952,6 +957,7 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh unsigned int i; MVert *mvert = NULL; ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; /* If we have a clothObject, free it. */ if (clmd->clothObject != NULL) @@ -993,7 +999,9 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh VECCOPY(verts->xold, verts->x); VECCOPY(verts->txold, verts->x); VECCOPY(verts->tx, verts->x); - VecMulf(verts->v, 0.0f); + VecMulf(verts->v, 0.0f); + verts->impulse_count = 0; + VECCOPY(verts->impulse, tnull); } clmd->clothObject->tree = bvh_build(clmd,clmd->coll_parms.epsilon); @@ -1159,6 +1167,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // dm->getNumVerts(dm); MVert *mvert = NULL; // CDDM_get_verts(dm); ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; /* If we have a clothObject, free it. */ if (clmd->clothObject != NULL) @@ -1220,6 +1229,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY(verts->xconst, verts->x); VECCOPY(verts->txold, verts->x); VecMulf(verts->v, 0.0f); + + verts->impulse_count = 0; + VECCOPY(verts->impulse, tnull); } /* apply / set vertex groups */ @@ -1363,17 +1375,20 @@ int cloth_build_springs(Cloth *cloth, DerivedMesh *dm) shear_springs++; temp_index++; - - springs[temp_index].ij = mface[i].v2; - springs[temp_index].kl = mface[i].v4; - VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); - springs[temp_index].restlen = sqrt(INPR(temp, temp)); - springs[temp_index].type = SHEAR; - - BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); - BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); - - shear_springs++; + + if(mface[i].v4) + { + springs[temp_index].ij = mface[i].v2; + springs[temp_index].kl = mface[i].v4; + VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); + springs[temp_index].restlen = sqrt(INPR(temp, temp)); + springs[temp_index].type = SHEAR; + + BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); + BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); + + shear_springs++; + } } // bending springs diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 32a2f820894..8c6a17c4e42 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -186,15 +186,15 @@ void generateTriangleMarks() */ } - +// w3 is not perfect void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], double *w1, double *w2, double *w3) { - float tempV1[3], tempV2[3], tempV4[3]; - double a,b,c,e,f; + double tempV1[3], tempV2[3], tempV4[3]; + double a,b,c,d,e,f; - VECSUB (tempV1, p1, p3); /* x1 - x3 */ - VECSUB (tempV2, p2, p3); /* x2 - x3 */ - VECSUB (tempV4, pv, p3); /* pv - x3 */ + VECSUB (tempV1, p1, p3); + VECSUB (tempV2, p2, p3); + VECSUB (tempV4, pv, p3); a = INPR (tempV1, tempV1); b = INPR (tempV1, tempV2); @@ -202,10 +202,24 @@ void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3] e = INPR (tempV1, tempV4); f = INPR (tempV2, tempV4); + d = (a * c - b * b); + + if (ABS(d) < ALMOST_ZERO) { + *w1 = *w2 = *w3 = 1.0f / 3.0f; + return; + } + + w1[0] = (e * c - b * f) / d; + + if(w1[0] < 0) + w1[0] = 0.0; - w1[0] = (e * c - b * f) / (a * c - b * b); w2[0] = (f - b * w1[0]) / c; - w3[0] = 1.0 - w1[0] - w2[0]; + + if(w2[0] < 0) + w2[0] = 0.0; + + w3[0] = 1.0f - w1[0] - w2[0]; } DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], float v3[3], double w1, double w2, double w3) @@ -230,36 +244,22 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) { - unsigned int i = 0, numverts=0; + unsigned int i = 0, numfaces = 0; int result = 0; LinkNode *search = NULL; CollPair *collpair = NULL; Cloth *cloth1, *cloth2; MFace *face1, *face2; - double w1, w2, w3, u1, u2, u3; + double w1, w2, w3, u1, u2, u3, a1, a2, a3; float v1[3], v2[3], relativeVelocity[3]; float magrelVel; cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; - numverts = clmd->clothObject->numverts; - - /* - for(i = 0; i < LIST_LENGTH; i++) - { - // calc SIP-code - // TODO for later: calculateSipCode() - - // calc distance (?) + numfaces = clmd->clothObject->numfaces; - // calc impulse - - // apply impulse - } - */ - - for(i = 0; i < numverts; i++) + for(i = 0; i < numfaces; i++) { search = collision_list[i]; @@ -273,11 +273,13 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // compute barycentric coordinates for both collision points if(!collpair->quadA) + { bvh_compute_barycentric(collpair->p1, cloth1->verts[face1->v1].txold, cloth1->verts[face1->v2].txold, cloth1->verts[face1->v3].txold, &w1, &w2, &w3); + } else bvh_compute_barycentric(collpair->p1, cloth1->verts[face1->v4].txold, @@ -317,25 +319,26 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // Calculate masses of points. - // printf("relativeVelocity -> x: %f, y: %f, z: %f\n", relativeVelocity[0], relativeVelocity[1],relativeVelocity[2]); - // If v_n_mag > 0 the edges are approaching each other. - if(magrelVel > ALMOST_ZERO) + + if(magrelVel < -ALMOST_ZERO) { // Calculate Impulse magnitude to stop all motion in normal direction. // const double I_mag = v_n_mag / (1/m1 + 1/m2); float magnitude_i = magrelVel / 2.0f; // TODO implement masses float tangential[3], magtangent, magnormal, collvel[3]; float vrel_t_pre[3]; - float vrel_t[3], impulse; + float vrel_t[3]; + double impulse; float epsilon = clmd->coll_parms.epsilon; + float overlap = (epsilon + ALMOST_ZERO-collpair->distance); // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); // magtangent = INPR(tangential, tangential); // Apply friction impulse. - if (magtangent > ALMOST_ZERO) + if (magtangent < ALMOST_ZERO) { // printf("friction applied: %f\n", magtangent); @@ -347,57 +350,64 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); */ } + + impulse = -magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); + cloth1->verts[face1->v1].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); + cloth1->verts[face1->v2].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); + cloth1->verts[face1->v3].impulse_count++; + + if(face1->v4) + { + VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); + cloth1->verts[face1->v4].impulse_count++; + } + + + if (overlap > ALMOST_ZERO) { + double I_mag = overlap * 0.1; + + impulse = I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); + cloth1->verts[face1->v1].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); + cloth1->verts[face1->v2].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); + cloth1->verts[face1->v3].impulse_count++; + + if(face1->v4) + { + VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); + cloth1->verts[face1->v4].impulse_count++; + } + + } + + result = 1; + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case // Apply the impulse and increase impulse counters. - // my try, works better than the papers ones (maybe i did just something wrong) - VECSUB(collvel, cloth1->verts[face1->v1].tv, v2); - magnormal = INPR(collvel, collpair->normal); - if(magnormaldistance) / 4.0f; - VECADDMUL(cloth1->verts[face1->v1].tv, collpair->normal, -magnormal + impulse); - + + /* // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); - -/* VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); magtangent = Normalize(vrel_t_pre); VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); -*/ - - VECSUB(collvel, cloth1->verts[face1->v2].tv, v2); - magnormal = INPR(collvel, collpair->normal); - if(magnormaldistance) / 4.0f; - VECADDMUL(cloth1->verts[face1->v2].tv, collpair->normal, -magnormal+ impulse); + */ - VECSUB(collvel, cloth1->verts[face1->v3].tv, v2); - magnormal = INPR(collvel, collpair->normal); - if(magnormaldistance) / 4.0f; - VECADDMUL(cloth1->verts[face1->v3].tv, collpair->normal, -magnormal+ impulse); - - - VECSUB(collvel, cloth1->verts[face1->v4].tv, v2); - magnormal = INPR(collvel, collpair->normal); - if(magnormaldistance) / 4.0f; - VECADDMUL(cloth1->verts[face1->v4].tv, collpair->normal, -magnormal+ impulse); - - result = 1; } @@ -444,65 +454,86 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData { if(i == 0) { - indexA = face1->v4; - indexB = face1->v1; - indexC = face1->v3; - - indexD = face2->v1; - indexE = face2->v2; - indexF = face2->v3; - } - else if(i == 1) - { - indexA = face1->v4; - indexB = face1->v1; - indexC = face1->v3; - - indexD = face2->v4; - indexE = face2->v1; - indexF = face2->v3; - } - else if(i == 2) - { - indexA = face1->v1; - indexB = face1->v2; - indexC = face1->v3; - - indexD = face2->v4; - indexE = face2->v1; - indexF = face2->v3; - } - - // face a2 + face b1 - VECCOPY(a[0], cloth1->verts[indexA].txold); - VECCOPY(a[1], cloth1->verts[indexB].txold); - VECCOPY(a[2], cloth1->verts[indexC].txold); - - - VECCOPY(b[0], cloth2->verts[indexD].txold); - VECCOPY(b[1], cloth2->verts[indexE].txold); - VECCOPY(b[2], cloth2->verts[indexF].txold); - - tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); - - if(tempdistance < distance) - { - VECCOPY(pa, tpa); - VECCOPY(pb, tpb); - VECCOPY(normal, tnormal); - distance = tempdistance; - - if(i == 0) + if(face1->v4) { - quadA = 1; quadB = 0; + indexA = face1->v4; + indexB = face1->v1; + indexC = face1->v3; + + indexD = face2->v1; + indexE = face2->v2; + indexF = face2->v3; } - else if(i == 1) + else + i+=2; + } + + if(i == 1) + { + if((face1->v4)&&(face2->v4)) { - quadA = quadB = 1; + indexA = face1->v4; + indexB = face1->v1; + indexC = face1->v3; + + indexD = face2->v4; + indexE = face2->v1; + indexF = face2->v3; } - else if(i == 2) + else + i++; + } + + if(i == 2) + { + if(face2->v4) { - quadA = 0; quadB = 1; + indexA = face1->v1; + indexB = face1->v2; + indexC = face1->v3; + + indexD = face2->v4; + indexE = face2->v1; + indexF = face2->v3; + } + else + i++; + + } + + if(i<3) + { + // face a2 + face b1 + VECCOPY(a[0], cloth1->verts[indexA].txold); + VECCOPY(a[1], cloth1->verts[indexB].txold); + VECCOPY(a[2], cloth1->verts[indexC].txold); + + + VECCOPY(b[0], cloth2->verts[indexD].txold); + VECCOPY(b[1], cloth2->verts[indexE].txold); + VECCOPY(b[2], cloth2->verts[indexF].txold); + + tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); + + if(tempdistance < distance) + { + VECCOPY(pa, tpa); + VECCOPY(pb, tpb); + VECCOPY(normal, tnormal); + distance = tempdistance; + + if(i == 0) + { + quadA = 1; quadB = 0; + } + else if(i == 1) + { + quadA = quadB = 1; + } + else if(i == 2) + { + quadA = 0; quadB = 1; + } } } } @@ -524,20 +555,18 @@ void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clm // calc distance + normal distance = implicit_tri_check_coherence(clmd, coll_clmd, tree1->tri_index, tree2->tri_index, collpair->p1, collpair->p2, collpair->vector, collpair->quadA, collpair->quadB); - if (ABS(distance) <= (epsilon + ALMOST_ZERO)) + if ((distance <= (epsilon + ALMOST_ZERO)) && (distance > -1.0f)) // max overlap = 1.0 { - // printf("distance: %f, epsilon: %f\n", (float)distance, epsilon + ALMOST_ZERO); - + // printf("dist: %f\n", (float)distance); + collpair->face1 = tree1->tri_index; collpair->face2 = tree2->tri_index; VECCOPY(collpair->normal, collpair->vector); Normalize(collpair->normal); - // printf("normal x: %f, y: %f, z: %f\n", collpair->normal[0], collpair->normal[1], collpair->normal[2]); - collpair->distance = distance; - BLI_linklist_append(&linknode[tree1->tri_index], collpair); + BLI_linklist_append(&linknode[tree1->tri_index], collpair); } else { @@ -545,32 +574,14 @@ void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clm } } - -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt) +// move collision objects forward in time and update static bounding boxes +void cloth_update_collision_objects(float step) { Base *base=NULL; ClothModifierData *coll_clmd=NULL; - Cloth *cloth=NULL; Object *coll_ob=NULL; - BVH *cloth_bvh=NULL; - unsigned int i=0, numverts=0; - int result = 0; - - if ((clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) - { - return 0; - } - cloth = clmd->clothObject; - cloth_bvh = (BVH *) cloth->tree; - numverts = clmd->clothObject->numverts; + unsigned int i=0; - //////////////////////////////////////////////////////////// - // static collisions - //////////////////////////////////////////////////////////// - - // update cloth bvh - bvh_update_static(clmd, cloth_bvh); - // search all objects for collision object for (base = G.scene->base.first; base; base = base->next) { @@ -584,73 +595,150 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - unsigned int coll_numverts = coll_clmd->clothObject->numverts; + { Cloth *coll_cloth = coll_clmd->clothObject; - - LinkNode **collision_list = MEM_callocN (sizeof(LinkNode *)*numverts, "collision_list"); BVH *coll_bvh = coll_clmd->clothObject->tree; + unsigned int coll_numverts = coll_cloth->numverts; - if(collision_list) - { - // memset(collision_list, 0, sizeof(LinkNode *)*numverts); + // update position of collision object + for(i = 0; i < coll_numverts; i++) + { + VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); + + VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); - for(i = 0; i < numverts; i++) - { - collision_list[i] = NULL; - } - - clmd->coll_parms.temp = collision_list; - - // update position of collision object - for(i = 0; i < coll_numverts; i++) - { - VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); - - VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); - - VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); - } - - // update BVH of collision object - bvh_update_static(coll_clmd, coll_bvh); - - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); - - result += collision_static(clmd, coll_clmd, collision_list); - - // calculate velocities - - // free temporary list - for(i = 0; i < numverts; i++) - { - LinkNode *search = collision_list[i]; - while(search) - { - LinkNode *next= search->next; - CollPair *collpair = search->link; - - if(collpair) - MEM_freeN(collpair); - - search = next; - } - - BLI_linklist_free(collision_list[i],NULL); - } - if(collision_list) - MEM_freeN(collision_list); - - clmd->coll_parms.temp = NULL; + // no dt here because of float rounding errors + VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); } - - + + // update BVH of collision object + bvh_update_static(coll_clmd, coll_bvh); } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } +} +#define CLOTH_MAX_THRESHOLD 5 + +// cloth - object collisions +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt) +{ + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Cloth *cloth=NULL; + Object *coll_ob=NULL; + BVH *cloth_bvh=NULL; + unsigned int i=0, numfaces = 0, numverts = 0; + unsigned int result = 0, ic = 0, rounds = 0; + ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; + + if ((clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + { + return 0; + } + cloth = clmd->clothObject; + verts = cloth->verts; + cloth_bvh = (BVH *) cloth->tree; + numfaces = clmd->clothObject->numfaces; + numverts = clmd->clothObject->numverts; + + //////////////////////////////////////////////////////////// + // static collisions + //////////////////////////////////////////////////////////// + + // update cloth bvh + bvh_update_static(clmd, cloth_bvh); + + // update collision objects + cloth_update_collision_objects(step); + + do + { + result = 0; + ic = 0; + + // handle all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + LinkNode **collision_list = MEM_callocN (sizeof(LinkNode *)*(numfaces), "collision_list"); + BVH *coll_bvh = coll_clmd->clothObject->tree; + + if(collision_list) + { + memset(collision_list, 0, sizeof(LinkNode *)*numfaces); + clmd->coll_parms.temp = collision_list; + + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); + + result += collision_static(clmd, coll_clmd, collision_list); + + // calculate velocities + + // free temporary list + for(i = 0; i < numfaces; i++) + { + LinkNode *search = collision_list[i]; + while(search) + { + LinkNode *next= search->next; + CollPair *collpair = search->link; + + if(collpair) + MEM_freeN(collpair); + + search = next; + } + + BLI_linklist_free(collision_list[i],NULL); + } + if(collision_list) + MEM_freeN(collision_list); + + clmd->coll_parms.temp = NULL; + } + + + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // now apply impulses parallel + + for(i = 0; i < numverts; i++) + { + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + } + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (CLOTH_MAX_THRESHOLD>rounds)); + + printf("\n"); + //////////////////////////////////////////////////////////// // update positions + velocities //////////////////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index c54897cc89c..0d0c7ff0f7b 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1484,7 +1484,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase VECCOPY(verts[i].tx, id->Xnew[i]); VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); - VECSUB(verts[i].v, verts[i].tx, verts[i].txold); + VECCOPY(verts[i].v, verts[i].tv); } // call collision function diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 546247f8e35..5ba3df9a720 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4941,9 +4941,12 @@ static int clothModifier_dependsOnTime(ModifierData *md) static void clothModifier_freeData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; - + if (clmd) - cloth_free_modifier (clmd); + { + clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_PROTECT; + cloth_free_modifier (clmd); + } } /* Boolean */ diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index c0a47452e3e..574537f2589 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -41,16 +41,18 @@ * is reached. */ typedef struct ClothVertex { - int flags; /* General flags per vertex. */ - float v [3]; /* The velocity of the point. */ - float xconst [3]; /* constrained position */ - float x [3]; /* The current position of this vertice. */ - float xold [3]; /* The previous position of this vertice. */ - float tx [3]; - float txold [3]; - float tv[3]; - float mass; /* mass / weight of the vertex */ - float goal; /* goal, from SB */ + int flags; /* General flags per vertex. */ + float v [3]; /* The velocity of the point. */ + float xconst [3]; /* constrained position */ + float x [3]; /* The current position of this vertex. */ + float xold [3]; /* The previous position of this vertex.*/ + float tx [3]; /* temporary position */ + float txold [3]; /* temporary old position */ + float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ + float mass; /* mass / weight of the vertex */ + float goal; /* goal, from SB */ + float impulse[3]; /* used in collision.c */ + unsigned int impulse_count; /* same as above */ } ClothVertex; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 1e3439d41b5..a10ffa09442 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3118,8 +3118,8 @@ static void object_panel_cloth(Object *ob) /* GENERAL STUFF */ uiClearButLock(); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 5000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 1000.0, 1000, 0, "Wrinkle possibility"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); uiDefButI(block, NUM, B_CLOTH_RENEW, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); @@ -3249,12 +3249,13 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); if(length>1) // B_CLOTH_CHANGEPREROLL - uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); } else { uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); } + uiDefButBitI(block, TOG, CSIMSETT_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); uiBlockEndAlign(block); } } From b4fb141ea571ee9c9edefa277eb6f034d54d26d2 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 23 Sep 2007 17:40:44 +0000 Subject: [PATCH 018/430] In the middle of switching to own collision detection, WIP commit (don't expect anything to work, but compile) --- source/blender/blenkernel/BKE_cloth.h | 4 +- source/blender/blenkernel/intern/cloth.c | 2 +- source/blender/blenkernel/intern/collision.c | 351 +++++++++++++++++-- 3 files changed, 323 insertions(+), 34 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index e4d1fb0ca99..ec58382b86a 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -60,7 +60,7 @@ struct DerivedMesh; /* This is approximately the smallest number that can be * represented by a float, given its precision. */ -#define ALMOST_ZERO 0.00001 +#define ALMOST_ZERO 0.000001 /* Bits to or into the ClothVertex.flags. */ #define CVERT_FLAG_PINNED 1 @@ -240,7 +240,7 @@ typedef struct CollPair float p1[3], p2[3]; // collision point p1 on face1, p2 on face2 int lastsign; // indicates if the distance sign has changed, unused itm float time; // collision time, from 0 up to 1 - int quadA, quadB; // indicates the used triangle of the quad: 0 means verts 1,2,3; 1 means verts 4,1,3 + unsigned int Aindex1, Aindex2, Aindex3, Aindex4, Bindex1, Bindex2, Bindex3, Bindex4; } CollPair; diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 7059c59c65b..d9f0bef9f43 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -153,7 +153,7 @@ void cloth_init (ClothModifierData *clmd) clmd->sim_parms.mass = 1.0f; clmd->sim_parms.stepsPerFrame = 5; clmd->sim_parms.sim_time = 1.0; - clmd->sim_parms.flags = CSIMSETT_FLAG_RESET | CSIMSETT_FLAG_CCACHE_PROTECT; + clmd->sim_parms.flags = CSIMSETT_FLAG_RESET; clmd->sim_parms.solver_type = 0; clmd->sim_parms.preroll = 0; clmd->sim_parms.maxspringlen = 10; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 8c6a17c4e42..7eec315e386 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -211,14 +211,8 @@ void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3] w1[0] = (e * c - b * f) / d; - if(w1[0] < 0) - w1[0] = 0.0; - w2[0] = (f - b * w1[0]) / c; - if(w2[0] < 0) - w2[0] = 0.0; - w3[0] = 1.0f - w1[0] - w2[0]; } @@ -241,7 +235,7 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } - +/* int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) { unsigned int i = 0, numfaces = 0; @@ -343,12 +337,12 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // printf("friction applied: %f\n", magtangent); // TODO check original code - /* + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); - */ + } impulse = -magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); @@ -397,7 +391,7 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link // Apply the impulse and increase impulse counters. - /* + / // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); @@ -405,7 +399,7 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); - */ + @@ -417,7 +411,8 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Link return result; } - +*/ + // return distance between two triangles using bullet engine double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData *coll_clmd, unsigned int tri_index1, unsigned int tri_index2, float pa[3], float pb[3], float normal[3], int quadA, int quadB) { @@ -540,37 +535,331 @@ double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData return distance; } +// calculate plane normal +void calcPlaneNormal(float normal[3], float p11[3], float p12[3], float p13[3]) +{ + float temp1[3], temp2[3]; + float tnormal[3]; + + VECSUB(temp1, p12,p11); + VECSUB(temp2, p13,p11); + Crossf(normal, temp1, temp2); + Normalize(normal); + // VECCOPY(normal, tnormal); +} + +float distance_triangle_point( float p11[3], float p12[3], float p13[3], float p21[3], float normal[3]) +{ + float temp[3]; + float magnitude = 0; + + VECSUB(temp, p21, p13); + magnitude = INPR(temp, normal); + + if(magnitude < 0) + { + magnitude *= -1.0f; + // VecMulf(normal, -1.0f); + } + + return magnitude; +} + +float nearest_point_triangle_triangle(float p11[3], float p12[3], float p13[3], float p21[3], float p22[3], float p23[3], float normal[3]) +{ + float distance = 0, tdistance = 0, tnormal[3]; + + // first triangle 1-2-3 versus second triangle 1-2-3 + calcPlaneNormal(normal, p11, p12, p13); + distance = distance_triangle_point(p11, p12, p13, p21, normal); + + tdistance = distance_triangle_point(p11, p12, p13, p22, normal); + + if(tdistance < distance) + { + distance = tdistance; + } + + tdistance = distance_triangle_point(p11, p12, p13, p23, normal); + + if(tdistance < distance) + { + distance = tdistance; + } + + // second triangle 1-2-3 versus first triangle 1-2-3 + calcPlaneNormal(tnormal, p21, p22, p23); + + tdistance = distance_triangle_point(p21, p22, p23, p11, tnormal); + + if(tdistance < distance) + { + distance = tdistance; + VECCOPY(normal, tnormal); + } + + tdistance = distance_triangle_point(p21, p22, p23, p12, tnormal); + + if(tdistance < distance) + { + distance = tdistance; + VECCOPY(normal, tnormal); + } + + tdistance = distance_triangle_point(p21, p22, p23, p13, tnormal); + + if(tdistance < distance) + { + distance = tdistance; + VECCOPY(normal, tnormal); + } + + + if (distance < 0) { + VecMulf(normal, -1.0f); + distance = -distance; + } + + return distance; +} + + +int collision_static2(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) +{ + unsigned int i = 0, numfaces = 0; + int result = 0; + LinkNode *search = NULL; + CollPair *collpair = NULL; + Cloth *cloth1, *cloth2; + MFace *face1, *face2; + double w1, w2, w3, u1, u2, u3, a1, a2, a3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + numfaces = clmd->clothObject->numfaces; + + for(i = 0; i < numfaces; i++) + { + search = collision_list[i]; + + while(search) + { + collpair = search->link; + + face1 = &(cloth1->mfaces[collpair->face1]); + face2 = &(cloth2->mfaces[collpair->face2]); + + // compute barycentric coordinates for both collision points + + + bvh_compute_barycentric(collpair->p1, + cloth1->verts[collpair->Aindex1].txold, + cloth1->verts[collpair->Aindex2].txold, + cloth1->verts[collpair->Aindex3].txold, + &w1, &w2, &w3); + + bvh_compute_barycentric(collpair->p2, + cloth2->verts[collpair->Bindex1].txold, + cloth2->verts[collpair->Bindex1].txold, + cloth2->verts[collpair->Bindex3].txold, + &u1, &u2, &u3); + + // Calculate relative "velocity". + interpolateOnTriangle(v1, cloth1->verts[collpair->Aindex1].tv, cloth1->verts[collpair->Aindex2].tv, cloth1->verts[collpair->Aindex3].tv, w1, w2, w3); + + interpolateOnTriangle(v2, cloth2->verts[collpair->Bindex1].tv, cloth2->verts[collpair->Bindex2].tv, cloth2->verts[collpair->Bindex3].tv, u1, u2, u3); + + VECSUB(relativeVelocity, v1, v2); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR(relativeVelocity, collpair->normal); + + // Calculate masses of points. + + // If v_n_mag > 0 the edges are approaching each other. + + if(magrelVel < -ALMOST_ZERO) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3]; + double impulse; + float epsilon = clmd->coll_parms.epsilon; + float overlap = (epsilon + ALMOST_ZERO-collpair->distance); + + /* + impulse = -magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); + cloth1->verts[face1->v1].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); + cloth1->verts[face1->v2].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); + cloth1->verts[face1->v3].impulse_count++; + */ + + + /* + if (overlap > ALMOST_ZERO) { + double I_mag = overlap * 0.1; + + impulse = I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); + cloth1->verts[face1->v1].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); + cloth1->verts[face1->v2].impulse_count++; + + VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); + cloth1->verts[face1->v3].impulse_count++; + + if(face1->v4) + { + VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); + cloth1->verts[face1->v4].impulse_count++; + } + + } + */ + + result = 1; + } + + search = search->next; + } + } + + return result; +} + void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2) { CollPair *collpair = NULL; LinkNode **linknode; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; - - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + float epsilon = clmd->coll_parms.epsilon, tdistance=0; + MFace *face1, *face2; + ClothVertex *verts1, *verts2; + Cloth *cloth1=NULL, *cloth2=NULL; + int i = 0; + linknode = clmd->coll_parms.temp; + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + // calc SIPcode (?) - // calc distance + normal - distance = implicit_tri_check_coherence(clmd, coll_clmd, tree1->tri_index, tree2->tri_index, collpair->p1, collpair->p2, collpair->vector, collpair->quadA, collpair->quadB); - - if ((distance <= (epsilon + ALMOST_ZERO)) && (distance > -1.0f)) // max overlap = 1.0 + for(i = 0; i < 4; i++) { - // printf("dist: %f\n", (float)distance); + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); - collpair->face1 = tree1->tri_index; - collpair->face2 = tree2->tri_index; + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + verts1 = cloth1->verts; + verts2 = cloth2->verts; - VECCOPY(collpair->normal, collpair->vector); - Normalize(collpair->normal); + if(i == 0) + { + collpair->Aindex1 = face1->v1; + collpair->Aindex2 = face1->v2; + collpair->Aindex3 = face1->v3; + collpair->Aindex4 = face1->v4; + + collpair->Bindex1 = face2->v1; + collpair->Bindex2 = face2->v2; + collpair->Bindex3 = face2->v3; + collpair->Bindex4 = face2->v4; + + } - collpair->distance = distance; - BLI_linklist_append(&linknode[tree1->tri_index], collpair); - } - else - { - MEM_freeN(collpair); + if(i == 1) + { + if(face2->v4) + { + collpair->Aindex1 = face1->v1; + collpair->Aindex2 = face1->v2; + collpair->Aindex3 = face1->v3; + collpair->Aindex4 = face1->v4; + + collpair->Bindex1 = face2->v4; + collpair->Bindex2 = face2->v3; + collpair->Bindex3 = face2->v1; + collpair->Bindex4 = face2->v1; + } + else + i++; + + } + + if(i == 2) + { + if(face1->v4) + { + collpair->Aindex1 = face1->v4; + collpair->Aindex2 = face1->v3; + collpair->Aindex3 = face1->v1; + collpair->Aindex4 = face1->v2; + + collpair->Bindex1 = face2->v1; + collpair->Bindex2 = face2->v2; + collpair->Bindex3 = face2->v3; + collpair->Bindex4 = face2->v4; + } + else + i++; + } + + if(i == 3) + { + if((face2->v4) && (face1->v4)) + { + collpair->Aindex1 = face1->v4; + collpair->Aindex2 = face1->v3; + collpair->Aindex3 = face1->v1; + collpair->Aindex4 = face1->v2; + + collpair->Bindex1 = face2->v4; + collpair->Bindex2 = face2->v3; + collpair->Bindex3 = face2->v1; + collpair->Bindex4 = face2->v2; + } + else + i++; + } + + if(i < 4) + { + distance = nearest_point_triangle_triangle(verts1[collpair->Aindex1].txold, verts1[collpair->Aindex2].txold, verts1[collpair->Aindex3].txold, verts2[collpair->Bindex1].txold, verts2[collpair->Bindex2].txold, verts2[collpair->Bindex3].txold, collpair->normal); + + // calc distance + normal + // distance = implicit_tri_check_coherence(clmd, coll_clmd, tree1->tri_index, tree2->tri_index, collpair->p1, collpair->p2, collpair->vector, collpair->quadA, collpair->quadB); + + if (distance <= (epsilon + ALMOST_ZERO)) // max overlap = 1.0 + { + + printf("dist: %f, tdist: %f\n", (float)distance, tdistance); + + collpair->face1 = tree1->tri_index; + collpair->face2 = tree2->tri_index; + + collpair->distance = distance; + BLI_linklist_append(&linknode[tree1->tri_index], collpair); + } + else + { + MEM_freeN(collpair); + } + } } } @@ -684,7 +973,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); - result += collision_static(clmd, coll_clmd, collision_list); + result += collision_static2(clmd, coll_clmd, collision_list); // calculate velocities From 6a72fecca73d9f45e04ee942dc85310e12b137cb Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 28 Sep 2007 11:06:13 +0000 Subject: [PATCH 019/430] Some additional wind problems (hopefully) fixed, added force fields, reported by Rui Paulo Sanguinheira Diogo --- source/blender/blenkernel/intern/implicit.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 0d0c7ff0f7b..3994bbf2b40 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1261,7 +1261,7 @@ void calculateWeightedVertexNormal(ClothModifierData *clmd, MFace *mfaces, float } } } -float calculateVertexWindForce(int index, float wind[3], float vertexnormal[3]) +float calculateVertexWindForce(float wind[3], float vertexnormal[3]) { return fabs(INPR(wind, vertexnormal) * 0.5f); } @@ -1328,21 +1328,25 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec /* handle external forces like wind */ if(effectors) { - float wind[3] = {0.0f,1.0f,0.0f}; + float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; #pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; + float fieldfactor = 1000.0f, windfactor = 250.0f; // from sb + + pdDoEffectors(effectors, lX[i], force, speed, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED); + + // TODO apply forcefields here + VECADDS(lF[i], lF[i], force, fieldfactor*0.01f); - pdDoEffectors(effectors, lX[i], force, wind, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED); - - VECCOPY(wind_normalized, wind); + VECCOPY(wind_normalized, speed); Normalize(wind_normalized); - + calculateWeightedVertexNormal(clmd, mfaces, vertexnormal, i, lX); - VECADDS(lF[i], lF[i], wind_normalized, calculateVertexWindForce(i, wind, vertexnormal)); + VECADDS(lF[i], lF[i], wind_normalized, -calculateVertexWindForce(speed, vertexnormal)); } } From 777c16d444d0227a9e59c7beb2ab2be3374fdef2 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 1 Oct 2007 20:19:22 +0000 Subject: [PATCH 020/430] Bullet is back, but now generalized enough to allow own distance/calculation. Some bullet makefile-fix by 'gsr b3d'- please test it. Also fixed some crasher with cache. Also implemented moving-collisions enabled kdop (response missing in the moment) --- extern/bullet2/src/Bullet-C-Api.h | 2 +- .../BulletDynamics/Dynamics/Bullet-C-Api.cpp | 12 +- source/Makefile | 4 +- source/blender/blenkernel/BKE_cloth.h | 105 +- source/blender/blenkernel/intern/Makefile | 3 + source/blender/blenkernel/intern/cloth.c | 20 +- source/blender/blenkernel/intern/collision.c | 1265 ++++++++--------- source/blender/blenkernel/intern/implicit.c | 7 +- source/blender/blenkernel/intern/kdop.c | 98 +- source/blender/makesdna/DNA_cloth_types.h | 2 +- 10 files changed, 712 insertions(+), 806 deletions(-) diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h index 2d35383e902..ccb0c452f3e 100644 --- a/extern/bullet2/src/Bullet-C-Api.h +++ b/extern/bullet2/src/Bullet-C-Api.h @@ -5,7 +5,7 @@ extern "C" { #endif // __cplusplus -double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float normal[3]); +double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]); #ifdef __cplusplus } diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp index 1b843774609..4051d3f3e1f 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp @@ -25,13 +25,13 @@ extern "C" -double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float normal[3]) +double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]) { - btTriangleShape trishapeA(btVector3(p[0][0], p[0][1], p[0][2]), btVector3(p[1][0], p[1][1], p[1][2]), btVector3(p[2][0], p[2][1], p[2][2])); - trishapeA.setMargin(0.001f); + btTriangleShape trishapeA(btVector3(p1[0], p1[1], p1[2]), btVector3(p2[0], p2[1], p2[2]), btVector3(p3[0], p3[1], p3[2])); + trishapeA.setMargin(0.000001f); - btTriangleShape trishapeB(btVector3(q[0][0], q[0][1], q[0][2]), btVector3(q[1][0], q[1][1], q[1][2]), btVector3(q[2][0], q[2][1], q[2][2])); - trishapeB.setMargin(0.001f); + btTriangleShape trishapeB(btVector3(q1[0], q1[1], q1[2]), btVector3(q2[0], q2[1], q2[2]), btVector3(q3[0], q3[1], q3[2])); + trishapeB.setMargin(0.000001f); // btVoronoiSimplexSolver sGjkSimplexSolver; // btGjkEpaPenetrationDepthSolver penSolverPtr; @@ -44,7 +44,7 @@ double plNearestPoints(float p[3][3], float q[3][3], float *pa, float *pb, float btConvexPenetrationDepthSolver* Solver = NULL; - Solver = &Solver0; + Solver = &Solver1; btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); diff --git a/source/Makefile b/source/Makefile index 5161f6b73c5..e68aca215a1 100644 --- a/source/Makefile +++ b/source/Makefile @@ -149,9 +149,11 @@ ifneq ($(NAN_NO_KETSJI),true) COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a - COMLIB += $(NAN_BULLET2)/lib/libbullet2.a endif +# Required by cloth, not gameengine only anymore +COMLIB += $(NAN_BULLET2)/lib/$(DEBUG_DIR)libbullet2.a + COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index ec58382b86a..bbdf4bc01c9 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -1,36 +1,36 @@ /** -* BKE_cloth.h -* -* $Id: BKE_cloth.h,v 1.1 2007/08/01 02:07:27 daniel Exp $ -* -* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. The Blender -* Foundation also sells licenses for use in proprietary software under -* the Blender License. See http://www.blender.org/BL/ for information -* about this. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) Blender Foundation. -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL/BL DUAL LICENSE BLOCK ***** -*/ + * BKE_cloth.h + * + * $Id: BKE_cloth.h,v 1.1 2007/08/01 02:07:27 daniel Exp $ + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ #ifndef BKE_CLOTH_H #define BKE_CLOTH_H @@ -46,10 +46,10 @@ struct DerivedMesh; // this is needed for inlining behaviour #ifndef _WIN32 - #define LINUX - #define DO_INLINE inline +#define LINUX +#define DO_INLINE inline #else - #define DO_INLINE +#define DO_INLINE #endif #define CLOTH_MAX_THREAD 2 @@ -86,27 +86,27 @@ struct DerivedMesh; typedef enum { CSIMSETT_FLAG_RESET = (1 << 1), // The CM object requires a reinitializaiton. - CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done - CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled - CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache - CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache - CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled - CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled + CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done + CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled + CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache + CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache + CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled + CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled } CSIMSETT_FLAGS; /* Spring types as defined in the paper.*/ typedef enum { STRUCTURAL = 0, - SHEAR, - BENDING, + SHEAR, + BENDING, } springType; /* SPRING FLAGS */ typedef enum { CSPRING_FLAG_DEACTIVATE = (1 << 1), - CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied + CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied } CSPRINGS_FLAGS; // needed for buttons_object.c @@ -156,7 +156,7 @@ typedef void (*CM_COLLISION_RESPONSE) (ClothModifierData *clmd, ClothModifierDat // needed for implicit.c void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2); -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt); +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt); //////////////////////////////////////////////// @@ -165,16 +165,13 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE // kdop.c //////////////////////////////////////////////// -// needed for implicit.c -void bvh_update_static(ClothModifierData * clmd, BVH * bvh); -void bvh_update_moving(ClothModifierData * clmd, BVH * bvh); - // needed for cloth.c void bvh_free(BVH * bvh); BVH *bvh_build (ClothModifierData *clmd, float epsilon); // needed for collision.c int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response); +void bvh_update(ClothModifierData * clmd, BVH * bvh, int moving); //////////////////////////////////////////////// @@ -209,8 +206,7 @@ typedef struct { char *name; CM_SOLVER_ID id; int (*init) (Object *ob, ClothModifierData *clmd); - int (*solver) (Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors, - CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision); + int (*solver) (Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors); int (*free) (ClothModifierData *clmd); } CM_SOLVER_DEF; @@ -218,8 +214,7 @@ typedef struct { /* new C implicit simulator */ int implicit_init (Object *ob, ClothModifierData *clmd); int implicit_free (ClothModifierData *clmd); -int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors, - CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision); +int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors); /* used for caching in implicit.c */ typedef struct Frame @@ -237,10 +232,10 @@ typedef struct CollPair double distance; // magnitude of vector float normal[3]; float vector[3]; // unnormalized collision vector: p2-p1 - float p1[3], p2[3]; // collision point p1 on face1, p2 on face2 + float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 int lastsign; // indicates if the distance sign has changed, unused itm float time; // collision time, from 0 up to 1 - unsigned int Aindex1, Aindex2, Aindex3, Aindex4, Bindex1, Bindex2, Bindex3, Bindex4; + unsigned int ap1, ap2, ap3, bp1, bp2, bp3; } CollPair; diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile index 72fcc466de8..e87eb2a3e3f 100644 --- a/source/blender/blenkernel/intern/Makefile +++ b/source/blender/blenkernel/intern/Makefile @@ -77,6 +77,9 @@ CPPFLAGS += -I../../nodes # path to our own external headerfiles CPPFLAGS += -I.. +# path to bullet2, for cloth +CPPFLAGS += -I../../../../extern/bullet2/src + ifeq ($(WITH_FREETYPE2), true) CPPFLAGS += -DWITH_FREETYPE2 CPPFLAGS += -I$(NAN_FREETYPE)/include diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index d9f0bef9f43..940fc8b6c5b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -473,7 +473,6 @@ int cloth_cache_last_frame(ClothModifierData *clmd) search = search->next; } } - return temptime; } @@ -567,12 +566,7 @@ void cloth_cache_set_frame(ClothModifierData *clmd, float time) */ } if(frame) - { - if(!clmd->sim_parms.cache) - BLI_linklist_prepend(&clmd->sim_parms.cache, frame); - else - BLI_linklist_append(&clmd->sim_parms.cache, frame); - } + BLI_linklist_append(&clmd->sim_parms.cache, frame); } } @@ -683,6 +677,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } } + // unused in the moment, calculated seperately in implicit.c clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; @@ -774,7 +769,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, /* Call the solver. */ if (solvers [clmd->sim_parms.solver_type].solver) - solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors,0,0); + solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); tend(); printf("Cloth simulation time: %f\n", (float)tval()); @@ -797,10 +792,13 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } else if((deltaTime <= 0.0f)||(deltaTime > 1.0f)) { - if(cloth_cache_search_frame(clmd, framenr)) + if((clmd->clothObject != NULL) && (clmd->sim_parms.cache)) { - cloth_cache_get_frame(clmd, framenr); - cloth_to_object (ob, clmd, vertexCos, numverts); + if(cloth_cache_search_frame(clmd, framenr)) + { + cloth_cache_get_frame(clmd, framenr); + cloth_to_object (ob, clmd, vertexCos, numverts); + } } } } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 7eec315e386..20c1548e14b 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -77,13 +77,13 @@ enum TRIANGLE_MARK { TM_MV = 1, - TM_ME = 2, - TM_V1 = 4, - TM_V2 = 8, - TM_V3 = 16, - TM_E1 = 32, - TM_E2 = 64, - TM_E3 = 128 + TM_ME = 2, + TM_V1 = 4, + TM_V2 = 8, + TM_V3 = 16, + TM_E1 = 32, + TM_E2 = 64, + TM_E3 = 128 }; DO_INLINE int hasTriangleMark(unsigned char mark, unsigned char bit) { return mark & bit; } @@ -104,64 +104,64 @@ void generateTriangleMarks() // 2.1 Randomly mark triangles for covering vertices. for (unsigned int v = 0; v < m_vertexCount; ++v) { - if (vertexCover(v) == 0) - { + if (vertexCover(v) == 0) + { // Randomly select an edge whose first triangle we're going to flag. #ifndef DERANDOMIZE - firstEdge = (unsigned int)((float)(random() & 0x7FFFFFFF) / - (float)(0x80000000) * - (float)(m_vertices[v].getEdgeCount())); + firstEdge = (unsigned int)((float)(random() & 0x7FFFFFFF) / + (float)(0x80000000) * + (float)(m_vertices[v].getEdgeCount())); #endif - for (unsigned int ofs = 0; ofs < m_vertices[v].getEdgeCount(); ++ofs) - { - unsigned int edgeIdx = (firstEdge + ofs) % m_vertices[v].getEdgeCount(); - if (m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangleCount()) - setTriangleMark(m_triangleMarks[m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangle(0)], TM_MV); - } - } - } + for (unsigned int ofs = 0; ofs < m_vertices[v].getEdgeCount(); ++ofs) + { + unsigned int edgeIdx = (firstEdge + ofs) % m_vertices[v].getEdgeCount(); + if (m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangleCount()) + setTriangleMark(m_triangleMarks[m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangle(0)], TM_MV); +} +} +} */ /* If the Cloth is malformed (vertices without adjacent triangles) there might still be uncovered vertices. (Bad luck.) */ /* // 2.2 Randomly mark triangles for covering edges. for (unsigned int e = 0; e < m_edgeCount; ++e) { - if (m_edges[e].getTriangleCount() && (edgeCover(e) == 0)) - { + if (m_edges[e].getTriangleCount() && (edgeCover(e) == 0)) + { #ifndef DERANDOMIZE - setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(static_cast((float)(random() & 0x7FFFFFFF) / - (float)(0x80000000) * - (float)(m_edges[e].getTriangleCount())))], TM_ME); + setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(static_cast((float)(random() & 0x7FFFFFFF) / + (float)(0x80000000) * + (float)(m_edges[e].getTriangleCount())))], TM_ME); #else - setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(0)], TM_ME); + setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(0)], TM_ME); #endif - } - } +} +} // 3. The Unmarking Process for (unsigned int t = 0; (t < m_triangleCount); ++t) { - bool overCoveredVertices = true; - bool overCoveredEdges = true; - for (unsigned char i = 0; (i < 3) && (overCoveredVertices || overCoveredEdges); ++i) - { + bool overCoveredVertices = true; + bool overCoveredEdges = true; + for (unsigned char i = 0; (i < 3) && (overCoveredVertices || overCoveredEdges); ++i) + { - if (vertexCover(m_triangles[t].getVertex(i)) == 1) - overCoveredVertices = false; - if (edgeCover(m_triangles[t].getEdge(i)) == 1) - overCoveredEdges = false; + if (vertexCover(m_triangles[t].getVertex(i)) == 1) + overCoveredVertices = false; + if (edgeCover(m_triangles[t].getEdge(i)) == 1) + overCoveredEdges = false; - assert(vertexCover(m_triangles[t].getVertex(i)) > 0); - assert(edgeCover(m_triangles[t].getEdge(i)) > 0); - } - if (overCoveredVertices) - clearTriangleMark(m_triangleMarks[t], TM_MV); - if (overCoveredEdges) - clearTriangleMark(m_triangleMarks[t], TM_ME); - } + assert(vertexCover(m_triangles[t].getVertex(i)) > 0); + assert(edgeCover(m_triangles[t].getEdge(i)) > 0); +} + if (overCoveredVertices) + clearTriangleMark(m_triangleMarks[t], TM_MV); + if (overCoveredEdges) + clearTriangleMark(m_triangleMarks[t], TM_ME); +} // 4. The Bit Masking Process @@ -169,25 +169,25 @@ void generateTriangleMarks() vector edgeAssigned(m_edgeCount, false); for (unsigned int t = 0; (t < m_triangleCount); ++t) { - for (unsigned char i = 0; i < 3; ++i) - { - if (!vertexAssigned[m_triangles[t].getVertex(i)]) - { - vertexAssigned[m_triangles[t].getVertex(i)] = true; - setTriangleMark(m_triangleMarks[t], 1 << (2 + i)); - } - if (!edgeAssigned[m_triangles[t].getEdge(i)]) - { - edgeAssigned[m_triangles[t].getEdge(i)] = true; - setTriangleMark(m_triangleMarks[t], 1 << (5 + i)); - } - } - } + for (unsigned char i = 0; i < 3; ++i) + { + if (!vertexAssigned[m_triangles[t].getVertex(i)]) + { + vertexAssigned[m_triangles[t].getVertex(i)] = true; + setTriangleMark(m_triangleMarks[t], 1 << (2 + i)); +} + if (!edgeAssigned[m_triangles[t].getEdge(i)]) + { + edgeAssigned[m_triangles[t].getEdge(i)] = true; + setTriangleMark(m_triangleMarks[t], 1 << (5 + i)); +} +} +} */ } // w3 is not perfect -void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], double *w1, double *w2, double *w3) +void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) { double tempV1[3], tempV2[3], tempV4[3]; double a,b,c,d,e,f; @@ -205,13 +205,19 @@ void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3] d = (a * c - b * b); if (ABS(d) < ALMOST_ZERO) { - *w1 = *w2 = *w3 = 1.0f / 3.0f; + *w1 = *w2 = *w3 = 1.0 / 3.0; return; } - w1[0] = (e * c - b * f) / d; + w1[0] = (float)((e * c - b * f) / d); - w2[0] = (f - b * w1[0]) / c; + if(w1[0] < 0) + w1[0] = 0; + + w2[0] = (float)((f - b * (double)w1[0]) / c); + + if(w2[0] < 0) + w2[0] = 0; w3[0] = 1.0f - w1[0] - w2[0]; } @@ -226,7 +232,7 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, - double frictionConstant, double delta_V_n) + double frictionConstant, double delta_V_n) { float vrel_t_pre[3]; float vrel_t[3]; @@ -235,631 +241,376 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } -/* -int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) + +int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) { - unsigned int i = 0, numfaces = 0; + unsigned int i = 0; int result = 0; LinkNode *search = NULL; CollPair *collpair = NULL; Cloth *cloth1, *cloth2; - MFace *face1, *face2; - double w1, w2, w3, u1, u2, u3, a1, a2, a3; + float w1, w2, w3, u1, u2, u3; float v1[3], v2[3], relativeVelocity[3]; float magrelVel; cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; - - numfaces = clmd->clothObject->numfaces; - - for(i = 0; i < numfaces; i++) - { - search = collision_list[i]; - - while(search) - { - collpair = search->link; - - face1 = &(cloth1->mfaces[collpair->face1]); - face2 = &(cloth2->mfaces[collpair->face2]); - - // compute barycentric coordinates for both collision points - - if(!collpair->quadA) - { - bvh_compute_barycentric(collpair->p1, - cloth1->verts[face1->v1].txold, - cloth1->verts[face1->v2].txold, - cloth1->verts[face1->v3].txold, - &w1, &w2, &w3); - } - else - bvh_compute_barycentric(collpair->p1, - cloth1->verts[face1->v4].txold, - cloth1->verts[face1->v1].txold, - cloth1->verts[face1->v3].txold, - &w1, &w2, &w3); - - if(!collpair->quadB) - bvh_compute_barycentric(collpair->p2, - cloth2->verts[face2->v1].txold, - cloth2->verts[face2->v2].txold, - cloth2->verts[face2->v3].txold, - &u1, &u2, &u3); - else - bvh_compute_barycentric(collpair->p2, - cloth2->verts[face2->v4].txold, - cloth2->verts[face2->v1].txold, - cloth2->verts[face2->v3].txold, - &u1, &u2, &u3); - - // Calculate relative "velocity". - - if(!collpair->quadA) - interpolateOnTriangle(v1, cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv, cloth1->verts[face1->v3].tv, w1, w2, w3); - else - interpolateOnTriangle(v1, cloth1->verts[face1->v4].tv, cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv, w1, w2, w3); - - if(!collpair->quadB) - interpolateOnTriangle(v2, cloth2->verts[face2->v1].tv, cloth2->verts[face2->v2].tv, cloth2->verts[face2->v3].tv, u1, u2, u3); - else - interpolateOnTriangle(v2, cloth2->verts[face2->v4].tv, cloth2->verts[face2->v1].tv, cloth2->verts[face2->v3].tv, u1, u2, u3); - - VECSUB(relativeVelocity, v1, v2); - - // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). - magrelVel = INPR(relativeVelocity, collpair->normal); - - // Calculate masses of points. - - // If v_n_mag > 0 the edges are approaching each other. - - if(magrelVel < -ALMOST_ZERO) - { - // Calculate Impulse magnitude to stop all motion in normal direction. - // const double I_mag = v_n_mag / (1/m1 + 1/m2); - float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent, magnormal, collvel[3]; - float vrel_t_pre[3]; - float vrel_t[3]; - double impulse; - float epsilon = clmd->coll_parms.epsilon; - float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); - - // magtangent = INPR(tangential, tangential); - - // Apply friction impulse. - if (magtangent < ALMOST_ZERO) - { - - // printf("friction applied: %f\n", magtangent); - // TODO check original code - - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); - - } - - impulse = -magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); - cloth1->verts[face1->v1].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); - cloth1->verts[face1->v2].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); - cloth1->verts[face1->v3].impulse_count++; - - if(face1->v4) - { - VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); - cloth1->verts[face1->v4].impulse_count++; - } - - - if (overlap > ALMOST_ZERO) { - double I_mag = overlap * 0.1; - - impulse = I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - - VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); - cloth1->verts[face1->v1].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); - cloth1->verts[face1->v2].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); - cloth1->verts[face1->v3].impulse_count++; - - if(face1->v4) - { - VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); - cloth1->verts[face1->v4].impulse_count++; - } - - } - - result = 1; - - - // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case - - // Apply the impulse and increase impulse counters. - / - // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); - VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); - // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); - magtangent = Normalize(vrel_t_pre); - VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); - - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); - - + search = clmd->coll_parms.collision_list; + + while(search) + { + collpair = search->link; + + // compute barycentric coordinates for both collision points + bvh_compute_barycentric(collpair->pa, + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3); + + bvh_compute_barycentric(collpair->pb, + cloth2->verts[collpair->bp1].txold, + cloth2->verts[collpair->bp2].txold, + cloth2->verts[collpair->bp3].txold, + &u1, &u2, &u3); + + // Calculate relative "velocity". + interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); + + interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); + + VECSUB(relativeVelocity, v1, v2); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR(relativeVelocity, collpair->normal); + + // printf("magrelVel: %f\n", magrelVel); + // Calculate masses of points. + + // If v_n_mag < 0 the edges are approaching each other. + if(magrelVel < -ALMOST_ZERO) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3]; + double impulse; + float epsilon = clmd->coll_parms.epsilon; + float overlap = (epsilon + ALMOST_ZERO-collpair->distance); + + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + + // magtangent = INPR(tangential, tangential); + + // Apply friction impulse. + if (magtangent < -ALMOST_ZERO) + { + // printf("friction applied: %f\n", magtangent); + // TODO check original code + /* + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); + */ } - search = search->next; + + impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + // printf("impulse: %f\n", impulse); + + VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); + cloth1->verts[collpair->ap3].impulse_count++; + + result = 1; + + /* + if (overlap > ALMOST_ZERO) { + double I_mag = overlap * 0.1; + + impulse = -I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); + cloth1->verts[collpair->ap3].impulse_count++; } + */ + + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case + + // Apply the impulse and increase impulse counters. + + /* + // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); + VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); + // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); + magtangent = Normalize(vrel_t_pre); + VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); + + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); + */ + + + + } + + search = search->next; } + return result; } -*/ - -// return distance between two triangles using bullet engine -double implicit_tri_check_coherence (ClothModifierData *clmd, ClothModifierData *coll_clmd, unsigned int tri_index1, unsigned int tri_index2, float pa[3], float pb[3], float normal[3], int quadA, int quadB) + +void bvh_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { + CollPair *collpair = NULL; + Cloth *cloth1=NULL, *cloth2=NULL; MFace *face1=NULL, *face2=NULL; - float a[3][3]; - float b[3][3]; - double distance=0, tempdistance=0; - Cloth *cloth1=NULL, *cloth2=NULL; - float tpa[3], tpb[3], tnormal[3]; - unsigned int indexA=0, indexB=0, indexC=0, indexD=0, indexE=0, indexF=0; - int i = 0; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - face1 = &(cloth1->mfaces[tri_index1]); - face2 = &(cloth2->mfaces[tri_index2]); - - // face a1 + face b1 - VECCOPY(a[0], cloth1->verts[face1->v1].txold); - VECCOPY(a[1], cloth1->verts[face1->v2].txold); - VECCOPY(a[2], cloth1->verts[face1->v3].txold); - - - VECCOPY(b[0], cloth2->verts[face2->v1].txold); - VECCOPY(b[1], cloth2->verts[face2->v2].txold); - VECCOPY(b[2], cloth2->verts[face2->v3].txold); - - distance = plNearestPoints(a,b,pa,pb,normal); - - quadA = quadB = 0; - - for(i = 0; i < 3; i++) - { - if(i == 0) - { - if(face1->v4) - { - indexA = face1->v4; - indexB = face1->v1; - indexC = face1->v3; - - indexD = face2->v1; - indexE = face2->v2; - indexF = face2->v3; - } - else - i+=2; - } - - if(i == 1) - { - if((face1->v4)&&(face2->v4)) - { - indexA = face1->v4; - indexB = face1->v1; - indexC = face1->v3; - - indexD = face2->v4; - indexE = face2->v1; - indexF = face2->v3; - } - else - i++; - } - - if(i == 2) - { - if(face2->v4) - { - indexA = face1->v1; - indexB = face1->v2; - indexC = face1->v3; - - indexD = face2->v4; - indexE = face2->v1; - indexF = face2->v3; - } - else - i++; - - } - - if(i<3) - { - // face a2 + face b1 - VECCOPY(a[0], cloth1->verts[indexA].txold); - VECCOPY(a[1], cloth1->verts[indexB].txold); - VECCOPY(a[2], cloth1->verts[indexC].txold); - - - VECCOPY(b[0], cloth2->verts[indexD].txold); - VECCOPY(b[1], cloth2->verts[indexE].txold); - VECCOPY(b[2], cloth2->verts[indexF].txold); - - tempdistance = plNearestPoints(a,b,tpa,tpb,tnormal); - - if(tempdistance < distance) - { - VECCOPY(pa, tpa); - VECCOPY(pb, tpb); - VECCOPY(normal, tnormal); - distance = tempdistance; - - if(i == 0) - { - quadA = 1; quadB = 0; - } - else if(i == 1) - { - quadA = quadB = 1; - } - else if(i == 2) - { - quadA = 0; quadB = 1; - } - } - } - } - return distance; -} - -// calculate plane normal -void calcPlaneNormal(float normal[3], float p11[3], float p12[3], float p13[3]) -{ - float temp1[3], temp2[3]; - float tnormal[3]; - - VECSUB(temp1, p12,p11); - VECSUB(temp2, p13,p11); - Crossf(normal, temp1, temp2); - Normalize(normal); - // VECCOPY(normal, tnormal); -} - -float distance_triangle_point( float p11[3], float p12[3], float p13[3], float p21[3], float normal[3]) -{ - float temp[3]; - float magnitude = 0; - - VECSUB(temp, p21, p13); - magnitude = INPR(temp, normal); - - if(magnitude < 0) - { - magnitude *= -1.0f; - // VecMulf(normal, -1.0f); - } - - return magnitude; -} - -float nearest_point_triangle_triangle(float p11[3], float p12[3], float p13[3], float p21[3], float p22[3], float p23[3], float normal[3]) -{ - float distance = 0, tdistance = 0, tnormal[3]; - - // first triangle 1-2-3 versus second triangle 1-2-3 - calcPlaneNormal(normal, p11, p12, p13); - distance = distance_triangle_point(p11, p12, p13, p21, normal); - - tdistance = distance_triangle_point(p11, p12, p13, p22, normal); - - if(tdistance < distance) - { - distance = tdistance; - } - - tdistance = distance_triangle_point(p11, p12, p13, p23, normal); - - if(tdistance < distance) - { - distance = tdistance; - } - - // second triangle 1-2-3 versus first triangle 1-2-3 - calcPlaneNormal(tnormal, p21, p22, p23); - - tdistance = distance_triangle_point(p21, p22, p23, p11, tnormal); - - if(tdistance < distance) - { - distance = tdistance; - VECCOPY(normal, tnormal); - } - - tdistance = distance_triangle_point(p21, p22, p23, p12, tnormal); - - if(tdistance < distance) - { - distance = tdistance; - VECCOPY(normal, tnormal); - } - - tdistance = distance_triangle_point(p21, p22, p23, p13, tnormal); - - if(tdistance < distance) - { - distance = tdistance; - VECCOPY(normal, tnormal); - } - - - if (distance < 0) { - VecMulf(normal, -1.0f); - distance = -distance; - } - - return distance; -} - - -int collision_static2(ClothModifierData *clmd, ClothModifierData *coll_clmd, LinkNode **collision_list) -{ - unsigned int i = 0, numfaces = 0; - int result = 0; - LinkNode *search = NULL; - CollPair *collpair = NULL; - Cloth *cloth1, *cloth2; - MFace *face1, *face2; - double w1, w2, w3, u1, u2, u3, a1, a2, a3; - float v1[3], v2[3], relativeVelocity[3]; - float magrelVel; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - numfaces = clmd->clothObject->numfaces; - - for(i = 0; i < numfaces; i++) - { - search = collision_list[i]; - - while(search) - { - collpair = search->link; - - face1 = &(cloth1->mfaces[collpair->face1]); - face2 = &(cloth2->mfaces[collpair->face2]); - - // compute barycentric coordinates for both collision points - - - bvh_compute_barycentric(collpair->p1, - cloth1->verts[collpair->Aindex1].txold, - cloth1->verts[collpair->Aindex2].txold, - cloth1->verts[collpair->Aindex3].txold, - &w1, &w2, &w3); - - bvh_compute_barycentric(collpair->p2, - cloth2->verts[collpair->Bindex1].txold, - cloth2->verts[collpair->Bindex1].txold, - cloth2->verts[collpair->Bindex3].txold, - &u1, &u2, &u3); - - // Calculate relative "velocity". - interpolateOnTriangle(v1, cloth1->verts[collpair->Aindex1].tv, cloth1->verts[collpair->Aindex2].tv, cloth1->verts[collpair->Aindex3].tv, w1, w2, w3); - - interpolateOnTriangle(v2, cloth2->verts[collpair->Bindex1].tv, cloth2->verts[collpair->Bindex2].tv, cloth2->verts[collpair->Bindex3].tv, u1, u2, u3); - - VECSUB(relativeVelocity, v1, v2); - - // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). - magrelVel = INPR(relativeVelocity, collpair->normal); - - // Calculate masses of points. - - // If v_n_mag > 0 the edges are approaching each other. - - if(magrelVel < -ALMOST_ZERO) - { - // Calculate Impulse magnitude to stop all motion in normal direction. - // const double I_mag = v_n_mag / (1/m1 + 1/m2); - float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent, magnormal, collvel[3]; - float vrel_t_pre[3]; - float vrel_t[3]; - double impulse; - float epsilon = clmd->coll_parms.epsilon; - float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - - /* - impulse = -magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); - cloth1->verts[face1->v1].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); - cloth1->verts[face1->v2].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); - cloth1->verts[face1->v3].impulse_count++; - */ - - - /* - if (overlap > ALMOST_ZERO) { - double I_mag = overlap * 0.1; - - impulse = I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - - VECADDMUL(cloth1->verts[face1->v1].impulse, collpair->normal, impulse); - cloth1->verts[face1->v1].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v2].impulse, collpair->normal, impulse); - cloth1->verts[face1->v2].impulse_count++; - - VECADDMUL(cloth1->verts[face1->v3].impulse, collpair->normal, impulse); - cloth1->verts[face1->v3].impulse_count++; - - if(face1->v4) - { - VECADDMUL(cloth1->verts[face1->v4].impulse, collpair->normal, impulse); - cloth1->verts[face1->v4].impulse_count++; - } - - } - */ - - result = 1; - } - - search = search->next; - } - } - - return result; -} - -void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2) -{ - CollPair *collpair = NULL; - LinkNode **linknode; + ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon, tdistance=0; - MFace *face1, *face2; - ClothVertex *verts1, *verts2; - Cloth *cloth1=NULL, *cloth2=NULL; - int i = 0; - - linknode = clmd->coll_parms.temp; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - // calc SIPcode (?) - + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0; + for(i = 0; i < 4; i++) { - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - verts1 = cloth1->verts; verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + // check all possible pairs of triangles if(i == 0) { - collpair->Aindex1 = face1->v1; - collpair->Aindex2 = face1->v2; - collpair->Aindex3 = face1->v3; - collpair->Aindex4 = face1->v4; + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; - collpair->Bindex1 = face2->v1; - collpair->Bindex2 = face2->v2; - collpair->Bindex3 = face2->v3; - collpair->Bindex4 = face2->v4; + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; } if(i == 1) { - if(face2->v4) - { - collpair->Aindex1 = face1->v1; - collpair->Aindex2 = face1->v2; - collpair->Aindex3 = face1->v3; - collpair->Aindex4 = face1->v4; + if(face1->v4) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; - collpair->Bindex1 = face2->v4; - collpair->Bindex2 = face2->v3; - collpair->Bindex3 = face2->v1; - collpair->Bindex4 = face2->v1; + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; } else i++; - } if(i == 2) { - if(face1->v4) - { - collpair->Aindex1 = face1->v4; - collpair->Aindex2 = face1->v3; - collpair->Aindex3 = face1->v1; - collpair->Aindex4 = face1->v2; + if(face2->v4) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; - collpair->Bindex1 = face2->v1; - collpair->Bindex2 = face2->v2; - collpair->Bindex3 = face2->v3; - collpair->Bindex4 = face2->v4; + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; } else - i++; + i+=2; } if(i == 3) { - if((face2->v4) && (face1->v4)) - { - collpair->Aindex1 = face1->v4; - collpair->Aindex2 = face1->v3; - collpair->Aindex3 = face1->v1; - collpair->Aindex4 = face1->v2; + if((face1->v4)&&(face2->v4)) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; - collpair->Bindex1 = face2->v4; - collpair->Bindex2 = face2->v3; - collpair->Bindex3 = face2->v1; - collpair->Bindex4 = face2->v2; + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; } else i++; } + // calc SIPcode (?) + if(i < 4) { - distance = nearest_point_triangle_triangle(verts1[collpair->Aindex1].txold, verts1[collpair->Aindex2].txold, verts1[collpair->Aindex3].txold, verts2[collpair->Bindex1].txold, verts2[collpair->Bindex2].txold, verts2[collpair->Bindex3].txold, collpair->normal); - // calc distance + normal - // distance = implicit_tri_check_coherence(clmd, coll_clmd, tree1->tri_index, tree2->tri_index, collpair->p1, collpair->p2, collpair->vector, collpair->quadA, collpair->quadB); + distance = plNearestPoints( + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, + collpair->pa, collpair->pb, collpair->vector); - if (distance <= (epsilon + ALMOST_ZERO)) // max overlap = 1.0 + if (distance <= (epsilon + ALMOST_ZERO)) { + // printf("dist: %f\n", (float)distance); - printf("dist: %f, tdist: %f\n", (float)distance, tdistance); + // collpair->face1 = tree1->tri_index; + // collpair->face2 = tree2->tri_index; - collpair->face1 = tree1->tri_index; - collpair->face2 = tree2->tri_index; + VECCOPY(collpair->normal, collpair->vector); + Normalize(collpair->normal); collpair->distance = distance; - BLI_linklist_append(&linknode[tree1->tri_index], collpair); + BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); } else { MEM_freeN(collpair); } } + else + { + MEM_freeN(collpair); + } + } +} + +void bvh_collision_response_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + CollPair *collpair = NULL; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0; + + for(i = 0; i < 4; i++) + { + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + // check all possible pairs of triangles + if(i == 0) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; + + } + + if(i == 1) + { + if(face1->v4) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; + } + else + i++; + } + + if(i == 2) + { + if(face2->v4) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; + } + else + i+=2; + } + + if(i == 3) + { + if((face1->v4)&&(face2->v4)) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; + } + else + i++; + } + + // calc SIPcode (?) + + if(i < 4) + { + // calc distance + normal + distance = plNearestPoints( + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, + collpair->pa, collpair->pb, collpair->vector); + + if (distance <= (epsilon + ALMOST_ZERO)) + { + // printf("dist: %f\n", (float)distance); + + // collpair->face1 = tree1->tri_index; + // collpair->face2 = tree2->tri_index; + + VECCOPY(collpair->normal, collpair->vector); + Normalize(collpair->normal); + + collpair->distance = distance; + BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); + } + else + { + MEM_freeN(collpair); + } + } + else + { + MEM_freeN(collpair); + } } } @@ -899,9 +650,9 @@ void cloth_update_collision_objects(float step) // no dt here because of float rounding errors VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); } - + // update BVH of collision object - bvh_update_static(coll_clmd, coll_bvh); + bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); @@ -909,20 +660,22 @@ void cloth_update_collision_objects(float step) } } -#define CLOTH_MAX_THRESHOLD 5 +// CLOTH_MAX_THRESHOLD defines how much collision rounds/loops should be taken +#define CLOTH_MAX_THRESHOLD 10 // cloth - object collisions -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RESPONSE collision_response, float dt) +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { Base *base=NULL; ClothModifierData *coll_clmd=NULL; Cloth *cloth=NULL; Object *coll_ob=NULL; BVH *cloth_bvh=NULL; - unsigned int i=0, numfaces = 0, numverts = 0; - unsigned int result = 0, ic = 0, rounds = 0; + unsigned int i=0, j = 0, numfaces = 0, numverts = 0; + unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; + int ret = 0; if ((clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) { @@ -939,86 +692,96 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update_static(clmd, cloth_bvh); + bvh_update(clmd, cloth_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) // update collision objects cloth_update_collision_objects(step); - + do { result = 0; ic = 0; - - // handle all collision objects + clmd->coll_parms.collision_list = NULL; + + // check all collision objects for (base = G.scene->base.first; base; base = base->next) { - coll_ob = base->object; coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) continue; - + // if collision object go on if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) { - LinkNode **collision_list = MEM_callocN (sizeof(LinkNode *)*(numfaces), "collision_list"); BVH *coll_bvh = coll_clmd->clothObject->tree; - - if(collision_list) - { - memset(collision_list, 0, sizeof(LinkNode *)*numfaces); - clmd->coll_parms.temp = collision_list; - - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, collision_response); - - result += collision_static2(clmd, coll_clmd, collision_list); - - // calculate velocities - - // free temporary list - for(i = 0; i < numfaces; i++) - { - LinkNode *search = collision_list[i]; - while(search) - { - LinkNode *next= search->next; - CollPair *collpair = search->link; - - if(collpair) - MEM_freeN(collpair); - - search = next; - } - - BLI_linklist_free(collision_list[i],NULL); - } - if(collision_list) - MEM_freeN(collision_list); - - clmd->coll_parms.temp = NULL; - } - + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, bvh_collision_response_static); } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } - // now apply impulses parallel - - for(i = 0; i < numverts; i++) + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 50; j++) // 50 is just a value that ensures convergence { - if(verts[i].impulse_count) + result = 0; + + // handle all collision objects + for (base = G.scene->base.first; base; base = base->next) { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject) + result += collision_static(clmd, coll_clmd); + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } } + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + // free collision list + if(clmd->coll_parms.collision_list) + { + LinkNode *search = clmd->coll_parms.collision_list; + while(search) + { + CollPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + + clmd->coll_parms.collision_list = NULL; } printf("ic: %d\n", ic); @@ -1029,18 +792,162 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, CM_COLLISION_RE printf("\n"); //////////////////////////////////////////////////////////// - // update positions + velocities + // update positions + // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } //////////////////////////////////////////////////////////// - - // TODO - //////////////////////////////////////////////////////////// // moving collisions //////////////////////////////////////////////////////////// - // TODO - // bvh_update_moving(clmd, clmd->clothObject->tree); + + // update cloth bvh + bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + + // update moving bvh for collision object once + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + if(!coll_clmd->clothObject) + continue; + + // if collision object go on + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING + } + } + + + do + { + result = 0; + ic = 0; + clmd->coll_parms.collision_list = NULL; + + // check all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, bvh_collision_response_moving); + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + /* + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 50; j++) // 50 is just a value that ensures convergence + { + result = 0; + + // handle all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject) + result += collision_moving(clmd, coll_clmd); + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + */ + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + + // update cloth bvh + bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + + + // free collision list + if(clmd->coll_parms.collision_list) + { + LinkNode *search = clmd->coll_parms.collision_list; + while(search) + { + CollPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + + clmd->coll_parms.collision_list = NULL; + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (CLOTH_MAX_THRESHOLD>rounds)); + + + //////////////////////////////////////////////////////////// + // update positions + velocities + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + //////////////////////////////////////////////////////////// - return MIN2(result, 1); + return MIN2(ret, 1); } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 3994bbf2b40..7f156acff71 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1431,8 +1431,7 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto del_lfvector(dFdXmV); } -int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors, - CM_COLLISION_SELF self_collision, CM_COLLISION_OBJ obj_collision) +int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) { unsigned int i=0, j; float step=0.0f, tf=1.0f; @@ -1492,14 +1491,14 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, bvh_collision_response, dt); + result = cloth_bvh_objcollision(clmd, step + dt, dt); // copy corrected positions back to simulation for(i = 0; i < numverts; i++) { if(result) { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); VECCOPY(verts[i].txold, verts[i].tx); diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 0088ff92364..51c571f1959 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -123,7 +123,7 @@ static float KDOP_AXES[13][3] = // #define KDOP_8 // OBB: -#define KDOP_14 +#define KDOP_6 @@ -424,54 +424,52 @@ DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, flo } } } -/* + DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) { -ClothVertex *tempMVert = bvh->verts; -MFace *tempMFace = bvh->mfaces; -float *tempBV = bv; -float newminmax; -int i, j, k; -for (j = 0; j < numfaces; j++) -{ -tempMFace = bvh->mfaces + (tri [j])->tri_index; -// 3 or 4 vertices per face. -for (k = 0; k < 4; k++) -{ -int temp = 0; -// If this is a triangle. -if (k == 3 && !tempMFace->v4) -continue; -// TODO: other name for "temp" this gets all vertices of a face -if (k == 0) -temp = tempMFace->v1; -else if (k == 1) -temp = tempMFace->v2; -else if (k == 2) -temp = tempMFace->v3; -else if (k == 3) -temp = tempMFace->v4; -// for all Axes. -for (i = KDOP_START; i < KDOP_END; i++) -{ -newminmax = INPR(tempMVert[temp].tx, KDOP_AXES[i]); -if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) -tempBV[(2 * i)] = newminmax; -// the same like some "else if" but with that condition I -// don't need to insert the first entry manually -if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) -tempBV[(2 * i) + 1] = newminmax; + ClothVertex *tempMVert = bvh->verts; + MFace *tempMFace = bvh->mfaces; + float *tempBV = bv; + float newminmax; + int i, j, k; + for (j = 0; j < numfaces; j++) + { + tempMFace = bvh->mfaces + (tri [j])->tri_index; + // 3 or 4 vertices per face. + for (k = 0; k < 4; k++) + { + int temp = 0; + // If this is a triangle. + if (k == 3 && !tempMFace->v4) + continue; + // TODO: other name for "temp" this gets all vertices of a face + if (k == 0) + temp = tempMFace->v1; + else if (k == 1) + temp = tempMFace->v2; + else if (k == 2) + temp = tempMFace->v3; + else if (k == 3) + temp = tempMFace->v4; + // for all Axes. + for (i = KDOP_START; i < KDOP_END; i++) + { + newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); + if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) + tempBV[(2 * i)] = newminmax; + if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) + tempBV[(2 * i) + 1] = newminmax; + + newminmax = INPR(tempMVert[temp].tx, KDOP_AXES[i]); + if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) + tempBV[(2 * i)] = newminmax; + if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) + tempBV[(2 * i) + 1] = newminmax; + } + } + } +} -newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); -if (newminmax < tempBV[(2 * i)]) -tempBV[(2 * i)] = newminmax; -if (newminmax > tempBV[(2 * i) + 1]) -tempBV[(2 * i) + 1] = newminmax; -} -} -} -} -*/ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) { int i = 0; @@ -810,7 +808,7 @@ void bvh_join(Tree * tree) } // update static bvh -void bvh_update_static(ClothModifierData * clmd, BVH * bvh) +void bvh_update(ClothModifierData *clmd, BVH * bvh, int moving) { TreeNode *leaf, *parent; int traversecheck = 1; // if this is zero we don't go further @@ -823,7 +821,10 @@ void bvh_update_static(ClothModifierData * clmd, BVH * bvh) { leaf->parent->traversed = 0; } - bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv); + if(!moving) + bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv); + else + bvh_calc_DOP_hull_moving(bvh, &leaf, 1, leaf->bv); // inflate the bv with some epsilon for (j = KDOP_START; j < KDOP_END; j++) @@ -859,3 +860,4 @@ void bvh_update_static(ClothModifierData * clmd, BVH * bvh) } } } + diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 574537f2589..6e986ae0067 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -123,7 +123,7 @@ typedef struct CollisionSettings { float friction; /* Friction/damping applied on contact with other object.*/ short collision_type; /* which collision system is used. */ short loop_count; /* How many iterations for the collision loop. */ - void *temp; /* e.g. pointer to temp memory for collisions */ + struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ } CollisionSettings; From a5db16f913f736b028e4afb190213d346a086233 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 2 Oct 2007 09:47:08 +0000 Subject: [PATCH 021/430] Fixed crash with ipo'ed collision object --- source/blender/blenkernel/BKE_cloth.h | 14 ++++---- source/blender/blenkernel/intern/cloth.c | 44 +++++++++++++++--------- source/blender/blenkernel/intern/kdop.c | 3 +- source/blender/src/headerbuttons.c | 1 + 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index bbdf4bc01c9..4a160275a99 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -86,12 +86,12 @@ struct DerivedMesh; typedef enum { CSIMSETT_FLAG_RESET = (1 << 1), // The CM object requires a reinitializaiton. - CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done - CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled - CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache - CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache - CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled - CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled + CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done + CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled + CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache + CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache + CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled + CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled } CSIMSETT_FLAGS; /* Spring types as defined in the paper.*/ @@ -106,7 +106,7 @@ typedef enum typedef enum { CSPRING_FLAG_DEACTIVATE = (1 << 1), - CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied + CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied } CSPRINGS_FLAGS; // needed for buttons_object.c diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 940fc8b6c5b..35d5771b135 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -656,6 +656,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // only be active during a specific period: // that's "first frame" and "last frame" on GUI + if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) { if(current_time < clmd->sim_parms.firstframe) @@ -699,7 +700,11 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) { if(!collobj_from_object (ob, clmd, dm, vertexCos, framenr)) + { + clmd->sim_parms.flags |= CSIMSETT_FLAG_COLLOBJ; + cloth_free_modifier(clmd); return; + } if(clmd->clothObject == NULL) return; @@ -712,7 +717,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, clmd->sim_parms.sim_time = current_time; verts = cloth->verts; - + for (i = 0; i < clmd->clothObject->numverts; i++, verts++) { // Save the previous position. @@ -753,24 +758,24 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, { verts = cloth->verts; - /* Force any pinned verts to their constrained location. */ + // Force any pinned verts to their constrained location. for (i = 0; i < clmd->clothObject->numverts; i++, verts++) { - /* Save the previous position. */ + // Save the previous position. VECCOPY (verts->xold, verts->xconst); VECCOPY (verts->txold, verts->x); - /* Get the current position. */ + // Get the current position. VECCOPY (verts->xconst, vertexCos[i]); Mat4MulVecfl(ob->obmat, verts->xconst); } tstart(); - /* Call the solver. */ + // Call the solver. if (solvers [clmd->sim_parms.solver_type].solver) solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); - + tend(); printf("Cloth simulation time: %f\n", (float)tval()); @@ -801,6 +806,7 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } } } + } /* frees all */ @@ -815,7 +821,7 @@ void cloth_free_modifier (ClothModifierData *clmd) if(!(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_PROTECT)) { - // free our frame cache + // free our frame cache, TODO: but get to first position before clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; cloth_cache_free(clmd, 0); @@ -848,10 +854,10 @@ void cloth_free_modifier (ClothModifierData *clmd) // we save our faces for collision objects if(cloth->mfaces) MEM_freeN(cloth->mfaces); - + /* if(clmd->clothObject->facemarks) MEM_freeN(clmd->clothObject->facemarks); - + */ MEM_freeN (cloth); clmd->clothObject = NULL; } @@ -965,8 +971,8 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); if (clmd->clothObject) { - clmd->clothObject->old_solver_type = -1; - clmd->clothObject->old_collision_type = -1; + clmd->clothObject->old_solver_type = 255; + clmd->clothObject->old_collision_type = 255; } else if (clmd->clothObject == NULL) { @@ -986,8 +992,12 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh if (clmd->clothObject != NULL) { - mvert = CDDM_get_verts(dm); + if (!dm) return 0; + if (!dm->getNumVerts(dm) || !dm->getNumFaces(dm)) return 0; + + mvert = dm->getVertArray(dm); verts = clmd->clothObject->verts; + numverts = clmd->clothObject->numverts = dm->getNumVerts(dm); for (i = 0; i < numverts; i++, verts++) { @@ -1004,7 +1014,7 @@ static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh clmd->clothObject->tree = bvh_build(clmd,clmd->coll_parms.epsilon); } - + return 1; default: return 0; // TODO - we do not support changing meshes } @@ -1175,8 +1185,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); if (clmd->clothObject) { - clmd->clothObject->old_solver_type = -1; - clmd->clothObject->old_collision_type = -1; + clmd->clothObject->old_solver_type = 255; + clmd->clothObject->old_collision_type = 255; } else if (clmd->clothObject == NULL) { @@ -1242,7 +1252,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); - cloth_cache_set_frame(clmd, 1); + // cloth_cache_set_frame(clmd, 1); } return 1; @@ -1265,7 +1275,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d { unsigned int numverts = dm->getNumVerts(dm); unsigned int numfaces = dm->getNumFaces(dm); - MFace *mface = CDDM_get_faces(dm); + MFace *mface = dm->getFaceArray(dm); unsigned int i = 0; /* Allocate our vertices. diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 51c571f1959..a2d89be5d09 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -572,6 +572,7 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) bvh->flags = 0; bvh->leaf_tree = NULL; bvh->leaf_root = NULL; + bvh->tree = NULL; bvh->epsilon = epsilon; bvh->numfaces = cloth->numfaces; @@ -581,7 +582,7 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) bvh->verts = cloth->verts; tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); // TODO: check succesfull alloc - BLI_linklist_prepend(&bvh->tree, tree); + BLI_linklist_append(&bvh->tree, tree); nlink = bvh->tree; diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 4564db8d918..617bef705df 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -1067,6 +1067,7 @@ void do_global_buttons(unsigned short event) else if(nr==ID_LA) idtest= (ID *)add_ipo("LaIpo", nr); else if(nr==ID_CA) idtest= (ID *)add_ipo("CaIpo", nr); else if(nr==ID_SO) idtest= (ID *)add_ipo("SndIpo", nr); + else if(nr==ID_FLUIDSIM) idtest= (ID *)add_ipo("FluidsimIpo", nr); else error("Warn bugtracker!"); } idtest->us--; From 179a1b5bbc9d2bd238883e6135209357c53e4235 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 2 Oct 2007 16:55:10 +0000 Subject: [PATCH 022/430] Compile fix for bug on OSX reported by Jens Verwiebe --- source/blender/blenkernel/intern/kdop.c | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index a2d89be5d09..7ce5e6928ea 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -165,7 +165,7 @@ static int size_threshold = 16; /* * Common methods for all algorithms */ -DO_INLINE void exchange(Tree **a, int i, int j) +DO_INLINE void bvh_exchange(Tree **a, int i, int j) { Tree *t=a[i]; a[i]=a[j]; @@ -179,7 +179,7 @@ DO_INLINE int floor_lg(int a) /* * Insertion sort algorithm */ -static void insertionsort(Tree **a, int lo, int hi, int axis) +static void bvh_insertionsort(Tree **a, int lo, int hi, int axis) { int i,j; Tree *t; @@ -196,7 +196,7 @@ static void insertionsort(Tree **a, int lo, int hi, int axis) } } -static int partition(Tree **a, int lo, int hi, Tree * x, int axis) +static int bvh_partition(Tree **a, int lo, int hi, Tree * x, int axis) { int i=lo, j=hi; while (1) @@ -206,7 +206,7 @@ static int partition(Tree **a, int lo, int hi, Tree * x, int axis) while (x->bv[axis] < (a[j])->bv[axis]) j=j-1; if(!(i < j)) return i; - exchange(a, i,j); + bvh_exchange(a, i,j); i++; } } @@ -214,7 +214,7 @@ static int partition(Tree **a, int lo, int hi, Tree * x, int axis) /* * Heapsort algorithm */ -static void downheap(Tree **a, int i, int n, int lo, int axis) +static void bvh_downheap(Tree **a, int i, int n, int lo, int axis) { Tree * d = a[lo+i-1]; int child; @@ -232,21 +232,21 @@ static void downheap(Tree **a, int i, int n, int lo, int axis) a[lo+i-1] = d; } -static void heapsort(Tree **a, int lo, int hi, int axis) +static void bvh_heapsort(Tree **a, int lo, int hi, int axis) { int n = hi-lo, i; for (i=n/2; i>=1; i=i-1) { - downheap(a, i,n,lo, axis); + bvh_downheap(a, i,n,lo, axis); } for (i=n; i>1; i=i-1) { - exchange(a, lo,lo+i-1); - downheap(a, 1,i-1,lo, axis); + bvh_exchange(a, lo,lo+i-1); + bvh_downheap(a, 1,i-1,lo, axis); } } -static Tree *medianof3(Tree **a, int lo, int mid, int hi, int axis) // returns Sortable +static Tree *bvh_medianof3(Tree **a, int lo, int mid, int hi, int axis) // returns Sortable { if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) { @@ -276,7 +276,7 @@ static Tree *medianof3(Tree **a, int lo, int mid, int hi, int axis) // returns S /* * Quicksort algorithm modified for Introsort */ -static void introsort_loop (Tree **a, int lo, int hi, int depth_limit, int axis) +static void bvh_introsort_loop (Tree **a, int lo, int hi, int depth_limit, int axis) { int p; @@ -284,28 +284,28 @@ static void introsort_loop (Tree **a, int lo, int hi, int depth_limit, int axis) { if (depth_limit == 0) { - heapsort(a, lo, hi, axis); + bvh_heapsort(a, lo, hi, axis); return; } depth_limit=depth_limit-1; - p=partition(a, lo, hi, medianof3(a, lo, lo+((hi-lo)/2)+1, hi-1, axis), axis); - introsort_loop(a, p, hi, depth_limit, axis); + p=bvh_partition(a, lo, hi, bvh_medianof3(a, lo, lo+((hi-lo)/2)+1, hi-1, axis), axis); + bvh_introsort_loop(a, p, hi, depth_limit, axis); hi=p; } } -DO_INLINE void sort(Tree **a0, int begin, int end, int axis) +DO_INLINE void bvh_sort(Tree **a0, int begin, int end, int axis) { if (begin < end) { Tree **a=a0; - introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); - insertionsort(a, begin, end, axis); + bvh_introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); + bvh_insertionsort(a, begin, end, axis); } } DO_INLINE void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) { - sort(face_list, start, end, axis); + bvh_sort(face_list, start, end, axis); } //////////////////////////////////////////////////////////////////////////////////////////////// void bvh_free(BVH * bvh) From 62107985dd1db0337827da9a919b2ee04da8a127 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 3 Oct 2007 13:58:05 +0000 Subject: [PATCH 023/430] Recoded cache, fixed some crashes there --- source/blender/blenkernel/BKE_cloth.h | 8 +- source/blender/blenkernel/intern/cloth.c | 372 +++++++++++------------ source/blender/src/buttons_object.c | 10 +- 3 files changed, 187 insertions(+), 203 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 4a160275a99..8750fe3878c 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -34,6 +34,7 @@ #ifndef BKE_CLOTH_H #define BKE_CLOTH_H +#include "BLI_linklist.h" #include "BKE_DerivedMesh.h" #include "DNA_customdata_types.h" #include "BKE_customdata.h" @@ -88,10 +89,8 @@ typedef enum CSIMSETT_FLAG_RESET = (1 << 1), // The CM object requires a reinitializaiton. CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled - CSIMSETT_FLAG_CCACHE_FREE_ALL = (1 << 4), // delete all from cache - CSIMSETT_FLAG_CCACHE_FREE_PART = (1 << 5), // delete some part of cache - CSIMSETT_FLAG_TEARING_ENABLED = (1 << 6), // true if tearing is enabled - CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 7), // true if tearing is enabled + CSIMSETT_FLAG_TEARING_ENABLED = (1 << 4), // true if tearing is enabled + CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 5), // true if tearing is enabled } CSIMSETT_FLAGS; /* Spring types as defined in the paper.*/ @@ -221,6 +220,7 @@ typedef struct Frame { ClothVertex *verts; ClothSpring *springs; + unsigned int numverts, numsprings; float time; /* we need float since we want to support sub-frames */ } Frame; diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 35d5771b135..e86d1c50b69 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -403,230 +403,198 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) int cloth_cache_search_frame(ClothModifierData *clmd, float time) { Frame *frame = NULL; - LinkNode *search = NULL; - int newtime = time + clmd->sim_parms.preroll; - - Cloth *cloth = NULL; - - if(!clmd) - return 0; - - cloth = clmd->clothObject; - - if(!cloth) - return 0; - - if(clmd->sim_parms.cache) - { + LinkNode *search = NULL; + + if(clmd->clothObject) + { search = clmd->sim_parms.cache; - - // check if frame exists + while(search) { - frame = search->link; - - if(frame->time == newtime) - break; - - frame = NULL; - - search = search->next; - } - } - - if(!frame) - return 0; - - return 1; -} - -int cloth_cache_last_frame(ClothModifierData *clmd) -{ - Frame *frame = NULL; - LinkNode *search = NULL; - int temptime = 0; - - Cloth *cloth = NULL; - - if(!clmd) - return 0; - - cloth = clmd->clothObject; - - if(!cloth) - return 0; - - if(clmd->sim_parms.cache) - { - search = clmd->sim_parms.cache; - - // check if frame exists - while(search) - { - frame = search->link; - - if(frame->time > temptime) + frame = (Frame *)search->link; + + if(frame) { - temptime = frame->time; + if(frame->time == time) + return 1; } - + search = search->next; } - } - return temptime; + } + + return 0; + +} + +float cloth_cache_last_frame(ClothModifierData *clmd) +{ + Frame *frame = NULL; + LinkNode *search = NULL; + float time = 0; + + if(clmd->clothObject) + { + search = clmd->sim_parms.cache; + + while(search) + { + frame = (Frame *)search->link; + + if(frame) + { + if(frame->time > time) + time = frame->time; + } + } + } + return time; +} + +float cloth_cache_first_frame(ClothModifierData *clmd) +{ + Frame *frame = NULL; + LinkNode *search = NULL; + float time = -1.0; + + if(clmd->clothObject) + { + search = clmd->sim_parms.cache; + + while(search) + { + frame = (Frame *)search->link; + + if(frame) + { + if(time < 0.0) + time = frame->time; + else + { + if(frame->time < time) + time = frame->time; + } + } + } + } + return time; } void cloth_cache_get_frame(ClothModifierData *clmd, float time) { Frame *frame = NULL; LinkNode *search = NULL; - unsigned int i = 0; - Cloth *cloth = NULL; - int newtime = time + clmd->sim_parms.preroll; - - if(clmd) + float newtime = time + clmd->sim_parms.preroll; + + if(clmd->clothObject) { - cloth = clmd->clothObject; - - if(!cloth) - return; - - // get cache - if(clmd->sim_parms.cache) + search = clmd->sim_parms.cache; + + while(search) { - search = clmd->sim_parms.cache; - frame = NULL; - // check if frame exists - while(search) - { - frame = search->link; - if(frame->time == newtime) - break; - - frame = NULL; - - search = search->next; - } - + frame = (Frame *)search->link; + if(frame) { - if(frame->verts) + if(frame->time == newtime) { - - // copy ClothVertex struct - memcpy(cloth->verts, frame->verts, cloth->numverts*sizeof(ClothVertex)); + // something changed, free cache! + if(clmd->clothObject->numverts != frame->numverts) + { + cloth_cache_free(clmd, 0); + printf("clmd->clothObject->numverts != frame->numverts\n"); + return; + } + + memcpy(clmd->clothObject->verts, frame->verts, sizeof(ClothVertex)*frame->numverts); implicit_set_positions(clmd); + + return; } - /* - if(frame->springs) - { - // copy ClothSpring struct - memcpy(cloth->springs, frame->springs, cloth->numsprings*sizeof(ClothSpring)); - } - */ } + + search = search->next; } } - } void cloth_cache_set_frame(ClothModifierData *clmd, float time) { Frame *frame = NULL; - unsigned int i = 0; - Cloth *cloth = NULL; - int newtime = time + clmd->sim_parms.preroll; - - if(clmd) + LinkNode *search = NULL; + + if(clmd->clothObject) { - cloth = clmd->clothObject; - - if(cloth) - { - // creat new frame cache - frame = (Frame *)MEM_callocN(sizeof(Frame), "cloth frame cache"); - frame->verts = (ClothVertex *)MEM_callocN(sizeof(ClothVertex)*cloth->numverts, "cloth frame vertex cache"); - frame->springs = NULL; - /* - frame->springs = (ClothSpring *)MEM_callocN(sizeof(ClothSpring)*cloth->numsprings, "cloth frame spring cache"); - */ - frame->time = newtime; - - // copy ClothVertex struct - for(i = 0; i < cloth->numverts; i++) - { - memcpy(&frame->verts[i], &cloth->verts[i], sizeof(ClothVertex)); - } - /* - // copy ClothSpring struct - for(i = 0; i < cloth->numsprings; i++) - { - memcpy(&frame->springs[i], &cloth->springs[i], sizeof(ClothSpring)); - } - */ - } + frame = (Frame *)MEM_callocN (sizeof (Frame), "cloth_cache_frame"); + if(frame) + { + frame->time = time; + frame->numverts = clmd->clothObject->numverts; + frame->verts = MEM_dupallocN(clmd->clothObject->verts); + + if(!frame->verts) + { + MEM_freeN(frame); + return; + } + BLI_linklist_append(&clmd->sim_parms.cache, frame); - } + + } + } + } // free cloth cache void cloth_cache_free(ClothModifierData *clmd, float time) { Frame *frame = NULL; - LinkNode *search, *last_search; - int newtime = time + clmd->sim_parms.preroll; + LinkNode *search = NULL, *lastsearch = NULL; + float newtime = time + clmd->sim_parms.preroll; + + if(time <= 2.0) + newtime = time; - // do never free first cached frame - if((newtime<1.0f) && !(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL)) - return; - - /* Calls the solver and collision frees first as they - * might depend on data in clmd->clothObject. */ - - if (clmd) + if(clmd->clothObject) { if(clmd->sim_parms.cache) - { - last_search = search = clmd->sim_parms.cache; + { + lastsearch = search = clmd->sim_parms.cache; + while(search) { - LinkNode *next= search->next; - frame = search->link; - - // free part of cache, but not preroll cache and first framer - if((clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_PART) - && (frame->time > newtime)) // do not delete the first frame + frame = (Frame *)search->link; + + if(frame->time >= newtime) { - MEM_freeN(frame->verts); - // MEM_freeN(frame->springs); - MEM_freeN(frame); + if(frame->verts) + { + MEM_freeN(frame->verts); + } + MEM_freeN(frame); + + lastsearch->next = search->next; MEM_freeN(search); - last_search->next = next; - } - else if(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL) // free COMPLETE cache - { - MEM_freeN(frame->verts); - // MEM_freeN(frame->springs); - MEM_freeN(frame); + search = lastsearch->next; + lastsearch->next = NULL; } else - last_search = search; - search = next; + { + lastsearch = search; + search = search->next; + } } - - if(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_FREE_ALL) + + if(time <= 1.0) { - BLI_linklist_free(clmd->sim_parms.cache,NULL); clmd->sim_parms.cache = NULL; } + + if(time <= 2.0) + clmd->sim_parms.preroll = 0; } } - - /* clear flags */ - clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_FREE_ALL; - clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_FREE_PART; - } @@ -656,25 +624,44 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // only be active during a specific period: // that's "first frame" and "last frame" on GUI - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) { - if(current_time < clmd->sim_parms.firstframe) - return; - else if(current_time > clmd->sim_parms.lastframe) + if(clmd->clothObject) { - int frametime = cloth_cache_last_frame(clmd); - if(cloth_cache_search_frame(clmd, frametime)) + if(clmd->sim_parms.cache) { - cloth_cache_get_frame(clmd, frametime); - cloth_to_object (ob, clmd, vertexCos, numverts); + if(current_time < clmd->sim_parms.firstframe) + { + int frametime = cloth_cache_first_frame(clmd); + if(cloth_cache_search_frame(clmd, frametime)) + { + cloth_cache_get_frame(clmd, frametime); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + return; + } + else if(current_time > clmd->sim_parms.lastframe) + { + int frametime = cloth_cache_last_frame(clmd); + if(cloth_cache_search_frame(clmd, frametime)) + { + cloth_cache_get_frame(clmd, frametime); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + return; + } + else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed + { + if(cloth_cache_search_frame(clmd, framenr)) + { + cloth_cache_get_frame(clmd, framenr); + cloth_to_object (ob, clmd, vertexCos, numverts); + } + clmd->sim_parms.sim_time = current_time; + return; + } } - return; - } - else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed - { - if(!cloth_cache_search_frame(clmd, framenr)) - return; + } } @@ -822,7 +809,6 @@ void cloth_free_modifier (ClothModifierData *clmd) if(!(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_PROTECT)) { // free our frame cache, TODO: but get to first position before - clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_ALL; cloth_cache_free(clmd, 0); if (cloth) @@ -838,14 +824,14 @@ void cloth_free_modifier (ClothModifierData *clmd) MEM_freeN (cloth->verts); cloth->verts = NULL; - cloth->numverts = -1; + cloth->numverts = 0; // Free the springs. if (cloth->springs != NULL) MEM_freeN (cloth->springs); cloth->springs = NULL; - cloth->numsprings = -1; + cloth->numsprings = 0; // free BVH collision tree if(cloth->tree) @@ -1242,17 +1228,17 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY(verts->impulse, tnull); } - /* apply / set vertex groups */ + // apply / set vertex groups if (clmd->sim_parms.vgroup_mass > 0) cloth_apply_vgroup (clmd, dm, clmd->sim_parms.vgroup_mass); - /* init our solver */ + // init our solver if (solvers [clmd->sim_parms.solver_type].init) solvers [clmd->sim_parms.solver_type].init (ob, clmd); clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); - // cloth_cache_set_frame(clmd, 1); + cloth_cache_set_frame(clmd, 1); } return 1; @@ -1392,7 +1378,7 @@ int cloth_build_springs(Cloth *cloth, DerivedMesh *dm) springs[temp_index].restlen = sqrt(INPR(temp, temp)); springs[temp_index].type = SHEAR; - BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); + BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); shear_springs++; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 37e232a9f97..3faf298db0e 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2160,8 +2160,7 @@ void do_object_panels(unsigned short event) CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_PART; - cloth_cache_free(clmd, 1); + cloth_cache_free(clmd, 2); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } @@ -2172,11 +2171,8 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - clmd->sim_parms.flags |= CSIMSETT_FLAG_CCACHE_FREE_PART; - cloth_cache_free(clmd, G.scene->r.cfra); - DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + cloth_cache_free(clmd, MAX2(2.0,G.scene->r.cfra+1.0)); allqueue(REDRAWBUTSOBJECT, 0); - allqueue(REDRAWVIEW3D, 0); } } break; @@ -3256,6 +3252,8 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); if(length>1) // B_CLOTH_CHANGEPREROLL uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + else + uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); } else { From 265572744e00a9b746b01a57aac950298933623a Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 3 Oct 2007 22:43:26 +0000 Subject: [PATCH 024/430] New: Collision detection for inter-timestep-collisions for triangle-point contacts. No response yet though. --- source/blender/blenkernel/BKE_cloth.h | 24 +- source/blender/blenkernel/intern/collision.c | 506 +++++++++++-------- 2 files changed, 329 insertions(+), 201 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 8750fe3878c..dc8d33804ee 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -235,9 +235,31 @@ typedef struct CollPair float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 int lastsign; // indicates if the distance sign has changed, unused itm float time; // collision time, from 0 up to 1 - unsigned int ap1, ap2, ap3, bp1, bp2, bp3; + unsigned int ap1, ap2, ap3, bp1, bp2, bp3, bp4; + unsigned int pointsb[4]; } CollPair; +/* used for collisions in collision.c */ +typedef struct EdgeCollPair +{ + unsigned int p11, p12, p21, p22; + float normal[3]; + float vector[3]; + float time; + int lastsign; + float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 +} EdgeCollPair; + +/* used for collisions in collision.c */ +typedef struct FaceCollPair +{ + unsigned int p11, p12, p13, p21; + float normal[3]; + float vector[3]; + float time; + int lastsign; + float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 +} FaceCollPair; #endif diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 20c1548e14b..6100ff143d5 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -71,123 +71,254 @@ #include "Bullet-C-Api.h" -#define DERANDOMIZE 1 +/** + * gsl_poly_solve_cubic - + * + * copied from SOLVE_CUBIC.C --> GSL + */ +#define mySWAP(a,b) do { float tmp = b ; b = a ; a = tmp ; } while(0) -enum TRIANGLE_MARK -{ - TM_MV = 1, - TM_ME = 2, - TM_V1 = 4, - TM_V2 = 8, - TM_V3 = 16, - TM_E1 = 32, - TM_E2 = 64, - TM_E3 = 128 -}; - -DO_INLINE int hasTriangleMark(unsigned char mark, unsigned char bit) { return mark & bit; } -DO_INLINE void setTriangleMark(unsigned char *mark, unsigned char bit) { mark[0] |= bit; } -DO_INLINE void clearTriangleMark(unsigned char *mark, unsigned char bit) { mark[0] &= ~bit; } - - -void generateTriangleMarks() +int gsl_poly_solve_cubic (float a, float b, float c, float *x0, float *x1, float *x2) { - /* - unsigned int firstEdge = 0; + float q = (a * a - 3 * b); + float r = (2 * a * a * a - 9 * a * b + 27 * c); + + float Q = q / 9; + float R = r / 54; + + float Q3 = Q * Q * Q; + float R2 = R * R; + + float CR2 = 729 * r * r; + float CQ3 = 2916 * q * q * q; + + if (R == 0 && Q == 0) + { + *x0 = - a / 3 ; + *x1 = - a / 3 ; + *x2 = - a / 3 ; + return 3 ; + } + else if (CR2 == CQ3) + { + /* this test is actually R2 == Q3, written in a form suitable + for exact computation with integers */ + + /* Due to finite precision some float roots may be missed, and + considered to be a pair of complex roots z = x +/- epsilon i + close to the real axis. */ + + float sqrtQ = sqrtf (Q); + + if (R > 0) + { + *x0 = -2 * sqrtQ - a / 3; + *x1 = sqrtQ - a / 3; + *x2 = sqrtQ - a / 3; + } + else + { + *x0 = - sqrtQ - a / 3; + *x1 = - sqrtQ - a / 3; + *x2 = 2 * sqrtQ - a / 3; + } + return 3 ; + } + else if (CR2 < CQ3) /* equivalent to R2 < Q3 */ + { + float sqrtQ = sqrtf (Q); + float sqrtQ3 = sqrtQ * sqrtQ * sqrtQ; + float theta = acosf (R / sqrtQ3); + float norm = -2 * sqrtQ; + *x0 = norm * cosf (theta / 3) - a / 3; + *x1 = norm * cosf ((theta + 2.0 * M_PI) / 3) - a / 3; + *x2 = norm * cosf ((theta - 2.0 * M_PI) / 3) - a / 3; + + /* Sort *x0, *x1, *x2 into increasing order */ + + if (*x0 > *x1) + mySWAP(*x0, *x1) ; + + if (*x1 > *x2) + { + mySWAP(*x1, *x2) ; + + if (*x0 > *x1) + mySWAP(*x0, *x1) ; + } + + return 3; + } + else + { + float sgnR = (R >= 0 ? 1 : -1); + float A = -sgnR * powf (fabs (R) + sqrtf (R2 - Q3), 1.0/3.0); + float B = Q / A ; + *x0 = A + B - a / 3; + return 1; + } +} + + +/** + * gsl_poly_solve_quadratic + * + * copied from GSL + */ +int gsl_poly_solve_quadratic (float a, float b, float c, float *x0, float *x1) +{ + float disc = b * b - 4 * a * c; + + if (disc > 0) + { + if (b == 0) + { + float r = fabs (0.5 * sqrtf (disc) / a); + *x0 = -r; + *x1 = r; + } + else + { + float sgnb = (b > 0 ? 1 : -1); + float temp = -0.5 * (b + sgnb * sqrtf (disc)); + float r1 = temp / a ; + float r2 = c / temp ; + + if (r1 < r2) + { + *x0 = r1 ; + *x1 = r2 ; + } + else + { + *x0 = r2 ; + *x1 = r1 ; + } + } + return 2; + } + else if (disc == 0) + { + *x0 = -0.5 * b / a ; + *x1 = -0.5 * b / a ; + return 2 ; + } + else + { + return 0; + } +} + + + +/* + * See Bridson et al. "Robust Treatment of Collision, Contact and Friction for Cloth Animation" + * page 4, left column + */ + +int cloth_get_collision_time(float a[3], float b[3], float c[3], float d[3], float e[3], float f[3], float solution[3]) +{ + int num_sols = 0; - // 1. Initialization - memset(m_triangleMarks, 0, sizeof(unsigned char) * m_triangleCount); + float g = -a[2] * c[1] * e[0] + a[1] * c[2] * e[0] + + a[2] * c[0] * e[1] - a[0] * c[2] * e[1] - + a[1] * c[0] * e[2] + a[0] * c[1] * e[2]; - // 2. The Marking Process - - // 2.1 Randomly mark triangles for covering vertices. - for (unsigned int v = 0; v < m_vertexCount; ++v) + float h = -b[2] * c[1] * e[0] + b[1] * c[2] * e[0] - a[2] * d[1] * e[0] + + a[1] * d[2] * e[0] + b[2] * c[0] * e[1] - b[0] * c[2] * e[1] + + a[2] * d[0] * e[1] - a[0] * d[2] * e[1] - b[1] * c[0] * e[2] + + b[0] * c[1] * e[2] - a[1] * d[0] * e[2] + a[0] * d[1] * e[2] - + a[2] * c[1] * f[0] + a[1] * c[2] * f[0] + a[2] * c[0] * f[1] - + a[0] * c[2] * f[1] - a[1] * c[0] * f[2] + a[0] * c[1] * f[2]; + + float i = -b[2] * d[1] * e[0] + b[1] * d[2] * e[0] + + b[2] * d[0] * e[1] - b[0] * d[2] * e[1] - + b[1] * d[0] * e[2] + b[0] * d[1] * e[2] - + b[2] * c[1] * f[0] + b[1] * c[2] * f[0] - + a[2] * d[1] * f[0] + a[1] * d[2] * f[0] + + b[2] * c[0] * f[1] - b[0] * c[2] * f[1] + + a[2] * d[0] * f[1] - a[0] * d[2] * f[1] - + b[1] * c[0] * f[2] + b[0] * c[1] * f[2] - + a[1] * d[0] * f[2] + a[0] * d[1] * f[2]; + + float j = -b[2] * d[1] * f[0] + b[1] * d[2] * f[0] + + b[2] * d[0] * f[1] - b[0] * d[2] * f[1] - + b[1] * d[0] * f[2] + b[0] * d[1] * f[2]; + + // Solve cubic equation to determine times t1, t2, t3, when the collision will occur. + if(ABS(j) > ALMOST_ZERO) { - if (vertexCover(v) == 0) + i /= j; + h /= j; + g /= j; + + num_sols = gsl_poly_solve_cubic(i, h, g, &solution[0], &solution[1], &solution[2]); + } + else if(ABS(i) > ALMOST_ZERO) + { + num_sols = gsl_poly_solve_quadratic(i, h, g, &solution[0], &solution[1]); + solution[2] = -1.0; + } + else if(ABS(h) > ALMOST_ZERO) + { + solution[0] = -g / h; + solution[1] = solution[2] = -1.0; + num_sols = 1; + } + else if(ABS(g) > ALMOST_ZERO) + { + solution[0] = 0; + solution[1] = solution[2] = -1.0; + num_sols = 1; + } + + // Discard negative solutions + if ((num_sols >= 1) && (solution[0] < 0)) + { + --num_sols; + solution[0] = solution[num_sols]; + } + if ((num_sols >= 2) && (solution[1] < 0)) + { + --num_sols; + solution[1] = solution[num_sols]; + } + if ((num_sols == 3) && (solution[2] < 0)) + { + --num_sols; + } + + // Sort + if (num_sols == 2) + { + if (solution[0] > solution[1]) + { + double tmp = solution[0]; + solution[0] = solution[1]; + solution[1] = tmp; + } + } + else if (num_sols == 3) { - // Randomly select an edge whose first triangle we're going to flag. + // Bubblesort + if (solution[0] > solution[1]) { + double tmp = solution[0]; solution[0] = solution[1]; solution[1] = tmp; + } + if (solution[1] > solution[2]) { + double tmp = solution[1]; solution[1] = solution[2]; solution[2] = tmp; + } + if (solution[0] > solution[1]) { + double tmp = solution[0]; solution[0] = solution[1]; solution[1] = tmp; + } + } -#ifndef DERANDOMIZE - firstEdge = (unsigned int)((float)(random() & 0x7FFFFFFF) / - (float)(0x80000000) * - (float)(m_vertices[v].getEdgeCount())); -#endif - for (unsigned int ofs = 0; ofs < m_vertices[v].getEdgeCount(); ++ofs) - { - unsigned int edgeIdx = (firstEdge + ofs) % m_vertices[v].getEdgeCount(); - if (m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangleCount()) - setTriangleMark(m_triangleMarks[m_edges[m_vertices[v].getEdge(edgeIdx)].getTriangle(0)], TM_MV); -} -} -} - */ - /* If the Cloth is malformed (vertices without adjacent triangles) there might still be uncovered vertices. (Bad luck.) */ - /* - // 2.2 Randomly mark triangles for covering edges. - for (unsigned int e = 0; e < m_edgeCount; ++e) - { - if (m_edges[e].getTriangleCount() && (edgeCover(e) == 0)) - { -#ifndef DERANDOMIZE - setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(static_cast((float)(random() & 0x7FFFFFFF) / - (float)(0x80000000) * - (float)(m_edges[e].getTriangleCount())))], TM_ME); -#else - setTriangleMark(m_triangleMarks[m_edges[e].getTriangle(0)], TM_ME); -#endif -} -} - - - // 3. The Unmarking Process - for (unsigned int t = 0; (t < m_triangleCount); ++t) - { - bool overCoveredVertices = true; - bool overCoveredEdges = true; - for (unsigned char i = 0; (i < 3) && (overCoveredVertices || overCoveredEdges); ++i) - { - - if (vertexCover(m_triangles[t].getVertex(i)) == 1) - overCoveredVertices = false; - if (edgeCover(m_triangles[t].getEdge(i)) == 1) - overCoveredEdges = false; - - assert(vertexCover(m_triangles[t].getVertex(i)) > 0); - assert(edgeCover(m_triangles[t].getEdge(i)) > 0); -} - if (overCoveredVertices) - clearTriangleMark(m_triangleMarks[t], TM_MV); - if (overCoveredEdges) - clearTriangleMark(m_triangleMarks[t], TM_ME); -} - - - // 4. The Bit Masking Process - vector vertexAssigned(m_vertexCount, false); - vector edgeAssigned(m_edgeCount, false); - for (unsigned int t = 0; (t < m_triangleCount); ++t) - { - for (unsigned char i = 0; i < 3; ++i) - { - if (!vertexAssigned[m_triangles[t].getVertex(i)]) - { - vertexAssigned[m_triangles[t].getVertex(i)] = true; - setTriangleMark(m_triangleMarks[t], 1 << (2 + i)); -} - if (!edgeAssigned[m_triangles[t].getEdge(i)]) - { - edgeAssigned[m_triangles[t].getEdge(i)] = true; - setTriangleMark(m_triangleMarks[t], 1 << (5 + i)); -} -} -} - */ + return num_sols; } // w3 is not perfect -void bvh_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) +void cloth_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) { double tempV1[3], tempV2[3], tempV4[3]; double a,b,c,d,e,f; @@ -231,6 +362,8 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa } + +// unused in the moment, has some bug in DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, double frictionConstant, double delta_V_n) { @@ -241,8 +374,7 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } - -int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) { unsigned int i = 0; int result = 0; @@ -263,17 +395,17 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) collpair = search->link; // compute barycentric coordinates for both collision points - bvh_compute_barycentric(collpair->pa, + cloth_compute_barycentric(collpair->pa, cloth1->verts[collpair->ap1].txold, - cloth1->verts[collpair->ap2].txold, - cloth1->verts[collpair->ap3].txold, - &w1, &w2, &w3); + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3); - bvh_compute_barycentric(collpair->pb, + cloth_compute_barycentric(collpair->pb, cloth2->verts[collpair->bp1].txold, - cloth2->verts[collpair->bp2].txold, - cloth2->verts[collpair->bp3].txold, - &u1, &u2, &u3); + cloth2->verts[collpair->bp2].txold, + cloth2->verts[collpair->bp3].txold, + &u1, &u2, &u3); // Calculate relative "velocity". interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); @@ -378,7 +510,7 @@ int collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) return result; } -void bvh_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { CollPair *collpair = NULL; Cloth *cloth1=NULL, *cloth2=NULL; @@ -468,8 +600,7 @@ void bvh_collision_response_static(ClothModifierData *clmd, ClothModifierData *c { // calc distance + normal distance = plNearestPoints( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, - collpair->pa, collpair->pb, collpair->vector); + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); if (distance <= (epsilon + ALMOST_ZERO)) { @@ -496,20 +627,20 @@ void bvh_collision_response_static(ClothModifierData *clmd, ClothModifierData *c } } -void bvh_collision_response_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { - CollPair *collpair = NULL; + CollPair collpair; Cloth *cloth1=NULL, *cloth2=NULL; MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; float epsilon = clmd->coll_parms.epsilon; - unsigned int i = 0; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; - for(i = 0; i < 4; i++) - { - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); - + for(i = 0; i < 2; i++) + { cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; @@ -522,59 +653,28 @@ void bvh_collision_response_moving(ClothModifierData *clmd, ClothModifierData *c // check all possible pairs of triangles if(i == 0) { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; + collpair.ap1 = face1->v1; + collpair.ap2 = face1->v2; + collpair.ap3 = face1->v3; + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; } if(i == 1) { if(face1->v4) { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; + collpair.ap1 = face1->v3; + collpair.ap2 = face1->v4; + collpair.ap3 = face1->v1; - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; - } - else - i++; - } - - if(i == 2) - { - if(face2->v4) - { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; - } - else - i+=2; - } - - if(i == 3) - { - if((face1->v4)&&(face2->v4)) - { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; } else i++; @@ -582,34 +682,40 @@ void bvh_collision_response_moving(ClothModifierData *clmd, ClothModifierData *c // calc SIPcode (?) - if(i < 4) + if(i < 2) { - // calc distance + normal - distance = plNearestPoints( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, - collpair->pa, collpair->pb, collpair->vector); + VECSUB(a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold); + VECSUB(b, verts1[collpair.ap2].v, verts1[collpair.ap1].v); + VECSUB(c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold); + VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); + + for(j = 0; j < 4; j++) + { + if((j==3) && !(face2->v4)) + break; + + VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); + VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); + + numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into collision list + + printf("Moving found!\n"); + } + } + + // TODO: check borders for collisions + } - if (distance <= (epsilon + ALMOST_ZERO)) - { - // printf("dist: %f\n", (float)distance); - - // collpair->face1 = tree1->tri_index; - // collpair->face2 = tree2->tri_index; - - VECCOPY(collpair->normal, collpair->vector); - Normalize(collpair->normal); - - collpair->distance = distance; - BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); - } - else - { - MEM_freeN(collpair); - } - } - else - { - MEM_freeN(collpair); } } } @@ -719,7 +825,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, bvh_collision_response_static); + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static); } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); @@ -745,7 +851,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) { if (coll_clmd->clothObject) - result += collision_static(clmd, coll_clmd); + result += cloth_collision_response_static(clmd, coll_clmd); else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } @@ -855,7 +961,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, bvh_collision_response_moving); + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_moving_tris); } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); @@ -882,7 +988,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) { if (coll_clmd->clothObject) - result += collision_moving(clmd, coll_clmd); + result += cloth_collision_response_moving_tris(clmd, coll_clmd); else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } From 626edd8de8c3ce237c0ece95f99fb56f1b90bbe8 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 4 Oct 2007 00:19:59 +0000 Subject: [PATCH 025/430] New: Collision detection for inter-timestep-collisions for edge-edge contacts. --- source/blender/blenkernel/intern/collision.c | 226 +++++++++++++++++-- 1 file changed, 202 insertions(+), 24 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 6100ff143d5..a89cd3dc4b9 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -627,6 +627,175 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm } } +int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) +{ + Cloth *cloth1, *cloth2; + ClothVertex *verts1, *verts2; + float temp[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + return 0; +} + +void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + EdgeCollPair edgecollpair; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + for( i = 0; i < 5; i++) + { + if(i == 0) + { + edgecollpair.p11 = face1->v1; + edgecollpair.p12 = face1->v2; + } + else if(i == 1) + { + edgecollpair.p11 = face1->v2; + edgecollpair.p12 = face1->v3; + } + else if(i == 2) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v4; + } + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; + i+=5; // get out of here! + } + } + else if(i == 3) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v4; + edgecollpair.p12 = face1->v1; + } + else + continue; + } + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; + } + + + for( j = 0; j < 5; j++) + { + if(j == 0) + { + edgecollpair.p21 = face2->v1; + edgecollpair.p22 = face2->v2; + } + else if(j == 1) + { + edgecollpair.p21 = face2->v2; + edgecollpair.p22 = face2->v3; + } + else if(j == 2) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v4; + } + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; + } + } + else if(j == 3) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v4; + edgecollpair.p22 = face2->v1; + } + else + continue; + } + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; + } + + + if(!cloth_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) + { + VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); + VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); + VECSUB(c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold); + VECSUB(d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v); + VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); + VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); + + numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into collision list + + printf("Moving edge found!\n"); + } + } + } + } + } + + + +} + void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { CollPair collpair; @@ -690,36 +859,45 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); for(j = 0; j < 4; j++) - { - if((j==3) && !(face2->v4)) - break; - - VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); - VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); - - numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); - - for (k = 0; k < numsolutions; k++) - { - if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) - { - float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into collision list - - printf("Moving found!\n"); - } + { + if((j==3) && !(face2->v4)) + break; + + VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); + VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); + + numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into collision list + + printf("Moving found!\n"); } - - // TODO: check borders for collisions } + + // TODO: check borders for collisions + } } } } +void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + // TODO: check for adjacent + cloth_collision_moving_edges(clmd, coll_clmd, tree1, tree2); + + cloth_collision_moving_tris(clmd, coll_clmd, tree1, tree2); + // cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); +} + // move collision objects forward in time and update static bounding boxes void cloth_update_collision_objects(float step) { @@ -961,7 +1139,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_moving_tris); + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_moving); } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); From e59bf9fa6f54700f7ba8ef41da5d93b6f177c6e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 10 Oct 2007 09:33:34 +0000 Subject: [PATCH 026/430] initial splitting of egde/face response --- source/blender/blenkernel/intern/collision.c | 98 +++++++++++--------- 1 file changed, 54 insertions(+), 44 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 5e90dd581d8..c3dbc572b4e 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -510,6 +510,17 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * return result; } +int cloth_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + + +int cloth_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { CollPair *collpair = NULL; @@ -783,15 +794,14 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co // TODO: check for collisions - // TODO: put into collision list + // TODO: put into (edge) collision list printf("Moving edge found!\n"); } } } } - } - + } } void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) @@ -874,7 +884,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col // TODO: check for collisions - // TODO: put into collision list + // TODO: put into (point-face) collision list printf("Moving found!\n"); } @@ -893,7 +903,7 @@ void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clm cloth_collision_moving_edges(clmd, coll_clmd, tree1, tree2); cloth_collision_moving_tris(clmd, coll_clmd, tree1, tree2); - // cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); + cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); } // move collision objects forward in time and update static bounding boxes @@ -1010,7 +1020,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // process all collisions (calculate impulses, TODO: also repulses if distance too short) result = 1; - for(j = 0; j < 50; j++) // 50 is just a value that ensures convergence + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence { result = 0; @@ -1143,50 +1153,50 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } - /* + // process all collisions (calculate impulses, TODO: also repulses if distance too short) result = 1; - for(j = 0; j < 50; j++) // 50 is just a value that ensures convergence + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence { - result = 0; - + result = 0; + // handle all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject) - result += cloth_collision_response_moving_tris(clmd, coll_clmd); - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } + for (base = G.scene->base.first; base; base = base->next) + { - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; - ic++; - ret++; - } - } - } - */ + // if collision object go on + if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject) + result += cloth_collision_response_moving_tris(clmd, coll_clmd); + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + // verts come from clmd for(i = 0; i < numverts; i++) From 5b019072a8fb486278e653761b1c2864549615c9 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 18 Oct 2007 23:12:30 +0000 Subject: [PATCH 027/430] Springs are in a dynamic list now, New function cloth_add_spring() for easier access to spring handling, cleared up names, functions, code. Collisions can be enabled/disabled for cloth objects now --- source/blender/blenkernel/BKE_cloth.h | 147 +- source/blender/blenkernel/intern/cloth.c | 1255 ++++++++---------- source/blender/blenkernel/intern/collision.c | 17 +- source/blender/blenkernel/intern/implicit.c | 213 +-- source/blender/blenkernel/intern/kdop.c | 2 +- source/blender/blenkernel/intern/modifier.c | 9 +- source/blender/makesdna/DNA_cloth_types.h | 59 +- source/blender/src/buttons_object.c | 26 +- 8 files changed, 840 insertions(+), 888 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index dc8d33804ee..692692dbf5a 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -1,6 +1,6 @@ /** - * BKE_cloth.h - * + * BKE_cloth.h + * * $Id: BKE_cloth.h,v 1.1 2007/08/01 02:07:27 daniel Exp $ * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** @@ -47,7 +47,7 @@ struct DerivedMesh; // this is needed for inlining behaviour #ifndef _WIN32 -#define LINUX +#define LINUX #define DO_INLINE inline #else #define DO_INLINE @@ -57,17 +57,12 @@ struct DerivedMesh; /* goal defines */ -#define SOFTGOALSNAP 0.999f +#define SOFTGOALSNAP 0.999f /* This is approximately the smallest number that can be * represented by a float, given its precision. */ #define ALMOST_ZERO 0.000001 -/* Bits to or into the ClothVertex.flags. */ -#define CVERT_FLAG_PINNED 1 -#define CVERT_FLAG_COLLISION 2 - - // some macro enhancements for vector treatment #define VECADDADD(v1,v2,v3) {*(v1)+= *(v2) + *(v3); *(v1+1)+= *(v2+1) + *(v3+1); *(v1+2)+= *(v2+2) + *(v3+2);} #define VECSUBADD(v1,v2,v3) {*(v1)-= *(v2) + *(v3); *(v1+1)-= *(v2+1) + *(v3+1); *(v1+2)-= *(v2+2) + *(v3+2);} @@ -84,56 +79,70 @@ struct DerivedMesh; /* SIMULATION FLAGS: goal flags,.. */ /* These are the bits used in SimSettings.flags. */ -typedef enum +typedef enum { - CSIMSETT_FLAG_RESET = (1 << 1), // The CM object requires a reinitializaiton. - CSIMSETT_FLAG_COLLOBJ = (1 << 2), // object is only collision object, no cloth simulation is done - CSIMSETT_FLAG_GOAL = (1 << 3), // we have goals enabled - CSIMSETT_FLAG_TEARING_ENABLED = (1 << 4), // true if tearing is enabled - CSIMSETT_FLAG_CCACHE_PROTECT = (1 << 5), // true if tearing is enabled -} CSIMSETT_FLAGS; - -/* Spring types as defined in the paper.*/ -typedef enum -{ - STRUCTURAL = 0, - SHEAR, - BENDING, -} springType; + CLOTH_SIMSETTINGS_FLAG_RESET = ( 1 << 1 ), // The CM object requires a reinitializaiton. + CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ), // object is only collision object, no cloth simulation is done + CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled + CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ), // true if tearing is enabled + CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled +} CLOTH_SIMSETTINGS_FLAGS; /* SPRING FLAGS */ -typedef enum +typedef enum { - CSPRING_FLAG_DEACTIVATE = (1 << 1), - CSPRING_FLAG_NEEDED = (1 << 2), // springs has values to be applied -} CSPRINGS_FLAGS; + CLOTH_COLLISIONSETTINGS_FLAG_ENABLED = ( 1 << 1 ), +} CLOTH_COLLISIONSETTINGS_FLAGS; + +/* Spring types as defined in the paper.*/ +typedef enum +{ + CLOTH_SPRING_TYPE_STRUCTURAL = 0, + CLOTH_SPRING_TYPE_SHEAR, + CLOTH_SPRING_TYPE_BENDING, +} CLOTH_SPRING_TYPES; + +/* SPRING FLAGS */ +typedef enum +{ + CLOTH_SPRING_FLAG_DEACTIVATE = ( 1 << 1 ), + CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied +} CLOTH_SPRINGS_FLAGS; + +/* Bits to or into the ClothVertex.flags. */ +#define CVERT_FLAG_PINNED 1 +#define CVERT_FLAG_COLLISION 2 + // needed for buttons_object.c -void cloth_cache_free(ClothModifierData *clmd, float time); -void cloth_free_modifier (ClothModifierData *clmd); +void cloth_cache_free ( ClothModifierData *clmd, float time ); +void cloth_free_modifier ( ClothModifierData *clmd ); // needed for cloth.c -void implicit_set_positions (ClothModifierData *clmd); +void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c -void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numverts); +void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); // used in collision.c -typedef struct Tree { +typedef struct Tree +{ struct Tree *nodes[4]; // 4 children --> quad-tree struct Tree *parent; - struct Tree *nextLeaf; + struct Tree *nextLeaf; struct Tree *prevLeaf; float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP unsigned int tri_index; // this saves the index of the face int count_nodes; // how many nodes are used int traversed; // how many nodes already traversed until this level? int isleaf; -} Tree; +} +Tree; typedef struct Tree TreeNode; -typedef struct BVH{ +typedef struct BVH +{ unsigned int numfaces; unsigned int numverts; ClothVertex *verts; // just a pointer to the original datastructure @@ -143,10 +152,11 @@ typedef struct BVH{ TreeNode *leaf_tree; /* Tail of the leaf linked list. */ TreeNode *leaf_root; /* Head of the leaf linked list. */ float epsilon; /* epslion is used for inflation of the k-dop */ - int flags; /* bvhFlags */ -} BVH; + int flags; /* bvhFlags */ +} +BVH; -typedef void (*CM_COLLISION_RESPONSE) (ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2); +typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); ///////////////////////////////////////////////// @@ -154,8 +164,8 @@ typedef void (*CM_COLLISION_RESPONSE) (ClothModifierData *clmd, ClothModifierDat //////////////////////////////////////////////// // needed for implicit.c -void bvh_collision_response(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2); -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt); +void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); +int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); //////////////////////////////////////////////// @@ -165,12 +175,13 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt); //////////////////////////////////////////////// // needed for cloth.c -void bvh_free(BVH * bvh); -BVH *bvh_build (ClothModifierData *clmd, float epsilon); +void bvh_free ( BVH * bvh ); +BVH *bvh_build ( ClothModifierData *clmd, float epsilon ); +LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); // needed for collision.c -int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response); -void bvh_update(ClothModifierData * clmd, BVH * bvh, int moving); +int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); +void bvh_update ( ClothModifierData * clmd, BVH * bvh, int moving ); //////////////////////////////////////////////// @@ -179,41 +190,43 @@ void bvh_update(ClothModifierData * clmd, BVH * bvh, int moving); ///////////////////////////////////////////////// // cloth.c //////////////////////////////////////////////// -void cloth_free_modifier (ClothModifierData *clmd); -void cloth_init (ClothModifierData *clmd); -void cloth_deform_verts(struct Object *ob, float framenr, float (*vertexCos)[3], int numVerts, void *derivedData, ClothModifierData *clmd); -void cloth_update_normals (ClothVertex *verts, int nVerts, MFace *face, int totface); +void cloth_free_modifier ( ClothModifierData *clmd ); +void cloth_init ( ClothModifierData *clmd ); +void cloth_deform_verts ( struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd ); +void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); //////////////////////////////////////////////// /* Typedefs for function pointers we need for solvers and collision detection. */ -typedef void (*CM_COLLISION_SELF) (ClothModifierData *clmd, int step); -typedef void (*CM_COLLISION_OBJ) (ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response); +typedef void ( *CM_COLLISION_SELF ) ( ClothModifierData *clmd, int step ); +typedef void ( *CM_COLLISION_OBJ ) ( ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response ); /* This enum provides the IDs for our solvers. */ // only one available in the moment typedef enum { - CM_IMPLICIT = 0, + CM_IMPLICIT = 0, } CM_SOLVER_ID; /* This structure defines how to call the solver. */ -typedef struct { +typedef struct +{ char *name; CM_SOLVER_ID id; - int (*init) (Object *ob, ClothModifierData *clmd); - int (*solver) (Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors); - int (*free) (ClothModifierData *clmd); -} CM_SOLVER_DEF; + int ( *init ) ( Object *ob, ClothModifierData *clmd ); + int ( *solver ) ( Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors ); + int ( *free ) ( ClothModifierData *clmd ); +} +CM_SOLVER_DEF; /* new C implicit simulator */ -int implicit_init (Object *ob, ClothModifierData *clmd); -int implicit_free (ClothModifierData *clmd); -int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors); +int implicit_init ( Object *ob, ClothModifierData *clmd ); +int implicit_free ( ClothModifierData *clmd ); +int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); /* used for caching in implicit.c */ typedef struct Frame @@ -222,7 +235,8 @@ typedef struct Frame ClothSpring *springs; unsigned int numverts, numsprings; float time; /* we need float since we want to support sub-frames */ -} Frame; +} +Frame; /* used for collisions in collision.c */ typedef struct CollPair @@ -230,14 +244,15 @@ typedef struct CollPair unsigned int face1; // cloth face unsigned int face2; // object face double distance; // magnitude of vector - float normal[3]; + float normal[3]; float vector[3]; // unnormalized collision vector: p2-p1 float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 int lastsign; // indicates if the distance sign has changed, unused itm float time; // collision time, from 0 up to 1 unsigned int ap1, ap2, ap3, bp1, bp2, bp3, bp4; unsigned int pointsb[4]; -} CollPair; +} +CollPair; /* used for collisions in collision.c */ typedef struct EdgeCollPair @@ -248,7 +263,8 @@ typedef struct EdgeCollPair float time; int lastsign; float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 -} EdgeCollPair; +} +EdgeCollPair; /* used for collisions in collision.c */ typedef struct FaceCollPair @@ -259,7 +275,8 @@ typedef struct FaceCollPair float time; int lastsign; float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 -} FaceCollPair; +} +FaceCollPair; #endif diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index e86d1c50b69..eb7454ccd42 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1,5 +1,5 @@ -/* cloth.c -* +/* cloth.c +* * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * @@ -41,7 +41,7 @@ #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" -#include "DNA_cloth_types.h" +#include "DNA_cloth_types.h" #include "DNA_key_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -77,12 +77,10 @@ #include "mydevice.h" #ifdef _WIN32 -void tstart(void) +void tstart ( void ) +{} +void tend ( void ) { -} -void tend(void) -{ - } double tval() { @@ -92,19 +90,19 @@ double tval() #include static struct timeval _tstart, _tend; static struct timezone tz; -void tstart(void) +void tstart ( void ) { - gettimeofday(&_tstart, &tz); + gettimeofday ( &_tstart, &tz ); } -void tend(void) +void tend ( void ) { - gettimeofday(&_tend,&tz); + gettimeofday ( &_tend,&tz ); } double tval() { double t1, t2; - t1 = (double)_tstart.tv_sec + (double)_tstart.tv_usec/(1000*1000); - t2 = (double)_tend.tv_sec + (double)_tend.tv_usec/(1000*1000); + t1 = ( double ) _tstart.tv_sec + ( double ) _tstart.tv_usec/ ( 1000*1000 ); + t2 = ( double ) _tend.tv_sec + ( double ) _tend.tv_usec/ ( 1000*1000 ); return t2-t1; } #endif @@ -112,20 +110,21 @@ double tval() /* Our available solvers. */ // 255 is the magic reserved number, so NEVER try to put 255 solvers in here! // 254 = MAX! -static CM_SOLVER_DEF solvers [] = { - { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, - // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, -}; +static CM_SOLVER_DEF solvers [] = + { + { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, + // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, + }; /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ -static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertexCos)[3], unsigned int numverts); -static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm); -static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts); -static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts); -int cloth_build_springs(Cloth *cloth, DerivedMesh *dm); -static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); +static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); +static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); +int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); /****************************************************************************** @@ -137,9 +136,9 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v * cloth_init - creates a new cloth simulation. * * 1. create object -* 2. fill object with standard values or with the GUI settings if given +* 2. fill object with standard values or with the GUI settings if given */ -void cloth_init (ClothModifierData *clmd) +void cloth_init ( ClothModifierData *clmd ) { /* Initialize our new data structure to reasonable values. */ clmd->sim_parms.gravity [0] = 0.0; @@ -153,8 +152,8 @@ void cloth_init (ClothModifierData *clmd) clmd->sim_parms.mass = 1.0f; clmd->sim_parms.stepsPerFrame = 5; clmd->sim_parms.sim_time = 1.0; - clmd->sim_parms.flags = CSIMSETT_FLAG_RESET; - clmd->sim_parms.solver_type = 0; + clmd->sim_parms.flags = CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms.solver_type = 0; clmd->sim_parms.preroll = 0; clmd->sim_parms.maxspringlen = 10; clmd->sim_parms.firstframe = 1; @@ -163,7 +162,8 @@ void cloth_init (ClothModifierData *clmd) clmd->coll_parms.friction = 10.0; clmd->coll_parms.loop_count = 1; clmd->coll_parms.epsilon = 0.01f; - + clmd->coll_parms.flags = 0; + /* These defaults are copied from softbody.c's * softbody_calc_forces() function. */ @@ -181,17 +181,17 @@ void cloth_init (ClothModifierData *clmd) } // unused in the moment, cloth needs quads from mesh -DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) +DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) { DerivedMesh *result = NULL; int i; - int numverts = dm->getNumVerts(dm); - int numedges = dm->getNumEdges(dm); - int numfaces = dm->getNumFaces(dm); + int numverts = dm->getNumVerts ( dm ); + int numedges = dm->getNumEdges ( dm ); + int numfaces = dm->getNumFaces ( dm ); - MVert *mvert = CDDM_get_verts(dm); - MEdge *medge = CDDM_get_edges(dm); - MFace *mface = CDDM_get_faces(dm); + MVert *mvert = CDDM_get_verts ( dm ); + MEdge *medge = CDDM_get_edges ( dm ); + MFace *mface = CDDM_get_faces ( dm ); MVert *mvert2; MFace *mface2; @@ -203,36 +203,36 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) float vec1[3], vec2[3], vec3[3], vec4[3], vec5[3]; float mag1=0, mag2=0; - for(i = 0; i < numfaces; i++) + for ( i = 0; i < numfaces; i++ ) { - if(mface[i].v4) + if ( mface[i].v4 ) numquads++; else - numtris++; + numtris++; } - result = CDDM_from_template(dm, numverts, 0, numtris + 2*numquads); + result = CDDM_from_template ( dm, numverts, 0, numtris + 2*numquads ); - if(!result) + if ( !result ) return NULL; // do verts - mvert2 = CDDM_get_verts(result); - for(a=0; av1 = mface[a].v2; mf->v2 = mface[a].v3; @@ -260,9 +260,9 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) mf->v4 = 0; mf->flag |= ME_SMOOTH; - test_index_face(mf, NULL, 0, 3); + test_index_face ( mf, NULL, 0, 3 ); - if(mface[a].v4) + if ( mface[a].v4 ) { MFace *mf2; @@ -275,7 +275,7 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) *mf2 = *inMF; */ - if(random==1) + if ( random==1 ) { mf2->v1 = mface[a].v1; mf2->v2 = mface[a].v2; @@ -290,31 +290,31 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) mf2->v4 = 0; mf2->flag |= ME_SMOOTH; - test_index_face(mf2, NULL, 0, 3); + test_index_face ( mf2, NULL, 0, 3 ); } i++; } - CDDM_calc_edges(result); - CDDM_calc_normals(result); + CDDM_calc_edges ( result ); + CDDM_calc_normals ( result ); return result; } -DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) +DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) { DerivedMesh *result = NULL; unsigned int i = 0, a = 0, j=0; - int numverts = dm->getNumVerts(dm); - int numedges = dm->getNumEdges(dm); - int numfaces = dm->getNumFaces(dm); + int numverts = dm->getNumVerts ( dm ); + int numedges = dm->getNumEdges ( dm ); + int numfaces = dm->getNumFaces ( dm ); - MVert *mvert = CDDM_get_verts(dm); - MEdge *medge = CDDM_get_edges(dm); - MFace *mface = CDDM_get_faces(dm); + MVert *mvert = CDDM_get_verts ( dm ); + MEdge *medge = CDDM_get_edges ( dm ); + MFace *mface = CDDM_get_faces ( dm ); MVert *mvert2; MFace *mface2; @@ -324,45 +324,45 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) Cloth *cloth = clmd->clothObject; ClothSpring *springs = cloth->springs; unsigned int numsprings = cloth->numsprings; - + // create spring tearing hash edgehash = BLI_edgehash_new(); - - for(i = 0; i < numsprings; i++) + + for ( i = 0; i < numsprings; i++ ) { - if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) - &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) + if ( ( springs[i].flags & CLOTH_SPRING_FLAG_DEACTIVATE ) + && ( !BLI_edgehash_haskey ( edgehash, springs[i].ij, springs[i].kl ) ) ) { - BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); - BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); + BLI_edgehash_insert ( edgehash, springs[i].ij, springs[i].kl, NULL ); + BLI_edgehash_insert ( edgehash, springs[i].kl, springs[i].ij, NULL ); j++; } } - - // printf("found %d tears\n", j); - - result = CDDM_from_template(dm, numverts, 0, numfaces); - if(!result) + // printf("found %d tears\n", j); + + result = CDDM_from_template ( dm, numverts, 0, numfaces ); + + if ( !result ) return NULL; // do verts - mvert2 = CDDM_get_verts(result); - for(a=0; av1 = mface[a].v1; mf->v2 = mface[a].v2; mf->v3 = mface[a].v3; mf->v4 = mface[a].v4; - - test_index_face(mf, NULL, 0, 4); - + + test_index_face ( mf, NULL, 0, 4 ); + i++; } } - CDDM_lower_num_faces(result, i); - CDDM_calc_edges(result); - CDDM_calc_normals(result); - - BLI_edgehash_free(edgehash, NULL); + CDDM_lower_num_faces ( result, i ); + CDDM_calc_edges ( result ); + CDDM_calc_normals ( result ); + + BLI_edgehash_free ( edgehash, NULL ); return result; } -int cloth_cache_search_frame(ClothModifierData *clmd, float time) +int cloth_cache_search_frame ( ClothModifierData *clmd, float time ) { Frame *frame = NULL; - LinkNode *search = NULL; - - if(clmd->clothObject) + LinkNode *search = NULL; + + if ( clmd->clothObject ) { search = clmd->sim_parms.cache; - - while(search) + + while ( search ) { - frame = (Frame *)search->link; - - if(frame) + frame = ( Frame * ) search->link; + + if ( frame ) { - if(frame->time == time) + if ( frame->time == time ) return 1; } - + search = search->next; } } - + return 0; - + } -float cloth_cache_last_frame(ClothModifierData *clmd) +float cloth_cache_last_frame ( ClothModifierData *clmd ) { Frame *frame = NULL; - LinkNode *search = NULL; + LinkNode *search = NULL; float time = 0; - - if(clmd->clothObject) + + if ( clmd->clothObject ) { search = clmd->sim_parms.cache; - - while(search) + + while ( search ) { - frame = (Frame *)search->link; - - if(frame) + frame = ( Frame * ) search->link; + + if ( frame ) { - if(frame->time > time) + if ( frame->time > time ) time = frame->time; } } @@ -451,27 +451,27 @@ float cloth_cache_last_frame(ClothModifierData *clmd) return time; } -float cloth_cache_first_frame(ClothModifierData *clmd) +float cloth_cache_first_frame ( ClothModifierData *clmd ) { Frame *frame = NULL; - LinkNode *search = NULL; + LinkNode *search = NULL; float time = -1.0; - - if(clmd->clothObject) + + if ( clmd->clothObject ) { search = clmd->sim_parms.cache; - - while(search) + + while ( search ) { - frame = (Frame *)search->link; - - if(frame) + frame = ( Frame * ) search->link; + + if ( frame ) { - if(time < 0.0) + if ( time < 0.0 ) time = frame->time; else { - if(frame->time < time) + if ( frame->time < time ) time = frame->time; } } @@ -480,102 +480,102 @@ float cloth_cache_first_frame(ClothModifierData *clmd) return time; } -void cloth_cache_get_frame(ClothModifierData *clmd, float time) +void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) { Frame *frame = NULL; LinkNode *search = NULL; - float newtime = time + clmd->sim_parms.preroll; - - if(clmd->clothObject) + float newtime = time + clmd->sim_parms.preroll; + + if ( clmd->clothObject ) { search = clmd->sim_parms.cache; - - while(search) + + while ( search ) { - frame = (Frame *)search->link; - - if(frame) + frame = ( Frame * ) search->link; + + if ( frame ) { - if(frame->time == newtime) + if ( frame->time == newtime ) { // something changed, free cache! - if(clmd->clothObject->numverts != frame->numverts) + if ( clmd->clothObject->numverts != frame->numverts ) { - cloth_cache_free(clmd, 0); - printf("clmd->clothObject->numverts != frame->numverts\n"); + cloth_cache_free ( clmd, 0 ); + printf ( "clmd->clothObject->numverts != frame->numverts\n" ); return; } - - memcpy(clmd->clothObject->verts, frame->verts, sizeof(ClothVertex)*frame->numverts); - implicit_set_positions(clmd); - + + memcpy ( clmd->clothObject->verts, frame->verts, sizeof ( ClothVertex ) *frame->numverts ); + implicit_set_positions ( clmd ); + return; } } - + search = search->next; } } } -void cloth_cache_set_frame(ClothModifierData *clmd, float time) +void cloth_cache_set_frame ( ClothModifierData *clmd, float time ) { Frame *frame = NULL; LinkNode *search = NULL; - - if(clmd->clothObject) + + if ( clmd->clothObject ) { - frame = (Frame *)MEM_callocN (sizeof (Frame), "cloth_cache_frame"); - - if(frame) + frame = ( Frame * ) MEM_callocN ( sizeof ( Frame ), "cloth_cache_frame" ); + + if ( frame ) { frame->time = time; frame->numverts = clmd->clothObject->numverts; - frame->verts = MEM_dupallocN(clmd->clothObject->verts); - - if(!frame->verts) + frame->verts = MEM_dupallocN ( clmd->clothObject->verts ); + + if ( !frame->verts ) { - MEM_freeN(frame); + MEM_freeN ( frame ); return; } - - BLI_linklist_append(&clmd->sim_parms.cache, frame); - + + BLI_linklist_append ( &clmd->sim_parms.cache, frame ); + } - } - + } + } // free cloth cache -void cloth_cache_free(ClothModifierData *clmd, float time) +void cloth_cache_free ( ClothModifierData *clmd, float time ) { Frame *frame = NULL; - LinkNode *search = NULL, *lastsearch = NULL; + LinkNode *search = NULL, *lastsearch = NULL; float newtime = time + clmd->sim_parms.preroll; - - if(time <= 2.0) + + if ( time <= 2.0 ) newtime = time; - if(clmd->clothObject) + if ( clmd->clothObject ) { - if(clmd->sim_parms.cache) - { + if ( clmd->sim_parms.cache ) + { lastsearch = search = clmd->sim_parms.cache; - - while(search) + + while ( search ) { - frame = (Frame *)search->link; - - if(frame->time >= newtime) + frame = ( Frame * ) search->link; + + if ( frame->time >= newtime ) { - if(frame->verts) + if ( frame->verts ) { - MEM_freeN(frame->verts); + MEM_freeN ( frame->verts ); } - MEM_freeN(frame); - + MEM_freeN ( frame ); + lastsearch->next = search->next; - MEM_freeN(search); + MEM_freeN ( search ); search = lastsearch->next; lastsearch->next = NULL; } @@ -585,13 +585,13 @@ void cloth_cache_free(ClothModifierData *clmd, float time) search = search->next; } } - - if(time <= 1.0) + + if ( time <= 1.0 ) { clmd->sim_parms.cache = NULL; } - - if(time <= 2.0) + + if ( time <= 2.0 ) clmd->sim_parms.preroll = 0; } } @@ -600,10 +600,10 @@ void cloth_cache_free(ClothModifierData *clmd, float time) /** * cloth_deform_verts - simulates one step, framenr is in frames. -* +* **/ -void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, - float (*vertexCos)[3], int numverts) +void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, + float ( *vertexCos ) [3], int numverts ) { unsigned int i; unsigned int numedges = -1; @@ -613,124 +613,124 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, MFace *mface = NULL; DerivedMesh *result = NULL, *result2 = NULL; Cloth *cloth = clmd->clothObject; - unsigned int framenr = (float)G.scene->r.cfra; - float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); + unsigned int framenr = ( float ) G.scene->r.cfra; + float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); ListBase *effectors = NULL; ClothVertex *newframe= NULL, *verts; Frame *frame = NULL; LinkNode *search = NULL; - float deltaTime = current_time - clmd->sim_parms.sim_time; - - + float deltaTime = current_time - clmd->sim_parms.sim_time; + + // only be active during a specific period: // that's "first frame" and "last frame" on GUI - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) { - if(clmd->clothObject) + if ( clmd->clothObject ) { - if(clmd->sim_parms.cache) + if ( clmd->sim_parms.cache ) { - if(current_time < clmd->sim_parms.firstframe) + if ( current_time < clmd->sim_parms.firstframe ) { - int frametime = cloth_cache_first_frame(clmd); - if(cloth_cache_search_frame(clmd, frametime)) + int frametime = cloth_cache_first_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) { - cloth_cache_get_frame(clmd, frametime); - cloth_to_object (ob, clmd, vertexCos, numverts); + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); } return; } - else if(current_time > clmd->sim_parms.lastframe) + else if ( current_time > clmd->sim_parms.lastframe ) { - int frametime = cloth_cache_last_frame(clmd); - if(cloth_cache_search_frame(clmd, frametime)) + int frametime = cloth_cache_last_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) { - cloth_cache_get_frame(clmd, frametime); - cloth_to_object (ob, clmd, vertexCos, numverts); + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); } return; } - else if(ABS(deltaTime) >= 2.0f ) // no timewarps allowed + else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed { - if(cloth_cache_search_frame(clmd, framenr)) + if ( cloth_cache_search_frame ( clmd, framenr ) ) { - cloth_cache_get_frame(clmd, framenr); - cloth_to_object (ob, clmd, vertexCos, numverts); + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); } clmd->sim_parms.sim_time = current_time; return; } } - + } } - - + + // unused in the moment, calculated seperately in implicit.c clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; - + clmd->sim_parms.sim_time = current_time; - + // check if cloth object was some collision object before and needs freeing now - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) && (clmd->clothObject != NULL) && (clmd->clothObject->old_solver_type == 255)) + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) { - // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing - clmd->sim_parms.flags |= CSIMSETT_FLAG_COLLOBJ; - cloth_free_modifier(clmd); - clmd->sim_parms.flags &= ~CSIMSETT_FLAG_COLLOBJ; + // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing + clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + cloth_free_modifier ( clmd ); + clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; } // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ - if (clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) { - // save next position + time - if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) + // save next position + time + if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) { - if(!collobj_from_object (ob, clmd, dm, vertexCos, framenr)) + if ( !collobj_from_object ( ob, clmd, dm, vertexCos, framenr ) ) { - clmd->sim_parms.flags |= CSIMSETT_FLAG_COLLOBJ; - cloth_free_modifier(clmd); + clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + cloth_free_modifier ( clmd ); return; } - if(clmd->clothObject == NULL) + if ( clmd->clothObject == NULL ) return; cloth = clmd->clothObject; } - // Save old position + // Save old position clmd->sim_parms.sim_time_old = clmd->sim_parms.sim_time; - clmd->sim_parms.sim_time = current_time; - - verts = cloth->verts; - - for (i = 0; i < clmd->clothObject->numverts; i++, verts++) - { - // Save the previous position. - VECCOPY (verts->xold, verts->x); - VECCOPY (verts->txold, verts->x); + clmd->sim_parms.sim_time = current_time; - // Get the current position. - VECCOPY (verts->x, vertexCos[i]); - Mat4MulVecfl(ob->obmat, verts->x); + verts = cloth->verts; + + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) + { + // Save the previous position. + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->txold, verts->x ); + + // Get the current position. + VECCOPY ( verts->x, vertexCos[i] ); + Mat4MulVecfl ( ob->obmat, verts->x ); // Compute the vertices "velocity". // (no dt correction here because of float error) - VECSUB (verts->v, verts->x, verts->xold); + VECSUB ( verts->v, verts->x, verts->xold ); } - - return; - } - if(deltaTime == 1.0f) + return; + } + + if ( deltaTime == 1.0f ) { - if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) + if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) { - if(!cloth_from_object (ob, clmd, dm, vertexCos, numverts)) + if ( !cloth_from_object ( ob, clmd, dm, vertexCos, numverts ) ) return; - if(clmd->clothObject == NULL) + if ( clmd->clothObject == NULL ) return; cloth = clmd->clothObject; @@ -739,112 +739,125 @@ void clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm, clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; // Insure we have a clmd->clothObject, in case allocation failed. - if (clmd->clothObject != NULL) - { - if(!cloth_cache_search_frame(clmd, framenr)) + if ( clmd->clothObject != NULL ) + { + if ( !cloth_cache_search_frame ( clmd, framenr ) ) { verts = cloth->verts; - - // Force any pinned verts to their constrained location. - for (i = 0; i < clmd->clothObject->numverts; i++, verts++) - { - // Save the previous position. - VECCOPY (verts->xold, verts->xconst); - VECCOPY (verts->txold, verts->x); - // Get the current position. - VECCOPY (verts->xconst, vertexCos[i]); - Mat4MulVecfl(ob->obmat, verts->xconst); + // Force any pinned verts to their constrained location. + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) + { + // Save the previous position. + VECCOPY ( verts->xold, verts->xconst ); + VECCOPY ( verts->txold, verts->x ); + + // Get the current position. + VECCOPY ( verts->xconst, vertexCos[i] ); + Mat4MulVecfl ( ob->obmat, verts->xconst ); } tstart(); // Call the solver. - if (solvers [clmd->sim_parms.solver_type].solver) - solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); - - tend(); - printf("Cloth simulation time: %f\n", (float)tval()); + if ( solvers [clmd->sim_parms.solver_type].solver ) + solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); - cloth_cache_set_frame(clmd, framenr); + tend(); + printf ( "Cloth simulation time: %f\n", ( float ) tval() ); + + cloth_cache_set_frame ( clmd, framenr ); } else // just retrieve the cached frame { - cloth_cache_get_frame(clmd, framenr); + cloth_cache_get_frame ( clmd, framenr ); } // Copy the result back to the object. - cloth_to_object (ob, clmd, vertexCos, numverts); - + cloth_to_object ( ob, clmd, vertexCos, numverts ); + // bvh_free(clmd->clothObject->tree); // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); - } + } } - else if((deltaTime <= 0.0f)||(deltaTime > 1.0f)) + else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) { - if((clmd->clothObject != NULL) && (clmd->sim_parms.cache)) + if ( ( clmd->clothObject != NULL ) && ( clmd->sim_parms.cache ) ) { - if(cloth_cache_search_frame(clmd, framenr)) + if ( cloth_cache_search_frame ( clmd, framenr ) ) { - cloth_cache_get_frame(clmd, framenr); - cloth_to_object (ob, clmd, vertexCos, numverts); + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); } } } - + } /* frees all */ -void cloth_free_modifier (ClothModifierData *clmd) +void cloth_free_modifier ( ClothModifierData *clmd ) { Cloth *cloth = NULL; - if(!clmd) + if ( !clmd ) return; cloth = clmd->clothObject; - - if(!(clmd->sim_parms.flags & CSIMSETT_FLAG_CCACHE_PROTECT)) + + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) { // free our frame cache, TODO: but get to first position before - cloth_cache_free(clmd, 0); - - if (cloth) - { + cloth_cache_free ( clmd, 0 ); + + if ( cloth ) + { + // If our solver provides a free function, call it - if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) - { - solvers [cloth->old_solver_type].free (clmd); + if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) + { + solvers [cloth->old_solver_type].free ( clmd ); } - + // Free the verts. - if (cloth->verts != NULL) - MEM_freeN (cloth->verts); - + if ( cloth->verts != NULL ) + MEM_freeN ( cloth->verts ); + cloth->verts = NULL; cloth->numverts = 0; - + // Free the springs. - if (cloth->springs != NULL) - MEM_freeN (cloth->springs); - + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; + } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } + cloth->springs = NULL; - cloth->numsprings = 0; - + cloth->numsprings = 0; + // free BVH collision tree - if(cloth->tree) - bvh_free((BVH *)cloth->tree); - + if ( cloth->tree ) + bvh_free ( ( BVH * ) cloth->tree ); + // we save our faces for collision objects - if(cloth->mfaces) - MEM_freeN(cloth->mfaces); + if ( cloth->mfaces ) + MEM_freeN ( cloth->mfaces ); /* if(clmd->clothObject->facemarks) MEM_freeN(clmd->clothObject->facemarks); */ - MEM_freeN (cloth); + MEM_freeN ( cloth ); clmd->clothObject = NULL; } } @@ -862,21 +875,22 @@ void cloth_free_modifier (ClothModifierData *clmd) * * This function is a modified version of the softbody.c:softbody_to_object() function. **/ -static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertexCos)[3], unsigned int numverts) +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ) { ClothVertex *verts = NULL; unsigned int i = 0; - if (clmd->clothObject) { + if ( clmd->clothObject ) + { verts = clmd->clothObject->verts; /* inverse matrix is not uptodate... */ - Mat4Invert (ob->imat, ob->obmat); + Mat4Invert ( ob->imat, ob->obmat ); - for (i = 0; i < numverts; i++, verts++) + for ( i = 0; i < numverts; i++, verts++ ) { - VECCOPY (vertexCos[i], verts->x); - Mat4MulVecfl (ob->imat, vertexCos[i]); /* softbody is in global coords */ + VECCOPY ( vertexCos[i], verts->x ); + Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* softbody is in global coords */ } } } @@ -886,46 +900,46 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, float (*vertex * cloth_apply_vgroup - applies a vertex group as specified by type * **/ -static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ) { unsigned int i = 0; unsigned int j = 0; MDeformVert *dvert = NULL; Cloth *clothObj = NULL; - unsigned int numverts = dm->getNumVerts(dm); + unsigned int numverts = dm->getNumVerts ( dm ); float goalfac = 0; ClothVertex *verts = NULL; clothObj = clmd->clothObject; - - if(!dm) + + if ( !dm ) return; - - numverts = dm->getNumVerts(dm); + + numverts = dm->getNumVerts ( dm ); /* vgroup is 1 based, decrement so we can match the right group. */ --vgroup; - + verts = clothObj->verts; - for (i = 0; i < numverts; i++, verts++) - { + for ( i = 0; i < numverts; i++, verts++ ) + { // LATER ON, support also mass painting here - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) - { - dvert = dm->getVertData(dm, i, CD_MDEFORMVERT); - if(dvert) - { - for(j = 0; j < dvert->totweight; j++) + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); + if ( dvert ) + { + for ( j = 0; j < dvert->totweight; j++ ) { - if(dvert->dw[j].def_nr == vgroup) + if ( dvert->dw[j].def_nr == vgroup ) { verts->goal = dvert->dw [j].weight; - goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); - verts->goal = (float)pow(verts->goal , 4.0f); + goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if(dvert->dw [j].weight >=SOFTGOALSNAP) + if ( dvert->dw [j].weight >=SOFTGOALSNAP ) { verts->flags |= CVERT_FLAG_PINNED; } @@ -942,360 +956,221 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v // only meshes supported at the moment /* collision objects */ -static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts) +static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) { unsigned int i; - MVert *mvert = NULL; + MVert *mvert = NULL; ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; - + float tnull[3] = {0,0,0}; + /* If we have a clothObject, free it. */ - if (clmd->clothObject != NULL) - cloth_free_modifier (clmd); + if ( clmd->clothObject != NULL ) + cloth_free_modifier ( clmd ); /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); - if (clmd->clothObject) + clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); + if ( clmd->clothObject ) { clmd->clothObject->old_solver_type = 255; - clmd->clothObject->old_collision_type = 255; + // clmd->clothObject->old_collision_type = 255; } - else if (clmd->clothObject == NULL) + else if ( clmd->clothObject == NULL ) { - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); return 0; } - switch (ob->type) + switch ( ob->type ) { - case OB_MESH: - - // mesh input objects need DerivedMesh - if(!dm) - return 0; - - cloth_from_mesh (ob, clmd, dm); - - if (clmd->clothObject != NULL) - { - if (!dm) return 0; - if (!dm->getNumVerts(dm) || !dm->getNumFaces(dm)) return 0; - - mvert = dm->getVertArray(dm); - verts = clmd->clothObject->verts; - numverts = clmd->clothObject->numverts = dm->getNumVerts(dm); - - for (i = 0; i < numverts; i++, verts++) + case OB_MESH: + + // mesh input objects need DerivedMesh + if ( !dm ) + return 0; + + cloth_from_mesh ( ob, clmd, dm ); + + if ( clmd->clothObject != NULL ) { - VECCOPY (verts->x, mvert[i].co); - Mat4MulVecfl(ob->obmat, verts->x); - verts->flags = 0; - VECCOPY(verts->xold, verts->x); - VECCOPY(verts->txold, verts->x); - VECCOPY(verts->tx, verts->x); - VecMulf(verts->v, 0.0f); - verts->impulse_count = 0; - VECCOPY(verts->impulse, tnull); + if ( !dm ) return 0; + if ( !dm->getNumVerts ( dm ) || !dm->getNumFaces ( dm ) ) return 0; + + mvert = dm->getVertArray ( dm ); + verts = clmd->clothObject->verts; + numverts = clmd->clothObject->numverts = dm->getNumVerts ( dm ); + + for ( i = 0; i < numverts; i++, verts++ ) + { + VECCOPY ( verts->x, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->x ); + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VECCOPY ( verts->tx, verts->x ); + VecMulf ( verts->v, 0.0f ); + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); + } + clmd->clothObject->tree = bvh_build ( clmd,clmd->coll_parms.epsilon ); + } - clmd->clothObject->tree = bvh_build(clmd,clmd->coll_parms.epsilon); - - } - - return 1; - default: return 0; // TODO - we do not support changing meshes + + return 1; + default: return 0; // TODO - we do not support changing meshes } } /* -helper function to get proper spring length +helper function to get proper spring length when object is rescaled */ -float cloth_globallen(float *v1,float *v2,Object *ob) +float cloth_globallen ( float *v1,float *v2,Object *ob ) { float p1[3],p2[3]; - VECCOPY(p1,v1); - Mat4MulVecfl(ob->obmat, p1); - VECCOPY(p2,v2); - Mat4MulVecfl(ob->obmat, p2); - return VecLenf(p1,p2); + VECCOPY ( p1,v1 ); + Mat4MulVecfl ( ob->obmat, p1 ); + VECCOPY ( p2,v2 ); + Mat4MulVecfl ( ob->obmat, p2 ); + return VecLenf ( p1,p2 ); } -static void curve_surf_to_cloth(Object *ob, ClothModifierData *clmd, float (*vertexCos)[3]) -{ - Curve *cu= ob->data; - Nurb *nu; - BezTriple *bezt; - float goalfac; - unsigned int a, curindex=0, i=0; - unsigned int numverts, numsprings = 0, setgoal=0; - Cloth *clothObj; - ClothVertex *verts = NULL; - - clmd->clothObject->numverts = numverts= count_curveverts(&cu->nurb); - clothObj = clmd->clothObject; - - if(ob->type==OB_CURVE) - { - numsprings = numverts - BLI_countlist(&cu->nurb); - } - - /* Allocate our vertices. - */ - clmd->clothObject->numverts = numverts; - clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); - if (clmd->clothObject->verts == NULL) - { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); - return; - } - - verts = clmd->clothObject->verts; - - // copy vertex positions - for (i = 0; i < numverts; i++) - { - VECCOPY (verts->x, vertexCos[i]); - Mat4MulVecfl(ob->obmat, verts->x); - - verts->mass = clmd->sim_parms.mass; - // verts->goal= clmd->sim_parms.defgoal; - verts->flags = 0; - VECCOPY(verts->xold, verts->x); - VECCOPY(verts->xconst, verts->x); - VECCOPY(verts->txold, verts->x); - VecMulf(verts->v, 0.0f); - } - - clmd->clothObject->mfaces = NULL; // update face pointer - clmd->clothObject->numfaces = 0; - - clmd->clothObject->springs = MEM_callocN (sizeof (ClothSpring) * (numsprings), "cloth_springs_alloc"); - - // set vars now - goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); - // clothObj->verts [i].goal = clmd->sim_parms.mingoal + bezt->weight*goalfac; - - /* apply / set vertex groups */ - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) - { - if (clmd->sim_parms.vgroup_mass > 0) - { - setgoal = 1; - } - } - -/* - for(nu= cu->nurb.first; nu; nu= nu->next) - { - if(nu->bezt) - { - for(bezt=nu->bezt, a=0; apntsu; a++, bezt++, bp+=3, curindex+=3) - { - if(setgoal) - { - bp->goal= sb->mingoal + bezt->weight*goalfac; - // a little ad hoc changing the goal control to be less *sharp* - bp->goal = (float)pow(bp->goal, 4.0f); - - // all three triples - (bp+1)->goal= bp->goal; - (bp+2)->goal= bp->goal; - } - - if(totspring) - { - if(a>0) - { - bs->v1= curindex-1; - bs->v2= curindex; - bs->strength= 1.0; - bs->order=1; - bs->len= globallen( (bezt-1)->vec[2], bezt->vec[0], ob ); - bs++; - } - bs->v1= curindex; - bs->v2= curindex+1; - bs->strength= 1.0; - bs->order=1; - bs->len= globallen( bezt->vec[0], bezt->vec[1], ob ); - bs++; - - bs->v1= curindex+1; - bs->v2= curindex+2; - bs->strength= 1.0; - bs->order=1; - bs->len= globallen( bezt->vec[1], bezt->vec[2], ob ); - bs++; - } - } - } - else { - for(bpnt=nu->bp, a=0; apntsu*nu->pntsv; a++, bpnt++, bp++, curindex++) - { - if(setgoal) - { - bp->goal= sb->mingoal + bpnt->weight*goalfac; - // a little ad hoc changing the goal control to be less *sharp* - bp->goal = (float)pow(bp->goal, 4.0f); - } - if(totspring && a>0) - { - bs->v1= curindex-1; - bs->v2= curindex; - bs->strength= 1.0; - bs->order=1; - bs->len= globallen( (bpnt-1)->vec, bpnt->vec , ob ); - bs++; - } - } - } - } - */ -} - // only meshes supported at the moment -static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float (*vertexCos)[3], unsigned int numverts) +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) { unsigned int i = 0; // dm->getNumVerts(dm); MVert *mvert = NULL; // CDDM_get_verts(dm); ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; - + /* If we have a clothObject, free it. */ - if (clmd->clothObject != NULL) - cloth_free_modifier (clmd); + if ( clmd->clothObject != NULL ) + cloth_free_modifier ( clmd ); /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); - if (clmd->clothObject) + clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); + if ( clmd->clothObject ) { clmd->clothObject->old_solver_type = 255; - clmd->clothObject->old_collision_type = 255; + // clmd->clothObject->old_collision_type = 255; } - else if (clmd->clothObject == NULL) + else if ( !clmd->clothObject ) { - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); return 0; } - switch (ob->type) + switch ( ob->type ) { case OB_MESH: - - // mesh input objects need DerivedMesh - if(!dm) - return 0; - - cloth_from_mesh (ob, clmd, dm); - if (clmd->clothObject != NULL) - { - /* create springs */ - clmd->clothObject->springs = NULL; - clmd->clothObject->numsprings = -1; - - if (!cloth_build_springs (clmd->clothObject, dm) ) - { - modifier_setError (&(clmd->modifier), "Can't build springs."); + // mesh input objects need DerivedMesh + if ( !dm ) return 0; - } - - mvert = CDDM_get_verts(dm); - verts = clmd->clothObject->verts; - /* set initial values */ - for (i = 0; i < numverts; i++, verts++) + cloth_from_mesh ( ob, clmd, dm ); + + if ( clmd->clothObject != NULL ) { - VECCOPY (verts->x, mvert[i].co); - Mat4MulVecfl(ob->obmat, verts->x); + /* create springs */ + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; - verts->mass = clmd->sim_parms.mass; - - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) - verts->goal= clmd->sim_parms.defgoal; - else - verts->goal= 0.0f; - - verts->flags = 0; - VECCOPY(verts->xold, verts->x); - VECCOPY(verts->xconst, verts->x); - VECCOPY(verts->txold, verts->x); - VecMulf(verts->v, 0.0f); - - verts->impulse_count = 0; - VECCOPY(verts->impulse, tnull); + if ( !cloth_build_springs ( clmd->clothObject, dm ) ) + { + modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); + return 0; + } + + mvert = CDDM_get_verts ( dm ); + verts = clmd->clothObject->verts; + + /* set initial values */ + for ( i = 0; i < numverts; i++, verts++ ) + { + VECCOPY ( verts->x, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->x ); + + verts->mass = clmd->sim_parms.mass; + + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal= clmd->sim_parms.defgoal; + else + verts->goal= 0.0f; + + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->xconst, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VecMulf ( verts->v, 0.0f ); + + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); + } + + // apply / set vertex groups + if ( clmd->sim_parms.vgroup_mass > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms.vgroup_mass ); + + // init our solver + if ( solvers [clmd->sim_parms.solver_type].init ) + solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); + + clmd->clothObject->tree = bvh_build ( clmd, clmd->coll_parms.epsilon ); + + cloth_cache_set_frame ( clmd, 1 ); } - // apply / set vertex groups - if (clmd->sim_parms.vgroup_mass > 0) - cloth_apply_vgroup (clmd, dm, clmd->sim_parms.vgroup_mass); - - // init our solver - if (solvers [clmd->sim_parms.solver_type].init) - solvers [clmd->sim_parms.solver_type].init (ob, clmd); - - clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); - - cloth_cache_set_frame(clmd, 1); - } - - return 1; + return 1; case OB_LATTICE: - printf("OB_LATTICE\n"); - // lattice_to_softbody(ob); - return 1; + printf ( "Not supported: OB_LATTICE\n" ); + // lattice_to_softbody(ob); + return 1; case OB_CURVE: case OB_SURF: - printf("OB_SURF| OB_CURVE\n"); - curve_surf_to_cloth(ob, clmd, vertexCos); - return 1; + printf ( "Not supported: OB_SURF| OB_CURVE\n" ); + return 1; default: return 0; // TODO - we do not support changing meshes } - + return 0; } -static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm) +static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { - unsigned int numverts = dm->getNumVerts(dm); - unsigned int numfaces = dm->getNumFaces(dm); - MFace *mface = dm->getFaceArray(dm); + unsigned int numverts = dm->getNumVerts ( dm ); + unsigned int numfaces = dm->getNumFaces ( dm ); + MFace *mface = dm->getFaceArray ( dm ); unsigned int i = 0; /* Allocate our vertices. */ clmd->clothObject->numverts = numverts; - clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); - if (clmd->clothObject->verts == NULL) + clmd->clothObject->verts = MEM_callocN ( sizeof ( ClothVertex ) * clmd->clothObject->numverts, "clothVertex" ); + if ( clmd->clothObject->verts == NULL ) { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); return; } - + // save face information clmd->clothObject->numfaces = numfaces; - clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); - if (clmd->clothObject->mfaces == NULL) + clmd->clothObject->mfaces = MEM_callocN ( sizeof ( MFace ) * clmd->clothObject->numfaces, "clothMFaces" ); + if ( clmd->clothObject->mfaces == NULL ) { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->mfaces." ); return; } - for(i = 0; i < numfaces; i++) - memcpy(&clmd->clothObject->mfaces[i], &mface[i], sizeof(MFace)); - - - // for SIP code - // clmd->clothObject->facemarks = MEM_callocN (sizeof (unsigned char) * clmd->clothObject->numfaces, "clothFaceMarks"); + for ( i = 0; i < numfaces; i++ ) + memcpy ( &clmd->clothObject->mfaces[i], &mface[i], sizeof ( MFace ) ); /* Free the springs since they can't be correct if the vertices * changed. */ - if (clmd->clothObject->springs != NULL) - MEM_freeN (clmd->clothObject->springs); + if ( clmd->clothObject->springs != NULL ) + MEM_freeN ( clmd->clothObject->springs ); } @@ -1303,126 +1178,166 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d * SPRING NETWORK BUILDING IMPLEMENTATION BEGIN ***************************************************************************************/ -int cloth_build_springs(Cloth *cloth, DerivedMesh *dm) +// be carefull: implicit solver has to be resettet when using this one! +int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type) { - ClothSpring *springs = NULL; + Cloth *cloth = clmd->clothObject; + ClothSpring *spring = NULL; + + if(cloth) + { + // TODO: look if this spring is already there + + spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + + spring->ij = indexA; + spring->kl = indexB; + spring->restlen = restlength; + spring->type = spring_type; + spring->flags = 0; + + cloth->numsprings++; + + BLI_linklist_append ( &cloth->springs, spring ); + } +} + +int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) +{ + ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL; unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; unsigned int i = 0; - unsigned int numverts = dm->getNumVerts(dm); - unsigned int numedges = dm->getNumEdges(dm); - unsigned int numfaces = dm->getNumFaces(dm); - MVert *mvert = CDDM_get_verts(dm); - MEdge *medge = CDDM_get_edges(dm); - MFace *mface = CDDM_get_faces(dm); + unsigned int numverts = dm->getNumVerts ( dm ); + unsigned int numedges = dm->getNumEdges ( dm ); + unsigned int numfaces = dm->getNumFaces ( dm ); + MVert *mvert = CDDM_get_verts ( dm ); + MEdge *medge = CDDM_get_edges ( dm ); + MFace *mface = CDDM_get_faces ( dm ); unsigned int index2 = 0; // our second vertex index LinkNode **edgelist = NULL; EdgeHash *edgehash = NULL; - LinkNode *search = NULL; + LinkNode *search = NULL, *search2 = NULL; float temp[3]; - unsigned int temp_index = 0; - ClothSpring *tspring = NULL; // error handling - if(numedges==0) + if ( numedges==0 ) return 0; - edgelist = MEM_callocN (sizeof (LinkNode *) * numverts, "cloth_edgelist_alloc"); - for(i = 0; i < numverts; i++) + cloth->springs = NULL; + + edgelist = MEM_callocN ( sizeof ( LinkNode * ) * numverts, "cloth_edgelist_alloc" ); + for ( i = 0; i < numverts; i++ ) { edgelist[i] = NULL; } - if(cloth->springs) - MEM_freeN(cloth->springs); + if ( cloth->springs ) + MEM_freeN ( cloth->springs ); // create spring network hash edgehash = BLI_edgehash_new(); - // should be 4 for maximal bending springs, using 5 to be sure ;) - springs = cloth->springs = MEM_callocN (sizeof (ClothSpring) * (numedges + numfaces * 2 + 6 * numverts), "cloth_springs_alloc"); - // structural springs - for(i = 0; i < numedges; i++) + for ( i = 0; i < numedges; i++ ) { - springs[i].ij = medge[i].v1; - springs[i].kl = medge[i].v2; - VECSUB(temp, mvert[springs[i].kl].co, mvert[springs[i].ij].co); - springs[i].restlen = sqrt(INPR(temp, temp)); - springs[i].type = STRUCTURAL; - springs[i].flags = 0; - struct_springs++; + spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + + if ( spring ) + { + spring->ij = medge[i].v1; + spring->kl = medge[i].v2; + VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; + spring->flags = 0; + struct_springs++; + + BLI_linklist_append ( &cloth->springs, spring ); + } } // shear springs - for(i = 0; i < numfaces; i++) + for ( i = 0; i < numfaces; i++ ) { - temp_index = struct_springs + shear_springs; + spring = ( ClothSpring *) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); - springs[temp_index].ij = mface[i].v1; - springs[temp_index].kl = mface[i].v3; - VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); - springs[temp_index].restlen = sqrt(INPR(temp, temp)); - springs[temp_index].type = SHEAR; - - BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); - BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); + spring->ij = mface[i].v1; + spring->kl = mface[i].v3; + VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_SHEAR; + BLI_linklist_append ( &edgelist[spring->ij], spring ); + BLI_linklist_append ( &edgelist[spring->kl], spring ); shear_springs++; - temp_index++; - - if(mface[i].v4) + + BLI_linklist_append ( &cloth->springs, spring ); + + if ( mface[i].v4 ) { - springs[temp_index].ij = mface[i].v2; - springs[temp_index].kl = mface[i].v4; - VECSUB(temp, mvert[springs[temp_index].kl].co, mvert[springs[temp_index].ij].co); - springs[temp_index].restlen = sqrt(INPR(temp, temp)); - springs[temp_index].type = SHEAR; - - BLI_linklist_append(&edgelist[springs[temp_index].ij], &(springs[temp_index])); - BLI_linklist_append(&edgelist[springs[temp_index].kl], &(springs[temp_index])); - - shear_springs++; + spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); + + spring->ij = mface[i].v1; + spring->kl = mface[i].v3; + VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_SHEAR; + + BLI_linklist_append ( &edgelist[spring->ij], spring ); + BLI_linklist_append ( &edgelist[spring->kl], spring ); + shear_springs++; + + BLI_linklist_append ( &cloth->springs, spring ); } } // bending springs - for(i = struct_springs; i < struct_springs+shear_springs; i++) - { - search = edgelist[springs[i].kl]; - while(search) + search2 = cloth->springs; + for ( i = struct_springs; i < struct_springs+shear_springs; i++ ) + { + if ( !search2 ) + break; + + tspring2 = search2->link; + search = edgelist[tspring2->kl]; + while ( search ) { tspring = search->link; - index2 = ((tspring->ij==springs[i].kl) ? (tspring->kl) : (tspring->ij)); - - if(!BLI_edgehash_haskey(edgehash, index2, springs[i].ij) // check for existing spring - && !BLI_edgehash_haskey(edgehash, springs[i].ij, index2) // same - && (index2!=springs[i].ij)) // check if startpoint is equal to endpoint + index2 = ( ( tspring->ij==tspring2->kl ) ? ( tspring->kl ) : ( tspring->ij ) ); + + // check for existing spring + // check also if startpoint is equal to endpoint + if ( !BLI_edgehash_haskey ( edgehash, index2, tspring2->ij ) + && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) + && ( index2!=tspring2->ij ) ) { - temp_index = struct_springs + shear_springs + bend_springs; + spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); - springs[temp_index].ij = springs[i].ij; - springs[temp_index].kl = index2; - VECSUB(temp, mvert[index2].co, mvert[springs[i].ij].co); - springs[temp_index].restlen = sqrt(INPR(temp, temp)); - springs[temp_index].type = BENDING; - BLI_edgehash_insert(edgehash, springs[temp_index].ij, index2, NULL); + spring->ij = tspring2->ij; + spring->kl = index2; + VECSUB ( temp, mvert[index2].co, mvert[tspring2->ij].co ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_BENDING; + BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); bend_springs++; + BLI_linklist_append ( &cloth->springs, spring ); } - search = search->next; + search = search->next; } + search2 = search2->next; } cloth->numsprings = struct_springs + shear_springs + bend_springs; - for(i = 0; i < numverts; i++) + for ( i = 0; i < numverts; i++ ) { - BLI_linklist_free(edgelist[i],NULL); + BLI_linklist_free ( edgelist[i],NULL ); } - if(edgelist) - MEM_freeN(edgelist); + if ( edgelist ) + MEM_freeN ( edgelist ); - BLI_edgehash_free(edgehash, NULL); + BLI_edgehash_free ( edgehash, NULL ); return 1; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index c3dbc572b4e..a5a382f7624 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -77,7 +77,7 @@ * * copied from SOLVE_CUBIC.C --> GSL */ -#define mySWAP(a,b) do { float tmp = b ; b = a ; a = tmp ; } while(0) +#define mySWAP(a,b) { float tmp = b ; b = a ; a = tmp ; } int gsl_poly_solve_cubic (float a, float b, float c, float *x0, float *x1, float *x2) { @@ -361,8 +361,6 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa VECADDMUL(to, v3, w3); } - - // unused in the moment, has some bug in DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, double frictionConstant, double delta_V_n) @@ -887,6 +885,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col // TODO: put into (point-face) collision list printf("Moving found!\n"); + } } @@ -924,7 +923,7 @@ void cloth_update_collision_objects(float step) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) { @@ -969,7 +968,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) float tnull[3] = {0,0,0}; int ret = 0; - if ((clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) { return 0; } @@ -1005,7 +1004,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) { @@ -1034,7 +1033,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject) result += cloth_collision_response_static(clmd, coll_clmd); @@ -1141,7 +1140,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) { @@ -1171,7 +1170,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject) result += cloth_collision_response_moving_tris(clmd, coll_clmd); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 7f156acff71..1ee4475a6cc 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -700,15 +700,15 @@ int implicit_init (Object *ob, ClothModifierData *clmd) unsigned int pinned = 0; Cloth *cloth = NULL; ClothVertex *verts = NULL; - ClothSpring *springs = NULL; + ClothSpring *spring = NULL; Implicit_Data *id = NULL; + LinkNode *search = NULL; // init memory guard // MEMORY_BASE.first = MEMORY_BASE.last = NULL; cloth = (Cloth *)clmd->clothObject; verts = cloth->verts; - springs = cloth->springs; // create implicit base id = (Implicit_Data *)MEM_callocN (sizeof(Implicit_Data), "implicit vecmat"); @@ -749,17 +749,22 @@ int implicit_init (Object *ob, ClothModifierData *clmd) id->S[0].vcount = pinned; id->S[0].scount = 0; // init springs */ + search = cloth->springs; for(i=0;inumsprings;i++) { + spring = search->link; + // dFdV_start[i].r = big_I[i].r = big_zero[i].r = id->A[i+cloth->numverts].r = id->dFdV[i+cloth->numverts].r = id->dFdX[i+cloth->numverts].r = - id->P[i+cloth->numverts].r = id->Pinv[i+cloth->numverts].r = id->bigI[i+cloth->numverts].r = springs[i].ij; + id->P[i+cloth->numverts].r = id->Pinv[i+cloth->numverts].r = id->bigI[i+cloth->numverts].r = spring->ij; // dFdV_start[i].c = big_I[i].c = big_zero[i].c = id->A[i+cloth->numverts].c = id->dFdV[i+cloth->numverts].c = id->dFdX[i+cloth->numverts].c = - id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = springs[i].kl; + id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; - springs[i].matrix_index = i + cloth->numverts; + spring->matrix_index = i + cloth->numverts; + + search = search->next; } for(i = 0; i < cloth->numverts; i++) @@ -1170,7 +1175,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, VECSUB(vel, V[s->kl], V[s->ij]); length = sqrt(INPR(extent, extent)); - s->flags &= ~CSPRING_FLAG_NEEDED; + s->flags &= ~CLOTH_SPRING_FLAG_NEEDED; if(length > ABS(ALMOST_ZERO)) { @@ -1193,12 +1198,12 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } - // calculate force of structural springs - if(s->type != BENDING) + // calculate force of structural + shear springs + if(s->type != CLOTH_SPRING_TYPE_BENDING) { if(length > L) // only on elonglation { - s->flags |= CSPRING_FLAG_NEEDED; + s->flags |= CLOTH_SPRING_FLAG_NEEDED; k = clmd->sim_parms.structural; @@ -1219,7 +1224,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { if(length < L) { - s->flags |= CSPRING_FLAG_NEEDED; + s->flags |= CLOTH_SPRING_FLAG_NEEDED; k = clmd->sim_parms.bending; @@ -1231,6 +1236,27 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } } +DO_INLINE void cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +{ + if(s->flags & CLOTH_SPRING_FLAG_NEEDED) + { + if(s->type != CLOTH_SPRING_TYPE_BENDING) + { + sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); + sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); + } + + VECADD(lF[s->ij], lF[s->ij], s->f); + VECSUB(lF[s->kl], lF[s->kl], s->f); + + sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); + sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); + + add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); + } +} + DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) { float v1[3], v2[3]; @@ -1239,6 +1265,7 @@ DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) VECSUB(v2, X[mface.v3], X[mface.v1]); cross_fvector(to, v1, v2); } + DO_INLINE void calculatQuadNormal(float to[3], lfVector *X, MFace mface) { float temp = CalcNormFloat4(X[mface.v1],X[mface.v2],X[mface.v3],X[mface.v4],to); @@ -1280,12 +1307,12 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float gravity[3]; float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; ClothVertex *verts = cloth->verts; - ClothSpring *springs = cloth->springs; MFace *mfaces = cloth->mfaces; float wind_normalized[3]; unsigned int numverts = cloth->numverts; float auxvect[3], velgoal[3], tvect[3]; float kd, ks; + LinkNode *search = cloth->springs; VECCOPY(gravity, clmd->sim_parms.gravity); @@ -1301,7 +1328,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec submul_lfvectorS(lF, lV, spring_air, numverts); /* do goal stuff */ - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { for(i = 0; i < numverts; i++) { @@ -1350,53 +1377,25 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec } } - /* calculate and apply spring forces */ -#pragma omp parallel private(i) -{ -#pragma omp for nowait - for(i = 0; i < cloth->numsprings/2; i++) + // calculate spring forces + search = cloth->springs; + while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) - // { - cloth_calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); - // } + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)){} + cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); + + search = search->next; } -#pragma omp for nowait - for(i = cloth->numsprings/2; i < cloth->numsprings; i++) - { - // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) - // { - cloth_calc_spring_force(clmd, &springs[i], lF, lX, lV, dFdV, dFdX); - // } - } -} // pragma omp parallel - for(i = 0; i < cloth->numsprings; i++) + // apply spring forces + search = cloth->springs; + while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) - { - ClothSpring *s = &springs[i]; - if(s->flags & CSPRING_FLAG_NEEDED) - { - if(s->type != BENDING) - { - sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); - sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); - add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); - } - - VECADD(lF[s->ij], lF[s->ij], s->f); - VECSUB(lF[s->kl], lF[s->kl], s->f); - - sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); - sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); - - add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); - } - } + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); + search = search->next; } } @@ -1442,7 +1441,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase Implicit_Data *id = cloth->implicit; int result = 0; - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { for(i = 0; i < numverts; i++) { @@ -1465,66 +1464,74 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); - // collisions - // itstart(); - - // update verts to current positions - for(i = 0; i < numverts; i++) - { - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) /* do goal stuff */ - { - if(verts [i].goal >= SOFTGOALSNAP) + if(clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + // collisions + // itstart(); + + // update verts to current positions + for(i = 0; i < numverts; i++) + { + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { - float tvect[3] = {.0,.0,.0}; - // VECSUB(tvect, id->Xnew[i], verts[i].xold); - mul_fvector_S(tvect, id->V[i], step+dt); - VECADD(tvect, tvect, verts[i].xold); - VECCOPY(id->Xnew[i], tvect); + if(verts [i].goal >= SOFTGOALSNAP) + { + float tvect[3] = {.0,.0,.0}; + // VECSUB(tvect, id->Xnew[i], verts[i].xold); + mul_fvector_S(tvect, id->V[i], step+dt); + VECADD(tvect, tvect, verts[i].xold); + VECCOPY(id->Xnew[i], tvect); + } + } + + VECCOPY(verts[i].tx, id->Xnew[i]); + + VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); + VECCOPY(verts[i].v, verts[i].tv); + } + + // call collision function + result = cloth_bvh_objcollision(clmd, step + dt, dt); + + // copy corrected positions back to simulation + for(i = 0; i < numverts; i++) + { + if(result) + { + // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + VECCOPY(verts[i].txold, verts[i].tx); + + VECCOPY(id->Xnew[i], verts[i].tx); + + VECCOPY(id->Vnew[i], verts[i].tv); + VecMulf(id->Vnew[i], 1.0f / dt); + } + else + { + VECCOPY(verts[i].txold, id->Xnew[i]); + } } - VECCOPY(verts[i].tx, id->Xnew[i]); + // X = Xnew; + cp_lfvector(id->X, id->Xnew, numverts); - VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); - VECCOPY(verts[i].v, verts[i].tv); - } - - // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, dt); - - // copy corrected positions back to simulation - for(i = 0; i < numverts; i++) - { + // if there were collisions, advance the velocity from v_n+1/2 to v_n+1 if(result) { - // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + // V = Vnew; + cp_lfvector(id->V, id->Vnew, numverts); - VECCOPY(verts[i].txold, verts[i].tx); - - VECCOPY(id->Xnew[i], verts[i].tx); - - VECCOPY(id->Vnew[i], verts[i].tv); - VecMulf(id->Vnew[i], 1.0f / dt); - } - else - { - VECCOPY(verts[i].txold, id->Xnew[i]); + // calculate + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); } } - - // X = Xnew; - cp_lfvector(id->X, id->Xnew, numverts); - - // if there were collisions, advance the velocity from v_n+1/2 to v_n+1 - if(result) + else { - // V = Vnew; - cp_lfvector(id->V, id->Vnew, numverts); - - // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); + // X = Xnew; + cp_lfvector(id->X, id->Xnew, numverts); } // itend(); @@ -1540,7 +1547,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase for(i = 0; i < numverts; i++) { - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(verts [i].goal < SOFTGOALSNAP) { diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 7ce5e6928ea..b487f9a3b26 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -547,7 +547,7 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) Tree *tree=NULL; LinkNode *nlink = NULL; EdgeHash *edgehash = NULL; - ClothSpring *springs = NULL; + LinkNode *springs = NULL; unsigned int numsprings = 0; MFace *mface = NULL; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 5ba3df9a720..c1f097e8447 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4907,7 +4907,7 @@ static void clothModifier_updateDepgraph( ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); if(coll_clmd) { - if (coll_clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ) + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { DagNode *curNode = dag_get_node(forest, ob1); dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); @@ -4915,8 +4915,7 @@ static void clothModifier_updateDepgraph( } } } - } - + } } CustomDataMask clothModifier_requiredDataMask(ModifierData *md) @@ -4925,7 +4924,7 @@ CustomDataMask clothModifier_requiredDataMask(ModifierData *md) CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ - if(clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) if (clmd->sim_parms.vgroup_mass > 0) dataMask |= (1 << CD_MDEFORMVERT); @@ -4944,7 +4943,7 @@ static void clothModifier_freeData(ModifierData *md) if (clmd) { - clmd->sim_parms.flags &= ~CSIMSETT_FLAG_CCACHE_PROTECT; + clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; cloth_free_modifier (clmd); } } diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 6e986ae0067..7f5527466e4 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -40,7 +40,8 @@ * They will assume the position they had prior to pinFrame until unpinFrame * is reached. */ -typedef struct ClothVertex { +typedef struct ClothVertex +{ int flags; /* General flags per vertex. */ float v [3]; /* The velocity of the point. */ float xconst [3]; /* constrained position */ @@ -53,23 +54,26 @@ typedef struct ClothVertex { float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ unsigned int impulse_count; /* same as above */ -} ClothVertex; +} +ClothVertex; /** * The definition of a spring. */ -typedef struct ClothSpring { +typedef struct ClothSpring +{ int ij; /* Pij from the paper, one end of the spring. */ int kl; /* Pkl from the paper, one end of the spring. */ float restlen; /* The original length of the spring. */ - int matrix_index; /* needed for implicit */ - int type; + int matrix_index; /* needed for implicit solver (fast lookup) */ + int type; /* types defined in BKE_cloth.h ("springType") */ int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ float dfdx[3][3]; float dfdv[3][3]; float f[3]; -} ClothSpring; +} +ClothSpring; @@ -84,10 +88,11 @@ typedef struct ClothSpring { * as in stepsPerFrame comapred to the time step in the paper, I've used * variables with different names to minimize confusion. **/ -typedef struct SimulationSettings { +typedef struct SimulationSettings +{ short vgroup_mass; /* optional vertexgroup name for assigning weight. */ short pad; - float mingoal; /* see SB */ + float mingoal; /* see SB */ int preroll; /* How many frames of simulation to do before we start. */ float Cdis; /* Mechanical damping of springs. */ float Cvi; /* Viscous/fluid damping. */ @@ -99,11 +104,11 @@ typedef struct SimulationSettings { float structural; /* Structural spring stiffness. */ float shear; /* Shear spring stiffness. */ float bending; /* Flexion spring stiffness. */ - float sim_time; + float sim_time; int flags; /* flags, see CSIMSETT_FLAGS enum above. */ short solver_type; /* which solver should be used? */ short pad2; - float maxgoal; /* see SB */ + float maxgoal; /* see SB */ float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ float sim_time_old; @@ -114,17 +119,22 @@ typedef struct SimulationSettings { int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ -} SimulationSettings; +} +SimulationSettings; -typedef struct CollisionSettings { +typedef struct CollisionSettings +{ float epsilon; /* The radius of a particle in the cloth. */ float self_friction; /* Fiction/damping with self contact. */ float friction; /* Friction/damping applied on contact with other object.*/ short collision_type; /* which collision system is used. */ short loop_count; /* How many iterations for the collision loop. */ struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ -} CollisionSettings; + int flags; /* collision flags defined in BKE_cloth.h */ + int pad; +} +CollisionSettings; /** @@ -137,21 +147,20 @@ typedef struct CollisionSettings { * own connectivity of the mesh based on the actual edges in the mesh. * **/ -typedef struct Cloth { - struct ClothVertex *verts; /* The vertices that represent this cloth. */ - struct ClothSpring *springs; /* The springs connecting the mesh. */ - unsigned int numverts; /* The number of verts == m * n. */ - unsigned int numsprings; /* The count of springs. */ - unsigned char *facemarks; - char old_solver_type; /* Needed to allow call to free if solver changes. */ - char old_collision_type; /* Needed to allow call to free if collision changes.*/ - short pad7; +typedef struct Cloth +{ + struct ClothVertex *verts; /* The vertices that represent this cloth. */ + struct LinkNode *springs; /* The springs connecting the mesh. */ + unsigned int numverts; /* The number of verts == m * n. */ + unsigned int numsprings; /* The count of springs. */ unsigned int numfaces; - int pad2; - int pad4; + unsigned char old_solver_type; + unsigned char pad2; + short pad3; void *tree; /* collision tree for this cloth object */ struct MFace *mfaces; void *implicit; /* our implicit solver connects to this pointer */ -} Cloth; +} +Cloth; #endif diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index c0925f4eae1..10d4d544e86 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3111,9 +3111,9 @@ static void object_panel_cloth(Object *ob) if(clmd) { - but = uiDefButBitI(block, TOG, CSIMSETT_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; int defCount; @@ -3149,8 +3149,8 @@ static void object_panel_cloth(Object *ob) /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CSIMSETT_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - if (clmd->sim_parms.flags & CSIMSETT_FLAG_GOAL) + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(ob->type==OB_MESH) { @@ -3228,7 +3228,7 @@ static void object_panel_cloth_II(Object *ob) clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; char str[128]; @@ -3266,7 +3266,7 @@ static void object_panel_cloth_II(Object *ob) { uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); } - uiDefButBitI(block, TOG, CSIMSETT_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); uiBlockEndAlign(block); } } @@ -3283,7 +3283,7 @@ static void object_panel_cloth_III(Object *ob) clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if (!(clmd->sim_parms.flags & CSIMSETT_FLAG_COLLOBJ)) + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; char str[128]; @@ -3295,9 +3295,15 @@ static void object_panel_cloth_III(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); uiBlockBeginAlign(block); - // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,10,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefBut(block, LABEL, 0, "",160,10,150,20, NULL, 0.0, 0, 0, 0, ""); + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); + } + else + uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); uiBlockEndAlign(block); } } From 8dbc71020c9217af659874240d730ce58305bad6 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 21 Oct 2007 16:38:13 +0000 Subject: [PATCH 028/430] Disabled Cloth collision detection because of almost complete rewrite/seperation of the collision system like we discussed on the sprint. You can enable position caching/collision object now then enableing it as an deflection object. Problem: Some GUI glitch in the modifier stack, please help :) --- source/blender/blenkernel/BKE_cloth.h | 64 +--- source/blender/blenkernel/intern/cloth.c | 25 +- source/blender/blenkernel/intern/collision.c | 365 +++++++++---------- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/kdop.c | 185 ++++------ source/blender/blenkernel/intern/modifier.c | 122 ++++++- source/blender/makesdna/DNA_cloth_types.h | 1 - source/blender/makesdna/DNA_modifier_types.h | 12 + source/blender/src/buttons_editing.c | 24 +- source/blender/src/buttons_object.c | 24 +- source/blender/src/transform_generics.c | 8 +- 11 files changed, 426 insertions(+), 406 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 692692dbf5a..1c5310c10d1 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -124,68 +124,8 @@ void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); -// used in collision.c -typedef struct Tree -{ - struct Tree *nodes[4]; // 4 children --> quad-tree - struct Tree *parent; - struct Tree *nextLeaf; - struct Tree *prevLeaf; - float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP - unsigned int tri_index; // this saves the index of the face - int count_nodes; // how many nodes are used - int traversed; // how many nodes already traversed until this level? - int isleaf; -} -Tree; - -typedef struct Tree TreeNode; - -typedef struct BVH -{ - unsigned int numfaces; - unsigned int numverts; - ClothVertex *verts; // just a pointer to the original datastructure - MFace *mfaces; // just a pointer to the original datastructure - struct LinkNode *tree; - TreeNode *root; // TODO: saving the root --> is this really needed? YES! - TreeNode *leaf_tree; /* Tail of the leaf linked list. */ - TreeNode *leaf_root; /* Head of the leaf linked list. */ - float epsilon; /* epslion is used for inflation of the k-dop */ - int flags; /* bvhFlags */ -} -BVH; - -typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); - - -///////////////////////////////////////////////// -// collision.c //////////////////////////////////////////////// -// needed for implicit.c -void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); -int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); - -//////////////////////////////////////////////// - - -///////////////////////////////////////////////// -// kdop.c -//////////////////////////////////////////////// - -// needed for cloth.c -void bvh_free ( BVH * bvh ); -BVH *bvh_build ( ClothModifierData *clmd, float epsilon ); -LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); - -// needed for collision.c -int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); -void bvh_update ( ClothModifierData * clmd, BVH * bvh, int moving ); - -//////////////////////////////////////////////// - - ///////////////////////////////////////////////// // cloth.c @@ -200,7 +140,7 @@ void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int tot /* Typedefs for function pointers we need for solvers and collision detection. */ typedef void ( *CM_COLLISION_SELF ) ( ClothModifierData *clmd, int step ); -typedef void ( *CM_COLLISION_OBJ ) ( ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response ); +// typedef void ( *CM_COLLISION_OBJ ) ( ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response ); /* This enum provides the IDs for our solvers. */ @@ -239,6 +179,7 @@ typedef struct Frame Frame; /* used for collisions in collision.c */ +/* typedef struct CollPair { unsigned int face1; // cloth face @@ -253,6 +194,7 @@ typedef struct CollPair unsigned int pointsb[4]; } CollPair; +*/ /* used for collisions in collision.c */ typedef struct EdgeCollPair diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index eb7454ccd42..d83c7bcb7f0 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -65,6 +65,7 @@ #include "BKE_mesh.h" #include "BKE_object.h" #include "BKE_cloth.h" +#include "BKE_collisions.h" #include "BKE_modifier.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" @@ -845,11 +846,11 @@ void cloth_free_modifier ( ClothModifierData *clmd ) cloth->springs = NULL; cloth->numsprings = 0; - +/* // free BVH collision tree if ( cloth->tree ) bvh_free ( ( BVH * ) cloth->tree ); - +*/ // we save our faces for collision objects if ( cloth->mfaces ) MEM_freeN ( cloth->mfaces ); @@ -1011,7 +1012,7 @@ static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMes verts->impulse_count = 0; VECCOPY ( verts->impulse, tnull ); } - clmd->clothObject->tree = bvh_build ( clmd,clmd->coll_parms.epsilon ); + // clmd->clothObject->tree = bvh_build ( dm, clmd->coll_parms.epsilon ); } @@ -1020,20 +1021,6 @@ static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMes } } -/* -helper function to get proper spring length -when object is rescaled -*/ -float cloth_globallen ( float *v1,float *v2,Object *ob ) -{ - float p1[3],p2[3]; - VECCOPY ( p1,v1 ); - Mat4MulVecfl ( ob->obmat, p1 ); - VECCOPY ( p2,v2 ); - Mat4MulVecfl ( ob->obmat, p2 ); - return VecLenf ( p1,p2 ); -} - // only meshes supported at the moment static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) { @@ -1082,7 +1069,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh return 0; } - mvert = CDDM_get_verts ( dm ); + mvert = dm->getVertArray ( dm ); // CDDM_get_verts ( dm ); verts = clmd->clothObject->verts; /* set initial values */ @@ -1116,7 +1103,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh if ( solvers [clmd->sim_parms.solver_type].init ) solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); - clmd->clothObject->tree = bvh_build ( clmd, clmd->coll_parms.epsilon ); + // clmd->clothObject->tree = bvh_build ( dm, clmd->coll_parms.epsilon ); cloth_cache_set_frame ( clmd, 1 ); } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index a5a382f7624..41823b0ad39 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -49,6 +49,7 @@ #include "BLI_arithb.h" #include "BLI_edgehash.h" #include "BLI_linklist.h" +#include "BKE_collisions.h" #include "BKE_curve.h" #include "BKE_deform.h" #include "BKE_DerivedMesh.h" @@ -217,7 +218,7 @@ int gsl_poly_solve_quadratic (float a, float b, float c, float *x0, float *x1) * page 4, left column */ -int cloth_get_collision_time(float a[3], float b[3], float c[3], float d[3], float e[3], float f[3], float solution[3]) +int collisions_get_collision_time(float a[3], float b[3], float c[3], float d[3], float e[3], float f[3], float solution[3]) { int num_sols = 0; @@ -318,7 +319,7 @@ int cloth_get_collision_time(float a[3], float b[3], float c[3], float d[3], flo } // w3 is not perfect -void cloth_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) +void collisions_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) { double tempV1[3], tempV2[3], tempV4[3]; double a,b,c,d,e,f; @@ -372,8 +373,9 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } -int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) { + /* unsigned int i = 0; int result = 0; LinkNode *search = NULL; @@ -386,20 +388,20 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; - search = clmd->coll_parms.collision_list; + // search = clmd->coll_parms.collision_list; while(search) { collpair = search->link; // compute barycentric coordinates for both collision points - cloth_compute_barycentric(collpair->pa, + collisions_compute_barycentric(collpair->pa, cloth1->verts[collpair->ap1].txold, cloth1->verts[collpair->ap2].txold, cloth1->verts[collpair->ap3].txold, &w1, &w2, &w3); - cloth_compute_barycentric(collpair->pb, + collisions_compute_barycentric(collpair->pb, cloth2->verts[collpair->bp1].txold, cloth2->verts[collpair->bp2].txold, cloth2->verts[collpair->bp3].txold, @@ -442,12 +444,6 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * // printf("friction applied: %f\n", magtangent); // TODO check original code - /* - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); - */ } @@ -455,6 +451,7 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * // printf("impulse: %f\n", impulse); + // face A VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); cloth1->verts[collpair->ap1].impulse_count++; @@ -464,63 +461,50 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); cloth1->verts[collpair->ap3].impulse_count++; - result = 1; + // face B + VECADDMUL(cloth2->verts[collpair->bp1].impulse, collpair->normal, u1 * impulse); + cloth2->verts[collpair->bp1].impulse_count++; - /* - if (overlap > ALMOST_ZERO) { - double I_mag = overlap * 0.1; - - impulse = -I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - - VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); - cloth1->verts[collpair->ap1].impulse_count++; - - VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); - cloth1->verts[collpair->ap2].impulse_count++; + VECADDMUL(cloth2->verts[collpair->bp2].impulse, collpair->normal, u2 * impulse); + cloth2->verts[collpair->bp2].impulse_count++; - VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); - cloth1->verts[collpair->ap3].impulse_count++; - } - */ + VECADDMUL(cloth2->verts[collpair->bp3].impulse, collpair->normal, u3 * impulse); + cloth2->verts[collpair->bp3].impulse_count++; + + + result = 1; // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case // Apply the impulse and increase impulse counters. - - /* - // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); - VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); - // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); - magtangent = Normalize(vrel_t_pre); - VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); - - VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); - */ - - + } search = search->next; } - + return result; + */ + return 0; } -int cloth_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) + +int collisions_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) { } -int cloth_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) +int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) { } void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { + /* CollPair *collpair = NULL; Cloth *cloth1=NULL, *cloth2=NULL; MFace *face1=NULL, *face2=NULL; @@ -618,11 +602,11 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm // collpair->face1 = tree1->tri_index; // collpair->face2 = tree2->tri_index; - VECCOPY(collpair->normal, collpair->vector); - Normalize(collpair->normal); + // VECCOPY(collpair->normal, collpair->vector); + // Normalize(collpair->normal); + + // collpair->distance = distance; - collpair->distance = distance; - BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); } else { @@ -634,9 +618,10 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm MEM_freeN(collpair); } } + */ } -int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) +int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) { Cloth *cloth1, *cloth2; ClothVertex *verts1, *verts2; @@ -667,7 +652,7 @@ int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_cl return 0; } -void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void collisions_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { EdgeCollPair edgecollpair; Cloth *cloth1=NULL, *cloth2=NULL; @@ -773,7 +758,7 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co } - if(!cloth_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) + if(!collisions_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) { VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); @@ -782,7 +767,7 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); - numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); for (k = 0; k < numsolutions; k++) { @@ -802,8 +787,9 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co } } -void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { + /* CollPair collpair; Cloth *cloth1=NULL, *cloth2=NULL; MFace *face1=NULL, *face2=NULL; @@ -872,7 +858,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); - numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); for (k = 0; k < numsolutions; k++) { @@ -894,19 +880,22 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col } } + */ } -void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) { + /* // TODO: check for adjacent - cloth_collision_moving_edges(clmd, coll_clmd, tree1, tree2); + collisions_collision_moving_edges(clmd, coll_clmd, tree1, tree2); - cloth_collision_moving_tris(clmd, coll_clmd, tree1, tree2); - cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); + collisions_collision_moving_tris(clmd, coll_clmd, tree1, tree2); + collisions_collision_moving_tris(coll_clmd, clmd, tree2, tree1); + */ } // move collision objects forward in time and update static bounding boxes -void cloth_update_collision_objects(float step) +void collisions_update_collision_objects(float step) { Base *base=NULL; ClothModifierData *coll_clmd=NULL; @@ -943,15 +932,15 @@ void cloth_update_collision_objects(float step) } // update BVH of collision object - bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING + // bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING } else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } } -// CLOTH_MAX_THRESHOLD defines how much collision rounds/loops should be taken +// collisions_MAX_THRESHOLD defines how much collision rounds/loops should be taken #define CLOTH_MAX_THRESHOLD 10 // cloth - object collisions @@ -961,12 +950,13 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) ClothModifierData *coll_clmd=NULL; Cloth *cloth=NULL; Object *coll_ob=NULL; - BVH *cloth_bvh=NULL; + BVH *collisions_bvh=NULL; unsigned int i=0, j = 0, numfaces = 0, numverts = 0; unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; int ret = 0; + LinkNode *collision_list = NULL; if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) { @@ -974,7 +964,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } cloth = clmd->clothObject; verts = cloth->verts; - cloth_bvh = (BVH *) cloth->tree; + collisions_bvh = (BVH *) cloth->tree; numfaces = clmd->clothObject->numfaces; numverts = clmd->clothObject->numverts; @@ -983,16 +973,15 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update(clmd, cloth_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + // bvh_update(clmd, collisions_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) // update collision objects - cloth_update_collision_objects(step); + collisions_update_collision_objects(step); do { result = 0; ic = 0; - clmd->coll_parms.collision_list = NULL; // check all collision objects for (base = G.scene->base.first; base; base = base->next) @@ -1010,71 +999,57 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static); + // fill collision list + bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // result += collisions_collision_response_static_tris(clmd, coll_clmd, collision_list, 0); + + // result += collisions_collision_response_static_tris(coll_clmd, clmd, collision_list, 1); + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + // free collision list + if(collision_list) + { + LinkNode *search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; + } } else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // handle all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject) - result += cloth_collision_response_static(clmd, coll_clmd); - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - // free collision list - if(clmd->coll_parms.collision_list) - { - LinkNode *search = clmd->coll_parms.collision_list; - while(search) - { - CollPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(clmd->coll_parms.collision_list,NULL); - - clmd->coll_parms.collision_list = NULL; - } - printf("ic: %d\n", ic); rounds++; } @@ -1100,7 +1075,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // update cloth bvh - bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING // update moving bvh for collision object once for (base = G.scene->base.first; base; base = base->next) @@ -1119,7 +1094,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING + // bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING } } @@ -1128,7 +1103,6 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { result = 0; ic = 0; - clmd->coll_parms.collision_list = NULL; // check all collision objects for (base = G.scene->base.first; base; base = base->next) @@ -1146,83 +1120,72 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_moving); + bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // handle all collision objects + + /* + if (coll_clmd->clothObject) + result += collisions_collision_response_moving_tris(clmd, coll_clmd); + else + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + */ + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + + // update cloth bvh + // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING + + + // free collision list + if(collision_list) + { + LinkNode *search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; + } } else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } - - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - // handle all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject) - result += cloth_collision_response_moving_tris(clmd, coll_clmd); - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - - // update cloth bvh - bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING - - - // free collision list - if(clmd->coll_parms.collision_list) - { - LinkNode *search = clmd->coll_parms.collision_list; - while(search) - { - CollPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(clmd->coll_parms.collision_list,NULL); - - clmd->coll_parms.collision_list = NULL; - } - printf("ic: %d\n", ic); rounds++; } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 1ee4475a6cc..2ce00d0e38c 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1492,7 +1492,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, dt); + result = 0; // cloth_bvh_objcollision(clmd, step + dt, dt); // copy corrected positions back to simulation for(i = 0; i < numverts; i++) diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index b487f9a3b26..8b2540c7d8a 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -38,7 +38,6 @@ #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" -#include "DNA_cloth_types.h" #include "DNA_key_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -59,7 +58,7 @@ #include "BKE_key.h" #include "BKE_mesh.h" #include "BKE_object.h" -#include "BKE_cloth.h" +#include "BKE_collisions.h" #include "BKE_modifier.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" @@ -165,13 +164,13 @@ static int size_threshold = 16; /* * Common methods for all algorithms */ -DO_INLINE void bvh_exchange(Tree **a, int i, int j) +void bvh_exchange(Tree **a, int i, int j) { Tree *t=a[i]; a[i]=a[j]; a[j]=t; } -DO_INLINE int floor_lg(int a) +int floor_lg(int a) { return (int)(floor(log(a)/log(2))); } @@ -294,7 +293,7 @@ static void bvh_introsort_loop (Tree **a, int lo, int hi, int depth_limit, int a } } -DO_INLINE void bvh_sort(Tree **a0, int begin, int end, int axis) +void bvh_sort(Tree **a0, int begin, int end, int axis) { if (begin < end) { @@ -303,7 +302,7 @@ DO_INLINE void bvh_sort(Tree **a0, int begin, int end, int axis) bvh_insertionsort(a, begin, end, axis); } } -DO_INLINE void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) +void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) { bvh_sort(face_list, start, end, axis); } @@ -330,7 +329,7 @@ void bvh_free(BVH * bvh) BLI_linklist_free(bvh->tree,NULL); bvh->tree = NULL; - + MEM_freeN(bvh); bvh = NULL; } @@ -338,7 +337,7 @@ void bvh_free(BVH * bvh) // only supports x,y,z axis in the moment // but we should use a plain and simple function here for speed sake -DO_INLINE int bvh_largest_axis(float *bv) +int bvh_largest_axis(float *bv) { float middle_point[3]; @@ -362,7 +361,7 @@ DO_INLINE int bvh_largest_axis(float *bv) } // depends on the fact that the BVH's for each face is already build -DO_INLINE void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv) { float newmin,newmax; int i, j; @@ -386,9 +385,9 @@ DO_INLINE void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, } } -DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) { - ClothVertex *tempMVert = bvh->verts; + MVert *tempMVert = bvh->xold; MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; @@ -415,7 +414,7 @@ DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, flo // for all Axes. for (i = KDOP_START; i < KDOP_END; i++) { - newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); + newminmax = INPR(tempMVert[temp].co, KDOP_AXES[i]); if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) tempBV[(2 * i)] = newminmax; if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) @@ -425,9 +424,10 @@ DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, flo } } -DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) { - ClothVertex *tempMVert = bvh->verts; + MVert *tempMVert = bvh->xold; + MVert *tempMVert2 = bvh->x; MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; @@ -454,13 +454,13 @@ DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, flo // for all Axes. for (i = KDOP_START; i < KDOP_END; i++) { - newminmax = INPR(tempMVert[temp].txold, KDOP_AXES[i]); + newminmax = INPR(tempMVert[temp].co, KDOP_AXES[i]); if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) tempBV[(2 * i)] = newminmax; if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) tempBV[(2 * i) + 1] = newminmax; - newminmax = INPR(tempMVert[temp].tx, KDOP_AXES[i]); + newminmax = INPR(tempMVert2[temp].co, KDOP_AXES[i]); if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) tempBV[(2 * i)] = newminmax; if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) @@ -538,25 +538,18 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsign return; } -BVH *bvh_build (ClothModifierData *clmd, float epsilon) +BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, float epsilon) { unsigned int i = 0, j = 0, k = 0; Tree **face_list=NULL; BVH *bvh=NULL; - Cloth *cloth = NULL; Tree *tree=NULL; LinkNode *nlink = NULL; EdgeHash *edgehash = NULL; - LinkNode *springs = NULL; unsigned int numsprings = 0; MFace *mface = NULL; - if(!clmd) - return NULL; - - cloth = clmd->clothObject; - - if(!cloth) + if(!dm) return NULL; bvh = MEM_callocN(sizeof(BVH), "BVH"); @@ -566,20 +559,18 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) return NULL; } - springs = cloth->springs; - numsprings = cloth->numsprings; - bvh->flags = 0; bvh->leaf_tree = NULL; bvh->leaf_root = NULL; bvh->tree = NULL; bvh->epsilon = epsilon; - bvh->numfaces = cloth->numfaces; - mface = bvh->mfaces = cloth->mfaces; + bvh->numfaces = dm->getNumFaces(dm); + mface = bvh->mfaces = dm->getFaceArray(dm); - bvh->numverts = cloth->numverts; - bvh->verts = cloth->verts; + bvh->numverts = numverts; + bvh->x = x; + bvh->xold = xold; tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); // TODO: check succesfull alloc BLI_linklist_append(&bvh->tree, tree); @@ -610,21 +601,6 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) } else { - // create spring tearing hash - /* - edgehash = BLI_edgehash_new(); - if(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) - for(i = 0; i < numsprings; i++) - { - if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) - &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) - { - BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); - BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); - } - } - */ - // create face boxes face_list = MEM_callocN (bvh->numfaces * sizeof (Tree *), "Tree"); if (face_list == NULL) @@ -637,50 +613,43 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) // create face boxes for(i = 0, k = 0; i < bvh->numfaces; i++) { - LinkNode *tnlink; - /* - if((!BLI_edgehash_haskey(edgehash, mface[i].v1, mface[i].v2)) - &&(!BLI_edgehash_haskey(edgehash, mface[i].v2, mface[i].v3)) - &&(!BLI_edgehash_haskey(edgehash, mface[i].v3, mface[i].v4)) - &&(!BLI_edgehash_haskey(edgehash, mface[i].v4, mface[i].v1))) - */ + LinkNode *tnlink = NULL; + + tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + // TODO: check succesfull alloc + + tnlink = BLI_linklist_append_fast(&nlink->next, tree); + + face_list[i] = tree; + tree->tri_index = i; + tree->isleaf = 1; + tree->nextLeaf = NULL; + tree->prevLeaf = bvh->leaf_tree; + tree->parent = NULL; + tree->count_nodes = 0; + + if(i==0) { - tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); - // TODO: check succesfull alloc - - tnlink = BLI_linklist_append_fast(&nlink->next, tree); - - face_list[i] = tree; - tree->tri_index = i; - tree->isleaf = 1; - tree->nextLeaf = NULL; - tree->prevLeaf = bvh->leaf_tree; - tree->parent = NULL; - tree->count_nodes = 0; - - if(i==0) - { - bvh->leaf_tree = bvh->leaf_root = tree; - } - else - { - bvh->leaf_tree->nextLeaf = tree; - bvh->leaf_tree = bvh->leaf_tree->nextLeaf; - } - - tree->nodes[0] = tree->nodes[1] = tree->nodes[2] = tree->nodes[3] = NULL; - - bvh_calc_DOP_hull_static(bvh, &face_list[i], 1, tree->bv); - - // inflate the bv with some epsilon - for (j = KDOP_START; j < KDOP_END; j++) - { - tree->bv[(2 * j)] -= bvh->epsilon; // minimum - tree->bv[(2 * j) + 1] += bvh->epsilon; // maximum - } - - nlink = tnlink; + bvh->leaf_tree = bvh->leaf_root = tree; } + else + { + bvh->leaf_tree->nextLeaf = tree; + bvh->leaf_tree = bvh->leaf_tree->nextLeaf; + } + + tree->nodes[0] = tree->nodes[1] = tree->nodes[2] = tree->nodes[3] = NULL; + + bvh_calc_DOP_hull_static(bvh, &face_list[i], 1, tree->bv); + + // inflate the bv with some epsilon + for (j = KDOP_START; j < KDOP_END; j++) + { + tree->bv[(2 * j)] -= bvh->epsilon; // minimum + tree->bv[(2 * j) + 1] += bvh->epsilon; // maximum + } + + nlink = tnlink; } // build root bvh @@ -699,7 +668,7 @@ BVH *bvh_build (ClothModifierData *clmd, float epsilon) } // bvh_overlap - is it possbile for 2 bv's to collide ? -DO_INLINE int bvh_overlap(float *bv1, float *bv2) +int bvh_overlap(float *bv1, float *bv2) { int i = 0; for (i = KDOP_START; i < KDOP_END; i++) @@ -725,18 +694,10 @@ DO_INLINE int bvh_overlap(float *bv1, float *bv2) * every other triangle that doesn't require any realloc, but uses * much memory */ -int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response) +int bvh_traverse(Tree * tree1, Tree * tree2, LinkNode *collision_list) { - int i = 0, ret=0; - - /* - // Shouldn't be possible - if(!tree1 || !tree2) - { - printf("Error: no tree there\n"); - return 0; -} - */ + int i = 0, ret = 0; + if (bvh_overlap(tree1->bv, tree2->bv)) { // Check if this node in the first tree is a leaf @@ -745,10 +706,14 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * // Check if this node in the second tree a leaf if (tree2->isleaf) { - // Provide the collision response. + // save potential colliding triangles + CollisionPair *collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); + + collpair->indexA = tree1->tri_index; + collpair->indexB = tree2->tri_index; + + BLI_linklist_append(&collision_list, collpair); - if(collision_response) - collision_response (clmd, coll_clmd, tree1, tree2); return 1; } else @@ -757,7 +722,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree2->nodes[i] && bvh_traverse (clmd, coll_clmd, tree1, tree2->nodes[i], step, collision_response)) + if (tree2->nodes[i] && bvh_traverse (tree1, tree2->nodes[i], collision_list)) ret = 1; } } @@ -768,7 +733,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) + if (tree1->nodes [i] && bvh_traverse (tree1->nodes[i], tree2, collision_list)) ret = 1; } } @@ -809,12 +774,18 @@ void bvh_join(Tree * tree) } // update static bvh -void bvh_update(ClothModifierData *clmd, BVH * bvh, int moving) +// needs new positions in bvh->x, bvh->xold +void bvh_update(DerivedMesh *dm, BVH * bvh, int moving) { TreeNode *leaf, *parent; int traversecheck = 1; // if this is zero we don't go further unsigned int j = 0; + if(bvh->numfaces != dm->getNumFaces(dm)) + return; + + bvh->mfaces = dm->getFaceArray(dm); + for (leaf = bvh->leaf_root; leaf; leaf = leaf->nextLeaf) { traversecheck = 1; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index bb6297361fe..59bd4b8253d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -72,6 +72,7 @@ #include "BKE_main.h" #include "BKE_anim.h" #include "BKE_bad_level_calls.h" +#include "BKE_collisions.h" #include "BKE_customdata.h" #include "BKE_global.h" #include "BKE_utildefines.h" @@ -4920,7 +4921,7 @@ static void clothModifier_updateDepgraph( CustomDataMask clothModifier_requiredDataMask(ModifierData *md) { - ClothModifierData *clmd = (HookModifierData *)md; + ClothModifierData *clmd = (ClothModifierData *)md; CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ @@ -4948,6 +4949,113 @@ static void clothModifier_freeData(ModifierData *md) } } +/* Collision */ + +static void collisionModifier_initData(ModifierData *md) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + + collmd->x = NULL; + collmd->xold = NULL; + collmd->time = -1; + collmd->numverts = 0; + collmd->tree = NULL; +} + +static void collisionModifier_freeData(ModifierData *md) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + + if (collmd) + { + if(collmd->tree) + bvh_free(collmd->tree); + if(collmd->x) + MEM_freeN(collmd->x); + if(collmd->xold) + MEM_freeN(collmd->xold); + + collmd->x = NULL; + collmd->xold = NULL; + collmd->time = -1; + collmd->numverts = 0; + collmd->tree = NULL; + } +} + +static void collisionModifier_deformVerts( + ModifierData *md, Object *ob, DerivedMesh *derivedData, + float (*vertexCos)[3], int numVerts) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + DerivedMesh *dm = NULL; + MVert *mvert = NULL; + float current_time = 0; + unsigned int numverts = 0, i = 0; + MVert *tempVert = NULL; + + // if possible use/create DerivedMesh + + if(derivedData) dm = CDDM_copy(derivedData); + else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + + if(dm) + { + CDDM_apply_vert_coords(dm, vertexCos); + CDDM_calc_normals(dm); + + + current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); + + if(current_time > collmd->time) + { + numverts = dm->getNumVerts ( dm ); + + // check if mesh has changed + if(collmd->x && (numverts != collmd->numverts)) + collisionModifier_freeData(collmd); + + if(collmd->time == -1) // first time + { + collmd->x = dm->dupVertArray(dm); + collmd->xold = dm->dupVertArray(dm); + collmd->numverts = numverts; + + // TODO: epsilon + // create bounding box hierarchy + collmd->tree = bvh_build(dm, collmd->x, collmd->xold, numverts, 0.01); + } + else if(numverts == collmd->numverts) + { + // put positions to old positions + tempVert = collmd->xold; + collmd->xold = collmd->x; + collmd->x = tempVert; + + memcpy(collmd->x, dm->getVertArray(dm), numverts*sizeof(MVert)); + + for ( i = 0; i < numverts; i++ ) + { + // we save global positions + Mat4MulVecfl ( ob->obmat, collmd->x[i].co ); + } + + bvh_update(dm, collmd->tree, 0); // recalc static bounding boxes + } + + collmd->time = current_time; + } + } + + if(dm) + dm->release(dm); +} + +static int collisionModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} + /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) @@ -5247,6 +5355,16 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) // mti->copyData = clothModifier_copyData; mti->deformVerts = clothModifier_deformVerts; mti->updateDepgraph = clothModifier_updateDepgraph; + + mti = INIT_TYPE(Collision); + mti->type = eModifierTypeType_OnlyDeform; + mti->initData = collisionModifier_initData; + mti->flags = eModifierTypeFlag_AcceptsMesh + | eModifierTypeFlag_RequiresOriginalData; + mti->dependsOnTime = collisionModifier_dependsOnTime; + mti->freeData = collisionModifier_freeData; + mti->deformVerts = collisionModifier_deformVerts; + // mti->copyData = collisionModifier_copyData; mti = INIT_TYPE(Boolean); mti->type = eModifierTypeType_Nonconstructive; @@ -5449,7 +5567,7 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -ModifierData * modifiers_isClothEnabled(Object *ob) +ModifierData *modifiers_isClothEnabled(Object *ob) { ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 7f5527466e4..27f7431a9cf 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -130,7 +130,6 @@ typedef struct CollisionSettings float friction; /* Friction/damping applied on contact with other object.*/ short collision_type; /* which collision system is used. */ short loop_count; /* How many iterations for the collision loop. */ - struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ int flags; /* collision flags defined in BKE_cloth.h */ int pad; } diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 4c9fbdcc7b7..e6e73ea7d07 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -31,6 +31,7 @@ typedef enum ModifierType { eModifierType_Smooth, eModifierType_Cast, eModifierType_Cloth, + eModifierType_Collision, NUM_MODIFIER_TYPES } ModifierType; @@ -346,6 +347,17 @@ typedef struct ClothModifierData { CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ } ClothModifierData; +typedef struct CollisionModifierData { + ModifierData modifier; + + struct MVert *x; + struct MVert *xold; + + unsigned int numverts; + float time; + void *tree; /* collision tree for this cloth object */ +} CollisionModifierData; + typedef enum { eBooleanModifierOp_Intersect, eBooleanModifierOp_Union, diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 194241c4380..13aae388106 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -950,7 +950,9 @@ static uiBlock *modifiers_add_menu(void *ob_v) ModifierTypeInfo *mti = modifierType_getInfo(i); /* Only allow adding through appropriate other interfaces */ - if(ELEM3(i, eModifierType_Softbody, eModifierType_Hook, eModifierType_Cloth)) continue; + if(ELEM(i, eModifierType_Softbody, eModifierType_Hook)) continue; + + if(ELEM(i, eModifierType_Cloth, eModifierType_Collision)) continue; if((mti->flags&eModifierTypeFlag_AcceptsCVs) || (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) { @@ -1483,7 +1485,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiBlockSetCol(block, TH_AUTO); /* open/close icon */ - if (!isVirtual) { + if (!isVirtual && md->type!=eModifierType_Collision) { uiBlockSetEmboss(block, UI_EMBOSSN); uiDefIconButBitI(block, ICONTOG, eModifierMode_Expanded, B_MODIFIER_REDRAW, VICON_DISCLOSURE_TRI_RIGHT, x-10, y-2, 20, 20, &md->mode, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Modifier"); } @@ -1500,8 +1502,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiBlockBeginAlign(block); uiDefBut(block, TEX, B_MODIFIER_REDRAW, "", x+10, y-1, buttonWidth-60, 19, md->name, 0.0, sizeof(md->name)-1, 0.0, 0.0, "Modifier name"); - /* Softbody not allowed in this situation, enforce! */ - if (md->type!=eModifierType_Softbody || !(ob->pd && ob->pd->deflect)) { + /* Softbody not allowed in this situation, enforce! */ + if ((md->type!=eModifierType_Softbody && md->type!=eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) { uiDefIconButBitI(block, TOG, eModifierMode_Render, B_MODIFIER_RECALC, ICON_SCENE, x+10+buttonWidth-60, y-1, 19, 19,&md->mode, 0, 0, 1, 0, "Enable modifier during rendering"); uiDefIconButBitI(block, TOG, eModifierMode_Realtime, B_MODIFIER_RECALC, VICON_VIEW3D, x+10+buttonWidth-40, y-1, 19, 19,&md->mode, 0, 0, 1, 0, "Enable modifier during interactive display"); if (mti->flags&eModifierTypeFlag_SupportsEditmode) { @@ -1540,9 +1542,13 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiButSetFunc(but, modifiers_moveDown, ob, md); uiBlockSetEmboss(block, UI_EMBOSSN); - - but = uiDefIconBut(block, BUT, B_MODIFIER_RECALC, VICON_X, x+width-70+40, y, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Delete modifier"); - uiButSetFunc(but, modifiers_del, ob, md); + + // deletion over the deflection panel + if(md->type!=eModifierType_Collision) + { + but = uiDefIconBut(block, BUT, B_MODIFIER_RECALC, VICON_X, x+width-70+40, y, 16, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Delete modifier"); + uiButSetFunc(but, modifiers_del, ob, md); + } uiBlockSetCol(block, TH_AUTO); } @@ -1603,6 +1609,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco height = 26; } else if (md->type==eModifierType_Cloth) { height = 26; + } else if (md->type==eModifierType_Collision) { + height = 19; } else if (md->type==eModifierType_Boolean) { height = 48; } else if (md->type==eModifierType_Array) { @@ -1614,7 +1622,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco y -= 18; - if (!isVirtual) { + if (!isVirtual && (md->type!=eModifierType_Collision)) { uiBlockBeginAlign(block); but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Apply", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Apply the current modifier and remove from the stack"); uiButSetFunc(but, modifiers_applyModifier, ob, md); diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 10d4d544e86..3b232f49001 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2741,10 +2741,29 @@ void do_effects_panels(unsigned short event) } +/* Panel for collision */ +static void object_collision__enabletoggle(void *ob_v, void *arg2) +{ + Object *ob = ob_v; + ModifierData *md = modifiers_findByType(ob, eModifierType_Collision); + + if (!md) { + md = modifier_new(eModifierType_Collision); + BLI_addhead(&ob->modifiers, md); + } + else { + BLI_remlink(&ob->modifiers, md); + modifier_free(md); + } + + allqueue(REDRAWBUTSEDIT, 0); +} + /* Panel for particle interaction settings */ static void object_panel_fields(Object *ob) { uiBlock *block; + uiBut *but; block= uiNewBlock(&curarea->uiblocks, "object_panel_fields", UI_EMBOSS, UI_HELV, curarea->win); if(uiNewPanel(curarea, block, "Fields and Deflection", "Physics", 0, 0, 318, 204)==0) return; @@ -2804,7 +2823,8 @@ static void object_panel_fields(Object *ob) /* only meshes collide now */ if(ob->type==OB_MESH) { - uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); + but = uiDefButBitS(block, TOG, 1, B_REDR, "Deflection/Collision",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Make object collision object for dynamics"); + uiButSetFunc(but, object_collision__enabletoggle, ob, NULL); if(pd->deflect) { uiDefBut(block, LABEL, 0, "Particles", 160,140,150,20, NULL, 0.0, 0, 0, 0, ""); @@ -3129,7 +3149,7 @@ static void object_panel_cloth(Object *ob) uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 9031ce48707..9f45bd7aaa0 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -426,8 +426,8 @@ void recalcData(TransInfo *t) if(modifiers_isSoftbodyEnabled(base->object)) { base->object->softflag |= OB_SB_REDO; } - else if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier(modifiers_isClothEnabled(ob)); + else if((clmd = (ClothModifierData *)modifiers_isClothEnabled(ob))) { + cloth_free_modifier(clmd); } } @@ -470,8 +470,8 @@ void recalcData(TransInfo *t) if(modifiers_isSoftbodyEnabled(ob)) { ob->softflag |= OB_SB_REDO; } - else if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier(modifiers_isClothEnabled(ob)); + else if((clmd = (ClothModifierData *)modifiers_isClothEnabled(ob))) { + cloth_free_modifier(clmd); } } From c8fe3c95a344d401ec3cb3d0be132be00a49a79c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 21 Oct 2007 16:39:07 +0000 Subject: [PATCH 029/430] Forgot some new file for seperated collisions --- source/blender/blenkernel/BKE_collisions.h | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 source/blender/blenkernel/BKE_collisions.h diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h new file mode 100644 index 00000000000..edd86f0f5f6 --- /dev/null +++ b/source/blender/blenkernel/BKE_collisions.h @@ -0,0 +1,103 @@ +/** + * BKE_cloth.h + * + * $Id: BKE_cloth.h,v 1.1 2007/08/01 02:07:27 daniel Exp $ + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ +#ifndef BKE_COLLISIONS_H +#define BKE_COLLISIONS_H + +#include +#include +#include +/* types */ +#include "BLI_linklist.h" +#include "BKE_DerivedMesh.h" +#include "BKE_object.h" +#include "BKE_DerivedMesh.h" + +// used in kdop.c and collision.c +typedef struct Tree +{ + struct Tree *nodes[4]; // 4 children --> quad-tree + struct Tree *parent; + struct Tree *nextLeaf; + struct Tree *prevLeaf; + float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP + unsigned int tri_index; // this saves the index of the face + int count_nodes; // how many nodes are used + int traversed; // how many nodes already traversed until this level? + int isleaf; +} +Tree; + +typedef struct Tree TreeNode; + +typedef struct BVH +{ + unsigned int numfaces; + unsigned int numverts; + MVert *x; // position of verts at time n + MVert *xold; // position of verts at time n-1 + MFace *mfaces; // just a pointer to the original datastructure + struct LinkNode *tree; + TreeNode *root; // TODO: saving the root --> is this really needed? YES! + TreeNode *leaf_tree; /* Tail of the leaf linked list. */ + TreeNode *leaf_root; /* Head of the leaf linked list. */ + float epsilon; /* epslion is used for inflation of the k-dop */ + int flags; /* bvhFlags */ +} +BVH; + +/* used for collisions in kdop.c and also collision.c*/ +typedef struct CollisionPair +{ + unsigned int indexA, indexB; +} +CollisionPair; + + +///////////////////////////////////////////////// +// forward declarations +///////////////////////////////////////////////// + +void bvh_free ( BVH *bvh ); +BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, float epsilon); + +int bvh_traverse(Tree *tree1, Tree *tree2, LinkNode *collision_list); +void bvh_update(DerivedMesh *dm, BVH * bvh, int moving); + +LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); + + +///////////////////////////////////////////////// + +#endif + From 5bd2f5b08e006cb0f0fd281723ece3c6939b84d5 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 21 Oct 2007 16:53:25 +0000 Subject: [PATCH 030/430] Fixed read/writing of blendfiles with collision modifier (saving not supported itm), also changed naming --- source/blender/blenkernel/BKE_collisions.h | 4 ++-- source/blender/blenkernel/intern/kdop.c | 12 +++++------ source/blender/blenkernel/intern/modifier.c | 22 ++++++++++---------- source/blender/blenloader/intern/readfile.c | 9 ++++++++ source/blender/makesdna/DNA_modifier_types.h | 2 +- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index edd86f0f5f6..7c9ced262a8 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -64,8 +64,8 @@ typedef struct BVH { unsigned int numfaces; unsigned int numverts; - MVert *x; // position of verts at time n - MVert *xold; // position of verts at time n-1 + MVert *xnew; // position of verts at time n + MVert *x; // position of verts at time n-1 MFace *mfaces; // just a pointer to the original datastructure struct LinkNode *tree; TreeNode *root; // TODO: saving the root --> is this really needed? YES! diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 8b2540c7d8a..1e17ee4f03e 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -387,7 +387,7 @@ void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) { - MVert *tempMVert = bvh->xold; + MVert *tempMVert = bvh->x; MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; @@ -426,8 +426,8 @@ void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) { - MVert *tempMVert = bvh->xold; - MVert *tempMVert2 = bvh->x; + MVert *tempMVert = bvh->x; + MVert *tempMVert2 = bvh->xnew; MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; @@ -538,7 +538,7 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsign return; } -BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, float epsilon) +BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, float epsilon) { unsigned int i = 0, j = 0, k = 0; Tree **face_list=NULL; @@ -569,8 +569,8 @@ BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, f mface = bvh->mfaces = dm->getFaceArray(dm); bvh->numverts = numverts; + bvh->xnew = xnew; bvh->x = x; - bvh->xold = xold; tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); // TODO: check succesfull alloc BLI_linklist_append(&bvh->tree, tree); @@ -774,7 +774,7 @@ void bvh_join(Tree * tree) } // update static bvh -// needs new positions in bvh->x, bvh->xold +// needs new positions in bvh->x, bvh->xnew void bvh_update(DerivedMesh *dm, BVH * bvh, int moving) { TreeNode *leaf, *parent; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 59bd4b8253d..cb7fccd11c1 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4956,7 +4956,7 @@ static void collisionModifier_initData(ModifierData *md) CollisionModifierData *collmd = (CollisionModifierData*) md; collmd->x = NULL; - collmd->xold = NULL; + collmd->xnew = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -4972,11 +4972,11 @@ static void collisionModifier_freeData(ModifierData *md) bvh_free(collmd->tree); if(collmd->x) MEM_freeN(collmd->x); - if(collmd->xold) - MEM_freeN(collmd->xold); + if(collmd->xnew) + MEM_freeN(collmd->xnew); collmd->x = NULL; - collmd->xold = NULL; + collmd->xnew = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -5018,26 +5018,26 @@ static void collisionModifier_deformVerts( if(collmd->time == -1) // first time { collmd->x = dm->dupVertArray(dm); - collmd->xold = dm->dupVertArray(dm); + collmd->xnew = dm->dupVertArray(dm); collmd->numverts = numverts; // TODO: epsilon // create bounding box hierarchy - collmd->tree = bvh_build(dm, collmd->x, collmd->xold, numverts, 0.01); + collmd->tree = bvh_build(dm, collmd->x, collmd->xnew, numverts, 0.01); } else if(numverts == collmd->numverts) { // put positions to old positions - tempVert = collmd->xold; - collmd->xold = collmd->x; - collmd->x = tempVert; + tempVert = collmd->x; + collmd->x = collmd->xnew; + collmd->xnew = tempVert; - memcpy(collmd->x, dm->getVertArray(dm), numverts*sizeof(MVert)); + memcpy(collmd->xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); for ( i = 0; i < numverts; i++ ) { // we save global positions - Mat4MulVecfl ( ob->obmat, collmd->x[i].co ); + Mat4MulVecfl ( ob->obmat, collmd->xnew[i].co ); } bvh_update(dm, collmd->tree, 0); // recalc static bounding boxes diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 83bae60df30..99f0885b435 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2888,6 +2888,15 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) printf ("direct_link_modifiers: read cloth baked_data.\n"); } } + else if (md->type==eModifierType_Collision) { + CollisionModifierData *collmd = (CollisionModifierData*) md; + + collmd->x = NULL; + collmd->xnew = NULL; + collmd->time = -1; + collmd->numverts = 0; + collmd->tree = NULL; + } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index e6e73ea7d07..81e27afbac4 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -351,7 +351,7 @@ typedef struct CollisionModifierData { ModifierData modifier; struct MVert *x; - struct MVert *xold; + struct MVert *xnew; unsigned int numverts; float time; From dfd9c71b56bf7b45f7764ca4a6968724bb243387 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 21 Oct 2007 17:20:31 +0000 Subject: [PATCH 031/430] Code comments add to collision interface --- source/blender/blenkernel/BKE_collisions.h | 7 +- source/blender/blenkernel/intern/cloth.c | 123 +-------------------- source/blender/src/buttons_object.c | 2 +- 3 files changed, 9 insertions(+), 123 deletions(-) diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 7c9ced262a8..0536a72d74b 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -88,10 +88,15 @@ CollisionPair; // forward declarations ///////////////////////////////////////////////// -void bvh_free ( BVH *bvh ); +// builds bounding volume hierarchy BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, float epsilon); +// frees the same +void bvh_free ( BVH *bvh ); +// checks two bounding volume hierarchies for potential collisions and returns some list with those int bvh_traverse(Tree *tree1, Tree *tree2, LinkNode *collision_list); + +// update bounding volumes, needs updated positions in bvh->x void bvh_update(DerivedMesh *dm, BVH * bvh, int moving); LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index d83c7bcb7f0..dce36f543ee 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -621,8 +621,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, Frame *frame = NULL; LinkNode *search = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; - - + // only be active during a specific period: // that's "first frame" and "last frame" on GUI if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) @@ -671,59 +670,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; clmd->sim_parms.sim_time = current_time; - - // check if cloth object was some collision object before and needs freeing now - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) - { - // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing - clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - cloth_free_modifier ( clmd ); - clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - } - - // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) - { - // save next position + time - if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) - { - if ( !collobj_from_object ( ob, clmd, dm, vertexCos, framenr ) ) - { - clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - cloth_free_modifier ( clmd ); - return; - } - - if ( clmd->clothObject == NULL ) - return; - - cloth = clmd->clothObject; - } - - // Save old position - clmd->sim_parms.sim_time_old = clmd->sim_parms.sim_time; - clmd->sim_parms.sim_time = current_time; - - verts = cloth->verts; - - for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) - { - // Save the previous position. - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->txold, verts->x ); - - // Get the current position. - VECCOPY ( verts->x, vertexCos[i] ); - Mat4MulVecfl ( ob->obmat, verts->x ); - - // Compute the vertices "velocity". - // (no dt correction here because of float error) - VECSUB ( verts->v, verts->x, verts->xold ); - } - - return; - } - + if ( deltaTime == 1.0f ) { if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) @@ -955,72 +902,6 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short } } -// only meshes supported at the moment -/* collision objects */ -static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) -{ - unsigned int i; - MVert *mvert = NULL; - ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; - - /* If we have a clothObject, free it. */ - if ( clmd->clothObject != NULL ) - cloth_free_modifier ( clmd ); - - /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); - if ( clmd->clothObject ) - { - clmd->clothObject->old_solver_type = 255; - // clmd->clothObject->old_collision_type = 255; - } - else if ( clmd->clothObject == NULL ) - { - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); - return 0; - } - - switch ( ob->type ) - { - case OB_MESH: - - // mesh input objects need DerivedMesh - if ( !dm ) - return 0; - - cloth_from_mesh ( ob, clmd, dm ); - - if ( clmd->clothObject != NULL ) - { - if ( !dm ) return 0; - if ( !dm->getNumVerts ( dm ) || !dm->getNumFaces ( dm ) ) return 0; - - mvert = dm->getVertArray ( dm ); - verts = clmd->clothObject->verts; - numverts = clmd->clothObject->numverts = dm->getNumVerts ( dm ); - - for ( i = 0; i < numverts; i++, verts++ ) - { - VECCOPY ( verts->x, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->x ); - verts->flags = 0; - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->txold, verts->x ); - VECCOPY ( verts->tx, verts->x ); - VecMulf ( verts->v, 0.0f ); - verts->impulse_count = 0; - VECCOPY ( verts->impulse, tnull ); - } - // clmd->clothObject->tree = bvh_build ( dm, clmd->coll_parms.epsilon ); - - } - - return 1; - default: return 0; // TODO - we do not support changing meshes - } -} - // only meshes supported at the moment static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 3b232f49001..8bca629eeac 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3131,7 +3131,7 @@ static void object_panel_cloth(Object *ob) if(clmd) { - but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + // but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { From 5a6ffd8441a092906bc445f7084d585624a7367b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 22 Oct 2007 22:50:32 +0000 Subject: [PATCH 032/430] WIP commit, (just in case my HD breaks down). Don't expect anything to work. Code crashes and sim doesn't work ;) --- source/blender/blenkernel/BKE_cloth.h | 4 +- source/blender/blenkernel/BKE_collisions.h | 29 +- source/blender/blenkernel/BKE_modifier.h | 2 +- source/blender/blenkernel/intern/cloth.c | 143 +-- source/blender/blenkernel/intern/collision.c | 859 +------------------ source/blender/blenkernel/intern/implicit.c | 839 ++++++++++++++++++ source/blender/blenkernel/intern/kdop.c | 171 ++-- source/blender/blenkernel/intern/modifier.c | 80 +- source/blender/blenloader/intern/readfile.c | 3 +- source/blender/makesdna/DNA_cloth_types.h | 8 +- source/blender/makesdna/DNA_modifier_types.h | 8 +- source/blender/makesdna/DNA_object_force.h | 1 - source/blender/src/editobject.c | 1 + 13 files changed, 1125 insertions(+), 1023 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 1c5310c10d1..19851321b30 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -122,7 +122,7 @@ void cloth_free_modifier ( ClothModifierData *clmd ); void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c -void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); +DerivedMesh *clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm); //////////////////////////////////////////////// @@ -132,9 +132,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, fl //////////////////////////////////////////////// void cloth_free_modifier ( ClothModifierData *clmd ); void cloth_init ( ClothModifierData *clmd ); -void cloth_deform_verts ( struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd ); void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); - //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 0536a72d74b..8c7933f3434 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -44,21 +44,21 @@ #include "BKE_DerivedMesh.h" // used in kdop.c and collision.c -typedef struct Tree +typedef struct CollisionTree { - struct Tree *nodes[4]; // 4 children --> quad-tree - struct Tree *parent; - struct Tree *nextLeaf; - struct Tree *prevLeaf; + struct CollisionTree *nodes[4]; // 4 children --> quad-tree + struct CollisionTree *parent; + struct CollisionTree *nextLeaf; + struct CollisionTree *prevLeaf; float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP - unsigned int tri_index; // this saves the index of the face + int point_index[4]; // supports up to 4 points in a leaf int count_nodes; // how many nodes are used int traversed; // how many nodes already traversed until this level? int isleaf; } -Tree; +CollisionTree; -typedef struct Tree TreeNode; +typedef struct CollisionTree TreeNode; typedef struct BVH { @@ -79,7 +79,7 @@ BVH; /* used for collisions in kdop.c and also collision.c*/ typedef struct CollisionPair { - unsigned int indexA, indexB; + int point_indexA[4], point_indexB[4]; } CollisionPair; @@ -89,18 +89,21 @@ CollisionPair; ///////////////////////////////////////////////// // builds bounding volume hierarchy -BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xold, unsigned int numverts, float epsilon); +BVH *bvh_build (MFace *mfaces, unsigned int numfaces, MVert *x, MVert *xnew, unsigned int numverts, float epsilon); // frees the same void bvh_free ( BVH *bvh ); // checks two bounding volume hierarchies for potential collisions and returns some list with those -int bvh_traverse(Tree *tree1, Tree *tree2, LinkNode *collision_list); +int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list); // update bounding volumes, needs updated positions in bvh->x -void bvh_update(DerivedMesh *dm, BVH * bvh, int moving); +void bvh_update(BVH * bvh, int moving); -LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); +LinkNode *BLI_linklist_append_fast (LinkNode **listp, void *ptr); +// move Collision modifier object inter-frame with step = [0,1] +// defined in collisions.c +void collision_move_object(CollisionModifierData *collmd, float step); ///////////////////////////////////////////////// diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 365381f5cdd..644c3dd32f4 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -277,7 +277,7 @@ int modifiers_getCageIndex(struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled(struct Object *ob); -struct ModifierData *modifiers_isClothEnabled(struct Object *ob); +struct ClothModifierData *modifiers_isClothEnabled(Object *ob); struct Object *modifiers_isDeformedByArmature(struct Object *ob); struct Object *modifiers_isDeformedByLattice(struct Object *ob); int modifiers_usesArmature(struct Object *ob, struct bArmature *arm); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index dce36f543ee..4c4bac7bbf9 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -120,10 +120,9 @@ static CM_SOLVER_DEF solvers [] = /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); -static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); @@ -603,69 +602,63 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) * cloth_deform_verts - simulates one step, framenr is in frames. * **/ -void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, - float ( *vertexCos ) [3], int numverts ) +DerivedMesh *clothModifier_do(ClothModifierData *clmd, + Object *ob, DerivedMesh *dm) { unsigned int i; - unsigned int numedges = -1; - unsigned int numfaces = -1; - MVert *mvert = NULL; - MEdge *medge = NULL; - MFace *mface = NULL; - DerivedMesh *result = NULL, *result2 = NULL; + DerivedMesh *result = NULL; Cloth *cloth = clmd->clothObject; unsigned int framenr = ( float ) G.scene->r.cfra; float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); - ListBase *effectors = NULL; - ClothVertex *newframe= NULL, *verts; + ListBase *effectors = NULL; + ClothVertex *verts = NULL; Frame *frame = NULL; LinkNode *search = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; + MVert *mverts = NULL; + + result = CDDM_copy(dm); // only be active during a specific period: // that's "first frame" and "last frame" on GUI - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) + if ( clmd->clothObject ) { - if ( clmd->clothObject ) + if ( clmd->sim_parms.cache ) { - if ( clmd->sim_parms.cache ) + if ( current_time < clmd->sim_parms.firstframe ) { - if ( current_time < clmd->sim_parms.firstframe ) + int frametime = cloth_cache_first_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) { - int frametime = cloth_cache_first_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - return; - } - else if ( current_time > clmd->sim_parms.lastframe ) - { - int frametime = cloth_cache_last_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - return; - } - else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed - { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - clmd->sim_parms.sim_time = current_time; - return; + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, result ); } + return; + } + else if ( current_time > clmd->sim_parms.lastframe ) + { + int frametime = cloth_cache_last_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, result ); + } + return; + } + else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed + { + if ( cloth_cache_search_frame ( clmd, framenr ) ) + { + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, clmd, result ); + } + clmd->sim_parms.sim_time = current_time; + return; } - } + } - - + // unused in the moment, calculated seperately in implicit.c clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; @@ -673,9 +666,9 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, if ( deltaTime == 1.0f ) { - if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) + if ( ( clmd->clothObject == NULL ) || ( dm->getNumVerts(dm) != clmd->clothObject->numverts ) ) { - if ( !cloth_from_object ( ob, clmd, dm, vertexCos, numverts ) ) + if ( !cloth_from_object ( ob, clmd, dm ) ) return; if ( clmd->clothObject == NULL ) @@ -692,6 +685,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, if ( !cloth_cache_search_frame ( clmd, framenr ) ) { verts = cloth->verts; + mverts = dm->getVertArray(dm); // Force any pinned verts to their constrained location. for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) @@ -699,9 +693,8 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // Save the previous position. VECCOPY ( verts->xold, verts->xconst ); VECCOPY ( verts->txold, verts->x ); - // Get the current position. - VECCOPY ( verts->xconst, vertexCos[i] ); + VECCOPY ( verts->xconst, mverts[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } @@ -723,7 +716,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } // Copy the result back to the object. - cloth_to_object ( ob, clmd, vertexCos, numverts ); + cloth_to_object ( ob, clmd, result ); // bvh_free(clmd->clothObject->tree); // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); @@ -737,11 +730,12 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, if ( cloth_cache_search_frame ( clmd, framenr ) ) { cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); + cloth_to_object ( ob, clmd, result ); } } } - + + return result; } /* frees all */ @@ -771,6 +765,14 @@ void cloth_free_modifier ( ClothModifierData *clmd ) // Free the verts. if ( cloth->verts != NULL ) MEM_freeN ( cloth->verts ); + + // Free the verts. + if ( cloth->x != NULL ) + MEM_freeN ( cloth->x ); + + // Free the verts. + if ( cloth->xnew != NULL ) + MEM_freeN ( cloth->xnew ); cloth->verts = NULL; cloth->numverts = 0; @@ -823,22 +825,24 @@ void cloth_free_modifier ( ClothModifierData *clmd ) * * This function is a modified version of the softbody.c:softbody_to_object() function. **/ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ) +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { ClothVertex *verts = NULL; unsigned int i = 0; + MVert *mvert = NULL; if ( clmd->clothObject ) { verts = clmd->clothObject->verts; + mvert = dm->getVertArray(dm); /* inverse matrix is not uptodate... */ Mat4Invert ( ob->imat, ob->obmat ); - for ( i = 0; i < numverts; i++, verts++ ) + for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) { - VECCOPY ( vertexCos[i], verts->x ); - Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* softbody is in global coords */ + VECCOPY ( mvert[i].co, verts->x ); + Mat4MulVecfl ( ob->imat, mvert[i].co ); /* softbody is in global coords */ } } } @@ -903,7 +907,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short } // only meshes supported at the moment -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { unsigned int i = 0; // dm->getNumVerts(dm); @@ -954,7 +958,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh verts = clmd->clothObject->verts; /* set initial values */ - for ( i = 0; i < numverts; i++, verts++ ) + for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) { VECCOPY ( verts->x, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->x ); @@ -1021,6 +1025,22 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); return; } + + clmd->clothObject->x = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_x" ); + if ( clmd->clothObject->x == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->x." ); + return; + } + + clmd->clothObject->xnew = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_xnew" ); + if ( clmd->clothObject->xnew == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xnew." ); + return; + } // save face information clmd->clothObject->numfaces = numfaces; @@ -1067,7 +1087,10 @@ int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned in cloth->numsprings++; BLI_linklist_append ( &cloth->springs, spring ); + + return 1; } + return 0; } int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 41823b0ad39..f4b0ce7312b 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -72,6 +72,22 @@ #include "Bullet-C-Api.h" +// step is limited from 0 (frame start position) to 1 (frame end position) +void collision_move_object(CollisionModifierData *collmd, float step) +{ + float tv[3] = {0,0,0}; + unsigned int i = 0; + MVert *tempVert = collmd->current_x; + collmd->current_x = collmd->current_xnew; + collmd->current_xnew = tempVert; + + for ( i = 0; i < collmd->numverts; i++ ) + { + VECSUB(tv, collmd->xnew[i].co, collmd->x[i].co); + VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step); + } +} + /** * gsl_poly_solve_cubic - @@ -362,846 +378,3 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa VECADDMUL(to, v3, w3); } -// unused in the moment, has some bug in -DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, - double frictionConstant, double delta_V_n) -{ - float vrel_t_pre[3]; - float vrel_t[3]; - VECSUBS(vrel_t_pre, vrel, normal, normalVelocity); - VECCOPY(to, vrel_t_pre); - VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); -} - -int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) -{ - /* - unsigned int i = 0; - int result = 0; - LinkNode *search = NULL; - CollPair *collpair = NULL; - Cloth *cloth1, *cloth2; - float w1, w2, w3, u1, u2, u3; - float v1[3], v2[3], relativeVelocity[3]; - float magrelVel; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - // search = clmd->coll_parms.collision_list; - - while(search) - { - collpair = search->link; - - // compute barycentric coordinates for both collision points - collisions_compute_barycentric(collpair->pa, - cloth1->verts[collpair->ap1].txold, - cloth1->verts[collpair->ap2].txold, - cloth1->verts[collpair->ap3].txold, - &w1, &w2, &w3); - - collisions_compute_barycentric(collpair->pb, - cloth2->verts[collpair->bp1].txold, - cloth2->verts[collpair->bp2].txold, - cloth2->verts[collpair->bp3].txold, - &u1, &u2, &u3); - - // Calculate relative "velocity". - interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); - - interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); - - VECSUB(relativeVelocity, v1, v2); - - // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). - magrelVel = INPR(relativeVelocity, collpair->normal); - - // printf("magrelVel: %f\n", magrelVel); - - // Calculate masses of points. - - // If v_n_mag < 0 the edges are approaching each other. - if(magrelVel < -ALMOST_ZERO) - { - // Calculate Impulse magnitude to stop all motion in normal direction. - // const double I_mag = v_n_mag / (1/m1 + 1/m2); - float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent, magnormal, collvel[3]; - float vrel_t_pre[3]; - float vrel_t[3]; - double impulse; - float epsilon = clmd->coll_parms.epsilon; - float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); - - // magtangent = INPR(tangential, tangential); - - // Apply friction impulse. - if (magtangent < -ALMOST_ZERO) - { - - // printf("friction applied: %f\n", magtangent); - // TODO check original code - } - - - impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - - // printf("impulse: %f\n", impulse); - - // face A - VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); - cloth1->verts[collpair->ap1].impulse_count++; - - VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); - cloth1->verts[collpair->ap2].impulse_count++; - - VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); - cloth1->verts[collpair->ap3].impulse_count++; - - // face B - VECADDMUL(cloth2->verts[collpair->bp1].impulse, collpair->normal, u1 * impulse); - cloth2->verts[collpair->bp1].impulse_count++; - - VECADDMUL(cloth2->verts[collpair->bp2].impulse, collpair->normal, u2 * impulse); - cloth2->verts[collpair->bp2].impulse_count++; - - VECADDMUL(cloth2->verts[collpair->bp3].impulse, collpair->normal, u3 * impulse); - cloth2->verts[collpair->bp3].impulse_count++; - - - result = 1; - - // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case - - // Apply the impulse and increase impulse counters. - - - } - - search = search->next; - } - - - return result; - */ - return 0; -} - - -int collisions_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) -{ - -} - - -int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) -{ - -} - -void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) -{ - /* - CollPair *collpair = NULL; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms.epsilon; - unsigned int i = 0; - - for(i = 0; i < 4; i++) - { - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - // check all possible pairs of triangles - if(i == 0) - { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; - - } - - if(i == 1) - { - if(face1->v4) - { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; - - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; - } - else - i++; - } - - if(i == 2) - { - if(face2->v4) - { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; - } - else - i+=2; - } - - if(i == 3) - { - if((face1->v4)&&(face2->v4)) - { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; - } - else - i++; - } - - // calc SIPcode (?) - - if(i < 4) - { - // calc distance + normal - distance = plNearestPoints( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); - - if (distance <= (epsilon + ALMOST_ZERO)) - { - // printf("dist: %f\n", (float)distance); - - // collpair->face1 = tree1->tri_index; - // collpair->face2 = tree2->tri_index; - - // VECCOPY(collpair->normal, collpair->vector); - // Normalize(collpair->normal); - - // collpair->distance = distance; - - } - else - { - MEM_freeN(collpair); - } - } - else - { - MEM_freeN(collpair); - } - } - */ -} - -int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) -{ - Cloth *cloth1, *cloth2; - ClothVertex *verts1, *verts2; - float temp[3]; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - return 0; -} - -void collisions_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) -{ - EdgeCollPair edgecollpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms.epsilon; - unsigned int i = 0, j = 0, k = 0; - int numsolutions = 0; - float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - for( i = 0; i < 5; i++) - { - if(i == 0) - { - edgecollpair.p11 = face1->v1; - edgecollpair.p12 = face1->v2; - } - else if(i == 1) - { - edgecollpair.p11 = face1->v2; - edgecollpair.p12 = face1->v3; - } - else if(i == 2) - { - if(face1->v4) - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v4; - } - else - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; - i+=5; // get out of here after this edge pair is handled - } - } - else if(i == 3) - { - if(face1->v4) - { - edgecollpair.p11 = face1->v4; - edgecollpair.p12 = face1->v1; - } - else - continue; - } - else - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; - } - - - for( j = 0; j < 5; j++) - { - if(j == 0) - { - edgecollpair.p21 = face2->v1; - edgecollpair.p22 = face2->v2; - } - else if(j == 1) - { - edgecollpair.p21 = face2->v2; - edgecollpair.p22 = face2->v3; - } - else if(j == 2) - { - if(face2->v4) - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v4; - } - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; - } - } - else if(j == 3) - { - if(face2->v4) - { - edgecollpair.p21 = face2->v4; - edgecollpair.p22 = face2->v1; - } - else - continue; - } - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; - } - - - if(!collisions_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) - { - VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); - VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); - VECSUB(c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold); - VECSUB(d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v); - VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); - VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); - - numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); - - for (k = 0; k < numsolutions; k++) - { - if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) - { - float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (edge) collision list - - printf("Moving edge found!\n"); - } - } - } - } - } -} - -void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) -{ - /* - CollPair collpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms.epsilon; - unsigned int i = 0, j = 0, k = 0; - int numsolutions = 0; - float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; - - for(i = 0; i < 2; i++) - { - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - // check all possible pairs of triangles - if(i == 0) - { - collpair.ap1 = face1->v1; - collpair.ap2 = face1->v2; - collpair.ap3 = face1->v3; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; - } - - if(i == 1) - { - if(face1->v4) - { - collpair.ap1 = face1->v3; - collpair.ap2 = face1->v4; - collpair.ap3 = face1->v1; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; - } - else - i++; - } - - // calc SIPcode (?) - - if(i < 2) - { - VECSUB(a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold); - VECSUB(b, verts1[collpair.ap2].v, verts1[collpair.ap1].v); - VECSUB(c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold); - VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); - - for(j = 0; j < 4; j++) - { - if((j==3) && !(face2->v4)) - break; - - VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); - VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); - - numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); - - for (k = 0; k < numsolutions; k++) - { - if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) - { - float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (point-face) collision list - - printf("Moving found!\n"); - - } - } - - // TODO: check borders for collisions - } - - } - } - */ -} - -void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) -{ - /* - // TODO: check for adjacent - collisions_collision_moving_edges(clmd, coll_clmd, tree1, tree2); - - collisions_collision_moving_tris(clmd, coll_clmd, tree1, tree2); - collisions_collision_moving_tris(coll_clmd, clmd, tree2, tree1); - */ -} - -// move collision objects forward in time and update static bounding boxes -void collisions_update_collision_objects(float step) -{ - Base *base=NULL; - ClothModifierData *coll_clmd=NULL; - Object *coll_ob=NULL; - unsigned int i=0; - - // search all objects for collision object - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - Cloth *coll_cloth = coll_clmd->clothObject; - BVH *coll_bvh = coll_clmd->clothObject->tree; - unsigned int coll_numverts = coll_cloth->numverts; - - // update position of collision object - for(i = 0; i < coll_numverts; i++) - { - VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); - - VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); - - // no dt here because of float rounding errors - VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); - } - - // update BVH of collision object - // bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING - } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } -} - -// collisions_MAX_THRESHOLD defines how much collision rounds/loops should be taken -#define CLOTH_MAX_THRESHOLD 10 - -// cloth - object collisions -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) -{ - Base *base=NULL; - ClothModifierData *coll_clmd=NULL; - Cloth *cloth=NULL; - Object *coll_ob=NULL; - BVH *collisions_bvh=NULL; - unsigned int i=0, j = 0, numfaces = 0, numverts = 0; - unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; - ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; - int ret = 0; - LinkNode *collision_list = NULL; - - if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) - { - return 0; - } - cloth = clmd->clothObject; - verts = cloth->verts; - collisions_bvh = (BVH *) cloth->tree; - numfaces = clmd->clothObject->numfaces; - numverts = clmd->clothObject->numverts; - - //////////////////////////////////////////////////////////// - // static collisions - //////////////////////////////////////////////////////////// - - // update cloth bvh - // bvh_update(clmd, collisions_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) - - // update collision objects - collisions_update_collision_objects(step); - - do - { - result = 0; - ic = 0; - - // check all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - BVH *coll_bvh = coll_clmd->clothObject->tree; - - // fill collision list - bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); - - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // result += collisions_collision_response_static_tris(clmd, coll_clmd, collision_list, 0); - - // result += collisions_collision_response_static_tris(coll_clmd, clmd, collision_list, 1); - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); - - collision_list = NULL; - } - } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - - printf("ic: %d\n", ic); - rounds++; - } - while(result && (CLOTH_MAX_THRESHOLD>rounds)); - - printf("\n"); - - //////////////////////////////////////////////////////////// - // update positions - // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] - //////////////////////////////////////////////////////////// - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - //////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////// - // moving collisions - //////////////////////////////////////////////////////////// - - - // update cloth bvh - // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING - - // update moving bvh for collision object once - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) - continue; - - if(!coll_clmd->clothObject) - continue; - - // if collision object go on - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - BVH *coll_bvh = coll_clmd->clothObject->tree; - - // bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING - } - } - - - do - { - result = 0; - ic = 0; - - // check all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - BVH *coll_bvh = coll_clmd->clothObject->tree; - - bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); - - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // handle all collision objects - - /* - if (coll_clmd->clothObject) - result += collisions_collision_response_moving_tris(clmd, coll_clmd); - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - */ - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - - // update cloth bvh - // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING - - - // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); - - collision_list = NULL; - } - } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - - printf("ic: %d\n", ic); - rounds++; - } - while(result && (CLOTH_MAX_THRESHOLD>rounds)); - - - //////////////////////////////////////////////////////////// - // update positions + velocities - //////////////////////////////////////////////////////////// - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - //////////////////////////////////////////////////////////// - - return MIN2(ret, 1); -} diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 2ce00d0e38c..f61e2d22f1c 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -49,6 +49,7 @@ #include "BLI_blenlib.h" #include "BLI_arithb.h" #include "BLI_threads.h" +#include "BKE_collisions.h" #include "BKE_curve.h" #include "BKE_displist.h" #include "BKE_effect.h" @@ -1585,3 +1586,841 @@ void implicit_set_positions (ClothModifierData *clmd) VECCOPY(id->V[i], verts[i].v); } } + + +int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + /* + unsigned int i = 0; + int result = 0; + LinkNode *search = NULL; + CollPair *collpair = NULL; + Cloth *cloth1, *cloth2; + float w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + // search = clmd->coll_parms.collision_list; + + while(search) + { + collpair = search->link; + + // compute barycentric coordinates for both collision points + collisions_compute_barycentric(collpair->pa, + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3); + + collisions_compute_barycentric(collpair->pb, + cloth2->verts[collpair->bp1].txold, + cloth2->verts[collpair->bp2].txold, + cloth2->verts[collpair->bp3].txold, + &u1, &u2, &u3); + + // Calculate relative "velocity". + interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); + + interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); + + VECSUB(relativeVelocity, v1, v2); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR(relativeVelocity, collpair->normal); + + // printf("magrelVel: %f\n", magrelVel); + + // Calculate masses of points. + + // If v_n_mag < 0 the edges are approaching each other. + if(magrelVel < -ALMOST_ZERO) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3]; + double impulse; + float epsilon = clmd->coll_parms.epsilon; + float overlap = (epsilon + ALMOST_ZERO-collpair->distance); + + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + + // magtangent = INPR(tangential, tangential); + + // Apply friction impulse. + if (magtangent < -ALMOST_ZERO) + { + + // printf("friction applied: %f\n", magtangent); + // TODO check original code +} + + + impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + // printf("impulse: %f\n", impulse); + + // face A + VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); + cloth1->verts[collpair->ap3].impulse_count++; + + // face B + VECADDMUL(cloth2->verts[collpair->bp1].impulse, collpair->normal, u1 * impulse); + cloth2->verts[collpair->bp1].impulse_count++; + + VECADDMUL(cloth2->verts[collpair->bp2].impulse, collpair->normal, u2 * impulse); + cloth2->verts[collpair->bp2].impulse_count++; + + VECADDMUL(cloth2->verts[collpair->bp3].impulse, collpair->normal, u3 * impulse); + cloth2->verts[collpair->bp3].impulse_count++; + + + result = 1; + + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case + + // Apply the impulse and increase impulse counters. + + +} + + search = search->next; +} + + + return result; + */ + return 0; +} + + +int collisions_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + + +int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + +void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +{ + /* + CollPair *collpair = NULL; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0; + + for(i = 0; i < 4; i++) + { + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + // check all possible pairs of triangles + if(i == 0) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; + +} + + if(i == 1) + { + if(face1->v4) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; +} + else + i++; +} + + if(i == 2) + { + if(face2->v4) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; +} + else + i+=2; +} + + if(i == 3) + { + if((face1->v4)&&(face2->v4)) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; +} + else + i++; +} + + // calc SIPcode (?) + + if(i < 4) + { + // calc distance + normal + distance = plNearestPoints( + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); + + if (distance <= (epsilon + ALMOST_ZERO)) + { + // printf("dist: %f\n", (float)distance); + + // collpair->face1 = tree1->tri_index; + // collpair->face2 = tree2->tri_index; + + // VECCOPY(collpair->normal, collpair->vector); + // Normalize(collpair->normal); + + // collpair->distance = distance; + +} + else + { + MEM_freeN(collpair); +} +} + else + { + MEM_freeN(collpair); +} +} + */ +} + +int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) +{ + Cloth *cloth1, *cloth2; + ClothVertex *verts1, *verts2; + float temp[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + return 0; +} + + +void collisions_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +{ + /* + EdgeCollPair edgecollpair; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + for( i = 0; i < 5; i++) + { + if(i == 0) + { + edgecollpair.p11 = face1->v1; + edgecollpair.p12 = face1->v2; +} + else if(i == 1) + { + edgecollpair.p11 = face1->v2; + edgecollpair.p12 = face1->v3; +} + else if(i == 2) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v4; +} + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; + i+=5; // get out of here after this edge pair is handled +} +} + else if(i == 3) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v4; + edgecollpair.p12 = face1->v1; +} + else + continue; +} + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; +} + + + for( j = 0; j < 5; j++) + { + if(j == 0) + { + edgecollpair.p21 = face2->v1; + edgecollpair.p22 = face2->v2; +} + else if(j == 1) + { + edgecollpair.p21 = face2->v2; + edgecollpair.p22 = face2->v3; +} + else if(j == 2) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v4; +} + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; +} +} + else if(j == 3) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v4; + edgecollpair.p22 = face2->v1; +} + else + continue; +} + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; +} + + + if(!collisions_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) + { + VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); + VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); + VECSUB(c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold); + VECSUB(d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v); + VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); + VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); + + numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into (edge) collision list + + printf("Moving edge found!\n"); +} +} +} +} +} + */ +} + +void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +{ + /* + CollPair collpair; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + + for(i = 0; i < 2; i++) + { + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + // check all possible pairs of triangles + if(i == 0) + { + collpair.ap1 = face1->v1; + collpair.ap2 = face1->v2; + collpair.ap3 = face1->v3; + + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; +} + + if(i == 1) + { + if(face1->v4) + { + collpair.ap1 = face1->v3; + collpair.ap2 = face1->v4; + collpair.ap3 = face1->v1; + + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; +} + else + i++; +} + + // calc SIPcode (?) + + if(i < 2) + { + VECSUB(a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold); + VECSUB(b, verts1[collpair.ap2].v, verts1[collpair.ap1].v); + VECSUB(c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold); + VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); + + for(j = 0; j < 4; j++) + { + if((j==3) && !(face2->v4)) + break; + + VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); + VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); + + numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into (point-face) collision list + + printf("Moving found!\n"); + +} +} + + // TODO: check borders for collisions +} + +} +} + */ +} + + +// move collision objects forward in time and update static bounding boxes +void collisions_update_collision_objects(float step) +{ + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Object *coll_ob=NULL; + unsigned int i=0; + + // search all objects for collision object + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + Cloth *coll_cloth = coll_clmd->clothObject; + BVH *coll_bvh = coll_clmd->clothObject->tree; + unsigned int coll_numverts = coll_cloth->numverts; + + // update position of collision object + for(i = 0; i < coll_numverts; i++) + { + VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); + + VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); + + // no dt here because of float rounding errors + VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); + } + + // update BVH of collision object + // bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING + } + else + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } +} + + +void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +{ + /* + // TODO: check for adjacent + collisions_collision_moving_edges(clmd, coll_clmd, tree1, tree2); + + collisions_collision_moving_tris(clmd, coll_clmd, tree1, tree2); + collisions_collision_moving_tris(coll_clmd, clmd, tree2, tree1); + */ +} + +// cloth - object collisions +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) +{ + /* + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Cloth *cloth=NULL; + Object *coll_ob=NULL; + BVH *collisions_bvh=NULL; + unsigned int i=0, j = 0, numfaces = 0, numverts = 0; + unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; + ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; + int ret = 0; + LinkNode *collision_list = NULL; + + if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + { + return 0; + } + cloth = clmd->clothObject; + verts = cloth->verts; + collisions_bvh = (BVH *) cloth->tree; + numfaces = clmd->clothObject->numfaces; + numverts = clmd->clothObject->numverts; + + //////////////////////////////////////////////////////////// + // static collisions + //////////////////////////////////////////////////////////// + + // update cloth bvh + // bvh_update(clmd, collisions_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + + // update collision objects + collisions_update_collision_objects(step); + + do + { + result = 0; + ic = 0; + + // check all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + // fill collision list + bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // result += collisions_collision_response_static_tris(clmd, coll_clmd, collision_list, 0); + + // result += collisions_collision_response_static_tris(coll_clmd, clmd, collision_list, 1); + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + // free collision list + if(collision_list) + { + LinkNode *search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; + } + } + else + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (10>rounds));// CLOTH_MAX_THRESHOLD + + printf("\n"); + + //////////////////////////////////////////////////////////// + // update positions + // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + //////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////// + // moving collisions + //////////////////////////////////////////////////////////// + + + // update cloth bvh + // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING + + // update moving bvh for collision object once + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + if(!coll_clmd->clothObject) + continue; + + // if collision object go on + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + // bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING + } + } + + + do + { + result = 0; + ic = 0; + + // check all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // handle all collision objects + + + if (coll_clmd->clothObject) + result += collisions_collision_response_moving_tris(clmd, coll_clmd); + else + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + + // update cloth bvh + // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING + + + // free collision list + if(collision_list) + { + LinkNode *search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; + } + } + else + printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (10>rounds)); // CLOTH_MAX_THRESHOLD + + + //////////////////////////////////////////////////////////// + // update positions + velocities + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + //////////////////////////////////////////////////////////// + + return MIN2(ret, 1); + */ +} \ No newline at end of file diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 1e17ee4f03e..5ad08587266 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -164,9 +164,9 @@ static int size_threshold = 16; /* * Common methods for all algorithms */ -void bvh_exchange(Tree **a, int i, int j) +void bvh_exchange(CollisionTree **a, int i, int j) { - Tree *t=a[i]; + CollisionTree *t=a[i]; a[i]=a[j]; a[j]=t; } @@ -178,10 +178,10 @@ int floor_lg(int a) /* * Insertion sort algorithm */ -static void bvh_insertionsort(Tree **a, int lo, int hi, int axis) +static void bvh_insertionsort(CollisionTree **a, int lo, int hi, int axis) { int i,j; - Tree *t; + CollisionTree *t; for (i=lo; i < hi; i++) { j=i; @@ -195,7 +195,7 @@ static void bvh_insertionsort(Tree **a, int lo, int hi, int axis) } } -static int bvh_partition(Tree **a, int lo, int hi, Tree * x, int axis) +static int bvh_partition(CollisionTree **a, int lo, int hi, CollisionTree *x, int axis) { int i=lo, j=hi; while (1) @@ -213,9 +213,9 @@ static int bvh_partition(Tree **a, int lo, int hi, Tree * x, int axis) /* * Heapsort algorithm */ -static void bvh_downheap(Tree **a, int i, int n, int lo, int axis) +static void bvh_downheap(CollisionTree **a, int i, int n, int lo, int axis) { - Tree * d = a[lo+i-1]; + CollisionTree *d = a[lo+i-1]; int child; while (i<=n/2) { @@ -231,7 +231,7 @@ static void bvh_downheap(Tree **a, int i, int n, int lo, int axis) a[lo+i-1] = d; } -static void bvh_heapsort(Tree **a, int lo, int hi, int axis) +static void bvh_heapsort(CollisionTree **a, int lo, int hi, int axis) { int n = hi-lo, i; for (i=n/2; i>=1; i=i-1) @@ -245,7 +245,7 @@ static void bvh_heapsort(Tree **a, int lo, int hi, int axis) } } -static Tree *bvh_medianof3(Tree **a, int lo, int mid, int hi, int axis) // returns Sortable +static CollisionTree *bvh_medianof3(CollisionTree **a, int lo, int mid, int hi, int axis) // returns Sortable { if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) { @@ -275,7 +275,7 @@ static Tree *bvh_medianof3(Tree **a, int lo, int mid, int hi, int axis) // retur /* * Quicksort algorithm modified for Introsort */ -static void bvh_introsort_loop (Tree **a, int lo, int hi, int depth_limit, int axis) +static void bvh_introsort_loop (CollisionTree **a, int lo, int hi, int depth_limit, int axis) { int p; @@ -293,16 +293,16 @@ static void bvh_introsort_loop (Tree **a, int lo, int hi, int depth_limit, int a } } -void bvh_sort(Tree **a0, int begin, int end, int axis) +void bvh_sort(CollisionTree **a0, int begin, int end, int axis) { if (begin < end) { - Tree **a=a0; + CollisionTree **a=a0; bvh_introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); bvh_insertionsort(a, begin, end, axis); } } -void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) +void bvh_sort_along_axis(CollisionTree **face_list, int start, int end, int axis) { bvh_sort(face_list, start, end, axis); } @@ -310,7 +310,7 @@ void bvh_sort_along_axis(Tree **face_list, int start, int end, int axis) void bvh_free(BVH * bvh) { LinkNode *search = NULL; - Tree *tree = NULL; + CollisionTree *tree = NULL; if (bvh) { @@ -361,7 +361,7 @@ int bvh_largest_axis(float *bv) } // depends on the fact that the BVH's for each face is already build -void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_from_faces(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) { float newmin,newmax; int i, j; @@ -385,32 +385,22 @@ void bvh_calc_DOP_hull_from_faces(BVH * bvh, Tree **tri, int numfaces, float *bv } } -void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_static(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) { MVert *tempMVert = bvh->x; - MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; int i, j, k; for (j = 0; j < numfaces; j++) { - tempMFace = bvh->mfaces + (tri [j])->tri_index; - // 3 or 4 vertices per face. + // 1 up to 4 vertices per leaf. for (k = 0; k < 4; k++) { - int temp = 0; - // If this is a triangle. - if (k == 3 && !tempMFace->v4) + int temp = tri[j]->point_index[k]; + + if(temp < 0) continue; - // TODO: other name for "temp" this gets all vertices of a face - if (k == 0) - temp = tempMFace->v1; - else if (k == 1) - temp = tempMFace->v2; - else if (k == 2) - temp = tempMFace->v3; - else if (k == 3) - temp = tempMFace->v4; + // for all Axes. for (i = KDOP_START; i < KDOP_END; i++) { @@ -424,33 +414,23 @@ void bvh_calc_DOP_hull_static(BVH * bvh, Tree **tri, int numfaces, float *bv) } } -void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) +void bvh_calc_DOP_hull_moving(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) { MVert *tempMVert = bvh->x; MVert *tempMVert2 = bvh->xnew; - MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; int i, j, k; for (j = 0; j < numfaces; j++) { - tempMFace = bvh->mfaces + (tri [j])->tri_index; // 3 or 4 vertices per face. for (k = 0; k < 4; k++) { - int temp = 0; - // If this is a triangle. - if (k == 3 && !tempMFace->v4) + int temp = tri[j]->point_index[k]; + + if(temp < 0) continue; - // TODO: other name for "temp" this gets all vertices of a face - if (k == 0) - temp = tempMFace->v1; - else if (k == 1) - temp = tempMFace->v2; - else if (k == 2) - temp = tempMFace->v3; - else if (k == 3) - temp = tempMFace->v4; + // for all Axes. for (i = KDOP_START; i < KDOP_END; i++) { @@ -470,10 +450,10 @@ void bvh_calc_DOP_hull_moving(BVH * bvh, Tree **tri, int numfaces, float *bv) } } -static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) +static void bvh_div_env_node(BVH * bvh, TreeNode *tree, CollisionTree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) { int i = 0; - Tree *newtree = NULL; + CollisionTree *newtree = NULL; int laxis = 0, max_nodes=4; unsigned int tstart, tend; LinkNode *nlink1 = nlink; @@ -512,7 +492,7 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsign // Build tree until 4 node left. if ((tend-tstart + 1 ) > 1) { - newtree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + newtree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); tnlink = BLI_linklist_append_fast(&nlink1->next, newtree); newtree->nodes[0] = newtree->nodes[1] = newtree->nodes[2] = newtree->nodes[3] = NULL; @@ -530,7 +510,7 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsign } else // ok, we have 1 left for this node { - Tree *tnode = face_list[tstart]; + CollisionTree *tnode = face_list[tstart]; tree->nodes[i] = tnode; tree->nodes[i]->parent = tree; } @@ -538,19 +518,16 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, Tree **face_list, unsign return; } -BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, float epsilon) +// mfaces is allowed to be null +// just vertexes are used if mfaces=NULL +BVH *bvh_build (MFace *mfaces, unsigned int numfaces, MVert *x, MVert *xnew, unsigned int numverts, float epsilon) { - unsigned int i = 0, j = 0, k = 0; - Tree **face_list=NULL; + unsigned int i = 0, j = 0; + CollisionTree **face_list=NULL; BVH *bvh=NULL; - Tree *tree=NULL; + CollisionTree *tree=NULL; LinkNode *nlink = NULL; - EdgeHash *edgehash = NULL; - unsigned int numsprings = 0; MFace *mface = NULL; - - if(!dm) - return NULL; bvh = MEM_callocN(sizeof(BVH), "BVH"); if (bvh == NULL) @@ -565,13 +542,19 @@ BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, f bvh->tree = NULL; bvh->epsilon = epsilon; - bvh->numfaces = dm->getNumFaces(dm); - mface = bvh->mfaces = dm->getFaceArray(dm); + bvh->numfaces = numfaces; + mface = bvh->mfaces = mfaces; + + // we have no faces, we save seperate points + if(!bvh->mfaces) + { + bvh->numfaces = numverts; + } bvh->numverts = numverts; bvh->xnew = xnew; bvh->x = x; - tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); // TODO: check succesfull alloc BLI_linklist_append(&bvh->tree, tree); @@ -590,7 +573,25 @@ BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, f if(bvh->numfaces<=1) { - bvh->root->tri_index = 0; // Why that? --> only one face there + // Why that? --> only one face there + if(bvh->mfaces) + { + bvh->root->point_index[0] = mfaces[0].v1; + bvh->root->point_index[1] = mfaces[0].v2; + bvh->root->point_index[2] = mfaces[0].v3; + if(mfaces[0].v4) + bvh->root->point_index[3] = mfaces[0].v4; + else + bvh->root->point_index[3] = -1; + } + else + { + bvh->root->point_index[0] = 0; + bvh->root->point_index[1] = -1; + bvh->root->point_index[2] = -1; + bvh->root->point_index[3] = -1; + } + bvh->root->isleaf = 1; bvh->root->traversed = 0; bvh->root->count_nodes = 0; @@ -602,7 +603,7 @@ BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, f else { // create face boxes - face_list = MEM_callocN (bvh->numfaces * sizeof (Tree *), "Tree"); + face_list = MEM_callocN (bvh->numfaces * sizeof (CollisionTree *), "CollisionTree"); if (face_list == NULL) { printf("bvh_build: Out of memory for face_list.\n"); @@ -611,17 +612,35 @@ BVH *bvh_build (DerivedMesh *dm, MVert *x, MVert *xnew, unsigned int numverts, f } // create face boxes - for(i = 0, k = 0; i < bvh->numfaces; i++) + for(i = 0; i < bvh->numfaces; i++) { LinkNode *tnlink = NULL; - tree = (Tree *)MEM_callocN(sizeof(Tree), "Tree"); + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); // TODO: check succesfull alloc tnlink = BLI_linklist_append_fast(&nlink->next, tree); face_list[i] = tree; - tree->tri_index = i; + + if(bvh->mfaces) + { + bvh->root->point_index[0] = mfaces[i].v1; + bvh->root->point_index[1] = mfaces[i].v2; + bvh->root->point_index[2] = mfaces[i].v3; + if(mfaces[i].v4) + bvh->root->point_index[3] = mfaces[i].v4; + else + bvh->root->point_index[3] = -1; + } + else + { + bvh->root->point_index[0] = i; + bvh->root->point_index[1] = -1; + bvh->root->point_index[2] = -1; + bvh->root->point_index[3] = -1; + } + tree->isleaf = 1; tree->nextLeaf = NULL; tree->prevLeaf = bvh->leaf_tree; @@ -694,7 +713,7 @@ int bvh_overlap(float *bv1, float *bv2) * every other triangle that doesn't require any realloc, but uses * much memory */ -int bvh_traverse(Tree * tree1, Tree * tree2, LinkNode *collision_list) +int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list) { int i = 0, ret = 0; @@ -709,8 +728,11 @@ int bvh_traverse(Tree * tree1, Tree * tree2, LinkNode *collision_list) // save potential colliding triangles CollisionPair *collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - collpair->indexA = tree1->tri_index; - collpair->indexB = tree2->tri_index; + VECCOPY(collpair->point_indexA, tree1->point_index); + collpair->point_indexA[3] = tree1->point_index[3]; + + VECCOPY(collpair->point_indexB, tree2->point_index); + collpair->point_indexB[3] = tree2->point_index[3]; BLI_linklist_append(&collision_list, collpair); @@ -744,7 +766,7 @@ int bvh_traverse(Tree * tree1, Tree * tree2, LinkNode *collision_list) // bottom up update of bvh tree: // join the 4 children here -void bvh_join(Tree * tree) +void bvh_join(CollisionTree *tree) { int i = 0, j = 0; if (!tree) @@ -775,17 +797,12 @@ void bvh_join(Tree * tree) // update static bvh // needs new positions in bvh->x, bvh->xnew -void bvh_update(DerivedMesh *dm, BVH * bvh, int moving) +void bvh_update(BVH * bvh, int moving) { TreeNode *leaf, *parent; int traversecheck = 1; // if this is zero we don't go further unsigned int j = 0; - if(bvh->numfaces != dm->getNumFaces(dm)) - return; - - bvh->mfaces = dm->getFaceArray(dm); - for (leaf = bvh->leaf_root; leaf; leaf = leaf->nextLeaf) { traversecheck = 1; diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index cb7fccd11c1..42faf2b2c3f 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4866,7 +4866,7 @@ static void clothModifier_initData(ModifierData *md) ClothModifierData *clmd = (ClothModifierData*) md; cloth_init (clmd); } - +/* static void clothModifier_deformVerts( ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) @@ -4889,6 +4889,22 @@ static void clothModifier_deformVerts( if(dm) dm->release(dm); } +*/ + +static DerivedMesh *clothModifier_applyModifier( + ModifierData *md, Object *ob, DerivedMesh *derivedData, + int useRenderParams, int isFinalCalc) +{ + DerivedMesh *result = NULL; + + ClothModifierData *clmd = (ClothModifierData*) md; + + result = clothModifier_do(clmd, ob, derivedData); + + CDDM_calc_normals(result); + + return derivedData; +} static void clothModifier_updateDepgraph( ModifierData *md, DagForest *forest, Object *ob, @@ -4957,6 +4973,8 @@ static void collisionModifier_initData(ModifierData *md) collmd->x = NULL; collmd->xnew = NULL; + collmd->current_x = NULL; + collmd->current_xnew = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -4974,22 +4992,32 @@ static void collisionModifier_freeData(ModifierData *md) MEM_freeN(collmd->x); if(collmd->xnew) MEM_freeN(collmd->xnew); + if(collmd->current_x) + MEM_freeN(collmd->current_x); + if(collmd->current_xnew) + MEM_freeN(collmd->current_xnew); collmd->x = NULL; collmd->xnew = NULL; + collmd->current_x = NULL; + collmd->current_xnew = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; } } +static int collisionModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} + static void collisionModifier_deformVerts( ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) { CollisionModifierData *collmd = (CollisionModifierData*) md; DerivedMesh *dm = NULL; - MVert *mvert = NULL; float current_time = 0; unsigned int numverts = 0, i = 0; MVert *tempVert = NULL; @@ -4999,6 +5027,12 @@ static void collisionModifier_deformVerts( if(derivedData) dm = CDDM_copy(derivedData); else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + if(!ob->pd) + { + printf("collisionModifier_deformVerts: Should not happen!\n"); + return; + } + if(dm) { CDDM_apply_vert_coords(dm, vertexCos); @@ -5013,17 +5047,26 @@ static void collisionModifier_deformVerts( // check if mesh has changed if(collmd->x && (numverts != collmd->numverts)) - collisionModifier_freeData(collmd); + collisionModifier_freeData((ModifierData *)collmd); if(collmd->time == -1) // first time { - collmd->x = dm->dupVertArray(dm); - collmd->xnew = dm->dupVertArray(dm); + collmd->x = dm->dupVertArray(dm); // frame start position + + for ( i = 0; i < numverts; i++ ) + { + // we save global positions + Mat4MulVecfl ( ob->obmat, collmd->x[i].co ); + } + + collmd->xnew = MEM_dupallocN(collmd->x); // frame end position + collmd->current_x = MEM_dupallocN(collmd->x); // inter-frame + collmd->current_xnew = MEM_dupallocN(collmd->x); // inter-frame collmd->numverts = numverts; // TODO: epsilon // create bounding box hierarchy - collmd->tree = bvh_build(dm, collmd->x, collmd->xnew, numverts, 0.01); + collmd->tree = bvh_build(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, collmd->current_xnew, numverts, ob->pd->pdef_sbift); } else if(numverts == collmd->numverts) { @@ -5040,7 +5083,10 @@ static void collisionModifier_deformVerts( Mat4MulVecfl ( ob->obmat, collmd->xnew[i].co ); } - bvh_update(dm, collmd->tree, 0); // recalc static bounding boxes + memcpy(collmd->current_xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); + memcpy(collmd->current_x, dm->getVertArray(dm), numverts*sizeof(MVert)); + + bvh_update(collmd->tree, 0); // recalc static bounding boxes } collmd->time = current_time; @@ -5051,11 +5097,6 @@ static void collisionModifier_deformVerts( dm->release(dm); } -static int collisionModifier_dependsOnTime(ModifierData *md) -{ - return 1; -} - /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) @@ -5342,10 +5383,10 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->deformVerts = softbodyModifier_deformVerts; mti = INIT_TYPE(Cloth); - mti->type = eModifierTypeType_OnlyDeform; + mti->type = eModifierTypeType_Nonconstructive; mti->initData = clothModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsCVs; - // | eModifierTypeFlag_RequiresOriginalData; + mti->flags = eModifierTypeFlag_AcceptsMesh + | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode // | eModifierTypeFlag_EnableInEditmode; @@ -5353,7 +5394,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->freeData = clothModifier_freeData; mti->requiredDataMask = clothModifier_requiredDataMask; // mti->copyData = clothModifier_copyData; - mti->deformVerts = clothModifier_deformVerts; + // mti->deformVerts = clothModifier_deformVerts; + mti->applyModifier = clothModifier_applyModifier; mti->updateDepgraph = clothModifier_updateDepgraph; mti = INIT_TYPE(Collision); @@ -5567,11 +5609,11 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -ModifierData *modifiers_isClothEnabled(Object *ob) +ClothModifierData *modifiers_isClothEnabled(Object *ob) { - ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - return md; + return clmd; } LinkNode *modifiers_calcDataMasks(ModifierData *md, CustomDataMask dataMask) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 99f0885b435..56f1c817a50 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2893,6 +2893,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) collmd->x = NULL; collmd->xnew = NULL; + collmd->current_x = NULL; + collmd->current_xnew = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -3009,7 +3011,6 @@ static void direct_link_object(FileData *fd, Object *ob) sb->bpoint= NULL; // init pointers so it gets rebuilt nicely sb->bspring= NULL; sb->scratch= NULL; - sb->keys= newdataadr(fd, sb->keys); test_pointer_array(fd, (void **)&sb->keys); diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 27f7431a9cf..b4592e4d724 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -156,9 +156,13 @@ typedef struct Cloth unsigned char old_solver_type; unsigned char pad2; short pad3; - void *tree; /* collision tree for this cloth object */ + struct CollisionTree *tree; /* collision tree for this cloth object */ struct MFace *mfaces; - void *implicit; /* our implicit solver connects to this pointer */ + struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ + struct MVert *x; + struct MVert *xnew; + struct MVert *current_x; + struct MVert *current_xnew; } Cloth; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 81e27afbac4..b25c3e79921 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -350,12 +350,14 @@ typedef struct ClothModifierData { typedef struct CollisionModifierData { ModifierData modifier; - struct MVert *x; - struct MVert *xnew; + struct MVert *x; /* position at the beginning of the frame */ + struct MVert *xnew; /* position at the end of the frame */ + struct MVert *current_xnew; /* new position at the actual inter-frame step */ + struct MVert *current_x; /* position at the actual inter-frame step */ unsigned int numverts; float time; - void *tree; /* collision tree for this cloth object */ + struct BVH *tree; /* collision tree for this cloth object */ } CollisionModifierData; typedef enum { diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index a821e209ef0..062989d0754 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -113,7 +113,6 @@ typedef struct SoftBody { ; struct SBScratch *scratch; /* scratch pad/cache on live time not saved in file */ - } SoftBody; /* pd->forcefield: Effector Fields types */ diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 8f35e64b79f..a68338e132b 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -99,6 +99,7 @@ #include "BKE_customdata.h" #include "BKE_blender.h" #include "BKE_booleanops.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_displist.h" #include "BKE_depsgraph.h" From 8bca9e5977c61833250c49ecb46f26b3e6b8eba7 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 23 Oct 2007 22:38:07 +0000 Subject: [PATCH 033/430] Another WIP commit. Building up bounding volume API --- source/blender/blenkernel/BKE_collisions.h | 5 +- source/blender/blenkernel/intern/kdop.c | 94 ++++++++++++++------- source/blender/blenkernel/intern/modifier.c | 5 +- source/blender/src/buttons_object.c | 41 ++++----- 4 files changed, 85 insertions(+), 60 deletions(-) diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 8c7933f3434..0a79bb46262 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -89,7 +89,8 @@ CollisionPair; ///////////////////////////////////////////////// // builds bounding volume hierarchy -BVH *bvh_build (MFace *mfaces, unsigned int numfaces, MVert *x, MVert *xnew, unsigned int numverts, float epsilon); +BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); + // frees the same void bvh_free ( BVH *bvh ); @@ -97,7 +98,7 @@ void bvh_free ( BVH *bvh ); int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list); // update bounding volumes, needs updated positions in bvh->x -void bvh_update(BVH * bvh, int moving); +void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); LinkNode *BLI_linklist_append_fast (LinkNode **listp, void *ptr); diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 5ad08587266..f2a1e895751 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -330,6 +330,11 @@ void bvh_free(BVH * bvh) BLI_linklist_free(bvh->tree,NULL); bvh->tree = NULL; + if(bvh->x) + MEM_freeN(bvh->x); + if(bvh->xnew) + MEM_freeN(bvh->xnew); + MEM_freeN(bvh); bvh = NULL; } @@ -520,44 +525,14 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, CollisionTree **face_lis // mfaces is allowed to be null // just vertexes are used if mfaces=NULL -BVH *bvh_build (MFace *mfaces, unsigned int numfaces, MVert *x, MVert *xnew, unsigned int numverts, float epsilon) +BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) { unsigned int i = 0, j = 0; CollisionTree **face_list=NULL; - BVH *bvh=NULL; CollisionTree *tree=NULL; LinkNode *nlink = NULL; MFace *mface = NULL; - bvh = MEM_callocN(sizeof(BVH), "BVH"); - if (bvh == NULL) - { - printf("bvh: Out of memory.\n"); - return NULL; - } - - bvh->flags = 0; - bvh->leaf_tree = NULL; - bvh->leaf_root = NULL; - bvh->tree = NULL; - - bvh->epsilon = epsilon; - bvh->numfaces = numfaces; - mface = bvh->mfaces = mfaces; - - // we have no faces, we save seperate points - if(!bvh->mfaces) - { - bvh->numfaces = numverts; - } - - bvh->numverts = numverts; - bvh->xnew = xnew; - bvh->x = x; - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - // TODO: check succesfull alloc - BLI_linklist_append(&bvh->tree, tree); - nlink = bvh->tree; if (tree == NULL) @@ -686,6 +661,46 @@ BVH *bvh_build (MFace *mfaces, unsigned int numfaces, MVert *x, MVert *xnew, uns return bvh; } +BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon) +{ + unsigned int i = 0, j = 0; + CollisionTree **face_list=NULL; + BVH *bvh=NULL; + CollisionTree *tree=NULL; + LinkNode *nlink = NULL; + MFace *mface = NULL; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + bvh->tree = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = numfaces; + + // we have no faces, we save seperate points + if(!mfaces) + { + bvh->numfaces = numverts; + } + + bvh->numverts = numverts; + bvh->xnew = MEM_dupallocN(x); + bvh->x = MEM_dupallocN(x); + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); + // TODO: check succesfull alloc + BLI_linklist_append(&bvh->tree, tree); + + return bvh_build(bvh, mfaces, numfaces); +} + // bvh_overlap - is it possbile for 2 bv's to collide ? int bvh_overlap(float *bv1, float *bv2) { @@ -850,3 +865,20 @@ void bvh_update(BVH * bvh, int moving) } } +void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving) +{ + if(!bvh) + return; + + if(numverts!=bvh->numverts) + return; + + if(x) + memcpy(bvh->x, x, sizeof(MVert) * numverts); + + if(xnew) + memcpy(bvh->xnew, xnew, sizeof(MVert) * numverts); + + bvh_update(bvh, moving); +} + diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 42faf2b2c3f..e9ec26e56ec 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5066,7 +5066,7 @@ static void collisionModifier_deformVerts( // TODO: epsilon // create bounding box hierarchy - collmd->tree = bvh_build(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, collmd->current_xnew, numverts, ob->pd->pdef_sbift); + collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, numverts, ob->pd->pdef_sbift); } else if(numverts == collmd->numverts) { @@ -5086,7 +5086,8 @@ static void collisionModifier_deformVerts( memcpy(collmd->current_xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); memcpy(collmd->current_x, dm->getVertArray(dm), numverts*sizeof(MVert)); - bvh_update(collmd->tree, 0); // recalc static bounding boxes + // recalc static bounding boxes + bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); } collmd->time = current_time; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 0e227f7efbc..c264d684d77 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3268,38 +3268,29 @@ static void object_panel_cloth_II(Object *ob) static void object_panel_cloth_III(Object *ob) { uiBlock *block; - static int val; - uiBut *but; ClothModifierData *clmd = NULL; clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) - { - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) - { - Cloth *cloth = clmd->clothObject; - char str[128]; - - block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); - uiNewPanelTabbed("Cloth", "Physics"); - if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; + { + block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); - if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) - { - // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); - } - else - uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); - uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); } + else + uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); + uiBlockEndAlign(block); } - // uiBlockEndAlign(block); } From 916cd17778ef306c283adcdffe872c9503358ee0 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 24 Oct 2007 17:13:13 +0000 Subject: [PATCH 034/430] Fixed some bugs in bounding volumes, still some crasher in new cloth modifier --- source/blender/blenkernel/intern/cloth.c | 9 ++++++--- source/blender/blenkernel/intern/kdop.c | 16 ++++++++-------- source/blender/blenkernel/intern/modifier.c | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4c4bac7bbf9..5ea913788e7 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -699,11 +699,11 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, } tstart(); - +/* // Call the solver. if ( solvers [clmd->sim_parms.solver_type].solver ) solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); - +*/ tend(); printf ( "Cloth simulation time: %f\n", ( float ) tval() ); @@ -735,7 +735,10 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, } } - return result; + if(result) + return result; + else + return dm; } /* frees all */ diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index f2a1e895751..32bab0b4935 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -531,16 +531,9 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) CollisionTree **face_list=NULL; CollisionTree *tree=NULL; LinkNode *nlink = NULL; - MFace *mface = NULL; nlink = bvh->tree; - if (tree == NULL) - { - printf("bvh_build: Out of memory for nodes.\n"); - bvh_free(bvh); - return NULL; - } bvh->root = bvh->tree->link; bvh->root->isleaf = 0; bvh->root->parent = NULL; @@ -695,7 +688,14 @@ BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsig bvh->xnew = MEM_dupallocN(x); bvh->x = MEM_dupallocN(x); tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - // TODO: check succesfull alloc + + if (tree == NULL) + { + printf("bvh_build: Out of memory for nodes.\n"); + bvh_free(bvh); + return NULL; + } + BLI_linklist_append(&bvh->tree, tree); return bvh_build(bvh, mfaces, numfaces); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index e9ec26e56ec..4b65381c3b7 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4903,7 +4903,7 @@ static DerivedMesh *clothModifier_applyModifier( CDDM_calc_normals(result); - return derivedData; + return result; } static void clothModifier_updateDepgraph( From f310214cc5a40b20cc9189b60cbd726f9368d99d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 25 Oct 2007 21:17:55 +0000 Subject: [PATCH 035/430] reverted part of cloth.c and modifier.c back to old code before switch to use "deform_only" modifier (not tested, needs cleanup but compiles) --- source/blender/blenkernel/intern/cloth.c | 686 ++++++++++---------- source/blender/blenkernel/intern/modifier.c | 17 +- 2 files changed, 344 insertions(+), 359 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 5ea913788e7..4692ee5fa3f 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -120,13 +120,12 @@ static CM_SOLVER_DEF solvers [] = /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); -static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); +static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd); +static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr); +static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr); int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); - - +static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); /****************************************************************************** * * External interface called by modifier.c clothModifier functions. @@ -136,9 +135,9 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short * cloth_init - creates a new cloth simulation. * * 1. create object -* 2. fill object with standard values or with the GUI settings if given +* 2. fill object with standard values or with the GUI settings if given */ -void cloth_init ( ClothModifierData *clmd ) +void cloth_init (ClothModifierData *clmd) { /* Initialize our new data structure to reasonable values. */ clmd->sim_parms.gravity [0] = 0.0; @@ -153,17 +152,14 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms.stepsPerFrame = 5; clmd->sim_parms.sim_time = 1.0; clmd->sim_parms.flags = CLOTH_SIMSETTINGS_FLAG_RESET; - clmd->sim_parms.solver_type = 0; + clmd->sim_parms.solver_type = 0; clmd->sim_parms.preroll = 0; clmd->sim_parms.maxspringlen = 10; - clmd->sim_parms.firstframe = 1; - clmd->sim_parms.lastframe = 250; clmd->coll_parms.self_friction = 5.0; clmd->coll_parms.friction = 10.0; clmd->coll_parms.loop_count = 1; clmd->coll_parms.epsilon = 0.01f; - clmd->coll_parms.flags = 0; - + /* These defaults are copied from softbody.c's * softbody_calc_forces() function. */ @@ -181,17 +177,17 @@ void cloth_init ( ClothModifierData *clmd ) } // unused in the moment, cloth needs quads from mesh -DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) +DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) { DerivedMesh *result = NULL; int i; - int numverts = dm->getNumVerts ( dm ); - int numedges = dm->getNumEdges ( dm ); - int numfaces = dm->getNumFaces ( dm ); + int numverts = dm->getNumVerts(dm); + int numedges = dm->getNumEdges(dm); + int numfaces = dm->getNumFaces(dm); - MVert *mvert = CDDM_get_verts ( dm ); - MEdge *medge = CDDM_get_edges ( dm ); - MFace *mface = CDDM_get_faces ( dm ); + MVert *mvert = CDDM_get_verts(dm); + MEdge *medge = CDDM_get_edges(dm); + MFace *mface = CDDM_get_faces(dm); MVert *mvert2; MFace *mface2; @@ -203,36 +199,36 @@ DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) float vec1[3], vec2[3], vec3[3], vec4[3], vec5[3]; float mag1=0, mag2=0; - for ( i = 0; i < numfaces; i++ ) + for(i = 0; i < numfaces; i++) { - if ( mface[i].v4 ) + if(mface[i].v4) numquads++; else - numtris++; + numtris++; } - result = CDDM_from_template ( dm, numverts, 0, numtris + 2*numquads ); + result = CDDM_from_template(dm, numverts, 0, numtris + 2*numquads); - if ( !result ) + if(!result) return NULL; // do verts - mvert2 = CDDM_get_verts ( result ); - for ( a=0; av1 = mface[a].v2; mf->v2 = mface[a].v3; @@ -260,9 +256,9 @@ DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) mf->v4 = 0; mf->flag |= ME_SMOOTH; - test_index_face ( mf, NULL, 0, 3 ); + test_index_face(mf, NULL, 0, 3); - if ( mface[a].v4 ) + if(mface[a].v4) { MFace *mf2; @@ -275,7 +271,7 @@ DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) *mf2 = *inMF; */ - if ( random==1 ) + if(random==1) { mf2->v1 = mface[a].v1; mf2->v2 = mface[a].v2; @@ -290,31 +286,32 @@ DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) mf2->v4 = 0; mf2->flag |= ME_SMOOTH; - test_index_face ( mf2, NULL, 0, 3 ); + test_index_face(mf2, NULL, 0, 3); } i++; } - CDDM_calc_edges ( result ); - CDDM_calc_normals ( result ); + CDDM_calc_edges(result); + CDDM_calc_normals(result); return result; } -DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) +DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) { + /* DerivedMesh *result = NULL; unsigned int i = 0, a = 0, j=0; - int numverts = dm->getNumVerts ( dm ); - int numedges = dm->getNumEdges ( dm ); - int numfaces = dm->getNumFaces ( dm ); + int numverts = dm->getNumVerts(dm); + int numedges = dm->getNumEdges(dm); + int numfaces = dm->getNumFaces(dm); - MVert *mvert = CDDM_get_verts ( dm ); - MEdge *medge = CDDM_get_edges ( dm ); - MFace *mface = CDDM_get_faces ( dm ); + MVert *mvert = CDDM_get_verts(dm); + MEdge *medge = CDDM_get_edges(dm); + MFace *mface = CDDM_get_faces(dm); MVert *mvert2; MFace *mface2; @@ -324,79 +321,80 @@ DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) Cloth *cloth = clmd->clothObject; ClothSpring *springs = cloth->springs; unsigned int numsprings = cloth->numsprings; - + // create spring tearing hash edgehash = BLI_edgehash_new(); - - for ( i = 0; i < numsprings; i++ ) + + for(i = 0; i < numsprings; i++) { - if ( ( springs[i].flags & CLOTH_SPRING_FLAG_DEACTIVATE ) - && ( !BLI_edgehash_haskey ( edgehash, springs[i].ij, springs[i].kl ) ) ) + if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) + &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) { - BLI_edgehash_insert ( edgehash, springs[i].ij, springs[i].kl, NULL ); - BLI_edgehash_insert ( edgehash, springs[i].kl, springs[i].ij, NULL ); + BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); + BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); j++; } } - + // printf("found %d tears\n", j); + + result = CDDM_from_template(dm, numverts, 0, numfaces); - result = CDDM_from_template ( dm, numverts, 0, numfaces ); - - if ( !result ) + if(!result) return NULL; // do verts - mvert2 = CDDM_get_verts ( result ); - for ( a=0; av1 = mface[a].v1; mf->v2 = mface[a].v2; mf->v3 = mface[a].v3; mf->v4 = mface[a].v4; - - test_index_face ( mf, NULL, 0, 4 ); - + + test_index_face(mf, NULL, 0, 4); + i++; } } - CDDM_lower_num_faces ( result, i ); - CDDM_calc_edges ( result ); - CDDM_calc_normals ( result ); - - BLI_edgehash_free ( edgehash, NULL ); + CDDM_lower_num_faces(result, i); + CDDM_calc_edges(result); + CDDM_calc_normals(result); + + BLI_edgehash_free(edgehash, NULL); return result; + */ } @@ -600,79 +598,54 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) /** * cloth_deform_verts - simulates one step, framenr is in frames. -* +* **/ -DerivedMesh *clothModifier_do(ClothModifierData *clmd, - Object *ob, DerivedMesh *dm) +DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) { unsigned int i; - DerivedMesh *result = NULL; + unsigned int numverts = -1; + unsigned int numedges = -1; + unsigned int numfaces = -1; + MVert *mvert = NULL; + MEdge *medge = NULL; + MFace *mface = NULL; + DerivedMesh *result = NULL, *result2 = NULL; Cloth *cloth = clmd->clothObject; - unsigned int framenr = ( float ) G.scene->r.cfra; - float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); - ListBase *effectors = NULL; - ClothVertex *verts = NULL; + unsigned int framenr = (float)G.scene->r.cfra; + float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); + ListBase *effectors = NULL; + ClothVertex *newframe= NULL; Frame *frame = NULL; LinkNode *search = NULL; - float deltaTime = current_time - clmd->sim_parms.sim_time; - MVert *mverts = NULL; - - result = CDDM_copy(dm); - - // only be active during a specific period: - // that's "first frame" and "last frame" on GUI - if ( clmd->clothObject ) - { - if ( clmd->sim_parms.cache ) - { - if ( current_time < clmd->sim_parms.firstframe ) - { - int frametime = cloth_cache_first_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, result ); - } - return; - } - else if ( current_time > clmd->sim_parms.lastframe ) - { - int frametime = cloth_cache_last_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, result ); - } - return; - } - else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed - { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, clmd, result ); - } - clmd->sim_parms.sim_time = current_time; - return; - } - } + float deltaTime = current_time - clmd->sim_parms.sim_time; + clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); + + result = CDDM_copy(dm); + + if(!result) + { + return dm; } - - // unused in the moment, calculated seperately in implicit.c - clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; + + numverts = result->getNumVerts(result); + numedges = result->getNumEdges(result); + numfaces = result->getNumFaces(result); + mvert = CDDM_get_verts(result); + medge = CDDM_get_edges(result); + mface = CDDM_get_faces(result); clmd->sim_parms.sim_time = current_time; - if ( deltaTime == 1.0f ) + if(deltaTime == 1.0f) { - if ( ( clmd->clothObject == NULL ) || ( dm->getNumVerts(dm) != clmd->clothObject->numverts ) ) + if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) { - if ( !cloth_from_object ( ob, clmd, dm ) ) - return; + if(!cloth_from_object (ob, clmd, result, dm, framenr)) + return result; - if ( clmd->clothObject == NULL ) - return; + if(clmd->clothObject == NULL) + return result; cloth = clmd->clothObject; } @@ -680,47 +653,56 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; // Insure we have a clmd->clothObject, in case allocation failed. - if ( clmd->clothObject != NULL ) - { - if ( !cloth_cache_search_frame ( clmd, framenr ) ) - { - verts = cloth->verts; - mverts = dm->getVertArray(dm); + if (clmd->clothObject != NULL) + { + + cloth->mfaces = mface; // update face pointer + ((BVH *)cloth->tree)->mfaces = mface; + cloth->numfaces = numfaces; + ((BVH *)cloth->tree)->numfaces = numfaces; - // Force any pinned verts to their constrained location. - for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) + if(!cloth_cache_search_frame(clmd, framenr)) + { + /* Force any pinned verts to their constrained location. */ + for (i = 0; i < clmd->clothObject->numverts; i++) { - // Save the previous position. - VECCOPY ( verts->xold, verts->xconst ); - VECCOPY ( verts->txold, verts->x ); - // Get the current position. - VECCOPY ( verts->xconst, mverts[i].co ); - Mat4MulVecfl ( ob->obmat, verts->xconst ); + /* Save the previous position. */ + VECCOPY (cloth->verts [i].xold, cloth->verts [i].xconst); + VECCOPY (cloth->verts [i].txold, cloth->verts [i].x); + + /* Get the current position. */ + VECCOPY (cloth->verts [i].xconst, mvert[i].co); + Mat4MulVecfl(ob->obmat, cloth->verts [i].xconst); + + /* Compute the vertices velocity. */ + VECSUB (cloth->verts [i].v, cloth->verts [i].x, cloth->verts [i].xold); } tstart(); -/* - // Call the solver. - if ( solvers [clmd->sim_parms.solver_type].solver ) - solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); -*/ - tend(); - printf ( "Cloth simulation time: %f\n", ( float ) tval() ); - cloth_cache_set_frame ( clmd, framenr ); + /* Call the solver. */ + + if (solvers [clmd->sim_parms.solver_type].solver) + solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); + + tend(); + + // printf("Cloth simulation time: %f\n", (float)tval()); + + cloth_cache_set_frame(clmd, framenr); } else // just retrieve the cached frame { - cloth_cache_get_frame ( clmd, framenr ); + cloth_cache_get_frame(clmd, framenr); } // Copy the result back to the object. - cloth_to_object ( ob, clmd, result ); - + cloth_to_object (ob, result, clmd); + // bvh_free(clmd->clothObject->tree); // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); - } + } } else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) @@ -729,47 +711,44 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, { if ( cloth_cache_search_frame ( clmd, framenr ) ) { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, clmd, result ); + cloth_cache_get_frame(clmd, framenr); + cloth_to_object (ob, result, clmd); } } } - if(result) - return result; - else - return dm; + return result; } /* frees all */ -void cloth_free_modifier ( ClothModifierData *clmd ) +void cloth_free_modifier (ClothModifierData *clmd) { Cloth *cloth = NULL; - if ( !clmd ) + if(!clmd) return; cloth = clmd->clothObject; - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) - { - // free our frame cache, TODO: but get to first position before - cloth_cache_free ( clmd, 0 ); + // free our frame cache + cloth_cache_free(clmd, 0); - if ( cloth ) - { + /* Calls the solver and collision frees first as they + * might depend on data in clmd->clothObject. */ - // If our solver provides a free function, call it - if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) - { - solvers [cloth->old_solver_type].free ( clmd ); - } + if (cloth) + { + // If our solver provides a free function, call it + if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) + { + solvers [cloth->old_solver_type].free (clmd); + } + + // Free the verts. + if (cloth->verts != NULL) + MEM_freeN (cloth->verts); - // Free the verts. - if ( cloth->verts != NULL ) - MEM_freeN ( cloth->verts ); - - // Free the verts. + // Free the verts. if ( cloth->x != NULL ) MEM_freeN ( cloth->x ); @@ -777,9 +756,9 @@ void cloth_free_modifier ( ClothModifierData *clmd ) if ( cloth->xnew != NULL ) MEM_freeN ( cloth->xnew ); - cloth->verts = NULL; - cloth->numverts = 0; - + cloth->verts = NULL; + cloth->numverts = -1; + // Free the springs. if ( cloth->springs != NULL ) { @@ -796,27 +775,20 @@ void cloth_free_modifier ( ClothModifierData *clmd ) cloth->springs = NULL; } - cloth->springs = NULL; - cloth->numsprings = 0; -/* - // free BVH collision tree - if ( cloth->tree ) - bvh_free ( ( BVH * ) cloth->tree ); -*/ - // we save our faces for collision objects - if ( cloth->mfaces ) - MEM_freeN ( cloth->mfaces ); - /* - if(clmd->clothObject->facemarks) - MEM_freeN(clmd->clothObject->facemarks); - */ - MEM_freeN ( cloth ); - clmd->clothObject = NULL; - } + cloth->numsprings = -1; + + // free BVH collision tree + if(cloth->tree) + bvh_free((BVH *)cloth->tree); + + MEM_freeN (cloth); + clmd->clothObject = NULL; } + } + /****************************************************************************** * * Internal functions. @@ -828,24 +800,26 @@ void cloth_free_modifier ( ClothModifierData *clmd ) * * This function is a modified version of the softbody.c:softbody_to_object() function. **/ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) +static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd) { ClothVertex *verts = NULL; unsigned int i = 0; - MVert *mvert = NULL; + MVert *mvert = NULL; + unsigned int numverts; - if ( clmd->clothObject ) - { + if (clmd->clothObject) { verts = clmd->clothObject->verts; - mvert = dm->getVertArray(dm); /* inverse matrix is not uptodate... */ - Mat4Invert ( ob->imat, ob->obmat ); + Mat4Invert (ob->imat, ob->obmat); - for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) + mvert = CDDM_get_verts(dm); + numverts = dm->getNumVerts(dm); + + for (i = 0; i < numverts; i++, verts++) { - VECCOPY ( mvert[i].co, verts->x ); - Mat4MulVecfl ( ob->imat, mvert[i].co ); /* softbody is in global coords */ + VECCOPY (mvert[i].co, verts->x); + Mat4MulVecfl (ob->imat, mvert[i].co); /* softbody is in global coords */ } } } @@ -855,48 +829,43 @@ static void cloth_to_object ( Object *ob, ClothModifierData *clmd, DerivedMesh * * cloth_apply_vgroup - applies a vertex group as specified by type * **/ -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ) +static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) { - unsigned int i = 0; - unsigned int j = 0; - MDeformVert *dvert = NULL; - Cloth *clothObj = NULL; - unsigned int numverts = dm->getNumVerts ( dm ); - float goalfac = 0; - ClothVertex *verts = NULL; + unsigned int i; + int j; + MDeformVert *dvert = NULL; + Cloth *clothObj; + unsigned int numverts = dm->getNumVerts(dm); + float goalfac; clothObj = clmd->clothObject; - if ( !dm ) - return; - - numverts = dm->getNumVerts ( dm ); - /* vgroup is 1 based, decrement so we can match the right group. */ --vgroup; - verts = clothObj->verts; - - for ( i = 0; i < numverts; i++, verts++ ) - { + for (i = 0; i < numverts; ++i) + { + /* so this will definily be below SOFTGOALSNAP */ + clothObj->verts [i].goal= 0.0f; + // LATER ON, support also mass painting here - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - { - dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); - if ( dvert ) - { - for ( j = 0; j < dvert->totweight; j++ ) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + dvert = dm->getVertData(dm, i, CD_MDEFORMVERT); + if(dvert) + { + for(j = 0; j < dvert->totweight; j++) { - if ( dvert->dw[j].def_nr == vgroup ) + if(dvert->dw[j].def_nr == vgroup) { - verts->goal = dvert->dw [j].weight; + clothObj->verts [i].goal = dvert->dw [j].weight; - goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); - verts->goal = ( float ) pow ( verts->goal , 4.0f ); + goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); + clothObj->verts [i].goal = (float)pow(clothObj->verts [i].goal , 4.0f); - if ( dvert->dw [j].weight >=SOFTGOALSNAP ) + if(dvert->dw [j].weight >=SOFTGOALSNAP) { - verts->flags |= CVERT_FLAG_PINNED; + clothObj->verts[i].flags |= CVERT_FLAG_PINNED; } // TODO enable mass painting here, for the moment i let "goals" go first @@ -910,158 +879,173 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short } // only meshes supported at the moment -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) +/* collision objects */ +static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr) { - unsigned int i = 0; - // dm->getNumVerts(dm); - MVert *mvert = NULL; // CDDM_get_verts(dm); - ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; + unsigned int i; + unsigned int numverts = dm->getNumVerts(dm); + MVert *mvert = CDDM_get_verts(dm); + switch (ob->type) + { + case OB_MESH: + cloth_from_mesh (ob, clmd, dm, framenr); + + if (clmd->clothObject != NULL) + { + + for (i = 0; i < numverts; ++i) + { + VECCOPY (clmd->clothObject->verts [i].x, mvert[i].co); + Mat4MulVecfl(ob->obmat, clmd->clothObject->verts [i].x); + clmd->clothObject->verts [i].flags = 0; + VECCOPY(clmd->clothObject->verts [i].xold, clmd->clothObject->verts [i].x); + VECCOPY(clmd->clothObject->verts [i].txold, clmd->clothObject->verts [i].x); + VECCOPY(clmd->clothObject->verts [i].tx, clmd->clothObject->verts [i].x); + VecMulf(clmd->clothObject->verts [i].v, 0.0f); + } + clmd->clothObject->tree = bvh_build(clmd, 0.001f); + + } + + return 1; + default: return 0; // TODO - we do not support changing meshes + } +} + +// only meshes supported at the moment +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr) +{ + unsigned int i; + unsigned int numverts = dm->getNumVerts(dm); + MVert *mvert = CDDM_get_verts(dm); + /* If we have a clothObject, free it. */ - if ( clmd->clothObject != NULL ) - cloth_free_modifier ( clmd ); + if (clmd->clothObject != NULL) + cloth_free_modifier (clmd); /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); - if ( clmd->clothObject ) + clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); + if (clmd->clothObject) { - clmd->clothObject->old_solver_type = 255; - // clmd->clothObject->old_collision_type = 255; + clmd->clothObject->old_solver_type = -1; } - else if ( !clmd->clothObject ) + else if (clmd->clothObject == NULL) { - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); return 0; } + + printf("cloth_from_object\n"); - switch ( ob->type ) + switch (ob->type) { case OB_MESH: + + cloth_from_mesh (ob, clmd, dm, framenr); - // mesh input objects need DerivedMesh - if ( !dm ) - return 0; + if (clmd->clothObject != NULL) + { + /* create springs */ + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; - cloth_from_mesh ( ob, clmd, dm ); - - if ( clmd->clothObject != NULL ) + if (!cloth_build_springs (clmd->clothObject, dm) ) { - /* create springs */ - clmd->clothObject->springs = NULL; - clmd->clothObject->numsprings = -1; + modifier_setError (&(clmd->modifier), "Can't build springs."); + return 0; + } - if ( !cloth_build_springs ( clmd->clothObject, dm ) ) - { - modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); - return 0; - } + /* set initial values */ + for (i = 0; i < numverts; ++i) + { + VECCOPY (clmd->clothObject->verts [i].x, mvert[i].co); + Mat4MulVecfl(ob->obmat, clmd->clothObject->verts [i].x); - mvert = dm->getVertArray ( dm ); // CDDM_get_verts ( dm ); - verts = clmd->clothObject->verts; - - /* set initial values */ - for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) - { - VECCOPY ( verts->x, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->x ); - - verts->mass = clmd->sim_parms.mass; - - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - verts->goal= clmd->sim_parms.defgoal; - else - verts->goal= 0.0f; - - verts->flags = 0; - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->xconst, verts->x ); - VECCOPY ( verts->txold, verts->x ); - VecMulf ( verts->v, 0.0f ); - - verts->impulse_count = 0; - VECCOPY ( verts->impulse, tnull ); - } - - // apply / set vertex groups - if ( clmd->sim_parms.vgroup_mass > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms.vgroup_mass ); - - // init our solver - if ( solvers [clmd->sim_parms.solver_type].init ) - solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); - - // clmd->clothObject->tree = bvh_build ( dm, clmd->coll_parms.epsilon ); - - cloth_cache_set_frame ( clmd, 1 ); + clmd->clothObject->verts [i].mass = clmd->sim_parms.mass; + clmd->clothObject->verts [i].goal= clmd->sim_parms.defgoal; + clmd->clothObject->verts [i].flags = 0; + VECCOPY(clmd->clothObject->verts [i].xold, clmd->clothObject->verts [i].x); + VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->verts [i].x); + VECCOPY(clmd->clothObject->verts [i].txold, clmd->clothObject->verts [i].x); + VecMulf(clmd->clothObject->verts [i].v, 0.0f); } - return 1; + /* apply / set vertex groups */ + if (clmd->sim_parms.vgroup_mass > 0) + cloth_apply_vgroup (clmd, olddm, clmd->sim_parms.vgroup_mass); + + /* init our solver */ + if (solvers [clmd->sim_parms.solver_type].init) + solvers [clmd->sim_parms.solver_type].init (ob, clmd); + + clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + + cloth_cache_set_frame(clmd, 1); + } + + return 1; case OB_LATTICE: - printf ( "Not supported: OB_LATTICE\n" ); - // lattice_to_softbody(ob); - return 1; + printf("OB_LATTICE\n"); + // lattice_to_softbody(ob); + return 1; case OB_CURVE: case OB_SURF: - printf ( "Not supported: OB_SURF| OB_CURVE\n" ); - return 1; + printf("OB_SURF| OB_CURVE\n"); + return 1; default: return 0; // TODO - we do not support changing meshes } - + return 0; } -static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) +static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr) { - unsigned int numverts = dm->getNumVerts ( dm ); - unsigned int numfaces = dm->getNumFaces ( dm ); - MFace *mface = dm->getFaceArray ( dm ); + unsigned int numverts = dm->getNumVerts(dm); + unsigned int numfaces = dm->getNumFaces(dm); + MFace *mface = CDDM_get_faces(dm); unsigned int i = 0; /* Allocate our vertices. */ clmd->clothObject->numverts = numverts; - clmd->clothObject->verts = MEM_callocN ( sizeof ( ClothVertex ) * clmd->clothObject->numverts, "clothVertex" ); - if ( clmd->clothObject->verts == NULL ) + clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); + if (clmd->clothObject->verts == NULL) { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); return; } - clmd->clothObject->x = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_x" ); - if ( clmd->clothObject->x == NULL ) + // collision objects need to cache face infos since they are needed during collision detection + // TODO: maybe cache it for cloth objects, too + if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->x." ); - return; + clmd->clothObject->numfaces = numfaces; + clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); + if (clmd->clothObject->mfaces == NULL) + { + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); + return; + } + for(i = 0; i < numfaces; i++) + memcpy(&clmd->clothObject->mfaces[i], &mface[i], sizeof(MFace)); + } + else + { + clmd->clothObject->mfaces = mface; // update face pointer + clmd->clothObject->numfaces = numfaces; } - clmd->clothObject->xnew = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_xnew" ); - if ( clmd->clothObject->xnew == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xnew." ); - return; - } - - // save face information - clmd->clothObject->numfaces = numfaces; - clmd->clothObject->mfaces = MEM_callocN ( sizeof ( MFace ) * clmd->clothObject->numfaces, "clothMFaces" ); - if ( clmd->clothObject->mfaces == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->mfaces." ); - return; - } - for ( i = 0; i < numfaces; i++ ) - memcpy ( &clmd->clothObject->mfaces[i], &mface[i], sizeof ( MFace ) ); + // for SIP code + // clmd->clothObject->facemarks = MEM_callocN (sizeof (unsigned char) * clmd->clothObject->numfaces, "clothFaceMarks"); /* Free the springs since they can't be correct if the vertices * changed. */ - if ( clmd->clothObject->springs != NULL ) - MEM_freeN ( clmd->clothObject->springs ); + if (clmd->clothObject->springs != NULL) + MEM_freeN (clmd->clothObject->springs); } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 4b65381c3b7..fcb56b56a5a 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4892,18 +4892,19 @@ static void clothModifier_deformVerts( */ static DerivedMesh *clothModifier_applyModifier( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - int useRenderParams, int isFinalCalc) + ModifierData *md, Object *ob, DerivedMesh *derivedData, + int useRenderParams, int isFinalCalc) { - DerivedMesh *result = NULL; - ClothModifierData *clmd = (ClothModifierData*) md; + DerivedMesh *result=NULL; - result = clothModifier_do(clmd, ob, derivedData); + result = clothModifier_do(clmd, ob, derivedData, useRenderParams, isFinalCalc); - CDDM_calc_normals(result); - - return result; + if(result) + { + return result; + } + return derivedData; } static void clothModifier_updateDepgraph( From 096a1e87fc179936edad72ef700bdf7fd672af8b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 25 Oct 2007 22:09:06 +0000 Subject: [PATCH 036/430] Fixed all known crashers, still have to verify a few things, and compiling works on gxx too, now --- source/blender/blenkernel/BKE_cloth.h | 2 +- source/blender/blenkernel/intern/cloth.c | 131 ++++++----------------- 2 files changed, 36 insertions(+), 97 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 19851321b30..5379f0478d3 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -122,7 +122,7 @@ void cloth_free_modifier ( ClothModifierData *clmd ); void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c -DerivedMesh *clothModifier_do(ClothModifierData *clmd, Object *ob, DerivedMesh *dm); +DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc); //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4692ee5fa3f..427b6bc6fe9 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -654,13 +654,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // Insure we have a clmd->clothObject, in case allocation failed. if (clmd->clothObject != NULL) - { - - cloth->mfaces = mface; // update face pointer - ((BVH *)cloth->tree)->mfaces = mface; - cloth->numfaces = numfaces; - ((BVH *)cloth->tree)->numfaces = numfaces; - + { if(!cloth_cache_search_frame(clmd, framenr)) { /* Force any pinned verts to their constrained location. */ @@ -747,35 +741,39 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the verts. if (cloth->verts != NULL) MEM_freeN (cloth->verts); + + // Free the faces. + if ( cloth->mfaces != NULL ) + MEM_freeN ( cloth->mfaces ); // Free the verts. - if ( cloth->x != NULL ) - MEM_freeN ( cloth->x ); - - // Free the verts. - if ( cloth->xnew != NULL ) - MEM_freeN ( cloth->xnew ); + if ( cloth->x != NULL ) + MEM_freeN ( cloth->x ); + + // Free the verts. + if ( cloth->xnew != NULL ) + MEM_freeN ( cloth->xnew ); cloth->verts = NULL; cloth->numverts = -1; - // Free the springs. - if ( cloth->springs != NULL ) + // Free the springs. + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) { - LinkNode *search = cloth->springs; - while(search) - { - ClothSpring *spring = search->link; - - MEM_freeN ( spring ); - search = search->next; - } - BLI_linklist_free(cloth->springs, NULL); - - cloth->springs = NULL; + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } - cloth->numsprings = -1; + cloth->numsprings = -1; // free BVH collision tree if(cloth->tree) @@ -877,41 +875,6 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v } } } - -// only meshes supported at the moment -/* collision objects */ -static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr) -{ - unsigned int i; - unsigned int numverts = dm->getNumVerts(dm); - MVert *mvert = CDDM_get_verts(dm); - - switch (ob->type) - { - case OB_MESH: - cloth_from_mesh (ob, clmd, dm, framenr); - - if (clmd->clothObject != NULL) - { - - for (i = 0; i < numverts; ++i) - { - VECCOPY (clmd->clothObject->verts [i].x, mvert[i].co); - Mat4MulVecfl(ob->obmat, clmd->clothObject->verts [i].x); - clmd->clothObject->verts [i].flags = 0; - VECCOPY(clmd->clothObject->verts [i].xold, clmd->clothObject->verts [i].x); - VECCOPY(clmd->clothObject->verts [i].txold, clmd->clothObject->verts [i].x); - VECCOPY(clmd->clothObject->verts [i].tx, clmd->clothObject->verts [i].x); - VecMulf(clmd->clothObject->verts [i].v, 0.0f); - } - clmd->clothObject->tree = bvh_build(clmd, 0.001f); - - } - - return 1; - default: return 0; // TODO - we do not support changing meshes - } -} // only meshes supported at the moment static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr) @@ -928,15 +891,13 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); if (clmd->clothObject) { - clmd->clothObject->old_solver_type = -1; + clmd->clothObject->old_solver_type = 255; } else if (clmd->clothObject == NULL) { modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); return 0; } - - printf("cloth_from_object\n"); switch (ob->type) { @@ -979,19 +940,11 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if (solvers [clmd->sim_parms.solver_type].init) solvers [clmd->sim_parms.solver_type].init (ob, clmd); - clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + clmd->clothObject->tree = NULL; // bvh_build(clmd, clmd->coll_parms.epsilon); cloth_cache_set_frame(clmd, 1); } - return 1; - case OB_LATTICE: - printf("OB_LATTICE\n"); - // lattice_to_softbody(ob); - return 1; - case OB_CURVE: - case OB_SURF: - printf("OB_SURF| OB_CURVE\n"); return 1; default: return 0; // TODO - we do not support changing meshes } @@ -1017,29 +970,15 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - // collision objects need to cache face infos since they are needed during collision detection - // TODO: maybe cache it for cloth objects, too - if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + clmd->clothObject->numfaces = numfaces; + clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); + if (clmd->clothObject->mfaces == NULL) { - clmd->clothObject->numfaces = numfaces; - clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); - if (clmd->clothObject->mfaces == NULL) - { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); - return; - } - for(i = 0; i < numfaces; i++) - memcpy(&clmd->clothObject->mfaces[i], &mface[i], sizeof(MFace)); + cloth_free_modifier (clmd); + modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); + return; } - else - { - clmd->clothObject->mfaces = mface; // update face pointer - clmd->clothObject->numfaces = numfaces; - } - - // for SIP code - // clmd->clothObject->facemarks = MEM_callocN (sizeof (unsigned char) * clmd->clothObject->numfaces, "clothFaceMarks"); + memcpy(clmd->clothObject->mfaces, mface, sizeof(MFace)*numfaces); /* Free the springs since they can't be correct if the vertices * changed. @@ -1133,7 +1072,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) BLI_linklist_append ( &cloth->springs, spring ); } } - + // shear springs for ( i = 0; i < numfaces; i++ ) { From f59a4c22150f1db3f54e1d0847881e726518fc11 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 25 Oct 2007 23:10:42 +0000 Subject: [PATCH 037/430] Fixing some goal problem --- source/blender/blenkernel/intern/cloth.c | 146 ++++++++++++++++------- 1 file changed, 106 insertions(+), 40 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 427b6bc6fe9..5c23926e907 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -623,6 +623,44 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d result = CDDM_copy(dm); + // only be active during a specific period: + // that's "first frame" and "last frame" on GUI + if ( clmd->clothObject ) + { + if ( clmd->sim_parms.cache ) + { + if ( current_time < clmd->sim_parms.firstframe ) + { + int frametime = cloth_cache_first_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, result, clmd ); + } + return; + } + else if ( current_time > clmd->sim_parms.lastframe ) + { + int frametime = cloth_cache_last_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, result, clmd ); + } + return; + } + else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed + { + if ( cloth_cache_search_frame ( clmd, framenr ) ) + { + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, result, clmd ); + } + clmd->sim_parms.sim_time = current_time; + return; + } + } + if(!result) { return dm; @@ -657,19 +695,15 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { if(!cloth_cache_search_frame(clmd, framenr)) { - /* Force any pinned verts to their constrained location. */ - for (i = 0; i < clmd->clothObject->numverts; i++) + // Force any pinned verts to their constrained location. + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { - /* Save the previous position. */ - VECCOPY (cloth->verts [i].xold, cloth->verts [i].xconst); - VECCOPY (cloth->verts [i].txold, cloth->verts [i].x); - - /* Get the current position. */ - VECCOPY (cloth->verts [i].xconst, mvert[i].co); - Mat4MulVecfl(ob->obmat, cloth->verts [i].xconst); - - /* Compute the vertices velocity. */ - VECSUB (cloth->verts [i].v, cloth->verts [i].x, cloth->verts [i].xold); + // Save the previous position. + VECCOPY ( verts->xold, verts->xconst ); + VECCOPY ( verts->txold, verts->x ); + // Get the current position. + VECCOPY ( verts->xconst, mverts[i].co ); + Mat4MulVecfl ( ob->obmat, verts->xconst ); } tstart(); @@ -829,41 +863,46 @@ static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *cl **/ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) { - unsigned int i; - int j; + unsigned int i = 0; + unsigned int j = 0; MDeformVert *dvert = NULL; - Cloth *clothObj; - unsigned int numverts = dm->getNumVerts(dm); - float goalfac; + Cloth *clothObj = NULL; + unsigned int numverts = 0; + float goalfac = 0; + ClothVertex *verts = NULL; clothObj = clmd->clothObject; + if ( !dm ) + return; + + numverts = dm->getNumVerts(dm); + /* vgroup is 1 based, decrement so we can match the right group. */ --vgroup; - for (i = 0; i < numverts; ++i) - { - /* so this will definily be below SOFTGOALSNAP */ - clothObj->verts [i].goal= 0.0f; - + verts = clothObj->verts; + + for ( i = 0; i < numverts; i++, verts++ ) + { // LATER ON, support also mass painting here - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - { - dvert = dm->getVertData(dm, i, CD_MDEFORMVERT); - if(dvert) - { - for(j = 0; j < dvert->totweight; j++) + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); + if ( dvert ) + { + for ( j = 0; j < dvert->totweight; j++ ) { - if(dvert->dw[j].def_nr == vgroup) + if ( dvert->dw[j].def_nr == vgroup ) { - clothObj->verts [i].goal = dvert->dw [j].weight; + verts->goal = dvert->dw [j].weight; - goalfac= ABS(clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal); - clothObj->verts [i].goal = (float)pow(clothObj->verts [i].goal , 4.0f); + goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if(dvert->dw [j].weight >=SOFTGOALSNAP) + if ( dvert->dw [j].weight >=SOFTGOALSNAP ) { - clothObj->verts[i].flags |= CVERT_FLAG_PINNED; + verts->flags |= CVERT_FLAG_PINNED; } // TODO enable mass painting here, for the moment i let "goals" go first @@ -903,13 +942,17 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d { case OB_MESH: + // mesh input objects need DerivedMesh + if ( !dm ) + return 0; + cloth_from_mesh (ob, clmd, dm, framenr); - if (clmd->clothObject != NULL) - { - /* create springs */ - clmd->clothObject->springs = NULL; - clmd->clothObject->numsprings = -1; + if ( clmd->clothObject != NULL ) + { + /* create springs */ + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; if (!cloth_build_springs (clmd->clothObject, dm) ) { @@ -924,12 +967,18 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d Mat4MulVecfl(ob->obmat, clmd->clothObject->verts [i].x); clmd->clothObject->verts [i].mass = clmd->sim_parms.mass; - clmd->clothObject->verts [i].goal= clmd->sim_parms.defgoal; + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + clmd->clothObject->verts [i].goal= clmd->sim_parms.defgoal; + else + clmd->clothObject->verts [i].goal= 0.0f; clmd->clothObject->verts [i].flags = 0; VECCOPY(clmd->clothObject->verts [i].xold, clmd->clothObject->verts [i].x); VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->verts [i].x); VECCOPY(clmd->clothObject->verts [i].txold, clmd->clothObject->verts [i].x); VecMulf(clmd->clothObject->verts [i].v, 0.0f); + + clmd->clothObject->verts [i].impulse_count = 0; + VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); } /* apply / set vertex groups */ @@ -970,6 +1019,23 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } + clmd->clothObject->x = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_x" ); + if ( clmd->clothObject->x == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->x." ); + return; + } + + clmd->clothObject->xnew = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_xnew" ); + if ( clmd->clothObject->xnew == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xnew." ); + return; + } + + // save face information clmd->clothObject->numfaces = numfaces; clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); if (clmd->clothObject->mfaces == NULL) From a61fb914ecfe8ba6af4de33db6bbb89d74f67bcd Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 26 Oct 2007 10:46:40 +0000 Subject: [PATCH 038/430] Fixed compiling errors + introduced old speedup for springs again --- source/blender/blenkernel/BKE_cloth.h | 2 + source/blender/blenkernel/intern/cloth.c | 202 +++++++++++++------- source/blender/blenkernel/intern/implicit.c | 46 ++--- source/blender/makesdna/DNA_cloth_types.h | 12 +- 4 files changed, 164 insertions(+), 98 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 5379f0478d3..6b1110d6625 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -173,6 +173,8 @@ typedef struct Frame ClothSpring *springs; unsigned int numverts, numsprings; float time; /* we need float since we want to support sub-frames */ + float (*x)[3]; + float (*xold)[3]; } Frame; diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 5c23926e907..c4c32d48b82 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -123,7 +123,7 @@ static CM_SOLVER_DEF solvers [] = static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd); static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr); -static int collobj_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr); + int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); /****************************************************************************** @@ -179,6 +179,7 @@ void cloth_init (ClothModifierData *clmd) // unused in the moment, cloth needs quads from mesh DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) { + /* DerivedMesh *result = NULL; int i; int numverts = dm->getNumVerts(dm); @@ -234,11 +235,11 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) MFace *inMF; inMF = &mface[a]; - /* - DM_copy_face_data(dm, result, a, i, 1); + + // DM_copy_face_data(dm, result, a, i, 1); - *mf = *inMF; - */ + // *mf = *inMF; + if(mface[a].v4 && random==1) { @@ -265,11 +266,11 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) i++; mf2 = &mface2[i]; - /* - DM_copy_face_data(dm, result, a, i, 1); + + // DM_copy_face_data(dm, result, a, i, 1); - *mf2 = *inMF; - */ + // *mf2 = *inMF; + if(random==1) { @@ -296,7 +297,9 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) CDDM_calc_normals(result); return result; - + */ + + return NULL; } @@ -395,6 +398,8 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) return result; */ + + return NULL; } @@ -505,6 +510,11 @@ void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) } memcpy ( clmd->clothObject->verts, frame->verts, sizeof ( ClothVertex ) *frame->numverts ); + + memcpy ( clmd->clothObject->x, frame->x, sizeof ( float ) *frame->numverts * 3); + + memcpy ( clmd->clothObject->xold, frame->xold, sizeof ( float ) *frame->numverts * 3); + implicit_set_positions ( clmd ); return; @@ -519,7 +529,6 @@ void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) void cloth_cache_set_frame ( ClothModifierData *clmd, float time ) { Frame *frame = NULL; - LinkNode *search = NULL; if ( clmd->clothObject ) { @@ -536,7 +545,26 @@ void cloth_cache_set_frame ( ClothModifierData *clmd, float time ) MEM_freeN ( frame ); return; } - + + frame->x = MEM_dupallocN ( clmd->clothObject->x ); + + if ( !frame->x ) + { + MEM_freeN ( frame->verts ); + MEM_freeN ( frame ); + return; + } + + frame->xold = MEM_dupallocN ( clmd->clothObject->xold ); + + if ( !frame->xold ) + { + MEM_freeN ( frame->verts ); + MEM_freeN ( frame->x ); + MEM_freeN ( frame ); + return; + } + BLI_linklist_append ( &clmd->sim_parms.cache, frame ); } @@ -570,6 +598,14 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) { MEM_freeN ( frame->verts ); } + if ( frame->x ) + { + MEM_freeN ( frame->x ); + } + if ( frame->xold ) + { + MEM_freeN ( frame->xold ); + } MEM_freeN ( frame ); lastsearch->next = search->next; @@ -609,22 +645,35 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d MVert *mvert = NULL; MEdge *medge = NULL; MFace *mface = NULL; - DerivedMesh *result = NULL, *result2 = NULL; + DerivedMesh *result = NULL; Cloth *cloth = clmd->clothObject; unsigned int framenr = (float)G.scene->r.cfra; float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); - ListBase *effectors = NULL; - ClothVertex *newframe= NULL; - Frame *frame = NULL; - LinkNode *search = NULL; + ListBase *effectors = NULL; + ClothVertex *verts = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); result = CDDM_copy(dm); + + if(!result) + { + return dm; + } + + numverts = result->getNumVerts(result); + numedges = result->getNumEdges(result); + numfaces = result->getNumFaces(result); + mvert = CDDM_get_verts(result); + medge = CDDM_get_edges(result); + mface = CDDM_get_faces(result); + + clmd->sim_parms.sim_time = current_time; // only be active during a specific period: // that's "first frame" and "last frame" on GUI + /* if ( clmd->clothObject ) { if ( clmd->sim_parms.cache ) @@ -637,7 +686,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_cache_get_frame ( clmd, frametime ); cloth_to_object ( ob, result, clmd ); } - return; + return result; } else if ( current_time > clmd->sim_parms.lastframe ) { @@ -647,7 +696,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_cache_get_frame ( clmd, frametime ); cloth_to_object ( ob, result, clmd ); } - return; + return result; } else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed { @@ -657,23 +706,11 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_to_object ( ob, result, clmd ); } clmd->sim_parms.sim_time = current_time; - return; + return result; } } - - if(!result) - { - return dm; } - - numverts = result->getNumVerts(result); - numedges = result->getNumEdges(result); - numfaces = result->getNumFaces(result); - mvert = CDDM_get_verts(result); - medge = CDDM_get_edges(result); - mface = CDDM_get_faces(result); - - clmd->sim_parms.sim_time = current_time; + */ if(deltaTime == 1.0f) { @@ -695,28 +732,29 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { if(!cloth_cache_search_frame(clmd, framenr)) { + verts = cloth->verts; + // Force any pinned verts to their constrained location. for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { // Save the previous position. - VECCOPY ( verts->xold, verts->xconst ); - VECCOPY ( verts->txold, verts->x ); + VECCOPY ( cloth->xold[i], verts->xconst ); + VECCOPY ( cloth->current_xold[i], cloth->x[i] ); // Get the current position. - VECCOPY ( verts->xconst, mverts[i].co ); + VECCOPY ( verts->xconst, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } - + tstart(); - + /* Call the solver. */ - if (solvers [clmd->sim_parms.solver_type].solver) solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); - + tend(); - - // printf("Cloth simulation time: %f\n", (float)tval()); - + + printf("Cloth simulation time: %f\n", tval()); + cloth_cache_set_frame(clmd, framenr); } @@ -785,8 +823,16 @@ void cloth_free_modifier (ClothModifierData *clmd) MEM_freeN ( cloth->x ); // Free the verts. - if ( cloth->xnew != NULL ) - MEM_freeN ( cloth->xnew ); + if ( cloth->xold != NULL ) + MEM_freeN ( cloth->xold ); + + // Free the verts. + if ( cloth->current_x != NULL ) + MEM_freeN ( cloth->current_x ); + + // Free the verts. + if ( cloth->current_xold != NULL ) + MEM_freeN ( cloth->current_xold ); cloth->verts = NULL; cloth->numverts = -1; @@ -834,23 +880,21 @@ void cloth_free_modifier (ClothModifierData *clmd) **/ static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd) { - ClothVertex *verts = NULL; unsigned int i = 0; MVert *mvert = NULL; unsigned int numverts; + Cloth *cloth = clmd->clothObject; if (clmd->clothObject) { - verts = clmd->clothObject->verts; - /* inverse matrix is not uptodate... */ Mat4Invert (ob->imat, ob->obmat); mvert = CDDM_get_verts(dm); numverts = dm->getNumVerts(dm); - for (i = 0; i < numverts; i++, verts++) + for (i = 0; i < numverts; i++) { - VECCOPY (mvert[i].co, verts->x); + VECCOPY (mvert[i].co, cloth->x[i]); Mat4MulVecfl (ob->imat, mvert[i].co); /* softbody is in global coords */ } } @@ -921,6 +965,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d unsigned int i; unsigned int numverts = dm->getNumVerts(dm); MVert *mvert = CDDM_get_verts(dm); + float tnull[3] = {0,0,0}; /* If we have a clothObject, free it. */ if (clmd->clothObject != NULL) @@ -963,8 +1008,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d /* set initial values */ for (i = 0; i < numverts; ++i) { - VECCOPY (clmd->clothObject->verts [i].x, mvert[i].co); - Mat4MulVecfl(ob->obmat, clmd->clothObject->verts [i].x); + VECCOPY (clmd->clothObject->x[i], mvert[i].co); + Mat4MulVecfl(ob->obmat, clmd->clothObject->x[i]); clmd->clothObject->verts [i].mass = clmd->sim_parms.mass; if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) @@ -972,9 +1017,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d else clmd->clothObject->verts [i].goal= 0.0f; clmd->clothObject->verts [i].flags = 0; - VECCOPY(clmd->clothObject->verts [i].xold, clmd->clothObject->verts [i].x); - VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->verts [i].x); - VECCOPY(clmd->clothObject->verts [i].txold, clmd->clothObject->verts [i].x); + VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); + VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->x[i]); + VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); VecMulf(clmd->clothObject->verts [i].v, 0.0f); clmd->clothObject->verts [i].impulse_count = 0; @@ -991,7 +1036,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->tree = NULL; // bvh_build(clmd, clmd->coll_parms.epsilon); - cloth_cache_set_frame(clmd, 1); + // cloth_cache_set_frame(clmd, 1); } return 1; @@ -1006,7 +1051,6 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d unsigned int numverts = dm->getNumVerts(dm); unsigned int numfaces = dm->getNumFaces(dm); MFace *mface = CDDM_get_faces(dm); - unsigned int i = 0; /* Allocate our vertices. */ @@ -1019,7 +1063,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->x = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_x" ); + clmd->clothObject->x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_x" ); if ( clmd->clothObject->x == NULL ) { cloth_free_modifier ( clmd ); @@ -1027,11 +1071,27 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->xnew = MEM_callocN ( sizeof ( MVert ) * clmd->clothObject->numverts, "Cloth MVert_xnew" ); - if ( clmd->clothObject->xnew == NULL ) + clmd->clothObject->xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_xold" ); + if ( clmd->clothObject->xold == NULL ) { cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xnew." ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xold." ); + return; + } + + clmd->clothObject->current_x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_x" ); + if ( clmd->clothObject->current_x == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_x." ); + return; + } + + clmd->clothObject->current_xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_xold" ); + if ( clmd->clothObject->current_xold == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_xold." ); return; } @@ -1101,7 +1161,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) EdgeHash *edgehash = NULL; LinkNode *search = NULL, *search2 = NULL; float temp[3]; - + LinkNode *node = NULL, *node2 = NULL; + // error handling if ( numedges==0 ) return 0; @@ -1134,8 +1195,12 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; struct_springs++; - - BLI_linklist_append ( &cloth->springs, spring ); + + if(!i) + node2 = BLI_linklist_append_fast ( &cloth->springs, spring ); + else + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } } @@ -1154,7 +1219,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) BLI_linklist_append ( &edgelist[spring->kl], spring ); shear_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; if ( mface[i].v4 ) { @@ -1170,7 +1236,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) BLI_linklist_append ( &edgelist[spring->kl], spring ); shear_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } } @@ -1204,7 +1271,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); bend_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } search = search->next; } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index f61e2d22f1c..e28930fa052 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -770,7 +770,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) for(i = 0; i < cloth->numverts; i++) { - VECCOPY(id->X[i], verts[i].x); + VECCOPY(id->X[i], cloth->x[i]); } return 1; @@ -1165,7 +1165,6 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; Cloth *cloth = clmd->clothObject; - ClothVertex *verts = cloth->verts; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1336,16 +1335,16 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec if(verts [i].goal < SOFTGOALSNAP) { // current_position = xold + t * (newposition - xold) - VECSUB(tvect, verts[i].xconst, verts[i].xold); + VECSUB(tvect, verts[i].xconst, cloth->xold[i]); mul_fvector_S(tvect, tvect, time); - VECADD(tvect, tvect, verts[i].xold); + VECADD(tvect, tvect, cloth->xold[i]); VECSUB(auxvect, tvect, lX[i]); ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); // calulate damping forces generated by goals - VECSUB(velgoal,verts[i].xold, verts[i].xconst); + VECSUB(velgoal, cloth->xold[i], verts[i].xconst); kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); @@ -1433,7 +1432,7 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) { - unsigned int i=0, j; + unsigned int i=0; float step=0.0f, tf=1.0f; Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; @@ -1449,7 +1448,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update velocities with constrained velocities from pinned verts if(verts [i].goal >= SOFTGOALSNAP) { - VECSUB(id->V[i], verts[i].xconst, verts[i].xold); + VECSUB(id->V[i], verts[i].xconst, cloth->xold[i]); // VecMulf(id->V[i], 1.0 / dt); } } @@ -1480,15 +1479,15 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase float tvect[3] = {.0,.0,.0}; // VECSUB(tvect, id->Xnew[i], verts[i].xold); mul_fvector_S(tvect, id->V[i], step+dt); - VECADD(tvect, tvect, verts[i].xold); + VECADD(tvect, tvect, cloth->xold[i]); VECCOPY(id->Xnew[i], tvect); } } - VECCOPY(verts[i].tx, id->Xnew[i]); + VECCOPY(cloth->current_x[i], id->Xnew[i]); - VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); + VECSUB(verts[i].tv, cloth->current_x[i], cloth->current_xold[i]); VECCOPY(verts[i].v, verts[i].tv); } @@ -1502,16 +1501,16 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase { // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - VECCOPY(verts[i].txold, verts[i].tx); + VECCOPY(cloth->current_xold[i], cloth->current_x[i]); - VECCOPY(id->Xnew[i], verts[i].tx); + VECCOPY(id->Xnew[i], cloth->current_x[i]); VECCOPY(id->Vnew[i], verts[i].tv); VecMulf(id->Vnew[i], 1.0f / dt); } else { - VECCOPY(verts[i].txold, id->Xnew[i]); + VECCOPY(cloth->current_xold[i], id->Xnew[i]); } } @@ -1552,21 +1551,21 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase { if(verts [i].goal < SOFTGOALSNAP) { - VECCOPY(verts[i].txold, id->X[i]); - VECCOPY(verts[i].x, id->X[i]); + VECCOPY(cloth->current_xold[i], id->X[i]); + VECCOPY(cloth->x[i], id->X[i]); VECCOPY(verts[i].v, id->V[i]); } else { - VECCOPY(verts[i].txold, verts[i].xconst); - VECCOPY(verts[i].x, verts[i].xconst); + VECCOPY(cloth->current_xold[i], verts[i].xconst); + VECCOPY(cloth->x[i], verts[i].xconst); VECCOPY(verts[i].v, id->V[i]); } } else { - VECCOPY(verts[i].txold, id->X[i]); - VECCOPY(verts[i].x, id->X[i]); + VECCOPY(cloth->current_xold[i], id->X[i]); + VECCOPY(cloth->x[i], id->X[i]); VECCOPY(verts[i].v, id->V[i]); } } @@ -1582,7 +1581,7 @@ void implicit_set_positions (ClothModifierData *clmd) for(i = 0; i < numverts; i++) { - VECCOPY(id->X[i], verts[i].x); + VECCOPY(id->X[i], cloth->x[i]); VECCOPY(id->V[i], verts[i].v); } } @@ -1841,7 +1840,7 @@ int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *co Cloth *cloth1, *cloth2; ClothVertex *verts1, *verts2; float temp[3]; - + /* cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; @@ -1863,7 +1862,7 @@ int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *co VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); if(ABS(INPR(temp, temp)) < ALMOST_ZERO) return 1; - + */ return 0; } @@ -2109,7 +2108,7 @@ void collisions_update_collision_objects(float step) ClothModifierData *coll_clmd=NULL; Object *coll_ob=NULL; unsigned int i=0; - + /* // search all objects for collision object for (base = G.scene->base.first; base; base = base->next) { @@ -2146,6 +2145,7 @@ void collisions_update_collision_objects(float step) printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } } + */ } diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index b4592e4d724..e1b1e3ce84a 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -45,10 +45,6 @@ typedef struct ClothVertex int flags; /* General flags per vertex. */ float v [3]; /* The velocity of the point. */ float xconst [3]; /* constrained position */ - float x [3]; /* The current position of this vertex. */ - float xold [3]; /* The previous position of this vertex.*/ - float tx [3]; /* temporary position */ - float txold [3]; /* temporary old position */ float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ float mass; /* mass / weight of the vertex */ float goal; /* goal, from SB */ @@ -159,10 +155,10 @@ typedef struct Cloth struct CollisionTree *tree; /* collision tree for this cloth object */ struct MFace *mfaces; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ - struct MVert *x; - struct MVert *xnew; - struct MVert *current_x; - struct MVert *current_xnew; + float (*x)[3]; /* The current position of all vertices.*/ + float (*xold)[3]; /* The previous position of all vertices.*/ + float (*current_x)[3]; /* The TEMPORARY current position of all vertices.*/ + float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ } Cloth; From 4f72523654b0344e8398707edb228182a807d278 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 26 Oct 2007 15:13:50 +0000 Subject: [PATCH 039/430] Weekend commit: Enabled bounding box check for cloth again, but there's a bug in it (no collisions detected) --- source/blender/blenkernel/BKE_cloth.h | 5 + source/blender/blenkernel/BKE_collisions.h | 10 +- source/blender/blenkernel/intern/cloth.c | 65 +++- source/blender/blenkernel/intern/collision.c | 8 +- source/blender/blenkernel/intern/implicit.c | 350 ++++--------------- source/blender/blenkernel/intern/kdop.c | 89 ++++- source/blender/blenkernel/intern/modifier.c | 15 +- source/blender/makesdna/DNA_cloth_types.h | 6 +- 8 files changed, 240 insertions(+), 308 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 6b1110d6625..c0327ebe6db 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -124,6 +124,9 @@ void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc); +// needed in implicit.c +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, float dt); + //////////////////////////////////////////////// @@ -175,6 +178,8 @@ typedef struct Frame float time; /* we need float since we want to support sub-frames */ float (*x)[3]; float (*xold)[3]; + float (*v)[3]; + float (*current_xold)[3]; } Frame; diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 0a79bb46262..6422ad65c0b 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -68,9 +68,9 @@ typedef struct BVH MVert *x; // position of verts at time n-1 MFace *mfaces; // just a pointer to the original datastructure struct LinkNode *tree; - TreeNode *root; // TODO: saving the root --> is this really needed? YES! - TreeNode *leaf_tree; /* Tail of the leaf linked list. */ - TreeNode *leaf_root; /* Head of the leaf linked list. */ + CollisionTree *root; // TODO: saving the root --> is this really needed? YES! + CollisionTree *leaf_tree; /* Tail of the leaf linked list. */ + CollisionTree *leaf_root; /* Head of the leaf linked list. */ float epsilon; /* epslion is used for inflation of the k-dop */ int flags; /* bvhFlags */ } @@ -90,6 +90,7 @@ CollisionPair; // builds bounding volume hierarchy BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); +BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], unsigned int numverts, float epsilon); // frees the same void bvh_free ( BVH *bvh ); @@ -99,12 +100,13 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision // update bounding volumes, needs updated positions in bvh->x void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); +void bvh_update_from_float3(BVH * bvh, float (*x)[3], unsigned int numverts, float (*xnew)[3], int moving); LinkNode *BLI_linklist_append_fast (LinkNode **listp, void *ptr); // move Collision modifier object inter-frame with step = [0,1] // defined in collisions.c -void collision_move_object(CollisionModifierData *collmd, float step); +void collision_move_object(CollisionModifierData *collmd, float step, float prevstep); ///////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index c4c32d48b82..bb99709b73a 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -515,6 +515,10 @@ void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) memcpy ( clmd->clothObject->xold, frame->xold, sizeof ( float ) *frame->numverts * 3); + memcpy ( clmd->clothObject->v, frame->v, sizeof ( float ) *frame->numverts * 3); + + memcpy ( clmd->clothObject->current_xold, frame->current_xold, sizeof ( float ) *frame->numverts * 3); + implicit_set_positions ( clmd ); return; @@ -565,6 +569,29 @@ void cloth_cache_set_frame ( ClothModifierData *clmd, float time ) return; } + frame->v = MEM_dupallocN ( clmd->clothObject->v ); + + if ( !frame->v ) + { + MEM_freeN ( frame->verts ); + MEM_freeN ( frame->x ); + MEM_freeN ( frame->xold ); + MEM_freeN ( frame ); + return; + } + + frame->current_xold= MEM_dupallocN ( clmd->clothObject->current_xold ); + + if ( !frame->current_xold ) + { + MEM_freeN ( frame->verts ); + MEM_freeN ( frame->x ); + MEM_freeN ( frame->xold ); + MEM_freeN ( frame->v ); + MEM_freeN ( frame ); + return; + } + BLI_linklist_append ( &clmd->sim_parms.cache, frame ); } @@ -606,6 +633,14 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) { MEM_freeN ( frame->xold ); } + if ( frame->v ) + { + MEM_freeN ( frame->v ); + } + if ( frame->current_xold ) + { + MEM_freeN ( frame->current_xold ); + } MEM_freeN ( frame ); lastsearch->next = search->next; @@ -825,6 +860,10 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the verts. if ( cloth->xold != NULL ) MEM_freeN ( cloth->xold ); + + // Free the verts. + if ( cloth->v != NULL ) + MEM_freeN ( cloth->v ); // Free the verts. if ( cloth->current_x != NULL ) @@ -833,6 +872,10 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the verts. if ( cloth->current_xold != NULL ) MEM_freeN ( cloth->current_xold ); + + // Free the verts. + if ( cloth->current_v != NULL ) + MEM_freeN ( cloth->current_v ); cloth->verts = NULL; cloth->numverts = -1; @@ -991,7 +1034,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if ( !dm ) return 0; - cloth_from_mesh (ob, clmd, dm, framenr); + cloth_from_mesh (ob, clmd, dm, framenr); if ( clmd->clothObject != NULL ) { @@ -1020,7 +1063,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->x[i]); VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); - VecMulf(clmd->clothObject->verts [i].v, 0.0f); + VecMulf(clmd->clothObject->v[i], 0.0f); clmd->clothObject->verts [i].impulse_count = 0; VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); @@ -1034,7 +1077,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if (solvers [clmd->sim_parms.solver_type].init) solvers [clmd->sim_parms.solver_type].init (ob, clmd); - clmd->clothObject->tree = NULL; // bvh_build(clmd, clmd->coll_parms.epsilon); + clmd->clothObject->tree = bvh_build_from_float3(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms.epsilon); // cloth_cache_set_frame(clmd, 1); } @@ -1079,6 +1122,14 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } + clmd->clothObject->v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_v" ); + if ( clmd->clothObject->v == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->v." ); + return; + } + clmd->clothObject->current_x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_x" ); if ( clmd->clothObject->current_x == NULL ) { @@ -1094,6 +1145,14 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_xold." ); return; } + + clmd->clothObject->current_v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_v" ); + if ( clmd->clothObject->current_v == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_v." ); + return; + } // save face information clmd->clothObject->numfaces = numfaces; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index f4b0ce7312b..6f0ac5f8c6d 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -73,17 +73,15 @@ // step is limited from 0 (frame start position) to 1 (frame end position) -void collision_move_object(CollisionModifierData *collmd, float step) +void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) { float tv[3] = {0,0,0}; unsigned int i = 0; - MVert *tempVert = collmd->current_x; - collmd->current_x = collmd->current_xnew; - collmd->current_xnew = tempVert; - + for ( i = 0; i < collmd->numverts; i++ ) { VECSUB(tv, collmd->xnew[i].co, collmd->x[i].co); + VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep); VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step); } } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index e28930fa052..adefcc32d52 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1164,7 +1164,6 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; - Cloth *cloth = clmd->clothObject; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1486,32 +1485,28 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } VECCOPY(cloth->current_x[i], id->Xnew[i]); - - VECSUB(verts[i].tv, cloth->current_x[i], cloth->current_xold[i]); - VECCOPY(verts[i].v, verts[i].tv); + VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); + VECCOPY(cloth->v[i], cloth->current_v[i]); } - + // call collision function - result = 0; // cloth_bvh_objcollision(clmd, step + dt, dt); - + result = cloth_bvh_objcollision(clmd, step + dt, step, dt); + // copy corrected positions back to simulation - for(i = 0; i < numverts; i++) - { - if(result) - { - // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - - VECCOPY(cloth->current_xold[i], cloth->current_x[i]); - - VECCOPY(id->Xnew[i], cloth->current_x[i]); - - VECCOPY(id->Vnew[i], verts[i].tv); + memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); + memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); + + if(result) + { + for(i = 0; i < numverts; i++) + { + VECCOPY(id->Vnew[i], cloth->current_v[i]); VecMulf(id->Vnew[i], 1.0f / dt); } - else - { - VECCOPY(cloth->current_xold[i], id->Xnew[i]); - } + } + else + { + memcpy(cloth->current_xold, id->Xnew, sizeof(lfVector) * numverts); } // X = Xnew; @@ -1544,46 +1539,42 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase if(effectors) pdEndEffectors(effectors); } - - for(i = 0; i < numverts; i++) - { - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + for(i = 0; i < numverts; i++) { if(verts [i].goal < SOFTGOALSNAP) { VECCOPY(cloth->current_xold[i], id->X[i]); VECCOPY(cloth->x[i], id->X[i]); - VECCOPY(verts[i].v, id->V[i]); } else { VECCOPY(cloth->current_xold[i], verts[i].xconst); VECCOPY(cloth->x[i], verts[i].xconst); - VECCOPY(verts[i].v, id->V[i]); } } - else - { - VECCOPY(cloth->current_xold[i], id->X[i]); - VECCOPY(cloth->x[i], id->X[i]); - VECCOPY(verts[i].v, id->V[i]); - } } + else + { + memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); + memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); + } + + memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); + return 1; } void implicit_set_positions (ClothModifierData *clmd) { Cloth *cloth = clmd->clothObject; - ClothVertex *verts = cloth->verts; - unsigned int numverts = cloth->numverts, i; + unsigned int numverts = cloth->numverts; Implicit_Data *id = cloth->implicit; - for(i = 0; i < numverts; i++) - { - VECCOPY(id->X[i], cloth->x[i]); - VECCOPY(id->V[i], verts[i].v); - } + memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); + memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); } @@ -1707,13 +1698,13 @@ int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierD int collisions_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) { - + return 0; } int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) { - + return 0; } void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) @@ -2161,266 +2152,75 @@ void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *col } // cloth - object collisions -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, float dt) { - /* - Base *base=NULL; - ClothModifierData *coll_clmd=NULL; - Cloth *cloth=NULL; - Object *coll_ob=NULL; - BVH *collisions_bvh=NULL; - unsigned int i=0, j = 0, numfaces = 0, numverts = 0; - unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; - ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; - int ret = 0; + + Base *base = NULL; + CollisionModifierData *collmd = NULL; + Cloth *cloth = NULL; + Object *ob2 = NULL; + BVH *bvh1 = NULL, *bvh2 = NULL; LinkNode *collision_list = NULL; - if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + if (!(((Cloth *)clmd->clothObject)->tree)) { + printf("No BVH found\n"); return 0; } + cloth = clmd->clothObject; - verts = cloth->verts; - collisions_bvh = (BVH *) cloth->tree; - numfaces = clmd->clothObject->numfaces; - numverts = clmd->clothObject->numverts; + bvh1 = cloth->tree; //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// // update cloth bvh - // bvh_update(clmd, collisions_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) - // update collision objects - collisions_update_collision_objects(step); - - do - { - result = 0; - ic = 0; - - // check all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - BVH *coll_bvh = coll_clmd->clothObject->tree; - - // fill collision list - bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); - - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // result += collisions_collision_response_static_tris(clmd, coll_clmd, collision_list, 0); - - // result += collisions_collision_response_static_tris(coll_clmd, clmd, collision_list, 1); - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); - - collision_list = NULL; - } - } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - - printf("ic: %d\n", ic); - rounds++; - } - while(result && (10>rounds));// CLOTH_MAX_THRESHOLD - - printf("\n"); - - //////////////////////////////////////////////////////////// - // update positions - // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] - //////////////////////////////////////////////////////////// - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - //////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////// - // moving collisions - //////////////////////////////////////////////////////////// - - - // update cloth bvh - // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING - - // update moving bvh for collision object once + // check all collision objects for (base = G.scene->base.first; base; base = base->next) { + ob2 = base->object; + collmd = (CollisionModifierData *) modifiers_findByType (ob2, eModifierType_Collision); - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) + if (!collmd) continue; - if(!coll_clmd->clothObject) - continue; - - // if collision object go on - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + // check if there is a bounding volume hierarchy + if (collmd->tree) { - BVH *coll_bvh = coll_clmd->clothObject->tree; + int collisions = 0; - // bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING - } - } - - - do - { - result = 0; - ic = 0; - - // check all collision objects - for (base = G.scene->base.first; base; base = base->next) - { - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + bvh2 = collmd->tree; - if (!coll_clmd) - continue; + // update position + bvh of collision object + collision_move_object(collmd, step, prevstep); + bvh_update_from_mvert(collmd->tree, collmd->current_x, collmd->numverts, NULL, 0); - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + // fill collision list + collisions = bvh_traverse(bvh1->root, bvh2->root, collision_list); + + printf("Found %d collisions.\n", collisions); + + // free collision list + if(collision_list) { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + LinkNode *search = collision_list; + while(search) { - BVH *coll_bvh = coll_clmd->clothObject->tree; + CollisionPair *coll_pair = search->link; - bvh_traverse(collisions_bvh->root, coll_bvh->root, collision_list); - - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // handle all collision objects - - - if (coll_clmd->clothObject) - result += collisions_collision_response_moving_tris(clmd, coll_clmd); - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; - - ic++; - ret++; - } - } - } - - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - - // update cloth bvh - // bvh_update(clmd, collisions_bvh, 1); // 0 means STATIC, 1 means MOVING - - - // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); - - collision_list = NULL; - } + MEM_freeN(coll_pair); + search = search->next; } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; } } - - printf("ic: %d\n", ic); - rounds++; } - while(result && (10>rounds)); // CLOTH_MAX_THRESHOLD - - - //////////////////////////////////////////////////////////// - // update positions + velocities - //////////////////////////////////////////////////////////// - - // verts come from clmd - for(i = 0; i < numverts; i++) - { - VECADD(verts[i].tx, verts[i].txold, verts[i].tv); - } - //////////////////////////////////////////////////////////// - return MIN2(ret, 1); - */ -} \ No newline at end of file + + return 0; +} diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 32bab0b4935..22129fcbc43 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -656,12 +656,8 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon) { - unsigned int i = 0, j = 0; - CollisionTree **face_list=NULL; - BVH *bvh=NULL; + BVH *bvh=NULL; CollisionTree *tree=NULL; - LinkNode *nlink = NULL; - MFace *mface = NULL; bvh = MEM_callocN(sizeof(BVH), "BVH"); if (bvh == NULL) @@ -701,6 +697,55 @@ BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsig return bvh_build(bvh, mfaces, numfaces); } + +BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], unsigned int numverts, float epsilon) +{ + BVH *bvh=NULL; + CollisionTree *tree=NULL; + unsigned int i = 0; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + bvh->tree = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = numfaces; + + // we have no faces, we save seperate points + if(!mfaces) + { + bvh->numfaces = numverts; + } + + bvh->numverts = numverts; + bvh->xnew = (MVert *)MEM_callocN(sizeof(MVert)*numverts, "BVH MVert"); + + for(i = 0; i < numverts; i++) + VECCOPY(bvh->xnew[i].co, x[i]); + + bvh->x = MEM_dupallocN(bvh->xnew); + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); + + if (tree == NULL) + { + printf("bvh_build: Out of memory for nodes.\n"); + bvh_free(bvh); + return NULL; + } + + BLI_linklist_append(&bvh->tree, tree); + + return bvh_build(bvh, mfaces, numfaces); +} + // bvh_overlap - is it possbile for 2 bv's to collide ? int bvh_overlap(float *bv1, float *bv2) { @@ -730,7 +775,7 @@ int bvh_overlap(float *bv1, float *bv2) */ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list) { - int i = 0, ret = 0; + int i = 0, ret = 0, tempret = 0; if (bvh_overlap(tree1->bv, tree2->bv)) { @@ -759,8 +804,8 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree2->nodes[i] && bvh_traverse (tree1, tree2->nodes[i], collision_list)) - ret = 1; + if (tree2->nodes[i] && (tempret = bvh_traverse (tree1, tree2->nodes[i], collision_list))) + ret += tempret; } } } @@ -770,8 +815,8 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && bvh_traverse (tree1->nodes[i], tree2, collision_list)) - ret = 1; + if (tree1->nodes [i] && (tempret = bvh_traverse (tree1->nodes[i], tree2, collision_list))) + ret += tempret; } } } @@ -882,3 +927,27 @@ void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xn bvh_update(bvh, moving); } +void bvh_update_from_float3(BVH * bvh, float (*x)[3], unsigned int numverts, float (*xnew)[3], int moving) +{ + unsigned int i = 0; + + if(!bvh) + return; + + if(numverts!=bvh->numverts) + return; + + if(x) + { + for(i = 0; i < numverts; i++) + VECCOPY(bvh->x[i].co, x[i]); + } + + if(xnew) + { + for(i = 0; i < numverts; i++) + VECCOPY(bvh->xnew[i].co, xnew[i]); + } + + bvh_update(bvh, moving); +} diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index fcb56b56a5a..245b2fdc9b2 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4922,14 +4922,13 @@ static void clothModifier_updateDepgraph( Object *ob1= base->object; if(ob1 != ob) { - ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); - if(coll_clmd) - { - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - DagNode *curNode = dag_get_node(forest, ob1); - dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); - } + CollisionModifierData *collmd = (CollisionModifierData *)modifiers_findByType(ob1, eModifierType_Collision); + if(collmd) + { + DagNode *curNode = dag_get_node(forest, ob1); + + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + } } } diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index e1b1e3ce84a..2db2de7e183 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -43,9 +43,7 @@ typedef struct ClothVertex { int flags; /* General flags per vertex. */ - float v [3]; /* The velocity of the point. */ float xconst [3]; /* constrained position */ - float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ float mass; /* mass / weight of the vertex */ float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ @@ -152,13 +150,15 @@ typedef struct Cloth unsigned char old_solver_type; unsigned char pad2; short pad3; - struct CollisionTree *tree; /* collision tree for this cloth object */ + struct BVH *tree; /* collision tree for this cloth object */ struct MFace *mfaces; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ float (*x)[3]; /* The current position of all vertices.*/ float (*xold)[3]; /* The previous position of all vertices.*/ float (*current_x)[3]; /* The TEMPORARY current position of all vertices.*/ float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ + float (*v)[3]; /* the current velocity of all vertices */ + float (*current_v)[3]; } Cloth; From 67f8ca0b66f1138636978df34664d7c5aaa9ff4b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 28 Oct 2007 19:07:51 +0000 Subject: [PATCH 040/430] Fixed typo which resulted in jumping cloth when collisions where enabled, fixed collision list memory leak. Ready to put real collision detection/response in. --- source/blender/blenkernel/BKE_cloth.h | 3 +- source/blender/blenkernel/BKE_collisions.h | 2 +- source/blender/blenkernel/intern/implicit.c | 59 +++++++++++++-------- source/blender/blenkernel/intern/kdop.c | 33 +++++++----- 4 files changed, 61 insertions(+), 36 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index c0327ebe6db..dfb706c6d9a 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -46,9 +46,10 @@ struct MFace; struct DerivedMesh; // this is needed for inlining behaviour + #ifndef _WIN32 #define LINUX -#define DO_INLINE inline +#define DO_INLINE #else #define DO_INLINE #endif diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 6422ad65c0b..4271bc4fef3 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -96,7 +96,7 @@ BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], void bvh_free ( BVH *bvh ); // checks two bounding volume hierarchies for potential collisions and returns some list with those -int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list); +int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collision_list); // update bounding volumes, needs updated positions in bvh->x void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index adefcc32d52..34cba02522d 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -581,21 +581,32 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (* /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ // TODO: pragma below is wrong, correct it! - // #pragma omp parallel for shared(to,from, fLongVector) private(i) +#pragma omp parallel for shared(to,from, fLongVector) private(i) for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { + unsigned int row = from[i].r; + unsigned int column = from[i].c; + // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - to[from[i].c][0] += INPR(from[i].m[0],fLongVector[from[i].r]); - to[from[i].c][1] += INPR(from[i].m[1],fLongVector[from[i].r]); - to[from[i].c][2] += INPR(from[i].m[2],fLongVector[from[i].r]); + to[column][0] += INPR(from[i].m[0],fLongVector[row]); + to[column][1] += INPR(from[i].m[1],fLongVector[row]); + to[column][2] += INPR(from[i].m[2],fLongVector[row]); + } +#pragma omp parallel for shared(to,from, fLongVector) private(i) + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) + { + unsigned int row = from[i].r; + unsigned int column = from[i].c; // muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - to[from[i].r][0] += INPR(from[i].m[0],fLongVector[from[i].c]); - to[from[i].r][1] += INPR(from[i].m[1],fLongVector[from[i].c]); - to[from[i].r][2] += INPR(from[i].m[2],fLongVector[from[i].c]); + to[row][0] += INPR(from[i].m[0],fLongVector[column]); + to[row][1] += INPR(from[i].m[1],fLongVector[column]); + to[row][2] += INPR(from[i].m[2],fLongVector[column]); } + + } /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) @@ -1313,7 +1324,6 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float kd, ks; LinkNode *search = cloth->springs; - VECCOPY(gravity, clmd->sim_parms.gravity); mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */ @@ -1406,7 +1416,7 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto initdiag_bfmatrix(A, I); zero_lfvector(dV, numverts); - subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); @@ -1492,12 +1502,12 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // call collision function result = cloth_bvh_objcollision(clmd, step + dt, step, dt); - // copy corrected positions back to simulation - memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); - memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); - + // copy corrected positions back to simulation if(result) { + memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); + memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); + for(i = 0; i < numverts; i++) { VECCOPY(id->Vnew[i], cloth->current_v[i]); @@ -2161,6 +2171,8 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, Object *ob2 = NULL; BVH *bvh1 = NULL, *bvh2 = NULL; LinkNode *collision_list = NULL; + unsigned int i = 0; + int collisions = 0; if (!(((Cloth *)clmd->clothObject)->tree)) { @@ -2189,9 +2201,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, // check if there is a bounding volume hierarchy if (collmd->tree) - { - int collisions = 0; - + { bvh2 = collmd->tree; // update position + bvh of collision object @@ -2199,14 +2209,13 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, bvh_update_from_mvert(collmd->tree, collmd->current_x, collmd->numverts, NULL, 0); // fill collision list - collisions = bvh_traverse(bvh1->root, bvh2->root, collision_list); - - printf("Found %d collisions.\n", collisions); + collisions += bvh_traverse(bvh1->root, bvh2->root, &collision_list); // free collision list if(collision_list) { LinkNode *search = collision_list; + while(search) { CollisionPair *coll_pair = search->link; @@ -2220,7 +2229,15 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } } } - - return 0; + ////////////////////////////////////////////// + // update velocities + positions + ////////////////////////////////////////////// + for(i = 0; i < cloth->numverts; i++) + { + VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); + } + ////////////////////////////////////////////// + + return collisions; } diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 22129fcbc43..f9049fbcfcb 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -414,7 +414,7 @@ void bvh_calc_DOP_hull_static(BVH * bvh, CollisionTree **tri, int numfaces, floa tempBV[(2 * i)] = newminmax; if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) tempBV[(2 * i) + 1] = newminmax; - } + } } } } @@ -593,20 +593,20 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) if(bvh->mfaces) { - bvh->root->point_index[0] = mfaces[i].v1; - bvh->root->point_index[1] = mfaces[i].v2; - bvh->root->point_index[2] = mfaces[i].v3; + tree->point_index[0] = mfaces[i].v1; + tree->point_index[1] = mfaces[i].v2; + tree->point_index[2] = mfaces[i].v3; if(mfaces[i].v4) - bvh->root->point_index[3] = mfaces[i].v4; + tree->point_index[3] = mfaces[i].v4; else - bvh->root->point_index[3] = -1; + tree->point_index[3] = -1; } else { - bvh->root->point_index[0] = i; - bvh->root->point_index[1] = -1; - bvh->root->point_index[2] = -1; - bvh->root->point_index[3] = -1; + tree->point_index[0] = i; + tree->point_index[1] = -1; + tree->point_index[2] = -1; + tree->point_index[3] = -1; } tree->isleaf = 1; @@ -641,7 +641,7 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) // build root bvh bvh_calc_DOP_hull_from_faces(bvh, face_list, bvh->numfaces, bvh->root->bv); - + // This is the traversal function. bvh_div_env_node(bvh, bvh->root, face_list, 0, bvh->numfaces-1, 0, nlink); if (face_list) @@ -673,6 +673,7 @@ BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsig bvh->epsilon = epsilon; bvh->numfaces = numfaces; + bvh->mfaces = mfaces; // we have no faces, we save seperate points if(!mfaces) @@ -718,6 +719,7 @@ BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], bvh->epsilon = epsilon; bvh->numfaces = numfaces; + bvh->mfaces = mfaces; // we have no faces, we save seperate points if(!mfaces) @@ -729,9 +731,12 @@ BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], bvh->xnew = (MVert *)MEM_callocN(sizeof(MVert)*numverts, "BVH MVert"); for(i = 0; i < numverts; i++) + { VECCOPY(bvh->xnew[i].co, x[i]); + } bvh->x = MEM_dupallocN(bvh->xnew); + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); if (tree == NULL) @@ -773,7 +778,7 @@ int bvh_overlap(float *bv1, float *bv2) * every other triangle that doesn't require any realloc, but uses * much memory */ -int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision_list) +int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collision_list) { int i = 0, ret = 0, tempret = 0; @@ -786,6 +791,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision if (tree2->isleaf) { // save potential colliding triangles + CollisionPair *collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); VECCOPY(collpair->point_indexA, tree1->point_index); @@ -794,7 +800,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode *collision VECCOPY(collpair->point_indexB, tree2->point_index); collpair->point_indexB[3] = tree2->point_index[3]; - BLI_linklist_append(&collision_list, collpair); + BLI_linklist_append(&collision_list[0], collpair); return 1; } @@ -870,6 +876,7 @@ void bvh_update(BVH * bvh, int moving) { leaf->parent->traversed = 0; } + if(!moving) bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv); else From 01d19261bb315b841390a98cfe48b67e9991ed53 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 4 Nov 2007 21:02:37 +0000 Subject: [PATCH 041/430] Implemented simple selfcollisions with use of OpenMP (WITH_BF_OPENMP = 'true' - for NEW compilers like gcc 4.2.0 and MSVC prof) --- source/blender/blenkernel/BKE_cloth.h | 1 + source/blender/blenkernel/BKE_collisions.h | 2 + source/blender/blenkernel/intern/cloth.c | 58 ++++++++----- source/blender/blenkernel/intern/implicit.c | 96 +++++++++++++++++++-- source/blender/blenkernel/intern/kdop.c | 41 +++++---- source/blender/makesdna/DNA_cloth_types.h | 4 +- source/blender/src/buttons_object.c | 7 +- 7 files changed, 158 insertions(+), 51 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 1744b3f3393..42ea6db0430 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -149,6 +149,7 @@ typedef void ( *CM_COLLISION_SELF ) ( ClothModifierData *clmd, int step ); // only one available in the moment typedef enum { CM_IMPLICIT = 0, + CM_VERLET = 1, } CM_SOLVER_ID; diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index 4271bc4fef3..fa5956c5bec 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -88,6 +88,8 @@ CollisionPair; // forward declarations ///////////////////////////////////////////////// +// NOTICE: mvert-routines for building + update the BVH are the most native ones + // builds bounding volume hierarchy BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], unsigned int numverts, float epsilon); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index bb99709b73a..cc5c6a289cd 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -111,11 +111,11 @@ double tval() /* Our available solvers. */ // 255 is the magic reserved number, so NEVER try to put 255 solvers in here! // 254 = MAX! -static CM_SOLVER_DEF solvers [] = - { - { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, - // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, - }; +static CM_SOLVER_DEF solvers [] = +{ + { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, + // { "Implicit", CM_VERLET, verlet_init, verlet_solver, verlet_free }, +}; /* ********** cloth engine ******* */ /* Prototypes for internal functions. @@ -158,7 +158,8 @@ void cloth_init (ClothModifierData *clmd) clmd->coll_parms.self_friction = 5.0; clmd->coll_parms.friction = 10.0; clmd->coll_parms.loop_count = 1; - clmd->coll_parms.epsilon = 0.01f; + clmd->coll_parms.epsilon = 0.01; + clmd->coll_parms.selfepsilon = 0.1; /* These defaults are copied from softbody.c's * softbody_calc_forces() function. @@ -167,11 +168,11 @@ void cloth_init (ClothModifierData *clmd) clmd->sim_parms.eff_wind_scale = 250.0; // also from softbodies - clmd->sim_parms.maxgoal = 1.0f; - clmd->sim_parms.mingoal = 0.0f; - clmd->sim_parms.defgoal = 0.7f; - clmd->sim_parms.goalspring = 100.0f; - clmd->sim_parms.goalfrict = 0.0f; + clmd->sim_parms.maxgoal = 1.0; + clmd->sim_parms.mingoal = 0.0; + clmd->sim_parms.defgoal = 0.7; + clmd->sim_parms.goalspring = 100.0; + clmd->sim_parms.goalfrict = 0.0; clmd->sim_parms.cache = NULL; } @@ -519,6 +520,7 @@ void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) memcpy ( clmd->clothObject->current_xold, frame->current_xold, sizeof ( float ) *frame->numverts * 3); + // TODO: temp off implicit_set_positions ( clmd ); return; @@ -621,32 +623,37 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) if ( frame->time >= newtime ) { + if ( frame->verts ) { MEM_freeN ( frame->verts ); } + if ( frame->x ) { MEM_freeN ( frame->x ); } + if ( frame->xold ) { MEM_freeN ( frame->xold ); } + if ( frame->v ) { MEM_freeN ( frame->v ); } + if ( frame->current_xold ) { MEM_freeN ( frame->current_xold ); } + MEM_freeN ( frame ); lastsearch->next = search->next; MEM_freeN ( search ); search = lastsearch->next; - lastsearch->next = NULL; } else { @@ -657,6 +664,7 @@ void cloth_cache_free ( ClothModifierData *clmd, float time ) if ( time <= 1.0 ) { + BLI_linklist_free(clmd->sim_parms.cache, NULL); clmd->sim_parms.cache = NULL; } @@ -852,7 +860,7 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the faces. if ( cloth->mfaces != NULL ) MEM_freeN ( cloth->mfaces ); - + // Free the verts. if ( cloth->x != NULL ) MEM_freeN ( cloth->x ); @@ -860,7 +868,7 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the verts. if ( cloth->xold != NULL ) MEM_freeN ( cloth->xold ); - + // Free the verts. if ( cloth->v != NULL ) MEM_freeN ( cloth->v ); @@ -876,7 +884,7 @@ void cloth_free_modifier (ClothModifierData *clmd) // Free the verts. if ( cloth->current_v != NULL ) MEM_freeN ( cloth->current_v ); - + cloth->verts = NULL; cloth->numverts = -1; @@ -902,6 +910,13 @@ void cloth_free_modifier (ClothModifierData *clmd) if(cloth->tree) bvh_free((BVH *)cloth->tree); + // free BVH self collision tree + if(cloth->selftree) + bvh_free((BVH *)cloth->selftree); + + if(cloth->edgehash) + BLI_edgehash_free ( cloth->edgehash, NULL ); + MEM_freeN (cloth); clmd->clothObject = NULL; } @@ -1019,6 +1034,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if (clmd->clothObject) { clmd->clothObject->old_solver_type = 255; + clmd->clothObject->edgehash = NULL; } else if (clmd->clothObject == NULL) { @@ -1058,12 +1074,12 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) clmd->clothObject->verts [i].goal= clmd->sim_parms.defgoal; else - clmd->clothObject->verts [i].goal= 0.0f; + clmd->clothObject->verts [i].goal= 0.0; clmd->clothObject->verts [i].flags = 0; VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->x[i]); VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); - VecMulf(clmd->clothObject->v[i], 0.0f); + VecMulf(clmd->clothObject->v[i], 0.0); clmd->clothObject->verts [i].impulse_count = 0; VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); @@ -1078,7 +1094,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d solvers [clmd->sim_parms.solver_type].init (ob, clmd); clmd->clothObject->tree = bvh_build_from_float3(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms.epsilon); - + + clmd->clothObject->selftree = bvh_build_from_float3(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms.selfepsilon); + // cloth_cache_set_frame(clmd, 1); } @@ -1346,8 +1364,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) } if ( edgelist ) MEM_freeN ( edgelist ); - - BLI_edgehash_free ( edgehash, NULL ); + + cloth->edgehash = edgehash; return 1; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 34cba02522d..a5777b991eb 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -46,8 +46,9 @@ #include "DNA_lattice_types.h" #include "DNA_scene_types.h" #include "DNA_modifier_types.h" -#include "BLI_blenlib.h" #include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_edgehash.h" #include "BLI_threads.h" #include "BKE_collisions.h" #include "BKE_curve.h" @@ -62,7 +63,6 @@ #include "BKE_global.h" #include "BIF_editdeform.h" - #ifdef _WIN32 #include static LARGE_INTEGER _itstart, _itend; @@ -581,7 +581,7 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (* /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ // TODO: pragma below is wrong, correct it! -#pragma omp parallel for shared(to,from, fLongVector) private(i) +// #pragma omp parallel for shared(to,from, fLongVector) private(i) for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { unsigned int row = from[i].r; @@ -593,7 +593,7 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (* to[column][1] += INPR(from[i].m[1],fLongVector[row]); to[column][2] += INPR(from[i].m[2],fLongVector[row]); } -#pragma omp parallel for shared(to,from, fLongVector) private(i) +// #pragma omp parallel for shared(to,from, fLongVector) private(i) for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { unsigned int row = from[i].r; @@ -1505,6 +1505,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // copy corrected positions back to simulation if(result) { + printf("result: %d\n", result); + memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); @@ -1532,6 +1534,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); } + } else { @@ -1544,7 +1547,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // V = Vnew; cp_lfvector(id->V, id->Vnew, numverts); - + step += dt; if(effectors) pdEndEffectors(effectors); @@ -2171,8 +2174,9 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, Object *ob2 = NULL; BVH *bvh1 = NULL, *bvh2 = NULL; LinkNode *collision_list = NULL; - unsigned int i = 0; - int collisions = 0; + unsigned int i = 0, j = 0; + int collisions = 0, count = 0; + float (*current_x)[3]; if (!(((Cloth *)clmd->clothObject)->tree)) { @@ -2186,7 +2190,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// - + /* // update cloth bvh bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) @@ -2238,6 +2242,80 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); } ////////////////////////////////////////////// + */ + // Test on *simple* selfcollisions + collisions = 1; + count = 0; + current_x = cloth->current_x; // needed for openMP - return collisions; +#pragma omp parallel for private(i,j, collisions) shared(current_x) + for(count = 0; count < 6; count++) + { + collisions = 0; + + for(i = 0; i < cloth->numverts; i++) + { + for(j = i + 1; j < cloth->numverts; j++) + { + float temp[3]; + float length = 0; + float mindistance = cloth->selftree->epsilon; + + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + if((cloth->verts [i].goal >= SOFTGOALSNAP) + && (cloth->verts [j].goal >= SOFTGOALSNAP)) + { + continue; + } + } + + // check for adjacent points + if(BLI_edgehash_haskey ( cloth->edgehash, i, j )) + { + continue; + } + + VECSUB(temp, current_x[i], current_x[j]); + + length = Normalize(temp); + + if(length < mindistance) + { + float correction = mindistance - length; + + if(cloth->verts [i].goal >= SOFTGOALSNAP) + { + VecMulf(temp, -correction); + VECADD(current_x[j], current_x[j], temp); + } + else if(cloth->verts [j].goal >= SOFTGOALSNAP) + { + VecMulf(temp, correction); + VECADD(current_x[i], current_x[i], temp); + } + else + { + VecMulf(temp, -correction*0.5); + VECADD(current_x[j], current_x[j], temp); + + VECSUB(current_x[i], current_x[i], temp); + } + + collisions = 1; + } + } + } + } + + ////////////////////////////////////////////// + // SELFCOLLISIONS: update velocities + ////////////////////////////////////////////// + for(i = 0; i < cloth->numverts; i++) + { + VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); + } + ////////////////////////////////////////////// + + return 1; } diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index f9049fbcfcb..f39d5465b87 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -780,8 +780,7 @@ int bvh_overlap(float *bv1, float *bv2) */ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collision_list) { - int i = 0, ret = 0, tempret = 0; - + int i = 0, ret = 0; if (bvh_overlap(tree1->bv, tree2->bv)) { // Check if this node in the first tree is a leaf @@ -790,19 +789,25 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // Check if this node in the second tree a leaf if (tree2->isleaf) { - // save potential colliding triangles + CollisionPair *collpair = NULL; - CollisionPair *collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - - VECCOPY(collpair->point_indexA, tree1->point_index); - collpair->point_indexA[3] = tree1->point_index[3]; - - VECCOPY(collpair->point_indexB, tree2->point_index); - collpair->point_indexB[3] = tree2->point_index[3]; - - BLI_linklist_append(&collision_list[0], collpair); - - return 1; + if(tree1 != tree2) // do not collide same points + { + // save potential colliding triangles + collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); + + VECCOPY(collpair->point_indexA, tree1->point_index); + collpair->point_indexA[3] = tree1->point_index[3]; + + VECCOPY(collpair->point_indexB, tree2->point_index); + collpair->point_indexB[3] = tree2->point_index[3]; + + BLI_linklist_append(&collision_list[0], collpair); + + return 1; + } + else + return 0; } else { @@ -810,8 +815,8 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree2->nodes[i] && (tempret = bvh_traverse (tree1, tree2->nodes[i], collision_list))) - ret += tempret; + if (tree2->nodes[i] && (bvh_traverse (tree1, tree2->nodes[i], collision_list))) + ret = 1; } } } @@ -821,8 +826,8 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && (tempret = bvh_traverse (tree1->nodes[i], tree2, collision_list))) - ret += tempret; + if (tree1->nodes [i] && (bvh_traverse (tree1->nodes[i], tree2, collision_list))) + ret = 1; } } } diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 2db2de7e183..0edfb64e92f 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -125,7 +125,7 @@ typedef struct CollisionSettings short collision_type; /* which collision system is used. */ short loop_count; /* How many iterations for the collision loop. */ int flags; /* collision flags defined in BKE_cloth.h */ - int pad; + float selfepsilon; } CollisionSettings; @@ -151,6 +151,7 @@ typedef struct Cloth unsigned char pad2; short pad3; struct BVH *tree; /* collision tree for this cloth object */ + struct BVH *selftree; /* self collision tree for this cloth object */ struct MFace *mfaces; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ float (*x)[3]; /* The current position of all vertices.*/ @@ -159,6 +160,7 @@ typedef struct Cloth float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ float (*v)[3]; /* the current velocity of all vertices */ float (*current_v)[3]; + struct EdgeHash *edgehash; // used for fast checking adjacent points } Cloth; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 0754aa62016..474236fd5b2 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3329,12 +3329,13 @@ static void object_panel_cloth_III(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,160,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,140,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefBut(block, LABEL, 0, "",160,140,150,20, NULL, 0.0, 0, 0, 0, ""); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Selfcoll balls:", 10,120,150,20, &clmd->coll_parms.selfepsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between two selfcollision points"); } else uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); From 8c0968a01361af5f68a3ac83f552777eeb28aa49 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 4 Nov 2007 22:11:00 +0000 Subject: [PATCH 042/430] Kicked my own cache code, will use point cache in the near feature --- source/blender/blenkernel/BKE_cloth.h | 2 +- source/blender/blenkernel/intern/cloth.c | 286 +---------------------- source/blender/src/buttons_object.c | 4 +- 3 files changed, 10 insertions(+), 282 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 42ea6db0430..dd62a24a036 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -116,7 +116,7 @@ typedef enum // needed for buttons_object.c -void cloth_cache_free ( ClothModifierData *clmd, float time ); +// void cloth_cache_free ( ClothModifierData *clmd, float time ); void cloth_free_modifier ( ClothModifierData *clmd ); // needed for cloth.c diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index cc5c6a289cd..360bf421d71 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -403,278 +403,6 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) return NULL; } - -int cloth_cache_search_frame ( ClothModifierData *clmd, float time ) -{ - Frame *frame = NULL; - LinkNode *search = NULL; - - if ( clmd->clothObject ) - { - search = clmd->sim_parms.cache; - - while ( search ) - { - frame = ( Frame * ) search->link; - - if ( frame ) - { - if ( frame->time == time ) - return 1; - } - - search = search->next; - } - } - - return 0; - -} - -float cloth_cache_last_frame ( ClothModifierData *clmd ) -{ - Frame *frame = NULL; - LinkNode *search = NULL; - float time = 0; - - if ( clmd->clothObject ) - { - search = clmd->sim_parms.cache; - - while ( search ) - { - frame = ( Frame * ) search->link; - - if ( frame ) - { - if ( frame->time > time ) - time = frame->time; - } - } - } - return time; -} - -float cloth_cache_first_frame ( ClothModifierData *clmd ) -{ - Frame *frame = NULL; - LinkNode *search = NULL; - float time = -1.0; - - if ( clmd->clothObject ) - { - search = clmd->sim_parms.cache; - - while ( search ) - { - frame = ( Frame * ) search->link; - - if ( frame ) - { - if ( time < 0.0 ) - time = frame->time; - else - { - if ( frame->time < time ) - time = frame->time; - } - } - } - } - return time; -} - -void cloth_cache_get_frame ( ClothModifierData *clmd, float time ) -{ - Frame *frame = NULL; - LinkNode *search = NULL; - float newtime = time + clmd->sim_parms.preroll; - - if ( clmd->clothObject ) - { - search = clmd->sim_parms.cache; - - while ( search ) - { - frame = ( Frame * ) search->link; - - if ( frame ) - { - if ( frame->time == newtime ) - { - // something changed, free cache! - if ( clmd->clothObject->numverts != frame->numverts ) - { - cloth_cache_free ( clmd, 0 ); - printf ( "clmd->clothObject->numverts != frame->numverts\n" ); - return; - } - - memcpy ( clmd->clothObject->verts, frame->verts, sizeof ( ClothVertex ) *frame->numverts ); - - memcpy ( clmd->clothObject->x, frame->x, sizeof ( float ) *frame->numverts * 3); - - memcpy ( clmd->clothObject->xold, frame->xold, sizeof ( float ) *frame->numverts * 3); - - memcpy ( clmd->clothObject->v, frame->v, sizeof ( float ) *frame->numverts * 3); - - memcpy ( clmd->clothObject->current_xold, frame->current_xold, sizeof ( float ) *frame->numverts * 3); - - // TODO: temp off - implicit_set_positions ( clmd ); - - return; - } - } - - search = search->next; - } - } -} - -void cloth_cache_set_frame ( ClothModifierData *clmd, float time ) -{ - Frame *frame = NULL; - - if ( clmd->clothObject ) - { - frame = ( Frame * ) MEM_callocN ( sizeof ( Frame ), "cloth_cache_frame" ); - - if ( frame ) - { - frame->time = time; - frame->numverts = clmd->clothObject->numverts; - frame->verts = MEM_dupallocN ( clmd->clothObject->verts ); - - if ( !frame->verts ) - { - MEM_freeN ( frame ); - return; - } - - frame->x = MEM_dupallocN ( clmd->clothObject->x ); - - if ( !frame->x ) - { - MEM_freeN ( frame->verts ); - MEM_freeN ( frame ); - return; - } - - frame->xold = MEM_dupallocN ( clmd->clothObject->xold ); - - if ( !frame->xold ) - { - MEM_freeN ( frame->verts ); - MEM_freeN ( frame->x ); - MEM_freeN ( frame ); - return; - } - - frame->v = MEM_dupallocN ( clmd->clothObject->v ); - - if ( !frame->v ) - { - MEM_freeN ( frame->verts ); - MEM_freeN ( frame->x ); - MEM_freeN ( frame->xold ); - MEM_freeN ( frame ); - return; - } - - frame->current_xold= MEM_dupallocN ( clmd->clothObject->current_xold ); - - if ( !frame->current_xold ) - { - MEM_freeN ( frame->verts ); - MEM_freeN ( frame->x ); - MEM_freeN ( frame->xold ); - MEM_freeN ( frame->v ); - MEM_freeN ( frame ); - return; - } - - BLI_linklist_append ( &clmd->sim_parms.cache, frame ); - - } - } - -} - -// free cloth cache -void cloth_cache_free ( ClothModifierData *clmd, float time ) -{ - Frame *frame = NULL; - LinkNode *search = NULL, *lastsearch = NULL; - float newtime = time + clmd->sim_parms.preroll; - - if ( time <= 2.0 ) - newtime = time; - - if ( clmd->clothObject ) - { - if ( clmd->sim_parms.cache ) - { - lastsearch = search = clmd->sim_parms.cache; - - while ( search ) - { - frame = ( Frame * ) search->link; - - if ( frame->time >= newtime ) - { - - if ( frame->verts ) - { - MEM_freeN ( frame->verts ); - } - - if ( frame->x ) - { - MEM_freeN ( frame->x ); - } - - if ( frame->xold ) - { - MEM_freeN ( frame->xold ); - } - - if ( frame->v ) - { - MEM_freeN ( frame->v ); - } - - if ( frame->current_xold ) - { - MEM_freeN ( frame->current_xold ); - } - - MEM_freeN ( frame ); - - lastsearch->next = search->next; - MEM_freeN ( search ); - search = lastsearch->next; - } - else - { - lastsearch = search; - search = search->next; - } - } - - if ( time <= 1.0 ) - { - BLI_linklist_free(clmd->sim_parms.cache, NULL); - clmd->sim_parms.cache = NULL; - } - - if ( time <= 2.0 ) - clmd->sim_parms.preroll = 0; - } - } -} - - /** * cloth_deform_verts - simulates one step, framenr is in frames. * @@ -773,7 +501,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // Insure we have a clmd->clothObject, in case allocation failed. if (clmd->clothObject != NULL) { - if(!cloth_cache_search_frame(clmd, framenr)) + // if(!cloth_cache_search_frame(clmd, framenr)) { verts = cloth->verts; @@ -798,13 +526,13 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d printf("Cloth simulation time: %f\n", tval()); - cloth_cache_set_frame(clmd, framenr); + // cloth_cache_set_frame(clmd, framenr); - } + }/* else // just retrieve the cached frame { cloth_cache_get_frame(clmd, framenr); - } + }*/ // Copy the result back to the object. cloth_to_object (ob, result, clmd); @@ -813,7 +541,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); } - } + }/* else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) { if ( ( clmd->clothObject != NULL ) && ( clmd->sim_parms.cache ) ) @@ -824,7 +552,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_to_object (ob, result, clmd); } } - } + }*/ return result; } @@ -840,7 +568,7 @@ void cloth_free_modifier (ClothModifierData *clmd) cloth = clmd->clothObject; // free our frame cache - cloth_cache_free(clmd, 0); + // cloth_cache_free(clmd, 0); /* Calls the solver and collision frees first as they * might depend on data in clmd->clothObject. */ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 474236fd5b2..45a1502840c 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2181,7 +2181,7 @@ void do_object_panels(unsigned short event) CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - cloth_cache_free(clmd, 2); + // cloth_cache_free(clmd, 2); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } @@ -2192,7 +2192,7 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - cloth_cache_free(clmd, MAX2(2.0,G.scene->r.cfra+1.0)); + // cloth_cache_free(clmd, MAX2(2.0,G.scene->r.cfra+1.0)); allqueue(REDRAWBUTSOBJECT, 0); } } From 0a1be3e2cee4375c27155a8fe090542b8e25c7ed Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 5 Nov 2007 19:28:38 +0000 Subject: [PATCH 043/430] Fun commit: I put some 3-liner verlet integrator in, to activate it, set clmd->sim_parms.solver_type in cloth_init to 1 - bugs in there --- source/blender/blenkernel/BKE_cloth.h | 8 ++++++++ source/blender/blenkernel/intern/cloth.c | 6 +++--- source/blender/blenkernel/intern/implicit.c | 21 ++++----------------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index dd62a24a036..783faf42e18 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -171,6 +171,11 @@ int implicit_init ( Object *ob, ClothModifierData *clmd ); int implicit_free ( ClothModifierData *clmd ); int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); +/* explicit verlet simulator */ +int verlet_init ( Object *ob, ClothModifierData *clmd ); +int verlet_free ( ClothModifierData *clmd ); +int verlet_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); + /* used for caching in implicit.c */ typedef struct Frame { @@ -227,5 +232,8 @@ typedef struct FaceCollPair } FaceCollPair; +// function definitions from implicit.c +DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar); + #endif diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 360bf421d71..4be365fdc86 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -114,7 +114,7 @@ double tval() static CM_SOLVER_DEF solvers [] = { { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, - // { "Implicit", CM_VERLET, verlet_init, verlet_solver, verlet_free }, + { "Verlet", CM_VERLET, verlet_init, verlet_solver, verlet_free }, }; /* ********** cloth engine ******* */ @@ -504,7 +504,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // if(!cloth_cache_search_frame(clmd, framenr)) { verts = cloth->verts; - + /* // Force any pinned verts to their constrained location. for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { @@ -515,7 +515,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d VECCOPY ( verts->xconst, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } - + */ tstart(); /* Call the solver. */ diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index a5777b991eb..638f7350822 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -87,10 +87,6 @@ double itval() } #else #include -// intrinsics need better compile flag checking -// #include -// #include -// #include static struct timeval _itstart, _itend; static struct timezone itz; @@ -110,14 +106,7 @@ double itval() return t2-t1; } #endif -/* -#define C99 -#ifdef C99 -#defineDO_INLINE inline -#else -#defineDO_INLINE static -#endif -*/ + struct Cloth; ////////////////////////////////////////// @@ -1502,11 +1491,9 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // call collision function result = cloth_bvh_objcollision(clmd, step + dt, step, dt); - // copy corrected positions back to simulation + // copy corrected positions back to simulation if(result) { - printf("result: %d\n", result); - memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); @@ -2284,12 +2271,12 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, { float correction = mindistance - length; - if(cloth->verts [i].goal >= SOFTGOALSNAP) + if((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal >= SOFTGOALSNAP)) { VecMulf(temp, -correction); VECADD(current_x[j], current_x[j], temp); } - else if(cloth->verts [j].goal >= SOFTGOALSNAP) + else if((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [j].goal >= SOFTGOALSNAP)) { VecMulf(temp, correction); VECADD(current_x[i], current_x[i], temp); From 873a26ff841e64c9b061779fa09b9461bb4a6681 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 5 Nov 2007 19:29:14 +0000 Subject: [PATCH 044/430] best part (file) was missing --- source/blender/blenkernel/intern/verlet.c | 170 ++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 source/blender/blenkernel/intern/verlet.c diff --git a/source/blender/blenkernel/intern/verlet.c b/source/blender/blenkernel/intern/verlet.c new file mode 100644 index 00000000000..71001fa92a5 --- /dev/null +++ b/source/blender/blenkernel/intern/verlet.c @@ -0,0 +1,170 @@ +/* implicit.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): none yet. +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ +#include +#include +#include +#include +#include "MEM_guardedalloc.h" +/* types */ +#include "DNA_curve_types.h" +#include "DNA_object_types.h" +#include "DNA_object_force.h" +#include "DNA_cloth_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_modifier_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_lattice_types.h" +#include "DNA_scene_types.h" +#include "DNA_modifier_types.h" +#include "BLI_arithb.h" +#include "BLI_blenlib.h" +#include "BLI_edgehash.h" +#include "BLI_threads.h" +#include "BKE_collisions.h" +#include "BKE_curve.h" +#include "BKE_displist.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_key.h" +#include "BKE_object.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" +#include "BKE_utildefines.h" +#include "BKE_global.h" +#include "BIF_editdeform.h" + +struct Cloth; + +int verlet_init ( Object *ob, ClothModifierData *clmd ) +{ + return 1; +} + +int verlet_free ( ClothModifierData *clmd ) +{ + return 1; +} + +void integrate ( ClothModifierData *clmd, float dt ) +{ + Cloth *cloth = clmd->clothObject; + unsigned int i = 0; + + // temporary vectors + float temp[3], velocity[3], force[3]; + + mul_fvector_S( force, clmd->sim_parms.gravity, dt*dt ); + + // iterate through all control points + for(i = 0; i < cloth->numverts; i++) + { + if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) + { + // save current control point location + VECCOPY ( temp, cloth->x[i] ); + + // update control point by the formula + // x += (x - old_x)*dampingFactor + force*timeStep^2 + VECSUB ( velocity, cloth->x[i], cloth->xold[i] ); + VECSUBMUL( force, velocity, -clmd->sim_parms.Cvi * 0.01f* dt * dt); + VecMulf(velocity, 0.99); + VECADD ( cloth->x[i], cloth->x[i], velocity ); + VECADD ( cloth->x[i], cloth->x[i], force ); + + // store old control point location + VECCOPY ( cloth->xold[i], temp ); + } + } +} + +void satisfyconstraints(ClothModifierData *clmd) +{ + float delta[3]; + Cloth *cloth = clmd->clothObject; + unsigned int i = 0; + + for(i = 0; i < 5; i++) + { + // calculate spring forces + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + float temp = 0; + float restlen2 = spring->restlen * spring->restlen; + float len2 = 0, len = 0; + + VECSUB(delta, cloth->x[spring->kl], cloth->x[spring->ij]); + len = sqrt(INPR(delta, delta)); + + if(spring->type != CLOTH_SPRING_TYPE_BENDING) + { + temp = (len - spring->restlen)/len; + + mul_fvector_S(delta, delta, temp*0.5); + + // check if vertex is pinned + if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [spring->ij].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) + VECADD(cloth->x[spring->ij], cloth->x[spring->ij], delta); + + // check if vertex is pinned + if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [spring->kl].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) + VECSUB(cloth->x[spring->kl], cloth->x[spring->kl], delta); + } + + search = search->next; + } + } +} + +int verlet_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ) +{ + float dt = 0.01; + float step = 0; + + while(step < 1.0f) + { + integrate(clmd, dt); + satisfyconstraints(clmd); + + step+= dt; + } + + return 1; +} + + + + + + From 47c62453db41003b8a3959f102d2fa344cf0ad97 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 6 Nov 2007 02:30:53 +0000 Subject: [PATCH 045/430] Bugfix for wrong springs (resulted in weird behaviour), Implemented two speedups: One for small bending/wrinkle values (1/3 speedup), another speedup is that cloth get automatically in sleep mode but wakes up every frame ([quality-1]/quality speedup) --- source/blender/blenkernel/BKE_cloth.h | 4 +- source/blender/blenkernel/intern/cloth.c | 20 +-- source/blender/blenkernel/intern/implicit.c | 96 +++++++++-- source/blender/blenkernel/intern/verlet.c | 170 -------------------- source/blender/makesdna/DNA_cloth_types.h | 2 + 5 files changed, 101 insertions(+), 191 deletions(-) delete mode 100644 source/blender/blenkernel/intern/verlet.c diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 783faf42e18..8be27ace346 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -86,7 +86,9 @@ typedef enum CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ), // object is only collision object, no cloth simulation is done CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ), // true if tearing is enabled - CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled + CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), + CLOTH_SIMSETTINGS_FLAG_BIG_FORCE = ( 1 << 6 ), // true if we have big spring force for bending + CLOTH_SIMSETTINGS_FLAG_SLEEP = ( 1 << 7 ), // true if we let the cloth go to sleep } CLOTH_SIMSETTINGS_FLAGS; /* SPRING FLAGS */ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4be365fdc86..eba11bfedda 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -114,7 +114,7 @@ double tval() static CM_SOLVER_DEF solvers [] = { { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, - { "Verlet", CM_VERLET, verlet_init, verlet_solver, verlet_free }, + // { "Verlet", CM_VERLET, verlet_init, verlet_solver, verlet_free }, }; /* ********** cloth engine ******* */ @@ -504,8 +504,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // if(!cloth_cache_search_frame(clmd, framenr)) { verts = cloth->verts; - /* + // Force any pinned verts to their constrained location. + // has to be commented for verlet for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { // Save the previous position. @@ -515,7 +516,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d VECCOPY ( verts->xconst, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } - */ + tstart(); /* Call the solver. */ @@ -1031,8 +1032,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); - spring->ij = mface[i].v1; - spring->kl = mface[i].v3; + spring->ij = mface[i].v2; + spring->kl = mface[i].v4; VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; @@ -1045,7 +1046,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) node = node2; } } - + // bending springs search2 = cloth->springs; for ( i = struct_springs; i < struct_springs+shear_springs; i++ ) @@ -1083,9 +1084,10 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) } search2 = search2->next; } - - cloth->numsprings = struct_springs + shear_springs + bend_springs; - + + cloth->numspringssave = cloth->numsprings = struct_springs + shear_springs + bend_springs; + cloth->numothersprings = struct_springs + shear_springs; + for ( i = 0; i < numverts; i++ ) { BLI_linklist_free ( edgelist[i],NULL ); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 638f7350822..091a0580232 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -812,6 +812,31 @@ int implicit_free (ClothModifierData *clmd) return 1; } +void cloth_bending_mode(ClothModifierData *clmd, int enabled) +{ + Cloth *cloth = clmd->clothObject; + Implicit_Data *id; + + if(cloth) + { + id = cloth->implicit; + + if(id) + { + if(enabled) + { + cloth->numsprings = cloth->numspringssave; + } + else + { + cloth->numsprings = cloth->numothersprings; + } + + id->A[0].scount = id->dFdV[0].scount = id->dFdX[0].scount = id->P[0].scount = id->Pinv[0].scount = id->bigI[0].scount = cloth->numsprings; + } + } +} + DO_INLINE float fb(float length, float L) { float x = length/L; @@ -1223,37 +1248,48 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { if(length < L) { + // clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + s->flags |= CLOTH_SPRING_FLAG_NEEDED; k = clmd->sim_parms.bending; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); - + + if(INPR(bending_force,bending_force) > 0.13*0.13) + { + clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + } + dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); } } } -DO_INLINE void cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) { if(s->flags & CLOTH_SPRING_FLAG_NEEDED) { + VECADD(lF[s->ij], lF[s->ij], s->f); + VECSUB(lF[s->kl], lF[s->kl], s->f); + if(s->type != CLOTH_SPRING_TYPE_BENDING) { sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } - - VECADD(lF[s->ij], lF[s->ij], s->f); - VECSUB(lF[s->kl], lF[s->kl], s->f); - + else if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) + return 0; + sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); - } + } + + return 1; } DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) @@ -1386,15 +1422,34 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec search = search->next; } + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE) + { + if(cloth->numspringssave != cloth->numsprings) + { + cloth_bending_mode(clmd, 1); + } + } + else + { + if(cloth->numspringssave == cloth->numsprings) + { + cloth_bending_mode(clmd, 0); + } + } + // apply spring forces search = cloth->springs; while(search) { // only handle active springs // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) - cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); + if(!cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX)) + break; search = search->next; } + + clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + } void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv) @@ -1438,6 +1493,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase float dt = 1.0f / clmd->sim_parms.stepsPerFrame; Implicit_Data *id = cloth->implicit; int result = 0; + float force = 0, lastforce = 0; + lfVector *dx; if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { @@ -1457,10 +1514,27 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); - add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); + // check for sleeping + if(!(clmd->coll_parms.flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) + { + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); + + add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); + } + + dx = create_lfvector(numverts); + sub_lfvector_lfvector(dx, id->Xnew, id->X, numverts); + force = dot_lfvector(dx, dx, numverts); + del_lfvector(dx); + + if((force < 0.00001) && (lastforce >= force)) + clmd->coll_parms.flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; + else if((lastforce*2 < force)) + clmd->coll_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; + + lastforce = force; if(clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { diff --git a/source/blender/blenkernel/intern/verlet.c b/source/blender/blenkernel/intern/verlet.c deleted file mode 100644 index 71001fa92a5..00000000000 --- a/source/blender/blenkernel/intern/verlet.c +++ /dev/null @@ -1,170 +0,0 @@ -/* implicit.c -* -* -* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. The Blender -* Foundation also sells licenses for use in proprietary software under -* the Blender License. See http://www.blender.org/BL/ for information -* about this. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) Blender Foundation -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL/BL DUAL LICENSE BLOCK ***** -*/ -#include -#include -#include -#include -#include "MEM_guardedalloc.h" -/* types */ -#include "DNA_curve_types.h" -#include "DNA_object_types.h" -#include "DNA_object_force.h" -#include "DNA_cloth_types.h" -#include "DNA_key_types.h" -#include "DNA_mesh_types.h" -#include "DNA_modifier_types.h" -#include "DNA_meshdata_types.h" -#include "DNA_lattice_types.h" -#include "DNA_scene_types.h" -#include "DNA_modifier_types.h" -#include "BLI_arithb.h" -#include "BLI_blenlib.h" -#include "BLI_edgehash.h" -#include "BLI_threads.h" -#include "BKE_collisions.h" -#include "BKE_curve.h" -#include "BKE_displist.h" -#include "BKE_effect.h" -#include "BKE_global.h" -#include "BKE_key.h" -#include "BKE_object.h" -#include "BKE_cloth.h" -#include "BKE_modifier.h" -#include "BKE_utildefines.h" -#include "BKE_global.h" -#include "BIF_editdeform.h" - -struct Cloth; - -int verlet_init ( Object *ob, ClothModifierData *clmd ) -{ - return 1; -} - -int verlet_free ( ClothModifierData *clmd ) -{ - return 1; -} - -void integrate ( ClothModifierData *clmd, float dt ) -{ - Cloth *cloth = clmd->clothObject; - unsigned int i = 0; - - // temporary vectors - float temp[3], velocity[3], force[3]; - - mul_fvector_S( force, clmd->sim_parms.gravity, dt*dt ); - - // iterate through all control points - for(i = 0; i < cloth->numverts; i++) - { - if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) - { - // save current control point location - VECCOPY ( temp, cloth->x[i] ); - - // update control point by the formula - // x += (x - old_x)*dampingFactor + force*timeStep^2 - VECSUB ( velocity, cloth->x[i], cloth->xold[i] ); - VECSUBMUL( force, velocity, -clmd->sim_parms.Cvi * 0.01f* dt * dt); - VecMulf(velocity, 0.99); - VECADD ( cloth->x[i], cloth->x[i], velocity ); - VECADD ( cloth->x[i], cloth->x[i], force ); - - // store old control point location - VECCOPY ( cloth->xold[i], temp ); - } - } -} - -void satisfyconstraints(ClothModifierData *clmd) -{ - float delta[3]; - Cloth *cloth = clmd->clothObject; - unsigned int i = 0; - - for(i = 0; i < 5; i++) - { - // calculate spring forces - LinkNode *search = cloth->springs; - while(search) - { - ClothSpring *spring = search->link; - float temp = 0; - float restlen2 = spring->restlen * spring->restlen; - float len2 = 0, len = 0; - - VECSUB(delta, cloth->x[spring->kl], cloth->x[spring->ij]); - len = sqrt(INPR(delta, delta)); - - if(spring->type != CLOTH_SPRING_TYPE_BENDING) - { - temp = (len - spring->restlen)/len; - - mul_fvector_S(delta, delta, temp*0.5); - - // check if vertex is pinned - if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [spring->ij].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) - VECADD(cloth->x[spring->ij], cloth->x[spring->ij], delta); - - // check if vertex is pinned - if(((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [spring->kl].goal < SOFTGOALSNAP)) || !(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL)) - VECSUB(cloth->x[spring->kl], cloth->x[spring->kl], delta); - } - - search = search->next; - } - } -} - -int verlet_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ) -{ - float dt = 0.01; - float step = 0; - - while(step < 1.0f) - { - integrate(clmd, dt); - satisfyconstraints(clmd); - - step+= dt; - } - - return 1; -} - - - - - - diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 0edfb64e92f..4d75f7a3778 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -161,6 +161,8 @@ typedef struct Cloth float (*v)[3]; /* the current velocity of all vertices */ float (*current_v)[3]; struct EdgeHash *edgehash; // used for fast checking adjacent points + unsigned int numothersprings; + unsigned int numspringssave; } Cloth; From cbc941e342478df6126068f84044d26a1b1aa4e1 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 6 Nov 2007 09:44:09 +0000 Subject: [PATCH 046/430] Merged pointcache from particles branch, but is not used in the moment --- source/blender/blenkernel/BKE_pointcache.h | 41 +++++ source/blender/blenkernel/intern/modifier.c | 111 ++++++++++++ source/blender/blenkernel/intern/pointcache.c | 159 ++++++++++++++++++ source/blender/makesdna/DNA_modifier_types.h | 11 ++ source/blender/src/buttons_editing.c | 23 +++ 5 files changed, 345 insertions(+) create mode 100644 source/blender/blenkernel/BKE_pointcache.h create mode 100644 source/blender/blenkernel/intern/pointcache.c diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h new file mode 100644 index 00000000000..9359177b4e9 --- /dev/null +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -0,0 +1,41 @@ +/* +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) 2006 Blender Foundation. +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): Campbell Barton +* +* ***** END GPL LICENSE BLOCK ***** +*/ + +#ifndef BKE_POINTCACHE_H +#define BKE_POINTCACHE_H + +#include "DNA_ID.h" + +#define PTCache_EXT ".bphys" +#define PTCache_PATH "//pointcache/" + +int PTCache_id_filename(struct ID *id, char *filename, int cfra, int stack_index, short do_path, short do_ext); +FILE * PTCache_id_fopen(struct ID *id, char mode, int cfra, int stack_index); +void PTCache_id_clear(struct ID *id, int cfra, int stack_index); + +#endif diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index b124395c207..22692f503e1 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5382,6 +5382,83 @@ static void meshdeformModifier_deformVertsEM( dm->release(dm); } + +/* PointCache - example DONT USE SERIOUSLY */ +static void pointCacheModifier_initData(ModifierData *md) +{ + PointCacheModifierData *pcm= (PointCacheModifierData*) md; + + pcm->mode= ePointCache_Read; /* read */ +} +static void pointCacheModifier_freeData(ModifierData *md) +{ + PointCacheModifierData *pcm = (PointCacheModifierData*) md; +} +static void pointCacheModifier_copyData(ModifierData *md, ModifierData *target) +{ + PointCacheModifierData *pcm= (PointCacheModifierData*) md; + PointCacheModifierData *tpcm= (PointCacheModifierData*) target; + + tpcm->mode = pcm->mode; +} +static int pointCacheModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} +CustomDataMask pointCacheModifier_requiredDataMask(ModifierData *md) +{ + PointCacheModifierData *pcm= (PointCacheModifierData*) md; + CustomDataMask dataMask = 0; + return dataMask; +} + +static void pointCacheModifier_deformVerts( + ModifierData *md, Object *ob, DerivedMesh *derivedData, + float (*vertexCos)[3], int numVerts) +{ + PointCacheModifierData *pcm = (PointCacheModifierData*) md; + + FILE *fp = NULL; + int i; + int stack_index = modifiers_indexInObject(ob, md); + int totvert; + MVert *mvert, *mv; + + DerivedMesh *dm; + + if(derivedData) dm = CDDM_copy(derivedData); + else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + else return; + + CDDM_apply_vert_coords(dm, vertexCos); + CDDM_calc_normals(dm); + + mvert = mv = dm->getVertArray(dm); + totvert = dm->getNumVerts(dm); + + if (pcm->mode == ePointCache_Read) { + fp = PTCache_id_fopen((ID *)ob, 'w', G.scene->r.cfra, stack_index); + if (!fp) return; + for (mv=mvert, i=0; ico, sizeof(float), 3, fp); + } + fclose(fp); + } else if (pcm->mode == ePointCache_Write) { + float pt[3]; + fp = PTCache_id_fopen((ID *)ob, 'r', G.scene->r.cfra, stack_index); + if (!fp) return; + for (mv=mvert, i=0; irelease(dm); +} + /***/ static ModifierTypeInfo typeArr[NUM_MODIFIER_TYPES]; @@ -5649,6 +5726,16 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->updateDepgraph = meshdeformModifier_updateDepgraph; mti->deformVerts = meshdeformModifier_deformVerts; mti->deformVertsEM = meshdeformModifier_deformVertsEM; + + mti = INIT_TYPE(PointCache); + mti->type = eModifierTypeType_OnlyDeform; + mti->flags = eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_RequiresOriginalData; + mti->initData = pointCacheModifier_initData; + mti->freeData = pointCacheModifier_freeData; + mti->copyData = pointCacheModifier_copyData; + mti->dependsOnTime = pointCacheModifier_dependsOnTime; + mti->requiredDataMask = pointCacheModifier_requiredDataMask; + mti->deformVerts = pointCacheModifier_deformVerts; typeArrInit = 0; #undef INIT_TYPE @@ -6032,3 +6119,27 @@ int modifiers_isDeformed(Object *ob) return 0; } +/* checks we only have deform modifiers */ +int modifiers_isDeformedOnly(Object *ob) +{ + ModifierData *md = modifiers_getVirtualModifierList(ob); + ModifierTypeInfo *mti; + for (; md; md=md->next) { + mti = modifierType_getInfo(md->type); + /* TODO - check the modifier is being used! */ + if (mti->type != eModifierTypeType_OnlyDeform) { + return 0; + } + } + return 1; +} + +int modifiers_indexInObject(Object *ob, ModifierData *md_seek) +{ + int i= 0; + ModifierData *md; + + for (md=ob->modifiers.first; (md && md_seek!=md); md=md->next, i++); + if (!md) return -1; /* modifier isnt in the object */ + return i; +} diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c new file mode 100644 index 00000000000..b87a43c30c3 --- /dev/null +++ b/source/blender/blenkernel/intern/pointcache.c @@ -0,0 +1,159 @@ +/** + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * +* Contributor(s): Campbell Barton + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ + + +#include +#include +#include +#include +#include + +#include "BKE_pointcache.h" + +#include "BKE_utildefines.h" +#include "BKE_global.h" +#include "BKE_library.h" + +#include "BLI_blenlib.h" +#include "BKE_utildefines.h" +#include "blendef.h" + +/* needed for directory lookup */ +#ifndef WIN32 + #include +#else + #include "BLI_winstuff.h" +#endif + +/* Takes an Object ID and returns a unique name + - id: object id + - cfra: frame for the cache, can be negative + - stack_index: index in the modifier stack. we can have cache for more then one stack_index +*/ + +int PTCache_path(char *filename) +{ + sprintf(filename, PTCache_PATH); + BLI_convertstringcode(filename, G.sce, 0); + return strlen(filename); +} + +int PTCache_id_filename(struct ID *id, char *filename, int cfra, int stack_index, short do_path, short do_ext) +{ + int len=0; + char *idname; + char *newname; + filename[0] = '\0'; + newname = filename; + + /* start with temp dir */ + if (do_path) { + len = PTCache_path(filename); + newname += len; + } + idname = (id->name+2); + /* convert chars to hex so they are always a valid file */ + while('\0' != *idname) { + sprintf(newname, "%02X", (char)(*idname++)); + newname+=2; + len += 2; + } + + if (do_ext) { + sprintf(newname, "_%06d_%02d"PTCache_EXT, cfra, stack_index); /* always 6 chars */ + len += 16; + } + + return len; /* make sure the above string is always 16 chars */ +} + +/* youll need to close yourself after! */ +FILE *PTCache_id_fopen(struct ID *id, char mode, int cfra, int stack_index) +{ + /* mode is same as fopen's modes */ + FILE *fp; + char filename[(FILE_MAXDIR+FILE_MAXFILE)*2]; + + PTCache_id_filename(id, filename, cfra, stack_index, 1, 1); + + if (mode=='r') { + if (!BLI_exists(filename)) { + printf("Error, file does not exist '%s'\n", filename); + return NULL; + } + fp = fopen(filename, "rb"); + } else if (mode=='w') { + BLI_make_existing_file(filename); /* will create the dir if needs be, same as //textures is created */ + fp = fopen(filename, "wb"); + } + + if (!fp) { + printf("Error creating file filename '%s'\n", filename); + return NULL; + } + + return fp; +} + +/* youll need to close yourself after! */ +void PTCache_id_clear(struct ID *id, int cfra, int stack_index) +{ + int len; /* store the length of the string */ + + /* mode is same as fopen's modes */ + DIR *dir; + struct dirent *de; + char path[FILE_MAX]; + char filename[(FILE_MAXDIR+FILE_MAXFILE)*2]; + char path_full[(FILE_MAXDIR+FILE_MAXFILE)*2]; + + PTCache_path(path); + len = PTCache_id_filename(id, filename, cfra, stack_index, 0, 0); /* no path */ + + /* clear all files in the temp dir with the prefix of the ID and the ".bphys" suffix */ + + dir = opendir(path); + if (dir==NULL) + return; + + while ((de = readdir(dir)) != NULL) { + //if (S_ISREG(status.st_mode)) { /* is file */ + if (strstr(de->d_name, PTCache_EXT)) { /* do we have the right extension?*/ + if (strncmp(filename, de->d_name, len ) == 0) { /* do we have the right prefix */ + BLI_join_dirfile(path_full, path, de->d_name); + BLI_delete(path_full, 0, 0); + } + } + //} + } + + closedir(dir); + return; +} + diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 0aa7d1d4d3d..ee28d7325c7 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -31,6 +31,7 @@ typedef enum ModifierType { eModifierType_Smooth, eModifierType_Cast, eModifierType_MeshDeform, + eModifierType_PointCache, eModifierType_Cloth, eModifierType_Collision, NUM_MODIFIER_TYPES @@ -386,4 +387,14 @@ typedef struct MeshDeformModifierData { int totvert, totcagevert; } MeshDeformModifierData; +typedef struct PointCacheModifierData { + ModifierData modifier; + short mode, pad1, pad2, pad3; +} PointCacheModifierData; + +typedef enum { + ePointCache_Read = (1<<0), + ePointCache_Write = (1<<1), +} PointCacheFlag; + #endif diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 82ca6e5bed0..3da0196cc46 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -88,6 +88,7 @@ #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_packedFile.h" +#include "BKE_pointcache.h" #include "BKE_scene.h" #include "BLI_blenlib.h" @@ -1398,6 +1399,14 @@ static void modifiers_convertToReal(void *ob_v, void *md_v) BIF_undo_push("Modifier convert to real"); } +static void modifiers_pointCacheClearModifier(void *ob_v, void *md_v) +{ + Object *ob = ob_v; + ModifierData *md = md_v; + int stack_index = modifiers_indexInObject(ob_v, md_v); + PTCache_id_clear((ID *)ob, CFRA, stack_index); +} + static void build_uvlayer_menu_vars(CustomData *data, char **menu_string, int *uvlayer_tmp, char *uvlayer_name) { @@ -1646,6 +1655,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco height = 211; } else if (md->type==eModifierType_MeshDeform) { height = 73; + } else if (md->type==eModifierType_PointCache) { + height = 48; } /* roundbox 4 free variables: corner-rounding, nop, roundbox type, shade */ @@ -2144,6 +2155,18 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefButS(block, NUM, B_NOP, "Precision:", lx+(buttonWidth+1)/2,(cy-=24), buttonWidth/2,19, &mmd->gridsize, 2, 10, 0.5, 0, "The grid size for binding"); } uiBlockEndAlign(block); + } else if (md->type==eModifierType_PointCache) { + PointCacheModifierData *pcm = (PointCacheModifierData *) md; + uiBut *but; + cy -= 20; + uiBlockEndAlign(block); + + uiDefButS(block, ROW,B_MODIFIER_RECALC,"Write Cache", lx, cy, 75, 19, &pcm->mode, 12.0, ePointCache_Read, 0, 0, ""); + uiDefButS(block, ROW,B_MODIFIER_RECALC,"Read Cache", lx+75, cy, 75,19, &pcm->mode, 12.0, ePointCache_Write, 0, 0, ""); + cy -= 20; + but = uiDefBut(block, BUT, B_NOP, "Clear Cache", lx, cy, 150,19, 0, 0, 0, 0, 0, ""); + uiButSetFunc(but, modifiers_pointCacheClearModifier, ob, md); + } uiBlockEndAlign(block); From b37bbe9024e3da2efe01c48235993b426a3bb923 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 6 Nov 2007 12:08:39 +0000 Subject: [PATCH 047/430] New: pointcache integrated with cloth. Maybe some little glitches left there --- source/blender/blenkernel/BKE_cloth.h | 2 +- source/blender/blenkernel/intern/cloth.c | 159 ++++++++++++++----- source/blender/blenkernel/intern/implicit.c | 10 +- source/blender/makesdna/DNA_cloth_types.h | 23 ++- source/blender/makesdna/DNA_modifier_types.h | 2 +- source/blender/src/buttons_object.c | 6 +- 6 files changed, 141 insertions(+), 61 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 8be27ace346..83891cc74d3 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -118,7 +118,7 @@ typedef enum // needed for buttons_object.c -// void cloth_cache_free ( ClothModifierData *clmd, float time ); +void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr); void cloth_free_modifier ( ClothModifierData *clmd ); // needed for cloth.c diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index eba11bfedda..9720ec6b141 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -39,15 +39,15 @@ /* types */ #include "DNA_curve_types.h" +#include "DNA_cloth_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" -#include "DNA_cloth_types.h" #include "DNA_key_types.h" +#include "DNA_lattice_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_lattice_types.h" -#include "DNA_scene_types.h" #include "DNA_modifier_types.h" +#include "DNA_scene_types.h" #include "BLI_blenlib.h" #include "BLI_arithb.h" @@ -55,6 +55,8 @@ #include "BLI_linklist.h" #include "BKE_curve.h" +#include "BKE_cloth.h" +#include "BKE_collisions.h" #include "BKE_deform.h" #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" @@ -63,12 +65,11 @@ #include "BKE_global.h" #include "BKE_key.h" #include "BKE_mesh.h" -#include "BKE_object.h" -#include "BKE_cloth.h" -#include "BKE_collisions.h" #include "BKE_modifier.h" +#include "BKE_object.h" +#include "BKE_pointcache.h" #include "BKE_utildefines.h" -#include "BKE_DerivedMesh.h" + #include "BIF_editdeform.h" #include "BIF_editkey.h" #include "DNA_screen_types.h" @@ -403,10 +404,89 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) return NULL; } -/** -* cloth_deform_verts - simulates one step, framenr is in frames. -* -**/ +int modifiers_indexInObject(Object *ob, ModifierData *md_seek); + +void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) +{ + int stack_index = -1; + + if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + PTCache_id_clear((ID *)ob, framenr, stack_index); + } +} +static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) +{ + FILE *fp = NULL; + int stack_index = -1; + unsigned int a; + Cloth *cloth = clmd->clothObject; + + if(!cloth) + return; + + stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + fp = PTCache_id_fopen((ID *)ob, 'w', framenr, stack_index); + if(!fp) return; + + for(a = 0; a < cloth->numverts; a++) + { + fwrite(&cloth->x[a], sizeof(float),3,fp); + fwrite(&cloth->xconst[a], sizeof(float),3,fp); + fwrite(&cloth->v[a], sizeof(float),3,fp); + } + + fclose(fp); +} +static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) +{ + FILE *fp = NULL; + int stack_index = -1; + unsigned int a, ret = 1; + Cloth *cloth = clmd->clothObject; + + if(!cloth) + return 0; + + stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + fp = PTCache_id_fopen((ID *)ob, 'r', framenr, stack_index); + if(!fp) + ret = 0; + else { + for(a = 0; a < cloth->numverts; a++) + { + if(fread(&cloth->x[a], sizeof(float), 3, fp) != 3) + { + ret = 0; + break; + } + if(fread(&cloth->xconst[a], sizeof(float), 3, fp) != 3) + { + ret = 0; + break; + } + if(fread(&cloth->v[a], sizeof(float), 3, fp) != 3) + { + ret = 0; + break; + } + } + + fclose(fp); + } + + implicit_set_positions(clmd); + + return ret; +} + +/************************************************ + * clothModifier_do - main simulation function +************************************************/ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) { unsigned int i; @@ -421,7 +501,6 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d unsigned int framenr = (float)G.scene->r.cfra; float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); ListBase *effectors = NULL; - ClothVertex *verts = NULL; float deltaTime = current_time - clmd->sim_parms.sim_time; clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); @@ -441,7 +520,10 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d mface = CDDM_get_faces(result); clmd->sim_parms.sim_time = current_time; - + + if ( current_time < clmd->sim_parms.firstframe ) + return result; + // only be active during a specific period: // that's "first frame" and "last frame" on GUI /* @@ -501,20 +583,18 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // Insure we have a clmd->clothObject, in case allocation failed. if (clmd->clothObject != NULL) { - // if(!cloth_cache_search_frame(clmd, framenr)) + if(!cloth_read_cache(ob, clmd, framenr)) { - verts = cloth->verts; - // Force any pinned verts to their constrained location. // has to be commented for verlet - for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) + for ( i = 0; i < clmd->clothObject->numverts; i++ ) { // Save the previous position. - VECCOPY ( cloth->xold[i], verts->xconst ); + VECCOPY ( cloth->xold[i], cloth->xconst[i] ); VECCOPY ( cloth->current_xold[i], cloth->x[i] ); // Get the current position. - VECCOPY ( verts->xconst, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->xconst ); + VECCOPY ( cloth->xconst[i], mvert[i].co ); + Mat4MulVecfl ( ob->obmat, cloth->xconst[i] ); } tstart(); @@ -527,13 +607,8 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d printf("Cloth simulation time: %f\n", tval()); - // cloth_cache_set_frame(clmd, framenr); - - }/* - else // just retrieve the cached frame - { - cloth_cache_get_frame(clmd, framenr); - }*/ + cloth_write_cache(ob, clmd, framenr); + } // Copy the result back to the object. cloth_to_object (ob, result, clmd); @@ -542,18 +617,15 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); } - }/* + } else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) { - if ( ( clmd->clothObject != NULL ) && ( clmd->sim_parms.cache ) ) + if ( clmd->clothObject != NULL ) { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame(clmd, framenr); + if(cloth_read_cache(ob, clmd, framenr)) cloth_to_object (ob, result, clmd); - } } - }*/ + } return result; } @@ -569,7 +641,7 @@ void cloth_free_modifier (ClothModifierData *clmd) cloth = clmd->clothObject; // free our frame cache - // cloth_cache_free(clmd, 0); + // cloth_clear_cache(ob, clmd, 0); /* Calls the solver and collision frees first as they * might depend on data in clmd->clothObject. */ @@ -614,6 +686,10 @@ void cloth_free_modifier (ClothModifierData *clmd) if ( cloth->current_v != NULL ) MEM_freeN ( cloth->current_v ); + // Free the verts. + if ( cloth->xconst != NULL ) + MEM_freeN ( cloth->xconst ); + cloth->verts = NULL; cloth->numverts = -1; @@ -806,7 +882,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->verts [i].goal= 0.0; clmd->clothObject->verts [i].flags = 0; VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); - VECCOPY(clmd->clothObject->verts [i].xconst, clmd->clothObject->x[i]); + VECCOPY(clmd->clothObject->xconst[i], clmd->clothObject->x[i]); VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); VecMulf(clmd->clothObject->v[i], 0.0); @@ -826,7 +902,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->selftree = bvh_build_from_float3(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms.selfepsilon); - // cloth_cache_set_frame(clmd, 1); + // save initial state + cloth_write_cache(ob, clmd, framenr-1); } return 1; @@ -900,6 +977,14 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_v." ); return; } + + clmd->clothObject->xconst = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_xconst" ); + if ( clmd->clothObject->xconst == NULL ) + { + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xconst." ); + return; + } // save face information clmd->clothObject->numfaces = numfaces; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 091a0580232..41cc9e8cef4 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1369,7 +1369,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec if(verts [i].goal < SOFTGOALSNAP) { // current_position = xold + t * (newposition - xold) - VECSUB(tvect, verts[i].xconst, cloth->xold[i]); + VECSUB(tvect, cloth->xconst[i], cloth->xold[i]); mul_fvector_S(tvect, tvect, time); VECADD(tvect, tvect, cloth->xold[i]); @@ -1378,7 +1378,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec VECADDS(lF[i], lF[i], auxvect, -ks); // calulate damping forces generated by goals - VECSUB(velgoal, cloth->xold[i], verts[i].xconst); + VECSUB(velgoal, cloth->xold[i], cloth->xconst[i]); kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); @@ -1503,7 +1503,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update velocities with constrained velocities from pinned verts if(verts [i].goal >= SOFTGOALSNAP) { - VECSUB(id->V[i], verts[i].xconst, cloth->xold[i]); + VECSUB(id->V[i], cloth->xconst[i], cloth->xold[i]); // VecMulf(id->V[i], 1.0 / dt); } } @@ -1625,8 +1625,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } else { - VECCOPY(cloth->current_xold[i], verts[i].xconst); - VECCOPY(cloth->x[i], verts[i].xconst); + VECCOPY(cloth->current_xold[i], cloth->xconst[i]); + VECCOPY(cloth->x[i], cloth->xconst[i]); } } } diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 4d75f7a3778..2441c8b721f 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -43,13 +43,11 @@ typedef struct ClothVertex { int flags; /* General flags per vertex. */ - float xconst [3]; /* constrained position */ float mass; /* mass / weight of the vertex */ float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ unsigned int impulse_count; /* same as above */ -} -ClothVertex; +} ClothVertex; /** @@ -66,8 +64,7 @@ typedef struct ClothSpring float dfdx[3][3]; float dfdv[3][3]; float f[3]; -} -ClothSpring; +} ClothSpring; @@ -108,13 +105,12 @@ typedef struct SimulationSettings float sim_time_old; struct LinkNode *cache; float defgoal; - int goalfrict; + float goalfrict; float goalspring; int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ -} -SimulationSettings; +} SimulationSettings; typedef struct CollisionSettings @@ -126,8 +122,7 @@ typedef struct CollisionSettings short loop_count; /* How many iterations for the collision loop. */ int flags; /* collision flags defined in BKE_cloth.h */ float selfepsilon; -} -CollisionSettings; +} CollisionSettings; /** @@ -143,7 +138,7 @@ CollisionSettings; typedef struct Cloth { struct ClothVertex *verts; /* The vertices that represent this cloth. */ - struct LinkNode *springs; /* The springs connecting the mesh. */ + struct LinkNode *springs; /* The springs connecting the mesh. */ unsigned int numverts; /* The number of verts == m * n. */ unsigned int numsprings; /* The count of springs. */ unsigned int numfaces; @@ -160,10 +155,10 @@ typedef struct Cloth float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ float (*v)[3]; /* the current velocity of all vertices */ float (*current_v)[3]; - struct EdgeHash *edgehash; // used for fast checking adjacent points + float (*xconst)[3]; + struct EdgeHash *edgehash; /* used for fast checking adjacent points */ unsigned int numothersprings; unsigned int numspringssave; -} -Cloth; +} Cloth; #endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index ee28d7325c7..151e652eef0 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -344,7 +344,7 @@ typedef struct SoftbodyModifierData { typedef struct ClothModifierData { ModifierData modifier; - Cloth *clothObject; /* The internal data structure for cloth. */ + struct Cloth *clothObject; /* The internal data structure for cloth. */ SimulationSettings sim_parms; /* definition is in DNA_cloth_types.h */ CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ } ClothModifierData; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 2e3801135eb..70559d29f40 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2187,7 +2187,7 @@ void do_object_panels(unsigned short event) CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - // cloth_cache_free(clmd, 2); + cloth_clear_cache(ob, clmd, 2); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } @@ -2198,7 +2198,7 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - // cloth_cache_free(clmd, MAX2(2.0,G.scene->r.cfra+1.0)); + cloth_clear_cache(ob, clmd, MAX2(2.0,G.scene->r.cfra+1.0)); allqueue(REDRAWBUTSOBJECT, 0); } } @@ -3242,7 +3242,7 @@ static void object_panel_cloth(Object *ob) } uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict, 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); } From c5d4e8a137437c047fc84cf9267b5b0d5c164188 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 6 Nov 2007 14:26:08 +0000 Subject: [PATCH 048/430] updating bullet --- extern/bullet2/src/Bullet-C-Api.h | 170 +++- .../BroadphaseCollision/btAxisSweep3.cpp | 638 +------------- .../BroadphaseCollision/btAxisSweep3.h | 832 +++++++++++++++++- .../btBroadphaseInterface.h | 18 +- .../BroadphaseCollision/btBroadphaseProxy.h | 48 +- .../btCollisionAlgorithm.cpp | 2 +- .../btCollisionAlgorithm.h | 8 +- .../BroadphaseCollision/btDispatcher.h | 10 +- .../btMultiSapBroadphase.cpp | 204 +++++ .../btMultiSapBroadphase.h | 119 +++ .../btOverlappingPairCache.cpp | 452 ++++++++-- .../btOverlappingPairCache.h | 229 ++++- .../btOverlappingPairCallback.h | 37 + .../btSimpleBroadphase.cpp | 246 ++++-- .../BroadphaseCollision/btSimpleBroadphase.h | 82 +- .../src/BulletCollision/CMakeLists.txt | 8 + .../SphereTriangleDetector.h | 4 +- .../btCollisionConfiguration.h | 47 + .../CollisionDispatch/btCollisionCreateFunc.h | 2 +- .../btCollisionDispatcher.cpp | 206 ++--- .../CollisionDispatch/btCollisionDispatcher.h | 56 +- .../CollisionDispatch/btCollisionObject.cpp | 5 + .../CollisionDispatch/btCollisionObject.h | 21 +- .../CollisionDispatch/btCollisionWorld.cpp | 60 +- .../CollisionDispatch/btCollisionWorld.h | 30 +- .../btCompoundCollisionAlgorithm.cpp | 8 +- .../btCompoundCollisionAlgorithm.h | 19 +- .../btConvexConcaveCollisionAlgorithm.cpp | 12 +- .../btConvexConcaveCollisionAlgorithm.h | 22 +- .../btConvexConvexAlgorithm.cpp | 17 +- .../btConvexConvexAlgorithm.h | 17 +- .../btDefaultCollisionConfiguration.cpp | 237 +++++ .../btDefaultCollisionConfiguration.h | 87 ++ .../btEmptyCollisionAlgorithm.h | 6 +- .../CollisionDispatch/btManifoldResult.cpp | 23 +- .../CollisionDispatch/btManifoldResult.h | 29 +- .../btSimulationIslandManager.cpp | 80 +- .../btSimulationIslandManager.h | 12 +- .../btSphereBoxCollisionAlgorithm.cpp | 19 +- .../btSphereBoxCollisionAlgorithm.h | 15 +- .../btSphereSphereCollisionAlgorithm.cpp | 12 +- .../btSphereSphereCollisionAlgorithm.h | 11 +- .../btSphereTriangleCollisionAlgorithm.cpp | 10 +- .../btSphereTriangleCollisionAlgorithm.h | 11 +- .../CollisionDispatch/btUnionFind.cpp | 1 + .../CollisionDispatch/btUnionFind.h | 6 +- .../CollisionShapes/btBoxShape.cpp | 11 +- .../CollisionShapes/btBoxShape.h | 102 ++- .../btBvhTriangleMeshShape.cpp | 49 +- .../CollisionShapes/btBvhTriangleMeshShape.h | 25 +- .../CollisionShapes/btCapsuleShape.cpp | 2 +- .../CollisionShapes/btCapsuleShape.h | 10 +- .../CollisionShapes/btCollisionShape.h | 24 +- .../CollisionShapes/btCompoundShape.cpp | 13 +- .../CollisionShapes/btCompoundShape.h | 51 +- .../CollisionShapes/btConcaveShape.h | 2 +- .../CollisionShapes/btConeShape.h | 10 +- .../CollisionShapes/btConvexHullShape.h | 7 +- .../CollisionShapes/btConvexInternalShape.cpp | 78 ++ .../CollisionShapes/btConvexInternalShape.h | 99 +++ .../CollisionShapes/btConvexShape.cpp | 59 -- .../CollisionShapes/btConvexShape.h | 90 +- .../btConvexTriangleMeshShape.cpp | 2 +- .../btConvexTriangleMeshShape.h | 10 +- .../CollisionShapes/btCylinderShape.cpp | 14 +- .../CollisionShapes/btCylinderShape.h | 18 +- .../CollisionShapes/btEmptyShape.cpp | 2 +- .../CollisionShapes/btEmptyShape.h | 10 +- .../btHeightfieldTerrainShape.cpp | 52 +- .../btHeightfieldTerrainShape.h | 4 +- .../CollisionShapes/btMinkowskiSumShape.cpp | 2 +- .../CollisionShapes/btMinkowskiSumShape.h | 10 +- .../CollisionShapes/btMultiSphereShape.cpp | 2 +- .../CollisionShapes/btMultiSphereShape.h | 10 +- .../CollisionShapes/btOptimizedBvh.cpp | 394 ++++++++- .../CollisionShapes/btOptimizedBvh.h | 85 +- .../btPolyhedralConvexShape.cpp | 2 +- .../CollisionShapes/btPolyhedralConvexShape.h | 10 +- .../CollisionShapes/btSphereShape.cpp | 2 +- .../CollisionShapes/btSphereShape.h | 18 +- .../CollisionShapes/btStaticPlaneShape.cpp | 2 +- .../CollisionShapes/btStaticPlaneShape.h | 4 +- .../btStridingMeshInterface.cpp | 2 +- .../CollisionShapes/btStridingMeshInterface.h | 2 +- .../CollisionShapes/btTetrahedronShape.h | 4 +- .../CollisionShapes/btTriangleBuffer.h | 2 +- .../CollisionShapes/btTriangleCallback.h | 2 +- .../btTriangleIndexVertexArray.cpp | 23 +- .../btTriangleIndexVertexArray.h | 10 +- .../CollisionShapes/btTriangleMesh.h | 4 +- .../CollisionShapes/btTriangleMeshShape.cpp | 5 +- .../CollisionShapes/btTriangleMeshShape.h | 12 +- .../CollisionShapes/btTriangleShape.h | 4 +- .../CollisionShapes/btUniformScalingShape.cpp | 114 +++ .../CollisionShapes/btUniformScalingShape.h | 86 ++ .../btContinuousConvexCollision.cpp | 24 +- .../btContinuousConvexCollision.h | 6 +- .../NarrowPhaseCollision/btConvexCast.h | 8 +- .../btConvexPenetrationDepthSolver.h | 4 +- .../btDiscreteCollisionDetectorInterface.h | 4 +- .../NarrowPhaseCollision/btGjkConvexCast.cpp | 2 +- .../NarrowPhaseCollision/btGjkConvexCast.h | 10 +- .../NarrowPhaseCollision/btGjkEpa.cpp | 4 +- .../NarrowPhaseCollision/btGjkEpa.h | 6 +- .../btGjkEpaPenetrationDepthSolver.cpp | 2 +- .../btGjkEpaPenetrationDepthSolver.h | 2 +- .../btGjkPairDetector.cpp | 2 +- .../NarrowPhaseCollision/btGjkPairDetector.h | 10 +- .../NarrowPhaseCollision/btManifoldPoint.h | 4 +- .../btMinkowskiPenetrationDepthSolver.cpp | 5 +- .../btMinkowskiPenetrationDepthSolver.h | 2 +- .../btPersistentManifold.cpp | 24 +- .../btPersistentManifold.h | 46 +- .../NarrowPhaseCollision/btRaycastCallback.h | 2 +- .../btSimplexSolverInterface.h | 4 +- .../src/BulletCollision/ibmsdk/Makefile | 95 ++ .../bullet2/src/BulletDynamics/CMakeLists.txt | 3 +- .../btConeTwistConstraint.cpp | 12 +- .../ConstraintSolver/btConeTwistConstraint.h | 3 + .../ConstraintSolver/btConstraintSolver.h | 13 +- .../ConstraintSolver/btContactConstraint.cpp | 20 +- .../ConstraintSolver/btContactConstraint.h | 4 +- .../ConstraintSolver/btContactSolverInfo.h | 26 +- .../btGeneric6DofConstraint.cpp | 790 ++++++++++------- .../btGeneric6DofConstraint.h | 459 ++++++++-- .../ConstraintSolver/btHingeConstraint.cpp | 261 +++++- .../ConstraintSolver/btHingeConstraint.h | 69 +- .../ConstraintSolver/btJacobianEntry.h | 4 +- .../btPoint2PointConstraint.cpp | 5 +- .../btPoint2PointConstraint.h | 14 +- .../btSequentialImpulseConstraintSolver.cpp | 522 ++++++----- .../btSequentialImpulseConstraintSolver.h | 25 +- .../btSolve2LinearConstraint.h | 4 +- .../ConstraintSolver/btSolverBody.h | 25 +- .../ConstraintSolver/btSolverConstraint.h | 20 +- .../ConstraintSolver/btTypedConstraint.cpp | 15 +- .../ConstraintSolver/btTypedConstraint.h | 30 +- .../BulletDynamics/Dynamics/Bullet-C-API.cpp | 402 +++++++++ .../Dynamics/btContinuousDynamicsWorld.cpp | 194 ++++ .../Dynamics/btContinuousDynamicsWorld.h | 46 + .../Dynamics/btDiscreteDynamicsWorld.cpp | 132 ++- .../Dynamics/btDiscreteDynamicsWorld.h | 13 +- .../BulletDynamics/Dynamics/btDynamicsWorld.h | 17 +- .../BulletDynamics/Dynamics/btRigidBody.cpp | 11 +- .../src/BulletDynamics/Dynamics/btRigidBody.h | 58 +- .../Dynamics/btSimpleDynamicsWorld.cpp | 20 +- .../Dynamics/btSimpleDynamicsWorld.h | 16 +- .../Vehicle/btRaycastVehicle.cpp | 27 +- .../BulletDynamics/Vehicle/btRaycastVehicle.h | 6 +- .../Vehicle/btVehicleRaycaster.h | 2 +- .../src/BulletDynamics/Vehicle/btWheelInfo.h | 4 +- .../src/BulletDynamics/ibmsdk/Makefile | 45 + extern/bullet2/src/LinearMath/CMakeLists.txt | 1 + extern/bullet2/src/LinearMath/btAabbUtil2.h | 4 +- .../src/LinearMath/btAlignedAllocator.cpp | 119 ++- .../src/LinearMath/btAlignedAllocator.h | 18 +- .../src/LinearMath/btAlignedObjectArray.h | 25 +- extern/bullet2/src/LinearMath/btIDebugDraw.h | 2 + extern/bullet2/src/LinearMath/btMatrix3x3.h | 2 +- extern/bullet2/src/LinearMath/btMinMax.h | 12 +- .../bullet2/src/LinearMath/btPoolAllocator.h | 94 ++ extern/bullet2/src/LinearMath/btQuadWord.h | 64 +- extern/bullet2/src/LinearMath/btQuaternion.h | 6 +- extern/bullet2/src/LinearMath/btScalar.h | 235 ++++- extern/bullet2/src/LinearMath/btStackAlloc.h | 17 +- extern/bullet2/src/LinearMath/btTransform.h | 8 +- .../bullet2/src/LinearMath/btTransformUtil.h | 8 +- extern/bullet2/src/LinearMath/btVector3.h | 50 ++ extern/bullet2/src/LinearMath/ibmsdk/Makefile | 30 + extern/bullet2/src/SConscript | 70 +- extern/bullet2/src/btBulletCollisionCommon.h | 4 +- extern/bullet2/src/btBulletDynamicsCommon.h | 2 + extern/bullet2/src/ibmsdk/Makefile | 10 + 173 files changed, 7409 insertions(+), 2698 deletions(-) create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h create mode 100644 extern/bullet2/src/BulletCollision/ibmsdk/Makefile create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h create mode 100644 extern/bullet2/src/BulletDynamics/ibmsdk/Makefile create mode 100755 extern/bullet2/src/LinearMath/btPoolAllocator.h create mode 100644 extern/bullet2/src/LinearMath/ibmsdk/Makefile create mode 100644 extern/bullet2/src/ibmsdk/Makefile diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h index ccb0c452f3e..45a4f684858 100644 --- a/extern/bullet2/src/Bullet-C-Api.h +++ b/extern/bullet2/src/Bullet-C-Api.h @@ -1,15 +1,173 @@ -#ifndef Bullet_C_API_H -#define Bullet_C_API_H +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. + Work in progress, functionality will be added on demand. + + If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h" +*/ + +#ifndef BULLET_C_API_H +#define BULLET_C_API_H + +#define PL_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name + +#ifdef BT_USE_DOUBLE_PRECISION +typedef double plReal; +#else +typedef float plReal; +#endif + +typedef plReal plVector3[3]; +typedef plReal plQuaternion[4]; #ifdef __cplusplus -extern "C" { -#endif // __cplusplus +extern "C" { +#endif + +/* Particular physics SDK */ + PL_DECLARE_HANDLE(plPhysicsSdkHandle); + +/* Dynamics world, belonging to some physics SDK */ + PL_DECLARE_HANDLE(plDynamicsWorldHandle); + +/* Rigid Body that can be part of a Dynamics World */ + PL_DECLARE_HANDLE(plRigidBodyHandle); + +/* Collision Shape/Geometry, property of a Rigid Body */ + PL_DECLARE_HANDLE(plCollisionShapeHandle); + +/* Constraint for Rigid Bodies */ + PL_DECLARE_HANDLE(plConstraintHandle); + +/* Triangle Mesh interface */ + PL_DECLARE_HANDLE(plMeshInterfaceHandle); + +/* Broadphase Scene/Proxy Handles */ + PL_DECLARE_HANDLE(plCollisionBroadphaseHandle); + PL_DECLARE_HANDLE(plBroadphaseProxyHandle); + PL_DECLARE_HANDLE(plCollisionWorldHandle); + +/* + Create and Delete a Physics SDK +*/ + + extern plPhysicsSdkHandle plNewBulletSdk(); //this could be also another sdk, like ODE, PhysX etc. + extern void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk); + +/* Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */ + + typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2); + + extern plCollisionBroadphaseHandle plCreateSapBroadphase(btBroadphaseCallback beginCallback,btBroadphaseCallback endCallback); + + extern void plDestroyBroadphase(plCollisionBroadphaseHandle bp); + + extern plBroadphaseProxyHandle plCreateProxy(plCollisionBroadphaseHandle bp, void* clientData, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ); + + extern void plDestroyProxy(plCollisionBroadphaseHandle bp, plBroadphaseProxyHandle proxyHandle); + + extern void plSetBoundingBox(plBroadphaseProxyHandle proxyHandle, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ); + +/* todo: add pair cache support with queries like add/remove/find pair */ + + extern plCollisionWorldHandle plCreateCollisionWorld(plPhysicsSdkHandle physicsSdk); + +/* todo: add/remove objects */ + + +/* Dynamics World */ + + extern plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdk); + + extern void plDeleteDynamicsWorld(plDynamicsWorldHandle world); + + extern void plStepSimulation(plDynamicsWorldHandle, plReal timeStep); + + extern void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object); + + extern void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object); + + +/* Rigid Body */ + + extern plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionShapeHandle cshape ); + + extern void plDeleteRigidBody(plRigidBodyHandle body); + + +/* Collision Shape definition */ + + extern plCollisionShapeHandle plNewSphereShape(plReal radius); + extern plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z); + extern plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height); + extern plCollisionShapeHandle plNewConeShape(plReal radius, plReal height); + extern plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height); + extern plCollisionShapeHandle plNewCompoundShape(); + extern void plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn); + + extern void plDeleteShape(plCollisionShapeHandle shape); + + /* Convex Meshes */ + extern plCollisionShapeHandle plNewConvexHullShape(); + extern void plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z); +/* Concave static triangle meshes */ + extern plMeshInterfaceHandle plNewMeshInterface(); + extern void plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2); + extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle); + + extern void plSetScaling(plCollisionShapeHandle shape, plVector3 scaling); + +/* SOLID has Response Callback/Table/Management */ +/* PhysX has Triggers, User Callbacks and filtering */ +/* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */ + +/* typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHandle rbHandle, plVector3 pos); */ +/* typedef void plUpdatedOrientationCallback(void* userData, plRigidBodyHandle rbHandle, plQuaternion orientation); */ + + /* get world transform */ + extern void plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix); + extern void plGetPosition(plRigidBodyHandle object,plVector3 position); + extern void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation); + + /* set world transform (position/orientation) */ + extern void plSetPosition(plRigidBodyHandle object, const plVector3 position); + extern void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation); + extern void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient); + + typedef struct plRayCastResult { + plRigidBodyHandle m_body; + plCollisionShapeHandle m_shape; + plVector3 m_positionWorld; + plVector3 m_normalWorld; + } plRayCastResult; + + extern int plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plRayCastResult res); + + /* Sweep API */ + + /* extern plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); */ + + /* Continuous Collision Detection API */ double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]); #ifdef __cplusplus } -#endif // __cplusplus - #endif +#endif //BULLET_C_API_H + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp index be4a11506df..d7eea33ea41 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp @@ -21,640 +21,18 @@ #include -#ifdef DEBUG_BROADPHASE -#include -void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinality) +btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache) +:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache) { - int numEdges = m_pHandles[0].m_maxEdges[axis]; - printf("SAP Axis %d, numEdges=%d\n",axis,numEdges); - - int i; - for (i=0;im_handle); - int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis]; - char beginOrEnd; - beginOrEnd=pEdge->IsMax()?'E':'B'; - printf(" [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex); - } - - if (checkCardinality) - assert(numEdges == m_numHandles*2+1); -} -#endif //DEBUG_BROADPHASE - - -btBroadphaseProxy* btAxisSweep3::createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask) -{ - (void)shapeType; - BP_FP_INT_TYPE handleId = addHandle(min,max, userPtr,collisionFilterGroup,collisionFilterMask); - - Handle* handle = getHandle(handleId); - - return handle; -} - -void btAxisSweep3::destroyProxy(btBroadphaseProxy* proxy) -{ - Handle* handle = static_cast(proxy); - removeHandle(handle->m_handleId); -} - -void btAxisSweep3::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax) -{ - Handle* handle = static_cast(proxy); - updateHandle(handle->m_handleId,aabbMin,aabbMax); - -} - - - - - - -btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles) -:btOverlappingPairCache() -{ - m_invalidPair = 0; - //assert(bounds.HasVolume()); - // 1 handle is reserved as sentinel - btAssert(maxHandles > 1 && maxHandles < BP_MAX_HANDLES); - - // init bounds - m_worldAabbMin = worldAabbMin; - m_worldAabbMax = worldAabbMax; - - btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin; - - BP_FP_INT_TYPE maxInt = BP_HANDLE_SENTINEL; - - m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize; - - // allocate handles buffer and put all handles on free list - m_pHandles = new Handle[maxHandles]; - m_maxHandles = maxHandles; - m_numHandles = 0; - - // handle 0 is reserved as the null index, and is also used as the sentinel - m_firstFreeHandle = 1; - { - for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++) - m_pHandles[i].SetNextFree(i + 1); - m_pHandles[maxHandles - 1].SetNextFree(0); - } - - { - // allocate edge buffers - for (int i = 0; i < 3; i++) - m_pEdges[i] = new Edge[maxHandles * 2]; - } - //removed overlap management - - // make boundary sentinels - - m_pHandles[0].m_clientObject = 0; - - for (int axis = 0; axis < 3; axis++) - { - m_pHandles[0].m_minEdges[axis] = 0; - m_pHandles[0].m_maxEdges[axis] = 1; - - m_pEdges[axis][0].m_pos = 0; - m_pEdges[axis][0].m_handle = 0; - m_pEdges[axis][1].m_pos = BP_HANDLE_SENTINEL; - m_pEdges[axis][1].m_handle = 0; -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - - } + btAssert(maxHandles > 1 && maxHandles < 32767); } -btAxisSweep3::~btAxisSweep3() + +bt32BitAxisSweep3::bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache ) +:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache) { - - for (int i = 2; i >= 0; i--) - delete[] m_pEdges[i]; - delete[] m_pHandles; -} - -void btAxisSweep3::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const -{ - btPoint3 clampedPoint(point); - - - - clampedPoint.setMax(m_worldAabbMin); - clampedPoint.setMin(m_worldAabbMax); - - btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize; - out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & BP_HANDLE_MASK) | isMax); - out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & BP_HANDLE_MASK) | isMax); - out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & BP_HANDLE_MASK) | isMax); - -} - - - -BP_FP_INT_TYPE btAxisSweep3::allocHandle() -{ - assert(m_firstFreeHandle); - - BP_FP_INT_TYPE handle = m_firstFreeHandle; - m_firstFreeHandle = getHandle(handle)->GetNextFree(); - m_numHandles++; - - return handle; -} - -void btAxisSweep3::freeHandle(BP_FP_INT_TYPE handle) -{ - assert(handle > 0 && handle < m_maxHandles); - - getHandle(handle)->SetNextFree(m_firstFreeHandle); - m_firstFreeHandle = handle; - - m_numHandles--; -} - - - -BP_FP_INT_TYPE btAxisSweep3::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask) -{ - // quantize the bounds - BP_FP_INT_TYPE min[3], max[3]; - quantize(min, aabbMin, 0); - quantize(max, aabbMax, 1); - - // allocate a handle - BP_FP_INT_TYPE handle = allocHandle(); - assert(handle!= 0xcdcd); - - Handle* pHandle = getHandle(handle); - - pHandle->m_handleId = handle; - //pHandle->m_pOverlaps = 0; - pHandle->m_clientObject = pOwner; - pHandle->m_collisionFilterGroup = collisionFilterGroup; - pHandle->m_collisionFilterMask = collisionFilterMask; - - // compute current limit of edge arrays - BP_FP_INT_TYPE limit = m_numHandles * 2; - - - // insert new edges just inside the max boundary edge - for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++) - { - - m_pHandles[0].m_maxEdges[axis] += 2; - - m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1]; - - m_pEdges[axis][limit - 1].m_pos = min[axis]; - m_pEdges[axis][limit - 1].m_handle = handle; - - m_pEdges[axis][limit].m_pos = max[axis]; - m_pEdges[axis][limit].m_handle = handle; - - pHandle->m_minEdges[axis] = limit - 1; - pHandle->m_maxEdges[axis] = limit; - } - - // now sort the new edges to their correct position - sortMinDown(0, pHandle->m_minEdges[0], false); - sortMaxDown(0, pHandle->m_maxEdges[0], false); - sortMinDown(1, pHandle->m_minEdges[1], false); - sortMaxDown(1, pHandle->m_maxEdges[1], false); - sortMinDown(2, pHandle->m_minEdges[2], true); - sortMaxDown(2, pHandle->m_maxEdges[2], true); - - - return handle; -} - - -void btAxisSweep3::removeHandle(BP_FP_INT_TYPE handle) -{ - - Handle* pHandle = getHandle(handle); - - //explicitly remove the pairs containing the proxy - //we could do it also in the sortMinUp (passing true) - //todo: compare performance - removeOverlappingPairsContainingProxy(pHandle); - - - // compute current limit of edge arrays - int limit = m_numHandles * 2; - - int axis; - - for (axis = 0;axis<3;axis++) - { - m_pHandles[0].m_maxEdges[axis] -= 2; - } - - // remove the edges by sorting them up to the end of the list - for ( axis = 0; axis < 3; axis++) - { - Edge* pEdges = m_pEdges[axis]; - BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis]; - pEdges[max].m_pos = BP_HANDLE_SENTINEL; - - sortMaxUp(axis,max,false); - - - BP_FP_INT_TYPE i = pHandle->m_minEdges[axis]; - pEdges[i].m_pos = BP_HANDLE_SENTINEL; - - - sortMinUp(axis,i,false); - - pEdges[limit-1].m_handle = 0; - pEdges[limit-1].m_pos = BP_HANDLE_SENTINEL; - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis,false); -#endif //DEBUG_BROADPHASE - - - } - - - // free the handle - freeHandle(handle); - - -} - -extern int gOverlappingPairs; - - -void btAxisSweep3::refreshOverlappingPairs() -{ - -} -void btAxisSweep3::processAllOverlappingPairs(btOverlapCallback* callback) -{ - - //perform a sort, to find duplicates and to sort 'invalid' pairs to the end - m_overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - //remove the 'invalid' ones -#ifdef USE_POPBACK_REMOVAL - while (m_invalidPair>0) - { - m_invalidPair--; - m_overlappingPairArray.pop_back(); - } -#else - m_overlappingPairArray.resize(m_overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; -#endif - - - int i; - - btBroadphasePair previousPair; - previousPair.m_pProxy0 = 0; - previousPair.m_pProxy1 = 0; - previousPair.m_algorithm = 0; - - - for (i=0;iprocessOverlap(pair); - } else - { - needsRemoval = true; - } - } else - { - //remove duplicate - needsRemoval = true; - //should have no algorithm - btAssert(!pair.m_algorithm); - } - - if (needsRemoval) - { - cleanOverlappingPair(pair); - - // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); - // m_overlappingPairArray.pop_back(); - pair.m_pProxy0 = 0; - pair.m_pProxy1 = 0; - m_invalidPair++; - gOverlappingPairs--; - } - - } -} - - -bool btAxisSweep3::testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) -{ - const Handle* pHandleA = static_cast(proxy0); - const Handle* pHandleB = static_cast(proxy1); - - //optimization 1: check the array index (memory address), instead of the m_pos - - for (int axis = 0; axis < 3; axis++) - { - if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || - pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) - { - return false; - } - } - return true; -} - -bool btAxisSweep3::testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB) -{ - //optimization 1: check the array index (memory address), instead of the m_pos - - for (int axis = 0; axis < 3; axis++) - { - if (axis != ignoreAxis) - { - if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || - pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) - { - return false; - } - } - } - - //optimization 2: only 2 axis need to be tested (conflicts with 'delayed removal' optimization) - - /*for (int axis = 0; axis < 3; axis++) - { - if (m_pEdges[axis][pHandleA->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleB->m_minEdges[axis]].m_pos || - m_pEdges[axis][pHandleB->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleA->m_minEdges[axis]].m_pos) - { - return false; - } - } - */ - - return true; -} - -void btAxisSweep3::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax) -{ -// assert(bounds.IsFinite()); - //assert(bounds.HasVolume()); - - Handle* pHandle = getHandle(handle); - - // quantize the new bounds - BP_FP_INT_TYPE min[3], max[3]; - quantize(min, aabbMin, 0); - quantize(max, aabbMax, 1); - - // update changed edges - for (int axis = 0; axis < 3; axis++) - { - BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis]; - BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis]; - - int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos; - int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos; - - m_pEdges[axis][emin].m_pos = min[axis]; - m_pEdges[axis][emax].m_pos = max[axis]; - - // expand (only adds overlaps) - if (dmin < 0) - sortMinDown(axis, emin); - - if (dmax > 0) - sortMaxUp(axis, emax); - - // shrink (only removes overlaps) - if (dmin > 0) - sortMinUp(axis, emin); - - if (dmax < 0) - sortMaxDown(axis, emax); - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - } - - -} - - - - -// sorting a min edge downwards can only ever *add* overlaps -void btAxisSweep3::sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) -{ - - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pPrev = pEdge - 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pEdge->m_pos < pPrev->m_pos) - { - Handle* pHandlePrev = getHandle(pPrev->m_handle); - - if (pPrev->IsMax()) - { - // if previous edge is a maximum check the bounds and add an overlap if necessary - if (updateOverlaps && testOverlap(axis,pHandleEdge, pHandlePrev)) - { - addOverlappingPair(pHandleEdge,pHandlePrev); - - //AddOverlap(pEdge->m_handle, pPrev->m_handle); - - } - - // update edge reference in other handle - pHandlePrev->m_maxEdges[axis]++; - } - else - pHandlePrev->m_minEdges[axis]++; - - pHandleEdge->m_minEdges[axis]--; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pPrev; - *pPrev = swap; - - // decrement - pEdge--; - pPrev--; - } - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - -} - -// sorting a min edge upwards can only ever *remove* overlaps -void btAxisSweep3::sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) -{ - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pNext = pEdge + 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) - { - Handle* pHandleNext = getHandle(pNext->m_handle); - - if (pNext->IsMax()) - { - // if next edge is maximum remove any overlap between the two handles - if (updateOverlaps) - { - /* - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pNext->m_handle); - btBroadphasePair tmpPair(*handle0,*handle1); - removeOverlappingPair(tmpPair); - */ - - } - - // update edge reference in other handle - pHandleNext->m_maxEdges[axis]--; - } - else - pHandleNext->m_minEdges[axis]--; - - pHandleEdge->m_minEdges[axis]++; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pNext; - *pNext = swap; - - // increment - pEdge++; - pNext++; - } - - -} - -// sorting a max edge downwards can only ever *remove* overlaps -void btAxisSweep3::sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) -{ - - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pPrev = pEdge - 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pEdge->m_pos < pPrev->m_pos) - { - Handle* pHandlePrev = getHandle(pPrev->m_handle); - - if (!pPrev->IsMax()) - { - // if previous edge was a minimum remove any overlap between the two handles - if (updateOverlaps) - { - //this is done during the overlappingpairarray iteration/narrowphase collision - /* - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pPrev->m_handle); - btBroadphasePair* pair = findPair(handle0,handle1); - //assert(pair); - - if (pair) - { - removeOverlappingPair(*pair); - } - */ - - } - - // update edge reference in other handle - pHandlePrev->m_minEdges[axis]++;; - } - else - pHandlePrev->m_maxEdges[axis]++; - - pHandleEdge->m_maxEdges[axis]--; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pPrev; - *pPrev = swap; - - // decrement - pEdge--; - pPrev--; - } - - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - -} - -// sorting a max edge upwards can only ever *add* overlaps -void btAxisSweep3::sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) -{ - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pNext = pEdge + 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) - { - Handle* pHandleNext = getHandle(pNext->m_handle); - - if (!pNext->IsMax()) - { - // if next edge is a minimum check the bounds and add an overlap if necessary - if (updateOverlaps && testOverlap(axis, pHandleEdge, pHandleNext)) - { - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pNext->m_handle); - addOverlappingPair(handle0,handle1); - } - - // update edge reference in other handle - pHandleNext->m_minEdges[axis]--; - } - else - pHandleNext->m_maxEdges[axis]--; - - pHandleEdge->m_maxEdges[axis]++; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pNext; - *pNext = swap; - - // increment - pEdge++; - pNext++; - } - + // 1 handle is reserved as sentinel + btAssert(maxHandles > 1 && maxHandles < 2147483647); } diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h index 57bbb368672..d36df6e6621 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h @@ -19,34 +19,24 @@ #ifndef AXIS_SWEEP_3_H #define AXIS_SWEEP_3_H -#include "../../LinearMath/btPoint3.h" -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btPoint3.h" +#include "LinearMath/btVector3.h" #include "btOverlappingPairCache.h" +#include "btBroadphaseInterface.h" #include "btBroadphaseProxy.h" - - -//Enable BP_USE_FIXEDPOINT_INT_32 if you need more then 32767 objects -//#define BP_USE_FIXEDPOINT_INT_32 1 - -#ifdef BP_USE_FIXEDPOINT_INT_32 - #define BP_FP_INT_TYPE unsigned int - #define BP_MAX_HANDLES 1500000 //arbitrary maximum number of handles - #define BP_HANDLE_SENTINEL 0x7fffffff - #define BP_HANDLE_MASK 0xfffffffe -#else - #define BP_FP_INT_TYPE unsigned short int - #define BP_MAX_HANDLES 32767 - #define BP_HANDLE_SENTINEL 0xffff - #define BP_HANDLE_MASK 0xfffe -#endif //BP_USE_FIXEDPOINT_INT_32 +#include "btOverlappingPairCallback.h" //#define DEBUG_BROADPHASE 1 -/// btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase. -/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using integer coordinates instead of floats. -/// The testOverlap check is optimized to check the array index, rather then the actual AABB coordinates/pos -class btAxisSweep3 : public btOverlappingPairCache +/// btAxisSweep3Internal is an internal template class that implements sweep and prune. +/// Dont use this class directly, use btAxisSweep3 or bt32BitAxisSweep3 instead. +template +class btAxisSweep3Internal : public btBroadphaseInterface { +protected: + + BP_FP_INT_TYPE m_bpHandleMask; + BP_FP_INT_TYPE m_handleSentinel; public: @@ -61,36 +51,44 @@ public: }; public: - class Handle : public btBroadphaseProxy + ATTRIBUTE_ALIGNED16(class) Handle : public btBroadphaseProxy { public: - + BT_DECLARE_ALIGNED_ALLOCATOR(); + // indexes into the edge arrays BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12 - BP_FP_INT_TYPE m_handleId; +// BP_FP_INT_TYPE m_uniqueId; BP_FP_INT_TYPE m_pad; //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject - inline void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;} - inline BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];} + SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;} + SIMD_FORCE_INLINE BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];} }; // 24 bytes + 24 for Edge structures = 44 bytes total per entry -private: +protected: btPoint3 m_worldAabbMin; // overall system bounds btPoint3 m_worldAabbMax; // overall system bounds btVector3 m_quantize; // scaling factor for quantization BP_FP_INT_TYPE m_numHandles; // number of active handles - int m_maxHandles; // max number of handles + BP_FP_INT_TYPE m_maxHandles; // max number of handles Handle* m_pHandles; // handles pool BP_FP_INT_TYPE m_firstFreeHandle; // free handles list Edge* m_pEdges[3]; // edge arrays for the 3 axes (each array has m_maxHandles * 2 + 2 sentinel entries) - int m_invalidPair; + btOverlappingPairCache* m_pairCache; + + ///btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache. + btOverlappingPairCallback* m_userPairCallback; + + bool m_ownsPairCache; + + int m_invalidPair; // allocation/deallocation BP_FP_INT_TYPE allocHandle(); @@ -108,29 +106,773 @@ private: void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const; - void sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); - void sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); - void sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); - void sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); + void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); + void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); + void sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); + void sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); public: - btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles = 16384); - virtual ~btAxisSweep3(); - virtual void refreshOverlappingPairs(); + btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0); + + virtual ~btAxisSweep3Internal(); + + + virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask); - void removeHandle(BP_FP_INT_TYPE handle); - void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax); - inline Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;} + BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher); + void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher); + void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher); + SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;} void processAllOverlappingPairs(btOverlapCallback* callback); //Broadphase Interface - virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask); - virtual void destroyProxy(btBroadphaseProxy* proxy); - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax); - bool testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher); + virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); + + bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + + btOverlappingPairCache* getOverlappingPairCache() + { + return m_pairCache; + } + const btOverlappingPairCache* getOverlappingPairCache() const + { + return m_pairCache; + } + + void setOverlappingPairUserCallback(btOverlappingPairCallback* pairCallback) + { + m_userPairCallback = pairCallback; + } + const btOverlappingPairCallback* getOverlappingPairUserCallback() const + { + return m_userPairCallback; + } +}; + +//////////////////////////////////////////////////////////////////// + + + + +#ifdef DEBUG_BROADPHASE +#include + +template +void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinality) +{ + int numEdges = m_pHandles[0].m_maxEdges[axis]; + printf("SAP Axis %d, numEdges=%d\n",axis,numEdges); + + int i; + for (i=0;im_handle); + int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis]; + char beginOrEnd; + beginOrEnd=pEdge->IsMax()?'E':'B'; + printf(" [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex); + } + + if (checkCardinality) + assert(numEdges == m_numHandles*2+1); +} +#endif //DEBUG_BROADPHASE + +template +btBroadphaseProxy* btAxisSweep3Internal::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher) +{ + (void)shapeType; + BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher); + + Handle* handle = getHandle(handleId); + + return handle; +} + + + +template +void btAxisSweep3Internal::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) +{ + Handle* handle = static_cast(proxy); + removeHandle(handle->m_uniqueId,dispatcher); +} + +template +void btAxisSweep3Internal::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher) +{ + Handle* handle = static_cast(proxy); + updateHandle(handle->m_uniqueId,aabbMin,aabbMax,dispatcher); + +} + + + + + +template +btAxisSweep3Internal::btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE maxHandles, btOverlappingPairCache* pairCache ) +:m_bpHandleMask(handleMask), +m_handleSentinel(handleSentinel), +m_pairCache(pairCache), +m_userPairCallback(0), +m_ownsPairCache(false), +m_invalidPair(0) +{ + if (!m_pairCache) + { + void* ptr = btAlignedAlloc(sizeof(btOverlappingPairCache),16); + m_pairCache = new(ptr) btOverlappingPairCache(); + m_ownsPairCache = true; + } + + //assert(bounds.HasVolume()); + + // init bounds + m_worldAabbMin = worldAabbMin; + m_worldAabbMax = worldAabbMax; + + btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin; + + BP_FP_INT_TYPE maxInt = m_handleSentinel; + + m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize; + + // allocate handles buffer and put all handles on free list + void* ptr = btAlignedAlloc(sizeof(Handle)*maxHandles,16); + m_pHandles = new(ptr) Handle[maxHandles]; + m_maxHandles = maxHandles; + m_numHandles = 0; + + // handle 0 is reserved as the null index, and is also used as the sentinel + m_firstFreeHandle = 1; + { + for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++) + m_pHandles[i].SetNextFree(i + 1); + m_pHandles[maxHandles - 1].SetNextFree(0); + } + + { + // allocate edge buffers + for (int i = 0; i < 3; i++) + { + void* ptr = btAlignedAlloc(sizeof(Edge)*maxHandles*2,16); + m_pEdges[i] = new(ptr) Edge[maxHandles * 2]; + } + } + //removed overlap management + + // make boundary sentinels + + m_pHandles[0].m_clientObject = 0; + + for (int axis = 0; axis < 3; axis++) + { + m_pHandles[0].m_minEdges[axis] = 0; + m_pHandles[0].m_maxEdges[axis] = 1; + + m_pEdges[axis][0].m_pos = 0; + m_pEdges[axis][0].m_handle = 0; + m_pEdges[axis][1].m_pos = m_handleSentinel; + m_pEdges[axis][1].m_handle = 0; +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + + } + +} + +template +btAxisSweep3Internal::~btAxisSweep3Internal() +{ + + for (int i = 2; i >= 0; i--) + { + btAlignedFree(m_pEdges[i]); + } + btAlignedFree(m_pHandles); + + if (m_ownsPairCache) + { + m_pairCache->~btOverlappingPairCache(); + btAlignedFree(m_pairCache); + } +} + +template +void btAxisSweep3Internal::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const +{ + btPoint3 clampedPoint(point); + + + + clampedPoint.setMax(m_worldAabbMin); + clampedPoint.setMin(m_worldAabbMax); + + btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize; + out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax); + out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax); + out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax); + +} + + +template +BP_FP_INT_TYPE btAxisSweep3Internal::allocHandle() +{ + assert(m_firstFreeHandle); + + BP_FP_INT_TYPE handle = m_firstFreeHandle; + m_firstFreeHandle = getHandle(handle)->GetNextFree(); + m_numHandles++; + + return handle; +} + +template +void btAxisSweep3Internal::freeHandle(BP_FP_INT_TYPE handle) +{ + assert(handle > 0 && handle < m_maxHandles); + + getHandle(handle)->SetNextFree(m_firstFreeHandle); + m_firstFreeHandle = handle; + + m_numHandles--; +} + + +template +BP_FP_INT_TYPE btAxisSweep3Internal::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher) +{ + // quantize the bounds + BP_FP_INT_TYPE min[3], max[3]; + quantize(min, aabbMin, 0); + quantize(max, aabbMax, 1); + + // allocate a handle + BP_FP_INT_TYPE handle = allocHandle(); + + + Handle* pHandle = getHandle(handle); + + pHandle->m_uniqueId = handle; + //pHandle->m_pOverlaps = 0; + pHandle->m_clientObject = pOwner; + pHandle->m_collisionFilterGroup = collisionFilterGroup; + pHandle->m_collisionFilterMask = collisionFilterMask; + + // compute current limit of edge arrays + BP_FP_INT_TYPE limit = m_numHandles * 2; + + + // insert new edges just inside the max boundary edge + for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++) + { + + m_pHandles[0].m_maxEdges[axis] += 2; + + m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1]; + + m_pEdges[axis][limit - 1].m_pos = min[axis]; + m_pEdges[axis][limit - 1].m_handle = handle; + + m_pEdges[axis][limit].m_pos = max[axis]; + m_pEdges[axis][limit].m_handle = handle; + + pHandle->m_minEdges[axis] = limit - 1; + pHandle->m_maxEdges[axis] = limit; + } + + // now sort the new edges to their correct position + sortMinDown(0, pHandle->m_minEdges[0], dispatcher,false); + sortMaxDown(0, pHandle->m_maxEdges[0], dispatcher,false); + sortMinDown(1, pHandle->m_minEdges[1], dispatcher,false); + sortMaxDown(1, pHandle->m_maxEdges[1], dispatcher,false); + sortMinDown(2, pHandle->m_minEdges[2], dispatcher,true); + sortMaxDown(2, pHandle->m_maxEdges[2], dispatcher,true); + + + return handle; +} + + +template +void btAxisSweep3Internal::removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher) +{ + + Handle* pHandle = getHandle(handle); + + //explicitly remove the pairs containing the proxy + //we could do it also in the sortMinUp (passing true) + //todo: compare performance + m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher); + + + // compute current limit of edge arrays + int limit = m_numHandles * 2; + + int axis; + + for (axis = 0;axis<3;axis++) + { + m_pHandles[0].m_maxEdges[axis] -= 2; + } + + // remove the edges by sorting them up to the end of the list + for ( axis = 0; axis < 3; axis++) + { + Edge* pEdges = m_pEdges[axis]; + BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis]; + pEdges[max].m_pos = m_handleSentinel; + + sortMaxUp(axis,max,dispatcher,false); + + + BP_FP_INT_TYPE i = pHandle->m_minEdges[axis]; + pEdges[i].m_pos = m_handleSentinel; + + + sortMinUp(axis,i,dispatcher,false); + + pEdges[limit-1].m_handle = 0; + pEdges[limit-1].m_pos = m_handleSentinel; + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis,false); +#endif //DEBUG_BROADPHASE + + + } + + + // free the handle + freeHandle(handle); + + +} + +extern int gOverlappingPairs; +#include + +template +void btAxisSweep3Internal::calculateOverlappingPairs(btDispatcher* dispatcher) +{ +#ifdef USE_LAZY_REMOVAL + + if (m_ownsPairCache) + { + + btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray(); + + //perform a sort, to find duplicates and to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; + + + int i; + + btBroadphasePair previousPair; + previousPair.m_pProxy0 = 0; + previousPair.m_pProxy1 = 0; + previousPair.m_algorithm = 0; + + + for (i=0;iprocessOverlap(pair); + } else + { + needsRemoval = true; + } + } else + { + //remove duplicate + needsRemoval = true; + //should have no algorithm + btAssert(!pair.m_algorithm); + } + + if (needsRemoval) + { + m_pairCache->cleanOverlappingPair(pair,dispatcher); + + // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + // m_overlappingPairArray.pop_back(); + pair.m_pProxy0 = 0; + pair.m_pProxy1 = 0; + m_invalidPair++; + gOverlappingPairs--; + } + + } + + ///if you don't like to skip the invalid pairs in the array, execute following code: + #define CLEAN_INVALID_PAIRS 1 + #ifdef CLEAN_INVALID_PAIRS + + //perform a sort, to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; + #endif//CLEAN_INVALID_PAIRS + + //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size()); + } +#endif //USE_LAZY_REMOVAL + + + + +} + + +template +bool btAxisSweep3Internal::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) +{ + const Handle* pHandleA = static_cast(proxy0); + const Handle* pHandleB = static_cast(proxy1); + + //optimization 1: check the array index (memory address), instead of the m_pos + + for (int axis = 0; axis < 3; axis++) + { + if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || + pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) + { + return false; + } + } + return true; +} + +template +bool btAxisSweep3Internal::testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB) +{ + //optimization 1: check the array index (memory address), instead of the m_pos + + for (int axis = 0; axis < 3; axis++) + { + if (axis != ignoreAxis) + { + if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || + pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) + { + return false; + } + } + } + + //optimization 2: only 2 axis need to be tested (conflicts with 'delayed removal' optimization) + + /*for (int axis = 0; axis < 3; axis++) + { + if (m_pEdges[axis][pHandleA->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleB->m_minEdges[axis]].m_pos || + m_pEdges[axis][pHandleB->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleA->m_minEdges[axis]].m_pos) + { + return false; + } + } + */ + + return true; +} + +template +void btAxisSweep3Internal::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher) +{ +// assert(bounds.IsFinite()); + //assert(bounds.HasVolume()); + + Handle* pHandle = getHandle(handle); + + // quantize the new bounds + BP_FP_INT_TYPE min[3], max[3]; + quantize(min, aabbMin, 0); + quantize(max, aabbMax, 1); + + // update changed edges + for (int axis = 0; axis < 3; axis++) + { + BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis]; + BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis]; + + int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos; + int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos; + + m_pEdges[axis][emin].m_pos = min[axis]; + m_pEdges[axis][emax].m_pos = max[axis]; + + // expand (only adds overlaps) + if (dmin < 0) + sortMinDown(axis, emin,dispatcher,true); + + if (dmax > 0) + sortMaxUp(axis, emax,dispatcher,true); + + // shrink (only removes overlaps) + if (dmin > 0) + sortMinUp(axis, emin,dispatcher,true); + + if (dmax < 0) + sortMaxDown(axis, emax,dispatcher,true); + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + } + + +} + + + + +// sorting a min edge downwards can only ever *add* overlaps +template +void btAxisSweep3Internal::sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) +{ + + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pPrev = pEdge - 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pEdge->m_pos < pPrev->m_pos) + { + Handle* pHandlePrev = getHandle(pPrev->m_handle); + + if (pPrev->IsMax()) + { + // if previous edge is a maximum check the bounds and add an overlap if necessary + if (updateOverlaps && testOverlap(axis,pHandleEdge, pHandlePrev)) + { + m_pairCache->addOverlappingPair(pHandleEdge,pHandlePrev); + if (m_userPairCallback) + m_userPairCallback->addOverlappingPair(pHandleEdge,pHandlePrev); + + //AddOverlap(pEdge->m_handle, pPrev->m_handle); + + } + + // update edge reference in other handle + pHandlePrev->m_maxEdges[axis]++; + } + else + pHandlePrev->m_minEdges[axis]++; + + pHandleEdge->m_minEdges[axis]--; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pPrev; + *pPrev = swap; + + // decrement + pEdge--; + pPrev--; + } + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + +} + +// sorting a min edge upwards can only ever *remove* overlaps +template +void btAxisSweep3Internal::sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) +{ + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pNext = pEdge + 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) + { + Handle* pHandleNext = getHandle(pNext->m_handle); + + if (pNext->IsMax()) + { +#ifndef USE_LAZY_REMOVAL + // if next edge is maximum remove any overlap between the two handles + if (updateOverlaps) + { + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pNext->m_handle); + + m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher); + if (m_userPairCallback) + m_userPairCallback->removeOverlappingPair(handle0,handle1); + + } +#endif //USE_LAZY_REMOVAL + + // update edge reference in other handle + pHandleNext->m_maxEdges[axis]--; + } + else + pHandleNext->m_minEdges[axis]--; + + pHandleEdge->m_minEdges[axis]++; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pNext; + *pNext = swap; + + // increment + pEdge++; + pNext++; + } + + +} + +// sorting a max edge downwards can only ever *remove* overlaps +template +void btAxisSweep3Internal::sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) +{ + + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pPrev = pEdge - 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pEdge->m_pos < pPrev->m_pos) + { + Handle* pHandlePrev = getHandle(pPrev->m_handle); + + if (!pPrev->IsMax()) + { + // if previous edge was a minimum remove any overlap between the two handles + if (updateOverlaps) + { + //this is done during the overlappingpairarray iteration/narrowphase collision +#ifndef USE_LAZY_REMOVAL + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pPrev->m_handle); + m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher); + if (m_userPairCallback) + m_userPairCallback->removeOverlappingPair(handle0,handle1); + +#endif //USE_LAZY_REMOVAL + + } + + // update edge reference in other handle + pHandlePrev->m_minEdges[axis]++;; + } + else + pHandlePrev->m_maxEdges[axis]++; + + pHandleEdge->m_maxEdges[axis]--; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pPrev; + *pPrev = swap; + + // decrement + pEdge--; + pPrev--; + } + + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + +} + +// sorting a max edge upwards can only ever *add* overlaps +template +void btAxisSweep3Internal::sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) +{ + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pNext = pEdge + 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) + { + Handle* pHandleNext = getHandle(pNext->m_handle); + + if (!pNext->IsMax()) + { + // if next edge is a minimum check the bounds and add an overlap if necessary + if (updateOverlaps && testOverlap(axis, pHandleEdge, pHandleNext)) + { + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pNext->m_handle); + m_pairCache->addOverlappingPair(handle0,handle1); + if (m_userPairCallback) + m_userPairCallback->addOverlappingPair(handle0,handle1); + } + + // update edge reference in other handle + pHandleNext->m_minEdges[axis]--; + } + else + pHandleNext->m_maxEdges[axis]--; + + pHandleEdge->m_maxEdges[axis]++; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pNext; + *pNext = swap; + + // increment + pEdge++; + pNext++; + } + +} + + + +//////////////////////////////////////////////////////////////////// + + +/// btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase. +/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using 16 bit integer coordinates instead of floats. +/// For large worlds and many objects, use bt32BitAxisSweep3 instead. bt32BitAxisSweep3 has higher precision and allows more then 16384 objects at the cost of more memory and bit of performance. +class btAxisSweep3 : public btAxisSweep3Internal +{ +public: + + btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0); + +}; + +/// bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune. +/// This comes at the cost of more memory per handle, and a bit slower performance. +/// It uses arrays rather then lists for storage of the 3 axis. +class bt32BitAxisSweep3 : public btAxisSweep3Internal +{ +public: + + bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0); }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h index b6ace03c07a..97ba20743d2 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h @@ -20,8 +20,10 @@ subject to the following restrictions: struct btDispatcherInfo; class btDispatcher; -struct btBroadphaseProxy; -#include "../../LinearMath/btVector3.h" +#include "btBroadphaseProxy.h" +class btOverlappingPairCache; + +#include "LinearMath/btVector3.h" ///BroadphaseInterface for aabb-overlapping object pairs class btBroadphaseInterface @@ -29,11 +31,15 @@ class btBroadphaseInterface public: virtual ~btBroadphaseInterface() {} - virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) =0; - virtual void destroyProxy(btBroadphaseProxy* proxy)=0; - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax)=0; - virtual void cleanProxyFromPairs(btBroadphaseProxy* proxy)=0; + virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) =0; + virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0; + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0; + ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb + virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0; + + virtual btOverlappingPairCache* getOverlappingPairCache()=0; + virtual const btOverlappingPairCache* getOverlappingPairCache() const =0; }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h index 40d9748ffa9..f0a462cce02 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h @@ -16,7 +16,8 @@ subject to the following restrictions: #ifndef BROADPHASE_PROXY_H #define BROADPHASE_PROXY_H -#include "../../LinearMath/btScalar.h" //for SIMD_FORCE_INLINE +#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE +#include "LinearMath/btAlignedAllocator.h" /// btDispatcher uses these types @@ -38,6 +39,7 @@ IMPLICIT_CONVEX_SHAPES_START_HERE, CONE_SHAPE_PROXYTYPE, CONVEX_SHAPE_PROXYTYPE, CYLINDER_SHAPE_PROXYTYPE, + UNIFORM_SCALING_SHAPE_PROXYTYPE, MINKOWSKI_SUM_SHAPE_PROXYTYPE, MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE, //concave shapes @@ -62,8 +64,10 @@ CONCAVE_SHAPES_END_HERE, ///btBroadphaseProxy -struct btBroadphaseProxy +ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy { + +BT_DECLARE_ALIGNED_ALLOCATOR(); ///optional filtering to cull potential collisions enum CollisionFilterGroups @@ -78,8 +82,27 @@ struct btBroadphaseProxy //Usually the client btCollisionObject or Rigidbody class void* m_clientObject; - short int m_collisionFilterGroup; - short int m_collisionFilterMask; + + ///in the case of btMultiSapBroadphase, we store the collifionFilterGroup/Mask in the m_multiSapParentProxy + union + { + struct + { + short int m_collisionFilterGroup; + short int m_collisionFilterMask; + }; + + void* m_multiSapParentProxy; + + }; + + int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc. + int m_unusedPadding; //making the structure 16 bytes, better for alignment etc. + + SIMD_FORCE_INLINE int getUid() + { + return m_uniqueId;//(int)this; + } //used for memory pools btBroadphaseProxy() :m_clientObject(0){} @@ -91,26 +114,28 @@ struct btBroadphaseProxy { } - static inline bool isPolyhedral(int proxyType) + + + static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType) { return (proxyType < IMPLICIT_CONVEX_SHAPES_START_HERE); } - static inline bool isConvex(int proxyType) + static SIMD_FORCE_INLINE bool isConvex(int proxyType) { return (proxyType < CONCAVE_SHAPES_START_HERE); } - static inline bool isConcave(int proxyType) + static SIMD_FORCE_INLINE bool isConcave(int proxyType) { return ((proxyType > CONCAVE_SHAPES_START_HERE) && (proxyType < CONCAVE_SHAPES_END_HERE)); } - static inline bool isCompound(int proxyType) + static SIMD_FORCE_INLINE bool isCompound(int proxyType) { return (proxyType == COMPOUND_SHAPE_PROXYTYPE); } - static inline bool isInfinite(int proxyType) + static SIMD_FORCE_INLINE bool isInfinite(int proxyType) { return (proxyType == STATIC_PLANE_PROXYTYPE); } @@ -125,7 +150,7 @@ struct btBroadphaseProxy; /// contains a pair of aabb-overlapping objects -struct btBroadphasePair +ATTRIBUTE_ALIGNED16(struct) btBroadphasePair { btBroadphasePair () : @@ -136,6 +161,8 @@ struct btBroadphasePair { } +BT_DECLARE_ALIGNED_ALLOCATOR(); + btBroadphasePair(const btBroadphasePair& other) : m_pProxy0(other.m_pProxy0), m_pProxy1(other.m_pProxy1), @@ -181,6 +208,7 @@ SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePa */ + class btBroadphasePairSortPredicate { public: diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp index 2ad0c86d8a2..c95d1be0f2c 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp @@ -18,6 +18,6 @@ subject to the following restrictions: btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) { - m_dispatcher = ci.m_dispatcher; + m_dispatcher = ci.m_dispatcher1; } diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h index 55cec386a7b..610eab4ce5e 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef COLLISION_ALGORITHM_H #define COLLISION_ALGORITHM_H -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btScalar.h" struct btBroadphaseProxy; class btDispatcher; @@ -29,17 +29,17 @@ class btPersistentManifold; struct btCollisionAlgorithmConstructionInfo { btCollisionAlgorithmConstructionInfo() - :m_dispatcher(0), + :m_dispatcher1(0), m_manifold(0) { } btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp) - :m_dispatcher(dispatcher) + :m_dispatcher1(dispatcher) { (void)temp; } - btDispatcher* m_dispatcher; + btDispatcher* m_dispatcher1; btPersistentManifold* m_manifold; int getDispatcherId(); diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h index 3d958cc8fef..daea11f7788 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef _DISPATCHER_H #define _DISPATCHER_H -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btScalar.h" class btCollisionAlgorithm; struct btBroadphaseProxy; @@ -81,12 +81,18 @@ public: virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1)=0; - virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo)=0; + virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher)=0; virtual int getNumManifolds() const = 0; virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0; + virtual btPersistentManifold** getInternalManifoldPointer() = 0; + + virtual void* allocateCollisionAlgorithm(int size) = 0; + + virtual void freeCollisionAlgorithm(void* ptr) = 0; + }; diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp new file mode 100644 index 00000000000..41406ff49f9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp @@ -0,0 +1,204 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btMultiSapBroadphase.h" + +#include "btSimpleBroadphase.h" +#include "LinearMath/btAabbUtil2.h" + +/// btSapBroadphaseArray m_sapBroadphases; + +/// btOverlappingPairCache* m_overlappingPairs; +extern int gOverlappingPairs; + +btMultiSapBroadphase::btMultiSapBroadphase(int maxProxies,btOverlappingPairCache* pairCache) +:m_overlappingPairs(pairCache), +m_ownsPairCache(false), +m_invalidPair(0) +{ + if (!m_overlappingPairs) + { + m_ownsPairCache = true; + void* mem = btAlignedAlloc(sizeof(btOverlappingPairCache),16); + m_overlappingPairs = new (mem)btOverlappingPairCache(); + } + + struct btMultiSapOverlapFilterCallback : public btOverlapFilterCallback + { + virtual ~btMultiSapOverlapFilterCallback() + {} + // return true when pairs need collision + virtual bool needBroadphaseCollision(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) const + { + btMultiSapBroadphase::btMultiSapProxy* multiSapProxy0 = (btMultiSapBroadphase::btMultiSapProxy*)childProxy0->m_multiSapParentProxy; + btMultiSapBroadphase::btMultiSapProxy* multiSapProxy1 = (btMultiSapBroadphase::btMultiSapProxy*)childProxy1->m_multiSapParentProxy; + + bool collides = (multiSapProxy0->m_collisionFilterGroup & multiSapProxy1->m_collisionFilterMask) != 0; + collides = collides && (multiSapProxy1->m_collisionFilterGroup & multiSapProxy0->m_collisionFilterMask); + + return collides; + } + }; + + void* mem = btAlignedAlloc(sizeof(btMultiSapOverlapFilterCallback),16); + m_filterCallback = new (mem)btMultiSapOverlapFilterCallback(); + + m_overlappingPairs->setOverlapFilterCallback(m_filterCallback); + mem = btAlignedAlloc(sizeof(btSimpleBroadphase),16); + m_simpleBroadphase = new (mem) btSimpleBroadphase(maxProxies,m_overlappingPairs); +} + +btMultiSapBroadphase::~btMultiSapBroadphase() +{ + if (m_ownsPairCache) + { + btAlignedFree(m_overlappingPairs); + } +} + +btBroadphaseProxy* btMultiSapBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) +{ + void* mem = btAlignedAlloc(sizeof(btMultiSapProxy),16); + btMultiSapProxy* proxy = new (mem)btMultiSapProxy(aabbMin, aabbMax,shapeType,userPtr, collisionFilterGroup,collisionFilterMask); + m_multiSapProxies.push_back(proxy); + + ///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision + ///this is needed to be able to calculate the aabb overlap + btBroadphaseProxy* simpleProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask, dispatcher); + simpleProxy->m_multiSapParentProxy = proxy; + + mem = btAlignedAlloc(sizeof(btChildProxy),16); + btChildProxy* childProxyRef = new btChildProxy(); + childProxyRef->m_proxy = simpleProxy; + childProxyRef->m_childBroadphase = m_simpleBroadphase; + proxy->m_childProxies.push_back(childProxyRef); + + ///this should deal with inserting/removal into child broadphases + setAabb(proxy,aabbMin,aabbMax,dispatcher); + return proxy; +} + +void btMultiSapBroadphase::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) +{ + ///not yet + btAssert(0); + +} +void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher) +{ + btMultiSapProxy* multiProxy = static_cast(proxy); + multiProxy->m_aabbMin = aabbMin; + multiProxy->m_aabbMax = aabbMax; + + for (int i=0;im_childProxies.size();i++) + { + btChildProxy* childProxyRef = multiProxy->m_childProxies[i]; + childProxyRef->m_childBroadphase->setAabb(childProxyRef->m_proxy,aabbMin,aabbMax,dispatcher); + } + +} + + ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb +void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) +{ + m_simpleBroadphase->calculateOverlappingPairs(dispatcher); + +#ifndef USE_HASH_PAIRCACHE + + btBroadphasePairArray& overlappingPairArray = m_overlappingPairs->getOverlappingPairArray(); + + //perform a sort, to find duplicates and to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; + + + btBroadphasePair previousPair; + previousPair.m_pProxy0 = 0; + previousPair.m_pProxy1 = 0; + previousPair.m_algorithm = 0; + + int i; + + for (i=0;iprocessOverlap(pair); + } else + { + needsRemoval = true; + } + } else + { + //remove duplicate + needsRemoval = true; + //should have no algorithm + btAssert(!pair.m_algorithm); + } + + if (needsRemoval) + { + m_overlappingPairs->cleanOverlappingPair(pair,dispatcher); + + // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + // m_overlappingPairArray.pop_back(); + pair.m_pProxy0 = 0; + pair.m_pProxy1 = 0; + m_invalidPair++; + gOverlappingPairs--; + } + + } + +///if you don't like to skip the invalid pairs in the array, execute following code: +#define CLEAN_INVALID_PAIRS 1 +#ifdef CLEAN_INVALID_PAIRS + + //perform a sort, to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; +#endif//CLEAN_INVALID_PAIRS + +#endif //USE_HASH_PAIRCACHE + +} + + +bool btMultiSapBroadphase::testAabbOverlap(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) +{ + btMultiSapProxy* multiSapProxy0 = (btMultiSapProxy*)childProxy0->m_multiSapParentProxy; + btMultiSapProxy* multiSapProxy1 = (btMultiSapProxy*)childProxy1->m_multiSapParentProxy; + + return TestAabbAgainstAabb2(multiSapProxy0->m_aabbMin,multiSapProxy0->m_aabbMax, + multiSapProxy1->m_aabbMin,multiSapProxy1->m_aabbMax); + +} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h new file mode 100644 index 00000000000..1ee609b8d1f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h @@ -0,0 +1,119 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#ifndef BT_MULTI_SAP_BROADPHASE +#define BT_MULTI_SAP_BROADPHASE + +#include "btBroadphaseInterface.h" +#include "LinearMath/btAlignedObjectArray.h" +#include "btOverlappingPairCache.h" + +class btAxisSweep3; +class btSimpleBroadphase; + + +typedef btAlignedObjectArray btSapBroadphaseArray; + +///multi SAP broadphase +///See http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=328 +///and http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329 +class btMultiSapBroadphase :public btBroadphaseInterface +{ + btSapBroadphaseArray m_sapBroadphases; + + btSimpleBroadphase* m_simpleBroadphase; + + btOverlappingPairCache* m_overlappingPairs; + + bool m_ownsPairCache; + + btOverlapFilterCallback* m_filterCallback; + + int m_invalidPair; + + struct btChildProxy + { + btBroadphaseProxy* m_proxy; + btBroadphaseInterface* m_childBroadphase; + }; + +public: + + struct btMultiSapProxy : public btBroadphaseProxy + { + + ///array with all the entries that this proxy belongs to + btAlignedObjectArray m_childProxies; + btVector3 m_aabbMin; + btVector3 m_aabbMax; + + int m_shapeType; + void* m_userPtr; + short int m_collisionFilterGroup; + short int m_collisionFilterMask; + + btMultiSapProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) + :m_aabbMin(aabbMin), + m_aabbMax(aabbMax), + m_shapeType(shapeType), + m_userPtr(userPtr), + m_collisionFilterGroup(collisionFilterGroup), + m_collisionFilterMask(collisionFilterMask) + { + + } + + + }; + +protected: + + btAlignedObjectArray m_multiSapProxies; + +public: + + btMultiSapBroadphase(int maxProxies = 16384,btOverlappingPairCache* pairCache=0); + + btSapBroadphaseArray getBroadphaseArray() + { + return m_sapBroadphases; + } + + const btSapBroadphaseArray getBroadphaseArray() const + { + return m_sapBroadphases; + } + + virtual ~btMultiSapBroadphase(); + + virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher); + virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); + + ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb + virtual void calculateOverlappingPairs(btDispatcher* dispatcher); + + bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + + virtual btOverlappingPairCache* getOverlappingPairCache() + { + return m_overlappingPairs; + } + virtual const btOverlappingPairCache* getOverlappingPairCache() const + { + return m_overlappingPairs; + } +}; + +#endif //BT_MULTI_SAP_BROADPHASE diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp index 60f0a41a9d7..e4ef043f064 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp @@ -23,11 +23,19 @@ subject to the following restrictions: int gOverlappingPairs = 0; +int gRemovePairs =0; +int gAddedPairs =0; +int gFindPairs =0; + btOverlappingPairCache::btOverlappingPairCache(): -m_blockedForChanges(false), -m_overlapFilterCallback(0) -//m_NumOverlapBroadphasePair(0) + m_overlapFilterCallback(0), + m_blockedForChanges(false) { + int initialAllocatedSize= 2; + m_overlappingPairArray.reserve(initialAllocatedSize); +#ifdef USE_HASH_PAIRCACHE + growTables(); +#endif //USE_HASH_PAIRCACHE } @@ -36,51 +44,373 @@ btOverlappingPairCache::~btOverlappingPairCache() //todo/test: show we erase/delete data, or is it automatic } - -void btOverlappingPairCache::removeOverlappingPair(btBroadphasePair& findPair) -{ - - int findIndex = m_overlappingPairArray.findLinearSearch(findPair); - if (findIndex < m_overlappingPairArray.size()) - { - gOverlappingPairs--; - btBroadphasePair& pair = m_overlappingPairArray[findIndex]; - cleanOverlappingPair(pair); - - m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.size()-1); - m_overlappingPairArray.pop_back(); - } -} - - -void btOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair) +void btOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) { if (pair.m_algorithm) { { - delete pair.m_algorithm;; + pair.m_algorithm->~btCollisionAlgorithm(); + dispatcher->freeCollisionAlgorithm(pair.m_algorithm); pair.m_algorithm=0; } } } +void btOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher) +{ + + class CleanPairCallback : public btOverlapCallback + { + btBroadphaseProxy* m_cleanProxy; + btOverlappingPairCache* m_pairCache; + btDispatcher* m_dispatcher; + + public: + CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) + :m_cleanProxy(cleanProxy), + m_pairCache(pairCache), + m_dispatcher(dispatcher) + { + } + virtual bool processOverlap(btBroadphasePair& pair) + { + if ((pair.m_pProxy0 == m_cleanProxy) || + (pair.m_pProxy1 == m_cleanProxy)) + { + m_pairCache->cleanOverlappingPair(pair,m_dispatcher); + } + return false; + } + + }; + + CleanPairCallback cleanPairs(proxy,this,dispatcher); + + processAllOverlappingPairs(&cleanPairs,dispatcher); + +} + +void btOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) +{ + + class RemovePairCallback : public btOverlapCallback + { + btBroadphaseProxy* m_obsoleteProxy; + + public: + RemovePairCallback(btBroadphaseProxy* obsoleteProxy) + :m_obsoleteProxy(obsoleteProxy) + { + } + virtual bool processOverlap(btBroadphasePair& pair) + { + return ((pair.m_pProxy0 == m_obsoleteProxy) || + (pair.m_pProxy1 == m_obsoleteProxy)); + } + + }; + + + RemovePairCallback removeCallback(proxy); + + processAllOverlappingPairs(&removeCallback,dispatcher); +} + + +#ifdef USE_HASH_PAIRCACHE -void btOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) + + + + +btBroadphasePair* btOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + gFindPairs++; + + int proxyId1 = proxy0->getUid(); + int proxyId2 = proxy1->getUid(); + + if (proxyId1 > proxyId2) + btSwap(proxyId1, proxyId2); + + int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); + + int index = m_hashTable[hash]; + while (index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false) + { + index = m_next[index]; + } + + if (index == BT_NULL_PAIR) + { + return NULL; + } + + btAssert(index < m_overlappingPairArray.size()); + + return &m_overlappingPairArray[index]; +} + +#include + +void btOverlappingPairCache::growTables() +{ + + int newCapacity = m_overlappingPairArray.capacity(); + + if (m_hashTable.size() < newCapacity) + { + //grow hashtable and next table + int curHashtableSize = m_hashTable.size(); + + m_hashTable.resize(newCapacity); + m_next.resize(newCapacity); + + + int i; + + for (i= 0; i < newCapacity; ++i) + { + m_hashTable[i] = BT_NULL_PAIR; + } + for (i = 0; i < newCapacity; ++i) + { + m_next[i] = BT_NULL_PAIR; + } + + for(i=0;igetUid(); + int proxyId2 = pair.m_pProxy1->getUid(); + if (proxyId1 > proxyId2) + btSwap(proxyId1, proxyId2); + int hashValue = getHash(proxyId1,proxyId2) & (m_overlappingPairArray.capacity()-1); // New hash value with new mask + m_next[i] = m_hashTable[hashValue]; + m_hashTable[hashValue] = i; + } + + + } +} + +btBroadphasePair* btOverlappingPairCache::internalAddPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) +{ + int proxyId1 = proxy0->getUid(); + int proxyId2 = proxy1->getUid(); + + if (proxyId1 > proxyId2) + btSwap(proxyId1, proxyId2); + + int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); + + + + btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash); + if (pair != NULL) + { + return pair; + } + + int count = m_overlappingPairArray.size(); + int oldCapacity = m_overlappingPairArray.capacity(); + void* mem = &m_overlappingPairArray.expand(); + int newCapacity = m_overlappingPairArray.capacity(); + + if (oldCapacity < newCapacity) + { + growTables(); + //hash with new capacity + hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); + } + + pair = new (mem) btBroadphasePair(*proxy0,*proxy1); +// pair->m_pProxy0 = proxy0; +// pair->m_pProxy1 = proxy1; + pair->m_algorithm = 0; + pair->m_userInfo = 0; + + + m_next[count] = m_hashTable[hash]; + m_hashTable[hash] = count; + + return pair; +} + + + +void* btOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1,btDispatcher* dispatcher) +{ + gRemovePairs++; + + int proxyId1 = proxy0->getUid(); + int proxyId2 = proxy1->getUid(); + + if (proxyId1 > proxyId2) + btSwap(proxyId1, proxyId2); + + int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); + + btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash); + if (pair == NULL) + { + return 0; + } + + cleanOverlappingPair(*pair,dispatcher); + + void* userData = pair->m_userInfo; + + btAssert(pair->m_pProxy0->getUid() == proxyId1); + btAssert(pair->m_pProxy1->getUid() == proxyId2); + + int pairIndex = int(pair - &m_overlappingPairArray[0]); + btAssert(pairIndex < m_overlappingPairArray.size()); + + // Remove the pair from the hash table. + int index = m_hashTable[hash]; + btAssert(index != BT_NULL_PAIR); + + int previous = BT_NULL_PAIR; + while (index != pairIndex) + { + previous = index; + index = m_next[index]; + } + + if (previous != BT_NULL_PAIR) + { + btAssert(m_next[previous] == pairIndex); + m_next[previous] = m_next[pairIndex]; + } + else + { + m_hashTable[hash] = m_next[pairIndex]; + } + + // We now move the last pair into spot of the + // pair being removed. We need to fix the hash + // table indices to support the move. + + int lastPairIndex = m_overlappingPairArray.size() - 1; + + // If the removed pair is the last pair, we are done. + if (lastPairIndex == pairIndex) + { + m_overlappingPairArray.pop_back(); + return userData; + } + + // Remove the last pair from the hash table. + const btBroadphasePair* last = &m_overlappingPairArray[lastPairIndex]; + int lastHash = getHash(last->m_pProxy0->getUid(), last->m_pProxy1->getUid()) & (m_overlappingPairArray.capacity()-1); + + index = m_hashTable[lastHash]; + btAssert(index != BT_NULL_PAIR); + + previous = BT_NULL_PAIR; + while (index != lastPairIndex) + { + previous = index; + index = m_next[index]; + } + + if (previous != BT_NULL_PAIR) + { + btAssert(m_next[previous] == lastPairIndex); + m_next[previous] = m_next[lastPairIndex]; + } + else + { + m_hashTable[lastHash] = m_next[lastPairIndex]; + } + + // Copy the last pair into the remove pair's spot. + m_overlappingPairArray[pairIndex] = m_overlappingPairArray[lastPairIndex]; + + // Insert the last pair into the hash table + m_next[pairIndex] = m_hashTable[lastHash]; + m_hashTable[lastHash] = pairIndex; + + m_overlappingPairArray.pop_back(); + + return userData; +} +#include + +void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher) +{ + + int i; + +// printf("m_overlappingPairArray.size()=%d\n",m_overlappingPairArray.size()); + for (i=0;iprocessOverlap(*pair)) + { + removeOverlappingPair(pair->m_pProxy0,pair->m_pProxy1,dispatcher); + + gOverlappingPairs--; + } else + { + i++; + } + } +} + +#else + + + + +void* btOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1, btDispatcher* dispatcher ) +{ +#ifndef USE_LAZY_REMOVAL + + btBroadphasePair findPair(*proxy0,*proxy1); + + int findIndex = m_overlappingPairArray.findLinearSearch(findPair); + if (findIndex < m_overlappingPairArray.size()) + { + gOverlappingPairs--; + btBroadphasePair& pair = m_overlappingPairArray[findIndex]; + void* userData = pair.m_userInfo; + cleanOverlappingPair(pair,dispatcher); + + m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1); + m_overlappingPairArray.pop_back(); + return userData; + } +#endif //USE_LAZY_REMOVAL + + return 0; +} + + + + + + + + +btBroadphasePair* btOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) { //don't add overlap with own assert(proxy0 != proxy1); if (!needsBroadphaseCollision(proxy0,proxy1)) - return; - - - btBroadphasePair pair(*proxy0,*proxy1); + return 0; - m_overlappingPairArray.push_back(pair); + void* mem = &m_overlappingPairArray.expand(); + btBroadphasePair* pair = new (mem) btBroadphasePair(*proxy0,*proxy1); gOverlappingPairs++; + return pair; } @@ -109,69 +439,14 @@ void btOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroa -void btOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy) -{ - - class CleanPairCallback : public btOverlapCallback - { - btBroadphaseProxy* m_cleanProxy; - btOverlappingPairCache* m_pairCache; - - public: - CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache) - :m_cleanProxy(cleanProxy), - m_pairCache(pairCache) - { - } - virtual bool processOverlap(btBroadphasePair& pair) - { - if ((pair.m_pProxy0 == m_cleanProxy) || - (pair.m_pProxy1 == m_cleanProxy)) - { - m_pairCache->cleanOverlappingPair(pair); - } - return false; - } - - }; - - CleanPairCallback cleanPairs(proxy,this); - - processAllOverlappingPairs(&cleanPairs); - -} -void btOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy) -{ - - class RemovePairCallback : public btOverlapCallback - { - btBroadphaseProxy* m_obsoleteProxy; - - public: - RemovePairCallback(btBroadphaseProxy* obsoleteProxy) - :m_obsoleteProxy(obsoleteProxy) - { - } - virtual bool processOverlap(btBroadphasePair& pair) - { - return ((pair.m_pProxy0 == m_obsoleteProxy) || - (pair.m_pProxy1 == m_obsoleteProxy)); - } - - }; - RemovePairCallback removeCallback(proxy); +#include - processAllOverlappingPairs(&removeCallback); -} - - - -void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback) +void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher) { int i; @@ -182,9 +457,9 @@ void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callb btBroadphasePair* pair = &m_overlappingPairArray[i]; if (callback->processOverlap(*pair)) { - cleanOverlappingPair(*pair); + cleanOverlappingPair(*pair,dispatcher); - m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + m_overlappingPairArray.swap(i,m_overlappingPairArray.capacity()-1); m_overlappingPairArray.pop_back(); gOverlappingPairs--; } else @@ -194,3 +469,6 @@ void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callb } } + + +#endif //USE_HASH_PAIRCACHE diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h index a81fe3264df..a387505d1be 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h @@ -20,8 +20,12 @@ subject to the following restrictions: #include "btBroadphaseInterface.h" #include "btBroadphaseProxy.h" -#include "../../LinearMath/btPoint3.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btPoint3.h" +#include "LinearMath/btAlignedObjectArray.h" +class btDispatcher; + +///disable the USE_HASH_PAIRCACHE define to use a pair manager that sorts the pairs to find duplicates/non-overlap +#define USE_HASH_PAIRCACHE 1 struct btOverlapCallback @@ -40,38 +44,226 @@ struct btOverlapFilterCallback virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0; }; +typedef btAlignedObjectArray btBroadphasePairArray; + +#ifdef USE_HASH_PAIRCACHE + + +/// Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com + +extern int gRemovePairs; +extern int gAddedPairs; +extern int gFindPairs; + +const int BT_NULL_PAIR=0xffffffff; + +class btOverlappingPairCache +{ + btBroadphasePairArray m_overlappingPairArray; + btOverlapFilterCallback* m_overlapFilterCallback; + bool m_blockedForChanges; + + +public: + btOverlappingPairCache(); + virtual ~btOverlappingPairCache(); + + + void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + + void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher); + + SIMD_FORCE_INLINE bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const + { + if (m_overlapFilterCallback) + return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1); + + bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0; + collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask); + + return collides; + } + + // Add a pair and return the new pair. If the pair already exists, + // no new pair is created and the old one is returned. + SIMD_FORCE_INLINE btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) + { + gAddedPairs++; + + if (!needsBroadphaseCollision(proxy0,proxy1)) + return 0; + + return internalAddPair(proxy0,proxy1); + } + + + + void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + + + virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher); + + btBroadphasePair* getOverlappingPairArrayPtr() + { + return &m_overlappingPairArray[0]; + } + + const btBroadphasePair* getOverlappingPairArrayPtr() const + { + return &m_overlappingPairArray[0]; + } + + btBroadphasePairArray& getOverlappingPairArray() + { + return m_overlappingPairArray; + } + + const btBroadphasePairArray& getOverlappingPairArray() const + { + return m_overlappingPairArray; + } + + void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher); + + + + btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); + + int GetCount() const { return m_overlappingPairArray.size(); } +// btBroadphasePair* GetPairs() { return m_pairs; } + + btOverlapFilterCallback* getOverlapFilterCallback() + { + return m_overlapFilterCallback; + } + + void setOverlapFilterCallback(btOverlapFilterCallback* callback) + { + m_overlapFilterCallback = callback; + } + + int getNumOverlappingPairs() const + { + return m_overlappingPairArray.size(); + } +private: + + btBroadphasePair* internalAddPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + + void growTables(); + + SIMD_FORCE_INLINE bool equalsPair(const btBroadphasePair& pair, int proxyId1, int proxyId2) + { + return pair.m_pProxy0->getUid() == proxyId1 && pair.m_pProxy1->getUid() == proxyId2; + } + + /* + // Thomas Wang's hash, see: http://www.concentric.net/~Ttwang/tech/inthash.htm + // This assumes proxyId1 and proxyId2 are 16-bit. + SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2) + { + int key = (proxyId2 << 16) | proxyId1; + key = ~key + (key << 15); + key = key ^ (key >> 12); + key = key + (key << 2); + key = key ^ (key >> 4); + key = key * 2057; + key = key ^ (key >> 16); + return key; + } + */ + + + + SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2) + { + int key = ((unsigned int)proxyId1) | (((unsigned int)proxyId1) <<16); + // Thomas Wang's hash + + key += ~(key << 15); + key ^= (key >> 10); + key += (key << 3); + key ^= (key >> 6); + key += ~(key << 11); + key ^= (key >> 16); + return key; + } + + + + + + SIMD_FORCE_INLINE btBroadphasePair* internalFindPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, int hash) + { + int proxyId1 = proxy0->getUid(); + int proxyId2 = proxy1->getUid(); + if (proxyId1 > proxyId2) + btSwap(proxyId1, proxyId2); + + int index = m_hashTable[hash]; + + while( index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false) + { + index = m_next[index]; + } + + if ( index == BT_NULL_PAIR ) + { + return NULL; + } + + btAssert(index < m_overlappingPairArray.size()); + + return &m_overlappingPairArray[index]; + } + + +public: + + btAlignedObjectArray m_hashTable; + btAlignedObjectArray m_next; + +}; + + + +#else//USE_HASH_PAIRCACHE + +#define USE_LAZY_REMOVAL 1 + ///btOverlappingPairCache maintains the objects with overlapping AABB ///Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase -class btOverlappingPairCache : public btBroadphaseInterface +class btOverlappingPairCache { protected: //avoid brute-force finding all the time - btAlignedObjectArray m_overlappingPairArray; - + btBroadphasePairArray m_overlappingPairArray; + //during the dispatch, check that user doesn't destroy/create proxy bool m_blockedForChanges; //if set, use the callback instead of the built in filter in needBroadphaseCollision btOverlapFilterCallback* m_overlapFilterCallback; + public: btOverlappingPairCache(); virtual ~btOverlappingPairCache(); - virtual void processAllOverlappingPairs(btOverlapCallback*); + virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher); - void removeOverlappingPair(btBroadphasePair& pair); + void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher); - void cleanOverlappingPair(btBroadphasePair& pair); + void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher); - void addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - void cleanProxyFromPairs(btBroadphaseProxy* proxy); + void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy); + void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const @@ -84,10 +276,19 @@ class btOverlappingPairCache : public btBroadphaseInterface return collides; } - + + btBroadphasePairArray& getOverlappingPairArray() + { + return m_overlappingPairArray; + } + + const btBroadphasePairArray& getOverlappingPairArray() const + { + return m_overlappingPairArray; + } + - virtual void refreshOverlappingPairs() =0; btBroadphasePair* getOverlappingPairArrayPtr() { @@ -115,6 +316,8 @@ class btOverlappingPairCache : public btBroadphaseInterface } }; +#endif //USE_HASH_PAIRCACHE + #endif //OVERLAPPING_PAIR_CACHE_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h new file mode 100644 index 00000000000..b8d967dc4b2 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h @@ -0,0 +1,37 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef OVERLAPPING_PAIR_CALLBACK_H +#define OVERLAPPING_PAIR_CALLBACK_H + +///btOverlappingPairCallback provides user callback to keep track of overlap between objects, like a collision sensor +class btOverlappingPairCallback +{ +public: + virtual ~btOverlappingPairCallback() + { + + } + + virtual void addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; + + virtual void removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; + + virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0) = 0; + +}; + +#endif //OVERLAPPING_PAIR_CALLBACK_H \ No newline at end of file diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp index 30bcbe0c5f1..e0bb0992933 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp @@ -22,75 +22,78 @@ subject to the following restrictions: #include "LinearMath/btMatrix3x3.h" #include +extern int gOverlappingPairs; void btSimpleBroadphase::validate() { - for (int i=0;i=0;i--) + if (m_ownsPairCache) { - BP_Proxy* proxy = m_pProxies[i]; - destroyProxy(proxy); + m_pairCache->~btOverlappingPairCache(); + btAlignedFree(m_pairCache); } - */ } -btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask) +btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) { - if (m_numProxies >= m_maxProxies) + if (m_numHandles >= m_maxHandles) { - assert(0); + btAssert(0); return 0; //should never happen, but don't let the game crash ;-) } - assert(min[0]<= max[0] && min[1]<= max[1] && min[2]<= max[2]); + assert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]); - int freeIndex= m_freeProxies[m_firstFreeProxy]; - btSimpleBroadphaseProxy* proxy = new (&m_proxies[freeIndex])btSimpleBroadphaseProxy(min,max,shapeType,userPtr,collisionFilterGroup,collisionFilterMask); - m_firstFreeProxy++; - - btSimpleBroadphaseProxy* proxy1 = &m_proxies[0]; - - int index = int(proxy - proxy1); - btAssert(index == freeIndex); - - m_pProxies[m_numProxies] = proxy; - m_numProxies++; - //validate(); + int newHandleIndex = allocHandle(); + btSimpleBroadphaseProxy* proxy = new (&m_pHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask); return proxy; } @@ -124,34 +127,19 @@ protected: }; }; -void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg) +void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg,btDispatcher* dispatcher) { - int i; - btSimpleBroadphaseProxy* proxy0 = static_cast(proxyOrg); - btSimpleBroadphaseProxy* proxy1 = &m_proxies[0]; - - int index = int(proxy0 - proxy1); - btAssert (index < m_maxProxies); - m_freeProxies[--m_firstFreeProxy] = index; + freeHandle(proxy0); + + m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg,dispatcher); - removeOverlappingPairsContainingProxy(proxyOrg); - - for (i=0;im_min = aabbMin; @@ -186,37 +174,139 @@ public: } }; -void btSimpleBroadphase::refreshOverlappingPairs() +void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) { //first check for new overlapping pairs int i,j; - for (i=0;i= 0) { - btBroadphaseProxy* proxy0 = m_pProxies[i]; - for (j=i+1;jfindPair(proxy0,proxy1)) + { + m_pairCache->addOverlappingPair(proxy0,proxy1); + } + } else + { + #ifdef USE_HASH_PAIRCACHE + if ( m_pairCache->findPair(proxy0,proxy1)) + { + m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher); + } + #endif //USE_HASH_PAIRCACHE + + } } + proxy1 = &m_pHandles[proxy1->GetNextAllocated()]; + } + proxy0 = &m_pHandles[proxy0->GetNextAllocated()]; } + + #ifndef USE_HASH_PAIRCACHE + + if (m_ownsPairCache) + { + + btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray(); + + //perform a sort, to find duplicates and to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; + + + btBroadphasePair previousPair; + previousPair.m_pProxy0 = 0; + previousPair.m_pProxy1 = 0; + previousPair.m_algorithm = 0; + + + for (i=0;iprocessOverlap(pair); + } else + { + needsRemoval = true; + } + } else + { + //remove duplicate + needsRemoval = true; + //should have no algorithm + btAssert(!pair.m_algorithm); + } + + if (needsRemoval) + { + m_pairCache->cleanOverlappingPair(pair,dispatcher); + + // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + // m_overlappingPairArray.pop_back(); + pair.m_pProxy0 = 0; + pair.m_pProxy1 = 0; + m_invalidPair++; + gOverlappingPairs--; + } + + } + + ///if you don't like to skip the invalid pairs in the array, execute following code: + #define CLEAN_INVALID_PAIRS 1 + #ifdef CLEAN_INVALID_PAIRS + + //perform a sort, to sort 'invalid' pairs to the end + overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; + #endif//CLEAN_INVALID_PAIRS + + } + #endif //USE_HASH_PAIRCACHE } - - - CheckOverlapCallback checkOverlap; - - processAllOverlappingPairs(&checkOverlap); - - } +bool btSimpleBroadphase::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) +{ + btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0); + btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1); + return aabbOverlap(p0,p1); +} + + + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h index fb155e7047c..09367a79d2b 100644 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h @@ -24,6 +24,10 @@ struct btSimpleBroadphaseProxy : public btBroadphaseProxy { btVector3 m_min; btVector3 m_max; + int m_nextFree; + int m_nextAllocated; +// int m_handleId; + btSimpleBroadphaseProxy() {}; @@ -34,25 +38,64 @@ struct btSimpleBroadphaseProxy : public btBroadphaseProxy (void)shapeType; } + + SIMD_FORCE_INLINE void SetNextFree(int next) {m_nextFree = next;} + SIMD_FORCE_INLINE int GetNextFree() const {return m_nextFree;} + + SIMD_FORCE_INLINE void SetNextAllocated(int next) {m_nextAllocated = next;} + SIMD_FORCE_INLINE int GetNextAllocated() const {return m_nextAllocated;} + }; ///SimpleBroadphase is a brute force aabb culling broadphase based on O(n^2) aabb checks -class btSimpleBroadphase : public btOverlappingPairCache +///btSimpleBroadphase is just a unit-test implementation to verify and test other broadphases. +///So please don't use this class, but use bt32BitAxisSweep3 or btAxisSweep3 instead! +class btSimpleBroadphase : public btBroadphaseInterface { protected: - btSimpleBroadphaseProxy* m_proxies; - int* m_freeProxies; - int m_firstFreeProxy; + int m_numHandles; // number of active handles + int m_maxHandles; // max number of handles + btSimpleBroadphaseProxy* m_pHandles; // handles pool + int m_firstFreeHandle; // free handles list + int m_firstAllocatedHandle; - btSimpleBroadphaseProxy** m_pProxies; - int m_numProxies; + int allocHandle() + { - + int freeHandle = m_firstFreeHandle; + m_firstFreeHandle = m_pHandles[freeHandle].GetNextFree(); + + m_pHandles[freeHandle].SetNextAllocated(m_firstAllocatedHandle); + m_firstAllocatedHandle = freeHandle; + + m_numHandles++; + + return freeHandle; + } + + void freeHandle(btSimpleBroadphaseProxy* proxy) + { + int handle = int(proxy-m_pHandles); + btAssert(handle >= 0 && handle < m_maxHandles); + + proxy->SetNextFree(m_firstFreeHandle); + m_firstFreeHandle = handle; + + m_firstAllocatedHandle = proxy->GetNextAllocated(); + proxy->SetNextAllocated(-1); + + m_numHandles--; + } + + + btOverlappingPairCache* m_pairCache; + bool m_ownsPairCache; + + int m_invalidPair; - int m_maxProxies; inline btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy) @@ -67,24 +110,33 @@ protected: protected: - virtual void refreshOverlappingPairs(); + + public: - btSimpleBroadphase(int maxProxies=16384); + btSimpleBroadphase(int maxProxies=16384,btOverlappingPairCache* overlappingPairCache=0); virtual ~btSimpleBroadphase(); static bool aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1); - virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask); + virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher); + virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - virtual void destroyProxy(btBroadphaseProxy* proxy); - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax); + virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); - - + btOverlappingPairCache* getOverlappingPairCache() + { + return m_pairCache; + } + const btOverlappingPairCache* getOverlappingPairCache() const + { + return m_pairCache; + } + bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); }; diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt index e565bf7edea..d2d3dc6fabf 100644 --- a/extern/bullet2/src/BulletCollision/CMakeLists.txt +++ b/extern/bullet2/src/BulletCollision/CMakeLists.txt @@ -8,6 +8,7 @@ ADD_LIBRARY(LibBulletCollision BroadphaseCollision/btBroadphaseProxy.cpp BroadphaseCollision/btCollisionAlgorithm.cpp BroadphaseCollision/btDispatcher.cpp + BroadphaseCollision/btMultiSapBroadphase.cpp BroadphaseCollision/btOverlappingPairCache.cpp BroadphaseCollision/btSimpleBroadphase.cpp CollisionDispatch/btCollisionDispatcher.cpp @@ -15,24 +16,30 @@ ADD_LIBRARY(LibBulletCollision CollisionDispatch/btCollisionWorld.cpp CollisionDispatch/btCompoundCollisionAlgorithm.cpp CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp + CollisionDispatch/btDefaultCollisionConfiguration.cpp CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp + CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp CollisionDispatch/btConvexConvexAlgorithm.cpp CollisionDispatch/btEmptyCollisionAlgorithm.cpp CollisionDispatch/btManifoldResult.cpp CollisionDispatch/btSimulationIslandManager.cpp CollisionDispatch/btUnionFind.cpp + CollisionDispatch/SphereTriangleDetector.cpp CollisionShapes/btBoxShape.cpp CollisionShapes/btBvhTriangleMeshShape.cpp + CollisionShapes/btCapsuleShape.cpp CollisionShapes/btCollisionShape.cpp CollisionShapes/btCompoundShape.cpp CollisionShapes/btConcaveShape.cpp CollisionShapes/btConeShape.cpp CollisionShapes/btConvexHullShape.cpp CollisionShapes/btConvexShape.cpp + CollisionShapes/btConvexInternalShape.cpp CollisionShapes/btConvexTriangleMeshShape.cpp CollisionShapes/btCylinderShape.cpp CollisionShapes/btEmptyShape.cpp + CollisionShapes/btHeightfieldTerrainShape.cpp CollisionShapes/btMinkowskiSumShape.cpp CollisionShapes/btMultiSphereShape.cpp CollisionShapes/btOptimizedBvh.cpp @@ -46,6 +53,7 @@ ADD_LIBRARY(LibBulletCollision CollisionShapes/btTriangleIndexVertexArray.cpp CollisionShapes/btTriangleMesh.cpp CollisionShapes/btTriangleMeshShape.cpp + CollisionShapes/btUniformScalingShape.cpp NarrowPhaseCollision/btContinuousConvexCollision.cpp NarrowPhaseCollision/btGjkEpa.cpp NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h index b32806a6846..0c817b221c8 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h @@ -16,8 +16,8 @@ subject to the following restrictions: #ifndef SPHERE_TRIANGLE_DETECTOR_H #define SPHERE_TRIANGLE_DETECTOR_H -#include "../NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "../../LinearMath/btPoint3.h" +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "LinearMath/btPoint3.h" class btSphereShape; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h new file mode 100644 index 00000000000..fad770ac26d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h @@ -0,0 +1,47 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_COLLISION_CONFIGURATION +#define BT_COLLISION_CONFIGURATION +struct btCollisionAlgorithmCreateFunc; + +class btStackAlloc; +class btPoolAllocator; + +///btCollisionConfiguration allows to configure Bullet collision detection +///stack allocator size, default collision algorithms and persistent manifold pool size +///todo: describe the meaning +class btCollisionConfiguration +{ + +public: + + virtual ~btCollisionConfiguration() + { + } + + ///memory pools + virtual btPoolAllocator* getPersistentManifoldPool() = 0; + + virtual btPoolAllocator* getCollisionAlgorithmPool() = 0; + + virtual btStackAlloc* getStackAllocator() = 0; + + virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0; + +}; + +#endif //BT_COLLISION_CONFIGURATION + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h index d51a59af7f0..c6728918d16 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef COLLISION_CREATE_FUNC #define COLLISION_CREATE_FUNC -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" typedef btAlignedObjectArray btCollisionObjectArray; class btCollisionAlgorithm; class btCollisionObject; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp index b535fac6563..644caf2677b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp @@ -19,69 +19,37 @@ subject to the following restrictions: #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" + #include "BulletCollision/CollisionShapes/btCollisionShape.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" +#include "LinearMath/btPoolAllocator.h" +#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h" int gNumManifold = 0; #include - -btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms): -m_count(0), -m_useIslands(true), -m_convexConvexCreateFunc(0), -m_convexConcaveCreateFunc(0), -m_swappedConvexConcaveCreateFunc(0), -m_compoundCreateFunc(0), -m_swappedCompoundCreateFunc(0), -m_emptyCreateFunc(0) -{ - (void)noDefaultAlgorithms; - int i; - setNearCallback(defaultNearCallback); - m_emptyCreateFunc = new btEmptyAlgorithm::CreateFunc; - for (i=0;igetCollisionAlgorithmPool(); + + m_persistentManifoldPoolAllocator = collisionConfiguration->getPersistentManifoldPool(); for (i=0;igetCollisionAlgorithmCreateFunc(i,j); assert(m_doubleDispatch[i][j]); } } @@ -89,8 +57,6 @@ btCollisionDispatcher::btCollisionDispatcher (): }; -#endif //BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION - void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc *createFunc) { @@ -99,12 +65,6 @@ void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int prox btCollisionDispatcher::~btCollisionDispatcher() { - delete m_convexConvexCreateFunc; - delete m_convexConcaveCreateFunc; - delete m_swappedConvexConcaveCreateFunc; - delete m_compoundCreateFunc; - delete m_swappedCompoundCreateFunc; - delete m_emptyCreateFunc; } btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1) @@ -117,7 +77,18 @@ btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1) btCollisionObject* body0 = (btCollisionObject*)b0; btCollisionObject* body1 = (btCollisionObject*)b1; - btPersistentManifold* manifold = new btPersistentManifold (body0,body1); + void* mem = 0; + + if (m_persistentManifoldPoolAllocator->getFreeCount()) + { + mem = m_persistentManifoldPoolAllocator->allocate(sizeof(btPersistentManifold)); + } else + { + mem = btAlignedAlloc(sizeof(btPersistentManifold),16); + + } + btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0); + manifold->m_index1a = m_manifoldsPtr.size(); m_manifoldsPtr.push_back(manifold); return manifold; @@ -137,13 +108,19 @@ void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold) //printf("releaseManifold: gNumManifold %d\n",gNumManifold); clearManifold(manifold); - ///todo: this can be improved a lot, linear search might be slow part! - int findIndex = m_manifoldsPtr.findLinearSearch(manifold); - if (findIndex < m_manifoldsPtr.size()) + int findIndex = manifold->m_index1a; + btAssert(findIndex < m_manifoldsPtr.size()); + m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1); + m_manifoldsPtr[findIndex]->m_index1a = findIndex; + m_manifoldsPtr.pop_back(); + + manifold->~btPersistentManifold(); + if (m_persistentManifoldPoolAllocator->validPtr(manifold)) { - m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1); - m_manifoldsPtr.pop_back(); - delete manifold; + m_persistentManifoldPoolAllocator->free(manifold); + } else + { + btAlignedFree(manifold); } } @@ -152,99 +129,19 @@ void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold) btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold) { - -#ifdef USE_DISPATCH_REGISTRY_ARRAY btCollisionAlgorithmConstructionInfo ci; - ci.m_dispatcher = this; + + ci.m_dispatcher1 = this; ci.m_manifold = sharedManifold; - btCollisionAlgorithm* algo = m_doubleDispatch[body0->getCollisionShape()->getShapeType()][body1->getCollisionShape()->getShapeType()] - ->CreateCollisionAlgorithm(ci,body0,body1); -#else - btCollisionAlgorithm* algo = internalFindAlgorithm(body0,body1); -#endif //USE_DISPATCH_REGISTRY_ARRAY + btCollisionAlgorithm* algo = m_doubleDispatch[body0->getCollisionShape()->getShapeType()][body1->getCollisionShape()->getShapeType()]->CreateCollisionAlgorithm(ci,body0,body1); + return algo; } -#ifndef BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION - -btCollisionAlgorithmCreateFunc* btCollisionDispatcher::internalFindCreateFunc(int proxyType0,int proxyType1) -{ - - if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConvex(proxyType1)) - { - return m_convexConvexCreateFunc; - } - - if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConcave(proxyType1)) - { - return m_convexConcaveCreateFunc; - } - - if (btBroadphaseProxy::isConvex(proxyType1) && btBroadphaseProxy::isConcave(proxyType0)) - { - return m_swappedConvexConcaveCreateFunc; - } - - if (btBroadphaseProxy::isCompound(proxyType0)) - { - return m_compoundCreateFunc; - } else - { - if (btBroadphaseProxy::isCompound(proxyType1)) - { - return m_swappedCompoundCreateFunc; - } - } - - //failed to find an algorithm - return m_emptyCreateFunc; -} - -#endif //BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION -#ifndef USE_DISPATCH_REGISTRY_ARRAY - -btCollisionAlgorithm* btCollisionDispatcher::internalFindAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold) -{ - m_count++; - - btCollisionAlgorithmConstructionInfo ci; - ci.m_dispatcher = this; - - if (body0->getCollisionShape()->isConvex() && body1->getCollisionShape()->isConvex() ) - { - return new btConvexConvexAlgorithm(sharedManifold,ci,body0,body1); - } - - if (body0->getCollisionShape()->isConvex() && body1->getCollisionShape()->isConcave()) - { - return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); - } - - if (body1->getCollisionShape()->isConvex() && body0->getCollisionShape()->isConcave()) - { - return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); - } - - if (body0->getCollisionShape()->isCompound()) - { - return new btCompoundCollisionAlgorithm(ci,body0,body1,false); - } else - { - if (body1->getCollisionShape()->isCompound()) - { - return new btCompoundCollisionAlgorithm(ci,body0,body1,true); - } - } - - //failed to find an algorithm - return new btEmptyAlgorithm(ci); - -} -#endif //USE_DISPATCH_REGISTRY_ARRAY bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionObject* body1) { @@ -316,13 +213,13 @@ public: }; -void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo) +void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) { //m_blockedForChanges = true; btCollisionPairCallback collisionCallback(dispatchInfo,this); - pairCache->processAllOverlappingPairs(&collisionCallback); + pairCache->processAllOverlappingPairs(&collisionCallback,dispatcher); //m_blockedForChanges = false; @@ -365,3 +262,26 @@ void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair, } } + + +void* btCollisionDispatcher::allocateCollisionAlgorithm(int size) +{ + if (m_collisionAlgorithmPoolAllocator->getFreeCount()) + { + return m_collisionAlgorithmPoolAllocator->allocate(size); + } + + //warn user for overflow? + return btAlignedAlloc(size,16); +} + +void btCollisionDispatcher::freeCollisionAlgorithm(void* ptr) +{ + if (m_collisionAlgorithmPoolAllocator->validPtr(ptr)) + { + m_collisionAlgorithmPoolAllocator->free(ptr); + } else + { + btAlignedFree(ptr); + } +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h index ca5aba8f01c..45aaa1bd90d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h @@ -16,17 +16,18 @@ subject to the following restrictions: #ifndef COLLISION__DISPATCHER_H #define COLLISION__DISPATCHER_H -#include "../BroadphaseCollision/btDispatcher.h" -#include "../NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/BroadphaseCollision/btDispatcher.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -#include "../CollisionDispatch/btManifoldResult.h" +#include "BulletCollision/CollisionDispatch/btManifoldResult.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "LinearMath/btAlignedObjectArray.h" class btIDebugDraw; class btOverlappingPairCache; - +class btPoolAllocator; +class btCollisionConfiguration; #include "btCollisionCreateFunc.h" @@ -51,21 +52,15 @@ class btCollisionDispatcher : public btDispatcher btNearCallback m_nearCallback; + btPoolAllocator* m_collisionAlgorithmPoolAllocator; + + btPoolAllocator* m_persistentManifoldPoolAllocator; + btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES]; - btCollisionAlgorithmCreateFunc* internalFindCreateFunc(int proxyType0,int proxyType1); - //default CreationFunctions, filling the m_doubleDispatch table - btCollisionAlgorithmCreateFunc* m_convexConvexCreateFunc; - btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc; - btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc; - btCollisionAlgorithmCreateFunc* m_compoundCreateFunc; - btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc; - btCollisionAlgorithmCreateFunc* m_emptyCreateFunc; + btCollisionConfiguration* m_collisionConfiguration; -#ifndef USE_DISPATCH_REGISTRY_ARRAY - btCollisionAlgorithm* internalFindAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold = 0); -#endif //USE_DISPATCH_REGISTRY_ARRAY public: @@ -92,11 +87,7 @@ public: return m_manifoldsPtr[index]; } - ///the default constructor creates/register default collision algorithms, for convex, compound and concave shape support - btCollisionDispatcher (); - - ///a special constructor that doesn't create/register the default collision algorithms - btCollisionDispatcher(bool noDefaultAlgorithms); + btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration); virtual ~btCollisionDispatcher(); @@ -114,7 +105,7 @@ public: virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1); - virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo); + virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher); void setNearCallback(btNearCallback nearCallback) { @@ -129,6 +120,25 @@ public: //by default, Bullet will use this near callback static void defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo); + virtual void* allocateCollisionAlgorithm(int size); + + virtual void freeCollisionAlgorithm(void* ptr); + + btCollisionConfiguration* getCollisionConfiguration() + { + return m_collisionConfiguration; + } + + const btCollisionConfiguration* getCollisionConfiguration() const + { + return m_collisionConfiguration; + } + + void setCollisionConfiguration(btCollisionConfiguration* config) + { + m_collisionConfiguration = config; + } + }; #endif //COLLISION__DISPATCHER_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp index d4c0a4e8cb3..6b72a131c4f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp @@ -13,15 +13,19 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ + #include "btCollisionObject.h" btCollisionObject::btCollisionObject() : m_broadphaseHandle(0), m_collisionShape(0), m_collisionFlags(0), + m_islandTag1(-1), + m_companionId(-1), m_activationState1(1), m_deactivationTime(btScalar(0.)), m_userObjectPointer(0), + m_internalOwner(0), m_hitFraction(btScalar(1.)), m_ccdSweptSphereRadius(btScalar(0.)), m_ccdSquareMotionThreshold(btScalar(0.)), @@ -55,3 +59,4 @@ void btCollisionObject::activate(bool forceActivation) } + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h index 9fb6a67c4a3..7c1ddbf1e2d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef COLLISION_OBJECT_H #define COLLISION_OBJECT_H -#include "../../LinearMath/btTransform.h" +#include "LinearMath/btTransform.h" //island management, m_activationState1 #define ACTIVE_TAG 1 @@ -27,7 +27,8 @@ subject to the following restrictions: struct btBroadphaseProxy; class btCollisionShape; -#include "../../LinearMath/btMotionState.h" +#include "LinearMath/btMotionState.h" +#include "LinearMath/btAlignedAllocator.h" @@ -89,6 +90,8 @@ protected: public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + enum CollisionFlags { CF_STATIC_OBJECT= 1, @@ -98,28 +101,28 @@ public: }; - inline bool mergesSimulationIslands() const + SIMD_FORCE_INLINE bool mergesSimulationIslands() const { ///static objects, kinematic and object without contact response don't merge islands return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0); } - inline bool isStaticObject() const { + SIMD_FORCE_INLINE bool isStaticObject() const { return (m_collisionFlags & CF_STATIC_OBJECT) != 0; } - inline bool isKinematicObject() const + SIMD_FORCE_INLINE bool isKinematicObject() const { return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0; } - inline bool isStaticOrKinematicObject() const + SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const { return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ; } - inline bool hasContactResponse() const { + SIMD_FORCE_INLINE bool hasContactResponse() const { return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0; } @@ -133,12 +136,12 @@ public: m_collisionShape = collisionShape; } - const btCollisionShape* getCollisionShape() const + SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_collisionShape; } - btCollisionShape* getCollisionShape() + SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() { return m_collisionShape; } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp index b49036a5b50..b4828508bcb 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp @@ -24,6 +24,9 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h" + #include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btQuickprof.h" @@ -32,23 +35,20 @@ subject to the following restrictions: //When the user doesn't provide dispatcher or broadphase, create basic versions (and delete them in destructor) #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" +#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h" -btCollisionWorld::btCollisionWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache, int stackSize) +btCollisionWorld::btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache, btCollisionConfiguration* collisionConfiguration) :m_dispatcher1(dispatcher), -m_broadphasePairCache(pairCache), -m_ownsDispatcher(false), -m_ownsBroadphasePairCache(false) +m_broadphasePairCache(pairCache) { - m_stackAlloc = new btStackAlloc(stackSize); + m_stackAlloc = collisionConfiguration->getStackAllocator(); m_dispatchInfo.m_stackAllocator = m_stackAlloc; } btCollisionWorld::~btCollisionWorld() { - m_stackAlloc->destroy(); - delete m_stackAlloc; //clean up remaining objects int i; @@ -62,15 +62,11 @@ btCollisionWorld::~btCollisionWorld() // // only clear the cached algorithms // - getBroadphase()->cleanProxyFromPairs(bp); - getBroadphase()->destroyProxy(bp); + getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1); + getBroadphase()->destroyProxy(bp,m_dispatcher1); } } - if (m_ownsDispatcher) - delete m_dispatcher1; - if (m_ownsBroadphasePairCache) - delete m_broadphasePairCache; } @@ -105,7 +101,8 @@ void btCollisionWorld::addCollisionObject(btCollisionObject* collisionObject,sho type, collisionObject, collisionFilterGroup, - collisionFilterMask + collisionFilterMask, + m_dispatcher1 )) ; @@ -130,11 +127,10 @@ void btCollisionWorld::performDiscreteCollisionDetection() for (int i=0;igetCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),aabbMin,aabbMax); - m_broadphasePairCache->setAabb(m_collisionObjects[i]->getBroadphaseHandle(),aabbMin,aabbMax); + m_broadphasePairCache->setAabb(m_collisionObjects[i]->getBroadphaseHandle(),aabbMin,aabbMax,m_dispatcher1); } - m_broadphasePairCache->refreshOverlappingPairs(); - + m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1); END_PROFILE("perform Broadphase Collision Detection"); @@ -142,13 +138,14 @@ void btCollisionWorld::performDiscreteCollisionDetection() btDispatcher* dispatcher = getDispatcher(); if (dispatcher) - dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache,dispatchInfo); + dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1); END_PROFILE("performDiscreteCollisionDetection"); } + void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject) { @@ -163,8 +160,8 @@ void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject) // // only clear the cached algorithms // - getBroadphase()->cleanProxyFromPairs(bp); - getBroadphase()->destroyProxy(bp); + getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1); + getBroadphase()->destroyProxy(bp,m_dispatcher1); collisionObject->setBroadphaseHandle(0); } } @@ -209,19 +206,28 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt btConvexShape* convexShape = (btConvexShape*) collisionShape; btVoronoiSimplexSolver simplexSolver; +#define USE_SUBSIMPLEX_CONVEX_CAST 1 +#ifdef USE_SUBSIMPLEX_CONVEX_CAST btSubsimplexConvexCast convexCaster(castShape,convexShape,&simplexSolver); - //GjkConvexCast convexCaster(castShape,convexShape,&simplexSolver); - //ContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0); - +#else + //btGjkConvexCast convexCaster(castShape,convexShape,&simplexSolver); + //btContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0); +#endif //#USE_SUBSIMPLEX_CONVEX_CAST + if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult)) { //add hit if (castResult.m_normal.length2() > btScalar(0.0001)) { - castResult.m_normal.normalize(); + if (castResult.m_fraction < resultCallback.m_closestHitFraction) { +#ifdef USE_SUBSIMPLEX_CONVEX_CAST + //rotate normal into worldspace + castResult.m_normal = rayFromTrans.getBasis() * castResult.m_normal; +#endif //USE_SUBSIMPLEX_CONVEX_CAST + castResult.m_normal.normalize(); btCollisionWorld::LocalRayResult localRayResult ( collisionObject, @@ -230,7 +236,8 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt castResult.m_fraction ); - resultCallback.AddSingleResult(localRayResult); + bool normalInWorldSpace = true; + resultCallback.AddSingleResult(localRayResult, normalInWorldSpace); } } @@ -279,7 +286,8 @@ void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const bt hitNormalLocal, hitFraction); - return m_resultCallback->AddSingleResult(rayResult); + bool normalInWorldSpace = false; + return m_resultCallback->AddSingleResult(rayResult,normalInWorldSpace); } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h index b6d80233ab7..bda03ccedeb 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h @@ -68,12 +68,12 @@ class btStackAlloc; class btCollisionShape; class btConvexShape; class btBroadphaseInterface; -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" #include "btCollisionObject.h" #include "btCollisionDispatcher.h" //for definition of btCollisionObjectArray -#include "../BroadphaseCollision/btOverlappingPairCache.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" +#include "LinearMath/btAlignedObjectArray.h" ///CollisionWorld is interface and container for the collision detection class btCollisionWorld @@ -90,15 +90,12 @@ protected: btStackAlloc* m_stackAlloc; - btOverlappingPairCache* m_broadphasePairCache; + btBroadphaseInterface* m_broadphasePairCache; - bool m_ownsDispatcher; - bool m_ownsBroadphasePairCache; - public: //this constructor doesn't own the dispatcher and paircache/broadphase - btCollisionWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache, int stackSize = 2*1024*1024); + btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphasePairCache, btCollisionConfiguration* collisionConfiguration); virtual ~btCollisionWorld(); @@ -110,7 +107,7 @@ public: btOverlappingPairCache* getPairCache() { - return m_broadphasePairCache; + return m_broadphasePairCache->getOverlappingPairCache(); } @@ -166,7 +163,7 @@ public: :m_closestHitFraction(btScalar(1.)) { } - virtual btScalar AddSingleResult(LocalRayResult& rayResult) = 0; + virtual btScalar AddSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace) = 0; }; struct ClosestRayResultCallback : public RayResultCallback @@ -185,7 +182,7 @@ public: btVector3 m_hitPointWorld; btCollisionObject* m_collisionObject; - virtual btScalar AddSingleResult(LocalRayResult& rayResult) + virtual btScalar AddSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace) { //caller already does the filter on the m_closestHitFraction @@ -193,7 +190,14 @@ public: m_closestHitFraction = rayResult.m_hitFraction; m_collisionObject = rayResult.m_collisionObject; - m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal; + if (normalInWorldSpace) + { + m_hitNormalWorld = rayResult.m_hitNormalLocal; + } else + { + ///need to transform normal into worldspace + m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal; + } m_hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction); return rayResult.m_hitFraction; } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp index 92f4c8b28a6..7c0c7a3b0a9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp @@ -19,7 +19,8 @@ subject to the following restrictions: btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) -:m_isSwapped(isSwapped) +:btCollisionAlgorithm(ci), +m_isSwapped(isSwapped) { btCollisionObject* colObj = m_isSwapped? body1 : body0; btCollisionObject* otherObj = m_isSwapped? body0 : body1; @@ -35,7 +36,7 @@ btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlg btCollisionShape* childShape = compoundShape->getChildShape(i); btCollisionShape* orgShape = colObj->getCollisionShape(); colObj->setCollisionShape( childShape ); - m_childCollisionAlgorithms[i] = ci.m_dispatcher->findAlgorithm(colObj,otherObj); + m_childCollisionAlgorithms[i] = ci.m_dispatcher1->findAlgorithm(colObj,otherObj); colObj->setCollisionShape( orgShape ); } } @@ -47,7 +48,8 @@ btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() int i; for (i=0;i~btCollisionAlgorithm(); + m_dispatcher->freeCollisionAlgorithm(m_childCollisionAlgorithms[i]); } } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h index 7091b233b46..a381d8b3c3f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h @@ -16,15 +16,16 @@ subject to the following restrictions: #ifndef COMPOUND_COLLISION_ALGORITHM_H #define COMPOUND_COLLISION_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../BroadphaseCollision/btDispatcher.h" -#include "../BroadphaseCollision/btBroadphaseInterface.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" -#include "../NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" class btDispatcher; -#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "btCollisionCreateFunc.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" +class btDispatcher; /// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes /// Place holder, not fully implemented yet @@ -47,7 +48,8 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btCompoundCollisionAlgorithm(ci,body0,body1,false); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm)); + return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,false); } }; @@ -55,7 +57,8 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btCompoundCollisionAlgorithm(ci,body0,body1,true); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm)); + return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,true); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp index 24ceacfd40d..559b633feb9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp @@ -29,7 +29,7 @@ subject to the following restrictions: btConvexConcaveCollisionAlgorithm::btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) : btCollisionAlgorithm(ci), m_isSwapped(isSwapped), -m_btConvexTriangleCallback(ci.m_dispatcher,body0,body1,isSwapped) +m_btConvexTriangleCallback(ci.m_dispatcher1,body0,body1,isSwapped) { } @@ -79,7 +79,7 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i //aabb filter is already applied! btCollisionAlgorithmConstructionInfo ci; - ci.m_dispatcher = m_dispatcher; + ci.m_dispatcher1 = m_dispatcher; btCollisionObject* ob = static_cast(m_triBody); @@ -115,7 +115,7 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i ob->setCollisionShape( &tm ); - btCollisionAlgorithm* colAlgo = ci.m_dispatcher->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr); + btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr); ///this should use the btDispatcher, so the actual registered algorithm is used // btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody); @@ -123,7 +123,8 @@ void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, i // cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex); // cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); colAlgo->processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); - delete colAlgo; + colAlgo->~btCollisionAlgorithm(); + ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo); ob->setCollisionShape( tmpShape ); } @@ -188,9 +189,10 @@ void btConvexConcaveCollisionAlgorithm::processCollision (btCollisionObject* bod concaveShape->processAllTriangles( &m_btConvexTriangleCallback,m_btConvexTriangleCallback.getAabbMin(),m_btConvexTriangleCallback.getAabbMax()); + resultOut->refreshContactPoints(); } - + } } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h index 4915b6c20c8..da33e988991 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h @@ -16,13 +16,13 @@ subject to the following restrictions: #ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H #define CONVEX_CONCAVE_COLLISION_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../BroadphaseCollision/btDispatcher.h" -#include "../BroadphaseCollision/btBroadphaseInterface.h" -#include "../CollisionShapes/btTriangleCallback.h" -#include "../NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" +#include "BulletCollision/CollisionShapes/btTriangleCallback.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" class btDispatcher; -#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "btCollisionCreateFunc.h" ///For each triangle in the concave mesh that overlaps with the AABB of a convex (m_convexProxy), processTriangle is called. @@ -55,11 +55,11 @@ int m_triangleCount; void clearCache(); - inline const btVector3& getAabbMin() const + SIMD_FORCE_INLINE const btVector3& getAabbMin() const { return m_aabbMin; } - inline const btVector3& getAabbMax() const + SIMD_FORCE_INLINE const btVector3& getAabbMax() const { return m_aabbMax; } @@ -94,7 +94,8 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm)); + return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); } }; @@ -102,7 +103,8 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm)); + return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp index 9105fe20b49..d1692cdac69 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp @@ -48,26 +48,16 @@ subject to the following restrictions: -btConvexConvexAlgorithm::CreateFunc::CreateFunc() -{ - m_ownsSolvers = true; - m_simplexSolver = new btVoronoiSimplexSolver(); - m_pdSolver = new btGjkEpaPenetrationDepthSolver; -} + btConvexConvexAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) { - m_ownsSolvers = false; m_simplexSolver = simplexSolver; m_pdSolver = pdSolver; } btConvexConvexAlgorithm::CreateFunc::~CreateFunc() { - if (m_ownsSolvers){ - delete m_simplexSolver; - delete m_pdSolver; - } } btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) @@ -152,6 +142,11 @@ void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btColl m_gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); #endif + if (m_ownManifold) + { + resultOut->refreshContactPoints(); + } + } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h index cbea9a92b75..ca58bce25f1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h @@ -16,12 +16,13 @@ subject to the following restrictions: #ifndef CONVEX_CONVEX_ALGORITHM_H #define CONVEX_CONVEX_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../NarrowPhaseCollision/btGjkPairDetector.h" -#include "../NarrowPhaseCollision/btPersistentManifold.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" #include "btCollisionCreateFunc.h" +#include "btCollisionDispatcher.h" class btConvexPenetrationDepthSolver; @@ -58,15 +59,15 @@ public: { btConvexPenetrationDepthSolver* m_pdSolver; btSimplexSolverInterface* m_simplexSolver; - bool m_ownsSolvers; CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); - CreateFunc(); + virtual ~CreateFunc(); virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConvexAlgorithm)); + return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp new file mode 100644 index 00000000000..661270b9bcb --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp @@ -0,0 +1,237 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btDefaultCollisionConfiguration.h" + +#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" + + + +#include "LinearMath/btStackAlloc.h" +#include "LinearMath/btPoolAllocator.h" + + + +#define DEFAULT_MAX_OVERLAPPING_PAIRS 65535 +#define DEFAULT_STACK_ALLOCATOR_SIZE (5*1024*1024) + + +btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btStackAlloc* stackAlloc,btPoolAllocator* persistentManifoldPool,btPoolAllocator* collisionAlgorithmPool) +{ + + void* mem = btAlignedAlloc(sizeof(btVoronoiSimplexSolver),16); + m_simplexSolver = new (mem)btVoronoiSimplexSolver(); + mem = btAlignedAlloc(sizeof(btGjkEpaPenetrationDepthSolver),16); + m_pdSolver = new (mem)btGjkEpaPenetrationDepthSolver; + + //default CreationFunctions, filling the m_doubleDispatch table + mem = btAlignedAlloc(sizeof(btConvexConvexAlgorithm::CreateFunc),16); + m_convexConvexCreateFunc = new(mem) btConvexConvexAlgorithm::CreateFunc(m_simplexSolver,m_pdSolver); + mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16); + m_convexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::CreateFunc; + mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16); + m_swappedConvexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::SwappedCreateFunc; + mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::CreateFunc),16); + m_compoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::CreateFunc; + mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::SwappedCreateFunc),16); + m_swappedCompoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::SwappedCreateFunc; + mem = btAlignedAlloc(sizeof(btEmptyAlgorithm::CreateFunc),16); + m_emptyCreateFunc = new(mem) btEmptyAlgorithm::CreateFunc; + + mem = btAlignedAlloc(sizeof(btSphereSphereCollisionAlgorithm::CreateFunc),16); + m_sphereSphereCF = new(mem) btSphereSphereCollisionAlgorithm::CreateFunc; + mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16); + m_sphereBoxCF = new(mem) btSphereBoxCollisionAlgorithm::CreateFunc; + mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16); + m_boxSphereCF = new (mem)btSphereBoxCollisionAlgorithm::CreateFunc; + m_boxSphereCF->m_swapped = true; + mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16); + m_sphereTriangleCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc; + mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16); + m_triangleSphereCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc; + m_triangleSphereCF->m_swapped = true; + + + ///calculate maximum element size, big enough to fit any collision algorithm in the memory pool + int maxSize = sizeof(btConvexConvexAlgorithm); + int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm); + int maxSize3 = sizeof(btCompoundCollisionAlgorithm); + int maxSize4 = sizeof(btEmptyAlgorithm); + + int collisionAlgorithmMaxElementSize = btMax(maxSize,maxSize2); + collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3); + collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize4); + + if (stackAlloc) + { + m_ownsStackAllocator = false; + this->m_stackAlloc = stackAlloc; + } else + { + m_ownsStackAllocator = true; + void* mem = btAlignedAlloc(sizeof(btStackAlloc),16); + m_stackAlloc = new(mem)btStackAlloc(DEFAULT_STACK_ALLOCATOR_SIZE); + } + + if (persistentManifoldPool) + { + m_ownsPersistentManifoldPool = false; + m_persistentManifoldPool = persistentManifoldPool; + } else + { + m_ownsPersistentManifoldPool = true; + void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16); + m_persistentManifoldPool = new (mem) btPoolAllocator(sizeof(btPersistentManifold),DEFAULT_MAX_OVERLAPPING_PAIRS); + } + + if (collisionAlgorithmPool) + { + m_ownsCollisionAlgorithmPool = false; + m_collisionAlgorithmPool = collisionAlgorithmPool; + } else + { + m_ownsCollisionAlgorithmPool = true; + void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16); + m_collisionAlgorithmPool = new(mem) btPoolAllocator(collisionAlgorithmMaxElementSize,DEFAULT_MAX_OVERLAPPING_PAIRS); + } + + +} + +btDefaultCollisionConfiguration::~btDefaultCollisionConfiguration() +{ + if (m_ownsStackAllocator) + { + m_stackAlloc->destroy(); + m_stackAlloc->~btStackAlloc(); + btAlignedFree(m_stackAlloc); + } + if (m_ownsCollisionAlgorithmPool) + { + m_collisionAlgorithmPool->~btPoolAllocator(); + btAlignedFree(m_collisionAlgorithmPool); + } + if (m_ownsPersistentManifoldPool) + { + m_persistentManifoldPool->~btPoolAllocator(); + btAlignedFree(m_persistentManifoldPool); + } + + m_convexConvexCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_convexConvexCreateFunc); + + m_convexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_convexConcaveCreateFunc); + m_swappedConvexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_swappedConvexConcaveCreateFunc); + + m_compoundCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_compoundCreateFunc); + + m_swappedCompoundCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_swappedCompoundCreateFunc); + + m_emptyCreateFunc->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_emptyCreateFunc); + + m_sphereSphereCF->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_sphereSphereCF); + + m_sphereBoxCF->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_sphereBoxCF); + m_boxSphereCF->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_boxSphereCF); + m_sphereTriangleCF->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_sphereTriangleCF); + m_triangleSphereCF->~btCollisionAlgorithmCreateFunc(); + btAlignedFree( m_triangleSphereCF); + + m_simplexSolver->~btVoronoiSimplexSolver(); + btAlignedFree(m_simplexSolver); + m_pdSolver->~btGjkEpaPenetrationDepthSolver(); + btAlignedFree(m_pdSolver); + + +} + + +btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) +{ + + + if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) + { + return m_sphereSphereCF; + } + + if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==BOX_SHAPE_PROXYTYPE)) + { + return m_sphereBoxCF; + } + + if ((proxyType0 == BOX_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) + { + return m_boxSphereCF; + } + + if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE ) && (proxyType1==TRIANGLE_SHAPE_PROXYTYPE)) + { + return m_sphereTriangleCF; + } + + if ((proxyType0 == TRIANGLE_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) + { + return m_triangleSphereCF; + } + + + if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConvex(proxyType1)) + { + return m_convexConvexCreateFunc; + } + + if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConcave(proxyType1)) + { + return m_convexConcaveCreateFunc; + } + + if (btBroadphaseProxy::isConvex(proxyType1) && btBroadphaseProxy::isConcave(proxyType0)) + { + return m_swappedConvexConcaveCreateFunc; + } + + if (btBroadphaseProxy::isCompound(proxyType0)) + { + return m_compoundCreateFunc; + } else + { + if (btBroadphaseProxy::isCompound(proxyType1)) + { + return m_swappedCompoundCreateFunc; + } + } + + //failed to find an algorithm + return m_emptyCreateFunc; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h new file mode 100644 index 00000000000..2e99f1db18f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h @@ -0,0 +1,87 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_DEFAULT_COLLISION_CONFIGURATION +#define BT_DEFAULT_COLLISION_CONFIGURATION + +#include "btCollisionConfiguration.h" +class btVoronoiSimplexSolver; +class btGjkEpaPenetrationDepthSolver; + + +///btCollisionConfiguration allows to configure Bullet collision detection +///stack allocator, pool memory allocators +///todo: describe the meaning +class btDefaultCollisionConfiguration : public btCollisionConfiguration +{ + + int m_persistentManifoldPoolSize; + + btStackAlloc* m_stackAlloc; + bool m_ownsStackAllocator; + + btPoolAllocator* m_persistentManifoldPool; + bool m_ownsPersistentManifoldPool; + + btPoolAllocator* m_collisionAlgorithmPool; + bool m_ownsCollisionAlgorithmPool; + + //default simplex/penetration depth solvers + btVoronoiSimplexSolver* m_simplexSolver; + btGjkEpaPenetrationDepthSolver* m_pdSolver; + + //default CreationFunctions, filling the m_doubleDispatch table + btCollisionAlgorithmCreateFunc* m_convexConvexCreateFunc; + btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc; + btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc; + btCollisionAlgorithmCreateFunc* m_compoundCreateFunc; + btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc; + btCollisionAlgorithmCreateFunc* m_emptyCreateFunc; + btCollisionAlgorithmCreateFunc* m_sphereSphereCF; + btCollisionAlgorithmCreateFunc* m_sphereBoxCF; + btCollisionAlgorithmCreateFunc* m_boxSphereCF; + btCollisionAlgorithmCreateFunc* m_sphereTriangleCF; + btCollisionAlgorithmCreateFunc* m_triangleSphereCF; + +public: + + btDefaultCollisionConfiguration(btStackAlloc* stackAlloc=0,btPoolAllocator* persistentManifoldPool=0,btPoolAllocator* collisionAlgorithmPool=0); + + virtual ~btDefaultCollisionConfiguration(); + + ///memory pools + virtual btPoolAllocator* getPersistentManifoldPool() + { + return m_persistentManifoldPool; + } + + virtual btPoolAllocator* getCollisionAlgorithmPool() + { + return m_collisionAlgorithmPool; + } + + virtual btStackAlloc* getStackAllocator() + { + return m_stackAlloc; + } + + + btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1); + + +}; + +#endif //BT_DEFAULT_COLLISION_CONFIGURATION + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h index b1a193d2cfd..89e7080780c 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h @@ -15,8 +15,9 @@ subject to the following restrictions: #ifndef EMPTY_ALGORITH #define EMPTY_ALGORITH -#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "btCollisionCreateFunc.h" +#include "btCollisionDispatcher.h" #define ATTRIBUTE_ALIGNED(a) @@ -39,7 +40,8 @@ public: { (void)body0; (void)body1; - return new btEmptyAlgorithm(ci); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btEmptyAlgorithm)); + return new(mem) btEmptyAlgorithm(ci); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp index 490acc0b611..61c4c231da4 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp @@ -79,12 +79,25 @@ void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const b } btManifoldPoint newPt(localA,localB,normalOnBInWorld,depth); - + newPt.m_positionWorldOnA = pointA; + newPt.m_positionWorldOnB = pointInWorld; + int insertIndex = m_manifoldPtr->getCacheEntry(newPt); newPt.m_combinedFriction = calculateCombinedFriction(m_body0,m_body1); newPt.m_combinedRestitution = calculateCombinedRestitution(m_body0,m_body1); + + ///todo, check this for any side effects + if (insertIndex >= 0) + { + //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex); + m_manifoldPtr->replaceContactPoint(newPt,insertIndex); + } else + { + m_manifoldPtr->AddManifoldPoint(newPt); + } + //User can override friction and/or restitution if (gContactAddedCallback && //and if either of the two bodies requires custom material @@ -97,13 +110,5 @@ void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const b (*gContactAddedCallback)(newPt,obj0,m_partId0,m_index0,obj1,m_partId1,m_index1); } - if (insertIndex >= 0) - { - //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex); - m_manifoldPtr->replaceContactPoint(newPt,insertIndex); - } else - { - m_manifoldPtr->AddManifoldPoint(newPt); - } } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h index 77192625513..5aac9a46f6a 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h @@ -18,12 +18,12 @@ subject to the following restrictions: #define MANIFOLD_RESULT_H class btCollisionObject; -class btPersistentManifold; +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" class btManifoldPoint; #include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "../../LinearMath/btTransform.h" +#include "LinearMath/btTransform.h" typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1); extern ContactAddedCallback gContactAddedCallback; @@ -60,6 +60,15 @@ public: m_manifoldPtr = manifoldPtr; } + const btPersistentManifold* getPersistentManifold() const + { + return m_manifoldPtr; + } + btPersistentManifold* getPersistentManifold() + { + return m_manifoldPtr; + } + virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) { m_partId0=partId0; @@ -70,6 +79,22 @@ public: virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth); + SIMD_FORCE_INLINE void refreshContactPoints() + { + btAssert(m_manifoldPtr); + if (!m_manifoldPtr->getNumContacts()) + return; + + bool isSwapped = m_manifoldPtr->getBody0() != m_body0; + + if (isSwapped) + { + m_manifoldPtr->refreshContactPoints(m_rootTransB,m_rootTransA); + } else + { + m_manifoldPtr->refreshContactPoints(m_rootTransA,m_rootTransB); + } + } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp index ac2e8554c3a..6c42d1706ff 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp @@ -25,17 +25,17 @@ void btSimulationIslandManager::initUnionFind(int n) } -void btSimulationIslandManager::findUnions(btDispatcher* dispatcher) +void btSimulationIslandManager::findUnions(btDispatcher* dispatcher,btCollisionWorld* colWorld) { { - for (int i=0;igetNumManifolds();i++) - { - const btPersistentManifold* manifold = dispatcher->getManifoldByIndexInternal(i); - //static objects (invmass btScalar(0.)) don't merge ! + btBroadphasePair* pairPtr = colWorld->getPairCache()->getOverlappingPairArrayPtr(); - const btCollisionObject* colObj0 = static_cast(manifold->getBody0()); - const btCollisionObject* colObj1 = static_cast(manifold->getBody1()); + for (int i=0;igetPairCache()->getNumOverlappingPairs();i++) + { + const btBroadphasePair& collisionPair = pairPtr[i]; + btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject; + btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject; if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && ((colObj1) && ((colObj1)->mergesSimulationIslands()))) @@ -71,7 +71,7 @@ void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld } // do the union find - findUnions(dispatcher); + findUnions(dispatcher,colWorld); @@ -138,19 +138,6 @@ class btPersistentManifoldSortPredicate void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback) { - - - /*if (0) - { - int maxNumManifolds = dispatcher->getNumManifolds(); - btCollisionDispatcher* colDis = (btCollisionDispatcher*)dispatcher; - btPersistentManifold** manifold = colDis->getInternalManifoldPointer(); - callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, 0); - return; - } - */ - - BEGIN_PROFILE("islandUnionFindAndHeapSort"); //we are going to sort the unionfind array, and store the element id in the size @@ -247,11 +234,17 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, } } - btAlignedObjectArray islandmanifold; + int i; int maxNumManifolds = dispatcher->getNumManifolds(); - islandmanifold.reserve(maxNumManifolds); +#define SPLIT_ISLANDS 1 +#ifdef SPLIT_ISLANDS + + +#endif //SPLIT_ISLANDS + + for (i=0;igetManifoldByIndexInternal(i); @@ -265,29 +258,35 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, { //kinematic objects don't merge islands, but wake up all connected objects - if (colObj0->isStaticOrKinematicObject() && colObj0->getActivationState() != ISLAND_SLEEPING) + if (colObj0->isKinematicObject() && colObj0->getActivationState() != ISLAND_SLEEPING) { colObj1->activate(); } - if (colObj1->isStaticOrKinematicObject() && colObj1->getActivationState() != ISLAND_SLEEPING) + if (colObj1->isKinematicObject() && colObj1->getActivationState() != ISLAND_SLEEPING) { colObj0->activate(); } - - //filtering for response +#ifdef SPLIT_ISLANDS + // //filtering for response if (dispatcher->needsResponse(colObj0,colObj1)) - islandmanifold.push_back(manifold); + m_islandmanifold.push_back(manifold); +#endif //SPLIT_ISLANDS } } - int numManifolds = int (islandmanifold.size()); - +#ifndef SPLIT_ISLANDS + btPersistentManifold** manifold = dispatcher->getInternalManifoldPointer(); + + callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, -1); +#else // Sort manifolds, based on islands // Sort the vector using predicate and std::sort //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate); + int numManifolds = int (m_islandmanifold.size()); + //we should do radix sort, it it much faster (O(n) instead of O (n log2(n)) - islandmanifold.heapSort(btPersistentManifoldSortPredicate()); + m_islandmanifold.heapSort(btPersistentManifoldSortPredicate()); //now process all active islands (sets of manifolds for now) @@ -298,8 +297,9 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, END_PROFILE("islandUnionFindAndHeapSort"); - btAlignedObjectArray islandBodies; + +// printf("Start Islands\n"); //traverse the simulation islands, and call the solver, unless all objects are sleeping/deactivated for ( startIslandIndex=0;startIslandIndexisActive()) islandSleeping = true; } @@ -325,12 +325,12 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, if (startManifoldIndexProcessIsland(&islandBodies[0],islandBodies.size(),startManifold,numIslandManifolds, islandId); + callback->ProcessIsland(&m_islandBodies[0],m_islandBodies.size(),startManifold,numIslandManifolds, islandId); +// printf("Island callback of size:%d bodies, %d manifolds\n",islandBodies.size(),numIslandManifolds); } if (numIslandManifolds) @@ -350,8 +351,9 @@ void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher, startManifoldIndex = endManifoldIndex; } - islandBodies.resize(0); + m_islandBodies.resize(0); } +#endif //SPLIT_ISLANDS - + m_islandmanifold.resize(0); } diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h index d91ed1c20eb..01a059b5fbe 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h @@ -16,18 +16,26 @@ subject to the following restrictions: #ifndef SIMULATION_ISLAND_MANAGER_H #define SIMULATION_ISLAND_MANAGER_H -#include "../CollisionDispatch/btUnionFind.h" +#include "BulletCollision/CollisionDispatch/btUnionFind.h" #include "btCollisionCreateFunc.h" +#include "LinearMath/btAlignedObjectArray.h" + class btCollisionObject; class btCollisionWorld; class btDispatcher; +class btPersistentManifold; + ///SimulationIslandManager creates and handles simulation islands, using btUnionFind class btSimulationIslandManager { btUnionFind m_unionFind; + btAlignedObjectArray m_islandmanifold; + btAlignedObjectArray m_islandBodies; + + public: btSimulationIslandManager(); virtual ~btSimulationIslandManager(); @@ -42,7 +50,7 @@ public: virtual void storeIslandActivationState(btCollisionWorld* world); - void findUnions(btDispatcher* dispatcher); + void findUnions(btDispatcher* dispatcher,btCollisionWorld* colWorld); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp index 05556bd34e2..1e4bbce451d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp @@ -68,18 +68,25 @@ void btSphereBoxCollisionAlgorithm::processCollision (btCollisionObject* body0,b btScalar dist = getSphereDistance(boxObj,pOnBox,pOnSphere,sphereCenter,radius); + resultOut->setPersistentManifold(m_manifoldPtr); + if (dist < SIMD_EPSILON) { btVector3 normalOnSurfaceB = (pOnBox- pOnSphere).normalize(); /// report a contact. internally this will be kept persistent, and contact reduction is done - resultOut->setPersistentManifold(m_manifoldPtr); resultOut->addContactPoint(normalOnSurfaceB,pOnBox,dist); } - + if (m_ownManifold) + { + if (m_manifoldPtr->getNumContacts()) + { + resultOut->refreshContactPoints(); + } + } } @@ -102,8 +109,8 @@ btScalar btSphereBoxCollisionAlgorithm::getSphereDistance(btCollisionObject* box btVector3 bounds[2]; btBoxShape* boxShape= (btBoxShape*)boxObj->getCollisionShape(); - bounds[0] = -boxShape->getHalfExtents(); - bounds[1] = boxShape->getHalfExtents(); + bounds[0] = -boxShape->getHalfExtentsWithoutMargin(); + bounds[1] = boxShape->getHalfExtentsWithoutMargin(); margins = boxShape->getMargin();//also add sphereShape margin? @@ -209,6 +216,10 @@ btScalar btSphereBoxCollisionAlgorithm::getSpherePenetration( btCollisionObject* btVector3 p0, tmp, prel, n[6], normal; btScalar fSep = btScalar(-10000000.0), fSepThis; + // set p0 and normal to a default value to shup up GCC + p0.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); + normal.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); + n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) ); n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) ); n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) ); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h index 07592909200..b839dc4adb1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h @@ -16,11 +16,13 @@ subject to the following restrictions: #ifndef SPHERE_BOX_COLLISION_ALGORITHM_H #define SPHERE_BOX_COLLISION_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../CollisionDispatch/btCollisionCreateFunc.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" class btPersistentManifold; -#include "../../LinearMath/btVector3.h" +#include "btCollisionDispatcher.h" + +#include "LinearMath/btVector3.h" /// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. /// Other features are frame-coherency (persistent data) and collision response. @@ -48,12 +50,13 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereBoxCollisionAlgorithm)); if (!m_swapped) { - return new btSphereBoxCollisionAlgorithm(0,ci,body0,body1,false); + return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,false); } else { - return new btSphereBoxCollisionAlgorithm(0,ci,body0,body1,true); + return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,true); } } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp index 424ff432f84..e7f42647e61 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp @@ -46,6 +46,8 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0 if (!m_manifoldPtr) return; + resultOut->setPersistentManifold(m_manifoldPtr); + btSphereShape* sphere0 = (btSphereShape*)col0->getCollisionShape(); btSphereShape* sphere1 = (btSphereShape*)col1->getCollisionShape(); @@ -54,10 +56,13 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0 btScalar radius0 = sphere0->getRadius(); btScalar radius1 = sphere1->getRadius(); + m_manifoldPtr->clearManifold(); + ///iff distance positive, don't generate a new contact if ( len > (radius0+radius1)) + { return; - + } ///distance (negative means penetration) btScalar dist = len - (radius0+radius1); @@ -68,9 +73,12 @@ void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0 btVector3 pos1 = col1->getWorldTransform().getOrigin() + radius1* normalOnSurfaceB; /// report a contact. internally this will be kept persistent, and contact reduction is done - resultOut->setPersistentManifold(m_manifoldPtr); + + resultOut->addContactPoint(normalOnSurfaceB,pos1,dist); + //no resultOut->refreshContactPoints(); needed, because of clearManifold (all points are new) + } btScalar btSphereSphereCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h index 7a19ff31edf..bcaa0d303a9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h @@ -16,9 +16,11 @@ subject to the following restrictions: #ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H #define SPHERE_SPHERE_COLLISION_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../CollisionDispatch/btCollisionCreateFunc.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" +#include "btCollisionDispatcher.h" + class btPersistentManifold; /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. @@ -46,7 +48,8 @@ public: { virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btSphereSphereCollisionAlgorithm(0,ci,body0,body1); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereSphereCollisionAlgorithm)); + return new(mem) btSphereSphereCollisionAlgorithm(0,ci,body0,body1); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp index b011b707e3f..5d50bfed7a1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp @@ -48,8 +48,11 @@ void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* co if (!m_manifoldPtr) return; - btSphereShape* sphere = (btSphereShape*)col0->getCollisionShape(); - btTriangleShape* triangle = (btTriangleShape*)col1->getCollisionShape(); + btCollisionObject* sphereObj = m_swapped? col1 : col0; + btCollisionObject* triObj = m_swapped? col0 : col1; + + btSphereShape* sphere = (btSphereShape*)sphereObj->getCollisionShape(); + btTriangleShape* triangle = (btTriangleShape*)triObj->getCollisionShape(); /// report a contact. internally this will be kept persistent, and contact reduction is done resultOut->setPersistentManifold(m_manifoldPtr); @@ -62,6 +65,9 @@ void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* co detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); + if (m_ownManifold) + resultOut->refreshContactPoints(); + } btScalar btSphereTriangleCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h index 57c6e6af619..4aefc0c43a5 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h @@ -16,10 +16,11 @@ subject to the following restrictions: #ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H #define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H -#include "../BroadphaseCollision/btCollisionAlgorithm.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../CollisionDispatch/btCollisionCreateFunc.h" +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" class btPersistentManifold; +#include "btCollisionDispatcher.h" /// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. /// Other features are frame-coherency (persistent data) and collision response. @@ -49,7 +50,9 @@ public: virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) { - return new btSphereTriangleCollisionAlgorithm(ci.m_manifold,ci,body0,body1,m_swapped); + void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereTriangleCollisionAlgorithm)); + + return new(mem) btSphereTriangleCollisionAlgorithm(ci.m_manifold,ci,body0,body1,m_swapped); } }; diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp index 62254335796..c81be8aa75c 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp @@ -18,6 +18,7 @@ subject to the following restrictions: + btUnionFind::~btUnionFind() { Free(); diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h index 236cc33b94f..820c8bc858e 100644 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef UNION_FIND_H #define UNION_FIND_H -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" #define USE_PATH_COMPRESSION 1 @@ -46,11 +46,11 @@ class btUnionFind void reset(int N); - inline int getNumElements() const + SIMD_FORCE_INLINE int getNumElements() const { return int(m_elements.size()); } - inline bool isRoot(int x) const + SIMD_FORCE_INLINE bool isRoot(int x) const { return (x == m_elements[x].m_id); } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp index 636b0046c13..adac455bbcb 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp @@ -15,16 +15,13 @@ subject to the following restrictions: #include "btBoxShape.h" -btVector3 btBoxShape::getHalfExtents() const -{ - return m_implicitShapeDimensions * m_localScaling; -} + //{ void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const { - btVector3 halfExtents = getHalfExtents(); + const btVector3& halfExtents = getHalfExtentsWithoutMargin(); btMatrix3x3 abs_b = t.getBasis().absolute(); btPoint3 center = t.getOrigin(); @@ -40,10 +37,10 @@ void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabb } -void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { //btScalar margin = btScalar(0.); - btVector3 halfExtents = getHalfExtents(); + btVector3 halfExtents = getHalfExtentsWithMargin(); btScalar lx=btScalar(2.)*(halfExtents.x()); btScalar ly=btScalar(2.)*(halfExtents.y()); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h index bc42f146c7c..98f1bd34b09 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h @@ -18,9 +18,9 @@ subject to the following restrictions: #include "btPolyhedralConvexShape.h" #include "btCollisionMargin.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" -#include "../../LinearMath/btPoint3.h" -#include "../../LinearMath/btSimdMinMax.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "LinearMath/btPoint3.h" +#include "LinearMath/btMinMax.h" ///btBoxShape implements both a feature based (vertex/edge/plane) and implicit (getSupportingVertex) Box class btBoxShape: public btPolyhedralConvexShape @@ -31,47 +31,52 @@ class btBoxShape: public btPolyhedralConvexShape public: - btVector3 getHalfExtents() const; - + btVector3 getHalfExtentsWithMargin() const + { + btVector3 halfExtents = getHalfExtentsWithoutMargin(); + btVector3 margin(getMargin(),getMargin(),getMargin()); + halfExtents += margin; + return halfExtents; + } + + const btVector3& getHalfExtentsWithoutMargin() const + { + return m_implicitShapeDimensions;//changed in Bullet 2.63: assume the scaling and margin are included + } + + virtual int getShapeType() const { return BOX_SHAPE_PROXYTYPE;} virtual btVector3 localGetSupportingVertex(const btVector3& vec) const { + btVector3 halfExtents = getHalfExtentsWithoutMargin(); + btVector3 margin(getMargin(),getMargin(),getMargin()); + halfExtents += margin; - btVector3 halfExtents = getHalfExtents(); - - btVector3 supVertex; - supVertex = btPoint3(vec.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), - vec.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), - vec.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); - - return supVertex; + return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()), + btFsels(vec.y(), halfExtents.y(), -halfExtents.y()), + btFsels(vec.z(), halfExtents.z(), -halfExtents.z())); } - virtual inline btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const + SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - btVector3 halfExtents = getHalfExtents(); - btVector3 margin(getMargin(),getMargin(),getMargin()); - halfExtents -= margin; - - return btVector3(vec.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), - vec.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), - vec.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); + const btVector3& halfExtents = getHalfExtentsWithoutMargin(); + + return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()), + btFsels(vec.y(), halfExtents.y(), -halfExtents.y()), + btFsels(vec.z(), halfExtents.z(), -halfExtents.z())); } virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const { - btVector3 halfExtents = getHalfExtents(); - btVector3 margin(getMargin(),getMargin(),getMargin()); - halfExtents -= margin; - - + const btVector3& halfExtents = getHalfExtentsWithoutMargin(); + for (int i=0;icalculateAabbBruteForce(bvhAabbMin,bvhAabbMax); - m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + + if (buildBvh) + { + void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); + m_bvh = new (mem) btOptimizedBvh(); + m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + m_ownsBvh = true; + } #endif //DISABLE_BVH } -btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax) -:btTriangleMeshShape(meshInterface),m_useQuantizedAabbCompression(useQuantizedAabbCompression) +btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,bool buildBvh) +:btTriangleMeshShape(meshInterface), +m_bvh(0), +m_useQuantizedAabbCompression(useQuantizedAabbCompression), +m_ownsBvh(false) { //construct bvh from meshInterface #ifndef DISABLE_BVH - m_bvh = new btOptimizedBvh(); - m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + if (buildBvh) + { + void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); + m_bvh = new (mem) btOptimizedBvh(); + + m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + m_ownsBvh = true; + } #endif //DISABLE_BVH @@ -67,7 +85,11 @@ void btBvhTriangleMeshShape::refitTree() btBvhTriangleMeshShape::~btBvhTriangleMeshShape() { - delete m_bvh; + if (m_ownsBvh) + { + m_bvh->~btOptimizedBvh(); + btAlignedFree(m_bvh); + } } //perform bvh tree traversal and report overlapping triangles to 'callback' @@ -163,9 +185,14 @@ void btBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling) if ((getLocalScaling() -scaling).length2() > SIMD_EPSILON) { btTriangleMeshShape::setLocalScaling(scaling); - delete m_bvh; + if (m_ownsBvh) + { + m_bvh->~btOptimizedBvh(); + btAlignedFree(m_bvh); + } ///m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work - m_bvh = new btOptimizedBvh(); + void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); + m_bvh = new(mem) btOptimizedBvh(); //rebuild the bvh... m_bvh->build(m_meshInterface,m_useQuantizedAabbCompression,m_localAabbMin,m_localAabbMax); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h index 4914d9f959c..95c73b2441f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -18,6 +18,7 @@ subject to the following restrictions: #include "btTriangleMeshShape.h" #include "btOptimizedBvh.h" +#include "LinearMath/btAlignedAllocator.h" ///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. ///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. @@ -26,15 +27,18 @@ ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape btOptimizedBvh* m_bvh; bool m_useQuantizedAabbCompression; - bool m_pad[12];////need padding due to alignment + bool m_ownsBvh; + bool m_pad[11];////need padding due to alignment public: - btBvhTriangleMeshShape() :btTriangleMeshShape(0) {}; - btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression); + BT_DECLARE_ALIGNED_ALLOCATOR(); + + btBvhTriangleMeshShape() :btTriangleMeshShape(0),m_bvh(0),m_ownsBvh(false) {}; + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true); ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb - btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax); + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true); virtual ~btBvhTriangleMeshShape(); @@ -56,7 +60,7 @@ public: void partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax); //debugging - virtual char* getName()const {return "BVHTRIANGLEMESH";} + virtual const char* getName()const {return "BVHTRIANGLEMESH";} virtual void setLocalScaling(const btVector3& scaling); @@ -65,6 +69,17 @@ public: { return m_bvh; } + + + void setOptimizedBvh(btOptimizedBvh* bvh) + { + btAssert(!m_bvh); + btAssert(!m_ownsBvh); + + m_bvh = bvh; + m_ownsBvh = false; + } + bool usesQuantizedAabbCompression() const { return m_useQuantizedAabbCompression; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp index b7e15172da2..b4f21f38b3d 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp @@ -112,7 +112,7 @@ btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) } -void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { //as an approximation, take the inertia of the box that bounds the spheres diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h index 27da8adefa5..0b566450fef 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h @@ -16,20 +16,20 @@ subject to the following restrictions: #ifndef BT_CAPSULE_SHAPE_H #define BT_CAPSULE_SHAPE_H -#include "btConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "btConvexInternalShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types ///btCapsuleShape represents a capsule around the Y axis ///A more general solution that can represent capsules is the btMultiSphereShape -class btCapsuleShape : public btConvexShape +class btCapsuleShape : public btConvexInternalShape { public: btCapsuleShape(btScalar radius,btScalar height); ///CollisionShape Interface - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; /// btConvexShape Interface virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; @@ -38,7 +38,7 @@ public: virtual int getShapeType() const { return CAPSULE_SHAPE_PROXYTYPE; } - virtual char* getName()const + virtual const char* getName()const { return "CapsuleShape"; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h index 96268734a83..53fb12e33a1 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h @@ -16,11 +16,11 @@ subject to the following restrictions: #ifndef COLLISION_SHAPE_H #define COLLISION_SHAPE_H -#include "../../LinearMath/btTransform.h" -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btMatrix3x3.h" -#include "../../LinearMath/btPoint3.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" //for the shape types +#include "LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btPoint3.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types ///btCollisionShape provides interface for collision shapes that can be shared among btCollisionObjects. class btCollisionShape @@ -49,26 +49,26 @@ public: #ifndef __SPU__ - inline bool isPolyhedral() const + SIMD_FORCE_INLINE bool isPolyhedral() const { return btBroadphaseProxy::isPolyhedral(getShapeType()); } - inline bool isConvex() const + SIMD_FORCE_INLINE bool isConvex() const { return btBroadphaseProxy::isConvex(getShapeType()); } - inline bool isConcave() const + SIMD_FORCE_INLINE bool isConcave() const { return btBroadphaseProxy::isConcave(getShapeType()); } - inline bool isCompound() const + SIMD_FORCE_INLINE bool isCompound() const { return btBroadphaseProxy::isCompound(getShapeType()); } ///isInfinite is used to catch simulation error (aabb check) - inline bool isInfinite() const + SIMD_FORCE_INLINE bool isInfinite() const { return btBroadphaseProxy::isInfinite(getShapeType()); } @@ -76,11 +76,11 @@ public: virtual int getShapeType() const=0; virtual void setLocalScaling(const btVector3& scaling) =0; virtual const btVector3& getLocalScaling() const =0; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) = 0; + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const = 0; //debugging support - virtual char* getName()const =0 ; + virtual const char* getName()const =0 ; #endif //__SPU__ diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp index a4712b3e925..114a1f4c1fc 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp @@ -35,8 +35,15 @@ btCompoundShape::~btCompoundShape() void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisionShape* shape) { - m_childTransforms.push_back(localTransform); - m_childShapes.push_back(shape); + //m_childTransforms.push_back(localTransform); + //m_childShapes.push_back(shape); + btCompoundShapeChild child; + child.m_transform = localTransform; + child.m_childShape = shape; + child.m_childShapeType = shape->getShapeType(); + child.m_childMargin = shape->getMargin(); + + m_children.push_back(child); //extend the local aabbMin/aabbMax btVector3 localAabbMin,localAabbMax; @@ -76,7 +83,7 @@ void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVect aabbMax = center + extent; } -void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { //approximation: take the inertia from the aabb for now btTransform ident; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h index 86dc1f80947..d23bd65b5e8 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h @@ -18,26 +18,39 @@ subject to the following restrictions: #include "btCollisionShape.h" -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransform.h" -#include "../../LinearMath/btMatrix3x3.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btMatrix3x3.h" #include "btCollisionMargin.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" class btOptimizedBvh; +ATTRIBUTE_ALIGNED16(struct) btCompoundShapeChild +{ + BT_DECLARE_ALIGNED_ALLOCATOR(); + + btTransform m_transform; + btCollisionShape* m_childShape; + int m_childShapeType; + btScalar m_childMargin; +}; + /// btCompoundShape allows to store multiple other btCollisionShapes /// This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. -class btCompoundShape : public btCollisionShape +ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape { - btAlignedObjectArray m_childTransforms; - btAlignedObjectArray m_childShapes; + //btAlignedObjectArray m_childTransforms; + //btAlignedObjectArray m_childShapes; + btAlignedObjectArray m_children; btVector3 m_localAabbMin; btVector3 m_localAabbMax; btOptimizedBvh* m_aabbTree; public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + btCompoundShape(); virtual ~btCompoundShape(); @@ -46,25 +59,31 @@ public: int getNumChildShapes() const { - return int (m_childShapes.size()); + return int (m_children.size()); } btCollisionShape* getChildShape(int index) { - return m_childShapes[index]; + return m_children[index].m_childShape; } const btCollisionShape* getChildShape(int index) const { - return m_childShapes[index]; + return m_children[index].m_childShape; } - btTransform& getChildTransform(int index) + btTransform getChildTransform(int index) { - return m_childTransforms[index]; + return m_children[index].m_transform; } - const btTransform& getChildTransform(int index) const + const btTransform getChildTransform(int index) const { - return m_childTransforms[index]; + return m_children[index].m_transform; + } + + + btCompoundShapeChild* getChildList() + { + return &m_children[0]; } ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version @@ -80,7 +99,7 @@ public: return m_localScaling; } - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; virtual int getShapeType() const { return COMPOUND_SHAPE_PROXYTYPE;} @@ -92,7 +111,7 @@ public: { return m_collisionMargin; } - virtual char* getName()const + virtual const char* getName()const { return "Compound"; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h index 73f974e4ee9..4db4e6513dd 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h @@ -17,7 +17,7 @@ subject to the following restrictions: #define CONCAVE_SHAPE_H #include "btCollisionShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types #include "btTriangleCallback.h" diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h index 3ccda5b12c6..34f36b35f87 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h @@ -16,11 +16,11 @@ subject to the following restrictions: #ifndef CONE_MINKOWSKI_H #define CONE_MINKOWSKI_H -#include "btConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "btConvexInternalShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types ///btConeShape implements a Cone shape, around the Y axis -class btConeShape : public btConvexShape +class btConeShape : public btConvexInternalShape { @@ -42,7 +42,7 @@ public: btScalar getHeight() const { return m_height;} - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const { btTransform identity; identity.setIdentity(); @@ -72,7 +72,7 @@ public: virtual int getShapeType() const { return CONE_SHAPE_PROXYTYPE; } - virtual char* getName()const + virtual const char* getName()const { return "Cone"; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h index 3fd5e382525..0928d68b8fc 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h @@ -17,8 +17,8 @@ subject to the following restrictions: #define CONVEX_HULL_SHAPE_H #include "btPolyhedralConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types -#include "../../LinearMath/btAlignedObjectArray.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "LinearMath/btAlignedObjectArray.h" ///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices) ///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices. @@ -29,6 +29,7 @@ ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape btAlignedObjectArray m_points; public: + BT_DECLARE_ALIGNED_ALLOCATOR(); ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. @@ -56,7 +57,7 @@ public: virtual int getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; } //debugging - virtual char* getName()const {return "Convex";} + virtual const char* getName()const {return "Convex";} virtual int getNumVertices() const; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp new file mode 100644 index 00000000000..f828d28e18c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp @@ -0,0 +1,78 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btConvexInternalShape.h" + + +btConvexInternalShape::btConvexInternalShape() +: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), +m_collisionMargin(CONVEX_DISTANCE_MARGIN) +{ +} + + +void btConvexInternalShape::setLocalScaling(const btVector3& scaling) +{ + m_localScaling = scaling; +} + + + +void btConvexInternalShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVector3&maxAabb) const +{ + + btScalar margin = getMargin(); + for (int i=0;i<3;i++) + { + btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); + vec[i] = btScalar(1.); + + btVector3 sv = localGetSupportingVertex(vec*trans.getBasis()); + + btVector3 tmp = trans(sv); + maxAabb[i] = tmp[i]+margin; + vec[i] = btScalar(-1.); + tmp = trans(localGetSupportingVertex(vec*trans.getBasis())); + minAabb[i] = tmp[i]-margin; + } +}; + + +btVector3 btConvexInternalShape::localGetSupportingVertex(const btVector3& vec)const +{ +#ifndef __SPU__ + + btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); + + if ( getMargin()!=btScalar(0.) ) + { + btVector3 vecnorm = vec; + if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + vecnorm.normalize(); + supVertex+= getMargin() * vecnorm; + } + return supVertex; + +#else + return btVector3(0,0,0); +#endif //__SPU__ + + } + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h new file mode 100644 index 00000000000..a03af873bd3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h @@ -0,0 +1,99 @@ + +#ifndef BT_CONVEX_INTERNAL_SHAPE_H +#define BT_CONVEX_INTERNAL_SHAPE_H + +#include "btConvexShape.h" + +///btConvexInternalShape carries some additional data, shared by most implementations +class btConvexInternalShape : public btConvexShape +{ + + protected: + + //local scaling. collisionMargin is not scaled ! + btVector3 m_localScaling; + + btVector3 m_implicitShapeDimensions; + + btScalar m_collisionMargin; + + btScalar m_padding[2]; + + + + +public: + + btConvexInternalShape(); + + virtual ~btConvexInternalShape() + { + + } + + + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; +#ifndef __SPU__ + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; + + //notice that the vectors should be unit length + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; +#endif //#ifndef __SPU__ + + const btVector3& getImplicitShapeDimensions() const + { + return m_implicitShapeDimensions; + } + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const + { + getAabbSlow(t,aabbMin,aabbMax); + } + + + + virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + + virtual void setLocalScaling(const btVector3& scaling); + virtual const btVector3& getLocalScaling() const + { + return m_localScaling; + } + + const btVector3& getLocalScalingNV() const + { + return m_localScaling; + } + + virtual void setMargin(btScalar margin) + { + m_collisionMargin = margin; + } + virtual btScalar getMargin() const + { + return m_collisionMargin; + } + + btScalar getMarginNV() const + { + return m_collisionMargin; + } + + virtual int getNumPreferredPenetrationDirections() const + { + return 0; + } + + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const + { + (void)penetrationVector; + (void)index; + btAssert(0); + } + +}; + + +#endif //BT_CONVEX_INTERNAL_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp index 7edf1ea6db8..7afcccf8b03 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp @@ -16,62 +16,3 @@ subject to the following restrictions: #include "btConvexShape.h" -btConvexShape::btConvexShape() -: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), -m_collisionMargin(CONVEX_DISTANCE_MARGIN) -{ -} - - -void btConvexShape::setLocalScaling(const btVector3& scaling) -{ - m_localScaling = scaling; -} - - - -void btConvexShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVector3&maxAabb) const -{ - - btScalar margin = getMargin(); - for (int i=0;i<3;i++) - { - btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); - vec[i] = btScalar(1.); - - btVector3 sv = localGetSupportingVertex(vec*trans.getBasis()); - - btVector3 tmp = trans(sv); - maxAabb[i] = tmp[i]+margin; - vec[i] = btScalar(-1.); - tmp = trans(localGetSupportingVertex(vec*trans.getBasis())); - minAabb[i] = tmp[i]-margin; - } -}; - - -btVector3 btConvexShape::localGetSupportingVertex(const btVector3& vec)const -{ -#ifndef __SPU__ - - btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); - - if ( getMargin()!=btScalar(0.) ) - { - btVector3 vecnorm = vec; - if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) - { - vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); - } - vecnorm.normalize(); - supVertex+= getMargin() * vecnorm; - } - return supVertex; - -#else - return btVector3(0,0,0); -#endif //__SPU__ - - } - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h index 746f383dfc7..6dfd288e05b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h @@ -18,37 +18,26 @@ subject to the following restrictions: #include "btCollisionShape.h" -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransform.h" -#include "../../LinearMath/btMatrix3x3.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btMatrix3x3.h" #include "btCollisionMargin.h" +#include "LinearMath/btAlignedAllocator.h" //todo: get rid of this btConvexCastResult thing! struct btConvexCastResult; #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 /// btConvexShape is an abstract shape interface. -/// The explicit part provides plane-equations, the implicit part provides GetClosestPoint interface. +/// It describes general convex shapes using the localGetSupportingVertex interface /// used in combination with GJK or btConvexCast ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape { -protected: - - //local scaling. collisionMargin is not scaled ! - btVector3 m_localScaling; - - btVector3 m_implicitShapeDimensions; - - btScalar m_collisionMargin; - - btScalar m_padding[2]; - - - public: - btConvexShape(); + + BT_DECLARE_ALIGNED_ALLOCATOR(); virtual ~btConvexShape() { @@ -56,7 +45,7 @@ public: } - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const =0; #ifndef __SPU__ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; @@ -64,63 +53,24 @@ public: virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; #endif //#ifndef __SPU__ - const btVector3& getImplicitShapeDimensions() const - { - return m_implicitShapeDimensions; - } ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version - void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const - { - getAabbSlow(t,aabbMin,aabbMax); - } + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; + virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; + virtual void setLocalScaling(const btVector3& scaling) =0; + virtual const btVector3& getLocalScaling() const =0; + + virtual void setMargin(btScalar margin)=0; + + virtual btScalar getMargin() const=0; + + virtual int getNumPreferredPenetrationDirections() const=0; - virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0; - - virtual void setLocalScaling(const btVector3& scaling); - virtual const btVector3& getLocalScaling() const - { - return m_localScaling; - } - - const btVector3& getLocalScalingNV() const - { - return m_localScaling; - } - - virtual void setMargin(btScalar margin) - { - m_collisionMargin = margin; - } - virtual btScalar getMargin() const - { - return m_collisionMargin; - } - - btScalar getMarginNV() const - { - return m_collisionMargin; - } - - virtual int getNumPreferredPenetrationDirections() const - { - return 0; - } - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const - { - (void)penetrationVector; - (void)index; - btAssert(0); - } - - - -} -; +}; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp index 614ec977793..6941030b15f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp @@ -202,4 +202,4 @@ void btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling) const btVector3& btConvexTriangleMeshShape::getLocalScaling() const { return m_stridingMesh->getScaling(); -} \ No newline at end of file +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h index 34ee7af744c..f3daa58368f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h @@ -3,7 +3,7 @@ #include "btPolyhedralConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types /// btConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use btConvexHullShape instead. @@ -16,7 +16,11 @@ class btConvexTriangleMeshShape : public btPolyhedralConvexShape public: btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface); - class btStridingMeshInterface* getStridingMesh() + class btStridingMeshInterface* getMeshInterface() + { + return m_stridingMesh; + } + const class btStridingMeshInterface* getMeshInterface() const { return m_stridingMesh; } @@ -28,7 +32,7 @@ public: virtual int getShapeType()const { return CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; } //debugging - virtual char* getName()const {return "ConvexTrimesh";} + virtual const char* getName()const {return "ConvexTrimesh";} virtual int getNumVertices() const; virtual int getNumEdges() const; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp index 1666afb3b88..3afef1c7550 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp @@ -45,7 +45,7 @@ void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& } -inline btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v) +SIMD_FORCE_INLINE btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v) { const int cylinderUpAxis = 0; const int XX = 1; @@ -163,24 +163,24 @@ const int ZZ = 1; btVector3 btCylinderShapeX::localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - return CylinderLocalSupportX(getHalfExtents(),vec); + return CylinderLocalSupportX(getHalfExtentsWithoutMargin(),vec); } btVector3 btCylinderShapeZ::localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - return CylinderLocalSupportZ(getHalfExtents(),vec); + return CylinderLocalSupportZ(getHalfExtentsWithoutMargin(),vec); } btVector3 btCylinderShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const { - return CylinderLocalSupportY(getHalfExtents(),vec); + return CylinderLocalSupportY(getHalfExtentsWithoutMargin(),vec); } void btCylinderShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const { for (int i=0;iquantizeWithClamp(&node.m_quantizedAabbMin[0],aabbMin); m_optimizedTree->quantizeWithClamp(&node.m_quantizedAabbMax[0],aabbMax); @@ -170,6 +188,13 @@ void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantized subtree.m_rootNodeIndex = 0; subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex(); } + + //PCK: update the copy of the size + m_subtreeHeaderCount = m_SubtreeHeaders.size(); + + //PCK: clear m_quantizedLeafNodes and m_leafNodes, they are temporary + m_quantizedLeafNodes.clear(); + m_leafNodes.clear(); } @@ -201,8 +226,9 @@ void btOptimizedBvh::refitPartial(btStridingMeshInterface* meshInterface,const b { btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; - bool overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); - if (overlap) + //PCK: unsigned instead of bool + unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); + if (overlap != 0) { updateBvhNodes(meshInterface,subtree.m_rootNodeIndex,subtree.m_rootNodeIndex+subtree.m_subtreeSize,i); @@ -479,6 +505,9 @@ void btOptimizedBvh::updateSubtreeHeaders(int leftChildNodexIndex,int rightChild subtree.m_rootNodeIndex = rightChildNodexIndex; subtree.m_subtreeSize = rightSubTreeSize; } + + //PCK: update the copy of the size + m_subtreeHeaderCount = m_SubtreeHeaders.size(); } @@ -568,7 +597,6 @@ void btOptimizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallb { //either choose recursive traversal (walkTree) or stackless (walkStacklessTree) - if (m_useQuantization) { ///quantize query AABB @@ -611,7 +639,9 @@ void btOptimizedBvh::walkStacklessTree(btNodeOverlapCallback* nodeCallback,const const btOptimizedBvhNode* rootNode = &m_contiguousNodes[0]; int escapeIndex, curIndex = 0; int walkIterations = 0; - bool aabbOverlap, isLeafNode; + bool isLeafNode; + //PCK: unsigned instead of bool + unsigned aabbOverlap; while (curIndex < m_curNodeIndex) { @@ -622,12 +652,14 @@ void btOptimizedBvh::walkStacklessTree(btNodeOverlapCallback* nodeCallback,const aabbOverlap = TestAabbAgainstAabb2(aabbMin,aabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg); isLeafNode = rootNode->m_escapeIndex == -1; - if (isLeafNode && aabbOverlap) + //PCK: unsigned instead of bool + if (isLeafNode && (aabbOverlap != 0)) { nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex); } - if (aabbOverlap || isLeafNode) + //PCK: unsigned instead of bool + if ((aabbOverlap != 0) || isLeafNode) { rootNode++; curIndex++; @@ -668,12 +700,16 @@ void btOptimizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantize { btAssert(m_useQuantization); - bool aabbOverlap, isLeafNode; + bool isLeafNode; + //PCK: unsigned instead of bool + unsigned aabbOverlap; + //PCK: unsigned instead of bool aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,currentNode->m_quantizedAabbMin,currentNode->m_quantizedAabbMax); isLeafNode = currentNode->isLeafNode(); - if (aabbOverlap) + //PCK: unsigned instead of bool + if (aabbOverlap != 0) { if (isLeafNode) { @@ -707,7 +743,9 @@ void btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallb const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex]; int escapeIndex; - bool aabbOverlap, isLeafNode; + bool isLeafNode; + //PCK: unsigned instead of bool + unsigned aabbOverlap; while (curIndex < endNodeIndex) { @@ -732,6 +770,7 @@ void btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallb assert (walkIterations < subTreeSize); walkIterations++; + //PCK: unsigned instead of bool aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax); isLeafNode = rootNode->isLeafNode(); @@ -740,7 +779,8 @@ void btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallb nodeCallback->processNode(0,rootNode->getTriangleIndex()); } - if (aabbOverlap || isLeafNode) + //PCK: unsigned instead of bool + if ((aabbOverlap != 0) || isLeafNode) { rootNode++; curIndex++; @@ -768,8 +808,9 @@ void btOptimizedBvh::walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallba { const btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; - bool overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); - if (overlap) + //PCK: unsigned instead of bool + unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); + if (overlap != 0) { walkStacklessQuantizedTree(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax, subtree.m_rootNodeIndex, @@ -791,20 +832,7 @@ void btOptimizedBvh::reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCal } -void btOptimizedBvh::quantizeWithClamp(unsigned short* out, const btVector3& point) const -{ - btAssert(m_useQuantization); - - btVector3 clampedPoint(point); - clampedPoint.setMax(m_bvhAabbMin); - clampedPoint.setMin(m_bvhAabbMax); - - btVector3 v = (clampedPoint - m_bvhAabbMin) * m_bvhQuantization; - out[0] = (unsigned short)(v.getX()+0.5f); - out[1] = (unsigned short)(v.getY()+0.5f); - out[2] = (unsigned short)(v.getZ()+0.5f); -} btVector3 btOptimizedBvh::unQuantize(const unsigned short* vecIn) const { @@ -843,3 +871,311 @@ void btOptimizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNod m_contiguousNodes[internalNode] = m_leafNodes[leafNodeIndex]; } } + +//PCK: include +#include + +//PCK: consts +static const unsigned BVH_ALIGNMENT = 16; +static const unsigned BVH_ALIGNMENT_MASK = BVH_ALIGNMENT-1; + +static const unsigned BVH_ALIGNMENT_BLOCKS = 2; + + + +unsigned int btOptimizedBvh::getAlignmentSerializationPadding() +{ + return BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT; +} + +unsigned btOptimizedBvh::calculateSerializeBufferSize() +{ + unsigned baseSize = sizeof(btOptimizedBvh) + getAlignmentSerializationPadding(); + baseSize += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount; + if (m_useQuantization) + { + return baseSize + m_curNodeIndex * sizeof(btQuantizedBvhNode); + } + return baseSize + m_curNodeIndex * sizeof(btOptimizedBvhNode); +} + +bool btOptimizedBvh::serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) +{ + assert(m_subtreeHeaderCount == m_SubtreeHeaders.size()); + m_subtreeHeaderCount = m_SubtreeHeaders.size(); + +/* if (i_dataBufferSize < calculateSerializeBufferSize() || o_alignedDataBuffer == NULL || (((unsigned)o_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0)) + { + ///check alignedment for buffer? + btAssert(0); + return false; + } +*/ + + btOptimizedBvh *targetBvh = (btOptimizedBvh *)o_alignedDataBuffer; + + // construct the class so the virtual function table, etc will be set up + // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor + new (targetBvh) btOptimizedBvh; + + if (i_swapEndian) + { + targetBvh->m_curNodeIndex = btSwapEndian(m_curNodeIndex); + + + btSwapVector3Endian(m_bvhAabbMin,targetBvh->m_bvhAabbMin); + btSwapVector3Endian(m_bvhAabbMax,targetBvh->m_bvhAabbMax); + btSwapVector3Endian(m_bvhQuantization,targetBvh->m_bvhQuantization); + + targetBvh->m_traversalMode = (btTraversalMode)btSwapEndian(m_traversalMode); + targetBvh->m_subtreeHeaderCount = btSwapEndian(m_subtreeHeaderCount); + } + else + { + targetBvh->m_curNodeIndex = m_curNodeIndex; + targetBvh->m_bvhAabbMin = m_bvhAabbMin; + targetBvh->m_bvhAabbMax = m_bvhAabbMax; + targetBvh->m_bvhQuantization = m_bvhQuantization; + targetBvh->m_traversalMode = m_traversalMode; + targetBvh->m_subtreeHeaderCount = m_subtreeHeaderCount; + } + + targetBvh->m_useQuantization = m_useQuantization; + + unsigned char *nodeData = (unsigned char *)targetBvh; + nodeData += sizeof(btOptimizedBvh); + + unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; + nodeData += sizeToAdd; + + int nodeCount = m_curNodeIndex; + + if (m_useQuantization) + { + targetBvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); + + if (i_swapEndian) + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]); + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]); + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]); + + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]); + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]); + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]); + + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex); + } + } + else + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]; + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]; + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]; + + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]; + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]; + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]; + + targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex; + + + } + } + nodeData += sizeof(btQuantizedBvhNode) * nodeCount; + } + else + { + targetBvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); + + if (i_swapEndian) + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMinOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg); + btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMaxOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg); + + targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = btSwapEndian(m_contiguousNodes[nodeIndex].m_escapeIndex); + targetBvh->m_contiguousNodes[nodeIndex].m_subPart = btSwapEndian(m_contiguousNodes[nodeIndex].m_subPart); + targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = btSwapEndian(m_contiguousNodes[nodeIndex].m_triangleIndex); + } + } + else + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg = m_contiguousNodes[nodeIndex].m_aabbMinOrg; + targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg = m_contiguousNodes[nodeIndex].m_aabbMaxOrg; + + targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = m_contiguousNodes[nodeIndex].m_escapeIndex; + targetBvh->m_contiguousNodes[nodeIndex].m_subPart = m_contiguousNodes[nodeIndex].m_subPart; + targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = m_contiguousNodes[nodeIndex].m_triangleIndex; + } + } + nodeData += sizeof(btOptimizedBvhNode) * nodeCount; + } + + sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; + nodeData += sizeToAdd; + + // Now serialize the subtree headers + targetBvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, m_subtreeHeaderCount, m_subtreeHeaderCount); + if (i_swapEndian) + { + for (int i = 0; i < m_subtreeHeaderCount; i++) + { + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[0]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[1]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[2]); + + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[0]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[1]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[2]); + + targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = btSwapEndian(m_SubtreeHeaders[i].m_rootNodeIndex); + targetBvh->m_SubtreeHeaders[i].m_subtreeSize = btSwapEndian(m_SubtreeHeaders[i].m_subtreeSize); + } + } + else + { + for (int i = 0; i < m_subtreeHeaderCount; i++) + { + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = (m_SubtreeHeaders[i].m_quantizedAabbMin[0]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = (m_SubtreeHeaders[i].m_quantizedAabbMin[1]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = (m_SubtreeHeaders[i].m_quantizedAabbMin[2]); + + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = (m_SubtreeHeaders[i].m_quantizedAabbMax[0]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = (m_SubtreeHeaders[i].m_quantizedAabbMax[1]); + targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = (m_SubtreeHeaders[i].m_quantizedAabbMax[2]); + + targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = (m_SubtreeHeaders[i].m_rootNodeIndex); + targetBvh->m_SubtreeHeaders[i].m_subtreeSize = (m_SubtreeHeaders[i].m_subtreeSize); + targetBvh->m_SubtreeHeaders[i] = m_SubtreeHeaders[i]; + } + } + + nodeData += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount; + + return true; +} + +btOptimizedBvh *btOptimizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) +{ + + if (i_alignedDataBuffer == NULL)// || (((unsigned)i_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0)) + { + return NULL; + } + btOptimizedBvh *bvh = (btOptimizedBvh *)i_alignedDataBuffer; + + if (i_swapEndian) + { + bvh->m_curNodeIndex = btSwapEndian(bvh->m_curNodeIndex); + + btUnSwapVector3Endian(bvh->m_bvhAabbMin); + btUnSwapVector3Endian(bvh->m_bvhAabbMax); + btUnSwapVector3Endian(bvh->m_bvhQuantization); + + bvh->m_traversalMode = (btTraversalMode)btSwapEndian(bvh->m_traversalMode); + bvh->m_subtreeHeaderCount = btSwapEndian(bvh->m_subtreeHeaderCount); + } + + int calculatedBufSize = bvh->calculateSerializeBufferSize(); + btAssert(calculatedBufSize <= i_dataBufferSize); + + if (calculatedBufSize > i_dataBufferSize) + { + return NULL; + } + + unsigned char *nodeData = (unsigned char *)bvh; + nodeData += sizeof(btOptimizedBvh); + + unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; + nodeData += sizeToAdd; + + int nodeCount = bvh->m_curNodeIndex; + + // Must call placement new to fill in virtual function table, etc, but we don't want to overwrite most data, so call a special version of the constructor + // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor + new (bvh) btOptimizedBvh(*bvh, false); + + if (bvh->m_useQuantization) + { + bvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); + + if (i_swapEndian) + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]); + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]); + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]); + + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]); + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]); + bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]); + + bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex); + } + } + nodeData += sizeof(btQuantizedBvhNode) * nodeCount; + } + else + { + bvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); + + if (i_swapEndian) + { + for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) + { + btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg); + btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg); + + bvh->m_contiguousNodes[nodeIndex].m_escapeIndex = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_escapeIndex); + bvh->m_contiguousNodes[nodeIndex].m_subPart = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_subPart); + bvh->m_contiguousNodes[nodeIndex].m_triangleIndex = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_triangleIndex); + } + } + nodeData += sizeof(btOptimizedBvhNode) * nodeCount; + } + + sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; + nodeData += sizeToAdd; + + // Now serialize the subtree headers + bvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, bvh->m_subtreeHeaderCount, bvh->m_subtreeHeaderCount); + if (i_swapEndian) + { + for (int i = 0; i < bvh->m_subtreeHeaderCount; i++) + { + bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0]); + bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1]); + bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2]); + + bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0]); + bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1]); + bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2]); + + bvh->m_SubtreeHeaders[i].m_rootNodeIndex = btSwapEndian(bvh->m_SubtreeHeaders[i].m_rootNodeIndex); + bvh->m_SubtreeHeaders[i].m_subtreeSize = btSwapEndian(bvh->m_SubtreeHeaders[i].m_subtreeSize); + } + } + + return bvh; +} + +// Constructor that prevents btVector3's default constructor from being called +btOptimizedBvh::btOptimizedBvh(btOptimizedBvh &self, bool ownsMemory) : +m_bvhAabbMin(self.m_bvhAabbMin), +m_bvhAabbMax(self.m_bvhAabbMax), +m_bvhQuantization(self.m_bvhQuantization) +{ + +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h index d5159586344..bcacdbe582b 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h @@ -17,7 +17,9 @@ subject to the following restrictions: #define OPTIMIZED_BVH_H -#include "../../LinearMath/btVector3.h" + +#include "LinearMath/btVector3.h" +#include "LinearMath/btAlignedAllocator.h" //http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrf__m128.asp @@ -34,7 +36,8 @@ class btStridingMeshInterface; ///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range). ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode { - + BT_DECLARE_ALIGNED_ALLOCATOR(); + //12 bytes unsigned short int m_quantizedAabbMin[3]; unsigned short int m_quantizedAabbMax[3]; @@ -63,6 +66,8 @@ ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode /// Total node size is 44 bytes / node. You can use the compressed version of 16 bytes. ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode { + BT_DECLARE_ALIGNED_ALLOCATOR(); + //32 bytes btVector3 m_aabbMinOrg; btVector3 m_aabbMaxOrg; @@ -84,6 +89,8 @@ ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode ATTRIBUTE_ALIGNED16(class) btBvhSubtreeInfo { public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + //12 bytes unsigned short int m_quantizedAabbMin[3]; unsigned short int m_quantizedAabbMax[3]; @@ -93,6 +100,11 @@ public: int m_subtreeSize; int m_padding[3]; + btBvhSubtreeInfo() + { + //memset(&m_padding[0], 0, sizeof(m_padding)); + } + void setAabbFromQuantizeNode(const btQuantizedBvhNode& quantizedNode) { @@ -115,8 +127,8 @@ public: virtual void processNode(int subPart, int triangleIndex) = 0; }; -#include "../../LinearMath/btAlignedAllocator.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedAllocator.h" +#include "LinearMath/btAlignedObjectArray.h" @@ -144,6 +156,8 @@ ATTRIBUTE_ALIGNED16(class) btOptimizedBvh btVector3 m_bvhAabbMin; btVector3 m_bvhAabbMax; btVector3 m_bvhQuantization; +public: + BT_DECLARE_ALIGNED_ALLOCATOR(); enum btTraversalMode { @@ -151,14 +165,15 @@ ATTRIBUTE_ALIGNED16(class) btOptimizedBvh TRAVERSAL_STACKLESS_CACHE_FRIENDLY, TRAVERSAL_RECURSIVE }; +protected: btTraversalMode m_traversalMode; - - - BvhSubtreeInfoArray m_SubtreeHeaders; + //This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray + int m_subtreeHeaderCount; + ///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) ///this might be refactored into a virtual, it is usually not calculated at run-time @@ -273,7 +288,18 @@ protected: void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const; - inline bool testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const +#define USE_BANCHLESS 1 +#ifdef USE_BANCHLESS + //This block replaces the block below and uses no branches, and replaces the 8 bit return with a 32 bit return for improved performance (~3x on XBox 360) + SIMD_FORCE_INLINE unsigned testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const + { + return btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0]) + & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2]) + & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])), + 1, 0); + } +#else + SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const { bool overlap = true; overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; @@ -281,6 +307,7 @@ protected: overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; return overlap; } +#endif //USE_BANCHLESS void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex); @@ -294,8 +321,22 @@ public: void reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; void reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + SIMD_FORCE_INLINE void quantizeWithClamp(unsigned short* out, const btVector3& point) const + { + + btAssert(m_useQuantization); + + btVector3 clampedPoint(point); + clampedPoint.setMax(m_bvhAabbMin); + clampedPoint.setMin(m_bvhAabbMax); + + btVector3 v = (clampedPoint - m_bvhAabbMin) * m_bvhQuantization; + out[0] = (unsigned short)(v.getX()+0.5f); + out[1] = (unsigned short)(v.getY()+0.5f); + out[2] = (unsigned short)(v.getZ()+0.5f); + } - void quantizeWithClamp(unsigned short* out, const btVector3& point) const; btVector3 unQuantize(const unsigned short* vecIn) const; @@ -312,15 +353,37 @@ public: void updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index); - QuantizedNodeArray& getQuantizedNodeArray() + SIMD_FORCE_INLINE QuantizedNodeArray& getQuantizedNodeArray() { return m_quantizedContiguousNodes; } - BvhSubtreeInfoArray& getSubtreeInfoArray() + SIMD_FORCE_INLINE BvhSubtreeInfoArray& getSubtreeInfoArray() { return m_SubtreeHeaders; } + + /////Calculate space needed to store BVH for serialization + unsigned calculateSerializeBufferSize(); + + /// Data buffer MUST be 16 byte aligned + bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian); + + ///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place' + static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian); + + static unsigned int getAlignmentSerializationPadding(); + + SIMD_FORCE_INLINE bool isQuantized() + { + return m_useQuantization; + } + +private: + // Special "copy" constructor that allows for in-place deserialization + // Prevents btVector3's default constructor from being called, but doesn't inialize much else + // ownsMemory should most likely be false if deserializing, and if you are not, don't call this (it also changes the function signature, which we need) + btOptimizedBvh(btOptimizedBvh &other, bool ownsMemory); } ; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp index bbc4ba62af6..30323deb3b5 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp @@ -95,7 +95,7 @@ void btPolyhedralConvexShape::batchedUnitVectorGetSupportingVertexWithoutMargin( -void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { //not yet, return box inertia diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h index c35f7512663..9d46b991e10 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h @@ -16,13 +16,13 @@ subject to the following restrictions: #ifndef BU_SHAPE #define BU_SHAPE -#include "../../LinearMath/btPoint3.h" -#include "../../LinearMath/btMatrix3x3.h" -#include "btConvexShape.h" +#include "LinearMath/btPoint3.h" +#include "LinearMath/btMatrix3x3.h" +#include "btConvexInternalShape.h" ///PolyhedralConvexShape is an interface class for feature based (vertex/edge/face) convex shapes. -class btPolyhedralConvexShape : public btConvexShape +class btPolyhedralConvexShape : public btConvexInternalShape { protected: @@ -38,7 +38,7 @@ public: virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp index ca65dd03f3e..15cfe432e27 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp @@ -68,7 +68,7 @@ void btSphereShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& a -void btSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { btScalar elem = btScalar(0.4) * mass * getMargin()*getMargin(); inertia.setValue(elem,elem,elem); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h index 66521664087..d89a78b08e2 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h @@ -16,15 +16,17 @@ subject to the following restrictions: #ifndef SPHERE_MINKOWSKI_H #define SPHERE_MINKOWSKI_H -#include "btConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "btConvexInternalShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types ///btSphereShape implements an implicit (getSupportingVertex) Sphere -ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexShape +ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape { public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + btSphereShape (btScalar radius); @@ -34,26 +36,26 @@ public: virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; virtual int getShapeType() const { return SPHERE_SHAPE_PROXYTYPE; } - btScalar getRadius() const { return m_implicitShapeDimensions.getX();} + btScalar getRadius() const { return m_implicitShapeDimensions.getX() * m_localScaling.getX();} //debugging - virtual char* getName()const {return "SPHERE";} + virtual const char* getName()const {return "SPHERE";} virtual void setMargin(btScalar margin) { - btConvexShape::setMargin(margin); + btConvexInternalShape::setMargin(margin); } virtual btScalar getMargin() const { //to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case //this means, non-uniform scaling is not supported anymore - return m_localScaling.getX() * getRadius() + btConvexShape::getMargin(); + return getRadius(); } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp index 4fbaafa1b93..7dd6425e0bd 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp @@ -86,7 +86,7 @@ void btStaticPlaneShape::processAllTriangles(btTriangleCallback* callback,const } -void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { (void)mass; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h index f59cc0c3347..0cbce3abd93 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h @@ -46,14 +46,14 @@ public: virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; virtual void setLocalScaling(const btVector3& scaling); virtual const btVector3& getLocalScaling() const; //debugging - virtual char* getName()const {return "STATICPLANE";} + virtual const char* getName()const {return "STATICPLANE";} }; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp index 03ca1ae7736..3129b7c83ce 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp @@ -121,4 +121,4 @@ void btStridingMeshInterface::calculateAabbBruteForce(btVector3& aabbMin,btVecto aabbMin = aabbCallback.m_aabbMin; aabbMax = aabbCallback.m_aabbMax; -} \ No newline at end of file +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h index d7b354b7855..4ce0bd2e2f9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef STRIDING_MESHINTERFACE_H #define STRIDING_MESHINTERFACE_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btTriangleCallback.h" /// PHY_ScalarType enumerates possible scalar types. diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h index 94bc4ec0fa5..ca1b4b42a6f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h @@ -18,7 +18,7 @@ subject to the following restrictions: #include "btPolyhedralConvexShape.h" -#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" ///BU_Simplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex). @@ -68,7 +68,7 @@ public: ///getName is for debugging - virtual char* getName()const { return "btBU_Simplex1to4";} + virtual const char* getName()const { return "btBU_Simplex1to4";} }; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h index 3805c519d22..c97e58f121f 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h @@ -17,7 +17,7 @@ subject to the following restrictions: #define BT_TRIANGLE_BUFFER_H #include "btTriangleCallback.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" struct btTriangle { diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h index fbb87bc4fd8..7b2337498ec 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef TRIANGLE_CALLBACK_H #define TRIANGLE_CALLBACK_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" class btTriangleCallback diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp index 00847861cf1..554915a7058 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp @@ -4,8 +4,8 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. @@ -18,27 +18,36 @@ subject to the following restrictions: btTriangleIndexVertexArray::btTriangleIndexVertexArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride) { btIndexedMesh mesh; - + mesh.m_numTriangles = numTriangles; mesh.m_triangleIndexBase = (const unsigned char *)triangleIndexBase; mesh.m_triangleIndexStride = triangleIndexStride; mesh.m_numVertices = numVertices; mesh.m_vertexBase = (const unsigned char *)vertexBase; mesh.m_vertexStride = vertexStride; - + addIndexedMesh(mesh); } +btTriangleIndexVertexArray::~btTriangleIndexVertexArray() +{ + +} + void btTriangleIndexVertexArray::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) { btAssert(subpart< getNumSubParts() ); - + btIndexedMesh& mesh = m_indexedMeshes[subpart]; numverts = mesh.m_numVertices; (*vertexbase) = (unsigned char *) mesh.m_vertexBase; + #ifdef BT_USE_DOUBLE_PRECISION + type = PHY_DOUBLE; + #else type = PHY_FLOAT; + #endif vertexStride = mesh.m_vertexStride; numfaces = mesh.m_numTriangles; @@ -54,7 +63,11 @@ void btTriangleIndexVertexArray::getLockedReadOnlyVertexIndexBase(const unsigned numverts = mesh.m_numVertices; (*vertexbase) = (const unsigned char *)mesh.m_vertexBase; + #ifdef BT_USE_DOUBLE_PRECISION + type = PHY_DOUBLE; + #else type = PHY_FLOAT; + #endif vertexStride = mesh.m_vertexStride; numfaces = mesh.m_numTriangles; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h index 6ab6a762b39..3441a8325e2 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h @@ -17,13 +17,17 @@ subject to the following restrictions: #define BT_TRIANGLE_INDEX_VERTEX_ARRAY_H #include "btStridingMeshInterface.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btScalar.h" + ///IndexedMesh indexes into existing vertex and index arrays, in a similar way OpenGL glDrawElements ///instead of the number of indices, we pass the number of triangles ///todo: explain with pictures ATTRIBUTE_ALIGNED16( struct) btIndexedMesh { + BT_DECLARE_ALIGNED_ALLOCATOR(); + int m_numTriangles; const unsigned char * m_triangleIndexBase; int m_triangleIndexStride; @@ -49,10 +53,14 @@ ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshIn public: + BT_DECLARE_ALIGNED_ALLOCATOR(); + btTriangleIndexVertexArray() { } + virtual ~btTriangleIndexVertexArray(); + //just to be backwards compatible btTriangleIndexVertexArray(int numTriangleIndices,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride); diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h index 525f5336b48..83e5a56d16a 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h @@ -18,8 +18,8 @@ subject to the following restrictions: #define TRIANGLE_MESH_H #include "btStridingMeshInterface.h" -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btAlignedObjectArray.h" ///TriangleMesh provides storage for a concave triangle mesh. It can be used as data for the btTriangleMeshShape. class btTriangleMesh : public btStridingMeshInterface diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp index ed81897b515..0d390c88b68 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp @@ -20,7 +20,6 @@ subject to the following restrictions: #include "LinearMath/btAabbUtil2.h" #include "BulletCollision/CollisionShapes/btCollisionMargin.h" -#include "stdio.h" btTriangleMeshShape::btTriangleMeshShape(btStridingMeshInterface* meshInterface) : m_meshInterface(meshInterface) @@ -138,6 +137,7 @@ const btVector3& btTriangleMeshShape::getLocalScaling() const //#define DEBUG_TRIANGLE_MESH + void btTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const { struct FilteredCallback : public btInternalTriangleIndexCallback @@ -174,8 +174,7 @@ void btTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const - -void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { (void)mass; //moving concave objects not supported diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h index e6173e47640..6657fc09147 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h @@ -20,17 +20,19 @@ subject to the following restrictions: #include "btStridingMeshInterface.h" -///Concave triangle mesh. Uses an interface to access the triangles to allow for sharing graphics/physics triangles. +///Concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. class btTriangleMeshShape : public btConcaveShape { protected: btVector3 m_localAabbMin; btVector3 m_localAabbMax; btStridingMeshInterface* m_meshInterface; - + + ///btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. + ///Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead! + btTriangleMeshShape(btStridingMeshInterface* meshInterface); public: - btTriangleMeshShape(btStridingMeshInterface* meshInterface); virtual ~btTriangleMeshShape(); @@ -53,7 +55,7 @@ public: virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; virtual void setLocalScaling(const btVector3& scaling); virtual const btVector3& getLocalScaling() const; @@ -70,7 +72,7 @@ public: //debugging - virtual char* getName()const {return "TRIANGLEMESH";} + virtual const char* getName()const {return "TRIANGLEMESH";} }; diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h index c2e240c051c..064c64fa6ab 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h @@ -116,7 +116,7 @@ public: planeSupport = m_vertices1[0]; } - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const { (void)mass; btAssert(0); @@ -155,7 +155,7 @@ public: return false; } //debugging - virtual char* getName()const + virtual const char* getName()const { return "Triangle"; } diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp new file mode 100644 index 00000000000..ef340286cb0 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp @@ -0,0 +1,114 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btUniformScalingShape.h" + +btUniformScalingShape::btUniformScalingShape( btConvexShape* convexChildShape,btScalar uniformScalingFactor): +m_childConvexShape(convexChildShape), +m_uniformScalingFactor(uniformScalingFactor) +{ +} + +btUniformScalingShape::~btUniformScalingShape() +{ +} + + +btVector3 btUniformScalingShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + btVector3 tmpVertex; + tmpVertex = m_childConvexShape->localGetSupportingVertexWithoutMargin(vec); + return tmpVertex*m_uniformScalingFactor; +} + +void btUniformScalingShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + m_childConvexShape->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors,supportVerticesOut,numVectors); + int i; + for (i=0;ilocalGetSupportingVertex(vec); + return tmpVertex*m_uniformScalingFactor; +} + + +void btUniformScalingShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const +{ + + ///this linear upscaling is not realistic, but we don't deal with large mass ratios... + btVector3 tmpInertia; + m_childConvexShape->calculateLocalInertia(mass,tmpInertia); + inertia = tmpInertia * m_uniformScalingFactor; +} + + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version +void btUniformScalingShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const +{ + m_childConvexShape->getAabb(t,aabbMin,aabbMax); + btVector3 aabbCenter = (aabbMax+aabbMin)*btScalar(0.5); + btVector3 scaledAabbHalfExtends = (aabbMax-aabbMin)*btScalar(0.5)*m_uniformScalingFactor; + + aabbMin = aabbCenter - scaledAabbHalfExtends; + aabbMax = aabbCenter + scaledAabbHalfExtends; + +} + +void btUniformScalingShape::getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const +{ + m_childConvexShape->getAabbSlow(t,aabbMin,aabbMax); + btVector3 aabbCenter = (aabbMax+aabbMin)*btScalar(0.5); + btVector3 scaledAabbHalfExtends = (aabbMax-aabbMin)*btScalar(0.5)*m_uniformScalingFactor; + + aabbMin = aabbCenter - scaledAabbHalfExtends; + aabbMax = aabbCenter + scaledAabbHalfExtends; +} + +void btUniformScalingShape::setLocalScaling(const btVector3& scaling) +{ + m_childConvexShape->setLocalScaling(scaling); +} + +const btVector3& btUniformScalingShape::getLocalScaling() const +{ + return m_childConvexShape->getLocalScaling(); +} + +void btUniformScalingShape::setMargin(btScalar margin) +{ + m_childConvexShape->setMargin(margin); +} +btScalar btUniformScalingShape::getMargin() const +{ + return m_childConvexShape->getMargin() * m_uniformScalingFactor; +} + +int btUniformScalingShape::getNumPreferredPenetrationDirections() const +{ + return m_childConvexShape->getNumPreferredPenetrationDirections(); +} + +void btUniformScalingShape::getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const +{ + m_childConvexShape->getPreferredPenetrationDirection(index,penetrationVector); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h new file mode 100644 index 00000000000..3a0ecf021d3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h @@ -0,0 +1,86 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_UNIFORM_SCALING_SHAPE_H +#define BT_UNIFORM_SCALING_SHAPE_H + +#include "btConvexShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types + +class btUniformScalingShape : public btConvexShape +{ + btConvexShape* m_childConvexShape; + + btScalar m_uniformScalingFactor; + + public: + + btUniformScalingShape( btConvexShape* convexChildShape, btScalar uniformScalingFactor); + + virtual ~btUniformScalingShape(); + + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; + + btScalar getUniformScalingFactor() const + { + return m_uniformScalingFactor; + } + + btConvexShape* getChildShape() + { + return m_childConvexShape; + } + + const btConvexShape* getChildShape() const + { + return m_childConvexShape; + } + + virtual const char* getName()const + { + return "UniformScalingShape"; + } + + virtual int getShapeType() const { return UNIFORM_SCALING_SHAPE_PROXYTYPE; } + + + /////////////////////////// + + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + virtual void setLocalScaling(const btVector3& scaling) ; + virtual const btVector3& getLocalScaling() const ; + + virtual void setMargin(btScalar margin); + virtual btScalar getMargin() const; + + virtual int getNumPreferredPenetrationDirections() const; + + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const; + + +}; + +#endif //BT_UNIFORM_SCALING_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp index 2c565734e97..c6a2b396d78 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp @@ -26,7 +26,7 @@ subject to the following restrictions: -btContinuousConvexCollision::btContinuousConvexCollision ( btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) +btContinuousConvexCollision::btContinuousConvexCollision ( const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) :m_simplexSolver(simplexSolver), m_penetrationDepthSolver(penetrationDepthSolver), m_convexA(convexA),m_convexB(convexB) @@ -93,7 +93,7 @@ bool btContinuousConvexCollision::calcTimeOfImpact( btGjkPairDetector::ClosestPointInput input; //we don't use margins during CCD - gjk.setIgnoreMargin(true); + // gjk.setIgnoreMargin(true); input.m_transformA = fromA; input.m_transformB = fromB; @@ -108,22 +108,26 @@ bool btContinuousConvexCollision::calcTimeOfImpact( btScalar dist; dist = pointCollector1.m_distance; n = pointCollector1.m_normalOnBInWorld; - + + + //not close enough while (dist > radius) { numIter++; if (numIter > maxIter) + { return false; //todo: report a failure - + } btScalar dLambda = btScalar(0.); + btScalar projectedLinearVelocity = (linVelB-linVelA).dot(n); + //calculate safe moving fraction from distance / (linear+rotational velocity) //btScalar clippedDist = GEN_min(angularConservativeRadius,dist); //btScalar clippedDist = dist; - btScalar projectedLinearVelocity = (linVelB-linVelA).dot(n); dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity); @@ -135,9 +139,14 @@ bool btContinuousConvexCollision::calcTimeOfImpact( if (lambda < btScalar(0.)) return false; + //todo: next check with relative epsilon if (lambda <= lastLambda) + { + return false; + //n.setValue(0,0,0); break; + } lastLambda = lambda; @@ -163,11 +172,12 @@ bool btContinuousConvexCollision::calcTimeOfImpact( { //degenerate ?! result.m_fraction = lastLambda; - result.m_normal = n; + n = pointCollector.m_normalOnBInWorld; + result.m_normal=n;//.setValue(1,1,1);// = n; return true; } c = pointCollector.m_pointInWorld; - + n = pointCollector.m_normalOnBInWorld; dist = pointCollector.m_distance; } else { diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h index 9901bab4b45..28c2b4d6156 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h @@ -30,13 +30,13 @@ class btContinuousConvexCollision : public btConvexCast { btSimplexSolverInterface* m_simplexSolver; btConvexPenetrationDepthSolver* m_penetrationDepthSolver; - btConvexShape* m_convexA; - btConvexShape* m_convexB; + const btConvexShape* m_convexA; + const btConvexShape* m_convexB; public: - btContinuousConvexCollision (btConvexShape* shapeA,btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); + btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); virtual bool calcTimeOfImpact( const btTransform& fromA, diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h index 3101b59993d..cc80f0aa8da 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h @@ -17,11 +17,11 @@ subject to the following restrictions: #ifndef CONVEX_CAST_H #define CONVEX_CAST_H -#include "../../LinearMath/btTransform.h" -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btScalar.h" class btMinkowskiSumShape; -#include "../../LinearMath/btIDebugDraw.h" +#include "LinearMath/btIDebugDraw.h" /// btConvexCast is an interface for Casting class btConvexCast diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h index 7caeba4be45..99690921317 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h @@ -21,7 +21,7 @@ class btStackAlloc; class btVector3; #include "btSimplexSolverInterface.h" class btConvexShape; -#include "../../LinearMath/btPoint3.h" +#include "LinearMath/btPoint3.h" class btTransform; ///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. @@ -31,7 +31,7 @@ public: virtual ~btConvexPenetrationDepthSolver() {}; virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - btConvexShape* convexA,btConvexShape* convexB, + const btConvexShape* convexA,const btConvexShape* convexB, const btTransform& transA,const btTransform& transB, btVector3& v, btPoint3& pa, btPoint3& pb, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h index 15000c1ab61..f11c8bd1290 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h @@ -16,8 +16,8 @@ subject to the following restrictions: #ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H #define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H -#include "../../LinearMath/btTransform.h" -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" class btStackAlloc; /// This interface is made to be used by an iterative approach to do TimeOfImpact calculations diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp index 93edffeafd6..da2a02b9839 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp @@ -22,7 +22,7 @@ subject to the following restrictions: #include "btPointCollector.h" -btGjkConvexCast::btGjkConvexCast(btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) +btGjkConvexCast::btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) :m_simplexSolver(simplexSolver), m_convexA(convexA), m_convexB(convexB) diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h index 3905c45e6d6..a977c9e83f7 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h @@ -18,9 +18,9 @@ subject to the following restrictions: #ifndef GJK_CONVEX_CAST_H #define GJK_CONVEX_CAST_H -#include "../CollisionShapes/btCollisionMargin.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btConvexCast.h" class btConvexShape; class btMinkowskiSumShape; @@ -30,12 +30,12 @@ class btMinkowskiSumShape; class btGjkConvexCast : public btConvexCast { btSimplexSolverInterface* m_simplexSolver; - btConvexShape* m_convexA; - btConvexShape* m_convexB; + const btConvexShape* m_convexA; + const btConvexShape* m_convexB; public: - btGjkConvexCast(btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); + btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); /// cast a convex against another convex object virtual bool calcTimeOfImpact( diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp index 8abdfdbb7e5..f57868be044 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp @@ -580,8 +580,8 @@ using namespace gjkepa_impl; // -bool btGjkEpaSolver::Collide(btConvexShape *shape0,const btTransform &wtrs0, - btConvexShape *shape1,const btTransform &wtrs1, +bool btGjkEpaSolver::Collide(const btConvexShape *shape0,const btTransform &wtrs0, + const btConvexShape *shape1,const btTransform &wtrs1, btScalar radialmargin, btStackAlloc* stackAlloc, sResults& results) diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h index 759b30bb17f..1338e2714a8 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h @@ -21,7 +21,7 @@ Nov.2006 #ifndef _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ #define _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ -#include "../CollisionShapes/btConvexShape.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" class btStackAlloc; @@ -43,8 +43,8 @@ struct sResults int epa_iterations; int gjk_iterations; }; -static bool Collide(btConvexShape* shape0,const btTransform& wtrs0, - btConvexShape* shape1,const btTransform& wtrs1, +static bool Collide(const btConvexShape* shape0,const btTransform& wtrs0, + const btConvexShape* shape1,const btTransform& wtrs1, btScalar radialmargin, btStackAlloc* stackAlloc, sResults& results); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp index 87330493b60..9e600652333 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp @@ -20,7 +20,7 @@ subject to the following restrictions: #include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver, - btConvexShape* pConvexA, btConvexShape* pConvexB, + const btConvexShape* pConvexA, const btConvexShape* pConvexB, const btTransform& transformA, const btTransform& transformB, btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc ) diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h index 3916ba0776c..2dc069ce5cf 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h @@ -26,7 +26,7 @@ class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver public : bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - btConvexShape* pConvexA, btConvexShape* pConvexB, + const btConvexShape* pConvexA, const btConvexShape* pConvexB, const btTransform& transformA, const btTransform& transformB, btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp index f1f3f7f7f6c..c5f50d4dd1a 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp @@ -35,7 +35,7 @@ int gNumGjkChecks = 0; -btGjkPairDetector::btGjkPairDetector(btConvexShape* objectA,btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver) +btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver) :m_cachedSeparatingAxis(btScalar(0.),btScalar(0.),btScalar(1.)), m_penetrationDepthSolver(penetrationDepthSolver), m_simplexSolver(simplexSolver), diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h index af0fe32f6c7..1ec51f74069 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h @@ -20,8 +20,8 @@ subject to the following restrictions: #define GJK_PAIR_DETECTOR_H #include "btDiscreteCollisionDetectorInterface.h" -#include "../../LinearMath/btPoint3.h" -#include "../CollisionShapes/btCollisionMargin.h" +#include "LinearMath/btPoint3.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" class btConvexShape; #include "btSimplexSolverInterface.h" @@ -35,8 +35,8 @@ class btGjkPairDetector : public btDiscreteCollisionDetectorInterface btVector3 m_cachedSeparatingAxis; btConvexPenetrationDepthSolver* m_penetrationDepthSolver; btSimplexSolverInterface* m_simplexSolver; - btConvexShape* m_minkowskiA; - btConvexShape* m_minkowskiB; + const btConvexShape* m_minkowskiA; + const btConvexShape* m_minkowskiB; bool m_ignoreMargin; @@ -49,7 +49,7 @@ public: int m_catchDegeneracies; - btGjkPairDetector(btConvexShape* objectA,btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); + btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); virtual ~btGjkPairDetector() {}; virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw); diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h index f6a893151da..1933d378f4f 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h @@ -16,8 +16,8 @@ subject to the following restrictions: #ifndef MANIFOLD_CONTACT_POINT_H #define MANIFOLD_CONTACT_POINT_H -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransformUtil.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransformUtil.h" diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp index c4bab3a134a..100bc240764 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp @@ -71,7 +71,7 @@ btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654)) bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver, - btConvexShape* convexA,btConvexShape* convexB, + const btConvexShape* convexA,const btConvexShape* convexB, const btTransform& transA,const btTransform& transB, btVector3& v, btPoint3& pa, btPoint3& pb, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc @@ -112,8 +112,7 @@ bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& s //just take fixed number of orientation, and sample the penetration depth in that direction btScalar minProj = btScalar(1e30); - btVector3 minNorm; - btVector3 minVertex; + btVector3 minNorm(btScalar(0.), btScalar(0.), btScalar(0.)); btVector3 minA,minB; btVector3 seperatingAxisInA,seperatingAxisInB; btVector3 pInA,qInB,pWorld,qWorld,w; diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h index b348b21b52a..27b42c2b47e 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h @@ -25,7 +25,7 @@ class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver public: virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - btConvexShape* convexA,btConvexShape* convexB, + const btConvexShape* convexA,const btConvexShape* convexB, const btTransform& transA,const btTransform& transB, btVector3& v, btPoint3& pa, btPoint3& pb, class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp index 08cb3ed334d..ee94ee01149 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp @@ -27,20 +27,12 @@ btPersistentManifold::btPersistentManifold() :m_body0(0), m_body1(0), m_cachedPoints (0), -m_index1(0) +m_index1a(0) { } -void btPersistentManifold::clearManifold() -{ - int i; - for (i=0;i @@ -198,10 +190,20 @@ btScalar btPersistentManifold::getContactBreakingThreshold() const return gContactBreakingThreshold; } + + void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btTransform& trB) { int i; - +#ifdef DEBUG_PERSISTENCY + printf("refreshContactPoints posA = (%f,%f,%f) posB = (%f,%f,%f)\n", + trA.getOrigin().getX(), + trA.getOrigin().getY(), + trA.getOrigin().getZ(), + trB.getOrigin().getX(), + trB.getOrigin().getY(), + trB.getOrigin().getZ()); +#endif //DEBUG_PERSISTENCY /// first refresh worldspace positions and distance for (i=getNumContacts()-1;i>=0;i--) { diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h index a5918b84db3..f0b1ce58db7 100644 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h @@ -17,9 +17,10 @@ subject to the following restrictions: #define PERSISTENT_MANIFOLD_H -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" #include "btManifoldPoint.h" +#include "LinearMath/btAlignedAllocator.h" struct btCollisionResult; @@ -34,8 +35,13 @@ extern ContactDestroyedCallback gContactDestroyedCallback; #define MANIFOLD_CACHE_SIZE 4 -///btPersistentManifold maintains contact points, and reduces them to 4. -///It does contact filtering/contact reduction. +///btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase. +///Those contact points are created by the collision narrow phase. +///The cache can be empty, or hold 1,2,3 or 4 points. Some collision algorithms (GJK) might only add one point at a time. +///updates/refreshes old contact points, and throw them away if necessary (distance becomes too large) +///reduces the cache to 4 points, when more then 4 points are added, using following rules: +///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points +///note that some pairs of objects might have more then one contact manifold. ATTRIBUTE_ALIGNED16( class) btPersistentManifold { @@ -55,20 +61,22 @@ ATTRIBUTE_ALIGNED16( class) btPersistentManifold public: - int m_index1; + BT_DECLARE_ALIGNED_ALLOCATOR(); + + int m_index1a; btPersistentManifold(); - btPersistentManifold(void* body0,void* body1) + btPersistentManifold(void* body0,void* body1,int bla) : m_body0(body0),m_body1(body1),m_cachedPoints(0) { } - inline void* getBody0() { return m_body0;} - inline void* getBody1() { return m_body1;} + SIMD_FORCE_INLINE void* getBody0() { return m_body0;} + SIMD_FORCE_INLINE void* getBody1() { return m_body1;} - inline const void* getBody0() const { return m_body0;} - inline const void* getBody1() const { return m_body1;} + SIMD_FORCE_INLINE const void* getBody0() const { return m_body0;} + SIMD_FORCE_INLINE const void* getBody1() const { return m_body1;} void setBodies(void* body0,void* body1) { @@ -82,15 +90,15 @@ public: void DebugPersistency(); #endif // - inline int getNumContacts() const { return m_cachedPoints;} + SIMD_FORCE_INLINE int getNumContacts() const { return m_cachedPoints;} - inline const btManifoldPoint& getContactPoint(int index) const + SIMD_FORCE_INLINE const btManifoldPoint& getContactPoint(int index) const { btAssert(index < m_cachedPoints); return m_pointCache[index]; } - inline btManifoldPoint& getContactPoint(int index) + SIMD_FORCE_INLINE btManifoldPoint& getContactPoint(int index) { btAssert(index < m_cachedPoints); return m_pointCache[index]; @@ -114,6 +122,7 @@ public: m_pointCache[index] = m_pointCache[lastUsedIndex]; //get rid of duplicated userPersistentData pointer m_pointCache[lastUsedIndex].m_userPersistentData = 0; + m_pointCache[lastUsedIndex].m_lifeTime = 0; } btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0); @@ -147,7 +156,16 @@ public: /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin void refreshContactPoints( const btTransform& trA,const btTransform& trB); - void clearManifold(); + + SIMD_FORCE_INLINE void clearManifold() + { + int i; + for (i=0;i btConeTwistConstraint::btConeTwistConstraint() +:btTypedConstraint(CONETWIST_CONSTRAINT_TYPE) { } btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame,const btTransform& rbBFrame) - :btTypedConstraint(rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), + :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), m_angularOnly(false) { // flip axis for correct angles @@ -49,7 +50,7 @@ btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB, } btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame) - :btTypedConstraint(rbA),m_rbAFrame(rbAFrame), + :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE,rbA),m_rbAFrame(rbAFrame), m_angularOnly(false) { m_rbBFrame = m_rbAFrame; @@ -205,7 +206,6 @@ void btConeTwistConstraint::solveConstraint(btScalar timeStep) btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); btScalar tau = btScalar(0.3); - btScalar damping = btScalar(1.); //linear part if (!m_angularOnly) @@ -247,7 +247,7 @@ void btConeTwistConstraint::solveConstraint(btScalar timeStep) // Clamp the accumulated impulse btScalar temp = m_accSwingLimitImpulse; - m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, 0.0f ); + m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, btScalar(0.0) ); impulseMag = m_accSwingLimitImpulse - temp; btVector3 impulse = m_swingAxis * impulseMag; @@ -265,7 +265,7 @@ void btConeTwistConstraint::solveConstraint(btScalar timeStep) // Clamp the accumulated impulse btScalar temp = m_accTwistLimitImpulse; - m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, 0.0f ); + m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, btScalar(0.0) ); impulseMag = m_accTwistLimitImpulse - temp; btVector3 impulse = m_twistAxis * impulseMag; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h index 874669c80b3..f121919c8f9 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h @@ -30,6 +30,9 @@ class btRigidBody; ///btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc) class btConeTwistConstraint : public btTypedConstraint { +#ifdef IN_PARALLELL_SOLVER +public: +#endif btJacobianEntry m_jac[3]; //3 orthogonal linear constraints btTransform m_rbAFrame; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h index 7e8458c2c7b..addfb67a839 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef CONSTRAINT_SOLVER_H #define CONSTRAINT_SOLVER_H -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btScalar.h" class btPersistentManifold; class btRigidBody; @@ -26,7 +26,7 @@ struct btContactSolverInfo; struct btBroadphaseProxy; class btIDebugDraw; class btStackAlloc; - +class btDispatcher; /// btConstraintSolver provides solver interface class btConstraintSolver { @@ -35,8 +35,15 @@ public: virtual ~btConstraintSolver() {} - virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc) = 0; + virtual void prepareSolve (int numBodies, int numManifolds) {;} + ///solve a group of constraints + virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0; + + virtual void allSolved (const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc) {;} + + ///clear internal cached data and reset random seed + virtual void reset() = 0; }; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp index bb3fe832592..1588428503a 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp @@ -192,8 +192,8 @@ btScalar resolveSingleFriction( j1 = -vrel * cpd->m_jacDiagABInvTangent0; btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse0; cpd->m_accumulatedTangentImpulse0 = oldTangentImpulse + j1; - GEN_set_min(cpd->m_accumulatedTangentImpulse0, limit); - GEN_set_max(cpd->m_accumulatedTangentImpulse0, -limit); + btSetMin(cpd->m_accumulatedTangentImpulse0, limit); + btSetMax(cpd->m_accumulatedTangentImpulse0, -limit); j1 = cpd->m_accumulatedTangentImpulse0 - oldTangentImpulse; } @@ -206,8 +206,8 @@ btScalar resolveSingleFriction( j2 = -vrel * cpd->m_jacDiagABInvTangent1; btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse1; cpd->m_accumulatedTangentImpulse1 = oldTangentImpulse + j2; - GEN_set_min(cpd->m_accumulatedTangentImpulse1, limit); - GEN_set_max(cpd->m_accumulatedTangentImpulse1, -limit); + btSetMin(cpd->m_accumulatedTangentImpulse1, limit); + btSetMax(cpd->m_accumulatedTangentImpulse1, -limit); j2 = cpd->m_accumulatedTangentImpulse1 - oldTangentImpulse; } @@ -270,8 +270,8 @@ btScalar resolveSingleFrictionOriginal( // calculate j that moves us to zero relative velocity btScalar j = -vrel * cpd->m_jacDiagABInvTangent0; btScalar total = cpd->m_accumulatedTangentImpulse0 + j; - GEN_set_min(total, limit); - GEN_set_max(total, -limit); + btSetMin(total, limit); + btSetMax(total, -limit); j = total - cpd->m_accumulatedTangentImpulse0; cpd->m_accumulatedTangentImpulse0 = total; body1.applyImpulse(j * cpd->m_frictionWorldTangential0, rel_pos1); @@ -290,8 +290,8 @@ btScalar resolveSingleFrictionOriginal( // calculate j that moves us to zero relative velocity btScalar j = -vrel * cpd->m_jacDiagABInvTangent1; btScalar total = cpd->m_accumulatedTangentImpulse1 + j; - GEN_set_min(total, limit); - GEN_set_max(total, -limit); + btSetMin(total, limit); + btSetMax(total, -limit); j = total - cpd->m_accumulatedTangentImpulse1; cpd->m_accumulatedTangentImpulse1 = total; body1.applyImpulse(j * cpd->m_frictionWorldTangential1, rel_pos1); @@ -388,8 +388,8 @@ btScalar resolveSingleCollisionCombined( (body1.getInvMass() + body2.getInvMass() + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); btScalar normal_impulse = cpd->m_appliedImpulse * combinedFriction; - GEN_set_min(friction_impulse, normal_impulse); - GEN_set_max(friction_impulse, -normal_impulse); + btSetMin(friction_impulse, normal_impulse); + btSetMax(friction_impulse, -normal_impulse); body1.applyImpulse(lat_vel * -friction_impulse, rel_pos1); body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); } diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h index 0834deddeac..826e79f78bd 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h @@ -19,8 +19,8 @@ subject to the following restrictions: //todo: make into a proper class working with the iterative constraint solver class btRigidBody; -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btScalar.h" struct btContactSolverInfo; class btManifoldPoint; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h index c3c73e300f4..ad2c40e2107 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h @@ -16,8 +16,21 @@ subject to the following restrictions: #ifndef CONTACT_SOLVER_INFO #define CONTACT_SOLVER_INFO +struct btContactSolverInfoData +{ + btScalar m_tau; + btScalar m_damping; + btScalar m_friction; + btScalar m_timeStep; + btScalar m_restitution; + int m_numIterations; + btScalar m_maxErrorReduction; + btScalar m_sor; + btScalar m_erp; -struct btContactSolverInfo +}; + +struct btContactSolverInfo : public btContactSolverInfoData { inline btContactSolverInfo() @@ -32,16 +45,7 @@ struct btContactSolverInfo m_sor = btScalar(1.3); } - btScalar m_tau; - btScalar m_damping; - btScalar m_friction; - btScalar m_timeStep; - btScalar m_restitution; - int m_numIterations; - btScalar m_maxErrorReduction; - btScalar m_sor; - btScalar m_erp; - + }; #endif //CONTACT_SOLVER_INFO diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp index 747d10d1f8b..96d48f9f7dd 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp @@ -4,14 +4,20 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ +/* +2007-09-09 +Refactored by Francisco León +email: projectileman@yahoo.com +http://gimpact.sf.net +*/ #include "btGeneric6DofConstraint.h" @@ -19,371 +25,473 @@ subject to the following restrictions: #include "LinearMath/btTransformUtil.h" #include + static const btScalar kSign[] = { btScalar(1.0), btScalar(-1.0), btScalar(1.0) }; static const int kAxisA[] = { 1, 0, 0 }; static const int kAxisB[] = { 2, 2, 1 }; #define GENERIC_D6_DISABLE_WARMSTARTING 1 -btGeneric6DofConstraint::btGeneric6DofConstraint() +btScalar btGetMatrixElem(const btMatrix3x3& mat, int index) { -} - -btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB) -: btTypedConstraint(rbA, rbB) -, m_frameInA(frameInA) -, m_frameInB(frameInB) -{ - //free means upper < lower, - //locked means upper == lower - //limited means upper > lower - //so start all locked - for (int i=0; i<6;++i) - { - m_lowerLimit[i] = btScalar(0.0); - m_upperLimit[i] = btScalar(0.0); - m_accumulatedImpulse[i] = btScalar(0.0); - } - -} - - -void btGeneric6DofConstraint::buildJacobian() -{ - btVector3 localNormalInA(0,0,0); - - const btVector3& pivotInA = m_frameInA.getOrigin(); - const btVector3& pivotInB = m_frameInB.getOrigin(); - - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform() * m_frameInA.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform() * m_frameInB.getOrigin(); - - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - int i; - //linear part - for (i=0;i<3;i++) - { - if (isLimited(i)) - { - localNormalInA[i] = 1; - btVector3 normalWorld = m_rbA.getCenterOfMassTransform().getBasis() * localNormalInA; - - - // Create linear atom - new (&m_jacLinear[i]) btJacobianEntry( - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getCenterOfMassTransform()*pivotInA - m_rbA.getCenterOfMassPosition(), - m_rbB.getCenterOfMassTransform()*pivotInB - m_rbB.getCenterOfMassPosition(), - normalWorld, - m_rbA.getInvInertiaDiagLocal(), - m_rbA.getInvMass(), - m_rbB.getInvInertiaDiagLocal(), - m_rbB.getInvMass()); - - //optionally disable warmstarting -#ifdef GENERIC_D6_DISABLE_WARMSTARTING - m_accumulatedImpulse[i] = btScalar(0.); -#endif //GENERIC_D6_DISABLE_WARMSTARTING - - // Apply accumulated impulse - btVector3 impulse_vector = m_accumulatedImpulse[i] * normalWorld; - - m_rbA.applyImpulse( impulse_vector, rel_pos1); - m_rbB.applyImpulse(-impulse_vector, rel_pos2); - - localNormalInA[i] = 0; - } - } - - // angular part - for (i=0;i<3;i++) - { - if (isLimited(i+3)) - { - btVector3 axisA = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn( kAxisA[i] ); - btVector3 axisB = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn( kAxisB[i] ); - - // Dirk: This is IMO mathematically the correct way, but we should consider axisA and axisB being near parallel maybe - btVector3 axis = kSign[i] * axisA.cross(axisB); - - // Create angular atom - new (&m_jacAng[i]) btJacobianEntry(axis, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); - -#ifdef GENERIC_D6_DISABLE_WARMSTARTING - m_accumulatedImpulse[i + 3] = btScalar(0.); -#endif //GENERIC_D6_DISABLE_WARMSTARTING - - // Apply accumulated impulse - btVector3 impulse_vector = m_accumulatedImpulse[i + 3] * axis; - - m_rbA.applyTorqueImpulse( impulse_vector); - m_rbB.applyTorqueImpulse(-impulse_vector); - } - } -} - -btScalar getMatrixElem(const btMatrix3x3& mat,int index) -{ - int row = index%3; - int col = index / 3; - return mat[row][col]; + int i = index%3; + int j = index/3; + return mat[i][j]; } ///MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html -bool MatrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz) +bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz) { - // rot = cy*cz -cy*sz sy - // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx - // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy +// // rot = cy*cz -cy*sz sy +// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx +// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy +// + + if (btGetMatrixElem(mat,2) < btScalar(1.0)) + { + if (btGetMatrixElem(mat,2) > btScalar(-1.0)) + { + xyz[0] = btAtan2(-btGetMatrixElem(mat,5),btGetMatrixElem(mat,8)); + xyz[1] = btAsin(btGetMatrixElem(mat,2)); + xyz[2] = btAtan2(-btGetMatrixElem(mat,1),btGetMatrixElem(mat,0)); + return true; + } + else + { + // WARNING. Not unique. XA - ZA = -atan2(r10,r11) + xyz[0] = -btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); + xyz[1] = -SIMD_HALF_PI; + xyz[2] = btScalar(0.0); + return false; + } + } + else + { + // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) + xyz[0] = btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); + xyz[1] = SIMD_HALF_PI; + xyz[2] = 0.0; + + } -/// 0..8 - if (getMatrixElem(mat,2) < btScalar(1.0)) - { - if (getMatrixElem(mat,2) > btScalar(-1.0)) - { - xyz[0] = btAtan2(-getMatrixElem(mat,5),getMatrixElem(mat,8)); - xyz[1] = btAsin(getMatrixElem(mat,2)); - xyz[2] = btAtan2(-getMatrixElem(mat,1),getMatrixElem(mat,0)); - return true; - } - else - { - // WARNING. Not unique. XA - ZA = -atan2(r10,r11) - xyz[0] = -btAtan2(getMatrixElem(mat,3),getMatrixElem(mat,4)); - xyz[1] = -SIMD_HALF_PI; - xyz[2] = btScalar(0.0); - return false; - } - } - else - { - // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) - xyz[0] = btAtan2(getMatrixElem(mat,3),getMatrixElem(mat,4)); - xyz[1] = SIMD_HALF_PI; - xyz[2] = 0.0; - - } - return false; } -void btGeneric6DofConstraint::solveConstraint(btScalar timeStep) + +//////////////////////////// btRotationalLimitMotor //////////////////////////////////// + + +int btRotationalLimitMotor::testLimitValue(btScalar test_value) { - btScalar tau = btScalar(0.1); - btScalar damping = btScalar(1.0); - - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform() * m_frameInA.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform() * m_frameInB.getOrigin(); - - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 localNormalInA(0,0,0); - int i; - - // linear - for (i=0;i<3;i++) - { - if (isLimited(i)) - { - btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); - btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); - - localNormalInA.setValue(0,0,0); - localNormalInA[i] = 1; - btVector3 normalWorld = m_rbA.getCenterOfMassTransform().getBasis() * localNormalInA; - - btScalar jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); - - //velocity error (first order error) - btScalar rel_vel = m_jacLinear[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, - m_rbB.getLinearVelocity(),angvelB); - - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normalWorld); - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); - - //handle the limits - if (m_lowerLimit[i] < m_upperLimit[i]) - { - { - if (depth > m_upperLimit[i]) - { - depth -= m_upperLimit[i]; - lo = btScalar(0.); - - } else - { - if (depth < m_lowerLimit[i]) - { - depth -= m_lowerLimit[i]; - hi = btScalar(0.); - } else - { - continue; - } - } - } - } - - btScalar normalImpulse= (tau*depth/timeStep - damping*rel_vel) * jacDiagABInv; - btScalar oldNormalImpulse = m_accumulatedImpulse[i]; - btScalar sum = oldNormalImpulse + normalImpulse; - m_accumulatedImpulse[i] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - normalImpulse = m_accumulatedImpulse[i] - oldNormalImpulse; - - btVector3 impulse_vector = normalWorld * normalImpulse; - m_rbA.applyImpulse( impulse_vector, rel_pos1); - m_rbB.applyImpulse(-impulse_vector, rel_pos2); - - localNormalInA[i] = 0; - } - } - - btVector3 axis; - btScalar angle; - btTransform frameAWorld = m_rbA.getCenterOfMassTransform() * m_frameInA; - btTransform frameBWorld = m_rbB.getCenterOfMassTransform() * m_frameInB; - - btTransformUtil::calculateDiffAxisAngle(frameAWorld,frameBWorld,axis,angle); - btQuaternion diff(axis,angle); - btMatrix3x3 diffMat (diff); - btVector3 xyz; - ///this is not perfect, we can first check which axis are limited, and choose a more appropriate order - MatrixToEulerXYZ(diffMat,xyz); - - // angular - for (i=0;i<3;i++) + if(m_loLimit>m_hiLimit) { - if (isLimited(i+3)) - { - btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); - btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); - - btScalar jacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); - - //velocity error (first order error) - btScalar rel_vel = m_jacAng[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, - m_rbB.getLinearVelocity(),angvelB); - - //positional error (zeroth order error) - btVector3 axisA = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn( kAxisA[i] ); - btVector3 axisB = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn( kAxisB[i] ); - - btScalar rel_pos = kSign[i] * axisA.dot(axisB); - - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); - - //handle the twist limit - if (m_lowerLimit[i+3] < m_upperLimit[i+3]) - { - //clamp the values - btScalar loLimit = m_lowerLimit[i+3] > -3.1415 ? m_lowerLimit[i+3] : btScalar(-1e30); - btScalar hiLimit = m_upperLimit[i+3] < 3.1415 ? m_upperLimit[i+3] : btScalar(1e30); - - btScalar projAngle = btScalar(-1.)*xyz[i]; - - if (projAngle < loLimit) - { - hi = btScalar(0.); - rel_pos = (loLimit - projAngle); - } else - { - if (projAngle > hiLimit) - { - lo = btScalar(0.); - rel_pos = (hiLimit - projAngle); - } else - { - continue; - } - } - } - - //impulse - - btScalar normalImpulse= -(tau*rel_pos/timeStep + damping*rel_vel) * jacDiagABInv; - btScalar oldNormalImpulse = m_accumulatedImpulse[i+3]; - btScalar sum = oldNormalImpulse + normalImpulse; - m_accumulatedImpulse[i+3] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - normalImpulse = m_accumulatedImpulse[i+3] - oldNormalImpulse; - - // Dirk: Not needed - we could actually project onto Jacobian entry here (same as above) - btVector3 axis = kSign[i] * axisA.cross(axisB); - btVector3 impulse_vector = axis * normalImpulse; - - m_rbA.applyTorqueImpulse( impulse_vector); - m_rbB.applyTorqueImpulse(-impulse_vector); - } + m_currentLimit = 0;//Free from violation + return 0; } + + if (test_value < m_loLimit) + { + m_currentLimit = 1;//low limit violation + m_currentLimitError = test_value - m_loLimit; + return 1; + } + else if (test_value> m_hiLimit) + { + m_currentLimit = 2;//High limit violation + m_currentLimitError = test_value - m_hiLimit; + return 2; + } + else + { + m_currentLimit = 0;//Free from violation + return 0; + } + return 0; +} + + +btScalar btRotationalLimitMotor::solveAngularLimits( + btScalar timeStep,btVector3& axis,btScalar jacDiagABInv, + btRigidBody * body0, btRigidBody * body1) +{ + if (needApplyTorques()==false) return 0.0f; + + btScalar target_velocity = m_targetVelocity; + btScalar maxMotorForce = m_maxMotorForce; + + //current error correction + if (m_currentLimit!=0) + { + target_velocity = -m_ERP*m_currentLimitError/(timeStep); + maxMotorForce = m_maxLimitForce; + } + + maxMotorForce *= timeStep; + + // current velocity difference + btVector3 vel_diff = body0->getAngularVelocity(); + if (body1) + { + vel_diff -= body1->getAngularVelocity(); + } + + + + btScalar rel_vel = axis.dot(vel_diff); + + // correction velocity + btScalar motor_relvel = m_limitSoftness*(target_velocity - m_damping*rel_vel); + + + if ( motor_relvel < SIMD_EPSILON && motor_relvel > -SIMD_EPSILON ) + { + return 0.0f;//no need for applying force + } + + + // correction impulse + btScalar unclippedMotorImpulse = (1+m_bounce)*motor_relvel*jacDiagABInv; + + // clip correction impulse + btScalar clippedMotorImpulse; + + //todo: should clip against accumulated impulse + if (unclippedMotorImpulse>0.0f) + { + clippedMotorImpulse = unclippedMotorImpulse > maxMotorForce? maxMotorForce: unclippedMotorImpulse; + } + else + { + clippedMotorImpulse = unclippedMotorImpulse < -maxMotorForce ? -maxMotorForce: unclippedMotorImpulse; + } + + + // sort with accumulated impulses + btScalar lo = btScalar(-1e30); + btScalar hi = btScalar(1e30); + + btScalar oldaccumImpulse = m_accumulatedImpulse; + btScalar sum = oldaccumImpulse + clippedMotorImpulse; + m_accumulatedImpulse = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + + clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse; + + + + btVector3 motorImp = clippedMotorImpulse * axis; + + + body0->applyTorqueImpulse(motorImp); + if (body1) body1->applyTorqueImpulse(-motorImp); + + return clippedMotorImpulse; + + +} + +//////////////////////////// End btRotationalLimitMotor //////////////////////////////////// + +//////////////////////////// btTranslationalLimitMotor //////////////////////////////////// +btScalar btTranslationalLimitMotor::solveLinearAxis( + btScalar timeStep, + btScalar jacDiagABInv, + btRigidBody& body1,const btVector3 &pointInA, + btRigidBody& body2,const btVector3 &pointInB, + int limit_index, + const btVector3 & axis_normal_on_a) +{ + +///find relative velocity + btVector3 rel_pos1 = pointInA - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pointInB - body2.getCenterOfMassPosition(); + + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar rel_vel = axis_normal_on_a.dot(vel); + + + +/// apply displacement correction + +//positional error (zeroth order error) + btScalar depth = -(pointInA - pointInB).dot(axis_normal_on_a); + btScalar lo = btScalar(-1e30); + btScalar hi = btScalar(1e30); + + btScalar minLimit = m_lowerLimit[limit_index]; + btScalar maxLimit = m_upperLimit[limit_index]; + + //handle the limits + if (minLimit < maxLimit) + { + { + if (depth > maxLimit) + { + depth -= maxLimit; + lo = btScalar(0.); + + } + else + { + if (depth < minLimit) + { + depth -= minLimit; + hi = btScalar(0.); + } + else + { + return 0.0f; + } + } + } + } + + btScalar normalImpulse= m_limitSoftness*(m_restitution*depth/timeStep - m_damping*rel_vel) * jacDiagABInv; + + + + + btScalar oldNormalImpulse = m_accumulatedImpulse[limit_index]; + btScalar sum = oldNormalImpulse + normalImpulse; + m_accumulatedImpulse[limit_index] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse; + + btVector3 impulse_vector = axis_normal_on_a * normalImpulse; + body1.applyImpulse( impulse_vector, rel_pos1); + body2.applyImpulse(-impulse_vector, rel_pos2); + return normalImpulse; +} + +//////////////////////////// btTranslationalLimitMotor //////////////////////////////////// + + +btGeneric6DofConstraint::btGeneric6DofConstraint() + :btTypedConstraint(D6_CONSTRAINT_TYPE), + m_useLinearReferenceFrameA(true) +{ +} + +btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA) + : btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB) + , m_frameInA(frameInA) + , m_frameInB(frameInB), + m_useLinearReferenceFrameA(useLinearReferenceFrameA) +{ + +} + + + + + +void btGeneric6DofConstraint::calculateAngleInfo() +{ + btMatrix3x3 relative_frame = m_calculatedTransformA.getBasis().inverse()*m_calculatedTransformB.getBasis(); + + matrixToEulerXYZ(relative_frame,m_calculatedAxisAngleDiff); + + + + // in euler angle mode we do not actually constrain the angular velocity + // along the axes axis[0] and axis[2] (although we do use axis[1]) : + // + // to get constrain w2-w1 along ...not + // ------ --------------------- ------ + // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] + // d(angle[1])/dt = 0 ax[1] + // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] + // + // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. + // to prove the result for angle[0], write the expression for angle[0] from + // GetInfo1 then take the derivative. to prove this for angle[2] it is + // easier to take the euler rate expression for d(angle[2])/dt with respect + // to the components of w and set that to 0. + + btVector3 axis0 = m_calculatedTransformB.getBasis().getColumn(0); + btVector3 axis2 = m_calculatedTransformA.getBasis().getColumn(2); + + m_calculatedAxis[1] = axis2.cross(axis0); + m_calculatedAxis[0] = m_calculatedAxis[1].cross(axis2); + m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]); + + +// if(m_debugDrawer) +// { +// +// char buff[300]; +// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ", +// m_calculatedAxisAngleDiff[0], +// m_calculatedAxisAngleDiff[1], +// m_calculatedAxisAngleDiff[2]); +// m_debugDrawer->reportErrorWarning(buff); +// } + +} + +void btGeneric6DofConstraint::calculateTransforms() +{ + m_calculatedTransformA = m_rbA.getCenterOfMassTransform() * m_frameInA; + m_calculatedTransformB = m_rbB.getCenterOfMassTransform() * m_frameInB; + + calculateAngleInfo(); +} + + +void btGeneric6DofConstraint::buildLinearJacobian( + btJacobianEntry & jacLinear,const btVector3 & normalWorld, + const btVector3 & pivotAInW,const btVector3 & pivotBInW) +{ + new (&jacLinear) btJacobianEntry( + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + pivotAInW - m_rbA.getCenterOfMassPosition(), + pivotBInW - m_rbB.getCenterOfMassPosition(), + normalWorld, + m_rbA.getInvInertiaDiagLocal(), + m_rbA.getInvMass(), + m_rbB.getInvInertiaDiagLocal(), + m_rbB.getInvMass()); + +} + +void btGeneric6DofConstraint::buildAngularJacobian( + btJacobianEntry & jacAngular,const btVector3 & jointAxisW) +{ + new (&jacAngular) btJacobianEntry(jointAxisW, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + +} + +bool btGeneric6DofConstraint::testAngularLimitMotor(int axis_index) +{ + btScalar angle = m_calculatedAxisAngleDiff[axis_index]; + + //test limits + m_angularLimits[axis_index].testLimitValue(angle); + return m_angularLimits[axis_index].needApplyTorques(); +} + +void btGeneric6DofConstraint::buildJacobian() +{ + //calculates transform + calculateTransforms(); + + const btVector3& pivotAInW = m_calculatedTransformA.getOrigin(); + const btVector3& pivotBInW = m_calculatedTransformB.getOrigin(); + + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 normalWorld; + int i; + //linear part + for (i=0;i<3;i++) + { + if (m_linearLimits.isLimited(i)) + { + if (m_useLinearReferenceFrameA) + normalWorld = m_calculatedTransformA.getBasis().getColumn(i); + else + normalWorld = m_calculatedTransformB.getBasis().getColumn(i); + + buildLinearJacobian( + m_jacLinear[i],normalWorld , + pivotAInW,pivotBInW); + + } + } + + // angular part + for (i=0;i<3;i++) + { + //calculates error angle + if (testAngularLimitMotor(i)) + { + normalWorld = this->getAxis(i); + // Create angular atom + buildAngularJacobian(m_jacAng[i],normalWorld); + } + } + + +} + + +void btGeneric6DofConstraint::solveConstraint(btScalar timeStep) +{ + m_timeStep = timeStep; + + //calculateTransforms(); + + int i; + + // linear + + btVector3 pointInA = m_calculatedTransformA.getOrigin(); + btVector3 pointInB = m_calculatedTransformB.getOrigin(); + + btScalar jacDiagABInv; + btVector3 linear_axis; + for (i=0;i<3;i++) + { + if (m_linearLimits.isLimited(i)) + { + jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); + + if (m_useLinearReferenceFrameA) + linear_axis = m_calculatedTransformA.getBasis().getColumn(i); + else + linear_axis = m_calculatedTransformB.getBasis().getColumn(i); + + m_linearLimits.solveLinearAxis( + m_timeStep, + jacDiagABInv, + m_rbA,pointInA, + m_rbB,pointInB, + i,linear_axis); + + } + } + + // angular + btVector3 angular_axis; + btScalar angularJacDiagABInv; + for (i=0;i<3;i++) + { + if (m_angularLimits[i].needApplyTorques()) + { + + // get axis + angular_axis = getAxis(i); + + angularJacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); + + m_angularLimits[i].solveAngularLimits(m_timeStep,angular_axis,angularJacDiagABInv, &m_rbA,&m_rbB); + } + } } void btGeneric6DofConstraint::updateRHS(btScalar timeStep) { - (void)timeStep; + (void)timeStep; } -btScalar btGeneric6DofConstraint::computeAngle(int axis) const - { - btScalar angle = btScalar(0.f); +btVector3 btGeneric6DofConstraint::getAxis(int axis_index) const +{ + return m_calculatedAxis[axis_index]; +} - switch (axis) - { - case 0: - { - btVector3 v1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(1); - btVector3 v2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(1); - btVector3 w2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(2); +btScalar btGeneric6DofConstraint::getAngle(int axis_index) const +{ + return m_calculatedAxisAngleDiff[axis_index]; +} - btScalar s = v1.dot(w2); - btScalar c = v1.dot(v2); - - angle = btAtan2( s, c ); - } - break; - - case 1: - { - btVector3 w1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(2); - btVector3 w2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(2); - btVector3 u2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(0); - - btScalar s = w1.dot(u2); - btScalar c = w1.dot(w2); - - angle = btAtan2( s, c ); - } - break; - - case 2: - { - btVector3 u1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(0); - btVector3 u2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(0); - btVector3 v2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(1); - - btScalar s = u1.dot(v2); - btScalar c = u1.dot(u2); - - angle = btAtan2( s, c ); - } - break; - default: - btAssert ( 0 ) ; - - break ; - } - - return angle; - } diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h index b114e54fa69..e4683b91b9e 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h @@ -4,116 +4,429 @@ Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ +/* +2007-09-09 +btGeneric6DofConstraint Refactored by Francisco León +email: projectileman@yahoo.com +http://gimpact.sf.net +*/ + #ifndef GENERIC_6DOF_CONSTRAINT_H #define GENERIC_6DOF_CONSTRAINT_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btJacobianEntry.h" #include "btTypedConstraint.h" class btRigidBody; +//! Rotation Limit structure for generic joints +class btRotationalLimitMotor +{ +public: + //! limit_parameters + //!@{ + btScalar m_loLimit;//!< joint limit + btScalar m_hiLimit;//!< joint limit + btScalar m_targetVelocity;//!< target motor velocity + btScalar m_maxMotorForce;//!< max force on motor + btScalar m_maxLimitForce;//!< max force on limit + btScalar m_damping;//!< Damping. + btScalar m_limitSoftness;//! Relaxation factor + btScalar m_ERP;//!< Error tolerance factor when joint is at limit + btScalar m_bounce;//!< restitution factor + bool m_enableMotor; + + //!@} + + //! temp_variables + //!@{ + btScalar m_currentLimitError;//! How much is violated this limit + int m_currentLimit;//!< 0=free, 1=at lo limit, 2=at hi limit + btScalar m_accumulatedImpulse; + //!@} + + btRotationalLimitMotor() + { + m_accumulatedImpulse = 0.f; + m_targetVelocity = 0; + m_maxMotorForce = 0.1f; + m_maxLimitForce = 300.0f; + m_loLimit = -SIMD_INFINITY; + m_hiLimit = SIMD_INFINITY; + m_ERP = 0.5f; + m_bounce = 0.0f; + m_damping = 1.0f; + m_limitSoftness = 0.5f; + m_currentLimit = 0; + m_currentLimitError = 0; + m_enableMotor = false; + } + + btRotationalLimitMotor(const btRotationalLimitMotor & limot) + { + m_targetVelocity = limot.m_targetVelocity; + m_maxMotorForce = limot.m_maxMotorForce; + m_limitSoftness = limot.m_limitSoftness; + m_loLimit = limot.m_loLimit; + m_hiLimit = limot.m_hiLimit; + m_ERP = limot.m_ERP; + m_bounce = limot.m_bounce; + m_currentLimit = limot.m_currentLimit; + m_currentLimitError = limot.m_currentLimitError; + m_enableMotor = limot.m_enableMotor; + } + + + + //! Is limited + bool isLimited() + { + if(m_loLimit>=m_hiLimit) return false; + return true; + } + + //! Need apply correction + bool needApplyTorques() + { + if(m_currentLimit == 0 && m_enableMotor == false) return false; + return true; + } + + //! calculates error + /*! + calculates m_currentLimit and m_currentLimitError. + */ + int testLimitValue(btScalar test_value); + + //! apply the correction impulses for two bodies + btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btRigidBody * body1); + + +}; + + + +class btTranslationalLimitMotor +{ +public: + btVector3 m_lowerLimit;//!< the constraint lower limits + btVector3 m_upperLimit;//!< the constraint upper limits + btVector3 m_accumulatedImpulse; + //! Linear_Limit_parameters + //!@{ + btScalar m_limitSoftness;//!< Softness for linear limit + btScalar m_damping;//!< Damping for linear limit + btScalar m_restitution;//! Bounce parameter for linear limit + //!@} + + btTranslationalLimitMotor() + { + m_lowerLimit.setValue(0.f,0.f,0.f); + m_upperLimit.setValue(0.f,0.f,0.f); + m_accumulatedImpulse.setValue(0.f,0.f,0.f); + + m_limitSoftness = 0.7f; + m_damping = btScalar(1.0f); + m_restitution = btScalar(0.5f); + } + + btTranslationalLimitMotor(const btTranslationalLimitMotor & other ) + { + m_lowerLimit = other.m_lowerLimit; + m_upperLimit = other.m_upperLimit; + m_accumulatedImpulse = other.m_accumulatedImpulse; + + m_limitSoftness = other.m_limitSoftness ; + m_damping = other.m_damping; + m_restitution = other.m_restitution; + } + + //! Test limit + /*! + - free means upper < lower, + - locked means upper == lower + - limited means upper > lower + - limitIndex: first 3 are linear, next 3 are angular + */ + inline bool isLimited(int limitIndex) + { + return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); + } + + + btScalar solveLinearAxis( + btScalar timeStep, + btScalar jacDiagABInv, + btRigidBody& body1,const btVector3 &pointInA, + btRigidBody& body2,const btVector3 &pointInB, + int limit_index, + const btVector3 & axis_normal_on_a); + + +}; /// btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space -/// btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked' -/// Work in progress (is still a Hinge actually) +/*! +btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked'. +currently this limit supports rotational motors
+
    +
  • For Linear limits, use btGeneric6DofConstraint.setLinearUpperLimit, btGeneric6DofConstraint.setLinearLowerLimit. You can set the parameters with the btTranslationalLimitMotor structure accsesible through the btGeneric6DofConstraint.getTranslationalLimitMotor method. +At this moment translational motors are not supported. May be in the future.
  • + +
  • For Angular limits, use the btRotationalLimitMotor structure for configuring the limit. +This is accessible through btGeneric6DofConstraint.getLimitMotor method, +This brings support for limit parameters and motors.
  • + +
  • Angulars limits have these possible ranges: + +AXIS + + + + + + + + + + + + +
    MIN ANGLEMAX ANGLEX-PIPIY-PI/2PI/2Z-PI/2PI/2
    +
  • +
+ +*/ class btGeneric6DofConstraint : public btTypedConstraint { - btJacobianEntry m_jacLinear[3]; // 3 orthogonal linear constraints - btJacobianEntry m_jacAng[3]; // 3 orthogonal angular constraints +protected: - btTransform m_frameInA; // the constraint space w.r.t body A - btTransform m_frameInB; // the constraint space w.r.t body B + //! relative_frames + //!@{ + btTransform m_frameInA;//!< the constraint space w.r.t body A + btTransform m_frameInB;//!< the constraint space w.r.t body B + //!@} + + //! Jacobians + //!@{ + btJacobianEntry m_jacLinear[3];//!< 3 orthogonal linear constraints + btJacobianEntry m_jacAng[3];//!< 3 orthogonal angular constraints + //!@} + + //! Linear_Limit_parameters + //!@{ + btTranslationalLimitMotor m_linearLimits; + //!@} + + + //! hinge_parameters + //!@{ + btRotationalLimitMotor m_angularLimits[3]; + //!@} + + +protected: + //! temporal variables + //!@{ + btScalar m_timeStep; + btTransform m_calculatedTransformA; + btTransform m_calculatedTransformB; + btVector3 m_calculatedAxisAngleDiff; + btVector3 m_calculatedAxis[3]; + + bool m_useLinearReferenceFrameA; + + //!@} + + btGeneric6DofConstraint& operator=(btGeneric6DofConstraint& other) + { + btAssert(0); + (void) other; + return *this; + } + + + + void buildLinearJacobian( + btJacobianEntry & jacLinear,const btVector3 & normalWorld, + const btVector3 & pivotAInW,const btVector3 & pivotBInW); + + void buildAngularJacobian(btJacobianEntry & jacAngular,const btVector3 & jointAxisW); + + + //! calcs the euler angles between the two bodies. + void calculateAngleInfo(); - btScalar m_lowerLimit[6]; // the constraint lower limits - btScalar m_upperLimit[6]; // the constraint upper limits - btScalar m_accumulatedImpulse[6]; - btGeneric6DofConstraint& operator=(btGeneric6DofConstraint& other) - { - btAssert(0); - (void) other; - return *this; - } - public: - btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ); + btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA); - btGeneric6DofConstraint(); + btGeneric6DofConstraint(); - - virtual void buildJacobian(); + //! Calcs global transform of the offsets + /*! + Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies. + \sa btGeneric6DofConstraint.getCalculatedTransformA , btGeneric6DofConstraint.getCalculatedTransformB, btGeneric6DofConstraint.calculateAngleInfo + */ + void calculateTransforms(); - virtual void solveConstraint(btScalar timeStep); + //! Gets the global transform of the offset for body A + /*! + \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo. + */ + const btTransform & getCalculatedTransformA() const + { + return m_calculatedTransformA; + } - void updateRHS(btScalar timeStep); + //! Gets the global transform of the offset for body B + /*! + \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo. + */ + const btTransform & getCalculatedTransformB() const + { + return m_calculatedTransformB; + } - btScalar computeAngle(int axis) const; + const btTransform & getFrameOffsetA() const + { + return m_frameInA; + } - void setLinearLowerLimit(const btVector3& linearLower) - { - m_lowerLimit[0] = linearLower.getX(); - m_lowerLimit[1] = linearLower.getY(); - m_lowerLimit[2] = linearLower.getZ(); - } + const btTransform & getFrameOffsetB() const + { + return m_frameInB; + } - void setLinearUpperLimit(const btVector3& linearUpper) - { - m_upperLimit[0] = linearUpper.getX(); - m_upperLimit[1] = linearUpper.getY(); - m_upperLimit[2] = linearUpper.getZ(); - } - void setAngularLowerLimit(const btVector3& angularLower) - { - m_lowerLimit[3] = angularLower.getX(); - m_lowerLimit[4] = angularLower.getY(); - m_lowerLimit[5] = angularLower.getZ(); - } + btTransform & getFrameOffsetA() + { + return m_frameInA; + } - void setAngularUpperLimit(const btVector3& angularUpper) - { - m_upperLimit[3] = angularUpper.getX(); - m_upperLimit[4] = angularUpper.getY(); - m_upperLimit[5] = angularUpper.getZ(); - } + btTransform & getFrameOffsetB() + { + return m_frameInB; + } - //first 3 are linear, next 3 are angular - void SetLimit(int axis, btScalar lo, btScalar hi) - { - m_lowerLimit[axis] = lo; - m_upperLimit[axis] = hi; - } - //free means upper < lower, - //locked means upper == lower - //limited means upper > lower - //limitIndex: first 3 are linear, next 3 are angular - bool isLimited(int limitIndex) - { - return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); - } + //! performs Jacobian calculation, and also calculates angle differences and axis + virtual void buildJacobian(); + + virtual void solveConstraint(btScalar timeStep); + + void updateRHS(btScalar timeStep); + + //! Get the rotation axis in global coordinates + /*! + \pre btGeneric6DofConstraint.buildJacobian must be called previously. + */ + btVector3 getAxis(int axis_index) const; + + //! Get the relative Euler angle + /*! + \pre btGeneric6DofConstraint.buildJacobian must be called previously. + */ + btScalar getAngle(int axis_index) const; + + //! Test angular limit. + /*! + Calculates angular correction and returns true if limit needs to be corrected. + \pre btGeneric6DofConstraint.buildJacobian must be called previously. + */ + bool testAngularLimitMotor(int axis_index); + + void setLinearLowerLimit(const btVector3& linearLower) + { + m_linearLimits.m_lowerLimit = linearLower; + } + + void setLinearUpperLimit(const btVector3& linearUpper) + { + m_linearLimits.m_upperLimit = linearUpper; + } + + void setAngularLowerLimit(const btVector3& angularLower) + { + m_angularLimits[0].m_loLimit = angularLower.getX(); + m_angularLimits[1].m_loLimit = angularLower.getY(); + m_angularLimits[2].m_loLimit = angularLower.getZ(); + } + + void setAngularUpperLimit(const btVector3& angularUpper) + { + m_angularLimits[0].m_hiLimit = angularUpper.getX(); + m_angularLimits[1].m_hiLimit = angularUpper.getY(); + m_angularLimits[2].m_hiLimit = angularUpper.getZ(); + } + + //! Retrieves the angular limit informacion + btRotationalLimitMotor * getRotationalLimitMotor(int index) + { + return &m_angularLimits[index]; + } + + //! Retrieves the limit informacion + btTranslationalLimitMotor * getTranslationalLimitMotor() + { + return &m_linearLimits; + } + + //first 3 are linear, next 3 are angular + void setLimit(int axis, btScalar lo, btScalar hi) + { + if(axis<3) + { + m_linearLimits.m_lowerLimit[axis] = lo; + m_linearLimits.m_upperLimit[axis] = hi; + } + else + { + m_angularLimits[axis-3].m_loLimit = lo; + m_angularLimits[axis-3].m_hiLimit = hi; + } + } + + //! Test limit + /*! + - free means upper < lower, + - locked means upper == lower + - limited means upper > lower + - limitIndex: first 3 are linear, next 3 are angular + */ + bool isLimited(int limitIndex) + { + if(limitIndex<3) + { + return m_linearLimits.isLimited(limitIndex); + + } + return m_angularLimits[limitIndex-3].isLimited(); + } + + const btRigidBody& getRigidBodyA() const + { + return m_rbA; + } + const btRigidBody& getRigidBodyB() const + { + return m_rbB; + } - const btRigidBody& getRigidBodyA() const - { - return m_rbA; - } - const btRigidBody& getRigidBodyB() const - { - return m_rbB; - } - }; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp index 27e30987549..f71698fa6ee 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp @@ -17,58 +17,180 @@ subject to the following restrictions: #include "btHingeConstraint.h" #include "BulletDynamics/Dynamics/btRigidBody.h" #include "LinearMath/btTransformUtil.h" +#include "LinearMath/btMinMax.h" #include -btHingeConstraint::btHingeConstraint(): + +btHingeConstraint::btHingeConstraint() +: btTypedConstraint (HINGE_CONSTRAINT_TYPE), m_enableAngularMotor(false) { } btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, - btVector3& axisInA,btVector3& axisInB) -:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB), -m_axisInA(axisInA), -m_axisInB(-axisInB), -m_angularOnly(false), -m_enableAngularMotor(false) + btVector3& axisInA,btVector3& axisInB) + :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB), + m_angularOnly(false), + m_enableAngularMotor(false) { + m_rbAFrame.getOrigin() = pivotInA; + + // since no frame is given, assume this to be zero angle and just pick rb transform axis + btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0); + btScalar projection = rbAxisA1.dot(axisInA); + if (projection > SIMD_EPSILON) + rbAxisA1 = rbAxisA1*projection - axisInA; + else + rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1); + + btVector3 rbAxisA2 = rbAxisA1.cross(axisInA); + + m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(), + rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), + rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); + + btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); + btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); + btVector3 rbAxisB2 = rbAxisB1.cross(axisInB); + + + m_rbBFrame.getOrigin() = pivotInB; + m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),-axisInB.getX(), + rbAxisB1.getY(),rbAxisB2.getY(),-axisInB.getY(), + rbAxisB1.getZ(),rbAxisB2.getZ(),-axisInB.getZ() ); + + //start with free + m_lowerLimit = btScalar(1e30); + m_upperLimit = btScalar(-1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + m_limitSoftness = 0.9f; + m_solveLimit = false; } btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA) -:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)), -m_axisInA(axisInA), -//fixed axis in worldspace -m_axisInB(rbA.getCenterOfMassTransform().getBasis() * -axisInA), +:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA), m_angularOnly(false), m_enableAngularMotor(false) +{ + + // since no frame is given, assume this to be zero angle and just pick rb transform axis + // fixed axis in worldspace + btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0); + btScalar projection = rbAxisA1.dot(axisInA); + if (projection > SIMD_EPSILON) + rbAxisA1 = rbAxisA1*projection - axisInA; + else + rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1); + + btVector3 rbAxisA2 = axisInA.cross(rbAxisA1); + + m_rbAFrame.getOrigin() = pivotInA; + m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(), + rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), + rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); + + + btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * -axisInA; + + btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); + btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); + btVector3 rbAxisB2 = axisInB.cross(rbAxisB1); + + + m_rbBFrame.getOrigin() = rbA.getCenterOfMassTransform()(pivotInA); + m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(), + rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(), + rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() ); + + //start with free + m_lowerLimit = btScalar(1e30); + m_upperLimit = btScalar(-1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + m_limitSoftness = 0.9f; + m_solveLimit = false; +} + +btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, + const btTransform& rbAFrame, const btTransform& rbBFrame) +:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), m_angularOnly(false), m_enableAngularMotor(false) { - + // flip axis + m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); + m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); + + //start with free + m_lowerLimit = btScalar(1e30); + m_upperLimit = btScalar(-1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + m_limitSoftness = 0.9f; + m_solveLimit = false; +} + + + +btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame) +:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame), +m_angularOnly(false), +m_enableAngularMotor(false) +{ + ///not providing rigidbody B means implicitly using worldspace for body B + + // flip axis + m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); + m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); + + m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(m_rbAFrame.getOrigin()); + + //start with free + m_lowerLimit = btScalar(1e30); + m_upperLimit = btScalar(-1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + m_limitSoftness = 0.9f; + m_solveLimit = false; } void btHingeConstraint::buildJacobian() { m_appliedImpulse = btScalar(0.); - btVector3 normal(0,0,0); - if (!m_angularOnly) { + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + btVector3 relPos = pivotBInW - pivotAInW; + + btVector3 normal[3]; + if (relPos.length2() > SIMD_EPSILON) + { + normal[0] = relPos.normalized(); + } + else + { + normal[0].setValue(btScalar(1.0),0,0); + } + + btPlaneSpace1(normal[0], normal[1], normal[2]); + for (int i=0;i<3;i++) { - normal[i] = 1; new (&m_jac[i]) btJacobianEntry( m_rbA.getCenterOfMassTransform().getBasis().transpose(), m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(), - m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(), - normal, + pivotAInW - m_rbA.getCenterOfMassPosition(), + pivotBInW - m_rbB.getCenterOfMassPosition(), + normal[i], m_rbA.getInvInertiaDiagLocal(), m_rbA.getInvMass(), m_rbB.getInvInertiaDiagLocal(), m_rbB.getInvMass()); - normal[i] = 0; } } @@ -79,12 +201,12 @@ void btHingeConstraint::buildJacobian() btVector3 jointAxis0local; btVector3 jointAxis1local; - btPlaneSpace1(m_axisInA,jointAxis0local,jointAxis1local); + btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local); - getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; + getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local; btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local; - btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; + btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); new (&m_jacAng[0]) btJacobianEntry(jointAxis0, m_rbA.getCenterOfMassTransform().getBasis().transpose(), @@ -105,44 +227,70 @@ void btHingeConstraint::buildJacobian() m_rbB.getInvInertiaDiagLocal()); + // Compute limit information + btScalar hingeAngle = getHingeAngle(); + + //set bias, sign, clear accumulator + m_correction = btScalar(0.); + m_limitSign = btScalar(0.); + m_solveLimit = false; + m_accLimitImpulse = btScalar(0.); + + if (m_lowerLimit < m_upperLimit) + { + if (hingeAngle <= m_lowerLimit*m_limitSoftness) + { + m_correction = (m_lowerLimit - hingeAngle); + m_limitSign = 1.0f; + m_solveLimit = true; + } + else if (hingeAngle >= m_upperLimit*m_limitSoftness) + { + m_correction = m_upperLimit - hingeAngle; + m_limitSign = -1.0f; + m_solveLimit = true; + } + } + + //Compute K = J*W*J' for hinge axis + btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + m_kHinge = 1.0f / (getRigidBodyA().computeAngularImpulseDenominator(axisA) + + getRigidBodyB().computeAngularImpulseDenominator(axisA)); } void btHingeConstraint::solveConstraint(btScalar timeStep) { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - btVector3 normal(0,0,0); btScalar tau = btScalar(0.3); - btScalar damping = btScalar(1.); -//linear part + //linear part if (!m_angularOnly) { + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + for (int i=0;i<3;i++) { - normal[i] = 1; + const btVector3& normal = m_jac[i].m_linearJointAxis; btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; btScalar rel_vel; rel_vel = normal.dot(vel); //positional error (zeroth order error) btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - btScalar impulse = depth*tau/timeStep * jacDiagABInv - damping * rel_vel * jacDiagABInv * damping; + btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; m_appliedImpulse += impulse; btVector3 impulse_vector = normal * impulse; m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); - - normal[i] = 0; } } @@ -151,8 +299,8 @@ void btHingeConstraint::solveConstraint(btScalar timeStep) ///solve angular part // get axes in world space - btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; - btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_axisInB; + btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); + btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(2); const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); @@ -174,7 +322,7 @@ void btHingeConstraint::solveConstraint(btScalar timeStep) getRigidBodyB().computeAngularImpulseDenominator(normal); // scale for mass and relaxation //todo: expose this 0.9 factor to developer - velrelOrthog *= (btScalar(1.)/denom) * btScalar(0.9); + velrelOrthog *= (btScalar(1.)/denom) * m_relaxationFactor; } //solve angular positional correction @@ -190,10 +338,28 @@ void btHingeConstraint::solveConstraint(btScalar timeStep) m_rbA.applyTorqueImpulse(-velrelOrthog+angularError); m_rbB.applyTorqueImpulse(velrelOrthog-angularError); + + // solve limit + if (m_solveLimit) + { + btScalar amplitude = ( (angVelB - angVelA).dot( axisA )*m_relaxationFactor + m_correction* (btScalar(1.)/timeStep)*m_biasFactor ) * m_limitSign; + + btScalar impulseMag = amplitude * m_kHinge; + + // Clamp the accumulated impulse + btScalar temp = m_accLimitImpulse; + m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) ); + impulseMag = m_accLimitImpulse - temp; + + + btVector3 impulse = axisA * impulseMag * m_limitSign; + m_rbA.applyTorqueImpulse(impulse); + m_rbB.applyTorqueImpulse(-impulse); + } } //apply motor - if (m_enableAngularMotor) + if (m_enableAngularMotor) { //todo: add limits too btVector3 angularLimit(0,0,0); @@ -204,10 +370,7 @@ void btHingeConstraint::solveConstraint(btScalar timeStep) btScalar desiredMotorVel = m_motorTargetVelocity; btScalar motor_relvel = desiredMotorVel - projRelVel; - btScalar denom3 = getRigidBodyA().computeAngularImpulseDenominator(axisA) + - getRigidBodyB().computeAngularImpulseDenominator(axisA); - - btScalar unclippedMotorImpulse = (btScalar(1.)/denom3) * motor_relvel;; + btScalar unclippedMotorImpulse = m_kHinge * motor_relvel;; //todo: should clip against accumulated impulse btScalar clippedMotorImpulse = unclippedMotorImpulse > m_maxMotorImpulse ? m_maxMotorImpulse : unclippedMotorImpulse; clippedMotorImpulse = clippedMotorImpulse < -m_maxMotorImpulse ? -m_maxMotorImpulse : clippedMotorImpulse; @@ -227,3 +390,11 @@ void btHingeConstraint::updateRHS(btScalar timeStep) } +btScalar btHingeConstraint::getHingeAngle() +{ + const btVector3 refAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(0); + const btVector3 refAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(1); + const btVector3 swingAxis = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(1); + + return btAtan2Fast( swingAxis.dot(refAxis0), swingAxis.dot(refAxis1) ); +} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h index 5c1ceafbc5b..8d8adfe9250 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h @@ -13,39 +13,61 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ +/* Hinge Constraint by Dirk Gregorius. Limits added by Marcus Hennix at Starbreeze Studios */ + #ifndef HINGECONSTRAINT_H #define HINGECONSTRAINT_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btJacobianEntry.h" #include "btTypedConstraint.h" class btRigidBody; - /// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space /// axis defines the orientation of the hinge axis class btHingeConstraint : public btTypedConstraint { +#ifdef IN_PARALLELL_SOLVER +public: +#endif btJacobianEntry m_jac[3]; //3 orthogonal linear constraints btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 for limit/motor - btVector3 m_pivotInA; - btVector3 m_pivotInB; - btVector3 m_axisInA; - btVector3 m_axisInB; + btTransform m_rbAFrame; // constraint axii. Assumes z is hinge axis. + btTransform m_rbBFrame; + + btScalar m_motorTargetVelocity; + btScalar m_maxMotorImpulse; + + btScalar m_limitSoftness; + btScalar m_biasFactor; + btScalar m_relaxationFactor; + + btScalar m_lowerLimit; + btScalar m_upperLimit; + + btScalar m_kHinge; + + btScalar m_limitSign; + btScalar m_correction; + + btScalar m_accLimitImpulse; bool m_angularOnly; - - btScalar m_motorTargetVelocity; - btScalar m_maxMotorImpulse; bool m_enableAngularMotor; + bool m_solveLimit; + public: - btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB,btVector3& axisInA,btVector3& axisInB); + btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, btVector3& axisInA,btVector3& axisInB); btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA); + + btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame); + + btHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame); btHingeConstraint(); @@ -76,6 +98,33 @@ public: m_maxMotorImpulse = maxMotorImpulse; } + void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) + { + m_lowerLimit = low; + m_upperLimit = high; + + m_limitSoftness = _softness; + m_biasFactor = _biasFactor; + m_relaxationFactor = _relaxationFactor; + + } + + btScalar getHingeAngle(); + + + const btTransform& getAFrame() { return m_rbAFrame; }; + const btTransform& getBFrame() { return m_rbBFrame; }; + + inline int getSolveLimit() + { + return m_solveLimit; + } + + inline btScalar getLimitSign() + { + return m_limitSign; + } + }; #endif //HINGECONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h index aae3ed0373f..bfeb24c2dfb 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h @@ -16,8 +16,8 @@ subject to the following restrictions: #ifndef JACOBIAN_ENTRY_H #define JACOBIAN_ENTRY_H -#include "../../LinearMath/btVector3.h" -#include "../Dynamics/btRigidBody.h" +#include "LinearMath/btVector3.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" //notes: diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp index aacb0a3ea66..ff918ea5625 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp @@ -21,18 +21,19 @@ subject to the following restrictions: btPoint2PointConstraint::btPoint2PointConstraint() +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE) { } btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB) -:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB) +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB) { } btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA) -:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)) +:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)) { } diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h index 71da8ac0347..27872b9c8aa 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h @@ -16,7 +16,7 @@ subject to the following restrictions: #ifndef POINT2POINTCONSTRAINT_H #define POINT2POINTCONSTRAINT_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" #include "btJacobianEntry.h" #include "btTypedConstraint.h" @@ -36,6 +36,9 @@ struct btConstraintSetting /// point to point constraint between two rigidbodies each with a pivotpoint that descibes the 'ballsocket' location in local space class btPoint2PointConstraint : public btTypedConstraint { +#ifdef IN_PARALLELL_SOLVER +public: +#endif btJacobianEntry m_jac[3]; //3 orthogonal linear constraints btVector3 m_pivotInA; @@ -70,6 +73,15 @@ public: m_pivotInB = pivotB; } + const btVector3& getPivotInA() const + { + return m_pivotInA; + } + + const btVector3& getPivotInB() const + { + return m_pivotInB; + } }; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp index 14b36ad44fd..7d4ed7856c3 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp @@ -13,6 +13,9 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ +//#define COMPUTE_IMPULSE_DENOM 1 +//It is not necessary (redundant) to refresh contact manifolds, this refresh has been moved to the collision algorithms. +//#define FORCE_REFESH_CONTACT_MANIFOLDS 1 #include "btSequentialImpulseConstraintSolver.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" @@ -96,7 +99,7 @@ bool MyContactDestroyedCallback(void* userPersistentData) { assert (userPersistentData); btConstraintPersistentData* cpd = (btConstraintPersistentData*)userPersistentData; - delete cpd; + btAlignedFree(cpd); totalCpd--; //printf("totalCpd = %i. DELETED Ptr %x\n",totalCpd,userPersistentData); return true; @@ -121,6 +124,10 @@ m_btSeed2(0) } } +btSequentialImpulseConstraintSolver::~btSequentialImpulseConstraintSolver() +{ + +} void initSolverBody(btSolverBody* solverBody, btRigidBody* rigidbody) { @@ -155,64 +162,62 @@ btScalar restitutionCurve(btScalar rel_vel, btScalar restitution) //velocity + friction //response between two dynamic objects with friction -SIMD_FORCE_INLINE btScalar resolveSingleCollisionCombinedCacheFriendly( +//SIMD_FORCE_INLINE +btScalar resolveSingleCollisionCombinedCacheFriendly( btSolverBody& body1, btSolverBody& body2, - btSolverConstraint& contactConstraint, + const btSolverConstraint& contactConstraint, const btContactSolverInfo& solverInfo) { (void)solverInfo; - btScalar normalImpulse(0.f); - { - if (contactConstraint.m_penetration < 0.f) - return 0.f; - + btScalar normalImpulse; + // Optimized version of projected relative velocity, use precomputed cross products with normal // body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); // body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); // btVector3 vel = vel1 - vel2; // btScalar rel_vel = contactConstraint.m_contactNormal.dot(vel); - btScalar rel_vel; - btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); - btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); + btScalar rel_vel; + btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) + + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); + btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) + + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); - rel_vel = vel1Dotn-vel2Dotn; + rel_vel = vel1Dotn-vel2Dotn; - btScalar positionalError = contactConstraint.m_penetration; - btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; + btScalar positionalError = contactConstraint.m_penetration; + btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; - btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; - btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; - btScalar normalImpulse = penetrationImpulse+velocityImpulse; - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = contactConstraint.m_appliedImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - contactConstraint.m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; + btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; + btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; + normalImpulse = penetrationImpulse+velocityImpulse; + + // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse + btScalar oldNormalImpulse = contactConstraint.m_appliedImpulse; + btScalar sum = oldNormalImpulse + normalImpulse; + contactConstraint.m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - btScalar oldVelocityImpulse = contactConstraint.m_appliedVelocityImpulse; - btScalar velocitySum = oldVelocityImpulse + velocityImpulse; - contactConstraint.m_appliedVelocityImpulse = btScalar(0.) > velocitySum ? btScalar(0.): velocitySum; + btScalar oldVelocityImpulse = contactConstraint.m_appliedVelocityImpulse; + btScalar velocitySum = oldVelocityImpulse + velocityImpulse; + contactConstraint.m_appliedVelocityImpulse = btScalar(0.) > velocitySum ? btScalar(0.): velocitySum; - normalImpulse = contactConstraint.m_appliedImpulse - oldNormalImpulse; - - if (body1.m_invMass) - { - body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass, - contactConstraint.m_angularComponentA,normalImpulse); - } - if (body2.m_invMass) - { - body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass, - contactConstraint.m_angularComponentB,-normalImpulse); - } + normalImpulse = contactConstraint.m_appliedImpulse - oldNormalImpulse; + if (body1.m_invMass) + { + body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass, + contactConstraint.m_angularComponentA,normalImpulse); } + if (body2.m_invMass) + { + body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass, + contactConstraint.m_angularComponentB,-normalImpulse); + } + + @@ -222,10 +227,11 @@ SIMD_FORCE_INLINE btScalar resolveSingleCollisionCombinedCacheFriendly( #ifndef NO_FRICTION_TANGENTIALS -SIMD_FORCE_INLINE btScalar resolveSingleFrictionCacheFriendly( +//SIMD_FORCE_INLINE +btScalar resolveSingleFrictionCacheFriendly( btSolverBody& body1, btSolverBody& body2, - btSolverConstraint& contactConstraint, + const btSolverConstraint& contactConstraint, const btContactSolverInfo& solverInfo, btScalar appliedNormalImpulse) { @@ -252,11 +258,36 @@ SIMD_FORCE_INLINE btScalar resolveSingleFrictionCacheFriendly( // calculate j that moves us to zero relative velocity j1 = -rel_vel * contactConstraint.m_jacDiagABInv; +#define CLAMP_ACCUMULATED_FRICTION_IMPULSE 1 +#ifdef CLAMP_ACCUMULATED_FRICTION_IMPULSE btScalar oldTangentImpulse = contactConstraint.m_appliedImpulse; contactConstraint.m_appliedImpulse = oldTangentImpulse + j1; - GEN_set_min(contactConstraint.m_appliedImpulse, limit); - GEN_set_max(contactConstraint.m_appliedImpulse, -limit); + + if (limit < contactConstraint.m_appliedImpulse) + { + contactConstraint.m_appliedImpulse = limit; + } else + { + if (contactConstraint.m_appliedImpulse < -limit) + contactConstraint.m_appliedImpulse = -limit; + } j1 = contactConstraint.m_appliedImpulse - oldTangentImpulse; +#else + if (limit < j1) + { + j1 = limit; + } else + { + if (j1 < -limit) + j1 = -limit; + } + +#endif //CLAMP_ACCUMULATED_FRICTION_IMPULSE + + //GEN_set_min(contactConstraint.m_appliedImpulse, limit); + //GEN_set_max(contactConstraint.m_appliedImpulse, -limit); + + } @@ -333,12 +364,56 @@ btScalar resolveSingleFrictionCacheFriendly( #endif //NO_FRICTION_TANGENTIALS -btAlignedObjectArray tmpSolverBodyPool; -btAlignedObjectArray tmpSolverConstraintPool; -btAlignedObjectArray tmpSolverFrictionConstraintPool; -btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) + + +void btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btRigidBody* rb0,btRigidBody* rb1, btScalar relaxation) +{ + + btSolverConstraint& solverConstraint = m_tmpSolverFrictionConstraintPool.expand(); + solverConstraint.m_contactNormal = normalAxis; + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; + solverConstraint.m_frictionIndex = frictionIndex; + + solverConstraint.m_friction = cp.m_combinedFriction; + + solverConstraint.m_appliedImpulse = btScalar(0.); + solverConstraint.m_appliedVelocityImpulse = 0.f; + solverConstraint.m_penetration = 0.f; + { + btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis1; + } + { + btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis1; + } + +#ifdef COMPUTE_IMPULSE_DENOM + btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); +#else + btVector3 vec; + vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); + btScalar denom0 = rb0->getInvMass() + normalAxis.dot(vec); + vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); + btScalar denom1 = rb1->getInvMass() + normalAxis.dot(vec); + + +#endif //COMPUTE_IMPULSE_DENOM + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + +} + + +btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) { (void)stackAlloc; (void)debugDrawer; @@ -348,21 +423,31 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio // printf("empty\n"); return 0.f; } + btPersistentManifold* manifold = 0; + btRigidBody* rb0=0,*rb1=0; + +#ifdef FORCE_REFESH_CONTACT_MANIFOLDS BEGIN_PROFILE("refreshManifolds"); int i; + + + for (i=0;igetBody0(); - btRigidBody* rb1 = (btRigidBody*)manifold->getBody1(); - + manifold = manifoldPtr[i]; + rb1 = (btRigidBody*)manifold->getBody1(); + rb0 = (btRigidBody*)manifold->getBody0(); + manifold->refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); } - + END_PROFILE("refreshManifolds"); +#endif //FORCE_REFESH_CONTACT_MANIFOLDS + + btVector3 color(0,1,0); BEGIN_PROFILE("gatherSolverData"); @@ -384,8 +469,10 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio //todo: use stack allocator for this temp memory int minReservation = numManifolds*2; - tmpSolverBodyPool.reserve(minReservation); + //m_tmpSolverBodyPool.reserve(minReservation); + //don't convert all bodies, only the one we need so solver the constraints +/* { for (int i=0;igetIslandTag() >= 0)) { btAssert(rb->getCompanionId() < 0); - int solverBodyId = tmpSolverBodyPool.size(); - btSolverBody& solverBody = tmpSolverBodyPool.expand(); + int solverBodyId = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); initSolverBody(&solverBody,rb); rb->setCompanionId(solverBodyId); } } } - +*/ - tmpSolverConstraintPool.reserve(minReservation); - tmpSolverFrictionConstraintPool.reserve(minReservation); + //m_tmpSolverConstraintPool.reserve(minReservation); + //m_tmpSolverFrictionConstraintPool.reserve(minReservation); + { int i; for (i=0;igetBody0(); - btRigidBody* rb1 = (btRigidBody*)manifold->getBody1(); + manifold = manifoldPtr[i]; + rb1 = (btRigidBody*)manifold->getBody1(); + rb0 = (btRigidBody*)manifold->getBody0(); + int solverBodyIdA=-1; int solverBodyIdB=-1; @@ -424,59 +513,98 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio if (rb0->getIslandTag() >= 0) { - solverBodyIdA = rb0->getCompanionId(); + if (rb0->getCompanionId() >= 0) + { + //body has already been converted + solverBodyIdA = rb0->getCompanionId(); + } else + { + solverBodyIdA = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,rb0); + rb0->setCompanionId(solverBodyIdA); + } } else { //create a static body - solverBodyIdA = tmpSolverBodyPool.size(); - btSolverBody& solverBody = tmpSolverBodyPool.expand(); + solverBodyIdA = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); initSolverBody(&solverBody,rb0); } if (rb1->getIslandTag() >= 0) { - solverBodyIdB = rb1->getCompanionId(); + if (rb1->getCompanionId() >= 0) + { + solverBodyIdB = rb1->getCompanionId(); + } else + { + solverBodyIdB = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,rb1); + rb1->setCompanionId(solverBodyIdB); + } } else { //create a static body - solverBodyIdB = tmpSolverBodyPool.size(); - btSolverBody& solverBody = tmpSolverBodyPool.expand(); + solverBodyIdB = m_tmpSolverBodyPool.size(); + btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); initSolverBody(&solverBody,rb1); } } + btVector3 rel_pos1; + btVector3 rel_pos2; + btScalar relaxation; + for (int j=0;jgetNumContacts();j++) { btManifoldPoint& cp = manifold->getContactPoint(j); + + if (debugDrawer) + debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); - int frictionIndex = tmpSolverConstraintPool.size(); - + if (cp.getDistance() <= btScalar(0.)) { const btVector3& pos1 = cp.getPositionWorldOnA(); const btVector3& pos2 = cp.getPositionWorldOnB(); - btVector3 rel_pos1 = pos1 - rb0->getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - rb1->getCenterOfMassPosition(); + rel_pos1 = pos1 - rb0->getCenterOfMassPosition(); + rel_pos2 = pos2 - rb1->getCenterOfMassPosition(); - btScalar relaxation = 1.f; + relaxation = 1.f; + btScalar rel_vel; + btVector3 vel; + + int frictionIndex = m_tmpSolverConstraintPool.size(); { - btSolverConstraint& solverConstraint = tmpSolverConstraintPool.expand(); + btSolverConstraint& solverConstraint = m_tmpSolverConstraintPool.expand(); solverConstraint.m_solverBodyIdA = solverBodyIdA; solverConstraint.m_solverBodyIdB = solverBodyIdB; solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_CONTACT_1D; - - + btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*torqueAxis0; + btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*torqueAxis1; { - //can be optimized, the cross products are already calculated +#ifdef COMPUTE_IMPULSE_DENOM btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB); btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB); +#else + btVector3 vec; + vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); + btScalar denom0 = rb0->getInvMass() + cp.m_normalWorldOnB.dot(vec); + vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); + btScalar denom1 = rb1->getInvMass() + cp.m_normalWorldOnB.dot(vec); +#endif //COMPUTE_IMPULSE_DENOM + btScalar denom = relaxation/(denom0+denom1); solverConstraint.m_jacDiagABInv = denom; } @@ -489,109 +617,57 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio btVector3 vel1 = rb0->getVelocityInLocalPoint(rel_pos1); btVector3 vel2 = rb1->getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; + vel = vel1 - vel2; + rel_vel = cp.m_normalWorldOnB.dot(vel); solverConstraint.m_penetration = cp.getDistance();///btScalar(infoGlobal.m_numIterations); solverConstraint.m_friction = cp.m_combinedFriction; - btScalar rest = restitutionCurve(rel_vel, cp.m_combinedRestitution); - if (rest <= btScalar(0.)) + solverConstraint.m_restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution); + if (solverConstraint.m_restitution <= btScalar(0.)) { - rest = 0.f; + solverConstraint.m_restitution = 0.f; }; btScalar penVel = -solverConstraint.m_penetration/infoGlobal.m_timeStep; - if (rest > penVel) - { - rest = btScalar(0.); - } - solverConstraint.m_restitution = rest; - solverConstraint.m_penetration *= -(infoGlobal.m_erp/infoGlobal.m_timeStep); + if (solverConstraint.m_restitution > penVel) + { + solverConstraint.m_penetration = btScalar(0.); + } + + + solverConstraint.m_appliedImpulse = 0.f; solverConstraint.m_appliedVelocityImpulse = 0.f; - btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*torqueAxis0; - btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*torqueAxis1; - } - - //create 2 '1d axis' constraints for 2 tangential friction directions - - //re-calculate friction direction every frame, todo: check if this is really needed - btVector3 frictionTangential0a, frictionTangential1b; - - btPlaneSpace1(cp.m_normalWorldOnB,frictionTangential0a,frictionTangential1b); - - { - btSolverConstraint& solverConstraint = tmpSolverFrictionConstraintPool.expand(); - solverConstraint.m_contactNormal = frictionTangential0a; - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; - solverConstraint.m_frictionIndex = frictionIndex; - - solverConstraint.m_friction = cp.m_combinedFriction; - - solverConstraint.m_appliedImpulse = btScalar(0.); - solverConstraint.m_appliedVelocityImpulse = 0.f; - - btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; - - { - btVector3 ftorqueAxis0 = rel_pos1.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos1CrossNormal = ftorqueAxis0; - solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis0; - } - { - btVector3 ftorqueAxis0 = rel_pos2.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos2CrossNormal = ftorqueAxis0; - solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis0; - } - - } - - - { - - btSolverConstraint& solverConstraint = tmpSolverFrictionConstraintPool.expand(); - solverConstraint.m_contactNormal = frictionTangential1b; - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; - solverConstraint.m_frictionIndex = frictionIndex; - - solverConstraint.m_friction = cp.m_combinedFriction; - - solverConstraint.m_appliedImpulse = btScalar(0.); - solverConstraint.m_appliedVelocityImpulse = 0.f; - btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; + } + + + { + btVector3 frictionDir1 = vel - cp.m_normalWorldOnB * rel_vel; + btScalar lat_rel_vel = frictionDir1.length2(); + if (lat_rel_vel > SIMD_EPSILON)//0.0f) { - btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis1; - } + frictionDir1 /= btSqrt(lat_rel_vel); + addFrictionConstraint(frictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); + btVector3 frictionDir2 = frictionDir1.cross(cp.m_normalWorldOnB); + frictionDir2.normalize();//?? + addFrictionConstraint(frictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); + } else { - btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis1; - } + //re-calculate friction direction every frame, todo: check if this is really needed + btVector3 frictionDir1,frictionDir2; + btPlaneSpace1(cp.m_normalWorldOnB,frictionDir1,frictionDir2); + addFrictionConstraint(frictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); + addFrictionConstraint(frictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); } + } } } } @@ -612,24 +688,23 @@ btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisio } } - btAlignedObjectArray gOrderTmpConstraintPool; - btAlignedObjectArray gOrderFrictionConstraintPool; + - int numConstraintPool = tmpSolverConstraintPool.size(); - int numFrictionPool = tmpSolverFrictionConstraintPool.size(); + int numConstraintPool = m_tmpSolverConstraintPool.size(); + int numFrictionPool = m_tmpSolverFrictionConstraintPool.size(); ///todo: use stack allocator for such temporarily memory, same for solver bodies/constraints - gOrderTmpConstraintPool.resize(numConstraintPool); - gOrderFrictionConstraintPool.resize(numFrictionPool); + m_orderTmpConstraintPool.resize(numConstraintPool); + m_orderFrictionConstraintPool.resize(numFrictionPool); { int i; for (i=0;igetRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) { - tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].writebackVelocity(); + m_tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].writebackVelocity(); } if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) { - tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].writebackVelocity(); + m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].writebackVelocity(); } - constraint->solveConstraint(info.m_timeStep); + constraint->solveConstraint(infoGlobal.m_timeStep); if ((constraint->getRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) { - tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].readVelocity(); + m_tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].readVelocity(); } if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) { - tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].readVelocity(); + m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].readVelocity(); } } { - int numPoolConstraints = tmpSolverConstraintPool.size(); + int numPoolConstraints = m_tmpSolverConstraintPool.size(); for (j=0;jgetBody0(), (btRigidBody*)manifold->getBody1(),manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); } + } } @@ -878,8 +977,9 @@ void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifol //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop { +#ifdef FORCE_REFESH_CONTACT_MANIFOLDS manifoldPtr->refreshContactPoints(body0->getCenterOfMassTransform(),body1->getCenterOfMassTransform()); - +#endif //FORCE_REFESH_CONTACT_MANIFOLDS int numpoints = manifoldPtr->getNumContacts(); gTotalContactPoints += numpoints; @@ -925,7 +1025,9 @@ void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifol } else { - cpd = new btConstraintPersistentData; + //todo: should this be in a pool? + void* mem = btAlignedAlloc(sizeof(btConstraintPersistentData),16); + cpd = new (mem)btConstraintPersistentData; assert(cpd); totalCpd ++; @@ -972,7 +1074,6 @@ void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifol cpd->m_penetration = btScalar(0.); } - btScalar relaxation = info.m_damping; if (m_solverMode & SOLVER_USE_WARMSTARTING) @@ -1156,3 +1257,10 @@ btScalar btSequentialImpulseConstraintSolver::solveFriction(btRigidBody* body0,b } return btScalar(0.); } + + +void btSequentialImpulseConstraintSolver::reset() +{ + m_btSeed2 = 0; +} + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h index 13e70c41be4..83a96d4dc44 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h @@ -19,7 +19,8 @@ subject to the following restrictions: #include "btConstraintSolver.h" class btIDebugDraw; #include "btContactConstraint.h" - +#include "btSolverBody.h" +#include "btSolverConstraint.h" /// btSequentialImpulseConstraintSolver uses a Propagation Method and Sequentially applies impulses @@ -29,10 +30,18 @@ class btIDebugDraw; class btSequentialImpulseConstraintSolver : public btConstraintSolver { + btAlignedObjectArray m_tmpSolverBodyPool; + btAlignedObjectArray m_tmpSolverConstraintPool; + btAlignedObjectArray m_tmpSolverFrictionConstraintPool; + btAlignedObjectArray m_orderTmpConstraintPool; + btAlignedObjectArray m_orderFrictionConstraintPool; + + protected: btScalar solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); btScalar solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); void prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer); + void addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btRigidBody* rb0,btRigidBody* rb1, btScalar relaxation); ContactSolverFunc m_contactDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; ContactSolverFunc m_frictionDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; @@ -68,11 +77,17 @@ public: m_frictionDispatch[type0][type1] = func; } - virtual ~btSequentialImpulseConstraintSolver() {} + virtual ~btSequentialImpulseConstraintSolver(); - virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc); + virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher); virtual btScalar solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); + btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); + btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); + + + ///clear internal cached data and reset random seed + virtual void reset(); btScalar solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); @@ -102,7 +117,9 @@ public: }; - +#ifndef BT_PREFER_SIMD +typedef btSequentialImpulseConstraintSolver btSequentialImpulseConstraintSolverPrefered; +#endif #endif //SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h index e7d26645c6a..057d3fac827 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h @@ -16,8 +16,8 @@ subject to the following restrictions: #ifndef SOLVE_2LINEAR_CONSTRAINT_H #define SOLVE_2LINEAR_CONSTRAINT_H -#include "../../LinearMath/btMatrix3x3.h" -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btVector3.h" class btRigidBody; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h index 0ab536f42b3..21305b3164e 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h @@ -19,30 +19,33 @@ subject to the following restrictions: class btRigidBody; #include "LinearMath/btVector3.h" #include "LinearMath/btMatrix3x3.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btAlignedAllocator.h" - - +///btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packed to increase cache coherence/performance. ATTRIBUTE_ALIGNED16 (struct) btSolverBody { - btVector3 m_centerOfMassPosition; - btVector3 m_linearVelocity; + BT_DECLARE_ALIGNED_ALLOCATOR(); + btVector3 m_angularVelocity; - btRigidBody* m_originalBody; + float m_angularFactor; float m_invMass; float m_friction; - float m_angularFactor; - - inline void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const + btRigidBody* m_originalBody; + btVector3 m_linearVelocity; + btVector3 m_centerOfMassPosition; + + SIMD_FORCE_INLINE void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const { velocity = m_linearVelocity + m_angularVelocity.cross(rel_pos); } //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position - inline void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) + SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) { m_linearVelocity += linearComponent*impulseMagnitude; - m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor; + m_angularVelocity += angularComponent*(impulseMagnitude*m_angularFactor); } void writebackVelocity() @@ -51,6 +54,7 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody { m_originalBody->setLinearVelocity(m_linearVelocity); m_originalBody->setAngularVelocity(m_angularVelocity); + //m_originalBody->setCompanionId(-1); } } @@ -69,3 +73,4 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody }; #endif //BT_SOLVER_BODY_H + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h index f1f40ffdf19..a750560d33c 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h @@ -27,21 +27,27 @@ class btRigidBody; ///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint { - btVector3 m_relpos1CrossNormal; - btVector3 m_relpos2CrossNormal; - btVector3 m_contactNormal; - btVector3 m_angularComponentA; - btVector3 m_angularComponentB; + BT_DECLARE_ALIGNED_ALLOCATOR(); - btScalar m_appliedVelocityImpulse; + btVector3 m_relpos1CrossNormal; + btVector3 m_contactNormal; + + btVector3 m_relpos2CrossNormal; + btVector3 m_angularComponentA; + + btVector3 m_angularComponentB; + mutable btScalar m_appliedVelocityImpulse; + mutable btScalar m_appliedImpulse; int m_solverBodyIdA; int m_solverBodyIdB; + btScalar m_friction; btScalar m_restitution; btScalar m_jacDiagABInv; btScalar m_penetration; - btScalar m_appliedImpulse; + + int m_constraintType; int m_frictionIndex; int m_unusedPadding[2]; diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp index a15b3e026cd..6e8b552dbbc 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp @@ -19,18 +19,20 @@ subject to the following restrictions: static btRigidBody s_fixed(0, 0,0); -btTypedConstraint::btTypedConstraint() -: m_userConstraintType(-1), +btTypedConstraint::btTypedConstraint(btTypedConstraintType type) +:m_userConstraintType(-1), m_userConstraintId(-1), +m_constraintType (type), m_rbA(s_fixed), m_rbB(s_fixed), m_appliedImpulse(btScalar(0.)) { s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); } -btTypedConstraint::btTypedConstraint(btRigidBody& rbA) -: m_userConstraintType(-1), +btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA) +:m_userConstraintType(-1), m_userConstraintId(-1), +m_constraintType (type), m_rbA(rbA), m_rbB(s_fixed), m_appliedImpulse(btScalar(0.)) @@ -40,9 +42,10 @@ m_appliedImpulse(btScalar(0.)) } -btTypedConstraint::btTypedConstraint(btRigidBody& rbA,btRigidBody& rbB) -: m_userConstraintType(-1), +btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB) +:m_userConstraintType(-1), m_userConstraintId(-1), +m_constraintType (type), m_rbA(rbA), m_rbB(rbB), m_appliedImpulse(btScalar(0.)) diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h index dfee6e80d0e..745d0afde6d 100644 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -17,7 +17,16 @@ subject to the following restrictions: #define TYPED_CONSTRAINT_H class btRigidBody; -#include "../../LinearMath/btScalar.h" +#include "LinearMath/btScalar.h" + +enum btTypedConstraintType +{ + POINT2POINT_CONSTRAINT_TYPE, + HINGE_CONSTRAINT_TYPE, + CONETWIST_CONSTRAINT_TYPE, + D6_CONSTRAINT_TYPE, + VEHICLE_CONSTRAINT_TYPE +}; ///TypedConstraint is the baseclass for Bullet constraints and vehicles class btTypedConstraint @@ -25,6 +34,8 @@ class btTypedConstraint int m_userConstraintType; int m_userConstraintId; + btTypedConstraintType m_constraintType; + btTypedConstraint& operator=(btTypedConstraint& other) { btAssert(0); @@ -40,11 +51,11 @@ protected: public: - btTypedConstraint(); + btTypedConstraint(btTypedConstraintType type); virtual ~btTypedConstraint() {}; - btTypedConstraint(btRigidBody& rbA); + btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA); - btTypedConstraint(btRigidBody& rbA,btRigidBody& rbB); + btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB); virtual void buildJacobian() = 0; @@ -59,7 +70,7 @@ public: return m_rbB; } - btRigidBody& getRigidBodyA() + btRigidBody& getRigidBodyA() { return m_rbA; } @@ -83,14 +94,19 @@ public: m_userConstraintId = uid; } - int getUserConstraintId() + int getUserConstraintId() const { return m_userConstraintId; } - btScalar getAppliedImpulse() + btScalar getAppliedImpulse() const { return m_appliedImpulse; } + + btTypedConstraintType getConstraintType () const + { + return m_constraintType; + } }; #endif //TYPED_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp new file mode 100644 index 00000000000..3f1c8e1a13b --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp @@ -0,0 +1,402 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. + Work in progress, functionality will be added on demand. + + If possible, use the richer Bullet C++ API, by including +*/ + +#include "Bullet-C-Api.h" +#include "btBulletDynamicsCommon.h" +#include "LinearMath/btAlignedAllocator.h" + + +#include "LinearMath/btVector3.h" +#include "LinearMath/btScalar.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btTransform.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" + +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" + +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "LinearMath/btStackAlloc.h" + + +/* + Create and Delete a Physics SDK +*/ + +struct btPhysicsSdk +{ + +// btDispatcher* m_dispatcher; +// btOverlappingPairCache* m_pairCache; +// btConstraintSolver* m_constraintSolver + + btVector3 m_worldAabbMin; + btVector3 m_worldAabbMax; + + + //todo: version, hardware/optimization settings etc? + btPhysicsSdk() + :m_worldAabbMin(-1000,-1000,-1000), + m_worldAabbMax(1000,1000,1000) + { + + } + + +}; + +plPhysicsSdkHandle plNewBulletSdk() +{ + void* mem = btAlignedAlloc(sizeof(btPhysicsSdk),16); + return (plPhysicsSdkHandle)new (mem)btPhysicsSdk; +} + +void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk) +{ + btPhysicsSdk* phys = reinterpret_cast(physicsSdk); + btAlignedFree(phys); +} + + +/* Dynamics World */ +plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdkHandle) +{ + btPhysicsSdk* physicsSdk = reinterpret_cast(physicsSdkHandle); + void* mem = btAlignedAlloc(sizeof(btDefaultCollisionConfiguration),16); + btDefaultCollisionConfiguration* collisionConfiguration = new (mem)btDefaultCollisionConfiguration(); + mem = btAlignedAlloc(sizeof(btCollisionDispatcher),16); + btDispatcher* dispatcher = new (mem)btCollisionDispatcher(collisionConfiguration); + mem = btAlignedAlloc(sizeof(btAxisSweep3),16); + btBroadphaseInterface* pairCache = new (mem)btAxisSweep3(physicsSdk->m_worldAabbMin,physicsSdk->m_worldAabbMax); + mem = btAlignedAlloc(sizeof(btSequentialImpulseConstraintSolver),16); + btConstraintSolver* constraintSolver = new(mem) btSequentialImpulseConstraintSolver(); + + mem = btAlignedAlloc(sizeof(btDiscreteDynamicsWorld),16); + return (plDynamicsWorldHandle) new (mem)btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration); +} +void plDeleteDynamicsWorld(plDynamicsWorldHandle world) +{ + //todo: also clean up the other allocations, axisSweep, pairCache,dispatcher,constraintSolver,collisionConfiguration + btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); + btAlignedFree(dynamicsWorld); +} + +void plStepSimulation(plDynamicsWorldHandle world, plReal timeStep) +{ + btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); + assert(dynamicsWorld); + dynamicsWorld->stepSimulation(timeStep); +} + +void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object) +{ + btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); + assert(dynamicsWorld); + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + assert(body); + + dynamicsWorld->addRigidBody(body); +} + +void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object) +{ + btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world); + assert(dynamicsWorld); + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + assert(body); + + dynamicsWorld->removeRigidBody(body); +} + +/* Rigid Body */ + +plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionShapeHandle cshape ) +{ + btTransform trans; + trans.setIdentity(); + btVector3 localInertia(0,0,0); + btCollisionShape* shape = reinterpret_cast( cshape); + assert(shape); + if (mass) + { + shape->calculateLocalInertia(mass,localInertia); + } + void* mem = btAlignedAlloc(sizeof(btRigidBody),16); + btRigidBody* body = new (mem)btRigidBody(mass, 0,shape,localInertia); + body->setWorldTransform(trans); + body->setUserPointer(user_data); + return (plRigidBodyHandle) body; +} + +void plDeleteRigidBody(plRigidBodyHandle cbody) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(cbody); + assert(body); + btAlignedFree( body); +} + + +/* Collision Shape definition */ + +plCollisionShapeHandle plNewSphereShape(plReal radius) +{ + void* mem = btAlignedAlloc(sizeof(btSphereShape),16); + return (plCollisionShapeHandle) new (mem)btSphereShape(radius); + +} + +plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z) +{ + void* mem = btAlignedAlloc(sizeof(btBoxShape),16); + return (plCollisionShapeHandle) new (mem)btBoxShape(btVector3(x,y,z)); +} + +plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height) +{ + //capsule is convex hull of 2 spheres, so use btMultiSphereShape + btVector3 inertiaHalfExtents(radius,height,radius); + const int numSpheres = 2; + btVector3 positions[numSpheres] = {btVector3(0,height,0),btVector3(0,-height,0)}; + btScalar radi[numSpheres] = {radius,radius}; + void* mem = btAlignedAlloc(sizeof(btMultiSphereShape),16); + return (plCollisionShapeHandle) new (mem)btMultiSphereShape(inertiaHalfExtents,positions,radi,numSpheres); +} +plCollisionShapeHandle plNewConeShape(plReal radius, plReal height) +{ + void* mem = btAlignedAlloc(sizeof(btConeShape),16); + return (plCollisionShapeHandle) new (mem)btConeShape(radius,height); +} + +plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height) +{ + void* mem = btAlignedAlloc(sizeof(btCylinderShape),16); + return (plCollisionShapeHandle) new (mem)btCylinderShape(btVector3(radius,height,radius)); +} + +/* Convex Meshes */ +plCollisionShapeHandle plNewConvexHullShape() +{ + void* mem = btAlignedAlloc(sizeof(btConvexHullShape),16); + return (plCollisionShapeHandle) new (mem)btConvexHullShape(); +} + + +/* Concave static triangle meshes */ +plMeshInterfaceHandle plNewMeshInterface() +{ + return 0; +} + +plCollisionShapeHandle plNewCompoundShape() +{ + void* mem = btAlignedAlloc(sizeof(btCompoundShape),16); + return (plCollisionShapeHandle) new (mem)btCompoundShape(); +} + +void plAddChildShape(plCollisionShapeHandle compoundShapeHandle,plCollisionShapeHandle childShapeHandle, plVector3 childPos,plQuaternion childOrn) +{ + btCollisionShape* colShape = reinterpret_cast(compoundShapeHandle); + btAssert(colShape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE); + btCompoundShape* compoundShape = reinterpret_cast(colShape); + btCollisionShape* childShape = reinterpret_cast(childShapeHandle); + btTransform localTrans; + localTrans.setIdentity(); + localTrans.setOrigin(btVector3(childPos[0],childPos[1],childPos[2])); + localTrans.setRotation(btQuaternion(childOrn[0],childOrn[1],childOrn[2],childOrn[3])); + compoundShape->addChildShape(localTrans,childShape); +} + +void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient) +{ + btQuaternion orn; + orn.setEuler(yaw,pitch,roll); + orient[0] = orn.getX(); + orient[1] = orn.getY(); + orient[2] = orn.getZ(); + orient[3] = orn.getW(); + +} + + +// extern void plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2); +// extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle); + + +void plAddVertex(plCollisionShapeHandle cshape, plReal x,plReal y,plReal z) +{ + btCollisionShape* colShape = reinterpret_cast( cshape); + btAssert(colShape->getShapeType()==CONVEX_HULL_SHAPE_PROXYTYPE); + btConvexHullShape* convexHullShape = reinterpret_cast( cshape); + convexHullShape->addPoint(btPoint3(x,y,z)); + +} + +void plDeleteShape(plCollisionShapeHandle cshape) +{ + btCollisionShape* shape = reinterpret_cast( cshape); + assert(shape); + btAlignedFree(shape); +} +void plSetScaling(plCollisionShapeHandle cshape, plVector3 cscaling) +{ + btCollisionShape* shape = reinterpret_cast( cshape); + assert(shape); + btVector3 scaling(cscaling[0],cscaling[1],cscaling[2]); + shape->setLocalScaling(scaling); +} + + + +void plSetPosition(plRigidBodyHandle object, const plVector3 position) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + btAssert(body); + btVector3 pos(position[0],position[1],position[2]); + btTransform worldTrans = body->getWorldTransform(); + worldTrans.setOrigin(pos); + body->setWorldTransform(worldTrans); +} + +void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + btAssert(body); + btQuaternion orn(orientation[0],orientation[1],orientation[2],orientation[3]); + btTransform worldTrans = body->getWorldTransform(); + worldTrans.setRotation(orn); + body->setWorldTransform(worldTrans); +} + +void plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + btAssert(body); + body->getWorldTransform().getOpenGLMatrix(matrix); + +} + +void plGetPosition(plRigidBodyHandle object,plVector3 position) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + btAssert(body); + const btVector3& pos = body->getWorldTransform().getOrigin(); + position[0] = pos.getX(); + position[1] = pos.getY(); + position[2] = pos.getZ(); +} + +void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation) +{ + btRigidBody* body = reinterpret_cast< btRigidBody* >(object); + btAssert(body); + const btQuaternion& orn = body->getWorldTransform().getRotation(); + orientation[0] = orn.getX(); + orientation[1] = orn.getY(); + orientation[2] = orn.getZ(); + orientation[3] = orn.getW(); +} + + + +//plRigidBodyHandle plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); + +// extern plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); + + + + +extern "C" +double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]) +{ + btTriangleShape trishapeA(btVector3(p1[0], p1[1], p1[2]), btVector3(p2[0], p2[1], p2[2]), btVector3(p3[0], p3[1], p3[2])); + trishapeA.setMargin(0.000001f); + + btTriangleShape trishapeB(btVector3(q1[0], q1[1], q1[2]), btVector3(q2[0], q2[1], q2[2]), btVector3(q3[0], q3[1], q3[2])); + trishapeB.setMargin(0.000001f); + + // btVoronoiSimplexSolver sGjkSimplexSolver; + // btGjkEpaPenetrationDepthSolver penSolverPtr; + + static btSimplexSolverInterface sGjkSimplexSolver; + sGjkSimplexSolver.reset(); + + static btGjkEpaPenetrationDepthSolver Solver0; + static btMinkowskiPenetrationDepthSolver Solver1; + + btConvexPenetrationDepthSolver* Solver = NULL; + + Solver = &Solver1; + + btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); + + convexConvex.m_catchDegeneracies = 1; + + // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0); + + btPointCollector gjkOutput; + btGjkPairDetector::ClosestPointInput input; + + btStackAlloc gStackAlloc(1024*1024*2); + + input.m_stackAlloc = &gStackAlloc; + + btTransform tr; + tr.setIdentity(); + + input.m_transformA = tr; + input.m_transformB = tr; + + convexConvex.getClosestPoints(input, gjkOutput, 0); + + + if (gjkOutput.m_hasResult) + { + + pb[0] = pa[0] = gjkOutput.m_pointInWorld[0]; + pb[1] = pa[1] = gjkOutput.m_pointInWorld[1]; + pb[2] = pa[2] = gjkOutput.m_pointInWorld[2]; + + pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance; + pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance; + pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance; + + normal[0] = gjkOutput.m_normalOnBInWorld[0]; + normal[1] = gjkOutput.m_normalOnBInWorld[1]; + normal[2] = gjkOutput.m_normalOnBInWorld[2]; + + return gjkOutput.m_distance; + } + return -1.0f; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp new file mode 100644 index 00000000000..5e330cb64f2 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp @@ -0,0 +1,194 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btContinuousDynamicsWorld.h" +#include "LinearMath/btQuickprof.h" + +//collision detection +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" + +//rigidbody & constraints +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" +#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" +#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" + + + +#include + +btContinuousDynamicsWorld::btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration) +:btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration) +{ +} + +btContinuousDynamicsWorld::~btContinuousDynamicsWorld() +{ +} + + +void btContinuousDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) +{ + + startProfiling(timeStep); + + ///update aabbs information + updateAabbs(); + //static int frame=0; +// printf("frame %d\n",frame++); + + ///apply gravity, predict motion + predictUnconstraintMotion(timeStep); + + btDispatcherInfo& dispatchInfo = getDispatchInfo(); + + dispatchInfo.m_timeStep = timeStep; + dispatchInfo.m_stepCount = 0; + dispatchInfo.m_debugDraw = getDebugDrawer(); + + ///perform collision detection + performDiscreteCollisionDetection(); + + calculateSimulationIslands(); + + + getSolverInfo().m_timeStep = timeStep; + + + + ///solve contact and other joint constraints + solveConstraints(getSolverInfo()); + + ///CallbackTriggers(); + + calculateTimeOfImpacts(timeStep); + + btScalar toi = dispatchInfo.m_timeOfImpact; +// if (toi < 1.f) +// printf("toi = %f\n",toi); + if (toi < 0.f) + printf("toi = %f\n",toi); + + + ///integrate transforms + integrateTransforms(timeStep * toi); + + ///update vehicle simulation + updateVehicles(timeStep); + + + updateActivationState( timeStep ); + +} + +void btContinuousDynamicsWorld::calculateTimeOfImpacts(btScalar timeStep) +{ + ///these should be 'temporal' aabbs! + updateTemporalAabbs(timeStep); + + ///'toi' is the global smallest time of impact. However, we just calculate the time of impact for each object individually. + ///so we handle the case moving versus static properly, and we cheat for moving versus moving + float toi = 1.f; + + + btDispatcherInfo& dispatchInfo = getDispatchInfo(); + dispatchInfo.m_timeStep = timeStep; + dispatchInfo.m_timeOfImpact = 1.f; + dispatchInfo.m_stepCount = 0; + dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_CONTINUOUS; + + ///calculate time of impact for overlapping pairs + + BEGIN_PROFILE("performContinuousCollisionDetection"); + + btDispatcher* dispatcher = getDispatcher(); + if (dispatcher) + dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1); + + END_PROFILE("performContinuousCollisionDetection"); + + toi = dispatchInfo.m_timeOfImpact; + + dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_DISCRETE; + +} + +void btContinuousDynamicsWorld::updateTemporalAabbs(btScalar timeStep) +{ + BEGIN_PROFILE("perform Temporal Broadphase Collision Detection"); + + btVector3 temporalAabbMin,temporalAabbMax; + + for ( int i=0;igetCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),temporalAabbMin,temporalAabbMax); + const btVector3& linvel = body->getLinearVelocity(); + + //make the AABB temporal + float temporalAabbMaxx = temporalAabbMax.getX(); + float temporalAabbMaxy = temporalAabbMax.getY(); + float temporalAabbMaxz = temporalAabbMax.getZ(); + float temporalAabbMinx = temporalAabbMin.getX(); + float temporalAabbMiny = temporalAabbMin.getY(); + float temporalAabbMinz = temporalAabbMin.getZ(); + + // add linear motion + btVector3 linMotion = linvel*timeStep; + + if (linMotion.x() > 0.f) + temporalAabbMaxx += linMotion.x(); + else + temporalAabbMinx += linMotion.x(); + if (linMotion.y() > 0.f) + temporalAabbMaxy += linMotion.y(); + else + temporalAabbMiny += linMotion.y(); + if (linMotion.z() > 0.f) + temporalAabbMaxz += linMotion.z(); + else + temporalAabbMinz += linMotion.z(); + + //add conservative angular motion + btScalar angularMotion(0);// = angvel.length() * GetAngularMotionDisc() * timeStep; + btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion); + temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz); + temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz); + + temporalAabbMin -= angularMotion3d; + temporalAabbMax += angularMotion3d; + + m_broadphasePairCache->setAabb(body->getBroadphaseHandle(),temporalAabbMin,temporalAabbMax,m_dispatcher1); + } + } + + //update aabb (of all moved objects) + + m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1); + + END_PROFILE("perform Temporal Broadphase Collision Detection"); + + +} + + diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h new file mode 100644 index 00000000000..61c8dea03eb --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h @@ -0,0 +1,46 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_CONTINUOUS_DYNAMICS_WORLD_H +#define BT_CONTINUOUS_DYNAMICS_WORLD_H + +#include "btDiscreteDynamicsWorld.h" + +///btContinuousDynamicsWorld adds optional (per object) continuous collision detection for fast moving objects to the btDiscreteDynamicsWorld. +///This copes with fast moving objects that otherwise would tunnel/miss collisions. +///Under construction, don't use yet! Please use btDiscreteDynamicsWorld instead. +class btContinuousDynamicsWorld : public btDiscreteDynamicsWorld +{ + + void updateTemporalAabbs(btScalar timeStep); + + public: + + btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); + virtual ~btContinuousDynamicsWorld(); + + ///time stepping with calculation of time of impact for selected fast moving objects + virtual void internalSingleStepSimulation( btScalar timeStep); + + virtual void calculateTimeOfImpacts(btScalar timeStep); + + virtual btDynamicsWorldType getWorldType() const + { + return BT_CONTINUOUS_DYNAMICS_WORLD; + } + +}; + +#endif //BT_CONTINUOUS_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp index 29719ec9a3e..88b11c878c5 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp @@ -57,17 +57,30 @@ subject to the following restrictions: -btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver) -:btDynamicsWorld(dispatcher,pairCache), -m_constraintSolver(constraintSolver? constraintSolver: new btSequentialImpulseConstraintSolver), +btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration) +:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration), +m_constraintSolver(constraintSolver), m_debugDrawer(0), m_gravity(0,-10,0), m_localTime(btScalar(1.)/btScalar(60.)), m_profileTimings(0) { - m_islandManager = new btSimulationIslandManager(); + if (!m_constraintSolver) + { + void* mem = btAlignedAlloc(sizeof(btSequentialImpulseConstraintSolver),16); + m_constraintSolver = new (mem) btSequentialImpulseConstraintSolver; + m_ownsConstraintSolver = true; + } else + { + m_ownsConstraintSolver = false; + } + + { + void* mem = btAlignedAlloc(sizeof(btSimulationIslandManager),16); + m_islandManager = new (mem) btSimulationIslandManager(); + } + m_ownsIslandManager = true; - m_ownsConstraintSolver = (constraintSolver==0); } @@ -75,9 +88,16 @@ btDiscreteDynamicsWorld::~btDiscreteDynamicsWorld() { //only delete it when we created it if (m_ownsIslandManager) - delete m_islandManager; + { + m_islandManager->~btSimulationIslandManager(); + btAlignedFree( m_islandManager); + } if (m_ownsConstraintSolver) - delete m_constraintSolver; + { + + m_constraintSolver->~btConstraintSolver(); + btAlignedFree(m_constraintSolver); + } } void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep) @@ -412,7 +432,7 @@ void btDiscreteDynamicsWorld::removeVehicle(btRaycastVehicle* vehicle) m_vehicles.remove(vehicle); } -inline int btGetConstraintIslandId(const btTypedConstraint* lhs) +SIMD_FORCE_INLINE int btGetConstraintIslandId(const btTypedConstraint* lhs) { int islandId; @@ -452,7 +472,7 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) int m_numConstraints; btIDebugDraw* m_debugDrawer; btStackAlloc* m_stackAlloc; - + btDispatcher* m_dispatcher; InplaceSolverIslandCallback( btContactSolverInfo& solverInfo, @@ -460,13 +480,15 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) btTypedConstraint** sortedConstraints, int numConstraints, btIDebugDraw* debugDrawer, - btStackAlloc* stackAlloc) + btStackAlloc* stackAlloc, + btDispatcher* dispatcher) :m_solverInfo(solverInfo), m_solver(solver), m_sortedConstraints(sortedConstraints), m_numConstraints(numConstraints), m_debugDrawer(debugDrawer), - m_stackAlloc(stackAlloc) + m_stackAlloc(stackAlloc), + m_dispatcher(dispatcher) { } @@ -479,30 +501,38 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) } virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifolds,int numManifolds, int islandId) { - //also add all non-contact constraints/joints for this island - btTypedConstraint** startConstraint = 0; - int numCurConstraints = 0; - int i; - - //find the first constraint for this island - for (i=0;isolveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); + } else { - if (btGetConstraintIslandId(m_sortedConstraints[i]) == islandId) + //also add all non-contact constraints/joints for this island + btTypedConstraint** startConstraint = 0; + int numCurConstraints = 0; + int i; + + //find the first constraint for this island + for (i=0;isolveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc); + m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); + + } } }; @@ -524,14 +554,14 @@ void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) btTypedConstraint** constraintsPtr = getNumConstraints() ? &sortedConstraints[0] : 0; - InplaceSolverIslandCallback solverCallback( solverInfo, m_constraintSolver, constraintsPtr,sortedConstraints.size(), m_debugDrawer,m_stackAlloc); - + InplaceSolverIslandCallback solverCallback( solverInfo, m_constraintSolver, constraintsPtr,sortedConstraints.size(), m_debugDrawer,m_stackAlloc,m_dispatcher1); + m_constraintSolver->prepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds()); /// solve all the constraints for this island m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld()->getCollisionObjectArray(),&solverCallback); - + m_constraintSolver->allSolved(solverInfo, m_debugDrawer, m_stackAlloc); } @@ -596,7 +626,7 @@ void btDiscreteDynamicsWorld::updateAabbs() //moving objects should be moderately sized, probably something wrong if not if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12))) { - bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb); + bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); } else { //something went wrong, investigate @@ -856,10 +886,24 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, btScalar radius = coneShape->getRadius();//+coneShape->getMargin(); btScalar height = coneShape->getHeight();//+coneShape->getMargin(); btVector3 start = worldTransform.getOrigin(); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(radius,btScalar(0.),btScalar(-0.5)*height),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(-radius,btScalar(0.),btScalar(-0.5)*height),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),radius,btScalar(-0.5)*height),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),-radius,btScalar(-0.5)*height),color); + + int upAxis= coneShape->getConeUpIndex(); + + + btVector3 offsetHeight(0,0,0); + offsetHeight[upAxis] = height * btScalar(0.5); + btVector3 offsetRadius(0,0,0); + offsetRadius[(upAxis+1)%3] = radius; + btVector3 offset2Radius(0,0,0); + offset2Radius[(upAxis+2)%3] = radius; + + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offsetRadius),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offsetRadius),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offset2Radius),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offset2Radius),color); + + + break; } @@ -868,7 +912,7 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, const btCylinderShape* cylinder = static_cast(shape); int upAxis = cylinder->getUpAxis(); btScalar radius = cylinder->getRadius(); - btScalar halfHeight = cylinder->getHalfExtents()[upAxis]; + btScalar halfHeight = cylinder->getHalfExtentsWithMargin()[upAxis]; btVector3 start = worldTransform.getOrigin(); btVector3 offsetHeight(0,0,0); offsetHeight[upAxis] = halfHeight; @@ -902,7 +946,7 @@ void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); //DebugDrawcallback drawCallback; DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color); - convexMesh->getStridingMesh()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax); + convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax); } @@ -934,12 +978,18 @@ void btDiscreteDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) { if (m_ownsConstraintSolver) { - delete m_constraintSolver; + btAlignedFree( m_constraintSolver); } m_ownsConstraintSolver = false; m_constraintSolver = solver; } +btConstraintSolver* btDiscreteDynamicsWorld::getConstraintSolver() +{ + return m_constraintSolver; +} + + int btDiscreteDynamicsWorld::getNumConstraints() const { return int(m_constraints.size()); diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h index 83b90bfeebc..7364c4cd6b9 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h @@ -23,11 +23,11 @@ class btOverlappingPairCache; class btConstraintSolver; class btSimulationIslandManager; class btTypedConstraint; -#include "../ConstraintSolver/btContactSolverInfo.h" +#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" class btRaycastVehicle; class btIDebugDraw; -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" ///btDiscreteDynamicsWorld provides discrete rigid body simulation @@ -86,7 +86,7 @@ public: ///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those - btDiscreteDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver); + btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); virtual ~btDiscreteDynamicsWorld(); @@ -139,6 +139,8 @@ public: void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color); virtual void setConstraintSolver(btConstraintSolver* solver); + + virtual btConstraintSolver* getConstraintSolver(); virtual int getNumConstraints() const; @@ -151,6 +153,11 @@ public: return m_solverInfo; } + virtual btDynamicsWorldType getWorldType() const + { + return BT_DISCRETE_DYNAMICS_WORLD; + } + }; diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h index 65b63fad4b5..a4c8bf3c559 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h @@ -16,20 +16,27 @@ subject to the following restrictions: #ifndef BT_DYNAMICS_WORLD_H #define BT_DYNAMICS_WORLD_H -#include "../../BulletCollision/CollisionDispatch/btCollisionWorld.h" +#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" class btTypedConstraint; class btRaycastVehicle; class btConstraintSolver; +enum btDynamicsWorldType +{ + BT_SIMPLE_DYNAMICS_WORLD=1, + BT_DISCRETE_DYNAMICS_WORLD=2, + BT_CONTINUOUS_DYNAMICS_WORLD=3 +}; + ///btDynamicsWorld is the baseclass for several dynamics implementation, basic, discrete, parallel, and continuous class btDynamicsWorld : public btCollisionWorld { public: - btDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache) - :btCollisionWorld(dispatcher,pairCache) + btDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphase,btCollisionConfiguration* collisionConfiguration) + :btCollisionWorld(dispatcher,broadphase,collisionConfiguration) { } @@ -65,6 +72,8 @@ class btDynamicsWorld : public btCollisionWorld virtual void removeRigidBody(btRigidBody* body) = 0; virtual void setConstraintSolver(btConstraintSolver* solver) = 0; + + virtual btConstraintSolver* getConstraintSolver() = 0; virtual int getNumConstraints() const { return 0; } @@ -72,6 +81,8 @@ class btDynamicsWorld : public btCollisionWorld virtual const btTypedConstraint* getConstraint(int index) const { (void)index; return 0; } + virtual btDynamicsWorldType getWorldType() const=0; + }; #endif //BT_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp index 02cf44d0cfa..03e60acdb19 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp @@ -39,6 +39,8 @@ btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionS m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), m_linearDamping(btScalar(0.)), m_angularDamping(btScalar(0.5)), + m_linearSleepingThreshold(gLinearSleepingThreshold), + m_angularSleepingThreshold(gAngularSleepingThreshold), m_optionalMotionState(motionState), m_contactSolverType(0), m_frictionSolverType(0) @@ -79,12 +81,15 @@ btRigidBody::btRigidBody( btScalar mass,const btTransform& worldTransform,btColl m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)), m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), + m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), + m_linearSleepingThreshold(gLinearSleepingThreshold), + m_angularSleepingThreshold(gAngularSleepingThreshold), m_linearDamping(btScalar(0.)), m_angularDamping(btScalar(0.5)), m_optionalMotionState(0), m_contactSolverType(0), m_frictionSolverType(0) + { m_worldTransform = worldTransform; @@ -113,7 +118,7 @@ btRigidBody::btRigidBody( btScalar mass,const btTransform& worldTransform,btColl -//#define EXPERIMENTAL_JITTER_REMOVAL 1 +#define EXPERIMENTAL_JITTER_REMOVAL 1 #ifdef EXPERIMENTAL_JITTER_REMOVAL //Bullet 2.20b has experimental damping code to reduce jitter just before objects fall asleep/deactivate //doesn't work very well yet (value 0 disabled this damping) @@ -342,4 +347,4 @@ void btRigidBody::removeConstraintRef(btTypedConstraint* c) { m_constraintRefs.remove(c); m_checkCollideWith = m_constraintRefs.size() > 0; -} \ No newline at end of file +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h index 0707595d48e..b11f9f76d7d 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h @@ -16,11 +16,11 @@ subject to the following restrictions: #ifndef RIGIDBODY_H #define RIGIDBODY_H -#include "../../LinearMath/btAlignedObjectArray.h" -#include "../../LinearMath/btPoint3.h" -#include "../../LinearMath/btTransform.h" -#include "../../BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "../../BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btPoint3.h" +#include "LinearMath/btTransform.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" class btCollisionShape; class btMotionState; @@ -53,7 +53,10 @@ class btRigidBody : public btCollisionObject btScalar m_linearDamping; btScalar m_angularDamping; - + + btScalar m_linearSleepingThreshold; + btScalar m_angularSleepingThreshold; + //m_optionalMotionState allows to automatic synchronize the world transform for active objects btMotionState* m_optionalMotionState; @@ -70,6 +73,14 @@ public: btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=btScalar(0.),btScalar angularDamping=btScalar(0.),btScalar friction=btScalar(0.5),btScalar restitution=btScalar(0.)); + virtual ~btRigidBody() + { + //No constraints should point to this rigidbody + //Remove constraints from the dynamics world before you delete the related rigidbodies. + btAssert(m_constraintRefs.size()==0); + } + + void proceedToTransform(const btTransform& newTrans); ///to keep collision detection and dynamics separate we don't store a rigidbody pointer @@ -100,11 +111,11 @@ public: void setDamping(btScalar lin_damping, btScalar ang_damping); - inline const btCollisionShape* getCollisionShape() const { + SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { return m_collisionShape; } - inline btCollisionShape* getCollisionShape() { + SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() { return m_collisionShape; } @@ -134,6 +145,12 @@ public: m_invInertiaLocal = diagInvInertia; } + void setSleepingThresholds(btScalar linear,btScalar angular) + { + m_linearSleepingThreshold = linear; + m_angularSleepingThreshold = angular; + } + void applyTorque(const btVector3& torque) { m_totalTorque += torque; @@ -168,7 +185,7 @@ public: } //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position - inline void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) + SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) { if (m_inverseMass != btScalar(0.)) { @@ -238,7 +255,7 @@ public: - inline btScalar computeImpulseDenominator(const btPoint3& pos, const btVector3& normal) const + SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btPoint3& pos, const btVector3& normal) const { btVector3 r0 = pos - getCenterOfMassPosition(); @@ -250,19 +267,19 @@ public: } - inline btScalar computeAngularImpulseDenominator(const btVector3& axis) const + SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3& axis) const { btVector3 vec = axis * getInvInertiaTensorWorld(); return axis.dot(vec); } - inline void updateDeactivation(btScalar timeStep) + SIMD_FORCE_INLINE void updateDeactivation(btScalar timeStep) { if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION)) return; - if ((getLinearVelocity().length2() < gLinearSleepingThreshold*gLinearSleepingThreshold) && - (getAngularVelocity().length2() < gAngularSleepingThreshold*gAngularSleepingThreshold)) + if ((getLinearVelocity().length2() < m_linearSleepingThreshold*m_linearSleepingThreshold) && + (getAngularVelocity().length2() < m_angularSleepingThreshold*m_angularSleepingThreshold)) { m_deactivationTime += timeStep; } else @@ -273,7 +290,7 @@ public: } - inline bool wantsSleeping() + SIMD_FORCE_INLINE bool wantsSleeping() { if (getActivationState() == DISABLE_DEACTIVATION) @@ -348,6 +365,17 @@ public: void addConstraintRef(btTypedConstraint* c); void removeConstraintRef(btTypedConstraint* c); + btTypedConstraint* getConstraintRef(int index) + { + return m_constraintRefs[index]; + } + + int getNumConstraintRefs() + { + return m_constraintRefs.size(); + } + + int m_debugBodyId; }; diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp index 4ebcb8e7517..3a78ec54f1c 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp @@ -32,8 +32,8 @@ extern "C" void btBulletDynamicsProbe () {} -btSimpleDynamicsWorld::btSimpleDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver) -:btDynamicsWorld(dispatcher,pairCache), +btSimpleDynamicsWorld::btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration) +:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration), m_constraintSolver(constraintSolver), m_ownsConstraintSolver(false), m_debugDrawer(0), @@ -46,7 +46,7 @@ m_gravity(0,0,-10) btSimpleDynamicsWorld::~btSimpleDynamicsWorld() { if (m_ownsConstraintSolver) - delete m_constraintSolver; + btAlignedFree( m_constraintSolver); } int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep) @@ -74,8 +74,9 @@ int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, b btContactSolverInfo infoGlobal; infoGlobal.m_timeStep = timeStep; - - m_constraintSolver->solveGroup(0,0,manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc); + m_constraintSolver->prepareSolve(0,numManifolds); + m_constraintSolver->solveGroup(0,0,manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc,m_dispatcher1); + m_constraintSolver->allSolved(infoGlobal,m_debugDrawer, m_stackAlloc); } ///integrate transforms @@ -133,7 +134,7 @@ void btSimpleDynamicsWorld::updateAabbs() btPoint3 minAabb,maxAabb; colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); btBroadphaseInterface* bp = getBroadphase(); - bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb); + bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); } } } @@ -204,8 +205,13 @@ void btSimpleDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) { if (m_ownsConstraintSolver) { - delete m_constraintSolver; + btAlignedFree(m_constraintSolver); } m_ownsConstraintSolver = false; m_constraintSolver = solver; } + +btConstraintSolver* btSimpleDynamicsWorld::getConstraintSolver() +{ + return m_constraintSolver; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h index 25f4ccd8e68..4e38f74a731 100644 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h @@ -22,11 +22,8 @@ class btDispatcher; class btOverlappingPairCache; class btConstraintSolver; -///btSimpleDynamicsWorld demonstrates very basic usage of Bullet rigid body dynamics -///It can be used for basic simulations, and as a starting point for porting Bullet -///btSimpleDynamicsWorld lacks object deactivation, island management and other concepts. -///For more complicated simulations, btDiscreteDynamicsWorld and btContinuousDynamicsWorld are recommended -///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController +///btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds. +///Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished). class btSimpleDynamicsWorld : public btDynamicsWorld { protected: @@ -48,7 +45,7 @@ public: ///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver - btSimpleDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver); + btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); virtual ~btSimpleDynamicsWorld(); @@ -77,6 +74,13 @@ public: virtual void setConstraintSolver(btConstraintSolver* solver); + virtual btConstraintSolver* getConstraintSolver(); + + virtual btDynamicsWorldType getWorldType() const + { + return BT_SIMPLE_DYNAMICS_WORLD; + } + }; #endif //BT_SIMPLE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp index d53de7f3687..8dcd6d895e4 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp @@ -28,7 +28,8 @@ static btRigidBody s_fixedObject( 0,0,0); btRaycastVehicle::btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster ) -:m_vehicleRaycaster(raycaster), +: btTypedConstraint(VEHICLE_CONSTRAINT_TYPE), +m_vehicleRaycaster(raycaster), m_pitchControl(btScalar(0.)) { m_chassisBody = chassis; @@ -507,8 +508,8 @@ btScalar calcRollingFriction(btWheelContactPoint& contactPoint) // calculate j that moves us to zero relative velocity j1 = -vrel * contactPoint.m_jacDiagABInv; - GEN_set_min(j1, maxImpulse); - GEN_set_max(j1, -maxImpulse); + btSetMin(j1, maxImpulse); + btSetMax(j1, -maxImpulse); return j1; } @@ -526,10 +527,14 @@ void btRaycastVehicle::updateFriction(btScalar timeStep) return; - btVector3* forwardWS = new btVector3[numWheel]; - btVector3* axle = new btVector3[numWheel]; - btScalar* forwardImpulse = new btScalar[numWheel]; - btScalar* sideImpulse = new btScalar[numWheel]; + void* mem = btAlignedAlloc(numWheel*sizeof(btVector3),16); + btVector3* forwardWS = new (mem)btVector3[numWheel]; + mem = btAlignedAlloc(numWheel*sizeof(btVector3),16); + btVector3* axle = new (mem)btVector3[numWheel]; + mem = btAlignedAlloc(numWheel*sizeof(btScalar),16); + btScalar* forwardImpulse = new (mem)btScalar[numWheel]; + mem = btAlignedAlloc(numWheel*sizeof(btScalar),16); + btScalar* sideImpulse = new(mem) btScalar[numWheel]; int numWheelsOnGround = 0; @@ -701,10 +706,10 @@ void btRaycastVehicle::updateFriction(btScalar timeStep) } } - delete []forwardWS; - delete [] axle; - delete[]forwardImpulse; - delete[] sideImpulse; + btAlignedFree(forwardWS); + btAlignedFree(axle); + btAlignedFree(forwardImpulse); + btAlignedFree(sideImpulse); } diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h index f4249599615..a84b185e947 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h @@ -11,11 +11,11 @@ #ifndef RAYCASTVEHICLE_H #define RAYCASTVEHICLE_H -#include "../Dynamics/btRigidBody.h" -#include "../ConstraintSolver/btTypedConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" #include "btVehicleRaycaster.h" class btDynamicsWorld; -#include "../../LinearMath/btAlignedObjectArray.h" +#include "LinearMath/btAlignedObjectArray.h" #include "btWheelInfo.h" class btVehicleTuning; diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h b/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h index 64a47fcaada..5112ce6d420 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h @@ -11,7 +11,7 @@ #ifndef VEHICLE_RAYCASTER_H #define VEHICLE_RAYCASTER_H -#include "../../LinearMath/btVector3.h" +#include "LinearMath/btVector3.h" /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting struct btVehicleRaycaster diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h index 2e349b3fde4..ac2729f4fd7 100644 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h @@ -11,8 +11,8 @@ #ifndef WHEEL_INFO_H #define WHEEL_INFO_H -#include "../../LinearMath/btVector3.h" -#include "../../LinearMath/btTransform.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" class btRigidBody; diff --git a/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile b/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile new file mode 100644 index 00000000000..b599a0fd9a1 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile @@ -0,0 +1,45 @@ +#### Source code Dirs +VPATH = \ +../ConstraintSolver \ +../Dynamics \ +../Vehicle + +ROOT = ../../.. + +#### Library +LIBRARY_ppu = bulletdynamics.a + +#### Compiler flags +CPPFLAGS = \ +-DUSE_LIBSPE2 \ +-I../ConstraintSolver \ +-I../Dynamics \ +-I../Vehicle \ +-I$(ROOT)/src \ +-I$(SDKINC) + +#### Optimization level flags +#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG) +CC_OPT_LEVEL = -O3 + +##### Objects to be archived in lib + +OBJS = \ +btContactConstraint.o \ +btGeneric6DofConstraint.o \ +btHingeConstraint.o \ +btPoint2PointConstraint.o \ +btSequentialImpulseConstraintSolver.o \ +btSolve2LinearConstraint.o \ +btTypedConstraint.o \ +btDiscreteDynamicsWorld.o \ +btRigidBody.o \ +btSimpleDynamicsWorld.o \ +btRaycastVehicle.o \ +btWheelInfo.o +#### Install directories +INSTALL_DIR = $(ROOT)/lib/ibmsdk +INSTALL_FILES = $(LIBRARY_ppu) +CELL_TOP ?= /opt/ibm/cell-sdk/prototype + +include $(CELL_TOP)/make.footer diff --git a/extern/bullet2/src/LinearMath/CMakeLists.txt b/extern/bullet2/src/LinearMath/CMakeLists.txt index 207eed94a3e..82393547bfb 100644 --- a/extern/bullet2/src/LinearMath/CMakeLists.txt +++ b/extern/bullet2/src/LinearMath/CMakeLists.txt @@ -6,5 +6,6 @@ ${BULLET_PHYSICS_SOURCE_DIR}/src } ADD_LIBRARY(LibLinearMath btQuickprof.cpp btGeometryUtil.cpp +btAlignedAllocator.cpp ) diff --git a/extern/bullet2/src/LinearMath/btAabbUtil2.h b/extern/bullet2/src/LinearMath/btAabbUtil2.h index 429163c8138..9b320961ba1 100644 --- a/extern/bullet2/src/LinearMath/btAabbUtil2.h +++ b/extern/bullet2/src/LinearMath/btAabbUtil2.h @@ -18,11 +18,9 @@ subject to the following restrictions: #define AABB_UTIL2 #include "btVector3.h" -#include "btSimdMinMax.h" +#include "btMinMax.h" -#define btMin(a,b) ((a < b ? a : b)) -#define btMax(a,b) ((a > b ? a : b)) /// conservative test for overlap between two aabbs diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp index 1f5877fa37e..6b33ddbb8cf 100644 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp @@ -15,17 +15,83 @@ subject to the following restrictions: #include "btAlignedAllocator.h" +int gNumAlignedAllocs = 0; +int gNumAlignedFree = 0; +int gTotalBytesAlignedAllocs = 0;//detect memory leaks -#if defined (BT_HAS_ALIGNED_ALOCATOR) +#ifdef BT_DEBUG_MEMORY_ALLOCATIONS +//this generic allocator provides the total allocated number of bytes +#include -#include -void* btAlignedAlloc (int size, int alignment) +void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename) { - return _aligned_malloc(size,alignment); + void *ret; + char *real; + unsigned long offset; + + gTotalBytesAlignedAllocs += size; + gNumAlignedAllocs++; + + printf("allocation#%d from %s,line %d, size %d\n",gNumAlignedAllocs,filename,line,size); + real = (char *)malloc(size + 2*sizeof(void *) + (alignment-1)); + if (real) { + offset = (alignment - (unsigned long)(real + 2*sizeof(void *))) & +(alignment-1); + ret = (void *)((real + 2*sizeof(void *)) + offset); + *((void **)(ret)-1) = (void *)(real); + *((int*)(ret)-2) = size; + + } else { + ret = (void *)(real);//?? + } + int* ptr = (int*)ret; + *ptr = 12; + return (ret); +} +#include +void btAlignedFreeInternal (void* ptr,int line,char* filename) +{ + + void* real; + gNumAlignedFree++; + + if (ptr) { + real = *((void **)(ptr)-1); + int size = *((int*)(ptr)-2); + gTotalBytesAlignedAllocs -= size; + + printf("free #%d from %s,line %d, size %d\n",gNumAlignedFree,filename,line,size); + + free(real); + } else + { + printf("NULL ptr\n"); + } } -void btAlignedFree (void* ptr) +#else //BT_DEBUG_MEMORY_ALLOCATIONS + + +#if defined (BT_HAS_ALIGNED_ALLOCATOR) + + + + + +#include +void* btAlignedAllocInternal (size_t size, int alignment) { + gNumAlignedAllocs++; + + void* ptr = _aligned_malloc(size,alignment); +// printf("btAlignedAllocInternal %d, %x\n",size,ptr); + return ptr; +} + +void btAlignedFreeInternal (void* ptr) +{ + gNumAlignedFree++; +// printf("btAlignedFreeInternal %x\n",ptr); _aligned_free(ptr); } @@ -35,36 +101,55 @@ void btAlignedFree (void* ptr) #include -int numAllocs = 0; -int numFree = 0; -void* btAlignedAlloc (int size, int alignment) + +void* btAlignedAllocInternal (size_t size, int alignment) { - numAllocs++; + gNumAlignedAllocs++; return memalign(alignment, size); } -void btAlignedFree (void* ptr) +void btAlignedFreeInternal (void* ptr) { - numFree++; + gNumAlignedFree++; free(ptr); } #else -///todo -///will add some multi-platform version that works without _aligned_malloc/_aligned_free -void* btAlignedAlloc (int size, int alignment) +void* btAlignedAllocInternal (size_t size, int alignment) { - return new char[size]; + void *ret; + char *real; + unsigned long offset; + + gNumAlignedAllocs++; + + real = (char *)malloc(size + sizeof(void *) + (alignment-1)); + if (real) { + offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1); + ret = (void *)((real + sizeof(void *)) + offset); + *((void **)(ret)-1) = (void *)(real); + } else { + ret = (void *)(real); + } + return (ret); } -void btAlignedFree (void* ptr) +void btAlignedFreeInternal (void* ptr) { - delete [] (char*) ptr; + + void* real; + gNumAlignedFree++; + + if (ptr) { + real = *((void **)(ptr)-1); + free(real); + } } #endif // #endif +#endif //BT_DEBUG_MEMORY_ALLOCATIONS diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.h b/extern/bullet2/src/LinearMath/btAlignedAllocator.h index 07585717f45..2b48e79e497 100644 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.h +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.h @@ -21,12 +21,26 @@ subject to the following restrictions: ///that is better portable and more predictable #include "btScalar.h" +//#define BT_DEBUG_MEMORY_ALLOCATIONS 1 +#ifdef BT_DEBUG_MEMORY_ALLOCATIONS -void* btAlignedAlloc (int size, int alignment); +#define btAlignedAlloc(a,b) \ + btAlignedAllocInternal(a,b,__LINE__,__FILE__) -void btAlignedFree (void* ptr); +#define btAlignedFree(ptr) \ + btAlignedFreeInternal(ptr,__LINE__,__FILE__) +void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename); +void btAlignedFreeInternal (void* ptr,int line,char* filename); + +#else + void* btAlignedAllocInternal (size_t size, int alignment); + void btAlignedFreeInternal (void* ptr); + + #define btAlignedAlloc(a,b) btAlignedAllocInternal(a,b) + #define btAlignedFree(ptr) btAlignedFreeInternal(ptr) +#endif typedef int size_type; diff --git a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h index 8bef5eb5d06..66911316fbb 100644 --- a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h +++ b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h @@ -50,6 +50,8 @@ class btAlignedObjectArray int m_size; int m_capacity; T* m_data; + //PCK: added this line + bool m_ownsMemory; protected: SIMD_FORCE_INLINE int allocSize(int size) @@ -69,6 +71,8 @@ class btAlignedObjectArray SIMD_FORCE_INLINE void init() { + //PCK: added this line + m_ownsMemory = true; m_data = 0; m_size = 0; m_capacity = 0; @@ -92,7 +96,11 @@ class btAlignedObjectArray SIMD_FORCE_INLINE void deallocate() { if(m_data) { - m_allocator.deallocate(m_data); + //PCK: enclosed the deallocation in this block + if (m_ownsMemory) + { + m_allocator.deallocate(m_data); + } m_data = 0; } } @@ -223,6 +231,9 @@ class btAlignedObjectArray destroy(0,size()); deallocate(); + + //PCK: added this line + m_ownsMemory = true; m_data = s; @@ -360,8 +371,16 @@ class btAlignedObjectArray } } + //PCK: whole function + void initializeFromBuffer(void *buffer, int size, int capacity) + { + clear(); + m_ownsMemory = false; + m_data = (T*)buffer; + m_size = size; + m_capacity = capacity; + } + }; #endif //BT_OBJECT_ARRAY__ - - diff --git a/extern/bullet2/src/LinearMath/btIDebugDraw.h b/extern/bullet2/src/LinearMath/btIDebugDraw.h index 5f40ca39157..2d96cff5055 100644 --- a/extern/bullet2/src/LinearMath/btIDebugDraw.h +++ b/extern/bullet2/src/LinearMath/btIDebugDraw.h @@ -60,6 +60,8 @@ class btIDebugDraw virtual void reportErrorWarning(const char* warningString) = 0; + virtual void draw3dText(const btVector3& location,const char* textString) = 0; + virtual void setDebugMode(int debugMode) =0; virtual int getDebugMode() const = 0; diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h index 94f53c3c0a5..59680ff460d 100644 --- a/extern/bullet2/src/LinearMath/btMatrix3x3.h +++ b/extern/bullet2/src/LinearMath/btMatrix3x3.h @@ -356,7 +356,7 @@ class btMatrix3x3 { m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(), m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(), m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(), - m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].x()); + m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].z()); } SIMD_FORCE_INLINE btMatrix3x3 diff --git a/extern/bullet2/src/LinearMath/btMinMax.h b/extern/bullet2/src/LinearMath/btMinMax.h index 1b8a3633f38..5e27d62a4a4 100644 --- a/extern/bullet2/src/LinearMath/btMinMax.h +++ b/extern/bullet2/src/LinearMath/btMinMax.h @@ -18,15 +18,15 @@ subject to the following restrictions: #define GEN_MINMAX_H template -SIMD_FORCE_INLINE const T& GEN_min(const T& a, const T& b) +SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) { - return b < a ? b : a; + return a < b ? a : b ; } template -SIMD_FORCE_INLINE const T& GEN_max(const T& a, const T& b) +SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) { - return a < b ? b : a; + return a > b ? a : b; } template @@ -36,7 +36,7 @@ SIMD_FORCE_INLINE const T& GEN_clamped(const T& a, const T& lb, const T& ub) } template -SIMD_FORCE_INLINE void GEN_set_min(T& a, const T& b) +SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) { if (b < a) { @@ -45,7 +45,7 @@ SIMD_FORCE_INLINE void GEN_set_min(T& a, const T& b) } template -SIMD_FORCE_INLINE void GEN_set_max(T& a, const T& b) +SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) { if (a < b) { diff --git a/extern/bullet2/src/LinearMath/btPoolAllocator.h b/extern/bullet2/src/LinearMath/btPoolAllocator.h new file mode 100755 index 00000000000..ad772ae123f --- /dev/null +++ b/extern/bullet2/src/LinearMath/btPoolAllocator.h @@ -0,0 +1,94 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef _BT_POOL_ALLOCATOR_H +#define _BT_POOL_ALLOCATOR_H + +#include "btScalar.h" +#include "btAlignedAllocator.h" + +class btPoolAllocator +{ + int m_elemSize; + int m_maxElements; + int m_freeCount; + void* m_firstFree; + unsigned char* m_pool; + +public: + + btPoolAllocator(int elemSize, int maxElements) + :m_elemSize(elemSize), + m_maxElements(maxElements) + { + m_pool = (unsigned char*) btAlignedAlloc(m_elemSize*m_maxElements,16); + + unsigned char* p = m_pool; + m_firstFree = p; + m_freeCount = m_maxElements; + int count = m_maxElements; + while (--count) { + *(void**)p = (p + m_elemSize); + p += m_elemSize; + } + *(void**)p = 0; + } + + ~btPoolAllocator() + { + btAlignedFree( m_pool); + } + + int getFreeCount() const + { + return m_freeCount; + } + + void* allocate(int size) + { + btAssert(!size || size<=m_elemSize); + btAssert(m_freeCount>0); + void* result = m_firstFree; + m_firstFree = *(void**)m_firstFree; + --m_freeCount; + return result; + } + + bool validPtr(void* ptr) + { + if (ptr) { + if (((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize)) + { + return true; + } + } + return false; + } + + void free(void* ptr) + { + if (ptr) { + btAssert((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize); + + *(void**)ptr = m_firstFree; + m_firstFree = ptr; + ++m_freeCount; + } + } + + +}; + +#endif //_BT_POOL_ALLOCATOR_H diff --git a/extern/bullet2/src/LinearMath/btQuadWord.h b/extern/bullet2/src/LinearMath/btQuadWord.h index 961ac484d20..2e5950ebd5d 100644 --- a/extern/bullet2/src/LinearMath/btQuadWord.h +++ b/extern/bullet2/src/LinearMath/btQuadWord.h @@ -17,19 +17,24 @@ subject to the following restrictions: #define SIMD_QUADWORD_H #include "btScalar.h" +#include "btMinMax.h" +//ATTRIBUTE_ALIGNED16(class) btQuadWordStorage +//some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. todo: look into this +class btQuadWordStorage +{ +protected: + btScalar m_x; + btScalar m_y; + btScalar m_z; + btScalar m_unusedW; +}; ///btQuadWord is base-class for vectors, points -class btQuadWord +class btQuadWord : public btQuadWordStorage { - protected: - btScalar m_x; - btScalar m_y; - btScalar m_z; - btScalar m_unusedW; - public: // SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_x)[i]; } @@ -61,6 +66,8 @@ class btQuadWord SIMD_FORCE_INLINE operator btScalar *() { return &m_x; } SIMD_FORCE_INLINE operator const btScalar *() const { return &m_x; } + + SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z) { m_x=x; @@ -89,47 +96,36 @@ class btQuadWord { } - SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z) - :m_x(x),m_y(y),m_z(z) - //todo, remove this in release/simd ? - ,m_unusedW(btScalar(0.)) + SIMD_FORCE_INLINE btQuadWord(const btQuadWordStorage& q) { + *((btQuadWordStorage*)this) = q; + } + + SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z) + { + m_x = x, m_y = y, m_z = z, m_unusedW = 0.0f; } SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) - :m_x(x),m_y(y),m_z(z),m_unusedW(w) { + m_x = x, m_y = y, m_z = z, m_unusedW = w; } SIMD_FORCE_INLINE void setMax(const btQuadWord& other) { - if (other.m_x > m_x) - m_x = other.m_x; - - if (other.m_y > m_y) - m_y = other.m_y; - - if (other.m_z > m_z) - m_z = other.m_z; - - if (other.m_unusedW > m_unusedW) - m_unusedW = other.m_unusedW; + btSetMax(m_x, other.m_x); + btSetMax(m_y, other.m_y); + btSetMax(m_z, other.m_z); + btSetMax(m_unusedW, other.m_unusedW); } SIMD_FORCE_INLINE void setMin(const btQuadWord& other) { - if (other.m_x < m_x) - m_x = other.m_x; - - if (other.m_y < m_y) - m_y = other.m_y; - - if (other.m_z < m_z) - m_z = other.m_z; - - if (other.m_unusedW < m_unusedW) - m_unusedW = other.m_unusedW; + btSetMin(m_x, other.m_x); + btSetMin(m_y, other.m_y); + btSetMin(m_z, other.m_z); + btSetMin(m_unusedW, other.m_unusedW); } diff --git a/extern/bullet2/src/LinearMath/btQuaternion.h b/extern/bullet2/src/LinearMath/btQuaternion.h index 50334970ba6..27ab1fcd2c3 100644 --- a/extern/bullet2/src/LinearMath/btQuaternion.h +++ b/extern/bullet2/src/LinearMath/btQuaternion.h @@ -285,7 +285,7 @@ slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t) } SIMD_FORCE_INLINE btVector3 -quatRotate(btQuaternion& rotation, btVector3& v) +quatRotate(const btQuaternion& rotation, const btVector3& v) { btQuaternion q = rotation * v; q *= rotation.inverse(); @@ -293,7 +293,7 @@ quatRotate(btQuaternion& rotation, btVector3& v) } SIMD_FORCE_INLINE btQuaternion -shortestArcQuat(btVector3& v0,btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized +shortestArcQuat(const btVector3& v0, const btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized { btVector3 c = v0.cross(v1); btScalar d = v0.dot(v1); @@ -308,7 +308,7 @@ shortestArcQuat(btVector3& v0,btVector3& v1) // Game Programming Gems 2.10. make } SIMD_FORCE_INLINE btQuaternion -shortestArcQuatNormalize(btVector3& v0,btVector3& v1) +shortestArcQuatNormalize2(btVector3& v0,btVector3& v1) { v0.normalize(); v1.normalize(); diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h index 01ad93e786a..85dfaf3eb83 100644 --- a/extern/bullet2/src/LinearMath/btScalar.h +++ b/extern/bullet2/src/LinearMath/btScalar.h @@ -23,20 +23,33 @@ subject to the following restrictions: #include #include + +inline int btGetVersion() +{ + return 264; +} + #ifdef WIN32 #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) + #define SIMD_FORCE_INLINE inline #define ATTRIBUTE_ALIGNED16(a) a + #define ATTRIBUTE_ALIGNED128(a) a #else - #define BT_HAS_ALIGNED_ALOCATOR + #define BT_HAS_ALIGNED_ALLOCATOR #pragma warning(disable:4530) #pragma warning(disable:4996) #pragma warning(disable:4786) #define SIMD_FORCE_INLINE __forceinline #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a + #define ATTRIBUTE_ALIGNED128(a) __declspec (align(128)) a #ifdef _XBOX #define BT_USE_VMX128 + + #include + #define BT_HAVE_NATIVE_FSEL + #define btFsel(a,b,c) __fsel((a),(b),(c)) #else #define BT_USE_SSE #endif @@ -46,29 +59,61 @@ subject to the following restrictions: #define btAssert assert //btFullAssert is optional, slows down a lot #define btFullAssert(x) + + #define btLikely(_c) _c + #define btUnlikely(_c) _c + #else #if defined (__CELLOS_LV2__) #define SIMD_FORCE_INLINE inline #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) + #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128))) #ifndef assert #include #endif #define btAssert assert //btFullAssert is optional, slows down a lot #define btFullAssert(x) + + #define btLikely(_c) _c + #define btUnlikely(_c) _c + #else +#ifdef USE_LIBSPE2 + + #define SIMD_FORCE_INLINE __inline + #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) + #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128))) + #ifndef assert + #include + #endif + #define btAssert assert + //btFullAssert is optional, slows down a lot + #define btFullAssert(x) + + + #define btLikely(_c) __builtin_expect((_c), 1) + #define btUnlikely(_c) __builtin_expect((_c), 0) + + +#else //non-windows systems #define SIMD_FORCE_INLINE inline #define ATTRIBUTE_ALIGNED16(a) a + #define ATTRIBUTE_ALIGNED128(a) a #ifndef assert #include #endif #define btAssert assert //btFullAssert is optional, slows down a lot #define btFullAssert(x) + + +#endif // LIBSPE2 + #endif //__CELLOS_LV2__ #endif @@ -88,6 +133,14 @@ typedef float btScalar; #endif +#define BT_DECLARE_ALIGNED_ALLOCATOR() \ + SIMD_FORCE_INLINE void* operator new(size_t sizeInBytes) { return btAlignedAlloc(sizeInBytes,16); } \ + SIMD_FORCE_INLINE void operator delete(void* ptr) { btAlignedFree(ptr); } \ + SIMD_FORCE_INLINE void* operator new(size_t, void* ptr) { return ptr; } \ + SIMD_FORCE_INLINE void operator delete(void*, void*) { } \ + + + #if defined(BT_USE_DOUBLE_PRECISION) || defined(BT_FORCE_DOUBLE_FUNCTIONS) SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrt(x); } @@ -105,12 +158,34 @@ SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return pow(x,y); } #else -SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrtf(x); } +SIMD_FORCE_INLINE btScalar btSqrt(btScalar y) +{ +#ifdef USE_APPROXIMATION + double x, z, tempf; + unsigned long *tfptr = ((unsigned long *)&tempf) + 1; + + tempf = y; + *tfptr = (0xbfcdd90a - *tfptr)>>1; /* estimate of 1/sqrt(y) */ + x = tempf; + z = y*btScalar(0.5); /* hoist out the “/2” */ + x = (btScalar(1.5)*x)-(x*x)*(x*z); /* iteration formula */ + x = (btScalar(1.5)*x)-(x*x)*(x*z); + x = (btScalar(1.5)*x)-(x*x)*(x*z); + x = (btScalar(1.5)*x)-(x*x)*(x*z); + x = (btScalar(1.5)*x)-(x*x)*(x*z); + return x*y; +#else + return sqrtf(y); +#endif +} SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabsf(x); } SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); } SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); } SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); } -SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acosf(x); } +SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { + btAssert(x <= btScalar(1.)); + return acosf(x); +} SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asinf(x); } SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); } SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); } @@ -159,14 +234,6 @@ SIMD_FORCE_INLINE bool btGreaterEqual (btScalar a, btScalar eps) { return (!((a) <= eps)); } -/*SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); } -SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); } -SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); } -SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acosf(x); } -SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asinf(x); } -SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); } -SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); } -*/ SIMD_FORCE_INLINE int btIsNegative(btScalar x) { return x < btScalar(0.0) ? 1 : 0; @@ -177,5 +244,151 @@ SIMD_FORCE_INLINE btScalar btDegrees(btScalar x) { return x * SIMD_DEGS_PER_RAD; #define BT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name +#ifndef btFsel +SIMD_FORCE_INLINE btScalar btFsel(btScalar a, btScalar b, btScalar c) +{ + return a >= 0 ? b : c; +} +#endif +#define btFsels(a,b,c) (btScalar)btFsel(a,b,c) + + +SIMD_FORCE_INLINE bool btMachineIsLittleEndian() +{ + long int i = 1; + const char *p = (const char *) &i; + if (p[0] == 1) // Lowest address contains the least significant byte + return true; + else + return false; +} + + + +///btSelect avoids branches, which makes performance much better for consoles like Playstation 3 and XBox 360 +///Thanks Phil Knight. See also http://www.cellperformance.com/articles/2006/04/more_techniques_for_eliminatin_1.html +SIMD_FORCE_INLINE unsigned btSelect(unsigned condition, unsigned valueIfConditionNonZero, unsigned valueIfConditionZero) +{ + // Set testNz to 0xFFFFFFFF if condition is nonzero, 0x00000000 if condition is zero + // Rely on positive value or'ed with its negative having sign bit on + // and zero value or'ed with its negative (which is still zero) having sign bit off + // Use arithmetic shift right, shifting the sign bit through all 32 bits + unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31); + unsigned testEqz = ~testNz; + return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz)); +} +SIMD_FORCE_INLINE int btSelect(unsigned condition, int valueIfConditionNonZero, int valueIfConditionZero) +{ + unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31); + unsigned testEqz = ~testNz; + return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz)); +} +SIMD_FORCE_INLINE float btSelect(unsigned condition, float valueIfConditionNonZero, float valueIfConditionZero) +{ +#ifdef BT_HAVE_NATIVE_FSEL + return (float)btFsel((btScalar)condition - btScalar(1.0f), valueIfConditionNonZero, valueIfConditionZero); +#else + return (condition != 0) ? valueIfConditionNonZero : valueIfConditionZero; +#endif +} + +template SIMD_FORCE_INLINE void btSwap(T& a, T& b) +{ + T tmp = a; + a = b; + b = tmp; +} + + +//PCK: endian swapping functions +SIMD_FORCE_INLINE unsigned btSwapEndian(unsigned val) +{ + return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24)); +} + +SIMD_FORCE_INLINE unsigned short btSwapEndian(unsigned short val) +{ + return (((val & 0xff00) >> 8) | ((val & 0x00ff) << 8)); +} + +SIMD_FORCE_INLINE unsigned btSwapEndian(int val) +{ + return btSwapEndian((unsigned)val); +} + +SIMD_FORCE_INLINE unsigned short btSwapEndian(short val) +{ + return btSwapEndian((unsigned short) val); +} + +///btSwapFloat uses using char pointers to swap the endianness +////btSwapFloat/btSwapDouble will NOT return a float, because the machine might 'correct' invalid floating point values +///Not all values of sign/exponent/mantissa are valid floating point numbers according to IEEE 754. +///When a floating point unit is faced with an invalid value, it may actually change the value, or worse, throw an exception. +///In most systems, running user mode code, you wouldn't get an exception, but instead the hardware/os/runtime will 'fix' the number for you. +///so instead of returning a float/double, we return integer/long long integer +SIMD_FORCE_INLINE unsigned int btSwapEndianFloat(float d) +{ + unsigned int a; + unsigned char *dst = (unsigned char *)&a; + unsigned char *src = (unsigned char *)&d; + + dst[0] = src[3]; + dst[1] = src[2]; + dst[2] = src[1]; + dst[3] = src[0]; + return a; +} + +// unswap using char pointers +SIMD_FORCE_INLINE float btUnswapEndianFloat(unsigned int a) +{ + float d; + unsigned char *src = (unsigned char *)&a; + unsigned char *dst = (unsigned char *)&d; + + dst[0] = src[3]; + dst[1] = src[2]; + dst[2] = src[1]; + dst[3] = src[0]; + + return d; +} + + +// swap using char pointers +SIMD_FORCE_INLINE void btSwapEndianDouble(double d, unsigned char* dst) +{ + unsigned char *src = (unsigned char *)&d; + + dst[0] = src[7]; + dst[1] = src[6]; + dst[2] = src[5]; + dst[3] = src[4]; + dst[4] = src[3]; + dst[5] = src[2]; + dst[6] = src[1]; + dst[7] = src[0]; + +} + +// unswap using char pointers +SIMD_FORCE_INLINE double btUnswapEndianDouble(const unsigned char *src) +{ + double d; + unsigned char *dst = (unsigned char *)&d; + + dst[0] = src[7]; + dst[1] = src[6]; + dst[2] = src[5]; + dst[3] = src[4]; + dst[4] = src[3]; + dst[5] = src[2]; + dst[6] = src[1]; + dst[7] = src[0]; + + return d; +} + #endif //SIMD___SCALAR_H diff --git a/extern/bullet2/src/LinearMath/btStackAlloc.h b/extern/bullet2/src/LinearMath/btStackAlloc.h index d219b453537..ac940cd2edd 100644 --- a/extern/bullet2/src/LinearMath/btStackAlloc.h +++ b/extern/bullet2/src/LinearMath/btStackAlloc.h @@ -21,6 +21,7 @@ Nov.2006 #define BT_STACK_ALLOC #include "btScalar.h" //for btAssert +#include "btAlignedAllocator.h" struct btBlock { @@ -39,7 +40,7 @@ public: inline void create(unsigned int size) { destroy(); - data = new unsigned char[size]; + data = (unsigned char*) btAlignedAlloc(size,16); totalsize = size; } inline void destroy() @@ -49,12 +50,20 @@ public: if(usedsize==0) { - if(!ischild) delete[] data; + if(!ischild && data) + btAlignedFree(data); + data = 0; usedsize = 0; } } + + int getAvailableMemory() const + { + return totalsize - usedsize; + } + unsigned char* allocate(unsigned int size) { const unsigned int nus(usedsize+size); @@ -68,7 +77,7 @@ public: return(0); } - inline btBlock* beginBlock() + SIMD_FORCE_INLINE btBlock* beginBlock() { btBlock* pb = (btBlock*)allocate(sizeof(btBlock)); pb->previous = current; @@ -76,7 +85,7 @@ public: current = pb; return(pb); } - inline void endBlock(btBlock* block) + SIMD_FORCE_INLINE void endBlock(btBlock* block) { btAssert(block==current); //Raise(L"Unmatched blocks"); diff --git a/extern/bullet2/src/LinearMath/btTransform.h b/extern/bullet2/src/LinearMath/btTransform.h index 2d55fec83a4..883b3a5d2b7 100644 --- a/extern/bullet2/src/LinearMath/btTransform.h +++ b/extern/bullet2/src/LinearMath/btTransform.h @@ -92,13 +92,7 @@ public: m_basis.getRotation(q); return q; } - template - void setValue(const Scalar2 *m) - { - m_basis.setValue(m); - m_origin.setValue(&m[12]); - } - + void setFromOpenGLMatrix(const btScalar *m) { diff --git a/extern/bullet2/src/LinearMath/btTransformUtil.h b/extern/bullet2/src/LinearMath/btTransformUtil.h index bc42fd166b6..d39e2e10074 100644 --- a/extern/bullet2/src/LinearMath/btTransformUtil.h +++ b/extern/bullet2/src/LinearMath/btTransformUtil.h @@ -25,7 +25,7 @@ subject to the following restrictions: #define btRecipSqrt(x) ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */ -inline btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& supportDir) +SIMD_FORCE_INLINE btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& supportDir) { return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), @@ -33,7 +33,7 @@ inline btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& sup } -inline void btPlaneSpace1 (const btVector3& n, btVector3& p, btVector3& q) +SIMD_FORCE_INLINE void btPlaneSpace1 (const btVector3& n, btVector3& p, btVector3& q) { if (btFabs(n.z()) > SIMDSQRT12) { // choose p in y-z plane @@ -121,6 +121,10 @@ public: dmat.getRotation(dorn); #endif//USE_QUATERNION_DIFF + ///floating point inaccuracy can lead to w component > 1..., which breaks + + dorn.normalize(); + angle = dorn.getAngle(); axis = btVector3(dorn.x(),dorn.y(),dorn.z()); axis[3] = btScalar(0.); diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h index 74d41ad2a19..1e331272dd8 100644 --- a/extern/bullet2/src/LinearMath/btVector3.h +++ b/extern/bullet2/src/LinearMath/btVector3.h @@ -27,6 +27,10 @@ class btVector3 : public btQuadWord { public: SIMD_FORCE_INLINE btVector3() {} + SIMD_FORCE_INLINE btVector3(const btQuadWordStorage& q) + : btQuadWord(q) + { + } SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z) @@ -399,4 +403,50 @@ public: }; + +///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization +SIMD_FORCE_INLINE void btSwapScalarEndian(const btScalar& sourceVal, btScalar& destVal) +{ + #ifdef BT_USE_DOUBLE_PRECISION + unsigned char* dest = (unsigned char*) &destVal; + unsigned char* src = (unsigned char*) &sourceVal; + dest[0] = src[7]; + dest[1] = src[6]; + dest[2] = src[5]; + dest[3] = src[4]; + dest[4] = src[3]; + dest[5] = src[2]; + dest[6] = src[1]; + dest[7] = src[0]; +#else + unsigned char* dest = (unsigned char*) &destVal; + unsigned char* src = (unsigned char*) &sourceVal; + dest[0] = src[3]; + dest[1] = src[2]; + dest[2] = src[1]; + dest[3] = src[0]; +#endif //BT_USE_DOUBLE_PRECISION +} +///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization +SIMD_FORCE_INLINE void btSwapVector3Endian(const btVector3& sourceVec, btVector3& destVec) +{ + for (int i=0;i<4;i++) + { + btSwapScalarEndian(sourceVec[i],destVec[i]); + } + +} + +///btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization +SIMD_FORCE_INLINE void btUnSwapVector3Endian(btVector3& vector) +{ + + btVector3 swappedVec; + for (int i=0;i<4;i++) + { + btSwapScalarEndian(vector[i],swappedVec[i]); + } + vector = swappedVec; +} + #endif //SIMD__VECTOR3_H diff --git a/extern/bullet2/src/LinearMath/ibmsdk/Makefile b/extern/bullet2/src/LinearMath/ibmsdk/Makefile new file mode 100644 index 00000000000..2ad26576241 --- /dev/null +++ b/extern/bullet2/src/LinearMath/ibmsdk/Makefile @@ -0,0 +1,30 @@ +#### Source code Dirs +VPATH = ../ + +ROOT = ../../.. + +#### Library +LIBRARY_ppu = bulletmath.a + +#### Compiler flags +CPPFLAGS = \ +-DUSE_LIBSPE2 \ +-I$(ROOT)/src \ +-I$(SDKINC) + +#### Optimization level flags +#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG) +CC_OPT_LEVEL = -O3 + +##### Objects to be archived in lib + +OBJS = \ +btAlignedAllocator.o \ +btGeometryUtil.o \ +btQuickprof.o + +#### Install directories +INSTALL_DIR = $(ROOT)/lib/ibmsdk +INSTALL_FILES = $(LIBRARY_ppu) +CELL_TOP ?= /opt/ibm/cell-sdk/prototype +include $(CELL_TOP)/make.footer diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript index 127752777c8..7697a58d81b 100644 --- a/extern/bullet2/src/SConscript +++ b/extern/bullet2/src/SConscript @@ -22,74 +22,8 @@ elif sys.platform=='darwin': cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math'] linearmath_src = env.Glob("LinearMath/*.cpp") -bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp", - "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp", - "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp", - "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp", - "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp", - "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp", - "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp", - "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp", - "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp", - "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp", - "BulletDynamics/Dynamics/btRigidBody.cpp", - "BulletDynamics/Dynamics/Bullet-C-Api.cpp", - "BulletDynamics/Vehicle/btRaycastVehicle.cpp", - "BulletDynamics/Vehicle/btWheelInfo.cpp"] -collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp", - "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp", - "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp", - "BulletCollision/BroadphaseCollision/btDispatcher.cpp", - "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp", - "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp", - "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp", - "BulletCollision/CollisionDispatch/btCollisionObject.cpp", - "BulletCollision/CollisionDispatch/btCollisionWorld.cpp", - "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btManifoldResult.cpp", - "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp", - "BulletCollision/CollisionDispatch/btUnionFind.cpp", - "BulletCollision/CollisionShapes/btBoxShape.cpp", - "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btCollisionShape.cpp", - "BulletCollision/CollisionShapes/btCompoundShape.cpp", - "BulletCollision/CollisionShapes/btConcaveShape.cpp", - "BulletCollision/CollisionShapes/btConeShape.cpp", - "BulletCollision/CollisionShapes/btConvexHullShape.cpp", - "BulletCollision/CollisionShapes/btConvexShape.cpp", - "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btCylinderShape.cpp", - "BulletCollision/CollisionShapes/btEmptyShape.cpp", - "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp", - "BulletCollision/CollisionShapes/btMultiSphereShape.cpp", - "BulletCollision/CollisionShapes/btOptimizedBvh.cpp", - "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp", - "BulletCollision/CollisionShapes/btTetrahedronShape.cpp", - "BulletCollision/CollisionShapes/btSphereShape.cpp", - "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp", - "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp", - "BulletCollision/CollisionShapes/btTriangleCallback.cpp", - "BulletCollision/CollisionShapes/btTriangleBuffer.cpp", - "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp", - "BulletCollision/CollisionShapes/btTriangleMesh.cpp", - "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp", - "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp", - "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp", - "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp", - "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp", - "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp", - "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"] +bulletdyn_src = env.Glob("BulletDynamics/ConstraintSolver/*.cpp") + env.Glob("BulletDynamics/Dynamics/*.cpp") + env.Glob("BulletDynamics/Vehicle/*.cpp") +collision_src = env.Glob("BulletCollision/BroadphaseCollision/*.cpp") + env.Glob("BulletCollision/CollisionDispatch/*.cpp") + env.Glob("BulletCollision/CollisionShapes/*.cpp") + env.Glob("BulletCollision/NarrowPhaseCollision/*.cpp") incs = '. BulletCollision BulletDynamics LinearMath' diff --git a/extern/bullet2/src/btBulletCollisionCommon.h b/extern/bullet2/src/btBulletCollisionCommon.h index 8417ccc671f..a309f7d76d2 100644 --- a/extern/bullet2/src/btBulletCollisionCommon.h +++ b/extern/bullet2/src/btBulletCollisionCommon.h @@ -32,17 +32,19 @@ subject to the following restrictions: #include "BulletCollision/CollisionShapes/btConvexHullShape.h" #include "BulletCollision/CollisionShapes/btTriangleMesh.h" #include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/CollisionShapes/btTetrahedronShape.h" #include "BulletCollision/CollisionShapes/btEmptyShape.h" -#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btMultiSphereShape.h" +#include "BulletCollision/CollisionShapes/btUniformScalingShape.h" ///Narrowphase Collision Detector #include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h" ///Dispatching and generation of collision pairs (broadphase) #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" diff --git a/extern/bullet2/src/btBulletDynamicsCommon.h b/extern/bullet2/src/btBulletDynamicsCommon.h index 25f016cba8a..5d08dac0c0d 100644 --- a/extern/bullet2/src/btBulletDynamicsCommon.h +++ b/extern/bullet2/src/btBulletDynamicsCommon.h @@ -20,6 +20,8 @@ subject to the following restrictions: #include "btBulletCollisionCommon.h" #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h" +#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h" + #include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h" #include "BulletDynamics/Dynamics/btRigidBody.h" diff --git a/extern/bullet2/src/ibmsdk/Makefile b/extern/bullet2/src/ibmsdk/Makefile new file mode 100644 index 00000000000..768fffd35a4 --- /dev/null +++ b/extern/bullet2/src/ibmsdk/Makefile @@ -0,0 +1,10 @@ +#### Visit Bullet library ibmsdk dirs and build code +CELL_TOP ?= /opt/ibm/cell-sdk/prototype + +DIRS := \ +../BulletCollision/ibmsdk \ +../BulletDynamics/ibmsdk \ +../LinearMath/ibmsdk + + +include $(CELL_TOP)/make.footer From e14457b921060b73491a306aee012e468116710c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 6 Nov 2007 14:27:06 +0000 Subject: [PATCH 049/430] updated bullet to version 2.64 and hopefully didn't break too much things in CcdPhysicsEnvironment.cpp, but it compiles and works for me --- source/blender/blenkernel/intern/cloth.c | 2 +- source/blender/blenkernel/intern/implicit.c | 55 ++----------------- .../Converter/KX_BlenderSceneConverter.cpp | 2 +- .../Physics/Bullet/CcdPhysicsEnvironment.cpp | 29 +++++----- .../Physics/Bullet/CcdPhysicsEnvironment.h | 2 +- 5 files changed, 21 insertions(+), 69 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 9720ec6b141..3b065fc16f5 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -171,7 +171,7 @@ void cloth_init (ClothModifierData *clmd) // also from softbodies clmd->sim_parms.maxgoal = 1.0; clmd->sim_parms.mingoal = 0.0; - clmd->sim_parms.defgoal = 0.7; + clmd->sim_parms.defgoal = 0.0; clmd->sim_parms.goalspring = 100.0; clmd->sim_parms.goalfrict = 0.0; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 41cc9e8cef4..a72887d7eb9 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -2165,55 +2165,6 @@ void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData */ } - -// move collision objects forward in time and update static bounding boxes -void collisions_update_collision_objects(float step) -{ - Base *base=NULL; - ClothModifierData *coll_clmd=NULL; - Object *coll_ob=NULL; - unsigned int i=0; - /* - // search all objects for collision object - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - Cloth *coll_cloth = coll_clmd->clothObject; - BVH *coll_bvh = coll_clmd->clothObject->tree; - unsigned int coll_numverts = coll_cloth->numverts; - - // update position of collision object - for(i = 0; i < coll_numverts; i++) - { - VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); - - VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); - - // no dt here because of float rounding errors - VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); - } - - // update BVH of collision object - // bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING - } - else - printf ("collisions_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } - */ -} - - void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) { /* @@ -2251,7 +2202,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// - /* + // update cloth bvh bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) @@ -2276,6 +2227,8 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, // fill collision list collisions += bvh_traverse(bvh1->root, bvh2->root, &collision_list); + // call static collision response + // free collision list if(collision_list) { @@ -2303,7 +2256,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); } ////////////////////////////////////////////// - */ + // Test on *simple* selfcollisions collisions = 1; count = 0; diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 47d8f186653..01289113bf1 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -307,7 +307,7 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename, case UseBullet: { CcdPhysicsEnvironment* ccdPhysEnv = new CcdPhysicsEnvironment(); - ccdPhysEnv->setDebugDrawer(new BlenderDebugDraw()); + // ccdPhysEnv->setDebugDrawer(new BlenderDebugDraw()); ccdPhysEnv->setDeactivationLinearTreshold(0.8f); // default, can be overridden by Python ccdPhysEnv->setDeactivationAngularTreshold(1.0f); // default, can be overridden by Python diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 99c3e5f77c7..db82dde9663 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -295,7 +295,7 @@ static void DrawAabb(btIDebugDraw* debugDrawer,const btVector3& from,const btVec -CcdPhysicsEnvironment::CcdPhysicsEnvironment(btDispatcher* dispatcher,btOverlappingPairCache* pairCache) +CcdPhysicsEnvironment::CcdPhysicsEnvironment(btDispatcher* dispatcher,btBroadphaseInterface* broadphase) :m_scalingPropagated(false), m_numIterations(10), m_numTimeSubSteps(1), @@ -303,32 +303,31 @@ m_ccdMode(0), m_solverType(-1), m_profileTimings(0), m_enableSatCollisionDetection(false) -{ - +{ for (int i=0;isetGravity(m_gravity); @@ -620,7 +619,7 @@ int CcdPhysicsEnvironment::createUniversalD6Constraint( genericConstraint = new btGeneric6DofConstraint( *rb0,*rb1, - frameInA,frameInB); + frameInA,frameInB, 1); genericConstraint->setLinearLowerLimit(linearMinLimits); genericConstraint->setLinearUpperLimit(linearMaxLimits); genericConstraint->setAngularLowerLimit(angularMinLimits); @@ -687,8 +686,8 @@ struct FilterClosestRayResultCallback : public btCollisionWorld::ClosestRayResul //ignore client... if (curHit != m_ignoreClient) { - //if valid - return ClosestRayResultCallback::AddSingleResult(rayResult); + //if valid; also return normal in world space + return ClosestRayResultCallback::AddSingleResult(rayResult, 1); } return m_closestHitFraction; } @@ -805,7 +804,7 @@ void CcdPhysicsEnvironment::setConstraintParam(int constraintId,int param,float { //param = 1..12, min0,max0,min1,max1...min6,max6 btGeneric6DofConstraint* genCons = (btGeneric6DofConstraint*)typedConstraint; - genCons->SetLimit(param,value0,value1); + genCons->setLimit(param,value0,value1); break; }; default: @@ -1099,7 +1098,7 @@ int CcdPhysicsEnvironment::createConstraint(class PHY_IPhysicsController* ctrl genericConstraint = new btGeneric6DofConstraint( *rb0,*rb1, - frameInA,frameInB); + frameInA,frameInB, 1); } else @@ -1122,7 +1121,7 @@ int CcdPhysicsEnvironment::createConstraint(class PHY_IPhysicsController* ctrl genericConstraint = new btGeneric6DofConstraint( *rb0,s_fixedObject2, - frameInA,frameInB); + frameInA,frameInB, 1); } if (genericConstraint) diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h index 66a6ed59c17..8d2b961db85 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h @@ -71,7 +71,7 @@ protected: public: - CcdPhysicsEnvironment(btDispatcher* dispatcher=0, btOverlappingPairCache* pairCache=0); + CcdPhysicsEnvironment(btDispatcher* dispatcher=0, btBroadphaseInterface* broadphase=0); virtual ~CcdPhysicsEnvironment(); From d4e881761dc3e7649f62d92a96648c2f2b69925d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 8 Nov 2007 03:31:52 +0000 Subject: [PATCH 050/430] Introduced a selfmade AIMEX (adaptive implicit-explicit condition into force calculation for jacobi matrices -->results in ca. 15% speedup --- source/blender/blenkernel/intern/implicit.c | 73 ++++++++++--------- source/blender/blenkernel/intern/kdop.c | 4 +- source/blender/blenkernel/intern/pointcache.c | 2 +- source/blender/src/buttons_object.c | 2 +- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index a72887d7eb9..ee8a440735a 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -691,7 +691,7 @@ static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}}; static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; typedef struct Implicit_Data { - lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; + lfVector *X, *V, *Xnew, *Vnew, *F, *B, *dV, *z; fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI; } Implicit_Data; @@ -727,11 +727,10 @@ int implicit_init (Object *ob, ClothModifierData *clmd) id->Xnew = create_lfvector(cloth->numverts); id->V = create_lfvector(cloth->numverts); id->Vnew = create_lfvector(cloth->numverts); - id->olddV = create_lfvector(cloth->numverts); - zero_lfvector(id->olddV, cloth->numverts); id->F = create_lfvector(cloth->numverts); id->B = create_lfvector(cloth->numverts); id->dV = create_lfvector(cloth->numverts); + zero_lfvector(id->dV, cloth->numverts); id->z = create_lfvector(cloth->numverts); for(i=0;inumverts;i++) @@ -799,7 +798,6 @@ int implicit_free (ClothModifierData *clmd) del_lfvector(id->Xnew); del_lfvector(id->V); del_lfvector(id->Vnew); - del_lfvector(id->olddV); del_lfvector(id->F); del_lfvector(id->B); del_lfvector(id->dV); @@ -924,8 +922,6 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr d = create_lfvector(numverts); tmp = create_lfvector(numverts); r = create_lfvector(numverts); - - // zero_lfvector(ldV, CLOTHPARTICLES); filter(ldV, S); add_lfvector_lfvector(ldV, ldV, z, numverts); @@ -1174,7 +1170,7 @@ DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float } -DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt) { float extent[3]; float length = 0; @@ -1229,19 +1225,23 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms.structural; + k = (clmd->sim_parms.structural*(length-L)); - mul_fvector_S(stretch_force, dir, (k*(length-L))); + mul_fvector_S(stretch_force, dir, k); VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * 0.01 * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); - - dfdx_spring_type1(s->dfdx, dir,length,L,k); - - dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis); + + // Formula from Ascher / Boxman, Speeding up cloth simulation + if((dt * (k*dt + 2 * clmd->sim_parms.Cdis * 0.01)) > 0.01 ) + { + dfdx_spring_type1(s->dfdx, dir,length,L,clmd->sim_parms.structural); + dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis * 0.01); + } + // printf("(dt*k*dt) ): %f, k: %f\n", (dt * (k*dt + 2 * clmd->sim_parms.Cdis * 0.01) ), k); } } else // calculate force of bending springs @@ -1252,17 +1252,19 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms.bending; + k = fbstar(length, L, clmd->sim_parms.bending, cb); - mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); + mul_fvector_S(bending_force, dir, k); VECADD(s->f, s->f, bending_force); - if(INPR(bending_force,bending_force) > 0.13*0.13) + // DG: My formula to handle bending for the AIMEX scheme + // multiply with 1000 because of numerical problems + if( ((k*1000)*dt*dt) < -0.18 ) { + dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms.bending, cb); clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } - - dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); + // printf("(dt*k*dt) ): %f, k: %f\n", (dt*dt*k*-1.0), k); } } } @@ -1333,7 +1335,7 @@ DO_INLINE void calc_triangle_force(ClothModifierData *clmd, MFace mface, lfVecto } -void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time) +void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time, float dt) { /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; @@ -1417,7 +1419,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec { // only handle active springs // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)){} - cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); + cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX, dt); search = search->next; } @@ -1452,13 +1454,13 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec } -void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv) +void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) { unsigned int numverts = dFdV[0].vcount; lfVector *dFdXmV = create_lfvector(numverts); initdiag_bfmatrix(A, I); - zero_lfvector(dV, numverts); + // zero_lfvector(dV, numverts); subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); @@ -1469,17 +1471,16 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto itstart(); cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ - // cg_filtered_pre(dV, A, B, z, olddV, P, Pinv, dt); + // cg_filtered_pre(dV, A, B, z, dV, P, Pinv, dt); itend(); // printf("cg_filtered calc time: %f\n", (float)itval()); - cp_lfvector(olddV, dV, numverts); + // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); - del_lfvector(dFdXmV); } @@ -1514,12 +1515,12 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, dt ); // check for sleeping if(!(clmd->coll_parms.flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) { - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); } @@ -1592,8 +1593,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase cp_lfvector(id->V, id->Vnew, numverts); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, dt); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); } } @@ -1781,7 +1782,7 @@ int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothMod return 0; } -void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +void cloth_collision_static(ClothModifierData *clmd, LinkNode *collision_list) { /* CollPair *collpair = NULL; @@ -1794,7 +1795,7 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm for(i = 0; i < 4; i++) { - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; @@ -1865,8 +1866,7 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm else i++; } - - // calc SIPcode (?) + if(i < 4) { @@ -2320,6 +2320,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } } } + /* + // does not compile with OpenMP + if(!collisions) + break; + */ } ////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index f39d5465b87..e168d3a9954 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -802,7 +802,9 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio VECCOPY(collpair->point_indexB, tree2->point_index); collpair->point_indexB[3] = tree2->point_index[3]; - BLI_linklist_append(&collision_list[0], collpair); + // we use prepend because lots of insertions at end + // of list are horrible slow! + BLI_linklist_prepend(&collision_list[0], collpair); return 1; } diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index b87a43c30c3..b9e6cd53f8d 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -104,7 +104,7 @@ FILE *PTCache_id_fopen(struct ID *id, char mode, int cfra, int stack_index) if (mode=='r') { if (!BLI_exists(filename)) { - printf("Error, file does not exist '%s'\n", filename); + // printf("Error, file does not exist '%s'\n", filename); return NULL; } fp = fopen(filename, "rb"); diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 70559d29f40..2d5b54ac1c2 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3176,7 +3176,7 @@ static void object_panel_cloth(Object *ob) uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 3.0, 10.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); From 057060967e07b052c70010b4c6d7d38dd03f6925 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 16 Nov 2007 14:24:43 +0000 Subject: [PATCH 051/430] Fixed DNA issue, some optional SSE stuff in (experimental, only 2 functions => not likely to be ever in trunk), BE AWARE: not compatible with old cloth files, many fixes in general, deactivated selfcollisions due to WIP --- source/blender/blenkernel/BKE_cloth.h | 57 +- source/blender/blenkernel/BKE_collisions.h | 5 + source/blender/blenkernel/intern/cloth.c | 130 ++- source/blender/blenkernel/intern/implicit.c | 933 ++++++++++++------- source/blender/blenkernel/intern/kdop.c | 141 ++- source/blender/blenkernel/intern/modifier.c | 16 +- source/blender/blenloader/intern/readfile.c | 11 +- source/blender/blenloader/intern/writefile.c | 42 +- source/blender/makesdna/DNA_cloth_types.h | 91 +- source/blender/makesdna/DNA_modifier_types.h | 10 +- source/blender/src/buttons_object.c | 96 +- 11 files changed, 910 insertions(+), 622 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 83891cc74d3..f3f566d2832 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -57,6 +57,49 @@ struct DerivedMesh; #define CLOTH_MAX_THREAD 2 +typedef struct ClothVertex { + int flags; /* General flags per vertex. */ + float mass; /* mass / weight of the vertex */ + float goal; /* goal, from SB */ + float impulse[3]; /* used in collision.c */ + unsigned int impulse_count; /* same as above */ +} ClothVertex; + +typedef struct ClothSpring { + int ij; /* Pij from the paper, one end of the spring. */ + int kl; /* Pkl from the paper, one end of the spring. */ + float restlen; /* The original length of the spring. */ + int matrix_index; /* needed for implicit solver (fast lookup) */ + int type; /* types defined in BKE_cloth.h ("springType") */ + int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ + float dfdx[3][4]; + float dfdv[3][4]; + float f[3]; +} ClothSpring; + +typedef struct Cloth { + struct ClothVertex *verts; /* The vertices that represent this cloth. */ + struct LinkNode *springs; /* The springs connecting the mesh. */ + struct BVH *tree; /* collision tree for this cloth object */ + struct BVH *selftree; /* self collision tree for this cloth object */ + struct MFace *mfaces; + struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ + struct EdgeHash *edgehash; /* used for fast checking adjacent points */ + unsigned int numverts; /* The number of verts == m * n. */ + unsigned int numsprings; /* The count of springs. */ + unsigned int numfaces; + unsigned int numothersprings; + unsigned int numspringssave; + unsigned int old_solver_type; + float (*x)[4]; /* The current position of all vertices.*/ + float (*xold)[4]; /* The previous position of all vertices.*/ + float (*current_x)[4]; /* The TEMPORARY current position of all vertices.*/ + float (*current_xold)[4]; /* The TEMPORARY previous position of all vertices.*/ + float (*v)[4]; /* the current velocity of all vertices */ + float (*current_v)[4]; + float (*xconst)[4]; +} Cloth; + /* goal defines */ #define SOFTGOALSNAP 0.999f @@ -138,7 +181,6 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, //////////////////////////////////////////////// void cloth_free_modifier ( ClothModifierData *clmd ); void cloth_init ( ClothModifierData *clmd ); -void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); //////////////////////////////////////////////// @@ -178,19 +220,6 @@ int verlet_init ( Object *ob, ClothModifierData *clmd ); int verlet_free ( ClothModifierData *clmd ); int verlet_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); -/* used for caching in implicit.c */ -typedef struct Frame -{ - ClothVertex *verts; - ClothSpring *springs; - unsigned int numverts, numsprings; - float time; /* we need float since we want to support sub-frames */ - float (*x)[3]; - float (*xold)[3]; - float (*v)[3]; - float (*current_xold)[3]; -} -Frame; /* used for collisions in collision.c */ /* diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index fa5956c5bec..f358bd629e6 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -73,6 +73,7 @@ typedef struct BVH CollisionTree *leaf_root; /* Head of the leaf linked list. */ float epsilon; /* epslion is used for inflation of the k-dop */ int flags; /* bvhFlags */ + } BVH; @@ -80,6 +81,8 @@ BVH; typedef struct CollisionPair { int point_indexA[4], point_indexB[4]; + float vector[3]; + float pa[3], pb[3]; } CollisionPair; @@ -93,6 +96,7 @@ CollisionPair; // builds bounding volume hierarchy BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], unsigned int numverts, float epsilon); +BVH *bvh_build_from_float4 (MFace *mfaces, unsigned int numfaces, float (*x)[4], unsigned int numverts, float epsilon); // frees the same void bvh_free ( BVH *bvh ); @@ -103,6 +107,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // update bounding volumes, needs updated positions in bvh->x void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); void bvh_update_from_float3(BVH * bvh, float (*x)[3], unsigned int numverts, float (*xnew)[3], int moving); +void bvh_update_from_float4(BVH * bvh, float (*x)[4], unsigned int numverts, float (*xnew)[4], int moving); LinkNode *BLI_linklist_append_fast (LinkNode **listp, void *ptr); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 3b065fc16f5..ea3c8dec0c0 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -141,41 +141,39 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v void cloth_init (ClothModifierData *clmd) { /* Initialize our new data structure to reasonable values. */ - clmd->sim_parms.gravity [0] = 0.0; - clmd->sim_parms.gravity [1] = 0.0; - clmd->sim_parms.gravity [2] = -9.81; - clmd->sim_parms.structural = 100.0; - clmd->sim_parms.shear = 100.0; - clmd->sim_parms.bending = 1.0; - clmd->sim_parms.Cdis = 5.0; - clmd->sim_parms.Cvi = 1.0; - clmd->sim_parms.mass = 1.0f; - clmd->sim_parms.stepsPerFrame = 5; - clmd->sim_parms.sim_time = 1.0; - clmd->sim_parms.flags = CLOTH_SIMSETTINGS_FLAG_RESET; - clmd->sim_parms.solver_type = 0; - clmd->sim_parms.preroll = 0; - clmd->sim_parms.maxspringlen = 10; - clmd->coll_parms.self_friction = 5.0; - clmd->coll_parms.friction = 10.0; - clmd->coll_parms.loop_count = 1; - clmd->coll_parms.epsilon = 0.01; - clmd->coll_parms.selfepsilon = 0.1; + clmd->sim_parms->gravity [0] = 0.0; + clmd->sim_parms->gravity [1] = 0.0; + clmd->sim_parms->gravity [2] = -9.81; + clmd->sim_parms->structural = 100.0; + clmd->sim_parms->shear = 100.0; + clmd->sim_parms->bending = 1.0; + clmd->sim_parms->Cdis = 5.0; + clmd->sim_parms->Cvi = 1.0; + clmd->sim_parms->mass = 1.0f; + clmd->sim_parms->stepsPerFrame = 5; + clmd->sim_parms->sim_time = 1.0; + clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms->solver_type = 0; + clmd->sim_parms->preroll = 0; + clmd->sim_parms->maxspringlen = 10; + clmd->coll_parms->self_friction = 5.0; + clmd->coll_parms->friction = 10.0; + clmd->coll_parms->loop_count = 1; + clmd->coll_parms->epsilon = 0.01; + clmd->coll_parms->selfepsilon = 0.1; /* These defaults are copied from softbody.c's * softbody_calc_forces() function. */ - clmd->sim_parms.eff_force_scale = 1000.0; - clmd->sim_parms.eff_wind_scale = 250.0; + clmd->sim_parms->eff_force_scale = 1000.0; + clmd->sim_parms->eff_wind_scale = 250.0; // also from softbodies - clmd->sim_parms.maxgoal = 1.0; - clmd->sim_parms.mingoal = 0.0; - clmd->sim_parms.defgoal = 0.0; - clmd->sim_parms.goalspring = 100.0; - clmd->sim_parms.goalfrict = 0.0; - - clmd->sim_parms.cache = NULL; + clmd->sim_parms->maxgoal = 1.0; + clmd->sim_parms->mingoal = 0.0; + clmd->sim_parms->defgoal = 0.0; + clmd->sim_parms->goalspring = 100.0; + clmd->sim_parms->goalfrict = 0.0; } // unused in the moment, cloth needs quads from mesh @@ -410,7 +408,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; - if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) { stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); @@ -434,9 +432,9 @@ static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr for(a = 0; a < cloth->numverts; a++) { - fwrite(&cloth->x[a], sizeof(float),3,fp); - fwrite(&cloth->xconst[a], sizeof(float),3,fp); - fwrite(&cloth->v[a], sizeof(float),3,fp); + fwrite(&cloth->x[a], sizeof(float),4,fp); + fwrite(&cloth->xconst[a], sizeof(float),4,fp); + fwrite(&cloth->v[a], sizeof(float),4,fp); } fclose(fp); @@ -459,17 +457,17 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) else { for(a = 0; a < cloth->numverts; a++) { - if(fread(&cloth->x[a], sizeof(float), 3, fp) != 3) + if(fread(&cloth->x[a], sizeof(float), 4, fp) != 4) { ret = 0; break; } - if(fread(&cloth->xconst[a], sizeof(float), 3, fp) != 3) + if(fread(&cloth->xconst[a], sizeof(float), 4, fp) != 4) { ret = 0; break; } - if(fread(&cloth->v[a], sizeof(float), 3, fp) != 3) + if(fread(&cloth->v[a], sizeof(float), 4, fp) != 4) { ret = 0; break; @@ -501,9 +499,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d unsigned int framenr = (float)G.scene->r.cfra; float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); ListBase *effectors = NULL; - float deltaTime = current_time - clmd->sim_parms.sim_time; + float deltaTime = current_time - clmd->sim_parms->sim_time; - clmd->sim_parms.dt = 1.0f / (clmd->sim_parms.stepsPerFrame * G.scene->r.frs_sec); + clmd->sim_parms->dt = 1.0f / (clmd->sim_parms->stepsPerFrame * G.scene->r.frs_sec); result = CDDM_copy(dm); @@ -519,9 +517,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d medge = CDDM_get_edges(result); mface = CDDM_get_faces(result); - clmd->sim_parms.sim_time = current_time; + clmd->sim_parms->sim_time = current_time; - if ( current_time < clmd->sim_parms.firstframe ) + if ( current_time < clmd->sim_parms->firstframe ) return result; // only be active during a specific period: @@ -529,9 +527,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d /* if ( clmd->clothObject ) { - if ( clmd->sim_parms.cache ) + if ( clmd->sim_parms->cache ) { - if ( current_time < clmd->sim_parms.firstframe ) + if ( current_time < clmd->sim_parms->firstframe ) { int frametime = cloth_cache_first_frame ( clmd ); if ( cloth_cache_search_frame ( clmd, frametime ) ) @@ -541,7 +539,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d } return result; } - else if ( current_time > clmd->sim_parms.lastframe ) + else if ( current_time > clmd->sim_parms->lastframe ) { int frametime = cloth_cache_last_frame ( clmd ); if ( cloth_cache_search_frame ( clmd, frametime ) ) @@ -558,7 +556,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_cache_get_frame ( clmd, framenr ); cloth_to_object ( ob, result, clmd ); } - clmd->sim_parms.sim_time = current_time; + clmd->sim_parms->sim_time = current_time; return result; } } @@ -578,7 +576,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth = clmd->clothObject; } - clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; + clmd->clothObject->old_solver_type = clmd->sim_parms->solver_type; // Insure we have a clmd->clothObject, in case allocation failed. if (clmd->clothObject != NULL) @@ -600,8 +598,8 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d tstart(); /* Call the solver. */ - if (solvers [clmd->sim_parms.solver_type].solver) - solvers [clmd->sim_parms.solver_type].solver (ob, framenr, clmd, effectors); + if (solvers [clmd->sim_parms->solver_type].solver) + solvers [clmd->sim_parms->solver_type].solver (ob, framenr, clmd, effectors); tend(); @@ -614,7 +612,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth_to_object (ob, result, clmd); // bvh_free(clmd->clothObject->tree); - // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms->epsilon); } } @@ -793,7 +791,7 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v for ( i = 0; i < numverts; i++, verts++ ) { // LATER ON, support also mass painting here - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) @@ -804,7 +802,7 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v { verts->goal = dvert->dw [j].weight; - goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + goalfac= ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); verts->goal = ( float ) pow ( verts->goal , 4.0f ); if ( dvert->dw [j].weight >=SOFTGOALSNAP ) @@ -875,9 +873,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY (clmd->clothObject->x[i], mvert[i].co); Mat4MulVecfl(ob->obmat, clmd->clothObject->x[i]); - clmd->clothObject->verts [i].mass = clmd->sim_parms.mass; - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - clmd->clothObject->verts [i].goal= clmd->sim_parms.defgoal; + clmd->clothObject->verts [i].mass = clmd->sim_parms->mass; + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + clmd->clothObject->verts [i].goal= clmd->sim_parms->defgoal; else clmd->clothObject->verts [i].goal= 0.0; clmd->clothObject->verts [i].flags = 0; @@ -891,16 +889,16 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d } /* apply / set vertex groups */ - if (clmd->sim_parms.vgroup_mass > 0) - cloth_apply_vgroup (clmd, olddm, clmd->sim_parms.vgroup_mass); + if (clmd->sim_parms->vgroup_mass > 0) + cloth_apply_vgroup (clmd, olddm, clmd->sim_parms->vgroup_mass); /* init our solver */ - if (solvers [clmd->sim_parms.solver_type].init) - solvers [clmd->sim_parms.solver_type].init (ob, clmd); + if (solvers [clmd->sim_parms->solver_type].init) + solvers [clmd->sim_parms->solver_type].init (ob, clmd); - clmd->clothObject->tree = bvh_build_from_float3(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms.epsilon); + clmd->clothObject->tree = bvh_build_from_float4(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms->epsilon); - clmd->clothObject->selftree = bvh_build_from_float3(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms.selfepsilon); + clmd->clothObject->selftree = bvh_build_from_float4(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms->selfepsilon); // save initial state cloth_write_cache(ob, clmd, framenr-1); @@ -930,7 +928,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_x" ); + clmd->clothObject->x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_x" ); if ( clmd->clothObject->x == NULL ) { cloth_free_modifier ( clmd ); @@ -938,7 +936,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_xold" ); + clmd->clothObject->xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_xold" ); if ( clmd->clothObject->xold == NULL ) { cloth_free_modifier ( clmd ); @@ -946,7 +944,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_v" ); + clmd->clothObject->v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_v" ); if ( clmd->clothObject->v == NULL ) { cloth_free_modifier ( clmd ); @@ -954,7 +952,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->current_x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_x" ); + clmd->clothObject->current_x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_x" ); if ( clmd->clothObject->current_x == NULL ) { cloth_free_modifier ( clmd ); @@ -962,7 +960,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->current_xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_xold" ); + clmd->clothObject->current_xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_xold" ); if ( clmd->clothObject->current_xold == NULL ) { cloth_free_modifier ( clmd ); @@ -970,7 +968,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->current_v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_current_v" ); + clmd->clothObject->current_v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_v" ); if ( clmd->clothObject->current_v == NULL ) { cloth_free_modifier ( clmd ); @@ -978,7 +976,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d return; } - clmd->clothObject->xconst = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 3, "Cloth MVert_xconst" ); + clmd->clothObject->xconst = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_xconst" ); if ( clmd->clothObject->xconst == NULL ) { cloth_free_modifier ( clmd ); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index ee8a440735a..c457064065c 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -63,6 +63,12 @@ #include "BKE_global.h" #include "BIF_editdeform.h" +#include "Bullet-C-Api.h" + +#include +#include +#include + #ifdef _WIN32 #include static LARGE_INTEGER _itstart, _itend; @@ -114,20 +120,39 @@ struct Cloth; ///////////////////////////////////////// /* DEFINITIONS */ -typedef float lfVector[3]; +#ifdef __GNUC__ +typedef float lfVector[4] __attribute__ ((aligned (16))); +#else +typedef __declspec(align(16)) lfVector[4]; +#endif + +#ifdef __GNUC__ typedef struct fmatrix3x3 { - float m[3][3]; /* 4x4 matrix */ + float m[3][4] __attribute__ ((aligned (16))); /* 3x3 matrix */ unsigned int c,r; /* column and row number */ int pinned; /* is this vertex allowed to move? */ float n1,n2,n3; /* three normal vectors for collision constrains */ unsigned int vcount; /* vertex count */ unsigned int scount; /* spring count */ } fmatrix3x3; +#else +typedef struct fmatrix3x3 { + __declspec(align(16)) + float m[3][4]; /* 3x3 matrix */ + unsigned int c,r; /* column and row number */ + int pinned; /* is this vertex allowed to move? */ + float n1,n2,n3; /* three normal vectors for collision constrains */ + unsigned int vcount; /* vertex count */ + unsigned int scount; /* spring count */ +} fmatrix3x3; +#endif + /////////////////////////// // float[3] vector /////////////////////////// /* simple vector code */ + /* STATUS: verified */ DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar) { @@ -139,13 +164,18 @@ DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar) /* STATUS: verified */ DO_INLINE void cross_fvector(float to[3], float vectorA[3], float vectorB[3]) { - to[0] = vectorA[1] * vectorB[2] - vectorA[2] * vectorB[1]; - to[1] = vectorA[2] * vectorB[0] - vectorA[0] * vectorB[2]; - to[2] = vectorA[0] * vectorB[1] - vectorA[1] * vectorB[0]; + float temp[3]; + + temp[0] = vectorA[1] * vectorB[2] - vectorA[2] * vectorB[1]; + temp[1] = vectorA[2] * vectorB[0] - vectorA[0] * vectorB[2]; + temp[2] = vectorA[0] * vectorB[1] - vectorA[1] * vectorB[0]; + + VECCOPY(to, temp); } + /* simple v^T * v product ("outer product") */ /* STATUS: HAS TO BE verified (*should* work) */ -DO_INLINE void mul_fvectorT_fvector(float to[3][3], float vectorA[3], float vectorB[3]) +DO_INLINE void mul_fvectorT_fvector(float to[3][4], float vectorA[3], float vectorB[3]) { mul_fvector_S(to[0], vectorB, vectorA[0]); mul_fvector_S(to[1], vectorB, vectorA[1]); @@ -153,7 +183,7 @@ DO_INLINE void mul_fvectorT_fvector(float to[3][3], float vectorA[3], float vect } /* simple v^T * v product with scalar ("outer product") */ /* STATUS: HAS TO BE verified (*should* work) */ -DO_INLINE void mul_fvectorT_fvectorS(float to[3][3], float vectorA[3], float vectorB[3], float aS) +DO_INLINE void mul_fvectorT_fvectorS(float to[3][4], float vectorA[3], float vectorB[3], float aS) { mul_fvector_S(to[0], vectorB, vectorA[0]* aS); mul_fvector_S(to[1], vectorB, vectorA[1]* aS); @@ -170,7 +200,7 @@ void print_fvector(float m3[3]) // long float vector float (*)[3] /////////////////////////// /* print long vector on console: for debug output */ -DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts) +DO_INLINE void print_lfvector(lfVector *fLongVector, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -186,7 +216,7 @@ DO_INLINE lfVector *create_lfvector(unsigned int verts) // return (lfVector *)cloth_aligned_malloc(&MEMORY_BASE, verts * sizeof(lfVector)); } /* delete long vector */ -DO_INLINE void del_lfvector(float (*fLongVector)[3]) +DO_INLINE void del_lfvector(lfVector *fLongVector) { if (fLongVector != NULL) { @@ -195,12 +225,12 @@ DO_INLINE void del_lfvector(float (*fLongVector)[3]) } } /* copy long vector */ -DO_INLINE void cp_lfvector(float (*to)[3], float (*from)[3], unsigned int verts) +DO_INLINE void cp_lfvector(lfVector *to, lfVector *from, unsigned int verts) { memcpy(to, from, verts * sizeof(lfVector)); } /* init long vector with float[3] */ -DO_INLINE void init_lfvector(float (*fLongVector)[3], float vector[3], unsigned int verts) +DO_INLINE void init_lfvector(lfVector *fLongVector, float vector[3], unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -209,12 +239,12 @@ DO_INLINE void init_lfvector(float (*fLongVector)[3], float vector[3], unsigned } } /* zero long vector with float[3] */ -DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) +DO_INLINE void zero_lfvector(lfVector *to, unsigned int verts) { memset(to, 0.0f, verts * sizeof(lfVector)); } /* multiply long vector with scalar*/ -DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) +DO_INLINE void mul_lfvectorS(lfVector *to, lfVector *fLongVector, float scalar, unsigned int verts) { unsigned int i = 0; @@ -225,7 +255,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scal } /* multiply long vector with scalar*/ /* A -= B * float */ -DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) +DO_INLINE void submul_lfvectorS(lfVector *to, lfVector *fLongVector, float scalar, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -234,12 +264,12 @@ DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float s } } /* dot product for big vector */ -DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) { unsigned int i = 0; float temp = 0.0; // schedule(guided, 2) -#pragma omp parallel for reduction(+: temp) +#pragma omp parallel for reduction(+: temp) schedule(static) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -247,7 +277,7 @@ DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], return temp; } /* A = B + C --> for big vector */ -DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +DO_INLINE void add_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) { unsigned int i = 0; @@ -258,7 +288,7 @@ DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f } /* A = B + C * float --> for big vector */ -DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) +DO_INLINE void add_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; @@ -269,7 +299,7 @@ DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], } } /* A = B * float + C * float --> for big vector */ -DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float aS, float (*fLongVectorB)[3], float bS, unsigned int verts) +DO_INLINE void add_lfvectorS_lfvectorS(lfVector *to, lfVector *fLongVectorA, float aS, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; @@ -279,7 +309,7 @@ DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], } } /* A = B - C * float --> for big vector */ -DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) +DO_INLINE void sub_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -289,7 +319,7 @@ DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], } /* A = B - C --> for big vector */ -DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) +DO_INLINE void sub_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) { unsigned int i = 0; @@ -300,30 +330,32 @@ DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f } /////////////////////////// -// 4x4 matrix +// 3x3 matrix /////////////////////////// -/* printf 4x4 matrix on console: for debug output */ -void print_fmatrix(float m3[3][3]) +/* printf 3x3 matrix on console: for debug output */ +void print_fmatrix(float m3[3][4]) { printf("%f\t%f\t%f\n",m3[0][0],m3[0][1],m3[0][2]); printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]); printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]); } -/* copy 4x4 matrix */ -DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) +/* copy 3x3 matrix */ +DO_INLINE void cp_fmatrix(float to[3][4], float from[3][4]) { - // memcpy(to, from, sizeof (float) * 9); + memcpy(to, from, sizeof (float) * 12); + /* VECCOPY(to[0], from[0]); VECCOPY(to[1], from[1]); VECCOPY(to[2], from[2]); + */ } -/* calculate determinant of 4x4 matrix */ -DO_INLINE float det_fmatrix(float m[3][3]) +/* calculate determinant of 3x3 matrix */ +DO_INLINE float det_fmatrix(float m[3][4]) { return m[0][0]*m[1][1]*m[2][2] + m[1][0]*m[2][1]*m[0][2] + m[0][1]*m[1][2]*m[2][0] -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; } -DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) +DO_INLINE void inverse_fmatrix(float to[3][4], float from[3][4]) { unsigned int i, j; float d; @@ -354,84 +386,110 @@ DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) } -/* 4x4 matrix multiplied by a scalar */ +/* 3x3 matrix multiplied by a scalar */ /* STATUS: verified */ -DO_INLINE void mul_fmatrix_S(float matrix[3][3], float scalar) +DO_INLINE void mul_fmatrix_S(float matrix[3][4], float scalar) { mul_fvector_S(matrix[0], matrix[0],scalar); mul_fvector_S(matrix[1], matrix[1],scalar); mul_fvector_S(matrix[2], matrix[2],scalar); } -/* a vector multiplied by a 4x4 matrix */ +/* a vector multiplied by a 3x3 matrix */ /* STATUS: verified */ -DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][3]) +DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][4]) { - to[0] = matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; - to[1] = matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; - to[2] = matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; + float temp[3]; + + VECCOPY(temp, from); + + to[0] = matrix[0][0]*temp[0] + matrix[1][0]*temp[1] + matrix[2][0]*temp[2]; + to[1] = matrix[0][1]*temp[0] + matrix[1][1]*temp[1] + matrix[2][1]*temp[2]; + to[2] = matrix[0][2]*temp[0] + matrix[1][2]*temp[1] + matrix[2][2]*temp[2]; } -/* 4x4 matrix multiplied by a vector */ +/* 3x3 matrix multiplied by a vector */ /* STATUS: verified */ -DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][3], float *from) +#ifdef SSE3 +DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { + __m128 v1, v2, v3, v4; + + v1 = _mm_load_ps(&matrix[0]); + v2 = _mm_load_ps(&matrix[1]); + v3 = _mm_load_ps(&matrix[2]); + v4 = _mm_load_ps(from); + + // stuff + v1 = _mm_mul_ps(v1, v4); + v2 = _mm_mul_ps(v2, v4); + v3 = _mm_mul_ps(v3, v4); + v1 = _mm_hadd_ps(v1, v2); + v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); + v1 = _mm_hadd_ps(v1, v3); + + _mm_store_ps(to, v4); +} +#else +DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { to[0] = INPR(matrix[0],from); to[1] = INPR(matrix[1],from); to[2] = INPR(matrix[2],from); } -/* 4x4 matrix multiplied by a 4x4 matrix */ +#endif + +/* 3x3 matrix multiplied by a 3x3 matrix */ /* STATUS: verified */ -DO_INLINE void mul_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +DO_INLINE void mul_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { mul_fvector_fmatrix(to[0], matrixA[0],matrixB); mul_fvector_fmatrix(to[1], matrixA[1],matrixB); mul_fvector_fmatrix(to[2], matrixA[2],matrixB); } -/* 4x4 matrix addition with 4x4 matrix */ -DO_INLINE void add_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +/* 3x3 matrix addition with 3x3 matrix */ +DO_INLINE void add_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { VECADD(to[0], matrixA[0], matrixB[0]); VECADD(to[1], matrixA[1], matrixB[1]); VECADD(to[2], matrixA[2], matrixB[2]); } -/* 4x4 matrix add-addition with 4x4 matrix */ -DO_INLINE void addadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +/* 3x3 matrix add-addition with 3x3 matrix */ +DO_INLINE void addadd_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { VECADDADD(to[0], matrixA[0], matrixB[0]); VECADDADD(to[1], matrixA[1], matrixB[1]); VECADDADD(to[2], matrixA[2], matrixB[2]); } -/* 4x4 matrix sub-addition with 4x4 matrix */ -DO_INLINE void addsub_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) +/* 3x3 matrix sub-addition with 3x3 matrix */ +DO_INLINE void addsub_fmatrixS_fmatrixS(float to[3][4], float matrixA[3][4], float aS, float matrixB[3][4], float bS) { VECADDSUBSS(to[0], matrixA[0], aS, matrixB[0], bS); VECADDSUBSS(to[1], matrixA[1], aS, matrixB[1], bS); VECADDSUBSS(to[2], matrixA[2], aS, matrixB[2], bS); } -/* A -= B + C (4x4 matrix sub-addition with 4x4 matrix) */ -DO_INLINE void subadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +/* A -= B + C (3x3 matrix sub-addition with 3x3 matrix) */ +DO_INLINE void subadd_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { VECSUBADD(to[0], matrixA[0], matrixB[0]); VECSUBADD(to[1], matrixA[1], matrixB[1]); VECSUBADD(to[2], matrixA[2], matrixB[2]); } -/* A -= B*x + C*y (4x4 matrix sub-addition with 4x4 matrix) */ -DO_INLINE void subadd_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) +/* A -= B*x + C*y (3x3 matrix sub-addition with 3x3 matrix) */ +DO_INLINE void subadd_fmatrixS_fmatrixS(float to[3][4], float matrixA[3][4], float aS, float matrixB[3][4], float bS) { VECSUBADDSS(to[0], matrixA[0], aS, matrixB[0], bS); VECSUBADDSS(to[1], matrixA[1], aS, matrixB[1], bS); VECSUBADDSS(to[2], matrixA[2], aS, matrixB[2], bS); } -/* A = B - C (4x4 matrix subtraction with 4x4 matrix) */ -DO_INLINE void sub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +/* A = B - C (3x3 matrix subtraction with 3x3 matrix) */ +DO_INLINE void sub_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { VECSUB(to[0], matrixA[0], matrixB[0]); VECSUB(to[1], matrixA[1], matrixB[1]); VECSUB(to[2], matrixA[2], matrixB[2]); } -/* A += B - C (4x4 matrix add-subtraction with 4x4 matrix) */ -DO_INLINE void addsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) +/* A += B - C (3x3 matrix add-subtraction with 3x3 matrix) */ +DO_INLINE void addsub_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) { VECADDSUB(to[0], matrixA[0], matrixB[0]); VECADDSUB(to[1], matrixA[1], matrixB[1]); @@ -440,53 +498,93 @@ DO_INLINE void addsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float ///////////////////////////////////////////////////////////////// // special functions ///////////////////////////////////////////////////////////////// -/* a vector multiplied and added to/by a 4x4 matrix */ +/* a vector multiplied and added to/by a 3x3 matrix */ +/* DO_INLINE void muladd_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) { to[0] += matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; to[1] += matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; to[2] += matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; } -/* 4x4 matrix multiplied and added to/by a 4x4 matrix and added to another 4x4 matrix */ +*/ +/* 3x3 matrix multiplied and added to/by a 3x3 matrix and added to another 3x3 matrix */ +/* DO_INLINE void muladd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { muladd_fvector_fmatrix(to[0], matrixA[0],matrixB); muladd_fvector_fmatrix(to[1], matrixA[1],matrixB); muladd_fvector_fmatrix(to[2], matrixA[2],matrixB); } -/* a vector multiplied and sub'd to/by a 4x4 matrix */ +*/ +/* a vector multiplied and sub'd to/by a 3x3 matrix */ +/* DO_INLINE void mulsub_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) { to[0] -= matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; to[1] -= matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; to[2] -= matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; } -/* 4x4 matrix multiplied and sub'd to/by a 4x4 matrix and added to another 4x4 matrix */ +*/ +/* 3x3 matrix multiplied and sub'd to/by a 3x3 matrix and added to another 3x3 matrix */ +/* DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { mulsub_fvector_fmatrix(to[0], matrixA[0],matrixB); mulsub_fvector_fmatrix(to[1], matrixA[1],matrixB); mulsub_fvector_fmatrix(to[2], matrixA[2],matrixB); } -/* 4x4 matrix multiplied+added by a vector */ +*/ +/* 3x3 matrix multiplied+added by a vector */ /* STATUS: verified */ -DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) -{ - to[0] += INPR(matrix[0],from); - to[1] += INPR(matrix[1],from); - to[2] += INPR(matrix[2],from); + +#ifdef SSE3 +DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) { + __m128 v1, v2, v3, v4; + + v1 = _mm_load_ps(&matrix[0]); + v2 = _mm_load_ps(&matrix[1]); + v3 = _mm_load_ps(&matrix[2]); + v4 = _mm_load_ps(from); + + // stuff + v1 = _mm_mul_ps(v1, v4); + v2 = _mm_mul_ps(v2, v4); + v3 = _mm_mul_ps(v3, v4); + v1 = _mm_hadd_ps(v1, v2); + v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); + v1 = _mm_hadd_ps(v1, v3); + + v4 = _mm_load_ps(to); + v4 = _mm_add_ps(v4,v1); + + _mm_store_ps(to, v4); } -/* 4x4 matrix multiplied+sub'ed by a vector */ +#else +DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) +{ + float temp[3] = { 0,0,0 }; + + temp[0] = INPR(matrix[0],from); + temp[1] = INPR(matrix[1],from); + temp[2] = INPR(matrix[2],from); + + VECADD(to, to, temp); +} +#endif + +/* 3x3 matrix multiplied+sub'ed by a vector */ +/* DO_INLINE void mulsub_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) { to[0] -= INPR(matrix[0],from); to[1] -= INPR(matrix[1],from); to[2] -= INPR(matrix[2],from); } +*/ ///////////////////////////////////////////////////////////////// /////////////////////////// -// SPARSE SYMMETRIC big matrix with 4x4 matrix entries +// SPARSE SYMMETRIC big matrix with 3x3 matrix entries /////////////////////////// /* printf a big matrix on console: for debug output */ void print_bfmatrix(fmatrix3x3 *m3) @@ -523,10 +621,10 @@ DO_INLINE void cp_bfmatrix(fmatrix3x3 *to, fmatrix3x3 *from) } /* init the diagonal of big matrix */ // slow in parallel -DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) +DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][4]) { unsigned int i,j; - float tmatrix[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; + float tmatrix[3][4] = {{0,0,0,0},{0,0,0,0},{0,0,0,0}}; for(i = 0; i < matrix[0].vcount; i++) { @@ -538,7 +636,7 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) } } /* init big matrix */ -DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) +DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][4]) { unsigned int i; @@ -558,45 +656,31 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) } /* SPARSE SYMMETRIC multiply big matrix with long vector*/ /* STATUS: verified */ -DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) +void mul_bfmatrix_lfvector( lfVector *to, fmatrix3x3 *from, lfVector *fLongVector) { unsigned int i = 0; + float *tflongvector; + float temp[4]={0,0,0,0}; + zero_lfvector(to, from[0].vcount); + /* process diagonal elements */ for(i = 0; i < from[0].vcount; i++) { - muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); + mul_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); } /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ // TODO: pragma below is wrong, correct it! // #pragma omp parallel for shared(to,from, fLongVector) private(i) + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { - unsigned int row = from[i].r; - unsigned int column = from[i].c; - - // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - - to[column][0] += INPR(from[i].m[0],fLongVector[row]); - to[column][1] += INPR(from[i].m[1],fLongVector[row]); - to[column][2] += INPR(from[i].m[2],fLongVector[row]); + muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); } -// #pragma omp parallel for shared(to,from, fLongVector) private(i) - for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) - { - unsigned int row = from[i].r; - unsigned int column = from[i].c; - - // muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - - to[row][0] += INPR(from[i].m[0],fLongVector[column]); - to[row][1] += INPR(from[i].m[1],fLongVector[column]); - to[row][2] += INPR(from[i].m[2],fLongVector[column]); - } - - } + /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) { @@ -687,8 +771,8 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo /////////////////////////////////////////////////////////////////// // simulator start /////////////////////////////////////////////////////////////////// -static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}}; -static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; +static float I[3][4] = {{1,0,0,0},{0,1,0,0},{0,0,1,0}}; +static float ZERO[3][4] = {{0,0,0,0},{0,0,0,0},{0,0,0,0}}; typedef struct Implicit_Data { lfVector *X, *V, *Xnew, *Vnew, *F, *B, *dV, *z; @@ -885,31 +969,6 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) } } -// block diagonalizer -void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv, fmatrix3x3 *S, fmatrix3x3 *bigI) -{ - unsigned int i=0; - - // Take only the diagonal blocks of A - for(i=0;istarget && conjgrad_loopcount < conjgrad_looplimit)) { // Mul(q,A,d); // q = A*d; @@ -963,172 +1022,242 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr conjgrad_loopcount++; } + // itend(); + // printf("cg_filtered time: %f\n", (float)itval()); + conjgrad_lasterror = s; del_lfvector(q); del_lfvector(d); del_lfvector(tmp); del_lfvector(r); + // printf("W/O conjgrad_loopcount: %d\n", conjgrad_loopcount); return conjgrad_loopcount(epsilon_sqr*delta0))&& (conjgrad_loopcount++ < conjgrad_looplimit)) -{ -////////////////////////// -// (s) = q = S*A*c -////////////////////////// -// q = A*c; -mul_bfmatrix_lfvector(q, lA, c); -filter(q,S); -////////////////////////// - -////////////////////////// -// alpha = deltanew / (c^T * q) -////////////////////////// -alpha = deltanew/dot_lfvector(c, q, numverts); -////////////////////////// - -//X = X + c*alpha; -add_lfvector_lfvectorS(ldV, ldV, c, alpha, numverts); -//r = r - q*alpha; -sub_lfvector_lfvectorS(r, r, q, alpha, numverts); - -////////////////////////// -// (h) = s = P^-1 * r -////////////////////////// -// s = Pinv * r; -mul_bfmatrix_lfvector(s, Pinv, r); -filter(s,S); -////////////////////////// - -deltaold = deltanew; - -// deltanew = dot(r,s); -deltanew = dot_lfvector(r, s, numverts); - -////////////////////////// -// c = S * (s + (deltanew/deltaold)*c) -////////////////////////// -// c = s + c * (deltanew/deltaold); -add_lfvector_lfvectorS(c, s, c, (deltanew/deltaold), numverts); -filter(c,S); -////////////////////////// - + unsigned int i = 0; + + // Take only the diagonal blocks of A +// #pragma omp parallel for private(i) + for(i = 0; i (conjgrad_epsilon*conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)); + + del_lfvector(s); + del_lfvector(q); + del_lfvector(c); + del_lfvector(r); + del_lfvector(p_fb); + del_lfvector(filterb); + + printf("iterations: %d\n", iterations); + + return iterations (conjgrad_epsilon*conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)) + { + iterations++; + + mul_bfmatrix_lfvector(s, lA, p); + filter(s, S); + + alpha = deltaNew / dot_lfvector(p, s, numverts); + + add_lfvector_lfvectorS(dv, dv, p, alpha, numverts); + + add_lfvector_lfvectorS(r, r, s, -alpha, numverts); + + mul_bfmatrix_lfvector(h, Pinv, r); + + + deltaOld = deltaNew; + + deltaNew = dot_lfvector(r, h, numverts); + + add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts); + filter(p, S); + + } + + del_lfvector(h); + del_lfvector(s); + del_lfvector(p); + del_lfvector(r); + + printf("iterations: %d\n", iterations); + + return iterations (conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)) + { + iterations++; + + mul_bfmatrix_lfvector(s, lA, p); + filter(s, S); + + alpha = deltaNew / dot_lfvector(p, s, numverts); + + add_lfvector_lfvectorS(dv, dv, p, alpha, numverts); + + sub_lfvector_lfvectorS(r, r, s, alpha, numverts); + + mul_bfmatrix_lfvector(h, Pinv, r); + filter(h, S); + + deltaOld = deltaNew; + + deltaNew = dot_lfvector(r, h, numverts); + + add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts); + filter(p, S); + + } + + // itend(); + // printf("cg_filtered_pre time: %f\n", (float)itval()); + + del_lfvector(h); + del_lfvector(s); + del_lfvector(p); + del_lfvector(r); + + // printf("iterations: %d\n", iterations); + + return iterationsrestlen; - float cb = clmd->sim_parms.structural; + float cb = clmd->sim_parms->structural; float nullf[3] = {0,0,0}; float stretch_force[3] = {0,0,0}; float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; - float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; + float nulldfdx[3][4]={ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}}; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1202,8 +1331,8 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, /* if(length>L) { - if((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) - && ((((length-L)*100.0f/L) > clmd->sim_parms.maxspringlen))) // cut spring! + if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! { s->flags |= CSPRING_FLAG_DEACTIVATE; return; @@ -1225,44 +1354,44 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = (clmd->sim_parms.structural*(length-L)); + k = (clmd->sim_parms->structural*(length-L)); mul_fvector_S(stretch_force, dir, k); VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * 0.01 * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * 0.01 * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); // Formula from Ascher / Boxman, Speeding up cloth simulation - if((dt * (k*dt + 2 * clmd->sim_parms.Cdis * 0.01)) > 0.01 ) + // if((dt * (k*dt + 2 * clmd->sim_parms->Cdis * 0.01)) > 0.01 ) { - dfdx_spring_type1(s->dfdx, dir,length,L,clmd->sim_parms.structural); - dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis * 0.01); + dfdx_spring_type1(s->dfdx, dir,length,L,clmd->sim_parms->structural); + dfdv_damp(s->dfdv, dir,clmd->sim_parms->Cdis * 0.01); } - // printf("(dt*k*dt) ): %f, k: %f\n", (dt * (k*dt + 2 * clmd->sim_parms.Cdis * 0.01) ), k); + // printf("(dt*k*dt) ): %f, k: %f\n", (dt * (k*dt + 2 * clmd->sim_parms->Cdis * 0.01) ), k); } } else // calculate force of bending springs { if(length < L) { - // clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + // clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = fbstar(length, L, clmd->sim_parms.bending, cb); + k = fbstar(length, L, clmd->sim_parms->bending, cb); mul_fvector_S(bending_force, dir, k); VECADD(s->f, s->f, bending_force); // DG: My formula to handle bending for the AIMEX scheme // multiply with 1000 because of numerical problems - if( ((k*1000)*dt*dt) < -0.18 ) + // if( ((k*1000)*dt*dt) < -0.18 ) { - dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms.bending, cb); - clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms->bending, cb); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } // printf("(dt*k*dt) ): %f, k: %f\n", (dt*dt*k*-1.0), k); } @@ -1282,7 +1411,7 @@ DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } - else if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) + else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) return 0; sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); @@ -1340,9 +1469,9 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; unsigned int i = 0; - float spring_air = clmd->sim_parms.Cvi * 0.01f; /* viscosity of air scaled in percent */ + float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */ float gravity[3]; - float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; + float tm2[3][4] = {{-spring_air,0,0,0}, {0,-spring_air,0,0},{0,0,-spring_air,0}}; ClothVertex *verts = cloth->verts; MFace *mfaces = cloth->mfaces; float wind_normalized[3]; @@ -1351,7 +1480,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float kd, ks; LinkNode *search = cloth->springs; - VECCOPY(gravity, clmd->sim_parms.gravity); + VECCOPY(gravity, clmd->sim_parms->gravity); mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */ /* set dFdX jacobi matrix to zero */ @@ -1364,7 +1493,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec submul_lfvectorS(lF, lV, spring_air, numverts); /* do goal stuff */ - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { for(i = 0; i < numverts; i++) { @@ -1376,12 +1505,12 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec VECADD(tvect, tvect, cloth->xold[i]); VECSUB(auxvect, tvect, lX[i]); - ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; + ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms->goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); // calulate damping forces generated by goals VECSUB(velgoal, cloth->xold[i], cloth->xconst[i]); - kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB + kd = clmd->sim_parms->goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); } @@ -1418,13 +1547,13 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)){} + // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)){} cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX, dt); search = search->next; } - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE) { if(cloth->numspringssave != cloth->numsprings) { @@ -1444,46 +1573,62 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)) if(!cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX)) break; search = search->next; } - clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } + void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) { unsigned int numverts = dFdV[0].vcount; lfVector *dFdXmV = create_lfvector(numverts); + initdiag_bfmatrix(A, I); - // zero_lfvector(dV, numverts); - + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - itstart(); + cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b + // cg_filtered_pre(dV, A, B, z, S, P, Pinv); - cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ - // cg_filtered_pre(dV, A, B, z, dV, P, Pinv, dt); - - itend(); - // printf("cg_filtered calc time: %f\n", (float)itval()); - - - // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); del_lfvector(dFdXmV); } +/* +// this version solves for the new velocity +void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) +{ + unsigned int numverts = dFdV[0].vcount; + + lfVector *dFdXmV = create_lfvector(numverts); + + initdiag_bfmatrix(A, I); + + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + + mul_bfmatrix_lfvector(dFdXmV, dFdV, lV); + + add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, -dt, numverts); + add_lfvector_lfvector(B, B, lV, numverts); + + cg_filtered_pre(Vnew, A, B, z, S, P, Pinv); + + del_lfvector(dFdXmV); +} +*/ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) { unsigned int i=0; @@ -1491,13 +1636,13 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; unsigned int numverts = cloth->numverts; - float dt = 1.0f / clmd->sim_parms.stepsPerFrame; + float dt = 1.0f / clmd->sim_parms->stepsPerFrame; Implicit_Data *id = cloth->implicit; int result = 0; float force = 0, lastforce = 0; lfVector *dx; - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { for(i = 0; i < numverts; i++) { @@ -1518,7 +1663,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, dt ); // check for sleeping - if(!(clmd->coll_parms.flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) + // if(!(clmd->coll_parms->flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) { simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); @@ -1530,14 +1675,16 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase force = dot_lfvector(dx, dx, numverts); del_lfvector(dx); + /* if((force < 0.00001) && (lastforce >= force)) - clmd->coll_parms.flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; + clmd->coll_parms->flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; else if((lastforce*2 < force)) - clmd->coll_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; + */ + clmd->coll_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; lastforce = force; - if(clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { // collisions // itstart(); @@ -1545,7 +1692,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update verts to current positions for(i = 0; i < numverts; i++) { - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { if(verts [i].goal >= SOFTGOALSNAP) { @@ -1615,7 +1762,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase if(effectors) pdEndEffectors(effectors); } - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { for(i = 0; i < numverts; i++) { @@ -1633,11 +1780,19 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } else { - memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); - memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); + for(i = 0; i < numverts; i++) + { + VECCOPY(cloth->current_xold[i], id->X[i]); + VECCOPY(cloth->x[i], id->X[i]); + } + // memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); + // memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); } - memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); + for(i = 0; i < numverts; i++) + VECCOPY(cloth->v[i], id->V[i]); + + // memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); return 1; } @@ -1645,11 +1800,18 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase void implicit_set_positions (ClothModifierData *clmd) { Cloth *cloth = clmd->clothObject; - unsigned int numverts = cloth->numverts; + unsigned int numverts = cloth->numverts, i = 0; Implicit_Data *id = cloth->implicit; - memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); - memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); + + for(i = 0; i < numverts; i++) + { + VECCOPY(id->X[i], cloth->x[i]); + VECCOPY(id->V[i], cloth->v[i]); + } + + // memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); + // memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); } @@ -1668,7 +1830,7 @@ int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierD cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; - // search = clmd->coll_parms.collision_list; + // search = clmd->coll_parms->collision_list; while(search) { @@ -1711,10 +1873,10 @@ int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierD float vrel_t_pre[3]; float vrel_t[3]; double impulse; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms->friction*0.01, magrelVel); // magtangent = INPR(tangential, tangential); @@ -1790,7 +1952,7 @@ void cloth_collision_static(ClothModifierData *clmd, LinkNode *collision_list) MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0; for(i = 0; i < 4; i++) @@ -1940,7 +2102,7 @@ void collisions_collision_moving_edges(ClothModifierData *clmd, ClothModifierDat MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; @@ -2077,7 +2239,7 @@ void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; @@ -2184,11 +2346,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, CollisionModifierData *collmd = NULL; Cloth *cloth = NULL; Object *ob2 = NULL; - BVH *bvh1 = NULL, *bvh2 = NULL; + BVH *bvh1 = NULL, *bvh2 = NULL, *self_bvh; LinkNode *collision_list = NULL; unsigned int i = 0, j = 0; int collisions = 0, count = 0; - float (*current_x)[3]; + float (*current_x)[4]; if (!(((Cloth *)clmd->clothObject)->tree)) { @@ -2198,14 +2360,15 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, cloth = clmd->clothObject; bvh1 = cloth->tree; + self_bvh = cloth->selftree; //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) - + bvh_update_from_float4(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) +/* // check all collision objects for (base = G.scene->base.first; base; base = base->next) { @@ -2256,12 +2419,84 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); } ////////////////////////////////////////////// +*/ + /* + // fill collision list + collisions += bvh_traverse(self_bvh->root, self_bvh->root, &collision_list); + // call static collision response + + // free collision list + if(collision_list) + { + LinkNode *search = collision_list; + + while(search) + { + float distance = 0; + float mindistance = cloth->selftree->epsilon; + CollisionPair *collpair = (CollisionPair *)search->link; + + // get distance of faces + distance = plNearestPoints( + cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[2]], collpair->pa,collpair->pb,collpair->vector); + + if(distance < mindistance) + { + /////////////////////////////////////////// + // TODO: take velocity of the collision points into account! + /////////////////////////////////////////// + + float correction = mindistance - distance; + float temp[3]; + + VECCOPY(temp, collpair->vector); + Normalize(temp); + VecMulf(temp, -correction*0.5); + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[0]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[0]], temp); + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[1]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[1]], temp); + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[2]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexA[2]], temp); + + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[0]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[0]], temp); + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[1]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[1]], temp); + + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[2]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[2]], cloth->current_x[collpair->point_indexB[2]], temp); + + collisions = 1; + + } + + } + + search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(collision_list,NULL); + + collision_list = NULL; + } + */ // Test on *simple* selfcollisions collisions = 1; count = 0; current_x = cloth->current_x; // needed for openMP - +/* #pragma omp parallel for private(i,j, collisions) shared(current_x) for(count = 0; count < 6; count++) { @@ -2275,7 +2510,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, float length = 0; float mindistance = cloth->selftree->epsilon; - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if((cloth->verts [i].goal >= SOFTGOALSNAP) && (cloth->verts [j].goal >= SOFTGOALSNAP)) @@ -2298,12 +2533,12 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, { float correction = mindistance - length; - if((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal >= SOFTGOALSNAP)) + if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal >= SOFTGOALSNAP)) { VecMulf(temp, -correction); VECADD(current_x[j], current_x[j], temp); } - else if((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [j].goal >= SOFTGOALSNAP)) + else if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [j].goal >= SOFTGOALSNAP)) { VecMulf(temp, correction); VECADD(current_x[i], current_x[i], temp); @@ -2320,12 +2555,8 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } } } - /* - // does not compile with OpenMP - if(!collisions) - break; - */ } + ////////////////////////////////////////////// // SELFCOLLISIONS: update velocities @@ -2335,6 +2566,6 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); } ////////////////////////////////////////////// - +*/ return 1; } diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index e168d3a9954..234a6b75548 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -751,6 +751,58 @@ BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], return bvh_build(bvh, mfaces, numfaces); } +BVH *bvh_build_from_float4 (MFace *mfaces, unsigned int numfaces, float (*x)[4], unsigned int numverts, float epsilon) +{ + BVH *bvh=NULL; + CollisionTree *tree=NULL; + unsigned int i = 0; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + bvh->tree = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = numfaces; + bvh->mfaces = mfaces; + + // we have no faces, we save seperate points + if(!mfaces) + { + bvh->numfaces = numverts; + } + + bvh->numverts = numverts; + bvh->xnew = (MVert *)MEM_callocN(sizeof(MVert)*numverts, "BVH MVert"); + + for(i = 0; i < numverts; i++) + { + VECCOPY(bvh->xnew[i].co, x[i]); + } + + bvh->x = MEM_dupallocN(bvh->xnew); + + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); + + if (tree == NULL) + { + printf("bvh_build: Out of memory for nodes.\n"); + bvh_free(bvh); + return NULL; + } + + BLI_linklist_append(&bvh->tree, tree); + + return bvh_build(bvh, mfaces, numfaces); +} + // bvh_overlap - is it possbile for 2 bv's to collide ? int bvh_overlap(float *bv1, float *bv2) { @@ -789,23 +841,80 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // Check if this node in the second tree a leaf if (tree2->isleaf) { + ////////////////////////////////// + // TODO: check for 3rd point if zero (triangle)!!! + ////////////////////////////////// + CollisionPair *collpair = NULL; if(tree1 != tree2) // do not collide same points { + //////////////////////////////////////// + // FIRST FACE + //////////////////////////////////////// + // save potential colliding triangles collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); VECCOPY(collpair->point_indexA, tree1->point_index); - collpair->point_indexA[3] = tree1->point_index[3]; - VECCOPY(collpair->point_indexB, tree2->point_index); - collpair->point_indexB[3] = tree2->point_index[3]; // we use prepend because lots of insertions at end // of list are horrible slow! BLI_linklist_prepend(&collision_list[0], collpair); + //////////////////////////////////////// + // SECOND FACE + //////////////////////////////////////// + if(tree1->point_index[3]) // check for quad face + { + // save potential colliding triangles + collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); + + VECCOPY(collpair->point_indexA, tree1->point_index); + collpair->point_indexA[2] = tree1->point_index[3]; + + VECCOPY(collpair->point_indexB, tree2->point_index); + + // we use prepend because lots of insertions at end + // of list are horrible slow! + BLI_linklist_prepend(&collision_list[0], collpair); + } + //////////////////////////////////////// + // THIRD FACE + //////////////////////////////////////// + if(tree2->point_index[3]) // check for quad face + { + // save potential colliding triangles + collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); + + VECCOPY(collpair->point_indexA, tree1->point_index); + + VECCOPY(collpair->point_indexB, tree2->point_index); + collpair->point_indexB[2] = tree2->point_index[3]; + + // we use prepend because lots of insertions at end + // of list are horrible slow! + BLI_linklist_prepend(&collision_list[0], collpair); + } + //////////////////////////////////////// + // FOURTH FACE + //////////////////////////////////////// + if(tree1->point_index[3] && tree1->point_index[3]) // check for quad face + { + // save potential colliding triangles + collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); + + VECCOPY(collpair->point_indexA, tree1->point_index); + collpair->point_indexA[2] = tree1->point_index[3]; + + VECCOPY(collpair->point_indexB, tree2->point_index); + collpair->point_indexB[2] = tree2->point_index[3]; + + // we use prepend because lots of insertions at end + // of list are horrible slow! + BLI_linklist_prepend(&collision_list[0], collpair); + } return 1; } else @@ -965,3 +1074,29 @@ void bvh_update_from_float3(BVH * bvh, float (*x)[3], unsigned int numverts, flo bvh_update(bvh, moving); } + +void bvh_update_from_float4(BVH * bvh, float (*x)[4], unsigned int numverts, float (*xnew)[4], int moving) +{ + unsigned int i = 0; + + if(!bvh) + return; + + if(numverts!=bvh->numverts) + return; + + if(x) + { + for(i = 0; i < numverts; i++) + VECCOPY(bvh->x[i].co, x[i]); + } + + if(xnew) + { + for(i = 0; i < numverts; i++) + VECCOPY(bvh->xnew[i].co, xnew[i]); + } + + bvh_update(bvh, moving); +} + diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 531cd78b3b2..f599edf52d9 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4865,6 +4865,12 @@ static void softbodyModifier_deformVerts( static void clothModifier_initData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; + + clmd->sim_parms = MEM_callocN(sizeof(SimulationSettings), + "cloth sim parms"); + clmd->coll_parms = MEM_callocN(sizeof(CollisionSettings), + "cloth coll parms"); + cloth_init (clmd); } /* @@ -4942,8 +4948,8 @@ CustomDataMask clothModifier_requiredDataMask(ModifierData *md) CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - if (clmd->sim_parms.vgroup_mass > 0) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if (clmd->sim_parms->vgroup_mass > 0) dataMask |= (1 << CD_MDEFORMVERT); return dataMask; @@ -4961,8 +4967,12 @@ static void clothModifier_freeData(ModifierData *md) if (clmd) { - clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; + + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; cloth_free_modifier (clmd); + + MEM_freeN(clmd->sim_parms); + MEM_freeN(clmd->coll_parms); } } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8ee70d4efd2..afe342d8665 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2885,13 +2885,10 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) ClothModifierData *clmd = (ClothModifierData*) md; clmd->clothObject = NULL; - clmd->sim_parms.cache = NULL; - - if (clmd->sim_parms.cache) { - // TODO - // clmd->cache = newdataadr (fd, clmd->cache); - printf ("direct_link_modifiers: read cloth baked_data.\n"); - } + + clmd->sim_parms= newdataadr(fd, clmd->sim_parms); + clmd->coll_parms= newdataadr(fd, clmd->coll_parms); + } else if (md->type==eModifierType_Collision) { CollisionModifierData *collmd = (CollisionModifierData*) md; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 1887f95e1da..64849affdbf 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -771,23 +771,6 @@ static void write_constraint_channels(WriteData *wd, ListBase *chanbase) } -/* -// TODO: finish this -static void write_cloth_cache(WriteData *wd, LinkNode *ln) -{ - - while(ln) { - writestruct(wd, DATA, "cloth_cache", 1, ln); - writestruct(wd, DATA, "cloth_cache_frame", 1, ln->link); - writestruct(wd, DATA, "cloth_cache_frame_verts", 1, ln->link); - writestruct(wd, DATA, "cloth_cache_frame_springs", 1, ln->link); - } - - ln = ln->next; - } -} -*/ - static void write_modifiers(WriteData *wd, ListBase *modbase) { ModifierData *md; @@ -803,28 +786,15 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) HookModifierData *hmd = (HookModifierData*) md; writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar); - } - else if (md->type==eModifierType_Cloth) { - int n; - ClothModifierData *clmd = (ClothModifierData *) md; - - if (clmd->sim_parms.cache) { - // Compute the number of vertices we're saving. - // TODO - // write_cloth_cache(); - /* - // old code - n = (clmd->sim_parms.bake_end_frame - clmd->sim_parms.bake_start_frame + 1) * - clmd->sim_parms.bake_num_verts; - writedata (wd, DATA, n * sizeof (clmd->baked_data [0]), clmd->baked_data); - printf ("write_modifiers: wrote %d elements of size %d for cloth baked data.\n", - n, sizeof (clmd->baked_data [0])); - */ - } } + else if(md->type==eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData*) md; + writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms); + writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms); + } else if (md->type==eModifierType_MeshDeform) { MeshDeformModifierData *mmd = (MeshDeformModifierData*) md; - + writedata(wd, DATA, sizeof(float)*mmd->totvert*mmd->totcagevert, mmd->bindweights); writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert, diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 2441c8b721f..4d8fbf1a6fc 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -32,55 +32,7 @@ #ifndef DNA_CLOTH_TYPES_H #define DNA_CLOTH_TYPES_H -#include "DNA_listBase.h" - - -/** -* Pin and unpin frames are the frames on which the vertices stop moving. -* They will assume the position they had prior to pinFrame until unpinFrame -* is reached. -*/ -typedef struct ClothVertex -{ - int flags; /* General flags per vertex. */ - float mass; /* mass / weight of the vertex */ - float goal; /* goal, from SB */ - float impulse[3]; /* used in collision.c */ - unsigned int impulse_count; /* same as above */ -} ClothVertex; - - -/** -* The definition of a spring. -*/ -typedef struct ClothSpring -{ - int ij; /* Pij from the paper, one end of the spring. */ - int kl; /* Pkl from the paper, one end of the spring. */ - float restlen; /* The original length of the spring. */ - int matrix_index; /* needed for implicit solver (fast lookup) */ - int type; /* types defined in BKE_cloth.h ("springType") */ - int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ - float dfdx[3][3]; - float dfdv[3][3]; - float f[3]; -} ClothSpring; - - - -/** -* This struct contains all the global data required to run a simulation. -* At the time of this writing, this structure contains data appropriate -* to run a simulation as described in Deformation Constraints in a -* Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. -* -* I've tried to keep similar, if not exact names for the variables as -* are presented in the paper. Where I've changed the concept slightly, -* as in stepsPerFrame comapred to the time step in the paper, I've used -* variables with different names to minimize confusion. -**/ -typedef struct SimulationSettings -{ +typedef struct SimulationSettings { short vgroup_mass; /* optional vertexgroup name for assigning weight. */ short pad; float mingoal; /* see SB */ @@ -103,7 +55,6 @@ typedef struct SimulationSettings float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ float sim_time_old; - struct LinkNode *cache; float defgoal; float goalfrict; float goalspring; @@ -112,9 +63,7 @@ typedef struct SimulationSettings int firstframe; /* frame on which simulation starts */ } SimulationSettings; - -typedef struct CollisionSettings -{ +typedef struct CollisionSettings { float epsilon; /* The radius of a particle in the cloth. */ float self_friction; /* Fiction/damping with self contact. */ float friction; /* Friction/damping applied on contact with other object.*/ @@ -125,40 +74,4 @@ typedef struct CollisionSettings } CollisionSettings; -/** -* This structure describes a cloth object against which the -* simulation can run. -* -* The m and n members of this structure represent the assumed -* rectangular ordered grid for which the original paper is written. -* At some point they need to disappear and we need to determine out -* own connectivity of the mesh based on the actual edges in the mesh. -* -**/ -typedef struct Cloth -{ - struct ClothVertex *verts; /* The vertices that represent this cloth. */ - struct LinkNode *springs; /* The springs connecting the mesh. */ - unsigned int numverts; /* The number of verts == m * n. */ - unsigned int numsprings; /* The count of springs. */ - unsigned int numfaces; - unsigned char old_solver_type; - unsigned char pad2; - short pad3; - struct BVH *tree; /* collision tree for this cloth object */ - struct BVH *selftree; /* self collision tree for this cloth object */ - struct MFace *mfaces; - struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ - float (*x)[3]; /* The current position of all vertices.*/ - float (*xold)[3]; /* The previous position of all vertices.*/ - float (*current_x)[3]; /* The TEMPORARY current position of all vertices.*/ - float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ - float (*v)[3]; /* the current velocity of all vertices */ - float (*current_v)[3]; - float (*xconst)[3]; - struct EdgeHash *edgehash; /* used for fast checking adjacent points */ - unsigned int numothersprings; - unsigned int numspringssave; -} Cloth; - #endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index ea7e67ddac4..48069f2d7b7 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -9,8 +9,6 @@ /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ -#include "DNA_cloth_types.h" - typedef enum ModifierType { eModifierType_None = 0, eModifierType_Subsurf, @@ -343,10 +341,10 @@ typedef struct SoftbodyModifierData { typedef struct ClothModifierData { ModifierData modifier; - - struct Cloth *clothObject; /* The internal data structure for cloth. */ - SimulationSettings sim_parms; /* definition is in DNA_cloth_types.h */ - CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ + + struct Cloth *clothObject; /* The internal data structure for cloth. */ + struct SimulationSettings *sim_parms; /* definition is in DNA_cloth_types.h */ + struct CollisionSettings *coll_parms; /* definition is in DNA_cloth_types.h */ } ClothModifierData; typedef struct CollisionModifierData { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 2d5b54ac1c2..3adc2862a94 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2208,7 +2208,8 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if(clmd->sim_parms.cache) + /* + if(clmd->sim_parms->cache) { CFRA= 1; update_for_newframe_muted(); @@ -2216,6 +2217,7 @@ void do_object_panels(unsigned short event) allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } + */ } } break; @@ -2224,7 +2226,7 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - clmd->sim_parms.vgroup_mass = 0; + clmd->sim_parms->vgroup_mass = 0; do_object_panels(B_CLOTH_RENEW); } @@ -3158,9 +3160,9 @@ static void object_panel_cloth(Object *ob) if(clmd) { - // but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + // but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; int defCount; @@ -3169,18 +3171,18 @@ static void object_panel_cloth(Object *ob) val2=0; - // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Enable advanced mode"); + // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Enable advanced mode"); /* GENERAL STUFF */ uiClearButLock(); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 3.0, 10.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms->structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms->bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms->stepsPerFrame, 3.0, 10.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); - uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms->Cdis, 0.0, 10.0, 10, 0, "Spring damping"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms->Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); uiClearButLock(); @@ -3189,15 +3191,15 @@ static void object_panel_cloth(Object *ob) uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); // uiClearButLock(); - uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms->gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms->gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms->gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(ob->type==OB_MESH) { @@ -3212,17 +3214,17 @@ static void object_panel_cloth(Object *ob) defCount = BLI_countlist (&ob->defbase); if (defCount == 0) { - clmd->sim_parms.vgroup_mass = 0; + clmd->sim_parms->vgroup_mass = 0; } sprintf (clvg2, "%s%s", clmvg, clvg1); - uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (clvg1); MEM_freeN (clvg2); - if(clmd->sim_parms.vgroup_mass) + if(clmd->sim_parms->vgroup_mass) { - bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms.vgroup_mass-1); + bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms->vgroup_mass-1); if(defGroup) uiDefBut(block, BUT, B_DIFF, defGroup->name, 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Name of current vertex group"); else @@ -3232,30 +3234,30 @@ static void object_panel_cloth(Object *ob) } else - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } else { - uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict, 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms->goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms->goalfrict, 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms->mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms->maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); } uiBlockEndAlign(block); /* // no tearing supported anymore since modifier stack restrictions uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + if (clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) { - uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); + uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms->maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); } uiBlockEndAlign(block); @@ -3275,7 +3277,7 @@ static void object_panel_cloth_II(Object *ob) clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) + if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; char str[128]; @@ -3286,18 +3288,18 @@ static void object_panel_cloth_II(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); - - if(clmd->sim_parms.cache) + uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); + /* + if(clmd->sim_parms->cache) { - int length = BLI_linklist_length(clmd->sim_parms.cache); + int length = BLI_linklist_length(clmd->sim_parms->cache); - /* correct spelling if only 1 frame cacheed --> only gimmick */ - if(length-clmd->sim_parms.preroll>1) - sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); + // correct spelling if only 1 frame cacheed --> only gimmick + if(length-clmd->sim_parms->preroll>1) + sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); else - sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); + sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); uiDefBut(block, LABEL, 0, str, 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, "Clear cache:", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); @@ -3305,15 +3307,15 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); if(length>1) // B_CLOTH_CHANGEPREROLL - uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms->preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); else uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); } - else + else { uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); - } - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + }*/ + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); uiBlockEndAlign(block); } } @@ -3335,13 +3337,13 @@ static void object_panel_cloth_III(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,160,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); - if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,160,130,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,140,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,140,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); uiDefBut(block, LABEL, 0, "",160,140,150,20, NULL, 0.0, 0, 0, 0, ""); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Selfcoll balls:", 10,120,150,20, &clmd->coll_parms.selfepsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between two selfcollision points"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Selfcoll balls:", 10,120,150,20, &clmd->coll_parms->selfepsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between two selfcollision points"); } else uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); From 14de7f4a2b70c4c1d159542b73dc01fac48261f8 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 19 Nov 2007 00:01:33 +0000 Subject: [PATCH 052/430] fixed sse copy-paste glitch + #define __SSE3__ thanks to Lynx3d --- source/blender/blenkernel/intern/cloth.c | 4 +- source/blender/blenkernel/intern/implicit.c | 157 ++------------------ 2 files changed, 15 insertions(+), 146 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index ea3c8dec0c0..b0a45b6e720 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -567,6 +567,8 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) { + cloth_clear_cache(ob, clmd, 0); + if(!cloth_from_object (ob, clmd, result, dm, framenr)) return result; @@ -756,7 +758,7 @@ static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *cl for (i = 0; i < numverts; i++) { VECCOPY (mvert[i].co, cloth->x[i]); - Mat4MulVecfl (ob->imat, mvert[i].co); /* softbody is in global coords */ + Mat4MulVecfl (ob->imat, mvert[i].co); /* cloth is in global coords */ } } } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index c457064065c..eab5e992abe 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -410,14 +410,15 @@ DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][4]) /* 3x3 matrix multiplied by a vector */ /* STATUS: verified */ -#ifdef SSE3 +#ifdef __SSE3__ DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { + float temp[4]; __m128 v1, v2, v3, v4; - v1 = _mm_load_ps(&matrix[0]); - v2 = _mm_load_ps(&matrix[1]); - v3 = _mm_load_ps(&matrix[2]); - v4 = _mm_load_ps(from); + v1 = _mm_loadu_ps(&matrix[0][0]); + v2 = _mm_loadu_ps(&matrix[1][0]); + v3 = _mm_loadu_ps(&matrix[2][0]); + v4 = _mm_loadu_ps(from); // stuff v1 = _mm_mul_ps(v1, v4); @@ -425,9 +426,9 @@ DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { v3 = _mm_mul_ps(v3, v4); v1 = _mm_hadd_ps(v1, v2); v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); - v1 = _mm_hadd_ps(v1, v3); + v4 = _mm_hadd_ps(v1, v3); - _mm_store_ps(to, v4); + _mm_storeu_ps(to, v4); } #else DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) @@ -537,7 +538,7 @@ DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float /* 3x3 matrix multiplied+added by a vector */ /* STATUS: verified */ -#ifdef SSE3 +#ifdef __SSE3__ DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) { __m128 v1, v2, v3, v4; @@ -1053,141 +1054,7 @@ DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv) } } -/* -// 1.0 working PCG, but slow and unstable for bigger epsilon + strong forces -int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S, fmatrix3x3 *P, fmatrix3x3 *Pinv) -{ - unsigned int numverts = lA[0].vcount, iterations = 0, conjgrad_looplimit=100; - float delta0 = 0, deltaNew = 0, deltaOld = 0, alpha = 0; - float conjgrad_epsilon=0.01f, conjgrad_lasterror=0; - lfVector *filterb = create_lfvector(numverts); - lfVector *p_fb = create_lfvector(numverts); - lfVector *r = create_lfvector(numverts); - lfVector *c = create_lfvector(numverts); - lfVector *q = create_lfvector(numverts); - lfVector *s = create_lfvector(numverts); - - BuildPPinv(lA, P, Pinv); - - cp_lfvector(dv, z, numverts); - cp_lfvector(filterb, lB, numverts); - filter(filterb, S); - mul_bfmatrix_lfvector(p_fb, P, filterb); - delta0 = dot_lfvector(filterb, p_fb, numverts); - - mul_bfmatrix_lfvector(r, lA, dv); - mul_lfvectorS(r, r, -1.0, numverts); - add_lfvector_lfvector(r, r, lB, numverts); - filter(r, S); - - mul_bfmatrix_lfvector(c, Pinv, r); - filter(c, S); - - deltaNew = dot_lfvector(r, c, numverts); - - do - { - iterations++; - - mul_bfmatrix_lfvector(q, lA, c); - filter(q, S); - - alpha = deltaNew / dot_lfvector(c, q, numverts); - - add_lfvector_lfvectorS(dv, dv, c, alpha, numverts); - - add_lfvector_lfvectorS(r, r, q, -alpha, numverts); - - mul_bfmatrix_lfvector(s, Pinv, r); - - - deltaOld = deltaNew; - - deltaNew = dot_lfvector(r, s, numverts); - - add_lfvector_lfvectorS(s, s, c, deltaNew / deltaOld, numverts); - filter(s, S); - - cp_lfvector(c, s, numverts); - } while ((deltaNew > (conjgrad_epsilon*conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)); - - del_lfvector(s); - del_lfvector(q); - del_lfvector(c); - del_lfvector(r); - del_lfvector(p_fb); - del_lfvector(filterb); - - printf("iterations: %d\n", iterations); - - return iterations (conjgrad_epsilon*conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)) - { - iterations++; - - mul_bfmatrix_lfvector(s, lA, p); - filter(s, S); - - alpha = deltaNew / dot_lfvector(p, s, numverts); - - add_lfvector_lfvectorS(dv, dv, p, alpha, numverts); - - add_lfvector_lfvectorS(r, r, s, -alpha, numverts); - - mul_bfmatrix_lfvector(h, Pinv, r); - - - deltaOld = deltaNew; - - deltaNew = dot_lfvector(r, h, numverts); - - add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts); - filter(p, S); - - } - - del_lfvector(h); - del_lfvector(s); - del_lfvector(p); - del_lfvector(r); - - printf("iterations: %d\n", iterations); - - return iterations Date: Mon, 19 Nov 2007 00:27:25 +0000 Subject: [PATCH 053/430] #ifdef sse headers --- source/blender/blenkernel/intern/implicit.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index eab5e992abe..f562bd49fcc 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -65,9 +65,11 @@ #include "Bullet-C-Api.h" +#ifdef __SSE3__ #include #include #include +#endif #ifdef _WIN32 #include @@ -412,13 +414,12 @@ DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][4]) /* STATUS: verified */ #ifdef __SSE3__ DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { - float temp[4]; __m128 v1, v2, v3, v4; - v1 = _mm_loadu_ps(&matrix[0][0]); - v2 = _mm_loadu_ps(&matrix[1][0]); - v3 = _mm_loadu_ps(&matrix[2][0]); - v4 = _mm_loadu_ps(from); + v1 = _mm_load_ps(&matrix[0][0]); + v2 = _mm_load_ps(&matrix[1][0]); + v3 = _mm_load_ps(&matrix[2][0]); + v4 = _mm_load_ps(from); // stuff v1 = _mm_mul_ps(v1, v4); @@ -428,7 +429,7 @@ DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); v4 = _mm_hadd_ps(v1, v3); - _mm_storeu_ps(to, v4); + _mm_store_ps(to, v4); } #else DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) @@ -542,9 +543,9 @@ DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) { __m128 v1, v2, v3, v4; - v1 = _mm_load_ps(&matrix[0]); - v2 = _mm_load_ps(&matrix[1]); - v3 = _mm_load_ps(&matrix[2]); + v1 = _mm_load_ps(&matrix[0][0]); + v2 = _mm_load_ps(&matrix[1][0]); + v3 = _mm_load_ps(&matrix[2][0]); v4 = _mm_load_ps(from); // stuff From f28ab5de21b028a5726dc7e3975fd1a523287e37 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 19 Nov 2007 23:45:26 +0000 Subject: [PATCH 054/430] Bugfix: scaling/rotation/translation works again --- source/blender/blenkernel/intern/cloth.c | 23 ++++++++++----------- source/blender/blenkernel/intern/implicit.c | 13 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index b0a45b6e720..d0ab7ce4ffb 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -862,13 +862,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d /* create springs */ clmd->clothObject->springs = NULL; clmd->clothObject->numsprings = -1; - - if (!cloth_build_springs (clmd->clothObject, dm) ) - { - modifier_setError (&(clmd->modifier), "Can't build springs."); - return 0; - } - + /* set initial values */ for (i = 0; i < numverts; ++i) { @@ -889,6 +883,12 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->verts [i].impulse_count = 0; VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); } + + if (!cloth_build_springs (clmd->clothObject, dm) ) + { + modifier_setError (&(clmd->modifier), "Can't build springs."); + return 0; + } /* apply / set vertex groups */ if (clmd->sim_parms->vgroup_mass > 0) @@ -1044,7 +1044,6 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) unsigned int numverts = dm->getNumVerts ( dm ); unsigned int numedges = dm->getNumEdges ( dm ); unsigned int numfaces = dm->getNumFaces ( dm ); - MVert *mvert = CDDM_get_verts ( dm ); MEdge *medge = CDDM_get_edges ( dm ); MFace *mface = CDDM_get_faces ( dm ); unsigned int index2 = 0; // our second vertex index @@ -1081,7 +1080,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { spring->ij = medge[i].v1; spring->kl = medge[i].v2; - VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; @@ -1102,7 +1101,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = mface[i].v1; spring->kl = mface[i].v3; - VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; @@ -1119,7 +1118,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = mface[i].v2; spring->kl = mface[i].v4; - VECSUB ( temp, mvert[spring->kl].co, mvert[spring->ij].co ); + VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; @@ -1156,7 +1155,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = tspring2->ij; spring->kl = index2; - VECSUB ( temp, mvert[index2].co, mvert[tspring2->ij].co ); + VECSUB ( temp, cloth->x[index2], cloth->x[tspring2->ij] ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_BENDING; BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index f562bd49fcc..21f1d7d0c1c 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1233,6 +1233,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, VECADD(s->f, s->f, damping_force); // Formula from Ascher / Boxman, Speeding up cloth simulation + // couldn't see any speedup // if((dt * (k*dt + 2 * clmd->sim_parms->Cdis * 0.01)) > 0.01 ) { dfdx_spring_type1(s->dfdx, dir,length,L,clmd->sim_parms->structural); @@ -1256,12 +1257,12 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, // DG: My formula to handle bending for the AIMEX scheme // multiply with 1000 because of numerical problems - // if( ((k*1000)*dt*dt) < -0.18 ) + if( ((k*1000.0)*dt*dt) < -0.18 ) { dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms->bending, cb); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } - // printf("(dt*k*dt) ): %f, k: %f\n", (dt*dt*k*-1.0), k); + // printf("(dt*k*dt) ): %f, k: %f\n", (dt*dt*(1000.0*k)), k); } } } @@ -1279,8 +1280,8 @@ DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } - else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) - return 0; + // else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) + // return 0; sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); @@ -1466,8 +1467,8 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - // cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b - cg_filtered_pre(dV, A, B, z, S, P, Pinv); + cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b + // cg_filtered_pre(dV, A, B, z, S, P, Pinv); // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); From 4cb5470f82bf6139418ef0530407ff21aa3f2272 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 21 Nov 2007 08:13:00 +0000 Subject: [PATCH 055/430] WIP commit to be able to revert later (known bug: unstable without sse enabled - weird) --- source/blender/blenkernel/intern/implicit.c | 188 ++++++++++++++++---- 1 file changed, 157 insertions(+), 31 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 21f1d7d0c1c..3f3b3a66253 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -271,7 +271,7 @@ DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, uns unsigned int i = 0; float temp = 0.0; // schedule(guided, 2) -#pragma omp parallel for reduction(+: temp) schedule(static) +#pragma omp parallel for reduction(+: temp) private(i) schedule(static) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -287,8 +287,34 @@ DO_INLINE void add_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVec { VECADD(to[i], fLongVectorA[i], fLongVectorB[i]); } - } +/* +#ifdef __SSE3__ +DO_INLINE void add_lfvector(lfVector *to, lfVector *fLongVectorA, unsigned int verts) { + __m128 v1, v2; + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + v1 = _mm_load_ps(to[i]); + v2 = _mm_load_ps(fLongVectorA[i]); + + v1 = _mm_add_ps(v1, v2); + + _mm_store_ps(to[i], v1); + } +} +#else */ +DO_INLINE void add_lfvector(lfVector *to, lfVector *fLongVectorA, unsigned int verts) { + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECADD(to[i], to[i], fLongVectorA[i]); + } +} +// #endif + /* A = B + C * float --> for big vector */ DO_INLINE void add_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) { @@ -300,6 +326,76 @@ DO_INLINE void add_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVe } } + +/* A = A + B * float --> for big vector */ +// tested +/* +#ifdef __SSE3__ +DO_INLINE void add_lfvectorS(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { + __m128 v1, v2, v3; + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + v1 = _mm_load_ps(to[i]); + v2 = _mm_load_ps(fLongVectorA[i]); + v3 = _mm_set1_ps(bS); + + v2 = _mm_mul_ps(v2, v3); + v1 = _mm_add_ps(v1, v2); + + _mm_store_ps(to[i], v1); + } +} +#else */ +DO_INLINE void add_lfvectorS(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { + unsigned int i = 0; + + for(i = 0; i < verts; i++) + { + VECADDS(to[i], to[i], fLongVectorA[i], bS); + } +} +// #endif + + +// tested +/* +#ifdef __SSE3__ +DO_INLINE float add_lfvectorS_dot(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { + register __m128 v1, v2, v3, v4; + unsigned int i = 0; + float temp; + + v4 = _mm_setzero_ps(); +// #pragma omp parallel for reduction(+: v4) private(i, v1, v2, v3) schedule(static) + for(i = 0; i < verts; i++) + { + v1 = _mm_load_ps(to[i]); + v2 = _mm_load_ps(fLongVectorA[i]); + v3 = _mm_set1_ps(bS); + + v2 = _mm_mul_ps(v2, v3); + v1 = _mm_add_ps(v1, v2); + + _mm_stream_ps(to[i], v1); + + v4 = _mm_add_ps(v4, _mm_mul_ps(v1,v1)); + } + + v4 = _mm_hadd_ps(v4, v4); + v4 = _mm_hadd_ps(v4, v4); + _mm_store_ss(&temp, v4); + + return temp; +} +#else */ +DO_INLINE float add_lfvectorS_dot(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { + add_lfvectorS(to, fLongVectorA, bS, verts); + return dot_lfvector(to, to, verts); +} +// #endif + /* A = B * float + C * float --> for big vector */ DO_INLINE void add_lfvectorS_lfvectorS(lfVector *to, lfVector *fLongVectorA, float aS, lfVector *fLongVectorB, float bS, unsigned int verts) { @@ -412,8 +508,9 @@ DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][4]) /* 3x3 matrix multiplied by a vector */ /* STATUS: verified */ +/* #ifdef __SSE3__ -DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { +DO_INLINE void mul_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { __m128 v1, v2, v3, v4; v1 = _mm_load_ps(&matrix[0][0]); @@ -431,14 +528,18 @@ DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) { _mm_store_ps(to, v4); } -#else -DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][4], float *from) +#else */ +DO_INLINE void mul_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { - to[0] = INPR(matrix[0],from); - to[1] = INPR(matrix[1],from); - to[2] = INPR(matrix[2],from); + float temp[3] = {0,0,0}; + + temp[0] = INPR(matrix[0],from); + temp[1] = INPR(matrix[1],from); + temp[2] = INPR(matrix[2],from); + + VECCOPY(to, temp); } -#endif +// #endif /* 3x3 matrix multiplied by a 3x3 matrix */ /* STATUS: verified */ @@ -538,9 +639,9 @@ DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float */ /* 3x3 matrix multiplied+added by a vector */ /* STATUS: verified */ - +/* #ifdef __SSE3__ -DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) { +DO_INLINE void muladd_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { __m128 v1, v2, v3, v4; v1 = _mm_load_ps(&matrix[0][0]); @@ -561,8 +662,8 @@ DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float fro _mm_store_ps(to, v4); } -#else -DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float from[3]) +#else */ +DO_INLINE void muladd_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { float temp[3] = { 0,0,0 }; @@ -572,7 +673,7 @@ DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][4], float fro VECADD(to, to, temp); } -#endif +// #endif /* 3x3 matrix multiplied+sub'ed by a vector */ /* @@ -660,27 +761,51 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* STATUS: verified */ void mul_bfmatrix_lfvector( lfVector *to, fmatrix3x3 *from, lfVector *fLongVector) { - unsigned int i = 0; - float *tflongvector; + unsigned int i = 0, numverts = from[0].vcount; + // lfVector *tflongvector = create_lfvector(numverts); float temp[4]={0,0,0,0}; - zero_lfvector(to, from[0].vcount); + zero_lfvector(to, numverts); + /* +#pragma omp parallel sections private(i) +{ +#pragma omp section + { + for(i = numverts; i < numverts+from[0].scount; i++) + { + muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + + } + } +#pragma omp section + { + for(i = 0; i < numverts+from[0].scount; i++) + { + muladd_fmatrix_fvector(tflongvector[from[i].r], from[i].m, fLongVector[from[i].c]); + } + } +} + add_lfvector(to, tflongvector, numverts); + + del_lfvector(tflongvector); + */ + // alternative NON OpenMP code /* process diagonal elements */ + for(i = 0; i < from[0].vcount; i++) { mul_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); } - + /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ - // TODO: pragma below is wrong, correct it! -// #pragma omp parallel for shared(to,from, fLongVector) private(i) for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) { muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); } + } /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ @@ -860,7 +985,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) return 1; } -int implicit_free (ClothModifierData *clmd) +int implicit_free (ClothModifierData *clmd) { Implicit_Data *id; Cloth *cloth; @@ -1010,12 +1135,13 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr // X = X + d*a; add_lfvector_lfvectorS(ldV, ldV, d, a, numverts); + + s_prev = s; // r = r - q*a; - sub_lfvector_lfvectorS(r, r, q, a, numverts); - - s_prev = s; + add_lfvector_lfvectorS(r, r, q, -a, numverts); s = dot_lfvector(r, r, numverts); + // s = add_lfvectorS_dot(r, q, -a, numverts); //d = r+d*(s/s_prev); add_lfvector_lfvectorS(d, r, d, (s/s_prev), numverts); @@ -1069,7 +1195,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma BuildPPinv(lA, P, Pinv); filter(dv, S); - add_lfvector_lfvector(dv, dv, z, numverts); + add_lfvector(dv, z, numverts); mul_bfmatrix_lfvector(r, lA, dv); sub_lfvector_lfvector(r, lB, r, numverts); @@ -1091,9 +1217,9 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma alpha = deltaNew / dot_lfvector(p, s, numverts); - add_lfvector_lfvectorS(dv, dv, p, alpha, numverts); + add_lfvectorS(dv, p, alpha, numverts); - sub_lfvector_lfvectorS(r, r, s, alpha, numverts); + add_lfvectorS(r, s, -alpha, numverts); mul_bfmatrix_lfvector(h, Pinv, r); filter(h, S); @@ -1257,7 +1383,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, // DG: My formula to handle bending for the AIMEX scheme // multiply with 1000 because of numerical problems - if( ((k*1000.0)*dt*dt) < -0.18 ) + // if( ((k*1000.0)*dt*dt) < -0.18 ) { dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms->bending, cb); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; @@ -1392,7 +1518,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; - #pragma omp parallel for private (i) shared(lF) + #pragma omp parallel for private (i) shared(lF) schedule(static) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1467,8 +1593,8 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b - // cg_filtered_pre(dV, A, B, z, S, P, Pinv); + // cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b + cg_filtered_pre(dV, A, B, z, S, P, Pinv); // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); From 83c1dd78a630cef4ae6db341440f437f3d04f124 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 22 Nov 2007 17:02:37 +0000 Subject: [PATCH 056/430] Fixed numerical issues, hardened it again. --- source/blender/blenkernel/BKE_cloth.h | 16 +- source/blender/blenkernel/intern/cloth.c | 371 ++++---- source/blender/blenkernel/intern/implicit.c | 884 +++++++------------- 3 files changed, 507 insertions(+), 764 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index f3f566d2832..38cd54085f5 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -72,8 +72,8 @@ typedef struct ClothSpring { int matrix_index; /* needed for implicit solver (fast lookup) */ int type; /* types defined in BKE_cloth.h ("springType") */ int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ - float dfdx[3][4]; - float dfdv[3][4]; + float dfdx[3][3]; + float dfdv[3][3]; float f[3]; } ClothSpring; @@ -91,13 +91,13 @@ typedef struct Cloth { unsigned int numothersprings; unsigned int numspringssave; unsigned int old_solver_type; - float (*x)[4]; /* The current position of all vertices.*/ - float (*xold)[4]; /* The previous position of all vertices.*/ - float (*current_x)[4]; /* The TEMPORARY current position of all vertices.*/ - float (*current_xold)[4]; /* The TEMPORARY previous position of all vertices.*/ + float (*x)[3]; /* The current position of all vertices.*/ + float (*xold)[3]; /* The previous position of all vertices.*/ + float (*current_x)[3]; /* The TEMPORARY current position of all vertices.*/ + float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ float (*v)[4]; /* the current velocity of all vertices */ - float (*current_v)[4]; - float (*xconst)[4]; + float (*current_v)[3]; + float (*xconst)[3]; } Cloth; /* goal defines */ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index d0ab7ce4ffb..436a14d1d6c 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -90,9 +90,9 @@ double tval() } #else #include -static struct timeval _tstart, _tend; -static struct timezone tz; -void tstart ( void ) + static struct timeval _tstart, _tend; + static struct timezone tz; + void tstart ( void ) { gettimeofday ( &_tstart, &tz ); } @@ -133,11 +133,11 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v * ******************************************************************************/ /** -* cloth_init - creates a new cloth simulation. -* -* 1. create object -* 2. fill object with standard values or with the GUI settings if given -*/ + * cloth_init - creates a new cloth simulation. + * + * 1. create object + * 2. fill object with standard values or with the GUI settings if given + */ void cloth_init (ClothModifierData *clmd) { /* Initialize our new data structure to reasonable values. */ @@ -202,38 +202,38 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) for(i = 0; i < numfaces; i++) { - if(mface[i].v4) - numquads++; - else - numtris++; - } + if(mface[i].v4) + numquads++; + else + numtris++; +} result = CDDM_from_template(dm, numverts, 0, numtris + 2*numquads); if(!result) - return NULL; + return NULL; // do verts mvert2 = CDDM_get_verts(result); for(a=0; av1 = mface[a].v2; - mf->v2 = mface[a].v3; - mf->v3 = mface[a].v4; - } - else - { - mf->v1 = mface[a].v1; - mf->v2 = mface[a].v2; - mf->v3 = mface[a].v3; - } + if(mface[a].v4 && random==1) + { + mf->v1 = mface[a].v2; + mf->v2 = mface[a].v3; + mf->v3 = mface[a].v4; +} + else + { + mf->v1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; +} - mf->v4 = 0; - mf->flag |= ME_SMOOTH; + mf->v4 = 0; + mf->flag |= ME_SMOOTH; - test_index_face(mf, NULL, 0, 3); + test_index_face(mf, NULL, 0, 3); - if(mface[a].v4) - { - MFace *mf2; + if(mface[a].v4) + { + MFace *mf2; - i++; + i++; - mf2 = &mface2[i]; + mf2 = &mface2[i]; // DM_copy_face_data(dm, result, a, i, 1); // *mf2 = *inMF; - if(random==1) - { - mf2->v1 = mface[a].v1; - mf2->v2 = mface[a].v2; - mf2->v3 = mface[a].v4; - } - else - { - mf2->v1 = mface[a].v4; - mf2->v2 = mface[a].v1; - mf2->v3 = mface[a].v3; - } - mf2->v4 = 0; - mf2->flag |= ME_SMOOTH; + if(random==1) + { + mf2->v1 = mface[a].v1; + mf2->v2 = mface[a].v2; + mf2->v3 = mface[a].v4; +} + else + { + mf2->v1 = mface[a].v4; + mf2->v2 = mface[a].v1; + mf2->v3 = mface[a].v3; +} + mf2->v4 = 0; + mf2->flag |= ME_SMOOTH; - test_index_face(mf2, NULL, 0, 3); - } + test_index_face(mf2, NULL, 0, 3); +} - i++; - } + i++; +} CDDM_calc_edges(result); CDDM_calc_normals(result); @@ -330,43 +330,43 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) for(i = 0; i < numsprings; i++) { - if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) - &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) - { - BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); - BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); - j++; - } - } + if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) + &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) + { + BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); + BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); + j++; +} +} // printf("found %d tears\n", j); result = CDDM_from_template(dm, numverts, 0, numfaces); if(!result) - return NULL; + return NULL; // do verts mvert2 = CDDM_get_verts(result); for(a=0; av1 = mface[a].v1; - mf->v2 = mface[a].v2; - mf->v3 = mface[a].v3; - mf->v4 = mface[a].v4; + if((!BLI_edgehash_haskey(edgehash, mface[a].v1, mface[a].v2)) + &&(!BLI_edgehash_haskey(edgehash, mface[a].v2, mface[a].v3)) + &&(!BLI_edgehash_haskey(edgehash, mface[a].v3, mface[a].v4)) + &&(!BLI_edgehash_haskey(edgehash, mface[a].v4, mface[a].v1))) + { + mf->v1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; + mf->v4 = mface[a].v4; - test_index_face(mf, NULL, 0, 4); + test_index_face(mf, NULL, 0, 4); - i++; - } - } + i++; +} +} CDDM_lower_num_faces(result, i); CDDM_calc_edges(result); @@ -527,40 +527,40 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d /* if ( clmd->clothObject ) { - if ( clmd->sim_parms->cache ) - { - if ( current_time < clmd->sim_parms->firstframe ) - { - int frametime = cloth_cache_first_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, result, clmd ); - } - return result; - } - else if ( current_time > clmd->sim_parms->lastframe ) - { - int frametime = cloth_cache_last_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, result, clmd ); - } - return result; - } - else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed - { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, result, clmd ); - } - clmd->sim_parms->sim_time = current_time; - return result; - } - } - } + if ( clmd->sim_parms->cache ) + { + if ( current_time < clmd->sim_parms->firstframe ) + { + int frametime = cloth_cache_first_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, result, clmd ); +} + return result; +} + else if ( current_time > clmd->sim_parms->lastframe ) + { + int frametime = cloth_cache_last_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, result, clmd ); +} + return result; +} + else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed + { + if ( cloth_cache_search_frame ( clmd, framenr ) ) + { + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, result, clmd ); +} + clmd->sim_parms->sim_time = current_time; + return result; +} +} +} */ if(deltaTime == 1.0f) @@ -737,10 +737,10 @@ void cloth_free_modifier (ClothModifierData *clmd) ******************************************************************************/ /** -* cloth_to_object - copies the deformed vertices to the object. -* -* This function is a modified version of the softbody.c:softbody_to_object() function. -**/ + * cloth_to_object - copies the deformed vertices to the object. + * + * This function is a modified version of the softbody.c:softbody_to_object() function. + **/ static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd) { unsigned int i = 0; @@ -765,9 +765,9 @@ static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *cl /** -* cloth_apply_vgroup - applies a vertex group as specified by type -* -**/ + * cloth_apply_vgroup - applies a vertex group as specified by type + * + **/ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) { unsigned int i = 0; @@ -862,52 +862,51 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d /* create springs */ clmd->clothObject->springs = NULL; clmd->clothObject->numsprings = -1; + + /* set initial values */ + for (i = 0; i < numverts; ++i) + { + VECCOPY (clmd->clothObject->x[i], mvert[i].co); + Mat4MulVecfl(ob->obmat, clmd->clothObject->x[i]); + + clmd->clothObject->verts [i].mass = clmd->sim_parms->mass; + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + clmd->clothObject->verts [i].goal= clmd->sim_parms->defgoal; + else + clmd->clothObject->verts [i].goal= 0.0; + clmd->clothObject->verts [i].flags = 0; + VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); + VECCOPY(clmd->clothObject->xconst[i], clmd->clothObject->x[i]); + VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); + VecMulf(clmd->clothObject->v[i], 0.0); + + clmd->clothObject->verts [i].impulse_count = 0; + VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); + } - /* set initial values */ - for (i = 0; i < numverts; ++i) - { - VECCOPY (clmd->clothObject->x[i], mvert[i].co); - Mat4MulVecfl(ob->obmat, clmd->clothObject->x[i]); - - clmd->clothObject->verts [i].mass = clmd->sim_parms->mass; - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - clmd->clothObject->verts [i].goal= clmd->sim_parms->defgoal; - else - clmd->clothObject->verts [i].goal= 0.0; - clmd->clothObject->verts [i].flags = 0; - VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); - VECCOPY(clmd->clothObject->xconst[i], clmd->clothObject->x[i]); - VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); - VecMulf(clmd->clothObject->v[i], 0.0); - - clmd->clothObject->verts [i].impulse_count = 0; - VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); + if (!cloth_build_springs (clmd->clothObject, dm) ) + { + modifier_setError (&(clmd->modifier), "Can't build springs."); + return 0; + } + + /* apply / set vertex groups */ + if (clmd->sim_parms->vgroup_mass > 0) + cloth_apply_vgroup (clmd, olddm, clmd->sim_parms->vgroup_mass); + + /* init our solver */ + if (solvers [clmd->sim_parms->solver_type].init) + solvers [clmd->sim_parms->solver_type].init (ob, clmd); + + clmd->clothObject->tree = bvh_build_from_float3(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms->epsilon); + + clmd->clothObject->selftree = bvh_build_from_float3(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms->selfepsilon); + + // save initial state + cloth_write_cache(ob, clmd, framenr-1); } - - if (!cloth_build_springs (clmd->clothObject, dm) ) - { - modifier_setError (&(clmd->modifier), "Can't build springs."); - return 0; - } - - /* apply / set vertex groups */ - if (clmd->sim_parms->vgroup_mass > 0) - cloth_apply_vgroup (clmd, olddm, clmd->sim_parms->vgroup_mass); - - /* init our solver */ - if (solvers [clmd->sim_parms->solver_type].init) - solvers [clmd->sim_parms->solver_type].init (ob, clmd); - - clmd->clothObject->tree = bvh_build_from_float4(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms->epsilon); - - clmd->clothObject->selftree = bvh_build_from_float4(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms->selfepsilon); - - // save initial state - cloth_write_cache(ob, clmd, framenr-1); - } - - return 1; - default: return 0; // TODO - we do not support changing meshes + return 1; + default: return 0; // TODO - we do not support changing meshes } return 0; @@ -1119,15 +1118,15 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = mface[i].v2; spring->kl = mface[i].v4; VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); - spring->restlen = sqrt ( INPR ( temp, temp ) ); - spring->type = CLOTH_SPRING_TYPE_SHEAR; + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_SHEAR; - BLI_linklist_append ( &edgelist[spring->ij], spring ); - BLI_linklist_append ( &edgelist[spring->kl], spring ); - shear_springs++; + BLI_linklist_append ( &edgelist[spring->ij], spring ); + BLI_linklist_append ( &edgelist[spring->kl], spring ); + shear_springs++; - node2 = BLI_linklist_append_fast ( &node->next, spring ); - node = node2; + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } } @@ -1148,8 +1147,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) // check for existing spring // check also if startpoint is equal to endpoint if ( !BLI_edgehash_haskey ( edgehash, index2, tspring2->ij ) - && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) - && ( index2!=tspring2->ij ) ) + && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) + && ( index2!=tspring2->ij ) ) { spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 3f3b3a66253..6f8f96e58fb 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -63,14 +63,6 @@ #include "BKE_global.h" #include "BIF_editdeform.h" -#include "Bullet-C-Api.h" - -#ifdef __SSE3__ -#include -#include -#include -#endif - #ifdef _WIN32 #include static LARGE_INTEGER _itstart, _itend; @@ -91,14 +83,14 @@ void itend(void) double itval() { return ((double)_itend.QuadPart - - (double)_itstart.QuadPart)/((double)ifreq.QuadPart); + (double)_itstart.QuadPart)/((double)ifreq.QuadPart); } #else #include -static struct timeval _itstart, _itend; -static struct timezone itz; -void itstart(void) + static struct timeval _itstart, _itend; + static struct timezone itz; + void itstart(void) { gettimeofday(&_itstart, &itz); } @@ -122,39 +114,20 @@ struct Cloth; ///////////////////////////////////////// /* DEFINITIONS */ -#ifdef __GNUC__ -typedef float lfVector[4] __attribute__ ((aligned (16))); -#else -typedef __declspec(align(16)) lfVector[4]; -#endif - -#ifdef __GNUC__ +typedef float lfVector[3]; typedef struct fmatrix3x3 { - float m[3][4] __attribute__ ((aligned (16))); /* 3x3 matrix */ + float m[3][3]; /* 4x4 matrix */ unsigned int c,r; /* column and row number */ int pinned; /* is this vertex allowed to move? */ float n1,n2,n3; /* three normal vectors for collision constrains */ unsigned int vcount; /* vertex count */ unsigned int scount; /* spring count */ } fmatrix3x3; -#else -typedef struct fmatrix3x3 { - __declspec(align(16)) - float m[3][4]; /* 3x3 matrix */ - unsigned int c,r; /* column and row number */ - int pinned; /* is this vertex allowed to move? */ - float n1,n2,n3; /* three normal vectors for collision constrains */ - unsigned int vcount; /* vertex count */ - unsigned int scount; /* spring count */ -} fmatrix3x3; -#endif - /////////////////////////// // float[3] vector /////////////////////////// /* simple vector code */ - /* STATUS: verified */ DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar) { @@ -166,18 +139,13 @@ DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar) /* STATUS: verified */ DO_INLINE void cross_fvector(float to[3], float vectorA[3], float vectorB[3]) { - float temp[3]; - - temp[0] = vectorA[1] * vectorB[2] - vectorA[2] * vectorB[1]; - temp[1] = vectorA[2] * vectorB[0] - vectorA[0] * vectorB[2]; - temp[2] = vectorA[0] * vectorB[1] - vectorA[1] * vectorB[0]; - - VECCOPY(to, temp); + to[0] = vectorA[1] * vectorB[2] - vectorA[2] * vectorB[1]; + to[1] = vectorA[2] * vectorB[0] - vectorA[0] * vectorB[2]; + to[2] = vectorA[0] * vectorB[1] - vectorA[1] * vectorB[0]; } - /* simple v^T * v product ("outer product") */ /* STATUS: HAS TO BE verified (*should* work) */ -DO_INLINE void mul_fvectorT_fvector(float to[3][4], float vectorA[3], float vectorB[3]) +DO_INLINE void mul_fvectorT_fvector(float to[3][3], float vectorA[3], float vectorB[3]) { mul_fvector_S(to[0], vectorB, vectorA[0]); mul_fvector_S(to[1], vectorB, vectorA[1]); @@ -185,7 +153,7 @@ DO_INLINE void mul_fvectorT_fvector(float to[3][4], float vectorA[3], float vect } /* simple v^T * v product with scalar ("outer product") */ /* STATUS: HAS TO BE verified (*should* work) */ -DO_INLINE void mul_fvectorT_fvectorS(float to[3][4], float vectorA[3], float vectorB[3], float aS) +DO_INLINE void mul_fvectorT_fvectorS(float to[3][3], float vectorA[3], float vectorB[3], float aS) { mul_fvector_S(to[0], vectorB, vectorA[0]* aS); mul_fvector_S(to[1], vectorB, vectorA[1]* aS); @@ -227,7 +195,7 @@ DO_INLINE void del_lfvector(lfVector *fLongVector) } } /* copy long vector */ -DO_INLINE void cp_lfvector(lfVector *to, lfVector *from, unsigned int verts) +DO_INLINE void cp_lfvector(float (*to)[3], float (*from)[3], unsigned int verts) { memcpy(to, from, verts * sizeof(lfVector)); } @@ -241,12 +209,12 @@ DO_INLINE void init_lfvector(lfVector *fLongVector, float vector[3], unsigned in } } /* zero long vector with float[3] */ -DO_INLINE void zero_lfvector(lfVector *to, unsigned int verts) +DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) { memset(to, 0.0f, verts * sizeof(lfVector)); } /* multiply long vector with scalar*/ -DO_INLINE void mul_lfvectorS(lfVector *to, lfVector *fLongVector, float scalar, unsigned int verts) +DO_INLINE void mul_lfvectorS(float (*to)[3], lfVector *fLongVector, float scalar, unsigned int verts) { unsigned int i = 0; @@ -257,7 +225,7 @@ DO_INLINE void mul_lfvectorS(lfVector *to, lfVector *fLongVector, float scalar, } /* multiply long vector with scalar*/ /* A -= B * float */ -DO_INLINE void submul_lfvectorS(lfVector *to, lfVector *fLongVector, float scalar, unsigned int verts) +DO_INLINE void submul_lfvectorS(float (*to)[3], lfVector *fLongVector, float scalar, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -271,7 +239,7 @@ DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, uns unsigned int i = 0; float temp = 0.0; // schedule(guided, 2) -#pragma omp parallel for reduction(+: temp) private(i) schedule(static) +#pragma omp parallel for reduction(+: temp) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -279,7 +247,7 @@ DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, uns return temp; } /* A = B + C --> for big vector */ -DO_INLINE void add_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) +DO_INLINE void add_lfvector_lfvector(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) { unsigned int i = 0; @@ -287,36 +255,10 @@ DO_INLINE void add_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVec { VECADD(to[i], fLongVectorA[i], fLongVectorB[i]); } -} -/* -#ifdef __SSE3__ -DO_INLINE void add_lfvector(lfVector *to, lfVector *fLongVectorA, unsigned int verts) { - __m128 v1, v2; - unsigned int i = 0; - - for(i = 0; i < verts; i++) - { - v1 = _mm_load_ps(to[i]); - v2 = _mm_load_ps(fLongVectorA[i]); - - v1 = _mm_add_ps(v1, v2); - - _mm_store_ps(to[i], v1); - } -} -#else */ -DO_INLINE void add_lfvector(lfVector *to, lfVector *fLongVectorA, unsigned int verts) { - unsigned int i = 0; - for(i = 0; i < verts; i++) - { - VECADD(to[i], to[i], fLongVectorA[i]); - } } -// #endif - /* A = B + C * float --> for big vector */ -DO_INLINE void add_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; @@ -326,78 +268,8 @@ DO_INLINE void add_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVe } } - -/* A = A + B * float --> for big vector */ -// tested -/* -#ifdef __SSE3__ -DO_INLINE void add_lfvectorS(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { - __m128 v1, v2, v3; - unsigned int i = 0; - - for(i = 0; i < verts; i++) - { - v1 = _mm_load_ps(to[i]); - v2 = _mm_load_ps(fLongVectorA[i]); - v3 = _mm_set1_ps(bS); - - v2 = _mm_mul_ps(v2, v3); - v1 = _mm_add_ps(v1, v2); - - _mm_store_ps(to[i], v1); - } -} -#else */ -DO_INLINE void add_lfvectorS(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { - unsigned int i = 0; - - for(i = 0; i < verts; i++) - { - VECADDS(to[i], to[i], fLongVectorA[i], bS); - } -} -// #endif - - -// tested -/* -#ifdef __SSE3__ -DO_INLINE float add_lfvectorS_dot(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { - register __m128 v1, v2, v3, v4; - unsigned int i = 0; - float temp; - - v4 = _mm_setzero_ps(); -// #pragma omp parallel for reduction(+: v4) private(i, v1, v2, v3) schedule(static) - for(i = 0; i < verts; i++) - { - v1 = _mm_load_ps(to[i]); - v2 = _mm_load_ps(fLongVectorA[i]); - v3 = _mm_set1_ps(bS); - - v2 = _mm_mul_ps(v2, v3); - v1 = _mm_add_ps(v1, v2); - - _mm_stream_ps(to[i], v1); - - v4 = _mm_add_ps(v4, _mm_mul_ps(v1,v1)); - } - - v4 = _mm_hadd_ps(v4, v4); - v4 = _mm_hadd_ps(v4, v4); - _mm_store_ss(&temp, v4); - - return temp; -} -#else */ -DO_INLINE float add_lfvectorS_dot(lfVector *to, lfVector *fLongVectorA, float bS, unsigned int verts) { - add_lfvectorS(to, fLongVectorA, bS, verts); - return dot_lfvector(to, to, verts); -} -// #endif - /* A = B * float + C * float --> for big vector */ -DO_INLINE void add_lfvectorS_lfvectorS(lfVector *to, lfVector *fLongVectorA, float aS, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], lfVector *fLongVectorA, float aS, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; @@ -407,7 +279,7 @@ DO_INLINE void add_lfvectorS_lfvectorS(lfVector *to, lfVector *fLongVectorA, flo } } /* A = B - C * float --> for big vector */ -DO_INLINE void sub_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -417,7 +289,7 @@ DO_INLINE void sub_lfvector_lfvectorS(lfVector *to, lfVector *fLongVectorA, lfVe } /* A = B - C --> for big vector */ -DO_INLINE void sub_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) +DO_INLINE void sub_lfvector_lfvector(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) { unsigned int i = 0; @@ -428,32 +300,30 @@ DO_INLINE void sub_lfvector_lfvector(lfVector *to, lfVector *fLongVectorA, lfVec } /////////////////////////// -// 3x3 matrix +// 4x4 matrix /////////////////////////// -/* printf 3x3 matrix on console: for debug output */ -void print_fmatrix(float m3[3][4]) +/* printf 4x4 matrix on console: for debug output */ +void print_fmatrix(float m3[3][3]) { printf("%f\t%f\t%f\n",m3[0][0],m3[0][1],m3[0][2]); printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]); printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]); } -/* copy 3x3 matrix */ -DO_INLINE void cp_fmatrix(float to[3][4], float from[3][4]) +/* copy 4x4 matrix */ +DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) { - memcpy(to, from, sizeof (float) * 12); - /* + // memcpy(to, from, sizeof (float) * 9); VECCOPY(to[0], from[0]); VECCOPY(to[1], from[1]); VECCOPY(to[2], from[2]); - */ } -/* calculate determinant of 3x3 matrix */ -DO_INLINE float det_fmatrix(float m[3][4]) +/* calculate determinant of 4x4 matrix */ +DO_INLINE float det_fmatrix(float m[3][3]) { return m[0][0]*m[1][1]*m[2][2] + m[1][0]*m[2][1]*m[0][2] + m[0][1]*m[1][2]*m[2][0] - -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; + -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; } -DO_INLINE void inverse_fmatrix(float to[3][4], float from[3][4]) +DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) { unsigned int i, j; float d; @@ -484,115 +354,84 @@ DO_INLINE void inverse_fmatrix(float to[3][4], float from[3][4]) } -/* 3x3 matrix multiplied by a scalar */ +/* 4x4 matrix multiplied by a scalar */ /* STATUS: verified */ -DO_INLINE void mul_fmatrix_S(float matrix[3][4], float scalar) +DO_INLINE void mul_fmatrix_S(float matrix[3][3], float scalar) { mul_fvector_S(matrix[0], matrix[0],scalar); mul_fvector_S(matrix[1], matrix[1],scalar); mul_fvector_S(matrix[2], matrix[2],scalar); } -/* a vector multiplied by a 3x3 matrix */ +/* a vector multiplied by a 4x4 matrix */ /* STATUS: verified */ -DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][4]) +DO_INLINE void mul_fvector_fmatrix(float *to, float *from, float matrix[3][3]) { - float temp[3]; - - VECCOPY(temp, from); - - to[0] = matrix[0][0]*temp[0] + matrix[1][0]*temp[1] + matrix[2][0]*temp[2]; - to[1] = matrix[0][1]*temp[0] + matrix[1][1]*temp[1] + matrix[2][1]*temp[2]; - to[2] = matrix[0][2]*temp[0] + matrix[1][2]*temp[1] + matrix[2][2]*temp[2]; + to[0] = matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; + to[1] = matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; + to[2] = matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; } -/* 3x3 matrix multiplied by a vector */ +/* 4x4 matrix multiplied by a vector */ /* STATUS: verified */ -/* -#ifdef __SSE3__ -DO_INLINE void mul_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { - __m128 v1, v2, v3, v4; - - v1 = _mm_load_ps(&matrix[0][0]); - v2 = _mm_load_ps(&matrix[1][0]); - v3 = _mm_load_ps(&matrix[2][0]); - v4 = _mm_load_ps(from); - - // stuff - v1 = _mm_mul_ps(v1, v4); - v2 = _mm_mul_ps(v2, v4); - v3 = _mm_mul_ps(v3, v4); - v1 = _mm_hadd_ps(v1, v2); - v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); - v4 = _mm_hadd_ps(v1, v3); - - _mm_store_ps(to, v4); -} -#else */ -DO_INLINE void mul_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) +DO_INLINE void mul_fmatrix_fvector(float *to, float matrix[3][3], float *from) { - float temp[3] = {0,0,0}; - - temp[0] = INPR(matrix[0],from); - temp[1] = INPR(matrix[1],from); - temp[2] = INPR(matrix[2],from); - - VECCOPY(to, temp); + to[0] = INPR(matrix[0],from); + to[1] = INPR(matrix[1],from); + to[2] = INPR(matrix[2],from); } -// #endif - -/* 3x3 matrix multiplied by a 3x3 matrix */ +/* 4x4 matrix multiplied by a 4x4 matrix */ /* STATUS: verified */ -DO_INLINE void mul_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +DO_INLINE void mul_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { mul_fvector_fmatrix(to[0], matrixA[0],matrixB); mul_fvector_fmatrix(to[1], matrixA[1],matrixB); mul_fvector_fmatrix(to[2], matrixA[2],matrixB); } -/* 3x3 matrix addition with 3x3 matrix */ -DO_INLINE void add_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +/* 4x4 matrix addition with 4x4 matrix */ +DO_INLINE void add_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { VECADD(to[0], matrixA[0], matrixB[0]); VECADD(to[1], matrixA[1], matrixB[1]); VECADD(to[2], matrixA[2], matrixB[2]); } -/* 3x3 matrix add-addition with 3x3 matrix */ -DO_INLINE void addadd_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +/* 4x4 matrix add-addition with 4x4 matrix */ +DO_INLINE void addadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { VECADDADD(to[0], matrixA[0], matrixB[0]); VECADDADD(to[1], matrixA[1], matrixB[1]); VECADDADD(to[2], matrixA[2], matrixB[2]); } -/* 3x3 matrix sub-addition with 3x3 matrix */ -DO_INLINE void addsub_fmatrixS_fmatrixS(float to[3][4], float matrixA[3][4], float aS, float matrixB[3][4], float bS) +/* 4x4 matrix sub-addition with 4x4 matrix */ +DO_INLINE void addsub_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) { VECADDSUBSS(to[0], matrixA[0], aS, matrixB[0], bS); VECADDSUBSS(to[1], matrixA[1], aS, matrixB[1], bS); VECADDSUBSS(to[2], matrixA[2], aS, matrixB[2], bS); } -/* A -= B + C (3x3 matrix sub-addition with 3x3 matrix) */ -DO_INLINE void subadd_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +/* A -= B + C (4x4 matrix sub-addition with 4x4 matrix) */ +DO_INLINE void subadd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { VECSUBADD(to[0], matrixA[0], matrixB[0]); VECSUBADD(to[1], matrixA[1], matrixB[1]); VECSUBADD(to[2], matrixA[2], matrixB[2]); } -/* A -= B*x + C*y (3x3 matrix sub-addition with 3x3 matrix) */ -DO_INLINE void subadd_fmatrixS_fmatrixS(float to[3][4], float matrixA[3][4], float aS, float matrixB[3][4], float bS) +/* A -= B*x + C*y (4x4 matrix sub-addition with 4x4 matrix) */ +DO_INLINE void subadd_fmatrixS_fmatrixS(float to[3][3], float matrixA[3][3], float aS, float matrixB[3][3], float bS) { VECSUBADDSS(to[0], matrixA[0], aS, matrixB[0], bS); VECSUBADDSS(to[1], matrixA[1], aS, matrixB[1], bS); VECSUBADDSS(to[2], matrixA[2], aS, matrixB[2], bS); } -/* A = B - C (3x3 matrix subtraction with 3x3 matrix) */ -DO_INLINE void sub_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +/* A = B - C (4x4 matrix subtraction with 4x4 matrix) */ +DO_INLINE void sub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { VECSUB(to[0], matrixA[0], matrixB[0]); VECSUB(to[1], matrixA[1], matrixB[1]); VECSUB(to[2], matrixA[2], matrixB[2]); } -/* A += B - C (3x3 matrix add-subtraction with 3x3 matrix) */ -DO_INLINE void addsub_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float matrixB[3][4]) +/* A += B - C (4x4 matrix add-subtraction with 4x4 matrix) */ +DO_INLINE void addsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { VECADDSUB(to[0], matrixA[0], matrixB[0]); VECADDSUB(to[1], matrixA[1], matrixB[1]); @@ -601,93 +440,53 @@ DO_INLINE void addsub_fmatrix_fmatrix(float to[3][4], float matrixA[3][4], float ///////////////////////////////////////////////////////////////// // special functions ///////////////////////////////////////////////////////////////// -/* a vector multiplied and added to/by a 3x3 matrix */ -/* +/* a vector multiplied and added to/by a 4x4 matrix */ DO_INLINE void muladd_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) { to[0] += matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; to[1] += matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; to[2] += matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; } -*/ -/* 3x3 matrix multiplied and added to/by a 3x3 matrix and added to another 3x3 matrix */ -/* +/* 4x4 matrix multiplied and added to/by a 4x4 matrix and added to another 4x4 matrix */ DO_INLINE void muladd_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { muladd_fvector_fmatrix(to[0], matrixA[0],matrixB); muladd_fvector_fmatrix(to[1], matrixA[1],matrixB); muladd_fvector_fmatrix(to[2], matrixA[2],matrixB); } -*/ -/* a vector multiplied and sub'd to/by a 3x3 matrix */ -/* +/* a vector multiplied and sub'd to/by a 4x4 matrix */ DO_INLINE void mulsub_fvector_fmatrix(float to[3], float from[3], float matrix[3][3]) { to[0] -= matrix[0][0]*from[0] + matrix[1][0]*from[1] + matrix[2][0]*from[2]; to[1] -= matrix[0][1]*from[0] + matrix[1][1]*from[1] + matrix[2][1]*from[2]; to[2] -= matrix[0][2]*from[0] + matrix[1][2]*from[1] + matrix[2][2]*from[2]; } -*/ -/* 3x3 matrix multiplied and sub'd to/by a 3x3 matrix and added to another 3x3 matrix */ -/* +/* 4x4 matrix multiplied and sub'd to/by a 4x4 matrix and added to another 4x4 matrix */ DO_INLINE void mulsub_fmatrix_fmatrix(float to[3][3], float matrixA[3][3], float matrixB[3][3]) { mulsub_fvector_fmatrix(to[0], matrixA[0],matrixB); mulsub_fvector_fmatrix(to[1], matrixA[1],matrixB); mulsub_fvector_fmatrix(to[2], matrixA[2],matrixB); } -*/ -/* 3x3 matrix multiplied+added by a vector */ +/* 4x4 matrix multiplied+added by a vector */ /* STATUS: verified */ -/* -#ifdef __SSE3__ -DO_INLINE void muladd_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) { - __m128 v1, v2, v3, v4; - - v1 = _mm_load_ps(&matrix[0][0]); - v2 = _mm_load_ps(&matrix[1][0]); - v3 = _mm_load_ps(&matrix[2][0]); - v4 = _mm_load_ps(from); - - // stuff - v1 = _mm_mul_ps(v1, v4); - v2 = _mm_mul_ps(v2, v4); - v3 = _mm_mul_ps(v3, v4); - v1 = _mm_hadd_ps(v1, v2); - v3 = _mm_hadd_ps(v3, _mm_setzero_ps()); - v1 = _mm_hadd_ps(v1, v3); - - v4 = _mm_load_ps(to); - v4 = _mm_add_ps(v4,v1); - - _mm_store_ps(to, v4); -} -#else */ -DO_INLINE void muladd_fmatrix_fvector(float to[4], float matrix[3][4], float from[4]) +DO_INLINE void muladd_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) { - float temp[3] = { 0,0,0 }; - - temp[0] = INPR(matrix[0],from); - temp[1] = INPR(matrix[1],from); - temp[2] = INPR(matrix[2],from); - - VECADD(to, to, temp); + to[0] += INPR(matrix[0],from); + to[1] += INPR(matrix[1],from); + to[2] += INPR(matrix[2],from); } -// #endif - -/* 3x3 matrix multiplied+sub'ed by a vector */ -/* +/* 4x4 matrix multiplied+sub'ed by a vector */ DO_INLINE void mulsub_fmatrix_fvector(float to[3], float matrix[3][3], float from[3]) { to[0] -= INPR(matrix[0],from); to[1] -= INPR(matrix[1],from); to[2] -= INPR(matrix[2],from); } -*/ ///////////////////////////////////////////////////////////////// /////////////////////////// -// SPARSE SYMMETRIC big matrix with 3x3 matrix entries +// SPARSE SYMMETRIC big matrix with 4x4 matrix entries /////////////////////////// /* printf a big matrix on console: for debug output */ void print_bfmatrix(fmatrix3x3 *m3) @@ -724,10 +523,10 @@ DO_INLINE void cp_bfmatrix(fmatrix3x3 *to, fmatrix3x3 *from) } /* init the diagonal of big matrix */ // slow in parallel -DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][4]) +DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) { unsigned int i,j; - float tmatrix[3][4] = {{0,0,0,0},{0,0,0,0},{0,0,0,0}}; + float tmatrix[3][3] = {{0,0,0},{0,0,0},{0,0,0}}; for(i = 0; i < matrix[0].vcount; i++) { @@ -739,7 +538,7 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][4]) } } /* init big matrix */ -DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][4]) +DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) { unsigned int i; @@ -759,55 +558,36 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) } /* SPARSE SYMMETRIC multiply big matrix with long vector*/ /* STATUS: verified */ -void mul_bfmatrix_lfvector( lfVector *to, fmatrix3x3 *from, lfVector *fLongVector) +DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) { - unsigned int i = 0, numverts = from[0].vcount; - // lfVector *tflongvector = create_lfvector(numverts); - float temp[4]={0,0,0,0}; + unsigned int i = 0; + lfVector *temp = create_lfvector(from[0].vcount); - zero_lfvector(to, numverts); - /* -#pragma omp parallel sections private(i) -{ -#pragma omp section - { - for(i = numverts; i < numverts+from[0].scount; i++) - { - muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - - } - } -#pragma omp section - { - for(i = 0; i < numverts+from[0].scount; i++) - { - muladd_fmatrix_fvector(tflongvector[from[i].r], from[i].m, fLongVector[from[i].c]); - } - } -} - - add_lfvector(to, tflongvector, numverts); - - del_lfvector(tflongvector); - */ - // alternative NON OpenMP code - /* process diagonal elements */ - - for(i = 0; i < from[0].vcount; i++) - { - mul_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - } - - /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ - - for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) - { - muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - } - -} + zero_lfvector(to, from[0].vcount); +#pragma omp parallel sections private(i) + { +#pragma omp section + { + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) + { + muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + } + } +#pragma omp section + { + for(i = 0; i < from[0].vcount+from[0].scount; i++) + { + muladd_fmatrix_fvector(temp[from[i].r], from[i].m, fLongVector[from[i].c]); + } + } + } + add_lfvector_lfvector(to, to, temp, from[0].vcount); + + del_lfvector(temp); + + +} /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) { @@ -898,8 +678,8 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS( fmatrix3x3 *to, fmatrix3x3 *from, flo /////////////////////////////////////////////////////////////////// // simulator start /////////////////////////////////////////////////////////////////// -static float I[3][4] = {{1,0,0,0},{0,1,0,0},{0,0,1,0}}; -static float ZERO[3][4] = {{0,0,0,0},{0,0,0,0},{0,0,0,0}}; +static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}}; +static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; typedef struct Implicit_Data { lfVector *X, *V, *Xnew, *Vnew, *F, *B, *dV, *z; @@ -941,7 +721,6 @@ int implicit_init (Object *ob, ClothModifierData *clmd) id->F = create_lfvector(cloth->numverts); id->B = create_lfvector(cloth->numverts); id->dV = create_lfvector(cloth->numverts); - zero_lfvector(id->dV, cloth->numverts); id->z = create_lfvector(cloth->numverts); for(i=0;inumverts;i++) @@ -971,7 +750,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) // dFdV_start[i].c = big_I[i].c = big_zero[i].c = id->A[i+cloth->numverts].c = id->dFdV[i+cloth->numverts].c = id->dFdX[i+cloth->numverts].c = - id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; + id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; spring->matrix_index = i + cloth->numverts; @@ -985,7 +764,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) return 1; } -int implicit_free (ClothModifierData *clmd) +int implicit_free (ClothModifierData *clmd) { Implicit_Data *id; Cloth *cloth; @@ -1096,7 +875,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) } } -int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S) +int cg_filtered(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S) { // Solves for unknown X in equation AX=B unsigned int conjgrad_loopcount=0, conjgrad_looplimit=100; @@ -1108,22 +887,24 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr d = create_lfvector(numverts); tmp = create_lfvector(numverts); r = create_lfvector(numverts); - - // zero_lfvector(ldV, numverts); - filter(ldV, S); - add_lfvector_lfvector(ldV, ldV, z, numverts); + + // zero_lfvector(dv, CLOTHPARTICLES); + filter(dv, S); + + add_lfvector_lfvector(dv, dv, z, numverts); // r = B - Mul(tmp,A,X); // just use B if X known to be zero - mul_bfmatrix_lfvector(r, lA, ldV); - sub_lfvector_lfvector(r, lB, r, numverts); - filter(r, S); + cp_lfvector(r, lB, numverts); + mul_bfmatrix_lfvector(tmp, lA, dv); + sub_lfvector_lfvector(r, r, tmp, numverts); + + filter(r,S); cp_lfvector(d, r, numverts); s = dot_lfvector(r, r, numverts); - starget = s * conjgrad_epsilon; - - // itstart(); + starget = s * sqrt(conjgrad_epsilon); + while((s>starget && conjgrad_loopcount < conjgrad_looplimit)) { // Mul(q,A,d); // q = A*d; @@ -1134,14 +915,13 @@ int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatr a = s/dot_lfvector(d, q, numverts); // X = X + d*a; - add_lfvector_lfvectorS(ldV, ldV, d, a, numverts); - - s_prev = s; + add_lfvector_lfvectorS(dv, dv, d, a, numverts); // r = r - q*a; - add_lfvector_lfvectorS(r, r, q, -a, numverts); + sub_lfvector_lfvectorS(r, r, q, a, numverts); + + s_prev = s; s = dot_lfvector(r, r, numverts); - // s = add_lfvectorS_dot(r, q, -a, numverts); //d = r+d*(s/s_prev); add_lfvector_lfvectorS(d, r, d, (s/s_prev), numverts); @@ -1195,7 +975,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma BuildPPinv(lA, P, Pinv); filter(dv, S); - add_lfvector(dv, z, numverts); + add_lfvector_lfvector(dv, dv, z, numverts); mul_bfmatrix_lfvector(r, lA, dv); sub_lfvector_lfvector(r, lB, r, numverts); @@ -1204,11 +984,13 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma mul_bfmatrix_lfvector(p, Pinv, r); filter(p, S); - deltaNew = delta0 = dot_lfvector(r, p, numverts); + deltaNew = dot_lfvector(r, p, numverts); + + delta0 = deltaNew * sqrt(conjgrad_epsilon); // itstart(); - while ((deltaNew > (conjgrad_epsilon*delta0)) && (iterations < conjgrad_looplimit)) + while ((deltaNew > delta0) && (iterations < conjgrad_looplimit)) { iterations++; @@ -1217,9 +999,9 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma alpha = deltaNew / dot_lfvector(p, s, numverts); - add_lfvectorS(dv, p, alpha, numverts); + add_lfvector_lfvectorS(dv, dv, p, alpha, numverts); - add_lfvectorS(r, s, -alpha, numverts); + add_lfvector_lfvectorS(r, r, s, -alpha, numverts); mul_bfmatrix_lfvector(h, Pinv, r); filter(h, S); @@ -1247,11 +1029,11 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma } // outer product is NOT cross product!!! -DO_INLINE void dfdx_spring_type1(float to[3][4], float dir[3],float length,float L,float k) +DO_INLINE void dfdx_spring_type1(float to[3][3], float dir[3],float length,float L,float k) { // dir is unit length direction, rest is spring's restlength, k is spring constant. // return (outerprod(dir,dir)*k + (I - outerprod(dir,dir))*(k - ((k*L)/length))); - float temp[3][4]; + float temp[3][3]; mul_fvectorT_fvector(temp, dir, dir); sub_fmatrix_fmatrix(to, I, temp); mul_fmatrix_S(to, k* (1.0f-(L/length))); @@ -1259,20 +1041,20 @@ DO_INLINE void dfdx_spring_type1(float to[3][4], float dir[3],float length,float add_fmatrix_fmatrix(to, temp, to); } -DO_INLINE void dfdx_spring_type2(float to[3][4], float dir[3],float length,float L,float k, float cb) +DO_INLINE void dfdx_spring_type2(float to[3][3], float dir[3],float length,float L,float k, float cb) { // return outerprod(dir,dir)*fbstar_jacobi(length, L, k, cb); mul_fvectorT_fvectorS(to, dir, dir, fbstar_jacobi(length, L, k, cb)); } -DO_INLINE void dfdv_damp(float to[3][4], float dir[3], float damping) +DO_INLINE void dfdv_damp(float to[3][3], float dir[3], float damping) { // derivative of force wrt velocity. // return outerprod(dir,dir) * damping; mul_fvectorT_fvectorS(to, dir, dir, damping); } -DO_INLINE void dfdx_spring(float to[3][4], float dir[3],float length,float L,float k) +DO_INLINE void dfdx_spring(float to[3][3], float dir[3],float length,float L,float k) { // dir is unit length direction, rest is spring's restlength, k is spring constant. //return ( (I-outerprod(dir,dir))*Min(1.0f,rest/length) - I) * -k; @@ -1283,7 +1065,7 @@ DO_INLINE void dfdx_spring(float to[3][4], float dir[3],float length,float L,fl mul_fmatrix_S(to, -k); } -DO_INLINE void dfdx_damp(float to[3][4], float dir[3],float length,const float vel[3],float rest,float damping) +DO_INLINE void dfdx_damp(float to[3][3], float dir[3],float length,const float vel[3],float rest,float damping) { // inner spring damping vel is the relative velocity of the endpoints. // return (I-outerprod(dir,dir)) * (-damping * -(dot(dir,vel)/Max(length,rest))); @@ -1293,12 +1075,12 @@ DO_INLINE void dfdx_damp(float to[3][4], float dir[3],float length,const float } -DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt) +DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) { float extent[3]; float length = 0; float dir[3] = {0,0,0}; - float vel[3] = {0,0,0}; + float vel[3]; float k = 0.0f; float L = s->restlen; float cb = clmd->sim_parms->structural; @@ -1307,7 +1089,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float stretch_force[3] = {0,0,0}; float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; - float nulldfdx[3][4]={ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}}; + float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1325,13 +1107,13 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, /* if(length>L) { - if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) - && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! - { - s->flags |= CSPRING_FLAG_DEACTIVATE; - return; - } - } + if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! + { + s->flags |= CSPRING_FLAG_DEACTIVATE; + return; + } + } */ mul_fvector_S(dir, extent, 1.0f/length); } @@ -1348,24 +1130,19 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = (clmd->sim_parms->structural*(length-L)); + k = clmd->sim_parms->structural; - mul_fvector_S(stretch_force, dir, k); + mul_fvector_S(stretch_force, dir, (k*(length-L))); VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * 0.01 * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); - - // Formula from Ascher / Boxman, Speeding up cloth simulation - // couldn't see any speedup - // if((dt * (k*dt + 2 * clmd->sim_parms->Cdis * 0.01)) > 0.01 ) - { - dfdx_spring_type1(s->dfdx, dir,length,L,clmd->sim_parms->structural); - dfdv_damp(s->dfdv, dir,clmd->sim_parms->Cdis * 0.01); - } - // printf("(dt*k*dt) ): %f, k: %f\n", (dt * (k*dt + 2 * clmd->sim_parms->Cdis * 0.01) ), k); + + dfdx_spring_type1(s->dfdx, dir,length,L,k); + + dfdv_damp(s->dfdv, dir,clmd->sim_parms->Cdis); } } else // calculate force of bending springs @@ -1376,19 +1153,17 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = fbstar(length, L, clmd->sim_parms->bending, cb); + k = clmd->sim_parms->bending; - mul_fvector_S(bending_force, dir, k); + mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); - // DG: My formula to handle bending for the AIMEX scheme - // multiply with 1000 because of numerical problems - // if( ((k*1000.0)*dt*dt) < -0.18 ) + if(INPR(bending_force,bending_force) > 0.13*0.13) { - dfdx_spring_type2(s->dfdx, dir,length,L,clmd->sim_parms->bending, cb); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } - // printf("(dt*k*dt) ): %f, k: %f\n", (dt*dt*(1000.0*k)), k); + + dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); } } } @@ -1406,8 +1181,8 @@ DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } - // else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) - // return 0; + else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) + return 0; sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); @@ -1459,14 +1234,14 @@ DO_INLINE void calc_triangle_force(ClothModifierData *clmd, MFace mface, lfVecto } -void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time, float dt) +void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVector *lV, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, ListBase *effectors, float time) { /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; unsigned int i = 0; float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */ float gravity[3]; - float tm2[3][4] = {{-spring_air,0,0,0}, {0,-spring_air,0,0},{0,0,-spring_air,0}}; + float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; ClothVertex *verts = cloth->verts; MFace *mfaces = cloth->mfaces; float wind_normalized[3]; @@ -1518,7 +1293,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; - #pragma omp parallel for private (i) shared(lF) schedule(static) +#pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1543,7 +1318,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec { // only handle active springs // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)){} - cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX, dt); + cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; } @@ -1578,52 +1353,38 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec } - void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) { unsigned int numverts = dFdV[0].vcount; lfVector *dFdXmV = create_lfvector(numverts); - initdiag_bfmatrix(A, I); - + zero_lfvector(dV, numverts); + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - // cg_filtered(dV, A, B, z, S); // conjugate gradient algorithm to solve Ax=b - cg_filtered_pre(dV, A, B, z, S, P, Pinv); + // itstart(); + + cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ + + // TODO: if anyone finds a way to correct this function => + // explodes with stiffness = 3000 and 16k verts + pinned at 2 corners + // cg_filtered_pre(dV, A, B, z, S, P, Pinv); + + // itend(); + // printf("cg_filtered calc time: %f\n", (float)itval()); // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); + del_lfvector(dFdXmV); } -/* -// this version solves for the new velocity -void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) -{ - unsigned int numverts = dFdV[0].vcount; - - lfVector *dFdXmV = create_lfvector(numverts); - - initdiag_bfmatrix(A, I); - - subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); - - mul_bfmatrix_lfvector(dFdXmV, dFdV, lV); - - add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, -dt, numverts); - add_lfvector_lfvector(B, B, lV, numverts); - - cg_filtered_pre(Vnew, A, B, z, S, P, Pinv); - - del_lfvector(dFdXmV); -} -*/ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) { unsigned int i=0; @@ -1635,7 +1396,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase Implicit_Data *id = cloth->implicit; int result = 0; float force = 0, lastforce = 0; - lfVector *dx; + // lfVector *dx; if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { @@ -1655,7 +1416,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, dt ); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); // check for sleeping // if(!(clmd->coll_parms->flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) @@ -1664,19 +1425,17 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); } - + /* dx = create_lfvector(numverts); sub_lfvector_lfvector(dx, id->Xnew, id->X, numverts); force = dot_lfvector(dx, dx, numverts); del_lfvector(dx); - /* if((force < 0.00001) && (lastforce >= force)) - clmd->coll_parms->flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; + clmd->coll_parms->flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; else if((lastforce*2 < force)) + clmd->coll_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; */ - clmd->coll_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; - lastforce = force; if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) @@ -1706,7 +1465,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, step, dt); + result = 0; // cloth_bvh_objcollision(clmd, step + dt, step, dt); // copy corrected positions back to simulation if(result) @@ -1735,7 +1494,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase cp_lfvector(id->V, id->Vnew, numverts); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step, dt); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); } @@ -1775,19 +1534,11 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } else { - for(i = 0; i < numverts; i++) - { - VECCOPY(cloth->current_xold[i], id->X[i]); - VECCOPY(cloth->x[i], id->X[i]); - } - // memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); - // memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); + memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); + memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); } - for(i = 0; i < numverts; i++) - VECCOPY(cloth->v[i], id->V[i]); - - // memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); + memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); return 1; } @@ -1795,18 +1546,11 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase void implicit_set_positions (ClothModifierData *clmd) { Cloth *cloth = clmd->clothObject; - unsigned int numverts = cloth->numverts, i = 0; + unsigned int numverts = cloth->numverts; Implicit_Data *id = cloth->implicit; - - for(i = 0; i < numverts; i++) - { - VECCOPY(id->X[i], cloth->x[i]); - VECCOPY(id->V[i], cloth->v[i]); - } - - // memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); - // memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); + memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); + memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); } @@ -1825,7 +1569,7 @@ int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierD cloth1 = clmd->clothObject; cloth2 = coll_clmd->clothObject; - // search = clmd->coll_parms->collision_list; + // search = clmd->coll_parms.collision_list; while(search) { @@ -1868,10 +1612,10 @@ int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierD float vrel_t_pre[3]; float vrel_t[3]; double impulse; - float epsilon = clmd->coll_parms->epsilon; + float epsilon = clmd->coll_parms.epsilon; float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms->friction*0.01, magrelVel); + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); // magtangent = INPR(tangential, tangential); @@ -2071,20 +1815,20 @@ int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *co VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; + return 1; VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; + return 1; VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; + return 1; VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - */ + return 1; + */ return 0; } @@ -2345,7 +2089,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, LinkNode *collision_list = NULL; unsigned int i = 0, j = 0; int collisions = 0, count = 0; - float (*current_x)[4]; + float (*current_x)[3]; if (!(((Cloth *)clmd->clothObject)->tree)) { @@ -2362,57 +2106,57 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update_from_float4(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) /* // check all collision objects for (base = G.scene->base.first; base; base = base->next) { - ob2 = base->object; - collmd = (CollisionModifierData *) modifiers_findByType (ob2, eModifierType_Collision); + ob2 = base->object; + collmd = (CollisionModifierData *) modifiers_findByType (ob2, eModifierType_Collision); - if (!collmd) - continue; + if (!collmd) + continue; // check if there is a bounding volume hierarchy - if (collmd->tree) - { - bvh2 = collmd->tree; + if (collmd->tree) + { + bvh2 = collmd->tree; // update position + bvh of collision object - collision_move_object(collmd, step, prevstep); - bvh_update_from_mvert(collmd->tree, collmd->current_x, collmd->numverts, NULL, 0); + collision_move_object(collmd, step, prevstep); + bvh_update_from_mvert(collmd->tree, collmd->current_x, collmd->numverts, NULL, 0); // fill collision list - collisions += bvh_traverse(bvh1->root, bvh2->root, &collision_list); + collisions += bvh_traverse(bvh1->root, bvh2->root, &collision_list); // call static collision response // free collision list - if(collision_list) - { - LinkNode *search = collision_list; + if(collision_list) + { + LinkNode *search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; + while(search) + { + CollisionPair *coll_pair = search->link; - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); + MEM_freeN(coll_pair); + search = search->next; +} + BLI_linklist_free(collision_list,NULL); - collision_list = NULL; - } - } - } + collision_list = NULL; +} +} +} ////////////////////////////////////////////// // update velocities + positions ////////////////////////////////////////////// for(i = 0; i < cloth->numverts; i++) { - VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); - } + VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); +} ////////////////////////////////////////////// */ /* @@ -2424,68 +2168,68 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, // free collision list if(collision_list) { - LinkNode *search = collision_list; + LinkNode *search = collision_list; - while(search) - { - float distance = 0; - float mindistance = cloth->selftree->epsilon; - CollisionPair *collpair = (CollisionPair *)search->link; + while(search) + { + float distance = 0; + float mindistance = cloth->selftree->epsilon; + CollisionPair *collpair = (CollisionPair *)search->link; // get distance of faces - distance = plNearestPoints( - cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[2]], collpair->pa,collpair->pb,collpair->vector); + distance = plNearestPoints( + cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[2]], collpair->pa,collpair->pb,collpair->vector); - if(distance < mindistance) - { - /////////////////////////////////////////// + if(distance < mindistance) + { + /////////////////////////////////////////// // TODO: take velocity of the collision points into account! - /////////////////////////////////////////// + /////////////////////////////////////////// - float correction = mindistance - distance; - float temp[3]; + float correction = mindistance - distance; + float temp[3]; - VECCOPY(temp, collpair->vector); - Normalize(temp); - VecMulf(temp, -correction*0.5); + VECCOPY(temp, collpair->vector); + Normalize(temp); + VecMulf(temp, -correction*0.5); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[0]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[0]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[0]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[0]], temp); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[1]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[1]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[1]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[1]], temp); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[2]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexA[2]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[2]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexA[2]], temp); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[0]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[0]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[0]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[0]], temp); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[1]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[1]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[1]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[1]], temp); - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[2]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[2]], cloth->current_x[collpair->point_indexB[2]], temp); + if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[2]].goal >= SOFTGOALSNAP))) + VECSUB(cloth->current_x[collpair->point_indexB[2]], cloth->current_x[collpair->point_indexB[2]], temp); - collisions = 1; + collisions = 1; - } +} - } +} - search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; + search = collision_list; + while(search) + { + CollisionPair *coll_pair = search->link; - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(collision_list,NULL); + MEM_freeN(coll_pair); + search = search->next; +} + BLI_linklist_free(collision_list,NULL); - collision_list = NULL; - } + collision_list = NULL; +} */ // Test on *simple* selfcollisions collisions = 1; @@ -2495,62 +2239,62 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, #pragma omp parallel for private(i,j, collisions) shared(current_x) for(count = 0; count < 6; count++) { - collisions = 0; + collisions = 0; - for(i = 0; i < cloth->numverts; i++) - { - for(j = i + 1; j < cloth->numverts; j++) - { - float temp[3]; - float length = 0; - float mindistance = cloth->selftree->epsilon; + for(i = 0; i < cloth->numverts; i++) + { + for(j = i + 1; j < cloth->numverts; j++) + { + float temp[3]; + float length = 0; + float mindistance = cloth->selftree->epsilon; - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - { - if((cloth->verts [i].goal >= SOFTGOALSNAP) - && (cloth->verts [j].goal >= SOFTGOALSNAP)) - { - continue; - } - } + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + if((cloth->verts [i].goal >= SOFTGOALSNAP) + && (cloth->verts [j].goal >= SOFTGOALSNAP)) + { + continue; +} +} // check for adjacent points - if(BLI_edgehash_haskey ( cloth->edgehash, i, j )) - { - continue; - } + if(BLI_edgehash_haskey ( cloth->edgehash, i, j )) + { + continue; +} - VECSUB(temp, current_x[i], current_x[j]); + VECSUB(temp, current_x[i], current_x[j]); - length = Normalize(temp); + length = Normalize(temp); - if(length < mindistance) - { - float correction = mindistance - length; + if(length < mindistance) + { + float correction = mindistance - length; - if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal >= SOFTGOALSNAP)) - { - VecMulf(temp, -correction); - VECADD(current_x[j], current_x[j], temp); - } - else if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [j].goal >= SOFTGOALSNAP)) - { - VecMulf(temp, correction); - VECADD(current_x[i], current_x[i], temp); - } - else - { - VecMulf(temp, -correction*0.5); - VECADD(current_x[j], current_x[j], temp); + if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [i].goal >= SOFTGOALSNAP)) + { + VecMulf(temp, -correction); + VECADD(current_x[j], current_x[j], temp); +} + else if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [j].goal >= SOFTGOALSNAP)) + { + VecMulf(temp, correction); + VECADD(current_x[i], current_x[i], temp); +} + else + { + VecMulf(temp, -correction*0.5); + VECADD(current_x[j], current_x[j], temp); - VECSUB(current_x[i], current_x[i], temp); - } + VECSUB(current_x[i], current_x[i], temp); +} - collisions = 1; - } - } - } - } + collisions = 1; +} +} +} +} ////////////////////////////////////////////// @@ -2558,8 +2302,8 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, ////////////////////////////////////////////// for(i = 0; i < cloth->numverts; i++) { - VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); - } + VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); +} ////////////////////////////////////////////// */ return 1; From b5974a058610f9d1f799618724d9fb890fc0be26 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 25 Nov 2007 03:46:41 +0000 Subject: [PATCH 057/430] little debug output for MT fluid --- intern/elbeem/intern/solver_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp index afc883972e2..8ec667b8cb6 100644 --- a/intern/elbeem/intern/solver_main.cpp +++ b/intern/elbeem/intern/solver_main.cpp @@ -363,7 +363,9 @@ LbmFsgrSolver::mainLoop(int lev) const int cutMin = 1; const int cutConst = mCutoff+2; - +#if PARALLEL==1 + printf("omp_get_num_threads: %d\n", omp_get_num_threads()); +#endif # if LBM_INCLUDE_TESTSOLVERS==1 // 3d region off... quit From c8a412cdcb4059990c2e23f42ee54691daedf13a Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 25 Nov 2007 21:14:52 +0000 Subject: [PATCH 058/430] Commit of fluid fix for 32/64bit and max 2.5gb ram issue --- intern/elbeem/intern/loop_tools.h | 2 +- intern/elbeem/intern/solver_init.cpp | 5 +++-- intern/elbeem/intern/solver_main.cpp | 5 +---- source/blender/blenkernel/BKE_cloth.h | 1 + source/blender/blenkernel/intern/implicit.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/intern/elbeem/intern/loop_tools.h b/intern/elbeem/intern/loop_tools.h index 70ecb9ce3e0..8ff51039bf2 100644 --- a/intern/elbeem/intern/loop_tools.h +++ b/intern/elbeem/intern/loop_tools.h @@ -91,7 +91,7 @@ calcListEmpty.reserve(mListEmpty.capacity() / omp_get_num_threads() ); \ calcListFull.reserve( mListFull.capacity() / omp_get_num_threads() ); \ calcListParts.reserve(mSizex); \ - \ + printf("omp_get_num_threads: %d\n", omp_get_num_threads()); \ \ const int id = omp_get_thread_num(); \ const int Nthrds = omp_get_num_threads(); \ diff --git a/intern/elbeem/intern/solver_init.cpp b/intern/elbeem/intern/solver_init.cpp index b0ce130c136..105c8ff3094 100644 --- a/intern/elbeem/intern/solver_init.cpp +++ b/intern/elbeem/intern/solver_init.cpp @@ -703,11 +703,12 @@ bool LbmFsgrSolver::initializeSolverMemory() memBlockAllocProblem = true; } #endif // Mac - if(sizeof(int)==4 && memEstFine>maxDefaultMemChunk) { + if(sizeof(void *)==4 && memEstFine>maxDefaultMemChunk) { // max memory chunk for 32bit systems 2gig memBlockAllocProblem = true; + } - + if(memEstFromFunc>memLimit || memBlockAllocProblem) { sizeReduction *= 0.9; mSizex = (int)(orgSx * sizeReduction); diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp index 8ec667b8cb6..0f788af7955 100644 --- a/intern/elbeem/intern/solver_main.cpp +++ b/intern/elbeem/intern/solver_main.cpp @@ -363,10 +363,7 @@ LbmFsgrSolver::mainLoop(int lev) const int cutMin = 1; const int cutConst = mCutoff+2; -#if PARALLEL==1 - printf("omp_get_num_threads: %d\n", omp_get_num_threads()); -#endif - + # if LBM_INCLUDE_TESTSOLVERS==1 // 3d region off... quit if((mUseTestdata)&&(mpTest->mFarfMode>0)) { return; } diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 38cd54085f5..f83cf0515df 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -63,6 +63,7 @@ typedef struct ClothVertex { float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ unsigned int impulse_count; /* same as above */ + float collball; } ClothVertex; typedef struct ClothSpring { diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 6f8f96e58fb..0f8357cee25 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1465,7 +1465,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase } // call collision function - result = 0; // cloth_bvh_objcollision(clmd, step + dt, step, dt); + result = cloth_bvh_objcollision(clmd, step + dt, step, dt); // copy corrected positions back to simulation if(result) From bc2c9336fdb6baf21bba58e042cbd4b039e25971 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 26 Nov 2007 00:26:29 +0000 Subject: [PATCH 059/430] ccherrett pre-alpha subsurf openmp code --- intern/elbeem/intern/isosurface.cpp | 53 ++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp index 9925565b85d..5d20e68ef34 100644 --- a/intern/elbeem/intern/isosurface.cpp +++ b/intern/elbeem/intern/isosurface.cpp @@ -156,13 +156,6 @@ void IsoSurface::triangulate( void ) mpEdgeVerticesZ[i] = -1; } - ntlVec3Gfx pos[8]; - float value[8]; - int cubeIndex; // index entry of the cube - int triIndices[12]; // vertex indices - int *eVert[12]; - IsoLevelVertex ilv; - // edges between which points? const int mcEdges[24] = { 0,1, 1,2, 2,3, 3,0, @@ -189,7 +182,12 @@ void IsoSurface::triangulate( void ) px = mStart[0]-gsx*0.5; for(int i=1;i<(mSizex-2);i++) { px += gsx; - + int cubeIndex; // index entry of the cube + float value[8]; + int triIndices[12]; // vertex indices + int *eVert[12]; + IsoLevelVertex ilv; + value[0] = *getData(i ,j ,k ); value[1] = *getData(i+1,j ,k ); value[2] = *getData(i+1,j+1,k ); @@ -235,6 +233,7 @@ void IsoSurface::triangulate( void ) eVert[11] = &mpEdgeVerticesZ[ ISOLEVEL_INDEX( i+0, j+1, edgek+0) ]; // grid positions + ntlVec3Gfx pos[8]; pos[0] = ntlVec3Gfx(px ,py ,pz); pos[1] = ntlVec3Gfx(px+gsx,py ,pz); pos[2] = ntlVec3Gfx(px+gsx,py+gsy,pz); @@ -340,10 +339,7 @@ void IsoSurface::triangulate( void ) if(mUseFullEdgeArrays) { errMsg("IsoSurface::triangulate","Disabling mUseFullEdgeArrays!"); } - - // subdiv local arrays - gfxReal orgval[8]; - gfxReal subdAr[2][11][11]; // max 10 subdivs! + ParticleObject* *arppnt = new ParticleObject*[mSizez*mSizey*mSizex]; // construct pointers @@ -404,13 +400,27 @@ void IsoSurface::triangulate( void ) debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"< mPoints; + */ +#pragma omp parallel for for(int ok=1;ok<(mSizez-2)*mSubdivs;ok++) { pz += gsz; const int k = ok/mSubdivs; if(k<=0) continue; // skip zero plane for(int j=1;j<(mSizey-2);j++) { for(int i=1;i<(mSizex-2);i++) { - + float value[8]; + ntlVec3Gfx pos[8]; + int cubeIndex; // index entry of the cube + int triIndices[12]; // vertex indices + int *eVert[12]; + IsoLevelVertex ilv; + gfxReal orgval[8]; + gfxReal subdAr[2][11][11]; // max 10 subdivs! + orgval[0] = *getData(i ,j ,k ); orgval[1] = *getData(i+1,j ,k ); orgval[2] = *getData(i+1,j+1,k ); // with subdivs @@ -422,6 +432,7 @@ void IsoSurface::triangulate( void ) // prebuild subsampled array slice const int sdkOffset = ok-k*mSubdivs; + for(int sdk=0; sdk<2; sdk++) for(int sdj=0; sdj Date: Mon, 26 Nov 2007 00:57:46 +0000 Subject: [PATCH 060/430] Insert revert point (segfault) --- intern/elbeem/intern/isosurface.cpp | 57 ++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp index 5d20e68ef34..0e3d37ea494 100644 --- a/intern/elbeem/intern/isosurface.cpp +++ b/intern/elbeem/intern/isosurface.cpp @@ -18,6 +18,8 @@ #define round(x) (x) #endif +#include + /****************************************************************************** * Constructor *****************************************************************************/ @@ -400,17 +402,28 @@ void IsoSurface::triangulate( void ) debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"< mPoints; - */ -#pragma omp parallel for + vector calcPoints; + vector calcIndices; + const int id = omp_get_thread_num(); + const int Nthrds = omp_get_num_threads(); + + const int Nj = (mSizey-2); + + int jstart = 0+( id * (Nj / Nthrds) ); + int jend = 0+( (id+1) * (Nj / Nthrds) ); + + if(jstart<1) jstart = 1; + if(jend>(mSizey-2)) jend = (mSizey-2); + + for(int ok=1;ok<(mSizez-2)*mSubdivs;ok++) { pz += gsz; const int k = ok/mSubdivs; if(k<=0) continue; // skip zero plane - for(int j=1;j<(mSizey-2);j++) { + for(int j=jstart;j Date: Mon, 26 Nov 2007 01:04:01 +0000 Subject: [PATCH 061/430] Reverted to rev 12673 + test for ccherett --- intern/elbeem/intern/isosurface.cpp | 62 +++++++---------------------- 1 file changed, 15 insertions(+), 47 deletions(-) diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp index 0e3d37ea494..3be4097a38a 100644 --- a/intern/elbeem/intern/isosurface.cpp +++ b/intern/elbeem/intern/isosurface.cpp @@ -18,8 +18,6 @@ #define round(x) (x) #endif -#include - /****************************************************************************** * Constructor *****************************************************************************/ @@ -134,7 +132,7 @@ void IsoSurface::triangulate( void ) { double gsx,gsy,gsz; // grid spacing in x,y,z direction double px,py,pz; // current position in grid in x,y,z direction - IsoLevelCube cubie; // struct for a small subcube + // IsoLevelCube cubie; // struct for a small subcube myTime_t tritimestart = getTime(); if(!mpData) { @@ -402,28 +400,12 @@ void IsoSurface::triangulate( void ) debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"< calcPoints; - vector calcIndices; - const int id = omp_get_thread_num(); - const int Nthrds = omp_get_num_threads(); - - const int Nj = (mSizey-2); - - int jstart = 0+( id * (Nj / Nthrds) ); - int jend = 0+( (id+1) * (Nj / Nthrds) ); - - if(jstart<1) jstart = 1; - if(jend>(mSizey-2)) jend = (mSizey-2); - - for(int ok=1;ok<(mSizez-2)*mSubdivs;ok++) { pz += gsz; const int k = ok/mSubdivs; if(k<=0) continue; // skip zero plane - for(int j=jstart;j Date: Mon, 26 Nov 2007 02:41:06 +0000 Subject: [PATCH 062/430] New feature: Fluids internal subdiv (level >=2) uses OpenMP now --- intern/elbeem/intern/isosurface.cpp | 81 +++++++++++++++++++++++------ intern/elbeem/intern/loop_tools.h | 2 +- 2 files changed, 66 insertions(+), 17 deletions(-) diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp index 3be4097a38a..6f8c6b11866 100644 --- a/intern/elbeem/intern/isosurface.cpp +++ b/intern/elbeem/intern/isosurface.cpp @@ -18,6 +18,10 @@ #define round(x) (x) #endif +#if PARALLEL==1 +#include +#endif + /****************************************************************************** * Constructor *****************************************************************************/ @@ -132,7 +136,7 @@ void IsoSurface::triangulate( void ) { double gsx,gsy,gsz; // grid spacing in x,y,z direction double px,py,pz; // current position in grid in x,y,z direction - // IsoLevelCube cubie; // struct for a small subcube + IsoLevelCube cubie; // struct for a small subcube myTime_t tritimestart = getTime(); if(!mpData) { @@ -327,6 +331,16 @@ void IsoSurface::triangulate( void ) ( (fi))*(1.-(fj))*( (fk))*orgval[5] + \ ( (fi))*( (fj))*( (fk))*orgval[6] + \ (1.-(fi))*( (fj))*( (fk))*orgval[7] ) + +#if PARALLEL==1 +#define LIST_POINT(x) calcPoints.push_back(x); +#define LIST_POINT_SIZE calcPoints.size() +#define LIST_INDEX(x) calcIndices.push_back(x); +#else +#define LIST_POINT(x) mPoints.push_back(x); +#define LIST_POINT_SIZE mPoints.size() +#define LIST_INDEX(x) mIndices.push_back(x); +#endif // use subdivisions gfxReal subdfac = 1./(gfxReal)(mSubdivs); @@ -400,12 +414,31 @@ void IsoSurface::triangulate( void ) debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"< calcPoints; + vector calcIndices; + const int id = omp_get_thread_num(); + const int Nthrds = omp_get_num_threads(); + + const int Nj = (mSizey-2); + + int jstart = 0+( id * (Nj / Nthrds) ); + int jend = 0+( (id+1) * (Nj / Nthrds) ); + + if(jstart<1) jstart = 1; + if(jend>(mSizey-2)) jend = (mSizey-2); +#else + int jstart = 1; + int jend = (mSizey-2); +#endif + for(int ok=1;ok<(mSizez-2)*mSubdivs;ok++) { pz += gsz; const int k = ok/mSubdivs; if(k<=0) continue; // skip zero plane -#pragma omp parallel for - for(int j=1;j<(mSizey-2);j++) { + for(int j=jstart;j Date: Mon, 26 Nov 2007 14:50:27 +0000 Subject: [PATCH 063/430] Segfault revert, MT should work fine again for subdiv fluids --- intern/elbeem/intern/isosurface.cpp | 1125 +++++++++++++-------------- intern/elbeem/intern/loop_tools.h | 20 +- intern/elbeem/intern/paraloopend.h | 6 +- 3 files changed, 551 insertions(+), 600 deletions(-) diff --git a/intern/elbeem/intern/isosurface.cpp b/intern/elbeem/intern/isosurface.cpp index 6f8c6b11866..77530d413c7 100644 --- a/intern/elbeem/intern/isosurface.cpp +++ b/intern/elbeem/intern/isosurface.cpp @@ -18,32 +18,28 @@ #define round(x) (x) #endif -#if PARALLEL==1 -#include -#endif - /****************************************************************************** * Constructor *****************************************************************************/ IsoSurface::IsoSurface(double iso) : - ntlGeometryObject(), - mSizex(-1), mSizey(-1), mSizez(-1), - mpData(NULL), - mIsoValue( iso ), - mPoints(), - mUseFullEdgeArrays(false), - mpEdgeVerticesX(NULL), mpEdgeVerticesY(NULL), mpEdgeVerticesZ(NULL), - mEdgeArSize(-1), - mIndices(), + ntlGeometryObject(), + mSizex(-1), mSizey(-1), mSizez(-1), + mpData(NULL), + mIsoValue( iso ), + mPoints(), + mUseFullEdgeArrays(false), + mpEdgeVerticesX(NULL), mpEdgeVerticesY(NULL), mpEdgeVerticesZ(NULL), + mEdgeArSize(-1), + mIndices(), - mStart(0.0), mEnd(0.0), mDomainExtent(0.0), - mInitDone(false), - mSmoothSurface(0.0), mSmoothNormals(0.0), - mAcrossEdge(), mAdjacentFaces(), - mCutoff(-1), mCutArray(NULL), // off by default - mpIsoParts(NULL), mPartSize(0.), mSubdivs(0), - mFlagCnt(1), - mSCrad1(0.), mSCrad2(0.), mSCcenter(0.) + mStart(0.0), mEnd(0.0), mDomainExtent(0.0), + mInitDone(false), + mSmoothSurface(0.0), mSmoothNormals(0.0), + mAcrossEdge(), mAdjacentFaces(), + mCutoff(-1), mCutArray(NULL), // off by default + mpIsoParts(NULL), mPartSize(0.), mSubdivs(0), + mFlagCnt(1), + mSCrad1(0.), mSCrad2(0.), mSCcenter(0.) { } @@ -75,11 +71,11 @@ void IsoSurface::initializeIsosurface(int setx, int sety, int setz, ntlVec3Gfx e // init mIndices.clear(); - mPoints.clear(); + mPoints.clear(); int nodes = mSizez*mSizey*mSizex; - mpData = new float[nodes]; - for(int i=0;i0) && (kmSizex-2-coAdd-mCutoff) || - (j>mSizey-2-coAdd-mCutoff) ) { - if(mCutArray) { - if(k < mCutArray[j*this->mSizex+i]) continue; - } else { continue; } - } + if( (i0) && (kmSizex-2-coAdd-mCutoff) || + (j>mSizey-2-coAdd-mCutoff) ) { + if(mCutArray) { + if(k < mCutArray[j*this->mSizex+i]) continue; + } else { continue; } + } // Create the triangles... - for(int e=0; mcTriTable[cubeIndex][e]!=-1; e+=3) { - mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+0] ] ); - mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+1] ] ); - mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+2] ] ); - } + for(int e=0; mcTriTable[cubeIndex][e]!=-1; e+=3) { + mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+0] ] ); + mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+1] ] ); + mIndices.push_back( triIndices[ mcTriTable[cubeIndex][e+2] ] ); + } - }//i - }// j + }//i + }// j // copy edge arrays - if(!mUseFullEdgeArrays) { - for(int j=0;j<(mSizey-0);j++) - for(int i=0;i<(mSizex-0);i++) { + if(!mUseFullEdgeArrays) { + for(int j=0;j<(mSizey-0);j++) + for(int i=0;i<(mSizex-0);i++) { //int edgek = 0; - const int dst = ISOLEVEL_INDEX( i+0, j+0, 0); - const int src = ISOLEVEL_INDEX( i+0, j+0, 1); - mpEdgeVerticesX[ dst ] = mpEdgeVerticesX[ src ]; - mpEdgeVerticesY[ dst ] = mpEdgeVerticesY[ src ]; - mpEdgeVerticesZ[ dst ] = mpEdgeVerticesZ[ src ]; - mpEdgeVerticesX[ src ]=-1; - mpEdgeVerticesY[ src ]=-1; - mpEdgeVerticesZ[ src ]=-1; - } - } // */ + const int dst = ISOLEVEL_INDEX( i+0, j+0, 0); + const int src = ISOLEVEL_INDEX( i+0, j+0, 1); + mpEdgeVerticesX[ dst ] = mpEdgeVerticesX[ src ]; + mpEdgeVerticesY[ dst ] = mpEdgeVerticesY[ src ]; + mpEdgeVerticesZ[ dst ] = mpEdgeVerticesZ[ src ]; + mpEdgeVerticesX[ src ]=-1; + mpEdgeVerticesY[ src ]=-1; + mpEdgeVerticesZ[ src ]=-1; + } + } // */ - } // k + } // k // precalculate normals using an approximation of the scalar field gradient - for(int ni=0;ni<(int)mPoints.size();ni++) { normalize( mPoints[ni].n ); } + for(int ni=0;ni<(int)mPoints.size();ni++) { normalize( mPoints[ni].n ); } - } else { // subdivs + } else { // subdivs #define EDGEAR_INDEX(Ai,Aj,Ak, Bi,Bj) ((mSizex*mSizey*mSubdivs*mSubdivs*(Ak))+\ - (mSizex*mSubdivs*((Aj)*mSubdivs+(Bj)))+((Ai)*mSubdivs)+(Bi)) + (mSizex*mSubdivs*((Aj)*mSubdivs+(Bj)))+((Ai)*mSubdivs)+(Bi)) #define ISOTRILININT(fi,fj,fk) ( \ - (1.-(fi))*(1.-(fj))*(1.-(fk))*orgval[0] + \ - ( (fi))*(1.-(fj))*(1.-(fk))*orgval[1] + \ - ( (fi))*( (fj))*(1.-(fk))*orgval[2] + \ - (1.-(fi))*( (fj))*(1.-(fk))*orgval[3] + \ - (1.-(fi))*(1.-(fj))*( (fk))*orgval[4] + \ - ( (fi))*(1.-(fj))*( (fk))*orgval[5] + \ - ( (fi))*( (fj))*( (fk))*orgval[6] + \ - (1.-(fi))*( (fj))*( (fk))*orgval[7] ) - -#if PARALLEL==1 -#define LIST_POINT(x) calcPoints.push_back(x); -#define LIST_POINT_SIZE calcPoints.size() -#define LIST_INDEX(x) calcIndices.push_back(x); -#else -#define LIST_POINT(x) mPoints.push_back(x); -#define LIST_POINT_SIZE mPoints.size() -#define LIST_INDEX(x) mIndices.push_back(x); -#endif + (1.-(fi))*(1.-(fj))*(1.-(fk))*orgval[0] + \ + ( (fi))*(1.-(fj))*(1.-(fk))*orgval[1] + \ + ( (fi))*( (fj))*(1.-(fk))*orgval[2] + \ + (1.-(fi))*( (fj))*(1.-(fk))*orgval[3] + \ + (1.-(fi))*(1.-(fj))*( (fk))*orgval[4] + \ + ( (fi))*(1.-(fj))*( (fk))*orgval[5] + \ + ( (fi))*( (fj))*( (fk))*orgval[6] + \ + (1.-(fi))*( (fj))*( (fk))*orgval[7] ) // use subdivisions - gfxReal subdfac = 1./(gfxReal)(mSubdivs); - gfxReal orgGsx = gsx; - gfxReal orgGsy = gsy; - gfxReal orgGsz = gsz; - gsx *= subdfac; - gsy *= subdfac; - gsz *= subdfac; - if(mUseFullEdgeArrays) { - errMsg("IsoSurface::triangulate","Disabling mUseFullEdgeArrays!"); - } + gfxReal subdfac = 1./(gfxReal)(mSubdivs); + gfxReal orgGsx = gsx; + gfxReal orgGsy = gsy; + gfxReal orgGsz = gsz; + gsx *= subdfac; + gsy *= subdfac; + gsz *= subdfac; + if(mUseFullEdgeArrays) { + errMsg("IsoSurface::triangulate","Disabling mUseFullEdgeArrays!"); + } - ParticleObject* *arppnt = new ParticleObject*[mSizez*mSizey*mSizex]; + ParticleObject* *arppnt = new ParticleObject*[mSizez*mSizey*mSizex]; // construct pointers // part test - int pInUse = 0; - int pUsedTest = 0; + int pInUse = 0; + int pUsedTest = 0; // reset particles // reset list array - for(int k=0;k<(mSizez);k++) - for(int j=0;j<(mSizey);j++) - for(int i=0;i<(mSizex);i++) { - arppnt[ISOLEVEL_INDEX(i,j,k)] = NULL; - } - if(mpIsoParts) { - for(vector::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { - if( (*pit).getActive()==false ) continue; - if( (*pit).getType()!=PART_DROP) continue; - (*pit).setNext(NULL); - } + for(int k=0;k<(mSizez);k++) + for(int j=0;j<(mSizey);j++) + for(int i=0;i<(mSizex);i++) { + arppnt[ISOLEVEL_INDEX(i,j,k)] = NULL; + } + if(mpIsoParts) { + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { + if( (*pit).getActive()==false ) continue; + if( (*pit).getType()!=PART_DROP) continue; + (*pit).setNext(NULL); + } // build per node lists - for(vector::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { - if( (*pit).getActive()==false ) continue; - if( (*pit).getType()!=PART_DROP) continue; + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { + if( (*pit).getActive()==false ) continue; + if( (*pit).getType()!=PART_DROP) continue; // check lifetime ignored here - ParticleObject *p = &(*pit); - const ntlVec3Gfx ppos = p->getPos(); - const int pi= (int)round(ppos[0])+0; - const int pj= (int)round(ppos[1])+0; - int pk= (int)round(ppos[2])+0;// no offset necessary + ParticleObject *p = &(*pit); + const ntlVec3Gfx ppos = p->getPos(); + const int pi= (int)round(ppos[0])+0; + const int pj= (int)round(ppos[1])+0; + int pk= (int)round(ppos[2])+0;// no offset necessary // 2d should be handled by solver. if(LBMDIM==2) { pk = 0; } - if(pi<0) continue; - if(pj<0) continue; - if(pk<0) continue; - if(pi>mSizex-1) continue; - if(pj>mSizey-1) continue; - if(pk>mSizez-1) continue; - ParticleObject* &pnt = arppnt[ISOLEVEL_INDEX(pi,pj,pk)]; - if(pnt) { + if(pi<0) continue; + if(pj<0) continue; + if(pk<0) continue; + if(pi>mSizex-1) continue; + if(pj>mSizey-1) continue; + if(pk>mSizez-1) continue; + ParticleObject* &pnt = arppnt[ISOLEVEL_INDEX(pi,pj,pk)]; + if(pnt) { // append - ParticleObject* listpnt = pnt; - while(listpnt) { - if(!listpnt->getNext()) { - listpnt->setNext(p); listpnt = NULL; - } else { - listpnt = listpnt->getNext(); - } - } - } else { + ParticleObject* listpnt = pnt; + while(listpnt) { + if(!listpnt->getNext()) { + listpnt->setNext(p); listpnt = NULL; + } else { + listpnt = listpnt->getNext(); + } + } + } else { // start new list - pnt = p; - } - pInUse++; - } - } // mpIsoParts + pnt = p; + } + pInUse++; + } + } // mpIsoParts - debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"< calcPoints; - vector calcIndices; - const int id = omp_get_thread_num(); - const int Nthrds = omp_get_num_threads(); - - const int Nj = (mSizey-2); - - int jstart = 0+( id * (Nj / Nthrds) ); - int jend = 0+( (id+1) * (Nj / Nthrds) ); - - if(jstart<1) jstart = 1; - if(jend>(mSizey-2)) jend = (mSizey-2); -#else - int jstart = 1; - int jend = (mSizey-2); -#endif - - for(int ok=1;ok<(mSizez-2)*mSubdivs;ok++) { - pz += gsz; - const int k = ok/mSubdivs; - if(k<=0) continue; // skip zero plane - for(int j=jstart;j=mSizez-1) continue; - for(int poj=-poDistOffset; poj<1+poDistOffset; poj++) { - if(j+poj<0) continue; - if(j+poj>=mSizey-1) continue; - for(int poi=-poDistOffset; poi<1+poDistOffset; poi++) { - if(i+poi<0) continue; - if(i+poi>=mSizex-1) continue; - ParticleObject *p; - p = arppnt[ISOLEVEL_INDEX(i+poi,j+poj,k+pok)]; - while(p) { // */ + const int poDistOffset=2; + for(int pok=-poDistOffset; pok<1+poDistOffset; pok++) { + if(k+pok<0) continue; + if(k+pok>=mSizez-1) continue; + for(int poj=-poDistOffset; poj<1+poDistOffset; poj++) { + if(j+poj<0) continue; + if(j+poj>=mSizey-1) continue; + for(int poi=-poDistOffset; poi<1+poDistOffset; poi++) { + if(i+poi<0) continue; + if(i+poi>=mSizex-1) continue; + ParticleObject *p; + p = arppnt[ISOLEVEL_INDEX(i+poi,j+poj,k+pok)]; + while(p) { // */ /* - for(vector::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { { { { + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { { { { // debug test! , full list slow! - if(( (*pit).getActive()==false ) || ( (*pit).getType()!=PART_DROP)) continue; - ParticleObject *p; - p = &(*pit); // */ + if(( (*pit).getActive()==false ) || ( (*pit).getType()!=PART_DROP)) continue; + ParticleObject *p; + p = &(*pit); // */ - pUsedTest++; - ntlVec3Gfx ppos = p->getPos(); - const int spi= (int)round( (ppos[0]+1.-(gfxReal)i) *(gfxReal)mSubdivs-1.5); - const int spj= (int)round( (ppos[1]+1.-(gfxReal)j) *(gfxReal)mSubdivs-1.5); - const int spk= (int)round( (ppos[2]+1.-(gfxReal)k) *(gfxReal)mSubdivs-1.5)-sdkOffset; // why -2? + pUsedTest++; + ntlVec3Gfx ppos = p->getPos(); + const int spi= (int)round( (ppos[0]+1.-(gfxReal)i) *(gfxReal)mSubdivs-1.5); + const int spj= (int)round( (ppos[1]+1.-(gfxReal)j) *(gfxReal)mSubdivs-1.5); + const int spk= (int)round( (ppos[2]+1.-(gfxReal)k) *(gfxReal)mSubdivs-1.5)-sdkOffset; // why -2? // 2d should be handled by solver. if(LBMDIM==2) { spk = 0; } - gfxReal pfLen = p->getSize()*1.5*mPartSize; // test, was 1.1 - const gfxReal minPfLen = subdfac*0.8; - if(pfLengetSize()*1.5*mPartSize; // test, was 1.1 + const gfxReal minPfLen = subdfac*0.8; + if(pfLengetSize()<<" ps"< 1) { continue; } // */ - for(int swj=-icellpsize; swj<=icellpsize; swj++) { - if(spj+swj< 0) { continue; } - if(spj+swj>mSubdivs+0) { continue; } // */ - for(int swi=-icellpsize; swi<=icellpsize; swi++) { - if(spi+swi< 0) { continue; } - if(spi+swi>mSubdivs+0) { continue; } // */ - ntlVec3Gfx cellp = ntlVec3Gfx( + const int icellpsize = (int)(1.*pfLen*(gfxReal)mSubdivs)+1; + for(int swk=-icellpsize; swk<=icellpsize; swk++) { + if(spk+swk< 0) { continue; } + if(spk+swk> 1) { continue; } // */ + for(int swj=-icellpsize; swj<=icellpsize; swj++) { + if(spj+swj< 0) { continue; } + if(spj+swj>mSubdivs+0) { continue; } // */ + for(int swi=-icellpsize; swi<=icellpsize; swi++) { + if(spi+swi< 0) { continue; } + if(spi+swi>mSubdivs+0) { continue; } // */ + ntlVec3Gfx cellp = ntlVec3Gfx( (1.5+(gfxReal)(spi+swi)) *subdfac + (gfxReal)(i-1), (1.5+(gfxReal)(spj+swj)) *subdfac + (gfxReal)(j-1), (1.5+(gfxReal)(spk+swk)+sdkOffset) *subdfac + (gfxReal)(k-1) ); //if(swi==0 && swj==0 && swk==0) subdAr[spk][spj][spi] = 1.; // DEBUG // clip domain boundaries again - if(cellp[0]<1.) { continue; } - if(cellp[1]<1.) { continue; } - if(cellp[2]<1.) { continue; } - if(cellp[0]>(gfxReal)mSizex-3.) { continue; } - if(cellp[1]>(gfxReal)mSizey-3.) { continue; } - if(cellp[2]>(gfxReal)mSizez-3.) { continue; } - gfxReal len = norm(cellp-ppos); - gfxReal isoadd = 0.; - const gfxReal baseIsoVal = mIsoValue*1.1; - if(len(gfxReal)mSizex-3.) { continue; } + if(cellp[1]>(gfxReal)mSizey-3.) { continue; } + if(cellp[2]>(gfxReal)mSizez-3.) { continue; } + gfxReal len = norm(cellp-ppos); + gfxReal isoadd = 0.; + const gfxReal baseIsoVal = mIsoValue*1.1; + if(len1.) { continue; } - subdAr[spk+swk][spj+swj][spi+swi] = arval + isoadd; - } } } + const gfxReal arval = subdAr[spk+swk][spj+swj][spi+swi]; + if(arval>1.) { continue; } + subdAr[spk+swk][spj+swj][spi+swi] = arval + isoadd; + } } } - p = p->getNext(); - } - } } } // poDist loops */ + p = p->getNext(); + } + } } } // poDist loops */ - py = mStart[1]+(((double)j-0.5)*orgGsy)-gsy; - for(int sj=0;sj 0) { + if (mcEdgeTable[cubeIndex] > 0) { // where to look up if this point already exists - const int edgek = 0; - const int baseIn = EDGEAR_INDEX( i+0, j+0, edgek+0, si,sj); - eVert[ 0] = &mpEdgeVerticesX[ baseIn ]; - eVert[ 1] = &mpEdgeVerticesY[ baseIn + 1 ]; - eVert[ 2] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; - eVert[ 3] = &mpEdgeVerticesY[ baseIn ]; + const int edgek = 0; + const int baseIn = EDGEAR_INDEX( i+0, j+0, edgek+0, si,sj); + eVert[ 0] = &mpEdgeVerticesX[ baseIn ]; + eVert[ 1] = &mpEdgeVerticesY[ baseIn + 1 ]; + eVert[ 2] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; + eVert[ 3] = &mpEdgeVerticesY[ baseIn ]; - eVert[ 4] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; - eVert[ 5] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+1,sj+0) ]; // with subdivs - eVert[ 6] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+1) ]; - eVert[ 7] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; + eVert[ 4] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; + eVert[ 5] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+1,sj+0) ]; // with subdivs + eVert[ 6] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+1) ]; + eVert[ 7] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; - eVert[ 8] = &mpEdgeVerticesZ[ baseIn ]; - eVert[ 9] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+0) ]; // with subdivs - eVert[10] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+1) ]; - eVert[11] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; + eVert[ 8] = &mpEdgeVerticesZ[ baseIn ]; + eVert[ 9] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+0) ]; // with subdivs + eVert[10] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+1) ]; + eVert[11] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; // grid positions - pos[0] = ntlVec3Gfx(px ,py ,pz); - pos[1] = ntlVec3Gfx(px+gsx,py ,pz); - pos[2] = ntlVec3Gfx(px+gsx,py+gsy,pz); // with subdivs - pos[3] = ntlVec3Gfx(px ,py+gsy,pz); - pos[4] = ntlVec3Gfx(px ,py ,pz+gsz); - pos[5] = ntlVec3Gfx(px+gsx,py ,pz+gsz); - pos[6] = ntlVec3Gfx(px+gsx,py+gsy,pz+gsz); // with subdivs - pos[7] = ntlVec3Gfx(px ,py+gsy,pz+gsz); + pos[0] = ntlVec3Gfx(px ,py ,pz); + pos[1] = ntlVec3Gfx(px+gsx,py ,pz); + pos[2] = ntlVec3Gfx(px+gsx,py+gsy,pz); // with subdivs + pos[3] = ntlVec3Gfx(px ,py+gsy,pz); + pos[4] = ntlVec3Gfx(px ,py ,pz+gsz); + pos[5] = ntlVec3Gfx(px+gsx,py ,pz+gsz); + pos[6] = ntlVec3Gfx(px+gsx,py+gsy,pz+gsz); // with subdivs + pos[7] = ntlVec3Gfx(px ,py+gsy,pz+gsz); // check all edges - for(int e=0;e<12;e++) { - if (mcEdgeTable[cubeIndex] & (1<0) { + float smoSubdfac = 1.; + if(mSubdivs>0) { //smoSubdfac = 1./(float)(mSubdivs); - smoSubdfac = pow(0.55,(double)mSubdivs); // slightly stronger - } - if(mSmoothSurface>0. || mSmoothNormals>0.) debMsgStd("IsoSurface::triangulate",DM_MSG,"Smoothing...",10); - if(mSmoothSurface>0.0) { - smoothSurface(mSmoothSurface*smoSubdfac, (mSmoothNormals<=0.0) ); - } - if(mSmoothNormals>0.0) { - smoothNormals(mSmoothNormals*smoSubdfac); - } + smoSubdfac = pow(0.55,(double)mSubdivs); // slightly stronger + } + if(mSmoothSurface>0. || mSmoothNormals>0.) debMsgStd("IsoSurface::triangulate",DM_MSG,"Smoothing...",10); + if(mSmoothSurface>0.0) { + smoothSurface(mSmoothSurface*smoSubdfac, (mSmoothNormals<=0.0) ); + } + if(mSmoothNormals>0.0) { + smoothNormals(mSmoothNormals*smoSubdfac); + } - myTime_t tritimeend = getTime(); - debMsgStd("IsoSurface::triangulate",DM_MSG,"took "<< getTimeString(tritimeend-tritimestart)<<", S("<getNumParticles(), 10); + myTime_t tritimeend = getTime(); + debMsgStd("IsoSurface::triangulate",DM_MSG,"took "<< getTimeString(tritimeend-tritimestart)<<", S("<getNumParticles(), 10); } @@ -714,8 +665,8 @@ void IsoSurface::triangulate( void ) * Get triangles for rendering *****************************************************************************/ void IsoSurface::getTriangles(double t, vector *triangles, - vector *vertices, - vector *normals, int objectId ) + vector *vertices, + vector *normals, int objectId ) { if(!mInitDone) { debugOut("IsoSurface::getTriangles warning: Not initialized! ", 10); @@ -724,8 +675,8 @@ void IsoSurface::getTriangles(double t, vector *triangles, t = 0.; //return; // DEBUG - /* triangulate field */ - triangulate(); + /* triangulate field */ + triangulate(); //errMsg("TRIS"," "< *triangles, //errMsg("NM"," ivi"<size()<<" ns"<size()<<" ts"<size() ); //errMsg("NM"," ovs"<push_back( mPoints[i].v ); } - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { normals->push_back( mPoints[i].n ); } //errMsg("N2"," ivi"<size()<<" ns"<size()<<" ts"<size() ); //errMsg("N2"," ovs"< *triangles, if(getCastShadows() ) { flag |= TRI_CASTSHADOWS; } - /* init geo init id */ - int geoiId = getGeoInitId(); - if(geoiId > 0) { - flag |= (1<< (geoiId+4)); - flag |= mGeoInitType; - } + /* init geo init id */ + int geoiId = getGeoInitId(); + if(geoiId > 0) { + flag |= (1<< (geoiId+4)); + flag |= mGeoInitType; + } - tri.setFlags( flag ); + tri.setFlags( flag ); - /* triangle normal missing */ - tri.setNormal( ntlVec3Gfx(0.0) ); - tri.setSmoothNormals( smooth ); - tri.setObjectId( objectId ); - triangles->push_back( tri ); + /* triangle normal missing */ + tri.setNormal( ntlVec3Gfx(0.0) ); + tri.setSmoothNormals( smooth ); + tri.setObjectId( objectId ); + triangles->push_back( tri ); } //errMsg("N3"," ivi"<size()<<" ns"<size()<<" ts"<size() ); return; @@ -792,11 +743,11 @@ inline ntlVec3Gfx IsoSurface::getNormal(int i, int j,int k) { // WARNING - this requires a security boundary layer... ntlVec3Gfx ret(0.0); ret[0] = *getData(i-1,j ,k ) - - *getData(i+1,j ,k ); + *getData(i+1,j ,k ); ret[1] = *getData(i ,j-1,k ) - - *getData(i ,j+1,k ); + *getData(i ,j+1,k ); ret[2] = *getData(i ,j ,k-1 ) - - *getData(i ,j ,k+1 ); + *getData(i ,j ,k+1 ); return ret; } @@ -818,13 +769,13 @@ void IsoSurface::setSmoothRad(float radi1, float radi2, ntlVec3Gfx mscc) { // compute normals for all generated triangles void IsoSurface::computeNormals() { - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { mPoints[i].n = ntlVec3Gfx(0.); } - for(int i=0;i<(int)mIndices.size();i+=3) { - const int t1 = mIndices[i]; - const int t2 = mIndices[i+1]; + for(int i=0;i<(int)mIndices.size();i+=3) { + const int t1 = mIndices[i]; + const int t2 = mIndices[i+1]; const int t3 = mIndices[i+2]; const ntlVec3Gfx p1 = mPoints[t1].v; const ntlVec3Gfx p2 = mPoints[t2].v; @@ -841,7 +792,7 @@ void IsoSurface::computeNormals() { mPoints[t3].n += norm * (1./(len2*len3)); } - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { normalize(mPoints[i].n); } } @@ -952,86 +903,86 @@ void IsoSurface::smoothSurface(float sigma, bool normSmooth) // Edges ntlVec3Gfx e[3] = { mPoints[mIndices[i*3+2]].v - mPoints[mIndices[i*3+1]].v, - mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, - mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; + mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, + mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; // Compute corner weights - float area = 0.5f * norm( cross(e[0], e[1])); - float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; - float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), - l2[1] * (l2[2] + l2[0] - l2[1]), - l2[2] * (l2[0] + l2[1] - l2[2]) }; - if (ew[0] <= 0.0f) { - cornerareas[i][1] = -0.25f * l2[2] * area / - dot(e[0] , e[2]); - cornerareas[i][2] = -0.25f * l2[1] * area / - dot(e[0] , e[1]); - cornerareas[i][0] = area - cornerareas[i][1] - - cornerareas[i][2]; - } else if (ew[1] <= 0.0f) { - cornerareas[i][2] = -0.25f * l2[0] * area / - dot(e[1] , e[0]); - cornerareas[i][0] = -0.25f * l2[2] * area / - dot(e[1] , e[2]); - cornerareas[i][1] = area - cornerareas[i][2] - - cornerareas[i][0]; - } else if (ew[2] <= 0.0f) { - cornerareas[i][0] = -0.25f * l2[1] * area / - dot(e[2] , e[1]); - cornerareas[i][1] = -0.25f * l2[0] * area / - dot(e[2] , e[0]); - cornerareas[i][2] = area - cornerareas[i][0] - - cornerareas[i][1]; - } else { - float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); - for (int j = 0; j < 3; j++) - cornerareas[i][j] = ewscale * (ew[(j+1)%3] + - ew[(j+2)%3]); - } + float area = 0.5f * norm( cross(e[0], e[1])); + float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; + float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), + l2[1] * (l2[2] + l2[0] - l2[1]), + l2[2] * (l2[0] + l2[1] - l2[2]) }; + if (ew[0] <= 0.0f) { + cornerareas[i][1] = -0.25f * l2[2] * area / + dot(e[0] , e[2]); + cornerareas[i][2] = -0.25f * l2[1] * area / + dot(e[0] , e[1]); + cornerareas[i][0] = area - cornerareas[i][1] - + cornerareas[i][2]; + } else if (ew[1] <= 0.0f) { + cornerareas[i][2] = -0.25f * l2[0] * area / + dot(e[1] , e[0]); + cornerareas[i][0] = -0.25f * l2[2] * area / + dot(e[1] , e[2]); + cornerareas[i][1] = area - cornerareas[i][2] - + cornerareas[i][0]; + } else if (ew[2] <= 0.0f) { + cornerareas[i][0] = -0.25f * l2[1] * area / + dot(e[2] , e[1]); + cornerareas[i][1] = -0.25f * l2[0] * area / + dot(e[2] , e[0]); + cornerareas[i][2] = area - cornerareas[i][0] - + cornerareas[i][1]; + } else { + float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); + for (int j = 0; j < 3; j++) + cornerareas[i][j] = ewscale * (ew[(j+1)%3] + + ew[(j+2)%3]); + } // NT important, check this... #ifndef WIN32 - if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; - if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; - if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; + if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; + if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; + if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; #else // WIN32 // FIXME check as well... - if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; - if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; - if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; + if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; + if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; + if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; #endif // WIN32 - pointareas[mIndices[i*3+0]] += cornerareas[i][0]; - pointareas[mIndices[i*3+1]] += cornerareas[i][1]; - pointareas[mIndices[i*3+2]] += cornerareas[i][2]; + pointareas[mIndices[i*3+0]] += cornerareas[i][0]; + pointareas[mIndices[i*3+1]] += cornerareas[i][1]; + pointareas[mIndices[i*3+2]] += cornerareas[i][2]; } } // need pointarea - // */ + // */ float invsigma2 = 1.0f / (sigma*sigma); vector dflt(nv); for (int i = 0; i < nv; i++) { if(diffuseVertexField( &mPoints[0].v, 2, - i, invsigma2, dflt[i])) { + i, invsigma2, dflt[i])) { // Just keep the displacement - dflt[i] -= mPoints[i].v; - } else { dflt[i] = 0.0; } //?mPoints[i].v; } + dflt[i] -= mPoints[i].v; + } else { dflt[i] = 0.0; } //?mPoints[i].v; } } // Slightly better small-neighborhood approximation for (int i = 0; i < nf; i++) { ntlVec3Gfx c = mPoints[mIndices[i*3+0]].v + - mPoints[mIndices[i*3+1]].v + - mPoints[mIndices[i*3+2]].v; + mPoints[mIndices[i*3+1]].v + + mPoints[mIndices[i*3+2]].v; c /= 3.0f; for (int j = 0; j < 3; j++) { int v = mIndices[i*3+j]; ntlVec3Gfx d =(c - mPoints[v].v) * 0.5f; dflt[v] += d * (cornerareas[i][j] / - pointareas[mIndices[i*3+j]] * - exp(-0.5f * invsigma2 * normNoSqrt(d)) ); + pointareas[mIndices[i*3+j]] * + exp(-0.5f * invsigma2 * normNoSqrt(d)) ); } } @@ -1039,7 +990,7 @@ void IsoSurface::smoothSurface(float sigma, bool normSmooth) vector dflt2(nv); for (int i = 0; i < nv; i++) { if(diffuseVertexField( &dflt[0], 1, - i, invsigma2, dflt2[i])) { } + i, invsigma2, dflt2[i])) { } else { /*mPoints[i].v=0.0;*/ dflt2[i] = 0.0; }//dflt2[i]; } } @@ -1111,58 +1062,58 @@ void IsoSurface::smoothNormals(float sigma) { // Edges ntlVec3Gfx e[3] = { mPoints[mIndices[i*3+2]].v - mPoints[mIndices[i*3+1]].v, - mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, - mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; + mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, + mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; // Compute corner weights - float area = 0.5f * norm( cross(e[0], e[1])); - float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; - float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), - l2[1] * (l2[2] + l2[0] - l2[1]), - l2[2] * (l2[0] + l2[1] - l2[2]) }; - if (ew[0] <= 0.0f) { - cornerareas[i][1] = -0.25f * l2[2] * area / - dot(e[0] , e[2]); - cornerareas[i][2] = -0.25f * l2[1] * area / - dot(e[0] , e[1]); - cornerareas[i][0] = area - cornerareas[i][1] - - cornerareas[i][2]; - } else if (ew[1] <= 0.0f) { - cornerareas[i][2] = -0.25f * l2[0] * area / - dot(e[1] , e[0]); - cornerareas[i][0] = -0.25f * l2[2] * area / - dot(e[1] , e[2]); - cornerareas[i][1] = area - cornerareas[i][2] - - cornerareas[i][0]; - } else if (ew[2] <= 0.0f) { - cornerareas[i][0] = -0.25f * l2[1] * area / - dot(e[2] , e[1]); - cornerareas[i][1] = -0.25f * l2[0] * area / - dot(e[2] , e[0]); - cornerareas[i][2] = area - cornerareas[i][0] - - cornerareas[i][1]; - } else { - float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); - for (int j = 0; j < 3; j++) - cornerareas[i][j] = ewscale * (ew[(j+1)%3] + - ew[(j+2)%3]); - } + float area = 0.5f * norm( cross(e[0], e[1])); + float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; + float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), + l2[1] * (l2[2] + l2[0] - l2[1]), + l2[2] * (l2[0] + l2[1] - l2[2]) }; + if (ew[0] <= 0.0f) { + cornerareas[i][1] = -0.25f * l2[2] * area / + dot(e[0] , e[2]); + cornerareas[i][2] = -0.25f * l2[1] * area / + dot(e[0] , e[1]); + cornerareas[i][0] = area - cornerareas[i][1] - + cornerareas[i][2]; + } else if (ew[1] <= 0.0f) { + cornerareas[i][2] = -0.25f * l2[0] * area / + dot(e[1] , e[0]); + cornerareas[i][0] = -0.25f * l2[2] * area / + dot(e[1] , e[2]); + cornerareas[i][1] = area - cornerareas[i][2] - + cornerareas[i][0]; + } else if (ew[2] <= 0.0f) { + cornerareas[i][0] = -0.25f * l2[1] * area / + dot(e[2] , e[1]); + cornerareas[i][1] = -0.25f * l2[0] * area / + dot(e[2] , e[0]); + cornerareas[i][2] = area - cornerareas[i][0] - + cornerareas[i][1]; + } else { + float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); + for (int j = 0; j < 3; j++) + cornerareas[i][j] = ewscale * (ew[(j+1)%3] + + ew[(j+2)%3]); + } // NT important, check this... #ifndef WIN32 - if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; - if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; - if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; + if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; + if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; + if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; #else // WIN32 // FIXME check as well... - if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; - if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; - if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; + if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; + if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; + if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; #endif // WIN32 - pointareas[mIndices[i*3+0]] += cornerareas[i][0]; - pointareas[mIndices[i*3+1]] += cornerareas[i][1]; - pointareas[mIndices[i*3+2]] += cornerareas[i][2]; + pointareas[mIndices[i*3+0]] += cornerareas[i][0]; + pointareas[mIndices[i*3+1]] += cornerareas[i][1]; + pointareas[mIndices[i*3+2]] += cornerareas[i][2]; } } // need pointarea diff --git a/intern/elbeem/intern/loop_tools.h b/intern/elbeem/intern/loop_tools.h index 70ecb9ce3e0..163965901e8 100644 --- a/intern/elbeem/intern/loop_tools.h +++ b/intern/elbeem/intern/loop_tools.h @@ -34,7 +34,7 @@ // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #define GRID_REGION_START() \ - { /* main_region */ \ +{ /* main_region */ \ int kstart=getForZMinBnd(), kend=getForZMaxBnd(mMaxRefine); \ if(gridLoopBound>0){ kstart=getForZMin1(), kend=getForZMax1(mMaxRefine); } \ int kdir = 1; \ @@ -49,7 +49,7 @@ kend = kstart-1; \ kstart = temp-1; \ temp = id; /* dummy remove warning */ \ - } \ +} \ @@ -74,13 +74,13 @@ // loop start #define GRID_REGION_START() \ - { \ +{ \ \ \ if(mSizez<2) { \ mPanic = 1; \ errFatal("ParaLoop::2D","Not valid...!", SIMWORLD_GENERICERROR); \ - } \ +} \ \ \ vector calcListFull; \ @@ -113,14 +113,14 @@ int temp = kend; \ kend = kstart-1; \ kstart = temp-1; \ - } \ +} \ \ const int Nj = mLevel[mMaxRefine].lSizey; \ int jstart = 0+( id * (Nj / Nthrds) ); \ int jend = 0+( (id+1) * (Nj / Nthrds) ); \ if( ((Nj/Nthrds) *Nthrds) != Nj) { \ errMsg("LbmFsgrSolver","Invalid domain size Nj="<::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { - if( (*pit).getActive()==false ) continue; - if( (*pit).getType()!=PART_DROP) continue; - (*pit).setNext(NULL); - } + for(int k=0;k<(mSizez);k++) + for(int j=0;j<(mSizey);j++) + for(int i=0;i<(mSizex);i++) { + arppnt[ISOLEVEL_INDEX(i,j,k)] = NULL; + } + if(mpIsoParts) { + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { + if( (*pit).getActive()==false ) continue; + if( (*pit).getType()!=PART_DROP) continue; + (*pit).setNext(NULL); + } // build per node lists - for(vector::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { - if( (*pit).getActive()==false ) continue; - if( (*pit).getType()!=PART_DROP) continue; + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { + if( (*pit).getActive()==false ) continue; + if( (*pit).getType()!=PART_DROP) continue; // check lifetime ignored here - ParticleObject *p = &(*pit); - const ntlVec3Gfx ppos = p->getPos(); - const int pi= (int)round(ppos[0])+0; - const int pj= (int)round(ppos[1])+0; - int pk= (int)round(ppos[2])+0;// no offset necessary + ParticleObject *p = &(*pit); + const ntlVec3Gfx ppos = p->getPos(); + const int pi= (int)round(ppos[0])+0; + const int pj= (int)round(ppos[1])+0; + int pk= (int)round(ppos[2])+0;// no offset necessary // 2d should be handled by solver. if(LBMDIM==2) { pk = 0; } - if(pi<0) continue; - if(pj<0) continue; - if(pk<0) continue; - if(pi>mSizex-1) continue; - if(pj>mSizey-1) continue; - if(pk>mSizez-1) continue; - ParticleObject* &pnt = arppnt[ISOLEVEL_INDEX(pi,pj,pk)]; - if(pnt) { + if(pi<0) continue; + if(pj<0) continue; + if(pk<0) continue; + if(pi>mSizex-1) continue; + if(pj>mSizey-1) continue; + if(pk>mSizez-1) continue; + ParticleObject* &pnt = arppnt[ISOLEVEL_INDEX(pi,pj,pk)]; + if(pnt) { // append - ParticleObject* listpnt = pnt; - while(listpnt) { - if(!listpnt->getNext()) { - listpnt->setNext(p); listpnt = NULL; - } else { - listpnt = listpnt->getNext(); - } - } - } else { + ParticleObject* listpnt = pnt; + while(listpnt) { + if(!listpnt->getNext()) { + listpnt->setNext(p); listpnt = NULL; + } else { + listpnt = listpnt->getNext(); + } + } + } else { // start new list - pnt = p; - } - pInUse++; - } - } // mpIsoParts + pnt = p; + } + pInUse++; + } + } // mpIsoParts - debMsgStd("IsoSurface::triangulate",DM_MSG,"Starting. Parts in use:"<=mSizez-1) continue; - for(int poj=-poDistOffset; poj<1+poDistOffset; poj++) { - if(j+poj<0) continue; - if(j+poj>=mSizey-1) continue; - for(int poi=-poDistOffset; poi<1+poDistOffset; poi++) { - if(i+poi<0) continue; - if(i+poi>=mSizex-1) continue; - ParticleObject *p; - p = arppnt[ISOLEVEL_INDEX(i+poi,j+poj,k+pok)]; - while(p) { // */ + const int poDistOffset=2; + for(int pok=-poDistOffset; pok<1+poDistOffset; pok++) { + if(k+pok<0) continue; + if(k+pok>=mSizez-1) continue; + for(int poj=-poDistOffset; poj<1+poDistOffset; poj++) { + if(j+poj<0) continue; + if(j+poj>=mSizey-1) continue; + for(int poi=-poDistOffset; poi<1+poDistOffset; poi++) { + if(i+poi<0) continue; + if(i+poi>=mSizex-1) continue; + ParticleObject *p; + p = arppnt[ISOLEVEL_INDEX(i+poi,j+poj,k+pok)]; + while(p) { // */ /* - for(vector::iterator pit= mpIsoParts->getParticlesBegin(); - pit!= mpIsoParts->getParticlesEnd(); pit++) { { { { + for(vector::iterator pit= mpIsoParts->getParticlesBegin(); + pit!= mpIsoParts->getParticlesEnd(); pit++) { { { { // debug test! , full list slow! - if(( (*pit).getActive()==false ) || ( (*pit).getType()!=PART_DROP)) continue; - ParticleObject *p; - p = &(*pit); // */ + if(( (*pit).getActive()==false ) || ( (*pit).getType()!=PART_DROP)) continue; + ParticleObject *p; + p = &(*pit); // */ - pUsedTest++; - ntlVec3Gfx ppos = p->getPos(); - const int spi= (int)round( (ppos[0]+1.-(gfxReal)i) *(gfxReal)mSubdivs-1.5); - const int spj= (int)round( (ppos[1]+1.-(gfxReal)j) *(gfxReal)mSubdivs-1.5); - const int spk= (int)round( (ppos[2]+1.-(gfxReal)k) *(gfxReal)mSubdivs-1.5)-sdkOffset; // why -2? + pUsedTest++; + ntlVec3Gfx ppos = p->getPos(); + const int spi= (int)round( (ppos[0]+1.-(gfxReal)i) *(gfxReal)mSubdivs-1.5); + const int spj= (int)round( (ppos[1]+1.-(gfxReal)j) *(gfxReal)mSubdivs-1.5); + const int spk= (int)round( (ppos[2]+1.-(gfxReal)k) *(gfxReal)mSubdivs-1.5)-sdkOffset; // why -2? // 2d should be handled by solver. if(LBMDIM==2) { spk = 0; } - gfxReal pfLen = p->getSize()*1.5*mPartSize; // test, was 1.1 - const gfxReal minPfLen = subdfac*0.8; - if(pfLengetSize()*1.5*mPartSize; // test, was 1.1 + const gfxReal minPfLen = subdfac*0.8; + if(pfLengetSize()<<" ps"< 1) { continue; } // */ - for(int swj=-icellpsize; swj<=icellpsize; swj++) { - if(spj+swj< 0) { continue; } - if(spj+swj>mSubdivs+0) { continue; } // */ - for(int swi=-icellpsize; swi<=icellpsize; swi++) { - if(spi+swi< 0) { continue; } - if(spi+swi>mSubdivs+0) { continue; } // */ - ntlVec3Gfx cellp = ntlVec3Gfx( + const int icellpsize = (int)(1.*pfLen*(gfxReal)mSubdivs)+1; + for(int swk=-icellpsize; swk<=icellpsize; swk++) { + if(spk+swk< 0) { continue; } + if(spk+swk> 1) { continue; } // */ + for(int swj=-icellpsize; swj<=icellpsize; swj++) { + if(spj+swj< 0) { continue; } + if(spj+swj>mSubdivs+0) { continue; } // */ + for(int swi=-icellpsize; swi<=icellpsize; swi++) { + if(spi+swi< 0) { continue; } + if(spi+swi>mSubdivs+0) { continue; } // */ + ntlVec3Gfx cellp = ntlVec3Gfx( (1.5+(gfxReal)(spi+swi)) *subdfac + (gfxReal)(i-1), (1.5+(gfxReal)(spj+swj)) *subdfac + (gfxReal)(j-1), (1.5+(gfxReal)(spk+swk)+sdkOffset) *subdfac + (gfxReal)(k-1) ); //if(swi==0 && swj==0 && swk==0) subdAr[spk][spj][spi] = 1.; // DEBUG // clip domain boundaries again - if(cellp[0]<1.) { continue; } - if(cellp[1]<1.) { continue; } - if(cellp[2]<1.) { continue; } - if(cellp[0]>(gfxReal)mSizex-3.) { continue; } - if(cellp[1]>(gfxReal)mSizey-3.) { continue; } - if(cellp[2]>(gfxReal)mSizez-3.) { continue; } - gfxReal len = norm(cellp-ppos); - gfxReal isoadd = 0.; - const gfxReal baseIsoVal = mIsoValue*1.1; - if(len(gfxReal)mSizex-3.) { continue; } + if(cellp[1]>(gfxReal)mSizey-3.) { continue; } + if(cellp[2]>(gfxReal)mSizez-3.) { continue; } + gfxReal len = norm(cellp-ppos); + gfxReal isoadd = 0.; + const gfxReal baseIsoVal = mIsoValue*1.1; + if(len1.) { continue; } - subdAr[spk+swk][spj+swj][spi+swi] = arval + isoadd; - } } } + const gfxReal arval = subdAr[spk+swk][spj+swj][spi+swi]; + if(arval>1.) { continue; } + subdAr[spk+swk][spj+swj][spi+swi] = arval + isoadd; + } } } - p = p->getNext(); - } - } } } // poDist loops */ + p = p->getNext(); + } + } } } // poDist loops */ - py = mStart[1]+(((double)j-0.5)*orgGsy)-gsy; - for(int sj=0;sj 0) { + if (mcEdgeTable[cubeIndex] > 0) { // where to look up if this point already exists - const int edgek = 0; - const int baseIn = EDGEAR_INDEX( i+0, j+0, edgek+0, si,sj); - eVert[ 0] = &mpEdgeVerticesX[ baseIn ]; - eVert[ 1] = &mpEdgeVerticesY[ baseIn + 1 ]; - eVert[ 2] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; - eVert[ 3] = &mpEdgeVerticesY[ baseIn ]; + const int edgek = 0; + const int baseIn = EDGEAR_INDEX( i+0, j+0, edgek+0, si,sj); + eVert[ 0] = &mpEdgeVerticesX[ baseIn ]; + eVert[ 1] = &mpEdgeVerticesY[ baseIn + 1 ]; + eVert[ 2] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; + eVert[ 3] = &mpEdgeVerticesY[ baseIn ]; - eVert[ 4] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; - eVert[ 5] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+1,sj+0) ]; // with subdivs - eVert[ 6] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+1) ]; - eVert[ 7] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; + eVert[ 4] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; + eVert[ 5] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+1,sj+0) ]; // with subdivs + eVert[ 6] = &mpEdgeVerticesX[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+1) ]; + eVert[ 7] = &mpEdgeVerticesY[ EDGEAR_INDEX( i, j, edgek+1, si+0,sj+0) ]; - eVert[ 8] = &mpEdgeVerticesZ[ baseIn ]; - eVert[ 9] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+0) ]; // with subdivs - eVert[10] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+1) ]; - eVert[11] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; + eVert[ 8] = &mpEdgeVerticesZ[ baseIn ]; + eVert[ 9] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+0) ]; // with subdivs + eVert[10] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+1,sj+1) ]; + eVert[11] = &mpEdgeVerticesZ[ EDGEAR_INDEX( i, j, edgek+0, si+0,sj+1) ]; // grid positions - pos[0] = ntlVec3Gfx(px ,py ,pz); - pos[1] = ntlVec3Gfx(px+gsx,py ,pz); - pos[2] = ntlVec3Gfx(px+gsx,py+gsy,pz); // with subdivs - pos[3] = ntlVec3Gfx(px ,py+gsy,pz); - pos[4] = ntlVec3Gfx(px ,py ,pz+gsz); - pos[5] = ntlVec3Gfx(px+gsx,py ,pz+gsz); - pos[6] = ntlVec3Gfx(px+gsx,py+gsy,pz+gsz); // with subdivs - pos[7] = ntlVec3Gfx(px ,py+gsy,pz+gsz); + pos[0] = ntlVec3Gfx(px ,py ,pz); + pos[1] = ntlVec3Gfx(px+gsx,py ,pz); + pos[2] = ntlVec3Gfx(px+gsx,py+gsy,pz); // with subdivs + pos[3] = ntlVec3Gfx(px ,py+gsy,pz); + pos[4] = ntlVec3Gfx(px ,py ,pz+gsz); + pos[5] = ntlVec3Gfx(px+gsx,py ,pz+gsz); + pos[6] = ntlVec3Gfx(px+gsx,py+gsy,pz+gsz); // with subdivs + pos[7] = ntlVec3Gfx(px ,py+gsy,pz+gsz); // check all edges - for(int e=0;e<12;e++) { - if (mcEdgeTable[cubeIndex] & (1<0) { + float smoSubdfac = 1.; + if(mSubdivs>0) { //smoSubdfac = 1./(float)(mSubdivs); - smoSubdfac = pow(0.55,(double)mSubdivs); // slightly stronger - } - if(mSmoothSurface>0. || mSmoothNormals>0.) debMsgStd("IsoSurface::triangulate",DM_MSG,"Smoothing...",10); - if(mSmoothSurface>0.0) { - smoothSurface(mSmoothSurface*smoSubdfac, (mSmoothNormals<=0.0) ); - } - if(mSmoothNormals>0.0) { - smoothNormals(mSmoothNormals*smoSubdfac); - } + smoSubdfac = pow(0.55,(double)mSubdivs); // slightly stronger + } + if(mSmoothSurface>0. || mSmoothNormals>0.) debMsgStd("IsoSurface::triangulate",DM_MSG,"Smoothing...",10); + if(mSmoothSurface>0.0) { + smoothSurface(mSmoothSurface*smoSubdfac, (mSmoothNormals<=0.0) ); + } + if(mSmoothNormals>0.0) { + smoothNormals(mSmoothNormals*smoSubdfac); + } - myTime_t tritimeend = getTime(); - debMsgStd("IsoSurface::triangulate",DM_MSG,"took "<< getTimeString(tritimeend-tritimestart)<<", S("<getNumParticles(), 10); + myTime_t tritimeend = getTime(); + debMsgStd("IsoSurface::triangulate",DM_MSG,"took "<< getTimeString(tritimeend-tritimestart)<<", S("<getNumParticles(), 10); } @@ -665,8 +677,8 @@ void IsoSurface::triangulate( void ) * Get triangles for rendering *****************************************************************************/ void IsoSurface::getTriangles(double t, vector *triangles, - vector *vertices, - vector *normals, int objectId ) + vector *vertices, + vector *normals, int objectId ) { if(!mInitDone) { debugOut("IsoSurface::getTriangles warning: Not initialized! ", 10); @@ -675,8 +687,8 @@ void IsoSurface::getTriangles(double t, vector *triangles, t = 0.; //return; // DEBUG - /* triangulate field */ - triangulate(); + /* triangulate field */ + triangulate(); //errMsg("TRIS"," "< *triangles, //errMsg("NM"," ivi"<size()<<" ns"<size()<<" ts"<size() ); //errMsg("NM"," ovs"<push_back( mPoints[i].v ); } - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { normals->push_back( mPoints[i].n ); } //errMsg("N2"," ivi"<size()<<" ns"<size()<<" ts"<size() ); //errMsg("N2"," ovs"< *triangles, if(getCastShadows() ) { flag |= TRI_CASTSHADOWS; } - /* init geo init id */ - int geoiId = getGeoInitId(); - if(geoiId > 0) { - flag |= (1<< (geoiId+4)); - flag |= mGeoInitType; - } + /* init geo init id */ + int geoiId = getGeoInitId(); + if(geoiId > 0) { + flag |= (1<< (geoiId+4)); + flag |= mGeoInitType; + } - tri.setFlags( flag ); + tri.setFlags( flag ); - /* triangle normal missing */ - tri.setNormal( ntlVec3Gfx(0.0) ); - tri.setSmoothNormals( smooth ); - tri.setObjectId( objectId ); - triangles->push_back( tri ); + /* triangle normal missing */ + tri.setNormal( ntlVec3Gfx(0.0) ); + tri.setSmoothNormals( smooth ); + tri.setObjectId( objectId ); + triangles->push_back( tri ); } //errMsg("N3"," ivi"<size()<<" ns"<size()<<" ts"<size() ); return; @@ -743,11 +755,11 @@ inline ntlVec3Gfx IsoSurface::getNormal(int i, int j,int k) { // WARNING - this requires a security boundary layer... ntlVec3Gfx ret(0.0); ret[0] = *getData(i-1,j ,k ) - - *getData(i+1,j ,k ); + *getData(i+1,j ,k ); ret[1] = *getData(i ,j-1,k ) - - *getData(i ,j+1,k ); + *getData(i ,j+1,k ); ret[2] = *getData(i ,j ,k-1 ) - - *getData(i ,j ,k+1 ); + *getData(i ,j ,k+1 ); return ret; } @@ -769,13 +781,13 @@ void IsoSurface::setSmoothRad(float radi1, float radi2, ntlVec3Gfx mscc) { // compute normals for all generated triangles void IsoSurface::computeNormals() { - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { mPoints[i].n = ntlVec3Gfx(0.); } - for(int i=0;i<(int)mIndices.size();i+=3) { - const int t1 = mIndices[i]; - const int t2 = mIndices[i+1]; + for(int i=0;i<(int)mIndices.size();i+=3) { + const int t1 = mIndices[i]; + const int t2 = mIndices[i+1]; const int t3 = mIndices[i+2]; const ntlVec3Gfx p1 = mPoints[t1].v; const ntlVec3Gfx p2 = mPoints[t2].v; @@ -792,7 +804,7 @@ void IsoSurface::computeNormals() { mPoints[t3].n += norm * (1./(len2*len3)); } - for(int i=0;i<(int)mPoints.size();i++) { + for(int i=0;i<(int)mPoints.size();i++) { normalize(mPoints[i].n); } } @@ -903,86 +915,86 @@ void IsoSurface::smoothSurface(float sigma, bool normSmooth) // Edges ntlVec3Gfx e[3] = { mPoints[mIndices[i*3+2]].v - mPoints[mIndices[i*3+1]].v, - mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, - mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; + mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, + mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; // Compute corner weights - float area = 0.5f * norm( cross(e[0], e[1])); - float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; - float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), - l2[1] * (l2[2] + l2[0] - l2[1]), - l2[2] * (l2[0] + l2[1] - l2[2]) }; - if (ew[0] <= 0.0f) { - cornerareas[i][1] = -0.25f * l2[2] * area / - dot(e[0] , e[2]); - cornerareas[i][2] = -0.25f * l2[1] * area / - dot(e[0] , e[1]); - cornerareas[i][0] = area - cornerareas[i][1] - - cornerareas[i][2]; - } else if (ew[1] <= 0.0f) { - cornerareas[i][2] = -0.25f * l2[0] * area / - dot(e[1] , e[0]); - cornerareas[i][0] = -0.25f * l2[2] * area / - dot(e[1] , e[2]); - cornerareas[i][1] = area - cornerareas[i][2] - - cornerareas[i][0]; - } else if (ew[2] <= 0.0f) { - cornerareas[i][0] = -0.25f * l2[1] * area / - dot(e[2] , e[1]); - cornerareas[i][1] = -0.25f * l2[0] * area / - dot(e[2] , e[0]); - cornerareas[i][2] = area - cornerareas[i][0] - - cornerareas[i][1]; - } else { - float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); - for (int j = 0; j < 3; j++) - cornerareas[i][j] = ewscale * (ew[(j+1)%3] + - ew[(j+2)%3]); - } + float area = 0.5f * norm( cross(e[0], e[1])); + float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; + float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), + l2[1] * (l2[2] + l2[0] - l2[1]), + l2[2] * (l2[0] + l2[1] - l2[2]) }; + if (ew[0] <= 0.0f) { + cornerareas[i][1] = -0.25f * l2[2] * area / + dot(e[0] , e[2]); + cornerareas[i][2] = -0.25f * l2[1] * area / + dot(e[0] , e[1]); + cornerareas[i][0] = area - cornerareas[i][1] - + cornerareas[i][2]; + } else if (ew[1] <= 0.0f) { + cornerareas[i][2] = -0.25f * l2[0] * area / + dot(e[1] , e[0]); + cornerareas[i][0] = -0.25f * l2[2] * area / + dot(e[1] , e[2]); + cornerareas[i][1] = area - cornerareas[i][2] - + cornerareas[i][0]; + } else if (ew[2] <= 0.0f) { + cornerareas[i][0] = -0.25f * l2[1] * area / + dot(e[2] , e[1]); + cornerareas[i][1] = -0.25f * l2[0] * area / + dot(e[2] , e[0]); + cornerareas[i][2] = area - cornerareas[i][0] - + cornerareas[i][1]; + } else { + float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); + for (int j = 0; j < 3; j++) + cornerareas[i][j] = ewscale * (ew[(j+1)%3] + + ew[(j+2)%3]); + } // NT important, check this... #ifndef WIN32 - if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; - if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; - if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; + if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; + if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; + if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; #else // WIN32 // FIXME check as well... - if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; - if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; - if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; + if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; + if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; + if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; #endif // WIN32 - pointareas[mIndices[i*3+0]] += cornerareas[i][0]; - pointareas[mIndices[i*3+1]] += cornerareas[i][1]; - pointareas[mIndices[i*3+2]] += cornerareas[i][2]; + pointareas[mIndices[i*3+0]] += cornerareas[i][0]; + pointareas[mIndices[i*3+1]] += cornerareas[i][1]; + pointareas[mIndices[i*3+2]] += cornerareas[i][2]; } } // need pointarea - // */ + // */ float invsigma2 = 1.0f / (sigma*sigma); vector dflt(nv); for (int i = 0; i < nv; i++) { if(diffuseVertexField( &mPoints[0].v, 2, - i, invsigma2, dflt[i])) { + i, invsigma2, dflt[i])) { // Just keep the displacement - dflt[i] -= mPoints[i].v; - } else { dflt[i] = 0.0; } //?mPoints[i].v; } + dflt[i] -= mPoints[i].v; + } else { dflt[i] = 0.0; } //?mPoints[i].v; } } // Slightly better small-neighborhood approximation for (int i = 0; i < nf; i++) { ntlVec3Gfx c = mPoints[mIndices[i*3+0]].v + - mPoints[mIndices[i*3+1]].v + - mPoints[mIndices[i*3+2]].v; + mPoints[mIndices[i*3+1]].v + + mPoints[mIndices[i*3+2]].v; c /= 3.0f; for (int j = 0; j < 3; j++) { int v = mIndices[i*3+j]; ntlVec3Gfx d =(c - mPoints[v].v) * 0.5f; dflt[v] += d * (cornerareas[i][j] / - pointareas[mIndices[i*3+j]] * - exp(-0.5f * invsigma2 * normNoSqrt(d)) ); + pointareas[mIndices[i*3+j]] * + exp(-0.5f * invsigma2 * normNoSqrt(d)) ); } } @@ -990,7 +1002,7 @@ void IsoSurface::smoothSurface(float sigma, bool normSmooth) vector dflt2(nv); for (int i = 0; i < nv; i++) { if(diffuseVertexField( &dflt[0], 1, - i, invsigma2, dflt2[i])) { } + i, invsigma2, dflt2[i])) { } else { /*mPoints[i].v=0.0;*/ dflt2[i] = 0.0; }//dflt2[i]; } } @@ -1062,58 +1074,58 @@ void IsoSurface::smoothNormals(float sigma) { // Edges ntlVec3Gfx e[3] = { mPoints[mIndices[i*3+2]].v - mPoints[mIndices[i*3+1]].v, - mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, - mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; + mPoints[mIndices[i*3+0]].v - mPoints[mIndices[i*3+2]].v, + mPoints[mIndices[i*3+1]].v - mPoints[mIndices[i*3+0]].v }; // Compute corner weights - float area = 0.5f * norm( cross(e[0], e[1])); - float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; - float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), - l2[1] * (l2[2] + l2[0] - l2[1]), - l2[2] * (l2[0] + l2[1] - l2[2]) }; - if (ew[0] <= 0.0f) { - cornerareas[i][1] = -0.25f * l2[2] * area / - dot(e[0] , e[2]); - cornerareas[i][2] = -0.25f * l2[1] * area / - dot(e[0] , e[1]); - cornerareas[i][0] = area - cornerareas[i][1] - - cornerareas[i][2]; - } else if (ew[1] <= 0.0f) { - cornerareas[i][2] = -0.25f * l2[0] * area / - dot(e[1] , e[0]); - cornerareas[i][0] = -0.25f * l2[2] * area / - dot(e[1] , e[2]); - cornerareas[i][1] = area - cornerareas[i][2] - - cornerareas[i][0]; - } else if (ew[2] <= 0.0f) { - cornerareas[i][0] = -0.25f * l2[1] * area / - dot(e[2] , e[1]); - cornerareas[i][1] = -0.25f * l2[0] * area / - dot(e[2] , e[0]); - cornerareas[i][2] = area - cornerareas[i][0] - - cornerareas[i][1]; - } else { - float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); - for (int j = 0; j < 3; j++) - cornerareas[i][j] = ewscale * (ew[(j+1)%3] + - ew[(j+2)%3]); - } + float area = 0.5f * norm( cross(e[0], e[1])); + float l2[3] = { normNoSqrt(e[0]), normNoSqrt(e[1]), normNoSqrt(e[2]) }; + float ew[3] = { l2[0] * (l2[1] + l2[2] - l2[0]), + l2[1] * (l2[2] + l2[0] - l2[1]), + l2[2] * (l2[0] + l2[1] - l2[2]) }; + if (ew[0] <= 0.0f) { + cornerareas[i][1] = -0.25f * l2[2] * area / + dot(e[0] , e[2]); + cornerareas[i][2] = -0.25f * l2[1] * area / + dot(e[0] , e[1]); + cornerareas[i][0] = area - cornerareas[i][1] - + cornerareas[i][2]; + } else if (ew[1] <= 0.0f) { + cornerareas[i][2] = -0.25f * l2[0] * area / + dot(e[1] , e[0]); + cornerareas[i][0] = -0.25f * l2[2] * area / + dot(e[1] , e[2]); + cornerareas[i][1] = area - cornerareas[i][2] - + cornerareas[i][0]; + } else if (ew[2] <= 0.0f) { + cornerareas[i][0] = -0.25f * l2[1] * area / + dot(e[2] , e[1]); + cornerareas[i][1] = -0.25f * l2[0] * area / + dot(e[2] , e[0]); + cornerareas[i][2] = area - cornerareas[i][0] - + cornerareas[i][1]; + } else { + float ewscale = 0.5f * area / (ew[0] + ew[1] + ew[2]); + for (int j = 0; j < 3; j++) + cornerareas[i][j] = ewscale * (ew[(j+1)%3] + + ew[(j+2)%3]); + } // NT important, check this... #ifndef WIN32 - if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; - if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; - if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; + if(! finite(cornerareas[i][0]) ) cornerareas[i][0]=1e-6; + if(! finite(cornerareas[i][1]) ) cornerareas[i][1]=1e-6; + if(! finite(cornerareas[i][2]) ) cornerareas[i][2]=1e-6; #else // WIN32 // FIXME check as well... - if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; - if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; - if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; + if(! (cornerareas[i][0]>=0.0) ) cornerareas[i][0]=1e-6; + if(! (cornerareas[i][1]>=0.0) ) cornerareas[i][1]=1e-6; + if(! (cornerareas[i][2]>=0.0) ) cornerareas[i][2]=1e-6; #endif // WIN32 - pointareas[mIndices[i*3+0]] += cornerareas[i][0]; - pointareas[mIndices[i*3+1]] += cornerareas[i][1]; - pointareas[mIndices[i*3+2]] += cornerareas[i][2]; + pointareas[mIndices[i*3+0]] += cornerareas[i][0]; + pointareas[mIndices[i*3+1]] += cornerareas[i][1]; + pointareas[mIndices[i*3+2]] += cornerareas[i][2]; } } // need pointarea From 543f38c20a10f08eb11391b99c00ff6bf2add3d9 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 29 Nov 2007 12:29:32 +0000 Subject: [PATCH 065/430] Fix: GUI cache reset should work again, same goes for collision modifier (enabled through 'deflection' panel --- source/blender/blenkernel/BKE_cloth.h | 7 +- source/blender/blenkernel/BKE_collisions.h | 10 +- source/blender/blenkernel/intern/cloth.c | 1 + source/blender/blenkernel/intern/collision.c | 2 +- source/blender/blenkernel/intern/implicit.c | 379 +++++++++++-------- source/blender/blenkernel/intern/modifier.c | 6 + source/blender/makesdna/DNA_modifier_types.h | 1 + source/blender/src/buttons_editing.c | 8 - source/blender/src/buttons_object.c | 50 ++- 9 files changed, 300 insertions(+), 164 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 2bb3e32d6b6..c8ec1698b86 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -72,10 +72,10 @@ typedef struct ClothVertex { } ClothVertex; typedef struct ClothSpring { - int ij; /* Pij from the paper, one end of the spring. */ - int kl; /* Pkl from the paper, one end of the spring. */ + unsigned int ij; /* Pij from the paper, one end of the spring. */ + unsigned int kl; /* Pkl from the paper, one end of the spring. */ float restlen; /* The original length of the spring. */ - int matrix_index; /* needed for implicit solver (fast lookup) */ + unsigned int matrix_index; /* needed for implicit solver (fast lookup) */ int type; /* types defined in BKE_cloth.h ("springType") */ int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ float dfdx[3][3]; @@ -152,6 +152,7 @@ typedef enum CLOTH_SPRING_TYPE_STRUCTURAL = 0, CLOTH_SPRING_TYPE_SHEAR, CLOTH_SPRING_TYPE_BENDING, + CLOTH_SPRING_TYPE_COLLISION, } CLOTH_SPRING_TYPES; /* SPRING FLAGS */ diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index f358bd629e6..e38662fdf95 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -37,11 +37,13 @@ #include #include #include + /* types */ #include "BLI_linklist.h" #include "BKE_DerivedMesh.h" #include "BKE_object.h" -#include "BKE_DerivedMesh.h" + +#include "DNA_modifier_types.h" // used in kdop.c and collision.c typedef struct CollisionTree @@ -82,6 +84,8 @@ typedef struct CollisionPair { int point_indexA[4], point_indexB[4]; float vector[3]; + float normal[3]; // has to be calculated from vector + float distance; float pa[3], pb[3]; } CollisionPair; @@ -115,6 +119,10 @@ LinkNode *BLI_linklist_append_fast (LinkNode **listp, void *ptr); // defined in collisions.c void collision_move_object(CollisionModifierData *collmd, float step, float prevstep); +// interface for collision functions +void collisions_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3); +void interpolateOnTriangle(float to[3], float v1[3], float v2[3], float v3[3], double w1, double w2, double w3); + ///////////////////////////////////////////////// #endif diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 6eacb26c315..2dd4f1a0f0f 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1009,6 +1009,7 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d ***************************************************************************************/ // be carefull: implicit solver has to be resettet when using this one! +// --> only for implicit handling of this spring! int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type) { Cloth *cloth = clmd->clothObject; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 6f0ac5f8c6d..4bc1efc1e70 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -71,7 +71,6 @@ #include "Bullet-C-Api.h" - // step is limited from 0 (frame start position) to 1 (frame end position) void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) { @@ -83,6 +82,7 @@ void collision_move_object(CollisionModifierData *collmd, float step, float prev VECSUB(tv, collmd->xnew[i].co, collmd->x[i].co); VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep); VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step); + VECSUB(collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co); } } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 12c5c190691..3b8f6ddd7d8 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -63,6 +63,8 @@ #include "BKE_global.h" #include "BIF_editdeform.h" +#include "Bullet-C-Api.h" + #ifdef _WIN32 #include static LARGE_INTEGER _itstart, _itend; @@ -1123,6 +1125,17 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } + if(s->type == CLOTH_SPRING_TYPE_COLLISION) + { + if(length < L) + { + mul_fvector_S(stretch_force, dir, (100.0*(length-L))); + + VECADD(s->f, s->f, stretch_force); + } + return; + } + // calculate force of structural + shear springs if(s->type != CLOTH_SPRING_TYPE_BENDING) { @@ -1415,6 +1428,19 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase { effectors= pdInitEffectors(ob,NULL); + // clear constraint matrix from collisions + if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + for(i = 0; i < id->S[0].vcount; i++) + { + if(!(verts [id->S[i].r].goal >= SOFTGOALSNAP)) + { + id->S[0].vcount = i-1; + break; + } + } + } + // calculate cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); @@ -1553,122 +1579,148 @@ void implicit_set_positions (ClothModifierData *clmd) memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); } - -int collisions_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +unsigned int implicit_getcreate_S_index(ClothModifierData *clmd, unsigned int index) { - /* + Cloth *cloth = clmd->clothObject; + Implicit_Data *id = cloth->implicit; + unsigned int i = 0, pinned = 0; + + pinned = id->S[0].vcount; + + for(i = 0; i < pinned; i++) + { + if(id->S[i].r == index) + { + return index; + } + } + + // create new PINNED entry in constraint matrix + id->S[0].vcount++; + id->S[pinned].c = id->S[pinned].r = index; + return pinned; +} + +int collisions_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionPair *collpair ) +{ + unsigned int i = 0; int result = 0; LinkNode *search = NULL; - CollPair *collpair = NULL; - Cloth *cloth1, *cloth2; + Cloth *cloth1 = NULL; float w1, w2, w3, u1, u2, u3; float v1[3], v2[3], relativeVelocity[3]; - float magrelVel; - + float magrelVel = 0.0; + float epsilon = clmd->coll_parms->epsilon; + cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; + + if(!collpair) + return 0; + + // TODO: check distance & calc normal + // calc distance + normal + collpair->distance = plNearestPoints( + cloth1->current_xold[collpair->point_indexA[0]], + cloth1->current_xold[collpair->point_indexA[1]], + cloth1->current_xold[collpair->point_indexA[2]], + collmd->current_x[collpair->point_indexB[0]].co, + collmd->current_x[collpair->point_indexB[1]].co, + collmd->current_x[collpair->point_indexB[2]].co, + collpair->pa,collpair->pb,collpair->vector); + + if (collpair->distance > (epsilon + ALMOST_ZERO)) + { + return 0; + } - // search = clmd->coll_parms.collision_list; - - while(search) - { - collpair = search->link; - - // compute barycentric coordinates for both collision points - collisions_compute_barycentric(collpair->pa, - cloth1->verts[collpair->ap1].txold, - cloth1->verts[collpair->ap2].txold, - cloth1->verts[collpair->ap3].txold, - &w1, &w2, &w3); - - collisions_compute_barycentric(collpair->pb, - cloth2->verts[collpair->bp1].txold, - cloth2->verts[collpair->bp2].txold, - cloth2->verts[collpair->bp3].txold, - &u1, &u2, &u3); - - // Calculate relative "velocity". - interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); - - interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); - - VECSUB(relativeVelocity, v1, v2); - - // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). - magrelVel = INPR(relativeVelocity, collpair->normal); - - // printf("magrelVel: %f\n", magrelVel); - - // Calculate masses of points. - - // If v_n_mag < 0 the edges are approaching each other. - if(magrelVel < -ALMOST_ZERO) - { - // Calculate Impulse magnitude to stop all motion in normal direction. - // const double I_mag = v_n_mag / (1/m1 + 1/m2); - float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent, magnormal, collvel[3]; - float vrel_t_pre[3]; - float vrel_t[3]; - double impulse; - float epsilon = clmd->coll_parms.epsilon; - float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); - - // magtangent = INPR(tangential, tangential); - - // Apply friction impulse. - if (magtangent < -ALMOST_ZERO) - { - - // printf("friction applied: %f\n", magtangent); - // TODO check original code -} - + // compute barycentric coordinates for both collision points + collisions_compute_barycentric (collpair->pa, + cloth1->current_xold[collpair->point_indexA[0]], + cloth1->current_xold[collpair->point_indexA[1]], + cloth1->current_xold[collpair->point_indexA[2]], + &w1, &w2, &w3 ); - impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); - - // printf("impulse: %f\n", impulse); - - // face A - VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); - cloth1->verts[collpair->ap1].impulse_count++; - - VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); - cloth1->verts[collpair->ap2].impulse_count++; - - VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); - cloth1->verts[collpair->ap3].impulse_count++; - - // face B - VECADDMUL(cloth2->verts[collpair->bp1].impulse, collpair->normal, u1 * impulse); - cloth2->verts[collpair->bp1].impulse_count++; - - VECADDMUL(cloth2->verts[collpair->bp2].impulse, collpair->normal, u2 * impulse); - cloth2->verts[collpair->bp2].impulse_count++; - - VECADDMUL(cloth2->verts[collpair->bp3].impulse, collpair->normal, u3 * impulse); - cloth2->verts[collpair->bp3].impulse_count++; - - - result = 1; + collisions_compute_barycentric (collpair->pb, + collmd->current_x[collpair->point_indexB[0]].co, + collmd->current_x[collpair->point_indexB[1]].co, + collmd->current_x[collpair->point_indexB[2]].co, + &u1, &u2, &u3 ); + + // Calculate relative "velocity". + interpolateOnTriangle ( v1, cloth1->current_v[collpair->point_indexA[0]], cloth1->current_v[collpair->point_indexA[1]], cloth1->current_v[collpair->point_indexA[2]], w1, w2, w3 ); + + interpolateOnTriangle ( v2, collmd->current_v[collpair->point_indexB[0]].co, collmd->current_v[collpair->point_indexB[1]].co, collmd->current_v[collpair->point_indexB[2]].co, u1, u2, u3 ); + + VECSUB ( relativeVelocity, v1, v2 ); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR ( relativeVelocity, collpair->normal ); + + // printf("magrelVel: %f\n", magrelVel); + + // Calculate masses of points. + + // If v_n_mag < 0 the edges are approaching each other. + if ( magrelVel < -ALMOST_ZERO ) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3]; + double impulse; + float overlap = ( epsilon + ALMOST_ZERO-collpair->distance ); + + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + + // magtangent = INPR(tangential, tangential); + + // Apply friction impulse. + if ( magtangent < -ALMOST_ZERO ) + { + + // printf("friction applied: %f\n", magtangent); + // TODO check original code + } + + + impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); + + // printf("impulse: %f\n", impulse); + + // face A + VECADDMUL ( cloth1->verts[collpair->point_indexA[0]].impulse, collpair->normal, w1 * impulse ); + cloth1->verts[collpair->point_indexA[0]].impulse_count++; + + VECADDMUL ( cloth1->verts[collpair->point_indexA[1]].impulse, collpair->normal, w2 * impulse ); + cloth1->verts[collpair->point_indexA[1]].impulse_count++; + + VECADDMUL ( cloth1->verts[collpair->point_indexA[2]].impulse, collpair->normal, w3 * impulse ); + cloth1->verts[collpair->point_indexA[2]].impulse_count++; + + // face B + /* + VECADDMUL ( collmd->verts[collpair->point_indexB[0]].impulse, collpair->normal, u1 * impulse ); + collmd->verts[collpair->point_indexB[0]].impulse_count++; + + VECADDMUL ( collmd->verts[collpair->point_indexB[1]].impulse, collpair->normal, u2 * impulse ); + collmd->verts[collpair->point_indexB[1]].impulse_count++; + + VECADDMUL ( collmd->verts[collpair->point_indexB[2]].impulse, collpair->normal, u3 * impulse ); + collmd->verts[collpair->point_indexB[2]].impulse_count++; + */ - // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case - - // Apply the impulse and increase impulse counters. - - -} - - search = search->next; -} - + result = 1; + + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case + + // Apply the impulse and increase impulse counters. + + } return result; - */ - return 0; } @@ -2087,10 +2139,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, Object *ob2 = NULL; BVH *bvh1 = NULL, *bvh2 = NULL, *self_bvh; LinkNode *collision_list = NULL; - unsigned int i = 0, j = 0; + unsigned int i = 0, j = 0, index; int collisions = 0, count = 0; float (*current_x)[3]; - + Implicit_Data *id = NULL; + /* if (!(((Cloth *)clmd->clothObject)->tree)) { printf("No BVH found\n"); @@ -2100,65 +2153,77 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, cloth = clmd->clothObject; bvh1 = cloth->tree; self_bvh = cloth->selftree; + id = cloth->implicit; //////////////////////////////////////////////////////////// // static collisions //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update_from_float3(bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0); // 0 means STATIC, 1 means MOVING (see later in this function) -/* + bvh_update_from_float3 ( bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) + // check all collision objects - for (base = G.scene->base.first; base; base = base->next) + for ( base = G.scene->base.first; base; base = base->next ) { - ob2 = base->object; - collmd = (CollisionModifierData *) modifiers_findByType (ob2, eModifierType_Collision); - - if (!collmd) - continue; - + ob2 = base->object; + collmd = ( CollisionModifierData * ) modifiers_findByType ( ob2, eModifierType_Collision ); + + if ( !collmd ) + continue; + // check if there is a bounding volume hierarchy - if (collmd->tree) - { - bvh2 = collmd->tree; - + if ( collmd->tree ) + { + bvh2 = collmd->tree; + // update position + bvh of collision object - collision_move_object(collmd, step, prevstep); - bvh_update_from_mvert(collmd->tree, collmd->current_x, collmd->numverts, NULL, 0); - - // fill collision list - collisions += bvh_traverse(bvh1->root, bvh2->root, &collision_list); - + collision_move_object ( collmd, step, prevstep ); + bvh_update_from_mvert ( collmd->tree, collmd->current_x, collmd->numverts, NULL, 0 ); + + // fill collision list + collisions += bvh_traverse ( bvh1->root, bvh2->root, &collision_list ); + // call static collision response + if ( collision_list ) + { + LinkNode *search = collision_list; + + while ( search ) + { + collisions_collision_response_static(clmd, collmd, (CollisionPair *)search->link); + + search = search->next; + } + } // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; -} - BLI_linklist_free(collision_list,NULL); + if ( collision_list ) + { + LinkNode *search = collision_list; - collision_list = NULL; -} -} -} + while ( search ) + { + CollisionPair *coll_pair = search->link; + + MEM_freeN ( coll_pair ); + search = search->next; + } + BLI_linklist_free ( collision_list,NULL ); + + collision_list = NULL; + } + } + } ////////////////////////////////////////////// // update velocities + positions ////////////////////////////////////////////// for(i = 0; i < cloth->numverts; i++) { - VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); -} + VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); + } ////////////////////////////////////////////// -*/ + */ /* // fill collision list collisions += bvh_traverse(self_bvh->root, self_bvh->root, &collision_list); @@ -2235,7 +2300,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, collisions = 1; count = 0; current_x = cloth->current_x; // needed for openMP - + /* // #pragma omp parallel for private(i,j, collisions) shared(current_x) // for ( count = 0; count < 6; count++ ) { @@ -2275,8 +2340,6 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, { float correction = ((mindistance1 + mindistance2)) - length; - printf("correction: %f\n", correction); - if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) && ( cloth->verts [i].goal >= SOFTGOALSNAP ) ) { VecMulf ( temp, -correction ); @@ -2289,10 +2352,24 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } else { + unsigned int pinned = id->S[0].vcount; + + printf("correction: %f\n", correction); + VecMulf ( temp, -correction*0.5 ); VECADD ( current_x[j], current_x[j], temp ); - + VECSUB ( cloth->current_v[j], cloth->current_x[j], cloth->current_xold[j] ); + + index = implicit_getcreate_S_index(clmd, j); + id->S[index].pinned = 1; + VECSUB ( current_x[i], current_x[i], temp ); + VECSUB ( cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i] ); + + index = implicit_getcreate_S_index(clmd, i); + id->S[index].pinned = 1; + + cloth_add_spring (clmd, i, j, mindistance1 + mindistance2, CLOTH_SPRING_TYPE_COLLISION); } collisions = 1; @@ -2300,16 +2377,18 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } } } - + */ ////////////////////////////////////////////// // SELFCOLLISIONS: update velocities ////////////////////////////////////////////// + /* for ( i = 0; i < cloth->numverts; i++ ) { VECSUB ( cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i] ); } + */ ////////////////////////////////////////////// - return 1; + return 0; } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index af8b4aa8079..e433fb6ed88 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5068,6 +5068,7 @@ static void collisionModifier_initData(ModifierData *md) collmd->xnew = NULL; collmd->current_x = NULL; collmd->current_xnew = NULL; + collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -5089,11 +5090,14 @@ static void collisionModifier_freeData(ModifierData *md) MEM_freeN(collmd->current_x); if(collmd->current_xnew) MEM_freeN(collmd->current_xnew); + if(collmd->current_v) + MEM_freeN(collmd->current_v); collmd->x = NULL; collmd->xnew = NULL; collmd->current_x = NULL; collmd->current_xnew = NULL; + collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; @@ -5155,6 +5159,8 @@ static void collisionModifier_deformVerts( collmd->xnew = MEM_dupallocN(collmd->x); // frame end position collmd->current_x = MEM_dupallocN(collmd->x); // inter-frame collmd->current_xnew = MEM_dupallocN(collmd->x); // inter-frame + collmd->current_v = MEM_dupallocN(collmd->x); // inter-frame + collmd->numverts = numverts; // TODO: epsilon diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 65eec871404..1bb8ce99c88 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -358,6 +358,7 @@ typedef struct CollisionModifierData { struct MVert *xnew; /* position at the end of the frame */ struct MVert *current_xnew; /* new position at the actual inter-frame step */ struct MVert *current_x; /* position at the actual inter-frame step */ + struct MVert *current_v; /* position at the actual inter-frame step */ unsigned int numverts; float time; diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 959fd770959..83f04110974 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1494,14 +1494,6 @@ static void modifiers_convertToReal(void *ob_v, void *md_v) BIF_undo_push("Modifier convert to real"); } -static void modifiers_pointCacheClearModifier(void *ob_v, void *md_v) -{ - Object *ob = ob_v; - ModifierData *md = md_v; - int stack_index = modifiers_indexInObject(ob_v, md_v); - PTCache_id_clear((ID *)ob, CFRA, stack_index); -} - static void build_uvlayer_menu_vars(CustomData *data, char **menu_string, int *uvlayer_tmp, char *uvlayer_name) { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 2ce543eec44..1808618d7b7 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -48,6 +48,7 @@ #include "BKE_action.h" #include "BKE_cloth.h" +#include "BKE_collisions.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_library.h" @@ -2966,6 +2967,30 @@ void do_effects_panels(unsigned short event) } allqueue(REDRAWVIEW3D, 0); break; + case B_CLOTH_CLEARCACHEALL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + cloth_clear_cache(ob, clmd, 2); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + break; + case B_CLOTH_RENEW: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + do_object_panels(B_CLOTH_CLEARCACHEALL); + cloth_free_modifier (clmd); + } + } + break; default: if(event>=B_SELEFFECT && eventmodifiers, md ); + } + else + { + BLI_remlink ( &ob->modifiers, md ); + modifier_free ( md ); + allqueue(REDRAWBUTSEDIT, 0); + } +} + /* Panels for particle interaction settings */ static void object_panel_deflection(Object *ob) { uiBlock *block; + uiBut *but; block= uiNewBlock(&curarea->uiblocks, "object_panel_deflection", UI_EMBOSS, UI_HELV, curarea->win); if(uiNewPanel(curarea, block, "Deflection", "Physics", 0, 0, 318, 204)==0) return; @@ -3025,7 +3071,9 @@ static void object_panel_deflection(Object *ob) if(ob->pd && ob->type==OB_MESH) { PartDeflect *pd= ob->pd; - uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); + but = uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); + uiButSetFunc(but, object_collision__enabletoggle, ob, NULL); + if(pd->deflect) { uiDefBut(block, LABEL, 0, "Particles", 160,140,75,20, NULL, 0.0, 0, 0, 0, ""); uiDefButBitS(block, TOG, PDEFLE_KILL_PART, B_DIFF, "Kill",235,140,75,20, &pd->flag, 0, 0, 0, 0, "Kill collided particles"); From 42637b725267192bfe22731bf975cfb1a50541ee Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 12 Dec 2007 17:33:59 +0000 Subject: [PATCH 066/430] Fixed preconditioned conjugate to some degree but some issues left for stiffness>1000 (disabled therefore). There's also some issue with the springs function (some springs seem to be missing/not created) --- source/blender/blenkernel/BKE_cloth.h | 1 - source/blender/blenkernel/BKE_pointcache.h | 1 + source/blender/blenkernel/SConscript | 2 +- source/blender/blenkernel/intern/cloth.c | 11 +++- source/blender/blenkernel/intern/implicit.c | 65 ++++++++++++------- source/blender/blenkernel/intern/key.c | 10 +-- .../blenkernel/intern/particle_system.c | 2 +- source/blender/blenkernel/intern/pointcache.c | 8 +++ source/blender/makesdna/DNA_key_types.h | 5 +- .../nodes/intern/CMP_nodes/CMP_normalize.c | 5 +- source/blender/src/buttons_editing.c | 13 ++-- source/blender/src/buttons_object.c | 2 + source/blender/src/drawview.c | 52 ++++++++++++++- source/blender/src/editkey.c | 6 +- source/blender/src/editmesh_mods.c | 7 ++ source/blender/src/editparticle.c | 16 ++--- 16 files changed, 152 insertions(+), 54 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index c8ec1698b86..e288e7ee082 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -200,7 +200,6 @@ typedef void ( *CM_COLLISION_SELF ) ( struct ClothModifierData *clmd, int step ) // only one available in the moment typedef enum { CM_IMPLICIT = 0, - CM_VERLET = 1, } CM_SOLVER_ID; diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index 020b9d15417..afaf9dbeee2 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -44,5 +44,6 @@ int BKE_ptcache_id_filename(struct ID *id, char *filename, int cfra, int stack_index, short do_path, short do_ext); FILE * BKE_ptcache_id_fopen(struct ID *id, char mode, int cfra, int stack_index); void BKE_ptcache_id_clear(struct ID *id, char mode, int cfra, int stack_index); +int BKE_ptcache_id_exist(struct ID *id, int cfra, int stack_index); #endif diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index c83e9f7fbe1..355cd19da33 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -7,7 +7,7 @@ incs = '. #/intern/guardedalloc ../include ../blenlib ../makesdna' incs += ' ../python ../render/extern/include #/intern/decimation/extern' incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes' incs += ' #/intern/iksolver/extern ../blenloader ../quicktime' -incs += ' #/extern/bullet2/src ' +incs += ' #/extern/bullet2/src' incs += ' #/intern/bmfont' incs += ' ' + env['BF_OPENGL_INC'] diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 2dd4f1a0f0f..64166493caa 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -115,7 +115,6 @@ double tval() static CM_SOLVER_DEF solvers [] = { { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, - // { "Verlet", CM_VERLET, verlet_init, verlet_solver, verlet_free }, }; /* ********** cloth engine ******* */ @@ -477,8 +476,9 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) fclose(fp); } - implicit_set_positions(clmd); - + if(clmd->sim_parms->solver_type == 0) + implicit_set_positions(clmd); + return ret; } @@ -600,6 +600,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d tstart(); /* Call the solver. */ + if (solvers [clmd->sim_parms->solver_type].solver) solvers [clmd->sim_parms->solver_type].solver (ob, framenr, clmd, effectors); @@ -625,6 +626,10 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d if(cloth_read_cache(ob, clmd, framenr)) cloth_to_object (ob, result, clmd); } + else + { + cloth_clear_cache(ob, clmd, 0); + } } return result; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 3b8f6ddd7d8..7d7ad480026 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -241,7 +241,7 @@ DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, uns unsigned int i = 0; float temp = 0.0; // schedule(guided, 2) -#pragma omp parallel for reduction(+: temp) +#pragma omp parallel for reduction(+: temp) private(i) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -558,6 +558,7 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) mul_fmatrix_S(matrix[i].m, scalar); } } + /* SPARSE SYMMETRIC multiply big matrix with long vector*/ /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) @@ -590,6 +591,20 @@ DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector } + + +/* SPARSE SYMMETRIC multiply big matrix with long vector (for diagonal preconditioner) */ +/* STATUS: verified */ +DO_INLINE void mul_prevfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) +{ + unsigned int i = 0; + + for(i = 0; i < from[0].vcount; i++) + { + mul_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); + } +} + /* SPARSE SYMMETRIC add big matrix with big matrix: A = B + C*/ DO_INLINE void add_bfmatrix_bfmatrix( fmatrix3x3 *to, fmatrix3x3 *from, fmatrix3x3 *matrix) { @@ -983,7 +998,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma sub_lfvector_lfvector(r, lB, r, numverts); filter(r, S); - mul_bfmatrix_lfvector(p, Pinv, r); + mul_prevfmatrix_lfvector(p, Pinv, r); filter(p, S); deltaNew = dot_lfvector(r, p, numverts); @@ -1005,7 +1020,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma add_lfvector_lfvectorS(r, r, s, -alpha, numverts); - mul_bfmatrix_lfvector(h, Pinv, r); + mul_prevfmatrix_lfvector(h, Pinv, r); filter(h, S); deltaOld = deltaNew; @@ -1013,6 +1028,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma deltaNew = dot_lfvector(r, h, numverts); add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts); + filter(p, S); } @@ -1125,6 +1141,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } + /* if(s->type == CLOTH_SPRING_TYPE_COLLISION) { if(length < L) @@ -1135,6 +1152,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } return; } + */ // calculate force of structural + shear springs if(s->type != CLOTH_SPRING_TYPE_BENDING) @@ -1150,7 +1168,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * 0.01 * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); dfdx_spring_type1(s->dfdx, dir,length,L,k); @@ -1171,12 +1189,17 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); - if(INPR(bending_force,bending_force) > 0.13*0.13) + // if(INPR(bending_force,bending_force) > 0.13*0.13) { clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } + dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); + /* + if(s->ij == 300 || s->kl == 300) + printf("id->F[0]: %f, id->F[1]: %f, id->F[2]: %f\n", s->f[0], s->f[1], s->f[2]); + */ } } } @@ -1192,7 +1215,7 @@ DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, { sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); - add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) return 0; @@ -1306,7 +1329,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; -#pragma omp parallel for private (i) shared(lF) +// #pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1363,7 +1386,6 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec } clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; - } void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) @@ -1375,31 +1397,23 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto zero_lfvector(dV, numverts); subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); - mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); - add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - // itstart(); - + // TODO: unstable with quality=5 + stiffness=7000 + no zero_lfvector() cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ - // TODO: if anyone finds a way to correct this function => - // explodes with stiffness = 3000 and 16k verts + pinned at 2 corners + // TODO: unstable with quality=5 + stiffness=7000 // cg_filtered_pre(dV, A, B, z, S, P, Pinv); - // itend(); - // printf("cg_filtered calc time: %f\n", (float)itval()); - // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); - del_lfvector(dFdXmV); } int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) -{ +{ unsigned int i=0; float step=0.0f, tf=1.0f; Cloth *cloth = clmd->clothObject; @@ -1418,7 +1432,10 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update velocities with constrained velocities from pinned verts if(verts [i].goal >= SOFTGOALSNAP) { - VECSUB(id->V[i], cloth->xconst[i], cloth->xold[i]); + float temp[3]; + VECSUB(temp, cloth->xconst[i], cloth->xold[i]); + VECSUB(id->z[i], temp, id->V[i]); + // VecMulf(id->V[i], 1.0 / dt); } } @@ -1612,6 +1629,8 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod float v1[3], v2[3], relativeVelocity[3]; float magrelVel = 0.0; float epsilon = clmd->coll_parms->epsilon; + + return 0; cloth1 = clmd->clothObject; @@ -2143,7 +2162,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, int collisions = 0, count = 0; float (*current_x)[3]; Implicit_Data *id = NULL; - /* + if (!(((Cloth *)clmd->clothObject)->tree)) { printf("No BVH found\n"); @@ -2182,7 +2201,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, // fill collision list collisions += bvh_traverse ( bvh1->root, bvh2->root, &collision_list ); - + // call static collision response if ( collision_list ) { @@ -2223,7 +2242,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); } ////////////////////////////////////////////// - */ + /* // fill collision list collisions += bvh_traverse(self_bvh->root, self_bvh->root, &collision_list); diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 234a096edce..b57b799001a 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -672,14 +672,12 @@ static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, i /* step 2: do it */ - kb= key->block.first; - while(kb) { - + for(kb=key->block.first; kb; kb=kb->next) { if(kb!=key->refkey) { float icuval= kb->curval; /* only with value, and no difference allowed */ - if(icuval!=0.0f && kb->totelem==tot) { + if(!(kb->flag & KEYBLOCK_MUTE) && icuval!=0.0f && kb->totelem==tot) { KeyBlock *refb; float weight, *weights= kb->weights; @@ -738,7 +736,6 @@ static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, i } } } - kb= kb->next; } } @@ -1312,6 +1309,9 @@ int do_ob_key(Object *ob) if(ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)) { KeyBlock *kb= BLI_findlink(&key->block, ob->shapenr-1); + if(kb && (kb->flag & KEYBLOCK_MUTE)) + kb= key->refkey; + if(kb==NULL) { kb= key->block.first; ob->shapenr= 1; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5d3a4332b5d..1c7d235cd90 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4271,7 +4271,7 @@ void psys_to_softbody(Object *ob, ParticleSystem *psys, int force_recalc) if((psys->softflag&OB_SB_ENABLE)==0) return; - if((ob->recalc&OB_RECALC_TIME)==0) + if(ob->recalc && (ob->recalc&OB_RECALC_TIME)==0) psys->softflag|=OB_SB_REDO; /* let's replace the object's own softbody with the particle softbody */ diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 9492754260c..c4ef437019e 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -183,3 +183,11 @@ void BKE_ptcache_id_clear(struct ID *id, char mode, int cfra, int stack_index) return; } +int BKE_ptcache_id_exist(struct ID *id, int cfra, int stack_index) +{ + char filename[(FILE_MAXDIR+FILE_MAXFILE)*2]; + + BKE_ptcache_id_filename(id, filename, cfra, stack_index, 1, 1); + + return BLI_exists(filename); +} diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index 785cf515a42..87c09fb0ee4 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -44,7 +44,7 @@ typedef struct KeyBlock { float pos; float curval; - short type, adrcode, relative, pad1; /* relative == 0 means first key is reference */ + short type, adrcode, relative, flag; /* relative == 0 means first key is reference */ int totelem, pad2; void *data; @@ -87,5 +87,8 @@ typedef struct Key { #define KEY_CARDINAL 1 #define KEY_BSPLINE 2 +/* keyblock->flag */ +#define KEYBLOCK_MUTE 1 + #endif diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c b/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c index a62e4be4015..7f76cb40948 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c @@ -85,8 +85,11 @@ static void node_composit_exec_normalize(void *data, bNode *node, bNodeStack **i min = *val; } } + min = MIN2(0.1, min); + max = MAX2(0.9, max); + mult = 1.0f/(max-min); - + printf("min %f max %f\n", min, max); composit3_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, NULL, &min, NULL, &mult, do_normalize, CB_VAL, CB_VAL, CB_VAL); diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 9ffb7578980..05fed2f8fbc 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -410,7 +410,6 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an return; } } - efa= efa->next; } } else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) { @@ -484,7 +483,7 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an if(ma) { ob->actcol= find_material_index(ob, ma); if(ob->actcol==0) { - assign_material(ob, ma, ob->totcol); + assign_material(ob, ma, ob->totcol+1); ob->actcol= ob->totcol; } } @@ -2474,15 +2473,17 @@ static void editing_panel_shapes(Object *ob) uiBlockBeginAlign(block); if(ob->shapeflag & OB_SHAPE_LOCK) icon= ICON_PIN_HLT; else icon= ICON_PIN_DEHLT; uiDefIconButBitS(block, TOG, OB_SHAPE_LOCK, B_LOCKKEY, icon, 10,150,25,20, &ob->shapeflag, 0, 0, 0, 0, "Always show the current Shape for this Object"); + if(kb->flag & KEYBLOCK_MUTE) icon= ICON_MUTE_IPO_ON; else icon = ICON_MUTE_IPO_OFF; + uiDefIconButBitS(block, TOG, KEYBLOCK_MUTE, B_MODIFIER_RECALC, icon, 35,150,20,20, &kb->flag, 0, 0, 0, 0, "Mute the current Shape"); uiSetButLock(G.obedit==ob, "Unable to perform in EditMode"); - uiDefIconBut(block, BUT, B_PREVKEY, ICON_TRIA_LEFT, 35,150,20,20, NULL, 0, 0, 0, 0, "Previous Shape Key"); + uiDefIconBut(block, BUT, B_PREVKEY, ICON_TRIA_LEFT, 55,150,20,20, NULL, 0, 0, 0, 0, "Previous Shape Key"); strp= make_key_menu(key, 1); - uiDefButS(block, MENU, B_SETKEY, strp, 55,150,20,20, &ob->shapenr, 0, 0, 0, 0, "Browse existing choices"); + uiDefButS(block, MENU, B_SETKEY, strp, 75,150,20,20, &ob->shapenr, 0, 0, 0, 0, "Browse existing choices"); MEM_freeN(strp); - uiDefIconBut(block, BUT, B_NEXTKEY, ICON_TRIA_RIGHT, 75,150,20,20, NULL, 0, 0, 0, 0, "Next Shape Key"); + uiDefIconBut(block, BUT, B_NEXTKEY, ICON_TRIA_RIGHT, 95,150,20,20, NULL, 0, 0, 0, 0, "Next Shape Key"); uiClearButLock(); - uiDefBut(block, TEX, B_NAMEKEY, "", 95, 150, 190, 20, kb->name, 0.0, 31.0, 0, 0, "Current Shape Key name"); + uiDefBut(block, TEX, B_NAMEKEY, "", 115, 150, 170, 20, kb->name, 0.0, 31.0, 0, 0, "Current Shape Key name"); uiDefIconBut(block, BUT, B_DELKEY, ICON_X, 285,150,25,20, 0, 0, 0, 0, 0, "Deletes current Shape Key"); uiBlockEndAlign(block); diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index e7a2a654ba1..3360dab61f8 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3298,6 +3298,7 @@ static void object_softbodies__enable(void *ob_v, void *arg2) if (!ob->soft) { ob->soft= sbNew(); ob->softflag |= OB_SB_GOAL|OB_SB_EDGES; + softbody_clear_cache(ob, CFRA); } } /* needed so that initial state is cached correctly */ @@ -3331,6 +3332,7 @@ static void object_softbodies__enable_psys(void *ob_v, void *psys_v) psys->soft= sbNew(); psys->softflag |= OB_SB_GOAL|OB_SB_EDGES; psys->soft->particles=psys; + clear_particles_from_cache(ob, psys, CFRA); } psys->softflag |= OB_SB_ENABLE; } diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 14690b08d48..93915a0e92e 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -70,6 +70,8 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_meta_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_force.h" #include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_screen_types.h" @@ -101,8 +103,10 @@ #include "BKE_key.h" #include "BKE_main.h" #include "BKE_mesh.h" +#include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_particle.h" +#include "BKE_pointcache.h" #include "BKE_scene.h" #include "BKE_texture.h" #include "BKE_utildefines.h" @@ -3292,10 +3296,50 @@ static void inner_play_prefetch_shutdown(int mode) seq_stop_threads(); } +static int cached_dynamics(int sfra, int efra) +{ + Base *base = G.scene->base.first; + Object *ob; + ModifierData *md; + ParticleSystem *psys; + int i, stack_index, cached=1; + + while(base && cached) { + ob = base->object; + if(ob->softflag & OB_SB_ENABLE && ob->soft) { + for(i=0, md=ob->modifiers.first; md; i++, md=md->next) { + if(md->type == eModifierType_Softbody) { + stack_index = i; + break; + } + } + for(i=sfra; i<=efra && cached; i++) + cached &= BKE_ptcache_id_exist(&ob->id,i,stack_index); + } + + for(psys=ob->particlesystem.first; psys; psys=psys->next) { + stack_index = modifiers_indexInObject(ob,(ModifierData*)psys_get_modifier(ob,psys)); + if(psys->part->type==PART_HAIR) { + if(psys->softflag & OB_SB_ENABLE && psys->soft); + else + stack_index = -1; + } + + if(stack_index >= 0) + for(i=sfra; i<=efra && cached; i++) + cached &= BKE_ptcache_id_exist(&ob->id,i,stack_index); + } + + base = base->next; + } + + return cached; +} void inner_play_anim_loop(int init, int mode) { ScrArea *sa; static int last_cfra = -1; + static int cached = 0; /* init */ if(init) { @@ -3304,7 +3348,7 @@ void inner_play_anim_loop(int init, int mode) tottime= 0.0; curmode= mode; last_cfra = -1; - + cached = cached_dynamics(PSFRA,PEFRA); return; } @@ -3328,7 +3372,7 @@ void inner_play_anim_loop(int init, int mode) if (sa->spacetype == SPACE_SEQ) { scrarea_do_windraw(sa); } - } + } sa= sa->next; } @@ -3380,8 +3424,10 @@ void inner_play_anim_loop(int init, int mode) CFRA = PSFRA; audiostream_stop(); audiostream_start( CFRA ); + cached = cached_dynamics(PSFRA,PEFRA); } else { - if (U.mixbufsize + if (cached + && U.mixbufsize && (G.scene->audio.flag & AUDIO_SYNC)) { CFRA = audiostream_pos(); } else { diff --git a/source/blender/src/editkey.c b/source/blender/src/editkey.c index 0d861cda5d0..5cc193f8844 100644 --- a/source/blender/src/editkey.c +++ b/source/blender/src/editkey.c @@ -625,7 +625,7 @@ void insert_shapekey(Object *ob) void delete_key(Object *ob) { - KeyBlock *kb; + KeyBlock *kb, *rkb; Key *key; IpoCurve *icu; @@ -635,6 +635,10 @@ void delete_key(Object *ob) kb= BLI_findlink(&key->block, ob->shapenr-1); if(kb) { + for(rkb= key->block.first; rkb; rkb= rkb->next) + if(rkb->relative == ob->shapenr-1) + rkb->relative= 0; + BLI_remlink(&key->block, kb); key->totkey--; if(key->refkey== kb) key->refkey= key->block.first; diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index ae10cef0879..a74bd851aeb 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -82,6 +82,7 @@ editmesh_mods.c, UI level access, no geometry changes #include "BIF_interface.h" #include "BIF_meshtools.h" #include "BIF_mywindow.h" +#include "BIF_previewrender.h" #include "BIF_resources.h" #include "BIF_screen.h" #include "BIF_space.h" @@ -2126,6 +2127,12 @@ void mouse_mesh(void) allqueue(REDRAWIMAGE, 0); allqueue(REDRAWBUTSEDIT, 0); /* for the texture face panel */ } + if (efa && efa->mat_nr != G.obedit->actcol-1) { + G.obedit->actcol= efa->mat_nr+1; + allqueue(REDRAWBUTSEDIT, 0); + allqueue(REDRAWBUTSSHADING, 0); + BIF_preview_changed(ID_MA); + } } rightmouse_transform(); diff --git a/source/blender/src/editparticle.c b/source/blender/src/editparticle.c index e08ca3279d6..c9cf745fa44 100644 --- a/source/blender/src/editparticle.c +++ b/source/blender/src/editparticle.c @@ -1703,10 +1703,10 @@ static int remove_tagged_elements(Object *ob, ParticleSystem *psys) } } - MEM_freeN(psys->particles); + if(psys->particles) MEM_freeN(psys->particles); psys->particles = new_pars; - MEM_freeN(edit->keys); + if(edit->keys) MEM_freeN(edit->keys); edit->keys = new_keys; if(edit->mirror_cache) { @@ -2256,10 +2256,10 @@ static void brush_add(Object *ob, ParticleSystem *psys, short *mval, short numbe memcpy(new_keys, edit->keys, totpart * sizeof(ParticleEditKey*)); /* change old arrays to new ones */ - MEM_freeN(psys->particles); + if(psys->particles) MEM_freeN(psys->particles); psys->particles = new_pars; - MEM_freeN(edit->keys); + if(edit->keys) MEM_freeN(edit->keys); edit->keys = new_keys; if(edit->mirror_cache) { @@ -2267,8 +2267,6 @@ static void brush_add(Object *ob, ParticleSystem *psys, short *mval, short numbe edit->mirror_cache = NULL; } - psys->totpart = newtotpart; - /* create tree for interpolation */ if(pset->flag & PE_INTERPOLATE_ADDED && psys->totpart){ tree=BLI_kdtree_new(psys->totpart); @@ -2281,6 +2279,8 @@ static void brush_add(Object *ob, ParticleSystem *psys, short *mval, short numbe BLI_kdtree_balance(tree); } + psys->totpart = newtotpart; + /* create new elements */ pa = psys->particles + totpart; key = edit->keys + totpart; @@ -2691,10 +2691,10 @@ void PE_mirror_x(int tagged) memcpy(new_pars, psys->particles, totpart*sizeof(ParticleData)); memcpy(new_keys, edit->keys, totpart*sizeof(ParticleEditKey*)); - MEM_freeN(psys->particles); + if(psys->particles) MEM_freeN(psys->particles); psys->particles= new_pars; - MEM_freeN(edit->keys); + if(edit->keys) MEM_freeN(edit->keys); edit->keys= new_keys; if(edit->mirror_cache) { From 3bf1536f5ed210fb8832f782999ca6a072a6a3c6 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 18 Dec 2007 16:54:12 +0000 Subject: [PATCH 067/430] Some User UI changes: a) Don't ask the user anymore if he wants to overwrite the file when he's doing a simple ctrl-s/ctrl-w; b) Ask for saving on exit when a file has changed, ontheless quit.blend is saved anyway. --> All branch changes, not likely to go into trunk --- source/blender/blenkernel/BKE_blender.h | 1 + source/blender/blenkernel/BKE_cloth.h | 14 + source/blender/blenkernel/intern/blender.c | 7 +- source/blender/blenkernel/intern/cloth.c | 698 ++- source/blender/blenkernel/intern/implicit.c | 102 +- source/blender/blenkernel/intern/kdop.c | 1 + source/blender/blenkernel/intern/modifier.c | 2 + source/blender/makesdna/DNA_userdef_types.h | 1 + source/blender/src/blenderbuttons.c | 4737 +++++++++++-------- source/blender/src/header_info.c | 3 +- source/blender/src/toets.c | 4 + source/blender/src/toolbox.c | 22 + source/blender/src/usiblender.c | 52 +- 13 files changed, 3551 insertions(+), 2093 deletions(-) diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 243425db139..84ebd3102b3 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -70,6 +70,7 @@ extern void BKE_reset_undo(void); extern char *BKE_undo_menu_string(void); extern void BKE_undo_number(int nr); extern void BKE_undo_save_quit(void); +extern int BKE_undo_there(void); #ifdef __cplusplus } diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index e288e7ee082..d888ba28ebe 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -60,6 +60,18 @@ struct ClothModifierData; #define CLOTH_MAX_THREAD 2 +typedef struct fc +{ + float *d, *d0; // density + float *T, *T0; // temperature + float *u, *u0; // velocity in x direction + float *v, *v0; // velocity in y direction + float *w, *w0; // velocity in z direction +} fc; +fc *f_init(void); +void f_free(fc *m_fc); +void step(fc *m_fc, float dt); + typedef struct ClothVertex { int flags; /* General flags per vertex. */ @@ -69,6 +81,7 @@ typedef struct ClothVertex { unsigned int impulse_count; /* same as above */ float collball; char octantflag; + float weight; } ClothVertex; typedef struct ClothSpring { @@ -104,6 +117,7 @@ typedef struct Cloth { float (*v)[4]; /* the current velocity of all vertices */ float (*current_v)[3]; float (*xconst)[3]; + struct fc *m_fc; } Cloth; /* goal defines */ diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 9845f571126..13b48559f75 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -85,6 +85,7 @@ #include "BKE_bad_level_calls.h" // for freeAllRad editNurb free_editMesh free_editText free_editArmature #include "BKE_utildefines.h" // O_BINARY FALSE #include "BIF_mainqueue.h" // mainqenter for onload script +#include "BIF_toolbox.h" #include "mydevice.h" #include "nla.h" #include "blendef.h" @@ -617,6 +618,10 @@ void BKE_write_undo(char *name) success= BLO_write_file_mem(prevfile, &curundo->memfile, G.fileflags, &err); } + + /* signals "file needs save" on exit */ + if(curundo!=NULL && curundo->prev!=NULL) + U.uiflag |= USER_UNDOSAVE; } /* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */ @@ -694,7 +699,7 @@ char *BKE_undo_menu_string(void) return menu; } - /* saves quit.blend */ +/* saves quit.blend */ void BKE_undo_save_quit(void) { UndoElem *uel; diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 64166493caa..95d487b2ec7 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -78,6 +78,22 @@ #include "BIF_space.h" #include "mydevice.h" +#ifdef WIN32 +#include +#endif // WIN32 +#ifdef __APPLE__ +#define GL_GLEXT_LEGACY 1 +#include +#include +#else +#include +#if defined(__sun__) && !defined(__sparc__) +#include +#else +#include +#endif +#endif + #ifdef _WIN32 void tstart ( void ) {} @@ -482,6 +498,309 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) return ret; } +#define AMBIENT 50 +#define DECAY 0.04f +#define ALMOST_EQUAL(a, b) ((fabs(a-b)<0.00001f)?1:0) + + // cube vertices +GLfloat cv[][3] = { + {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f}, + {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f} +}; + + // edges have the form edges[n][0][xyz] + t*edges[n][1][xyz] +float edges[12][2][3] = { + {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + + {{1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, + + {{-1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, 1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}} +}; + +void light_ray(unsigned char* _texture_data, int _ray_templ[4096][3], int x, int y, int z, int n, float decay) +{ + int xx = x, yy = y, zz = z, i = 0; + int offset; + + int l = 255; + float d; + + do { + offset = ((((zz*n) + yy)*n + xx) << 2); + if (_texture_data[offset + 2] > 0) + _texture_data[offset + 2] = (unsigned char) ((_texture_data[offset + 2] + l)*0.5f); + else + _texture_data[offset + 2] = (unsigned char) l; + d = _texture_data[offset+1]; + if (l > AMBIENT) { + l -= d*decay; + if (l < AMBIENT) + l = AMBIENT; + } + + i++; + xx = x + _ray_templ[i][0]; + yy = y + _ray_templ[i][1]; + zz = z + _ray_templ[i][2]; + + } while ((xx>=0)&&(xx=0)&&(yy=0)&&(zz0) ? 0 : n-1; + int sy = (_light_dir[1]>0) ? 0 : n-1; + int sz = (_light_dir[2]>0) ? 0 : n-1; + + float decay = 1.0f/(n*DECAY); + + for (i=0; i 0) ? 1 : -1; + int yinc = (ly > 0) ? 1 : -1; + int zinc = (lz > 0) ? 1 : -1; + float tx, ty, tz; + int i = 1; + int len = 0; + int maxlen = 3*edgelen*edgelen; + _ray_templ[0][0] = _ray_templ[0][2] = _ray_templ[0][2] = 0; + + while (len <= maxlen) + { + // fx + t*lx = (x+1) -> t = (x+1-fx)/lx + tx = (x+xinc-fx)/lx; + ty = (y+yinc-fy)/ly; + tz = (z+zinc-fz)/lz; + + if ((tx<=ty)&&(tx<=tz)) { + _ray_templ[i][0] = _ray_templ[i-1][0] + xinc; + x =+ xinc; + fx = x; + + if (ALMOST_EQUAL(ty,tx)) { + _ray_templ[i][1] = _ray_templ[i-1][1] + yinc; + y += yinc; + fy = y; + } else { + _ray_templ[i][1] = _ray_templ[i-1][1]; + fy += tx*ly; + } + + if (ALMOST_EQUAL(tz,tx)) { + _ray_templ[i][2] = _ray_templ[i-1][2] + zinc; + z += zinc; + fz = z; + } else { + _ray_templ[i][2] = _ray_templ[i-1][2]; + fz += tx*lz; + } + } else if ((ty0)&&(t<2)) { + ret[num][0] = edges[i][0][0] + edges[i][1][0]*t; + ret[num][1] = edges[i][0][1] + edges[i][1][1]*t; + ret[num][2] = edges[i][0][2] + edges[i][1][2]*t; + num++; + } + } + + return num; +} + +void draw_slices(float m[][4]) +{ + int i; + + Vec3 viewdir(m[0][2], m[1][2], m[2][2]); + viewdir.Normalize(); + // find cube vertex that is closest to the viewer + for (i=0; i<8; i++) { + float x = cv[i][0] + viewdir[0]; + float y = cv[i][1] + viewdir[1]; + float z = cv[i][2] + viewdir[2]; + if ((x>=-1.0f)&&(x<=1.0f) + &&(y>=-1.0f)&&(y<=1.0f) + &&(z>=-1.0f)&&(z<=1.0f)) + { + break; + } + } + if(i != 8) return; + + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glDisable(GL_DEPTH_TEST); + // our slices are defined by the plane equation a*x + b*y +c*z + d = 0 + // (a,b,c), the plane normal, are given by viewdir + // d is the parameter along the view direction. the first d is given by + // inserting previously found vertex into the plane equation + float d0 = -(viewdir[0]*cv[i][0] + viewdir[1]*cv[i][1] + viewdir[2]*cv[i][2]); + float dd = 2*d0/64.0f; + int n = 0; + for (float d = -d0; d < d0; d += dd) { + // intersect_edges returns the intersection points of all cube edges with + // the given plane that lie within the cube + float pt[12][3]; + int num = intersect_edges(pt, viewdir[0], viewdir[1], viewdir[2], d); + + if (num > 2) { + // sort points to get a convex polygon + // std::sort(pt.begin()+1, pt.end(), Convexcomp(pt[0], viewdir)); + int shuffled = 1; + + while(shuffled) + { + int j; + shuffled = 0; + + for(j = 0; j < num-1; j++) + { + // Vec3 va = a-p0, vb = b-p0; + // return dot(up, cross(va, vb)) >= 0; + float va[3], vb[3], vc[3]; + + VECSUB(va, pt[j], pt[0]); + VECSUB(vb, pt[j+1], pt[0]); + Crossf(vc, va, vb); + + if(INPR(viewdir, vc)>= 0) + { + float temp[3]; + + VECCOPY(temp, pt[j]); + VECCOPY(pt[j], pt[j+1]); + VECCOPY(pt[j+1], temp); + + shuffled = 1; + } + } + } + + glEnable(GL_TEXTURE_3D); + glEnable(GL_FRAGMENT_PROGRAM_ARB); + glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, _prog[0]); + glActiveTextureARB(GL_TEXTURE0_ARB); + glBindTexture(GL_TEXTURE_3D, _txt[0]); + glBegin(GL_POLYGON); + for (i=0; ir.cfra; float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); ListBase *effectors = NULL; - float deltaTime = current_time - clmd->sim_parms->sim_time; + float deltaTime = current_time - clmd->sim_parms->sim_time; + unsigned char* _texture_data=NULL; + float _light_dir[3]; + int _ray_templ[4096][3]; clmd->sim_parms->dt = 1.0f / (clmd->sim_parms->stepsPerFrame * G.scene->r.frs_sec); @@ -577,7 +899,14 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d cloth = clmd->clothObject; } - + /* + deltaTime = 0; + while( deltaTime < 1.0) + { + step(cloth->m_fc, 0.1); + deltaTime+=0.1; + } + */ clmd->clothObject->old_solver_type = clmd->sim_parms->solver_type; // Insure we have a clmd->clothObject, in case allocation failed. @@ -632,6 +961,34 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d } } + cloth = clmd->clothObject; + /* + if(cloth) + { + if (_texture_data == NULL) + _texture_data = (unsigned char*) malloc((30+2)*(30+2)*(30+2)*4); + + for (i=0; i<(30+2)*(30+2)*(30+2); i++) { + _texture_data[(i<<2)] = (unsigned char) (cloth->m_fc->T[i] * 255.0f); + _texture_data[(i<<2)+1] = (unsigned char) (cloth->m_fc->d[i] * 255.0f); + _texture_data[(i<<2)+2] = 0; + _texture_data[(i<<2)+3] = 255; + } + + // from ligth constructor + _light_dir[0] = -1.0f; + _light_dir[1] = 0.5f; + _light_dir[2] = 0.0f; + + gen_ray_templ(_ray_templ, _light_dir, 30 + 2); + + cast_light(_texture_data, _ray_templ, _light_dir, 30+2); + + glActiveTextureARB(GL_TEXTURE0_ARB); + glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30+2, 30+2, 30+2, 0, GL_RGBA, GL_UNSIGNED_BYTE, _texture_data); + free(_texture_data); + } + */ return result; } @@ -653,6 +1010,8 @@ void cloth_free_modifier (ClothModifierData *clmd) if (cloth) { + f_free(cloth->m_fc); + // If our solver provides a free function, call it if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) { @@ -834,6 +1193,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d unsigned int numverts = dm->getNumVerts(dm); MVert *mvert = CDDM_get_verts(dm); float tnull[3] = {0,0,0}; + Cloth *cloth = NULL; /* If we have a clothObject, free it. */ if (clmd->clothObject != NULL) @@ -851,6 +1211,10 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); return 0; } + + cloth = clmd->clothObject; + + cloth->m_fc = f_init(); switch (ob->type) { @@ -1228,3 +1592,333 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) * SPRING NETWORK BUILDING IMPLEMENTATION END ***************************************************************************************/ +#define F_ITER 20 +#define m_diffusion 0.00001f +#define m_viscosity 0.000f +#define m_buoyancy 1.5f +#define m_cooling 1.0f +#define m_vc_eps 4.0f + +#define GRID_SIZE 30 +#define SIZE ((GRID_SIZE+2)*(GRID_SIZE+2)*(GRID_SIZE+2)) +#define _I(x,y,z) (((z)<<10)+((y)<<5)+x) + +#define SWAPFPTR(x,y) {float *t=x;x=y;y=t;} + +float buffers[10][SIZE]; +float sd[SIZE], su[SIZE], sv[SIZE], sw[SIZE], sT[SIZE]; + + +// nothing to do in this mode +// add code for 2nd mode +void set_bnd(int b, float* x, int N) +{ +} + +void lin_solve(int b, float *x, float *x0, float a, float c, int N) +{ + float cRecip = 1.0 / c; + int i, j, k, l; + for (l=0; lN+0.5) xx=N+0.5f; i0=(int)xx; i1=i0+1; + if (yy<0.5) yy=0.5f; if (yy>N+0.5) yy=N+0.5f; j0=(int)yy; j1=j0+1; + if (zz<0.5) zz=0.5f; if (zz>N+0.5) zz=N+0.5f; k0=(int)zz; k1=k0+1; + sx1 = xx-i0; sx0 = 1-sx1; + sy1 = yy-j0; sy0 = 1-sy1; + sz1 = zz-k0; sz0 = 1-sz1; + v0 = sx0*(sy0*x0[_I(i0,j0,k0)]+sy1*x0[_I(i0,j1,k0)])+sx1*(sy0*x0[_I(i1,j0,k0)]+sy1*x0[_I(i1,j1,k0)]); + v1 = sx0*(sy0*x0[_I(i0,j0,k1)]+sy1*x0[_I(i0,j1,k1)])+sx1*(sy0*x0[_I(i1,j0,k1)]+sy1*x0[_I(i1,j1,k1)]); + x[_I(i,j,k)] = sz0*v0 + sz1*v1; + } + } + } + set_bnd(b,x, N); +} + +void advect_cool(int b, float* x0, float* x, float* y0, float* y, float* uu, float* vv, float* ww, float dt, float cooling, int N) +{ + int i, j, k, i0, j0, k0, i1, j1, k1; + float sx0, sx1, sy0, sy1, sz0, sz1, v0, v1; + float xx, yy, zz, dt0, c0; + dt0 = dt*N; + c0 = 1.0f - cooling*dt; + for (k=1; k<=N; k++) + { + for (j=1; j<=N; j++) + { + for (i=1; i<=N; i++) + { + xx = i-dt0*uu[_I(i,j,k)]; + yy = j-dt0*vv[_I(i,j,k)]; + zz = k-dt0*ww[_I(i,j,k)]; + if (xx<0.5) xx=0.5f; if (xx>N+0.5) xx=N+0.5f; i0=(int)xx; i1=i0+1; + if (yy<0.5) yy=0.5f; if (yy>N+0.5) yy=N+0.5f; j0=(int)yy; j1=j0+1; + if (zz<0.5) zz=0.5f; if (zz>N+0.5) zz=N+0.5f; k0=(int)zz; k1=k0+1; + sx1 = xx-i0; sx0 = 1-sx1; + sy1 = yy-j0; sy0 = 1-sy1; + sz1 = zz-k0; sz0 = 1-sz1; + v0 = sx0*(sy0*x0[_I(i0,j0,k0)]+sy1*x0[_I(i0,j1,k0)])+sx1*(sy0*x0[_I(i1,j0,k0)]+sy1*x0[_I(i1,j1,k0)]); + v1 = sx0*(sy0*x0[_I(i0,j0,k1)]+sy1*x0[_I(i0,j1,k1)])+sx1*(sy0*x0[_I(i1,j0,k1)]+sy1*x0[_I(i1,j1,k1)]); + x[_I(i,j,k)] = sz0*v0 + sz1*v1; + v0 = sx0*(sy0*y0[_I(i0,j0,k0)]+sy1*y0[_I(i0,j1,k0)])+sx1*(sy0*y0[_I(i1,j0,k0)]+sy1*y0[_I(i1,j1,k0)]); + v1 = sx0*(sy0*y0[_I(i0,j0,k1)]+sy1*y0[_I(i0,j1,k1)])+sx1*(sy0*y0[_I(i1,j0,k1)]+sy1*y0[_I(i1,j1,k1)]); + y[_I(i,j,k)] = (sz0*v0 + sz1*v1)*c0; + } + } + } + set_bnd(b,x, N); + set_bnd(b,y, N); +} + +void fproject(float* u, float* u0, float* v, float* v0, float* w, float* w0, int N) +{ + float* p = u0; float* div = v0; // temporary buffers, use old velocity buffers + int i, j, k; + float h; + h = 1.0f/N; + for (k=1; k<=N; k++) { + for (j=1; j<=N; j++) { + for (i=1; i<=N; i++) { + div[_I(i,j,k)] = -h*( + u[_I(i+1,j,k)]-u[_I(i-1,j,k)]+ + v[_I(i,j+1,k)]-v[_I(i,j-1,k)]+ + w[_I(i,j,k+1)]-w[_I(i,j,k-1)])*0.5; + p[_I(i,j,k)] = 0; + } + } + } + set_bnd(0, div, N); + set_bnd(0, p, N); + lin_solve(0, p, div, 1, 6, N); + + for (k=1; k<=N; k++) { + for (j=1; j<=N; j++) { + for (i=1; i<=N; i++) { + u[_I(i,j,k)] -= (p[_I(i+1,j,k)]-p[_I(i-1,j,k)])*0.5*N; + v[_I(i,j,k)] -= (p[_I(i,j+1,k)]-p[_I(i,j-1,k)])*0.5*N; + w[_I(i,j,k)] -= (p[_I(i,j,k+1)]-p[_I(i,j,k-1)])*0.5*N; + } + } + } + set_bnd(1, u, N); + set_bnd(2, v, N); + set_bnd(3, w, N); +} + +void vorticity_confinement(float *T0, float* u, float* u0, float* v, float* v0, float* w, float* w0, float dt, float vc_eps, int N) +{ + int i,j,k,ijk; + float *curlx = u0, *curly = v0, *curlz=w0, *curl=T0; // temp buffers + float dt0 = dt * vc_eps; + float x,y,z; + + + for (k=1; ku, m_fc->u0, m_fc->v, m_fc->v0, m_fc->w, m_fc->w0, m_fc->T, m_fc->T0, dt, GRID_SIZE); + dens_temp_step(sd, sT, m_fc->T, m_fc->T0, m_fc->d, m_fc->d0, m_fc->u, m_fc->v, m_fc->w, dt, GRID_SIZE); +} + + + +void clear_buffer(float* x) +{ + int i; + for (i=0; id=buffers[i++]; m_fc->d0=buffers[i++]; + m_fc->T=buffers[i++]; m_fc->T0=buffers[i++]; + m_fc->u=buffers[i++]; m_fc->u0=buffers[i++]; + m_fc->v=buffers[i++]; m_fc->v0=buffers[i++]; + m_fc->w=buffers[i++]; m_fc->w0=buffers[i++]; + + clear_sources(sd, su, sv); + + size=(GRID_SIZE+2)*(GRID_SIZE+2)*(GRID_SIZE+2); + for (i=0; iv[i] = -0.5f; + + return m_fc; +} + +void f_free(fc *m_fc) +{ + if(m_fc) + MEM_freeN(m_fc); +} + diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 7d7ad480026..9e4428c1055 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1630,12 +1630,13 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod float magrelVel = 0.0; float epsilon = clmd->coll_parms->epsilon; - return 0; cloth1 = clmd->clothObject; if(!collpair) + { return 0; + } // TODO: check distance & calc normal // calc distance + normal @@ -1650,8 +1651,11 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod if (collpair->distance > (epsilon + ALMOST_ZERO)) { + printf("collpair->distance > (epsilon + ALMOST_ZERO)\n"); return 0; } + + printf("IN1\n"); // compute barycentric coordinates for both collision points collisions_compute_barycentric (collpair->pa, @@ -1683,6 +1687,8 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod // If v_n_mag < 0 the edges are approaching each other. if ( magrelVel < -ALMOST_ZERO ) { + printf("magrelVel < -ALMOST_ZERO\n"); + // Calculate Impulse magnitude to stop all motion in normal direction. // const double I_mag = v_n_mag / (1/m1 + 1/m2); float magnitude_i = magrelVel / 2.0f; // TODO implement masses @@ -2162,6 +2168,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, int collisions = 0, count = 0; float (*current_x)[3]; Implicit_Data *id = NULL; + int ret = 0; if (!(((Cloth *)clmd->clothObject)->tree)) { @@ -2206,7 +2213,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, if ( collision_list ) { LinkNode *search = collision_list; - + while ( search ) { collisions_collision_response_static(clmd, collmd, (CollisionPair *)search->link); @@ -2234,6 +2241,24 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } } + // vertex weight = 2 + + for(i = 0; i < cloth->numverts; i++) + if ((cloth->verts[i].impulse_count > 0) && !(cloth->verts[i].flags & CVERT_FLAG_PINNED)) + { + printf("applying impulse\n"); + + VECADDS(cloth->current_v[i], cloth->current_v[i], cloth->verts[i].impulse, 1.0 / (cloth->verts[i].impulse_count * 2.0)); + + // reset + cloth->verts[i].impulse_count = 0; + cloth->verts[i].impulse[0] = 0.0; + cloth->verts[i].impulse[1] = 0.0; + cloth->verts[i].impulse[2] = 0.0; + + ret = 1; + } + ////////////////////////////////////////////// // update velocities + positions ////////////////////////////////////////////// @@ -2243,78 +2268,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, } ////////////////////////////////////////////// - /* - // fill collision list - collisions += bvh_traverse(self_bvh->root, self_bvh->root, &collision_list); - // call static collision response - - // free collision list - if(collision_list) - { - LinkNode *search = collision_list; - - while(search) - { - float distance = 0; - float mindistance = cloth->selftree->epsilon; - CollisionPair *collpair = (CollisionPair *)search->link; - - // get distance of faces - distance = plNearestPoints( - cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[2]], collpair->pa,collpair->pb,collpair->vector); - - if(distance < mindistance) - { - /////////////////////////////////////////// - // TODO: take velocity of the collision points into account! - /////////////////////////////////////////// - - float correction = mindistance - distance; - float temp[3]; - - VECCOPY(temp, collpair->vector); - Normalize(temp); - VecMulf(temp, -correction*0.5); - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[0]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[0]], cloth->current_x[collpair->point_indexA[0]], temp); - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[1]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[1]], cloth->current_x[collpair->point_indexA[1]], temp); - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexA[2]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexA[2]], cloth->current_x[collpair->point_indexA[2]], temp); - - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[0]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[0]], cloth->current_x[collpair->point_indexB[0]], temp); - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[1]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[1]], cloth->current_x[collpair->point_indexB[1]], temp); - - if(!((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (cloth->verts [collpair->point_indexB[2]].goal >= SOFTGOALSNAP))) - VECSUB(cloth->current_x[collpair->point_indexB[2]], cloth->current_x[collpair->point_indexB[2]], temp); - - collisions = 1; - -} - -} - - search = collision_list; - while(search) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; -} - BLI_linklist_free(collision_list,NULL); - - collision_list = NULL; -} - */ // Test on *simple* selfcollisions collisions = 1; count = 0; @@ -2409,5 +2363,5 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, */ ////////////////////////////////////////////// - return 0; + return ret; } diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 234a6b75548..74b5b3d7b7f 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -915,6 +915,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // of list are horrible slow! BLI_linklist_prepend(&collision_list[0], collpair); } + return 1; } else diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 554613b3355..50160771054 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5187,6 +5187,8 @@ static void collisionModifier_deformVerts( // recalc static bounding boxes bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); + + printf("bvh_update_from_mvert\n"); } collmd->time = current_time; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c37b332929d..138040b13ca 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -259,6 +259,7 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_KEYINSERTNEED (1 << 19) #define USER_ZOOM_TO_MOUSEPOS (1 << 20) #define USER_SHOW_FPS (1 << 21) +#define USER_UNDOSAVE (1 << 22) // flag to signal a write_undo() call after a save (save on exit needed then) /* transopts */ diff --git a/source/blender/src/blenderbuttons.c b/source/blender/src/blenderbuttons.c index c8fb9ec7a7a..84bb22afeac 100644 --- a/source/blender/src/blenderbuttons.c +++ b/source/blender/src/blenderbuttons.c @@ -1,2020 +1,2731 @@ /* DataToC output of file */ -int datatoc_blenderbuttons_size= 64418; +int datatoc_blenderbuttons_size= 87170; char datatoc_blenderbuttons[]= { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 0, 0, 0, 1, 0, 8, 6, 0, 0, 0,197,144,206,103, 0, - 0, 0, 1,115, 82, 71, 66, 0,174,206, 28,233, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167,147, 0, 0, - 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 0, 7,116, 73, 77, 69, 7,215, 11, 26, 20, - 59, 43, 0,186, 29, 9, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236,125,121, 92, 84, 85,255,255,251,220,217,217, 23, 1, 21,151, -193,125, 95,201, 37, 55, 40, 53,243,155,153, 6,148,154,100,101, 98,137,218,147,166, 61,101,143,250,211, 71,197,164, 50, 53,161, -167,210,172, 52, 5,115,201, 45, 81, 7,245, 81, 82,113, 47, 23, 20, 69, 4, 69,150, 97, 22,102,187,115,151,223, 31, 51, 67, 3, - 2,179,128, 91,207,188, 95,220,215,229,222,123,238,103,206, 61,219,103, 61,231,144, 30, 61,122,240,240,192, 3, 15, 60,240,192, - 3, 15,254,167, 64,121,138,192, 3, 15, 60,240,192, 3, 15,254,119,112,230,236, 1, 0, 0,241, 88, 0, 60,240,192, 3, 15, 60, -240,192, 99, 1,240,192, 3, 15, 60,240,192, 3, 15, 60, 2,128, 7, 30,120,224,129, 7, 30,120,224, 17, 0, 60,240,192, 3, 15, - 60,240,192,131,191, 5,132,246, 23,231,206,157, 35,238, 18,170, 41,150,192, 67,207, 67,175, 54,164,166,166,242,107,215,174,125, -100,249, 27, 55,110, 28,191,105,211, 38,226,169,143, 39,154, 30,234, 65, 15,158,242,243,208,251, 59,211,115, 89, 0,248, 31, 71, -245, 2, 36,143,115, 62, 83, 82, 82, 48,117,234, 84,226,169, 54,247,235,120,216,176, 97,149,215, 25, 25, 25,127,139,178, 28,253, - 82, 66,157, 3,193,142,237,169,127,235, 54, 35, 11,220, 6,169,177, 13, 34, 64,163, 2,123,145, 99,152,247, 56,183, 69, 79,255, -245,224,241,177, 0, 60,140,198, 58,122,244,232,168, 29, 59,118, 40,236,174,163,119,236,216,145,249, 88,244, 72,222, 50,118, 18, -242,216,246, 75, 62, 47, 47, 15, 0, 32,151,203,159,164, 65,196,105,233,116,220,184,113, 78,167,221,180,105,147, 43,130, 26,191, -101,203,150,202,139,109,219,182, 97,216,176, 97, 85,158, 63, 42, 33, 32, 59, 59,155, 7,128,200,200, 72,210, 16,233,118,108, 79, -125,160,245, 23, 30,209, 28, 0,112,207,104, 4, 99, 48, 89,110,170, 52, 0,128,216,216, 88,164,165,165,213,154,191,222,185,189, -249,182,119,219,186,244,227, 63, 15,252,217,137,122,145, 33,240,221,139, 48,238,216,134,242,242, 49, 40, 7,208, 75,246, 41,230, -201, 78,163,185, 20, 40, 49,230, 98,158, 33,206,165,223,141,141,141,141, 74, 75, 75, 83, 84,187, 23,157,150,150,150,249,152,245, -173, 6,105,183, 79,200,247, 54, 56,154, 4, 75,136,143,200,159,152,164, 98,222,164, 50, 80, 21, 6, 13,167, 51,153,255, 39,102, -199, 57, 20, 0,172, 12,219,118,174,111, 67,224,119,236,216,129,133, 91, 22,195,167,185, 63, 42,110,171, 49, 63,110,158,226, 49, -215,184, 31, 39, 16,185, 92,206,231,229,229, 33, 47, 47, 15,251,246,237,195,212,169, 83, 31, 87, 33,192,214,129, 72,106,106,170, - 40, 33, 33,193,188,124,249,242, 83, 0, 48,103,206,156,167,234,122,113,204,152, 49,149,255, 51, 12, 11,218,108, 2,109,162, 65, -211,150,131, 97, 24,204,153, 51,199,165,188,216, 51,255,154, 96, 21, 6,248, 71,105, 9,112, 69,248,121,100, 26,126,128, 31, 46, -220,248, 25, 50, 52, 3,139, 99, 40,254,230, 12,206,231,150, 97,236,178,117, 78,189,222,246,110, 91, 39, 25,186, 5,175,254,247, - 85,135,101, 34, 27, 57, 15, 65,163,223, 66,225,123,189, 0, 67,121,229,253, 51,134, 15,112, 6, 0, 12,192, 96, 89, 44, 14, 6, -158, 70, 0,128,222,229,189,157,106, 51,105,105,105,247,221,180, 99,144,228, 49,234, 99, 13, 49, 6, 60, 9,223,219,160, 24,208, -173, 7,121, 45, 60, 66,168,106,209, 72, 16,218, 49,156, 18,146, 80,162, 87,171, 57, 41,194, 88,170,103, 51,246,245, 81,195, 89, - 39, 73,221,113,225,103,155, 58,145,102,150, 11,244,146, 31,168, 0,176, 99,199, 14,197,150, 79, 62, 66,220,162, 37,138,122, 54, - 2,222,198,248, 1,160, 84, 95, 6, 4, 3,255, 60,184, 0,154, 27,229, 88,243,246,202,199,141,145,213, 54,240, 60,234, 60, 86, - 10, 1, 35, 70,140, 64, 94, 94, 30,228,114,249, 99, 87,118, 10,133,101,220,136,142,142,230, 1, 80,169,169,169,225, 9, 9, 9, -133,203,151, 47, 63,237, 44, 17,134, 97, 64,211,230, 74,198,111,207,252,179,179,179, 17, 25, 25,233, 82,166,226,226,226,236,153, - 45, 50, 50, 50,170, 11, 0, 13,209, 86, 92,174,135,200,200, 72, 50,110,220, 56,126,248,240,225,247, 61,219,191,127,191,205,210, - 97,179,122, 56, 77,191, 33,221, 1,225, 17,205, 81, 88,174,198, 47, 83, 95, 70, 48, 25,128,220,255,204, 70,171, 49,173,144,225, - 2,243,175, 44, 44,171,169,141, 52,128,169, 45,124,203, 49,232,111, 85,160, 48, 33,162,206,116, 23,165, 7,176,176,235, 61, 44, -189,248,113,125,235,179, 33,152,110, 67,210, 64, 3,211,122, 16,223,219, 32,136,143,143,247, 2,240, 52, 0, 31,187,219, 42, 0, - 23, 54,108,216,160,116,150,206, 23,107,191,160,232, 82,147,136, 54, 25,165,229, 48, 75, 69, 34,161, 80, 99,148, 82, 98,177,129, - 19,248,121, 51,180,204,108, 22, 22,221, 49,125,255,205,122,227,235,147, 39,177,206,124,183, 74,165,250,183,237,255,156,156,156, - 82,111,111,111, 74,167,211,113,246,105,250,244,233,243,121, 3, 51,246, 89,245, 45, 83,161, 35,237,255,242,229,203,104,235,227, -103,111, 13,112,199, 10, 80,201,252, 75,245,101, 88,250,236,130,202, 7,111,236,120, 23, 8, 5,198, 44,143,195,182, 57, 91, 92, -105,100,117, 13,110,245,110,168,183,111,223, 6, 0, 52,111,222,188,202,255,112,193,156,221,128,130, 8,169, 77, 8, 48,155, 25, - 91, 60, 64,131,104, 1, 13, 80,150,246,204, 31, 0, 72, 66, 66, 2, 0,220, 73, 77, 77, 13, 76, 72, 72, 40,119,154,249,155,205, -160,105, 19, 76, 52, 13,115, 53,230,207,115,174, 85, 67, 92, 92, 28,178,179,179,255,234, 93,201,201,136,137,137,169,188, 78, 79, - 79,175,183,176, 99, 39,240,212,187,253,217, 51,254,113,227,198,161,103,207,158, 54, 1,192, 85,139, 64,131, 52,194,130, 27,249, -208,109,251, 23,124,222, 92,137,240,136,230, 8, 11,150,225,198,182, 27, 22,230, 31,224,103,113, 1,136, 4,206, 73,176, 13,228, - 99,107,119,233, 58,110,207, 95, 12, 67,218,250,186, 45, 4, 50, 25,140, 70, 35,114,115,115, 81,108,188,138,118, 8,175, 53,173, -213, 12, 94, 87,219, 39,182,126, 98, 77,155,233, 70,255, 34,118,253,154,119,179,159,145, 58, 24,183,211,109,176,166,239,141,137, -137,225, 9, 33, 54, 87, 78,125,190,215,214,151,121,161, 80, 88,175, 58,143,143,143,247, 7, 48,230,224,193,131,255,226, 56,206, -100,215,150,132, 2,129,192, 59, 62, 62,126,242,134, 13, 27,246, 56,228,152,115,103, 9, 75,239,148, 72, 69, 34,137, 55, 37, 36, -126,188, 64,226,197, 9, 4, 66,142, 80,224,136,144,229, 5, 2,147,128, 35, 70,157,128,213,123,139, 69,228,155, 99,123,140,137, - 73,147, 56,228, 59,206, 99,121,121,185, 70,175,215, 51, 0,160,211,233,184,143, 62,250,168,146,225, 47, 89,178,228, 31,245,109, -239, 67,135, 14,157,106,251,255,192,129, 3, 41, 13,209,135, 40, 71,218,255,226, 87, 98, 96, 44, 41,193,236,206, 29, 96,239,187, -119, 90, 11, 25, 61, 58, 10, 64, 21,230, 63,122,244,232,104, 0,100,244,232,209,209,235, 70,127,101,177, 44,182,111, 84, 37,189, - 51,152,179, 38, 7,115,214,228, 96,218,138,203,120,125,209, 31, 24,251,207,115,245, 31,232, 10, 10,156, 18, 12, 30, 22,243,183, -250,252,249, 90, 44, 1, 48,211, 52,250,246,233,211, 16, 66, 6,191,101,203, 22,108,217,178, 5, 10,133,162,242,112, 81,224,225, - 21, 10, 5,162,163,163, 43,153,191,253,195,132,132, 4,149, 51, 3, 19,195,176, 22,205,223,100, 49,253, 87,103,254, 44,203, 66, -103,208,185,244,129, 54,139, 65,117,171, 65,122,122, 58,210,211,211,171, 8, 3, 46,125,111,102,213,241,208,122, 93, 47, 33,209, -198,252,199,141, 27,135,229,203,151, 87, 50,127,145, 80,228, 42,243,183, 13,224,181, 29, 78,195,128,124, 84,140,233, 11, 62,109, - 54, 10,110,228,131, 31,211,241,175, 66, 72,155, 13, 97,147, 16, 32, 32,224,161, 74,198,186,210, 92, 24,210,214,131,231,121, 92, -188,120, 17,131, 7, 15,134, 76, 38,171,194,248, 3, 3, 3, 97, 48, 24, 96, 48, 24, 80, 88, 88,136,241,134, 25,248, 38,240,189, - 90,105, 58,105,242, 38,213,210,186,202,184, 27, 74, 89, 33,181, 48,127,167,219, 96,245,239,141,137,137,225,211,211,211,145,150, -150,134,216,216, 88,190,190,223,107,101,254, 96, 24,198,237, 62, 17, 31, 31, 47, 5,240,246,129, 3, 7, 62, 90,180,104,209, 9, - 66,136,220,118, 0,104, 22, 28, 28,236,117,232,208,161,181,241,241,241,131,235,162,243, 85,202, 90,129,128,136, 36, 52,195,251, -153, 76,230, 80,150,227,154,177, 28, 23,193, 18,210, 2, 2, 65, 48, 33, 36, 0, 68,224,199,241, 8,226,105, 46, 64, 99, 48,123, -135,250, 49, 2,170,143,214,169, 58,210,235,245, 76,117,173,255,113, 7, 85, 23,227,110,215,174, 29,218,250,248, 65, 95,116, 23, -207,247,236,229, 50,131,182, 9, 17, 11,183, 44, 6,128, 74,230,111,179, 34,236,216,177, 35,211, 38, 4, 20,104,238,160,215,156, -126, 46, 9, 25, 58, 3, 11,157,129,197,221, 50, 19, 10, 75,140,184,125,207,232, 22,227,179,117, 22, 71,204,255, 81,161, 14, 33, - 0, 70,218, 4,163,209, 88, 31,242,188, 66,161,128,205, 71, 30, 18, 18, 98,175,205,194,133,193,164,138, 38, 92,135, 41,209,225, -160, 71,155, 77, 22,205,223, 68,131, 54, 87,101,254,102,179, 25, 58,157, 14, 90,141,246, 81, 87, 11,191,101, 75, 90,213, 79,178, -252,193,122,223,173, 1,207,158,249,219, 24, 63, 69, 81,144, 74,165,240,246,241,170, 87,134, 71,191,148,192,215,118, 56,122,119, -223, 63, 23, 32, 24, 3,192, 12,157, 14, 0,240,201,186,142,243,185,101,150, 65,126,232,116,152, 47, 46, 4, 74,203, 92, 43, 64, - 43,220,253, 30,111,148, 2, 0,214,175, 95,143, 29, 59,118,224,211, 79, 63,197,201,147, 39, 97, 50,153, 80, 92, 92,108,211,202, - 42,211,135,135,135,195, 0, 64,128,155,143,164,189,212,209,238, 73, 61,132, 70, 82,135, 5,207,101,154,246,150,176,154, 98, 2, -220, 97,254, 0,224,174, 16, 16, 31, 31,223,216,202,252,167,124,255,253,247,151,230,205,155,247,210,198,141, 27,209,174, 93, 59, - 0, 64,203,150, 45,161, 86,171, 37, 11, 23, 46, 60,125,232,208,161, 31,227,227,227,229,181,150, 18,199, 19,112,140,148,101,153, - 32,150, 97,155,153, 89,115, 27, 1, 69,154,138,133,148, 72, 42, 18, 24,132, 94, 98,149,183,175, 64, 35,144,242,140, 84, 32,240, - 22, 50,180,223,205, 51,103, 37, 19, 67,190,112,152,239,156,156,156, 82,157, 78,199,213,100,230,239,222,189,251, 85,154,166, 27, -172, 33,117,239,222,189,193,104, 9,235, 98,220,255,153,242,214, 95,204,182,224, 54,102,119,238,128, 21, 22, 6,237,146,212,106, -211,254,109, 76,191,218,239, 84, 94, 7,119,109,236, 82,230, 43, 12, 44,180,122, 6, 26, 29, 3,117, 5, 3,149,150,113,189, 87, -214, 16,249,111,175,229,219,255,127,227,198, 13,168, 84,170,135, 54, 98,164,164,164, 64, 46,151,195, 22,244, 87,205,215,207,167, -164,164,192,104, 48,212, 71, 0,224,215,173, 91,135,130,194, 66,136, 4, 2,132, 53,110, 92,133,249, 63,251,236,179, 56,120,240, -160,179,131, 19,137,142,142,174, 46, 4, 84,177,100, 56, 27,171, 64,155,104,208, 38, 19,204,102, 26, 12,195, 86, 50,127,147,201, - 4,189, 94,143,138,138, 10,104,181,174, 11, 0,246, 46, 0, 27,220,213,252,183,164,109, 1,120,160,212,202,104,172, 78,109, 16, -158,183, 8, 1,105,105,136,179,104, 80, 46,245,149,234,204, 95, 36, 18, 65, 34,145, 64, 42,149, 66, 42,149,214,187, 77,213,230, - 18,168,105, 94,188, 61,198,166,108, 5,255, 98, 4,238,245,239,133, 96, 12,128,236,229, 85, 96,238,150, 0, 1,126, 16,150,109, -194,174, 47, 78, 3, 2,129, 75,121,169,175, 43, 64, 39,176,140, 41, 75,151, 46, 69, 73, 73, 9,214,174, 93,139,238,221,187, 99, -209,162, 69,232,213,171, 23, 12, 6, 67,117, 13,205, 38, 82, 63,108,198,239, 44,131,118,215, 29, 80,155, 32,225, 50, 29,235, 44, -142,202,190,225,174,107,204,158,249, 87, 50, 27,171, 16,224,162, 59,192,247,194,133, 11, 95,190,243,206, 59, 71,186,118,237,234, - 7, 0, 11, 22, 44, 64, 78, 78, 14, 0,160, 95,191,126,248,229,151, 95, 48,112,224, 64,239,241,227,199,231,102,102,102, 30,120, -227,141, 55,198,159, 61,123,246,190,146, 13, 10, 14,226,110,220,200,101, 50, 21, 7,247,182,105,211, 54, 51,162,165,252,146,192, - 87, 86, 44, 32, 98, 29, 37, 17,233, 41,169,151,150, 22, 10,104,240,102, 1, 39, 53,251,106, 11,203,124, 78, 30, 58,215,167, 81, - 96,216, 47, 14,133, 81, 59,159,255,182,109,219, 94, 31, 51,102,204,247, 54,179,191, 70,163,161,196, 98,113,189, 27,146,205,236, -127,224,192,129, 7,107, 1,176,105,249,145,173,219,194, 88, 82, 2, 93,129,133, 9, 14,182,106,135,174, 90, 1,110,252,113,253, - 62,218, 53, 93,151, 93, 44,114, 41,243,245,101,254,246,140,159,231,121,155,143,191, 18,102,179,185,242, 80,169, 84,208,233,116, - 80, 42,149, 15,109,228,176,205,243,223,183,111, 95,117, 75, 0,159,146,146,130,110,221,186,193,104, 52, 84, 14,116, 41, 41, 41, - 46,153,235,215,124,181, 6,102,179, 25,205,194,195, 97,102,217,218,152,191, 43, 3, 9,169,193,244, 95, 57,117,177, 46, 75,198, -125, 2, 0,109,174,100,254,167, 78,158,130,222, 96,128, 86,171,133, 90,173,134, 74,165,170,162,217,185, 10,155, 27,160, 30,126, -127,148,149,150,161,172,172, 20,165,101, 74,148,150,149,161,172,172, 12,101,165, 22,141,180, 67,199,142, 80, 90,255,119, 85,251, - 7,128,158, 61,123,254,165,245,123,123,195,199,199, 23,190, 62,190,208,106,181,209,245,100,254,110,187, 3,114, 63,157, 2,209, -203,171, 16,140, 1, 16,102,173,130,121,235,116, 32,192, 15, 59,223,141,193,173,157, 55, 49,106,249, 6, 64,248,144,151, 21, 49, -222,130, 44, 92, 6,157, 78, 7,163,209, 8,189, 94,143,172,172, 44, 44, 91,182,172,198,228, 94, 94, 54, 11,202,117,119,152,183, -187, 90,181,125,249, 18, 39,175,235, 35,100,184,218,103,171,208, 73, 75, 75, 35,177,177,177, 54,230,239,182,101, 66, 40, 20, 18, -134, 97,170, 11, 5,112, 53, 22, 96,195,134, 13,215, 98, 99, 99,187,111,220,184,113,240,209,163, 71,125,135, 14, 29,122,210,198, -252,173, 10, 36, 36, 18, 9,127,235,214, 45,209,222,189,123,219, 7, 6, 6,158, 26, 48, 96, 64,110, 77,180, 94,125,229, 85,174, -109, 68, 59,109,191,126,253, 98, 46, 93,250,243, 25,141, 78,219,152,103,204, 12, 40,152, 25, 19,101, 50,153, 76, 6, 13,138, 52, -156,201,168, 45,204, 47, 98,118,237,222,147,212, 40, 56,164,152,166,245, 14,213,247,154,180,255,242,242,114, 33, 0,248,249,249, - 61,182,110, 1,170, 54,237,127,203, 39, 31, 89,164,230,162,187, 85,158,185, 26, 11, 48,122,244,232,232, 53,111,175, 4, 96, 9, -248,219,177, 99,135,194,198,244,109,107, 2, 12,251,225, 37, 0,192,153,229,191,219,226, 3, 30, 22, 42, 27, 99, 65, 65, 65,165, -182,111, 99,250,118,149, 11,173, 86, 11,163,209,104, 55,136, 60,188, 60, 78,157,106,137,253, 48, 51, 12, 46, 93,186,132,179,103, -206,160,123,183,238, 48, 26,141, 48, 24,140, 48, 26, 12,248,241,135, 31, 96, 75,231, 76, 71, 79, 78, 78, 70,167,142,157, 96, 54, -155,113,237,218, 53, 48,102, 26,133, 5,133, 13, 90,166,182,107,235,154, 5,182,181, 11, 28, 91, 0,204, 38, 48,172,197,236,127, -226,196,239,208, 25,116,168,208,106,160, 86,171, 81,174, 82,161,188, 92, 89, 47, 65,204,102, 9,112, 83,251, 7, 0, 28, 57,114, - 4, 90,173, 22, 90,173,198,122,214,162, 81,112, 48, 58,116,236,136, 43,151, 47,227,240,145, 35, 46,211,180,105,255, 66,161, 8, - 94, 94, 94,240,241,241,129,175,143, 15,124,124,188,160, 44, 87, 70, 39, 36, 36,100, 58,213,231,234, 97,234,175, 13,231,115,203, - 96,190,184, 16,101, 56, 6, 50,114, 5,200,128,127, 33,247,211, 41,120,113,249,247,144,138, 40, 64, 36,180, 28,238,112, 29, 55, - 93, 1,133, 47,124,133,160, 77, 47, 64,175,215, 35, 40, 40, 8,229,229,229, 40, 47, 47,199,241,227,199,113,247,238,221, 74, 51, -113,101,250,194, 66,188, 27, 40, 67, 35,175,146,186, 52,224,104,123,166, 26, 27, 27, 27,101,247, 44,170,218,179,104, 23,251, 5, - 95, 7, 3,111,136, 25, 5, 46,107,254, 53,125,111, 90, 90, 26, 73, 79, 79, 39,245,252,222, 42, 66,128, 59,204,223,134,143, 63, -254,248,194, 75, 47,189, 52,126,233,210,165,237,207,159, 63, 63, 64, 38,147, 9, 94,124,241, 69, 34,145, 72,192,113, 28, 25, 57, -114,228,133,153, 51,103,118,235,210,165,203,206,201,147, 39,191, 62,121,242,228, 90,125, 81, 9,211, 18,184, 63, 47, 95, 59,213, -165,107,183,215, 78,157, 60, 57,118,231,238, 95,151,100,159, 60,217,248, 82,206, 21,233,181,194, 92,254,199,149,155,101, 75,147, - 63,237,116, 96,247,238,228, 54,173,219,236,242, 9,243, 62,178, 97,195, 6,214,217, 18, 29, 58,116, 40, 78,157, 58,213, 35, 37, - 37,101,161,209,104, 20, 45, 90,180,232,179,157, 59,119,142, 43, 44, 44,124,232,140,195,169, 58,170,237, 65,240,205, 60, 40,129, - 74,237,223,134,193, 33, 33, 88,129, 43,206,107, 29, 86, 19,255,149,211,151, 16,208,190, 17,134,253,240, 18,118, 76,220,174,176, - 73,111, 54,230,111,211,254, 93,153,101,240,203,210, 30, 13,195, 97, 9,193,229,203,151, 97,107,172,213,205,203, 34,145, 8, 34, -145, 8, 37, 37, 37, 24, 57,114,228,163,168, 39, 34,151,203,249,148,148, 20,244,233,211, 7, 70,147, 9, 6,163, 1, 70,107,112, -147,193,104,113, 3,172, 94,189, 26,137,137,137,142, 6, 19,126,249,242,229, 96, 89, 22,167, 79,159,129, 72,104, 49,219,182,109, -219, 22, 55,243,242, 80, 88, 88,136, 77,155,126,198,184,113,175, 2, 0, 95,205, 18, 80,235, 0,148,154,154, 42, 6,192, 36, 36, - 36,112, 53,105, 64,174, 76, 85,180,105,254, 89, 89, 89,208, 85,232, 43, 5, 48,141, 86, 3,141, 70, 13,141,198, 61, 23,128,189, -246, 63,110,220,184, 74, 11,128,171,130,192,184,113,227,170, 92, 71,200,229,232,208,209, 18, 20,119,229,242,101,220,180, 90, 60, -198,141, 27,231,114,212,126,255,167,251, 67, 34,150, 64, 38,147, 65, 42,149, 66, 34,145,160,168,168,200,105,230,111,167,237, 55, -104, 3, 28,187,108, 29,126, 1, 48, 98,233,255,129, 79,155, 13, 18,151,140,243,185,101, 32, 65,129,184, 94,160,177,104,255, 46, -186, 0,236,250, 31,177, 9, 2,246,215, 14, 97, 48, 0, 2,139,178,247,151,121,223,194,232,205,102, 51,190,249,230, 27, 12, 30, -252, 87, 92,216,193, 73,225, 64,177, 30,237,247,148,163, 71, 72,203, 26, 73,214, 16,229,110,239,242, 84, 56, 72,235, 44,195, 38, -245,176, 40,212,101,141,112, 89,144,120,208,223,107, 21, 2,234, 61, 11, 96,233,210,165,155,102,204,152, 17,114,238,194,133, 56, -131,193,208, 77,161, 56, 36,147, 72, 37, 66,138, 80, 56,116,232,144,111,167, 78,157, 54,196,198,198,254,107,236,216,177, 14,181, -245,204, 67,251,185, 81, 47,141, 58,220,189,123,207, 57, 52, 99, 26,113, 61,231,218, 18, 46, 47,151, 1,192, 75, 65,153,187,182, -105,159, 22, 26, 26,178, 71, 32, 20,255,248,239,121, 73,244, 23,139, 62,119, 88, 75,125,250,244,249,124,232,208,161, 0,128,146, -146, 18, 28, 56,112,192,239,187,239,190, 91, 2, 0,167, 78,157,234,211,185,115,231,125, 79,132, 0, 96, 91,248,231,217, 31, 55, - 58,210,236, 93,153, 18, 72,182,205,217,194,247,154,211, 15,193, 93, 27, 87, 50,253, 74,115,234,197, 34,156, 89,254,187,171,102, -171,134,154,147, 74, 0,240, 29, 59,118,196,197,139, 23,171, 48, 22,149, 74,149, 11,160,181,139,210,252,131,180, 4,220,247,155, - 63,254,240, 35,140, 70, 35, 76,180, 9, 52, 77, 99,249,242,229,117, 45,146,195, 47, 95,190,188,242,130,227, 88, 72,101, 62, 48, - 24,140,184,124,233, 18,132, 34, 17,204, 52, 13, 47,111, 47,108,218,180, 9, 2,129, 0,113,113,113,120,246,217,103,249,178,178, -218, 3,188,150, 47, 95,190, 47, 33, 33,129, 78, 77, 77, 13,181,149, 77,181,117, 0, 92, 50,109,206,153, 51, 7,199,142, 29, 67, - 69, 69, 5, 42,116, 58,104, 53, 26, 43,243,215, 64,171,209,162, 66, 91, 1,157,221,128,239, 76,217, 69, 70, 70,242,217,217,217, -149,218,127, 77,211, 0,157, 93, 4,200, 58, 23,191, 74, 93,216,152,190,205,247,232,202, 42,133,182, 21,254, 0,192,199,203, 7, - 82,153, 20, 90,173, 54,218,230,218,113,131,249, 63,144,249,218, 54, 33, 96,204,210,239,192,111, 5, 26, 77, 74, 69,230,123, 49, - 24,152,244, 19, 32, 18,193, 91, 90, 63, 63,103,117, 65, 0, 0,198, 29, 27,231,224,173,123,232,186,207, 11, 69,191,234, 81,190, -248,175,187,102,179, 25,131, 6, 13, 2, 0,132, 7,202,240,223,212,230,248,116,217,109,124,117,198,224, 72, 35,182,159, 22,135, -218,254,183, 75,155,233,198,152,213, 80,115,235, 27,194,231,255, 32,191,183, 82, 8,104,136,246,247,229,151, 95,126,249,198,164, - 55,246, 62,213, 59,178,143, 86,163, 9, 98, 88,198, 20, 22, 22, 86, 18, 30, 30, 94,164,209,104,206,143, 29, 59,214,233, 65,225, -215,237,191,114, 0, 54,189, 54,225,173,172, 1, 3, 7,110,151,201,100,254, 4, 60, 71, 8, 1,199,241,106,131,174, 92,113,245, - 66,190,214, 91, 34,118,106,156,183, 49,127,192, 18, 72, 93, 61, 80,111,217,178,101,255,122, 34, 4, 0, 43, 83,119, 88, 97, 59, -118,236,112,185,177,158, 89,254, 59, 15, 0, 54, 65,192,142,241, 55, 36, 67,119,187, 35,117,237,218, 21,167, 78,157, 66, 73, 73, -165,137,176, 53, 0,216,152,223,196,137, 19, 31,117,125, 85, 41,163,148,148, 20,254,181,137,175, 97,245,234, 53, 86,159, 57,131, - 57,115,230,212, 57,125,201,197, 21,244, 44,154,211,193,131,142, 54,155,232,184,124,249,242,107, 9, 9, 9,197,169,169,169,130, -132,132,132,202,128, 64,235,180, 64,167, 7, 58,155,198, 60, 96,192,128, 6, 47,187,200,200, 72,222, 94,139,183,143, 1,112, 99, - 5, 64, 2,128,223,180,105,211,125, 90,190,213, 66,224,114,123,222,180,105, 19,113,213, 98,224, 12,234, 50,253,187, 42, 44,140, - 93,182, 14,176, 91,248,103,200, 71,127, 77, 71,214, 53, 84, 69,217, 89, 0, 28,173, 4, 88, 56,160, 16,133, 0,122,125, 26,136, -197,167,219, 33, 4, 64, 73,174, 14,109,218,180,177, 48,141,197,129,120,238,169, 16, 68, 60,151,227,172, 70,236,180,123,211,154, -150,184, 59,222, 52,208,152, 87, 47, 90, 15,233,123, 27, 12,235,214,175,187, 6,224, 90, 67,209,251,241,167,111,243,208, 0, 81, -161, 13, 25,152,103,197,172,135, 81,158, 15,123, 51, 32, 50,122,244,232,168, 29,203, 31,203,189, 0, 8, 0,254,169,167,158,194, -158, 61,123,140, 86,166,207, 1,240,122, 64,150,135,122,195, 22, 36,152,152, 56,141,183,106,254,143, 36,111,115,230,204,105, 89, -147, 89,210,110, 26,161, 43,218, 14,121,192,117, 92,153,159,250, 46,251, 91,219,170,124,174, 50,113, 71,107,251, 55, 4,234,227, - 18,152, 59,119, 46,110,220,184,209, 96,121,113,102,121, 95, 87,113,230,131,114,156,129, 37, 48,116,112,172, 12,191,157,104,135, - 48, 47, 31,252,153,125, 15,237,157,100,254, 78,180,191,199,117, 57, 92,242,128,222,245, 44,207,238, 28,154, 54, 48,189,228,135, -149,241,135,190, 27, 96,117, 11,131, 27,150,132, 7, 46, 4,140, 28, 57, 82,250,132, 53, 64,183, 52,251,134,250,237,212,212, 84, -219, 10, 53, 76, 66, 66, 66,125,167, 50,121,208,240,204,191, 94,117,145,148,148,212, 32,117,153,154,154, 42, 76, 24,152,240,192, -219,197,145, 52, 3,142,164,229, 60,246,125,214,211, 50, 61,120,228,141,208,221,125,132, 61,240,192, 3, 15, 60,240,192,131, 39, - 23,148,167, 8, 60,240,192, 3, 15, 60,240,192, 35, 0,120,224,129, 7, 30,120,224,129, 7, 30, 1,192, 3, 15, 60,240,192, 3, - 15, 60,240, 8, 0, 30,120,224,129, 7, 30,120,224, 1, 0,156, 4, 80, 98, 61, 63,145,168, 50, 11,224,220,185,115,110, 71,166, -214, 20, 76,232,161,231,161,231,161,231,161,231, 36,189, 58,167,137, 62, 6,244, 60,245,235,161, 87,133,249,159, 61,123,118, 24, - 96,217, 96,146, 16, 98,124,220,190,215, 99, 1,240,192, 3, 15,224,239,239, 79,249,251,251, 19,127,127,127, 17, 0,193,227,150, - 63,219,190,243,118,251,207,215, 23, 53,173,143,239,193, 99,132,255,251,191,255,139,122,194, 63,161, 15, 0,219,178,195,162, 39, -245, 35, 60, 2,192,223, 28,245,216,110,221,101, 12, 27, 54, 44,202, 58,232, 86, 30,214,123,127, 75,122,143, 57, 72,203,176, 48, - 2, 0,106,181,154, 83,171,213,188, 90,173, 54, 3, 96,221, 33,246,246,115, 93, 11,166,140,232, 58, 26, 0,166,140,232,250,195, -219,207,117, 93, 3, 0,115,198, 60, 69,230,188, 28, 41,122,123,120, 23,183,214, 20,177, 95,138, 54, 45, 45,173,202,230, 59,245, - 97,254,118,237,190, 33,215,218,175, 47,205,134,166,247,196, 50,255, 61,123,246, 40,254, 6,159,194,160,225, 86,116,172, 21, 77, -130, 37,164,109,227, 80,170,133,188, 25, 9, 11, 8, 22,120, 75, 68, 13,246,123,194,191, 73,155,162, 0,200, 96, 49,199,112,240, -160,138, 0,224,196,222, 42, 38, 0,146,250,254, 84, 70, 70, 6,146,147,147,171, 44,255, 55,107,214, 44, 91, 71, 39,238,208,227, - 54, 7, 86,173,232, 87, 50, 30, 23,122,143,125,213, 71,120,203,248,136, 86,114, 0, 64, 17,205, 76,104, 44, 22,254,100,123,120, - 69, 83, 33, 41, 42, 45,165,157, 33, 52,121,120,151, 28,150,229,195,159,238,223,200,175,125,251, 1,251, 37, 18,234,214,180,164, - 62,255,254, 15,185,136,123,106,253,255,137,132,228, 87,128, 92, 2,208,217,213, 76, 86, 95,138,182,158,203,205, 86, 97,254,118, -109,223,221, 65,154,184,120,255, 97,211,123, 98,153, 63,199,113, 32,132, 96,240,224,193,252,145, 35, 71,136,139,117, 44, 6, 96, -110,136,252, 4, 5, 5, 77, 81, 42,149, 95,187,249,186, 4,128,209,206, 18,208,160, 24,208,173, 7,121, 45, 60, 66,168,106,209, - 72, 16,218, 49,156, 18,146, 80,162, 87,171, 57, 41,194, 88,170,103, 51,246,245, 81,195,217,250,254,134,179, 2, 64, 8,128, 72, - 0,217,176, 4, 61, 60, 78,240, 3, 48, 20,192, 24, 0,219, 0, 28, 0,160,105, 0,186, 63, 3,120,181,129, 24,236,163,147,140, - 40,135, 70,158, 62,214, 14, 21, 10,160,216,221,129,119,230,204,153,104,209,162,197,125,219,133, 38, 39, 39, 71,231,231,231, 43, - 86,174, 92,233,202, 32,204,175,159,238,141,248,129,247,111, 46,195,109, 14,196,134,255,210,152,180, 74,247,200,232, 45, 95,190, - 60,234,195, 15, 63, 84,196,197,197,225,231,159,127, 38, 0,240,206, 59,239, 68,173, 93,187, 86,209,162, 69, 11,112, 28, 7,131, -193,128,168,168, 40,108,221,186,213, 33,205,117,203, 63,139,106,255,225, 22, 69, 70,175,102,209,243,179,211, 51, 1, 96,205,194, - 53, 81, 87,231, 51, 10,182,133, 31, 52,156, 55,202, 13,126, 40,246, 63, 21,125,242,198, 39,153,142,232,181,106, 22,214,184,133, - 88,118,119,250,180,137,166, 48,153, 88,172, 81, 26,200,242,239, 54,254,244,209,212,215, 16, 40,147,241, 70, 51,203,127,178,250, - 59, 83, 81,105, 41,105,220, 56, 88, 88, 84, 84, 86,107, 35, 57,179,237,229,182, 59,118,222, 14, 24,240,116, 72,114,207,222, 65, -162,245,235,175,203, 67, 26,201, 74, 63,127,239, 68,242,140,151,122,176, 79,247,111,148,149,115, 77,155, 63, 41,190,245,200,111, -246, 95,172, 15, 83,172,175, 38,197,215,100,241,170,167, 16, 80,219, 59,238,230,181,161,233, 61,177,204,127,214,172, 89, 24, 60, -120, 48,255,223,255,254,215, 29, 82, 52, 44,102,119,166, 1,178, 85, 20, 20, 20, 52, 70,169, 84,110,115,227, 93,127,171,210, 25, - 8,224,110,124,124,124, 0,128, 41,214,107, 27,238, 1,248,117,195,134, 13,185,206, 18,253, 98,237, 23, 20, 93,106, 18,209, 38, -163,180, 28,102,169, 72, 36, 20,106,140, 82, 74, 44, 54,112, 2, 63,111,134,150,153,205,194,162, 59,166,239,191, 89,111,124,125, -242, 36,182, 62,109,199, 25, 23, 64,115, 0, 63, 0,136,177,158,155, 63, 70,109, 42, 24,192, 38, 0,207, 3, 56, 14, 96,132,245, - 58,184, 1,104,191, 2, 39,252,165, 15,211,196,254,128,208, 15,192, 85, 0, 17,238,104, 35, 54, 19,186, 61,243,159, 53,107,150, -194, 78,243,175,124,230,140,185,221,150,198,158, 89, 83,175,148,131,122,165,188,242,218,246,236, 81,208, 3,128, 19, 39, 78, 40, -164, 82, 41,178,178,178,238, 19,182,242,243,243, 73, 65, 65, 1,233,215,175, 95,244,238,221,187,157, 42,195,198, 39, 46, 41,120, -169, 8,221, 74,196, 85,180, 97, 66,241, 88,147,255, 6,249,161, 32,142,200, 71, 92,140,102,238,188,224,208,108, 26,213, 74,206, -183, 16,203,238,190,255,238, 4, 83, 51, 31,177, 88,125,233, 24,241, 42,190,128, 25,131,218,162,105,128, 12,197,103,142,146,123, -167,143, 81,179,166, 76,164,163, 90,201,249, 14, 94,190,230,186, 52,152, 70,141,196, 67,196, 98, 74,122,252,248,221,153,167, 78, -222,233, 24,214,172,149, 57,160, 81, 51,226,235, 11,175, 86, 17, 94, 17, 65, 65,146, 54, 28,207,155,118,157, 44,214, 61,194, 54, -204,219, 51,123,219, 81, 67, 31,229,157,165, 85,237, 92,253,168, 41,221,195,162,247,196, 50,255,221,187,119, 43, 8, 33,160, 40, - 10,217,217,217, 56,122,244,168, 91,180, 88,150,189, 96,181, 0, 52, 68, 60,139, 76,169, 84,110, 11, 10, 10,122,217,141,119,205, -214,250, 50,197,199,199,135, 1, 88,113,240,224,193,127,103,100,100,188,111, 59, 14, 28, 56,176, 92,161, 80,228,196,199,199,207, -119,134,224,172,185,179,132,165,119, 74,188, 12,188, 41,128, 23,146, 80, 94, 34,105,204,137,196,141, 57, 66,133,114, 68, 24,194, - 8, 4, 65, 28, 71,252,117,132,245, 97,196,148,236,155, 99,123,132,210, 23, 67, 31,168, 0,240, 5,128,131, 0,102, 88,207, 95, -212,163,176, 3, 1, 44, 0,176,219, 90,112,187,173,215,129,110,210, 59, 2, 96, 15,128, 4, 0,107, 1,252,195, 74,243, 72, 61, - 27,133,191,245,236,221, 0, 26, 54,172, 26,246, 2,235,249,113,195, 83, 0,142, 1,104,108, 21,158, 94,115,229,229,140,140, 12, -133,189,217,127,214,172, 89,138,228,228,228,232,228,228,228,104,123, 33, 32, 57, 57, 57, 58, 35, 35, 67,225, 12, 61,123, 51, 61, -245, 74, 57,174,237,153,136,107,123, 38, 86, 97,218,220,230, 64,184, 75,207, 42,228, 16,119,232,165,164,164, 68, 29, 63,126, 28, - 19, 38, 76, 64,126,126, 62, 18, 18, 18,162,106, 74, 35,149, 74, 21, 77,154, 52,113, 88,126,169, 41, 41, 81, 77,142,255,129,130, - 9, 3, 32,206, 87,227,235, 5,159, 71, 85, 87,142, 83, 82, 82,163, 68,198, 22,138,160, 38, 6,135,204,127,202,228, 87,232, 79, -102, 78,228,197,183,206,136, 3,239, 93, 36, 23,239,106, 16, 30,226,141,167, 59,133,161,169,234, 42,110,104, 13, 16,114, 60, 2, -136, 64,244,207,183, 38,240,211,223,121,243,106, 84, 43,121,173, 76,167, 92,165, 13,234,211,199, 39,185,107,191,231,205,190, 65, -173, 37, 62, 1,161,156,204,199,219, 20,212, 40,216, 24, 18,222, 92, 88,174,212, 74, 52,106, 6,229,106,147,211,131,144,213,207, -239,144,113, 58, 25, 15,112,159,230, 95,147, 80,238,130, 16, 64,106, 56, 87, 63,106, 74,231, 20, 61,126, 75,224,125,135,139,244, -158, 56, 80, 20,197,239,221,187, 87,193,113, 28,222,123,239, 61, 16, 66,112,244,232, 81, 88,182,222,229,136, 27,244, 64,211,244, - 89,171, 5,160,190,110,108, 37, 0, 40,149,202,173, 65, 65, 65,209,238,240, 79,154,166,133, 0,190, 62,112,224, 64,252,162, 69, -139,238, 16, 66,196,182, 3,128, 40, 56, 56,152, 28, 58,116,104, 94,124,124,252,116, 71, 4, 5, 68, 36,161, 25,222,207,100, 50, -135,178, 28,215,140,229,184, 8,150,144, 22, 16, 8,130, 9, 33, 1, 32, 2, 63,142, 71, 16, 79,115, 1, 26,131,217, 59,212,143, - 17, 80,125,180, 15, 76, 0, 8,183,106,252,159,194,178,219,231,167,214,235,112, 55,126,107, 34,128,124,107, 3,159, 11, 32,200, -122, 38,214,251,174,238,181,251, 47, 0,215, 1,172,177,154,131, 36,214, 6,241,149,245,126,125,246, 95, 30, 12,139,171, 99, 72, - 3,245,129, 55, 1,204,183,158, 31, 55,116, 6,176, 29,192,179, 86, 75, 74,103,119, 9,217,152,191, 61,211,183, 23, 2, 92,110, -156, 86,230,111, 67,117, 33,192, 29,122,213, 6, 88,226, 42,189,195,135, 15,131,166,105,244,238,221, 59,186, 67,135, 14,200,203, -203,171,252, 62,142,227, 32,151,203,249,121,243,230, 41,142, 31, 63,142,145, 35, 71, 58, 28, 80,140, 89,167, 64,209, 12, 84,189, -229,209,166, 14,193,184,190,238,240, 95, 76,139,227, 49, 77,190,142, 63, 60, 47, 88,113,243,184, 63,134,189,113,205,241, 0, 69, - 9, 42, 74, 46,102,113, 69, 42, 35,202, 42,104, 62,166, 71, 11,222, 95, 38,198, 29,149, 14, 37,106, 3,226,122,182,224, 41, 66, -248,223,127,221, 7,245,145, 19,252,153,109,187,110,213, 69, 46,235,108,211,105, 33,161,126,173,155,182,136, 96,188,100, 92,235, -193,207,199,249,180,234,157,240, 66,227,118, 47, 14, 11,106, 26,217, 93, 89,209, 56,198, 76,155,205, 55,114,117,126, 78, 50,127, -222,217, 45,104,211,210,210, 20, 14,102, 6,212,248,204, 9,151,156,103,118,192, 67,212,252,121,158,135,217,252,151,203,126,224, -192,129,182,254,226, 46,227, 50,139, 68, 34, 51,199,113,199,173, 90,120,125,132,128,208, 74, 73, 64,169, 84, 4, 5, 5, 37,184, -240,110,185, 74,165,146, 28, 62,124,248,181, 3, 7, 14, 60,255,253,247,223,151,205,155, 55,175,197,198,141, 27,209,174, 93, 59, - 0, 64,203,150, 45,161, 86,171,201,194,133, 11,139, 15, 29, 58,244,121,124,124,252,192, 58, 41,114,140,148,101,153, 32,150, 97, -155,153, 89,115, 27, 1, 69,154,138,133,148, 72, 42, 18, 24,132, 94, 98,149,183,175, 64, 35,144,242,140, 84, 32,240, 22, 50,180, -223,205, 51,103, 37, 19, 67,190,112,187, 61, 59, 18, 0,158,179,106,135,246, 56,102,189,239, 10,198, 3,120, 15,128,220,202, 8, -255, 0, 80,110, 61,207,183,222,127,207,154,206, 25,120,193,226,107,137,183, 94,155,236, 14, 88,239, 79,193,253, 91,249, 58,139, - 87, 0,124,103, 61,215, 23,111, 0,152,102, 45,179,105,214,235,199, 5,109, 96, 9,154,220, 5, 32, 17,192, 84, 0, 81,158, 97, -171,118, 20, 22, 22, 42,250,246,237,139,169, 83,167,102,246,237,219, 23, 39, 78,156,192,218,181,107,163, 26, 55,110,172,160, 40, - 10,121,121,121,164,180,180,148, 76,159, 62, 61,250,200,145, 35,138,201,147, 39,215,217, 57,251,223,188,163, 40,234,219, 17, 9, - 83,167,102,254, 25,198, 70,119, 86, 7, 41, 82,215,166, 70, 89,164, 19, 96, 77,222, 27,100, 83,105, 12, 25, 60,189, 48,250,104, -154, 92, 17,253,244,167,181,214, 79, 1,205,172,248,250,235,141, 65, 91, 47, 20,222,222,120, 38, 95,181,238,248, 13,221,205, 34, - 35, 79,241, 20,140,122, 22, 37, 37, 52,178,243,203,217, 29,121,133,218,221,119,138, 84,191,220, 42,184,114,172,168,120,248,109, -147,249,179,218,104,250, 5,134, 55, 51, 84,148, 55,237, 20,249, 12, 69,147,150,131, 11,175,108, 55, 4, 6,121,203, 90,117,236, - 81,194, 51, 37, 23,136,192, 47,132,227, 56,193,189,123, 6,103,172,120,188, 45,226,223,142, 17, 87, 55,131,219, 95,195,154,158, -119, 66,195,174,212,244,109,135, 51,233, 61,120,176,168,168,168, 80, 0,128, 80, 40,196,236,217,179,145,157,157, 13, 55,253,254, -246, 48, 1, 48,153, 76, 38, 83, 97, 97, 97, 6,234, 23, 16,168,173, 98, 14, 80, 42, 83,131,130,130, 70, 57,249,174,212,104, 52, -134,207,153, 51, 39,249,157,119,222,209,119,237,218, 85, 2, 0, 11, 22, 44, 64, 78,142,101, 55,202,126,253,250,129,227, 56, 12, - 28, 56, 80, 50,126,252,120,237,149, 43, 87, 14,189,241,198, 27,125,188,188,106,102, 77, 28,199, 51,153, 7, 15,238,205,203,187, - 49,158, 53,179,141, 4, 34,153, 73, 64,164, 58, 74, 34,214, 83, 82, 47, 45, 45,242,170, 0, 37, 81,115, 82,214,172, 85,151,249, - 40,118,158, 27,197,158, 58,235,118, 0,183, 35, 1, 96, 56,128, 67,213,238, 29,178,222,119, 22, 2, 0, 31, 1,136, 3, 80, 86, - 75,154, 50,235,243,143,224,156, 95,103, 60,128,253, 0,212,181, 60, 87, 91,159,143,119,163, 76,158,129, 37,134, 96,153,245,252, - 76, 61, 26, 87,140,213,106,210,207,154,159,126,214,235, 24, 23,233, 4, 2, 8,112,226,112,213,149,210, 31,150, 85,172,108, 65, - 72,183,172,150, 30,183,226, 60,170,107,252,213, 45, 2,174,130,219, 28,136,182, 35,127,168,188,110, 59,242,135,251,162,248, 93, -165, 87,141,153,240,174,208, 91,189,122, 53,159,157,157,192,140, 1,163, 0, 0, 32, 0, 73, 68, 65, 84,141,211,167, 79,163, 89, -179,102,252,111,191,253, 6,141, 70,131,203,151, 47,223,167,209,126,244,209, 71,153,157, 58,117,138,222,178,101, 75,173,244,190, - 89,189,154,111,158,125, 17,161,167,115,160,104, 54,146,239,122,149, 81, 80, 26, 51,216,203, 21,247,165,125,255,163,183, 50, 91, - 68,158,142,190,245,199, 43,181,106,207,215, 11, 10, 62, 40,160,153, 21, 37,165, 6, 57,109, 96, 3,115,238,104,124,118, 95, 41, - 44, 51,181,236,142, 78,161, 65, 0,128,221,231,238, 9,115,139, 42,252, 0, 4, 22,209,198, 78,183, 77,230,216,220,194,194, 15, -106,163, 57,228,133, 56,170,195,224, 37, 93, 25,221, 31,249, 45, 58, 14,149,137, 68, 44,125,253,143, 12, 85, 97,254,229,123,197, -249,191,231,107,148,133, 0, 69, 17,165,150,246,159, 18,215,211, 81,187, 33,177,177,177,213,153,113,117,179,186,253, 53,172,233, - 31, 86, 52,190, 7, 13,136,193,131, 7,243,135, 15, 31, 6,183, 57, 0, 60,207,227,243,207, 63,199,145, 35, 71,108,130,154,219, -117, 80, 94, 94,110, 34,132, 12, 58,117,234,148, 49, 60, 60,124, 88, 61,173, 58, 1,128,101, 54,128,245, 60, 17, 0, 23, 20, 20, -228,140,162,102,108,220,184,177,122,223,190,125,111,110,220,184,209,255,232,209,163,226,161, 67,135,170,109,204, 31,176,108,119, - 47,145, 72,112,235,214, 45,106,239,222,189,126,129,129,129,119, 7, 12, 24,144,203,113, 53, 79, 86,107, 27,209, 78,219,175, 95, -191,152, 75,151,254,124, 70,163,211, 54,230, 25, 51, 3, 10,102,198, 68,153, 76, 38,147, 65,131, 34, 13,103, 50,106, 11,243,139, -152, 93,187,247, 36, 53, 10, 14, 41,166,105,189,219,179, 16,168, 26, 58, 6,101, 61,154,194,226, 23, 62,108,119,143,178, 94, 55, -182, 62,183,221,171,171,131,206,128, 37, 64,239,102, 53, 58,213,143,155,214,116, 51, 28,208,163, 0,140, 5,240,189, 3,122,223, - 91,211, 81, 78,208,179, 29,173, 96,137,115,248, 24,150,153, 4, 31, 91,175, 91, 85, 75,231, 12,189,241, 0,222,177, 50, 89,131, -245,158,193,122,253,142,245,185, 51,244,226, 97,137,115,112,246,136,119, 34,127,159, 1,248, 15,128, 81,214, 50,167, 0, 72, 1, -156,176, 90,101,250, 2, 72,178, 62,175, 43,127, 24, 54,108,216,125,190,126, 91, 16, 96,245,216,128, 97,195,134, 57, 20, 6,134, - 13, 27, 22, 93,221, 55,223,118,228, 15,247, 49,127,234,149,114,184, 75,207,166,101,186, 74,239,220,185,115,104,209,162, 5,238, -221,187, 71, 10, 10, 10,200,221,187,119, 73,255,254,253,239, 11, 6,172, 52, 83,121,121, 41,164, 82,105,173,244,228,231,206, 65, -213,162, 9,122,220, 59, 65,162, 11,246,144,151,238,110, 38,103,125,138,163,217, 44,117,141, 76, 62, 63,135,134, 68, 90,183,178, -115,189,160, 96, 78, 1,205,196, 20,208,204,138,219,180,249,243,115, 55, 75, 66,244, 12, 3,181,209, 98, 28,187, 84, 82,130,155, - 70,122,195,109,147,121,205,109,154,249, 34,183,176, 48, 29,117, 76,157,109, 42,239, 48, 39,160,105,191,208,210,252, 3, 90,134, - 49,149, 23, 22, 73,155, 93, 56,113,202,255,242,185,243,109,242,110,177, 61,111,223,188, 13,177, 72, 24,218, 57,204,123,188, 74, -107,110,227,168, 62,210,210,210, 72,108,108,172, 83, 66, 97,108,108,108,116, 90, 90,154,203,140,194, 62, 16,240,113,158,161,243, -119,198,144, 33,131,249,204,204,204,202, 24,135,253,243,124,193,243, 60, 6, 15, 30, 92, 31,211, 63,172, 76, 58, 26, 0,158,126, -250,105,125, 53,193,209, 45,121, 34, 40, 40,104,130,157,114,106, 82, 42,149,187,149, 74,229,186, 58,222,177,165,229, 0, 84,132, -133,133, 93,120,233,165,151, 86, 47, 93,186,212,235,252,249,243,254, 50,153, 12, 47,190,248, 34, 36, 18, 9, 56,142,195,200,145, - 35, 43,102,206,156, 25,208,165, 75,151, 43,147, 39, 79,238, 60,121,242,228, 50,163,177,230,133, 3, 19,166, 37,112,127, 94,190, -118,170, 75,215,110,175,157, 58,121,114,236,206,221,191, 46,201, 62,121,178,241,165,156, 43,210,107,133,185,252,143, 43, 55,203, -150, 38,127,218,233,192,238,221,201,109, 90,183,217,229, 19,230,125,100,195,134, 13,110, 79, 7, 20,214,160,173, 71, 2, 24, 0, - 96, 17,128,233,214,193,210,187,154,217,238, 7, 88,252,236,159,192,226, 18,200,174, 67,192,120,202,170,253, 58, 99,142, 63,110, -181, 46, 80,117,208, 11, 1,208, 18,192,105, 7, 52, 79, 91,211,133,162,246,169,139, 20, 44,129,121,129, 86,198,249, 18, 44, 83, -255,114,172,180,115,172,215, 27, 97,241,147,111,128,197,117, 65, 59,160,247, 10,128,111, 0,116, 0, 80, 84, 45,159,119, 97, 9, - 90,188, 98, 77,187,217, 1,189,247, 96,153,221,160,119,162,252,188, 0,236, 3,240,147,131,250,120, 25,192,191,173,231,179,118, -249, 19, 89,235, 50, 13,192, 42, 0,139,173,207,239,214,246,131, 25, 25, 25,153, 0,144,159,159,175,176, 69,251, 87,215,250,243, -243,243, 21,246,105,235,130, 45,205,134,255,210,149,209,249,213,181,244, 13,255,165,241, 40,232,101,101,101, 97,208,160, 65,184, -114,229,202, 95, 76, 92, 46,143,222,178,101,139,162, 85,171, 86,209, 28,199, 41, 90,182,108,201,219,166, 1,238,218,181, 11,145, -145,145,209,123,247,238,173,145, 94,251,172, 44,252, 28, 28, 90,165,172, 58, 38, 14,135,238,211,219,192,179,161,224, 57, 96, 90, -203,239,248, 10,206, 7, 74,131, 31,148, 57, 65,232, 62,104,103,244,229, 95,234, 54,179, 95, 47, 40,216, 10, 96,107,235, 22, 77, -219, 3,248,135,137,229,144,126, 33, 15,131,194, 44,238, 78,194,243, 90, 45,195, 44, 42, 46, 46,190,231, 4, 51,253,148,231,121, -239,156, 43,202,215, 84,167,183, 52, 42,190,171, 68,241, 61, 45,132,194, 50,239,138,114, 30, 42, 13,203,135,134,136, 3,132, 28, -198, 24, 76,236,207,139,222,123, 58,224,147, 47,142,171, 28, 8, 1,153, 78, 12,216,164,154,187,192, 53, 12,181, 90, 94, 14,196, -185,250,166,205, 26,230, 40, 42,223, 62, 29,113,150, 30,137, 43, 71, 61,233, 61, 9,224, 51,167, 93, 4,210, 45,147,177,246, 95, - 96,176, 78, 97,233, 99, 46,206,249,175,181,109, 8, 4,130, 16,161, 80, 88,124,252,248,241,111,159,126,250,233,250,148, 89, 11, -165, 82,185,198, 42, 88,188,162, 84, 42, 55,219,206,117,188,179, 9, 22,151, 41,111, 29,187, 43,150, 46, 93, 58,125,198,140, 25, - 77,207, 93,184, 48,212, 96, 48,248, 42, 20,135,136, 68, 42, 1, 69, 40, 28, 58,116, 72,212,169, 83,167,179,177,177,177, 35,199, -142, 29, 91,225, 40, 67,153,135,246,115,163, 94, 26,117,184,123,247,158,115,104,198, 52,226,122,206,181, 37, 92, 94, 46, 3,128, -151,130, 50,119,109,211, 62, 45, 52, 52,100,143, 64, 40,254,241,223,243,146,232, 47, 22,125,238,118, 65,214, 36, 0,252,195, 42, -225,188, 0,224, 50, 0,159, 26,222,219, 99,213,216, 99, 96,153, 71, 30, 95,135,249,191,173,181,192,156, 17, 0,202,172,233, 5, -117,208,139, 2,112,205, 73,122,215,172,233,127,169,131,222, 20, 0,147, 0, 92, 4, 48,211,250, 93,246,180, 21, 0,242, 96,241, -223,239, 6,176, 30,150, 25, 7,181,209,155,104, 45,143, 30, 86, 43, 66, 77,249,212, 88,159,167, 88,133,128,245,117,208,251,222, -218,208,188,156, 28,188,190,119, 80,126,159, 89, 45, 27,251,173, 66, 13,170,209,254, 13, 64, 39,107, 93,228, 88, 5, 41,135,166, - 93,235, 60,127, 69, 3, 45, 4, 68, 38,173,210,241,147, 86,233,106, 88,184,167, 28,143,138,222,159,127,254, 73,254,252,243,207, - 42,247,126,250,233,167, 76, 0,100,243,230,205, 0, 64,110,221,170, 26, 83, 87, 27,243, 7,128,230,127,254, 73,128,170,244,222, - 94, 50,203,194, 28,151, 89,243, 84, 61, 68,239, 23, 23, 70, 97,150,207,131, 16, 16, 84,160,146,249, 91,185,250, 61,169, 84,234, -148,217,144,231,121, 66, 8, 89, 48, 39,174,179, 87, 88,179,150,163, 56,120,181, 45,200, 47, 18,152,141, 42,190,113,168, 15,241, -241, 22, 17,198,204,161, 92, 69, 51, 68, 70,100,106, 45,211,166, 14,133,160,182, 54, 91,253,255, 71,201, 0,237,221, 17,206,204, -219, 39, 15,153,222, 99,207,252,185,205,129,216,127,193, 50, 69,127,189,130,198,207,199,105, 91, 76, 6,105,168,250, 97, 89,182, - 12, 0,122,245,234, 85,175, 5,129,108,204,223,138, 82,235,217, 81,223, 72,180, 27, 79,205, 0, 10, 0,224,203, 47,191,124,249, -141, 73,111, 12,123,170,119,228, 24,173, 70, 19,194,176,140, 49, 44, 44,172, 48, 60, 60, 60, 87,163,209,108, 27, 59,118,108,169, -179,249,250,117,251,175, 28,128, 77,175, 77,120, 43,107,192,192,129,219,101, 50,153, 63, 1,207, 89,102, 78,240,106,131,174, 92, -113,245, 66,190,214, 91, 34,174, 87, 64,107,117, 1,128,133, 37, 72,205, 25, 63,252, 41,235,193,162,246,229, 69, 89, 88, 34,234, -157,157,175,169,128,101, 33,159,186,232,237,128, 37,104,205, 25,188,230, 68,254,190, 6,240,173,163,177, 31,192,187,118,239,212, - 69,239, 7,171,197,192, 17,242,172,154,189, 51,249,115,101,190,235,215, 14,232, 61,235, 4, 61,155,181, 97,189,181,108,156, 49, - 49,145, 97,195,134, 69, 85,143,250, 31, 54,108, 88,180, 51,154,122,109,244,236, 86,234,123,220,232, 61,246,184, 81,120,215, 68, - 53,107,182,254,157, 79, 83, 38,217,238,209, 34,234, 39,163,158,219, 87,148,159,175,117,170,208, 8,225,255, 61,165, 31,249,248, -235,223,231,236, 90, 21,186,237,196,201,187, 83, 67,252,185, 23,169, 32,191, 0,158, 7, 8,225, 77, 38,134, 43,226,128, 82,218, -196, 5, 20,222, 53,184,228,143,180,154,249, 21,213,174, 31,151, 34,244,172, 4,232, 38,158, 91,172,125,208,223,200, 1,104, 34, -149, 74,239,246,234,213,235,217, 51,103,206,212,155,160, 82,169, 60, 24, 20, 20, 52, 73,169, 84,174,119,242, 21,129, 53, 31,149, -227,233,186,245,235, 50, 0,100, 52,212, 71,254,248,211,183,121, 86, 94,241, 64, 80,147, 0, 96,116,131, 14, 95, 71, 37,153, 60, -244,254,182,244,170,192,202, 72, 73,181,123,110, 55,206,199,157,222,147, 0,165, 94,255, 38,224,101, 6, 16,194,129, 47, 52, 26, -233,141, 69, 69, 37,231,225,194, 42,106, 31,127,253, 59,191,253,179, 17,228,133,233,251,178, 0,100,197,246,109,255,143,160, 32, -201, 92,161,128,240,119,203,140, 87,239,210,204, 6,153,136,146,202,132, 2,129,153,225,164,174,228, 47, 45, 45, 45, 51, 54, 54, -214,182, 15,128,205, 61,224, 58,103,173,238,235,183, 51,253,215, 35, 14,192,179, 18,160, 27,160, 94, 41, 7, 33, 4, 47,142,158, - 82,227, 24,178, 99,123,106, 67,125,107, 17, 0,210, 16,204,223, 78, 8, 88,239, 66,114,153,117, 76,165,159,212,186, 18,214,208, - 16, 27,114,142,172,135,222,223,155,158, 7,143,187, 0,160, 84,242, 74,165,114, 74,125,233,188,244,254, 62, 30, 0, 94, 27,220, -137,252,120,228,210,231, 6,126,218,170,233,227,142,119,162,117, 36, 34, 72, 36,108, 4, 66,244, 62, 50, 97, 73,151, 14,126, 57, -233,251, 93,163,109, 13,244,227,221, 9,248,123,192, 26,180,199, 2,224,198, 55,166,166,166,240, 9, 9, 83,201,142,237,169,127, -247,238,229,111, 21,164, 37,110, 42,206,143,190,178,220,221, 71,216, 3, 15, 60,120, 2, 37,126, 1,224, 37, 33,224, 56, 30, 32, - 4, 21, 6, 79,247,247,192,131,255,217,241,192, 83, 4, 30,120,240,191, 3,134, 5, 52,250,191,245,178,243, 30,120,224,129,147, -160, 60, 69,224,129, 7, 30,120,224,129, 7, 30, 1,192, 3, 15, 60,240,192, 3, 15, 60,240, 8, 0, 30,120,224,129, 7, 30,120, -224,193,223, 17, 85, 98, 0,206,157, 59,231,118, 52,106, 77,193,132, 53,209,123,225,153,200,168, 46,221,218, 40,154, 52, 11,143, -214, 26,116,138,195,138,172,232,140, 67,231, 51,221,165,215,181,239,240,168, 30,221,250, 42,238, 21, 22,194, 91,230,141,219, 5, -185,209,217, 39,246,184, 77,175,161,191, 55,113, 60, 21,213,175,111, 43,133,204, 91, 0,161,128, 2,145, 18,188, 56,238, 18,113, -151, 94,194,255,203,138,122,170,239, 83, 10,127, 31, 1, 32, 4, 98,251,214, 60,199,233, 81,125,175,135,222, 99, 75,175,206,169, -102,143,251,247,182,234,245, 50,239,199,229, 62,208,252,157,253,232,150,219, 3,105,207, 37, 45,239,187,247,121,163, 66,183,233, -253,163,244,254, 13, 87, 61,237,249,161,208, 19,162,134, 41,178, 79,226,247,186, 44, 0,212,134,149, 81,104, 11,203,122,248, 44, -128,220,153,153,184,233,236, 15, 12, 31,216, 42,138,128, 67, 72, 64, 16,178, 14,159, 81,124,152, 56, 17, 3,134, 14, 0,163,211, - 43, 58,117, 24, 12,142,131, 98,198, 91, 79, 71,247,236,217, 13,215,175,223,130, 90,165,195,234,245, 71, 50,107,163,215,123,208, -171, 81, 60, 8, 90,182,105,165, 72,120,127, 49,222,124,245, 57,252,240,159,175, 0, 72,177,231,124, 1, 40, 10,138,149, 11,230, - 33, 39,231, 42,228,242,150,144,200,132,184, 83,144, 19, 13,125,205, 89,158,251, 92,119, 94, 44, 22, 67, 38,147, 33, 55, 55, 23, - 77, 67,253,208, 72,232,131,166, 45, 2, 16, 40,243,135, 55, 97, 65, 81, 20,120,142,133, 94, 34,132,250,158, 26, 99,254,147,225, -176,162,150,207,233,198,251,202,212,240, 11, 16,195,199, 91, 8,177,140,130, 80, 0, 80, 98, 33, 50,119, 69,242,102, 94,128, 97, -163, 78, 56, 93,225, 93, 95, 90, 25, 21, 30, 30,142,102,173,155, 41, 12, 70, 19, 40,137, 12, 48, 3,211,146, 79, 69, 25,244, 58, -124,247, 73, 84,230, 35, 20, 36,255, 86,243,152,159,112,184, 90, 23, 78,167,143,253,112,174, 55,128,167, 26,203,188,254, 93, 88, - 88,216, 65, 36,149,128,243,242, 90, 6, 96,109,218,178,164,138,199,165, 0, 34, 58, 13,137,186,121,233,112, 77,251, 41,252, 45, -218,104,106,106, 42,249, 97,195,134, 43, 18,177, 88,198,113,156,191,183,143,143,207,168, 23, 95,244, 2, 64, 39, 36, 36,240,143, -105,158, 41, 0, 72, 72, 72,224, 26,128,156,159,191,191,255,172,246,237,219,143,149, 72, 36,205, 10, 10, 10, 10, 10, 11, 11, 79, -210, 52,189, 4, 64,174, 27,244, 2, 2, 3, 3, 23, 63,243,204, 51,207,135,133,133,201, 79,157, 58,117,239,226,197,139,199,141, - 70,227, 66, 88, 86,136,253,223,176, 0,212,194,252, 5,222, 18,225, 83, 19, 7,182, 94,193,241,188,241,232,213,123, 95,174,140, - 82,239,159,153,137, 75,142,222, 85,222, 61,200,155, 42,148, 48, 87,168, 32,100, 41,252,113,233, 42, 94,127,125,102,229,115,138, - 2,126,207, 90,143, 70, 45,194, 21, 92,133, 6, 52, 71,112,232, 80, 86,244,234,245, 71,106,161,216,146, 63,125,226, 18,136,151, - 31,206, 92,202,199,249, 75,111,224,187,159,127,171,124,202,113,192,136,254,253,129,138, 34, 0,190,200,189,120, 25,162, 70, 1, - 24,208,175,139, 66,165,175, 67,102, 33, 20, 64, 40,244,232,214, 11,141,189,197,104,218, 72, 10,191,224, 32, 4, 74,124, 17, 40, - 21, 64, 36, 16,192,204,178, 80, 49, 28, 78,149,158,118, 88,168, 11,223,109,206,203, 4,229,240,243,242, 66, 72,163, 96,248,249, -121,129,167, 88, 48, 92, 5, 88,176,240,241,241, 66,163,198,205,144,123,165, 29,223,186,195, 15,117, 14, 74, 61, 99, 86,241,254, -190,222,240, 15, 8, 68, 72,163, 96,232,116, 58,136, 37, 82,136,140,150,197,249, 34,228, 45, 21,202,114, 21,158,121,107,125,116, -126,193, 29,148, 23,221, 66,217,249, 84, 71,194,128,211,131,196,208, 73, 67,163, 15,172, 63,144,233, 4,173, 7, 42, 4,228,229, -229,241, 0, 32,151,203,201,227, 66, 47, 60, 60,252,117,154,166,215, 3,192,216,232,104, 42,117,203, 22,119, 6, 95,203, 26,169, -118,134, 28,158,231, 65, 8,169, 60,219,238,217,210, 57,216, 73,205,149,245,228, 93, 97,254,157,188,205,204, 86,223, 0,255, 14, - 0, 32,150, 73, 65, 27,140,224,116,250,229,199,143, 28, 94, 16,251,225,220,142,105,203,146,242, 29,209,249,242,163, 68,222,170, - 97, 49,176,184, 32, 57,235, 56, 84,227, 88,212,125,200,243, 24,242,220,255,185, 84, 71, 55, 47, 29, 86,180,233, 18, 21,125,253, -143, 76,215,133,226, 88,165, 75,201,227,226,226,176, 37,246, 64,157,105,162, 15, 84,221,138,164, 83,128,229, 83,139,141, 28, 12, -140,165, 94,117,214,115,106,223, 0,180,243, 21,213, 73,111,197,138, 21,153, 31,189, 55, 59,116,244,216, 49, 62, 70,163, 1, 43, - 63,255,140, 90,189,122,181, 49, 49, 49, 49, 28,192,157,134,238,123, 99,198,140, 25,186,109,219,182, 12, 87,133,168, 73,147, 38, -241,121,121,121, 40, 43, 43,195,210,165, 75,225,235,235,139,168,168, 40,200,229,114,172, 95,191,222,221,126, 55,184, 87,175, 94, - 27,222,127,255,253,235,237,219,183, 95,223,179,103,207,203,247,238,221,107,150,149,149,213,235,205, 55,223,220,173,209,104,150, -195,178,149,187,179,136, 30, 59,118,108, 90, 82, 82, 82,176,217,108,134, 76, 38,131,183,183,119, 19,157, 78,247,242,232,209,163, - 71, 93,184,112, 33, 17,150,141,211,158, 56,156, 59,119,174,186,149,192, 57, 1, 96,101, 20,154, 3,104, 13,203, 18,135,172,206, -196,220,206,186, 86,252, 69,255,182,161, 51,159,233,212,100, 65, 99,127, 89,211,149, 40,218, 4,224,234,204,204,218, 55,169, 49, - 85, 40,209,184,205,179, 88,252,193, 88,172,183,227, 73,135,143,167, 64,167, 55, 97,228,208,153,120,122,192, 36,188, 26,247, 12, -100, 50, 9,104,150,129, 86, 79, 43,106,111,100,183, 0, 26, 24, 59, 97, 45,222,126,127,106,229,221, 17, 79, 71, 65, 42,149, 96, -251,161,223,176,231, 88, 22, 54,172,251, 10, 70,131, 9, 98,129, 16, 62, 94, 98,232,202, 10,162, 85, 5,168,113,135, 53,158,231, - 1,158,179, 28, 20, 7,158,231, 97,162, 37,149,203, 59,240, 52, 11, 86, 0,176, 96,193,210, 28, 24,182,110, 1,118,206, 91,114, - 62,208,143,129,159,175, 55,194,155, 69,160, 67,215, 54,240,245,145, 65, 93, 81,130,162,146, 34,148,171,239,193,108, 36,240,242, -242, 66, 72,200, 0,148, 22,135,240,141, 66, 63,171,217,140, 63,120, 30,207, 24,244, 48, 8, 1,177, 84, 12,131, 94, 12, 90, 47, -134, 81, 42,129,144, 48,224, 33,128,209, 80, 1,131, 94,139,102,205,154, 42,196, 2, 33,148,208, 32,148,158,128,234,107,204, 87, -199,167, 27, 62,117,216,128, 62,136,255,160,238,177, 50, 54,182,202,254,238,177,177,177,189,131,130,130,114, 8, 33, 70,158,231, -133,129,129,129, 94,185,185,185,193,214,213,221,154,186,219,144, 19, 19, 19,199,217,253, 70,148,187,171,197,213,200, 45, 9,225, -167, 77,155, 22,189,122,245,106,151,104,134,135,135, 39,244,233,211,103,201,192, 30, 61, 96,150, 72,144,156,156,204, 77,125,229, -149, 97, 41,155, 55, 31,112,241,247,177, 98,193,130,202,235, 89,243,231, 35,121,225,194, 58,175,157, 33, 91,141,185,243,189,123, -247, 6, 0,126,232,208, 86,157, 1,220, 72, 74, 74, 51,184,200,252,179,186,118,238,236,103,235, 51,222, 82, 25,238,150, 20, 67, - 83,174, 66,175, 62,125,189,118,125,183,238, 64,236,135,115, 59,167, 45, 75,114,180, 54, 59, 51, 99,201,106,225,107, 47,143, 18, -182,149,203, 57,171, 16,128,249,201,171,170, 10,209,179,166, 3, 0, 62,122, 47,209,173,237,164,221, 98,254, 54,164, 5,185,144, -120,168, 75,164,189,133, 4,231, 23,190, 5,226,215, 8,236,141,243, 48,221,248, 19, 57, 74, 29, 34,247, 22, 59,245,126,207, 94, -189,142, 78, 25, 31,223, 50,126,242,155, 1,105, 63,253,204,201,229,114,106,113,210,114,248, 46, 88,140,237,219,183, 23,166,166, -166, 82, 13,101, 5, 24, 51,102,204,176,109,219,182,237,223,182,109,155,237,122,184,237,127, 7, 2, 74,212,254,253,251, 21,183, -110,221, 66,235,214,173, 49,104,208, 32,248,251,251, 67,165, 82,225,206,157, 59,184,121,243, 38,134, 15, 31,206, 15, 31, 62, 60, -122,246,236,217,174,212,211,152,103,158,121,102,229,138, 21, 43, 54,245,236,217,115, 37, 33,228,142,221, 56, 78, 98, 98, 98,124, - 0,100, 89, 15,167,232, 37, 38, 38,166, 79,155, 54,141, 58,125,250, 52, 8, 33, 8, 14, 14,174, 60,246,238,221, 43,238,215,175, -223, 87,183,111,223, 62,241,164, 51,127,219,189,234, 66,128,176, 6,230, 31, 28, 25, 17, 28,223,163,101,208, 4, 66,136,136,231, -121, 51,103, 57,104,214,108, 52,136, 41,174,105,215,198,210, 15, 26,249,181,110,179,237,212,205,159, 87, 70,113, 71,103,102,214, -190, 91, 28, 32, 70,167,142,237, 65, 81,153,200, 81,149, 1,184, 12,117,225, 53,136,164, 18,236,216,253, 37,244,165, 44, 38,188, -241, 15,112, 28,240,226,168,254, 96,133, 62, 14, 63, 46, 39,231, 50, 56, 14, 24,217,157, 88,249, 74, 75, 24, 77, 52, 98, 70, 12, -135, 52,128,194,134,141,251, 64, 81, 64,250,207,235, 81,120,227,207,232,189,155, 86,100,214, 36,253, 0, 0,199, 3, 28,199,129, -227, 56,176, 44, 11,147,136,135,153,152, 65,211, 52,244, 94, 70,128,147,130,226, 89,176, 98, 30, 21,180, 17, 58,141,186,206,188, -133,248,152, 32, 20,202, 16, 28, 28,140, 54,109,218, 32,172,113, 95, 64, 64,129,101, 79,131,226, 85, 48,234, 24,176,156, 14, 69, -119,148, 8, 9, 46, 69,112,192, 0, 44, 91,177, 43,234,231, 31,239,167, 37, 51, 50,224, 77,165,128, 81, 2,154, 50, 67, 39, 22, -162, 66, 38,130, 80, 36, 6, 56,111, 16, 1, 65,133, 78,143,242,162, 91,200, 61,125, 12,202,252,124,112, 28, 7,138, 23,184,213, -104,190, 91,251,151,224,252,230, 59,111, 58, 30, 39,171,174,217,110, 76, 75, 75,155,251,254,251,239, 79,205,207,207,167, 8, 33, - 33,169,169,169, 63,195,178,185,147,151,187, 13,121, 74,108,172,104,205,154, 53, 27,239,221,187,135,244,244,116, 68,182,111, 47, -104,136, 14, 34,151,203, 73, 92, 92, 92, 20,207,243,138,213,171, 87,187,188, 97, 17, 77,211, 41, 3,173,109, 74, 44, 22,163, 93, -187,118,216,122,232, 80, 70, 72, 72, 8, 74, 74, 74,156,166, 99,211,236, 31, 0, 72,239,222,189,249,211,167, 45, 22, 43,187,243, -159, 67,134, 12, 41,156, 59, 55,214, 63, 41,201,241,154,251,177, 31,206,245,246, 54, 51, 91,187,118,238,236, 39,160, 40,188,251, -218, 4, 24,140, 38, 36,127,251, 45,188,100, 50, 24,141, 70, 24, 13, 6,116,239,217,163,237,111, 63,253, 52, 13,192, 23,142,172, -142, 11,103, 77,231, 0, 80,215,242,242,168,234, 12,191,122,247,116,231,195,155,119, 24, 28,125,251,202, 17,126,216,139,111, 69, -103,236,252,214, 45, 65,192,126,215, 62,219,150,182,117,221,119,132, 78, 1, 66,220,170, 96,113,120, 88, 8, 68, 51, 83,161,153, - 16, 1, 97, 96,168, 75,204, 63, 46, 46,174,200,172,211,223,153,252,238,212,230, 31,254, 99, 14, 86,175, 75,185,212,167, 87,175, - 86, 41,171, 82,188,222,155, 51, 27, 63,245,239,139,141, 27, 55, 78,132,101,215,210,250, 48,254,168,109,219,182, 41,108,204, 62, - 53, 53, 53, 23,150,109,218, 15, 58, 35, 0,236,223,191, 95, 17, 18, 18,130,158, 61,123, 50, 20, 69, 9, 45,214, 89, 14, 34,145, - 8, 65, 65, 65,104,220,184, 49,110,222,188,137,253,251,247, 43, 92,232,115,177, 47,188,240,194,103, 43, 86,172, 88,213,190,125, -251,181,132, 16, 14,192, 87, 0,158, 3,112,132, 16,178, 16,150, 53,243,103, 3, 88,232, 12,189, 21,137,137,155, 7,198,198,146, -157, 59,119, 66, 40, 20, 66,161, 80,224,252,249,243,104,211,166, 13, 22, 45, 90,132, 46, 93,186, 96,234,212,169,194,143, 63,254, -120,197,147,200,252,167,204, 93, 86,121,239,235,164, 15,107, 20, 2,106,154, 5, 64, 9, 5,148,144,225,120,173,193,204,220, 33, -132, 72,124, 36,130,110,126, 98, 68,202, 58, 15,105,141,232,183,129, 14,131,208,196,155, 31, 51,113, 64,196,135, 65,126, 94,195, - 86, 70,193,191,246,236,112, 16, 8,108, 99,182, 31,128,102,240, 15,127, 1, 6,214,136,181,169,235,240,195,198,116, 12,143, 30, - 0, 0,208,235, 1,129,176,118, 82, 50,175,246, 0, 0,150,181,223,155,166, 8, 64, 22, 40,129, 4,241,175,191,133,152,184, 56, -236,218,109, 97,100, 94,222,128,174,226,110,157,133,101,134,160,146,249,155, 25, 22, 38,141, 25,122,149, 30, 42, 51, 13,165,158, - 70,185, 73, 11,149,182, 2,229,197, 90, 40, 85, 70, 40, 43,106, 95, 66,253,221, 87, 91,241,132, 16, 8, 4, 4,132,146,128,101, -121, 48,250,124,232, 84,215, 80, 88,164,134,178,188, 2,106, 45, 11,101,185, 17, 5, 5, 69,184,116,229, 28, 84,234,115,232,219, -171,183,162, 54,154, 2, 0,148,214, 8,195,245, 59, 40,251,227, 50,202,242,111, 65,163, 86, 66,163, 86,226,214,165,211, 56,158, -246, 29,178,182,108, 64,201,245,235, 96,105,206,210,155, 4, 15,205, 13,104,219,135,155,142,137,137,233,184,120,241,226,247,155, - 52,105,162, 75, 79, 79,239,150,150,150,246, 43,128,158,214, 74,119,123,193, 41,113, 88,216, 44, 0,232,215,165, 11,166, 77,155, - 86,124,234,202,149, 3, 79,117,232, 16,213, 16,153,223,178,101, 75, 38, 0,146,152,104,209, 50, 19, 19, 19, 93,162,107,150, 72, - 0, 0, 91,183,110, 69,104,104, 40, 62, 76, 76,196,172, 89,179, 16, 18, 18,242, 88,248, 97,109, 76, 63, 53, 53,181,242, 0,128, -195,135, 15,135, 3, 24,229, 36,153,167, 2, 2, 3, 59, 8, 40, 10,111,196,196, 64,165,214,160,224,238, 29,136, 68, 66, 8,133, -150, 67, 36, 18, 65, 34,243, 66,107,185,252,243,158, 67,135, 58,165,177, 95,203,203,195,143, 91,127,173, 60,108,152,159,188, 10, -243,147, 87, 97,143,226,176,203,223, 59, 52,246,227, 40, 0,184,125,229, 72,230, 80, 11,243, 87,224, 49, 89,237,232,194,247, 95, -160,248,237, 94, 24,146, 81,130, 78, 1, 66, 8,252,130,192,148, 23, 35,114,111, 49,188,133, 22, 30, 40,112, 48, 39,235,230,245, -235,101, 95,167,254,167,253,247,255,249, 30, 95,126,251,213,173,175, 86,124, 54,255,253,233, 51, 70, 45, 94,178, 24, 50, 95,111, - 12,234, 55, 0,167, 78,158,250,254,181,248,215,220,254,102, 27,243,183, 93,239,220,185, 19, 79, 61,245, 84,107, 0, 19,156, 53, -251,155,205,102,244,234,213,139, 99, 89, 86,168, 86,171, 97, 50,153, 96, 50,153,112,229,202, 21, 40, 20, 10, 28, 59,118, 12, 77, -154, 52,129,217,108,198,164, 73,147,156,201,235,184,184,184,184, 47,198,142, 29,235,183,118,237, 90, 63, 66,136, 24,192, 97, 0, -106, 0,189, 0,252,106, 39,120, 30, 4,208,197, 17,189,109,239,191,191,121, 84,247,238,228,167,152, 24, 20,158, 61,139,207, 62, -251,140,219,181,107,215,255,187,125,251,118,168, 66,161,120,123,238,220,185, 48,155,205, 24, 48, 96, 0,188,189,189,251,227, 9, -135,189, 48, 80,167, 5, 96,102, 38, 74, 86,162, 36,229,247,235, 37, 25,145, 17,193,209,189,229, 65,150,117,196, 95, 88,132,223, -125,134,227,224, 31,197,232,223, 57, 16,207,200,119,193,247,183, 37, 61, 71,244,144, 79,216,120,228,210, 31, 53, 17,111,210, 54, -150,240,124, 1, 63,250,245,153,152, 53,253, 43, 0, 74, 0,190, 0, 76,104,217,190, 23,164, 18, 33, 12, 58, 19, 64, 91, 4, 4, - 95, 95, 95, 20, 43,107,221, 47, 27, 6,253, 85, 2,128,191,244,251,183,160,168,213, 85,148, 4,206,240, 39,140, 38, 51,100, 62, - 82, 64,108, 17, 16,180, 26, 13,250,247,239,143, 35,191,254, 84,187, 58,194,209,224, 56, 33, 24,134,129,201,100, 66,133, 80, 0, - 33, 77, 1,119, 53, 96,188, 24,176, 98, 14,188, 72, 0,189, 64, 8, 70,167,135,202, 84,123,172,147,175,143, 14, 12, 67, 96,162, - 89,168,212, 26,228, 92,207, 71,193,221, 82, 24,104, 51, 52, 21, 74, 84,104, 85, 48,178, 52,136,144, 64,167, 87, 67,163,191,137, - 91,133,106,148,105,117,181,210,100,237,164, 52, 70,173, 67,193,185,203,184,119,249, 38, 52,218,235,208,170, 84,224, 33,132, 72, - 64,192, 19, 17, 40,202, 98,245,117,197,185,246, 65,252, 7, 78,185, 3, 28,224, 30,128,123,243,230,205, 51, 0,192,220,185,115, - 79, 37, 37, 37,121, 91,179,110, 4,144,239, 46,225, 53,107,214, 44,141,137,137, 1, 0, 68,132,132,132, 90,125,226,130,134,236, - 28, 54,243,191,213, 18,224,176,248,194,195,195,135,210, 52,141,228,228,100,188,252,242,203, 24, 59,124,248, 95, 3,253,133, 11, - 22, 75, 80, 72, 8,239,108, 92,192,172,249,243, 43,125,254, 0, 48,123,193,130, 42,150, 1, 39,205,254, 85, 96,211,254,109, 76, -223,134,212,212, 84, 36, 36, 36,224,192,129, 27, 63, 2,248,201, 17,157, 0,161,240,223, 70,218, 4,129, 64,128, 43, 55,114,193, -243, 60, 46,229, 92, 3, 77,155, 65,129, 64, 40, 20,130, 16, 2,142,101, 97,208,233,113,237,247,223, 15, 57, 81,134,148, 61,211, -127,237,229, 81,246, 26, 63, 5, 0, 39,206, 92, 64,219,136,150, 46, 77, 83, 62,144,246,239, 74,109,255,128, 69,243,183,185, 66, -248,231,199,188, 21,189,119,155,123,214,128, 6,129,242, 46,196, 45,218,161,120,154, 20,146,103,198,129,205,222, 7, 86, 99,137, - 55, 40,158,246, 52, 90,166,102,129,229,234,110, 42,237,219,182,111,234,229,229,237,245,229, 55,107,140,209, 67,134,136,251,246, -239,247,211,254, 61,191, 61,127,229,122, 14,192,241,144, 74, 36, 24,208,123, 0,118,239,220,141, 17, 35, 70,240,251,246,237,115, -122, 40,168,174,245,239,223,191, 31, 55,110,220,160, 1,136, 79,158, 60, 73, 79,157, 58,117,124,106,106,234,107,142,232,228,229, -229,161,117,235,214, 0, 64,229,229,229,225,252,249,243,104,217,178, 37, 34, 34, 34, 80, 94, 94,142,236,236,108,180,106,213, 10, -161,161,161,104,217,178, 37,242,242,242,234,110, 40, 20, 21, 31, 23, 23,183,100,240,224,193, 62,167, 78,157,242, 99, 24,102,178, - 76, 38, 27,109, 48, 24, 86,192,178,245, 57,172, 2,192, 42, 88,182, 86,167, 81,199,244,118,145, 72, 20,159, 54, 99,198,250,167, - 67, 66, 72,201,156, 57,232,207,113, 88,181,115, 39, 95,168,215,191,133,191,182,101, 95,127,233,210,165,181, 12,195, 8,125,124, -124, 16, 30, 30,238, 99, 54,155, 33, 18,137,240,119, 67, 77, 46,128, 48, 0,173,199, 68,182,120,183,121,176,247, 4,152, 13, 64, -251, 97, 56, 19, 50, 6,207, 36,126, 7, 67,169, 10, 2, 63, 95, 40, 86,198, 99, 80,167,223, 17,116, 33, 99, 48,128, 22,181,253, - 64, 27,191,102,248,227,194, 47,118, 6, 7, 29, 44, 91, 40,155, 1,179, 9, 66, 78, 0,202,202,196,183,109,119,188,139,200,190, -139, 60, 70,244,236, 82, 77, 9, 21, 2, 16, 1, 34, 41, 24,194,194,170, 7,227,149, 9, 51, 0, 64,145,244, 81, 98,173, 29,129, -229,120, 48, 28, 5,138, 97, 64,209, 38,232, 41, 75,219, 49, 8, 4,240,102, 12,208, 24,120, 16, 17, 1,203,178,208,179, 64,177, -174,246,141,159, 24,154,131, 81, 36, 0,167,103,192,112,106,104, 43,204, 16, 16, 17, 76,140, 25, 52, 79,131, 49,211,128,152, 3, - 69, 0, 34,225,160, 54,176, 40, 42,209, 67,103, 98,106, 84,146, 41,194, 86,238,195, 75,200, 95, 46, 93,179,209, 0,181, 82, 9, -138, 8, 32, 20,242, 0, 47,132,128,184,175,234, 92,189,117,149,110,223,178,189,216, 25,179,127,109,178, 25,236,118,196, 74, 74, - 74, 26, 5,224,246,220,185,115,123,250,251,251, 7,168,213,234, 91, 73, 73, 73, 46, 19, 77, 76, 76,124,115,205,154, 53,104,220, -184,177,253, 61,213,170, 85,171, 14, 60,213,161,195,208, 83, 87,174, 28,108,168,142,144,152,152, 24,109,231, 10,168,139,249, 71, -245,233,211, 39,124, 96,143, 30, 32,190,190, 72, 74, 74,194,156, 57,115, 32, 18,137, 96, 46, 47,135,191,191, 63, 62, 76, 76,172, -140, 11, 72,136,139,115, 40, 4, 84,247,241, 59,138, 9,168,203,163, 80, 93,251,119, 96, 29,112,216,100,202,149,202, 14, 62,190, -190, 40, 45, 47,135,226,196, 9, 8, 41, 1, 76,102, 51,244, 6, 3, 56,142,171, 20, 92, 24, 51, 13,218,100,114,198,165,193, 1, -160,172,110, 0,206,174,225, 27,173,247, 49, 63,121,149, 24, 0,218,202,229,197, 55,107,214, 45, 92,178, 82, 53,107, 29, 25,181, -119,219,183,174,152,155,107, 47, 96, 23,204,254, 85,204,178, 91,254,131, 30,175,255, 3,146,136,110,150,177,162,244, 46,114,148, - 22,193, 95,210,255, 5,228,179, 12,188, 86,215,237,106,214,104, 52, 1, 18,153, 20,109, 34, 34,164, 55, 11,110, 55, 41, 43, 41, -195, 43,175, 77, 80,236, 57,152,129,149,203,146,211,183,237,217, 25,211, 54,162, 45,226, 95,158,136,172, 51,199, 48, 98,248,112, -126,223,254,253, 14,191,217, 94,235,223,191,127, 63,134, 13, 27,102, 19, 22,197,119,238,220,193,212,169, 83,197, 0,224, 76,108, - 65, 89, 89, 25, 6, 13, 26, 4,150,101,145,151,151,135, 99,199,142,161, 83,167, 78,240,247,247, 71,243,230,205,209,163, 71, 15, - 80, 20, 5,138,162,208,164, 73, 19, 71,237,180, 83,151, 46, 93,190,232,223,191,191,224,194,133, 11,126, 44,203, 22,109,221,186, - 85, 99, 48, 24,146, 0,216, 59, 77,223,125,254,249,231,243,247,236,217, 19, 65, 8,185,139,218, 55,230,233,153, 48,112,224,250, -190, 66, 33, 41, 89,178, 4,188,217, 12,133, 64,192,101,233,245,147, 96,217,198,221,134,119,230,205,155, 39,164, 40, 10, 74,165, - 18, 55,110,220, 40,238,210,165, 75, 40,254,134, 16, 86, 99,254,109,195,252,101, 3,159,239, 30, 62,213, 79, 38,234,195,176, 92, -185,144,103,253, 16,208, 68,112, 87,101,132,161, 84, 13,136,133, 96, 85, 90, 20,148,211, 64,112, 11, 80, 28, 45,173,203,196,123, - 93,163, 65,187, 0, 63, 48, 38,224,122,230,143,104, 19,245, 92,165, 2,103,166,205, 16,129, 66,133,209,178, 67,237,136,168, 94, -144, 5,135, 99,197,250, 95,107,205,240,136,174, 4,123,206,243, 16, 73, 1,113,139,231, 64,231, 31,173,180, 2,136,196, 18,152, - 97,132,143,204,178, 35,233,206, 61,155,240,199,201,204, 58, 77,146, 28,199, 65, 76, 27, 96,134, 24, 20,197, 0, 70,203,192,102, - 54,155, 97, 50,138, 32, 16,138, 0, 35,192,115, 22, 23, 65, 75,121, 4,144, 85,243,140, 2,189,145,131, 64, 64, 96,102,204, 48, -154, 56,104,180,150,118,104,230,120,208, 38, 14, 16, 2, 2,145, 0, 66, 41, 64, 12, 44, 56,194,128,131, 1, 90, 3, 0, 56, 30, - 88, 88, 0, 20, 7,240, 4,160, 40, 14,132, 8,192,241, 4, 20,101, 85,156, 56, 10, 28, 69,129,112,206, 41,200,118, 65,126,226, -122,182, 35,111, 0, 33,115,231,206, 45, 78, 74, 74,138, 6,240,210,220,185,115,135, 39, 37, 37,233, 0,148,185,101,178,138,141, - 21,175, 89,179,230,219,152,152, 24,200, 27, 53,170,188, 47,111,212, 40,192,106, 5, 8,121, 20, 29,134,166,105,133,205,247,207, -107,181,248,228,147, 79, 96, 42, 43,131, 45,242,173,141, 85, 88, 17,153, 76, 24, 53,106, 84,113, 97,113,241,120,103, 52,237, 6, -116,201, 84,177, 0,212, 97, 33,192,233,211,167, 73, 77,194, 67, 21,161,214, 68, 67, 69, 43, 97, 52, 26, 17,224,239, 15,169, 88, - 2, 51,203,128,231,121,176, 44, 11,154,166, 97, 54,155,193, 49,172,179,241, 12,220,181,188, 60,170,173, 92,110,211, 8,184,107, -121,121,212,143, 91,127,149,218, 91, 4,218,202,229,170,134, 50,223, 23,228,102, 55,152,230,239,110, 12,192,144,140, 18, 20,203, -211, 33,110,209, 14, 36,162, 27, 90,174, 59,139, 82, 35, 7,111, 33, 1,253,223,237,184,122,227, 38, 28,237, 90,108, 96,104,156, -206, 58,137, 47, 86,124,142,167,163, 6, 98,222,255, 91,128,223,246,254,134,159, 54,252,128,254,131, 7,198, 52,151,183,128,208, - 75,132,131, 71, 15, 98,227,247, 63,224,151,237, 91, 33,150, 74,249,157, 59,119,214,185, 62,196,182,109,219,170, 48,126, 27, 84, - 42,149,203,229,163,213,106,225,239,239,127, 2, 64, 95,185, 92,142,222,189,123, 67, 32,176,184, 89, 91,182,108, 9,137, 68, 2, -181, 90, 13,185, 92, 14, 95, 95,223, 91, 90,173,182,101, 29,228, 46, 93,184,112, 97,233, 47,191,252, 50,178,109,219,182, 29,182, -110,221, 90, 81, 94, 94,190, 16,192, 70,123,249,101,200,144, 33,239,175, 91,183,110, 11,128, 98, 0,177, 0,126, 7,208,189, 6, -122,103, 87, 43, 20, 75, 3,178,179, 63,122,149, 97,240, 57,192,125, 91, 81, 49,177, 26,189,151,102,204,152,241,249,148, 41, 83, -112,243,230, 77,236,222,189, 27, 12,195, 28, 2,240,234,147,194,212,123,244,232,129,115,231,206, 85,250,253,235,180,176, 84,187, -110, 53, 38,178,197, 98, 63,153,168, 79,137,198,248,219,241,107, 37, 73, 16, 72,128,171, 71,241,172,156,199, 63,167,143, 66,239, -206,114,204, 72,120, 30, 47,182,166,129,139,251,193,139,100, 12,234, 12,214, 81, 33, 71,149, 15,161, 4, 24,241,226, 63,176,241, -203,101, 22,101, 81,111, 2,107, 0,182, 43,206,225,192, 41,203,140,194,102, 45, 34, 64, 9, 29, 51,175,145,221, 9,204, 70, 96, -231,238,125,136, 28, 62,221,162,253, 67, 4,129, 12,136,123, 33, 22, 35, 7,143,182,116,252, 91,185, 96,140,117,111,213,204,243, - 60, 24, 98, 97,240, 38,218, 18,252,103, 50, 26,160,215,235, 81, 81, 81, 1,173, 70, 13,173, 86, 11,141,202,162,101,189, 0, 0, - 32, 0, 73, 68, 65, 84,182, 2,198,138, 10, 24, 12,134,218, 27,127, 5,129,193,200,194, 96,100,161,211,155,161,173, 48,161, 92, -107,130, 74, 67, 67,173, 53, 67,165,178,156,149,101, 12,148,229, 12,148,106, 6,165, 74, 26,247, 74,107,207, 35,197,243, 96, 1, - 16,150,128, 80, 28,120,194, 3, 60, 15,158, 23,128,229,254,170, 62,206, 58,122,184,106, 27,239,216,191, 35,142,237, 57,134,223, - 14,253, 86, 41, 20, 92,189,117,213,213, 54, 23, 14,160,245,242,229,203,207, 3, 88,253,225,135, 31,190,215,170, 85, 43, 38, 53, - 53,149, 36, 39, 39,187,172,117, 77,137,141, 37,226,176,176,109, 0, 16, 22, 22,118,223,243,105,211,166, 49,217, 87,175,110,106, -168, 88, 0,155,249,223,217,125,227,109,190,127, 0,216,188,121, 51,174, 23, 21, 1, 0,118,101,102, 86,121,118,245,234,213,208, -144,144,144,242, 71, 49, 8, 12, 29,218,202, 54,239,186,202,125,219,181,237,185, 35,120,249,249, 94,225, 88, 22, 26,101, 57, 74, - 75, 75, 81,166, 42,135, 78,175,135, 78,175,135,182,162, 2, 58,181, 6, 90,149, 10, 70,131, 30,180,209, 8,142, 97, 29,142, 57, -109,229,114,219,152,193, 1,160,237,221, 1, 0,240,227,214, 95, 49, 63,121, 85, 0,128, 48,151, 27, 98,235,200,168,234,130, 67, - 68,167, 33, 81,143,122, 80,190,251,138, 28, 45,215,157, 5,137,232, 6,211,225,116,220,122,163, 39,188,133, 4, 71,135,133,128, - 81,151, 32,114, 95, 49,132, 14,154, 95, 70, 70, 6,121,123,230, 59,184,126,245, 42,178, 50,143,194,223,215, 31,227, 94, 25,135, -128,224, 32,156, 57,153, 13, 31,177, 20,222,222,222,104, 34,111,138, 77, 63,111,194,135, 31,127,132, 10, 55,152,184, 13,189,122, -245,114,249, 29, 95, 95, 95,168,213,234,190, 20, 69,209,205,155, 55, 71,159, 62,125,208,185,115,103, 52,106,212, 8, 82,169, 20, -114,185, 28,221,187,119, 71, 64, 64, 0,180, 90,109, 75, 95, 95, 95, 71, 36, 63, 61,124,248,112,198,134, 13, 27, 68,229,229,229, -243,170, 49,235,216, 65,131, 6,125,177,110,221,186,239,194,194,194,150, 16, 66,124, 0,124, 8,160, 46, 51,217,199,139,181,218, - 79,223, 98, 24,246, 91,131, 97,124, 53,122, 49,175, 38,252,235,151,233,239,205, 18, 92,189,122, 21, 39, 78,156,192,186,117,235, - 42, 0,252,243, 73,211,236,171, 7,189,215, 22, 4, 95,125, 16,144, 8, 40,226,155, 95,166,251,105, 83,214,205,127,158,187,165, - 60,105, 96,201,117,148,222,132,244,151,119,177,100,128, 22,217, 11,251, 96,101,116, 5,188,183, 79, 3,148, 5,168,224,165, 23, -173,146, 87, 45,248, 43,170,255,252,133, 95,241,175,127,109, 64, 27,191,174,248,243,248,121,236, 87, 92, 70,116,255,206, 24, 54, -200,210,208,120,129, 16, 52,235,252, 71,142,232,217, 1,139, 63, 93,134,125, 23, 53,240,145,119,194, 11, 47,140,194,111,135,182, - 97,247,111,155, 44, 31,199,154, 33, 17,213, 61,206,241, 28, 11,150,179,104, 51,176,106, 51, 52, 77,195,104, 52,194, 96, 48, 64, -167, 55,192,160,215,193,160,215, 65,111, 50,130, 54,213,190,237,115,153,193, 23,234, 10, 22, 26, 3, 7,141,129,179,252,175,229, - 80,161, 99, 80,161,103, 80,174,100, 81,166, 52,163,172,220,140,178, 50, 51, 74, 75,105,220, 43, 53,215, 41, 0,252,101,254,191, - 95, 85, 19, 10,120, 8, 8, 1, 95, 45,234,159, 39,142, 21,167, 15,226, 63, 64,199,254, 29, 43,175, 15,172, 63, 80,105, 17, 56, -182,231, 24,174,222,186,122,211,149, 6,151,158,158,254, 95,158,231,187,196,196,196,196, 71, 68, 68,132, 0,160, 56,142,147,152, -205,230,192,153, 51,103,250,213, 98, 10,174, 17,226,176,176,249,107,214,172, 25, 25, 19, 19,131,136,144, 16,167, 92, 87,245, 52, -255, 71, 1, 64,100,135, 14, 14, 3,216,218, 54,110, 28,157,156,156,140, 63,111,221,210,252,178,127, 63,174, 92,185, 82,169,245, -183,111,223, 30,214,103,244, 47,251,247,227,214,173, 91,184,154,157,109,112, 68,115,214,252,249,152,189, 96, 65,165,121,223,246, -191,237,218,246,191, 43,177, 0, 73, 73,105,252,144, 33, 67,222,181,103,250,182,115,239,222,189,145,148,148,230,148,118,125,237, - 74,110, 54,195, 48,160,105, 19,148,247,138, 81,114,183, 8,165, 69,247, 80, 90,116, 15,202,226, 18,168,202,202, 96,210,233, 44, -241, 51, 42, 21,156, 8, 2,100,230, 39,175, 18,206, 79, 94, 37, 4,160, 1,192,245,237,213,237,190, 68,118,113, 1, 78,163,105, -235,200,168,194,220,108, 69,247, 62,127,229,161,117,207, 23,163, 84, 37, 55, 20,245,105, 31, 36,174,188,138,230,239, 14,114,148, - 58,228, 79,126, 10,252,205, 11, 8,253,207, 25,120,175, 61,141,187,175,200,209,123, 95, 49,136, 72, 2, 33, 1,132,148, 99, 1, -244,194,197,139,228,147,101,139, 49, 99,246,251, 48,115, 44,174,228, 93,195,132,113,227, 33,150, 74,177, 99,251, 78,192,204,194, -100, 52,225,104,246,113, 24, 12, 21,152, 50,105,210,225,183,223,126,187,174,186, 38, 99,198,140,137, 30, 62,124, 56, 8, 33,200, -200,200,184,207,164,255,193, 7, 31, 56,253,157,193,193,193,184,115,231, 14, 0, 8, 83, 82, 82, 80, 82, 82,130,174, 93,187, 34, - 32, 32, 0, 20, 69,225,228,201,147,160, 40, 10,132, 16,220,185,115, 7,193,193,193,206,144, 93, 66,211,244, 96, 0,155,237,238, -141, 27, 52,104, 80,242,228,201,147, 3, 83, 82, 82,164,132, 16, 10,192, 54, 88,102, 1,220,115, 64,111,206, 9,179, 57,178, 58, -189, 87,231,254,178,229,229,241,211,200,200,119, 82,144,121,226, 18,146,147,147, 57,141, 70,243, 38, 44,179, 11,158, 56,244,232, -209,163,242,112,202, 5, 0, 32,119,211,241,155,137, 74,157,233, 52,128, 28, 0, 77,178,174,149,124, 61,184, 67,216,199,194,155, - 39,130,176,110, 34, 32,241, 6, 76, 58,128,231, 97, 22, 72,239, 29,253,243,238,183,168, 99,245,165,141, 63,125, 21, 61,126, 66, -188, 2, 0,116,156, 25,215, 85,249, 0, 88,180,241,139, 64,116,116, 55,132, 53,106,140, 50,181,198, 98, 43,160, 25,220, 85,233, -234,252,168,102, 45,250,163, 32,223, 58,205,147, 8, 49,162,187, 37, 6, 96,223, 69, 51,126,219,149,142,123,165,119, 16, 28, 96, -153, 73, 16, 32, 22,161, 91,100, 15, 40,182,215, 97,210,133, 16, 98,142, 1, 11, 1, 56, 66, 64,177, 28, 96,102,192,138,132, 0, -161, 96,235,147, 28, 15,203, 90, 1,117, 96,175,226, 38,121,126,160, 47,239, 37,230, 33, 20,217, 89, 24,204, 0,195, 3, 70, 26, - 96, 77, 44, 8, 33, 32, 98, 2,134, 5,116, 38,224,100,150,154,244,232,209,156,175,209,228,111,227,150, 20, 7, 98, 53,255, 91, -132, 2, 2,150,163, 64, 9,172, 51, 5, 0,240, 2, 30,224,157,179, 2,216, 51,255,154,174,143,237, 57, 22,225,108, 67,139,137, -137,233,156,158,158,254, 57,128, 30,233,233,233,251,210,211,211,143,198,196,196, 36,182,110,221,218, 76, 8, 9, 94,185,114,229, -254, 15, 63,252,112,194,178,101,203, 14,215, 33,124,218,180,127,225,236,217,179,231,207,158, 61, 27,251,246,237,131,238,222,253, -125, 57, 34, 36, 4, 55,111,222, 4, 0,133, 51, 11,249,212,182,232, 79, 98, 98, 98,212,154, 53,107, 20,171, 87,175, 70,100,251, -246,209,167, 46, 95,118,104, 42, 62,126,241, 98,230,128,255,207,222,151,199, 53,121,108,239, 63,147,141, 0, 42,130,187,104, 85, -172,168, 85,235,130, 21, 80, 43,137,162,181, 90,187,252,106,212,234,181,245,171, 45, 65,237,117,235,130,182,182,118,209,170,189, - 23,181,171,196, 46, 87,187, 88, 37, 88, 91,183,186,160, 9, 42, 34,136, 86,235, 10, 8, 42,130, 11, 74,194,150, 0,217,230,247, - 71,242,198, 16, 3,121, 19, 80,180,125,159,207, 39, 31,222, 45,135,201,204,188,243,156,115,230,204,153,190,125,159,186,112,236, - 88,103, 0, 62, 0, 62, 55,250,248, 64, 88, 93,141,110,237,218, 97,193,130, 5, 72, 77, 77, 93, 25, 26, 26,154,146,154,154,186, -191,160,160,192,141,114,119,119, 30,128,122,196, 0,212,208, 3, 83, 82, 82, 72, 92,156,236,216,209,163, 69,169,114,185, 92, 4, - 0,113,113,178,193, 43, 87, 42,211,192, 50, 9, 80,231,190,143,189, 83,121,253,198, 40,139,201,220, 67, 87, 90,138,210,219,183, - 64, 8, 15,148, 90, 80, 85, 85, 5, 74, 41, 40,165,184,116,238, 60,140,134,106,252,153,156,236,174, 14, 29,199,156,230, 0,120, - 99,164, 81,150, 49,210, 40, 56, 46, 11,180, 77, 17,176, 70,135,110,131, 36, 5, 57, 25, 42, 0,232,220,169, 19, 78,101, 88,245, -228,220, 63,183, 1, 0, 90, 61, 50, 64,122, 43,255, 68,163, 13,198, 3,255, 40, 66,230,211, 64,191,176,104, 20,205, 30,140,182, - 95, 31, 65,182, 70,135, 64, 17, 65,177, 70, 11, 1, 33,110, 61, 0,246,119, 51, 53,181,198,147, 93,187,118,165, 99,198, 62,141, - 29,219,118, 32, 49, 49, 17, 31,188,251, 30,246,170,247,131, 47,224, 35,184, 67,112, 84,105,105,221, 75,151,183,110,221,170,182, - 41, 2,146, 81,163, 70,213,136, 5,216,183,111, 31, 46, 94,188, 88,165, 80, 40,218, 57,123,147, 92,246,151,206,157,145,151,151, -135,199, 30,123,204, 52,111,222, 60,209,166, 77,155, 16, 16, 16,128, 11, 23, 46,220,229,121,205,203,203, 67,103,246,237,236,152, -120,110,234, 19, 79, 60,241,209, 75, 47,189, 20,144,153,153,217,180,170,170,234,255,124,125,125,159,177, 5, 6,254,206, 82,158, -227, 66,249,169,207,252,123,211,134,161, 35, 94, 32,159, 38, 3,164,253,179,248,100,205, 59, 84,147,115, 97, 58, 0, 37,254,198, -168,161, 0,204, 85,227,236,103,146,234,236,185,106,251,148,102,254,103,146,146, 63,202,171, 76,186,240, 71, 91,142, 9,242,227, - 63,193,175,174,242, 55, 81, 94,121,113,185,225,104,218,197, 27,123, 10, 53,250,148,185,106, 92,175, 77,201,152,242,175,197,234, -131, 71,210,164, 0, 84, 22, 62, 51,205,199,199,197,178,235,120,255,245,233,208,235,171, 81, 86,105,141, 1, 48,240,124,176,121, -107,221,105,118, 11,242,211,200, 11,207,254,219, 74,150,102,198,114, 54, 97,116, 31,130, 73,179, 86,193,207,207, 7,205,124,197, - 82, 0,170,156, 51, 39,164,235,191,216, 90,231,128, 36,160, 38, 24,136, 85, 9, 0, 33, 48, 83,106, 85, 4, 76,182,229,126,132, - 7,129,197, 2,147, 45, 56,208,157, 18, 80, 82,217, 28,149,213,197, 16, 9,120,246, 52,103, 38, 11, 96, 52, 82, 24, 77, 20, 21, -149, 22, 16, 62,129, 25, 4, 70,203, 29,215,189, 43,152, 45, 60,240,136, 25,196, 76, 64,121,212,238,254, 39,181, 24,207,140,164, -179, 23, 54, 17,119,185,161,207,167,157,175,111,223,177,187, 45,250,244,233,115, 61, 36, 36,228,133,203,151, 47,119, 75, 76, 76, -204, 0,240, 92, 82, 82,210,115,142, 15,175, 88,177, 66,189,112,225, 66,233,138, 21, 43,220, 17,132,189, 66, 98, 99, 99,107,125, -232,197, 87, 94,177,250, 0, 61, 75, 12, 68,157,220,254, 0,128, 65, 61,123, 74, 51, 88,144,191,125, 0, 62,117,202, 30,173, 58, -184, 79, 31, 75,124,124,252,151,227,198,141, 51,101,101,101, 9,174, 92,185,130,206, 45, 90,164,237,216,177,131, 85,128,226, 61, -202, 3,224, 72,238, 55, 83, 82, 82, 28, 99, 60, 78, 59,212,179, 91, 37, 64,185, 98,165, 78,182, 48,238,197, 11,251, 15,164, 53, -247,247,111, 86,166, 45,129,201,100, 2,181,189, 7,218,155, 69, 40,211,106, 65, 41, 69,255,232,104,233,159,201,110,243, 32,153, -112, 39,230,132,103, 91, 14,200, 11, 31,240, 56,198, 72,163,236,171, 0,114, 46, 95,102,173, 4, 68,143,125, 73,146,188,243, 23, -187,149,255,187,242, 59, 21, 0,180, 10, 25, 34,189,149,151,170, 6,128,198, 33,127,122,183, 18,128,111,208, 47,246,125,220,176, - 88,208,119,125, 6, 50, 70,183, 65,175, 29, 55, 33, 32, 64, 83,161,119,123,179,237,216,177,131, 76,124,105, 34, 29, 62,114, 4, -182,109,249, 13, 31,175, 92,129,184,210, 82, 80,139, 5,155, 55,111, 65, 97, 97,225, 51, 0,118,184,147,227, 74, 17, 0,128, 23, - 94,120,225, 36,128,114, 54,101, 89,191,126, 61, 25, 53,106, 20, 61,113,226,132,104,192,128, 1, 24, 49, 98, 4, 84, 42, 21, 30, -121,228, 17, 84, 87, 87, 35, 42, 42, 10,148, 82,203,137, 19, 39,120, 66,161,208,155,140,128,143, 5, 4, 4,172,158, 56,113,162, -240,220,185,115,205,170,171,171,107, 11, 12,100,139,254,193,253, 38,108,232, 55,108, 34,249, 46, 5, 40,171, 4, 12,151,118, 91, - 52, 57,170,105,168, 25, 24,248,208,128,201, 3,224,104,249,187,186,230,210,149,234, 64,254,204,249,249,207, 36, 21,249, 87,110, - 87,164, 1,104,103,123,121,171, 1, 20, 2,200,155,171,134, 91, 23,167,226,235,157,234,161, 67,251, 72,205,180,137,202,241,229, -168,208,149, 89,215,253,243,252,144, 91, 14,178,230,235,141,172,126,224,214,109, 95,144, 91,154, 60, 9,120,122,149, 35, 23, 54, -105, 18, 0,179, 81, 11, 80, 29, 70,247, 97, 55,161,107, 4, 31,160,212, 74,212,224, 67, 68,109,138,128,141,252,173, 57, 0, 1, -152,217,205, 77,164, 29,191, 74,194,122,183,163, 38,163, 6, 2,219,194, 94, 74, 41,204, 38,138, 42, 35, 80, 86,110,130, 17, 20, - 38,202,131, 64, 72,112,251,166,177,214,114, 30, 59,182,146, 0,192,224,200,183, 40, 49, 90,173,127, 10,128, 82, 2, 80,155,197, - 64,249, 32,124, 11, 44, 22, 1,178,115,182,176,250,205,175,126,252,170,244,114,238,229,186, 8, 88, 8,235, 82,141,186,216,201, - 94,243, 75,150, 44, 97,252,163,167,108, 86,241, 29,162,126,241, 69,201,150, 45, 91, 84, 54, 37, 64,229, 78, 9, 88,167, 84, 26, -255, 60,125, 90,214,185, 79, 31,243, 19, 61,122,232,108,125,180,218,230, 16,177, 67, 54,122,180,213,226,232,211,199,253,116,199, - 91,111, 73, 1, 96, 96,247,238,119,221,203,204,202, 82,103,156,247, 94, 25,234,211,179,231,215, 60, 30,207,124,225,216, 49,255, - 54,109,218,220, 78, 45, 40,216,224,206,234,191, 15,172,227,216, 15,116,182,128, 63,102,106,160,194,169,173,217, 40, 1,231,100, - 11,227,194,183,125,251,221,150,144, 46,157, 31,171,174,174,130,217,104,130,197, 98, 65,211,192, 64,148,106, 52, 12,249,179, 81, -162, 74, 62,124,227,223,173, 1, 24,114, 46, 95, 22, 49,243,255,233, 39,254,194, 24,105,148,101, 73,252, 23,238,146, 3,217, 49, -107, 78, 28,189,144,117, 65,234, 72,254, 0, 48,252,169,231,164, 7,246,252,174,190,149,151,234,125, 37,214, 18,224,231,250, 58, -123, 14, 27,248, 71, 17,240,199,235,246,243, 71,127,191, 97, 63, 46, 53,154,189, 46,239,230, 95, 54,147, 33, 67,134, 60, 61,106, -236,232, 93,175, 77,157,113,248,241,190,125,134,110,251,125, 59,210, 78, 30,199,241,227,199,119,214,229, 6,174, 67, 17,152,177, -117,235,214,111,183,110,221, 26,177,117,235, 86,214,133, 27, 53,106,212,240,189,123,247, 30,216,177, 99, 7, 66, 66, 66, 48,114, -228, 72, 4, 4, 4,100,151,150,150,134,158, 61,123, 22,121,121,121, 60,161, 80,136, 81,163, 70, 69,239,221,187,215,211,159,122, -174,180,180,116,229,246,237,219,235, 10, 12,244, 4,127, 22,158, 76, 92,254, 91,210,179,239, 84, 6, 79, 65,229,177,197,150,107, -135,150, 77,173,135,188, 7, 78, 17, 96,237, 1,168, 13,115,213,208, 1,248,203,246,241, 10,135, 15,159, 86,199,198, 46,148, 38, - 40, 62, 86, 5,119,234, 6,160, 26, 66, 31, 49, 10,174,151, 97,227,142, 84,226,185,188,157,234,105,175,206,199,250,239,127, 5, - 44, 87, 0, 8, 96,170,170, 68,112,187, 0,233,178,183,102,176,182,230, 96,182, 64,192,179,192, 72, 4, 16, 82,211, 29, 69, 0, - 38,128,154,193, 54, 48,204, 17,199,207, 92, 39, 0,208, 54,136, 71,133, 2,171,181,111,178, 88, 19, 24,149,148, 83,152, 77, 0, - 95, 96,129,217,196,110,228, 56,146,246, 31, 2, 0,225,131, 22, 80, 48, 57,225,121,128,133, 88,221,253, 89, 57,219, 61, 42,228, -183,239,125,171,110,128,254,197,202, 92, 97,200,223,193, 19,224,118, 57,214,177, 11, 23,146,142, 57,185, 12,235,120,214,237, 51, - 13,153, 58,248, 46,229,214,186,196, 47,193,106, 91,123,183,111, 72, 3,231, 1,112,174, 91,157,155,165, 86,172,250,142,114,197, -202, 11,178,133,113,189, 1,240, 47,164,164, 24,171,244,149,176,152,205,232, 25, 22, 38,109, 23,250, 24,142,253,177,157, 93, 29, - 83, 50,113,207, 31, 59,237,167,131, 31, 11,177, 31,239,249, 99,231, 93,231,117,133,198,127,253,185, 85, 65, 30,241,212,243,210, -115, 23,114,113,253,202,105, 21, 0, 28,216,243,187,170,205, 35,189,165, 55,243,207,120,220,238, 19, 38, 76,128,167,233,125,205, -196,167,206,251,249, 47,180,197, 31,215,170,238,249,128,159,154,154,250,135, 66,161,224,101,102,102, 90,246, 31, 77, 65,139,150, - 45,156, 87,122,120,132,173, 91,183,126,167, 80, 40,126,144,203,229, 70, 79,190,247,230,155,111,170, 0,144,105,211,166,209,220, -220, 92,100,100,100,160,188,188, 60,180,105,211,166,104,209,162,133,125, 47, 0, 47,200,159,193,127, 82, 82, 82,132,105,105,105, -125, 12, 6,195, 98,212,156,203,247, 6,239,158,217,252, 47, 97, 64,215, 31, 22,148,230,238,157,210, 0,242, 26, 21,204, 42, 0, - 87,215,189, 82, 0,220, 14,130, 10,133, 96,237,218,181,238, 93, 85,123,142,168, 59,116, 30, 65,110, 22,164,209,214,193, 29,161, - 41, 55, 97,227,182,195, 94,119,208,245,223,174,182,125,183, 13, 5,110, 34,176,169, 0,203, 22,189,230,209, 75,255,205,209,156, -123,182,129,205, 13,141,133, 0,128,216, 87, 72, 13,149, 70, 88, 0,248,249,249, 65,111,210, 19,179,201,115,121,233, 25,214, 61, - 3,194,159,152, 79, 45,148,143,203,151,118, 53,230,238,102,108,151, 14,114,187, 4,178,168, 31, 71,194,111,224,105, 1, 67, 92, -156,204, 7,128,121,229, 74,165,185, 62,130,148, 43, 86, 50, 27,249,216,219, 52,247,140,103,235,244,231, 44,255,194, 43,101,204, -121, 43, 96, 71,236,223,243,155,218,185,175,221,204,247, 46,127,128,187,141,125,156,117, 96, 19,241, 65, 37,175,238, 21,169,185, -229, 38,132, 54, 21,220,151, 87,197,182, 86,191,193,222, 57, 79,201,191,198,248,236,253,134, 63,108,240,137,193, 96,248, 13,112, -191, 41, 29, 75,188, 93,154,187,119, 35,106,198, 6, 60,212, 74, 0,171,193,199,219,125,132, 57,112,112, 68,183,110,221,144,147, -147,195, 85, 4, 7, 14, 28, 56, 60, 36,224,113, 85,192,161, 33,192,145, 63, 7, 14, 28, 56,112, 10, 0, 7, 14, 28, 56,112,224, -192,129, 83, 0, 56,112,224,192,129, 3, 7, 14,156, 2,192,129, 3, 7, 14, 28, 56,112,104,116,212, 8, 77, 61,121,242,164,215, - 81,155,174,130, 9, 57,121,156, 60, 78,222, 3, 35,175,206,232,112,174,254, 56,121,156,188,191,151, 60,143, 21, 0,135,129,194, - 83,184, 27,120, 26, 82, 30,135, 7, 19,148,107,183,135,178, 29, 88, 63,175, 80, 40,252, 1, 60,113,248,240,225,101,124, 62,127, -176,143,143, 15,244,122,253,145,161, 67,135,190, 11, 32, 67, 46,151,235, 31,132, 10,176,101,135, 84,253,147,199, 21, 74, 41, 61, -115,230, 12,250,244,233,195,189,147, 28, 60, 82, 0, 60, 90,135,204, 38, 81,142, 43,121,142,137, 79, 60,149,247, 15, 28,208, 89, -225,169,167,158,146,238,217,179, 71,205, 86,102,112,112,240, 93, 55, 10, 11, 11,157, 7, 83, 40,149, 74,194,178,140,247, 76, 9, -168, 45,159,127, 99,201, 91,181,106,213,136, 45, 91,182, 36,103,103,103, 3, 0, 66, 66, 66,158, 77, 79, 79,223,238,109,251, 58, -246,123, 74,169,253,253, 96,174, 51,239,138,237, 58,113,163, 60,179,109, 7, 79,200,255,177, 51,103,206,108, 41, 43, 43,235,209, -169, 83, 39,220,190,125, 27, 85, 85, 85, 0, 48,120,203,150, 45, 42,127,127,255, 11, 10,133,226,121,185, 92, 94,231, 86,146,103, -206,156,241,200, 32, 72, 77, 77,149,202,229,114,181, 39,223, 81, 42,149, 42,153, 76, 38,245, 38, 1, 20,245, 48, 9,195,132, 9, - 19, 60,121, 63, 0, 0,157, 58, 89,119,192, 45, 47, 47, 71,117,181, 53, 13,186, 78,167,243,228,125,171, 19,167, 79,159,166,131, - 7, 15, 70,207,158, 61,225,227,227, 83, 84, 93, 93,253, 8, 55,140,254,243,224,156, 12,232,158, 37, 2,226,172,216,123,139,223, - 19, 70,187,125,230,249,153,187, 61,146,169, 82,221, 49,144,178,179,179,225,239,239,111, 31,132, 24,176,217,252, 67, 38,147, 81, -165, 82,233,124, 78,106,121,198,171,186,141,138,186,179,157,171, 43,249,245, 1, 33,132, 14, 27, 54, 76,154,146,146,226, 17, 89, -108,217,178, 37,185,117,235,214,120,249,229,151,161,213,106, 45,241,241,241,219, 86,172, 88, 49,105,225,194,133,155, 61,252,255, -248,227,143, 63,236,231,163, 71,143,198,238,221,187,235, 60,103, 35,214,169, 47,211,176,176, 48, 0,160, 14,153,225, 60, 34,255, -210,210,210,180,174, 93,187, 54, 3, 0,177, 88, 12, 95, 95, 95, 20, 21, 21,161,164,164, 4, 1, 1, 1, 40, 42, 42,234,177,123, -247,238, 12,133, 66,209, 93, 46,151,223,168, 75, 94,239,222,189, 33,147,201, 16, 18,114, 39,235,223,202,149, 43,107, 60, 19, 23, - 23, 7, 0, 56,122,244,168,202,155,126, 83,159,236,143,107,214,172,169,237,150,125,175, 2,111,225,239,239,143,115,231,206, 65, - 40, 20,194, 96, 48, 96,247,238,221,200,201,201,193,162, 69,245,219,113, 54, 48, 48,144, 15, 32,250,224,193,131,187,163,162,162, -110, 62,255,252,243,109,146,147,147,193,231,243, 91, 53,111,222,156, 15, 14,255,104,242,103,174, 57, 43, 1,127,155, 32,192,240, -240,112,201,253,182,184, 27, 19,193, 3,151,218, 63,222, 66,171,213,218, 45,126,157, 78,135,117,235,214,217, 63, 30, 12,180, 46, -207,199,143, 31, 79,101, 50, 25, 5, 64,157,159,241, 20, 7, 15, 30, 84,189,245,214, 91,232,210,165, 75,131,213, 95,231,206,157, -201,219,111,191, 13, 74, 41, 82, 82, 82, 84,158,182,123,118,118, 54, 70,143, 30,109, 1, 0,145, 72,196, 11, 13, 13, 69,124,124, -252,166, 86,173, 90,209,240,240,240, 49, 30, 88,156,247,170,139,144,176,176, 48,202,252,174,227,199,143, 51,251, 1, 48,237,194, -218,237,175,213,106,183,136, 68,162,102, 0, 48,123,246,108, 76,153, 50, 5, 34,145, 8,190,190,190, 16,139,197, 32,132,128,207, -231,163,180,180,180, 25,128,120,133, 66, 81,167,236,184,184, 56,132,132,132, 32, 47, 47,207,254,137,139,139,171,241,169, 15,100, - 50,153,212,246, 59,189, 30, 19,230,207,159,111,255, 56,142,151, 78,215, 45,108,229,117,234,212, 9,254,254,254, 88,188,120, 49, -252,253,253,177,109,219, 54, 84, 86, 86, 54, 8,249,219,222,101,170,213,106,255,111,234,212,169,232,214,173, 91,155,221,187,119, -227,230,205,155,184,122,245, 42, 74, 74, 74, 12,247,115,108, 82, 40, 20,146,130,130, 2,170, 80, 40, 36,174,238,229,228,228,208, -139, 23, 47,114, 9,232,238, 3,249,199,196,173, 64, 76,220,138, 90, 21,131,251,162, 0, 16, 23,168,235,186, 55, 72, 79, 79, 87, - 53,132, 18, 48,101,202,148,135, 70, 9,168, 47,244,122,253, 93, 86,191, 55,205,203,144,201,248,241,227,237, 86,126, 82, 82, 18, -234, 75,252,142,214,191, 82,169, 36,195,134, 13,147, 42,149,202, 26, 30,129,250, 32, 49, 49,145, 0, 32, 81, 81, 81, 82,103, 79, - 3,203, 65,215,100,243, 6,160,117,235,214, 88,186,116,105,213, 27,111,188, 97,200,203,203,219,185, 98,197,138,145,141,221,190, - 14,123, 0, 16,199,118,242,176, 93,158,200,201,201,233, 1, 0, 51,102,204, 64,105,105, 41,174, 93,187, 6,161, 80, 8,129, 64, - 0,129, 64, 0,161, 80, 8, 95, 95, 95, 84, 86, 86, 34, 57, 57,121, 50,128, 64,119, 66,243,242,242,160, 84, 42,237, 31, 71, 79, -192,202,149, 43,145,156,156,236,245,239, 86, 42,149,106,219, 20,128,170,129,222,229,218, 18,119,179, 30, 63, 47, 95,190,140,157, - 59,119, 98,233,210,165,232,212,169, 19, 90,182,108,137,148,148, 20, 44, 90,180, 8,254,254,254, 0, 0, 62,191, 94,134,122,187, -233,211,167, 79,252,207,127,254,131,244,244,116, 92,187,118, 13, 38,147,233,229, 22, 45, 90, 4, 2, 48,222,239,190, 23, 28, 28, -140,152,152, 24, 85,110,110, 46,117, 36,255,152,152, 24,213,163,143, 62, 10,179,217, 12, 14,247, 22,142,196,239,120,220, 24, 30, - 0,234,226, 83,215,245, 70, 83, 2,198,140, 25,211, 16, 74, 0,245,224,195, 26, 47,190,190,167,193, 26, 36, 59, 59, 27, 58,157, -174, 86, 55,255,145, 35, 71, 26, 66, 49,168, 55, 14, 30, 60,168,178, 41, 22, 72, 73, 73, 81, 19, 66,208,186,117,107, 85, 67,118, - 78,198,253,111,243, 4,212,137, 85,171, 86,141, 25, 50,100, 8, 5,128,248,248,120,209,247,223,127,143,151, 95,126,153,113,205, -139,255,250,235, 47,145,237,222,222,240,240,240,231,216,252,255,209,163, 71,227,233,167,159,182,187,247,153, 99,230,156, 57,102, -233,254, 7, 0,216,172,127, 87,237, 64,156,238,215,137,221,187,119, 47,107,217,178, 37, 0,224,226,197,139,200,207,207,199,137, - 19, 39, 96, 48, 24, 64, 8,129, 64, 32, 0, 33, 4,102,179, 25,122,189, 30, 91,183,110, 5,128,190,158,120,142,100, 50,153, 75, -229, 37, 47, 47,175, 94, 74,128,195,111,175,151, 55, 0, 13, 48, 85,106, 52, 26, 49, 96,192, 0,168,213,106, 92,190,124, 25, 3, - 7, 14,180,223, 83,171,213, 8, 10, 10,178, 43, 2, 94,160,253,244,233,211, 11,190,251,238, 59, 68, 71, 91, 55, 50,106,223,190, - 61,204,102,243,143, 0, 74,238, 55,241,200,229,114, 53,163,124,134,132,132,224,216,177, 99,148, 33,127, 70,249,235,222,189, 59, -155,241, 97, 16,128, 31, 96,221,243,172, 46,140, 5, 16, 3,160, 21, 71,251,247,185, 99,179, 98,195,251, 24, 4,104, 83, 2,164, -233,233,233,106,111,101,116,238,220, 25, 83,166, 76,193,207, 63,255,236,109, 76, 0, 1, 64,127,254,249,103,151, 55,119,237,218, - 5,219, 61,143,101, 31,189,244, 24, 34,186,156, 67, 97,230,226,122,213,147,227,156,127,114,114, 50,162,163,163, 17, 19, 19, 99, - 39,255,142, 29, 59, 54,132,210, 87, 47, 69, 32, 42, 42, 74,114,240,224, 65,220,190,125, 91,202, 92,147, 72, 36, 82,165, 82,169, -138,138,138,146,120, 58,111,239,230,127, 73,217, 40, 0, 91,182,108,217,201,204,253,235,116, 58,172, 92,185, 18, 21, 21, 21, 16, - 10,133,240,241,241,193,165, 75,151,176,116,233, 82,104,181, 90,196,199,199,255,182, 98,197,138,225, 11, 23, 46, 84,185, 33,217, - 26,202,128,187,152, 0, 22,117, 14, 55, 59, 0,218,167, 3,220,253,222,160,160,160,193,213,213,213, 48,153, 76, 56,114,228, 8, -248,124, 62, 12, 6, 3, 42, 43, 43, 97,177, 88,236,239,177,209,104, 68,117,117, 53,243, 78,247,118, 39,183, 54, 55,127, 92, 92, -156, 61, 30, 32, 36, 36, 4, 69, 69, 69,245, 86, 68, 29, 86, 5,176,237,139, 26, 0, 65,174,110,172, 94,189,218,171, 66,196,199, -199,227,173,183,222, 66,255,254,253,237, 30, 16, 38,125,118,255,254,253,145,149,149,133,214,173, 91,123, 35,186,211,244,233,211, - 47,127,247,221,119,142,227,103,240,181,107,215,174, 53, 38,177, 12, 28, 56,144, 48,164, 63,112,224, 64, 12, 28, 56, 80, 5, 0, - 89, 89, 89,232,209,163, 7,219,118, 56, 9,192, 23,192, 38, 0,147,224,180, 37,184, 13,175, 3,248,194,118,252, 46,128, 30,128, -251, 45,234,255,206, 96,118, 3, 92,183,114,161,221,242, 95,183,114,161,253,222,125, 87, 0,238, 55, 30, 20, 37, 96,202,148, 41, -244,221,119,223,189,203, 21,232, 13,249, 55,164,245, 15,192,165,245,207, 88,253, 66,161, 16, 55,110,220,104, 84,242,119,180,254, - 29, 3,186, 84, 42,149,163, 23,224,190, 7,108,102,103,103,227,229,151, 95,214, 3,240,243,247,247,199,123,239,189, 7,161, 80, -104,191, 63,109,218, 52, 0, 64, 96, 96, 32,198,141, 27,135,195,135, 15, 31,184,143,229, 36,142, 30,128,186,148,128,176,176, 48, -231,173, 98, 93, 42, 3, 6,131, 1, 26,141, 6, 85, 85, 85, 8, 8, 8,128,143,143, 15, 76, 38, 19, 40,165, 48,155,205, 48, 24, - 12, 48, 26,141, 48,155,205,142, 10,253,237,186, 10,153,151,151, 87, 35, 0,144,153, 14,112,244, 8, 56,222,175, 47,188, 8, 8, - 20,215,118,195, 49, 38,192, 19,101, 96,233,210,165, 24, 59,118, 44, 58,119,238, 12, 63, 63, 63, 72, 36, 18,104, 52, 26,248,251, -251, 67,171,213, 98,253,250,245,224,241, 60,118,200,118,152, 62,125,250,229,121,243,230, 97,219,182,109,120,238,185,231, 0,160, - 45,128,155, 15,194, 56, 44,151,203,213, 1, 1, 1,210,137, 19, 39,170, 0, 96,243,230,205,210, 73,147, 38,121,210, 22, 6, 0, - 83, 0,252, 92,135, 18,224, 56,213,246, 8,128, 62, 0, 50, 56,219, 30, 53,136,191, 54,252, 45, 51, 1,214,151,252, 25,120,107, -165, 59, 14,200,203,150, 45,171, 55,249, 51, 24,208,191, 31,246, 31, 80, 97,227, 1, 63,187, 82,112,244,210, 99,245,250,141, 97, - 97, 97,200,203,203, 67, 82, 82, 18, 58,118,236,136, 13, 27, 54,120,108,117, 41, 20, 9, 18, 7, 15, 78,131,144, 63, 51, 31, 95, - 84, 84, 36,117,190, 55,108,216, 48,105, 82, 82, 82,131,197, 2, 0, 86,247, 63, 91,239,147, 86,171, 61, 15,235,188,176,101,243, -230,205, 88,191,126, 61, 0, 96,211,166, 77,208,106,181,204, 99,166,172,172, 44,180,106,213, 56, 94, 73,167,104,255,187,148, 51, -182,251,196,231,229,229, 29, 49,155,205,208,106,181,184,125,251, 54,180, 90, 45,244,122, 61,244,122, 61, 42, 42, 42, 80, 86, 86, -134,210,210, 82, 84, 86, 86,162,186,186,154,153,219, 77,171, 75,166, 51,185,187, 10, 36,117, 94, 21,192, 22, 54, 87, 63,117,113, -205, 19,248, 53,116,123,108,216,176, 1, 18,137, 4,126,126,126, 56,119,238, 28,212,106, 53,252,253,253,241,254,251,239,227,240, -225,195, 88,180,104,145,167, 10, 64,219,233,211,167, 95,157, 52,105, 18,126,253,245, 87,134,252,219, 63, 40,228,111, 29, 23, 20, - 18,134,252, 1, 96,226,196,137,170, 11, 23, 46,120, 58,181,202, 40, 1,176, 41, 1,206,211, 1, 23, 29,142,243, 1,156,230,104, -255, 14,156,131, 0, 27, 69, 1,184, 31, 65,128, 13, 77,254, 54,226,110, 8,203,141, 44, 91,182,172, 94,228,255,226,235,123, 48, -160,255, 29,215,205,150, 95,183,218, 61, 2,251, 15,168,188, 82, 2,228,114, 57,108, 75,195,160,215,235,177,111,223, 62, 44, 93, -106, 93, 81,112,250,244,105,152, 76, 38, 15,100,197,170, 1,107,224, 31,165,148, 9, 6,172, 23,249, 51,214,127, 93,110,254,134, -138, 5, 96, 20, 9,137, 68, 34,117,247,108, 72, 72,200,168,248,248,248,176,244,244,116,193, 15, 63,252,192,187,112,225, 2,166, - 77,155,102, 98,234, 49, 62, 62, 30,233,233,233,248,225,135, 31, 4, 87,174, 92, 65,120,120,184, 91,153,247, 34, 6,128,177,164, -157,148, 0,202, 40,125,108, 17, 26, 26,154,105, 50,153, 96, 48, 24,112,235,214, 45,220,184,113, 3, 55,111,222,196,205,155, 55, -113,235,214, 45,104, 52, 26,232,245,122, 84, 87, 87,163,180,180,148,249,159, 5,117,201,100, 2,253, 28,149,208, 58,202,238, 17, -249, 51, 57, 0,156,175,213,167,127,184, 88, 13, 96, 87,242,216,202,200,201,201, 65, 86, 86, 22,244,122, 61, 34, 35, 35,209,183, -111, 95,108,216,176, 1,239,188,243, 14, 68, 34, 17,248,124, 62, 4, 2,214, 14,217, 14,211,167, 79,191, 62,105,210, 36,100,100, -100,224,131, 15, 62, 96,172,223,235,120, 64,150, 49,103,102,102, 82,102,206,255,196,137, 19, 88,183,110,157, 20, 0,186,119,239, - 14,199,192,192,122, 42, 1,115, 97,157,255, 31, 15, 96, 22,128,112,252,195,221,255,192,157, 72,127, 87, 65,128,206,171, 0,238, -215, 20, 0,245,240,250,223,133,252,237, 74, 64, 61,166, 18,106,144,191,171,243,253, 7, 60, 31,223, 28, 7, 93, 63, 63, 63,244, -236,217,179,198,253,244,244,116,143,228,141, 31, 63, 30, 73, 73, 73, 96, 20, 1, 0,212,118,205,227,117,231, 27, 54,108, 80, 1, -192,238,221,187,165,174, 34,214, 83, 82, 82,212,151, 47, 95,118,105, 61,186, 66,109, 73,127, 24, 69, 35, 37, 37, 5, 81, 81, 81, - 82,149, 74,229,182,239,164,167,167,239, 91,190,124,249,136,212,212,212,253,161,161,161,200,206,206,134, 86,171, 21, 4, 6, 6, - 98,250,244,233,208,104, 52, 87, 82, 83, 83, 59,133,134,134, 34, 53, 53,149,196,198,198,186, 83,142,239,154,243,175, 71, 12, 64, -141,119,139,201,151, 96,203,157, 96,247,204, 56,204,255,187,109,143,136,136,136,119,212,106,245, 28,179,217,140,178,178, 50, 24, -141, 70,251,188,127, 85, 85, 21, 40,165,160,148, 34, 43, 43, 11, 6,131, 1,209,209,209, 47,201,229,114,147,171,164, 35,181, 33, - 58, 58, 26,209,209,209, 53,130,254, 60,157, 2,112, 36,122,155,203,159, 58,246, 15,219,170,128,134, 30,215, 88,143,159,204, 82, -191, 55,222,120, 3,106,181, 26, 82,169, 20, 57, 57, 57,104,210,164, 9,242,243,243,193,231,243,217,122, 0,200,244,233,211,175, - 78,157, 58, 21,135, 14, 29,194,251,239,191, 15, 0,193, 0,174,225, 78,254,135, 70,183,252,153,241, 37, 47, 47, 15, 97, 97, 97, - 76, 63,147,198,196,196,168, 66, 66, 66,144,149,149, 69, 89, 6, 2, 58, 42, 1,147,108, 10,192, 38, 0, 71, 0,200, 1, 72, 0, -220, 0,135,134,235,192, 13,157,141,207, 85,192,207,202,149, 43,107,189,222,152,228,111, 91, 1,112, 47,180,104,175,101, 94, 45, -112,223,191,125,125, 61,243, 90,186, 11, 18,243, 20,209,209,209,210,164,164, 36,245,132, 9, 19,104, 98, 98, 98, 13, 69,192, 73, -225, 99, 93, 15,177,177,177,110, 53, 27, 15, 19, 3, 81, 39, 69,194, 58, 42, 73,165,172,200,223, 97, 48,183,207,235,135,135,135, -255, 43, 62, 62,254,199,113,227,198, 33, 43, 43, 11, 87,174, 92,233,180,120,241, 98,105,108,108, 44, 43,121,247, 40, 15, 64,141, -122,174,133,248, 88,101, 12,148,203,229,186,132,132,132, 37,187,118,237,250,208,100, 50,161,164,164,196, 30, 3, 0, 0,183,110, -221, 66, 73, 73, 9, 40,165,140,213,238, 17,203, 50,243,255, 97, 97, 97,246, 8,118,230, 58, 91, 37,192,133,149,127,215, 52,212, - 61, 32,127,143,193, 40, 1, 11, 23, 46, 68, 74, 74, 10,198,141, 27,135,229,203,151,227,205, 55,223,132, 64, 32,128, 88, 44,118, - 59,134, 80, 74, 45, 51,102,204,192,143, 63,254,136,239,191,255, 30, 0, 58,218,200,191,193, 13,170,250,160,176,176, 16, 59,119, -238,172,145,197,209,118, 44, 29, 62,124,184,202,203, 37,143,102,155, 18,176,195,102,253, 71,112,228, 95, 59, 92, 5, 1,178, 82, - 0, 60, 73,196,225, 45, 97, 55, 52, 26,130,252,235, 75,212,247, 2,115,231,206,149, 94,184,112,161, 65,101,218, 92,164, 13,186, -148,142, 33, 60,219,218,122,198, 43, 64, 9, 33,176, 88, 44,216,178,101, 11,107, 37,224,173,183,222, 98,202,121, 87, 12, 0,143, -199,131,197, 98,193,219,111,191,173, 98, 75,158,117,201, 75, 73, 73, 81, 59,102, 69,244,162,223,253,180,124,249,242, 91,169,169, -169,187,217, 90,253,247,193,219, 70,156,189, 61,181, 40,124,172,148,128,216,216,216,143, 20, 10, 69,210,207, 63,255,124, 86, 36, - 18,129, 89, 21, 96,177, 88,208,188,121,115,104,181, 90,200,100, 50, 68, 71, 71,251,201,229,114,183, 11,188,153,241,197, 49,248, -239,248,241,227,136,142,142,174, 49,158,184, 27,135,226,226,226,104, 94, 94,158,212,217,197,239,109, 26, 96, 71,184, 8,240, 51, - 1, 48,173, 94,189, 90,108,179, 70,121, 14, 31,143,148, 0,199,196, 63,179,102,205,178, 31,151,149,149,185, 29,155, 8, 33,100, -250,244,233,244,135, 31,126,120, 30,192,239, 15, 34,241,216,136,158,120,122,143,141,210,238,132,235, 15,195, 24,126,191,193,172, - 2,112, 69,252,172, 86, 1, 52, 52,169,215, 38,239, 65, 81, 30, 30,228,142,243,217,103,159,169, 27, 90,166,211, 26,233,123, 6, - 39,247, 63,219,151,154,109, 46,116,226,193,239,189,167,191,117,209,162, 69,123,234, 83,159,163, 71,143,174,177, 44,246,233,167, -159,174,225, 25,240,112,238,159,120,232,237, 97, 85,110,185, 92,126, 78,161, 80, 52,217,187,119,239, 39,249,249,249,115, 42, 43, - 43, 97, 54,155,209,175, 95, 63, 12, 28, 56, 48, 62, 58, 58, 58,142, 13,249, 3,192,209,163, 71,237,199, 81, 81, 81, 53,174, 59, -159,187, 25, 87,136,163, 66,203, 40, 19,182, 56, 0,175,218,125,194,132, 9,181,221, 18, 56,140,151,162,123, 53,174,184,241, 84, - 88, 0,224,251,239,191,231, 54, 76,225,192, 90, 9,168,141,252,107, 83, 0, 26,186,115,113,157,149, 3,241, 80,179,255,199,213, -141, 35,225,223,131,105,129, 6,121, 7,229,114,185, 14, 86,215,235, 92,230,218,249,243,231,217, 16,151, 29,189,123,247,110,240, -241,192,149, 66,235,173,203,255, 94, 43,139, 28, 56,254,184,159, 74,128,219,202,245,118, 31, 97, 14, 28, 56,112,224,192,129,195, -195, 11, 30, 87, 5, 28, 56,112,224,192,129, 3,167, 0,112,224,192,129, 3, 7, 14, 28, 56, 5,128, 3, 7, 14, 28, 56, 60,132, - 48,193,131,237,138, 57,255,124,202,173, 0, 0, 32, 0, 73, 68, 65, 84,252, 51, 33,224,170,128, 3, 7, 14, 28,184,177,157,195, - 63,188,147,156, 60,121,210,235,136, 75, 87,193,132,110,228,213,185,254,216, 11,121, 13, 93, 62, 78, 30, 39,239, 31, 45,239,207, -119,174,120, 61,176,244,255,164, 19,238,181,188,227,139,188,151, 23,182,252,110,121, 76,253, 41, 20, 10,137,209,104,196,165, 75, -151, 84, 6,131, 1, 2,129, 0, 5, 5, 5,120, 41,160, 51,246,100,102,162,242,241,142,136,136,136,144,242,249,124,102, 93,123, -163,181,175, 66,161,120, 12, 64,235,179,103,207,238,108,223,190, 61, 79,163,209,136,219,183,111,191,212,215,215,119,173, 92, 46, -191, 6, 0, 9, 9, 9,188,132,132, 4,115,109,242, 18, 18, 18,154,218,188, 5,250,216,216, 88, 10, 0,139,255,253,228, 55,242, - 39,243,167,111,204, 12,189, 36,104, 61, 42,162, 73,211,102, 21, 0, 40,165, 84, 0, 32, 48, 33, 33,225, 42,247,190, 61,216,242, -238,181,150,200,118,211, 23, 79, 83,224,122,156, 50,119,101,228, 83, 18, 65, 80,128, 42, 55,251,162,244, 81,159, 38, 88,112,230, -160,250, 65,210,178,234,200, 71,206, 45,113,105,100,140, 29, 59, 86,178,107,215, 46, 85,252, 59,214,243,223, 14, 61,137,131, 7, - 15,178,106,151,127, 77,123, 69,194, 35, 68,149,117,225, 2,180, 90, 45, 58,117,234,132, 38, 77,155, 98,107,210, 22,214,237, 58, -126,252,248, 26, 47,110, 82, 82, 82,157,123, 41,216,178, 43,122,213,111,152,141,154, 40,165,245,235,119, 50, 77,205, 87, 85, 25, -228,189,172,176,213, 64,200, 43,214,227,188,245,192,241, 5,245,111,212,241,183,107,150, 47,169, 37,171,175, 41, 20, 10,170,211, -233,164, 91,183,110, 85,229,229,229, 65, 38,108,129,182, 29, 91,161, 74, 87, 9, 95,189, 9, 67,222,124, 13,195,198, 77,196,142, -239, 18,176,125,255,126,213,168, 81,163,164, 15, 64, 23,206, 54,155,205,237,242,242,242, 44,125,251,246, 21,133,134,134,226,196, -137, 19,239, 84, 85, 85,141, 85, 40, 20,209,114,185, 92, 19, 27, 27,107,169,107, 73, 88,108,108,108,185,227,249, 87, 95,125,197, -219,253, 83, 92,183, 14, 51,250,227,237, 65,189, 90, 29,221,251,223,196, 45,167, 37, 39,187,245, 30,190,156, 16,162,145,203,229, - 5,253,250,245,179,216,148, 6,206,211,240, 15,115, 19,121,170,105,176,202, 54,230, 13,249,127, 29,245,172, 36,178, 85, 7, 21, - 1, 69, 78, 69, 9,218,181,239,172, 50, 90,204, 88,212,103, 48,138, 58,181,146,126,183,227,119, 86,138, 64,204, 36,208, 30, 93, -153, 51, 62,182,238,181,224,208, 49,138,152, 73, 64,143,174,192,130,101,245, 35,110,102,131,146,250,102, 39,115,165, 76, 52,148, -220,250,128, 82, 74,177,132,128,124, 84,231, 51,192, 18,130, 9,231,101, 15,204, 90,235, 59,228, 79,109,228, 63, 12,135, 15, 31, -102,245,221,180,163, 47, 82,147,177, 7,148,202,235, 72, 79,179, 38,172,201,190,144, 5, 0,216,185,147,208,172,139,227,165, 11, -230,178,107,151,145, 35, 71, 90,246,237,219,199, 75, 74, 74,194,129, 3, 7,106, 36,195,113,134,151, 41, 84,237,205,228,162, 35, - 83,234,133, 66,193,164, 11,175,119,206,130,144, 87,236, 27,237,172, 94,189,186, 97, 20, 0,135,122,178,237, 78,200, 10,185,185, -185, 80, 39, 38,170, 62,138,158,128,126, 83,102, 65,212, 38, 16, 16,216,146,253, 89, 40, 96, 17,194, 82, 77, 49,230,149, 24,228, -127,190, 2, 71,142, 28, 81, 41, 20,138, 26,233,110, 27, 1,102, 30,143,215,186,101,203,150, 80,171,213,130,190,125,251, 98,208, -160, 65,188, 27, 55,110,244, 63,117,234,212, 25,133, 66, 49, 64, 46,151,223,176,145, 53,143,101,221, 53, 25, 49,124,100,200,242, - 85,219,120,113,211, 78, 55,139, 24, 61, 83, 26, 17,158,252,228,155, 95, 20, 60, 19,250,196,203, 97, 0,202, 97,141, 49,224,213, -198, 15,142,137,173,220,245,163,122, 43,164, 28,156, 61, 9,238,188, 5,246, 99, 79,130, 0, 41,211,184,253, 94,238, 3,133, 66, -193,243,128, 8,157, 55,169,160, 97, 97, 97, 8, 11, 11,243, 58, 79,188, 98,114,140,100,114,255, 72, 85,247,118,193,232,218, 46, - 24,143,183,106,143, 96,223, 38, 16, 91,128, 46, 62, 77, 16,144,115, 77, 53,253,153,231, 36,108,100,245,232, 10, 92,200,229,225, -252, 69, 63,156,201,109,134,231, 71,250, 99,213,187,124,244,232, 74, 26,204, 72,175, 47, 73, 51,219,156,134,132,132,168, 50, 51, - 51,145,153,153,137, 15,127, 58,133, 71,199,196,169, 0, 80, 15,183, 60,165,108, 63, 50,153,204,253, 91,188,196, 90, 71, 97, 97, - 97,144,201,100, 46, 63,204, 51,158, 98, 92,223, 15, 36,142,229, 25,219,103,137,164, 33,218, 99,236,216,177,146,157, 59,119,170, - 8, 33,120,227, 19,130,223, 14, 13,195,161, 67,135, 88,125, 55, 49,113,138, 36, 34, 60, 22, 67,135, 94,199,231,159,127, 94,227, -222,228,201,192,152, 49,192,252, 57, 73,170, 85,159,177,107, 19,134,252,213,106, 53,120, 60, 30, 38, 78,156, 8, 62,159, 95, 31, -178,191,203,242,119, 53, 32, 19,226, 29,249, 55, 24,194, 86, 1, 0,214,172, 89,131, 53,107,214, 88,175, 13,136,111,180,226, 28, - 56,112, 0, 95,189, 16,131,129,207,201, 32,104, 17, 4, 34,228,131, 39,228,131, 47, 22,129,231, 43, 6, 64, 65,205, 38, 80,131, - 1,175,189, 50, 11,101,251, 51,145,155,155,171, 82, 40, 20, 18, 52, 30, 72,102,102,102,100,199,142, 29, 69, 22,139, 5, 41, 41, - 41,216,182,109, 27, 2, 2, 2, 16, 25, 25,217,110,243,230,205, 31,219,158, 99, 21, 16,168, 80, 40,248,135,247,255,242,191, 71, -252, 10,218,232,202,249,152,188,164, 2, 95,254,247, 51,160,105,111,193,127,227, 90,119,201, 61,241,243,100, 7,238,224,213,162, - 24, 18, 7, 82, 39,214,203,196,126,236,120,253, 30,237,133,193,161,129, 61, 0,246, 86,218,184,251,231,146,174,143,118,109, 46, -255,232, 53,139,135,236, 72,194,194,194, 40,147,150,212, 33, 61, 41,245, 52,109,167,226,133, 87, 36, 79,117,124, 84, 37,170, 50, -193,247,191,111,193,164, 55, 64,252,198, 50, 4,136,196,168, 18, 86, 66, 87, 85, 9, 95, 16, 84, 95, 45, 82,125,250,233,167,210, -183,223,126,187, 78,242,189,144, 11,172,219,100, 1,160,183,125,128, 39,159,224,225,133, 81,164,198,123, 19, 51, 9, 88,183,201, - 43,242,150, 42,149, 74,234,173,181,206, 88,253,153,153,153,119,234,224,176, 17,149, 6, 29, 0, 96, 68,220, 62, 40, 87,142,244, -200,203,144,187, 34, 23, 66,146,115,167, 35,144, 66,144,150, 61, 28,206,139,208,234,255, 94, 96,215,176, 31,217,243,205,147,218, -210,206, 18,155,210,119,252, 56,187,118,150, 63,251,165,100,221,182,127,171,182,159,250, 0,203,231,253,134,112, 73, 40, 54,126, -125, 8,223,238,181,110, 16, 52,243, 95, 31, 72,215,254,244,129, 87, 74, 85,252, 59,160,192, 78, 40,127, 56, 11, 74, 41,154,182, -126, 28,135, 14, 29,130,109,223,130, 58,203,183,234, 51,153, 68, 38,107,161, 2,190, 2,240, 27,210,211,129,240,240, 59,247, 63, -254,248,206,241,252, 57, 73, 42, 95,191,197,210,153,175, 45,173,179,156, 12,249, 71, 69, 69,193, 98,177,224,203, 47,191,108, 80, - 7, 13, 0, 88, 44,150,187,201,159,214,253,254,242, 38,104,107,188,252,204, 16,110,145,185,120,206,238,231,179, 30,244,237,123, -247, 28, 59,111,162,182,134,154,111,177, 76,195,188,121,243,236,247,231,205,155,135, 53,107,214,128,215,109,198,157,255,106,123, -222,149, 60,193, 68,215,229,115,222,201, 90, 48,145, 93,249,170,170,170,208,182, 83,103,192, 98, 0,207, 7, 32, 2, 62, 76,229, -165,168,202,187,132, 91, 5,133,232, 48, 88, 2, 34,106, 14, 98, 52, 0,124, 30, 86,206,124, 19, 35,215,125,128, 5, 11, 22, 52, -244,184,204,138, 21, 21, 10, 5,161,148, 54,175,172,172, 28, 28, 20, 20,132,172,172, 44, 88, 44, 22, 92,186,116, 9,235,215,175, - 71,207,158, 61, 17, 28, 28,252, 50,128,215,156,200,186, 86,111, 0,165,180,101, 39, 94,186,164,221, 35,163, 69, 37, 41,167, 81, -170,245,193,143, 59, 76,216,117,244, 39,204,145,249, 10, 4,122, 75,152, 45,166,192,165, 2,192, 17,122,227,163,182,233, 30, 87, -158, 1, 30,139,142,200,204, 27, 66,178,104, 24,214,165, 40,154,231, 94,204,197,201, 31, 78, 67,161, 80,120,100, 61, 48,228,160, -215,255, 12,189,126, 35, 52,154,104,198, 58,246,232, 7, 14,242,105,166,106, 93,101,134,120,201, 44,152,111,107, 96,186,120, 25, - 2,145, 16,126,132, 15,127,194,135, 63, 95,128, 32,161, 24,180, 92,135,235, 7,142,184,221,233,197, 21,169, 31, 58,102,177,191, -135,171,222, 37,136, 95, 76,108, 30, 1,239,172,127, 27, 57,171,224, 69, 10, 92,103,242,135,128,143,188,235, 21,184, 94,108, 64, -250, 57,235, 6, 34,221,166,109,135, 39,251,158, 11, 73, 14, 4,164, 16, 62,188, 83,214,191,173, 9, 2, 39, 95, 67,192,164, 51, -240,121,126, 9, 16,236,239,153, 39,151,197,206,109,158,108,241,170,216,246,186, 42, 34,232, 93, 28, 63,120, 9,255,111,252, 56, - 4,183,236,142, 89,255,126, 21, 95, 44,222,139,136,192,197, 88,251,211,135, 94,239,224, 67, 8, 16,187,224,140,221, 98, 25, 58, -116,168,141,144, 44,110, 27,120,202, 36,161, 10, 56, 0,224, 55,148,220,108,130,110,143, 52,193, 55,223, 88, 45,255, 37, 75,128, -144, 16,171,136,146,155, 77, 80,114,179, 9,250,245, 57,175,114, 71,254, 7, 14, 28,128,197, 98,177,147,244,230,205,155, 97, 54, -155, 61,114, 95,215,225,225,185,139,252,173,239,179,123,229,157, 2,100,173, 66, 33,101, 44, 53, 11,165,176, 88,238,238,190,204, -117, 11,165, 88,155,144, 32, 77,176,126,199,229,255,164, 0,161, 20, 36, 33, 65, 33,165,148,226,179,207, 62,179,223,103,142, 19, - 18, 18,164,148, 90,159,163, 0,169, 77, 94,130, 66, 1,219, 61, 98, 54,155, 97, 50,155, 97, 50,221, 93,103,204,117,147,217,140, -175,215,174,149,174, 77, 72,168,165,124, 20,130,166, 77, 1, 33, 31,102,125, 5,206,110, 73,194,251,175,202,209,225,117, 57,250, -175,248, 8,151,254, 60, 1,190,175, 24,198,226,155, 56,125, 84,141,237,135,246,160,244,198, 13,156, 57,115,166,193, 54,214,138, -140,140,100,229, 77, 80, 40, 20, 1,148,210, 65,153,153,153,191,191,247,222,123,189,206,158, 61, 43, 50, 24, 12,224,243,249,104, -218,180, 41, 76, 38, 19, 50, 50, 50, 64, 8, 17,185, 27,235, 19, 18, 18,252, 21, 10,133,111, 66, 66, 66,112, 73, 65,234,159, 31, -254, 47, 63,232,175, 67, 59,160,209,241, 32, 18,240,208, 33, 80,140,210,219, 34,200, 63, 53,225,244,237,254,254,238,120,195, 22, -107, 66, 29,251,162, 77, 49,184,235, 58, 71,215,247, 7, 12,249, 59, 43, 7, 60,119, 90, 40,179,223,119, 13, 55,231,232, 41,158, -123,251,108,238,126,189,126, 35, 0,130,170,170,239, 33, 62,118, 25,250, 61,143,214,184,239, 14,111, 15,136,146, 4,104,202, 97, - 17, 9, 96, 56,126, 22,213,231,243, 80,181,247, 16, 80, 89, 13, 17,165,240, 3, 31, 2, 16, 84, 91, 76,208, 84, 87,225,235,125, - 59,220,202, 92,245,174,213,186,119,132,245,156, 49, 87, 40,178, 46, 82, 44, 88,230,125,127,117,202, 87,206,218,101, 47,147,201, -236,123,107, 51,120,105, 77, 1,246, 31,215, 34,255,102, 21, 0, 32,255,102, 21,114, 10, 42,129,232, 68,102, 99, 20,247,174, 31, - 82,104, 85, 4,202, 79,195,223,255, 34,124,196,229,176, 88, 52, 48, 26,143,131,207, 15,129, 65, 87,220,104,157,117,194,232,127, - 75, 0,130, 47,127,155,129, 38,188, 71, 0, 0,215,179, 40, 6,140,227,227,223, 75, 71, 98,232,200, 94, 0,168,237, 57,207, 16, - 21, 21, 69,223,248,132,160, 73,171, 62,160, 0, 70,191, 48,147,245,188,255,218,111, 22,211,214,173,255, 2,112, 6, 37, 55,155, -160,188,216,186, 5,115,223,190, 64,183,110,192,203, 47,223, 33,255,242, 98, 95,148, 23,251, 34,200,239,122,157, 50,199,143, 31, - 15,169, 84,138,225,195,135,215,112,253, 59,126,188,153, 18,112,245,222,122,131, 88,135,249,109, 66,136,253, 83,219,181, 88,185, - 92, 45,143,113, 63, 39, 30, 19, 19,163,114,101, 57,207,155, 55, 15, 49, 49, 49, 53, 8,181, 54,121,191, 41, 20, 56,115,230,140, -221, 5,239, 88,103, 12,156,175,205,140,141, 85,199,202, 93,111,213, 44,162, 20, 60, 63, 31, 24,111, 92,129, 98,241, 98,172,215, -149, 64, 27, 21, 97,191,255,221, 79,235,241,193,155,175, 34,116,193, 75,248,232,244, 1, 36,106, 47, 97,228,179,207, 34, 36, 36, -196,227, 96, 64, 27,209,211,240,240,240, 26,125,248,232,209,163,170,186,182, 99, 87, 40, 20, 66,133, 66, 49,240,244,233,211,249, - 41, 41, 41,234, 55,222,120, 35,226,203, 47,191, 20, 87, 84, 84,216,183,105,174,170,170, 66,147, 38, 77,114, 38, 76,152,208,125, -200,144, 33,143,184, 81, 36,120,132,144, 78,167,211,182, 20,101,239, 89,112,121,193,162,248,118,219,151,180,199,249, 66, 1, 74, - 43,248,176, 16,160,184,194, 0,218,162,107,213,252,119,150,245,122,230,249,127,189, 6, 55,241, 4, 54,247,127, 13, 87,191,155, - 99, 14,141, 64,254,181, 77, 1, 80,182,174, 28,185, 92,238,238, 33,234,108,253, 91, 93,109,223,215,230, 29,112,251, 79,123,181, -108,163,210, 80, 35, 68,197, 26,136,127, 59, 0, 34,224, 1, 85, 6,208,114, 29,136,201, 4, 33, 0, 51,181,160,202,108, 66,185, -201, 0, 88,220, 91, 81, 76,144,223,170,119,107,213,105, 97, 13, 18,108, 16,133,149, 56, 4,242,185,125, 1,238,178,254, 1,252, -242,122,187, 26,231, 3, 23,230, 65, 72,111,195, 72, 90, 66,169, 84, 30, 96,251, 98,137, 43, 84, 8,250,232, 39,220,122, 35, 22, -183, 53,190,104,111, 60, 11,179, 57, 15, 0,112,229,100,219, 70,235,176,137,187,191, 80,189, 58, 74, 81,131,252, 25, 68, 4, 46, -198,224, 94,227, 17, 25,116, 22,137,187,151,170, 60, 25, 68,134, 13, 27, 70, 83, 82, 82, 80, 92, 60, 2, 45, 90,236, 71,147,150, -189, 65, 41, 5,143,199, 99, 21,136,148,159, 15,228,229,157,177,157, 85, 0,226, 10,104,116,192,160, 65,214, 43, 57, 57,192, 87, - 95, 1,229,101,128,174, 2,168,208, 1,254,129,101,172,202, 86,155,181,159,155,155, 11, 0,248,228,147, 79, 0, 0,161,161,161, -247,194,205,204,170, 14,231,206,157, 91,195, 98,119, 38,110,214,222, 29, 27, 97,219,231,253, 29,240,217,103,159, 97,205,154, 53, - 80, 40, 20, 18,119,193,117, 51,130, 67,145,125,246, 28, 10, 3, 3, 85, 60, 30, 15,115,230,204,185, 43, 38,195,147,242, 61, 89, -221, 28,212, 82,129, 87, 63,121, 23,125,198,143,135,226,147, 79,192,227,221,225, 57, 69,206,153, 59, 30,194, 67,135,176,111,223, - 62, 92,186,116, 73, 42,151,203,213,108, 54, 94,113, 36,255,180,180, 52, 21, 0,100,100,100,168, 34, 35, 35,165,105,105,105,234, -240,240,112, 73,122,122, 58, 34, 35, 35,165,149,149,149,170, 90,198, 92,227,180,105,211,250, 76,153, 50,165, 89,151, 46, 93,176, -107,215, 46,125,105,105,169,160,178,178,210,234,237,176,205,127,108,221,186, 53,116,244,232,209,190,114,185,188,210,133, 24,158, - 3, 89,243,242,178, 78,174,249,224,237,233, 77, 90,116, 83,226, 79,229, 43,248,235, 42, 65,254, 77, 1, 64,121,168, 54, 24,161, -161, 45, 10,103,207,152, 21, 65, 8, 41,100,198,124, 79,126,175, 11, 15, 1, 55, 85,240,128,160, 86, 45, 46, 37, 37,229,174, 79, - 73,161, 22, 37,133, 90,143,218,154,249,220,177, 98,173, 13, 47, 62,118, 25, 62,103, 10, 33, 40,208, 50, 30,128, 26,207,215, 38, -240, 92, 65, 62,142,221,190,134,179,151,242,112,243,210,101,148, 93, 46, 64,249,213, 66,152,244,149, 48, 26, 77, 40, 55, 27,160, - 55,155, 80, 77,205, 48,131,130, 18,246, 74,166, 99,180,255,133, 92,235,249,130,101,140,229,207, 67,252,187, 13,179,226,197,211, - 56,128, 56,165, 22,113, 74,109, 13,194,103, 62,145,113, 25, 16,210,219, 16, 80, 45,126,153, 97, 54,177,158, 2,184,121, 12,102, - 93, 19, 0,192,127, 5, 1,168,190,121, 5,153,159,182, 67,246,207, 99,113,236,211,126,200,201,186,214,168, 29,179,239,160, 16, -232,180,128, 78, 11,232,125,207, 1, 0,126,253,208,136,183,231, 45, 1, 0, 12,137,238,229,177,229,255,194,176,131,208,104,162, - 17,120,116, 63, 86,191,107, 85,114,135, 13, 27,198,202,245, 15, 0,203, 63, 94, 74,186,118, 5, 28, 63, 23, 46, 88,221,255, 0, -208,173, 27,197,154, 53, 64,167,238, 21,120, 44,226, 22, 6,141,184,133,231, 95, 50,178, 46,163,163,197,207,156,135,134,134, 34, - 52, 52, 20,115,230,204,105,232, 42,118,251,174, 57, 98,221,186,117, 82, 87,132,109,247,162,173, 90,133,117,235,214,177,178,132, - 95,123,237, 53, 21, 19,249,239, 10,243,231,207,191,203, 11,224, 10, 7,207,229, 99,250,140,217, 56,190,113, 35, 22, 45, 90, 84, -171,114,194,148,111,255,254,253,168, 43, 96,111,216, 99,143,224,251,239,190, 66,216,228,201, 88,190,124, 57,234, 42,227,188,121, -243, 48, 98,196, 8,120,179, 2, 32, 45, 45, 77,229, 16, 44,135,163, 71,143,170, 0, 32, 61, 61, 93, 69, 8, 65, 90, 90, 90,157, - 50,245,122,125,243, 29, 59,118,224,220,185,115,200,201,201,241,211,233,116, 48, 26,173,253,204, 96, 48, 96,247,238,221,196,166, - 44, 84,178, 40,142,165,186,186, 90,116,124,203,100, 84,101,127,129, 61, 41,185,184,116,157,143, 50, 29, 15,102, 10, 20,234,124, - 49,123,193,187,145,177,177,177, 5, 44, 12, 62,187, 94,193, 44, 57,101, 57, 29,192,161, 17,172,255,218, 20, 0, 2,128, 72, 36, - 18, 72, 36, 18,156, 58,117,202,254,201, 59,118, 5,165,149,165,104, 49,200,243,117,191,199,143, 31, 39, 0,224,231, 55, 5,226, - 99,151, 33,188, 82, 12, 74, 8, 68, 51,138,107,220,119, 75, 92, 34, 62,204, 20, 40,208,149, 32,191, 84,131, 91,101, 90,148, 86, - 85, 65,107,168,196,173,234, 74, 92,175,210,163,176,170, 2, 26, 99, 53,180, 22, 35, 12, 22,247,193,175, 79, 62,225, 98,192,115, -136, 11,120,117, 98, 19, 80,136, 64, 61,222, 6,252, 78,244,190,139,107,172,145,127,179, 10,251,143,107, 49,112, 97, 94,205,186, -160,183,225, 99,185, 2, 31,203, 21,124,240,148, 0,249,249,249, 6,182, 50,183, 92,178,160, 85,124,130,253,252,146,206,140,130, -220, 66,100,165,158,197,141,203, 37,141,222,113, 55,126,157, 2, 0, 40, 43,162,240,171,124, 12,146, 25, 2,252,191, 37, 66,251, - 39, 62,113, 50, 8,123,227,159, 62, 55, 52, 5,175, 44,176,146, 63, 33, 4,191,167, 90,155,128,237,154,127, 6,161, 61,186,215, - 44,231, 70,224,203, 47,129,139, 23,173,158,128, 15, 63,164,118,247, 59,165, 20,129,129,129,238, 71, 96, 91, 31,101,230,253, 63, -249,228, 19,228,230,230, 34, 59, 59, 27,217,217,217, 72, 78, 78,198,155,111,190,137,252,252,252, 70,107, 15,134,232, 92, 89,210, -115,231,206, 5, 33,132, 53, 25, 18, 66, 80,151, 50, 81,215, 61, 71, 28,242, 41, 1,225, 53,193,183,239, 44, 67,147, 29,201,136, -137,137,193,100, 70, 27, 3, 32,239,214, 27,115,195, 6,195,207,207, 15,195,134, 13,195,123,239,189,135,228,228,100,213,242,229, -203, 93,190,127,223, 21,102,227,122,175,199, 16, 28, 28, 44,181, 88, 44,117, 42, 20,117,221, 99, 65,142,118,143, 83,100,100,164, -212,129, 40, 17, 17, 17, 33,117,227, 61, 25, 62,108,216,176,102,249,249,249, 56,116,232, 16, 30,125,244, 81, 8, 4, 2,251, 20, - 71,112,112, 48,219,233, 8,139,237,255,146,174, 61,250,199,173,219,219, 28,127,237, 90,130, 39, 35,123,194, 95,204,131,191,159, - 25,190, 62,213,120,250,185, 9, 22, 0, 26,199, 47, 38, 36, 36,184,155,139,178,175, 2, 96, 57, 29,192,225, 65,243, 0, 0, 32, - 10,133,162,233,220,185,115, 49,119,238, 92, 0, 48,124, 28,251, 49,140, 69, 38,248,250,138,225, 77,227,201,100,214,240, 97,191, -167, 46,130,242,121,120,239, 87,189,163,245,207, 10,126,193,193, 82, 83, 19, 63,104,169, 25,231,116, 90,156, 41, 45,198,217,178, -219, 56, 91,166,193, 57,157, 6, 23,245, 90, 20, 87, 87,161,194,100,194, 53,189,206,254, 63,235,194, 11,163, 8, 86,189,203,199, -170,119,249,160,224,131, 18, 30, 98, 38, 17,188, 54, 73,132, 25, 19, 91,161,107,215, 54,176, 64,232,241, 79,102, 92,253,142,243, -242,117, 36, 5,170, 77,134, 52,167,192,170,200,103,174,176, 6,209,237,121, 43, 0, 0, 32,160, 90,240,169, 14,213, 60,107, 68, -179, 70,163,241,147,201,100,209,158,148, 49, 44, 44, 12,201,201,201,216, 88,161, 67,165,129,135, 87, 54,125,139, 34,177, 47, 42, - 13,141,183, 77,196,184,190, 31, 72,211, 52,203,176,241,199, 68,251,181, 95, 63, 52, 34, 34,112,177,253, 60,230,153,175,164, 20, -172,214, 15,211,213,139,129,105, 11, 70,160,249,209,100, 72, 63,141, 2,111, 44,160, 86,171,189,234,195,157, 58,213,140, 30, 31, - 62, 28,104,222, 28, 8, 9, 1,194,251, 54,133, 88,196, 7,159,119, 71,172,216,215,215,237,128,204,227,241,236,150,127,110,110, -174,221,234,103, 62, 31,125,244, 17, 62,250,232, 35, 92,187,198,222, 43,227,106,190,190,230,125,207,173,175,117,235,214, 73, 87, -175, 94,237,146,176,217, 90,255, 14,174,231,187,226, 20,152,115,139,133, 93, 10,123, 3, 33,176,232,171, 33,108,219, 9,242,165, - 75, 49,205,191, 57,154,171,211,236,247,103,252,107, 26, 62,248,239,183,200, 89,245, 11,222,239, 51, 28, 19, 2,187, 96,223,182, -109,200,203,203,115,249,254, 61, 31, 43, 71,175,222,189,165, 22, 91,153, 24,133,204,113,122,198,213,181,218, 48,115,230, 76, 74, - 8,161, 76, 96, 31, 51,223,239, 72,242,105,105,105,234,136,136, 8, 41,165, 20,204, 84,128,155,122, 75, 17, 10,133,143, 62,255, -252,243,185,165,165,165,208,106,181,240,245,245, 69,171, 86,173,208,188,121,115, 52,111,222,220, 93,229, 89,156, 20, 59,179,143, -143,143,254,197,216,207,165,235,143, 13,196,229,171,101,104, 19,192, 71,100,119,130,199,187, 80,248, 55,107, 86, 2,192, 92, 7, -111,112,251, 13, 60,164,214, 63,224,102, 25,160, 92, 46,175, 80, 40, 20, 62, 0,252,229,114,185, 93, 11,236, 16,213,222, 43,205, -151, 89,234, 39,147,201,168,104,134, 61,242,159, 56,204,255,187, 29,144,223,217,153,168,254, 36,250, 57,232, 77,213, 40,211,233, -145,107, 52, 66,104,177,126,185,212, 88, 5, 11,165,160, 0,118,221,188, 4,157,201, 8, 0, 44, 6, 38,130, 5,203,106,246,113, -107, 60,128, 5,102, 84,227,252,197,114,124,191,185,204,163, 31,235, 72,244, 54,151, 63,181, 29,219,137,157,205,234, 7,235,119, -149, 16,142,248, 26, 64, 8,138,139,239, 4,231,137, 44,215, 97,224,181,195,236, 62,217,184,126,221,110, 57,237,103, 83,190,216, - 95,215,213, 80,188,148, 74, 37,152,210,108, 58,125, 4,209,209,209,141,214,113,183,159,178, 46,239, 75, 77, 62, 11, 0, 24,220, -203,154, 25,239,237,121, 75,112,228,108, 47,252, 55,113, 50, 20, 59,102,177,158,255,127,101, 65, 52,130,130,146,109,103,106,155, -178, 20, 13, 74,173,214, 24, 64, 17, 20,148,204, 74,214,190, 61,123,237, 57, 45, 38, 79, 6,164, 82,130,219, 87, 3,160,211,138, - 81, 89, 38,194,166, 13, 4,115,231, 82, 92, 41, 42, 71,120,100, 4, 82, 14,168, 88, 89,197,102,179,217, 62,223,159,156,108, 45, -171, 35,225, 23, 21, 21,161,168,168,136, 53,255, 59, 16, 6,229,241,120,119,145, 42,165, 32,158, 38, 1,146,203,229,234,215, 94, -123,173, 70, 44, 0,227, 17,240,196, 21, 78, 28,180, 18,139,211,178, 2, 66,216,207,217, 17, 66, 96, 42, 47,135,176,101, 16,248, -126, 77,208,235,197,241,248,104,212, 72,188,195, 44,219,235, 63, 0,230,202, 42, 8, 91,180, 65,159, 8, 9, 58,119,232,130,207, -207,167,161,119,239,222,210, 99,199,142,221,165, 4,196,202,229, 0,136, 10, 0,102,197,198,218,151, 14,154,156,200, 94, 32,224, - 3,244,206, 66,197,218, 10,188,118,237, 90, 2,128,218, 92,252, 36, 35, 35,195,165,139, 63, 45, 45, 77,205,134,252, 19, 18, 18, - 8, 33,100,113,243,230,205,123, 69, 68, 68,116,189,112,225, 2, 78,156, 56, 1,179,217, 12,127,127,127,232,245,250,162,160,160, -160,203,158, 24,125, 10,133,130,215,166, 77,155,125,207, 61,247, 92,155,163,135, 51,176, 70,185, 15,205,136, 8,221,219, 84,227, -226,109,127, 12,237,110,188, 4,192,121, 30,203, 92, 87,155, 56,102,156, 34,132, 56,158, 58,231,125,225,208,200, 16,176,120,233, - 13, 0, 12, 14,131, 10, 45, 72,241,120,126,184, 6,185,215, 66,124,172, 51, 6,150,105,180, 82,163,159, 88, 85,202,179,224, 70, - 85, 5, 96, 52,194,108, 91,215,116,190,162, 4,133,250, 50, 80, 74, 97,203, 47,160,102, 83,188,152, 73, 4,235, 54,221,233,147, - 23,114,129, 30, 93, 77,224, 67, 87, 47,242,119,234,236,238,234,160, 86, 47,128, 82, 57, 75, 5,100, 66,163,209, 24,242,243,243, - 5, 43, 71,130, 23,183,111, 24,230,245, 62, 98,183,194,216, 42, 21,174,188, 46,206,231, 12, 9,177,181,230,176,132, 96,160,109, - 37,135,171,229,126,137,137,137,214, 76,128, 50, 25,101,147,243, 33,118,220,215, 82,197,246,217,170,180, 68,138,200,160,179, 24, - 18,221, 11,135,247,157,197, 81,237, 82, 16, 16,200,199,125, 37, 77,216, 62,155, 85,249,130,130,146, 65, 8,193, 11, 47,188,128, -111,190, 41, 3, 67, 49,214,191,148, 81, 8,104, 77,203,254,118,173,242,162,134, 75,165, 41, 7, 84,170,225,195, 1,195,141,142, -184, 90,226, 3,139,109,182,181,157,174, 13,222,138, 41,199,190,163,221,209,180, 67,119, 41,147, 37,176, 46, 48,196, 95, 80, 80, - 0, 0,184,113,227,134,221, 51,112,243,230, 77,251,192,234, 37,136,131,219,217,249,165, 36,108,242, 1, 56,226,155,111,190,145, -174, 89,179, 70,197, 40, 0,171, 87,175,246,216,250,119, 38, 12,111, 33, 22,139,113,227,202,101,116,233,218, 13, 22, 83, 53,136, -201, 12, 65,211,102,104, 58, 96, 32,154,244,127, 2, 22,157, 9,102,125, 53,168,201, 12,152, 45,136, 91,251, 95, 76,156, 60, 17, - 98,177,216,165, 60,211,166, 64, 86,255,215,213,115, 97,203, 93, 63, 27, 25, 25, 41,181, 41, 0,148, 82,138, 33, 67,134, 72, 83, - 83, 83,239,122,206, 29,249,219,234,202, 2, 96,119,247,238,221,251,127,241,197, 23,134, 91,183,110, 85,141, 28, 57,242,185,204, -204,204,247,245,122,125,113,203,150, 45,229,159,127,254,185,134,109,253, 41, 20, 10, 33,128, 71, 34,194,195, 91,197,206,136,197, -165,130, 75,154,169, 51, 98,159, 76,223,183, 33,254,122,185,102,240,192,168,145,150, 54, 29, 66,255,159,179,149, 95, 87,106, 97, - 91, 31, 35, 14,250, 39,113,193, 1,206,199, 28, 30, 84, 5,160, 46,235,194, 27,242,103,200,166,150,132, 49,172,148,128, 21, 39, - 14,170, 1,144, 73, 3, 34, 41,124,197,208, 82, 19, 12, 38, 19, 44,212,130, 22, 1, 1, 40,208,149,194,147,228, 66,174,150,247, -221,137, 1,240,108, 45,182, 43, 23,127,125,211,245,218,242, 8,140, 27, 56,112,224,246,184,184, 56, 81, 80, 80,144,229,250,245, -235,152,215,251,186, 51,249,179,254, 31,181, 37,236,241, 10,182, 44,127, 46,146, 60,221,245, 12, 91, 36,108,159,165, 6, 64,198, -246, 89, 34,217,121,250, 67, 85, 90, 34, 64, 64, 48,174,239, 7,210,237,167, 62, 80,179, 37,127,166, 47, 21, 23,143,160, 64, 25, - 99,253,194, 21,239,172,143,223,207,244, 7, 82,215,230, 26, 54,171,158, 20,107,123, 75,204,229,229, 42,194, 7,244, 85,190, 32, -229, 38, 8,120, 2,232,121, 98,233,168, 9,175, 98,118, 76,172,219,246, 72, 74, 74, 34, 73, 73, 73,244, 30,190,127,160,148, 18, - 66, 8,117,140,104,119,244, 4,120, 34, 75, 46,151,171, 99, 98, 98, 48,111,222, 60,187, 66,209, 88,169,112,135, 15, 31,142,217, -137,235,240, 81,121, 9,250, 69, 13, 5,175, 77,160,181, 76, 70,106, 77,221, 11, 33, 8, 95, 0, 34,226,227,155,132, 85,104, 54, - 98, 32,186,118,237,234,113,212,126,125,224, 96,221,171,194,195,195,165,169,169,169,245,170,171,220,220,220,232,253,251,247, 95, -225,243,249,219,158,124,242,201,143,103,205,154,117,107,237,218,181, 41,128,117,202,193, 3, 81, 60, 0,201, 39, 78,156, 24,244, -195,250, 13, 60, 17,223,231,234,248,151,198,247,157, 61,123,182,246,235,175,191, 30, 11, 32,192, 70,252,229,204, 6, 65,108, 60, - 10, 28, 30, 12,176,113,255,123,171, 0,212, 91, 97,112, 67, 62,172, 7,164, 77, 39,210,136,108,188, 76, 98,201,202, 81,233,170, - 13, 48,153,205,232, 58,104, 0, 66, 77,225,158, 18,110,131, 5,163, 48, 73,127, 0,168, 24,107,220, 22, 7, 80,175, 28,248, 74, -165,114,135, 66,161, 16, 36, 39, 39, 47, 88,185,114,229,167, 14,202,197,112,199,255,197,214,163, 0,160,193,146,151, 76, 56,207, -196, 89,212,254,251, 38,156,151,121,165,233,239, 60,253,161,154,105, 31, 10,138,237,167, 62,240,170,140, 86,114, 39,120,101,193, -240, 59,102, 47,185,115,111,193, 50,207,243,145,199,189,117, 70, 29, 7,144,181,223, 44,150, 84,234,173,251, 0,220,201,255, 31, -235,241, 59, 98,179,200,204,114,185,188,193,231, 85, 25, 37,160, 33,100,217, 98, 1, 84,204,113, 3,148,205,171,239,117,237,218, - 21,109,231,204,145,174,217,187, 87,149,247,241,111,144, 9, 91,160,185,109,243,158, 74,189, 9,115,223, 92, 4,190, 95, 16,118, -109, 80,224, 84, 75,130, 81,131, 7,123,157,183,223,108, 54,121, 61, 76,176,117,241,179, 80,190,200,243,207, 63,127,139, 82, 26, -223,163, 71,143,255, 21, 23, 23,235,188, 32,126,199,122, 31,150,145,145, 1,139,137, 96,240,144,190, 31,204,158, 61, 91, 11, 0, -179,102,205,178, 0,208,214,167, 73, 29, 60, 78, 53,142, 93,120, 69, 57, 60,100, 30,128,123,162, 20,120, 77,140, 73, 53, 18,236, - 32, 35, 55,171,209, 43,213, 41,233, 15,115,173,222,114,229,114,185, 25,192,127,108, 31,175,229,186, 42, 95, 61,127, 47,105,136, -103,238, 37,172, 4, 79,177, 96, 89,114,131,203,118,151,234,215,131,246, 53,222,203, 58,104,168, 77, 87,228,114,185, 90, 46,151, - 55,136, 44, 82,143, 57, 0,166, 12, 10,133, 2,182,237,123,145,239,176,125,111,234,254,125,246,237,123, 71, 68,140,128, 77,233, -173,245,255,241, 39,106,137,121,115,224,221,196,196,114, 55, 65,119, 74, 64, 67,212,215, 19, 79, 60, 81,109, 50,153, 82, 0,232, -222,123,239,189,122,145,104,108,108, 44,121,239,189,247,168,193, 96, 0,128,189,181, 61,183, 98,197, 10,178,112,225, 66,251,255, -178,165, 2,174,115,108,119, 14,238,228,112,127,193,214,195, 69,188,221, 71,152, 3, 7, 14, 28, 56, 52, 10, 76, 0,170, 0,136, - 27,216,136,115,183, 99, 32,235, 29, 5, 57, 60, 28,224, 26,147, 3, 7, 14, 28, 30, 46, 8, 0, 52, 97, 65,254,122, 88, 3,184, - 27,138, 15, 44,224,150,253,253,237, 58, 18, 7, 14, 28, 56,112,248,251,193,143,227, 11, 14,156, 7,128, 3, 7, 14, 28, 56,112, -224,192, 41, 0, 28, 56,112,224,192,129,195, 63, 29, 53, 92, 58, 39, 79,158,244, 58, 34,215, 85, 48,225,131, 46, 47,100,128, 15, -124,125,110, 64, 40, 42,129,197, 98, 93, 22,198,231,243,192, 35,124,235, 95, 30, 1, 33, 60, 80, 34, 0, 33, 4, 60,152,176,125, -167, 16,148, 82, 4,241, 90,192,147,242,217, 50, 42,182,132, 53,128,167, 28,214, 4, 3, 70,102,201,215,195, 88,127,156, 60, 78, - 30, 39,143,147,199,201,123, 48,229,113, 30, 0, 55, 56,120,248, 34,180,165, 90, 24,141, 20,183,110, 19,236, 73,246,197,222,125, -254,224, 17, 33,246,169,218, 98,239,129,118,216,171,106,135, 67,199, 90, 65, 0, 1,120, 16, 99,104, 36, 15, 62, 34, 31,214,255, - 99,210, 43, 83,233,164, 87,166,210,195,169,170, 42, 35,143,164,158, 61,147,121, 80,117,228,176, 46, 57, 57,185, 10, 64, 83, 78, - 7,125,248, 49,242,169,161,146, 89,179,166, 82, 79, 55,121,122, 88,161, 80, 40, 36,212,134,186,118,215, 99, 11,234, 4,174, 71, -113,224,208, 8, 30, 0, 6,131,135, 12, 98,253, 18, 30, 73,205,112,171,181, 52,180,188,134, 68, 70,166, 16,163, 71,154,113,234, - 47, 95,136,132, 2, 8,248, 2, 8,133, 20, 62,124, 35, 32,104, 10, 1, 42, 49,168,151, 9, 98,145, 15, 40,128,118,109,128,103, -199, 88,176,127, 27, 59,242,191,120, 62, 27,143, 62,214, 21,237,131,155,163,224,202,133, 78, 1,109,187,160,101,123, 51,254,248, -253,119, 36, 39, 39,151,160,145,119,196,146,201,100, 99,148, 74,229, 78,135,243,103, 28,207, 57,212,142,217,179,100,212, 84,117, - 86, 58, 40, 44, 80,101,177, 20,163,180,125,165,170, 67,219, 17,168,168,110,135,111,214,253,244,183,221,233, 44, 38, 38, 70, 53, -111,222, 60, 16, 66,176,122,245,106, 85, 67,228, 4, 96,210, 1,112,252,127,255,225,145,210, 69, 41, 8,143, 87, 87,123, 83,199, -246,100,218,244, 78,242,173,154,237,236,184, 51, 34,135,134, 5,147, 13,208,193, 75,192, 78, 1,104, 44,240,238, 51, 23,142, 25, -101, 4, 5, 31, 2,190, 16,131,195, 9, 90,183,226, 65, 32,224,193, 71,200, 71,143, 80, 30,174, 92, 53, 97, 80, 24, 15, 45,130, -196,248,227, 64, 51, 0, 0,159, 86,130, 82, 11,220,165, 8,158,244,202, 84,250, 87,102, 38, 58,183,239,128,191,210,142, 34,221, - 96,132,246,182, 22, 34,159,166,232,217,127, 8,250, 14, 25, 5,213,118, 37,100, 44,115,227,223, 3,226, 31,174, 84, 42,247,135, -132,132, 32, 51, 51,147,233, 48, 37, 0,230, 40,149,202, 29, 50,153, 44, 90,169, 84,238,255,187,189, 20, 51, 99,101,212, 71,160, -129,128,103, 64, 85,149, 25,165, 58, 95,252,248,243,126,143,234,127,196,200, 33,146,102,190, 26, 12, 31, 34, 66,231, 78,207,170, -154, 53, 11,128,209,100,194,173, 91,183,209, 38,255, 42,114,114,243,240,202,203, 99,232,134, 31,118,121,213,174, 97,182, 61, 21, - 0,246,219,100,223, 79,235, 31,184,179, 29,238,234,213,171,161, 80, 40, 36,141,149, 14,248, 62,190, 47,116,203,150, 45,119,239, -167,208, 72,228,165, 80, 36, 72, 8, 8, 98, 26,160,222,105,254,175, 32,233,175, 58,114,188, 45, 75,166,125,223, 43, 59, 94, 77, -208,185, 85,228,254,248,227, 15,251,249,232,209,163,177,123,247,238, 58,207, 57,220,123,242,119,188,230,168, 8,212,169, 0,164, - 30, 78,199,144,161,225,247,173,208, 22,207,178, 67, 58, 62,236,213, 75,200, 19,240,161,213, 8,208,182,181, 16,109, 91,139, 80, - 81, 33,132, 88, 40,128, 89,224,131, 1,125, 8,250, 61,206, 7,143, 8, 65, 8,129,143, 80, 4, 33,175, 26, 68, 44,130, 73, 15, -152,160,171,147,252, 15, 31,216,143, 46,237, 90,225,204,169, 51,200, 47,186,126,167,124,229, 21, 16,159, 61, 70,121,124,130, 1, - 97, 3,240,199,110,207, 56,118,237,218,181,146,204,204, 76,213,197,139, 23,225,235,235, 11, 95, 95, 95,233,214,173, 91,213, 30, - 14,102, 82,165, 82,185,159, 33,126,135,206,209, 28,192,168,111,191,253,246,246,171,175,190,154, 44,147,201, 70, 42,149,202,228, - 7,177,131,135,135,135, 75,210,211,211, 89,255,110,201,240,193,146,222,161, 77, 85, 29,218, 21, 33,160,153, 15,120, 60, 63, 84, - 86,154, 80,172,169,196,100, 89, 79, 42,110, 54, 0,223,127,247, 51,171,126, 36,196, 13,188,240,204,227,170, 94,189,122,226,250, - 13, 45,142,255,121, 2, 21, 21, 58, 4, 4, 52, 69, 72, 72, 39,240,248, 66,152,205,249,136,157, 57,149, 38,172,253,241,111,101, -221,196,196,196,168,230,207,159,111, 63,159, 55,111, 94,131,121, 1, 30,100, 15,128, 82,169, 36, 50,153,140, 38, 37, 37,193,213, -198, 74,247,219,104,151,203, 99, 65, 8,193,186,117, 10,105, 76, 76,253,148, 0, 94,167, 23,237,228,157,177,188,137,203,193,180, -109,115, 30,130,131,120, 15,109,251,253, 83,225, 72,246,174,148, 2,183, 30,128,212,195,233, 0, 80,111, 69,224,240,156,156, 58, -239, 15,253,188,155,215,131,133, 67,142,115,143, 6,161,100,117,107, 8, 5, 66,116,108, 95,129,242,114, 33,142,159,233, 8, 62, -159, 15, 62,225, 67, 36, 52,161, 87, 55, 61,186,119,227,131,128, 7,145,208, 7, 34, 62, 65,216,227, 6, 4, 5, 90,176,241,127, -117,203,238,217,165, 13,174,228, 22,213, 36,127, 27,242,175, 93, 33,132, 39,160,237, 34, 31, 71, 96,243,166, 40,209,222,102, 85, -222, 53,107,214, 72, 86,172, 88,161,186,114,229,138,227,101,213,152, 49, 99,176,107, 23,123,107, 83,169, 84, 30,112, 36,127, 23, -104, 25, 31, 31, 95,242,198, 27,111,236, 67, 35, 79, 81,212, 65,254, 42, 79,202, 22, 26, 18,164, 10,110, 83,134,150, 45,252,209, - 33,184, 45,252,252,253,112,229, 74, 33,204,102, 11,130,219, 55,197,217,243,105,136, 28, 58, 72,146,118, 56,163,206,193,244,245, -215,167,210,199, 67,181,120,228,145, 14, 56,119,254, 10,142, 31, 63,143, 91,183,203, 65, 41, 16, 24,232, 11,189,190, 2,253,251, -247, 66, 73, 73, 41, 10,143,255,137, 33, 79,134, 75, 82, 15,177, 87, 84,107,134, 60,189, 0, 0, 32, 0, 73, 68, 65, 84, 30,100, - 48,214,191,109,219,105, 48,158,128, 53,107,214,120,236, 5, 96,166,251,157, 51, 1,187,216, 78,182,222,253,175, 67,135, 14,180, - 99,199,142,245,206,197,175, 84, 42,201,132, 9, 19,104, 98, 98, 34,152,141,149,234, 34, 60,219, 86,184,119,149, 63, 50, 50, 82, -194,108, 14, 84,139, 18, 75,221,200,180,255,111,185, 60, 86, 85,159,119,212, 89,222,160, 69, 21, 56,182,188, 73, 13,226,231,240, -112, 90,255,206, 46,255,122, 77, 1,212, 87, 17, 24,250,121,183, 90,149, 0,111,200,159, 65, 74, 74, 10, 10, 11, 11, 1, 0,193, -193,193,212,147,151,129, 79, 43, 33, 32,102,136,132, 66,252,121,166, 21,248, 2, 1,154, 10,117,214, 56,128, 38, 60, 20, 22, 54, -197,227,189, 44, 32,132, 64,246,172, 9,212,194, 3,136, 15, 8, 40,172,129,252,174,161, 47,185,138, 27,154, 10,100, 23, 22,214, - 90,150,146, 82, 13,180,183,110,216,100,177, 30,128,156,201, 31, 0,176,107,215, 46, 60,245,212, 83,146, 61,123,246,184, 29,224, -100, 50,217,240,188,188, 60,151, 29,166,180,180,212,241,114,243, 37, 75,150,224,220,185,115, 35, 30,164,169, 0, 7,242,103, 13, -201,240,193, 18,177,224, 58,124,125,155, 67,236, 35, 66,151, 46,157,209,177,115,103,148,149,169,161,209, 84, 64, 36,226, 35, 40, - 80, 12,129,111,115,183,131,169,128, 22,162,105,147, 22,208, 87,154,112,230, 76, 14,174,221, 40,197,245, 27, 21,168,172, 22,227, -145, 96, 19,196, 62,124,228,100,231,225,209,174, 93,113,237,122, 25, 42, 77,205, 88, 13,208,142,110,255,218,174,123, 58, 29, 80, -155, 76,111,100, 49,214,255,188,121,243,238,186, 62,127,254,124,175,188, 0,174,118, 39,116,158, 59,110, 40,175, 66, 90, 90,154, -170,190, 27,242, 76,152, 48,129, 42,149, 74,200,100, 50,184,154, 14, 96,227,169, 98,200, 31, 0, 50, 50, 50,238, 42,147,237,190, - 91,163,135,217, 97,176,161, 60, 46,137,243,253, 49, 97,181,206, 37,241, 7, 7,241,108,163, 20,187,230, 29, 61,122,116, 13, 47, -201,211, 79, 63, 93,163,174, 56,183,255,131, 3,143, 99, 0, 26,202, 35,208,144,200,201,177, 42, 22,133,133,133, 30, 41, 1, 2, -129, 0, 66,190, 16, 66, 33,193,176, 33,128, 94, 87,141, 75,185, 34, 8, 5, 66, 8,204, 2, 68,132, 83,136,132, 66,240,249, 60, -128, 18,104,180,192,177, 19, 2, 88, 44, 22, 0,183,106,149,123,226,207, 92, 84, 84,212,158,129,179, 75,219,182, 84,103, 34,168, -172, 44,133,217, 98, 98,253, 59, 79,156, 56, 81,187,210,161,215,179, 34, 26,103,215,191, 43,205,112,251,246,237,142,207, 39, 55, -134, 23,192,149,139,223,145,252,109, 3, 32, 59, 11, 48,184,141,138,199,187, 10,147,217, 2,131,209,132, 91,183, 53, 16,138,196, -168,174, 54,194,104, 50,195,100,178,192,100,166,172, 60, 49, 34,161, 14, 98,223, 14, 40, 46, 46, 69, 89,185, 30, 26,109, 37,154, -181,232,139,193,143, 63,142,140,212,221,104,111, 48,161,180,172, 20,221,187,119,133,143, 72, 0, 93,185,230,111, 49, 80,216, 34, -255,237,115,255, 78,158, 41,175, 98, 1,230,205,155, 87,195,155,224,124,143,173, 2,160,209, 68,219, 31,140,141, 13, 66, 98, 98, - 98,141,254,202, 24, 8,249,249,249, 94,239,202, 41,147,201,104, 98, 98,162,125,155,241,218, 98, 2,156,201,213,217, 83,149,150, -150,166, 98, 2,223, 40,165,244,232,209,163, 53,238, 31, 61,122, 84,229,206,233,193, 40, 13,140, 18,224,104,197,215,102,232,187, -249,109, 24, 31,153,140,205, 0, 38,174,214,225,137, 69, 21,245, 82,190,156,231,248,221,197, 4,112,184,247,222,128,218, 60, 0, -247,213,191,227,202,210,175,143,245,239,100,177, 34, 39, 39,135, 25, 80, 88,245, 94, 62, 95,128,136, 65, 22,240,121, 2, 28,203, - 20, 35, 43, 71,140,177, 79, 1,207, 60, 13,140, 27, 77,208,174,141, 8, 98,145, 15,196, 34, 31,248,138,125, 16,220,206, 7, 98, -145, 24, 98, 55,203, 0, 11,242,175,146, 18,205, 77, 82,219, 64,210,181, 75, 39, 4, 52,247,135,216, 98, 64,133,222,120,223, 59, -197,225,195,135,247, 31, 62,124,184, 6,225, 59,126, 0,160,184,184, 24,227,198,141,107, 52, 43,223,102, 29, 73,156,175,217,142, - 61,178,228,204,102, 64,167, 55, 66,167, 51,160,172,172, 26, 55,111,106,113,237,218,109,148,151, 87,163,162,194,136,138, 10, 3, -116, 58, 35, 74, 75, 74,221,202,170,174, 54,161,170,202, 12,163,209,128,166, 77, 69,232, 24,220, 12,126,254,254, 0,128,144,174, -157,209,161,125, 51, 4, 52, 19,131, 82, 51,140, 38, 11,170,171,117,127,139,129, 36, 38, 38, 70,181, 96,193,130, 58,201, 60, 38, - 38,134,181, 69,106,219, 82,184,214,251,171, 87,175,198, 55,223,124,227,241, 86,195, 14,219,206,218, 63, 12,161, 22, 22, 22, 50, -187,103,122,196,110, 19, 38, 76,160, 73, 73, 73,112, 84, 30,148, 74, 37, 25, 63,126,124,157,223,155, 57,115, 38, 8, 33, 96,250, -113,120,120,184, 4, 0, 34, 34, 34,164, 12,145, 51, 86, 63,115,159, 82,106,191,207,226,215,214,176,226, 93, 41, 14,108,102, 80, - 90,182,108, 9,226,160, 37,212, 87, 30,135, 7,143,252, 93,157,123,229, 1,120,144, 44,255, 59, 3,188, 25,124, 62,223,227,239, - 13, 25,100, 65,235, 86, 62, 40, 43, 19,192, 71, 96,130,143,136, 15,117,186, 8, 99,165, 66,136,132, 66,148,149, 9,145,154,233, -143,102, 98, 2, 30,143,135,209,209, 6, 60, 55,150,130,199,163, 88,122,210,243,114,202,100, 50,202,247, 19, 67, 35,108, 9, 63, - 99, 1, 46, 22, 82, 12,151, 12, 99,189,165,111,255,254,253,113,228,200, 17,151,247,252,252,252, 88, 15,150, 90,173,118, 4, 0, -172, 95,191, 30,211,166, 77,179, 95, 47, 46, 46,182, 31, 79,155, 54, 13, 69, 69, 69,141,210,158,233,233,233,106, 66, 8,152,121, - 82, 30,143, 7,198,221, 89,199,188,105,173,200,191,122, 77,218,170,153, 94,229, 35,226,195, 96,180,160,170,186, 0, 87, 11,138, -161,209,150, 65,163,209,163, 88, 83,137, 98, 77, 37,154, 7,117, 6,144, 91,167,172,155,183, 41,110,220,188,141,158, 61,187,162, - 68,171,133, 80,192, 67, 89,121, 1,116, 37, 22, 60,246,168, 14,109, 90,181,130,159,159, 31,124,124,124,113,253, 70, 57, 8, 63, -144, 85, 25, 29, 93,242, 13,181, 10,160,161, 87, 16,212,102,173, 3,119, 98, 1,216, 66, 46,151,171, 99, 98, 98, 48,119,238,220, -187,188, 10,204, 52,131,183, 43, 11, 38, 76,152, 80,195,130,101,222, 47, 66, 8, 94,124,241, 69, 36, 37, 37, 17,182, 74,128,179, -229,239,120,207,217,211,224,140,181,107,215, 18, 0,118, 43, 63, 35, 35, 67,101,235,215,106,155, 55,128,249,171, 2, 64,210,211, -211,237,247,235,218,206, 53, 45, 45, 77, 53,100,200, 96,233,145, 35,214,119, 98,230,204,153, 56,121,242, 79, 41, 67,225, 71,143, - 30, 85, 49,191, 63, 34, 34,194,173,167,108,237,218,181,248, 74, 26,136,137,107,244,214,223, 53,223,191,198,253,137,107,244,246, -250,156, 46, 21,226,187, 3, 6,112,120, 8,148,246,184, 21, 53,149,238,149, 11,113,242,228, 73,246,171, 0,238, 5,241, 59,198, - 2,212,199,250,175,105,201,215, 36,127,155,155,201,237, 84, 64,203,150,124,240, 8, 31,173, 90,242,209,173, 43,197,181,107, 2, -240,248, 4, 66,129, 0, 66,129, 16,127,157,246, 71,144,191, 16,124, 62, 31, 67,194,205,240,245,245,129,197, 66, 1,106,246,138, -252,155,180,233,136,155, 21, 20,186,139,106, 8, 8, 31, 23,175,229,147,139, 44,201,223, 54,176, 73,175, 94,189,170,186,122,245, -170,171,223,171,102, 89,142,145,197,197,197,251, 24,146, 7,128,113,227,198, 97,253,250,245,246,103,202,202,202, 80, 84, 84,132, - 29, 59,118, 48,203, 5,239,123,231,181, 13, 92,170,140,140, 12, 21, 19, 44,102,187,230, 49, 41,164, 30, 74, 87, 75, 37, 97,160, -133,101,208, 87, 26,161,245,169, 2,133, 22, 85, 85, 38,148,149, 85,163,232,182, 30,215,174, 87,224, 73,105, 39, 0,169,117,202, -170, 52,180, 68,222,165, 91, 8,233,242, 8,186,116,233,128,226,226,219, 8,108,110, 70,183,110, 1,104,221, 42, 4, 98, 95, 95, -148,148, 84,224,248,137, 11, 40, 40, 44, 67,219, 14,189, 30,218, 1, 36, 65,161,160,132, 64,202,112,169, 35,169,214,181,110, 63, - 65,161,144, 36,172, 93,203,202, 11,176,102,205, 26,149,179, 2,176,106,213, 42,172, 91,183, 78,234, 78, 94, 66, 66, 2,141,141, -141, 37,114,121,160, 67,153,168, 43, 98,166, 0, 48,126,252,120, 86,238,127,199, 41,133, 22, 45,146,224,237,180, 1, 99,229,219, - 20, 0, 74, 41,197,144, 33, 67,164,169,169,169,181,222,119, 71,216,204,220,122,106,234, 17, 21, 33, 4,132, 16,244,235,215, 87, -186,118,237, 90,245,221,207,222, 81, 50,220,201,227, 77,208,130,145, 39, 27,222,185,134,126, 52, 97,245, 57,187, 60, 54,224, 98, - 0, 30, 30,184, 85, 0, 30, 68,139,159,193,164, 73,147,234,245,125, 30,143, 7, 62,223,250,233, 25,202, 67,255, 62,102,248,136, -196, 86, 5, 64, 40,196,224,112,192,199, 7, 16,242,125,208,178,165, 24,124,190, 14,102,179, 5, 22,139,231,110,123,189,230, 6, -196, 29,122,224, 82,242, 79,104, 37,224,225,112,254, 21,143, 7,148,121,243,230,169,215,174, 93, 43,173,207, 50, 64,102, 89,223, -235,175,191,110,191,198, 88,250,101,101,101,208,235,245,152, 62,125, 58, 0,224,235,175,191, 6, 0, 85, 99,180,109, 90, 90,154, -218,102,237,171, 0, 96,208,160, 65,245, 10,224,234,208,169, 59, 50,143,238, 65,235,150,126,240,243,179,118,251,234,106, 51,202, -202, 13,208,104, 43,209,177, 75, 47,252,184, 97,163,219, 54,249,253,247,189,228,197,231, 35,232,209,140,179,120,114, 72, 95,116, -234,212, 9, 70, 67, 21,250,247,123, 28,254, 1, 1,184,146,151,143,194,107, 37, 72, 77, 59, 15,109,121, 0,118,175,223,248,208, -250, 76,103,198,202,109,237, 79, 48, 83, 46,183, 47, 11,183, 56,145, 62,143, 71, 0,106,167, 12, 58, 83, 46, 71, 95, 23, 22, 44, - 33,160,112, 80,203, 99, 99, 99,225,236, 5,152, 59,119, 46, 8, 33,136,141,149,171,108,124,142,153,177,114,244,237,123,183,188, -216,216, 88,187, 59,222, 29,201,177, 37,127,103,140, 31, 63, 30, 35, 70,140,144,122,171, 4, 59,206,213,135,135,135, 75, 83, 83, - 83,213,181,221,103, 19,164,104, 91, 85, 64, 25,229, 43, 50, 50, 82, 42,151,199,170,157,149, 14, 7,249,240, 68, 94,226,252, 38, -214, 83,113,155, 59,158,142,249,249,118,133, 96,207,169,186,199, 62, 87,121, 0,184, 24,128,135, 84, 1, 24, 60,100,208, 61,153, -243,105, 40,203,223,177, 35,121, 3,141,150,160, 93, 27, 30, 8,225,129,240,120,216,187,223, 58,191,239,227, 35,134,143,200, 7, -227,158, 38, 16,251,136,224, 43, 38,208, 20,243,145,113,188, 41,204, 22, 51, 58,118,240,108, 94, 87, 38,147,209,107, 5,151,160, -205,220,133,110, 29,133, 56, 83,232,253,188,240,204,153, 51,213,168,103, 80,158, 76, 38,147,126,249,229,151, 42,198,205, 95, 92, - 92, 60, 49, 60, 60,188, 98,223,190,125, 59,159,123,238,185, 81,197,197,197,100,234,212,169,123,108,249, 2, 26,173,115,166,167, -167,171,195,195,195,165,204,113,125,100,253,184, 97, 35,153,250,202,100,154,125,225, 28,174,229, 93, 1,143, 71, 96, 54, 83,136, -125,131, 16,218,179, 55,118,255,145,204,186, 78,175,221,178, 72, 53,197,215, 84, 85, 85, 38,244,233, 29,130,224,246, 45,145,127, -245, 38,180,167,115,145,149,157,143,253, 7,254,194,149, 66,138, 99,153,103,188,106,167, 7, 37,249,143,101,115,160,215,207,245, -255,132,165,188,220,255, 97,205,154, 53,118, 5, 96,205,154, 53, 64,222,250,187,158,117, 37,143, 45, 40,165,164, 62,253, 56, 54, - 54,182, 94,125,207,129,228,213,222,220,119,229, 85,112,252,174, 43,121, 30,181,243,149, 45, 72, 90,243,178,117,108, 24,254, 72, - 13,242, 7, 0,217,152, 39,172, 7,218,147,110, 21, 0, 46, 15,192,131,131,117, 43, 23,222, 53, 13,224,145, 2,240,128, 7,124, -212,187,112,153, 39,124, 32, 22,137, 48,110, 12, 1,143, 16, 12, 26,104,194,233, 51,190,224, 17,235,156,127, 73, 9, 15,237,219, -242,193, 35, 34,156, 58, 45,130,216, 7, 48, 24, 13,184,146,239,235, 17,249,231,102,255,137,240, 17,207, 64,208, 50, 28,185,217, - 25, 16,220, 72, 66, 64,179, 32, 90, 90,166,105,148, 10, 86, 42,149,106,153, 76, 38, 29, 56,112,160, 42, 46, 46, 14,189,123,247, - 46,210,106,181, 24, 56,112,160, 84,171,213, 98,206,156, 57, 42, 27,249,171, 27,187,145,235, 75,252,206, 74, 0, 0, 68, 14, 29, - 36,105,215,182,157,202,223,223, 31, 63,110,216, 72,206,156,205,245,108, 64, 79,205, 80, 3, 32,102,180,164,231,178,210,209,174, - 77, 19,136,197, 66, 84, 84, 24, 80,120,189, 12, 68,208, 17,199, 50, 83,185,104, 41, 54, 56,241, 6,208,245,255, 80, 99,121,225, -241, 5,141, 90,164,216,216, 32,135,180,181, 13, 67,104,238, 72,217, 19,210,174,111, 62, 3, 87,227,188, 44,210,199,250, 91, 43, -175, 91, 63, 28, 30, 90,244,235,215,207, 30,240,183,110,229,194,187,238,185, 85, 0, 26, 58, 31,255,253,206,239,239,153, 22, 65, -160,213, 18,248,181, 37,104, 17, 68, 48,112,128, 17, 98, 17, 31, 62, 34, 35, 90, 4,137,109,131, 0, 65,196, 64, 51, 50, 78, 8, -173,222, 2,150,138,145, 76, 38,163,189,186, 55,195, 27,115, 63, 66,165,168, 3,126, 77, 46, 68,215,208, 65, 0,128, 38,199,118, - 32, 59, 31,180,162,188,241,148, 0, 0, 36, 47, 47, 79,178,114,229, 74,149,163,119, 0, 0,105, 76,203,255, 94,195,150,236,167, -222,245,126,240,208, 9, 50,245,149,201,244, 86,241, 45, 84,222,208, 67, 44,110,129, 14, 93, 30,103, 53,149,240,176,195,154, 14, -187,129,126,102,222,122,216, 87, 4,228,109,104,244,223,230, 46,184,239,239,134, 81,207, 76,108, 80,203,157,139, 1,120,176,148, -128,218,200,223,173, 7,224,159, 0, 10,107, 84, 63,225, 81, 80, 80, 4, 53,167, 72, 57, 44,128, 88, 36,132,143, 72,128,103,199, - 80, 80,106, 65, 96, 11, 19, 76,102, 2,139,197,108, 27,252,220,227,241,206, 21, 24,251,162, 12, 21,130,110,104,221,196, 31,147, - 95, 8,194,198,173,167,237, 74,128,209,252, 43, 78, 95,104,220,117,226,140, 34,224,112,206,189, 61, 94,120, 21,254,142, 32, 19, -180,132, 38, 6,222,205, 12,202, 32,175,228,173,211,174, 64, 76,224,194,187,111, 28, 95,208,232, 86,255, 63, 25,251,254, 50, 54, -100, 31, 38, 86, 5,145, 58, 40,139,220,180, 64, 99, 41, 1,110, 27,203,219,125,132, 57,112,224,192,129, 3, 7, 14, 15, 47,184, - 68,207, 28, 56,112,224,192,129, 3,167, 0,112,224,192,129, 3, 7, 14, 28, 56, 5,128, 3, 7, 14, 28, 56,112,224,192, 41, 0, - 28, 56,112,224,192,129, 3,135,191, 7,106,172, 2, 56,121,242,164,215,209,160,174,130, 9, 27, 90,222,148,233,177,110,191,167, -211,220,176, 31,251, 7,181,181, 31,255,252,125,194, 93,207,182,146,190,234, 86,222,190,213,119, 50,230,141,156,255,165,253,248, -150,234, 91,120, 83,190,218,224,109,249,106,131,171,242, 61, 63, 85,238,246,123,153,170,157,232,220,185, 51, 46, 95,190,140,129, -210,177,246,235,191,253,168,184,231,245,231,174,191,196, 7, 7, 75,222, 40, 44,116,204, 76, 72,238,103,255,115,150, 55,118,236, - 88,201,174, 93,187,106,100, 74, 28, 51,102,140,116,231,206,157,234,198,120, 63, 30,100,121,245,145,245,119,174,191,168,168,168, -151,250,244,233,179,241,244,233,211, 47,166,164,164,252,218, 0,229,163, 15,202,251,193,201,107, 92,121, 30, 43, 0,206,248,234, -171,175, 36, 85, 85, 85, 32,124, 33, 8, 33, 48,155,140, 16, 9, 5,152, 51,103,142,186,190,154,199, 87, 95,125, 37, 1,128,217, -179,103,215, 75,150, 78,115, 3,254, 65,109,237,196,223,182, 99,103, 0,192,141,171,151,189,146,183,111,245,235, 24, 57,255, 75, - 59,113,125,181, 45, 3, 0, 48,251,217, 65,127, 75, 13, 48, 83,181, 19, 3,165, 99,145,169,218,105, 37,181,241, 83, 0, 0,151, - 47, 55,126,253,133, 2,146,108, 64, 21, 10, 72,179, 1,213, 27,133,133,200,136,123, 27, 0, 48,104,229,167,141, 90,111, 47,189, -244, 18,221,180,105, 19,170,170,170,106, 92, 23,139,197,170,151, 94,122, 9,191,252,242,203,131,186, 60,112,104,247, 46,193, 27, -168,217,172,207,206,191,177, 8,192, 14,206, 14,170, 29,159,127,254,249,240, 63,255,252,179,217,181,107,215,218, 6, 5, 5, 53, - 15, 11, 11, 43,124,243,205, 55,127,244, 86, 94, 84, 84,212,136,201,147, 39,167,108,220,184,241, 85, 0, 1,147,254, 47,118, 58, - 0,203,233,211,167, 95, 86, 40, 20,191,201,229,114,139,135, 34,153,228,202,180, 1,198, 43,103, 18,105,168, 62, 76,239,129, 76, - 14, 13,237, 1,112,196,127,254, 27, 47, 9,232,216, 71, 21,213,167, 7,252,124,132,160,148,194,108,166, 56,147,115, 5,241,171, - 63,147,250,250, 8, 49,107,214, 44,175,200,251,231, 13,139, 36,189,186, 29, 84,157,201, 14,145,122, 91,112,134,240,125, 3, 90, - 64,167,185, 97, 39,254,186, 60, 2,108, 44,213, 65, 83, 22, 98,223,234,215,237, 47, 82,109,207,213,181,198,210,249,127,138, 68, - 34,235, 91, 64, 41, 44, 22,235,251,109, 54,155,237,229,231,241,133,172,173,104, 0,104,215,218,154,170,211, 80, 86,130,106,147, - 9, 0, 80, 97,178,202,235, 50,106, 6, 30,237,213,159, 21,241, 3, 64,223,193, 35,144,169,218,105, 39,254,218,158,187,159,245, -199, 12, 26,217, 0,158,242,247,199, 30,157, 78,197, 16, 63, 0,100,237,221, 87,215,160, 85, 39, 62,253,105,153,228,248,237, 99, - 40,204, 63,133,110,157, 34,240,191,185,191,120,220,135,199,142, 29,251,220,230,205,155, 25,242, 55, 1,168, 2,224, 7,192, 82, - 85, 85, 37,240,245,245,197,216,177, 99, 37,174, 60, 1,141,140, 54, 79,244,235,243,199,158, 95, 18,154,232, 10,207, 99,168,108, -230,198, 43, 90,227,203, 0,126,123,208, 6, 38,153, 76, 70,189,221,128,199,137, 24,189,194,151, 95,126, 41,201,200,200, 80,109, -216,112, 39, 49,209,237,219,183,145,157,157,141,103,158,121,230, 7,137, 68, 34,125,243,205, 55, 89,181,175, 66,161,224,109,220, -184,241, 67, 0,255,159,189, 47,143,111,162,234,222,127, 38, 73,211,116,223,217,247,150,202, 78,161, 8,200,154, 0,165, 66, 1, -101, 41, 90,208, 87, 68,104, 64, 69, 1, 81,180,175,223,159,190, 46, 8,138, 20,101, 13,139,226,171,101, 43,136, 82, 40, 20, 10, - 41,101,211, 74, 41,101,183,180,165,116,163,116, 79,151,236,153,249,253,145, 76, 76, 67,210, 76,210,176,190,243,124, 62,243,105, -231,206,228,100,114,231,222,251,156,115,238,185,231, 62, 55, 34,242, 69,183,157, 59,119,182,126,249,245, 5, 94, 0,116, 0,218, - 26,110,123, 6, 0,103,244,232,209,163,128,251,183, 58,183, 70,170,131,103,127,136,140,132,149,148,181,254,102, 71,255,160,210, -207,103,128,203,229, 65,167,211, 66, 86,223,128, 89,211, 95,160,234,235,235, 91, 74,216,148, 51,223, 11, 11,219,176,180,237,175, -137,167,192,182, 2,176,102,237, 58,161,112,226, 12,105,199, 86, 62,112, 23,240, 64,146, 36,116, 36,192,227, 18,240,247,233,129, -222,221, 59, 73, 83, 83, 14,139, 54,110,220, 40,180, 87, 9, 88,183,110,157,176,103,240, 89,105,255, 30,183,193,229,232,164,235, -214,175, 23, 45,122,251,109,187,100, 52, 86,151,193,205, 39, 0, 62,222, 94, 0, 96,252,107,233,190, 54, 29,187,216,244, 6, 28, -143,127, 27,131,103,127,136,215, 94,154, 6, 0,198,191,150,238,219,112, 48,195, 46,237,154,203,229,162, 67,135, 14,224,114,185, - 80,171,213,104,108,108,132, 78,167, 67, 77, 77,141, 67, 47,215,147,199,197, 15,107, 15,192,213, 7,184, 87, 0,252,213, 80,130, -138,178, 92,252, 28,255,145, 93, 86,127,255, 97, 99,209,161,157,126,138,164,131, 5,242,239,210,165,139,113, 58, 0, 0,138,139, -139,157, 82,127, 12,147,171, 82,145, 30, 30,248,252,237,183, 0, 0,159,155, 16,255, 47, 57, 57, 77, 7, 19, 59,178,181,206,250, -104,164,176,102,112,170,244,195, 78,175, 64, 69,142,131, 43, 73, 33,226, 5, 29,126,252,102,175,232,248, 6, 48, 29,204,121, 11, - 22, 44,248, 77,161, 80, 96,199,142, 29,202, 57,115,230, 8, 0,120, 2, 32,119,236,216,161,158, 51,103, 14, 79,161, 80, 64, 32, - 16, 72, 91, 58,208, 69, 70, 70, 10,143, 29, 59, 38, 53,108,216,210, 98,120,242, 57,255,111,221,231, 31,184,249, 94,223, 5,183, -191, 79,226,211, 49,126, 94,239, 36, 85,124, 86,175,166, 30, 43, 5,128,222,130,183,166, 38,130,242,247, 79,181,251,183, 15, 25, - 50, 68,248,231,159,127, 58, 76, 54,107,214,172, 17,238,219,183, 79, 90, 95, 95,111,241,250,221,187,119,177,111,223, 62,233,235, -175,191, 46,250,241,199, 31,211,108,180, 23, 98,231,206,157, 63,143,136,124,113,102, 78,214, 57, 94,135,118,109,180, 47,191,190, -160,201,184,123,242,240,175,232,219,183,111,143,157, 59,119, 78,232,219,183,239, 65, 0, 56,115,230, 76,179,253,131, 73,127,211, -247, 15, 2,176,145,136,103,192,128, 1,212,145,148,227,200,186,122,221, 88,166, 84,170,240,245,186, 45, 13, 11,231,196,176,132, -253, 20,227,190, 32,192,213,171, 87, 11, 71,140,159, 42,237,209, 41, 0,174, 46, 28,144, 36,137,178,178, 50, 92,201,206,130, 90, - 75,130, 36, 41, 4,248,184, 99,252,132, 73, 82,133, 74,107,247, 23,186,186,148, 35,184, 83, 25,192, 37,208,171,123, 17, 92,121, -247,236,182,252, 77,201,223, 28,178,186,122,148, 21, 21,192,205, 39,192,170, 87,160, 57,242, 50,199, 79,123,126,197, 91, 83, 6, - 99,240,236, 15,209,140,150,125, 31,248,124, 62,184, 92, 46,188,189,189,145,159,159,143,154,154, 26,189, 34,229, 32,249,183,109, -213, 26,158, 60, 46,166, 46,250, 2, 19,102, 13,195,161,171, 37, 40, 83,160,197,228,111,142,226,210, 50, 92,187,112, 22, 65,126, -222,122,242,231,113,157, 82,127,207, 79,127, 13, 0,224,199,115,177,139,252, 1,224,255,214,111,192,255,173,223, 96, 36,255,148, -198, 70,188, 63,126,146,254, 98, 16,159,209,239, 30, 22,215, 85, 56,255,189,231,164,175,119,126, 19, 46, 28, 79,120,192, 29, 28, -112,209,190,245,112,188,253,249, 82,233,242,164, 30,140,212,136,180,180, 52, 13, 0,252,244,211, 79,114, 0, 2,122, 27,229, 29, - 59,118,144, 0,220, 77,183, 85,142,137,137,113,104, 94, 46, 62, 62, 94,104, 79, 57, 3,140, 24, 52,160,191, 60,241,215, 3,226, - 1,125, 66,185,141,215, 79,160,160,188, 30,119,107,229, 32, 41,202,161, 64, 96,138,162,168,234,234,113,212,168, 81,163,156,154, - 72,204,132,252,225,239,159,234,144,140,140,140, 12, 41, 0,130, 32, 8, 12, 25, 50,196,238, 58, 75, 77, 77,189,143,252, 47, 92, -184,128, 89,179,102, 25,207, 53, 26, 13,110,222,188, 41,141,143,143,111,214,139,185,115,231,206,183, 71, 68,190, 56,233,203,184, - 37,188,196,196, 68,108, 91,183,154,103,240, 24, 25,201, 63, 49, 49, 17,235,215,175, 71,223,190,125, 15,218,234,111,230,228,111, -173,191, 77, 24,110,240, 2,122,121,216,148,247,237,186, 77, 70,242, 47,175,172, 66,121,101, 21,100,245, 13,112,113,225,121,110, -218,177, 75, 9,103,109,136,192,226,161, 34, 44, 44,236,190,163, 89, 5, 96,227,198,141, 84, 64,151,126,232,210,198, 23, 74,141, - 14, 4, 1,164,164, 28,197,127,127,218,129,203,217,217,120,127,233, 98,112,185, 28,144, 58, 18,222,238,174,232,210,111,132,116, -237,218,181,140, 59,216,250,245,235,133,189,187,223,145,122,123,202,241,195, 79,229,224, 16, 20, 6,247,253, 91,186,126,253,122, -187, 58,169, 37,242,167,137, 95, 33,171,106,162, 32,200,234,234,109,202,179,212,153,232,142,148,145,176,178, 9,193,253,180,231, - 87, 70,207, 24, 28, 28,140,128,128, 0,212,213,213,129,207,231,131,195,225, 64,161, 80,160,166,166, 6, 92,174,190,147,219,179, -217,210,254,223, 14, 96,241,218, 99, 56,176,238, 99,180,109,213, 26,238, 30,254, 40,210,149,224,231,248,143,224,105, 24, 52,184, - 12,229, 89, 34,127,154,248,101,165,121,232,209,161, 21,234,229, 74,184,186,187, 2, 58,157,205,120, 0, 91,245,247,209,214, 67, -184,118,241, 60,250,116,235, 5,153,206,182,210, 72,147,255,223,199,142,227,255,214,111, 48,150,167, 52, 54, 34,165,177, 17,249, -226,255,224,216,245,203,232, 61,184, 27, 80,101,123,107,230,209,203,186, 9, 23,190, 51, 86, 26,228,209, 19, 10,170, 30, 80,149, -131,175,170,134, 74, 87, 15, 37,169, 0,201,247, 68,251,145,131, 16,177,176, 51,101,203,154,163,231,253,197, 98,177,187, 88, 44, - 6,244, 83, 0, 16,139,197, 48,156, 27, 44, 40, 37,118,239,222,109,119,167, 93,178,100,137,112,233,210,165,210, 94,189,122, 81, - 4, 65, 72, 1,224,149, 87, 94,161, 58,119,238, 76,125,252,241,199, 14,109,205,236,229,202,217,177,225,195,215,221, 34,219,171, -184,231,110,150,225, 80, 1, 7, 31, 30,185,167,250, 79, 90,131,172, 81,131,215, 28,145, 89, 83, 19,241, 32, 45,127,248,251,167, - 98,246,236,217,118, 79, 17,154, 18, 62, 69, 81, 4,189,157, 52, 83,188,246,218,107,194,123,247,152, 25, 37,106,181, 26, 87,174, - 92, 57,217, 92,123, 1, 32,236,208,174, 13, 63, 58, 58, 26, 0,144,153,153,137,147,135,127, 21, 20,151,150,145, 52,249, 27,126, -187,177,191, 93,185,114, 37,190, 37,253,237,235, 57,147,112, 53,175, 8,109,186,181, 5, 26,229,140,127,123,121,101, 21, 52, 26, -173, 65,193,209, 66,163,209,162,232, 78,129,160,133,175,149,176,113,206,226, 17,162,137, 43, 74,165, 82, 97, 64,143, 30, 82,119, - 55, 23,144, 36, 5, 29, 9,156, 61,125, 6,255,249,252, 11,144, 20,112, 43, 55, 23,151,179, 47,161, 79,159,254,224,114, 9, 60, -211,173, 3,242, 47, 50,247, 2,240,121,229, 8,237, 82, 10,240, 8, 20,221,213, 0, 60, 2,253,122,220, 65,198,149,114,135,127, -128,169,123,223,146,103, 64, 33,171,106,178, 26,192, 22, 76,221,251,150, 52,237,140,132,149,136, 88,178,222, 98, 20,187, 41,180, - 90, 45,220,221,221,193,225,112,224,231,231, 7,185, 92,142,198, 70,253, 54,192, 65, 65, 65,168,170,170,178, 43, 71,182,178, 6, - 24,236,230,134,247,215,157, 70, 68,127,224, 78, 22,240,151,225,218,251,235, 78,227,251, 37, 34,232, 72,157,221,245,119,237,194, - 89,227,255, 99,195,123,128,231,197, 65, 74,218,117, 12,232,209, 17,222,158,174,248,105, 95, 42, 6,137,162, 80,108, 97, 21,128, -173,250, 59,120,157, 2,238, 2, 83,198, 18,216,122, 40, 31, 1,126, 93, 49,109, 56,193,168,254,104,119,127, 74,227, 63, 91, 39, - 83,159,198, 3,237,101, 32,230,127, 2,234, 63,159, 3, 28, 5,136,140, 21,244,160, 98,181, 50,131,167,123, 74, 59,251,134,163, - 78,215, 0, 85, 77, 46,126, 46,220,137, 51, 83,106,208,107,158, 8,227, 23,121,194,205,239, 25, 8,120,126,224, 77,145, 97,158, -118, 30,181,109,235, 54,139,131,148, 88, 44,166,104,165,141,195,225,128,162, 40,181, 65,137, 86,114, 56, 28, 57, 69, 81,254, 0, - 72,180, 96,121,109,124,124,124, 90,100,100,164,168,170,170, 74,154,146,146,162, 87,124, 82, 82,208,179,103, 79,244,232,209, 67, - 68,151,217,131,122, 21,249,206,220,255,251, 62,233,155,168, 54, 28, 74, 41,195,252,132, 28,141, 86,163, 89,175,210, 97, 5, 0, -135, 54,163,120,241, 69,245, 3, 39,255,132,132,132, 52, 71,172,127,211, 41, 19,130, 32, 48,120,240, 96, 33,211, 93, 37,117, 58, -157, 93, 10,195,237,219,183, 33,145, 72,136, 77,155, 54, 89,186, 44, 0,208, 11, 0,111, 76,212,180,218,252,252,124,223,204,204, - 76, 36, 38, 38, 34, 60, 63,159,147,153,153, 9, 0, 8, 15, 15,199,243,163, 7,193,219,211, 21,235,127, 60, 80, 62,107,214,172, -184, 77,155, 54, 45,177,183,191,221,253,109, 37,188,122, 11,224,217,125, 49,246,174,156,135,254,125,218,224,153, 73, 95,216,236, - 31,178,186,122, 8, 4,174, 0, 0, 23, 23, 30,228,114,165,179,121,134, 37,253, 71, 0, 38,155, 1, 53, 25,168, 72,146,132,187, - 43, 31,106, 45, 5,146, 2, 56, 4,240,201,103, 95, 64, 71, 2, 13, 13, 13, 40, 43,187,139,214,173,219,128,162, 72,104,181, 58, - 8, 92,120,224,186, 48,115,193,110,216,176, 65,216,189, 75,177, 52,208,175, 78,223, 28, 12, 7, 65, 80, 24,216,251,150,148, 94, - 21, 96, 15,104,235,158,118,247,155,147, 63, 19,235,223, 92,139,166,137,127,195,193,140,251,200,159,169,245, 15,232, 3,134, 92, - 93, 93,225,227,227, 99,116, 25,210,129,127, 62, 62, 62,104,211,166, 13,180, 90,230,202,211,143,169,167,224,211, 5, 16,134,234, -207,115,180,122,247, 63,160, 47,251,248, 11, 41,106,213,246, 77,201, 20,151,234,131, 21, 59,181,242,135,151,143, 7,120,222, 92, - 40, 43, 21, 0,135,131,182,157, 59,224,108,118,129, 67,245,247,218,123, 95, 98,212,208, 49,224,149, 1, 13,173, 1,119, 14, 7, - 67,187,116,133,120, 74,107, 70,114,204,231,250,127,121,105, 30,166,190, 56, 18, 8, 81, 2,151,121,128, 39, 15,152, 28,142, 14, -155,183, 50,243,198,180,247,135, 90, 93, 13, 66, 85,133,159, 11,119,226,252, 28, 31,140,154, 58, 7, 35, 90, 61, 47,186,122, 76, - 11, 45,217, 8, 23,117, 35,180, 61, 72, 84,220, 99, 22, 52,106, 80,222,148,115,230,204,225, 0,168,161, 12, 59, 68, 25,206, 91, -132,148,148,148,180,158, 61,123,138,220,221,221, 17, 24, 24, 8,119,119,119,164,167,167, 19, 41, 41, 41,105, 14,136,107, 51,105, -210,164,173, 27,182,252,192,249, 36,173,129,220,119, 46, 23, 42,181,166, 81,169,195, 50,123,200,223,220,229,159,158,158, 78,208, -199,227, 66,254,150,220,253,246,122, 1, 26, 26, 26,140,255, 95,184,112,193,120, 0,192,210,165, 75,155,156,155,220,239,106, 69, - 92, 59, 0, 93, 12, 74,161,251,243,211, 95, 81,154,122, 2,104,203,255,185,225,195, 77,251,219, 33,177, 88,172,180,167,191,197, - 78, 30,133,126,225, 61,224,213,223, 11, 37, 39, 10, 1,129, 43,166, 47,250, 23, 6,191,250, 61,163,223,172,213,234, 80,114,247, -158,150,182,252,105, 20,221, 41,104,233,171,165,172, 28, 44, 30, 3,133, 0,150, 44, 21,202, 48,184,145, 20,160, 35,245, 74, 0, - 65, 0,191,238,223,135,169,211,102, 32, 48,168,149,113, 0,164,236,120,151, 92, 78, 57,122,135, 20, 25,207,251,245,113, 55,234, -134, 3,123,229,131,203,177,223, 11, 96,238,238,183,116,221, 30,235,223,220,221,111,233,186,233, 90,246,230, 80, 87, 87,135,250, -250,122,168, 84, 42,144, 36,137,138,138, 10,163,251, 95, 46,151,163,161,161,193,174, 41,128, 3,235, 62, 70,218, 85, 64, 86, 0, -104, 20,192,247,203, 69, 70,247,255,197, 44,224,210,221,179,224,218, 89,127,178,210, 60,248,251,120, 32,192,223, 3,207,132,246, - 68,254,237, 10,228,148, 84,161, 83,128, 15, 84,247,202,145,123, 43,183, 73, 46, 0, 38,245, 55, 76,248, 2, 70,136, 98,112, 32, -105, 47,164,233,123,177,115,205,123,152,254,222, 10, 92,214, 0, 21, 85,229,140,234,207,116,174,255,245, 97, 67, 48,187, 87,103, -236, 61,112, 18,151, 47, 23, 96,205,149, 76,236,142,248, 23,176,253, 28, 74, 74, 42, 24, 89, 23, 29,148,174,208,169, 43,161, 86, -235, 35,171, 91,183,239,136, 30, 61,123,138,234,220,244,177, 24, 10, 82, 14,142,170, 17,110,141, 92,220,187,219,188, 2, 64,191, - 51,165, 82, 9,165, 82, 41, 0,160, 6,224,165, 84, 42,189,205,151, 4,182,192, 11, 32, 76, 79, 79,151,246,236,217, 19,175,188, -242,138,168,178,178, 18,211,166, 77,179,103,224, 28,193,231,243, 27, 60, 61, 61,181, 17, 17, 17,119,151, 47, 95,222, 46, 46, 46, - 46,255,175,172,203, 19,119, 95, 83,221,212,144,176,123, 63,214, 7,225,242,119, 38,249,155, 91,255,180,194, 66,191, 51,166,177, - 0, 46, 46,255,196,168,172, 89,179,198,120, 88, 58, 7,140, 43,124,172,189, 27,190,225,224, 0,224,201, 74,243, 44,186,211,233, -254,150,117, 49,235,246,172, 89,179, 98,237,233,111, 35,159,125, 6,227,134,135,226,203,207, 86,227,219,181,201,248,127,191,156, -196,130, 49,131, 80,246,123, 50,100, 53,117, 76,250, 7, 17, 61,229,121,104, 52,218, 44,141, 70,171, 53, 85, 0, 0, 96,197, 39, - 31,181,196,130,103, 45,255, 71, 8, 75,115,255,230, 74, 64, 19, 5,128,195,225, 64,214, 32, 7,151, 67, 64,171,213,129,164, 40, -104, 73,125, 16,105,246,165, 44,140, 25, 27,169,119,147, 81, 20,184, 28, 46,234,229,106,104,213, 42,219,214,255,198,141,194,174, -237,239, 74,131,252,101, 70, 45, 99,216, 96, 79, 67,140, 46, 1,130,160, 48,160,103,174,116,195,198,141,140,189, 0,180,117,223, - 92, 48,160, 67,214,107, 51,193, 53,246,192,207,207, 15, 21, 21, 21,112,117,117, 69,125,125, 61,130,130,130,140, 65,129, 74,165, - 18,181,181,181,118, 41, 0,177, 95,238,198,247,203, 69,240,233, 2,164, 93, 5,222, 89, 37,133, 39,143,139,105,239,126,133, 98, -178, 12, 9,107, 62, 0,151,195, 92, 30,109,253,135,135,135, 34,168, 91, 23,180, 10, 10, 4,159, 67, 64, 75, 80,168,104, 84,160, -166, 94,233, 80,253,125,187,242, 55,188,216,179, 43,188,189, 3,224, 30,212, 14,154,234, 26,100, 29,218,133,218,234, 66,135, 26, -241, 15, 43,223, 6,150,140, 3, 79,171, 70,151, 70,160,156, 91,135,239,239,254, 5,240,189, 25,203,184,152,244,135,168,146,163, - 64, 33, 95,142, 65, 33, 34,244,250,151, 39,242,253,210,164, 65, 65, 89,210,142, 67,243, 33,227,212, 67, 69, 41, 32,255,133,132, -192,211,139,137,229,111, 58,192,211,171, 0,248,206,234,184, 71,143, 30, 5, 0,204,158, 61, 91, 20, 31, 31,159, 54,117,234, 84, -163,197,200,132,252,131,130,130,142,108,221,186,213, 67, 34,145,112,151, 44, 89,130,197,139, 23, 83,231,206,157, 27, 10, 32, 69, -161, 69, 79, 0,127,218,251, 76, 98,177,159, 85,183,191,163, 1,129,206, 36,127,115,130, 55, 85, 88, 40,138, 34, 12,129,129,182, -251, 69,113,241, 57,250,255,157, 59,119, 26, 15,243, 50, 26,254,254,254, 16,139,197,214, 6,193, 98, 0,181, 0, 56,197,165,101, - 56,127,254,188,113,206, 63, 60, 60, 28,128,126,251,237, 61, 7,147, 81, 83,175,148, 3, 88, 33, 22,139,117,246,244,183,223, 15, -124,138,200,229,139, 48,113,226, 88, 4,186,114, 81, 79, 80, 72,201, 41,194,249,171, 37,118, 17,245,194, 57, 49,207,230,231,230, -242,138,238, 20,128, 62, 12,228, 15,214,106,127, 50,137,223,188,204, 18,154,196, 0,184,186,186,226,214,245,203,162, 46,237,252, -165,110, 46, 60,232,116, 36, 8,130, 0, 65, 0,177,226,183, 64, 81, 36,116,134,124, 0,114,165, 18, 55,114,242,193,231,219,140, -234,134, 86, 83,141, 1,189,110,155,142, 24,120,115,201,109,236,255,165,187,177,105, 13,234,147,135, 63,178,123,218,109,253, 91, - 34,126,133,172, 10, 0, 28,178,254, 45,117,180,140,132,149, 0,192,216,250, 7,244,235,252,219,180,105, 3,149, 74,133,123,247, -238, 65,167,211, 33, 48, 48, 16, 85, 85, 85, 8, 12, 12, 52,212, 43,115,194,174, 40,203,197,199, 95, 72, 33, 43, 0,190,121,111, - 36, 26,180, 58, 44, 93,149,136,239,150, 71,227,189, 53,135,192, 35, 8,216,193,255,144,149,230,161,109,160, 47, 92,224, 2, 29, - 8,220,189,125, 13,119,202,101, 8, 14,242,199,239, 23,207,225,198,117,216,109,253, 79,159,187, 20, 46,254, 0,135, 11,236, 72, -190,141,253, 27,223,199,220,149, 18, 44,157,220, 31,111,141,237,108, 87,253,165, 52, 54,226,219, 41, 51,129, 90, 1, 64,184, 0, -223,174,198,140,191, 78,227,216,216,133, 32,190, 90, 4,226,143, 15, 24, 91, 24,151,238, 6, 96,136, 66,134, 6, 55, 46,228, 2, - 1,130,167,187, 64, 69, 41, 32,227,184, 64,139, 80, 80, 58, 57, 52,149,119,113,118,157, 12,179,103, 5, 35, 77, 42,125,232,157, - 54, 54, 54,150, 2,128, 45, 91,182,208,174,126, 98,201, 18,253, 52,240, 47,191,252,194,244,205, 14,111,215,174,221,209,175,190, -250,202,227,214,173, 91,112,113,113,129,183,183, 55, 46, 95,190,172, 1, 80,209,146,231,107,110, 77,190, 35,222, 1,103,146,191, -185,245,175, 39,230,251,151, 15, 26,150, 7,166,217,120,174, 91,123,246,236, 25,198,116,122, 78, 32, 16,204,181,174, 52,137,235, - 71,143, 30,125, 27, 64,120, 78,214, 57,152,206,249,191, 57,119, 38,142,118,235,134,196,196, 68,100,102,102,226, 72,183,110,238, -179,102,205,250,241,212,169, 83,140,251,219, 75,227,134,192,135,244,131, 28, 46,216, 31,191, 8, 27, 15, 93,194,251,207,143,192, -156, 53, 59, 49, 99,197,207,246, 90,224,196,138, 79, 62,178,148, 8,136, 50, 81, 2, 88,139,254, 41, 67, 19, 15,192,155,111,190, - 73,212,222,205, 69, 94, 81, 21,120, 46, 92,104,117, 36, 52, 90, 29, 46, 94,204,196,127,255,251, 35,212, 58, 10, 26, 29, 74,253, -203,119, 0, 0, 32, 0, 73, 68, 65, 84, 9, 62,143,131,242,154, 6,148,220, 56, 47, 90,188,120,113,179, 29,106,227,198,141,194, -158,193,119,254,177,254, 13,237,106,255, 47,161,250,246,196,161, 0, 14, 5, 14,135,196,208,254, 55,164, 27, 25,120, 1, 44, 89, -255,166,171, 0, 60,252,219,216, 69,254,150,172,127,211,168,218,136, 37,235,237, 34, 47,253,160, 88,131,134,134, 6,184,184,184, - 24,173,127,146, 36,141,127,237, 85, 0,126,142,255, 8, 23, 75, 78,193,179,141, 62,232,207,139,199, 69, 69, 89, 46,188, 93, 93, - 80, 91, 93, 12, 46,135, 0,143,195,108,250,153,182,254, 59,250,123,225,122,254,109,104,213,106,184,242,248,104,104, 80,226,119, -233, 57, 12, 18, 69,217, 69,254,116,253,189,240,246,231, 72,248,254, 59,200, 73,160, 99,112, 7, 92,189,246, 7,150, 78,238,239, - 80,253, 1,192,210,224, 65, 72,186,117, 18,144,105, 1, 65, 32,142,103, 92, 7,241,213, 34,122, 96, 98, 92,121,167, 86,231,167, -157, 61,158, 1,168,235,209, 64,212,163,134,211, 0, 25, 79, 3,141,174, 14,174, 74, 57, 4,165,183,177, 59,238, 22,186,132,133, -194, 90, 0,160, 57,220,220,220, 76, 73, 0, 2,129,192,226, 53,166,216,186,117, 43,182,110,221,218,162,206,236,229,229,245, 78, -110,110,174,135,183,183, 55,220,220,220,224,239,239,143,138,138, 10, 16, 4, 33,119,230,160, 65, 91,252,209,209,209, 20,160, 15, - 8,180, 39, 40,208,217,228, 63,100,200, 16,161,173,128, 90,166,177, 0, 30, 30, 30,177, 60, 30, 47,207,188,124,205,154, 53, 77, - 44,127, 0,232,220,185, 51,198,141, 27,183,195,150,253, 83, 92, 90,214, 36,218,255,227,255, 91, 2, 87, 30, 31,173, 91,183, 6, - 29, 19, 96,184,238, 97, 79,127,155, 39,236,135,197,171,191, 67,253,189,114, 4,121,183,194,181,235,133,152,179,102,167,221,253, -195,140,240, 9,179,207,155,202, 97, 61, 1, 79, 0, 46, 93,186,212,108, 50, 32,171, 30, 0, 0, 88,182,108, 89,218, 55,171, 9, - 17, 69, 77,145,118,105, 23, 0, 47,119, 87,244,234, 19,134, 94,189,251,131,199, 1, 26, 20, 58, 20,222,173, 70, 70,218, 97,145, -167,135,187,205, 47,104,148,203, 17,218,249, 46,148, 42,129, 33,107,139,190, 25,185, 9,148,160, 40,160,186,214, 21, 32, 0, 47, - 15, 45,250,134, 22,224,244, 5,219, 89,236, 76,173,127, 83,139,223,205, 39, 0, 46,148, 6,208,254, 51,222,233,120,182,159,209, -212,250, 55,181,248,233,178,220,107, 89,198,123,153,100,217, 51, 85, 2, 0,160, 77, 27,189, 50, 82, 93, 93, 13,111,111,111,163, -251,223, 30, 5,128, 86, 2,128,175,176, 48,122, 52,240,253,105,108,252,119, 20,102,188,247, 29,118,174,124, 11, 60,130, 0,223, -149,217,138, 29,218,250,191, 94, 88,142,144,142,129,216,190,109, 55,186,116,233, 2,159,118,193,232,223, 46, 24, 26,213, 63,238, -127, 23, 6, 50,105,235,255,139,185, 99,241,206, 39, 59,208,177, 27,209,162,250,163,173,255,241, 7,126,192,177,217, 49, 32, 58, - 12, 5,160,207, 10, 8, 0,183, 27, 27,141, 74, 98, 14,152, 37,240,217, 48, 39,143, 24,189,140, 18, 6, 79,171,151,118,233,222, - 7,117,110,192,109,220, 65,125, 65, 5, 42, 86,232,208, 80,211, 1, 55,207,230, 48,126, 33, 36, 73, 18,110,110,110,148, 66,161, -128,137,229, 73,185,185,185,129, 36, 73,226, 81, 12,150,245,245,245,223,188,245,214, 91, 83,182,110,221, 42,240,241,241,129, 84, - 42,197,218,181,107,235,212,106,245,243,206,252, 30,218,226,167,151,203,217, 27, 8,152,152,152, 72, 24,146,252,180,152,252, 1, -192,132,216,109,214,185,173, 12,131, 98,177, 88, 45,145, 72,134,238,221,187,247,114, 99, 99, 99, 91,141, 70,191,204,212,156,252, -123,245,234,133,161, 67,135, 78, 18,139,197,182,190,147, 39, 43,205,195,151,159,126,140, 95,147,142, 32,114,196, 64,156, 72,253, - 67,111,192,180, 11,134, 79,187, 96,132,231,231,227,249,233,175, 84, 22, 86,201,199, 3,216,199,212,250, 95,188, 37, 9,113,111, -140, 71,187, 54, 66,163,114, 97, 94, 15, 45,204,166,200,122, 2,158, 34,165,128,145, 2, 0, 0,239, 47,123, 47,237,155,111, 72, -209,237, 14,207,160, 91,247,158, 82,111, 15, 55,144, 20,160, 80,169,145,159,159,143,138,252, 75, 34, 47, 79, 15, 44, 92,184,208, -102,199,117, 19, 8,176,247,232,104, 17, 29, 1,223,172, 59,130,195,129,135, 7,115,235,137, 94, 2,232,225,223, 6,164, 78,163, - 39,127, 3, 52,132,139,205, 20,187,230,160,151,212, 68, 44, 89,223,132,180, 28, 33,127, 83, 37,192, 52,241, 79,117,117,181,237, - 23, 96, 67, 9,248,217,100,149,240,214, 21,111,254,115,162,105,128, 39, 67, 57, 29,253,189,176,247,194, 37, 92,189,249, 55, 6, -137,162,154,144,190, 61,228, 79,227,133,183, 63,199,254,129, 30,120,123,106, 15,167,212,223,210,224, 65,120,239,224, 94, 16, 95, -126,130, 35,173,135, 96,109,195,213, 38,215,167,249,248, 98,165,172,214, 46,226, 56,181, 58, 63,205,143, 23,129,226,154, 60, 84, - 84,221,197,189, 28, 79,112,117,222, 24,222,111, 36,118,159,221,253, 72, 7, 53, 39,101,251,187,240,227,143, 63, 70, 16, 4,113, -252,187,239,190, 19,188,248,226,139,117,114,185,124, 60, 28,152,243,111, 14,206, 88, 2, 40, 22,251, 57,133,252, 45, 88,169,182, -148, 15, 6,207, 38,174,148, 72, 36,193,245,245,245, 95,102,102,102, 46, 41, 41, 41, 65, 99, 99, 35,248,124, 62,218,182,109,139, -160,160,160, 23, 37, 18,201,239, 63,255,204,104, 75,128, 27, 0,194, 59,250,123,225,185,231,158,195,165, 91, 37, 8,236,218,187, - 73,127,123,126,250, 43,114, 0,235,190,140, 91,178,143,233,239,152, 39,236,135,136,212, 63, 49,251,147,255, 98,212,168, 81,104, -221,186,181, 69, 69,203,137,175,157,112,128,252,169,102,202, 89, 37,226, 17,144, 62,163, 84,192, 0,240,254,251,239,167,109,216, -176, 65,120, 49, 45, 71, 4,232, 35,105, 41,138,130,171,171, 43, 62,120,127, 25,227, 78,251,182,157,105,126,153,130,118,245,115, -181,114, 64, 43, 55, 70,192,211,196,111,239, 90, 44,218,213,159,123, 45, 11,185,215,178, 16, 20, 20,132,138,138, 10,135,136,223, - 39,168, 29,212, 12,130, 35,153, 98,246,231, 63,227,220,105,231, 85, 99, 65, 65,129,113,183, 63,141, 74,121, 31,249,219, 67,252, - 52,254, 53,208,195,105,245, 7, 0, 68,252, 7, 70,226,167,201,255,118, 99,163,104,154,143, 47, 82,128,180,149,178, 90,135,126, -251,111, 43,143,155, 12, 60, 10, 0,192,238,107,204, 19,246, 80, 20, 69,184,186,186, 26,189, 0,244,255, 0,224,234,234, 74, 88, -250,255, 33,227,204, 15, 63,252, 48,106,223,190,125, 75,235,234,234,226, 1,100, 56,251, 11,156,177,244,207,201,228,228,116,136, -197, 98, 5,128,165,134,163, 69,239,227,202,149, 43,195, 1,116, 13,236,218, 91,174, 81, 41,221, 13,253,173, 14,128, 12,192,141, - 78, 1,238, 47,137,197, 98,187, 26,116,196,199, 91, 31, 22,241, 59,164,104, 57,120, 63, 11, 39, 32, 44, 44,140, 17,249,219, 52, - 64, 91,186, 83,223,131, 0, 61,183, 79, 19, 63, 90, 72,252,244,220,180,172,188, 24,178,242, 98, 4, 5, 5,181,200,226, 7, 0, -173,142,180,219,251,208, 28,202,171,101, 14, 63,139, 57,232,185,125,103, 17,255, 3,168, 63, 2, 0, 34, 61, 60, 40, 83,171,127, - 0,207,165, 69,196,255, 63,134,191,234,234,234, 98,216,106,120,244, 56,117,234,148, 68, 34,145,252,183,176, 74, 46,215,168,148, -166,243,145,222,157, 2,220,253, 28,216,253,143, 0,244, 83, 25, 79,154, 82,197,226,225, 42, 1,140, 26,147,163,251, 8,179, 96, -193,130, 5, 11, 22, 44,158, 92,112,216, 42, 96,193,130, 5, 11, 22, 44, 88, 5,128, 5, 11, 22, 44, 88,176, 96,193, 42, 0, 44, - 88,176, 96,193,130, 5, 11, 86, 1, 96,193,130, 5, 11, 22, 44, 88, 60, 21,104,178, 10,224,210,165, 75, 14, 71,145, 90, 10, 38, -100,229,177,242,156, 37,207,176,183, 58, 7, 0,105, 41,249, 10, 91,127,214,229,133,133,133,209,117, 71,175,229,166, 46, 93,186, - 68,178,245,199,202, 99,229, 61,189,242,236, 86, 0,158, 18,180, 40,201, 68,116,116,180, 16,128,105,202, 80, 81, 98, 98, 98, 26, -171, 43, 62, 26,124,253,245,215,175, 94,185,114,165,255,249,243,231,223,115,117,117,133, 92, 46,255, 64, 34,145,172,102,144,129, -141,197, 63, 3, 11, 5, 64,199,214,196,227,141,168,168, 40,225,225,195,135,211, 28,252,172, 40, 57, 57,249,164,147, 18, 74, 33, - 42, 42,234,165,228,228,228,221,155, 55,111,246, 7, 80, 15, 64,199,246,185,167, 15, 79,213, 20,128,129,188, 91,244,249,189,123, -247,154,231, 11,151,182, 68,110,116,116,180,208,176,102,151,138,142,142,166,236,149, 69,217, 9, 75,235,131, 91, 40, 79,248, 40, -222,165, 68, 34, 33, 22, 45, 90,180,250,218,181,107,223,119,238,220,249, 61,129, 64, 0,149, 74, 5, 0, 95,239,223,191,159,156, - 58,117,170,232, 17,117, 25,202,254,227, 97,202,179,186, 7,187,233, 94,236, 14,237,207, 30, 29, 29, 45,164, 40,138,162,254,159, -101,217,244, 53, 91,109,208, 18, 10, 10, 10,168,130,130, 2,167, 17, 76,117,245,184, 38,251, 21, 56,155,168, 9,130,176, 75, 46, - 73, 82,148, 78, 71, 81, 36,105,249,136,138,138, 18, 38, 39, 39, 59,180, 11,213,150, 45, 91,198, 28, 57,114,228,228,232,209,163, - 65, 16, 4,181,107,215,174,113,246, 62,155,249,113,228,200,145,221, 47, 15,227, 67,188, 64, 92,157,231,153,191,111,254,252, 88, -146,190,102, 75, 94, 99, 99, 35,213,216,216,216,108, 59,164,239,121, 16,239,135,133, 85, 67,224,190, 4, 65, 60, 27, 29,222, 98, -222,108, 91,249,180, 31, 33, 90,180,141,219,222,189,123,165, 51,103,206, 4,160, 79,170, 97,210, 56,165,142,120, 21,104,133,130, -206,249,111, 72, 67, 42,141,142,142,182,207,171,144,232,111,199,183,218,238,251,141,147,223,100, 46,206,254,125,109,172,117,104, -198,245, 39,145, 72, 8,153, 76,182,167, 79,159, 62,211, 1,112, 40,138,130,155,155, 27,202,203,203, 81, 91, 91, 11, 31, 31, 31, -148,151,151,159,156, 58,117,170,232,192,129, 3,105,118,190, 19,138, 78, 7, 75, 16, 4,166, 79,159,142,113,227,198,137, 22, 44, - 88,192, 88,206,193,131,191, 25,255,159, 50,229, 69,155,231,182,160, 56,247,246, 63,213, 61,108,125,147,115,243, 50,183, 97,182, - 55, 85,162,183, 19, 54, 69,122,122, 58, 86,172, 88,113,223,187, 24, 57,114, 36,117,250,244,105, 70,109, 57, 49, 49, 81,138, 79, - 8,250,252,254,196, 51,159, 16, 45, 30,204, 31,227,177,165,137,165, 45,145, 72, 68,177,177,177, 24, 53,106, 20,117,230,204, 25, - 70,159, 61,103, 37, 39,227,129,196,247,144,156,156, 44,165, 55, 9, 27, 53,106, 20, 85, 87, 87,215, 28,225, 11, 99, 99, 99,141, -237,245,247,223,127,119, 39, 8, 2, 49, 49, 49,247, 0,180,158, 53,107,214,113,137, 68,194,177,199, 98, 95,125,124,181,241,255, -178,148,187, 32, 8, 2, 59,223,117, 7, 64,224,155, 87,190,126, 33, 48, 48, 16, 0,176,235,167,157,140,235, 42, 60, 60, 28,221, -186,117, 99,153,247, 49, 33,127,123, 61, 0, 84, 98, 98, 34,194,195,195, 41, 43, 3, 40,229, 64,231,118,170, 53,105, 46, 47, 49, - 49,209,116, 67, 12,187, 65, 16, 4,145,152,152, 72,208, 3,144,225,175,195,150, 38, 77,254,134,103, 34, 76,158,205,110, 69,133, -152, 89, 99, 60,152,148,219,130,231,161, 77,198,131, 73,185, 61,228, 79, 81, 20,232,221,217, 40,202,190,102, 34,145, 72, 56, 53, - 53, 53,255,245,241,241,153, 14,128, 51,119,238, 92,204,158, 61, 27,124, 62, 31,110,110,110, 16, 8, 4, 32, 8, 2, 92, 46, 23, - 50,153,140,113, 61, 70, 68, 68, 8, 1, 80,251,246,237, 3,253, 78, 40,138,194,254,253,251,177, 96,193, 2,169,225,250, 99, 7, - 75, 10,193,163,240,172, 37, 38, 38, 74, 1, 16, 47,221,156,137,153, 55, 44,246, 49,106,230,141,104, 17,241,153, 67,253,142,122, -255,253,247,209,181,107, 87,167, 60, 47, 65, 16,148, 88,236,135,128,128, 19, 78,173,135, 9, 19, 38,140, 77, 77, 77, 61, 73, 81, - 20, 17, 27, 27,155,102, 15,249, 91,195,129,196,247, 16, 31, 31, 15,146, 36,241,222,123,239, 49, 82, 40, 76,201, 31, 0,142, 28, - 57,146, 52,106,212, 40, 0,240,139,137,137,209,142, 30, 61, 26, 98,177,152, 52,196,205, 48,241, 50, 54, 57, 95,187,118, 45, 94, -122, 78,111, 27,238,124,215, 13, 47, 15,227,227,131,200,247, 25,255, 38, 15, 15, 15,140, 26, 53, 10,153,153,153,198,241,212,252, -160,239, 97,179, 23, 62, 58,242,111, 86, 1,160,201, 42, 51, 51,211,152,118,210,212,122,178,151,104, 77, 6, 17,103, 15, 74,230, -202,128, 83, 93,195, 22,166, 4,236,134,169, 66, 97,176,254,159,198,118, 70,153, 14, 38, 37, 37, 37,198, 11,197,197,197,140, 21, - 70,153, 76,246,149, 92, 46,127,133,195,225,112,102,205,154, 5,153, 76,134,210,210, 82,184,184,184,128,199,227,129,199,227,193, -197,197, 5,110,110,110, 80, 40, 20, 96,226, 66,220,188,121,179,240,248,241,227, 82,130, 32, 48, 99,198, 12, 80, 20, 69, 43,121, -196,140, 25, 51, 0, 0,169,169,169, 82,118,168,104,158,252, 13,239, 87,100,170, 36,211,239,222,212,171,229,200,160,158,152,152, - 72, 24,222, 11, 54,111,222,236, 20,101,236,163,143, 62,162,141,130, 22,123, 38, 34, 35, 35, 35, 46, 92,184,144,218,165, 75, 23, -132,132,132, 80,195,135, 15, 55,122, 78, 12,187, 63, 58, 68,254,107,214,172, 1, 65, 16,224,112, 56,184,112,225, 2,152,120, 99, -204, 60, 18, 47, 16, 4,129,151, 95,126, 89,107, 40, 82,199,196,196,212, 9,133, 66, 44, 88,176,128,156, 56,113,162,205,223,110, -186, 43,105, 89,202, 93,128, 0, 18,222,249, 39,107,241,206,119,221, 17, 51,220, 21,203,159,255,128,241,115, 49,177,252, 89,239, -192,195, 35,255,216,229, 43, 45, 94,231, 53,215, 33,195,195,195,169,204,204, 76,208,158, 0,154,184,194,195,195,237,234,228, 15, -154,252, 77,173,234,199, 61, 96,207,116, 74,224,169,211, 0, 40, 10, 37, 37, 37, 40, 43, 43, 51,150,153,159,219,176,254,185, 71, -143, 30,157, 24, 26, 26, 10, 46,151,139,220,220, 92, 80, 20,133,191,255,254, 27,106,181, 26, 4, 65,128,199,227,129, 32, 8,232, -116, 58,200,229,114, 28, 56,112,192,166,220, 19, 39, 78, 72, 1, 96,198,140, 25,247,181, 91,122,170,135, 38, 10, 38,237,218,220, -173,111,235,156,137,149, 79,195,218,116, 0, 19,215,191, 57,210,211,211, 97,176, 12, 91,166, 0,127, 66,128,248, 76,175,192,153, - 42,175, 20, 69, 1,159, 16,152,121, 35,218,225, 64, 89,130, 32, 40,195,123, 49,146,145,225,125, 17, 45,145,215,189,123,247,251, -200,205, 81,184,186,186, 82,215,174, 93, 67, 69, 69, 5, 81, 81, 81,129,176,176, 48,170,160,160, 0, 92, 46, 23, 90,173,214,161, - 47, 24, 61,156, 75, 43, 15, 88,182,108, 25,214,174, 93,139,211,167, 79,131, 32, 8, 76,158, 50, 31,119, 10,152,109,224,120,228, -200,145,223, 12,239, 88, 9,128, 52, 28,136,137,137,169, 5,224,155,156,156,140,168,168, 40,161,169, 66,222, 28,244,214,255,253, -251,152,232,167, 3,128, 93, 59,179,236,146,199,226,241, 37,255,102, 61, 0, 6,235,159, 48,245, 4,208,150,127,102,102,102, 75, -200,223, 86,128,146, 67,242, 76, 60, 19, 66, 56, 16,224,244, 0, 44, 39,202,100,240, 49, 62, 15, 93,230,172,224, 23,106,175,159, -241,112, 6, 26, 38, 45, 52, 30,118, 88,254, 20, 61,216,118,232,208, 1,131, 6, 13,194,160, 65,131, 0,192,120,110,126,175, 21, -248,250,251,251,247, 81,169, 84,168,174,174,198,185,115,231,144,145,145,129,138,138, 10, 40, 20, 10,208,115,164, 20, 69, 65,163, -209, 64,165, 82, 49,154, 98,160,219,134, 53,114, 79, 76, 76, 36, 8,130, 0, 83,207,204,193,131,191, 25, 15, 38,231,182,160, 56, -247,118, 19,162,167, 15,211,115,211,123,152, 98,212,168, 81, 72, 79, 79,111, 89,131, 48,153,243,135,126, 26, 75,100, 32,103,130, -190,134, 22,198,222,152,190, 23,218, 11,224, 44, 56,195, 11,208,190,125,123, 20, 23, 23, 19,230,202,174,163,228,127, 32,241, 61, - 99, 27,166, 49, 98,196, 8, 0,192,169,179,204, 23,107, 68, 69, 69, 69, 26,230,254,175, 3,144, 27,198,115,250, 48,106,221, 76, -131, 11,155,206,253, 91, 80,174,236,148,199,226,241, 7,143, 73,231,164, 61, 1,246, 90,254,203,151, 47,167, 86,173, 90,229,180, -135,181, 37,207, 48, 72, 57,173,113, 50,157, 67,107,142,116, 76,100, 53,136,197, 98, 79,107,215, 29,133,233,220,191, 51,148, 0, -211,185,127,166, 74,192,236,217,179,225,225,225, 1, 79, 79, 79,120,121,121,193,199,199,135,244,243,243,227, 36, 39, 39,227,213, - 87, 95, 53,222, 39, 16, 8, 48,126,252,120, 52,163, 4, 4,168,213,106, 84, 87, 87, 67,169, 84,194,199,199, 7,174,174,174,208, -106,181,160, 40, 10, 58,157, 14,106,181, 26, 26,141, 6, 58,157,206,174,248, 2, 67,208,154,213,235,166, 86,232,163,132,173,128, - 64,123,209, 82, 37,128,248,204,250,116,223,204, 27,209, 6,114,117, 80,182,153,245,111, 82,142, 25, 51,102,216, 29, 12,104,110, -253,155,202,115, 20,225,225,225,148, 78,167, 67, 88, 88, 24,117,233,210, 37, 34, 44, 44,140,210,104, 52,144,201,100, 14,203,164, -141, 41, 30,143,135, 37, 75,150,224,194,133, 11,248,103,222,159,121,155, 62,122,244,232,209,145, 35, 71, 2,128,151,129,244,229, - 0,176,123,247,238, 86,167, 78,157,242, 54,244, 15,194,240,215,166,224,181,223,173,197,203, 67,239,183,254,103,127, 47,199,238, -115, 26, 80, 20,133, 1,179, 6, 32,107,103, 22,241, 40,141, 43, 22,206,177,254,109,122, 0,104, 75,149,110,176,166,241, 0, 76, -176,106,213, 42,218, 98,112, 10, 24,200,115,120,126,221,176, 68,175,201,145,154,154, 74,210,171, 2, 90,106,177,199,198,198,122, - 62,205, 13,110,203,150, 45, 88,179,102, 77,147,118, 69,147,255,148, 41, 83, 48,101,202, 20,189,133,115,234, 84,115, 98,252,243, -243,243,149, 58,157, 14, 53, 53, 53,168,172,172, 68, 77, 77, 13,228,114, 57,228,114, 57, 26, 26, 26, 80, 87, 87, 7,153, 76, 6, -133, 66, 1,149, 74, 5,157,206,182,197, 68, 16, 4,246,237,219,103,151,194,246, 36, 35, 61, 61,189,201, 97,138, 37, 75,150, 8, - 77,207,153,204, 57, 91,152,243,111, 98,185,183, 36,144,203,210,103, 41,138, 34,246,237,219,231,212, 88,128,125,251,246,217,221, -135, 7, 14, 28, 72,233,116, 58, 99,130,150,176,176, 48,138, 36, 73,220,187,119, 15,141,141,141, 14,253,230,127, 47, 31,141, 83, -167, 78,129,220,227, 11,138,162, 16, 31, 31,111,124, 71,233,231, 72, 48,157,249,136,138,138,122, 17, 0, 98, 98, 98, 74, 12, 10, -128,106,215,174,132, 86, 11, 23, 46,108,117,234,212, 41, 76,152, 48, 33,194,158,156, 0,101, 41,119, 65,128, 64,130,137,245, 63, -235, 59, 57,184, 47,203,176,235,156, 26,139, 23, 47,198,170,163, 95,179,204,250, 20,145,191, 77, 15,128,249,188,191,105, 60, 0, -211,105,128,196,196,196, 52, 67,128,144,212,204,147,228,232,128,113,159, 60,122, 90,192, 48, 15,233,148, 9,246,113,227,198, 93, - 77, 77, 77,237,243, 56,190, 96,218,234,119,150,219,159,182,250,237,112,251, 55, 65, 66, 66,130,241,255,255,252,231, 63,248,241, -199, 31, 1, 64, 13,128, 79, 19, 63, 0,140, 31, 63,222,150, 2,160, 8, 13, 13,133, 92, 46,135, 90,173, 70, 69, 69, 5, 92, 93, - 93,193,227,241,140, 30,128,198,198, 70,200,229,114,168, 84, 42,200,100, 50, 76,159, 62, 93,180,127,255,254,102,159,143,182, 50, -109, 44,107,197,140, 25, 51,108, 42, 10,122,133,230,193,197, 0, 56,114,221, 28, 38,203,253,238, 67,124,124,188,116,201,146, 37, -162,248,248,248,180, 71,218,134,173, 88,255,166,176, 39, 22,192,154,245,239, 40, 6, 14, 28, 72, 93,188,120,145, 8, 11, 11,251, -148,110,218, 58,157,238, 19, 15, 15, 15, 84, 86, 86, 58, 52,198,124,252,225,104,164,165,165,129,216, 23, 0, 0, 56,246,177, 23, -198,127, 81,143, 81,163, 70,225,203, 85,167, 64, 81, 20, 99,111,197,145, 35, 71, 14,140, 30, 61, 26, 0, 42,118,239,222,217,254, -212,169,211,190, 20, 65, 97,226,132,137, 83, 14, 31, 62,156,116,248,240, 97, 70,114,104, 47,231,218,181,107,241,242, 48,151,166, - 22, 63, 40, 44, 89,188, 4,173,199,183,193,211, 26,183,244, 84, 27,101,171, 62,180,170, 32,132,133,133, 53,175, 0,152, 70,252, - 27,200,223, 24, 44, 69,123, 2,152,106,254, 22, 72,187, 69,176, 32,207,233,115, 82,177,177,177,125, 82, 83, 83,157, 57,224, 61, -173,237,140,128, 62, 10,220,104, 73,191,254,250,235, 0,192, 55,105, 75,198,107,134, 65,203, 26,174, 13, 29, 58,244,213,180,180, -180, 68,157, 78,135,186,186, 58,104, 52, 26,227,188,191, 82,169, 52, 46, 49,164, 3, 3,247,239,223,159,198,160,189, 16, 48, 44, - 1, 52,111,183,209,209,209, 20, 77,250,227,198,141, 19, 49, 81, 0, 30, 84, 30, 0,211,185,127, 83,242, 55,159, 22, 96,240, 62, -154, 3, 21, 31, 31, 47,125,233,165,151,176,103,207, 30, 71,189,101, 66, 83,207, 9,125, 78, 7, 12,206,188, 17, 77,221,186,117, -203,234,231,233,132, 63, 71,143, 30,181,234,177,187,125,251, 54, 99,207, 76,117,245, 56, 10, 0, 34, 34,242,145,159,159,111, 49, -186,188,170,106, 44,128, 26, 0,182,199,173, 94,189,122, 81, 23, 47, 94, 36, 12,131,229,167, 0,192,225,112, 62,185,115,231, 14, -106,106,106, 28,234,200, 28, 14,161, 87,216,105,242,191,172,197,143, 82, 53, 0,224,203, 85,167,236, 30, 35,232, 62,177,112,225, -194, 48,138,162, 16, 53, 41,106,250,161,164, 67,191, 50, 37,126, 83, 81, 47, 78,125,225, 58, 65, 16,189, 40, 10,224,190, 44, 3, - 69, 81, 88,178,116, 9,218,140,111,219,194,188,170,250,101,189,116,187, 99, 51, 9, 62,126,104,110, 21,128,113,240, 54, 91,198, - 70, 37, 38, 38,218,237, 50, 53, 33,109,167, 60,184,169, 60,122,253,255, 83,186,188,238,137,128, 89,221, 55, 89, 34,102,229,218, -125,131,129, 88, 44,214, 74, 36,146,253,163, 71,143, 94,148,156,156,188, 78,171,213,162,182,182,214, 24, 3, 0, 0, 21, 21, 21, -168,173,173, 5, 69, 81,176,167, 61, 69, 68, 68,136,142, 31, 63, 46, 77, 76, 76,108, 98,125,210,159,143,136,136,176, 43, 25,208, -131,128,226,220,219,142, 16,254,125, 4,111, 99,200, 38, 8,130,160, 28, 33,127,131,167, 45,205, 82, 95, 4, 0,147,160, 64, 70, - 88,176, 96,129,148,193,119, 50, 54, 52, 76,167, 42,239, 39, 34,102,201,241,186,118,237, 74, 93,191,126,157,118,249,127, 10,224, - 19,149, 74,133,188,188, 60,200,100, 50, 71,169,144, 34,247,248,225,216,101,253, 74,189, 29, 82, 53,118,159, 83,131,162, 40,156, - 62,239, 56, 39,166,167,167, 99,194,132, 9,162,195,135, 15,167, 29, 74, 58,228,168, 24, 14, 73,146, 46, 0,176,231,188, 6,139, - 23, 47, 70,155,200,182,204,213, 73, 11,104,108,108, 4, 0,228,231,231, 83, 91,182,108, 49, 42,100,166,177, 36, 59,118,236, 48, - 29, 31, 88,247,130, 19, 65, 91,247,150, 44,127,243,235,205, 77, 1, 16,134, 41,128,251,150, 77,217, 51, 5, 96,113,160,112, 30, -233,152,202,115,234,250,127,122,238,223, 81,216, 82, 72,236, 85, 88,172,185,251, 29,157, 6,176,230,238,119,112, 26,192, 52, 40, -136,176,227, 26, 44, 40, 1, 20,128,245, 18,137,100,115, 66, 66,130,134,207,231, 67,165, 82, 65,171,213,130, 36, 73,248,250,250, -162,166,166, 6,246,102, 83, 60,126,252,120, 26,244,235,254,169,125,251,246,193,160, 8, 24,151, 6, 30, 63,126,252,127, 98,112, -120,233,165,151,168,198,198, 70, 28, 58,116,200,222,246, 44,180, 81,223,212,204, 27,209, 34, 38,222,184,247,223,127,255, 62,227, -194, 28, 31,124,240, 1,197, 52,200, 83, 44,246,179, 41, 79, 44,246, 99, 36,204,205,205,141, 30, 36, 41,138,162, 32,151,203, 81, - 90, 90,234,240,156,191, 41, 34,191,168,111,114,222, 18,242,215,233,116, 4, 0, 56, 96,241,155,131, 60,248,123, 82,119,211, 76, -128,206, 66,115, 10,153,137, 2,192,226,113,244, 0, 24, 94, 28, 97, 79,249, 35,182, 64,211, 30,179,231, 33,236,176,152,109, 40, - 34,227,156,246, 92, 51,103,206, 20, 57,144,222,183, 89, 11,205,130, 5,218,156,117,202, 40,104, 76, 44, 22,107, 1, 16,211,167, - 79, 23, 22, 22, 22, 74, 21, 10, 5,116, 58, 29,122,245,234, 37, 26, 52,104,144,195,239,123,223,190,125,166, 75,206, 28,242, 26, - 61,232, 24, 0, 91,231, 76,244, 69, 67,116,120, 83,194, 57,125,218,110,183,191, 97,173, 63, 53,243,198,253, 10, 28, 69, 81, 20, -157, 35,192, 68, 33, 51, 6,204, 57,218, 55, 0, 96,239,222,189,132,179,250, 26,211,123, 0,160,186,186, 26, 93,187,118,165,234, -234,234,208,185,115,103,100,103,103, 59,101,172,227,188, 84, 3,130, 32, 48,229,133, 88,218, 13,131,213,171, 22, 24,255,183, 55, - 99,166,179, 32, 22,139,201,205,167, 54, 59, 85,230,156, 57,115, 12, 94, 23,137, 39, 0,173,225,160,196, 98, 49,105,114, 15, 59, - 29,240,184, 43, 0, 79, 16, 90,220, 73, 31, 87, 55,148,179,159,235, 1,120, 97, 30,104,189, 25,230,248,141,223,113,227,198,141, - 71,252, 70, 72,226,241,150,167,175, 43,123, 51,202, 89,197, 39, 77,246,177,160, 44, 93, 51, 88,222,105, 79,195, 64, 82, 86, 86, -102,124, 31,249,249,249, 78,123, 39, 18,201,102, 74, 44, 94, 64,252,254,155,132,209, 7, 28,221,222,213, 17, 24,150,245, 57,125, - 76,104, 78,185,102,221,254, 15, 31,150,166, 6,136,135,217,208, 88,176, 96,193,130, 5, 11, 22,143, 7, 56,108, 21,176, 96,193, -130, 5, 11, 22,172, 2,192,130, 5, 11, 22, 44, 88,176, 96, 21, 0, 22, 44, 88,176, 96,193,130, 5,171, 0,176, 96,193,130, 5, - 11, 22, 44,158, 10, 52, 89, 5, 64,231,188,118, 4,150,130, 9, 89,121,172, 60, 86,222,195,147, 23, 23, 23,215, 84,187,231,112, -140,217,229, 76,151,154,209,217, 20, 77,151,158, 89, 74, 31,236,233,233, 9,129, 64, 96,252, 60,135,195, 1,151,203,189, 79, 30, -189, 49, 19, 73,234, 87,121, 89,219, 44,135,125,191,214, 33,145,108, 17,114,121,174,160, 72, 45,230,207,127, 35,205, 17,121,155, - 55,111, 22,101,103,103,243,194,194,194, 82,205,179,238, 57, 40, 79,152,157,157,141, 77,155, 54,165,177,253,237,201,147,103,183, - 2,240,191,136,192,192, 55,154, 84, 92,101,229,118,226,177,146,247, 70, 32, 5, 0,149,219, 43, 9,211,255, 91, 32,178,133,201, - 61, 31,184,188,255, 89,108, 93,183, 70, 88,113,245, 28, 70,249, 85, 72,219,107,139,144, 67,117,197,133, 70,127,145,119,232, 16, - 44, 90,186, 44,205,214,231,207,156, 57,131, 17, 35, 70, 24,137,159, 38,108,130, 32,238, 35,108,146, 36,141,199,157, 59,119, 44, -202,187,120,241, 34,194,195,195,225,230,230, 6, 30,143, 7, 46,151,219, 68, 38, 77,250, 58,157,206,120,168, 84, 42,100,102,102, - 34, 36, 36,228,169,123, 63, 18,137,132, 16,139,197,212,230,205,155,133,127,255,253, 55,110,221,186, 37,245,245,245,197, 47,191, -252,210,162,246,191,101,203, 86,161,171,192, 31,190,126,207, 72, 27, 27, 74, 68, 91,182,108, 19,110,220,104, 95,238,135, 77,155, - 54, 9, 19, 19, 19, 79,230,228,228,224,208,161, 67, 8, 13, 13,197,123,239,189,199, 53, 93,123,239,128, 60,105,126, 94, 46, 66, -130,187,129,239,234,138,197,139,151,140,137,141,141,101,183, 2,126, 90, 61, 0, 79, 18, 34, 34, 34,108,106, 60,199,143, 31,183, -217, 49,105,130, 54, 39,110, 71,225,108,121, 15, 0,132,157,164,109, 51,181,172,147,229, 49,249,188,249,247, 63,217,196,178,121, -179,240,250,153, 99, 40,220,253,141, 84, 46, 87, 65, 51,132, 3,183, 14, 4,186, 23, 94,198,179, 94,148,180,166,226, 47,180,219, -252,255, 68,211, 23,124,214,172, 18,112,253,250,117,112,185, 92,140, 28, 57, 18, 60, 30,207,120,208, 10, 1,109,245,107,181, 90, -232,116, 58,104, 52, 26,220,185,115, 7, 39, 79,158,180, 40, 79, 46,151, 35, 43, 43, 11, 67,135, 14, 5,159,207,135,139,139, 75, - 19,153, 36, 73, 66,171,213, 66,171,213, 66,163,209, 64,161, 80, 32, 43, 43, 11, 13, 13, 13,143, 3, 89,115, 12,109,131, 3, 64, -219,146, 60,244, 18,137,132,136,139,139, 35,227,226,226, 16, 16, 16,128,127,255,251,223,152, 49, 99, 6,234,235,235, 17, 16, 16, -224, 80, 6,210,128,128, 0,227,243,124,244,209,135,248,121,103, 38,220,220, 90,129,203,229, 75, 27,234,139,236,150,153,145,145, -129,134,134, 6, 12, 29, 58,244,206,184,113,227,218, 86, 85, 85,225,216,177, 99,186,249,243,231, 99,235,214,173,205,246, 17, 85, - 65,238,125,117,115,229,230, 77,164,121,185, 99,105,252,103, 69, 3, 6,246,233,120,183,184, 28,199,146,211, 78,238,218,181,123, - 92, 76,204,203, 39, 88,234,124,252, 65,167,254, 53,243, 20, 48, 82, 0,204, 83,183,218, 58,127,232,228,255,230,155,111, 54,123, - 79, 77, 77, 13, 0, 80, 76,148, 0,154,172, 91,106,173, 63, 8,121,166,150,191, 19,172,127,123, 73,155, 41, 89, 59, 91,158,233, -189,166,127, 1, 0,213,213,250,204,136,254,254,169, 79, 69, 71, 45,248, 51, 21, 33, 69, 82,105,145,156,196,180, 16, 46,158, 9, -210,130,244,167,224,226,207, 69,125, 21, 31,110,245, 10,244,204, 94, 47,253, 57, 62, 78,244,234,146, 21, 86,149, 0,130, 32,112, -227,198, 13,240,249,124,140, 25, 51,198, 72,218, 46, 46, 46,224,112, 56,160, 40, 10, 26,141, 6, 90,173, 22, 42,149, 10, 69, 69, - 69,144, 74,165, 86,183, 84,230,112, 56,208,104, 52,200,206,206,198,200,145, 35,225,230,230, 6, 87, 87, 87,163, 60, 90, 1, 80, -169, 84,104,104,104,192,149, 43, 87,160, 84, 42,141,211, 4, 76, 16, 19, 19, 35,228,114,185,210,250,250,122,240,249,124,148,151, -151,191, 61,109,218,180,122,129, 64,240,179, 35,164, 29, 19, 19, 51,147,203,229,238, 73, 78, 78,166,229,229, 76,155, 54,237,111, -137, 68, 50, 67, 44, 22,171, 29,177,132,227,226,226,164, 43, 86,172, 40, 7,208, 10,208, 79,181, 92,191,126, 29,173, 90,181, 66, - 88, 88, 24,126,250,233, 39,187,201,255,135,185,115, 49,113,192, 0, 0, 64,155, 69,139,224,230,222, 26, 13,117,133,168,147,229, -137, 98, 99,231,165, 89,203,231,110, 13,253,250,245, 67,121,121, 57,206,156, 57,211,153,195,225,224,202,149, 43,240,247,247, 71, -122,122, 58, 94,123,237, 53, 42, 59, 59,187,217,207, 87,125,181,180,201,185,167, 90,131,118, 90, 37, 22,191,255, 73,199,248,213, -255,193, 55,171, 55,162, 61, 71,135,141,171,215,164,190,246,218,107,176, 37,143,197,227, 71,254,116, 57,211,189, 0,238,203,255, -109,235,252, 97,194,153, 59,245, 61, 9, 48, 85, 2, 30,146, 39,192, 94, 75,157,176, 97,157, 59, 34,207,210,223,167, 42,113,213, -119,171,190, 20,134,102,255, 32, 45,231,234, 16,226, 3,116,238, 68,129,219,143, 15, 94,183,110,224,171,148, 80,157, 45,130, 74, -198, 3,151,116,129, 50,245,103,233,214, 13,171, 69,243,223,178, 60, 29, 64,187,231,115,115,115,225,231,231, 7,145, 72, 4,129, - 64, 0, 62,159, 15, 30,143,103,180,250,149, 74, 37, 74, 75, 75,113,234,212, 41,112, 56, 28,112, 56, 28, 52, 39, 79,167,211,225, -218,181,107, 24, 49, 98, 4,188,189,189, 33, 16, 8,192,229,114,161,213,106,161, 86,171, 81, 87, 87,135,191,254,250, 11, 42,149, - 10, 60, 30,207, 24, 11, 96, 11, 35, 71,142, 20,222,188,121, 83,122,251,246,109,212,213,213,129,207,231,163, 77,155, 54,235, 79, -159, 62,141, 97,195,134,241, 36, 18,201,143,246, 40, 1, 35, 71,142,156,122,243,230,205, 61,102,242, 66, 79,159, 62, 29, 58,108, -216,176, 93, 6, 37,128,145,188, 77,155, 54, 9,213,106, 53,202,202,202,104,151,183,177,146, 86,172, 88, 81, 18, 23, 23,215,126, -198,140, 25, 99,222,125,247, 93,187,198,191,173,219,126, 20,126,184,124, 89,147,178,178,117,235,208,230,197, 14,248,230,155,239, - 68,115,231,190,226,208,120,122,230,204, 25,233,159,127,254,137, 15, 63,252,176,142,203,229,122, 11, 4, 2, 12, 27, 54, 12, 82, -169, 20,201,201,201,104,223,190,189, 29, 61,143,192, 47,185,119,177,255, 86, 9, 14,254,254, 19,184, 92, 2, 75, 23,189, 74,246, -111, 19,200,217,178,248, 19,108,181, 87, 30,139, 71, 66,254,230, 74,164, 37,165,192,225, 85, 0,143,122,123,219,110,221,186,137, -108, 29, 15,219, 90,127, 16,242,156,104,245, 51, 37,109, 71,200, 26,166,214, 57,109,161, 27,228, 80, 14,202,179, 58, 80,251,251, -167, 58,100,253,111,216,176, 65, 56,111,222, 60,202, 90,153,249, 53,107, 48,189,127,195,134, 13, 66,243,107,230,101,205,214,215, -181,139,210,210,146, 58,180,242,226,161,155, 23, 5, 94, 32, 9,222,115,207,195,163,255,207,112, 27,248, 45, 92,125,220,192,111, - 80, 64, 46,215,161, 19, 87,142,244, 4,235,169,100, 57, 28, 14,120, 60, 30, 92, 92, 92,112,235,214, 45, 92,185,114, 5,222,222, -222, 8, 8, 8, 64, 64, 64, 0, 2, 3, 3,225,235,235, 11,153, 76,134,244,244,116,112,185, 92,227,220,190, 37,208,215,249,124, - 62,116, 58, 29,114,114,114,224,238,238,142,192,192, 64,180,106,213, 10, 65, 65, 65,240,244,244, 68, 78, 78, 14, 52, 26,141,113, -138,192,154, 66, 97,110,249,223,187,119, 79,154,151,151,135,174, 93,187, 34, 50, 50, 18,131, 7, 15,134, 92, 46,199,201,147, 39, -145,157,157,189, 93,169, 84,190, 98,135,229, 47,186, 87, 94,241,107,254, 93, 25,188, 66,134, 34, 52,242, 13,180, 31, 60, 5, 53, - 42, 14,142,167,158, 64,118,118,246, 52,165, 82, 57,159, 41,249,215,213,213,225,242,229,203,210, 51,103,206,160, 95,191,126,136, -139,139, 11, 4, 64, 26, 60, 0,237, 1, 64, 32, 16, 48, 38,235,173,219,126, 20,254,146,144, 36,244, 15,232, 35, 77,216,125, 25, -115,127,248, 1,201, 89, 89, 72,206,202, 66,155, 69,139, 0, 0, 26, 77,227, 41, 71,250,220, 11, 47,188, 64, 29, 60,120, 16,211, -167, 79,191,227,229,229,197,113,119,119,207,204,200,200,192,153, 51,103, 80, 89, 89,137,208,208, 80,251,148,210,172, 91, 88,253, -199, 85,108, 93,253,209,101, 30, 87, 1,142,174, 30, 95,175,253,129,179, 39, 61, 19,165, 28, 30,158,121,230, 25,150,101,159, 18, -240, 28, 37,248, 71,181,121,197, 3,179,176,255,183, 21,129, 7, 50,175,222, 66, 87, 61, 97,163,220, 46,165, 98,245,234,213,194, - 19, 39, 78, 72,115,115,115,173,150,101,100,100, 48,146, 69,223,151,145,145,129,234,234,106,233,234,213,171, 69,203,150,233,173, -114, 75,101,205,193, 91, 89,133,228, 66, 37,218,215,112, 49,192,155, 64, 80, 5, 16,194,243, 1,135, 8, 0,165,188,135,198,123, - 4,174, 21,146, 40,107, 84,130,199,225,160,175,191,171,212,218,239, 54, 85, 0, 92, 93, 93,145,151,151,135,246,237,219, 35, 34, - 34, 2, 92, 46, 23, 36, 73,162,170,170, 10,103,206,156,129,139,139, 11,248,124, 62,212,106,181, 85, 5,128,246, 14,208, 74, 0, - 69, 81,200,207,207, 71, 72, 72, 8,124,124,124,208,208,208,128,172,172, 44,232,116, 58,184,186,186, 66,165, 82, 65,165, 82, 89, - 29, 59,232, 32, 58, 0,168,168,168,144, 22, 23, 23,163,127,255,254, 16, 10,133,232,208,161,131,168,177,177, 17, 65, 65, 65,210, -212,212, 84,156, 63,127, 30,190,190,190, 67, 37, 18,201, 78,177, 88,172,179, 85,143, 21, 21, 21, 39,239, 85,203,224, 31, 58, 20, -221, 70,190, 4,223, 14,161, 80, 53,214,162,240,207,195,184,117,226, 39, 90, 30,163,247,107,136,125,144,150,150,150,162,117,235, -214, 16, 8, 4,162,203,151, 47, 75,227,226,226, 56, 6, 15, 0, 0,220,140,139,139, 35,153,180,193,109,219,127, 18,250,250, 61, - 35,245,245,127, 6, 28,142, 11, 52,154, 70,108,255, 81,138,185,175,139,104,143, 2,230,207,159,143,160,160, 32,210,222,190,247, -234,171,175, 82, 9, 9, 9, 24, 57,114, 36, 6, 14, 28,216, 25,128,246,196,137, 19,225, 5, 5, 5,112,115,115,131,155,155, 27, -162,162,162,198,236,221,187,247, 36, 19,121, 59,255, 46,194,183,127,221,196,182,149,203,171, 59, 60,211,185, 95, 99, 67, 13,126, - 63,242, 23, 46, 95,249, 27,190, 20, 9,126,217, 61, 68,189, 61,123,220,158, 61,123,255,183, 92,176, 79, 16, 44, 77, 31, 89,243, - 10, 88, 83,213,137, 25, 51,102,152, 90,208, 68,116,116,116,115,231, 79, 44, 42, 43,183, 19,166,199,227, 38, 15,120, 32,238,255, -230,172,246, 22, 61,179,163,214,185, 61, 30, 0,123, 17, 19, 19, 35, 76, 74, 74,106, 66,254,150,202, 28, 65,110,110, 46,146,146, -146,164, 49, 49, 49,194,230,202,172, 18, 87,101, 17,206,221, 85, 64,174, 35,113,186,136, 68,153,150, 7,157, 42, 19, 53,215,223, -196, 79,139, 98,113,232,152, 12, 87,170, 40, 92,170,208,226, 90,149, 22, 85,165,101,205,122,229, 76,149, 0,129, 64,128, 59,119, -238,224,230,205,155, 0,244,113, 49,127,100,194, 62, 90, 0, 0, 32, 0, 73, 68, 65, 84,252,241, 71,147,185,252,230,230,235, 9, -130, 48,122, 1,104,121, 20, 69,161,168,168, 8,157, 58,117, 66,105,105, 41, 72,146,132, 64, 32, 48,202,106,110, 74,193, 20,133, -133,133, 80, 42,149, 8, 15, 15, 71,135, 14, 29, 68, 92, 46, 23,222,222,222, 24, 50,100,136,200,211,211, 19,133,133,133,168,171, -171,187,194,180, 29, 20, 22, 22,130,228,240,209, 62,108, 28,124, 59,132,130,195,117,129,155,119, 16, 58, 13,137, 2,223,195,143, -150, 87, 96, 75,206,230,205,155,133,181,181,181,210,146,146, 18,116,236,216, 17, 34,145, 72,244,243,207, 63,167, 85, 85, 85, 17, - 0, 48,116,232, 80,173,225,214, 80, 31, 31, 31, 72, 36, 18,155, 1, 15, 2, 65, 0, 2,130,250, 67,167, 85,161,252,110, 6,202, - 74,206,140,173,172,200,250,200, 32, 15, 0,112,175,172, 12, 6,121, 46, 76,219,158, 88, 44,158,145,144,144,128,217,179,103, 99, -214,172, 89, 0, 64, 30, 59,118,140,151,148,148,132,185,115,231,142,191,120,241, 34,113,246,236, 89, 34, 46, 46,142, 81,228,126, - 78,157, 28,203, 79, 93,194, 87,239,197, 98,228,164,113,254, 58, 74,139,189,191,158,194,247,235,127,198,145, 37,175, 97,107,255, - 78,232,228,195,195, 71, 31,197,177, 65,128, 79, 8, 46, 93,186,100,149,252,155,245, 0,152,207,237,219, 58,127, 26,241, 0,150, -224, 57,132, 47,158,253, 66,180, 96,193,130, 39,161,190,155, 76, 41, 60,224, 32, 61, 70,239, 33, 42, 42, 74,120,235,214, 45,169, - 90,173,110,182,172, 37,168,169,169, 65, 99, 99,163, 52, 42, 42, 74, 84, 84, 84,116, 95,217,225,195,135,173,190,187,236,106, 5, -100,106, 18,217, 21, 90,148,214,106,209,250, 15, 30,250,237,205,197,157,130,107,248,251, 79, 53,180, 60, 46,212, 36,160, 84, 83, -168,161, 72, 4, 53,179,173, 61,189,220,143,158,187,167, 35,246,239,221,187,135,206,157, 59,163,160,160,192,232,242,231,241,120, -198,251,237,157,206, 51,205, 33, 64,255,125, 64, 83,130,181,112,110,204,135, 77,178, 38, 73, 18,141,141,141,250,193,145,199, 19, -189,249,230,155, 77,222, 93,125,125, 61,239,224,193,131,152, 50,101, 10,103,249,242,229,247, 86,173, 90,165,181,213, 22, 9, 66, -175, 16, 41,228,247,208, 80, 95, 36,154, 55,239,181, 52,137, 68,146, 14,224,171,250,250,122, 28, 60,120,208,168, 56,134,132,132, -168,153,180,237,149, 43, 87, 78,249,230,155,111, 18,163,162,162, 48, 98,196, 8, 0, 32,207,158, 61,203,249,237,183,223, 32, 20, - 10, 39,109,216,176,225,184, 61, 21,115, 87,174,194,171,201,127, 96,241,204, 40,204,120,117, 58,228,202, 58, 28, 56,152,134,181, - 27,119,226,191,227,159, 69,183,242, 98,150, 77,159, 2,101,128,169, 7,192,217,160,204, 58,178,173,115, 22, 38,120,208,228,239, - 68,171,221,154, 71,193,209,249,255,230,218, 5,163,246,114,248,240,225,180,238,221,187,139,252,252,252,154, 45,107, 9,252,252, -252,208,189,123,247, 38, 68,111,169,204, 18, 20, 58,111,104, 8,224, 66,165, 10,229, 58, 29, 78,228, 43,177, 55, 81,137,147,197, - 65,200,229,251,160, 88,166, 65, 81, 61,137, 70, 45, 32,215, 82,112, 13,104, 99,147,152,233,245,253, 58,157, 14, 90,173, 22, 1, - 1, 1,240,244,244, 68,231,206,157,161,209,104,140,229,150, 18, 2,153,203,163,215,247,107,181, 90, 40, 20, 10, 80, 20,133,142, - 29, 59,162,164,164, 4,109,219,182, 5,143,199,131, 74,165,130, 90,173, 54,126, 47,147,233,193, 78,157, 58, 65, 32, 16, 32, 51, - 51, 19,197,197,197, 82,157, 78,135,186,186, 58,226,207, 63,255,148, 54, 52, 52,160, 83,167, 78,240,246,246,126,158,233, 24,213, -169, 83, 39,112, 72, 53, 74,178, 82, 81, 91,156, 3, 82,167,129,162,174, 2,133,127, 30,134,186,177,134,150,215,133,137,114, 67, - 35, 32, 32, 64,186,105,211, 38,163, 23,167,170,170,138,184,118,237, 26, 12,164, 77, 2,104,109, 41,225,145, 57,180, 90, 5,180, -154, 6,184,121,180,129,192,205, 31, 18,201, 22,161, 88, 44,214,174, 88,177, 34,192, 68, 30,182,110,221, 10,153, 76, 70, 47, 97, -188, 15, 43, 86,172,160,134, 15, 31, 78, 13, 28, 56,144,250,236,179,207,126,159, 50,101, 10, 38, 77,154, 4, 0,184,120,241, 98, - 93, 82, 82, 18,102,204,152, 49,229,196,137, 19,135,153,212,217,138, 21, 43,168, 17, 35, 70, 80, 47,191,249, 54,198,236, 59,133, -101,255,154,134,119, 62, 88, 8,165,186, 1,183,243,138, 32,145,236,197,111,147,135, 65,216,177,149,195,125, 99,194,132, 9,236, -184,254, 8, 17, 22, 22,214,132,244,205, 3, 1, 31,106, 42,224,232,232,104,161, 61,231, 15,205,210,183,178,102,223,220,218,103, -106,253, 91,147,247, 70, 96, 32,245, 70,224, 63,238,124,243,115, 91,158, 8,103,201,179, 98, 73, 59, 66,212, 15, 12,102, 74,132, -195, 30, 0, 0,216,181,107, 87,218,228,201,147, 69,166,201,105, 44,149, 57,130,144,144, 16, 76,158, 60, 89,180,107,215,174,180, -230,202,172,126,190,123, 8,186,123,112,225, 69, 0, 26,138,194,141, 26, 53, 18,114, 85,216,117,174, 20,127,229, 85,163, 84, 1, - 84, 41,117,200,107,160,112, 87, 69,161, 65,173, 17, 53, 71, 94,244,210, 60,181, 90, 13,133, 66,129,182,109,219,162, 79,159, 62, - 6, 69,207, 31,131, 7, 15, 54, 18, 54, 77,218,214, 8,155, 38,116,141, 70, 3,181, 90, 13,130, 32, 16, 28, 28,140,218,218, 90, - 20, 21, 21,161,186,186, 26, 93,186,116, 1,135,195,129, 90,173,134, 74,165, 50,126,198, 22,130,130,130, 68, 29, 58,116,192,181, -107,215,112,244,232, 81, 28, 58,116, 72,122,232,208,161,147,167, 79,159, 6,151,203,197,115,207, 61,135,110,221,186, 41, 96, 8, -188, 99, 32,111, 74,107,127, 31, 84,229, 95,194,223,199,127,196,181,195,155,112,227,176, 4,119,206,255, 6, 87, 14, 73,203, 43, -177, 37,231,173,183,222, 74,107,221,186,181,200,219,219, 27,217,217,217, 40, 46, 46,150,198,199,199, 11, 77, 21, 1,131, 39,128, -147,144,144,128,222,189,123,219,124, 54,181, 74, 6, 89,109, 46, 92, 92, 60,224,235,223, 67,234,225,217, 30, 63,252,240,139,144, - 32, 56, 67,233,123,188,106, 83, 33,253,239, 59,136,232,209, 96,181,109, 31, 62,124, 24,110,110,110,232,221,187, 55,186,116,233, - 66, 79, 31,104,107,106,106, 26,246,237,219,231, 27, 22, 22, 54,101,207,158, 61, 73, 76,219,110,114,242, 97,120,123,123, 98,212, -232, 33,242,176,129,253, 48,245,205,185,144, 19, 90, 84,148, 87, 99,193,162,207,177,106, 80, 8, 6,182,114, 92, 73,158, 48, 97, - 2,245,245,215, 95,179, 74,192, 99,162, 8, 88,194, 99,179, 23,192,163, 94, 85,224, 8, 1,219,139,237,149,122, 5,194,148,168, -233,178,199, 65,222,227,234, 81, 48,243, 4, 80,246,120, 0,104, 44, 91,182, 44,109,236,216,177,162,193,131, 7, 91, 45, 51,189, -214, 28, 76,239, 31, 59,118,108,147, 96, 63, 75,101,205, 90,135,174, 30,162,190,109, 3, 49, 60,192, 21,207,250,241,209, 78,192, -129, 43, 69, 65,160,210,162,147, 39, 15, 53, 20,133,171, 13, 90,228, 52,106,209,190, 85, 0,186, 60, 59,218,170, 44,218,234,167, -151,250,117,234,212, 9,253,251,247, 71, 77, 77, 13,106,107,107, 81, 91, 91, 11, 47, 47, 47, 12, 29, 58, 20,106,181,218,152, 19, -192, 26, 97,211,202,132, 70,163, 1, 65, 16, 8, 13, 13,133, 66,161, 64, 69, 69, 5,202,203,203, 81, 81, 81,129,198,198, 70,132, -134,134,130,199,227, 25,229, 89,203, 43, 96,174,148,181,110,221, 90, 20, 28, 28,140,219,183,111, 35, 37, 37, 5, 25, 25, 25,112, -119,119,199,152, 49, 99,208,191,127,255,195, 2,129, 96, 41,211,101,123,187,118,237, 74,106,221, 42,232,149,224,182,190,104,200, -251, 19, 57, 41,219, 81,146,241, 59,252, 92,117, 24, 55,118, 12,250,247,239, 63,231,221,119,223, 61,200, 68,150,183,183, 55, 6, - 14, 28, 8,138,162,112,238,220, 57,100,102,102, 74, 75, 74, 74,164, 95,125,245,149, 48, 46, 46, 78, 68,103, 78, 28, 52,104, 16, -210,211,211,109,202,155, 63,127,110,154,172, 38, 87, 84, 93,113, 5,174, 2,127,180,105,247,156, 52,168,205, 96,169,151,119,151, -195,223,172,254,126, 50, 45,111,215,187,238,216,125, 86, 5,107, 74, 79, 78, 78, 14, 2, 3, 3, 49, 98,196, 8,242,217,103,159, -133, 92, 46, 71, 99, 99, 35,214,175, 95,239,217,163, 71,143, 23,165, 82,105,146, 61,125,226,239,191,115,208,185, 83, 7,188,252, -242, 20,247,143,255,189, 24, 85,245, 50, 84, 86, 85, 34,246,157,207,241,249,212,177, 24,219,169,117,139,200,127,237,218,181,232, -211,167, 15,214,173, 91,199, 42, 1, 15, 17,166,243,254,182,240,208, 50, 1, 58,115, 85,129, 33,185,143, 83, 50, 1,218,130,121, - 34, 30,103, 40, 1,206, 36,107,103,203,115,198,171,134, 19,210, 3,155, 41, 16,132, 21,143,133, 93,120,235,173,183,210,204, 63, -103, 90,182,109,219, 54, 70, 50,233,251, 44,221,207, 84, 6,141, 29,187,246,164, 45,127,117, 38,180, 25,201, 40,144, 1,158,132, - 11, 58,123,114, 80,162, 35,192,117,229, 33,189, 92, 7, 37, 9, 4,185,114, 17, 60,104, 20,222, 93,189, 53,173, 57, 5, 64,163, -209,128,203,229,162,107,215,174, 24, 56,112, 32,234,234,234,160, 84, 42,141,235,243,213,106, 53,252,253,253, 49, 98,196, 8, 36, - 37, 37, 25,167, 4, 44, 65,167,211, 25,179, 8,246,236,217, 19, 6, 55, 61,148, 74,165,177, 63,211,158,132,158, 61,123,162,186, -186, 26, 13, 13, 13, 86,251,178, 57,153,159, 62,125, 58, 45, 38, 38,102, 76,239,222,189, 79,154, 36, 2,170, 29, 57,114,228, 73, -129, 64, 48, 91, 44, 22, 43,237,169,203,211,167, 79, 39,196,196,196,212,245,238,221,251,160,137,188,202,145, 35, 71,174,127,247, -221,119, 25,103,235, 89,184,112, 97,218,166, 77,155, 68,145,145,145,184,125,251,182,244,230,205,155, 40, 44, 44,132,151,151,151, -212,215,215, 23, 17, 17, 17,216,182,109, 27, 6, 13, 26,196,248,217,222,120,227,213,180,109,219,118,136,148,202,106,248,250,133, - 74, 61,189, 58,194,203,187, 19, 26,235, 75,146, 86,174,218,142,152,151,199, 97,215,187,238,198,122,178,100,177, 77,156, 56, 17, -201,201,201, 40, 46, 46,230, 84, 87, 87, 67,169, 84, 34, 61, 61,157,103, 80, 58,235,206,158, 61,107, 87,127,136,138,154,136, 3, - 7,146, 80, 87, 91,133,226,210,187,120,247,173,127,169,223,255,112, 5,127,234,152, 97, 24,161,170, 3, 92, 28,163,135, 9, 19, - 38, 80,159,126,250,169, 49, 29,116,112,112, 48,190,254,250,107, 0,160,142, 28, 57,194,166, 13,127, 68, 74,193,163, 84, 0,136, - 25, 51,102,152,186,208, 8, 51,119, 63, 97,175,251,223, 25,228,110, 36,249,202,237,176,149,109,207,158,224,191,202,202,237, 48, -117,197,155, 18,179,185,203,158, 9,105, 87,110,175,116,170,188, 39, 0,255, 83,131, 68,151, 97, 34,209,101,149, 86, 90,113,242, - 4, 92,180, 10, 92,174,167,144, 90,175, 5,159, 32, 16, 64, 81, 16,181,245,133, 95,155, 32, 81,135, 33, 66, 96,199, 30,155, 30, -128, 46, 93,186, 96,240,224,193, 80, 40, 20,208,104, 52,224,243,249, 70,194,166,173,244,160,160, 32, 12, 31, 62, 28, 41, 41, 41, -205,122, 0,120, 60, 30,250,247,239, 15,130, 32, 32,151,203,141,222, 5, 90,105,167,179, 11,146, 36,137,190,125,251,226,143, 63, -254,128, 61,193,149,187,118,237,146, 2, 32, 36, 18, 9, 1,192, 19,250,108,123,133, 98,177, 88,227, 72, 93,238,218,181, 43,201, - 32,207, 19,128, 63,128,106,177, 88,108,119,110,226,133, 11, 23,166, 1,192,134, 13, 27, 68, 46, 46, 46,200,207,207,135,191,191, -191, 20, 0, 74, 74, 74, 48, 97,194, 4,172, 89,179,198, 46,153,243,230,205, 73,147, 72,182, 8,213,106,153,200,173,174, 64,234, -237, 27, 12,119,207,118,112,247,108,135, 99, 39,238,129, 24,219,188,197,253,211, 79, 63, 17,243,231,207,167,170,171,171, 49,113, -226, 68,117, 64, 64, 0,159, 36, 73, 20, 22, 22,218,237, 17, 3,128, 29, 59,126, 34,196,226, 88,202,251,122, 38,222,122,235, 13, -116, 8,237,206,255,122,241, 27,228,142,141, 63,113,214,115,149, 14,181,229, 9, 19, 38, 80,203,151, 47,135,175,175, 47, 74, 75, - 75,225,230,230, 6,146, 36,225,225,225,129, 47,191,252,146, 85, 2, 30, 2,194,194,194,172,122, 1,152,166, 2,118, 58, 30,243, - 85, 5, 68,229,246, 74,139, 23, 28,180,254,137,237,149,247,203, 51,183,212,105,215, 61, 3,210,118,182, 60, 22,143, 17, 12,100, - 67,188, 20, 53, 65,232,163, 85, 73,185,119,242, 17,162,185, 11,175,128,214, 24,214,183, 7, 2,218, 7,138, 62,216,180, 51,109, -119,198, 66,155, 94,180,174, 93,187, 98,196,136, 17,198,249,120, 46,151, 11,149, 74,101, 76,221,107, 58, 77,208,177, 99, 71, 12, - 31, 62, 28,105,105,150,187,158,155,155, 27,194,194,194,192,227,241,160, 86,171,141,159, 51, 93, 58,104,186, 17, 16,135,195,193, -128, 1, 3,144,153,153,105,119, 29, 24,188, 3,245,134,163,197, 48,144,126,139, 55, 37, 48,120,136,140,253,112,211,166, 77, 66, -185, 92, 14,149, 74,133, 30, 61,122, 32, 62, 62, 94,106,223,115,197,166, 1,128, 68,178, 69,164, 80, 84,192,213,213, 15, 46,124, - 47, 41,135,195,195, 47, 9,135, 69,175,204,142,106, 86,222,214,173, 91, 9,137, 68, 66,124,251,237,183,164, 66,161, 0, 0,132, -134,134,218,149,126,217, 20, 18,201, 22, 98,219,182,173, 19,230,126,250,109,178, 94, 30,197, 9, 13,125, 6,161, 47,190,248,202, - 91,111,189,149,224,136,204, 85,171, 86,177,157,250, 49, 81, 2,154, 35,255,135,170, 0, 60,169,112,230,178, 63,115, 98,110, 41, - 81, 59, 81,158,179, 21, 6, 86, 1,113, 0,123, 14, 31, 73,107, 82,119,117,133, 56,125,187,144,241,231,163,163,163,225,231,231, -103,140,240, 39, 73,210,232,194,167, 61, 0,116,208, 31,189, 35, 96,112,112, 48, 8,130,192,238,221,187,239,147,183,118,237, 90, - 36, 38, 38, 26,239,213,233,116, 54,183, 3,230,243,249, 24, 52,104, 16,152, 68,199, 63,193,202, 90,139,219, 58,173, 8,232, 73, -125, 59,244,225, 88,164,148,137, 60,131,178, 68, 0,192,166, 77,155,168,133, 11, 23, 18, 39, 78, 56,190, 52,127,222,188,249, 71, - 12, 94, 19, 14, 73,146, 58, 14,135,227,102,239,244, 11, 13,214,186,127,188,148, 0,155, 3,181,163,251, 8,179, 96,193,130, 5, - 11, 22, 44,158, 92,112,216, 42, 96,193,130, 5, 11, 22, 44, 88, 5,128, 5, 11, 22, 44, 88,176, 96,193, 42, 0, 44, 88,176, 96, -193,130, 5, 11, 86, 1, 96,193,130, 5, 11, 22, 44, 88, 60, 21,104,178, 10,224,210,165, 75, 14, 71,112, 90, 10, 38,100,229,177, -242, 88,121, 79,165, 60,234,133, 23,197,248,253, 55, 9, 36, 18, 9,199, 82,182, 62,182,254, 88,121,157, 58,117, 50,222, 83, 88, - 88, 72,176,245,247,112,229,217,173, 0,208,157,187,153,251, 29,121,192, 39, 89,158, 35, 50, 31,247,223,219, 4, 18,137,132, 15, -192, 27,128,187,161, 61,144, 0, 42, 29, 73,158,242,128, 65, 57,235, 55, 91,169,211, 71,178,124,105,245,234,213,194,115,231,206, - 73, 79,157, 58, 5, 0, 24, 61,122, 52,134, 13, 27,198, 56,149,240,163,120, 15, 47,188, 40,198,196, 9, 3,181,128,152, 39, 22, -139, 73,176,203, 62, 89,152,161, 83,167, 78,212,228,201,193,198,243,164, 36, 80,182,148, 0, 22,143,216, 3, 96,236,225,123,239, -223, 0,130,152, 89,211,146,239, 33, 28, 32,222,135, 38,207,210,239,109,225,111,126,172,127, 47, 77,252,215, 46,159,254,113,239, -174,245, 99,219,180, 15,110, 45,147,105,224,227,227,130,178,146, 60,178,119,239,254,213, 18,137,100,176, 88, 44,190,109,143, 76, -241,156,254, 84,126, 94, 14,242, 10,148, 40,186, 75,161, 99, 91, 2,193, 93, 4,232, 22, 28, 10,201,142,236,199,165,243, 91, 82, - 36,232,189, 6, 30,250, 51, 94,185,114, 69, 26, 22,118, 20,155, 55,203,145,150, 6,124,242,201, 49, 20, 21, 21, 73, 39, 79,158, - 12,129, 64,128,210,210, 82,209,212,169, 83,225, 12,133,224,149, 87, 94,161,100, 50,153, 40, 34, 34, 2,239,188,243, 78,154, 3, -109,134, 35, 22,139, 49,113,194, 64, 50, 54, 54,150, 7,108,193,239,191, 1, 18,137,132, 96,154,179,159,197,255, 14,212,234,229, - 72, 73,137, 69,100,228, 22, 76,158,188, 10, 73, 73,250,190,199, 42, 2, 15, 7,108, 34, 32,123, 24,214,132,236, 9, 2, 32,247, -248, 61,181,191,117,253,186, 53,175, 30, 58,248, 67, 92, 72, 72,247, 30,211, 94, 28,141,142,237,189,225,235,227,138,154, 90, 37, - 74,238,118,228,220,202,175, 9, 60,116,240, 7,233,250,117,107,190,125,123,209,210,117,182,228,189,251,246, 44,225,237,156, 67, -210,242,210,108,188, 20, 5, 12, 15, 7,130, 59, 3,185, 5, 20,206, 92, 80, 32, 89,154,141, 41,227,189,169,174,161,147, 68,223, -173,223,233, 40,145, 57,211,242, 39, 44,200,126, 36, 74, 64,117,117, 53,222,121, 71,142,160, 32, 32, 58, 26, 88,185,178, 1, 89, - 89, 89,208,106,181, 16, 8, 4,104,213,170,149,244,208,161, 67,152, 63,127,190,104,235,214,173,118,213,221,194,133, 11,133, 87, -175, 94, 69,235,214,173,165,251,246,237, 35,126,249,229, 23, 0,144,166,166,166,226,141, 55,222,192,246,237,219,237,253,173,124, - 0, 72, 62,114,145, 3,108, 33,245,127,239,207,241,207,130,181,254, 1, 96,250,244,253, 72, 73,209,255,141,141,205, 3,237, 17, - 96,189, 1, 15,151,248, 77,203,205,149, 0, 54, 8,208,130, 23,224,105, 38,127,137, 68,194, 59,158,178,247, 99,209,168,129, 61, -166, 69,133,162,127,239, 86, 8,240,115, 3, 1, 2,222,158,174, 8, 13,246, 71,196,232, 46, 24, 61, 98, 64,231,227, 41,123, 63, -150, 72, 36,109,108,201,188,157,115, 72, 58, 50,188, 14,123,215, 3,115,163,129, 30, 6,207,159,135, 59,208, 51, 4,248,108, 9, - 48,180,127, 29,110,231, 28,146,182,228, 21,181,212,235, 97, 67,145,120, 36, 3,146,191,191, 63, 14, 29,114, 67, 69, 5,144,152, - 8,212,212,240, 16, 18, 18,130, 73,147, 38,209,219,189, 34, 45, 45, 13,153,153,153,210,213,171, 87, 11,153,202,141,140,140, 20, - 94,187,118, 77,202,231,243,165, 53, 53, 77, 61, 89, 10,133, 2,219,183,111,135, 72, 36,178,183, 62, 73, 0,248,253, 55, 9,146, -143, 92,228,252,254,155,164, 69,191,125,222,188,121, 20,125, 52, 87,198,176, 93, 80, 14,148, 53,139, 45,155, 55, 11,183, 44, 89, - 34,188, 52,127, 62, 85, 52,113, 34,117,126,206, 28,106,195, 59,239, 8,183,108,222, 44,108,201,111,110,105,155,177, 36,131,105, -217,131,150, 71,187,254, 39, 79, 14, 70,108,108, 74,147,191, 52, 38, 79, 14,110, 18, 31,192,226,193, 32, 44, 44,172,201, 97, 73, - 57, 96, 21,128,199,129, 5, 30, 34,174, 93, 62,189, 50, 36, 36, 36,116,240,192,182, 77, 27, 2,135, 0,159,207,133,155,128, 7, - 23, 23, 14,130,187,250, 33, 56, 56,164,213,181,203,167, 15, 73, 36, 18,171,158, 34,241,156,254, 20, 23,117, 88, 50, 23, 80,170, -128,219, 69, 64,141, 12,168,173, 3,118, 30, 4, 22,125, 10,196,173, 6,134, 13, 4, 56, 84, 29,196,115,250,179, 29,223, 4,125, -251,246, 21,253,254,123, 79,180,106, 5,204,154,197, 67,155, 54,207, 98,244,232,209,162, 67,135, 14, 17,147, 38, 77, 18, 69, 70, - 70,162,117,235,214,184,120,241, 34,246,236,217, 35,157, 62,125,186,240,251,239,191,111,150,128, 70,142, 28, 41, 84,169, 84, 82, - 23, 23,151,102,191, 91, 42,149, 98,236,216,177, 76,200,140,154, 61,123, 54, 37, 22,139,213,134,152, 17,152,144, 63, 1, 0,179, -103,207,182, 91, 65,203,200,200, 48, 30,205,149, 57,216,109,137,150,116,239, 45,155, 55, 11,187,221,188, 41,157,122,233,146,180, - 99, 78, 46,248,117,117,104,155,115, 19,194, 63,206, 75,131,178,179,165, 18, 7,149,128,140,140, 12,204,155, 55,143, 90,180,104, -145,195, 74, 4, 45,131, 73, 25, 83,121,230, 68,207,164,204, 22,104,210,167,255,170, 39,135,176, 29,254, 33, 18, 63, 19, 60,169, - 10, 0,101,225,112,154,224, 7,248,124,148,147, 31,147,178,183, 46,174, 93,207,158, 16, 26,236,111, 36,125, 75,219, 52, 11, 92, -121,208,106, 73,132, 6,251,227,218,245,236, 96, 0, 62,214,228,229,231,229, 32,106,140,254,255,163,233,192, 27, 31, 2,155,119, - 2,165,247,128,155,185, 64,214, 53, 10,169,103,129, 19,231,128,200,209,250,251, 91,160,155, 17, 15,240, 21, 63, 18,197,100,217, -178,101,105, 13, 13,250,120,203, 89,179,102,225,252,249,243,132, 68, 34, 73,163,175, 85, 87, 87,139,122,246,228, 97,254,124, 96, -192,128, 11,208,233,110, 74,139,139,139,173,122, 82, 22, 46, 92, 40, 36, 8, 66,202,116,115,152,242,242,114,155, 94,153,217,179, -103, 35, 33, 33, 1, 0,168,244,244,116,181,201,187, 32,104,226, 79, 72, 72,192,236,217,179, 31,229,120,224,104,153, 69,168,174, - 94, 69,215, 63,255, 52,108,130,164,134,150, 36, 65,106,116, 32, 53, 90, 4,157, 78, 71, 29,195,253,214,173, 17,238, 95,127,253, - 37,125,238,185,231, 30,184, 18,224,136,119,161,165,228,175,158, 28, 98,241, 72,137, 77, 97,217,249, 49,131, 69,203,174,153,224, - 55,202, 65,195,153,114,162, 60,226, 49, 24, 92,154,125, 6, 27, 65,133,148, 51,234,207,145,192, 69,137, 68,194, 75, 79, 63,210, -171, 93, 27, 79, 80, 20,112,250,124, 17,228, 10,253,174,171, 3,251,183, 65, 80,128, 27,138, 74,234,201,220,219, 53, 28, 30,143, -131,238,221,252,208,174, 93,136, 47,244, 91,180, 90, 68, 94,129, 18,195,195, 1,149, 6, 56,114, 10,144,158,167,208,174, 53,129, -110,157,128,177, 35,128, 30,193, 4,120, 92,253,214,226, 67,195,128,111, 36, 74,166,245, 77,216,249, 63, 83, 37,130,194,253,177, - 0,212, 35,106, 91, 0, 64,111,231,138,126,253,250,137,204,175,113,185, 92,105,175, 94,229,136,139,211, 63,230,138, 21, 57, 40, - 40,232,109, 85,150, 82,169,180,105,249,155,162,160,160,192,230, 61, 9, 9, 9, 70, 43,159, 86, 4, 76,174,209, 10, 2, 97,184, -246, 56, 56,237,136,150,142, 27,221, 43,171,164,106,141, 6, 28, 14, 7, 20,151, 11,146, 36,161, 33, 73,144, 58, 29,116, 58, 18, - 29,238,222,149,182,164,189,200,229,114, 0,144,206,155, 55, 15, 4, 65,216, 29,223, 97, 74,248,219,182,109, 35,154, 43,123,152, -228, 15, 0, 41,177, 41,136,220, 18,137,233,251,129,216, 20,253,255, 52,249,171, 39,135,128,159,148,203, 50,239, 67,132,169,219, -159,209,118,192,214, 86, 1,180, 96,117,128,181, 40,118, 71,162,219, 41, 27,131,187,195, 74,131, 21, 82, 37, 28,177, 34,154, 9, - 42,116, 68,158,213,207,208,223, 67, 0, 32,247,218,140, 93, 32,245,209,254,174, 0,128,162,210, 58, 40, 20, 90, 0, 64, 72, 55, - 63, 4, 5,184, 33,251, 90, 57,231,239, 91,213, 16, 8,184, 8,238,234,139, 26,153, 26, 0,172, 10, 46,186, 75, 33,184,179,254, -251,159, 31, 5,132,245, 34,224,202, 7,180, 90, 96,252, 72,192,215, 11,200, 47, 4, 34, 71, 1,157, 59,232,239,127,196, 32,204, -188, 39,143, 74,177,124, 32, 40, 47, 47,183,171, 31,214,215, 51,223,125, 55, 33, 33,129, 48, 81, 2, 76,189, 3,143,188,238,186, -117,235, 70,229,231,231, 19,142, 94, 55,135, 75, 94, 46, 84, 26, 53, 8, 46, 15, 58,138, 2, 1, 64,171, 35,161,209,146,160,116, - 58, 16,183,254,118,202,115, 95,189,122, 21,129,129,129,210,175,191,254, 90,244,193, 7, 31, 56,172, 4,152, 79,163,216, 75,220, -206, 34,255,194,194, 66,162, 83,167, 78,212,244,253, 77, 21, 2, 0,136,220, 18, 9,126, 82, 46,146,146,242,140, 43, 1,216, 88, -128, 71, 71,254, 86, 21,128, 39, 0,205,145,168,221, 4,219,194, 37,142,214,229, 62,224,213, 4,196,204, 26,123,191,131,240,241, -113, 65, 77,173, 18,129,254,238,136,158,210, 3, 90, 29, 9, 87, 87, 46,184, 28, 14, 40,138,194,164,241,193,136,138, 8, 6, 65, - 0, 85, 53, 10,248,248,184, 0, 64,181, 53,129, 29,219, 18,200,187, 67,161, 71, 48, 48,230, 57,125,101,223,204, 5,250,245, 0, -252,188,129, 9, 66,128, 36, 1, 30, 23,200,185,173,191, 63,191,136, 98,250,110,237,249,191,165, 3,201, 35, 89, 6,184,105,211, - 38,225,234,213,171,145,151,151,135,244,244,116,233, 55,223,124, 35,242,244,244, 52,110, 59,171,211,233, 68,215,175,183,146,254, -231, 63, 37, 32, 8, 2,229,229,161, 8, 13,237,130,156, 28,203, 83, 41, 36, 73, 90, 44, 31, 59,118,236,253, 94, 36,138,194,201, -147, 39,237,250,205,166, 74,192,227, 68,254,206, 80, 18, 76, 81,221,161, 61,248, 55,255, 6,229, 2,240, 73, 10, 4, 1,104,116, - 90,168, 41, 29,228, 90, 45, 20, 33, 61,128,235, 55, 91,252,236,125,250,244, 1, 65, 16, 14,145, 63, 0, 12, 30, 60, 24,219,182, -109, 35,250,245,235, 71, 53, 87,102, 11,219,182,109, 35,204, 9,223, 82,153, 61,136, 77,249,135,248, 1,220,103,249,211, 1,131, - 73, 73,121, 44, 83, 63, 2,242, 7,216, 32, 64, 83, 18, 49, 63, 90,108, 21, 82, 20,192,121,169,230,129, 61, 52,181,215, 79,255, - 29,204, 21, 24, 94, 89, 73, 94,101, 81,137,222,234, 91,179,233, 47, 92,186, 90, 14,141,134, 4, 73, 82, 6,165,133, 48,198, 6, - 20,149,212,163,172, 36,239, 54, 0,171,102,101,112, 23, 1,206,102,234,255, 15, 12, 7,178,174, 1,177, 49, 64, 72,103,189,219, -255,139,245, 0,223, 5,224,112,128,179,153,250,251, 91, 64,208,206,142,161, 48,127,223, 15,221, 26,185,126,253, 58, 4, 2,125, -157, 28, 62,124, 24, 9, 9, 9,210,180, 52, 61, 23,172, 94,189, 90,232,239,239, 47,189,113, 67,139,173, 91,129,172,172, 65,224, -114,123,136, 58,116,232, 32,178, 38,207,195,195,131,241,119,107,181,218, 39,190,227,154,146,127,183,110,221, 40,107,135,189,202, - 66, 94, 80, 43, 81,141, 90,133, 58,181, 26, 10,181, 6, 42,173, 22, 26, 74, 7,185, 70,131,122,181, 26,165,237,218,137, 90,242, -220,238,238,238,240,240,240, 16,109,219,182,141,112,196,253,111, 74,244,182,202,236, 81, 2, 6, 15, 30,108,179,140,137, 23,192, - 26,249,155, 90,255, 44, 30, 45,249,179, 10,192, 67,192,131, 94, 82, 72,237,245, 3, 5,198,138,134,182,119,239,254,165,185,183, -107, 64,146, 20, 62,124,119, 40,114,114,171,113, 35,167, 10, 4,129, 38, 1,129, 36, 73, 33,247,118, 13,122,247,238,127, 21,128, - 85, 63,113,183,224, 80, 28, 62, 9,232,116, 0,149, 15, 72,207, 3, 73, 39,128, 9,175, 3,162, 89, 64,218, 31,250,251,116, 58, -224,240, 73,253,253,143, 16,150,230,255,225, 12,101,207, 81, 84, 87, 87, 75,123,246,188,141,140, 12,224,252,121, 29, 58,116,184, -140,172,172, 44,233,228,201,147,169, 67,135, 14, 73, 83, 82, 82,112,239,222, 61, 12, 28, 56, 16, 47,189,244,146,104,255,254,253, -105,205, 37,241,161, 40, 74,100,205, 11, 96, 14, 90,241,176, 23,244, 20,192, 35,154,243,111, 2, 83,139, 62, 63, 63,159,176,118, - 88,186,191, 57,248, 13, 24,128,170,145,163, 80,173, 80,162, 70,163,130, 82,171, 69,131, 70, 7,153, 90,141,250, 49, 99, 17, 24, - 30,238,160, 87,144,192,224,193,131,209,183,111, 95,209,249,243,231,211, 90, 34,195,148,232, 45,149,181, 68, 9, 48, 29, 11, 44, -149, 49,129, 37,242,167, 45,127,243, 76,129, 44, 30, 62,249,179, 10,192,147,238,182,152, 89, 99,215, 52,128, 88, 44,214,245,238, - 55,114, 76, 94, 94,238,205, 63, 51, 75, 65,146, 20, 38,140,235,134,203,215,202,241,229,154,243,248,226,219,115, 70,242,255, 51, -179, 20,121,121,185,119,122,247, 27,249,182, 88, 44,214, 88,147, 41,217,145, 77,232,224,141,248, 31,244, 36,191,249, 11,224,191, -191, 2,162,161,192,128, 94, 64,218, 46,125,121,252, 15,128, 14,222, 45,201, 8,216,210, 85, 0,148, 13, 57,143,100, 46,178,177, -177, 17,125,251, 42,241,236,179,192,179,207, 2,131, 6, 81,200,207,207, 71, 82, 82, 18,254,248, 67,175, 61, 9,133, 66,132,135, -135, 51, 74, 15,188,127,255,254, 52, 38,196,174,213,106,225,229,229,101,183, 21,107,136,250, 55, 70,252,211,231,142, 90,176,244, -209, 92,153, 61, 74,128, 51,238, 3, 0,241,194,133,105,234, 33, 67, 68, 55,198, 71,136,202,158,121, 6,101, 46, 46, 40,235,209, - 3, 57,145,145, 34,221,115, 67, 69, 98,195, 20,141,189,120,246,217,103,209, 18,171,223, 84,134,173, 50,166,117,104,201,234,127, -246,217,103,109,150, 57, 2, 58, 71,192, 63, 73,129, 88,143,192,131, 2,147,165,128,108, 38,192, 7,104,153, 63,142,223, 33, 22, -139,171,214,175, 91,179, 54,229,232,158,247,139,239,214, 7,135,116,245, 67,212,248, 96,248,249, 10,240,255,219,187,246,248, 38, -170,109,253, 77,146,166,105,105,121, 83, 94, 90,105,121, 40,130,128,130, 88, 69,165, 81, 16, 99, 27, 64,218,136, 23,245,130,200, -105,229,120, 16,181, 66,208,123,188,162,247,120, 33, 28, 42, 92,185, 30, 72, 21,161,222,115, 84, 76, 11,150,242,176, 90, 78,234, -241, 40,120,160, 10,200, 67, 45, 45, 90,164, 64,161,208,119,210,100, 50,251,254,145, 76,153,166,121,204, 36, 83, 90,112,127,191, -223,252, 50,179,103,102,101,102,246,204,254,214, 90,123,237,181, 47,213,218,241,221,247,231,112,226,228, 37,148,151,159,248,122, -218,131,179,183, 2, 56, 21, 76,102,194,136, 84,237,151,165, 59,172, 95,151,214, 35,229, 62,224,157, 21,238, 76,128,229,191, 0, - 27, 63,118, 91,254, 46,116, 71,194,136, 84, 45, 62,251, 64, 14, 2,151,251,220, 78, 27, 5,112,230,204, 25,109,175, 94,125,173, - 7, 14,156, 7, 0,252,244, 83,119,220,126,251,205,232,211,167, 15, 52, 26, 13,206,156, 57,163, 77, 77, 77,149,148, 10,120,200, -144, 33,218, 31,127,252,209,234,207, 98, 99, 89, 22,195,134, 13,195,198,141, 27, 37,145,144,119,223,191, 96,155,132, 18, 11,224, -203, 90, 13,213,130, 13, 70,238, 82,200, 95,168, 4,180,121, 47, 14, 31, 14,187,190,195,181,208,165, 60, 55,177,255, 37,183,188, - 64,228, 47,132, 67, 63, 12,160,253,255, 87,196, 19,224, 79, 49,144, 52, 12, 48,140, 96, 57,185,199, 94,147, 16,247, 93,145,235, - 11,242,156,100,185,190,112, 2, 23,255,176,232, 5,179,217,108,254,232,232,225, 47,255,178,173,224,139,196, 1,131,135, 38, 9, -230, 2,216, 55,106,212,216,127,165, 78,159,255,114,102,102,102,147, 24,121,158,244,190, 76,230,188,177,100,203,206,159,240,223, -111,251,153, 11, 32,116,242,151,197, 97,210,213,200, 31, 0, 30,125,244, 81, 28, 58,116, 8, 79, 62,121, 0, 0, 48, 97,194, 4, - 60,242,200, 88,237,243,207, 63,223, 74,206, 95,125,245,149, 36,153,235,215,175, 47, 1,192,164,164,164, 36, 55, 52, 52, 88,149, - 74, 37, 20, 10, 5, 88,150,133, 90,173, 70, 76, 76,140, 54, 92,242, 7, 32,139, 18, 64,113,109,162,178,178,146, 41,202, 40, 34, -131, 22, 13,210, 98,136,239, 99,170, 50,138,172,212,250,239, 92,168, 36, 52,148,114, 55,188, 29, 33,143,233,226,215,215, 21,228, -241,158,128, 58,179,217,252,248,168, 49,247,240, 25, 99, 98, 0,244, 5,112, 6,128,205, 51,203,155, 36,120,187,247, 43, 78, 17, - 84,156,178, 1, 95, 30,234,236,231,208,149,242, 74,180,129,135,232, 91,175,225,200,145, 35,178,201,222,185,115,103,137, 92,247, - 39,232,247,103,188,202, 25,120, 18, 1, 81, 80,120, 43, 1,149, 75, 42,209, 85,191,189,107, 21, 98,179, 0, 2, 0, 19,234, 60, -194, 20, 20, 20, 20, 20, 20, 20, 87, 47,104, 16, 32, 5, 5, 5, 5, 5, 5, 85, 0, 40, 40, 40, 40, 40, 40, 40,168, 2, 64, 65, - 65, 65, 65, 65, 65, 65, 21, 0, 10, 10, 10, 10, 10, 10,138,107, 3,109, 70, 1, 28, 60,120, 48,228,168, 76, 95,193,132, 84, 94, -135,201, 11, 58,137, 77,103,202, 51, 24, 12,201, 0,172, 22,139, 69, 22,121,179,103,207, 78,230, 56, 78, 54,121,244,253,235, 28, -121, 11, 23, 46,156,157,153,153,249,113, 71, 94,159,217,108,142, 0,160,241,188,211,118, 0, 28, 0,146,153,153, 73,104,125, 80, -121,191, 37,121,114,121, 0,136,136, 69, 10,228,150,119,197, 64, 46,174, 34,164,113,173,232,235,243, 16,161,108,247, 43,144,135, -236,236,108,109,128,231, 41, 89,222,145,183,187, 35, 92,121, 60,102,222,190,203,154,208,189, 16, 0, 48,126,252,248,176,235,115, - 68,255, 45,184,161,223, 30, 68, 69, 69, 97,202,148, 41,157,253,126,144, 16,150,171, 89, 94,176,255,145,130,189, 29, 85, 41, 57, - 57, 57, 15,189,251,238,187, 47, 70, 68, 68,108, 83,171,213,165,106,181,250, 7, 0,102,165, 82,105, 97, 24,230, 47,102,179,185, -175,217,108,166,195,206, 40, 40,252,121, 0,124,125,228,132,248,255,198, 37,230,134, 38, 30,129,114,201,147,100,193,202,137,244, -244,116,114,226,196,137,160,228,106,177, 88,172, 70,163, 17,113,113,113, 62, 83,174,102,101,101, 89,165,144,181,197, 98,177,102, -103,103,107,179,178,178,172,251,246,237,179,122, 41, 2, 33,201,227,142,253, 39, 20, 55,191,142,247,255,238, 0, 0,112,199,254, -243,178,118,120,243,235,146,158,203,135,127,238, 70, 56, 2,124,244,169, 91,150,110,114, 4, 70, 13, 59, 10,192,173, 4,148,150, -150, 74,170,155, 85,111,107,147,107,127,174, 65,163,163,151,181,169,165, 27,116,211,106, 49,120, 0,131,132,132,185,164,190,222, -142, 45, 91,182,116, 86,131,206,132,248,110, 94, 17,121,129,190, 49, 25,191,185, 80,224, 16,190,127,121,121,121,214, 89,179,102, -105,243,243,243, 75,194, 17,250,238,187,239,234, 84, 42,213,189, 42,149,234, 81,165, 82,217, 75,161, 80,196,152, 76, 38,197,146, - 37, 75,230,187, 92, 46,176,110, 60,234,114,185,244,102,179,249, 43,143, 55,192,225,105,255, 58,188, 27,116,250,244,233, 68,236, -179, 47, 40, 40,144, 84, 33, 51,102,204, 32,225,156, 79,113,237,131,207, 8, 40,117, 58,224,160,228, 63,126,252,120,148,150,150, - 74,106,176, 2, 53, 56, 34,229,181,147,111, 52, 26, 81, 81, 81, 1,143,139, 88,182,105, 93, 73,213,120,130,168, 17, 96,122,125, -200, 0, 0,211,123, 41,147,158,158, 30,180,117, 21,146,117,117,117,181,213, 31,249, 27,141, 70,152, 76, 38, 73,228,239,217, 70, - 82, 82,146, 54, 41, 41, 41, 44,121, 60,217,243,191, 43,255, 11,109,200,127,105,154, 6,171,242,237,162,158,213, 71,107, 99,200, -232, 4, 5,154,108, 4, 47, 60,161,193,190,163, 44,108, 77, 4,205, 14, 64, 59,238, 40,142,254,228,194,248,241,227,137, 88, 37, -192,248,199,155, 72,249,119,245,136,237,174,198,128,129, 49,232,215,127, 24,126, 41,119, 96,200,205, 78, 68,104,170, 81,188,237, - 2, 30,124,240, 65,242,233,167,159,210, 6,239,234, 65,235,244,131, 22,139,197,170,215,235,145,159,159,111,245,245,189,238,223, -191,159,188,246,218,107,216,177, 99, 71,192,250,221,184,113,227,125,106,181,122,180, 90,173, 94,164, 86,171,163, 79,157, 58,133, -225,195,135, 67,169, 84, 34, 54, 54, 22, 39, 78,156, 64, 76, 76,140,106,255,254,253, 61,247,238,221,251,229, 51,207, 60, 51, 4, -192, 47, 0,212,112,119, 15,248,109,248,132,237,159,176,221,226,203, 25,134, 1, 35, 66,131,218,190,125,187, 95, 25,194,114, 41, -138,155,128,240,195, 58,191, 35,177,112,225,194,100, 79, 86, 74,138, 78, 34,253, 80, 61, 0,162,200, 95, 44,140, 70, 99,208, 99, -196, 16,151, 63,242, 95,185,114, 37,150, 45, 91,230,173,116,132, 68, 12,228,192,120,130, 62, 35,192, 36,124,200, 8, 45,254,188, -188, 60, 6, 0,248, 95,127,125, 46,222,100, 29,136,252, 61,158,129,160, 86,187,197, 98,177,122, 91,248,124,153,240, 25, 75,149, - 23,200,194, 95,154, 38,126,166,184,252,181,221,200,240, 27, 20,136,138,100,112,195, 32, 37, 46, 92,226,224,100,149,168,169, 37, -168,107, 36, 56,241, 43, 7, 40,128,190,209,135,249,231, 19,176, 81,120,249, 63,110, 76, 30, 49, 52, 17,123,207,158, 67, 66,124, - 63,140, 30,147, 8,101,100,111,220,144,112, 9,151,108,118, 84,159,117,225,215,115,118, 68,171, 42, 68,201,187, 2, 32, 50, 88, -246,178,203,243,199, 77,157, 72, 20,156,192,250,135, 70,163,209, 2,176,122,215,225,129, 3, 7, 68,145, 63, 0, 68, 68, 68,244, -212,104, 52,243, 46, 92,184, 16, 61, 98,196, 8,220,122,235,173, 80,169, 84,120,235,173,183,224,114,185,112,203, 45,183, 96,235, -214,173,216,191,127, 63, 14, 31, 62, 12,165, 82,249, 23,179,217, 60, 99,253,250,245,129,172,234,214,231, 39,135,199,210,108, 54, -107, 7, 12, 24, 96, 37,132, 4, 60,231,236,217,179,218,204,204, 76, 73, 15,148,151, 29,234,249, 60, 81, 31, 63,126, 60, 96,187, - 49,114,228, 72,173, 84, 50, 63,126,252,184,117,206,156, 57,232,209,163,135,150, 42, 2, 93, 19, 42,127,141, 79, 48, 75,189,171, -160,162,162, 2,203,150, 45, 11, 85,129,240,139,244,244,116,194, 12,202, 99,210,211, 19,136, 37,103, 34,176,249,110,194,196, 60, - 23,244,139,247, 69,214,222,164, 28,168, 91,192, 31,132, 10,197,190,125,251,172, 73, 73, 66,237, 17,236, 0, 0, 26,206, 73, 68, - 65, 84, 73,109, 92,255, 82,229,125,176, 36,198,111,227,246,216,234, 38,209,114,214,175, 95,159, 28,169, 92, 2,133, 2,136,142, - 2,106,235, 57,180, 16,130,110, 81, 12,236, 28, 96,107, 33,184,174,159, 2, 28, 11,148,157,114,161,162,162,194, 26,136,200, 22, - 63, 59, 53, 57,225,134,104,171, 90, 77,240,187,121,119,192,229, 34, 56, 91,237, 64,229,233, 90, 32,226, 20,162,122,181,224, 76, -245,207, 80,168,235,112,236, 88, 45,122,244, 10, 44,239, 10,130,241,241, 29,133,204,180,222, 19, 61,121,230,126,144, 44,239,226, -197, 41,109,182,123,247, 46, 14, 74,108, 18,149, 18, 34, 65, 73,113,241,223, 72,106,106, 42,120,210,183,217,108,173,117,200, 91, -254,133,133,133,162,234, 52, 50, 50,242,174,166,166,166,155, 70,142, 28, 9,173, 86,139,172,172, 44, 60,245,212, 83, 0, 0,167, -211,137,205,155, 55,163,180,180, 20,223,126,251, 45,182,108,217, 2,155,205, 54,140,227, 56, 93, 16,139, 93,214,247,105,231,206, -157,162,186,230, 24,134,145,252, 46, 11,101,135,114,190,231, 27, 46,153, 51,103, 14,170,170,170,124,238, 31, 52,104, 16, 66, 37, -240,170,170, 42, 84, 85, 85, 81, 69,224, 10, 67,232,238, 15,228, 13, 80, 73,181,216,229, 38,218,112,225,113,251,135,110,186,141, - 7,193, 64,128,217,225,254,112,152, 9,165, 76,122,122, 66,107,163,150,151,151,199, 32,103, 34,241,246, 4,136, 37,235,234,234, -234, 54,228, 28, 10, 89,139,133, 64,233,144,165,159, 88,224,254,247,121,240,134, 13, 27,200,249,163,207, 99,224, 8, 37,154,108, -151, 15,177,185, 8,236, 14,192,233, 41,115,178, 4, 68,225, 94,255,254,112, 41, 12, 6, 67,114, 89, 89,153,207,255,140,141,173, -179, 54,217, 20,232,219,187, 39,106, 47, 54,163,182,174, 22,251, 14,156,197,233,115, 4,234,110,205, 24, 60,172, 17,182,230, 11, - 24, 62,198,137, 33, 35, 91,176,229,157, 82, 60,252,240,195,201, 39, 79,158,164, 95,253, 85, 0,222,250,103, 24, 6,169,169,169, - 4, 0,118,236,216, 1,131,193,144,108, 52, 26,173, 82,200,223,108, 54, 71,214,214,214,206,117, 58,157,138,232,232,104,220,123, -239,189, 88,189,122, 53, 34, 34, 34,144,153,153,137,220,220, 92,148,150,150, 98,223,190,125,216,179,103, 15,190,255,254,123,244, -237,219,183, 47,203,178, 55,192,143,251, 95,232, 2, 13,214, 5,160, 80, 40, 68, 93,103, 71,118, 1,108,223,190, 93,150, 46,128, - 30, 61,122,104,171,170,170,172,254,246,133, 91,239, 84, 17,184,122, 60, 0, 87, 19, 24, 63,228, 36, 89, 11, 78, 79, 79, 39,150, -101, 39, 1,165, 26,232, 25, 1,244, 28, 2, 38,207, 35, 76,100,223,127, 7,128, 8,173,126, 0, 16, 90,254, 62, 26, 87, 36, 37, - 37,105, 3, 4, 3, 74,190,135,191,189,216,205,175, 71, 32,182, 62, 11, 63, 59, 8,206, 94,224, 0, 40, 16, 19,237,118,113, 58, - 89, 2,123, 11, 96,119, 0,246, 22,192,225, 4,236, 54,192,209,114,217, 75,226, 43, 32,229,111,111,119, 35,197,251, 26,112,125, - 66, 12, 72,132, 10, 23,108, 54, 88,191, 56,133, 99, 39, 78,227,226,197, 70,140, 26,239, 66,147,157,133,189,197, 5, 91, 51,135, -179,149,128,173, 9,216,182,109,155, 85,202, 4, 24, 20,178,121, 56,164,126,107,132,183,254, 53, 26,141,214, 98,177,148,240, 67, - 70,109, 54,155,117,194,132, 9, 82,100,177, 0,134, 1,224,198,141, 27,199,105, 52, 26, 69,110,110, 46,230,207,159,143, 21, 43, - 86,128, 16,130,111,190,249, 6, 95,124,241, 5, 14, 31, 62,140,186,186, 58, 12, 31, 62, 28,245,245,245,209, 10,133, 34, 46,152, -240,153, 51,103,250, 37, 84,169, 30,148,174,222, 5, 16,200, 11, 16,142,245, 79, 21, 1,170, 0,116, 8, 41, 26, 12, 6,173,160, -207,208, 91, 9, 96,132,214,134,199, 37, 31,146, 75,143, 39,253,188,188, 60,198,146, 51, 17, 80,171,193,228,229, 93,209,155,229, -163,254, 45, 22, 11, 99, 48, 24, 72, 48,111,136,119,108,128, 20, 66,247,133, 64,199,206,125,169, 9,131,250, 43, 48, 71,175,134, -189, 5,232, 17,203, 64,193,120,172,126, 16,216,155,129, 38, 7, 65,147,141,160,201, 78,192, 17, 64, 17, 32,230,122,238,226, 38, -220, 50,182, 2, 3,110,186,136,207,119, 87,227,226, 69, 59,198,221, 89,143, 49,189, 27,129,136, 22,216,155, 57, 84,159, 38,104, -106, 98,192,178, 12,122,247,101, 0,134,163, 95,241, 85,244,237, 10,222,213, 18,225, 47, 15,189, 94,223, 46,254,200, 71, 44, 0, - 95,233,195, 0, 28, 92,186,116,233, 93, 42,149, 42,230,253,247,223,199,166, 77,155,240,228,147, 79, 98,229,202,149, 96, 24, 6, - 63,255,252, 51,108, 54, 27,140, 70, 35, 88,150,197,211, 79, 63,205, 49, 12, 19,244, 3,144, 51,154,190,171,119, 1, 4,242, 2, -200, 97,253, 83, 80, 5, 64, 86,248,232, 71,102, 2, 28, 39,222,196,153,224,142, 80, 79, 79, 31, 76,128, 50, 88,222, 58, 9, 68, -141,104,245, 4,240, 74,129,152,110, 0,185,192, 91,243, 6,131,129, 8,173,127,222, 35, 32,220, 54, 24, 12, 16, 36,203, 33, 82, - 9,221, 27,130, 81, 0, 62,229,177, 46,160,169,153,160,197,225, 14,246,107,113, 16,168, 34, 47,239,179, 55, 3, 54, 39, 65,205, - 69,130,243,151, 8,190, 61,198,130,227, 0,131,193,160, 45, 43, 43,107, 87, 55, 44, 11, 84,157,114,224, 84,249, 37,252,115,239, - 37, 16,194,224,216, 15, 28, 82,231,176, 80,171, 8,206,159, 3,254,249, 25, 80, 95, 79, 64, 56,224,238,251, 24,104, 52,128, 78, - 55, 3,191,252,242,139,168,123,210,221, 9,178,123,111,135,196, 12,200,234, 33,242,244,249,135,141,222,189,139,187,156, 39, 97, -199,142, 29,237,202, 94,125,245, 85,178, 99,199, 14, 20, 22, 22,138,149,163, 0,112, 4,192,193,236,236,236,177, 61,123,246,140, - 1,220,110,240,247,222,123, 15,243,231,207,199,166, 77,155, 90, 45,245,236,236,108,212,214,214,162,190,190,190,177,185,185,185, -194,227, 65, 80, 7,250, 3,142,227,218,196, 67,241, 22, 60, 33, 68,180,251, 31,184, 58,186, 0,124,121, 1,228,182,254,121,153, -212,242,167, 10, 64, 88, 40, 45, 45, 13, 26,253,237,217, 47, 78, 96,100, 55, 88,134,252, 3,120, 59,129, 32,161, 27, 48,180, 5, -204,141,133, 12,222, 26,223,218,247, 31, 78, 55,128,247, 80, 64,127, 67, 3,125, 53,150,124,123,193,147,191,119, 0,160,199,138, -106, 45, 11,226, 1, 96,100, 38, 43,230,238,201,211,147, 79,159,217,109,229,250,113, 80,168,128, 8, 79,187,232,228, 8, 88, 22, -104,104, 32,112, 56, 1,214,233, 86, 10,102,204,116,123,111,252,184,236,153,164, 59,167, 39,183, 92,216,101, 29, 53,138,195,151, - 95,184,192, 40,128,243,103, 25,104,162,128, 47, 62, 5, 28, 54, 6, 12, 1,198,220, 22,129,170, 74, 14,147, 39,167,160,160,160, - 64,212,180,214,186, 59, 65, 86, 61,227,190,127,153,149, 0, 70,102, 5, 64, 22,121,193, 92,206,157, 65,254,190, 10,249,168,127, -225, 49,188,247, 46, 45, 45, 77,155,159,159,239, 79, 94, 35,128,147,223,125,247, 93,227, 61,247,220,211, 15,130, 49,253,239,189, -247, 94, 43, 33, 58,157, 78,184, 92, 46,148,149,149,161, 95,191,126, 23, 56,142, 19,165, 45,206,156, 57,211,159,165, 46,233,166, -175,134, 46, 0, 95, 94, 0, 57,173,127, 74,252,215,160, 2,224, 25,179,127, 69, 91, 24,222,202,181, 88, 44,188,197,203,248, 56, -134,240,228, 47,176,138, 37, 65, 56, 10,128, 47,147,106,249,123, 7, 0,122,208, 90,150,149,149,101,245,116,103,136,146, 39, 36, -127, 95, 49, 1, 82,229, 5,195,170,124, 59,130,201, 43, 40, 40, 40,233,211,147,193,253, 73, 17,224, 0, 56, 29, 28, 34,213,238, -199,212,208, 68,208,226, 36, 96, 93, 64,233, 17, 23, 92, 28, 65,176, 33,123, 5, 5, 5, 37,253,251, 49,152,156,172,196,195,143, - 41,209,216, 64,208, 80, 7, 52, 53, 48, 72, 24, 78,224,114, 50, 80, 41, 52,168,189,200,161,234, 87, 7,202,126, 16, 23, 48,166, -187, 19,100,237, 98, 96, 68, 60,176,238, 5, 96,209,155, 29,162, 4,200,233, 25,144, 69, 94, 7, 14,249, 11,229,217,113,190,200, -127,249,242,229,237,220,252,121,121,121,124,158,128, 18, 63,214, 63,224, 78,230,115,240,198, 27,111, 44,183,219,237,131,149, 74, -165, 38, 58, 58, 26, 0,144,159,159,143,180,180, 52,216,108, 54,216,237,118,180,180,180, 32, 38, 38,198,238,114,185, 10, 8, 33, -103, 69, 90,215,178,188, 31, 87, 75, 23,128,208, 11,192,175, 83,226,167, 10,192, 21, 35,127, 49, 50, 61,132, 79, 60,235, 0, 64, -132,195, 18, 75, 75, 75,219, 16,190, 47, 5,161, 29,148, 12,160, 86, 0, 81, 74, 32, 70, 5,180, 52,192,178, 34, 2, 88,251, 20, - 65, 84,111, 32,170,183,228,190,127, 63,228, 15, 31,100, 45,234,195,240, 38,127,239,152, 0,169,242, 36,144,127, 80,121, 53,181, -132,217, 89,226, 36, 26, 13,192,113,192, 45, 55, 42, 47,215,199,247, 46, 56, 93, 4, 46, 78,137, 89,179,102,137, 82, 78,206,157, - 39,204,238, 79, 93,132,101, 1,135,147,192,197, 2, 10, 6, 72, 78, 1, 26,106, 25,252,112,200, 6,155, 93,129,233,250, 89,216, -186,117,171, 40,242, 95,254, 20, 48,236, 58,247,246,208,193, 64, 7,121, 2, 40, 36, 32, 64,178, 31,146,146,146, 34,102, 52,128, -178,103,207,158, 7,109, 54,219, 95, 43, 42, 42,134,140, 29, 59, 54,145,101, 89, 85, 68, 68, 4, 10, 10, 10, 48,117,234, 84,216, -237,118, 52, 55, 55,163,172,172,172,190, 87,175, 94,127,183,217,108,239,115, 28,215, 4,145, 25, 0,133, 1, 9, 82, 93,255, 2, - 69,162,157,231,160, 43,118, 1, 8,189, 0,114,200, 9, 37,119, 0,197, 85,160, 0,116,134,229,239,195,250, 32, 94,215, 35,151, -149,226,215, 35, 32,214, 3, 32, 55,249,243,202,142,151,123,159, 8,203,164,202, 11, 22, 11, 32, 85, 94,147,157, 48, 77,118, 16, -133, 2,248,103,169,187,175,159, 15,248,115,247,251,207,146, 36,175,161,129, 48,140,194,147,147, 66,225,150,241,175,127, 0, 77, -141, 28, 8, 7, 76,159,158,130,173, 91,183, 6,173, 15,221,157, 32,198,199,129,158, 49, 64,213, 5, 32, 42, 18,224, 8,208, 77, - 3,188,145, 73,149, 0,137, 32, 34,190, 75,209,240, 69,254, 12,195,144,148,148, 20, 0, 64,106,106, 42, 97, 24, 38,144, 34, 16, -227,112, 56, 26, 21, 10, 69,241,160, 65,131,174,107,104,104,120,230,192,129, 3, 3,111,189,245, 86,142,101,217,230,186,186,186, -115,135, 14, 29,250, 57, 33, 33,161,188, 79,159, 62, 21, 54,155, 45,159,101,217,115, 25, 25, 25, 77,227,198,141, 19,165, 0,240, - 73,129,194,129,217,108, 22, 77,168,161,116, 1,132,115,190, 63, 47,128, 28, 47, 11, 37,255,171, 84, 1, 16, 49,214, 95,210,135, - 46, 33,119,128, 20,185,140, 32,202, 63,100,242, 98, 74,193,164, 39, 60, 72,240, 19,128,159,188,247,214,121, 22,105, 99,204, 61, -247,107,149,139, 92,189,158, 11,225,243, 12,120, 2, 4, 25,129, 55, 36, 36,121,127,123,177,155, 80, 41, 8, 69, 94,171,220,180, -180,203,117,194, 7,252, 89, 44,150,146, 80,228, 17,174,109, 29, 55,214, 3, 41, 41, 41,216,185,115, 39,195, 91, 85,162,234,227, -175, 87,156, 8, 59, 85, 94, 23,235,247,111, 99,177, 11, 55,188,201,159,143,219, 17, 6, 9,234,245,250, 64,242, 42, 29, 14, 71, - 36, 33,164,129,227, 56,179,195,225,248, 38, 62, 62,190,111,109,109, 45,243,202, 43,175,212,215,213,213,213, 12, 30, 60,184,161, -177,177,177,201,225,112,212, 59,157,206,150, 5, 11, 22,216, 36, 90,216, 97, 63,204,204,204,204, 14, 35,194,142,148, 77,241,219, - 84, 0,228,110, 61, 58,172, 53,242,144, 40,227,203, 90,150, 2,153,163,250,197,100, 11, 12,235, 15,164, 76,250, 35,135, 55, 32, -132, 58,241,187, 29,174,188,157, 59,119, 74,170,171, 14,176,238,127,107,242,228,148,205, 0, 64, 78, 78, 14, 81, 40, 20,224, 23, -161, 11, 91,167,211,129,227, 56,112, 28,135,140,140, 12, 38,200,168, 0,134,101,217,104, 66,136,139,227,184, 22,167,211,249, 15, -165, 82,201, 40, 20,138, 72, 0,145, 28,199,193,229,114, 41, 89,150, 85,179, 44, 59,112,193,130, 5,199, 5,231,118,248, 36, 64, - 20, 20, 93, 1,129,114,164, 48,161,206, 35, 76, 65, 65, 65,209, 5,208, 44, 32,116, 78, 96,216,168, 4,229,103, 0,244, 0,160, -161,196, 79, 65, 17,216, 3, 64, 65, 65, 65,113,181, 64,227, 81, 2, 56, 1,241, 43,112,121,230, 65, 21,128,129,158,117,154, 53, -138,130,130, 42, 0, 20, 20, 20,215, 8, 20, 0, 98, 4,219, 60,241,171, 5,164,207,121,142,163,214, 63, 5, 5, 85, 0, 40, 40, - 40,126, 35,109, 26, 37,125, 10,138, 0,218, 51, 5, 5, 5, 5, 5, 5,197,111, 89, 91, 62,120,240,160,112, 34, 29,226,149, 68, -135,160,237, 68, 59,149, 22,139, 37,158,223,246, 21, 76, 40,148, 39, 21,215,162, 60, 31,195, 22, 25,250,252,104,125, 92, 45,242, -226,227,227, 91,143,169,172,172,100,164,202, 91,184,112, 33, 50, 51, 51, 25,250,254,133, 38,147,126,191, 84,158, 20,121,146, 21, - 0,137,232, 39,242, 56, 98, 48, 24, 36,103,150,242, 55, 95, 60,218,143,153,246, 53, 27,160,175, 99,174, 56,120,130,241,140,133, -183, 90, 44,150,214,108, 93, 93,101,172,182, 94,175, 79, 46, 44, 44,108, 37,193,148,148, 20,237,206,157, 59, 75,174, 69,109,215, - 87,125, 28, 63,238, 30, 25, 54,114,228,200,206,190, 60, 50, 99,102, 38, 10, 62, 49,251,124,103,103,204,204, 36,158,125,126, 95, -156, 25, 51, 51, 3, 54, 2, 5,159,152, 67,126,233,226,227,227,137, 94, 63,180,117,187,176, 16, 36,152, 18, 16, 12,171,179, 87, - 39,111,255,108, 59, 18, 71, 37, 90,193, 0,199,191, 59,166,189,115,220, 93, 88,251,230, 90, 73,239,223,220,185,115,219,221,119, -110,110, 46, 77,238, 68, 65,209,129, 10,128, 90,236,129, 73, 73, 73,146,133, 7, 80, 0,124,146,168,247, 68, 27, 18,136, 54, 20, -205, 73, 76,227, 66, 44, 22, 11,140, 70, 35, 76, 38,147, 53, 64,154, 78, 49,255,223,230,152,193, 9,215, 3, 0,206,217,237, 96, -109, 45,238,194,218,122,158,228,196,165, 63,110,109,200, 11,219,228, 20,240,228, 22,151, 52,199,187,130,113,103,215,227,127,129, -160,235,157,209, 56,183,169, 15,158,248,195,168, 15, 57,239,129,204,152,153,137,135,116,183,217,129, 76,141,135,232, 67,250, 15, -129, 2, 33, 59, 28, 14, 35,138,138, 50, 48,109, 90, 14,244,122, 19, 10, 11,221,207, 42, 20, 69,224,137,103,159, 32,181,189, 47, - 98,141,121, 53,122, 69,247, 2,199,186, 96, 39, 45,214, 79,191,249,108,218,108,215, 35,228,174,196, 73,218,197,139, 23, 7, 85, - 4,230,206,157, 75, 22, 46, 92,232,243,153, 82, 37,128,226,183,140,131, 7, 15,122,123, 9,218, 29, 19, 78, 12,128,164,115,189, -167,175,149, 11, 27,204,230,228,176, 91, 95, 66, 68, 47, 98, 69, 26,141, 70, 16, 66,176,114,229,202, 64,231, 17,201,249,187,123, -118,199,225,138,143, 80, 86,241, 79, 92,170,250, 31,148,255, 57, 3, 91,159, 78,235,212, 23,237,240,247, 71, 90, 73,254,200, 17, -247, 58,112,121, 93, 88,206, 17,209,117, 34, 10, 82,234,227,248,241,227,152, 55,111, 30, 2,146,191, 8,133,241,254,251,119,135, -170, 56,250,197, 67,186,219,154, 51, 50, 50, 52, 15,233,110, 11,153,216, 61, 22,126,160, 37,100,235, 31, 0,210,210,220,179,242, -165,165,229,163,176,176, 28,122,253, 80,232,245, 67,219,116, 13, 4,253, 94, 55,108, 72,158,253,252, 35,228,119,127,152,143,151, -103, 46,197,109,241,183, 99, 72,247, 33, 24,210,107, 8, 70,197,221,130, 63, 76,249,125,209, 75, 47, 44,195,222,234,175,173,107, -214,172, 17,245,109, 95,184,112,161,205,114,199, 72, 27, 54, 47,254, 10,179,103,207, 38,194, 37,156,250,209,233,116,178,214,183, -220,242, 58, 18, 11, 23, 46, 76,150, 67,134, 12,114,250, 0, 24, 15,224, 37, 0,107, 1, 20, 1, 48, 1,248, 47,207,114, 19,165, -125,223,228,239,175,172,141, 7,192,104, 52,146,138,138, 10, 0, 64, 98, 98, 34,132,147,205, 88, 44,150, 54,219,222,251, 3, 89, -236,213,213,213, 86,139,197, 34,218, 19, 16, 76, 89, 16, 90,245, 79,123, 82, 97,122, 91,250, 82, 93,236, 57, 57, 57, 65,143, 41, - 46, 22, 53,183, 58, 49, 24, 12, 88,185,114,165,207,157,203,150, 45,131,201,100,130,209,104,244,123,140, 47, 12, 78,184, 30,167, - 47,213, 97,235,211,105,232,195, 76, 66,249, 59, 47, 34,241,225, 68,124, 94, 94,131, 89, 43, 55,117,234,203, 54,230,150,209,173, -235,163, 71,143,110, 83,206,123, 6,132,229,114, 91,246, 65,200,141, 24, 12, 6,204,155, 55,207,231,206,205,155, 55,195,100, 50, - 65, 55,233, 86,236,254,234, 59, 32,182, 27, 80,223,120,197,159,225,174,221,223, 70, 3, 57,216,181,251, 91, 89,228,157,251,115, -159,128, 4,211,127, 73,141,168, 15, 68,232,250,207,200, 40,130, 94, 63,180,245,151,135, 94, 63, 84,116,151,192, 59, 31,190,131, - 21,111,255, 9,247, 12, 79,134,171,165, 5,172,139, 5,163, 98, 0, 40, 65,192,225,220,249, 42,140,236,119, 19, 94,126,250,101, -252,105,213,159, 68,121,163,188, 27,182,148, 65,155, 1, 0, 91,182,108,105,115,238,236,217,179,137,119,153, 88,178,222,245,202, -110, 60, 4, 29,217,189,123,119,216, 94, 5,157, 78, 71, 86,173, 90, 5, 0,178,200,235, 72,226,175,171,171,227,189,101, 97, 93, -103, 93, 93, 29,223,166,135, 42, 39, 6,192,191, 1,248, 14,192,251, 0,166, 2,120, 16,192,239,225,158, 21, 18, 0, 46, 80,234, -111,139, 12,163,155, 99,114, 76,203,130, 91,241, 38,147,137,177, 88, 44,140,197, 98, 97, 42, 42, 42,192,175,243, 46,101,225,182, -175,253,254,192, 43, 21, 89, 89, 89,214,234,234,106,171, 47, 5, 65,184, 29, 36, 85,174, 47,171, 38,208,246, 21,255,192, 62,254, -248, 99,159,196,207, 48, 76, 59,242, 95,182,108,153, 40,153,191, 86, 84,162,241,189,197,152,181, 33, 31,131, 19,174, 71,255, 62, - 81,168,216, 86,225, 38,255,158,221,221, 7, 69, 40, 37, 95,171, 94,175,215, 6,218, 22, 3,142, 0,215, 69, 3,219, 51,129,184, - 72, 96, 84,175,203,110,255,248,110,192, 39, 25,151,203,165,130, 97, 24,159,139, 20,188,254,250,235, 62,137,127,228,200,145, 48, -153, 76, 88, 53, 47, 21, 71,202, 79, 97, 64,226, 64,160,169, 89,140,245, 15,145, 94, 0,209, 86, 94,193, 39,102,236,218,253,173, - 79, 75, 95,208,183, 47,233,198, 87,125, 64,252, 46,161,128, 39,125,254,215,161, 31, 38,233,252,102, 91, 51, 38,205,190,203,154, - 52,240, 14,180, 52, 53, 1, 74, 37, 84, 42, 21,148, 74, 37,148, 74, 21, 78,158, 60,137,173,219, 10, 78,219,157,205, 24, 18, 25, -143, 91, 39,143,155, 50,255,119,243, 37, 91,141,111,236,154,135, 7,140, 9,237,202,183,108,217,194, 72,245, 4,240,228,143, 33, -107,176,235,149,221, 97, 91,238, 58,157,142,172, 93,187, 22,163, 71,143,198,186,117,235,186,164, 39, 96,225,194,133,201,115,230, -204, 33,199,143, 31,183, 86, 85, 85,201, 34,175,170,170, 10, 85, 85, 85,225,120, 19,180, 0, 38, 3, 56, 4,224, 52,128, 1, 0, -126, 4,240, 11,128, 83,158,197, 6,138, 86,133,152, 39,127,225,186,183,178,124, 69,242, 0, 8,250, 94, 81, 81, 81,129,184,184, -184,118, 10, 2, 95,230, 75, 65, 16,217,184,134, 28,252,247,200, 35,143,116,216,189, 11,201,202,151,213,239,153, 56,136, 9, 70, - 22, 54, 84,162,241,225, 59, 64, 98, 95, 4,166,188,130, 70,124, 8,188,235,182, 22,137,229, 69, 68,252,251, 58,176,172,244, 68, -103,133,133,133, 37,194,231, 20, 36,247,186,111, 15,207,123,192,107, 27,128,235,175, 3,206,237, 80, 35,119,163, 3,243, 62,242, - 95, 46,201,188,151,121, 62,123, 97,176,223,153, 79, 86, 34,118,148, 6, 49,195,159,195,199, 43, 23, 96,236,232, 1,184, 49,245, - 79,162,234, 67,204,165,223,127,255,110,236,217,163, 19,211,151,207, 0, 32, 94,228,207,240,129,127,161,244,235,139,181,240,197, -192, 31,209, 23,121,121, 2,130,225, 76,245, 25, 60, 96,120, 0,177,221,123,193,197,176,248,242,139,127,160,161,177, 17,250,233, -211,113,190,186, 26,121,249, 91,241,212,147,243, 6, 71,106, 34,161, 32, 17,152,118,219,180,226, 31,173,235, 66,178, 26, 47, 93, -186, 20,246,125, 11,201, 31,128, 71, 9,120, 62,100, 79,128, 78,167, 35,203,151, 47,199,176, 97,238,231, 57,116,232, 80,116, 37, - 79,128,151,197, 47, 27, 4,214, 63,191, 30,202,189,222,236,249, 38, 35, 0, 68, 3, 24, 5,224, 24,128,193, 0,234, 1,212, 66, -254, 73,186,174,121, 92,177, 68, 64,113,113,113, 90,131,193,208,174, 43,192, 51,183, 61, 0,180,206,119, 47,149, 28, 66, 12,254, - 19,235,113, 8, 25,188,117,239,207,221, 47,214,250, 7,128, 79, 95, 90, 14,253,138, 55,193, 78,153, 4, 21,128,152,189, 39,240, -121,121, 13, 0,128,157,178, 8,206,239,251,130,233,247,123,201, 36, 21,128,144, 68,163,102,230,135, 88,244,228, 41,252,244,244, - 82, 52,237,113, 96, 64,223,192,229,161, 42, 80,225, 42, 7,155, 55,111,118,107,195,250,123,177,175,170, 26,177, 99, 99,113,186, -168, 28,208, 68, 34,109,209,191,163,247,117,169,157,249, 45,250,139,250, 15,169, 78, 2,120, 17,124,121, 31, 2,202, 46,202, 40, -194,180,156,105, 72,203, 7, 50,138,220,235, 69, 25, 69,173,202,129,186,240,132,168,107,104,180, 55,160,111, 84, 31,176,246,102, - 16, 5,193,237, 19, 39, 98,219,182,109,246,181,111,190,169,225, 8,193, 99,143, 63,134,222,125,122,163,185,177, 17,172,139, 69, -108, 68,119, 56, 21,206,144,238,183,182,182,182,205,232, 0,169, 1,129,237,200,159, 71,136, 74,128, 78,167, 35, 70,163, 17, 19, - 39, 78,108, 83, 62,122,244,104,188,241,198, 27,157,170, 4,116, 20,241,243,178,133,114,121, 47, 64, 8, 83, 5,127, 3,224,160, -135,236, 31, 4,240, 0,128, 50, 0, 99, 0, 20, 0,216, 4,192, 9,138,176, 20, 0,226, 69,138, 68,226,254,128, 72, 76, 76,108, - 37,253,164,164, 36, 45, 31, 27,192,123, 7, 18, 19, 19,173,124,119, 65,103, 53,188,114, 34, 88, 95,191,192,250, 15,138, 89, 27, -242, 65,166, 39,224,220,157,183,161, 15, 38, 33, 42,109, 29,216, 51,231,129,158,221,161,170,249, 16, 59,214,150, 2, 74,101, 40, -247, 30,182,214,124,232,133,127,195,132,113, 64,226,162, 35, 24, 21,243, 36,126,188,193, 0,252,239, 82,191,229,157,229, 1, 48, -153, 76,184,231,246, 27, 49,101,210, 8,232,111, 89,138,236,181,235,113,172,244, 52,158,190,111, 2,206, 22,236, 66,221,165,122, -185,222,135, 54, 93, 5, 30, 47, 64, 80,130, 22, 18,190,156,228,239, 71,166, 40, 84, 86, 86, 50,241,241,241,196, 19,255,215,170, - 16, 0,192,180,156,105, 80, 23,158, 64, 97, 97,121,235, 72,128,192, 1,129, 12, 56,142,131,139, 3, 8,199, 34, 50, 74,131,199, -159,120, 66,243,218,171,175,162,127,255,254,220,224, 1, 3, 20,246,166, 70,184, 8, 64, 56, 23, 56, 46,184, 71, 43, 55, 55,151, -153, 58,117, 42,169,169,169, 65,125,125,125, 27,197,209,107,116,128,232, 81, 1, 58,157,142,100, 47, 56, 10,104,134, 1,103,223, -110,127,128,102, 24,178, 23, 28, 5, 68, 42, 1, 58,157,142,204,152, 49, 67, 59,122,244,104,107, 77, 77, 77,187,253,241,241,241, -152, 49, 99,134, 22, 93, 60, 38, 32, 92,235, 63, 76, 47,128, 80, 97, 24, 8,119, 87,192,195, 0,154, 64, 33,155, 2, 32, 37, 17, -144,175,253, 62, 97, 48, 24,124,122, 1,120,178,143,139,139,211, 26,141, 70,171,135, 16, 97, 48, 24, 2, 6, 21, 6,178, 14, 67, - 24, 95,223, 33,195, 0,121,235, 62, 80, 48,160, 20,148,255, 57, 3, 17,105,235, 96,171,250, 9,170,189,235,224,204, 95, 4,230, -161,213,216,254,251,116,252,178,253, 36,244,171,222, 7, 84,157,147,217,121,169, 5, 40, 90,181, 13,163,126,153, 6, 92,104,194, -146,169, 75, 3,150,203,225, 1, 8,213,250, 47,216,182, 28,202,193, 55, 35, 6, 35, 80,249, 69, 14, 26, 24,130,127,253,116, 10, - 83,142,156, 22,117, 57,123,246,232,252,146, 61, 0,120,246,251, 60, 78, 44,249,251,121, 71,195, 34,134,112,114, 0,240,200, 40, -186, 76,252, 0,218, 89,254,124,192, 96, 97, 97,185,207,243, 99,163, 98, 81, 85, 87,133,137, 67,238,128,173,197, 14,216,236, 96, - 29, 78,188,108, 52,130, 81, 64,209,220,212, 8,142,115,129,117, 17, 68,170, 34,112,190,241, 60, 34, 92,193, 71, 27,127,254,249, -231,173,247, 54,119,238, 92,194,183, 55, 23, 46, 92,142, 9, 59,115,230,140,232,251,116,147,176, 91, 9, 24,153,208,254,255,143, -159,116, 32,235,221, 81, 16, 75,214,158,227,200,196,137, 19, 17, 31, 31,223,110,255,145, 35, 71, 80, 80, 80, 96,237, 44,242,247, - 88,227, 12,239, 9,144,163,223,223,151,245, 47,131, 23,128,199, 3, 30,133,160,133, 82,184,188, 10, 64,135,128,183,252, 1, 32, - 41, 41, 73,107,177, 88,172,188,235,223,143,114,160, 45, 43, 43, 11, 22, 11,192,200,101,205, 75, 33, 19,177, 10, 6,111,253,251, - 34,126, 94,209,145,114,189,135,202,107,224,252,254, 53,156,195, 87, 24,240,208,106,160,174, 30,229, 57, 47, 98,232,194, 53, 56, -187,233, 69, 32, 66, 5, 40, 58, 39,179,115,101, 19, 48, 50,238, 97,209,229,157,225, 1, 48,153, 76,141,179,167,220,113,166, 7, -215,235,250,102, 68,104,242,215, 44,194, 95,118, 28,196,146, 7,239,198,188, 55, 63, 64,250,127,255, 95,135,122,131, 2,221, 98, -193, 39,102,120,146, 0, 49,225, 42,167,225,184,250, 3,121, 1, 50,138,138,136, 47,242, 23, 90,255,193, 48, 40,110, 16, 62,253, -178, 8,119, 93,127, 23,162,187,197,128,227, 8, 20,132, 5,199, 48, 32,132,192, 69, 0,150, 35, 96, 89, 22,182,186, 38,236,220, -191, 19,106,151, 90,114, 80,170,119,160,211,127, 44,154,132,148, 65, 21, 96, 62, 19, 47,195,159, 18, 32,149,252,189,149,128, 85, -171, 86, 97,224,192,129,151, 21,251,242,114,152, 76, 38,116, 5,203, 95,110, 69,192,151,245, 31,166, 23, 0, 0,146, 1,220, 0, -224,143,184, 60,241, 19, 69, 87, 86, 0,226,226,226,180,222, 30, 1,190,223, 93,168, 28, 8,215,195,180,224, 37,191, 88, 50, 14, - 3,244,105,253,135, 74,252, 60,102,173,220,132,173, 0, 30, 92,145, 2, 98,121, 17,204, 35,217, 56, 84, 94, 3,166,119, 47,156, -248,181,222,109,253, 75,239, 2,144, 5, 71,142, 28,105, 29,242, 39,102, 93, 14, 15,128, 20,229, 96,243,230,205, 14, 0, 13, 11, -146,199,212, 63,183,250,127, 28, 47,189,108,180,247,235, 30, 87,115,244, 88,101,255,121,199, 62,136,233, 36,226, 23, 67,206,194, - 46, 26,209, 94,128,142, 74, 6,228,139,252,121,203, 31, 64,208,128,192,197,139, 23, 51,119,221,127,215,116,235,164,146, 2,195, - 45,233,168,183,215,131, 81, 0,238,193, 72, 28, 92, 46, 2,142,101,209, 45, 50, 22, 95,215,125,135,178,189, 39,144,103,206, 43, - 9,251,194,203,127, 7, 64,250, 48,192, 54, 74,192,192, 74, 28, 63, 19, 31, 18,249,123, 43, 1,235,214,173, 67,207,158, 61, 81, - 83, 83,131,229,203,151,163,171,185,253,229, 80, 4,252, 89,255, 33,122, 1,250,195, 29,245,175, 0,112, 43,128, 44, 0,229,148, -190,101, 86, 0, 58, 42, 15,128, 63,143, 64,118,118,182,214, 91, 81, 48, 24, 12,146, 19, 6, 9,137,160, 43,164,216, 21, 90,255, - 66,226, 55, 26,141,124,183,135,240,185,138,190, 96, 94, 9,120,120,197,123, 32,249, 64,223,121,102,148, 60,151,142,187, 77,127, - 3, 34, 34,208, 77,163,238,148,251, 21,142,241,247,181, 30, 98, 30, 0, 22,128,194, 83,183,138, 48,235,227,220,236, 41,119, 84, - 61,151, 83,152,240,242, 83, 15,116, 31, 52, 32,217, 1,224,176,193, 96,232, 1,247,248,226,144,234,131,127,229,246,236,209,241, - 17,255,161, 40,119, 76, 48, 11, 94, 10,161,203,225,234,151, 2,111,210,231, 61, 2,189,123,247,246,169,157,125,189,231,235,237, -241, 55, 93, 15,215,108,246,240,228,235, 39,143,233, 19,219, 7,118,167, 29,132, 16,168, 85,106,212,218,154,177,239,215, 61,216, -252,215, 92,104,111,214,106,243,144, 23,246, 53,190,177,107, 30,114,115,115, 81, 86, 38, 61, 7,192,101, 37, 0, 97,145,191, 80, -222,162, 69,139,200,170, 85,171,176,116,233, 82,116,229, 62,127,161, 34, 80, 82, 82, 18,210,185,129,142,145, 32,115, 6,220,227, -253,237, 0, 94, 0,176, 31,128,139,210,183,111,140, 27, 55, 14, 7, 15, 30, 68,142,105, 89,187, 60, 0,222,217, 0, 85, 94, 13, -101,192, 62,126,225,182,247,126, 41,147, 17, 4, 34,250, 16,189, 0, 97,161,163,134, 1,242,202,136,217,108, 70,113,113, 49, 87, - 81, 81, 33, 36, 50,173,197, 98,145,108,221,204, 90,185, 9, 16, 36,254,153,252,242,134,214,245, 78,138,134, 9,218,128,113, 36, -164,103,183, 22,192, 69,184,135,255, 60, 30,230, 53,158, 93,144, 60,166,101,106,241, 55,221, 31,123,245,125,152,205,102,117,113, -113,241, 64,180, 77,103, 29, 82,125,116,180, 39, 32, 88,126,255,160, 45,103, 7,116, 9,248, 35,127,135,126, 24, 80, 24,220, 48, -251,232,237, 45, 76, 55,101, 12,217, 27,191, 15,147,238,152,132,193,177,131, 1,142,224,188,189, 6, 95,127,251, 53,206, 30, 61, -139,251, 70,222,167,125,246,217,103, 59,189, 62,132, 74,128, 92,100,205,123, 2,174,150,128,191, 48,250,234,229, 66,142,103,161, -144,250,224, 76,203,196,123, 0, 58, 10, 89, 89, 89, 62,201,222,107, 38, 54, 33,172,190,242, 22, 7, 35,218, 80,209, 17,195, 0, - 77, 38, 19,204,102, 51, 91, 92, 92,172,242,116, 29,240,228,127, 95,128,251,246, 9,207,100, 74, 29,145, 74,153, 4, 40,239,148, -198,201,108, 54, 71,122,222,203, 87, 60, 69,174,204,204,204, 39,194, 20, 27, 57,245,143,239,148,154,205,230,123,139,139,139, 81, - 92, 92,108, 7,160,241, 44,114, 16, 63, 35,114,188,191,100,146,246,236,111, 83, 95, 82,137, 91,142, 46,129,202,202, 74,166, 40, -163,136, 12, 90, 52, 72,139, 33,190,143,169,202, 40,178,138,141, 7,216,248,214, 70,102,205,154, 53,201,155, 86,108, 66,252,176, - 27,172, 0,240,227,145, 31,180,169, 83,245, 88,187,126,109,201, 71,248, 40,164,235,204,205,205,101, 30,120,224,129,118,163, 2, -156,206,240, 70,136,201, 77,214,215, 90,180, 63, 69,215,244, 2,120,151,137, 86, 0,130, 89,226, 18, 44,245, 80, 95,116,210,193, -242,229, 58,223,167, 60,131,193, 64,138,139,139, 85,194,231, 37,244,176, 72, 84, 80, 74, 58,136,144,187, 98, 35, 20, 11,160, 17, - 32, 4,238,196,252, 81, 8,111,124, 47, 95, 31, 63, 23, 23, 23,243,227,202,234, 19, 19, 19,251,153, 76,166,200,174,240, 44, 59, -210,109, 47,167,236,202,202, 74,166,114, 73,165,108,207,224,249,231,159, 47,241, 62,239,235,191,239, 13,251, 58, 63,251,236, 51, - 74,174, 20, 84, 9, 16, 97, 68, 51,161,206, 35, 76, 65, 65, 65, 65, 65, 65,113,245, 66, 65, 31, 1, 5, 5, 5, 5, 5, 5, 85, - 0, 40, 40, 40, 40, 40, 40, 40,126, 3,248,127, 37, 93,196,116, 64, 61,103,188, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, + 0, 0, 4,115, 66, 73, 84, 8, 8, 8, 8,124, 8,100,136, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, + 66, 40,155,120, 0, 0, 0, 25,116, 69, 88,116, 83,111,102,116,119, 97,114,101, 0,119,119,119, 46,105,110,107,115, 99, 97,112, +101, 46,111,114,103,155,238, 60, 26, 0, 0, 32, 0, 73, 68, 65, 84,120,156,236,157,119,120, 20, 85,247,199,191,103,218,206,182, +244, 78, 9,157,208, 91, 64,164, 35,210, 4, 81,169,130, 72,243,149, 87, 5, 20,105, 74, 81, 64,154,136,250,170,168, 40,160, 2, +210, 4, 11, 69, 68,154, 20, 81,106,232, 73, 40,161,132,150, 66, 72,219, 94,239,239,143,221,141, 1,147,236,110,192,246,115, 63, +207, 51,207,110,102,103,191,115,118,179, 51,231,220,115,207,189,151, 24, 99, 8, 16, 32, 64,128, 0, 1, 2,252,187,224,254,106, + 3, 2, 4, 8, 16, 32, 64,128, 0,127, 62,129, 0, 32, 64,128, 0, 1, 2, 4,248, 23, 18, 8, 0, 2, 4, 8, 16, 32, 64,128, +127, 33,129, 0, 32, 64,128, 0, 1, 2, 4,248, 23, 18, 8, 0, 2, 4, 8, 16,224, 79,134,136, 2,247,222, 0,127, 57, 62,253, + 8,137, 72, 8,147,233, 17, 34, 82,221,175, 19,255,157, 47, 0, 34,234, 70, 68,123,220, 91,183,191,218,158, 0,165, 67,110,254, +106, 59,254, 46, 72,178,156, 73, 68,172,180, 77,169, 84,102,254,213, 54,254,219, 17, 69,113, 65,215,174, 93,141,178, 44,191, 87, +158,247, 19, 81,227,136,136,136,205,193,193,193,153,106,181, 58, 63, 50, 50,114, 47, 17, 61, 94, 94,123,254,238,122, 1,254, 56, +200,151, 97,128, 81, 42,106,211, 52, 38, 44,225, 68, 86, 65,102,166,193,254,125,185, 79, 70,212, 90,146,184,110,156, 72,149,136, + 40,159,217,113,203,102, 99,103, 28, 14, 71, 18, 99,236,186,175, 58,178, 58,180,151,221, 98,244, 57, 24,225, 85, 33,102, 75, 97, +214, 6, 63,236,252,245,243,159,217,131, 78, 6,252,167, 29, 29, 96,140,181,242,245,189,127, 6, 68, 36, 72,146, 52, 69, 20,197, +103,236,118,123,168,197, 98,121,132, 49,182,255,175,182,203, 3, 17,213,141,142,142,126, 14, 0,178,178,178, 62, 97,140,165,252, + 65,231, 81,191,250,116, 66, 87,187, 3,214,183, 87,159,221,194,238,113, 76, 43, 17,201, 0, 98, 1, 92,103,140,217,124, 56, 62, + 52, 56, 56,120,110, 65, 65,193, 43,140,177,194,123, 57,247, 93,186, 97, 49, 49, 49, 13,156, 78,103, 69,158,231,175,101,100,100, +156, 97,140,229,250,248, 94,246,237,254,100, 40, 68, 30,146,192, 67, 18,133, 59,158,215,175, 18, 13,198,152, 79, 1,147, 44,203, +153, 22,139, 37,218, 31,219,149, 74,101,150,209,104,140, 41,197,182, 76, 0,126,233,113, 28,151,229,112, 56,254, 20,189, 18,244, + 9, 64, 71, 89,150,159,181,219,237,157, 4, 65,216,101, 54,155,151, 0,216, 93,222,223, 26, 17,133, 12, 30, 60, 56,111,197,138, + 21, 24, 52,104,144, 99,237,218,181, 97,254,252,118,180, 90,237,139, 60,207,207,155, 51,103,142,242,161,135, 30, 34,141, 70,131, + 3, 7, 14, 96,226,196,137,250,130,130,130, 77,249,249,249, 79,249, 99,207,223, 93, 47,192, 31,139,224,237, 0, 34, 10,171, 95, + 41,186,214,198,109, 63,112,221,186,116,138, 80, 17, 85, 54, 50,118,213,159,147, 16,145, 36,136,220,252,168, 10,218,218, 51,223, +152,172,123,236,209,254,194,165,244,115, 13,107, 86,171,183,114,213,202,117,150, 73,227,167, 36, 16, 81, 24,128, 51,140, 49,167, + 55, 61,139, 69,167, 58,127,249, 22, 85,140,144,189,158,251,108,186, 1, 77,235,199,120, 63,240, 78,226,212, 10, 96,127, 26, 0, +160,130,159,239,253, 67, 33, 34, 65,169, 84, 30,108,214,172, 89,163, 89,179,102, 9,223,126,251, 45,150, 46, 93,186, 28, 64,245, +191,216,174, 10, 97, 97, 97, 35, 20, 10,197,176,206,157, 59,107, 71,143, 30, 29, 1, 0, 31,126,248,225,147,113,113,113, 58,139, +197,178, 44, 55, 55,247,115,198,216, 13,111, 90,130, 32,100, 58, 28,142, 50,111,236, 9, 9, 9,223,188,241,159,250,235,166, 12, + 77, 24, 57,107,121,234, 10, 0, 81, 0,178,238, 62, 78, 20,197, 36,187,221, 30, 81,124,159, 36, 73, 57, 22,139,165,217, 93,246, +171,102, 61, 91,255,161,113,131,106,245, 84,119,252,246, 19, 34, 58, 85,214,111,145,136, 42,135,134,134,254,212,171, 87,175,248, +239,191,255, 62,145,136,250, 50,198,210,189,125,182, 50,244,228,200,200,200, 4, 81, 20,235,116,234,212, 73, 26, 61,122,180,162, + 75,151, 46,216,190,125,123,194, 7, 31,124, 80, 37, 38, 38,198,170,215,235,147, 13, 6,195,121,198,152,165, 52, 29, 81,161,200, +234,221,166, 94,169,223,157, 44,203,191,251,142, 74,195, 98,177, 68,239,223,191, 31, 68, 4,142,227, 32, 73, 18, 20, 10, 5, 68, + 81,132, 36, 73, 16, 69,241,142,231,130, 32, 64,150,229,178,254,111,209,239,188,243, 14,148, 74, 37, 76, 38, 19, 76, 38, 19,204, +102, 51,204,102, 51, 44, 22, 11, 44, 22, 11,172, 86,107,209,102, 54,155,241,253,247,223,151,169,183, 96,193,130,223,233, 89,173, + 86, 88, 44,150, 59,158, 91,173, 86,152, 76, 38,108,221,186,213,107,192, 64, 68,213,101, 89, 30, 33, 73,210, 48,181, 90,109,237, +220,185,243,225,168,168,168, 77,217,217,217,218, 29, 59,118,124,102, 48, 24, 36,165, 82,185,220,108, 54,127,198, 24,187,232,235, +247,233, 38,129,231,121, 92,189,122, 21, 60,207,243, 0,234, 2, 56,232,203, 27,137,168,169, 86,171,125, 51,245,224, 14,101,172, +100, 2,156, 25,128, 5,168,212, 44, 26,143, 30,220,161,121,176,123,255, 94,146, 36,253,215,106,181,126,234,143,222,233,211,167, +149,149, 42, 85, 42,218, 95,169, 82, 37,244,232,209, 67,211,186,117,235,191, 84, 47,192, 31,143,215, 0, 32, 70, 35, 61,188,124, +249, 42,161, 96,195, 34,188,211,189,137,212,115,197,129,246, 68,180,134, 49,102,247,245, 36,188,200,125,218,228,129,234,149,118, +108,221, 95,165,192,116,227,216,249,204,237,223,175,219,240,117,187, 49,195,199,237,125,249,197,177,226, 11,255,125, 49, 47, 50, + 50, 18, 58,157, 46, 30,192,101, 95, 52, 43, 70,200, 24,240,174,225,142,125,146, 4,104,100, 64,173,228,161, 22, 1,141,146,135, +196, 59,124, 53,179, 56,199,183,236, 57, 25,175, 80,133, 0,192,249,242, 8,252, 81, 72,146, 52,165,105,211,166, 13, 87,175, 94, + 45,124,254,249,231, 88,178,100,137,222,108, 54, 15,189, 87, 93, 34,234,160,209,104,254,203,243,124, 16, 17, 41,109, 54,219, 85, +131,193, 48,131, 49,118,197,135,247, 86, 36,162,244, 22, 45, 90,176, 21, 43, 86,240,145,145,145, 69,175,245,234,213, 43,242,214, +173, 91,145, 67,134, 12,153,190,109,219,182, 25, 68, 20,239, 45,219,227,112, 56,162,147,146,146,160,213,106, 97, 52, 26,209,184, +113, 99,164,166,166, 66,173, 86,195, 98,177,224,228,201,147, 87, 51,142,175,216,243,124, 55,105,228,194,175, 47,172,159,185, 52, +249, 2, 0, 67, 73, 90,118,187, 61, 34, 63, 63, 31,193,193,193, 0, 0,189, 94, 15,173, 86,123, 71, 64,224,113,254,147,135, 36, + 12,122, 99, 89,202, 94, 0, 34, 0, 5, 0, 83, 41,159,183, 97,100,100,228, 15,115,231,206,173,208,184,113, 99, 60,242,200, 35, +205,150, 44, 89,114,168, 78,157, 58,118,189, 94,111,118, 56, 28, 59, 50, 50, 50,222,103,140,157,245,246,221, 1, 64,173, 90,181, +218, 37, 36, 36, 84,125,238,185,231,164,199, 30,123, 76,120,241,197, 23,123,140, 30, 61,186, 69,118,118,118, 88, 84, 84, 84,110, +211,166, 77, 15, 31, 60,120,112,203, 55,223,124,243,192,226,197,139,155,196,199,199, 95, 74, 79, 79, 47, 49,227, 99, 53,155,139, + 90,183,181,234, 54,220,172, 84, 42,155,114, 4,112, 28,129,136, 64,196,225,129, 7, 91,223,224, 56,192,100, 52, 31, 59,113, 60, +233,209,178,108, 19, 69, 17, 75,151, 46,133, 40,138, 80,171,213, 80, 42,149, 80,169, 84, 80, 42,149, 80,171,213,144,101, 25, 26, +141, 6, 42,149, 10, 29, 58,116,240,250, 89, 53, 26, 13, 58,117,234, 4, 81, 20,209,178,101,203,162, 32,162,180,205, 27,106,181, + 26, 83,167, 78,133, 32, 8, 16, 4, 1,193,106, 21, 70, 53,111, 1,133,211,137,165,231,206,193,236,116, 22,189,230,139,158, 36, + 73, 73,162, 40,214, 76, 76, 76, 60, 60,114,228,200,207,159,126,234,169,235,128,131, 86,172,248,178,210,144, 33, 79, 31, 5,248, +159,190, 92,181,170,226,226,197,139, 31, 60,116,232,208,104, 73,146, 46, 88,173,214,102,222,116,221, 93,158, 51, 7, 13, 26, 52, +101,244,232,209,136,140,140,196, 75, 47,189, 4,198,216, 47, 68, 52, 23,192,116,111,141,159,224,224,224, 57,243,231,207,151, 99, + 69, 35,216,138, 1,128,206, 29,203,105,162, 97,127, 98, 41,230,207,159,175,233,219,183,239, 60, 0, 62, 57, 88,143, 94,113,103, + 13, 0,118,187, 29, 38,147,233,158,244,142, 28, 57, 2,139,197, 21,167, 10,130,128, 26, 53,106,248,173,247, 79,132,136, 4,142, +227, 50,156, 78,103,209, 61,134,231,249, 28,135,195, 17,235,143,207, 44,166,199, 1, 24, 8, 64, 93,108,183, 1,192, 26, 95, 26, +203,222, 40, 51, 0,208, 18,213,123,186,119,215,160, 90,200,133,238,250, 5,196,134,133,226,249,135, 26, 42, 22,237, 63,245, 32, +128,159,125, 57, 1, 17,245,138,140, 83, 55,216,182,101, 79,212,233,203,223,255,184,239,212,167,123, 32,209,173,155,217,217,198, + 77,123,231,157, 79,168,222, 67,167, 80, 64, 89, 88, 88,104, 34,162, 42, 68,164,100,140,149,120,227, 45, 11,165, 12,168, 37,151, +211, 87,203,128, 82,226,161, 86, 2, 74,240,254, 74, 1, 64,241,150,156,215, 22,235,159,137, 32, 8, 35,102,207,158, 45,174, 91, +183, 14,111,190,249,166,222,108, 54,119,103,140,237, 39,162, 54, 42,149,106,185,209,104, 28,234, 79,119, 0, 17, 85, 86,171,213, + 31,134,134,134,182, 31, 63,126,124, 65,116,116,180, 77,165, 82, 57, 15, 29, 58, 84, 99,241,226,197,125, 53, 26,205,231, 6,131, + 97,108, 89, 63, 54,198,216,117, 34,170,125,236,216,177,113,141, 26, 53,234,253,228,147, 79,170, 70,141, 26,165, 5,128,143, 62, +250, 72,183,118,237, 90,163,195,225,248,150, 49,246,174,175, 93, 61, 90,173, 22, 27, 54,108,128, 66,161, 0,224,186,209,239,223, +191, 31,130, 32, 92,205, 58,185,114,193,243,221,164,199, 63,249, 33,247,167,183,214,101,247, 5,176,138, 49,166, 47, 77, 43, 56, + 56, 24, 95,125,245, 21, 66, 67, 67, 17, 26, 26,122,247,231,191,195,249,191,241, 89,202,113, 0,151, 74,251, 13,138,162,216,185, + 66,133, 10, 95,190,245,214, 91,209, 53,107,214, 68,112,112, 48, 30,122,232, 33,122,248,225,135,163, 1,192, 96, 48, 96,211,166, + 77,213,231,204,153,243,184, 36, 73,143, 88,173,214,227,222, 62,107, 65, 65, 65,252,182,109,219,236,209,209,209, 5,173, 90,181, +250, 95,124,124,124,232, 55,223,124,163,175, 91,183,238,181,148,148, 20,113,202,148, 41,109, 58,116,232,208, 96,251,246,237, 99, +213,106,181,248,202, 43,175, 84, 5,224,245,127,172, 80, 40,154,207,253, 96,113,180, 36,242,144,120, 1, 10,145,131, 40, 10, 80, +240, 60, 36,145,199,176,167,158,244,122,113,136,162, 8, 34, 66,159, 62,125,138,246,237,218,181, 11,159,125,246, 25, 34, 35, 35, + 49, 97,194, 4, 40,149, 74, 56, 28,190, 5,218,102,179, 25,125,251,246, 5,207,243, 94,157,191, 47, 14,219,108, 54, 67, 16, 4, +212,175, 17,139,215, 30,173,135,214, 22, 6,125, 54, 15, 46,211,140, 17,118, 59,146,234,213,195,251,121,121, 72, 55, 24, 32, 8, + 94,219, 59,176,217,108, 77,227,227,227,143, 95,187,118, 45, 92,202, 62, 93, 17, 7, 63,137, 6,115, 80, 29,251,213, 32, 28,248, + 36, 10,196, 51, 49,243,146,120,233,210,165,240,144,144,144,180, 91,183,110, 53,245,233,131, 3, 51,151, 47, 95, 62,109,200,144, + 33, 0, 0,167,211,137,230,205,155, 99,213,170, 85, 92,215,174, 93,167, 13, 29, 58, 20, 0, 94, 43, 75,192,110,183,183,232,212, +169, 19,129, 93, 5,116, 89,160,119, 92,189, 16,108, 60,193,160, 47, 68, 88, 88, 77, 72,146,164, 36,162, 10,190,100,218,138,244, + 60, 56,237,176,231, 94,131,190, 32, 15,198,194, 66,196,169, 28, 8, 86,203,229,210,179, 88, 44,104,211,166, 13, 28, 14, 7,118, +236,216,129,188,188, 60,132,133,133,249,101, 95, 89,244,239,223,159, 7,128,117,235,214,149,171,133,247, 7, 18,195,243,188,178, +248,245, 32,203,178,210,221,237,228,115, 55,119, 49,148, 0, 24, 99, 44,201,179,131,136,106,187,247,151,216,232,241,135, 82,175, + 8, 34, 82, 86, 10, 81, 55,159,247,193, 39,156,238,157, 17,128,168, 2,175, 80,225,191, 15,181,224,214, 38, 93,174, 65, 68,103, + 24, 99,121,222, 78, 32, 42,248, 49,211,102,190,232,184, 85,120,225,198,190, 83,139, 47, 51,112, 65,204, 1, 61, 0,132,216,205, +102,247, 97,158,155,109,182,251,131,149, 25, 0,240,188,188, 88,165, 82,105, 75,123, 93,161, 14, 55,188,185,230,210,179, 26,153, +135, 88, 46,255,255,247,197,106,181, 86,168, 82,165, 10,142, 29, 59, 86,180,143,136,218,104,181,218,237, 19, 38, 76, 80,206,153, + 51,103, 11,128, 96, 95,180,136,168,141, 44,203, 91,158,121,230,153,130, 57,115,230, 92,212,104, 52, 78, 0, 40, 44, 44,228,154, + 53,107,102,234,216,177,163,121,220,184,113, 79, 95,191,126, 61, 13,192, 7, 37,105, 4, 7, 7, 39, 43, 20,138,116, 0, 51,179, +178,178, 94, 32,162,177, 31,125,244, 81,239,175,190,250,234, 21, 0,200,201,201,153,111,181, 90,191,101,140, 89,137,232,193,224, +224,224,143, 28, 14, 71,148, 94,175,111, 82,150,109, 70,163, 17, 10,133, 2,146, 36, 1,112,221, 80,238,118,254,215, 89,139, 49, + 25, 25, 63,197,148,229,252, 61,132,133,133,253, 46, 0, 40,197,249, 95,100,140,221, 46,229,251,170, 21, 25, 25,249,213, 7, 31, +124, 16, 90,177, 98, 69,132,132,132, 32, 36, 36, 4, 28,231,170,103,181,217,108,184,121,243, 38,194,195,195, 49,116,232,208,152, +221,187,119, 31,210,104, 52, 31,235,245,250,177,222,236,179, 88, 44,234,129, 3, 7,246,175, 92,185,114,200,238,221,187, 51,137, + 72, 0,192, 61,240,192, 3,230,111,190,249,198,216,187,119,239,168, 71, 31,125,244,153,126,253,250,109,130,151,235,163,152,230, +145, 41, 47,142,116,101, 0,136, 64,156, 43, 3,224,202, 8, 0, 38,147,249,152, 55, 13, 73,146,160, 86,171,225,116,254, 22,255, +189,247,222,123, 48, 26,141,184,112,225, 2, 14, 29, 58,132,246,237,219,195,102,243, 90, 50,225,177, 9,153,153,153,119,116, 33, +220, 75, 0, 96,177, 88, 16, 20,164,194,142, 55,131,113,243,114, 30,222,216,229,196,119, 73,215, 33, 8, 2,122,213,168,141, 1, +102,134,183,236, 2,158, 85, 42, 97,245,177,219,254,171,175,190,250,100,255,190,125, 49,103,143,172, 27,152,159,126,162,102,176, +104,231, 19, 1,176, 84, 32,223, 38, 56,146, 46,213,184,240, 64,243,230,107,234,214,175,159, 57,103,206,156, 50, 91,179, 68, 20, + 4,160,238,160, 65,131,166, 12, 25, 50, 4,169,169,169, 24, 54,108,152,238,232,209,163, 55, 19, 19, 19, 99,151, 45, 91, 22, 52, +100,200, 16,108,219,182,109, 10, 17,109, 1,112,150, 49,150, 95,146,150,221,110, 87,170,213,234, 18,111,251, 6,131, 17,183,245, +183, 33,138, 34,131,171, 91,193, 23,135,237,210,115,227, 72, 63, 2, 91,210, 26, 8,121, 55,160,177,217, 0,210,160, 85,245, 96, + 90,159,149, 83, 46, 61,167,211, 9,163,209, 8,163,209,136,252,252,124,220,190,237,159,125,119, 67, 68, 45,131,131,131, 39, 18, +209, 67, 38,147, 41,216,225,112, 32, 56, 56,184,128,136,126, 42, 40, 40, 88,192, 24,243,169, 43,229,126, 35, 8,194,215, 28,199, +213, 0, 0, 81, 20,101,181, 90,237, 28, 56,112, 32,100, 89,134, 66,161, 64, 80, 80,144,179,176,176,112,167, 74,165, 58, 99, 52, + 26,251,122,211, 35,162, 14, 0, 60,254, 77, 0,160, 7,144, 84,236,144, 10, 0,186, 16, 81, 30, 99,108,207, 61,217, 94,218, 11, +145, 10,161,253,123, 11,230, 75,182, 77, 31,226, 76,102,161,118,200,166,253, 83,230, 61,209,254,131,158,173, 42,102, 44, 26, 53, + 80, 28,252,206,231, 93, 0,124,229,237, 4,204,201, 26,246,120,164, 87,206,209,243, 95,157, 38, 32, 8, 96, 32, 7,172,140, 57, +217,200,145, 71,239,184,107, 48,198,140,190,140, 52,112, 88, 13,218,235,183,237,136, 10,230,224, 10, 95,139, 5,177,140, 65, 33, +114,106,141,204, 67,173,228, 32,149, 47, 3,240,183, 69,150,229,203, 87,174, 92,169, 89,191,126,125,204,153, 51, 71, 51,109,218, +180,173,130, 32,240,155, 54,109, 82,230,228,228, 64,150,101, 95,139,197, 90,132,133,133,173, 89,189,122,245,249,174, 93,187,234, + 60,187, 47, 93,186,164,184,116,233,146,188,118,237,218,208, 11, 23, 46,168,180, 90, 45, 47, 8,194, 36,148, 18, 0, 40, 20,138, +240, 55,223,124,179,238,146, 37, 75, 30,136,136,136,184, 45,203,242, 92,179,217,188,230,198,141, 27,107,221,231, 81,136,162,248, +148, 86,171,157,146,144,144, 16,218,173, 91,183,240,229,203,151, 95,243,102, 95,227,198,141,239,248,123,246,236,217,121,137, 21, +243,138,156,255, 53,103,243, 49,241,241,149,125, 42,230, 50, 24, 12, 8, 13, 13, 45, 10, 2,220,118,249,229,252,221, 92,178,219, +237,151, 15, 28, 56,160, 26, 58,116,168, 34, 36, 36, 4,174,110, 92, 87,218, 52, 61, 61,189,104,171, 86,173, 26, 6, 13, 26, 36, + 62,249,228,147,253, 0,120, 13, 0, 0,224,220,185,115, 15, 46, 95,190,220,100,179,217, 36,183,141,214,236,236,108,197,213,171, + 87,149,125,250,244,177,207,152, 49,227, 1, 0,155,124,209, 2,128,243, 41,167,138,210,251,178, 82,153,105, 49,155,239,238,255, +142,115,143, 12, 40,181,112, 79, 20, 69, 40,149, 74, 48,198,138,182,225,195,135, 99,231,206,157,168, 94,189, 58, 18, 19, 19, 97, +177, 88, 96,183,219,225, 75, 93,156,205,102, 43,114,238, 59,127,252, 30, 2,156,120,108,192,211,229, 14, 0,172, 86, 43,130,131, + 84,224, 35,205, 24, 50, 85,143,236, 92, 75, 81,202,127,251,205,107, 56, 21, 28,130,137, 17, 53,161, 53, 93, 67,129,181,212,210, +137,223,209,182,109,171,236,248,234, 5,251,131,127, 57,154,224,105,105, 3, 64,200,120,226,123,181,106,184,255,251,220, 10,217, +222, 52,100, 89,126,239,201, 39,159, 28, 45,203, 50, 63,122,244,104, 0,192,176, 97,195, 10, 15, 31, 62, 92,147, 49,150, 77, 68, + 81,195,134, 13, 75, 59,116,232,144,118,204,152, 49,156,209,104, 60,224,254,220,111,219,108,182,137,119,235,169,213,234, 51,199, +142, 29,107,222,163,142, 22,208, 68,131,141,119,221,247,242,249, 48, 76,121,255, 75,124,191,247, 40, 66, 66, 66,148, 97, 97, 97, + 27,100, 89,118, 50,198,102, 89,173,214,183, 75,203,222, 21,233,245,232, 1,155,205, 6, 83, 94, 22,180, 7, 22,194,212,236, 89, + 24,110,223, 70,165, 43,107, 16,169, 73, 80,148, 71, 79, 16, 4,108,219,182,173, 40, 0,152, 53,107, 22,118,237,218,229,151,125, + 30,136,136,215,104, 52,159,196,196,196, 60, 57,113,226, 68, 85,255,254,253, 57,158,231,241,238,187,239, 34, 61, 61, 61,164,101, +203,150,143, 47, 88,176,160,139, 86,171, 93,171,215,235,159, 99,140,249,155, 21,224, 0, 48,247,230, 55, 14,135,163,207,179,207, + 62,139,228,228,100,216,108, 54, 68, 69, 69, 65,146,164,162,173, 95,191,126, 90,157, 78, 87,251,203, 47,191,172,237,163,100, 45, + 0,223, 3, 8, 1,144,239,222, 64, 68,228, 46, 62,221,233,126,173, 39,128, 61,229,177,217, 67,137, 1, 0, 17, 85,232, 88, 55, + 62,174, 91,243, 6,200, 91,244, 37,166,236, 62, 63,164, 79,195,170,161,243,126, 60, 56,178,103,135, 86,111, 52, 74,168,192,186, +183, 76,212,198,106,181,245, 50,116,186,228,210,196,137, 72, 25, 17,167,188,204,152, 35,244,118, 97,186,147, 17, 69, 48, 64, 3, +222, 25, 18, 87, 61, 56,232,217,215,235,110,224,121, 78,224,120,136,238,138, 91,234, 49, 52, 62,157,136, 70,122,251, 81, 84, 8, +227, 49,242,227, 92, 40, 68,114,109, 18, 65, 22, 1,133,224,186, 40,212, 74, 14, 26,217,213,153,235, 15,110, 59,226,170,199,168, + 32,107,100, 0,136, 33, 34,190, 28, 63,170,251, 14, 17,117, 84,169, 84,149, 67, 66, 66, 80, 88, 88,136,102,205,154, 97,249,242, +229,154, 26, 53,106, 32, 44, 44, 12,211,166, 77, 51, 88,173,214,101, 62,232, 52,168, 92,185,242, 7, 75,151, 46, 61,216,185,115, +231, 92,184, 35,168,171, 87,175,202, 41, 41, 41, 65,243,230,205,171,125,230,204,153, 84,189, 94,191, 89,163,209,180,225,121, 62, +164, 44,189,196,196, 68, 36, 38, 38,134,101,100,100,132,173, 90,181,234,195, 77,155, 54, 77, 6, 80, 27, 0,148, 74,229,169,198, +141, 27, 87,104,219,182,173, 58, 50, 50,210,167,155, 58,128,162, 62,127,179,217,140, 57,115,230,228, 37, 86,204,123,253, 78,231, + 31, 31, 19, 18, 82,166, 89, 0, 92, 5,127, 26,141,230,142, 62,127,165, 82,121,123,202,224,234,254, 58,127, 48,198,236, 68,212, +102,217,178,101,175,124,245,213, 87, 61, 56,142, 11,209,104, 52,234,110,221,186,105,218,183,111,175, 53,155,205, 72, 79, 79, 71, +120,120, 56, 90,181,106,133,215, 95,127,221,145,146,146, 50,220,167, 15, 12, 32, 39, 39, 39,172,110,221,186, 69, 45,163,188,188, + 60,225,202,149, 43,210,245,235,215, 69,147,201,196,231,231,231,151,154,245,242,134,197,108,142, 62,115, 57,243,142, 81, 1, 10, + 81,128, 36,240,208,168, 20,165, 22,198,137,162, 8,149, 74, 5,167,211,137,107,215,174, 33, 42, 42, 10,143, 60,242, 8,186,119, +239, 14,167,211, 9,187,221, 14,171,213,234, 87, 6,192,227,220,255, 59,234, 69,240, 28,119,207, 25, 0,158,151,128,160,142,112, + 98, 15, 4,193, 81, 20, 0, 8,130, 0, 78,148,112,169,102, 99, 80,106, 38, 4,231,159,119, 9, 19, 17,215,181,107,215,231, 86, +175, 94,205,223,188,121, 19,161,161,161,112, 58,157, 56,122,244,104, 6, 99, 44, 27, 0, 24, 99,217, 60,207,223,116, 56, 28,181, + 19, 18, 18, 48,106,212, 40,212,169, 83, 7,133,133,133, 99,136,232,149,187,239,129, 5, 5, 5, 11,199,142, 29,187,168,227,222, + 45,106,219,227,139, 97,212,235,112, 59, 55, 15,143,191, 52, 31,109, 59, 84,197,141, 27, 27,225,190, 38, 84,105,105,105,120,242, +201, 39, 95, 79, 75, 75,107, 15,160, 71, 73, 54,122,244,218,183,111,175, 54, 26,141,112, 24, 12,208, 2, 80, 13, 90, 12, 21, 92, + 93, 11, 31,125,244, 17, 62,170,241,144,223,122,213,170, 85, 67,126,126, 62, 50, 50, 50, 48,108,216, 48,180,111,223, 30, 55,110, +220,240,203, 62, 15, 42,149,106,102,163, 70,141, 6,110,221,186, 85,125,234,212, 41, 24,141, 70, 28, 56,112, 0,111,191,253, 54, +250,246,237,139,196,196, 68,238,252,249,243,154,238,221,187, 15, 60,126,252,120, 22,128,105, 62,252,139, 56,184,178,205, 10,252, + 22, 0,216,102,206,156,233,156, 49, 99, 6, 1,224,221,251,172,190,116, 73,135,135,135,131,231,121,132,135,135,131, 49,134, 95, +127,253, 21,233,233,233,168, 94,189, 58, 58,117,234,132,154, 53,107,250, 96,210,111, 48,198,110, 18,145,231, 81, 67, 68,109, 0, + 84, 32,162, 12, 0,199, 61,175,223, 43, 37,142,197, 15, 85,160,105, 90,250,117,103,139, 78,143, 88, 18, 87, 30,175,174,141,140, + 77,120,123,233, 10,106, 26,165, 9,111, 60,241,157, 86, 15,141,159,111,219,127,250,188,211,198,177, 50,211,184, 0,204,121, 89, +230, 6, 57, 5, 87, 45, 60,137, 17, 96, 44,132,192, 98, 57,134,170,149,227,149, 66,149,132, 32,123,124, 77, 53,171, 84, 77, 35, + 84,168,170, 9,169, 80, 85, 45,109, 91,125,109, 16, 0,159,170,246, 57, 30,224,221,155,192, 1, 2, 71, 16,120,215,151, 18, 44, + 3, 65, 74, 30, 26,165,239, 25, 0, 34,170,165, 18,232,231,121,205,194,251,141,234, 81, 9,207,117,141, 64,207,103,234,118,149, +148,194, 97, 34,106,232,179,208, 31, 0, 17,181, 87,171,213, 63,108,216,176, 65, 97,181, 90,145,145,145,129,180,180, 52, 68, 69, + 69,225,242,229,203, 24, 54,108,152,225,196,137, 19,105,102,179,121,174, 23,157, 26, 9, 9, 9,147,151, 44, 89,178,187,115,231, +206,135, 1, 92, 4,144, 6,224, 98, 94, 94,222,181,139, 23, 47,230, 92,188,120, 49,187,176,176,176,135,195,225, 88, 88, 80, 80, + 48, 64,167,211,117,245,197,198,216,216, 88, 76,152, 48, 65,173, 80, 40,138, 28, 21,207,243,193, 93,187,118, 85,123,138,240,124, + 69,173, 86, 99,223,190,125, 56,118,236,216,213,226,206,255,170, 35,113, 76,229,202,149, 99,130,131,131,139,234, 3,202,194, 98, +177, 52, 99,140,197,123, 54, 0,117,166, 12,174,254,186,191,206,223, 3, 99,204,116,235,214,173, 25, 87,175, 94,109,126,229,202, +149,154,201,201,201, 53,223,121,231,157, 65,195,135, 15, 79, 63,124,248, 48, 34, 34, 34,208,182,109, 91, 76,159, 62,221,241,205, + 55,223,244,100,140,109,247,245, 51, 71, 68, 68,228,166,164,164,136, 0,160,211,233,184,171, 87,175,138,215,175, 95, 23,111,220, +184, 33, 22, 22, 22,114, 33, 33, 33, 94,187,220, 74, 67, 33,203, 89,245,171,198,160, 86,197, 8,196, 71,135, 34, 54, 60, 8, 97, + 65, 42,104, 84, 10, 40,149,202, 82, 71, 6, 72,146, 4,165, 82,137,169, 83,167,226,217,103,159,197,192,129, 3,145,158,158, 14, +187,221,142,220,220, 92,188,246,218,107,152, 61,123,118, 81,193,151, 55,138,103, 0,114,114,110, 35, 55, 47,255,158, 2, 0,171, +213, 10,226, 69, 28, 8,173, 0,230, 30,137, 80,188,232,143, 36, 5, 46, 85,174, 3, 78,144,124,170, 1,184, 95, 48,198,156,187, +118,237, 90, 56,100,200, 16, 76,158, 60, 25,201,201,201,224, 56, 14,137,137,137,113, 68, 20, 5, 0, 68, 20,149,152,152, 24,203, +243, 60, 82, 83, 83,241,254,251,239, 99,212,168, 81,142, 61,123,246,124, 82, 82, 3,200,110,183,127,121,235,214,173,189,237, 31, +123,202,112, 44, 95,139,107,138,154,120,109,217, 46,116,120,184, 43,190,120,127, 54, 66,114, 79, 1,105, 63, 1,105, 63,161, 6, +221,192,206,175,151,169, 35, 35, 35, 59, 8,130,240,116, 73, 54,122,244, 58,118,236,104, 72, 78, 78,134,209,104, 4, 0,220, 92, +212, 31,108,195,157, 73,171, 26, 53,106, 96,219,182,109,126,233,229,231,231,227,189,247,222, 67,167, 78,157,176,172, 28,246,121, + 32,162,255,142, 31, 63, 94,173,213,106,161, 84, 42,177,124,249,114, 60,255,252,243,144,101,151,155, 80,171,213,208,106,181, 24, + 63,126,188, 26,192, 72,111,255, 27, 34,234, 61,102,204,152, 24, 0, 65,112,181,164,195, 0,132, 29, 62,124, 56, 70,146,164,184, +166, 77,155, 70, 39, 38, 38, 70,175, 88,177,162,157, 36, 73, 61,189,233,185, 53, 65, 68,144, 36, 9,167, 79,159,198,135, 31,126, +136, 31,126,248, 1,141, 27, 55,198, 47,191,252, 82,212,149,233, 39, 30, 15,223,224,248,241,227,189,117, 58, 93, 68,108,108,172, + 1, 64,163,242,136,149, 68,137, 87, 68,158, 5, 63,228, 89, 28, 60, 12, 6, 69,180, 70,158,247,217,154,117, 82,193,186, 57,152, +217,185,129,226,161, 47,246, 63,122,236,202,205,201, 0,114, 0,148,217, 74,103,140, 49,165, 90, 76,217,188,249, 91, 85,221,196, +200, 10,185,250,116,145, 57,201,225,116,146,137,192, 28, 28,136, 7, 72,102, 96, 18, 8,202, 75,103, 10, 20,130,196, 93,182, 89, + 29, 70, 95,140,151, 69, 42,218, 60,153, 0, 89,242,100, 0, 92, 69,128,190,124,237,238,254,214, 9,237, 98,228,153, 75, 90, 71, + 73,181,130, 68,156,254,104, 60,142, 84,141, 64,163,142, 81,168, 82, 63,168,233,214, 47,206, 39, 17,209,155, 0,102, 49,198,172, +190,216,119,191, 32,162,118,106,181,250,199, 13, 27, 54,200, 65, 65, 65, 56,113,226, 4, 94,126,249,101, 35,207,243,153, 70,163, +177,178, 82,169,204,116, 56, 28, 43, 77, 38,211,244,178,198,175, 19, 81, 92,195,134, 13, 7,189,245,214, 91, 59,187,116,233,226, +105,249,123,126,100,164,213,106,149,162, 40,230,139,162,168,130, 43, 8,243,173, 89,247, 7,224, 46,238,186,122,235,244,234, 5, +197,157,191,167,229,175, 80, 40,124, 10, 0,138, 83, 66,218,223, 14, 32, 14,128,182, 88, 52,109,102,140,253,226,171, 38, 99,204, + 0,224,123, 34, 10, 51, 24, 12,203,218,182,109, 75, 83,166, 76,113,124,253,245,215, 61, 25, 99, 63,250, 99, 95,237,218,181, 15, +204,157, 59,183,125,211,166, 77,173, 87,174, 92, 17,175, 92,185,194, 93,187,118, 77, 50, 26,141,220,190,125,251, 16, 22, 22,118, +168,172,247, 75,178,156,105, 43, 97,220,190, 66,150,179,204, 38,147, 79,221, 37,119,227,233, 2,200,204,116,205, 31,100, 52, 26, +145,158,158,142,136,136, 8,236,223,191, 31,201,201,201,136,143,143,135,213,106,245,187, 11,192,179,173, 89,242, 30,120, 56,240, +236,132, 55,252, 14, 0,108, 54, 27, 32,114,216, 32, 95, 2,164, 59,157,191, 32, 8, 32, 73, 66,122, 68, 60, 72, 20, 32, 56,124, + 11, 0,172, 86, 43,119,242,248,241,240, 60,253,149,200,142,156,194, 36, 78,224, 37,155,131,241, 2, 7,135, 13,162,229,122, 78, +126,200,245, 12, 46, 56,190,106,213, 18,251,234,139,217, 54,145,136,230, 0, 72,112, 56, 28,191,172, 90,181,138, 91,182,108,153, +118,216,176, 97, 23,120,158,207,104,209,162, 69,220,178,101,203,180, 0,240,225,135, 31, 58,191,255,254,251,214, 0, 82,202,154, + 23,160,160,160,224,209, 83,167, 78, 77,232,222,189,251,107,193,193,193,124, 65, 65,129,242,250,245,235, 64, 78, 50,216,151,191, +141, 12, 96,154, 40, 56,122, 44,194,228,201,147, 85, 19, 39, 78, 28, 3,224, 75,111,122,143, 54,173, 32,118,137, 12, 85, 12,105, +200, 3,166, 60, 80,199, 73,128,164, 1,224, 26, 61, 99, 52, 26,253,210,187, 31,246, 1,128,193, 96, 24, 49, 98,196,136,181, 13, + 27, 54, 84, 53,108,216, 16, 31,127,252, 49,122,244,112, 37, 13,212,106, 53, 26, 53,106,132, 11, 23, 46, 96,248,240,225, 38,163, +209,248, 76, 89,255, 19, 55,103, 22, 47, 94,220,230,241,199, 31, 63,219,169, 83, 39, 17,128, 34, 59, 59,155,204,102, 51,139,141, +141,229,135, 13, 27,166,168, 89,179,102,196,144, 33, 67, 20, 0,202,188,230, 60,120, 2, 0, 65, 16,112,245,234, 85, 72,146, 4, +155,205,134,209,163, 71,163, 83,167, 78,247, 26, 0,196, 85,169, 82,229,140, 70,163, 57,156,145,145,113, 1,192, 99,229, 17, 43, +137, 18,175, 8,119,186,219, 17,174,224,231,140, 25,254, 84, 84,216,133, 95, 96,200,187,133,160,224,112,204,232,213, 42,120,230, +230,131, 75,174,229,235,203, 76,219,120, 48, 27,237, 11, 62,255,104,235, 7,111,127, 49,204, 46,112,178,195, 6,139, 14,140,113, + 4,198, 64, 0, 99, 80, 16,131,134, 17,147,182,174,185, 22,100, 51,219, 39,251,106,124,145,243,151, 8, 10,193,229,252,101,247, + 61, 67,173,116, 13, 9,244, 86, 3, 64, 68,221,100,158,190,124,167, 69,120,196,243, 9,193,176, 59, 25,222, 56,145,135,121, 43, + 22,237,181,243,156,169, 69,183, 10,221,218, 61, 81, 5, 79, 78,106, 40,156,218,151, 57,109,251,151,105, 99,137,104, 32, 99,172, +220, 19, 34,249, 3, 17,181, 85,171,213, 63,110,220,184, 81,214,106,181, 56,118,236, 24,198,143, 31,111, 48, 26,141, 3, 24, 99, + 91,252,208, 9,109,212,168, 81,203,233,211,167,239,232,218,181,107, 33,126,115,254, 69, 1, 64,181,106,213,184,102,205,154, 93, +105,218,180,169,213,106,181, 14, 36,162, 93,112, 5,122, 58, 63,135,156,220,211,132, 60, 0,112,236,216,177, 59,156,255, 21, 91, +211, 49, 85,170,252,214,242,151,101,185,168, 5,224, 11,165,244,249,199,185,135,234,121, 60,141,133,136, 42,149, 33, 83,154,118, +183,161, 67,135,126, 54, 97,194, 4,154, 60,121,178,115,253,250,245,126, 59,127, 0,120,253,245,215,127, 28, 58,116,104,163, 39, +158,120, 34,116,240,224,193, 54,189, 94, 79,249,249,249,180,119,239, 94, 74, 77, 77,205, 27, 52,104, 80,153,255,111,155,197, 18, +189,118,207, 73, 72,130, 0, 73,228,161, 16, 92,213,254,237, 27, 86,243,107,178,156,226,136,162, 8, 89,150, 49,107,214, 44,236, +221,187, 23, 49, 49, 49,104,210,164, 9, 44, 22, 11,234,212,169,131, 30, 61,122,160, 85,171, 86,229,202, 0,120,182,201,179,223, + 1,207,113, 88, 60,239, 21,216, 44, 38, 76,249,223,114,191, 50, 0, 78,135, 19,191,178, 61,168,248,113, 19,176,229, 74,100,238, + 77,129, 32, 8,136,123,176, 59,236,137,125,144,163, 8,129,154, 57,125,206, 0,204,157, 59,183, 93,197,138, 21,111,213,121,160, + 86, 90,110,141,151,111,243,112,210,132,119,151, 13, 31,214, 61,113,133,147, 4,103, 86,158,116, 59,235,214,173,176, 11, 23, 47, +214,240,166,229, 46,232, 59, 72, 68,115,187,118,237, 58,109,200,144, 33, 56,116,232, 80,144,195,225, 8,242,212,143,172, 88,177, + 2,171, 87,175,158,235, 75, 17,155,251, 58,124, 11,192, 91, 68,212, 57, 38, 38,102, 67, 68, 68,132, 10,249,142, 59, 70, 6, 96, + 60,193,168,215, 33, 34, 34, 2, 6,131,161,190, 47,122,213, 35,213, 61,179,116,145,235,159,125,116,174,235,194,226, 4, 32, 40, + 22, 58,157, 14,249,249,249,200,207,207,247, 75,239,126,216,231,214,220, 44, 73,210,184,230,205,155,191, 59,105,210, 36,197,128, + 1, 3,248,164,164, 36, 56,157, 78, 52,104,208, 0,111,188,241,134,253,127,255,251,159,205, 98,177,188,204, 24,219,236,195,119, +120,158,136,148,221,187,119,111,210,190,125,123,125,183,110,221,168,109,219,182,100, 50,153,232,204,153, 51,226, 47,191,252, 34, + 36, 37, 37,113, 54,155,237,136,175, 67,121, 61, 1,128, 66,161, 64,181,106,213,240,193, 7, 31,224,153,103,158,193,150, 45, 91, +208,160, 65,131,123, 13, 0,110, 54,110,220,248,102,122,122,250, 69,148,179,128,178, 52,202, 26, 5, 80, 51, 33, 54,252,191,227, + 38,188,194,231, 45, 24, 1, 82, 5,129, 83, 40,241,120,243, 10,220,151, 71, 46,180, 87,138, 98, 71,147,205,182,219,219, 9, 24, + 99,235, 84, 26,241,249,133,243,190,107,252,248, 51,213,110, 51,230, 84, 18, 72, 1, 34,157,147, 65,195, 1, 10, 16,184, 31, 86, +164, 71,230,102,153,207, 57, 28, 88,225,171,241, 37, 57,127,133,232,233, 2,112,101, 0,120,239,195,147, 94, 51, 45,159, 30, 1, +198,112,232,171,165, 24,249,235, 45,221,169, 92,235, 56, 0,159, 49,187,157, 17,209,224,243, 73,183, 23, 62, 50,162, 86,200,132, +209, 99, 48,238, 5,187,166, 99,227,151,166,194, 85,164,241,135, 35,138,226,182,205,155, 55, 43,213,106, 53,142, 30, 61,138, 9, + 19, 38, 24, 76, 38, 83,111,127, 82,203, 0, 16, 28, 28,204,130,131,131,183, 63,241,196, 19, 38, 20,115,250,197,158, 3, 0, 30, +120,224, 1,218,184,113,227,145,246,237,219, 71,219,237,246, 56,189, 94, 31,103,181, 90,175,163,148,249, 25,108, 54, 27, 46, 95, +190,140,170, 85,171, 22,237, 35,162, 82, 3,128,155, 55,111,122, 29, 50, 86,171, 86,173,111,110,157, 94,189,231, 78,231, 95, 37, + 38, 36, 36,164,200,241,251,147, 1, 40,173,224, 15,174, 74, 91, 17,192,233, 98,135,251, 21, 0, 16, 81,183,225,195,135,111,158, + 62,125,186, 48,118,236, 88,251,134, 13, 27, 30,245,215,249, 51,198,114, 38, 76,152, 16, 57,126,252,120,121,249,242,229,243,103, +204,152,209, 99,198,140, 25, 45,114,114,114, 66,181, 90,109, 94,104,104,232,225,126,253,250,109, 49,153, 76,142,109,219,182,153, +225, 10,202,126,135,168, 80,100, 61,217,161, 81,137, 25, 0,127,236, 41,142,167, 11, 64, 16, 4,244,236,217, 19, 54,155, 13, 22, +139, 5, 54,155, 13,106,181, 26,221,186,117, 43,218,231, 75, 6,192,110,183,255, 46, 0,200,203, 47,132, 40,138,152,243,209, 10, + 16,199,225,205,151,158, 66,197,112, 53,210,111,100, 97,233,210,165,101,234,217,108, 54, 56, 45, 78,168,135,197, 66,249, 92, 48, +232,185,154,168,223,243, 57,228,235,170,224,184, 89,141,122,134,179, 8,221,249, 33,172, 14,187, 79, 1, 0,199,113,105, 71,142, + 28,105,144,152,152,184, 81,211,160,235,213,171, 78, 39,129,156,180,234,200,130,225,202,122, 81,135,121, 73,102,130, 36, 49, 65, +208, 85, 78, 77, 77,109,201,113,220, 5, 31,191,202,233, 67,135, 14,197,182,109,219,166,140, 25, 51,134, 75, 72, 72, 64, 74, 74, + 10, 62,250,232, 35,231,234,213,171,231, 2,152,238,163, 78,113, 82, 12, 6, 67,169, 29,193, 6,131, 1,183,111, 59, 33,138,162, + 79,163, 70, 46,229, 24,143,223,178,228, 50,132,253,118, 45, 23,119,254,121,121,121,158, 74,126, 95,135,105,223, 55,251,172, 86, +235,167, 68,180,127,222,188,121,175,112, 28,215,222,104, 52, 70, 3,112,170,213,234,155,118,187,125,183, 94,175,127,151, 49,150, +234,163, 93, 96,140,157, 36,162,244, 3, 7, 14,196, 39, 37, 37, 85,212,235,245,145, 0, 32,138,226,109,163,209,120, 13,174,161, +192, 62,207,208,232,201, 32, 74,146,132,118,237,218,225,192,129, 3,232,219,183, 47,234,215,175,143,158, 61,123,222,107, 0,112, + 42, 61, 61,189, 49,128, 71, 1,220, 4,112,162, 60, 98, 37, 81,234, 21, 17,165, 18,215, 45,253,252, 11,173,110,245, 60,128, 23, + 65, 10, 37, 72, 82,130, 20, 74, 44,124,225, 41,117,143,153, 31,174,206,156,228,102, 0, 0, 32, 0, 73, 68, 65, 84,118, 79,234, +226, 53, 29,110, 50,216,123,156, 58,148,253,253,213,180,252,250,157,251, 85,202,171,222, 32, 56, 87, 20, 9, 78, 39, 44,105,103, + 10, 84,219,191,186, 22,150,151,109, 73, 54, 27, 29,221,125,109,105, 58, 25,220,133,127,238,212,191,219,249,123,186, 0, 28,214, + 60, 56,192, 3,240,106,158, 13, 54, 43,176,115, 57, 90,109,185,113,203,201,208,136, 49,150,225,121,145, 49,182,146,136,182,175, +152,125,252,244,240, 62,246,168, 83,151, 54,194, 23,209,251, 5, 99,140, 37, 39, 39,131,136, 48,105,210, 36,189,201,100,122,140, + 49,246,147,191, 58,249,249,249,101,166, 43,239,102,239,222,189, 87, 1,120,157,241, 49, 63, 63,255,241, 17, 35, 70, 44,109,221, +186,117,133,113,227,198,133,132,133,133,149, 24, 0, 20, 22, 22,226,199, 31,127,204,187,120,241,226, 53,189, 94, 95,106,154,142, +136,212,111,252,167,254,186,231,187, 73, 35,239,118,254, 30,167,239, 79, 6,160,172,106,255,123, 45,162, 33,162, 54, 35, 70,140, +216, 60,115,230, 76,225,197, 23, 95, 44,151,243, 7,128,236,236,236,173, 68, 84, 33, 37, 37,165,117,187,118,237, 84,211,166, 77, +219, 20, 28, 28,188,233,210,165, 75, 25, 59,119,238,140,117, 56, 28,248,249,231,159,173,233,233,233, 70,189, 94,255, 75,105, 99, +168,139, 79, 2,116, 55, 37,141, 2,144,101,101,150,201, 84,114,245,191, 7, 81, 20, 49, 96,192, 0,220,235,119,229,161,164, 0, +192,179,229,235,140, 16, 69, 17, 31,126,181, 3,193, 26, 37, 76, 86,239,243,166,216,237, 46,199,174,187, 84,136,139, 83,142, 67, +165,189,128,218, 93,130, 17,196,159, 71,237,159,191,131,221,110, 1,138,213, 5,120,195,233,116,214,189,125,251,246,200,121,243, +230,189,254,229,151, 95, 94,120,249,229,151,127,104,217,178,101,142,195,201, 96, 3,231,188,126,237, 90,196,175,191,254,250, 72, + 65, 65, 65, 77,167,211, 57, 19,192, 18, 95, 62,183,251,190,246, 26, 17,109, 49, 24, 12, 7,158,127,254,121, 44, 92,184, 16, 91, +182,108,105, 93,222,225,107,140,177, 27, 26,141,198,124,234,212, 41,101, 67,141, 0,166,137, 2,220, 35, 3,108,114, 24, 12, 38, + 51,174, 92,201, 98, 60,207, 31,246, 91,175, 97, 67, 20, 22, 22,162,160,160, 0,121,121,121,200,207,207, 71, 65, 65, 1,174, 92, +185, 82, 62,189,251, 99, 95, 50,128, 33,190, 28,235,163,158,167,194,254,228,189,106, 21,239, 2, 8, 15, 15,199,128, 1, 3,138, +238, 83,197,135, 51,251, 43,235,182,211, 0,192,231,110, 73,127, 40,241,138,208, 8, 52,236,177,166, 53,107, 53, 18, 13, 40, 72, + 79, 5, 23, 20, 6, 78,225,114,254,156,172, 66,124,100, 24,254,243, 88,151,136,207, 54,110,159, 11, 96,130,183,147, 48,198,140, + 0, 30, 18, 4,234,255,205, 39, 23,167,154,205,142, 38,130,200,217,236, 54,167,168,144,249, 52,139,201, 62,193,225,192,106,230, + 75, 19, 2, 0, 47,170, 10,120,142, 74,173, 42, 19, 36,141,174,126,237,202, 69,129,132, 66, 21, 81, 86, 77,193,155, 52,124, 46, +224,250,178,231, 21,119,254,197,236,207, 38,162,161, 29, 27,191,244,170,231, 61,190,216,121, 63,176,219,237, 93,199,141, 27,183, + 13, 0,108, 54, 91, 15,198,216,190, 63,235,220,190,224,190,121,213, 87, 40, 20,253,126,253,245,215,183,251,246,237, 27,238,112, + 56,184, 98,175,115, 59,118,236,208,159, 56,113,226,182,217,108, 30,107,183,219, 75, 93,147,129,136,104, 76,159,234, 15, 79, 25, +154, 48,114,225,215, 23,214,191,181, 46,187,111, 70,198, 79,101, 58,168,178,166,182, 37, 34,217,135,161,126,190,143, 13,251,253, +185,159,155, 58,117,170, 48,118,236, 88,251,119,223,125, 87, 46,231,239,193,237,212,215,201,178, 92,125,255,254,253, 15, 60,254, +248,227,138,198,141, 27,115, 73, 73, 73,182,180,180, 52,139,193, 96, 56,196,252,159,118,182,136, 59, 70, 1,184,187, 6, 98,195, +131,188,118, 13,120, 38, 2,186, 95, 24,141, 70,175, 99,255,117, 38, 11,204,118,167, 79, 93, 0, 70,163,241,142,126,127,102,119, + 32,109,251,218, 59,138, 1,253,153, 9,208, 93, 67,243, 17, 17, 45,187,118,237,218,184,241,227,199, 79, 72, 72, 72, 56, 10, 0, +155, 55,111,238,155,147,147,147, 72, 68,255,115, 58,157, 93,221, 55,102,127, 73, 33, 34, 71, 66, 66, 2,239,118, 10, 62,165,152, + 75,195,106,181, 78, 30, 50,100,200,219, 63,125,183, 66,227,124,228, 99, 24, 13, 58, 24, 12, 6, 24, 76, 22,100, 88,149, 88,184, +112,182,165,160,160, 96,170,191,122, 59,118,236,208,152, 76,166,162,150,127, 97, 97, 33,116, 58, 29, 22, 46, 92, 88, 46,189,251, +101,223,223, 17,158,231,179,102,204,152, 17, 13, 0, 59,119,238, 44,245, 56, 81, 20,125,205,196,233,137,104, 36, 0,111,215,158, +215,249, 79,188, 81,226, 98, 64, 81, 50,183, 9, 68, 15, 10, 60,199,136,120, 34,142,115,175,186,198, 17, 56,142,200, 29,238,216, +157,142,155, 55,110, 23,214,245,251,164, 68, 60, 92,213,151, 5,172, 28,211, 35, 6,248,123, 66, 68,130, 86,171,125, 81,150,229, + 54,217,217,217,189, 1, 64,163,209,108,118, 58,157,219, 77, 38,211,199,222,134, 82, 18, 17, 61,214,174, 66,247,218,149,180, 17, +111,173, 58,123, 1,192,105, 95, 38,249, 41, 67, 47,222,248, 83,239,241,111,174, 58,155, 92,146,243, 39,162,214,248,253,136, 19, +159,139, 0,137,168,137, 40,138, 47,217,108,182,229,140, 49,175,221, 97,126,216,205,105, 52,154,186,146, 36,213,214,235,245,231, +172, 86,107,138,159, 53, 24,191,163, 60, 25, 0,149, 74,149,105, 50,153,238,219, 98, 64, 60,207,103, 58,157, 78,191,244, 4, 65, +200,178,217,108,247, 77,143,231,249, 44,187,221,238,115, 65, 36, 17,133, 11,130,240,154,221,110, 31,195,113,220, 7, 78,167,115, +182,175, 35, 70, 74, 67,150,229,247, 58,116,232,240,220,174, 93,187, 22,150, 52,222,223, 95, 66, 66, 66, 86,133,134,134, 62, 54, +113,226, 68,117,116,116, 52,242,242,242,112,249,242,101,246,233,167,159,154, 45, 22,203,171, 58,157,174,196, 57, 60,254,169,122, + 1,238, 31, 62,173, 6, 24, 32,192,159,133,123, 30,134,104, 0,250,123,113,254,110, 45, 9, 64, 13,184,230,209,190,116,175, 55, +238, 0, 1,238, 23, 68,196,221,107, 80,119,151,222,227, 17, 17, 17, 47,155, 76,166, 70, 60,207,155, 69, 81, 60,114,251,246,237, +215, 24, 99,229,234, 47,254,187,235, 5,184, 63, 4, 2,128, 0,255,239, 33, 34,233,207, 30,186, 25, 32, 64,128, 0,127,119, 2, + 1, 64,128, 0, 1, 2, 4, 8,240, 47,164,196,153, 0, 3, 4, 8, 16, 32, 64,128, 0,255,191, 9, 4, 0, 1, 2, 4, 8, 16, + 32,192,191,144, 64, 0, 16, 32, 64,128, 0, 1, 2,252, 11, 9, 4, 0, 1, 2, 4,240, 27, 34,226,137,200,191, 37,206,202,214, + 11, 20, 35,253,203, 32,162,154, 60,207,123, 93, 82, 62,192, 31,199,159,183, 60, 86,128, 0,255, 15, 80,169, 84, 71, 45, 22, 75, +169,171,113,221, 61,113,135, 36, 73, 55,141, 70, 99,124,105,199,203,178,124,222,102,179, 85, 45,237,245,187,245,100, 89,190,172, +215,235,107,249,110,241,253,135,136, 36,142,227,126,108,210,164, 73, 19,158,231,175, 58,157,206, 86,229,156, 20,199,163,199, 24, + 99,158,199,251, 55,235, 80,128,191, 45, 68, 20, 78, 68, 63, 76,153, 50,229,250, 95,109,203,191,153, 64, 6, 32, 0,136,200,251, + 20,105,222, 53,136,136,158, 33,162,239,137, 40,147,136,110, 17,209, 86, 34, 26, 69, 68,126,255,206,136,136,147,120, 26, 19,174, +228,126, 81,138,156, 78, 45,113, 5,225, 42, 97,159, 32,208,127,168, 28, 83,211,253,166, 71,191, 40, 69,210,169, 69,174, 32, 92, +197,249,173,231,112, 56,106,158, 58,117, 74, 40, 44, 44, 20, 10, 11, 11, 5,157, 78, 39,232,245,122, 65,175,215, 11, 6,131,161, +104, 51, 26,141, 66,122,122,186, 96, 50,153, 42,151,165,103,179,217,170,158, 61,123,214, 39,189,180,180, 52,193,108, 54,151, 26, + 44,252,145, 16,145, 64, 68,245,220, 43,103, 70,180,108,217,178,241,215, 95,127, 29, 50,109,218,180,250, 0, 86,223,131,110,209, + 4,160,158, 32,224, 62,216,218, 70,161, 80, 92,116,175,161,238,183, 61,254,110,247,106,175,159,246, 69, 18, 81,172,143,199, 86, + 34,162, 42, 94,142, 9, 37,162, 56, 31,245, 98,136,168,186, 47,199,122,209, 81, 0,216, 48,124,248,112,219,172, 89,179,124,250, + 44, 1,254, 24, 2, 25,128,127, 57, 68,164, 6,144, 78, 68,227, 24, 99, 62, 47,196,116,151, 70, 4,128, 53,112,173,175, 61, 7, +174, 53,185, 29, 0,154, 1,152, 4, 96, 32, 17, 13, 40,109, 14,251, 18,244, 42,104, 36,108,238,255,240,131, 9, 83, 95, 24,164, +140,141,141,133,195, 88,128,243, 41,103,218,190,186,100, 75,211,131,103, 46, 14, 39,162,199, 24, 99, 37, 46,138, 83,154,222,128, +206, 15, 38,188, 58,226, 49,101,108,100, 24,236,133,217, 72, 73, 62,211,246,149,229, 63, 55, 61,145,150,233,151, 94,133, 10, 21, +112,252,248,113, 88,173,214,162,101,103, 69, 81,132, 36, 73, 69,207, 69, 81,132,103,181, 55,111,196,197,197, 33, 41, 41,233,142, +121,242, 5, 65,184, 67, 79,146, 36,216,237,190, 79,154, 73, 68, 53,227,227,227,215,214,168, 81,163,202,238,221,187,183, 59,157, +206,105, 28,199,205,110,221,186,117,231, 43, 87,174,164, 95,187,118,237, 73,198,152, 79, 11,217,184, 3,196, 83,205,154, 53,139, + 62,121,242,100,174,221,110,239,121,228,200,145,140,212,212,212,208, 23, 94,120,129, 59,114,228,200, 67, 68,244, 44, 99,204,167, +121,241,139,233,118,112, 63,122,156,127,209,126,198,216, 30,127,180,138,105,182,169, 92,185,242,143,139, 22, 45, 82, 63,241,196, + 19, 91,137,168, 59, 99,108,191, 63, 26,223,126,251, 45, 0,192,233,116,194,233,116,130, 49, 6,167,211, 53,103, 79,241, 96, 5, + 0,158,122,234,169,242,152,121, 47,136, 0,222, 38,162,247, 25, 99,165, 46, 85,235, 14,126, 30, 3, 48,223,139, 30, 15, 96, 30, + 17, 45, 41,235,123, 34,162,102, 0, 6,193,181,210, 95,185,113, 7,219,203,218,182,109, 27,181,116,233,210, 90,118,187,253,156, +175,171, 52, 2, 64,100,100,228,151, 57, 57, 57,115,124, 93,165,207, 7,123,186, 2, 56,228, 94, 23,224, 95,199, 63, 62, 3, 64, + 68, 79, 18,209, 38, 34,202,117, 63, 62,249, 87,219,244, 15, 35, 17, 64, 24,128,126,247,160,177, 24,192,121, 0,173, 25, 99,155, + 24, 99, 55, 25, 99, 89,140,177, 31, 0, 60, 4, 96, 31,128, 85,190,180,180,137,136,130, 36,108, 88, 57,247,165, 70, 75, 23, 76, + 83, 86,205,217, 7,121,207, 60,168,143, 46, 65, 19,225, 50,126,152,242,136,122,204,163, 45, 90, 4,171,132, 85,190, 24,230,209, + 91, 51,127, 92,163,197,179,199, 41,171,231,236,134,234,151,119, 16,148,188, 22, 45, 85, 55,176,107,108, 83,245,208, 86,113,205, +131,100,126,141,175, 31,150,136,224,112, 56, 96,183,219,225,112, 56,138,156,196,226,197,139,225,112, 56,238, 88, 24,196, 87, 61, +187,221,254, 59, 61, 83,163, 70, 69, 90,254,232, 1, 64,120,120,248,119,169,169,169,245,119,238,220, 25,246,221,119,223,117,232, +218,181,107,210,218,181,107, 59,108,220,184, 49,124,239,222,189,245, 67, 67, 67,191,243, 89, 12,104,216,188,121,243,184,117,235, +214,133,174, 94,189,186,122, 84, 84,212,110,155,205,182,110,244,232,209, 57,102,179, 25, 31,127,252,177, 38, 44, 44,236, 13,119, +203,206,215,207,220,129, 49,182,231,238,148, 63, 99,140, 24, 99,123, 60,193,129, 63,120,156,255,193,131, 7,213,146, 36,225,185, +231,158,211, 40, 20,138,173,254,102, 2,136, 8,167, 79,159,198,185,115,231,112,249,242,101, 92,191,126, 29, 89, 89, 89,184,125, +251, 54, 10, 11, 11, 97, 52, 26, 97,179,217,124, 90,253,240, 46, 93, 65,161, 80,188,174, 86,171, 47, 11,130, 96,211,104, 52,151, +149, 74,229,235,238,172,138, 79, 48,198,110, 2, 88, 6, 96, 19, 17,229, 20,203, 68, 20,205,168, 71, 68,221, 0,124, 13, 96,185, +183,160,214,253,250, 39, 0,214,151,246, 61,185,247,127, 15, 96, 37, 99,172,220, 43, 75,186,153, 93,181,106,213,150, 59,118,236, +168,165,211,233,112,246,172,127,126,156, 49,214, 35, 46, 46,110, 55, 17, 37,220,163, 29, 30, 66, 1,116, 34,162,144,251,164,247, +143,194,107, 0,224, 78,237, 46, 33,162, 60,247,227,223,166,143,142,136,166, 0,152, 10, 87, 10,178,161,251,113,170,123,255,189, +232, 10, 68,244, 57, 17, 69,222, 7, 51,255,238, 60, 8, 96, 11, 92,173,117,191, 33,162,222, 0,106, 2,120, 25, 0, 35,162, 23, +136,232, 20, 17,165, 18,209,203,112,101,153,166,193,213,210, 24,233, 77, 79,228,240,220, 19, 15,183,170,215,171,123,103,206,246, +237, 75,120,111,253,110,212,127,235, 12,234,191,121, 18, 11,183,158, 6,203, 76,197,235,189,106, 9, 17, 90,101,107,247,185,189, +234, 13,120,164, 67,189, 71, 58, 60,200,217,190, 29,139,255,125,123,192, 25,255,230, 69,125,245,249,231,116, 31,238,186,204, 96, + 42,192, 59,189,171,139,209, 65,138,150, 68, 52,192,199,207, 92,212, 42, 47,190,241, 60, 95,244,220,223, 21,192,138,191,199,179, +121,246,223,189,175, 12,187,234, 68, 71, 71,175, 15, 13, 13,205,235,217,179,103,221,148,148, 20, 41, 41, 41, 9, 81, 81, 81, 49, +235,215,175, 15, 14, 13, 13,141, 57,112,224, 0, 78,157, 58, 37,181,107,215,174,110, 72, 72, 72, 94,116,116,244,122, 34,170, 83, +134,166, 8,128, 59,118,236, 88,214,154, 53,107, 88,155, 54,109,176,109,219,182,152,250,245,235,143,189,116,233,210, 47,243,231, +207,183, 70, 71, 71, 99,192,128, 1,225, 0,158,240,241,251, 99, 0,188,173,157,176,219,159,244,122,113,231,159,146,146,130, 51, +103,206,160,110,221,186, 24, 63,126,188, 70,150,101,191,130, 0,198, 88,209, 2, 66,213,171, 87, 71,223,190,125,241,194, 11, 47, +160,119,239,222,168, 86,173,218, 29, 89, 26, 63,236, 19,100, 89, 62,208,175, 95,191, 87, 15, 29, 58, 84, 37, 63, 63, 95,216,185, +115,103,149,206,157, 59,191,162, 86,171, 15,248, 25, 4,108, 7,240, 2,128, 16,198, 24,110,222,188, 89, 8,160, 97,177, 46,137, +239, 0, 60,198, 24, 59,227,163,222, 1,184, 26, 0,191, 11, 2,220,127,175, 7,208,143, 49,118,220, 87, 27, 75,130,136, 70,132, +134,134,142, 56,122,244,104,149,188,188, 60,164,166,166, 34, 37, 37,197, 47, 13,133, 66, 97,221,181,107, 87,204,125, 12, 2,108, + 0,118,225, 95, 26, 4,248,146, 1,120, 30, 64, 29, 0, 77,220,143,207,151,247,100, 68,212,204,237, 88, 79, 18,145,201,253,248, +185, 59,189,228,175,214, 83, 0,254, 3,160, 51, 99,108, 45, 99,236, 58, 99,108, 45,128,206, 0,254,227,126,189,188, 36, 2, 24, + 14,160,245, 61,104, 20,225, 14,162, 90,221, 15,173, 63,128,150, 0, 86, 2,224,136,168, 26, 17, 13, 39,162, 51, 68, 20,229,227, +251,251, 0,248,208, 61,213,238, 16, 0,207, 0, 24, 3, 96,132,251,181, 81,238, 57,207, 23, 0,232,229, 77, 76, 43,209,160, 41, +255,233,173,196,161,207,177,228, 72, 1,174,134,183,193,158, 31, 55,225,155,183,198, 96,117,210,109, 44, 61,144, 9,137, 89, 48, +225,209, 6,234, 16,149,194,235,210,160, 90, 9,131, 38, 13,235,165,164, 3,159,226,163,195, 58,231,244,221,186,147,215, 10,236, + 93, 46,231,218,122, 78,217,122, 51,121,217, 9, 35, 19, 35,171, 97,106,207, 4, 77,136, 74, 26,232, 77,207,211, 26, 23, 69, 17, +171, 87,175,198,242,229,203,139,210,245, 60,207,255, 46, 48,240, 5,143, 94,135, 31, 51,208,122,243,213, 82, 3, 0,111,171,217, +197,197,197, 45, 93,176, 96, 65,223, 91,183,110,133,244,239,223,159,154, 52,105,130,196,196, 68,212,174, 93, 27, 6,131, 1, 53, +106,212, 64,143, 30, 61, 80,181,106, 85,180,110,221,154,118,237,218, 21, 50,109,218,180,190,113,113,113, 75, 75,177, 75, 4,112, +162,121,243,230,219,136, 72,158, 54,109, 90,218,164, 73,147, 44, 21, 43, 86,196,146, 37, 75, 66, 4, 65,104,188,126,253,250, 92, +142,227, 48, 96,192, 0, 17,192,139, 62,124,214,162, 62,255, 98, 14, 11, 86,171,245,119,251, 46, 94,188,232, 83, 77, 64,113,231, +159,156,156,140,211,167, 79, 23, 45, 23,221,176, 97, 67, 76,159, 62, 93,163, 84, 42,125, 14, 2,156, 78,215, 74,132, 53,106,212, + 64,207,158, 61, 97,181, 90,145,156,156, 12,171,213,138,166, 77,155,162, 66,133, 10, 62,175, 46,232, 65,146,164, 41,125,250,244, +169,247,217,103,159, 41,121,158, 71, 74, 74, 10,194,194,194,240,241,199, 31,171,154, 55,111, 94, 71,150,101,127, 27, 45,187, 0, + 24, 0, 88,140, 70,163, 5,112, 5, 46,185,185,185,133, 0, 44,101,117, 15,148,132, 59,253,223, 15,192,174, 98, 89,133, 12,252, +230,252,253,234, 70,185, 27, 34,122, 88,169, 84, 46, 56,120,240, 96,100, 94, 94, 30, 82, 82, 82,144,146,146,130, 27, 55,110,248, + 93, 67,145,144,144,128,251, 25, 4,184,211,255,255,202, 32,160,204, 0,192,221,218, 31, 11, 96, 34, 99,236, 10,128,137, 0,198, +250,155, 5,112,183,168,103, 1,216, 12, 32, 25,192,179, 0,162,220,143,201, 0, 54, 19,209, 44, 95,163, 96,247,249, 95, 7, 48, +156, 49,150, 89,252, 53,247,223,195, 1,188,126, 15,217,138, 78, 0,140, 0,252, 46, 34, 42,133,247, 0,236, 33,162, 63,109, 25, + 97, 63,104, 9,224, 87,184, 46,244,233,112,245, 25,102, 1, 24,234,227,251, 19, 1, 28,117, 63, 31, 9, 96, 26, 99,108,175,187, + 85, 49, 17,191,181,250, 79,185,143, 45, 19,147, 29,141, 98,162,194,129,188,116, 44, 58,164,195,171,163,134, 33,226,228, 18,212, + 54,159,194,236, 62,245,176,244,231,171,128,168, 68, 98,173, 10,112, 2, 45,124,209,139, 10, 11, 2,242,174,224,189,131, 70,163, +222,202, 70, 49,198, 14, 48,198,246,233, 45,206, 23,223,250,241,162, 1, 97, 85,208,176,106, 4,156,204,187, 30,240,155,195, 30, + 57,114, 36, 70,141, 26,133,101,203,150,129,231,121,240, 60,143, 69,139, 22,225,189,247,222, 3,199,113,126, 7, 0, 71,251,214, +196,201,129,117,209,104, 77, 74,209,123,111, 86,174,140,244,216, 88,159, 2, 10,155,205, 22,209,172, 89, 51,156, 60,121, 18,151, + 47, 95,134, 94,175, 71,118,118, 54, 12, 6, 3,244,122, 61, 12, 6, 3,146,146,146,160,215,235,113,233,210, 37,156, 56,113, 2, +181,107,215,134,205,102,139, 40, 69,178, 94,155, 54,109, 42,108,218,180, 41,244,155,111,190,169, 20, 21, 21,165, 89,185,114,229, +141, 79, 63,253,212,217,184,113, 99,188,248,226,139, 21,114,114,114,162,127,254,249,103,180,109,219, 22, 90,173,182,162,151,207, +121, 71,193, 31, 99, 12, 14,135, 3,102,179, 25, 22,139, 5,183,111,223, 70, 70, 70, 6,210,211,211,145,150,150, 6,139,197,130, + 19, 39, 78,148, 25, 4,148,229,252, 61, 91,211,166, 77,177, 96,193, 2,141, 74,165,242, 57, 8, 16, 69, 17,205,155, 55,199,245, +235,215,145,159,159, 15, 81, 20, 97,183,219, 97,179,217, 80,189,122,245,162, 44,128,175, 8,130, 48,252,213, 87, 95, 85, 94,188, +120, 17,185,185,185, 16, 4,161,168,187,103,220,184,113,106,133, 66, 49,220,103, 49, 23,102, 0, 70, 34, 82,212,168, 81, 35, 18, +128, 19, 46,199,111,246, 83,167, 8,183,147,151, 60,255, 27, 0, 49,184, 71,231, 63,127,254,252,224,225,195,135,143, 81, 40, 20, +223,110,220,184, 81,101, 54,155,249,148,148, 20, 36, 37, 37, 97,225,194,133,215, 95,125,245,213, 50, 87, 8, 45,141, 64, 16,112, +127,240,150, 1,232, 12,192,232,190,153,123, 82, 69, 70,247,126,127,152, 14, 87,107,186, 33, 99,236, 29,198,216, 97,198,152,206, +253,248, 14, 92,233,251,214,238,227,124,161, 51, 0, 3, 99,108,111, 73, 47,186,247, 27,202, 97, 39,136, 72, 3, 96, 20,128, 97, + 0,158,190,215, 31, 3, 17,189, 14, 87, 63,120, 29, 0, 61,136,104,252,189,232,221, 15,220, 1, 89, 5,114,141,227,182, 50,198, +174, 1, 88, 10,215,247, 53, 9,174, 66,190,193, 62,202,241,112, 21,252, 1,174,116,154,178,216,107, 74,247, 62,184,143,241, 90, + 21,199, 0,206,105,184, 13,240, 18, 64,132,172,227,219, 1,139, 30, 16,149,112,112, 18, 64, 28, 32, 42,193, 75, 50,152, 15, 25, + 44, 6,226,156,186,108,128, 19, 32,242,196,112,231,242,191,178, 70, 45, 19,212, 97,224, 69, 5, 24,152,207, 53, 49,162, 40, 98, +217,178,101, 88,178,100, 73,145, 3,231,121, 30, 19, 39, 78,196,180,105,211,240,254,251,239,131,227,124, 47,177, 17, 69, 17,137, + 95, 95, 64,163, 53,174,148,168,199,217,215,202,205, 69, 61,157, 14,201, 90,173,215, 0, 32, 47, 47,239,133,190,125,251, 22,232, +116, 58,244,234,213, 11, 7, 14, 28,128, 78,231, 90,127,189, 66,133, 10, 48, 24, 12, 40, 44, 44,196,129, 3, 7,240,192, 3, 15, +192,225,112, 96,212,168, 81, 5,121,121,121, 47,148, 34,121,246,224,193,131, 55, 86,174, 92,201,218,183,111,143, 61,123,246,196, +214,173, 91, 55,100,206,156, 57,186,130,130, 2, 60,243,204, 51, 2, 0,235,249,243,231,193,113, 28, 34, 34, 34, 68, 34,186,123, +121,229, 34, 24, 99, 69, 49,185, 39,147,194,243, 60,100, 89,134,213,106, 69,120,120, 56, 98, 99, 99, 17, 31, 31,143, 26, 53,106, +192,106,181,162,113,227,198, 40,109,104, 32, 17,181,169, 82,165,202,143,135, 14, 29, 82,199,198,198,150,232,252, 61, 91,243,230, +205,177,104,209, 34,159,130, 0, 79, 23, 64,108,108, 44, 12, 6, 3, 84, 42, 21,148, 74, 37,148, 74, 37, 68, 81, 68, 72, 72, 72, + 81, 23,129,175, 88, 44,150,138,149, 43, 87,134, 94,175, 47,210, 82, 42,149, 80, 40, 20,168, 95,191, 62, 12, 6, 67,153,193, 83, + 9, 54,154, 1, 84, 5,224,105, 0,241, 68,164, 8, 15, 15,143, 2,112,197, 31,173,146,204,117,111,184, 23,231, 63,117,234,212, +233, 6,131, 33, 43, 39, 39,103,174, 32, 8,154,180,180, 52, 62, 57, 57, 25, 75,151, 46,205,155, 50,101, 74,193,241,227,199, 55, + 88,173,214,118,229,213, 15, 4, 1,247,142,183, 95,240,235,248,125, 21,233,124,247,254,237,190,156,192,157,222,127, 22, 64,227, +210, 10, 82, 24, 99, 57, 68, 52, 8,192, 9, 34,218,192, 24, 75,242, 34,219, 15,192,167, 94,142,249,212,125,156, 79,118, 22, 99, + 38,128,157,140,177,245, 68,212, 9,192, 92,184,250,219,252,134,136, 70,193,213,146,110,195, 24,203, 32, 87,197,233,126, 34,186, +205, 24, 91, 86, 30,205,251,196,123,112,181,204,119,195,253,253, 48,198, 78, 2,136, 3, 92,147,188, 0,136, 35,162, 74,238,224, +160, 44,142,194,213,178, 63, 1, 96, 17,128,185, 68,228, 4, 96,133,235,187, 91,228, 62,174, 1,126,203, 20,148,138, 74,226, 78, + 93, 72, 77,121, 48, 81, 19,133,231,219, 85,196,136,121, 43,241,246,147,141,192,137,118, 76, 93,127, 26,255,233, 92, 31, 16, 85, + 56,122, 57, 29, 2,207,121,215, 19,113,234,194,217,148, 7, 19, 53,145, 24,223,222,160,121,245,135, 27, 31, 19,209,243, 0,148, + 90,153, 95, 56,115,248, 35, 42, 56, 28, 56,125,195, 0,129,243,174, 7,184,156,215,146, 37, 75,240,252,243,207, 67,169, 84,226, +147, 79, 62,249, 93, 13,128,175,206,223,227, 8, 27,174, 78,198,217, 97, 77, 32,138, 34,170, 47, 57,124, 71, 23,128,175, 45, 77, +155,205,182,139,136,250, 15, 26, 52,232,101,179,217,252, 0, 0,165, 36, 73,138, 45, 91,182,208,154, 53,107, 80,181,106, 85,244, +235,215,143, 89, 44, 22, 11,199,113, 38, 89,150, 15,101,103,103,255,143, 49,182,171, 36, 61,198,152,153,136, 90, 78,156, 56,113, +227,249,243,231, 31, 92,184,112,161,252,214, 91,111,133,245,236,217,211,178,127,255,126,244,238,221, 27,145,145,145,134,130,130, + 2, 5, 0, 4, 5, 5,241, 0, 34, 0,148, 58,182,219, 29, 4, 48,207,115,247,119,192, 44, 22, 11,238,222, 87,150,243, 7, 0, +133, 66,241,218,149, 43, 87,212, 53,107,214, 52,235,116, 58,121,198,140, 25,230,194,194, 66,121,224,192,129,214, 49, 99,198, 72, + 61,123,246, 52,231,230,230,202,131, 7, 15,182,206,154, 53, 75,234,217,179,167,217,104, 52,106, 52, 26,205,107, 0,186,150,245, + 93,138,162,136,140,140, 12, 4, 7, 7,195,233,116, 66,150,101, 40, 20, 10, 40, 20, 10,152, 76, 38,191,107, 0,100, 89,190,126, +230,204,153, 42,225,225,225,112, 58,157, 69, 1,128, 74,165,194,217,179,103,161,209,104,202, 51, 30, 94, 6,160,100,140, 33, 47, + 47,207, 18, 22, 22,102,102,140,221,171,227, 74, 39, 34,207,188, 21,233,229, 21,121,237,181,215, 94,201,207,207,159,148,147,147, +163, 8, 11, 11, 83, 84,172, 88, 17,227,198,141, 19, 36, 73,202, 53, 24, 12,199, 29, 14,199,139,140, 49,255, 10, 0,220,228,228, +228, 32, 35, 35, 3,199,143, 31,199,171,175,190,170,179, 90,173,138,136,136,136,169, 0,158, 46,143,158, 59,104, 85,194, 85, 16, +216, 12, 0,193,149, 93,244,215,119,252,227, 40,245, 23, 76, 68, 61,224, 90, 71,125,237, 93, 47,173, 5, 48,137,136,122, 48,198, +182,248,112,142, 81, 0, 22,220,157,170,191, 27,198, 88, 38, 17,189,237, 62,126,132, 23,205, 26,112, 85,194,150, 69, 50, 0,191, + 70, 4,144,171,120,176, 43,128, 14,238, 93,147,225,234, 19,155,197, 24,123,205, 79,173,129, 0,166, 0,104,199, 24,203, 0, 92, + 21,188,238, 32, 96, 15, 17,229, 50,198, 54,249,160,115, 5, 64,169, 19,201,148, 64, 58, 99,172, 74, 25,122, 60, 92, 65, 73,123, +184,254,151,191, 27,214,195, 24,115, 16,209, 22, 0, 61,241,155, 3, 47,141,205,112,117, 11, 45, 99,140,173, 33, 34, 11, 92, 1, +147, 8, 87,176,248,149,187,217,247, 50, 92,149,196,101,162, 51,179,245, 51,191,220,221,104,211,164,206,170,145, 29,173,128,164, +198,232,149,167, 64, 28,135, 81,143, 52,194,127,186, 53,131,157, 83,224,253, 13, 71, 12,121, 58,147,215,202,125,157,133,214,207, + 92,181,175,209,166, 81,205, 84, 35,219,218, 72, 27, 25,155,240,222, 79,215, 54, 43, 21, 10, 76, 27,214, 85,211,165, 83, 7, 56, + 46,254,130,249, 27, 79,234,243, 12,150,245,222,244, 60, 14,251,165,151, 94,194,135, 31,126, 8, 0, 69,142,159,231,121,188,251, +238,187,224, 56, 14, 83,167, 78,245,107, 20,192,197,103, 91,160,250,146,195, 69,251, 36, 73,130,157,227,112, 70,163, 1, 0,180, +112, 58, 97, 54,123,207,238,186, 11,196,138,110, 92,146, 36,237, 55, 24, 12,173, 43, 85,170, 4,189, 94,143,130,130,130, 95,109, + 54,155, 63, 5,113, 58, 0, 15, 17,209,169,158, 61,123, 54,232,213,171, 23,226,226,226,184,195,135, 15,163, 79,159, 62,104,208, +160,129,186,160,160, 0, 0, 16, 28, 28, 44,193, 75, 0,224,214, 36,186,171,202,223, 83, 3, 80,140,142,222,134, 2,154,205,230, +174,192,111,179, 8, 22, 22, 22,202,140, 49,154, 57,115, 38,139,140,140, 68,110,110,110,209,223, 65, 65, 65,184,117,235,150,236, +203, 68, 67,228, 30,113,145,154,154,234,201, 64, 20, 21,105,138,162,136,179,103,207,250,157, 1,112, 56, 28, 95,204,157, 59,247, +149, 69,139, 22,169, 24, 99,144,101, 25, 74,165, 18,178, 44, 99,198,140, 25, 6,171,213,250,133,207, 98,191,167,168,197,126,175, + 48,198,170,208, 61, 78,200, 52,126,252,248, 71,242,243,243,167, 55,109,218, 84, 89,177, 98, 69,108,222,188, 25,217,217,217, 80, + 40, 20,102,157, 78,183,192,225,112,220, 83, 87,232,240,225,195,245,113,113,113,154,183,223,126, 27, 99,198,140,185, 86, 80, 80, + 80,239, 94,244, 0,180, 2, 96, 7,112, 16, 64,125, 95,238,203,255, 95,248,221, 47,152,136, 84, 0,218,193,213,130, 30, 86,212, +105,231,134,185,174,222,137, 0,150, 17,209,127, 0,236, 99,140, 25,203, 56, 71, 51,184,134,153,248,194, 47,240, 45,138,171, 10, +224,170,151, 99,174,185,143,243, 10, 17, 85, 5,240, 33, 92, 45,224, 78,158, 76, 5, 99, 44,143,136, 30,134,171, 70,161, 29,128, +209,140,177,211, 62,232,117, 7,240, 62,128,135, 25, 99, 23,139,191,198, 24,187, 64, 68,143, 2,216, 74, 68,249,140,177,125, 94, +228,226,253,185, 24,125, 40,154,106, 10,224,138,187, 59,167,172,192, 98, 37,128, 37, 68,180,209, 61,244,168, 68, 24, 99,171,136, +232,105, 0,179,136,104, 10, 99,236, 91, 0,223,222,101,211, 43,112,205, 17,240,161, 55,251,109, 78,231, 7,251,146,175, 61,243, +222,166,163,117, 94,126,184, 26,247, 66,215,122,120,161,103, 51, 64, 84, 2,162, 18,140,151,241,234,138,189,142,107,183, 11,143, + 51,198,188, 14, 5,116,233, 93,127,230,221, 31,228, 58,227, 59,198,113,131,219,198, 97,112,175, 78, 26,104,162, 0,167, 3,236, +210, 47,152,186,250,128, 35, 61, 71,119, 26,128, 79,243, 32,120, 82,254, 47,191,252,242, 29, 5,122,175,189,246,154, 95, 78,161, + 56,162, 40,226,250,232,182, 69, 69,132,162, 40,162,133,217, 92,110, 61, 15, 54,155,205,162,211,233, 28, 61,123,246,228, 87,173, + 90,229,176,219,237,229,117, 20, 63,238,223,191,191, 65,175, 94,189, 80,189,122,117, 46, 55, 55, 23, 0,160,209,104, 4, 79, 0, + 16, 20, 20,164,128, 43, 0,240, 74,177,161,126,187, 1,192,147, 1,112,255,126,189, 58,255,146,232,223,191,191,117,230,204,153, +172, 75,151, 46, 78, 65, 16,238, 72,193,248,251, 61,138,162,136,156,156, 28,156, 62,125, 26, 53,107,214,132, 74,165,130,201,100, + 66,106,106,106, 81, 77,128, 63,154,102,179,121,238,158, 61,123, 30,125,234,169,167,234, 76,154, 52, 73, 93,191,126,125,156, 61, +123, 22,211,167, 79, 55, 36, 37, 37,165, 26,141,198,185,126, 25,232,150, 5, 96, 34,162, 96, 0, 10, 0, 39,203,161,113, 95,121, +230,153,103,106, 23, 22, 22,174,169, 92,185,178,210,100, 50, 97,217,178,101,216,178,101, 11, 24, 99,118,187,221,158,193, 24,187, + 39,231,175,211,233,148, 71,143, 30,253,197,104, 52, 86,124,251,237,183,235,245,239,223,191, 46, 17, 61,232,233,166, 46, 7, 74, + 0,121,112, 13,133,102, 0, 10,136, 40,146, 49,118,235, 94,236,252,167, 80,210, 47,248, 69,184,170,181,159,101,140,237, 44,233, + 77,140,177,157, 68,244, 44, 92, 93, 1, 50, 92, 78,165, 52, 8,174,244,176, 47,156, 0,176,206,135,227,150, 1, 40,213, 41,185, +185, 1, 87,191,182, 47,172,131,171, 53,252, 62, 99,236,142,217, 86, 24, 99,185,238, 62,195, 17, 0,214, 17, 81, 19, 31, 10,109, +102, 3,120,130, 49,118,170,164, 23, 25, 99,199,200, 53,228,108, 54, 92,193, 86, 89,164,250,244, 9,124, 63,254, 99,184, 42,242, +203,196,253, 63, 94, 6, 96, 3,188, 23,219, 13, 7,240, 21,128,157,238, 44,206, 17,184,250,252, 19, 1,188, 4, 32, 26,174, 98, + 34,175, 5, 63,238,236, 67,207,153,223,156,222,250,195,137,155,149, 38, 61,222, 68,157, 88,171, 34, 28,118,224, 72,202, 13,204, + 94,243,179, 62, 37, 61,251, 66,161,193,210,223,155, 86,113,189, 89, 91, 46,109,253, 49,229,118,165, 73,143, 88,213,137,213, 77, +112,112,151,112, 36,189, 16,179,191, 61,161, 79,185,118,251, 66,161,209,218,231,238, 96,183, 52,174, 92,185, 2,165, 82, 9,158, +231,139, 38,137,113, 58,157, 69, 99,249,253, 37, 35, 35,163,104, 34,156,178,244, 60, 78,210, 79, 46, 94,188,120,241,129,149, 43, + 87,170,175, 92,185, 98, 6,112,209,235, 59, 74,102,107, 90, 90,218, 40, 0, 42,173, 86,235,200,200,200,112, 2, 16,237,118,187, +227,198,141, 27, 78, 0, 34, 99,140,131,203, 17,249,132, 59, 8, 64,106,106, 42,172, 86, 43,142, 30, 61,138,196,196, 68,148,199, +249, 3,192,216,177, 99,165,200,200, 72, 8,130,192,229,231,223, 57,175,139,159, 67,246,138,106, 58, 10, 10, 10,112,226,196,137, +162, 22,191,167,250,223,223, 12, 0, 99,204, 78, 68, 15, 30, 57,114,100,202,224,193,131,135, 27, 12,134,138, 26,141,230,186,213, +106,253,194,104, 52,206,189,251,190,227,163,166,153, 92, 67, 56,175,220,135,212,255, 61,211,167, 79,159,150,249,249,249, 59,242, +242,242, 84, 23, 46, 92,192,181,107,215, 80, 88, 88,104,115, 7,157, 71,224, 61,179,235, 21,142,227, 86,101,102,102,190, 14,224, +201,213,171, 87, 47,252,239,127,255,139,165, 75,151,142, 4, 80,222, 0, 32, 11,174, 34,232, 26,238, 45, 21,174,122,173,127, 69, + 0, 64, 62,222,243, 2, 4, 40, 19,114, 77,247, 59, 10, 64, 95, 0,141,224, 42,208, 59, 5, 96, 19,128,119,253,189,193, 17,145, + 32, 75,194, 36,149,196, 15,212,155,237, 53,137,192,212,178,226,156,193,106, 91,102,177,216, 62, 96,174,161,133,229,208,227,220, +122,196,212, 10,233,156,193, 98, 95,102,177,249,174, 23, 20, 20,116,212,104, 52,150,186, 22,192,221, 40, 20,138,155, 6,131,161, +212, 76,139, 70,163, 57,239,207,244,190, 74,165,242,178, 78,167,243,121, 45, 0, 34,138, 81,169, 84, 75,162,163,163, 19, 51, 51, + 51,143,154, 76,166,103,189,117,199,149,162, 19, 77, 68,199, 58,118,236,168,248,233,167,159, 76, 68,132,182,109,219, 42,247,237, +219,103, 34, 34,180,107,215, 78,185,119,239, 94, 19,128,154,254, 86,162, 19, 17, 59,114,228, 8,154, 55,111, 94,102,159,127, 89, +239, 47, 44, 44,196,254,253,251,139, 82,235, 74,165,178,168,128,112,230,204,153,108,242,228,201, 80, 40, 20, 94,245,137,136,125, +251,237,183,176,219,237,119, 56,125,207,198,243,252, 29,127, 55,107,214,172, 92, 54,223, 47,220, 69,203, 27, 25, 99,157,238,163, +230, 33,198,216, 3,254,190,175, 89,179,102,155, 11, 11, 11,187, 20, 20, 20,152, 11, 11, 11, 77, 22,139,229, 28, 92,221, 81,187, + 25, 99,191,222, 47,251,220, 54,134, 52,110,220, 56,243,240,225,195,138,216,216,216,179, 57, 57, 57,165,206,101,225,163,158, 4, +160, 59, 92,247,171, 71,124,236,222,254,199, 19, 8, 0, 2,220,119, 60,165,222,190,182,168,255,233,122,255, 22,136, 40, 20,174, + 22,190,167,195, 94,186,251, 57, 99, 44,183,156,218,229,238,119,150, 36, 41,211,102,179, 69,223,189, 95,150,229, 44,147,201, 20, +147,152,152,152, 99,181, 90,195,211,210,210,178,140, 70, 99,140, 55, 59,252, 61,255, 95, 28, 0, 40, 0, 60,199, 24,123,255, 62, +106, 78,100,140,121,205, 18,254,213, 16, 81,239,160,160,160, 73,133,133,133,243, 25, 99,254,204,108, 89,154, 94, 45,184,186,141, + 47, 49, 31,167,201,254,167, 19, 8, 0, 2, 4, 8, 16,224, 31,138, 59,152,141,241, 20, 26,223, 39, 77,173,187,248, 51,192,255, +115, 2, 1, 64,128, 0, 1, 2, 4, 8,240, 47,228, 31,191, 24, 80,128, 0, 1, 2, 4, 8, 16,192,127, 2, 1, 64,128, 0, 1, + 2, 4, 8,240, 47, 36, 16, 0, 4, 8, 16, 32, 64,128, 0,255, 66, 2, 1, 64,128, 0, 1, 2, 4, 8,240, 47,228,222,166, 25, +243, 19,149, 74,149,105, 50,153,126, 55, 92,167, 56, 74,165,210,235, 80,157,251,137,123, 24,141,210,235,129,191, 97, 97,140,153, +254, 40,123,254,209,188,221, 85,128,202, 44,131,231, 21,112,130,192,129,193,225,176,192, 40,155, 49, 97,155,255, 51,228, 4, 8, +112, 15,184,231,166,168,200,113, 92,173, 26, 53,106, 84, 74, 75, 75, 59,239,112, 56,126,249,171,237, 10,240,247,133,136,132,242, + 76,202,244, 79,197,167, 81, 0,117,195,168,126,155,122,241, 35, 79, 95,202,222,119,240,166,233,155,242,142,159,166, 98,203,129, +150,113,204,159, 58,174, 86,150,229,243, 74,165, 50, 62, 40, 40,168,204,227,136, 8, 89, 89, 89,204,225,112,216,108, 54, 91,148, + 47, 65, 0, 17, 53,227, 56,238,225,144,144,144,135,156, 78,103, 13, 34, 58,157,151,151,247, 19,128,173,229, 29,103, 74, 68, 53, + 0, 60, 5,215, 66, 71,128,107, 25,223, 85,140,177,180,242,232,221, 51, 51, 59,114,136,132, 6,140,100,152, 10,148, 78, 99,182, +150, 51,235,131,156, 78,135,196,113,188,213, 41,107, 10, 57, 85,148, 14,202, 96, 19,136,153,161,130, 1,195,118,151,107, 9,208, +255,239,184,135,116,197, 73,146,148,224,112, 56,226,120,158,191, 97,181, 90,207,150, 53, 21,243,159,141,219,198, 96,158,231, 35, + 1, 48,135,195,145,195, 92,171,168,253,173, 32,162,232, 10, 21, 42,116,233,211,167,143,178,247, 19, 79, 32, 46, 46, 14,207, 61, +255, 60,126,250,233,167,207,203,186,193, 19, 17,215,164, 73,147,174,199,143, 31,175, 84,218, 49,178, 44,155, 76, 38,211,151,126, +218,195,213,171, 87,175, 75,211,166, 77, 43,127,249,101,233,111,149,101,217,108, 54,155, 87,250, 59,209, 85,177,243,200,112, 45, +227,155,233,235,132, 76,247, 58,247,255, 93, 90, 97,112,173,251,193, 1,120,199, 61,147,234,247, 0,122,184, 15,217,194, 24,235, +121,143,231, 8, 10, 14, 14, 30, 95,187,118,237,222, 10,133,162,226,245,235,215,175,223,184,113,227,176,213,106,157,123,247,212, +235, 62,234,133,132,134,134,206,126,232,161,135,186, 71, 71, 71, 87, 57,114,228, 72,214,233,211,167,127, 53,155,205, 51,125,153, +250,253,159,140, 79, 1,192,208, 86,149,222, 95, 54,241,137, 23,179,110,231,223,122,117,233,206,175,127, 62,159, 49, 55,110,166, +184, 0, 0, 32, 0, 73, 68, 65, 84,249, 98, 46, 43,240,251,100,238, 0,128,173, 30, 10, 88, 13,119,110, 22, 3,104,242,217, 63, + 61, 0,144, 36,169, 32, 43, 43, 43, 72,169,252, 45, 9, 64,197,150, 44, 45,254,120,238,220, 57, 36, 38, 38, 90, 44, 22, 75, 76, + 89, 55, 61, 34, 82,105,181,218,247, 37, 73, 26, 52,120,240, 96,177, 89,179,102, 98,213,170, 85,113,238,220, 57, 28, 62,124,216, +178,122,245,106,167,221,110,159, 99, 54,155,231,249,114,161, 19, 81, 52, 92, 11, 27, 13,170, 88,177, 98,139,129, 3, 7, 98,240, +224,193, 32, 34,172, 92,185, 18,171, 87,175,198,245,235,215, 15, 3, 88, 13, 96, 45, 99, 44,171, 44, 61,158,231,159,118, 58,157, + 62,101, 61, 4, 65, 48,217,108,182,146,239, 88,111,119, 21,160,182,134, 33,231,124, 12,204,186, 80,230,176,203,103,115,157,194, +103, 39, 29,170, 3, 55,156,242,131, 21, 56,243, 51,141,120, 99, 66, 24,103, 39, 94, 48, 59, 37, 85, 1, 23, 81,237, 22,148, 92, + 54, 70,236,183,149, 36, 73, 68, 45,241, 91, 70,198, 2, 32, 27,174, 41, 58,163,225,154,182, 51, 13, 64, 20,126,155,114,214,196, + 24, 59,232,203,103,113,235, 15, 2,160,113,255,169,103,140,173,246,245,189, 94,116, 43,132,134,134, 62,168,215,235, 67,180, 90, +109, 94, 65, 65,193, 49,187,221,126,217,199,247,134, 8,130, 80, 27, 64, 77,133, 66,225,236,210,165,203,205, 1, 3, 6,228,174, + 89,179, 38,108,231,206,157,113, 22,139,133, 3,112,222,110,183,159, 99,204,247,235,206,221, 2, 78,132,107,114, 19, 45,128, 66, + 0,151, 0, 28, 43,143,131,145, 36, 41, 65, 16,132,230,161,161,161,136,139,139,147,156, 78, 39, 50, 51, 51,173,121,121,121,176, +219,237, 71,172, 86,235, 89,111, 26, 10,133,162,175,211,233,244,124,255, 69,215,214, 93,118, 23, 61,231, 56, 78,111, 50,153,190, +246,199, 78, 34,226,226,227,227,159,250,113,235, 86,165, 66,161,192,175,191,254,138,111,191,251, 14, 27, 55,110, 76,182,219,237, +165,102, 0,136,136,107,216,176, 97,215,237,219,183, 87,140,137,137,161, 95,127,253,181,104,173, 7,207,250, 12,146, 36,161, 82, +165, 74, 96,140, 45,246,199,158,218,181,107,119,217,185,115,103,165, 47,190,248,130, 30,126,248, 97, 68, 69, 69, 33, 56, 56, 24, + 90,173, 22, 10,197,111,179, 39, 75,146,196,108, 54,219,231,190, 76,155,125,215, 57,148, 0,166, 7, 7, 7,255,183, 69,139, 22, + 33,167, 79,159, 46,204,204,204, 92, 12, 96, 6, 99,204, 80,198,251, 88,243,230,205,173,255,199,222,153,135, 53,117,109,125,248, +183, 79,230, 16,194, 60, 35, 40, 42,136, 32, 2,214,171, 84,173,162,173, 67,157,106, 29,107,181,218, 58, 92, 91,135, 42, 14,180, +106, 7,180,214,177,104,171,182,189,106,235, 80,253,234,112,109, 45,213,106,213,138, 56, 64,157, 16, 17, 21, 84, 4,100,146, 25, + 2, 33,211, 57,217,223, 31,129, 20, 21,146,128, 94,219,222,155,247,121,242,144,156,156,172,236, 29,206,217,107,237,181,215, 94, + 43, 37, 37,101,167, 78,167,155,209, 82,195,163,129,188,143, 39, 77,154,244,145,147,147, 19, 98, 99, 99, 83, 96, 40,180, 83, 91, + 93,109, 72, 43, 96,107,107, 11, 24,174,197, 33, 48, 76, 98,122, 3, 56, 5, 96, 42,165, 84, 97,129,252, 23,194,195,195,119, 69, + 69, 69,221, 13, 8, 8, 56, 26, 22, 22,118,171,168,168,200, 59, 41, 41, 41,252,173,183,222,234,163, 80, 40,214, 80, 74,191,109, + 70,123, 35, 95,125,245,213, 3,171, 87,175,118,210,233,116,144, 72, 36,176,177,177,129, 82,169,196,240,225,195,181,169,169,169, +179, 40,165, 91,155,255, 75,252, 61,104,212, 0,104,211,134,136, 37, 85,104, 71, 13,121,252, 65, 40,194, 22,191,214,115,209,248, + 23, 2, 2, 57, 86,171, 91,255,211,149, 11, 59,126,187, 57,243,102, 57, 77,107,214,151,213, 27, 0,187,198, 66, 50,197,112, 79, +171,214,116, 49, 26, 1,228,131,236,103,110, 0,136, 68,162, 42,133, 66, 33,255,249,231,159, 65, 41,125,168, 24, 75, 99,127,195, +194,194, 76, 26, 0,132, 16,185, 76, 38, 75, 29, 62,124,184,203,230,205,155,165,118,118,118,143,157,115,231,206, 29, 76,157, 58, +181, 38, 37, 37, 37, 85,161, 80,244, 50,117,211, 17, 66, 46,203,229,242,240,145, 35, 71,146, 9, 19, 38,160, 79,159, 62,143,149, +154,213,235,245, 56,125,250, 52,118,239,222,141,131, 7, 15, 82,133, 66,113,149, 82,218,197,132,204,233,123,247,238,133, 72, 36, +130, 70,163,129, 78,167,131, 78,167, 3,203,178,224, 56, 14, 44,203, 66,175,215,131,227, 56,204,159, 63, 31,122,189,190,241,193, +238,235,222,206,200, 79,107,123,175, 68,233,244,175, 20,206,230,183, 66,177,180, 85, 88, 63,209,224, 33, 67, 16, 17, 17,129,164, +164, 36, 28, 57,124, 24,185, 87,127,211, 68,122,168,107,167,135,242,148,237,221,108,139,225, 21,124, 23,211,227,155,250,253, 6, + 22, 20, 20,184,171,213,106,126,187,118,237,200,160, 65,131,200,176, 97,195,208,163, 71, 15,156, 63,127, 30,113,113,113, 56,122, +244, 40,189,123,247, 46, 21,139,197,172,167,167,231, 3, 74,233,177,166,250,218, 88,223,235,175,249, 58, 69,179,215,146,129,199, + 20, 66,161,176,131, 92, 46,127,126,251,246,237,252,174, 93,187,226,226,197,139,152, 52,105, 18, 91, 93, 93,125,146,101, 89,147, + 69,171, 4, 2,193, 8,134, 97,108,187,116,233, 82, 52, 99,198,140, 7, 42,149,138,196,199,199,203,203,203,203,133,142,142,142, +218,200,200, 72,133, 80, 40,164, 91,182,108,241, 72, 78, 78,118,211,235,245,149, 58,157,238, 39, 11,250,201, 0,120, 5,128,190, +119,239,222,133, 65, 65, 65,218,173, 91,183,106,117, 58,157, 31, 0, 30,128, 56, 75, 7,123, 66, 8, 35,145, 72, 94,238,208,161, +131,115,116,116,180, 48, 56, 56, 24, 2,129, 0, 55,110,220, 64,102,102, 38,174, 95,191,142,196,196, 68,109,126,126,126,169, 74, +165,250,197,204,245, 60,189,176,176, 16, 78, 78, 78,208,106,181, 80,171,213,208,104, 52,208,106,181,198, 71,253,181,120,233,210, + 37,204,156, 57,179, 89,202,182,238, 59, 28,167, 76,153, 50,106, 89, 76, 12,250, 15, 24, 64,111,220,184,113, 13,192,109,115,158, +138,206,157, 59, 15, 56,113,226, 68, 43, 87, 87, 87,134, 16,130,203,151, 47, 63,116,239,215, 63,119,119,119,111, 86,155, 2, 3, + 3,251,159, 56,113,194,199,219,219,155, 89,190,124, 57,164, 82, 41,156,157,157,225,232,232, 8,153, 76, 6,129, 64, 0,189, 94, +143,158, 61,123, 66, 44, 22, 55,203, 0,168,155,113,251, 19, 66, 86,143, 31, 63,254,133, 33, 67,134,192,217,217, 25, 14, 14, 14, +184,124,249, 50,102,207,158,125, 78,167,211, 13,108,204, 8, 32,132,208, 54,109,218,232, 46, 93,186, 36, 56,117,234, 20, 38, 76, +152,240,179, 86,171,125,229, 73,140, 0, 66,200,215,203,151, 47,255,231,210,165, 75, 49,121,242,100,236,220,185,115, 31,128,177, + 13, 13, 0,145, 72,164,138,140,140,148, 12, 29, 58, 20,125,250,244,193,252,249,243,113,236,216,177, 87,205,101,243, 35,132,140, +232,219,183,239,231,235,214,173,251, 62, 44, 44,236,115, 60, 92, 15,134,212,165, 69, 78,130,161,238,136,217, 26, 42,132,144, 17, +179,102,205,250,247,204,153, 51,153,107,215,174,129, 16, 2, 39, 39, 39,227,131,199,227,161,123,247,238,108,110,110,110,151,166, +234,186,252,221,105, 52, 6,160,111, 43,223, 13,239, 45,234, 61,152, 15,189, 30, 84, 15,232, 57, 64,207, 66,171,213,212,136, 24, + 42, 95, 56,180,211, 11,225,190,118, 63, 60,239, 37,122, 63, 49, 95,115,176,217,223,202,106,160, 97,245,198,231,198, 71, 11, 32, +132,248,193, 80,222,118,124,221,161,255, 3,176,147, 82,122,175, 25, 50,140,133, 61, 76, 41,127, 75,234,178,203,229,242,173, 19, + 38, 76,112,219,188,121,179,184,177,247,107,106,106, 96, 99, 99,131,173, 91,183,202,166, 79,159,222,249,194,133, 11,239, 3, 88, + 97, 66,100,151,109,219,182, 33, 52, 52, 20,237,219,183,111,244, 4,134, 97,208,183,111, 95,120,122,122,162, 99,199,142,100,225, +194,133,166,138, 51, 25,251,169, 82,169, 16, 20, 20,132,211,167, 79, 35, 53, 53,213, 88,242, 84, 36, 18, 25,159,155,244, 16,113, +124, 1,213,170,237,159,255, 78,235, 62,239,195,149,252, 19,211,167,195,193,193,193,248,118, 80, 80, 16,166, 78,157,138,138,138, + 10,209,202,149, 43, 69, 61, 55,175,179,125, 48,187,150, 37, 28,175,209,223,166, 30, 15, 15, 15, 33, 0,188,244,210, 75, 56,124, +248,143, 10,194, 65, 65, 65,152, 62,125, 58, 6, 14, 28, 72,218,180,105, 67, 96, 72, 63,219,108, 40,165,122,142,227, 8, 12, 6, +238,112, 66, 72, 25,128,196,230,186,178, 9, 33,158,124, 62,223, 71, 34,145,116,252,253,247,223,249,109,219,182, 5, 0, 12, 29, + 58, 20, 91,183,110,229,207,152, 49,163, 11,204, 84,173,100, 89,214,101,220,184,113,215, 53, 26, 13,245,246,246,214, 29, 56,112, +192, 94, 32, 16,208,193,131, 7,151, 95,184,112, 65,150,146,146, 34, 29, 57,114,100,165, 84, 42,173,242,243,243, 83,164,167,167, +119,180,176,121,207, 1,160, 85, 85, 85,182,132, 16,187,248,248,248,252,224,224,224,202,143, 62,250,232, 82, 73, 73, 73, 87, 0, +161, 0,146, 45, 17, 36, 18,137,186,247,237,219,215,109,221,186,117,188,246,237,219,131,199,227, 33, 63, 63, 31, 0,224,234,234, +138,208,208, 80, 8, 4, 2,225,213,171, 87, 93,111,220,184,209, 13,102, 10,179,184,185,185, 97,249,242,229,198,194, 58, 2,129, + 0,197,197,197,216,185,115, 39, 42, 43, 43,209,191,127,127,140, 25, 51, 6, 46, 46, 46, 22,118,245, 49,106,110,223,190,173,103, + 24,134,233,215,175, 31,185,113,227, 70,165, 37,255,219,212,212, 84, 95, 55, 55, 67,136,146,135,135,135,177,109,245,247,126,253, +243,230,210,179,103,207,214,187,119,239, 6, 0, 92,187,118, 13,115,231,206,133, 84, 42, 5, 0,232,116, 58,163, 17,222, 28, 8, + 33, 78, 0, 62,107,215,174,221,107,189,123,247, 22, 10, 4, 2,120,121,121,225,220,185,115, 72, 75, 75,195,168, 81,163, 48,102, +204, 24,232,245,250,158,239,188,243,206,135, 0,162, 31,149, 65, 41, 37, 60, 30,111,207,252,249,243,199,175, 90,181, 10,187,119, +239, 30, 58,126,252,120,174, 49,175,140, 72, 36, 42, 82,171,213,150,196,102,173,140,137,137, 25,213,171, 87, 47,167,175,191,254, + 26, 42,149,106,108,113,113, 49,134, 12, 25, 2,123,123,123,108,217,178, 5,253,251,247,151, 72,165, 82,148,151,151,227,216,177, + 99,184,122,245,170, 22,134,226,109,166,250, 59,122,200,144, 33,177,235,214,173,219, 24, 16, 16,240, 21, 33, 68, 15, 67, 97,179, + 1, 0,206, 0,136,161,148,102, 19, 66, 22, 0,136, 1, 96,178, 88, 24, 33,100,244,186, 89,179,246,245, 28, 61,154,196,197,197, +129,207,231, 35, 62, 62, 30,215,174, 93, 67,187,118,237,176,124,249,114, 4, 7, 7, 99,198,140, 25,252, 37, 75,150,172, 3,208, +223,130,190,255,237,104,212, 0,224, 1, 58, 78,167,213,243,121, 0, 15,148,215,202, 89,234, 5, 61, 11,112, 44,192,151, 2,170, + 10,244, 11,116,105,239,248,230,115,159, 5,187,145, 7,105, 69,212,100, 96, 77,157,101, 54,202,120,128,213,160, 54,182,135, 97, +230,207,170,192, 44,205,132,126,177,229,197,172,234,228,141, 6, 48,217,201,201,169, 87, 80, 80, 16,121,240,224, 1,246,239,223, +143, 29, 59,118,124,184,103,207,158, 15, 8, 33,103, 97,168, 26,120,128, 82, 90, 99, 78,166, 64, 32, 48, 86, 1,107, 74,249,215, +159, 99,162, 93, 3, 60, 61, 61,135,172, 93,187,182, 81, 5, 87, 93, 93,141,234,234,106,212,212,212, 64,161, 80, 96,222,188,121, + 54, 19, 39, 78, 92, 66, 8,217,111, 42, 38,192,215,215, 23,229,229,229,248,233,167,159,224,229,229,133,231,158,123,238,161,247, + 19, 19, 19,113,234,212, 41, 40,149, 74,139,140, 20, 0, 80,171,213, 8, 10, 10, 66, 72, 72, 8, 50, 50, 50,144,145,145,241,152, +242, 55, 59,216, 49, 20, 32, 20,142, 18,112,145,145,145,252,212,212, 84, 84, 84, 84, 32, 48, 48, 16, 1, 1, 1,184,121,243, 38, + 78,156, 56,129,130,130, 2,136, 68, 34, 56, 73,192, 1,148, 0,122, 83, 30, 30,173, 84, 42, 69,100,100, 36, 88,150, 69, 92, 92, + 28, 66, 67, 67,225,227,227,131,156,156, 28,252,242,203, 47,200,205,205, 69,120,120, 56,210,211,211,129, 63,114,209, 91, 74, 13, +195, 48,198, 37, 0, 24,170, 64,118, 4, 48,148, 16,242,163,185,107,133, 16, 66,132, 66, 97,168, 80, 40, 12,110,215,174, 29,127, +212,168, 81,188, 9, 19, 38, 48,245,202,191,158,206,157, 59, 67,173, 86, 63,238,254,105,132, 13, 27, 54,148,168,213,106, 12, 30, + 60,216,223,221,221,189,122,218,180,105, 21, 99,199,142, 85,239,217,179, 71, 27, 27, 27,235,176,127,255,254,214,125,251,246,189, +237,232,232,200,212,245,217, 18,218, 68, 68, 68,228, 18, 66,228, 42,149,138,102,100,100,168,243,242,242,212,117, 75, 93, 55, 96, +168,224,105,214, 0, 32,132, 56, 58, 57, 57,181, 91,184,112, 33,175,117,235,214,208,233,116, 72, 72, 72, 64, 85, 85,149,241,122, +214,104, 52,176,183,183, 71,199,142, 29,249, 89, 89, 89,237, 9, 33, 25,166,106, 2,104, 52, 26,176, 44,139,221,187,119, 35, 34, + 34, 2, 93,186,116,193,169, 83,167, 80, 80, 96,152,208,197,197,197, 97,204,152, 49, 45, 82,182, 0, 64, 41,213, 18, 66,210, 78, +158, 60, 25, 18, 53,111, 30, 82, 83, 83, 95, 32,132,168, 40,165,185,230, 62,123,254,252,249,135,220,254,129,129,129,184,127,255, +254, 67, 30,128,230,178,125,251,118,253,233,211,167,153,115,231,206, 97,238,220,185, 16,139, 13,195, 67, 84, 84, 20, 18, 18, 18, + 16, 30, 30,142,101,203,150, 89, 44,143, 16,226, 34,149, 74, 79,237,218,181, 43,248,213, 87, 95,173,239, 51,142, 31, 63,142,225, +195,135,215,104,181,218,233,231,206,157,155,109, 99, 99, 19, 49,109,218, 52,172, 92,185,242,159,132,144,143, 26,139, 9,208,235, +245, 19,119,237,218, 53,158, 97, 24,196,196,196,224,192,129, 3, 80, 40, 20,240,244,244,132, 86,171,133, 94,175,135, 72, 36, 66, +255,254,253,221,234,235, 36,212,215, 88,104,172,109,148,210, 28, 66,200,216,209,163, 71,255,122,229,202, 21,222,247,223,127,111, +172,106,201,178, 44, 42, 43, 43,113,248,240, 97, 28, 58,116, 8, 9, 9, 9, 42,173, 86,123, 20,134, 98, 97, 23, 77,244,247,181, + 49, 99,198,172, 27, 56,112,160,236,171,175,190,146,127,254,249,231, 66, 0,191, 2, 56, 1,195,117,220, 15,192, 6, 24, 60, 94, +191, 1,136, 53,243,251,189,246, 99, 84,212,158,142,129,129,100,211,168, 81, 32,253,250,225,224,217,179,250,252,252,252, 79, 0, +108,202,205,205, 29, 30, 29, 29,189,245,208,161, 67,232,209,163, 7,108,108,108, 34,136, 37, 1,108,127, 67, 26, 53, 0,182,158, +205,153,123,254,122,206,183, 62,110,242,185, 95,189,221,239, 37,112,124,168,108,219,212,168, 66, 39,192,201, 39, 64, 86,154,147, + 94, 35,189,188, 21, 97,222, 42,223,249,253,218,126,209,166, 13,233,145,149,213,120,192, 9, 33,100, 31,159,207, 31, 21, 30, 30, +206, 92,188, 88,247, 63,102,213, 16, 67, 11, 64, 11,176,117, 31,107,224, 1, 32,132, 28,161,148, 14,126, 92,218,195,242, 0, 32, + 57, 57, 25,103,206,156, 1, 96, 24,116,215,175, 95,143, 53,107,214,144, 95,126,249,229,133, 29, 59,118,188,112,228,200,145, 45, +132,144,227, 77,201,171,167,126,176,105,168,236, 31,125,152, 27,144,236,236,236,198,189,255,254,251,210,122,235,190, 33,245,138, +191,186,186, 26, 10,133, 2, 74,165, 18,132, 16, 12, 27, 54,140,191,103,207,158, 65, 0, 76, 6, 5, 18, 66,224,225,225, 1,189, + 94,143, 35, 71,142, 64, 42,149,162,166,166, 6,167, 79,159,134, 90,173,182, 76, 97, 55, 64,163,209, 32, 33, 33, 1, 25, 25, 25, +168,170,170,130, 88, 44,110,212, 3, 96, 9, 34, 62, 40, 0, 99, 21,182,170,170, 42,196,196,196, 32, 55, 55, 23, 18,137,196, 56, +224,213,159,103,134, 51, 42,149,170, 93, 84, 84,148,177, 13, 5, 5, 5,216,181,107,151,177, 12,111,255,254,253,193,231,243,113, +245,234, 85,192, 96,253, 91, 76, 19,107,254,105,132, 16, 62,128,238, 0, 26, 45,129,221, 0,159, 54,109,218,132,237,222,189,155, +223,165,203,227,171, 44,153,153,153,200,204,204,196,143, 63,254, 8,145, 72,100,113, 97, 28,177, 88,140,240,240,240,202,181,107, +215, 22,175, 94,189,218,254,227,143, 63,118,101, 24, 70,225,239,239, 95, 88, 81, 81,193, 49, 12,211,220, 89,162,173,159,159,159, +250,232,209,163,121,119,239,222,213,100,102,102, 86, 39, 38, 38, 42,238,223,191,175,133,161,142,188, 69,198,137, 68, 34,233, 48, +116,232, 80,177,139,139, 11, 68, 34, 17,146,147,147, 31, 82,254, 13,141, 0,134, 97, 16, 26, 26, 42, 78, 76, 76,244, 7,208,100, + 92,134, 90,173,134, 74,165,194,157, 59,119,224,236,236,140,136,136, 8,248,251,251,227,194,133, 11, 0,128,158, 61,123, 66, 42, +149, 54, 75,217, 18, 66, 92,229,114,121,119,141, 70, 83,169, 86,171,207, 0,184, 50,231,221,119, 91,237,219,187,215, 97,235,150, + 45,204,192, 65,131,250, 18, 66, 14, 80, 74,107, 77,201,105,168,232, 3, 3, 3,141,199,158,196, 3, 0, 24, 92,223,182,182,182, + 16, 8, 4,168,255, 95, 38, 38, 26, 10,228, 37, 39, 39,163,182,182, 22, 28,103,222,235, 79, 8,113,148, 74,165,167, 14, 30, 60, + 24, 60, 96,192, 0,163,215,164,109,219,182,232,212,169, 19,162,163,163,101,203,151, 47,239,205,113,220,234, 67,135, 14, 29,154, + 60,121, 50,254,241,143,127,216,229,230,230,186, 3,200,126, 84, 30,165, 84, 79, 8,193,240,225,195,177,120,241, 98,196,196,196, + 96,211,166, 77, 16, 8, 4,144, 72, 36,120,229,232, 8,156,157,112, 6,173, 91,183,198,145, 35, 71, 96, 99, 99,131,214,173, 91, +155,220,201, 69, 41,253,141, 16,242,118, 72, 72, 72,108, 72, 72,136,140, 82,138,224,224, 96, 44, 95,190, 28,227,199,143,199,249, +243,231,127, 5,176, 29,134,128, 64,147, 6, 55,143,199,123, 99,220,184,113,159,190,240,194, 11,178, 75,151, 46,201, 89,150,157, + 42,145, 72,134,171, 84,170,117,148,210,157,117,191,201,207, 0, 54, 18, 66,132,117,198, 31,211,148,194, 22, 10,133,111, 28,154, + 63,127,199,243, 46, 46,164,100,209, 34, 68,232,245,216, 24, 23, 71,243,107,107,167, 80, 74,119,212,201,219,113,243,230,205,175, + 88,150,229,203,100, 50,120,121,121,201,110,223,190,237, 6,160,217, 85, 52,255,234, 52,154, 7,160,157, 12,142,253,194,124,163, + 15, 68,191, 60,220,215, 73,236, 1, 78, 7, 85,232, 4,236, 76,202,151,121,189,186, 4,187,126, 47,144,169,158,155, 6,112, 58, + 68,250,219,187, 74, 42, 96,202, 45, 57,186,119,239,222, 76, 70, 70,198, 31, 71,116, 26, 48, 81,151, 16,115,188, 16, 96, 53,208, +191,103, 11,189, 78,141,163, 71,143,162, 79,159, 62, 32,132,188,108,137,188,139, 23, 47, 54, 90,127, 93, 32, 16, 96,232,208,161, +152, 62,125, 58,162,162,162,248,102,228, 25,151, 0, 30, 85,246,205, 93, 2, 96, 24,166,103, 88, 88,216, 99,199, 21, 10,133, 81, +241, 43, 20, 10,163, 7, 64,161, 80,160, 85,171, 86, 2, 7, 7,135,190, 38, 5, 63,130,139,139, 11,108,108,108,240,239,127,255, + 27, 10, 69,203,150,175,181, 90, 45,174, 95,191,142, 51,103,206, 32, 61, 61, 29, 66,161, 16,197,197,197,184,119,239, 30, 82, 82, + 82,192,178,172,197, 6, 64, 99, 52,246,127,177,132,250, 8,237,134,193, 81, 12,195, 64,163,249,195, 64,228,243,249, 70,163,226, + 41,110,217,185, 11,192,195,220, 73, 14, 14, 14, 97, 49, 49, 49,143, 41,127,189, 94,143,210,210, 82,100,101,101, 33, 53, 53, 21, +199,142, 29,211,151,151,151,103, 52, 33,230, 33, 22, 46, 92,232, 90, 91, 91,107,244,138, 68, 71, 71, 87, 58, 59, 59,215,180,110, +221,218,232,182,230, 56,142, 92,187,118,205,213,242,238,160,122,223,190,125,108,118,118,118,229,189,123,247,202,143, 31, 63, 94, +158,158,158, 94, 11,131,199,196, 6,128, 69,193,132,132, 16,247,128,128, 0, 84, 87, 87, 35, 33, 33, 1,247,239,223, 55, 94,207, +245,143,250,107,154, 82, 90,191,118,106,210, 85,172,209,104,224,225,225,129, 5, 11, 22, 96,204,152, 49, 16, 8, 4,120,241,197, + 23,241,217,103,159, 97,229,202,149,136,138,138, 50,222,135, 22,182,209,198,207,207,111,224,141,180, 52,247,119,222,121,167, 3, + 33,196,141, 82,170,171,168,168,248,249,173, 41, 83,148, 44,203, 98,125,108,172, 8,134, 50,213, 38, 17, 8, 4,184,122,245, 42, + 58,118,252, 99, 72,115,119,119,135,147,147,147, 81,129,183, 4,153, 76,102, 52,106,234, 99,110,186,118,237, 10, 0,232,212,169, + 83,115, 68,173,216,186,117,107,240,128, 1, 3,176, 98,197, 10,124,246,217,103, 40, 43, 43,195,210,165, 75,177,103,207, 30,132, +132,132,192,209,209,241, 53, 66,200,123, 35, 71,142, 4,203,178, 56,115,230, 76, 21,204, 40,175,182,109,219, 66,169, 84,226,157, +119,222,129, 88, 44,134, 86,171,133,171,171, 43,206,188,158, 0,177, 88,140,201,147, 39, 35, 57, 57, 25, 87,174, 92,177,168,145, +148,210,173,149,149,149,173,206,156, 57, 19,121,246,236,217,149,169,169,169,208,233,116,208,235,245, 0,176, 30,192, 79, 0,190, + 32,132,220, 37,132,124,220,152, 12, 66, 72,199,224,224,224, 13, 17, 17, 17,182,169,169,169,114,150,101, 31, 28, 60,120,176, 74, +165, 82,173,174, 87,254,117,188, 51,104,208,160,251,148,210, 54,132, 16, 57, 0,117, 99,202,159, 16, 18,246,207,158, 61,119,116, +227,243, 73,201,167,159,130,170,213,136,231, 56,125, 82,109,237,164,122,229, 95,199,219, 75,151, 46,229, 51, 12,131,242,242,114, +220,187,119,175,152,182,160,132,246,223,129,199, 60, 0, 29, 29, 73,240,236,161, 33, 95,191, 51, 40,248, 31,181, 42, 77,141,158, +128,101,132, 50,190,147, 79,128,236,179,185,187, 80, 80, 90,133,207,246,253,134,168,177, 43,100, 84, 40,133,167,173,210,153,242, +208, 6, 77,187, 19,201,201,147, 39,113,233,210, 37, 44, 91,182, 12,223,126,251, 45, 94, 83,169,160,255,212, 31,208, 42,161, 81, + 41,241,127,247,236,144,172,237, 4,230,232, 81,244,234,213, 11,167, 79,159, 54,213,230,135,228, 93,185,114, 5,133,133,134, 66, + 88,251,247,239,199,144, 33, 67,176,119,239, 94, 36, 39, 39,131, 97, 24,216,219,219,155, 92,199,174,119,233,215, 91,230,230,130, + 0, 77,161, 80, 40, 90, 7, 4, 4, 24, 95, 83, 74, 31,114,249,215,212,212, 24,159,215, 15,158, 82,169, 20,148,210,102,141, 0, + 79, 3,157, 78, 7,177, 88,108, 84,178,217,217,217,152, 54,109, 26, 2, 2, 2, 80, 94, 94,142,213,171, 87,163,123,247,238,207, +186, 89,127, 38, 66, 0,102,141, 9,141, 70, 99, 31, 28, 28,108,124, 93, 81, 81,129,188,188, 60, 72, 36, 18,180,109,219, 22,174, +174,174,240,244,244,132, 66,161,160, 0, 42, 44,249,226,105,211,166,149, 47, 92,184,208, 61, 55, 55, 87, 10,195,174, 7, 35, 28, +199,161,186,186,218,246,210,165, 75,188,128,128,128,178,123,247, 44, 14,109,201,100, 89,182,245,170, 85,171, 46,170,213,106,170, + 82,169,116, 64,189,219, 13,157, 96, 48,120,204,162,215,235,165,245,215,113, 67,101,255,232,223,250,217,107,221, 18,195,227, 46, +176, 6,104,181, 90, 8, 4, 2,180,109,219,246, 33,163,219,199,199,231, 49, 3,220, 28,132, 16,158,141,141, 77,255,253,251,246, +137,133, 66, 33,142, 28, 57,162, 5, 80, 94,231,209, 17,231,229,229,101, 31, 56,112, 32,104,210,164, 73, 0,224, 96, 90, 26, 90, +236,230, 55,135,173,173, 45,100, 50, 25, 94,127,253,117, 76,156, 56, 17,221,186,117,195, 7, 31,124, 0,157, 78, 7,181, 90,109, +145,119,135, 16, 98,227,238,238,254,198,152, 49, 99,240,239,127,255, 27, 31,124,240,193,175,114,185,252, 57,111,111,111,167,151, + 95,126, 25,167, 78,157,130, 88, 44,134,187,187,187,124,206,156, 57,221,199,142, 29,139,109,219,182,161,164,164,100,155,185, 45, +129,106,181, 26,222,222,222,112,113,113,129,171,171, 43,236,237,237,225,224,224,128,234,234,106,136,197, 98,108,219,182, 13,163, + 70,141, 66, 99,222,205,166,160,148, 86, 18, 66,138, 5, 2,193,140,119,222,121, 7, 58,157, 14,253,250,245,195,197,139, 23,247, +114, 28,151,241,210, 75, 47,117, 91,176, 96, 1,222,120,227,141, 15, 8, 33, 59, 40,165,217,143,124,254, 38, 33,100,229, 15, 63, +252,240,114,251,246,237, 59, 28, 60,120,176,166,162,162, 34,166,161, 23,143, 16, 50,162,119,239,222, 81,219,183,111,223, 15,195, +189, 51, 26, 77,120,159, 40,165, 87, 9, 33, 43,237, 47, 95, 94, 60,142,101,177, 30,208,127, 83, 83, 51,241, 17,121,175,204,153, + 51,103,253,244,233,211,145,149,149,133, 35, 71,142,128,101,217, 83, 22,119,250,111,198, 67, 6, 0, 33,132,124,254, 90,167,237, +179, 95, 14,126,238,110, 65, 89,193,236,109,231,127,252,118,198,243, 35, 60,228,106,207,210,156,244,154,249, 99,251,201, 62,219, +247, 27,230,143,237,135,210,236,155, 53, 78, 53, 37,178,178,234,218, 10,134, 32,207,220, 23,117,237,218, 21, 63,255,252, 51,238, +223,191,143,141,155, 47, 66, 94,114, 21,229,165, 90,220,210,180,131,208, 59, 4,118,118,118,205,114,175,213,203,203,201,201, 65, + 76, 76, 12, 46, 93,186,132,249,243,231, 35, 54, 54, 22, 65, 65, 65,205,150, 39, 20, 10, 65, 8,121,162, 32, 64,153, 76, 86,152, +149,149,213,202,217,217, 25,148, 82,163,203,191,161, 17,208,112,224,172,174,174,198,131, 7, 15,192, 48,204, 51,223,195,207,113, + 28,248,124, 62, 52, 26, 13, 8, 33, 88,189,122, 53,212,106, 53,202,203,203,161,209,104, 48,107,214, 44,172, 93,251,151, 47, 9, +254, 52,233, 8, 32,199,220, 73,148,210, 91,155, 55,111,238,180,121,243,102,166,162,162, 2, 23, 46, 92, 64, 69, 69, 5,124,124, +124,208,174, 93, 59,132,132,132,160, 85,171, 86, 24, 61,122, 52,179,123,247,110,127, 60,162,208, 27,195,223,223,159,221,188,121, +115,225,212,169, 83,189,222,126,251,109,207,206,157, 59,215, 0, 64, 86, 86,150,188,186,186,218, 70, 36, 18,169,187,119,239, 94, +168,211,233,154,147,185, 51, 25,128,119, 69, 69,197,115, 0,210, 96,216, 82, 41, 7, 16, 2, 64, 0,192,162,168,102,134, 97,148, + 89, 89, 89,210, 14, 29, 58,152, 85,254, 0, 80, 91, 91, 11, 0, 77,110, 59, 3, 12, 6, 64, 94, 94, 30, 46, 95,190,140, 54,109, +218,160,119,239,222, 15,221, 99,124, 62, 31, 89, 89, 89,240,247,247,183,164,137,221,254,245,175,127,185,132,133,133, 33,102,217, + 50,216,218,218,242,195,194,194, 38,218,217,217,241,189,188,188,208, 33, 32, 0, 83,166, 76,193,157, 59,119, 0,195, 54, 72,147, + 8, 4, 2,244,236,217, 19,133,133,133,240,240, 48, 56,132,212,106,181,217,248, 31,115,200,100, 50,240,120, 60,164,167,167,227, +246,237,219, 8, 15, 15,127, 72,249, 91,184,188,227,210,173, 91, 55, 41,143,199,195,145, 35, 71, 0,224,107,133, 66,209,235,246, +237,219, 81,131, 7, 15, 70,199,142, 29,145,155,155,139,153, 51,103, 98,194,132, 9, 56,112,224, 0,230,204,153,115, 17,134,160, + 56,147,104, 52, 26,216,218,218, 66, 46,151,195,206,206, 14,114,185, 28,182,182,182,198,137, 66, 94, 94, 30, 54,108,216, 0,192, +144,172,205,146,198, 18, 66, 60, 9, 33,199, 98, 99, 99, 29,122,246,236,137, 51,103,206, 96,226,196,137,232,220,185,179,253,207, + 63,255,220,109,214,172, 89, 72, 73, 73, 65, 89, 89, 89, 41,208,184, 14,161,148,174, 37,132, 8,146,146,146, 58,105,181,218,165, +148,210,125, 13,228,143,238,213,171,215,186,237,219,183,127,235,230,230,246, 69, 93,108,216,123, 0,122, 54,213, 38, 74,233, 18, + 66,136,224,132, 64, 16,117, 65,167,123,253, 17,121,163,198,253,243,195,253,179,231, 78, 33, 25, 25, 25,184,122,245, 42,182,111, +223, 94, 3,224,125, 75,250,251,119,228, 33, 3, 32, 8, 16, 20, 87,212, 40,190, 59,117,227,250, 23, 71,211,162,107, 88,238,220, +111,215,114, 35, 38, 60,223,202, 83,122,241, 75, 58,169,219,219, 53, 81, 99, 87,200, 74,179,111,214, 72,207,127, 70,193,105, 17, +127,171,188,152, 35,184,105,233, 23,250,248,248, 96,209,234,175, 81, 94, 94,142,153, 51,103, 66,230, 38,123, 34, 87,179,175,175, + 47,190,253,246,219, 63,228,201, 90, 38,143,207,231,131,199,227, 61, 22,244,247,232,195, 20, 12,195,252,158,146,146,210,170, 75, +151, 46, 15, 41,255,134,179,167,134,179,168,186,227, 92,101,101,229, 51,183, 48, 53, 26, 13,108,108,108,208,183,111, 95, 4, 5, + 5, 25, 7,114,189, 94, 15,189, 94, 15,150,101,241,214, 91,111,225,135, 31,126, 48, 33,133,114,148,240,116,237, 29, 24,221,182, +109,219,196,175,189,246, 26,108,108,108, 30, 59, 75,171,213,226,226,197,139,104,239,192,232, 0,162, 55,189,181, 0, 0, 80,115, +242,228, 73, 89,191,126,253, 80, 94, 94,142,175,190,250, 10,217,217,217,208,104, 52,245, 91,165,112,243,230, 77,192, 16,196,103, + 17, 77,237,255, 39,132,184,194,224, 26,182, 1,112,220,156, 28,149, 74,149,182, 99,199,142,192,244,244,116,210,171, 87, 47, 1, +165,180,126,214,101, 60,167,206,165, 77,246,236,217,227, 99,105,251, 0,192,193,193, 65,183,118,237,218,226,125,251,246,217,100, +103,103,187, 57, 59, 59,231,183,107,215,174, 48, 45, 45,173, 57,174,127, 0,198,181,221, 19, 35, 71,142, 28,213,169, 83,167,254, + 37, 37, 37,216,188,121, 51,120, 60, 94, 45,199,113, 63, 90,186,213,139, 82, 90,120,231,206, 29,151,128,128, 0,136,197,226, 38, +149, 63,143,199, 3,199,113, 40, 43, 43,131, 94,175, 55, 89,155,190,188,188, 28,155, 54,109,170, 55, 22,192,178, 44, 94,125,245, + 85,227, 61,246,201, 39,159, 32, 33, 33, 1,209,209,143, 5,174, 63, 70, 80, 80,144,223,235,175,191, 14, 0,248,240,131, 15,176, +116,201, 18, 70,175,215, 51,245,215,178, 90,173,198,193,131, 7,241,193,135, 31, 42, 96, 65,208, 99,195,123, 95,161, 80, 64, 46, +151, 63,177,242,175,135, 97, 24,180,109,219, 22,222,222,222, 70,229,255,254,251,239, 67,167,211, 97,201,146, 37,150,136,200, 63, +119,238, 92,137, 74,165,114,121,227,141, 55,176,111,223,190, 79,212,106,245,166, 47,190,248,162,230,185,231,158,147,245,238,221, + 27, 98,177, 24, 54, 54, 54,216,185,115, 39,222,125,247,221,139, 44,203,246,167,148, 86,155, 19, 92, 91, 91,139,240,240,112,227, +246, 68, 59, 59, 59, 72,165, 82,212,214,214, 54, 92,110,107,238,143, 48,101,206,156, 57,173,134, 14, 29,138,213,171, 87,227,203, + 47,191,212, 68, 70, 70,138,150, 44, 89,130, 57,115,230,224,202,149, 43,152, 59,119,174,134,101,217, 73,166,150,242, 40,165,159, + 18, 66, 14, 81, 74,141,122,134, 16,242, 90,175, 94,189, 86, 79,157, 58,213,254,235,175,191, 22,175, 89,179,134, 1,240, 35,128, + 5,230,242,160, 80, 74, 23, 17, 66,254,143, 82,154,210, 80,222,184,232, 31,246,140,124,185, 7,121,249,237, 13,248,231,176, 64, +108,219,248,153, 94,161, 80,188,245,168,103,226,191,137,135, 12,128, 52, 67, 0,197,139,237, 0,225, 29, 74, 53, 0,208,197,131, +191,248, 31,190, 54, 91,253,117, 41,173, 36, 63, 77, 1, 21,201,224,164, 44,149, 65,207, 33,179, 68, 89,176,238,116,241,210,244, + 18,147, 23,152,190,170,170,138,121,116, 63,188,163,163, 99,163, 51,244,186,181, 94, 83,131,211,211,150,103,116, 73,214, 27, 0, + 77,197, 1,212,111, 21,108,138,138,138,138, 67,155, 54,109,122,121,212,168, 81, 54, 74,165,242,161,160,191,134,127,235, 7,208, +202,202, 74,156, 60,121, 82,171,215,235, 77, 5,158,177, 74,165,146,223,152, 98,173,167,225,224, 84,215, 95,179,174,236,119,223, +125, 23, 42,149, 10, 42,149, 10,106,181,218,168,248, 27, 26, 1,102, 61, 40,122,166, 22, 18,251,226,221, 67, 57,225,198, 43, 59, + 52,111,191,190,223, 62,114,248,107,252,177, 99,199, 26, 26,206,178,184,124,249, 50,138,238, 94, 99,103,135,176,149, 51,135, 10, +107,169,141, 91, 30, 1, 76, 6, 98, 1, 56,190,100,201,146,136,237,219,183,123, 12, 27, 54, 12, 51,103,206,196,243,207, 63,143, +184,184, 56,108,217,178, 5,183,110,221, 66, 73, 73, 73, 33,204,108, 55,123, 4, 89,131,253,255, 50, 66,200, 64, 0, 78, 48,184, +196,239, 1,248,205, 18,165, 72, 41, 85, 18, 66,190,139,143,143,247,187,114,229, 74,168, 90,173,182,123,225,133, 23,200,139, 47, +190, 72, 88,150, 69, 78, 78, 14,114,114,114, 80, 88, 88, 8,181, 90,109, 54,217, 18,159,207, 47, 11, 12, 12, 12,159, 49, 99,134, +209,183, 63,118,236, 88,229,129, 3, 7,202,228,114,185,241,119, 74, 79, 79,183, 75, 79, 79,247, 35,132,148, 54,163,207, 62,126, +126,126,130, 37, 75,150,160,176,176, 16, 29, 58,116,192,178,101,203, 68, 37, 37, 37, 62, 0,204,238,147, 6, 0,149, 74,149,126, +245,234, 85,255,214,173, 91,139,125,125,125,161,211,233, 30, 83,254,182,182,182,112,115,115,195,237,219,183,145,156,156,172, 86, +171,213,183, 77,201,100, 24,230,161,107, 86,165, 82, 25,239,185,154,154, 26, 36, 36, 36, 0, 0,156,157,157,205,182,239,214,173, + 91,121,113,113,113,254,195,134, 13,195,154, 53,107,112, 62, 49, 17,132, 16, 20, 23, 23,235,243,243,243,149, 5, 5, 5,213,148, +210,124, 0,169,150,236,173,127,116,207, 63,199,113, 79, 69,249,215,179,105,211,166,135,102,254, 26,141, 6, 28,199, 65,173, 54, +159,180,143, 82,170, 35,132,124,177,106,213,170,229, 49, 49, 49, 56,116,232, 80,208,151, 95,126,249, 85, 88, 88, 24,110,223,190, +141,189,123,247, 66,175,215,227,214,173, 91, 21,153,153,153, 91, 0,124, 98,225, 14,168,162,254,253,251,155, 12,236, 19,139,197, + 22,205,250, 31, 33, 36, 40, 40, 8,217,217,217,248,242,203, 47, 43, 0,116,140,143,143,159,125,229,202,149,232,231,158,123,142, +151,148,148,164, 81,169, 84,175, 88,146,199,227, 17,229, 63,177,107,215,174,203, 94,123,237, 53,187,203,151, 47,219,170,213,234, + 55, 37, 18,201,144,186,192, 64,179, 57, 50,234,228, 53, 84,254, 19,135,204,222,187,179,103,191, 17,100,205, 73,128,120, 14,195, +167, 27, 22,211,242, 59,233,111, 81, 74, 15,180,160,223,127, 27, 30,211,104,117,193, 19,198,136,171, 43,133,236,175, 93, 60,248, +211,222,237,227,253,233,139, 1,114, 15,103, 73,173, 99, 89,181,170, 60,254,118, 85,241,186,132,210,165,201, 69,236,225, 71,101, + 60,194,134,224,224,224,119,151, 47, 95,206, 27, 49, 98, 4, 26, 75,140, 3, 24, 20, 87,113,113, 49,126,253,245, 87, 14,192,231, +207, 80, 30,206,156, 57, 3,119,119,247,250, 36, 68,208,235, 13,147, 84,142,227,140, 51, 27, 66,136, 37,129,109,223,103,103,103, +207,220,180,105,211, 63, 70,143, 30,205,111,204,229,223,240,121,126,126,190,182,166,166,102, 15,165,212, 84,100,205, 7,175,190, +250,234, 39,111,190,249, 38,111,228,200,145, 77,122, 33, 56,142,195,229,203,151,145,148,148,196, 1,248,192, 92, 67,181, 90,173, + 49,225,207,163,138,191,225,107,147, 8,170,106, 25, 39,255, 7, 66, 73,129,122, 94,247, 7,110,179,187,104,106, 55, 94,249, 70, + 58,117,252, 62, 7,103, 31,127, 94,254,237,107,220,252,112,174, 98,214,155,252, 90, 70, 96, 83,205,216,187, 23,193,214,189, 28, + 51,226, 77,186, 98, 41,165,165, 0,126, 38,132,120,197,198,198,118,239,218,181,171, 83, 93, 6, 49,156, 57,115,166, 12,192,239, +117,131,122,179,160,148,234,235,250,196, 0,184, 9,160,194,146,217, 81, 35,114, 56, 24,118,109,220, 33,132,216,156, 59,119,110, +116, 82, 82,146,144,101, 89,100,103,103, 35, 39, 39, 7,167, 78,157, 2,195, 48,102,119, 1,176, 44,251, 67, 69, 69, 69,192,154, + 53,107,158,179,179,179,211,118,239,222,189,102,228,200,145, 70,197, 95, 80, 80, 32,205,207,207,247,214,233,116, 2, 74,233, 37, +152,217, 45,242, 8, 69,105,105,105,204,138, 21, 43, 80, 86, 86,134,141, 27, 55, 2,134, 36, 64, 22, 15,230,148,210, 74,137, 68, +114,243,194,133, 11, 33,122,189,158, 95,159, 60,170,222,152,114,118,118,134,135,135, 7,178,179,179,145,156,156,204,106,181,218, +155,230,246,220,243,249,124,188,255,254,251,136,143,143,135,135,135, 7, 94,121,229, 21,163,226,117,113,113, 65,175, 94,189,224, +227,227,131, 1, 3, 6, 96,225,194,133, 38,219,167,215,235,207,189,249,230,155,174, 73, 73, 73,246,111,190,245, 22, 54,109,222, +172, 42, 40, 40,248,161,177,196, 55,150,240,168,247,239,105, 42,127, 30,143,103,116,247,215, 63, 62,250,232,163,230,230, 1, 88, +189,124,249,242,240,170,170,170, 17,139, 23, 47,198,146, 37, 75,112,243,230, 77,124,247,221,119, 56,117,234,212, 65, 0,115, 1, + 20, 83, 74, 45,222, 30,171,213,106,240, 82,227,167, 0, 0, 32, 0, 73, 68, 65, 84,255, 83,181, 87,178,238,221,187,135,110,221, +186,129, 97, 24,137, 94,175, 47,170,115,193,239, 58,117,234, 84, 87, 24, 50, 82, 90,236, 61, 6, 12,129,129,118,118,118,235,199, +142, 29, 43,184,121,243,166, 92,163,209, 60, 56,120,240,160,162, 46, 48,112,119,115, 27, 72, 8, 9,243, 10, 29,179, 51,244,133, +177,228,155, 4, 64,161, 2,180, 89,199,244,229,119,226, 39, 83, 74,155,149,238,249,239,136, 69,169,128, 1,160,131, 11,177,229, + 81,116,212, 83,120, 51, 4,121, 28,193, 77, 51, 51,255, 63,190,196,144,191,126,105,171, 86,173, 38, 44, 91,182,204,168,184, 39, + 77,154, 4, 66, 8,106,107,107, 17, 31, 31,207,149,150,150,238,134,193,106, 53,185, 38,254, 52,229,201,229,242,203,181,181,181, +102,163,131,235, 17, 10,133,165, 42,149,170, 77, 83, 65, 53,132, 16,111,169, 84,122, 61, 42, 42,202,246,133, 23, 94,224, 53,182, + 20, 80, 85, 85,133,162,162, 34,246,216,177, 99,249, 53, 53, 53, 29,205,109, 77, 34,132,116, 0,240,169,167,167,231,136, 25, 51, +102,160,127,255,254, 32,132, 96,243,230,205, 16, 10,133,200,201,201,193,197,139, 23, 81, 85, 85,117, 8,192, 98,115, 89,176, 4, + 2,193, 68,150,101, 45, 74, 5, 44, 18,137, 84,106,181,218,244,141,176,237, 69, 9,180,144,161, 58,223, 78,175,120,224,198,234, + 52,182,123,111,178,226,241, 29,249,106, 70, 32,170,102,228,238, 69,176,245,170,130, 16, 53,152,122,178, 89,133,148, 8, 33,182, + 78, 78, 78, 47,137, 68, 34,185, 70,163, 81,148,149,149,157,104,137,210,110,106, 9,224,105, 64, 8,113, 19,137, 68,131, 71,142, + 28,201,151, 72, 36,184,126,253, 58,174, 92,185,194,114, 28,247,139,165,209,195,132, 16, 30,195, 48,193,132,144,208,246,237,219, +151, 50, 12,163,188,127,255,190, 84,169, 84, 58,215,205, 86,110, 88,154, 29,174,129,204,192,249,243,231,247, 88,181,106, 21,243, +224,193, 3,252,244,211, 79,136,137,137,225, 74, 74, 74, 18, 45,201,148,214, 64, 14,145, 72, 36, 47, 57, 59, 59,123, 60,255,252, +243,162,134,158,161,250,132, 82,103,207,158,213,148,150,150, 22,170, 84,170, 19,166,246, 75,147,186, 44,148,245,187,110, 76, 45, +183, 9, 4, 2,248,251,251,155,205,186, 71, 8,177, 11, 14, 14,126, 53, 41, 41, 73,176,114,229, 74,124,250,233,167,135, 40,165, +102, 99, 47, 30, 69, 34,145, 76,180,196,107, 35,145, 72, 84,181,181,181, 22, 43, 7, 62,159, 63, 85,161, 80, 48,150, 4,208, 89, +146, 10,152, 16,194, 3, 48,215,217,217,121,118,219,182,109,125,211,211,211,179,171,170,170, 62, 7,176,177,185,215,200,127, 18, + 66,200,180, 49, 99,198,108, 89,188,120, 49, 6, 13, 26,132,194,194, 66, 31, 75,114, 49, 88, 32,119, 97,239,222,189, 27, 6, 6, +126,244, 36,247, 51, 33,100, 69,240,216,221,139, 85, 94,175, 67,117,105,169,190,224,236,138,137, 79,115,124,248, 43, 99,177, 1, +240, 84,190,236, 17,197,253,227,143, 63,226,252,249,243, 92, 89, 89,153, 69,138,255, 63, 45,239,105, 65, 8,241,150,203,229,251, +218,180,105, 19, 58,124,248,112,105,253,210, 65,101,101, 37,148, 74, 37,126,253,245, 87,117,121,121,249, 79, 10,133, 98, 58,109, + 70, 26, 90, 98,200,147,191, 42, 32, 32,160,247,172, 89,179, 16, 23, 23,135,228,228,100,148,149,149,157, 3, 16, 77, 41, 77,252, + 15,117,201, 50,234, 13, 1,101,161, 45, 88, 13, 31,124, 17, 11, 27,143,234,150, 40,254,134, 16, 66, 4, 48,204,218,245,148,210, +230,165, 76,123, 70, 16, 66,188, 68, 34, 81,152, 78,167,115, 37,132, 84,112, 28,151, 66, 41,181,168, 22,192, 35,114,132, 12,195, +132, 2, 8,212,235,245,183, 0,164, 52,103, 54,247,136, 44,137,157,157,221,203, 85, 85, 85, 78,245,199, 4, 2, 65,153, 78,167, +251,133,182,160,162, 37,159,207,111, 45, 16, 8,122,200,100, 50,198,205,205,141, 15, 0, 69, 69, 69,108, 77, 77,141, 94,167,211, +157,103, 89, 54,219,156, 12,161, 80, 56, 81,167,211, 89, 92,125,211,210,194, 59,132, 16, 79,111,111,239,158,101,101,101,149, 42, +149,234,164,165, 49, 14,207, 2,153, 76, 54, 94,169, 84,202,204,159,217,188, 98, 64,196,224,158, 16,193, 80,161,244, 47,151,164, +134, 16,210,171, 83,167, 78,103,190,253,246, 91,140, 31, 63, 30,119,238,220, 9,165,148, 94,123, 74,178, 23, 11,133,194, 40,173, + 86, 59,179, 97, 32,223, 19,200, 91, 99,215,182,127, 84, 85,230,241,215,159,134,188,191, 11,207,212, 0, 48,126,169, 65,113,111, +135,193, 29,249,198,147, 42,234,167, 45,239,105, 80,119,115,190,230,224,224,240, 10,199,113,221,149, 74,165,135, 92, 46,207,214, +235,245,231,170,170,170,246, 82, 74,127,125, 2,217, 47,195,208, 95, 1,128, 73,148,210,159,159, 86,187,159, 10,223,246, 20,128, +202, 24,104,149,192,219,103, 91,150,227,217,202, 83,131, 16,210, 5, 64, 23, 0, 87,204, 44, 55, 89, 42, 79, 10,192, 25, 0, 5, + 80,218, 18, 99,194,202,255, 6,132,144,120, 15, 15,143, 62,133,133,133,191, 0,120,149,214,197,150, 61, 37,217, 29,155,187,132, + 96, 70, 94,104,195,216,128,255, 5,254, 20, 3,192,138, 21, 43, 86,172,252,247, 67, 12, 69,169,220, 0,148, 60,197,164, 93, 86, +158, 18, 86, 3,192,138, 21, 43, 86,172, 88,249, 31,164, 57,137, 69,172, 88,177, 98,197,138, 21, 43,255, 37, 88, 13, 0, 43, 86, +172, 88,177, 98,229,127, 16,171, 1, 96,197,138, 21, 43, 86,172,252, 15, 98, 58,181,157, 21, 43,205, 97,221, 0, 27, 72,213,142, +224,241, 28,161, 7, 31, 12, 88,112, 92, 57,106,197,229, 88,240,107,139, 18,179, 88,177,210, 82,234, 10, 2, 13,100, 24,230,141, +118,237,218, 13,188,123,247,238, 78,142,227,102,255,201,109, 18, 1, 48,149, 93,136,181, 6,203, 89,121, 86, 60, 22, 4, 40, 20, + 10, 31,232,116, 58,147,105, 33, 27, 34, 18,137,138,212,106,117,147,153,164, 4, 2,193, 3,150,101, 31,147,199,231,243,245, 44, +203, 62,230,129, 48, 39,207,202,147, 83, 55, 48, 90,106,252,153, 30,144, 98, 34,249,112, 65,107, 80,226,196,169,170, 92,121,181, +197,126, 80,215,248,233, 41,103,207, 16, 94, 37,196,178,123,156,212,245, 30, 79, 98, 87, 12, 66,203, 32, 69, 30, 38,199,155,207, +123,250, 55,131, 16,242,162,131,131, 67,108, 77, 77, 77,128,173,173,237,173,170,170,170,101, 44,203,154, 42,164,208,152, 12, 6, + 64, 95,161, 80, 56,133,227,184, 72, 30,143,119, 82,171,213,126, 3,224,116, 75,246,121,215,253,159,151, 1, 24, 9,160, 53,128, + 44, 0,251, 1, 44,107,137,146, 33,132,136,248,124,254,187, 34,145,104, 0,165,212, 31, 0, 37,132,220,209,104, 52,199, 88,150, +253,226,105,110,241,122, 82, 8, 33,207,123,121,121,253, 48,114,228, 72,183, 87, 71,140,128,167,167, 39,102,188,253, 54, 78,157, + 58, 37,253, 51,182, 45, 18, 66,132, 33, 33, 33,191,132,135,135,247,251,238,187,239,184, 71,222, 51, 62,231,243,249, 10,181, 90, +237,250, 36, 70, 0, 33,164,171,141,141,205, 78,177, 88,236, 94, 86, 86,182,152, 82,250,245, 19, 52,221,202,127, 49,143, 25, 0, +132, 16, 90, 93, 93, 13,153,204,124,222,138,178,178, 50,212, 85,190,107,210,162, 37,132, 80,133, 66,129,250, 84,174, 0, 80, 92, + 92, 12, 55, 55, 55, 52,117,188, 5, 69, 39,254,171, 97,120,252, 7, 84,207, 89,100,148, 49, 60,126, 17,199,234, 76, 26, 80, 60, + 30,175,152, 82,234,216,212,251, 13, 7, 36,134, 97,202,117, 58, 93,227,197,104,214, 13,176,129, 72,219, 9,229,183,123, 66, 93, + 29, 8,202,186,164,151,235, 37,219,174,113,158,191,231,235,157,186,123, 49,101, 83, 59,243, 10, 58, 56, 50, 42, 16,126, 9,196, +210, 59,112,240,187, 4, 25,115, 17,111,157,107, 52,155, 31, 33,100, 29, 12,219,134, 0,160, 28,134,210,158,175, 3,136,128, 33, +247,255, 30, 0,221, 1,212,183,191,136, 82,186,192, 84,127, 31,145,159, 13,192,183,238,101, 14,165,180,181,165,159,109, 10,161, + 80, 56, 69, 46,151,127,190,125,251,118,155,174, 93,187,226,226,197,139,152, 52,105, 82,109,117,117,245, 24,150,101,143, 88,208, +166, 14,124, 62,255, 77, 0,111,136, 68, 34,109,255,254,253, 79,143, 29, 59,246,218,247,223,127,223,249,228,201,147,145, 26,141, +134, 7, 96, 39,203,178,219, 41,165, 22,165, 2,174, 75,158,244, 59, 0,109,239,222,189,207, 6, 5, 5, 85,109,221,186,181, 82, +167,211,141,129, 33,121, 76,175,230, 36, 85, 34,132,116,145, 72, 36,251,123,245,234,229, 21, 17, 17, 33,114,119,119, 71,113,113, + 49,110,221,186,133,187,119,239,170,111,220,184, 81,160, 82,169,198,152,203, 51, 32, 18,137,174,235,245,122,159, 6,114, 27,251, + 46,227,115,134, 97,238,171, 84,170,102,149,203, 38,132,240,125,125,125,243,143, 29, 61,234, 42, 18,137,144,152,152,136, 31,126, +252, 17, 63,253,244,211, 38,150,101,159,185, 7,128, 16, 34,236,212,169,211, 47, 39, 78,156,232,179,101,203, 22, 94,191,126,253, +224,236,236, 12, 59, 59, 59,216,217,217, 25,211,123, 51, 12, 3,161, 80,200,177, 44, 43,107, 42,211,168, 5,223,213,118,248,176, + 97,215, 59,118,236, 40, 57,122,244, 40, 82,174, 93, 83, 1,112,108,169, 60, 43,255,221, 52,106, 0, 80, 74,113,240,224,193, 70, + 75,226, 62,122,204,207,207,207,172, 1, 64, 41,197,177, 99,199, 96,103,103, 7,123,123,123,216,217,217,193,203,203, 11, 38,142, +255, 41, 6,128, 80, 40,252, 77,167,211,173,160,148,254,165,234, 63, 19, 66,232,142, 31, 78, 66,192, 99,160, 84,105, 80,171, 82, + 63,244, 87,173,209, 66,195,234,161,213,177,248,191,207, 22, 64,175,215,155,252,253, 8, 33,116,239,222,189,168,207,235,222, 48, + 55,121,125, 37,192,250,122, 0,243,231,207,111, 90,222,215,189,195,244,249,105,175,229,148,212,118,254, 87, 10,231,117,170, 80, +228,233, 25,214,207, 97,200,144, 33,136,136,136, 64, 82, 82, 18, 14, 31, 62,140,130,171,191, 85,244,241,208, 20, 78, 15,229,229, +183,115,147,253, 14,175,224,255,195,244,248,244, 38,218,246,115, 65, 65,193, 11,106,181, 90,220,174, 93, 59,222,160, 65,131,120, +195,134, 13, 67,143, 30, 61,112,254,252,121,196,197,197,225,232,209,163,220,221,187,119, 57,177, 88,172,246,244,244, 60, 67, 41, + 29,218,156,223,178, 65, 81, 32, 0,104,223,146,196, 81,117,137,158, 34,249,124,254, 96,137, 68,242,118,114,114,178,164,109,219, +182,198,247, 15, 30, 60,136, 25, 51,102, 92, 46, 45, 45,237,106, 74,142, 64, 32,184,200, 48,140, 95,151, 46, 93, 18,103,204,152, +113, 86,165, 82,241,227,227,227,219,150,151,151,203, 29, 29, 29, 21,145,145,145,153, 66,161,144,219,178,101, 75,175,228,228,228, + 30,122,189,254,150, 78,167,235, 97, 65,251, 86, 2,120,177,170,170,170, 21, 33, 68, 24, 31, 31,127, 50, 63, 63, 63,227,163,143, + 62, 58, 94, 82, 82,178, 28,134,226, 71,203, 45,236,107, 23, 59, 59,187, 95, 87,172, 88,225, 52,114,228, 72, 56, 58, 58, 66,169, + 84, 34, 41, 41, 9,149,149,149,184,126,253, 58,110,223,190,141,147, 39, 79,150, 41, 20,138, 1,166,140, 0, 66, 8, 45, 44, 44, +132,147,147, 19,180, 90, 45,212,106, 53, 52, 26, 13,180, 90,173,241,161,211,233,192,178, 44, 46, 93,186,132,153, 51,103, 54,123, + 60, 32,132,116,154, 50,101, 74,234,178,152, 24,244, 31, 48, 64,127,227,198,141,181, 0,118, 90,146,254,152, 16,194, 15, 11, 11, +139,235,220,185,243,160, 29, 59,118, 52,122,142, 88, 44, 46, 82,169, 84, 22,123, 41, 67, 66, 66,142,158, 56,113,226, 69, 55, 55, + 55,254,242,229,203, 33,149, 74,225,226,226, 2,123,123,123,200,100, 50, 8, 4, 2, 80, 74,209,163, 71, 15,136,197,226,102, 27, + 0,132, 16, 49,128, 40, 0,255, 14, 14, 14, 62, 49,228,229,151, 91,157, 57,123,150, 36, 38, 37, 1,192, 3, 0,173,158,213,178, + 2, 33,196, 1,192, 98, 24,234,201,124, 73, 41, 45,104,240,158, 55, 12,165,117,171, 0,172,178, 36, 11,170,155,155,219, 21, 62, +159,239,165,211,233,114,139,139,139, 77,222, 75, 86,154, 79,147,110,224, 71,115,114, 55,149,179,219, 82, 28, 29, 29, 97,111,111, +111, 84,244,230,142,255, 25,232,116,186,190, 66,161,176, 27, 33,100,216, 95,205, 8,224, 49, 4,133,197, 21, 8, 13,242,195,190, +195,103,112, 57,205, 48, 17,228,243,249, 16, 10,235,140, 51,129,208,130, 74,187, 6,234,115,184, 7, 5, 5,225,244,233,211, 72, + 77, 77,133, 80, 40,132, 72, 36,130, 72, 36, 50, 62, 55, 41,143,227,219, 18,173, 58, 32,226, 59, 77,175,121, 31,174,148,252, 58, +125, 58, 28, 28, 28,140,111, 7, 5, 5, 97,234,212,169,168,168,168,112, 88,185,114,165, 67,143,205,235,218, 20,205,102,106,192, +241, 92, 0, 52,106, 0, 0,128,135,135,135, 28, 0, 94,122,233, 37, 28, 62,124,248, 33,121,211,167, 79,199,192,129, 3,121,109, +218,180,225, 1, 48, 83,174,176,113, 40,165, 90,142,227,120, 48,100,142, 60, 71, 8, 73, 1, 48,207, 66, 5,193, 8,133,194,247, +101, 50,217, 28,119,119,119,201,168, 81,163,196, 19, 38, 76, 16, 52, 84,254, 0, 16, 18, 18, 2,149, 74,213,222,156, 60,150,101, +187,142, 27, 55,110,189, 70,163,161,222,222,222, 53, 7, 14, 28, 8, 16, 8, 4,220,224,193,131, 83, 47, 92,184,224,147,146,146, +226, 54,114,228,200, 12,169, 84,122,199,207,207, 47, 43, 61, 61,253,159, 22,118,115,100, 68, 68,196, 47,132,144,137, 42,149,138, +205,200,200, 40,205,203,203, 43,149, 72, 36, 20,192, 38, 0, 31, 2, 48,107, 0, 16, 66, 4, 98,177,120,223,178,101,203,156,198, +141, 27, 7, 71, 71, 71,148,150,150,226,198,141, 27, 80, 40, 20, 80, 42,149,112,113,113, 65, 77, 77, 13,250,246,237,235,116,236, +216,177,189,117, 25,218,154,244, 46,184,185,185, 97,249,242,229,198,122, 0, 2,129, 0,197,197,197,216,185,115, 39, 42, 43, 43, +209,191,127,127,140, 25, 51, 6, 46, 46, 46, 22,118,245, 49,114,111,223,190,205, 50, 12,195,239,215,175, 31,115,227,198,141,116, + 75,149,127, 72, 72, 72,220,209,163, 71,251,127,253,245,215, 72, 76, 76, 52, 78,122, 26, 78,124, 90,181,106,101,241, 18, 41, 0, +116,233,210,101,192,150, 45, 91, 8,165, 20,215,175, 95,199,187,239,190, 11,169, 84, 10, 74, 41,148, 74, 37, 56,142,179,164,208, +152, 41,166, 0, 88, 1, 96, 25, 1,216, 31, 15, 29, 34, 25,183,111,115, 48, 84,221, 28,251,140, 99, 10, 22, 77,155, 54,109,129, +163,163, 35, 86,175, 94, 61,129, 16,210,135, 82,154, 77, 8,105, 13,224,244,226,197,139,125, 75, 74, 74,176,117,235, 86, 30, 0, +179,245,158,165, 82,169,123, 86, 86,150,155,135,135,135, 35, 33,228, 23, 0, 5,141, 60, 10, 1, 60,112,113,113,249, 93, 32, 16, +180, 98, 89, 54,191,168,168,168,203,127,172,135,255, 69, 88,108, 0, 52,245,176,132,122,139,191, 94,201,243,120, 60,147,199, 91, +130,131,131,195,201,202,202,202, 53,148, 82,179, 53,221, 77,177,115,231, 78,155,201,147, 39,199,253,213,140,128,106,165, 10,161, + 65,126,232, 23, 17,138,223, 18, 13,217, 42, 5, 2, 62,132,130,250, 1, 74, 0,129,185,242,189, 13, 80,171,213, 8, 10, 10, 66, + 72, 72, 8, 50, 50, 50,144,145,145,241,152,242, 55, 91, 14,152,161,132, 16, 74, 28, 37,208, 68, 70, 70, 74, 82, 83, 83, 81, 81, + 81,129,192,192, 64, 4, 4, 4,224,230,205,155, 56,113,226, 4, 10, 10, 10, 32, 18,137,224, 44,129, 26,160,124, 64,111,106,247, + 73,149, 84, 42, 69,100,100, 36, 88,150, 69, 92, 92, 28, 66, 67, 67,225,227,227,131,156,156, 28,252,242,203, 47,200,205,205, 69, +120,120, 56,210,211,211, 1,195,108,162, 57,228, 48, 12, 99, 92, 2, 0,208, 30,192, 59, 0, 78, 19, 66,186, 82, 74,239,155,249, +252,224, 54,109,218,188,191,123,247,110,155, 46, 93, 30, 31, 99, 50, 51, 51,145,153,153,137, 31,126,248, 1, 34,145, 40,205,146, + 6,109,216,176,225,146, 90,173,102, 6, 15, 30, 60,201,221,221,253,222,180,105,211,210,198,142, 29, 91,186,103,207,158,170,216, +216,216,160,253,251,247,143,232,219,183,239, 78, 71, 71, 71, 94, 51, 12, 0, 95, 63, 63,191,242,163, 71,143, 30,191,123,247,110, +121,102,102,102,118, 98, 98, 98,230,253,251,247, 21, 0,202,234,250,109, 22,129, 64, 48,229, 31,255,248,135,247, 75, 47,189, 4, +123,123,123,228,230,230,226,250,245,235,143, 21,184, 18, 10,133,144,203,229, 8, 8, 8,240, 72, 75, 75,155, 4, 96, 91, 83, 50, + 53, 26, 13, 88,150,197,238,221,187, 17, 17, 17,129, 46, 93,186,224,212,169, 83, 40, 40, 48, 76, 22,227,226,226, 48,102,204, 24, +243,215, 95, 19, 80, 74, 43, 9, 33,159,159, 60,121,114,126,212,188,121, 72, 77, 77,221, 74, 8, 41,162,148, 30, 53,245,185,144, +144,144, 31, 78,156, 56,241,146,171,171, 43, 15,192, 67,138,191,225, 36,168,185,236,218,181,139, 75, 72, 72,224,159, 63,127, 30, +239,190,251, 46, 36, 18, 67, 41,132, 57,115,230, 32, 49, 49, 17,193,193,193, 88,189,122,117, 75,186, 90,207,110,134, 97,150,233, +245,122,199,235,105,105, 60, 24, 20,127, 1,128,129,148,210,204, 39, 17,220, 2,228, 46, 46, 46, 88,177, 98, 5,220,221,221,125, +231,205,155,119,154, 16, 50, 25,192,142,245,235,215,251,206,157, 59, 23,239,189,247, 30, 0, 88,180,252,164, 84, 42,203,189,188, +188,236,125,124,124,164,201,201,201,131, 42, 43, 43, 81, 86, 86,134,226,226, 98, 20, 20, 20, 32, 39, 39, 7,153,153,153,184,117, +235,150,190,170,170, 10,249,249,249, 76,155, 54,109,254, 50, 5,145,254,234,252,199, 13, 0, 62,159,175,247,241,241, 97,234, 11, +226, 0,134, 58,241,124, 62, 31, 62, 62, 62,120,244,184, 72, 36,106, 81, 17,143,192,192,192,126, 66,161,176,251,147, 42,238,113, +227,198, 33, 55, 55,215,230,195, 15, 63,108,177, 17, 32, 22,139,127,213,104, 52,253,205,157, 39,151,203,143, 87, 85, 85, 13,176, + 68,102,181, 82,133,125,135,207,224,183,196, 20,148,150, 43, 32, 20, 24, 20,190,113,246, 47, 20, 64, 40,176,124,192,212,104, 52, + 72, 72, 72, 64, 70, 70, 6,170,170,170, 32, 22,139, 27,245, 0, 88,130,136, 15, 14, 0, 36, 18, 9, 36, 18, 9,170,170,170, 16, + 19, 19,131,220,220, 92, 72, 36, 18,136,197, 98, 0,128,144, 15, 75,254,183,211, 84, 42,213,235, 81, 81, 81,198, 54, 20, 20, 20, + 96,215,174, 93,200,206,206,134, 68, 34, 65,255,254,253,193,231,243,113,245,234, 85, 0,152,102,113,167, 1, 52,177,230,255,121, + 93,126,251,207, 0,140, 54,245,121, 7, 7,135,197, 49, 49, 49,143, 41,127,189, 94,143,242,242,114,100,101,101, 33, 53, 53, 21, +199,142, 29,211, 86, 84, 84,124, 99,105,187,196, 98,177, 62, 60, 60, 60,125,237,218,181, 73,171, 87,175,238,248,241,199, 31,119, + 99, 24, 38,211,223,223, 63,161,162,162, 66,203, 48,140, 94,167,211, 53,199, 66,206,222,183,111, 95, 77, 72, 72, 72,250,189,123, +247, 74,142, 31, 63,158,149,151,151, 87, 12,131,193,212, 14,192,109, 75,132, 8, 4,130,151,187,117,235, 38, 82,171,213, 80, 40, + 20,200,200,200,120, 76,249,215,151,185,166,148,194,219,219,219,230,206,157, 59,131, 96,194, 0, 80,171,213, 80,169, 84,184,115, +231, 14,156,157,157, 17, 17, 17, 1,127,127,127, 92,184,112, 1, 0,208,179,103, 79, 72,165,210,102, 41, 91, 66,200, 63,228,114, +121,172, 70,163,185,165,209,104,166, 3,136,153,243,238,187, 3,247,237,221, 27,180,117,203, 22,254,192, 65,131,246, 16, 66,130, + 40,165,133, 77,201, 8, 15, 15, 31,250,213, 87, 95, 1, 0,174, 95,191,142, 17, 35, 70, 60,230,253,108,137, 81, 66, 8,129, 76, + 38,131,141,141, 13,132, 66, 33, 24,134,129, 86,171,197,165, 75,151, 0, 0,105,105,105, 80, 42,149, 22,123,239, 30,197,209,201, + 37,230,243, 47,191,178, 89, 48,247, 93, 20, 21,230, 3,134, 24,143,193,127,130,242, 7,128, 79, 62,253,244,211, 1, 46, 46, 46, +109,231,206,157, 11, 0,190, 81, 81, 81,241,177,177,177,152, 59,119, 46, 54,108,216,128,213,171, 87,231, 0,248,210, 18, 97,197, +197,197,157, 8, 33,246, 44,203,102,156, 61,123,214,213,221,221, 29,114,185, 28,238,238,238,136,136,136,128, 88, 44,134, 72, 36, +130, 64, 32, 96,186,116,233, 2, 79, 79,207, 90,142,227, 44,170,192,105,229, 25, 24, 0, 44,203, 50,213,213,213,104, 88, 10,179, +164,164, 4,238,238,238,104,226,120,139,114, 19, 72, 36, 18, 12, 30, 60,216, 70, 38,147,253, 68, 8, 25, 76, 41, 61,211, 18, 57, + 0,208,189,123,119,108,218,180,201,102,246,236,217, 45, 50, 2, 52, 26,205,114,161, 80,216,227,155,111,190,177,153, 48, 97,194, + 99,239, 95,186,116, 9,145,145,145, 74,133, 66, 97,209, 26, 44, 96, 48, 0,234,221,254,245, 10,159,212,230, 67,172,173, 65,181, + 82, 15, 81,155,231, 32, 18, 89, 84,112, 12, 0,160,213,106,141,107,183,245, 10,191,184,184, 24, 58,157, 14, 90,173, 22, 97, 97, + 97,144,203,229, 22,203,123,148,150,186, 52, 41,165, 42, 66,200, 67,193,161, 12,195, 64,163,249, 35,192,156,207,231, 27,141,138, +167, 24,209,189, 7,192,187,230, 78,210,104, 52, 29,131,131,131,141,175, 43, 42, 42,144,151,151, 7,137, 68,130,182,109,219,194, +213,213, 21,158,158,158, 80, 40, 20,122, 0, 55, 44,249,226,133, 11, 23, 70,196,196,196, 92,172,127, 29, 29, 29,125,243,210,165, + 75, 2,185, 92,110, 92, 38,225, 56,142,119,237,218,181,110, 48,189,133,172, 33,251, 89,150, 29,177,106,213,170,247,213,106, 53, +167, 82,169,106, 0, 40, 0, 84, 0,152, 7, 96,175, 37, 66,244,122,125,103, 15, 15, 15, 84, 87, 87, 35, 49, 49,177, 81,229, 95, + 93, 93, 13,149,202,240,111,176,183,183, 7,165, 52,212,148, 76,141, 70, 3, 15, 15, 15, 44, 88,176, 0, 94, 94, 94, 16, 8, 4, +120,241,197, 23, 17, 26, 26, 10,173, 86,139,192,192,192,102,121, 24, 9, 33, 94,126,126,126, 71, 18, 78,159,118,142, 93,191,190, +199,250,245,235,191,165,148, 38, 17, 66, 34,223,154, 50, 37,249,196,241,227,222,235, 99, 99, 29,134, 13, 31,190,168,174,239,141, +178, 99,199, 14,156, 63,127, 30, 66,161, 16, 35, 70,140,128, 80, 40, 68, 96, 96, 32,238,223,191,255,144, 55,160, 37,200,229,114, +216,216,216, 24,149,191, 86,171, 53,198,181,132,132,132,180, 88,249,187,184,120,172,217,190,115,215,140, 82, 21, 35,178,117,112, + 41, 43,126, 80,160,166,148,122,193,176,243, 99,101,139,132, 62, 1,148,210, 66, 66, 72,228,188,121,243, 18, 0,180,153, 59,119, + 46,250,244,233,131,208,208, 80,108,216,176, 1,243,230,205,203, 1,208,167, 97,108,128, 5, 50, 43, 9, 33, 51,182,110,221,250, +195,188,121,243,160,211,233,160, 84, 42,141,202, 95, 44, 22, 35, 46, 46, 14,215,175, 95, 79, 0, 48,224,175,180, 27,229,175, 78, +147,202,246,105, 46, 1,200,100, 50, 28, 63,126, 28, 23, 46, 92, 64, 70, 70, 6, 56,142, 51,121,188, 37,136,197, 98, 56, 56, 56, + 96,194,132, 9,178,240,240,240,237, 45, 22, 4,192,214,214, 22,189,122,245, 66,116,116,180,141,173,173,237,214,230,126,158, 82, +122, 78,171,213, 14,156, 58,117,170,114,229,202,149, 56,123,246, 44, 82, 82, 82,140,174,225,200,200, 72,165, 82,169, 28, 72, 41, + 61,103,169,204,234,154, 90, 16, 66, 32, 18, 9, 33,228, 1,114, 77, 6,162,254,217, 15, 31, 44, 27,137, 37, 75, 7, 67, 95,116, + 30,132,179, 92, 23,234,116, 58,136,197, 98,136,197, 98, 48, 12,131,156,156, 28, 76,152, 48, 1, 43, 87,174,196,135, 31,126,136, +212,212, 84,212,214,214, 54,183,235,127,103,236, 96,112,157,154,132, 82,250,245,230,205,155,181,128, 65,249, 95,184,112, 1,105, +105,105, 40, 42, 42, 2, 33, 4, 33, 33, 33, 24, 52,104, 16, 70,143, 30, 45,144, 72, 36,147, 45,249,226,105,211,166,165, 46, 92, +184,176, 87, 70, 70, 70,235, 71,223,227, 56, 14,213,213,213,190,151, 46, 93,234,213,182,109,219,235, 48, 84,224,179,132, 24, 0, +252,138,138,138,101,117, 1,107, 90, 0,126, 0,254, 15,128, 45,128,181,150, 8, 33,132,232,139,138,138,154, 84,252, 13,149, 63, +128,122, 69,102,242, 70,214,106,181, 16, 8, 4,104,219,182, 45,108,109,109,141, 99,137,143,143,143, 81,249,215, 43, 92, 11,218, + 39,178,177,177, 57,180,127,223, 62,103,161, 80,136, 35, 71,142, 84, 1,184, 78, 8,145, 0,112,204,203,203,251,233,192,129, 3, +232,220,185, 51, 0, 4,154,147,215, 80,209, 7, 6, 6, 26,143, 61,137, 7, 0,128,209, 3,240,218,107,175,225,248,241,227,208, +106,181, 88,180,104, 17, 14, 28, 56,128,247,222,123,175, 69, 6,179,187,187,231, 39, 59,118,237,156,195, 9,229,162,207, 87,199, +148, 22,229,223,143,166,148, 6, 1,152, 5, 32,182, 69, 13,125, 10, 80, 74,115, 1,188, 25, 21, 21,133,148,148, 20,132,134,134, + 34, 37, 37, 5, 81, 81, 81, 0, 48,153, 82,154,221, 2,153, 63,254,246,219,111, 63,220,184,113, 3, 2,129, 0,124, 62,223, 24, + 67,114,250,244,105, 68, 71, 71,167, 1, 24,110, 85,254,205,227,153, 24, 0,128, 33,216,207,201,201,201,248, 48,119,188,185, 72, + 36, 18,216,219,219,227,212,169, 83,181,201,201,201,150,174,147, 54,138,173,173, 45,110,220,184,129,117,235,214,213, 84, 87, 87, + 79,106,137, 12, 74,233, 57,141, 70, 51,112,217,178,101,202, 27, 55,110, 64, 42,149, 34, 57, 57, 25,111,188,241, 70,179,149, 63, + 0,212,170,213, 16,242,121,112, 17, 41,208,193,177, 28,139, 63, 30, 11,149, 40, 5,233, 89,231,144, 93,124, 17,195, 38,116,192, +253,235,113, 22,203,227, 56, 14, 2,129,192, 24,132,180,106,213, 42,120,121,121,161,188,188, 28,181,181,181,152, 53,107, 22,226, +227,227,155,221,239,191, 49,111, 3, 48, 91, 86, 89,165, 82,125,177, 99,199, 14, 85,191,126,253,170, 63,255,252,115, 36, 37, 37, + 33, 59, 59, 27, 90,173,214,120,142, 64, 32,192, 75, 47,189,196, 99, 24,230,101, 75,190,216,223,223, 95,185,121,243,230,211,174, +174,174,165,111,191,253,118,223,175,191,254,186, 61, 0,100,101,101,181,187,122,245,106, 31,145, 72, 84,214,189,123,247,211, 50, +153,204, 98,139,172, 46,240,107,212,200,145, 35, 59,127,252,241,199, 63,204,156, 57, 51, 29,192, 41, 30,143, 23, 14, 96,188,165, +129, 97,132,144,171, 25, 25, 25, 40, 47, 47, 55,171,252, 1,160,178,178, 18, 12,195, 92, 53, 37, 83,171,213, 34, 47, 47, 15, 7, + 14, 28, 64, 82, 82, 18, 8, 33,143,237, 50,202,202,202,178,180,171,171,255,245,175,127, 61, 23, 22, 22,134,205, 95,126, 9, 91, + 91, 91,155,176,176,176, 7,125,250,244,169,125,253,245,215,211,151, 47, 91, 54,115,234,212,169,200,206,206, 6, 0,179, 46,113, +129, 64,128,171, 87,175,162, 99,199,142,198, 99,238,238,238,112,114,114, 50, 26, 43, 45,193,214,214, 22, 12,195,224,238,221,187, +184,123,247,238, 67, 59,111,234, 61, 2,205,193,203,171,213, 71,219,119,238, 92, 96,227,232, 46, 90, 29,179,180, 44, 39,243,246, + 7,138,202,178,111, 40,165, 85,148,210,205,127,166, 34,172, 11,248,219,185, 97,195, 6,132,134,134,226,234,213,171, 8, 13, 13, + 69,108,108, 44, 0,236,168,123,191,217, 80, 74,103,125,241,197, 23,213,245, 99, 87,253, 50,224,236,217,179,115, 89,150, 29, 64, + 41,109,110, 60,208,255, 60,102, 13,128,166,162,255, 5, 2, 1, 24,198, 50,111,125,126,126,190, 81,193, 59, 58, 58, 26,173,232, +166,142,183, 4,177, 88,140, 19, 39, 78,212,110,221,186,245, 85, 74,233,201, 22, 11,130, 97,253,111,226,196,137,202,154,154,154, + 65,205, 85,212, 13,161,148,158, 83,171,213, 3,163,162,162,148, 59,118,236,192,228,201,147, 91,164,252, 1,192, 91, 90,142, 30, +237,244,120,115, 92, 4,198, 77,235,132,236,162, 68,168,213, 26,104,181, 44,180, 26, 22, 85,213,165,232, 55,196,211, 98,121, 90, +173, 22, 54, 54, 54, 24, 61,122, 52, 22, 45, 90, 4,150,101,193,113, 28,244,122,189,113, 11,224,180,105,230,150,215,169, 70, 79, +120, 10,127, 7,166,122,219,182,109, 80, 42, 27, 79,246,167,213,106,113,230,204, 25,248, 59, 48,213, 0,209,130, 82,115,174,158, +220,147, 39, 79,130, 82,138,178,178, 50,124,242,201, 39,248,233,167,159,112,246,236, 89,163, 87,226,230,205,155, 0,144,107,105, +127, 9, 33,217,132, 16, 90,247,200,174, 59, 70, 8, 33,255, 32,132,252, 27, 64, 56, 44,112,153, 82, 74,243, 85, 42,149, 91,124, +124,252,204, 13, 27, 54,220, 88,189,122,181, 46, 62, 62,158,147,201,100, 96, 89, 22,153,153,153,184,120,241, 34, 10, 11, 11,161, + 86,171,155, 21, 45,238,224,224, 80,243,213, 87, 95,157,114,112,112, 80,103,103,103,135,136, 68, 34, 85, 88, 88,216,105,161, 80, + 88,211, 28, 57, 13, 24,236,231,231, 39, 91,178,100, 9,162,163,163,177,113,227, 70, 56, 58, 58, 58, 0, 24,108,169, 0,141, 70, +243,243,157, 59,119,106,175, 93,187,214,164,242,231,243,249,112,117, 53,164,138,200,201,201,169, 81,171,213, 38,115, 31,148,151, +151, 99,211,166, 77, 56,117,234, 20,190,249,230, 27,252,246,219,111, 15,141, 51, 43, 86,172,192,244,233,211,113,244,168,201,152, + 61, 0, 64, 80, 80,208,232,215, 95,127, 29, 12,143,135, 15, 63,248, 0, 73,137,137,252,164,196, 68,155, 35,135, 15,227,235,175, +190,194,140, 25, 51, 16, 23, 23,135, 81,163, 71,223,133, 5,187, 30,158,196,205,111, 14, 30,143, 7,127,127,127,180,110,221,218, +168,244,163,162,162,176, 96,193,130,135,150,184,204,225,229,229,179,224,139, 77, 27,163, 61,125,218,138,150, 45, 93, 84,118, 59, + 61,237,227,202,242,146,191, 68,178, 31, 66,136, 39, 33,228,244,166, 77,155,124,231,204,153,131,216,216, 88,132,135,135, 99,195, +134, 13,152, 59,119, 46,214,175, 95,239, 11, 67,192,173,119,115,101, 83, 74, 11,243,242,242,162,182,111,223, 14, 62,159,143,204, +204, 76,252,243,159,255,172, 84,171,213, 47, 53,103, 73,193,202, 31, 52, 26, 3,240,224,193, 3,179, 51,127, 75,149,191, 80, 40, +212,123,123,123, 55,150,241, 15,222,222,143, 95, 3, 98,177,184, 69, 65,128, 23, 46, 92, 72,188,123,247,238,167,148,210, 95, 91, +242,249,122, 46, 93,186,132, 9, 19, 38,180, 88, 81, 63, 10,165,244, 28, 33,100,224,166, 77,155,118,214,214,214, 78,106,169,204, + 17,175, 7,161,168,252, 14, 20, 53,105, 40, 42,211, 25, 21,191, 86,203, 25,159,235,137,229, 75, 40,115,230,204,129, 74,165,130, + 74,165,130, 70,163,121, 72,241,215, 63, 55,107,144,233,153, 66, 70, 98,127, 97,207, 80,206,238,139, 43, 59, 42,222,153,176, 63, +160,207,176,215,164, 99,199,142, 5, 96,136, 3,184,124,249, 50,138,238, 94,171,157, 29,194,166,207, 30, 42, 44,128,141,219,113, + 24,246, 38,155,226,149, 37, 75,150,172,223,190,125,251, 11,195,134, 13,195,204,153, 51,241,252,243,207, 35, 46, 46, 14, 91,182, +108,193,173, 91,183, 80, 82, 82,114, 6, 38,214,115, 27,193,183,193,254,127, 95, 66,200, 97, 0,161, 0, 42, 1, 28,128, 97, 86, +108,209, 52,172,110,118,245, 29,128,239, 8, 33,222,231,207,159,191,145,152,152, 40,103, 89, 22,217,217,217,200,201,201,193,169, + 83,167,192, 48,140,217, 93, 0,124, 62,255, 90, 96, 96,224, 71, 51,102,204,216, 87,127,108,236,216,177,185, 7, 14, 28, 72,149, +203,229,249,245,199,210,211,211, 3,210,211,211, 71,215,109, 89,180,148,223,211,210,210,132, 43, 86,172, 64, 89, 89, 25, 54,110, +220, 8, 0, 98, 24, 18, 4, 89, 4,199,113,187, 50, 51, 51, 23,221,186,117,171,131, 74,165,130, 72, 36,130, 82,169, 52, 42,127, +145, 72, 4, 79, 79, 79,104,181, 90,148,149,149, 33, 51, 51, 51,151,227,184, 61,166,100, 50, 12,243, 80,178, 31,149, 74,101, 28, + 87,106,106,106,144,144,144, 0, 0,112,118,118, 54,219,190, 91,183,110, 29,143,139,139,155, 60,108,216, 48,172, 89,179, 6,231, + 19, 19, 65, 8, 65,113,113,177, 54, 63, 63,191,160,160,160, 32,139, 82,250, 27,128,207, 44,217, 91, 47, 16, 8,208,179,103, 79, + 20, 22, 22,194,195,195, 3,128, 33,104, 81, 32, 16, 52,154,180,168, 57, 48, 12,131,207, 63,255,252,161,124, 7,245, 65,208, 90, +173,214,162, 56, 0, 66, 72, 80,239, 62,145, 11,130, 58,119,145, 44,152, 59,167,236,122, 74,202, 39,229,165,197,155,158,168, 97, + 79,151,153, 75,150, 44,241,157, 57,115, 38,214,174, 93,139, 69,139, 22,221, 5, 48,113,222,188,121,123, 0,248,205,157, 59, 23, + 37, 37, 37,190,159,126,250,233,251, 0,102,154, 19, 70, 8, 25, 6,192, 6,134,229,185, 56, 74,233, 54,103,103,231,216,223,127, +255,221,182,170,170, 74,175, 80, 40, 6, 82, 74, 51,154, 56,215, 90,235,222, 12,143, 25, 0, 12,195, 24, 47,124, 75, 48,103, 8, +104,181, 90,134, 30,142,198, 79,108,132,113,224,200,207,207,199, 71, 31,125,132, 38,142,183, 40, 8,240,206,157, 59,102,147,163, + 88, 66, 75,214,231,205, 81, 39,171,173,217, 19, 77,144, 95,154, 10,101,173,178, 78,233,179,198,191,154, 58, 35, 64, 83,119,204, + 82,180, 90,173, 49,225,207,163,138,191,225,107,147, 8,170, 10,224,228,127,158, 47, 44, 40,141,234,254,160,199,156, 46,154,252, + 47,174,124,227, 53,117,252,190, 64,103, 31,127,113,193,157,107,234,249, 97,220,205, 89,111,242, 11,120, 2,155, 28,216,186,159, +135,189,251,117,204, 56,109,210, 21, 75, 41, 77, 6,208,155, 16,210, 47, 54, 54,118, 93,215,174, 93, 67,235,131, 2,207,156, 57, +147, 2, 96, 65,221,160,222, 44, 40,165, 90,189, 94,207,192,112,221,127, 9,224, 22,165,212, 98, 95,115, 19, 50,243, 8, 33, 3, +223,123,239,189,223, 70,142, 28, 41,145, 72, 36,184,126,253, 58,174, 92,185, 82,203,113, 92,148,185,207,179, 44,219,165,162,162, + 98,242,154, 53,107,150,219,217,217, 85,117,239,222,253,254,200,145, 35,141,138,191,160,160,192, 43, 63, 63,255, 69,157, 78, 39, +167,148, 46,129,193,240,176,148,136,142, 29, 59,106,151, 44, 89, 34,124,240,224, 1, 2, 2, 2, 16, 19, 19,163, 46, 41, 41,137, + 0,144,106, 97,255, 56, 66,200,168,132,132,132, 4, 30,143,231,228,224,224,240,144,162,178,181,181,133, 90,173,198,237,219,183, +145,144,144, 80,166, 86,171, 71, 83, 51, 30, 30, 62,159,143,247,223,127, 31,241,241,241,240,240,240,192, 43,175,188, 98,244, 54, +186,184,184,160, 87,175, 94,240,241,241,193,128, 1, 3,176,112,225, 66,147,237,211,235,245,179,222,124,243,205,110, 73, 73, 73, +129,111,190,245, 22, 54,109,222, 92, 84, 80, 80,208, 5, 64, 65, 75, 20, 64, 67, 79,132, 66,161,128, 92, 46,127, 42,202, 31, 48, +120, 0, 56,142,123,232,177,116,233, 82,163, 65, 96,238, 59, 8, 33,164,181,159,223,190,101,203, 63,113,155, 54,105, 66,209,157, +204, 59,171, 74, 74, 30,108,120,226,134, 61,101,242,242,242,176,104,209, 34,172, 93,187,246, 46,128,200,186,123, 36,114,222,188, +121, 9, 15, 30, 60,104, 93, 94, 94, 14, 88,190,125,215,134, 82,250, 61, 33,100, 28,128,113,132, 16,120,120,120,224,246,237,219, +240,245,245,173, 5,224, 71, 8,241,171, 63,185,238,220,177, 48,120,183,173,219, 1,205,208,120, 38,192,195,209, 88,146,200, 3, + 33, 4, 12,195, 24, 31, 13, 95,215, 63,143,142,142, 54,155, 9,112,227,198,141,200,202,202,122,104,157,239,131, 15, 62, 64, 83, +199,255,172, 76,128,118,118,118,191, 42, 20,138,229, 79, 83,249, 63, 13,120,124,193, 3, 61,247,120, 61,133,198,224, 11, 68, 69, + 58,173,233, 90, 10,130, 38,234, 51, 52,134,249,218, 12,132, 96, 91, 63, 87,104,225,131,234,252,246, 80, 60,120,158,213,105,124, +191, 79,103, 93,198,119,224,151,240, 4,162, 28,200,221, 19, 97,235,117, 7, 66,220,199,212,223,138, 1,203, 7,102, 66, 72,107, + 39, 39,167,131, 34,145,200, 79,163,209,100,150,149,149,141,106, 73, 16,209,127, 34, 5,240, 35,242, 95, 20,137, 68,239,235,116, +186, 8, 66, 72, 26,199,113,171, 40,165, 22,215, 2, 32,132,136, 25,134,153, 77, 8,121,175,125,251,246,201, 12,195,228,221,191, +127,223, 75,169, 84,134, 81, 74, 87, 1,216,212,220,117, 93, 66,136,155,157,157,221,175, 85, 85, 85, 33, 48,236, 30,160, 2,129, + 32, 85,167,211, 13,160,148, 22, 53, 83, 86,128, 88, 44,254,161, 93,187,118,190,173, 90,181,178,169, 79,248, 84, 81, 81,129,220, +220, 92,229,221,187,119,115,212,106,245,171,245,179, 49, 19,114,232,222,189,123,141, 1, 92,166,150, 24, 5, 2, 1,252,253,253, +205,142, 7,132,144,246,193,193,193, 87,146,146,146,108, 87,174, 92,137, 79, 63,253,180, 59,165,244, 66,115,250, 87,223,182,130, +130,130,199, 18,255, 60,170,152, 25,134,105,214, 24,197,231,243,117,165,165,165,124, 75,182,213,202,229,114,147,153, 0,125,125, +125, 47,240,249,124,233,189,123,247,198, 81, 74, 45,218,101,242, 44, 33,132,200, 0,141,246,174,216, 0, 0, 32, 0, 73, 68, 65, + 84, 44,132, 33, 85,247, 10, 74,233,131, 6,239,121,194,144,115, 67, 80,247,158,217, 76,128, 13,102,245, 58, 0,135, 40,165,172, +171,171,235,165, 71, 19,254,212, 5,125, 14,174,147,109,245, 0, 88, 72, 99,197,128, 56,157, 78,103,241, 44, 92, 40, 20,234,235, +114,149, 55, 74, 83,202,166,169, 98, 64, 2,129,160, 72,171,213, 90,139, 1,253,237,104, 96, 8, 40, 11, 91,131,213, 72,193, 23, +213,194,198, 35,187, 37,138,255, 97,201,196, 22,134, 89, 59, 75, 41,109,180,134,192,127, 11,132, 16, 59,134, 97,222, 7, 48, 77, +175,215,255, 11, 22,166, 76, 53, 35,243, 99, 0, 31, 1,136,161,148,126,252, 4,114,120, 60, 30,239, 13,145, 72,244, 50,165, 52, +172, 46,158,226,170, 90,173,254,133,227,184,239,204,205,252,129,230, 23, 27,179, 52,237, 46, 33, 36,210,219,219,251,171,178,178, +178,116,149, 74, 53,170, 37,217,239, 8, 33,180,180,180,244, 33,195,164, 49, 15,103,115, 13, 0, 91, 91,219,219, 42,149,170,141, + 37,231,138, 68,162,162,218,218, 90, 95, 83,191, 37,105,152,207,250,127, 0, 98, 40,106,213, 13,134,221, 43,231, 40,165, 53,143, +188,223, 30, 64, 39, 0,119, 0,220,160,148,182,104, 25,249,127,145,199, 12, 0, 43, 86,158, 12, 66,240,109, 15, 25,168, 76, 0, +173,146,226,237,115,149, 45, 85,252, 86,172, 60, 75, 36, 18,201, 3, 75, 2, 55, 37, 18, 73, 81,109,109,173,117,146,242,140, 33, +132, 4, 0,168,223,158, 33, 6,160, 6, 80, 3,195,214,216, 75,214, 93, 0,205,199,106, 0, 88,177, 98,197,138,149,191, 5,132, + 16, 23, 0, 47, 54,136, 11, 72,166,148, 90,148,213,210,202,227,180, 40,224,206,138, 21, 43, 86,172, 88,121,214, 80, 74, 75, 0, + 40, 9, 33,175, 1, 80,193,224,246,183,210, 66,172, 30, 0, 43, 86,172, 88,177, 98,229,127, 16,171, 7,192,138, 21, 43, 86,172, + 88,249, 31,164,201, 98, 64,255, 81,142,182, 23, 65,168,176, 7,129, 12, 20, 53,208,202, 43, 49,232,142, 53,135,179, 21, 43, 86, +172, 52,131,186, 8,121, 87, 0,229,150, 36, 58,178, 64,158, 11,128, 14, 0,210,235,220,237, 86,254,139,121,182, 6,192,129, 96, + 33,236,203, 67,192,231, 90,113, 26,165, 61, 15,172, 45, 7,126, 53, 79,128, 74,156,240,204, 69,165, 99, 42, 70,167, 53, 47, 41, +246,223,140,186, 27,118, 32,195, 48,111,184,184,184, 12, 44, 41, 41,217,201,113,220,236, 63,187, 93, 86, 12, 16, 66,150,201,229, +114,125, 85, 85,213,199,127, 98, 27, 14,227,143,116,189, 71, 40,165, 67,254,172,182, 88,249,107, 66, 8,113, 2, 16,232,226,226, +210,254,185,231,158, 19,100,102,102,130, 16,242, 0,192,233,150,108, 27,173, 75,166,179,179, 99,199,142, 61,219,181,107,135,244, +244,116, 16, 66,206, 1,152, 68, 41,189,247,180,219,255, 36, 16, 66, 28, 0,136, 26,230, 24,176,210, 50,158, 93, 12,192,105, 87, + 25,116,130,231,149,181, 21, 65, 31,252,159,221,140, 31,207,215,186,230, 23, 41,109,189,221,100, 53,175,244,148, 22,175,120,189, +242, 75,137,216,225, 38, 4,186, 68,244, 41,182, 40,247, 57, 33,132, 39, 21, 11, 38,185,136, 5, 67, 53, 28, 23, 70, 1, 8, 9, + 82,202, 84,236,225, 90, 29,183,221,146,125,201, 0, 96, 35, 36, 57, 26, 22,127, 36,210,127,108,135,239,195, 7, 68, 2,166, 64, +169,102,125, 31, 61,203,130,246,190,224,226,226,114,160,123,247,238,174,245,229,118,191,249,230, 27,220,186,117, 75,106, 73, 89, + 91, 66, 8, 95, 32, 16, 79, 22,203,100,195, 56,142,237, 12, 16,202,240,120, 87, 53,170,154,159,117,106,245, 46, 75,247, 62,135, +184,144,222, 66, 6,111,114, 20,251,175, 22,211, 95,120, 60, 94,180, 94,175, 95,245,232,121,124, 62,127,129, 78,167,251,172, 73, + 65, 81,196, 11, 20,173, 65,234, 12, 73, 6, 28,244,200, 66, 44,205, 39,132, 8, 41,165, 90, 68, 17, 47, 24,170,208,137,234,206, +209, 66,143, 76,196,210,252, 38,229, 62,220,231, 46, 98,177,120, 33, 33,164,155, 70,163,241, 22,139,197,121,148,210, 11, 42,149, +106, 45,165,244,138, 37, 50, 44,133, 16,242,150, 76, 38,251, 40, 45, 45,109,167,175,175,239,135, 22,156, 47,227, 51,204, 28,123, + 57,243,146, 90, 75, 59, 3,128, 88,200,191, 86, 89,163, 59,193,178,250,207, 41,165,141, 23, 71,120, 92,142, 59,128,175, 1, 8, + 1,204, 6,112, 55, 43, 43, 11, 44,203,162,125,251,246, 0,208, 14,192, 70, 7, 7, 7, 90, 81, 81, 49,197, 58,240, 61, 91, 54, +255,152, 56, 14, 60, 18, 5, 16, 59, 0, 26, 66,233,230,119,134, 71,252,235,207,106, 15, 33, 68, 36, 22,139,199,239,223,191, 95, +208,175, 95, 63,212,214,214,162,166,166, 6,113,113,113, 88,186,116,169,174,186,186,250, 96,115,140, 0, 66,136,159,189,189,253, +181, 29, 59,118,200,134, 15, 31,142,154,154, 26, 84, 87, 87,227,208,161, 67,136,142,142,174,169,174,174,238,252, 87, 50, 2, 8, + 33,135,218,182,109, 59, 52, 51, 51,243,123, 0,107, 41,165,215,254,236, 54,253, 93,121, 70, 30, 0, 66,192,122,134,170,149,165, +207,247,136,182,153,173, 35,226,178, 21, 49,139,142,245,232,209, 21,231,207,196, 99,221,198,157,207,247, 88,168,253, 40,113, 85, +241, 6,177,204,181, 22, 32,231,205,237, 29, 39,132, 4,120,200,197, 63,190,221,167, 99,235,225,221,131, 37, 1, 94, 78,160,101, +121,184,118,227,150,239,207,105, 15, 94,250, 54,173, 50,138, 16, 50,194, 92,102, 50, 0,168,213,193,135, 43,188, 1, 34,117, 0, + 52, 53,134,135,214,240,151,173,173, 4,163, 85,129, 97, 13,175,213,119,147, 32,125,251,176, 79,243,127, 1,194,119,115,115, 59, +176, 98,197, 10, 87,134, 97,112,245,234, 85, 28, 57,114, 4, 25, 25, 25, 27, 45, 84,254,157, 37,182,118,251, 59,246,248,127,246, +206, 59, 60,138,234,235,227,223, 59,179,187, 51,219,201,166, 16, 2, 33,161,165,208, 67,145,132, 14, 82, 84,164,189, 32,168, 88, + 64, 64, 17, 21, 80,192, 14, 82, 68,252,129, 32,160, 8, 8, 10, 2, 74,137, 40,160, 64, 0,105, 82,162,212, 16, 32, 1, 82, 32, + 33, 1, 66,250,246, 50,187,247,253, 99,179,107, 2, 41,155,208, 44,251,121,158,121,118, 51, 59,115,246,220,201,236,156,115,207, +189,247,156,190,245,106,251, 23,200, 24, 82, 8,223, 58,237,225, 16, 69,132, 36,157, 60,218, 39, 41,254,183,169,132,144,167, 40, +165, 85,230,159,151, 48, 24,126,120, 56, 94,236,249, 35, 68, 0,118,138, 68,162,103, 86,173, 90,133,231,159,127,222,125,204, 79, + 63,253,132,231,159,127,126, 20,128,138, 29, 0, 6, 13,224,192,123,148,194, 7, 0,244,102,152, 30,219,130, 11,199, 62, 39, 29, + 1,180, 37,132,156,234, 24,132, 99,113,131,209, 92,193,137, 36, 0, 64,168,160, 3,197,199, 0, 42,117, 0, 8, 33, 34,137, 68, + 50,167, 94,189,122, 19,150, 47, 95,206, 71, 68, 68, 64,161, 80, 32, 59, 59, 59,244,212,169, 83, 33,211,166, 77, 27, 32,147,201, +190, 48,153, 76, 31,212, 36,233, 75, 57,223,215,139,227,184,185,137,137,137,138,144,144,144, 42, 19,137, 16, 66,122, 40,229,236, +134, 69,159, 76,244,233, 55, 96,176, 68, 19,208, 0,118,107, 17, 50, 83, 19,186,255,248,243,238,152, 79, 23,111,158, 64, 8,121, +134, 82,234, 73, 73,197,229, 91,182,108, 25,168, 84, 42, 49,116,232,208,139,205,155, 55,135, 92, 46,199,198,141, 27, 17, 20, 20, + 4,157, 78,119,113,205,154, 53, 34,171,213,138,215, 94,123,237, 27, 84,163,152, 79,137,174,143,170, 84,170,183,139,139,139,251, + 2, 0,190,232, 81, 15, 34,212,131,128, 44,188,113, 32,203, 83, 57, 95,109,139,127,133, 18,242, 26, 0, 14,160,197,176,211,133, +175, 13,238,184,177, 58,186,220,111,120,158,191,105,177, 88, 42, 92,203,239,105, 98, 33, 94, 68,110, 90,236,168,221,174, 71, 63, +116,234, 55, 12,163,250,119, 67,171,176, 16,156,189,156,129,213,191, 28, 90, 30,221,119,222,242, 63,247,108, 5,199,146, 28,179, +224,120,208, 57, 1, 90, 45, 92,184, 80,220,191,127,127,196,197,197, 97,251,246,237,232,208,161, 3,122,244,232,129, 81,163, 70, +137,151, 44, 89, 18, 14,224, 68, 53,228,189,244,225,135, 31, 42, 6, 14, 28,232,150,215,185,115,103,244,234,213, 11, 99,198,140, + 81,124,254,249,231, 47, 1,248,240, 62,181,165, 38,212,122,246,217,103,153,252,252,252, 17,199,142, 29, 27, 33, 18,137,246,149, +100,222,188,171, 34,112,255, 69, 30, 76, 4, 32,174, 78, 40,136,174,203, 91,223, 42,166,239, 73,224,113,254, 98,154, 15, 64, 57, +152,115,146, 32, 20,235, 97,201,185,249, 72,239, 87,122,116,141, 52,153, 62,123,177,112, 6,168,242, 48, 30,187,113,181, 66,165, + 9,105,222,192, 87,190,255,192,220, 87,253, 67,186, 13, 6,124,130, 0, 85, 0,232,145,245,192,173, 52, 32,249,119, 36, 37, 39, +163,127,156, 54,247,138,158,246,172,202, 40, 18, 66,168,163, 40, 27,248,164, 49, 32,226, 1,177, 20, 16, 75,113,252, 38,240,204, + 15, 89,200, 44,178, 98, 92,215,122,248,226,249, 54,128,136, 7,243,226,166,106,167, 43, 38,132,180, 24, 48, 96, 64,226,168, 81, +163, 48,113,226, 68, 71,102,102,230,124, 0,223, 81, 74,147, 61, 57, 87,169, 9,216, 63,240,165,225,126,207, 62, 53, 6,188, 88, +132,236, 27,215, 32, 85, 4,192,108,103,144,152,120, 12,191,255, 22,139,243, 71, 19, 11,244,133,249,221, 42,107, 47,203,178, 25, + 82,214, 81,223, 95, 10, 20,152, 1,173, 21,144, 72, 36,150, 17, 35, 70,112,114,185, 28, 28,199,129,227, 56,176, 44,139,133, 11, + 23, 90, 12, 6, 3, 39, 18,137,114, 5, 65, 8,186,195,208,190, 69,186, 81,138,185,228,115, 26, 3, 0,123,134,243,216,172,124, + 14, 3, 6, 12, 64,167, 78,157,112,244,232, 81,108,223,190, 29,195,116,235,209,103,147,115,120,146,190, 73,226, 9,193,123, 88, + 72, 15, 85,214,102,142,227,254, 55,104,208,160,137,223,124,243, 13,119,249,242,101,228,228,228, 96,255,254,253,168, 83,167, 14, +234,213,171,135, 22, 45, 90,224,233,167,159, 54,165,164,164,124, 97, 52, 26,223,241,224, 95, 80,217,245,109, 38, 18,137, 14, 28, + 58,116, 72,212,177, 99, 71,159,188,188,188,153,126,126,126, 51, 42, 57,190,103, 68, 88,253, 95,143,236,219, 44,149,242, 18,172, +254,230, 43,124,255,227,239,112, 56, 28, 24,208,183, 13, 70, 62,219, 23, 57,183, 10,241,196, 51,115,140, 55,111, 21,246,167,148, +238,175,226,251,119,126,244,209, 71,143,199,196,196,160, 65,131, 6, 96, 89, 22,233,233,233,200,204,204,132, 84, 42, 69, 72, 72, + 8,212,106, 53,126,248,225, 7,204,157, 59,119, 23,165,212,163, 50,195, 37,178,123,203,100,178,173, 70,163, 81,230,190,103, 87, +244,138,161, 41,135,214, 56,252, 26,207, 96,253, 67,118, 99,116, 92, 65, 69,231,243, 34,230,166,197, 78,107,119,232, 51, 8,209, +125, 6,223,110, 8,113,116,199,102,156, 60,176,163, 90,134,240, 94, 25,233,242, 32,132,208,196,196, 68,176, 44, 91,238, 86,175, + 94, 61,143,126,187,132, 16,106,202,205,196,247, 39,110,224,209,168,198, 8, 13,212,184, 63,187,114, 61, 23, 91,118,237,195, 0, +243, 14,132,191,190,254,129,167, 46, 39,132,116,239,214,173, 91,216,203, 47,191,140, 23, 94,120, 65,111,183,219, 19, 0,180,220, +181,107,151, 10, 0, 6, 14, 28,104,180, 90,173,223,123,146, 45,144, 16,194, 74, 36,146,204,107,215,174, 5,233,116, 58, 52,105, +210, 36,149, 82, 58,147, 16,242,209,222,189,123, 27, 3,192, 99,143, 61,118, 93, 16,132,250,158, 70, 84,239, 37,132,144, 79, 1, +116, 3,240,129,235,119, 68, 8, 57,248,238,187,239,118,115,101,108,212,235,245,136,143,143,199,137, 19, 39,206,153, 76,166,151, + 41,165, 30, 23,187,250,175,227,113, 4,160, 93,187, 87,196, 39, 79,174,176,213,232, 91,196,240,135,201,210,244,231,163,172,223, +220,217,239,238, 5,165, 79,192, 94, 40,135,246,240, 35,176, 21, 2,108,208,111,211,222, 28,150,246,214,135, 95,181,254,236, 89, + 75, 83, 72,149, 23, 1, 92, 45, 79, 20, 33, 68,228,175,144,196,238,159, 61,198, 63,164,215,211, 64,112,115,224,218,121,208,115, +123,156,198, 95,151, 15,168, 3,208,212,239, 42,126,234, 92,236,223,231, 0,126, 36,132, 52,175,178,151,104,209,193, 0, 30,125, +215, 25,240, 74, 7, 9,158,127, 68,134,101,127,222,192,149, 2,231,220,196, 21,191,103,225,179, 23, 98,192, 73,100, 53,186, 4, + 0, 50, 51, 51, 51,173, 50,153, 76, 18, 29, 29,205,100,102,102,166,121,104,252,197, 82,149,250,231,222, 67, 59,248,153,180,199, +145,150,210, 2,141,194,186,129, 87,214,133,222,108,197,153,211,113, 56,245,231, 54, 20,229, 95,131,127,136, 92, 99, 23,108,191, + 16, 66,154, 84,212, 94, 74,105,208,172, 79, 23,224,194,133, 11, 56,127,254, 60, 34, 34, 34,192, 57,113, 27,127,158,231,193,113, + 28,230,204,153,195,113, 28,135,215, 94,123, 77, 3,128, 5, 80,233, 53,236,209,163, 7,250,140, 91,229,254,123,192,128, 1, 24, + 48, 96, 0,172,203, 60,238,100,186,218,220,182, 94,189,122, 19, 86,174, 92,201, 29, 60,120, 16, 6,131, 1,114,185, 28, 26,141, + 6,147, 39, 79,118,181, 3,107,215,174,149,118,233,210,229, 13, 66,200,230,154, 14, 7, 16, 66, 2, 89,150,221,185,110,221, 58, + 71,199,142, 29,125, 50, 51, 51,113,245,234, 85,116,237,218,181,162,227, 85, 10, 25,187,241,216,254, 88,169,143, 56, 29, 69,151, +215,227,227,207,246,225,102,158,211,193,201,184,118, 3,227,135,213, 71, 84,120, 19,252,188,102,146,172,215,208, 79, 54, 18, 66, + 26, 87, 17,146,125, 99,246,236,217, 23,151, 45, 91, 38, 58,123,246, 44,164, 82, 41,100, 50,153,251,213,104, 52,226,214,173, 91, +152, 63,127,190, 0,231, 16, 65,133,104, 52,154, 57, 90,173,246,109, 66, 8,196, 98,113,172, 76, 38, 27, 24, 23, 23, 39,235,218, +181, 43,240,117,215, 58, 16,152,122, 96, 24,134, 74,228, 7,152,252,180,169, 80,214,190,138,216, 97,199,241,212,230,114, 31,238, + 22, 59,173,109,202,203,196,215,191,103, 96, 64, 76, 83,183, 33,108, 21, 22,130,137,207, 60,142, 38, 62, 12, 54, 12,213,160,201, +107,235, 60, 78,239,107,177, 88,106, 95,186,116, 9, 12,195,148,107,164, 3, 2, 2,170, 85, 70,249,118, 74,215, 47,185,125,171, + 14, 44, 47,131,228,183,143,176, 42,241, 49,216, 88, 41, 0,231, 96, 32,235,176,160,105,225, 65, 56,124,238,122,206, 93,141,160, +148, 30, 36,132,156, 59,116,232, 80, 59, 0,169,148,210, 52, 66,136,104,235,214,173,209,163, 70,141, 66,171, 86,173,100, 39, 78, +156,240, 7,112,203, 3,113,237,187,119,239, 30, 20, 16, 16,128, 37, 75,150,128, 82,186,156, 82,186,158, 16, 82,123,203,150, 45, +159,141, 29, 59, 22, 81, 81, 81, 65, 39, 78,156,104,143,106, 84,145,188,135,140,249,249,231,159,125,191,254,250,235,125, 12,195, +100, 80, 74, 63, 4, 64,172,214,191,166,138, 41, 20, 10, 60,241,196, 19,232,219,183,111,139, 15, 62,248, 96, 22,128, 62, 15, 65, +207,127, 36,149, 58, 0,132,144,158, 62, 62, 62, 83, 65,152,142,218,226, 98,149, 88,178,154,202,100,242, 2,234,176,239,212,233, +116,159, 81, 74, 61,170, 40, 6, 48,106, 7, 21,234,102,231, 24,148,157, 98,218,179,176,220, 74,133,254, 88, 43, 16,191,243, 96, + 40,129,144, 31,208,174,105, 29, 75,230, 77,173,204, 65,237,117, 25, 48,234,138, 36,137, 89,246,185,113, 49, 13,131, 67, 59,244, + 4, 52,245,128, 75, 71, 65, 83,254, 0,244,249,128, 46, 23, 40,206, 5,213,230,194,204,240, 8,150, 19, 12,171, 79,131,191, 73, +199, 11, 0,190,173, 84, 69,139, 14,185, 86, 14,199,174, 21,162,101, 93, 27,158,239, 36, 69,159,102,254,248,238, 68, 30, 0, 96, +116,183, 70,224,164, 10, 64,204,123,214,228,219,160,148, 22, 19, 66, 22,157, 56,113,226,237,145, 35, 71, 34, 53, 53,117, 57, 33, +228, 58,165,180,210,218,233, 98, 49,247,114, 88,139,144, 80,130, 91,224, 36,106,112,242,218, 40, 50,152, 97, 48, 91, 97, 48, 91, +113,250,207, 95, 32,230,124,161,244,229,160,187,122, 30, 10, 95,117,125,193,108, 29, 9, 96, 85,101,114, 93,184,140,126, 97, 97, + 33,206,157, 59,135,212,212, 84, 68, 70, 70,162,107,215,174, 8, 11, 11, 67,169, 2, 38,119,246, 38, 40, 4, 66, 80,248,203, 32, +130,206,157, 59,195, 42, 86, 35,126,235, 86,132,135,135, 35, 50, 50, 18,231,207,159,199,238,221,187,209,245,250,117, 40,167,134, + 33, 37, 37, 5,253, 27,162, 16, 76,229, 85,186,120,158,159,186,116,233, 82,254,242,229,203,110,227, 47,147,201, 80,187,118, 89, +187,208,176, 97, 67, 76,155, 54,141,159, 51,103,206, 84, 0, 79,123,210,222,210, 16, 66,100, 34,145,104,231,244,233,211,217, 1, + 3, 6,212, 78, 78, 78, 70,102,102, 38, 50, 50, 50, 42,116, 0,120, 9, 51,105,241,167, 19,125,124,212, 60,112, 37, 22,181,212, + 42, 44,122, 63, 6, 79,191,229,140,244, 47,154,214, 23,181,124, 52,128,195,136,232,214, 33, 24,242, 68, 59,213,230,237, 39, 38, + 1,152, 85,129, 14,191, 2,232,215,161, 67, 7,244,236,217, 19,187,118,237,194,132, 9, 19,220,159, 63,254,248,227,152, 55,111, + 30,172, 86, 43, 66, 66, 66, 68,105,105,105,169,132,144, 10, 39, 6,106,181,218,183, 79,156, 56, 33, 18, 4, 1, 99,198,140, 25, +176,116,233, 82, 89,235,214,173,157, 31, 10,226, 6,142,172,211,207, 48,117,194,226,152,250, 81, 27,145,118,164, 43,110,158,239, + 7,182, 85, 38, 42, 25,146, 97, 57, 57,212,241, 11,176, 50,165, 7,236,140,235,254, 39,144, 80, 19, 90, 21,236,133, 67, 83,253, +212,235, 46,227,127,183, 70,154, 16, 82, 4,160,204,243, 98,218,180,105, 96, 89, 22, 34,145, 8, 81, 81, 81,120,230,153,103, 60, +150, 77, 8, 49, 2,144, 2, 64,143, 71,251,194,148,149, 8, 17,217, 15, 17, 11,136, 24, 2, 63, 25,139,247,186,169,193, 16, 64, + 64, 64,181,116,189,151, 80, 74,243, 1,148, 46,125,158,151,153,153, 9,192,105, 16,225,121,231,142,215,104,156, 78, 93, 90, 90, + 26, 0,184, 28,233, 83, 46,121, 42,149, 10,112,166,222,125, 40,180,108,217, 18, 43, 87,174, 68,102,102,102,200,138, 21, 43,214, +109,220,184, 81,208,106,181, 80,171,157,255,118, 87,177,166,146,242,229, 85,212, 48,247, 82,154,114,111, 18, 66,136, 68,165, 82, +173,171, 91,183,110,191, 9,147,222,148,189,244,210, 24, 82, 88,172,195,178,181, 91,201,205, 91,121,190, 17,181,217,103, 22, 46, + 92, 48, 68, 46,151,127,110, 48, 24, 60, 24, 27,162, 34, 0, 92,112,160,194,112,236,232,126, 58, 60,120,184, 25, 54, 45, 0,155, + 4,150, 91, 42, 0, 72, 74,201, 48,135, 4,169,205, 64, 1, 87,114,124,185, 4,200,217,199,135, 69,135,201, 97,210, 3,183,210, + 65,211,254, 4,138,111, 0,218, 60, 64,123, 11, 86,109, 33,204,186, 34,152,181, 69, 48,218, 40,186, 5, 64,246, 99, 22,158,132, + 7, 14, 64,168,191, 18,231, 39,171,208, 48, 80, 13,136,101,120, 38, 70,131, 46, 45, 66, 96,176,139, 16, 94, 63, 0, 16, 57,135, + 6, 60,133, 16,242,136, 82,169, 92, 96,181, 90, 47, 90, 44,150,151, 1,124, 60,111,222,188,126,139, 22, 45,106,246,241,199, 31, + 51,175,188,242,202, 58, 66, 72, 51, 74,233,141,138,100, 40,124,148, 79,107,252,236,108,131,134, 29,241, 72,204, 72,152,172,118, + 20,233, 77, 48, 90,108,208,155,173,104,223,103, 42,114,114, 50, 33,146, 40,160, 43,254, 10, 86,222,193,152,138, 77, 79,194, 67, + 7,128,231,121, 20, 20, 20, 96,251,246,237,152, 49, 99, 6, 66, 67, 67,177, 99,199, 14,172, 94,189, 26,175,191,254, 58, 34, 35, + 35,129,146, 74,114,119, 54, 16, 87,193, 96,238,128,109,120,226,207,247,157, 83, 5,130, 0,232,116, 58,204,152, 49, 3, 89, 89, + 89,144, 74,165,184,201,247, 5,207,243,248,120,219,199,160,147,240, 9, 28,229, 71,119, 74, 93,183, 14,141, 26, 53, 66,102,102, + 38,228,114,185,219, 1,232,220,185,115,153, 82,180, 50,153, 12, 29, 59,118, 36,132,144, 14,158,180,245,182,239, 96, 88,150,221, + 56,108,216, 48,191,113,227,198,213, 77, 74, 74, 66,102,102, 38,210,210,210, 80, 92, 92, 92,161, 69, 83,200,216,222, 79, 60, 57, + 72,132,252, 29, 0, 43, 5, 24, 41,134,247,107,142,238, 29,155, 2,140, 20,181, 3,252,220,251, 65, 88, 12,126,178, 19,183,115, +255,185,222,168,192, 1, 0,208, 47, 61, 61, 29,114,185, 28, 9, 9, 9,144,201,220, 17, 38, 49, 0,145, 68, 34, 49,185,140,215, +206,157, 59, 33,147,201, 16, 28, 28, 92,225, 28, 0,187,221, 46,170, 93,187, 54, 8, 33,120,231,157,119,228, 17, 17, 17, 48,155, + 75,122,170, 44, 53, 16,193,220,212,113,243,178,157, 9,110,243, 3,120,245, 79,176,232, 59,194, 78, 55,160, 18, 7,192,146,127, + 13, 97, 69,199, 16, 81, 28,143,121, 71,116,200, 55, 57, 96,119, 80,216, 29,192,110, 10, 56, 24,177,235,154, 82, 0, 38, 74,105, +149, 97, 50, 87,155, 88,150, 69,108,108, 44,206,156, 57, 3,135,195,225,254,255,150,200,114, 81, 76, 41,173, 85,129, 40,245,177, + 99,199,192,243, 60,164, 82,169,251,213,245,126,228,200,145, 24, 49, 98, 68,117,156, 11,105,101,242, 30, 13, 83,129,101, 8, 24, + 66, 64, 13,121,158,200,187,167, 72,165,210,231,205,102,115,149, 15, 33,177, 88,220, 11,192,218,170,142,227,121, 62,246,182, 93, + 7,202, 43, 75, 44, 22,139, 99, 1,248,123,170,231,189,196,106,181, 98,201,146, 37, 96, 89, 22, 11, 22, 44,192,244,233,211, 69, +171, 86,173,194,185,115,231, 16, 30, 30,254, 48, 84,250,215, 80,174,161, 85, 42,149, 43,186,119,239,222,127,227,198,141,210, 35, +167, 46,161,176, 88,135,109, 91, 54, 98,249,252, 89,232, 55,242, 3, 12, 30,254,180,232,213, 87,199,137,122,244,232, 49,145,101, +217, 44,187,221,190,188,242,175, 97,138, 25,194,100, 13,238,162,202,155,191,100,109,135,225, 3, 59,158,130, 45, 15,160, 42, 2, +123,113, 32, 8,167,251,228,203, 29,234, 65,157, 21,121, 12, 41,202, 2,152,138,139, 58, 56,104,155, 48,127, 5,160,189, 5,154, +157,228, 12,249,107,111, 65,208, 21,194,162, 43,132, 89, 91, 8,147,182, 8, 70, 93, 49,204, 14,160,142, 20,176, 58,208,166,202, + 43, 97,214, 1, 18, 25,154, 6,243,127, 25,122,177, 20,245, 2,254,154, 19,224,220, 60,115,132, 9, 33,117, 27, 53,106,180, 99, +255,254,253,126,243,231,207,239,252,229,151, 95,126, 75, 41,141, 39,132,244,120,247,221,119, 79,175, 95,191,190,222,123,239,189, +231, 51,126,252,248,183, 1,188, 89,145, 28,155,213,218,180, 78,131, 86,104,211,225, 5,104, 77, 86, 24,204, 54, 24, 75,122,255, +251,183,126,138,155,215,146, 96, 49,219, 96,179, 3,109, 31, 29,139,128,160, 8,108,158, 59,177,210,246,150,254,129,115, 28,135, +115,231,206, 97,226,196,137,152, 48, 97, 2,142, 31, 63,142,231,158,123, 14, 1, 1, 1, 56,124,248, 48, 90,183,110,237,122, 40, +223,233, 0, 56,103,242,103, 99,193,157, 15, 12,187,189,130, 78,254,231,244,104,101,186, 1,128,197, 98,169, 39,151,203,193, 48, + 12,120,158,119, 59, 0, 35, 71,142, 52,196,199,199,203,111, 63, 94, 38,147,121, 60,145,229,139, 47,190,224, 10, 11, 11,251,180, +107,215,238, 3, 74,105,227,217,179,103,251, 38, 39, 39, 35, 35, 35, 3,187,119,239, 46,142,141,141, 21, 4, 65, 40,254,248,227, +143,203, 61,223, 96,114,180,210,248,214, 1,110,222, 4, 88, 57,192,240, 0, 35, 69, 96,244,255, 0, 0,244,218, 18,167,241,103, +164, 0, 43, 69,235,150,145, 48, 24, 45,173, 42,211, 73, 16, 4,108,218,180, 9, 50,153,204,237, 0,240, 60,127, 93, 16, 4,205, +206,157, 59, 17, 23, 23, 87,230,248,170,202,202,234,116, 58, 16, 66,112,244,232, 81,180,105,211, 6, 90,109,201,232,131, 85,184, + 78, 20,126, 91, 81,124,227, 45, 80,250,179, 93,234,119,145, 53, 22,190, 2, 17,163,170, 76,158,181, 32, 11, 44,195,128, 33,192, + 45,131, 29,243, 54, 28,168,208, 64,114, 28,231,145,135, 92,186,199,127,250,244,105,140, 31, 63,222, 45,107,206,156, 57,183,203, +172, 48, 34,232,186, 30,109,218,220,121,203, 83, 74, 33, 8,130,123,104,193,211,232, 66,101,242,108, 14,184, 29, 0,230, 33, 20, + 45, 55,155,205,210,242,134,246,141, 70, 35,140, 70, 35, 44, 22, 11, 86,172, 88,129,176,176, 48,143, 30, 84,102,179,217,239,135, + 31,126, 0,165, 20, 63,252,240, 3,126,248,225, 7,215,126,152, 76, 38,152,205,102,172, 88,177, 2,141, 27, 55,246,187,183, 45, +241, 28,171,213,138,197,139, 23, 3, 0,166, 76,153,130, 90,181,106,225,131, 15, 62, 64,247,238,221,209,176, 97, 67, 0,101,159, +105, 94, 60,231, 14, 7,128, 56,107,126,142,120,247,221,119,197, 82,169, 20, 18,177, 8, 95,173,221,142, 21,243,103, 65,194, 59, +159,189, 50, 41, 7,127,127,127, 76,158, 60, 89, 49,105,210,164, 55,224, 92,194, 84, 49,118, 90,232, 96,196,233,115,134, 93,191, +216,241,125, 77,167,232, 62,175, 70, 47,120,175, 19, 26, 53,108,105, 75, 75,207,196, 71,139, 15,139,117,186, 98,251,236, 33,183, + 18, 29,140, 36,157,177,211,194,138,133, 57, 8,114,210, 64,253,130, 1, 93, 46, 28,186, 2, 88,180,133,176,232,139, 96,210, 22, +194, 84, 92, 8,163, 94, 7,179, 3, 48,219, 1,131, 13,229,153,174, 59,177,232,176,239,138, 21, 27,206,220, 66,139,250, 62, 24, +219, 51, 12, 50,137,212,237, 12,216, 24, 9,142, 36,229, 32,186, 69,227, 42, 69, 17, 66, 56,185, 92,254,243,143, 63,254,232,167, + 84, 42,177,107,215,174, 66, 0,137,132, 16, 57, 0,191, 91,183,110,253,242,219,111,191,189, 58,104,208, 32,192,153,116,163,226, +214,218, 97,118, 64,130,171,153,151,145,153,113, 1,188, 50, 24,156, 42, 24, 6,179, 21, 22,171, 13,102,179, 13, 86,171, 0,171, + 69,192,181,148, 51,168,219,160,181, 7,141,253, 11,142,227,144,154,154,138,198,141, 27,227,204,153, 51,208,235,245,208,104, 52, + 24, 58,116, 40,190,250,234, 43,240, 60, 15,148,179, 48,242,126,194,243,124, 86,122,122,122,168, 74,165, 2,203,178,144,201,100, +144,203,229, 24, 61,122,180, 44, 49, 49,241,134,193, 96,104, 70,105,101,247, 72,249,204,156, 57, 51,200,102,179, 29,207,205,205, + 85,154,205,102,229,181,107,215,240,231,159,127,210,115,231,206, 57, 86,173, 90,117, 51, 47, 47,175,144, 82,250, 6,165,244, 96, +101,114, 4, 75, 17,186, 60,189, 19,199,207,164, 2, 0, 46,236,249,107, 88, 62, 41,173, 24,205,186, 59, 67,248, 13, 67,234, 96, +223,246, 69, 85,169,181, 35, 44, 44,172, 95, 80, 80, 16, 62,251,236, 51,200,100, 50,244,233,211, 7,123,246,236,241,175,104, 14, + 87, 85, 15,187, 67,135, 14,185, 13,107,124,124,252,157,199, 19, 16,128,113,128,101,173, 20, 84, 76,236,149, 79, 98,179, 21, 94, + 7,203, 16, 16, 2,216, 28,149, 27, 72, 79, 41,237, 0,216,108,182,187,146,201,243, 60,210,210,210,202, 56, 36, 37,247, 45,236, +118,123,153,104,131, 39, 84, 38,207,102,167, 15,213, 1,248, 47, 98,179,217,144,152,152, 8,142,227, 96,181, 90, 65, 8, 1, 33, + 4, 22,139, 5,165,231, 2,120,169, 62,119, 56, 0,148, 82, 42,145, 72,198, 15, 25, 50,100,113, 66, 66,130,172,125,203, 38,248, + 54,118, 47,250,141,252, 0, 0, 80,219,175, 22, 26,213, 15, 68, 66, 66, 2,222,120,227, 13,131,193, 96,120,185,202,111,241,189, +158,198, 20, 5, 5,115,142,155, 97, 27, 38, 21,112,179, 14,116,234,246,235,233, 64, 20,252,118,177,233,215, 95,127,131, 58,190, + 60,115,240, 19,203, 17, 78, 76,210,192,249, 94, 70,173,235,105, 21,137, 98,224, 56,123,225,194,133, 70,173, 2, 27,193,106,212, +195,170, 43,114,246,250,117,133, 48,106,139, 96,212,235, 97,182, 3,150, 18, 7, 32,169, 24, 96, 8,170, 92, 39, 90,152,151,131, + 33,223,166, 64,107, 22,128,248, 27, 48,131,195, 59,255,215,206,217,227, 23, 75, 49,228,227,173,248,245,207,203, 88, 52,225,255, +170,108, 46,128, 79, 87,172, 88,209,190,117,235,214,152, 53,107, 22,252,253,253,213,254,254,254,133,181,106,213, 18, 7, 6, 6, +162,113,227,198, 24, 58,116, 40, 46, 93,186, 4, 0, 21,182, 21, 0, 8, 43, 62, 13,174, 69,208,201, 63,182, 34, 35,229, 56,172, + 86, 1,173,122,189, 13, 69,173,186,104,213,253, 21,136,226,183, 32,249,212, 30, 88,172, 2, 26,183,232,134,188,172, 43, 96,197, +226,211,158, 40, 9, 56, 31,230,145,145,145,136,139,139,131, 82,169,132,143,143, 15,124,125,125, 17, 27, 27,139, 14, 29, 58, 84, + 62, 7,224, 62, 65, 8,249,243,244,233,211, 33,125,250,244, 33,165, 29,128,225,195,135,147,139, 23, 47,106,190,254,250,235,109, +132,144,238,213,169,251, 61,115,230, 76, 63,189, 94,255,231,181,107,215, 2, 3, 2, 2,216,150, 45, 91,226,250,245,235,120,233, +165,151, 28, 86,171,181,200,225,112,204, 2,176,170, 42,153,114,153,248,236,149,212,196,206, 3,250, 68,185, 29,128, 21, 27,206, +160, 48,233, 51,128,225,241,209,103,191,186,143,237,221,179, 61, 18,206,103, 66,174,144, 85,120,255, 81, 74,159, 36,132, 52,210, +233,116, 23,131,131,131, 69,102,179, 25, 11, 22, 44, 64,139, 22, 45, 0, 0,159,126,250, 41,222,123,239, 61, 0,192, 71, 31,125, +132, 25, 51,102, 84,217,214, 27, 55,110,128, 97, 24, 92,190,124,217,253, 30, 0, 32, 17, 5, 81,125,222, 32, 34, 81,110,131, 96, +181, 16,125, 94, 56, 24,113, 18, 28,130,174, 50,121,182,130,172, 18, 7,128,192,106,167,149, 26, 72, 79, 41,221, 43,183,219,237, +119, 37,147,227, 56, 52,106,212,232,142,253,174, 8, 64,117,231, 23, 84, 38,207,106, 47, 29, 1,240,122, 0, 15, 2,171,213,138, +118,237,218, 97,245,234,213,232,220,185, 51, 66, 67, 67,113,243,230, 77,156, 63,127, 94,176, 90,173,162, 54,109,218,192,223,223, +223, 27, 5,168, 1,229,254, 34,172, 86,235, 42,157, 78,183,176, 69,139, 22,134, 47,191, 88,236,120,246,241,182,104, 25, 22,140, +152, 86,141, 48,184,123, 83,124,240,193, 7,150,206,157, 59, 27, 12, 6,195,115,148, 86, 29,210, 69, 91,106, 3,132, 68, 72,252, + 14, 44,223,229,176, 7,135, 52,102,103,205,154,133,233,211,167, 99,201,146, 37, 32, 98,133,104,249, 46, 56, 32,241, 59, 0, 8, +137,206,227,203,231,166,137,238,218,146,162, 55,234, 46, 28,133,161,168, 0,186,162, 2, 20, 23, 21,160,168,160, 0, 69, 90, 61, +180, 54, 64, 15, 9, 4,191, 6,208,218,128, 35,121, 48,235,109,216, 89,149,138, 50, 98, 1, 39,254,235,114, 88, 28, 76, 73,200, + 95,134, 28,189, 3,191,254,233,172, 56, 25,232, 95,117, 36,172, 89,179,102,195, 71,140, 24, 1, 0,152, 62,125, 58,226,227,227, +153,248,248,120,241,174, 93,187,176,108,217, 50,140, 29, 59, 22,251,246,237,195,232,209,163, 47,162,226,177, 97, 0,128,213,160, +143, 75, 73,248,195,232, 27, 28, 3,139,213, 6,155, 64, 32, 87, 59,115, 22, 73,120, 5,154,119, 26, 6,171,213, 14,177, 68,129, +218,245, 35,145,121,225,148,201,162,215,255, 90,153,204,210,112, 28,135,174, 93,187, 98,199,142, 29,248,245,215, 95, 97, 52, 26, +241,253,247,223,227,127,255,251, 31, 6, 12, 24,224,169, 3,112,121,211,166, 77,176, 90,173, 80,229,156, 64,147,223, 39, 99,132, +121, 19,222,144,237, 69, 56,147, 5,187,221,142, 19, 39, 78, 0,128, 71,101, 59, 13, 6,195,252, 25, 51,102,152, 11, 10, 10,202, +204, 1,144,203,229,248,244,211, 79,185, 54,109,218,180, 81, 42,149,243, 61,109, 35, 33,132,100,101,101,109,209,233,116,181, 39, + 78,156,200, 54,108,216, 16,153,153,153, 48, 24, 12, 32,132,232, 28, 14, 71, 35, 74,233,215,158, 56, 20,122,131,176,119,203,214, +189,214,126,143,117,114, 63,112, 58,182, 15, 71,173, 90,126,168,229,227,143,142, 29, 90,184,190, 19,131, 7,244,193,207,191, 30, +182,232,245,134,189, 85,136,253, 98,213,170, 85,162, 90,181,106, 65,175,215,151,233,213,188,251,238,187,160,148,130, 82,234,145, +241, 39,132, 8,233,233,233, 72, 73, 73,129, 94,175,183,159, 62,125, 26, 55,110,148, 76, 49, 33,224,169,136, 79, 66,157,176, 61, + 96,196, 60, 49, 23, 14,162,156, 34, 30, 18, 73,165,117,212,133,162,108,176, 12, 1,203, 16,216,236,127, 25,200,160,160, 32,104, + 52, 26, 72,165,210,106, 63,124, 75,247,202, 5, 65,184, 43,153, 28,199, 33, 47, 47, 15,122,189, 30,118,187,221,125,189, 0, 96, +251,246,237,240,247,247,135, 70,163,129, 90,173,134, 84, 42,205,185, 27,121,174, 8,128,107,243,114,255,177, 90,173, 88,186,116, + 41, 26, 54,108,232,254,109,216,108, 54, 80, 74,139, 47, 93,186,212,105,195,134, 13, 91,127,249,229, 23,234,154,180,232,197,115, + 42,156,108,167,211,233,166, 17, 66,118,125,242,201, 39,147, 9, 33, 29, 12, 6,131, 63,203,178,130, 76, 38,203,178, 88, 44,187, + 12, 6,195, 98, 74,233, 21,143,191,233,209,156, 28,236,171,119,184, 78,128,202,239, 64,226,133, 62,159,124,242, 9,242,243,243, +241,197, 23, 95, 0, 0, 83, 39, 64, 29, 11, 86,124, 24,143,102,229, 87, 38,198,102,199,119, 43, 82,241, 78,183,128,140,198, 13, +106,235, 96,101, 57, 24,180, 69, 48, 26, 77, 48,219, 1, 43,195,129, 11,110, 10,179, 85,192, 69, 45,176, 63, 7,217, 22, 71, 21, + 19, 0, 1,112, 14, 19,246,191,219, 29, 43,127,207, 68,131, 58, 26,140,237, 27,229, 30,247, 15,240,231,241, 92,159,246,168, 95, +199, 31, 67,250,118, 2,166,125, 93,169,172,228,228,228,221,219,183,111, 31, 57, 96,192, 0,204,154, 53, 11,241,241,241,160,148, +162,184,184,216,150,157,157,157,157,149,149,117,165, 36,105,197, 2, 74,105,165, 53, 16,108, 54,203,215, 73,199,246, 76,108,220, +182,107,147,134, 81, 79, 35,249,207, 88, 8, 86, 35,196,156,115, 56, 70, 44,145,162,110,163, 40,248, 6, 54, 68,193,141, 12, 36, +255,177, 47,211,102, 51,175,169, 72,222,237, 15, 85,158,231, 17, 22, 22,134,201,147, 39,227,224,193,131,120,246,217,103, 17, 19, + 19,131, 57,115,230,160, 89,179,102,224, 56,206,181,206,185, 50, 7,160,223,194,133, 11,231,172, 95,191,254,169,197, 35,163, 73, +175, 94,195, 16,209,251, 13,156, 90, 53, 5,133, 59,119, 98,213,111,251,168, 78,167,139, 5,240, 65,165, 23,174, 4, 74,233, 41, +153, 76,246,197,196,137, 19,223, 88,191,126,189,212,223,223,223, 61, 54,206, 48, 12,126,250,233, 39,121,243,230,205, 95, 17,137, + 68,199, 4, 65,216, 82,149,188, 97,195,134, 45,200,201,201,105,251,200, 35,143,136,215,173, 91,135,253,251,247, 35, 53, 53, 21, +118,187,221, 8,231,250,226, 74, 13, 96,105,204, 86, 97,209,188, 47,183,188,254,100,159, 54,254, 91, 86, 77,196,180,255,109,198, + 83, 3,187, 0,172, 12, 96,164,120,106,112, 31,204, 94,240, 35,222,157, 60, 26, 98,137, 28, 91,182,255,166, 53,155,173, 85,141, + 3, 88,247,237,219,135,147, 39, 79,226,243,207, 63, 23, 66, 66, 66,220,191,203,234, 70, 0,196, 98,241,188,117,235,214,189, 13, + 0, 12,195,196,110,221,186,117, 96,183,110,221, 74, 38,229, 9,153, 76,189, 86,107, 65, 68,188,227,218,169, 97,132, 66,204,212, +107,245, 19, 80, 88,225, 36, 84, 0,176, 23,102,187, 35, 0, 54, 59,117, 27, 72, 87, 79,189,186, 51,247,121,158,207, 9, 10, 10, + 42,179,164,227,139, 47,190,168,177, 76,158,231,225,231,119,167, 99,238, 50,218,213, 93,167, 95,153, 60,171, 29, 96, 9, 3,134, +193,223, 46, 2,224,233, 16,199, 63,140, 77, 19, 39, 78, 28,255,210, 75, 47,185,135, 0,214,172, 89,227,118, 4, 40,165,199, 0, + 12, 38,132,132, 93,185,114,229, 13, 0,103, 30,170,182,255, 48, 30,120, 57, 96,137,132,140,155, 48, 97,242,146,185,115,231,138, +115,114,114,176,117,235, 86,204,154, 53,203, 82, 84,148, 59,201,106,165, 85, 76, 38,116, 66, 8,105, 91, 87,134,221, 95,181,133, +175, 15, 79, 96, 22, 40,204,118,103,200, 95, 28,212, 24,118,177, 12,201, 23, 47,226,243,243,214,130, 2, 43,250, 84,181, 70,156, + 16, 66, 11,190, 26,228, 12,247,139,164,128,152, 43,245,190,212,190,146,191, 53,157, 95,168,244,161, 66, 8,145,107, 52,154,227, +241,241,241, 77, 21, 10, 5,218,183,111,127,227,250,245,235, 45,224, 44,216, 81,237, 11,238, 74, 4,244,196,184,105,126,140,200, + 1,131, 54, 31, 65, 13,203,142,151, 22,221,202,198,142,165, 51,243,116,133,183,122, 84,145, 8,200,182, 96,193, 2,209,185,115, +231,112,254,252,121,184,126, 88,149,109, 37, 19, 1,171,124,218,189,208,156,244,173,167,192,162, 78, 79,142,136,232,247,225,122, +108,155,241, 52,254,140,219,116, 49, 75,143, 73,107,207,211,221, 85,157,127, 91,155, 69, 82,169,116,142, 72, 36,122, 99,250,244, +233,124,116,116, 52,137,136,136, 64, 70, 70, 6,126,255,253,119, 58,115,230, 76, 51, 33,228,131,194,194,194,207, 43,146,241,202, + 43, 67,249,255, 56, 0, 0, 32, 0, 73, 68, 65, 84,175,136, 51, 50, 50,190, 47, 46, 46, 30, 92, 92, 92, 44, 42, 42, 42, 66, 65, + 65,129,205, 98,177, 24, 1, 56, 0, 76,164,148,174,171,142, 94, 37,186,245, 12, 12,168,181, 61,118,229, 4,121,235,230, 33, 80, + 40,212,127,205,252,103,164,208,155, 41,142,159, 78,193, 83, 35, 38, 26, 10, 10,139, 6,120,144, 8,232,142, 84,192, 64,197,227, +223,132, 16,143,141, 26, 33,164, 55,203,178, 91,237,118,251, 95,137,128,150,246,236, 64,175,252,254, 61,241,107, 50, 13,202,186, +123,240,218,111, 21, 58,221,132, 16,122,233,253,230,112,152,138,193, 16,130,199, 86,223,192,241,203,215,225,239,127,231,132,112, + 74,105,181,116, 43,253, 29,185,185,185, 53,146, 73, 8,161, 90,173, 22, 82,169, 20, 34,209,157,253,153,234,234,227,137,188,210, +240, 34,146, 99,178, 61,184, 76,128,132,144,151, 43,154, 4,104,177, 88,220,147, 1,195,194,194, 64, 41,173,188,167,130,146, 36, +104,142, 59, 3, 95,165, 39, 1,154, 76, 38, 52,110,220,248,129, 39, 60,114, 65, 8,105, 11, 96,101, 84, 84, 84,212, 43,175,188, +130,232,232,104,215,208,101, 62,165,244,161, 77, 78,252, 55,240,192, 29, 0, 66, 72,109,181, 90,189,187,184,184,184, 37, 74,150, +151, 73, 36,146, 68,171,213,218,151, 82, 90,101,120,174,148,156,182, 62, 18,108, 26, 92, 15,117, 91,249,128,215, 72,156, 14, 64, +166, 17, 56, 83, 8,243,161, 91,200,214,217, 48,220,147, 4, 49, 74, 94,114,217,102,183, 7, 3,228,182,233,110,229,220,239,132, + 64, 44, 22, 93,211,233,141, 97, 85,232,215,176,121,243,230,103,226,227,227, 85,115,231,206,197, 39,159,124, 18, 77, 41,253,211, +211,246,149, 35,207,153, 10,184, 99,159,122,161, 45,163,101,190, 65, 33,160, 14, 7,242,175, 95, 69,198,249, 19,198,164,248,223, + 50, 77,218,194, 42, 83, 1,115, 28,151, 97,181, 90,171,149,202,216,227,204,108, 19, 72, 61, 72,240,212, 77, 29, 70,167, 22,161, +110,152, 15,178, 2, 20,248, 22, 20, 63, 98, 1,189, 86,157,239,116, 65, 8,105,171, 86,171,167, 18, 66, 58,232,116,186,122,114, +185,252, 22,195, 48, 39,139,138,138,166, 87,149, 3,188, 99,199,142,210,162,162,162,147,197,197,197, 98,173, 86,107,210,235,245, +121, 0, 14,192,153,208,228, 24,165,212, 88, 19,157, 74,244,234, 41,151,241, 27,135,244,235,160, 26,220,191, 43,215,186,101, 83, +128,229,145,112,254, 42,126,222,126,200,178,101,251, 30,173,193, 96,124,186, 42,227, 95,129,236, 95, 1,244,163,148,150, 27, 1, +168,129, 81,123,148,101,217,183, 5, 65,112,166, 2, 94,254,104, 93, 56, 72, 16, 24,123, 46,198, 29,184, 90,217,185, 82, 17,115, +211,108,167,101,122,235,247,210,224,150,156, 83, 99, 35, 78, 8, 49, 0,168,108,217,161,142, 82, 90,233, 42,135,219,228,217, 80, +249, 26,122, 43,165,180,242,101, 24,247,145,106, 44, 3, 52, 89,173,214, 42,157, 91,153, 76,118,211,100, 50, 85,153,120,137,227, +184, 28,179,217,252,160, 83, 30,151,129, 16, 18, 13,224,219,182,109,219, 70,190,246,218,107,120,233,165,151,188, 14,192, 93,242, +192, 29, 0,247, 23, 19, 50, 3,192, 71, 0,102, 82, 74,103,212, 80, 6, 39, 23, 97, 2,199,226, 49, 7, 69, 19, 10, 16, 80, 92, + 54,217,177,219,234,192,226,170,194,235,247, 27, 66, 72,231,224,224,224,175,243,242,242, 46,155, 76,166,161,119,155,179,158,148, + 20, 3,226, 20,138, 39,237,118,161, 53,113, 22, 3, 74,168,110, 49,160,251,198, 76, 34,130, 14,173,224,128,194,189,143,162, 24, +118, 36, 99,201,195,253, 95,220, 15, 8, 33, 42, 94, 34,153,164, 80,240,189, 93, 75,253,228, 10,217, 89,189,222,176,215,108,182, + 46,170, 34,251, 95, 85,178, 43, 12, 22,213,196,200,222, 43, 8, 33, 22, 84,158,108, 69,160,148,138,171, 41, 83, 11, 64, 89,201, + 33, 70, 74,233, 29,203, 63,189,252, 55, 33,132,116, 7,176, 12,192, 33, 74,233,184,135,172,206, 63,154,135,230, 0,120,241,226, +165, 98, 56,142, 43,146, 74,165,229, 26, 90,147,201,100,181, 88, 44, 21, 37,198,241,226,197,139, 23,143,240, 58, 0, 94,188,252, + 13, 33,132, 40, 1, 84,212,235, 53, 80, 74, 43, 93,186,231,197,139, 23, 47, 85,225,117, 0,188,120,241,226,197,139,151,255, 32, +213, 91,191,227,197,139, 23, 47, 94,188,120,249, 87,224,117, 0,188,120,241,226,197,139,151,255, 32, 94, 7,192,139, 23, 47, 94, +188,120,249, 15,226,117, 0,188,120,241,226,197,139,151,255, 32,149, 37,188,240,242, 47,135, 16, 34, 18,137, 68, 35,229,114,249, + 0, 65, 16, 90, 1,160, 44,203,158, 49, 26,141,191, 8,130,240,240,243, 10,252,141,233,219,183,175,220, 98,177,188, 38, 8, 66, + 71,187,221,222, 94, 16, 4, 8,130,112,194,102,179, 29, 99, 89,118,233,217,179,103, 13, 15, 91,199,251,193, 87,219,226, 95,161, +132,188, 6,128, 3,104, 49,236,116,225,107,131, 59,110,124,216,122,121,241,226,165,250,120, 87, 1, 60, 0, 8, 33,245, 1,140, + 84, 40, 20,109,245,122,253, 41, 0,107, 40,165, 15,181,114, 5, 33,164,149, 92, 46,223,220,186,117,235,122, 17, 17, 17, 50, 87, +253,117,157, 78,135,196,196, 68,227,217,179,103, 51, 13, 6, 67,149,153, 5,255,139,244,234,213,171,139, 32, 8,107, 4, 65,104, + 88, 98,248,203,108, 50,153,236,170,175,175,239,203,123,247,238,173,170, 8,208, 63, 2, 78, 68,110, 90,237,168,221,161,207, 32, + 68,247, 25,140,145,253,187,161,117, 88, 8, 18, 46,103, 96,205, 47,135,112,116,199,102,156, 60,176, 3, 18, 22, 57, 22,129, 86, +153, 45,142,231,249,155, 22,139,165,194,236,115, 30,103,158,244,242,159,130, 16,194,116,235,214,237, 25, 65, 16,166, 21, 23, 23, +135,168, 84,170, 43, 90,173,246,131,243,231,207,111,173, 73,138,117, 47, 94, 7,224,190, 67, 8,169,223,187,119,239,243,243,231, +207, 87,182,108,217, 18,241,241,241,120,243,205, 55,181,199,143, 31,111,241,176,156, 0, 66, 72, 11,181, 90,189,127,228,200,145, +126,253,251,247,135, 68, 34, 65,110,110, 46, 68, 34, 17,172, 86, 43,146,147,147,113,236,216, 49, 28, 59,118,172, 64,171,213,118, +243, 58, 1,127,209,171, 87,175, 46, 54,155,237,160, 32, 8,140,203,224,219,237,246, 50, 14,128, 82,169, 68,104,104,168, 67,165, + 82,253,223,119,223,125,183,173,186,223, 33, 18,137,110,218,237,246,218, 0, 32, 22,139,115,172, 86,235,195, 78,193, 74, 77,185, +153,248,250,240, 85,244,143,105,134, 6,129, 26,247,103, 87,178,111, 97,199,238,221,120,204,188, 7, 77, 94, 91,239, 81,134, 66, + 66, 8, 77, 74, 74,114,151, 3,118,149, 6,118,253, 29, 20, 20,244,208, 50, 29,254, 27, 32,132,180, 6, 16, 2, 32,155, 82,122, +242, 46,101, 49, 0, 62,143,140,140,252,191,228,228,228, 79, 41,165, 75,239,137,146,213,160,107,215,174,205,164, 82,233,220,236, +236,236,158,189,123,247,150,191,248,226,139,136,136,136, 64,114,114, 50, 86,175, 94, 77,247,237,219,103, 82, 42,149, 59,147,146, +146,222,209,106,181,233, 15, 90,191,127, 50,149, 58, 0,132, 16, 51, 0, 14,128,148, 82,106,190,171, 47,114,202,114, 35, 22,139, +221,149,191,164, 82, 41,174, 94,189,250, 19,128,103, 61,149, 39, 18,137,210, 25,134,161, 0,142,216,108,182,131, 0, 54,220,173, +142,247, 3,145, 72,180, 32, 45, 45,237,173, 95,126,249, 5,107,214,172,193, 11, 47,188,128, 6, 13, 26, 96,192,128, 1, 11, 40, +165, 83, 30,180, 62,132, 16,177, 92, 46, 79,126,241,197, 23, 27,201,100, 50,180,104,209, 2,117,235,214,117, 23, 17,185,112,225, + 2,206,158, 61,139,220,220, 92,104,181, 90, 92,185,114,229,170,209,104,108,242,111, 25, 14, 32,132, 4,137,197,226,197, 74,165, +178,167,195,225,128, 78,167, 59, 96,183,219, 39, 81, 74,179,170, 58,183,111,223,190,114,147,201,148,104,183,219,221, 61,127, 0, + 8, 15, 15,135, 78,167,195,197,139, 23, 97,181, 90, 97,183,219,209,176, 97, 67,180,111,223, 62,151,231,249,200, 57,115,230, 84, + 90,225,178, 28, 29,105, 81, 81, 17, 28, 14, 7, 52, 26,205, 67, 55,134,132, 16,106,213,230,225,135, 89,163,113,201,175, 39,236, + 44,239,220, 15, 64,226, 48,163, 85,193, 30,180,240,165, 8,127,123,167,199, 14,192,197,139, 23,203, 24,253,210,239, 3, 3, 3, + 31,122,155,255,169, 16, 66, 30, 1, 0, 74,233,113, 66,200, 64, 0,191, 82, 74,237, 53,148,197, 0, 88, 53,111,222,188, 81,111, + 78,154,132,136,200,200,162,180,180, 52,205,131,236,109,199,196,196,236,243,245,245,237, 54,122,244,104,246,241,199, 31,135, 72, + 36,130, 32, 8,176,217,108, 46, 29, 65, 41, 69, 92, 92, 28, 86,173, 90,101,191,126,253,250,222,115,231,206, 61,254,160,244,251, +167,227,233, 28, 0,147, 88, 44,134, 32, 8,119,227, 8,184, 11,104,136, 68,162, 50,198,159,231,249,106, 11,179,219,237, 13,118, +236,216,129,249,243,231, 55, 76, 79, 79, 31,114,253,250,245,217,132,144,231, 40,165, 7,107,168,223,125,197,225,112,192,110,183, +195,104, 52, 66,167,123,120, 73,220, 68, 34,209,203, 81, 81, 81,161,174,107,206,178, 44,180, 90, 45, 76, 38, 19,140, 70, 35, 18, + 18, 18,192, 48, 12,120,158, 71,126,126, 62,106,213,170, 85,223,106,181,142, 4,176,234,161, 41, 93, 10, 66, 72, 61, 0, 63, 3, +184, 74, 41,125,170,154,231, 6,105, 52,154,164,208,208, 80,181,195,225,128,197, 98,129, 90,173, 30, 98,183,219,251,198,196,196, + 68,197,199,199,167, 86,118,190,201,100,122,173,116,216,191, 67,135, 14,232,210,165, 11,110,221,186,149,115,227,198, 13,129,227, +184,186,137,137,137, 40, 46, 46, 70, 82, 82, 18,218,183,111,239, 47, 22,139, 63, 3, 48,170,186,237, 84,171,213,136,141,141,173, +238,105,247, 13, 75, 65, 22,194,138,227, 17,161,253, 3,255, 59,162, 69,190,209, 1, 7, 5, 4, 7, 16,231,160,160,140, 51,253, + 63, 33,132, 2, 48, 81, 74, 43, 43,208, 3,134, 97,220,219,143, 63,254,136,196,196, 68, 56, 28, 14,184, 42,211,149,200,113, 81, + 76, 41,245,166, 62,174,130,210,198,191,100,215, 5, 0,157, 1, 28,170,129, 44, 6,192,170,185,115,231,142,122,115,210, 36,104, +181, 90, 60,251,204, 51,181,102,127,252,241, 60, 0, 83,239,153,210, 85,144,159,159,223,228,216,177, 99,172,203,217, 54,153, 76, +176,217,108,112, 56, 28, 32,132,184,203, 70,235,116, 58,100,101,101,177, 55,110,220,104,245,160,116,251, 55,224,145, 3,192,178, +172,203, 96,155, 66, 66, 66,144,145,145, 81, 19,239, 92, 10,192, 36, 18,137,202, 24,126,158,231,113,225,194,133,205,168, 70,239, +223, 69,223,190,125,145,144,144, 0,149, 74, 37, 79, 73, 73,145,127,251,237,183, 59,100, 50,217, 60,163,209, 56,179, 6,250,221, + 23,236,118,251,226,177, 99,199,142,157, 53,107,150,242,197, 23, 95,196,217,179,103,241,234,171,175,234, 1, 44,169,169, 76, 66, + 72,103, 0, 95, 1, 48, 1,152, 76, 41, 61,226,233,185, 62, 62, 62, 79,215,173, 91,151, 13, 8, 8, 64,211,166, 77, 97, 54,155, +161,211,233,220, 17,128,168,168, 40,228,229,229, 33, 52, 52, 20,133,133,133, 32,132, 48,122,189,254, 73,252, 13, 28, 0, 66, 72, + 19, 0,123,225, 12,111, 86,187,146,159, 88, 44, 94, 28, 28, 28,172,182,217,108,176, 88, 44,238,173, 89,179,102,138,134, 13, 27, +174, 5,208,177,178,243, 5, 65,232,104,179,217, 32, 8, 2, 24,134, 65,207,158, 61,145,147,147,243,246,164, 73,147, 62, 3,128, +199, 30,123,108,184,217,108,222,224,114, 16, 50, 50, 50,208,171, 87,175,104, 79,116, 43, 29,246, 87,169, 84,102, 74, 41,175,209, +104,224,235,235,107,118, 25, 67, 79,199,198, 75, 38,119, 94, 23, 4,225,206,250,186,165,144,201,100,153, 6,131, 33,196, 19,253, + 44,249, 89, 96, 25, 6, 12, 1,114,245, 14,204,219,120,192,237,196,223,238,204,115, 28, 87,101,181,186,210, 14, 64, 66, 66, 2, +198,143, 31,239,150, 51,103,206,156,219,229,169, 61,209,241,191,204,109, 61,127, 5,128, 8, 0,137,168,129, 3,224, 50,254,159, +126,250,233,168,183,222,124, 19, 71,143, 30,197,190,125,251, 48,112,192, 0, 44, 94,178,164,210,223,200,253,192,106,181, 2, 0, +244,122, 61,204,230,191,250,159, 54,155, 13,191,253,246, 27, 54,109,218, 4, 95, 95, 95,140, 31, 63, 30, 51,103,206,252,219, 69, +129, 31, 6, 23,134,145,114,163, 52,205, 54,151,141,172, 85,233, 0,176, 44,235,254, 49,186,182,168,168, 40, 42,149, 74,113,236, +216,177, 13,240,208,112, 83, 74,205, 98,177,184,140,225,119,189,103, 89,182, 70, 33, 42, 0,208,104, 52, 80, 42,149,232,213,171, + 23, 30,125,244, 81,217, 51,207, 60, 51,149, 16, 18,119, 55,165,119,239, 37,148,210, 76, 66, 72,243,189,123,247,110, 75, 73, 73, +105,109, 52, 26,145,148,148,116, 24,192,205,187, 16,187, 0, 64,139,146,247, 95, 1,104,233,233,137, 86,171,181,105, 96, 96, 32, +194,195,195, 97, 48, 24,220,134,223,104, 52, 98,223,190,125,200,206,206,134,201,100,130,213,106, 69, 76, 76, 12, 2, 3, 3,241, +205, 55,223,180,185, 11, 93,171, 77,201, 3,108, 56,128,109,148,210,188,146,125,145,112,150,242,173, 13,224, 79, 0,255, 87, 93, +185, 50,153,172,231,237,198,223, 98,177, 32, 47, 47, 15,163, 71,143,174,178,141, 54,155,205, 53,219, 31, 81, 81, 81, 40, 40, 40, +200,125,253,245,215, 63, 3, 64, 1, 32, 46, 46,110,163, 70,163,153, 46, 8, 66,164, 32, 8,184,113,227, 6, 26, 53,106, 20,234, +137,110,118,187,189,118,113,113, 49, 84, 42, 21, 28, 14, 7, 95, 92, 92, 12,141, 70,131,227,199,143,243,106,181, 26,106,181, 26, + 98,177,184,202,178,173, 37,136, 8, 33, 26,189, 94, 15,185, 92,238,126,112,186,194,166,174,146,187,117,234,212, 9,242, 80, 30, +108,133,217, 96, 25, 2, 66, 0,155,131,130,227, 56,180,105,115,231, 37,243, 52, 58, 92,218, 1, 16, 4,225,174,229,253,151,185, +205,248,251, 82, 74,243, 9, 33, 44,128,103, 0, 36, 84, 83, 22, 3, 96,213,252,249,243, 71, 77,156, 48, 1,199,142, 29, 67,253, +250,245,145,158,158,142,110, 61,122,164, 25, 12,134,217,247,161, 9, 21, 66, 41,133,217,108,134,221,110,135, 94,175,135,197, 98, +129,217,108, 70, 90, 90, 26,226,226,226,224,235,235,139,151, 94,122, 9, 34,145, 8, 22,139,197,123,191,148,112,187,161,175,136, + 74, 29, 0, 87, 40,184,162,173,186, 8,130, 32,229,121,222, 84,218, 9, 56,117,234, 84,141,122,255, 46,124,124,124,160, 82,169, +220,219,130, 5, 11,100,147, 38, 77,138, 37,132, 52,121,216,229,128, 93,148, 56, 1, 51,190,253,246,219,173, 31,126,248, 33,150, + 46, 93,250,248,228,201,147,143, 16, 66, 94,160,148, 94,172,129,200,210, 61, 44, 83,117, 78, 20, 4,193,108,179,217,144,149,149, +133,107,215,174,185,255, 15, 46, 39,192, 96, 48,192,108, 54,195,100, 50, 33, 53, 53, 21,245,235,215,175,129,122,119,205,112, 56, + 35, 14, 83, 8, 33, 61, 0,220, 2,240, 29,156,198, 63, 14,192, 80, 74,105,181,151,217,185,134, 96,110,119, 0,148, 74, 37,218, +180,105, 83,165, 51,236,234,253, 11,130, 0,163,209,136,220,220,220, 59, 28, 87,215, 49,118,187, 29, 44,203,194,223,223,159,245, + 84,191,180,180, 52,100,101,101, 65,173, 86,163, 86,173, 90,208,104, 52,112, 25,255,234,226,112, 56,144,154,154,138,140,140, 12, + 40,149, 74, 40,149, 74, 40, 20, 10, 40,149, 74,112, 28, 7,177,184, 90, 21,123, 75, 57, 0, 4, 86, 59,192,243, 60,210,210,210, +202, 68, 0,170,243, 76,184,221, 1,184, 91,121,255, 37, 8, 33, 26, 0, 29, 0,119,217,237,140, 18,227,223, 24, 64, 27, 66, 72, + 33,156,207,136, 67,148,210,171, 30,200,235,193, 48,204,228,230,205,155, 71, 49, 12, 83, 52,127,254,252,166,175,191,246, 26,230, +205,155,135,105,211,167,167, 62,243,244,211,141, 83, 83, 83,109, 6,131,161, 31,165,244,210,125,107, 88, 57, 80, 74, 97, 50,153, +220,134,223,181,241, 60,143,254,253,251,195, 53,148,231,218,239,117, 0,202,226,138, 4, 84,228, 16, 84,250,208,171,200,240,199, +199,199,111, 40, 57,100, 75,117,148,161,148,154,235,215,175, 95, 38,100,120, 55,189,127,224, 78, 7,224,217,103,159, 37, 95,125, +245,149, 42, 33, 33,161, 39,128, 93,119, 35,251, 94, 66, 41,221, 70, 8, 89, 99, 50,153, 70,190,251,238,187,104,217,178,101,251, +241,227,199,159, 32,132,180,166,148,166, 85, 83,220,120, 56,163, 0, 82, 0,147,171,115, 34,195, 48,167,109, 54, 91,208,153, 51, +103,144,158,158, 14,179,217,140,182,109,219, 66,165, 82,161,125,251,246, 96, 24, 6,103,206,156,129,217,108, 70,211,166, 77,113, +235,214, 45,136, 68,162,211,213,212,239,110,217, 10, 96, 34,156, 81,142, 3, 0,214, 3,104, 15, 32, 11,192,176,154, 24,127, 0, + 48, 26,141,251,101, 50,217,208,162,162, 34,183,241,119, 56, 28,152, 60,121, 50,178,178,178,110,132,135,135, 87,122,190, 32, 8, + 39, 4, 65, 24, 40, 8, 2,206,156, 57, 3, 63, 63,191,192, 17, 35, 70, 60,255,253,247,223,175, 5, 0,181, 90,221,207,213,251, + 23, 4, 1,109,218,180, 65,113,113,113,158, 39,186,137,197,226,156, 54,109,218,212, 6, 0, 95, 95, 95,115, 66, 66, 2,175, 86, +171,209,164, 73, 19,115, 78, 78, 14, 15, 56,135, 0, 60,108,170,192, 48, 76, 65,235,214,173,171, 26, 2,184,238,161, 60, 8,133, + 89,110, 7,192, 21, 1,104,212,168,209, 29,199,221, 77, 4,224,110,228,253, 87, 32,132,248, 1,232, 4,103, 20, 44, 7,128,154, + 82, 90, 84, 98,252, 27, 2,248, 17, 78, 71,153, 80, 74,171,252,255, 18, 66,122, 60,246,216, 99,123,151, 45, 91,198,134,134,134, + 34, 47, 47, 47, 72,165, 84, 98,254,252,249,248,112,218,180,213, 0,198,252,176, 97, 67, 27, 0,186, 7,109,252,129,191, 34, 0, +174,205,101,236, 25,134,129,213,106,117,255,237,122,245,222, 47,127,113, 97, 24,161, 46,195, 95,250,125,105, 42,205, 4, 88,186, +167,206,243, 60, 78,159, 62,189,249,143, 63,254,112,133,253,159, 69, 53, 29, 0, 0,200,204,204, 36, 46,185, 37,142, 68,141,123, +255,128,211, 1, 40,189,201,100, 50,244,235,215, 79, 33,145, 72,122,221,141,220,187,133, 16,210,149, 16,178,138, 16,226, 30, 51, +163,148,142, 90,180,104,209,148, 65,131, 6,217, 68, 34, 17,102,204,152,161, 64, 13, 38,212, 80, 74,143, 80, 74, 59, 80, 74, 91, + 86,103,252, 31, 0, 76, 38, 83,220,133, 11, 23,140, 26,141, 6, 70,163, 17,102,179, 25, 74,165, 18,128,211,225,107,223,190, 61, +140, 70, 35, 68, 34, 17,130,131,131,145,154,154,106, 50, 26,141,191, 86, 87,199,187,129, 82,154, 15,224, 81, 0,231,224, 28,203, +156, 85,242,209,107,119, 83, 6, 55, 60, 60,124,114,139, 22, 45,140,131, 6, 13, 66,203,150, 45,209,179,103, 79,236,220,185, 19, +221,187,119,167,103,206,156,169,114, 66,161, 32, 8,199,108, 54, 27,108, 54, 27,204,102, 51,142, 29, 59,134,228,228,228,239,252, +252,252,146, 21, 10, 69,146,197, 98,249,213, 21, 1, 16,137, 68, 24, 62,124, 56,242,243,243, 61, 90, 66,105,181, 90, 3, 41,165, +132, 82, 74,242,243,243,121, 31, 31, 31, 40, 20, 10,228,228,228,240,174,253,158,174,141,167,148, 10, 86,171, 53,192,117, 94, 69, +155,167,227,255, 0, 96, 47,114, 70, 0, 88,198, 25, 1,224, 56, 14,121,121,121,208,235,245,176,219,237,160,148,122,252,240,229, +121, 62,167,126,253,250,168, 91,183, 46, 2, 3, 3,177,117,235,214,187,146,247, 31,163, 13,128,147, 0, 44, 0,122, 0,144, 17, + 66, 36,112, 70, 4,126,163,148, 58, 40,165, 55, 60, 49,254, 0,192, 48,204,228,101,203,150,177, 70,163, 17, 47,191,252, 50,178, +174, 93,195,213,171, 87,241,209,140, 25, 73, 0,198,148,200, 59,249, 48,140, 63,224,140,100,153, 76, 38,183, 3, 96, 50,153,238, +248,219,229,200,155, 76, 38,239, 61, 83, 77, 42,117, 0, 56,142, 3,207,243, 72, 74, 74,218,156,152,152,184,129,101,217,225,184, + 75,131, 13,192, 29, 1,184, 91,204,102, 51, 52, 26, 13, 52, 26, 13,124,124,124,192,113,206,133, 6, 93,187,118,101,101, 50,217, + 67, 93, 10, 18, 26, 26,186,241,210,165, 75,163,195,194,194,126, 37,132,184, 87, 64, 80, 74, 23,252,241,199, 31,253,191,252,242, + 75, 68, 68, 68,160, 97,195,134, 3, 31,164, 94,130, 32,124,157,144,144,144, 93, 92, 92,140, 38, 77,154,192, 98,177,184, 39,217, + 0,128, 68, 34, 65,195,134, 13,209,182,109, 91,228,230,230, 34, 49, 49, 49, 83, 16,132, 53, 15, 82, 71, 0,160,148,230,194,233, + 4,100,193,121,159,158,166,148,110,191, 27,153, 73, 73, 73,153, 26,141,166, 93,187,118,237, 46,124,251,237,183,246,141, 27, 55, + 82,137, 68,146,181,122,245,234,142, 83,166, 76,249,163,170,243,139,138,138,150,114, 28,119, 69,161, 80, 64, 16, 4,100,103,103, + 35, 45, 45, 13, 38,147, 41,194,102,179, 69,186, 66,255, 0, 48,101,202, 20,132,134,134, 10, 57, 57, 57, 47,214, 68, 87,153,172, +210, 73,244, 15, 28,123, 97, 54, 24,183, 3, 64,193,243, 60,252,252,252,160, 80, 40,192,178, 44, 8,113, 70, 7, 60,193,100, 50, + 5,150,118, 68, 0,220,149,188,255, 24,114, 74,105, 54,128,166, 0, 26, 3,136,162,148, 90,225,236,161, 59,170, 43,172,121,243, +230, 81,161,161,161, 88,188,120, 49, 86,174, 92,153,191, 96,193, 2,176, 44,139, 70, 13, 27,170,107, 34,239, 94,227,138, 0,148, +103,248, 93, 61,127,192, 57, 81,208, 27, 1,168, 62, 85, 37, 2,250,161,228,245,174,141,126, 5,114,183,160, 6, 81, 4,160,234, +108, 98,114,185, 60, 93,175,215,223, 25, 83,124, 64,248,251,251, 95, 74, 74, 74, 10, 91,190,124, 57,166, 79,159,190, 10,192,247, +112, 78,200,105, 13, 96,196,148, 41, 83,198, 60,253,244,211,232,213,171,215,165,194,194,194,136, 7,169,155, 43, 17,208,176, 97, +195,252, 8, 33,208,106,181,104,208,160, 65,153, 99,242,243,243,177,113,227,198, 60,173, 86,219,227, 97, 38, 2, 34,132, 4, 2, +152, 9, 96, 6,165,244,198,195,210,195, 69,167, 78,157,122,171, 84,170,184,130,130, 2,230,210,165, 75,101,230, 5, 56, 28, 14, +136, 68, 34, 76,153, 50, 5,179,103,207,198,186,117,235,166,142, 26, 53,234,179,234,126,135, 84, 42,189,105, 54,155,107, 3,127, +143,172,120,188,136,220,180,216, 81,230,183,166,213,106, 33,149, 74,221, 19, 10, 75, 83,178, 54,219, 99,235, 77, 8,161,247, 82, +222,191, 25, 66, 72, 31, 56,151,247, 25, 1, 68, 1,184, 8,160, 0,192,227,148,210,159,171, 43,143,101,217, 95,211,210,210,250, + 21, 21, 22, 98,225,194,133, 24, 49, 98, 4, 4,155, 13, 3, 6, 13,218, 97,183,219,159,188,183,218, 87, 31,165, 82,185,189, 75, +151, 46, 77,198,141, 27, 23, 33, 22,139,239, 24, 10, 16,137, 68, 48, 26,141,184,126,253,186, 99,235,214,173, 23,211,211,211, 83, +173, 86,235, 3,237, 84,253, 93,241,100, 37,128, 55, 19,224,125,130, 16,242,209,151, 95,126, 57,163,127,255,254,248,253,247,223, +113,228,200, 17, 92,184,112, 1,225,225,225,104,215,174, 29,218,182,109,139, 93,187,118,225,163,143, 62,154, 65, 41,125,224,203, + 22, 93,169,128, 91,181,106, 85, 47, 44, 44, 76, 22, 16, 16, 0, 74, 41,114,114,114,144,154,154,234, 77, 5, 92, 9,195,135, 15, + 31,224,239,239,191,146, 16, 18,144,153,153,137,155, 55,111,186,103,177, 15, 27, 54, 12, 13, 26, 52, 16,226,226,226,222,171,137, +241,255, 39, 64, 8,177, 0,144, 84,114,136, 64, 41,245,120,150, 33, 33, 68, 11, 64, 89,201, 33, 70, 74,169,220, 83,121,255,102, + 74,230, 0,116, 4, 16, 79, 41,205, 37,132,168, 0, 60, 2, 32,213,147, 9,127,229,200,235,209,167, 79,159,189,159,204,153,195, +170,213,106, 92,186,120, 17,179, 62,254,216,126,252,248,241,222,148,210, 3,247, 88,253, 26, 65, 8, 25, 40,151,203,103,245,235, +215, 79,241,228,147, 79, 54, 20, 4,193,237, 4,232,245,122,236,222,189,251,242,241,227,199,205, 86,171,117,218,221, 70, 9,255, +107,120, 29,128,251, 4, 33,132, 19,139,197, 91,222,120,227,141,126, 61,122,244, 64, 72, 72, 8,236,118, 59,108, 54, 27, 82, 82, + 82,112,232,208, 33,172, 94,189,122,135,205,102, 27,242,176, 86, 43,184,138, 1,201,100,178, 39, 5, 65,104, 77, 8,161, 44,203, + 38,120,139, 1, 85,205,216,177, 99, 53,254,254,254,159,213,169, 83, 39, 58, 44, 44,172,129,159,159, 31,163,211,233,242, 10, 10, + 10, 46,228,228,228,188,248,234,171,175, 62,244,104,133,151,127, 39,132,144, 0, 56,141,190, 4,206, 37,168,103, 41,165, 53, 78, +129,235, 90, 5,208,184, 81,163,214, 41,169,169,103, 40,165, 11,255, 46,198,223, 5, 33, 68, 4,224,101,165, 82,249,198,255,253, +223,255,169, 91,182,108, 89,231,232,209,163,215,118,237,218,165, 55,153, 76, 75, 0,172,242, 62,175, 42,167,188,137,128, 94, 7, +224, 62, 82,178,166,118, 16,128,199,125,125,125,123,135,134,134,134, 92,185,114, 37,163,160,160, 96, 47,156, 43, 20,182,254, 29, +198,217,188,120,241,226,229,159, 0, 33, 68,201, 48,204,251, 28,199, 61,105, 50,153,126, 6, 48,143, 82,170,127,216,122,253, 83, +241, 58, 0, 15, 16, 66,136,164,100,194,142, 23, 47, 94,188,120,241,114,223,168,104,233, 95,105,188, 14,128, 23, 47, 94,188,120, +241,242, 47,194,211, 84,192, 94, 7,192,139, 23, 47, 94,188,120,249,151,225,141, 0,120,241,226,197,139, 23, 47, 94,202,197,211, +114,192, 94,188,120,241,226,197,139,151,127, 16, 23,134, 17,119,117,196,102,155,233, 29,197, 53,254, 49, 17,128,215, 95,127,189, +140,162, 5, 5, 5, 80,171,213, 72, 79,191,115,245, 11, 33, 4,141, 27, 55,190, 99,255,151, 95,126,233, 14,135,148,150,231,112, + 56,112,250,244,105, 68, 70, 70, 98,205,154, 53,119,156,199,178, 44,198,141, 27,231,177,188,154,242, 32,229,253,221,174,223,109, +223, 47,138,140,140, 60,216,161, 67,135, 78,229,201, 99, 24,198,110,183,219, 31,138,243, 74, 8, 97,194,194,194,134,117,236,216, + 81, 85,158,110, 18,137,132, 90, 44,150,149,213,148, 41, 10, 11, 11, 75,238,216,177, 99,227,242,100, 2,176, 83, 74,189,206,186, +151,127, 20, 37,171,160,194, 0,180, 45,217,117, 10,192,101,239,202,167, 7,195,133, 97,196, 44,151,163,150,235,111,131, 1, 69, +183, 59, 1, 21, 62, 84, 8, 33,117, 20, 74,213, 68,137, 68,210, 77,161, 80, 4, 27, 12,250,235,118,193,254,123, 81, 81,225, 23, +148,210,140,187, 85,142, 16,162,208,168,196,171, 10,180,182, 23,170, 59, 51,190,160,160, 0,157, 58,117,194,149, 43, 87,208,173, + 91, 55,176, 44, 11,134, 97,220,175,187,118,121, 94, 3,200,225,112,224,212,169, 83,216,188,121, 51,214,172, 89,131, 29, 59,118, +184, 83, 32,115, 28, 7,142,227,208,178,165,199,213,118,203, 80, 84, 84, 4,185, 92,142,171, 87,175, 86,120,140, 88, 44, 70,104, +104,168, 71,122, 38, 39, 39, 35, 48, 48, 16, 27, 55,110,172,240, 56, 31, 31, 31, 60,251,108,229,137, 27,255,206,215,175,196,248, + 31,222,181,107, 87,116, 37,242, 60,174,176,119, 47, 41, 49,254, 67,246,238,221,171, 90,189,122, 53,214,175, 95,127, 71,161,172, +206,157, 59, 87, 43, 99, 93,137,241, 79,216,179,103, 79,227, 53,107,214, 96,247,238,221,119,200, 12, 15, 15,191,167,237, 37,132, +116, 14,111, 80,247, 59,106,183, 27, 47,103,222,124,143, 82, 90,173, 90, 15, 37,213,232, 90, 3,104, 4, 32, 29, 64, 66, 73,253, +134,154,234,163, 6,208, 10, 64, 56,128, 12, 0,103, 74, 82, 65,215, 84,158, 79,137,126,141,239, 70, 63, 66, 72, 59,158,231,167, + 18, 66, 58, 88, 44,150,186, 60,207,103, 81, 74,255, 48,153, 76,255,163,148, 86,171,204,238,189, 64, 44, 22,223, 20, 4,193,211, +146,208,110, 56,142,203, 49,155,205, 30,103,147, 44,249,127,140,133, 51,215, 0, 0, 28, 7,176,146, 82, 90,236,169, 12,134, 97, + 70,114, 28,247,101,235,214,173,153, 94,189,122,193,102,179, 97,239,222,189, 72, 78, 78,118,176, 44,251,186,221,110, 95, 83,173, + 70,120,169, 17,161,171,169, 59, 2,112, 97,216,157,143,166,114, 29, 0,158,231,199,180,127,228,145, 79,191,250,106,185,111, 72, + 72, 8, 88,150,129, 78,111,168,123,241,226,197,246,211, 62,252,224, 69,149, 74,245,137, 78,167, 91, 68,239, 34,124, 80,187,150, +120, 86,144,159,108, 48, 33,166, 41, 0, 62,241,244, 60,151,241,146,203,157,137,193, 88,150,189,195,128, 17, 66,144,146,146, 82, + 97, 79,182, 52,167, 79,159,198,230,205,155, 17, 18, 18,226,106,123, 25, 99,195,113, 28, 68, 34, 17,150, 46, 93, 90, 97, 79,182, + 60,138,138,138, 16, 19, 19,131, 43, 87,174,160,119,239,222,224, 56, 14, 18,137, 4, 98,177, 24, 12,243, 87, 9,134,141, 27, 55, +130, 82, 90,105,222,115,135,195,129, 11, 23, 46, 96,227,198,141, 88,178,100, 9, 78,158, 60,233, 46, 19,171, 82,169, 32,145,252, +149,148,173,180,236,242,184,253,250, 89,173, 86, 56, 28, 14, 56, 28, 14, 80, 74, 17, 24, 24,120, 87,215, 47, 63, 63, 31,130, 32, +192, 85, 52,167, 79,159, 62,213,186,126,145,145,145, 7,119,237,218, 21,237,146,247,248,213,207, 0,171, 17,176, 25, 1,155, 9, +169, 79,237,132, 72, 36, 2, 33,132, 62,232, 72, 64, 68, 68,196,192,184,184, 56, 31, 87,137,228,123, 81, 34, 59, 34, 34,226, 88, + 92, 92, 92,179,219,239,191,187,145, 89, 25,132,144,218,237, 91,183,216,181,123,195,114,133, 33, 59, 25,157,159,122,245,135,146, +178,212, 91,203, 59, 94,169, 84, 94, 54,153, 76, 13, 0, 64, 34,145,228,153, 76,166,247, 20, 10, 5, 29, 56,112, 96, 86,147, 38, + 77,178, 83, 82, 82,176,109,219,182,254,196,121, 3, 39, 2, 56,239, 73, 98,171,146,196, 46,145, 0, 90,201,100, 50,201, 19, 79, + 60,145,213,172, 89,179,236,204,204, 76, 33, 54, 54,246,113, 66,136, 24,192,217, 18,121,230,202,165, 57,151,216, 2,104, 6,160, + 21,207,243,244,177,199, 30,203,108,221,186,117, 86,118,118, 54, 27, 27, 27,219,159, 97, 24,134, 82,234,146, 87,169,126,132, 16, +177, 68, 34,249, 95,253,250,245,199, 45, 95,190, 92, 26, 30, 30, 14,149, 74,133,236,236,236,208, 83,167, 78,133,188,243,206, 59, + 3,121,158, 95,100,177, 88,166, 63,200,228, 51,130, 32,212,214,106,181,238,226, 93, 0,112,241,226, 69,108,218,180, 9,111,191, +253,118,185,245, 85, 10, 10, 10,224,235,235,235,177,211, 64, 8,137, 81,171,213,171,134, 12, 25, 98, 14, 14, 14, 14, 85, 42,149, + 48,153, 76,141,150, 45, 91, 54,138, 16, 50,134, 82, 26, 95,197,249, 50,158,231,183, 15, 28, 56,176,227,202,149, 43,165,118,187, + 29,122,189,115,153,254,184,113,227, 80, 92, 92,140, 73,147, 38, 45, 85, 40, 20, 35, 12, 6,195, 64, 74,169,177, 42,157,196, 98, +241, 41, 65, 16,252, 74,239,147, 72, 36,121, 22,139,165,109, 69,231,120,241,140, 59,172, 5,207,243, 99,198,191,254,198,162,131, + 7, 14,250, 10, 96,176,231,192, 97,236,218,123, 8,167,206,158,131,175,127, 32,126,216,184,201,239,153, 17,207,205, 86,171,213, +239,213,244, 75, 9, 33,117, 2, 3,124,159, 63,188,184,143, 68,206, 75, 38, 18, 66,106, 85,125,150, 19,181, 90,141, 43, 87,174, +224,252,249,243, 40, 44, 44,116, 59, 0,165,157, 0,181, 90,141,199, 31,127,220,163,194, 16,174,176,245,204,153, 51,113,246,236, +217, 59, 42, 32, 74,165, 82, 52,107,214, 12,137,137,137,238, 66, 47, 85,225, 50,254, 46, 35,155,151,151,135,220,220, 92,247,107, +110,110, 46,110,221,186,229,113,225,138,164,164, 36,108,216,176, 1,117,234,212, 1, 0, 28, 57,114, 4, 71,142, 28, 65,124,124, + 60,142, 30, 61,138,163, 71,143,226,240,225,195, 30,201,186,253,250,185, 12, 63,165, 20, 14,135,227,174,174,223,233,211,167,221, +121,241, 93, 91,117,175,159, 43,236, 63,115,230, 76, 36,157, 58, 10,216,204,128, 96,118,190,218, 76,101,228, 57, 28,142, 7, 26, + 9,136,142,142,246,119,233,150,144,144,224, 50,206,204,148, 41, 83,102,175, 90,181,106, 69,187,118,237, 86, 0, 88, 65, 8,161, +174,141,227,184, 74, 13, 68,116,116,116,251,210,247, 95,233, 82,217,165, 74,102,163,180, 76,134, 97,106,108,116, 20, 18,102,250, + 23,179,223,150,214, 74,218, 0,191,227, 11, 49,163,167,143, 82, 41, 33,179, 42, 58,222,100, 50, 53,200,207,207, 23,233,245,122, +145,201,100, 10,140,143,143, 79,209,233,116,151,215,175, 95,111, 12, 15, 15,183,175, 95,191,222,168,211,233, 46,197,199,199, 95, +142,137,137,169, 35, 22,139, 95, 34,132,116,171, 72,158, 92, 46,207, 32,132, 80,158,231, 11,162,162,162, 26,237,222,189, 59,195, + 96, 48, 36,199,198,198,234, 34, 34, 34,236,223,126,251,173, 73,167,211,165,156, 56,113, 34, 57, 38, 38,166,182, 88, 44, 30, 89, +153, 60, 0, 80,169, 84, 7, 88,150,221,222,160, 65,131,166, 7, 14, 28,184,104, 50,153, 46,255,252,243,207,230,136,136, 8,251, +215, 95,127,173, 43, 44, 44,188,116,226,196,137,212,110,221,186,213,229, 56,238, 37,150,101, 43,149, 39,145, 72,230, 13, 29, 58, +116,252,133, 11, 23,164,117,234,212,193,229,203,151,177,117,235, 86, 20, 21, 21,161, 93,187,118,228,192,129, 3,210,152,152,152, + 55,121,158,175,240,186,221, 47,148, 74, 37, 8, 33,136,141,141,197,214,173, 91,221, 67,120, 82,169, 20,107,215,174,197,143, 63, +254,136,184,184, 56, 28, 62,124, 24,167, 79,159, 70,110,174,231,129, 20, 66,136,186, 86,173, 90,171, 94,127,253,245,218,239,191, +255,126,209, 59,239,188,243,205,115,207, 61, 55,178,105,211,166,155, 86,174, 92, 25, 16, 28, 28,188,170, 36, 58, 80, 33, 18,137, +228,243,169, 83,167,118, 89,187,118,173, 52, 33, 33, 1, 73, 73, 73, 72, 76, 76,196,217,179,103,145,159,159, 15,155,205,134, 85, +171, 86,201,134, 14, 29,218, 89, 42,149,126,238,137, 94,130, 32,248, 21, 21, 21,185,159, 83,122,189, 30, 86,171,213,175,234, 51, +255,219,200,229,168,117, 97, 24, 49,187,182,210,195, 1, 46,202,244,158, 8, 33,117, 90, 71,181,249,116,230,140, 25,242,189,135, +226,113,237, 90, 38,222,120,101,148,251,243, 93,123,246,129,147, 72, 48,101,234,219,242, 35,135,127,127,139, 16,178,165, 38,101, + 34,131, 52,146,197,219,190, 95,234, 43,215,216,241,241,203,249,154,183,151,253, 49, 23,192,171,158,156,155,158,158,142, 30, 61, +122,128, 97, 24, 4, 6, 6,150, 49,252,174,247, 34,145,200, 93, 81,172,170,158,172, 43,236,202,113, 28,250,246,237,235,238,245, +151,142, 2,200,100, 50,240, 60,239,113, 79, 86,165, 82, 33, 35,195, 57, 74, 82, 84, 84,132,240,240,112,119,145, 19,187,221,238, +238,113,123, 74,100,100, 36,214,173, 91, 7,192,233,241,247,239,223, 31, 28,199,129, 16, 2,171,213,234,222,170,115,253,204,102, + 51,100, 50, 25, 40,165, 56,126,252, 56, 0, 32, 42, 42, 10, 44,203,214,232,250,229,230,230, 34, 36, 36, 4, 54,155, 13, 47,191, +252, 50, 0,224,179,207, 62, 3,207,243,213,186,126, 46,121,189,211,231, 3,189,156,189,126,102,234, 89, 0,128,227, 3,223, 59, +228, 61,200, 72,192,154, 53,107,220, 97,255,118,237,218, 1, 0, 51,125,250,244,105,219,182,109, 11,168,100, 72,160, 82, 39,197, +213, 94,169, 84,138, 39,158,120,162,220, 8, 64,120,120, 56, 22, 47, 94,236,190, 47, 31,121,228,145,106, 59, 62,132,144,206,237, +162, 90,237,137,253,233,103, 73, 84,179, 64,214,176,254, 19,100,229,235,113,163,200, 8, 7,165, 30, 85, 5, 5,128,232,232,104, +247,141,235,231,231,231,118, 68,162,163,163, 29, 71,142, 28,185,113,252,248,241, 43, 93,186,116,233, 14,224, 80,121,178, 44, 22, + 75,144,201,100,130, 84, 42, 85,158, 60,121,242, 26,195, 48,146,242,228,181,107,215,142, 30, 57,114,228,230,241,227,199,175, 86, + 38, 15, 0,116, 58, 93,247,110,221,186, 89,142, 30, 61,250,232,216,177, 99,247,189,248,226,139,235, 62,252,240,195,116, 63, 63, + 63,183,199,217,182,109, 91,219,193,131, 7,111, 94,190,124, 57,173,101,203,150, 61, 43,146, 71, 8,121, 36, 56, 56,120,220,242, +229,203,185,195,135, 15, 67,167,211,225,218,181,107,152, 50,101, 10, 86,174, 92,137,200,200, 72, 40, 20, 10,124,254,249,231,124, +247,238,221, 39, 17, 66, 54,123, 50, 28, 64, 8,249, 25,128, 31,128,167, 40,165, 55, 75,237,247, 7,240, 51,128, 28, 74,233,144, +170,228, 0, 64,108,108, 44,196, 98, 49, 36, 18, 73,153,232,223,171,175,190,234,254,237,138,197, 98,136, 68, 34, 28, 61,122,212, + 19,145, 46,198, 14, 25, 50,196,252,252,243,207, 39, 52,106,212,232, 81, 0, 89, 82,169, 84, 18, 28, 28,188, 33, 47, 47, 79,190, +100,201,146,254,131, 7, 15, 30, 11,160,220, 26, 23,132,144, 46, 77,154, 52,121,126,234,212,169,146,223,126,251, 13, 86,171, 21, + 17, 17, 17, 88,182,108, 25,242,242,242,176,122,245,249, 75,248,232, 0, 0, 32, 0, 73, 68, 65, 84,106,220,184,113, 3, 6,131, + 1,111,191,253, 54,191,107,215,174,231, 8, 33,235, 41,165, 85,246, 94,212,106, 53, 54,109,218,228, 46,251,238,165,106, 74,194, +255,149,134, 16,203,252,240, 21, 74,213,164, 37, 95, 46,245, 77,186,148,134,130,130, 2,188,241,202, 40,172,254,126, 51,182,237, +216,139, 29,187,127,195,227,125, 30,133, 68, 68, 64, 8,131, 79,231,205,243, 13, 8, 8,152, 86, 93,165, 8, 33,145, 29,218, 54, +235, 21, 16,214,153, 4, 71,143,194,208, 71,195, 69,106,165,108, 8, 33,164,190,167, 50, 74, 27,252,242, 34, 0,174,205,211,158, +236,237, 15,220,219,163, 0, 50,153,172, 90, 61,217,244,244,116,248,251,251, 3, 0,194,195,195,193,178,206,231,245,233,211,167, +177,119,239, 94,156, 62,125,186, 90, 14,192,242,229,203,209,163, 71, 15,216,237,118, 76,153, 50, 5, 18,137, 4,132, 16,140, 31, + 63, 30, 49, 49, 49,152, 60,121, 50,108, 54,155,199,242, 24,134, 41,211,235,119,225,138, 0,212,228,250,149,238,245,187, 16, 4, +161, 70,215,143,231,249,178, 61,127,183, 64,115,185,242, 30,100, 36,160,244,125, 49,123,246,236,119,126,250,233,167,160,187, 29, + 18, 40,125,191,181,108,217, 18, 60,207,163,126,253,250,238,125, 74,165,210, 29, 13,168,233,144,128,146, 99,214, 44,125,119,148, +180,111, 93, 11,123,236,226, 77,252,122,149,193,187,187,114, 44, 51, 15,234,139, 13, 54, 84, 88,178,152,227,184,235, 82,169, 20, +132, 16, 40, 20,138,130,171, 87,175,234,236,118,187, 9, 0, 2, 2, 2,236, 0, 96, 54,155, 77, 91,182,108,209,189,255,254,251, +146, 95,126,249, 69, 5,103,126,250, 42, 57,121,242,164,228, 94,201,219,184,113, 35,151,156,156, 44,234,213,171, 87,207,217,179, +103,175, 9, 14, 14,254,234,155,111,190,105, 14, 0, 14,135,195,250,251,239,191,107,223,127,255,125,242,221,119,223,169, 42,187, +159,121,158,127,127,197,138, 21,124, 90, 90, 26,116, 58, 29, 56,142,115,223,175, 44,203,130,227, 56, 48, 12, 3,181, 90,141,169, + 83,167,242, 10,133,226, 29, 79,218, 10,160, 14,128,206, 0,246, 19, 66,106, 3,110,227,191, 31, 64, 39, 0, 1, 30,202,193,152, + 49, 99, 48,102,204, 24,140, 30, 61,186,140, 3,240,253,247,223,227,199, 31,127,196,175,191,254,138, 61,123,246,224,208,161, 67, +238, 18,233, 30,242, 72,131, 6, 13, 66,131,131,131,143,195, 89,189,116,103,106,106,106,250, 35,143, 60, 98,222,176, 97,195,206, + 22, 45, 90, 52,192, 95,243, 2,238,128,231,249, 87, 23, 45, 90, 36, 77, 73, 73,129,213,106,133, 68, 34,193,173, 91,183,176,104, +209, 34,172, 93,187, 22,133,133,133,238, 33, 85,169, 84,138,201,147, 39,203,148, 74,165, 71, 29, 63,192, 57,191,201, 85,254, 29, + 0, 8, 33,115, 9, 33,115,165, 82,233, 7,213,105,228,127,141, 11,195, 8,117,109,183,127, 86,166,215, 36, 22,139,123, 52, 8, + 9, 65, 98,114, 10, 52, 26, 13, 98,183,237,128,175,198, 23, 10,153, 12, 22,139, 9, 0, 32,149,242,160, 96,208,178, 69, 43, 16, + 66,218, 87, 87,153, 32, 31,241,202, 85, 95,252,207,199,146,254, 11,178,114, 13,176, 16, 21,150,190,255,132,223, 11,239,111,253, + 10,128, 71,229, 39,203, 27,247, 47,253,234,242,130, 93,175, 85,225,234,237,223, 62,246,239,218,228,114,121,153,158,167, 39,136, + 68, 34,136, 68, 34,247,156, 4,135,195,129,188,188, 60, 0, 64, 97, 97, 97, 25, 67,233, 9, 74,165, 18, 10,133, 2, 18,137, 4, + 44,203,194,106,181,226,207, 63,255, 4, 0,156, 60,121,210,227, 8, 0,224,188,126,165, 67,255,109,218,180,113, 71, 37,106,122, +253, 74, 59, 0, 11, 23, 46,116,207, 1,224,121,190,218,215,207,233, 0,152,220, 78,128, 99, 90,128,115, 14,128,213, 84, 35,121, +247,146,210,198, 61, 50, 50, 50,212, 53,107, 63, 33, 33, 1,237,218,181,171,145, 3, 80,250,248, 77,155, 54,161,126,253,250,216, +185,115,167, 59,252,175, 82,169,202,220,155, 53, 65,103,113, 76,120,105,218,146, 95,230,247, 11,100,168,185, 24, 99,191,191,108, + 19,108,182, 47, 45,118,124, 66, 41, 45,168,232, 60,131,193, 16, 34,145, 72,198, 31, 61,122,244, 12, 0,228,230,230, 42,115,115, +115,161, 86,171,141, 18,137, 68,191,120,241, 98,230,226,197,139,178,154,232, 70, 8,185,167,242, 26, 55,110,140,101,203,150,137, +231,204,153,131,165, 75,151,182,156, 49, 99,198,194,166, 77,155, 70,103,103,103,139,197, 98,177, 68, 34,145,120, 34,179,125,120, +120, 56, 82, 82, 82,144,157,157, 13,155,205,134,107,215,174, 1, 0, 50, 50, 50,224,239,239, 15, 63, 63, 63,212,173, 91, 23, 81, + 81, 81,132, 97,152,104, 15,213, 27, 4,224, 0,156,243, 30, 14, 16, 66,158, 2,176, 9,206,121, 11,201, 0,158,242,180,157,155, + 54,109, 42, 55, 2, 48,126,252,120,136,197, 98,247, 38,145, 72,112,240,224, 65, 79,197, 2,112, 70, 47,139,139,139, 15,201,100, + 50,101,114,114,114,122,211,166, 77,179, 1,168,116, 58,157, 66,165, 82, 85,122, 46,195, 48,209,141, 27, 55, 70, 70, 70,134,123, +206,147,175,175, 47,142, 28, 57, 2,135,195,129,182,109,219,194,102,179,185,159, 97,173, 90,181,130,167,215,175,184,184,216,109, +252, 93, 17, 0, 74, 41, 12, 6, 3, 20, 10,133,162, 90,141,252, 15, 81, 85, 50,160, 50, 14,128, 93, 16, 66,101, 50, 25,236,118, + 59, 56, 78, 2,149, 82, 1,169,148,131,197,100, 64,151,206, 49,184,124, 57, 5, 82,169, 12,118,135, 3,156, 68, 12,177, 88, 92, + 89, 9,207, 59, 16,139, 73,183, 55, 70, 60,218, 92, 19,218, 14, 69,191,173,118,238,172,213, 28,143,198, 40, 73,195,250,254, 29, + 8, 33,173, 61, 9,167, 85,230, 0, 16, 66,220,134,203,181, 85,133, 84, 42,189,195,232,187, 30,184,132, 16,183,161,113,245, 60, + 61,107,171,216,237, 0,184,140,171, 70,163, 65, 94, 94, 30,106,213,242,120,202,131, 27,149, 74, 5,165, 82, 9,145, 72,228, 14, +249,183,107,215, 14, 39, 79,158, 68, 84, 84, 84,181, 29, 0, 74, 41, 78,156, 56,129, 54,109,218, 64,171,213, 66,167,211,161,118, +237,218, 53,190,126,130, 32,224,213, 87, 95,197,194,133, 11,113,233,210, 37,164,164,164,160, 71,143, 30, 96, 89,182,218,215, 79, + 42,149, 2,130, 25,204,187, 73,112, 76, 15,196,193, 52, 61, 14, 94, 49, 97, 70, 52,173,145,188,123,137,235,222,224,121,254,142, + 33,129,154, 70, 0, 92, 81,167, 38, 77,154,184,247, 61,241,196, 19, 0,156, 81, 25,165, 82, 89,198, 73,173, 46,132,144,192, 39, +159,124,114,229,148, 41, 83,152,169,111, 78,112, 52,119,164, 50, 22,171,205, 96,181,211, 41,213, 22, 86, 66,113,113,177,236,242, +229,203,218,196,196, 68, 69,105, 35,244,119,144,167,209,104, 48,117,234, 84,102,250,244,233, 56,118,236, 88,173,224,224, 96,143, +138,197, 16, 66, 88, 0,117, 84, 42, 21,174, 93,187,134,183,222,122,171,204,231, 51,103,254, 85,181, 59, 57, 57, 25, 97, 97, 97, + 48, 24, 12,245, 60,145, 77, 41,189, 73, 8,233,129,191,156,128, 83, 0, 56, 56,141,127, 15, 74,105,142, 71,141,195, 95,134, 94, + 34,145, 96,237,218,181,238,253,235,215,175,135, 92, 46,135, 66,161,128, 92, 46,135, 92, 46,175,174, 19,117,220, 96, 48, 52, 58, +126,252,120, 20,203,178, 63, 60,253,244,211, 86, 0, 42, 0,202, 9, 19, 38, 12,185,121,243,230, 85, 56, 87, 4,148,139,217,108, + 14, 86,171,213,176, 90,173,110, 7,192,199,199, 7,171, 87,175, 70, 81, 81, 17,126,249,229, 23, 20, 21, 21,185, 63,139,140,140, +132, 94,175, 15,174, 74, 41,137, 68,146, 87,171, 86,173, 50, 99,254, 26,141,198,188,103,207, 30,239,112,192, 93, 82,198, 1, 16, +137, 68,153,185,121,121,254, 74,133,115,242, 26, 39,145, 64,204, 50, 24,253,242, 24,164,166,166, 65,165,174,229, 52,254,156, 4, +212,225,128, 32, 8,186,234,124,153,255,255,179,119,222,241, 77,214,219, 31,255,156, 39, 79,118,147, 14, 40, 29,236, 33,148, 77, + 89,178,151, 23,244,178, 20, 65, 20, 20, 80,188, 23,245,199, 85, 25, 87,171, 8,130,138, 32,130,162,112,189,128,122,149,161,168, + 12, 69, 68,246, 16, 25, 34,101, 86, 86,129, 66,129,210, 65, 71,246,124,146,231,251,251, 35, 73, 77, 75,211, 38,109, 1,149,188, + 95,175,188,218, 60,121,242,233,247, 73,154,156,243, 61,223,243, 61, 71, 35, 93,250,246,236,183, 35,113,105, 45, 34, 20, 28,158, + 24,220, 1,234,132, 54, 64, 65, 54,150,188, 61,186,230,128,113,139, 63, 1, 80, 97, 84, 33,144, 3, 80,250,241, 80, 35, 0,165, +163, 0, 62,124, 6,199, 55,243, 12, 6, 95, 4,224,224,193,131,104,208,160, 1,106,214,172,137, 86,173, 90, 21, 59, 3,161, 44, + 1, 0, 40, 14, 3, 63,250,232,163,248,231, 63,255,137,246,237,219,227,205, 55,223,132,211,233,132, 32, 8,149,114, 0, 0,143, +129, 49,153, 76,200,203,203, 67, 92, 92, 92,241,227,149,137, 0, 0,158,176,255,133, 11, 23,176,123,247,110,244,237,219, 23, 64, +232,175, 95,241, 18, 0, 0, 8, 54,252,116,217,142, 55,127, 97,152,229,157, 43, 84,230,253,168, 46, 74, 27,226,178,140,126,101, +151, 0,242,243,243,145,154,154,138,129, 3, 7, 98,247,238,221,232,211,167, 15,128,223,223,251, 80,102,197, 68,212, 67, 38,147, +109,149,201,100,138,254,253,251, 75, 82, 82, 82,144,146,146,114, 41,245,120,218,255,157,226,241,129, 32,226,201,202, 92, 63, 0, + 56,157, 78,210,235,245, 18,163,209, 40,113,185, 92, 36,149, 74,129, 32,195,254,183, 67,207, 31,183,219,205,185, 92, 46,146,203, +229, 21,234, 49,198,220, 74,165, 50,239,250,245,235,241, 77,155, 54,197,167,159,126, 10,158,231,145,153,153,137, 89,179,102, 97, +193,130, 5,232,208,161, 3,180, 90, 45,234,213,171,135, 67,135, 14, 33, 34, 34,226,122,176, 99,241, 58, 1, 35, 1,164,194, 99, +252, 29,240,228, 4, 4,109,252, 1, 96,213,170, 85,101, 70, 0, 94,120,225,133,226,227, 62, 35,187,109,219,182,160, 52,189,187, + 46, 14,111,216,176, 97,118,203,150, 45, 91,243, 60,175, 24, 50,100,200,118,135,195,161,158, 56,113,226,131,221,186,117,123,180, +109,219,182,185, 0, 2,214,184, 80, 40, 20,121,121,121,121,181, 35, 34, 34,224,114,185,138,195,253,190, 72,163,111, 9,197, 55, +190,140,140, 12, 68, 68, 68, 84,120,237,254,217,254, 68, 52,151, 49,134,237,219,183,163, 70,141, 26,136,140,140,244, 29,247, 69, + 18, 28,140,177,227, 65, 93,244, 95, 24,255,112,191,255,239,165,163, 1, 37, 28, 0, 81, 20,127, 58,115,230,108,251,134,141, 27, +147,205,230,128, 92, 46, 67, 76, 84, 36,118,238,218, 5,181, 90, 13,155,221, 14,133, 92, 6,185, 76,134,195,135, 15,131,136,142, + 6, 59,160, 8, 21, 63,122,206,139, 15,215, 85,198,212, 3,210, 23,130,151,171,145, 50,117, 18,164, 48, 3, 18, 30,173,146,234, +163,103,151,230,141,164, 82,233,253,130, 32,148,251, 95, 91, 86,226, 95,137,139,242, 36,135, 85,122, 9,160,244, 12, 68,165, 82, +149,152,121, 6,131, 84, 42, 5, 17, 21,207,174, 99, 98, 98, 74, 24,255, 96,119, 20,248,208,104, 52, 16, 69, 17, 23, 46, 92,192, +249,243,231,209,186,117,235,226, 48,123, 40, 73,128,192,239, 75, 0,201,201,201, 16, 69, 17,113,113,113,197,198, 31,168,220,235, +231,114,185, 48,127,254,124, 8,130,128,190,125,251, 22, 27,127, 32,244,215, 79,161, 80,120, 66,255,211,162, 1,193,138, 89, 93, +196, 98,227, 95, 25,189,234,196,103,216,125,134,184, 58, 28, 0,133, 66,129,186,117,235,194,100, 50, 97,224,192,129, 16, 69,177, + 56,114, 4,160, 68, 4, 32, 24, 7,128,136,122,196,198,198,110, 89,176, 96,129,154,231,121, 68, 71, 71, 99,210,164, 73,236,232, +209,163, 93,188,251,235,155, 7,123,189, 26,141,230,188, 40,138,141,187,118,237,202, 34, 34, 34, 10,102,204,152, 49,198,225,112, +112,141, 26, 53,178,243, 60,207, 4, 65,224, 12, 6,131, 76, 38,147,161, 86,173, 90, 66,100,100,100,208,107, 91,185,185,185,124, +122,122,186,194,233,116, 86,139, 94, 89,184, 92, 46,202,207,207, 87, 20, 21, 21, 81,108,108,172, 16, 27, 27, 91,110,178,140, 68, + 34, 57,146,150,150, 54,184, 93,187,118,104,209,162, 5,228,114,121,113, 62, 79,135, 14, 29,208,188,121,243,226,200,224,137, 19, + 39,192, 24,251, 53,216,177,120,215,254,191,193,239,198, 95, 14,224, 27, 34,234, 27, 74,221, 3,159,225,247, 25,123, 31, 43, 86, +172, 40,158,249,251,110, 21,109, 11,246,142,171, 65,114,114,242,207, 79, 63,253,116,221,188,188, 60, 76,155, 54,205,254,206, 59, +239, 12,157, 55,111,222,139, 26,141, 6, 89, 89, 89,153,109,219,182,205, 77, 79, 79,255, 71,121,181, 0,136,232,200,153, 51,103, +106, 39, 37, 37,193,108, 54, 67, 38,147, 21, 39, 63, 3, 40,225, 0,200,100, 50,156, 56,113, 2, 28,199, 29, 9,246,186,125, 24, + 12, 6,212,168, 81,163, 68, 66, 96, 97, 97, 33,120,158, 71,100,100,100,229,214,200,254, 98, 84,212, 3,192, 71, 9, 7, 64,175, +215,125,240,234, 43, 47,143,221,184,233,199, 88, 34, 2, 47,225, 65, 16,145,152, 16,143,188, 27, 55, 32,151, 41, 32,151, 75,193, + 17,225,185,231,158, 45,200,201,201,153, 29,204, 31, 33, 34,105, 98,180,116,238,255, 77,157,169,198,133, 47, 0, 34,216, 85, 45, +208,189,207,255, 33,239,234,111, 80,112, 82,128,227,177,240,173,167, 99,246, 31, 58,255, 31, 34,106, 86, 94,181,168,210,179,255, +178, 30,247,253, 12,117, 9,192, 59,251, 40,129, 74,165, 42,254, 25,170,193,137,136,136,128, 74,165, 42, 54,252, 39, 78,156,128, + 40,138,104,217,178,101, 72, 58,128,231,131, 95,191,126,125,212,169, 83, 7, 78,167, 19, 54,155, 13, 41, 41, 41,224, 56, 14,175, +190, 26,252,174, 76,137, 68,130, 70,141, 26, 85,235,235, 55,126,252,248,106,123,253,148, 74, 37,204, 83,206,222,146,247,163,170, +148, 54,238,254, 75, 2, 85,113, 0,204,102, 51,228,114,121,177,209,247,143, 16,133,226, 0, 16, 81,247,196,196,196,173,115,231, +206, 85, 95,184,112, 1, 82,169, 20, 90,173, 22,105,105,105, 66,101,138,235,120,183, 1,114,114,185, 28, 74,165, 50,142,231,121, +214,177, 99, 71,179, 74,165, 18,207,159, 63, 47, 42,149, 74,183, 90,173,182, 27,141, 70,249,153, 51,103, 34,189,245, 0,130, 74, +202, 92,183,110, 93,205,246,237,219,155, 58,117,234, 20, 80,207,235, 8, 85,168, 23,200,161,150,203,229,238,216,216, 88,187,197, + 98,145,101,100,100,104,206,157, 59,199, 51,198, 2,234, 89, 44,150,185, 41, 41, 41,253,118,237,218,165, 82,171,213,144, 72, 36, +197, 14, 64, 68, 68, 4, 20, 10, 5,100, 50, 25,140, 70, 35,102,207,158,109, 53, 26,141,243,131,185, 86, 34,138,135, 39,225,175, + 57,128,211, 0, 30, 3,176, 22,158, 28,128,221, 68,212, 47,216,247,199,103, 64,125, 78,128,143,241,227,199, 23, 31,247,125,118, +182,110,221, 90,209,184, 26, 36, 39, 39, 31,252,249,231,159, 19,206,159, 63,143,151, 94,122, 9,167, 78,157, 26, 50,120,240,224, +118, 8,177, 16,144,197, 98,249,252,221,119,223,253,219,218,181,107,213,110,183,251,166, 9,132,191, 3, 64, 68, 88,184,112,161, + 89,167,211,125, 30,204, 53,251, 80, 40, 20,230,168,168,168,136,210,199, 14, 29, 58,196, 34, 35, 35, 67, 42,194, 21,166,148, 3, +192, 24,203,210,104, 52,211, 95,159,254,218,130,183,102,191,173,225,165, 82,168, 84, 42,172, 92,185, 18, 74,165, 18, 82, 94, 10, +142, 35, 60,243,204, 51,230,130,130,130, 69,140,177, 51,193,252,145, 26, 26,110,202,212,135,234,213,228,117, 39,128,220, 3,128, + 66, 3,133,140,144,123,249, 56, 20,230,227, 0,199, 3, 18, 30,137,137, 53, 48,250,177,254,181,150,125,182,241, 41, 0,255, 43, + 75,139,227, 56,124,251,237,183,144, 72, 36, 72, 72, 72, 40,115, 7,128,111, 93,216, 55,147, 45, 15,159,135,175, 80, 40,240,192, + 3, 15,148,185, 35, 32, 49, 49, 17,192,239, 51,207, 96, 33, 34,116,236,216,177,196,204,223,255, 22,106, 29, 37,169, 84,138,255, +254,247,191,112,185, 92,112, 58,157,197, 63, 57,142, 11, 58, 2,240, 71,127,253,100, 50,153, 59, 54, 54, 86,114, 43,222,143,170, +162, 84, 42, 89,235,214,173, 75,188, 32,254,209,163,202, 56, 0, 28,199,185, 99, 99, 99,139, 47, 66,161, 80, 96,224,192,129,208, +104, 52,208,104, 52,208,106,181,168, 93,187,118,177,147, 90,209,251,161,209,104, 94,184,120,241,162,218,183,181, 80,171,213, 34, + 39, 39, 7, 68, 84, 97,193,149, 64,248, 47,121,116,235,214,205, 82,250,113,158,231, 89, 66, 66,130, 93,169, 84,178,205,155, 55, + 55, 98,140,233, 3,105, 17, 17,166, 77,155, 38, 2,224,146,147,147, 77, 21,233,253,248,227,143,141,136, 40,160, 30, 0,168,213, +234, 75, 29, 58,116,168,251,222,123,239, 73, 71,143, 30,125,211,107,196,243, 60,171, 85,171,150, 67, 34,145,208,142, 29, 59,154, + 16, 81, 65, 32, 45,198,216, 65,149, 74,181, 98,242,228,201,227,223,127,255,125,185, 90,173, 70, 98, 98, 34,206,157, 59,135,122, +245,234,129,136,160,215,235,241,240,195, 15,219,156, 78,231, 50,198, 88,176, 51,216,181,240, 24,255, 83, 0,250, 49,198,242,253, +114, 2, 90, 1,216, 0,207,110,128,114,201,203,203, 43, 81, 84,204, 23, 1,112, 58,157, 88,183,110, 93,113, 14, 64, 48,159, 13, +127,227,127,249,242,101,124,249,229,151, 56,120,240, 96, 58, 99,108, 39,128,157, 65, 94, 87, 49,140,177,239,213,106,245, 79,159, +127,254,121,255,241,227,199,203,124, 73,193,143, 63,254, 56,204,102, 51,136,168,216, 65,121,229,149, 87, 28, 55,110,220,216,203, + 24,251, 62,148,191, 97,179,217,222,246, 27,127,151,194,194, 66,248,140,191,127, 20, 51, 76,249,161,127, 31, 55,237,157, 54,153, + 76, 31, 71, 68,104,228,169,135, 15,207,120,243,173,217, 53, 59,116,236, 72, 67, 31, 28, 6,147,201,132, 19,199,143, 99,202,148, + 41, 55,110,220,184,241,129, 78,167,123, 39,216,129,240, 28,247,183,249,223, 93, 53,191,183,241,105, 19,192, 1, 68, 0,125, 7, + 96,150,247,119,239,164,129, 8,110, 81,228,212,106,229, 3, 8,224, 0, 52,110,220, 24, 0,112,225,194, 5,116,238,220, 57,168, + 72, 64,121,252,227, 31,255, 0, 0,124,244,209, 71,248,228,147, 79,130,138, 4, 4,139, 47,251,223,255,230,159, 7, 16, 42, 68, + 4,183,219, 93, 28,250,119,185, 92,120,227,141, 55, 66, 90, 2,248,163,191,126, 14,135,131, 7, 0, 34, 98,213,253,126, 84, 21, +171,213, 90, 98,253,147,136,150,249, 47, 9,248, 27,126,223,118,177,138, 40, 93,191,128,136,216, 59,239,188, 83,110, 78, 74,121, +152, 76,166,249, 19, 39, 78, 28,250,201, 39,159, 40, 34, 35, 35,177,103,207, 30,124,240,193, 7, 70,167,211,249, 64, 40,215,234, +195,187, 13,176, 30, 0, 40, 20, 10,227,196,137, 19, 27,204,152, 49, 35, 43, 62, 62,190, 56, 52,111, 50,153,248, 77,155, 54,213, +201,203,203,139, 20, 4, 97, 55, 99,236,124, 32, 61,151,203, 53,106,225,194,133, 77, 0,152,167, 77,155,214,168, 81,163, 70,142, +233,211,167,103, 54,110,220,184,248, 31,216,106,181,242,155, 55,111,174,157,147,147, 19,237,213, 43,183,214,136,197, 98,105, 98, +177, 88,254, 53, 97,194,132,217,111,191,253,182, 98,209,162, 69,178, 30, 61,122, 20, 63,110, 52, 26,165,251,247,239,111,144,159, +159,175,116,187,221, 59, 5, 65,200, 40, 79,207,102,179, 77,222,183,111, 31,122,245,234, 53,110,250,244,233,170,182,109,219,162, +105,211,166, 56,126,252, 56, 82, 83, 83, 49,115,230, 76,155,203,229, 90,102,177, 88,130,221, 2, 8, 0, 55, 0, 28, 0, 48,204, + 55,211,247, 75, 12, 92, 11, 64, 87,145, 0,207,243, 98,124,124,124,153,255, 84,179,102,205, 42,247,121,101, 29, 79, 76, 76, 92, +236, 51,254, 43, 86,172,192,210,165, 75,179,236,118,123,165,254, 79,124, 88,173,214,241, 11, 23, 46,252,229,220,185,115, 9,179, +102,205, 82, 18, 17,134, 12, 25, 82, 92, 1,213, 96, 48, 96,194,132, 9,214,221,187,119,231,154,205,230,241, 85,249, 91, 0,124, + 97,127,138,139,139, 43, 81, 33,241,110,199, 63,251,223,231, 8,148,181, 35,160,204,226, 41,102,179,105, 49, 17,125,255,194,243, + 19, 39,203,229,242, 30, 0,226, 0, 20,186, 92,174,253,249,249,249, 31, 50,198, 46,134, 50,152, 92,189,208,191,114,151, 17,152, + 80,102,178,193, 16,204, 76,214, 87,137, 47, 88,106,215,174, 29,234,101,149,203,144, 33, 67,170, 77,235,143,254,250, 5, 19, 9, + 8,245,253,184, 21,148, 54,250,190,159, 85,137, 76, 84,148,147, 82, 30,140,177, 35, 68,212,159,136,118,124,248,225,135,138,135, + 30,122,200,104,181, 90, 7,132,178, 86,237,143,197, 98,169,239,251,157,136,232,216,177, 99,237, 70,142, 28,217,189,103,207,158, +121, 15, 60,240,192,133, 61,123,246,212,201,202,202,138, 19, 69,241,128,219,237, 62, 81, 81,121,112,198,216, 58,255,251, 60,207, +183,124,234,169,167,250,116,236,216,177,232,193, 7, 31, 60,187,119,239,222,196,171, 87,175, 38,184,221,238, 95, 68, 81, 60, 22, + 76,185,113,239, 57,139,137,104,217,185,115,231,222, 28, 60,120,240,164, 78,157, 58,113, 0,164, 39, 79,158,172, 95, 80, 80, 32, +151, 72, 36, 63,219,237,246,223,130,185,102,111,169,224,255, 35,162, 47,102,205,154,245,170,219,237,238,104, 54,155,227, 52, 26, + 77, 14,199,113,169, 6,131, 97, 14, 99, 44, 96, 54,124, 0,205, 50,139,252,120,139, 2,245, 12, 70,195,229,114,113,214,141,211, +176, 86,215, 12, 28,199, 21,239,122,242,253, 94,214,141,136, 48,104,208,160, 50,157,134,232,232,232,228, 83,167, 78, 97,253,250, +245, 88,178,100, 73,150,213,106,237,201, 24,203, 12,229,186,202,184,158, 27, 68,212,124,203,150, 45,243,182,108,217,242,108,187, +118,237,156,157, 58,117, 82,115, 28,135,195,135, 15, 91,142, 31, 63, 46, 35,162,101, 22,139,229,149, 80,123,192,148,129,163,140, + 53,255, 10,203, 80,223, 77,148,181,247,223,159,128,213,211, 24, 99, 87, 1, 76,174,246, 17, 85, 19,161,204,100,131, 33,148,153, +108, 69,200,100, 50,172, 89,179, 38,168,115,125,201,130,229, 17, 29, 29, 29,244,117, 5,187, 45,230,143,252,250, 1,161, 69, 2, +238, 20, 74,165,210,221,186,117,235,114, 45,189,127, 53,186, 96,144, 74,165,238,122,245,234,149,171,169,209,104,202,213,100,140, +237, 39,162, 94,235,214,173,155, 98, 52, 26, 23,134,106,172,202,209,101, 0,142, 19,209,111,123,246,236,233,186,119,239,222,123, + 93, 46,215, 25, 81, 20,191,171,108, 77,124,151,203,117,154,136,206,254,250,235,175,157, 15, 31, 62,124,175,203,229, 74, 23, 69, +113, 35, 99, 44,248,202, 86,191,143,207, 9,224, 21, 34,154,119,248,240,225, 15,213,106,117,207,130,130,130,116,167,211,121,160, + 50, 29,232, 24, 99, 7, 1, 12, 1, 60, 91, 4,141, 70, 99,104,153,187,213,140, 92, 46,207, 83, 13,157, 19,114,156, 91,161, 80, +148,153,105,127,250,244,233,127,253,253,239,127,159, 99,177, 88,138, 4, 65,120,162,170,198,223,135,247,125,152, 76, 68,115, 14, + 30, 60,120,239,225,195,135,239, 5, 0,151,203,245, 43,128, 95,171,210,232,169,212,223,185,235,179,253, 43,162,162,100,192, 63, +125,139, 81,223, 76,182, 60, 66, 49, 26,254, 89,191,129,240,109, 61, 9,132,175, 50, 92,117, 81, 81,119,191,170,240, 71,124,253, +252,241, 69, 2,202, 59, 71,171,213,222,145, 47,102,171,213, 90,237,159, 31,167,211, 89, 45,154,140,177, 84, 0,163,170, 67,171, + 12,109, 23,128,125,222, 91,117,232,137, 0, 14,121,111,213,161,167, 3, 48,182, 58,180,252, 52,239,168,241, 7,128, 80, 58,250, + 5,131,183, 1, 84,153, 77,160,170, 73, 63, 31,192, 38,239, 45,204,109,164,229, 26, 70,165,103,255,101, 57, 3, 84,133,134,126, + 97,194,132, 9, 19, 38, 76,152, 63, 41,149,139,247,134, 9, 19, 38, 76,152, 48, 97,254,212,132, 29,128, 48, 97,194,132, 9, 19, +230, 47, 70,233, 37,128,178, 18, 2,195, 14, 64,152, 48, 97,194,132, 9,243, 23,164,162, 93, 0, 97, 7, 32, 76,152, 48, 97,194, +132,249, 11, 82, 86, 50,160, 63, 97, 7, 32, 0, 68,196, 19, 81, 34, 17, 85, 75,173, 89, 34,138, 37,162,158,222, 30,224, 97,194, +132, 9, 19, 38,204, 45,167, 60, 39,224,182,108, 3,148,201,100,185,130, 32, 4,189,127, 85,161, 80,228,217,108,182,106,221,242, + 18, 44, 68, 84, 3, 64,243,216,216,216,123, 58,118,236, 40,205,200,200, 0, 17,229, 2,248,137, 49,102,172,132, 94, 35, 0, 43, + 90,180,104,209,163, 73,147, 38, 56,119,238, 28,136,104, 63,128,113,140,177, 75,213, 61,254,191, 10, 68,196, 75,165,210, 39,165, + 82,233, 96, 81, 20,219, 17, 17, 36, 18,201,113,135,195,241,131, 32, 8, 43, 43,187,239,156,168,236, 15, 2, 99,193, 53,207, 8, + 83, 5, 94, 34, 53, 92,208,130,188, 19, 15, 6, 17, 60,140,152,207, 44, 68,196, 49,198,196,242,206,185, 73,111, 50, 53, 0, 33, + 9,228,253, 30, 19,225, 6,112, 22, 11, 89, 38, 17,201, 24, 99,206,242,206,185,245, 23,124,251, 32, 34, 25,128,186, 0,106,193, + 83,117,240, 90,101, 11,237, 16, 81, 83, 0,111, 1,232, 6,224, 32,128, 25,229, 85,119, 12,160,161, 1,240, 32, 60, 91, 81,187, +192,179,197,243, 43, 0,223, 51,198, 66,234, 34, 27,166,234, 4,114, 2,110,203, 54, 64, 34, 98, 38,147, 9, 17, 17, 17, 21,158, +107,179,217,160, 82,169,238,200, 23, 50, 17,201, 21, 10,197,232, 53,107,214, 72,239,187,239, 62, 88,173, 86,152,205,102,108,220, +184, 17,211,167, 79, 23, 76, 38,211,250, 80,156, 0, 34,106, 20, 21, 21,117,114,249,242,229, 17, 15, 62,248, 32,204,102, 51, 76, + 38, 19, 54,108,216,128,148,148, 20,179,201,100,106, 27,172, 19, 64, 68,124,114,114,242,198,182,109,219,254,125,249,242,229,101, +158, 19,138,227,228,253,128,142, 4, 96, 1,208, 49,192,105, 58,198,216,219, 1, 30,187,101, 16, 81, 43,133, 66,177, 54, 57, 57, +185,126,215,174, 93,149,117,234,212,193,141, 27, 55,112,246,236, 89, 92,186,116,201,122,225,194,133,171,118,187,253, 17,198,216, +169, 74,104,135, 29,128, 59,197,100, 74, 0,135, 36,151, 27, 50, 0,112,184,224,122,112, 35,140,187,174, 33, 6, 64, 12,128,162, +126,117,160,219,248, 32, 52,114,222, 99,176,121, 9,156, 16,113, 14, 11, 89, 78, 25,122,127, 7,135,201, 76, 68, 20, 0,152, 5, +216,134,253,128,115,187,174,162, 3,128, 14, 0,142,254,173, 30,142,125, 59, 4,205, 34,164, 80, 2, 0,113,208,131,225,125,188, +207,202,236,146,163, 82,169,134,217,108, 54, 5, 0, 40,149, 74,187,213,106,253,174,188, 75, 34,162, 24,137, 68,210,197,229,114, +109, 14,116,142, 74,165,202,181,217,108,113, 94,205, 60,171,213, 90,238,103,148,136, 58,241, 60,255,137, 32, 8,237, 42, 56, 79, + 2,160, 54,207,243,245,251,245,235, 87,123,204,152, 49,212,191,127,127,236,216,177, 3,171, 86,173, 98,187,119,239,206,118,185, + 92,153, 0,174, 87, 84,199,128,136, 98, 0,204,226, 56,238,177,251,238,187, 47,118,204,152, 49, 24, 48, 96, 0,182,111,223,142, + 85,171, 86, 97,215,174, 93, 55, 68, 81,252, 6,192, 44,198, 88, 81, 57, 58, 99, 1, 60,173, 82,169, 58,245,239,223, 95, 57,120, +240, 96,116,237,218, 21,191,252,242, 11, 54,109,218,132, 29, 59,118,216,172, 86,235, 17, 0,159, 51,198, 66,106, 4, 20,224,239, +101, 2,240, 85,171,188,194, 24,107, 80, 85,205,187,137,219,230, 0, 48,198,176,126,253,250,226, 38, 22,133,133,133,168, 95,191, +126,113, 67, 11,255,159,141, 26, 53,186, 83, 14, 64,231,255,254,247,191,237,158,123,238, 57,108,221,186, 21, 27, 55,110,196,189, +247,222,139,246,237,219,227,211, 79, 63,197,162, 69,139,142,123, 11,172, 4,171, 55,123,193,130, 5,175, 77,157, 58,181, 88,175, + 71,143, 30,232,212,169, 19,150, 44, 89,130,133, 11, 23,190,205, 24,155, 30,132, 14,223,166, 77,155,141,219,183,111, 31,176,116, +233, 82,201,128, 1, 3,110,234, 8, 38,147,201, 80,183,110,221,160, 94, 55,175,241,127, 20,192,183, 0, 58, 50,198,182, 7, 56, +111, 1, 99,236,223, 65,232, 53,209,104, 52,243, 25, 99, 29, 44, 22, 75,109, 34,130, 70,163,201, 18, 69,113,157,201,100,154,206, + 24,179, 85,164,225,167,213, 42, 34, 34, 98,207,140, 25, 51,106, 14, 31, 62, 28,145,145,145, 48, 24, 12, 72, 79, 79,135, 78,167, +195,201,147, 39,145,158,158,142,221,187,119, 23,152,205,230,190,193, 58, 1, 62,195, 31,168, 7,131,175, 2, 98,216, 17,184,133, + 76,161,218, 46, 17,173,248, 15, 88, 12, 0,236,120, 84,142, 53,218,177, 24, 58,116,104,177,145,216,184,113, 35, 70, 26, 87,162, +255, 55,158,138,174,174, 73, 84,196,115, 56,133,247,217,245,155,244,166,210, 96, 38,226,117, 90,200, 58, 1,192,246, 71, 21, 88, +163,121, 2, 67,135, 14, 69,247,238,221,113,224,192, 1,143,158,233, 11, 12,248,198, 14, 0, 96,147, 41,149, 56,188,137,247, 88, +153,197,105,136,104,148,239, 59,209, 91,161, 83, 4, 96, 0, 80,228,189, 21,122, 11, 13,129,136,212, 18,137,164,255,170, 85,171, + 44,163, 70,141,218, 17,232,178,125,223,127,126,154, 2,128,223, 0, 28, 5,144, 10,224,136,175,170, 29, 17,213,231, 56,238,151, +149, 43, 87, 94,121,252,241,199,187,150,163,217,101,232,208,161, 13,134, 12, 25, 66, 3, 7, 14, 44,110,144,229, 79,118,118, 54, +190,250,234, 43,172, 92,185,146,165,165,165,101, 50,198,202, 44,180,212,178,101,203,235, 35, 70,140, 72,108,218,180, 41,250,246, +237, 27, 80,107,245,234,213, 88,181,106, 21,210,210,210, 46, 51,198, 26, 5, 24,151,123,222,188,121,220,132, 9, 19, 16, 21, 21, +117,211,227,122,189, 30,115,231,206,197,187,239,190,235,102,140, 85, 57, 2, 93,250,181, 13,127,126, 75, 82, 81, 67,160,128,111, + 0, 17,109, 4, 16, 13,224, 17,111,189,106,223,241,120,120,170, 71, 93, 15, 84,223, 58, 16, 82,169, 20, 82,169, 20,155, 55,111, +198,226,197,139,241,237,183,223, 22, 59, 1,254,183, 59,136,234,155,111,190, 65,100,100, 36,198,142, 29,107,118,187,221, 39,150, + 44, 89,210,102,203,150, 45,218,191,255,253,239, 88,186,116,105, 51, 34, 58, 18, 76,125,114, 34,146,200,100,178,167,198,140, 25, +131,140,140, 12, 12, 28, 56,240, 34, 99,236,141,165, 75,151,206,220,177, 99, 71,147, 65,131, 6, 97,241,226,197, 79, 17,209,204, +138,188,243, 54,109,218,124,187, 99,199,142,254,181,106,213,146, 0, 37,251,129,251, 59, 78, 33,240, 8,128,111, 25, 99, 69, 21, +149, 33,174, 8, 34,106,173, 82,169,246,111,218,180, 73,211,161, 67, 7,146,201,100,112,185, 92, 56,121,242,100,189,119,222,121, +231,185,157, 59,119, 14, 34,162,214,193,148,118, 37, 34, 94,161, 80,172,157, 49, 99, 70,205,199, 31,127, 28,113,113,113,200,202, +202,194,149, 43, 87, 96, 50,153, 96,179,217,144,144,144, 0,171,213,138,126,253,250,213,220,190,125,251, 26, 34,106, 83,217,229, +128, 48,119,150,222,253,250,161,255, 51,191,247, 87, 26, 50,100, 8,134, 12, 25, 2,231,178,172, 74,233,245,237,219, 23, 3,158, +253,180,248,254,208,161, 67, 49,116,232, 80, 8, 75, 43,167,231,101, 45, 0, 6, 20,151, 66, 6,224,105,113, 46,145, 72,250,188, +253,246,219,238, 81,163, 70, 5,223,172,193,131, 26, 30,199,130,121,101,153, 87, 83,203,113,220,150, 57,115,230,216, 31,127,252, +241,138,106,122,215,156,211,217, 70,104,164, 69, 98,128, 46,120,113,113,113,104,211,166, 13, 70,141, 26, 69,105,105,105, 53, 3, + 9,217,237,246, 90,227, 26, 20, 1, 77,107, 5,236,175, 17, 31, 31,143,118,237,218, 65, 16, 4,164,165,165,213, 41,103, 92, 92, +159, 62,125,112,242,228, 73,232,116, 58,180,105,211, 6,141, 26, 53,194,133, 11, 23,176,117,235, 86,100,101,101,249,122, 91,132, +212, 44, 35, 60,211, 15,157,210,205,127,130,110, 6,228,165, 6, 60,107, 64,187,137,168, 47, 99, 44,207,107,252,247, 0, 72, 2, +176, 63,212, 1, 73,165, 82, 92,189,122, 21,203,150, 45,195,184,113,227,208,190,125,123, 24,141,198, 63,140, 3,192, 24,251,137, +136,126,219,187,119,111, 71, 0, 23, 25, 99, 25, 68,196,111,216,176,161,203, 83, 79, 61,133,182,109,219,170, 82, 83, 83, 99,225, + 89, 99,171,136, 78,125,250,244, 73,172, 85,171, 22, 22, 45, 90, 4,198,216, 82,198,216, 23, 68, 20,183,126,253,250, 5,255,252, +231, 63,145,156,156,156,152,154,154,218, 9, 21,148, 64,109,223,190,253,144, 37, 75,150, 0, 0,126,251,237, 55, 12, 27, 54,172, +132,225,247,111, 11, 26, 36, 86, 0, 29,189,198, 63, 38,148, 39,150, 70,173, 86, 79, 93,187,118,173,182, 99,199,142,200,207,207, + 7, 99, 12, 28,199,161,110,221,186, 88,186,116,169,114,232,208,161,117, 78,158, 60,249, 10, 60,107,138,229, 34,149, 74,199, 37, + 39, 39, 55, 24, 52,104, 16,180, 90, 45, 46, 94,188,136, 75,151, 46,193,100, 50,149,184, 41, 20, 10, 68, 69, 69,161, 73,147, 38, +245,206,158, 61,251, 4,128,229,129, 52, 43,154,249,139,162, 8,147,201, 84,236,100,120,207,119, 48,198,170, 37,249, 51,140, 31, + 12, 34, 47,129,243,135, 97,132, 30, 61,122,192, 41,211,226,151, 13, 27,144,148,148,132,164,164, 36,156, 62,125, 26, 91,183,110, + 69,207,156,108,104,255,221, 20, 23, 50, 46, 96, 72, 35, 56, 33,162,236, 55,143,193, 69, 28,244, 63, 60,228,209,115,200, 34,113, +104,195, 6, 52,107,214, 12,205,155, 55,199,169, 83,167,176,109,219, 54,143,222, 75, 77,113,225,194, 5, 12,105, 12,189, 55, 15, +160, 76,148, 74,165,221,151,248,235, 93, 2,184,233,111,147,231,131,211, 99,244,232,209, 92, 74, 74, 74,132,209,104, 52,106,181, +218,128,151,173, 84, 42,243,136,200,127, 9,224, 38,103,216,155,116,188,126,212,168, 81,242,148,148,148,134, 58,157, 46,189,130, +190, 30,182,150,178, 60, 13, 78,127,128,107,231, 54, 0, 93,159, 65, 98,155, 30,144, 72, 36,176,217,108,216,188,121, 51, 78,159, + 62, 93,226,252, 64, 66, 6,131,193,218, 80,184,168,197, 47,179,112,253,232,114,184, 58,141, 71,189,118,189,193, 73,248, 98,173, + 51,103,206,248,127,134,110,206,199,184,249,154,161, 84, 42, 81, 80, 80,128, 47,191,252, 18, 87,174, 92,129, 82,169, 44,209, 34, +155,136, 26,133,144, 7, 85,223,111,166, 95,223,239,248, 21,191,251, 87,130,212, 10,227,165, 60, 7,224, 33, 0,187,225,233, 85, +189,135,136, 30, 5,176, 6, 30,227,127, 22,158, 89,100, 72, 72,165, 82,204,153, 51, 7, 78,167, 19,169,169,169, 24, 62,124,120, +113,199, 42,141, 70,131,255,252,231, 63,168, 85,171, 86,101,174,163,218, 96,140, 21, 2,216,230,119,168,224,234,213,171, 0,224, +203, 97, 8, 54,108,165,136,137,241,216,214,140,140, 12,192, 19,238, 3,128,163, 62, 61,239,151, 70,133,134,102,249,242,229, 56, +112,224, 0,100, 50, 25,134, 13, 27, 6,153, 76,134,230,205,155,227,234,213,171, 37,162, 1, 33,208,177,116,104, 63,216,112,127, + 25, 12,234,212,169, 19,244,122, 61, 24, 99,197,157, 4, 37, 18, 9,120,158,199,146, 37, 75,212, 61,122,244,120, 93,169, 84,190, + 44,151,203,245, 14,135,227, 75,187,221,254, 78, 89, 61,227,165, 82,233,224, 46, 93,186, 40, 4, 65,128, 78,167, 43, 54,202,165, +111,102,179, 25,140, 49,212,174, 93, 91,125,249,242,229,129, 40,199, 1, 40, 15, 65, 16, 96, 52, 26, 97, 50,153, 96, 52, 26, 97, + 52,134,156,227, 25, 38, 20,120, 24,225,194,185,161, 27, 16,255,235,171,239, 1, 0, 18, 1, 24,141, 70,204,156, 57, 19,217,217, +217, 80, 42,149,200,145,245,135, 66,161,192,219, 27,222, 6,155,132,115,224, 81,246, 27,195,112, 14, 12, 11,135,126,143,254,191, + 78,251, 93,207,100, 50, 97,214,172, 89,200,202,202,130, 82,169, 68,174,226,126, 40, 20, 10,204,254,126, 54,216,100,188, 15,224, + 92,160, 33, 90,173,214,239,136,232, 17, 0,223, 90,173,214, 64,142, 66,167,142, 29, 59,106, 62,255,252,115,245,181,107,215,144, +153,153,137,158, 61, 3, 55,244,179, 90,173,241, 68,100, 6, 80,203,106,181, 90, 3,156,246,223, 78,157, 58,221,179,114,229,202, +250, 89, 89, 89,200,200,200, 64,239,222,189, 3,106, 2, 0,156,102,208,203,105, 0,126, 1,251, 68, 7,227,133,150,208,142, 92, +128,249,243,231,151,255,188, 82, 20, 22, 22,138, 48,223, 0, 55,245, 24,128,131, 16, 63,214,193,144,254, 45,232,254,153,248,240, +163,165,168,234, 50,113,233, 86,229, 62, 61,158,231,143, 16,209,223, 24, 99,199, 42,171, 29,142, 4, 84,141,242,186, 1,230, 19, + 81, 63,120,102,252, 45,225, 89,171,146,195, 99,252,251, 50,198,202,236, 48, 85,238, 31,227,249,226, 55, 63, 34, 34, 2,201,201, +201, 32, 34, 16, 17,172, 86,235, 29,141, 0, 40,149,202, 49,118,187,189,194,254,183, 82,169,244,111,221,225,215, 23, 0, 0, 32, + 0, 73, 68, 65, 84, 0, 86, 86,116,158, 66,161, 88, 91,234,208,158,178,194,237, 82,169,116, 45,128, 10,183, 6,250, 27,250,230, +205,155, 23, 31,171,100, 4,160, 4, 68,180,160,178,207,117, 56, 28, 90,153, 76, 6,167,211, 9,158,231,193,243,124, 9, 39,160, + 89,179,102, 40, 40, 40,224,141, 70, 99,196,181,107,215, 34,102,205,154, 53,105,255,254,253,241, 0,158, 44,173, 37,138, 98,135, + 58,117,234,192,100, 50, 33, 59, 59, 27, 70,163,177, 56,113,210,103,164,205,102, 51,124,223,161, 49, 49, 49, 16, 69, 49, 80, 2, + 99,185,216,108,182, 18,134,223,247,123,152, 91,136, 39,147,223,130, 15,110,254, 28,184,221, 1,108,109, 89,201,127,191, 63,150, + 9, 32, 51, 36,189, 0,201,127,165,208,195, 27,246, 47, 13, 17, 53, 79, 76, 76, 76,220,190,125,187,242,194,133, 11,200,204,204, +196,229,203,151,203,117, 0,188,164, 1, 40,115,169,138,136, 94,174, 93,187,246,224, 45, 91,182, 36,156, 63,127, 30,151, 47, 95, +198,229,203,151,131,112, 0, 44,120,189, 95, 52, 32, 81, 2, 78, 27,180,198,243,112, 59,131, 78,183, 41,137, 41, 23, 51,251,197, + 0,188, 28,112, 90, 17, 73, 87,145, 83,152, 93,101,227, 95, 26,198, 24, 54,109,218,132, 49, 99,198, 96,222,188,121,209,245,235, +215,223, 73, 68, 29,131,136, 4,132,103,250, 33, 82, 58,243, 63,164, 28, 0,160,216, 9,120, 12,192, 17,120,140,191, 3,158,156, +128,144,141, 63,224, 49, 88,115,231,206,197, 83, 79, 61,133,132,132, 4,204,152, 49, 3, 60,207, 23,183,196,245,253,126, 39,176, +219,237,202,178,254,217,173, 86, 43,172, 86, 43, 28, 14, 7,150, 45, 91,134,166, 77,155, 6, 21, 26,182,219,237, 53, 87,175, 94, + 13,198, 24, 86,175, 94,141,213,171, 87,251,142,195,102,179,193,110,183, 99,217,178,101,104,210,164, 73,192,181, 57,127,164, 82, + 41,142, 31, 63,142, 39,159,124,178,248, 88,124,252,239,201,196,129, 66,220,229, 65, 68,141, 1, 60,231,119,191,216, 17, 8, 54, + 26,224,114,185,164,190, 54,194,254,134,223, 63, 10, 32,145, 72, 16, 31, 31,143,248,248,120, 44, 93,186, 84,158,148,148, 52, 28, +101, 56, 0, 0,112,227,198,141, 18,198,190,244,207,192, 19,168,224,241,233,149,158,253,155, 76,225,221, 73, 97, 0,120,146,253, +110,250, 50,136,142,142,110, 16, 17, 17,209, 98,251,246,237,178,140,140, 12, 92,185,114, 5,169,169,169,108,219,182,109,206,231, +158,123,174, 12,153, 18, 28, 5,110, 94,122,136,140,140, 28, 19, 17, 17,241,202,182,109,219,162,125,134,255,240,225,195,226,246, +237,219, 11,255,239,255,254,175,124, 69,167, 13,111,244,136, 0,148, 90,192,105, 1, 32,129,197,168, 11,250, 34, 75, 96, 55, 97, +102, 79, 13, 32,215,120,180,136,131,165,168, 82, 95,243, 1, 97,140, 97,219,182,109, 72, 78, 78,198,162, 69,139, 32,145, 72, 80, + 88, 88, 24,173,213,106, 51, 0,148,155,140, 20,104,166, 31,206, 13, 40,159,138,218, 1,151, 91, 8,200,187,230,191, 22,191, 27, +127, 57,128,111, 42, 91,204, 70, 42,149,162,101,203,150, 72, 73, 73,193,247,223,127,143,243,231,207, 67, 20,197,226,208,241,157, +206, 1,248, 35, 83,137, 48,255,237,130,174, 92,185,130,201,147, 39, 99,210,164, 73,184,118,237, 90,137,124,142, 43, 87,174, 96, +252,248,241, 24, 55,110, 28, 50, 50, 50,144,152,152, 8,187,221,174, 46, 75,136,227,184,163,103,206,156, 65, 81, 81,209, 77, 78, +128,201,100,186,201,248, 23, 21, 21,129,227,184, 35,193, 14, 84, 20, 69,232,245,122,232,116,186,128,183, 48, 97, 0, 20,249, 39, +252, 77,155, 54,173,233,180,105,211,134,198,198,198,118, 29, 59,118, 44, 95, 80, 80,128,195,135, 15, 99,206,156, 57,246, 5, 11, + 22, 8, 39, 78,156,184, 28,132,230, 17,224,247, 92,134,215, 95,127,253,133,105,211,166,101,198,197,197,173, 24, 55,110,156,170, +176,176, 16,191,254,250, 43,222,121,231,157,220,247,222,123,207,112,242,228,201,229, 21, 42, 10, 22,204,220, 93, 0, 56, 45,160, +201, 71, 48,243,135,115,176, 85,214, 1,112, 90,240,198,174, 66,192,105, 1, 55,229, 8,222,216,120, 30,230,194,192,193,151,114, + 56,187,114,229, 74,216,108, 37, 35, 17,140, 49,236,222,189,187,216,248,191,240,194, 11, 0,138,151, 65,171, 66,125,198,152, 47, + 82, 81,191,162,147,239, 54, 42, 42, 5, 92,222, 46, 0,255,132,191,211,240,108, 27, 91, 11,207,114,192,110, 34,234,231,237,247, + 28, 52, 62,163, 48,118,236, 88,220,127,255,253,104,212,168,209, 77, 9,128,190,237, 88, 97, 74, 34,149, 74,209,163, 71, 15,228, +228,228, 20,103,234,218,237,246,226,232, 73,101, 96,140,101, 0,248,183,111,230, 95,201, 28, 0, 12, 24, 48, 0,251,246,237,131, + 40,138,232,218,181, 43,242,243,127,255,183,168, 93,187,118, 89,143,149, 57, 96, 65, 16, 54,101,102,102,222,159,150,150,166,140, +143,143, 47,177,238,239,251, 66,145, 72, 36,136,137,137, 65,126,126, 62,174, 95,191,110,177,219,237, 1,247, 95,251,227,116, 58, +203, 12,249,251,255, 30,142, 0,220, 54, 76,107,214,172,209, 60,244,208, 67,168,169, 75, 67,220,249,175,240,132, 61, 15, 78,165, + 29,123,209, 1,151,220, 13,112,244,232, 81, 0, 8,246, 13, 57,255,205, 55,223, 52, 29, 54,108, 24,106,234, 78, 34, 46,253,107, + 60,110,207,131, 67,229,192,207,104,143,203,238,134, 72, 77, 77, 5,128, 96,139,217, 20,239,115,127,253,245,215, 91,235,245,250, +164,244,244,116, 62, 58, 58, 26,159,126,250, 41,151,158,158, 46,236,219,183, 15, 78,167, 51, 11, 64, 26, 99,204, 17,132,102,241, +238,161,233,211,167,191,149,159,159, 63,249,210,165, 75,106,175,166,236,204,153, 51,230,125,251,246, 49,151,203,245, 45,128,215, +189,185, 72,229,227,118,227,205,253,110,188,209,219, 92,124,223,102, 40, 8,242, 18, 75,193, 68,188,177,223,129,153,189,189,249, +125,110, 1,150,194,236,202, 40, 13,249,232,163,143,222, 90,189,122,245,163, 99,198,140,225, 70,140, 24,129,217,179,103, 3, 0, +198,140, 25, 83,108,252, 87,173, 90,181,110,213,170, 85, 35,128,224,182,222, 18,209, 80,120,118, 79, 0,128,133, 49,182,177, 50, +131,187,155, 40, 43,235,191, 52,229, 89,219,181,240, 24,255, 83,240,172,249,159, 6,208, 23,158, 28,128, 86,240,108, 5, 12, 9, +127, 67,223,176, 97,195,176,241, 15, 1,255,245,126,223, 90,117, 85,140,191, 63,149, 53,252,222,231, 18, 17, 89, 0,224,244,233, +211,112,185, 92, 22,198, 24,249,110,129, 30, 43, 75, 75, 16,132, 21, 23, 46, 92,184,146,158,158,142,140,140,140, 98,163,236, 51, +254,190, 90, 7,114,185, 28, 6,131, 1, 23, 47, 94,188,234,118,187,191,168,104,124,140, 49, 82, 40, 20,136,141,141, 45,158,233, + 23, 21, 21,149,152,249,191,244,210, 75,120,243,205, 55,125,231,135,119, 0,220, 90,246,190,247,222,123, 87, 71,140, 24,129,227, +251,182,194,221,102, 36,146, 22,156,135,179,205, 72, 24,175,157,195,103,159,125,134,173, 91,183, 94, 5,176, 55, 72,189, 65,239, +191,255,254,154,225,195,135,179, 19,251,183, 67,108, 59, 18, 73,243,207,195,213,250, 17, 24,178,210,241,233,167,159,178,109,219, +182,173, 1, 48, 40, 24, 49,198,152, 1, 0,166, 79,159, 94, 63, 59, 59, 59,169,113,227,198,252,200,145, 35, 17, 23, 23, 7,169, + 84,138,125,251,246,185,157, 78,231, 46,198, 88,106,144,198, 31,222,239, 79,188,242,202, 43,163,115,115,115, 39, 55,109,218, 84, + 61,124,248,112,212,170, 85, 11, 60,207,211,129, 3, 7, 76, 46,151,171, 59, 99,108, 98, 80,198, 31,200,188,127, 3,216,177, 39, +224,201, 5,232,173, 68,239, 58, 18,216,117, 37,195,246,217,217,217, 88,185,114, 37, 3,144, 89,142,214,198,251,191, 5, 60, 90, + 86,204,236,165, 66,239,122, 18, 88, 10, 74, 70, 0,114,115,115,177,106,213, 42, 0, 8,104,124, 25, 99, 25,140,177,209, 58,157, +174,197,162, 69,139, 86,245,234,213,171,216,209,254,232,163,143,124,198,255,115, 0,143,150,247, 93, 80, 6,106,198, 88, 26, 99, + 44, 13,191, 59, 2,128, 39, 55,192,247, 61, 24,206, 13, 8,145,242,114, 0,110, 0, 56, 0, 96,152,111,166,239,221, 10,216, 15, + 30,231, 32,104, 87,211,151,233, 31, 44, 18, 73, 72, 91, 68,111, 57,127,132,241,248, 18,253,124,142,128,219,237,174, 22,227,239, +163, 42, 78, 64, 78, 78,206,196,174, 93,187,126,228,116, 58,161,211,233, 38, 6,251, 88, 25, 99,112, 17,209, 35,187,119,239,222, +211,175, 95,191,154, 81, 81, 81, 37,146,144,180, 90, 45, 28, 14, 7, 46, 92,184,128,221,187,119, 23,216,237,246,145,161,214, 0, +240, 95, 94, 8,103,255,223, 25,152,167, 20,236,129,231,218, 81,230,153,189, 63, 36, 71, 70, 70,106, 6,246, 7,178,174, 93,131, + 61,251,156,105,116, 67, 28, 95,114,162,140,194, 63,129,245, 46, 2,120,244,185,118,180,234,212,222,141,239,105, 53,154,166, 3, +251, 63,143,172,235, 89,176,103,159, 61,255,120, 35, 76, 93,114,162,236,194, 63,129,120,230,153,103, 34, 13, 6, 67,231,214,173, + 91,243, 74,165, 18, 27, 55,110,196,182,109,219, 0,192,229,118,187, 83,125,197,128, 66, 97,194,132, 9, 45,245,122,253,178,182, +109,219,170, 85, 42, 21, 54,109,218,132,173, 91,183, 2,128,197,237,118,255,147, 49,246, 91,176, 90,222, 45,202,121,219, 51,209, +246,137, 36,103,189,183,250, 41,209, 32, 81,134,227, 70,207,215,178, 78,167,195,238,221,187,145,150,150,118, 5,158, 40,133,185, + 28,173,113, 68,180,124,231, 21, 44,127,162,185,163,222,155,189, 21,168, 31,235,198,119,133,215, 0, 89, 77,232,245,122,236,217, +179, 7,105,105,105, 87, 24, 99,227, 24, 99, 21, 58,102,140,177,116, 0, 99,137,104, 12,224,249,236, 26,141, 70,159, 3,241, 15, +198, 88,232, 73, 75,101,255,157, 6,213,161,243, 87,165,244, 18, 64,233,136,192,237,171, 4,184, 41, 5,175, 29,148,128,136,192, +113, 92,241,173,172,251, 41, 41, 41,183,189,162, 19, 17, 77, 8,148, 4,232,112, 56,138,147, 1,155, 54,109, 10,198,216,199, 65, +232,177,178, 18,243,252,147, 0,109, 54, 27,154, 52,105, 82,225,181, 18, 17, 43, 40, 40, 40,177,247,191,172,104, 9,199,113,193, +134,211,130,173,240, 87,217,173,129, 85,194, 87, 10,248,158,123,238,169, 87,167, 78, 29,149,111, 63,180, 78,167, 67, 86, 86, 86, +184, 20,240, 95,133,137, 20, 1, 57,234,231, 90,208,224,146, 17,202, 70, 90,216,226,213,200,132, 3, 87,240, 81, 96,131, 21,144, +151,168, 33, 68,140,206,179,224,137, 12, 61, 18,238,137, 70,118,172, 10, 95, 58, 4,124, 45, 95,196, 50,130,149, 25, 61,122,116, +205,130,130,130,190, 6,131,129, 23, 69,209, 23,141,114,187,221,110, 6, 32,221, 59, 11, 13,137,145, 35, 71,118,213,233,116, 59, + 76, 38,147,202,229,114,209,165, 75,151,152,209,104,180,185,221,110, 2,176, 0,192,204, 96, 10,140,149, 5, 17,197, 40,120,180, +159,249, 96, 82,108,187,126,195,241,230, 23,187,145,154,154,122,195,229,114, 29, 11,213, 81, 33,162, 49, 74, 9, 22, 79,236, 32, +141,172,115, 79, 75,172,185,172, 66,106,106,170, 94, 16,132,137,140,177,213,149, 24, 27,243,119,176,181, 90,109,165, 62,107,225, + 37,128, 91,195,109,113, 0,100, 50,153, 91, 16,132,160,227,251, 82,169, 84,116, 58,157,183,117,218, 29,194, 54, 64,155,211,233, + 92, 85,209,121,254,245,191,203, 67, 46,151,231,217,237,246,114,107,131, 43,149,202, 92,187,221, 94,161, 86, 48,117,198, 1,128, +136, 94,131,167,202, 99, 69,220,145, 94, 0,192, 45,109, 6,100, 47,235,120, 56,236,127, 7,120,131, 56,228,162, 38,148,248, 61, +187,149,131, 3, 87,161,195,154,242,171, 99,150,201, 51, 36,133, 18, 93, 33, 65,113,102,153,203,133, 34, 62, 6,199, 48,147,149, +249,190,151, 69,199,142, 29,251, 26, 12,134, 26,122,189,222,166,215,235,205, 46,151,203, 8, 79, 62, 66, 14, 99,101, 52, 37, 10, + 78,115,187,193, 96,184, 87,167,211,101, 27, 12,134, 75, 46,151,235, 12,128, 12, 0, 91, 24, 99,213, 18,186, 38,162,186,113,113, +113,109,243,242,242,142, 51, 22,124, 4, 37,128,214,187, 0, 94, 4, 48,159, 5, 81,174,188, 2,173, 98, 35, 19,118,180,111, 63, +190, 40, 64, 89,249, 0,183,197, 1, 8, 19, 38, 76,152,187, 25,242, 47, 90, 31, 38,204,109,194, 63, 17,176,172,164,192,112,214, + 93,152, 48, 97,194,220, 98,194,198, 63,204, 31,145,176, 3, 16, 38, 76,152, 48, 97,194,220,133, 84,185, 29, 99,152, 48, 97,194, +132, 9, 19,230,143,131,127,246,127,121,197,128,194, 57, 0, 97,194,132, 9, 19, 38,204, 93, 72, 56, 2, 16, 38, 76,152, 48, 97, +194,252, 5,169,168, 14, 64,216, 1, 8, 19, 38, 76,152, 48, 97,254, 98, 4, 83, 10, 56,236, 0,220,165, 16,209, 89,198, 88,243, +202, 62,238,119, 94, 52, 0, 37, 99,172,194,194,225,222,254, 18,106,111, 15,130, 48,183, 0, 37, 79, 6,187, 27, 1, 59,172, 72, + 57,184,228, 60, 9,114,158, 51,200,164,188, 69, 34,145,200, 5, 55,203,205, 51,216,238, 45,171, 58, 27, 17, 21, 0,136, 4, 96, + 4, 96,129,231, 59,195, 9, 79,105, 89, 51, 60,173,172,157,240,180,187, 53,192,211,144,165, 8,192,228,202,214,106,184,147,168, +120, 26,102,115, 67, 1, 0, 28,129, 69,202, 32, 68, 43,224,138,150,195,169,149,195,174,149,193,170,149,195, 90, 67, 6, 75, 93, + 45,140, 83, 90,195,132,255, 4, 46, 7,172,228, 41,215,238, 70, 28, 0,112,128, 24, 41,135, 49, 90, 1, 99,180, 28, 58,141, 12, +121, 90, 25,178, 35,229,184, 26, 45,199,229,122, 90,156,159,210, 30,233, 0,138,104, 97,104,107,179, 68,196,171,213,234,133, 46, +151,107,188, 82,169,204,210,235,245,163, 24, 99,199, 66,189,254,152,152,152,183, 21, 10,197, 84,155,205,182, 76,167,211,189, 24, +234,243,195,252,177,248, 75, 70, 0, 56,142,115, 49,198, 42, 44, 20, 68, 68,110, 81, 20,203,189, 70, 34, 58, 11, 79,207, 3, 31, + 27, 24, 99,195, 42, 59,182, 91,160,151, 10,207,151,233,126, 34,234, 1, 96, 33, 99,172, 83,101,245,252, 72,170,226,227, 62, 36, + 0,230, 18,209, 39,140,177,253,129, 78, 34,162, 14, 0, 70, 3,120, 55, 72,221, 50,241, 47,176, 20,108,225,163,187, 9,187, 27, + 90,177,240, 50,160, 77, 0, 76,121,128,249,134,231,167,233, 6,224, 48, 57,109, 86,139,219,229,180,219, 35,228,146, 34, 18, 93, +133,191,165,103, 40, 30,123,127,187, 50,207, 96,227,224,215,173,206,143,200,156,156,156,235,113,113,113, 60, 17, 89,114,115,115, + 21, 14,135,195, 81,183,110, 93, 19,199,113,198, 99,199,142,169,172, 86,171,189,115,231,206, 69, 50,153,204,240,218,107,175, 21, +206,153, 51, 39, 17, 21,180,119,253,163, 98,115, 67,193,126, 94, 12, 70, 4,178, 20, 16, 51,231,203, 96,211, 73,140, 70,147,184, +245,116,129, 50,202, 85, 40,220, 31,149,237,128,211,108,131, 4, 78,104, 32, 16,145,138,227,184,251, 68, 81,220,202, 24, 19,252, +245,236,110,196,249,233,113,204,156, 31,197,172, 58,185,201,104,116,111, 61, 93,192, 71,185,138,204,247, 71, 95, 47,100, 78, 75, + 30, 60,142,147,137,251, 0,117,184, 69,146, 61,162, 40, 38,123,203, 38, 87, 8,207,243,255,108,209,162,197,248,117,235,214,169, +182,108,217,210,244,229,151, 95, 94, 3,160, 73,168,215,159,156,156,252,210,146, 37, 75,164,201,201,201,227,136,104,106, 89, 78, + 28, 17, 37,200,100,178, 55,190,251,238,187,231, 7, 14, 28, 24, 84, 47,132,170, 32,147,201,114, 5, 65,168,176, 16,154,143, 96, +138,171,221, 45, 84, 42, 2,224,171,220,228,171,218, 84,209,253,219, 13, 99, 76,242,202, 43,175,148, 40, 33,236,235, 73,239,127, + 75, 73, 73,169,208, 73,240,205,114,189,198,117, 45,128,247,170, 56,182,106,213, 3, 48, 25,192, 90, 34,154, 7, 32, 5,192, 35, + 85, 17,243,119, 80, 2,149,197,245, 59,151, 1, 56, 87, 94, 36,128, 49, 86, 64, 68, 75, 1,124, 75, 68, 80, 40, 20,241, 0, 96, +183,219,139,123,115,251,189, 22, 3, 25, 99, 65, 53, 25,247,214, 77, 33,255,159,126,127,211,119, 78,208, 95, 10,165,180,137,227, +184, 20,137, 68,242, 79, 65, 16,154,249,190,228, 36, 18,201, 20,137, 68,242,188, 32, 8, 45, 24, 99,182,114,158,175,148, 72, 36, +103, 24, 99,139,221,110,247,251,222, 99,188, 68, 34, 73,103,140,125, 34,138,226,188, 59,186,239, 91,155, 8,188, 44, 47,113,200, + 41,139,180,111,186,170,112,253,120,201,237,168, 25,169, 53,247,110, 83, 95, 82,167,118,162,188, 77,139,230, 71, 34, 34, 14, 68, +149,211,218, 67, 31, 31, 31,239,140,137,137,153,171,211,233, 24,128,255, 49,198,220, 68,244,180,247,241,229,222,251, 15,193,227, + 64,108, 2,240, 48,128,208, 43,249,253, 81, 96, 34, 6, 60,241, 34,186, 39, 2, 51,187,192, 5,192,156,178, 11,156,213, 5, 65, +193, 67, 84, 54,131,179, 87, 2,172,136,130,133,102, 65, 66, 68,125,222,122,235, 45, 54,109,218, 52, 33,144, 94,255,199, 95, 68, +143,218,192,204, 46, 48, 19,112, 41,101, 23,228, 54, 23, 12,114, 9, 28,138, 36, 20,246,170,131, 43, 0, 50,185, 15,160, 32,162, + 45,111,190,249, 38,123,237,181,215,130,110, 79,169,213,106, 71, 61,247,220,115,170,248,248,120, 60,244,208, 67,248,215,191,254, + 85,143,136, 34,202,235, 1, 80, 26, 34,138,141,139,139, 19,101, 50, 25,122,245,234, 37,221,187,119,111, 65,100,100,228, 10,131, +193,240,162,223, 57, 17, 0, 54, 79,152, 48, 65, 61,112,224, 64, 37, 60,109,226,111, 41,130, 32,196,153,205,102, 40,149,129, 11, +181,250,250,162, 88, 44, 22,104, 52,154, 74,125, 47,252, 21,169, 82, 4,128,136, 58, 48,198,142, 6,123,255,118,242,206, 59,239, + 84,155,150,159,129,122,164,188, 89,236,157,208,243,206,252, 31, 1,176, 15, 64,207,106,208,243, 57, 40, 44,123,127,209, 14,183, + 93,116,186,172,162,195,101,115, 59, 92, 86,183,211,101,118, 59,236, 58,193,218,233,245, 38,147,130,117,240, 24, 99,191,248,198, +232,235,220, 71, 68,245,253,140,182, 19,192,125,140,177,227, 33,140,147, 0,188,204, 24,123, 26,192, 80,198, 88,119, 0,217, 68, + 20, 76,239,245,128, 16, 81,140, 84, 42, 93, 23, 25, 25,121,111, 97, 97,161, 2, 0, 79, 68, 26,185, 92,254,117,116,116,116, 15, +157, 78, 39, 7, 32, 7, 16,208, 1, 0, 32,103,140,213,141,140,140,124, 75, 46,151,223,239,116, 58, 31, 3, 96, 19, 69,177, 65, +141, 26, 53,102,152, 76,166, 1, 68, 52,130, 49, 86, 84,142,198,173,195,236,105,199,252,233,111, 0,207, 1, 79,118,138, 49, 20, +184, 34,197,245,233, 70, 89,164, 70,109, 21,121,133,245, 72,150,141,143,174,163,182, 66, 93, 83, 47,149,202, 0, 32,144,195, 98, + 6,160,119,187,111,178,231,110,148, 52,242,130,223,253, 80,140, 78, 3, 0,115, 1,220, 15,192, 10,207,255,249, 12,111,131,159, +144, 33,162, 6,188, 84, 58,223,237,118, 15,224,136,179, 17, 71,251, 92,130,240,106, 40,122,204,148,135,218, 17, 64,140, 18, 34, + 0,139, 91,132, 37, 66, 10, 94,201,195, 42,229, 96,138,150,193, 8, 7,204, 52, 11,140,136,122,142, 30, 61,154,155, 54,109,154, +166, 34,189,104,185,103,233,196, 45,226,138, 90, 10,181,146, 71, 22,207,225, 66,180, 2,231,224, 49,254,110, 0,223,142, 26, 53, + 74,246,218,107,175,133, 52,123, 47, 42, 42,250, 98,249,242,229,237,134, 13, 27,166,145,201,100,120,228,145, 71,220,235,214,173, + 43,208,106,181,215, 76, 38,211,163, 21, 45, 7, 16, 81,108, 76, 76,204,175,123,246,236,145,170,213,106,188,242,202, 43,170,209, +163, 71,227,233,167,159,158, 0, 79, 73, 96, 16,145, 4,192, 55, 15, 60,240, 64,196,226,197,139, 67,142, 46, 84, 5,181, 90,141, +253,251,247, 23,119, 68,229,121, 30, 29, 59,118,196,153, 51,103,138,239,251,126,134,241, 80,209,236, 31,248,147, 46, 1, 0,192, +233,180,180, 47, 73, 34, 97,162,203,101, 19, 1,139, 75, 16,108,240,124,129,216,192,113, 86,165, 82,233,110,222,188,249,178,138, +116,254,200,198,223,135,215, 9, 64,117,233,249,112,219, 69,231,249,149, 57,169,213,161,229, 27, 35,126,159, 17,200,253,102,234, +178, 80,199,238,157,249, 79, 0,240,153,255,113,165, 82,153,231,155,249, 43,149,202,160,162, 9,126,154, 93,165, 82,233,198,185, +115,231, 70,245,233,211,135,239,220,185,179,155, 49,118,175, 84, 42, 93, 51,123,246,236,152,191,253,237,111,124,231,206,157, 29, +101, 53,113, 42,141, 92, 46,119,109,217,178, 69,245,175,127,253,171,247,201,147, 39,207, 9,130, 48, 82, 42,149,178,109,219,182, +169, 38, 77,154,212,237,240,225,195,233, 68, 52,148, 49,246, 75, 40, 99,172, 22, 44,249, 16, 25,240,197, 89, 64, 37,151,186,135, +116,138,118,169,162, 99,178,227,107,144,198, 73, 50,153,200, 43, 21,109,146, 26, 31,237,218,169,195,249, 13, 7,211,147,204,118, +161,188, 62, 8,252,229,203,151, 35,254,247,191,255,173, 28, 49, 98,132,141,136,158,246, 58,118, 43,188, 51,255,161,222,251, 91, +188,221, 28,123, 0,168, 7, 79,145,177,114, 95, 72, 34,106, 2, 79,203,223,197, 0,166, 2,144, 1,120, 2,192, 94, 34,234,206, + 24,203, 12,229,178,137,168,137, 68, 34, 57,144,220,171,247,254,225,207, 78,124,219,106,177,209,250,165, 75,186,156, 77, 61,120, +128,136,238, 13, 70, 47, 82, 6, 1,166, 92,233,103,253,225, 38, 14,102, 0,102,142,131,229, 95,237, 96, 59, 93, 4, 71,125, 13, +116,173, 52, 48,226, 35,230,198,199,116,111,167, 78,157,212, 43, 87,174,140, 48,155,205,136,136,136,184, 73, 79, 43,131, 17,166, + 92,237,103, 3, 96,231, 8,151, 0,100, 74, 56,100,254,171, 29,178, 79, 23, 34,191,190, 6, 39, 91,213, 68, 58, 45,100, 86,124, + 64,159,117,238,220,185,225,170, 85,171, 26, 5,210, 11,112,221,245, 84, 42,213, 91,243,230,205,139, 96,140,193,106,181, 98,222, +188,121,138,151, 95,126, 25, 91,182,108,105, 50,119,238,220,175, 0, 52, 43,235,185, 90,173,246,109,167,211,249, 60,207,243,138, +159,126,250, 73, 18, 31, 31,207,165,164,164, 56,151, 47, 95, 46, 50,198, 72,169, 84,126,224,119,250,226, 86,173, 90,181,248,225, +135, 31, 26, 88, 44, 22, 92,184,112, 1,237,218,181, 11,106,140,213,129, 68, 34, 41,190, 61,251,236,179, 0,128,167,158,122, 10, + 95,125,245, 21,120,158, 47,118, 2,194,252, 78, 69, 17,128, 63,115, 37, 64,118,224,224,193,125, 39, 79,157, 58,146,113,233,210, +217,252,194,194, 76,147,197,114,195,205,152, 73, 46,151,187, 21,138,160,123,187, 76, 5, 16, 15, 96, 31, 17, 49,111,136,188, 42, + 84,183,158,143,115,213,164, 83,140,219, 33,150, 29,178,172, 60, 87,136, 72, 78, 68,190,248,179, 3,149, 12, 17,122, 35, 0, 55, +205,160,173, 86,107,188, 47, 50, 17,236,250, 63, 17,145, 84, 42, 77,169, 85,171,214,174,195,135, 15,215, 28, 63,126, 60,159,159, +159, 15, 34, 66,108,108,236,182,212,212,212, 90, 19, 38, 76,224, 13, 6, 67,208, 45,150,121,158, 71,167, 78,157, 48,117,234, 84, +249,179,207, 62, 27, 43,147,201,182, 73,165, 82,180,107,215, 14, 83,166, 76,145, 79,154, 52,169,166, 66,161,216, 37,149, 74, 83, +168, 58,251, 54, 7,131, 57, 31, 28,199,137, 83,186,107, 77, 79,117,137, 53,187,149, 49,214,168,154, 9, 69, 19, 7,181, 79, 79, +110, 90,191,160,109, 82,163,188, 65,125,123,164,147, 50, 82,167,183,187,173,140, 56, 43, 2, 71, 0, 28, 86,171,213,106,177, 88, +124,143,187,224,153,237,251,112,122,111,254,247, 77,229,232,249,243, 22,128, 37,140,177,119, 24, 99,217,140,177, 76,198,216,108, +120, 28,130,144,155, 80,241, 82,233,220,182, 61,123, 29,124,101,201,255,182,197, 55, 74,210,215,168,215, 76,247,232,180,121, 91, + 26,182,233,188,159,227,249,160,114, 79, 34,229,112,193, 82, 32, 18, 96,129, 8, 11, 99,176,114,128,165, 65, 36,140,131, 26,161, +176, 85, 20, 76,248,136,185,136,168,101,221,186,117,227,127,250,233,167,136, 27, 55,110,224,212,169,178, 27, 83, 70,201, 97, 98, +150,124,129, 35,100,194,147, 56,121, 5, 64,102, 3, 45,210, 7, 53,196,145, 86, 53,113,158, 22, 50, 51, 17, 77,175, 91,183,110, +255,159,126,250,169, 81,121,122,165, 33,162,186, 42,149,234,215,157, 59,119,198,182,107,215,142,114,115,115,177,125,251,118,152, +205,102, 40, 20, 10,116,233,210, 5,118,187,189, 78,160,231, 11,130, 48,245,220,185,115,154, 67,135, 14, 73, 35, 34, 34,184, 41, + 83,166, 56,191,248,226,139, 44, 65, 16,234, 9,130,160, 48, 26,141,175,122,255,206,191,227,226,226, 30, 60,120,240, 96,131,162, +162, 34,156, 58,117, 10, 39, 78,156, 8,106,140,213,133, 84, 42,197, 11, 47,188, 0,169, 84,138,143, 63,254, 24,105,105,105, 88, +177, 98, 5,164, 82, 41, 70,141, 26, 21,142, 0,148,194,127, 23, 64,160,104, 64,153,175,150,119,205,181, 67,176,247,239, 4,162, + 40, 90, 84, 42, 21, 20, 10, 69,241, 77, 46,151,151,184, 5, 67, 85, 18,244,110,135,158,159,110,133, 25,249,161,226,182,139,206, +138,207, 10, 30,198, 88, 3, 34,202,132, 39, 19, 28,126,142, 64,200,221,206,188, 17,128,126,213, 49, 46,141, 70,179, 38, 38, 38, +102,224,177, 99,199,148, 14,135, 3,103,207,158,133, 86,171,197,191,255,253,111,164,164,164,200, 93, 46, 23, 50, 50, 50, 16, 25, + 25, 25,180, 3,224, 59, 47, 49, 49, 17,143, 60,242, 8,117,235,214, 77,158,150,150,230,246, 29, 27, 62,124, 56,186,117,235,166, +156, 52,105,210,235, 5, 5, 5, 29, 81,197,220,141,144,176, 22, 48,187,188,134,173,119,139,104, 71,100, 76,220, 53,168,107, 24, +210,245,146,104,171, 68,109, 27,255, 80,167,159,160,174, 97, 88,191,239,116,115,163, 67,180,141,127,236,161,141,107,118, 29, 86, +253,150,126, 41,144, 90, 70,203,150, 45,175,118,233,210,101,236,147, 79, 62,233,194,239, 51,255, 7,137,200, 13, 96, 51, 99, 76, + 36,162,238, 68,228, 2,144, 10,160, 16, 21,204,254,189,244, 4,240, 82, 25,199, 87, 2, 8,217,186, 48,145,245, 28,250,143,103, + 22, 22, 21,153, 97, 48, 88, 97, 48,219, 97, 48, 88,209,188,247,131,191, 94, 58,241,107, 74, 48, 26, 49, 74, 56, 97, 41,100, 38, + 1,214,115, 58, 56,239,137,132, 53, 90, 14, 11, 56, 88, 32,194,138, 69, 76, 32,162, 6, 90,173,182,217,161, 67,135,228,217,217, +217,184,124,249, 50, 46, 95,190,140, 46, 93,186,220,164, 23,173,128, 1,150, 66,183,201,137,107,103,138,160,107, 26,133,172,104, +133,199, 9, 0,112,133, 22, 50, 35, 17, 61,174,209,104, 94, 60,116,232, 80,205,138,244,136,136,231, 56,110, 66, 68, 68,196, 19, + 70,163,113,149, 74,165,154,177, 99,199,142, 90,109,218,180,161,139, 23, 47,194,225,112,224,216,177, 99,226,138, 21, 43,108,189, +123,247, 86,127,253,245,215, 22,158,231, 63, 15,116,189, 18,137,228,251, 22, 45, 90, 60,248,208, 67, 15,161, 79,159, 62,242, 47, +190,248,194,237,114,185,186, 48,198,242,253,254,230,136,136,136,136,148,163, 71,143,214,200,207,207,199,229,203,151,145,153,153, + 9,147, 41,232, 20,133,106,161, 91,183,110, 16, 4,161,120,166,239,191, 28,176,103,207, 30,212,172, 89, 19, 22, 75,165,154, 53, +222,181, 4,116,151, 74,175,237, 87,116,255,118,227, 18, 4,155, 84, 42, 45, 97,240, 85, 42, 21,252,157,130, 96,160,250,195, 94, +208, 38,182,126,213,148,115,102,182,152,185,238,163,170,142,171,186,245,146,123,198,190, 80,187,145,250,213,236, 76,203,236, 99, +123,243,171,172,231,143,203, 86,189, 14,128,151,250,126,161,255,170, 38,138, 6,220, 90, 24,138,174, 40,138,215,204,102, 51, 14, + 28, 56,128,164,164, 36,196,197,197,129,227, 56,232,245,122,225,224,193,131,146,118,237,218, 33, 62, 62, 30, 28,199,133,228, 0, + 16, 17, 18, 19, 19, 65, 68,200,201,201,129,201,100, 18,136, 72,226, 59,150,151,151,231,251,146,188, 22,236, 88,171, 10, 1, 34, + 4,135,195, 46,175, 97, 45, 20, 53,118,185, 60,218,168, 80,215,212, 89, 76,130,204, 10,149, 13, 17, 53,245, 36,215, 24, 12,118, +209,170,183, 58,109,144, 71,232,165, 50,185, 13,129,103,236, 38, 0,122, 81, 20, 93, 40, 57,211,247, 95,243,135,247, 49,183, 87, +199, 20,100, 18,164, 12,101, 59, 10, 92,169,191, 21, 20, 12, 76,106, 54, 9,172,160,192, 4,131,217, 10,131,193, 1,179,201, 10, +157,206, 74, 40, 25,181, 8,136,150,135, 83, 52, 23, 58,190,191, 4,183,148,131,211,226,132,179,111,109, 88, 96,131, 5,255,101, +206, 90,181,106, 37,202,100,178, 14,219,183,111,151,250,140,225,137, 19, 39,240,227,143, 63,154, 38, 76,152, 32, 97,172,100, 27, + 99,173, 20,133,204, 92, 88,240,125, 6,236, 60,135, 66,171,128,162,190,117, 61,209, 0, 90,200,244, 53,107,214, 28, 40,147,201, +254,179, 99,199, 14, 77, 41,189,243, 19, 38, 76, 80, 49,198,172,254,122,106,181,122,193,179,207, 62,251,236,132, 9, 19,228,235, +214,173,107, 39, 8,130,180, 89,179,102,220,153, 51,103,224,118,187,241,249,231,159,187, 86,174, 92,121,195,229,114, 45, 57,118, +236, 88, 7,147,201,180, 30,192, 87,129,174,215,108, 54, 63, 74, 68,201,223,125,247,221,193,132,132, 4, 48,198, 56,127,227, 95, +171, 86,173,254,114,185,252,227, 29, 59,118,104, 11, 11, 11, 41, 51, 51, 19,105,105,105,248,237,183,223,142,180,104,209,194, 26, + 72,247, 86,112,232,208, 33, 60,245,212, 83,197, 70,223, 63,236,223,169, 83, 39,236,218,181, 11, 18,201,109,237, 34,255,167,231, +182,196, 75,110,197,174, 2,167,203,101, 45,109,240, 21, 10, 5,252,157,130, 96,136,170,223,105, 65,179, 1,211,164,233, 91,103, +207, 3, 80,101, 3, 91,221,122, 13,146, 52, 11, 6, 62, 94, 79,250,227,170, 43,213,162,231,143,203,234,190, 21, 14, 0,224,151, + 7, 80,153, 39,171, 84,170, 92, 0, 32,162,115,129,182,250,249,118, 7, 4,163,103, 54,155,167, 16,209,129, 71, 31,125,116,249, +107,175,189,166,156, 52,105,146, 68, 34,145,224,127,255,251,159,116,197,138, 21,230,105,211,166, 41, 94,123,237, 53, 62,148, 72, +189,207, 1,136,143,143,199,252,249,243, 93,239,190,251,174,157,231,121,229,226,197,139, 17, 31, 31,143,133, 11, 23,186,103,206, +156,105,179,217,108, 79, 50,198,214, 7, 45, 92, 69, 20, 60, 4,187,205, 42,238,185, 46,209,239,185, 84, 36,225,229,182,198,237, +146,196,200,177,131,251,120,102,254, 63,255,150,164,183,185, 28,195, 6,246,223, 82,163, 86, 66,193,132, 87,231,245,251,237,236, + 69, 0,248, 49,128,100,194,230,205,155,185,119,222,121,103,250,243,207, 63,239, 40, 99,230,223,197,251,249, 61,226,141, 12, 52, + 5, 32, 37,162,252, 32,156,128, 29, 0,198, 2, 40,157,209,251, 36, 60,201,128, 33, 65, 28,183,235,135,207,150,221, 59,248,133, + 89,219,204, 6, 59, 12, 38, 43, 12, 6, 43,206,252,180,190, 11,136,130,210,211,200, 97, 19, 11,175, 10,137, 42, 8, 9, 26, 24, + 90, 68, 65, 15, 23, 44, 51, 99, 95,175,235,124,245,213,230,241,241,241,154,158, 61,123,138,110,183,155,142, 29, 59,134, 85,171, + 86, 57,126,254,249,103,206,237,118, 95, 41,109,252, 1, 64, 35, 67,174, 88,120,213, 24,175,134, 62, 65,141,211, 45,107,224, 20, +128,204,153,154, 25, 15, 11,175,190,154,146,144,144,208,164, 87,175, 94, 78,183,219, 45,241,234, 21,236,221,187, 87, 46,138,226, + 55, 40, 35, 17, 85,169, 84, 62, 53,111,222, 60,121, 70, 70, 6,166, 76,153,162, 60,123,246, 44,142, 29,243,228,247,125,253,245, +215,174,213,171, 87,231,217,237,246,206,193,212,229,240,193, 24, 59,174, 82,169,214,127,252,241,199,237,228,114,249,122, 0,152, + 57,115,230, 83, 78,167,243,229,218,181,107, 55,235,222,189,187,192, 24,147, 28, 63,126, 28, 95,126,249,101,225,238,221,187,165, +110,183,251, 7,198, 88,185,223, 31, 68,116,191, 76, 38,251,196,233,116, 62,206, 24, 11,249,253, 44,141, 90,173,198,119,223,125, + 7,158,231,241,196, 19, 79,224,208,161, 67,232,222,189, 59, 54,109,218,132, 3, 7, 14,132,195,255,165,240, 15,255, 7, 42, 10, +116, 91, 95,177,106,222, 85, 96, 41,109,240, 75, 71, 1,130,129,147,200,165, 0,192, 73,149,234, 50,198, 27,242, 30,252,242,244, + 42,163,201, 75, 73, 10, 0, 82, 57, 87, 45,122,254, 56,138,132, 91,225,193, 95, 33,162,250,190,223, 43, 35, 96,179,217,226, 42, +218,234, 23,106,100,129, 49,182,158,136,142,205,155, 55,111,211,222,189,123, 27,124,245,213, 87, 42, 0,176,219,237,237, 23, 44, + 88,176,102,199,142, 29, 77,215,173, 91,167, 10, 86, 79, 16, 4,152, 76, 38, 12, 26, 52,200,122,242,228,201,243,118,187,125,164, + 92, 46, 63,107,177, 88, 48,108,216, 48,235,161, 67,135, 50,109, 54,219, 96,198, 88,149,118, 45,132,138,156,231,156, 86,187,221, +185,231,178, 67,162, 80, 69,152, 93, 18,153,242, 92,174,149, 4,121,180, 81, 38,215,232,244, 54,183,181,192,104,119,170, 34,107, + 20, 64, 30,161,187,126,163,208,106,182,217, 93,229, 24,107,171,213,106, 53, 21, 21, 21,249, 30, 23,224,201, 3,128,223,125,255, + 89,188, 19,158,100,220, 96,120, 13,192, 1, 34,226, 1, 44,247,234,140, 5,240, 28,128,222, 65,106, 20,227, 22,132,151,207, 31, +253,229,215,111,230,164,112, 13, 59, 63,112,216,230,132, 59,227,224,198,123,117, 87,207,118, 3, 19,187, 7,163,161,149,193, 38, +101, 86, 71,207,122, 48,203, 24,204, 16, 97,153, 17, 61,189,177,174,176,176,229,185,115,231,120,141, 70,131, 31,127,252,145,211, +233,116,174, 67,135, 14,137,118,187,253, 6, 99,236, 56, 99,172,204,216,179, 86,134,235,188,104,203,239, 85, 27,151,101, 18, 79, + 18,224,235, 17,211,255, 81, 84, 88, 56, 35, 61, 61, 93,173,209,104,176,121,243,102,153, 78,167,179, 28, 58,116, 72,112, 56, 28, +123, 25, 99, 83, 25, 99,101,126,118,236,118,251,165,237,219,183,183, 51,155,205,184,114,229, 10, 92, 46, 23,210,211,211,113,234, +212, 41,113,245,234,213,185, 94,227,159, 19,234,107,103,181, 90,159,240,253,254,250,235,175, 79, 46, 42, 42,122,235,220,185,115, +106,149, 74,133,173, 91,183, 74,117, 58,157,245,240,225,195, 14,187,221,126,128, 49, 54,153, 49, 22,112,205, 8, 0,136,168,127, + 84, 84,212,250,119,223,125, 87,253,252,243,207,111, 33,162,129,140,177,159, 67, 29,151, 63,254, 97,255,175,190,250, 10, 13, 27, + 54,196,183,223,126, 27, 94,251, 15,130,144,114, 0,254, 12, 56,157, 78, 75, 89, 97,127,159, 83,192,113,213,146,223, 88,173,123, +240,111,145,102, 72,122,228, 87, 7,160,253, 43,141,254, 85,193,185, 21,214, 1, 40,141, 55, 15, 32,232,217,121, 48,248, 71,136, +168, 84,125,128, 80,116, 24, 99,151,137, 40,249,192,129, 3, 11,155, 55,111,254,164, 40,138, 74, 0,215,140, 70, 99,167, 99,199, +142,189,219,188,121,243,103, 4, 65, 8, 42,106, 97,183,219,249, 6, 13, 26, 88, 29, 14,199, 50,139,197,242, 50, 0, 94, 16, 4, +174, 97,195,134, 86,139,197,178,220,106,181, 78,174,104,134,116, 43,144,203,248,194, 24,141,202, 16, 95, 51, 70, 83,104,135,178, +118, 66,252,217,250,117,235, 94, 95,191,239,183,102, 70,187,219,246,204,152,145,223, 67,166, 54, 60,245,210,236,251,114, 11,138, +108, 91, 54,126,183,116,220, 51,207,151,183,109,239,200,136, 17, 35, 78,143, 29, 59,118,224,172, 89,179, 4,120,178,253, 69, 34, +234,230, 93,243, 63,226,189,127,143,247,126,102,176, 53, 16, 24, 99,153, 68,212, 27,158,100,192, 67, 0, 84, 0,182, 1, 8,121, + 7,128,159, 94,247,236,243, 39,231, 94, 63,119,252, 69, 6,166, 36,146,108, 7, 19,131,218, 1, 0, 0, 81,114, 88, 0,216,101, +158,170,135,150, 87,213,175,196, 22,228,230,182,106,210,164,137,164, 93,187,118,216,178,101, 11, 56,142,195,254,253,251,153, 32, + 8,251, 24, 99, 55, 42,208,187, 2,224,134, 76,226, 9,251, 79, 83,188,210, 35, 63, 39,231,245,123,238,185, 71,149,156,156,236, +211,163, 3, 7, 14,184, 5, 65,120,176, 34, 35,105, 54,155, 31, 31, 49, 98,196, 26,167,211,217,168,123,247,238,152, 56,113,162, + 50, 33, 33, 1, 43, 87,174, 52,219,237,246, 57,149, 49,254,254,188,250,234,171, 67, 10, 10, 10,102, 55,110,220, 88,149,156,156, +140,173, 91,183,226,216,177, 99,116,240,224, 65, 38, 8,194, 8,198,216,238,138, 52,136,232,111,145,145,145,223, 29, 61,122, 84, + 45,147,201, 48,127,254,124,117, 74, 74,202,102, 34, 26,204, 24,251,169, 50,227,210,235,245, 37, 66,255, 82,169, 20, 57, 57, 57, + 80,171,213, 97,227, 95, 5,254,148,175, 28,199,113, 89, 61,123,247,254,160,162,243, 36, 18, 73, 86, 69,231,104, 20, 58,220, 83, +235, 8,234,117, 73,197, 35,255,215,152, 1,128, 75, 96, 66,230, 57,211,191, 25, 99,139, 40,196, 61,248,113, 98, 30,250,186,246, +225, 65,126, 51,222,118,101,174, 41, 0, 0, 32, 0, 73, 68, 65, 84,107, 61,157, 1,128,195,205,132,212, 2,199,191,191,187,193, + 22,121,103,234,243, 0, 44,132,119,230, 94,158,158,202,236, 64,131, 92,194, 3,121,102,188,215, 90, 89,101, 61,230, 87, 7,160, + 60, 3, 90, 69, 35,126,184,146,207, 3,112,243, 86, 63,255, 37, 0,223,152, 42, 59, 54,175, 81,158, 72, 68,219,181, 90,237, 51, + 70,163, 81,240,134,110,167, 16,209, 14,173, 86,251,162,209,104, 44,175, 6, 0, 0,216,212,106,245,206,162,162,162, 15, 25, 99, + 91, 0,207,235, 21, 17, 17,177, 53, 63, 63,127, 25, 99,236,251,202,140,173, 58,144, 75,121, 51,152, 88,208,167, 83, 11,211,249, +124, 7,107,215,170,197,185,102,247, 52,206, 94,185,249,151,182, 58,139,103,205, 31, 50,181, 33,251, 70,161, 53, 43, 39,207, 6, +121,132,126,197,202, 85,229,149,236, 53, 1, 48,184, 61,133, 0,252,207,115,122,239,251, 71, 6, 66,222, 85,194, 60,251,243, 71, +133,250,188, 10,244, 42,237, 84,199,169, 96,134, 27, 14,112,176, 76,176,254, 83,106,200,185,212,181,121,243,230,146,168,168, 40, +108,218,180, 9, 63,252,240, 3, 36, 18,137, 91, 16,132,227, 21, 25,127, 0,168,165,194, 37,120,170, 44,101, 62,103,123, 38, 82, +151,125,105,101, 82, 82,146,202, 95,143,227, 56,171,203,229,250,119, 48, 51,100,198,216, 25, 0,173,136, 72,113,224,192,129,162, + 97,195,134, 33, 42, 42, 10, 29, 59,118,212,166,167,167,143, 1,176,164,178,215,254,236,179,207, 54,213,233,116,171,147,146,146, + 84, 49, 49, 49,248,241,199, 31,177, 97,195, 6, 72, 36, 18,171,203,229,154, 30,164,241,239, 23, 25, 25,185,225,232,209,163,106, +185, 92,142,140,140, 12,116,235,214, 13,203,150, 45, 83, 63,251,236,179,155,136,104, 8, 99,108, 79, 40,227,226, 56, 14,177,177, +177, 65,159, 31,206, 3, 8,158,219,226, 0, 84,247,174, 2,183,219, 93,183,186,198,214, 62,233, 26,251,239,216, 58,244,237, 17, + 51,156,174, 98, 89,233,247,159,103,190, 10,192,103, 96,131,222,131, 63, 68,117,150,205,157,248, 2, 33,235, 58, 16, 27, 93,172, +247,250,209,194, 87, 1, 44,242,134,233, 83,224,153,185,167, 16,209,145,242,180,219, 57,229,172,255,125,171, 8, 59,255, 6,180, +150, 84, 89,207,143,138,182, 21, 86,101,219,225,186, 42, 60, 55,232,237,125, 85,193,107,164,191, 47,117,108, 11,128, 45, 65, 60, +215, 1,224,129, 82,199,220, 0, 6, 86,231, 24, 43, 3,199, 73,148,135,143, 28,151,117,235,216,254,151,238,170,104,195,234,157, + 71, 91, 29,186,112, 35,246,185,113,143,110,128, 44,194,240,228,212, 55,250,102,223, 40,116, 46,249,207,162, 79, 26, 39,181, 42, + 34, 9,255, 52, 0, 48,198, 62, 14, 32,217,224,225,135, 31,206,121,240,193, 7, 87,174, 89,179,198, 77, 68, 93,189, 57, 0,190, +153,127, 99,239,253,171,222,251, 81, 68, 36, 4, 10,137,255,209,233, 88, 3, 38, 72, 32,140,202,121, 76, 85, 80,112,185,159,201, +100,146, 92,186,116, 9,151, 47, 95,134, 94,175,119,139,162, 8, 81, 20, 47, 2, 40, 55, 4, 94,172, 23,135, 11, 0,140,143,101, +143,172, 87, 84,148,177,211,100, 50,169, 50, 50, 50,144,153,153,201,244,122,189, 93, 20, 69, 18, 69,241, 19, 0, 1, 51,245,203, +130, 49,102, 87,169, 84,151, 14, 31, 62,220, 34, 57, 57,153,118,236,216, 97,177,217,108,159, 85,252,204,178,121,244,209, 71,239, + 45, 42, 42,218,105, 50,153, 84,151, 46, 93, 66,102,102, 38,116, 58,157,141, 49, 6,151,203,181, 10, 65, 58, 22, 18,137,100,211, +138, 21, 43,148,114,185, 28, 23, 46, 92,128, 90,173,134, 82,169, 68,175, 94,189,240,205, 55,223,168, 31,126,248,225, 31,225,137, +244, 4,141, 40,138,112,108,120, 9,211,246,137, 32,162,226, 74,175,190, 60, 28,255,234,175, 68,132, 25, 51,102, 84,230, 37,184, + 43,161, 32,163,117,127, 89, 26,180,111,181,182,199,128,164,225, 14,227,241,226, 25,165,224, 16, 45, 87, 47,154, 83,124, 89,247, + 20,100, 99, 28, 0,232,152, 88,127,237,136, 54,245,135, 75,175,167, 22,235,217,220,204,114,162,208,145,178, 46,143,125, 20,234, +154,253,128, 38,138,181,195, 90,199, 15,183, 94,204,171, 22,189,219, 1, 17, 37, 84, 53, 20, 25,166,114,196,199, 68,236,141,138, + 80,171, 53, 17,234,227, 82,169, 76,111,176,218,155, 48,144,165,110, 98,194,247,188, 92, 94,116,242,244,185, 30, 86,155,195,154, + 16, 31,255,225,233, 51,103,156, 68, 52, 1, 8,236, 0, 16,209, 28,120,214,230, 15,193, 19, 13,168,231,253,121,204,251, 51, 6, +128, 29, 64,182,119,109, 70, 5, 64, 96,165,106,226,255,105,120,129, 56, 44, 98, 98,199,142, 29,251, 26, 12,134, 26,122,189,222, +166,215,235, 45, 46,151,203, 0, 79,133,195, 92, 22,100,125,126, 0, 96,147, 73, 78, 11,153,163, 67,135, 14,219, 12, 6, 67, 87, +189, 94,159,173,215,235, 47,185,221,238,179, 0, 46, 2,216,201, 24,187, 80,153,161, 18, 81, 11,181, 90,253,165, 32, 8, 13, 57, +142, 91,110,183,219,167,150,149,136, 24, 12,254,227, 51, 24, 12,151, 93, 46,151,111,124,187, 25, 99, 65, 79, 6, 42,170,219,175, + 80, 40,242,108, 54, 91, 72, 14,190, 76, 38,115,243, 28, 56,135, 16,220,165, 73, 36, 18,209,233,116,134,195, 0, 65,112,215, 59, + 0, 97,194,132, 9,115,171,137,141,141,165,252,252,252, 63,236,151,237, 31,121,124, 68,164, 0, 16,116,101, 55, 0,118,198,152, +253, 86,141,231,175, 68,216, 1, 8, 19, 38, 76,152, 48, 97,238, 66,254,204,165,128,195,132, 9, 19, 38, 76,152, 48,149, 36,236, + 0,132, 9, 19, 38, 76,152, 48,119, 33, 97, 7, 32, 76,152, 48, 97,194,132,185, 11, 9, 59, 0, 97,194,132, 9, 19, 38,204, 93, +200,159,178, 16, 80,152,187, 27,242, 22,237, 15,182,226,220, 31, 17,171,213,154, 80,149,231,171, 84,170, 59,182,205,146,136, 54, + 1, 24,228,189,187,153, 49, 54,168,188,243,195,220,221, 16, 17, 7,160,150,247,110,126,101,183, 42,134, 9, 13, 34, 74, 2, 48, + 2,158,109,188, 12, 30,123, 63,199,255,245, 15, 71, 0,238, 50,136, 40,134,136,222, 34,162,183,137, 40,198,123,108, 19, 17, 49, +239,109,211,157,212,171,224,111, 53, 32,162,245, 26,141,198, 16, 29, 29,109, 34,162, 31,136,168, 89,117,233,223, 41,148, 41,177, + 39, 85,147,213,217,170,201,234,108,101, 74,236,201, 59, 61,158, 32, 24,148,158,158,142,244,244,116, 0, 24,232,253,130, 15, 83, + 14, 50,153, 44, 67, 46,151, 47, 35,162,200, 59, 61,150, 59,192, 47,181,106,213,202, 73, 72, 72,200, 1,112,224, 78, 15,230, 46, +226, 49,198,216,108, 0, 17, 0,230,195, 99,239, 75, 84, 80, 13, 71, 0,238, 62, 94, 24, 55,110,220,244, 26, 53,106,224,253,247, +223, 31, 72, 68,221, 0, 12,242,245,246,214,104, 52,131,136, 40, 2,192, 96,120, 74,170,246, 6,176, 27,192, 63, 24, 99,198,178, +244,198, 62,252,192,244, 26,145, 17, 88,248,249,186, 98, 61,241,215,207, 0,155, 30, 92,159, 41,161,234,149, 9, 17,213,213,104, + 52, 39, 7, 14, 28,104,237,222,189,187,132,227, 56,183, 78,167,107,255,201, 39,159,156, 32,162,118,140,177,244, 42,188, 38,119, + 20,114, 90, 99,177,204,219,252,232, 25,138,253,199, 63,254,241, 53, 99, 12,105,105,105, 39, 85, 42,213,254, 45, 91,182,236, 87, +169, 84, 65, 69, 59, 84, 42, 85, 42,199,113,117,125, 85,210,124, 29, 14,189,213, 44,175, 25, 12,134,144,138, 68, 17, 81, 67, 0, +245, 43, 56,173,159,183, 15, 0,224,153,225,157,174, 72, 87, 42,149,230,186, 92,174, 56,239,239,121, 78,167, 51,190,188,227, 55, +177,244, 62, 5,128,246,240, 20, 34,242,225,132,231, 11,206,255,152,205,123,243, 63,166, 7,176, 11,207,238,186,109,189, 26, 4, + 65,104,212,185,115,231,177,199,143, 31,127,148,136, 38, 1, 88,241,103,142, 96,149, 7, 17, 53,145, 72, 36, 95, 2,144,187,221, +238,231, 1,116, 62,122,244, 40, 12, 6, 3, 90,181,106,117, 47, 17,245, 36,162, 69,241,241,241, 44, 39, 39,103,164,183,124,115, +152,234,199, 87,210,220, 12, 79, 4,192,129, 82,109,191,195, 14,192,221, 71,124,147, 38, 77, 48,125,250,116, 20, 22, 22,182, 91, +177, 98,197, 77, 37, 72,229,114,249,141,190,125,251, 42,135, 12, 25,130, 62,125,250, 96,234,212,169,143,108,221,186,245, 43, 0, +223,149,169, 87, 55, 30,211,159,121, 4,133,133,133,237, 86,110,220,227,209,179, 22, 1, 54,189, 71, 79, 42,185,209,191,195, 61, +202, 71,122, 36,225,239,201,245, 49, 97,241,143,143,108, 56,116,177, 76,189, 17, 77, 61,141,127,214,189,216,211,115,255, 67, 79, + 23,209, 39, 58,213,130,226,158,238,152,251,225,127, 12,209,209,209,187, 93, 46,215,218,221,187,119, 55,171, 91,183,238, 83, 79, + 62,249,228, 2, 0, 67,170,227,197,249, 35,176,114,229,202, 94,130, 32,192,233,116,246,218,186,117,235,136,222,189,123,111,156, + 56,113,226,194, 39,159,124,178, 66,135,137,227,184,186, 63,253,244, 83,156, 86,171, 5,199,113,144, 72, 36,224, 56, 14,118,187, + 29, 93,186,116, 9,105, 28, 68,244, 70,131, 6, 13,166, 55,104,208,160,196, 12, 95, 16, 4,140, 28, 57, 18,118,187, 29,173, 91, +183, 70,100,100,228, 14,192, 83,178,245,250,245,235, 32,162,215, 24, 99,115,202,211,118,185, 92,113, 70,163, 17,162, 40, 34, 42, + 42, 42,174,162,227,101, 80, 27, 57,191, 61,194,204,249,147,138,199, 27,211, 96, 37,220, 2,207, 12,215, 71,255,126,172,209,215, +112, 59,193, 12, 89,143, 21, 31,211,196, 47, 69,124,139, 75, 0, 42,116, 26,137,168, 79, 13, 41,102, 89, 69,180, 7, 0, 21,135, + 99,133, 2,102, 85,166,169,205,250,245,235, 21, 95,127,253,181,226,195, 15, 63, 92, 92, 88, 88, 56,153,136,198, 49,198, 78,132, +162, 65, 68, 60,207,243,135, 69, 81,252,216,237,118, 47,245, 29,151,201,100, 71,221,110,247, 10,183,219,189,200,119,204,231, 76, +241, 60,159, 39, 8, 66,192,234,123, 60,207,231,186,221,238, 56,137, 68,146,231,114,185,138,207,147, 72, 36, 47,242, 60,255,152, +195,225,232,234,119,236, 5,158,231,199, 57, 28,142,242, 74,183, 47,222,185,115,103,103,181, 90,141, 17, 35, 70,252,220,185,115, +103,200,229,114,236,217,179, 7, 73, 73, 73, 48, 24, 12, 63,127,241,197, 23, 48, 26,141, 24, 63,126,252, 82, 0,127, 11,229, 53, + 8, 19, 52,190, 46,157, 28,128, 88,120,122,119,148,136, 0,132, 11, 1,221,101, 16, 81,125,158,231,143,238,220,185,179,198,189, +247,222,139,113,227,198,225,198,141, 27, 96,140, 33, 42, 42, 10,131, 6, 13,194,128, 1, 3,160, 82,169, 80, 84, 84,132,173, 91, +183, 98,238,220,185,206,188,188,188,158,140,177,155,154,252, 16, 81,125, 94, 34, 57,186,227,147, 89, 53,238,109, 94, 31,227,102, +252, 7, 55,138, 12, 0, 19, 17,163, 81,226,161,110,205, 49,244,222,123, 16,169,224, 96, 48, 24,177,241,151,179,120,117,213,126, +103,118,145,165, 76,189, 17, 77,137,173, 59,127,115,163,159,136,136,136, 43,111,190,249,102,236, 11, 47,188,176,153,231,249,157, + 25, 25, 25,191, 14, 25, 50,164, 96,237,218,181,191, 13, 30, 60,152,207,204,204,212,252,153,102, 84,254, 57, 0,226,148,216,139, + 17,204,234,105, 79,172,172,233,254, 63,227,144, 84, 81, 20,209,173, 91,183,196,193,131, 7,215,205,201,201,177, 63,254,248,227, +159, 29, 59,118,236,109,223,115, 2,229, 0,104, 52,154,220,163, 71,143,198,173, 95,191, 30, 74,165,178, 68,151,204,137, 19, 39, +230, 21, 22, 22, 6, 93,134,149,136, 46,101,101,101, 53,172, 93,187,246, 77,143, 93,185,114, 5,122,189, 30, 17, 17, 17,136,138, +138,130, 32, 8, 16, 4, 1, 89, 89, 89,232,214,173,219,101,198, 88,163, 10,180, 25, 99, 12,235,215,175,199,136, 17, 35,138,155, + 59, 5, 58,126, 19, 75,239,107, 42, 94, 59, 58, 11,247,220,215,154,123,114,125, 43,113,249,240, 83,184,250,235, 53,184, 28, 18, + 52,234, 85,151,123,114,125,115,113,249,240,179,184,122,248, 58, 92,118,160, 81,175,218,197,199, 46,238, 62,195,213,105,255, 6, +158,221,245, 91,121, 99,140,146,211,156,134,117,234,190,184, 97,201,124, 85, 66,147,230,112, 23, 92,199,233,159,183,225,177,249, + 43,172, 5,122,227,135,122,135,123, 90, 8,175, 37, 43, 40, 40,192,193,131, 7, 97, 50,153,176,111,223, 62,182, 98,197, 10, 59, + 99,108,181,221,110,255, 55, 99, 76, 31,164,142,130,136, 44, 90,173,214,102,179,217,118, 56,255,159,189,235, 14,143,170,232,222, +239,236,173,219,211, 19,144, 18,138, 16,233, 82, 62, 58, 4, 16, 20, 2,210, 81, 65, 84, 68,253, 68, 5, 62, 16, 81,176, 16, 20, + 41, 98,143, 88, 64,233, 32, 63, 44,128, 8, 9,157,132, 30,164, 35, 16, 32, 64, 8, 33, 9, 1,210,118,147,173,247,252,254, 72, +118, 77, 66,178,217, 32,138,101,223,231,153,103,247,206,206,125,239,185,101,239, 57,115,102,230, 28,155,237, 9, 34,202,103,140, +145,159,159, 95, 65, 97, 97, 97,188,213,106,125,140,136,114, 25, 99,180, 97,195, 6, 68, 69, 69,121, 76,158,197, 24,163,181,107, +215, 98,192,128, 1,174,188, 44, 70, 73,146, 86,233,116,186,174,217,217,217,130,211,233, 20, 24, 99, 70, 89,150, 87, 26, 12,134, +174,215,174, 93,211, 86,194,183,230,185,231,158, 27,208,171, 87, 47, 24,141, 70, 4, 5, 5, 33, 53, 53, 21,215,174, 93,131, 70, +163, 65,189,122,245, 32,138, 34, 22, 44, 88,128,207, 63,255,124, 45, 17, 13,244,246, 58,250, 80,117, 48,198,238, 65, 81,194,173, +239,168, 76,154,105,159, 7,224, 95, 6, 34, 74, 97,140, 61, 50,116,232,208, 77,135, 14, 29,226,190,253,246, 91, 56, 28, 14,119, +201,201,201,193,207, 63,255,140,181,107,215, 34, 62, 62,190,208,102,179,197, 2,248,176, 60,101, 93,146,111,216,203,239,109,250, +101,105, 52,247,127,239, 60, 3, 56,108,128,179,168,228,231,229, 99,221,158, 19, 88,157,112, 18, 91, 14, 95, 42,180, 58,156, 30, +249, 92, 61,255,114,224, 84,171,213, 84, 80, 80,176, 54, 61, 61,253, 84, 68, 68, 68,102, 68, 68, 68, 88, 64, 64,128, 74, 81, 20, +165,162,157,254,234,120,224,129, 7,218,189,242,202,242,236,126,253,250,169, 71,143, 30,189, 59, 45, 57,109,230,170, 85,239, 29, + 7,128, 71, 31,125,180,217,214,173, 91,167,206,156, 57,179,211,184,113,227, 6, 60,240,192, 3,219,182,110,221,186,223, 19,159, + 43, 57,138, 44,203,248,244,211, 79,179,179,179,179,109, 64, 81, 70, 53,167,211,153, 90, 69,241,190,238,218,181,235,187, 53,107, +150,206,189,213,180,105, 83,204,154, 53, 11,115,230,204,193,241,227,199,161, 40, 10,136, 8, 68,132, 43, 87,174, 40, 0,150,121, + 67,110,177, 88,160,209,220,154, 23,166,162,250, 63, 19,140,177,200,230,117,106,140, 63,148,184, 95,195, 86,207, 0, 86, 78,132, +224,116,160, 85,173, 70, 56, 62,253, 73, 77,195,215, 23,142, 99,140,109,174,138, 39,192,117, 95, 20, 69, 65,223,190,125, 89,143, + 30, 61,212, 11, 23, 46, 28,177,125,251,246,161, 28,199, 77, 80, 20,101,145, 55, 70, 44, 99,140,126,252,241, 71,237,132, 9, 19, + 30, 58,115,230,204,105,198, 88, 20, 0,172, 95,191, 94, 51,113,226,196,110,199,142, 29, 59,195, 24,123, 24, 0,170, 85,243,110, +174,169,203,200, 99,140,181,145, 36,105,253,172, 89,179, 2,219,182,109,203,119,238,220,217,193, 24,107, 45,203,242,250, 57,115, +230, 4,117,236,216,145,111,221,186,181, 39,217, 84, 0,166,207,159, 63,191,111,231,206,157,249,228,228,100, 56,157, 78,183, 49, +106,179,217,144,155,155, 11,147,201,132, 47,191,252,210, 1, 96, 58, 99,140,243, 77, 12,188,243, 96,140, 73, 0,234, 20,111,254, + 12, 64,205, 92, 22,182, 11,174, 63,174,175,252,187, 10,128,103,253,252,252,242,187,116,233, 66,157, 59,119,166, 49, 99,198,208, +245,235,215,169, 99,199,142, 4, 32, 14,192, 35, 0,116, 85,226,211,107,242,187,182,168, 79, 93,155,215,163,241,131, 58,146, 18, + 55,157, 34,155,213,174, 26,223,103,157,169, 28,110, 9,192,186,241,227,199,155,151, 45, 91,246,243, 19, 79, 60,209,172,103,207, +158, 29, 18, 19, 19, 87,237,216,177, 35, 3,192, 15,119,251,122, 86,181,152,205,230,106,102,179,185, 90,195,134, 13,231,216,237, +118,101,229,202,149,151,187,117,235,214,199, 85,239, 42,221,186,117,235, 83, 48, 54,208, 65,207,129,232, 57,144,242,162,246,154, +217,108,174, 86, 17,175, 94,175,207, 72, 78, 78,166,121,243,230,145,159,159, 95,198, 29,120, 78, 26, 3,136, 44, 81,222,138,140, +140,164, 27, 55,110, 80,231,206,157, 9,192, 91,101,126,175,227, 37, 47,101,103,103, 83,124,124, 60,161,120, 65,135,167,250, 91, +202, 23,221,235,208, 91,193, 31, 41, 19, 65,215,198,128,250, 53,144,169, 77,221,128,204,179,227, 66,215, 40, 19, 65,174,114, 98, +236, 61,235,218,133, 27, 50,135, 55,145, 41,253,191, 69,117, 52, 45,236, 11,250,162,123,132, 39,249, 2, 5,236,188, 24,187,146, +148,121,255, 37,165, 31,138,202,195,140,148, 81, 53, 73,153, 53,152,126,120,161, 47, 5,234,228,157, 85,184,142,148,147,147, 67, + 9, 9, 9,180,105,211, 38,218,190,125, 59,237,218,181,139,246,239,223, 79, 75,151, 46,165,250,245,235,155,180, 90,237, 9, 0, + 45, 43,225,145, 85, 42,149,131,136,232,179,207, 62,163, 81,163, 70, 41,162, 40, 22, 20, 95, 43, 90,190,124, 57,141, 25, 51, 70, + 17, 69,177, 16, 0,157, 57,115,198,243,117, 44,150,237,212,169, 83, 4,128, 66, 66, 66, 10,142, 30, 61, 74,185,185,185,180,101, +203, 22, 2,160,132,134,134, 22, 28, 63,126,156,242,243,243,105,255,254,253, 30,249, 0, 28, 8, 14, 14,166,193,131, 7,211,153, + 51,103, 40, 38, 38,134, 80, 52,238,124, 13, 64, 86,207,158, 61,105,243,230,205,244,243,207, 63, 83,139, 22, 45, 40, 32, 32,128, + 80,148, 89,242,174,255, 39,255,105, 5,192, 8, 20, 37,241, 34, 0, 7, 80, 52, 36, 32,151,108,227,243, 0,252, 75, 65, 68, 11, + 24, 99,223, 37, 36, 36,180, 0,208, 75, 81,148, 41,118,187, 29,197,157,233,143, 0,196, 3,248,156, 49,214, 5,192,114, 34,138, +246,134, 47,254,232,249, 22, 0,122,129, 28, 83,224,176,128, 20,103,149,248,134,124,178, 11,223,191,248,219, 54, 99,172,102,120, +120,248,206, 17, 35, 70,212,205,203,203, 67, 74, 74, 74,183,215, 95,127,125,159,191,191, 63, 59,186,119,155,250,249,137,175,231, + 1,120,249,119, 94,142,187,134,166, 77,155, 54, 35, 34,150,144,144,144,181,100,201,146, 91, 86, 0, 44, 89,178,228,152,122, 70, + 45,174,228, 36, 65, 79,124, 46, 15,128, 36, 73,238, 58,215, 24,111,121,237, 61, 78,180, 3, 64, 37, 38,244, 21, 47,191,124,239, +137, 39,158,128,213,106,197,240,225,195,177,107,215,174,190, 0,222,161,226, 55, 78, 85, 96,179,217,202,237,233, 87, 84, 95, 6, + 87, 80,173,233,154, 66,155,115, 71,219, 89,199,102,252, 24,187,163,233,133, 11, 23, 66,158,158,252,180,101,215,164,238,238, 57, + 0,255,251,228, 72,151, 49,211, 99, 66,218,182,109,139,174, 61, 59,159, 59, 56,225,190,183, 13,106, 62, 29,192,101, 79,228, 5, + 10, 90, 86,175,215, 16, 88, 49,190,168,130, 23,128,192, 26, 64,224, 61,128, 32,161,117,131, 48, 20,216,156, 45,171,114,190, 46, + 15, 0, 99, 12,130, 32, 64, 16, 4,240, 60,143,214,173, 91, 99,195,134, 13,218, 31,126,248,161,241,204,153, 51,119,251,251,251, +199,100,103,103,191, 90, 25, 95, 80, 80, 16,250,244,233,195, 90,182,108,169, 62,124,248,176, 3, 0, 31, 24, 24,136, 65,131, 6, +177,182,109,219,202, 7, 14, 28,112,104, 52, 26,175,222,241, 90,173, 22, 47,190,248,162, 99,226,196,137,106,157, 78,135,179,103, +207,194,104, 52, 98,220,184,113,206,137, 19, 39,170,245,122, 61, 82, 82, 82,160,215,235, 43,163,250,207,161, 67,135,160, 40, 10, + 78,158, 60,233,190,143,130, 32,168,141, 70, 35,142, 31, 63,142,209,163, 71,187, 27,235,116, 58,228,231,231,123,157, 10,222,135, + 42,225, 27, 34,146, 25, 99,132,162,201,215,183, 12, 51,249, 12,128,127, 49,136, 40,135, 49,118, 77, 16,132,231, 95,120,225, 5, +216,237,118,244,232,209, 3,137,137,137,171,156, 78,103, 82,207,158, 61,219, 78,154, 52, 9, 79, 60,241,196,155,140,177,197, 68, +116,201, 43, 62, 78,245,252,171,131,218, 2, 14, 43, 30,110, 29,142, 61,167,210, 86, 57, 20, 74, 26,220,166,102,219, 79, 30,107, +134,246,239,108,243,138,143, 49, 86,187, 94,189,122, 9,137,137,137,181, 82, 83, 83,241,226,139, 47, 98,207,158, 61, 91,223,123, +239,189, 38, 60,207,115,125,234,241,181, 47, 92,184,214,132,136,170,234,218,254,203,128,136, 80,194,240,250,221, 96,140,193, 98, +177, 64,150,101,168, 84, 69,115,247,156, 78,103,232,254,253,251, 97, 52, 26,193,113,156,187, 88, 44, 22, 68, 68, 68,120,154,104, + 87, 22,163, 58,116,232,208,166, 87,175, 94, 72, 74, 74, 66,247,238,221,209,166, 77,155, 54, 7, 15, 30, 28, 5,160,202,185,232, +157, 78, 39,180, 90,173,215,245,165,240,252, 54, 59,128, 4, 45, 99,115,150, 47, 95,222,180,105,211,166,120,229,149, 87,104,119, +114,238,167,120,126,219, 62, 87,179,109, 99,216, 5,251, 55,223, 60, 55,124,248,112,213,156, 79,231,223,235, 55,104,208,127, 20, + 69, 25,231,141,124,142,107,151, 33, 40, 78, 64, 84, 23, 41,126,151, 1, 16, 88, 3,138, 83, 6, 88,133,195,224,229,130, 49, 6, + 89,150,193,113,156, 91,249,187, 12, 1,142,227, 32,138,162,215, 60, 0, 16, 24, 24, 8,158,231, 97, 54,155,193,243, 60, 1, 69, + 70, 1,199,113, 48,155,205,208,106,181, 94, 15,165,104, 52, 26,104,181, 90,164,164,164,160,118,237,218, 8, 10, 10, 2, 0,240, + 60, 79, 41, 41, 41,104,208,160, 1,130,130,130,220,207,148, 39,100,102,102, 98,199,142, 29, 8, 12, 12,116, 31,223,110,183,235, +178,178,178, 96, 54,155,225, 90,113,164,211,233,160,211,233,220,231,227,195, 93,192,221,118, 83,248,202, 93,117, 17, 85,103,140, + 93,142,137,137,161,148,148, 20, 90,190,124, 57, 37, 37, 37,209,119,223,125, 71, 79, 60,241, 4, 37, 38, 38,210,252,249,243,137, +231,249, 76, 0,188, 87,124,192,229,101, 47, 71,145,178,230,127,180,117,218,195,164,252,223, 51,244,203,140, 40,154,216,187, 33, +217, 22, 12,160,132,201, 29, 72,224, 88,197,124, 37,134, 0,234,212,169,115,250,230,205,155,116,233,210, 37,122,254,249,231, 73, + 16,132, 95, 75,182, 29,124, 47,168,170,231,252, 87, 41, 46, 23,127,131, 6, 13,230,220,184,113, 67,249,250,235,175, 43, 28, 2, + 48,191, 20,224,245, 16,128,193, 96, 56,232,231,231,151, 17, 16, 16,144, 97, 52, 26, 15, 22,223, 23, 58,125,250, 52,189,253,246, +219, 52,119,238, 92,154, 55,111, 30, 45, 90,180,136, 86,173, 90, 85,169,123,184,196,189, 21, 24, 99,233,155, 54,109,162,157, 59, +119,146,209,104,164,184,184, 56, 90,181,106, 21, 49,198,210, 1, 8, 85,124,246, 40, 45, 45,141, 46, 93,186,116,203, 16, 64,121, +245, 21,112,244, 30, 55,110, 28, 17, 17,125,251,237,183,212,174, 93, 59,106,223,190,189,173,125,251,246,182,135, 31,126,216,230, +250,222,174, 93, 59,199,146, 37, 75,136,136,232,213, 87, 95, 37, 0, 67, 43,147, 47, 80,192,206, 3, 51,199,144,242,198, 3,164, +140,137, 32,229,141, 30,164,124,244, 4, 41, 75,167,146,178, 97, 30, 45,155, 62,129, 2,253,140, 59,171,114,190,102,179,153,206, +158, 61, 75,167, 79,159,166,243,231,207,211,165, 75,151, 40, 45, 45,141, 54,111,222, 76,247,221,119,159, 73,175,215,123, 53, 4, +192,113,156,131,136,232,200,145, 35,244,214, 91,111, 41,178, 44,155,139,175, 21, 93,188,120,145, 62,254,248, 99, 69,173, 86, 23, +184,142,233,197,117,164,130,130, 2, 2, 64, 90,173,214,188,120,241, 98,197,108, 54, 83,118,118, 54, 1, 80, 52, 26, 77,193,162, + 69,139, 20, 69, 81, 72, 81,148,202,134, 0,190, 6,144, 17, 20, 20, 68, 43, 87,174,164,117,235,214,209,168, 81,163, 92,251, 80, + 76, 76, 12,133,134,134, 82,104,104, 40,205,157, 59,151,168,104, 39,175,158, 65, 95,169, 90, 1,176,185,248, 51, 17, 64, 47, 20, + 13, 7,136,165,218,220,109, 33,125,229,174, 62, 32,111,142, 31, 63,158, 46, 93,186, 68, 47,188,240, 2, 1,176,116,235,214,141, +182,110,221, 74,191,252,242, 11,125,245,213, 87,164, 86,171, 45, 0, 30,242,150,239,245, 97,237, 72, 89, 51,158,166, 14,106, 73, + 0, 44,253, 90,214,160,171,159, 60, 76,202,194,129,148,240, 74,123,210, 73,156,103,190, 98, 3, 0, 64,189, 49, 99,198,208,153, + 51,103,232,197, 23, 95, 36, 81, 20, 47, 1,168, 89,178,237, 63,193, 0,104,223,190,253,192, 37, 75,150, 92, 73, 77, 77, 85,134, + 14, 29,154,208,163, 71,143,135,178,178,178,170,103,101,101, 85,239,209,163,199, 67,125,251,246, 77, 72, 72, 72, 80,102,204,152, +113,165,125,251,246, 3, 93,251, 85,241, 62, 83, 82, 82, 18,205,157, 59,151, 62,251,236, 51, 90,184,112, 33,125,251,237,183,180, +110,221,186,170, 24, 0, 81,173, 91,183,166,179,103,207, 82,255,254,253, 9,192,185,190,125,251,210,222,189,123,169,105,211,166, + 4,160,111, 85,101, 74, 79, 79,167,226, 28,244, 84, 89,125, 5, 28,243,179,179,179,169, 42,176, 90,173,196,243,252,114, 47,228, +139,172, 27,226,103, 54, 47,152, 68,202,135, 35, 73,137,121,134,148,229,111,145, 18,251, 21,101,111,255, 63, 10, 14,244, 55, 1, +136,172,202,249, 22, 22, 22,210,229,203,151, 41, 37, 37,133,210,210,210, 40, 41, 41,137, 70,142, 28, 89,168, 86,171,115, 57,142, +123, 26,197,171,178, 42,225,145, 57,142,115, 92,187,118,141,162,162,162, 10,180, 90,237, 69, 0,141, 0, 80,126,126, 62, 61,242, +200, 35,133, 90,173, 54, 21, 64,115,151,210,245,198, 0,112,181, 3,208, 92,167,211, 93,121,250,233,167, 11,111,222,188, 73, 28, +199,217, 1, 52,211,233,116,169,195,135, 15, 47, 52,153, 76,222,240,221, 31, 18, 18, 98, 79, 76, 76,164, 45, 91,182,208,209,163, + 71,221, 6,128,201,100,162,244,244,116, 74, 79, 79,167,252,252,124,175,228,243,149,223, 87, 0,212, 64,209, 60,172, 91,230,189, +220,117,225,124,229,238, 21, 0,223,205,159, 63,159,118,238,220, 73, 0,110, 2, 8, 3,240,174,193, 96,112,116,239,222,189, 74, +202,223,197,183,230,181, 40,186, 56,111,120, 41,190, 0,173,224, 24,220, 50,172,114,229, 79,165,149,186, 90,173,142,191,255,254, +251, 73, 20,197,243, 0,106,223,210,190,156, 9,131,127,151, 82,178,151,159,255,156,198,236,234,225,155,199, 6, 58, 6, 15, 30, +188,111,208,160, 65,251,222,126,251,237,148,248,248,120,229,251,239,191, 47,168, 95,191,254,103, 37,247,169,226,125,166,243,231, +207, 83, 76, 76, 12,125,243,205, 55,180,114,229, 74, 90,187,118, 45,109,222,188,185, 42, 6,192,183,209,209,209,244,203, 47,191, +144, 70,163,113, 2,104,173, 86,171,157,113,113,113, 52,110,220, 56, 2,240,109, 85,101,202,202,202,186,165,135, 90, 81,125, 5, + 28,131,167, 76,153, 66, 68, 68,107,214,172,161,135, 30,122,200, 93,158,121,230,153, 82,219, 43, 86,172, 32, 34,162,119,222,121, +135, 0, 12,241, 70, 70,163,200,207,172, 25,228,103,250,126,220, 16,186,244,249, 36,186,184,108, 14, 45,155, 49,153,130, 3, 3, + 76, 70,189,126,102, 85,207,215,106,181,210,181,107,215, 40, 51, 51,147, 62,249,228, 19, 69,175,215, 23,232,116,186,175, 1,248, + 85,129, 71, 86,169, 84,202, 61,247,220, 99,214,233,116, 43, 1,104, 92,252,225,225,225, 38,189, 94,255, 35,138, 39,219, 2,168, +180,199, 94, 94, 59, 0, 58,163,209,184,166, 78,157, 58,102,142,227,236,174, 58,189, 94,255, 67,120,120,184,201, 11,190,173,235, +214,173,163,163, 71,143,210,146, 37, 75,232,192,129, 3, 62, 15,192, 93, 40, 0,186,160, 40, 10, 96,100,137,162, 42,213,230,110, + 11,233, 43,119,245, 1,121,239,181,215, 94,163, 99,199,142,145, 74,165, 42,196,111,113, 33, 26, 2,120, 28, 64,163,170,242,205, + 29,217,142, 44, 75, 71,146,138,225,182,248,202,246,234,139,173,215,242,221,203,255, 16, 3,128,158, 3,185,241, 28,232,208,161, + 67,180,127,255,126, 74, 72, 72,160, 89,179,102, 93,189,247,222,123,191,156, 55,111, 94,195,223, 99, 0, 92,188,120,145,190,254, +250,107, 90,185,114, 37,173, 89,179,134, 54,109,218, 68,187,118,237,242,234,229, 11, 64, 39, 8,130, 57, 33, 33,129,102,206,156, + 73, 0,182, 20,215,111,153, 50,101, 10,173, 88,177,130,120,158, 55,163,106,171, 70, 40, 63, 63,255, 22, 5, 85, 81,189, 7,158, + 79,190,255,254,123,178,219,237,212,181,107, 87,103,241, 75, 78, 46, 81, 90,182,111,223,222,102,181, 90, 41, 54, 54,150, 56,142, +251,170,138,215, 46, 50, 80,175,221,169,150,196, 60,181, 36,230, 5,250,251,237, 68, 21,122,254, 37,207,203,100, 50,209,158, 61, +123,168, 73,147, 38,249, 6,131,225, 24,128, 22,183,193,195, 27, 12,134,125, 28,199, 61, 89,178,222, 96, 48,236,225, 56,238,217, +146,117,106,181, 58, 3, 0,169,213,106,143,171, 65, 42,106, 39, 8,194,115, 70,163,113, 71,201, 58,142,227,158, 53, 24, 12,123, + 42,145,113,213,192,129, 3,233,233,167,159, 38,198, 88, 78, 96, 96,160,207, 3,112, 23, 10,128,205, 0,234, 3,216, 89,162,248, +134, 0,124,197,253,128, 60, 59,108,216, 48, 58,122,244, 40, 85,171, 86,141, 80,198,197,126, 59,124,207,117,191,151,148,165,143, + 82,173, 64,245,237,241, 85, 65,169,255, 19,134, 0,202, 51, 0, 30,122,232,161,248, 94,189,122,197,223,123,239,189,159,182,110, +221,122, 88, 86, 86, 86,245,178,115, 3,170,120, 95,232,212,169, 83,180, 98,197, 10,250,241,199, 31, 41, 46, 46,142, 18, 18, 18, +232,224,193,131,222, 42,217,208,186,117,235, 82, 98, 98, 34,117,232,208,129, 0, 60, 81, 92,255, 68,203,150, 45,233,187,239,190, +163,123,238,185,135, 0, 52,247, 86, 38, 89,150, 51, 80,228,114, 38, 89,150, 51, 42,171,247, 32, 27,111, 52, 26,247,156, 60,121, +146,126,250,233, 39, 2, 16, 93,230,247, 9, 75,150, 44,161, 11, 23, 46, 80,112,112,240, 47,101, 95,128,127, 86, 1, 64, 79, 61, +245, 84,161, 70,163,201, 97,140, 61, 5, 47,220,253,127,215, 2,192, 8,224, 75, 20, 77, 12, 13,113,221, 79, 34,159, 7,224,175, + 86,124,145, 0,255,197, 96,140,117,110,218,180,105,194,194,133, 11, 49,124,248,112,156, 59,119,174, 5, 17,221,118, 50, 26,198, + 88,231,255,212, 13, 72,216,255, 70, 87,180,120,107, 43,142, 95,201,175, 58,223,188, 46, 4,252, 22, 2,184,108, 72,224, 91,182, +203,137, 26,248,119, 64,201, 72,128,234,201, 33,199,152,221, 28, 12, 0, 36,104,179, 10,223,187,214,188,178,253,171,146, 13, 80, + 20,197, 12,187,221, 94,238,108,127, 89,150, 51, 11, 11, 11, 61, 70, 7, 44, 94,254, 23, 23, 22, 22,214, 43, 35, 35,227, 23, 0, +157,137,200, 82, 28,104,100, 93, 72, 72,200,131,215,174, 93,219, 6,160, 39,221,133, 23, 10, 99, 44, 84,171,213,206,151, 36,169, +250,205,155, 55,159, 36,162, 83, 37,126, 11, 11, 8, 8,248, 9,128,253,230,205,155,195,136, 40,237,207,150, 15, 0,180, 90,109, +178, 74,165,218,106, 50,153, 38, 19, 81,238,221,144,225,110,129, 49,246, 53,128,209, 21, 61, 26,197,121, 42,254,150,255,227,191, + 50, 24, 99, 77, 1,236, 42, 83, 29, 74, 68, 86,119, 27,159, 1,240,239, 6, 99,108, 71,181,106,213, 34,211,211,211, 55, 2, 24, + 84,242,225,184, 93,190,218,129,234,200,148, 27,133,119,132,239,159,138,191, 91, 58,224, 98, 35,160, 38, 17, 93, 46, 83, 47, 0, +240, 7,112,147,136, 28,229,238,236,195,191, 30,106,181, 58,195, 98,177,220,182, 17,234, 67,213,193, 24,203, 5, 80,234,154, 19, +145,165, 84, 27,159, 1,240,239, 70,113,232,206, 80, 20,101,113,251,221, 47,240, 59,205,231,131, 15, 62,248,224, 67,213,193, 24, +179, 16,145,236,169,141, 47,143,247,191, 28, 68,164, 16, 81,250,157, 82,214,119,154,207, 7, 31,124,240,193,135,219, 66, 23,198, +216, 1, 79, 13,124, 30, 0, 31,124,240,193, 7, 31,124,248,135,129, 49,102, 65, 81, 30,149,146, 80,151, 28, 6,240, 25, 0, 62, +248,224,131, 15, 62,248,240, 47,132,111, 8,192, 7, 31,124,240,193, 7, 31,254, 97, 96,140,229, 48,198, 44, 37,202,127,202,182, +241, 25, 0, 94,130, 49, 22,201, 24,139, 46, 46,145,119, 91, 30, 31,124,184, 91, 96,140, 25, 25, 99,147, 24, 99,171,139,203, 36, +198,152,209,203,125,249,134, 13, 27,158, 27, 53,106, 20, 49,198,110, 41,130, 32, 84,121,238, 8, 99,140,191,239,190,251, 42,228, +148, 36,201,107,206,202,228, 19, 69,209, 55,183,197,135,191, 11, 66, 1,248,149, 40, 91,139,151,238,186, 81,105, 54, 64,198, 24, + 7,160,151, 36, 73,207, 58, 28,142, 30, 60,207,111,183, 90,173, 11, 0,108, 34, 34,167,183,146, 48,198, 66,121,158,111, 28, 20, + 20,212,154, 49,214,220,110,183,215, 22, 4, 33,133,136,142, 93,191,126,253, 23,135,195,241, 43, 17,101, 86,237,252,254, 84, 68, + 42,118,203, 52,112,162, 43, 35,214,206,202,118, 40,190,118, 15,138,162,248,172,195,225,232,206,243,252,118,155,205, 86,229,107, + 87,130, 47, 28,192, 11, 0, 30, 68, 81,132,167,203, 40,138,241,252, 37, 17, 37,221, 6, 95, 43,163,209,248, 10, 99,172,173,201, +100,170,161,211,233,174, 16,209,129,220,220,220,185, 68,116,232, 54,248,218,202,178,252, 18,128,142, 54,155,173,134, 40,138, 41, + 0,118, 91, 44,150,143,111, 39,190, 0, 99,172,163,191,140,151,136,208,222,100, 71,117,131,136, 75,138,130, 61, 57, 54,124, 64, + 68, 39,171,202,231,195,239, 7, 99,172,189,159,159,223,215,131, 6, 13,178,212,170, 85, 43, 92,175,215,163,176,176,176,222,231, +159,127, 62,138, 49,246, 12, 17,237,243,176, 47, 31, 17, 17,113,116,211,166, 77,245, 23, 45, 90,132, 77,155, 54, 65,150,229, 82, +165, 97,195,134, 92, 21,229, 41,197,169, 40, 10, 28, 14, 7,114,115,115,145,147,147,131,220,220, 92,180,110,221,218, 43,206, 63, + 66, 62,192,115, 28,134,178,240,102, 73,220,157,230,243,225,159, 9,215, 18,236,226,116,192, 0,208,190,236,178,236, 10, 13, 0, +198, 88, 35, 73,146,158, 17, 4, 97,164,191,191,127,206,195, 15, 63,124,108,228,200,145,159, 45, 91,182,172,225, 79, 63,253,244, + 73,118,118,182,159, 44,203, 75,173, 86,235, 55, 37, 3,111,148,133, 78,167,139,149, 36,169, 78,131, 6, 13, 76, 13, 26, 52,184, +209,184,113,227,107,237,219,183,191,218,161, 67,135, 19,123,247,238, 13,220,183,111, 95,211, 95,127,253,181,199,217,179,103, 3, + 3, 2, 2,116,133,133,133, 23, 11, 11, 11,123,123, 58, 49,198, 24,253,209,129, 35,138,123,249,145,197,155, 59, 1, 0, 54, 51, + 32, 86,126, 88,198, 88, 35, 81, 20,159,225,121,254,113, 63, 63,191,236, 62,125,250, 28, 12, 12, 12, 92,117,253,250,117,109,108, +108,236, 71, 57, 57, 57,254,146, 36, 45,183,217,108, 95,123,186,118,101, 56,159, 1,240,110,157, 58,117,182, 50,198,110,206,152, + 49,227,149,233,211,167,247,183, 90,173,126,151, 46, 93,218,201, 24,123, 31,192,135,222, 4, 98, 97,140,241, 90,173,246, 93,163, +209, 56,246,141, 55,222,144,219,183,111,207, 26, 54,108,136,164,164,164,240,125,251,246,213,158, 49, 99,198,195, 58,157, 46,198, +108, 54,191,238,205,108,126,198,152, 40, 8,194,251,146, 36,141, 30, 61,122,180,166,113,227,198,144, 36, 9,103,206,156,169,127, +232,208,161,122,187,119,239, 30, 38, 8,194, 7, 14,135, 99,186, 55,134, 15, 99, 76,214, 8,248, 40, 64,198, 19,239, 15, 12,215, +116,104,217, 20,213,131,140, 56,127,254,236,189, 9,135,207,212,159,182, 45,111,168, 90, 96,239, 91, 28,120,155,136,238, 76, 30, + 93, 31, 42, 5, 99,204,232,239,239,255,245, 11, 47,188, 16, 58,106,212,168, 99,213,171, 87,255, 38, 47, 47,111,215,158, 61,123, +238, 91,176, 96,193, 43, 99,198,140,249,154, 49,214,161,162, 64, 55, 17, 17, 17,123,227,226,226, 26,215,170, 85, 11, 0,110, 81, +174,178,236,113,197, 82,185,136,136,136,216,187,105,211, 38, 55,167,221,110, 47,165,252,115,115,189,143,185,243, 71,200, 87, 44, + 83,168,201,100,170, 52,197,113,118,118, 54, 2, 2, 2, 42, 85,236,229,241, 93,188,120, 17, 75,151, 46,197,164, 73,147,220,245, +233,233,233,168, 94,189,122, 85,210, 61,251,240, 15,132, 75, 87, 22, 15, 3,248,149,156, 4, 88,174, 1, 32, 73,210, 94,181, 90, +221,160, 75,151, 46,199,198,142, 29,187, 48, 42, 42,234,154,235,183, 46, 93,186,236, 91,176, 96,193,190, 13, 27, 54,132,196,196, +196,180, 78, 72, 72, 72, 16, 69, 49,201,102,179,117, 44,143,203,108, 54, 63,180, 99,199,142, 73,178, 44, 91, 67, 67, 67,109, 70, +163, 81,148, 36, 73, 2,128,254,253,251,103,116,234,212,233,242,209,232, 94,155,111, 0, 0, 32, 0, 73, 68, 65, 84,163, 71,149, + 67,135, 14,105,114,115,115, 53, 51,103,206,140,246,116, 50,140, 49,106,211,166,141, 77, 20,197,249,118,187,253,249, 59,169, 0, +130,131,131, 35, 29, 14, 71,164,205,102, 3,199,113,145,246, 19, 63,117,133,168,131,170,126, 87, 0,216,169,210, 6,186,154,238, +172,136, 67, 16,132, 95, 69, 81,188,167, 99,199,142,251,198,142, 29,251,217,192,129, 3, 51, 0, 96,233,210,165, 53,159,120,226, +137, 84, 0, 9,107,214,172, 9,139,137,137,105,183,103,207,158,189, 60,207, 95,117, 56, 28,141, 60,201,197, 24,123,158,231,249, +177,203,151, 47,159,177, 99,199,142,250,109,218,180, 57,254,216, 99,143,101, 7, 5, 5,173,255,250,235,175, 91,124,245,213, 87, +111,244,237,219,247, 57,187,221, 46, 0,152, 93,217,121,106,181,218,119, 27, 53,106, 52,118,221,186,117,234,106,213,126,139, 71, + 19, 20, 20,132,142, 29, 59,178, 17, 35, 70,168,251,247,239, 63,246,212,169, 83, 0,240,106,101,124,146, 36,125,212,172, 89,179, + 81,243,230,205, 83,135,135,135, 67,163,209, 32, 53, 53, 21,181,106,213, 66,211,166, 77, 89,203,150, 45, 53, 43, 86,172,152,144, +149,149, 5, 0,111, 85,198,167, 23,241,101,183, 58,226,208, 85,115, 39,105,212,247, 15, 6, 76,153, 64, 94, 58, 26,132, 54,196, + 21,125, 11, 54,219,184, 77,187, 96, 71,242,203,167,110,192, 1, 96, 70,101,124, 62,220, 49, 60, 59,120,240, 96,203,200,145, 35, +143,214,171, 87,175, 7,128, 43,106,181, 90,172, 89,179,230,183,215,175, 95,215,126,250,233,167,253, 6, 12, 24,240, 44,128,247, +203,219,185, 93,187,118,109, 22, 47, 94, 12, 0, 56,118,236, 24,122,247,238, 13,181, 90,125,139,146, 45,209, 99, 1, 0,168, 84, + 42,167,211,233, 44,247, 93,213,174, 93,187, 54,139, 22, 45, 2, 0,156, 58,117, 10, 57, 57, 57,165,148,127, 85, 12, 0,111,228, +187, 93,104,181, 90,172, 91,183, 14,162, 40,186,139, 36, 73,165,182, 69, 81,252, 93,124,174,250,173, 91,183,194,223,223, 31,126, +126,126,183, 45,239,157,132, 44,203,155,172, 86,235, 59, 68,180,251,110,203,242,111, 66, 57,171, 0,218,123, 21, 8,136, 49, 70, +137,137,137,255, 11, 15, 15, 47, 12, 12, 12,212,170,138,125,222, 37, 97,179,217,148,163, 71,143, 90,183,108,217,226,247,198, 27, +111,188, 91, 81,143,188,152,107, 82,201, 58, 89,150,173,249,249,249,214, 13, 27, 54,248, 93,191,126, 93, 35,203,178,251, 33,158, + 57,115,102,180, 39,174, 58,117,234,216, 15, 30, 60, 40,108,223,190, 29,143, 63,254,248,122,155,205, 54,224, 78, 25, 1,245,234, +213,139, 62,191,224,191,211, 32,106, 17,248,240,155,184,177, 99, 62, 32,106,161,106,212, 39, 30,197,201, 20,136,104,167, 39, 14, +198, 24,133,135,135,239, 55,153, 76,134,145, 35, 71,238,152, 51,103,206, 9, 65, 16, 40, 54, 54, 54,184,119,239,222, 89,118,187, +157,189,250,234,171, 77,151, 44, 89,210,141,227,184,188,172,172,172,118,158,188, 25,197,110,255, 95, 22, 45, 90, 52,253,169,167, +158,186,254,208, 67, 15,245, 95,180,104, 81,108,181,106,213,108, 0,208,173, 91,183, 33, 63,255,252,243,247,235,214,173,211,143, + 24, 49,226, 29, 0,221,137,232, 87, 15,124,173,140, 70,227,174,211,167, 79,151, 82,254, 37, 97, 50,153,112,238,220, 57,116,239, +222,189, 48, 39, 39,167,179,167,225, 0,198, 88, 39,181, 90,189, 41, 62, 62, 94,211,184,113, 99, 40,138,130,180,180, 52, 92,185, +114, 5, 38,147, 9,102,179, 25, 55,110,220, 64,114,114, 50,190,248,226,139, 2,155,205,214,193,211,112, 0, 99,236,161, 48, 13, +190, 79, 89, 51, 67, 43, 52,238,139,244,140,116, 4,217,211, 33,154,174, 98,198,150,116, 28, 57,159,142,171, 87,175,226, 49,255, + 83,120,115, 91, 94, 65,158, 13,237,137,232,120, 69,124, 62,220, 57, 48,198, 86,207,152, 49,163,199,132, 9, 19,190,210,104, 52, +181, 0,172, 63,127,254,252,217,123,239,189,247,202,200,145, 35,235, 70, 71, 71,199,213,171, 87,111, 11, 17, 13,171, 96,127,218, +180,105, 83,185, 74,223, 85,158,124,242, 73,188,240,194, 11,144, 36, 9,178, 44, 67,146, 36, 52,111,222,188,194, 80,177,140, 49, + 82, 20, 5, 86,171,181, 84,207,255,218,181,107, 56,114,228, 8,146,147,147,177,100,201, 18,160, 40, 46,253, 91,158, 66, 1,123, + 35,159,193, 96,168,114,216,218, 98,143, 37, 24, 99, 80,169, 84, 16, 4, 1,162, 40, 66, 16, 4, 8,130,224, 54, 4,118,237,218, +133,106,213,170, 85,202, 95,146,143,231,121,240, 60,143,248,248,120,196,198,198, 98,218,180,105,240,243,243,131, 32, 8, 56,122, +244, 40,106,212,168,113,215,195,236, 22,207,195, 48, 89,173,214,222, 62, 35,224,207, 67,241,120,127,201,123,111, 45,235, 33,246, + 52, 7,128,191,116,233,146,254,242,229,203,206,106,213,170,229, 7, 7, 7,203,130, 32, 8,102,179,217,177,125,251,118,231,174, + 93,187,140, 68,100,168,138,213,234,130,197, 98,145,142, 29, 59, 70, 87,175, 94,213, 84,101,127, 34, 98, 28,199,173,120,249,229, +151,135,207,158, 61, 27,203,151, 47,239, 55,124,248,112,103, 81,148,210,210,144, 36, 41,211, 98,177,120, 28,251,170, 83,167, 78, +164, 40,138,145,162, 40,130,231,249,157, 6,131,161,200,205, 15,192, 96, 48,196,135,245,122,113,167,217,108,142, 84, 78,109,236, + 10, 81,219,213,229, 9,168, 76,206, 85,171, 86, 45, 58,120,240, 96,224, 87, 95,125,213,125,225,194,133,189,163,162,162,118, 14, + 31, 62,252,226,136, 17, 35,218,174, 95,191, 62, 82,175,215, 95,232,222,189,251,242,134, 13, 27,222,120,247,221,119,219, 85, 66, + 55,186,110,221,186,235,134, 12, 25,146,125,237,218, 53,193,108, 54,171, 11, 10, 10, 84, 73, 73, 73, 26,158,231, 21,171,213,202, +159, 58,117, 74, 8, 9, 9, 41,168, 93,187,246,234,148,148,148,241, 0,158,171,136,204,104, 52,190,242,198, 27,111,200,158,148, +255,141, 27, 55, 0, 0, 47,189,244,146, 28, 19, 19,243, 10,128, 71, 43,226,147,101,249,141,241,227,199,107,106,212,168, 1,198, + 24, 78,158, 60,233, 86,252,102,179, 25, 38,147, 9,118,187, 29, 70,163, 17,157, 58,117, 82,239,222,189,123, 50,128, 17, 21,241, + 5,170,241,230,146,209,205,181, 98,147,190,184,113, 45, 3,155, 79,100,160,153,148,142,251,229, 12,164, 93,205, 64,122,122, 58, + 50, 50, 50, 80,171,186, 5, 83,219, 66, 61,243, 0, 38, 0, 24, 85,201, 53,244,225, 14,193, 96, 48, 32, 55, 55, 55, 94,163,209, +232, 79,159, 62,125,161, 81,163, 70,105, 0, 12,249,249,249, 58,131,193, 80,233,254,101,149,107,131, 6, 13, 0, 0,121,121,121, +144,101, 25,122,189, 30,106,181, 26,146, 36,185, 75,101,176, 88, 44,238,222,126, 78, 78, 14,126,254,249,103, 68, 70, 70, 98,252, +248,241,208,235,245,152, 49, 99, 6, 18, 18, 18,250,141, 26, 53,106, 8, 99,236, 49, 34,218,232,173,124,119, 98, 8,192,133,109, +219,182,121,236,253, 87,245, 93, 90,150,207,133, 45, 91,182,192,207,207,207,171,107,247,103, 97,241,226,197,186, 81,163, 70,197, + 50,198,124, 70,192,159,135,251, 0, 28, 41,177,221, 30,192,254,146, 13, 42,157, 4,168, 40, 10,151,150,150,166, 47, 78,225,152, +183,110,221,186,106, 42,149,138,185,122,237,127, 54, 20, 69, 25,185,116,233,210,225, 42,149, 10,211,167, 79,199,119,223,125,135, +188,188, 60, 84,175, 94, 29, 54,155, 13,138,162, 64,146, 36,244,234,213, 43,212,229, 74,172,104, 34,140, 74,165,138, 60, 51, 49, +124, 26, 68, 29,186, 44,188, 22,169, 82,169,208,229,221,237,176, 90,173,208,235,245, 16, 4, 97,167, 74,165, 2,108,230,174, 85, +149,179, 77,155, 54, 55,218,180,105,243,221,165, 75,151,180,159,126,250,105,151, 65,131, 6, 61, 28, 26, 26,186,167,119,239,222, +159,133,133,133,153, 5, 65,240,150,170, 93, 68, 68,196,185, 53,107,214,132,133,133,133, 89, 20, 69, 97, 26,141, 70,241,243,243, +179,153,205,102,178,219,237,202,175,191,254, 42, 95,188,120, 81, 14, 13, 13, 53,167,164,164,120,148,149, 49,214,182,125,251,246, +229,246, 8, 92,202,255,198,141, 27,184,121,243, 38, 66, 66, 66, 24, 99,172,173, 39, 62, 34,106,217,164, 73, 19, 20, 22, 22,194, +100, 50,185, 75, 65, 65,129,251,187,217,108,134,162, 40,168, 81,163, 6, 83,169, 84, 30, 13, 30,179, 29,205,255,211,166, 13,144, +159, 9,131, 45, 3,247,114,233,168,175,202, 0,242, 50,240,106, 68, 58, 98,173, 25,168, 89, 35, 29, 81, 53,109,216, 45,128,113, + 42,116,170,252, 18,250,112,135,144, 88, 80, 80, 80, 47, 49, 49,241,126,142,227, 86, 62,250,232,163, 54, 0, 6, 0,250,113,227, +198, 13,206,200,200,184, 4, 32,209, 19, 65, 89,133,154,149,149,229, 86,252,138,162, 64,167,211,185,123,254,222, 26, 0,174, 94, +127, 78, 78, 14,214,173, 91,135, 9, 19, 38,192,110,183,227,232,209,163, 88,184,112, 33, 94,124,241, 69,180,111,223, 62,248,151, + 95,126, 73,111,213,170,213, 42,198, 88, 99, 34, 74,245, 70,190,146, 6, 1,199, 85,121,254, 95, 41,244,237,219,215,221,243, 47, +105, 0,184,206,115,199,142, 29, 85,226, 27, 58,116, 40,120,158,135, 40,138,216,188,121,179,187,254,145, 71, 30,129, 40,138, 56, +120,240, 96,165, 28,197,238,249, 94,149,181, 51, 24, 12,155,115,115,115, 31,172,146,128, 37,240,232,163,143, 34, 53, 53, 85, 55, +109,218, 52,159, 17,240,231, 97,127, 73,239, 79,121,115, 0,188, 94, 6,168, 40, 10,187,114,229,138,232,112, 56,238,170, 59,169, + 56,212, 44,250,247,239,143,169, 83,167,162, 89,179,102, 56,122,244, 40,178,178,178, 96,179,217,208,119,125, 63,200,178,140,240, +240,112,252,250,235,175,184,116,233, 18, 42, 74, 66, 81,172,220, 1,155, 25,106,181,186,235,206,255,214,238,154, 48,190, 9, 14, +188,209, 5,199,231, 14,238,170,209,104, 34,117, 58,221,206,208,158, 47,196,107, 90, 14, 2,128,200,170, 46, 1, 12, 15, 15, 55, +127,248,225,135,177, 60,207,231,245,236,217,115,163,191,191,191,185,138,167,220,188,109,219,182, 87, 70,142, 28,153,214,179,103, +207, 27,146, 36,217,170, 85,171,102,179, 88, 44, 74,118,118, 54, 41,138,226,244,243,243,203,175, 89,179,102, 86,189,122,245, 82, + 0, 68,120, 34, 51,153, 76, 53, 26, 54,108,120, 75,125,126,126, 62,174, 95,191,142,235,215,175,187,141, 0,198, 24, 76, 38, 83, +141,138,184, 24, 99,178,205,102, 11, 84,171,213,200,204,204, 68, 74, 74,138, 91,225,151, 84,254, 54,155, 13, 64,209, 28, 3,155, +205, 86,203, 3, 95,136, 66, 16,141,254, 1, 64,126, 6, 4, 83, 58, 58,232, 51,160,183,102, 0,249,233,168,205, 50,240,124,157, +116, 68,213, 44,154,200, 26, 17, 0,228,219, 80,219,187,203,232,195,239, 65,113,210,159,196,181,107,215, 54,230, 56,238,109,158, +231,159,238,215,175, 95,221,129, 3, 7,214,217,186,117,235,232,142, 29, 59, 62, 50,116,232, 80, 17,192, 2, 79, 60, 46,165,234, + 42,193,193,193,208,235,245,238,223,245,122,125, 41,229,171, 86,171, 43,149, 45, 39, 39, 7,217,217,217,184,124,249, 50,122,246, +236, 9,135,195,129, 35, 71,142,192,102,179, 97,217,178,101, 80, 20, 5, 38,147, 9, 6,131,161, 90,116,116,116, 38,128,143,189, +149,175,172,242,215,233,116,184,221, 37,134,241,241,241,136,143,143,199,174, 93,187,144,144,144,224, 46,241,241,241,216,185,115, +103,149,123,236,113,113,113,216,188,121, 51,182,108,217, 82,106,223,216,216, 88, 36, 36, 36,120,197,103,181, 90,223,145, 36,201, +244,237,183,223,150,155, 46,246,240,225,195,208,235,245,166,188,188,188,119,170, 36, 92, 57,104,215,174, 29, 98, 98, 98,116, 26, +141, 38,150, 49,230, 51,220,255, 2,168,212, 3,240, 87, 69,189,122,245, 96, 54,155,241,194, 11, 47,160,101,203,150,176,217,108, +168, 93,187, 54, 18, 70,196, 67, 45,203,120,234,169,167,112,248,240, 97,104, 52,154, 10, 57, 20, 69, 41,118,249, 51,112,156, 14, +176,150,212,205, 12, 26,141, 38, 82, 81, 20,216,237,118,100,110,120, 31,144,180, 93, 85,205,135, 68,194,139, 97, 0, 23,178,178, +178,164,220,220, 92, 1, 0,179,217,108,124,177,135,162, 42,107,137,207, 45, 92,184,176, 79,163, 70,141,126, 24, 50,100, 72, 6, + 80, 52, 91,248,250,245,235,200,204,204,132,205,102, 99,153,153,153,216,179,103, 79,112,108,108,108,127, 20, 45, 13,172, 16, 58, +157,238, 74, 82, 82, 82,120, 80, 80,144,187, 46, 63, 63,223,221,235,191,121,243,102, 41, 47,128, 78,167,187, 82, 17, 23, 17, 89, + 68, 81,204, 61,127,254,188,191,193, 96,184,197,245, 95, 82,249,187,228, 22, 4,225,170, 7,241,178, 24, 96,207,185,146, 36,248, +107, 2,144,153,153,129, 95,206,102,160, 33,151,142,122,170, 12, 32, 47, 29,112, 20, 25,175, 38, 59,240,235, 13, 64, 39,160, 66, +249,124,184, 51, 96,140,133,183,108,217, 50, 97,244,232,209, 53, 51, 50, 50, 48,117,234, 84,203,236,217,179, 31,158, 51,103,206, +120,189, 94,143,180,180,180, 75,205,155, 55,207, 56,115,230,204, 51,149,165,186, 45,169, 84,131,131,131, 97,183,219,193,113,156, +107,105, 45,230,204,153,131, 57,115,230,184,219,231,229,229, 85, 42, 95,118,118, 54,114,115,115,241,203, 47,191, 96,234,212,169, + 56,121,242,164,251, 24, 42,149, 10,146, 36, 65,173, 86, 67,165, 82, 97,216,176, 97,120,253,245,215, 59,123, 35, 95,121, 61,255, +167,159,126, 26,227,199,143,119,247,218,131,131,131,189,118, 11,244,235,215,207,221,243, 47,249,233, 58,206,198,141, 21,142, 76, +148,139,199, 31,127,220,237, 69, 88,183,110, 93,169,122, 89,150,145,144,144, 80, 41, 7, 17,237,102,140,245, 30, 53,106, 84,108, +106,106,170,174, 93,187,118,208,235,245,208,235,245, 56,117,234, 20, 70,140, 24, 97,202,207,207,191, 35, 61,118,189, 94,143,206, +157, 59, 99,242,228,201,186, 15, 62,248, 96, 9,128,122,191,151,211, 7,143,176, 50,198, 74,142, 91,217, 0,120, 61, 7,224, 47, + 13,139,197,130, 26, 53,106, 32, 56, 56, 24, 33, 33, 33,240,243,243,131,191,191, 63,242,243,243, 33,203, 50,190,254,250,107, 12, + 25, 50,196,163, 1,224,112, 56, 0, 91, 1, 0, 6,167, 83,141, 33, 63, 3,122,189, 10,118,123, 30,242,243,211,176,119, 74,167, +174,144,180, 93, 27,188,180,194, 61, 55,192, 75,217, 84,135, 14, 29, 10, 74, 75, 75,211,235,116, 58, 91,227,198,141,111, 48,198, +200,233,116,178,156,156, 28, 67, 70, 70,134,100, 52, 26, 11,195,195,195,189,153,162, 28, 47, 8, 66,216,218,181,107, 35,230,205, +155,215,233,244,233,211,141,122,247,238, 13,187,221, 14,155,205,134,212,212,212,251,222,123,239,189, 65,130, 32,220, 80, 20,229, + 87, 0, 41,158,200,136,232,192,190,125,251,106,119,236,216,145, 1, 69, 47,216,146, 74,223, 85,172, 86, 43,242,242,242,136,136, + 60, 38,147,224, 56,238,232,129, 3, 7,186,213,170, 85, 11, 78,167,179, 92,229, 31, 24, 24, 8,171,213,138,171, 87,175, 2, 30, + 92,196, 68, 68,193, 26,118,242,224,225, 99,255,233, 20, 92, 7, 83, 55,102,224, 92, 74, 58, 50,210, 51,240,115,143,116,220,171, + 45, 4, 0, 36,243,245, 48,244, 39, 11,114,179,210, 0,134, 61, 94, 92, 67, 0, 0, 99,172,155, 94,196,130,124, 27, 70, 84,118, + 94, 62, 20,129, 49, 22,222,170, 85,171,189, 59,119,238,172,118,238,220, 57, 76,154, 52, 9, 39, 78,156,232, 23, 21, 21,213, 2, +128, 43,178, 88, 34,128, 5,222,228,185, 47,169, 88,237,118, 59,202, 14,133,125,252,241,199, 24, 58,116, 40, 36, 73, 66, 80, 80, +144, 87,227,238,174, 33,128,228,228,100,136,162, 8,167,211,137,103,158,121, 6, 41, 41, 41, 48, 26,141,165,148,186,191,191,127, + 24, 0, 45, 99, 76, 42, 47, 85,181, 39,229, 15,252,102, 32,120, 59, 60, 81, 18,174, 94,126,121, 99,255,229,204,179,174, 20,235, +214,173, 43,197,231,194,250,245,235,171,180, 2,192,101, 4, 76,155, 54, 45, 54, 38, 38, 70,215,185,115,103,156, 60,121, 18,143, + 63,254,184,201,100, 50,221, 49,119,189, 94,175,199,201,147, 39,241,254,251,239,155, 76, 38,211,147,119,130,211, 7,143,232, 10, +160,176,196,182,247,113, 0,238, 20, 84, 42, 85,238, 59,239,188,211,254,245,215, 95,223,175, 82,169, 60,173, 81,103,113,113,113, +173,138,115, 24, 87, 10,215, 56,189,193, 96,128,209,104,132,193, 96,128, 94,175,135,221,110,135, 44,203,184,114,229, 10, 62,254, +184,200,211,167, 86,171,203, 13, 48,100,177, 88, 0, 91,209,178,244, 77, 15, 2, 16, 11, 1,169, 0, 16,181,120,248, 7, 42, 82, +250, 12,224,121, 62,190,214,163, 51,119, 22,247, 70,118, 86, 38,219,204,153, 51,187,134,135,135,103,182,107,215,238, 74,163, 70, +141, 92, 93, 24, 69,173, 86,219, 13, 6,195, 13,179,217,172, 77, 79, 79, 15, 77, 78, 78,174,239,197,169, 46, 57,127,254,252,158, +217,179,103, 71,119,237,218,245, 70,255,254,253, 7,188,242,202, 43, 27,156, 78,167,253,250,245,235,152, 61,123,182, 42, 42, 42, +234,199,211,167, 79,139, 73, 73, 73,179, 1,244,245, 68,150,155,155, 59,119,198,140, 25, 15,143, 24, 49, 66,173,213,106,221, 61, +253,235,215,175,187, 13, 1,171,213, 10, 34,194,162, 69,139,172,185,185,185,115, 61,241, 89, 44,150,247, 55,111,222,220,182, 73, +147, 38,154,208,208, 80, 88, 44,150, 82,202, 95,173, 86,195,223,223, 31,103,206,156, 65,124,124,124,129,213,106,253,196, 19,223, +245, 66,188,247,220,255, 93, 90,114,184,254,126,237,149,171, 34, 50, 50, 50,144,158,145,129,180,155, 5,184, 87, 11, 64,237,135, +237, 57,245,112, 46,125, 15,172,133,112, 58, 20,196,120,113, 13,193, 24,139, 12,210,139, 63, 45,125,117,168,110,216,244,149, 91, + 24, 99, 15,122, 10, 90,227, 67,105,229,127,241,226, 69, 44, 95,190, 28,123,247,238, 77, 34,162,173, 0,182,222, 14,167,203,197, + 46, 73, 18, 56,142, 43,242,194,149,128,107, 14, 64, 96, 96,160,219, 59, 80, 25, 92, 6,128, 70,163, 65,122,122, 58,244,122, 61, +126,248,225, 7,183, 18, 47,217,203,182, 90,173,233, 0, 2,202, 83,254,229,201, 87, 22, 26,141,230,182, 12,128, 27, 55,110,220, + 81,229, 95, 30, 31, 80,228, 13,185, 29,227,196,101, 4,140, 27, 55, 46,118,242,228,201,186, 98, 37,125, 71,199,234, 79,157, 58, +117,199,141, 10, 31, 60,226, 24, 0,137,136,108,140, 49, 17,128,189,108,131,114, 13, 0,158,231,143,247,233,211,231,217,255,254, +247,191,155,251,247,239,127, 75,143,210,245,192,254,250,235,175, 53,119,239,222,221, 69,165, 82,157,168, 72, 2, 69, 81, 90,197, +197,197, 45, 77, 76, 76, 28, 61,109,218,180, 53,173, 91,183,190, 81,150, 43, 61, 61,221,127,211,166, 77,189, 11, 10, 10,110, 16, + 81, 43,111,206,172,160,160, 0, 45, 91,182, 68, 80, 80, 16, 2, 2, 2, 96, 52, 26,161,209,104, 80, 80, 80,224,238, 53, 84,182, +252,165,160,160, 0,176,149,185, 4,197, 43, 10, 44, 22, 7,186,126,122, 18,133,133,110, 3,106,103,110,110,238,206,202,228,226, +121,254,232,254,253,251,255, 19, 17, 17,241, 99, 9,229,239,134, 74,165, 66, 64, 64,128, 57, 53, 53,149, 59,121,242,100, 55,149, + 74,117,164, 60, 30, 23,136, 40,137, 49, 54,235,209, 71, 31,125,234,171,175,190,250, 34, 32, 32, 32,115,219,182,109,161,247,221, +119,223,149, 35, 71,142, 24, 25, 99,249, 73, 73, 73,234,109,219,182, 61, 14,224,235,202, 34,248, 17,209, 33,157, 78, 23,211,191, +127,255,177, 95,124,241,133,154,136, 74,245,252,109, 54, 27,108, 54, 27,214,174, 93,107,177, 90,173,159,122,193,183, 81,150,229, +141,171, 87,175,126,120,192,128, 1,162, 36, 73,112, 58,139,140, 42,163,209,136,192,192, 64, 92,185,114, 5,171, 87,175, 46,116, + 58,157, 75, 43,251,227, 19,209, 15, 70,153,141, 28,191,244,224, 67,111,117, 8,150,190, 47, 52,163, 69, 61, 19, 34,107, 2, 48, + 84, 7, 66,239, 67,245,171,103, 32, 57,205, 78, 39,135, 37,118, 39,121,156,116, 6, 0,140,177, 46, 65,122,113,253,217, 29,223, +233,252,145,143,159, 46,108,215,247, 95,158,185,185,216, 8,216, 91,217,254,255, 86,220,115,207, 61, 49,241,241,241,213, 46, 94, +188,136, 37, 75,150,224,203, 47,191,188, 98,177, 88, 30,186, 93, 62, 89,150,157,101, 93,230, 70,163, 17,175,189,246, 26,180, 90, + 45,116, 58, 29, 66, 66, 66, 16, 24, 24, 8,167,211,137,242, 86,247,148,199, 57, 98,196, 8, 55,103, 68, 68, 4, 30,123,236, 49, + 20, 22, 22,222,210,155,151, 36, 9,223,124,243,141, 19, 40,223,107, 36,138,226, 45,242,185, 96, 48, 24, 48, 97,194, 4,132,133, +133,185, 13, 4,111,228, 3, 0,142,227,148,160,160, 32,175,180, 60,207,243,149, 46,105,246,196, 23, 29, 29, 93,101, 62, 23, 92, + 70,192, 7, 31,124,176,196,100, 50, 61,121, 39,149,244,145, 35, 71, 48, 98,196, 8,159,242,255,115,209, 6, 64, 12,128,182, 0, +126, 70, 81,204,148, 82,227, 66, 21,197, 1,224, 0, 60,197,113,220, 59,247,220,115, 79,250,132, 9, 19,182,118,236,216,241,218, +161, 67,135, 44, 7, 14, 28, 8,202,202,202, 10,218,183,111, 95,151,156,156,156, 16, 69, 81, 94, 7,176,196, 83,132, 55,198, 24, + 83,169, 84, 99, 85, 42, 85,244,131, 15, 62,184,227,205, 55,223,220,119,248,240,225,194,196,196,196,224, 3, 7, 14,180, 78, 74, + 74,234, 0, 32, 90, 81,148, 24,111, 34,217,121, 19, 10,211,155, 16,152, 28,199, 69, 59, 38,112,211, 32,105, 1,209, 85,116, 40, +189,173, 5, 36, 29,106,253,239,167,233,169,169,169,209,149,201,198, 24, 83, 1, 24,206,113,220,172,144,144,144,204,151, 94,122, +105,125,143, 30, 61,210, 31,120,224,129, 73,195,134, 13,123,255,202,149, 43,213,246,239,223,223,207,100, 50,133, 42,138, 50, 5, +192,138,202,206,153, 21,189,105, 94, 6,240, 74,104,104,232, 26,198, 88,173,126,253,250,173,254,254,251,239,135,216,237,246, 52, +147,201, 20, 5, 96, 17,128,233, 94, 70,238,227,181, 90,237,187,162, 40,142,125,225,133, 23,228,160,160, 32,166, 82,169, 92, 65, + 84,104,241,226,197, 22,155,205, 86,149, 72,128, 6, 73,146, 22, 11,130,240, 96,207,158, 61, 53, 53,107,214,132,193, 96, 64, 94, + 94, 30,210,210,210, 16, 23, 23,103,182,219,237,171,109, 54,219, 11,101, 3, 81, 84,196,103, 20,241,141, 70, 64,159,217,157,161, +233, 80, 29,168, 99, 4,146,178,129, 61, 87, 25,166, 36,144,217,234,196, 34,147, 29, 19,137,232, 22,171,182, 12, 87,231, 64,157, +184,241,236,206,239,116, 1,156, 5,244,243, 20, 64,109, 68,194, 85, 21,250,125,126, 44, 63,223,226,232, 77, 68, 94, 15, 35,252, +155,208,180,105,211, 43, 11, 22, 44,184,231,135, 31,126,192,231,159,127,126,165,160,160,160, 51, 17, 93,186,147,199, 96,140, 81, + 74, 74,138,187,151, 94,214,117,173, 40, 10, 84, 42,149, 87,107,217, 25, 99,213, 56,142, 59,189,111,223,190,220,144,144,144, 90, + 60,207,151, 50, 0, 50, 51, 51, 79,215,174, 93,187,134,195,225,104, 65, 68, 23,170, 42,103, 78, 78,206, 45,189,107,111,100, 83, + 75, 2,165,127,251, 50,230, 30, 42,154,235,224, 42,174,184, 0, 37,203,171,175,190,250,167,243,253,209, 96,140,145, 94,175,191, + 99,115, 9,124,240, 14,140, 49, 11, 17,201, 37,183, 1,148, 90, 5, 80,238,204, 79, 87, 1, 32,171, 84,170, 87, 56,142,187,209, +168, 81,163,221, 79, 62,249,228,236,144,144,144,253,140,177,155,140,177, 87, 0,200,158,246, 47,135,175,158, 32, 8,123,130,131, +131, 79, 15, 30, 60,248, 19,157, 78,119,150,227,184,189, 0,234, 85,133,231, 78, 21, 0,209,202, 4,144, 50, 73, 32,101,170, 31, + 41,209, 53, 72,153,217,144,148, 15, 90,146, 18,211,153,148,175,122,147,178,104, 8, 41, 43,159,164,144,144,144,232, 42,114,139, + 42,149,106, 34,199,113,215, 27, 52,104,176, 67,173, 86,167, 4, 4, 4,236, 96,140, 93,103,140, 77, 0, 32,222,134,188,141, 1, +204, 7,112, 1, 69,238,156, 43, 40, 82,252,173,110,243,252, 91, 25,141,198, 85,126,126,126, 23,121,158,183,251,249,249, 93, 52, + 26,141,171,126, 7, 95, 63,181, 90,189,135,231,249, 60,142,227,108,130, 32,228,200,178, 28, 15,160,199,109,242, 69,249,203,216, +161,229,145,205, 49, 56,117, 2,174,249,203,136, 3,208,206, 91, 14,145,131,249,236,151, 79, 19, 29, 90, 73,202,219,225,164,204, +109, 78,202,188,110,164, 44, 26, 76,241,211,251,145,200,115,230,187,241,236,253, 29, 10,128, 1,254,254,254,167, 4, 65,216, 13, + 32,252, 15, 58, 6,101,102,102, 82,110,110, 46, 89, 44, 22, 82, 20,229,150, 82,244,154,242,154,175, 15,199,113,121,111,189,245, + 86,242,249,243,231,147, 77, 38,147, 41, 43, 43,235,252,135, 31,126,152,196,243,124, 62,128, 71,110, 87,206,242,228,243, 70, 54, + 65, 16, 50, 80, 52,249,170,210, 34, 8, 66,198,159,205,247, 71, 23,131,193,176, 9, 64,167,187, 45,199,191,173, 0,176,148,221, + 46,171,179,203,245, 0,148, 99, 73, 24, 57,142,155, 66, 68, 79, 19,209, 66, 34,154, 69, 94, 76,248,169,128,139,169, 84,170,177, +140,177,201, 68,244,158,183,189,254, 63, 2, 37,227,253,203,178, 12,141, 70,131,226,160, 64,238, 97, 14, 87,114, 17,139,197,178, + 51, 59, 59,123,231,109, 28,195,192,113,220, 20, 69, 81, 94, 4,240, 25, 17,205, 38,162,202,167, 54,255,205,193, 24, 51,222,238, + 51, 82, 1,159, 76, 94,120, 15,202, 66,195,179,140, 66, 39, 42,244, 22,169, 37, 62,179,192, 98,247, 37, 75,185, 75,144,101,217, + 97,181, 90, 61, 14,244, 27, 12, 6,103,110,110,174,215,243,149, 24, 99, 53, 81, 20,142,184, 43,128, 16, 0,215, 1,236, 5, 48, +137,136,206,223,142,156,106,181,218, 97,177, 88,110,145, 83,175,215, 59,243,242,242,254,182,147,169,125,248,231,162,120, 62, 93, +201,119,223, 53, 0,193, 84, 98,254,139, 87, 6,128, 15, 62,248,224,195,223, 17, 21,205,246,247,193,135,127, 58, 24, 99,205, 80, +122,213, 85, 23,162,210,115,166,124, 6,128, 15, 62,248,224,131, 15, 62,252, 11,225,115, 93,249,224,131, 15, 62,248,224,195, 63, + 12,140,177, 8, 0,107,203, 84, 55, 35, 34,119,116, 54,159, 7,192, 7, 31,124,240,193, 7, 31,254, 97, 96,140,101, 1,184, 23, + 64, 54,128, 48, 20, 5,137,187,189, 92, 0, 62,248,224,131, 15, 62,248,224,195,223, 6,122, 34,202, 41,254, 94,238,132,108,159, + 1,224,131, 15, 62,248,224,131, 15,255, 66,252,237,230, 0, 20, 39, 55,144, 81,180,198,177,202,203,194,254,104, 48,198,196,136, +136,136, 61,233,233,233,173,115,115,111, 53,186, 84, 42,149,211,233,116,254,237,174,251,159,137,216, 3,231, 13, 38,107, 65,164, + 10,202,105, 5,170,251, 42,250,228,121,236, 31,216,161,217, 53, 79, 92,174,251,209,174, 93,187,214,139, 23, 47,190,229,119,223, +253,248,123,131, 49, 22,202, 24,155, 13,224, 49, 34,146, 84, 42,149, 35, 44, 44,108,119,126,126,254,211,121,121,121, 23,239,182, +124, 62,248,112, 23, 97, 44,254,108, 14, 32, 7, 64,175,178, 58,211,227,139,175, 56,126,112, 31, 0, 35, 0,116, 64,209, 90,218, + 21, 0, 54,150,156, 72,224, 9,222, 68,237, 43, 11, 73,146, 50, 45, 22, 75,185,107,179, 37, 73,186,234, 39, 65,147, 99, 69, 1, +128,128,170,240,254,209, 96,140,137, 13, 27, 54,220, 27, 23, 23,215, 42, 60, 60, 28, 27, 54,108,112, 71, 56,115, 69, 16,107,214, +172, 89,149,146,138, 75,146,148, 97,179,217,170,116,253,188,137,130, 88, 44,175, 31,207,243,147, 69, 81,236,238,112, 56,154, 0, + 32, 81, 20, 79, 88, 44,150,109, 14,135, 99,174, 55,241, 10, 24, 99,181,136,232, 50, 99, 44, 28, 69,217,166, 42,130,158,138,194, + 26,223, 71, 68,167, 61,113,102,228,230,126, 13,162,186,149, 29,155, 24,142, 2,120,198,131,108,238,251,177,120,241,226, 59,114, + 63, 60, 28,235, 29, 0,143, 1,200, 2, 48,159,136, 22,221, 9,222,170, 64,148,164, 12,187,135,103,197,211,255,170, 42, 96,140, +253, 12, 32,170,120,115, 3, 17,121,204, 63,225,129,199,143,231,249,201,146, 36,117,183,219,237, 77, 0,144, 36, 73, 39, 10, 11, + 11,189,126,254, 0, 76,235,214,173, 91,255, 37, 75,150, 72, 28,199, 33,245,215, 68,254,163,143, 62,142, 76, 75,187,178,139, 38, +178, 71, 1, 92,100, 31, 82,218,237,200,231,131, 15,127,115, 52,100,140, 37, 2, 80, 3,240, 3,112,203,114,216, 91, 12,128,226, +176,179,157, 0,140, 80,169, 84,195,122,244,232,225, 63,114,228, 72,244,234,213, 11,155, 55,111, 30,178,108,217,178, 33,219,182, +109,203,102,140,173, 70,145, 49,176,219, 83, 32, 31,187,221, 30,106, 50,153,160,213,106,189,146, 56, 43, 43, 11, 33, 33, 33, 21, +190,196,172, 86,171,255,213, 9, 6,112,179,243,170,150,237,226, 79, 64, 68, 68,196,238,184,184,184, 86,181,107, 23,165,168,119, +197, 12, 47, 89,120,158, 7, 99,140,188,237,121,218,108,182,208,195,135, 15, 67,230, 1, 81, 5,136,146, 12, 65,148, 32,202, 50, + 36, 73,118,111,131,169,220,121, 12, 24, 99,149, 26, 12,140,177, 7, 53, 26,205,138,247,222,123,207, 24, 25, 25,201,135,134,134, +194,102,179,225,220,185,115,237,183,110,221,218,234,195, 15, 63,252, 47, 99,236, 81, 34,218, 94, 9, 85,231,226,103,134, 1, 40, + 55,233, 82, 49,106, 51,198,186, 22,183,243,104, 0,100,155, 10,235, 62,214,189,121,171,111,183, 31, 59, 84,201,167, 71,193,202, +222,143,222,151,222, 47,202,254,104, 47, 0,236,133, 56, 63,116, 99,149,239, 71,121, 96,140, 53, 10, 14, 14,126,125,205,154, 53, +204,106,181,214,123,237,181,215,218, 49,198, 90, 3,120,233,247, 4,185,170,170,162,181,219,108,161,171,118, 30,131,200,243,144, + 4, 14, 34,207, 65, 20,126,251,222,242,222,123,170,100, 72,150,144, 35, 12,192,151, 0, 68, 0, 99, 1, 68,101,103,103,195,233, +116, 34, 40, 40, 40,138, 49, 86, 15, 64,140,159,159, 31,229,228,228,140, 38,162, 12, 47, 56, 31,212,106,181, 43,222,127,255,125, + 99,215,174, 93,221,207, 95,114,114,114,251,205,155, 55,183,250,224,131, 15,188,125,254,134,204,159, 63,223,127,215,174, 93,208, +104, 52,168,233,184,140, 37, 45, 78, 66,104,120,253, 30,226,229,159,152,195,210, 15,128,207, 0,240,225,223,136, 68,250, 45, 20, +112,185,222,242, 91, 86, 1, 48,198, 50,154, 53,107, 22, 58,114,228, 72, 12, 31, 62, 28,213,171, 87,191,101,167,171, 87,175, 98, +229,202,149, 88,182,108, 25,142, 31, 63,158, 73, 68, 21,246, 42, 24, 99, 68, 68, 88,179,102, 13,120,158, 7,207,243, 16, 4,161, +212,103,217,239, 13, 27, 54, 4, 85, 16,191, 90,175,215,159, 53,153, 76,247,234,116,186,115,249,249,249, 13,138,143,225, 26, 22, + 40, 11, 43, 17, 21,150, 83, 95, 82,190,234,178, 44,191,103,183,219,135, 56,157,206, 10,141, 10,158,231,109,178, 44,255, 96, 50, +153, 38, 19, 81,185, 57,232,253,252,252,200,229,246,175, 86,173, 26,126,248,225,135, 82,202, 95,150,101,244,237,219, 23,203,150, + 45, 67,179,102,205, 42, 60,199, 50,242,209,175,191,254,138,134, 75,219,130, 41,118,128, 20,128,168,184, 40, 69, 9, 73,168, 56, +223, 7, 47,131,205,202, 5,227, 37,143,220,140,177,222,141, 26, 53,250, 62, 46, 46, 78,163, 40, 10, 46, 94,188,136,154, 53,107, +130,227, 56,164,167,167, 35, 32, 32, 0,105,105,105,120,252,241,199, 11,210,211,211,251,121,122, 9,215,173, 91,119,237,133, 11, + 23,222,171, 91,183,238,107,161,161,161,151, 42,106,151,150,150,214,224,242,229,203,111,215,172, 89,115, 90,106,106,234,131, 21, +181,147, 36, 41,227,177, 73,179, 66, 35, 26, 55,196,133,228,203,168, 91,175, 86,133,159,231,146, 46, 96,197,156, 87, 42,236,213, +142, 26, 53,138,194,195,195, 1, 0,167, 14,237,193,170, 30,166, 34,229, 95,108, 4,164,141,222, 95,229,251, 81, 30, 24, 99,145, +145,145,145, 59,118,236,216, 1,139,197, 2,187,221,142,126,253,250, 33, 62, 62,254, 24,128,119,137,232,187, 42,112, 5, 1,104, + 82,188,185,195,245,255,100,140, 85, 42, 95,101, 30, 0,163, 86,202,205,126,206, 58,166, 68,149,147, 1,199,240, 33, 37, 85, 34, +211,218,203,151, 47,247, 55,153, 76,232,208,161,131,163, 69,139, 22,252,142, 29, 59,240,217,103,159, 97,214,172, 89, 40, 44, 44, +116,108,220,184,145,191,124,249, 50,198,140, 25,179,241,198,141, 27, 81,149,240,245,110,220,184,241,247, 91,182,108,209, 40,138, +130, 11, 23, 46,192, 98,177, 64, 16, 4,232,245,122, 4, 4, 4, 32, 53, 53, 21,143, 61,246, 88,193,213,171, 87, 61, 62,127,140, +177,156,179,103,207, 26,143, 30, 61, 10,131,193,128,123, 44,231,209, 56,254, 37,176, 15, 9, 52,145, 65,245,145,187,233, 73, 0, + 31,162, 40,111,137,215, 9,114,138,143,209,210, 32, 98, 89,158, 13,255,165, 59, 16,203,158, 49,214, 73,150,229,175, 44, 22,203, + 72, 34, 58,252,123,249,254, 40, 48,198, 58,105, 52,154, 55,205,102,115,133,255, 87, 31,254,186, 40,155, 11,160, 60,148,215,227, + 9,157, 49, 99, 6,252,252,252, 16, 22, 86,190, 94, 15, 11, 11, 67,243,230,205, 97,179,217,112,252,248,113,175,122, 21, 60,207, + 67,237,200, 71,224,134,183, 96, 17,141,112, 14,154, 91,161, 65,224, 9,249,249,249, 13, 24, 99,100, 50,153,254,195, 24,243, 3, + 0, 73,146, 46,248,249,249,105,202,182,205,206,206,182, 48,198,130,200, 67, 66, 27, 89,150,223,255,248,227,143, 31, 25, 53,106, +148,170,228,177,157, 14, 7, 44,133,133,176,217,237,176,219,108,200,207,207, 23, 63,249,244,211, 97, 75,150, 46, 85, 3, 24, 88, + 30, 87,110,110, 46, 54,109,218,116, 75,175,191,164,203,217,149, 78,180, 42, 61, 79, 73,146,160,178,153, 96,237,250, 26, 84, 78, + 27, 84,138, 21,203,183,159, 64, 76,236, 73,212,240,151,176,244,201, 38, 48,112, 54,224, 66,124, 81, 4,112, 15, 96,140, 5,168, +213,234,229, 27, 55,110,212,100,102,102,226,236,217,179,104,218,180, 41, 94,126,249,101,112, 28,135,217,179,103,227,218,181,107, + 8, 11, 11,195,130, 5, 11, 52,195,134, 13, 91,197, 24,171, 95,145, 59,214,110,183,119,175, 89,179,102, 15, 34,194,229,203,151, +129, 98,163,178, 88,113,185,191, 19, 17, 66, 66, 66,182, 86,214, 33,182,217,108,161, 61,218, 52, 70,154,137,112,127,163,250, 48, +217,128, 54,205, 34,144,103, 81,208,238,254,198,200, 45,116,162, 83,155,230,200, 41,112,224,209, 62,145, 88,248,182,181,194,231, +111,241,226,197,216,180,105, 19,122, 94,152, 11, 60, 80,212,235, 87,189, 82,228, 53, 80, 94, 15,116,135,127,174,234,253,240,132, +231,158,123, 14,111,190,249, 38,182,109,219,134,132,132,132,230,253,251,247, 95,194, 24,139, 37, 34, 83,101,251, 50,198, 94, 15, + 12, 12,124,171,105,211,166, 34, 0, 84,118,173,202,194,102,181,134,209, 68, 54,116, 77,146,188,128,115, 88,140, 50, 7,168, 57, + 64,230, 0,153, 7,100,206,106, 76,205,192, 74,153, 47,170,151,100, 57, 87, 80, 91,158, 97,128, 71, 3, 0,128,120,244,232, 81, +248,251,251, 99,195,134, 13,124,253,250,245,177,103,207, 30,168,213,106,204,157, 59, 23,205,154, 53,227,181, 90, 45,214,173, 91, +135,155, 55,111,122, 52, 82, 24, 99, 1, 26,141,102,249,230,205,155, 53,179,102,205,194,253,247,223,143, 26, 53,106, 64,165, 82, +129,227, 56,216,237,118,100,103,103,163,122,245,234, 88,180,104,145,102,224,192,129, 30,159, 63, 0,214, 11, 23, 46, 56,212,106, + 53, 47,203, 50, 4, 82,195,161, 9, 6, 63,145,129,120, 57, 91,153, 96,121,152,125, 72,187, 25, 99, 29, 1,204, 67,145, 7,106, +161,183,215,148, 49,214, 50, 80, 47,237, 88,240,191,135, 13, 79,205,249, 62,150, 49,246,187, 18,218, 48,198, 58, 5, 4, 4,196, +206,152, 49, 67, 55, 97,194,132, 29,140,177,110,127, 69, 35,160,216, 72,137, 45, 40, 40,208,221,109, 89,124,184,125, 20, 39, 0, + 42, 9, 99,201,200,152,229,190,232, 66, 67,139,222,169, 91,182,108, 1, 0,116,233,210, 5,106,181, 26,133,133,133, 88,191,126, + 61, 14, 29, 42,202, 16, 91,149,156,211,130, 32, 32,232,232,106, 16, 47,130,153,174, 3,123, 23, 65,120,104, 66,185, 30, 0, 47, +113,201,245,197,106,181, 26,211,211,211,203, 59, 38, 95,124,142, 21, 26, 0, 14,135, 99,224,232,209,163, 85,177,177,177,112, 58, +157, 16, 4, 1,130, 32, 64, 20,197, 82,223, 37, 73,194,243,207, 63,207,125,241,229,151,253, 60, 9, 85, 82,217,151,252,238, 42, + 90,173, 22,106,181, 26,141, 27, 55,118,245, 60, 43, 29,131,118, 93,103,149,195, 2,149, 98, 5, 28, 86,188,240,205, 30, 20,218, +156, 56,124, 9,216,214,210,136,129,247,185,236, 31,207,157, 27, 65, 16, 94,153, 53,107,150, 81,165, 82,225,220,185,115,144, 36, + 9,249,249,249, 24, 60,120, 48,236,118, 59, 20, 69,129, 36, 73,112, 56, 28,104,220,184, 49,134, 14, 29,106,252,246, 30,213,179, + 88, 0, 0, 19,135, 73, 68, 65, 84,219,111,255, 7,224,237,242,248,174, 92,185,162, 39, 34,119,106,212, 62,125,250, 32, 58, 58, + 26, 17, 17, 17, 56,115,230, 12,162,163,163,177,113,227, 70, 0, 69, 10,205,155, 20,170,181, 3,212,168, 23,194,187,159, 7,142, +227,220,223,203,150,202, 32,203, 50, 96,183, 0, 14, 75,209,167, 11, 14, 11,100, 89,190,173,251,225, 9,169,169,169,232,216,177, + 35, 94,124,241, 69,180,104,209,194, 37,163, 30,128, 71, 3,128, 49, 22, 29, 17, 17, 49,109,199,142, 29, 8, 11, 11,131,195,225, +128,221,110, 71,126,126, 62, 30,125,244, 81, 0, 72, 46,206, 93,113,142,200,227,152, 54,111,183, 88,140,131,182, 85,110, 60,216, +159, 97, 70,168, 33,120,113, 90, 47, 13, 24, 48, 32,105,209,162, 69,252,181,107,215,112,248,240, 97,168,213,106,119, 73, 75, 75, +131,201,100,194,251,239,191,239, 64,209, 16, 65,133, 16, 69,241,149, 57,115,230, 24, 85, 42, 21,194,195,195,241,252,243,207, 99, +245,234,213, 8, 8, 8, 40,186, 31,201,113,224,117, 1,112,106, 31, 64,163, 70,141, 48,108,216, 48,227,202,149, 43, 43,124,254, + 0,124, 63,117,234,212,168, 41, 83,166,212, 14, 10, 10, 66,182, 45, 0,163,127,109,129,171,105,105, 87,182,116, 58,245, 40,138, +223, 19, 68,180,135, 49, 54, 25,192, 71,240,210, 0,112, 41,255,163,107, 62, 55,212,240,147, 16,148,244,157, 46,106, 13,110,219, + 8,112, 41,255,131, 7, 15,234, 52, 26, 13, 50, 51, 51, 13,115,230,204,249,203, 25, 1,140,177, 78, 58,157, 46,118,197,138, 21, +186,254,253,251,223, 17, 62, 73,146,150, 88,173,214, 39,239,132, 7,197, 7,175, 97, 68,145,193,235, 70,217,176,216, 30,223,160, +254,254,254, 0,128,253,251,247,227,212,169, 83, 56,113,226, 4, 84, 42,149, 91, 33, 86, 5,130,138, 65,119,105, 23,110,118, 28, + 7,166, 40, 80,118,206, 7,223,247,149, 82,202,159, 99, 69,134,130, 55, 32, 34,119,222, 80,173, 86,155, 34,138, 98, 53,160,200, +101,206, 24, 8, 96, 36,203,114,186,217,108,246,152, 46, 86, 81, 20,158,231,121, 88,173, 86,136,162,232,238,137,112, 28,135, 78, +157, 58,225,208,161, 67,238,228, 64,106,189, 30,138,162,120, 84, 16, 46,165, 95, 86,249,203,178, 12, 81, 20,221, 61, 78,215,167, + 55,248,205, 0, 40,128,202,105, 5,179, 23, 98,214,160,251,176,114,127, 42, 90,215, 80,227,193,186, 2, 96,241, 46,191,144, 40, +138, 61,187,118,237,202, 37, 37, 37, 65, 20, 69,136,162, 8,187,221,142,158, 61,123,130, 49,134,244,244,116, 72,146, 4, 81, 20, + 1, 0, 61,123,246, 20,215,175, 95,223, 19, 21,191,128, 75, 41,255, 13, 27, 54,184,235,136, 8, 27, 54,108, 64, 84, 84, 20, 54, +110,220,232,117,254,116, 65, 16,176,104,209,162,114,211,155,150, 44, 83,166, 76,169,148,171,200, 0, 40,116, 27, 1,202,155, 33, +197,195, 0,133,165,238, 67, 85,238, 71,101,200,202,202, 26, 27, 29, 29, 93, 11, 64, 48,128,159,137,232, 86,235,180, 4, 24, 99, + 3, 93,202,159,136,208,183,111, 95,140, 27, 55, 14,237,218,181, 67, 94, 94, 30, 94,126,249,101,100,103,103,215, 35,162, 29,103, +206,156, 81, 24, 99,145, 68,180,171, 2, 58,187, 32,201,185,235, 30,100, 70,217,213,251,231, 0, 53,255,219,119,183, 71, 64,150, +115, 1,139,199,116,207,174,121, 8,157, 59,119, 70,223,190,125,177,114,229, 74,140, 29,251,155,142, 31, 59,118, 44, 94,122,233, + 37,228,228,228,160,118,237,218,124,114,114,242,121,198, 88,133,243, 21, 92,207,223,133, 11, 23,208,186,117,107,140, 25, 51, 6, +163, 70,141,194, 79, 63,253, 4, 67,230, 47, 56,255,127,111, 33,124,208, 84,104, 68, 17,140, 49,244,234,213, 75,252,233,167,159, + 60, 61,127,111, 31, 57,114, 68,243,200, 35,143, 60,166, 40,138,196,113,156,163, 86,173, 90,187,243,243,243,159,102,137, 84,106, + 21, 0, 17,109,102,140, 53,242,116,190, 37,206,251, 55,229,239,175, 6,173,126, 6,157,106, 75,216, 48,210,160,139, 90,113,163, +202, 70, 64, 73,229,175,213,106,241,203, 47,191,160, 99,199,142,152, 49, 99,134,225,173,183,222,250,203, 24, 1, 46,229,127,224, +192, 1, 93, 96, 96,224, 29,227,155, 61,123,182,110,210,164, 73,191,219,131,226,131,119, 96,140,181, 0,112,164,120,179, 61, 17, +237, 47,175,157, 87,221,109,173, 86,139,140,140, 12,216,237,246, 42, 43,126, 23,252,175,236, 1,115,218, 65, 13, 34, 33,168,128, +194,245, 51,225,188,122, 26,234,122, 45,193,243, 60, 46,254,252, 5,142,172,124, 31,126, 17,237,161,246, 66, 42,154,200, 56, 0, + 28,128, 6, 55,159,198, 84, 43, 65, 46, 25,212,128, 3,160,226,109, 54, 81,133,251, 80, 52,254,231, 17,174, 30,101,159, 62,125, +176,115,231, 78,119,239,146,231,121, 52,109,218, 20,201,201,201,224,184,202, 59,135,229, 77,252,115, 25, 3,140, 49,183,162,113, +245, 60,189,129, 75, 25,171, 28,133, 56,155,154,133, 90,122,134,113,157,130, 48,238, 63, 26,192, 86, 8,216,204,128,173, 82, 15, + 51, 24, 99,140,231,249, 70, 97, 97, 97, 72, 77, 77,117, 43,250,154, 53,107,226,217,103,159, 5,199,113,248,252,243,207, 97, 50, +153,220,198, 65,163, 70,141, 80, 80, 80,208,220, 19,175,171,103, 31, 29, 29,237, 58, 78,169,223, 93, 94, 0,111, 61, 0,130, 32, + 96,204,152, 49, 21,246,250, 75,122, 6, 42,131, 90,173, 6, 28, 22,168, 94, 59, 5,229,173, 48,236, 76, 54, 97,231,197, 66, 68, +183, 35,112, 28,119, 91,247,195, 11,156, 36,162,207,170,208,126,208,212,169, 83,161, 40, 10,186,119,239,142,145, 35, 71,162,109, +219,182,136,137,137,193,238,221,187,177, 96,193, 2,172, 88,177, 2, 14,135, 3,107,215,174, 85, 77,158, 60,121, 20,128,114, 13, + 0, 70, 56, 62, 48,194,242, 44,202,252,183,253,191,146,190,200, 45,176, 26, 75,183,182, 24, 1,172,150,191, 80,123, 90, 53, 18, +149,157,157, 13, 63, 63, 63,236,217,179, 7, 26, 77,145,167,201, 53, 31, 97,250,244,233,164,213,106, 97,181, 90, 17, 23, 23, 7, +181, 90,141, 26, 53,106,148, 59, 7,160,228,243,151,149,149, 5, 0,120,242,201, 39,113,249,242,101, 60,254,216, 35,152,117,255, + 13,132, 55,237, 2,125,231,103,160,226,139,188,111,141, 27, 55,246,248,252, 17, 81, 38,128, 81,197,229,142,160, 60,229, 15, 0, +208,135,162, 83, 88, 16, 54,140,173,163,139,250,236,176,215,202,172, 60,229, 47,138, 34,212,106, 53, 34, 35, 35,241,209, 71, 31, + 25, 38, 78,156,120,215,141, 0,151,178,222,191,127,191,206, 53, 15,227, 78,241, 25,141, 70, 56,157, 78,221,148, 41, 83,124, 70, +192,159,131,253, 0,212, 68,100, 41,234, 20, 51,117,121,203,230,255,240,245,207, 65, 50,224, 60,189, 3, 33,135,190, 65, 78,211, + 1, 16, 52,122,240, 60, 15,241,222,246, 40, 60,185, 21,126, 13,255, 3,107,230, 5, 36,125,247, 1,186, 76,250, 18,135,127,252, + 10, 15,220, 58,239,240, 22,228, 20,226, 73,142, 21,185, 55,246,164, 74,159,240, 28, 19,121, 6,240,170,162,217,242,188, 10,224, + 64,182,230,247, 88, 71,193, 11, 3, 64, 16, 4, 12, 24, 48,160,104,204,184,103, 79,236,221,187, 23, 0,208,188,121,115,156, 63, +127,222,237,169,168, 12, 21, 13, 1,184,240,123, 60, 0,125,102,111,198,166,147,153, 48,200, 60,246,141,107,136,251,252, 21,220, +204,201,199,144, 85,153,144, 84, 78,196, 14,240,138, 14,118,187, 29, 98,113, 15, 75,146, 36, 8,130,128,252,252,124,247,177,108, + 54,155,219, 56,112, 25, 31, 21,161, 85,171, 86,185,173, 91,183, 70,171, 86,173,208,184,113, 99, 3,138,199,253, 75, 42,250,198, +141, 27, 83,171, 86,173,242, 92,237, 42, 3,207,243,152, 63,127,190,199,222,191, 74,165,194,155,111,190, 89, 41,151,123, 8, 0, + 0,236,133,216,121,209,130,183,247, 17,162,219, 21, 85,253, 17, 30,128,170,128, 49, 86, 23, 64,236,132, 9, 19,134, 19,145,170, +119,239,222,120,241,197, 23,145,145,145,129,175,190,250, 10,169,169,169,232,209,163, 7,252,252,252, 64, 68, 56,115,230,140, 25, +192, 15, 21, 18,126, 68,103, 25,112,182,108,117,238, 71,108,229,201,139, 25,165, 86, 5, 72, 2, 15,145,231,160,211, 72, 30,231, +241, 56,157, 78,204,155, 55,207,237,242, 47, 11,158,231,161,209,104, 42,252,189, 44,236,118, 59, 4, 65, 0, 99, 12,118,187, 29, + 51,102,204,192, 99, 81,145,216,114, 85,194,244, 15,230, 65, 37,136,165,134,225, 42, 3, 99,172,150, 36, 73, 31,219,237,246,126, +138,162,240, 0,160, 82,169, 28,106,181,122,189,217,108,254, 31, 17, 93, 46,110,231,149, 11,202, 32, 98,217, 55, 19, 7,254,166, +252, 25, 15,104, 3, 1,109, 16,160, 13, 66,167, 22, 65,152,243,148, 78, 55,121,201,158, 85, 0,106, 84,198, 39, 73,210,170,152, +152, 24,157, 86,171,197,193,131, 7, 33, 73, 82,169, 33,148,158, 61,123, 98,252,248,241,134,152,152,152,101, 0, 26,123, 35,227, + 31, 1, 73,146,150,204,156, 57, 83,231,231,231,135,228,228,100,252, 30, 15, 64, 73, 79, 66, 64, 64, 0,146,147,147, 17, 25, 25, +137,197,139, 23,235,158,126,250,105,159, 17,240, 23,193, 31,107, 0, 76,103,252,185, 71,128,130,185, 15,160,176, 65,127,216, 58, + 62,231, 86,164,154, 22,189,145, 21,247, 5,132, 71,167, 33, 57,110, 1,170,183,233,133, 6, 15, 60,130,106,141,219, 98,195,131, + 45, 42,165,222,116, 22, 49, 60, 3, 4, 14,224,152, 85,243,192,170,236, 82,131, 29, 12,192,241,145,254, 2,188, 56, 71, 75, 97, + 33, 4, 65,192,166, 77,155,208,189,123,119, 36, 38, 38,186, 61, 0,231,206,157, 67,253,250,245,113,245,234,213, 42, 25, 0,174, +207,178, 10, 84,163,209,148,234,121,122, 3, 73,146, 64, 0, 46, 92, 43, 82,210,121, 22, 7, 78,167,101,227, 62,141, 10, 63, 30, +191,137,157, 41,118,180, 12,169,156,135,136,200, 96, 48,156, 78, 78, 78,110,105, 48, 24,220,138,190,228, 88, 58,199,113,110,185, + 37, 73,194,233,211,167,161,213,106,143, 87,196,121,232,208, 33,163, 75,225,159, 56,113, 2,109,219,182,189,165,205,137, 19, 39, + 88,201,118,149, 65, 16, 4,140, 31, 63,190,220, 30,255,109,205, 1,112, 88,160, 76,245, 7,236, 5,136,110,167,184,149, 63,112, +123,247,163, 36, 88, 81,202, 77,247, 64,169,211,225,209,163, 94,118,223,237, 77,154, 52,233,118,243,230, 77, 92,189,122,213,214, +174, 93, 59,241,131, 15, 62, 64, 98, 98, 34,194,195,195,177,105,211, 38, 68, 71, 71, 99,245,234,213, 55, 1, 12, 46,222,237, 24, + 17,101, 87, 85, 78, 81,146, 50,155,212, 9, 43, 87,209,203,178,236,105,249,230,134,160,160,160,168,234,213,171,227,253,247,223, +135, 44,203, 24, 51,102, 12,166, 79,159, 78, 0, 16, 25, 25, 9, 65, 16,160, 86,171,209,189,123,119, 36, 37, 37, 1,192,134,242, +136,136,136,140, 70,227,233, 11, 23, 46,180,212,233,116,110, 67,128,136,176, 54,110, 59, 84, 12, 80,105,252, 75, 41,255, 83,167, + 78,121,124,254, 0, 64,146,164, 79,251,247,239,255,112, 76, 76, 12, 19, 4, 1, 38,147, 9,215,206, 31,227, 63,250,232,163, 1, + 7,246,237, 13,166,137,108, 42,128,139, 0,154,194,139,206, 64,158, 13,255,125, 98,214,255,197,254,124,122,149,174, 83,125,255, + 98,197,255,155, 1,112, 56,195,137, 41, 75,247,152, 77,133,214, 10, 99, 80,148,132,213,106,125,230,217,103,159,253,254,157,119, +222,209, 54,105,210,164,148,242, 87,171,213, 56,113,226, 4, 62,253,244, 83,147,201,100,250,175, 55,124,127, 20,172, 86,235,147, +147, 39, 79,142, 37, 34, 93,100,100, 36, 12, 6,195,109,241,184, 38, 16, 46, 95,190, 92, 23, 24, 24,136,212,212, 84, 4, 6, 6, +194, 96, 48,160,110,221,186,216,184,113,163, 46, 42, 42,202,103, 4,252, 5,240,199, 26, 0,211,200, 81, 67, 96,200, 55,231, 35, +255,228,153, 82, 19,253,196,251, 31, 66,250,234,183,145,242,109, 52,210,119,255,136,182,209,107, 32, 8, 2, 66,234,222,135,245, +151, 43,167,126,164, 57, 30, 71,145,167,159,223,122, 73,251,209,142,199,194, 2, 5, 6,112, 42, 64, 40,246, 0,200,106,237, 13, +192,243, 28, 0,149, 74,229,200,205,205,229,213,106, 53, 24, 99, 56,112,224,128,219, 72, 57,123,246, 44,120,158, 71, 90, 90, 26, + 92, 47, 22,142,227,156,158,248, 74, 14, 1,148,103, 48,184,226, 33, 84, 69,225,184,148,230,230,231, 35,176,234, 96, 58,234, 25, + 9,131,234, 41, 64, 97, 62, 30,188,199,138, 55,219, 2,207, 54,245,138, 10, 86,171,117,235,214,173, 91,155, 61,249,228,147,252, +141, 27, 55, 32,138, 98, 41, 87,122, 73, 3, 64, 20, 69,108,220,184,209,106, 50,153,182,122, 35, 95,116,116, 52, 98, 99, 99,221, +219,174,121, 0, 21, 13, 13, 84, 4, 65, 16, 48,111,222,188, 74, 61, 0,211,167, 79,175,148, 75,173, 86,195, 52,241,244, 29,189, + 31,197,231,226, 15, 96, 86,189,122,245,158,157, 49, 99,134,170, 73,147, 38,200,205,201,129,197, 98, 1,128, 74,205, 49,198, 88, +221,186,117,235,118, 59,124,248, 48,236,118, 59,174, 95,191, 46, 18, 17, 78,159, 62,141,193,131, 7, 59, 12, 6, 3, 63,123,246, +108, 76,159, 62, 29, 7, 14, 28, 8, 72, 73, 73,185, 76, 68, 23, 60,113, 86,180, 12, 80,148,164, 76,235,109, 6, 0, 34,162,190, +140,177,186,133,133,133, 73, 77,155, 54,229,175, 94,189,138,137, 19, 39, 66,173, 86,187,255,207,118,187, 29, 57, 57, 57,184,112, +225,130, 3, 64, 4, 17, 37, 87,196,103,181, 90,183,110,217,178,165,217, 83, 79, 61,197,231,230,230,186,149, 61, 19, 4,240, 37, + 20,191,235,115,195,134, 13,149, 62,127, 54,155,173,239,103,159,125,198,182,111,223, 14,181, 90, 13,157, 78,135,176,194,171, 88, +216,244, 4, 19,234, 91, 58, 17, 47,175,123,122,131,101, 6,128,167, 1,124,224,197, 57,239,102,140,245,142, 90,203, 98, 55,140, + 50,232, 58,133,133,186,141,128,195, 25, 78,244,120,227, 59,115,110,129,117, 8, 17,197,121,121, 13,227, 24, 99, 67,222,124,243, +205,239, 63,253,244, 83,109,139, 22, 45, 74, 41,255, 17, 35, 70,152, 76, 38,211, 93, 87,134,174,243,158, 50,101, 74,236,226,197, +139,117,117,235, 86, 26,139,171, 92,104, 52,154, 55, 11, 10, 10,116, 3, 6,120,116, 73,234, 12, 6,195,155, 0,124, 75, 12,255, + 56, 20,150,120,231,186,190,151, 26, 10, 40,207, 0, 88, 59,118,236,216, 1, 99,199,142, 69,131, 6, 13, 42,100,190,118,237, 26, + 18, 18, 18,128, 91,211, 13,150,130,217, 1, 48, 81,115,235,154,127,117, 48,234,190,184, 0,167, 63,127, 9,247, 14, 26,143, 26, + 45,187, 85,105, 21, 0,251,144,214, 0, 0, 77,100,117, 27, 7,155,199,221, 44,196, 45,203, 0, 3,212, 86, 51, 0,143, 99,106, +146, 36,173,157, 63,127,254, 35,195,134, 13, 99, 2,207,195,233,116, 66, 65,145,178,114,201, 42, 8, 2,114,115,115,241,238,187, +239, 42, 58,157,110,125, 69, 92,162, 40, 58,131,131,131, 57, 89,150,241,208, 67, 15, 65,150,229, 82, 69,173, 86,187,151, 86,186, +122,158, 94,131,151, 80, 59,255, 48, 94,141, 40,222, 46,114, 6,160,166, 30,152,222,193,123, 26,155,205, 54,231,195, 15, 63,124, +182, 71,143, 30,254,213,170, 85,131,211, 89,100,207,132,132,132,192,225,112,128,227, 56,247,208,192,190,125,251,176,122,245,234, +124,171,213,250,161, 39, 78, 87,207, 62, 46, 46, 14, 81, 81, 81, 72, 76, 76,116,175, 2,136,138,138, 66, 92, 92, 92,169,118,149, + 65, 16, 4, 76,154, 52,201,227, 10, 0,149,170,242, 52, 22,127,232,253, 0,222,158, 57,115,230,127, 39, 79,158, 12,149, 74,133, +252,255,111,239,108, 99,154,186,194, 56,254,127,122,251,118, 95,138, 3,149,136, 2, 93, 16,113,113, 56,151,248,201,132,184,201, + 32, 33, 89,140, 49, 27,201,220, 75,194,136,108,132,152, 96, 92,220,194, 38, 34,209,205, 48,183,133,234,190, 44, 91, 6,206, 56, + 93,226, 50, 17, 39, 99, 38, 11,198, 37,211, 72,182,100,153,213,205,134,160, 32,111,101,131,218,222,218, 94,104,207, 62,148,219, + 32,218,246, 82, 96, 48,189,191, 79,165,156, 62,247,158,156,211, 62,207,115,238, 57,255,199,235,197,141, 27, 55,176, 98,197, 10, + 92,233,236, 76,172, 98,200, 88, 23, 17,253, 92, 88, 88, 88,176,118,237, 90,172, 90,181, 10,130, 32,224,192,129, 3,240,249,124, +175,251,124,190,252,246,246,246,119,214,173, 91, 7,191,223, 15, 0,113,245, 44,128,123,133,128,204, 38, 14, 22, 35, 7,179,137, +195, 51, 79,229, 36, 37, 0, 52,137, 79,207,158, 61,107,148, 36, 9, 62,159, 15, 35, 35, 35, 8, 4, 2, 81, 39, 54, 58, 58,138, +156,156, 28, 56, 28, 14, 99, 85, 85,213, 17, 68,212, 67, 31, 72, 48, 24,108, 56,116,232, 80, 69,113,113,113,106, 70, 70, 6,194, +225,240, 61, 14,127,242,233,155,105,204, 63, 78, 81, 20,152, 76,166,232,216,154,199, 56,152,238,186, 65,159, 48, 96, 23,165,126, +231,194,155, 0, 62, 0,112, 76, 75,135,163, 65, 64,115,111,219,247,111, 61, 46, 21, 60,157,142, 95, 7,198,241,220,123, 39,101, +143, 63,160,217,249, 79,178,247, 3, 17,189, 88, 93, 93,125,170,185,185, 89, 92,191,126,253,130,114,254, 42,106,191,203,203,203, +219,206,157, 59,151,212, 17, 64, 93, 55, 96,254, 73,116,254, 95,229, 65, 66, 64, 28,128,114, 34,218, 87, 82, 82,178,188,178,178, + 18,203,150, 45, 67,107,107, 43,250,250,250,160, 40, 10, 58, 59, 59,113,253,250,245, 62, 0,251, 0,124,201, 24,139,153, 21,171, + 66, 64,215,174, 93,139, 41,252, 51,249,181,186,243, 59,129,144, 13, 3,144,170,254, 29, 75, 7, 96,116,116,212, 31, 8, 4,226, +202, 5, 19, 81,166, 32, 8,142, 96, 48,184, 57, 20, 10,197, 92,227,231, 56,110, 92,146,164, 86,143,199, 19,125,166, 24,239,254, +220,110,119,220,149,128,154,154, 26, 28, 60,120, 80, 83, 95,167,123, 30, 60,145,104, 12, 17,109,206,204,204, 60,209,212,212, 36, +230,229,229,193, 96, 48, 64,146, 34,223,117,245, 71,248,242,229,203,216,186,117,171,111,120,120,248, 5,198,216,143,177,108,217, +237,118, 15, 0, 10,135,195,247,157,253,143,245,122,104,104, 40,166, 44, 36, 17,177,158,158, 30, 52, 54, 54,198,204,252,213, 32, +162,174,174, 78,147, 64,206,108,142,199,132, 61, 11,128, 62, 69, 81,210,140, 70, 35,134,135,135,225,114,185,208,219,219,139,109, +219,182,141,133, 66,161, 84,198,152, 28,207,198,132, 29, 35,128,141,136, 8,255, 60,137,200,147,171, 99,140,177,139, 68,244, 89, +109,109,237, 27,133,133,133,216,180,105,211, 8, 99, 44,161,236,245, 92,172, 0, 76,220,231,233,170,170,170, 45, 60,207,195,225, +112,140,219,237,118, 99,123,123,123,116,217,191,171,171,107,220,225,112, 24, 7, 7, 7, 81, 95, 95,223,194, 24,139,155,250, 17, +209,230,172,172,172, 19, 71,143, 30, 21, 87,175, 94, 13, 34,138, 58,125,117,254, 93,186,116, 73,211,252, 3, 0,142,227,198, 58, + 58, 58,140,178, 44, 67, 16, 4, 72,146,132,197,222, 63,177,252,252, 78, 24,253, 67, 96, 70,235, 8,141, 71,244, 0,146,232,123, +129,205,106,106,107,216, 94, 44,213, 52,253, 36,123,228,233, 59,255, 41,246, 74,108, 54,219,169, 61,123,246,136,251,247,239, 95, + 80,206,127, 50, 68, 84, 96,179,217,218,188, 94,175,148,172, 64,150,206,194,231,190, 0, 32,250, 15, 34, 1,192, 78,179,217,252, +118,105,105,233,162,180,180, 52,116,116,116,192,233,116,122, 66,161,208,135, 0, 26, 25, 99,254,132, 23, 32, 98, 67, 67, 67,240, +120, 60,113,149, 0, 85,231, 15, 64,139, 83, 60, 13,224,217, 73,111, 45, 10,135,239, 63,255,174,229,199,124, 46,176, 88, 44,227, +138,162,196,205, 60,211,211,211, 81, 93, 93, 61, 47, 1,192, 68,155, 45, 86,171,181,185,172,172,140, 47, 42, 42,178,228,231,231, + 71,159,185,158, 57,115, 38,120,252,248,113,217,239,247,191,202, 24,107,139,103, 39, 55, 55,247, 91,151,203,245,209,202,149, 43, +119,103,100,100,116,199,106,215,211,211,147,119,243,230,205,247,179,179,179,107,111,221,186, 21, 51, 67, 36, 34,214,223,223,175, +249,220,191,150,190,206,230,120, 76, 92,243, 9,131,193,240,203,133, 11, 23, 30,179,219,237,232,238,238,198,213,171, 87,177,119, +239,222,144,219,237,222,197, 24, 59, 28,239,243, 90, 32,162,175, 26, 26, 26, 94, 19, 69, 17, 59,118,236,184,200, 24,219, 56, 19, +123, 22,171,117, 64, 9,222, 43,154,100,177, 90, 7, 3,218,106, 70, 76,149, 2,118,221,190,125, 27, 60,207, 35, 45, 45, 13, 0, +114, 1, 28, 65,164, 22, 68, 37,211, 38, 5,188,133,231,249,230,178,178, 50,190,184,184,216,146,159,159, 15,163,209, 8,167,211, +137,150,150, 22,205,243, 15, 0,120,158, 63,177, 97,195,134,210,138,138, 10, 46, 61, 61, 29,162, 40, 98,108,164, 23,141,142,195, + 33,231,111, 87, 58,156,175, 4,234, 0,116, 39, 91, 19,128,136, 10, 36,222,114,210,119, 55,184,125, 38,206,127,146,189, 18, 81, + 20,191,144,101,249,165,133,232,252, 85,136,168, 32, 37, 37,165,214,227,241,232, 25,253, 67, 74,204, 0, 32,218,128,104, 49, 34, + 95,238, 23, 16, 89,238,175, 98,140,253,173,245, 2, 86,171,117, 32, 24,140,173,214, 22,227, 51,154,138,217,168,216,108,182,191, + 20, 69,201,154,250,190,217,108,238, 81,229,130,231, 3, 45,153,103, 34,135,195,243,252, 64, 32, 16,152,171, 98, 64, 75,204,102, +243,110, 65, 16,138,100, 89, 94, 67, 68, 76, 20,197, 63,100, 89, 62,175, 40,202,199,140,177,127, 52,216, 40, 69, 36,115, 37, 0, +241, 42,243,101,171,237, 88,156, 66, 57,211,157, 47,211,153, 43,179, 49, 30,147,108,101, 2,248, 28,145, 64,180, 31,192,239, 0, +222,101,140, 57,181,222,123, 2,251,207, 75,146,244,141,193, 96,192,157, 59,119,202, 24, 99,167,102,104,143, 69, 79, 1, 76, 60, + 26,200, 88,156,146, 84,128, 76,179, 87, 12,104,137,217,108,222, 45,138, 98,145, 44,203,107, 0, 76,123,254, 77,216, 89, 42, 8, + 66, 93, 56, 28,126, 57, 20, 10,241, 0, 96, 50,153,238,114, 28,247,181,215,235,173,103,140,185,147,185, 63, 29,157,135,157,132, + 1,128, 78,242,168,153,103,188, 54, 41, 41, 41, 33,143,199, 51,239,229,104,213, 35, 82,211, 93,110, 32,162,165,140, 49, 55, 69, + 10, 16,197,147, 33, 20, 25, 99,221, 68,148,147,104, 51,219, 92,241,127, 26, 15, 32,186,209, 16,201,236,250,159,202, 76, 86, 0, +254, 11,146,157,127, 58, 58, 58,201,163, 7, 0, 58, 58, 58, 58, 58, 58,143, 32,137,183, 82,235,232,232,232,232,232,232, 60,116, +232, 1,128,142,142,142,142,142,206, 35,200,191, 46, 96, 71,216,137,209,203,202, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, }; diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index bf4beacaa58..97607b69446 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -78,7 +78,6 @@ #include "BIF_usiblender.h" #include "BIF_writeimage.h" #include "BIF_drawscene.h" - #ifdef WITH_VERSE #include "BIF_verse.h" #endif @@ -830,6 +829,8 @@ static void do_info_filemenu(void *arg, int event) if (untitled(dir)) { activate_fileselect(FILE_BLENDER, "Save As", dir, BIF_write_file); } else { + /* do NOT ask everytime for overwriting... */ + G.save_over = 1; BIF_write_file(dir); free_filesel_spec(dir); } diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 27a39537988..14b8eca4135 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -831,6 +831,8 @@ int blenderqread(unsigned short event, short val) if (untitled(dir)) { activate_fileselect(FILE_BLENDER, "Save File", dir, BIF_write_file); } else { + /* do NOT ask everytime for overwriting... */ + G.save_over = 1; BIF_write_file(dir); free_filesel_spec(dir); } @@ -931,6 +933,8 @@ int blenderqread(unsigned short event, short val) if (untitled(dir)) { activate_fileselect(FILE_BLENDER, "Save File", dir, BIF_write_file); } else { + /* do NOT ask everytime for overwriting... */ + G.save_over = 1; BIF_write_file(dir); free_filesel_spec(dir); } diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 969b9d4657b..97794148895 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -169,6 +169,28 @@ void asciitoraw(int ch, unsigned short *event, unsigned short *qual) /* this va_ stuff allows printf() style codes in these menus */ +static int vconfirm_choice(char *title, char *itemfmt, va_list ap) +{ + char *s, buf[512]; + + s= buf; + if (title) s+= sprintf(s, "%s%%t|", title); + vsprintf(s, itemfmt, ap); + + return (pupmenu(buf)); +} +int confirm_choice(char *title, char *itemfmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, itemfmt); + ret= vconfirm_choice(title, itemfmt, ap); + va_end(ap); + + return ret; +} + static int vconfirm(char *title, char *itemfmt, va_list ap) { char *s, buf[512]; diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 2bf2d5d9ae9..f3801342b3a 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -110,6 +110,7 @@ #include "BIF_resources.h" #include "BIF_screen.h" #include "BIF_space.h" +#include "BIF_toets.h" #include "BIF_toolbox.h" #include "BIF_cursors.h" @@ -793,7 +794,7 @@ void BIF_write_file(char *target) strcpy(di, target); } - if (BLI_exists(di)) { + if (BLI_exists(di) && !G.save_over) { if(!saveover(di)) return; } @@ -824,9 +825,13 @@ void BIF_write_file(char *target) G.save_over = 1; writeBlog(); + } else { error("%s", err); } + + /* CLEARS signal: "file needs save" on exit */ + U.uiflag &= ~USER_UNDOSAVE; waitcursor(0); } @@ -927,6 +932,41 @@ void BIF_init(void) BLI_strncpy(G.lib, G.sce, FILE_MAX); } +int exit_save_question(void) +{ + char dir[FILE_MAXDIR]; + int ret = 0; + + /* just go on if no undo there */ + /* better check necessary --> some flag */ + if(!(U.uiflag & USER_UNDOSAVE)) + return 1; + + /* do sweet question here */ + ret = confirm_choice("Warning: Unsaved changes", "Do you want to save your changes before exit?"); + + if(ret==1) + { + /* copyied from header_info.c */ + strcpy(dir, G.sce); + if (untitled(dir)) { + activate_fileselect(FILE_BLENDER, "Save As", dir, BIF_write_file); + } else { + /* do NOT ask everytime for overwriting... */ + G.save_over = 1; + BIF_write_file(dir); + free_filesel_spec(dir); + } + return 1; + } + else + { + /* cancel, ok, continue button available */ + } + + return 1; +} + /***/ extern ListBase editNurb; @@ -934,7 +974,15 @@ extern ListBase editelems; void exit_usiblender(void) { - struct TmpFont *tf; + struct TmpFont *tf; + + /* ask for save before exit */ + if(!exit_save_question()) + { + /* user pressed 'cancel' */ + return; + } + tf= G.ttfdata.first; while(tf) { From 9e96ac11bbe0212d031e59df461d3ae887e07d03 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 21 Dec 2007 01:24:09 +0000 Subject: [PATCH 068/430] WIP commit, just to have a nice return from holidays :) --- source/blender/blenkernel/BKE_blender.h | 1 - source/blender/blenkernel/BKE_cloth.h | 6 + source/blender/blenkernel/intern/cloth.c | 336 +++------------------- source/blender/src/drawobject.c | 340 +++++++++++++++++++++++ 4 files changed, 382 insertions(+), 301 deletions(-) diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 84ebd3102b3..243425db139 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -70,7 +70,6 @@ extern void BKE_reset_undo(void); extern char *BKE_undo_menu_string(void); extern void BKE_undo_number(int nr); extern void BKE_undo_save_quit(void); -extern int BKE_undo_there(void); #ifdef __cplusplus } diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index d888ba28ebe..b122347998d 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -67,6 +67,12 @@ typedef struct fc float *u, *u0; // velocity in x direction float *v, *v0; // velocity in y direction float *w, *w0; // velocity in z direction + unsigned char* _texture_data; + float _light_dir[3]; + int _ray_templ[4096][3]; + FILE* _fp; + int _cur_frame; + int _nframes; } fc; fc *f_init(void); void f_free(fc *m_fc); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 95d487b2ec7..318d6eac410 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -498,308 +498,33 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) return ret; } -#define AMBIENT 50 -#define DECAY 0.04f -#define ALMOST_EQUAL(a, b) ((fabs(a-b)<0.00001f)?1:0) - - // cube vertices -GLfloat cv[][3] = { - {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f}, - {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f} -}; - - // edges have the form edges[n][0][xyz] + t*edges[n][1][xyz] -float edges[12][2][3] = { - {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, - - {{1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, - {{-1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, - {{-1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, - {{1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, - - {{-1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}}, - {{-1.0f, 1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}} -}; - -void light_ray(unsigned char* _texture_data, int _ray_templ[4096][3], int x, int y, int z, int n, float decay) +int m_fc_open(ClothModifierData *clmd) { - int xx = x, yy = y, zz = z, i = 0; - int offset; - - int l = 255; - float d; - - do { - offset = ((((zz*n) + yy)*n + xx) << 2); - if (_texture_data[offset + 2] > 0) - _texture_data[offset + 2] = (unsigned char) ((_texture_data[offset + 2] + l)*0.5f); - else - _texture_data[offset + 2] = (unsigned char) l; - d = _texture_data[offset+1]; - if (l > AMBIENT) { - l -= d*decay; - if (l < AMBIENT) - l = AMBIENT; - } - - i++; - xx = x + _ray_templ[i][0]; - yy = y + _ray_templ[i][1]; - zz = z + _ray_templ[i][2]; - - } while ((xx>=0)&&(xx=0)&&(yy=0)&&(zz0) ? 0 : n-1; - int sy = (_light_dir[1]>0) ? 0 : n-1; - int sz = (_light_dir[2]>0) ? 0 : n-1; - - float decay = 1.0f/(n*DECAY); - - for (i=0; i 0) ? 1 : -1; - int yinc = (ly > 0) ? 1 : -1; - int zinc = (lz > 0) ? 1 : -1; - float tx, ty, tz; - int i = 1; - int len = 0; - int maxlen = 3*edgelen*edgelen; - _ray_templ[0][0] = _ray_templ[0][2] = _ray_templ[0][2] = 0; + Cloth *cloth = clmd->clothObject; + int _N; + fc *m_fc = NULL; - while (len <= maxlen) - { - // fx + t*lx = (x+1) -> t = (x+1-fx)/lx - tx = (x+xinc-fx)/lx; - ty = (y+yinc-fy)/ly; - tz = (z+zinc-fz)/lz; + if(!cloth) + return 0; + + m_fc = cloth->m_fc; - if ((tx<=ty)&&(tx<=tz)) { - _ray_templ[i][0] = _ray_templ[i-1][0] + xinc; - x =+ xinc; - fx = x; + m_fc->_fp = fopen("/home/daniel/Desktop/f32rand.dat", "rb"); + if (!m_fc->_fp) + return 0; - if (ALMOST_EQUAL(ty,tx)) { - _ray_templ[i][1] = _ray_templ[i-1][1] + yinc; - y += yinc; - fy = y; - } else { - _ray_templ[i][1] = _ray_templ[i-1][1]; - fy += tx*ly; - } - - if (ALMOST_EQUAL(tz,tx)) { - _ray_templ[i][2] = _ray_templ[i-1][2] + zinc; - z += zinc; - fz = z; - } else { - _ray_templ[i][2] = _ray_templ[i-1][2]; - fz += tx*lz; - } - } else if ((ty0)&&(t<2)) { - ret[num][0] = edges[i][0][0] + edges[i][1][0]*t; - ret[num][1] = edges[i][0][1] + edges[i][1][1]*t; - ret[num][2] = edges[i][0][2] + edges[i][1][2]*t; - num++; - } - } - - return num; -} - -void draw_slices(float m[][4]) -{ - int i; - - Vec3 viewdir(m[0][2], m[1][2], m[2][2]); - viewdir.Normalize(); - // find cube vertex that is closest to the viewer - for (i=0; i<8; i++) { - float x = cv[i][0] + viewdir[0]; - float y = cv[i][1] + viewdir[1]; - float z = cv[i][2] + viewdir[2]; - if ((x>=-1.0f)&&(x<=1.0f) - &&(y>=-1.0f)&&(y<=1.0f) - &&(z>=-1.0f)&&(z<=1.0f)) - { - break; - } - } - if(i != 8) return; - - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - glDisable(GL_DEPTH_TEST); - // our slices are defined by the plane equation a*x + b*y +c*z + d = 0 - // (a,b,c), the plane normal, are given by viewdir - // d is the parameter along the view direction. the first d is given by - // inserting previously found vertex into the plane equation - float d0 = -(viewdir[0]*cv[i][0] + viewdir[1]*cv[i][1] + viewdir[2]*cv[i][2]); - float dd = 2*d0/64.0f; - int n = 0; - for (float d = -d0; d < d0; d += dd) { - // intersect_edges returns the intersection points of all cube edges with - // the given plane that lie within the cube - float pt[12][3]; - int num = intersect_edges(pt, viewdir[0], viewdir[1], viewdir[2], d); - - if (num > 2) { - // sort points to get a convex polygon - // std::sort(pt.begin()+1, pt.end(), Convexcomp(pt[0], viewdir)); - int shuffled = 1; - - while(shuffled) - { - int j; - shuffled = 0; - - for(j = 0; j < num-1; j++) - { - // Vec3 va = a-p0, vb = b-p0; - // return dot(up, cross(va, vb)) >= 0; - float va[3], vb[3], vc[3]; - - VECSUB(va, pt[j], pt[0]); - VECSUB(vb, pt[j+1], pt[0]); - Crossf(vc, va, vb); - - if(INPR(viewdir, vc)>= 0) - { - float temp[3]; - - VECCOPY(temp, pt[j]); - VECCOPY(pt[j], pt[j+1]); - VECCOPY(pt[j+1], temp); - - shuffled = 1; - } - } - } - - glEnable(GL_TEXTURE_3D); - glEnable(GL_FRAGMENT_PROGRAM_ARB); - glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, _prog[0]); - glActiveTextureARB(GL_TEXTURE0_ARB); - glBindTexture(GL_TEXTURE_3D, _txt[0]); - glBegin(GL_POLYGON); - for (i=0; i_fp); + fread(&_N, sizeof(int), 1, m_fc->_fp); + printf("Resolution: %dx%dx%d\n", _N, _N, _N); + + fread(&m_fc->_nframes, sizeof(int), 1, m_fc->_fp); + printf("Number of frames: %d\n", m_fc->_nframes); + m_fc->_cur_frame = 0; + + return 1; } -void draw(void) -{ - int i; - - glClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt(0, 0, -_dist, 0, 0, 0, 0, 1, 0); - - float m[4][4]; - build_rotmatrix(m, _quat); - - glMultMatrixf(&m[0][0]); - - if (_draw_cube) - draw_cube(); - draw_slices(m, _draw_slice_outline); - - if (_dispstring != NULL) { - glMatrixMode(GL_PROJECTION); - glLoadMatrixd(_ortho_m); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glDisable(GL_TEXTURE_3D); - glDisable(GL_FRAGMENT_PROGRAM_ARB); - glColor4f(1.0, 1.0, 1.0, 1.0); - glRasterPos2i(-_sx/2 + 10, _sy/2 - 15); - - print_string(_dispstring); - - glMatrixMode(GL_PROJECTION); - glLoadMatrixd(_persp_m); - glMatrixMode(GL_MODELVIEW); - } -}*/ /************************************************ * clothModifier_do - main simulation function @@ -819,9 +544,6 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); ListBase *effectors = NULL; float deltaTime = current_time - clmd->sim_parms->sim_time; - unsigned char* _texture_data=NULL; - float _light_dir[3]; - int _ray_templ[4096][3]; clmd->sim_parms->dt = 1.0f / (clmd->sim_parms->stepsPerFrame * G.scene->r.frs_sec); @@ -1216,6 +938,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d cloth->m_fc = f_init(); + // open file + m_fc_open(clmd); + switch (ob->type) { case OB_MESH: @@ -1895,8 +1620,7 @@ fc *f_init(void) int i; int size; - fc *m_fc = MEM_callocN(sizeof(fc), - "f_c"); + fc *m_fc = MEM_callocN(sizeof(fc), "f_c"); for (i=0; i<10; i++) clear_buffer(buffers[i]); @@ -1913,12 +1637,24 @@ fc *f_init(void) for (i=0; iv[i] = -0.5f; + m_fc->_texture_data = (unsigned char*) MEM_callocN((30+2)*(30+2)*(30+2)*4, "fc_texture_data"); + + m_fc->_fp = 0; + return m_fc; } void f_free(fc *m_fc) { if(m_fc) + { + if(m_fc->_texture_data) + MEM_freeN(m_fc->_texture_data); + + if(m_fc->_fp) + fclose(m_fc->_fp); + MEM_freeN(m_fc); + } } diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index db2225f4823..a6fced7124a 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -78,6 +78,7 @@ #include "BLI_rand.h" #include "BKE_utildefines.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_constraint.h" // for the get_constraint_target function #include "BKE_DerivedMesh.h" @@ -2174,6 +2175,345 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived /* Mesh drawing routines */ + + +#define AMBIENT 50 +#define DECAY 0.04f +#define ALMOST_EQUAL(a, b) ((fabs(a-b)<0.00001f)?1:0) + + // cube vertices +GLfloat cv[][3] = { + {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f}, + {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f} +}; + + // edges have the form edges[n][0][xyz] + t*edges[n][1][xyz] +float edges[12][2][3] = { + {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}}, + + {{1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, + {{1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}}, + + {{-1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}}, + {{-1.0f, 1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}} +}; + +void light_ray(unsigned char* _texture_data, int _ray_templ[4096][3], int x, int y, int z, int n, float decay) +{ + int xx = x, yy = y, zz = z, i = 0; + int offset; + + int l = 255; + float d; + + do { + offset = ((((zz*n) + yy)*n + xx) << 2); + if (_texture_data[offset + 2] > 0) + _texture_data[offset + 2] = (unsigned char) ((_texture_data[offset + 2] + l)*0.5f); + else + _texture_data[offset + 2] = (unsigned char) l; + d = _texture_data[offset+1]; + if (l > AMBIENT) { + l -= d*decay; + if (l < AMBIENT) + l = AMBIENT; + } + + i++; + xx = x + _ray_templ[i][0]; + yy = y + _ray_templ[i][1]; + zz = z + _ray_templ[i][2]; + + } while ((xx>=0)&&(xx=0)&&(yy=0)&&(zz0) ? 0 : n-1; + int sy = (_light_dir[1]>0) ? 0 : n-1; + int sz = (_light_dir[2]>0) ? 0 : n-1; + + float decay = 1.0f/(n*DECAY); + + for (i=0; i 0) ? 1 : -1; + int yinc = (ly > 0) ? 1 : -1; + int zinc = (lz > 0) ? 1 : -1; + float tx, ty, tz; + int i = 1; + int len = 0; + int maxlen = 3*edgelen*edgelen; + _ray_templ[0][0] = _ray_templ[0][2] = _ray_templ[0][2] = 0; + + while (len <= maxlen) + { + // fx + t*lx = (x+1) -> t = (x+1-fx)/lx + tx = (x+xinc-fx)/lx; + ty = (y+yinc-fy)/ly; + tz = (z+zinc-fz)/lz; + + if ((tx<=ty)&&(tx<=tz)) { + _ray_templ[i][0] = _ray_templ[i-1][0] + xinc; + x =+ xinc; + fx = x; + + if (ALMOST_EQUAL(ty,tx)) { + _ray_templ[i][1] = _ray_templ[i-1][1] + yinc; + y += yinc; + fy = y; + } else { + _ray_templ[i][1] = _ray_templ[i-1][1]; + fy += tx*ly; + } + + if (ALMOST_EQUAL(tz,tx)) { + _ray_templ[i][2] = _ray_templ[i-1][2] + zinc; + z += zinc; + fz = z; + } else { + _ray_templ[i][2] = _ray_templ[i-1][2]; + fz += tx*lz; + } + } else if ((ty0)&&(t<2)) { + ret[num][0] = edges[i][0][0] + edges[i][1][0]*t; + ret[num][1] = edges[i][0][1] + edges[i][1][1]*t; + ret[num][2] = edges[i][0][2] + edges[i][1][2]*t; + num++; + } + } + + return num; +} + +void draw_slices ( float m[][4] ) +{ + int i; + + float viewdir[3]; + float d0; + float dd; + int n; + float d; + + viewdir[0] = m[0][2]; + viewdir[1] = m[1][2]; + viewdir[2] = m[2][2]; + Normalize(viewdir); + + // find cube vertex that is closest to the viewer + for ( i=0; i<8; i++ ) + { + float x = cv[i][0] + viewdir[0]; + float y = cv[i][1] + viewdir[1]; + float z = cv[i][2] + viewdir[2]; + if ( ( x>=-1.0f ) && ( x<=1.0f ) + && ( y>=-1.0f ) && ( y<=1.0f ) + && ( z>=-1.0f ) && ( z<=1.0f ) ) + { + break; + } + } + if ( i != 8 ) return; + + glBlendFunc ( GL_SRC_ALPHA, GL_ONE ); + glDisable ( GL_DEPTH_TEST ); + // our slices are defined by the plane equation a*x + b*y +c*z + d = 0 + // (a,b,c), the plane normal, are given by viewdir + // d is the parameter along the view direction. the first d is given by + // inserting previously found vertex into the plane equation + d0 = - ( viewdir[0]*cv[i][0] + viewdir[1]*cv[i][1] + viewdir[2]*cv[i][2] ); + dd = 2*d0/64.0f; + n = 0; + + for ( d = -d0; d < d0; d += dd ) + { + // intersect_edges returns the intersection points of all cube edges with + // the given plane that lie within the cube + float pt[12][3]; + int num = intersect_edges ( pt, viewdir[0], viewdir[1], viewdir[2], d ); + + if ( num > 2 ) + { + // sort points to get a convex polygon + // std::sort(pt.begin()+1, pt.end(), Convexcomp(pt[0], viewdir)); + int shuffled = 1; + + while ( shuffled ) + { + int j; + shuffled = 0; + + for ( j = 0; j < num-1; j++ ) + { + // Vec3 va = a-p0, vb = b-p0; + // return dot(up, cross(va, vb)) >= 0; + float va[3], vb[3], vc[3]; + + VECSUB ( va, pt[j], pt[0] ); + VECSUB ( vb, pt[j+1], pt[0] ); + Crossf ( vc, va, vb ); + + if ( INPR ( viewdir, vc ) >= 0 ) + { + float temp[3]; + + VECCOPY ( temp, pt[j] ); + VECCOPY ( pt[j], pt[j+1] ); + VECCOPY ( pt[j+1], temp ); + + shuffled = 1; + } + } + } +/* + glEnable ( GL_TEXTURE_3D ); + glEnable ( GL_FRAGMENT_PROGRAM_ARB ); + glBindProgramARB ( GL_FRAGMENT_PROGRAM_ARB, _prog[0] ); + glActiveTextureARB ( GL_TEXTURE0_ARB ); + glBindTexture ( GL_TEXTURE_3D, _txt[0] ); + glBegin ( GL_POLYGON ); + for ( i=0; iclothObject; + fc *m_fc = NULL; + + if(!cloth) + return; + + m_fc = cloth->m_fc; + + glClearColor(0, 0, 0, 0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + // gluLookAt(0, 0, -_dist, 0, 0, 0, 0, 1, 0); + + // build_rotmatrix(m, _quat); + + glMultMatrixf(&m[0][0]); + + // ---------------------------------------- + // from ligth constructor + m_fc->_light_dir[0] = -1.0f; + m_fc->_light_dir[1] = 0.5f; + m_fc->_light_dir[2] = 0.0f; + + gen_ray_templ(m_fc->_ray_templ, m_fc->_light_dir, 30 + 2); + + cast_light(m_fc->_texture_data, m_fc->_ray_templ, m_fc->_light_dir, 30+2); + + glActiveTextureARB(GL_TEXTURE0_ARB); + glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30+2, 30+2, 30+2, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_fc->_texture_data); + // ---------------------------------------- + + draw_slices(m); +/* + if (_dispstring != NULL) { + glMatrixMode(GL_PROJECTION); + glLoadMatrixd(_ortho_m); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glDisable(GL_TEXTURE_3D); + glDisable(GL_FRAGMENT_PROGRAM_ARB); + glColor4f(1.0, 1.0, 1.0, 1.0); + glRasterPos2i(-_sx/2 + 10, _sy/2 - 15); + + print_string(_dispstring); + + glMatrixMode(GL_PROJECTION); + glLoadMatrixd(_persp_m); + glMatrixMode(GL_MODELVIEW); + } +*/ +} + static void draw_mesh_object_outline(Object *ob, DerivedMesh *dm) { From 5b9a06e041240301d6ee527eaceea29704783346 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 2 Jan 2008 13:51:44 +0000 Subject: [PATCH 069/430] Pre merge commit, only added debug output so far --- source/blender/blenkernel/intern/implicit.c | 6 ++- source/blender/src/drawobject.c | 48 ++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 9e4428c1055..a1d60b34125 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1687,8 +1687,7 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod // If v_n_mag < 0 the edges are approaching each other. if ( magrelVel < -ALMOST_ZERO ) { - printf("magrelVel < -ALMOST_ZERO\n"); - + // Calculate Impulse magnitude to stop all motion in normal direction. // const double I_mag = v_n_mag / (1/m1 + 1/m2); float magnitude_i = magrelVel / 2.0f; // TODO implement masses @@ -1697,6 +1696,8 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod float vrel_t[3]; double impulse; float overlap = ( epsilon + ALMOST_ZERO-collpair->distance ); + + printf("magrelVel < -ALMOST_ZERO\n"); // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); @@ -1737,6 +1738,7 @@ int collisions_collision_response_static ( ClothModifierData *clmd, CollisionMod collmd->verts[collpair->point_indexB[2]].impulse_count++; */ + result = 1; // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index a6fced7124a..111f0789ee9 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2483,7 +2483,7 @@ void draw_fl(ClothModifierData *clmd) m_fc->_light_dir[0] = -1.0f; m_fc->_light_dir[1] = 0.5f; m_fc->_light_dir[2] = 0.0f; - + gen_ray_templ(m_fc->_ray_templ, m_fc->_light_dir, 30 + 2); cast_light(m_fc->_texture_data, m_fc->_ray_templ, m_fc->_light_dir, 30+2); @@ -2514,6 +2514,52 @@ void draw_fl(ClothModifierData *clmd) */ } +void fc_load_frame(ClothModifierData *clmd) +{ + float* tmp = (float*) MEM_callocN(30*30*30*sizeof(float), "fc_tmp"); + float tmin=9999999, tmax=-99999999; + Cloth *cloth = clmd->clothObject; + fc *m_fc = NULL; + int i = 0; + + if(!cloth) + return; + + m_fc = cloth->m_fc; + + if (++m_fc->_cur_frame == m_fc->_nframes) { + fseek(m_fc->_fp, 12, SEEK_SET); + m_fc->_cur_frame = 0; + } + + fread(tmp, sizeof(float), 30*30*30, m_fc->_fp); + + for (i=0; i<30*30*30; i++) + { + m_fc->_texture_data[(i<<2)+1] = (unsigned char) (tmp[i]*255.0f); + } + + fread(tmp, sizeof(float), 30*30*30, m_fc->_fp); + + for (i=0; i<30*30*30; i++) + { + m_fc->_texture_data[(i<<2)] = (unsigned char) (tmp[i]*255.0f); + if (tmp[i]tmax) + tmax = tmp[i]; + m_fc->_texture_data[(i<<2)+2] = 0; + m_fc->_texture_data[(i<<2)+3] = 255; + } + + MEM_freeN(tmp); + + // cast_light(_N); DG NOT NEEDED + + glActiveTextureARB(GL_TEXTURE0_ARB); + glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30, 30, 30, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_fc->_texture_data); +} + static void draw_mesh_object_outline(Object *ob, DerivedMesh *dm) { From 8d6bbf763504af934a859573ba45880159bc1828 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 7 Jan 2008 03:20:43 +0000 Subject: [PATCH 070/430] Merged back with last version where collisions worked at least a bit (rev 12296). Also merged fixes (hopefully). --- CMakeLists.txt | 23 +- source/blender/blenkernel/BKE_cloth.h | 188 +- source/blender/blenkernel/BKE_modifier.h | 2 +- source/blender/blenkernel/intern/cloth.c | 1667 +++++++----------- source/blender/blenkernel/intern/collision.c | 900 +++++++++- source/blender/blenkernel/intern/implicit.c | 1200 ++----------- source/blender/blenkernel/intern/modifier.c | 221 +-- source/blender/blenloader/intern/readfile.c | 5 +- source/blender/blenloader/intern/writefile.c | 2 + source/blender/makesdna/DNA_cloth_types.h | 102 +- source/blender/makesdna/DNA_modifier_types.h | 6 +- source/blender/src/buttons_object.c | 193 +- source/blender/src/drawobject.c | 106 -- source/blender/src/vpaint.c | 7 +- 14 files changed, 2043 insertions(+), 2579 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d79c2220104..4eb5e9c659d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,9 @@ OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF) OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" OFF) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) -OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) -OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF) +OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) +OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF) +OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") @@ -184,6 +185,13 @@ IF(UNIX) SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++") + IF(WITH_OPENMP) + SET(LLIBS "${LLIBS} -lgomp ") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ") + ENDIF(WITH_OPENMP) + + SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts") SET(PLATFORM_LINKFLAGS "-pthread") @@ -270,6 +278,11 @@ IF(WIN32) SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + IF(WITH_OPENMP) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ") + ENDIF(WITH_OPENMP) + SET(SDL ${LIBDIR}/sdl) SET(SDL_INC ${SDL}/include) SET(SDL_LIB SDL) @@ -347,6 +360,12 @@ IF(APPLE) SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime") + IF(WITH_OPENMP) + SET(LLIBS "${LLIBS} -lgomp ") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ") + ENDIF(WITH_OPENMP) + SET(SDL ${LIBDIR}/sdl) SET(SDL_INC ${SDL}/include) SET(SDL_LIB SDL) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index b122347998d..eb1f33ae600 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -34,14 +34,14 @@ #ifndef BKE_CLOTH_H #define BKE_CLOTH_H -#include "BKE_customdata.h" #include "BLI_linklist.h" +#include "BKE_customdata.h" #include "BKE_DerivedMesh.h" -#include "BKE_object.h" - #include "DNA_cloth_types.h" #include "DNA_customdata_types.h" #include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" struct Object; struct Cloth; @@ -49,8 +49,8 @@ struct MFace; struct DerivedMesh; struct ClothModifierData; -// this is needed for inlining behaviour +// this is needed for inlining behaviour #ifndef _WIN32 #define LINUX #define DO_INLINE inline @@ -60,71 +60,6 @@ struct ClothModifierData; #define CLOTH_MAX_THREAD 2 -typedef struct fc -{ - float *d, *d0; // density - float *T, *T0; // temperature - float *u, *u0; // velocity in x direction - float *v, *v0; // velocity in y direction - float *w, *w0; // velocity in z direction - unsigned char* _texture_data; - float _light_dir[3]; - int _ray_templ[4096][3]; - FILE* _fp; - int _cur_frame; - int _nframes; -} fc; -fc *f_init(void); -void f_free(fc *m_fc); -void step(fc *m_fc, float dt); - - -typedef struct ClothVertex { - int flags; /* General flags per vertex. */ - float mass; /* mass / weight of the vertex */ - float goal; /* goal, from SB */ - float impulse[3]; /* used in collision.c */ - unsigned int impulse_count; /* same as above */ - float collball; - char octantflag; - float weight; -} ClothVertex; - -typedef struct ClothSpring { - unsigned int ij; /* Pij from the paper, one end of the spring. */ - unsigned int kl; /* Pkl from the paper, one end of the spring. */ - float restlen; /* The original length of the spring. */ - unsigned int matrix_index; /* needed for implicit solver (fast lookup) */ - int type; /* types defined in BKE_cloth.h ("springType") */ - int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ - float dfdx[3][3]; - float dfdv[3][3]; - float f[3]; -} ClothSpring; - -typedef struct Cloth { - struct ClothVertex *verts; /* The vertices that represent this cloth. */ - struct LinkNode *springs; /* The springs connecting the mesh. */ - struct BVH *tree; /* collision tree for this cloth object */ - struct BVH *selftree; /* self collision tree for this cloth object */ - struct MFace *mfaces; - struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ - struct EdgeHash *edgehash; /* used for fast checking adjacent points */ - unsigned int numverts; /* The number of verts == m * n. */ - unsigned int numsprings; /* The count of springs. */ - unsigned int numfaces; - unsigned int numothersprings; - unsigned int numspringssave; - unsigned int old_solver_type; - float (*x)[3]; /* The current position of all vertices.*/ - float (*xold)[3]; /* The previous position of all vertices.*/ - float (*current_x)[3]; /* The TEMPORARY current position of all vertices.*/ - float (*current_xold)[3]; /* The TEMPORARY previous position of all vertices.*/ - float (*v)[4]; /* the current velocity of all vertices */ - float (*current_v)[3]; - float (*xconst)[3]; - struct fc *m_fc; -} Cloth; /* goal defines */ #define SOFTGOALSNAP 0.999f @@ -155,9 +90,7 @@ typedef enum CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ), // object is only collision object, no cloth simulation is done CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ), // true if tearing is enabled - CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), - CLOTH_SIMSETTINGS_FLAG_BIG_FORCE = ( 1 << 6 ), // true if we have big spring force for bending - CLOTH_SIMSETTINGS_FLAG_SLEEP = ( 1 << 7 ), // true if we let the cloth go to sleep + CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled } CLOTH_SIMSETTINGS_FLAGS; /* SPRING FLAGS */ @@ -172,7 +105,6 @@ typedef enum CLOTH_SPRING_TYPE_STRUCTURAL = 0, CLOTH_SPRING_TYPE_SHEAR, CLOTH_SPRING_TYPE_BENDING, - CLOTH_SPRING_TYPE_COLLISION, } CLOTH_SPRING_TYPES; /* SPRING FLAGS */ @@ -188,32 +120,91 @@ typedef enum // needed for buttons_object.c -void cloth_clear_cache(struct Object *ob, struct ClothModifierData *clmd, float framenr); -void cloth_free_modifier ( struct ClothModifierData *clmd ); +void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr); // needed for cloth.c -void implicit_set_positions ( struct ClothModifierData *clmd ); +void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c -DerivedMesh *clothModifier_do(struct ClothModifierData *clmd, struct Object *ob, struct DerivedMesh *dm, int useRenderParams, int isFinalCalc); +void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); -// needed in implicit.c -int cloth_bvh_objcollision(struct ClothModifierData *clmd, float step, float prevstep, float dt); +// used in collision.c +typedef struct Tree +{ + struct Tree *nodes[4]; // 4 children --> quad-tree + struct Tree *parent; + struct Tree *nextLeaf; + struct Tree *prevLeaf; + float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP + unsigned int tri_index; // this saves the index of the face + int count_nodes; // how many nodes are used + int traversed; // how many nodes already traversed until this level? + int isleaf; +} +Tree; + +typedef struct Tree TreeNode; + +typedef struct BVH +{ + unsigned int numfaces; + unsigned int numverts; + ClothVertex *verts; // just a pointer to the original datastructure + MFace *mfaces; // just a pointer to the original datastructure + struct LinkNode *tree; + TreeNode *root; // TODO: saving the root --> is this really needed? YES! + TreeNode *leaf_tree; /* Tail of the leaf linked list. */ + TreeNode *leaf_root; /* Head of the leaf linked list. */ + float epsilon; /* epslion is used for inflation of the k-dop */ + int flags; /* bvhFlags */ +} +BVH; + +typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); + + +///////////////////////////////////////////////// +// collision.c +//////////////////////////////////////////////// + +// needed for implicit.c +void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); +int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); //////////////////////////////////////////////// +///////////////////////////////////////////////// +// kdop.c +//////////////////////////////////////////////// + +// needed for cloth.c +void bvh_free ( BVH * bvh ); +BVH *bvh_build ( ClothModifierData *clmd, float epsilon ); +LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); + +// needed for collision.c +int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); +void bvh_update ( ClothModifierData * clmd, BVH * bvh, int moving ); + +//////////////////////////////////////////////// + + + ///////////////////////////////////////////////// // cloth.c //////////////////////////////////////////////// -void cloth_free_modifier ( struct ClothModifierData *clmd ); -void cloth_init ( struct ClothModifierData *clmd ); +void cloth_free_modifier ( ClothModifierData *clmd ); +void cloth_init ( ClothModifierData *clmd ); +void cloth_deform_verts ( struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd ); +void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); + //////////////////////////////////////////////// /* Typedefs for function pointers we need for solvers and collision detection. */ -typedef void ( *CM_COLLISION_SELF ) ( struct ClothModifierData *clmd, int step ); -// typedef void ( *CM_COLLISION_OBJ ) ( ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response ); +typedef void ( *CM_COLLISION_SELF ) ( ClothModifierData *clmd, int step ); +typedef void ( *CM_COLLISION_OBJ ) ( ClothModifierData *clmd, int step, CM_COLLISION_RESPONSE collision_response ); /* This enum provides the IDs for our solvers. */ @@ -229,26 +220,29 @@ typedef struct { char *name; CM_SOLVER_ID id; - int ( *init ) ( struct Object *ob, struct ClothModifierData *clmd ); - int ( *solver ) ( struct Object *ob, float framenr, struct ClothModifierData *clmd, struct ListBase *effectors ); - int ( *free ) ( struct ClothModifierData *clmd ); + int ( *init ) ( Object *ob, ClothModifierData *clmd ); + int ( *solver ) ( Object *ob, float framenr, ClothModifierData *clmd, ListBase *effectors ); + int ( *free ) ( ClothModifierData *clmd ); } CM_SOLVER_DEF; /* new C implicit simulator */ -int implicit_init ( struct Object *ob, struct ClothModifierData *clmd ); -int implicit_free ( struct ClothModifierData *clmd ); -int implicit_solver ( struct Object *ob, float frame, struct ClothModifierData *clmd, struct ListBase *effectors ); - -/* explicit verlet simulator */ -int verlet_init ( struct Object *ob, struct ClothModifierData *clmd ); -int verlet_free ( struct ClothModifierData *clmd ); -int verlet_solver ( struct Object *ob, float frame, struct ClothModifierData *clmd, struct ListBase *effectors ); +int implicit_init ( Object *ob, ClothModifierData *clmd ); +int implicit_free ( ClothModifierData *clmd ); +int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); +/* used for caching in implicit.c */ +typedef struct Frame +{ + ClothVertex *verts; + ClothSpring *springs; + unsigned int numverts, numsprings; + float time; /* we need float since we want to support sub-frames */ +} +Frame; /* used for collisions in collision.c */ -/* typedef struct CollPair { unsigned int face1; // cloth face @@ -263,7 +257,6 @@ typedef struct CollPair unsigned int pointsb[4]; } CollPair; -*/ /* used for collisions in collision.c */ typedef struct EdgeCollPair @@ -289,8 +282,5 @@ typedef struct FaceCollPair } FaceCollPair; -// function definitions from implicit.c -DO_INLINE void mul_fvector_S(float to[3], float from[3], float scalar); - #endif diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 8927584de1b..682eb1a00dd 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -287,7 +287,7 @@ int modifiers_getCageIndex(struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled(struct Object *ob); -struct ClothModifierData *modifiers_isClothEnabled(Object *ob); +ModifierData * modifiers_isClothEnabled(Object *ob); int modifiers_isParticleEnabled(struct Object *ob); struct Object *modifiers_isDeformedByArmature(struct Object *ob); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 318d6eac410..fef932174a1 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -39,15 +39,15 @@ /* types */ #include "DNA_curve_types.h" -#include "DNA_cloth_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" +#include "DNA_cloth_types.h" #include "DNA_key_types.h" -#include "DNA_lattice_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_modifier_types.h" +#include "DNA_lattice_types.h" #include "DNA_scene_types.h" +#include "DNA_modifier_types.h" #include "BLI_blenlib.h" #include "BLI_arithb.h" @@ -55,8 +55,6 @@ #include "BLI_linklist.h" #include "BKE_curve.h" -#include "BKE_cloth.h" -#include "BKE_collisions.h" #include "BKE_deform.h" #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" @@ -65,11 +63,11 @@ #include "BKE_global.h" #include "BKE_key.h" #include "BKE_mesh.h" -#include "BKE_modifier.h" #include "BKE_object.h" -#include "BKE_pointcache.h" +#include "BKE_cloth.h" +#include "BKE_modifier.h" #include "BKE_utildefines.h" - +#include "BKE_DerivedMesh.h" #include "BIF_editdeform.h" #include "BIF_editkey.h" #include "DNA_screen_types.h" @@ -78,21 +76,7 @@ #include "BIF_space.h" #include "mydevice.h" -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -#if defined(__sun__) && !defined(__sparc__) -#include -#else -#include -#endif -#endif +#include "BKE_pointcache.h" #ifdef _WIN32 void tstart ( void ) @@ -106,9 +90,9 @@ double tval() } #else #include - static struct timeval _tstart, _tend; - static struct timezone tz; - void tstart ( void ) +static struct timeval _tstart, _tend; +static struct timezone tz; +void tstart ( void ) { gettimeofday ( &_tstart, &tz ); } @@ -128,82 +112,88 @@ double tval() /* Our available solvers. */ // 255 is the magic reserved number, so NEVER try to put 255 solvers in here! // 254 = MAX! -static CM_SOLVER_DEF solvers [] = -{ - { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, -}; +static CM_SOLVER_DEF solvers [] = + { + { "Implicit", CM_IMPLICIT, implicit_init, implicit_solver, implicit_free }, + // { "Implicit C++", CM_IMPLICITCPP, implicitcpp_init, implicitcpp_solver, implicitcpp_free }, + }; /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ -static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd); -static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); -static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr); +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); +static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ); +static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); +int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); + -int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ); -static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup); /****************************************************************************** * * External interface called by modifier.c clothModifier functions. * ******************************************************************************/ /** - * cloth_init - creates a new cloth simulation. - * - * 1. create object - * 2. fill object with standard values or with the GUI settings if given - */ -void cloth_init (ClothModifierData *clmd) +* cloth_init - creates a new cloth simulation. +* +* 1. create object +* 2. fill object with standard values or with the GUI settings if given +*/ +void cloth_init ( ClothModifierData *clmd ) { /* Initialize our new data structure to reasonable values. */ - clmd->sim_parms->gravity [0] = 0.0; - clmd->sim_parms->gravity [1] = 0.0; - clmd->sim_parms->gravity [2] = -9.81; - clmd->sim_parms->structural = 100.0; - clmd->sim_parms->shear = 100.0; - clmd->sim_parms->bending = 1.0; - clmd->sim_parms->Cdis = 5.0; - clmd->sim_parms->Cvi = 1.0; - clmd->sim_parms->mass = 1.0f; - clmd->sim_parms->stepsPerFrame = 5; - clmd->sim_parms->sim_time = 1.0; - clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_RESET; - clmd->sim_parms->solver_type = 0; - clmd->sim_parms->preroll = 0; - clmd->sim_parms->maxspringlen = 10; - clmd->coll_parms->self_friction = 5.0; - clmd->coll_parms->friction = 10.0; - clmd->coll_parms->loop_count = 1; - clmd->coll_parms->epsilon = 0.01; - clmd->coll_parms->selfepsilon = 0.49; - + clmd->sim_parms.gravity [0] = 0.0; + clmd->sim_parms.gravity [1] = 0.0; + clmd->sim_parms.gravity [2] = -9.81; + clmd->sim_parms.structural = 100.0; + clmd->sim_parms.shear = 100.0; + clmd->sim_parms.bending = 1.0; + clmd->sim_parms.Cdis = 5.0; + clmd->sim_parms.Cvi = 1.0; + clmd->sim_parms.mass = 1.0f; + clmd->sim_parms.stepsPerFrame = 5; + clmd->sim_parms.sim_time = 1.0; + clmd->sim_parms.flags = CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms.solver_type = 0; + clmd->sim_parms.preroll = 0; + clmd->sim_parms.maxspringlen = 10; + clmd->sim_parms.firstframe = 1; + clmd->sim_parms.lastframe = 250; + clmd->coll_parms.self_friction = 5.0; + clmd->coll_parms.friction = 10.0; + clmd->coll_parms.loop_count = 1; + clmd->coll_parms.epsilon = 0.01f; + clmd->coll_parms.flags = 0; + /* These defaults are copied from softbody.c's * softbody_calc_forces() function. */ - clmd->sim_parms->eff_force_scale = 1000.0; - clmd->sim_parms->eff_wind_scale = 250.0; + clmd->sim_parms.eff_force_scale = 1000.0; + clmd->sim_parms.eff_wind_scale = 250.0; // also from softbodies - clmd->sim_parms->maxgoal = 1.0; - clmd->sim_parms->mingoal = 0.0; - clmd->sim_parms->defgoal = 0.0; - clmd->sim_parms->goalspring = 100.0; - clmd->sim_parms->goalfrict = 0.0; + clmd->sim_parms.maxgoal = 1.0f; + clmd->sim_parms.mingoal = 0.0f; + clmd->sim_parms.defgoal = 0.7f; + clmd->sim_parms.goalspring = 100.0f; + clmd->sim_parms.goalfrict = 0.0f; + + clmd->sim_parms.cache = NULL; } // unused in the moment, cloth needs quads from mesh -DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) +DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) { - /* DerivedMesh *result = NULL; int i; - int numverts = dm->getNumVerts(dm); - int numedges = dm->getNumEdges(dm); - int numfaces = dm->getNumFaces(dm); + int numverts = dm->getNumVerts ( dm ); + int numedges = dm->getNumEdges ( dm ); + int numfaces = dm->getNumFaces ( dm ); - MVert *mvert = CDDM_get_verts(dm); - MEdge *medge = CDDM_get_edges(dm); - MFace *mface = CDDM_get_faces(dm); + MVert *mvert = CDDM_get_verts ( dm ); + MEdge *medge = CDDM_get_edges ( dm ); + MFace *mface = CDDM_get_faces ( dm ); MVert *mvert2; MFace *mface2; @@ -215,121 +205,118 @@ DerivedMesh *CDDM_convert_to_triangle(DerivedMesh *dm) float vec1[3], vec2[3], vec3[3], vec4[3], vec5[3]; float mag1=0, mag2=0; - for(i = 0; i < numfaces; i++) + for ( i = 0; i < numfaces; i++ ) { - if(mface[i].v4) - numquads++; - else - numtris++; -} + if ( mface[i].v4 ) + numquads++; + else + numtris++; + } - result = CDDM_from_template(dm, numverts, 0, numtris + 2*numquads); + result = CDDM_from_template ( dm, numverts, 0, numtris + 2*numquads ); - if(!result) - return NULL; + if ( !result ) + return NULL; // do verts - mvert2 = CDDM_get_verts(result); - for(a=0; av1 = mface[a].v2; - mf->v2 = mface[a].v3; - mf->v3 = mface[a].v4; -} - else - { - mf->v1 = mface[a].v1; - mf->v2 = mface[a].v2; - mf->v3 = mface[a].v3; -} + if ( mface[a].v4 && random==1 ) + { + mf->v1 = mface[a].v2; + mf->v2 = mface[a].v3; + mf->v3 = mface[a].v4; + } + else + { + mf->v1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; + } - mf->v4 = 0; - mf->flag |= ME_SMOOTH; + mf->v4 = 0; + mf->flag |= ME_SMOOTH; - test_index_face(mf, NULL, 0, 3); + test_index_face ( mf, NULL, 0, 3 ); - if(mface[a].v4) - { - MFace *mf2; + if ( mface[a].v4 ) + { + MFace *mf2; - i++; + i++; - mf2 = &mface2[i]; - - // DM_copy_face_data(dm, result, a, i, 1); + mf2 = &mface2[i]; + /* + DM_copy_face_data(dm, result, a, i, 1); - // *mf2 = *inMF; - + *mf2 = *inMF; + */ - if(random==1) - { - mf2->v1 = mface[a].v1; - mf2->v2 = mface[a].v2; - mf2->v3 = mface[a].v4; -} - else - { - mf2->v1 = mface[a].v4; - mf2->v2 = mface[a].v1; - mf2->v3 = mface[a].v3; -} - mf2->v4 = 0; - mf2->flag |= ME_SMOOTH; + if ( random==1 ) + { + mf2->v1 = mface[a].v1; + mf2->v2 = mface[a].v2; + mf2->v3 = mface[a].v4; + } + else + { + mf2->v1 = mface[a].v4; + mf2->v2 = mface[a].v1; + mf2->v3 = mface[a].v3; + } + mf2->v4 = 0; + mf2->flag |= ME_SMOOTH; - test_index_face(mf2, NULL, 0, 3); -} + test_index_face ( mf2, NULL, 0, 3 ); + } - i++; -} + i++; + } - CDDM_calc_edges(result); - CDDM_calc_normals(result); + CDDM_calc_edges ( result ); + CDDM_calc_normals ( result ); return result; - */ - - return NULL; + } -DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) +DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) { - /* DerivedMesh *result = NULL; unsigned int i = 0, a = 0, j=0; - int numverts = dm->getNumVerts(dm); - int numedges = dm->getNumEdges(dm); - int numfaces = dm->getNumFaces(dm); + int numverts = dm->getNumVerts ( dm ); + int numedges = dm->getNumEdges ( dm ); + int numfaces = dm->getNumFaces ( dm ); - MVert *mvert = CDDM_get_verts(dm); - MEdge *medge = CDDM_get_edges(dm); - MFace *mface = CDDM_get_faces(dm); + MVert *mvert = CDDM_get_verts ( dm ); + MEdge *medge = CDDM_get_edges ( dm ); + MFace *mface = CDDM_get_faces ( dm ); MVert *mvert2; MFace *mface2; @@ -339,91 +326,90 @@ DerivedMesh *CDDM_create_tearing(ClothModifierData *clmd, DerivedMesh *dm) Cloth *cloth = clmd->clothObject; ClothSpring *springs = cloth->springs; unsigned int numsprings = cloth->numsprings; - + // create spring tearing hash edgehash = BLI_edgehash_new(); - - for(i = 0; i < numsprings; i++) - { - if((springs[i].flags & CSPRING_FLAG_DEACTIVATE) - &&(!BLI_edgehash_haskey(edgehash, springs[i].ij, springs[i].kl))) - { - BLI_edgehash_insert(edgehash, springs[i].ij, springs[i].kl, NULL); - BLI_edgehash_insert(edgehash, springs[i].kl, springs[i].ij, NULL); - j++; -} -} - - // printf("found %d tears\n", j); - - result = CDDM_from_template(dm, numverts, 0, numfaces); - if(!result) - return NULL; + for ( i = 0; i < numsprings; i++ ) + { + if ( ( springs[i].flags & CLOTH_SPRING_FLAG_DEACTIVATE ) + && ( !BLI_edgehash_haskey ( edgehash, springs[i].ij, springs[i].kl ) ) ) + { + BLI_edgehash_insert ( edgehash, springs[i].ij, springs[i].kl, NULL ); + BLI_edgehash_insert ( edgehash, springs[i].kl, springs[i].ij, NULL ); + j++; + } + } + + // printf("found %d tears\n", j); + + result = CDDM_from_template ( dm, numverts, 0, numfaces ); + + if ( !result ) + return NULL; // do verts - mvert2 = CDDM_get_verts(result); - for(a=0; av1 = mface[a].v1; - mf->v2 = mface[a].v2; - mf->v3 = mface[a].v3; - mf->v4 = mface[a].v4; - - test_index_face(mf, NULL, 0, 4); - - i++; -} -} + *mf = *inMF; + */ - CDDM_lower_num_faces(result, i); - CDDM_calc_edges(result); - CDDM_calc_normals(result); - - BLI_edgehash_free(edgehash, NULL); + if ( ( !BLI_edgehash_haskey ( edgehash, mface[a].v1, mface[a].v2 ) ) + && ( !BLI_edgehash_haskey ( edgehash, mface[a].v2, mface[a].v3 ) ) + && ( !BLI_edgehash_haskey ( edgehash, mface[a].v3, mface[a].v4 ) ) + && ( !BLI_edgehash_haskey ( edgehash, mface[a].v4, mface[a].v1 ) ) ) + { + mf->v1 = mface[a].v1; + mf->v2 = mface[a].v2; + mf->v3 = mface[a].v3; + mf->v4 = mface[a].v4; + + test_index_face ( mf, NULL, 0, 4 ); + + i++; + } + } + + CDDM_lower_num_faces ( result, i ); + CDDM_calc_edges ( result ); + CDDM_calc_normals ( result ); + + BLI_edgehash_free ( edgehash, NULL ); return result; - */ - - return NULL; } + + int modifiers_indexInObject(Object *ob, ModifierData *md_seek); void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; - if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) { stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); @@ -447,9 +433,9 @@ static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr for(a = 0; a < cloth->numverts; a++) { - fwrite(&cloth->x[a], sizeof(float),4,fp); - fwrite(&cloth->xconst[a], sizeof(float),4,fp); - fwrite(&cloth->v[a], sizeof(float),4,fp); + fwrite(&cloth->verts[a].x, sizeof(float),4,fp); + fwrite(&cloth->verts[a].xconst, sizeof(float),4,fp); + fwrite(&cloth->verts[a].v, sizeof(float),4,fp); } fclose(fp); @@ -472,17 +458,17 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) else { for(a = 0; a < cloth->numverts; a++) { - if(fread(&cloth->x[a], sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].x, sizeof(float), 4, fp) != 4) { ret = 0; break; } - if(fread(&cloth->xconst[a], sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].xconst, sizeof(float), 4, fp) != 4) { ret = 0; break; } - if(fread(&cloth->v[a], sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].v, sizeof(float), 4, fp) != 4) { ret = 0; break; @@ -492,182 +478,200 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) fclose(fp); } - if(clmd->sim_parms->solver_type == 0) + if(clmd->sim_parms.solver_type == 0) implicit_set_positions(clmd); return ret; } -int m_fc_open(ClothModifierData *clmd) -{ - Cloth *cloth = clmd->clothObject; - int _N; - fc *m_fc = NULL; - - if(!cloth) - return 0; - - m_fc = cloth->m_fc; - m_fc->_fp = fopen("/home/daniel/Desktop/f32rand.dat", "rb"); - if (!m_fc->_fp) - return 0; - - fread(&_N, sizeof(int), 1, m_fc->_fp); - fread(&_N, sizeof(int), 1, m_fc->_fp); - printf("Resolution: %dx%dx%d\n", _N, _N, _N); - - fread(&m_fc->_nframes, sizeof(int), 1, m_fc->_fp); - printf("Number of frames: %d\n", m_fc->_nframes); - m_fc->_cur_frame = 0; - - return 1; -} - - - -/************************************************ - * clothModifier_do - main simulation function -************************************************/ -DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) +/** +* cloth_deform_verts - simulates one step, framenr is in frames. +* +**/ +void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, + float ( *vertexCos ) [3], int numverts ) { unsigned int i; - unsigned int numverts = -1; unsigned int numedges = -1; unsigned int numfaces = -1; MVert *mvert = NULL; MEdge *medge = NULL; MFace *mface = NULL; - DerivedMesh *result = NULL; + DerivedMesh *result = NULL, *result2 = NULL; Cloth *cloth = clmd->clothObject; - unsigned int framenr = (float)G.scene->r.cfra; - float current_time = bsystem_time(ob, (float)G.scene->r.cfra, 0.0); - ListBase *effectors = NULL; - float deltaTime = current_time - clmd->sim_parms->sim_time; + unsigned int framenr = ( float ) G.scene->r.cfra; + float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); + ListBase *effectors = NULL; + ClothVertex *newframe= NULL, *verts; + Frame *frame = NULL; + LinkNode *search = NULL; + float deltaTime = current_time - clmd->sim_parms.sim_time; + + clmd->sim_parms.ob = ob; - clmd->sim_parms->dt = 1.0f / (clmd->sim_parms->stepsPerFrame * G.scene->r.frs_sec); - result = CDDM_copy(dm); - - if(!result) - { - return dm; - } - - numverts = result->getNumVerts(result); - numedges = result->getNumEdges(result); - numfaces = result->getNumFaces(result); - mvert = CDDM_get_verts(result); - medge = CDDM_get_edges(result); - mface = CDDM_get_faces(result); - - clmd->sim_parms->sim_time = current_time; - - if ( current_time < clmd->sim_parms->firstframe ) - return result; - // only be active during a specific period: // that's "first frame" and "last frame" on GUI /* - if ( clmd->clothObject ) + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) { - if ( clmd->sim_parms->cache ) - { - if ( current_time < clmd->sim_parms->firstframe ) - { - int frametime = cloth_cache_first_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, result, clmd ); -} - return result; -} - else if ( current_time > clmd->sim_parms->lastframe ) - { - int frametime = cloth_cache_last_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, result, clmd ); -} - return result; -} - else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed - { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, result, clmd ); -} - clmd->sim_parms->sim_time = current_time; - return result; -} -} -} - */ - - if(deltaTime == 1.0f) - { - if ((clmd->clothObject == NULL) || (numverts != clmd->clothObject->numverts) ) + if ( clmd->clothObject ) { - cloth_clear_cache(ob, clmd, 0); - - if(!cloth_from_object (ob, clmd, result, dm, framenr)) - return result; + if ( clmd->sim_parms.cache ) + { + if ( current_time < clmd->sim_parms.firstframe ) + { + int frametime = cloth_cache_first_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); + } + return; + } + else if ( current_time > clmd->sim_parms.lastframe ) + { + int frametime = cloth_cache_last_frame ( clmd ); + if ( cloth_cache_search_frame ( clmd, frametime ) ) + { + cloth_cache_get_frame ( clmd, frametime ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); + } + return; + } + else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed + { + if ( cloth_cache_search_frame ( clmd, framenr ) ) + { + cloth_cache_get_frame ( clmd, framenr ); + cloth_to_object ( ob, clmd, vertexCos, numverts ); + } + clmd->sim_parms.sim_time = current_time; + return; + } + } - if(clmd->clothObject == NULL) - return result; + } + } + */ + + // unused in the moment, calculated seperately in implicit.c + clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; + + clmd->sim_parms.sim_time = current_time; + + // check if cloth object was some collision object before and needs freeing now + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) + { + // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing + clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + cloth_free_modifier ( clmd ); + clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + } + + // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) + { + // save next position + time + if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) + { + if ( !collobj_from_object ( ob, clmd, dm, vertexCos, framenr ) ) + { + clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + cloth_free_modifier ( clmd ); + return; + } + + if ( clmd->clothObject == NULL ) + return; cloth = clmd->clothObject; } - /* - deltaTime = 0; - while( deltaTime < 1.0) + + // Save old position + clmd->sim_parms.sim_time_old = clmd->sim_parms.sim_time; + clmd->sim_parms.sim_time = current_time; + + verts = cloth->verts; + + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { - step(cloth->m_fc, 0.1); - deltaTime+=0.1; + // Save the previous position. + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->txold, verts->x ); + + // Get the current position. + VECCOPY ( verts->x, vertexCos[i] ); + Mat4MulVecfl ( ob->obmat, verts->x ); + + // Compute the vertices "velocity". + // (no dt correction here because of float error) + VECSUB ( verts->v, verts->x, verts->xold ); } - */ - clmd->clothObject->old_solver_type = clmd->sim_parms->solver_type; + + return; + } + + if ( deltaTime == 1.0f ) + { + if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) + { + cloth_clear_cache(ob, clmd, 0); + + if ( !cloth_from_object ( ob, clmd, dm, vertexCos, numverts, framenr ) ) + return; + + if ( clmd->clothObject == NULL ) + return; + + cloth = clmd->clothObject; + } + + clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; // Insure we have a clmd->clothObject, in case allocation failed. - if (clmd->clothObject != NULL) + if ( clmd->clothObject != NULL ) { if(!cloth_read_cache(ob, clmd, framenr)) { + verts = cloth->verts; + // Force any pinned verts to their constrained location. - // has to be commented for verlet - for ( i = 0; i < clmd->clothObject->numverts; i++ ) + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) { // Save the previous position. - VECCOPY ( cloth->xold[i], cloth->xconst[i] ); - VECCOPY ( cloth->current_xold[i], cloth->x[i] ); + VECCOPY ( verts->xold, verts->xconst ); + VECCOPY ( verts->txold, verts->x ); + // Get the current position. - VECCOPY ( cloth->xconst[i], mvert[i].co ); - Mat4MulVecfl ( ob->obmat, cloth->xconst[i] ); + VECCOPY ( verts->xconst, vertexCos[i] ); + Mat4MulVecfl ( ob->obmat, verts->xconst ); } - + tstart(); - - /* Call the solver. */ - - if (solvers [clmd->sim_parms->solver_type].solver) - solvers [clmd->sim_parms->solver_type].solver (ob, framenr, clmd, effectors); - + + // Call the solver. + if ( solvers [clmd->sim_parms.solver_type].solver ) + solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); + tend(); - - printf("Cloth simulation time: %f\n", tval()); - + printf ( "Cloth simulation time: %f\n", ( float ) tval() ); + cloth_write_cache(ob, clmd, framenr); + + } + else // just retrieve the cached frame + { + cloth_read_cache(ob, clmd, framenr); } // Copy the result back to the object. - cloth_to_object (ob, result, clmd); - + cloth_to_object ( ob, clmd, vertexCos, numverts ); + // bvh_free(clmd->clothObject->tree); - // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms->epsilon); - } + // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + } } else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) @@ -675,147 +679,85 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d if ( clmd->clothObject != NULL ) { if(cloth_read_cache(ob, clmd, framenr)) - cloth_to_object (ob, result, clmd); + cloth_to_object ( ob, clmd, vertexCos, numverts ); } else { cloth_clear_cache(ob, clmd, 0); } } - - cloth = clmd->clothObject; - /* - if(cloth) - { - if (_texture_data == NULL) - _texture_data = (unsigned char*) malloc((30+2)*(30+2)*(30+2)*4); - - for (i=0; i<(30+2)*(30+2)*(30+2); i++) { - _texture_data[(i<<2)] = (unsigned char) (cloth->m_fc->T[i] * 255.0f); - _texture_data[(i<<2)+1] = (unsigned char) (cloth->m_fc->d[i] * 255.0f); - _texture_data[(i<<2)+2] = 0; - _texture_data[(i<<2)+3] = 255; - } - - // from ligth constructor - _light_dir[0] = -1.0f; - _light_dir[1] = 0.5f; - _light_dir[2] = 0.0f; - - gen_ray_templ(_ray_templ, _light_dir, 30 + 2); - - cast_light(_texture_data, _ray_templ, _light_dir, 30+2); - - glActiveTextureARB(GL_TEXTURE0_ARB); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30+2, 30+2, 30+2, 0, GL_RGBA, GL_UNSIGNED_BYTE, _texture_data); - free(_texture_data); - } - */ - return result; + } /* frees all */ -void cloth_free_modifier (ClothModifierData *clmd) +void cloth_free_modifier ( ClothModifierData *clmd ) { Cloth *cloth = NULL; - - if(!clmd) + Object *ob = clmd->sim_parms.ob; + + if ( !clmd ) return; cloth = clmd->clothObject; - // free our frame cache - // cloth_clear_cache(ob, clmd, 0); - - /* Calls the solver and collision frees first as they - * might depend on data in clmd->clothObject. */ - - if (cloth) - { - f_free(cloth->m_fc); - - // If our solver provides a free function, call it - if (cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free) - { - solvers [cloth->old_solver_type].free (clmd); - } - - // Free the verts. - if (cloth->verts != NULL) - MEM_freeN (cloth->verts); - - // Free the faces. - if ( cloth->mfaces != NULL ) - MEM_freeN ( cloth->mfaces ); - - // Free the verts. - if ( cloth->x != NULL ) - MEM_freeN ( cloth->x ); - - // Free the verts. - if ( cloth->xold != NULL ) - MEM_freeN ( cloth->xold ); - - // Free the verts. - if ( cloth->v != NULL ) - MEM_freeN ( cloth->v ); - - // Free the verts. - if ( cloth->current_x != NULL ) - MEM_freeN ( cloth->current_x ); - - // Free the verts. - if ( cloth->current_xold != NULL ) - MEM_freeN ( cloth->current_xold ); - - // Free the verts. - if ( cloth->current_v != NULL ) - MEM_freeN ( cloth->current_v ); - - // Free the verts. - if ( cloth->xconst != NULL ) - MEM_freeN ( cloth->xconst ); - - cloth->verts = NULL; - cloth->numverts = -1; - - // Free the springs. - if ( cloth->springs != NULL ) + if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) + { + if ( cloth ) { - LinkNode *search = cloth->springs; - while(search) + // free our frame cache, TODO: but get to first position before + if(ob) + cloth_clear_cache ( ob, clmd, 0 ); + + // If our solver provides a free function, call it + if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) { - ClothSpring *spring = search->link; - - MEM_freeN ( spring ); - search = search->next; + solvers [cloth->old_solver_type].free ( clmd ); } - BLI_linklist_free(cloth->springs, NULL); - + + // Free the verts. + if ( cloth->verts != NULL ) + MEM_freeN ( cloth->verts ); + + cloth->verts = NULL; + cloth->numverts = 0; + + // Free the springs. + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; + } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } + cloth->springs = NULL; + cloth->numsprings = 0; + + // free BVH collision tree + if ( cloth->tree ) + bvh_free ( ( BVH * ) cloth->tree ); + + // we save our faces for collision objects + if ( cloth->mfaces ) + MEM_freeN ( cloth->mfaces ); + /* + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + */ + MEM_freeN ( cloth ); + clmd->clothObject = NULL; } - - cloth->numsprings = -1; - - // free BVH collision tree - if(cloth->tree) - bvh_free((BVH *)cloth->tree); - - // free BVH self collision tree - if(cloth->selftree) - bvh_free((BVH *)cloth->selftree); - - if(cloth->edgehash) - BLI_edgehash_free ( cloth->edgehash, NULL ); - - MEM_freeN (cloth); - clmd->clothObject = NULL; } - } - /****************************************************************************** * * Internal functions. @@ -823,44 +765,42 @@ void cloth_free_modifier (ClothModifierData *clmd) ******************************************************************************/ /** - * cloth_to_object - copies the deformed vertices to the object. - * - * This function is a modified version of the softbody.c:softbody_to_object() function. - **/ -static void cloth_to_object (Object *ob, DerivedMesh *dm, ClothModifierData *clmd) +* cloth_to_object - copies the deformed vertices to the object. +* +* This function is a modified version of the softbody.c:softbody_to_object() function. +**/ +static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ) { + ClothVertex *verts = NULL; unsigned int i = 0; - MVert *mvert = NULL; - unsigned int numverts; - Cloth *cloth = clmd->clothObject; - if (clmd->clothObject) { + if ( clmd->clothObject ) + { + verts = clmd->clothObject->verts; + /* inverse matrix is not uptodate... */ - Mat4Invert (ob->imat, ob->obmat); + Mat4Invert ( ob->imat, ob->obmat ); - mvert = CDDM_get_verts(dm); - numverts = dm->getNumVerts(dm); - - for (i = 0; i < numverts; i++) + for ( i = 0; i < numverts; i++, verts++ ) { - VECCOPY (mvert[i].co, cloth->x[i]); - Mat4MulVecfl (ob->imat, mvert[i].co); /* cloth is in global coords */ + VECCOPY ( vertexCos[i], verts->x ); + Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* softbody is in global coords */ } } } /** - * cloth_apply_vgroup - applies a vertex group as specified by type - * - **/ -static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short vgroup) +* cloth_apply_vgroup - applies a vertex group as specified by type +* +**/ +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ) { unsigned int i = 0; unsigned int j = 0; - MDeformVert *dvert = NULL; + MDeformVert *dvert = NULL; Cloth *clothObj = NULL; - unsigned int numverts = 0; + unsigned int numverts = dm->getNumVerts ( dm ); float goalfac = 0; ClothVertex *verts = NULL; @@ -869,7 +809,7 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v if ( !dm ) return; - numverts = dm->getNumVerts(dm); + numverts = dm->getNumVerts ( dm ); /* vgroup is 1 based, decrement so we can match the right group. */ --vgroup; @@ -879,7 +819,7 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v for ( i = 0; i < numverts; i++, verts++ ) { // LATER ON, support also mass painting here - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) @@ -890,7 +830,7 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v { verts->goal = dvert->dw [j].weight; - goalfac= ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); verts->goal = ( float ) pow ( verts->goal , 4.0f ); if ( dvert->dw [j].weight >=SOFTGOALSNAP ) @@ -907,194 +847,226 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, DerivedMesh *dm, short v } } } - + // only meshes supported at the moment -static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, DerivedMesh *olddm, float framenr) +/* collision objects */ +static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) { unsigned int i; - unsigned int numverts = dm->getNumVerts(dm); - MVert *mvert = CDDM_get_verts(dm); + MVert *mvert = NULL; + ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; - Cloth *cloth = NULL; - + /* If we have a clothObject, free it. */ - if (clmd->clothObject != NULL) - cloth_free_modifier (clmd); + if ( clmd->clothObject != NULL ) + cloth_free_modifier ( clmd ); /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN (sizeof(Cloth), "cloth"); - if (clmd->clothObject) + clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); + if ( clmd->clothObject ) { clmd->clothObject->old_solver_type = 255; - clmd->clothObject->edgehash = NULL; + // clmd->clothObject->old_collision_type = 255; } - else if (clmd->clothObject == NULL) + else if ( clmd->clothObject == NULL ) { - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject."); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); return 0; } - - cloth = clmd->clothObject; - - cloth->m_fc = f_init(); - // open file - m_fc_open(clmd); - - switch (ob->type) + switch ( ob->type ) { case OB_MESH: - + // mesh input objects need DerivedMesh if ( !dm ) return 0; - cloth_from_mesh (ob, clmd, dm, framenr); + cloth_from_mesh ( ob, clmd, dm ); + + if ( clmd->clothObject != NULL ) + { + if ( !dm ) return 0; + if ( !dm->getNumVerts ( dm ) || !dm->getNumFaces ( dm ) ) return 0; + + mvert = dm->getVertArray ( dm ); + verts = clmd->clothObject->verts; + numverts = clmd->clothObject->numverts = dm->getNumVerts ( dm ); + + for ( i = 0; i < numverts; i++, verts++ ) + { + VECCOPY ( verts->x, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->x ); + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VECCOPY ( verts->tx, verts->x ); + VecMulf ( verts->v, 0.0f ); + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); + } + clmd->clothObject->tree = bvh_build ( clmd,clmd->coll_parms.epsilon ); + + } + + return 1; + default: return 0; // TODO - we do not support changing meshes + } +} + +/* +helper function to get proper spring length +when object is rescaled +*/ +float cloth_globallen ( float *v1,float *v2,Object *ob ) +{ + float p1[3],p2[3]; + VECCOPY ( p1,v1 ); + Mat4MulVecfl ( ob->obmat, p1 ); + VECCOPY ( p2,v2 ); + Mat4MulVecfl ( ob->obmat, p2 ); + return VecLenf ( p1,p2 ); +} + +// only meshes supported at the moment +static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ) +{ + unsigned int i = 0; + // dm->getNumVerts(dm); + MVert *mvert = NULL; // CDDM_get_verts(dm); + ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; + + /* If we have a clothObject, free it. */ + if ( clmd->clothObject != NULL ) + cloth_free_modifier ( clmd ); + + /* Allocate a new cloth object. */ + clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); + if ( clmd->clothObject ) + { + clmd->clothObject->old_solver_type = 255; + // clmd->clothObject->old_collision_type = 255; + } + else if ( !clmd->clothObject ) + { + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); + return 0; + } + + clmd->sim_parms.ob = ob; + + switch ( ob->type ) + { + case OB_MESH: + + // mesh input objects need DerivedMesh + if ( !dm ) + return 0; + + cloth_from_mesh ( ob, clmd, dm ); if ( clmd->clothObject != NULL ) { /* create springs */ clmd->clothObject->springs = NULL; clmd->clothObject->numsprings = -1; - + + mvert = CDDM_get_verts ( dm ); + verts = clmd->clothObject->verts; + /* set initial values */ - for (i = 0; i < numverts; ++i) + for ( i = 0; i < numverts; i++, verts++ ) { - VECCOPY (clmd->clothObject->x[i], mvert[i].co); - Mat4MulVecfl(ob->obmat, clmd->clothObject->x[i]); - - clmd->clothObject->verts [i].mass = clmd->sim_parms->mass; - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - clmd->clothObject->verts [i].goal= clmd->sim_parms->defgoal; + VECCOPY ( verts->x, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->x ); + + verts->mass = clmd->sim_parms.mass; + + if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal= clmd->sim_parms.defgoal; else - clmd->clothObject->verts [i].goal= 0.0; - clmd->clothObject->verts [i].flags = 0; - VECCOPY(clmd->clothObject->xold[i], clmd->clothObject->x[i]); - VECCOPY(clmd->clothObject->xconst[i], clmd->clothObject->x[i]); - VECCOPY(clmd->clothObject->current_xold[i], clmd->clothObject->x[i]); - VecMulf(clmd->clothObject->v[i], 0.0); - - clmd->clothObject->verts [i].impulse_count = 0; - VECCOPY ( clmd->clothObject->verts [i].impulse, tnull ); + verts->goal= 0.0f; + + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->xconst, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VecMulf ( verts->v, 0.0f ); + + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); } - if (!cloth_build_springs (clmd, dm) ) + if ( !cloth_build_springs ( clmd->clothObject, dm ) ) { - modifier_setError (&(clmd->modifier), "Can't build springs."); + modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); return 0; - } - - /* apply / set vertex groups */ - if (clmd->sim_parms->vgroup_mass > 0) - cloth_apply_vgroup (clmd, olddm, clmd->sim_parms->vgroup_mass); - - /* init our solver */ - if (solvers [clmd->sim_parms->solver_type].init) - solvers [clmd->sim_parms->solver_type].init (ob, clmd); - - clmd->clothObject->tree = bvh_build_from_float3(CDDM_get_faces(dm), dm->getNumFaces(dm), clmd->clothObject->x, numverts, clmd->coll_parms->epsilon); - - clmd->clothObject->selftree = bvh_build_from_float3(NULL, 0, clmd->clothObject->x, numverts, clmd->coll_parms->selfepsilon); - - // save initial state + } + + // apply / set vertex groups + if ( clmd->sim_parms.vgroup_mass > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms.vgroup_mass ); + + // init our solver + if ( solvers [clmd->sim_parms.solver_type].init ) + solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); + + clmd->clothObject->tree = bvh_build ( clmd, clmd->coll_parms.epsilon ); + cloth_write_cache(ob, clmd, framenr-1); } + return 1; - default: return 0; // TODO - we do not support changing meshes + case OB_LATTICE: + printf ( "Not supported: OB_LATTICE\n" ); + // lattice_to_softbody(ob); + return 1; + case OB_CURVE: + case OB_SURF: + printf ( "Not supported: OB_SURF| OB_CURVE\n" ); + return 1; + default: return 0; // TODO - we do not support changing meshes } - + return 0; } -static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr) +static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { - unsigned int numverts = dm->getNumVerts(dm); - unsigned int numfaces = dm->getNumFaces(dm); - MFace *mface = CDDM_get_faces(dm); + unsigned int numverts = dm->getNumVerts ( dm ); + unsigned int numfaces = dm->getNumFaces ( dm ); + MFace *mface = dm->getFaceArray ( dm ); + unsigned int i = 0; /* Allocate our vertices. */ clmd->clothObject->numverts = numverts; - clmd->clothObject->verts = MEM_callocN (sizeof (ClothVertex) * clmd->clothObject->numverts, "clothVertex"); - if (clmd->clothObject->verts == NULL) - { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->verts."); - return; - } - - clmd->clothObject->x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_x" ); - if ( clmd->clothObject->x == NULL ) + clmd->clothObject->verts = MEM_callocN ( sizeof ( ClothVertex ) * clmd->clothObject->numverts, "clothVertex" ); + if ( clmd->clothObject->verts == NULL ) { cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->x." ); - return; - } - - clmd->clothObject->xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_xold" ); - if ( clmd->clothObject->xold == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xold." ); - return; - } - - clmd->clothObject->v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_v" ); - if ( clmd->clothObject->v == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->v." ); - return; - } - - clmd->clothObject->current_x = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_x" ); - if ( clmd->clothObject->current_x == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_x." ); - return; - } - - clmd->clothObject->current_xold = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_xold" ); - if ( clmd->clothObject->current_xold == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_xold." ); - return; - } - - clmd->clothObject->current_v = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_current_v" ); - if ( clmd->clothObject->current_v == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->current_v." ); - return; - } - - clmd->clothObject->xconst = MEM_callocN ( sizeof ( float ) * clmd->clothObject->numverts * 4, "Cloth MVert_xconst" ); - if ( clmd->clothObject->xconst == NULL ) - { - cloth_free_modifier ( clmd ); - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->xconst." ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); return; } // save face information clmd->clothObject->numfaces = numfaces; - clmd->clothObject->mfaces = MEM_callocN (sizeof (MFace) * clmd->clothObject->numfaces, "clothMFaces"); - if (clmd->clothObject->mfaces == NULL) + clmd->clothObject->mfaces = MEM_callocN ( sizeof ( MFace ) * clmd->clothObject->numfaces, "clothMFaces" ); + if ( clmd->clothObject->mfaces == NULL ) { - cloth_free_modifier (clmd); - modifier_setError (&(clmd->modifier), "Out of memory on allocating clmd->clothObject->mfaces."); + cloth_free_modifier ( clmd ); + modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->mfaces." ); return; } - memcpy(clmd->clothObject->mfaces, mface, sizeof(MFace)*numfaces); + for ( i = 0; i < numfaces; i++ ) + memcpy ( &clmd->clothObject->mfaces[i], &mface[i], sizeof ( MFace ) ); /* Free the springs since they can't be correct if the vertices * changed. */ - if (clmd->clothObject->springs != NULL) - MEM_freeN (clmd->clothObject->springs); + if ( clmd->clothObject->springs != NULL ) + MEM_freeN ( clmd->clothObject->springs ); } @@ -1103,7 +1075,6 @@ static void cloth_from_mesh (Object *ob, ClothModifierData *clmd, DerivedMesh *d ***************************************************************************************/ // be carefull: implicit solver has to be resettet when using this one! -// --> only for implicit handling of this spring! int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type) { Cloth *cloth = clmd->clothObject; @@ -1130,12 +1101,11 @@ int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned in return 0; } -int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) +int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { - Cloth *cloth = clmd->clothObject; ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL; unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; - unsigned int i = 0, j = 0, akku_count; + unsigned int i = 0; unsigned int numverts = dm->getNumVerts ( dm ); unsigned int numedges = dm->getNumEdges ( dm ); unsigned int numfaces = dm->getNumFaces ( dm ); @@ -1145,9 +1115,9 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) LinkNode **edgelist = NULL; EdgeHash *edgehash = NULL; LinkNode *search = NULL, *search2 = NULL; - float temp[3], akku, min, max; - LinkNode *node = NULL, *node2 = NULL; - + float temp[3]; + ClothVertex *verts = NULL; + // error handling if ( numedges==0 ) return 0; @@ -1162,6 +1132,8 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) if ( cloth->springs ) MEM_freeN ( cloth->springs ); + + verts = cloth->verts; // create spring network hash edgehash = BLI_edgehash_new(); @@ -1175,54 +1147,16 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) { spring->ij = medge[i].v1; spring->kl = medge[i].v2; - VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); + VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; struct_springs++; - - if(!i) - node2 = BLI_linklist_append_fast ( &cloth->springs, spring ); - else - node2 = BLI_linklist_append_fast ( &node->next, spring ); - node = node2; - } - } - - // calc collision balls *slow* - // better: use precalculated list with O(1) index access to all springs of a vertex - // missing for structural since it's not needed for building bending springs - for ( i = 0; i < numverts; i++ ) - { - akku_count = 0; - akku = 0.0; - cloth->verts[i].collball=0; - min = 1e22f; - max = -1e22f; - - search = cloth->springs; - for ( j = 0; j < struct_springs; j++ ) - { - if ( !search ) - break; - tspring = search->link; - - if((tspring->ij == i) || (tspring->kl == i)) - { - akku += spring->restlen; - akku_count++; - min = MIN2(spring->restlen,min); - max = MAX2(spring->restlen,max); - } + BLI_linklist_append ( &cloth->springs, spring ); } - - if (akku_count > 0) { - cloth->verts[i].collball = akku/(float)akku_count*clmd->coll_parms->selfepsilon; - } - else cloth->verts[i].collball=0; } - + // shear springs for ( i = 0; i < numfaces; i++ ) { @@ -1230,7 +1164,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) spring->ij = mface[i].v1; spring->kl = mface[i].v3; - VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); + VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; @@ -1238,8 +1172,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) BLI_linklist_append ( &edgelist[spring->kl], spring ); shear_springs++; - node2 = BLI_linklist_append_fast ( &node->next, spring ); - node = node2; + BLI_linklist_append ( &cloth->springs, spring ); if ( mface[i].v4 ) { @@ -1247,19 +1180,18 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) spring->ij = mface[i].v2; spring->kl = mface[i].v4; - VECSUB ( temp, cloth->x[spring->kl], cloth->x[spring->ij] ); - spring->restlen = sqrt ( INPR ( temp, temp ) ); - spring->type = CLOTH_SPRING_TYPE_SHEAR; + VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_SHEAR; - BLI_linklist_append ( &edgelist[spring->ij], spring ); - BLI_linklist_append ( &edgelist[spring->kl], spring ); - shear_springs++; + BLI_linklist_append ( &edgelist[spring->ij], spring ); + BLI_linklist_append ( &edgelist[spring->kl], spring ); + shear_springs++; - node2 = BLI_linklist_append_fast ( &node->next, spring ); - node = node2; + BLI_linklist_append ( &cloth->springs, spring ); } } - + // bending springs search2 = cloth->springs; for ( i = struct_springs; i < struct_springs+shear_springs; i++ ) @@ -1277,38 +1209,36 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) // check for existing spring // check also if startpoint is equal to endpoint if ( !BLI_edgehash_haskey ( edgehash, index2, tspring2->ij ) - && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) - && ( index2!=tspring2->ij ) ) + && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) + && ( index2!=tspring2->ij ) ) { spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); spring->ij = tspring2->ij; spring->kl = index2; - VECSUB ( temp, cloth->x[index2], cloth->x[tspring2->ij] ); + VECSUB ( temp, verts[index2].x, verts[tspring2->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_BENDING; BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); bend_springs++; - node2 = BLI_linklist_append_fast ( &node->next, spring ); - node = node2; + BLI_linklist_append ( &cloth->springs, spring ); } search = search->next; } search2 = search2->next; } - - cloth->numspringssave = cloth->numsprings = struct_springs + shear_springs + bend_springs; - cloth->numothersprings = struct_springs + shear_springs; - + + cloth->numsprings = struct_springs + shear_springs + bend_springs; + for ( i = 0; i < numverts; i++ ) { BLI_linklist_free ( edgelist[i],NULL ); } if ( edgelist ) MEM_freeN ( edgelist ); - - cloth->edgehash = edgehash; + + BLI_edgehash_free ( edgehash, NULL ); return 1; @@ -1317,344 +1247,3 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) * SPRING NETWORK BUILDING IMPLEMENTATION END ***************************************************************************************/ -#define F_ITER 20 -#define m_diffusion 0.00001f -#define m_viscosity 0.000f -#define m_buoyancy 1.5f -#define m_cooling 1.0f -#define m_vc_eps 4.0f - -#define GRID_SIZE 30 -#define SIZE ((GRID_SIZE+2)*(GRID_SIZE+2)*(GRID_SIZE+2)) -#define _I(x,y,z) (((z)<<10)+((y)<<5)+x) - -#define SWAPFPTR(x,y) {float *t=x;x=y;y=t;} - -float buffers[10][SIZE]; -float sd[SIZE], su[SIZE], sv[SIZE], sw[SIZE], sT[SIZE]; - - -// nothing to do in this mode -// add code for 2nd mode -void set_bnd(int b, float* x, int N) -{ -} - -void lin_solve(int b, float *x, float *x0, float a, float c, int N) -{ - float cRecip = 1.0 / c; - int i, j, k, l; - for (l=0; lN+0.5) xx=N+0.5f; i0=(int)xx; i1=i0+1; - if (yy<0.5) yy=0.5f; if (yy>N+0.5) yy=N+0.5f; j0=(int)yy; j1=j0+1; - if (zz<0.5) zz=0.5f; if (zz>N+0.5) zz=N+0.5f; k0=(int)zz; k1=k0+1; - sx1 = xx-i0; sx0 = 1-sx1; - sy1 = yy-j0; sy0 = 1-sy1; - sz1 = zz-k0; sz0 = 1-sz1; - v0 = sx0*(sy0*x0[_I(i0,j0,k0)]+sy1*x0[_I(i0,j1,k0)])+sx1*(sy0*x0[_I(i1,j0,k0)]+sy1*x0[_I(i1,j1,k0)]); - v1 = sx0*(sy0*x0[_I(i0,j0,k1)]+sy1*x0[_I(i0,j1,k1)])+sx1*(sy0*x0[_I(i1,j0,k1)]+sy1*x0[_I(i1,j1,k1)]); - x[_I(i,j,k)] = sz0*v0 + sz1*v1; - } - } - } - set_bnd(b,x, N); -} - -void advect_cool(int b, float* x0, float* x, float* y0, float* y, float* uu, float* vv, float* ww, float dt, float cooling, int N) -{ - int i, j, k, i0, j0, k0, i1, j1, k1; - float sx0, sx1, sy0, sy1, sz0, sz1, v0, v1; - float xx, yy, zz, dt0, c0; - dt0 = dt*N; - c0 = 1.0f - cooling*dt; - for (k=1; k<=N; k++) - { - for (j=1; j<=N; j++) - { - for (i=1; i<=N; i++) - { - xx = i-dt0*uu[_I(i,j,k)]; - yy = j-dt0*vv[_I(i,j,k)]; - zz = k-dt0*ww[_I(i,j,k)]; - if (xx<0.5) xx=0.5f; if (xx>N+0.5) xx=N+0.5f; i0=(int)xx; i1=i0+1; - if (yy<0.5) yy=0.5f; if (yy>N+0.5) yy=N+0.5f; j0=(int)yy; j1=j0+1; - if (zz<0.5) zz=0.5f; if (zz>N+0.5) zz=N+0.5f; k0=(int)zz; k1=k0+1; - sx1 = xx-i0; sx0 = 1-sx1; - sy1 = yy-j0; sy0 = 1-sy1; - sz1 = zz-k0; sz0 = 1-sz1; - v0 = sx0*(sy0*x0[_I(i0,j0,k0)]+sy1*x0[_I(i0,j1,k0)])+sx1*(sy0*x0[_I(i1,j0,k0)]+sy1*x0[_I(i1,j1,k0)]); - v1 = sx0*(sy0*x0[_I(i0,j0,k1)]+sy1*x0[_I(i0,j1,k1)])+sx1*(sy0*x0[_I(i1,j0,k1)]+sy1*x0[_I(i1,j1,k1)]); - x[_I(i,j,k)] = sz0*v0 + sz1*v1; - v0 = sx0*(sy0*y0[_I(i0,j0,k0)]+sy1*y0[_I(i0,j1,k0)])+sx1*(sy0*y0[_I(i1,j0,k0)]+sy1*y0[_I(i1,j1,k0)]); - v1 = sx0*(sy0*y0[_I(i0,j0,k1)]+sy1*y0[_I(i0,j1,k1)])+sx1*(sy0*y0[_I(i1,j0,k1)]+sy1*y0[_I(i1,j1,k1)]); - y[_I(i,j,k)] = (sz0*v0 + sz1*v1)*c0; - } - } - } - set_bnd(b,x, N); - set_bnd(b,y, N); -} - -void fproject(float* u, float* u0, float* v, float* v0, float* w, float* w0, int N) -{ - float* p = u0; float* div = v0; // temporary buffers, use old velocity buffers - int i, j, k; - float h; - h = 1.0f/N; - for (k=1; k<=N; k++) { - for (j=1; j<=N; j++) { - for (i=1; i<=N; i++) { - div[_I(i,j,k)] = -h*( - u[_I(i+1,j,k)]-u[_I(i-1,j,k)]+ - v[_I(i,j+1,k)]-v[_I(i,j-1,k)]+ - w[_I(i,j,k+1)]-w[_I(i,j,k-1)])*0.5; - p[_I(i,j,k)] = 0; - } - } - } - set_bnd(0, div, N); - set_bnd(0, p, N); - lin_solve(0, p, div, 1, 6, N); - - for (k=1; k<=N; k++) { - for (j=1; j<=N; j++) { - for (i=1; i<=N; i++) { - u[_I(i,j,k)] -= (p[_I(i+1,j,k)]-p[_I(i-1,j,k)])*0.5*N; - v[_I(i,j,k)] -= (p[_I(i,j+1,k)]-p[_I(i,j-1,k)])*0.5*N; - w[_I(i,j,k)] -= (p[_I(i,j,k+1)]-p[_I(i,j,k-1)])*0.5*N; - } - } - } - set_bnd(1, u, N); - set_bnd(2, v, N); - set_bnd(3, w, N); -} - -void vorticity_confinement(float *T0, float* u, float* u0, float* v, float* v0, float* w, float* w0, float dt, float vc_eps, int N) -{ - int i,j,k,ijk; - float *curlx = u0, *curly = v0, *curlz=w0, *curl=T0; // temp buffers - float dt0 = dt * vc_eps; - float x,y,z; - - - for (k=1; ku, m_fc->u0, m_fc->v, m_fc->v0, m_fc->w, m_fc->w0, m_fc->T, m_fc->T0, dt, GRID_SIZE); - dens_temp_step(sd, sT, m_fc->T, m_fc->T0, m_fc->d, m_fc->d0, m_fc->u, m_fc->v, m_fc->w, dt, GRID_SIZE); -} - - - -void clear_buffer(float* x) -{ - int i; - for (i=0; id=buffers[i++]; m_fc->d0=buffers[i++]; - m_fc->T=buffers[i++]; m_fc->T0=buffers[i++]; - m_fc->u=buffers[i++]; m_fc->u0=buffers[i++]; - m_fc->v=buffers[i++]; m_fc->v0=buffers[i++]; - m_fc->w=buffers[i++]; m_fc->w0=buffers[i++]; - - clear_sources(sd, su, sv); - - size=(GRID_SIZE+2)*(GRID_SIZE+2)*(GRID_SIZE+2); - for (i=0; iv[i] = -0.5f; - - m_fc->_texture_data = (unsigned char*) MEM_callocN((30+2)*(30+2)*(30+2)*4, "fc_texture_data"); - - m_fc->_fp = 0; - - return m_fc; -} - -void f_free(fc *m_fc) -{ - if(m_fc) - { - if(m_fc->_texture_data) - MEM_freeN(m_fc->_texture_data); - - if(m_fc->_fp) - fclose(m_fc->_fp); - - MEM_freeN(m_fc); - } -} - diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 4bc1efc1e70..4a03f579fe8 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -49,7 +49,6 @@ #include "BLI_arithb.h" #include "BLI_edgehash.h" #include "BLI_linklist.h" -#include "BKE_collisions.h" #include "BKE_curve.h" #include "BKE_deform.h" #include "BKE_DerivedMesh.h" @@ -71,20 +70,6 @@ #include "Bullet-C-Api.h" -// step is limited from 0 (frame start position) to 1 (frame end position) -void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) -{ - float tv[3] = {0,0,0}; - unsigned int i = 0; - - for ( i = 0; i < collmd->numverts; i++ ) - { - VECSUB(tv, collmd->xnew[i].co, collmd->x[i].co); - VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep); - VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step); - VECSUB(collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co); - } -} /** @@ -232,7 +217,7 @@ int gsl_poly_solve_quadratic (float a, float b, float c, float *x0, float *x1) * page 4, left column */ -int collisions_get_collision_time(float a[3], float b[3], float c[3], float d[3], float e[3], float f[3], float solution[3]) +int cloth_get_collision_time(float a[3], float b[3], float c[3], float d[3], float e[3], float f[3], float solution[3]) { int num_sols = 0; @@ -333,7 +318,7 @@ int collisions_get_collision_time(float a[3], float b[3], float c[3], float d[3] } // w3 is not perfect -void collisions_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) +void cloth_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3) { double tempV1[3], tempV2[3], tempV4[3]; double a,b,c,d,e,f; @@ -376,3 +361,884 @@ DO_INLINE void interpolateOnTriangle(float to[3], float v1[3], float v2[3], floa VECADDMUL(to, v3, w3); } +// unused in the moment, has some bug in +DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal[3], double normalVelocity, + double frictionConstant, double delta_V_n) +{ + float vrel_t_pre[3]; + float vrel_t[3]; + VECSUBS(vrel_t_pre, vrel, normal, normalVelocity); + VECCOPY(to, vrel_t_pre); + VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); +} + +int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + unsigned int i = 0; + int result = 0; + LinkNode *search = NULL; + CollPair *collpair = NULL; + Cloth *cloth1, *cloth2; + float w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + search = clmd->coll_parms.collision_list; + + while(search) + { + collpair = search->link; + + // compute barycentric coordinates for both collision points + cloth_compute_barycentric(collpair->pa, + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3); + + cloth_compute_barycentric(collpair->pb, + cloth2->verts[collpair->bp1].txold, + cloth2->verts[collpair->bp2].txold, + cloth2->verts[collpair->bp3].txold, + &u1, &u2, &u3); + + // Calculate relative "velocity". + interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); + + interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); + + VECSUB(relativeVelocity, v1, v2); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR(relativeVelocity, collpair->normal); + + // printf("magrelVel: %f\n", magrelVel); + + // Calculate masses of points. + + // If v_n_mag < 0 the edges are approaching each other. + if(magrelVel < -ALMOST_ZERO) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + // const double I_mag = v_n_mag / (1/m1 + 1/m2); + float magnitude_i = magrelVel / 2.0f; // TODO implement masses + float tangential[3], magtangent, magnormal, collvel[3]; + float vrel_t_pre[3]; + float vrel_t[3]; + double impulse; + float epsilon = clmd->coll_parms.epsilon; + float overlap = (epsilon + ALMOST_ZERO-collpair->distance); + + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + + // magtangent = INPR(tangential, tangential); + + // Apply friction impulse. + if (magtangent < -ALMOST_ZERO) + { + + // printf("friction applied: %f\n", magtangent); + // TODO check original code + /* + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v2].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v3].tv,tangential); + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v4].tv,tangential); + */ + } + + + impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + // printf("impulse: %f\n", impulse); + + VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); + cloth1->verts[collpair->ap3].impulse_count++; + + result = 1; + + /* + if (overlap > ALMOST_ZERO) { + double I_mag = overlap * 0.1; + + impulse = -I_mag / ( 1.0 + w1*w1 + w2*w2 + w3*w3); + + VECADDMUL(cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL(cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse); + cloth1->verts[collpair->ap3].impulse_count++; + } + */ + + // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case + + // Apply the impulse and increase impulse counters. + + /* + // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); + VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); + // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); + magtangent = Normalize(vrel_t_pre); + VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); + + VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); + */ + + + + } + + search = search->next; + } + + + return result; +} + +int cloth_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + + +int cloth_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) +{ + +} + +void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + CollPair *collpair = NULL; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0; + + for(i = 0; i < 4; i++) + { + collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + // check all possible pairs of triangles + if(i == 0) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; + + } + + if(i == 1) + { + if(face1->v4) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v1; + collpair->bp2 = face2->v2; + collpair->bp3 = face2->v3; + } + else + i++; + } + + if(i == 2) + { + if(face2->v4) + { + collpair->ap1 = face1->v1; + collpair->ap2 = face1->v2; + collpair->ap3 = face1->v3; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; + } + else + i+=2; + } + + if(i == 3) + { + if((face1->v4)&&(face2->v4)) + { + collpair->ap1 = face1->v3; + collpair->ap2 = face1->v4; + collpair->ap3 = face1->v1; + + collpair->bp1 = face2->v3; + collpair->bp2 = face2->v4; + collpair->bp3 = face2->v1; + } + else + i++; + } + + // calc SIPcode (?) + + if(i < 4) + { + // calc distance + normal + distance = plNearestPoints( + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); + + if (distance <= (epsilon + ALMOST_ZERO)) + { + // printf("dist: %f\n", (float)distance); + + // collpair->face1 = tree1->tri_index; + // collpair->face2 = tree2->tri_index; + + VECCOPY(collpair->normal, collpair->vector); + Normalize(collpair->normal); + + collpair->distance = distance; + BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); + } + else + { + MEM_freeN(collpair); + } + } + else + { + MEM_freeN(collpair); + } + } +} + +int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) +{ + Cloth *cloth1, *cloth2; + ClothVertex *verts1, *verts2; + float temp[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); + if(ABS(INPR(temp, temp)) < ALMOST_ZERO) + return 1; + + return 0; +} + +void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + EdgeCollPair edgecollpair; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + for( i = 0; i < 5; i++) + { + if(i == 0) + { + edgecollpair.p11 = face1->v1; + edgecollpair.p12 = face1->v2; + } + else if(i == 1) + { + edgecollpair.p11 = face1->v2; + edgecollpair.p12 = face1->v3; + } + else if(i == 2) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v4; + } + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; + i+=5; // get out of here after this edge pair is handled + } + } + else if(i == 3) + { + if(face1->v4) + { + edgecollpair.p11 = face1->v4; + edgecollpair.p12 = face1->v1; + } + else + continue; + } + else + { + edgecollpair.p11 = face1->v3; + edgecollpair.p12 = face1->v1; + } + + + for( j = 0; j < 5; j++) + { + if(j == 0) + { + edgecollpair.p21 = face2->v1; + edgecollpair.p22 = face2->v2; + } + else if(j == 1) + { + edgecollpair.p21 = face2->v2; + edgecollpair.p22 = face2->v3; + } + else if(j == 2) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v4; + } + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; + } + } + else if(j == 3) + { + if(face2->v4) + { + edgecollpair.p21 = face2->v4; + edgecollpair.p22 = face2->v1; + } + else + continue; + } + else + { + edgecollpair.p21 = face2->v3; + edgecollpair.p22 = face2->v1; + } + + + if(!cloth_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) + { + VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); + VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); + VECSUB(c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold); + VECSUB(d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v); + VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); + VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); + + numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into (edge) collision list + + // printf("Moving edge found!\n"); + } + } + } + } + } +} + +void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + CollPair collpair; + Cloth *cloth1=NULL, *cloth2=NULL; + MFace *face1=NULL, *face2=NULL; + ClothVertex *verts1=NULL, *verts2=NULL; + double distance = 0; + float epsilon = clmd->coll_parms.epsilon; + unsigned int i = 0, j = 0, k = 0; + int numsolutions = 0; + float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + + for(i = 0; i < 2; i++) + { + cloth1 = clmd->clothObject; + cloth2 = coll_clmd->clothObject; + + verts1 = cloth1->verts; + verts2 = cloth2->verts; + + face1 = &(cloth1->mfaces[tree1->tri_index]); + face2 = &(cloth2->mfaces[tree2->tri_index]); + + // check all possible pairs of triangles + if(i == 0) + { + collpair.ap1 = face1->v1; + collpair.ap2 = face1->v2; + collpair.ap3 = face1->v3; + + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; + } + + if(i == 1) + { + if(face1->v4) + { + collpair.ap1 = face1->v3; + collpair.ap2 = face1->v4; + collpair.ap3 = face1->v1; + + collpair.pointsb[0] = face2->v1; + collpair.pointsb[1] = face2->v2; + collpair.pointsb[2] = face2->v3; + collpair.pointsb[3] = face2->v4; + } + else + i++; + } + + // calc SIPcode (?) + + if(i < 2) + { + VECSUB(a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold); + VECSUB(b, verts1[collpair.ap2].v, verts1[collpair.ap1].v); + VECSUB(c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold); + VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); + + for(j = 0; j < 4; j++) + { + if((j==3) && !(face2->v4)) + break; + + VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); + VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); + + numsolutions = cloth_get_collision_time(a, b, c, d, e, f, solution); + + for (k = 0; k < numsolutions; k++) + { + if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) + { + float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into (point-face) collision list + + // printf("Moving found!\n"); + + } + } + + // TODO: check borders for collisions + } + + } + } +} + +void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +{ + // TODO: check for adjacent + cloth_collision_moving_edges(clmd, coll_clmd, tree1, tree2); + + cloth_collision_moving_tris(clmd, coll_clmd, tree1, tree2); + cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); +} + +// move collision objects forward in time and update static bounding boxes +void cloth_update_collision_objects(float step) +{ + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Object *coll_ob=NULL; + unsigned int i=0; + + // search all objects for collision object + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + Cloth *coll_cloth = coll_clmd->clothObject; + BVH *coll_bvh = coll_clmd->clothObject->tree; + unsigned int coll_numverts = coll_cloth->numverts; + + // update position of collision object + for(i = 0; i < coll_numverts; i++) + { + VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); + + VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); + + // no dt here because of float rounding errors + VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); + } + + // update BVH of collision object + bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } +} + +// CLOTH_MAX_THRESHOLD defines how much collision rounds/loops should be taken +#define CLOTH_MAX_THRESHOLD 10 + +// cloth - object collisions +int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) +{ + Base *base=NULL; + ClothModifierData *coll_clmd=NULL; + Cloth *cloth=NULL; + Object *coll_ob=NULL; + BVH *cloth_bvh=NULL; + unsigned int i=0, j = 0, numfaces = 0, numverts = 0; + unsigned int result = 0, ic = 0, rounds = 0; // result counts applied collisions; ic is for debug output; + ClothVertex *verts = NULL; + float tnull[3] = {0,0,0}; + int ret = 0; + + if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + { + return 0; + } + cloth = clmd->clothObject; + verts = cloth->verts; + cloth_bvh = (BVH *) cloth->tree; + numfaces = clmd->clothObject->numfaces; + numverts = clmd->clothObject->numverts; + + //////////////////////////////////////////////////////////// + // static collisions + //////////////////////////////////////////////////////////// + + // update cloth bvh + bvh_update(clmd, cloth_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + + // update collision objects + cloth_update_collision_objects(step); + + do + { + result = 0; + ic = 0; + clmd->coll_parms.collision_list = NULL; + + // check all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static); + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // handle all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject) + result += cloth_collision_response_static(clmd, coll_clmd); + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + // free collision list + if(clmd->coll_parms.collision_list) + { + LinkNode *search = clmd->coll_parms.collision_list; + while(search) + { + CollPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + + clmd->coll_parms.collision_list = NULL; + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (CLOTH_MAX_THRESHOLD>rounds)); + + printf("\n"); + + //////////////////////////////////////////////////////////// + // update positions + // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + //////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////// + // moving collisions + //////////////////////////////////////////////////////////// + + + // update cloth bvh + bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + + // update moving bvh for collision object once + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if (!coll_clmd) + continue; + + if(!coll_clmd->clothObject) + continue; + + // if collision object go on + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING + } + } + + + do + { + result = 0; + ic = 0; + clmd->coll_parms.collision_list = NULL; + + // check all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject && coll_clmd->clothObject->tree) + { + BVH *coll_bvh = coll_clmd->clothObject->tree; + + bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_moving); + } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence + { + result = 0; + + // handle all collision objects + for (base = G.scene->base.first; base; base = base->next) + { + + coll_ob = base->object; + coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + + if (!coll_clmd) + continue; + + // if collision object go on + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + if (coll_clmd->clothObject) + result += cloth_collision_response_moving_tris(clmd, coll_clmd); + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + } + } + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } + } + } + + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + + // update cloth bvh + bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + + + // free collision list + if(clmd->coll_parms.collision_list) + { + LinkNode *search = clmd->coll_parms.collision_list; + while(search) + { + CollPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + + clmd->coll_parms.collision_list = NULL; + } + + printf("ic: %d\n", ic); + rounds++; + } + while(result && (CLOTH_MAX_THRESHOLD>rounds)); + + + //////////////////////////////////////////////////////////// + // update positions + velocities + //////////////////////////////////////////////////////////// + + // verts come from clmd + for(i = 0; i < numverts; i++) + { + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + } + //////////////////////////////////////////////////////////// + + return MIN2(ret, 1); +} diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index a1d60b34125..b154cb0e755 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -46,11 +46,9 @@ #include "DNA_lattice_types.h" #include "DNA_scene_types.h" #include "DNA_modifier_types.h" -#include "BLI_arithb.h" #include "BLI_blenlib.h" -#include "BLI_edgehash.h" +#include "BLI_arithb.h" #include "BLI_threads.h" -#include "BKE_collisions.h" #include "BKE_curve.h" #include "BKE_displist.h" #include "BKE_effect.h" @@ -63,7 +61,6 @@ #include "BKE_global.h" #include "BIF_editdeform.h" -#include "Bullet-C-Api.h" #ifdef _WIN32 #include @@ -85,14 +82,18 @@ void itend(void) double itval() { return ((double)_itend.QuadPart - - (double)_itstart.QuadPart)/((double)ifreq.QuadPart); + (double)_itstart.QuadPart)/((double)ifreq.QuadPart); } #else #include +// intrinsics need better compile flag checking +// #include +// #include +// #include - static struct timeval _itstart, _itend; - static struct timezone itz; - void itstart(void) +static struct timeval _itstart, _itend; +static struct timezone itz; +void itstart(void) { gettimeofday(&_itstart, &itz); } @@ -108,7 +109,14 @@ double itval() return t2-t1; } #endif - +/* +#define C99 +#ifdef C99 +#defineDO_INLINE inline +#else +#defineDO_INLINE static +#endif +*/ struct Cloth; ////////////////////////////////////////// @@ -172,7 +180,7 @@ void print_fvector(float m3[3]) // long float vector float (*)[3] /////////////////////////// /* print long vector on console: for debug output */ -DO_INLINE void print_lfvector(lfVector *fLongVector, unsigned int verts) +DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -188,7 +196,7 @@ DO_INLINE lfVector *create_lfvector(unsigned int verts) // return (lfVector *)cloth_aligned_malloc(&MEMORY_BASE, verts * sizeof(lfVector)); } /* delete long vector */ -DO_INLINE void del_lfvector(lfVector *fLongVector) +DO_INLINE void del_lfvector(float (*fLongVector)[3]) { if (fLongVector != NULL) { @@ -202,7 +210,7 @@ DO_INLINE void cp_lfvector(float (*to)[3], float (*from)[3], unsigned int verts) memcpy(to, from, verts * sizeof(lfVector)); } /* init long vector with float[3] */ -DO_INLINE void init_lfvector(lfVector *fLongVector, float vector[3], unsigned int verts) +DO_INLINE void init_lfvector(float (*fLongVector)[3], float vector[3], unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -216,7 +224,7 @@ DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) memset(to, 0.0f, verts * sizeof(lfVector)); } /* multiply long vector with scalar*/ -DO_INLINE void mul_lfvectorS(float (*to)[3], lfVector *fLongVector, float scalar, unsigned int verts) +DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) { unsigned int i = 0; @@ -227,7 +235,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], lfVector *fLongVector, float scalar } /* multiply long vector with scalar*/ /* A -= B * float */ -DO_INLINE void submul_lfvectorS(float (*to)[3], lfVector *fLongVector, float scalar, unsigned int verts) +DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -236,12 +244,12 @@ DO_INLINE void submul_lfvectorS(float (*to)[3], lfVector *fLongVector, float sca } } /* dot product for big vector */ -DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) +DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) { unsigned int i = 0; float temp = 0.0; // schedule(guided, 2) -#pragma omp parallel for reduction(+: temp) private(i) +#pragma omp parallel for reduction(+: temp) for(i = 0; i < verts; i++) { temp += INPR(fLongVectorA[i], fLongVectorB[i]); @@ -249,7 +257,7 @@ DO_INLINE float dot_lfvector(lfVector *fLongVectorA, lfVector *fLongVectorB, uns return temp; } /* A = B + C --> for big vector */ -DO_INLINE void add_lfvector_lfvector(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) +DO_INLINE void add_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) { unsigned int i = 0; @@ -260,7 +268,7 @@ DO_INLINE void add_lfvector_lfvector(float (*to)[3], lfVector *fLongVectorA, lfV } /* A = B + C * float --> for big vector */ -DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) { unsigned int i = 0; @@ -271,7 +279,7 @@ DO_INLINE void add_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lf } } /* A = B * float + C * float --> for big vector */ -DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], lfVector *fLongVectorA, float aS, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float aS, float (*fLongVectorB)[3], float bS, unsigned int verts) { unsigned int i = 0; @@ -281,7 +289,7 @@ DO_INLINE void add_lfvectorS_lfvectorS(float (*to)[3], lfVector *fLongVectorA, f } } /* A = B - C * float --> for big vector */ -DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, float bS, unsigned int verts) +DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], float bS, unsigned int verts) { unsigned int i = 0; for(i = 0; i < verts; i++) @@ -291,7 +299,7 @@ DO_INLINE void sub_lfvector_lfvectorS(float (*to)[3], lfVector *fLongVectorA, lf } /* A = B - C --> for big vector */ -DO_INLINE void sub_lfvector_lfvector(float (*to)[3], lfVector *fLongVectorA, lfVector *fLongVectorB, unsigned int verts) +DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], float (*fLongVectorB)[3], unsigned int verts) { unsigned int i = 0; @@ -323,7 +331,7 @@ DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) DO_INLINE float det_fmatrix(float m[3][3]) { return m[0][0]*m[1][1]*m[2][2] + m[1][0]*m[2][1]*m[0][2] + m[0][1]*m[1][2]*m[2][0] - -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; + -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; } DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) { @@ -561,37 +569,34 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* SPARSE SYMMETRIC multiply big matrix with long vector*/ /* STATUS: verified */ -DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) +DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) { unsigned int i = 0; - lfVector *temp = create_lfvector(from[0].vcount); - zero_lfvector(to, from[0].vcount); - -#pragma omp parallel sections private(i) + /* process diagonal elements */ + for(i = 0; i < from[0].vcount; i++) { -#pragma omp section - { - for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) - { - muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - } - } -#pragma omp section - { - for(i = 0; i < from[0].vcount+from[0].scount; i++) - { - muladd_fmatrix_fvector(temp[from[i].r], from[i].m, fLongVector[from[i].c]); - } - } + muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); } - add_lfvector_lfvector(to, to, temp, from[0].vcount); - - del_lfvector(temp); - - -} + /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ + // TODO: pragma below is wrong, correct it! + // #pragma omp parallel for shared(to,from, fLongVector) private(i) + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) + { + // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + + to[from[i].c][0] += INPR(from[i].m[0],fLongVector[from[i].r]); + to[from[i].c][1] += INPR(from[i].m[1],fLongVector[from[i].r]); + to[from[i].c][2] += INPR(from[i].m[2],fLongVector[from[i].r]); + + // muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); + + to[from[i].r][0] += INPR(from[i].m[0],fLongVector[from[i].c]); + to[from[i].r][1] += INPR(from[i].m[1],fLongVector[from[i].c]); + to[from[i].r][2] += INPR(from[i].m[2],fLongVector[from[i].c]); + } +} /* SPARSE SYMMETRIC multiply big matrix with long vector (for diagonal preconditioner) */ /* STATUS: verified */ @@ -699,7 +704,7 @@ static float I[3][3] = {{1,0,0},{0,1,0},{0,0,1}}; static float ZERO[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}; typedef struct Implicit_Data { - lfVector *X, *V, *Xnew, *Vnew, *F, *B, *dV, *z; + lfVector *X, *V, *Xnew, *Vnew, *olddV, *F, *B, *dV, *z; fmatrix3x3 *A, *dFdV, *dFdX, *S, *P, *Pinv, *bigI; } Implicit_Data; @@ -735,6 +740,8 @@ int implicit_init (Object *ob, ClothModifierData *clmd) id->Xnew = create_lfvector(cloth->numverts); id->V = create_lfvector(cloth->numverts); id->Vnew = create_lfvector(cloth->numverts); + id->olddV = create_lfvector(cloth->numverts); + zero_lfvector(id->olddV, cloth->numverts); id->F = create_lfvector(cloth->numverts); id->B = create_lfvector(cloth->numverts); id->dV = create_lfvector(cloth->numverts); @@ -767,7 +774,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) // dFdV_start[i].c = big_I[i].c = big_zero[i].c = id->A[i+cloth->numverts].c = id->dFdV[i+cloth->numverts].c = id->dFdX[i+cloth->numverts].c = - id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; + id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; spring->matrix_index = i + cloth->numverts; @@ -776,7 +783,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) for(i = 0; i < cloth->numverts; i++) { - VECCOPY(id->X[i], cloth->x[i]); + VECCOPY(id->X[i], verts[i].x); } return 1; @@ -805,6 +812,7 @@ int implicit_free (ClothModifierData *clmd) del_lfvector(id->Xnew); del_lfvector(id->V); del_lfvector(id->Vnew); + del_lfvector(id->olddV); del_lfvector(id->F); del_lfvector(id->B); del_lfvector(id->dV); @@ -817,31 +825,6 @@ int implicit_free (ClothModifierData *clmd) return 1; } -void cloth_bending_mode(ClothModifierData *clmd, int enabled) -{ - Cloth *cloth = clmd->clothObject; - Implicit_Data *id; - - if(cloth) - { - id = cloth->implicit; - - if(id) - { - if(enabled) - { - cloth->numsprings = cloth->numspringssave; - } - else - { - cloth->numsprings = cloth->numothersprings; - } - - id->A[0].scount = id->dFdV[0].scount = id->dFdX[0].scount = id->P[0].scount = id->Pinv[0].scount = id->bigI[0].scount = cloth->numsprings; - } - } -} - DO_INLINE float fb(float length, float L) { float x = length/L; @@ -892,7 +875,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S) } } -int cg_filtered(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S) +int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S) { // Solves for unknown X in equation AX=B unsigned int conjgrad_loopcount=0, conjgrad_looplimit=100; @@ -905,14 +888,14 @@ int cg_filtered(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix tmp = create_lfvector(numverts); r = create_lfvector(numverts); - // zero_lfvector(dv, CLOTHPARTICLES); - filter(dv, S); + // zero_lfvector(ldV, CLOTHPARTICLES); + filter(ldV, S); - add_lfvector_lfvector(dv, dv, z, numverts); + add_lfvector_lfvector(ldV, ldV, z, numverts); // r = B - Mul(tmp,A,X); // just use B if X known to be zero cp_lfvector(r, lB, numverts); - mul_bfmatrix_lfvector(tmp, lA, dv); + mul_bfmatrix_lfvector(tmp, lA, ldV); sub_lfvector_lfvector(r, r, tmp, numverts); filter(r,S); @@ -932,7 +915,7 @@ int cg_filtered(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix a = s/dot_lfvector(d, q, numverts); // X = X + d*a; - add_lfvector_lfvectorS(dv, dv, d, a, numverts); + add_lfvector_lfvectorS(ldV, ldV, d, a, numverts); // r = r - q*a; sub_lfvector_lfvectorS(r, r, q, a, numverts); @@ -947,16 +930,12 @@ int cg_filtered(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix conjgrad_loopcount++; } - // itend(); - // printf("cg_filtered time: %f\n", (float)itval()); - conjgrad_lasterror = s; del_lfvector(q); del_lfvector(d); del_lfvector(tmp); del_lfvector(r); - // printf("W/O conjgrad_loopcount: %d\n", conjgrad_loopcount); return conjgrad_loopcountrestlen; - float cb = clmd->sim_parms->structural; + float cb = clmd->sim_parms.structural; float nullf[3] = {0,0,0}; float stretch_force[3] = {0,0,0}; float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; + Cloth *cloth = clmd->clothObject; + ClothVertex *verts = cloth->verts; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1125,13 +1106,13 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, /* if(length>L) { - if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) - && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! - { - s->flags |= CSPRING_FLAG_DEACTIVATE; - return; - } - } + if((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms.maxspringlen))) // cut spring! + { + s->flags |= CSPRING_FLAG_DEACTIVATE; + return; + } + } */ mul_fvector_S(dir, extent, 1.0f/length); } @@ -1141,19 +1122,6 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, } - /* - if(s->type == CLOTH_SPRING_TYPE_COLLISION) - { - if(length < L) - { - mul_fvector_S(stretch_force, dir, (100.0*(length-L))); - - VECADD(s->f, s->f, stretch_force); - } - return; - } - */ - // calculate force of structural + shear springs if(s->type != CLOTH_SPRING_TYPE_BENDING) { @@ -1161,72 +1129,56 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms->structural; + k = clmd->sim_parms.structural; mul_fvector_S(stretch_force, dir, (k*(length-L))); VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * 0.01 * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); dfdx_spring_type1(s->dfdx, dir,length,L,k); - dfdv_damp(s->dfdv, dir,clmd->sim_parms->Cdis); + dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis); } } else // calculate force of bending springs { if(length < L) { - // clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; - s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms->bending; + k = clmd->sim_parms.bending; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); - - // if(INPR(bending_force,bending_force) > 0.13*0.13) - { - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; - } - - + dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); - /* - if(s->ij == 300 || s->kl == 300) - printf("id->F[0]: %f, id->F[1]: %f, id->F[2]: %f\n", s->f[0], s->f[1], s->f[2]); - */ } } } -DO_INLINE int cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) +DO_INLINE void cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) { if(s->flags & CLOTH_SPRING_FLAG_NEEDED) { - VECADD(lF[s->ij], lF[s->ij], s->f); - VECSUB(lF[s->kl], lF[s->kl], s->f); - if(s->type != CLOTH_SPRING_TYPE_BENDING) { sub_fmatrix_fmatrix(dFdV[s->ij].m, dFdV[s->ij].m, s->dfdv); sub_fmatrix_fmatrix(dFdV[s->kl].m, dFdV[s->kl].m, s->dfdv); - add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); + add_fmatrix_fmatrix(dFdV[s->matrix_index].m, dFdV[s->matrix_index].m, s->dfdv); } - else if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE)) - return 0; - + + VECADD(lF[s->ij], lF[s->ij], s->f); + VECSUB(lF[s->kl], lF[s->kl], s->f); + sub_fmatrix_fmatrix(dFdX[s->ij].m, dFdX[s->ij].m, s->dfdx); sub_fmatrix_fmatrix(dFdX[s->kl].m, dFdX[s->kl].m, s->dfdx); add_fmatrix_fmatrix(dFdX[s->matrix_index].m, dFdX[s->matrix_index].m, s->dfdx); - } - - return 1; + } } DO_INLINE void calculateTriangleNormal(float to[3], lfVector *X, MFace mface) @@ -1275,7 +1227,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; unsigned int i = 0; - float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */ + float spring_air = clmd->sim_parms.Cvi * 0.01f; /* viscosity of air scaled in percent */ float gravity[3]; float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; ClothVertex *verts = cloth->verts; @@ -1286,7 +1238,8 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float kd, ks; LinkNode *search = cloth->springs; - VECCOPY(gravity, clmd->sim_parms->gravity); + + VECCOPY(gravity, clmd->sim_parms.gravity); mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */ /* set dFdX jacobi matrix to zero */ @@ -1299,24 +1252,24 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec submul_lfvectorS(lF, lV, spring_air, numverts); /* do goal stuff */ - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { for(i = 0; i < numverts; i++) { if(verts [i].goal < SOFTGOALSNAP) { // current_position = xold + t * (newposition - xold) - VECSUB(tvect, cloth->xconst[i], cloth->xold[i]); + VECSUB(tvect, verts[i].xconst, verts[i].xold); mul_fvector_S(tvect, tvect, time); - VECADD(tvect, tvect, cloth->xold[i]); + VECADD(tvect, tvect, verts[i].xold); VECSUB(auxvect, tvect, lX[i]); - ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms->goalspring)-1.0f ; + ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); // calulate damping forces generated by goals - VECSUB(velgoal, cloth->xold[i], cloth->xconst[i]); - kd = clmd->sim_parms->goalfrict * 0.01f; // friction force scale taken from SB + VECSUB(velgoal,verts[i].xold, verts[i].xconst); + kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); } @@ -1329,7 +1282,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; -// #pragma omp parallel for private (i) shared(lF) + #pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1353,42 +1306,24 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec while(search) { // only handle active springs - // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)){} + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)){} cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; } - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_BIG_FORCE) - { - if(cloth->numspringssave != cloth->numsprings) - { - cloth_bending_mode(clmd, 1); - } - } - else - { - if(cloth->numspringssave == cloth->numsprings) - { - cloth_bending_mode(clmd, 0); - } - } - // apply spring forces search = cloth->springs; while(search) { // only handle active springs - // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)) - if(!cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX)) - break; + // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; } - - clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_BIG_FORCE; } -void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, fmatrix3x3 *P, fmatrix3x3 *Pinv) +void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv) { unsigned int numverts = dFdV[0].vcount; @@ -1396,46 +1331,48 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto initdiag_bfmatrix(A, I); zero_lfvector(dV, numverts); - subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); + add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts); - // TODO: unstable with quality=5 + stiffness=7000 + no zero_lfvector() + itstart(); + cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */ + // cg_filtered_pre(dV, A, B, z, olddV, P, Pinv, dt); - // TODO: unstable with quality=5 + stiffness=7000 - // cg_filtered_pre(dV, A, B, z, S, P, Pinv); + itend(); + // printf("cg_filtered calc time: %f\n", (float)itval()); + cp_lfvector(olddV, dV, numverts); + // advance velocities add_lfvector_lfvector(Vnew, lV, dV, numverts); + del_lfvector(dFdXmV); } int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) -{ - unsigned int i=0; +{ + unsigned int i=0, j; float step=0.0f, tf=1.0f; Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; unsigned int numverts = cloth->numverts; - float dt = 1.0f / clmd->sim_parms->stepsPerFrame; + float dt = 1.0f / clmd->sim_parms.stepsPerFrame; Implicit_Data *id = cloth->implicit; int result = 0; - float force = 0, lastforce = 0; - // lfVector *dx; - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { for(i = 0; i < numverts; i++) { // update velocities with constrained velocities from pinned verts if(verts [i].goal >= SOFTGOALSNAP) { - float temp[3]; - VECSUB(temp, cloth->xconst[i], cloth->xold[i]); - VECSUB(id->z[i], temp, id->V[i]); - + VECSUB(id->V[i], verts[i].xconst, verts[i].xold); // VecMulf(id->V[i], 1.0 / dt); } } @@ -1445,43 +1382,13 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase { effectors= pdInitEffectors(ob,NULL); - // clear constraint matrix from collisions - if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) - { - for(i = 0; i < id->S[0].vcount; i++) - { - if(!(verts [id->S[i].r].goal >= SOFTGOALSNAP)) - { - id->S[0].vcount = i-1; - break; - } - } - } - // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); - // check for sleeping - // if(!(clmd->coll_parms->flags & CLOTH_SIMSETTINGS_FLAG_SLEEP)) - { - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); + add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); - add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); - } - /* - dx = create_lfvector(numverts); - sub_lfvector_lfvector(dx, id->Xnew, id->X, numverts); - force = dot_lfvector(dx, dx, numverts); - del_lfvector(dx); - - if((force < 0.00001) && (lastforce >= force)) - clmd->coll_parms->flags |= CLOTH_SIMSETTINGS_FLAG_SLEEP; - else if((lastforce*2 < force)) - clmd->coll_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_SLEEP; - */ - lastforce = force; - - if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + if(clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { // collisions // itstart(); @@ -1489,42 +1396,46 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update verts to current positions for(i = 0; i < numverts; i++) { - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { if(verts [i].goal >= SOFTGOALSNAP) { float tvect[3] = {.0,.0,.0}; // VECSUB(tvect, id->Xnew[i], verts[i].xold); mul_fvector_S(tvect, id->V[i], step+dt); - VECADD(tvect, tvect, cloth->xold[i]); + VECADD(tvect, tvect, verts[i].xold); VECCOPY(id->Xnew[i], tvect); } } - VECCOPY(cloth->current_x[i], id->Xnew[i]); - VECSUB(cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i]); - VECCOPY(cloth->v[i], cloth->current_v[i]); - } - - // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, step, dt); - - // copy corrected positions back to simulation - if(result) - { - memcpy(cloth->current_xold, cloth->current_x, sizeof(lfVector) * numverts); - memcpy(id->Xnew, cloth->current_x, sizeof(lfVector) * numverts); + VECCOPY(verts[i].tx, id->Xnew[i]); - for(i = 0; i < numverts; i++) - { - VECCOPY(id->Vnew[i], cloth->current_v[i]); + VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); + VECCOPY(verts[i].v, verts[i].tv); + } + + // call collision function + result = cloth_bvh_objcollision(clmd, step + dt, dt); + + // copy corrected positions back to simulation + for(i = 0; i < numverts; i++) + { + if(result) + { + // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); + + VECCOPY(verts[i].txold, verts[i].tx); + + VECCOPY(id->Xnew[i], verts[i].tx); + + VECCOPY(id->Vnew[i], verts[i].tv); VecMulf(id->Vnew[i], 1.0f / dt); } - } - else - { - memcpy(cloth->current_xold, id->Xnew, sizeof(lfVector) * numverts); + else + { + VECCOPY(verts[i].txold, id->Xnew[i]); + } } // X = Xnew; @@ -1538,9 +1449,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // calculate cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step); - simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->P, id->Pinv); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt / 2.0f, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); } - } else { @@ -1553,817 +1463,49 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // V = Vnew; cp_lfvector(id->V, id->Vnew, numverts); - + step += dt; if(effectors) pdEndEffectors(effectors); } - - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - { - for(i = 0; i < numverts; i++) + + for(i = 0; i < numverts; i++) + { + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(verts [i].goal < SOFTGOALSNAP) { - VECCOPY(cloth->current_xold[i], id->X[i]); - VECCOPY(cloth->x[i], id->X[i]); + VECCOPY(verts[i].txold, id->X[i]); + VECCOPY(verts[i].x, id->X[i]); + VECCOPY(verts[i].v, id->V[i]); } else { - VECCOPY(cloth->current_xold[i], cloth->xconst[i]); - VECCOPY(cloth->x[i], cloth->xconst[i]); + VECCOPY(verts[i].txold, verts[i].xconst); + VECCOPY(verts[i].x, verts[i].xconst); + VECCOPY(verts[i].v, id->V[i]); } } + else + { + VECCOPY(verts[i].txold, id->X[i]); + VECCOPY(verts[i].x, id->X[i]); + VECCOPY(verts[i].v, id->V[i]); + } } - else - { - memcpy(cloth->current_xold, id->X, sizeof(lfVector) * numverts); - memcpy(cloth->x, id->X, sizeof(lfVector) * numverts); - } - - memcpy(cloth->v, id->V, sizeof(lfVector) * numverts); - return 1; } void implicit_set_positions (ClothModifierData *clmd) { Cloth *cloth = clmd->clothObject; - unsigned int numverts = cloth->numverts; + ClothVertex *verts = cloth->verts; + unsigned int numverts = cloth->numverts, i; Implicit_Data *id = cloth->implicit; - memcpy(id->X, cloth->x, sizeof(lfVector) * numverts); - memcpy(id->V, cloth->v, sizeof(lfVector) * numverts); -} - -unsigned int implicit_getcreate_S_index(ClothModifierData *clmd, unsigned int index) -{ - Cloth *cloth = clmd->clothObject; - Implicit_Data *id = cloth->implicit; - unsigned int i = 0, pinned = 0; - - pinned = id->S[0].vcount; - - for(i = 0; i < pinned; i++) - { - if(id->S[i].r == index) - { - return index; - } - } - - // create new PINNED entry in constraint matrix - id->S[0].vcount++; - id->S[pinned].c = id->S[pinned].r = index; - return pinned; -} - -int collisions_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionPair *collpair ) -{ - - unsigned int i = 0; - int result = 0; - LinkNode *search = NULL; - Cloth *cloth1 = NULL; - float w1, w2, w3, u1, u2, u3; - float v1[3], v2[3], relativeVelocity[3]; - float magrelVel = 0.0; - float epsilon = clmd->coll_parms->epsilon; - - - cloth1 = clmd->clothObject; - - if(!collpair) - { - return 0; - } - - // TODO: check distance & calc normal - // calc distance + normal - collpair->distance = plNearestPoints( - cloth1->current_xold[collpair->point_indexA[0]], - cloth1->current_xold[collpair->point_indexA[1]], - cloth1->current_xold[collpair->point_indexA[2]], - collmd->current_x[collpair->point_indexB[0]].co, - collmd->current_x[collpair->point_indexB[1]].co, - collmd->current_x[collpair->point_indexB[2]].co, - collpair->pa,collpair->pb,collpair->vector); - - if (collpair->distance > (epsilon + ALMOST_ZERO)) - { - printf("collpair->distance > (epsilon + ALMOST_ZERO)\n"); - return 0; - } - - printf("IN1\n"); - - // compute barycentric coordinates for both collision points - collisions_compute_barycentric (collpair->pa, - cloth1->current_xold[collpair->point_indexA[0]], - cloth1->current_xold[collpair->point_indexA[1]], - cloth1->current_xold[collpair->point_indexA[2]], - &w1, &w2, &w3 ); - - collisions_compute_barycentric (collpair->pb, - collmd->current_x[collpair->point_indexB[0]].co, - collmd->current_x[collpair->point_indexB[1]].co, - collmd->current_x[collpair->point_indexB[2]].co, - &u1, &u2, &u3 ); - - // Calculate relative "velocity". - interpolateOnTriangle ( v1, cloth1->current_v[collpair->point_indexA[0]], cloth1->current_v[collpair->point_indexA[1]], cloth1->current_v[collpair->point_indexA[2]], w1, w2, w3 ); - - interpolateOnTriangle ( v2, collmd->current_v[collpair->point_indexB[0]].co, collmd->current_v[collpair->point_indexB[1]].co, collmd->current_v[collpair->point_indexB[2]].co, u1, u2, u3 ); - - VECSUB ( relativeVelocity, v1, v2 ); - - // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). - magrelVel = INPR ( relativeVelocity, collpair->normal ); - - // printf("magrelVel: %f\n", magrelVel); - - // Calculate masses of points. - - // If v_n_mag < 0 the edges are approaching each other. - if ( magrelVel < -ALMOST_ZERO ) - { - - // Calculate Impulse magnitude to stop all motion in normal direction. - // const double I_mag = v_n_mag / (1/m1 + 1/m2); - float magnitude_i = magrelVel / 2.0f; // TODO implement masses - float tangential[3], magtangent, magnormal, collvel[3]; - float vrel_t_pre[3]; - float vrel_t[3]; - double impulse; - float overlap = ( epsilon + ALMOST_ZERO-collpair->distance ); - - printf("magrelVel < -ALMOST_ZERO\n"); - - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); - - // magtangent = INPR(tangential, tangential); - - // Apply friction impulse. - if ( magtangent < -ALMOST_ZERO ) - { - - // printf("friction applied: %f\n", magtangent); - // TODO check original code - } - - - impulse = -2.0f * magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); - - // printf("impulse: %f\n", impulse); - - // face A - VECADDMUL ( cloth1->verts[collpair->point_indexA[0]].impulse, collpair->normal, w1 * impulse ); - cloth1->verts[collpair->point_indexA[0]].impulse_count++; - - VECADDMUL ( cloth1->verts[collpair->point_indexA[1]].impulse, collpair->normal, w2 * impulse ); - cloth1->verts[collpair->point_indexA[1]].impulse_count++; - - VECADDMUL ( cloth1->verts[collpair->point_indexA[2]].impulse, collpair->normal, w3 * impulse ); - cloth1->verts[collpair->point_indexA[2]].impulse_count++; - - // face B - /* - VECADDMUL ( collmd->verts[collpair->point_indexB[0]].impulse, collpair->normal, u1 * impulse ); - collmd->verts[collpair->point_indexB[0]].impulse_count++; - - VECADDMUL ( collmd->verts[collpair->point_indexB[1]].impulse, collpair->normal, u2 * impulse ); - collmd->verts[collpair->point_indexB[1]].impulse_count++; - - VECADDMUL ( collmd->verts[collpair->point_indexB[2]].impulse, collpair->normal, u3 * impulse ); - collmd->verts[collpair->point_indexB[2]].impulse_count++; - */ - - - result = 1; - - // printf("magnitude_i: %f\n", magnitude_i); // negative before collision in my case - - // Apply the impulse and increase impulse counters. - - } - - return result; -} - - -int collisions_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) -{ - return 0; -} - - -int collisions_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) -{ - return 0; -} - -void cloth_collision_static(ClothModifierData *clmd, LinkNode *collision_list) -{ - /* - CollPair *collpair = NULL; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms->epsilon; - unsigned int i = 0; - - for(i = 0; i < 4; i++) - { - collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - // check all possible pairs of triangles - if(i == 0) - { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; - -} - - if(i == 1) - { - if(face1->v4) - { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; - - collpair->bp1 = face2->v1; - collpair->bp2 = face2->v2; - collpair->bp3 = face2->v3; -} - else - i++; -} - - if(i == 2) - { - if(face2->v4) - { - collpair->ap1 = face1->v1; - collpair->ap2 = face1->v2; - collpair->ap3 = face1->v3; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; -} - else - i+=2; -} - - if(i == 3) - { - if((face1->v4)&&(face2->v4)) - { - collpair->ap1 = face1->v3; - collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; - - collpair->bp1 = face2->v3; - collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; -} - else - i++; -} - - - if(i < 4) - { - // calc distance + normal - distance = plNearestPoints( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); - - if (distance <= (epsilon + ALMOST_ZERO)) - { - // printf("dist: %f\n", (float)distance); - - // collpair->face1 = tree1->tri_index; - // collpair->face2 = tree2->tri_index; - - // VECCOPY(collpair->normal, collpair->vector); - // Normalize(collpair->normal); - - // collpair->distance = distance; - -} - else - { - MEM_freeN(collpair); -} -} - else - { - MEM_freeN(collpair); -} -} - */ -} - -int collisions_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) -{ - Cloth *cloth1, *cloth2; - ClothVertex *verts1, *verts2; - float temp[3]; - /* - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - - VECSUB(temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold); - if(ABS(INPR(temp, temp)) < ALMOST_ZERO) - return 1; - */ - return 0; -} - - -void collisions_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) -{ - /* - EdgeCollPair edgecollpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms->epsilon; - unsigned int i = 0, j = 0, k = 0; - int numsolutions = 0; - float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; - - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - for( i = 0; i < 5; i++) - { - if(i == 0) - { - edgecollpair.p11 = face1->v1; - edgecollpair.p12 = face1->v2; -} - else if(i == 1) - { - edgecollpair.p11 = face1->v2; - edgecollpair.p12 = face1->v3; -} - else if(i == 2) - { - if(face1->v4) - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v4; -} - else - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; - i+=5; // get out of here after this edge pair is handled -} -} - else if(i == 3) - { - if(face1->v4) - { - edgecollpair.p11 = face1->v4; - edgecollpair.p12 = face1->v1; -} - else - continue; -} - else - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; -} - - - for( j = 0; j < 5; j++) - { - if(j == 0) - { - edgecollpair.p21 = face2->v1; - edgecollpair.p22 = face2->v2; -} - else if(j == 1) - { - edgecollpair.p21 = face2->v2; - edgecollpair.p22 = face2->v3; -} - else if(j == 2) - { - if(face2->v4) - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v4; -} - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; -} -} - else if(j == 3) - { - if(face2->v4) - { - edgecollpair.p21 = face2->v4; - edgecollpair.p22 = face2->v1; -} - else - continue; -} - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; -} - - - if(!collisions_are_edges_adjacent(clmd, coll_clmd, &edgecollpair)) - { - VECSUB(a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold); - VECSUB(b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v); - VECSUB(c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold); - VECSUB(d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v); - VECSUB(e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold); - VECSUB(f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v); - - numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); - - for (k = 0; k < numsolutions; k++) - { - if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) - { - float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (edge) collision list - - printf("Moving edge found!\n"); -} -} -} -} -} - */ -} - -void collisions_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) -{ - /* - CollPair collpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; - double distance = 0; - float epsilon = clmd->coll_parms->epsilon; - unsigned int i = 0, j = 0, k = 0; - int numsolutions = 0; - float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; - - for(i = 0; i < 2; i++) - { - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); - - // check all possible pairs of triangles - if(i == 0) - { - collpair.ap1 = face1->v1; - collpair.ap2 = face1->v2; - collpair.ap3 = face1->v3; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; -} - - if(i == 1) - { - if(face1->v4) - { - collpair.ap1 = face1->v3; - collpair.ap2 = face1->v4; - collpair.ap3 = face1->v1; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; -} - else - i++; -} - - // calc SIPcode (?) - - if(i < 2) - { - VECSUB(a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold); - VECSUB(b, verts1[collpair.ap2].v, verts1[collpair.ap1].v); - VECSUB(c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold); - VECSUB(d, verts1[collpair.ap3].v, verts1[collpair.ap1].v); - - for(j = 0; j < 4; j++) - { - if((j==3) && !(face2->v4)) - break; - - VECSUB(e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold); - VECSUB(f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v); - - numsolutions = collisions_get_collision_time(a, b, c, d, e, f, solution); - - for (k = 0; k < numsolutions; k++) - { - if ((solution[k] >= 0.0) && (solution[k] <= 1.0)) - { - float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (point-face) collision list - - printf("Moving found!\n"); - -} -} - - // TODO: check borders for collisions -} - -} -} - */ -} - -void collisions_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) -{ - /* - // TODO: check for adjacent - collisions_collision_moving_edges(clmd, coll_clmd, tree1, tree2); - - collisions_collision_moving_tris(clmd, coll_clmd, tree1, tree2); - collisions_collision_moving_tris(coll_clmd, clmd, tree2, tree1); - */ -} - -// cloth - object collisions -int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float prevstep, float dt) -{ - - Base *base = NULL; - CollisionModifierData *collmd = NULL; - Cloth *cloth = NULL; - Object *ob2 = NULL; - BVH *bvh1 = NULL, *bvh2 = NULL, *self_bvh; - LinkNode *collision_list = NULL; - unsigned int i = 0, j = 0, index; - int collisions = 0, count = 0; - float (*current_x)[3]; - Implicit_Data *id = NULL; - int ret = 0; - - if (!(((Cloth *)clmd->clothObject)->tree)) - { - printf("No BVH found\n"); - return 0; - } - - cloth = clmd->clothObject; - bvh1 = cloth->tree; - self_bvh = cloth->selftree; - id = cloth->implicit; - - //////////////////////////////////////////////////////////// - // static collisions - //////////////////////////////////////////////////////////// - - // update cloth bvh - bvh_update_from_float3 ( bvh1, cloth->current_xold, cloth->numverts, cloth->current_x, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) - - // check all collision objects - for ( base = G.scene->base.first; base; base = base->next ) - { - ob2 = base->object; - collmd = ( CollisionModifierData * ) modifiers_findByType ( ob2, eModifierType_Collision ); - - if ( !collmd ) - continue; - - // check if there is a bounding volume hierarchy - if ( collmd->tree ) - { - bvh2 = collmd->tree; - - // update position + bvh of collision object - collision_move_object ( collmd, step, prevstep ); - bvh_update_from_mvert ( collmd->tree, collmd->current_x, collmd->numverts, NULL, 0 ); - - // fill collision list - collisions += bvh_traverse ( bvh1->root, bvh2->root, &collision_list ); - - // call static collision response - if ( collision_list ) - { - LinkNode *search = collision_list; - - while ( search ) - { - collisions_collision_response_static(clmd, collmd, (CollisionPair *)search->link); - - search = search->next; - } - } - - // free collision list - if ( collision_list ) - { - LinkNode *search = collision_list; - - while ( search ) - { - CollisionPair *coll_pair = search->link; - - MEM_freeN ( coll_pair ); - search = search->next; - } - BLI_linklist_free ( collision_list,NULL ); - - collision_list = NULL; - } - } - } - - // vertex weight = 2 - - for(i = 0; i < cloth->numverts; i++) - if ((cloth->verts[i].impulse_count > 0) && !(cloth->verts[i].flags & CVERT_FLAG_PINNED)) - { - printf("applying impulse\n"); - - VECADDS(cloth->current_v[i], cloth->current_v[i], cloth->verts[i].impulse, 1.0 / (cloth->verts[i].impulse_count * 2.0)); - - // reset - cloth->verts[i].impulse_count = 0; - cloth->verts[i].impulse[0] = 0.0; - cloth->verts[i].impulse[1] = 0.0; - cloth->verts[i].impulse[2] = 0.0; - - ret = 1; - } - - ////////////////////////////////////////////// - // update velocities + positions - ////////////////////////////////////////////// - for(i = 0; i < cloth->numverts; i++) - { - VECADD(cloth->current_x[i], cloth->current_xold[i], cloth->current_v[i]); - } - ////////////////////////////////////////////// - - - // Test on *simple* selfcollisions - collisions = 1; - count = 0; - current_x = cloth->current_x; // needed for openMP - /* - // #pragma omp parallel for private(i,j, collisions) shared(current_x) - // for ( count = 0; count < 6; count++ ) - { - collisions = 0; - - for ( i = 0; i < cloth->numverts; i++ ) - { - float mindistance1 = cloth->verts[i].collball; - - for ( j = i + 1; j < cloth->numverts; j++ ) - { - float temp[3]; - float length = 0; - - float mindistance2 = cloth->verts[j].collball; - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - { - if ( ( cloth->verts [i].goal >= SOFTGOALSNAP ) - && ( cloth->verts [j].goal >= SOFTGOALSNAP ) ) - { - continue; - } - } - - // check for adjacent points - if ( BLI_edgehash_haskey ( cloth->edgehash, i, j ) ) - { - continue; - } - - VECSUB ( temp, current_x[i], current_x[j] ); - - length = Normalize ( temp ); - - if ( length < ((mindistance1 + mindistance2)) ) - { - float correction = ((mindistance1 + mindistance2)) - length; - - if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) && ( cloth->verts [i].goal >= SOFTGOALSNAP ) ) - { - VecMulf ( temp, -correction ); - VECADD ( current_x[j], current_x[j], temp ); - } - else if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) && ( cloth->verts [j].goal >= SOFTGOALSNAP ) ) - { - VecMulf ( temp, correction ); - VECADD ( current_x[i], current_x[i], temp ); - } - else - { - unsigned int pinned = id->S[0].vcount; - - printf("correction: %f\n", correction); - - VecMulf ( temp, -correction*0.5 ); - VECADD ( current_x[j], current_x[j], temp ); - VECSUB ( cloth->current_v[j], cloth->current_x[j], cloth->current_xold[j] ); - - index = implicit_getcreate_S_index(clmd, j); - id->S[index].pinned = 1; - - VECSUB ( current_x[i], current_x[i], temp ); - VECSUB ( cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i] ); - - index = implicit_getcreate_S_index(clmd, i); - id->S[index].pinned = 1; - - cloth_add_spring (clmd, i, j, mindistance1 + mindistance2, CLOTH_SPRING_TYPE_COLLISION); - } - - collisions = 1; - } - } - } - } - */ - - ////////////////////////////////////////////// - // SELFCOLLISIONS: update velocities - ////////////////////////////////////////////// - /* - for ( i = 0; i < cloth->numverts; i++ ) - { - VECSUB ( cloth->current_v[i], cloth->current_x[i], cloth->current_xold[i] ); - } - */ - ////////////////////////////////////////////// - - return ret; + for(i = 0; i < numverts; i++) + { + VECCOPY(id->X[i], verts[i].x); + VECCOPY(id->V[i], verts[i].v); + } } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index e7ce752424d..3b69f47b1f4 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -75,7 +75,6 @@ #include "BKE_main.h" #include "BKE_anim.h" #include "BKE_bad_level_calls.h" -#include "BKE_collisions.h" #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_global.h" @@ -2727,7 +2726,7 @@ static void displaceModifier_foreachIDLink(ModifierData *md, Object *ob, { DisplaceModifierData *dmd = (DisplaceModifierData*) md; - walk(userData, ob, (ID **)&dmd->texture); + walk(userData, ob, &dmd->texture); displaceModifier_foreachObjectLink(md, ob, (ObjectWalkFunc) walk, userData); } @@ -4947,15 +4946,9 @@ static void softbodyModifier_deformVerts( static void clothModifier_initData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; - - clmd->sim_parms = MEM_callocN(sizeof(SimulationSettings), - "cloth sim parms"); - clmd->coll_parms = MEM_callocN(sizeof(CollisionSettings), - "cloth coll parms"); - cloth_init (clmd); } -/* + static void clothModifier_deformVerts( ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) @@ -4978,23 +4971,6 @@ static void clothModifier_deformVerts( if(dm) dm->release(dm); } -*/ - -static DerivedMesh *clothModifier_applyModifier( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - int useRenderParams, int isFinalCalc) -{ - ClothModifierData *clmd = (ClothModifierData*) md; - DerivedMesh *result=NULL; - - result = clothModifier_do(clmd, ob, derivedData, useRenderParams, isFinalCalc); - - if(result) - { - return result; - } - return derivedData; -} static void clothModifier_updateDepgraph( ModifierData *md, DagForest *forest, Object *ob, @@ -5011,13 +4987,14 @@ static void clothModifier_updateDepgraph( Object *ob1= base->object; if(ob1 != ob) { - CollisionModifierData *collmd = (CollisionModifierData *)modifiers_findByType(ob1, eModifierType_Collision); - if(collmd) - { - DagNode *curNode = dag_get_node(forest, ob1); - - dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); - + ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); + if(coll_clmd) + { + if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + { + DagNode *curNode = dag_get_node(forest, ob1); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + } } } } @@ -5026,12 +5003,12 @@ static void clothModifier_updateDepgraph( CustomDataMask clothModifier_requiredDataMask(ModifierData *md) { - ClothModifierData *clmd = (ClothModifierData *)md; + ClothModifierData *clmd = (HookModifierData *)md; CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - if (clmd->sim_parms->vgroup_mass > 0) + if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if (clmd->sim_parms.vgroup_mass > 0) dataMask |= (1 << CD_MDEFORMVERT); return dataMask; @@ -5049,156 +5026,11 @@ static void clothModifier_freeData(ModifierData *md) if (clmd) { - - clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; + clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; cloth_free_modifier (clmd); - - MEM_freeN(clmd->sim_parms); - MEM_freeN(clmd->coll_parms); } } -/* Collision */ - -static void collisionModifier_initData(ModifierData *md) -{ - CollisionModifierData *collmd = (CollisionModifierData*) md; - - collmd->x = NULL; - collmd->xnew = NULL; - collmd->current_x = NULL; - collmd->current_xnew = NULL; - collmd->current_v = NULL; - collmd->time = -1; - collmd->numverts = 0; - collmd->tree = NULL; -} - -static void collisionModifier_freeData(ModifierData *md) -{ - CollisionModifierData *collmd = (CollisionModifierData*) md; - - if (collmd) - { - if(collmd->tree) - bvh_free(collmd->tree); - if(collmd->x) - MEM_freeN(collmd->x); - if(collmd->xnew) - MEM_freeN(collmd->xnew); - if(collmd->current_x) - MEM_freeN(collmd->current_x); - if(collmd->current_xnew) - MEM_freeN(collmd->current_xnew); - if(collmd->current_v) - MEM_freeN(collmd->current_v); - - collmd->x = NULL; - collmd->xnew = NULL; - collmd->current_x = NULL; - collmd->current_xnew = NULL; - collmd->current_v = NULL; - collmd->time = -1; - collmd->numverts = 0; - collmd->tree = NULL; - } -} - -static int collisionModifier_dependsOnTime(ModifierData *md) -{ - return 1; -} - -static void collisionModifier_deformVerts( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - float (*vertexCos)[3], int numVerts) -{ - CollisionModifierData *collmd = (CollisionModifierData*) md; - DerivedMesh *dm = NULL; - float current_time = 0; - unsigned int numverts = 0, i = 0; - MVert *tempVert = NULL; - - // if possible use/create DerivedMesh - - if(derivedData) dm = CDDM_copy(derivedData); - else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); - - if(!ob->pd) - { - printf("collisionModifier_deformVerts: Should not happen!\n"); - return; - } - - if(dm) - { - CDDM_apply_vert_coords(dm, vertexCos); - CDDM_calc_normals(dm); - - - current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); - - if(current_time > collmd->time) - { - numverts = dm->getNumVerts ( dm ); - - // check if mesh has changed - if(collmd->x && (numverts != collmd->numverts)) - collisionModifier_freeData((ModifierData *)collmd); - - if(collmd->time == -1) // first time - { - collmd->x = dm->dupVertArray(dm); // frame start position - - for ( i = 0; i < numverts; i++ ) - { - // we save global positions - Mat4MulVecfl ( ob->obmat, collmd->x[i].co ); - } - - collmd->xnew = MEM_dupallocN(collmd->x); // frame end position - collmd->current_x = MEM_dupallocN(collmd->x); // inter-frame - collmd->current_xnew = MEM_dupallocN(collmd->x); // inter-frame - collmd->current_v = MEM_dupallocN(collmd->x); // inter-frame - - collmd->numverts = numverts; - - // TODO: epsilon - // create bounding box hierarchy - collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, numverts, ob->pd->pdef_sbift); - } - else if(numverts == collmd->numverts) - { - // put positions to old positions - tempVert = collmd->x; - collmd->x = collmd->xnew; - collmd->xnew = tempVert; - - memcpy(collmd->xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); - - for ( i = 0; i < numverts; i++ ) - { - // we save global positions - Mat4MulVecfl ( ob->obmat, collmd->xnew[i].co ); - } - - memcpy(collmd->current_xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); - memcpy(collmd->current_x, dm->getVertArray(dm), numverts*sizeof(MVert)); - - // recalc static bounding boxes - bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); - - printf("bvh_update_from_mvert\n"); - } - - collmd->time = current_time; - } - } - - if(dm) - dm->release(dm); -} - /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) @@ -7010,10 +6842,10 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->deformVerts = softbodyModifier_deformVerts; mti = INIT_TYPE(Cloth); - mti->type = eModifierTypeType_Nonconstructive; + mti->type = eModifierTypeType_OnlyDeform; mti->initData = clothModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsMesh - | eModifierTypeFlag_RequiresOriginalData; + mti->flags = eModifierTypeFlag_AcceptsCVs; + // | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode // | eModifierTypeFlag_EnableInEditmode; @@ -7021,19 +6853,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->freeData = clothModifier_freeData; mti->requiredDataMask = clothModifier_requiredDataMask; // mti->copyData = clothModifier_copyData; - // mti->deformVerts = clothModifier_deformVerts; - mti->applyModifier = clothModifier_applyModifier; + mti->deformVerts = clothModifier_deformVerts; mti->updateDepgraph = clothModifier_updateDepgraph; - - mti = INIT_TYPE(Collision); - mti->type = eModifierTypeType_OnlyDeform; - mti->initData = collisionModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsMesh - | eModifierTypeFlag_RequiresOriginalData; - mti->dependsOnTime = collisionModifier_dependsOnTime; - mti->freeData = collisionModifier_freeData; - mti->deformVerts = collisionModifier_deformVerts; - // mti->copyData = collisionModifier_copyData; mti = INIT_TYPE(Boolean); mti->type = eModifierTypeType_Nonconstructive; @@ -7293,11 +7114,11 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -ClothModifierData *modifiers_isClothEnabled(Object *ob) +ModifierData * modifiers_isClothEnabled(Object *ob) { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); - return clmd; + return md; } int modifiers_isParticleEnabled(Object *ob) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d215bdf67cd..37d15b65de5 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2986,12 +2986,14 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) ClothModifierData *clmd = (ClothModifierData*) md; clmd->clothObject = NULL; - + /* clmd->sim_parms= newdataadr(fd, clmd->sim_parms); clmd->coll_parms= newdataadr(fd, clmd->coll_parms); + */ } else if (md->type==eModifierType_Collision) { + /* CollisionModifierData *collmd = (CollisionModifierData*) md; collmd->x = NULL; @@ -3001,6 +3003,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; + */ } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 275e3b18c4c..3326d38c56f 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -827,8 +827,10 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) } else if(md->type==eModifierType_Cloth) { ClothModifierData *clmd = (ClothModifierData*) md; + /* writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms); writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms); + */ } else if (md->type==eModifierType_MeshDeform) { MeshDeformModifierData *mmd = (MeshDeformModifierData*) md; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 4d8fbf1a6fc..2bbe328d170 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -32,7 +32,64 @@ #ifndef DNA_CLOTH_TYPES_H #define DNA_CLOTH_TYPES_H -typedef struct SimulationSettings { +#include "DNA_listBase.h" + + +/** +* Pin and unpin frames are the frames on which the vertices stop moving. +* They will assume the position they had prior to pinFrame until unpinFrame +* is reached. +*/ +typedef struct ClothVertex +{ + int flags; /* General flags per vertex. */ + float v [3]; /* The velocity of the point. */ + float xconst [3]; /* constrained position */ + float x [3]; /* The current position of this vertex. */ + float xold [3]; /* The previous position of this vertex.*/ + float tx [3]; /* temporary position */ + float txold [3]; /* temporary old position */ + float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ + float mass; /* mass / weight of the vertex */ + float goal; /* goal, from SB */ + float impulse[3]; /* used in collision.c */ + unsigned int impulse_count; /* same as above */ +} +ClothVertex; + + +/** +* The definition of a spring. +*/ +typedef struct ClothSpring +{ + int ij; /* Pij from the paper, one end of the spring. */ + int kl; /* Pkl from the paper, one end of the spring. */ + float restlen; /* The original length of the spring. */ + int matrix_index; /* needed for implicit solver (fast lookup) */ + int type; /* types defined in BKE_cloth.h ("springType") */ + int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ + float dfdx[3][3]; + float dfdv[3][3]; + float f[3]; +} +ClothSpring; + + + +/** +* This struct contains all the global data required to run a simulation. +* At the time of this writing, this structure contains data appropriate +* to run a simulation as described in Deformation Constraints in a +* Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot. +* +* I've tried to keep similar, if not exact names for the variables as +* are presented in the paper. Where I've changed the concept slightly, +* as in stepsPerFrame comapred to the time step in the paper, I've used +* variables with different names to minimize confusion. +**/ +typedef struct SimulationSettings +{ short vgroup_mass; /* optional vertexgroup name for assigning weight. */ short pad; float mingoal; /* see SB */ @@ -55,23 +112,56 @@ typedef struct SimulationSettings { float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ float sim_time_old; + struct LinkNode *cache; float defgoal; - float goalfrict; + int goalfrict; float goalspring; int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ -} SimulationSettings; + struct Object *ob; +} +SimulationSettings; -typedef struct CollisionSettings { + +typedef struct CollisionSettings +{ float epsilon; /* The radius of a particle in the cloth. */ float self_friction; /* Fiction/damping with self contact. */ float friction; /* Friction/damping applied on contact with other object.*/ short collision_type; /* which collision system is used. */ short loop_count; /* How many iterations for the collision loop. */ + struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ int flags; /* collision flags defined in BKE_cloth.h */ - float selfepsilon; -} CollisionSettings; + int pad; +} +CollisionSettings; +/** +* This structure describes a cloth object against which the +* simulation can run. +* +* The m and n members of this structure represent the assumed +* rectangular ordered grid for which the original paper is written. +* At some point they need to disappear and we need to determine out +* own connectivity of the mesh based on the actual edges in the mesh. +* +**/ +typedef struct Cloth +{ + struct ClothVertex *verts; /* The vertices that represent this cloth. */ + struct LinkNode *springs; /* The springs connecting the mesh. */ + unsigned int numverts; /* The number of verts == m * n. */ + unsigned int numsprings; /* The count of springs. */ + unsigned int numfaces; + unsigned char old_solver_type; + unsigned char pad2; + short pad3; + void *tree; /* collision tree for this cloth object */ + struct MFace *mfaces; + void *implicit; /* our implicit solver connects to this pointer */ +} +Cloth; + #endif diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 384ac37484d..f8b6f4202a5 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -7,6 +7,8 @@ #define MODSTACK_DEBUG 1 +#include "DNA_cloth_types.h" + /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ typedef enum ModifierType { @@ -347,8 +349,8 @@ typedef struct ClothModifierData { ModifierData modifier; struct Cloth *clothObject; /* The internal data structure for cloth. */ - struct SimulationSettings *sim_parms; /* definition is in DNA_cloth_types.h */ - struct CollisionSettings *coll_parms; /* definition is in DNA_cloth_types.h */ + struct SimulationSettings sim_parms; /* definition is in DNA_cloth_types.h */ + struct CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ } ClothModifierData; typedef struct CollisionModifierData { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index f71f6adb051..662e0df093b 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -48,7 +48,6 @@ #include "BKE_action.h" #include "BKE_cloth.h" -#include "BKE_collisions.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_library.h" @@ -2989,29 +2988,66 @@ void do_effects_panels(unsigned short event) allqueue(REDRAWVIEW3D, 0); break; case B_CLOTH_CLEARCACHEALL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + cloth_clear_cache(ob, clmd, 2); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + break; + case B_CLOTH_CLEARCACHEFRAME: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + cloth_clear_cache(ob, clmd, MAX2(2.0,G.scene->r.cfra + 1.0)); + allqueue(REDRAWBUTSOBJECT, 0); + } + } + break; + case B_CLOTH_CHANGEPREROLL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + if(clmd->sim_parms.cache) { CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - cloth_clear_cache(ob, clmd, 2); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); - } - } - break; - case B_CLOTH_RENEW: - { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) - { - do_object_panels(B_CLOTH_CLEARCACHEALL); - cloth_free_modifier (clmd); } } - break; + } + break; + case B_CLOTH_DEL_VG: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + clmd->sim_parms.vgroup_mass = 0; + do_object_panels(B_CLOTH_RENEW); + } + allqueue(REDRAWBUTSOBJECT, 0); + } + break; + case B_CLOTH_RENEW: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + do_object_panels(B_CLOTH_CLEARCACHEALL); + cloth_free_modifier (clmd); + } + } + break; default: if(event>=B_SELEFFECT && eventsim_parms->flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; int defCount; @@ -4798,18 +4834,18 @@ static void object_panel_cloth(Object *ob) val2=0; - // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Enable advanced mode"); + // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Enable advanced mode"); /* GENERAL STUFF */ uiClearButLock(); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms->structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms->bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms->stepsPerFrame, 3.0, 10.0, 5, 0, "Quality of the simulation (higher=>better=>slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms->Cdis, 0.0, 10.0, 10, 0, "Spring damping"); - uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms->Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); uiClearButLock(); @@ -4818,15 +4854,15 @@ static void object_panel_cloth(Object *ob) uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); // uiClearButLock(); - uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms->gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms->gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms->gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(ob->type==OB_MESH) { @@ -4841,17 +4877,17 @@ static void object_panel_cloth(Object *ob) defCount = BLI_countlist (&ob->defbase); if (defCount == 0) { - clmd->sim_parms->vgroup_mass = 0; + clmd->sim_parms.vgroup_mass = 0; } sprintf (clvg2, "%s%s", clmvg, clvg1); - uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (clvg1); MEM_freeN (clvg2); - if(clmd->sim_parms->vgroup_mass) + if(clmd->sim_parms.vgroup_mass) { - bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms->vgroup_mass-1); + bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms.vgroup_mass-1); if(defGroup) uiDefBut(block, BUT, B_DIFF, defGroup->name, 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Name of current vertex group"); else @@ -4861,31 +4897,31 @@ static void object_panel_cloth(Object *ob) } else - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } else { - uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms->goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms->goalfrict, 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms->mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms->maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); } uiBlockEndAlign(block); /* // no tearing supported anymore since modifier stack restrictions uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) + if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) { - uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms->maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); - } + uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); + } uiBlockEndAlign(block); */ @@ -4904,7 +4940,7 @@ static void object_panel_cloth_II(Object *ob) clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if (!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { Cloth *cloth = clmd->clothObject; char str[128]; @@ -4915,18 +4951,18 @@ static void object_panel_cloth_II(Object *ob) uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); - /* - if(clmd->sim_parms->cache) + uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); + + if(clmd->sim_parms.cache) { - int length = BLI_linklist_length(clmd->sim_parms->cache); + int length = BLI_linklist_length(clmd->sim_parms.cache); - // correct spelling if only 1 frame cacheed --> only gimmick - if(length-clmd->sim_parms->preroll>1) - sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); + /* correct spelling if only 1 frame cacheed --> only gimmick */ + if(length-clmd->sim_parms.preroll>1) + sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); else - sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); + sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); uiDefBut(block, LABEL, 0, str, 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); uiDefBut(block, LABEL, 0, "Clear cache:", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); @@ -4934,15 +4970,15 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); if(length>1) // B_CLOTH_CHANGEPREROLL - uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms->preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); else uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); } - else + else { uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); - }*/ - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + } + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); uiBlockEndAlign(block); } } @@ -4952,32 +4988,41 @@ static void object_panel_cloth_II(Object *ob) static void object_panel_cloth_III(Object *ob) { uiBlock *block; + static int val; + uiBut *but; ClothModifierData *clmd = NULL; clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) - { - block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); - uiNewPanelTabbed("Cloth", "Physics"); - if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; - - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,160,130,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); - if (clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) { - // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,140,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefBut(block, LABEL, 0, "",160,140,150,20, NULL, 0.0, 0, 0, 0, ""); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Selfcoll balls:", 10,120,150,20, &clmd->coll_parms->selfepsilon, 0.001f, 1.0, 0.49f, 0, "Minimum distance between two selfcollision points"); + Cloth *cloth = clmd->clothObject; + char str[128]; + + block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); + } + else + uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); + uiBlockEndAlign(block); } - else - uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); - uiBlockEndAlign(block); } + // uiBlockEndAlign(block); } + void object_panels() { Object *ob; diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 111f0789ee9..61e4c6d5660 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2454,112 +2454,6 @@ void draw_slices ( float m[][4] ) } } - -void draw_fl(ClothModifierData *clmd) -{ - int i; - float m[4][4]; - Cloth *cloth = clmd->clothObject; - fc *m_fc = NULL; - - if(!cloth) - return; - - m_fc = cloth->m_fc; - - glClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - // gluLookAt(0, 0, -_dist, 0, 0, 0, 0, 1, 0); - - // build_rotmatrix(m, _quat); - - glMultMatrixf(&m[0][0]); - - // ---------------------------------------- - // from ligth constructor - m_fc->_light_dir[0] = -1.0f; - m_fc->_light_dir[1] = 0.5f; - m_fc->_light_dir[2] = 0.0f; - - gen_ray_templ(m_fc->_ray_templ, m_fc->_light_dir, 30 + 2); - - cast_light(m_fc->_texture_data, m_fc->_ray_templ, m_fc->_light_dir, 30+2); - - glActiveTextureARB(GL_TEXTURE0_ARB); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30+2, 30+2, 30+2, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_fc->_texture_data); - // ---------------------------------------- - - draw_slices(m); -/* - if (_dispstring != NULL) { - glMatrixMode(GL_PROJECTION); - glLoadMatrixd(_ortho_m); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glDisable(GL_TEXTURE_3D); - glDisable(GL_FRAGMENT_PROGRAM_ARB); - glColor4f(1.0, 1.0, 1.0, 1.0); - glRasterPos2i(-_sx/2 + 10, _sy/2 - 15); - - print_string(_dispstring); - - glMatrixMode(GL_PROJECTION); - glLoadMatrixd(_persp_m); - glMatrixMode(GL_MODELVIEW); - } -*/ -} - -void fc_load_frame(ClothModifierData *clmd) -{ - float* tmp = (float*) MEM_callocN(30*30*30*sizeof(float), "fc_tmp"); - float tmin=9999999, tmax=-99999999; - Cloth *cloth = clmd->clothObject; - fc *m_fc = NULL; - int i = 0; - - if(!cloth) - return; - - m_fc = cloth->m_fc; - - if (++m_fc->_cur_frame == m_fc->_nframes) { - fseek(m_fc->_fp, 12, SEEK_SET); - m_fc->_cur_frame = 0; - } - - fread(tmp, sizeof(float), 30*30*30, m_fc->_fp); - - for (i=0; i<30*30*30; i++) - { - m_fc->_texture_data[(i<<2)+1] = (unsigned char) (tmp[i]*255.0f); - } - - fread(tmp, sizeof(float), 30*30*30, m_fc->_fp); - - for (i=0; i<30*30*30; i++) - { - m_fc->_texture_data[(i<<2)] = (unsigned char) (tmp[i]*255.0f); - if (tmp[i]tmax) - tmax = tmp[i]; - m_fc->_texture_data[(i<<2)+2] = 0; - m_fc->_texture_data[(i<<2)+3] = 255; - } - - MEM_freeN(tmp); - - // cast_light(_N); DG NOT NEEDED - - glActiveTextureARB(GL_TEXTURE0_ARB); - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, 30, 30, 30, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_fc->_texture_data); -} - static void draw_mesh_object_outline(Object *ob, DerivedMesh *dm) { diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 615a9566b97..2e4ecd95709 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -51,6 +51,7 @@ #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_brush_types.h" +#include "DNA_cloth_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" @@ -747,7 +748,7 @@ static int sample_backbuf_area(VPaint *vp, int *indexar, int totface, int x, int struct ImBuf *ibuf; int x1, y1, x2, y2, a, tot=0, index; - if(totface>=MAXINDEX) return 0; + if(totface+4>=MAXINDEX) return 0; if(size>64.0) size= 64.0; @@ -777,7 +778,7 @@ static int sample_backbuf_area(VPaint *vp, int *indexar, int totface, int x, int size= (y2-y1)*(x2-x1); if(size<=0) return 0; - memset(indexar, 0, sizeof(int)*totface+2); /* plus 2! first element is total */ + memset(indexar, 0, sizeof(int)*totface+4); /* plus 2! first element is total, +2 was giving valgrind errors, +4 seems ok */ while(size--) { @@ -1350,7 +1351,7 @@ void weight_paint(void) // same goes for cloth if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier(modifiers_isClothEnabled(ob)); + cloth_free_modifier((ClothModifierData *)modifiers_isClothEnabled(ob)); } BIF_undo_push("Weight Paint"); From 530039a4297d93998202391caedfbbbc2558499d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 21 Jan 2008 02:23:03 +0000 Subject: [PATCH 071/430] Restructured many collision things again, GUI cleanup --- source/blender/blenkernel/BKE_cloth.h | 45 +- source/blender/blenkernel/BKE_collisions.h | 1 + source/blender/blenkernel/intern/cloth.c | 107 +++- source/blender/blenkernel/intern/collision.c | 90 +++- source/blender/blenkernel/intern/kdop.c | 533 +++++-------------- source/blender/blenkernel/intern/modifier.c | 150 ++++++ source/blender/makesdna/DNA_cloth_types.h | 2 +- source/blender/src/buttons_object.c | 38 +- 8 files changed, 488 insertions(+), 478 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index eb1f33ae600..592c34ad28e 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -129,38 +129,39 @@ void implicit_set_positions ( ClothModifierData *clmd ); void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); // used in collision.c -typedef struct Tree +typedef struct CollisionTree { - struct Tree *nodes[4]; // 4 children --> quad-tree - struct Tree *parent; - struct Tree *nextLeaf; - struct Tree *prevLeaf; + struct CollisionTree *nodes[4]; // 4 children --> quad-tree + struct CollisionTree *parent; + struct CollisionTree *nextLeaf; + struct CollisionTree *prevLeaf; float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP unsigned int tri_index; // this saves the index of the face + // int point_index[4]; // supports up to 4 points in a leaf int count_nodes; // how many nodes are used int traversed; // how many nodes already traversed until this level? int isleaf; } -Tree; - -typedef struct Tree TreeNode; +CollisionTree; typedef struct BVH { unsigned int numfaces; unsigned int numverts; - ClothVertex *verts; // just a pointer to the original datastructure + // ClothVertex *verts; // just a pointer to the original datastructure + MVert *current_x; // e.g. txold in clothvertex + MVert *current_xold; // e.g. tx in clothvertex MFace *mfaces; // just a pointer to the original datastructure struct LinkNode *tree; - TreeNode *root; // TODO: saving the root --> is this really needed? YES! - TreeNode *leaf_tree; /* Tail of the leaf linked list. */ - TreeNode *leaf_root; /* Head of the leaf linked list. */ + CollisionTree *root; // TODO: saving the root --> is this really needed? YES! + CollisionTree *leaf_tree; /* Tail of the leaf linked list. */ + CollisionTree *leaf_root; /* Head of the leaf linked list. */ float epsilon; /* epslion is used for inflation of the k-dop */ int flags; /* bvhFlags */ } BVH; -typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); +typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree * tree1, CollisionTree * tree2 ); ///////////////////////////////////////////////// @@ -168,9 +169,15 @@ typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifier //////////////////////////////////////////////// // needed for implicit.c -void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree * tree1, Tree * tree2 ); +void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree * tree1, CollisionTree * tree2 ); int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); +// needed for modifier.c +BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); + +// needed for collision.c +void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); + //////////////////////////////////////////////// @@ -180,13 +187,12 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); // needed for cloth.c void bvh_free ( BVH * bvh ); -BVH *bvh_build ( ClothModifierData *clmd, float epsilon ); +void bvh_build (BVH *bvh); LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); // needed for collision.c -int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, Tree * tree1, Tree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); -void bvh_update ( ClothModifierData * clmd, BVH * bvh, int moving ); - +int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); +void bvh_update(BVH * bvh, int moving); //////////////////////////////////////////////// @@ -199,6 +205,9 @@ void cloth_init ( ClothModifierData *clmd ); void cloth_deform_verts ( struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd ); void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); +// needed for collision.c +void bvh_update_from_cloth(ClothModifierData *clmd, int moving); + //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/BKE_collisions.h b/source/blender/blenkernel/BKE_collisions.h index e38662fdf95..f0f6212d3f5 100644 --- a/source/blender/blenkernel/BKE_collisions.h +++ b/source/blender/blenkernel/BKE_collisions.h @@ -79,6 +79,7 @@ typedef struct BVH } BVH; + /* used for collisions in kdop.c and also collision.c*/ typedef struct CollisionPair { diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index fef932174a1..c68fb983fc9 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -160,6 +160,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms.maxspringlen = 10; clmd->sim_parms.firstframe = 1; clmd->sim_parms.lastframe = 250; + clmd->sim_parms.vgroup_mass = 0; clmd->coll_parms.self_friction = 5.0; clmd->coll_parms.friction = 10.0; clmd->coll_parms.loop_count = 1; @@ -175,13 +176,91 @@ void cloth_init ( ClothModifierData *clmd ) // also from softbodies clmd->sim_parms.maxgoal = 1.0f; clmd->sim_parms.mingoal = 0.0f; - clmd->sim_parms.defgoal = 0.7f; + clmd->sim_parms.defgoal = 0.0f; clmd->sim_parms.goalspring = 100.0f; clmd->sim_parms.goalfrict = 0.0f; clmd->sim_parms.cache = NULL; } + +BVH *bvh_build_from_cloth (ClothModifierData *clmd, float epsilon) +{ + unsigned int i = 0; + BVH *bvh=NULL; + Cloth *cloth = clmd->clothObject; + ClothVertex *verts = NULL; + + if(!clmd) + return NULL; + + cloth = clmd->clothObject; + + if(!cloth) + return NULL; + + verts = cloth->verts; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + // springs = cloth->springs; + // numsprings = cloth->numsprings; + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + bvh->tree = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = cloth->numfaces; + bvh->mfaces = cloth->mfaces; + + bvh->numverts = cloth->numverts; + + bvh->current_x = MEM_callocN ( sizeof ( MVert ) * bvh->numverts, "bvh->current_x" ); + bvh->current_xold = MEM_callocN ( sizeof ( MVert ) * bvh->numverts, "bvh->current_xold" ); + + for(i = 0; i < bvh->numverts; i++) + { + VECCOPY(bvh->current_x[i].co, verts[i].tx); + VECCOPY(bvh->current_xold[i].co, verts[i].txold); + } + + bvh_build (bvh); + + return bvh; +} + +void bvh_update_from_cloth(ClothModifierData *clmd, int moving) +{ + unsigned int i = 0; + Cloth *cloth = clmd->clothObject; + BVH *bvh = cloth->tree; + ClothVertex *verts = cloth->verts; + + if(!bvh) + return; + + if(cloth->numverts!=bvh->numverts) + return; + + if(cloth->verts) + { + for(i = 0; i < bvh->numverts; i++) + { + VECCOPY(bvh->current_x[i].co, verts[i].tx); + VECCOPY(bvh->current_xold[i].co, verts[i].txold); + } + } + + bvh_update(bvh, moving); +} + // unused in the moment, cloth needs quads from mesh DerivedMesh *CDDM_convert_to_triangle ( DerivedMesh *dm ) { @@ -433,9 +512,9 @@ static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr for(a = 0; a < cloth->numverts; a++) { - fwrite(&cloth->verts[a].x, sizeof(float),4,fp); - fwrite(&cloth->verts[a].xconst, sizeof(float),4,fp); - fwrite(&cloth->verts[a].v, sizeof(float),4,fp); + fwrite(&cloth->verts[a].x, sizeof(float),3,fp); + fwrite(&cloth->verts[a].xconst, sizeof(float),3,fp); + fwrite(&cloth->verts[a].v, sizeof(float),3,fp); } fclose(fp); @@ -458,17 +537,17 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) else { for(a = 0; a < cloth->numverts; a++) { - if(fread(&cloth->verts[a].x, sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].x, sizeof(float), 3, fp) != 3) { ret = 0; break; } - if(fread(&cloth->verts[a].xconst, sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].xconst, sizeof(float), 3, fp) != 3) { ret = 0; break; } - if(fread(&cloth->verts[a].v, sizeof(float), 4, fp) != 4) + if(fread(&cloth->verts[a].v, sizeof(float), 3, fp) != 3) { ret = 0; break; @@ -656,7 +735,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); tend(); - printf ( "Cloth simulation time: %f\n", ( float ) tval() ); + // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); cloth_write_cache(ob, clmd, framenr); @@ -830,7 +909,13 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { verts->goal = dvert->dw [j].weight; - goalfac= ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + goalfac= 1.0f; + + /* + // Kicking goal factor to simplify things...who uses that anyway? + // ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + */ + verts->goal = ( float ) pow ( verts->goal , 4.0f ); if ( dvert->dw [j].weight >=SOFTGOALSNAP ) @@ -905,7 +990,7 @@ static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMes verts->impulse_count = 0; VECCOPY ( verts->impulse, tnull ); } - clmd->clothObject->tree = bvh_build ( clmd,clmd->coll_parms.epsilon ); + clmd->clothObject->tree = bvh_build_from_cloth ( clmd,clmd->coll_parms.epsilon ); } @@ -1012,7 +1097,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh if ( solvers [clmd->sim_parms.solver_type].init ) solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); - clmd->clothObject->tree = bvh_build ( clmd, clmd->coll_parms.epsilon ); + clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms.epsilon ); cloth_write_cache(ob, clmd, framenr-1); } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 4a03f579fe8..4ab436b2936 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -70,7 +70,72 @@ #include "Bullet-C-Api.h" +// step is limited from 0 (frame start position) to 1 (frame end position) +void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) +{ + float tv[3] = {0,0,0}; + unsigned int i = 0; + + for ( i = 0; i < collmd->numverts; i++ ) + { + VECSUB(tv, collmd->xnew[i].co, collmd->x[i].co); + VECADDS(collmd->current_x[i].co, collmd->x[i].co, tv, prevstep); + VECADDS(collmd->current_xnew[i].co, collmd->x[i].co, tv, step); + VECSUB(collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co); + } +} +BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon) +{ + BVH *bvh=NULL; + + bvh = MEM_callocN(sizeof(BVH), "BVH"); + if (bvh == NULL) + { + printf("bvh: Out of memory.\n"); + return NULL; + } + + bvh->flags = 0; + bvh->leaf_tree = NULL; + bvh->leaf_root = NULL; + bvh->tree = NULL; + + bvh->epsilon = epsilon; + bvh->numfaces = numfaces; + bvh->mfaces = mfaces; + + // we have no faces, we save seperate points + if(!mfaces) + { + bvh->numfaces = numverts; + } + + bvh->numverts = numverts; + bvh->current_x = MEM_dupallocN(x); + bvh->current_xold = MEM_dupallocN(x); + + bvh_build(bvh); + + return bvh; +} + +void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving) +{ + if(!bvh) + return; + + if(numverts!=bvh->numverts) + return; + + if(x) + memcpy(bvh->current_xold, x, sizeof(MVert) * numverts); + + if(xnew) + memcpy(bvh->current_x, xnew, sizeof(MVert) * numverts); + + bvh_update(bvh, moving); +} /** * gsl_poly_solve_cubic - @@ -519,7 +584,7 @@ int cloth_collision_response_moving_edges(ClothModifierData *clmd, ClothModifier } -void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) { CollPair *collpair = NULL; Cloth *cloth1=NULL, *cloth2=NULL; @@ -667,7 +732,7 @@ int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_cl return 0; } -void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) { EdgeCollPair edgecollpair; Cloth *cloth1=NULL, *cloth2=NULL; @@ -802,7 +867,7 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co } } -void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) { CollPair collpair; Cloth *cloth1=NULL, *cloth2=NULL; @@ -896,7 +961,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col } } -void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, Tree *tree1, Tree *tree2) +void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) { // TODO: check for adjacent cloth_collision_moving_edges(clmd, coll_clmd, tree1, tree2); @@ -943,7 +1008,7 @@ void cloth_update_collision_objects(float step) } // update BVH of collision object - bvh_update(coll_clmd, coll_bvh, 0); // 0 means STATIC, 1 means MOVING + bvh_update_from_cloth(coll_clmd, 0); // 0 means STATIC, 1 means MOVING } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); @@ -972,6 +1037,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { return 0; } + cloth = clmd->clothObject; verts = cloth->verts; cloth_bvh = (BVH *) cloth->tree; @@ -983,7 +1049,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update(clmd, cloth_bvh, 0); // 0 means STATIC, 1 means MOVING (see later in this function) + bvh_update_from_cloth(clmd, 0); // 0 means STATIC, 1 means MOVING (see later in this function) // update collision objects cloth_update_collision_objects(step); @@ -1075,12 +1141,12 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) clmd->coll_parms.collision_list = NULL; } - printf("ic: %d\n", ic); + // printf("ic: %d\n", ic); rounds++; } while(result && (CLOTH_MAX_THRESHOLD>rounds)); - printf("\n"); + // printf("\n"); //////////////////////////////////////////////////////////// // update positions @@ -1100,7 +1166,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // update cloth bvh - bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + bvh_update_from_cloth(clmd, 1); // 0 means STATIC, 1 means MOVING // update moving bvh for collision object once for (base = G.scene->base.first; base; base = base->next) @@ -1119,7 +1185,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { BVH *coll_bvh = coll_clmd->clothObject->tree; - bvh_update(coll_clmd, coll_bvh, 1); // 0 means STATIC, 1 means MOVING + bvh_update_from_cloth(coll_clmd, 1); // 0 means STATIC, 1 means MOVING } } @@ -1204,7 +1270,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } // update cloth bvh - bvh_update(clmd, cloth_bvh, 1); // 0 means STATIC, 1 means MOVING + bvh_update_from_cloth(clmd, 1); // 0 means STATIC, 1 means MOVING // free collision list @@ -1223,7 +1289,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) clmd->coll_parms.collision_list = NULL; } - printf("ic: %d\n", ic); + // printf("ic: %d\n", ic); rounds++; } while(result && (CLOTH_MAX_THRESHOLD>rounds)); diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index 74b5b3d7b7f..ed1da4d19f9 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -1,4 +1,4 @@ -/* collision.c +/* kdop.c * * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** @@ -38,6 +38,7 @@ #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" +#include "DNA_cloth_types.h" #include "DNA_key_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -58,7 +59,7 @@ #include "BKE_key.h" #include "BKE_mesh.h" #include "BKE_object.h" -#include "BKE_collisions.h" +#include "BKE_cloth.h" #include "BKE_modifier.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" @@ -164,13 +165,13 @@ static int size_threshold = 16; /* * Common methods for all algorithms */ -void bvh_exchange(CollisionTree **a, int i, int j) +DO_INLINE void bvh_exchange(CollisionTree **a, int i, int j) { CollisionTree *t=a[i]; a[i]=a[j]; a[j]=t; } -int floor_lg(int a) +DO_INLINE int floor_lg(int a) { return (int)(floor(log(a)/log(2))); } @@ -195,7 +196,7 @@ static void bvh_insertionsort(CollisionTree **a, int lo, int hi, int axis) } } -static int bvh_partition(CollisionTree **a, int lo, int hi, CollisionTree *x, int axis) +static int bvh_partition(CollisionTree **a, int lo, int hi, CollisionTree * x, int axis) { int i=lo, j=hi; while (1) @@ -215,7 +216,7 @@ static int bvh_partition(CollisionTree **a, int lo, int hi, CollisionTree *x, in */ static void bvh_downheap(CollisionTree **a, int i, int n, int lo, int axis) { - CollisionTree *d = a[lo+i-1]; + CollisionTree * d = a[lo+i-1]; int child; while (i<=n/2) { @@ -293,7 +294,7 @@ static void bvh_introsort_loop (CollisionTree **a, int lo, int hi, int depth_lim } } -void bvh_sort(CollisionTree **a0, int begin, int end, int axis) +DO_INLINE void bvh_sort(CollisionTree **a0, int begin, int end, int axis) { if (begin < end) { @@ -302,7 +303,7 @@ void bvh_sort(CollisionTree **a0, int begin, int end, int axis) bvh_insertionsort(a, begin, end, axis); } } -void bvh_sort_along_axis(CollisionTree **face_list, int start, int end, int axis) +DO_INLINE void bvh_sort_along_axis(CollisionTree **face_list, int start, int end, int axis) { bvh_sort(face_list, start, end, axis); } @@ -330,11 +331,11 @@ void bvh_free(BVH * bvh) BLI_linklist_free(bvh->tree,NULL); bvh->tree = NULL; - if(bvh->x) - MEM_freeN(bvh->x); - if(bvh->xnew) - MEM_freeN(bvh->xnew); - + if(bvh->current_x) + MEM_freeN(bvh->current_x); + if(bvh->current_xold) + MEM_freeN(bvh->current_xold); + MEM_freeN(bvh); bvh = NULL; } @@ -342,7 +343,7 @@ void bvh_free(BVH * bvh) // only supports x,y,z axis in the moment // but we should use a plain and simple function here for speed sake -int bvh_largest_axis(float *bv) +DO_INLINE int bvh_largest_axis(float *bv) { float middle_point[3]; @@ -366,7 +367,7 @@ int bvh_largest_axis(float *bv) } // depends on the fact that the BVH's for each face is already build -void bvh_calc_DOP_hull_from_faces(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) +DO_INLINE void bvh_calc_DOP_hull_from_faces(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) { float newmin,newmax; int i, j; @@ -390,62 +391,35 @@ void bvh_calc_DOP_hull_from_faces(BVH * bvh, CollisionTree **tri, int numfaces, } } -void bvh_calc_DOP_hull_static(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) +DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) { - MVert *tempMVert = bvh->x; - float *tempBV = bv; - float newminmax; - int i, j, k; - for (j = 0; j < numfaces; j++) - { - // 1 up to 4 vertices per leaf. - for (k = 0; k < 4; k++) - { - int temp = tri[j]->point_index[k]; - - if(temp < 0) - continue; - - // for all Axes. - for (i = KDOP_START; i < KDOP_END; i++) - { - newminmax = INPR(tempMVert[temp].co, KDOP_AXES[i]); - if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) - tempBV[(2 * i)] = newminmax; - if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) - tempBV[(2 * i) + 1] = newminmax; - } - } - } -} - -void bvh_calc_DOP_hull_moving(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) -{ - MVert *tempMVert = bvh->x; - MVert *tempMVert2 = bvh->xnew; + MFace *tempMFace = bvh->mfaces; float *tempBV = bv; float newminmax; int i, j, k; for (j = 0; j < numfaces; j++) { + tempMFace = bvh->mfaces + (tri [j])->tri_index; // 3 or 4 vertices per face. for (k = 0; k < 4; k++) { - int temp = tri[j]->point_index[k]; - - if(temp < 0) + int temp = 0; + // If this is a triangle. + if (k == 3 && !tempMFace->v4) continue; - + // TODO: other name for "temp" this gets all vertices of a face + if (k == 0) + temp = tempMFace->v1; + else if (k == 1) + temp = tempMFace->v2; + else if (k == 2) + temp = tempMFace->v3; + else if (k == 3) + temp = tempMFace->v4; // for all Axes. for (i = KDOP_START; i < KDOP_END; i++) { - newminmax = INPR(tempMVert[temp].co, KDOP_AXES[i]); - if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) - tempBV[(2 * i)] = newminmax; - if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) - tempBV[(2 * i) + 1] = newminmax; - - newminmax = INPR(tempMVert2[temp].co, KDOP_AXES[i]); + newminmax = INPR(bvh->current_xold[temp].co, KDOP_AXES[i]); if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) tempBV[(2 * i)] = newminmax; if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) @@ -455,7 +429,51 @@ void bvh_calc_DOP_hull_moving(BVH * bvh, CollisionTree **tri, int numfaces, floa } } -static void bvh_div_env_node(BVH * bvh, TreeNode *tree, CollisionTree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) +DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) +{ + MFace *tempMFace = bvh->mfaces; + float *tempBV = bv; + float newminmax; + int i, j, k; + for (j = 0; j < numfaces; j++) + { + tempMFace = bvh->mfaces + (tri [j])->tri_index; + // 3 or 4 vertices per face. + for (k = 0; k < 4; k++) + { + int temp = 0; + // If this is a triangle. + if (k == 3 && !tempMFace->v4) + continue; + // TODO: other name for "temp" this gets all vertices of a face + if (k == 0) + temp = tempMFace->v1; + else if (k == 1) + temp = tempMFace->v2; + else if (k == 2) + temp = tempMFace->v3; + else if (k == 3) + temp = tempMFace->v4; + // for all Axes. + for (i = KDOP_START; i < KDOP_END; i++) + { + newminmax = INPR(bvh->current_xold[temp].co, KDOP_AXES[i]); + if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) + tempBV[(2 * i)] = newminmax; + if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) + tempBV[(2 * i) + 1] = newminmax; + + newminmax = INPR(bvh->current_x[temp].co, KDOP_AXES[i]); + if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) + tempBV[(2 * i)] = newminmax; + if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) + tempBV[(2 * i) + 1] = newminmax; + } + } + } +} + +static void bvh_div_env_node(BVH *bvh, CollisionTree *tree, CollisionTree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) { int i = 0; CollisionTree *newtree = NULL; @@ -523,17 +541,26 @@ static void bvh_div_env_node(BVH * bvh, TreeNode *tree, CollisionTree **face_lis return; } -// mfaces is allowed to be null -// just vertexes are used if mfaces=NULL -BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) +/* function cannot be directly called - needs alloced bvh */ +void bvh_build (BVH *bvh) { - unsigned int i = 0, j = 0; + unsigned int i = 0, j = 0, k = 0; CollisionTree **face_list=NULL; CollisionTree *tree=NULL; LinkNode *nlink = NULL; + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); + // TODO: check succesfull alloc + BLI_linklist_append(&bvh->tree, tree); + nlink = bvh->tree; + if (tree == NULL) + { + printf("bvh_build: Out of memory for nodes.\n"); + bvh_free(bvh); + return; + } bvh->root = bvh->tree->link; bvh->root->isleaf = 0; bvh->root->parent = NULL; @@ -541,25 +568,7 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) if(bvh->numfaces<=1) { - // Why that? --> only one face there - if(bvh->mfaces) - { - bvh->root->point_index[0] = mfaces[0].v1; - bvh->root->point_index[1] = mfaces[0].v2; - bvh->root->point_index[2] = mfaces[0].v3; - if(mfaces[0].v4) - bvh->root->point_index[3] = mfaces[0].v4; - else - bvh->root->point_index[3] = -1; - } - else - { - bvh->root->point_index[0] = 0; - bvh->root->point_index[1] = -1; - bvh->root->point_index[2] = -1; - bvh->root->point_index[3] = -1; - } - + bvh->root->tri_index = 0; // Why that? --> only one face there bvh->root->isleaf = 1; bvh->root->traversed = 0; bvh->root->count_nodes = 0; @@ -569,46 +578,28 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) bvh->root->prevLeaf = NULL; } else - { + { // create face boxes face_list = MEM_callocN (bvh->numfaces * sizeof (CollisionTree *), "CollisionTree"); if (face_list == NULL) { printf("bvh_build: Out of memory for face_list.\n"); bvh_free(bvh); - return NULL; + return; } // create face boxes - for(i = 0; i < bvh->numfaces; i++) + for(i = 0, k = 0; i < bvh->numfaces; i++) { - LinkNode *tnlink = NULL; - + LinkNode *tnlink; + tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); // TODO: check succesfull alloc tnlink = BLI_linklist_append_fast(&nlink->next, tree); face_list[i] = tree; - - if(bvh->mfaces) - { - tree->point_index[0] = mfaces[i].v1; - tree->point_index[1] = mfaces[i].v2; - tree->point_index[2] = mfaces[i].v3; - if(mfaces[i].v4) - tree->point_index[3] = mfaces[i].v4; - else - tree->point_index[3] = -1; - } - else - { - tree->point_index[0] = i; - tree->point_index[1] = -1; - tree->point_index[2] = -1; - tree->point_index[3] = -1; - } - + tree->tri_index = i; tree->isleaf = 1; tree->nextLeaf = NULL; tree->prevLeaf = bvh->leaf_tree; @@ -641,170 +632,18 @@ BVH *bvh_build (BVH *bvh, MFace *mfaces, unsigned int numfaces) // build root bvh bvh_calc_DOP_hull_from_faces(bvh, face_list, bvh->numfaces, bvh->root->bv); - + // This is the traversal function. bvh_div_env_node(bvh, bvh->root, face_list, 0, bvh->numfaces-1, 0, nlink); if (face_list) MEM_freeN(face_list); - // BLI_edgehash_free(edgehash, NULL); } - - return bvh; -} - -BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon) -{ - BVH *bvh=NULL; - CollisionTree *tree=NULL; - - bvh = MEM_callocN(sizeof(BVH), "BVH"); - if (bvh == NULL) - { - printf("bvh: Out of memory.\n"); - return NULL; - } - - bvh->flags = 0; - bvh->leaf_tree = NULL; - bvh->leaf_root = NULL; - bvh->tree = NULL; - - bvh->epsilon = epsilon; - bvh->numfaces = numfaces; - bvh->mfaces = mfaces; - - // we have no faces, we save seperate points - if(!mfaces) - { - bvh->numfaces = numverts; - } - - bvh->numverts = numverts; - bvh->xnew = MEM_dupallocN(x); - bvh->x = MEM_dupallocN(x); - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - - if (tree == NULL) - { - printf("bvh_build: Out of memory for nodes.\n"); - bvh_free(bvh); - return NULL; - } - - BLI_linklist_append(&bvh->tree, tree); - - return bvh_build(bvh, mfaces, numfaces); -} - - -BVH *bvh_build_from_float3 (MFace *mfaces, unsigned int numfaces, float (*x)[3], unsigned int numverts, float epsilon) -{ - BVH *bvh=NULL; - CollisionTree *tree=NULL; - unsigned int i = 0; - - bvh = MEM_callocN(sizeof(BVH), "BVH"); - if (bvh == NULL) - { - printf("bvh: Out of memory.\n"); - return NULL; - } - - bvh->flags = 0; - bvh->leaf_tree = NULL; - bvh->leaf_root = NULL; - bvh->tree = NULL; - - bvh->epsilon = epsilon; - bvh->numfaces = numfaces; - bvh->mfaces = mfaces; - - // we have no faces, we save seperate points - if(!mfaces) - { - bvh->numfaces = numverts; - } - - bvh->numverts = numverts; - bvh->xnew = (MVert *)MEM_callocN(sizeof(MVert)*numverts, "BVH MVert"); - - for(i = 0; i < numverts; i++) - { - VECCOPY(bvh->xnew[i].co, x[i]); - } - - bvh->x = MEM_dupallocN(bvh->xnew); - - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - - if (tree == NULL) - { - printf("bvh_build: Out of memory for nodes.\n"); - bvh_free(bvh); - return NULL; - } - - BLI_linklist_append(&bvh->tree, tree); - - return bvh_build(bvh, mfaces, numfaces); -} - -BVH *bvh_build_from_float4 (MFace *mfaces, unsigned int numfaces, float (*x)[4], unsigned int numverts, float epsilon) -{ - BVH *bvh=NULL; - CollisionTree *tree=NULL; - unsigned int i = 0; - - bvh = MEM_callocN(sizeof(BVH), "BVH"); - if (bvh == NULL) - { - printf("bvh: Out of memory.\n"); - return NULL; - } - - bvh->flags = 0; - bvh->leaf_tree = NULL; - bvh->leaf_root = NULL; - bvh->tree = NULL; - - bvh->epsilon = epsilon; - bvh->numfaces = numfaces; - bvh->mfaces = mfaces; - - // we have no faces, we save seperate points - if(!mfaces) - { - bvh->numfaces = numverts; - } - - bvh->numverts = numverts; - bvh->xnew = (MVert *)MEM_callocN(sizeof(MVert)*numverts, "BVH MVert"); - - for(i = 0; i < numverts; i++) - { - VECCOPY(bvh->xnew[i].co, x[i]); - } - - bvh->x = MEM_dupallocN(bvh->xnew); - - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - - if (tree == NULL) - { - printf("bvh_build: Out of memory for nodes.\n"); - bvh_free(bvh); - return NULL; - } - - BLI_linklist_append(&bvh->tree, tree); - - return bvh_build(bvh, mfaces, numfaces); } // bvh_overlap - is it possbile for 2 bv's to collide ? -int bvh_overlap(float *bv1, float *bv2) +DO_INLINE int bvh_overlap(float *bv1, float *bv2) { int i = 0; for (i = KDOP_START; i < KDOP_END; i++) @@ -823,6 +662,7 @@ int bvh_overlap(float *bv1, float *bv2) return 1; } + /** * bvh_traverse - traverse two bvh trees looking for potential collisions. * @@ -830,9 +670,18 @@ int bvh_overlap(float *bv1, float *bv2) * every other triangle that doesn't require any realloc, but uses * much memory */ -int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collision_list) +int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response) { - int i = 0, ret = 0; + int i = 0, ret=0; + + /* + // Shouldn't be possible + if(!tree1 || !tree2) + { + printf("Error: no tree there\n"); + return 0; + } + */ if (bvh_overlap(tree1->bv, tree2->bv)) { // Check if this node in the first tree is a leaf @@ -841,85 +690,11 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // Check if this node in the second tree a leaf if (tree2->isleaf) { - ////////////////////////////////// - // TODO: check for 3rd point if zero (triangle)!!! - ////////////////////////////////// + // Provide the collision response. - CollisionPair *collpair = NULL; - - if(tree1 != tree2) // do not collide same points - { - //////////////////////////////////////// - // FIRST FACE - //////////////////////////////////////// - - // save potential colliding triangles - collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - - VECCOPY(collpair->point_indexA, tree1->point_index); - VECCOPY(collpair->point_indexB, tree2->point_index); - - // we use prepend because lots of insertions at end - // of list are horrible slow! - BLI_linklist_prepend(&collision_list[0], collpair); - - //////////////////////////////////////// - // SECOND FACE - //////////////////////////////////////// - if(tree1->point_index[3]) // check for quad face - { - // save potential colliding triangles - collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - - VECCOPY(collpair->point_indexA, tree1->point_index); - collpair->point_indexA[2] = tree1->point_index[3]; - - VECCOPY(collpair->point_indexB, tree2->point_index); - - // we use prepend because lots of insertions at end - // of list are horrible slow! - BLI_linklist_prepend(&collision_list[0], collpair); - } - //////////////////////////////////////// - // THIRD FACE - //////////////////////////////////////// - if(tree2->point_index[3]) // check for quad face - { - // save potential colliding triangles - collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - - VECCOPY(collpair->point_indexA, tree1->point_index); - - VECCOPY(collpair->point_indexB, tree2->point_index); - collpair->point_indexB[2] = tree2->point_index[3]; - - // we use prepend because lots of insertions at end - // of list are horrible slow! - BLI_linklist_prepend(&collision_list[0], collpair); - } - //////////////////////////////////////// - // FOURTH FACE - //////////////////////////////////////// - if(tree1->point_index[3] && tree1->point_index[3]) // check for quad face - { - // save potential colliding triangles - collpair = (CollisionPair *)MEM_callocN(sizeof(CollisionPair), "CollisionPair"); - - VECCOPY(collpair->point_indexA, tree1->point_index); - collpair->point_indexA[2] = tree1->point_index[3]; - - VECCOPY(collpair->point_indexB, tree2->point_index); - collpair->point_indexB[2] = tree2->point_index[3]; - - // we use prepend because lots of insertions at end - // of list are horrible slow! - BLI_linklist_prepend(&collision_list[0], collpair); - } - - return 1; - } - else - return 0; + if(collision_response) + collision_response (clmd, coll_clmd, tree1, tree2); + return 1; } else { @@ -927,7 +702,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree2->nodes[i] && (bvh_traverse (tree1, tree2->nodes[i], collision_list))) + if (tree2->nodes[i] && bvh_traverse (clmd, coll_clmd, tree1, tree2->nodes[i], step, collision_response)) ret = 1; } } @@ -938,7 +713,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && (bvh_traverse (tree1->nodes[i], tree2, collision_list))) + if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) ret = 1; } } @@ -949,7 +724,7 @@ int bvh_traverse(CollisionTree *tree1, CollisionTree *tree2, LinkNode **collisio // bottom up update of bvh tree: // join the 4 children here -void bvh_join(CollisionTree *tree) +void bvh_join(CollisionTree * tree) { int i = 0, j = 0; if (!tree) @@ -979,10 +754,10 @@ void bvh_join(CollisionTree *tree) } // update static bvh -// needs new positions in bvh->x, bvh->xnew +/* you have to update the bvh position before calling this function */ void bvh_update(BVH * bvh, int moving) { - TreeNode *leaf, *parent; + CollisionTree *leaf, *parent; int traversecheck = 1; // if this is zero we don't go further unsigned int j = 0; @@ -993,7 +768,6 @@ void bvh_update(BVH * bvh, int moving) { leaf->parent->traversed = 0; } - if(!moving) bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv); else @@ -1034,70 +808,3 @@ void bvh_update(BVH * bvh, int moving) } } -void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving) -{ - if(!bvh) - return; - - if(numverts!=bvh->numverts) - return; - - if(x) - memcpy(bvh->x, x, sizeof(MVert) * numverts); - - if(xnew) - memcpy(bvh->xnew, xnew, sizeof(MVert) * numverts); - - bvh_update(bvh, moving); -} - -void bvh_update_from_float3(BVH * bvh, float (*x)[3], unsigned int numverts, float (*xnew)[3], int moving) -{ - unsigned int i = 0; - - if(!bvh) - return; - - if(numverts!=bvh->numverts) - return; - - if(x) - { - for(i = 0; i < numverts; i++) - VECCOPY(bvh->x[i].co, x[i]); - } - - if(xnew) - { - for(i = 0; i < numverts; i++) - VECCOPY(bvh->xnew[i].co, xnew[i]); - } - - bvh_update(bvh, moving); -} - -void bvh_update_from_float4(BVH * bvh, float (*x)[4], unsigned int numverts, float (*xnew)[4], int moving) -{ - unsigned int i = 0; - - if(!bvh) - return; - - if(numverts!=bvh->numverts) - return; - - if(x) - { - for(i = 0; i < numverts; i++) - VECCOPY(bvh->x[i].co, x[i]); - } - - if(xnew) - { - for(i = 0; i < numverts; i++) - VECCOPY(bvh->xnew[i].co, xnew[i]); - } - - bvh_update(bvh, moving); -} - diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 3b69f47b1f4..8fdfbb71dc9 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -75,6 +75,7 @@ #include "BKE_main.h" #include "BKE_anim.h" #include "BKE_bad_level_calls.h" +#include "BKE_cloth.h" #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_global.h" @@ -5031,6 +5032,145 @@ static void clothModifier_freeData(ModifierData *md) } } +/* Collision */ + +static void collisionModifier_initData(ModifierData *md) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + + collmd->x = NULL; + collmd->xnew = NULL; + collmd->current_x = NULL; + collmd->current_xnew = NULL; + collmd->current_v = NULL; + collmd->time = -1; + collmd->numverts = 0; + collmd->tree = NULL; +} + +static void collisionModifier_freeData(ModifierData *md) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + + if (collmd) + { + if(collmd->tree) + bvh_free(collmd->tree); + if(collmd->x) + MEM_freeN(collmd->x); + if(collmd->xnew) + MEM_freeN(collmd->xnew); + if(collmd->current_x) + MEM_freeN(collmd->current_x); + if(collmd->current_xnew) + MEM_freeN(collmd->current_xnew); + if(collmd->current_v) + MEM_freeN(collmd->current_v); + + collmd->x = NULL; + collmd->xnew = NULL; + collmd->current_x = NULL; + collmd->current_xnew = NULL; + collmd->current_v = NULL; + collmd->time = -1; + collmd->numverts = 0; + collmd->tree = NULL; + } +} + +static int collisionModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} + +static void collisionModifier_deformVerts( + ModifierData *md, Object *ob, DerivedMesh *derivedData, + float (*vertexCos)[3], int numVerts) +{ + CollisionModifierData *collmd = (CollisionModifierData*) md; + DerivedMesh *dm = NULL; + float current_time = 0; + unsigned int numverts = 0, i = 0; + MVert *tempVert = NULL; + + // if possible use/create DerivedMesh + + if(derivedData) dm = CDDM_copy(derivedData); + else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); + + if(!ob->pd) + { + printf("collisionModifier_deformVerts: Should not happen!\n"); + return; + } + + if(dm) + { + CDDM_apply_vert_coords(dm, vertexCos); + CDDM_calc_normals(dm); + + + current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); + + if(current_time > collmd->time) + { + numverts = dm->getNumVerts ( dm ); + + // check if mesh has changed + if(collmd->x && (numverts != collmd->numverts)) + collisionModifier_freeData((ModifierData *)collmd); + + if(collmd->time == -1) // first time + { + collmd->x = dm->dupVertArray(dm); // frame start position + + for ( i = 0; i < numverts; i++ ) + { + // we save global positions + Mat4MulVecfl ( ob->obmat, collmd->x[i].co ); + } + + collmd->xnew = MEM_dupallocN(collmd->x); // frame end position + collmd->current_x = MEM_dupallocN(collmd->x); // inter-frame + collmd->current_xnew = MEM_dupallocN(collmd->x); // inter-frame + collmd->current_v = MEM_dupallocN(collmd->x); // inter-frame + + collmd->numverts = numverts; + + // TODO: epsilon + // create bounding box hierarchy + collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, numverts, ob->pd->pdef_sbift); + } + else if(numverts == collmd->numverts) + { + // put positions to old positions + tempVert = collmd->x; + collmd->x = collmd->xnew; + collmd->xnew = tempVert; + + memcpy(collmd->xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); + + for ( i = 0; i < numverts; i++ ) + { + // we save global positions + Mat4MulVecfl ( ob->obmat, collmd->xnew[i].co ); + } + + memcpy(collmd->current_xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); + memcpy(collmd->current_x, dm->getVertArray(dm), numverts*sizeof(MVert)); + + // recalc static bounding boxes + bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); + } + + collmd->time = current_time; + } + } + + if(dm) + dm->release(dm); +} + /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) @@ -6855,6 +6995,16 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) // mti->copyData = clothModifier_copyData; mti->deformVerts = clothModifier_deformVerts; mti->updateDepgraph = clothModifier_updateDepgraph; + + mti = INIT_TYPE(Collision); + mti->type = eModifierTypeType_OnlyDeform; + mti->initData = collisionModifier_initData; + mti->flags = eModifierTypeFlag_AcceptsMesh + | eModifierTypeFlag_RequiresOriginalData; + mti->dependsOnTime = collisionModifier_dependsOnTime; + mti->freeData = collisionModifier_freeData; + mti->deformVerts = collisionModifier_deformVerts; + // mti->copyData = collisionModifier_copyData; mti = INIT_TYPE(Boolean); mti->type = eModifierTypeType_Nonconstructive; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 2bbe328d170..ce942f5bbb0 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -106,7 +106,7 @@ typedef struct SimulationSettings float bending; /* Flexion spring stiffness. */ float sim_time; int flags; /* flags, see CSIMSETT_FLAGS enum above. */ - short solver_type; /* which solver should be used? */ + short solver_type; /* which solver should be used? txold */ short pad2; float maxgoal; /* see SB */ float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 581ff63a987..abc45e70183 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3184,7 +3184,7 @@ static void object_panel_deflection(Object *ob) PartDeflect *pd= ob->pd; but = uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision"); - // uiButSetFunc(but, object_collision__enabletoggle, ob, NULL); + uiButSetFunc(but, object_collision__enabletoggle, ob, NULL); if(pd->deflect) { uiDefBut(block, LABEL, 0, "Particles", 160,140,75,20, NULL, 0.0, 0, 0, 0, ""); @@ -4928,7 +4928,7 @@ static void object_panel_cloth(Object *ob) Cloth *cloth = clmd->clothObject; int defCount; char *clvg1, *clvg2; - char clmvg [] = "Mass Vertex Group%t|None%x0|"; + char clmvg [] = "Weight Paint Groups%t|"; val2=0; @@ -4938,12 +4938,12 @@ static void object_panel_cloth(Object *ob) uiClearButLock(); uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle possibility"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Steps per Frame:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); - uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); uiBlockEndAlign(block); uiClearButLock(); @@ -4959,7 +4959,7 @@ static void object_panel_cloth(Object *ob) /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Use Goal", 10,70,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(ob->type==OB_MESH) @@ -4977,26 +4977,15 @@ static void object_panel_cloth(Object *ob) { clmd->sim_parms.vgroup_mass = 0; } + else + if(!clmd->sim_parms.vgroup_mass) + clmd->sim_parms.vgroup_mass = 1; + sprintf (clvg2, "%s%s", clmvg, clvg1); - uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,70,150,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (clvg1); MEM_freeN (clvg2); - - if(clmd->sim_parms.vgroup_mass) - { - bDeformGroup *defGroup = BLI_findlink(&ob->defbase, clmd->sim_parms.vgroup_mass-1); - if(defGroup) - uiDefBut(block, BUT, B_DIFF, defGroup->name, 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Name of current vertex group"); - else - uiDefBut(block, BUT, B_DIFF, "(no group)", 160,70,130,20, NULL, 0.0, 0.0, 0, 0, "Vertex Group doesn't exist anymore"); - - uiDefIconBut(block, BUT, B_CLOTH_DEL_VG, ICON_X, 290,70,20,20, 0, 0, 0, 0, 0, "Disable use of vertex group"); - - } - else - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); - } else { @@ -5004,10 +4993,13 @@ static void object_panel_cloth(Object *ob) uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Goal (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); + /* + // nobody is changing these ones anyway uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + */ } uiBlockEndAlign(block); From 3759c772fdafa008965e702098edeb8a2cae373b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 21 Jan 2008 10:55:46 +0000 Subject: [PATCH 072/430] Speedup spring creation again, was lost during merge --- source/blender/blenkernel/intern/cloth.c | 60 +++++++++++++----------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index c68fb983fc9..3fa99279435 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1160,6 +1160,7 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * ***************************************************************************************/ // be carefull: implicit solver has to be resettet when using this one! +// --> only for implicit handling of this spring! int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type) { Cloth *cloth = clmd->clothObject; @@ -1190,7 +1191,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL; unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; - unsigned int i = 0; + unsigned int i = 0, j = 0, akku_count; unsigned int numverts = dm->getNumVerts ( dm ); unsigned int numedges = dm->getNumEdges ( dm ); unsigned int numfaces = dm->getNumFaces ( dm ); @@ -1200,9 +1201,9 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) LinkNode **edgelist = NULL; EdgeHash *edgehash = NULL; LinkNode *search = NULL, *search2 = NULL; - float temp[3]; - ClothVertex *verts = NULL; - + float temp[3], akku, min, max; + LinkNode *node = NULL, *node2 = NULL; + // error handling if ( numedges==0 ) return 0; @@ -1217,8 +1218,6 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) if ( cloth->springs ) MEM_freeN ( cloth->springs ); - - verts = cloth->verts; // create spring network hash edgehash = BLI_edgehash_new(); @@ -1232,16 +1231,20 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { spring->ij = medge[i].v1; spring->kl = medge[i].v2; - VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); + VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; struct_springs++; - - BLI_linklist_append ( &cloth->springs, spring ); + + if(!i) + node2 = BLI_linklist_append_fast ( &cloth->springs, spring ); + else + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } } - + // shear springs for ( i = 0; i < numfaces; i++ ) { @@ -1249,7 +1252,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = mface[i].v1; spring->kl = mface[i].v3; - VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); + VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; @@ -1257,7 +1260,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) BLI_linklist_append ( &edgelist[spring->kl], spring ); shear_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; if ( mface[i].v4 ) { @@ -1265,18 +1269,19 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->ij = mface[i].v2; spring->kl = mface[i].v4; - VECSUB ( temp, verts[spring->kl].x, verts[spring->ij].x ); - spring->restlen = sqrt ( INPR ( temp, temp ) ); - spring->type = CLOTH_SPRING_TYPE_SHEAR; + VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); + spring->restlen = sqrt ( INPR ( temp, temp ) ); + spring->type = CLOTH_SPRING_TYPE_SHEAR; - BLI_linklist_append ( &edgelist[spring->ij], spring ); - BLI_linklist_append ( &edgelist[spring->kl], spring ); - shear_springs++; + BLI_linklist_append ( &edgelist[spring->ij], spring ); + BLI_linklist_append ( &edgelist[spring->kl], spring ); + shear_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } } - + // bending springs search2 = cloth->springs; for ( i = struct_springs; i < struct_springs+shear_springs; i++ ) @@ -1294,35 +1299,36 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) // check for existing spring // check also if startpoint is equal to endpoint if ( !BLI_edgehash_haskey ( edgehash, index2, tspring2->ij ) - && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) - && ( index2!=tspring2->ij ) ) + && !BLI_edgehash_haskey ( edgehash, tspring2->ij, index2 ) + && ( index2!=tspring2->ij ) ) { spring = ( ClothSpring * ) MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" ); spring->ij = tspring2->ij; spring->kl = index2; - VECSUB ( temp, verts[index2].x, verts[tspring2->ij].x ); + VECSUB ( temp, cloth->verts[index2].x, cloth->verts[tspring2->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_BENDING; BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); bend_springs++; - BLI_linklist_append ( &cloth->springs, spring ); + node2 = BLI_linklist_append_fast ( &node->next, spring ); + node = node2; } search = search->next; } search2 = search2->next; } - + cloth->numsprings = struct_springs + shear_springs + bend_springs; - + for ( i = 0; i < numverts; i++ ) { BLI_linklist_free ( edgelist[i],NULL ); } if ( edgelist ) MEM_freeN ( edgelist ); - + BLI_edgehash_free ( edgehash, NULL ); return 1; From 3db5a4e8dc81fcc6663db267f24bc982dd201a18 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 22 Jan 2008 00:34:28 +0000 Subject: [PATCH 073/430] First successfull use of collision modifier. Means: Collision with cloth are enabled using the 'Deflection' panel from now on --- source/blender/blenkernel/BKE_cloth.h | 45 ++++- source/blender/blenkernel/intern/collision.c | 95 ++++++----- source/blender/blenkernel/intern/implicit.c | 3 +- source/blender/blenkernel/intern/kdop.c | 8 +- source/blender/blenkernel/intern/modifier.c | 15 +- source/blender/makesdna/DNA_cloth_types.h | 42 ----- source/blender/makesdna/DNA_modifier_types.h | 7 +- source/blender/src/buttons_object.c | 165 +++++++++---------- 8 files changed, 191 insertions(+), 189 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 592c34ad28e..6ad9893d072 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -61,6 +61,47 @@ struct ClothModifierData; #define CLOTH_MAX_THREAD 2 +/** + * Pin and unpin frames are the frames on which the vertices stop moving. + * They will assume the position they had prior to pinFrame until unpinFrame + * is reached. + */ +typedef struct ClothVertex +{ + int flags; /* General flags per vertex. */ + float v [3]; /* The velocity of the point. */ + float xconst [3]; /* constrained position */ + float x [3]; /* The current position of this vertex. */ + float xold [3]; /* The previous position of this vertex.*/ + float tx [3]; /* temporary position */ + float txold [3]; /* temporary old position */ + float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ + float mass; /* mass / weight of the vertex */ + float goal; /* goal, from SB */ + float impulse[3]; /* used in collision.c */ + unsigned int impulse_count; /* same as above */ +} +ClothVertex; + + +/** + * The definition of a spring. + */ +typedef struct ClothSpring +{ + int ij; /* Pij from the paper, one end of the spring. */ + int kl; /* Pkl from the paper, one end of the spring. */ + float restlen; /* The original length of the spring. */ + int matrix_index; /* needed for implicit solver (fast lookup) */ + int type; /* types defined in BKE_cloth.h ("springType") */ + int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ + float dfdx[3][3]; + float dfdv[3][3]; + float f[3]; +} +ClothSpring; + + /* goal defines */ #define SOFTGOALSNAP 0.999f @@ -161,7 +202,7 @@ typedef struct BVH } BVH; -typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree * tree1, CollisionTree * tree2 ); +typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionTree * tree1, CollisionTree * tree2 ); ///////////////////////////////////////////////// @@ -191,7 +232,7 @@ void bvh_build (BVH *bvh); LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); // needed for collision.c -int bvh_traverse ( ClothModifierData * clmd, ClothModifierData * coll_clmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); +int bvh_traverse ( ClothModifierData * clmd, CollisionModifierData * collmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); void bvh_update(BVH * bvh, int moving); //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 4ab436b2936..c5e6c119e10 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -70,7 +70,11 @@ #include "Bullet-C-Api.h" -// step is limited from 0 (frame start position) to 1 (frame end position) +/*********************************** +Collision modifier code start +***********************************/ + +/* step is limited from 0 (frame start position) to 1 (frame end position) */ void collision_move_object(CollisionModifierData *collmd, float step, float prevstep) { float tv[3] = {0,0,0}; @@ -85,6 +89,7 @@ void collision_move_object(CollisionModifierData *collmd, float step, float prev } } +/* build bounding volume hierarchy from mverts (see kdop.c for whole BVH code) */ BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon) { BVH *bvh=NULL; @@ -137,6 +142,10 @@ void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xn bvh_update(bvh, moving); } +/*********************************** +Collision modifier code end +***********************************/ + /** * gsl_poly_solve_cubic - * @@ -437,19 +446,18 @@ DO_INLINE void calculateFrictionImpulse(float to[3], float vrel[3], float normal VecMulf(to, MAX2(1.0f - frictionConstant * delta_V_n / INPR(vrel_t_pre,vrel_t_pre), 0.0f)); } -int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData *coll_clmd) +int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierData *collmd) { unsigned int i = 0; int result = 0; LinkNode *search = NULL; CollPair *collpair = NULL; - Cloth *cloth1, *cloth2; + Cloth *cloth1; float w1, w2, w3, u1, u2, u3; float v1[3], v2[3], relativeVelocity[3]; float magrelVel; cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; search = clmd->coll_parms.collision_list; @@ -463,17 +471,18 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * cloth1->verts[collpair->ap2].txold, cloth1->verts[collpair->ap3].txold, &w1, &w2, &w3); - + + // was: txold cloth_compute_barycentric(collpair->pb, - cloth2->verts[collpair->bp1].txold, - cloth2->verts[collpair->bp2].txold, - cloth2->verts[collpair->bp3].txold, + collmd->current_x[collpair->bp1].co, + collmd->current_x[collpair->bp2].co, + collmd->current_x[collpair->bp3].co, &u1, &u2, &u3); // Calculate relative "velocity". interpolateOnTriangle(v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3); - interpolateOnTriangle(v2, cloth2->verts[collpair->bp1].tv, cloth2->verts[collpair->bp2].tv, cloth2->verts[collpair->bp3].tv, u1, u2, u3); + interpolateOnTriangle(v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3); VECSUB(relativeVelocity, v1, v2); @@ -575,21 +584,21 @@ int cloth_collision_response_static(ClothModifierData *clmd, ClothModifierData * int cloth_collision_response_moving_tris(ClothModifierData *clmd, ClothModifierData *coll_clmd) { - + return 1; } int cloth_collision_response_moving_edges(ClothModifierData *clmd, ClothModifierData *coll_clmd) { - + return 1; } -void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2) +void cloth_collision_static(ClothModifierData *clmd, CollisionModifierData *collmd, CollisionTree *tree1, CollisionTree *tree2) { CollPair *collpair = NULL; - Cloth *cloth1=NULL, *cloth2=NULL; + Cloth *cloth1=NULL; MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; + ClothVertex *verts1=NULL; double distance = 0; float epsilon = clmd->coll_parms.epsilon; unsigned int i = 0; @@ -599,13 +608,11 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm collpair = (CollPair *)MEM_callocN(sizeof(CollPair), "cloth coll pair"); cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; verts1 = cloth1->verts; - verts2 = cloth2->verts; face1 = &(cloth1->mfaces[tree1->tri_index]); - face2 = &(cloth2->mfaces[tree2->tri_index]); + face2 = &(collmd->mfaces[tree2->tri_index]); // check all possible pairs of triangles if(i == 0) @@ -674,7 +681,7 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm { // calc distance + normal distance = plNearestPoints( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, verts2[collpair->bp1].txold, verts2[collpair->bp2].txold, verts2[collpair->bp3].txold, collpair->pa,collpair->pb,collpair->vector); + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector); if (distance <= (epsilon + ALMOST_ZERO)) { @@ -688,6 +695,7 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm collpair->distance = distance; BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); + } else { @@ -703,8 +711,8 @@ void cloth_collision_static(ClothModifierData *clmd, ClothModifierData *coll_clm int cloth_are_edges_adjacent(ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair) { - Cloth *cloth1, *cloth2; - ClothVertex *verts1, *verts2; + Cloth *cloth1 = NULL, *cloth2 = NULL; + ClothVertex *verts1 = NULL, *verts2 = NULL; float temp[3]; cloth1 = clmd->clothObject; @@ -1023,7 +1031,7 @@ void cloth_update_collision_objects(float step) int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { Base *base=NULL; - ClothModifierData *coll_clmd=NULL; + CollisionModifierData *collmd=NULL; Cloth *cloth=NULL; Object *coll_ob=NULL; BVH *cloth_bvh=NULL; @@ -1064,23 +1072,21 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) for (base = G.scene->base.first; base; base = base->next) { coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + collmd = (CollisionModifierData *) modifiers_findByType (coll_ob, eModifierType_Collision); - if (!coll_clmd) + if (!collmd) continue; - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + if (collmd->tree) { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - BVH *coll_bvh = coll_clmd->clothObject->tree; + BVH *coll_bvh = collmd->tree; + + collision_move_object(collmd, step + dt, step); - bvh_traverse(clmd, coll_clmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static); - } - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); + bvh_traverse(clmd, collmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static); } + else + printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); } // process all collisions (calculate impulses, TODO: also repulses if distance too short) @@ -1094,18 +1100,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) + collmd = (CollisionModifierData *) modifiers_findByType (coll_ob, eModifierType_Collision); + if (!collmd) continue; - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject) - result += cloth_collision_response_static(clmd, coll_clmd); - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } + result += cloth_collision_response_static(clmd, collmd); } // apply impulses in parallel @@ -1140,14 +1139,10 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) clmd->coll_parms.collision_list = NULL; } - - // printf("ic: %d\n", ic); rounds++; } while(result && (CLOTH_MAX_THRESHOLD>rounds)); - // printf("\n"); - //////////////////////////////////////////////////////////// // update positions // this is needed for bvh_calc_DOP_hull_moving() [kdop.c] @@ -1162,9 +1157,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) //////////////////////////////////////////////////////////// // moving collisions + // + // response code is just missing itm //////////////////////////////////////////////////////////// - + /* // update cloth bvh bvh_update_from_cloth(clmd, 1); // 0 means STATIC, 1 means MOVING @@ -1294,7 +1291,6 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } while(result && (CLOTH_MAX_THRESHOLD>rounds)); - //////////////////////////////////////////////////////////// // update positions + velocities //////////////////////////////////////////////////////////// @@ -1305,6 +1301,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) VECADD(verts[i].tx, verts[i].txold, verts[i].tv); } //////////////////////////////////////////////////////////// - + */ + return MIN2(ret, 1); } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index b154cb0e755..4985b3efa3f 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -850,6 +850,7 @@ DO_INLINE float fbstar(float length, float L, float kb, float cb) return tempfb; } +// function to calculae bending spring force (taken from Choi & Co) DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) { float tempfb = kb * fb(length, L); @@ -1331,7 +1332,7 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto initdiag_bfmatrix(A, I); zero_lfvector(dV, numverts); - subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); + subadd_bfmatrixS_bfmatrixS(A, dFdV, dt, dFdX, (dt*dt)); mul_bfmatrix_lfvector(dFdXmV, dFdX, lV); diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c index ed1da4d19f9..736ffcf0965 100644 --- a/source/blender/blenkernel/intern/kdop.c +++ b/source/blender/blenkernel/intern/kdop.c @@ -670,7 +670,7 @@ DO_INLINE int bvh_overlap(float *bv1, float *bv2) * every other triangle that doesn't require any realloc, but uses * much memory */ -int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response) +int bvh_traverse ( ClothModifierData * clmd, CollisionModifierData * collmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response) { int i = 0, ret=0; @@ -693,7 +693,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Collis // Provide the collision response. if(collision_response) - collision_response (clmd, coll_clmd, tree1, tree2); + collision_response (clmd, collmd, tree1, tree2); return 1; } else @@ -702,7 +702,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Collis for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree2->nodes[i] && bvh_traverse (clmd, coll_clmd, tree1, tree2->nodes[i], step, collision_response)) + if (tree2->nodes[i] && bvh_traverse (clmd, collmd, tree1, tree2->nodes[i], step, collision_response)) ret = 1; } } @@ -713,7 +713,7 @@ int bvh_traverse(ClothModifierData * clmd, ClothModifierData * coll_clmd, Collis for (i = 0; i < 4; i++) { // Only traverse nodes that exist. - if (tree1->nodes [i] && bvh_traverse (clmd, coll_clmd, tree1->nodes[i], tree2, step, collision_response)) + if (tree1->nodes [i] && bvh_traverse (clmd, collmd, tree1->nodes[i], tree2, step, collision_response)) ret = 1; } } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index ed86e1ae17f..da31929442d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5004,7 +5004,7 @@ static void clothModifier_updateDepgraph( CustomDataMask clothModifier_requiredDataMask(ModifierData *md) { - ClothModifierData *clmd = (HookModifierData *)md; + ClothModifierData *clmd = (ClothModifierData *)md; CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ @@ -5067,6 +5067,9 @@ static void collisionModifier_freeData(ModifierData *md) if(collmd->current_v) MEM_freeN(collmd->current_v); + if(collmd->mfaces) + MEM_freeN(collmd->mfaces); + collmd->x = NULL; collmd->xnew = NULL; collmd->current_x = NULL; @@ -5075,6 +5078,7 @@ static void collisionModifier_freeData(ModifierData *md) collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; + collmd->mfaces = NULL; } } @@ -5139,7 +5143,10 @@ static void collisionModifier_deformVerts( // TODO: epsilon // create bounding box hierarchy - collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->current_x, numverts, ob->pd->pdef_sbift); + collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->x, numverts, ob->pd->pdef_sbift); + + collmd->mfaces = dm->dupFaceArray(dm); + collmd->numfaces = dm->getNumFaces(dm); } else if(numverts == collmd->numverts) { @@ -5156,8 +5163,8 @@ static void collisionModifier_deformVerts( Mat4MulVecfl ( ob->obmat, collmd->xnew[i].co ); } - memcpy(collmd->current_xnew, dm->getVertArray(dm), numverts*sizeof(MVert)); - memcpy(collmd->current_x, dm->getVertArray(dm), numverts*sizeof(MVert)); + memcpy(collmd->current_xnew, collmd->x, numverts*sizeof(MVert)); + memcpy(collmd->current_x, collmd->x, numverts*sizeof(MVert)); // recalc static bounding boxes bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index ce942f5bbb0..3cb76c7a845 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -35,48 +35,6 @@ #include "DNA_listBase.h" -/** -* Pin and unpin frames are the frames on which the vertices stop moving. -* They will assume the position they had prior to pinFrame until unpinFrame -* is reached. -*/ -typedef struct ClothVertex -{ - int flags; /* General flags per vertex. */ - float v [3]; /* The velocity of the point. */ - float xconst [3]; /* constrained position */ - float x [3]; /* The current position of this vertex. */ - float xold [3]; /* The previous position of this vertex.*/ - float tx [3]; /* temporary position */ - float txold [3]; /* temporary old position */ - float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ - float mass; /* mass / weight of the vertex */ - float goal; /* goal, from SB */ - float impulse[3]; /* used in collision.c */ - unsigned int impulse_count; /* same as above */ -} -ClothVertex; - - -/** -* The definition of a spring. -*/ -typedef struct ClothSpring -{ - int ij; /* Pij from the paper, one end of the spring. */ - int kl; /* Pkl from the paper, one end of the spring. */ - float restlen; /* The original length of the spring. */ - int matrix_index; /* needed for implicit solver (fast lookup) */ - int type; /* types defined in BKE_cloth.h ("springType") */ - int flags; /* defined in BKE_cloth.h, e.g. deactivated due to tearing */ - float dfdx[3][3]; - float dfdv[3][3]; - float f[3]; -} -ClothSpring; - - - /** * This struct contains all the global data required to run a simulation. * At the time of this writing, this structure contains data appropriate diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index f8b6f4202a5..9ea0a9c2c9a 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -354,15 +354,20 @@ typedef struct ClothModifierData { } ClothModifierData; typedef struct CollisionModifierData { - ModifierData modifier; + ModifierData modifier; struct MVert *x; /* position at the beginning of the frame */ struct MVert *xnew; /* position at the end of the frame */ + struct MVert *xold; /* unsued atm, but was discussed during sprint */ struct MVert *current_xnew; /* new position at the actual inter-frame step */ struct MVert *current_x; /* position at the actual inter-frame step */ struct MVert *current_v; /* position at the actual inter-frame step */ + struct MFace *mfaces; /* object face data */ + unsigned int numverts; + unsigned int numfaces; + int pad; float time; struct BVH *tree; /* collision tree for this cloth object */ } CollisionModifierData; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 384b88be1eb..6b5083c5e26 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4941,101 +4941,94 @@ static void object_panel_cloth(Object *ob) if(clmd) { - but = uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_COLLOBJ, B_EFFECT_DEP, "Collision Object", 170,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + Cloth *cloth = clmd->clothObject; + int defCount; + char *clvg1, *clvg2; + char clmvg [] = "Weight Paint Groups%t|"; - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) + val2=0; + + /* GENERAL STUFF */ + uiClearButLock(); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiBlockEndAlign(block); + uiBlockBeginAlign(block); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); + uiBlockEndAlign(block); + + uiClearButLock(); + + uiBlockBeginAlign(block); + uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); + // uiClearButLock(); + + uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiBlockEndAlign(block); + + /* GOAL STUFF */ + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { - Cloth *cloth = clmd->clothObject; - int defCount; - char *clvg1, *clvg2; - char clmvg [] = "Weight Paint Groups%t|"; - - val2=0; - - // uiDefButBitI(block, TOG, CSIMSETT_FLAG_ADVANCED, REDRAWBUTSOBJECT, "Advanced", 180,200,130,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Enable advanced mode"); - - /* GENERAL STUFF */ - uiClearButLock(); - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); - uiBlockEndAlign(block); - uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); - uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); - uiBlockEndAlign(block); - - uiClearButLock(); - - uiBlockBeginAlign(block); - uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); - // uiClearButLock(); - - uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiBlockEndAlign(block); - - /* GOAL STUFF */ - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(ob->type==OB_MESH) { - if(ob->type==OB_MESH) - { - - defCount = sizeof (clmvg); - clvg1 = get_vertexgroup_menustr (ob); - clvg2 = MEM_callocN (strlen (clvg1) + 1 + defCount, "clothVgMS"); - if (! clvg2) { - printf ("draw_modifier: error allocating memory for cloth vertex group menu string.\n"); - return; - } - defCount = BLI_countlist (&ob->defbase); - if (defCount == 0) - { - clmd->sim_parms.vgroup_mass = 0; - } - else - if(!clmd->sim_parms.vgroup_mass) - clmd->sim_parms.vgroup_mass = 1; - - sprintf (clvg2, "%s%s", clmvg, clvg1); - - uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,70,150,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); - MEM_freeN (clvg1); - MEM_freeN (clvg2); - } - else - { - uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); - } - uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); - /* - // nobody is changing these ones anyway - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); - */ + defCount = sizeof (clmvg); + clvg1 = get_vertexgroup_menustr (ob); + clvg2 = MEM_callocN (strlen (clvg1) + 1 + defCount, "clothVgMS"); + if (! clvg2) { + printf ("draw_modifier: error allocating memory for cloth vertex group menu string.\n"); + return; + } + defCount = BLI_countlist (&ob->defbase); + if (defCount == 0) + { + clmd->sim_parms.vgroup_mass = 0; + } + else + if(!clmd->sim_parms.vgroup_mass) + clmd->sim_parms.vgroup_mass = 1; + + sprintf (clvg2, "%s%s", clmvg, clvg1); + + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,70,150,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + MEM_freeN (clvg1); + MEM_freeN (clvg2); } - uiBlockEndAlign(block); - - /* - // no tearing supported anymore since modifier stack restrictions - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - - if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + else { - uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); - } + uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + } - uiBlockEndAlign(block); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); + /* + // nobody is changing these ones anyway + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); */ } + uiBlockEndAlign(block); + + /* + // no tearing supported anymore since modifier stack restrictions + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + + if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + { + uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); + } + + uiBlockEndAlign(block); + */ } } From 35c93b07bd18590b4b80acc8c8a6adf1d6f122c1 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 22 Jan 2008 20:28:12 +0000 Subject: [PATCH 074/430] GUI cloth panel refactor, also made many code rearrangements, cleared DNA up --- source/blender/blenkernel/BKE_cloth.h | 115 ++-------- source/blender/blenkernel/BKE_modifier.h | 2 +- source/blender/blenkernel/intern/cloth.c | 136 ++++++------ source/blender/blenkernel/intern/collision.c | 95 ++------- source/blender/blenkernel/intern/implicit.c | 43 ++-- source/blender/blenkernel/intern/modifier.c | 55 +++-- source/blender/blenloader/intern/readfile.c | 36 ++-- source/blender/blenloader/intern/writefile.c | 15 +- source/blender/makesdna/DNA_cloth_types.h | 5 +- source/blender/makesdna/DNA_modifier_types.h | 6 +- source/blender/src/buttons_object.c | 208 +++++++++---------- 11 files changed, 297 insertions(+), 419 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 6ad9893d072..cb52e2f3ca0 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -35,6 +35,7 @@ #define BKE_CLOTH_H #include "BLI_linklist.h" +#include "BKE_collision.h" #include "BKE_customdata.h" #include "BKE_DerivedMesh.h" #include "DNA_cloth_types.h" @@ -48,7 +49,7 @@ struct Cloth; struct MFace; struct DerivedMesh; struct ClothModifierData; - +struct CollisionTree; // this is needed for inlining behaviour #ifndef _WIN32 @@ -60,7 +61,6 @@ struct ClothModifierData; #define CLOTH_MAX_THREAD 2 - /** * Pin and unpin frames are the frames on which the vertices stop moving. * They will assume the position they had prior to pinFrame until unpinFrame @@ -169,40 +169,7 @@ void implicit_set_positions ( ClothModifierData *clmd ); // from cloth.c, needed for modifier.c void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); -// used in collision.c -typedef struct CollisionTree -{ - struct CollisionTree *nodes[4]; // 4 children --> quad-tree - struct CollisionTree *parent; - struct CollisionTree *nextLeaf; - struct CollisionTree *prevLeaf; - float bv[26]; // Bounding volume of all nodes / we have 7 axes on a 14-DOP - unsigned int tri_index; // this saves the index of the face - // int point_index[4]; // supports up to 4 points in a leaf - int count_nodes; // how many nodes are used - int traversed; // how many nodes already traversed until this level? - int isleaf; -} -CollisionTree; - -typedef struct BVH -{ - unsigned int numfaces; - unsigned int numverts; - // ClothVertex *verts; // just a pointer to the original datastructure - MVert *current_x; // e.g. txold in clothvertex - MVert *current_xold; // e.g. tx in clothvertex - MFace *mfaces; // just a pointer to the original datastructure - struct LinkNode *tree; - CollisionTree *root; // TODO: saving the root --> is this really needed? YES! - CollisionTree *leaf_tree; /* Tail of the leaf linked list. */ - CollisionTree *leaf_root; /* Head of the leaf linked list. */ - float epsilon; /* epslion is used for inflation of the k-dop */ - int flags; /* bvhFlags */ -} -BVH; - -typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionTree * tree1, CollisionTree * tree2 ); +typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionTree *tree1, CollisionTree *tree2 ); ///////////////////////////////////////////////// @@ -213,30 +180,20 @@ typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, CollisionModi void bvh_collision_response ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree * tree1, CollisionTree * tree2 ); int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); -// needed for modifier.c -BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); - -// needed for collision.c -void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); - -//////////////////////////////////////////////// - - -///////////////////////////////////////////////// -// kdop.c -//////////////////////////////////////////////// - -// needed for cloth.c -void bvh_free ( BVH * bvh ); -void bvh_build (BVH *bvh); -LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); - -// needed for collision.c int bvh_traverse ( ClothModifierData * clmd, CollisionModifierData * collmd, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response ); -void bvh_update(BVH * bvh, int moving); //////////////////////////////////////////////// +//////////////////////////////////////////////// +// implicit.c +//////////////////////////////////////////////// + +// needed for cloth.c +int implicit_init ( Object *ob, ClothModifierData *clmd ); +int implicit_free ( ClothModifierData *clmd ); +int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); +//////////////////////////////////////////////// + ///////////////////////////////////////////////// // cloth.c @@ -276,12 +233,6 @@ typedef struct } CM_SOLVER_DEF; - -/* new C implicit simulator */ -int implicit_init ( Object *ob, ClothModifierData *clmd ); -int implicit_free ( ClothModifierData *clmd ); -int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); - /* used for caching in implicit.c */ typedef struct Frame { @@ -292,45 +243,5 @@ typedef struct Frame } Frame; -/* used for collisions in collision.c */ -typedef struct CollPair -{ - unsigned int face1; // cloth face - unsigned int face2; // object face - double distance; // magnitude of vector - float normal[3]; - float vector[3]; // unnormalized collision vector: p2-p1 - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 - int lastsign; // indicates if the distance sign has changed, unused itm - float time; // collision time, from 0 up to 1 - unsigned int ap1, ap2, ap3, bp1, bp2, bp3, bp4; - unsigned int pointsb[4]; -} -CollPair; - -/* used for collisions in collision.c */ -typedef struct EdgeCollPair -{ - unsigned int p11, p12, p21, p22; - float normal[3]; - float vector[3]; - float time; - int lastsign; - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 -} -EdgeCollPair; - -/* used for collisions in collision.c */ -typedef struct FaceCollPair -{ - unsigned int p11, p12, p13, p21; - float normal[3]; - float vector[3]; - float time; - int lastsign; - float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 -} -FaceCollPair; - #endif diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 682eb1a00dd..068190cb6fa 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -287,7 +287,7 @@ int modifiers_getCageIndex(struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled(struct Object *ob); -ModifierData * modifiers_isClothEnabled(Object *ob); +ClothModifierData * modifiers_isClothEnabled(Object *ob); int modifiers_isParticleEnabled(struct Object *ob); struct Object *modifiers_isDeformedByArmature(struct Object *ob); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 3fa99279435..1b284d0d35a 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -141,46 +141,46 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short * 2. fill object with standard values or with the GUI settings if given */ void cloth_init ( ClothModifierData *clmd ) -{ +{ /* Initialize our new data structure to reasonable values. */ - clmd->sim_parms.gravity [0] = 0.0; - clmd->sim_parms.gravity [1] = 0.0; - clmd->sim_parms.gravity [2] = -9.81; - clmd->sim_parms.structural = 100.0; - clmd->sim_parms.shear = 100.0; - clmd->sim_parms.bending = 1.0; - clmd->sim_parms.Cdis = 5.0; - clmd->sim_parms.Cvi = 1.0; - clmd->sim_parms.mass = 1.0f; - clmd->sim_parms.stepsPerFrame = 5; - clmd->sim_parms.sim_time = 1.0; - clmd->sim_parms.flags = CLOTH_SIMSETTINGS_FLAG_RESET; - clmd->sim_parms.solver_type = 0; - clmd->sim_parms.preroll = 0; - clmd->sim_parms.maxspringlen = 10; - clmd->sim_parms.firstframe = 1; - clmd->sim_parms.lastframe = 250; - clmd->sim_parms.vgroup_mass = 0; - clmd->coll_parms.self_friction = 5.0; - clmd->coll_parms.friction = 10.0; - clmd->coll_parms.loop_count = 1; - clmd->coll_parms.epsilon = 0.01f; - clmd->coll_parms.flags = 0; + clmd->sim_parms->gravity [0] = 0.0; + clmd->sim_parms->gravity [1] = 0.0; + clmd->sim_parms->gravity [2] = -9.81; + clmd->sim_parms->structural = 100.0; + clmd->sim_parms->shear = 100.0; + clmd->sim_parms->bending = 1.0; + clmd->sim_parms->Cdis = 5.0; + clmd->sim_parms->Cvi = 1.0; + clmd->sim_parms->mass = 1.0f; + clmd->sim_parms->stepsPerFrame = 5; + clmd->sim_parms->sim_time = 1.0; + clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms->solver_type = 0; + clmd->sim_parms->preroll = 0; + clmd->sim_parms->maxspringlen = 10; + clmd->sim_parms->firstframe = 1; + clmd->sim_parms->lastframe = 250; + clmd->sim_parms->vgroup_mass = 0; + clmd->coll_parms->self_friction = 5.0; + clmd->coll_parms->friction = 10.0; + clmd->coll_parms->loop_count = 1; + clmd->coll_parms->epsilon = 0.01f; + clmd->coll_parms->flags = 0; /* These defaults are copied from softbody.c's * softbody_calc_forces() function. */ - clmd->sim_parms.eff_force_scale = 1000.0; - clmd->sim_parms.eff_wind_scale = 250.0; + clmd->sim_parms->eff_force_scale = 1000.0; + clmd->sim_parms->eff_wind_scale = 250.0; // also from softbodies - clmd->sim_parms.maxgoal = 1.0f; - clmd->sim_parms.mingoal = 0.0f; - clmd->sim_parms.defgoal = 0.0f; - clmd->sim_parms.goalspring = 100.0f; - clmd->sim_parms.goalfrict = 0.0f; + clmd->sim_parms->maxgoal = 1.0f; + clmd->sim_parms->mingoal = 0.0f; + clmd->sim_parms->defgoal = 0.0f; + clmd->sim_parms->goalspring = 100.0f; + clmd->sim_parms->goalfrict = 0.0f; - clmd->sim_parms.cache = NULL; + clmd->sim_parms->cache = NULL; } @@ -488,7 +488,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; - if(!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) { stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); @@ -557,7 +557,7 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) fclose(fp); } - if(clmd->sim_parms.solver_type == 0) + if(clmd->sim_parms->solver_type == 0) implicit_set_positions(clmd); return ret; @@ -585,21 +585,21 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, ClothVertex *newframe= NULL, *verts; Frame *frame = NULL; LinkNode *search = NULL; - float deltaTime = current_time - clmd->sim_parms.sim_time; + float deltaTime = current_time - clmd->sim_parms->sim_time; - clmd->sim_parms.ob = ob; + clmd->sim_parms->ob = ob; // only be active during a specific period: // that's "first frame" and "last frame" on GUI /* - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) + if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) { if ( clmd->clothObject ) { - if ( clmd->sim_parms.cache ) + if ( clmd->sim_parms->cache ) { - if ( current_time < clmd->sim_parms.firstframe ) + if ( current_time < clmd->sim_parms->firstframe ) { int frametime = cloth_cache_first_frame ( clmd ); if ( cloth_cache_search_frame ( clmd, frametime ) ) @@ -609,7 +609,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } return; } - else if ( current_time > clmd->sim_parms.lastframe ) + else if ( current_time > clmd->sim_parms->lastframe ) { int frametime = cloth_cache_last_frame ( clmd ); if ( cloth_cache_search_frame ( clmd, frametime ) ) @@ -626,7 +626,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, cloth_cache_get_frame ( clmd, framenr ); cloth_to_object ( ob, clmd, vertexCos, numverts ); } - clmd->sim_parms.sim_time = current_time; + clmd->sim_parms->sim_time = current_time; return; } } @@ -636,28 +636,28 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, */ // unused in the moment, calculated seperately in implicit.c - clmd->sim_parms.dt = 1.0f / clmd->sim_parms.stepsPerFrame; + clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; - clmd->sim_parms.sim_time = current_time; + clmd->sim_parms->sim_time = current_time; // check if cloth object was some collision object before and needs freeing now - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) + if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) { // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing - clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; cloth_free_modifier ( clmd ); - clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; } // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) { // save next position + time if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) { if ( !collobj_from_object ( ob, clmd, dm, vertexCos, framenr ) ) { - clmd->sim_parms.flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; cloth_free_modifier ( clmd ); return; } @@ -669,8 +669,8 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } // Save old position - clmd->sim_parms.sim_time_old = clmd->sim_parms.sim_time; - clmd->sim_parms.sim_time = current_time; + clmd->sim_parms->sim_time_old = clmd->sim_parms->sim_time; + clmd->sim_parms->sim_time = current_time; verts = cloth->verts; @@ -707,7 +707,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, cloth = clmd->clothObject; } - clmd->clothObject->old_solver_type = clmd->sim_parms.solver_type; + clmd->clothObject->old_solver_type = clmd->sim_parms->solver_type; // Insure we have a clmd->clothObject, in case allocation failed. if ( clmd->clothObject != NULL ) @@ -731,8 +731,8 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, tstart(); // Call the solver. - if ( solvers [clmd->sim_parms.solver_type].solver ) - solvers [clmd->sim_parms.solver_type].solver ( ob, framenr, clmd, effectors ); + if ( solvers [clmd->sim_parms->solver_type].solver ) + solvers [clmd->sim_parms->solver_type].solver ( ob, framenr, clmd, effectors ); tend(); // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); @@ -749,7 +749,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, cloth_to_object ( ob, clmd, vertexCos, numverts ); // bvh_free(clmd->clothObject->tree); - // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms.epsilon); + // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms->epsilon); } } @@ -772,14 +772,14 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, void cloth_free_modifier ( ClothModifierData *clmd ) { Cloth *cloth = NULL; - Object *ob = clmd->sim_parms.ob; + Object *ob = clmd->sim_parms->ob; if ( !clmd ) return; cloth = clmd->clothObject; - if ( ! ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) + if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) { if ( cloth ) { @@ -898,7 +898,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short for ( i = 0; i < numverts; i++, verts++ ) { // LATER ON, support also mass painting here - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) @@ -913,7 +913,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short /* // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms.maxgoal - clmd->sim_parms.mingoal ); + // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); */ verts->goal = ( float ) pow ( verts->goal , 4.0f ); @@ -990,7 +990,7 @@ static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMes verts->impulse_count = 0; VECCOPY ( verts->impulse, tnull ); } - clmd->clothObject->tree = bvh_build_from_cloth ( clmd,clmd->coll_parms.epsilon ); + clmd->clothObject->tree = bvh_build_from_cloth ( clmd,clmd->coll_parms->epsilon ); } @@ -1039,7 +1039,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh return 0; } - clmd->sim_parms.ob = ob; + clmd->sim_parms->ob = ob; switch ( ob->type ) { @@ -1066,10 +1066,10 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh VECCOPY ( verts->x, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->x ); - verts->mass = clmd->sim_parms.mass; + verts->mass = clmd->sim_parms->mass; - if ( clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - verts->goal= clmd->sim_parms.defgoal; + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal= clmd->sim_parms->defgoal; else verts->goal= 0.0f; @@ -1090,14 +1090,14 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh } // apply / set vertex groups - if ( clmd->sim_parms.vgroup_mass > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms.vgroup_mass ); + if ( clmd->sim_parms->vgroup_mass > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass ); // init our solver - if ( solvers [clmd->sim_parms.solver_type].init ) - solvers [clmd->sim_parms.solver_type].init ( ob, clmd ); + if ( solvers [clmd->sim_parms->solver_type].init ) + solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); - clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms.epsilon ); + clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); cloth_write_cache(ob, clmd, framenr-1); } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index c5e6c119e10..75201bbcea3 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -459,7 +459,7 @@ int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierDa cloth1 = clmd->clothObject; - search = clmd->coll_parms.collision_list; + search = clmd->coll_parms->collision_list; while(search) { @@ -503,10 +503,10 @@ int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierDa float vrel_t_pre[3]; float vrel_t[3]; double impulse; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; float overlap = (epsilon + ALMOST_ZERO-collpair->distance); - // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms.friction*0.01, magrelVel); + // calculateFrictionImpulse(tangential, relativeVelocity, collpair->normal, magrelVel, clmd->coll_parms->friction*0.01, magrelVel); // magtangent = INPR(tangential, tangential); @@ -562,11 +562,11 @@ int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierDa // Apply the impulse and increase impulse counters. /* - // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms.friction*0.01, magtangent); + // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms->friction*0.01, magtangent); VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); - // VecMulf(vrel_t_pre, clmd->coll_parms.friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); + // VecMulf(vrel_t_pre, clmd->coll_parms->friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); magtangent = Normalize(vrel_t_pre); - VecMulf(vrel_t_pre, MIN2(clmd->coll_parms.friction*0.01f*magnormal,magtangent)); + VecMulf(vrel_t_pre, MIN2(clmd->coll_parms->friction*0.01f*magnormal,magtangent)); VECSUB(cloth1->verts[face1->v1].tv, cloth1->verts[face1->v1].tv,vrel_t_pre); */ @@ -600,7 +600,7 @@ void cloth_collision_static(ClothModifierData *clmd, CollisionModifierData *coll MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0; for(i = 0; i < 4; i++) @@ -694,7 +694,7 @@ void cloth_collision_static(ClothModifierData *clmd, CollisionModifierData *coll Normalize(collpair->normal); collpair->distance = distance; - BLI_linklist_append(&clmd->coll_parms.collision_list, collpair); + BLI_linklist_append(&clmd->coll_parms->collision_list, collpair); } else @@ -747,7 +747,7 @@ void cloth_collision_moving_edges(ClothModifierData *clmd, ClothModifierData *co MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; @@ -882,7 +882,7 @@ void cloth_collision_moving_tris(ClothModifierData *clmd, ClothModifierData *col MFace *face1=NULL, *face2=NULL; ClothVertex *verts1=NULL, *verts2=NULL; double distance = 0; - float epsilon = clmd->coll_parms.epsilon; + float epsilon = clmd->coll_parms->epsilon; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; @@ -978,52 +978,6 @@ void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clm cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); } -// move collision objects forward in time and update static bounding boxes -void cloth_update_collision_objects(float step) -{ - Base *base=NULL; - ClothModifierData *coll_clmd=NULL; - Object *coll_ob=NULL; - unsigned int i=0; - - // search all objects for collision object - for (base = G.scene->base.first; base; base = base->next) - { - - coll_ob = base->object; - coll_clmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); - if (!coll_clmd) - continue; - - // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - if (coll_clmd->clothObject && coll_clmd->clothObject->tree) - { - Cloth *coll_cloth = coll_clmd->clothObject; - BVH *coll_bvh = coll_clmd->clothObject->tree; - unsigned int coll_numverts = coll_cloth->numverts; - - // update position of collision object - for(i = 0; i < coll_numverts; i++) - { - VECCOPY(coll_cloth->verts[i].txold, coll_cloth->verts[i].tx); - - VECADDS(coll_cloth->verts[i].tx, coll_cloth->verts[i].xold, coll_cloth->verts[i].v, step); - - // no dt here because of float rounding errors - VECSUB(coll_cloth->verts[i].tv, coll_cloth->verts[i].tx, coll_cloth->verts[i].txold); - } - - // update BVH of collision object - bvh_update_from_cloth(coll_clmd, 0); // 0 means STATIC, 1 means MOVING - } - else - printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - } -} - // CLOTH_MAX_THRESHOLD defines how much collision rounds/loops should be taken #define CLOTH_MAX_THRESHOLD 10 @@ -1041,7 +995,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) float tnull[3] = {0,0,0}; int ret = 0; - if ((clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) + if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) { return 0; } @@ -1059,14 +1013,11 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // update cloth bvh bvh_update_from_cloth(clmd, 0); // 0 means STATIC, 1 means MOVING (see later in this function) - // update collision objects - cloth_update_collision_objects(step); - do { result = 0; ic = 0; - clmd->coll_parms.collision_list = NULL; + clmd->coll_parms->collision_list = NULL; // check all collision objects for (base = G.scene->base.first; base; base = base->next) @@ -1125,9 +1076,9 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } // free collision list - if(clmd->coll_parms.collision_list) + if(clmd->coll_parms->collision_list) { - LinkNode *search = clmd->coll_parms.collision_list; + LinkNode *search = clmd->coll_parms->collision_list; while(search) { CollPair *coll_pair = search->link; @@ -1135,9 +1086,9 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) MEM_freeN(coll_pair); search = search->next; } - BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + BLI_linklist_free(clmd->coll_parms->collision_list,NULL); - clmd->coll_parms.collision_list = NULL; + clmd->coll_parms->collision_list = NULL; } rounds++; } @@ -1191,7 +1142,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { result = 0; ic = 0; - clmd->coll_parms.collision_list = NULL; + clmd->coll_parms->collision_list = NULL; // check all collision objects for (base = G.scene->base.first; base; base = base->next) @@ -1203,7 +1154,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + if (coll_clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject && coll_clmd->clothObject->tree) { @@ -1233,7 +1184,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) continue; // if collision object go on - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + if (coll_clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { if (coll_clmd->clothObject) result += cloth_collision_response_moving_tris(clmd, coll_clmd); @@ -1271,9 +1222,9 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // free collision list - if(clmd->coll_parms.collision_list) + if(clmd->coll_parms->collision_list) { - LinkNode *search = clmd->coll_parms.collision_list; + LinkNode *search = clmd->coll_parms->collision_list; while(search) { CollPair *coll_pair = search->link; @@ -1281,9 +1232,9 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) MEM_freeN(coll_pair); search = search->next; } - BLI_linklist_free(clmd->coll_parms.collision_list,NULL); + BLI_linklist_free(clmd->coll_parms->collision_list,NULL); - clmd->coll_parms.collision_list = NULL; + clmd->coll_parms->collision_list = NULL; } // printf("ic: %d\n", ic); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 4985b3efa3f..3f21bf2bfc5 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1081,7 +1081,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float vel[3]; float k = 0.0f; float L = s->restlen; - float cb = clmd->sim_parms.structural; + float cb = clmd->sim_parms->structural; float nullf[3] = {0,0,0}; float stretch_force[3] = {0,0,0}; @@ -1089,7 +1089,6 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; Cloth *cloth = clmd->clothObject; - ClothVertex *verts = cloth->verts; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); @@ -1107,8 +1106,8 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, /* if(length>L) { - if((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) - && ((((length-L)*100.0f/L) > clmd->sim_parms.maxspringlen))) // cut spring! + if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! { s->flags |= CSPRING_FLAG_DEACTIVATE; return; @@ -1130,19 +1129,19 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms.structural; + k = clmd->sim_parms->structural; mul_fvector_S(stretch_force, dir, (k*(length-L))); VECADD(s->f, s->f, stretch_force); // Ascher & Boxman, p.21: Damping only during elonglation - mul_fvector_S(damping_force, extent, clmd->sim_parms.Cdis * ((INPR(vel,extent)/length))); + mul_fvector_S(damping_force, extent, clmd->sim_parms->Cdis * ((INPR(vel,extent)/length))); VECADD(s->f, s->f, damping_force); dfdx_spring_type1(s->dfdx, dir,length,L,k); - dfdv_damp(s->dfdv, dir,clmd->sim_parms.Cdis); + dfdv_damp(s->dfdv, dir,clmd->sim_parms->Cdis); } } else // calculate force of bending springs @@ -1151,7 +1150,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - k = clmd->sim_parms.bending; + k = clmd->sim_parms->bending; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); @@ -1228,7 +1227,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec /* Collect forces and derivatives: F,dFdX,dFdV */ Cloth *cloth = clmd->clothObject; unsigned int i = 0; - float spring_air = clmd->sim_parms.Cvi * 0.01f; /* viscosity of air scaled in percent */ + float spring_air = clmd->sim_parms->Cvi * 0.01f; /* viscosity of air scaled in percent */ float gravity[3]; float tm2[3][3] = {{-spring_air,0,0}, {0,-spring_air,0},{0,0,-spring_air}}; ClothVertex *verts = cloth->verts; @@ -1240,7 +1239,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec LinkNode *search = cloth->springs; - VECCOPY(gravity, clmd->sim_parms.gravity); + VECCOPY(gravity, clmd->sim_parms->gravity); mul_fvector_S(gravity, gravity, 0.001f); /* scale gravity force */ /* set dFdX jacobi matrix to zero */ @@ -1253,7 +1252,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec submul_lfvectorS(lF, lV, spring_air, numverts); /* do goal stuff */ - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { for(i = 0; i < numverts; i++) { @@ -1265,12 +1264,12 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec VECADD(tvect, tvect, verts[i].xold); VECSUB(auxvect, tvect, lX[i]); - ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms.goalspring)-1.0f ; + ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms->goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); // calulate damping forces generated by goals VECSUB(velgoal,verts[i].xold, verts[i].xconst); - kd = clmd->sim_parms.goalfrict * 0.01f; // friction force scale taken from SB + kd = clmd->sim_parms->goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); } @@ -1287,7 +1286,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; - float fieldfactor = 1000.0f, windfactor = 250.0f; // from sb + float fieldfactor = 1000.0f; // windfactor = 250.0f; // from sb pdDoEffectors(effectors, lX[i], force, speed, (float)G.scene->r.cfra, 0.0f, PE_WIND_AS_SPEED); @@ -1307,7 +1306,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)){} + // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)){} cloth_calc_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; @@ -1318,7 +1317,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec while(search) { // only handle active springs - // if(((clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED)) + // if(((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) && !(springs[i].flags & CSPRING_FLAG_DEACTIVATE))|| !(clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED)) cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; } @@ -1357,16 +1356,16 @@ void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVecto int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors) { - unsigned int i=0, j; + unsigned int i=0; float step=0.0f, tf=1.0f; Cloth *cloth = clmd->clothObject; ClothVertex *verts = cloth->verts; unsigned int numverts = cloth->numverts; - float dt = 1.0f / clmd->sim_parms.stepsPerFrame; + float dt = 1.0f / clmd->sim_parms->stepsPerFrame; Implicit_Data *id = cloth->implicit; int result = 0; - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { for(i = 0; i < numverts; i++) { @@ -1389,7 +1388,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); - if(clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) { // collisions // itstart(); @@ -1397,7 +1396,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update verts to current positions for(i = 0; i < numverts; i++) { - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ { if(verts [i].goal >= SOFTGOALSNAP) { @@ -1472,7 +1471,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase for(i = 0; i < numverts; i++) { - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(verts [i].goal < SOFTGOALSNAP) { diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index da31929442d..9273b6bf9ab 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4947,6 +4947,14 @@ static void softbodyModifier_deformVerts( static void clothModifier_initData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; + + clmd->sim_parms = MEM_callocN(sizeof(SimulationSettings), "cloth sim parms"); + clmd->coll_parms = MEM_callocN(sizeof(CollisionSettings), "cloth coll parms"); + + /* check for alloc failing */ + if(!clmd->sim_parms || !clmd->coll_parms) + return; + cloth_init (clmd); } @@ -4956,7 +4964,7 @@ static void clothModifier_deformVerts( { DerivedMesh *dm = NULL; - // if possible use/create DerivedMesh + /* if possible use/create DerivedMesh */ if(derivedData) dm = CDDM_copy(derivedData); else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); @@ -4967,6 +4975,8 @@ static void clothModifier_deformVerts( CDDM_calc_normals(dm); } + /* TODO: check for sim_parms / coll_parms NOT NULL */ + clothModifier_do((ClothModifierData *)md, ob, dm, vertexCos, numVerts); if(dm) @@ -4991,7 +5001,7 @@ static void clothModifier_updateDepgraph( ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); if(coll_clmd) { - if (coll_clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) + if (coll_clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) { DagNode *curNode = dag_get_node(forest, ob1); dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); @@ -5008,8 +5018,8 @@ CustomDataMask clothModifier_requiredDataMask(ModifierData *md) CustomDataMask dataMask = 0; /* ask for vertexgroups if we need them */ - if(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) - if (clmd->sim_parms.vgroup_mass > 0) + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + if (clmd->sim_parms->vgroup_mass > 0) dataMask |= (1 << CD_MDEFORMVERT); return dataMask; @@ -5027,8 +5037,11 @@ static void clothModifier_freeData(ModifierData *md) if (clmd) { - clmd->sim_parms.flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; cloth_free_modifier (clmd); + + MEM_freeN(clmd->sim_parms); + MEM_freeN(clmd->coll_parms); } } @@ -5096,9 +5109,8 @@ static void collisionModifier_deformVerts( float current_time = 0; unsigned int numverts = 0, i = 0; MVert *tempVert = NULL; - - // if possible use/create DerivedMesh + /* if possible use/create DerivedMesh */ if(derivedData) dm = CDDM_copy(derivedData); else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); @@ -5112,12 +5124,11 @@ static void collisionModifier_deformVerts( { CDDM_apply_vert_coords(dm, vertexCos); CDDM_calc_normals(dm); - - + current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); if(current_time > collmd->time) - { + { numverts = dm->getNumVerts ( dm ); // check if mesh has changed @@ -5141,12 +5152,12 @@ static void collisionModifier_deformVerts( collmd->numverts = numverts; - // TODO: epsilon - // create bounding box hierarchy - collmd->tree = bvh_build_from_mvert(dm->getFaceArray(dm), dm->getNumFaces(dm), collmd->x, numverts, ob->pd->pdef_sbift); - collmd->mfaces = dm->dupFaceArray(dm); collmd->numfaces = dm->getNumFaces(dm); + + // TODO: epsilon + // create bounding box hierarchy + collmd->tree = bvh_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->x, numverts, ob->pd->pdef_sbift); } else if(numverts == collmd->numverts) { @@ -5166,8 +5177,16 @@ static void collisionModifier_deformVerts( memcpy(collmd->current_xnew, collmd->x, numverts*sizeof(MVert)); memcpy(collmd->current_x, collmd->x, numverts*sizeof(MVert)); - // recalc static bounding boxes - bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); + /* happens on file load (ONLY when i decomment changes in readfile.c */ + if(!collmd->tree) + { + collmd->tree = bvh_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->current_x, numverts, ob->pd->pdef_sbift); + } + else + { + // recalc static bounding boxes + bvh_update_from_mvert(collmd->tree, collmd->current_x, numverts, NULL, 0); + } } collmd->time = current_time; @@ -7271,11 +7290,11 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -ModifierData * modifiers_isClothEnabled(Object *ob) +ClothModifierData * modifiers_isClothEnabled(Object *ob) { ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); - return md; + return (ClothModifierData *)md; } int modifiers_isParticleEnabled(Object *ob) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index af75e9490d5..c725b3d63ac 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2998,29 +2998,41 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) SubsurfModifierData *smd = (SubsurfModifierData*) md; smd->emCache = smd->mCache = 0; - } + } else if (md->type==eModifierType_Cloth) { - ClothModifierData *clmd = (ClothModifierData*) md; - - clmd->clothObject = NULL; - /* - clmd->sim_parms= newdataadr(fd, clmd->sim_parms); - clmd->coll_parms= newdataadr(fd, clmd->coll_parms); - */ - - } + ClothModifierData *clmd = (ClothModifierData*) md; + + clmd->clothObject = NULL; + + clmd->sim_parms= newdataadr(fd, clmd->sim_parms); + clmd->coll_parms= newdataadr(fd, clmd->coll_parms); + + } else if (md->type==eModifierType_Collision) { - /* + CollisionModifierData *collmd = (CollisionModifierData*) md; + /* + // TODO: CollisionModifier should use pointcache + // + have proper reset events before enabling this + collmd->x = newdataadr(fd, collmd->x); + collmd->xnew = newdataadr(fd, collmd->xnew); + collmd->mfaces = newdataadr(fd, collmd->mfaces); + + collmd->current_x = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_x"); + collmd->current_xnew = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_xnew"); + collmd->current_v = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_v"); + */ collmd->x = NULL; collmd->xnew = NULL; collmd->current_x = NULL; collmd->current_xnew = NULL; + collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; collmd->tree = NULL; - */ + collmd->mfaces = NULL; + } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 3ac4160b105..8bcc2497dbd 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -839,11 +839,22 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) } else if(md->type==eModifierType_Cloth) { ClothModifierData *clmd = (ClothModifierData*) md; - /* + writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms); writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms); - */ + } + else if (md->type==eModifierType_Collision) { + + CollisionModifierData *collmd = (CollisionModifierData*) md; + /* + // TODO: CollisionModifier should use pointcache + // + have proper reset events before enabling this + writestruct(wd, DATA, "MVert", collmd->numverts, collmd->x); + writestruct(wd, DATA, "MVert", collmd->numverts, collmd->xnew); + writestruct(wd, DATA, "MFace", collmd->numfaces, collmd->mfaces); + */ + } else if (md->type==eModifierType_MeshDeform) { MeshDeformModifierData *mmd = (MeshDeformModifierData*) md; int size = mmd->dyngridsize; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 3cb76c7a845..ee4a0130dbf 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -34,7 +34,6 @@ #include "DNA_listBase.h" - /** * This struct contains all the global data required to run a simulation. * At the time of this writing, this structure contains data appropriate @@ -116,9 +115,9 @@ typedef struct Cloth unsigned char old_solver_type; unsigned char pad2; short pad3; - void *tree; /* collision tree for this cloth object */ + struct BVH *tree; /* collision tree for this cloth object */ struct MFace *mfaces; - void *implicit; /* our implicit solver connects to this pointer */ + struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ } Cloth; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 9ea0a9c2c9a..e5c3b46d875 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -7,8 +7,6 @@ #define MODSTACK_DEBUG 1 -#include "DNA_cloth_types.h" - /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */ typedef enum ModifierType { @@ -349,8 +347,8 @@ typedef struct ClothModifierData { ModifierData modifier; struct Cloth *clothObject; /* The internal data structure for cloth. */ - struct SimulationSettings sim_parms; /* definition is in DNA_cloth_types.h */ - struct CollisionSettings coll_parms; /* definition is in DNA_cloth_types.h */ + struct SimulationSettings *sim_parms; /* definition is in DNA_cloth_types.h */ + struct CollisionSettings *coll_parms; /* definition is in DNA_cloth_types.h */ } ClothModifierData; typedef struct CollisionModifierData { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 6b5083c5e26..90f7dab0a58 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3083,7 +3083,7 @@ void do_effects_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if(clmd->sim_parms.cache) + if(clmd->sim_parms->cache) { CFRA= 1; update_for_newframe_muted(); @@ -3099,7 +3099,7 @@ void do_effects_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - clmd->sim_parms.vgroup_mass = 0; + clmd->sim_parms->vgroup_mass = 0; do_object_panels(B_CLOTH_RENEW); } allqueue(REDRAWBUTSOBJECT, 0); @@ -4923,25 +4923,25 @@ static void object_cloth__enabletoggle(void *ob_v, void *arg2) allqueue(REDRAWBUTSEDIT, 0); } + static void object_panel_cloth(Object *ob) { uiBlock *block; - static int val, val2; uiBut *but; + static int val, val2; ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth", UI_EMBOSS, UI_HELV, curarea->win); - if(uiNewPanel(curarea, block, "Cloth", "Physics", 640, 0, 318, 204)==0) return; + + block= uiNewBlock(&curarea->uiblocks, "object_cloth", UI_EMBOSS, UI_HELV, curarea->win); + if(uiNewPanel(curarea, block, "Cloth ", "Physics", 640, 0, 318, 204)==0) return; + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - if(ob->id.lib) uiSetButLock(1, "Can't edit library data"); - val = ((clmd)?(1):(0)); + but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Cloth", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to become cloth"); - but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Cloth Object", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to become cloth"); uiButSetFunc(but, object_cloth__enabletoggle, ob, NULL); uiDefBut(block, LABEL, 0, "",10,10,300,0, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ if(clmd) { - Cloth *cloth = clmd->clothObject; int defCount; char *clvg1, *clvg2; char clmvg [] = "Weight Paint Groups%t|"; @@ -4951,13 +4951,13 @@ static void object_panel_cloth(Object *ob) /* GENERAL STUFF */ uiClearButLock(); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms.structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms.bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms.stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms->structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms->bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms->stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms.Cdis, 0.0, 10.0, 10, 0, "Spring damping"); - uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms.Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms->Cdis, 0.0, 10.0, 10, 0, "Spring damping"); + uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms->Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); uiBlockEndAlign(block); uiClearButLock(); @@ -4966,15 +4966,20 @@ static void object_panel_cloth(Object *ob) uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); // uiClearButLock(); - uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms.gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms.gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms.gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms->gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms->gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Z:", 230,100,80,20, &clmd->sim_parms->gravity[2], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); uiBlockEndAlign(block); /* GOAL STUFF */ uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - if (clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + + if(BLI_countlist (&ob->defbase) > 0) + { + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + } + + if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(ob->type==OB_MESH) { @@ -4989,30 +4994,30 @@ static void object_panel_cloth(Object *ob) defCount = BLI_countlist (&ob->defbase); if (defCount == 0) { - clmd->sim_parms.vgroup_mass = 0; + clmd->sim_parms->vgroup_mass = 0; } else - if(!clmd->sim_parms.vgroup_mass) - clmd->sim_parms.vgroup_mass = 1; + if(!clmd->sim_parms->vgroup_mass) + clmd->sim_parms->vgroup_mass = 1; sprintf (clvg2, "%s%s", clmvg, clvg1); - uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,70,150,20, &clmd->sim_parms.vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,70,150,20, &clmd->sim_parms->vgroup_mass, 0, defCount, 0, 0, "Browses available vertex groups"); MEM_freeN (clvg1); MEM_freeN (clvg2); } else { - uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms.vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms.defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); + uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); } - uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms.goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms->goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); /* // nobody is changing these ones anyway - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms.goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms.mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms.maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms->goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Min:", 10,30,150,20, &clmd->sim_parms->mingoal, 0.0, 1.0, 10, 0, "Goal minimum, vertex group weights are scaled to match this range"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms->maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); */ } uiBlockEndAlign(block); @@ -5020,111 +5025,85 @@ static void object_panel_cloth(Object *ob) /* // no tearing supported anymore since modifier stack restrictions uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); + uiDefButBitI(block, TOG, CSIMSETT_FLAG_TEARING_ENABLED, B_EFFECT_DEP, "Tearing", 10,0,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Sets object to become a cloth collision object"); - if (clmd->sim_parms.flags & CSIMSETT_FLAG_TEARING_ENABLED) + if (clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) { - uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms.maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); - } + uiDefButI(block, NUM, B_DIFF, "Max extent:", 160,0,150,20, &clmd->sim_parms->maxspringlen, 1.0, 1000.0, 10, 0, "Maximum extension before spring gets cut"); + } uiBlockEndAlign(block); */ } + + uiBlockEndAlign(block); + + uiBlockEndAlign(block); } - static void object_panel_cloth_II(Object *ob) { uiBlock *block; - static int val; - uiBut *but; ClothModifierData *clmd = NULL; + + block= uiNewBlock(&curarea->uiblocks, "object_cloth_II", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth ", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Cache/Collisions", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) - { - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) - { - Cloth *cloth = clmd->clothObject; - char str[128]; - - block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_II", UI_EMBOSS, UI_HELV, curarea->win); - uiNewPanelTabbed("Cloth", "Physics"); - if(uiNewPanel(curarea, block, "Cloth Cache", "Physics", 651, 0, 318, 204)==0) return; - - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - - uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms.firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms.lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); - - if(clmd->sim_parms.cache) - { - int length = BLI_linklist_length(clmd->sim_parms.cache); - - /* correct spelling if only 1 frame cacheed --> only gimmick */ - if(length-clmd->sim_parms.preroll>1) - sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); - else - sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms.preroll, clmd->sim_parms.preroll, length); - - uiDefBut(block, LABEL, 0, str, 10,140,290,20, NULL, 0.0, 0, 0, 0, ""); - uiDefBut(block, LABEL, 0, "Clear cache:", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); - uiBlockBeginAlign (block); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 10, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache without preroll"); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 155, 100,145,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache"); - if(length>1) // B_CLOTH_CHANGEPREROLL - uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms.preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); - else - uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); - } - else - { - uiDefBut(block, LABEL, 0, "No frames cached.", 10,120,290,20, NULL, 0.0, 0, 0, 0, ""); - } - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,50,145,20, &clmd->sim_parms.flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); - uiBlockEndAlign(block); - } - } - // uiBlockEndAlign(block); -} - -static void object_panel_cloth_III(Object *ob) -{ - uiBlock *block; - static int val; - uiBut *but; - ClothModifierData *clmd = NULL; - clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if (!(clmd->sim_parms.flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ)) - { - Cloth *cloth = clmd->clothObject; - char str[128]; - - block= uiNewBlock(&curarea->uiblocks, "object_panel_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); - uiNewPanelTabbed("Cloth", "Physics"); - if(uiNewPanel(curarea, block, "Cloth Collisions", "Physics", 651, 0, 318, 204)==0) return; + // char str[128]; - uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - - uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,70,130,20, &clmd->coll_parms.flags, 0, 0, 0, 0, "Enable collisions with this object"); - if (clmd->coll_parms.flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) - { - // uiDefBut(block, LABEL, 0, "",10,10,300,20, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 10,30,150,20, &clmd->coll_parms.epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefBut(block, LABEL, 0, "",160,30,150,20, NULL, 0.0, 0, 0, 0, ""); - } - else - uiDefBut(block, LABEL, 0, "",140,10,170,20, NULL, 0.0, 0, 0, 0, ""); - uiBlockEndAlign(block); + uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); + + uiDefBut(block, LABEL, 0, "",10,140,300,20, NULL, 0.0, 0, 0, 0, ""); + + /* correct spelling if only 1 frame cacheed --> only gimmick */ + /* + if(length-clmd->sim_parms->preroll>1) + sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); + else + sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); + */ + + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + uiDefBut(block, LABEL, 0, "Clear cache:", 10,100,90,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 100, 100,100,20, NULL, 0.0, 0.0, 0, 0, "Free ALL cloth cache without preroll"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 200, 100,110,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache starting from next frame"); + uiDefBut(block, LABEL, 0, " ", 10,80,300,20, NULL, 0.0, 0, 0, 0, ""); + } + else + { + uiDefBut(block, LABEL, 0, " ", 10,100,300,40, NULL, 0.0, 0, 0, 0, ""); } - } - // uiBlockEndAlign(block); -} + /* + if(length>1) // B_CLOTH_CHANGEPREROLL + uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms->preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); + else + uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); + */ + + uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + { + uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + } + else + uiDefBut(block, LABEL, 0, "",160,60,150,20, NULL, 0.0, 0, 0, 0, ""); + } + + uiBlockEndAlign(block); + +} void object_panels() { @@ -5156,7 +5135,6 @@ void physics_panels() object_softbodies_II(ob); object_panel_cloth(ob); object_panel_cloth_II(ob); - object_panel_cloth_III(ob); object_panel_fluidsim(ob); } } From ab7b4bb892d4bd9926dbc381634d97a556dab3e4 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 22 Jan 2008 23:17:10 +0000 Subject: [PATCH 075/430] (hopefully) fixed huge problem with cache/cloth reset. --- source/blender/blenkernel/BKE_cloth.h | 12 +- source/blender/blenkernel/BKE_modifier.h | 2 +- source/blender/blenkernel/intern/cloth.c | 218 +++++++------------- source/blender/blenkernel/intern/modifier.c | 11 +- source/blender/include/butspace.h | 3 +- source/blender/makesdna/DNA_cloth_types.h | 1 - source/blender/src/buttons_object.c | 115 +++++------ source/blender/src/editmesh.c | 3 +- source/blender/src/editobject.c | 3 +- source/blender/src/transform_conversions.c | 3 +- source/blender/src/transform_generics.c | 16 +- source/blender/src/vpaint.c | 3 +- 12 files changed, 163 insertions(+), 227 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index cb52e2f3ca0..11de3092e7c 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -198,10 +198,14 @@ int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase ///////////////////////////////////////////////// // cloth.c //////////////////////////////////////////////// -void cloth_free_modifier ( ClothModifierData *clmd ); -void cloth_init ( ClothModifierData *clmd ); -void cloth_deform_verts ( struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd ); -void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); + +// needed for modifier.c +void cloth_free_modifier_extern (ClothModifierData *clmd); +void cloth_free_modifier (Object *ob, ClothModifierData *clmd); +void cloth_init (ClothModifierData *clmd); +void cloth_deform_verts (struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd); + +void cloth_update_normals (ClothVertex *verts, int nVerts, MFace *face, int totface); // needed for collision.c void bvh_update_from_cloth(ClothModifierData *clmd, int moving); diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 068190cb6fa..fba30264fea 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -287,7 +287,7 @@ int modifiers_getCageIndex(struct Object *ob, int *lastPossibleCageIndex_r); int modifiers_isSoftbodyEnabled(struct Object *ob); -ClothModifierData * modifiers_isClothEnabled(Object *ob); +int modifiers_isClothEnabled(struct Object *ob); int modifiers_isParticleEnabled(struct Object *ob); struct Object *modifiers_isDeformedByArmature(struct Object *ob); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 1b284d0d35a..2b5937985ae 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -124,7 +124,6 @@ static CM_SOLVER_DEF solvers [] = static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ); -static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ); int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); @@ -165,7 +164,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->coll_parms->friction = 10.0; clmd->coll_parms->loop_count = 1; clmd->coll_parms->epsilon = 0.01f; - clmd->coll_parms->flags = 0; + clmd->coll_parms->flags = CLOTH_COLLISIONSETTINGS_FLAG_ENABLED; /* These defaults are copied from softbody.c's * softbody_calc_forces() function. @@ -572,24 +571,13 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ) { unsigned int i; - unsigned int numedges = -1; - unsigned int numfaces = -1; - MVert *mvert = NULL; - MEdge *medge = NULL; - MFace *mface = NULL; - DerivedMesh *result = NULL, *result2 = NULL; Cloth *cloth = clmd->clothObject; unsigned int framenr = ( float ) G.scene->r.cfra; float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); ListBase *effectors = NULL; - ClothVertex *newframe= NULL, *verts; - Frame *frame = NULL; - LinkNode *search = NULL; + ClothVertex *verts = NULL; float deltaTime = current_time - clmd->sim_parms->sim_time; - clmd->sim_parms->ob = ob; - - // only be active during a specific period: // that's "first frame" and "last frame" on GUI /* @@ -640,56 +628,9 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, clmd->sim_parms->sim_time = current_time; - // check if cloth object was some collision object before and needs freeing now - if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) && ( clmd->clothObject != NULL ) && ( clmd->clothObject->old_solver_type == 255 ) ) - { - // temporary set CSIMSETT_FLAG_COLLOBJ flag for proper freeing - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - cloth_free_modifier ( clmd ); - clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - } - - // This is for collisions objects: check special case CSIMSETT_FLAG_COLLOBJ - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) - { - // save next position + time - if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) - { - if ( !collobj_from_object ( ob, clmd, dm, vertexCos, framenr ) ) - { - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_COLLOBJ; - cloth_free_modifier ( clmd ); - return; - } - - if ( clmd->clothObject == NULL ) - return; - - cloth = clmd->clothObject; - } - - // Save old position - clmd->sim_parms->sim_time_old = clmd->sim_parms->sim_time; - clmd->sim_parms->sim_time = current_time; - - verts = cloth->verts; - - for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) - { - // Save the previous position. - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->txold, verts->x ); - - // Get the current position. - VECCOPY ( verts->x, vertexCos[i] ); - Mat4MulVecfl ( ob->obmat, verts->x ); - - // Compute the vertices "velocity". - // (no dt correction here because of float error) - VECSUB ( verts->v, verts->x, verts->xold ); - } - - return; + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET) + { + cloth_free_modifier (ob, clmd); } if ( deltaTime == 1.0f ) @@ -769,10 +710,9 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } /* frees all */ -void cloth_free_modifier ( ClothModifierData *clmd ) +void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) { Cloth *cloth = NULL; - Object *ob = clmd->sim_parms->ob; if ( !clmd ) return; @@ -784,8 +724,7 @@ void cloth_free_modifier ( ClothModifierData *clmd ) if ( cloth ) { // free our frame cache, TODO: but get to first position before - if(ob) - cloth_clear_cache ( ob, clmd, 0 ); + cloth_clear_cache ( ob, clmd, 0 ); // If our solver provides a free function, call it if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) @@ -834,8 +773,72 @@ void cloth_free_modifier ( ClothModifierData *clmd ) clmd->clothObject = NULL; } } + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_RESET; } +/* frees all */ +void cloth_free_modifier_extern ( ClothModifierData *clmd ) +{ + Cloth *cloth = NULL; + + if ( !clmd ) + return; + + cloth = clmd->clothObject; + + if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) + { + if ( cloth ) + { + // If our solver provides a free function, call it + if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) + { + solvers [cloth->old_solver_type].free ( clmd ); + } + + // Free the verts. + if ( cloth->verts != NULL ) + MEM_freeN ( cloth->verts ); + + cloth->verts = NULL; + cloth->numverts = 0; + + // Free the springs. + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; + } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } + + cloth->springs = NULL; + cloth->numsprings = 0; + + // free BVH collision tree + if ( cloth->tree ) + bvh_free ( ( BVH * ) cloth->tree ); + + // we save our faces for collision objects + if ( cloth->mfaces ) + MEM_freeN ( cloth->mfaces ); + /* + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + */ + MEM_freeN ( cloth ); + clmd->clothObject = NULL; + } + } + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_RESET; +} /****************************************************************************** * @@ -933,72 +936,6 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short } } -// only meshes supported at the moment -/* collision objects */ -static int collobj_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts ) -{ - unsigned int i; - MVert *mvert = NULL; - ClothVertex *verts = NULL; - float tnull[3] = {0,0,0}; - - /* If we have a clothObject, free it. */ - if ( clmd->clothObject != NULL ) - cloth_free_modifier ( clmd ); - - /* Allocate a new cloth object. */ - clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); - if ( clmd->clothObject ) - { - clmd->clothObject->old_solver_type = 255; - // clmd->clothObject->old_collision_type = 255; - } - else if ( clmd->clothObject == NULL ) - { - modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); - return 0; - } - - switch ( ob->type ) - { - case OB_MESH: - - // mesh input objects need DerivedMesh - if ( !dm ) - return 0; - - cloth_from_mesh ( ob, clmd, dm ); - - if ( clmd->clothObject != NULL ) - { - if ( !dm ) return 0; - if ( !dm->getNumVerts ( dm ) || !dm->getNumFaces ( dm ) ) return 0; - - mvert = dm->getVertArray ( dm ); - verts = clmd->clothObject->verts; - numverts = clmd->clothObject->numverts = dm->getNumVerts ( dm ); - - for ( i = 0; i < numverts; i++, verts++ ) - { - VECCOPY ( verts->x, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->x ); - verts->flags = 0; - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->txold, verts->x ); - VECCOPY ( verts->tx, verts->x ); - VecMulf ( verts->v, 0.0f ); - verts->impulse_count = 0; - VECCOPY ( verts->impulse, tnull ); - } - clmd->clothObject->tree = bvh_build_from_cloth ( clmd,clmd->coll_parms->epsilon ); - - } - - return 1; - default: return 0; // TODO - we do not support changing meshes - } -} - /* helper function to get proper spring length when object is rescaled @@ -1024,7 +961,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh /* If we have a clothObject, free it. */ if ( clmd->clothObject != NULL ) - cloth_free_modifier ( clmd ); + cloth_free_modifier ( ob, clmd ); /* Allocate a new cloth object. */ clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); @@ -1038,8 +975,6 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject." ); return 0; } - - clmd->sim_parms->ob = ob; switch ( ob->type ) { @@ -1085,6 +1020,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh if ( !cloth_build_springs ( clmd->clothObject, dm ) ) { + cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); return 0; } @@ -1130,7 +1066,7 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * clmd->clothObject->verts = MEM_callocN ( sizeof ( ClothVertex ) * clmd->clothObject->numverts, "clothVertex" ); if ( clmd->clothObject->verts == NULL ) { - cloth_free_modifier ( clmd ); + cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); return; } @@ -1140,7 +1076,7 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * clmd->clothObject->mfaces = MEM_callocN ( sizeof ( MFace ) * clmd->clothObject->numfaces, "clothMFaces" ); if ( clmd->clothObject->mfaces == NULL ) { - cloth_free_modifier ( clmd ); + cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->mfaces." ); return; } @@ -1191,7 +1127,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) { ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL; unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; - unsigned int i = 0, j = 0, akku_count; + unsigned int i = 0; unsigned int numverts = dm->getNumVerts ( dm ); unsigned int numedges = dm->getNumEdges ( dm ); unsigned int numfaces = dm->getNumFaces ( dm ); @@ -1201,7 +1137,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) LinkNode **edgelist = NULL; EdgeHash *edgehash = NULL; LinkNode *search = NULL, *search2 = NULL; - float temp[3], akku, min, max; + float temp[3]; LinkNode *node = NULL, *node2 = NULL; // error handling diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 9273b6bf9ab..40b01fa3322 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4991,6 +4991,7 @@ static void clothModifier_updateDepgraph( Base *base; + /* TODO: this belongs to collision modifier */ if(clmd) { for(base = G.scene->base.first; base; base= base->next) @@ -5034,11 +5035,13 @@ static int clothModifier_dependsOnTime(ModifierData *md) static void clothModifier_freeData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; + Object *ob = NULL; + ClothModifierData *clmd2 = NULL; if (clmd) { - clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; - cloth_free_modifier (clmd); + + cloth_free_modifier_extern (clmd); MEM_freeN(clmd->sim_parms); MEM_freeN(clmd->coll_parms); @@ -7290,11 +7293,11 @@ int modifiers_isSoftbodyEnabled(Object *ob) return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } -ClothModifierData * modifiers_isClothEnabled(Object *ob) +int modifiers_isClothEnabled(Object *ob) { ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); - return (ClothModifierData *)md; + return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render)); } int modifiers_isParticleEnabled(Object *ob) diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index c925a0689ef..a7759f799ba 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -295,8 +295,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_CLOTH_CLEARCACHEALL 1480 #define B_CLOTH_CLEARCACHEFRAME 1481 #define B_CLOTH_CHANGEPREROLL 1482 -#define B_CLOTH_DEL_VG 1483 -#define B_CLOTH_RENEW 1484 +#define B_CLOTH_RENEW 1483 /* *********************** */ #define B_WORLDBUTS 1600 diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index ee4a0130dbf..65b8f4169ff 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -76,7 +76,6 @@ typedef struct SimulationSettings int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ - struct Object *ob; } SimulationSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 7f62c5b3308..4ac49a93119 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2287,6 +2287,56 @@ void do_object_panels(unsigned short event) if(ob->ipo) ob->ipo->showkey= (ob->ipoflag & OB_DRAWKEY)?1:0; allqueue(REDRAWVIEW3D, 0); break; + case B_CLOTH_CLEARCACHEALL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + cloth_clear_cache(ob, clmd, 2); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + break; + case B_CLOTH_CLEARCACHEFRAME: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + cloth_clear_cache(ob, clmd, MAX2(2.0,G.scene->r.cfra + 1.0)); + allqueue(REDRAWBUTSOBJECT, 0); + } + } + break; + case B_CLOTH_CHANGEPREROLL: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + if(clmd) + { + if(clmd->sim_parms->cache) + { + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); + } + } + } + break; + case B_CLOTH_RENEW: + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + + if(clmd) + { + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + } + } + break; default: if(event>=B_SELEFFECT && eventr.cfra + 1.0)); - allqueue(REDRAWBUTSOBJECT, 0); - } - } - break; - case B_CLOTH_CHANGEPREROLL: - { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) - { - if(clmd->sim_parms->cache) - { - CFRA= 1; - update_for_newframe_muted(); - DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - allqueue(REDRAWBUTSOBJECT, 0); - allqueue(REDRAWVIEW3D, 0); - } - } - } - break; - case B_CLOTH_DEL_VG: - { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) - { - clmd->sim_parms->vgroup_mass = 0; - do_object_panels(B_CLOTH_RENEW); - } - allqueue(REDRAWBUTSOBJECT, 0); - } - break; - case B_CLOTH_RENEW: - { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); - if(clmd) - { - do_object_panels(B_CLOTH_CLEARCACHEALL); - cloth_free_modifier (clmd); - } - } - break; default: if(event>=B_SELEFFECT && eventsim_parms->vgroup_mass = 0; } else + { if(!clmd->sim_parms->vgroup_mass) clmd->sim_parms->vgroup_mass = 1; + else if(clmd->sim_parms->vgroup_mass > defCount) + clmd->sim_parms->vgroup_mass = defCount; + } sprintf (clvg2, "%s%s", clmvg, clvg1); diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index dc16caa1f59..8bd397b0da4 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -1329,7 +1329,8 @@ void load_editMesh(void) for(base= G.scene->base.first; base; base= base->next) { if(base->object->data==me) { if(modifiers_isClothEnabled(base->object)) { - cloth_free_modifier(modifiers_isClothEnabled(base->object)); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(base->object, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } base->object->softflag |= OB_SB_REDO; diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 7b3a1a24188..cb1ed4c3e5a 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -1761,7 +1761,8 @@ void exit_editmode(int flag) /* freedata==0 at render, 1= freedata, 2= do undo b } if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier(modifiers_isClothEnabled(ob)); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } if(ob->type==OB_MESH && get_mesh(ob)->mr) diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 9160bf2f563..882a16bb9ce 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -3405,7 +3405,8 @@ void special_aftertrans_update(TransInfo *t) if (modifiers_isSoftbodyEnabled(ob)) ob->softflag |= OB_SB_REDO; else if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier(modifiers_isClothEnabled(ob)); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } /* Set autokey if necessary */ diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index a79b1d4c4ea..1f6d8ecf7af 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -468,14 +468,13 @@ void recalcData(TransInfo *t) /* bah, softbody exception... recalcdata doesnt reset */ for(base= FIRSTBASE; base; base= base->next) { if(base->object->recalc & OB_RECALC_DATA) - { - ClothModifierData *clmd = NULL; - + { if(modifiers_isSoftbodyEnabled(base->object)) { base->object->softflag |= OB_SB_REDO; } - else if((clmd = (ClothModifierData *)modifiers_isClothEnabled(ob))) { - cloth_free_modifier(clmd); + else if(modifiers_isClothEnabled(base->object)) { + ClothModifierData *clmd = (ClothModifierData *) modifiers_findByType(base->object, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } } @@ -516,13 +515,12 @@ void recalcData(TransInfo *t) /* softbody & cloth exception */ if(ob->recalc & OB_RECALC_DATA) { - ClothModifierData *clmd = NULL; - if(modifiers_isSoftbodyEnabled(ob)) { ob->softflag |= OB_SB_REDO; } - else if((clmd = (ClothModifierData *)modifiers_isClothEnabled(ob))) { - cloth_free_modifier(clmd); + else if(modifiers_isClothEnabled(ob)) { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } } diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 2e4ecd95709..dec15f96b8a 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -1351,7 +1351,8 @@ void weight_paint(void) // same goes for cloth if(modifiers_isClothEnabled(ob)) { - cloth_free_modifier((ClothModifierData *)modifiers_isClothEnabled(ob)); + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } BIF_undo_push("Weight Paint"); From 6490b2b29add882065637ea8701946940bc02d2d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 23 Jan 2008 13:24:44 +0000 Subject: [PATCH 076/430] Made GUI even more intuitive with explanations why something is not available etc., fixed some uninitialized variable. NEW: show pinned verts as big red balls in 3dview - please tell me how to improve that visual feedback :) --- source/blender/blenkernel/BKE_cloth.h | 5 ++- source/blender/blenkernel/intern/cloth.c | 45 ++++++++++++-------- source/blender/makesdna/DNA_cloth_types.h | 2 +- source/blender/src/buttons_object.c | 46 ++++++++++++-------- source/blender/src/drawobject.c | 51 +++++++++++++++++++++++ 5 files changed, 110 insertions(+), 39 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 11de3092e7c..4e704098ebd 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -80,6 +80,7 @@ typedef struct ClothVertex float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ unsigned int impulse_count; /* same as above */ + float avg_spring_len; /* average length of connected springs, UNUSED ATM */ } ClothVertex; @@ -156,8 +157,8 @@ typedef enum } CLOTH_SPRINGS_FLAGS; /* Bits to or into the ClothVertex.flags. */ -#define CVERT_FLAG_PINNED 1 -#define CVERT_FLAG_COLLISION 2 +#define CLOTH_VERT_FLAG_PINNED 1 +#define CLOTH_VERT_FLAG_COLLISION 2 // needed for buttons_object.c diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 2b5937985ae..fb3617e16f0 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -124,7 +124,7 @@ static CM_SOLVER_DEF solvers [] = static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ); -int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ); +int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ); static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); @@ -502,12 +502,17 @@ static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr Cloth *cloth = clmd->clothObject; if(!cloth) + { return; + } stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); fp = BKE_ptcache_id_fopen((ID *)ob, 'w', framenr, stack_index); - if(!fp) return; + if(!fp) + { + return; + } for(a = 0; a < cloth->numverts; a++) { @@ -554,10 +559,10 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) } fclose(fp); + + if(clmd->sim_parms->solver_type == 0) + implicit_set_positions(clmd); } - - if(clmd->sim_parms->solver_type == 0) - implicit_set_positions(clmd); return ret; } @@ -622,6 +627,8 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } } */ + + // printf("ct: %f, st: %f, r.cfra: %f, dt: %f\n", current_time, clmd->sim_parms->sim_time, ( float ) G.scene->r.cfra, deltaTime); // unused in the moment, calculated seperately in implicit.c clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; @@ -681,11 +688,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, cloth_write_cache(ob, clmd, framenr); } - else // just retrieve the cached frame - { - cloth_read_cache(ob, clmd, framenr); - } - + // Copy the result back to the object. cloth_to_object ( ob, clmd, vertexCos, numverts ); @@ -694,12 +697,14 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, } } - else if ( ( deltaTime <= 0.0f ) || ( deltaTime > 1.0f ) ) + else { if ( clmd->clothObject != NULL ) { if(cloth_read_cache(ob, clmd, framenr)) + { cloth_to_object ( ob, clmd, vertexCos, numverts ); + } } else { @@ -866,7 +871,7 @@ static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vert for ( i = 0; i < numverts; i++, verts++ ) { VECCOPY ( vertexCos[i], verts->x ); - Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* softbody is in global coords */ + Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* cloth is in global coords */ } } } @@ -921,9 +926,9 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if ( dvert->dw [j].weight >=SOFTGOALSNAP ) + if ( verts->goal >=SOFTGOALSNAP ) { - verts->flags |= CVERT_FLAG_PINNED; + verts->flags |= CLOTH_VERT_FLAG_PINNED; } // TODO enable mass painting here, for the moment i let "goals" go first @@ -1018,7 +1023,7 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh VECCOPY ( verts->impulse, tnull ); } - if ( !cloth_build_springs ( clmd->clothObject, dm ) ) + if ( !cloth_build_springs ( clmd, dm ) ) { cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); @@ -1042,11 +1047,11 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh case OB_LATTICE: printf ( "Not supported: OB_LATTICE\n" ); // lattice_to_softbody(ob); - return 1; + return 0; case OB_CURVE: case OB_SURF: printf ( "Not supported: OB_SURF| OB_CURVE\n" ); - return 1; + return 0; default: return 0; // TODO - we do not support changing meshes } @@ -1123,8 +1128,9 @@ int cloth_add_spring ( ClothModifierData *clmd, unsigned int indexA, unsigned in return 0; } -int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) +int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) { + Cloth *cloth = clmd->clothObject; ClothSpring *spring = NULL, *tspring = NULL, *tspring2 = NULL; unsigned int struct_springs = 0, shear_springs=0, bend_springs = 0; unsigned int i = 0; @@ -1169,6 +1175,7 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) spring->kl = medge[i].v2; VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); + clmd->coll_parms->avg_spring_len += spring->restlen; spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; struct_springs++; @@ -1181,6 +1188,8 @@ int cloth_build_springs ( Cloth *cloth, DerivedMesh *dm ) } } + clmd->coll_parms->avg_spring_len /= struct_springs; + // shear springs for ( i = 0; i < numfaces; i++ ) { diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 65b8f4169ff..9c5e3a1b9f2 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -89,7 +89,7 @@ typedef struct CollisionSettings short loop_count; /* How many iterations for the collision loop. */ struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ int flags; /* collision flags defined in BKE_cloth.h */ - int pad; + float avg_spring_len; /* for selfcollision */ } CollisionSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 4ac49a93119..8e691c30f94 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4937,6 +4937,8 @@ static void object_panel_cloth(Object *ob) block= uiNewBlock(&curarea->uiblocks, "object_cloth", UI_EMBOSS, UI_HELV, curarea->win); if(uiNewPanel(curarea, block, "Cloth ", "Physics", 640, 0, 318, 204)==0) return; uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + val = (clmd ? 1:0); but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Cloth", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to become cloth"); @@ -4977,12 +4979,10 @@ static void object_panel_cloth(Object *ob) /* GOAL STUFF */ uiBlockBeginAlign(block); - if(BLI_countlist (&ob->defbase) > 0) - { - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); - } - if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + + if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (BLI_countlist (&ob->defbase) > 0)) { if(ob->type==OB_MESH) { @@ -5013,13 +5013,9 @@ static void object_panel_cloth(Object *ob) MEM_freeN (clvg1); MEM_freeN (clvg2); } - else - { - uiDefButS(block, TOG, B_CLOTH_RENEW, "W", 140,70,20,20, &clmd->sim_parms->vgroup_mass, 0, 1, 0, 0, "Use control point weight values"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "Goal:", 160,70,150,20, &clmd->sim_parms->defgoal, 0.0, 1.0, 10, 0, "Default Goal (vertex target position) value, when no Vertex Group used"); - } uiDefButF(block, NUM, B_CLOTH_RENEW, "Pin Stiff:", 10,50,150,20, &clmd->sim_parms->goalspring, 0.0, 500.0, 10, 0, "Pin (vertex target position) spring stiffness"); + uiDefBut(block, LABEL, 0, " ", 160,50,150,20, NULL, 0.0, 0, 0, 0, ""); /* // nobody is changing these ones anyway uiDefButF(block, NUM, B_CLOTH_RENEW, "G Damp:", 160,50,150,20, &clmd->sim_parms->goalfrict , 0.0, 50.0, 10, 0, "Goal (vertex target position) friction"); @@ -5027,6 +5023,12 @@ static void object_panel_cloth(Object *ob) uiDefButF(block, NUM, B_CLOTH_RENEW, "G Max:", 160,30,150,20, &clmd->sim_parms->maxgoal, 0.0, 1.0, 10, 0, "Goal maximum, vertex group weights are scaled to match this range"); */ } + else if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + uiDefBut(block, LABEL, 0, " ", 160,70,150,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "No vertex group for pinning available.", 10,50,300,20, NULL, 0.0, 0, 0, 0, ""); + } + uiBlockEndAlign(block); /* @@ -5078,18 +5080,26 @@ static void object_panel_cloth_II(Object *ob) sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); */ - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); - - if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + if (!G.relbase_valid) { - uiDefBut(block, LABEL, 0, "Clear cache:", 10,100,90,20, NULL, 0.0, 0, 0, 0, ""); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 100, 100,100,20, NULL, 0.0, 0.0, 0, 0, "Free ALL cloth cache without preroll"); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 200, 100,110,20, NULL, 0.0, 0.0, 0, 0, "Free cloth cache starting from next frame"); - uiDefBut(block, LABEL, 0, " ", 10,80,300,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Cache deactivated until file is saved.", 10,120,300,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, " ", 10,100,300,40, NULL, 0.0, 0, 0, 0, ""); } else { - uiDefBut(block, LABEL, 0, " ", 10,100,300,40, NULL, 0.0, 0, 0, 0, ""); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + uiDefBut(block, LABEL, 0, "Clear cache:", 10,100,90,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 100, 100,100,20, NULL, 0.0, 0.0, 10, 0, "Free ALL cloth cache without preroll"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 200, 100,110,20, NULL, 0.0, 0.0, 10, 0, "Free cloth cache starting from next frame"); + uiDefBut(block, LABEL, 0, " ", 10,80,300,20, NULL, 0.0, 0, 0, 0, ""); + } + else + { + uiDefBut(block, LABEL, 0, " ", 10,100,300,40, NULL, 0.0, 0, 0, 0, ""); + } } /* diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index c8d2e3dad90..0069ac0f15e 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -5399,6 +5399,57 @@ void draw_object(Base *base, int flag) if(col) cpack(col); glDepthMask(GL_TRUE); } + + /* code for drawing pinned cloth verts */ + if(modifiers_isClothEnabled(ob)) + { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + Cloth *cloth = clmd->clothObject; + ClothVertex *verts; + float col[3], point[3]; + col[0] = 0.53; + col[1] = 0.04; + col[2] = 0.0; + glColor3fv(col); + + /* inverse matrix is not uptodate... */ + Mat4Invert ( ob->imat, ob->obmat ); + + if(cloth) + { + verts = cloth->verts; + + for(i = 0; i < cloth->numverts; i++) + { + if(verts[i].flags & CLOTH_VERT_FLAG_PINNED) + { + float size[3], cent[3]; + GLUquadricObj *qobj = gluNewQuadric(); + + gluQuadricDrawStyle(qobj, GLU_FILL); + + size[0]= clmd->coll_parms->avg_spring_len / 3.0; + size[1]= clmd->coll_parms->avg_spring_len / 3.0; + size[2]= clmd->coll_parms->avg_spring_len / 3.0; + + VECCOPY ( point, verts[i].x ); + Mat4MulVecfl ( ob->imat, point ); + + cent[0]= point[0]; + cent[1]= point[1]; + cent[2]= point[2]; + + glPushMatrix(); + glTranslatef(cent[0], cent[1], cent[2]); + glScalef(size[0], size[1], size[2]); + gluSphere(qobj, 1.0, 8, 5); + glPopMatrix(); + + gluDeleteQuadric(qobj); + } + } + } + } { bConstraint *con; From 4b1b749130258edd5a1bf0489d07e6e4138f3a9c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 23 Jan 2008 15:30:23 +0000 Subject: [PATCH 077/430] Enabled first + last simulation frame, hopefully fixed some cache problems, changed 3d view ball to a pushpin layout -feel free to enhance in drawobject.c line 5440 --- source/blender/blenkernel/intern/cloth.c | 147 ++++++++++------------ source/blender/makesdna/DNA_cloth_types.h | 2 + source/blender/src/buttons_object.c | 4 +- source/blender/src/drawobject.c | 75 ++++++----- 4 files changed, 117 insertions(+), 111 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index fb3617e16f0..4a0252b7fd7 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -160,6 +160,8 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->firstframe = 1; clmd->sim_parms->lastframe = 250; clmd->sim_parms->vgroup_mass = 0; + clmd->sim_parms->lastcachedframe = 0; + clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 10.0; clmd->coll_parms->loop_count = 1; @@ -483,46 +485,6 @@ DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) int modifiers_indexInObject(Object *ob, ModifierData *md_seek); -void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) -{ - int stack_index = -1; - - if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) - { - stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); - - BKE_ptcache_id_clear((ID *)ob, PTCACHE_CLEAR_AFTER, framenr, stack_index); - } -} -static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) -{ - FILE *fp = NULL; - int stack_index = -1; - unsigned int a; - Cloth *cloth = clmd->clothObject; - - if(!cloth) - { - return; - } - - stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); - - fp = BKE_ptcache_id_fopen((ID *)ob, 'w', framenr, stack_index); - if(!fp) - { - return; - } - - for(a = 0; a < cloth->numverts; a++) - { - fwrite(&cloth->verts[a].x, sizeof(float),3,fp); - fwrite(&cloth->verts[a].xconst, sizeof(float),3,fp); - fwrite(&cloth->verts[a].v, sizeof(float),3,fp); - } - - fclose(fp); -} static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) { FILE *fp = NULL; @@ -567,6 +529,55 @@ static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) return ret; } +void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) +{ + int stack_index = -1; + + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + BKE_ptcache_id_clear((ID *)ob, PTCACHE_CLEAR_AFTER, framenr, stack_index); + } + + if(framenr>0) + { + cloth_read_cache(ob, clmd, framenr); + } +} +static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) +{ + FILE *fp = NULL; + int stack_index = -1; + unsigned int a; + Cloth *cloth = clmd->clothObject; + + if(!cloth) + { + return; + } + + stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + fp = BKE_ptcache_id_fopen((ID *)ob, 'w', framenr, stack_index); + if(!fp) + { + return; + } + + for(a = 0; a < cloth->numverts; a++) + { + fwrite(&cloth->verts[a].x, sizeof(float),3,fp); + fwrite(&cloth->verts[a].xconst, sizeof(float),3,fp); + fwrite(&cloth->verts[a].v, sizeof(float),3,fp); + } + + clmd->sim_parms->lastcachedframe = MAX2(clmd->sim_parms->lastcachedframe, framenr); + + fclose(fp); +} + + /** * cloth_deform_verts - simulates one step, framenr is in frames. @@ -585,48 +596,24 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // only be active during a specific period: // that's "first frame" and "last frame" on GUI - /* - if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) ) + if ( current_time < clmd->sim_parms->firstframe ) { - if ( clmd->clothObject ) - { - if ( clmd->sim_parms->cache ) - { - if ( current_time < clmd->sim_parms->firstframe ) - { - int frametime = cloth_cache_first_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - return; - } - else if ( current_time > clmd->sim_parms->lastframe ) - { - int frametime = cloth_cache_last_frame ( clmd ); - if ( cloth_cache_search_frame ( clmd, frametime ) ) - { - cloth_cache_get_frame ( clmd, frametime ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - return; - } - else if ( ABS ( deltaTime ) >= 2.0f ) // no timewarps allowed - { - if ( cloth_cache_search_frame ( clmd, framenr ) ) - { - cloth_cache_get_frame ( clmd, framenr ); - cloth_to_object ( ob, clmd, vertexCos, numverts ); - } - clmd->sim_parms->sim_time = current_time; - return; - } - } - - } + return; + } + else if ( current_time > clmd->sim_parms->lastframe ) + { + int stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + if(BKE_ptcache_id_exist((ID *)ob, clmd->sim_parms->lastcachedframe, stack_index)) + { + if(cloth_read_cache(ob, clmd, framenr)) + { + // Copy the result back to the object. + cloth_to_object ( ob, clmd, vertexCos, numverts ); + } + } + return; } - */ // printf("ct: %f, st: %f, r.cfra: %f, dt: %f\n", current_time, clmd->sim_parms->sim_time, ( float ) G.scene->r.cfra, deltaTime); diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 9c5e3a1b9f2..661ad9547d5 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -76,6 +76,8 @@ typedef struct SimulationSettings int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ + int lastcachedframe; + int pad3; } SimulationSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 8e691c30f94..1d7a1972d36 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2295,7 +2295,7 @@ void do_object_panels(unsigned short event) CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - cloth_clear_cache(ob, clmd, 2); + cloth_clear_cache(ob, clmd, 1); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } @@ -2306,7 +2306,7 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - cloth_clear_cache(ob, clmd, MAX2(2.0,G.scene->r.cfra + 1.0)); + cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra + 1.0)); allqueue(REDRAWBUTSOBJECT, 0); } } diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 0069ac0f15e..a23ee559570 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -5406,7 +5406,7 @@ void draw_object(Base *base, int flag) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); Cloth *cloth = clmd->clothObject; ClothVertex *verts; - float col[3], point[3]; + float col[3]; col[0] = 0.53; col[1] = 0.04; col[2] = 0.0; @@ -5417,35 +5417,52 @@ void draw_object(Base *base, int flag) if(cloth) { - verts = cloth->verts; - - for(i = 0; i < cloth->numverts; i++) - { - if(verts[i].flags & CLOTH_VERT_FLAG_PINNED) + /* don't paint anything if cloth has RESET status */ + if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET)) + { + verts = cloth->verts; + + for(i = 0; i < cloth->numverts; i++) { - float size[3], cent[3]; - GLUquadricObj *qobj = gluNewQuadric(); - - gluQuadricDrawStyle(qobj, GLU_FILL); - - size[0]= clmd->coll_parms->avg_spring_len / 3.0; - size[1]= clmd->coll_parms->avg_spring_len / 3.0; - size[2]= clmd->coll_parms->avg_spring_len / 3.0; - - VECCOPY ( point, verts[i].x ); - Mat4MulVecfl ( ob->imat, point ); - - cent[0]= point[0]; - cent[1]= point[1]; - cent[2]= point[2]; - - glPushMatrix(); - glTranslatef(cent[0], cent[1], cent[2]); - glScalef(size[0], size[1], size[2]); - gluSphere(qobj, 1.0, 8, 5); - glPopMatrix(); - - gluDeleteQuadric(qobj); + if(verts[i].flags & CLOTH_VERT_FLAG_PINNED) + { + float size[3], cent[3]; + GLUquadricObj *qobj = gluNewQuadric(); + + gluQuadricDrawStyle(qobj, GLU_FILL); + + size[0]= clmd->coll_parms->avg_spring_len / 3.0; + size[1]= clmd->coll_parms->avg_spring_len / 3.0; + size[2]= clmd->coll_parms->avg_spring_len / 3.0; + + VECCOPY ( cent, verts[i].x ); + Mat4MulVecfl ( ob->imat, cent ); + + glPushMatrix(); + glTranslatef(cent[0], cent[1], cent[2]); + glScalef(size[0], size[1], size[2]); + + // gluSphere(qobj, 1.0, 8, 5); + glTranslatef(0, 0, 1.0); + gluDisk(qobj, 0, 0.4, 8, 5); + gluCylinder(qobj, 0.4, 0.4, 1.0, 8, 5); + + glTranslatef(0, 0, 1.0); + gluDisk(qobj, 0, 0.4, 8, 5); + + glTranslatef(0, 0, -2.0); + /* + col[0] = 0.53; + col[1] = 0.54; + col[2] = 0.0; + glColor3fv(col); + */ + gluCylinder(qobj, 0.0, 0.2, 1.0, 8, 5); + + glPopMatrix(); + + gluDeleteQuadric(qobj); + } } } } From 576a7f623c99a1df71bf4135dd44930c99d63150 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 23 Jan 2008 17:58:09 +0000 Subject: [PATCH 078/430] fix for collision modifier not reseted after first run + made the pushpin more like one --- source/blender/blenkernel/intern/cloth.c | 6 +++ source/blender/blenkernel/intern/modifier.c | 6 +++ source/blender/src/drawobject.c | 42 +++++++++++++++++---- 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4a0252b7fd7..df57440996a 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -621,6 +621,12 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; clmd->sim_parms->sim_time = current_time; + + /* check if cache is active / if file is already saved */ + if ((!G.relbase_valid) && ( deltaTime != 1.0f )) + { + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + } if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET) { diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 40b01fa3322..3ea4d4fb584 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5130,6 +5130,8 @@ static void collisionModifier_deformVerts( current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); + // printf("current_time %f, collmd->time %f\n", current_time, collmd->time); + if(current_time > collmd->time) { numverts = dm->getNumVerts ( dm ); @@ -5194,6 +5196,10 @@ static void collisionModifier_deformVerts( collmd->time = current_time; } + else + { + collmd->time = current_time; + } } if(dm) diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index a23ee559570..6696fd3cfe3 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -5421,7 +5421,13 @@ void draw_object(Base *base, int flag) if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET)) { verts = cloth->verts; - + /* + // this makes the screen pink + glEnable(GL_LIGHTING); + glEnable(GL_COLOR_MATERIAL); + glShadeModel(GL_SMOOTH); + */ + for(i = 0; i < cloth->numverts; i++) { if(verts[i].flags & CLOTH_VERT_FLAG_PINNED) @@ -5443,27 +5449,49 @@ void draw_object(Base *base, int flag) glScalef(size[0], size[1], size[2]); // gluSphere(qobj, 1.0, 8, 5); - glTranslatef(0, 0, 1.0); - gluDisk(qobj, 0, 0.4, 8, 5); - gluCylinder(qobj, 0.4, 0.4, 1.0, 8, 5); glTranslatef(0, 0, 1.0); - gluDisk(qobj, 0, 0.4, 8, 5); + gluDisk(qobj, 0, 0.25, 8, 5); - glTranslatef(0, 0, -2.0); + glTranslatef(0, 0, -1.0); + + glTranslatef(0, 0, 0.875); + gluCylinder(qobj, 0.15, 0.25, 0.125, 8, 5); + + glTranslatef(0, 0, -0.25); + gluCylinder(qobj, 0.15, 0.15, 0.25, 8, 5); + + glTranslatef(0, 0, -0.125); + gluCylinder(qobj, 0.25, 0.15, 0.125, 8, 5); + + // gluDisk(qobj, 0, 0.5, 8, 5); + + /* + glTranslatef(0, 0, 1.0); + gluDisk(qobj, 0, 0.4, 8, 5); + */ /* col[0] = 0.53; col[1] = 0.54; col[2] = 0.0; glColor3fv(col); */ - gluCylinder(qobj, 0.0, 0.2, 1.0, 8, 5); + glTranslatef(0, 0, -0.5); + gluCylinder(qobj, 0.0, 0.05, 0.5, 8, 5); + + glTranslatef(0, 0, 0.5); + gluDisk(qobj, 0, 0.25, 8, 5); glPopMatrix(); gluDeleteQuadric(qobj); } } + /* + glShadeModel(GL_FLAT); + glDisable(GL_COLOR_MATERIAL); + glDisable(GL_LIGHTING); + */ } } } From c5dc7c7b024b0136e385aabf846c086428daf4c0 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 24 Jan 2008 10:43:12 +0000 Subject: [PATCH 079/430] New: Editable cache. Fixed: Don't clear cache on e.g. lamp moving. Changed: Switched to another modifier type to be more flexible (allows tearing later) --- source/blender/blenkernel/BKE_cloth.h | 16 +- source/blender/blenkernel/intern/cloth.c | 315 ++++++++++---------- source/blender/blenkernel/intern/implicit.c | 45 +-- source/blender/blenkernel/intern/modifier.c | 43 ++- source/blender/src/buttons_object.c | 2 +- source/blender/src/editmesh.c | 105 ++++++- source/blender/src/transform_conversions.c | 2 +- source/blender/src/vpaint.c | 1 + 8 files changed, 305 insertions(+), 224 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 4e704098ebd..e3fdb9e0f25 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -160,16 +160,6 @@ typedef enum #define CLOTH_VERT_FLAG_PINNED 1 #define CLOTH_VERT_FLAG_COLLISION 2 - -// needed for buttons_object.c -void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr); - -// needed for cloth.c -void implicit_set_positions ( ClothModifierData *clmd ); - -// from cloth.c, needed for modifier.c -void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, float ( *vertexCos ) [3], int numverts ); - typedef void ( *CM_COLLISION_RESPONSE ) ( ClothModifierData *clmd, CollisionModifierData *collmd, CollisionTree *tree1, CollisionTree *tree2 ); @@ -193,6 +183,7 @@ int bvh_traverse ( ClothModifierData * clmd, CollisionModifierData * collmd, Col int implicit_init ( Object *ob, ClothModifierData *clmd ); int implicit_free ( ClothModifierData *clmd ); int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase *effectors ); +void implicit_set_positions ( ClothModifierData *clmd ); //////////////////////////////////////////////// @@ -204,13 +195,16 @@ int implicit_solver ( Object *ob, float frame, ClothModifierData *clmd, ListBase void cloth_free_modifier_extern (ClothModifierData *clmd); void cloth_free_modifier (Object *ob, ClothModifierData *clmd); void cloth_init (ClothModifierData *clmd); -void cloth_deform_verts (struct Object *ob, float framenr, float ( *vertexCos ) [3], int numVerts, void *derivedData, ClothModifierData *clmd); +DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc); void cloth_update_normals (ClothVertex *verts, int nVerts, MFace *face, int totface); // needed for collision.c void bvh_update_from_cloth(ClothModifierData *clmd, int moving); +// needed for editmesh.c +void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr); + //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index df57440996a..f22fd28d96e 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -121,9 +121,9 @@ static CM_SOLVER_DEF solvers [] = /* ********** cloth engine ******* */ /* Prototypes for internal functions. */ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ); +static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh *dm); static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ); +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ); static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); @@ -545,7 +545,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) cloth_read_cache(ob, clmd, framenr); } } -static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) +void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) { FILE *fp = NULL; int stack_index = -1; @@ -579,26 +579,46 @@ static void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr -/** -* cloth_deform_verts - simulates one step, framenr is in frames. -* -**/ -void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, - float ( *vertexCos ) [3], int numverts ) +/************************************************ + * clothModifier_do - main simulation function +************************************************/ +DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) + { unsigned int i; Cloth *cloth = clmd->clothObject; unsigned int framenr = ( float ) G.scene->r.cfra; float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); - ListBase *effectors = NULL; + ListBase *effectors = NULL; ClothVertex *verts = NULL; float deltaTime = current_time - clmd->sim_parms->sim_time; + unsigned int numverts = -1; + unsigned int numedges = -1; + unsigned int numfaces = -1; + MVert *mvert = NULL; + MEdge *medge = NULL; + MFace *mface = NULL; + DerivedMesh *result = NULL; + + result = CDDM_copy(dm); + + if(!result) + { + return dm; + } + + numverts = result->getNumVerts(result); + numedges = result->getNumEdges(result); + numfaces = result->getNumFaces(result); + mvert = CDDM_get_verts(result); + medge = CDDM_get_edges(result); + mface = CDDM_get_faces(result); // only be active during a specific period: // that's "first frame" and "last frame" on GUI if ( current_time < clmd->sim_parms->firstframe ) { - return; + return result; } else if ( current_time > clmd->sim_parms->lastframe ) { @@ -609,10 +629,10 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, if(cloth_read_cache(ob, clmd, framenr)) { // Copy the result back to the object. - cloth_to_object ( ob, clmd, vertexCos, numverts ); + cloth_to_object (ob, clmd, result); } } - return; + return result; } // printf("ct: %f, st: %f, r.cfra: %f, dt: %f\n", current_time, clmd->sim_parms->sim_time, ( float ) G.scene->r.cfra, deltaTime); @@ -639,11 +659,11 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, { cloth_clear_cache(ob, clmd, 0); - if ( !cloth_from_object ( ob, clmd, dm, vertexCos, numverts, framenr ) ) - return; + if ( !cloth_from_object ( ob, clmd, result, framenr ) ) + return result; if ( clmd->clothObject == NULL ) - return; + return result; cloth = clmd->clothObject; } @@ -665,7 +685,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, VECCOPY ( verts->txold, verts->x ); // Get the current position. - VECCOPY ( verts->xconst, vertexCos[i] ); + VECCOPY ( verts->xconst, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } @@ -679,14 +699,10 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); cloth_write_cache(ob, clmd, framenr); - } // Copy the result back to the object. - cloth_to_object ( ob, clmd, vertexCos, numverts ); - - // bvh_free(clmd->clothObject->tree); - // clmd->clothObject->tree = bvh_build(clmd, clmd->coll_parms->epsilon); + cloth_to_object (ob, clmd, result); } } @@ -696,7 +712,7 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, { if(cloth_read_cache(ob, clmd, framenr)) { - cloth_to_object ( ob, clmd, vertexCos, numverts ); + cloth_to_object (ob, clmd, result); } } else @@ -704,6 +720,8 @@ void clothModifier_do ( ClothModifierData *clmd, Object *ob, DerivedMesh *dm, cloth_clear_cache(ob, clmd, 0); } } + + return result; } @@ -783,59 +801,55 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) return; cloth = clmd->clothObject; - - if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) - { - if ( cloth ) - { - // If our solver provides a free function, call it - if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) - { - solvers [cloth->old_solver_type].free ( clmd ); - } - - // Free the verts. - if ( cloth->verts != NULL ) - MEM_freeN ( cloth->verts ); - - cloth->verts = NULL; - cloth->numverts = 0; - - // Free the springs. - if ( cloth->springs != NULL ) - { - LinkNode *search = cloth->springs; - while(search) - { - ClothSpring *spring = search->link; - - MEM_freeN ( spring ); - search = search->next; - } - BLI_linklist_free(cloth->springs, NULL); - - cloth->springs = NULL; - } - - cloth->springs = NULL; - cloth->numsprings = 0; - - // free BVH collision tree - if ( cloth->tree ) - bvh_free ( ( BVH * ) cloth->tree ); - - // we save our faces for collision objects - if ( cloth->mfaces ) - MEM_freeN ( cloth->mfaces ); - /* - if(clmd->clothObject->facemarks) - MEM_freeN(clmd->clothObject->facemarks); - */ - MEM_freeN ( cloth ); - clmd->clothObject = NULL; + + if ( cloth ) + { + // If our solver provides a free function, call it + if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) + { + solvers [cloth->old_solver_type].free ( clmd ); } + + // Free the verts. + if ( cloth->verts != NULL ) + MEM_freeN ( cloth->verts ); + + cloth->verts = NULL; + cloth->numverts = 0; + + // Free the springs. + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; + } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } + + cloth->springs = NULL; + cloth->numsprings = 0; + + // free BVH collision tree + if ( cloth->tree ) + bvh_free ( ( BVH * ) cloth->tree ); + + // we save our faces for collision objects + if ( cloth->mfaces ) + MEM_freeN ( cloth->mfaces ); + /* + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + */ + MEM_freeN ( cloth ); + clmd->clothObject = NULL; } - clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_RESET; } /****************************************************************************** @@ -847,24 +861,25 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) /** * cloth_to_object - copies the deformed vertices to the object. * -* This function is a modified version of the softbody.c:softbody_to_object() function. **/ -static void cloth_to_object ( Object *ob, ClothModifierData *clmd, float ( *vertexCos ) [3], unsigned int numverts ) +static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh *dm) { - ClothVertex *verts = NULL; unsigned int i = 0; + MVert *mvert = NULL; + unsigned int numverts; + Cloth *cloth = clmd->clothObject; - if ( clmd->clothObject ) - { - verts = clmd->clothObject->verts; - + if (clmd->clothObject) { /* inverse matrix is not uptodate... */ - Mat4Invert ( ob->imat, ob->obmat ); + Mat4Invert (ob->imat, ob->obmat); - for ( i = 0; i < numverts; i++, verts++ ) + mvert = CDDM_get_verts(dm); + numverts = dm->getNumVerts(dm); + + for (i = 0; i < numverts; i++) { - VECCOPY ( vertexCos[i], verts->x ); - Mat4MulVecfl ( ob->imat, vertexCos[i] ); /* cloth is in global coords */ + VECCOPY (mvert[i].co, cloth->verts[i].x); + Mat4MulVecfl (ob->imat, mvert[i].co); /* cloth is in global coords */ } } } @@ -948,20 +963,18 @@ float cloth_globallen ( float *v1,float *v2,Object *ob ) return VecLenf ( p1,p2 ); } -// only meshes supported at the moment -static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float ( *vertexCos ) [3], unsigned int numverts, float framenr ) +static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr) { unsigned int i = 0; - // dm->getNumVerts(dm); - MVert *mvert = NULL; // CDDM_get_verts(dm); + MVert *mvert = NULL; ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; - /* If we have a clothObject, free it. */ + // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) cloth_free_modifier ( ob, clmd ); - /* Allocate a new cloth object. */ + // Allocate a new cloth object. clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); if ( clmd->clothObject ) { @@ -974,88 +987,74 @@ static int cloth_from_object ( Object *ob, ClothModifierData *clmd, DerivedMesh return 0; } - switch ( ob->type ) + // mesh input objects need DerivedMesh + if ( !dm ) + return 0; + + cloth_from_mesh ( ob, clmd, dm ); + + if ( clmd->clothObject != NULL ) { - case OB_MESH: + // create springs + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; + + mvert = CDDM_get_verts ( dm ); + verts = clmd->clothObject->verts; - // mesh input objects need DerivedMesh - if ( !dm ) - return 0; + // set initial values + for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) + { + VECCOPY ( verts->x, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->x ); - cloth_from_mesh ( ob, clmd, dm ); + verts->mass = clmd->sim_parms->mass; - if ( clmd->clothObject != NULL ) - { - /* create springs */ - clmd->clothObject->springs = NULL; - clmd->clothObject->numsprings = -1; - - mvert = CDDM_get_verts ( dm ); - verts = clmd->clothObject->verts; + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal= clmd->sim_parms->defgoal; + else + verts->goal= 0.0f; - /* set initial values */ - for ( i = 0; i < numverts; i++, verts++ ) - { - VECCOPY ( verts->x, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->x ); + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->xconst, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VecMulf ( verts->v, 0.0f ); - verts->mass = clmd->sim_parms->mass; - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - verts->goal= clmd->sim_parms->defgoal; - else - verts->goal= 0.0f; - - verts->flags = 0; - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->xconst, verts->x ); - VECCOPY ( verts->txold, verts->x ); - VecMulf ( verts->v, 0.0f ); - - verts->impulse_count = 0; - VECCOPY ( verts->impulse, tnull ); - } - - if ( !cloth_build_springs ( clmd, dm ) ) - { - cloth_free_modifier ( ob, clmd ); - modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); - return 0; - } - - // apply / set vertex groups - if ( clmd->sim_parms->vgroup_mass > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass ); - - // init our solver - if ( solvers [clmd->sim_parms->solver_type].init ) - solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); - - clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); - - cloth_write_cache(ob, clmd, framenr-1); - } - - return 1; - case OB_LATTICE: - printf ( "Not supported: OB_LATTICE\n" ); - // lattice_to_softbody(ob); + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); + } + + if ( !cloth_build_springs ( clmd, dm ) ) + { + cloth_free_modifier ( ob, clmd ); + modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); return 0; - case OB_CURVE: - case OB_SURF: - printf ( "Not supported: OB_SURF| OB_CURVE\n" ); - return 0; - default: return 0; // TODO - we do not support changing meshes + } + + // apply / set vertex groups + if ( clmd->sim_parms->vgroup_mass > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass ); + + // init our solver + if ( solvers [clmd->sim_parms->solver_type].init ) + solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); + + clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); + + cloth_write_cache(ob, clmd, framenr-1); + + return 1; } - return 0; } + static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { unsigned int numverts = dm->getNumVerts ( dm ); unsigned int numfaces = dm->getNumFaces ( dm ); - MFace *mface = dm->getFaceArray ( dm ); + MFace *mface = CDDM_get_faces(dm); unsigned int i = 0; /* Allocate our vertices. diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 3f21bf2bfc5..69cc3b165c2 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -569,33 +569,35 @@ DO_INLINE void mul_bfmatrix_S(fmatrix3x3 *matrix, float scalar) /* SPARSE SYMMETRIC multiply big matrix with long vector*/ /* STATUS: verified */ -DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, float (*fLongVector)[3]) +DO_INLINE void mul_bfmatrix_lfvector( float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) { unsigned int i = 0; + lfVector *temp = create_lfvector(from[0].vcount); + zero_lfvector(to, from[0].vcount); - /* process diagonal elements */ - for(i = 0; i < from[0].vcount; i++) - { - muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - } - /* process off-diagonal entries (every off-diagonal entry needs to be symmetric) */ - // TODO: pragma below is wrong, correct it! - // #pragma omp parallel for shared(to,from, fLongVector) private(i) - for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) +#pragma omp parallel sections private(i) { - // muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); - - to[from[i].c][0] += INPR(from[i].m[0],fLongVector[from[i].r]); - to[from[i].c][1] += INPR(from[i].m[1],fLongVector[from[i].r]); - to[from[i].c][2] += INPR(from[i].m[2],fLongVector[from[i].r]); - - // muladd_fmatrix_fvector(to[from[i].r], from[i].m, fLongVector[from[i].c]); - - to[from[i].r][0] += INPR(from[i].m[0],fLongVector[from[i].c]); - to[from[i].r][1] += INPR(from[i].m[1],fLongVector[from[i].c]); - to[from[i].r][2] += INPR(from[i].m[2],fLongVector[from[i].c]); +#pragma omp section + { + for(i = from[0].vcount; i < from[0].vcount+from[0].scount; i++) + { + muladd_fmatrix_fvector(to[from[i].c], from[i].m, fLongVector[from[i].r]); + } + } +#pragma omp section + { + for(i = 0; i < from[0].vcount+from[0].scount; i++) + { + muladd_fmatrix_fvector(temp[from[i].r], from[i].m, fLongVector[from[i].c]); + } + } } + add_lfvector_lfvector(to, to, temp, from[0].vcount); + + del_lfvector(temp); + + } /* SPARSE SYMMETRIC multiply big matrix with long vector (for diagonal preconditioner) */ @@ -1088,7 +1090,6 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float bending_force[3] = {0,0,0}; float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; - Cloth *cloth = clmd->clothObject; VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 3ea4d4fb584..428c136a7fe 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4958,29 +4958,23 @@ static void clothModifier_initData(ModifierData *md) cloth_init (clmd); } -static void clothModifier_deformVerts( - ModifierData *md, Object *ob, DerivedMesh *derivedData, - float (*vertexCos)[3], int numVerts) +static DerivedMesh *clothModifier_applyModifier(ModifierData *md, Object *ob, + DerivedMesh *derivedData, int useRenderParams, int isFinalCalc) { - DerivedMesh *dm = NULL; + ClothModifierData *clmd = (ClothModifierData*) md; + DerivedMesh *result=NULL; + + /* check for alloc failing */ + if(!clmd->sim_parms || !clmd->coll_parms) + return derivedData; - /* if possible use/create DerivedMesh */ - - if(derivedData) dm = CDDM_copy(derivedData); - else if(ob->type==OB_MESH) dm = CDDM_from_mesh(ob->data, ob); - - if(dm) + result = clothModifier_do(clmd, ob, derivedData, useRenderParams, isFinalCalc); + + if(result) { - CDDM_apply_vert_coords(dm, vertexCos); - CDDM_calc_normals(dm); + return result; } - - /* TODO: check for sim_parms / coll_parms NOT NULL */ - - clothModifier_do((ClothModifierData *)md, ob, dm, vertexCos, numVerts); - - if(dm) - dm->release(dm); + return derivedData; } static void clothModifier_updateDepgraph( @@ -5035,8 +5029,6 @@ static int clothModifier_dependsOnTime(ModifierData *md) static void clothModifier_freeData(ModifierData *md) { ClothModifierData *clmd = (ClothModifierData*) md; - Object *ob = NULL; - ClothModifierData *clmd2 = NULL; if (clmd) { @@ -7017,10 +7009,10 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->deformVerts = softbodyModifier_deformVerts; mti = INIT_TYPE(Cloth); - mti->type = eModifierTypeType_OnlyDeform; + mti->type = eModifierTypeType_Nonconstructive; mti->initData = clothModifier_initData; - mti->flags = eModifierTypeFlag_AcceptsCVs; - // | eModifierTypeFlag_RequiresOriginalData; + mti->flags = eModifierTypeFlag_AcceptsMesh + | eModifierTypeFlag_RequiresOriginalData; // | eModifierTypeFlag_SupportsMapping // | eModifierTypeFlag_SupportsEditmode // | eModifierTypeFlag_EnableInEditmode; @@ -7028,7 +7020,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->freeData = clothModifier_freeData; mti->requiredDataMask = clothModifier_requiredDataMask; // mti->copyData = clothModifier_copyData; - mti->deformVerts = clothModifier_deformVerts; + // mti->deformVerts = clothModifier_deformVerts; + mti->applyModifier = clothModifier_applyModifier; mti->updateDepgraph = clothModifier_updateDepgraph; mti = INIT_TYPE(Collision); diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 1d7a1972d36..a064e266d6d 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -5087,7 +5087,7 @@ static void object_panel_cloth_II(Object *ob) } else { - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed"); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache & Enable Cache Editing", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed. This also enabled the cache beeing edited in editmode."); if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) { diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 8bd397b0da4..7b51d50ae7b 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -76,6 +76,7 @@ #include "BKE_modifier.h" #include "BKE_multires.h" #include "BKE_object.h" +#include "BKE_pointcache.h" #include "BKE_texture.h" #include "BKE_utildefines.h" @@ -804,7 +805,10 @@ void make_editMesh() EditFace *efa; EditEdge *eed; EditSelection *ese; - int tot, a, eekadoodle= 0; + int tot, a, eekadoodle= 0, cloth_enabled = 0; + ClothModifierData *clmd = NULL; + Cloth *cloth = NULL; + float temp[3]; #ifdef WITH_VERSE if(me->vnode){ @@ -839,10 +843,43 @@ void make_editMesh() /* make editverts */ CustomData_copy(&me->vdata, &em->vdata, CD_MASK_EDITMESH, CD_CALLOC, 0); mvert= me->mvert; + + /* lots of checks to be sure if we have nice cloth object */ + if(modifiers_isClothEnabled(G.obedit)) + { + clmd = (ClothModifierData *) modifiers_findByType(G.obedit, eModifierType_Cloth); + cloth = clmd->clothObject; + + /* just to be sure also check vertcount */ + /* also check if we have a protected cache */ + if(cloth && (tot == cloth->numverts) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + /* check if we have cache for this frame */ + int stack_index = modifiers_indexInObject(G.obedit, (ModifierData *)clmd); + + if(BKE_ptcache_id_exist((ID *)G.obedit, (float) G.scene->r.cfra, stack_index)) + { + cloth_enabled = 1; + + /* inverse matrix is not uptodate... */ + Mat4Invert ( G.obedit->imat, G.obedit->obmat ); + } + } + } evlist= (EditVert **)MEM_mallocN(tot*sizeof(void *),"evlist"); for(a=0; aco, NULL); + + if(cloth_enabled) + { + VECCOPY(temp, cloth->verts[a].x); + Mat4MulVecfl ( G.obedit->imat, temp ); + eve= addvertlist(temp, NULL); + + /* TODO: what about normals? */ + } + else + eve= addvertlist(mvert->co, NULL); evlist[a]= eve; // face select sets selection in next loop @@ -971,7 +1008,10 @@ void load_editMesh(void) EditEdge *eed; EditSelection *ese; float *fp, *newkey, *oldkey, nor[3]; - int i, a, ototvert, totedge=0; + int i, a, ototvert, totedge=0, cloth_enabled = 0; + ClothModifierData *clmd = NULL; + Cloth *cloth = NULL; + float temp[3], dt = 0.0; #ifdef WITH_VERSE if(em->vnode) { @@ -1038,9 +1078,52 @@ void load_editMesh(void) /* the vertices, use ->tmp.l as counter */ eve= em->verts.first; a= 0; - + + /* lots of checks to be sure if we have nice cloth object */ + if(modifiers_isClothEnabled(G.obedit)) + { + clmd = (ClothModifierData *) modifiers_findByType(G.obedit, eModifierType_Cloth); + cloth = clmd->clothObject; + + /* just to be sure also check vertcount */ + /* also check if we have a protected cache */ + if(cloth && (G.totvert == cloth->numverts) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + { + /* check if we have cache for this frame */ + int stack_index = modifiers_indexInObject(G.obedit, (ModifierData *)clmd); + + if(BKE_ptcache_id_exist((ID *)G.obedit, (float) G.scene->r.cfra, stack_index)) + { + cloth_enabled = 1; + + /* inverse matrix is not uptodate... */ + Mat4Invert ( G.obedit->imat, G.obedit->obmat ); + dt = 1.0f / clmd->sim_parms->stepsPerFrame; + } + } + } + + i=0; while(eve) { - VECCOPY(mvert->co, eve->co); + + if(cloth_enabled) + { + VECCOPY(temp, cloth->verts[i].x); + VECCOPY(cloth->verts[i].x, eve->co); + Mat4MulVecfl ( G.obedit->obmat, cloth->verts[i].x ); + /* + // not physical correct but gives nicer results when commented + VECSUB(temp, cloth->verts[i].x, temp); + VecMulf(temp, 1.0f / dt); + VECADD(cloth->verts[i].v, cloth->verts[i].v, temp); + */ + if(oldverts) { + VECCOPY(mvert->co, oldverts[i].co); + } + i++; + } + else + VECCOPY(mvert->co, eve->co); mvert->mat_nr= 255; /* what was this for, halos? */ /* vertex normal */ @@ -1068,6 +1151,10 @@ void load_editMesh(void) eve= eve->next; mvert++; } + + /* burn changes to cache */ + if(cloth_enabled) + cloth_write_cache(G.obedit, clmd, (float) G.scene->r.cfra); /* the edges */ a= 0; @@ -1330,7 +1417,13 @@ void load_editMesh(void) if(base->object->data==me) { if(modifiers_isClothEnabled(base->object)) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(base->object, eModifierType_Cloth); - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + + /* only reset cloth when no cache was used */ + if(!cloth_enabled) + { + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + } + } base->object->softflag |= OB_SB_REDO; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 882a16bb9ce..5d2e7cd7410 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -3404,7 +3404,7 @@ void special_aftertrans_update(TransInfo *t) ob= base->object; if (modifiers_isSoftbodyEnabled(ob)) ob->softflag |= OB_SB_REDO; - else if(modifiers_isClothEnabled(ob)) { + else if((ob == OBACT) && modifiers_isClothEnabled(ob)) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index dec15f96b8a..163b93468fe 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -1353,6 +1353,7 @@ void weight_paint(void) if(modifiers_isClothEnabled(ob)) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + printf("vpaint.c\n"); } BIF_undo_push("Weight Paint"); From e7f5d077810004467066d627f34d433a61e68fb2 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 25 Jan 2008 08:55:27 +0000 Subject: [PATCH 080/430] New: load cached data on file load; Fixed: Don't destroy cache on fileload, calculate normals correctly, don't reset all data when pressing partial free, making also cache free buttons available when cache is protected, duplicating cloth with shift-d should work properly now --- source/blender/blenkernel/BKE_cloth.h | 17 +++++++---- source/blender/blenkernel/intern/cloth.c | 29 ++++++++++++------- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/modifier.c | 26 ++++++++++++++--- source/blender/makesdna/DNA_cloth_types.h | 4 +-- source/blender/src/buttons_object.c | 32 +++++++-------------- 6 files changed, 64 insertions(+), 46 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index e3fdb9e0f25..4c017cfaf06 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -128,17 +128,19 @@ ClothSpring; /* These are the bits used in SimSettings.flags. */ typedef enum { - CLOTH_SIMSETTINGS_FLAG_RESET = ( 1 << 1 ), // The CM object requires a reinitializaiton. - CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ), // object is only collision object, no cloth simulation is done - CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled - CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ), // true if tearing is enabled + CLOTH_SIMSETTINGS_FLAG_RESET = ( 1 << 1 ), // The CM object requires a reinitializaiton. + CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done + CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled + CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled + CLOTH_SIMSETTINGS_FLAG_NEW = ( 1 << 6 ), // unsued, true if cloth was just enabled } CLOTH_SIMSETTINGS_FLAGS; -/* SPRING FLAGS */ +/* COLLISION FLAGS */ typedef enum { - CLOTH_COLLISIONSETTINGS_FLAG_ENABLED = ( 1 << 1 ), + CLOTH_COLLSETTINGS_FLAG_ENABLED = ( 1 << 1 ), /* enables cloth - object collisions */ + CLOTH_COLLSETTINGS_FLAG_SELF = ( 1 << 2 ), /* unused */ } CLOTH_COLLISIONSETTINGS_FLAGS; /* Spring types as defined in the paper.*/ @@ -205,6 +207,9 @@ void bvh_update_from_cloth(ClothModifierData *clmd, int moving); // needed for editmesh.c void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr); +// needed for button_object.c +void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr); + //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index f22fd28d96e..70c6857f14b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -153,7 +153,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->mass = 1.0f; clmd->sim_parms->stepsPerFrame = 5; clmd->sim_parms->sim_time = 1.0; - clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_NEW; clmd->sim_parms->solver_type = 0; clmd->sim_parms->preroll = 0; clmd->sim_parms->maxspringlen = 10; @@ -166,7 +166,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->coll_parms->friction = 10.0; clmd->coll_parms->loop_count = 1; clmd->coll_parms->epsilon = 0.01f; - clmd->coll_parms->flags = CLOTH_COLLISIONSETTINGS_FLAG_ENABLED; + clmd->coll_parms->flags = CLOTH_COLLSETTINGS_FLAG_ENABLED; /* These defaults are copied from softbody.c's * softbody_calc_forces() function. @@ -533,7 +533,8 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; - if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) + /* clear cache if specific frame cleaning requested or cache is not protected */ + if((!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) || (framenr > 1.0)) { stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); @@ -635,8 +636,6 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d return result; } - // printf("ct: %f, st: %f, r.cfra: %f, dt: %f\n", current_time, clmd->sim_parms->sim_time, ( float ) G.scene->r.cfra, deltaTime); - // unused in the moment, calculated seperately in implicit.c clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; @@ -659,6 +658,8 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { cloth_clear_cache(ob, clmd, 0); + // printf("v1: %d, v2: %d\n", numverts, clmd->clothObject->numverts); + if ( !cloth_from_object ( ob, clmd, result, framenr ) ) return result; @@ -718,6 +719,9 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d else { cloth_clear_cache(ob, clmd, 0); + + if ( !cloth_from_object ( ob, clmd, result, framenr ) ) + return result; } } @@ -743,9 +747,9 @@ void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) cloth_clear_cache ( ob, clmd, 0 ); // If our solver provides a free function, call it - if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) + if ( solvers [clmd->sim_parms->solver_type].free ) { - solvers [cloth->old_solver_type].free ( clmd ); + solvers [clmd->sim_parms->solver_type].free ( clmd ); } // Free the verts. @@ -805,9 +809,9 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) if ( cloth ) { // If our solver provides a free function, call it - if ( cloth->old_solver_type < 255 && solvers [cloth->old_solver_type].free ) + if ( solvers [clmd->sim_parms->solver_type].free ) { - solvers [cloth->old_solver_type].free ( clmd ); + solvers [clmd->sim_parms->solver_type].free ( clmd ); } // Free the verts. @@ -972,7 +976,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) + { cloth_free_modifier ( ob, clmd ); + } // Allocate a new cloth object. clmd->clothObject = MEM_callocN ( sizeof ( Cloth ), "cloth" ); @@ -1041,8 +1047,9 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); - - cloth_write_cache(ob, clmd, framenr-1); + + if(!cloth_read_cache(ob, clmd, framenr)) + cloth_write_cache(ob, clmd, framenr); return 1; } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 69cc3b165c2..557a664b5ea 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1389,7 +1389,7 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); - if(clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + if(clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { // collisions // itstart(); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index d18d5ae3fd0..a10210cbf3a 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4972,6 +4972,7 @@ static DerivedMesh *clothModifier_applyModifier(ModifierData *md, Object *ob, if(result) { + CDDM_calc_normals(result); return result; } return derivedData; @@ -5020,6 +5021,22 @@ CustomDataMask clothModifier_requiredDataMask(ModifierData *md) return dataMask; } +static void clothModifier_copyData(ModifierData *md, ModifierData *target) +{ + ClothModifierData *clmd = (ClothModifierData*) md; + ClothModifierData *tclmd = (ClothModifierData*) target; + + if(tclmd->sim_parms) + MEM_freeN(tclmd->sim_parms); + if(tclmd->coll_parms) + MEM_freeN(tclmd->coll_parms); + + tclmd->sim_parms = MEM_dupallocN(clmd->sim_parms); + tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms); + + tclmd->sim_parms->lastcachedframe = 0; +} + static int clothModifier_dependsOnTime(ModifierData *md) { @@ -5035,8 +5052,10 @@ static void clothModifier_freeData(ModifierData *md) cloth_free_modifier_extern (clmd); - MEM_freeN(clmd->sim_parms); - MEM_freeN(clmd->coll_parms); + if(clmd->sim_parms) + MEM_freeN(clmd->sim_parms); + if(clmd->coll_parms) + MEM_freeN(clmd->coll_parms); } } @@ -7033,8 +7052,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->dependsOnTime = clothModifier_dependsOnTime; mti->freeData = clothModifier_freeData; mti->requiredDataMask = clothModifier_requiredDataMask; - // mti->copyData = clothModifier_copyData; - // mti->deformVerts = clothModifier_deformVerts; + mti->copyData = clothModifier_copyData; mti->applyModifier = clothModifier_applyModifier; mti->updateDepgraph = clothModifier_updateDepgraph; diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 661ad9547d5..d24ee2f0eb8 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -69,7 +69,7 @@ typedef struct SimulationSettings float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ float sim_time_old; - struct LinkNode *cache; + struct LinkNode *cache; /* UNUSED atm */ float defgoal; int goalfrict; float goalspring; @@ -113,7 +113,7 @@ typedef struct Cloth unsigned int numverts; /* The number of verts == m * n. */ unsigned int numsprings; /* The count of springs. */ unsigned int numfaces; - unsigned char old_solver_type; + unsigned char old_solver_type; /* unused, only 1 solver here */ unsigned char pad2; short pad3; struct BVH *tree; /* collision tree for this cloth object */ diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 0b30f0b3cba..79dc890c462 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2320,7 +2320,8 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra + 1.0)); + cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra)); + // MAX2(1.0,G.scene->r.cfra + 1.0) allqueue(REDRAWBUTSOBJECT, 0); } } @@ -5071,18 +5072,12 @@ static void object_panel_cloth(Object *ob) uiBlockBeginAlign(block); uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff:", 10,170,150,20, &clmd->sim_parms->structural, 1.0, 10000.0, 100, 0, "Overall stiffness of structure"); uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff:", 160,170,150,20, &clmd->sim_parms->bending, 0.0, 10000.0, 1000, 0, "Wrinkle coefficient (higher = less smaller but more big wrinkles)"); - uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms->stepsPerFrame, 1.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); - uiBlockEndAlign(block); - uiBlockBeginAlign(block); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Quality:", 10,150,150,20, &clmd->sim_parms->stepsPerFrame, 4.0, 100.0, 5, 0, "Quality of the simulation (higher=better=slower)"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "Spring Damp:", 160,150,150,20, &clmd->sim_parms->Cdis, 0.0, 10.0, 10, 0, "Spring damping"); uiDefButF(block, NUM, B_DIFF, "Air Damp:", 10,130,150,20, &clmd->sim_parms->Cvi, 0.0, 10.0, 10, 0, "Air has normaly some thickness which slows falling things down"); - uiBlockEndAlign(block); - uiClearButLock(); - - uiBlockBeginAlign(block); uiDefBut(block, LABEL, 0, "Gravity:", 10,100,60,20, NULL, 0.0, 0, 0, 0, ""); - // uiClearButLock(); uiDefButF(block, NUM, B_CLOTH_RENEW, "X:", 70,100,80,20, &clmd->sim_parms->gravity[0], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); uiDefButF(block, NUM, B_CLOTH_RENEW, "Y:", 150,100,80,20, &clmd->sim_parms->gravity[1], -100.0, 100.0, 10, 0, "Apply gravitation to point movement"); @@ -5202,17 +5197,10 @@ static void object_panel_cloth_II(Object *ob) { uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT, REDRAWVIEW3D, "Protect Cache & Enable Cache Editing", 10,120,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Protect cache from automatic freeing when scene changed. This also enabled the cache beeing edited in editmode."); - if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) - { - uiDefBut(block, LABEL, 0, "Clear cache:", 10,100,90,20, NULL, 0.0, 0, 0, 0, ""); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 100, 100,100,20, NULL, 0.0, 0.0, 10, 0, "Free ALL cloth cache without preroll"); - uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 200, 100,110,20, NULL, 0.0, 0.0, 10, 0, "Free cloth cache starting from next frame"); - uiDefBut(block, LABEL, 0, " ", 10,80,300,20, NULL, 0.0, 0, 0, 0, ""); - } - else - { - uiDefBut(block, LABEL, 0, " ", 10,100,300,40, NULL, 0.0, 0, 0, 0, ""); - } + uiDefBut(block, LABEL, 0, "Clear cache:", 10,100,90,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEALL, "All", 100, 100,100,20, NULL, 0.0, 0.0, 10, 0, "Free ALL cloth cache without preroll"); + uiDefBut(block, BUT, B_CLOTH_CLEARCACHEFRAME, "From next frame", 200, 100,110,20, NULL, 0.0, 0.0, 10, 0, "Free cloth cache starting from next frame"); + uiDefBut(block, LABEL, 0, " ", 10,80,300,20, NULL, 0.0, 0, 0, 0, ""); } /* @@ -5222,8 +5210,8 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); */ - uiDefButBitI(block, TOG, CLOTH_COLLISIONSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); - if (clmd->coll_parms->flags & CLOTH_COLLISIONSETTINGS_FLAG_ENABLED) + uiDefButBitI(block, TOG, CLOTH_COLLSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); + if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); } From 589870100dc6734a20c99f572baeb2c401e6509f Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 25 Jan 2008 10:33:19 +0000 Subject: [PATCH 081/430] Fix: clear cache button works again even with protected cache, edited cache doesn't get saved to wrong frame anymore when moving frames forward in editmode --- source/blender/blenkernel/BKE_cloth.h | 2 ++ source/blender/blenkernel/intern/cloth.c | 14 +++++++++----- source/blender/blenkernel/intern/collision.c | 2 +- source/blender/makesdna/DNA_cloth_types.h | 2 +- source/blender/src/buttons_object.c | 5 +++++ source/blender/src/editmesh.c | 16 ++++++++++++++-- 6 files changed, 32 insertions(+), 9 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 4c017cfaf06..3a3d6612a23 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -134,6 +134,7 @@ typedef enum CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_NEW = ( 1 << 6 ), // unsued, true if cloth was just enabled + CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE = (1 << 7), /* force cache freeing */ } CLOTH_SIMSETTINGS_FLAGS; /* COLLISION FLAGS */ @@ -206,6 +207,7 @@ void bvh_update_from_cloth(ClothModifierData *clmd, int moving); // needed for editmesh.c void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr); +int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr); // needed for button_object.c void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 70c6857f14b..e1b97362e08 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -145,9 +145,9 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->gravity [0] = 0.0; clmd->sim_parms->gravity [1] = 0.0; clmd->sim_parms->gravity [2] = -9.81; - clmd->sim_parms->structural = 100.0; - clmd->sim_parms->shear = 100.0; - clmd->sim_parms->bending = 1.0; + clmd->sim_parms->structural = 200.0; + clmd->sim_parms->shear = 200.0; + clmd->sim_parms->bending = 0.1; clmd->sim_parms->Cdis = 5.0; clmd->sim_parms->Cvi = 1.0; clmd->sim_parms->mass = 1.0f; @@ -161,6 +161,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->lastframe = 250; clmd->sim_parms->vgroup_mass = 0; clmd->sim_parms->lastcachedframe = 0; + clmd->sim_parms->editedframe = 0; clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 10.0; @@ -485,7 +486,7 @@ DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) int modifiers_indexInObject(Object *ob, ModifierData *md_seek); -static int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) +int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) { FILE *fp = NULL; int stack_index = -1; @@ -534,7 +535,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) int stack_index = -1; /* clear cache if specific frame cleaning requested or cache is not protected */ - if((!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) || (framenr > 1.0)) + if((!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) || (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE)) { stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); @@ -545,6 +546,9 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { cloth_read_cache(ob, clmd, framenr); } + + /* delete cache free request */ + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; } void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) { diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 75201bbcea3..3d967655f70 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -694,7 +694,7 @@ void cloth_collision_static(ClothModifierData *clmd, CollisionModifierData *coll Normalize(collpair->normal); collpair->distance = distance; - BLI_linklist_append(&clmd->coll_parms->collision_list, collpair); + BLI_linklist_prepend(&clmd->coll_parms->collision_list, collpair); } else diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index d24ee2f0eb8..ab47d00d1b5 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -77,7 +77,7 @@ typedef struct SimulationSettings int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ int lastcachedframe; - int pad3; + int editedframe; /* which frame is in buffer */ } SimulationSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 79dc890c462..5ec89c6534e 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2306,6 +2306,9 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { + /* force freeing because user wants */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); @@ -2320,6 +2323,8 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { + /* force freeing because user wants */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra)); // MAX2(1.0,G.scene->r.cfra + 1.0) allqueue(REDRAWBUTSOBJECT, 0); diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 7b51d50ae7b..9c00d8b71bc 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -861,6 +861,8 @@ void make_editMesh() { cloth_enabled = 1; + clmd->sim_parms->editedframe = (float) G.scene->r.cfra; + /* inverse matrix is not uptodate... */ Mat4Invert ( G.obedit->imat, G.obedit->obmat ); } @@ -1092,7 +1094,7 @@ void load_editMesh(void) /* check if we have cache for this frame */ int stack_index = modifiers_indexInObject(G.obedit, (ModifierData *)clmd); - if(BKE_ptcache_id_exist((ID *)G.obedit, (float) G.scene->r.cfra, stack_index)) + if(BKE_ptcache_id_exist((ID *)G.obedit, clmd->sim_parms->editedframe, stack_index)) { cloth_enabled = 1; @@ -1108,9 +1110,11 @@ void load_editMesh(void) if(cloth_enabled) { + VECCOPY(temp, cloth->verts[i].x); VECCOPY(cloth->verts[i].x, eve->co); Mat4MulVecfl ( G.obedit->obmat, cloth->verts[i].x ); + /* // not physical correct but gives nicer results when commented VECSUB(temp, cloth->verts[i].x, temp); @@ -1154,7 +1158,15 @@ void load_editMesh(void) /* burn changes to cache */ if(cloth_enabled) - cloth_write_cache(G.obedit, clmd, (float) G.scene->r.cfra); + { + cloth_write_cache(G.obedit, clmd, clmd->sim_parms->editedframe); + + /* in this case we have to get the data for the requested frame */ + if(clmd->sim_parms->editedframe != (float) G.scene->r.cfra) + { + cloth_read_cache(G.obedit, clmd, (float) G.scene->r.cfra); + } + } /* the edges */ a= 0; From a01a606b1fdc2f855d84f855033116cc2ff5191d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 25 Jan 2008 16:14:54 +0000 Subject: [PATCH 082/430] Weekend commit -> New: 3rd tab for advanced users mit many things to play with. Fixed: Free modifier correctly when deactivating cloth on panel, be carefull: could eventually put weird values on the GUI due to changed DNA --- source/blender/blenkernel/BKE_cloth.h | 7 +- source/blender/blenkernel/intern/cloth.c | 90 ++++++++---- source/blender/blenkernel/intern/collision.c | 5 +- source/blender/blenkernel/intern/implicit.c | 13 +- source/blender/makesdna/DNA_cloth_types.h | 20 +-- source/blender/src/buttons_object.c | 140 ++++++++++++++++--- source/blender/src/vpaint.c | 1 - 7 files changed, 216 insertions(+), 60 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 3a3d6612a23..5bcd40c5905 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -80,7 +80,10 @@ typedef struct ClothVertex float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ unsigned int impulse_count; /* same as above */ - float avg_spring_len; /* average length of connected springs, UNUSED ATM */ + float avg_spring_len; /* average length of connected springs, UNUSED ATM */ + float struct_stiff; + float bend_stiff; + float shear_stiff; } ClothVertex; @@ -99,6 +102,7 @@ typedef struct ClothSpring float dfdx[3][3]; float dfdv[3][3]; float f[3]; + float stiffness; /* stiffness factor from the vertex groups */ } ClothSpring; @@ -135,6 +139,7 @@ typedef enum CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_NEW = ( 1 << 6 ), // unsued, true if cloth was just enabled CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE = (1 << 7), /* force cache freeing */ + CLOTH_SIMSETTINGS_FLAG_SCALING = (1 << 8), /* is advanced scaling active? */ } CLOTH_SIMSETTINGS_FLAGS; /* COLLISION FLAGS */ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index e1b97362e08..8ffb7ef2d19 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -125,7 +125,7 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh * static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ); -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ); +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup, int mode ); /****************************************************************************** @@ -162,10 +162,11 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->vgroup_mass = 0; clmd->sim_parms->lastcachedframe = 0; clmd->sim_parms->editedframe = 0; + clmd->sim_parms->autoprotect = 10; clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 10.0; - clmd->coll_parms->loop_count = 1; + clmd->coll_parms->loop_count = 5; clmd->coll_parms->epsilon = 0.01f; clmd->coll_parms->flags = CLOTH_COLLSETTINGS_FLAG_ENABLED; @@ -482,8 +483,6 @@ DerivedMesh *CDDM_create_tearing ( ClothModifierData *clmd, DerivedMesh *dm ) return result; } - - int modifiers_indexInObject(Object *ob, ModifierData *md_seek); int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) @@ -522,10 +521,10 @@ int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) } fclose(fp); - - if(clmd->sim_parms->solver_type == 0) - implicit_set_positions(clmd); } + + if(clmd->sim_parms->solver_type == 0) + implicit_set_positions(clmd); return ret; } @@ -655,6 +654,14 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { cloth_free_modifier (ob, clmd); } + + // sanity check for correctness of GUI values + if(clmd->sim_parms->max_structsim_parms->structural) + clmd->sim_parms->max_struct=clmd->sim_parms->structural; + if(clmd->sim_parms->max_bendsim_parms->bending) + clmd->sim_parms->max_struct=clmd->sim_parms->bending; + if(clmd->sim_parms->max_shearsim_parms->shear) + clmd->sim_parms->max_shear=clmd->sim_parms->shear; if ( deltaTime == 1.0f ) { @@ -693,7 +700,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d VECCOPY ( verts->xconst, mvert[i].co ); Mat4MulVecfl ( ob->obmat, verts->xconst ); } - + tstart(); // Call the solver. @@ -704,6 +711,10 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); cloth_write_cache(ob, clmd, framenr); + + // check for autoprotection + if(framenr >= clmd->sim_parms->autoprotect) + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; } // Copy the result back to the object. @@ -897,7 +908,8 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh * * cloth_apply_vgroup - applies a vertex group as specified by type * **/ -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup ) +/* can be optimized to do all groups in one loop */ +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup, int mode ) { unsigned int i = 0; unsigned int j = 0; @@ -922,7 +934,7 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short for ( i = 0; i < numverts; i++, verts++ ) { // LATER ON, support also mass painting here - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )||(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)) { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) @@ -931,25 +943,37 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { if ( dvert->dw[j].def_nr == vgroup ) { - verts->goal = dvert->dw [j].weight; - - goalfac= 1.0f; - - /* - // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); - */ - - verts->goal = ( float ) pow ( verts->goal , 4.0f ); - - if ( verts->goal >=SOFTGOALSNAP ) + if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { - verts->flags |= CLOTH_VERT_FLAG_PINNED; + verts->goal = dvert->dw [j].weight; + goalfac= 1.0f; + + /* + // Kicking goal factor to simplify things...who uses that anyway? + // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + */ + + verts->goal = ( float ) pow ( verts->goal , 4.0f ); + if ( verts->goal >=SOFTGOALSNAP ) + verts->flags |= CLOTH_VERT_FLAG_PINNED; + + break; + } + + if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) + { + if(mode==2) + { + verts->struct_stiff = dvert->dw [j].weight; + verts->shear_stiff = dvert->dw [j].weight; + } + else if(mode==1) + { + verts->bend_stiff = dvert->dw [j].weight; + } + break; } - // TODO enable mass painting here, for the moment i let "goals" go first - - break; } } } @@ -1044,7 +1068,15 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // apply / set vertex groups if ( clmd->sim_parms->vgroup_mass > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass ); + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass, 0 ); + + // apply / set vertex groups + if ( clmd->sim_parms->vgroup_bend > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_bend, 1 ); + + // apply / set vertex groups + if ( clmd->sim_parms->vgroup_struct > 0 ) + cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_struct, 2 ); // init our solver if ( solvers [clmd->sim_parms->solver_type].init ) @@ -1181,6 +1213,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) clmd->coll_parms->avg_spring_len += spring->restlen; spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; + spring->stiffness = (cloth->verts[spring->kl].struct_stiff + cloth->verts[spring->ij].struct_stiff) / 2.0; struct_springs++; if(!i) @@ -1203,6 +1236,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; + spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0; BLI_linklist_append ( &edgelist[spring->ij], spring ); BLI_linklist_append ( &edgelist[spring->kl], spring ); @@ -1220,6 +1254,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_SHEAR; + spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0; BLI_linklist_append ( &edgelist[spring->ij], spring ); BLI_linklist_append ( &edgelist[spring->kl], spring ); @@ -1257,6 +1292,7 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) VECSUB ( temp, cloth->verts[index2].x, cloth->verts[tspring2->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); spring->type = CLOTH_SPRING_TYPE_BENDING; + spring->stiffness = (cloth->verts[spring->kl].bend_stiff + cloth->verts[spring->ij].bend_stiff) / 2.0; BLI_edgehash_insert ( edgehash, spring->ij, index2, NULL ); bend_springs++; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 3d967655f70..1ce19e878fa 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -978,9 +978,6 @@ void cloth_collision_moving(ClothModifierData *clmd, ClothModifierData *coll_clm cloth_collision_moving_tris(coll_clmd, clmd, tree2, tree1); } -// CLOTH_MAX_THRESHOLD defines how much collision rounds/loops should be taken -#define CLOTH_MAX_THRESHOLD 10 - // cloth - object collisions int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) { @@ -1092,7 +1089,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } rounds++; } - while(result && (CLOTH_MAX_THRESHOLD>rounds)); + while(result && (clmd->coll_parms->loop_count>rounds)); //////////////////////////////////////////////////////////// // update positions diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 557a664b5ea..7ea48d6629b 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1091,6 +1091,8 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, float damping_force[3] = {0,0,0}; float nulldfdx[3][3]={ {0,0,0}, {0,0,0}, {0,0,0}}; + float scaling = 0.0; + VECCOPY(s->f, nullf); cp_fmatrix(s->dfdx, nulldfdx); cp_fmatrix(s->dfdv, nulldfdx); @@ -1122,15 +1124,17 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, mul_fvector_S(dir, extent, 0.0f); } - // calculate force of structural + shear springs if(s->type != CLOTH_SPRING_TYPE_BENDING) { if(length > L) // only on elonglation { s->flags |= CLOTH_SPRING_FLAG_NEEDED; - - k = clmd->sim_parms->structural; + + k = clmd->sim_parms->structural; + + scaling = k + s->stiffness * (clmd->sim_parms->max_struct-k); + k = scaling; mul_fvector_S(stretch_force, dir, (k*(length-L))); @@ -1152,6 +1156,9 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, s->flags |= CLOTH_SPRING_FLAG_NEEDED; k = clmd->sim_parms->bending; + + scaling = k + s->stiffness * (clmd->sim_parms->max_bend-k); + cb = k = scaling; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); VECADD(s->f, s->f, bending_force); diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index ab47d00d1b5..93aa09db349 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -47,24 +47,24 @@ **/ typedef struct SimulationSettings { - short vgroup_mass; /* optional vertexgroup name for assigning weight. */ - short pad; + short vgroup_mass; /* optional vertexgroup name for assigning weight.*/ + short vgroup_struct; /* vertex group for scaling structural stiffness */ float mingoal; /* see SB */ int preroll; /* How many frames of simulation to do before we start. */ float Cdis; /* Mechanical damping of springs. */ float Cvi; /* Viscous/fluid damping. */ - int stepsPerFrame; /* Number of time steps per frame. */ - float gravity [3]; /* Gravity/external force vector. */ + int stepsPerFrame; /* Number of time steps per frame. */ + float gravity [3]; /* Gravity/external force vector. */ float ufluid [3]; /* Velocity vector of the fluid. */ - float dt; /* This is the duration of our time step, computed. */ + float dt; /* This is the duration of our time step, computed. */ float mass; /* The mass of the entire cloth. */ float structural; /* Structural spring stiffness. */ float shear; /* Shear spring stiffness. */ float bending; /* Flexion spring stiffness. */ float sim_time; int flags; /* flags, see CSIMSETT_FLAGS enum above. */ - short solver_type; /* which solver should be used? txold */ - short pad2; + short solver_type; /* which solver should be used? txold */ + short vgroup_bend; /* vertex group for scaling bending stiffness */ float maxgoal; /* see SB */ float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ @@ -77,7 +77,11 @@ typedef struct SimulationSettings int lastframe; /* frame on which simulation stops */ int firstframe; /* frame on which simulation starts */ int lastcachedframe; - int editedframe; /* which frame is in buffer */ + int editedframe; /* which frame is in buffer */ + int autoprotect; /* starting from this frame, cache gets protected */ + float max_bend; /* max bending scaling value, min is "bending" */ + float max_struct; /* max structural scaling value, min is "structural" */ + float max_shear; /* max shear scaling value, UNUSED */ } SimulationSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 5ec89c6534e..7b87dd2108c 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2325,6 +2325,7 @@ void do_object_panels(unsigned short event) { /* force freeing because user wants */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra)); // MAX2(1.0,G.scene->r.cfra + 1.0) allqueue(REDRAWBUTSOBJECT, 0); @@ -5036,13 +5037,31 @@ static void object_cloth__enabletoggle(void *ob_v, void *arg2) if (!md) { md = modifier_new(eModifierType_Cloth); BLI_addhead(&ob->modifiers, md); + + allqueue(REDRAWBUTSEDIT, 0); } else { - BLI_remlink(&ob->modifiers, md); - modifier_free(md); - } + Object *ob = ob_v; + ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth); + + if (!md) + return; - allqueue(REDRAWBUTSEDIT, 0); + BLI_remlink(&ob->modifiers, md); + + modifier_free(md); + + BIF_undo_push("Del modifier"); + + ob->softflag |= OB_SB_RESET; + allqueue(REDRAWBUTSEDIT, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWIMAGE, 0); + allqueue(REDRAWOOPS, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + object_handle_update(ob); + countall(); + } } @@ -5068,7 +5087,7 @@ static void object_panel_cloth(Object *ob) { int defCount; char *clvg1, *clvg2; - char clmvg [] = "Weight Paint Groups%t|"; + char clmvg [] = "Vertex Groups%t|"; val2=0; @@ -5177,22 +5196,12 @@ static void object_panel_cloth_II(Object *ob) clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) - { - // char str[128]; - + { uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); uiDefBut(block, LABEL, 0, "",10,140,300,20, NULL, 0.0, 0, 0, 0, ""); - /* correct spelling if only 1 frame cacheed --> only gimmick */ - /* - if(length-clmd->sim_parms->preroll>1) - sprintf (str, "Frame 1 - %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); - else - sprintf (str, "Frame %d cached. [%d in preroll, %d in total]", length-clmd->sim_parms->preroll, clmd->sim_parms->preroll, length); - */ - if (!G.relbase_valid) { uiDefBut(block, LABEL, 0, "Cache deactivated until file is saved.", 10,120,300,20, NULL, 0.0, 0, 0, 0, ""); @@ -5209,6 +5218,7 @@ static void object_panel_cloth_II(Object *ob) } /* + TODO: implement this again in cloth! if(length>1) // B_CLOTH_CHANGEPREROLL uiDefButI(block, NUM, B_CLOTH_CHANGEPREROLL, "Preroll:", 10,80,145,20, &clmd->sim_parms->preroll, 0, length-1, 1, 0, "Simulation starts on this frame"); else @@ -5219,6 +5229,7 @@ static void object_panel_cloth_II(Object *ob) if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); + uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Collision Quality:", 10,40,300,20, &clmd->coll_parms->loop_count, 1.0, 100.0, 1.0, 0, "How many collision iterations should be done. (higher = better = slower), je be changed for each frame"); } else uiDefBut(block, LABEL, 0, "",160,60,150,20, NULL, 0.0, 0, 0, 0, ""); @@ -5228,6 +5239,102 @@ static void object_panel_cloth_II(Object *ob) } +static void object_panel_cloth_III(Object *ob) +{ + uiBlock *block; + ClothModifierData *clmd = NULL; + + block= uiNewBlock(&curarea->uiblocks, "object_cloth_III", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Cloth ", "Physics"); + if(uiNewPanel(curarea, block, "Cloth Advanced", "Physics", 651, 0, 318, 204)==0) return; + + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); + + if(clmd) + { + int defCount; + char *clvg1, *clvg2; + char clmvg [] = "Vertex Groups%t|None%x0|"; + char clmvg2 [] = "Vertex Groups%t|None%x0|"; + + uiDefButI(block, NUM, B_DIFF, "Autoprotect Cache From:",10,160,300,20, &clmd->sim_parms->autoprotect, 0, MAXFRAME, 1, 0, "Frame on which the simulation gets cache protection enabled automatically (To prevent accidently cleaning it)."); + + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_SCALING, REDRAWVIEW3D, "Enable stiffness scaling",10,130,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "If enabled, stiffness can be scaled along a weight painted vertex group."); + + if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)&& (BLI_countlist (&ob->defbase) > 0)) + { + uiDefBut(block, LABEL, 0, "StructStiff VGroup:",10,110,150,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "BendStiff VGroup:",160,110,150,20, NULL, 0.0, 0, 0, 0, ""); + + defCount = sizeof (clmvg); + clvg1 = get_vertexgroup_menustr (ob); + clvg2 = MEM_callocN (strlen (clvg1) + 1 + defCount, "clothVgST"); + if (! clvg2) { + printf ("draw_modifier: error allocating memory for cloth vertex group menu string.\n"); + return; + } + defCount = BLI_countlist (&ob->defbase); + if (defCount == 0) + { + clmd->sim_parms->vgroup_struct = 0; + } + else + { + if(clmd->sim_parms->vgroup_struct > defCount) + clmd->sim_parms->vgroup_struct = 0; + } + + sprintf (clvg2, "%s%s", clmvg, clvg1); + + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 10,90,150,20, &clmd->sim_parms->vgroup_struct, 0, defCount, 0, 0, "Browses available vertex groups"); + MEM_freeN (clvg1); + MEM_freeN (clvg2); + + defCount = sizeof (clmvg); + clvg1 = get_vertexgroup_menustr (ob); + clvg2 = MEM_callocN (strlen (clvg1) + 1 + defCount, "clothVgBD"); + if (! clvg2) { + printf ("draw_modifier: error allocating memory for cloth vertex group menu string.\n"); + return; + } + defCount = BLI_countlist (&ob->defbase); + if (defCount == 0) + { + clmd->sim_parms->vgroup_bend = 0; + } + else + { + if(clmd->sim_parms->vgroup_bend > defCount) + clmd->sim_parms->vgroup_bend = 0; + } + + sprintf (clvg2, "%s%s", clmvg2, clvg1); + + uiDefButS(block, MENU, B_CLOTH_RENEW, clvg2, 160,90,150,20, &clmd->sim_parms->vgroup_bend, 0, defCount, 0, 0, "Browses available vertex groups"); + MEM_freeN (clvg1); + MEM_freeN (clvg2); + + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff Max:",10,70,150,20, &clmd->sim_parms->max_struct, clmd->sim_parms->structural, 1000.0, 0.01f, 0, "Maximum structural stiffness value"); + + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff Max:",160,70,150,20, &clmd->sim_parms->max_bend, clmd->sim_parms->bending, 1000.0, 0.01f, 0, "Maximum bending stiffness value"); + + } + else if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING) + { + uiDefBut(block, LABEL, 0, " ", 10,110,300,20, NULL, 0.0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "No vertex group for pinning available.", 10,90,300,20, NULL, 0.0, 0, 0, 0, ""); + } + + + + } + + uiBlockEndAlign(block); + +} + void object_panels() { Object *ob; @@ -5259,6 +5366,7 @@ void physics_panels() object_softbodies_solver(ob); object_panel_cloth(ob); object_panel_cloth_II(ob); + object_panel_cloth_III(ob); object_panel_fluidsim(ob); } } diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 163b93468fe..dec15f96b8a 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -1353,7 +1353,6 @@ void weight_paint(void) if(modifiers_isClothEnabled(ob)) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; - printf("vpaint.c\n"); } BIF_undo_push("Weight Paint"); From a1a9e011b8d1f545a5db3144b22b48a7a4df2786 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 25 Jan 2008 21:47:43 +0000 Subject: [PATCH 083/430] untested fixes for vgroups --- source/blender/blenkernel/intern/cloth.c | 32 +++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 8ffb7ef2d19..b5bd1c68dda 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -945,19 +945,22 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { - verts->goal = dvert->dw [j].weight; - goalfac= 1.0f; - - /* - // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); - */ - - verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if ( verts->goal >=SOFTGOALSNAP ) - verts->flags |= CLOTH_VERT_FLAG_PINNED; - - break; + if(mode==0) + { + verts->goal = dvert->dw [j].weight; + goalfac= 1.0f; + + /* + // Kicking goal factor to simplify things...who uses that anyway? + // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + */ + + verts->goal = ( float ) pow ( verts->goal , 4.0f ); + if ( verts->goal >=SOFTGOALSNAP ) + verts->flags |= CLOTH_VERT_FLAG_PINNED; + + break; + } } if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) @@ -966,12 +969,13 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short { verts->struct_stiff = dvert->dw [j].weight; verts->shear_stiff = dvert->dw [j].weight; + break; } else if(mode==1) { verts->bend_stiff = dvert->dw [j].weight; + break; } - break; } } From 9c1fa1ff4d5d5d21170d7a56c00abc6476b85dda Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 29 Jan 2008 02:24:37 +0000 Subject: [PATCH 084/430] WIP commit, many debug outputs, extensive log comes after bug is killed --- source/blender/blenkernel/BKE_cloth.h | 6 +- source/blender/blenkernel/CMakeLists.txt | 2 +- source/blender/blenkernel/intern/cloth.c | 522 +++++++++++-------- source/blender/blenkernel/intern/collision.c | 88 ++-- source/blender/blenkernel/intern/modifier.c | 3 + source/blender/src/buttons_editing.c | 2 +- source/blender/src/buttons_object.c | 39 +- source/blender/src/editmesh.c | 38 +- 8 files changed, 391 insertions(+), 309 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 5bcd40c5905..1a3feed0a0c 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -62,9 +62,7 @@ struct CollisionTree; #define CLOTH_MAX_THREAD 2 /** - * Pin and unpin frames are the frames on which the vertices stop moving. - * They will assume the position they had prior to pinFrame until unpinFrame - * is reached. + * The definition of a cloth vertex. */ typedef struct ClothVertex { @@ -87,7 +85,6 @@ typedef struct ClothVertex } ClothVertex; - /** * The definition of a spring. */ @@ -106,7 +103,6 @@ typedef struct ClothSpring } ClothSpring; - /* goal defines */ #define SOFTGOALSNAP 0.999f diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 0b87f0c1d98..30f21ef83cc 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -34,7 +34,7 @@ SET(INC ../python ../render/extern/include ../../../intern/decimation/extern ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern ../../../intern/iksolver/extern ../blenloader ../quicktime - ../../../intern/bmfont + ../../../intern/bmfont ../../../extern/bullet2/src ../nodes ${SDL_INC} ${ZLIB_INC} diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index b5bd1c68dda..0870bf2efa3 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -125,7 +125,7 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh * static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ); static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *dm, float framenr); int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ); -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup, int mode ); +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm ); /****************************************************************************** @@ -162,12 +162,12 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->vgroup_mass = 0; clmd->sim_parms->lastcachedframe = 0; clmd->sim_parms->editedframe = 0; - clmd->sim_parms->autoprotect = 10; + clmd->sim_parms->autoprotect = 25; clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 10.0; - clmd->coll_parms->loop_count = 5; - clmd->coll_parms->epsilon = 0.01f; + clmd->coll_parms->loop_count = 3; + clmd->coll_parms->epsilon = 0.015f; clmd->coll_parms->flags = CLOTH_COLLSETTINGS_FLAG_ENABLED; /* These defaults are copied from softbody.c's @@ -182,8 +182,6 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->defgoal = 0.0f; clmd->sim_parms->goalspring = 100.0f; clmd->sim_parms->goalfrict = 0.0f; - - clmd->sim_parms->cache = NULL; } @@ -521,17 +519,38 @@ int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) } fclose(fp); + + /* + // belongs to another location ?!? + if((clmd->sim_parms->solver_type == 0) && (ret!=0)) + { + implicit_set_positions(clmd); + } + */ + + if(clmd->sim_parms->lastcachedframe < framenr) + { + printf("cloth_read_cache problem: lnex - f#: %f, lastCF: %d\n", framenr, clmd->sim_parms->lastcachedframe); + } } - if(clmd->sim_parms->solver_type == 0) - implicit_set_positions(clmd); - + printf("cloth_read_cache: %f\n", framenr); + return ret; } void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; + printf("cloth_clear_cache: %f\n", framenr); + + /* + // belongs to another location ?!? + if(framenr>0) + { + cloth_read_cache(ob, clmd, framenr); + } + */ /* clear cache if specific frame cleaning requested or cache is not protected */ if((!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) || (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE)) @@ -541,13 +560,13 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) BKE_ptcache_id_clear((ID *)ob, PTCACHE_CLEAR_AFTER, framenr, stack_index); } - if(framenr>0) - { - cloth_read_cache(ob, clmd, framenr); - } + /* update last cached frame # */ + clmd->sim_parms->lastcachedframe = framenr; /* delete cache free request */ clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + + } void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) { @@ -556,8 +575,11 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) unsigned int a; Cloth *cloth = clmd->clothObject; + printf("cloth_write_cache: %f\n", framenr); + if(!cloth) { + printf("cloth_write_cache: no cloth\n"); return; } @@ -566,6 +588,7 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) fp = BKE_ptcache_id_fopen((ID *)ob, 'w', framenr, stack_index); if(!fp) { + printf("cloth_write_cache: no fp\n"); return; } @@ -578,6 +601,8 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) clmd->sim_parms->lastcachedframe = MAX2(clmd->sim_parms->lastcachedframe, framenr); + printf("lcf: %d, framenr: %f\n", clmd->sim_parms->lastcachedframe, framenr); + fclose(fp); } @@ -591,7 +616,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d { unsigned int i; Cloth *cloth = clmd->clothObject; - unsigned int framenr = ( float ) G.scene->r.cfra; + float framenr = G.scene->r.cfra; float current_time = bsystem_time ( ob, ( float ) G.scene->r.cfra, 0.0 ); ListBase *effectors = NULL; ClothVertex *verts = NULL; @@ -604,6 +629,8 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d MFace *mface = NULL; DerivedMesh *result = NULL; + printf("clothModifier_do start\n"); + result = CDDM_copy(dm); if(!result) @@ -614,134 +641,182 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d numverts = result->getNumVerts(result); numedges = result->getNumEdges(result); numfaces = result->getNumFaces(result); - mvert = CDDM_get_verts(result); - medge = CDDM_get_edges(result); - mface = CDDM_get_faces(result); - - // only be active during a specific period: - // that's "first frame" and "last frame" on GUI - if ( current_time < clmd->sim_parms->firstframe ) - { - return result; - } - else if ( current_time > clmd->sim_parms->lastframe ) - { - int stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); - - if(BKE_ptcache_id_exist((ID *)ob, clmd->sim_parms->lastcachedframe, stack_index)) - { - if(cloth_read_cache(ob, clmd, framenr)) - { - // Copy the result back to the object. - cloth_to_object (ob, clmd, result); - } - } - return result; - } - - // unused in the moment, calculated seperately in implicit.c - clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; - - clmd->sim_parms->sim_time = current_time; + mvert = dm->getVertArray(result); + medge = dm->getEdgeArray(result); + mface = dm->getFaceArray(result); /* check if cache is active / if file is already saved */ + /* if ((!G.relbase_valid) && ( deltaTime != 1.0f )) { clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } - + */ + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET) { cloth_free_modifier (ob, clmd); + printf("clothModifier_do CLOTH_SIMSETTINGS_FLAG_RESET\n"); } - // sanity check for correctness of GUI values - if(clmd->sim_parms->max_structsim_parms->structural) - clmd->sim_parms->max_struct=clmd->sim_parms->structural; - if(clmd->sim_parms->max_bendsim_parms->bending) - clmd->sim_parms->max_struct=clmd->sim_parms->bending; - if(clmd->sim_parms->max_shearsim_parms->shear) - clmd->sim_parms->max_shear=clmd->sim_parms->shear; - - if ( deltaTime == 1.0f ) + // unused in the moment, calculated seperately in implicit.c + clmd->sim_parms->dt = 1.0f / clmd->sim_parms->stepsPerFrame; + + if ( ( clmd->clothObject == NULL ) || (clmd->clothObject && (numverts != clmd->clothObject->numverts )) ) { - if ( ( clmd->clothObject == NULL ) || ( numverts != clmd->clothObject->numverts ) ) + /* only force free the cache if we have a different number of verts */ + if(clmd->clothObject && (numverts != clmd->clothObject->numverts )) { - cloth_clear_cache(ob, clmd, 0); - - // printf("v1: %d, v2: %d\n", numverts, clmd->clothObject->numverts); - - if ( !cloth_from_object ( ob, clmd, result, framenr ) ) - return result; - - if ( clmd->clothObject == NULL ) - return result; - - cloth = clmd->clothObject; + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + cloth_free_modifier ( ob, clmd ); } - - clmd->clothObject->old_solver_type = clmd->sim_parms->solver_type; - - // Insure we have a clmd->clothObject, in case allocation failed. - if ( clmd->clothObject != NULL ) - { - if(!cloth_read_cache(ob, clmd, framenr)) - { - verts = cloth->verts; - - // Force any pinned verts to their constrained location. - for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) - { - // Save the previous position. - VECCOPY ( verts->xold, verts->xconst ); - VECCOPY ( verts->txold, verts->x ); - - // Get the current position. - VECCOPY ( verts->xconst, mvert[i].co ); - Mat4MulVecfl ( ob->obmat, verts->xconst ); - } + + cloth_clear_cache(ob, clmd, 0); - tstart(); - - // Call the solver. - if ( solvers [clmd->sim_parms->solver_type].solver ) - solvers [clmd->sim_parms->solver_type].solver ( ob, framenr, clmd, effectors ); - - tend(); - // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); - - cloth_write_cache(ob, clmd, framenr); - - // check for autoprotection - if(framenr >= clmd->sim_parms->autoprotect) - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; - } - - // Copy the result back to the object. - cloth_to_object (ob, clmd, result); - } - - } - else - { - if ( clmd->clothObject != NULL ) + if ( !cloth_from_object ( ob, clmd, result, framenr ) ) + return result; + + if ( clmd->clothObject == NULL ) + return result; + + cloth = clmd->clothObject; + + if(!cloth_read_cache(ob, clmd, framenr)) { - if(cloth_read_cache(ob, clmd, framenr)) - { - cloth_to_object (ob, clmd, result); - } + /* save first frame in case we have a reseted object + and we move one frame forward. + In that case we would only start with the SECOND frame + if we don't save the current state before + TODO PROBLEM: IMHO we can't track external movement from the + first frame in this case! */ + /* + if ( deltaTime == 1.0f ) + cloth_write_cache(ob, clmd, framenr-1.0); + */ + printf("cloth_from_object NO cloth_read_cache cloth_write_cache\n"); } else { + printf("cloth_from_object cloth_read_cache\n"); + + implicit_set_positions(clmd); + } + + clmd->sim_parms->sim_time = current_time; + } + + // only be active during a specific period: + // that's "first frame" and "last frame" on GUI + /* + // TODO: enable later again after refactoring + if ( current_time < clmd->sim_parms->firstframe ) + { + return result; +} + else if ( current_time > clmd->sim_parms->lastframe ) + { + int stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + if(BKE_ptcache_id_exist((ID *)ob, clmd->sim_parms->lastcachedframe, stack_index)) + { + if(cloth_read_cache(ob, clmd, framenr)) + { + // Copy the result back to the object. + cloth_to_object (ob, clmd, result); +} +} + return result; +} + */ + + /* nice moving one frame forward */ + if ( deltaTime == 1.0f ) + { + clmd->sim_parms->sim_time = current_time; + + printf("clothModifier_do deltaTime=1\n"); + + if(!cloth_read_cache(ob, clmd, framenr)) + { + verts = cloth->verts; + + // Force any pinned verts to their constrained location. + for ( i = 0; i < clmd->clothObject->numverts; i++, verts++ ) + { + // Save the previous position. + VECCOPY ( verts->xold, verts->xconst ); + VECCOPY ( verts->txold, verts->x ); + + // Get the current position. + VECCOPY ( verts->xconst, mvert[i].co ); + Mat4MulVecfl ( ob->obmat, verts->xconst ); + } + + tstart(); + + // Call the solver. + if ( solvers [clmd->sim_parms->solver_type].solver ) + solvers [clmd->sim_parms->solver_type].solver ( ob, framenr, clmd, effectors ); + + tend(); + // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); + + cloth_write_cache(ob, clmd, framenr); + + // check for autoprotection + if(framenr >= clmd->sim_parms->autoprotect) + { + printf("fr#: %f, auto: %d\n", framenr, clmd->sim_parms->autoprotect); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; + } + + printf("clothModifier_do deltaTime=1 cachewrite\n"); + } + else + { + printf("clothModifier_do deltaTime=1 cacheread\n"); + implicit_set_positions(clmd); + } + + // Copy the result back to the object. + cloth_to_object (ob, clmd, result); + } + else if(deltaTime == 0.0f) + { + printf("clothModifier_do deltaTime!=1 clmd->clothObject != NULL\n"); + if(cloth_read_cache(ob, clmd, framenr)) + { + cloth_to_object (ob, clmd, result); + implicit_set_positions(clmd); + } + else /* same cache parts are missing */ + { + /* + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; cloth_clear_cache(ob, clmd, 0); - if ( !cloth_from_object ( ob, clmd, result, framenr ) ) - return result; + cloth_write_cache(ob, clmd, framenr); + } + } + else + { + printf("clothModifier_do deltaTime!=1 clmd->clothObject != NULL\n"); + if(cloth_read_cache(ob, clmd, framenr)) + { + cloth_to_object (ob, clmd, result); + implicit_set_positions(clmd); + clmd->sim_parms->sim_time = current_time; + } + else + { + /* jump to a non-existing frame makes sim reset */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } } return result; - } /* frees all */ @@ -754,59 +829,54 @@ void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) cloth = clmd->clothObject; - if ( ! ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT ) ) - { - if ( cloth ) + + if ( cloth ) + { + // If our solver provides a free function, call it + if ( solvers [clmd->sim_parms->solver_type].free ) { - // free our frame cache, TODO: but get to first position before - cloth_clear_cache ( ob, clmd, 0 ); - - // If our solver provides a free function, call it - if ( solvers [clmd->sim_parms->solver_type].free ) - { - solvers [clmd->sim_parms->solver_type].free ( clmd ); - } - - // Free the verts. - if ( cloth->verts != NULL ) - MEM_freeN ( cloth->verts ); - - cloth->verts = NULL; - cloth->numverts = 0; - - // Free the springs. - if ( cloth->springs != NULL ) - { - LinkNode *search = cloth->springs; - while(search) - { - ClothSpring *spring = search->link; - - MEM_freeN ( spring ); - search = search->next; - } - BLI_linklist_free(cloth->springs, NULL); - - cloth->springs = NULL; - } - - cloth->springs = NULL; - cloth->numsprings = 0; - - // free BVH collision tree - if ( cloth->tree ) - bvh_free ( ( BVH * ) cloth->tree ); - - // we save our faces for collision objects - if ( cloth->mfaces ) - MEM_freeN ( cloth->mfaces ); - /* - if(clmd->clothObject->facemarks) - MEM_freeN(clmd->clothObject->facemarks); - */ - MEM_freeN ( cloth ); - clmd->clothObject = NULL; + solvers [clmd->sim_parms->solver_type].free ( clmd ); } + + // Free the verts. + if ( cloth->verts != NULL ) + MEM_freeN ( cloth->verts ); + + cloth->verts = NULL; + cloth->numverts = 0; + + // Free the springs. + if ( cloth->springs != NULL ) + { + LinkNode *search = cloth->springs; + while(search) + { + ClothSpring *spring = search->link; + + MEM_freeN ( spring ); + search = search->next; + } + BLI_linklist_free(cloth->springs, NULL); + + cloth->springs = NULL; + } + + cloth->springs = NULL; + cloth->numsprings = 0; + + // free BVH collision tree + if ( cloth->tree ) + bvh_free ( ( BVH * ) cloth->tree ); + + // we save our faces for collision objects + if ( cloth->mfaces ) + MEM_freeN ( cloth->mfaces ); + /* + if(clmd->clothObject->facemarks) + MEM_freeN(clmd->clothObject->facemarks); + */ + MEM_freeN ( cloth ); + clmd->clothObject = NULL; } clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_RESET; } @@ -816,6 +886,8 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) { Cloth *cloth = NULL; + printf("cloth_free_modifier_extern\n"); + if ( !clmd ) return; @@ -823,6 +895,8 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) if ( cloth ) { + printf("cloth_free_modifier_extern in\n"); + // If our solver provides a free function, call it if ( solvers [clmd->sim_parms->solver_type].free ) { @@ -909,7 +983,7 @@ static void cloth_to_object (Object *ob, ClothModifierData *clmd, DerivedMesh * * **/ /* can be optimized to do all groups in one loop */ -static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short vgroup, int mode ) +static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm ) { unsigned int i = 0; unsigned int j = 0; @@ -918,66 +992,57 @@ static void cloth_apply_vgroup ( ClothModifierData *clmd, DerivedMesh *dm, short unsigned int numverts = dm->getNumVerts ( dm ); float goalfac = 0; ClothVertex *verts = NULL; + // clmd->sim_parms->vgroup_mass clothObj = clmd->clothObject; if ( !dm ) return; - + numverts = dm->getNumVerts ( dm ); - /* vgroup is 1 based, decrement so we can match the right group. */ - --vgroup; - verts = clothObj->verts; - - for ( i = 0; i < numverts; i++, verts++ ) + + if (((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) || + (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )) && + ((clmd->sim_parms->vgroup_mass>0) || + (clmd->sim_parms->vgroup_struct>0)|| + (clmd->sim_parms->vgroup_bend>0))) { - // LATER ON, support also mass painting here - if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )||(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)) + for ( i = 0; i < numverts; i++, verts++ ) { dvert = dm->getVertData ( dm, i, CD_MDEFORMVERT ); if ( dvert ) { for ( j = 0; j < dvert->totweight; j++ ) { - if ( dvert->dw[j].def_nr == vgroup ) + if (( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_mass-1)) && (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL )) { - if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal = dvert->dw [j].weight; + goalfac= 1.0f; + + /* + // Kicking goal factor to simplify things...who uses that anyway? + // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); + */ + + verts->goal = ( float ) pow ( verts->goal , 4.0f ); + if ( verts->goal >=SOFTGOALSNAP ) + verts->flags |= CLOTH_VERT_FLAG_PINNED; + } + + if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) + { + if( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_struct-1)) { - if(mode==0) - { - verts->goal = dvert->dw [j].weight; - goalfac= 1.0f; - - /* - // Kicking goal factor to simplify things...who uses that anyway? - // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal ); - */ - - verts->goal = ( float ) pow ( verts->goal , 4.0f ); - if ( verts->goal >=SOFTGOALSNAP ) - verts->flags |= CLOTH_VERT_FLAG_PINNED; - - break; - } + verts->struct_stiff = dvert->dw [j].weight; + verts->shear_stiff = dvert->dw [j].weight; } - if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING ) + if( dvert->dw[j].def_nr == (clmd->sim_parms->vgroup_bend-1)) { - if(mode==2) - { - verts->struct_stiff = dvert->dw [j].weight; - verts->shear_stiff = dvert->dw [j].weight; - break; - } - else if(mode==1) - { - verts->bend_stiff = dvert->dw [j].weight; - break; - } + verts->bend_stiff = dvert->dw [j].weight; } - } } } @@ -1010,6 +1075,8 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if ( clmd->clothObject != NULL ) { cloth_free_modifier ( ob, clmd ); + + printf("cloth_free_modifier cloth_from_object\n"); } // Allocate a new cloth object. @@ -1037,14 +1104,21 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d clmd->clothObject->springs = NULL; clmd->clothObject->numsprings = -1; - mvert = CDDM_get_verts ( dm ); + mvert = dm->getVertArray ( dm ); verts = clmd->clothObject->verts; // set initial values for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) { VECCOPY ( verts->x, mvert[i].co ); + + if(i<5) + printf("i: %d, verts->x[0]: %f\n", i, verts->x[0]); + Mat4MulVecfl ( ob->obmat, verts->x ); + + if(i<5) + printf("i: %d, verts->x[0]: %f\n\n", i, verts->x[0]); verts->mass = clmd->sim_parms->mass; @@ -1063,34 +1137,24 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY ( verts->impulse, tnull ); } + // apply / set vertex groups + // has to be happen before springs are build! + cloth_apply_vgroup (clmd, dm); + if ( !cloth_build_springs ( clmd, dm ) ) { cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); + printf("cloth_free_modifier cloth_build_springs\n"); return 0; } - - // apply / set vertex groups - if ( clmd->sim_parms->vgroup_mass > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_mass, 0 ); - // apply / set vertex groups - if ( clmd->sim_parms->vgroup_bend > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_bend, 1 ); - - // apply / set vertex groups - if ( clmd->sim_parms->vgroup_struct > 0 ) - cloth_apply_vgroup ( clmd, dm, clmd->sim_parms->vgroup_struct, 2 ); - // init our solver if ( solvers [clmd->sim_parms->solver_type].init ) solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); - if(!cloth_read_cache(ob, clmd, framenr)) - cloth_write_cache(ob, clmd, framenr); - return 1; } return 0; @@ -1112,6 +1176,7 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * { cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->verts." ); + printf("cloth_free_modifier clmd->clothObject->verts\n"); return; } @@ -1122,6 +1187,7 @@ static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh * { cloth_free_modifier ( ob, clmd ); modifier_setError ( & ( clmd->modifier ), "Out of memory on allocating clmd->clothObject->mfaces." ); + printf("cloth_free_modifier clmd->clothObject->mfaces\n"); return; } for ( i = 0; i < numfaces; i++ ) @@ -1214,6 +1280,14 @@ int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) spring->kl = medge[i].v2; VECSUB ( temp, cloth->verts[spring->kl].x, cloth->verts[spring->ij].x ); spring->restlen = sqrt ( INPR ( temp, temp ) ); + /* + if(spring->restlen > 1.0) + { + printf("i: %d, L: %f\n", i, spring->restlen); + printf("%d, x: %f, y: %f, z: %f\n", cloth->verts[spring->ij].x[0], cloth->verts[spring->ij].x[1], spring->ij, cloth->verts[spring->ij].x[2]); + printf("%d, x: %f, y: %f, z: %f\n\n",spring->kl, cloth->verts[spring->kl].x[0], cloth->verts[spring->kl].x[1], cloth->verts[spring->kl].x[2]); + } + */ clmd->coll_parms->avg_spring_len += spring->restlen; spring->type = CLOTH_SPRING_TYPE_STRUCTURAL; spring->flags = 0; diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 1ce19e878fa..083ae5a2b46 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -991,6 +991,7 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; int ret = 0; + ClothModifierData *tclmd; if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) || !(((Cloth *)clmd->clothObject)->tree)) { @@ -1025,6 +1026,10 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) if (!collmd) continue; + tclmd = (ClothModifierData *) modifiers_findByType (coll_ob, eModifierType_Cloth); + if(tclmd == clmd) + continue; + if (collmd->tree) { BVH *coll_bvh = collmd->tree; @@ -1035,57 +1040,50 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) } else printf ("cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n"); - } - // process all collisions (calculate impulses, TODO: also repulses if distance too short) - result = 1; - for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence - { - result = 0; - - // handle all collision objects - for (base = G.scene->base.first; base; base = base->next) + + // process all collisions (calculate impulses, TODO: also repulses if distance too short) + result = 1; + for(j = 0; j < 10; j++) // 10 is just a value that ensures convergence { - - coll_ob = base->object; - collmd = (CollisionModifierData *) modifiers_findByType (coll_ob, eModifierType_Collision); - if (!collmd) - continue; - - result += cloth_collision_response_static(clmd, collmd); - } - - // apply impulses in parallel - ic=0; - for(i = 0; i < numverts; i++) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if(verts[i].impulse_count) - { - VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); - VECCOPY(verts[i].impulse, tnull); - verts[i].impulse_count = 0; + result = 0; - ic++; - ret++; + if (collmd->tree) + result += cloth_collision_response_static(clmd, collmd); + + + // apply impulses in parallel + ic=0; + for(i = 0; i < numverts; i++) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if(verts[i].impulse_count) + { + VECADDMUL(verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count); + VECCOPY(verts[i].impulse, tnull); + verts[i].impulse_count = 0; + + ic++; + ret++; + } } } - } - - // free collision list - if(clmd->coll_parms->collision_list) - { - LinkNode *search = clmd->coll_parms->collision_list; - while(search) - { - CollPair *coll_pair = search->link; - - MEM_freeN(coll_pair); - search = search->next; - } - BLI_linklist_free(clmd->coll_parms->collision_list,NULL); - clmd->coll_parms->collision_list = NULL; + // free collision list + if(clmd->coll_parms->collision_list) + { + LinkNode *search = clmd->coll_parms->collision_list; + while(search) + { + CollPair *coll_pair = search->link; + + MEM_freeN(coll_pair); + search = search->next; + } + BLI_linklist_free(clmd->coll_parms->collision_list,NULL); + + clmd->coll_parms->collision_list = NULL; + } } rounds++; } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index a10210cbf3a..475009c8fa6 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4956,6 +4956,7 @@ static void clothModifier_initData(ModifierData *md) return; cloth_init (clmd); + printf("clothModifier_initData\n"); } static DerivedMesh *clothModifier_applyModifier(ModifierData *md, Object *ob, @@ -5050,6 +5051,8 @@ static void clothModifier_freeData(ModifierData *md) if (clmd) { + printf("clothModifier_freeData\n"); + cloth_free_modifier_extern (clmd); if(clmd->sim_parms) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index d3a474a57a5..3ea7788f87c 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1788,7 +1788,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco } else if (md->type==eModifierType_Softbody) { height = 31; } else if (md->type==eModifierType_Cloth) { - height = 26; + height = 31; } else if (md->type==eModifierType_Collision) { height = 19; } else if (md->type==eModifierType_Boolean) { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index eb81c256289..4f23d60cd67 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2355,10 +2355,13 @@ void do_object_panels(unsigned short event) /* force freeing because user wants */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + /*user wants to free all, so free whole cloth, this helps to start sim at later frame */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - cloth_clear_cache(ob, clmd, 1); + cloth_clear_cache(ob, clmd, 0); allqueue(REDRAWBUTSOBJECT, 0); allqueue(REDRAWVIEW3D, 0); } @@ -2372,7 +2375,7 @@ void do_object_panels(unsigned short event) /* force freeing because user wants */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; - cloth_clear_cache(ob, clmd, MAX2(1.0,G.scene->r.cfra)); + cloth_clear_cache(ob, clmd, MAX2(0.0,G.scene->r.cfra)); // MAX2(1.0,G.scene->r.cfra + 1.0) allqueue(REDRAWBUTSOBJECT, 0); } @@ -2383,14 +2386,11 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { - if(clmd->sim_parms->cache) - { - CFRA= 1; - update_for_newframe_muted(); - DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); - allqueue(REDRAWBUTSOBJECT, 0); - allqueue(REDRAWVIEW3D, 0); - } + CFRA= 1; + update_for_newframe_muted(); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); } } break; @@ -2401,6 +2401,9 @@ void do_object_panels(unsigned short event) if(clmd) { clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWVIEW3D, 0); } } break; @@ -5047,7 +5050,9 @@ static void object_cloth__enabletoggle(void *ob_v, void *arg2) md = modifier_new(eModifierType_Cloth); BLI_addhead(&ob->modifiers, md); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); allqueue(REDRAWBUTSEDIT, 0); + allqueue(REDRAWVIEW3D, 0); } else { Object *ob = ob_v; @@ -5121,7 +5126,7 @@ static void object_panel_cloth(Object *ob) uiBlockBeginAlign(block); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, REDRAWVIEW3D, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_GOAL, B_CLOTH_RENEW, "Pinning of cloth", 10,70,150,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "Define forces for vertices to stick to animated position"); if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) && (BLI_countlist (&ob->defbase) > 0)) { @@ -5207,7 +5212,7 @@ static void object_panel_cloth_II(Object *ob) if(clmd) { uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 10, 0, "Frame on which the simulation stops"); + uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation stops"); uiDefBut(block, LABEL, 0, "",10,140,300,20, NULL, 0.0, 0, 0, 0, ""); @@ -5234,11 +5239,11 @@ static void object_panel_cloth_II(Object *ob) uiDefBut(block, LABEL, 0, " ", 10,80,145,20, NULL, 0.0, 0, 0, 0, ""); */ - uiDefButBitI(block, TOG, CLOTH_COLLSETTINGS_FLAG_ENABLED, REDRAWVIEW3D, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); + uiDefButBitI(block, TOG, CLOTH_COLLSETTINGS_FLAG_ENABLED, B_CLOTH_RENEW, "Enable collisions", 10,60,150,20, &clmd->coll_parms->flags, 0, 0, 0, 0, "Enable collisions with this object"); if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { - uiDefButF(block, NUM, B_CLOTH_RENEW, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in"); - uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Collision Quality:", 10,40,300,20, &clmd->coll_parms->loop_count, 1.0, 100.0, 1.0, 0, "How many collision iterations should be done. (higher = better = slower), je be changed for each frame"); + uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in, can be changed for each frame"); + uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Collision Quality:", 10,40,300,20, &clmd->coll_parms->loop_count, 1.0, 100.0, 1.0, 0, "How many collision iterations should be done. (higher = better = slower), can be changed for each frame"); } else uiDefBut(block, LABEL, 0, "",160,60,150,20, NULL, 0.0, 0, 0, 0, ""); @@ -5268,9 +5273,9 @@ static void object_panel_cloth_III(Object *ob) char clmvg [] = "Vertex Groups%t|None%x0|"; char clmvg2 [] = "Vertex Groups%t|None%x0|"; - uiDefButI(block, NUM, B_DIFF, "Autoprotect Cache From:",10,160,300,20, &clmd->sim_parms->autoprotect, 0, MAXFRAME, 1, 0, "Frame on which the simulation gets cache protection enabled automatically (To prevent accidently cleaning it)."); + uiDefButI(block, NUM, B_DIFF, "Autoprotect Cache From:",10,160,300,20, &clmd->sim_parms->autoprotect, 0.0, MAXFRAME + 1, 1, 0, "Frame on which the simulation gets cache protection enabled automatically (To prevent accidently cleaning it)."); - uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_SCALING, REDRAWVIEW3D, "Enable stiffness scaling",10,130,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "If enabled, stiffness can be scaled along a weight painted vertex group."); + uiDefButBitI(block, TOG, CLOTH_SIMSETTINGS_FLAG_SCALING, B_CLOTH_RENEW, "Enable stiffness scaling",10,130,300,20, &clmd->sim_parms->flags, 0, 0, 0, 0, "If enabled, stiffness can be scaled along a weight painted vertex group."); if ((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING)&& (BLI_countlist (&ob->defbase) > 0)) { diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 9c00d8b71bc..712c9ddc4a9 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -857,14 +857,16 @@ void make_editMesh() /* check if we have cache for this frame */ int stack_index = modifiers_indexInObject(G.obedit, (ModifierData *)clmd); - if(BKE_ptcache_id_exist((ID *)G.obedit, (float) G.scene->r.cfra, stack_index)) + if(BKE_ptcache_id_exist((ID *)G.obedit, G.scene->r.cfra, stack_index)) { cloth_enabled = 1; - clmd->sim_parms->editedframe = (float) G.scene->r.cfra; + clmd->sim_parms->editedframe = G.scene->r.cfra; /* inverse matrix is not uptodate... */ Mat4Invert ( G.obedit->imat, G.obedit->obmat ); + + printf("make_editmesh --> cloth_enabled\n"); } } } @@ -1014,6 +1016,8 @@ void load_editMesh(void) ClothModifierData *clmd = NULL; Cloth *cloth = NULL; float temp[3], dt = 0.0; + + printf("loadmesh\n"); #ifdef WITH_VERSE if(em->vnode) { @@ -1102,6 +1106,7 @@ void load_editMesh(void) Mat4Invert ( G.obedit->imat, G.obedit->obmat ); dt = 1.0f / clmd->sim_parms->stepsPerFrame; } + printf("loadmesh --> tot: %d, num: %d\n", G.totvert, cloth->numverts); } } @@ -1110,6 +1115,7 @@ void load_editMesh(void) if(cloth_enabled) { + printf("loadmesh --> cloth_enabled\n"); VECCOPY(temp, cloth->verts[i].x); VECCOPY(cloth->verts[i].x, eve->co); @@ -1123,6 +1129,7 @@ void load_editMesh(void) */ if(oldverts) { VECCOPY(mvert->co, oldverts[i].co); + printf("loadmesh --> cloth_enabled oldverts\n"); } i++; } @@ -1159,12 +1166,22 @@ void load_editMesh(void) /* burn changes to cache */ if(cloth_enabled) { + printf("loadmesh --> cloth_enabled cloth_write_cache\n"); cloth_write_cache(G.obedit, clmd, clmd->sim_parms->editedframe); /* in this case we have to get the data for the requested frame */ - if(clmd->sim_parms->editedframe != (float) G.scene->r.cfra) + if(clmd->sim_parms->editedframe != G.scene->r.cfra) { - cloth_read_cache(G.obedit, clmd, (float) G.scene->r.cfra); + cloth_read_cache(G.obedit, clmd, G.scene->r.cfra); + } + } + else + { + if(modifiers_isClothEnabled(G.obedit)) { + ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(G.obedit, eModifierType_Cloth); + printf("loadmesh --> CLOTH_SIMSETTINGS_FLAG_RESET\n"); + /* only reset cloth when no cache was used */ + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; } } @@ -1426,18 +1443,7 @@ void load_editMesh(void) if(me->id.us>1) { Base *base; for(base= G.scene->base.first; base; base= base->next) { - if(base->object->data==me) { - if(modifiers_isClothEnabled(base->object)) { - ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(base->object, eModifierType_Cloth); - - /* only reset cloth when no cache was used */ - if(!cloth_enabled) - { - clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; - } - - } - + if(base->object->data==me) { base->object->softflag |= OB_SB_REDO; base->object->recalc |= OB_RECALC_DATA; } From 5da7f4df472f41997a1f424315f94d0d04b3dd30 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 29 Jan 2008 16:32:42 +0000 Subject: [PATCH 085/430] -= Cloth cleanup =- Fixes: - Cloth event refactor to solve 2 unknown cache bugs - Cloth vgroup refactor (faster + scalable stinnes now working) - Cloth + Collision modifier on one object crash - Editmode + faceextrude on baked cloth crash - Stiffness groups would get pinned - Correct scaled stiffness calculation - Fixes freeing error under some circumstances - Deactivating reset/cache freeing when in editmode - Autobaking setting doesn't get screwed up anymore - More than 1 collision object in a scene could explode - Pinning + not protected cache didn't reset cloth - Start simulation on first frame and not on 2nd - Maximum structstiff now correct (copy-paste error) - Loading file with baked cloth calculate the spring length correctly - Loading file behaviour improved with cache - Collision object is evaluated first (untested) - Debug output activated with rt>0 Be carefull: Files with some cloth cache or something should be regenerated. --- source/blender/blenkernel/BKE_cloth.h | 3 +- source/blender/blenkernel/intern/cloth.c | 213 +++++++++++-------- source/blender/blenkernel/intern/collision.c | 10 +- source/blender/blenkernel/intern/implicit.c | 95 ++++++--- source/blender/blenkernel/intern/modifier.c | 13 +- source/blender/blenloader/intern/readfile.c | 3 + source/blender/makesdna/DNA_cloth_types.h | 2 + source/blender/src/buttons_object.c | 21 +- source/blender/src/editmesh.c | 12 +- 9 files changed, 244 insertions(+), 128 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 1a3feed0a0c..80d09cde342 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -133,9 +133,10 @@ typedef enum CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled - CLOTH_SIMSETTINGS_FLAG_NEW = ( 1 << 6 ), // unsued, true if cloth was just enabled + CLOTH_SIMSETTINGS_FLAG_EDITMODE = ( 1 << 6 ), // are we in editmode? -several things disabled CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE = (1 << 7), /* force cache freeing */ CLOTH_SIMSETTINGS_FLAG_SCALING = (1 << 8), /* is advanced scaling active? */ + CLOTH_SIMSETTINGS_FLAG_LOADED = (1 << 9), /* did we just got load? */ } CLOTH_SIMSETTINGS_FLAGS; /* COLLISION FLAGS */ diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 0870bf2efa3..a99ac705c0b 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -153,7 +153,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->mass = 1.0f; clmd->sim_parms->stepsPerFrame = 5; clmd->sim_parms->sim_time = 1.0; - clmd->sim_parms->flags = CLOTH_SIMSETTINGS_FLAG_NEW; + clmd->sim_parms->flags = 0; clmd->sim_parms->solver_type = 0; clmd->sim_parms->preroll = 0; clmd->sim_parms->maxspringlen = 10; @@ -163,6 +163,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->lastcachedframe = 0; clmd->sim_parms->editedframe = 0; clmd->sim_parms->autoprotect = 25; + clmd->sim_parms->firstcachedframe = -1.0; clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 10.0; @@ -520,20 +521,14 @@ int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) fclose(fp); - /* - // belongs to another location ?!? - if((clmd->sim_parms->solver_type == 0) && (ret!=0)) - { - implicit_set_positions(clmd); - } - */ - if(clmd->sim_parms->lastcachedframe < framenr) { + if(G.rt > 0) printf("cloth_read_cache problem: lnex - f#: %f, lastCF: %d\n", framenr, clmd->sim_parms->lastcachedframe); } } + if(G.rt > 0) printf("cloth_read_cache: %f\n", framenr); return ret; @@ -542,15 +537,15 @@ int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) { int stack_index = -1; - printf("cloth_clear_cache: %f\n", framenr); - /* - // belongs to another location ?!? - if(framenr>0) + // don't do anything as long as we're in editmode! + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_EDITMODE) { - cloth_read_cache(ob, clmd, framenr); + /* delete cache free request */ + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; + + return; } - */ /* clear cache if specific frame cleaning requested or cache is not protected */ if((!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT)) || (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE)) @@ -558,11 +553,18 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr) stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); BKE_ptcache_id_clear((ID *)ob, PTCACHE_CLEAR_AFTER, framenr, stack_index); + + /* update last cached frame # */ + clmd->sim_parms->lastcachedframe = framenr; + + /* update first cached frame # */ + if((framenr < clmd->sim_parms->firstcachedframe) && (clmd->sim_parms->firstcachedframe >=0.0)) + clmd->sim_parms->firstcachedframe = -1.0; + + if(G.rt > 0) + printf("cloth_clear_cache: %f\n", framenr); } - /* update last cached frame # */ - clmd->sim_parms->lastcachedframe = framenr; - /* delete cache free request */ clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; @@ -575,10 +577,12 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) unsigned int a; Cloth *cloth = clmd->clothObject; + if(G.rt > 0) printf("cloth_write_cache: %f\n", framenr); if(!cloth) { + if(G.rt > 0) printf("cloth_write_cache: no cloth\n"); return; } @@ -588,6 +592,7 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) fp = BKE_ptcache_id_fopen((ID *)ob, 'w', framenr, stack_index); if(!fp) { + if(G.rt > 0) printf("cloth_write_cache: no fp\n"); return; } @@ -599,8 +604,14 @@ void cloth_write_cache(Object *ob, ClothModifierData *clmd, float framenr) fwrite(&cloth->verts[a].v, sizeof(float),3,fp); } + /* update last cached frame # */ clmd->sim_parms->lastcachedframe = MAX2(clmd->sim_parms->lastcachedframe, framenr); + /* update first cached frame # */ + if((clmd->sim_parms->firstcachedframe < 0.0) || ((framenr < clmd->sim_parms->firstcachedframe) && (clmd->sim_parms->firstcachedframe > 0.0))) + clmd->sim_parms->firstcachedframe = framenr; + + if(G.rt > 0) printf("lcf: %d, framenr: %f\n", clmd->sim_parms->lastcachedframe, framenr); fclose(fp); @@ -629,8 +640,18 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d MFace *mface = NULL; DerivedMesh *result = NULL; + if(G.rt > 0) printf("clothModifier_do start\n"); + /* we're getting called two times during file load, + resulting in a not valid G.relbase on the first time (cache makes problems) + --> just return back */ + if((clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_LOADED)&& (!G.relbase_valid)) + { + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_LOADED; + return dm; + } + result = CDDM_copy(dm); if(!result) @@ -656,6 +677,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_RESET) { cloth_free_modifier (ob, clmd); + if(G.rt > 0) printf("clothModifier_do CLOTH_SIMSETTINGS_FLAG_RESET\n"); } @@ -693,10 +715,12 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d if ( deltaTime == 1.0f ) cloth_write_cache(ob, clmd, framenr-1.0); */ + if(G.rt > 0) printf("cloth_from_object NO cloth_read_cache cloth_write_cache\n"); } else { + if(G.rt > 0) printf("cloth_from_object cloth_read_cache\n"); implicit_set_positions(clmd); @@ -707,33 +731,35 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // only be active during a specific period: // that's "first frame" and "last frame" on GUI - /* + // TODO: enable later again after refactoring if ( current_time < clmd->sim_parms->firstframe ) { - return result; -} + return result; + } else if ( current_time > clmd->sim_parms->lastframe ) { - int stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); - - if(BKE_ptcache_id_exist((ID *)ob, clmd->sim_parms->lastcachedframe, stack_index)) - { - if(cloth_read_cache(ob, clmd, framenr)) - { + int stack_index = modifiers_indexInObject(ob, (ModifierData *)clmd); + + if(BKE_ptcache_id_exist((ID *)ob, clmd->sim_parms->lastcachedframe, stack_index)) + { + if(cloth_read_cache(ob, clmd, clmd->sim_parms->lastcachedframe)) + { + implicit_set_positions(clmd); + // Copy the result back to the object. - cloth_to_object (ob, clmd, result); -} -} - return result; -} - */ + cloth_to_object (ob, clmd, result); + } + } + return result; + } /* nice moving one frame forward */ if ( deltaTime == 1.0f ) { clmd->sim_parms->sim_time = current_time; + if(G.rt > 0) printf("clothModifier_do deltaTime=1\n"); if(!cloth_read_cache(ob, clmd, framenr)) @@ -766,14 +792,16 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d // check for autoprotection if(framenr >= clmd->sim_parms->autoprotect) { + if(G.rt > 0) printf("fr#: %f, auto: %d\n", framenr, clmd->sim_parms->autoprotect); clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT; } - + if(G.rt > 0) printf("clothModifier_do deltaTime=1 cachewrite\n"); } else { + if(G.rt > 0) printf("clothModifier_do deltaTime=1 cacheread\n"); implicit_set_positions(clmd); } @@ -783,6 +811,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d } else if(deltaTime == 0.0f) { + if(G.rt > 0) printf("clothModifier_do deltaTime!=1 clmd->clothObject != NULL\n"); if(cloth_read_cache(ob, clmd, framenr)) { @@ -802,6 +831,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d } else { + if(G.rt > 0) printf("clothModifier_do deltaTime!=1 clmd->clothObject != NULL\n"); if(cloth_read_cache(ob, clmd, framenr)) { @@ -885,7 +915,7 @@ void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) void cloth_free_modifier_extern ( ClothModifierData *clmd ) { Cloth *cloth = NULL; - + if(G.rt > 0) printf("cloth_free_modifier_extern\n"); if ( !clmd ) @@ -895,6 +925,7 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) if ( cloth ) { + if(G.rt > 0) printf("cloth_free_modifier_extern in\n"); // If our solver provides a free function, call it @@ -1070,12 +1101,13 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d MVert *mvert = NULL; ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; + int cache_there = 0; // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) { cloth_free_modifier ( ob, clmd ); - + if(G.rt > 0) printf("cloth_free_modifier cloth_from_object\n"); } @@ -1098,66 +1130,73 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d cloth_from_mesh ( ob, clmd, dm ); - if ( clmd->clothObject != NULL ) + if((clmd->sim_parms->firstcachedframe < 0.0) || ((clmd->sim_parms->firstcachedframe >= 0.0) && (!cloth_read_cache(ob, clmd, clmd->sim_parms->firstcachedframe)))) { - // create springs - clmd->clothObject->springs = NULL; - clmd->clothObject->numsprings = -1; - - mvert = dm->getVertArray ( dm ); - verts = clmd->clothObject->verts; + // no cache there + cache_there = 0; + if(G.rt > 0) + printf("cache_there = 0\n"); + } + else + { + // we have a cache + cache_there = 1; + if(G.rt > 0) + printf("cache_there = 1, fcf: %d\n", clmd->sim_parms->firstcachedframe); + } + + // create springs + clmd->clothObject->springs = NULL; + clmd->clothObject->numsprings = -1; + + mvert = dm->getVertArray ( dm ); + verts = clmd->clothObject->verts; - // set initial values - for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) + // set initial values + for ( i = 0; i < dm->getNumVerts(dm); i++, verts++ ) + { + if(!cache_there) { VECCOPY ( verts->x, mvert[i].co ); - - if(i<5) - printf("i: %d, verts->x[0]: %f\n", i, verts->x[0]); - Mat4MulVecfl ( ob->obmat, verts->x ); - - if(i<5) - printf("i: %d, verts->x[0]: %f\n\n", i, verts->x[0]); - - verts->mass = clmd->sim_parms->mass; - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - verts->goal= clmd->sim_parms->defgoal; - else - verts->goal= 0.0f; - - verts->flags = 0; - VECCOPY ( verts->xold, verts->x ); - VECCOPY ( verts->xconst, verts->x ); - VECCOPY ( verts->txold, verts->x ); - VecMulf ( verts->v, 0.0f ); - - verts->impulse_count = 0; - VECCOPY ( verts->impulse, tnull ); } - // apply / set vertex groups - // has to be happen before springs are build! - cloth_apply_vgroup (clmd, dm); - - if ( !cloth_build_springs ( clmd, dm ) ) - { - cloth_free_modifier ( ob, clmd ); - modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); - printf("cloth_free_modifier cloth_build_springs\n"); - return 0; - } - - // init our solver - if ( solvers [clmd->sim_parms->solver_type].init ) - solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); + verts->mass = clmd->sim_parms->mass; - clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); - - return 1; + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + verts->goal= clmd->sim_parms->defgoal; + else + verts->goal= 0.0f; + + verts->flags = 0; + VECCOPY ( verts->xold, verts->x ); + VECCOPY ( verts->xconst, verts->x ); + VECCOPY ( verts->txold, verts->x ); + VecMulf ( verts->v, 0.0f ); + + verts->impulse_count = 0; + VECCOPY ( verts->impulse, tnull ); } - return 0; + + // apply / set vertex groups + // has to be happen before springs are build! + cloth_apply_vgroup (clmd, dm); + + if ( !cloth_build_springs ( clmd, dm ) ) + { + cloth_free_modifier ( ob, clmd ); + modifier_setError ( & ( clmd->modifier ), "Can't build springs." ); + printf("cloth_free_modifier cloth_build_springs\n"); + return 0; + } + + // init our solver + if ( solvers [clmd->sim_parms->solver_type].init ) + solvers [clmd->sim_parms->solver_type].init ( ob, clmd ); + + clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); + + return 1; } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 083ae5a2b46..0689b8b6dd2 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -561,7 +561,7 @@ int cloth_collision_response_static(ClothModifierData *clmd, CollisionModifierDa // Apply the impulse and increase impulse counters. - /* + /* // calculateFrictionImpulse(tangential, collvel, collpair->normal, magtangent, clmd->coll_parms->friction*0.01, magtangent); VECSUBS(vrel_t_pre, collvel, collpair->normal, magnormal); // VecMulf(vrel_t_pre, clmd->coll_parms->friction*0.01f/INPR(vrel_t_pre,vrel_t_pre)); @@ -1097,6 +1097,14 @@ int cloth_bvh_objcollision(ClothModifierData * clmd, float step, float dt) // verts come from clmd for(i = 0; i < numverts; i++) { + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + if(verts [i].goal >= SOFTGOALSNAP) + { + continue; + } + } + VECADD(verts[i].tx, verts[i].txold, verts[i].tv); } //////////////////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 7ea48d6629b..cda56f5b601 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -82,7 +82,7 @@ void itend(void) double itval() { return ((double)_itend.QuadPart - - (double)_itstart.QuadPart)/((double)ifreq.QuadPart); + (double)_itstart.QuadPart)/((double)ifreq.QuadPart); } #else #include @@ -91,9 +91,9 @@ double itval() // #include // #include -static struct timeval _itstart, _itend; -static struct timezone itz; -void itstart(void) + static struct timeval _itstart, _itend; + static struct timezone itz; + void itstart(void) { gettimeofday(&_itstart, &itz); } @@ -331,7 +331,7 @@ DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) DO_INLINE float det_fmatrix(float m[3][3]) { return m[0][0]*m[1][1]*m[2][2] + m[1][0]*m[2][1]*m[0][2] + m[0][1]*m[1][2]*m[2][0] - -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; + -m[0][0]*m[1][2]*m[2][1] - m[0][1]*m[1][0]*m[2][2] - m[2][0]*m[1][1]*m[0][2]; } DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3]) { @@ -719,6 +719,9 @@ int implicit_init (Object *ob, ClothModifierData *clmd) ClothSpring *spring = NULL; Implicit_Data *id = NULL; LinkNode *search = NULL; + + if(G.rt > 0) + printf("implicit_init\n"); // init memory guard // MEMORY_BASE.first = MEMORY_BASE.last = NULL; @@ -776,7 +779,7 @@ int implicit_init (Object *ob, ClothModifierData *clmd) // dFdV_start[i].c = big_I[i].c = big_zero[i].c = id->A[i+cloth->numverts].c = id->dFdV[i+cloth->numverts].c = id->dFdX[i+cloth->numverts].c = - id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; + id->P[i+cloth->numverts].c = id->Pinv[i+cloth->numverts].c = id->bigI[i+cloth->numverts].c = spring->kl; spring->matrix_index = i + cloth->numverts; @@ -1023,7 +1026,7 @@ int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fma del_lfvector(p); del_lfvector(r); - // printf("iterations: %d\n", iterations); + printf("iterations: %d\n", iterations); return iterationsL) { - if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) - && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! - { - s->flags |= CSPRING_FLAG_DEACTIVATE; - return; - } - } + if((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) + && ((((length-L)*100.0f/L) > clmd->sim_parms->maxspringlen))) // cut spring! + { + s->flags |= CSPRING_FLAG_DEACTIVATE; + return; + } + } */ mul_fvector_S(dir, extent, 1.0f/length); } @@ -1133,8 +1136,18 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, k = clmd->sim_parms->structural; - scaling = k + s->stiffness * (clmd->sim_parms->max_struct-k); + scaling = k + s->stiffness * ABS(clmd->sim_parms->max_struct-k); k = scaling; + + // printf("scaling: %f, stiffness: %f\n", k, s->stiffness); + /* + if((s->ij == 109) || (s->kl == 109)) + { + printf("length-L: %f, f: %f, len: %f, L: %f\n", length-L, (k*(length-L)), length, L); + printf("kl X-x: %f, f-y: %f, f-z: %f\n", X[s->kl][0], X[s->kl][1], X[s->kl][2]); + printf("ij X-x: %f, f-y: %f, f-z: %f\n\n", X[s->ij][0], X[s->ij][1], X[s->ij][2]); + } + */ mul_fvector_S(stretch_force, dir, (k*(length-L))); @@ -1157,7 +1170,7 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, k = clmd->sim_parms->bending; - scaling = k + s->stiffness * (clmd->sim_parms->max_bend-k); + scaling = k + s->stiffness * ABS(clmd->sim_parms->max_bend-k); cb = k = scaling; mul_fvector_S(bending_force, dir, fbstar(length, L, k, cb)); @@ -1166,6 +1179,12 @@ DO_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, dfdx_spring_type2(s->dfdx, dir,length,L,k, cb); } } + /* + if((s->ij == 109) || (s->kl == 109)) + { + printf("type: %d, f-x: %f, f-y: %f, f-z: %f\n", s->type, s->f[0], s->f[1], s->f[2]); +} + */ } DO_INLINE void cloth_apply_spring_force(ClothModifierData *clmd, ClothSpring *s, lfVector *lF, lfVector *X, lfVector *V, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX) @@ -1258,7 +1277,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec init_lfvector(lF, gravity, numverts); submul_lfvectorS(lF, lV, spring_air, numverts); - + /* do goal stuff */ if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { @@ -1275,22 +1294,24 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec ks = 1.0f/(1.0f- verts [i].goal*clmd->sim_parms->goalspring)-1.0f ; VECADDS(lF[i], lF[i], auxvect, -ks); - // calulate damping forces generated by goals + // calulate damping forces generated by goals + VECSUB(velgoal,verts[i].xold, verts[i].xconst); kd = clmd->sim_parms->goalfrict * 0.01f; // friction force scale taken from SB VECSUBADDSS(lF[i], velgoal, kd, lV[i], kd); + } } } - + /* handle external forces like wind */ if(effectors) { float speed[3] = {0.0f, 0.0f,0.0f}; float force[3]= {0.0f, 0.0f, 0.0f}; - #pragma omp parallel for private (i) shared(lF) +#pragma omp parallel for private (i) shared(lF) for(i = 0; i < cloth->numverts; i++) { float vertexnormal[3]={0,0,0}; @@ -1308,7 +1329,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec VECADDS(lF[i], lF[i], wind_normalized, -calculateVertexWindForce(speed, vertexnormal)); } } - + // calculate spring forces search = cloth->springs; while(search) @@ -1329,6 +1350,7 @@ void cloth_calc_force(ClothModifierData *clmd, lfVector *lF, lfVector *lX, lfVec cloth_apply_spring_force(clmd, search->link, lF, lX, lV, dFdV, dFdX); search = search->next; } + // printf("\n"); } void simulate_implicit_euler(lfVector *Vnew, lfVector *lX, lfVector *lV, lfVector *lF, fmatrix3x3 *dFdV, fmatrix3x3 *dFdX, float dt, fmatrix3x3 *A, lfVector *B, lfVector *dV, fmatrix3x3 *S, lfVector *z, lfVector *olddV, fmatrix3x3 *P, fmatrix3x3 *Pinv) @@ -1391,11 +1413,23 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase effectors= pdInitEffectors(ob,NULL); // calculate - cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + cloth_calc_force(clmd, id->F, id->X, id->V, id->dFdV, id->dFdX, effectors, step ); + + // printf("F -> x: %f, y: %f; z: %f\n\n", id->F[109][0], id->F[109][1], id->F[109][2]); + simulate_implicit_euler(id->Vnew, id->X, id->V, id->F, id->dFdV, id->dFdX, dt, id->A, id->B, id->dV, id->S, id->z, id->olddV, id->P, id->Pinv); add_lfvector_lfvectorS(id->Xnew, id->X, id->Vnew, dt, numverts); + /* + printf("dt: %f\n", dt); + printf("Xnew -> x: %f, y: %f; z: %f\n", id->Xnew[109][0], id->Xnew[109][1], id->Xnew[109][2]); + printf("X -> x: %f, y: %f; z: %f\n", id->X[109][0], id->X[109][1], id->X[109][2]); + printf("Vnew -> x: %f, y: %f; z: %f\n\n", id->Vnew[109][0], id->Vnew[109][1], id->Vnew[109][2]); + */ + + // clmd->coll_parms->flags &= ~CLOTH_COLLSETTINGS_FLAG_ENABLED; + if(clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { // collisions @@ -1404,7 +1438,8 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase // update verts to current positions for(i = 0; i < numverts; i++) { - if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) /* do goal stuff */ + + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) { if(verts [i].goal >= SOFTGOALSNAP) { @@ -1431,6 +1466,16 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase { if(result) { + + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL) + { + if(verts [i].goal >= SOFTGOALSNAP) + { + continue; + } + } + + // VECADD(verts[i].tx, verts[i].txold, verts[i].tv); VECCOPY(verts[i].txold, verts[i].tx); @@ -1515,5 +1560,7 @@ void implicit_set_positions (ClothModifierData *clmd) { VECCOPY(id->X[i], verts[i].x); VECCOPY(id->V[i], verts[i].v); - } + } + if(G.rt > 0) + printf("implicit_set_positions\n"); } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 475009c8fa6..7f378f136b6 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4987,7 +4987,6 @@ static void clothModifier_updateDepgraph( Base *base; - /* TODO: this belongs to collision modifier */ if(clmd) { for(base = G.scene->base.first; base; base= base->next) @@ -4995,14 +4994,11 @@ static void clothModifier_updateDepgraph( Object *ob1= base->object; if(ob1 != ob) { - ClothModifierData *coll_clmd = (ClothModifierData *)modifiers_findByType(ob1, eModifierType_Cloth); + CollisionModifierData *coll_clmd = (CollisionModifierData *)modifiers_findByType(ob1, eModifierType_Collision); if(coll_clmd) - { - if (coll_clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ) - { - DagNode *curNode = dag_get_node(forest, ob1); - dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); - } + { + DagNode *curNode = dag_get_node(forest, ob1); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); } } } @@ -5220,6 +5216,7 @@ static void collisionModifier_deformVerts( dm->release(dm); } + /* Boolean */ static void booleanModifier_copyData(ModifierData *md, ModifierData *target) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a9d2e7d05a1..4feb8c00659 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3015,6 +3015,9 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) clmd->sim_parms= newdataadr(fd, clmd->sim_parms); clmd->coll_parms= newdataadr(fd, clmd->coll_parms); + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_LOADED; + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE; + } else if (md->type==eModifierType_Collision) { diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h index 93aa09db349..7d2ec9b96b4 100644 --- a/source/blender/makesdna/DNA_cloth_types.h +++ b/source/blender/makesdna/DNA_cloth_types.h @@ -82,6 +82,8 @@ typedef struct SimulationSettings float max_bend; /* max bending scaling value, min is "bending" */ float max_struct; /* max structural scaling value, min is "structural" */ float max_shear; /* max shear scaling value, UNUSED */ + int firstcachedframe; + int pad; } SimulationSettings; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 4f23d60cd67..e6046203c4f 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2352,6 +2352,10 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { + // do nothing in editmode + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_EDITMODE) + break; + /* force freeing because user wants */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; @@ -2372,6 +2376,10 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { + // do nothing in editmode + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_EDITMODE) + break; + /* force freeing because user wants */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE; @@ -2386,6 +2394,10 @@ void do_object_panels(unsigned short event) ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth); if(clmd) { + // do nothing in editmode + if(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_EDITMODE) + break; + CFRA= 1; update_for_newframe_muted(); DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); @@ -5211,8 +5223,8 @@ static void object_panel_cloth_II(Object *ob) if(clmd) { - uiDefButI(block, NUM, B_DIFF, "First Frame:", 10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); - uiDefButI(block, NUM, B_DIFF, "Last Frame:", 160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation stops"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "First Frame:",10,160,150,20, &clmd->sim_parms->firstframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation starts"); + uiDefButI(block, NUM, B_CLOTH_RENEW, "Last Frame:",160,160,150,20, &clmd->sim_parms->lastframe, 0, MAXFRAME, 1, 0, "Frame on which the simulation stops"); uiDefBut(block, LABEL, 0, "",10,140,300,20, NULL, 0.0, 0, 0, 0, ""); @@ -5244,6 +5256,7 @@ static void object_panel_cloth_II(Object *ob) { uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Min Distance:", 160,60,150,20, &clmd->coll_parms->epsilon, 0.001f, 1.0, 0.01f, 0, "Minimum distance between collision objects before collision response takes in, can be changed for each frame"); uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Collision Quality:", 10,40,300,20, &clmd->coll_parms->loop_count, 1.0, 100.0, 1.0, 0, "How many collision iterations should be done. (higher = better = slower), can be changed for each frame"); + uiDefButS(block, NUM, REDRAWBUTSOBJECT, "Friction:", 10,40,300,20, &clmd->coll_parms->friction, 1.0, 100.0, 1.0, 0, "Friction force if a collision happened"); } else uiDefBut(block, LABEL, 0, "",160,60,150,20, NULL, 0.0, 0, 0, 0, ""); @@ -5330,9 +5343,9 @@ static void object_panel_cloth_III(Object *ob) MEM_freeN (clvg1); MEM_freeN (clvg2); - uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff Max:",10,70,150,20, &clmd->sim_parms->max_struct, clmd->sim_parms->structural, 1000.0, 0.01f, 0, "Maximum structural stiffness value"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "StructStiff Max:",10,70,150,20, &clmd->sim_parms->max_struct, clmd->sim_parms->structural, 10000.0, 0.01f, 0, "Maximum structural stiffness value"); - uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff Max:",160,70,150,20, &clmd->sim_parms->max_bend, clmd->sim_parms->bending, 1000.0, 0.01f, 0, "Maximum bending stiffness value"); + uiDefButF(block, NUM, B_CLOTH_RENEW, "BendStiff Max:",160,70,150,20, &clmd->sim_parms->max_bend, clmd->sim_parms->bending, 10000.0, 0.01f, 0, "Maximum bending stiffness value"); } else if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SCALING) diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 712c9ddc4a9..94ac17ebd6c 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -862,10 +862,11 @@ void make_editMesh() cloth_enabled = 1; clmd->sim_parms->editedframe = G.scene->r.cfra; + clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_EDITMODE; /* inverse matrix is not uptodate... */ Mat4Invert ( G.obedit->imat, G.obedit->obmat ); - + if(G.rt > 0) printf("make_editmesh --> cloth_enabled\n"); } } @@ -1017,8 +1018,6 @@ void load_editMesh(void) Cloth *cloth = NULL; float temp[3], dt = 0.0; - printf("loadmesh\n"); - #ifdef WITH_VERSE if(em->vnode) { struct VNode *vnode = (VNode*)em->vnode; @@ -1106,6 +1105,7 @@ void load_editMesh(void) Mat4Invert ( G.obedit->imat, G.obedit->obmat ); dt = 1.0f / clmd->sim_parms->stepsPerFrame; } + if(G.rt > 0) printf("loadmesh --> tot: %d, num: %d\n", G.totvert, cloth->numverts); } } @@ -1115,6 +1115,7 @@ void load_editMesh(void) if(cloth_enabled) { + if(G.rt > 0) printf("loadmesh --> cloth_enabled\n"); VECCOPY(temp, cloth->verts[i].x); @@ -1129,6 +1130,7 @@ void load_editMesh(void) */ if(oldverts) { VECCOPY(mvert->co, oldverts[i].co); + if(G.rt > 0) printf("loadmesh --> cloth_enabled oldverts\n"); } i++; @@ -1166,6 +1168,7 @@ void load_editMesh(void) /* burn changes to cache */ if(cloth_enabled) { + if(G.rt > 0) printf("loadmesh --> cloth_enabled cloth_write_cache\n"); cloth_write_cache(G.obedit, clmd, clmd->sim_parms->editedframe); @@ -1174,14 +1177,17 @@ void load_editMesh(void) { cloth_read_cache(G.obedit, clmd, G.scene->r.cfra); } + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE; } else { if(modifiers_isClothEnabled(G.obedit)) { ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(G.obedit, eModifierType_Cloth); + if(G.rt > 0) printf("loadmesh --> CLOTH_SIMSETTINGS_FLAG_RESET\n"); /* only reset cloth when no cache was used */ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET; + clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE; } } From 2fb9b30485db8bbf4ff24302ce3fa9780d89af09 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Wed, 23 Apr 2008 02:20:01 +0000 Subject: [PATCH 086/430] Creating GSoC branch for mxcurioni --- release/datafiles/splash.jpg | Bin 79258 -> 72804 bytes source/blender/src/splash.jpg.c | 4756 +++++++++++++++---------------- 2 files changed, 2277 insertions(+), 2479 deletions(-) diff --git a/release/datafiles/splash.jpg b/release/datafiles/splash.jpg index da88c0b8eaa25949fcb6fb74401fb7fc7b67ff19..0d328ee4b7ccf066eb69d138884cbeebe3d4d44f 100644 GIT binary patch literal 72804 zcmd3NWpJE9&)AtMF+_UWJb?Ez0Gha~iM1yH0ssvF0MtK*E&#|P zruN2W0Mnk25s3FSKrjFj;val`Lqb7*e4rpd0P4R33>5SSK*7Mkz{0}9z`()5!^6QL z{)12d6CghDp`oDRKBf`j;o$$5ng5CMzyI;x13-g^z=ODhff?d?U;u#jLHL8H2#m6kBL-|>0vRjZpS-%> zS^hj3H}Vil#6j;|9h&xIJ;W3!RUug)R|Q?-{zSjub_>PMv=BUn;XK#e&@ z3Y`V`R2|_+^zq4NrQ}MQ5qmo;aYof6>0`X8VyMMOM@a06+W%IPYDv)mq|5{|%mU35 zW&b}IJh)Vi7qA_@5Q{qhR6lL+QyfgO2990*(SpJ@brVKb?OMcHB=B@Stzq<(2(EW1 zhGD>s7P)j^*jyf8=%mazE_Vb>26FMZqm#F0N!nYNLkV4OR&=dw2#v3}X_IE{Na#n- zhu3f~NJypQ!9|eV@|})*O_#Pk$Tp0%Q(PWE=SyGNAuaH7mGHu;)l3%PZ|%vMq52R< zhTqek)XaClFVQ!k*L=k*-;v2o#bZ~>+iHR?4Z61+mb`;2Ess9LRe;jUu#Ia;WqhD~ zYdF4C(4`So4xUOxTW9t_CcYHsa|J6ZWk<16WsFo!H-}F+)iXMOHXbS2P-UV{RM{dT zKZO%N{v})SBsjxV`KZD>@KW-IP5^aJid62hk#LF^QQUhlU`bjS_99$Ieuj9?AT*B+ zmv!&<-Sdpj@$_>WMaInz3H5=t8Yj|4y-GgD1O(`o&tBda|M;RxQM(v>#wEelljz%D z<}6>SS*D|Ag^HnCloFPaIN~!}``^t~U4u_2=LMa!XKE34+QuWC$5+*L>gaNoKuhGZ zrot3THJRao5L&@kmsj0_^|`9+^Y7n38A^=Z+BHk5RZJG9!bF9VlnCCtmoy7z^BK8a z61$aTeYdxX$$L)T8lO&$Z&n#oOe3V%E>DK-SO5CwY^+vO%TqQ$ldZvepj=~Bhh;~j zYtVfOL{#`}Xmd&Zok?iY+uI$v9C~N`_jq9160WPAsM3xFXr2qQ)64S4;cTFB;hUvY z`15Son zq$y)jCXkfp-Zk>RAFjiloHsqo59eD5)s@@NEtSLpX`6DfDa>3fA{rn&AZd#}|F>NA zPb0u}0s#3sD8YxOT0^eU7=gOQ(U3Ro@y@-w%^i2?61b67&#=^peV95{Q!T*AEWIsS z7+N(`#J>9Xa)5Um3kxdm5+%Ph7k+PF6obF!pJJ z?1Wr+GG(9G&6(gk0BhFEeF5{%h!oYx)MMa{7pmgj=l^S<8yK;$u3x0~7h54=ntoL5?YQp`uEi6>Xl%Y<6kR1 zs^0;4yS9!QpG+Z4M*ExVz8=w>{$FpQ$+FoZM)kA^9g}fr3Thxq{xu0<*AiBGnG@x} zG{A9$Sviw#LC&l&( z>O4j%E|F%`_8(=JaXV#Owx^ zgte0VU+tBQXU~3C$v04qVr8*!rk~bq5*Q6f_cm)7q)g@78xrKq=`TaW(m{UmjWAqe zje-L1rxjSYpI0+1w_i)0rtM^2ZY@tT*G{Z@y%W&+!>`Zkabr(RX;E_FRu091HWWOA zmO6eEA&B+{ZDZ3t+yhoy6>5eD$cRS^(60Lr%aMJ1qdL0Lt1@86KJ?@wvcg0+z-LJn zH0Z=0T1hH#071&=TdA+Fr$YByb}!GN9;Q0BhVb$MWL%H(C;O3iz>DHj*SbeqWmgFf z_d0(^Y^aH$DW8w;dIi`Q_qJOkWnN6&ip1s8^WMYz8HfG8fEah!^BntAldP+1NwDH$ zV*bw3NSTqD?t-||l7Z&&PqeHBs|wPo;}^w&hD4NzPns1^1>D;%SyjVEAYvp3$mwpO+Qg%63oVqwPp`9eR#_^F~Z8mi1b;D#Sm=CtoV;eNOWd<5(22oPZn<>`;cq zevwD%P2c*ASyH5tdOC5!|jx@e8}d?JpfCe8Xk$%oq0EdhPYKzgsF1^<_8Z8pMgKSEjxozod^5 zqOK8tD-)?Cj&6nH{fy%Em;Sde5_ReBw4Hc)rEIWgD&8+C_j{VhhYDtO-;VR8((ZBD z`7V_UR}5lMSB1oz@%&4w0Z5;WCXQ#UO~*6kdS@p>Gz0>C)Ob5#Z8JEPkIzLY#VGRJ zd$tqeuQ6U;*_D$Z#Af4?CIJ5&e!dltcAC|heppgH>c!oA`S4S-aXesumnI{msNbgr zxB0lIaXPt>7HFH=D+3vz60xs?s7HvMVVICYGoOgmYB#idQ4rGuKog-W(;=>N+ z4+uE5IE5P4jD8wbTz}d?KwR@i4RV>?=ew0q`((qNn1FbxHE<2n!h`A!%*%j)%|p)Y zU_pmFgIFCW(&TcIRSa516zZ4uc03C1>H5%Y;qCf)O&tm-edGPPpxN5GYyLn!YP5k= zH|V4RMljz~nAY^@&}(mqQo#jJrsQ63IJ0(D?&hn7} zn^ha#P^O4%F)EpwyKOhpR>b-myp@ZY`3qFk5t|dU=up<8L7!Yq=626Vyo1GWSCley zQLW-9OJM7G*#=mAnuMlkzb4IgPA3Ma_-a ztauISub8FOIu^CB=BckDQlSn@UJNb(Drwl@UhwXFu1n=xlk#{2oddV9;jAl zcT-=*r@&iP=Q}R2gr2Vdd_x+iBW?4&(s)&~N1A6U)wC@?l<7j6j3Ay9$y~oaw!3^m z=}&2{TTlj<14P&c4%^&QwUiuggL|_>gusEsG+5hn$h*e7`<_F8JO#{jD|B*o|Fc!N zMK|;3U7(XsA1LDn>dnX&2*4`I<3J!$YHHcx!RPOA6lM^yoxIpxe<-P-n8u&DVO0=8 zhKIAhCh%~79hg(tc6Zv1+Ek}n$E`W2UulsrCKy)caZA+#0Ku@eU=SCF6i`CcvSRQxor6I`v4w#tv`<3~^ z%|Q3)>ba{fCB^X3E9~48_8~y#>9B^ypth`ApQx!__eiSt=6M|K4)uVc#eE)86g<+d zx45FJyvEM2LZh}bl8=r6o*}f0`h9+)8JV}E`0e}+Ds$*`-L5(<*0v!Iz>~D{qDa!k z@X*}sSA5}D#D{;1zYyINd*~j;Xtj$s1e#xN(y28 zU97#n>b6aai4{crHoYpH^!Ly1bZT^m2^R|egI24j)Na@C+Us%<_MhGU_}z+X&^zGZ z(^yptv#S8T`9mT1e)gnWm%dpuE~!0jdQv4T!RNww#7GqjIy%?!C*&ksTn7TPFL55} z`tI|xAv|AH`N?T9&c4zv!GF*}ysg9M3<-7*YtE3wGEFTc6S%m<=AB)$Hbi|1KhpAK zj6fac9HB_$a=tZ)wuk}oLNEqxO^hF(F_PCdg>mR8D zGE58|)`LgbNUNA?pHWD-*J7%mi-0Q9BtfDa{R*(q1EJ)Rw_oHG$ds9obIYD0{~zwX zH{&({zTo>kCc5PD*kaKvId|;P89g&3vH)tG#cAXf_CwsybL2`>!rzy|h;}Llw9#_O zg?~NUJHPbu{c>#IPV2Z43=7d=@hN{b?i2>;ohMSuHm7bji+f4zKq-zWI}U=>l1c5L zujFaVn}-o|DM+=cl%cs9P|$m7UlPb{Qe!oHP^7Vu*n>ew7clHq0cY_XA37&8v1Z=jUPF0P zZC}IY=^TeMXZ`U@%+xR#;o8J>#@J+u*0VF}0H)I+ukxi`u6`$y1cufopjx!!&U(DW zGW;v*#wR}&Q)r5*!>D(Fci;mJ|F1i@rP$0kP`IGH-6cpq!gNK!&1ro7T+6^aY9}he zxU(!OGk-&s722|nddT$}2e+@0%CaJ`F$4=U9;jCqUGU`$$_HWIvH%^PakwFtkbDu-~v+>(#n>z!l~Xoy^+Vfv%E6?dSK3>+(<}{kWcSv1`;CJzmu}YCK-3Tj!ZU z9ygMFUNnwX@32cHd~jo|dRatQR)lE%XXcwL27;$kI3S(JZizgM5uj1-uytSJceK~Q z;v;dKx=10@+E&Oq@9k`~A`4VEV8|^asbYjFRhuo)9vMYy)>`|uK5D*~5lk`E$G}Rl zV&gG>EHksT?P))nn5Y&;42{eL1|sK`5l>#;drn^7Sx$Pv|!&?iAq8x{HQg< zcx6&|!^GeygEfE{v}^cTa=gUI6WvE88rlO^59S1=-XOzPf1#z>vI*Ft7vGo_rF>A7 zC8i0G$&r&jwloAN7Z36URaXF3t?|R}uU<6FcKD*`Yp#zk1o5NHRNHZ)SG5{@TG-F8 zij8UaDFjEvWNI>t;`M|nAVmJ4!&vKG)WtDUT|ScU$T^rT(rh4h8XMy;b`tsomQ>k9aKmxp7kSR`hRgGsBy=xAWH6zT zGTmLp4g5oX>B83uG915I()nhZUCTo2(B5hv3&t|_xZbdI(zbRfGUuJmhoB0y)Wkb; zJ`*^bn z2YK*`bx5yv=OIXT|H6^(7Y~64W(uPnwW&pj)^6Ta@bYGb2NexXmlS0019NOujOg&I8@1^pC&7RAV~nf zFhve(8S>zptWY|2LA$`9VDj_rWa_TFK2se52o2$ulwZe{#$^P-l|yL{Lr2xuSNqrL zCx%C;gqRj&ywgXEE~%bdNq>ciFDtroEir9=UIo88UV@#d_*B8igmcsK&-24h1#}c0 zZ7%La;`Y4G&U+O<)^7-Or?{>dW#Ebc8@b(!&(#%X-d3e8;ruQ}Y0+Dg!0mHHBSUW{oh_oub zuLvFVJUTpCvem2Yt98fNgR1?P?#}?;W=@$+;dg*!4%2$GdTu-(ArMc9S_9?VE6kfo zwEOko`n0ORwfZzsZJzQFUyP_Z0e%o2sf;*iT-s7ZMtaXDzYQe>cv^XO(GXyfqGkf0 z;m;nGuswZgw_h^%grkg$)=W+_BK2teg_y|D`5}1!X!Ckyw3Fd!`eL}Ob%h+qn%aq4 zp>-I6z#znRd?v znwvW*+LhwCzXNEMH<%}w?oLj>b`58&zQm4QFuM*+d`EpM=>CqK2A@cf%U&LW28xp^ z|ICdx6s)5hAD?uOvlWeZn32!D1Kt7519J3)7w-1Y)0y<-gM5K#p#=)YwC1~zER($icA60Q2oWLDcMEG4{L|AIIbm~y@JHc zd4@$^*#ZV~&YZJ+>4CfB84dP^X$4+T;!qh3l>HejzCDLHM{q?P)m9!GP?1=^b z-GtOR3zd$1!R^!C%8RsyY7p557Rz612Cyo&Gm zj>lVYneFRBXurVOXVq`y_kk#pLmJN#&v3-57f6R`;<2~n{h%rF?h)%)SZcfNCDoOZ zyF4!#Gdl~o`ird|VYpJM#&U?}f zr%Mje&K1?qmTO=45KtodTLZ+Jx5{#+RT~H!M*W#SO*3@$8Sx-9wCm3fIyllG4<(+j zvSU#;RX84iuCvJ6=RE?eYQ*;xx(f7+U6OwAiD5jjRWcjwEZNJ|t3YfG5cO^OZq>s* z0-vgSpWTme>i#OaGYty#jGM|2v1A#GxT#LEcxDjsg#Kp~a;Bxr9Bcn2)=Ng%8$h6`XZ)7O=bYv4_PXLDv2=mU z$ux&FVlHJQxd|zkT(tPDmEt#DVsR=VV?i3`MHfXOkujK_zMOM3APspIj`Pfy7~Iy@ za0)tB$Dtx-*+bZSt*US$P&U|cSHwF1QORh!$y$cXxIx5dX$~#5-?DdH<~ZOi=Te$i z$T($QWO`cp{kxI=)!cT0774r(}Q4c1 z@z}l(*a4LBO~9d{H;{U1qB@PJD|c4 zsLVac)}2Yn*7~FmG5_3cr+SVRb@^`5|{8tAORx;cVk3 z7FpzzhzX}e!i!bNP1@tcCx|M1#RM1Wzb&x5-OiTf=1t&q`2E6c$eVc7 zoClkKIF}<9%vATwN~}5*ACV=?BT-%B1VBe(g>}0;u#QhLRLimV9Kh>%ut7UHyiMZx zhFDSSXXi$Ikb!=gewG5tsE~-A*{!X*9E`CUI(M$F1g6klQXbQ`C@`{zcKyv;M*M~Q zWYef47Fwb@qyiC!`h~}ZG@WDate1!DF=yL)cy;P$pMA{z$u8Zi+3*Fu+cJe-bt?6n z;eHav^bHz27F3{>*04J#IAXZuiZkoK6O{Y}3<+FaA# zer(Jk70;bMdLW7}GlWcjRwAFllzXocCx!GtNtXtwhy$T50slKpltTP5!Sc^;bwECy~9YB;2W1jBX$B}tupF+hj;8}m}c=@TSWQP{0B8#3? zBl=k?w87~LhKv;*OhG^>1t}%?Cq_RjN74*sKK0uL*7p!+pq@FgTsVCzWG&eEBtspu z@GPd9YonY3mK(=>arG{b(6rUB%|rCEh607zy#@Hk&4Lt`iSuK zK$>#t=Y{893hv_#Rp}S`QI>AEAc<-0jdk}plF{t`vzEf$L)(bpaSYrBXi+I5>ox&U!r(EjYTvn^Wh(aK*_ zr@>ww#7sf4;8^rmJ=S^^El~f15pn(^vV-EGL&#jd=W-e{FV|<1{sO-x<)}B8`lfk5 zd`Nr7M()H8gRU|$g#MH$5NN6EUuZq%>=$FApeTPGaK?iEyg|QM+tp~ggxwZCaUb#J zb&^8!Bd3=-MH&azX*qa+S&x!I`sDbTHUG081tjnZp}4V)Yu4ryFk+qDksvnVKH&14 zq5f%UVdACbiz=El|4{us`s5jMn@n$1pzz^(fGlPaqKX zuOc5O8}d@7Yz=7-`X`1n>7lY|Q*#P;2#lVK`4?WcP&5jMSqdwkx120meZ+x%D73~5 zWOBQp9i}tA5%H@<;p2vmFI)$*T%6NOYh^f%<5@`T@~Jxu7mJfIN9c9#CMI8P9TrGY z23uKN7+TK4bZmtXr+*ffQZhy)%ni_Qkmm)(lsHFxK9EQs80-OL>wKK}U1_!LQ_V{2 zVz-;3;RC|m(b0{80LQ;k6^3&Q%?s}4EDA?#DgEu{-DGFpIkx8y?E|e>-sX|quNG}EnHZhuUkM*BsWI=jW$c{=2{T3M;kpNcc zoF7aCzXZAP{_GbpXQaCqZBDf#+!=Y_r7$fFq$An%#N6jA5QWAa5Xt4dJqd7B? z&vE3o^q)Sm&6r*LUmef7o3#exuu~hb)z@KX4oC6^FcAoF+og4atVqQvi;@)EysUq9 zEftOn3y+PW^^567FC6Js=IND4a zBU6uV_)d$xri;%{@K4|z;qPkGaiuT(D6GVRTPHm)y(WI9EfaG1yf57t*6EY+Q#=OD zE~*Inn+NE#CWR4JX8CJI^wd%3ttvFqr3=UbUXB={=G(2H5vQFOg3~S0-*;b5zAf<+ zmRMgz*hj3i)Ed=%)g*g(hJ88mXUDg#s3W}SuY9dK({KC)`cGxJ8aIX2CF;qPXVvK>!j;U<d7TjN5pXD#FD=*}?`e_&jfcJY<+^E>&oW*=G0l>YK&BuNzic0sLxss%Ib*wW>~b<_3>XE$C> z@pk*mu(b?p?2N*}cHW!u1^cIlT3!uFL1_|ce-)?XW_~kVI}+RV8%UFvyz~=&xA{|! z@;_v)?$O{dqqc}T*%6s>R@B7cmdINrM6!aOUrq@bQFS}*xWd4nd{(Uuyyrrme2n1g z?a4C`u0yxmbIZp8icc?^=-9Ynouxe`5-Jt6LfbhSx-?prJ2nGSYs!=8-H#Vp5>rs; z!CGWYkFH40aY#T%XMV{&9gc!3uE^*{KeM*w&@jU%$6htTz(C!c5MG_^9a)l48o6yg zH8|baSaFAI;l8|KSVB)&i@?$A8u(iL=9{h&{>RA`T+u1wSs94x2dT$;X}HuBJ4cPdmc*}A0I1ufb}82bEYk0P zVRtR~X(Q|YA%L9BcB>w0ZzP)B`%7}Esu}WkG!Ilk@;zwaF777c0 zh=ykA#`q`3B>Y{Pmrd${H>mx&9P@}e0j7m{YB@cVG1f=_iNCr7FOy6`!YNhgHZd51R zP_Mx9+6)br+!EV4;coyj-0POKgNrTdpI4!T7SG=qSrPWIop|Ki6me{+vk?YlIK^n`RHhy3ps}Vb`7X~!V(v_Vmhb)m6y~}+Wam937YrQC|H0lXa z8SLQT3h}|yJHL~)@0R3~4hUIac(%wVTY>q*N@}dHJnrXoyweYH3={0-RLNHIm zKsyI432UVX6PNvUcXkV#b8@UY9Jc)4<%SCDiP!nbuqSyc>w4(&Z05Z9T*#a}ki=Hw0 zSsV<6oHtK*r?~yhW^w3M1<}8Qx%sf;a~G1eY$64tMWZ2Vvb?RVN@Q|V@L3ZPkWL-G zY`%M;W}VhrqfPS7^XA1q}`1lk?p`8ds%06}a5&|phaZ&t=b@oR_o>%O8?{zfl3c2;mWTld)9 z&kV*9|H+F0E+*S!9>k)?+&?-LTpXlB>oTqR$*?JSVNXSC!9Tg}!~*bj!(ewX9?{I7 z-SXU-MPHMHLd>z{c)`eu={ns>`qUps_9YgUp~KO(CNkqU%Q9IP+2p1))N2hv)D%E+ zfb^ZU+?J_JghLPP3@jcOL~jO5K7(#1^|9=n@8;Zk1yxGQCU~U526U2jK4l%%!W}x! z`S*TEM=VWSm6AD1c~<79$Av|Fa&RF^>EWj!!n(CDp#*%uJ;32|b|#1~&DBD$%I$PO zLb$Cq0yXU+%aar+_(V*o6df%atU~B)@7qcK0CQHm$;Ypq5Hl)WRjvv6Rwd-Y+Dv5O zDIh^h$Y(pHiIcdA*}ivM+6 zA2JC&wtHo_KIZU!8&Vyl1YU2i!&uPo@}CZtKgDGU?boa`&j<0uH?I40U8;Rv@lV&e zdNCaZLWmq`s#BlI{qa{Q_RBwjx?cK7f+}`YDG71;YjVMt`c}GQACyB1N?tw*{f!L~ zD$`DQ(|MhJ1xkwNE58Fcax~4Jq=#8@(*DqdxWSclZMmwws!Y7?`yKlg3Lgz9PO{Bg z{j@Dh<@cmlDlbDm5RBBYoT0u`<@cvFIQDB?Eo(NMgz5%eBf04!W(h7geF%8>KAFJK%9`rsHd#>6-Th&06IXkA9+tmZ!VX(Li=Kk_CfZp zOp*!nr}fRJJ6aFbSlQa;-&jq5=)`5i+4mJ!(_N~c8s^C+5q)Q0ty~vc%Kp3qzB0Wk zdeR#IHvOzpp&Y|Mca~NtSaCZ>#9@(L7+K;Q8Z zn3Ifo+rPv1P4O;znu9D7d0BjZ*+o*TfaND9)Bs`{GIFA+C?_U7Y}x!4I_S;c@@zkziwY~yzM-*BOF0|2Q;yt#7Zs179nFTd?;N!=35xeE%8K7 zd*ZgU(~2oNLM}1AP~6ImSG8aDozP30@7$|Jww^Yw_YK@so``tZH|;qVLl5}to_D|< z$15+UU(KD0|9Hs@+pDFg!=ZG&TI-wXTR9n>X#R3tv(l)ROfXW}3L&uY5{1xa$5(Nxg{QjPrCSA|u8{u-z>|h!xR077Z50yIz18AS)m%yuFD`_hJXmsvINon ztcu)V`&2O>Fx%GoVE_Sg9@8~M=cd@rCB>hU8OzVoZ!DYV=+zjWdgr%?+Wh;47K<90 zhhM$i&G8|{vwVMo+{#TR-!gP6n5zWju&hw9?C$uWVZXwS<`==DeracAIs6GVg4LK%Ev7{xb2ec#VT%Z z=!at|?|{uF(mN@k|5(Z#Ja2r?B=LOEU^m@#OmJy@ercKz$~%Ct=(ygP5 zIDUB$cOtlGNi-eH?R&-ay?>qCiufW<`ECE7-5&s$hu;D0IVy%^^Wpb$?vu&|KlAlQ zi1<_-W@?3nZ0{V3ce@d28&?ojw^>+1EGR&N)>SY+cZ&S zhf$9aY@}Xi{-{B^^On4+|HG31lk5DkZ4zBdS}L&F)+WNJVBu}~tM!(lROqX|1DI<5 zOy3o9=KU7pczbH=Qe1W18oDji4d?S^bG7kRJ28CxC**lqGVGj5xb9|&mO^bCDqg>n zB<$VW%NO$^=JJdyyuN?Zk&}5%dQ5-HuqZpI{PL7f5t)c29nvuTV`w_YEQv*3K=I zO&9RJX`=O2J^^rte8{GW6jGI=;D+)J#&NGnyOOkUw!;`~{bX*H@YFOf^~(G4M;68L zkS}9GY}J=0wV5ufXQ8UW$aHanS(zTP)ltOdzH)JiIUnmTJ&Ocy9@wu-!f9eM2k@qFRmW!PnDzUEB{}Us1a{fnDN_T(dYyxsx zBcyZ5i0j5--1+SLD`fg>I`2}g{M%y5m4K~=2X`l8UmODtgksB(X(&zhE>Zx`w0s&@ zZ)L9d9-{w<5#*1X5>KIY*^kOlXjLM7yQ7VAg1eoVzj(@6Abt5rBZvA|iSz{}zd3!p zrqTesX1phG9r%kwrZ-yh%oZA9INw!7@=W(1F~vhzG`u;z6?{*+(R$+y6jdFfoN;;j zPRRVgT;}go^AXUBNFZN`f1&ty+)1iO5g-@-?QgS#YxsN4{gg7F^`8)(4^JC}_p5&e$OtnTt?~D-F4c|z)N_W{kQB)!S4^n!nWcTa5_uxV5Wd0Bw1*K5GBACAH9e`8* z4!H1Fbz9N=YxXqvBO+&FslCt1=p8^;KVMt&4(L}r!GsYS^uFz0M=p9D`{%G3OPIR0 zY4qx&%0CIx;dhEWH1%MSh2vf3BF%;vK)NwS2Ya*>Ay~B3{r$=#AW0osRLqFxXjS6K znYiKfl0}gPo+X=PJs7IrU_SA1Ye!N#74_PZZuM?64s!EIv4@r=DKyg19wi9&B7RpL zhxp%jVw=m6tLbrqTWhNE{N*q@TJZJ(t~E$nw}mBZx5Q-T0$$z#K7oxsrR`_dmPikcYrC@gmjTce(q z)|7+?>>8fS3H0<_bZ*^l8{LUSNg%Y5AwiME_6eiZuS(-U2hPuhJD^;85IPez-TqP{ zZW)S#f9c=6@{<~1$S#SgSKxUaOEN6Bo#Pev zwN=J4_UsEW2cOd5eW1$3UBL*MB^0N$0lub`zFwNYF%Q?1D5=7%e0lmG&^5aw`xBl2REB9L(6-T1lrfMP&eButvgdPz~vwrhF`?T16P3<@61GVyt4^xrXkLZA=pxGWkQ^(_)w( zzO!8V+IZO?9>R%_Y=1?Say4J{`@vBuW#oLiEs3bEjK4gaBDQPNXnhXaMl~2r*`eF2 z$@4jMQ<)w*IOer+VdVBNG@GUCW7?i4^s`s~F!iL6`w<=`_n!!f2wH_TdIpd@ohu@Y zWJ!&TwMd0I!kv^2ZI(k@nVC2ZB}wEn?@3bv)Q@CSQB!F*ek@*TdYh$lz9YFoZYIq$ z+=NTV_$!jP(V97V+;m2`3Vb+tOzaz0t8ql@>bZD=?k=A0X}Nou%YRJ0@7O z!d!sv6Z^E;Nib@I*xk`q57mNV$0n8D7W1e!BPB8R-BoqO-jGf)X`+&w-ecteGF=q= z+DchwK4!40a|^{$)v#-yPe@=(O>6`6M6fIj&7yirKnd}%Lo4eAJ8RNd$}`90{)$=R zZ{0vNL^qBUtrDG%2wFf}LF>JyXbN^BhG(x=w`qD)Y5GhbRELFhafF2CXBne!>KDNH zHLAKB#^kUJjy>KuLaX2S=xm?59b$K-jb$=b`ts?@_!cuk77oESN;lro)`R`yuKobh zq1P0JLrv>IC00?}N7?gnHB%Z-+aC#+3(LYVIIj6}ns!SR6WS!2W%HCIPqff}emax+ zGqx65y1}aUetGOaa0SoO&H_sV5Mt*MUCW5@tOkG!Ebw7=;^Stv81fqB3`@%ru9_^N zc{HuGlb+C)wHP)kNrRYWOMKP?Et*D{OVK8vh}1mBJBs-L7^%5RoA$H4a1ufq_bAx9 zURmeV;3{ZHxTWf_xllKvL3}#L{7U~+T{GQ11zUc75n3CRvl!O`l|dzbl_$r;nww0c z!jv)gwYwwEWfIICeOB#up+tFyyznu^@7vDyZe>Jy@HeX0K#7gpbB^JxcE-fiLDAu* zu8Q%h0SnA-JJm`m$05RV=3``=f6BgMQ=zk;K)WzuEZ zh#h7wYU2yOLNYSb$Ju0};X*fZ&t^`gk|r#CUdoDdqgdOcUEs{CMZmoOEYtN9K^d$R z{yLE2)KU8gO+h$%pU7_Y6)IslhW4w3Gq_%VY8&hCz(Qk?@{Gl1Q?wXn0gi5EhS}nw zJqv_N5u*sgjypvrK(L{tIy?rjqg(*w$2oKm5T3eywP@M;YQDI$&8Vjlf(C@BP04lP zu$8cQI6YF7^KvlS6_1}I!PwEvb&2+vA;(^5y3$L^eqg=H+CylS*LJ8fG1*G23K5)i z{qt8csyN2zZPV`VeyMIzm+JG8Kgw`De9s#3aDH#Xm&I~By>DTO!g<7@J7G)J{yyJr z3K&fo;q}xP9v{ZY1M~#4-G<%)-$pOAyrz zCE`tA6C&=h_4ca}&^AWDzXOmiCjz;-#bVJDZvR@PtkgoJAf(Zr67^mzzot#{Rf}3w z8NJ=|{;0T#BAgv6A=09E&QL0utMbtcAEAb?Dl@J{?pR*C5gFLydT?%; zI8J$pg7cF);8mvvy-=1~kF{^|gu-<)A9I=i^%>=O(ZEkUFIWB}Zj21&_sM4@JhGGzGEk*QKa&}i-k)gWzHs{!CDP)U=qFW;aA#yus|Jj>e+~|*l8(P7(pICs}8(NNMb=UJLBkuxgIbA0@ zg7oHU=91(NB1G&g`Tcx#YA+kTy+ga;;9Yo}P}c4qnNOp#w0@N(ysf>*wQV2TM^-1t zd_(aLsR#kyRNP08@^8@JN`=(zp64zKK>V#nAyrh2iXgiEvn`N+?nXQ$eAc znDJ5)Wd&20YnF#pl84q!Qb)f>V95n0**fcRogsxJrZ0)#>CmSTkStUv*Hv2Q3v&u3 zvPnO$QZ8bmz1?pz?s5uatd{^48}z1wpiQ;ZYiceM;XcdCA;j11rF5hsHBKTz*=+v+ zG(k!uNhjo<97TSb>eNkUJ?MWEsWwP6;7WcxwSx_0?tOAmHelFBH9h3K zq6lu3C$6zFGpr$%kr;(xT@{ObgLc#@CB{cD4-K_}{aH!NqE6T{{eH=fO~hPf3IW$D z2fX#u*JYcNJXh-`ypr$4=p=rv9vMJ#NI`0_cKli3AUNSJFOjdhnvlP8pOhE5cx=0j zo)J`3wCq00YGWyr8p4Sqw{xwML$2oLF60-L1_p(pZgeoJvxo@e+JE>V{qfIVayF z?Uop`t)(;7$)QdsRH%`wNa%|Tk7`}C<5+^(`Es%5EoQa$SA860T9Ak;d>bYwWV|Zn z7l`r&cBbe4gHV+0uree}Vw-WE?&HlZ^4ln)f#g6Hr8Sdw1%&ZLIe;nAyOnCZujJz; zC6@(A+JMtcdTfFnnSF{Kv%ZblUUtf|3K~&J2A&&@2F{Dk7CE{tH$Lpy@>d*nKqg}& zl1QfX-$$#b80e+@h|7vb{{Y2t{$dwyACJ2qS1M~?_8$u>er~Fr!!5V_#r0A+DG5L& zNl>R=n(T>-D)M$-=SRGZjmvr}8dIE2E70w#P+(M@9&XJN(BG2s{{RqxrF((g>aB#f zh-Sq%8n-a1Zn@SfM>G2LILMwUyued7I*d+JDv>-5ZL1WU8A>)f2PV^qu>~?32}+NMr;e?|ctze3i%p{#lLbqBr-O+F1pQ-F z?v;+1%mrR$H%ORFS@&3vd=U~>HybGYDC_;TCtiu@K8Y;bg_9o)2tRLf+35J@`vDw^ z<}U7M*Bs*i04j9nNw~{($%|cgD{+2lue_75p=<+d4hz1)tin!4t@xmwt8U|b%&pcn z0OaX2qqNc&urzQQYLQ?FTauC5Bm(=3>PxthY#oLX>`kc+st-75H2gNz7z!F}ID=28 zT(&V1w0N#>6BvUjo+m}keZkIcx1W~Co%m->iwaV!_lbG~P7-=nr0d5%pkWyGi`$t8 z{81A8O5l3Dg?Gqz{z*n>a_v!JH3~w2d~sOmUF)tY%n3-iSk~UkVDAJ;76#Z-hcCJ- z?X7=Sv(HZ;s`1JpCgu4OWXo;Gz$`ghR-HUGa~~YUtF>FXLVcN0nM|ldgGPl^>Fhe! z2TfI|MR~~+dbq`o`wFOQinjM}p;g5x1?E3-u9l`&!Kxif2;1nP_w~!RHj&KozdtMMkl6F(Ft)jEM@- z$n(`pjvszU#+1;|^*uG4<$!bw-B2ixWTD(LjIITdrIkgJ@=Jr*-!4k~0M`EiPU)i} z_(8apr-MhCWI^Hl7g_q6?i|kF_Hf0rf*OZ!oKsEG+TlTVYf3cn3uPzj*U|o;qBY1w z50WLli>AlKj_F8_B!30*>mq(bmscbJ zL_=Ee6jvpy^`4rX!QeTl2|?Vxi>Q4D=2q(-M*b(2Il~UfV#vpDO5H^e=A+6}$?@dU zf?X8esn%Cg$Bslza~}+W2f5bMa-1Z0eU7NQ3Mwyy{WWMrz2^5bU_?^F5zOO=tOqRIoA! zGUnRut)@DE5}+=g{j@EmG-8cqR+a;7mfNem0+cEJn(3UyD8bU*h7>gy8+D#eEo2?F zE%HVcg<)fhwOO2Huz-}ElnD0fy`o2g6!a@)>eXkx+?J%JBY_J^18;7j2+b|(U7jV4 z*WQEzK~g{`{hc8hf}l&F@^E`gGv&%vIX2l+0YBN*&}3rDJQ7P67&iA@lTJzmg?(FU z71m^=3W(-OAySL5(fA4?r|Ijd%N@d)nj+RwDr?QD-~@Jt-(@uz(!oC9f#(@D)(mp& zdXzcPr$vS^mlQc3#k;rpt?Jumkupk@kVnE5?iKOTrPJb2_oxr=g*UpCz;sPi= z=T)WC;t)iMDU!>dUT4CMACU=0FC_n(L`^okYI$m1ypPAuBEVmp*gzNr-g#=@{F&Plkl2-JL&v` zFosTvsx8%(*jFGZdB_A4<5RYQEN_WP^huW%lQC(KDA** zKu8uw%$c7qv~nsWd`ENBO%OHdaG-dtc@wwANpklTD6;3pQC;@XwnUav1wgRgF7M0o+)|R^2B7=(BTPbX zF_BL-1(2`W1l0ckXrJ|IwkO^Zo6F4E?>{kaY$1mLtp~X3!~h{)DQ@`W)LmM*GS|eV zq@KHv9R>jcaYH+WaJ(hom}Ls$w1kRR#2skY2s0{^rb;!FB)r77I?+mli%*E_wwTcb zFDgNL$L8M~N>Z{%BUAM9CqR`@1<`+Q>FXV^-7i=y`A?Jc72w%DdVjA|-vCi#Lj)Tn z!SWawqb`*nH-JB2(S@-GRVmWS0K47V#aIHNZ3w_jo_jlwLJWTdK~4lX2sbs=8hr(;GezPb00y3XZZ zn=H51ic@pC#Ez6SIFyyT+FWr0qyPe2ByHjE*CUS|w>M!y6+8;&T+6v_{{WYrXW*-D;r9Y+vWToiSt%{lfnNZ9 zn&l|L8&@%83XL1N7hjkW$0D9cNgMA@gnR!0Ub1sAL`RB^RPHIuySbvEV-}gLE8|*4 zN>5syXX0X==9ahRMpFI#8uc>=$)qGnDCx`)m5YeKz+cC zQI%UtF6U4oNVQ~sYs;W;rkj6unwc_*42Q4+pyPJC93@ENl$Dj9XKtYBSt&^qM8t@; z`0cI8fFaP6N^P(jt87ez6eAZZ4bJ5%Rk=Z>d_eW~(CVcWx!01@tOjLr`cb_u*OaDv z=l3mfLb}mKWBN7dK9t3KjfeSSS54{MUDp%bRjcbmKmKQeNwz?IdB4hUjwuQ8DzrY) zC$8yAl})wmT?ifKU7-F8pt`YEo#A}6m5@AVp$Sn)QiFR_!^iaNb|H#Z{G|Q0Sk#9a zlF{Tt3#!r+*N|6Jw}pMWJ1P;9wY@*wS8U1|k_cBdritFX2;W&b?gOrmrBo;IodW3J zTDIA@I2cEA?a1Q&&fMj;=AxojC6^Pw`G|U#pIaY5*o*n5K5NvsSII5K!Q%jYhy|W{n+2 zL2J%4*ILXZveTSm6mSB&9U8jyL)3)3i@uATiLEc=#wPdIYSLr>6eFq8J0k6qNB6W0tvVl^x1F;sR0u z@uhS*$3+#l7PLKgyP{;n_{*sk_UJOa4HUIR=h-CKVar7I(Y2bkJ=Lhyb1l+voTaAI zB1{KX55v*3s}Y|flvM0;ORqD^TBw-7C==tM%mj<54_(dMC{SrtX-V)tI$;n3aG0#p zBiiA*CMXrF?gQ`DTck)%7v-}14Tru}L@C#l03OPn4xuRoq`^qZSC7U~f@oF}3ad`1 zf7hZ{T!D1SGUF08STV>*Qo`sDzeMv(q{;1f+e>x<4nRmyKnW(DM@>Z4E+{1GgXqIpHx50kG~x$RA0@K@s_h@kM* zIFc6OkYq<8jTIQRzUt5$0GAKGhfk|0KBxuUiT0x*04OqdJ$!W`BJ7+9uPO{U)*(vJKePzIWFSqfrqT~+rE0JJ%CR%Vb^WKXaI>$du!fUFG7p7FMCZ)32cI zmeRw5^;`=70H>g4AH~pV^4l^Kt5cE@Fh%Qk;w(_PCboW?6Kh8q=@gf0*ZZexir&|$F3{bu!lo{2k8&s~TMsngP&<=CkV1g*rm^z=ne|#G z!V#F{K_2EPMv27+#QT$Mi*XGxJ*A;(Qqjf1LWLe7Uf@qk>z~Q=)@CvOr81AR?C4Vx z2;HkCeTJvYCZTRYc9(w;@DCf3MQ2)-9o3_pmpAQ zT8*%_U8}nEi8e@{#LM2S=0)NZ*eQHEKb75C3a?&Pmzt$Vg;%dm=v>yXRQPNU&2Y87 z^~sipTDNFa3LT_~mf(v(E=vh?{4D|-LXS|BUH+0rq+;rwWu(f|?65*_ z5TZ0sp4o5BTKe){;1li|$m%7yE}x{1FU@veb!`mYy)lJ6hSx6FIuy2CEtNc!NNLEf zB`O;w3Q<8-dXSxY=c+35S3m0-Lq^Wu%qn-ckge!p$r4Q@ppnG;E3Yn; zU2qbRQ*F1%FrAkA767d_`e~p|*;SbdKPtLkXFQ<@@^R9xJNPJSRLBhq8HV76=4+ED z6-)_6k{cu_9<{ACYF0Lh;}kmAa+wa!t6W<7%h-JYQ%EJX*Q<@1OVgvgqeYa`quO-N zosp|<2K-CoH&UXdEhpmkP*YMQA?+z+KeJq(zZpzd%c%yQ&@`YzTS|+L!^&(Bo|OAX z%6H-AL+sS8oLxl3psz%|Hi;KQT2PVg0*6moiBVz^?$Bn7deZWrRbOwG-$sf+iA)J7 zmA59mKX7x&2C7-#e;rYj;WFxGB}2(A*?s7|lyVF>cI)g1O)KFY6AH@AQy9ptkzI`8 zB}oLQua5d_G9na&5ll&$aqh0fxTuF*1Zwi0*VoAlD0N^$}RYO!A6WiPNk>S|F_;r{^9t5ukgp(vFm^f@fV*&~s z$qGYP8{DOWlqp3300*|3%MlyYwPmtQoUZ0uO%#@z6<=Qgttps@poer)#f>CvjF6-vV=L$3L=({5JVIteaCY`DGrO?v6=tVJ5KRV(WACA}lGQzNz% zEw0XvCQ&QmQ^=InX*36r@f!5srquyC$c`Yf)A+yKxB5Ga0qXN# zlES3R+m4o4zY>}C9+Y{eqz}P-%K|_2Bl%#A=8UsV&Uv{;+-$bLS z`EaxriG4JFI(BhAg>e~Gi@5SZr}w7f`j*SrR@SD~^DPG!y6{P%e&%CJsNEn2o$Bp*54vpLh7X&Dw}Q%1vFu4 zPP_#OM%DV)RMQcu~1H<(mtK>M8I{-WvtQ);qjxQu8423MY z#4QgvqJ>jn7L^^q*a{I%Q0jdb3qA%m);ov*5$;swNS7tiUApfLn<2WldA-FjoG42{ z#{U2nAesW9M9>m_rh~7B{!i7uo!yLOIwj^rY5@# z(oUQm5{M29Xf^xFwtF1_oRz*R3PP5WSIWDMtGC&#jOD%4NC9^B_AHU!X%W^v$Zf>bLQ-mS+}f@H-^>vHDJ(Fd8iDmqCAKqO+j?Izt`9G zXhyOWJm5-efs|TqJ-L#(ETu~%r34QWY5f`vv=Uv^;~-G0#k$oK0h=|%k2A|51IO;_ z7_u@hr68-$)!GGjXDfLn{K)ZHo@_ra19QHBU{&4zcTZWg?uM zO{yk0<~#s#DXCW7Xh-yDbC%=agDDqKF?Gh9V3Brk4hg8OJ@nF(sLYo@t<9qEe|};` z8D%O`h}+?%b#EAyqD!raNW9u+GjC5NDJn_;_JdE?qFFDD1VZU=3BdAuvyKi5NMqr0 zwek2)tjfqmI3?EXiph{$>|ZSyemgGFW86lC8z4%3P)XS4M{#yMxauLI09f4hIyU$e zfFvg@A056~@9nX0B~Vlb{=j$Dc?j-9vL!5_8w{I3uNS@+%9z8Wf_MpirNRo#3*FSzu zjZ)>-g+;?!@6_p8h&P1BdZ{SpaPJg$LZBuV#SnQdCy_nVoo<%2uh=p z5Oy0>{{XL2*i*WRhFjstn)D`6lH!M$gG&4K#Htcukq_OaLH^F#wN^<3!8Ga)w@=2c@UH^s(EL|Y8yak!!#L=aX#k|ZR6V@1 z5-Yd5x*hQm3f48mmkXi&HTL@>$C+|s?eg7vI*{)uh+3q!lEX&n?DM>J+g=fU!cf5D4q>8t>z!Ow_C#l|V5I^_t|XIZD?R zTa^HyO30~Bw*s;s!Jrv4F|vpTxQf9729rftqJj^2CYTW1b`ZGMlG^jxCP5`&nc$D zQs076w#qf}p`g^{2@Z)}qOu}2?N=wJbVr|lZY``XQ*Ani{Nw^coF;%Ibtb28(X4Em z-%cx_$Gpc=qUw(NX0w>aVD_TM^Kv1Si8rOP+-HHf6<6SWJe*GiQL+MpO)5ooI^pMZBC&)C3(7I+ZeJrT ztdB6H0z3|?PT*3E6IJ5O?V-fLbzCGXs=Rj^2b@s^0*8EdEOw*8d0d}K_$NcD{o zEEXi3Uh?F56i`nsk4?pEsy544M-`{c3UpY|WqIjHenQo_8||>wIk_p#WiMP{i|y6e z%%|Z}i6DElw-|>=R#BUGZ(A)#VYCl9TaizrN~=lLFo9Ftw8e*ZY75l)fQ2bQ`?OOh zOKDa9d5>FeGn4$q0d0pkq#l(gZCH)6646I$Lb>*i!yhR(R}zvEKM5ZFYku&uh=@g7 z?R}=_YI5Z=i-r#x9)R_xs?Q*Tq#_o!F#9#W&ZgJ_3<`h;jdYGl+?&e<2f4k}wSNkg1fO6e5vW=nih+))pDAsN?VadoP(05tYtw4z(USzi3-bnUJ)Yo+%2iO1 z8a_IdJ|LV2L~qZ{wn=s>#aUXs){nNkYDN(xD3w`enJmcfw%P$GOoVf%u&aF%b;Xhd zt1Ut|B+lD`fTu|Q&?%;}6nAK=JSQ7ztNP?hXUjt>;Mk$*(^}KX(M;46YvD1nX5*m$ z01s4<2e9idaU{C1EMUos;e2M>c2&IqB!? z(WA~gWXa-52wmFti=rJ$)D(v5MLaYU7epgO4(Ri9;B0n`^zlVZX^!w^&*@0&4V!gu0Qkkum()wOX zn37Zt0SQ4ItKc`+sANG)0Tn*qZm{U-auaziY_6*rN8w*Rvb?h_$}i8p)b`afQF2|)_e)L%D2`=B zG*quJnx6x%hB1j;#g-Kg(8cX?R~7`c!?$^fiAXB(30Ml{srkLAKsj9(>ATZ>i)pLerI15W36skMamvEun^SSpMctRHQ{Lqp26UAXEDF(X) zq;0G8L7=PKH*B90R?JPoHyF4eDP5Sa6mNFs*7lOqxr9@V(s5?(f#QV@f; z7R737;&vTK(;P1;_V6m?GYygi^3fpLdxI)-3T+0Df9)&fQW6O~Dt^PihO3H692S?I z5PMTqlI>9!}@nIF8&zfLzPzm0Ky z-fB?^PSvMGg#N93>6@7>i;T&2fjK(Uofwg=kH}>lc!5#yNmWDH4c{3%TqK7?vsNFgwpbd7pd(o?XcvXZ5#WjlR3 zssj{g%(^<_mkv}%PzjoT7c|U>BvA`yNLsl+2}FdsQSQ;jVbr&jHy@VF<;=G#ih4SV zk_XfNtu*4vjf>To$jh=JYEb-DB}pWYx(50w9}0+?$qmh8*>?2-vS6jt@n_Nm5U zXuDV)k#J0e9#K$`;UlGJG;Qso8d1sONt*MHp#-p+qm?>pLc|G&E8Z!HqBCloYr(<9 z4{rLQnU+XoTI%LgrRM{-s~cu?=E9#T;=t?1zv|JkuQkLd`A$@8FK%r14&O-+fVtA$ zsRykI>8mr#GEx}e6jsj?-H%!$sc8s=$SXDJI6VVWR-1t>_((z()IR_?f>5PgHE z>eGsyLUKW9lkXl#A7u82m^qzbR{49!nukKXxwCatyyzin8m8aitW1RC_YcV;8J z(yH=a3Q+c^bE`D4CD6!z3Lar^mW#YMVvb?sLI;I(V>p!p8F-k@&eMckEGZ<luS{Yc5ITi>woJD+xg{sbZDWFmjSi=`MDCoUWlqh- z7>L)xu$l^e6wqf#CDRhhzQ}Hq?XqMz@>B|k!Ss`>HC7Z1%PXI?S4j{th>^ldUwy7r zJ~abWZ->N&W?56c%)DGqYMXjePnP*os6C{Ar&sB(MJUXo)>KPn*I>I}G1pMyPxeOV zLYzY>f?X1gbGbS531AZxa!6mkoizIcGLR)h$8Oh|vYNFr73P)iU+kSI#01eLI$iQ7 zFSlrR;wYvY2~j;tld6-J(xei$S!Q9U6t~B~wWQbkRRctf%))0)1>$dF#l1ul57JN+ zKUSBK$qjqF+hfUGm!PAFMHC1c%&ZlnLxdPaxVf02F4agZf}f;+^y@|>NHV5FEg6;T z$-2h6s3{@jDmu2&zp-QzQW{A9Nhn>OH3dd%Y_Ec@E z-dmL3Vv92D-NNjdl>|9Ntaw+hh-%SJHnK4W^3;5t7Rdx~Pzp*&B z@70nfQkafltlJ>n(;uR;D4o z)UoGIQbH8lrEA=LM2;#z@jH=UVD=R8RpgpGPub~R$jF)P+;uKo_ZEp$9oa0!WlsW? zDMdW0cIbajfsv3ZiILF`x(%{n#aVsK?$@G^Pxpb_96HG-xgF_@g(^*}8bDJKA8B4w zh<-s|l;0JQ7sM@TCW-)%4>vs9ZZ0&BXnW-`T67J!hD94a&k-0YE0sA;Ifos-oP%$UMD zE)c(WGHz{@IgmWEreAQZHr+V3-y*IcBmuCX*GMbc8DJY+y4!BdE-^ADA;}79mfdZX za{a0vAkb|*n5te* zeK!0XU9_pkkUYlSXd3(@;#j469}%Nhp;hN6M=iN!#x=p27bwVD5E7RNbxj7=M->GY zwn?VLmijubN`HZu+}pOvirO1xVJbk0D5>N+()>eb9Sp!CM#6;Qlh<#$B13#u z>q-h!L41RVCZ(k-p9LjDZYH|1T-!p43rH@n%n!F+iJ*HrNXa%p2Rr^Oc)iBZ(d|%@qQK4PesJ+O$EihWNw5kSB7T_I9h|`#ex)_s{RzSSTx#Yjf z;|i=0kEosXez<%Ng+3);IQ#6|F$Kp!qwlQ@1%G4#T~x@@Dm+mu)sl1F zP~|r$?XvUatK|U(Qk7BeO*LNXm^xM1nJxDSFI?dXG*D1|NIMO(h#F zC^o87sciHx!a+1YD1_}zv}~{)h(%n z9Un_9f1Fo$ukik2Ew$VJ?L$QKd8qB=iQ8IkMY2O|k@E;uC~3WXHI7Qs+PvA}M=~W{ zB~U)V4ew2lvr>%6)edn5FZTi@2d)1ACqY!X=Op-rA7-aq$djZf1SBl3EAJtwk#|~; zIu8Ih)#@htm0tSR%vQ@b_l(>viX|#53Q6~;{{W*_YzD(-IPVg{+jQ`#OyhG7>6A z3>04FWGrHL+df|{(9NrWFE~l36oFlUB${{uU1(!q%OXNBiIj<82Q&E~5_kn!_cu4b zcbfcf?6&JTY$YG%Q5`8k3R(hG^MOZ*Ta=(5cn!Ywb??5I^wc^QEfSu$gHdo6j3Bq`K!hvUWx zLQ0yG$B-!wEkS5M2>^;ySef_vk^_^izLSr)bhsFY{J%F``IblTpQmePE8BlX)`pjE zzCdnvXWWTV;>!MMHOB{=9r;rEw-PHH5>n79*w^AwQk78MSqFD6O1@2bHOvY|hf^;1 z=iEOv_CxZy^l9CW$>9CMzW3JD)s4)CTo~5-6H8&%!L~5tZ_i1Nw_D>O$7q5SNlF3e zMzb^eeEgmB(1W6(o7H1w(G`1FC4P22hQP9Z)!i>CVW#seX}K5s9Q1%5W!P;hLyUza zinjA8i>_}w;UomDg=A5Zq_F4!(~Wlr;@I@|jc83~S0J0B$&GbK&dPU$prn*kjzWTi z$NHnkLkO}e-0Y8VvFY|Zo&%5%n-iGgu1HIq5*y-@lhq|5HK^a|(CmSC3Ib1}p)Ydc z!@Jz!_VV2Q*3AtLIp@c1L_|x999>hN4-}Q22D?;|TGVQ($=XrBWK3O6k=$8W-<5T} z+oZv5#t<%z&S}*|dk0Hr1TD!Fp{U$71B&K;RB@eXX zT`EZ_ttfeXDo*2KE7RR-yF~aQ$_6J?>kjK;wub`SZQGJkpPEBJ7Q;>sM5HN5CZ54U zJ)Ja0NJ(5ijunpQcSrD>dylayI*hQ(k14XGtWKmlGjdp3Ut?RSJ92-aq@YoM{*UEiUtXZFQt+4Y}EU1!;+VOO%-*1P=l|Jv7vV1_^ zy2p*1q^j&HUwH0oMXEBRpTcQAT4~at0jCjrJW~OpRkX`-`)pay5?V_5pm=f}bqQA1 z6#M{IUNHOZSYErwO+u)Gq3qZlLT$7s+DadPc{f=|T2=73@Aqn~AV5zrKtXSjZcCP% zl7RuVf{;2>{)bltfC+>N2xdTERe{DqAxlYdM}K~eSp`T#L=yzO%8_T44fPbfhKgG! zp$Bj2)$tI7Q#LPjHj6TOs*+ox5iyW<1OWQY$dO=wLf|aFy#R4=))SgxqmTQ-nd3GbK;?%?> zBB%C%uAgWn22xTcNMVZ%si;2`b%L-w2=VQKFq0Hq`~&Ly=jE5(y77ryM>5QG^EPMV5h*eVx@cb#mzV zA+@+!ZoMd-wWS%v9lX#8(5)8Ss%rB>9r#*tN}%>7BW*0Y+9*_oVdL|ehYB73a4Jfl zT2u7Y>Wpe&$b^?o`1%>R*d$$^ASF+l51?)OwOZI}rurm4;9j19`XYbXB&o!YWloq! zk~L)tv0UU!m(6M^^L_-6Xr_x~7$yaHcH#VrTdWgD0;@uI-%*e(q;ysZ*A170}{ToRp;NOa5c$w0<=!jXtxdjCFMLTBy2vwqF+*M~IbvB&U*3UV~Y(rIAJIH2kE;n=O#4 z7i3bK`$mf#WX9ANHNUA$q0+6^=MlN^8kdsVDfzlBc9z(cXm0*!RDiMZbRcO;J9O<$ z8NU>Nw(i^BvCW!XXMu^hr+H_M3esjsw`Ut%OKfa?F`6QJg*#`9`^<`w?bekaNk74GUC1= z!NoV_xI!z%M`KEB4){)RBVH?C0#(AoCR#Fy2fIx^_Vy?5PY`_%cHT-mi*W5Vs?(j9 zT9{sWapkiXUe0oi%da~fl_g)a$`UKRbPRdhQF%m2j?l3)v23y98yYI*?r*NleHKTP zWnt$B4>GZvQ}sa=1QvM$Deuwm%AQC0g@=dP)hup{D9CLNd`ITKXMSPX-*Y?C#N1K@ zV*=B2ZP>CVyz5JF$8-kWLk%*e9%^kxJeR;GyoV#UuHfzdS1SGeI&_z`f!qiu?r^v- zx&EIcFqheCt~$cVLYyHjta2(*BVqo(4R+Xb*co%T)wsVk&6&-yIPOTeP>JMdw$Oo6 z0ap+<=}lYS>oQcBluFNWb=08_l_&0mkdik(1o-sS9Vr3=e#R{?D%AX_O9?U%P~ilj zK&1-XV12cy(F`6X1_h)RuS|@3tYZPpBv~U{2dBFPt6j%9jd6O@9#hQTR^&L(FdbTF zN=qe<1ToAr$Q1Y!Qy*fpn zJk~t5y=GGQFtxVm1fj(RsTCWbgV5_H{K6&xR*XS*Tv6+5(i}fd*)%TX;0pOHG1<&T zkre=jEpp^JQwV)kQ7Jr6 z!jPhPlc04>LzRVfLyV*NYxyZvHY>fZca*Urb5tBDi)^A(t|R?6tKG)N=gwyVMf6gZGdACO#QUNJ_N`l_bgC_eg~9f*)UiV+Aa5q?h{ zLrm@jfTR!aD}7jx#9cwyD=OVRxHweE2|RgFroCzfPN~YS2}Wr&U)^fhB>+^Su$`;8 zCYmSh^iL_cO|m7&m2F~5s9FsKtb6HAQjj3Bgl5TWG=)oRt;HkaY_I7}H>Rv(=^}_M zaFy|BtSZC7XN#-l!G6=$n$i;04MmfYtw>RYyA5E*;{9hG^C{_z^CDRK$IW9_oz&a%UR^Oa(A>!=l|-)&Zx z6()3_-peVr%0i!_e-Ux3@9;WmoXI$n1B>|~Y|3zoFiH>8U0a-AMB9?af08Hs&Kzvf zwSWyh+IZ5zG^Q29+ndrZ7&Bxlszn>AJ{u1mR)t!W=1E&MxeEqY6^>tm^%g0$O-765 zXi|*S$f$EFxFTXcCK_Lsev&rps9hbgQzvmrOkbqqIsA)JJVUA+lhan=@m8x$u~Tlh z=Wa7)MvSV+Lc&w@S3#9YM%4o}yFX&M#C-kqqJ;0%==4_U=VL7mTvrKU z8Vyd!a#4+ny2x@{gU`p@klK#^%AHxqtR*?A4c?tLSDfU0(KVFQdhW}L{*6D9H+vBL z#cNu#MXNZ2YjJlqsO3f6D4p`^@5IZ3X&2rWa^$qFv-pK0icgI?=r+e| zsPEhrP5F>|iH+JG&&IaEbB0%tpOA{7TC*J>srN-cXo@91^Ir{mN7Elqj-j0!XRUSo zULVm%rpJQZkP(iG zqPe?pxkTob`Axb~5`yxU;VRfEW`Q7)?$zWcEQ;cH%icQ3r=aKw+g2&V0BDCSlISe%)LT23Yd05K zQZ3RNN~5^Xm>W+ml4@(ppdH8?`}R6@T^R8}H5uv`CwK4CZdYKwIefA*^vfgf5$19H zMJ*)k-Dqfd?0hw3+9a#b9F0;1v$nZixy47i!g-{ud8ta0IFLxE0tx%1anf+BSy5$V zSTQMh&M;iLvbN*BxbpxD3nGAkqtc&UHEy8mKEMLCeHeGEwLYJ-l;;_zY%y%{9`ul9WK&dK)>6uPS{4U)ygvP){O+03FrcKpei-Ro4HiQgr{gNpwz0vyVEhdy^|cfNREY; zZOz1%%8>FFx0pwi3f!PgDoGXk>#^4UHDm>slOSYUwJLVAAY#XQkrjdE+~fj62{rQ4 z!A~SOl@JwDdX9vTqeB)=E(#G{zuK@SV@M z>DPe$Q1pzka*l0!*J*RzE(h37z9meZ5sOY%%7ZF>&%+I=Dc{|%DHQ9$L`_9!Ds_01 zwLgYrQM2?NPE@jSG{=l&aHYhEA5h|52p;wLY9^uviT5X5hTw?PQ)1jarunTStyDEy z(X=OvAotkO?D&HyT1auiRFZno>OyV;Fo;Dl>48|ocGm?%i%CN3xE?wb;mr=p+^F|S zKQ|6dtPV>;6w(|X+8qX=s45_8l7Q} zaas{y*$N-&(PMaYGh67ZERqvq=>}8D{8YK}&Yx%spwXvrJQQIBYU_ov?o!N{d&fRn z7CpobMmM-1qU=O6j^0IyadK_F1IjJ@w1kfuj#d3Ss~dCt`^R2}^mF*R-nsyPYmcWnX&PJVTRe=c#^4LSQ_ko}ZmQEwd zFEMF{l-ilHxPitxgRNJnQg_j-w1}a|CG60qJftC@zbLn&yTaQ9bRrapcI0v9*U3#g{l1nW`~B(i`hAGo*WHGwU*ekmbb6bFS3H5!Y| zq*NRSKX%uCvcW@@Wu;X^!ly_LOyu z3OE%6CJiZAdJhex*V`!Mde-+0Pm8<%{6#&(oIs8eij);nI)F%gB&?oq{6iOre zttlh)D^mT($M-0CT+=DRF1GB}Rq4vAIBCU3Q1K?U`!xP&Ay=Iw0-|=~7`x2PV@H=> zXy*Egy3mpBk4M=W=u?-6UreF~9V`!(aq`F0IGssmMS`W0g7 zf%g5Zo=-H&nBh}CV4-ca0G+|{Q6)mV?XI_|{BmW{^wF{|d8_xfcS~jEPvjXIiD9)m z+i7srm4x|e+kL=QO@58FnQ1X#7L`O04 zF07ZDLL248QN>Xsk1vE$gcC!*+ou(m;D;+f2z(5-L}+H^a*z_*Duxukp*1F=#%Jxli)2Yvj`qbAm~)g8RHUPanvjYG4~Wv0BD>J* z7x&lKEkg8ax+hM)fMG4in{f)I?~kVp3lg>b&7$WWR`jr_=?F?3DME-+i3qzDLzZCwo(C2I+8aht$w|AxYmOg z3(7O7Fqw%i#VX)fPIZvl8J_E^jLAV-d=hzlK_;}^`#stm>~fyENsFMFZI>vt+ydmf zrOH@QQ+tvr@l*Bq=&?hv5Qnqey!y!B$RSQkwg69(LY+-1xG7L0L~wp!=|=fSfkx%$ z*UZg^t@2QY6jB>;E}?CLKIz;LM#7yaeVVmgB1VM{M{<{fTHD93%u2id8(fN#rV`N! zsXGS{6HrA(chLo86u>Uz^!1H1o#RToU{@r@$;5BvlWpyg49JQDl6cigSHvsDUNk!$ zSLzth%%XJJ!a=^?1z3e*L6ltI2hFf4Pg}1na3}yY>H?CL^6Buabe*>z-kSN7)Lx&L zOUM;S4$wyesM%SJknFMfR!a@0+}GSy9e>KYGl%pkNe;Il2(2A9R2-9u0uz$7JSXohMBMCZj?p7Yv%JVMC1QQ0>&!4}xm7)6e zMyW7HjFO9gI}09;=Hfv-(m%7J&TNY#qMu@HA`<60@i;=(YyE0;)l)Z6WEyRXe2*r3 zr|@2JI{{6Cv~MsnBQiITHl*XCGaw1Ayq+L+2|FD^Gf|95QEt)hc*NMZRx9R|2NZlc z9W;jJA{NW8TP{zPE#-6ssCx-D(A$!66dLbvYJ9k8BjQ|!+$4L5I-CjIf}5@vW)R~K zH9+HvO+fbq=;j>JBf&OIZ7#rZZgrC1nknE=ntw*B$ZDjkxNub>ZNaww`dbd9kEc&0 z@+=c}0|gOcU05kR<}`-|eaX_B5|c8Hwj5h7OCNbn1e4=HX{bmrQ5;rw{@T=s(Iq2v z`O2a3BD-kSGwPK7REM6TZOhGiDr)mjo&b9SsC87fAh#ta$8a9%tF5Gs;?Ps_q z-~kPnLu#+J3Z*{HTe~nx3{b%(cfS#t4<&h3c0(yzznY2!+eHA>3b$b{AKB^>nMbB}GZyEWGW zT5$@P;z8)6QU;@+9oj2YmI+V1a^U5Y;rUc4T&_l*KM~(mDv^mOjK6O1B1FpV7VC0C zW2KcXTzp6ylcg6g;*cqd!;U8*w!LeT4<^WcC;Meve!ULj$3);dSkI$1Xqr-`d`+J% zUuKj6DHH;IjhvFwxG7Ll7UN1ndhf_;aha}8pKj#vY>>sYS$K~uv_*b|f!FKMJj2Jm zL6dEcEvik`_;N^DZJIY)P^f|x`n1xtja7|-mfUL>x3_See`z5qLXi!xpqdmmeA+~ z3j}G5MZN+9saKfk@jOn$Rsnqy00m`9Ll-5r5zrOMgqJD36H3!nr&|;<$u1N?7jwHL ze}^??{{Yjpd3`>ZxAG6cR;)1#r~5aV{{WZp7!A1Sc(Rl7%N&9O!gc4R4u4K%Wb9`jvo0aQ>)MsuIZ-zd}dY2 z#TFv3%uIFxQoaI0RI;Lkfm2?i*|w(|j6xi(b?W=vXsk$Wq^0+zI!REDq@<^j;*<&{ z!BRX1`cb7ctYtdP^Z8u$S*63dL!IT1DmomC=9DB<5Q%0vG*0A`Pac{anmotf{iy;< z8=hEuRT4iN?sVK2!b?binBUCgDSQHWg<9NokgxAJo&0q5+cUy0J;U$U?ohA+#zXD) z?N<+@%lB`@25}5GA-r5?mdol#@&vYs?Kbz4mlTv-90*BY?JKW|)oh5^3(6zk{fhoI zk=vnk;on#|4Cvv9rJI$xf}bI3NslZcv&m|0=+2X0F<*YW_!@1djYi0{;y&KQdh+a| zd!Zr-*z(A9$MquqBw}YmiD~`DrXb!z46eLxr6LA~~6x@0&LW-O~Q38rdRelvGf45hwx%i|C=s!rAP169%;N7iU8MuU@xeS^(+JeaP zoKGML-l;XO*Q0F&BUdKXcJ0-;o#ufK9qKDj$aySEi2lLkqz+D{B_I_favLjp3eat@ zH~N{h%sw<)up7VKRT z5KSF?0Z;0Ys`W*}VIN$QUr{vFG<4CDg=RwM zN;BFeOfyuJ{{U4(V02O%NubQP-11`0)(n1ob8RPmx21J-LBbi66=6ioqPV-DaaA!8 zgt7@f&FQLkR>c%dG9TNi@op04OIfN`)kyYJK(H23GSNOi9lKMo(v;9S8D&)Q+M_~_ zr4lj>mSS8QEh&|4<|L+`!Oum!GG}17;j@{6baFY_wp>>J9}ua~`wEOpf`?hH5pOv> z*oghtH9RZOZ(UAvDdGbs8$K~=uwUWDc_ZarSC;h$ip59i(JQ!^sQ}?3-C?tjWEnm_ zr13n;8n3)^AEQP(h?F|`ke0BE1nZkuP*eD96!^QehY5kOe%Jzn8>|J$pzk zq*v(_I-^9lOrsqF{h2gfEYYpZr})O!w*c`eI~^QB%# zQ8C(<=K(e1_ehd$v8>JtG?V41f3sag#D^*tN%$e~aR%A`V;L>{QIE{9k=B)|(^&31 z(6?yHlJB*MzucIL^3Te;&>QqM2V0o4+XhTaqz=$pmyh0Z2&)uIe8&^?6J2Xei7{2k zB%|{#zJ4w&FDu|%N^wc{?_CBk-D9fqJ6Eh@H**#3)2=OCUzookt^WXLaiwH8OrnXf zK_O)dUCJ8|s;WzzhWf1Fu`6 ziEAGSPnu7*hKbcV)aa41RNdp9b8_mi5JQhVNEAIOqR|xzOzNWIV&KCtR=W9ZC_eps z0an@_(R6C2O14XIm3IUG0B1~cqG|nL6hHd9t+(RZrurb?&mC^&bNo_FB4{{X8W)1vurqHi^n z>`H2KYy50QE2>ou!m(f4H1N{fwkk5U0gZKOyW6N>#kO%dFr|Z+eXz91=oGw>{ z<8g~FI1IHQrN!4^Na?6#zJWYWg>YxCFU$`6jkR^`Z)m2f9G8@)uUCj}B)d+9mX-nI z?v zWb&z1Q^h{O0sf5^AhH>l1u)~C!I>O+mZy0zTv=sKaj0&IM->5Ih?>{k_G$dEQu8|z zD9|qVyN~h5%#^Q9Egt@%7s_Nx}?)?I)5zqAsPEr zdyY$)UedcAxhhr?Bkrk9u$J2XMm|(`H~|@+C|jx|QECNbnv!2a8OBH&wa zhgqR31Qa-)BB===Q(`@*R=mM27Iwk|rVDR%?vvVGmoI81&84`tGF?w4)d?;oEJ$vS zAv-34BqaMhG~%xH6Fn4bna5o7FII&)5_8K#s%`#GvX=hsQtL_F)O08m9ZrZMP|T2w ziqR$`uC34v166#|ekRVq5|z%BDaf6PBgNc({usmk2chSN>-Kj zgQrOXx8#q_ND^q5k`$4|8j_Q+KF@}qXTL^?WRN9+|tGMh_FD>UMSsbHxj)`V}Ubu1WWW7$OhS%xT;$@EuN zXxMq#*IkS1QDVDRgJW82;vS=qEL$a6;}S=^wGFjomc*asm-}N&6ibO%L#W9QM^V`qU$uh(5j6SYbqHD0Bv^>BX00EE7x%bR$b3fEATzY1-LHf`I#{y58s zJR498H1KgfMxkCyK!p1p6Ui<9MXn1fZ}??|6<5JPjr7r*D8q^%GKEFPjkxiroC<1p z00Be#G#cUYx-{jYSzL(?%Wy7=b#4g_*Ti`0B6CQ~$9%3Pm3FuM7vA;Dh|Dl`jz6RJ^@sXdmw zIO^xNqwxlhAELC=TSzJ%XC-TQQu+L%WvnFeNrY6R;ZiB8qK#CeW~!~m^4G368SV0` zaT-$VUkcYnx&u!2DM*lr!OPlMm*Y`TySfZ#yT>4(CNU7S{*QOv@%X6;?A4&s-mtOU0vN|2xTbgA1+3&}y2VlWwU z?imCJ#FNAyU>Yrha)279i=x@Ia~3J|N5#=cXJN#569VlcC$`Y(_S`Tinqcn=* z3I15H&_N&fhwl%oN*4nbPvnJj-i(-7!`74&@fMkESEUcce$7%Ad`_0e38S~xJA9jL zgrw07Eu=nALN+uS1(vi_<5&UGjzx+=$g=6v-T=govX&A*tP(f<8jLMyryf#w$RqZs1p)eKPMQ8UQsl`x$81^@ z<>lY-Mk{rvCs>cjGgi4W_GgF!G|@_IRrZfRUi3< zh2$Gc?y0aH32knrH9~mSiU6Mvi*06B@!~aFQ)zHjjoZ@n+=lMrZRJa4PJSQBg0$3~ z%951=05l)bt6#f_8mh+_$q!#??|r>2HF%2QLQga{5mW^92jKuzs8o}^28kQvJ_)>o z4GNnBAh^;D0jHdde zAmjz!KAC?ld!6qEg?x3Y-62R9Hyl{6om5dk)1aow3Z(|QKBd%*rM5g5VbSc49E9Xq z(_g5c%EQptdTnXEcXtvXOGIrr!K^(LUYH4YyDfx`XF8FRjGVqQIadNr^FDFBv3NuW?kh`S`m*g;o zy&1&Fj9BxWL2*H7fujY_OIt0U;y>dupWRU!IC^$W#C;b|?5CQQ` zsR~3piXDL-a?ixut3Xlys>e+=@E~ZRT-+ftuWv%1^Qowgl_?J=*2@PRCJIo_7}+b9x06x_+G=RRR@xSVWUTlDTq|e?a~%up>xFA9*Sp9Sxo!b|^~C zQf5&J*uhtp#_YISSs&G|tW_suS8#+{8M?8SyoM527E?ZAI*?Qb<44H?%KO3{aUiFT z+F4TwTy9C(pOsqE?pQm6s`!@qkz>Rt+g7Q&y!SZsa9B6=8m(~9(`Vi`r|8klbydM) zsSIxQGT9>Nf-2;u($am@6(dHrphQZw5=!52nLZpxAAX=Mv;-%A9W-mz2s;&R`f#|) zGcHSMKOA^Gi9HI+dT*-MR)h-;P>befZOyRbzYO&_Tu?oCJv9hc%H2nwYJ-zy7Yv5^ z2~W6Ob)m^7wW5?L0Mn4#qC!EHp@?}H{vh0Ce0K#8F+hbYPdHU z)$=gIioobxS)dEGmQMS2B zaX!TR{;fP9pUlx}z;3Qj%jI7}ifyc|N(5Gfjmq5VT zZ7Kk%Dz`wDg~pS@k`}LQk29{QeJ(PKF%cjZaGICd*b)gR;#EPs=i|czZDa07_5ubil*ZvC8iRu4>SE* zwju;cN+9U0F4xC;+1u;P$byojw%jzU{pa54tjXBGm3B3`OjgIO_@fr75J#G;G&dxv zgsCVVV#o!@7O#Z}6{#xg;0mYZ3P65ZPA3zYzkeB=4`LeHqffVS^B3wo=sg>)YS>a8nUf#4Biszdwaf zBBiNfg+`kI6ncAg)hPhV+wE1#^<-o+mD*%t z6{CjavKzY@D|G?IBa2~mPm&1-;A?aeJ;@q`s|=4DHCCo2li%$8T*qd%rvWMv<(FDX z*aB1n(04ohI-_+_BZ9k8kUAA`+L^Lvn6zjYt9TOINNL6S5AJga%qk$D(10X1xwz7z8ai*jQABF*+i&T z4%s_lWs7Z=3Y&_e8s?RJ-Ko_#?VEx=?{6+HFzS;5WUx|# zt{^B5I|5g*sUAM-yyC6h& zs-LtabXQ`%En4yWrM-73!N%Niw7)5QLvE>RDhcLlY3>8-)?P+wF(}nxfJ3jT{gT08 z;&?18d}ReA%1u&)@oZOrg)|?heP;CRF=;X-WOZDlD;b%Q{Er01GFat{^fsilp~R)c zgV$O)JvO+9b}E$_*4OfqxzE(^q3+k^HnDwy6%ELYk{WNz3!tIc9gQk=nlfjOSREF| zHU9v)EitP3*Xn1r3`3UnkqG4Uba{=ZfjP-FaHpcj%z~kA^DgitD&cHtNoCe3p}6=|o$3G` zKm>dBtR%7sO3uK)p~SZ-r8WT}MI-M7l>$vY;+=dw+MBXvv`>(QCC`^peKZR}P+Cb( zA{3QZdQemSI&&nDHttqu2iNJAM>Gy)brF<$hgqbE@?HP=O%R`aSq(@a-OHK|+ zRY?l#xbX1NAtc-vM|xdiWz!{&RNJgFl%>KJe-54`mpKAHo|?G}nHIRYU9a2R+XTH_ zf5{fxn`^kblolEI5=lB+5XpZ;q0}se_ z{{Vb(0N35BA>AnIR{V1og>aKD)<7=DeMMr@!u< z4x&pQ#7MvgNjR)=DeHzUAyjdthgtsWw@$P&LE0o1eNk-`{Id^KOLg7%1w58oTEX^{ zO6V|?kc!QsN5`^PhBPhmmB}UYSSR*Wli{s11Ohcylr$;G4P7FRQPmYLI+5Z*rn9B+ zg!Wac9dxt&<}EMfz+3VjLPAf4e)0P?8s^eP5z#bum$s4TmgUGmNNlYQDMP5?(|tCP9VZfuKl=Z`D`DH)% zsuZWysaGd?AxbV8HDVH?VL4o!b%zJbK#%hmXG#0ZQftFdkSJC~v{c4Jmfdr_#o4hx z3f$w$Ok|G+(5h|q=;omTsw7H&#O=sxdL58?sfMabzpYVHe!XYOdfeb)k)zU5@>HD}1tN>kO9!X~F0 zZr5XZK+Z}M{FMIyZDW-W&^1z3K8kyg*YZhhWA_ZP#0+c6iqfgNzg7lf_aWfZo`l!>bK^}R~uYzZi@6FzM2+98UPL|Ah}5v zyw&@TLv*~kRXZRn%1`z|+eSG500csjmaAL$*`7?MBq-HfR0*&3b#BUd6XxA1N)@V9cJZY?JkKKxlfpOY^-A<7UV1N)4@Wg!Of5B z)nilYn|7(mwqz?ic7G$}A#F(I?^_NopJH^jd?{|#4(-EexR%|WyYIBJgq^|}LVoww zbQ@;H)xtDnn|#BDN1H*i{p(zCw>eMT{^ao9jUUYZswj}osA8+ks;ySJci)xpC zy1g;9gAu))eS0MdD&xsSkO5H}3e@Z9qFX?Z5b7pXY>tV6rd;yUl24qm_krJStJAMd zJW7nhBV(C1E1*JHOQ|7hSUgEPpV;U}*QaFSMLgme3%1rvw~xl2suXexsHXh51tzLL zMxtWs#Zv88Z)2`3<`)*=!d$QB0)cPvj-ZPBONy@_Z57kN>nkj6TNtIv`jzOr(?mva z$QeFbAjp`e)TG@4)#oX-xD;Cqh6O6!K%wGKw_J{9P%>caVlNTit)+G&3AoArQ)gwi z+K!_XlNCN{M1jfH>XfLZDk-S0{{Tl#S2mC}L=$Bqf1>W*2yRG?#yaObr&LgaJ}N4n zDI`$RlpjWdGUgMDK`h8kpV96sWQ_cGQkf}|r4`0NdX6j13ForGP>c`*mThB%a7i@!)zfY4S66C%Q)BPh;@Phcp}WybNfGztl@ujQB>mlr zsY?E>O1mtpK(aGBWNnt=#PL=#= zNq3i0x1MFmNO8cTwYHR|g*#B6XCgXjyy4o4F$%Fe8|eEGjdWsWL2C|4ZDG(Il9i;> zf8C|B03djp>b>{MA%RwC#EE>dS?pz|RDh2@%@<&hc1dxts+y158mUH2 zfa@pmD@J(rwvlB{-Yi*O8+1(f9(6H_xJ7nK98!{?YAU3J(EUf~*6levg3pu;ORk;t z``#IOy@~vHCy?35-AWYHmw`$o6eo|CXq53$PQg_lPQ0VnzK0o7IWz*~d{F=pSZGLa z&%wsJaYD$g!-U^y$RabD&28rv%&1`yl*5RskWfA$UPH&-uLi#kFq0BN96 za}diQ#_mM*CBmj%x2fj}k`e;Yc#euzt4|zlBpXp=PI@{6ak?(?g+;xvs$AG$u_*)ZQMFYI`YEeT@Q|T7>a<<&>T4N|aHk|V zq@iE>!Ty~#4Nnu|nA(D z5U0lK`!up(&?F*OT(Uv4sujm4eq)O%jM_d?MO_HpWa@N8>;t(p#;eo`>yv1c4Wde< zxm44^q^pfIaVJV~0459~-3G~jnES{HaV{`cd`eQDTz=hExSbRa1rsM~CEqWTn#w>g zM@p8Jky;_Yii7Lbm|31uniqsEU9Vt{AcxPpvXqQiB}fO zb;CKAe7?>K`71k5IE1RSNlJjNf7Q=D~j@$>-<{}KFB@=XM#u6HBzX8Qr`% zrF5>I>4Bo0LUYMyKRmUMw5}{X0s@DK3I702vz$n}ClnrKu@UX5utWG?nA@#w?Luq% zbqc;R=aO<6C}G&=$=}x8y^xgg;(QcN`noI}6hKCMrHw_1xJkCqA!y>^AGWcn%I6G+ zI^R^!XT{@PaLa$q4~xzDbMygSRh7FnOe<0|{3Ta7bKtXImUXt;K|j=O9L}cx$TF%^ATj zC=_$Iot0KKk4s_ShDrV$E7{L;s(F1u<{3O{M*DZ^{i|%Jqd2Z+K|{qO_E6X)kGDh0 z&E9+hURx+xMja{^TN*SU;*;MX6y*$X7Wpvh1`y{qmwttx2P!GK0 zv64S&NTm%ma+vvXZfX`sR4PT{P3~*bW-6(U8jRh4Wwf53W~XL@y$q{MvFt_|oU7!3 zpO~DrMrg02Y&TUcUq;%eWVUFf61XSU?{;mu&u|^KMo@CeYFo%@vS@|4qeUq|9{?%# z{Tli=>F1`;PsZ~n^VkE9!NtD>YU9mS7?vL*?;Tf%+~XM|%xNh|4W%T|01^NduR*Tv z>i{b4Rk(BmBF56<)`rTIhQ`h)RD4FDQoU$Ki&1c^+Z7JfP}<9DQ1WTOEfnOn_!NrM zr%t*kLf{lvnO(4zCKGLSfv zN-5x^jrJdgPP4M;GLD>9<}JV#^)IuYr;#SgEr^_?#38;ZNpPg4qrDWrX&q=jjdIuE z5M7qlcZqOUpKtroVsR?HNNG>F=ql#ZjxIoOC=LE14I3)y@A|VZ$2^gEt6Lbq+B2J4 z5o2%`T}yAax2aURq^rWTAdWSlr`9z>K*X|v8%wA;7xOC)Ljp4fh)Z8Gwo)pdK!UOl zUxi*3_Ki$HNIIM*Bnowc@?Mz4wbn~b1-i91NU1eKxe@Gkpp5{3XqEYLAN+4av+}_iPH$H7}uHCsOEoy3nS9jC4FJr#lA1gPV+p~ zC6tEHrJern$E5`cJw5u6vOz|9ag2bHS;@O4-0VW$^lUD^K26vj`Q}ldW);bXW3pRJs(GRHmf9#s6!B0g;sU-SQgvpms^VRW zl;AizTE_h)$HwfkGAxzE+^%jFs;(fbfIku92?nCSW~|xNB{mV!JTapauBx5yoa;6} z727=!hLAX_If9=U_*>+pE}BN_vzWiHL>9{o}o+<#r86Whsz@$c6JG+qWv3 zeKgl$iBX7LzGZ-vqiMFnex7qctf+G1Uxid2BAfdTuI*H#Fq|-iLxp$@%517HB2a=> zD3CrND12*Oj)84^m745jZ($H|)yes|Do>rmfDiHwx)hp}DMNbo0P8x)5U&Zkv2koJ z$2qo{l!dh6D)Q8jmm5-2b_AWp0Hsn!+NEWZiZnn+uJ|J5wBs@#EW`WWdIDr6X$F)~ zcp6aXF_y2z7|T}Rl{=;B)>X$3azkG#^U=~>ZPr%XZUl|@L#gCGr2+5J=*tn93KNFt zsv8rvqY%iNnEPcs903kCuQc_kAwU!V0Hv;;n*@TV63X+RY=;Y;o( z%2_)eHLW${u&taGQo+GXi++uHSTlpwnAQNrbdY7(Q6*Gb2Ngc|(~Q zaTcF?i33&)7!?Umu`$VxhOzWm-6pN8%;oG2s=NJK79k8rdTD5@hcabaF82t{sQFFE zS5A~z2Ab5BUl8v@5_byqzT~NL*NJ3M$MEtZC4fh@2XKC^0?JxSu{ssbx$V$CFEDuV zQf91#`xr1kQWK^4^z5G2JhjDc?H1m!x8zN3Dx@;dZ5)R;BXde??;}#5 zr?au(_ER7mi$CD$66G)Ydb0ljo3h5O%Slr$EHdSNi9TYh_G=&I30Wry>+odE%I@%D zkHiyH%18E5Qcu~cSs;KA!BDcNSXsDvR73!Vps`QdG^)?rp~^-+KI>OK2v%@aG3iP1UWS5>{*`Oi1J@ZeKm zjp(EiU#nVDmeLSP%QhbpFKKdjSU?i4Mlb+uYEpTAo%Ge^y!Q4ay>@Qc$N4txiVy=u zhC{1A*&f|2yv?>nM2Atkiiq|pQEhSl79+RiEhE?wQTp^~SVW3wAq-k#MQ+VBx%g?0 z^UL3<=13Ziwi6_YL|wK!D$#1b#Hy7YN-mMP;RN<%eKYGq06kZ7l0m+r4(~?89m|e{l;QV+p~@a$JPfvgU!}SetDPEeGiYd$oTe zRb+;~sL#EcUhu_IhfthOx~l8cuWN9g%J(6T+2D(kym+n+)r4GDha@tKghu80N?U12 zR}V9YG_5+s-yiD0g@pgNoYWM@EiJUM}jW&w4%!q z^-wBvigt&^K+!4CL^X86S|fJHzm$hOl>;?xhEwh*snE-gDHW-lPBLXG(X%zBr4Sztnuojt98c{=v4(9Dc>>Jee|$n|3!U#Tats9y_nvWIW`_ zZqlkrDLhj^H%RvDugvJ;sTtL%ZXd(7cKQ7Vb!!0OSCMVrY=p&OB()7Jvf4ZgvJ?UL zYc6&<3!R=i9__7hjmF-eib7-*D35V8{W^@S;H#Q>r+dZiSO;(3#+Y$28#>x@X?2jGqdfGbwa-Ga&5*zwePNn`~$;n=tWYr(Yp)(9t5<*e46 zKoC^kU6P5CpL`J852&dCQ~*?yP>?C%u-2_{V6!corMX!=80%9^8ac?J0ltV7uP+Ln z5FkoGsOo+1nL{lKK4=nc(+trGZ;?rKtxMpLXh|Zq z+n`UsT*iF{9KOu799b4!BOOd#@}?JXWeSKbZ>=j*sus1pl@|I_aDBVfYd3^YYz6~P z)ixGO9v%e5n__q+dzZ)xDrqd2l~dtIXcSMsuBElhAR4z?PY^#IAA%oc%&hrTG+rEK z#Kl9>K4;BG#H6qTX>nm)5*DCFq-!xnoD4X3BDWlhJ(2)Qq=y=gqQiy1i*%_-QJ|+v zQl8z8hvhniYu;VBsTbJx>x3p@zUzsO`+j45IiXabUlbaW2~9_jL#4A-8i@tjR~NP9 zn4G6gq#?^|gh~x5ODB&K2~Z@SgKfM%jZ8u_T5&JMD0fC+ooQwGjwu0WqM=D6 zWdrT&t61>Wk}H?{^@t+$)8&vAET?5Cq=fu66$jm3y4=H_)>QH!;I2RJ2Wlq7x(G_D z92F>D;U=e{KJRFzy3BjTgN{p>$f=7ZiFjPwa@EbF<~R3%AewuE6^*#7sNS752{M#q$@2-FIveWqL93K5xBE2*aw*XGk8Y~l9Tlipth-iMbg?0& zu)a`<4uq?44~f|BDeTr{=-gGv+QD7@vdrukmXeo}mZmKr2G_bmfv(C>=zh&)40O-cc2^4g-3pcA@HdK&l|*0j?=NHc`{yB8jJy4z{8I`CC&w{%EQZgX9SnE5YOi7P#SWNbgxuaZO>B~T&Hu@r|sNw!J1Kpt%A zz%B>(VNwVI`*!ll^mF)OANEB#sD>sgpO!F>;G?T2JGp zr+EJWc&99F3x}@I@bp_>gp;1`t^3q!r>3eVpF0arUn^c#-uEH zmex}tM4jrY)M;6kWJyir1hMI7(@P$$d)1U<*E`}d+*;2Leo1h+E-RB3V%wD8nub_y zNap7k3VIaZs;;8l72Iz_^k3r5j})1chXFyE4H$<9kaT$%PKj z-N_Cum^q!bhN2>4>iANNqYMPLzGQ*tBn2mG?Ojvq9WNiM2AB}Hl*W#K?+$O<#4QYb z{of4z>XObeOoz2y(7#x6xW+C)9ocJng>EWS@U0|lQlyZik<=RN%Q}t~nAb|H14<`V zpj;|vE6iMzae-q-$#Gt3BdV0MP4!N7?uk*9n1GmaYr&Upx!IUMkL9-7N4WrmKzqLp z)c&0YjC~xXz0QiAy%gGaE=xHIczqu?>lPF zZCgPq5tjvL+vYZmZe)7@01gnh!2aS5HP6vu{mXZM1aLHTw}{>iuM)aWZB$&8C+tp% z)ZAHLc^`^ui;}ay;4=o*kg}mkkXu^+0K5_fb+;($tJZ!Lu;yr6#?xjBAANfM) ztdlTRcXY4M=3U;$pfgho=Uk}jJf>(h%^Dgfy-$9Ld(|&;8FMF2F$F+0g>z6(fQj4wrC8Zy^j%at-o~KVb$cuKSoY_8Qw+4<+isLOGhBIrKAP)+itD=72 zYyxP@ML!O{w|UE)ac7ifxw%U1P-vZ0zNU(KO)~d#`x?+ zc@*1&q}65(e>h8gzW_F->HU(ljS$p$De_-OJ8@&MUG1$wzOdVcLxS6MCWH~;U3U|n ztJ`xWD1yqg@1LQ(Q4?IwyHmju(CC{k&`LsGQ)x8e>^uE>qmzg&)M+l>UeLLGj1Sxg z18lzI{1*mZf6O?xO?`uvM0O3#DMiMg1W`rJh$4WGdQP%uL5IRdtC-8GRY=A`iV5Ca zk?GyK$R?pdPp&tT2-qZXqKZ?{8VYhXAawR?qV$bl{Nw@P3E3yV9y3t5%g66)ww}sY*>Mbz-#wkJxidoCo~Xr1?aK8%nnu(N#Y0c8F4R=ZyDKZN70_mwdpYDw>d* zjkxupr?d2G5(x<_ZvgLnK_!(sRHUell1h0R??8M29?A_=vZq(5xtCXVAHJ(i*4Es2 zRK>ML33;|0{8X}50SQuQ0*_kOzec(2>_9`@TZp4GDXY{(e9Gjo8D{wDJ>AAPj!Z^RG3Sr0m=37cy>qHL)ZaQmPoAdyzi|R^p@iyYW<}{TdlkMeX-1gK?a+zM_?+^I)CARyQ;~ zXhG0Sb#);k%!|Oz?-;Z*Jh9F?LF7*hS5%{B%YZx)-Qt6H3o4M)@#e=_@*Qn0 z)OdJ~pGLH(t3%>}xm&-Mf@53#O=GzGLd_wi3xSPi$GAcl?ooTPP;YBuTapa_GYFee^F`w0BKqoDkV;Ey7ZT4 zC--t22?P5_ujqD4i6O7j9ztGT1I3g`_zle^A@?=wf=P zrta`E=X(1I54o<@-1`iD80F>utCMHA1ttT|sP0tDj)00Ni!x^j8w-(ufCii1%Ky6(=4aq?A_jT7rU!!`5 zmd3U{o1*^!iiBgd@e7r`S9UwSo}I0?MfYbJxLBE-`Hu=r$md)rZdk9a7s3myswo3Coj>jZOSMiNB zV=VaWE3T@#x0gVX+7UlZo|(Jl>PNMO{@+_dEfFQ9Q?K`Tn}KSEjx|wsT!Im>BB@6u zZ_`>h9SbKm(kqX`ILPS{?fizRqJ9^8fV$}*O| zsZ6B#X*>Aw*HC>G0vdS{2f8Hv?iF*DSkrgnl>43edgR%y&gpdQR%c|*A9?p2RgIUG zZM)Kh(YVw2rF?g-7hhmHqmk&Vq8^#X&f%f=AL5Ty(4WddU!ASOvo76w7JmosEw)Xo zE423-=N0Hz23%p}C3y4)l1d!_(1TEV9-~|R7KzhHonMgnRw8Nju`w2(U0uh>m;V6x=yq0`C)%uf8vg*NT&Jq5exq;xANgXs z3y;V4>{P@z(P?3<>f!g9ZPLn*UQT>RuDSVC;gH0aIrkU1Y07(pCVCtsmGBk*$kc76 zg0lkUZ|wsspM6ZpO86OZ(&~xuNv?ym8G+!ZIOv&~%+qncUbAP9@bQ~4;+pNY+iLC9 zI|LClW3!jiJlEEL71bned@EC|j-?H;DZIxkXLNIQO~}%fImkCtQhX99HAf2=h&kd@ zS!2iqoBm~cm-7mrB(H$q_C}V^>bG*f+ApD)f2b(4Z0-53k1-%A3kHfFJ$2e!i6C@d z@C;?DTJBe?Yt5QjEIvnp-`Tf;)y!_5C&gE`=++fI+wo(r12Qe)W$8QSa2ivzA)F}D#%*BJ^j8%HjV zpl%WeRRK?J2HLslUV$2OM5aRxM=!BlW?xE`Qr#1}KYID~k6RUeyGXt|popQxd3E-3 z*bl2-;ULR00rgYw7Z|bRt)>)Il#eY&z9OWbtp2SuLY$H3GZ%9rb3pXsezpYxlcyZesq}49OxZ+<6YWWG0rPx0@#{ibNjn~?3gig(XfOa2 zk|s?pnehY49E}1JPu@*wKtUZssr72qP^MK2>Jkg9xiKOc;+6gzjVM=eKmkR`^b;PC0`SDJwkb?fNAXMtsTv(&X%cTEwr}7YIU#*2|rJ~ja#Npsn{6^ zwX(LRB`%M^DO+lh=$Psj?Ko{%sRd$-Ik~feLhr&mRK%$4)r>-m$i6&TggK>jypVmZmn9h^p z+1)>8p#(Vn+do4j#J4J*qu_M(d)r8Q0?jhL_aM76eLj7;UaOd3f zEwXPaTBOZON8?;*jDqUWo`qBceXFC$S5;!m?2U0eABpfBO1DlF?AL%^lj-Wkm@#m; zb~iA#X3s}L)hg9)4@SB+-`*}F9FP{`6SYbzcj>9)nleHCwXv{{LrHs%s&?Q`0mi9P z($b-+4>fafR3K?#Gdk_epKx42^wcP5TOyjmg1a0 z)1irItB|Ka?-pl^M|%;uHqJ@fE0arR@rPsx6D>2CQh_Key~sAbs+FRO1Ox8X>axsW zBQJ_4LJtILFO_FQr(&o3!})qh#qV~Er_z9t&!qCO1V{*w^Lf-Z&V;_RPO0#4*g7 z<_k))-ts8z&TY@?EisbwVEacswV#FPOt_ON%DBt0%U`$=_olKzn{Xc0QfD5N{X+IC z@SCr4><=}DH~^1-x2?JMnE^+NN+v`rXcZobQ405KoApmX%EJKJ0wPHGhOy(?G)BRR zh%TFZMd^bQ@7g(R7LH@$J8jL15_t{i3D}Nl<5O5 zQk9xl4n6(B2H5}%j|BDH-tA-=%s80iQQ5L~&e|GdAH^*x4BM^I(tZ@7v;Y>p>ZcSr zDEqe8ac#y-A{rxvM*y&I$d!j)9f}q^EBRgCGtG1lrAr6GyBz`+Jec+&80e>&3ugZS zEdbHg$SyWTK?D$?LNqxZVLWt3JHOuU;pSNNtF_s5({aY&%1p?v$^~*+P-Scu{Nie) z5Wb436ciwBt8>k=%JxXRA8I_Vl%gU_q%1Xuthv;w2sPr}Q}kC*l)!?ovy#32UV2H) zJB{iyJkPRA&ASfmearbUjeNg6L6~D$;jr>y#%GhS6e%PffUQMp4ytv2fp%7Pwh|!^ zg^B0zjsuBZ6~Z9Aiz@HB-iWMOw{DS%_EWkROO9TOxeDKSVr7vM)=@yqQYCV4nvTf| zpeMw2)j0Z7`n!ljdLAFsZ%LJVTe2mvl^L6!EXz)BJUk0t8q_;>DQ6))j?a#6iy+O zTfOP)UKwq%v?(HdgonMqdZxc-wasAasq8MBuxyE|NLeb~uxUf%tSq{G$tvWKQqD=0 zy>q=O44zLouPGzxJL+(xLOQ8e5@f#>dxmdF#lrp+#aU6W{i2*r59m6_6_+-5k9MnL zxmg(3cCxHSmivN>u>}&B75zH(>oDUZ!FrT4B>~zLi~j&|zszltr53Q^_BP7+jSdVL~ed0P+OyK>t$ zY^7YDEg>8r$aP1RTti^+Q8he}C{E;8eRLf^uTHbJ&x${IS=n7WGY<_9+_={$z_Yv) zBy$P1wefn0|+!dN2mpxV^sF>O^WOSQbLFW-bmCaE}JMYRL!c` zUr-H>2uej;9Rg@+UwPYC;1vav;14I~R7y})#3&yQAxB3VC`k{;@>6NMp((`yb9*l!;H;h~T29m|aCwTR(^gycAdII?a?- zuvLqX_jTB^V_XpEELFJk5PB$@gp{8SK<)23t2&+00Zvi7uHHZx#}JCjLPD8+JSeoU z?vcd!6qJxR2aPHL&;@O(MR~|>&9e$ihz~b$ayyK=8YpwlN&s6#5@@Ayp+WK39TK@} z6cv4E%^!8>my1%^P;E{!rS8+55}=1!a8iegk`$9lflpwq-Js}H304$*z8%un4Y$?- zD0L_xfKa5Uw6vZ*2&wmMbz5U3WRxzqG{&1E1cVS28GCvPIYN>}KeQ-)`ZxrkN=mBl z)3H|(*{C6CWomIsKE}Mp%}>1Ttt>YMmUZM6N?dY4%(Bv#!S|fxz5eP-0+qSxK%w^Q zUNLa8=O!o(>m|3(l$D`ljZAwjvn@~HFMI~DW&LZ4kUc$Yzt zWSNxatgze85&}V28gIWqKHVA+)eM(ZM|L~hZqd_aj)b`lO@QK+_nJ@@2?yUoH~V(g zxKU%P$6Vc`$tU@a&XEiy8*ho+SrDtgK?g53VM}I6e&Yp z#{E8>PCQeBub#}ucFCF9?h_tTZEs6rD%}-L8-38xDjv!cU!zvCC>K*W9tI^%T-k$n z8++~AE-B+KF?IvU1SoltpDmgZvD|ER@qbds@-MO<+>svQR6x~{3`*kS?+kITl7MUU z6TY*I_Qljl)j48TSzjr3TYtG_NpZhn{6Gl*0IEi!{{RYx$1aEFR)_9Zd&7(-rZ{F= z4LmEwW9-o3Emerc)b83xZs(1~w$?s+pLlr6cPK1%(t6Y-Q+@#_L80| z{aRJmwhTK_Bpf;;+DRz0cLv*$An}6=?QXe8P}m^1B@QT8+(mVxgFi0X<=G+lp)R}i zCk3m2d-CRxkU8C_yuWgteNO}R*Iv8TLu60Hu4^a!$#|5Tj4mzDD6>V7t}!HBA~N~@ zs$F?4sQ#T+si3bCyHv6E9M(PQ6Cb(2^*bMr>=C%XXVCo z1n49{+W!EE_JyQ+U?W4SQO$5W<`0;!3CfuAFK`y)GTJ7faH-^yHYre|l1ETM)!VC; zM{Kx-mnfK$4;15o_ai>SyFGKmF)Nd>toLUW?371QOMys93i8%BN0^EQ@!dfnbf`0r zP__{;iC|O4=|mWVp;eoXsiqLR^j{NS9!95B>mL#DLLo8WUER(5SuNp>N)F@mRps1l zlhP#HX0){NTXG`1R@M}qt4jL_)r#_`4F<6~5OoK{a8sh`RluhXd%Mc~(9kmNQ#2B;~VX54h4=eFSu& zI<38!poBFEjK%&`qABJ!5$8^Q2J-rBa5_ znk5My0U!-dSyQ%eBJQPR%*&oDS%V)Y#8Q=~;9GuDl7D4L8=WZF(nA4h?@lEn)Q6^f zm6s;0&g}NeB65sk=CBNz81oM$tEIi?PsFq^+QaQuq;Vh+n(D7uqxbkyk^cZPpy2b` zID_HDEsP7yz7xxW;u|k-+?Sdul_Sb;=Q%uq{ZKh2L+R*s=TXdHJQj}KR=eH`ZW)Yr z8fi<08j&sFUJDkxq;o%YN$amq5?+ENknZ?n*2g^fhJw8Y!oNn13mG({xp|9oY9f4z z$Blj(k)k+~0jz~S8ki(16M;?jDFhuvg)tt)UNh0&M<+n#<5~?2#W-}a+`iZ09m%ts zMo$U3a6u|)sBv|N3TfstvGFBC+7A98jkJ7R%Q5A;B!vrUjiIC+Rx`VOeC&0BcL)hp z&kcmZWvMNv@!2cbt@I#J6R-;#eH!dBdaN?O6QsL29|e;c!vfmJXT3EHe74vF5+D{yqSbNr`P?W=ft1EYQqB7)?w<`uhm}7-$L^@JiBi@ov*`k_L z1FCGoySov@A=ys;2$~##v>qytAtVY^Z$d)Sd?pSRreEJi9&(lU5>!)bwU8eojFuraxby1vl?7SD66wFoQZH`sS7gWvQ`>Wb^%mv zNg#qp5n6z2u|!GsehQ`20I5Bj?wpLOJX=JmNfKI)($GZ*CkG!jAPu-J3PDKreVU$4 z8(gaO+)A;pmqr^*i>vDji= zoORrsNFQGLKC>!q@Aioe#*$?!Uc)d8muYIZfzGlcN+!n9v>=Wc`dzR zrKrdA80M1OuGMW476-y}BIO_>gp8*4NLA_GF z{=j-^e%4^1kdNcg?rzFMaETJYPvIz(tQ4zs@ibRmNW)aaRoGpNuu8~nQSteND&&AA zGSjqB3Iw_+Q`2;vkB+Vl2Z|!Jd$SRE-LA!Oke(0RWJpnL^7vGRj%Wo(aq$8@fR7z~ zgX)}JnVB7ebNo;Jz6v8rDY&Ep&~frNOJsrm@Y7sflm40@8ml_ggjjoh8gumdneHv6 zpKlc*BlT#t%W`OrC{{NqnK*pu(&&C+QeqxnA*874aEHdGB*-UeE@_BkM_2V!%Du`! zCck0Sytk1T8-&m7VZ}k_Hp+CBjB`Z~Zi;UB#KVjFibzt|;?Z_^7EPqh=s=FR~M2V_t zrIb(?TUhFqAoBztan%T&x}XxQPgdQS%{@#+w|a!^L>1pMcbaTvxaGKoTp`OWrKeqP zHF>zpibzsRV49OqDYrA~e@)$)dCSI*{lnvk`GmQa<_{e?y6G`;BW!!pcc+g?edWF) za(lUFn}hcH1enfDzGV@ew;?gOA2>&DT2kY#5m1DoCaR{fust1@k!)pT4NwGbG7Q7G z9ZBr(M4ZGyCxUeEpKvX`&CTzb1~`J&ILT@arJ^{L!-~>kGC1!;!3iXLb?BM%jO=*) zya#{`7dL&rWXVb_Om=QKmcQ-ek`jHoq+rLzR|i&3w`?o78IPt5CMlKYk?|{JtMrV6 zC4~+%mkYJQsH`R|80le!Bqgw-;)0z}NL2^~jjd$#*ydrzsahc&#LGt|v;n`0*TlLN zSE0WK%m^Z0-Abo3;t6wPaVz#nNmyB}`#nT%i%TzY8dB(4-|sq|q zQ3`kL(o!-Z$k2cX4SB8D;a3r;a-imxF5l-k9k;)|g>m!R$@3LxxZ3UtO6FMZ?6>DC z8_Q11ZEcXYm*Sn3L)T`jDaoK;OYJ3yJYsu4fmylO-d3Z5Lts3J&NmrGjjR_|K9F=M zomCD=qti|+j`s_@(5yL93%INVO1xYmpj60W-yL$xRNB1MfRpYgSMV#0toXP9N%m^3 zV$>%v3g$mh9mC4|@!X01%+6)0+m*>>rXqzOA`Es^LlI-Aq8ma@00Z84BM!)`3~h5vw2&Wh9pI&9LSTcyt9ttr)AnE4ysJFzUB2v_wWU@_;^TjL zj&360^3p`p#s+@F<;aJ)~yJ0X}&GcA-z3`Alpi6n$LkX%`) zJq0!uI@eySrC2GALdmc)GU2Fp0C#g+nD`Lb47DYG<(BLQ;fGo~ui4g|i`(p>nF~d# zQ-$Ykv*0=yn;1B%sYo1>q$ut|)!}VfHNzsHL}vPS5uqQ!XXfLIrKbY4dTqBR@87#V zH8bM0-QwOX5|DZ=srI=H(2o(xK>b>?(#GpNv%+AHcq$l2`hjx`_+xhd;LcB%#GgCM z+oMs^8VdT<4!jEdgB^PpO&Dm3*}G95(~npeH9y7AdQ7&tbtqL=PoRJ`EUutzh-DbV zR#mTedwp-38`XX>N`wgm{jhPvQExAo4vByp+-~WE&aao zoNy|d(5E|aKGZW)vfevzk1((hJdpTF6xxQQYParmcSPB$xh@7B-VY?x&q(`5y`&Y~ zI$w6t9$HIkO>6b)Y269A_T`&`50;Vwwx}A2vuY%DN;iB4{fx=^jtcSt*+3Eq`n77i z#JH$RvZY%iDs>kf!rYnke6yI);%WR*A%Fs@%tx1Do)GPOI+J?<}}vo z+Qk*(2Oau5EUlB0cATONvQ)ViQ}D!lol4Zv6!MmO0rx+8W}~;Cx3yzt^xf|$XnPk9W%$-fiDWXZH^^^9od~6w4M|Bt!-@*xsviSQh}iY< z*J(|WvOA(&70%fc0>m+2mN@gKLi1LzuQ7aGt$7M}l@@P~4`j{?TL*@dpjc-x&zG3IiduASfhm3PA(|UbGskbayNG^JUh4nmgYH z@0i+P+^0Oql_{8xxgBjG)p?5G5~VjvCw=wLbt+6CNDH9p)(O}FIxnqO4*p}I~!yRar<_qOuxFeY|a9rx#T+?@Db)4jIPe&6@cH~LZLRpA(X^hRdH;r zBX7IQiRwpQmDgXh(HpO|r2KA`D`7JI<>58Qs=iz?r>9on8#4g}R7;wE|OsjU{L zQ0k8Uz?yw}+P02sl=GKCcB8tI?fE=g+j0qI#-5KUr5)5Bj$8-bP8IrfnSB7oyZ-<* zNMEa}hq_(bee3rZTD2sc9y^Xs_3%1&WCY zdlSv=Ft5d{X#|8-tQ_59RD@~H2)Q`Je4*LkwJXQQGP37gmbe1#TtWw*F#KJKP zLssj1DsZ~oWP%=A+&mQPl=B@>1PZUINZP$=!wi`j60civh}r^HU6h=K*wWcbtTNNZ zG2|qzBm-T7YM=#4uk_bi^-E}Qv8|aWRJ+{lCd-UUQ_nKVwY;=88*CT+qO@^PZDlRE z0H^IHquX6-QIWY}yoFpz2g};TemJ%D}l0BqQk9~C@rX4W)j=8Su+#FvMrCV|_lB39qI@*9r zx9d?ieH8sV zbxKe>44Xw&i#n5iyG^#Zo1L-uBRJBi)2uB`ttv>VqL4uwY50q?q&d7EC2i@i<)9TfUSt;ovN_i4^t(ImkEn}kZx8AcOaSd?)ba~Y9~L%8ao`no zb^Ok3)*HNN{jTihA8xn3M29j4W?$vDk?ej$jEd98hOwjT85i>CghzYG`}A5P9=Py` zOS=TMv>86Si&9g6aW>Wc)m$96Pq;~;fN{o=5^V;095Sg%C6Au?p7 zeFnPeXKa~`^Zx+B7)S90s)s(f@CVocRUdP4PefUxS6TT?4B0cMKC6uDgiF1p*)Bfv z{MQ{KOj43mqg7X2{hplZ*4k!#-Nnf}hd*L(^*Hciyx@1wOWmvNPG8!t%uUJXTrz3a ztC}0jn6-xDxdBQ_%WhlT+^x0H)gA*{nAkY@G)}tAj`9wzqj(|Y=EBOz4wvLz8De;G zN8m#QZ|+TXQcziuIxo)4_j>Qzj^o<ik-R$Lm8ltHamWJJF1o1!7bH6AtRn!MlIkuTG6b%loY&(U*69FrSHO z#p5ZvrKS;hQOP$4llV?4D5_G@3EbAb3S-heH4dLSU6ZoO@QglahvzOtw=b|A`LTd# zmne=~>Jzv3j?3Nf`xYM)8@^thg(dkG6)g~4`3F?Aq{eYXH9)mffi>txx|+^Cbxt+Z zAZE|Efo|?xPX(WLVX_-YR9%*06zZIG)eGdMe@205R6;ZPm)+gB_s&G58X?O~i7EOO zXpF7C&2hf8i}e|Q!yoxV>EkbecqT7T_lF+zGi10*B>5R_`VtB74nT(C8~*@my6AcY zKm2GNmP_ypFRDqzQ}?CjgTA9M_u3Rmn5W1-2=Z3ie$sWV(x&-w@l|njoP1S3mSTxU zb$p!p0*Dso02>85QnOFA>*u_`l#XR|;G+G_F%ywOn9>3*7C1<1GDh5-;8Xgy(4kuq z*qjwoAV#}LwWdl%9gw#GJ}3$#eO1%U%XvM6_#(u7E>s0YZu65(nZy{-To0>lf+M9z zf3I42P6KwJlEnu3J~*HAvY+A>@5}*D*+Ad)sA;!r?MB<8($&UHZ-u~p$^`4)*Jmh# zy+*zW@`KKbwok=POcXiAJmE4eHwThk0JeG)wSJuj(V{Ig+Et#e*kYMIr-*F|QBSj3 zle%y#QUWsyozMFU?lU=4Y=e|=O3N$Uf3kXwXi=NHimP@za6#>{8V8EnAxZn(zVd#L zZmk)*skOMNR~t(bMHB~>Prja`?9+)T?FcWMG78kwh%Pb>0@639ylFQy#wxk*@276s zcjp~;HR3v2zNHKDB{TvaY^en`N~ynE(9~DMS{NNt+(Pj>9!G)x)mI}D7lx4b^IRp} z-%c5)V(&_J?iD7=@`@8Jw5T-i9)(pWis`uo@8C!WUWI|wtIChUSo0rlE0@Z{od;eW zs8&6dHo}n>MHGaZC19y4+uO&-+p*QsRZv-3_|4(?@RMsoe6gs~mz zN?WQx33b(;T$9$I@3&2Hc|9}<73uh$L|G73`Pv@#w|j^!&&VG(r391$3FLZo+orJc z@b-n!W99>@f!#~JgVdF_``DREZ8PCVazk=eN;M_0qRmy~@c~^&2X-~Fvy-CdnB`+i z069O8BDlK~gK>p)VTnmCKLHB!P=4}VE)=X9c!dgU(&Pb%BbxDB9x@>4Rke-FxIvu6 zwp4tCCBo-jlBmT1{aT?a!5XIAP#n9pcT4r{%!XBIC1K|iPuoGIe@3p=aD+fWon}SU zn_f9L9k;m&#FV%S=xIt9(C7aEX+&DL-h{s%9b;OCn0FF4lXaQ9~(7NmrOT z5wK8ntbV;*-U<(vQh#)Al44=91IpnswY2La+Vg7QiVq!?xYQ*k)e^c4p=fI7Lmb(Pz!R;U;T9N0zH6vw8{kg`ggdDSuIAs)~IK%nbNjavm7)DHPs%Xdq6 zaMq$!)K{&KgYj^Xmps~nDk!jdS6%`2bET1dFOLbZJ|jo>0HJScTEy-SPkE?}pWi4a z=_(_U`*r1JmnCJ+##8(Am^pFD9Ej2QP+7M|K=5sr!c<4spwU~+`<0-66*D7o;ryD$ zgT^~(X~_!q067HxXI84LZtzVlORbr0@BF)n1U7iRJ#H<*;u&E)huWAVC|Fse`iJewIr=-wZdkS#+*a+d zV%=^I*$w43i<(N~%}uG#HP#A2sZyD7VKnG>p{AP~CUn(yz$8RBG2nLb9?pDE_wu zDAT6;u`aXI>(p3mJ&}nYe3>xmt@9N9+fMx3{a9mn{{T;xYaBdc$ka&LUvI2%KM`s+ zx1CJnI{L?${FmamS5r^9)2T7(KBE5sRGpM<5Df4Gx!+!7gZCrk;}0#OIBKh@QdRuG z!-gosHDMI+QjX;4yH*+|hj1?EcKZJS>3_Lb1lg=N!xHh2WKW?^N3`Ez1-8?Vr5lD{ zX=-W33Y3FiX$H3v8JO~-Wt@W(*&+E6p;s{P5O|&iQ}aJ7k5}kIf0o!HT&;k*<9P%d z&7oG3*a<>i`IX2>2%#$YfK@yzwz)t508-D4j6@uEgBJI?)~t=LNLMU;8wm8(+H0l> zhFv4%UFFIciEYdB8&NB_!GRG$-{p`WPzra=cm+J*qEr$SL*dc%KA8@cj%(Z}Y`$VR z0Q>>x-d28oOl0woJ}E~4$0c7~Zp{r%w>o@=ps?hnhM7vUwYVvyohTTXn=HcPF~m{!wo-F0$lVY|-SPQBB2Zlo<~sABURwrC)hF z5v<;$>KtyLX{c6goJ$f;&<}9pe$2J2>Ck}qgP*x*x?~-;%{?#S{nlS?qW1H ztv2X48;rj@8;aRrOmVr20UmsnQM#kzLU|=rI^M4Mk^&m-nlO@Le1w@JGNWoHo=k&&&50O8}%hlw9UHUZqb$jw|+^bX^6% zVBh+Z{{WUNJE?|@d{vR@bqI^!EKT=zTZ@X?KCnsEj*I^Qx`&DeIsT-4Rdd}#4$qdo zZgQW@LK&SPe^tWK0DXeG@d@LZSbG60qcUKt&gSM{KMh_c2pll z5LIa}C~iJa^DH0WZRtx50nn%loj;YKRs^3!!G|==e%NK%bfpe&M=_bNK&83~`ps#p z6vV`YtY8pTwI}%tR^T=k_hu1IfG?pS{=G}e(fibV)vjC=HtEJbBM0wS%K+PsR2`^Jfp##GB{!IHO!tiT z-+G9A$`Ya1Z)G)1V-Qu(+zAC*WaKe7=HVzH*MAUxom{LC6?u?Ws5cZz_}Kw3iUqWG z3i>Oe1TwtOOm`9UQU3sXDinov_v&rU3skjpOLN;%Lq!sk_exC;ld_azLR-mk8$NSs ze;dmpH!2J0EjZMK)hh?z?)LQ>u|?9RLQy(}8zCD365zOF)nBGugVW`~%$~>{o7-2E z63gpJad4gRYC!|;o{3*W(C^o}>78OZF=;T6``0U-)6FHv%Bt*dy;o}i4M6ipns_+S zB|%B2xco!@l-97Z`7H36SD#$2ZkX;QH2nZmayYF!P;JOpsi%cH_-ZC5NcG#bJobYk znPR*~jd4((wtI5FIKF0ThWc`+xDRt5>({KK|hs}mCb=R0mm4HAf{Qn|HG zNhhJ?6bSkbvaiJw8@m?fA6ASBgYr$;D-kZa#me_@Y_%G5zHgSHLZ37x-k$Xmb<^P5 ze4y*k`s{?V42Sb;_^Sf|v$Z-CN^k`_>tO=D0aDaA`n1;Bv^va=s>Ej;fic+ZriL@s zp!b&*U+L9jX>SBk5Tj&xGzDJTj_N>aLL%`r=&or1pQ&1$EIO2>0ERCDf|N<~n+Xi5 zrvRq>98Vfo=^8Py(Dpi#*Jh(iTk+P9iD^P>PXgT%e$ib7kIxRa)P;S}?4BHVJ|P?Ze@3Bp zc;B(tNz(cml^$`?&Yl5Qot}*wxL0}RBZ0Vf!sBQv6iSO^iVtr}Y6AY$_Sd(PvFwl@ zVP0AaTyZDNDkh`@LDQ~^BpKCW6faZR)EpzW_WVLcz{9!UrLw6J+ucsv;-zl5T?#yS zdBLJNZB*B&)y|qVGUTy(^`JmQnJ%lmM<|VWn%oRw)h&b+^Gie$I(0MyVNI#*9^Gw0 z%H@n5Th{*R+IwGP4Kxa}xuMwb0=_>fA+oomEoaAcr9Vj{rmj*Hz+^`YxVvk=L%LgB zpekkLEdKyroCrTof7$qjbHmv`{+pzxh6Pq00BUvpiKu&>GkW({-)Er5;Ein z{8X(E6sg$UK2_f%LQ+44g&oO{ERBImt3&l~ub*tULb6Q`Qa$?MyoIJZ)b z_Gu@TPxrd&SoLkMaaQ)|$?ov-u6evWGh0TF7~G{3)k;-D6Z9kvLaBiA?I_zAAvtHA zkH%}H&1kJh8AxjLTm$qf`K zG8w%z*UWwJdDQqI8Ye>z0w5ZN)t8UVe&vy6b{O)zVTfEZYqL?)E@k2@`HmK2wur2$ zN%@2(zDr}nUBUIeq(75cBS#>f?$in6!bQl`r%W^R4a#kCuXkG}1B6?yme{V4>>D(e z2@anqp+yqHh)^^j5nWW5ukve`!%aHr@}Jb4Q3#y?b;#YyitMX}p4%NX5qK3PH6b2r zod+UMN)67q+GWKaT$Y=*Ec6TO(i#+cCAs%dx_|8xT}vqX!Z~Qd;RqhmQjl`24%ufH zUeotQ8D=K1&Hn%zwy^cB)e3}3szBsA5ULQN;wm&O467)zHo&oroE1H;S#<219y#h_ zI{Sy&rkRi2_ghT-w*_T?#4{o0!rYf`O1F81sZ}XWRDx+r5wBV4-A1mjA2O{h{%CXY zk7z#dv2$=tNiozaiuI1Io5+uFZB0o-zDv!#l7*!Vjw%Hzp#+_@Vn`+VEW;I%Y)iYc zi0MzprJfCq$^1Z|03P9~iL!>(Z+7d_{#SU%i zHy$iVr^{uA8c)K8(l!8l$*Cmh_GZe{ul9HaPT3m?B|7%|C5hW>jp@9S+MB)!m0Q(n zzuMH|*jtgFqKReHRH4MERVIh}K;e80X9{F^EwY!L{{Tu+ z1;=iOw?M!XuDULYvMqy=r+WR)a&FaOmi0Z{{?uRbmYz}=^DLJE@-InB3%*l-%otym zt-p3wNFMEJ%hVCBz4;ikuUnICgH;B~@ubY}Cn1kL2M=md!Gue*_^Xfq z02gxJ^mYMw*Qk73Et3K1>|U&ocJ{*vz-An1u0{;7i4QV>*izNM#CF|UA5H5w5(Y#LD9_vN{dKiW0f!tw&O?g(Bmr2&k3r$Fn z4OWI+M5UmpZ(Zx|)H1s66e|`OU9^@3qR-gwsQ&<`z;i0Q_4Afuz18ks1%lyLySxb2 zoO%tZwd8HEi4Q}0<;{-x5s67knSWzJQA%r)^*>UtB6Zmq$|5iW;%6gL4xO&8*AOHk zIV+PX?nh^PQR&M7?U#G;{FP$+bDJ*2=02z~o0Jw>Nmn_@SW-}sit!Z{)|W%;HR0ey zWL0AmDFPS?KV$K26tXCdqyp;1v*q28?N@g!Vf;@sjh4k~9Q!ET`4o863)CcESJ7*<=H z*>UZT%3)!(EkHKJa{0R)Ouyqyv=fmku2l1=sbIssYtr6JwsS8SZ-sE z_G;S^=^5LBxUSpTZEBFYt9#1wQrc>wvgg7DDo)zWrv}44h9`ToHm|{(wbHU&l}64X z-HVmZ1)3&5aC-NDkuEKoBXONmlcYtEV!qsTfmNxu5>TL;(28o<>2{e$A_e4FX~mAM z;Ef4$S1x_pKI!(muz2l*FtSXx%D&G0WlLekk{k$A$Z17GsR<^Ya_(%h59v$rpIzf8(pQ71!-Z<$Y+$=MH} z>_@QbAgP0*{fS|fAtlJBpmj+Vr_rfsQZi+|j8MFihtt2Zo;`G!g$YRn%{yyo$n7$0 z7s%+7YL?pL$d39#kn3&^DoF=o2-K^vz=8`9n6!fs?!J3^r1U|Nb~^sFc{(!CbJ-E@#2P*N-$ZRT&M%pPRLJhm2+ z0V;5;0te7Pr&~1K@!WY2$<|u7V&FxqtOz_m783$gh1ZWFw5mguBcS3^k?+=2Zx+=# z9&%ys4fm^f`7)@I6#Od>xJvFloy)lLn{g5(t;KZn9a0vfQ{Vs}ZmMTaAP7f*`+h5X zrR5X8Qay^t?ggSwK{76TkCn-C#Vxm?EwQ`ImcB)Ftv(tlP67RqsyD@&u4F&w_#nfn z{{ZtOzK2C=K)5RY+ZhD_Q-(WT2&v(~RDC0TS;4nM9>lt(gUt+FF#OY|1$q{_Y{YZ{ zjY} zvZW|Ojdfwiy=SFtzAjOEzRkLS9SIX9LxOA2GU;F|;Q&zaBzv`b>d5$Fe%ueZQM7eT?(Cyw$lz7RS(Ow(NbuN0ZOi``cArxY6WqOR}q(^3}jpz*ja-@5td!%6ZOER;Hf; zLy%IFRRBTgPWtojsWxrt#k)s`5%&BP&jeq#PQ}GLRVOHMiYD@*Xs9(%O5I6XtM5o7 zUpUwyDF7ew{vVpJF`}s<;!|y2x@ihQ{)j#G?8TN zgD)si*I4H7y>2>b`ZU(X>`)q|n~mAlracj@oL7{>LVcwJr`x93EQt zuQE*Au}B?KoB3;O&bmq_u0Q3qU+z!=`t^3I{{W`SLQNv9EI$7LdBfKAg1FBA0M;kpU3T>P*D^8wpoNS-nmYT#CNx5PLOWyi_1s7qE0Azp zV;05b#YrlkWU~V>EomZ&df@DWp1aTuLSDGcIzkoJdt)7c_=!&(YU8L0KI_~(%P{T? zJEw4NvToTNxS+c#bIWncrS55`Bk+M;fS?{4%~uYiql7{+!rl< zn?I>L6SpgjXzl#ITVQdvF9DE+At;jD{{Vp}VL+u6s-7pVyDUFgk18?Dftv>39VhL5 zCF7!}el#uA=v4IG{TrZZdCjATBvu{ zY`u3)QUe;D!tR?exWqhv+5aN{L zK}bm=zZRB0HJBK=G02I8Y=Z$U45s600P$@}BS1V*xR*k^tD5%Xwf*g}_cqgNpK$Jb zSUsA^%H5wGt2=S-n1fIpQ}NLqPP`J*!Sc(g1z;NOO>J4#D#e{-0&FxuaT|544MRC# zcs~@!K!Nw8xA%_Y;XSy%Svy;P&62D=hTFbaWy)?VFRtf4j4iezK9aO^3pH3YP}|2= z^RW$-Qq)e*>44yt8l5;4AWnrC?dAUf7_)j|?WbaMmypMAa=AGKIg*#s*>YlJcWw6r zO~7f@6uIqbYaMB<>T@AHN+_`Z08ZWRf4V`A*?S3N{{VE9$AX9IKM9p>^&bM)dTk%( z3tlye+GHWMrNp%Kdm|0Ll&u7$(L$9Pq3VojLfF=L#=61r5dlBTs%q}naQjV@cPqCY zzV8&ov4dGLdme9(xQ5($PTZhgu8^kN6Xb<(`RJTSB?<+!ijXU<%!{%7iYUCaMRAbt zB2swwZXb9GP%JkT?UHwSIS+eqc=u_oM(&1L+qMq9)A1J>m%>!%mBnlG5(r9bzWd=r4$NvU7evMqg8)N3oEWe?TTXto6-|ZOYM=$diMELGXu-P5Ppz*?s6Kbu{1RQPMu$X&=Pas$(;$7BuB#=bfPmD+VuUxfS70#esGT{_Scpqm)7v?*}uHv4UI zJe4^xQAc8sG-#Cq5OBjwQK6@W4v3=4d<<;5o^9@f?DpxzlnRS`#~e#!^#iB4=`vv@ z=NrA;EDo5`Q|DV(_tL8DJ=%c^XHcCjHwdJq=!)eTThP*}({~_{QT7~+>tmUrJqYpB zIzmb{!qy*6SGo_6^o=r-Ov&x6Jhexf*i$O178EL#B|?NN+6dHyh(!@_x$C+fi7n{M zV`kVn4dd!sjO%TGbLSFVb)|J9;v}T*Hm2JRvDXcFvx5^R4eVz3E_*wt?0Lh7Fos%j zG+k$^Q|RLL_2oX&f9`FqER>V|^rw*b4Hx&qkTv*fi6_2C;`^3EfTmk8==YiC<>dl~ z66#napZih;DbUal(XC7Z1P0-&KfCy=6&V4cXX2~~_+u6>)w+caGS?{)niTOZ5kd47 zopLvIVLqT{cnF`l&)}-cUlKEH#$+$$ttr|^;w+y6q`aYD{Sb9`52%P&Ws*9U2(daT z*2{a-Zdbdz2`P^ihl^<*-U&*6)2uA6t+t>K9l-nbRi$A7BM=@{jyqzc$qaz^ys3U+ zANnI!eLJ1z?|@p(Zv!38C72W>;m~JxB8ILPwyp#%YNF?}=uU!X7>5<2;Osw`B;1!Ce;61;rco1j_~xBgcr|I8bZS@nVRr@{7wNm;}8@@XRI`r@RHh~R7g0NJL9L;I7IU2Hbx@zo%4lG9<6UZj@ks`eL< z34)6r0k~rF*i9Aq%ohRhX}0$?`gHB5wN5G}{-dV;XG5=n zK^wIRd8{{3pW$k^)=y7`NlF3wYo`)ur71Ec8Q|rUD9B0vB3q5y+dec?feQTtO%u08 z5_C={BKceiyR*iLO3=dt+FJxD{+$N+5vrYPe0z#5I15*21tm>xG*ExB=9SXFR)S#V zl%!b&do6u8y^(5LH$~lmAq3#uiF-8 zf5-wdRbMcrWY_-bVxOZ_@~YLlQ^!=_WX#%U1rE5XmAKN8?^<2te?Zi$p{MLp+`$!v zkVKJ=TjzMs8;CuLp<)>yCqvhUaL9lZE}#C zsTejl64l!}&QCj}8E-n@J=NvOSHuNxPEEO%!>bSI%_Jgjj6=}Iuv^xb;c6%aK_qr>( zI(bKp=16s9*KnVQPhLLa=h&L!;evkbh2BPW-V3H*AytUlRSAVx;Rr!B1MAj}wSgZ6 zR@m);S4VDdF`KzvE{xGIVIgd`eXDTQN9-ELraokkid%Mt!`ID$FGwR$F_H zll@m6NC-kc)2$4Fwo!z5m13%&RQu@O#+*XWbMF25Gv)h>3W=>0qOWh&p!r(4P^rqP+sj`)%X=jAKNT|BWD5Sun{(m)8YA=M ziR6}Lct-ugy7c|8r^jBC$#*={J}dW8*ZsbqUaQ!zSH(8P>OXhm_d4{}eAcC05_fSw z?LT$n^!-{b2sZKLt66`%{jc^q>g-i?#fyEx``(^E)2SfXrd>K8>HeKE3F3fA{rUTz z9eQa=SPE`C{v-DMKIh%g)Fhf&{{RX;{{Ua<@Y94cjK}`~40`x|{<>u4F693JeEr|{ zw2`2+TR-97Z{F#rC|2+)i^#w8GVlAp_;CLK4g0U~hx|YGf7hXAf9-$qj}BaWmm87u zA0Av5VL##8`@Mdz-7o%wU2OPS;C~UrxmfK_S-1SZVCnw=6i@rV55MpBYs_K(e7q0f zRSsyxPx$kFKJ&dg{nhmTooavd=Z_KjqViI3FZgx$?*8q+z5eij(CY`P{{WVM{{TVw z6;AF5eDCqje|2Afr%}`THL2-;mPoYlMzCM_asL2#kGa?P{yzTz^=n6>e3yU3KQ(h7 z^G~+#@k8%_gXr@{{Z#trN;RdW#2L@kACsb z-2VWFYp?ec)8DAq#SYX%CjS5f8}EMcA9v}|qs3EIS9AXW#3Sx~=|6w(bUl6E-+rvc z4Jczj^AunAZ+-s1bsc@)-4ZF2YyBks@7?`hd}!6F#X4aB0Kfg7ul@f3_s#zR&}!h| zi4@`7{{Z-UzkAW1zjw!`zH;@~{`!A6w}%u%@}s@4{{V|O*X}3p^!u9gsQzjLf&|{{WM3{{Zh(_qu&rgt&zm@GD)L_apB9@t&W&{n~neXWQ@8d8kcCKly(D z08jDj`<*|0uf6Z~X@AxpAChTsL^4nL4g1rx{{YRqH{AXFAKrfN z_f7TwjTRpwEsDjz{{ZIg>#z7pAHDki=eyhP)f{df(x3T#iAz8K0F7P$0N5N-d;U~U-u=qHj=Ba%`HFB%k$>ciZ|^^N=iTYk$KRsI=21M+YiIZb ze)IPYec$)0``+zYlB$($Kk->#z5V$6pWYob{{YIDG{N1E`KCut@Qi)Wz5BEG{r>>! z(8tQ2JW}o*{{TB$y8XvLdG~bZflfImk2Lm3ne@H;pWglR*Wc~cZm0fCxcd~R^M4g*VjuZ^bNl}Qec!qF z{^0xG{bqE3v#8|pTw9cX<(=E^{{Y5U)9?QHe*Xa7tJi<;zwq<%RtLzgyMO-x^LLN$ z6aEwKf9pNkvyaAVu15g8PyYav?cconi2dK)``#Y^0B)yeYY Nr$9d_`*tfU|Jiw=2~Ge2 literal 79258 zcmb4qbx<79*X2Nf;0Xk`U_+1q2^KuT-5Feh!@%GS79b(GyE_cb;68YQyAL|J1(%?K zkZgXn_0_jq`^WB{?!K?9`_z4>x?a7iEB$xz?*`zxvb>T!00RR9p!n|q{M`gl$oV+f z0sv}i08Rh^fcx+Ihreim%zs$_S72gdVEj8VF#ikxeTVrUC;y9s|Bd!v^#AMl_d9?D z7vmYm^%D$c0452>6B3NSeSnt$0LBySf6o7>+^xEqwf(Mo}AG%G$Uka<(||sH^1<2BKm(4aGw0P zj(<`x|LJ&&frX3r@3kfg022cf>pwc4Vm}2u#RL3D2MGY1lnLj>TdAkaT4WY(=eR6< zUkazmrL`05x@TDVEsHksWOQ`hgD(VxWkH@Pv;Wk2d`(JjZ2G$lApAEOCdm^Lzt7{GiN}m!6|5;<8Rn75?(*@;@8X9LSh5Y8$ff&I=`*Uv#jD%W^e2 zU1iVI(BjnAXN_B}vmtpF>G>?EKo%3H?e|}~5bqIJzDX7lbAe@FQOr8QP%h!rNoJpFk`oN$^mWocz-TAWXxrBK!DBGx=5P?GS_>rdTS zF<77Wqd6oJA$_7DRZT#9%^__?#;=z&x77savx5@o#tG?$cdQz1PEdMTp;A#3zn!Kf zDIy9qF9SGNqT2i?@$*XyAouIfX-#M}&u!B!&KJxdja+XkQozwti?d9k^iumGXt(#3 zqX&A@XanV`0_h~;K7L>Jc86fjRxDs5h6YFx0t0lS8QlJi@Ewqdeq8Ol3|~o zJhnTz{w@kz>3s3ho19Wu1Z<26YX%ipVD3S<>}}85KtLL%c)~Pt)!5i%w^h|MGcz;w z{r}M}5Cs(fSs}{X2tLoRpU2KQ{pC`{oks4dg|5nW9zqYk>aq01T@d^pKBdiyiD)X_e zYbR_*ru`EY6?AUrMWptctfJQe6twNpW87^6RC%66hJn$TJSKYk{S^{z+XC;bddyj? zU_53!SS8(_frw@~(YG1H`X>tIFN-NI%Zt?OpJTf zJiWVQDg3uqM)XS4a#e;L_Tp?~KeXD$kTBuDvy9sO@Y<;$=R-X&ZHMRIWnq^p~6Si9PE(hsU%p-7V3jErW9-PXB_n~9Ek(R7`pfVX2++m9t*tF z@z4@ZGhFERb_TcfYPmnu^o;Azxat=wG!b)hXx;hkQjz-K;NIi@G!rkKz^dDM%F}wo zCqJ6d%U^>0g`Yi(tZVL>Uh(Katb#y9b9$9Ce_(%j)zJ}Vo7c)39sYyoYv$2gfn_bo z;rkI(GsDv@hlUko*f)ir4LQpgT7-Ox5x(*qY}li3NRT|QfOHkX0;z@J^y{k$nO4n{p%Fy^$!^7``{6sZr6}jWkAKl(&=F4}SsK4AVhJ zrrUo3`!j!jT?PeRS}pTFI(7s-(qshP(r>-{a}fQHRQeZiX!+tVV2hyV?D6{DUjR`5 zFJPu`(zB`b_mc||!>zx7(As(6tX}A9Bt4S#?K1UyrD1{tjfgM!ok78{^S3bb$kMM=Ef2K z<>{wF?%#~WK7(efG;vge2=Pp+;r->Hv{D4hL8gZhDdgl8T(Zl^PESZ^mt|yMdPdF` zZ(N4)Nt%Owp7gz+W3n}v+5<>tOeMZE?HDmM*r|%*2*Uy z?(D^HSAAeCML$eA6gBGk7vK#kD<_n5m$64E!uZbFp`{UWTSJTqHIaZ8l4>&Xb!t*` z-@%2hQ$?L9oe`7h_MA2tX?@L1AX3PSHI$Y8c>%5jE(_!1@>CwX@Ib8)sPzU`Op)$= z>L8tIB7{nZ&$m~o%Uu5=fTXK zEZwalOrpkCmf-%exs?;vmGqpSPd?;8*LG0R=h?uDTDr=+r>^N?t#&lFnU%k9^2#x7 z!X(}f_|C4&dM1)oQqGkB6pZFC-;Q4pT<;6bJpI;#F7rC+73;edn0HJk!yYEG>eJyK zN=fDB-~=SRO^*3t&}%%{;cf~Ed-uxKT70X=$fhE%?I`YbekePHZ`i0|5ujd|J#f`_ zOS+lvZrT*tw7e=eJ;|&+^3~xLk!)CxYeXVR4pZq&3M-VFHFvdxmpk#s-nH%Qh1jaR z>5~6^eyCDI6)ret4!qsYS!b51-gH0;Y_3x*tE1qbM3tq@Q#*@=0C&p;ynUbc%J|S4Pc{IRK%t+T;$H)y0a-oonSqa)F?5 z{|QwjC6AigGLhCc(_o}=61~qL5Uib|q;;w!Itn!oddC}{o$6k7K>7k>7?%<|Uyqcw z6g9K7tLex0T^B!CD(RZV1Y@=3@2I4J=A7DwhDA$4_Ef7M%z|aO;2^SMVVjp(% zUJBFi6``#>lBKm2M^c4j$_dLjq+-6k>CeSpp7?Iw?{_#oC`&G0ur%#Qjjw`%H?XSK z8H?e-j4RG)r{=b~e9&_{X1+BDAJb4ov&qvQ;^D)|=YgNs*zOdPhQTB8eUdpg+eQdkhHxoEp^PFU~dKJczx~6O(^>mWVS;JiI zuh{brL`7UD6@4kq#(Ij%QD0~_YzLh~J*;l^!aWCd!)U%}-IxC;#ZJL%^fo6sOjviK zn6)u~BmJd{&KlBJ{v%mudPDVOe>yN1-*)Hh) zk0LWYuTku_T+Cf0n54YXsPCzA(n?!^G)t7T4z{A^o^-^B;wkRDA^d}D%}M9#W7uZC zt&jg^aj3&Xr}lC-jiBhSHm*ujK?8fZm}IfUl@7a*fQ<-g&SDZEl~Y^yXX{Yhq5|K& zV7J}Oo7#8j?%a=sTmImz#iOXbiUyaNnk;TxIr#z0PVSp6=~9y^uD8pXjzT;AK4w=) z8$NUmqaw*Nfv$i&p`uw)rcjPZ-!Z+WoYdc3c21NL6yJUBX5 z7|%8fR1NvTG>Z8xCp+y)oRQ!;8@?=4L9$n6c$~RR+E!skM3*h*iXX&#c{Le7OJR{D zC|C+&=JDyyep96Re2IZi>?YNlysxd9AKA^^ZLEHCmxIlnP`y#|+>Z#VAOFlnR`TVo z;VHF`&T`nhA3pnDRP&vqM&)99iHD`Ajt#Monl5u{WpkyFvhGt5&pITYh~fu!GcQd_ zh3#$o2^Z4!;6cZrp1m|`eAC*Tj~%qUa}VlSmG*b?QRSENNSseA1ZIU8620p6{8_hf z=g{BC!s`Ry8h5x9>CB^smop(E%j(3FE?RMKaJsL8r2t8|eP4MljK6YCSSRbNC8KuV zJgA;8%xWm{&8`r;#>rxDw{wqx8J{Zx*6CAbP$o#0gO^2@1=9zgs9g(N+KXHHncs_U zfA!HRPdC5!SUyY;n?8tnR`7xjHZUm?}a3^#xmkxR8nx7xKaIDwc zTPZzl{kY`DbHuGrE{N9qff!Sh%%?ePa?a#qPz9pQ;(Dv=AJpY|!YS$dLam(c6b37# zKxV&q;;r<&KaW3cjF`D~10)RTTk0C?eDT!7GMDw4-JG=*@b&aPNJi&c#TDqF{FxF@ zO8GUdNWv}w1NT;JGkggUE_xrgfhEXbu92}r3HKnKA)XAR5U65=@&ht4CVl$6K>S#; zhF;Cx&^r*5uvvcQqW6nAn;2$N_|`yEg6s0$U~kQXo1v8jnjoh2{=;9lnj}$fU=N31uw3Goc#mm zw>{iyXil`biBZUAE;kw86= z0A#Wc+X-dELg)aJySYToGSPMIc{ToSzuWgRQSIwN1{88n)^?$Y8-tSouHsqP1k<=9 z7TFYJ-7?4ZpfO{s9QLu7FvT%c!MYaoa__~`qLxXrPHeR=9#JkpZD1-fk}|JwY?~Px z_N0j1lGkh5iZt2CNpRDX>7dl!gcM*3r)RQcw-El2CIx-K`fL*pgXf_0))`*6xUZ`C zyF3>DW_^de;=KI|^g2?{HZ3sG+&>$Z^{%*TgV-X3@_lEw*FSUo7!A;bSci8fE65#=xfm=xYPj83P zNmD;>XzP$woX^HMRJh->*VknFDj*fQtc^BDHDw((V#!e-(^huRDHkp z6iNNGR5!Bl%4fSGsvZw<$g!+b%41EO^PTRPT88_EmA-DN%C*?_F_i9|d4~h)uBd9H zV!^4st=P1SHz1>CBv-#+9%)nqiq(eh_%-mj!-ku7lmZ+0Y)Gy}s69*_8ihHqJqt$8 zznyfgc(FTZ@hMxT3;5L3@NvJ067OsKZq)qGrT=tZbHx?ek%XoilNr#(8`hG8v4S@ zZk+nYekn8}O)QvNg(MWgwh=_OPtoMSGWqj3sU@N$i&9tcd5NGusRz} zL?G+LhcdC*r>4cn5k&hVDGj$uJ zCrnRU`eQR#QhHL3r47lI{4X{4Ww3hh?=(kMG1(tY?~kIG+%( zg_21XE#F)-td~eX&5(s@AubM3``rfAM165H{?F!SW6PQA6>Tfav+^X>#OuYF14sBt z|9wz!g5jV9_(~lbKp>UYLcR=~+v~kV(t6s0~N9pux z#9BV#UF^>;+m*xLaya;lxTr=IHO<4AdUz;lINoL$v2UusXDc0(IJp^r(B3%LXs&iT zody+-ZiRcY$31Fqs{{Xq$w?DAWrg2b1cgX(1#f?IIB8l5YfJ3HQ28o#g}BMBrpFOC zW^>^A)WLzj020(v!zq4MmB%Wr#D`Xjouvqne6l3?)^hhn64H8wbpCL)#Aj4H%UQa- z8hhA}pw5~2$>woGcs=TZGKOhEfgp4Qp4EL+UbB;~^bOVby*>#Ss2V~pYv}Nj#3x;7 z%V}PNP?$N;)N?w0f@^-4orC*F2w&p$PXzu5E+bzbt^05qWy9((AZyF`FTnAm;H3Hg0|{)Kf8X!=<1YaF)nC9=O}|+3zsx~zzxnS^ zL4N^-Y1?IM!xIcQ>Q@`IVTX^?P1ymal@sXwiScrf6B=5mnRYf0VokSEO;`UHrtB&! z@S)TJN7Zpbtbgc&evvJoJxVqG^Ft1oIiC3W;0UHAKtjWbp?i1B{wyESZxJ_9H)l?p zTJJ;1ZU|e=O`6<5`=jNiho3q&{sOR)j>)+jOU1245-O8zJ6rOm|4`g=2-T3hDEBW@ zEYM}??zn09bz0PeJgQiw!iHtJ!pJeP_2Nz6s(>9pdWUbjB)w$yBlO|wZkzAP_m=X4 zjFT?}vAtAuQIp47`ige4zL|+sSi2=@HrmxAQD_fQ%kH7yHXFawIW|WK&qDcMwq{+PZC-Lxr6RdpcR&KC$fd}1nPvhygew(yN2`^| z%EVRuAfX`>N|?pdnGmjjo`9dD9j~okZ~B%_(Cr114&>As-Q};Z2@S{(n88+l;f{8Q z%H^>leOWfo4$2to*kYdl2-;E)=WZ0{m#^>uwU~2$2}a(Q4Z!f+_o>@@KyqK z6W4Q*d%1cOQaxW-yX_K{Px3P=R|aQskb*@crZ;_t*r!FqViRJc_!4wuE9Gh%{~=81 z&3}eB|7_ED7kli708Qcel>zR@IfNk|QmD-Nlom?hpYCVGw^A7$m6xel&;1Z!3+(rN zkEgBO%!Xqq>q285#Spj1E5e}uYt>4tWD7@^7mjdQkZt<%v?5sj25_vtxPX9@O<&?4 zQa05%_x%OD_Wq%wb!8Vtzl(0`+F~0+yt9^BIc2`(zMoqPkSZBZwx574LM6<;fKldc z*8N4slS=7&IhhP%2<=$Gt3F86yKwi5fo~M#j?esWMaj>aH93Au^lsjOj8;pQ>YVWd z{+#Y}(v!lOSJ^5htG`?qv5sjM3v6oJgjsftLV(U5@-5#!hyo09hxUtpxVW|sdJ8nYL>EU9Ewtahhty>12avV~ zE>Whx(6;|AKFd8UaFC{O&fHyHv{bedKf7iseUPY|tl|{5qPXW495HI4?9tP{Ebe)s zV3v=hczo|FR9f@i%lno6iM_|JCgk9n;O)_-R~7`Es@KeIwC@#V3}VqR4*atNE(1zH z@}#%s6ILiQap&fXXhTq&(bdV-a!l%9D>0}cQ2d_X4U8BO)G?wFoU2aURsmnG(H@Ro z^e1uG2ad_p>uX#*>7D)+`f%f0?(UDL$Buf%Eu=L>W8pOG{MqPizuneN2$pX}0fBTX z&Tf^S3aL%Ptd?g!3q}y1M-88;j<52l6>WqEw$B_O6a!YmSoYv|a;6~eZ6HC0c5(V;0HILL-rT>oR z)I+!1%iW4dhxazkwW0hfQvK{f%BHF&DB&s}B1E%U%+E~ouzJ?Qj-Y@Fz4^^k0*b-s zx{me5zOS4<(ND_8B9Kms2gN7X2PWmSV8OOALxGW3EYVTTR&OzFjC8b6J?AZFO4RXT z6|B-d_J0Nnoh>Mdqeccl5R?cNdE?BR>RA?6u;46f7(-9-un5iq^G*nx>1iInvYDG& znPu7uX*<@u3tx>+I$3TfonP~}z5LS3e>1d#4s~8?UP%|aseu~OPP(s%1@;-7N?>Od z1$|CYC~VM?X%Z$X{0pe0%}7rmb?~vQ2SWJ=?bCIV$1t3tPFiFFn5qJro=bxrzl2uB zMqp@Um#N({dY|2SH;X1$$U)ncn-AO_$uk|oF?mB$TQ@r%COVl=3elu=isMyFv+F5G z+;8bqxPPqq5($L1G?p}rzc-^K`qc=n8uc2972OO#C#CAbWy4lQvSOmaN7ZO%*eM|# zNwh?yh4vjlKhn?zC^-Q!IEWGqpB) z^i)qCZU7(Xbc@Av_SyqfpUFe6ZfP2-%(hjv zky#DA>g7&>NgdApOrVL|c`QJo#;KVSQr#Ym&|S-24`@sMGb3(|vKNxeW_`MG z5?Y&zIhsc4ta7^UcjYiDHk>?#&5rvruIe6Io8TZXf9tF!XfQ&GftW<8yOOa zFecj{hxL1jXn)aSO;UQLz63EdPZLi9Y5qw>P)rf9$BM3NH@cg)8Glr;ETKI_^=fI7 zv*a&ruWJF)B)Bc9okZ8+w0u2ZS4SI})GiVm*%D${4>i+kzx zf&>FZhJ!RvCvPeQTeuu>f3o_;oOjTf?1wq7^r+4sDF>#b-)>jz@Kg5VZni)Uj2~0U z`88s7t${2xvhTjceRk|J(Sqd7yRpc$IGv2xigRHO6r(tA$?s<0W>;wfkt4sMRm<7a zt2!FxUV;VNYOIJI8DGZwp9hm7J%j$@FaERCTte2BCVpGt|h-N2wcb<2fDshXIb1UuC zw$N0%)UrmetT%mGG_F<83oO3UI~}D>6}8n=diEitz00OX`K_ugc++Y^%xU z>e!T&@5KGSzcwv3OCt;kddgsA>V{O(x4rI{#Jv>*LmS*E?TngPRWKQjKyXiLqQOd( zBe6c$^kT+%C(~IV9;7_k!Cgh=`C=5h&Xh+I9Y(9H;3$Z-Wgp_(*w5Zi=8kQn2_SOY zb0tfqbd1J?KyF)kGaV^lD&rG2Ew4NrJ!wDt8Jry*{HO2%|MTv=kzTqGGa1KJ9l^&f znu{q`UpkTX;8r9X(?bxin9Q_`RX?JcO8zepz)_mcLgfiI-~R=ybjBjk?a-rWM3Z6Z z95^K`k5J4_i;-VoxTvw|d8(+b7>=?g46s>-bD0V-Xvr6-8W#2!9sjvfuKM#EcWIiv z1M{DsMY7VPq>C@0EJYO}l(?1i+K)ZIK*YX%hHM&{d(%6Hfi^mX{CX;ntK#m$`l;0* zr-Ex+U7Y?^y<>r|QRenoZG-bd6#Z&`MC|E>b4Y9sWBx;;Ysfsr^ELK|sOoQ%`U< zMlNfi7hgtC@2Z;KxpR0_8AE9gE*xAovpPZl@|D&<*&jmQ17GKpf7om+lVtXHw1vPb ztkF)!0$^Eo&v^?fW)?!GmV>zFQAc~BrQbeo6fJiG51?d8{jKW|VP zDb|RZ#rko+5B(ZTx?kejl#Rbstv{G58Xp2G7f;mLEoL{+?Gb}Pt+Q;fc?soe`A*$#z2%w?+=H4lMJnTZ+&YSKyjB-%(0R94X7E?cacYErXuk#MIGDIY}>O`j>u-LVs?1X1WV z^D{S$KTd9S20BaFg^hPXub~R_ylpqbnso5@T6-6&;qw`02W)oH3j=O)pH_XF!p_#I zxw;_ULcI=<{H;r8I*aFEDw52~dBiaw43UTZ{)!Czj#-;;m;$$~25^A)lz9DR4q<&>IrE!}&DJ>`73=Y`>od ziTlcA#6jsO-%7Ro{jY-(SS-n0v2S)>_nucQIvrbdh(SAaPce0P7QI$M+UmR71johw zs@Lk6%I=`-`ypDij8iozBtHB~ouzD2O##`hGl^yLw6t)`XTP-~Qj*8F2m7nixpqNy zL74Q@)vCnBsw%|k-u4v4$4R{0CuQvLcO#Qri)X}Xp|(hlVh@8)Nd3Hj)rQ+hD#^@C z2g(MVmyORHg}hy6+q9v%Vmhv%QylZJb_(qzdgOireu}|X?QS}uBCktD^-^K#q1a?( zgxHP=K}%-@J2_t2clmvMf;e(oZ_9{TpoXl|TCAsu1Jp~FzLv4d6-3&i>q9rk-)>^s zE}n+B>W6+3B;6C2(Ez~TX0qtTN!kdw%KuaxikcZDo2iBBlnO7e8>HI?1iL~x5#J?O zvY*_EKF$)$`F1YGlJ(!;OWf`H!A;$FA+P#XCbUV^b%7%1<(LL43b>jiRX6uUIr@$2 z8+O)oMehxqM;fSCu9wy2pl?@ee9Nh0TTTS!npQXpITuvdbhg}REt!j!_zv*MpC!oRyOw341kzJP0Ed|_F~BunMy8_}bc zx$JhC-bPm?tvCijy??ltoPow6y35sCRg(xUxq23T7V*sIhpABDSSsg!Kqj8bIMeQ6 zoGIWN{dvwyO+IJV^M6J3yRrzM`}~-)3EQ!Lt!Q4d43w_GNN3%x0_0Y5j zy}K*ubnQFh)FwKa_wD|XYA`eXPiX~6jc>9Kkx`WjHX3CkDj;8%M=R=t=9Dt?w6ugz z3Z#VJ-bF7a(z>_Ylw34X2HMSl)K+5KR#;C)pg&pRyLy=Wj&h79d*=`-gmlDbvs=v4 zfL&Rpp2Yl)paddP)9Z-e(X}K(<@vRX;ON)=?sv-hb znsmIM^x3;dC0@?!kDbcA@zw&a3?2yw2w*FyuiA?y4q@H2UZoQ7K;y+vm|zA75Z{&j*fcGkKr`o zu2gR+1W!8J7(0|Lujsf=Gmz$Pa#!VZCW+(kwvRcpq27RDEM_wnq^!O8wG`=Hxhve{PM8fOpG23xDCFD%M% z-GTI@BRhVAU9dMI+J`Jdxb))Waao7R7lA|VFFy&hE}s%O1q{?c0$@%0O%y+i^A%shFe@R!5cBitjE{NVkCYsh45gmbUr=!7r<5gsTk4++ zx@xT5Ns75f=Or}OQ0Yqr*!Pb$l^Kgc#golKp!Z*Bu;)m>Vzgav`kHysCc#S4hR7bMgo5`w(Eb~R5`HaxiU(G#&VRGO!XM?x<5H1;Kbb%o)9cB@qQp*-sXyq(jXgNN6d>|?b8NeEyY4m;0FQ< z)>}58Z)UB&ecGxeuV1CFKKraQp8jQr#F=W_DePeN1e?K`mAKg$v+MzGh+_YRQ2o_HhA*%xgo9N;p z`>{zK3uw5{>|e_b*7k#KMbuWTW+FI<3%s44jdTfS=Lmc3=N<*CSx+e1-ErS5(+nGs zbdILvPl2K6zW}w(5lVvWY%!m7o7f}|C$6}apGO)xYM7w56QUo~s=z8Ux=eMJ@AsW= ze_ke$)5&1}oNwJc!M_0>uha1tIGghA`Ym`IbvUs6{D^3mW{d0l%?N( zI;Sc%BZ*AjR2P={jd4g^>iiEfralK5ys>pi%wCaIguiW!1;G2FMepSPm8A%$z34Lm zwKRVuPY2mXFwn2i@nVu~S^YjRqcB1I**&YxbKRU|)L z)HNWT*0F!$$0_7ddIS9lQkAt5Vw6wp|KP+} zBD$QKa+87tF!Z+BVTqy5S2>JlPLH*!xk$fRs5czZdf~OFCu__YH~8W@ep_l3CU)LKN{saN{|Lflh?2rrEMQC>zmRv zkiry7VJb`+XLybfe0EY_Ozl^5dEBn10p2fm6ZhP@m9hs_udbWONKvyM#c~Q^MQMuj z@>-+Pm71_6w03=U`Br#$oY<)QAJTD~5$il8Yg)Bv7LCaOr*gGyJ^!Etw~4j@ct>$_ zA%kHk3Y40y@!lun#?4>p_T~r;Dcg#UiH+*0sh{&}Z-UZa1b!%8^{`Sh70P#2Z{|om z5uO1P3GaYCoSDS`aD?bCQ=U$8RK2`GILYsxPs(p3TY9?}E0nLb2lUQC(|#WkMv@-L zM{_~X46lUiN=7Zp=m}+$jKzl(H5io@*lAA9#vU1Hb{?TyU4*mnTL{mu%Enfg$pFp=UbUl z+e>fjMeikhl{iiqH}{M~(aPr+*XaGvWnQXS&#-{Qn}Fkq^%Fb1Y=RFBRrdjGPsA*& zQ6?nCLL+;i!}$}TGJ{H0?HB2X+K1ZKiUD)hRfCh(Atf$vsHo_}rAkL_kAWwFiw5m} zts{tRJ`}RbOU}r}xCk zEjZMY<-I1Pv*ZYdtO*#XP)Pnwhnya2ta?rg|H-CnDzz7{1{?LQMQWneJ$%EE?y~0AbfY}Le~=4`MhlOS!->itL8s$CCIh<}jI69Yem&&oY^d8q_Nf>Q> zkd69k4O1+HHPb;BufLb}-@lif9DGg7eadso6IbfOJz2uWu>2jaVDu6Ro&K?$!sXzw z^9(;AP}V+)#sHr=nUrS9m8}ri=|;Qs7tkxY{h-ydT)m#%&sXSyCNeo(m3V9e0_T^j z-|N6znNzJ~-==&4fPf0_T&jGfi8!&!>8BlG0=DV*q|41GqH~3_@DzArK~GsvY8BZUk{d^P`!lC>;fi$HA$OsVha(lFS1#pE?h8e!@zU1sTirMl!Jl-^r z2`rFEA92#lWY(LT@Splat2uv{I3W1vwcV6}FNi=wNJ;e}MD}&5zbBg*GQ&hrH>o~# zhmjgzn=~OM2J186>Pf+Zq(lkB6n)oCfRpTMcXcUwZ!1#SZtBLx*(AX@@U$&6ZaD|8 zn=p!iN@S~$7AaOJNlD@QW;j)O2m~^e2f?5_}%g%k8MPUo%^iuZ9LH%ZtOP$Qop1U9;C+Zd8 zuC7;PPWn)+LRFlYs2-a2p{}k40&Gn9z`V0<()+G-m~;Qm($8kAquWz+P)k6I!g2(d zB$ycfwjeS~&Y15AM2MeFweHF#x0J`-0&Dky-9%lmG<%l&QyP0qD6g-K4y=}-Zne*i zvJy$Lvi)=rszeR2UNEiMewsnpB}A^I2clU#=8ze%Vm2LQmm|^Awl84DD;(f;dqQ(X z87tqd z38@HcnYedRnV5!qfh*KRoiy+kIL=?Dg{|x~cAuk4KL|5!>=uAOe~Vb7&-Rv*KZ~Eq0(Y6> zAKp`yR&ry_nNW>&`zEfy7bL0wGF>W?hs}p)u|tb3H!|gm0`|mN_dUA4%-74yyYyZG!Oq+B2jRARwF1ptT=V!-DESWjtQ zm)ATKbL$)Dj3lPmSQLv?s;v-=7_#J_Q^EXMrnjofnTX8^=b@idFXntMzQ@OT`HPhF zp`6qOi=kl0FIM5j0jG-`($O`s84WzU$m#Sph9bP5kj0ZU0JFJV5P}Y%@|h`-lo{+n z{l;R!gwJQ4L+pmP-p|X?J!RGA&wZ>G3GmDcp3VkraIT!sA9mzguS06k6g4p%>EFU~ zjPGSRLOCMiLCtXDyvfo>+S~$ev>XDjzumT13h@h`cXSziQ#qDZ3`>8m?Ia;E+ zxSM41Y2I>j%1BCNgh%_}5~~_Vj;y*KYKulsPG_TyQeRr#wtMU;K*f!Jcoa-IfW45K zY~Sl3^JJ|TD42UY)tqyAjiONxx2WW^(xHblif^$zGhbq;~~-ODLj&plk`7XiPg z?mKV0#i@-_&j&-WO@DPw?3mZEqf{*(TG=GtZ#Fgm=ck4_?`W}q4fQHAPYCpWz^@|t z(D}^i>Vf{s4iGgzLOYwrW-_vo?4;(XsS% zWTZjqIMNzMYS!4iC3L`*8MtAbkDblEf7)-LJymvrFKPXGzWJ3=P1_3dN%fhDe&?wB zNOgncug0oudH0V>7R?8B_V2Ka#+AKZ^;yWjKI|0DmWQF{lF|>Z!VGt*SkHF%LQ5?& zMqj&g7-?N2 z7EbJ4sn-J+@}zT$Y=g4bHvEN zuE*<*wHz_0v2(xLR#}grGh!O;KxA(l1j}u6i@Y?X;{-Xoq&~;z|8AH7L*mAL2WGP*oaSt za(;eBZ@wWq0bk8#7=&eVjZ|6jln4zy^S==uc2?&Wnu%9vm!p~J0#mN$kNdYkK9f*BmOwpzmSEUXYGu49Dm-29Bu$wq{h;M=eX{ z5}o6yD!q{11EqLOHNBaFkuvSHUE7T^5m5Gd9bK@47uK7mZ!|JWLucw_`?sdsE$K~S zZfEVHHEquw$;9f&a3IuLY{sA?nx4AD6xO$H#yT=Y)k3S9J4Gs=lBuAojkOQe-))!Bl!rVkj+rz8^3pXNdVEJiFr}Oo1VM0A5sl1c+H+ai zQpP@+uraMm+pKpVsVj{(8)H=h4Jq`xVq^P9`LYRdZpP(DN}kl!KEy9~ZP%22bp2t{ zA?5U#b3zU}1dgkD35}@~1$99B-36+;>Q`F-0=}jk1^qTvJ<2??06 znV*uaNJ6!1cIr{jqtKsZNwpyNTMU&}$Z(qA?+8RAt=uK@u*(tI#4v?Oukt2Wjn<$f z*Gucm@+%s3&wh(i^j%U`EfIKt^_(2hOgB_Pk}FkXwL+WqPp9;Gz;kGYVgBD;YcR1T~iD{rR%sLW4tF`)~FJ z81A}N-`%_2Pjm}27@0oQV(w(eekMA&`?^Tz?0CI+yf{;xZTo_s>JOoEt9^oUV6|;f zv?{a)J6+1jKR>PsIic*EWTu_MN8GsJ2}36^&NVL_;tTqfafWlILRaVH=Mm(NVI3p8 zdSFtlkLc9eqLWV7Q|QMR&AyX;HzkqeQd;D9fr>(=ChBfw>4} zBU&xz@v2`Le}eeMnEz3N*z^m}G8GT!Lje!RIUe*(zSTG79hkHg(gLbI78?akgj{rVwZ!x=&vaU6x!O7?M=&6uS6=?)HS+t?zhRma(TmL%r3 zQr#nENdKjhk;hd)v7<9@cD! zLK1V>j}=VZS{nQ1Y8Y8@r1Bvxx)wuPctkJ-UggYSbFfRV7)sMZIE_}!zoQ)#N7A-X zuFFrgl^6kHxAS8f%MRjdG8Lyn6K&ToUD>O25Q58uRG!GpRRXu*6@EWsRS-oQjVet^ zQZFAJzRtzyk;`D%4!3O@WdoO6wOz6LN?Rqq&Xez6_N|9Oz0@Zhj3w2AHHtdA_VMoI zNhN70vaZ$vtOlN{QNElmQD19i{jYX<7KnUH697R=Kvb=<10%!{Co2LB22; zdQ!`}h$%`Eh?M;OMw|;0pb_LfzYNW5eZ5R!-3ubmP_L?``odJQz@x}-sK3AB_I;H( zsN(N3*AFv%*WOu_PNC6YuT_o7C_aFVp5#uOP? zZK%XXt;h&Du%Dwp)mqZ;s~Zlu7534-=6H&LiMcbHAw!>{B!4St<7-Y za>U$&luGp56764BdbD<|g?tCv6e6p5-$#kX#$$dKix)}V|7>LXuH6Xxc#98+N0%q} z1z`(Q_HCsa?$V|BjwzFHA*e0kQ<5V}2s4i9AYBz&K7xoPjCaTmp^Ip$eJNrVS*p?y_r>Oe!ryna!OFgdR^x1*}kK8nZSex-DwuzvxWvaEElUAYac7p zREb|MBv%&E9-{YFccJDoKps%i?h?J~=XiTiT9ItagI385)mP$`p{$O!;-vPN z_rb@fa+>5H0Dyn(ZcX39e*b4d5EA~M*8bV^baN`9GZKFtI|!jJN=OAN*UU@1h)yy3 z+D_Hk*kWUX4x!{!)dof%j-;y<%miFSh0isKdPc_F;Te7S;l&kk2KE{>Y<2L$7eI5$ zcCIWR@zrUB*QL*ap^G2d?vk1z`2A*m@D*Anjpo}Y5T@ghiqc|(3PG<`aLBGCy&{U^ zf>jAj_fA_57Vj>LRq`R(IX;p?n9p<-Vsg)t{R#xC`fS(W~NvWVK^^Ig^>(psj(*E8a}7mcBMZ_1UvW?*tA zOnmBB4K{V~k*`~}i;v>^=xeIT#TruSz^#g)vQ5qXOiovCZKoX}{v|}7o^E6Q*OpL| z&Kmk%#49e)g|*p@BdvFk-pzGvSE7$GrR^A`>DCwmN41b3=F->~u7{yh|AVowjEbuX zwjG?{AwX~^Ft`UMxDPG^1ot4p21$Z@kl^kPgIjQd1%mtF65QRL-1+Xh@Bdrt{5`$8 zx~r?ZtM=ageDFph&kapFy=Xj&Ne(EsU{_5gVgpq(DpbFNZ1~%M>YqNGeFyIjt)nRA zOn`E-{{y(TG>PK(Hxl(;>%N1}8@^2!35-F{OngZkfG&*DC1(gr+k%f{dEjvAHWmMi zh?TIOAEMLsXm4(_oX)B#tFf&wp*Un{0@?;rwQ_~2n<4e|O6<1eA-Wk#Zwk>Q8Oi{~ z^NySN_&GoB9P!9XHWXVyjA=zlU3ykos4m$T`NbbANB#j`L`!#{HI)AW1}yw;z%P|tWx$+!9H*B-@tM*}waBZagkf#H z^)VG~ZJy~1FctzGv67X~-tSnL0EZKROprg@*lrZ&pUaCB6#CmL<+F6+u~f7XB%7=0=@ZI2GD1O>8ouUckLk#(R-D2-Dn+kJHpC@JOnYK-(D^uAaoFMjmfqL0W!j=C zk>B%qL&F)H6B$_&F8k8+&RwcfST{!ULql0gN`x@z-jHYPIPPSCp8ljgWqiADM<~3x`So$RfHEm-$n%uX$&QE5$0EOe6KU0 ze8DzmKD@I*AhGXTM( zFaZ@MH4}3IjE9_4475S>SD;b`SBioFmtdM@rys>KgbaCtc$m){^TGHvuieCG80lo( zxt2zI-cvrF2vT3JM^nkI*EZ^D|0s57GhNnXL0}D+J>p3naZeQ@QY<(tmdV-WNCU3z zVXSdErDIx9Y}FJk`rxkMP!Y>ME6#-YH3{tTrF=+m1yLnXQ_VRSQye;zl=>|vO&40p zOc7a@#AZuR5XOkl&g2HBc;iw*S{R9hF=YRB&o1-lZ{>2XHP*jK_8V1-e@Z;7#z)0~3yVPq4cWz>tuC56n6pPj$5=IOxd)4jo7aXnrM)u~`L{!f}m zEjmGXGus&I6{6~P7AKX=z0k1&m86ueul4Xnvvzhz&VK-jc}}bK7~&?K-8evs^vhUgGVKmDbcFm@M~l)XYS1Q+Ey%^t zIxMehpt@ngoo_6s9jg*uhK54bBu=J=ROd7YN@+EvK*o1-9Yl97b9|I zl}S%&5a>WsHDy#@<4*zYC$*isM=9fCDZS+p^5%DHKhy}9t~AhYz7nqHpMLN=1J&BX zcljFtdR5EBo&`fH*sX>AX1JVEuh%O7)HRWM{Q~L7!-%vi6r+$olr-iWxPCS)5nOHF z`#O(X^Vj8W*iabTH^Ud>em!d;Dl_-!x-LRnM1Z$R07uxk^1J5HPREq6{tx0B@ormo z#?sddQ~)Nsq1gi14<#jy{o>?&-E?bSFkK7tt|j zgOGutb$WhudM5L`8T$ut$A!?Sz(m{AvL5}SogPaL&av)x;WEO4~> zqFnTzV8C?;`)~OX3Hxzo1Y#z>s-t|r+$GSj1(uU?F@P}ANK*FIVNQzL_-;ozsw;lV z_}unBoLqT__=~vFi}p(<(=p-o+#UY#n<6#19vC&}Q<>I&HgD+oi(MxN;T&B3{LSd| zsIj`2U$mI(KY*2kq>!{_388<%YRl;b+3~8bAbfZT0Qf@1vz;AuGG)zEN%HX0xvsX~ zhbz;bfhZ3!E9Ml(tNDHE%Z@(?${Y9Jn_u-;-&fdShXdkr#MS!G zCV?2kfG@(wF)F4z+MVZ}LpktBFXh#y|N58x@{IiwRsCr0*E-f7Q|uRue=B&NbHDx% z&^ntt5sP`?b=80TyvWE*<^AxLs@*Mal&v2zEEmjePeT3mqYjI`UZLCJgE7T!Y7g)6 zou1Cx{1!eN_rrylJAZzq;(PgK;^cR3u)n14Bo*o;@`6D+iFx9qaJowKb+<9XRsZ>= zWA+~a%TE>in9q&(JT0%r$7P?nQvU%) z{NlwCLvAGT58!dfwH@B>=d1S*AW!fQaO$^x`0}~cWHs4u@(+T!^bc@rG))^Qr>d3d z5xogBJFE_1W;D&-+`_MN6Ia?1zogkhOrB^}K{fBoA)=+ue*j+{XSG|QHVg4hzr%S1 z1L`F9!OC(A-}=>n&_BS3^Oziyt@aX0$~S}Axi~)U@PNmEJ2&gnBlta-4)w@Q zlu#B4R(0|?pC8ARZFXLt%?y|FdI~;RG|!1vB5$=ewnr_$x2qu2mI>FWOphA*GL~*9 zaCf!4o*rZi;|;5ueUe*_XGod5fAk{!rUr9zB6PWJeJtS7Ui?d1Fy$ohJJbJKZ0oOL zK{ZurQWwPie9xnJd2S5}#$>$Daa~8J{`^{X@wYi9v+2$LB-K|buWjR5*&Mc-v!#+#P4js)L_)Ul3A~NKWLBu@+U6%^N*nU*OW2sjy7|z3#+~ecsac`QCD4CqWTom7wh94ioxp;9l}`%qxs~lDiGJRF`(#<%i1H&SP1+>(SnUj3gbOWar^#^A%LZac>PO&!sj>I#$PpmFU?TImsgw0r+Q;Uk3lyxj-5ZVmuucD zVxXY-HqxJXWY{4Xq`I$F_1=8xhZc35PT!24+BVf(ccU+tODl@Osv-iSIPEBl2V>Cn zBGSA)#Fc*q!56wP_otx&Ti*WwqponHvo?F|w;t>ib2d$4)36hgMMu#lgWA(!soV)| z&b3@^bL3~ynLLjmZlU}uumZh|@bulqCP!161Ndq8+s=*MX%o7Lrtz|vmi=h=ih)KW z?)gvMnKql{_lz04Hg*?A1jCti7VvrRnrT@6xT3DP3A5YD<@LwIC6N5!W!L zqER+vU9Bi7X-b9oJkg2(fugRud0qmDV2bOYFYrwIEJR;-+g?ru(k=C-G}rY;=R{vB z#tG=6;Lt!N!JhdK(8+Zme=8&}nRD57eT>jVTJe5)>iP$GYzF!52RwGh@8szj*KoCI zxV(0szfG#LDDO#lVrVG8BID#XuXSS5TU>{ z_fp<^=bQG83jb$l_3)3EoR|wl;FHhhes#Dy^4$657mPWtyI<>qF=wU7@Ban9?)I|$ z)xQY;RzO5#q^sdUA?h)_&Ic33CUerkwx5dX@7L0kqb}5WAhvprXfE2@|Mbr7^6`2N z8R7~@Y4vm$cN)mTpSq8E>c4;U0L`(>d0|GJ8dR|#FU}GF{<-yId+BTnS>ZYz?o)dn zV+h!Ns&4f`aAe!y>VZa)Ew~~r!j#u*v1$rI+Us%wC9^L;3E9$?Nz^_uXn?h zd)J<*cvErczIXqN#Z%lrfGW?i_FEdg|61#eDgLPTAmn+y|5S}w+E2Qkhx>>S|MkXs zQ~a{?@Xn8EMd}So2QPwdHfyARnE<}%HN@iex}HI!eeKVe{p=?m zSMicE!tPg(7=IZ*c;qAGAK-tte#DxY4ul@9Fk{f{2HgDv3_6+M!{0MB{rpCq_75P! zwea%U=NjYMpD!TfYagB%0{4ei5qU-Bd38Q5n z)!v7_O@V4!YCn@R*wxyh2G3jG|BhiB+E)|8ev=Jxhfg*C04vszakw;RTAE*7|;{eo5jm!1QQSMs>6A$IS2tThf7-oql_Z zCn%!B3l@->tEqdx$?BYkP2bb4>JomSsDc<`XOAuc3W*h3)A)k+HhC-m0iygKwH}~x z8o<4O0RN|2;h$G<=+Z)E!v0e&qCY0a_;B?;zZ1KgiTi#-vl4-JJoY+R&zlyS(E95dailJ_=keXZ&w2__3(Ik){^tQ8eqiPZQ2D@#p1bU2Z{14 z<9I15f)9A^5r;wy<%gFMyFgxf!?o*{Mg9oAe8ar=UvF_i7S+9AELt z=c{KIz$6dz6UNfoQ?w&LH76EoLAP3Iu;h3@b!aPg5dX|gEA_8Ra%-=Q(0AMeSK9TN)^rQIp7Y4zJmxGZFrFe8+HhzUBj`Ld(-E&2gdFCd_f-IPa&;B z3gbVOg%lqbZyWFW)MLH;F~=pBGw(gKbmYY7Vt&q@K8ZX2q9x>Az(ZQj1G~aoB!!Oi zDZn})e;*7#6H%+MRo_m(9`c7E>>$5yrx7J!q5Wwb>JEv6pFV2#{*ox2D~|%#EJq;g z4$tS#HtpC*wo;VwEf;)~g~Br)2s3N<-iLsI#K>(z?(*QggUTpIh;xk=WfScnY& z=Tl4!4&_PS4FDX@5@@OOeo+_H<@+*2~DvTw)4#xjeV^U< zISK0F%}@SlS?*fX}%05}`%i;L#3FvSw$)RjMUD6fq>NM(0KLt}?A~9)yhZ_u2 zj|tIESxF_VljTaa&?H;%MfJ&Erj>KLt6kriZL1oBIFGDM{0;6~E}tItu)$F{KM_n( zDS#Jp2w5+eo~Jt~ZmVfZe7B}_O|-I#Bb^y()5Dv)jeT`TVKBWhzt)M?{1}bnl)U}! zd$c-cb|DceA;2z?o|=)IfLzw{Qm&=3j~;kuql1S6B|L z4B3}@HkWn}t@rOThjos2ZH9hiCFyD(Az^hm2KMbBt|$Q|cTEA!pWm$y;ZYZ4a1Gd6 zsJzqjhumnD{HNnuCHd8@)841835 zQi0f*9wkML@eM#cc4C&bkCujYkS8Dx=zHnWDv{7@8iQ<_nMpei?fmI?0;keB%fJ6x zmcL>GI&p+BeVaWwA&zr&JQlEtB218M%bnSPY$&nwr>n>nI1SvUo*hnXy1=@ictm9E zg&!z8H-tjt#-dym&t&C(fHsVbvshE!EtF3dbP_5l7@Wi4pA&Tsalb{a0r8c)uc{>ev!ch^m?~q+6$zRrv0hmFDImpSh zUzvuqVIVRLWUg6VDPNj9VX0%C*~coF+;6~)e&+&tbZil1n54n|V-TShGnPCpeBu3W zn*ahnn;B8!jX`Ac3iXH@N;ub3$aCZ!B=MTJomMxB1%PWm6D3^Kg7u-`0h{LdsxR?s zR@H-}OCuSd{Oiem2q}}zdu*}rv<-jouq#4kbET5#%^5*NT0?b*HbN-mKI>)QV7qhL zQO6UZ1r<{)lXOzfjY-^FF{rJVL$Tk($m z<<-fPcKx1V%%Q|>9|}CGEOH(8wNEDXm7*_7Dx?L@6*TUvk`!m?$8g)n6=^G_Gs)#~ z7A{?86g8RTYXL`^n`pkhL+RkK+8f?wQFhhh^;0A&jB#eUctvAwsHPU68aa&Z5pk_B zXVt>f%bfj&keIP38{%5fYkT14#{MJ{Q{i%dV0(Od@Npw0$rM6wL^4O^kBZU|)ihsH z+frO`Rvadca~&rDIRT^<*P4zH>b{T7XqAg+smlH>hvIo1-|Ta(EiEG zf24TILrpGKkHtmbqXk>CxPNcOqkZ5fYpRi<(oRF@A>oK@>gN?DWQ7CSDo#9F5y|y; z((0dXGFwceC0ZrP=h@I%(34iOra6<1WMv%Pf`I)j?|1jAotazt_mi?IZezX)xm8uB z5z2q!rkn$~2X zpZM)Q*D?(#>)Aq~i$Y&;-dpiv?Yz~|W}2HIfptl%l**3z*pJqFg=++FshsVorQ2SW z$yCUdaj;*$-5&KX3h85&b`+_piCxyoP|B=s)?~VOBGHyuWM$+`J}lR{t!ZsRtKiy- z?BirtIPggLA;N4}lUCv`6WO;YAB$ohAu*j}4T+ou(Be=AdHeF(_7TSuAt%QKZy^Go z!|b%=ouT6I_`*!0QYKbFP|;G}0f-Q^<^3XWQtVV;F#q~D2F=+CNB830v?KXlWo)?S z*tQ-v5= zwm|((@WkiGmqz$C+m~W^j{bsIxPt%_G^4HY;LxhR)>S=mL&6QPJiuALa==5cKuuO# z_cWWs9nKgPnv;iqpt`H_$PHN0?;rZ(PCIK`c0gXyDoF*gk`&af#hRnVjfzMLyfyXtdy1SkO32)W8E);FI>iJC(diA6?Oa~W6}qFw zgp!H6K8jQM>_@(g%|BhwP0romAT4`5Kl5{gylTS6Wv=&kqYJHX>;jkiUR{XFd0(mG zfg(MS<#=wMI;$b$jzP>f*5cECu#e~nF{a2hrrfoA>$&FflBe5=G6}#gBca#BQ-^-D z@Mw0kC}_9C2jp=*aYB2si|W1y+N~Zwnw8x1w4lviQRVo9#7uil#gm=dU-gSgtsOqJ$lcmHF%kGQGhaA?BuWIL+59TSKG?6KDX5zl%iw!2Ls{jXOgzI@0Nl^}y9+ z#F(Vec<#kSf9b%ui6P#K_?IM%TxQs~N%ox}ny&JeHQ94cn^c9{7{2QKbK%u7T&}`0 zI`wdw`WcbL5%VPL-O98?n%Hbq+p@XieK7DdG??>u#sf3M@~FJ_TvtmDvpbt@`rpKA z!Nq*rMa6M()a6uNeDK#-L3*BM8lO?7=BaEi$;LwT6_}gS9>rFZ-E7GoTOX{qeD%p} z$G`((zCItGAGFmBvT9`KW4|^%n9_4Y5qNemGeh+ne|;4`ba{UBfG1{ul7$pyckc4m z&c6>GiH2cS8$R;EpJ#tn6tqwH1!Z?7a-&Y<0dZ~6o?L#;YWEZGglNRj&5az?p?mJu z9^YTQR1#!`cc5dcIy=i@c*pc!UGC>o9Qd9d%%J+T|LXK@CzQ~^!=&~>8b>6vKQ+vU zbgQmK_hSgU!bK4mHD3$aLOg#0FZ`6FnfCa7Mb$UaX^+n0F0jS zSFsg|N(%3JS#-jVCtm@gOYg0jtE(5vBnai>_IG!@cDKv+1{mF_LWfH(#jG1^z@lEJ zFyhHfqzSy9^UHgiM3ni=tu^Zhcgb7@DiF$U0l|OH2Zw_@tHKW(0 zt=63s8+v>ftQ+sFzUNJ6m9)B>X13w)O?f@jz-eU~94mPzX02J4@Kvpx-(nVrB2Z|+ zkS#p{T>S@1n`GLc9d@EMSL`C{PVHoFgo`t_;drmEXcX{i;Y$LxC`p1|#b_B=3Ig)4 zm$G?%G3ThQCq}QRN|;Yrr;4mVdif+Uo=rE)|4UlLU@=~(0R1Hw+}UwK@P0o=x+C&Q znDp!~R*RV)I#gFz7zYWJJunp+vmpW=vl?jtZB}1f_0;#f`?KET6s4-DNZE3PZt2iI zHI(!Z@S7~dfuoVy4X@b+)Xl(1<#OmN8n%~4ZPoKz^#D6skr1X)|DmfHLJ_y-`)+-S zA^;Z{pzZxq?x1GJx-5itrmAKX<;&-omtv%#IrBiA;Gds!QIYAU)MXlT?LX^aMgP-B z*L*4Y7uX$Ceu$|A{RrLa2+U1H55)LgQ!t&4;2GF&FiHQ>d(me9ENOV*?=a+75&0M> za20fru2MxDa&8M%^M4_SI^ZhbH%gLdsT0&z6=H+=z5KpS$>j^%d#T13J(R8zgmm6) zJT8{ER+>4g6gkf~6`^hO=rlUoxlRvN$fB`es4o>HTQUVC7jnZsx{JSYWT7(K@4h6Z zdWdOuo7;=&5F6o0*f4RVU!v64UYDqZ)1xlva$t0Mx!DWjG5o>pu4oK8<^NrASATD{ zS3dY#y@JI~JL`!1##oQX6g%08;6sZ#n--x_$zRB$U=DCL>iP2H%_7Jp7EY4@oi#jEL?nP{SM-xzNbysx4(=mSDMjPGqe z%eZJEf9U5d8IhB%eHgI(mgT()0f(Ee2g-SnU>*;Jm_AT$DwNOyK=IH>8u66B0-`%U z@g0N8ViW5xPrCjK&UcU9Un>8gGN)ctVpF-oY2CZwvaQD5Io4>mO7GGCF1Ov*mPI2V z1k)7BQQlL`a*DBAjT`-K`+r5=Vk7lpXkH)+z^rE}(OR`C8=Oj7TtJQP+V>ap08VfV zNz>{{2iajq%nR#wt(UAWURgP@I!PWjpD+>xIoBv0#YH@t0jW#vXNKS1Q%BLn%~T5c z^3syN3{OkjBQ_h>tTf$UyOZiuE6lv-#>cT~${zoZvy;$+@Du2tP8PYzA zI`sL4W6R$;wSDJmHO!PTnb@CE87}=*Jhi;TQ8PuLuvH(ue1oZE@0HKQRzu5ky{p};oy*F0&7?FnUQYyru#rJ1Db#?(YGLj zbO;zM)0Z6%#*$p=n>}rK_}+4WDGFVn#(5?J@-~-VW^;tNDqpd?xE$$YIef8_#c+^y zlqtTYy)r=aT%Hz7=VoIq77{{+z$O0EfLqT5uZe7WVsB~2kFSX26gq181 zp=CyzUQHKFe zA~Jo&YZ*42d=VPfF&)EO7gmD*rR zPj39e{6ZO4EgK(@uvrg_4a^0T9xEmS>zmKl2fnN|?8=9kL-KN{n;ey_#yzb^+D~lGwX6_SeiQy{)SnPoE~iMr5JWS)GW#n78zXN$ zFc+Bw!0pmoSF8RWUUwp~>hk44Zlm|0BiH$XW$(Zom#SVtF%%TQ7yVHM+L@#rBBdNH z$P>uwmM2EhVNdln_NX={E!2*{R8-e9Xp(RoVioG>0c)Na;XwF3N! zt+r6Q+1Bk|xw#OP^~2fQYx4|f$^;M7e3jHk%?FNwfuV2(^1NQnd-mf_7cZ5etxjBC z`h@ANwYAMS>lag_fGt>>@gYLGJfW0I zV}kygNsUP^iBDh_Rxq^AN*^`VA#{9)x#)gqZlCW2Kx)J#|p8Fl&DQIYLIsXuvM z^2Q?}ncMPw&;!h;i}^1U=R6PfNiX(Ou{ek98+c_GEx!O7xM=}U0WXg7{omIhr|iiQuE7mI5(Gtyod1Ef2ZPEt|?5-m3(V3+Su7 z%aJIObtw9Ppt;iMkM^r0#mapAp@_oX2yjj^d{_h65e@5cCgNU7!^kas$lH7-Kj9I=x?KN zh%A#~d#Dta)(@v6*VUKv3cbIu<0|laL};-w`}x16O=yzSf9fMC_+%aJiqBudtiZ)2 z6B6|CM{k@=9S^G@>bq>a*S-mOS&H#9^s{!kC~C(4r>Hd*38HK9a+ zk1XWG@ii^5<{{rCwKx!`l;ds{ zb*5BNU%(%3#j08O-XT;k0jOBeo7#Z9jThWoYU={|eaM7AQ#7pjH#!zmso5=_?9fZa zSAaZ+_iuqFy>8hgeSZ<$yf==OpTev$QMoi`?CTW=8u3eo1N`lxlv5mgarLyGlsD+T|6tu?9*M_+}<&WycFQ-z$oE5 z1hNZ>3+m^qaH3dFh7bzVHXObC`l$`MqVhT-Z_}04L7+(wngUlUg7MInFH`FiU5;uM z(pf6$ws&-R5EDMga~m7jDzSMe?rd{dzxAedo;k)|P%Q2~XR`k3u5NT25mMl)W&FAc z+n&?1XdcSNMty_>bfbuBf)5eKHaCz=n2-G6BwV%$rCwJS(y*Nl;Re=k%jJ*xzB4pW z9Fr>SE-vJ-Egz7H{5H&F#wAkaauusiRnA&Oox#J$)S#gjjNj6ml5*fe&3*@j+MwQ@ zG$(e{H!J?)ZzMQK*8q7ByS^%AMi$1gxzVg3A1P3ve`e=5G&oAa32|r=JGXu%tD&OB zKatE%ArQ*|f7sNJrZ{wx-oRP79G`xZJX~c0zJXpu4FCxj$vgvyU zlJjxpQtkSXv{EWuWLO3L7Une~__HE-7s-6sB^cXGWKoOEP+O_2my$Yh$1B!zB_gQwoJ8X)q=FiLBgsBOO;Ys1Ki%6$q2O9nl z;XzuL=lRpT)2@AcFXsGE)poI-n|r%3ELCT)x+ru44(qzx082sg2yY#j}x|O}B2uzYar)mnp3nat|-AX+A~hlXxiX@$KI3-rBe`i-M3p znBLnQNOb1*Nxr{DRB`cgc}2oW$3WJ@qM(ELQ146+i(DGMrK2Y|@EDIj-|p_CmtElG zd~_;pj(Cp}UNgjaj!Nyp^!=N;R~Q{?#n9<2toq$5z9s5{9Z~OVXJbqTq5fphi@4cD z72}PXYVgDEaCPo+QDO#m)EUy-ntlJo>}SvHuG=wRUn4ixB~f3x=sPO^6N$%q^FW2e zSl37k<~h+0eJWca+NWsmj@2FzX!Yd9gc-fdPJy(4y!4t{Keq;5&2Y0R?*7ZYO%Y5q zQB}<7<kfv=uZOQQ#5k4~;y-uulLMAOKp_lVPFLQNAWsG-@mwytI zh6oF1Dt2%N!F<~l`tTya3V?g-DzDqizJ@{O_D*&R1iGOxAOJ3YbiIEGqBUb+jHHp= zy}94Bya*w{Qw3#bVZ?%%P#Gy<85kv}tBnclU#XyxIWwfVx;pW;UYEL>XlT(mR3$0Z7x?U8Z=ymvU6Mj?E6h^IwHdO=_F@`$o^{A2j2b zmWG|u-7d`(BO~~?^B6rCg^Dc1{64k%fa*$$*3RtfH|;nsOF~eV)_~6znUvlQfnIE) zX|${w4e=hb3R=lW3d8Nyi4c0+g#&qfnJVX>lAoGC{98XEk|J2r%DCntBQ z-`%uIPN&!QP6%EJ)|B~9g{bPX^_<5S1yH-Ps%aiTG>Jq7ma|E0pf|4OrMglD^*bA@ z+&Nj-`3nwn`;b8V@6!S>R*OHXkOtUBzqtT4R>8I4fm3hn(4=OulDb2~BcLBi?J-UqN0KinRA~JzHraSo!-eV#Rw_DWAx4w+{bfX^c;{{COnyd* z9AOO?cH670H8h?EhuAJ`mEvrvrTsZEp=lhK)K-^``8jQKAAgrSu=0~+*lvSM#7Kt6 z&^Y>*c!rt8Xav3GR$twP8gf-tT$m|_2qqtf8KxeCp7d}z41aL)E`=!)y}F|W(#D8& zc>dBNEEK%3l9zO0CkYl{acQGgI(@4tsc^6+Dd*$iPOZyP5m1tyaqJuF3U6;a5)<-^ z4h)P)=TRg5_Whu&+pFHxpcG4r5I;r5A9Z6_KGM!{IM#%nH;C2no>M4qsFyZuFpAWa zv7>45H(wGlrTc7~)2GJUSeu-KHJ}^=5~piCK>}GJ=YP@M0js} z{wh7FF3z7U)t5%IwrL|?Z!!4nfY-!pr_)Gk3v&*sEE!@`-%;!55TcU?ZEdw}KLjsu zDM{Cvf-bZ~3xzf&HYOUX`+PWISqvNQGHj_Vw6rXdRyQCpVM2VUGTi?n?sHjfYu~Hm zhtcMi`NgGu=Mx2?Ch^jdZOW&Z&>|j97KXzz!ePddO4FfWQghs<@>iu&`s$lp{^|{MBc-fr^l`BiCyYZXoTBpa*#;`~ z>H+E=yk{BkwE<@rK(Dm$B|d;Wtq!0OIK@!14U}? zO+?KRO1YJbmS6PflvsAaCdQf=?|v@2+cKo5h!(=>dFvHDS`&^(3y4MXsT>(b3Yq3l zxa+^i-=WpFU+%%h3`?E!wlt`tvT9J2DxeE?mP7pYsp8;&#co zY8^Y2C~zg?!bz7SG%a;t(%RZ+3&et2^`d<-da~#Zb!zDAEUBcY-a^88O^7S(UE-*3>L!ob z^1E^k9RnHiHrzWrSu-()n21bg5-T7+A;|{T@35Vn{qKIP=uBh%?pACKtuggV$c|uB zH2)e__AC`jqy~ANVxgYgkj-RzEN+p3BDsY4l7bO=4(&wbZnA$5<1d#=;3u1>rdh0C;2{oS> zLC9eJhRg8qQsX59%*dh~>hlfZ=muYUMWt4t5ra!vS-7 zBuR2*j2!mmG;0EAm!Ji!Ikj#wwH7*BW~8DHDc(?gjyA7NPMB^TM<2QCe>jHOSaO5R zfpYT1FOWEz6f8_wA2upY=%4XJCT7J!A)=q$%gDKU;S}79kA{nD6!wh`$L;zv&i#K{ zn54vc$u+O(T8WW?R7taIKs`Tg2|z|bVM&jN-BcD2LA|usitXFr6!RF&kcL9ZsS^26NdBNfI31^}R*|xm zsTI(W-Fm>zJ@Uv0`!{e28ybURHQyRuhpkR95i zXWRdHZG3XYvq}l9E`tGm-2^`@lQsa~UK$xon$`L+=L$6%63MExtWQlW;&{}~URwoM zClC#cm#RqP}}KT8dIsrMuf;wQ58^E9g*TFme({=84+fwbB1DB zRFF*S_|j9}>L}jpv+_>RwhBp`KT2sq;V=4`G+-@K8eT##tu6aF@}7L znC_-gnT}PU?|Y=UX2(yTMc-LFZA?NTCWI=pNuuzE&+_1~gt~iBO=iolDzS2gjo4$x z1uJ&PDkv$=2oiHB8{8}!|9IU^sY8Xw={hleFRda0Q-~#MNebPl&$fyi>S57}irpMQ zz9ydMH@q{I%hP(YHvbccpXsXVz$2CAfaExu3L~igDmgqBSg|e3`c}Jn=AE0T3J>+A zGk2$FW;Ng&|6TfmVG;`oRlIg-!qWqAWNrtDH2kDP;>Wi1^;ZYp#XyLGBp0v15nWRUNI%*ude6K#KRxW2i)X*Gi7{#lA2T}g=hLOIO zEQL7YYn#g(Vi_Fw7 zX?km_g)M%3W&1Jn_HU`?W+%tq^dh#Zy!nTiJSa0ni8BpXxq@T+k|~tR=CPjN$`O6) zD6v!#Cn8cYjhAnXu2#7){{y%jtYD*B^2cY_TO6I+;ZyX0$N}ZHrV+-KjV-gmxowmM z(@SX&w*KsLtN?Y&{yehS#<+$WlY{_La>0%Mm^Y#M@t6Mv54_v+ol~*0w^q}|!&6b(<#?2vnx~l>{>R?#fJp@7{!nT} zlu>DvtUC23+7;Vh%_7E2#Cn_n+U0Ki)zqRaHD|#B>n{(=@V_KGA;+$_{mhV!4D@Rx|vE;GKlQB88C5Yq;(YrVtuN17>f4<67JcvtbhMr{93+3sj}&Xa%e5= zjnC?G`|&Lk@lU2%4Rw!BBo2b&KpI;*J0;~Lp@Om6fl+8wPY7R>D$ZTPdU8$ThqqrF zi+382h4IajZBruUbhT?f5AaevqtrTqj5>K5D1perBHfAu*_KJ4NTxaw3hu*RpOGIR zuYbNSV`BV>&QXIDDspbDKK184FF!1v;$2d0)Ypf0c23-vC4#^1sLRW%7X&~ofQK~$ zl{iCHEFeB$chB?b@#bR2+I9xSKX|48B->RrQ6@l6?1JJSYO1pbr!LmsKXEk;snz@e zEV3R=sHQ^^R{M>o>fJwlH2th#N~W4ChX^V2%QVVbkGCX3=h2dLx#P+)4BMAes%o(c z%nz+`(Tfj?VPt)-69LQK*SC!E-kl3qN4}%hew`@P3IjXaV;~Rw{<%l@BQ%<8g$s-h zu~p@LmylSO!s|W^NdzowuEWqzXw902s}nB0vL6t^Chwhz-;1}>dNomwg3?(mF^B+_ z9_&p66G(#PZ526NzZ=jJQ2G2OgyY=*dYGAHQDD;(QeZA_mG9}SV~ciVwCF8gq7c=p zJ0>$rA^&x2t}i$i^zOs9_&R@M`T3|+T_S%qL9qy$E2A0PP(qeRIk5DIDUt2H>_Pup z{#K52-zXE6k@v3%ay_=z?M<^ij-PqpU*`n`O~*4-ASpI81FmcRrIS@kUzD3iT6kBp)Do9! zv!KP(ij-2ZM2iho!w1|LIcmoL08Uy__FBV~1Mz)}1+mDW=#Jd^)n(bUjDAMKVVnW; zY!XYi54?3*?1hNJnB;9FPA-Vh6X*F^{HJtz$$%&*@_ut1hG3(KS5CZMg$^~r7e^uKVE2V7IOw?_J`JzP(ecMXzZ`~%o{TFW-eDF`EUTB*ES zeQAD5afuaBXM5bcO$~wH3IXgz1-pj2ySq_u$J{{uIn~np`MQVOk)EaxPgkIT!GVEC zXwZ_-WPjhhAo@puC3E#KZ1<6$Er^*BS>gzhWf3LWRkpkud=&W}tWN!F#m}bu`jNjZ zWA(EE8ObU#I}V{7&(gH}ah~qw0lpJEjp61Cqr{j*@532HIMj{a2oDV#|kv*?2$5Ygd^rvBo`9!=q^x1a| z%~w;Y$hYtJxIdI@YA1@J5P)=19e3%f6u8Ph#Cs!c6ADz`dyq!;hcvy7U`*mB!+V``(%-t%9LpYUqp-pf} zj0j#o>E-pk-~RxkKwQ68sGwkH&&%`njSz(3$Erp+laTlf*qoqls(>YfjrMNCI;z>-&1TDC0BPeAhX(3K$UCyh|s7;>o*6O8r z&MoloIa9pLB>X;|3Gb>i#4a#tC6g+kmrM|nC17o-fg4v<)c#y%uV0%|E}~?Y(Cn8~R)?Kak1b%5UXHaK zl^^FPJ@rD3bIpl4uL1WiGEhHRvU+6p9rg9vJCmd>PCnN%%9Ms> z{)O~Dk&LvwdiH}$;W@57s}e5>5>@iQHW430V`{dF0O*bw*#rvFJ>2tEsmz%5GotDY|~K+ z=%YsWo4T6~u2Wou00^q3hQJ1MCk1Lq%ZOG<>88(v&Cqjfu32`4&g!GsJCddpsVY*4 zpGUvW!KN4`{jQpao9zF`>Nm8U1 zUr0X!TM9xJa0pUDxqciSPmxhjs47I&KMW`dBJM zt*9)7Az^7zS;E1<4;8l}UA+;7t;E$>mW90UGc3oI9W9Pl(o%;4CPZ+Mkd&w?Cm@9Y z0$IpVnssfu)MUqtP-P7v*iOfCGwvlyTTZ+@kpiI^ z)VnOiLe&y{Zv|^)rWBN^#?uUQubC=JP)1HpGp4%0tg;4eh}?C(z2kMU9-td{>5C4Y zq9=|3WkOwm3in3Xf^62XU~ED2U$46x2XE3FsJ7E|$Cpk^=x$Tdsj(V;3VldhkGmow zjv}l8fq;Z9Nk|DRI8e@`%DC8l-x{8p;W$uojR}pN-skGQzYA;WMfIao*&~ePqBG;Uh_tajh8KZ5KOpFEfDcb&y2-RzJEH7c@ zH^$9NRUJqF07*nuV6vp2Z(_=`N9AHghJwmX?f_F@?^0`2YNVLW))4g(OZR0KD*@=^@=D}e=N)wN*z8A8 zFJN}K1m5Rz1}WYw&1nQl9L+5UEy1z+)Qy$9A1sM$kbJCdX1H|$^E*j$c_>a-8FU29G+F%DIxPp-Cw^=A*k(zN5aR5AYAFVGQ+8FSw~L zDXzf|sc($up(w_B<5>j~1F)Kp2Byjh0ZETNu5`zBV+(#Sh7wf4#xB zsHS-J*$;(ysFK`Q+b$fd1~hPMDeR*u@|&50S$%0_(q4P*wU8M&nkdIhCDlvXr;rM*+7Z$d1`48Axr^ z$x^u#dXS}_WS)Sl8OAdG(I|*Zi8xvi^k$3LJmp-j6rc{^JMrN@X~^`}Gi$?arI!$r z78HdP0!l!6Jc>bAOkj1-atQMSPX#r$l0Z4ZZ;>OiR8Zm^=%s$5vD+W&6WnRvEQEPj z-%ZB-`gcD4_xy27aUOR(uOI~Zy6?YR{5G)O*0{f}GFcSEQIANFw5?BuRN}A$&I*GH zF`Rgn47LLyWFIBGN$w7;E>R@cYEFn!4KAM@^sU;AVgr*_f|M$sPi54UxLQ&Pb@D(b zowim$Ct0J81kxIDYH$*%Xl)IYAeR)|313y5qbpbiKoA3+GD+9RD=k4&aa#_dh>;mo z#Kr;V7F$XbmfLF~Ds-F@r4Tt(I*x-Ct^45KZtNxh}6d<$F|yOr)lx|N|MvHmt09TR|1vJmI+KY-9S)n z#ULwKyg{x;#j!S0kGaB%q`3JIY4MLNXV7^vq>|$Bw%m6F>m{T?nOsnbYDSAveV3%g zn_Z}T#CtB5`v~y-5$-4|xvJhGn^27qmRROXa%D4ujc0Lo-c;nre&}EDYKRcmz1mjm z$u+q&+>%jpTnT5y0Q!lnU|wKVLXHrIiek3rz~&r&=$|nO&ME%XPBlR^gczD+*fK zVQj6GNo~T#B8ruOVz8c85}>posl^hj^9)D4Cn~PZJrXTQsVy{+wNf6Q?pC<7+lHXp zqf(Nf;cX5&+p-i)hxrm)Z8+nw8JSCoQMsnL)J{afrBNX`6vI^~3JX%DFu^ZZ>WT2t z%7C6os76~tO4jhZ(V`iX9q~}}6eumZ73yn}IjZxL>#VZl6Mf-?B*a_ADnxLX98z9T zane2wI?`%Fw@V`tsC8j&#^exh)a}0DTE%e}tY>wezDl-}Fi>M@K+_5VWzkNkV z3Ml91ap(_3i&v&K8a&2cdNV{vl=_qzXFsA-CUN% zbvUw|TIVhGz8!Fa*T3%89?S}2yUX_0cPJ-!DIHUw_r(U zFJ)0w=2Xoz5~PMmqnyekjNPPmVpXM<)@>(BqDb~fNWDCm^1p52EqNhD-oW4Jx~_SBy~ zmMw_}-u8!V{@_AGiF8-=k-lnE}V-bbj8Wpcr2EZ5L@kYP zf3lm|3kP-R^d2U-uA$3oXXp48ZLQi#zVS||?=uakshhU)>Fw;LOJJ`r9OIp_vgK!61y8O`mAH_NgJ z1;=PGosacpjS#pwn~zJ1(%B^DQ{?lWmqnnvF@7Y4I_rTWE<9G^k6weBMD`d1$adAr zhf4Sx9E7N(DMtf5r?QFf%zF<&H0aal_)0)PBOOPQN$Zkv)L{P2Yg#Bva>k!lChTqd zOi3o&{i1EqTNdI`Q_#Sav~=l5PQ4N}R9@SVw!0qeZq3x2;v~OGgN3*b?f%B`YeuFe zs?7?l_Q&oF=2}QI=+y>gTswa>gS*&o940Izi8`ZoT>t4m7g#9{d#A{-4jb1#sgh zzB7)4A9%-3nh`|u^BH+8m0PE$VRFjd{_H+Phg77|h?d6Wy`+T&bjfJ-#KRvOK z0X~<&ib)yeImtQy0B7*f-TUap0y0Jb>zp3rJu*FXGQb^y^(V{h{B){y`P&L81a!B^ z#kuDB$0;htMp8Ow8SY1xbTf^(0qe>FaF75bkDsTWt||Z?gr51&u7r8Aq@Go&2PYW* zciZYSrLb*C&0l>Y#fB$L!*)6n$qrLRS`wg6I;;XO&f>GJQTp=0TcEGASrju|tJ^ujlfsbH$;Gf5#`?Om>7jeti8SZ-xQ*9%l z>({T}jS`fD&~)jZ-)57+O^xn$!AMWodUpBx|= zK*oJP;iOu?kUn~099A6;I*fUrKAyVTt_yg1pT!pvdsnlOf|F0VZYa*&vO-Br8%ma> z&$#8RkJSdA%G(G1X(L*!0nTxdJCC3B>PP;;t+Ha0jrHOpr4~QDQmK%3>eH6`LY`t> zQxofsM#%jd{ombNDi}S+m^ha*IaW*nc;6Vv$B|eczj)+X9 zF_Y5;Eo70@=One}P<1Z!B>Jk`Je5VC?B?l*|Cm)WQ7VGikt3~ zG8zoOE2gE69#l}MT_6oQRa9xQumNqbTLaT$hls?HCNyc%OnFbb3QTpWEyzJ1s-QvX zjA(?%LXe?8GTm#GmX@UWsBJ?bN>&C($b+CM(cm~^%5+E%GTB1jeM>;V7yzTqBiH4u zq9bfL+I`+=VR^wSQE@U7qDcX@b^|&^$CQ*p<7@QT?Y`T891^Ni2`lEZ9-&GExi$-= zwSXI6O~^ZoVNt2d_lD#{S|>*&HzE_q4+g;)TUqL$2W?i|-M>XzRkd?OU@k-kj0cL7 zm6lSVrqH~Ms3#{G^695KiASc%j>5@~)Y!xZHkbd22nB-)UEI?%z-?+C=jjiiqZ;HE!c!^`Hf@L}$CS+|^Qp&?l z)N#Sxc0fqEt^#zpIa2pIu8bT4>EG%ck;1Z}Gi{^Y819e9X9-Y54yD zA)$BEOI1?@WOlHVR{rgU{uqb_LE|P;k;>vHDQ>uzxt#GEE)kWq(ih13OQ~%jEh<3k z&&sa!;Z)TIMMK}=y;Pp3gK^J+9hTUNP?WZr)bN)R0QiM|@U-)Im``qi2R)`=N?lWv zUH55RuSsRTMMr5$%9#pmg4B*=qbOMBB!Zw*$}~+HMCj!n8&7+U)9M{oU_zuonZa+h3=lboB$svE84dgs@?@UTq3TM_{NHC7*?9OTh_Kgs3TB4xUOa z8taoHOt|!ht0-v9Q<5pKM50WL8g)#eGwIJC0CS<0r9KLWIalfooi>z;dj(O2pC)W4 z7Q^!AL_(OI0z`n&Q?5A$_XCg;jE-q3TWeWaPli;UZET&Ks{H~OZcPD7L24YAYBV`b z&V=lC{{TpqpQouQl-tU5C48#!5~UC_3W(HhzF7cfTRAogtzdmE_Llds*;tG9xwylL z&7@=^nPaJvD-K-BQbKm-YCcIBM@xopDHlcr0q&HFTTinBqbi|mE8W?V4Hq;8(;Q61 zl)fYLyx)N(yraWu#$Exz)Fnh|$Bk^%XFQpb=}=^(NpUKkhNFN&(tzJP!LnLcC>>Ht zxldH*uCwbQs$Eh|L7I~hE=;npDOD(pEohMVKuQfhb7^xaWiF(-;j54zgpQebXq#JS zI>di=r8{iNmeVqfi&m#orM%G!LJ<*g7W0fe5J*wyVQF)dnO*f3lB|ZbiqS|q^f$e( zN7*CPk2d>@9<8 zL2XIGk`x%_N|l~ds+XNw7TQ~Ni@R|VNwut-Rfc8PZnf28{Y^+>M24Y8537|D49BHE z9y=^B(~{&m@Jk4Al@O#*^E~%5KF58>!ATd}V||ZO0Pj%oClyD;mC;jD)UIn$P~te^ zQ0AgWlj`D%Au>l$?(P+1iVb?0s(`}74;*@vq9|$fI)o+P5(DSL>he|`ayz9f9vb=9 zq~w6xyvoYCz}504QI{T%CB-@7Fas+q2@5Q^u4bK6U(Q+y( za$9xScNMR3Qz2I9b$ITsOlqwfQbUntLVdssjV%O%l7OTsCAT?TLec}1a{H6bE;duj zvH}$1P=ujisYwbXc&&lVjFZe1K*l?kq9t`I1%|@?Y(dy=eMd_R`do`uEelIiRY=ja zGsMn}tQi>?9S)Ks0MWQ0hEgsV5;q!7@LJU$(1KP81QLQsN##%~=4^hk$1ZR|8P8oh z(IMq&b)R}b3?ZI%@Y1YNDY(RdiTd&n6rZp~? zPlys^Opz%=^h_r$qm%_H#}S2xBEvL;+&Lm(9U z$p~2R5R#-RL$bg@!jqBM=L*JsbmEKcGns8=*e!{$RRAa^+xbBATlTsFMj&xe`z%o` zgHwW8je)x{)Wn0eixNO4z*^*tG#5t_n;W+Gg%@qF-R9ekw7Bj_(d5yo_tnDO3bj@g z$xcCsK0Ifm`>ZARCgYeLZwi{lPTyXrt54Om3c}``mI4S z8bgh^CH!6_BErzN+Kf>Yv{G3LZAn>!542-(AHI0m;%WC4B{1#1!FtJr+~*rw*te`Y zGz(%SD7KX;35?R=$_%HQm1&luv7VaVk7YNso^646TU;jb0d`cSY{kh_g+tmq!m(6! z18MF$f{_-HX4fiCsJ=FWr!~f7w1Dq{L7O3&C`u{MOhOW)%o1v;X=jKmagwPe&4-u^ zH$WAM`(oNb0f8EvcV~&;K@8@bz}^?}LxFgXqdCu}%4u_4^CEaq$s|+KM_D<`UM(+C zB@&XYMLx4xq35KLClJw3D9Yu|%Q9T2($H%X`4R8pEO+V=;I^aAweWqA>Q^H`s419;rz0)K>5zoFw4t7#p(;7ncGGQA zkYl1edTUXVxYA+<(HRV_rKl;n4YZM!rQqOMIX%HWHH|-VA?XWM76PgUDpb_DE_hI= z$#qSXwpg5?wMl&hqbX?%ASjaJ6hPFmDEVmGh+Q24_wGmQTCljH z?@N|XT{5DU&1Y>yYX0Uly0yuWs>rA}9Kx{xSxP!F!-B;wmq(9ToQN_I;*;+!+>+)? zTeTMChE*;#K`L~q*BeoE6_1EGuv6bf(PhGRXn54TX(@EJ@)=Xkl{VVeptZX4!h@)6 zwo}de$ZP|X@acwrQ;xM2>!8&XiD_+!^#LK3MT1sJO5~yv;V;5sLa>j8&>cx6g)D$H z?OPF@Tai@ssgJbdL={VIh4UeAffPz|IPoX8RIXA+6s4_2Iq#=!_H7M&KmKB9=R<7H+?W{zgTXxmGPkO0au2v^3A~iah0f0;IE8LE$5coNLtfk z1M`WcWm1D2~cRKB-vD4Yt1B%_nsqZ%N(p4*mEt{*tO?s60Q*3Ug<0TDL zsT*FEj1}9FV=65BkxiVbhoVxskh#wU_9ua_qr0^hMJ|oFTy)l?-&c8Mx{Qs4v8!&= zY+4a14kDR--xRf?b>%z*$to>1*i_)5$d}~=l`FAKTN`n;^ca>7(pWa8*zLW%xgSy3 z)+HJh2HmC^Zu3i!%ovS?u50e$$r2qaenWvOdDj<$8}ls9q^Bzy7@;S2W2M}73cqPo zotU$TI})#ik3S#raotpg|rDr*;Kg<$V(QshfoU)WJ;Q;^00(9 z%WXEpEJuvXQQ}649i+1g1W4?qEyIS?W?M^bwv@KpOrZ!$P!f>nT5tmSU3D2klF>&( z7NVnu@zeE|v7eYaYG`p>QoJV?IiGcFkgRfs(2x}CP5JUAJ{w^9oS%@{J3gKlA)=s? z8bds&?13TChJuDL0vaP9Gt*79E_5`<;5M)xfDYCjhTGd>4li*|6-WbDd;ac+-hS{q zTMnHTo*HSStOck9^Pkn{d3}-4V;)^Rfzyi`BW*S@g%R8kPgCeT`t~2YR*GaqrAY|o zQI0?=R&ci#kQIUtRU{Mg9NNp;PBHMQDMms{dZk2;s?VS~Nc;X+*bZ9e`w#T_{(Ugh zSEe@71oj#GPS>X0Zt%uX%UIIIeu-@&0oZKl@h-l)}XYAkp$(%Wg~ zDpR3n{g8v?HTjfEqgElZADv04L}5uK4@-#jW|o3-3LSN@m3Q(d2c~uUDSk$zd=qfeSzE)@f8B6TH2~3{4j1~>5%+N&4V4vhTha? ztP+G=J9jnmhGQ+WU-ENyuzEk<4WD*`!jk$1)me2>@K(82T&vp232#?4%3g zq|UfoILJYgt^q9|+n*6H7~aEO!n}LfUDP2YD!UwW<ykY*^bWuQwj-b)Tn^_TNlLos z%NYBK^w4DklprXjIqW>i(S<)6x~S*LN8ug2c@0rkGI|hm_6&TnqmJI}X9Fk$(;d1V zz46yM(90Mk4?~Rn$Ir_}FVJVEbLEqP*FL%#K=kGve2=ej*VO4%y@B=X^YF$+tbTnk zDuKZsf0LnA_M8#d%mN6<*`ky>k`#Jp&!?YLpE=hDU+B_{*R8Osk6)dzGR_Z7 zA5cf&e%xqPsN)>HeLa58nk8gs1IV28^ZDp?<2mc;^82*5GJZBV8Dp=XQRn6I($})A zcgXa{4u2m#EhsNx<-f@P08g9XemJ6#Kpwx3o~olheTnFE-1=&t?A1jhoP*3qrawQN z={DP-++!o-Y!rjg4&-@b=lgU}I3u|E`e+t8k_b`iJ0DOy^Y`e{*mcj(MBh!w^!`{F zEf~*S=gUPS&$sW;t$fd1et&j~KmIwTFK*8uS-ydPpEKghPf7AUinYUqzfG7oL(BOCLse5}VXmG7g0TaExah-yK>1dQOEM%LOa=(e8^<5Ul>HR0a<~d-l;` ziDWu?WECdcfqnh^pUZqgGs=oJ4XMiAcM8jJy+_z!0UL|yvG065HhWh5#Gx&sGMnWG zs!9rh?gmG2bo|q3@X;M9jIKl!8Gxg!^}zdWwy2ytPcdpZV5xG7O90Lq;A~BX+jlnD?Qw%`=>nB7r9`D3CP4?W&N>sU3y%6|yZA`GoMiLK zpwzAE(;+2G05>$mc${{+#`dq2d^)Y0MC+lwJKg?X5a$fH*5 z&#YfVEY(~x9aW!q@^sZpeZLf zQ*I=X0M#wGrTetuIo2uD=Po;jAe%XfOD{O3F#FF36xdsSR%X^)*9`*%()*cI9 z&vNB;$?Zj?%6P?(HdRucCAX6nJL_yghNVWr;636YEs*CoFT~=}m2}%{CvI!cp_(f- zMZjs?J1sNdGgd&C;)j@M$UsBWS_c?PUMX)0<^buOu(rufsS>J*bKfe#m~dlT^PZ0* z$4ZdmBubMFz=@Dh-~^WfiBiHqB{&<|W?I*UDKQ&`RAQw$;Gd4Y1(F(ZBbn@&ift~b zMHyF#g^YD15;Y31k;?^&P;JmKI}ubYN}S@qK7l{ocMYc)z__9HZ;rSln0hjYyGMtL1d zvD1`bD^DG}VqdH}Y7wMRLoGNAN^M4D+3-~utC=iCadA@YH53Gu6)8mpCn;72vwL=( zT#X$NoVTINb*U{WRS3048*MMG)cEX2YE)x{uOuXe@?_ye1dTfJC8;E}QKHVHqr^*X zt@W`Y14Sp8z3;IKlHplT=+J;k!huLVb*WEAXD65fvv%q|=GW8G#DQW!9gXo%XWV6( z9&$#IRVxAw5LV*0D?$tZjTPX2)rlJQ0g8*bNmLY5!6RX2bCy9 z#+z}#NuzTv`>^RVf5jS8E(*W?i)rHY01cQ*8ECKS-p)K=9p z$p%wREdGK`-15N+2_i&dr$uq^b7G>=mgA{pq%!&*j+qKWXfL60xt03a!RiNmbvlHn zv9`Sy1s()4im3UnCOM$el_{ z9C8aXf;*k;tlb#b=M5JnlTmgVsO-J{E|}U~ke6jOX5Wp!bX&d?YaG#GN32DKNXat~Yrpp_0}?IjkT@FazbN9YPBwCpJGpS!js`N-OCY}t8fv9t8R{93CxOYx-#PULFQf( z(&~!ZbSOBG$^9zi0+3SZeJ7inxfsWzMsZ6$HA2%Ez-CbTt+522fb4B+8}#%y*m(8B z)Lb*-cNFnFQ!~)$kS5vA+933w3U54xb9Mbz8Pe&)iP8QiTqv1W&8jx|z2XDN@p6Bq<4VE~+|C#JTMB z;M%)uJ9FHeNAG^*?X3ceyQ*tc<}FKB1;IgWhvhW`6T zTX6Jn>Gcr~EO@Ro%ZyBDvn{s}hZ%Y_f{u97n{^~S%ZWe*wWUc|2RZ09gKrdiwYRqy zWwmMeG>QdEOiKHd`gCCd5ZtR!HBWRk77uaQ^^{++j@yS;L$)#1%Xi&zMa-^3aMj z6-!c-kd}ESqMELrvIK#-bu{%UsU%QQUIcbv=)3d0G&(i67PE0wsWrq=p!@YH$v*V; zB_0?NX|)LodC>Jummo6YwtetlO@L=Th8*j@pZtZI&;$}o0ZaeP7ie} zp~kQE?a+m^dri3;wNt~d(24%V4?Ft<)zm^qyaB`a;G8V$IX&rpNTu&f@b2?ZD+X`7KvpHHzj z*7$m3W)9ZwB{svSA@nV^&yd{()yymv5SNNr@uc)1r^Y~1Kq<&I8;vM-lS~gSsXh!D z^8!{B>JY^~6G5e;V`ib*{dvC0QRMXLu4(=d%hVZC(M127f_Wll}n>cdFNHiCtMRc|a zDpL=ZR8p+1E93xV1LusUs#cm6YqOvVSnh71i<5Fq{yXk^ zJf537%o>iIMW#4uo~h)57^7HuL1BrKH6W8@1&ztJ1zttw3SN;ep8HQNXq40j7Y<6> zc^np)tJiMx9nW}T%Agv``mGEPg ze5napZMga3Vjl(E74N?h56Fm{mesPR()RW{NsRwwSgA|k~#s@++1P{#&y)x)bl#k6ip1$Hj*@i9&KP9 z^s1Y?IVu2P#ZAlv{jA%|FNu%Cc6Opv}j_r{pzUZ!f5CpID#YC2RaS9FJ; zP0_s5qCAW`;}V~i#T{n}6D3NTjFy=qQ0RH*R$juF&Qzu4SyP0Zm1O?_JE`tfo@5}8=bsd} zjOX=q=iaje?6SfVpq@kUpVsF;2*~y32li_ax9O{W+>|L^8o^RXI35@(83(pqQh)xR zkkdtBYKoZSQ?ULf-tLzC4^fLwHAF5*uv2S%I{o**^Tu&((-Y&V!q-2B%VPyy8)cFf z_6|NJE%FEd07qLlXj8;k$XksSKH`1h#E!|3=>fK~q0j-y2c8meG}_t}A`3`TFsB_t zR-y?dsN=?SB>Aai51xK{*h*bErLdqdP@v{dVCuo-7|&3a`t|cV*pb47g*$qC_v!pS zI(x9Iym7^;&4%B8)))Kw*!mOS7q~4gEu{K_l2L-CI#0%-&C|_CCmn~`tMXEz%90L3 zKu=r}a1w+N2U16uZl|tKK;bdW21=9&!aSFb%TNIH&N4nca>4sjvJl3u`vYSv`Sc>|xB9ci<&Ba;wg|*l9S17D0UAbExU3GC~vXmqgr#!hK zAai_u@_Qf=>*P9TItH5sG1&nFDM&~wP|Ev!4W~Kh=2vu%yvoY8dUu_q^0t65a!S%2 zQk1Uel>`oOdSIL+4CqpV6c)A5Q}OHke}*P?@y3XdLOhWuL4LMS15k3PC>w-Up$w>rzYcI$F2N)7d5UG%vWd$P>A;ImYr*D2D_ zT2nIPypPe!LJu=C8ZF9<>QMA|TUtRb6orJ95_v*WlAfpI0|^V~>CJ^4bm{Qt=c@## zf|5paf(I$)0lr~{jHq|!8CNf-LUVxRq%!Fs6(gY+2jUM=>MicXPO1Rffn7-V3C5j+irV7T8W>c1jXFz8NdV-lGcN6RR%1bNj|{F$GS^Wl8Dçy@O?VuZfbmHbRe#urtVawH~ z9ywW7GC4n6Bd>0n`g5F+dinnU0G_^tW1&9|2QD+rdU^Efb@fQ)9Wrt1at43mH2yAj z#3Ty~bij@%=b#uJ&#&jEhf;~|KD3@T;zRd3pBFpY~{F^vLrg_5qWk6^tB={&As{a0u(yIPLg-npJSH zy@)3Rr~nUr@^xGfBY-@hNIgOPbB>>%T_cPzxa({b zj1mFwo`=it(WwWf4o{K&x&fYq5tRAynfS6#|C(v?ZWxPztT%eS`#N-ZA+Hwk92=Z55Y|V&>UOZ{gs#6-53BMgu-b$TZ=RgO; zT2Da0^z<5MKZBKMbsCgJxWjEzr3$qPfWat3ou=kS#}L;mstU@ z3)BN*PfObyL$|d`^w#G%X#O>bW)waV%Sx-g9Tw9QE^?g04E9wEA{IQc1F+9&2l{)oH z98D6HH(gg7i{pZOzs9c+8~3<1EzrMrM(0&pqbbMfw3!%zK`)zk?Vrq1I2Z*V&cWY)JafnE)N?K*#)>BI%v`(eeT|Cuz zZI6j@pHhmF*$u4=#-on9>ukKFsnw-+ccDl!UK#BrjmaC;a<(y~)Zfn=nS2lsCqCrdV@ET{Bh+Uges+G%N z-V|lmQ)fK-zOK9D!3D=ATaPT1#ICZ?dzDD)r6nm>GE_#UU%^Kc`#HqE-BPzBW^V|0 zB@N)y6{Ss>-ZG&L|y7*wc48fonZ*%LtAnb#Cp(wv1@ktTdkcV$JR5~hIjZ6zoHETO3> zb*^OfN*PK30|Qz!MX}WNmy}Qxyi{Jb!_zU!WvKn z$gi;l)UhFuf%aICO6t>bxboqLfcTQGpDK?mtaC{Dcn=hkBR?{jNZJ|{U8J+DkgdrG z>O*O>3>~)gh`#KLqASxZ+6a*9==C@Y5$hF(oOGBJhETAiIMGNekI07>g=I={Io9s& zyZeI6OhcDQr&MBvs$116l<5piiojBo+tNgF%BqUn!C6T|YDg+5$oRG1g$Mj5Jzl8n zFxn!Osl>LXWXV*g1Bs%c!boHW%9;sMkA^%l!#Z;rd5Qu81^S!p0*2V!U#RX4g}O;| z+}PDnO3zCTOh|z0kZLg~P@!X$N;H)OjmEWCaCDAZyO)C0sohn;QAeUhj}hsyLh99d z(j9I2Xj6zU(__Vsl`1+L4TNN&Dg-1B>ej$gsLuvuNRsn&By%O-cvC_shL)Gew&6o( z;BCJXn2*+9Va=w>-LK1fWGZzI8!%uk*=@UBkc3I3l|c(}$kYg`P!*NnB`J9FMhXfE zQ=nr`D|G0R5~A%^sWvN5G=)DZthS>nQ@$X0rKS+l8%se&vJ##^qEa$Zoo`V@6@dsA z<7K_=du?(7x$JG|FKgn7;*Cuy9?KqA6rNzH8hMHnZ>)B9vl5@(i4<6FmQ}$uNs;2J zE@i|_q_`aL42GFsD+)@RF162)dBO)i2~v+QZ0ZC)(mF`no;tXjwMS}r zf5_amBX!0l2sq_-pIJ(P@>fHHolcIbic`^^MIJN;pf==)axNxgGPTZ35SXz@1&!hvg>Y;H3xBIP0r-o=dyu^SJ7y^bwEqkj?9 zaDNnW9W^GoYV(}2#8Enh=G0PEQ&cQ$sjQ$hrmJD8qXS!V$Qa@Tn#AI}tOl2L?4a#KqyOKxOJm)Xz8)hCHI?mdOw z3bZPJ6?;gh+o{2lsPS6givlcmsx&RnvO-ExP`FsPrqhkbOlO^HAvNfM*wSXA6g#2U zdFoLsR9mXCXWq;$t77qrn{uI9MM{*kJ5G;WdY2KGQ*cs*MYzPsfrUFJ8GVJY^NqBX z^jC!54fu?>FUu!!czLVGzwTYRVm143Tl-^Grq{1mDex-so2AyanlHa8Tajqf>MB!Q zlxI^_qsMhr`o$rL;bFPXal(0RWg9JhP@}5?Ut=aId4_YMPC}4{CXI^C%2Z~Sc;}0j zhFWN&o=e2}j%nhw)LC|2rK5_fib~wdO6<7NP|(QlK`voe8`VcuNc^_T7d3_9hAIrh zDXP-bMViZ1md&Q)r9B1(HepJf65~Z~BaF1AsrgczLk&lY+Ewwn;<(yd9|=;{GJ5n2 za&H@QgSPv}BL4u0nl1OR^*R>XZx-0KQIA!)E#1SsS+}8C6e?t&bzoeSyN$cT-*$ym zW;=1JNPb9ZDRK;?H%nu8df=`z^#>E%S#WUIy4*b6kgq-0O~GteuI-gJAt)U&Byf=c`#;ewXb{DAXaEnD775W(G4^;zb1!PWo_0IROP%iO3$C6 zp{K8wI97R#annO&H#2Kxok@~Nw2=!csFRtZ#gd}QIB?Q&jV@2b6!j7{I;~VgE?;VD z^+_qJ0?^MGH1$wcP$fvEmY#B2da4PB)R$M|6lg717*$r<@hX%@ZY!$OOw=@%glhGd za#d{$qJdOssQZ;_op8}Aapf?)I@;roY#~jlS{3bHsNNQZ-^2dO3SClNv9v3vv zQ52byV(xwANr79V)vt6kzZNw@9lZUmN2gIaOqPY!QI#Q4+?3NwmbT&ATrzO?!=;%` zrCQr{V_TLyE3Wje-!W|)hUD7H&Hn&v)Rhu+`}1;W&&jAWc}Uy`(V4$g$|a>C)>ol`Z6m1?0K4oRz4Dyx}Ue5vMnBC)nx zL3D2}^TgWytM~iPw{+ENlH_hJO}1Hxi*_88#kzM1HuEnAZEH4|j~Xo|Ba8n41&s+# zzEvscjH+`}R@C(wj1|;BqUWKFBz-H&rY$3^(@6?Hn5ihR29?~p!+4@-?jpaq4?f`h z+k~>tGvU51JWIi5uD&;@uC)22bh&Lb`Bq&^nN-6d_GgW2D|4PwW%){$&EuB0F{iC| z{UbDwV!Z`6pR@CAO=V&P-Ne3kM{rtZwG{}9Tcp&kShmCpj8!-i+wk1}3CJmPAxh^` zl9Jk+D(bt@8>6`GT1coWg2?ctK#wL;o}jHt4GC1XoqR4`IZ0Xym`N*StSO+hb09Gr z2~DwWU5nX^V{hX~kGIy=+1hrkqXw;+6Ig?6(qqtNL9T~Wl+>M{PnPtx6qI|+b~@a>9g&$gLlqHc&wW zs3PEj=t0%E+;kVm0CAROHx%)I6mb*lr5W{oRYS(aY_n9hn7M_4Ns(D14&2K~2xsM% zR`*eETQR3jq1PqU+i}&U+EqpH^csXVfeSI@wH+=(sEqYXoWXpdw;LSER=!c2eQ1Xw z407CgDJWu{HRP%zaunuP-5OBHrzojso;#@s%5Z>#kUZ0)N0_(fQ{}$|g{hfLhO<1z zS#9VJ)Zso>-9Zhxl%>RFP9XCo(Sj41(2|BxDH97Z)>asKrLv_(s3;$Y0YIrPl_?}B z{*VPElDuRlhA{KXMQ~_Sw6_8!@ zn-)c7(S5h5(P6&&%tn|6K*)@ymdmhL@t0nRpt6SAS>{rJ%5tKlWCArDZ)-d|`;R|p z7YlyPsslA@F3D}JH5>l`y>+Jf*oj(`F%oI4%0iN^M`BSeW@<4QD#10Iz2%?<#YxwD zFOAb;j;F1gS-~ph8EQRhaNhF#iLISSL z#Mr1{R_kHAj;nFA08d~mPAABx&!|AGsW8Jlu=683nW@!*kqNjcvVbGK$#~iBNFkU? zEx&Hs6bc2OXi}q4Z7VX7PPVOz6eJ~>bjl?rIw3)b+h`aVVX&nuy4IyFSyGACLclCI zGC)HA095u$7OuRf=1*;TTyj_9g!2UuqLG{}K1De0q38B$?*cj8ER7YY%n?goPA^@-2Y?SOK+w9R<4%mfN7l4_u77bBaJJ zN5C*Ml=Ui62kpo0#id`F#lm#Q< zBPTu72gFW1`vH$Vdyx~FMMVTDY6wD8)Z-u}AZNZipH+N@kg?r~`R{+>hH8xDO)-s6 z)y99*^ET~^RCZZy4m~N zq?Z%^QX@(TFC=tRfgq9r8pP2Jn80|wNF?}epg0161wW%tTxSC(pzJ#7Jw~CzrtwC1 zKeWT+*?$)JDa5abpjtTO%qK!?YL?L{2JymdOIu^ETLZt@i~+wkMZiol8*dFZNk9op zi&C2aE2%7i2|isw!9C7_m|rPUiqIB8NDQPPr2r(9qnMD{>XVV*B;;TXU7u5~XO$o* zwthD=&V-T4@Sz7IK4Tz(p83`{Ez~7oDJgiTm;jUjft9Bxl;I%Y_dQ3Zbl{#_ZMhrU z=ly?m@a-eBl1-V9{l~X+u;1Z}OYWnSkQFFkj&zQsrAMmXQoA3B1dQ_m<=0sJw?Rk? zQc8Xh2pqUlNC`q#yb=<8us&qqom?k4;8Kzo%%ZMe2?Q&j{9K^*z}77> z(2j5w@vEvqPE~+1Qc8j4JfM%esp>Vbhp%uC^B=pf$-^yD4fpH(KK}r_w*9Y*RQFP# zqk;)1B&VOR#0rW+uoKt6kvSRH20gr7BSqp9gvndSZc@X$p~DJhUGW@@z$1F$v z5sEGlMluXUe*Xa7t-ve*^uQgy zI2~ER>Hh!@{WKzuao^9l1Mtyn?cW_o=kw{IoFD=-ljn}VKAKerd@3w=z^fz6KYnrN z*jI${>=#AQc$*Y|w&?Ib9W4`YMhq0&w^_+Vq-jE?yj0B0G>PK#`n zfz$we@z<#7)9?M75VQd}03_s}Pb`!3{=HUhK_m{i#sZJa)cx8(n{~j!?I)K5uR?ow zKR=Ms2wyXaNlrO)@gChgvVM99JdBirRoLKlSD$?Sr|{7~3yJu;9Q-4w&)fLv7V2?> z>+|W0yFe?Vh(9rt>*@Du_eQDIXjNKuZjmX-HCjaYbvj(elu+zijXq0K;Yw{os#J+A zw6D00SeOdsPhc=PvD+i3Purr?oG5l4N4WX*^68?G7!_e~b|CMB55%b+n-E8EM?;Ch z@aee}J}h{A+dc57Oh>;|X^c@f4x0r)Nu}SEHk*f8i!}&2XT^EH85#X#NI?XHt)aBi z^(eOrEHwBItC{yCD3;LEWDvEh$z2CeQ>dYPDEQ)u!q)A-VQx&v2E=a^%5^I5acWYV zv#wH85{G-Tl7B@RDsc=>$Nnpo)1E`Aj4s@0w$FgL(r8bz#YUe{fZ`-Zt3i^4y%Jn` zO{k^#t~9pP3P}f>R3{Md>C1B&V_3<8L#iX#sXZ^;t@NAs^ATnk?~e;SP;MvT+E{C6 z518eukkuh#Jn8^h>^CBHU1HmF1I7r^hf>6^)Y@@{##D7CM<7E^Wdyd4od^E_7JYpG z01bKKlVPdcWb7^b!~ND^Q(3rRH#*(8oJWc+i_(|RBHXE=UBq!D_)>A*i3{|`taLtR zWVIcjJ?E7?j$`0ur1k?HfEnqnfTT(iW5!8zw;8o^JhC}Vmk=_dq7HmKf%fZCo&u$I z(#v8k*!8~KUi}B(i$ZMHdO7H`OtBJ{wvEIen(B$()oTX(l5YZ!?xDnJio{B=oNaY&+6Mdk5&K;@tg;;Rn*4u$(Zw0>+ zL|YSd+k_mH+$PYqH9@*#v_h)3>31F(C&r3ar80R+kYOFf-?Q6_?hdO}Djx1_Mauo2 ziIN(nUzX)P%H@??hTDZHn-Z-Jr3PD4FswPswC4pHv$87sIpIiZl~$=r=`3{I9j_a9 zd)S58f;*0q`kpGS;@3*dzP+;Ar-jzGjc*_lj`Bp?RM5(zMR)qgL^>uBwVqaD&0_Vq zo3r-5g>_LY)J4r*Yj3N`_q5y=eM_p{k4>yYMkzDYLX+V>w8N5lm~|;qk(noZ4mfnW zcB6`3$y)p-o(NqrB9X-B&BC zND5ym)WZ1L;5%UN%hPVSouk~_cf*e0?7dnw$8heAwAD6)R=BNNQ1PCk%xQ@%ME8=| zcqUVbQn_DSY7QiXX)3W*Uq!@JwCfEm4Lb4Ki}( zhBPZ^pl&p3q<^ z_?h8ab&C$)y4jG_xc3bu+4br&9z>eFFLnj>nGGZbRN?qQEpiZr1b79v(vgQ3su6gm z_IlFq2>bO(-70L#eKu8Y42X0YZYrewwYs+?RAfh;$n&t&`(Y@WfE!R(Dga5>9QgS5 zitgVZ8_{G9y}qwKuGtNRxTyDT+%DIsNVY37uNoJKhORn=LMaZ_U_FqJag#}bgGjGz#Lv!!oZ)~43nH$xOk7U$oV zOk1{9wE=}fpx5WcpHigEs#;LpC-f?Inz=92n^|%yq_5qO0=XGSm{#NmEcz%*TJiRTc72yEv$- zsnp$UGFyu3!SLgykeI`w|6+*ytqgR$bof>z2NeVTf`#+wnR z00^eWmG4eG?oW${A5cq+Mz_*P&?T4-gKM4k*nziAhTV;~Hp2|LWL1&E)Qf#Yc}12< zBt{&l)s5XyCi3rj8Jn4QH;KZoR4J5Iw?LwJ6$wL#_cZ*fp*`4)yLMo5dAh4RMxg3v0O9FGUYD$gzuNE0>_zWWmTaGrh`~`Yg z)yo`_OHSn_r(q(u?35vt-(W?>x3E8E*4R4mzC?2R^OzSC#|U!rNJ!@vyll;|Wr@|D zil8NxgL(A=V5_$jiF+Tvm0K@+=v5m&T?Vxx+`jFb)`Ys;ShLxd+(&?wOMQx!sai|R zVAF0YTaU1%xWeVbemlu|Q-9d6X2!try}(Y>U6-vwg9~|X8+vU{%Hn5+nDnY0{{U)B zO;CRalXl3rs!^#MiF`q36eg=R1Q>43@e<;sd*cnt({}Me(CVJX;f@VEnjRa zJ0nG5`i%;T=Gj{NFpCN4FRfFjTo;A0RYfkg)bud7R^-@l-z$n=@g3&m6RJ)r$#V?a znzuH~tTwvfoh(OCpaLK0-$N5mQZFNd&YJSoLvAkT7Kh>zqnL-d%W#dLS1INL5Dq?lASh0bycbz z1@?sPOsihkwKnT#w&P>%+cJ}6-IsN`{U)0xk8)a91ZvbZ-12tv!nB~XOQumLRO@g= z*^E8nGSv4LS#~2$>r=SO_Q!B+L;U$RWz$A%~;g6$xD^dC0kKslrvFFF){|(t+$)JRCcYNAgt?Gb~dK7 zx0TC=-r@2d*HGy;m+_@!)oS&6oQmD!0-%;IDx~Xzp*dFjgfmU4K&`H)COcIGI2r?O zc6)~@{9tZ}7xiua-Myu#+pSxBVOQAuzOT32Rb$)Kn|{%^*@?FbgF>lHsm-wAMy0}2 zv~+z~+pm7azkz}{pGN(3eCr7?)~j!Rql71dgq->uGdQL z2N^Dy&(_?XI!UTZZ4w?!ZoVCPv@E463FsB@qL(<~E)b6-&9Ye5x`MFIwKCMsC8&*I zy*G&JZP!?) z8pS3x>2z(z-&@AsP^;1EcLm);q#2hA1yzV4nq4s^5)bKQ%3+p^gM|B6v-?l8!r+r- z*!0Q;TIHV+ca_sfZbdHmZlfL9D}h3*PkMBxBU(&IlO@>fCD&rhb$<0NGGubP-i6yd zO>q$1W*vKo3)ZSu!rA7OiMNeX?LwQk$1;i zX^JY*sqn4K)+}Va)3OlFZkW)Aa4@jf#R{tpZG1&-$YEa?*5ZCH%=m*fsr@3)8a0qd z1Wy$>5rr1zmghMd0WTuE0xUGfs*5tpeu924cyGXM!u&a!<=jD(3C(o0iJI05x~ifI ziEUd&N0!Fx844B|siR~?X?>=2Mt<$^t-SK-5@hXN>nc3TZE{?SzTDl>#AuYYOiB={ zot0c^ZiLb+@=6mbo}_cep6Vnpj|M`J()Y1d%6wHRG8gXZV5{6zgUL~+y7EHYXTorF zh^H~k+J`1`l_ZW*ju>st`DAZxyqb-vS9yd*l^L3a3`S-n^s1uDwtEX=2n75Q#?MJ`2~QOLx)5kE~QBe9)qt?`nf>IN~-sDyKht1UaQNAL5EL6kFKH5DGff14-iur zX{RMr98pq&<3(xpEk`LrzgtX&SA46xf*q&XOx5lCYC^ruccL6(CC65d5Tdy@>kKJs zwW0DYW5;)zqA*ZV5T2U0%|3NjvfV=NmrBB+kJ(WQ9Q=46okl_-@d(n^-K6)csjCt;w`#7bg{)64;7 zCn@NlR8U)1dIfdQ*{fZrO6G08cH@^a5<^K)WzW%LkY@=2~p36PwN~J^ZaqCr8PLFM6e@B7xf(lx4%xC{ur+6s|`$wlAYvlG1y+@ zZ`-ZO7Pb2Ng3monQ%-@&h|V5n)<5w|J=;<8Pf?9rAyW$rD@sOB>wqwlpI^6GyD$*= zalTGuf>NNcK_DCjW7nwsH9^>-B9h1JCm#aH!RgnK=TA}2q;={1ef{v&S4&353Y(r^ zhs4MLXF16HbFGTERF)FfPcJG`K*-3z89yR3t!8V1wf_K~AvNmB1mJAK_WRGzuY5V^ zZL~AWNce(rj`&UhA0zAb>A$=x&O&U#r-c1yDYXDc{{RAvu7*h?^;{<*9(n8KtBqRZ zY6~DVQ0%u!3`PXyN(UY*m_Gw49aMW9;AHCs4XwpFE<=ia`7U^pUs(NhoM9*@^;-bp zBd{H`jUaP zr*eV{f>22K8Xq1(01%}E(C4l_JvD*Uyfg^A+@`S;GLWO|ty>LmL|py||l*nI4F#gcTyE1VY;>aapn7%VapPeSX2r=LAC zG7<^S4^ylK!hkAAHWAD`&PsB65_E9Z(mUVr z+wi{P`*i!B$*>9+Nj;BWjkY~H5U1jH#TVQdDpJam`ZDT*lG!aJsD&+FN3X@#t})-P zvFS3XMw22CZ@wP_(5;P;eBH&ZH?^iveJ^kgPa@6b>=~CphViE{$R~^!{HR_r`@xTF$0A zuj#VwVebB2z1OnLDj{7!D)@*|IqQ?rU(G!;oOR{zjB5~{2P%`!N{UtStCSIpV3F8h z41N6uvgug?Dp>&Fj3^M2v&^J7$=E!enH_RFWOl`B3ePAbs!8S~a+PPBp$S)3@ssD( zSiw46G1}jUZlAl|?)}(jkpLpwd%Ap&lZXxba_xrgk7+LQNevc->1}O&_~XR^D1JqD z$EL-Uw)p_@0D6+HWgm#Bo?=dQ$ilR!eu-sR@9Fkyw|__&w6ADmo*SXp6T|+^CH8^; z03x)*xO_B}5thoBEw8D`3kLvWTt-uA$5D*-ZPTzMbnDyl$20LV zEPO?tBA+j{)F1xWJ{vlwn^M zMoNI}I{E2D>x=__o8!SGoc?j8uL?iyWA4s$w0%Cdzt6uJ$F!0UL7$hdtEF9zI*#K# zMu#7G{*n82TwwJce=hnZyuS~_=jVJ3R`C;@b?fJjpMHpM3c*Ud9Ag;CKEH_kH9-jg zgWUA{I_RX~J+cR0-Tv(M(o7hOeEi=T+wa9ips080-Ca%wG1z^&A*6F8DEA#gN1*BJ zsz8Mg&vDm9B=X?&^drz|A^<18F^_0vD(*Q|*Qmxw`@HmfXh=vH$xlwdyQYLeC*nvM z^e3m7`?OjXkO5c2ljr>G`h4`67ucSk>5LJ49M(E=^cX!pUB9PBAPi?G<~)hVUYZTE z7uTpA{X1j&^<4`|UoUb#e`bGYmXpFK-M$TMfsu^l5THg%x=bblZS#36FPS8{(`>P9TR_sUcAnZp`(+>F-dzobEM$VwN}!EM)*Zts0g$TzN9nyzqsNs71$K!tpID(*VY4!kaM9$m zQKZ%&%0gXgWj>)9N^RDb(vng_x^rp9rPACjHk<&`5`qw%kc6Ouaq6SjKW4u_jtxDi zyjpNrBU`(9ce8hGYNa;0dsDap+SRPXN^lt;!ROv^ziv9D72q(i*D(jf#&tU_q2hv- zd~KbBemiL*8NO{QHN?2_9uLNf?M@?7AB@wd_1i++DF?n2s;4;1rO0KBRh4Mw)yrkQ zn@*eDby5Q^#^ZY{wTZ`K_<7<4JZl_~QPVUThF+-i!yyf&Sm_TGmjXo82p3d!xYU3f zovxFT*E#72gxaobty+kRR`zGsn$R9#L;7r!v~dvP{vVrr6U z3A8B{d!mg{mp++pTjWt`)Y`I~@ghyBNP^-^0y*VcTSs3L89gzsX79HU8}-EXKvHh2 zwzV$VUZT**~M#~uczq<{+CaF9s*HP*@>va+LgI-1twZp8YHVolFHj#GibP>Z)i6HWm9rC#=^g;O>RWp zv7|p$uh#8Y@zYY1OpQ)}7F$=2mSW9HRfPDf_>MKLmQz$y%TX+ji=Z0m0br1}V ze@0LVBYpAd?}91dCT9(GHba@s;#VASzF#eUT+&lkyYk{HvaV2-aiuIl^rXU5CntCdt;}c7zfJeMI zvaWN?Qjvfp1MTbI>fYCIH@4d!R$@K1yWDVJ(6@g5v|%>f6>Yx_n^_@oHeYJmr7{vI zl$Ph3YsNP!L-HxJU2!ULN>-v_u`tmmaiKau4b$OElrxMZrM^^;pFyijhq9<^@>;Cc zv@<*E5QY)Hg+LTHo;CtTlHrH|uAM7kx${5iKlJDELZ8HD;SUZoCE&b|gb9wJa-7dM zrFxpvw8>Lnl;&Al8IHQXRDAV{8Fg)q=AFsmFJrE_lTju6D!I8EZSQpI zZ9?061e;R#s#RflO+Qk3#wsmSZfZgIwj`wvxZ;+=83}O%Znl?;ebl#vXcvodHxh{$ zAu6lNmWoa13OZ1fDc5RgWpVBo0sw6WV<~^&0KQanu37ssZnkf2q2dE&Bs$ZTiWOek z-pfuS%26&-=f_2Xe!-`-KV8;m!n3L}Fb^tc6{r!Du7cUNF*BN5vAkxGq&g#zzw)UW zW1p0KNC)E2P%+Pg*i&3ZMI8oXUr8eC2>O)l2@Vm(iiHB#(sbEwq+4NWcZNP8(D;|( zc3H$6Q5;qI)mzoQSz{!R?T=F_sdbWBrKtvKi%Y6WYR%9+LhbB3PA=|X)7V1+x zp}-2NstAxFvPbD19`e7?wS~X7eSsE<7`WRIY4mz@zEQYEYaT$$n}`PDg7 z7Nrv5Qr>YzN(o2mLqq8VGO#xQLsD93EK@AOXyTb=-;>WJQf3Dqp#|By2#~DFb~>cVIT^);cx$+zU?V zj*!BD7i9qkuhu?iaNGG(#Z>NW5pFb#b}t>c;n!{|yREp)&qz>Jr?<8w39UxBZ)(6o zs&w0GlHkPvlAQB(5ZPxD~!T^SPWwRG+HuO?~OqK;UwjU{IZv zO50m;sK^P6Podhazv0aHc7hUT&k|}9Tnc^X!q!lii`qTJ3tPv;#qAcAQBpRH&4wOrc6`w4ih6iR))}IDeC9**Bc~Yj3aX zvfPbzR&7g~dvWd^x1(1AS8CJmN-~y_K)vde=N+D!B$ckEOQ)tZio6(#pB07dQ*ivb zw5bTG6tL<55?BYYCt1^ScLYYgETNPZzMo6HE8))!zKot0vi z9b{l7D0N9vV$4ZctSFtIB`@T}kB`I3)m# z>6_Q??6Ohy2Ij=LCP;O1lFSO75`5l7H}2&Pz*RmotBZ!uBPopO=gN|kkab|D@8s|w7^kx@_Nsjz=<{eFi+mX4jvk?@W{#6GtjjWaDdj3f+5;YT z@yY=6$SGc>ffg!Q&N}MSaO=MdKx8cR1gMd$dt!IGy||Qi zjYgEkGQV%nLdmD0`84_QD%9l%%nyD-Ty6u5p-FZV%28o#l%dBPTTW|MckbBTE9U(A zwhcPBE|W$LCImQixwE20F0|i`QI5EbDU&I3RPsx!QdGiQNajFV*0mwX$*L<^UeFkT z52ivC*aL8HU|4QWpLUzvW1u`@`eSg2fM{W-iJ3SKnw=L?lYw5cI`l}J{>(ynh7LxZnaw`^s#%aR4aCicLD(+cNZN z$%S%W3^?Ob;VJfN6l;D;0SXmqksVW49cj0RT4N3vY^dg;A<~f*d4|RDoy4aNcg(x* zW%pj>v}aXaO740a?+b#&zFA5GL5ufq>S{E*m?eS8%fXn_Vm1SCWyNd+h3hyv3glPH zN3xiP@=JFU8{XkqmLL9LHX_!I)qx&OKl@6)k{mz8^%Y(z@ljfeiSBr3hv;%zGm)nH zq0B1t9KSeoP^=Lo$!Z>}F{NWV*VkoLw8t)+rBwRP=WwUGRLbQ#R4J3Gh4}8puUmIr z65YG#l2qWR+P8hHdQhp7MLt_irNuI~$GXZ|CB=Q2OrhOLLuR41x*JPj?uC_0t~GDp zR?}B)Hr2T!O_J>qi4Mr8RH;o?7Z|?OXjM3J*5Ex#L$-EizfJd*6>}-X)vqb^$nj8Bj*H2{i3!h5bDxO+0HogK zi5{a5hQ1BtRhbD_)mx>%SInm^D6TC`w#=zk4%o(JU^><*)CfdJc&^FI){T9!9ybLc9iAE`|$)UhBAf)e83 z05v%P*zPyP!!1M>)6J5wg*KNIgb#(~=a4AiB?Unzmz$Ilo|x;WFilI%rXvdRB%VN| zG(1lU3C}Q7pmLRGlwfDJN!R8FE8ENMPo2K@=KVdywA4$rUYyl4W$Cuv7T@90MFObf z3#r<*eW#+Z)Oyqz2#(r*u$uI$(?kbYsJ7}-vDM3`=?rnx$A#;*yf*M-u;XR!`~D>^ zhf%lo)^Wb~UvMucVkOIgHl4>-h{F~&jKOMK{Na_%ViQYtRJ5fB5~;FEszoz6NzoTk z(%>rFbIdXYZ6e#1R|9j~5G3(OAj}q3r;4N741pkkCFGc~0d!c{T=r`b+UCO(eXCsd z%^q4HRIBu;l?4zz%~M(Tw3FC4+8300_r|h%eHI0BD4L3z7Se`LW3;z$PojtcUv_)z znA{P2KlcM??HWzn#Z~_RGjeyXpvo#0S`13Gs+F~9%6KKk)84B|QF7(0wzVifC0Jy* zm3S%S!jDUtWiYv0Yng_d0SIlSDJe=o0U!k6V*^lUPBYA9ow>9*6$+9fQ52OExa`hf zl(B=@Xb*0vr))gYwtG4Dim8%?TXl{mX_$Z4D_Izk`w9o~#Z;Pg4qHePlOry2VQ5op zDkm8L`TldKLJQ?hc#QzR(G?*Xh?MXIkA}O;Tlcnv{a{R^7_v{{TEEpygTq zcgXkC%Lb%aX_i6kl!KGiI2g`8-7UlIna(SzGj~a3qBGlJ9o~$$f{(7 zpcN@N0VIafg=Cy^p2NT4s-~*bY50}Y{{TBUB%EXqKymi#7^~IdJPM9HRP;-U=%i=$ zK~hIhI%IVRPtj8HlSMmp^&6jE`fu>-@xydgkWDx;!{r-!dMFkG%6kF+A@}0tCQ8)O zil0kh0s>hBoRUbuE_U+j2C#~Q(1MRUX^^z@VRBTrN=J1bReUK(AZMV->JL&iWU1Dr zG}?nswp#}U<#Q`3K4l60Rbw4PQ)Btsx?;JEwbh*(%M?{W#){6Oz(gVOzPU}}d6@mpG$n&43ib+@u>h~-vLM>kHiR?~`F+HKN=ttu$PVd9{?l9fHm5g7aj1e1W2l5(?;qDVp% zT~b>h^Opb(xZ-(N`Zm(o134)8a8xk7cj<7BR_Yx~e669L>u`lKOPsDa_Ckj+0}2WN zfItca9c)JWcE98Nx9x6*-+iy6P>kJ+4_?C7`?~wh?~HD2QkK2sA=EbE3XUCYD5wF^ zC_z619H|8=$iZJwM|=*b64F)`%gR!q2mq-m7zt54xL3rb;0zob=f0fE%PV9&w7V`- zj(}Q3rxZp?l#r(Z>y;y&NBP)D03|(}YMM-$DTtK>spq4_Ldt;&b@d^hVxVwGh~OZe zgnk-SFar99-|4@8oqhdq*zpp|p+Pqt0N(bshwdGI{6J&de{i*MdrG&hrW{iL0D{)e z)LF7putHj&L$GNtOG8AH%-4xh7$eLcn&hg^GuY>*I%DnoHMcx@?mS)G<70}w$b{*7 zopNu5^qO+{mb99E2B@oE8ECBJGFhRaNF9P)0CXDEW%f8dJ7D8K@znP#jHLwheOx%=lRBkQ3E;o;CJoiq8ulw`T2f*G#beJ$A7a*Eym-1*vS3( zpt3SL1Jlnxxc$0X@S~HT!|c-1xEQahs68>)r{SRxaC)3{)nWK&q5CtW*jnSRt^WW# zWc4Q2z79z^0FIdNk@s}fLa+x?td7|E_RrolI#g5B9S3jhI`UAWu4OL>J%G+f-UqI9 zgWlfkWkvpfmM)E`U;sIZ&Po1}^T5~DEUifhCkZ%Ld}sId{*6#+yz-K+QJ#QxJu%lA z^wG_yIl#_;q;>82?WC+v&!#YK+Z9?kBO@S>F5NwS4}BatNKc?Xf6e1w$FKJ378WF7GP~TH-{=1TI3+6x$2z*7AUpK=Xp-(mag6!;AmHP#UZ8sP&Zj5rrrdV-bAg?u zl>C%Qt5`~@?e$$DNiH_JEQKZkaXm^wgyeo)<0GilDt6awZoSjFV%t`=F;nMB1?9Tq ziHlCB!a{(NRjpKAPlrmRxBT~<>Y_p#L#~vd%NN-K*4J?HYVK~)*LP-*BDGhS0`I6y ztV?c-Y&A8A$%P^nv+wQ&xY|s^-~xZqop4I9B|yzFVR5+f#}hEg)>qaoG20MAxNwX0@$2)EhZn{#|FJBl^s zY0zw1dsY<+Lf@Mzvw7DcrbW|y-O^v`^wTZpQyH;<*v5LKYipwKmct;FIlQ}W>A_2l zBIBn#f|4+_Eg|9*2qz=Y8V=&)2ZkNDwrjTxt;nO*srIxNC(WZ-jeT=gRA#!YQ>l=F zRE2-CfPU>k;f|J`QsSZ^sdNBYZ*oP*7dxGWw>^hjW3%$UKH?mQA(Kz7V)`zAF<04m6F)+?#5yDOC4xLS)0Y zDbZHBPM{889&rdb__}9NkKzl6o%iB@a%Aov{q8M(^t_&F)}qI)KB&!6sqQGO)2LS8 zz}*I#G6yS6pr`@PwVt|v%Q$?`E};_BBK@W|4hGk>XUrJ)GAeR5as{7x%QXBpd zUP^X+8Z1{_cAIHiQF)?UHjN*|KMgt!I|=5%FFy0q7xB7vuUt9AVan~(Inc8FDk75@ z0n;v(1rj{{2Ce(#=QZ0MfI;^v3`gDbJa4Xdiy8)Qu^4e8m{i8X|x$b{xQWJCnCkNhhf!?~XM!bro~gR#i&V)l{^y zNauEED$Gf+?t1_L=l~mHZ9hlffa-nA!w(RgO5F6Wd&hEP$lC3jku9-^bbDf4THV=G zhLxw`RZ_bW9XPrV#U7ZX4vIP0sP++|)gO-JbuwC#>tPD!OW_DOiYiV&)5xZk;ZRe-7l!Pf&ilip$wP_A?9L}zM$H^zId+Dg+7lx~r zU2fvsTP8g^p+S)U0M?SIEIzg??aq|&_n0)O31^b0&o#w5$^(c$rcho2K{S^W(Kcfo zS&AmAgLZ#Xj&&$KH;GE1_YLpY9g*R*((qQr6LnsF%0273qYh!3M2-00*be7U2!ErA^ z4T0gu%VmegPwPr?g((VI1t1WV@~0%KR}VYOM^Y5#-%ON%hL_DsnM=56mo?vaiS$X4jf9|a%f0TQIpv9#-dSV)k;8;l0sXy zhV&Nb4ei&{($*NVPJKqY=K{~zga+XBLPZQva6$T?d_gbxnHW#@9N9)CWKPsZPwV{`P<*-DFBXta;CQG ziikf5=R$n?ch-peZ)$s&!Vj}obhle)_fp}qw^27X-&+uGD|x8Y`P9l~$#Ag-u@;Eq zsC95^FUBiFbGiNHkV=?SOTvVvlZUf6r;@Q~+6bdDgDk6MQt~8eWhGs%?f}vaiPgBi zA{obtd>fW98J$_rX<|v5T1pwwWtl`y#YI;pq6o<<3v&^P7eE%_mNR^G?mo`&U3uL# zeT!oLx3{M3t<^4j5{tf0TWjCVw~up5omCrz{@KwY$ceD@lsP+^-<5W~BL1ib!_>+p z0kY*~5!|>gdxq?;Rc>pBw^z7sI^^kfD&@&toc&6_TBy!_awkoxRAjhT>+eWf*5Cvs zN>%~5F-OiwCnVY`wMmtVrAoD2ojRvjtkk7eD>Z7A*;Oj7VzW?l#-CTK)aJUk>XkR1 zB~HkF#~pC>T8;*QZDnp@BnGqbfJZStx$+vYavmR}$sw{1bxgl%LIuUbjS2fGG=LW6 zh*j3kRY;`#c=}0ro%DdrsU+hZ?qkE*JaI!smWic!5h=k~W~+B%)z!mOzqC#Da7jHt zpn{4S65vn-C}4sz2s+HEn~!nP(-o<1z`3AA z3lZqItu?!gn3RuZ02cn7e?ms!zHKZ#f4!Owu zpO&8|rh=g~O$y4Rrl1Xp?hUS|-YiFBif@N_r-=AUs%pL)&Z;tLD!@vGhC;B_L=E{h zl;-sHwB-G&YPhC>{{UV#7Q zfu6YS-(FO)p4bH7A0SEX_G{@0P){;}#!tdPBiB8C&23+AFKxZps#OB%TWJag-2eli z9-f1xvE|f-po4&Ya5K~F^U!Gv<~+#=ZNH1+_)bTk&--+G6cjQCk;pyAmtVg_sU$a- zG1sBV1pJ8r_UWOsZ`%g32HpF9{{Z8PZhN}GQi7HU$ihhjwn-m7OXKL*aKmHY+aty% z<8Fn6Y3>cLxXQQqeO;}2P#|13{dUhqEz7F*r%r=ZVQsEFiPd@|PK5HSFc6@mt+Xga z7?qC*HlB(~lg*HjwPP3q9S?0yd)a5WXJ@^S_PcZjq*1GTmAc#GRjtiWG-;}&Qm&}h zi%!Row5P+5Fj8GZPoSv^W*X9mIf}VroMW58l4VI*Pz;JC3bBg@mO`z`jS1*Xp$Q}q zh#ANsNX3ESepYjCFQTMKxzdQ_We0V;6ol&Z8f9<3*54e#-#=kb1ar8;xzV#5@3}Uw z4s?f>FI}ahQ)!jD?Z0}>LZqU^+U?i5ACTOeBrx+nJc-aJ&!;$~MU3S^PI%032Gsi+ zeVcoII@q~w%QuLMZsSlT#(LP?8aEYp-LHAu^~kZpk#bS0R+TCOX%(i_JW%5(OD(K~ zhL+#LY#T>$%bi=eD#apElX_hhMf7P3S?5X^MIC`5md3r1`BCXPyssLn@Z(& zqb8(zT8PvL%u^z?%7bp6VkA_bQ(+veEh}4XB}nF9D@p{UkTpkV++)VCI>_1eL@dl_OP9 zoi`3~)Z1f->f~x=5}Q{-E30ZF6z1mDR;5;IQR$J}kM*5iqRLVy)t(4SPvIMZXEX;OHy9!8;K|$M;1uvlggrc08Y749`x`eRSRKD zk3xpcCM1w@m#S{IWJ_QKtD=zVqoqM0^-8h`8VWtzDToov?;m`Q%$l694bq-ph&0J; zj;TH}lzv6OmXyl4$2O7U|W3wI9^c(4Fad)Ri@*5q#V5h~id z_=K}z+qGyYkjb>>-bt*krzYaV>n^~r)zHIeeIZ`#cLXbE2hCN5$Y1bJ`!d22_t-+Ag z)6p(lM3sW9-eZ~w?_PGiVk0R60TJc$LY zUa^#2yxC~4m?2BI76V3k`GLtm^mO5oo0}31h3&z&oV|x z1eA3-$j?)d20-o0^XipFI!>A-7xX>B>~HJS`HXHuQ7sgrXbtVLQ*y39WyaSY{fNE6 zQ@$^4*JZiLg5+kxTv|({I_D~qN##&+BRsu|i1D#7vbcqy2V4|7C;I-ji~d03X)3HTR|WtN+~K^AmjX)>Iu&= zBUhDFT#VUT8A?2L1R*b_)yKohDs7;FmBx_bjuXx?lklUI^J$)oQc{Wmaa@iQ%OSU% zB}9TqQi$o;YHt*~$4l5wAGf=EYYqboYc{g;yTV#Ic121ZCFpkJ z5m2=c8bg;YMvU51pZsFFd1?KbRxbw$b08}%DSX~A$XGrnQ^=o;bvY`)>F22B{ULrN z(PeP=x12LkrWD+J{dSAK>S+#gy%TFTs%tL}Wj3rB^-aK)OpK;n<>qSNeL*AzV|JYy zs(N}fCsj)TeL{719X`qiJ9>1!#wnjyrc;yVS)&k!iY8>ex0ryCsU3XMvMJwSN!t+g zT$xgq?8<|o>WufFolt!sVd{j}mnLiAV02ukURTeXLac++&pmVYe{P6#sU3%Np;zXv znDy`2dH#I0X`lcLY(Fiw$09214b9K4{SF3JGI9AoFP4W<3i80~pP$V7XodQM6iEE^ z8Wl&OK7CK$r4$lI6~O8sb@||D=k|QGGlMzm0R;8YS`oqydiOcU%jc!XQGtO~)2C8T zbMo}ZrgSRE&un$a+t<%Tx$^D@pKo8^pq5X5m_5PsJ%2xTltE$A_xb+-Tnthq0(yb> z{{H|yEm2?Vck=u`U!Pqq9|LSw9s6hHqBJU3+dU7F$4rCes)0nFUTk#FZ=YViz4S){ z-E2kztQ!v{8d6@A}7L!t*?BldadCh$6Blk@!d{;d|3_4GboeqUyi!8&v}DWS{M zoMXuR^Vn$C$nyaG_$NT6SslL-=jVf+R%{e3sH_mI0iQ3k?$T}PZHMy4ac~O30Ye1& zf#2;T^VdYD1E|O+p&h?wdUnvMQ6LNqjCbvf0gR74=zy$boMd3+V3YP^<^4KO7{QIG zcRg{_@9Bg1XoMW#^*HPE>FbXz0EK4*s08{B{{U&#eryqiDLK#T`u_mKNH<=$#x48s zV8YZv&JSapW2aN!rm|~Rg)Zc-Q>awtgYxIgW-BRK!$sE=dcNTQ03{s_rEWN{=C;y^ z>x|-!m8_H~@}!LO0CVN%r&DWc$)ndBW;>{Ap-@Dq5v8aOc>eUtd6eHbcht*nr9U;F zEaytGq>7qpA^^yWNcj4nlebOq=aSIFndcc^TTwZtr>>qDoyS#Ibyh2VwGeE#+ff(V z_}+?T&2Mcryo(Ob23)ynVcVXi6d|d#+LLMJOVi~itZHjYDoj}U?Xeb{ zN~OnCxzlCHbcD9jBQ)}kPH>z6P6n$C?yc(HSmd0fY6&CPpaR3OJ-s?y;Agq!X_g?T zr)C<#QU|5C2HRTO0lqlR#b>q8f2|G6xOUfts*N9LY|9eksoQdHCapViuXx^7iVVjo zwVIrnHJW?z=#+(2qe^Z(R#;NpX|Ut&lDrEJOt zMiaCVnuL%6y3MDWgd5vSE}n~J*l{j##2J=lnAO!wSkt7ExkVvL1k`i@Ep3*<{Y|dK zl1>>N;tn}^&2i|01CG<-xFey``#hc)!kKYOC&K73Gw}A)_3Zni!nyd5vn_d36BYW^ z%WJg>rAKyGzq-|C8-fE-m_n5E?r=(lNRs~x#b(`)q`a-sE2S`%)9lvJ5{l?GNu zQeGuL5ClwWk*49w*rRh3nsxw<^bxkNFmJPK*n`u2H}Lf`W_j%$B<>+f+JKBe8*>e; zy+9`RTY>`-a7NhuJZ#IVJto?tMXA!)275H93@Q>HN|g;Q#cdt}i0D+DV2;BW)2(C8 zhhIaZ!&2C3;;u)0l$8QA>w%4FEL!8Q%WgWKJnE6i zq)Nf{=>X~~0;-UIWC6Xc>D6>OUT2u)S@vd()e+>$46{ijfI1245}7n8wxZHVw+H}L z1&x3h>QokCzM#{Lpe0EOB`237%LH~kHFB9wnMZ5uC=NX`p58oIXe7GNY%8Jon;kzL zVHC;AFK3u^>&j1lo?fTr^3%(1$oGy`x-Bali%Q2uB#bB=j=9t5jvAHHe2@C9HX!!t z)O(L?S2@9`%UDW&x*o2KZWtS1bGo;q3t0QMCR&w~QD-Z0DkNno1YtkygZ64UpGv=U zVp{&sJ11?uX5sH%fl^jc{at)Abo;suDCTJs?4z+wTO zM@)-VUr)Uxuo9bF%`oKX>-Ljdy|*Wn#>4_~7ikROj$CqpIdkSb!5^O5rrdO3l&2%P z03L_ugWEGjk#5gN*4t&ORk2WP((WRTTI83D?9l+7=va7ZgbfNgxn9bpsuBZ&S;X_bGIt zzF?w^^*~Q?_V>}PhTL#Eg04iI6=0`09gcju>lY^C*6nN<00`gbY*flnwJl2}3hayy zR1?q@6Zy`O@LO3U1gHYFCnN!nKhN8*4z&1Nhv6(N6U*jtp2{P>lSoUvxC&vkr)S(duND7%m#&aFaH#(P;?hAU)2YE8 zzuTe7TVZ7jC1!D2d7`2vY>(P_+tbM+tY8K zyBAw}*skA~Evsi+9x$z57cBzQp{a&^Wv01x)}Y&TM-t9INR-v8u*!#SRGjK`yhd79 z*2wLRzr+2J7A+dY*~=c(+dFoQ*bg*mwpBFJ+>qpw2fR5tyAG{UdDUgdWLDjE)djCn z1@?L=mw4ylF{Lf18Ako>tBP$z28x)uBS=Czq<}nDQH+lG7}Te@uDR7vl7&ewy()BN zu=A^Qh|Z;4wHWdpLV7r_iS!JBu4c+}$`h(n#R+Ao&bVtXB=Td|Ik6kCA$JG%0P>&l zk+*)7`Z(pV&7D`~Bm*>3LlW(}DvohrPTq1B{qBlE#)jVCPH!*kZ!&|Xb34YKrw_{0F;!5y?ABy>cD^73UzQTn{OY7awkWAC?X_2>z= zYun&D<3FX2zMe2mp8jGt*>)rj_65iXa6lF#rrXjlxl-v+gKKg;*;5{$HvwS^eq)b2 z$XzES_)j$0N|II3l^o+&I+o=_n#u%VBS@=FZY)V;B(&u^ors8AhzjO!oxvs75zuAy zsN{9lwLrU`dRtQH)|r4Gbx3K)C$ZrdlBAq4!W4&{TY!uyl=EZ}oKkh>+_`Qp zmg>w_($yvs&qT8J6vEx;IiD>>LxoF72uj%m^BikIa)unh6G)cV*mT(U9gpxM*A(_= zk}UO3{IIU=t57!32o6IYwgjmFf(VV4*Bfl5Qt&}rf;{53gr{Y|mmTg?85G5MQJzZL zSN-rFN}L5aC{mC{PBiUWUenGW?mgF64g0%z)AnP1*rwYx8!krS)v2_tyx-a#eiU@m z?h6k7b=Kh9w{q(OrA?h~*OvwV0IVsG8hq)=Uxe2$>zjuCF{z1*AraXPcyLk=G4LZS zqr-5iApCB4WDfrT22@UU#cyeb-0ofHLEA0&r)|~6TG{(Ln{w@y;kpoMW~pz{ZyJTp z?cWC6x+O#|IY&xqb$IW`eq&6-TI#B0nF@Ulwu=LRvf~bM$YwFcUXm#qx;hSIOaV4# z1Ttyw&1*1i@fqT3I^G@On(XG9m{m4d(XogrJlNW0iNPuu#^{f)Rf?#Ii(N?uaJMB+ zqXJ9NmWQF#QrMXhsg13du%^STb28`|j`J$OSojo&L#a}d0oERFX5|K?CFS@JrWp~$R=HSmM&YT}=T7*sno+S@ztvNVOTA#FbC)hcsW zZd1||&l_yF6@|N2uvuCV-eRFs=<5mi=}ONqk>3se)b0nzRzEcl>ytyK%kzTTna6CDM%hF($j%FiX>+jDP0N7==Iet zDZo-37!L*YLwy18(~s6ABw<~Y2sj5i)LAtxn|_=6^u71ogVw{|2T&wa0B>!NLN~DK z+pzTX=yA5tXDMw0f(RU{3I`ZS8N!<*s)DoF5Odc9I&Uiqa*sJa2vc?t9$4qInG^Z65&J8#$G zq=b-rk4N8NRGaiWYF>wbRNAp92yIQPm=&$Cqu{AWnMi#KN$8+QPF6$;*<(yBGu^=_i1w@#tZXt3l}D|MO9ElCN95|&#dN&32!fflE3Y$% zw4P>TF#?eHD&Csdj5^6GS2tYs81g<{GtgsJ7Yb#rsB=n%v&^Al1a2d^CQttWQ*A%s z0f8b+bBBu@OC3c-d^1HZsHk6ETPe6{z_LSr{DmaQH~QAlKzMhg;?F_`I%7Tke{QHK zk`7Oi1F-6K?5`kHpMsw!`I)B8X4ZBzHonMU&p?PPy`(Lb?NfZ ztL#4Cze=i*Hy->O1FQ@a>D%!d6~cOCU=K2SW2ehREm#Mr#(xZV&(A0JXeSOq?t1jk zTy^u&@G(ikdY*@;PTjxZpw>n)=6|nM)_k+}{_PB+bAyBC56eoZumk7+05}+=p`3g< z`|+i(Dp3T0dueF+J=dY?J;MnE5rd45-=DWtLBR+9IMC@hIsA209QE?;^Uw8Y5Dwk2 zbFi@3_WP}Zka5&?AJLQhG(b@Y13AZB4CC$4sUw#-?c93fuB)M8KwuH+_aEubkRyHj z;W7`}wYq;S9N9gI&rjRaMWAy8-)pvQS4c z7#*{KdY|gfs-fhp;{`u6&}xE#IV21#_6%qGHT5AW9H}R$$S0}uKAP8YZq~rTMN3dA z3n)nPPwOmo#tx2(RKZHnwWZKfq^vBZ*3^Xsw&QD0R5+CYQb%lhbk(>ObRY~Q5U*T$ zWAHjD3sS(wGMoXPpO4Q;kO&~|4h6^{gJK9E`^Mw<9Beg>zSV1NhAXtTtIT{U6C*r` zRT7ba3(c<$x}ZGLq?H_;4Q!3I#WvhVQpG}-bi;W_%97nNxozbj^h=FPJl)4%U319< zqiZ|xI9^&f428G^%}_cGl%Ll7za5 zl&00m+w`+$;1WmrsskOg#PJ2kR_JfV0s9Ct-IKPDIMdVZIy|RjO1Yej;$Di?*H=?* z`{g~iklUW(!)T1-jiGOs`BIUh1C)YX1;7*(l;@N;)Z+vWx;>&+u#(|WIOM`{$=jjN z>vTBNbuR^Q^%Ycg$wkkqgoa0z+D!}yA(ctxhEguAqf(KnNFW?F@ehi;VZ?OvQq@$$ zMNLo&$h5F5Mb!0EBN-+N+lEzioa2MK$6SsgemQ zP**aB08dZAcF>M2G=fyGi8%O@F^@ocb?K^+-cdqAN%*o!S5i-G4E7y0Bt14AK1M5E zwSTE70sypdV{!IS>P^@F1<|ptv#&~DlIlCFemdEb&6^350 zH$Kv@y0sh+aF17xijq`u*;LnMC;tGYr*+zFYRx{eL|Ot}olkhBNA*O8QdZjYQny!M54t0{ayRx6qQnC z`GqZHTS)|w%Dq0+Y_2~LG5WOA?#T5eL#xxA55lfNfmx?51QfjrtreM()`fYXvhsTQ z=f1S>*;%~us2pW+-@`RZr4{(`Zpb^AX)u&F)RtpaLK&+@TGNF{2zkbp*Ciu8f!2y} z@$C||_V?LU!^aml-ML)6S8l4_*qfe*MscWBN`=)zn(elU(d5(uTK7>B40o2YtSBg@ zB&=gxOyR@YD{ySTv_$cvSBW*+4b^#74f}0Hbx%9|UEI<=)>S!_j0v-;@C;X482ux# z&nH!k)n3V8Sy@psL|El1EKOl@(}^K6MuPjXjTj4l(t>>0>Rk7WvTh!ShgKT!tDMwD zHAG+%Mp--#5?L-Sp=M~N02247YXAoS0Hy^hXE{Mqxj-O=_riuc9R0tyPrauof`t!= zf)6myT=eQbf4^GSw$*wq`D|J@#ji0{3tsr3({5XGdy(YBT&hh{GjgLT=rdYv=&pv` z0HwqwLmjoX7Ofz#+7_$;I*<=ABcbRs)3%kR%mC8*wqOW1*n?{k>Ikt1(BBOFYV^@X zEKlWdSxTOugQb*?p@RYl>Ifj%i(^#1rd&y0TqN*EzC1{6{i=(;^V<7S%C!cV_dmJC zmo@fjh^$ls2QuJ8RJ6!-BLt<40-odYd)y7dytiidyEjJv0ItfpuYJL|YIk+nUz*`u znx$&9AyTEtJ%2{ZN`e|d_*-qXAs{6qU$AEpTR~6a17J6sWNJxh!`&UUyey)p!V59v z*JzU=L6WebM=MhtVb76kI{bcbt+%diW#4k`&B*f(SFCG>w`f)s6~wl=2XBAF>{ zK8}wvwZ|$-hx+*P)6EMP&1b2oxss}$E>oXGW?FwgD zjZf(6Im}WJ285nfGEl`n>|loJbDj3BZ8#!E5pd> zRgje)zGtB8qlyYql%YKVInTra?d8`xvq?#00U)VuuL^91bwNEqBh$X5AxBQQiUthb zY=6`FW6RAFypoip9-VS>G1Pi_>*MV$)B*=or?@%h`~Lve(rLu!;mJr&a7UrR@A>PZ zqc-E`3FT%u8CHHJ5;~5ani@dgrLmLKb8tHR{NEPUMs=2wu*p$a<|iYV0sTF5pZI8~ zl91=<%KrdWI4I=+9-U5n^>R}MK}ZYAdX9qx9>n#~DTv%RIf782tmR4tM;JN4J-q(_ z4Q9ix3Jv!4+vn%=!b@sGii^s5K1nAjK=k?R!>^?s5Tt?E1F#D8?eaPe_f{05((%pP z3CB!!IsE+eIeE7h5~6YlE+nU>dLD#&lb``Tdf?h^useMG^ub9!D*4i&pau#$1oL(6 z*RH9`bdZ#z2_q@!a7iN?^x~D_EHv6v$}$FUNdu-7Ji2PgCO8(K87V4Ch~*-W6I?)WQkNlxJqjl}nQy;^)T4hNZMtu2cFjQjyGc z42C2iI$4n0jYO0jVb>XOhkPjwmL3h1oVLFW#o&&h;E!ENYQf$Kd)>pH)ovwJ1>CW% zkz?Je30hM1(_tZtLb~f}aVZj6kliMiP;Jhs@v2V)g{4H*ejw$A^9+MEQRIlt1D&s_ z)g+7GYey*b1&2~?j*|K}<}t^f=Gk1$rKXN5n8$CcV+^hFywvOe0Cn%>vDXSMbklb$ zaOtWgw&qN?E3ptTLygpE%coRS(pCD%_qr!4hfJw|5y=^TDYfM#UiO0Hi&J8rhSId4 zhKq!$2;}NHojk;MA)q<~tv1|hqUgJmK&>Ev-Ey5)wq>XSaO`4kI!7u1$Wok(RcxpX zB`*$R*IDf<@p>v*d6jsNMDXNCL&0Gxa1{7xQj!i)l_V=Yf|bfoO*Wch$xkp{ofp^j zK#czKxAy~a*4XN~YgJmlnaF2`NeH>M#Es7Ydf8u1$EG$CpIN}Y9TQbFe{DkPqy9A~zeTeEQ%%TgbZangp94#y5K_R}zQ34JsCZ7b+uSLdX~+If>Aup&rV3DaE(3lVCT(byD@=`lAbmeZ`)s4$ijN zrc0^pU2?vh_>H}6#9F59sd>b;`f4bXPaZLJQQJ;+8Xh6|THlTq?loHb>$eq4O{tRP zLZV#g4Oe#h@9-A!OP0OqP79~j3YlZZ5zCFtZMC6KMQD&UK04AHj_dCghZzi@PHZ58 z0u+|ooY!nTl&vXP2P#1r9LX8MuFHCZblcU7Zt=G0H?5&?MpP@R&$_8p>ixHI)0k~x zE>vjsRveD)Mmq)K#DIjzLKe1~eUebL$+F%is;AQ(NA}28-)P!J9RXLdy}IdO)*e+T z0640+kHeggJQ7qz7wDY9_Y%UOM(wxvu-#OWPuo))ZXL^#Z4Dk5J)<0C@Y^PpYwfn= zNxkfpI+ohnJ=jB+-H4`;(i!k62B|GI3pGMIIZ(Px_+h?cpxTb4ZL*%$?WeCnp?@iD zwZHgEu2s~;NcW9)pH{uNcDN=u^TtF}zBzcI_Id7gYlki>HuluseYQf^Ox)d-zJ;4}zfrcOs#Gabt((S@)Yvkg@SAza z@#`#1Va`y8n2fTQT6wCHEZz|=PfZnNT9DF2(i&Qg7aE-yB(X^1;N8JOJf>tPYUXLU z_ko@itdM3IIADTF3r!8INL6wK(6B%5+{OS5!CKqRYi~Ce-nngRP0MLq)ElbNtheLQ zE_+(DPq{6++b^IjH%_lm=06$Nf)o_vNOZi;KzXzijc2b{%!ZVOFPM~kDq4q8$^cI) zjyZtopY}i}IXa3j5F1B$a9?86J)~aC4bQIGd@}AGyJl`i+Q=UZ)Ba`$6w?5)C) zY_U^KS}nZ&+e3?2dXo;M^S&(jEx9FPJC9}Z!kZEgya!2-*2E*HimC~@)YCI1nRH7W zfGIIc9nF|us+Lo++Ut8OhI7@=+DN^P>8h#KU6kF?k&cyk+$g=su>>g_00_Cp*KL&+ zCEIXIr%9z;6~A`3ZW_ZBYgOb#u2iK`Y0k=GELU8j)G(zjw5h}+)!ziaL-=R==zQ|>CfHQYPPF3H+`&Z*lr zl4GW1q}Y<`662u)odT!K4n94qd&k3u_3sxAyJ=>^wxv_{?yG53w^23ps`ZIi+-ohj z>2JdGQ+Hm zQ!AEJCoe*kx;(d1jc(!aC&b;GQNQQjjak(u}TuU73_y3?Oo zV(f9s_Vr7?YSEZ(+GIU&R3y|KTM!o9X{w8VpX~D9x=kAIrdQ~2>DSe_b6RS4yf+(a zT-lmEfb9c`$9D>`a^Fqei%T_nHQ&QE{Yh{~@nW?$$gES{adY3JGdbpy#|5{$w#O8U zymsl!VxLsHw{wYGA~YNBRI0o^?A%@;EX%8GDD6vYZeNX9piq%tx=mq;%~Kh!)1tg% zR4A1+K#wk+OWIRqO}c3lqUI!oZ6ed+4x0k)6RpeFjZMe8t=ac|V`8ch zsR#0zf*=!gY-_P?zE7>)V{<9XOkQCn5%O(`;`YD&7tG{k73m%yQwR3J$mD^#f#>Cw&3AYXve&4ZT*-)6bZHW=M zC$`v?N%yI9UY&l_Ca%1yZ9b7gh-48JT}R9>)8pLRb8o}pYyoQv{QU2RYCp5bbA_9I z*Q>jSvv%#pYHpUvZOsbbnYs2f`W5*PdaOOyy{Q*ft$WgLSK?Knq207aG9wV0ne~N6 zWmYGT5@o+KE3G|)!Cw0Aj`40b$XSrAY4?`bUO&bC(KdeOSeE^q_2%{Nox7!5cFpH- zSEAFe8r4eb53@;&OMYC6voNGfr?)06E;^m8YuZO@ySU9=mj=piCB<&huN{WItoA4I z4F&znpj|vZZHE$e)r)XR+zO7!Nu^Y(v3Ea+2p2p?+O*-)*^jpIC~~QF15le*3AT-nQ?b8Sbr8)|o6$hX?v*j8Q5Zr)oZxQ6-L_byw+ZCzG1<3}-NRH4=5 zvqhvkJ=qORizb?uRT1@V71UnB=KXqh?fgG>Gv(Xo`C-buJ)4`ycJFn$x0@|*+c2q@ z{iU_{9gxNU0J>I1nz^yBr#8QC=`|^pE84vYxNO(=zWJL)pfc*x{XzOQO~|Y&pGuc4 zrsIYl9d>_s_PW0=^gEQsV%EDYdR38a+>eO1?`@;y{dL^@vpc0vASF`)h~+Gg+tgIaZ0tfx(?q| zu6i#Ecdp9cI~@+Cf7X&#P?I@eI}^7T zCAl|iD%YL%#q^EJ+MB(-#D{L$_EqTK+upl%8l!kvj&0>eM&U(>i@;SOM~_~hAvFpl zbj>vgD}Eb?0xe2!osK>-_PbFJtrn0E}(r(ZD^6L;f}mH-;WK?w{iKhP|cT zn^;os8ajWCI)>mKxc(7tg|+VdB}(Mk$|vx?rSB1A{baw;G2`74xm@veE{C$aBT*b5 z)gQOFx~m_0tewnV@n+iBotHZ4ymvOtxNlop&Y}6JCAp!G6=W> z=YNN$F-|IWqKmPdMDF&`P(OrCQ?~Z=UGG7eb=!3)DP&fx+m@+IroxF{uTd*1 zpGcQeg$f)hoQflr2vH)%lG6>XSh#`RlfGNQdhUWK3bmqKlIg6{ZRcw*T$3pD3wDP~ ywe8q7OO8Y+s<>-Np;2kx{X9g5iIWTRT7?a_Q5B`E6*oFY-MVzaw5i|MAOG2PSm-YR diff --git a/source/blender/src/splash.jpg.c b/source/blender/src/splash.jpg.c index c1ca8b575e6..440f4f763e6 100644 --- a/source/blender/src/splash.jpg.c +++ b/source/blender/src/splash.jpg.c @@ -1,2483 +1,2281 @@ /* DataToC output of file */ -int datatoc_splash_jpg_size= 79258; +int datatoc_splash_jpg_size= 72804; char datatoc_splash_jpg[]= { -255,216,255,224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 72, 0, 72, 0, 0,255,225, 0, 22, 69,120, -105,102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,255,219, 0, 67, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, - 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,255,219, 0, 67, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,255,192, 0, 17, - 8, 1, 15, 1,245, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1,255,196, 0, 31, 0, 0, 1, 3, 5, 1, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 7, 10, 3, 5, 6, 8, 9, 2, 1, 11,255,196, 0,103, 16, 0, 1, 3, 3, 2, 4, 3, 4, 6, 4, 7, - 11, 5, 9, 13, 9, 1, 2, 3, 4, 5, 6, 17, 0, 7, 8, 18, 33, 49, 19, 65, 81, 9, 20, 34, 97, 10, 21,113,129,145,240, 35, - 50,161,193, 22, 23, 24, 66,177,209,225, 25, 26, 36, 40, 51, 56, 73, 82, 98,232,241, 72,104,105,136,168, 41, 52, 57, 67, 84, 88, -120,150,178, 37, 38, 68, 83, 87,115,130,135,147,152,181,200,210, 54, 89, 99,114,146,184,213,214,215,255,196, 0, 29, 1, 0, 0, - 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 5, 6, 7, 1, 4, 8, 9,255,196, 0, 80, 17, 0, 2, 1, - 2, 4, 4, 3, 4, 6, 7, 5, 7, 0, 7, 9, 0, 1, 2, 3, 4, 17, 0, 5, 18, 33, 6, 19, 49, 65, 7, 34, 81, 20, 97,113, -240, 8, 35, 50,129,161,209, 21, 66, 82,145,177,193,210, 36, 51, 98,162,225, 9, 67, 83, 84,114,130,241, 52, 56, 68, 85,116,148, -211, 22, 23, 24,115,131,146,147,180,181,255,218, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0,159,198,150,150,150,134, 6, 22, -150,150,190,100,122,143,199, 67, 3, 31,116,203,220, 60, 68,108,181,171,123, 70,219,170,254,224,209, 41,183,140,167, 25,101, 20, -135,189,241, 73,101,249, 28,165,136,243,170, 77, 69, 84, 74,116,149,133,163,149,185, 15,180,226,185,211,132,158, 97,151,159, 35, -212,126, 35, 92,108,227, 63,131, 43,145, 85,251,143,120, 54,213, 18,235,236, 86, 37,191, 87,185,237,148,243, 72,170, 67,146,224, - 11,147, 81,162,128, 57,167, 69, 42, 5, 75,143,213,230,242, 75, 94, 34, 50,148, 86,158, 42,113, 39, 27,112,159, 14, 38,119,193, - 60, 55, 23, 19,212, 81,204,173, 89, 4,134, 67, 34,209,128,198, 87,130, 56,138,188,146, 2, 0,242,151, 49,169, 50,114,101, 1, -128,179,188, 40,225,158, 7,226,222, 37,108,143,142, 56,150,110, 23,166,172,133,150,142,120,196, 98, 54,173, 44,162, 36,158, 73, - 85,146, 56,200, 44,124,193, 4,140, 4,124,232,139, 41, 61,145,109,196, 58,132,173,181, 37,104, 80,200, 82, 72, 32,131,243, 26, -247,174, 11,240,211,199, 61,219,180,206, 66,179, 55, 36, 79,186,108,118, 29, 68, 54,166, 58, 92,122,228,181,217, 65, 13, 22,219, - 47, 30,106,157, 61,174, 95,242, 14, 16,243, 97, 37, 45, 44,128,150,181,219,219, 46,247,181,247, 6,129, 2,231,180, 43, 48,171, -148,106,139, 65,216,211, 33, 58, 29, 65,232, 57,219,113, 63,172,203,233, 86, 66,219, 88, 74,208,160, 66,146, 14,147,240,211,197, -174, 19,241, 67, 46, 53, 25, 37, 79,179,102,180,202, 13, 86, 95, 49, 2,166,156,244, 38,219, 9, 97,213,178,207, 29,212,220, 7, - 17,201,120,194,158, 38,248, 69,197,190, 22,102, 66,159, 60,166,246,156,166,165,136,165,204, 33, 4,210,212,142,160, 95,115, 12, -218,119,104, 36,179, 11, 18,134, 72,237, 33,202,244,180,180,181,103,226,173,194,210,210,210,208,192,194,210,210,210,208,192,194, -210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194,210,210, -215, 13,125,163,254,220, 13,158,224,130,240,159,178,214, 5,156,238,249,111,173, 45,150, 21,116, 81,219,173,155,110,200,219,199, - 39,194, 98,116, 8,215, 53,192,138,116,167,170,213,245, 68,151, 17,255, 0,171, 32,177,132, 50,233, 76,186,132, 39,249, 26, 91, -214, 67,195,217,207, 19,102, 9,149,228,116, 47, 95, 90,224,177, 85, 42,161, 80, 16, 11,200,238, 85, 35, 64, 72, 5,157,128,185, - 10, 46,204, 1, 98,226, 46, 38,200,248, 79, 45,124,219,136, 51, 20,203,104, 81,130, 6, 96,204,206,237,114,169, 28,104, 26, 73, - 28,128, 78,148, 86, 58, 85,152,128,170,196,119, 43, 75, 80,124, 63, 73,159,141,131, 84, 83,195,103, 56, 94, 20, 82,242,212,138, -127,240,103,117, 13, 77, 44, 20,171,195,105, 85,127,227,115,194, 91,193,101, 37, 75, 16,146, 20, 1, 1,180,147,204, 58,247,192, - 39,183,219,102,184,168,189,173,253,156,222,171, 32,236, 38,233,221, 18,227,210,109, 58,154,110, 6,238, 13,182,188,107,111,132, -162, 53, 29,138,204,184,113, 36,218,181,233,114, 84, 26,131, 10, 91, 82, 88,144,233, 68,118,234,107,152,244,120,206,205,115,175, - 7,248,243, 35,161,151, 49,169,202, 86,166,150,157, 75,200,105,230,142,102,141, 64,185,102,140, 17, 33, 10, 55, 98,138,225, 64, - 44,108,160,156, 64,178, 47, 27,188, 58,226, 12,194, 28,174,151, 57,106, 90,186,150, 9, 16,169,134, 72, 82, 71, 38,202,171, 35, - 3, 26,179, 27, 5, 18, 50, 22, 36, 42,130,196, 12, 72, 35, 75, 94, 80,180,173, 41, 90, 8, 82, 84, 1, 73, 29, 65, 7,204, 29, -122,213, 97,139,107, 11, 75, 75, 94, 29,117,182, 91,113,231,156, 67, 76,180,133, 56,235,174, 41, 40,109,182,208,146,165,184,226, -212, 64, 66, 2, 65, 36,147,128, 6, 78,134, 6, 61,233,107,140, 28, 63,123, 94,236,238, 39,253,160,119,151, 9,219, 61,108,210, - 43,219, 63,103, 88,247, 29, 77,157,231, 77, 86, 91,178,239, 43,178,215,171, 80,169,213, 69,219, 84,214,227,166, 57,178,252,106, -195,236,197,150, 92,117, 83,126,173,247,214, 23,238,178, 89, 3,231,181,219,218,129,127,123, 56, 15, 15,137,177,182,194,209,220, -115,188,169,221, 85, 85, 13,213, 86,172,210,254,165,254, 47, 78,219,136, 94,225,245, 74, 79,188,123,199,240,222, 95,139,226,126, -167,184,183,201,250,202,212,182, 30, 7,226,105,179,220,183,134,191, 71,242,179,156,218, 1, 81, 12, 50, 72,136,121, 70, 41, 38, - 5,203, 48, 17,183, 46, 39, 37, 28,171,130, 52,149, 12,109,136, 92,222, 32,240,164, 60, 61,154,241, 87,233, 46,118, 69,147, 78, -105,167,158, 56,228,145,121,162,104,160, 34, 48,170, 90, 84,230,202,138, 36,140, 50, 48, 58,149,138,139,227,180, 26, 90,134, 23, -247,207,155,251,255, 0,155, 30,209,127,235, 93,227,255, 0,232,210,254,249,243,127,127,243, 99,218, 47,253,107,188,127,253, 26, -152,127,247, 29,226, 55,254,233,139,255, 0,155,166,255, 0,234, 98, 19,255, 0,226, 11,194,239,253,245, 55,255, 0, 37, 87,255, - 0,210,196,207,116,181,166,252, 3,241, 57, 89,226,255, 0,133,157,171,223,235,138,219,165,218, 85,203,250,153, 89,157, 81,183, -232,178,101,204,165,211,157,166, 93, 53,202, 3,109,195,147, 56,120,175, 33,108, 82,154,113, 69,125, 66,221, 80, 29, 0,214,228, -106,172,174,163,168,203,171,107, 50,250,180, 17,213, 80, 75, 36, 50,168, 33,128,146, 39, 40,224, 48, 36, 16, 25, 72,184, 36, 30, -160,219, 22,246, 95, 93, 77,154, 80, 80,230, 84,110,100,163,204, 97,138,120,152,130,165,163,153, 22, 68, 37, 88, 6, 82, 85,129, - 32,128, 71, 66, 47,133,165,165,165,173, 92,110, 97,105,105,105,104, 96, 97,105,105,105,104, 96, 97,105,105,105,104, 96, 97,105, -105,105,104, 96, 97,105,105,105,104, 96, 97,105,105,105,104, 96, 97,105,105,105,104, 96, 97,105,105,105,104, 96, 97,105,105,107, - 3,168,110, 45, 6, 60,249,116,122, 75, 21,123,182,183, 5,239,118,155, 75,181, 41,174, 85, 12, 9, 92,174,168,197,170, 85,150, -166,169,212,105, 67,194, 32,183, 54,108,117,130,164,229, 32, 40, 29, 12, 12,103,154, 90,104,166,239, 21, 38,143, 91,167,219,119, - 13,169,123,209, 43,245,152, 83, 39,208,233, 9,165, 83, 46,121,213,134, 41,225,159,126, 83, 12, 88,181,170,177,130,134,188, 97, -151, 38,251,171, 42,228, 95, 35,139,228, 86, 47,143, 95, 53, 54,130,157,111,109,119, 6, 76, 70,208, 28,118, 91, 44, 90, 40, 45, -183,221,106, 77, 58, 85,222,220,217, 43, 74,114, 75,108,197,113,213, 99,149,182,214,178, 18, 70, 6, 28, 29, 45, 88,232, 23, 37, - 18,231,136,236,202, 36,244, 76,110, 60,135, 33,205, 97, 77,191, 18,125, 54,115, 56, 47, 83,234,212,201,141, 55, 38,149, 80, 64, - 82, 10,216,146,211, 78,164, 45, 36,160, 5, 2,111,154, 24, 24, 90, 90, 90, 90, 24, 24, 90, 90, 90, 90, 24, 24, 99,120,143,168, -110,117, 51,103,174,233, 91, 65, 29,201, 23,200,138,203,116,255, 0,119,109,167,170, 12, 69,114, 67,104,169, 72,165, 50,240, 40, -118,166,136, 69,226,200, 32,144,175,137, 0,184, 17,174, 20, 60,223, 25, 18, 95,121,199,215,190,238, 72, 83,138, 83,202, 92,139, -187,156,186,165, 18,178,175,210,126,183, 54,117, 36,133, 36, 40, 16,160, 8, 61, 8, 35, 32,253,218,208,158, 40, 56,198,176, 54, - 85,185,246,165,163, 22,151,119,238,105, 66,153, 92, 54,212,151,168,214,187,171, 78, 67,245,249, 12, 43,244,179, 83,148,148,194, -109, 65,206,185,121,108,167,148, 47,157, 60,116,224,190, 27,204, 99,139,140, 56,175,196,124,203,131,114,188,170, 14, 66,193, 75, - 56, 17, 77, 38,167,144,114, 96,182,185, 42,165,190,146, 16, 51, 50, 70,132,233, 84,102,199, 72,120, 15,198,220, 77,151, 75, 55, - 7,112,151,134,185,103, 26,102,153,172,252,246,158,170, 2,101,134, 61, 49,198,121,211,223, 68,116,145, 17,172, 23,210,170,242, - 53,139, 51,170,227,143,215, 53,223,196,133,153,238,191,194,219,167,117,237,195, 59,196,247, 52,214,107,151, 20, 5,201, 13, 99, -196, 83, 45,200,148,149, 45, 41, 42, 0,144, 49,147,140,231, 88,195, 91,199,188,114, 93,109,134, 55, 39,112,100, 60,226,194, 90, -101,171,158,186,235,142, 44,159,133, 40,109, 50,201, 90,179,216, 0, 78,177,155,198,244,186,247, 18,225,151,114, 93,181,137,181, -218,221, 69,209,207, 34, 82,202,131,105, 39, 13, 68,134,194,112,136,145, 17,156, 33,166,210,148, 36,118, 25, 36,157,221,188, 47, - 45,145,246,104,112,186,239, 19, 59,221, 70, 93,217,123,214,159,133, 73,179,173, 8,106,140,213,106,227,187, 42,177, 94,153, 78, -181,233, 18, 37,182,177, 72,167,177, 22, 51,207,212,167,150,214, 25,110, 59,132, 37,229,170, 52,119,121, 7,194,159, 15,120,203, -198,222, 60,159,134,248, 23,136, 51,106,108,146, 23, 75,212, 85,212,201, 45, 66,164,141,162, 37, 49,195, 36, 81, 52,243,178,187, - 44, 97,214, 56,145, 92,188,204,177,150,110,196,241,107,196,110, 10,240, 51,128, 32,226,126, 62,225,252,162,167, 58,153, 28,251, - 61, 37, 52,112,211, 51, 70,161,230, 97, 36,209,203, 42,211,192,172,138,210, 20,105, 37,118,141, 82, 21,105, 2,174,163, 72,218, -189,222,170,162, 69,126, 85,135,123,206, 76,183, 23, 46, 77, 77,218, 13, 81,227, 33,199,137, 91,146, 29,120,199, 37,106, 82,148, - 73, 81,238, 73, 58,203,118, 91,127, 55, 47,135,155,149,114,173,233, 18, 19, 1,201, 8, 23, 5,159, 86, 18, 27,166,212,210,217, -229, 80,122, 50,192, 84, 10,130, 81,144,135,219, 1,196,246, 80, 91,101, 77,171,150, 85, 47,164,143,198, 35,151, 97,170, 81,118, -183, 97,169, 54,130, 37,133,179,102, 61,111, 92, 53, 14,120, 40, 95,195, 22, 93,192,171,133,185, 46, 62,166,176, 22,235, 65,161, -204, 74,144,218, 6, 18, 59,121,195,151, 16, 59, 31,237,121,225,250,232,188,108,251, 74, 62,216,241, 35,181,232,138,205,221,106, - 37,246,165,173,185,210, 97,201,126,152,244, 42,139,108,182,186,213,159, 85, 16,103, 34, 50,222,109, 50, 33,200,136,182, 92, 7, -194, 14,201,234,207, 16,126,128,222, 38,248, 71,147,143, 16,120, 59,138,106, 38,207, 50,127,174,217,162, 46,210, 29,204,124,216, -156,104,105,141,227, 9, 42, 77, 79, 51,176,134, 89, 64,146,237,200,222, 28,127,180, 43,194,191, 25, 51,195,225,207, 24,112,181, - 60, 89, 30,113,245, 32, 50,202, 17, 98, 29, 36, 17, 76,191, 88,176,139, 72,205, 19,193, 81, 10, 35, 77, 20, 76, 99, 32,118, 27, - 96,248,137,177,183,250,218, 21,123,106, 66,161,213,225, 37,166,235,214,228,213,160, 84,232,242,156, 78, 64,113, 41, 56,147, 13, -101, 43,240,159, 71,192,224, 65, 7,149,105, 90, 19,106,226, 39,139,222, 29,184, 78,110,198,145,196, 38,229, 82,246,206, 6,226, -214, 42, 20, 27, 86,171, 91,137, 84, 93, 38, 85, 78,151, 17,153,211, 89,157, 82,131, 5,214,105, 13,162, 43,237,171,196,148,182, - 91, 86, 72, 74,138,129, 26,224,102,199,110,133,115, 99,247, 86,135,116,199, 84,134, 26,129, 81,250,170,231,166, 5,148, 9,180, -119, 95, 17,234,144,223,108, 28, 41,230,185, 75,173,103, 33, 47,197, 65,236, 8, 56,167,210,118,170,198,173,240,251,194, 53, 82, - 35,168,126, 52,237,202,189, 36,178,235,106, 10,109,214,222,179,169,238, 54,226, 20, 58, 41, 37, 10, 4, 31, 67,171, 87,232,151, -199,112,248,245, 61, 22, 67,196,119,203,243,234, 9,141, 61,127,179,133, 66,234,105,230,150, 10,168,209,213,213, 57,175, 11,164, -177,216,133,120,223, 78,133,116, 11, 85,125, 48,120, 26,127,163,229, 30, 99,196, 92, 52, 23, 49,200,107, 97, 90,156,188, 84,150, -112,140, 42, 96,138,162,146, 87, 70, 70,147,148,147, 35,197, 32, 96, 89, 36,143, 86,182, 71, 38, 80,214, 61,247,102,238,101,169, - 68,190,118,250,231,162, 94, 86,117,203, 5,186,157, 2,229,183,106, 17,170,180, 90,196, 7, 74,146,220,186,125, 66, 35,138,110, - 83, 5, 72, 80,230, 66,136,202, 72,238, 8,214, 89,168, 64,112,175,237,189,221,253,134,225,159,102,120,123,225,163,133,105,251, -189, 82,218,155, 26, 53, 58,249,186, 43,172, 93, 53, 88,104,168, 59, 62,163, 61,244, 83, 40, 54, 52,101, 57, 18,156,216,146, 0, -149, 42, 82, 84,242,185,200,142,216, 71, 50,250, 53,193,103,210, 48,176, 55,151,114, 45,253,161,226,123,106,154,216,235,138,230, -171,179,111,210,175,154, 45,102, 69, 70,198, 98,189, 45,246,226, 66,166, 92,208, 43, 49,218,153,107, 54,228,197,120, 94,244,183, -101, 50,219,175, 32, 72, 17,218, 11,121, 61, 57,156,120, 63,198,153,119,233, 74,154,108,168,214, 80, 80, 73, 45,180,205, 3,212, -154,116,102,229,204,244,233, 33,144,107,140, 7,210, 20,181,143,217, 29,185,103, 35,241,187,128,243, 63,209, 20,149, 89,184,162, -204,179, 40,225, 7, 84, 53, 9, 74, 42, 93, 19,153, 2, 84,188, 98, 35,203,145,140,122,139,232,184,251,102,226,253,250,171,113, - 37,195,245, 6,251,107,107,171, 91,211,182, 52,173,200,122,165, 79,163, 51, 98,207,189,104, 17,110,183,106,213,101, 50,154, 93, - 53, 20, 39,167, 9, 42,157, 33, 82, 99,134, 90, 13,243,184, 95, 72, 64, 60,195, 47, 80, 32,128, 65, 4, 17,144, 71, 98, 53, 2, -158, 50, 84,211,191, 72, 26,128,243, 1, 10, 14,113, 65,195,147,232, 82, 80,159,137,193, 34,193, 91, 78,246,248,156, 5, 45,144, -174,224,164, 16,122, 13,118, 87,143, 15,111, 68, 62, 31,247, 89,238, 25,120, 83,218,134, 55,231,120,232,117, 24,214,189,203, 90, -170, 59, 86,145,107, 83,239, 39, 22, 24,122,204,183,168, 86,222, 39,222, 53,230, 36, 56,219, 82, 84,212,136,236,177, 41, 11,138, -145, 33,196, 56, 91, 91, 48,240,167, 51,118,225, 88,120,116,201,154,212,103,249,106,102, 51,243, 57,112,197, 76,172, 19, 86,169, - 89,130, 8,193,123, 6, 98, 25,182, 0, 19,182, 17,203, 60, 97,202,145, 56,190,163,137,196,121, 61, 47, 14,230,178,101,148,252, -190,100,210,213,186,151,211,162, 37, 82,237, 35, 4,185, 84, 5, 84, 92,179, 1,190, 36,133,165,168,139,220,190,218,255, 0,106, -111, 13,237, 80,239,190, 41,184, 29,183,169, 27, 89, 90,168, 69,138,228,225, 66,187,237, 23, 16,167,193,117, 20,246, 46, 35, 90, -169, 70,163, 85,156,101, 14,120, 77, 84, 34,149,172,182,172, 54, 74, 84, 7, 85, 46,223,109,143, 13, 22,231, 5,182, 47, 26,148, -171,102,247,187,237, 43,183,112,233,251, 83, 88,178, 40,166,138,205,225,100, 95, 50, 40, 85,218,228,250, 85,194,221, 66,123,108, -120, 76, 51, 65,115,145,214,150,161, 37,154,132, 89, 13, 39,195,116,242,177,215,248,105,197,180, 35, 47,120,168,226,205,105,243, - 57,189,158, 25,168,170, 33,169,137,167,177, 60,146,241,185, 8,246, 6,193,244,130, 65, 0,146, 8,196,131, 46,241, 91,131, 43, -206,100,147, 87, 77,147,212,229, 48,251, 76,240,215,211, 79, 73, 50,211,220, 14,112,142, 68, 5,227,187, 45,202,106, 32, 16, 72, - 0,223, 29,148,210,212, 92,183, 35,233, 31,162,243,160,209,233,124, 25,112,161,184,187,163,185, 51, 34, 63, 58,227,131,120, 83, -170,147,233,118,147, 44,202,113,150,152,250,163,111,196,153,119, 10,221,142, 27,116,188,153, 48,153, 96,159, 12,248,202, 37, 72, -198,248, 54,250, 69,151,109,251,190,214,214,200,241,107,178, 86,230,220,166,238,185, 96,217,113, 46,235, 45, 87, 21, 53,219, 86, -231,169,204, 77, 62,159, 26,239,181,110,153, 50, 30, 76, 37,212, 94,142,195,174,178,251, 78, 69, 46,135, 23, 29,196,133, 99,108, -248, 71,199,171, 65, 85, 94,249, 46,143, 99, 86,119,128,205, 7,180,136,210,247,113, 0,144,200, 87, 98, 84, 91, 83,129,116, 86, - 4, 95, 68,120,211,225,211,102, 52,121,116,121,233,147,219,157, 99,142,160, 83,212,123, 33,145,237,166, 51, 80, 99, 17,134,243, - 0,198,250, 99, 38,210, 50,144,109, 43, 29,120,113,198,217,109,199,157, 90, 91,105,164, 45,199, 28, 89, 9, 67,109,161, 37, 75, - 90,212,122, 37, 33, 32,146,124,128,215, 14,253,164,222,219,221,157,224, 86,233, 59, 61,101,218, 15,111, 86,249, 34,155, 14,165, - 92,161, 49, 88, 69, 18,210,176, 89,169,199,110,101, 41,155,170,176,220,103,222,151, 90,126, 19,172,190,154,124, 86,130,209, 30, - 75, 79, 63, 37,143, 17,182,220,230, 77,175,244,142, 56,132,142,220,122,222,253,112, 91,245, 86,205, 92,140,191, 79, 85,221,100, - 38,245,165, 74,102, 61, 69,151, 99,183, 46,153, 83,187,226,187, 77,174,184,128,224, 80,100, 59, 27,198, 13,148,165,214,201,230, - 8,229, 94, 22,113,190,113,150, 83,230,244,153, 69,168,170,198,168,121,147, 65, 20,147,169, 23, 6, 24,228,145, 93,245, 13,211, - 97,172, 88,173,193, 4,175,156,120,191,192, 25, 38,109, 81,146,214,231,119,174,163, 58,103,229, 65, 81, 52, 84,237,123, 17, 52, -177, 70,232,133, 78,207,185,229,155,135,210, 65, 2, 71,219, 95,199,191, 8,187,217,187,147,118, 59,104, 55,194,208,220,189,198, -166,208,234, 87, 13, 70,153,102, 59, 46,189, 76,133, 76,164,205,137, 79,158,183,238, 88, 81, 85, 78, 18, 91,151, 54, 58, 11, 41, -148,167, 73, 89, 33, 4, 37, 68,109,254,160, 19,244,127,110,123,126,214,227,115,113,175, 26,237, 82, 45, 14,212,183,182, 43,113, - 46, 74,213,102,160,164,196,131, 73,183,233, 85,139,126,167, 62,165, 57,121, 34, 52, 86, 32, 48,235,174, 30,161, 9,104,247,198, -186,103,185, 63, 72, 83,125,183,147,120, 38,237, 23,179,215,133,198,183, 45,182,164, 77, 98,145,112,222, 16,174, 10,229,197,113, -192,167, 58, 82,245,199, 30,212,183,230, 68,102,215,162, 45, 1, 42, 11,168, 75,116,161,181,165, 79,248, 14, 57,225, 53, 36,226, - 95, 8,115, 26, 94, 38,172,201,120,104, 61, 93, 6, 89, 75, 4,245, 53,117,114,195, 4, 81, 25, 67,146,100,145,185,104,163,202, - 74,160,212,224, 2, 73, 32, 18, 34,220, 41,227, 94, 89, 89,194,148, 57,247, 21,178, 81,102, 57,181,101, 69, 61, 45, 29, 20, 83, -212, 77, 48,132,160, 2, 56,151,153, 35,155,184, 12,231, 66, 18, 85, 64, 4,128,101,135,165,168,156,219,158,223, 30, 44,184,114, -221, 75,123,111,253,161,252, 36, 55,183,244, 42,247,131, 37,117,235, 78,155, 93,160, 92, 80,232,239,201, 68,119,171,244,186,109, -102,169, 54,159,121,211,227, 40, 44, 58,212, 57,113,220,230, 73, 71,139,226, 0,218,186, 89,198, 87,182,211,135, 30, 14,235, 27, - 75, 6,163,102,223, 59,171, 70,222, 93,176,167,238,197,161,117, 88, 18, 40, 31, 82,200,182,106,181, 25,180,248, 5, 70,177, 61, -135,125,225,126,226,183, 10,124, 49,200,151, 18,149,128,224, 82, 83, 20,171,240,211,140,105,171,114,250, 40,178,177,152,182,106, -143, 37, 52,148,179, 67, 60, 19,172, 66,242, 24,230, 71,208, 74, 13,202,146, 26,219,128, 70,248,152,209,120,173,192,245,116, 57, -149,124,217,177,202,215, 39,120,227,171,138,178, 9,169,234, 41,218, 83,166, 46,100, 14,156,192, 28,236, 25, 67, 45,246, 36, 29, -177,217,173,112,163,112,253,133, 28, 55, 95,188,105,212,248,162,173,202,171,215,108,187,186,163, 93,190, 47,125,152,175,202,157, - 87,160,214,183, 90,175, 85,141, 82,118,228,122,179, 46,114,165,201,181,228, 73,126,179, 50,101, 17,245, 57, 25,115, 93,105,180, - 56, 41, 5,116,160,202,240,191,237,190,220,158, 50,248,231,219, 77,158,218, 29,130,147,111,112,189, 93,145,119,193,184,247, 10, -229,165,214,170, 87,151,189,209,182,206,237,185,233,142,205,168,210,100,170,143,106, 52,237,203, 71,166, 71,110, 59,134, 83,174, -180,249, 30, 48,117,228, 33,185, 31,161, 92,200, 74,187,115, 37, 42,199,166, 64, 58, 74,170, 30, 49,240,218,181,169, 26,169,242, - 74,252,226,140, 25, 82, 41, 81,156, 65, 43,200,129, 36, 40, 91,149, 48,104,217,133,136,150, 59,130, 25, 75, 17,133,169, 38,224, -127, 20,232, 22,181,105, 35,207,242,236,146,184,136,164,154, 23, 84, 53, 16,164,110, 94, 33, 32, 83, 44, 44,178,170,155,131, 20, -182, 33,149,130,131,134,126,151,176,123, 71, 74,180, 27,176,226,237,253,162,205,158,136,126,226, 45,102,173,218, 59, 86,224,136, - 80, 27, 49, 69, 13,184, 98, 40,143,200, 0,228, 13,114,224, 99, 24,212, 4,189,180, 92, 57,109,223, 10,156,122, 93,182,174,205, -192,141,105,218,119, 45,169,102,238,133, 50,218,161,145, 14,159,102,213,171,255, 0, 88, 69,169,211,168,140,199,193,165, 66, 53, -106, 19,243,227,176,217, 74, 34,138,178, 89,140,150,163, 54,195, 77,254,136, 21, 90,173, 54,133, 75,169, 86,235, 51,225,210,168, -244,120, 19, 42,149, 90,165, 66, 67, 81, 32, 83,105,180,248,238, 75,157, 62,108,183,214,148, 70,136,204, 86, 93,113,199, 22,160, -132, 33,181, 41, 68, 0, 78,191, 57, 62, 35,175,107,151,218,161,237, 50,184, 37,109,235, 50,196, 29,229,220,202, 77,141,183,190, - 43, 14,184,170, 30,215, 90, 80,163, 80, 97,220,243, 97, 43, 10,140,219,118,133, 14,117,126,160,198, 73,109,217, 50,144,146,162, - 19,155, 39,192, 39,174,139, 62,226, 12,218,122,167,135, 34,160,161,145,235, 29,217,140, 69,217,213,208,184, 38,197,194, 71, 52, -154,236, 88, 42,184,189,156,131, 86,125, 35,211, 47,155,135,120,111, 38,167,164, 73,184,135, 50,204, 35,142,133, 17, 84, 74, 17, - 81,146, 64,132, 0, 66, 51,201, 4,122, 1, 10, 89,144,218,233,113, 61,206, 11,119, 14,189,187, 28, 40,240,239,185, 23, 75,138, -118,228,190,118, 83,107,110,250,243,171, 32,173,202,197,203, 99,208,235, 85, 53,168,134,209,146,102,205,124,159,129, 61, 79,234, -167,176,217,253, 55, 59, 75,100,210,182,231,110,237, 11, 38,133, 20, 65,162,218,246,245, 30,223,164, 66, 7,152, 68,165, 81,169, -241,233,212,232,193, 88, 25, 13,196,142,210,123, 15,213,211,141,170, 34,178, 72,102,172,170,154,158, 62, 77, 60,178, 59, 34,126, -202, 51, 18,171,255, 0,106,144, 62,236,116, 69, 12, 83,193, 69, 71, 5, 76,188,250,152, 98,141, 36,127,219,117, 64, 29,191,238, - 96, 79,223,133,168,165,123,119,125,170,238,209, 91,175,240, 39,195,117,192,235,151, 29, 77, 14, 81,120,135,190, 40, 15,243,187, - 74,135, 49, 41,105,123, 57,111, 76,138,162,181,214,165, 33,194, 46, 23, 26, 41, 49,152, 90, 40,225, 78, 63, 38,166,204, 61,237, -246,205,251, 82,224,240, 79,182,174,108,238,209, 85,161,203,226,135,116, 40,142,253, 82,227, 78, 37,255, 0,226,146,206,156,167, -161,191,184, 53, 54, 18, 8, 53,247,252, 41,108, 80, 99, 56, 82, 61,229,165,212,159, 75,177,161, 8,147,185, 93,236,136,246, 94, -213,106,214,149,199,198,255, 0, 17,212,217,179,238, 10,173,173,115,221, 27, 61, 64,185, 22,228,217,136, 85, 70,147, 62,106,247, - 98,229, 19,146,183,100,220, 18,214,234,221,164,120,203, 82,154,110, 66,170,174, 5,201,122, 11,177,110, 14, 3,225,236,179,135, -178,212,241, 23,140, 33,215, 71, 11,133,202,168,154,193,235,170,175,228,151, 73,191,212,196,192,178,146, 8, 37, 76,132, 21, 68, - 89,105, 31, 17,120,151, 54,226,108,214, 79, 12, 56, 34,126, 93,116,209,151,206, 43,214,229, 40, 41, 45,231,132, 50,145,245,242, -169, 10,202, 8, 32, 50,196, 8,105, 29,161,210,223,163,211,255, 0,132, 11,255, 0,169, 75,243,255, 0,199,236,141,116, 43,233, - 74,255, 0,148,224, 99,255, 0,154,226, 91,255, 0,107, 96, 53,207, 95,163,211,255, 0,132, 11,255, 0,169, 75,243,255, 0,199, -236,141,116, 43,233, 74,255, 0,148,224, 99,255, 0,154,226, 91,255, 0,107, 96, 53,106,102,159,250,197,112,231,255, 0, 5, 39, -255, 0,208,175,197, 59,147,255, 0,234,195,197, 95,252,124,127,255, 0,161,150,227,167,222,201,206, 30,246, 78,244,224, 27,134, -234,253,209,181,155,125, 93,172,206,219,232,206,205,170, 85,108,219,118,161, 80,150,239,214, 85, 36,151,101, 76,151, 78, 91,146, - 29,229, 74, 71, 50,212, 78, 0,235,174,142,127, 36,254, 28,127,249, 20,218,239,253, 65,181,127,255, 0, 21,168, 67,236,206,242, -251,107,106, 27, 11,183,118,135, 14,118,230,248,218,123, 35, 96,219, 49,169,246,138,246,239,108,225, 81, 63,132, 20,246, 12,185, - 95, 92,181,113, 85,232,203,170, 93,234,124,188,224,255, 0, 4,146,236, 21, 45,180,166, 60,100, 57,144,172,147,102,189,184,158, -209,254, 22,247, 41, 54,175, 17, 19,170,123,167, 72,160, 84, 35,193,188,246,187,121,108,216, 86,109,253, 75, 99,149,165,201, 68, - 43,134, 21, 2, 5, 86,143, 93, 49, 75,106,105, 85, 86,234, 49,190, 62,117, 68, 87,136, 87,168, 78,113,225, 63, 21,230,217,158, -127, 91,147,241, 53, 5,117, 75, 84,212,207,236, 81, 87, 72,103, 68,121,153,145, 24, 4,229,164,150,101, 82,174,202,138,219,115, - 58, 98,193,200,252,101,224,252,151, 41,225,202, 12,239,133, 51, 44,186,145, 41,105, 96,246,233,178,248,197, 59,201, 28, 17,171, -186,157,124,201, 35,186,179, 6, 68,121, 25, 70,174, 95,164,237,173, 75, 62,218,177,233, 17,168, 22,157, 22,153,111,209, 33, 37, -105,135, 73,163,193,139, 77,167, 68, 67,142,173,231, 17, 26, 20, 54,144,211, 9, 83,206, 56,178, 16,144, 10,156, 82,143, 82, 78, -178, 93, 49, 28, 53,113, 19,183, 28, 85,108,189,139,190,123, 87, 80,118,125,159,125,210, 5, 74, 19,114,219,105,138,157, 46, 99, - 18, 31,167,214, 40, 85,152,204,188,226, 34,214, 96, 85,226, 78,135, 45,180, 56,227,105,126, 18,252, 55, 93,108,161,197, 62,250, -231,250,168,106, 41,170,106, 41,234,227,104,170,224,119, 73, 85,193, 14,178, 43, 21,117,112,119, 12, 24, 16,215,222,247,190, 58, - 70,146,122, 90,170, 74,106,154, 41, 18,106, 58,136,209,225,120,200, 40,209, 58,134,141,144,141,138, 50,144, 84,141,172, 69,176, -180,180,180,180,134, 54, 48,180,180,180,180, 48, 48,180,180,181,192,111,104, 5,251,125, 80, 56,143,220,198, 45,253,213,169, 89, - 9,183, 54,167,110,238, 27,118, 11,123,151,122, 90, 50,220,172,139,138,158,153, 72,178, 45,251,125,102, 37,197,116, 63, 9, 82, - 82,182, 38, 6, 89, 68,111, 26, 95,138, 30,142,216, 47, 57, 30, 78,249,221, 99, 81,164,226, 6, 84, 47,168,169,111,215, 68,181, -129, 7,171,130, 78,246, 0,236, 78,216,215,169,168, 20,209,243, 10,234, 23,181,175,110,196,255, 0, 44,119,231, 75, 81,244,103, -138, 29,229,219,186,190,226, 38,204,169, 55,100, 67,220,238, 34,247, 45,250,213,217,125, 65,164,205,147,104,206,165,216,118, 61, - 94,129,106,212, 95,186,100,197,162, 91,207, 73,151, 86,156,153, 30, 59,169, 82,141, 53,244,196,109,181, 55,135,114,241,198,191, - 22, 21,107, 15,123,247, 58, 21,239,182, 80, 41,252, 61,195,225,246, 85, 90,221,164,217,177,110, 10,125,254,238,232, 42, 29, 18, -168, 34,221, 38,172, 62,174,129,245,162, 36,204, 82,163, 52,225, 82,101,134, 98,190,203,109, 37,110, 59,183, 5,230, 62, 70, 90, -152, 57,114,114,192, 44,206, 14,169, 36, 72,144, 16,168,246,213, 43,132, 6,228, 91,204,218, 84,223, 8, 12,198, 29,193, 70,184, -191, 64, 58, 0, 88,157,200,232,162,231,111,112,185,199,119, 52,181, 31,219,163,138, 13,215,187,247, 63,109,175,153, 87,125, 18, -185,126,217, 23,151, 19, 82,104,252, 60,211, 45,201, 52,233,150, 71,240, 34,193,174,162,217,167,220,143,211,222, 93, 66,233,145, - 84,147, 75,108,134,220, 72,230,113,130,136,203, 97, 74,115,194,187,218, 60,116,241, 71, 94,159,183, 22,253, 63,112, 54,166,175, - 63,117,119, 39,104,237,104,115,229, 80,109,233,245, 11, 49,235,225,117,154,109,106,149, 86,182, 45, 90,232,117,138, 91, 85, 35, - 79, 91,126,254,228,106,167, 37, 61,109,158, 66,226,214,144,220, 23,153, 8,213,214,162, 27,132,212,225,139,174,147,174, 69, 33, - 78,131,172, 1, 25,109,118, 10,194,252,179, 32, 1,136, 25,140, 58,136, 42,221,108, 45, 99,125,129,245,219,115,107,117, 29,237, -142,245,233,107,147,209,223,222, 43, 46,151,189,123,171, 87,168, 91,247, 45,193, 96,238,236,107, 86,163,184, 18,175, 13,204,135, - 26,223, 51,155,219,155,122,229,185,225,109, 4,121,171,160, 11, 66,149, 6,229,173, 86, 75, 18,101,144,211, 81, 94, 47, 30, 86, -130,245,116,153,197,253,205,104,175,125,224,212,119, 98,196,186,104,182, 78,217,238,236,253,159,220, 25, 80,109,250, 84, 61,204, -189,109, 75,111,110,106,180, 88,240, 28,129, 37, 16, 46,122,140, 59,158,240,173,209,164, 71,165, 4,181, 37,202, 9,253, 10, 30, - 67,199, 90, 31,253,157,169,144,255, 0,100,153, 42,109, 96,108, 24, 93,173, 25, 33,108, 27, 96, 37, 66, 3,232,144,141, 71,151, -101, 98, 20,246,180, 31,222, 41, 75,252, 58,110, 5,250,122, 30,151, 3,109,247, 24,234,110,150,185,121,125,113, 27,190,246,141, - 14,226,220,138, 85,122,149, 95,137, 79,221, 29,192,219, 42, 86,219,187,104, 69,247, 57, 66,135,195,181,213,186,212,122,171,149, -122,104, 85, 74, 93, 76, 92,212, 56,173,120, 13,169,182, 94,140,242,153, 95,134,178, 36,161,188,127,125,171, 86,214,225,238, 11, - 22,199, 16, 84,107,178,163,121, 39,108,124, 29,207, 68,141,169,183,108, 72,233,163,237,245,233, 92,170,211,106, 53,186,204, 89, - 52,202, 39, 35,139,138,182, 99, 49, 2,101, 90, 83, 81,212,194,240,184,239, 73, 25,143,134,171, 36, 66,194,104,254,198,161,110, - 97, 23, 14,138,202,199, 64, 11,164, 54,162,119, 6,214, 93, 86, 98,161,171, 35, 6,218, 79, 91,118,238, 9, 4, 11,239,126,158, -238,246,218,253,134,210,215, 23,168,252, 66,238,173,122,152,237,253, 54,243, 85,110,231,171, 76,225,138,243,161,236,203, 18,102, -193,102,123,213,219, 34,129, 34,173, 62,218,133, 2,172,137,173,218,242, 46,180,203,140,244, 86, 80,236, 39,101,213,208,220,211, - 33,228,132,186,236, 80,248,135,221,139,146,237,218,187, 18,214,222,123,102,243,129,185, 51,246,200,220,219,133,110,217,182,220, -151, 54,246,175,118, 89, 27,207,114,220, 59,126,196, 88,238, 61, 5,154,162,127,128,148, 71,161,179, 83, 67,181, 56, 13,161,255, - 0,172, 27,152,151,144, 18,105,120, 98,178, 37,118, 51,199,104,151, 83,147,204, 1,108,138,237,184, 67,125, 33,173,125,181, 16, - 66,106,107,129,133,173,141,136, 1, 79,155,167, 77,247, 32,119,239,248,119,182, 58,147,171, 69,118,187, 74,182,233,114,107, 21, -153,105,135, 2, 47,132,149,185,225,188,251,206,189, 33,212, 71,139, 18, 28, 72,205,173,217,211,223,148,235, 45, 49, 29,148, 45, -231,222,121, 13, 52,133,184,180,164,182, 60, 63, 94, 23, 13,249,180,118,173,203,117,202,141, 58,225,125,219,146,149, 84,168, 68, -134,221, 57,154,140,139,106,235,174,219, 34,165,238, 12,168,183, 13,217, 13, 81,219,121,198,219,253, 26, 28,125, 73,108, 37, 1, - 41, 13, 62,232,111,214,218, 88, 87, 53,221, 90,189,235,241,103, 84, 54,214, 35,223,192,237,191,166,243,212, 43,146,234,168,162, -210,230,214,174, 85,210,219,108, 4, 84, 20,139,146, 5, 54, 10,228, 56,219,108, 55,239, 43,109,212,137,238, 41, 44, 50,192,240, -207, 45, 59, 88,201, 19,178, 27,116,186,146, 13,137,182,215, 29, 72, 27,117,198,210,176,101, 86, 29, 24, 3,251,247,199,221,233, -222,106,181,159, 75,167, 84,174,234, 93, 66,210,177,231, 69,184,235,115,168,180, 74,161,155,188,183, 37,187,104, 81,151, 91,175, - 70,163, 80, 40,200, 81,166, 32, 83, 84,169, 82,149, 18, 91,178,216,139, 78, 83, 11,126,159, 42,107, 42,103,136,187,179,237, 34, -226,147,119,235, 63,197,223, 8,251,124,189,158,219,184, 97, 16, 40,176,233,212,196, 92,251,157, 84,166,150,212,167,102,185, 76, -180, 34, 77,106,221,117,114, 22, 2, 25,135, 45, 15, 52,181, 45,110,204,125, 71,175,108,182, 23,109,174,187,130,169, 84,222,157, -223,125,186,149,249,123, 65,247,101,210, 60,100,212,104, 54, 69,155, 36, 7,224,237,133,176,149, 2,203,148,166,146,166,158,173, -205,109, 3,235,170,160, 43, 86, 98, 69,134,211, 59, 51,104,216,150, 77,129, 77,110,141, 99, 90, 54,213,159, 74,109, 41, 66,105, -246,205, 18,155, 68,137,132,126,169, 91, 20,232,205,165,197,117, 57, 82,129, 81, 36,146, 73, 39, 78,217,109, 94, 95,150, 60,146, - 85, 80,254,145,169, 22,208, 11, 40,141, 58,223, 82,180,114, 93,186, 91, 96, 71, 98,164, 27,234,212,195, 81, 80, 21, 35,159,217, -227,223, 81, 0,150, 61, 45, 98, 25,108, 58,223,168,247, 17,136,175,109,165,111,136, 46, 22,110, 90,253,251,188, 55,190,238, 65, -226, 39,118,227, 73, 22,188, 43,214,173, 93, 15,170,216,230,151, 29, 53, 11,198, 13, 89,199, 26,118,108,119, 24,169, 38,135, 69, - 37,232,207,174, 19,213,119,127,239, 68, 64,213, 43,151,138,189,231,148,233, 93,203,191,247,220,103, 10,148,232,142,246,226, 85, -105, 32, 96,149, 21, 51, 79,141, 84,100, 37, 35,175, 68, 55,129,142,128,107,190, 92, 81,109,158,214,113, 35, 67,184,108,237,202, -102, 60, 43, 2,198,163,212, 42,247, 21,248,211, 49,155,173, 80, 37,183,202,252,118,173,218,155,209,221, 83, 79,170,117, 53,160, -227, 77, 36,169,228, 67,121, 32,178,242,233,207, 57,194,234, 71, 15,220, 39, 90, 75,109,193, 77,191,119, 2,124, 94, 96,220,151, -161,219,182,108,103,243,144, 18,185, 21,119,174, 89,106,100,163, 0,129,224,171,201, 60,131, 83,252,135, 54,165,204,160,150,105, - 50,197,106,184,152, 41, 60,176,194,223,170, 17,180, 5, 22, 29, 67, 58,155,146,119,189,240,193, 93, 73, 45, 59,170, 45, 73,228, -176,184, 26,172,111,176, 36,139,220,223,181,129,216, 91,107, 91, 29, 21,246,100,113, 47,186, 91,235,125,110, 4, 59,162, 92, 75, -222,214,164, 89,244,136,116,189,196,146,195,109, 87,221, 69, 6,164,227, 77, 68,157, 83,101,164,170,228,142,252,250,245, 93,166, - 94,150, 12,132,127, 7, 30, 90, 93,113,183, 73, 87,102,245,197, 62, 8,247, 59,106,118,179,113, 23,103, 90,182, 36, 75, 2, 30, -235, 85,168,116, 25, 13,199,172,212,107, 14, 87, 43,209,216,152,205,189, 33,239,126, 9,109,170,147,105,114, 75, 75, 16,216,138, -219,177, 93, 46, 62,219,134, 27, 74, 71,107, 53, 4,226,104,132,121,180,197, 40,197, 20,114, 5,101, 80, 0, 13,113,230,112, 20, -149, 23,107,139, 2,109,109,247,185, 47,153,107, 22,165, 75,205,206,101,184, 39,115,107,116, 27,128,122, 88,239,235,233,133,165, -165,165,168,254, 55,240,180, 29, 66,161, 2,147, 6, 93, 78,169, 50, 45, 58,157, 2, 59,178,166,206,154,251,113,162, 68,140,194, - 11,143, 72,147, 33,229, 4,178,202, 80,149, 21, 41, 68, 0, 6, 73,209,154,212,158, 53,182,250,255, 0,220,189,141,169,219,187, -118,235,139,169,181, 89,166,213,106,148,134,158, 12, 59,113, 81, 32, 51, 52,201,162,180,181, 16,149, 58,102, 59, 6, 74, 80,165, - 0,225,167, 6,243,149, 0, 88,184,159, 52,173,201, 56,123, 58,205,242,220,170, 76,242,191, 45,166,150,104,105, 34,254,242,162, - 68, 66,203, 18,216, 19,118, 35,162,171, 57, 23, 8,172,214, 82,253,194,249, 85, 14,121,196, 89, 38, 79,153,230,209,228, 89,126, -101, 83, 12, 51, 86, 75,253,221, 60,114, 56, 87,149,174, 85,108,160,245,102, 84, 6,197,221, 86,236, 52,131,138, 95,104, 4,186, -199,214, 54, 22,197, 77,122, 13, 40,151,161,213,183, 5, 41, 91, 51,234, 13,245,109,214,109,116, 44, 5, 64,138,174,191,225,138, - 1,245,164,254,133, 45,116,112,232,102,217,108,157,245,187,134,183, 88,166,198,146,138, 37, 30, 21, 78,171, 88,184,102, 54,243, -205,188,244, 72,207, 77,118, 44,101, 40,243, 79,168,186,180, 97, 88, 36, 32,185,206,226,129, 32, 43,100, 54, 19,129,203,238,248, -173,181, 55,114, 41,115,173, 91,118, 27,233,241,105,111,225,154,189, 85, 72, 80,230,100,242, 40,251,132, 63, 37, 44,159, 21, 64, -225,180,167, 62, 34,123,107,102,109,165,171,100,219,108, 91, 52,106, 68, 40,116,214, 97, 24, 34, 35, 12, 33,184,233,142,182,203, -107,104, 54, 7, 80,164,169, 92,196,228,168,168,149, 18, 73, 58,227, 46, 26,240,155,196, 15, 27,243,131,198,254, 48,212, 79,148, -100,169,175,216,178,205, 50, 64,197, 79,217, 84,129,142,186, 74, 91,129,173,223,251, 93, 72, 91,234, 0,172,216,237, 78, 38,241, -115,195,223, 3, 50, 97,192,254, 13, 83, 65,156,103,114, 20, 53,217,166,164,168, 64, 71,218,103,168, 81,162,174,168,169,109, 8, -159,217, 41, 75, 17,164,144,208,226, 44, 52,185, 13,195,169,211,165,188,142,118, 98,207,137, 33,212, 30,203,109,137, 13,184,226, - 8,249,165, 36,125,250,127,189,191, 59, 1,126,241, 15,193, 94,202,238,238,208,211,167, 93,244,109,151,184,170,119,101,215, 68, -161,176,236,233,235,179,175, 10, 4, 24,142, 93, 76, 66,140, 20,185, 76,211, 95,167, 69, 50, 66, 18,165,179, 30,166,244,130, 3, - 76, 60,164,211,226,127,101, 42, 59, 29,186,181,187,117,109, 62,187,118,168,251,213,155, 78,162,182,200,106, 93, 34, 91,202, 95, -186,135, 57, 66, 85, 38, 43,203, 84,119, 64,193,253, 26, 87,128,151, 18, 75,183,195, 79, 26, 53,221,151,166,139, 34,240,164,187, -122,109,226,148,224,141, 17, 46,182,154,189, 13,183,212,165, 72,102, 2,165, 31, 10,109, 61, 74, 90,213,238,238,148, 4, 41,106, - 40,113, 41, 37, 5,151,232,189,226,236,127, 70,191, 20,115,188,175,140,233,189,135,151, 83, 26, 73, 43,163, 50, 69, 61, 47, 62, - 45, 50,104, 12,254,207, 83, 5, 76,154, 39,141, 95, 65, 49, 74, 20,198,204,234,241,244,170,240,114, 79,164,247,132,249, 46, 99, -193,117, 94,220, 37,165,149,227,137, 29, 21,229,130,168,211,204, 26, 46, 97, 84,246,154, 89,233,163,215, 79, 35, 71,204, 2, 88, -139, 9, 21, 81,160, 87,169,110,253, 27, 78, 31,247, 14,201, 78,246,241, 53,120, 64,159,107,237,173,207,108, 82,237,139, 90, 69, - 85,167,160,179,114, 68,163, 76,149, 92,175,220,241,144,248, 79,137, 70,138, 26,139, 29,153, 56, 45,188,228,137, 73,109, 71,193, - 94,122, 95, 89,143,236,147,185,110, 37,110, 61,103,134,205,190,118,245,118, 71,214, 47,186,246,201, 80, 28,168, 63, 81,230,241, - 76,135,214,152, 94,233, 38,103,139,215,198,113, 69,124,221,121,181,134,239,223, 25, 43,190,109,119, 54,195,105,109,159,226,243, -110, 28, 97, 16,106, 24, 17,153,172,214,169,236, 0,134,169,158, 5, 63,244, 20,106, 55, 34, 82, 21, 29,165, 56,167, 82, 2, 22, -180,183,204,210,189, 25,241,187,233,237,225,100,220, 3,152, 80,112,253, 92, 57,166, 99,153, 70,182,130, 10,152,234,164,119, 86, - 89, 18, 33,201, 5, 97, 70,145, 87,153, 52,237, 25, 88,195,132,133,228, 42, 7,154, 94, 3,127,179,211,197,122, 79, 17,114,220, -207,136,233,166,203, 50,220,174, 70,250,249,233,164,165,141, 17,213,163,121,155,158,193,230,117,141,219,151, 5, 58,200, 30, 82, -133,230, 72,149,201,211,219,222,171, 18,185,121,221,181,168, 8, 8,131, 86,185,107,149, 40,105, 74,121, 64,139, 58,167, 42, 76, -127,132,143,135,244, 78, 35,167,207, 77, 71,183,193, 83,207, 4, 92, 7,166,161,226,120,232,185,171,137, 62, 46,121,194, 5,131, - 73,240, 82,160,174,160,134, 66, 7,221,173,145,216,173,173,169,238,230,227,208,109,120,108, 60,170,120,148,204,234,252,180, 33, - 69,184,116,136,238,161, 82, 57,156, 72,194, 30,120,132,178,214,123,173,224,113,202,149, 17,210, 31,105, 23,179, 6, 31,180, 15, -107, 54,119,111,211,186, 82,118,157, 59, 83,112, 85,238, 6, 95,131,103, 71,187, 17, 86, 21,122, 52,122, 72,130, 99,187,113, 83, -133, 57, 44,166, 58, 86,149,165, 78,133, 5, 20, 20, 12, 5,107,144,127,217,239, 11,228,156,117,155,248,159,196, 50, 53, 6, 69, - 81, 49,167, 14, 35,118, 89, 36,209, 81, 36,238,145,198, 25,217, 98,121, 98,141, 74,171, 13, 82, 58,223,200,246,236,191,246,140, -186,241, 7,135,185, 87,133,124, 53, 18,230, 60, 67, 79, 0,168, 49,153, 35, 86,142, 62,101, 52,112, 70,242, 72,200,138,210,199, - 20,210,176,118, 83,166, 56,218,223, 88,151,102,125,130,112,118, 42,169,192, 62,220,155, 3,248, 58,253,211, 14, 69,121,189,216, -141, 20,197,250,250, 61,248,229,122,168, 93,114,229,109, 39,197, 75,206, 82, 17, 78, 84, 37, 57,240,170, 2, 88, 75, 71, 8, 80, - 17,173,246,250, 13,156, 87,180, 78,224,103,100, 28,162, 63, 88,110,202,179, 25,220,245,218, 78, 69,118, 49,221,175,121,170, 25, -141,184,237, 53, 69,181,220, 41,161, 42,215, 76,222, 83,227, 38, 98, 92, 68,140, 74, 75,192,117, 38,227,250, 54,119,189,161, 79, -164, 73,216, 46, 46,110,123, 78,180,253, 25,154,101,232,154,149, 18,165, 73,135, 95,154,143, 16, 72,168,192,114,215,185, 18,237, - 62, 19,168, 82, 1,129, 35,223, 2, 20,149, 45, 50,202, 86, 27, 67,243,193,111,209,227,219,173,146,220,107,127,118,119,231,112, -164,239, 85,205,109, 84,218,174, 81,173,207,169, 81, 69,178, 35, 87, 35, 60,153, 16,234,149,118, 37,204,149, 42,232,125,153, 9, - 75,205, 33,229,199,142, 93, 0,191, 29,240,156, 31, 80, 50,110, 36,240,255, 0,133,248,167,136,120,250,159,140,167,206,102,204, -197, 81,139, 47, 20,147,199, 51, 60,242, 9, 52, 75, 52,159, 86,209,161, 80, 35, 44, 16, 5,210,199,204,186, 91,202,188,243,133, -252, 73,226,222, 17,225,159, 14,106,120, 26,159, 34,131, 42, 52,130,108,204,214,211, 75, 2,165, 60, 92,190,100, 48, 71,245,171, - 35,134, 38, 64,165,201,109,106, 60,175,173,120,101,186,226,227, 30,216,222, 31,145,113,169,212,222, 13,238, 7, 6,204,215,213, - 43,196, 18, 19,114,181,106,109,123, 85, 19, 47,197,202,132,164,212,146,231,141,205,215,196, 74,201,235,211, 90,121,178,118,150, -251, 86,248,244,118,209,176, 55, 14,149,181, 28, 67, 63,187,123,137, 77,165, 94, 87,124,150,160,183, 79,191, 68,251,137,138,172, - 71,101, 79,167,202, 75, 85,121,111,253, 99, 25,144,182,148,167, 95,150,150,144,124, 71, 18, 12,191, 55,139,216,145, 27,114,184, -246,164,241,181, 23,126,103,210, 85, 77,220,141,186,220, 36,237,202,118,242, 36,168,229, 86, 2,232,107, 69, 32, 92,230,240,109, - 65,169, 66,136,128, 94,247, 2,166,125,229, 68, 33,194,145,159,188,127,251, 8,246,135,139,155,230, 86,246,237,181,237, 81,216, -221,230,170,248, 18,174,153,244,186, 83, 85,171, 78,238,170, 68,109,180, 49, 90,169, 81, 81, 50, 35,244,171,136,165,166,146,236, -232,146,128,119,194, 75,143, 69,117,254,103, 75,214, 91,226,215, 8, 67, 22, 85,150,205, 86, 35,138,175, 35,134,138,121,205, 36, -147, 69, 73, 85, 26,176,229,203, 3,162,251, 69, 57,230, 48, 97, 30,180,109, 10,167,202,197,149,139, 52,240,103,141,106, 37,205, -243, 72,104,140,147, 80,241, 4,245,244,244,226,182, 40, 37,173,163,149,163, 60,200,170, 35,145,189,154,161,121, 42, 80,203,203, -117,214,204, 6,181, 8,220,174,226, 71,130,207,107,101, 91,105,167,218,220, 83,113,207,179,208,246,122,238,169,208,173,233,177, -183, 54,243,164,208,173,170,181,102,101, 69,135,109,234, 98,103,201,178, 88, 45,207, 85, 69,134,150,209, 67,168, 82, 61,221, 78, -173, 73,109,181,173, 58,117,197, 87, 1,155,253,192,167,179,178,235,160,238,229,199,101,215,173,141,200,226,147,102,174,107, 61, - 22, 93, 90,117, 86, 35,117, 8, 59,103,187,240,170,243,222, 92,168, 76,160, 38, 69, 61,202, 40,109,109,115,248,137,137,146,174, - 80,141,116,161,143,163,193,196, 46,228,213,168, 20,254, 34,120,219,187,111,155, 38,221,113,180,211,233, 77,199,185,174, 25,241, - 97,167, 8,114, 37, 29,203,202,228,122, 53,190,165, 48, 57, 82,234, 35,200, 8, 29, 60, 21,142,154,234,183, 19,126,200,187, 31, -124, 56, 36,218,238, 11,108,125,198,175,109,125,165,181, 87,181, 22,242,163, 87, 39,211,158,220,106,188,245,210,168,215, 85, 46, - 68, 42,129,170,215,224,171,196,147, 34,233,147, 37,110,182,234, 91,105, 81,195, 44, 70,109,146,148, 54,214,158, 34,228,185, 53, - 87, 15, 81, 71,196,212, 85,249,107, 87, 71, 81, 94,180, 57, 43, 81, 65, 18, 68, 85,227,149, 89,109, 43, 77,170, 53, 86, 9, 12, -154,144,144, 89, 2,128,238,210,120, 95,158,231,148,156, 75,152, 73,194,149,249,118,106,153,124,148,217,123,102, 25,242,215, 84, - 77, 36,193,146, 72,157, 90,240,164, 26,100,118, 66,243, 71,165,192, 96,175,172,152,216,127,163,207,182, 54, 85, 63,129, 26, 5, -213, 18,131, 1,186,245,225,121, 94,117, 27,146,168, 35, 51,239,213,105, 84,250,195,212,170,127,190, 73, 8, 11,121,152,244,248, -205, 54,202, 20, 74, 90, 10, 95, 32, 5,107, 39,133, 62,218,203,122,129,108,123, 96,109,245,210, 41,177,105,109,213,209,195,221, -118,176, 97,180,134, 12,218,147,149, 56,208,159,168, 62, 91, 3,158, 81,133, 78,134,130,179,241, 17, 25, 57, 61, 53, 47, 47,103, -175, 7, 75,224,115,135,139,127, 97,141,234,237,254,138, 5, 74,189, 81, 77,202,253, 13,187,113,201,102,185, 84,122,164,166,141, - 41,170,164,208,194, 90, 47,114, 3,239, 11, 42, 8,230, 56,206, 53,160, 92,119,251, 21,218,227, 43,139,138, 79, 20,201,223,169, -214, 59,244,232, 27,125, 4,217,141,109,212,106,251, 11, 22, 36,247, 38,120,191, 94,185,121,196, 82, 76,164, 44, 39,151,221, 15, -128, 83,205,151,129,228, 17,110, 24,227,108,134,131,196,238, 46,226, 60,195, 51,120,242,140,217, 51, 4,134,110, 92,238, 92, 77, - 42, 52, 0,198,177,153, 20,104, 81, 96,232, 2, 5, 0,233,176, 24,151,241,111, 0,241, 22, 99,225, 63, 5,112,190, 91,148,164, -153,214, 76,249,107,207, 8,150,157, 4,109, 4, 46,181, 12, 36,105, 22, 38, 58,216,234, 40,236, 92,177, 35, 85,201,196, 94,166, -255, 0, 4,227,251,102,171,138,226,141, 80,145,106,127, 43,106,227,151,155,183,111,130, 40, 41,134,253,197, 45,203,106, 77,100, -206, 72,103,248, 45,250, 74, 26,201, 88, 17,189,203,148,159,208,106,118,219,255, 0, 77,225,202, 23, 11,155,155, 59,120,151,101, -141,146,115,108, 43,142,220,242,235, 79, 83, 77, 2, 85,186,237, 13,231, 25, 76, 37,173, 94, 28,153, 78, 35,192,250,189, 49,242, -243,146, 21, 28, 67, 5,242,214,185,225,237, 10,246, 37,236,223, 28, 51,160,110, 93, 50,230,159,180,155,231, 14,139, 6,141, 84, -188,169, 20,168,245,170, 53,231, 14,149, 20, 69,166, 34,238,183, 93,151, 24,202,168, 48,195,108,176,204,230, 36,178,250, 35, 54, -134, 94, 76,166,217,142,134,185,163, 99,253, 27,221,214,159, 80,165, 91,187,205,197,181,110,187,181,116,121, 33,246,109, 11, 90, -155, 92, 73,125,180,171, 33,152,105,184, 43,142,194,160,169, 67,169,117,184,146, 84,156, 20,165, 25, 60,195,123, 59,206,248, 23, -142, 41, 56, 79, 52,204, 56,182,110, 23,174,225,202,104,160,154,140, 82, 79, 49, 38, 34,167, 93, 35,197,104,209,156,173,149,152, -146, 20, 70, 93, 84,165,153,191, 32,200, 60, 65,240,254,183,140,178,156,183,130,224,226,234, 14, 40,171,154,162, 10,227, 91, 4, - 0, 9,129, 81, 29,108,114,131, 35,162, 6,187,162,128, 11, 25, 66, 51,137, 46,188, 20,224,130, 37,122,161,107,241,207, 22,205, - 68,229,213,151,193,189,253, 34, 59,113,121,149, 53, 84, 40, 55,206,223, 79,185,147,150,134, 72, 22,172,106,177,123, 29, 60, 36, - 57,159,135, 58,112,125,151, 27,107,197,206,231,238,109,253, 66,224,219,124,109,173,154,220,132, 90,144,164, 85,209, 87,159, 18, - 13, 86,231,182,219,170,182,183,153,164,123,205, 6,114,159,102, 44,244,195,114, 64,108, 32,164, 58,218,149,148,246,148,183, 0, - 30,195,186,103, 4, 59,219, 95,221, 41, 91,210,238,236, 81,174, 43, 18,191, 97, 78,179,235, 27,115, 6,133, 5,234,101,126, 92, - 7,229, 25,178,149,117,212, 19, 61,159,118,131,224,173,133,199, 8,117, 50, 23,206,113,240,235, 95,184,128,250, 57, 52, 5,238, - 92,237,211,224,251,126,238,109,132,155, 34,168,253, 90,157,107, 61, 18,125, 66, 21,175, 38, 90,150,227,236,218, 87, 93, 26,179, - 18,165, 71,166,165, 75, 33,152,239, 9,107,109, 10, 40, 18,121, 2, 82, 39,213,158, 45,112, 93,125,119, 19,229,145,230,113,193, - 73,155,199, 76,244,245,181, 20, 18,212,211,115,163, 69, 71,134,162,150, 72,214, 70, 81,203, 66,172, 80,165,217,219, 82,178,174, -170,226,135,193,142, 59,203,114,254, 18,205,101,202,100,158,183, 36,150,174, 58,154, 26, 92,198, 42, 74,174, 68,178, 51,199, 61, - 45, 92, 82, 52,106,228, 72,225,215,152, 30,200,138, 85,149,155, 79, 63,120,152,246,113,123, 73,247,246,235,219,109,167,226,139, -140,141,138,188,175,178,213,122,187,181,118, 29,241,126, 64,166,221,115, 99, 73, 93, 54,159,112, 78,182, 41,145,237, 56,210,106, - 13, 56,228,106,115,110, 33, 60,254, 41,132, 84,218, 23,238,207, 41,173, 31,246,169,108, 70,229,240,207, 70,224,147, 98,119,114, -163, 71,170,222,187,125,195,213,118,150,252,234, 12,137, 18,233, 70,139, 43,118,239, 89,244, 56,177,164,203, 97,167, 29, 12, 68, -146, 91, 60,200, 72, 79, 32, 74, 71, 40, 26,238, 94,204,253, 30, 26,228,253,212,164,238,167, 22,156, 77, 94,219,207, 82,164, 79, -131, 56,192,167, 63, 93,167, 79,170,174,154,224,118, 27, 85, 91,234,181, 93,149, 83, 76, 20,173, 8, 10,106, 34, 99, 59,203,144, -220,182,137,206,183, 63,218, 81,236,103,137,199,254,225,237,141,254,141,242,159,182, 63,197,206,219,177,183,108, 80,227,216, 76, - 93,200,157, 30, 61,114,165, 89,102,162,106, 82,110,248, 10,142,176,154,138,153, 45, 22,157,230, 12, 37,207, 23, 42, 41,211, 54, - 91,226,118, 67,149,113, 15, 14, 82, 84,113, 37, 61,110, 65,151, 37, 76,179, 61, 46, 80,244,112, 67, 83, 36, 82,198,139, 2, 70, - 26, 87, 71,230,182,191,169, 81,168, 7, 46,218,138,163,238,105,225, 55, 17,103, 28, 53,197, 21,180,220, 43, 85, 67,196,121,172, -148,176,195, 29,102,117, 29,117, 68,244,145,205, 12,142,213, 15, 41, 72, 99,120,249, 43,203,250,242,218, 47, 24,141,116,134,125, -234,246,125,236,206,223,237,103, 9,155, 11, 64,179,173,250,125, 38, 3, 59, 97,100,212, 92, 17,163, 54,202,230, 85,234,214,237, - 54,167, 88,172, 76, 82, 19,151,234, 82,234, 82,100, 72,125,213,100,173,199,207,100,132,164,111, 48, 24, 24, 29,135, 65,166,203, -102,236, 37,237,126,216, 88,187,122,185,202,169,155, 50,212,183,173,113, 82, 83, 9,138,169,233,160, 82, 33,210,147, 53, 81,146, -234,196,117, 58,152,129,101,176,181,132, 21,242,133, 40, 12,150, 11,143, 78, 49,236,142, 6, 56,109,189,119,206,237,247,106,133, - 98, 35, 63, 80,109,189,164,235,165,183,175,125,198,171, 71,147,252, 28,183,209,200,180,173, 16, 18,168,242, 38, 84, 93, 65,230, -143, 77,165,203,121,176,183, 80,219, 78,115,121,134,183, 63,207, 30, 26, 53,122,250,236,222,165,132, 99,114,242,188,210, 27, 18, - 91,123,146,215, 98,214,176,185,107, 0,113,212, 98,122, 30, 27,225,232,231,174,100,203,178,252,150,145, 76,135, 96,145, 71, 12, - 64, 48, 1,118,178,133,178,170,222,230,193, 65, 36, 12,113, 23,233, 10,251, 69,127,139,219, 56,240, 51,180,149,207, 14,246,220, - 58, 76, 90,158,253,213,105,238,225,251,107,110,170, 45,166, 69, 35,111,195,236,175,154, 61, 90,224, 64, 68,138,131,100,165, 72, -161,165,182, 28,109,216,245,192,166,197,250, 63, 62,207,199, 44, 27, 45,238, 46,247, 46,142,166,111, 45,207,164, 38, 30,218,192, -168, 71, 90, 31,183,118,209,231,218,148, 43,105,105,228, 15, 10,125,126, 68,104,146, 26, 88, 10, 34,147, 18, 26,217,112, 38,161, - 37,189,113, 27,217,255, 0,195, 62,227,251, 81,184,218,174,223,155,197, 50,161,115,219, 13, 92,234,221, 61,253,186, 37, 37,214, -218,174, 63, 83,168,185, 34,149, 99, 68, 49,148,129, 0, 85, 37, 71,114, 43, 76, 50,166,145, 6,141, 74,151,238,188,134, 52,102, -151,250, 18,218,182,237, 58,213,161,211,168,148,168,145,160,194,167,196,143, 18, 60, 88,140,183, 30, 52,118, 35,180,150,153,143, - 29,134, 82, 16,203, 8,109, 41, 74, 16,144, 18,148,164, 37, 32, 0, 53,117,113,253,101, 39, 0,112,165, 23,134, 89, 44,193,243, - 42,197, 90,140,226,116,234,236,225, 88, 67,126,160, 61,151,202,108, 86,153, 34, 86,213,206,123,208,254, 27, 80,214,248,145,198, - 53,254, 44,103,208, 52,121, 85, 11, 61, 54, 73, 76,251,132, 68, 44,166,123,116, 38, 59,183,152, 92, 53, 84,146,178,149,228, 32, - 25, 10, 82, 18,144,148,140, 4,128, 0,244, 3,160,215, 62, 61,164, 30,208, 29,190,246,125,108, 68,221,193,174,166, 21,195,185, -183, 74,103,208,246,111,110, 92,144, 91,126,238,186,153,142,218,156,168, 84,144,203,169,118, 61,155, 75, 18,162, 72,171, 73, 65, - 65, 8,121,152,108,172, 76,155, 21, 42,223,186,157, 78,157, 69,167, 84, 43, 21,138,132, 42, 77, 34,147, 10, 85, 74,169, 84,169, - 74, 98, 13, 58,155, 78,130,195,146,166,207,159, 54, 83,137,106, 28, 38, 99, 52,235,142,186,226,146,134,208,218,150,181, 4,130, - 71, 9,184,174,225,239,128,223,109, 5,235,103,196,178,120,186,133, 90,187,118, 26,145,116,193, 93,191,180, 87, 53,159, 80,147, - 34,153,115,212,232,158,253, 88,147, 10,183, 72,146,245, 74,148,212,218, 52, 38,155,157, 7,154, 22,102, 37, 42,117, 74,117,156, -212,252, 35, 69,149,207,156, 82,213,241, 20, 21, 13,195, 52, 45,174,178, 72, 34,146, 64,163, 75, 24,163,145,145, 78,133,154, 64, -177,177,184,109, 37,180,144, 64, 34,228,227, 92,195, 55,166,201, 42,232,248, 98,122,101,226,188,193,116, 80,199, 81, 52, 81, 22, - 98,202, 37,146, 53,145,135, 49,160,137,154, 69, 91, 50,235, 85, 12, 10,155, 24,223,112, 43, 69,217,158, 45,184,165,187,120,165, -246,138,241, 35,182,116,170,123, 23, 91,119, 61, 74,223,220,203,198,221,164,212,247, 82,240, 90,154,145, 18, 4,155,122, 83,169, - 76, 13,179,165,195,106, 27, 94,232,150, 88,134,243,109, 69,164,194,109, 80,163,204,105,153,125,220, 94,209,127,103,156, 61,184, -186,232, 52, 94, 47, 56,125,117,247,237, 26,244, 24,113, 99,110, 45,186, 93,145, 37,234, 60,166, 35,176,203,104,151,241, 45, 78, - 41, 9, 74, 64,234, 84, 0,215, 43,127,189,146,225,251,255, 0,151,141,236,252,108, 47,255, 0,212,117, 98,186, 62,141, 70,193, - 80,109,171,134,184,206,250,111, 75,206,209,168,117,106,171, 77, 58,108, 79, 9,215, 41,240, 31,150,134,220,228,180,193,240,212, -166, 64, 56, 32,224,156, 28,234,227,226,156,231,194,238, 48,205, 41, 42,234,248,179, 49,165,167,161, 88,226,165,164,134,136, 37, - 61, 52,107,164,104,141, 76,102,218,138,130,204,119, 54, 10, 44,136,138, 40,222, 15,200,252, 93,224,124,162,178,142,139,131, 50, -202,202,154,247,146,106,202,201,235,245,213, 85, 72,218,137,121, 92, 72, 47,160, 51, 4, 81,176,187, 49,187,187,179,241,151,216, -125,188,123, 87,177,188,108,155,223,120,111,251, 87,109,173, 15,226,150,243,164,127, 8,239, 10,196, 74, 37, 35,235, 57,181,155, - 69,248,144, 61,246,107,137, 71,189, 56,212, 57, 74, 66, 51,149, 6, 20, 64,192, 58,156, 37,241,179, 92, 40,241,203,106,237, 46, -225,220,246,214,221,239,165,175,107, 85,218,191,118,150,241,196,122,245, 54, 52,165,184,202, 93,157, 69,169, 68,120, 38,161, 71, -146,245, 54, 31,189, 67,112,189, 2,106,233, 81,140,168,239, 42, 43, 5,184, 0,123, 51,184, 59,180,120,227,226, 73,123, 35,122, - 92,215, 45,167, 72,254, 47,238, 75,185, 21, 91, 80,210,133, 79,223,104,181, 43,126, 19, 17,149,245,197, 62, 75, 62,234,182,234, -239, 21,254,143,159,153,164,114,168, 12,131,250, 11,240,185,177,214,207, 9,155, 29,181,187, 7, 78,186,100,213, 41,118,141, 53, - 54,133,175, 62,230,151, 77, 98,183, 95,122, 59, 21, 90,234,227,165,168,172,176,212,202,144,167,198,170, 72, 83,113,218, 4, 70, -167, 60,241, 64,109,167, 22, 49,227,201,203,105, 56,158,154,191, 47,204,234, 97,226,113, 20, 74,241,160, 40,145,211,114,230, 28, -196,153, 44,218,218,229, 29,117,125,130,110, 45,140,253, 29, 23, 52,173,225, 42,188,187, 50,202,105,103,225, 38,158,102, 73,100, - 43, 36,146, 85,137, 41,207, 41,224,123,174,133, 0, 58, 57, 91,243, 2,216,220, 12, 63,180,219,118,145, 74,138,212, 72,144,152, - 67, 77, 33, 40, 72, 13,164, 97, 41, 24, 0, 0, 58, 12, 1,168,214,125, 36,238, 26, 44,170,175, 15, 59,113,196,205, 42,137, 14, - 22,224,216, 59,137, 73,176,171, 53,136,200, 98, 51,213, 75, 2,242,167, 86,221, 76, 42,145, 5, 42,168, 46, 29,213, 78,163, 42, - 16, 60,230, 50, 42,243,249, 18, 18,251,170, 18,111, 4, 30,160,228,122,141, 71, 19,233, 42,111, 69,183,107,112,145,182,219, 37, -239,241,156,189,119, 91,118,169,119, 3, 20,143, 17,179, 37,155, 43,111,169, 53,105, 85,170,210,208, 57,148,210, 5,199, 87,180, -163, 53,144,128,239,189,200, 40, 89,247,119, 16,170,219,194,167,174, 95, 16,120, 99,216, 11, 9, 94,160, 7,211,125,224, 42,220, -240,214,234,188,157,100,223,109,175,219, 22,175,140, 41,151,191,134,156, 91,250, 68, 41,133, 41,137,143, 85,182,168, 14,158,207, -166,253, 27,157,160, 45,183,222,221,240,212,253, 25, 45,199,171,212,118,115,136, 29,176,151, 33,247,169, 54,142,229, 80,110,122, - 75,110,168, 41,184,138,190, 45,181, 67,159, 26, 49, 42, 42, 67, 62, 61,152,135,139,120, 8, 14, 76, 91,137,202,221,112,234, 82, - 58,139,207,209,155,219, 90,149, 31, 99,247,187,115,230, 71,118, 60, 91,231,115,160,208,105,106,117,183, 80, 38,192,177,109,214, - 20,185,241,212,165,114,187, 24,213,110,170,156,110,100,164, 31, 22,152,242, 20,163,202, 2,101, 13,163,120,178,105,219,196, 78, - 41, 52,214,229,243,208, 27,116,230, 8, 34, 19,125,252,208,250,189,247,193, 60, 25, 90,149,240,199,132, 5, 93,249,190,206,228, - 95,175, 40,212, 76, 97,251,185, 38, 61, 63,225,181,182,194,210,210,210,213,119,139, 59, 11, 75, 75, 75, 67, 3, 11, 86,231,168, -244,137, 50,219,159, 34,151, 78,126,123, 74,105,109, 77,122, 12,103,101,180,182, 20, 20,202,155,146,182,138,208,164, 40, 2,146, - 20, 10, 72,200,193,213,199, 75, 89, 4,141,193,177,247, 96, 98,222,186, 77, 45,198,165,199,114,155, 79,113,137,239,123,196,230, - 87, 14, 50,154,153, 32, 41, 11, 15,203,109, 77,226, 67,220,237,182,121,150, 10,178,128,115,144, 52,195, 92,219,245,176,182,149, -122,185,103,220,245, 58,117, 38,177, 14,165, 62,137, 88,166,205,183,100,165, 18, 94,180,182,226, 54,233, 43,153,126,224, 91,159, - 5,155, 45,232,238,197, 88, 82,208,167,241, 10, 62,100,128,214,182, 39, 90,175,186,220, 34,237,174,239, 92, 87,189,203,114,202, -174,179, 62,249,180,173,155, 70,114, 96, 73, 97,182,233,177,104, 55, 4, 90,205, 74,117, 39,196, 97, 70, 44,234,189, 58,155, 70, -165,212,213,146,151,233,244,134, 89,229, 24, 36,239,229,230,133,166, 97,152,203, 44,112, 21,216,197, 98,193,245, 40, 4,130, 13, -194,173,216,141,137,210, 0, 32,219, 9, 75,204, 10, 12, 42,165,129,253,111, 75, 29,135,199, 97,247,227,225,226,159,135, 84, 56, -170,163,213, 95,119,172, 38, 13,219, 88,247,105, 22,125, 85,171,145, 66,203,155, 66,162,214, 18,136,138,166,123,195,149, 5, 46, -227,166, 8,173,167, 43,148,194,220,113,158,102,153,112,164,250, 39, 17,220, 62, 92, 21, 58, 93, 58,145, 81,141, 34,185, 94,151, - 97,212,226,211,133,167, 80,106,170,170,149,249,112,215, 45,203,118, 92,198, 28,166,133,197,168, 51, 86,164, 85,125,241,199,121, - 87, 1,181,165,233, 10,109, 15,161, 74,182,220, 60, 32,109,125,201,123,215, 47,185,174, 86, 27,170, 87, 55, 43,109, 55, 45,216, -204, 61, 29, 48, 33,205,219,106, 84,138, 75, 84, 24, 49,212,193, 12, 91,213, 70,167, 84,156,170,176, 58,201,118,122,151,204, 20, -134,139,116,232, 92, 31,109,165,187,120,209,239,138, 92,218,235, 53,202, 30,226,110,142,227, 66,113, 79, 68,117,145, 63,115,169, -177,233,206, 81,214,211,177,136, 85, 10,144,168, 20,183,233, 12,118,138,245, 57, 11,202,185,222, 14, 56,145,195,220,178, 86,106, -161, 46,139,128, 74,144, 27, 78,161, 30,201,246, 67,125, 94,175,251,237,109,176,143,246,189, 67,202,133,111,239,189,175,107,245, -235,111, 53,190,235,247,192,151, 23, 20,214,213,149,120,238,245,161,112, 90,149, 90,123,118, 93,223,110,218,116,155,146, 37, 34, -165, 34,213,175, 92, 87,142,216, 91,119,181, 10, 5,199, 93,102, 0, 98,139, 83,155, 86,172,154, 91, 40,230,144, 74,145, 17, 79, -169,147, 50, 58, 23,100,166,241,143,176,110, 91,118,252,155,150, 60,202,122, 85,111, 48,244,196,211,236,186,197,114,218,166, 92, -206, 88,209,239, 59,138,199,163,207,137, 73, 87,214, 85,120,214,244,153,202, 90, 88,103,194,117, 48,100, 69, 14, 42, 91,110,197, - 77,226,167,194, 53, 62,224,168,214,164, 92,187,177,184,117,202, 93,207, 86,176,238,171,166,132,252, 75, 34, 52, 75,138,247,219, -171, 22,218,178,232, 23,101, 70,124, 75, 81, 19, 90,146,100, 90,180,154,171,241, 99, 73, 98, 19,149, 8,201,195, 8,139,207, 29, -204, 89,174, 3, 54,230, 28, 89, 84,218, 93,213,112, 83,169, 85, 8, 13,183, 62, 50,109,173,179,153, 84,126,170,109,166, 45,137, -213, 38,111, 9,246, 59,149,202,124, 73, 44,199, 68,199, 96,199,169,183, 24, 77, 91,133, 9, 76, 55, 93,134,181,227, 28, 52, 99, - 65, 52,210, 44,161, 35,212, 99, 50, 88,176,141, 85,236, 90, 50, 67, 23,214,214,210, 86,214,179,139,144, 10, 77,101,201, 85, 4, - 92,245,183, 75,220,116, 61,133,133,239,123,246, 56,201,110, 78, 45, 54,210,143, 71,187, 69, 26,206,190,106, 23,221,159, 10,239, -174, 77,176,164,109,229,114,157, 93,162,200,181,109, 26, 5,194,253,122,230, 66,160, 17,111,208,220,164,222, 86,170, 68,245, 41, - 75, 91, 85,192,134, 91,117,109,188,218, 1,107,139,222, 30, 41,208,160, 38,182,212,154, 96, 81, 98, 34,164, 83,236,138,173, 86, -132,229,233, 73,143, 2, 77, 86,210,160,202,167, 82,150,229,102,224,167, 57, 85,155,240,177, 28,130,105,117, 4, 48,181,191, 26, - 67, 73,200,239, 78, 20,232,247, 93,227,184,151,181, 59,113,239,187, 58,175,186, 16,107, 20, 59,177, 20, 6,109, 25, 81, 38, 91, - 85,235, 26,194,177,234,148, 36, 49,113, 91, 83, 67, 13,174, 54,221, 80,228,162, 75,124,147, 24,118, 76,180,176,251,104,120,114, - 97, 71,129, 29,185,102, 75,134,157,116, 87,233,212,215,107,237,221,142,192,102,217,219, 23,234, 46,220,107,153, 26,125, 70, 66, -175, 41, 86, 50,235,200,165, 73,156,220,169, 11,130,138,162, 26, 67,243,150, 16, 68, 68,166, 32,196, 67,134,204, 81,243,102,154, - 55, 96, 25,172, 90,225,180,141, 75,126, 89, 22, 86,190,141,141,197,203, 50,155, 12, 6,246,205, 70,202,164, 3,177,176,251,143, -218,190,227,175,167, 96,112,231, 92,188, 65,108,253,156,237, 21, 85,234, 37,205, 77,117, 54,204, 75,162,127,188,109,197,114, 52, -173,190,178,220,185,255, 0,131,148,235,130,242,141, 38,152,219,246,149, 21,117,198, 37, 41,160,227, 97,192,213, 50, 76,191, 5, - 44,199,113,212,227,232,226,211,100, 21, 21,169,244,186, 61,249, 82, 97,202,109,126,252,241,169,187, 81,118,165, 40,183,173,245, - 24,119, 77,250, 28,149, 70,101, 47, 81,162,201,144, 35, 61, 61,165, 56, 94,122, 73,102, 57,144,174,112,155,149,235,194,253, 54, -254,147, 62, 77,127,114,247, 1, 75,185,109,201,150, 53,252,136,169,180, 27, 69,243,183,234,190,107,183,181, 30,208,169,151,173, -119, 21, 76,139, 79, 23, 21, 86,150,196,154,122,162,203,114,155, 49,212, 72,121,217, 74, 76,164, 52,251,165,194,237,235, 26,209, -179,173,109,147,172, 76,141, 81,133,182, 87,238,208, 87, 46,106,213,219, 71,163, 71,122,208,188,167,211, 39,166, 53,106,131, 47, -109,107,104,172, 50,153,222,250,242,158,167, 46,147, 80, 97,184,166, 59, 47,172,204, 15, 66, 37, 60, 57, 12,220,152,228,168,144, - 77, 35, 16,197,159, 68,106,161, 88,234,102,104,191,104, 88, 1,114, 84,173,192,114,193,114,237, 84,161,152, 32, 33, 64,176, 2, -228,155,141,128, 13,233,248,131,216, 12,110,107,245,216,236,216,210,174,155,102, 19, 51, 24,254, 12, 74,185,104,144, 74,126,174, -102,127,139, 76,118,175, 5,151, 65,108,123,159,142,181,183,206, 74,121,146, 94, 82,148, 50, 14,180,215,116,165,219,144, 32,213, -182,215,234, 10, 53,122,167, 42,135, 42,149,118,221,213, 70,214,169, 21,107,134,188,202,229, 86,106, 18, 4, 96,219,174,148,212, - 36,135,144,147, 32, 54,202,144, 24,109,164, 55, 29,160,157,199,135,107, 57, 22,193,139,100,166,162,160,236,107, 61,139, 88, 85, -154, 99,195, 80,113,154, 42,105, 34,162,212,101, 58,174, 69,115, 39,197, 74, 10,206, 14, 19,204,123,235,144, 59,209, 19,116,167, - 75,115,110,234, 52,115,107,213, 46,219,210,159, 99,220,151,204, 58,236, 73,212,214, 41,117,135,213, 18,124,250, 47,142,152,243, - 99,207,171, 72, 8,129, 8,201,140,219, 77, 59, 90,111,154, 74,212,166,148,189, 76,174, 26,121,106,106, 29,239, 34, 68, 9, 80, -110, 46, 9,181,201,219,183, 91,237,190,248, 60,236,234,136, 7,148,183, 95,203, 29, 10,217,141,236,135,113,237,133,155, 34,137, -104, 94, 55, 7,131, 64,143, 79,110,109, 18,136,236,138, 4,185, 20, 96,229, 38, 91, 17,174, 7,228, 6, 36,186,204,216, 18, 99, -188,239, 63, 35,146, 34,186,166, 84,235, 74,109,197,229,117,203,231,113,228, 81, 38, 76, 27,115, 80,181,169, 66, 35,130,109, 86, -161, 91,167,203,170,192,109,238,102,132,198,233, 52, 53, 63, 33,184, 44,146,133,204,125, 1, 82, 99, 70,241, 95,139, 22, 83,173, - 37,181,115,182,167,188,183, 37,129, 6,159,182,219, 79, 95,118,221,177,236,232, 45,208,224,166,152,212, 39, 19, 54, 68, 95,130, - 92,184,146,164, 69, 83,145,233,254, 40, 83,113,195,107, 72,113,182, 68,151, 7,140,251,152,109,170, 91,157,184,213,165,133, 85, - 47,171,178,127, 33,230, 75,114,171,213, 23, 35,250,156,199, 84,159, 15,147, 25,200, 41,229,229,200, 61, 52,228,156, 45, 83, 33, - 46,213, 9, 12,109,184,184, 98,214, 61, 46, 54,177,183, 93,246,239,141,118,204, 17,118,208, 89,135, 93,192, 23,247,125,248,187, -241, 61,191, 16,171, 20,120, 91, 43,100, 59, 38, 45, 50,223,155,227,110,163,143,165,182,103,212,183, 14, 41,104,204,160,206,247, - 98, 91,122,157, 79, 90, 99, 41,149, 50,183, 97,190,216,132,184, 46, 57, 2, 52, 39,156,210, 5, 41, 40, 66,220, 89, 66, 27,109, - 42, 90,220, 95,192,219,105, 72,202,150,226,212,112,218, 7, 82, 73, 32, 0, 59,247,214,204, 79,218,105, 60, 77, 67,171,238, 54, -206,186,245, 31,112, 40,173, 83,169, 53,218, 12, 24,116,183,153,221, 11,113,130,220, 51,122, 91, 76, 85, 22,150, 26, 76, 26,164, -146,195, 50, 28, 10, 83,241,203,235,111,199,134,228, 45,102,150, 23,179, 43,113,174,103,163, 78,220,186,172, 10, 83, 3,192,117, -104,185,234,127,195, 25,237, 41, 32,164,174, 53,175, 72, 83, 84,104,143,114, 21,146,164,150,212, 20,190,185,198, 4,179, 46,173, -203, 50,156,190, 58,121,100, 74, 87,131,103, 86, 97,169,159, 98, 92, 0, 11,184,125,138,176, 91,105, 32,109,107, 6,154,136,106, -106,106, 25,213, 76,161,250, 16, 54, 3,176, 36,216, 2, 58, 17,126,183, 62,252, 48, 60, 43,109,125, 79,127,119,214,218,118,158, -185, 44,218, 22,100,195, 85, 21,152, 78,173,176, 24,129, 33,164,215, 46, 72, 51, 89, 87,232,220,113,192,221, 34,148,242, 50,174, -121,115,101, 55,205, 29,104,115, 82, 78,211, 25,177, 59, 3,102,236, 21,187, 50,139,108,185, 46,165, 62,173, 33,153, 53,170,245, - 73, 17,145, 54,114,162,180, 89,135, 17,150,162,180,148, 67,165,176,133, 61,224,176, 57,202, 21, 37,197, 41,197,149,100, 62,122, -131,113, 6,106,185,165, 96,104,175,236,208, 11, 33, 34,197,137,182,166, 35,168,189,128, 0,244, 85, 23,220,156, 61, 80,210,154, -104,136,127,239, 28,220,251,189, 7,243, 39,212,156, 45, 45, 45, 45, 48,227,119, 11, 95, 8, 4, 16, 70, 65,232, 65,215,221, 45, - 12, 12, 83, 67, 45, 53,146,219,104, 65, 61,202, 82, 1, 63,128,213, 77, 45, 45, 12, 12, 51,123,215,177,246, 78,250, 90,142,219, - 55,132, 15, 17, 77,169, 82, 41, 53, 88,229, 45, 85, 40,211,185, 57, 19, 46,159, 36,164,248,107,198, 2,208,160,166,221, 72,229, -113, 10, 24,199, 21, 55, 95,128,189,229,176,101,201,126,218,136,213,251, 65, 75,139, 49,164, 82,249, 99, 86, 27,103, 36,161, 50, -233, 82, 22, 57,221, 9,192,203, 14, 59,205,140,242,163, 60,162, 65,250,242,180, 33,192, 82,180,165, 96,247, 10, 0,143,219,170, -147,196,127, 5, 56, 23,196,226,149, 89,229, 28,148,121,204, 74, 17, 43,169, 25, 98,168,208, 62,202, 73,169, 94, 41,209,127, 84, - 75, 27, 50, 11,136,217, 1, 55,183,188, 54,241,191,143, 60, 47, 87,165,200,171, 99,172,201,165,114,239, 65, 86,173, 45, 54,179, -246,158, 61, 46,146,192,237,250,198, 41, 21, 92,216,200,174, 64,180, 88,213,177,251,198,219,222, 2,182,186,252, 11, 10,228,255, - 0,246, 90,178, 91,207,151,233,189,211,147, 31, 62,108,117,239,167,207,108,248, 36,222, 91,238,100,115, 87,165,127, 3,105, 10, -113, 62, 60,170,176,241,106, 37,172,142,111,119,166, 48,172,135, 49,156,120,203,100, 12,103,174, 48,100, 58,105,148,245, 30, 99, - 13,130,123,231,195, 26, 33,168,236, 50, 48,211, 77,182, 63,217, 72, 31,208, 53, 83,100,223, 67,239, 15,232,107, 82,167, 52,206, -115, 28,238,154, 50, 15,179,179, 69, 4,111, 99,246,100,120, 99, 18,149, 61,249,111, 17,244, 97,139,115, 58,250, 99,248,133, 95, - 67, 37, 46, 85,146,229,217, 29, 76,128,143,104, 85,150,162, 68,184,251, 81,164,210, 24,131, 14,220,200,229, 95,240,156,107,150, -193,112,227,103,236,125, 9,184, 52,136,161,218,131,220,143, 84,106,146,130, 29,168, 84,101, 37, 56, 15, 74,120, 32, 14, 80, 10, -130, 27, 64, 13,182, 9, 8, 72,201, 39,100,244,180,181,212,185, 94, 87,151,100,153,125, 38, 85,148,209, 71,151,101,180, 40, 35, -134, 24,148, 36,113,160,232, 21, 70,221,110, 73,234,204, 75, 49, 36,147,142, 85,205,115, 92,203, 59,204,106,243,108,222,182, 76, -199, 50,175,115, 36,211,204,197,228,145,207, 82,204,119,233, 96, 7, 69, 80, 21, 64, 0, 0,180,180,180,181,191,134,252, 45, 45, - 45, 45, 12, 12, 45, 45, 45, 45, 12, 12, 45, 45, 45, 45, 12, 12, 45, 45, 45, 45, 12, 12,104, 15, 16,151, 95, 24, 54,239, 17,123, - 83,103,109, 12, 84,212, 54, 75,118, 69,182, 47, 27,216,219,148, 90,131,187, 24,189,180,184,101, 92,219,132, 23, 42, 76, 82, 37, -139,234,202,151, 77,160,210,125,241,138,135,213,181, 58,116,137,140,248, 9, 90, 64,231,117, 43,136,239,106,117,199, 89,185,105, -117, 10, 52,219, 42, 68,189,220,218,235, 50,177, 79,135,177,151,213,106,118,216, 64,186,248,146,182,109, 10,197, 94,196,168,220, - 27, 33, 79,182,247, 3,109, 33,236,132,171,166,163, 88,171, 53,117,221,106,132,229, 62, 29, 72,212, 41,241, 36, 73,106, 28,131, - 84,132, 47, 28,201, 10,199,108,140,227, 84, 76, 88,197, 69, 69,150,202,143,115,203,215,203,250,134,165, 20, 60, 69, 77, 73, 4, -113, 75,195,212, 85,111, 18,196, 57,143, 18,150,102,142, 70, 98,238, 24, 50,182,184,244, 70,234, 2,130, 99, 89, 13,218, 73,249, -209, 44,195,134, 42,235,106, 36,154, 46, 37,175,163,142, 87,148,152,210,102, 8,171, 36,106,161, 35, 42,200,203,203,148, 73, 42, - 49, 44, 87,154,209,139, 36,116,252,158, 18,111, 54,228,113,174,250,120,178,217,207,122,222, 77,206,102,216,218,235, 50,169,182, -183,141, 11, 96,170,118,165,187, 86,174, 81, 46, 93,174,102,187,109,151, 87,181,116,241,125,223,117,200,235,187,229, 59, 34,206, -174, 87,232,109, 83,149, 52, 24,150,188,232,144,226,189,121,221,222, 37,189,160,182,229,237,191,208,108, 59, 58,250,169,203,183, -173,190, 38,157,179,108,216,155, 3, 85,170, 88,180,107, 78,206,216,154,213,197,195,166,226,216,251,164,154, 35,177,247, 99,117, - 46, 45,225,139,109,211,166, 90,113,234, 19,223, 67, 85,233,113, 87,111, 66, 52,228,205,149,220, 51, 22, 58,149,204, 89, 65, 80, - 24, 4,167,168, 30,131,211, 95, 12, 72,196,133, 22, 91, 42, 29, 1,229, 25, 3,211, 75,197,197, 20,136,176,163,240,229, 36,235, - 18,176, 33,145, 44,210, 60, 84,241,180,133, 86, 48,170, 73,131,152, 2, 42,144,206,124,197, 76,130, 93,105,120, 70,177,218,103, -143,138, 43, 96,121, 93, 72, 43, 36,132,172,105, 45, 76,169, 24,102,149,157,128, 21, 28,178,100,103, 82,136, 60,129,132, 70, 29, - 28,224,214,249,226, 54,181, 83,222,219, 55,136, 39, 43, 85,241,100, 94,246,107, 27,119,127, 86,246,245,141,190,145,120, 91, 23, -102,204,109,181,247, 91,109,168,212,184, 17,169,213,150, 40,215,245,201,118,208,253,234, 19, 64,161,116, 5, 67,154,165,207,141, - 37, 70, 41, 62,217,106,175, 29, 60,104,113, 79, 93,164, 80,248, 84,226,128,108,102,199,212,235,214, 38,211,193,135,178, 27,169, - 46,147,113, 46, 44,255, 0,115,185,183, 61, 15,199,182, 20,196,245, 87, 38,211,216, 92, 23,154, 60,130,143, 6,156,148,254,148, -200,113,217,206, 33,150,155, 57, 67,105, 73,237,144, 49,211,211, 67,187, 77,128,242,138,221,136,195,139, 61,212,180, 5, 19,247, -157,111,240,175, 28,175, 11,103,243,113, 12, 25, 5, 53, 85, 91, 66,177, 70,164,152,227,133,180, 34, 75, 44,105, 26,133, 87,155, - 75, 19,164, 5, 65, 35,170, 0,166,216,110,227, 15, 15,159,139,248,110, 14, 25,168,226, 74,186, 58, 36,153,165,149,192, 89,101, -157, 4,143, 36, 48,202,242,146,204,144,234, 80, 53, 18,206, 99,141,156,150, 92,126,116,252, 63,207,246,190,240,179,111, 84, 45, -109,128,218, 78, 44,118,210,133, 86,172, 61, 95,169,195,163,240,195,113, 77,114,125, 93,248,145, 32,174,108,185,213,189,175,149, - 33,245,136,112, 98,182,132,169,210,134,210,214, 16,148,229, 89,216, 95,229,123,244,129, 63,242,126, 52, 63,251,173,204,255, 0, -254, 61,169,231,253, 81, 76,255, 0,200, 99,127,246, 73,254,173, 47,170, 41,159,249, 12,111,254,201, 63,213,169,173, 79,140,244, -149,147,203, 85, 89,225,206, 77, 85, 85, 49,212,242, 73, 10,188,142,118,221,157,162, 44,199,110,164,147,211,211, 16, 58, 95, 2, -107,104,105,226,164,162,241, 71, 60,163,164,128,105, 72,162,157,227,141, 23,246, 81, 18, 80,170, 58,236, 0, 27,226, 37,155,115, -253,212,126, 49,125,153,188,113,237,174,247,198,222,153, 59,193, 46,175, 96, 72,219,250, 22,228,109,202,182,202,225,187,172,138, - 21, 82,137,114,222,246,157,180,203,246,205, 29, 85, 20,205,129, 74,154,216, 8, 67,198, 83,220,180,197, 40, 34, 90,211,174,108, -123, 29, 56, 93,226,149, 28,122,109, 85,237, 78,219,189,198,219,219,123,106,234,245,201,187,145,114,220,214,181,114,217,129, 10, -149, 34,223,173, 81,102, 90, 18, 69,110, 36,113, 58,173, 81,126, 98, 97,251,154, 2,223,101, 46, 57, 49, 77,165, 17, 22,226, 63, - 64, 22, 96,195,143,159, 6, 51, 45,115, 12, 43,145, 0,100,124,245, 69,170, 85, 61,151,140,134,162, 50,135,137, 36,184,148, 36, - 40,147,243,198,154,161,241,114,174,151, 42,226,204,162,135,135, 40,168,169, 56,157,157,130, 68,186, 35,166,230,211, 71, 75, 40, - 72,213, 66, 72,165, 35, 14,129,130,132,145,152,182,181, 58,112,239, 63,130,212, 85,153,191, 6,103, 85,252, 79, 95, 95, 91,194, - 43, 26,151,149,181,201, 87,201,170,146,174, 18,242,179, 23,141,131,202, 81,202,150, 47, 18,162,175, 45,134,178, 91, 28,254, 11, - 94, 39,235,248,104,231,255, 0,249,185, 70,127,110,177,109,192,143, 34, 93,135,122,196,136,195,210,165, 74,180,238, 40,241,163, - 71,105,111, 72,145, 33,234, 68,198,217, 97,134, 91, 73, 83,175, 45,197, 37, 41, 74, 65, 82,148,160, 0, 36,235, 46,210, 35, 32, -131,216,244, 58,169, 35,115, 27,163,129,114,132, 31,220,111,139,166, 68, 18, 35,161, 54, 14, 8,253,226,216,132, 15,176,167,134, -142, 35,182,159,142,131,114,110,159, 15,251,217,182,150,232,218, 43,214,152,107,251,129,181, 87,213,153, 69,250,202, 85,110,207, -118, 45, 59,235, 91,142,131, 25,143,127,113,168,178, 84,219, 62, 39,136,180,199,112,165, 36, 33, 68,117, 47,219,205,195, 55, 28, -251,238, 54, 30,243,225,142, 29, 70,225,177,182, 89, 85,139,166,109,187, 96,220, 82, 40,155,167, 77,220,121,146, 24,110, 13,239, - 72,138,151, 99, 46,172,220, 26, 44, 70, 24,129,245,108,167, 42,145,159,169,206, 83,113, 11, 78,151, 83, 34,132,192,132,135, 60, -100,198,101, 46,147,146,224, 64, 11,207,219,162, 84,132,172, 20,173, 41, 82, 79,112,160, 8, 63,113,213,149,152,120,159,153, 87, -113,173, 39, 27,140,170,149, 43,105, 34, 16,136, 36, 15, 44, 37,116, 73, 27, 19,114,172, 24,164,140, 1, 7,202,108,119,232,106, -156,179,194, 76,171, 47,224, 42,222, 1,108,226,174, 74, 26,217,140,230,162, 50,144,206,175,174, 41, 20, 11, 43,161, 85,120,148, -144, 65,212, 46, 54,216,136, 25,208, 61,170, 30,218,237,168,164, 39,110,107,112,119, 42,161, 86,167,180,154,124, 73,123,145,195, -123,147,175,152, 73, 79, 52,102, 82,236,185, 86,131, 14,213,229, 7, 80,172, 61, 80,106, 99,238,173, 39,196,113,206,163, 77,149, -151,192,119,180,211,218, 97,189, 44,110, 46,255, 0, 64,220,170, 74,107, 38, 36, 90,246,237,239,133, 26, 85,175, 26,139,111, 48, -234,221,106,157,101, 88, 47,198,128,235,144, 71,143, 49,200,112, 41, 20,248,116,144,252,135, 28,117,248,190, 58,222, 95,232, 6, -237, 2,142,250,185,220,129, 29, 74,245,240,211,253, 90, 50, 61, 62, 20, 79,251,222, 43, 45, 99,205, 8, 0,254, 56,212,132,120, -202,153,122,212, 79,195, 92, 13,149,240,246,109, 84,165, 90,170, 40,213,156,106,234, 81, 86, 56,128,223,205,165,153,208,176, 5, -209,237, 99, 26, 62, 5,190,100,244,176,113, 87,136, 57,191, 19,100,212,110,174,148,114,202,202,135, 79, 64,238,210,202, 78,215, - 82,200,169, 32, 82, 66, 58, 94,248,215,190, 20,248,114,178,184, 89,217, 43, 15,102, 44, 56, 70, 37,191,100,208,163,210,163, 45, -222, 85, 76,168, 74, 82,220,153, 87,173, 84,156, 72, 1,218,172,250,188,153,211, 37, 41, 41, 74, 21, 34,123,133,180, 33, 28,168, - 78,200,105,105,106,151,168,168,158,174,121,234,170,101,105,234, 42, 93,164,145,216,221,157,220,150,102, 98,119, 44,204, 73, 39, -185, 56,189,233,169,169,232,233,169,232,233, 97, 90,122, 90, 84, 88,227,141, 5,149, 35, 69, 10,136,160,108, 21, 84, 0, 7, 96, - 48,180,180,180,180,142, 23,194,210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194, -210,210,210,208,192,194,210,210,210,208,192,194,210,210,210,208,192,194,214, 53,117,217,246,213,239, 67,171,219,183, 69, 34, 21, - 94,149, 91,165, 79,163, 84, 24,146,195,107,113,112, 42,113, 93,135, 45,182, 95, 41,231,142,178,203,206,114,173, 5, 42, 66,136, - 82, 72, 80, 7, 89, 46,150,178, 24,169, 5, 77,136,238, 48, 8, 7, 98, 46, 49,196,171,235,133,221,241,219,202,252,170, 5, 5, -186,133,255, 0,110, 54,227,142, 91,183, 24,180, 43, 87, 5, 89,218, 66,156, 34, 28, 91,130,109, 22,174,210, 93,171,176,128, 27, -113,199, 24,105,215,249, 3,170, 47, 40,169,247, 49, 56,124, 52,111,189,235, 81,137, 67,173, 91, 85,184,244, 57,175, 52,212,250, -127,240, 58,177,105,211,231, 52,181, 0, 89,174,220, 21,122,163,202, 77, 11,186,164,199, 97, 13, 46, 66, 17,224,173,197,178,183, - 24,123,188, 58, 90,146,167, 20, 85,172, 74,141, 2, 59,168,182,162, 91,115,107, 92,168, 54,223,184,232,119,216, 13,176,222,114, -248,203, 92, 57, 11,126,155,126, 7,249,225,157,217,141,156,160,236,245,178,138, 85, 60, 53, 50,183, 53, 12, 57, 94,173,134, 82, -202,230,190,210, 57, 90,139, 21,176, 63,193,105, 44, 36,169, 17,217, 29, 0, 37,106,202,214,163,167,139, 75, 75, 81,233,166,150, -162, 87,154,103, 50, 73, 33,185, 39,231, 96, 58, 0, 54, 3, 97,182, 55,149, 85, 20, 42,139, 42,244,194,210,210,210,210, 88, 54, - 22,150,150,150,134, 6, 32,111,253,251,111,253, 25,127,246,206,255, 0,117, 13, 84, 31, 77,167, 61,189,153,157,251,127,142,111, -251,168,234, 6,201, 25, 61, 71, 79,216,116, 66, 7, 92,227,160,237,253, 29,191, 61,180,202,213,149, 2,195, 94,231,220,191,150, - 52,249,178,126,215,224, 63, 44, 79, 25, 63, 77,151, 39,255, 0, 6,119,218,127,150,103,111,251, 41,107,223,247,236, 95,244,103, -255, 0,219, 47,253,212,245, 4, 4, 2, 7, 95, 63, 47,223,170,169, 25, 61,186,122,250, 31, 81,243,210,126,219, 83,255, 0, 19, -240, 95,203, 24,230,201,127,181,183,192, 98,119,163,233,176,103, 24,246,104, 30,163,167,248,229,121,231, 24,255, 0, 53, 62,250, -168, 62,154,225, 35,175,179, 71, 31, 47,229,149,254,234,154,130, 42, 65,207, 67,215,212,255, 0, 96,209, 9,238, 1, 57,207, 66, -113,249,198,136,213,245, 67, 97, 37,143,253, 43,249, 99, 60,217, 45,187,126, 3,242,196,238, 7,211, 87,201,199,247, 52,251,255, - 0,207, 39,240,255, 0,146,174,190,171,233,171,114,130,127,185,167,159,151,242,200,255, 0,117, 93, 65, 69, 9,235,159,151, 79, -207,231,190,171, 4,115, 15,151,207,215,229,233,211, 26, 76,230, 21,118, 63, 93,254, 85,254,156, 37,237, 18,245,215,248, 15,203, - 19,165, 79,211, 89, 73, 4,159,102,170, 83,233,158, 50,135,207,254,106,191, 45, 18,215,211, 80,241, 19,205,253,205, 94, 80,123, -127,142, 62,115,255, 0,101,109, 65, 56, 67,100,168, 18,128,163,223,185,239,242, 25,237,223, 87, 54,211,203,202, 0, 0,118, 29, - 49,229,158,131,238,210,103, 49,173, 22,250,254,191,225, 79,233,198, 13, 68,189,155,240, 31,150, 39, 74,159,166,146, 79,127,102, -191, 47,111,249, 99,122,255, 0,213, 99, 85, 71,211, 69,207,250, 54, 71, 94,199,249, 98,244,199,175,249,172,106, 11,137, 0,145, -159, 63, 79,199,240,209, 41, 7,203, 0,118, 57,237,143, 77, 96,230, 85,191,241,191,202,159,211,140,123, 76,223,183,248, 15,203, - 19,158,254,253, 11,254,141,175,251, 98,127,186,206,189,143,166,127,144, 15,247, 54,241,159,249,225,255, 0,186,214,160,208,144, - 8,234,123,244,199,237,253,218, 36, 39, 29,124,250,119, 29,189,116,145,205, 43,199,251,255, 0,242, 39,187,252, 56,199,180,205, -109,218,196,123,135,229,137,201,143,166,116, 79,250, 55, 15,111,252,240,187,127,217,107, 94,199,211, 56, 39,191,179,119, 29, 51, -254,120, 95,111,127,241, 91,233,219, 80,111, 66,135,111, 60,254, 7, 24,209, 8,238,125, 72,239,223, 31,119,231,182,138,115, 90, -253,254,190,214,255, 0, 10,127, 78, 11,237, 51,116, 50, 88,250,233, 31,150, 39, 26, 62,153,166,112, 71,179,131, 57,237,142, 48, - 63,221,115, 94,135,211, 49, 57, 0,251, 55,241,156,227,252,112, 51,219,254,171,154,131,194, 82, 70, 48, 64,232, 51,143, 33,242, -252, 52, 66, 49,158,191, 96,244,255, 0,142,136,115,108,195,114, 42, 46, 7,248, 19,250, 48, 95,107,159,246,255, 0, 5,252,177, - 56, 65,244,203, 15,159,179,135, 31,245,191,207,255, 0,149,221,122,254,252,175,166,127,185,197,246,143,229,127,219,211,254, 75, -218,132, 10,112, 10,114,160, 9, 29, 7,168, 61,127,167, 94,243,144, 72,238,122,100,244,207,207, 69,253, 47,152,255, 0,204,127, -146, 63,233,198, 13, 93, 64,255, 0,121,248, 47,229,137,189,127,126, 89,255, 0, 71, 16,255, 0,239,127,229,235,254,107,186, 95, -223,150,127,209,197,255, 0,107,255, 0,247, 93,212, 32,130, 70, 78, 83,156,121,142,227,167, 97,235,175,129, 39, 36, 96,158,227, -228, 15,174,116, 63, 75,230, 63,243, 31,228, 79,233,198, 61,174,163,175, 50,254,235, 47,229,137,191,255, 0,126, 86,112, 79,247, - 56,187, 99, 63,227,127,235,216,255, 0,154,238,144,250,101,100,228, 15,103, 9,200, 56,255, 0, 59,241,143,159, 95,228,189,168, - 65, 28, 19,201,158,160, 12,125,189, 71, 93,124,228, 56, 61, 58,142,199,215,215, 67,244,190, 96,127,246,143,242, 39,244,227, 34, -170,163,188,157, 61,195,242,196,224, 26,250,101, 42,117,105, 66,125,155,238,173, 74, 90, 16,134,216,226,229,114, 31,117,110, 45, - 45,180,204,120,237,112,184, 87, 34, 67,142,173, 8,109,180, 2,183, 28,113, 40, 64, 42, 80, 26,145,125,139,237, 28,187,106,123, -107, 97, 92,219,161,195,163, 59, 99,184,215, 61,173, 2,228,186,182,189,141,220, 55,106,172, 25, 85, 68,137, 81,173,154,141,204, -118,206,154,106, 53,248,244,231,225,154,131,105,167, 50,136,178,214,252, 70,220,146, 35,151,215,249,251,123, 18,120, 79,167,111, -111, 18,114,247,186,251,163, 49, 85,218,222, 24,163,210,111, 53,194,156,128,245, 62,228,222, 74,163,175, 29,169,183,157, 96,172, - 9,108, 83,222,131, 80,184,101, 52,174,132,209, 41,225, 89, 75,196, 25,105, 85,110, 39,101, 73,126,161, 41,197,174, 75,239,169, -114,139,171,241, 63,239,176,162,251,170, 86,121,157, 65, 89,113, 67, 7, 35,169, 4, 18,115, 82,113,247,137,217,238, 79, 87, 22, - 91,147,230, 34, 26,136,198,185,156, 69, 79, 33, 23,221, 80, 44,145, 56, 6,222, 98,116,157,153,122,110, 71, 99,125, 27, 60, 13, -161,241, 3, 47,175,226,174, 50,162,122,236,146, 71, 48, 81, 64, 36,150, 14,107, 70,214,150,114,244,239, 20,133,117,222, 36, 93, - 65,110,172, 77,203, 45,186,186,215,180, 61,151,139, 72, 78,210, 40, 56,230, 50,147,125, 47,149, 37, 77,151, 65,231,254, 5, 97, - 72, 9,229,201,242,231, 29, 51,240,235, 38,139,199, 80,146,160,145,181,193, 5,104, 75,168,255, 0,223,202, 78, 90, 39,195, 82, -214, 13,164, 11,120,116,164, 96,142,161, 65, 94,120,215, 37, 97,212,227,199,149, 78, 9,151, 17,105,146, 42, 43,109,228,184,158, - 66,150,152, 96,162, 49, 81, 60,133,229, 15, 16,124, 93, 73, 25,192,198,117,127,135,119,198,133, 85,181,154, 92,152,232, 50, 28, -186,224, 45, 77,133,168,134,145, 77,106,160,134,156, 25,228,241,210,136, 43, 91,107, 60,205,168,199, 90, 80, 50,188, 26,248,120, -191,199, 91,223, 62,222,224, 91,217,168,122, 27,111,255, 0,163,123,205,183,183,173,183,183, 70,215,125, 26,252, 47,211,253,139, -131,216, 17, 28,143,189,110,104,215, 17,164,174,118, 53,123,111, 17, 95, 80, 78,224,219, 29,102,143,198,144,125,124,131,109, 74, - 72, 74, 85,145,120,165,105,198, 84,135, 7, 50,109,142,133, 46,164,167, 31,102,112, 78, 53,145,195,226,200, 74,117, 13, 42,195, - 67, 36,164, 41,197, 27,185, 11, 13, 21, 41, 73,194,147,252, 30, 10, 94, 8, 28,197, 41, 32, 5,103, 39,166,121,115, 2,240,167, - 70, 20, 80,180,187,134,229,185, 73,145, 29,134,150,242,101, 73,157, 30, 64, 97,134,152, 42,230,117,245, 61, 19,152,140,164, 39, - 42, 42, 1, 32,105,211,165, 85, 16,235,177,228, 37,200,205, 55, 48,170, 47,130,211,169,144,168,175,186,194,157, 76, 57, 13,129, -240,203, 11,104,243,140, 39,147,168, 74, 84, 64,202,195,197,222, 56, 99,182,126, 45,113,183,178,209,131, 98, 7, 66,105,253,247, -233,115,110,128, 3,138,247, 55,240, 35,129, 40,195, 21,225,118,129, 72,107, 19, 85, 94,119, 82,194,219,213, 27,146,171,175, 96, - 71,152,124, 11,113,237, 58,246,213,110,191,179,158,220,176, 55, 74, 7, 3, 3,126,182, 34,238,121,155,106,229,220,202, 87, 17, - 78, 89, 19,118,199,113,165,190,239,212,246,205,239,105,183,176,245,193, 6,220,171, 67, 74, 62,167,174,138,129,141, 46,106, 28, -166,201,143, 6, 89,138,153,124,121, 63, 76,188,131,211,217,192, 8,233,212,113,129,228,124,255, 0,205,115,211, 93,240,187,108, - 11, 23,121, 44, 27,215,104,183, 62,212,167,238, 22,218,110, 61,183, 91,177,239,203, 66,160,208, 85, 46,224,160, 85, 98, 2,253, - 61,213,161,121,131, 48, 56,162,244, 73, 72, 34, 68, 57,212,248,242,227, 45,183,153,109, 73,252,231,120,230,246,106,239,183, 6, - 60, 82, 94,220, 62, 83,108,205,193,221, 91, 81,182, 13,241,179, 87,213,187,104,220, 55, 36,155,231,104,106,242,164, 10, 21, 78, -166,154, 13, 41,239, 10,232,165,186,219,212,154,235,124,169,228,168,210, 87, 32, 1, 30,100,114,171, 79,131, 60, 72,204,115,136, - 37,165,205, 43, 2, 87, 83,141, 66, 67, 28, 72,146,161, 61,172,129, 53,165,192,178,216, 50, 16, 84, 54,151,115,201,126, 41,240, - 67,240,133, 90, 87,229,108, 70, 77, 84,193, 66, 19,169,160,115,246, 86,238, 90, 66,143,111, 41,114, 72,109,181, 29, 64, 44,156, -255, 0,191, 47,234, 71,247, 56, 71, 65,159,243,192,245,237,255, 0, 37,221,124,254,252,192,255, 0,251,184, 58,127,233,129,251, -191,146,230,161, 89, 94,176, 47,187, 81,114, 17,117,216,247,149,174, 99,171,195,147,252, 35,181,171,244, 20,198,115,152,128,219, -235,171,211, 88, 13, 56, 84, 8, 9, 81, 4,144, 64, 7, 88,123, 74, 75,159, 19, 69, 14,164, 21, 0,180, 45, 46, 36, 20,146, 20, - 9,109, 68, 2, 15,124,246,212,249, 51,218,185, 55,142,181, 92,123,132,103,248, 46, 42, 15,110,150,246, 51, 0,111,208,133,191, -238,181,241, 56, 81,244,203,137,239,236,225,192, 29,201,226,255, 0,215,254,171,186,248,126,153,120, 29, 15,179,135,175,203,139, -254,159,143,242, 93,212, 32, 71,158, 48, 9,235,223,204,253,191,118,188,167, 39,161,193,199, 83,242, 36,159,221,165,127, 75,230, - 63,243, 31,228, 79,233,193,189,170,162,223,222,111,255, 0, 72,252,177, 56, 1,244,203,201, 56, 30,206, 14,191,250, 95,255, 0, -186,238,190, 43,233,152, 4,128,127,185,195,159, 80, 56,191,234, 62,223,241, 93,212, 32,142,124,128,239,248,116,243,251,245,224, - 2, 84,115,211, 3,186,122,117, 63,111,200,157, 15,210,249,143,252,199,249, 19,250,113,159,106,159,254, 39,224, 63, 44, 78, 11, -251,242,241,128,127,185,197,247,127, 43,254,191,183,133,221, 47,239,203,198, 79,253,206, 35,129,231,252,175,186,125,255, 0,226, -187,211, 80,130, 66, 58,149, 12,115,116, 4,159, 63,159,111,206, 53,240,167,226,206, 58,142,135, 29,189, 58,232,126,151,204,127, -230, 63,200,159,211,129,237,117, 31,183,248, 47,229,137,190, 15,166, 96, 9, 35,251,156, 36, 99,204,241,125,223,236,255, 0, 21, -237,123, 31, 76,184, 28,127,220,226,239,156,127,141,247,167,127,249, 47,106, 16, 24,207,151,108,247,244,199, 92,126,124,181,244, -117,192,232, 61, 63,183,166,135,233,124,199,254, 99,252,145,255, 0, 78, 49,237, 85, 23, 31, 89,248, 47,229,137,191,143,166, 88, - 79,250, 56,122,245,233,252,175,255, 0,163,252, 87,122,235,233,250,101,100,119,246,112,227, 63,243,191,235,248,127, 37,221, 66, - 19, 3,190, 50, 71, 94,159,213,159,150,190,247, 32,249,119,193, 25,253,190, 93,244, 63, 75,230, 63,243, 31,228,143,250,112, 61, -170,163,254, 39,224,191,150, 38,238,126,153,113, 31,232,224, 56,245,254, 87,248,253,159,201,119,166,169, 43,233,153, 17,254,141, -252,140,227, 63,203, 3, 30, 93,255, 0,205,115, 80,137, 32,156,156, 0, 51,142,224,117,245, 61,123,245,213, 5, 32, 17,128, 51, -158,253,127, 63,145,172,254,151,204, 44,127,180,111,255, 0, 68,127,211,140,251, 84,255, 0,183,248, 15,203, 19,121, 63, 76,212, -130,113,236,221, 39, 7, 31,231,129,248,255, 0,201,111, 95, 15,211, 55, 35,183,179,120, 30,153,255, 0, 60, 47,217,254,107,125, -245, 7,245,128, 51,129,133,119,198, 14, 62,255, 0, 77, 10,172,140,244, 29,122,244,245, 31,111,111,237,209,151, 54,175,239, 83, -123,255, 0,129, 63,167, 25,246,169,251,191,224, 63, 44, 78, 33, 95, 76,228,167,253, 27,185, 30,191,203, 11,253,214,245, 72,253, - 51,220, 28,127,115,115, 63,245,194,255, 0,117,175, 77, 65,216,247,233,128,113,149, 30,227, 30,127,111,150,188, 16,112,114, 0, -207, 92, 14,248,249,244,232, 59,232,227, 53,175, 32, 30,127, 95,240,167,244,224,235, 81, 49, 23, 50,126, 3,242,196,226, 85,244, -208, 57,127,209,181,145,235,252,176,255, 0,221,103, 84,207,211, 67, 35,253, 27, 63,135, 24,191,238,177,168, 57, 45, 35, 56,193, -193, 29,252,191, 31, 95,234,208,235, 73, 57,230, 30,125,255, 0,163, 74, 46,103, 90,127,223,127,149, 63,167, 0,212,205,183,155, -175,184,126, 88,156,137,250,105, 24,200,254,230,199,108, 99,252,113,123,255, 0,217, 99, 84,213,244,210,249,127,209,175,159,250, -227,126,239,228,175,168, 52, 41, 61, 72, 62, 89,255, 0,142,168, 41, 56, 62,164,103, 31,126, 58,232,227, 50,173,255, 0,141,127, -251, 83,250,113,145, 81, 41,232,255, 0,128,252,177, 57,179,244,211,113,219,217,173,147,233,252,177,255, 0,221, 95, 94, 15,211, - 80,198,127,238,106,246,242,254, 88,253,127,254,213,181, 6, 5,142,164,147,229,220,116,200,251, 71, 97,211, 84,150, 6, 51,159, -179,211,246,104,227, 48,172,218,243, 94,253,244,175,244,227, 62,209, 55,237,254, 3,242,196,231,207,211, 85, 32,103,251,154,121, -199,252,242,113,255, 0,229, 87, 84,149,244,214, 72,255, 0, 70,150, 71,254,153, 61,191,236,169,168, 45,169, 56,237,219,247,143, - 95,191, 67, 44,117, 35, 3,175, 92,104,195, 48,171,190,242,237,255, 0, 74,254, 88, 56,158, 75,253,187,253,195,221,238,196,233, -215,244,215,249, 15,254, 13, 12,143, 95,229,149,251,191,146,159,174,168, 31,166,202, 57,185, 71,179, 56,159, 60,255, 0, 44,190, -159,179,133, 62,250,130,147,205,243,116, 35,207,203,167,159, 76,103,203,250,244, 42,153, 60,221,200, 3,183,150, 62,206,158,154, - 88, 86,212,216,125,109,255, 0,237, 95,203, 6,231, 73,183,159,240, 24,157,183,247,236,196,140,143,102,104,199,110,188,102,224, -231,211, 31,201, 71, 94, 15,211,105,229,239,236,204,199,253,115,191,221, 71, 80, 71, 82, 0,206, 51,208,227,167, 94,222,154, 25, -105, 72, 7, 35,174,124,242,122,252,243,246,104,235, 89, 57, 27,203,191,192,126, 88,199, 58, 77,183,189,253,195, 19,188,254,253, -183,254,140,191,251,103,127,186,134,150,160,120, 80, 60,142, 63,111,239,210,209,253,170,163,254, 39,224,191,150, 13,205,147,246, -191, 1,249, 99,234, 65, 0, 3,249,235,162,146, 15, 64,123,244, 31,156,106,138, 70, 79,203,207,243,246,232,132, 12,159,179,175, -223,157,105, 22,185,191, 75,116,194,120,174, 1, 61,189,113,249,249,106,176, 0, 96,121,121,254,253, 83, 70,122,244,200, 36, 12, -231,183,231, 58,174,144, 14,115,158,131, 61, 52, 76, 12,123, 74, 74, 73,234, 49,249,252, 52, 66, 7, 76,250,254,204,106,130, 50, - 71, 92,224,158,153,235,223,231,231,253,154, 41,180,246, 7,203,169,252,253,186, 65,141,205,241,131,176,191,166, 43,163, 29,135, -197,143, 79,159,217,162,144,140,142,131, 3,207,237,253,231, 84, 17,208,244, 3,175,125, 20,140,253,223,191, 68, 98, 69,192,194, - 36, 91,248,227,210, 7, 98, 79, 83,230,122,244,253,253,180, 72,193, 3,207,211,167,159,110,218,164,145,147,246,117,209, 9,237, -140,128, 1,200,251, 71,223,219, 73, 49,185,233,108, 99, 21, 18, 0,193,193,235,223, 61,241,233,162, 83,140, 14,157, 60,134,124, -191,118,168,164,115, 31,219,247,116,237,162, 80,158,163,167, 65,235,162,147, 97,115,219, 4,244, 23,177,255, 0,199,207,250, 98, -170, 64,242, 3,229,162, 82, 9,192,249,119,249,252,245,118,183, 45,171,130,238,172, 83,173,203, 86,135, 85,184,238, 26,180,164, -196,164, 80,104, 52,233,117,122,213, 90, 99,129,106, 68, 58,109, 46,158,203,143,206,146,164,161,100, 33,180, 40,242,182,165, 16, - 2, 73,213,222,187, 99, 94,182,156,151, 98, 93, 54,117,215,108, 74, 96,148, 63, 30,227,182,235,180, 39, 90, 90, 78, 20, 28, 77, - 82,158,215, 41,230, 7, 90,109, 60, 43, 32,137,165, 81, 43, 11,133, 36,106,181,237,123,117,183,107,224,250, 36,229,180,162, 54, - 49, 41,179, 56, 83,164, 27, 94,197,173,164, 27, 88,218,247,182,248,198, 80,144,123,128, 8,207, 65,220,156,249,122,157, 86, 70, - 62, 33,143,179,215,239,252, 63,110,188, 32, 18, 50,217, 14, 1,220,161, 73,115,211,185, 65, 56,237,162, 27, 73, 86, 58,128,125, - 7,127, 95, 61,101,136,223,126,191,127,195, 26,250,131, 11,131,127,120,239,138,168, 73, 56,233,212, 12, 30,190, 64,234,179,125, - 79,108,128, 65, 3,191,221,251, 53,245, 40,236, 58,103,190,122,253,191,187, 85,144,140, 43,169, 3,207,228,114, 15, 95,217,164, -240, 49, 84, 39, 42,193,232, 59,129,129,148,140,118,207,225,175, 74,108,245, 4,242,143, 47, 81,233,175,160,149,103, 24, 10,245, - 30, 99,243,231,175, 67,174, 2,178, 51,230, 48,123,121,159,195,246,235, 24,199,195,174, 40,165, 56,206, 85,212,156,142,157,254, -204,246,215,148,164, 2, 50,163,223,238,235,242,243, 58,172,224,201, 29,122,122,142,157, 51,140,159,151, 93, 92,168,148, 58,189, -195, 84,167, 81, 40,116,202,141,102,177, 88,152,213, 58,145, 73,165, 65,153, 85,171, 85,170, 18, 20, 16,196, 10, 77, 42, 3, 46, - 72,169,206, 90,136, 8,101,134,214,226,179,209, 58,195, 50,162,150,118, 10,171,185, 39, 96, 48, 91,133, 2,231, 97,181,254, 54, -183,239,197,153, 93,240, 57, 64, 30,106, 3,174, 51,128, 61, 53,233, 88, 67, 69,215, 84, 27,101, 56,241, 29, 89, 8,105, 40,238, -165, 21,172,129,140,103, 82, 39,224,247,232,242,113, 5,186, 44,209,175,126, 45,110,120,252, 41,109,245, 65, 45, 76, 98,212,168, -192,137,115,111,205,126, 34,210,167, 80,219, 22, 95,189, 38, 13,132,167, 80,143,133, 85,151,221,152, 18,178, 69, 47,152, 99, 82, - 25,217,126, 4,125,158,220, 32, 70,111,248,177,225,226,214,187,174,202, 84,112,204,221,208,222,132,198,220,171,212,205,121,104, - 12, 72,241,238, 54,151, 77,163,211,164, 45, 56,103,220,169,241,154,109, 74,229, 79, 82, 64,134,103, 28,115,148,101,101,145, 24, -213,204,187, 89, 14,215,247,144, 9,248, 27, 91,212,226,216,224,191, 5,184,251,142, 12,111,150,229, 38,134,142, 80, 8,158,164, - 20, 4, 18, 0,100,140,217,216, 94,195,204, 99,185,176, 23, 36, 3,170,254,203, 46, 26, 46, 77,165,224, 39,102,233,180,203, 98, -123, 55, 94,240,135,247,210,247,144,229, 50, 82, 28,149, 42,249, 17,191,130, 80, 39,169,184,229, 79,197,133, 96,194,183,154,100, -100, 99,197,117, 73, 37, 43, 81, 86,234, 87,236,203,238,132,204, 33, 46,221,170, 32,138,139, 45, 45,243, 6, 98, 99, 20,165,137, -143,123,195,179, 60, 34, 27, 65,240,249, 15, 57, 79, 42,214, 17,130, 72, 35, 99,155,223, 42,234,221,136,202,101,194,143, 66,171, -184,105,112,211, 76, 5,132,211,101,181, 28,123,180,100, 71, 82, 83,238,168, 82, 80,227, 9, 67, 73, 8, 14, 54,132, 97,180, 20, -130, 37, 39,125, 42,234,171,170,153, 34,124,151,131,206,170, 19, 32, 54, 57,101,207,141,200,137,172, 48, 57,190, 37, 8,222, 27, -165, 60,170, 39, 42, 9, 10,109, 42, 35,158,243, 89,104,243,106,250,186,249, 38,156,203, 86,236,231,104,202,139,157,149, 87, 85, -236, 1, 10,190,110,130,198,230,248,244,231,129,168,248,183,129,184,107, 38,225,202, 14, 30,163,155, 47,200,105, 99, 77, 38, 89, -121,146,114,215, 68,146, 59, 8,236,178, 22, 87,121, 1, 82, 69,181, 95, 73, 7, 26, 81, 90,169, 61, 79,168,208,167,204, 91, 44, -184,170,148,168, 83, 66, 11,141, 70,124, 78,167, 84, 35, 51, 29,198, 66,130, 11, 8,121,168,165, 36,146,181, 41, 14, 44, 21, 40, -224, 88,100, 92,178, 84,252, 41, 12, 58,134,169,236,223, 20, 56, 17, 31, 91,158, 31,213,209,106, 45, 85,162,212, 38, 53,239, 67, -159,220,194,222,100,171, 9, 37, 41,111, 45,133, 37,120,214,238,238, 21,145,110,110,237, 53,104,141, 18,147, 65,187,160,213,226, - 84,226, 75, 44, 52,154, 77, 70,163,111,200,247,152,240,235,208,227,114,167,192,113, 14, 20, 25, 44,164, 59, 28,191,226, 56,135, -145,206,141,115, 74,240, 69, 70,139, 58,226, 93, 94,157, 42,151, 38,217,171,209,163,191, 18, 75, 72, 91,241,167,211,107,148, 86, -235, 13,120,141,225, 15,143,117,147,200,218,176,158,118,242,164,158, 78,241, 42,202,121,105,230, 69, 46, 37,138, 83,229, 96, 54, - 39, 96, 53, 11, 27, 48,191,217, 61,150,247, 32, 99,163,184, 11, 53,202,248,178,154, 72,228,131,244,126,105, 66,170,147,211, 72, -202,218, 17,229, 26, 94, 18, 8, 15, 27, 23,116, 14,187, 34, 6, 89, 17, 67,170, 54,206, 82,238,185,177,160,198, 76,229,153, 13, -208,110, 74, 4,198,235, 44, 56,149,128, 69,106, 35, 41,155, 33, 8,201, 46, 37,233,173,153, 1,226, 91, 60,203, 41, 39,176,223, -221,171,219,215,238, 40,178, 42,213,233, 10,163,209,233,181, 8,142, 38,114, 84,251,110,185, 54, 35,209, 31, 13,197, 91,138, 79, -143,206,150,212, 57,242,124, 38,229, 16, 84, 73,240,213,204, 75, 50,143, 87,173, 84,164, 89, 20,181,168, 46,225,151, 26,159, 71, -109, 65, 14,184,229,111,223,226,166, 53, 41,224,179,148, 64,114, 79,132, 90,113, 73,200,104,184,146,174,118,146, 79,101,175,201, -205,219,204,155,102,128,180, 26,125, 18, 28,150, 98,195,105, 10, 14, 85, 92,139, 49, 44, 74,113, 69,160, 66,149, 34, 98, 36, 58, - 20, 83,202,178,235,104, 56, 3, 26,125,225,170,120,167,231,215, 85,141,112,211,105, 68, 66,108, 25,200, 98, 1, 35,204, 2,129, -118, 32,139,221, 73,211,171, 88,164, 60,112,168,124,170,167, 38,200,178,103, 72, 51, 44,237,231,149,166, 81,253,213, 50, 10, 79, -172, 10, 67, 42,201, 44,175, 42,128,126,168, 90, 67,176, 82, 27, 44,157,124, 91, 86,163,172,210, 40,209, 33, 66,112,182,149, 48, -228,143, 4,186,243,202,144,134,136, 71, 50, 71, 59,195,196, 43,253, 81,128,121,143, 54, 9,213, 9,123,191, 49,153,245, 55, 35, -206,109,168,116,233,113, 41,236,173,165,115,203,126,108,150, 24,126, 66, 34,165,149,164, 32, 41,215,163,182,233, 78, 22,166,155, - 90,143, 48,108,145,165, 85, 75,154, 37, 70,161, 46,164,219,243,155,165,183, 95,162, 83, 41,204,184,183, 31,120, 38, 3,190, 45, -101,232,203,231, 40, 76,115, 83, 50,127, 74, 20,164,143,112, 40,242, 9, 31, 98, 92, 79, 79,129, 78,140,203, 11,121,138,245, 72, -215,101,185, 49,196, 39,158, 19, 18, 21, 36,165,158, 84,115,163,196,105,234,116,116, 44,252, 60,143,172,114,249,234,105,237,243, -234, 88,226,151,149, 96, 84, 34, 93, 22,215, 29,128, 4, 3,181,141,183,216,168,177,185,166,163,240,166,136, 67, 12,245,145, 53, - 84,238, 0,153,166,177, 96,204, 18, 87, 55,144,155,186, 70,146, 43, 45,216,107,212, 1, 59, 91,122,169, 91,167, 70,186,227,184, -197,203, 10,131, 87,163,189, 10, 69, 85,214,171,148, 90, 69,113,166, 35, 70, 56,136,137, 81,234,204,184,151,100,173,214,164,200, -104, 6,254, 24,254, 26,193, 30, 33,214,177,238,127, 2, 62,206, 30, 34,208,151,119,167,131, 14, 31,170, 51,171, 76, 70,150,170, -189, 2,208,133,100, 93, 16,152,156,135, 92, 15,166,232,176, 13, 54, 74,101,165,135, 57,220, 33, 69, 97,249, 39,169,192, 0, 26, - 93,210, 95,153, 46,142,195, 48,212,207,240,138, 76,170,188,247,144, 86,212,166, 41,209, 88, 17,109,147,200,217,240, 91,113,230, - 10, 86,128,162,166, 98,165, 96, 97,201, 9, 78,178,250, 69, 65,249,177,152,150,228,245, 53, 78,141,239,234,159, 40,211,220,125, -234,189,102,123,128,204,166,210,121, 79, 70,152, 89, 40,114, 90,121,185, 11, 65,166,199,232,221,121,189,200,179, 42,152, 93, 92, - 75,230,181,135,235, 18,204, 69,152,107,221, 75, 2, 72,234, 69,174, 46, 14, 32, 60, 65,225, 38, 67, 80,102,246,156,185, 96,142, - 64,186, 65, 26,216, 43, 6, 40, 6,149,221,157,212, 46,150, 93, 69, 68,110,116,131, 41,199, 40, 55,231,232,175,112, 39,186, 52, -233,149,158, 27,247,143,120, 56,116,174,173,153, 18, 34,210,174, 57,144,247,130,194,102, 74,185,149, 26, 52,200, 23, 10,162, 86, - 96,176, 86,182,130,146,213, 93,197,161,183, 1, 8, 39,149, 38, 53, 60,110,123, 1,189,162, 92, 20, 64,171,222, 82,246,226, 47, - 16,123, 65, 75, 15, 72,127,116,120,126, 77, 82,239, 20,202,115, 40, 46,174,117,219,183,111, 65, 69,126,215, 97, 8,232,243,169, -139, 58, 27, 74, 74,185,166,114,142, 99,250, 18,209, 46,181,183,224, 68,113,102, 52,106,107,177, 37,200, 76, 89,105,113,113,218, - 56,118, 12, 55,101, 50, 10,230, 23, 86, 85, 37,215,208, 22,167,192, 67, 77,169, 69,206,125,108,205,177,123,137, 81,132,228, 77, -240,230, 79,154,105,244,170, 68,172, 70,170, 45, 44,243, 23,229,205,128,165,133,198, 42, 67,110, 60,176,176,144,220, 86,155, 75, -156,175,184, 82, 37,249,111, 22, 85, 64,218, 42, 36, 46,150,235,171, 86,247,176,186,185, 5,172, 47,228,140,198, 46, 44, 72,234, -121,147,139, 60, 39, 92,176,153,168,117, 68,140,198,218, 71,144, 3, 98,138, 64,212,159,103, 84,140,214, 0, 32, 12, 28,131,124, -126, 50,105,198, 21,146, 20, 2,150,143,132,228, 7, 26, 81,109,214,212, 65,248, 92, 74,194,146,164,156, 20,169, 37, 42, 0,131, -165,219,161,234, 58, 18, 58,228,124,254, 71, 95,166,111,180,163,216, 17,194, 7, 31,240,238, 45,193,218,248,212,110, 26,248,173, -144,137, 82,206,229, 89, 52, 54, 25,176,183, 2,186,219, 40,113, 49,183,135,111,169, 74,106, 53, 73,215,223,228, 75,245,122,111, -187,214,152, 50, 20,235,206, 84, 2, 61,217,127,158,255, 0, 24,156, 20,241, 33,192,134,239,206,217, 30, 38, 54,238,125,139,118, -182,211,245, 43,118,166,211,159, 90,217,123,137,109, 53, 37,113,155,187,182,234,235,101,180,177,115, 80,148,226, 64,116, 0,220, -200, 46,171,221,234, 49, 34, 72, 30, 25,177,178,252,214,159, 48,137, 36,141,135,159,161, 6,234, 78,231, 77,251, 48, 0,221, 90, -199,202,197,117, 32,214,105,170,234, 26,172,186, 65, 29, 84,101, 65, 54, 87,177, 10,215, 32, 13,141,138,150,236, 14,199,245, 75, -111,141, 87,232, 7, 78,223, 46,186,240,164,147,156, 28, 3,215, 4,145,249,235,175, 68,129,142,189, 7, 76, 99,191,151,125, 32, - 65, 39, 61, 71, 76, 36,140,103,167,252,116,233,141, 78,248,166, 18, 9,199, 92,122,143, 95,234,239,175,161, 36,250,244,200, 30, - 93,115,158,191,142,170,121,127,171,248,116,215,196,144, 1,202,147,156,231,167, 92,228,232, 96,111,143,129, 56, 33, 89,201, 25, -230,243,242,215,164,117, 4,143,135, 25, 61,115,251, 63, 29,125,233,140,254,206,216,252,245,215,209,215,246, 12, 1,220,121,253, -253, 52, 48, 58,123,176,136,207, 68,245,233,231,142,164,103,246,106,130,219,198, 9,242, 61, 70,124,244, 78, 14, 58,140,121, 2, - 70, 49,246,252,191,175, 84,207,110,131, 39,246,103, 63,212,127,167, 88, 6,255, 0, 17,140,224, 37,160,224,249,103,215,184,207, -168,252,247,208,170, 64, 0,231, 36, 18,123,250,252,190, 90,184, 57,205,158,184, 61, 58,231,190,125, 58,121,245,208,238, 32,242, -231, 4,117,232, 58,231,175,203,236,214, 65,232,122, 99, 32,158,221, 78, 45,197, 1, 39, 32,245, 29, 49,158,152,199,174,188, 20, -231, 36, 28,121, 28,159,179,207,240,209, 42, 73,234, 20, 7, 79,245,123,146,126,126, 67,174,168,242, 12, 40,100, 99,166, 0,243, -235,158,231, 75,169,184,235,131,168, 34,219,109,243,243,111,195, 3, 40, 3,212,147,129,248,125,186,160, 70, 70, 63, 35, 70, 41, - 35, 56, 30,153, 63, 44, 13, 12,180,144, 73, 3,167,246,126,206,186, 81, 79,108, 24,216,116, 23,254, 71, 0,184, 0, 32,116,206, -122,159,217,215, 31,158,154,162,160, 78, 58,100,103,175,175,221,163, 20,147,230, 7,221,216,158,250, 25, 89,201,230, 56, 39,183, -207,211, 31,119,244,105, 92, 1,208, 95,113,129, 22,128,114, 64,199,200,249,250,140,104,117, 35,166, 6, 1,239,246,103,200,244, -209,138,206, 65, 56,207,160,242,208,199,169,200,207, 95, 92, 14,221, 63,118,149, 7,160, 39,167,207, 95,158,248, 54, 5, 87, 76, -228,103, 25,253,159,187, 66,172,116,206, 15, 78,216,253,164,244,237,211, 70,172,100,142,152,235,220, 30,253,124,255, 0, 62,122, - 25,196,228,156,100, 1,208,227,182, 79,228,104,248, 50,250, 91,127, 92, 91,215,128,112, 14, 73, 39,167,161, 29,123,232,115,223, -168,235,158,191,184,104,199, 19,144, 83,211, 62,126,189, 61, 63, 13, 12, 80, 70, 78,114,125, 15,225,223, 58, 89,122, 97, 81,107, - 3,210,216, 29,105,243, 25,206,133, 90, 72, 39,183,153,251, 62,223,150,116,105, 25,251,186,250,103,228,126, 90, 25,105,206, 73, -200, 62,126,125, 59,253,250, 85, 79, 91,157,176, 69,216,144,119,183,250, 96, 34, 48,113,165,175,107, 73, 39, 35,175,224, 52,180, -174, 15,113,220,216,227,234, 49,143,233,209, 40, 24, 3,231,215,243,247,106,128,198, 6, 1, 31, 35,223, 85,211,204, 59,128, 49, -233,223, 61, 58,233, 18,118, 3,231,221,140,226,178, 60,250,253,223,191, 85,209,220,253,157,189,127, 63,191, 84, 81,143, 33,215, -204,234,178, 6,122,231,177,237,249,242,254,173, 16,157,137,190, 6, 8, 78,112,112, 70, 7,124,143,196,244,243,233,162, 27,234, -126,239,234,213, 4,125,189,188,191,126,189, 18, 64, 86, 14, 8, 30,125, 1,207,244,255, 0,102,181,216,133,193, 78,224,142,199, - 7, 54,115,211, 61, 62,206,158,126, 99, 69,164, 14,128, 16,123, 15,151,236,213,189,146,233, 74, 78, 19,142,153,251,112, 63,171, - 71, 55,223,162,122,140, 28,224,246,249,233, 34,215,194, 71,174, 43,165, 61, 65, 57,232,123, 99,191,167,237,209, 9, 0,142,169, -249,103, 39,175,175,217,170, 64, 18, 71,145,233,231,230,123,231,229,170,232,200, 36,116, 29,135,203,168,243, 62,103,182,176, 73, - 61,123, 96,167, 21,209,156, 1,208, 14,195,241,243,249,104,148, 3,216,156,228,224,103,250,117, 65,160, 72, 29, 58, 3,231,163, - 16, 58,231,175,203,211,211, 73,191,175,207,108, 99,107,145,181,206, 58,159,236,114,180, 36,215,120,223,178,238,166, 92,121,134, - 54,178,207,191,175,249, 50,154, 42, 65,101,248,212, 39,104, 52,196,151, 17,213,181, 46,101, 96,132,144, 65,248, 62,103, 82,170, -147,119, 79,171, 52, 99,214, 12, 27,130, 56,200, 92, 43,154,147, 73,175,197,113, 32,149, 96,181, 85,136,238, 83,215,166,114, 61, -117, 30,111, 98, 93, 13, 12,206,226,110,249, 80, 74, 93,129,102,217,118,147, 11, 61, 22,147, 89,172,205,170, 73, 66, 84, 58,128, -180, 66,104, 17,242,215,110, 85, 89, 62, 34, 74, 78, 18,162, 18,178, 78, 2, 72, 24,243,252, 53,207,158, 33,214, 52,188, 67, 60, - 91,218,146, 56,163, 6,254,160, 73,191,190,242, 16, 55,233,143, 67,190,140,252, 57, 24,240,222, 10,185, 97, 89, 6,113, 87, 87, - 57, 12, 1, 4, 44,130,152, 2, 8,181,138,211,143,223,140, 91,113,184, 80,224,223,122, 90,127,248,197,225,195,111,141, 78, 74, - 74, 28,185,236, 6,100,109,189,210,202,149,255, 0,194, 25,155,109, 45,182, 30,116, 14,184,114, 58,193, 35, 36, 29,114,235,126, - 61,136,232,153, 30,101,195,194, 78,234, 11,142, 74, 18,167, 81,180, 59,192,184, 84, 27,145,224,126, 38,225,219, 27,129, 13, 41, -129, 85,124,254,171,109, 79,106, 42,220, 56, 5,240, 78, 79, 93,141,126, 51,110,161,151, 93, 72, 82,213,250, 21,147,128,162,159, -242,172,156,116, 75,192, 96,143,245,128,214,109,101, 34,179,125, 87, 98,219,150,188, 73,117, 58,171,235, 8, 75,113, 88,113,228, -190,130,160,148, 6,130, 7,194,176,163,212,158,137, 41,207,108,226, 37, 67,197, 89,254, 85, 44,107, 65, 92,242,128,109,202,127, -172,140,251,130, 53,244,131,234,154, 77,174, 21,133,241,105,113, 79,128,254, 26,113,109, 13, 76,249,182, 65, 22, 83, 80, 16,177, -174,164, 11, 73, 52,123,127,120,210, 70,162, 57,108,123, 78,146,165,250,169,223, 16,133,191,246,226,251,218,171,186,173, 97,110, - 77,165,112,216,183,165, 5,229, 49, 86,182,110,106,115,212,202,172, 69, 5, 40, 7, 80,219,163,150,100, 37,129,150,164, 48,167, - 88,117, 63, 19,110, 40, 29, 97,233,193,243, 24, 29,250,143,184,116,215,232,143,190, 62,204, 45,147,226, 95,110, 34,219, 28, 90, - 85,225, 64,173,211, 34, 4,217, 87, 45, 7,192,123,116,108, 57, 14, 35,197, 13,193,172,182,131,239, 52,194,172,248,180,249,101, -232,171,201,194, 80,172, 40,106, 85,157,236, 48,246, 94, 89, 49, 96, 11,150,111, 16, 59,185, 80, 43, 83, 18, 93,168,222, 84,251, - 54,159, 41,214,155,241, 92, 81,129, 64,166,133,196, 36,117, 74, 67,170,207,108,116,206,173,202, 63, 17, 40,214,142, 55,205,233, - 13, 21,112,217,227, 87,141,135,185,128, 46, 29, 67,117,210,202, 74,244,212,246,213,142, 20,207,126,143,124, 95, 14,119, 61, 31, - 6,200, 56,195, 36, 55,104,107, 68,114, 83, 2, 59,199, 46,168,204, 70, 69,177,250,200,100,120,157,124,223, 84, 73,137, 96,225, -130, 70,121, 22, 8,237,202,133, 96,250, 28,227, 72,168, 32, 0, 58,146,113,140, 31, 63,151,222, 53, 61,230,125,146,190,201, 76, - 62,208,225,254,252, 87,128,217,112,248,251,193,118,173,197, 4, 39,152,242,173, 11, 29,115,211, 32,117,193,211, 69,186, 94,193, -159,103, 5,247, 75, 55, 6,222,220,187,247,177,170,142,168,178, 84,212, 27,150,141,124,210, 39, 70, 74,144,228,182,226,199,187, -233,222, 60, 23, 11, 1,196, 7, 82,242,195,107,113, 42,240,151,142, 83,177, 77,226, 46, 75, 83, 47, 41, 81,193,177, 55,242,216, - 0, 46, 73,185, 22,183,223,238,190, 25,235,190,143,254, 42,229,177,123, 69, 87, 14,170,171, 21, 80, 22,161, 11, 51, 57, 1, 84, - 2,160, 93,137, 3,114, 63,142, 35, 1,192, 79,179,155,127,248,252,190,165,208,246,210,151, 26,220,219,219, 90, 68, 49,185,187, -209,119,179, 45,157,189,219,184,210,112,227,112,228, 57, 29, 33,219,162,244,145, 27,153, 80, 40, 80, 57,165, 61,128,236,151, 33, -196, 10,146, 38,173,194, 71, 5, 92, 32,251, 61,109,198,127,137, 11, 71,248,111,187,134, 47,186, 92,156, 68, 95,208,233,213, 77, -203,169,188,166,210,220,230, 45,176,210, 20,198,221, 91, 60,222, 42,147, 78,163,161, 14,132, 16,169, 50,102, 40, 41,100,251, 2, - 70,221,108,222,222,208,118, 35,135,219, 98,141,182,187, 99,183, 80,221, 22,253,169, 5,240, 28,175,120,202,109,117, 43,158,224, -172,168, 42, 69,193,113,212,166, 35,154,109, 86, 73,117,239,122, 88, 75,220,172, 22,219, 70, 15, 39,112, 35,202,153, 34,108, 9, - 83, 16,228,242,167, 30,167,205, 67,209,101, 60,247, 40, 75,203,132,133,184, 16,103,115, 6,213,204,193,117,183,249,130, 73, 35, - 5, 53, 87, 20,120,131, 91,154, 84, 73, 73, 68,198,158,137, 73, 10, 65,221,198,214,239,181,250,134,185,234, 8, 61,113,217, 30, - 12,253, 20, 41, 50,184,169,243,158, 45,133,115, 76,244, 44,114,114,236, 90, 10,109,118,101, 69, 7,109, 69,110, 68,166,247, 32, -244, 91, 5,122, 46, 93,207,151,112,185, 82, 84,201,237, 85,196,152,174,184, 88,241, 23,239,197, 8,146,129,239,112,210,195,217, -143, 82, 97,220,134,151,240, 7,148,160,230, 82, 64, 42,108, 46, 11,170, 52,200,142, 42,108,229, 75,154, 25, 10,128,251,176,220, - 69, 62,231,164,248,160, 73,129, 34, 43, 32,148, 79,109,191, 21,101,149, 97,198,164, 54, 36, 52,149, 5,184, 19, 97,136,251,117, -212, 9,207, 47,222, 75, 83,204, 70,166,198,109, 84,203,178,149, 49, 96, 25, 28,237,178,132,166, 28, 66,181,167, 45,188,144, 84, -217, 47, 45,181,163,161,199,231,178,168,238, 61, 67,174,165, 50, 30, 68,210,138,101, 69, 41, 66,226,214, 24,154,175, 18, 68, 23, - 25,200, 16, 43,237, 53,206, 89, 40, 41,101,229, 18,227, 11, 67,153,107, 85,228,149, 94,103,214, 88,177,181,218,251, 49,190,198, -219, 19,126,194,199,107,117, 59, 14,220,202, 56,115, 41,161,100,166,134, 46, 65,164,220,199, 24, 80,202, 6,149, 99, 29,208, 93, - 86,200,179, 38,148,109, 12,205,160, 36,107, 36, 87,151,170,161,165, 46,223,113,167,151, 78,170, 42, 43,148,218,139,143,133, 60, -212,244, 50,100,136,203,150,242,135,136,250, 60, 22,164,198,112,144,183, 19, 29, 76, 58,165, 45, 0,185,112,131, 94,118, 83,239, - 68, 41,110,145, 84,110, 85, 61, 77, 75,109,178, 94,166,215,169,104, 8, 67,209,226,188, 8,118, 28,136,175, 69,146,129,147,227, -180,167,144,130,160, 73, 24,237, 74,148, 41,180,184,241,225,200,118,224,181,231, 71,136, 98, 84,161,159, 30,183,110, 75,101,207, -122,101,135, 67,139, 34,171, 78, 67,173,161, 72,116, 98, 92, 85,128,204,132, 60,193,241, 18, 44,199,101, 84, 85,252, 43,112,177, - 42, 84, 4, 52, 95, 52,245, 4,179, 84,167,160, 46, 60,163,202, 84, 82,137,173,158,119, 35, 43, 36, 50,180, 41,160, 2, 22, 0, - 48,114,196,178,177, 80, 55,211,178,238, 64,223,114,118,234, 70,226,196,234,190,160,112,250, 40,232,234, 98, 13, 29,180, 72, 74, -135, 58,129, 51,142, 88, 77,113,191,149, 76,133, 66, 76,142, 54, 49,137, 46,240,201,115,180,187,121,113,159,112,167, 74,168,126, -134,164, 39, 75, 21,246,192, 76,150, 24,152,101, 59, 6,160, 22,251,164, 23, 22, 86, 34,169, 37, 64, 41, 77,186,215,114,156,150, - 43,139, 43, 97,169, 85,218,101,105,162, 25, 69,219,106, 92, 52,234,159, 51,106,114, 59,213,187, 98, 11,114, 96,186,162,129,133, - 58,105, 47, 71, 91,228,165, 74,112,210, 83,241, 18,146, 11,135,106,214, 98, 78,172, 73,102, 43,177,164, 67,184,105,116,249, 76, -184,164, 4, 42, 59,240, 23,245, 98,155,113,151,208, 49, 37,216,174, 66, 88, 82,250, 45,200,200,202,137, 72, 26,161,196, 82,249, - 44,237,191,114,123, 77,202,228,191, 13, 50,108,176,183, 27, 75,109,213, 41, 83,161, 73, 7, 42, 42, 37,230,219,111,224, 71, 41, - 82,129, 72, 56, 26, 82,178,211, 80,176, 96,117, 33, 87, 27,130, 65, 15,123,139,250, 43, 17,247,133,176, 59,154,251, 35,230,229, - 30, 34,101,181, 84,209,154,121,115, 5,168,137,162, 38,222, 89,169,228,145, 35,177, 23,211, 13, 74, 42,128,222, 98,209, 33, 93, -247, 45,207, 13,114,155,103,122, 54,250,161, 33,214, 94,250,215,234,202,139,111,115, 54,235, 9,117,115, 33, 84, 25,247,117,161, - 36,186, 75,171,142,226, 92, 32,132,169, 8,234, 2,250,244,178,232,151, 46, 85, 85, 97, 46,180,218,152,141, 41,185, 10, 82,146, -133, 56, 87, 49,135, 28, 75,206, 54,128, 82,149,182,149,114,148,252, 73, 40, 42, 25, 63,173,202,173,165,149,245, 27, 59,105, 37, -133,198,106, 75, 46,199, 11,153,201,226, 56,179, 68,204,101, 51,206,133, 4,148,184,138,122, 64,229,229,233,145,221, 56, 61, 81, -185, 75, 51, 27,159, 80,109, 41,125,186,148, 24,239, 53, 37,180,135, 92,106, 52,136,171,113, 78,165, 68,140, 37, 16,223, 89, 4, -156,167,195, 25, 30,171,240,236,165,105,234,169,128, 26,161,150,226,251, 18, 25,116,220,216,131,250,167,125,192, 39,222,113, 12, -241,161, 4,252, 89,144,102,166, 63, 45, 69, 19,211,173,192, 32, 52, 53, 5, 73,183,217, 0,172,167, 96,196,253, 93,251,227, 89, -170,116,137,115, 41,150,180, 88,239, 52,228,155,128,190,219,171,105, 45,132, 20, 84,125,242,101,110, 97,109,192, 60, 15, 6, 4, -169, 41, 7,205,101, 42, 4, 30,100,235, 48, 98,100,183,170,109, 55, 77,129, 26, 53, 90, 77, 38,159, 64,165, 69,109,165, 59, 30, - 52,118, 31, 90,205,199, 80, 1,144, 68, 88,139, 74, 3, 44,182, 0,117, 80,218,100,243, 23, 20, 81,245,170, 20,128,229,191, 57, -231, 18,227,180,170, 21, 94, 83,170,231,105, 13,211, 41, 41,129, 19,194, 45,180, 74, 72,152,162,162,165,171, 24, 90,155, 91,121, - 64, 1, 10,190, 89,208,106, 49,147, 38,123,140,190, 42,215, 59,205, 63, 4, 41, 77, 7,232,116,248, 77, 39,221, 90,229, 3, 45, - 60,220, 25, 11,121, 77,164,169,180,203,154, 2,178,180,171, 50, 56, 55,242,106, 47,163,123,251,137,182,215, 39,127,128, 23, 32, -147,183, 70, 90,252,198, 22,163,102,103,142,115, 15, 52,168, 39, 72, 47, 37, 68,133,131, 88,139,196,145, 68,178, 49, 42, 54, 4, - 38,158,106, 17,126,147, 14,157, 74,146,213, 34,214,106,160, 3,145, 23, 72, 93, 65,214,154,147, 60, 45,214,208,171,150,181,227, - 40,145, 58,176,135, 20, 0, 88, 40, 71,191, 85, 50,133, 16,199, 40,204,233,149,217, 16, 81, 74,106,213,167,196, 41,166, 68, 93, - 61,218,202,202,222,163, 83, 36,180,202,163, 63,224, 83, 73, 82,235, 51,209, 30, 63, 41, 12,169, 45,248,223, 4,213,169, 74, 90, - 53,128,211,101, 42, 82,164, 55,109,135, 89,147, 41, 74,163,196,152,181, 2,229, 14,132,196,169,105,114, 84,194,235, 37, 15,213, -165,203, 74,222,142,144, 8, 75,184,116,146, 25,235,123, 77,126, 53, 26,159, 50,222,163, 82, 34, 87,170,209, 34,199,165,211, 98, -196,145, 42, 52, 27, 97,182,148, 76,169,143,206,119,244, 45, 5, 21,254,145, 74, 46, 58,167, 16,167, 2, 71, 51,139,214,220,104, - 21,172, 65, 37,238, 69,201, 58,119, 82, 55, 23, 34,254, 81,127, 40,177, 82, 54, 23, 48,154,250, 57, 42, 21,105,164,129,171,170, - 20,141, 98, 87, 0,144,254, 73, 38,170, 44,234,129, 19, 88,176,146, 78, 89, 34,103,179,171,162, 77,157, 81,164,143,123,163, 8, - 73,114, 60, 56, 14, 56, 25,153, 92, 82, 27, 64,113,230,129,159,116,212,234,141,165, 30, 35,232,150,149, 34, 26,138, 67, 35,195, -229,195, 64,160,161,215,163,214,229, 61,114,193,118, 3, 18,169,144,234,116,244, 83,105,213, 73,128, 42,170,162,244,180, 53, 84, -173, 73,139, 52,114,195,114, 72, 17,209, 13, 46,130, 91, 66,252, 80,144,164,132,233,150,102,139, 89,170,162, 58, 42, 11,109, 2, -156,194, 86,221, 33,181,251,181, 38, 42,218, 67, 77,174, 97,127,153, 78,214, 92, 14, 2,191, 29,239, 13,182, 62, 55, 80,210, 57, -121,206,113, 74,153, 54,127,189, 8,203, 67,140,225,184,143, 85,220,123,222,211, 87,121,197,162, 59, 80,232,138, 96,225,196, 37, -231, 93,231,158,158,124,173,226,166, 18,183, 1,113, 59,104,206, 7,217,212,166,214, 54, 39,125,193,177,184,189,190,201, 2,219, -129,115,109, 36, 64,115,202, 58,106,133,145,131,199, 51,172,111, 27,220,150, 84, 18, 57, 32,181,236, 38,119,102,187, 2,172,173, -245,138,161,227,115, 42,109, 53,183, 89,113,151,211, 75,165,167, 49, 32,171,220, 30, 90, 20,243,205, 83,164, 33,100, 75, 87,189, -190,190,121, 21, 18,250, 71, 48, 94, 91,105, 75, 43,121, 74,230,229, 45,103, 23,124, 32,112,213,237, 11,217, 74,166,193,241, 37, -103,179,117, 80, 93,247,138,133,163,115, 83, 94, 17,183, 11,108, 46,100,165,216,113, 47, 43, 30,236, 12, 41,116, 27,141,183,211, -202, 18,144,184,181, 22,208, 98,204,139, 46, 18,220,104,135, 30,225, 76, 56, 81,105,212,133, 48, 41,180,229, 70,162,206,126, 38, - 92, 98,148,206, 66,164,193,166,164, 45,105,171,200, 68,140,120,203, 37, 97, 47, 60,174,114,244,144, 80, 29,171, 42,165, 30,155, - 49, 51, 37,181, 81, 79,132, 15,185,196,151,151,234,114, 30, 44,248, 41,113,104, 4,248,238,184,148,190,180,184, 74,188, 52,182, - 16,234,154, 81, 58,124,203,115, 9,169, 39, 2, 57, 12,104,246, 82,172, 26,204,163, 72, 34,253, 44, 52, 92, 91,236,149, 12,133, -109,183, 62,241,103, 9, 69, 81, 77, 83, 52,208,150, 44, 27, 66,145,121, 36, 63,181, 37,206,204,250,129, 61,116,169,212, 89,131, - 43,201,249,104,123, 74,253,155,155,225,236,203,226, 10,102,204,110,202, 63,132, 86,125,198,138,149,127,100,183,134,155, 1,112, -237,173,219,177,225,202, 67, 75,152,211, 60,203, 77, 6,247,167,123,204, 54,107,180, 85,184,167, 33, 62,251,114, 35,170, 69, 54, - 84, 73, 46,115,200, 36,167, 25,234, 60,137, 61, 71,217,242,198,191, 92,191,104, 95, 2, 27, 99,237, 47,225, 82,247,225,235,116, -208,197, 6,191, 47, 55, 54,209,110, 43, 17, 27,149, 84,218, 45,211,165,197,120, 90,215,101, 56,171, 11,149, 13, 70, 66,225,214, - 96,115,165, 21, 26, 85, 74, 92, 66,166,214,227, 79, 55,249, 64,239, 46,206,238, 55, 15,155,187,185,155, 17,187,212, 5, 91, 27, -163,180, 55,157,106,194,190,104,165,101,216,241,171,116, 57, 30, 18,166,211, 37, 16, 5, 70,131, 54, 18,226, 79,167, 74, 70, 81, - 42, 5, 78, 52,132, 18, 28, 26,183,178,186,229,171,129, 84, 73,169,212,119, 35, 85,129, 0,134,181,188,202, 72, 5,128,210,110, -164,121,139, 34,115,126, 99,150,201,150, 78,208,177,215, 21,236,173,125, 91,218,250, 75,126,181,187, 55,113,190,246, 44, 91, 95, -135,148,129,156,147,147,205,212, 31,144,244, 3, 58,243,202,158,132, 96,121,118,234, 51,223,167,152,213, 84,132,144, 83,212,144, -122,231,250, 71, 93,121,229, 7,168,206, 61, 58,103,231,212,233,216,126,242, 48,223,133,202,123,243, 12,118,207,203,183,111, 61, - 32, 14,126, 17,140, 14,161, 90,245,202, 0,199,235, 2,114, 60,191,110,190, 5, 15,139, 57,201, 32,114,253,216,239,161,239,192, -233,108,123, 39,162,135, 78,189, 62,195,246,249,106,136, 10, 78,112, 73, 80, 61,113,230, 62, 64,254,122,234,166, 18, 83,202,122, -103,184,207, 81,130, 49,223,236,215,174, 80, 6, 9,201,199, 47,111, 46,189, 71,203, 89,192, 63, 27, 96, 53, 1,149, 31, 49,140, -143,183,211, 84, 10,122,103,152,159, 49,204,115,211,229,233,253,186, 57,109,140, 0, 0, 42, 35,161, 61,188,137,207,221,161, 86, - 58,145,216,118,198, 58,231, 30, 93,116, 48, 63,158, 1,112, 96,228,246, 63,119,203, 84, 21,220, 28,101, 35,160,235,242,245, 31, -102,138, 90, 22,121, 72,232, 51,231,247,231,247,104,117, 39, 61, 58, 2, 59, 96,249,104,234, 64,191,160,198, 65, 55,247,255, 0, - 60, 14,160, 50, 60,137, 24,206, 58,103,203, 61, 58,234,146,135,124,156,121, 99,160, 31, 51,219,236,252,116, 73,206, 49,128, 51, -231,231,251,123,106,130,209,216,142,152, 32,159, 63,195, 75, 14,184, 84, 94,215, 29, 79,250, 96, 55, 19,215, 9, 7,190, 79,166, -113,212,157, 10,180,231,174, 51,219, 30,163,230, 61,124,245,112, 94, 8, 35, 56,199,150, 58,254, 63, 97,208,174, 36,246, 79, 78, -132,250,231,203,175,160,237,165,148,155, 11,141,240, 1, 23,176,233,128,148,158,253,122,158,192,247,206,126,126, 93,116, 42,219, - 61,126, 33,142,248, 29,128,238, 64,251,180, 98,130, 72,235,144,115,140, 99, 39,215, 61,190, 90, 29,105, 56, 32,252,142,124,190, -223,195, 58, 58,223,238,254, 95, 39, 6,192,106, 72, 24,199,207,169,245, 30, 90,160,176, 6, 79, 92,227,183,145,249,118,249,104, -165,167, 61,148, 78, 62, 93,254,239, 93, 12,179,220, 30,157, 60,198,115,242,249,127,110,150,193,148,246,192, 42, 80,207, 64,115, -230, 7, 95,188,250,119,213, 21, 12,100, 99, 63,179,231,162,150,129,220, 12,103, 57, 35,191,246,104,101, 2, 7, 81,158,249, 35, -174,127,183, 74, 39,124, 40,187,129,129,212, 62, 68,122,250,125,199, 84, 23,140,143, 92,117,213,117, 19,215,184, 4,231,175, 66, - 79,245,106,130,251,142,158, 93,255, 0,118,149, 29,122, 95, 24, 34,198,227,107,126,239,159,158,216, 20,140, 18, 59,227, 75, 95, - 85,250,199, 75, 75, 13,192, 56, 53,129,222,221,113,224, 31, 34, 70,125, 6,170,115,117, 4, 36,146,112,146, 71,252, 62, 67, 84, - 57, 57,156, 74,190, 46,131,167,126,189, 72,198, 14,138, 73, 72, 0,249,103,174,123,247,243,198,181,201, 39,189,191, 44, 27,238, -190, 43,164,129,129,211, 63,236,245,233,243, 58, 32, 97, 35, 36,140, 31, 65,231,246,249,232,100,242,133, 16, 14, 78, 58,158,157, - 7,144, 58, 37, 4, 36, 28,167,155, 7,168,239,223,182,147, 44,119, 29,113,140, 86, 9, 88, 80, 33, 67,148,142,189, 58,147,229, -223,183,125, 16, 27, 14, 36, 37, 73,206, 14, 71,113,233,215, 84,146,114, 59, 96,121,126,113,162,219, 33, 61, 20,122,227,203, 61, -135,228,105, 51,107,111,211, 4, 38,221, 6,253,190,126, 24,172,132,132,167, 25,192, 31, 46,167,238,209,141,168,114,132,252,186, - 31, 95,234, 58, 17, 41, 24, 32,168,146,115,128, 59,159,179,174,138,108, 18,115,203,216, 12,131,215, 0,103,174,144,194, 71,174, - 42,227,160,207, 92,117,206, 62,223, 33,242,209, 40,194,176, 79, 64,124,186,245, 61,190,239,236,213, 16, 1, 81, 29, 64,242,237, -249,245,209, 45,130, 6, 1,237,228,113,147,251, 59,104, 99, 7,241,193, 13,224,100, 14,158,159,183, 68, 33,125,121,112,122,103, - 36,117, 25,207,111,219,170, 8,237,156, 12,250,116,207,217,159, 61,101, 86,165,169,113,222,213,218, 85,175,104,208,234,151, 29, -199, 92,154,205, 58,143, 67,162, 64,145, 83,170,213,103, 62,174, 86,162,193,129, 17,181, 57, 37,226, 79, 92, 12, 36, 30,101, 16, -144, 78,144,150, 68,141, 93,157,130, 34,110, 73, 54, 0, 1,212,158,192, 96, 14,194,219,159, 78,228,237, 97,234, 73,216,119, 56, -239, 95,177,184, 52,198,205,241, 34,250, 82,145, 37,219,203,111,154,116,243, 97, 74,140,138, 52,229,161, 36,121, 36, 56,165, 99, - 62,127,102,186,125, 58,178,168,165,224,240,108,180,227,106, 45,243,168,133, 3,219,224, 41,253, 99,156, 28,124,181,130,123, 43, - 61,153,123,231,176,246, 46,230, 76,226, 66, 69, 19,109, 99,238,172,123,102, 85,189,105, 61, 82,102,161,115, 83, 77, 53, 47, 41, -114,110, 56,241, 22, 91,166,201, 83, 79, 37, 41, 96, 41, 78, 35, 7,156,131,211, 91,183,187, 60, 21, 87,216,164,202,171,216, 55, - 44, 43,172,211, 80,185, 34,157, 13,254, 73,133,108,167,153, 73,110, 58,212,124, 76,167,200,119,206,185,175,140,211,219,115,250, -250,186,121,150,106, 87, 41,102, 86, 4,217, 99, 69, 62, 95,180, 64, 96, 69,237, 98, 6,161,177, 7, 30,160,125, 30, 51, 92,167, - 42,240,231,133, 50, 92,240,205,148,102, 10, 42, 3,172,240, 74,138,188,202,201,222, 50,206,202, 2,106, 70, 70,243, 90,193,183, -223, 26, 33, 89,187, 38, 56,211,173, 73, 82, 68,134, 29,100, 33,180, 43,195,241,146,165,129, 30,115, 42, 79, 82,234, 84, 82, 20, - 61, 53,220,158, 22,104,113,246,115, 98,169, 87, 66,163,180,230,226,223, 48,159,157,245,162,217,109,215,233, 84,130, 15,134,212, - 53,167, 42, 99,197, 78, 84,181,167,226,199, 98, 53, 30, 10,163,245, 54,234,111,196,144,202,209, 82,166, 75, 80,109,137, 72, 83, - 78, 49, 38, 59,153,147, 79,146,210,250,165,126, 35,100, 96,227, 24,215,127,118,138,242,164,110, 62,192,109,157,106,149, 47, 30, -229, 76, 54,197, 89, 17,150, 68,186,101, 86, 23, 51,106, 97,104, 7, 45,130, 23,217, 88,202,117, 28,118, 20, 81, 23,136,105,153, -198,204, 58,139,149,189,143,111, 45,236, 65,254, 3, 29, 5,199,185,104,158, 14, 29,203,164, 80,217,101, 77, 86,170,133, 93,209, -180,199,170, 20, 96, 14,241,187, 6, 37,127, 93,148, 45,136,181,242,106,229,223, 42,176, 31,122, 91,235, 11,114, 43,173, 63, 43, -152,169,199,159,143,135,153, 45,243, 30,101,243,182,162,159,187,215, 88,194,171,109, 42, 52, 22,155,105,229, 73,168, 62, 22,203, -206, 5, 45,198,219, 49,203, 37, 62, 31, 54,124, 70,223, 9,248,135, 92, 47,174,172,242, 97, 74,133, 54,150,235,136, 92,152,237, - 58,252, 89, 13, 45, 92,139, 46, 50,219,136, 74, 20, 9,248, 28, 41, 32,143, 62,190,122,188, 83, 18,164, 54,242,101, 71, 65,114, - 44, 22,132, 53, 40,114,187, 30, 75,239, 23, 82, 65, 72,234,224, 65, 70,125,121,117, 30, 87, 45,172,129,168,158,155,237,126,135, -115,211,189,187,236, 62, 56,127,142,130,130,138,154, 49, 79, 24,120,134,234,170,193,123,180, 96, 91,169, 10, 66, 18, 15,151, 77, -128, 4,226,231, 71,140,106,110,203,144, 95, 44, 50,131, 42, 92,249, 46, 56,161,202,196, 32,136,201,141, 24, 96, 36,190,183,201, -194, 51,149, 21, 28,117,214,187,111,102,251,181, 33,243,106, 81,228, 61, 14, 37, 33, 97,130,251, 50, 21, 30, 63, 51,105,194,152, - 98,106,148, 82, 95, 81,200, 60,195,245,138,142, 20, 14, 19,125,222, 75,250, 78,218,216,238,219,180,169,142, 42,187, 85,231,169, -204, 91,107,109, 14,183, 50,106, 86,182, 24,105,167,112,133,173,168,202, 43, 80,230, 79,199, 45, 56, 33, 67, 58,228,228,187,229, -250,132,217, 47, 75, 67,178, 96, 58,242, 83, 61,164, 56,226,208,226,208,181,175,198,125, 46,167,157, 35,226,117, 68, 43,152, 40, - 32, 32, 40,140,101,246, 58, 73, 18,147,146,135, 76,211,128,242,145,107,170,177,186,198, 9,237,250,205,184,185,216,218,219,233, -112,238, 72, 56,183, 63,169,204,229, 28,252,143,135,165, 49, 82, 40, 35,235,170, 18,203, 36,204,173, 96,202,132, 24, 98, 13,183, -146, 66,118, 56,218,122,181,245, 81,114,145, 37,110, 60,103,198, 97,207,125,165, 84, 31, 79,131, 90,163,190,219, 97, 10,108, 48, - 26, 9,169, 66, 90, 80,227, 47,128, 80,181, 33,204,169, 42, 79, 34,145,144, 27,238, 36,202, 77, 46, 61, 71,146,158, 91, 77, 34, - 80,129, 80,121,196,192,149, 37,107, 67,234,250,134,230,105, 96,211,223,104,169, 92,205,169, 77, 58,128, 83,145,140, 41, 90,141, - 75,174,173, 77,251,204, 9, 44,170,156,220,176,219,244,224,164,200,165, 79,117,183, 20,184,138, 75,160,173,218,100,118, 89, 33, - 75, 40,230, 73, 95, 94, 82, 7, 38,179,218,117,105, 35,154,151, 61,164,211, 34, 50,180, 74,121,186,147,237,205,163, 21, 60,162, - 29,110, 35,204,164, 37,216,238, 48,180,134,146,248, 5,180,189,243,232,211, 62, 92,169,112,162,228, 27,221,109,123,121,123, 16, -109,110,225, 46, 44,215,186, 62,199,161,242,220,190,156, 36,113,114, 47,203,109,107,162,234,192,145,231, 26, 47,177,110,190, 75, - 27, 13, 65,145,137, 24,220,138, 82,100, 86,167, 67, 85, 85, 5,217, 21, 54, 83, 26,153, 91,143, 41, 84,218,173, 77,175, 19,157, - 16,100, 78,167,184,142,105,169, 96,169, 46,243, 41,104,121,178, 22,223, 34,202,155, 23,250,140,137, 20,138,148,138,125, 82, 20, -234,253, 56, 69,122, 35,244,247, 86,135, 43,244,199,152,112, 33,197, 60,228, 96,159,173,226,132, 50, 84,121,113, 53,165,176,135, - 82,167, 71,194, 53,242, 20, 11,121, 84,166, 35,198,155, 38, 4, 37,169, 19, 41,142,209, 42, 19,225,165,233, 62, 34, 25,142,226, - 80, 30,113, 17,157, 66,149,252,196,164, 18,216, 82, 84,115,167, 38,148,205,126,152,227, 49, 97,220, 38,171, 81, 86, 91, 68, 26, -187, 13,248, 14, 69, 97, 62, 35,143,138,156,112, 22,101, 41, 15, 18, 22,226, 10,194,136,230,230,233,134,127, 42, 6, 37,206,199, -117,101, 43,181,186,143,180, 75, 2,110, 73, 96, 5,128,176, 42, 44,157, 77, 28, 1,181, 71, 86,166, 56,195,160,133,227,150, 34, - 10, 48, 60,200,165, 70,147,146,168,163,204, 71, 45, 85,148, 2,193, 25,163,195,167,111,214, 86,203,172,196,137, 45,186,155,174, -161, 10,167, 73,203, 62,227, 94,136,211,232, 33,202,160, 82,127,192,238, 54, 24, 88, 10,120, 37, 1,208,149, 43,151,151,153,182, -170,166, 34,105,117, 25,181, 40,161, 79,194,159, 53, 78,221,148, 2,130,244,202, 62, 11,173,203,168,196,140,210,177,239,188,139, - 79,188, 52,148,143, 25, 25,113,159,210,140,171, 8,167, 26, 85, 94, 65,131, 35,235, 11,102,226,130, 87, 49,132, 48,166, 27,155, - 34,167, 24, 20, 49, 81,133, 37, 81,151, 26,170, 90,112, 31, 21,124,188,252,170, 13,201, 72, 73,201,204,105,149, 74,157, 57,200, -147,110, 38,154,139, 18, 67,205,195,153,115, 70,104, 51, 79,155, 83, 70, 23, 21, 85, 85, 0,161, 70,146,242,249, 2, 78, 76,126, -101,128,219,173,128,148,235, 34, 80,196, 0,231, 83, 92, 1,220, 90,204, 10,145,112, 0,185, 42, 1, 2,236,108, 45, 99,136,197, -109, 57,134, 90,147, 78, 60,243,173,165,136,149, 15, 48,189,215,148, 86,241,202,190, 93, 81,152,134,165,148, 13, 11,202,242, 35, -169,110,248,110,177, 16, 67, 42,158,104,128,170, 20,215, 22,194,141,110,142,176,131, 25,131,225, 54, 11,133, 84,196,180, 99,164, - 18, 82,252, 36, 58, 2, 73, 90,181,243,137,137,169, 94,219, 91, 8,140,165,159, 30,241,143, 84, 66,139,156,202,240, 96,192, 62, - 18,156, 82,206,124, 78, 89,140,129,203,241, 21, 30, 76, 19,163,109,106, 99,148,203,129,215,161, 22,149, 70,170, 36, 45,108,171, - 31,224, 53, 5,243, 58,217,101,215, 79,193, 25, 79,185, 33, 32, 39, 1,165,190, 66, 50,135, 15, 45,187,123,227, 46,167, 87,178, - 45,198, 26,115,194,143, 66,171,214,144, 26, 91,156,200,171, 26,148,118, 84,145, 31,151, 10, 8,167,198, 11, 4, 31,135,197,207, -235, 37, 39, 74,201, 56, 20,179, 48,220, 2,160, 89,137, 27, 48,218,251, 92,218,224, 27,108,182,181,237,189, 90,213,112,199,197, -185, 37, 66, 63, 50, 26, 82,245, 33,186, 21, 2, 41, 29,149,214,224, 41, 89,127, 85, 64, 0,155,129,164,168,195,121,106,210,157, - 49, 16,180, 67,123,221,105, 23,132,151, 98,143, 8,133,181, 9,233, 2,160,114,132,149, 41,152,202, 77, 80, 0,122, 20,224,133, -140, 19,174,145,216, 85, 22,174,139, 58,117, 20,167,255, 0,116, 45,215,218,183, 92,253, 48,116, 59, 66,168, 71,135, 84,162,201, - 91,137, 33, 46,115, 83,165, 76,101, 96,101, 41, 92, 44,103,200,106,117,145,110,169,112,231, 15, 1,196,123,195, 84,153, 12,178, - 20,148, 41, 94, 28, 38,226,200,119,157,100,120, 95,165,138, 1,112,228,146,114,114,161,173,186,219, 8, 70,145, 86,150,137, 9, - 45, 70,158,138, 76, 55,148,216, 65,109, 45,150, 86,152,239,128, 57, 65, 12, 75,229,234,122,225,213,148,244,209,114,119,104,171, - 4,128,125, 92,254, 87,191, 96,110,192,158,223,104, 2,109,189,142,214,189,197,123,226,102,115, 14,101,151,130,175,170,167, 41, -126,116, 54, 59,220, 24,181, 41, 23,243, 93, 94, 65, 97,177,125, 39,160, 56,182, 92, 20, 69, 77,185,225,210,208,218, 12,121,177, -214,245,101,132,175,147, 20,200,207,169, 77, 67, 12,161, 64,187,239, 14, 55, 24, 58, 82,112,164,176,232,229, 32,231, 94, 29, 77, - 69,138,133, 70, 29, 29,163, 30,174,236, 24, 12, 74,171,176,182, 29, 93, 18,157, 80, 46,135, 10, 99,172, 22,209, 86,126, 34, 28, -247, 86, 74,249, 90, 42, 50,212,149, 37,164,133, 61,149, 74, 50, 96,174,108,231,227,148, 73,104, 70, 98, 34, 90,232,251,142, 52, -174, 65, 30, 63, 46, 28,230,126, 90,201,119, 25, 60,138,113, 64,225,189, 82,183,173,152,148,155,102,178,203,203, 68,215,166, 72, -114,183, 95,156,227,173,149, 84,171, 51, 30, 74, 27, 67, 12,173, 36, 52,203, 81,219,102, 60, 68,130,144,203,109,165, 36,133,120, -138,212,193, 31, 77,212,144, 72, 34,198,251, 27,245, 44, 15,154,214, 6,230,224,239,182,149, 3, 21, 18,113, 76, 43, 65, 3, 50, -137,214, 49, 12, 40,135,117,121, 29,209,158, 71,223, 75, 42, 46,136,204,108, 8,145,132, 74,193,144, 72, 75, 74,213, 54, 21, 45, - 76, 91,246,218, 94,139, 17,193, 28, 86, 29, 14, 46,115,208,212,249, 67, 77, 64,167, 72,144, 20,185,149,135,226,180,158,101,145, -202,195, 40, 83,141,144,227,200, 2,245, 21,216, 52, 92,248, 96, 70,161, 83,252,103, 98,197,145, 15,156,115, 78,109, 49, 66,157, -109, 1,110,205,152,167, 16,175,119, 65,203,206,130,172,229, 69, 42, 23, 85,184,213, 38,116,122, 77, 49, 30,243,112, 48,191,122, -156,175, 0,120, 52,218,131,205, 97, 18,106, 83,146,149, 4,194, 76, 0,146, 91, 88,241,164,101, 41,109,188,184, 10,126, 34,216, - 84, 0,137,213,234,155,149, 73,236,160, 76, 76,164,176,212,104,116,198,150,183, 7,131, 18, 42, 93,229,167,198,253, 69, 23,214, - 76,149,151, 57, 71,195,200,157,109, 69, 33, 82,243, 60,133,180,234,176,248,250,244,211,107, 91,226, 72,211,167,112,188,181,209, - 76,160,213,204,197,106, 0, 96, 24,179, 79, 82,204, 72, 51,121,144,128, 10,249, 98,149,218,225, 28,149, 89, 27,152,205, 94,144, -220,249, 80,209, 79,171, 70, 91, 20,181,184,135, 92,141, 50, 72, 14, 84, 76,118, 19, 36, 34,177, 25,151, 21,138,119,187,114, 19, - 21, 68, 12,117,150,149,132,150,213,150, 54, 98,220,136, 16,188,119,163, 67,101, 5,113,196,105, 72,165,185, 82,119,197, 5,126, -248,228,114,219,144,233,141, 70, 67,104,106, 56, 82,124, 82, 79,136,218, 88, 9,105, 88,156,247,222,169, 82,227,191, 45,232,212, -218, 11, 78, 71, 98, 59,143,161,113, 39, 84, 75, 46,153, 13, 76,172, 45,229,243, 37,135, 29,104,251,180, 52,101,110, 6,210,236, -148,169, 74, 12,138,140, 74,153, 50, 51,206, 33,177, 76,164,162, 59, 73,171, 73, 72,104, 78,168,197,125,231,124, 63, 6, 48,109, -102,142,200, 60,234, 28,229, 82, 93, 7,244,104,105, 39, 91,241,105,141, 99, 37,254,169,195, 11, 90,214,220,144, 53, 30,151,233, -216, 2, 62,226,207, 81, 79, 37, 64, 53, 1,150,150,100,144,129,164,144,145, 57, 33,117, 0, 73,102,157,197,144,162,146,201,229, -185, 91, 7,133,199,163,200,101, 79,198,131, 70,106, 76,183, 83, 33, 17, 40,212,166, 60, 24,241,189,234, 27,101,247,106, 85,121, - 13, 51,138, 77, 9,190, 85, 34, 58,146,217, 82,185,213,225,182,227,202,108, 33,244,163, 51, 30,132, 13,122,179, 61, 46,206,167, -178,218,106, 21, 83, 17,198,105,113, 16,255, 0,130,203, 84,152, 48,121,220,112, 58, 60, 70,144,219, 72, 14,202,154,226, 91, 75, -137,117,229,164, 37,133,166, 84,233, 54,205, 18,152, 42, 78, 72, 74,100, 38,109, 70,157, 75,167,176,101,215,110,185, 45,168,183, - 26, 21, 45,132, 58, 22,233, 81, 25, 47, 73, 45, 70,101, 9, 42,121,228, 37, 28,165,217,183, 32,206,171, 85,105,149,250,165, 82, -149, 14, 75, 94, 12,218, 69,174,167, 26, 93, 42,136,182,199, 51,171,157, 33,213,135,234, 53, 63, 17,100,187, 57, 41,104, 33, 40, - 8,142,218, 24, 74,121,221,169, 86, 22, 72,193,212,205, 96,202, 46, 67, 48,184, 22, 31,101,130,133,184, 4, 88, 49, 35, 72,181, -216, 86, 28, 81, 1,116,150, 73, 25,169,242,225,205, 66,229, 73,146,164,163,105,104,209,130,181,131, 0, 76,135, 75, 68,143,118, -149,228,145, 98,129, 95,138, 36,233,202,152,138,141, 93,169,141, 69, 80, 30,227, 5,244, 43,222, 82,165, 36,243, 74,171,176,208, - 41,106,160,226,222, 82, 83, 28,169, 98, 40, 10, 73, 90,220,201, 68, 52,254,150,111, 2,144,225,187,179,158,209,187, 10,132,211, - 79,213,165, 82,118, 15,137, 25, 20,246,210,148, 75, 91,140,190,246,200, 95,117, 36, 32,115, 57, 41, 10,102,175,109,202,146,122, - 41, 18,232,108, 40,225,134,134,166, 17, 71,172, 75,173,183,254, 28,202,224,136, 19,125,223,220,189,237,247, 37, 21,179, 37,214, - 81, 80,121,191, 1, 45, 16,166,130, 31,105, 33,106, 75, 76,149, 56,163,206,177,200,205,113,141,195,133, 51,141, 78, 12,248,147, -225,150,176,148, 59, 23,119,182,166,230,182,237, 57, 15, 97,150,105,151,140, 70, 87, 85,176,107,200, 50, 27,253, 3,177,111, 58, - 93,191, 49,181, 28, 41, 2, 57, 60,193, 74,200,158,100,149,102, 22,210,191, 88,166,198,203,123,107, 2,250, 84, 17,179, 17,170, - 37, 36, 88, 6, 45,176, 1,135, 60,241, 94, 80,210,197, 55, 50, 52,167,146, 27, 38,149,177,141,119,250,189, 44, 46, 13,254,219, - 16,222,117, 4,220,220,223,242, 16, 41, 10, 0,121,103, 35, 29, 63, 35,174,144, 0,146,129,231,232,122,252,251,246,242,213,103, -105,213, 58, 52,201,244, 90,252, 69,192,174,208,170, 53, 26, 21,114, 3,128,135, 96, 86,232,211, 30,166, 85,233,238,115, 96,133, -177, 82,139, 41,165,103,205,147,175, 33, 3, 57, 79,194, 14, 78,124,199,203,236,212,253, 72, 96, 25, 78,160, 70,198,251, 27,216, -220, 31, 76, 83,251,247, 22, 56,241,142, 65,215,160,207, 76,143, 35,229,243,210, 78, 79,144, 72, 39,250,186,145,142,218,250, 74, -136, 25,198,115,208,129,220,124,245,247, 36,146,124,191,217,244,236,126,205,103,127,191, 3, 30, 72,200,230,229,206, 58,121, 15, -199,215,251,117,236, 5, 31,245, 72,242, 7,190, 62,223, 76,233,114,133,144,114,164,245,198, 7, 65,219,215,238,215,190, 92,127, - 56,224,103, 31, 47,191,211, 67,221,233,129,138, 43, 71,124,156, 15,196, 14,221,186,244,208,171, 3, 3,191,166, 64,201,249,119, -249,234,232,212, 41,147, 22,132, 71,105, 74, 46,186,134, 91, 32, 16, 29,125,194, 18,211, 12,249,188,250,213,209, 40, 72, 43, 89, - 56, 72, 39,166,186, 71,195,191,178, 43,142,110, 36, 99,196,171,219, 27, 61, 83,178,237, 25, 97,151, 26,188,247, 98, 90, 54,206, -131, 38, 59,229, 63,225, 52,182,171,241,205, 66,178,148, 52,175, 16,166, 60, 5,115, 36, 97, 43,202,147,157,121,171, 41,169,236, - 37,148, 43, 55, 69,234,199,224,162,228,159,112,198,205, 37, 29, 93,124,188,138, 26, 89, 43, 38, 29, 86, 36,103, 32,122,182,144, -116,143,123, 88,123,241,204, 5,140,156, 36,231, 29,252,135,224,124,251,232,117, 0, 14, 70, 1, 7, 7,183,159,203,207,166,117, -177,124, 80,240,223,126,112,157,189,183,214,195,110,107, 49,211,119,216, 53, 54, 96,207,155, 77, 84,151,104,213,200,115,224,199, -169,209,174, 75,118, 76,184,204,185, 50,223,157, 79,148,219,177,157,113,166,212, 74, 28, 66,144, 20,218,181,174,203,234, 48, 7, -159, 79, 94,255, 0,111, 83,141,108, 83,203, 28,200,146,198,218,163,144, 2, 58,142,190,160,216,223,220, 69,240,155,199, 36, 18, -203, 12,200, 98,158, 22,100,116, 59, 50,178,157, 44,164, 14,132, 16, 65,247,140, 12,160, 58, 18,122, 12,253,253, 63,179, 67,171, -168,200, 61, 58,140,249,227,207,167,231,182,138, 63,173,208, 17,223,167,203, 25,201,252, 53, 69, 64, 1,142,253,115,246, 15, 67, -173,144,108, 65,244,198, 70,227,125,199,254, 48, 26,129,245, 28,189,186,140,125,224,250,245,208,171,192,201, 25, 7,255, 0,104, -122,103, 69,184, 70, 72, 57, 0, 30,195, 29,124,186,126, 31,179, 66, 47, 62,163, 30,158,121,249,116,210,202, 73, 23, 56, 0,108, - 61, 54,192,202,193,193,193, 4,247,206,116, 58,199,159,175, 67,233,162, 87,235,229,140,122, 96,250,252,244, 58,129,201,200,200, -251,113,131,219, 56,209,199,198,216, 54, 6, 88, 0,100, 39,175,203,167,231,251, 52, 43,131, 39, 36, 2, 64,236, 58,254, 63, 61, - 22,231, 76,100,244,201,251, 60,134,132, 80, 30,188,221,127,104,193,245,251, 52,170,155,223,107, 91, 25, 22,223, 2, 44, 12, 18, - 70, 49,219,212,117,237,161, 87,243,234, 15,111, 44, 31, 92,249,249,232,197,140,103,249,222,127,105,251, 6,133,115, 24,236,123, -246,244,239,223,229,165,147, 10,139, 27,123,190,126,126,252, 12,188,246,199, 76,103, 62,152,254,142,154, 13,206,249,201, 78, 51, -156,140,231,211, 31, 46,250, 49,194, 2,122,244,243,207,151, 79, 93, 90,212,167,148,162, 20, 50,159, 34,158,248, 35,184,244,210, -152, 2,247, 55,232, 48, 59,171, 82, 85,220,156,231,177,199, 79,179, 75, 84,137, 89, 82,129, 64,192, 61, 9,238,125,123,157, 45, - 11,159, 92,102,195,211, 7, 1,145,228, 49,230,115,215,175,153,251,245, 85, 41,199, 65,212,158,255, 0,159, 77, 82, 78,114, 7, -145,207, 79, 35,223,203,237, 26, 37, 0,231, 61, 49,231,219,242, 53,130, 1,198,113, 85,164, 37, 39, 24, 29, 70, 51,230,123,121, -232,129,156,245, 31, 8, 29,193,235,233,231,223,190,169,163, 29,176, 58,117, 7, 26,244,121,242, 2, 82, 20, 60,250,224,142,189, -251,246,210, 76, 0,248,223, 3, 5, 39, 29, 51,146, 59,252,240,123,103,174,138, 64,206, 8, 35, 31,183,240,208,109, 54, 70, 78, - 78, 73,235,147,144, 6, 78, 6, 51,215, 70,163, 57,233,142,157,199,203,229,162, 27,218,255, 0,203,124, 17,187,155,224,134,240, -161,156,231,174, 64,235,211, 29, 63,164,104,132,168,143, 60, 14,199, 24,243,245,249,127, 86,168,160, 96,103,207,203,243,246,141, - 16,132,224,228,245, 7,174, 63,160,231,215, 73, 16, 5,253,223, 39, 9, 28, 86, 71,127, 62,223,143,231, 58, 44, 1,220,122, 99, -160,192,252, 52, 58, 82, 7,219,143,207,238,213, 86,242,162, 60,134,112, 57,142, 0,243, 42, 62,128, 12,232,167, 5, 97,182,231, -108,101, 54,149,175, 93,188,238, 42, 37,171,108, 82,103,215,174, 43,142,169, 10,139, 68,162,210,216, 92,170,133, 82,169, 80,121, - 49,225, 64,134,195, 96,151, 31,113,229,164,118,194, 70, 84, 72, 0,157, 78, 55,217,195,236,235,180, 56, 5,219,136,183,189,229, - 6,143,114,241,101,120,210,144,245,197,112,186,195, 83, 99,109,101, 38,115, 41,113, 22, 77,152,167, 82, 66, 42, 9, 66,147,245, -132,212, 0,227,174,130,132,144,210, 64, 58, 65,236, 48,224, 78,145,183,150, 91, 28,115,238,229, 25, 47, 93, 23, 10,101,211,120, -127,163, 84,163,165, 73,163,211, 57, 87, 30,165,184, 46, 48,226, 73, 76,201, 4, 45,184,107, 35, 40,101, 37,105, 33, 78,103, 93, -206,171,207,168, 77,158,242,214,234,165,120,206, 45,240,239, 57, 83,188,203, 36,252, 62,157, 9,239,170, 51,196, 46, 48,105, 37, -147, 42,160,151, 76, 16,146, 37, 96,109,169,129, 27, 92,118, 83,208,119, 32,181,143,145,135,112,125, 25,188, 13,143, 54, 16,113, -223, 19, 82,137, 17,172,244, 16, 72, 60,170,157,125,165,213,191, 93,246, 49,126,194, 16,247,212,254, 92,102,175, 95,155, 82, 46, -162,100,151,208,236,151, 84, 86,135,157, 83,143, 45, 96,146, 94,142,181, 28,149, 31,231, 39, 61,245, 66,141,115,205,137, 57,175, - 1,247, 75, 76, 35,195, 76,148, 41, 72,125, 46, 37, 67,149, 50, 80, 63, 89,178,122,100,246, 29,245,245,218, 59,147,164, 45, 78, - 62,215, 50,202,148,134,101,254,133,244, 62,145,140,180,188,124, 11, 56,232, 71, 67,171, 83,148,233, 49,170, 13,190,247,248, 44, -245,182, 90,104, 56,144,150, 39, 33, 63, 10,154,125, 67,225,241, 20,158,202,245,193,243,213, 56,106, 88,146,193,203,105,235,239, - 59, 19,191,201,199,127,158, 23,202,218,157,233,146, 24,236, 81,136, 80, 46, 1, 43,107,143, 46,174,130,197,183, 3,169,212, 47, -102, 23,138, 45,142,166,222, 16, 42, 27,183,108,211, 81, 10,232,163, 70,247,155,186,155, 13,174, 83, 92,132, 0, 8,170,165,134, -192, 6,115, 39, 5,106, 72,203,136, 86, 73,233,166,207,131,205,208,115,108,174, 89,118,133,206,234,163,216, 59,146,166, 20,169, - 42, 82,136,161, 93, 77,252, 49, 42, 33, 4,225,182,215,204,148,185,216, 20,171, 61,198,186, 27,110,114,132,166, 53, 69,148, 59, - 30, 90, 23, 25,101,236,171,154, 43,201,240,223,133, 36, 17,241, 35,145, 74,229, 39,161,215, 63,238,253,167,145,106,238,109,193, -110,177, 27,154,158,103,166,165, 71,109,208, 75, 65,135,207,188, 66,117,149,227,252,159, 41,228,233,219, 3, 75,181, 66,188,109, - 27,157, 72,221, 61,223,199, 99,123,219,220, 65,219,108, 51,192, 88,210, 85,228, 53,174, 76,116,104, 30,157,201,185,229, 35, 0, - 2, 19,125,224,147, 75, 37,239,101, 33, 13,213, 69,250,103,114, 80, 10,102,173, 46, 58,164,199,113,180,212,163,184,159,141, 18, - 38,180,144, 27,150,219,136,255, 0, 40,194,218,193,244,234, 52, 13, 53,152, 76, 85,228, 75,126, 75,175, 83,218,112,212,170, 11, -111, 28,170,135, 77,132,169, 78,242,115, 15,209,175, 45,242,143,153,236,117,227, 97,231, 85,171,148, 38,109,155,155,154, 91, 20, -248,232,126,139, 84, 87,199, 38, 34, 85,134,223,163, 74, 82,186,185, 28, 40,126,141, 95,205, 7, 30, 67, 69,110,125, 33,219, 19, -109,119, 58,172, 90, 66, 93,116, 66,166,211,214,225, 63,160,250,214, 82, 3,169, 64,233,241,150, 27,112, 39,168, 3,155, 62, 88, - 58,244,144,243,106,233,148, 11,197, 35,128,123,129,109,205,246,238, 6,199,184,235,108, 71, 42,184,155,216,242,188,198,154,162, - 95,237,180,208,232,140, 11, 90, 66,236,136,172,189,245, 3,160,145,212, 16,122,249, 73,227,159, 17,187,137, 50,231,190,101, 63, - 18,112,228,140,252,162,176, 30, 62, 10,228, 73, 82,164, 22, 95, 72, 63, 2, 91, 10, 66, 22,112, 8, 82, 66,185,126, 28, 29, 79, -145, 81, 80,168, 42, 68,213, 63, 12, 37,188, 63, 45,130,209,128,132,156,150, 26, 75,203, 73, 74,254, 39, 10,138, 92, 67,124,164, -229, 42, 25, 25,186,221,245, 35, 87,185, 43, 18,155, 90,227, 77,126,164,251,143, 7,129,118, 51,188,178, 11,120,144,148,242,135, - 91,232, 71, 50, 10, 92, 36, 36, 39,211, 88,139,213,131, 77,117,196,212, 27, 16,219, 83,220,225,196,169, 47,211,101,161, 71,194, - 11, 92,133, 4,174, 9, 66,203,105,113,183,145,240,248,193,124,202,108,130, 38, 34, 59,179, 29,137,125,253,230,246, 63,127,165, -250, 13,186, 11,218,248,225,108,186, 60,159, 36,202,104, 33, 80,239, 79, 18, 6,232, 36, 44,108,206, 88,216,171,134,102, 58,137, -189,193,232,183,182, 51,138,107,197,167, 35,145, 32,194, 75,137, 45,162,170,204,129, 26, 59,172, 0, 57, 16,250, 88, 42, 67,173, -168, 44,132, 33, 97,105, 81, 89,194,193,192, 15, 21,183, 34, 93,189, 17,133,173,196,213, 88,150,133,188,239, 51, 44,199,149, 29, - 45,142, 86,210, 82,135, 2, 38, 68,112,144,144,148,168, 41, 39, 32,133, 0, 2, 89,200, 80,154,117,109,186,212,100,199,139, 80, -101, 13, 33,216, 78,199,114, 51,238, 37, 74, 91, 78,189, 27,148,178,231, 80,164,172,130, 9, 41,201,238, 14,179,250, 11, 83,227, -182,194,154,145, 2,161, 25,212,187, 44,196, 66,213, 18,124,111, 5,107,100,166, 20,148,169,198,211, 12,115,175,153, 42, 74, 80, - 70, 78, 78, 51,166,186,192,172,178, 6,109,136,220,117,189,189,227,117,177, 30,160, 27,119,233,139, 14,158,162, 39,142, 0,101, - 66, 93,128, 10,247, 70,216,130,108,214,176, 96,108, 65,243, 95,175,187, 27, 7,111,210, 27,168,182,211,116,199,151, 78, 75,232, -110, 83,209,169,177, 26,125, 10,125, 72, 91,143,187, 34, 34,142, 34,172, 0,129,128,132, 45, 73, 72, 9, 43, 56, 80,206,163,202, -184,216,125,223, 26,158,154,225, 56, 80,114,142,180, 69,150,162,178,150,227, 46, 61, 62,106,200, 76,129,146, 74, 91,146, 28, 87, - 54, 67,121, 73,211, 37, 69,159, 9, 83, 19, 42,175, 34,171, 13,106, 74,227,154,156, 84,200, 79,185,120,108,229,135, 25,169, 81, -213,250, 96,176,134,208,128, 65, 64,248,130,145,141, 58,116, 74,219,236,148,159,175, 97, 86, 33,180,182, 20, 87, 17,108,199,169, -180,216, 91,106, 47, 79,130,128, 61,245,230,208,113,204,207, 34,215,156,148,247,212, 94,170, 25,163,109,148, 76,140, 5,245, 41, -218,254,142, 8,213,107,116, 44, 47, 97,229, 55,198,205, 75, 85, 29, 71,255, 0, 73, 68, 85, 96,178,164,159,111, 98,202,179, 71, -229, 98, 69,134,130,202, 77,238, 0, 83, 96,239, 82,107, 84,106,164,152,205,214, 16,245, 17, 75,247,101, 22, 43, 1,232, 83,105, -203,136,165, 50,229, 98, 34,151,202, 17,226, 61,202,145,202,178, 48,162,146,142,250,216,251,105,128,186, 36,170,100,211, 22, 67, - 77,176,209,122, 60,214,153,145, 30,167, 10, 65,240,214,164,164,158, 79, 13, 73, 45,115, 37,224,181, 33,120, 81,230, 79, 42,131, - 59, 69, 16,106,201,139, 50, 64,129, 87,142,243,161,150,146, 80,211,168, 90, 71,134,148, 54,236, 25, 3,150, 43,129, 5,101,229, - 41, 92,199,162, 51,130,112,245,208,236,136, 14, 52, 88,165, 63, 50,139, 34, 51,197,246, 98, 51,239, 14, 83,216, 91,139,113,121, - 76, 73,110,172, 58,223, 48, 72, 13,160,134,135,112,144, 6,154,194, 70, 23,117,229,143,129,216,236, 71, 80, 47, 96,118,184, 4, -222,231,114, 6, 41,222, 44,205,105, 4, 73, 28,205, 45, 7, 45,193,177,250,212,141,149,187, 31, 44,137,107,144,124,172,109,102, -184,117, 1,243, 59, 82,158,154, 90, 88,167,200,142,181,210,164,169,181, 70, 81, 89,144,237, 61,164, 97, 8,142, 95, 89, 89,114, -156,227,128, 6,143, 58,148,202,185,146,172,161, 73, 41, 58,230,163,187, 82,190,163,190,164, 15,240, 15,170, 97, 12,245, 79, 47, -184,169, 46, 41,174,193, 14,169,111,140,231,161, 40,198,122,227, 89, 5, 18, 3,176,154,143, 6,166,202, 9, 1, 73,143, 61,174, -116,199,117, 99, 11,126, 47,134, 18, 84,193,229, 10, 37, 10, 37,180,225, 64, 40, 28, 13,100,168,166,120,245,217, 15,133,120,168, -146,220, 87,219, 46, 28,171, 6, 52,112,158,128,225, 60,175, 70, 87,197,205,140, 40, 16,112, 64,214, 42,193, 90,101, 10,126,211, -169,184,233,123, 31,188,110, 72,220, 3,125,207, 67,138, 55, 49,206,155,219,234, 42,132,129,216,197, 32, 46, 15,145,195, 50, 2, -235,191, 86, 80, 85,250, 18, 70,227, 86,166, 57,149,157,109,178,148,183,224, 71, 1,183, 35,200,142,217, 40, 25, 72,109,212,201, - 82,185, 20,122,144,165,158,100,158,128,171, 25,198, 50,253,209, 40,136, 75,137, 56, 90, 16,244,102,139,216, 60,229, 92,174, 20, -160, 14,224, 59,241,225, 62,105,200,244,214, 51,107,195,108,165,151, 16,146, 22, 20,133, 20, 2, 74, 64,121, 60,138, 65, 87, 76, - 96,117,207,114, 8,243, 3, 79, 5, 53,182,146, 64, 57,193,111,145, 35,178, 84, 80,226, 28,232,165,126,162,177,219, 31,234, 19, -220,105,223, 44,132,121, 88,223, 77,198,253,250,119, 62,253,247,252,113, 75,113, 30,119, 60,175, 32, 4,249,186,239,191, 91,252, - 54,176,222,214,184,191,174, 50, 89, 20,195, 81,143, 72,144,180,173, 79,134, 84,226,176, 3,206, 10,131, 10, 49,156,120,149, 12, -182, 3, 33,100, 31, 37,188, 73,238, 14,172, 46, 81, 36,215,106, 78,136, 82, 13, 46,159, 29,244,173,218,140, 98, 3,147, 86,130, -148, 42,159, 79,101,212,148,184, 90, 82, 9,117,242, 64, 39,157,182, 86, 64, 39, 89,163,142, 4,210, 26,113,106,112, 18,169,104, -109, 13,148, 32,151, 20,219, 9, 95, 85,156,163, 43, 88, 5, 64, 16, 3,157, 50, 73,215,199, 43, 45, 65, 83,113, 91, 14,161,136, -145, 25, 84,196,198, 1,231, 22, 91, 74, 20,150,219,107, 33, 42,116,156, 18,165, 16, 57, 84, 58,142,131, 82, 86,141,140,129, 80, - 14, 99, 42, 29,250, 93,128, 39, 98, 55,238, 64,233, 99,214,219, 98,176,130,186,186, 61, 66,153, 3,200, 12,138,151, 0,172,107, -174,228,216,130, 24,139,170,168, 32,128, 73,218,246, 35, 9,159, 71,167,209,161,120, 20,248,236,194,134,100,203, 91,178, 29, 95, -186,251,203,202, 90, 28,149, 81,118, 76,215,143,188, 39,196, 74,202,151, 33, 97, 35,155,151,196, 40, 72,195, 37, 84,174, 73,169, - 84,154,106,129, 77, 18,105, 49, 10,229, 68,157, 80,241,218,102,167, 32,224, 55, 84, 90, 25,111,222,102,198, 15, 5,251,154, 64, -109, 11,229, 46,180,231, 39, 33, 15,133, 74, 59,117,246,189,234,168,242, 95,136,212,199, 36,199,182,218,105,167,105,241,249, 74, -146,211,181,151, 92, 73, 53, 87, 2,149,206,150, 9, 76, 54,221, 64, 80,109,197, 32, 43, 88,189, 94,149, 6, 43,205,191, 86,230, -247,217,135,221,162,211,216,142,170,140,185,124,205,173, 45, 70,131, 10, 58,124,106,140,226, 75,124,160, 0,202, 50, 8, 82, 18, - 57,198,220, 72,224,134,210, 45,176,191, 96,122, 95,208, 6,189,206,219,216, 29,247,196,207, 33,174,134,153,155,219, 85,171,171, -156, 48,220,187, 89,207, 83, 96, 67, 75, 32, 91,221,193, 17, 45,216,175, 48, 50,178,224, 84, 74, 44,154,236,184,109, 72,113,234, -237,116,165,197,177, 54, 82,143,185,194,138,164,184,249, 16,105,241,143, 44,103,208,121, 50,164,146,226,240,182,220,119, 4,235, - 37,164, 65,153, 92, 80,137,106, 70,139, 82,125,151,164,197,155, 93,168,123,196,123, 46,150,251, 8,240,252, 17,238, 40, 42,185, -170,222, 34,155, 80,141, 16,150, 88,230, 75,114,101, 51,130,141,103,113,118,222, 84,228,199,126,232, 95,240,106,136, 16,215,189, -218, 86,235,201, 53,185, 52,220,146, 81,114, 92,236, 97, 49, 90,112,128, 36,194,166, 1,146,181, 52,236,199,138, 84, 53,147, 85, -149, 73,182, 92,129, 6,223,109, 81,169,207,198,147, 79,163, 83, 41,232, 5, 82, 81, 29,145,152,108,180,165, 54, 91,134,211,156, -200,113,210, 18,218, 3,193,103,153, 99, 39,101,145,165, 85,144, 39, 49,211,208,128,187,218,251,146, 58, 53,134,171, 94,215, 4, - 88,173,147,175,226,120,170,103,246,122, 6, 21,149, 44, 27, 66,168,189, 44, 37, 67, 23, 6, 68, 33, 36, 54, 58,210, 58,127,236, -202,171,173,165,149, 12,145, 11, 77, 10,223,167, 90, 47,203,153, 93,154, 39,203,117,178,229, 86,225,153, 22, 43, 10, 90,217, 97, -108,173,148, 73,109,194,197, 34,138,149,128, 98,176,158, 86, 18,160,180, 32,169,197, 18,171,243, 12, 71,188, 39, 42,174,205, 61, - 18, 45, 72,169, 45, 52,144,181, 82, 30,158,238, 86,184,179,219,134,160,218,163, 82,146,160,225,109, 14, 58,219,178, 20, 76,135, -249, 18, 91,109, 56,227,176, 25,153, 75,137, 81,185,166,184,212, 78, 68,193,165, 81, 33, 56, 20,195, 85, 39, 10, 11, 82,165, 48, -193, 47, 87,234,137,240,209,202,128,158, 72,168, 70, 91, 66, 74,214,240,187,209,162, 25,147, 29,241, 80,243, 20, 40, 45,185, 21, -234,107,146, 57,170,243,146,235,172,178,227, 19,125,225,132, 36,196, 91,197, 42, 68,112,151, 28, 82, 94, 80,113,210, 62, 13, 58, -210,106, 66,183, 75, 35, 17,168,117, 97,109,198,228, 16,111,212,237,190,224, 90,197,113, 23,172,103,117,158,190, 74,182,147, 48, - 80, 99,105, 64,211, 10, 1,101,209, 78,168, 99, 38,107,105,141, 52, 17, 20, 68,221,110,162, 55, 14,212, 81, 18,171, 73, 69, 54, -151, 80,170,193,183,229,135,231, 85, 42,149, 41, 47, 79,143, 80,247, 20, 52,203, 16, 98,229,240,126,168,115,170, 31,125, 39,149, -208,202, 26, 10, 40,231,230,113,232, 15, 68,139, 87,166, 53, 26, 60,198, 94,122, 51, 68, 71,148,250,148, 25,103, 63,162, 83,229, - 41, 41, 99, 37, 69, 44,160, 37, 60,201,103,152,129,206, 20, 27,135, 43, 8,141, 22,153, 2,220,110, 28,171,174,170,134, 89,142, -153,169, 66, 35,209, 88,108,174, 57,126, 80,125, 99,220, 96,135, 91,113, 92,141,161, 33,199, 27, 75,101, 92,216, 34,241, 2, 53, - 62,152,134,101, 34,161, 49,233,206,169,137,117, 56,178,156, 90,231, 45,245,190, 29,112,130,215,199,159, 17, 9,113, 10, 64, 72, -240,130, 80, 82, 83,212, 76,105, 31,217,222, 25, 64,230,104, 8,110,162,224, 1,102,223, 85,193, 99,246,172,183, 96, 73,103, 47, -101, 81, 84,230, 84,205, 52, 18,164,134, 72,163,156,202, 35,140,221,164,118, 98, 85,165,150,214,109, 39, 74,162, 72,246, 71,229, - 5, 65, 26,139,159,203,207,219, 83,176,204,240,223,237, 79,227, 35,111, 41,204, 69,139, 67,175,238, 80,222, 59, 98, 36, 38,195, -113,161,208,183,162,149, 7,112,132, 52,182,144, 3,101,170,213,102,182,215, 40,232,148,176,158,221,135, 48, 73, 36,100, 96, 99, -184, 61,250,246,212,159, 62,150, 45,137, 6,222,246,135,108,254,224, 66, 67,137,123,117, 56, 94,183,220,168,135, 22,209, 74,230, - 88, 87,181,215, 66,109,109,161,180, 2,209, 52,250,172, 0,176,165, 45, 68,165, 61, 64, 1, 34, 48, 64,228, 21, 18, 15,251, 56, -236,115,211, 86, 37, 3,171, 82, 68, 23,236, 70, 90, 53,182,195, 76,108,209,131,111, 66, 22,227,189,136,190,247,199, 60,230, 49, -152,171,170, 80,253,162,193,143,184,200,162, 66, 62,237, 86,255, 0, 76,120, 41,206, 48,160,113,145,142,217,207,150, 15,125,123, - 0,227,148, 14, 92,116, 63,209,247,244,215,220, 39, 25, 35,191, 83,230, 71,159,125, 87,109,178,242,146,134, 70, 92, 87, 96,172, - 36, 4,128, 84,165, 45, 71,162, 80, 0, 36,146,112, 0,201,233,173,195,210,228,218,223,187, 26, 93,174,118,199,134, 90,117,213, - 33,166,208,167, 28, 90,185, 80,132, 2,165, 40,158,192, 1,174,165,240, 33,236,163,226, 11,141,133,195,187,161,181, 31,108, 54, - 57,185,170,102,161,188,215,148, 9, 46,210, 42,138,140,234, 81, 54,157,182,214,243, 78, 53, 39,113, 42,232,234,133, 62,203,140, - 81,226,186,164,251,205, 65, 68, 45,141,111,127,178,155,217, 11, 7,117,232,244, 30, 38,184,174,161,203,107,103,231,248, 21,109, -173,218, 73,190,241, 78,168,239, 51, 13,168,169,155,182,242,228, 90, 36, 81,246,136,186,131,238,144,210, 90,151,113,134,203,171, - 91, 20,149, 36,203,150,181, 2, 36, 72,241, 41,180,202,125, 62, 5, 42,149, 74,131, 14,149, 68,162, 82,162, 70,166,209,168,180, -168,109, 37,152, 52,202, 93, 50, 19, 72, 98,155, 79, 98, 58, 66, 90, 97,150,208,219,105, 24, 66, 83,166, 25,243, 9, 42, 36, 48, -211, 63, 42, 59,216,200, 44, 75, 90,215, 17,131,112, 7, 91,187, 2, 54,178,171, 92,178, 89,124, 43,192, 18,102, 49, 69,153,103, - 74,240,208,200, 3, 69, 2,157, 18, 76,166,196, 60,141,179, 69, 19, 15,178, 22,210, 56, 58,131, 70,186, 89,244,203,132,143,102, - 23, 8,220, 37,199,165,207,176,182,222, 37,237,184,240,218, 71,188,239, 38,234, 68,167,221, 55,203,178, 8, 5,199,104, 48,157, -143,245,101,141, 16,184, 57,155,143, 75,138,210,217, 36,230, 83,228,243,158,151, 69,160,187, 49,126, 36,133, 58,235,129, 35, 46, - 60, 86,226,143, 94,131,153, 68,246, 24, 3,200,118,213,202,135, 74,248, 27, 28,132,168,164, 41, 71, 3, 60,167,178,137,239,204, -123, 15, 64, 52,232,211,232,248, 74, 64, 64, 35, 29, 71,146, 73,235,146,113,212, 96,254,205,107, 90, 40, 75,114,198,159, 86, 38, -236,109,251, 76, 73, 38,219,253,162,109,208, 91, 22,226, 81, 83,208,192,148,180,116,233, 71, 78,189, 18, 53, 84, 94,219,144,182, -187, 30,236,110,205,212,155,226, 36,191, 73,131,133,184, 14,237,254,198,241,107, 70,166, 37,170,205, 10,172,246,199,238, 12,230, - 90, 72, 51,232,213, 6,101, 92, 59,127, 50,122,210, 50,227,241,167, 51, 87,134,218,213,158, 86,166, 6,193, 0, 1,168,116,169, - 41, 33, 39,204,245,237,215, 39,203,251,117,250, 82,251,111,182,226,159,122,123, 47,248,158, 68,212,183,205,103,209,237,109,192, -166, 56,164,149,248, 53, 59, 98,234,166, 45,165,183,223,145, 74, 98,100,132,103,253, 85,145,219, 95,154,217, 61, 0, 4, 2, 74, -134, 8, 61, 7, 49,198, 52,227,147, 73,255, 0,165, 66, 15,216,112,195,220, 36, 0,159,222,225,201,223,169,197, 33,199,180,137, - 77,196, 45, 34, 0, 5,116, 17, 74, 69,250,190,167,136,155,109, 98,194, 32,222,246, 36,247,192,206,116, 56, 35,174, 1,207,238, -253,186, 25, 65, 61,243,212,246,243, 7, 26, 53,192, 0,199, 55, 83,220,158,189,254, 95,142,132, 88, 87, 83,128, 65,237,142,152, -192,193, 56,199,174,159,241, 15,192, 46, 18, 50, 66,124,241,246,227,185,249,232, 98, 58,147,216,252,251, 39,236, 30, 90, 53,207, - 47,191, 65, 58, 65,207,175,110,189,250, 16, 14, 52,178,244, 30,252, 20,218,254,159,207,182, 5,112,227, 39,190, 51,142,131, 31, -120,199, 78,154, 17, 68,242,243, 31,159, 40,251,126,126,154, 37, 72, 61,249,137,198,122,121,118,238,122,245,213, 5,161, 68,100, - 16,191, 34,124,135,231,247,232,227,183,207,254, 48,111,134, 5, 42, 36, 16, 71,124,114,231,182, 61,126,122, 29, 68,103, 25,234, - 1,232, 6, 0,235,229,162, 84,147,145,215,246,116, 0,106,130,240, 62,121,237,229,142,217,251,124,180,162,141,133,183, 31, 63, - 61,177,144, 1, 62,151,192,138, 73, 25,229, 57,201, 57,255, 0,103,240,208,221,251,232,197, 2, 50, 70, 0,235,156, 30,227, 61, - 50, 61,116, 50,192, 29,129,245, 39,203,236,252,116,170,117,249,219, 10, 40, 4,116,183,200,197,185,230,249,199, 41, 42,198, 70, - 82, 58,103, 25,238, 71,150,116, 51,141,184, 1,235,202, 2,112,144, 0, 36,143,159,167,158,174, 42, 0, 30,132,158,249,207,174, -132,121,178,164,158, 85,169, 7, 39, 24,254,119,219,234, 51,165,176,110,158,235,226,222, 82,148,255, 0,148, 36,147,212, 99,211, -208,244,239,165,175, 69,181,182, 0, 82,148,225, 61, 73,192,233,242,239,165,161, 99,233,140,227,210, 7, 92,249, 15,233,252,157, - 20,130, 49,129,223,185,251,245, 65, 32,224, 12,117,234, 63, 19,255, 0, 13, 86, 64,238,124,199, 76,122,104, 96, 96,148,167, 3, -175, 66,127, 28,126,227,253, 90,168,210, 0,200, 56, 61,207, 79,158, 58,231,243,223, 84,210, 73,233,142,131,166,126,239,219,162, - 91, 73, 57,233,223,215,207,166,147,112, 55, 61,255, 0,241,129,143, 96,121,224,159,199,161,251,180, 91, 63, 23,113,203,215, 25, -238,123, 13, 83,109, 35,160,235,215,175,223,141, 18,148,131,208,116,233,158,223,102,147,193, 77,141,238,118,193, 72, 79,216,122, -118,249,250,227,203,207, 85,146, 1, 56, 61, 61, 49,251, 7,109, 14,216,230,198,125, 50,122, 99, 68,160, 2, 64,198,125, 63,225, -164, 90,192,144, 62,122, 97, 28, 86, 29, 14, 58,140,121,159, 62,158,186,218,174, 11,120,121,159,197, 23, 18,123, 87,179,145,130, -147, 79,185,110, 40,206,220,178, 66, 73, 76, 27, 74,150,164,207,184,229,172,143,213, 6,158,202,219, 7,253,105, 35, 90,172, 1, -206,113,144, 59,143,159,245,234, 71,254,193,173,178, 98,146,141,245,226, 34,165, 22, 63,188, 82,169,144,118,234,211,150,250, 66, -158, 98, 93, 83, 19,235,142, 70,200,253, 26,253,223,221, 91, 42, 24, 61,198,152, 56,151, 50, 57, 86, 77, 91, 84,173,166, 80,186, - 80,142,161,155,107,143,122,130, 91,254,220, 76, 56, 7,134, 79, 24,113,142, 65,195,218, 75, 67, 95, 58,243,173,255, 0, 2, 48, -101,152, 92,116,213, 26, 20, 7,179, 48,196,149,103,214, 45,203,102,139, 77,179,109,136,172, 83,237,139, 54,149, 2,215,182,224, - 65, 9,106, 37, 62,145, 72,142,136, 76,165, 49,147,211, 5, 45,100,145,212,231, 39, 86,118,235, 42,143,200,227, 47, 37,210,234, - 18, 24, 83,124,167, 5,120, 37, 7, 39,169, 39, 31,142,154, 22,235,241,228,173,213, 7, 98,188,149,229,164,178,233,228, 89, 82, -186, 30,101,122, 21,107, 39,167, 33,181,182,204, 85, 70,113,109, 7, 2,195,161,204,169,167, 50, 20, 18,130, 15,196, 61, 53,201, - 85,114,187,206,236,205,119,148,147,111,221,239,252,122, 91,240,246,231,132, 50, 26, 12,191, 43,166,165,142, 30, 84, 80,168, 93, - 32, 13, 58, 85, 84,105,177,176, 1,109,176, 91, 3,211, 99,135,136,196,145, 38, 52,105,210, 76,121, 79,186, 10, 76,117,169, 45, -200, 65, 31,170,160, 65,233,140,104,132,199, 66,144,161, 62, 50,221,107,148,150,150,164,248,168,109, 67, 33, 74, 86, 6, 71,200, -131,160, 41,209,224, 56, 99,202,116, 72, 15, 50,217, 66,222,125, 75, 64,192, 24, 0,163,205, 35,215,229,172,162, 35,108, 56,218, -125,222,104, 97,121,193, 42, 81,113, 50, 18,162, 73, 1,181,118, 3, 58, 69,199,148,148, 66,227,107,244,216,237,190,219,127, 28, - 18,170, 83, 9, 43,230,178, 30,161, 74, 4,185, 54, 11,164,181,128, 27, 95, 77,200, 59,139, 97, 81,169,202,247,134,228, 67, 90, - 39, 71, 36, 55, 34, 19,199, 15, 6,193, 24, 91, 89,234,160, 7,109, 86,220,221,191, 69, 90, 85,181,115, 68, 96, 46, 68, 6,140, - 7,138,147,149,150, 82,160,166,208,188,140,168, 39, 39, 25,242,233,167, 58,137, 71,166,201,142,194,201,142,212,216,196, 6,229, - 50,121, 11,153, 61, 65, 3,161,199,207, 78,207,240,125,201,244,162,195,141,165,106, 65, 67,236,188,216,248, 92, 90, 48, 74, 84, - 7, 98, 83,144,126,221,106,152,228,100,145, 44, 64,101, 22,223,184,183, 79,141,173,235, 98,111,138,187,136,120,137, 99,171,130, -101, 58, 30, 38,100,109, 86, 82,202,195, 78,228, 88, 56, 32,141,236,172, 58, 16,109,124, 91,182, 90,193,101,183,152, 82, 35,165, - 30,248,200,113, 65, 41, 9, 79,140, 82, 57,198, 49,211,152,245,251, 78,155,223,104, 77, 33,251, 91,135,122,140,200,202, 44, 42, - 69,199, 77,109, 75, 9, 39,197,247,120, 85, 7, 27,105,208, 6, 86,128,176,147,145,219,151, 56, 58,220,141,174,167, 53, 29,232, -216, 70, 58, 14,152,232,133,143,214, 72, 31,205, 26, 97,253,170,148,143, 23,133, 86,229, 70, 46,101,187,202, 15, 56,105, 57, 89, - 75,148,154,162, 84, 79, 78,191,171,143, 92,159, 93, 75, 50, 90,104,205, 42,203,166,242, 70,111,241,189,135,243,239,235,142,124, -204,184,154,105,248,255, 0, 33,161,119,211, 75, 85, 83, 4,100,118,176,147, 86,254,237,133,254, 24,136, 5, 65,227, 38, 82,145, -202,226, 39, 41,110,184,151,185,156,241, 27, 46, 17,149,180,210, 23,200,250, 75,169,109, 32, 45, 42, 64,235,207,202,174,244,225, - 84,213, 6, 69, 67,223,225,189, 84,158,167,131,113,207,129, 29,150,216,138, 80,148,182,153,212,240,151, 19, 0,248,133,126,240, -180,243,120,152, 79,110,128, 7, 61,166, 95, 74, 93, 83,147, 93,247,105, 92,175, 73,101,190, 69, 71,105, 74,202,153, 10,108,130, -212,142,100,163, 40, 88,230, 36,130,160, 83,202, 52, 77, 26, 68,232,229, 30, 27, 79,123,184, 37, 79,205,166,196,101, 85,116,182, - 73, 71, 35,108, 72, 90, 68,166,220, 46, 4, 56,180, 23, 84,209, 5, 97, 7, 3,149,225,214,234,123,129,216,253,221,239,113,176, - 23, 3,174,219, 95,167,161,116,245, 3,200,177,221,159,162,132,176, 97,182,229, 73, 27,128, 53, 11,223,179, 1,176, 39, 14, 61, -179,110, 49, 87, 92,138,164, 73,146,233,178,165,150, 16,227, 84, 69, 42, 50, 94,109, 10, 71, 71, 96,168, 22, 37,159,133,105, 75, -193, 9, 83,132,168, 41, 95, 14,158, 74, 45, 26,235,147, 34, 76,184,244,134,171, 40,104,204, 83,146, 41,175, 68,162, 76,140, 26, -117, 76,161, 51,233,207, 31, 0,115,161,149,165, 62, 10,135, 57, 87,234, 12,157, 54,148,138,123, 5, 81,133,159, 38,108, 39, 22, -195,242,231, 68, 66,152,157, 2, 68,128,208, 83,174, 57, 5,247, 3,144, 18,140,142,105, 41, 91,107, 89, 89, 79,134, 84,158,109, -108,157,156,170,253, 2, 24,110, 77, 1, 74, 65,106, 28,151,106, 52, 57, 77,206,132,236,118,255, 0, 72,150,159,167,169, 41,148, -219,202,116, 37,124,170,241, 18,165, 16, 50, 10,136,212,110,190, 89, 0,102, 91, 57, 54, 10,173, 96,125, 45,246,150,247,176,217, - 88,139,245,185,184,195,137,205,164,100, 34,153, 99,169,146, 43, 14, 92,202, 82, 66,118,230,106, 62, 73, 25, 71, 75,134,111, 41, - 23, 70, 4, 1,238,148,138, 91, 79,179, 2,163, 42,161,107, 43,221,217,145, 13, 23, 52, 5,211, 28, 76,196,148,190, 35,243,188, -223,129, 37,188,163,195,105,198, 94, 1,193,212, 37, 68,105,199,141,108,212,103, 60,153,146,233, 80,100,164, 73,113, 42,158,134, -163,128, 66,210,128,223, 59,193,178, 90, 87, 40, 29, 82, 74,185, 79, 84,231,174,179,235, 33,170, 93, 82, 77, 65,154,147, 17, 46, - 76,178,176, 41, 85, 40,140, 45,104,144,248, 64, 74, 13, 62,115,105,115, 41,101, 46,164,185,225,171,144, 31,132,142,153,120,104, -155, 91,103, 58,196,127,118,165, 59,108,201,150,211, 50,140,139, 86,167, 83,165,188,209, 10, 66, 17, 17,112, 22,243,140, 60, 16, - 72, 81,231, 97,105,115,147,153, 93,245, 22,146,172,134,180,138,209, 72, 58,244, 55,189,174, 71,217, 35,212,143, 54,251,139, 30, -173,181,252,117, 14, 86,239, 28,240, 77, 72,225, 81,117, 42, 44,182, 50, 45,220,171, 22,130, 84,251, 42, 72, 28,237, 90, 65, 85, - 58, 66,227, 1,178,236,216, 17,129,148,194,170,116,121,146, 79,188, 38, 93, 38, 95,133, 10, 82,217, 78, 91, 18, 24,229,114, 60, -196,167,194, 87,134, 28,105, 10,115,149, 65, 71, 7, 26,218,107,126,109, 90, 10,162,154,132,152, 21, 33, 32, 55,133, 48,201,165, -212, 26, 80, 33, 63, 20,102,159,113,167,222, 82, 65, 82,130, 11,105, 73, 39,225,199, 46,172,180, 45,177,175,198,113,230,233,151, -117, 62,124, 98,178,148,183, 92,183,144,196,137, 9, 81,248,202,103, 82, 28, 65,109, 73,194,146, 20, 24,229, 74,149,158, 83,170, -151,157, 90, 22,218, 91,117,139,187,113, 17, 73,181,172,155, 85,134,101,215,110,181,213, 99,253, 77, 72, 98, 68,134,161, 70, 15, -171,149, 18, 12,199,165, 63, 30, 59, 44, 48,211,146,228, 58,240, 75, 8,112,149, 16,164, 80,243, 60,247, 50, 62,199,125,199,193, - 73, 23,219, 99,125,143, 82, 0,239, 80,241, 39, 21, 71,196,149,209, 83, 82,212,174,107, 81, 80,226, 56,226, 80,230,162, 70,147, -234,226,138, 33, 50, 71, 80,238,238, 21, 99,138, 13,122,152,170,128,194,195, 15, 28,122,147,162, 40,105,244, 58,132, 37,223, 18, - 3,231,194,234,242, 86, 28,114, 59,165, 43, 30, 26,249,214,164,228,128,219,188,202,202,185,192,213,242, 37, 81,151, 30,143, 37, -197, 57,226, 48, 3, 43, 43, 9, 11, 44,184,174,102,157, 83, 95,206, 90, 22, 66, 70, 64,200, 86,124,137, 13, 21,189,112, 82, 46, - 11,114,151,114, 91,117,216,119, 21,175,113, 83, 33, 86,232,117,120,238,174, 76,106,173, 26, 82, 67,145,101, 66,125,192, 11,141, - 45, 4,130,146,128,164, 41, 37,183, 57, 92, 66,210, 3,147,114,251,147,205, 46, 54, 83,202,178, 2, 20,226, 80,132,161, 96,169, - 73, 10, 36,120,173,129,204,140,147,204, 20, 64,198, 59,150,162, 37,117, 42, 5,134,194,253,108, 65,216,110,125, 71, 75, 11,250, - 92,139, 85, 45, 11, 75, 83, 85, 72,209,180, 51,196,206,140,172, 25, 25, 24, 29, 14,146, 35, 0,209,184, 32,134, 82, 46, 24, 18, - 55, 26, 78,240, 90,213, 31,208,130, 86, 9, 4, 18,130, 72, 73,229, 80, 42,230,108,126,177,199, 46,112, 65, 25,207, 93, 58,209, - 39,130, 16,145,159,214, 81, 60,157, 65,194, 72, 0,114,156,158,128, 96, 14,165, 71, 30,128,234, 46,217,220,212,153,116,202,237, -193,112,215,105,214,197,177,108, 64,126,171, 91,175,213, 37,166, 53, 46,151, 79,136, 18,100, 76,145, 41, 67,244, 76, 39, 45,163, -148, 5, 41,199, 22,134,154, 11, 82,210,147,121,177, 56,210,225,140,221, 20,202, 80,185, 43,180,231, 43, 85, 4,209,236,251,142, -240,181,165,219, 54,109,110,224,123,244, 52,198,233,213,121,111, 56,150,164,191, 39, 34, 8,154,220, 70,223,145,203,133,133,114, - 37, 82, 44,159, 40,174,158,140, 87,178, 8,168, 83,237, 72, 72, 38,202, 69,200, 91,220,219, 97,125,133,250,145,136, 77,103, 11, -113, 14, 98,249,179,100,188, 59, 93,159, 12,160, 94,161,169,105,165,154, 56,137, 78, 96, 87,150, 53,100, 83,203, 28,198, 91,150, - 88,129,148,174,133, 36,110,229,114, 79,128,205, 58,148,133, 31, 26, 20,100, 59, 45, 60,196,132,212, 39, 20,202,122, 50, 84, 70, - 84, 27, 10,142,218,188,129,109, 73,206, 70, 5,137,201, 14, 46, 63, 35,110,172, 30, 98,236,137, 60,136, 43, 66,208, 65, 73, 5, -196,225,111,114,171,166, 73,229, 9, 25,193, 3, 88, 95,215,200,158,183, 30, 67,206, 41, 43,116,248,202,117,107,231, 82,249,143, - 62, 86,165,101, 75, 43, 42,230, 4, 2, 9, 87, 55,198, 14,178, 38, 92, 98, 67, 32, 20,251,201, 8, 88,240, 16,146,164, 41, 67, -178,192, 65,194,147,145,216,231, 10,198,125,116,226,139,237, 51,153,109,101,216, 45,137,176, 85, 0, 40, 38,219,249, 64,243, 91, -246,186, 2, 70, 32,113, 80,251, 44, 81, 44,131, 83,130, 89,141,129,187, 49,212,196,131,181,139, 18, 64, 38,192, 90,228,140, 52, - 23, 71, 18,155, 27,182,247,133, 23,109,175,221,230,219,141,180,184,238, 72,209,228,209,169,247,213,194,220, 10,181, 86, 20,201, - 78, 65,135, 62, 60,103,163,251,172, 38, 37, 75,102, 75, 81,164,214, 36, 66,142,250,153, 91,141,169,214,146, 84,119, 30,147, 66, -165, 80,195,147, 41,232, 38,166,235,108, 25,149,121, 74, 76,250,173, 65, 50, 26, 67,141,184, 37,252, 94, 36, 34,194,208,182,218, -140, 81, 20,180, 82, 89, 10,109, 73, 89,131, 15,180, 99,113, 31,190,120,217,226,105,247, 21, 37, 48,237,189,193,122,201,132,220, -231, 27, 90,216,183,172, 58, 52, 11, 98, 37, 40,182,149, 41, 9,140,210,225,202, 12,167,155,149,105,150,162,177,158,154,222,143, -101, 55,180,158,109,129,120, 91, 92, 38,241, 1,118, 84,165,108,197,201, 83,133, 67,218, 59,194,177, 84,117, 3,105,238, 58,130, -145, 22,145,102,215, 42, 78,168,190, 54,130,167, 53,198, 99,180,128,239,129, 65,155, 33,153, 40, 74, 41,207, 76, 66, 18,163,204, - 18,106,169,105,103,136, 44,113,146,169, 37,205,135,152, 11, 55, 64, 21,137,251, 98,218, 65, 1,129, 26,156,119,103,137,223, 65, - 12,230,155,192,222, 23,241, 67,129,120,142,163, 57,207,166,202,105,115, 92,243, 34,120, 80,201, 36, 83,210, 71, 89, 57,203, 94, - 45, 47, 81, 37, 18,146,173, 69, 62,179, 89,161,231,164,145, 39, 16,209, 79, 40,202,229,206,203, 50, 92,167,210,208,107, 18,249, - 17,239,226, 44,119,234, 17,224,182,163,206,183, 36, 8,104, 87,141, 37, 68, 5, 37,149,169, 33,190,156,196,116, 73, 21, 52,233, - 79,123,195,137,167, 34,158,186,130, 89,101,234,213, 77, 81,234, 87, 35, 64,168, 41,152,136,167, 35, 45,198,233,144,132,186,180, -161,158,159,161, 42, 57,214,118,211,109, 82,144, 99,162, 60,122,107, 81,146,184,210, 98, 6,209, 25, 12,173,165,168, 41,185, 13, -180,145,149,165,224,224, 89, 57, 61,193, 61, 53,141, 63,114, 33,233, 11, 85, 22, 2,170, 6, 42, 84,212,185, 46,120, 80,168,201, -117, 77,148,182, 88,156,160,181, 73,125, 4,163, 41,105, 11, 32, 40,146,226, 20, 64,212,177, 40,249,104,218,136, 93, 29, 1,247, -238, 71,235, 92,237,232, 58, 18, 54,181,252,231,165,168, 98,130, 44,186,134,201, 24, 5,166,121, 54, 99,112, 87, 94,233, 10,130, -202,186, 81,249,136, 78,144,193,201, 44, 84,122, 5, 38, 28, 86,234,113,156,144,169,205,161,212, 57, 82,170,201, 76,201, 45, 60, -163,153,137,113,197,182,159,113,143,202,130, 20,219, 0, 33, 33, 33, 36,173, 0,232, 37,215, 92,148,250,153,181,195,113, 24,204, - 83,252, 40,144,178,220,218,116,212, 96,205, 77,188,203,169,196,146,181,168, 6,221,112, 41,150,139,220,205,165, 69, 32,139, 44, -136,107,113,106,122,179, 49,215,100, 48,241,113, 20,248,234,113,186,107, 6, 70, 20,166,155,136, 28,230,125, 10, 89, 0,151, 66, -148,164,164,149, 30,184, 24,253,199,122, 66,165, 47,234,152,208, 81, 88,170, 60,133,169,134,151, 37, 17, 89,142,182,144,160,195, -138,116, 16,184,175,115,146, 26,228, 35,152, 2,144, 10, 70,182, 97, 64, 14,163,229,113,223,173,246,245,220,141,236, 46,119,233, -208,144,112,239, 75,150, 79, 93, 50,162,150,205,103,109, 68,106,254,230, 52,186,181,201,144,170,200,168, 55, 28,194,177, 0, 89, - 74, 58, 49,195,130,197, 46,151, 71,143, 89,156,136, 50, 16,226,147,239, 45,220,146,230, 75, 91,181, 22,228,134, 85, 46, 53, 65, - 42,116,169,215, 27, 81,116, 21,143,136, 56,176, 83,223, 69,209,101,194,118,104,120,212,188,105, 41,116,182,242, 25, 83,206,149, - 54,218,214,160,181,186,242,194,131,168,108,182, 83,205,250,200,108, 3,147,240,233,134,126, 83,142,181, 21,235,160,213, 20,137, -105,109,136,245, 1, 33,149, 69,131, 86, 73, 74,228,162, 18,225, 47,194, 98, 66,176,143,133,208, 29, 73, 36,133, 44,128, 52,237, - 91, 17,157, 91,145, 84,244,169,143,180,227, 68, 21, 75,109,133,243, 33,111,129, 20, 74,114, 56,241, 39,182, 84,174, 82, 70, 20, -165,173, 69, 57,239,167,120,101, 42,241,198, 6,146, 55,181,138,219,126,164, 14,187, 16, 5,245, 16, 5,201, 45,115,133, 51, 76, -165,169, 40,229,154,170,189,170,102,150,227, 88, 37,145,130, 42,169, 88,221,140,154,183, 83,169, 71, 40, 43,236,138, 6,155,195, -227,233,107,174,155, 39,136,190, 10, 30, 97,107,118,164, 56,127,220, 70,158,146,160, 16,217,132,155,246,143,200,210,154, 35,155, -222, 4,191,120, 37, 71, 9, 82, 86, 10, 64,235,168,152,132,228, 28,164,164, 19,215,231,143, 77, 73,155,233, 79, 95,204, 87,248, -240,217,189,185, 66,217,147, 47,105,120,111,164,154,148,182,157, 83,138,126, 70,226,221,245,186,220, 86,150,133,146, 80,148, 83, -104,144,212,158,249, 18,186,147,129,168,234,237,246,223,222, 27,165,119,219,150, 21,133,110, 86,174,219,186,237,172, 68,160, 91, -118,213,189, 79,122,169, 91,174, 86, 39, 44, 34, 53, 58,153, 1,128, 75,239, 43,226, 82,212, 74, 91,101,180, 45,231,150,219, 72, - 90,211, 98,229, 79,202,203,150, 89, 92, 34,171, 76, 88,147,176, 28,199, 55,185,216, 11,111,185,252, 49,198, 60, 76,139,250,126, -189, 32, 28,197,102,132, 46,145,114,196,195, 16, 0, 0, 1, 44, 73,181,128, 4,182,214, 7,108, 96,193, 42, 89, 72, 66,114, 71, -100,165, 36,149, 99,176, 0,119, 58,237,167,177,211,217,215, 3,138,221,197,169,239, 54,241,210, 85, 43,135, 45,155,171,194, 77, -122,148,248, 83,108,110,166,227, 37, 13, 84,169, 27, 94,149,140, 21,219,145, 99, 42, 44,251,145, 77,156,169,135,162, 82,185,144, -185,207, 4,246, 39,129,175,163,187,181, 22, 69, 46,141,184, 92,116,214,164,223, 87,121,101,186,140,141,132,177,171,110,211,108, - 90, 17, 41, 14, 34,153,125,223, 20,181,162,117,229, 60, 3,201, 42, 45, 53,216, 84,224,161,200,151,229, 4,149, 43,177, 76, 91, - 27,113,181,244, 24,150, 14,210, 88, 54,166,216,237,189,188,185, 31, 81,216,214, 37, 26, 21, 6,221,166, 25,110,243, 75,144,204, - 24,141,132,174,107,238,225,201, 18, 29, 43,126, 67,129, 42,121,215, 23,130, 27,243, 44,205,164,167, 43, 26, 24,161, 39,118, 99, -165,220,118, 10,191,105, 84,157,152,182,150,181,202,117, 86, 19,158, 18,240,238,182,106,218, 90,236,242, 5,138,150, 59, 56,166, - 62,103,145,133,180, 9, 71,217, 84,185, 12,200, 75, 22,182,135, 80, 11, 12,100, 74,154,169,242,176,132, 54,203,109, 54,195, 44, - 71,140,203, 81,226, 70,137, 29,164,179, 10, 4, 72,236,165, 45,195,134,212,102, 91, 75,109,182,148,182,219, 76,161, 8, 74, 80, - 18,144,232, 90,112, 2,249, 93,117, 25, 66,146,209, 71, 66, 22,162,163,134,241,211,245,150,177,159,152, 58,106,104,113, 92, 82, -188, 39, 22, 57,159,117,107,144,172,114,134,208,144, 20,235, 77,249,242, 37, 62, 27, 96,249,156,159,144,217, 59, 62,158, 23, 33, -162,160,146, 26, 67, 60,168,236,129, 33,209,134,130,134, 48, 2, 26, 35, 31, 51,211, 77,180, 46,116, 52,199,224, 54,176, 30,128, - 14,214, 29,134,219,219, 98, 14, 47,113, 78, 21, 72, 3, 87,123,254,238,135,222,126,240, 59, 91, 14,157, 22,158, 26,105,164,172, - 5,168, 4,243,159,213,231,121,125,145,208, 99, 30, 93, 60,129,211,139, 26, 35,109, 54, 49,133, 17,220, 16, 79, 83,232, 60,250, -246, 31,187, 86,138,100, 68,165, 73, 8,229, 81,142, 64, 42, 86,112,183, 22,144, 21,130, 15, 85, 36, 19,242, 28,218,203,218, 78, - 49,240,169, 41, 70, 66, 74,122,165, 68,142,170,207,160, 57, 72,251,254, 88,216, 14, 90,230,251, 15,244,249,254,125, 48,211, 87, -166, 54,210, 5,205,133,251,123,192,239,235,247, 3,211, 99,142, 83,123,105,234,144, 40, 62,204, 78, 45,213, 56,172, 10,158,223, -193,161, 68,109,166,214,234,222,168,213,110,106, 44,120, 49,210,219,105,230, 42, 83,161,103,253,144,131,228, 53,249,148, 74,163, - 86, 33,178, 31,157, 73,168, 68, 97, 73, 37, 15, 75,136,244,102,150,130,114, 10, 29,117,176,149,119,242, 39, 7,166,117,250,228, -239, 21, 54,139,113, 81,162, 91, 21,234, 77, 58,187, 2,167, 53,185, 83, 41, 53,168, 81, 42,144, 36, 71,167, 16,227,102, 68, 9, -141, 45,167,146, 37,173,178,146,164,171, 5, 25,232, 70,154, 39,182,131,105, 43,148,145, 68,173,237, 86,217, 86,168,230, 58,226, -138, 93, 86,195,181,102,211,147, 24,131,204,194, 99,191, 75, 41,109,188, 19,219,175, 94,132, 30,186,205, 29,108,244,181, 21, 13, - 12,113,200,178,104, 7, 83, 48, 55, 91,237,178,176,177,213,114,119, 55,218,198,215,196, 43,137,120, 6,163,136,230,167,205,151, - 49, 90, 53, 72, 22, 32,134, 2,250,180,203, 43,106, 45,205, 75, 41, 46, 64,178,159,179,125,239,183,228,250,227,101, 60,188,224, -140,142,128,244,207,144,199,168,198, 48,126,122, 21,192, 0, 3,155, 35, 57,233,215,215,166,191, 65, 78, 47,125,129,220, 19,241, - 21, 2,167, 90,218,170, 35,252, 48,110, 99,233,144,252, 74,205,131, 29,202,134,222,212,103,172, 18,132, 92, 59,119, 53,242,134, - 99, 45,220,115, 59, 76,122, 43,169, 25, 41,109, 88,229, 48,230,227,131,217,183,196,255, 0, 1,119, 35,112,119,146,205, 19,108, - 74,180,247, 33,217,251,193,104,151,171, 59,105,118,144,165,248, 44, 49, 88, 13, 5,219,245,162,132,229, 84,234,138, 35,202, 73, -200,108, 58,145,204,100,244,217,164, 82,178,199, 50, 26,105, 9, 0, 92,221, 24,250, 43,250,158,193,130,177,236,164, 11,226,164, -206,184, 91, 56,200, 65,146,174, 1, 45, 32,219,159, 17, 47, 24,222,195, 93,194,188,123,216, 93,212, 33, 36, 42,187, 28,115,229, -210,158,163,169, 24, 62, 96,119,253,255, 0,215,160,212, 66,187,167, 24,232, 58,249,116,198, 49,219,174,141,117, 3,152,133,229, - 39, 56, 41,199, 80,122,227, 65,120, 97,165,169, 73,201, 43,238, 14, 79, 41,235,146, 61, 52,244, 14,192, 1,182, 35,160, 31, 92, - 14,231, 32, 73, 74,186,231,203, 24,251,137,244,208,101, 3,148, 32, 40,165, 57,236, 60,201,209,133, 63, 26,186,168,231,201, 71, -225, 29,187,121, 13, 81, 86, 50,122, 16,115,246, 12,124,177,163,142,222,236,103, 3, 40, 3,211, 29,186, 30,189,241,215, 57,208, -203, 24, 36, 15, 67,140,252,199,207,203, 69, 47,208,103,166,115,229,147,129,215, 62,186, 25, 64,244,230, 29,124,143,175,113,215, -212,233, 85,189,129,245,235,243,240,198, 69,172,126,125, 48, 42,129,193, 30,127,147,161, 85,246,156, 17,215,204, 2, 8,199,217, -162,148, 58,146, 20,122,103,207,167,159, 83,161, 92, 42,235,233,230, 71,159, 95,232,210,139,215,173,176,170,143, 95,157,176, 50, -206, 15, 76, 31, 80, 71,224,126,220,104, 85,168,227, 28,189,125, 61,126,206,154, 37,100,103, 3,200,156,244,243,249,232,117,227, - 57,235,233,242,251,180,182, 50,126, 54, 56, 25, 99,175,159, 81,231,229,242,210,215,178,172,119,200,244,198, 14,127, 31, 61, 45, - 40, 47, 97,229,191,200,255, 0, 79,155,224,126, 56,162,144, 64, 30,191,143,158,170,163, 62,125,137,232,115,220,250,106,159,236, -213, 69, 35,156,131,204, 71,166, 63, 63,156,233, 54,219,160,220, 99, 35,227,108, 20,131,208, 14,228,121, 99,231,251,116, 80, 56, - 35,184,249,250,104, 22, 57,146, 8, 81,234, 59, 31, 80, 60,243,247,232,209,216,117,207,207, 68,223, 77,200,244,254, 88, 24, 45, - 24,207, 92,231,203, 69, 35,207,183,239,208,173,124,207, 92,126,127,118,138, 64,232, 79,221,249,252,249,105, 44, 16,142,190,251, - 15,145,130, 80, 58,103,215,250,244, 66, 49,140,129,215,212,247,207,245,106,146, 48, 57, 79,150, 7,252,116, 64,193,232, 49,223, - 31, 97,210, 44, 79, 91,236,127,211,253, 48,153,183, 97,138,128, 40, 5,103,208,224,119,235,169,123,123, 41,104,112,173, 78, 2, -173,121, 73,134,167,220,191,111,139,158,183, 80,116, 97, 14, 1, 26, 65,131, 29, 41,199,146, 91,142, 0, 58,136,106, 65,193, 4, -140,224,156,227,211,175, 77, 75,111,217,163,113,199,172,240, 9,183,233,105,231,146,187, 86,241,187, 45,249,133,131,143, 9,213, - 78,114, 75, 97,196,121, 2,219,168, 32,158,224,244,213,121,226, 65,147,244, 28, 33, 13,148,206,186,191,254, 57, 45,142,131,250, - 49, 71, 12,158, 42,209,137,118,101,162,169, 41,214,225,249,148,226,226,196, 27,233, 45,211,181,251, 99,118,128, 83,114,214,210, -153,146,220,116,144,235,125, 10,212,129,205,144, 20,161,156,249,105,224,180,100,161, 50, 35, 25,130, 74, 80, 57, 85,206, 20,176, - 26,230,198, 22,164, 30,253,198,153, 40,181, 49,238,232, 92,122,195, 47, 73, 82,210,211, 81,100, 39,149,110,184,178, 82,218, 1, - 61,252,180,248,219,242,107, 80,222,162, 71,155, 77, 98,169, 61,192,124,102, 35, 56,130, 91,108,254,170, 94, 72,254,110, 58,245, -215, 54,213, 70,193,217,152,217,148,130,111,182,219,117,233,112,127, 28,123, 9,151,215,172, 84,113,194,236,164,181,215,237,232, -114,116,222,246,144, 11,142,228,222,194,248,216, 58, 84,210,135, 89,145,227, 49, 81,108,184, 26, 12,189,132,132,180,123, 21,146, - 58,249,103, 78, 29, 49,216,145,157, 46,202,141, 0, 50,165, 99,153,162,151, 0, 10,255, 0, 80, 14,216,207, 93, 55, 22,253, 58, -116,249, 14,180,186, 68,194,162,227,110, 41, 40,100, 22,154, 72,236,208, 41,238, 63,167, 78,237, 50,222,105,197, 50,210,160,203, - 5, 43,248,209,238,139, 82, 16,172,254,170, 84, 6, 15, 64,123,246,209, 97,137,100, 58,121,100, 21, 38,219,129,125,253,251,159, -203,124, 66, 51,202,138, 53, 13,169,202,221,119, 10,203,112,189, 71,216, 96, 1, 27,139,233,177,239,124, 60, 54,123, 86,252,196, -161, 45,162, 50,155,229, 7,170, 74, 10,129,238, 6, 71,112,116,252,211,104,240,209, 29, 41,140,174, 68, 20,228, 53,207,204,217, - 24,234, 19,232,174,250,105,109, 74, 83,112,209, 24, 57, 24, 70, 14, 44, 8,200,152, 24,136,167,206,112,124, 36,200, 90, 75,189, - 71,243,115,233,167,174,148,195,204, 73,247,101,182,182, 20,172, 18,219,237, 41, 33, 67,200,161, 67,203,168,237,167,136,114,230, -101,187, 11,252, 13,192,191, 66,125,255, 0,150, 57,147,139,234,195, 84,202, 96,169,114,138, 75, 0,206, 26,224,108, 77,134,219, -119, 54,216,237,113,131,109,233, 2,149, 48,165, 68,165, 30, 38, 65, 7,177,206, 58, 19,172, 11,142,250,104,187,248, 72,189,156, -100,243,201,160,212,173,234,211, 33, 37, 75, 0, 55, 52,196,120,156,116, 8,228,153,212,158,131, 26,214,142, 52, 56,200,162,240, -178,104,182,149, 18,205,170,110, 30,239, 93,144, 68,251,106,214,167,179, 37,200,145,162, 56,240,138,204,250,159,186, 52,167, 29, - 74,229, 97, 13,180,210, 74,150, 65,201, 72, 25,215, 24,110,255, 0,109,214,236, 89,181,169,123, 63,196,206,212,209,225,216,219, -139, 33, 54,133,121,152,140,200,163, 86,236,207,172, 95, 67, 44,213, 92, 50, 29, 90, 28,247, 39,220,142,243,241,228,161, 37,109, - 48,160, 22,133, 16,160,237,150,210, 77, 74, 30, 57, 24, 4,148, 29, 42, 55,123,122,233, 0,155, 3,252,176,190, 77,224,151, 30, -113,173, 21, 7, 27,228,116, 52,241,195,151,149,172,136, 84,213,193, 77, 53, 92, 16, 72,162, 73, 41,163,149,129,100, 44, 12,107, - 36,134, 56,222, 75, 34,185, 39, 28,240,171, 81, 92, 18,235, 15,189, 50, 83, 15,182,251,205,242,193, 1,135, 11,172,188,227,129, -215, 90,116, 41, 15,167,152, 55,128,160,127, 87,190,113,171,197,186,251, 84,199, 27,110,231, 91, 11, 8,109,105,102,164,211,204, -152, 75, 4,120,205, 50,166, 93, 67,142, 51, 33,194, 84,147,146,190, 85, 0, 82,178, 59,103,187,207, 96, 84,168,155,135, 92,164, -148,251,168,139, 80,118, 74,101, 49,206,195,115, 26, 83,165,196,200, 97,164,164,165, 44,172,160, 41, 39, 56, 83,110, 36,144, 0, -213, 45,183,165,251,180,225, 57,214, 41,211,231, 46, 59,134, 32,155, 57,137, 75, 47, 56,165, 48,251,207, 7, 20,216, 97,211,207, - 28, 22,210,121,212,147,204,148,242,228,105,122,137, 21, 98, 46,198,247, 22, 0, 1,112,118, 0, 3,218,222,150,216,220,157,247, -199, 91,101, 89,173, 61, 78, 87, 77, 84, 36, 38, 42,136, 21,215, 65,180,182, 96, 28, 89,154,203,123,157,181, 30,246, 5,126,214, - 30, 11, 94,207,114,229,117,201,237, 69,164,202,120,197,143, 54, 85, 82,157, 37,183,147, 22, 59,235,108, 65,134,165, 70,194,224, - 61,226, 33, 45,144,231, 55, 47,196,226,209,149,116,219,107, 39,110,107,207,161,154, 43, 53, 69,192,105,220, 59, 45, 51,224, 51, - 86, 64,151,226,135,152,104,200, 64, 67,211, 90, 7, 24, 74, 94, 41,111, 9,230, 0,233,156,176,182,201, 77,169, 18,170,137,115, -223, 42,193,152,112, 99, 91,243,158,143, 35,199, 74,144,226, 36, 74,147, 13,192,137,144, 80,224, 4,151, 2,137, 82,194, 64, 37, - 56, 27,217,102, 90,215,133, 41, 49, 27,133, 84, 98,165, 57,224,159,142,189, 5,146, 26,113, 35,153,236,152,138,109, 46,169, 69, - 25, 87,137,133,140,117, 36, 18, 53, 10,175,145,203, 5,138, 80,109,208, 48, 59, 17, 96, 8,190,160,123,246, 0,108, 20, 27, 91, - 12, 57,247, 17, 10,106,116,134,130,190,154, 78, 89, 80,156,196, 87, 1,193, 91, 30, 97, 18,163,152,205,238,197, 65, 6,218, 88, - 22,108, 90,237,237,189,152,234,185, 95,164, 89,245,210,228,149, 56,245, 82,107, 53, 74,100,246, 35, 52,164,165,243, 25, 77,135, -115,204,242, 70,121, 29, 74,177,211,148, 96, 43, 79, 29,187, 98, 95,172, 58,106, 17,164, 80, 67, 45, 56, 12, 74,109, 70,100,217, -240, 85, 24,171,153, 44, 69,113,113, 82,236, 53, 20, 4,149, 21, 41, 69, 5, 39, 41, 86, 6,179,123,118,157, 92,141, 29, 16,156, -183,161,203,117,169, 45, 41, 85, 8,181, 70, 27,109, 47,173,212,248,236, 71,106, 84, 99,132,175, 36, 36,133,242,100,225, 68, 4, -141, 58,241, 37,169, 36,181, 81,162,206,163,163,196, 75,109,173,245,177, 34, 3, 69, 39,152,189,239,177, 10,146,225, 89, 79,232, -208,128, 73,194,129, 72, 61,117,169, 79, 70,103, 39,152, 2,179,118,234, 61,230,215,211,210,196,129, 98, 64, 29,141,241, 79,103, -220,101,153, 30,114, 70,144, 85, 43, 2, 13,228, 73, 14,130, 64, 58, 33,230, 2,133,252,192,233,140, 21,185, 0,130, 72,108,110, -143, 14,191, 8,188, 39,209, 80,234, 30, 65,115,252, 6,171, 17,212, 71, 73, 7,149, 40, 68,198,155,113,192, 74, 65, 61,137, 39, -175,124,235,131,126,216,205,247,152,111,141,190,225,194,146,243,176,233,118,141, 10,155,186,215,228, 17, 33,165,138,133,245,119, - 54,244,107, 38, 20,208,210,212, 86,213, 50,201, 6, 83, 77, 44,254,130, 77,220,242,193, 10, 9, 34, 68, 98,167, 69,113,239,115, - 98,162,209,150,227,169,100,164, 50,250, 30,142,153, 10, 67,104, 47,161,113,185,149,250,217,193,234, 7,124,117, 58,132,167,180, - 11,114,157,191, 56,207,226,110,235, 91,220,193,123,191,119, 82,161,167, 35, 13,210,109, 57,205,218, 52,134, 80,174, 65,250, 54, -233,246,252,102,210, 48, 48,150,250,247, 58,147, 81,229,101, 16,136,212, 49,107,111,110,151,247,223,215,107,145,238, 29,206, 45, - 63,161,246, 88,153,247,139,149,156, 79,155,208, 8,233,184, 47, 46,150,174, 32,203, 38,147, 89, 80,241, 82,211,189,164,119, 95, - 36, 18,213,200,157, 74, 75, 28,114, 11, 50,130, 59,157,236,172,221, 24,215,231, 13, 23, 37,147, 81,118, 25,168,236,189,253, 46, -152,218, 93,144,151,101, 53,102,223,141,191,116, 91,190, 19,107, 28,209, 97, 71,172, 69,186,152, 65,253, 80,165, 4,167, 7, 26, -218,107,158,228,161,191, 61,218,125, 49, 94,245, 40,172, 37,210,202,148, 67, 42, 11,229, 81,117,224, 57, 60,114, 15, 92, 2,160, -149, 14,100,228,234, 49,124, 2,239,229, 79,110, 55,233,155, 77,234,234,233,116, 45,237,130,141,181,173,200,114, 66, 99, 70,106, -181, 46,104,159, 98, 79,117,194,147,225, 52,221,203, 17,152,171,112, 17,134,171,110,142, 96, 9,204,138,108,186, 50,226,248, 65, -230, 94, 18,210,234,138,218,116, 40, 56,144,201,253, 42,228, 2,144, 82,232,125, 39,155,155,185, 24,199,163, 70,113, 75, 61, 53, - 66,211, 24,192,102, 80,250,173,177, 4,158,128,236,109,107, 27,244,244, 55,216,120,245,195,212, 92, 51,226,119, 20,241, 60, 83, - 51,208,241, 68,223,164, 41, 96, 4,170, 44,179, 42,251,111, 53,134,197,189,176, 77, 41,141,108,170,146,160, 98, 5,181, 97, 28, - 75,220,181, 26, 38,200,211,104,247, 69, 74,235,183,182,170,177,190,251, 65, 11,117,110,107, 14,159, 10,179,117, 91,182, 75,207, -220, 78,183, 82,133, 14,168, 4, 79,171,216,186,153,183, 21, 41, 82,210, 98, 36, 41, 9,115, 46,170, 58, 78,196,185,236,244,224, -218,187,107, 59,115,220,156, 71,239,126,228,237,173, 2,138,187,170,107, 84,230, 45, 75, 86, 5,193, 65,109,135,229, 52,252, 91, -142,223,106, 82,213, 70,114, 67,192,198,106, 35, 40,154,243,242, 91,140,151, 91,112,244,112,233,245, 17, 14, 44,120,174, 52,203, -140, 76,104,179, 45,183, 16,135, 25,122, 52,130,142,120,210,155,117, 36, 60,203,137, 64, 5,181,165, 73, 88, 7, 57,232, 53,131, -111, 20,122,181,183,183, 23,101,181,105,248, 52,138, 5, 74, 76, 74,251,148,250,116, 97, 1, 16,222,167, 60,106, 47, 70,165, 53, - 21, 77,181, 6,159, 41,244,182,244,150, 67,100, 56,236,116,184, 10, 10,220, 42, 89, 95, 56,135, 46,142, 10, 39,138, 88, 81,180, -202, 38, 14, 74,164,134,226, 72,138, 50,168,146, 61,200, 73, 86, 72,223,161, 85,177,213, 91,112,255, 0,139,220, 97, 77, 6, 89, -195,156, 53,196, 21, 60, 22,207,152, 77, 60,242,208,138, 52, 21, 75, 82,148,144,150,121, 38,162,154,174,158,178, 4,129,185,117, - 52,245, 41,169, 36, 80, 81, 94, 4,118, 96,232,187,243,188, 52, 58, 53,183, 22,179,113, 84,169, 53,196, 81,160,251,245, 41,201, - 62,244,245, 37, 30, 24, 17,105,181, 9, 10,121,208,245, 77,152, 9,140,153, 37,110, 58,225,146,151,148,235,139,112, 41,106,217, -189,151,227, 46,253,131,118,219,180,250,252,122,125,201, 79,118,165, 17,114,150,164, 24,178,216,166,197,117, 15,212, 36, 41,109, -252, 46,145, 13,149,146, 84,156, 16,146,163,211, 58,229, 18,107,239, 62,242,147, 37,199, 31, 91,206,242,186,241,117,192,165, 58, -115,211, 39,155,149,210,121, 78, 15,117, 43,161,198,175,245,237,208,133,180,123, 77,185, 27,181, 83,195,175,211, 41, 12,109,245, -155, 17,197,165, 15, 85, 55, 47,117, 95, 93,149,109, 82, 48,149,164,169,198,162, 73,174, 84, 86, 89,234,134,109,247, 20,190, 92, -115, 20, 34,161,174,138,166, 35, 73, 52,177, 73, 35, 11, 42,177, 35,177,251, 38,224,129,110,227,176,216, 3,139, 63, 49,225,124, -159, 58,137,168,171, 50,122, 67, 83,155,200,176,199,104,150, 37, 89,170,228, 17, 68, 21,129,214,136, 36,145, 64, 37,137, 84, 80, - 88,147,124,113, 55,116,247, 70, 69,253,187,251,165,124,248,206, 6,183, 3,113, 47,219,205,230,124,103, 29,108, 53,115, 87, 43, - 21, 40,234, 47,172,146,232, 75, 18, 90, 9, 39, 39, 13, 39, 9,232, 14,172, 14,214,153,120, 48,183, 78, 92,152, 57,157, 10, 37, - 43,109,167, 26, 13,184,150,207, 80,131,206,176,172, 30,169, 9, 5, 24, 32,105,155,145, 77,159, 79,177, 55,214,248,122, 99,102, - 14,214,238, 37, 54,195,167, 33,244, 45,181,207,144,221, 5,213,204, 44, 21, 16,151,138, 88,241,164,244, 32,167,198, 64, 82, 64, - 41,200, 53, 27,141, 40,118,147, 76, 15, 45,169, 62, 12, 25,243, 2, 86, 20,234, 16,197, 62, 19, 65,165,164,117,229,247,167,138, - 73, 61, 22,177,202, 7, 66, 69,171, 7, 12,211, 48,141, 68, 97,196, 42, 34,118,176,243,125, 68, 82, 27,237,230, 26,101, 64, 77, -183, 59, 94,221,125, 38,200,188, 76,203,114,202, 54,165,142, 67, 20,116, 65, 22, 8,217,183, 68, 90,250,204,182, 21, 7,236,171, - 60,153,116,228, 2, 70,148, 58,202,134,186, 15,209, 95,217,213,187,149,126, 36, 56, 44,216,253,206,187,174, 26,157,110,227,126, -218,126,193,186,149,240,199, 84,155,163,109, 39,191,101, 84, 39,204,125,144, 23, 80,149, 50,149, 75,163, 76,121,231, 85,202,227, -245, 23,148, 15, 58,213,173,192,169,181, 57,184,233, 69, 62, 75, 17,217,117,148, 54, 25,157, 8, 41, 77,184, 20, 57, 18, 85, 21, -196, 40, 55,148, 36,167, 33,106,235,158,185, 26,226,103,176,146,232,171, 73,224,105,202, 90,107, 52,248, 49, 97,111,182,232,183, - 25,185,145,221,148,239,233,169,118, 36,151, 91, 74,223,144,136,236, 44, 74, 46, 41, 40,108,169, 68,173,101, 73,230, 86,187, 41, - 49,154,218,209,205, 42,173, 52, 52,180,165, 74, 68, 70, 98, 69,116,182, 9, 42, 83, 15,150, 84, 82,172,173, 43,228, 0,100, 3, -231,140,166,170, 86,154, 21,107,179,160, 10, 88,238,110,160,139,147,114, 77,254, 59,238,122,227,195,207, 25,248,114,151,135,188, -100,241, 27, 44,203,158, 10, 60,158,155, 59,204, 26,142,156, 69,166, 56,105,158,169,228,130, 24,163, 88,121, 65, 97,137,146, 53, - 32,147,100, 5,141,201,182, 5, 94, 69,230, 10, 94,145, 46,158,251, 79, 45,104,148,212, 6, 23, 14, 74,219,229, 12, 45,182, 36, - 58,225, 37,149, 97, 25,231, 83,121, 7,151,152,115,103, 88,171,145,168,116,244,134, 97,194,115,222,240,219,142,210,234,106,145, - 26, 99, 65,211,209,246,222,146, 74,159,116, 16, 64, 41,113, 93,130, 80,224, 61, 53,146,220, 18, 42,169, 71,189, 65,175, 23,224, - 43,196,110,100,138,180, 52, 73,141, 20,132,150,219,121,201, 49,146,211,140, 32,184, 66, 20, 84, 8, 65, 74, 73,198,117,138, 87, - 28,148,234,162, 34,187, 74,117,192,134,195,141, 85,221,124,204,165, 74, 66, 64, 8,106, 33,105, 1,113,212,225, 81, 86, 31, 66, - 49,205,221, 67, 11,214,189,142,171, 48,185,237,109,186,218,221,251, 94,219,220,117, 0,118,198,190, 89,205,228, 83,161,104,226, -136,234,212,180,224,194,199, 64, 4, 7,140,136,249,140,128,157,144,137, 21, 72,107,233, 54, 57, 45, 21,111, 50,239,128,212,167, -155,106, 99,237, 53, 50, 5, 82, 58,170,112,130, 22,133,248,114,226,201, 82, 20, 84,194, 84,162, 75, 79,133, 20,150,202,144,180, -144, 70,158,219, 70,151, 29,231,155,118, 60,104,204, 22, 63,193,222,142,151, 20,169, 10,146,203,194, 58,208,195,190, 63,232,220, - 83,255, 0, 26, 27, 64, 12,165, 9, 10,230, 9, 32,105,148,162, 91,141, 33,248, 83, 89,126, 99, 48,230,182, 20,180,198,150,244, -129, 79,113, 60,188,170,101,153,170,115,222, 32,173, 37, 93,149,240, 99,149,124,169, 9, 89,109,184,249,226, 98, 31, 5,220, 21, -239,191, 17, 15,200,136,155,150,213,178,166,210,246,246, 59, 73,141, 4, 86, 55, 54,239,228,181,236, 42, 83, 8, 90,185, 31,124, -220, 21, 40,178,202, 18,149,144,213, 45,220,101, 41, 86,157,232,209,181,169, 10,100,111, 40, 23, 59,177, 54,181,129, 23, 4,146, - 58, 1,212,220, 92, 98, 11,198,117,212,212,212,243, 58,213, 20, 77, 12,210, 54,146, 52,132, 30,109, 96, 29,244,170,155,187, 57, - 42, 0, 96,197, 77,204, 4,253,172,219,203, 47,139, 95,105,175, 18,183,101,176,204,138,245, 61,141,200,141,179, 22, 18, 41, 9, - 93, 86, 93,102,147,182,162, 46,222,210,152,166, 51, 24, 19, 62,108,219,142, 29, 80,176,134,211,151, 87, 57, 0, 2, 78, 76,168, -189,147, 30,205, 59,119,129,141,189,137,185,219,145, 71,167,212,120,177,191,168, 72,110,225,150,239,131, 57,157,155,182, 42,104, -109,241,183, 54,188,132,130,150,171,238,183,225,154,253, 69,162, 22,251,224,192,105, 98, 36,114, 29,230,127,176,159,128, 53, 76, -144,190, 60,247,198,152,229, 94,166,106,149, 39, 54, 34, 21,106, 58, 84, 43, 87,116,135,159, 77,209,188,211,162, 60,140, 58,227, - 18,159,150,197, 29,103, 9, 19, 37, 74,154,140,150,153, 34, 80,232,121,231, 86, 94,194,151,206, 84,165,229, 89, 83,132,156,149, -100,255, 0, 59,169,238,117, 52,214,174,144,192, 15,246,106, 75, 42,129,210, 73, 19,102,115,254, 20, 96,116, 95,171,221,172, 52, -163, 53, 11,192,252, 48,106,170,102,226,204,206, 29, 53, 57,147,188,180,145, 48,254,234, 41, 9,101,148,237, 96,238,166,209,126, -196, 86, 97,188,158, 91,213,199, 90, 49,104, 79,128,238, 30,144,121, 9, 61,192,192,201, 10,245,242,251,181,174, 71,196,148,241, -192, 74,219,247,143, 25,101,101, 88, 83,109,158,100, 32,143,231,159, 20,183,140,231,245,116,231,222,179, 3,236,178,194, 18,160, -158, 67,240,159,214,231, 63, 8,200,245,230, 7,246,107, 16,183,233,171,125,220,148, 41, 94, 26,193, 82, 72, 56, 30, 24, 42, 25, - 7,182, 93, 82,127,254,159,144,211, 69, 97,106,138,152,227, 83,176,254, 38,222,238,150,252, 15, 81,139, 78, 53, 68, 46, 72,176, - 83,107,124, 58,253,247,191,243,198,113,108,211, 19,227,169,194,215, 63,134,203, 99, 5, 93, 27,101,146, 22,246, 14, 62, 37, 45, -242, 7,255, 0, 71, 91, 55,104, 83,196, 88,200, 91,141, 21, 62,226,125,225,196,142,201,144,233, 1,182,178,161,208, 1,200, 7, -158, 18,112, 52,218,218, 20, 34, 11, 72, 82, 48,167, 29, 66, 86,162, 9, 37,168,227,198,115, 36,249,169,100, 15,158,126,122,216, - 74, 93, 56,165,176,160, 48, 80,160,230, 79, 96,234,193,228, 24,207, 80,150,250,245,243, 58,216,145,194,132,133, 59,122,123,247, -233,252, 61, 58,123,176,171,188,113,197,169,205,134,223,126,214, 23,251,250,216,250, 19,223, 23,184, 45, 45, 45,164,250,130,146, - 81,130,165, 58, 79,198,161,205,211,205, 71, 39, 29,135,217,171,242, 82,161,202,146, 14, 66, 64, 79, 92, 18,112, 18,132, 16, 7, - 82, 71,151,110,167,174, 79, 64,225, 49,204, 6, 74,148, 8,194, 60,151,142,203, 80, 0,244,206, 50, 62, 95,110,173, 87,197, 93, - 84, 74, 17, 76,101,242,212,170,171, 93, 62,154, 51,254, 77,126, 25, 50,166, 56,148,245, 8,102, 57, 81, 78, 59,184,180, 13, 2, -252,184,139,157,194,142,158,167,111,226,127,215, 17,237, 18, 87, 87, 69, 75, 8, 13, 45, 67,233, 30,130,251,146,127,194,160, 22, -111, 64, 9,233,134, 94,191, 60,214,174, 57,178,155, 80, 92, 88,138,250,178, 34,146, 73, 75,205,197, 89,247,133,181,215,245, 87, - 40,172, 41, 93,185, 91, 30, 93,117,113,101,178,148, 36, 20,167, 60,185, 33, 32,115,124,125,242,123, 32, 17,235,228, 58,103, 58, - 6,155, 5, 49,217, 1, 3, 41, 72, 72, 43, 80,202,251,124, 13,167, 57,231,230, 87,116,142,188,202,202,181,122,119,157,164,242, -182,128, 48,114, 74,210, 29, 82,148,174,231,149, 4, 14,112,122, 96,156, 36, 12,232, 82,130, 20, 22,181,207, 83,241,235,252,127, -134, 38,117,241,198,136,144, 66, 60,145, 40, 65,126,182, 80, 5,205,187,158,167,191,125,177,107,145,209, 56, 56, 42,192, 31, 7, - 50,136, 81, 39,245,114, 6,113,145,215,212,143, 62,186,109,183, 18,195,178,183, 58,203,185,118,235,114, 45, 74, 13,245, 98, 93, -244,185, 20,123,178,204,185,224,179, 84,161,215, 41,210,208, 90, 83, 50,227,188,143,209,202, 66, 15, 51, 50, 26, 45,202,140,234, - 80,244,119, 91, 90, 65, 46, 20,133,132,149, 18,121, 66, 82,146,158,167,227, 3, 9, 11,231,233,205,133, 28,116,233,240,231,231, -171, 4,167,130,146, 70,115,130, 7, 41,230, 1,190, 97,133,140,168,119,230, 25, 87, 47,167, 66,115,128,228,164, 50,233, 32, 21, - 35,161, 23, 7,226, 15, 81,234, 45,238,196, 78,170, 0,218,129, 93, 72,247, 12, 8, 22, 32,141,193, 7, 98, 10,220, 16,110, 45, -112,118,216,254,127, 62,215,111,101, 5,107,129, 75,173,157,208,218,223,173, 46,126, 22, 47,170,217,166,219, 21, 73,139,114,161, - 95,218,219,154, 98, 29,148,206,220,223, 83, 66, 63,194, 24, 91, 77,191,245, 45, 81, 88, 76,246, 99,150, 29,196,198,148, 28,226, - 11,202,192,207,250,185,206, 65,252, 7,207,183,227,175,213, 99,121,118,187,111,119,183,109,239,125,163,221, 75,114, 53,215,183, - 27,137, 66,147,110, 93,212, 9, 73, 66,132,168, 18, 70, 89,155, 1,197, 28,211,235,208,230, 33,137,116,249, 72, 41, 92,105,113, -154, 90, 84, 7, 50, 85,249,178,113,225,194, 13,235,193, 55, 17,215,238,197, 93,238,191, 80,167, 82,159, 69,111,111,238,242,201, -110, 45,251,182,117,197,186,245,165,117,196,233,203,239, 75,138,218,226,212, 26, 24, 84,122,141, 58, 75, 74, 74, 64, 71, 51,238, - 85, 86,192,138, 57,152,176,223,150,204,110, 72, 29, 81,137,234,203,216,159, 51, 46,237,118, 86, 99, 65,113,143, 12,174, 75, 50, -215, 81, 41, 25,101, 83,105, 43,215,145, 46,237,160, 27,127,116,226,230, 50,126,201, 86, 67, 97,203,213,166, 30, 57, 89, 86, 50, - 57, 63, 91, 35,175,110,154,250,115,156,144,122,249,254,255, 0,158,190,132, 99,161, 63, 14, 7, 46, 51,204,122,121,244,234,117, -245, 72,229, 29, 50,113,234,114, 6,127,226, 52,254, 46,118,196, 36, 11, 11,116,192,142, 40,231,160, 24, 29,207,175,231,166,135, - 82,137,238, 64,232,124,241,143,179, 68, 44, 19,211, 24,237,156, 99,160,245, 31,126, 52, 50,128,235,212,121,128, 78, 49,215,207, -246,105, 68, 59, 91,211, 6,181,253,109,251,240, 59,128, 1,240,171,174,122,121,121,246,207,159,246,104,101,244,200,243, 35,246, - 1,147,162, 21,140, 28,140,254,113,161,148,112, 8,235,215, 56,237,248,125,154, 85,112,176,189,136, 39, 3,168, 0, 15,145, 62, - 99,204,143, 35,249,242,208,203,229,235,235,211,242,126,225,162, 87,140,117,249,224,122,159,158,135, 88,233,231,247,118,251,254, -237, 44, 58,142,248,193,237,183, 67,243,247, 96, 69, 12, 31,183,175,217,165,175,171,198,113,140,126,255, 0,187,241,210,210,202, - 77,133,197,207,221,131, 99,202,112, 72, 7,242,117, 92, 15, 35,128, 60,190, 67,250,245, 69, 3, 39,236, 25,209, 40,239,246, 15, -207,219,164,143,175,174, 6, 42,164,124, 64, 14,131,166, 15,207,236,243,242,209, 35,215, 56,198, 62,220,124,191, 62,122,164,143, - 51,208,255, 0, 72,235,253, 31,213,170,160,100,227, 56,233,145,243,252,254,237, 17,175,109,186,223, 3, 4,160,140,231, 62, 93, -207, 79, 77, 22,130, 49,143, 63,233,251, 52, 26, 72, 30, 64,143,179,183,217,162, 1, 74,146, 72, 61, 65,252,115,142,159,159, 93, - 35,140, 48,184,235,108, 20,140, 18, 1,239,158,135,203,239,209,169, 7,166, 14, 79,145,253,186, 1,158,132, 17,149, 14,196, 19, -140,124,243,251,180,122, 72, 79, 76,145,211,160,233,147,164, 9, 36,220,225, 54, 29,199,206,216, 33, 4,224,142,153, 29, 85,219, -183,166,164, 73,236,110,220, 31,173,246,111,125,182,170, 68,175, 13,251,106,189, 68,191,169,177,199,196,183, 33, 84,227, 24, 21, - 2,134,250,229, 41,151, 17, 57, 35, 63,229, 6,117, 29,198,252,179,144,122, 1,230, 79,219,211, 93, 44,246, 85,110,228, 13,175, -226,214,210,164,215,229, 24,246,198,234,192,168,237,157, 95,227,228,108, 75,174, 32, 59,111,188,224, 39, 4, 38,172,195,104, 4, -246,247,157, 70,120,186,135,219,242, 26,232,130,234,146, 37,230, 46,215,221, 14,166,255, 0, 32, 97,247,226,198,240,131,136,227, -225, 95, 18, 56, 87, 54,157,180, 83,123, 64,167,148,237, 97, 29, 72, 48,220,223,107, 43,186, 57,255, 0,166,248,146, 36, 30,101, -188, 76,200, 92,160,148,190,196,228, 14, 82,218,114, 10, 92, 8,242, 87, 93,108,205,136,136, 94, 60,105,208,170, 83, 26,151, 9, -191, 29, 82,222, 74,157, 92,231, 64, 7,195, 90, 79, 64,192,244,244, 26,103, 63,131,149,104,117, 26,148, 68,184,195,109, 83,228, -173,134,209, 44, 2,226,202, 22, 82, 16,178, 79,234,114,242,159,179, 79,213,149, 33,113, 88, 77, 61,112, 27,121,229,248,106,149, - 58, 39, 41,101,148, 19,213, 63, 32, 79, 66, 62,237,115, 51,211,150,121, 6,155,219,175, 91,109,181,133,253,226,219,123,241,235, - 75,241, 11, 79, 76,188,137, 11, 48, 93,149, 89,118, 13,107,151, 89, 1,176, 11,212, 3, 98, 79, 75,219, 27, 67,183,181, 74,244, -214,231, 56,229, 74,158,135, 38, 41, 14, 18,160,166,156, 74, 16,156, 36, 32,118, 65, 62,159,191, 89,190,241,113, 11,110,112,191, -176,215,206,245, 95, 6, 20,202, 61,145, 74, 92,138,101, 45, 18,130,100, 92,247, 68,212,150, 40,116, 70,185,198, 84, 94,156,164, -120,132, 3,202,211,110, 40,118,198,137,219,165, 83,139, 76,133, 80, 28, 90,114,210,212,240,109, 10,241, 74, 15, 76,167,253, 94, -159,126,117,202, 47,164, 21, 92,174, 69,225,135,102, 32,209,169,178,160, 90,181,125,216,152,229,206,180, 71, 8,142,167,224, 81, - 11,148,102, 36,173,177,132,143, 17,201, 42, 66, 85,208,148,156,117, 26,113,203,168, 3, 58,157, 54,103, 33,125,118, 36, 94,196, -237,222,227,213,182,195, 70, 89, 79, 69,197, 92, 91,144,112,245,125, 61,168, 43,234, 1,157,252,177,147, 20, 49, 60,207, 26,149, - 58,245, 75, 28, 77, 18,149, 55, 93, 87, 27,139,227,130,123,191,198,175, 16, 27,247,184, 53, 45,208,191,119, 70,231, 85, 90,163, - 41,199,233,180,154, 61,106,117, 46,133,107,211, 84,247, 52, 26, 77, 22,153, 17,228, 34, 20,118, 27, 40, 72, 87, 47, 57, 41, 37, -106, 42, 36,235,167, 28, 15,251,109,119,107, 98,106,116,123, 7,136,169,179,119,107,102, 31,113,136, 72,172, 74, 90,101,223,214, - 83, 75, 33,180, 78,165,212, 93, 60,213,120,109,143,137,113,159, 82,138,146,217, 13,173, 11,198,163,142,186,235,108,188,164,169, -213,165,121, 56, 0,143,231, 19,148, 16, 58,242,145,159, 46,186, 6,109,204,220, 84,151,229, 73, 75, 76,165, 69, 13,186,181,124, - 13,149,252, 65,167, 20,122, 32, 43,175, 41, 61, 51,208, 28,156, 25, 60, 92, 63, 80, 37, 67, 1, 49, 19,208,129,189,141,182,255, - 0, 21,246,184, 55, 7,184, 56,236,142, 32,151,195,140,255, 0,133,223,133,248,147,134,104, 42, 50, 10, 88,196,113,162,172,112, -123, 24, 69,210,178, 83, 74,129,100,164,145, 7,247,111, 27, 39, 75, 54,164, 44,167,244, 98,220,125,244,218,109,207,181, 44, 93, -211,218,219,134,218,187, 42, 87, 53, 36, 51, 69,220, 10, 51, 17,100, 76, 69,191, 35,149,215, 40, 82,159,113, 5,234, 52,228, 57, -209,198, 86, 27,121,151, 16,161,243, 44, 38,219,240, 59,195,109,247,187, 50,119,219,118,236,200,251,153,118, 75,170, 65,173, 67, -182,174,118,154,153,103,210,171, 16,188, 32,197, 90, 69, 61,192, 77,102, 97, 83, 13, 41, 94, 54, 91, 36,117, 74,129, 58,135, 95, - 6,188,107,223,252, 45,110, 43, 52,233, 52,170,149,203, 96,222, 20,101,215, 83,103, 60,250,190,174,187,227,193, 5,199, 38, 91, -143, 44,148,196,174,178,208,123,149, 72,234,165, 37, 41, 87, 50, 84, 70,166, 95,193, 71, 19,251, 57,196,190,221, 82,183, 35,102, -111, 8,119, 37, 13,224,211, 21,170, 59,206,165,155,154,207,170,129,201, 34,143,114, 82,138,185,226,186,219,193, 72, 75,184,240, -221, 9,202, 85,215, 26,134,231,185, 70,123, 75,158, 38,105, 42,145, 71,202, 88,163,146, 50, 90, 29, 18, 16,197, 88, 92,133,119, -146, 38,219,245,140,108,190,102, 70, 11,198, 92, 75,194, 16,120, 95, 13,105,224,204,246,176, 46,111, 21, 85, 20,213, 74,239, 79, - 89,200,142, 74,121, 30,138,165, 99, 8,209,242, 82,106, 70, 89, 32,229,195, 52, 53, 48, 77, 24, 84,168, 68, 26,105,237, 7,217, - 19, 64,220,153,215, 20, 88,210,156,133, 88,145, 38,124, 79,119,101, 69,163, 18,166,128,243,109, 37, 40, 1, 44,161,169, 41,117, -174,100,245, 74, 25, 74, 0, 3, 3, 90, 51, 69,177,226,173,138, 60,234,204,122, 85, 38,221,129, 41, 51,103,211,161,176, 94,110, - 91,208,250,114, 84,204,148,115, 56,210,150,121,194, 65, 70, 22, 18, 73, 35, 82, 72,226, 42,210,160,110,117,160,197,162,168,115, - 29,188,213, 74,168, 86, 45, 9, 77, 65,126, 76, 10,156,120,126, 17,171,208,229, 78,105, 60,176,167,150, 84,151,226,161,194, 60, -101, 71,113,182,200, 89, 26,226, 82, 54,226, 82, 43,245, 56, 55, 19,146,165, 82,168,173,189, 53,234,122,121,219,167,174, 92, 53, - 21,161,215,162,173,172, 60,148, 33, 24, 82, 73, 88,113, 92,185,201,201, 27,117,108,244,241,194, 26, 80, 4,200,175,177, 5,212, -177, 33,144,129,246, 88,144, 74,234,211,113,184,242,225,135,128,248,146,174,159, 42,143, 44,172,115, 72,249,120, 15, 20,146, 35, - 63, 50,152, 72,218, 26, 20, 93,164,179,172,144,173,201, 8,234, 67,105,179, 12, 29,182,244,136,190,236,139,162, 43,211, 44,218, - 8,144,234,232,245, 56, 11, 17,235, 21,134,156,116,152, 20,134, 80,176,164, 56,209, 72, 43,143,200,135, 22,133,101, 74,113, 57, -214,238,237,187,251,130,203, 76, 67,151, 72,167, 84, 98,133,170, 91,213, 42,148,233, 12, 76,138,192, 82,148,219,210, 68,113,202, -170,138,219,193, 89, 73, 67,106, 72, 42, 40,200,248,181,222,133, 7,252, 38, 61, 94,168,236, 48,218, 34,198,106,222,121,215, 12, - 42, 5,177, 73, 72,109,202,131, 44, 54,165, 4,166,172,236,131,241, 5,128, 23,219,155,149, 1, 39,109, 54,169, 47,214,159,141, - 78, 48, 42, 53, 11, 73,106,126, 99,142,173,244,196,145,119,169,196,182,166,100,201, 84,167, 3,137,162,161,194, 72,100, 6,202, -154, 9, 82,143,134, 60, 50,195, 58,115, 25,121,138, 2, 2, 5,250,155,236, 2,134,216,220, 95,168,238, 13,133,186, 73,115,220, -216,213, 80, 74,207, 75, 13, 76, 72,128,234,144,106, 49, 40, 80,161, 99,149, 74, 52,149, 4,141,198,181, 87,112,116,142, 90,187, -151,130,212,169,221, 85,192, 81, 71,162, 69,143, 17,233,177, 66,234,213,121,210, 29,109,249,104, 83,136, 47,211, 99,197,142,149, - 42, 58, 27, 13,132,100,161, 42, 4, 36, 14,234,214,192, 82,168,207, 6,100, 72,146,243,115, 36,115, 37,223,120, 83, 66, 40,134, -150,151,200,182,225, 67,103,224,109,191, 19,152,143,214, 95, 97,205,166,202,221,175,203,122,100, 42,117, 14, 27, 48, 96, 45,217, -109,187, 93,144,132, 73,164,149, 65, 11,113,200,212, 8,170, 80, 21,149,224, 37, 41,120,242, 70, 10, 10, 9, 83,160, 99, 78, 43, -116,232,146, 18,162,237, 86,169, 54, 43, 79, 52,133, 63, 42,172,182,163, 42, 83,190, 32,120,165,166, 16,210, 27, 75, 65, 69,178, - 18,158, 64,162, 82, 50, 81,157,111, 81, 68, 21,129, 8, 22,227,101,189,237,123,109,114, 1,185,236,109,232, 47,107,226,137,226, -141, 77, 41, 30,203, 30, 87, 20,158, 96,168, 26,121,138, 19,111,172,118,118,179, 18,159,221,137, 20, 88,110,150, 85,193, 53, 73, -145,226,170, 46,101,196, 76,164,184, 28,240, 12,134,153, 95, 43, 10, 74,155, 46,181,207,144,121,194, 7, 62, 9, 82,143, 47,108, -234, 4, 62,210, 58, 72,219,158, 58,184,155,183, 37, 40,183, 29,237,225,189,234, 44, 58, 57,127,200,220,181, 35,117,198, 37, 8, - 56,229,118,159, 89, 74,128,242, 87, 67,131,157, 78,142,170,138, 83,209,158, 69, 30, 52, 6,160, 54,228,136,114, 46, 38, 99, 50, -181,206,146,133,248, 78, 67,166, 72,113, 37, 82, 16,149,149, 37,199,134, 91, 66,242, 26, 11, 88, 90,147, 16,207,164, 3,178,234, -161,113, 5,183,251,173, 73,167,134,104, 59,189, 97,210,168, 85, 9, 52,211,200,236, 43,223,109,162, 38,218,168,185, 41,231, 21, -137, 21, 23,168, 70,202,152,128, 87,226, 56, 92, 95,235,114,171, 51, 28,157, 98,150,190, 8,100,110, 92, 83,221, 79,199, 69,239, -185,177,177, 27, 15,128,189,142, 45, 63,163,127, 17,212,112,127, 20,113, 29, 53, 38,185,106,243,156,177,196, 81, 58,133,230,212, - 82, 85, 83, 84, 44,108,169,172,160, 52,166,171, 97,169,163, 3, 91,114,200, 24,226, 4,154,196,244,219,106,220, 88, 18, 36,123, -230,213,238,117, 58,151,184,116,120,110,184,212,168,118,117, 66, 76, 20,196,186,144,180, 43,157,136,145,234, 12,197, 91,146, 81, -132, 70,114, 83, 75, 43, 75,110,100, 74,151,217,207,198,213, 39,137, 54,238, 61,133,221, 10,180, 42,127, 21,123, 72,167,219,169, -193,146,168,241, 90,223,139, 2, 44,118,170, 52, 45,207,178, 66, 74, 81, 80,184, 88,183,166,211,141,199, 76,103,157,106, 33, 53, -232,129,216,210,102,162, 20, 59,161,215,121,234, 81, 43, 84, 91,170,177,103,222,204, 45,171, 98,241,138,155,114,161, 89, 69, 74, -148,180, 59, 78,143, 92,122,151, 17,151, 83,112, 82,132, 69,184,196,200,129,133, 59, 38, 25,125,133,176,243,141,180,149,244, 87, -132,222, 13,248,140,184, 47,203, 39,113,120,121,171,199,191,238, 93,185, 98, 53,251,111, 91,251, 99, 85,166,215,175, 87, 41,240, - 42,241,155,165,214,182,154, 47,191, 41, 91,145,104,211,234, 42, 83, 92,148,103, 83, 85,163,199,117, 84,250,197, 33,136,225, 97, -185,206,113,194,121,109,101, 27, 45,125, 80,163,171, 2, 95, 99, 38, 41,121,134,115,162, 78, 66,144,133, 38,141,138,205,202, 84, -102,150,120,231,139,150,134, 90,104,163,158, 75,196,249,142,105,226,180,212, 89,118, 93,165,163,138,170,138, 74,220,202, 74,236, -184,209, 80,208,200,239, 65, 46, 97, 87, 27,213, 71, 85, 72,252,182,203, 23, 53,133,225,134, 42, 12,195, 41,170,210,211, 69,154, -203, 85,150,205,166,227,165, 61, 6, 5, 54, 97, 74,156, 18,227, 69,110, 35,140,180,165,169,249, 82,156, 67, 13, 71,138,218, 85, -241,185,226,184,218, 91, 31, 9, 82,214, 50,122,244, 11,114,111, 27,114,131,182,251,199, 34,255, 0,136,154, 45,247,176,245, 58, - 22,218,111, 22,216,181, 81,143, 85,184, 45,221,195,188, 89,183,161, 89, 20, 42,100,159,117, 96, 92,148,187,141,187,194,223,118, -133, 84,102, 59,113,170, 72,126, 72,105, 41,114, 12,164, 55, 75, 99,119,122,224,174, 51,245, 7, 19,219, 89,112,112,215,186,220, - 60,220,144,175, 61,215, 77,193,108, 87,174,237,159,151,101,211,226, 77,189, 33,110,173,151, 93,162, 70,144,154,221,142, 81, 76, -164, 63, 80,165, 60,241,153, 77, 68,215, 72,114,100, 8,147, 31,135,146,113, 71,183, 59,103, 34, 92, 13,253,110,235,173,110,165, -205,184,176,173,202,147,143,193,221, 91, 86, 92, 45,209,191,156,186,104, 59,129,181, 86,205,199,245, 20,121, 48,102,109,181,175, -123,214, 32, 86,104, 82, 40,181, 28,208,209, 13, 52, 53,191, 38,135, 86,101,109,214, 19, 84,229,188, 53, 74,207,159,161,161,167, -175,150, 56, 86,121,140,113,211, 67,100, 55, 51,107,101,157, 73,146, 72,180,145, 11, 42,168,147,153,162,197,146,162,201, 56,112, -210,113,141, 46, 79,196, 20,245, 18, 53, 58,173, 84, 67, 46, 95,106,106,245, 73, 41,170, 2,208,207, 24, 52,245, 80, 86, 80, 37, - 72,165,150,158,114, 90,122,170, 9,135,212,151, 87,227, 20,104, 45, 87, 24, 85, 86,218,241, 42,148, 71,110, 43,170,211, 76,212, - 52,150,132,106,245,151,114, 85,109, 11,162,129, 84,104,168,251,149,106,157,112,209, 42,113,229, 48,188, 58,218,227,142,108, 33, - 77,169, 90, 21,237, 94,168,222, 22,133,223,195,254,202, 10, 93, 82, 93,177,180, 43,183,183,154,236,164, 81, 20,153,146, 98,238, -125,229, 73,129, 91,163,213,175,116, 52,191, 22, 53, 66, 29,188,253,173, 71,167, 81, 57, 76,150,133,213, 81,149, 33, 81,220,148, -211, 74,150,182,225,218, 92, 50,112,247,195,165,153, 77,165, 90,219,117, 99, 91,150, 60, 43,174,244,174,223, 49,109, 27,134,228, -218,202,205,255, 0,107,212,149, 18,116,251,243,114,104,207,201,168, 51,121, 72,220, 7,211, 38,169, 13,184,115,170,215,251,244, -217,244, 88,238, 70,155, 37,169, 49,121, 20,212, 93,185,118,222,225, 46,203,225,223, 98,183, 23,120,253,160,252,116, 84, 55,118, -117,213,191, 91,223, 72,247, 69,219,219,105,184, 23,221, 98, 20,254, 44,230,237,204, 42,236,138,109, 42, 84,217,212,251,153,118, - 17,144, 93, 52,138,101,143, 85,175,174, 58,252, 58,125, 67, 79,254, 28, 54, 93,153,214,174,113, 79, 20,121,133, 44, 97,185,112, - 9,150,105,100, 73, 41, 86, 94, 92, 38, 35, 21,167, 43, 81, 29, 57,169,144, 44, 20,142, 37,170,101,154, 49, 70,106,111,238, 14, -168,151,137,248,115,244,207, 19,210,215,101,116,144,212,140,186,131, 48,134,146, 36,164,139, 59,164,121,107,219, 53,204, 26,181, -229,163,139, 38,160,162,201,235, 36,205,169, 85,235,234,125,154,190, 36,140, 9,162,154, 90, 72,169,213, 45,253,208,118,151, 97, - 90, 91,181, 38, 13,167,103, 94,215,213,102,231,174, 55, 49,215, 31,172,238, 77,247, 17,216,119, 14,228, 45, 49,233,233, 9, 77, - 46, 21, 66, 69,159, 70, 41,134,135, 99,193,140,211, 84,180,200,231,102, 82,155, 18,155, 83,131,120, 85,111,219,154, 3, 50,105, -148,169, 19,160,193,160,214,170,113,194,103,214, 98,211,229,168,183, 62,159, 72, 66,178, 89,147, 84, 14,152,173,252, 45,248, 13, - 54,178, 84,149,147,169,133,123, 64,189,146, 86,255, 0, 13,187,109,182,187,145, 64,219,248,219,185, 14,215,178,234,116, 13,218, -222, 42,148,217, 2, 53, 42,184,204, 22,226,237,117,131, 14,206,132,240,114,194,225,222,157, 83, 53,138,149,106,161, 29, 14, 73, -171, 86, 42,171,153, 89,124,169,230,121, 34,177,182, 91, 65,116,111, 46,243,196,218,253,171,247,251,206,183,116,213,106,146,228, -110, 45, 77,182, 89,136,139,118, 28,148,197,186,119, 9, 54,243, 47, 6,109,107, 54,152,143, 26, 45, 38, 35,139,255, 0, 5,141, - 9, 78,190, 85, 41,232,140,170,115, 83, 86,212,245, 25,140, 21,212, 63,162,231,161,141, 36,125, 43,202,166, 45, 35,172,211, 73, - 10, 63,152,169, 40,176, 6,149,220,186,195,120,162,104,238, 34,191,184, 15, 62,224,252,219,132,178,206, 51,225,190, 45, 60, 75, -193,102,174,190, 55,168,174,180,249,164,116,185,109, 52,249, 86, 93, 75,153, 84,195, 32,246,103,141,107, 43,115,158, 82,101,249, - 74,150,205,227,150,183, 49,167,173,118,253, 35, 52,143, 98,189, 5, 54,159,179,243,109, 77,101, 98, 4,221,196,190,119, 71,112, - 90,102,181, 21, 8,139, 91,164,212,174, 88,182,196, 10,140, 85, 56, 18,219,240,220,254, 9,200, 41,115, 33, 74,231, 82,146,146, -218,155, 42,234,187,209, 27,163,184,237, 90, 72,168, 42,130,200,240,165, 64,143, 38, 82,158,160,173, 74, 13, 9, 84,182,157,124, - 46, 93, 57, 73, 90, 10,152, 73, 43,100,172, 41,160,180,115, 32, 49, 27, 9, 77,177,109, 93,139,217,139, 99,111,227, 72,143,183, -214,214,217,218,118,173,163, 6,173,153, 19, 88,131,108,210, 99,208,101, 65,174,135, 83,148,212,157,159, 79,150,244,181, 20,148, -123,204,229, 43,177, 57,114,208,124, 17, 57,202, 83, 14,170, 36, 5,137, 85, 10, 36,185, 75, 84, 55, 96,202, 71, 42,132,120,171, -113,106,241,219,116,146,219,173, 15, 11,186, 85,148,168,114,194,132,136,200,173, 31,158, 54, 80, 65, 3,168, 34,224,129,232, 65, -213,184,220,116, 23,199, 0,113,150,101, 55, 20,241,127, 20,113, 19,235,165, 25,245,125, 85, 67,198,196,108,179, 84,182,152,185, -133,129, 73,145, 89, 34, 14,220,203, 72, 8,103,229,150, 86,247, 81,110, 91, 49,167, 78,161,215, 37,212,219,113,213,165,218, 85, - 69,240,244, 26,132, 54,129, 11, 49,228,181, 29, 46, 66,168,140,245, 75,156,193,124,161,183, 27, 28,201, 86,190, 81,155,125,104, -135, 34, 12,114,220,121, 41, 40, 98,157, 53,228,170, 35,114, 20,230, 86,221, 26, 80,200,167, 40,169,103,158, 59,169, 8,202,112, -128,131,144, 60,211,163, 71,152,183,230, 83,229,191, 4,133,169,153, 76,134,179, 60,198, 89,109,232, 14,212,225, 62, 86,221, 65, - 13,185,148,165,196,101, 78, 32,243, 37,209,130, 19,153,208,146,134, 81, 41, 19, 11, 49,214, 86, 24,121,165,178,165, 69,168, 40, - 31,135, 1, 64,169, 46,149, 41, 36, 40,254,144, 5, 36,146,188,100, 38,134, 48, 25,152,141,172, 46, 77,136,220, 27,250,141,253, -222,226,122,130,193, 89, 80, 41,169,164,139, 72,146, 84, 43,112,200, 85,236, 84, 40, 87, 84, 1, 94,219, 21,144, 93,244,155, 22, - 69,101,209,125,183,168,209, 97,190,250,204, 70,152, 5, 64,200,140,166,150,203,176, 87,241,151, 94,136,160,178,134,218, 89,230, - 82,128,202,114,162,164,100, 2, 53, 28,111,107, 60, 59,251,143, 63,104, 23, 11,126,205,170, 3, 53,106, 46,201,109,173, 53, 27, -255, 0,189,117,166,249,216,137, 90,147, 49, 18,105,172,202, 66,146,174, 71, 98, 81, 45,102,106, 49, 24, 42,193, 53,155,189,229, -160, 5,197, 73,215,123, 47,141,211, 98,142,167,173,155, 89,193, 42,229, 25,106, 76,148,165, 47, 71,180, 91,112, 5,120,181, 23, - 14, 83, 34,182, 58,174, 44, 18,162,180, 43,149,249, 92,173,165, 40,113,184,160,218,118,243, 51,158,189,219,161, 64, 93,228,170, - 58,109,137, 55, 99,177,210,229,194,253,186,103, 61, 86, 93, 46, 69, 85,196,248,174,194, 85, 90, 68,169, 42, 65, 86, 20,243,235, - 89,234,113,167, 76,190, 73, 36,154, 36, 66, 2,174,204,196,216,168, 96, 86,235, 97,187,142,171,113,179, 0, 79, 96, 43, 78, 39, -200,167,207,168, 64,172,169, 48,195, 60,176,243, 35, 59,153,169,213,129,145, 9,184, 40,178,128, 35,189,201,120,217,238, 72, 33, -152, 74, 45,191,110,218, 20, 10, 5,159,104, 82,163, 80,109, 43, 50,145, 78,182,173,138, 20, 36, 37,152,116,202, 37, 38, 58, 33, - 65,136,219,104, 24, 24, 97,176,165, 43,186,214,165, 45, 89, 82,137,214, 66,192, 44, 56, 50, 64, 66,255, 0, 84,246, 74, 22,174, -188,167,230, 79,109,121, 92,114, 87,226,132,243, 5, 16,162,145,156, 45, 62, 69, 56,238,161,231,246,106,239, 2, 58, 29,109,109, -140, 45, 4,158,231,170, 65, 29, 58, 31, 49,251,181, 41, 93,150,200, 52, 42,216, 5,236,161, 64, 0, 1,233,167,107, 95,107, 15, -118, 6,132,133, 20,133,242, 45,129, 0, 88, 1,181,128, 29, 5,187, 14,150,219,160,198, 15, 92,140,185,115,138, 64, 42, 71,192, - 48, 51,148,245, 42, 81, 7,237,199,237,198,179, 75, 74,130,162,174,110, 64,124, 66, 48,124,213,215,155,149, 64,142,249, 35,240, -215,148, 83, 60, 73,124,161, 36,156,132,103,190,121, 71, 64,125,124,254,243,173,128,177,237,177,134,150,166,134, 7, 42,186,224, -143, 44, 12,121, 14,154, 67,202,160,201,111, 49,218,255, 0, 63,127,239,196,120,213, 0, 90,237,117,185, 55,251,239,238,249,252, - 47,182,197,185,224,181,226,148, 36, 57,202,148, 5,148,228,167,152, 5, 58, 79, 79, 76, 14,157,180,226, 8,126,236,203,104,229, - 60,234, 39, 41, 0,168,144,160, 20,178, 64, 31,173,203,129,242,206,178,138, 93, 27,145,148, 5, 35,225, 35, 39, 61,212, 7,196, - 78, 60,251, 1,143, 61,123,145, 19,153, 69, 69, 4, 41,106, 8, 66, 83,212,227, 32, 37, 32,103,190, 59,159, 85,124,134,144,177, -221,137,249,239,127,225,134,106,140,228, 77, 49,141, 79,213,198,127,211,243, 54,237,139, 84,118, 89,109, 14, 61, 41,212, 70,139, - 13,135, 37,204,148,176, 18,212,104,172, 36,184,227,206, 40,246,108, 37, 56,249,146, 7,158,181,250,179, 86,126,239,172,200,171, -165,165, 49, 78,105, 40,133, 70,101,239,129, 48, 41,109,171,225, 88, 0,126,146, 83,234,203,139, 61, 57, 66,130,124,177,167, 30, -243,170, 10,151, 53,173, 13,126, 37, 62, 51,173,185, 94,117, 25,228,155, 49,165, 7, 24,164,151, 19,254, 82, 35, 74, 8, 47, 36, -116, 83,129, 32,146, 1, 26,196,209, 13,152,192,120,189, 72, 36,248,109,160, 56, 2,128, 5, 63,163, 79, 92,103, 3, 39,160,236, - 58,233, 61, 70,161,194,166,241, 70,119, 63,180,195,227,217,127, 22,248, 41,196,175,135,160, 90, 56,228,204, 39, 66,107,106,150, -209, 41, 6,241,194,108, 75, 91, 99,174, 91, 3,191,217,140, 1,191, 54, 69,192, 76, 50, 27,111, 13, 54, 73, 64, 9, 75,139, 82, -155, 0, 43,169, 44,128, 9, 62, 93, 64,193, 61,206,129,152, 95, 41, 82,138,208, 22, 65, 72, 12,164, 32,165, 0, 36,148,163,152, -144,217,234,147,145,223, 36,228, 96, 13, 93,159, 83,174,103,149, 32, 40,182,126, 55, 51,206,132,145,201,240,161, 7, 35, 62, 99, - 32,129,158,249,214, 55, 45,212, 37, 96, 41, 41,120,167,152, 0,148, 0,129,149,167, 39,148,225, 32,224,247, 61, 71,166,116,224, -158, 91,109,185, 27,219,231,253,127,117,240,237, 35,179,146, 77,153,143,253,199,183,115,176,223,225,139, 75,238,163,147,144, 21, - 40, 96,142,116,142,164,165, 71,170,222, 82,187, 31,136, 4,140,243, 1,229,215, 88,252,183, 65, 72, 11, 82, 74,126, 16, 8, 28, -184, 82, 72, 9, 66, 86,188, 18, 18,124,176, 62,100,224,157, 92, 39, 56,224, 82,146, 23,204,162,174, 95, 9, 9, 79, 55, 83,240, - 40,169, 64,252, 33, 36,252, 92,160,245,192,214, 45, 49,208,142,112, 21,241,171,170, 65, 78, 85,128, 50, 82, 74,129,229, 60,160, -143,187,169,234, 53,176,135,175,112, 15,243, 31,187,175,201,195, 45, 82, 13,247,235,252, 62,255, 0,187,182,253,175,139, 84,247, - 82,160,163,130, 9, 39, 36,167,159,175,196, 10,138, 66,176, 19,215,191,145, 57, 25,215, 6, 61,188, 92, 35, 69,226, 19,132,201, - 91,199,110, 82,195,187,161,195, 10,102, 93,241, 28,140,192,126,125,115,105,170, 47, 48,214,226,219,142,184,128, 86,242, 33, 44, -195,173,196, 64,207, 34,224, 76,242,116,235,186,178,222, 24, 37, 41, 81,237,144, 82,160, 20, 48, 84, 0, 3,162,199, 82, 58,245, - 31,127, 70,250,191, 79,164,215, 96, 84, 40, 85,216,173, 79,160,215, 96, 84, 40, 53,232, 14,182,151, 35,203,161,214, 98, 61, 73, -173, 66,121,165,116,117,135,105,115,166, 54, 71,126, 85,224, 28,246,216, 14,203,105, 35, 63, 89, 25, 12,191, 17, 98, 47,238, 61, - 15,184,145,176, 59,197,243, 92,186, 44,214,138,175, 46,156,218, 42,180, 41,114, 7,145,137, 5, 36,183,172,110, 22, 65,210,229, -109,238,199,229,128, 82, 2,137,239,143, 49,212, 31,152,199,126,154,248,172,145,219,166, 51,147,251,191, 13, 61,188, 74,237, 67, -251, 7,196, 22,245,108,212,198, 21, 21, 91,103,185, 87,117,161, 21,133,168,173, 72,164, 83, 42,242, 5, 1, 65, 71,170,194,232, - 46, 83, 92, 10,235,144,230,114,115,146,198,169,106, 88, 4, 43,155,166, 71, 76,119,245, 30,186,153,211,202,179,197, 12,202,124, -178,168, 97,235, 98, 1,254,120,230,119,142, 72,157,226,149,116, 75, 17, 42,227,209,212,233,101,251,152, 17,138, 46, 16, 70, 51, -235,156, 28, 99,251,116, 42,177,142,195,148,103, 30,125,187,147,243,213,117,168, 30,224, 12,142,248,206, 79,217,161, 87,208, 31, - 60,156,126,255, 0,221,173,192, 44, 0,244,192, 29,190, 56, 29, 89,193,233,255, 0, 14,253, 52, 34,142,113,223,207,184, 3,240, -209,107,237,223, 29, 71,231,243,233,161,156, 32, 2, 51,147,231,142,191, 62,154, 85, 7,124, 42, 44,119,192,171, 35,203, 63,126, -113,231,228,117, 69,125,179,147,255, 0, 31, 93, 87, 95, 55,158, 49,229,249,245,208,235,199,207, 62, 94,159,126,149, 2,228, 99, - 29, 0, 3,231,255, 0, 24, 21,103,175,216, 49,159, 93, 45, 37,254,183,221,211, 75, 74,139,128, 0, 31,142, 13,143,168,198, 79, -124,227,238,199, 79,219,162,145,140,118,235,230,113,251,254,205, 8,223, 83,147,145,208,244,251,241,215, 69, 35,177,235,231,219, -247,232,141,107, 47,108, 12, 18,142,199,167,223,235,249,253,250,169,158,221,250,124,254,126, 94,154,164,140,245,233,211,215,247, -124,245,237, 36, 40,144, 15, 99,131,223,161,210, 78, 54,248, 96, 99,223,140,142,249, 24, 0,103, 25,202, 78,139,108,149,129,212, - 0,124,241,215,168,233,211,239,253,154, 16,180, 1, 56, 0, 36,228,159, 79, 44,147,243,254,189, 86,109, 65, 36, 14,184,198, 2, -143,203,212,253,218, 64,155,117,192,193,237, 39,151, 3,175, 66,123,119, 63, 63,144,209, 8, 95, 51,137, 73, 78, 57,115,241, 30, -221, 60,178,126,122, 8, 60,140,148,130, 85,216,224,117, 87,159,124,253,167,240,209, 63, 11,137,248,186, 28,252, 35,168,207,219, -248,233, 22,234,113,131,235,243,233,139,187, 64, 43,162,136, 63, 49,147,235,233,247,106,247, 70,169,212,104, 85, 90,117,110,145, - 41,200, 53, 90, 68,248,117, 58, 92,198,148, 80,236, 90,141, 62, 75, 82,225, 74,109, 67,170, 84,137, 44,180,175,184,141, 88,152, - 10,229, 79, 96, 48, 57,177,219, 35,167, 79,219,162,211,156, 40,118, 30, 71,184,249,245,242,233,162,144, 24, 21, 97,112,118, 32, -239,132, 15,196,169, 30,155, 16, 71,112, 71, 67,137,193,240,233,185, 20, 62, 44,120,124,219, 61,240,167, 76, 71,191, 84,105,140, - 81, 55, 14,155, 5, 64, 73,165,223,148, 54,155,135, 89,139, 53, 8, 57,103,197,121,191, 25, 25,253,100, 72, 65, 4,131,173,161, -180,210,245, 40,183, 10, 44, 52,248, 14,171,153,247, 36, 40,150,208,211,100, 16,181,171,201, 93, 7, 79, 83,168,161,123, 40,248, -226,137,194,214,237,191, 97,110, 76,199, 6,196,111, 20,202,117, 42,239,113,106, 82,155,179,174, 82, 83, 18,135,123,178,146,127, - 69, 25, 42,113, 12, 78,199,254, 43,149,211,158, 67,169,140, 46,220,104,182,207,128,184,210,104, 79,178,197, 70,159, 80,128,226, - 36, 70,171, 65,146,132,189, 18, 92,121, 77,168,165,248,174, 52,182,212, 10, 73, 7,155, 84, 39, 16,240,233,203,115, 25, 99, 88, -201,130, 67,170, 35,216,169, 61, 47,220,173,244,155,247,243, 17,102, 24,239,143, 11, 60, 80,110, 39,225,218, 88,107,103, 15,152, -229,170,144,213, 33, 98, 60,234, 0, 89,236, 55, 34,117, 93, 98,219,115, 3,198, 8,209,135, 82,196,175,212,218,113,133,198, 84, -117, 38, 71, 32, 67, 78,101, 4,182,142,157, 7,255, 0, 22,125,124,255, 0, 13,121,226,147, 97,169,220,100,236, 45,251,195,253, -214, 96, 83, 89,184, 96, 55, 58,221,184,156, 71,138, 45,139,210,151,207, 34,220,169,161, 93,196,113, 36,248, 82,113,221,137, 11, -244,198,172,116, 62,102,100,181, 29,160, 61,231,149, 60,142, 99,224,101,164,246, 3, 29,128, 25,233,173,128,164, 74, 18, 99,198, - 73,116,183, 25,181,114, 60,178, 57, 76,151, 16, 50,162,162, 14,124, 60,129,246,235, 82,158, 2,165,118,210,203, 98, 45,216,245, -190,219, 94,253, 7,223,139, 66,108,214,122, 57,232,179, 76,177, 18,150,182,141,214,104,102,243, 49, 73, 35, 33,209,244,220,171, -217,133,180,176,210,230,225,188,151,199,230,211,196, 86,208,238, 55, 15,155,153,121,237, 22,231, 81,100,219,215,221,143, 82,149, - 79,168, 71,125,106,110, 52,230, 88, 90,132,122,157, 46,106,128, 76,202,124,136,220,143, 71,121, 63, 11,141,186,146, 8, 36,141, -107, 90,238,137,210, 99,242, 84,194, 39,208,228,243, 69,156,165,101, 50, 16,209, 35,156,184, 17,212, 56,158,138, 66,198, 72,229, - 26,253, 19,125,160,126,206, 29,169,246,133, 88,112,226,214,219,129,100,111, 5,191, 18, 68, 91, 19,116,219,132, 28,148,220, 38, -208,181, 53, 65,186, 99,180, 66,170,182,233,119, 30, 25, 39,198,138, 86,165, 50,121, 74,144, 97, 29,196,223,179,219,138,238, 14, -171, 85, 42, 30,238,109, 69,202,253,158,137,146, 26,165, 95,150,229, 61,202,229,149, 91,134,219,133, 41,155, 18,173, 13,165, 6, - 91, 82, 48,172, 57,202,180,231, 5, 26,179,178, 42,250, 57,225, 72,106,149, 86,169, 74,233, 44,116,220, 29,175, 27,118,123,216, -133,216,130, 59,142,146,250,158, 42,173,226,215, 74,204,190,189,178,218,167,133,214,182,141,111, 32, 18,142,242, 68,219, 84,208, -202,162, 69,119,250,199, 68, 58, 38, 17,181,158, 86, 98,205, 98,245,184,155,179,246,190,133,117, 81, 43,212, 69,205, 93,107,111, -171,201,247,180,220, 22,125, 75,170,221,143, 77,172, 67, 70, 41, 51,212, 66,147,225, 62,180,195,146,121,152,117, 41, 82,145,153, - 39,123, 14, 56,116,186,118,163,136, 57,119,139, 91,231,181, 82,105,117, 56,211, 85,187, 59, 81, 50,174,154, 46,225, 86, 41,142, -178,236, 71, 96, 81, 44, 39,154, 15, 79,169,138,138,154,146,169,140,169,198,154,240,202,146,121, 8,214,156,123, 19,246,162,147, -184,219,245,181,214,173, 74,157,114, 91,212, 68, 94,177, 46, 9, 87,209,164, 82, 35,166,152,213, 40, 26,147,148,152, 53,249, 12, -182,135,161, 77, 92,118,163,188,212,150,221, 87, 43,171, 72, 10, 95, 41,212,194,248,217,224, 59, 96,239,203,211,110,184,157,163, -220,219,119,195,142,224,236,189, 90, 53,199,112,238,141,180,213, 54,131, 86,184,173, 90, 80,241,158,162,204,105,137, 44, 68,247, -146,216,120, 38, 83,136, 82,185, 95, 91,106, 14, 36,132,105, 42,177, 85, 95, 69,196, 84,180,235, 13, 45, 13, 59, 8,229, 63, 84, -100,153,228, 44,254,209,101,229, 8,180, 29, 45, 34, 57,120,102, 98,238, 84, 54,248,177,115, 46, 32,224,110, 24,171,225,142, 26, -226,122,217,198,119,199, 25, 21, 76,116,245,242, 71, 93, 93, 67,144, 67, 83, 72,217,122,208,154, 38,146,170, 74,254,122,137, 97, -203,171, 80,123,126, 86, 13, 50,114,230,134, 52, 43,104,160,110, 52,106,229, 82,239,218, 10,165,197, 42,143, 92,155,112, 63, 79, -182,109,170,172, 86, 42, 53, 42,212, 72,110,166, 83, 17, 83, 38, 18,137,166,133, 50,164,172, 60, 85,240,145,228,123, 92,248,153, -225, 90,117,139, 14,223,186,217,144,212,184,247, 13, 37,217,245,234, 50, 30, 68,154,188, 47,118, 5,245,153, 13, 36, 5, 84,225, -248, 64, 45,114, 16,133, 4,120, 5,183,210,145,135, 23,170, 17,120,166,246,122,210,239, 8,251,245, 73,221, 42,108,202,125, 54, - 85,110, 12,136,116, 25,110, 42,164,252,181,186,183, 36, 84,100, 71,157,200,243,176,212,251, 97, 40,154,128, 27, 80, 87, 42, 0, - 73,215, 28,248,248,246,138,238,223, 31, 27,209,100, 13,189,190,175, 61,174,217, 13,133,184,168,247,110,220, 46,215,168, 72,182, - 43, 50,175, 26, 23,136,134,174, 58,133, 66, 41, 14,213, 96, 61,144,143,113,148, 85, 17,198,121,155,117,149,165, 68, 30, 78,240, -151, 41,171,203,168,248,214,139,140,242,218,147, 61, 39, 46,146,154,176, 74, 94, 58,115, 70,238,237,110,102,210,194,237, 49, 74, -101,167,176,152,106,242, 71,253,233, 17,120, 7,226,111,137,188, 85,195,180,126, 29,112,252,188, 55,150, 71, 72,245, 89,147,103, -144, 54, 91, 11,230, 13, 18, 65,236,212,236,144, 84, 78,202,220,184,170, 37,144,199, 57,137, 21,156, 76,199,149, 3,245, 94,101, -153, 14, 91, 11,118,106, 60, 38, 42, 50, 98,248, 52,232,255, 0,224, 76,210,169,176,210, 23, 58, 67, 75, 75,170,196,215, 65, 90, - 66,200, 82,134, 70, 57,121,122,190,116, 74, 93, 58,224,113, 52,104,137,117, 22,180, 38, 41,236, 84,166,201,117,250,127,189,196, -138,202,165, 63, 77,135, 61,213, 5, 70,128,166,194, 12,199, 18,144,165,140,160, 16,130,179,166,155,101, 55,170,133,187,214,166, -214,220, 55, 67, 20, 74, 22,231,223,150, 76, 91,182, 85,181, 1,133, 66,160,215,231,197,159, 82,164,204,170, 90, 80,221, 39,244, - 42,118,154,185, 47,211,155, 89,114, 42,164,175,221,144,228, 84, 39,195,216, 74,124, 72,107, 67,204, 60,133,205, 66,221, 76,153, -140,248,200,105, 21,106,162,212,144,195,107,125, 39,244,116,228, 20,254,149, 32,124, 73, 74, 16, 82,160,149, 5, 73,200, 40,225, - 8, 33,133,138,157,182, 82, 3, 95, 73,181,137,216,116,212, 13,238,110, 49, 90,230,167, 55,225,188,207, 50,225,188,237,100,164, -205,114, 10,186,138,102, 10, 67, 66,181, 20,181, 15, 75, 52,145, 56, 33,102, 11, 36, 14,177,206, 9, 14, 84, 59, 29,188,174, 84, - 59,173,112, 93,143, 85,131, 21,160,229,114, 44, 58, 45,153, 66, 12, 7, 27,139, 74, 91,136,101,170,139,205, 35,148, 83,216, 89, -109, 47,175,160, 45,198, 97,150, 17,149, 40,129,153,191, 33,138, 45, 46, 76, 10,157, 73, 53,234,220,249, 45, 83,233,211, 28,109, - 44, 82,226, 34,114,131, 18, 43, 40,129, 31,153, 48, 97, 70, 47, 36,186,181,120,174, 58,242, 82,209, 95, 50,212, 18,208, 73, 83, - 80, 80,204,199,127,194, 85, 21,242, 79,187, 56,168,170,169,212,221,108, 50, 91,138,234,193,240,227,178,130, 24,101, 57,229,108, - 41, 75, 86, 74, 20, 9,139,172, 74,165, 58,245,126,172,220, 89,142, 26,131,177,226,196,130, 86,202, 30,125,154,122,189,198,155, - 17,167, 0, 8,166,198,149,239, 78, 60,238, 79,139,135, 31, 80, 75,139, 70,183,210, 72,208, 37,152, 14,131,107,157,246,216,129, -183, 77,134,221,141,183, 54,195, 12,185,100, 85,145,194,212,139,125, 68,121, 69,150, 73, 36, 70, 28,168,213,141,221, 80, 38,242, -239,121, 25,155,153,118, 55,137,194,174, 84, 41,148, 85,183, 64,162,120, 21, 9, 84,184, 49,145, 29, 46, 45, 79, 64,165, 64,110, - 50,132,154,165, 69,214,148, 82,194,220, 74,138,147, 28,101,231,150,232,192, 66, 9, 86,185, 17,237, 36,216, 24,156, 79,108, 45, - 91,106,157,145, 17,119,146,170, 52,251,163,110,235,115,214,150, 35,192,191,179, 38, 60, 55, 42, 47,160, 19, 2,219,168,211, 29, -118,157, 56,164, 20, 50,202,227,203, 3,158, 10, 73,232,220,233,143,193,167,180,203, 82, 67,210, 37,192,145, 88,170, 20, 52,150, -230, 54,253, 90,120,113, 41,119,149, 69, 38,115,235, 1, 12,182, 7,193, 25, 9, 82,185,130, 82,117,175,119,139, 85,218,217,157, -245,121, 66, 42,143,213, 32,176,154,170,185, 28,143, 69, 75, 2,115,178,106, 74,141,250,175, 22, 25,108,248, 12, 35, 8, 91,142, - 54,181,252, 5,122, 88,213,203, 28,145, 75, 78,229, 37,167, 97, 34,183,236,148, 33,148,223, 96, 69,197,183,176, 63,102,214,216, - 58,240,190, 68,114,250,243,152, 23, 19,199, 8,114,242, 72, 72,231, 22,188,108,205,176,101,137,213,157,138,160, 37,149,131,121, -245, 2, 96,171,183, 20,137,123, 31,191,149, 91, 47,123,232, 85, 27, 62, 93, 6,181, 34,220,190,237,155,214,132,186,220, 88,179, -217,150,220, 71,128,149, 75,125,138,149,169, 90, 75,203, 96,211,110, 42, 91,143,176,165,184,194,229,195,126, 59,201,121, 83,127, -216,175,102,198,192,241,189,192, 78,211, 93,151,173, 66,131, 11,121,110, 27,122,109, 78,202,226,103,134,152,244,170, 29,255, 0, -106, 75, 77, 80,127, 7,147,118,200,183,170, 81,169, 27,137,124, 65,102, 20, 38,171, 53, 4, 24,110,205,241, 18,226,164,123,227, - 13,202,211, 37,186,124, 33,108, 79, 16, 66,211,103,113,182,182,139,118, 84,173, 7,156,166,216,183, 99,192, 67,187, 32,202, 95, - 52,202,236,231,238, 88,201, 46,213,173,214,193, 83,203,133, 49, 50, 99,173,245,243, 52,203, 11,115,159, 93, 2,225, 42,126,233, -240,185,105, 84,108, 74, 45, 95,108, 43, 59, 35, 69, 97,250,141, 10,138,230,217, 90,251, 48,139, 9,233, 47,173, 83,167, 92, 23, -133,177, 85, 69, 46,182,212,244, 48,183, 86,228,216,112,223, 43,138, 95,241, 29,230,228, 19,170, 78, 41,201,115, 12,218,154,183, - 54,203,228, 66,244,207, 79, 57, 83,174, 48,118,211, 36,113,139, 51,236,182,144,200,197,209, 89, 4, 74, 66, 18,100,220, 71,196, - 25,253, 47,135,176,101, 60, 41,197, 99, 32,207,114, 92,228,102, 52,138,194,116,168,154, 25, 34,146, 41,169,214,165, 68,180,176, -199, 36,210, 6,122, 3, 28, 20,213, 45, 28,143, 83, 37, 84,238, 34,143, 74,120, 89,225,111,121,247,111,121,238, 89,155,225,184, -220, 82,237,142,251,112,146,253, 17,207,229,239, 14,200,188, 40,150,199, 16, 91, 53,100,203,106,223,161,219, 59,177,105,238, 28, - 8,141,191,184, 84,122,123,188,237, 86, 66, 93,102,187, 65,135, 61,155,146,157, 54, 68,117, 85,170, 29, 5,246,132,237, 76,171, - 94,215,181, 54,235,103,182,227, 99,237,219, 50,147,100,221,151,117,186,253, 38,155, 38,143,114, 90, 87, 4,106,212, 53,220,242, -118,242,194,180,160,179, 75,166, 81, 39, 84,235,112, 68,217,140, 61,226, 50,212,247, 22, 89,118, 35, 77,235, 83,184,202,246,199, -112,111, 70,219,122,181, 6,171,108, 65,226,231,125,105,213,122,204, 75, 11,108,236, 27,130,252,141,176,118,155, 98, 2, 33,193, -175,238,213,251, 13, 81, 98,223, 52,197,206, 75,206,187, 71,165, 38,170,196,168,241,155,138, 85, 9,111, 46, 98, 52, 47,111,189, -188,183, 37,209,109, 10,103, 17, 22, 2,110,109,194,146,227,138,131,118,219,246,163,116, 11, 98,132,235,103, 52,122, 75,118,253, -157, 38, 77, 80, 90, 17,210,101,178,248,116,206,118, 75, 83,212, 28,101,175, 1,149,162, 45,226,190, 70,185,231, 0,203,149,228, -121,123,231,153,198,105, 91, 28,230, 88, 16, 36,112,211, 70,154,212, 24, 39,149,165, 18, 74,198, 72, 89, 35,105,100, 12, 41,231, -158,112, 57,145,137,231, 10,100, 94, 51,241, 87, 23,112,111, 30,211,112, 52,153, 38, 73,225,242, 10, 90,124,155, 50,146, 42,116, - 99, 45, 52,112,243,178,218,153, 12, 21, 85, 52,171, 42,205, 88,212,181,201, 75,149,209, 37, 91, 81,100,148, 51, 81, 75, 49, 50, - 6,217,173,183,155,188, 84,118,173,158, 32,172,235, 87,118, 54,166,179,183,149,203,134,222,225,242, 30,215, 80,233, 54,151,241, -165,100,213,106,245,122,156,138,221,227, 2,160,150, 46, 42,164,235,130,161, 57, 86,251,132, 51, 77,169, 64,173,174,167, 38, 59, - 85, 4, 56, 26, 3,109,118,123,135, 41,252, 96,110,135, 23,245,109,254,221,189,165,168,219,173, 91,123, 97, 87,216,251,190,175, -183,219, 85, 99,219,212,155,126,209,183,217,137,183, 10,131, 66,169, 76,169,205,176,225, 70,165,194, 83,180,116,125, 88,219,175, -148,178,243,175,199, 75,173, 59, 29, 61,249,246,206,238, 94,228,237, 61,211,181,155,117, 97, 50,205, 62,247,110,151, 14,183,114, - 57, 71,149,102, 55,111,211, 40,145,161,125, 74,213, 25, 54,141,222,227,180,202,188,130,169, 82, 23, 30,151, 57,136, 16,218, 83, -108, 72, 50, 38, 25, 64,114, 67,110, 47,253,229,176,174, 10,205,199,103,238,253,237, 99, 85,238,119,154,122,231,157, 75,174,215, - 74,238, 7, 25, 46,152,207,214,220,157, 58, 73,170, 74,109, 18, 30, 75,110,190, 29,121,180, 44,165, 42, 9,232, 21,240,162,151, - 56,225, 46, 16,143, 36,205,178, 88,214,186,130,176,206,181, 50,212,206, 37,168,141, 97,228, 37, 63, 46, 9,201, 90, 37, 96,103, -142, 25,155, 74,243, 26,157, 97,150, 33,237, 83,203,114,127,162,199,141,220, 86,188, 75, 85,151,241,125, 31, 2,167, 23,193, 83, -150, 54, 91, 79, 78,166,152,101, 85,109, 75, 81, 85, 61, 59, 60, 98,150,158,166,174,122, 58, 72, 42,106,150,136,102, 51,123, 10, - 85,205,152, 73, 43, 44, 16,206,123,218, 61,196,127, 12, 59,235,177, 53, 46, 29,169, 86,189, 55,136,234,109,215, 88,166, 26,197, - 38, 53,233,116,109,198,223, 91,198,222, 80,171,209,234,119, 5,221, 67,164, 25,151, 10, 5, 85,136, 33,154, 93, 49, 37, 18, 15, -233,100,202, 97,150,139,131,132,251, 87,179,251, 79,179,194,224,147,101,216,244,202, 5, 90,229,159, 17,119,149,211, 72,110, 69, - 46,248,110,163, 29,217, 43,129, 66,171, 79,122,116,167, 35, 90, 76, 72,147, 37,216,236, 37,215, 98,203,117,126,245, 45, 50,100, -114,186,222,133,219, 60, 77,113, 16,220,102, 29,123,136, 11,214,170, 86,194,217,230,148,229, 46, 98, 20,211,128,115, 50,125,254, -146,190,100,228,116,200, 4, 30,163, 7,187,151, 72,226,234,249,165, 72,105,119,173, 54,145,119,199, 91,105,138, 42,209,169,240, -173,203,214, 44,100,188,211,178, 16,205,110,152,208,135,112, 48,176,215,197, 10,171, 13,109,124, 69,109,200, 97, 95, 24,214,226, -126, 46,204,248,131, 53,169,253, 34,207, 26, 53,144, 71, 4, 79, 21, 56, 17,133, 22,229,150,231, 57, 26, 1, 47, 34,187, 2, 44, - 52,198,170,139, 50,202,126,130,126, 47,120,111,192,109,194,252, 57,154,229,220, 65,148, 9,205,116,180,137,154,214, 10,186,170, -162, 10,137,109, 91, 69, 71,150,198,235, 25, 10, 22, 25,169,163,100, 69,105,125,166,116, 70,126,237,240,173,188,242,233, 18,100, -237, 93,235, 42, 60,202,109,114, 92,138,190,220,221,209,196,104,148,181, 76, 74, 16,170,157,149, 92,105,110,132,210, 43,242, 74, - 19, 42,158,164,115,198,158,234, 36, 48,143, 6, 66,144,210,247,177, 85,202,124, 85, 41, 50, 23,238,234, 96,171,220, 84,131,201, - 81,167,186,242, 66,220,103,194,112,116,136,167, 49,204,218,135, 38,114,149, 36,142, 82,142, 24,109,205,249,100,111,109,188,154, -141,169, 87,121,132, 69,149, 25,154,133, 12, 70,102, 35,244,170,162,202,228,211,227,215,160,171,156, 70, 90,220,109,197,198,112, - 60, 25,150,134, 86, 98, 60,242,193, 74, 54, 70, 21,203,185,137, 49, 41,209, 55, 38,242,181,228,211, 26, 17,157,129, 46,114, 42, -180,121, 76,135,128,240,207,214,112,156,148,134, 86, 18, 75, 79, 49, 33, 50,163,165,120,248,146, 57, 73,105,106,159,147, 26, 7, - 37, 20,121, 74,249,129, 29,199, 81,176, 38,192,147,176,176, 11,229, 39, 28,113,196, 92, 57, 81,148,103, 21,249,110,121, 69, 46, - 69,155, 81,200,201, 87, 73, 60,114, 67, 44, 19, 46,155,235,139, 65,117, 46,165, 73, 11, 30,131,175, 80,250,185, 64,199, 74,170, -247,117,187,111, 83,215, 94,171,203,137, 65,135, 79, 67,143,174,161,207, 41, 13, 62,140, 15, 16, 83, 24,105,167, 37, 84, 28, 81, - 82,130,227, 69,105,245, 45, 71, 41, 66,191, 91, 76,133, 87,124,171,187,130, 29,167,217, 76,213,237,251,106, 66,189,205,119,162, - 28, 98, 37,199, 86,142, 16,162,185, 54,235, 12, 41,106,181,161,242, 45, 99,199,119,154,162, 48, 80, 81, 16,158,154,182,205, 62, -117, 86,178,221, 66,238,151, 81,166,214,156, 82,227, 66,168, 73,171, 77,171,198,152, 82,188,180,236, 27,145,222, 95,115, 36,148, -242, 70, 81,136,160, 29, 56, 67,138, 29, 54, 42,202,179,153,139, 37,154,143, 44,138, 93, 90,115, 13,179, 42, 84, 55, 84,228, 58, -130,154, 32,177, 34,167, 76,116,248, 83,164,158, 85, 21, 58, 66, 29,194,202, 84,242,134, 53,191, 74, 37,168,148, 34, 92,139,239, -126,187,219,125,133,150,228,146, 47, 98, 55,179, 1,136, 86,103, 62, 91, 69, 8, 36,153,106, 8, 60,182,111, 58, 40,216,157, 54, - 98, 36, 0,234,243,171, 58, 3,101,229,106,179, 43,139,104, 91, 70, 44,120,176,217, 45, 59, 21,146,164, 50,232, 71, 43,133,111, -117, 90,230,100,144,252,149, 40,149, 41,210, 74,150,181, 21, 44,149,171, 39, 97,160,209,196, 74, 98,138,211,204, 1,101, 39, 41, -232,160, 84, 80, 91, 86,122, 5,117,207,217,171, 93,167, 74,230,109,190,118,227,151, 50, 18, 67, 73, 80,101,207,212, 10, 45,182, -190,169, 65, 32, 16, 14, 72, 61, 50,113,157, 59,206,211,128,167,184,215,134, 84,218,139, 67, 9,202,136, 9, 81,207,134, 79,235, - 28, 17,243,252,113,169,165, 53, 56,166, 68,176, 35, 72, 23,245, 29, 5,183,191, 78,155,254, 24,174,234,171, 13, 76,138,146,157, -228,111, 49,216, 94,228,111,219,173,201, 22,181,250,250,130,207, 61, 76, 83, 78,129,201,136,206, 30,102,214, 63,241, 74, 61,219, - 81,242, 79, 81,141, 92, 33, 83, 11, 11, 43, 74, 70, 79,235,128, 48,146,159, 95,183, 89,187, 48, 16,248,113,190, 78,100,130, 82, -160,176, 65, 32, 28, 5, 99,215,168,252, 53, 65,216,162, 34,146,199,235, 39, 31, 2,200,193,233,215,144,231, 79, 81,206,164,117, -233,252,125,253,240,213, 89,206, 82,241,176,243, 14,190,132,117, 7,227,110,189,143, 94,183,197,134,155, 9, 14, 77, 73, 35,160, -115, 31,105,236,123,140,118,214,207,217,208, 91, 67, 45, 2, 19,212, 36, 12, 14,163,212,156,142,135,247,233,135,163, 69, 10,155, -158, 95,135,196,200, 0,103, 57,200,252,115,173,138,183, 84,150, 18,214, 79, 47, 42, 82, 64,200,200,192, 25, 63, 34, 51,173,102, -107,129,181,255, 0,158, 33, 53,234,201, 4,224,108,194,246,251,207,207,175,124, 57,232,109,180, 51,202, 72,248,130,113,142,248, - 78, 0, 31, 35,235,246,233,191,188, 42,206, 66,108,193,167,132,253,103, 41,181, 0, 71,255, 0, 2,140,174,134, 73, 35,245, 92, - 39, 33, 30,121,235,229,171,141, 90,228,106, 11, 32, 52, 80,236,183, 73, 12, 70, 4,229, 74, 7, 30, 43,152, 63, 3, 41, 29, 84, -123, 28,224,100,235, 5, 13,173,197, 57, 46, 67,138,125,249, 46,120,146, 95, 88,253,117,156, 97, 40, 39,245, 91, 0,225, 35,176, - 29,180,142,179, 80,220,168,205,149,126,211, 15,223,164, 16,122,250,158,195,208,145,134,108,155, 45,116,149,107,106,210,241, 41, -186,161,255, 0,120,194,221, 71,236, 47,127,218, 35, 79, 77, 86,176, 66,163, 8,205,225,197, 43, 56, 37,105, 65, 56, 36,252, 75, - 82,212,174,171,112,149, 28,156,245,207, 93, 15, 45,216,241, 57,146, 57, 27, 56,200, 72,192, 89, 78, 15, 85,168,159,128, 99, 39, -226, 63, 33,223, 89, 20,167,114,130, 10,130, 80, 72,248, 26, 31, 30, 65, 0, 16,165, 3,208,231,174, 61, 61, 53,129,212,188, 52, - 7, 20, 82,214, 78, 74,148,226,186,164,228, 18, 84,181,103, 36,244,238,122, 30,157, 53,185, 26, 44,106,170,160, 1,238,236, 54, -253,214,249,247,206,169,100,122,153, 25,234, 36,251, 71,160,233,212,122,216,124,236,119,197,146,116,196, 43,156, 23, 20,234,176, - 66, 83, 24, 44, 50, 18, 79, 66,235,132,167,159, 61, 50, 50, 18, 9,206, 15, 83,172, 58,116,165, 37, 64, 4,182,218, 73,199, 59, -139, 10, 82, 73, 66,186, 33, 13, 30, 94, 96,174,108,228,231,168,198,123,139,140,202,131, 79, 30, 70,148,227,238, 33, 74, 65,102, - 43, 97,196, 54,147,211,226, 81, 41, 74,129, 0,103,226, 56,236, 70, 51,172, 78,114,228,243, 5, 43,193,100,115,243, 36,120,134, - 75,201,194,128, 42, 71, 54, 17,204, 60,206, 74,114,122, 18,116,112,214,210, 59,223,241,219,240,190,226,251,116,251,158,201,176, - 10, 23, 73, 61,143, 95,141,182, 61, 58, 16,167,226,118,197, 23,220, 24, 42, 82,202,147,250, 50,234,130,146,217, 45, 36,168,133, - 45, 94, 71,175,197,215,174, 49,223,174,177,233, 50,208, 66,131,105, 61,214, 66, 64, 78,114, 64, 32,244, 61, 27, 42, 36,100, 30, - 80, 0, 29,250,232,185,104, 66, 49, 33,199, 21,150,220, 43, 66,158, 90,158, 9, 94, 72,229, 74, 84,180,165, 36,173, 63,234,146, -156,146, 6,173,114, 20, 80,180,165, 72, 80,112, 20,145,206,164, 41, 92,139, 1, 96,182,144,172, 56,130, 20, 14, 50, 0, 39, 56, -233,141, 46,141, 98, 54,244,254, 95, 29,247,198,133, 76, 90,206,166, 58,175,233,178,237, 97,238,254, 93,189,215,178,204, 42, 33, - 93, 64, 42,248,136, 81, 57,235,147,209, 95,205, 61, 51,156,117,229,239,140,107, 16,158, 7, 42,147,206, 74,138, 85,241,171,148, - 17,140, 96,145,216, 96, 12,125,253, 6,178,233, 89, 1, 42, 89, 0,224,140, 40, 16,146,179,204,164, 55,201,216, 60,158,153, 29, -114, 59,100,118,197,106, 10,207, 40, 35,170, 73,230, 36,114,149,103,155,161, 9, 87, 86,241,147,231,213, 88,193, 58, 92, 49,218, -223,135,110,159,187,221,238,253,216,103,145, 0, 34,219,123,186,124,143,147,136, 13,251,114,237,134,237,143,105, 46,242, 73, 13, - 22,133,233,109,109,125,248,227,197, 1, 40,126, 69,118,199,166,197,148,182,249, 0,241, 0,122,146,174,101, 31,136,168,158, 98, - 78,117,200,194,180,168,126,137,101, 88,239,233,246,107,183,127, 72, 24,180,175,104, 99,158, 27,161,215, 19,195,254,205, 37,246, -129,255, 0, 34,180,195,184,124, 52,148, 17,150,202,152, 45,175,169,201, 11, 7, 0, 99, 92, 70, 83,105,199, 81,140,246,229,242, -249, 29, 75,178,155,181, 13, 41, 59,217,109,211,176, 36,116,235,219,242,199, 51,241, 50, 44,124, 69,158, 34,159, 47,181,212, 31, -255, 0,116,172,199,247, 18,113, 76,168, 40,116, 72, 29, 62, 47, 63,188,117,208,235, 35, 24,207, 92,244,254,221, 86, 40, 35, 62, -152,207, 95,232,251,116, 51,133, 67,168, 78, 71, 81,243,251,244,236, 6,194,221, 48,206,160, 29,173,211,161,253,216,162,179,229, -143,191,211,175,217,170, 11, 0,227,176,245,245,199,175,207,160, 58,244,188,254,177,201, 82,124,188,177,231,246, 29, 81, 39, 39, - 58, 93, 70,194,221, 63,158, 20, 24,164,230, 60,136,232, 72,244, 39,183,109, 12,178, 9, 61,242, 59,122, 30,223,214,116, 74,241, -130, 73, 3, 7,167,246,245,213,189,240,234,136,240,212,148, 97, 95, 22, 70, 74,128,236, 58,249,233, 68,235,140, 3,126,155,227, -193, 36,156,254,113,165,175, 10, 63,237, 99,238,206,116,180,125, 62,182,191,207,191, 25,199,180,146, 15, 65,159,151,174,171,165, - 93,142, 58,142,227, 61, 70,135, 31,120,254,145,251,117, 92, 96,245, 30,127, 46,250, 37,188,191, 15,195,231,231,124, 12, 86,241, - 19,156,117,235,231,142,159,126,136,111, 10,193, 74,187, 28, 99, 24,201, 62,191,136,252, 53, 65, 9, 0,131,220,244,251, 58,232, -164,225, 61,178, 7, 94,221,254,236,246,210, 76, 24,139,124,252,223, 25,219,239,197, 69,160,168,119,233,221, 93, 78, 6, 49,216, -125,186, 33,164,115, 36, 40,247, 29, 66, 71,160,233,235,170, 64,133, 15,207,113,215, 69, 36,242,224,244,244, 35,208,105, 34, 0, - 39,190, 49,143,104,101, 42,238, 57, 85,215,168,198, 72,251,188,244,123,104, 72, 72, 24,201, 79, 78,191,187,166,132, 65, 39,226, - 72, 25,244, 39,167,152,251,180, 90, 22,144, 1, 87,195,147,231,252,236,250,124,244,153, 23,216,158,159,233,140, 17,124, 28,214, - 58,114,244, 24, 61, 62, 93,191,167, 70, 32, 12,103, 39,230, 60,137,199, 94,154, 13,178, 23,215,168, 29,253, 59, 99,250,245, 93, - 11, 73, 95, 47,114, 62,127,102,127,103,150,147,194, 39,221,190, 13,108,129,145,140,228, 16,160, 70, 82,164,158,133, 36,121,130, - 9,200,212,133,253,149, 30,214, 40,187, 66,197,191,195, 39, 20,245,169, 15,236,235,143,162, 14,220,110,140,213,189, 54,163,181, -211,100,184, 17, 30,135,114, 58,162,165,203,177,148,226,240,211,164,149, 65,206, 21,150, 70, 83, 30,118,242, 14,122,121,126,206, -218, 33, 39, 37, 68,227,168,229, 32,128, 82, 65,232, 65, 7,184, 56,237,231,157, 55,102, 89,109, 54,103, 78,208, 84, 37,251,171, - 11,106, 86,236, 71,240, 32,236, 71, 81,211, 14,249, 22,123,153,112,230, 99, 22,103,149,205,202,158, 63, 43, 43, 92,199, 44,100, -130,209, 74,160,141, 72,214, 29,195, 41, 1,144,171, 0, 71,233,189, 78,163,199,149, 6, 5,118,137, 50,159, 88,161, 86, 97,179, - 50,145,112,209,228,179, 81,164,214, 32,202, 66, 93,106,101, 62,161, 25, 74,109,214,150,210,146, 82, 66,186,115,105,198,165,210, -220, 45, 54,156, 0,210, 18,130, 16,156,144,132,160,130,113,234,163,215, 63,102,191, 63,142, 13, 61,168,188, 90,112, 88, 35, 91, -187,121,119,179,119,109,106,165, 54,185,123, 83,184, 1,218,213,172,195, 74,112, 25, 31,193,231,222,112,191,110, 58,164, 21,224, - 48,176,215, 49, 7,195,198,117, 59, 45,161,226,130,149,124,109,157,131,126, 59,105, 34, 25,190,109, 42, 53,196,184,241, 30, 15, -198,138,237, 78, 35, 82, 31,140,211,167,245,219, 66,220, 41, 7,190, 19,170,167, 56,203,165,200,101,140, 85,149,104,230,213,203, -101,189,155, 78,155,220,117, 82, 3, 46,198,227,123, 43,181,137,199, 98,248,121,226, 4, 60,107, 28,144, 81,211, 52, 25,134, 94, -168,243,195, 33, 13,165, 88,233, 15, 20,151, 2, 68,212, 8, 23, 84,117,184,212,128, 27,157,174,166,211,138,218,110, 68,166,202, - 12,226,136,177,129,232,166,216, 72,248,148, 83,159,213, 41, 3, 58,199,247,101,136,115, 44,202,189,191, 58, 53, 62,165, 75,147, - 13,232,255, 0, 85, 84,225, 70,168,193,124, 22,212, 1, 92, 57,109,173, 42, 25,207, 92,107, 7, 94,247, 82,222, 44,120, 49, 37, - 54,166,153, 62, 27, 97,162,180,183,147,212, 19,228,122,244,251, 53,166, 60, 82,241,139, 69,219,203, 98, 69, 54,140,180, 86,247, - 30,234,150,139, 66,201,183, 25,149, 29,233,234,185, 42,196, 70,134,169,113,219, 89,247, 70,154, 91,161,107, 46,114,242,132,100, -244,206,153,205, 97,168, 2,158, 4, 44,100,219,125,135, 64, 78,228,219,222, 73,244,222,221,174, 76,131, 35,204,179,124,218,130, -135, 45,164, 51, 85,202,227, 76,106, 62,206,255, 0,109,219,126, 90, 70,190,103,145,136, 84, 93, 78, 72, 23,191, 48,247,123,113, - 54,107, 98,106,146,105, 9,180, 41, 21,123,162,141, 80,151, 62,153,110, 91,228, 81,105,212,218,178,156,241, 34, 77,169, 72,130, -226, 75, 2, 57,229, 90, 91, 71, 95, 19, 25, 61, 49,174,102,239,183, 16, 27,245,196,245, 64, 82,110,171,182,181, 46,217, 96, 6, - 35,218,212,137, 51, 32,219,108,198,105, 92,201, 85, 69,199, 30, 6,166,164,128, 10,220,112,144, 72,251, 53,214,202, 31,178,178, -163,118, 58,154,214,227,110,196,250,141,229, 94, 90,234,215, 82,232,240, 89,168, 70,166, 84,170, 4,190,168, 41,121,249, 0, 76, - 90, 29,119,151, 56, 9,248, 73, 25,214,146,202,219, 91, 51,104,184,161,111,104, 55, 2,101, 83,114, 54,198,194,191,169, 77,110, - 68,221,177,164, 63, 85,175,214,237, 88,241,211, 82,147, 76,141, 78,128, 22, 91, 87,142,150, 98,205, 74, 85,132,248,171,248,142, - 53,173,150, 83, 84, 83,203, 81, 44,142,139,160, 27, 2,160,233, 3,114,117, 16, 12,141,127, 70, 80, 9, 35,125,241,233,239,130, - 41,224, 38,103, 13,117, 54, 67,153,205,226, 87, 28,112,190, 95, 45,125, 92,210, 83, 86,187,242,226, 42,178,174, 80,149,113,165, - 44, 65,229,100,134, 4,141,150,122,141, 81, 51, 73,162,237, 30,168,196,225,210,109,131,180,183,158,251, 93,182,173, 90, 77,131, - 96, 89,181, 75,242,173, 86, 98, 49,102, 9,183, 41, 18, 99, 82,213, 61,169,147, 28,108, 26,115,213,233,208, 41,241,139, 73, 89, -155, 50, 88, 98, 57, 82,144,225, 71, 44,173,110, 47,174,107,174,254, 98, 13, 58,249, 85, 6,131, 87,171, 39,220, 44,241,181,244, -153,180,166, 32, 5,149,154,122, 42,162,227, 19, 75,165,128, 71,188, 56,178,174,115,204, 82,145,128, 36, 3,237,235,223,234,222, -215,112, 55,182,219, 31, 86, 98, 61,181,187,220,112, 95,208,183,126,253,180, 97, 54,220, 21,109,191, 13,155, 89, 33,113, 54, 95, -106,218,165, 50, 18, 40,148,150,231,154,107,198, 55, 42, 67,242, 41,179, 93,113, 42,113, 74, 86,162, 97,177, 48,209, 39,113,161, - 58, 64, 13,211,225, 75,148, 51,140, 36,165,190, 84,143,159, 65,171, 75,135,178,168,107,242, 90,172,214,180, 51, 59,234, 16,134, - 17,190,133, 64, 20, 55,158, 54, 2, 70,146,225,136, 0,174,157, 43, 97,185,243, 63,233, 63,244,231,241, 66,159,196,102,225, 15, - 14, 51, 37,224,188,143,132, 9,142,161,114,156,207, 55,165,122,154,211,180,201, 83, 95,148,230, 89,116,181,212,212,192, 8,224, - 5,150, 25,142,186,190, 84,124,245,138, 25,117,109,141,230,157,201,225, 47, 99,174,184,147, 81, 37,251, 42,185,185, 27,109,239, -116,234,109, 66,219,122, 4,155, 82,247,170, 85, 97,120, 77, 63, 82,121,198, 42, 45, 83,110,106, 65,247,182, 36,165, 14,184,226, -150,194, 25, 9,113, 3,110,182,151,139,125,212,183,132,104, 23,139,113, 55, 18,137, 24, 33, 42,171,202,150,138, 77,231, 10, 58, - 80,148, 41,215,106,105,101,113,238, 23, 2, 0,109, 6, 99, 41,127,224, 0,190, 84,115,174, 89,251, 50,110,182,111,109,161,226, - 3,101, 36, 58,211,149,138, 21, 94,218,222,203, 78, 35,202, 81, 46, 82,231,199, 69,129,126,193,167,180, 63, 93,214,103,194,179, -170, 50, 48, 15, 42,103, 21,168, 17,147,174,130,217,182, 49, 51,154, 91,177,188,102,144,164, 58, 35,144,191,242,169, 25, 99,159, -148,124, 72, 7,226,207, 80, 49,207,131,216, 83, 92, 69, 69, 29, 6, 99, 95, 73, 34,235, 8,250,148,236, 9, 14, 17,197,138,133, - 2,215,210,116,217,110,164, 91, 97,105,119,134, 62, 33,208,248,151,225,118, 89,196, 28, 81, 28, 85,249,213, 91,213,189, 89, 99, - 36,143,237,143, 83, 41,169,117,146, 89,165,169, 6,105,139, 75,170, 73,228,145,245,134,150, 73, 9, 44,122, 97,110,111,221,149, -120, 67,165,189, 58,161, 34,214,201,105,134,233, 55,148, 69, 83, 11, 50,221, 90, 92, 68, 40,213, 72,110,200,135, 46, 73, 41,108, -171, 14,167,245, 84,130, 65,200,211,166, 94,171, 84,102, 51, 47,194,143, 89,131, 9, 5,184,240,105, 85, 40,147,218, 74,222, 40, - 89, 97,227, 2, 67,137, 97, 78,252, 5,254,110, 85,114,132, 39, 9, 72, 32,233, 93, 14,201,122, 65,143, 22,156,212, 69, 86,100, - 46, 44,135, 38, 57,135, 33,219,180,231, 22,234, 83, 60,161,192, 10,170,170, 8,144, 33,178, 71,233, 29, 30,242,191,208,181,133, -191,182,125,129, 22,137, 24,184,219, 16,105,244,122,116,229, 24,172,196,140,227, 51,106, 82, 37,172, 0, 92,153,226, 37,249,213, - 57, 83, 22,165, 18,225, 82,222,113, 69, 74, 9, 71,234, 68, 9,208,198,209, 94,219,218,228, 15, 83,112, 65,184, 62,227,110,189, -109,178,169, 62, 83, 5,218,149,249, 37,181, 42,198, 87, 89, 80,199,253,217, 86, 70, 70, 98,204, 20,146, 89,197,201,101, 22,230, - 59,242, 41,215, 69, 77, 73,128,236, 67, 18, 58,167,154,138,231, 60, 4,102,158,150, 80, 82,130,218,157,115, 45,198,101,174, 84, -165, 1, 68,114, 52,130,156, 99, 89, 45, 34,212,134,228, 73, 16,146,227,205,181, 1,201, 78, 77,171, 38, 42,218,143,227,144, 4, -201, 12,201,115, 36, 71, 12, 32,165, 43, 3,226,248,212,144, 10,146, 53,126,180,172,233, 73,154,154,212,168,202, 93,197, 80, 97, -136,104,140,211,242,100,192,162,196,109,194,166, 41,208,221,148,163,201,135, 23,227, 62,232, 78, 95,127, 36, 0,218, 27, 1,238, -160, 90,138,170,136,112, 34,196,122,116, 24,179, 26, 97,224,201, 66,151, 91,158, 22,121, 26, 8,112, 2,184,136,155,133, 28, 30, - 89, 15, 32, 1,204,132,117,220,138, 25,100, 69,141, 33, 42, 95,185,185, 36,108, 64,216, 41, 3,125, 76,119, 96, 54,234,214, 58, - 53,249,220, 11, 78,232,142,144,194,128, 23,101, 1, 6,175,214, 62,103,112,219,249, 82,197, 84,238,108, 17,110, 52,139,118, 47, - 29,184,225,215,110, 42,187,173,184,204,207, 72, 80, 85,167,183,182, 36, 9,173, 70,184,111,106,192, 66,170,116,219,106,146,227, -200, 80,164, 50,235, 10, 77, 66,191, 84,117, 10,106,153, 79,228, 73,241, 36,174, 36,119,184, 21,190, 59,243,185,156, 69, 84,159, -170,238, 77,125,233,212, 64,224,114,153, 96, 80,157,149, 74,219, 91,113,168,200, 9,139, 79,161,218,173,191,225,204,247,118,130, - 18,103,207, 18,106, 18, 92, 10,125,231,194,214, 80,151,139,218, 61,196, 11, 91,199,196,197,237, 22,149, 81, 84,157,189,217,229, -191,180,182, 2, 88, 11, 17,100, 68,160,212, 84,221,239,112,178,210, 9,241,102,214,111,225, 52,151, 48, 84,168,148,168, 76,161, - 74,109,180,160,115,231,137,235,103,118, 56,127,147,104,217, 55,156,251,107,111,175,235,178,220,141,117, 86,109, 75,154,123,113, -238, 29,183,163, 87, 2, 87,106,211,239, 74, 50,150,145, 64,189,234,148,231, 29,158,154, 36,149,174,165, 75,167,166, 52,138,188, - 24,138,159, 21,133,236, 83,112,252,185,180,169, 8,169, 20,176,234, 0, 18, 88, 7,176, 39, 89,211,114,119, 4, 70,189, 44,161, -148, 22,190,159, 75,188, 43,225,207, 12,190,140,158, 22,229, 62, 49,120,177, 11,207,199,124, 79, 74, 43, 96,166,138,138, 92,199, - 54,166,167,120, 99,153, 50,252,166,134, 37,121,162,150, 40, 36,137,243,154,231,228, 65, 75, 44,172,185,141,117, 61, 12, 49,202, - 64,184,109,119,103,132,181, 74,129, 79,134,194,135, 43,190,237, 21,191, 29,100, 96, 37, 40,117, 73, 82, 99, 35, 32,124, 88, 42, - 63,170, 53,226,221,219, 54,154,144,210,159,144,184,110,188,191, 9,111, 50,130,176,158,110, 80, 84,251,171,202,128, 1, 93, 73, -229, 25, 56, 37, 0,140,233,155,215,238,236,178, 81,245, 6,230,196,184, 38, 72,117,114,146,204, 10,157, 18,124,222, 68, 55,238, -229, 13,192, 85, 62, 51,171,139,134,207, 35, 41,140,233,231,202,146,147,144,117, 96,166,239,230,251, 91, 78,170, 52,187,154,100, -238, 69,175,198,143, 95,161, 83,106, 18,154,101, 79,165,231,152,117,164, 67,133, 45,134,212, 82, 91,194,156, 5, 45, 44,164, 2, - 66, 84,155, 34,147,133,243, 36,165, 20,116,217,188, 35,151,238,126, 97, 4,254,177,125, 68,239,211, 82,223,173,172, 0, 24,167, -179, 47,246,170,125, 30,232,243,104, 31,139,124, 24,227,142, 30,161,169,102,142,147, 50,172,203, 50,121, 41,229, 42, 69,218, 3, - 30,118,241,202, 0,243,200, 41, 94,165,129, 22, 42, 88,227,163,116,203, 17, 8,185, 93,183,106,208,252, 38,221, 75,239, 69, 82, -148,212, 98,226, 86,217,118, 44,165,167, 9, 65,101,223, 60,148,144,181, 96,168, 43, 0,252,174, 91,214,181,183, 10,117, 86,179, - 50,153, 73,166, 83,194,214,252,233, 83,209, 26, 43, 44,162, 64,140,219,206, 58,234,210,112,235,191, 11, 64,100, 44,244, 4,168, -145,172,123, 98,119,186,189,184,148,118,141, 70,148,197, 50,191,111,207, 66,201,167,161,249, 52,249,241, 42,212,229, 7,204, 15, -126, 66, 92,110, 3,140,161, 73,118, 19,202, 81, 97,108,148,161,199, 27, 91, 78,107, 86,119,238,216,221, 43,230,252,250,182, 13, - 58,183, 46,147, 70, 13, 38, 4, 56,116,185,179,162, 69, 46,180,223,141, 81,142,184,140, 41,147, 41,114, 84,242, 75,171, 82, 84, -194, 91, 72,230, 64, 90,214,181, 33,200,201,170, 43, 89, 94,208, 24,128, 15,166, 66, 20,216, 3,112,111, 96, 88,110, 78,159,118, -155,220, 99,160, 60, 98,250, 99,112,207,134,255, 0, 71, 46, 29,250, 64,120, 83,195, 50,248,169,148,241,245, 69, 30, 93,144,193, - 67, 79, 83, 28, 82,215, 85,189,122,153,115, 32,105,154,178,134, 26,105,168,101,163,146,156,211,189, 75,102,130, 44,173, 68,114, - 77,207, 71,110, 15, 18, 59, 61, 18,251,183, 45,234,180,107,233,187, 1,250,171, 17,238,235,214,213,164, 83,170,247, 53, 22,146, -247, 59,114, 43, 22,149,141, 85,159, 17,119,100,134, 63, 68,234,163,187, 34, 18,164, 53,206,152,138,117,244,161,183, 58,193, 87, -225, 15,135,235,154,206,165, 93,187, 71,198, 37,215,186, 16,174, 74, 84,106,197,183,252, 7,217, 27,135,115, 66,233,111,133,248, - 82,110, 88, 27,108,185, 18, 44, 98,226,138,217, 76, 74,176, 98,168,211,208, 31, 14, 67,113, 0, 40,199,138, 77, 58,219,219, 50, -244,105,201,133,114, 94, 12, 56,227, 82,225, 41,246,106, 20,107,126, 74, 1, 10, 21,105,145, 29, 83, 87, 29,105,183,135, 90, 99, - 14, 24,108,168,230,161, 33,210,145, 21,121,134,197,241,157,196,167, 13,119,204,187,239,101,247, 94,228,180,103, 85, 93, 74,238, -122, 27,239, 11,130,196,190, 89, 74, 3, 65,139,247,111,234,106, 52,187,152, 37,129,200,203,193,152,211, 98, 54, 3,112,101,197, -108, 4,133,235, 56, 58, 10,228, 87,202, 71,178,152,134,242, 75,119, 19, 27,222,225, 88,150, 31,254, 96, 54, 34,214,141,213,129, - 30, 77, 63,251, 74,190,146, 28, 63,196,245, 21, 94, 41,241, 81, 90,138,137,238,120,103,135,232,114, 90, 51,145,166,250,161,204, - 42,243, 28,191, 56,115, 80,172, 17, 36,201,106, 30,171, 49,165, 99, 58,215,215,101, 85,180,199, 46,155,165, 84,250,206,231,112, -167,186, 84,202,229, 58, 84, 41,147,169,133,248,238,197,175, 91,119, 93, 18,221,187,232,146, 84,224,168,218,183,125,171,122, 80, -169,146, 69, 62, 91, 77,165,197, 50,182,199,186,202, 90, 37,197,125,153, 76,161,221, 73, 67,102,161,181,186, 27, 75, 97,238,133, -149, 75,174, 53,111,223, 86,211, 87,109, 54,213,185, 35, 77,146,237, 17,137, 14,200,167, 84,169, 77, 86, 23, 24,190,212,104, 85, - 56,114,217, 98, 72, 75,241,159,101,166,228, 0, 16,240, 9,226,206,213,123,125,246,154,253,183, 26,179,248,203,225,125,202,139, - 46,178,168,179,235,251,104,229, 22,255, 0,179,166, 52, 82,164, 41,247,246,211,115,158,110,161, 69,150,180,149,143, 14,155, 84, -150,134,210,172, 54,180,249,236,206,213,123, 69, 61,143,214,236,216, 85,123,123,115, 55,238,195,166,195,122, 53,197, 19,108, 46, - 26, 79, 16, 44,236,253, 26,226,128,250,223,131, 85,141,183, 84,234,188,232,106,173,199, 90,212, 89,142,137, 15, 83, 81,144,125, -209,101, 40,228,141, 47, 10,102,180,149, 86,154,156, 24, 92, 29,108,129,135,154,226,204, 2, 44,137,115,111, 54,226,254, 93,182, - 24,147,120,185,244,188,240,119,233, 7,195,249, 54,103, 93, 17,224,159, 17,114, 33,203,106,209, 45, 37, 92,121,173, 8, 71, 34, -150,170, 58,150,200,101,166,150, 41,220, 61, 44,139, 5, 76,112,171,213, 71, 20,136, 39, 4,118, 6, 29,186,134,194, 27,148,195, -193, 62, 44, 68,187, 21,106,102, 84, 30, 70, 85,205,142, 80,158, 87,201, 81, 7,153,192, 0,192, 80, 64,211,149, 66,165,180,203, -136, 67,104,240, 27, 90,130,130, 17,226, 37,166,148,162, 1, 67, 73, 94, 66, 83,252,227,140, 39, 39,160,215, 35, 46,223,110, 95, -179,178,219,105,233,244,219,195,120, 47,233,139, 89,112, 67,182,118,102,191, 77,247,149, 21,115, 41,196,213,175, 41,244,200,241, - 80, 85,142,139,201,194,137, 9,207, 77,115,159,136,255, 0,164,222,229,137, 30,163, 15,134,190, 13,228, 85,153, 9, 87,213, 91, -165,191, 87,204,167, 45, 40,174, 45, 76,182,204,169, 86, 14,216,198,101,228,255, 0,133,202,109,178,212,219,137,132, 41,194,148, -158, 96,180,131, 37,202,248,118,182, 90,133,138, 42,118,185,221,117,133, 75,133, 32, 29,216,168,185,189,236, 14,163,109,129, 0, -219,143,243, 63, 16,184, 90,150, 55,105,115,232, 42,165, 31,169, 77, 42,212,177, 32, 14,130, 18,226,224, 0, 53, 57, 0,216,238, - 55,196,195, 45, 68, 22,211,205,146,176,133, 54,151, 20,132, 15,133,229,231,144, 40,224, 37, 5, 65, 39,151,155,148, 18,158,152, -235,167, 48, 77, 75,205,166, 35, 10,241, 36,158, 64,164, 52, 60, 79, 9, 9,207, 48, 83,160,114,149,103,148, 96,103,182, 73,215, -230, 7, 43,219,203,237, 79,157,190,246,230,253, 61,196,180,212, 75,181, 94,156,213, 51,101,233,182,221, 22,223,225,210, 69, 2, -168,227, 11,169,218,181,125,167,162,176,212,122,212, 25, 8,142,218,126,176,154,244,170,211, 68, 7, 88,168,182,234, 82,177,213, -203,167,233, 12,113,211,199,133,235,182,188, 54,240, 99,176,227,101,238,251,254, 37, 46,135, 81,183,246,214,113,190,247, 95,112, - 47, 39, 98, 37,203,129, 54,157,199, 86,136,195, 22, 53,140,193,106, 91,252,225,149,204, 98, 19, 75,118, 84,180,165, 7, 18,169, -178, 74,170, 69, 51, 56, 73,209, 23, 81,210,224, 42,219,115,204, 50, 5,109, 34,219,149, 87, 3,115,219, 16, 36,241, 71, 32,204, - 22, 85,167,138,163,219, 12,129, 32,128, 37,228,152,177, 1,116, 88,216, 92,246,107, 17,218,230,195, 19,125,171, 92,246,205, 30, - 90, 32, 84,171,244,168,149, 5, 16, 61,205, 83, 89,247,180,147,216, 56,218, 23,148,121,247,198,178,122,125, 22, 5,114, 40,154, -138,154, 22,210,134, 80, 99,180,183,112, 79,162,136, 1, 95,118,123,235,152,220, 17,123, 63,247, 3,103,237, 26, 77,219,197, 85, -255, 0, 51,114,119,174,160,202, 42, 21, 90, 12, 74,180,170,149,181,104,202,120, 37,197,211,222,171, 73, 81,114,229,171,182,181, - 40, 63, 37, 88,100,184,149,120, 41,228,194,143, 75,153,101, 48,185, 91,107,153,134,155, 1, 8,109,165, 41, 41, 74, 64, 1, 32, - 4,224, 99, 3, 80,103, 78, 51,204,101,157,185,180, 57, 21, 10,146, 34, 81, 20,149, 19,184,236,206, 95,148,177,131,216,104, 15, -110,168,167,108, 60,209,182,123, 57,246,138,169,146,133, 91,117,142, 38,105,152,127,215, 43, 89, 24,145,251, 10, 7,241,197, 84, -154,117, 14, 91, 72, 18,147, 35, 46,114, 97,104, 83,107, 42, 39, 25, 0,249,254,115,167, 66, 11,229, 77,120,141, 0,191,209, 21, - 33, 25,229,241, 84, 82, 74, 83,146, 59,103, 90,221, 94, 77, 82,101,118,154,148,130,244, 86,221,202,228,255, 0, 60, 39,160,229, - 89,254,119,200,247,211,203, 6,164, 88,105,150, 65,236,148,131,147,213, 56, 24,206, 62,221, 45,195,237,153,206, 43,169, 51,119, - 73,100,164,125, 34, 72,211, 64, 97, 96,110, 1,191, 81,243,214,210, 12,210,138, 24, 41, 40,102, 89, 57,178,213, 33,105, 1, 32, -244, 32,111, 96, 45,125,246,219,221,139,140, 97, 48, 58,236,154,131, 46,153, 46,146, 87,204,146, 82,132, 15,242,109, 36,167,167, -132, 6, 59,119,206,190,200,170,100,132,160, 21, 41, 56, 1, 36,134,210,133,100,156,114,158,195,191,225,170,166,170,211,105,248, -149,212,255, 0, 59, 56, 36,156,100, 15, 64,113,246,235, 24,171,213,226, 60, 10,142, 60, 84,244, 75,137,232,164,103,245, 65, 82, - 71, 80, 58,100,117, 7, 79,209, 82,242,147, 69, 59,116,245, 27,159, 93,250,111,240,235,241,195,116, 85,144, 77, 56, 50,195,229, - 27,121,122, 40, 22, 2,202,123, 1,254, 33,247,226,229, 38, 74,212,210,138,159, 75, 96, 2, 2, 89, 3,156,146, 72,192, 46,118, -242,234, 6,176,138,131,208,130,143, 59,105,144,180,243, 97,114, 84,183, 74, 71,117, 30, 85,124, 41, 72, 32,103,160,201,234, 15, - 82, 53,100,169,214,165, 52,218,131, 78,182, 91, 7, 5,229,115, 43, 41, 62,101, 9,253, 85, 99, 29,115,128,122, 16, 53,132, 78, -168,190,250,242,169,137, 87, 33, 4, 48, 26, 80,111, 0, 28,172,132,175,226, 56, 4,128,162, 71,159, 77, 32,237, 34, 54,153, 1, - 86, 59,239,247,110, 15,243,248,219,221, 40,164,162, 89, 84,201, 21, 66,136,191,195,112,122,116, 32, 11,143,131, 90,221, 78,196, - 28, 93,170, 53, 86,220, 45,182,214,121,193, 56, 75, 24,202, 63,156,175,242,120, 8, 79,194, 49,147,208,172,140,107, 28,144,185, - 14,165,196,243, 54,128,227,107, 95, 40, 1,247,148, 10, 82,160,148, 36,114,161,156, 18,146,126, 53, 99, 7,225,193, 26, 21,201, -165,223,209,170, 87, 43, 69,196,145,224,199,109, 32, 21,142, 84, 37, 68,147,135, 50, 73, 61, 7,235, 99, 61,180, 42,150, 9, 83, -110, 45,199,193, 66,138, 91, 83,156,173,178, 57, 84,149, 20,132, 36, 4, 47, 4,158,234, 33, 74, 7,212,107, 34, 85, 36, 91,174, -195,111,187, 14, 2, 4,136, 88, 88, 50,239,114, 9,216,252, 64,239,107,131,210,253,111, 96,106,135, 9,241, 91, 90,152,154,224, - 81, 10,117,183, 66,150,132,132, 32,132,199, 90, 18, 18,211, 62, 25,202,136,229, 86, 80, 71, 55, 78,180, 86,211,138, 90,218,109, -210,132,173, 42, 40,195, 97,226,160,188,146,149, 61,202, 17, 24,252, 7, 4,147,128,148,146,114,179,143,162, 72, 66, 20, 93, 82, - 91, 32,243,151, 0, 13,184,226,121, 87,250, 54,210,216, 3, 57, 40,248,112, 84, 48,188,119,233,112,142, 86,234, 29, 75,124,173, -161,158,235,112,133, 50, 75,156,174, 56,246, 66,135, 48, 3, 10, 10, 0,128, 64, 10, 4, 29,108, 70,250,118,191,227,252,183,237, -110,134,223,125,175,163, 80,140,221,139, 15, 94,194,214,251,186,251,205,239,140,110,108, 82,150,189,228, 33,212, 54,225, 10,142, - 29,108, 40,168, 1,209, 40, 65, 63, 3, 28,169, 5, 42,200,193, 95, 80, 71,124, 14,168, 18,210, 86, 21,203,202, 82,160, 8, 0, -169, 41, 24, 9, 81, 60,184, 87,196,165,224, 12, 28, 28,231,190,156,202,203, 43,100, 60,180,187, 46, 83,142,128, 90, 68,167, 20, - 70, 74,148,144,167, 1,235,149, 35,157, 71,249,216, 72, 0, 37, 61,155,106,154, 76,153, 41,136,149, 4,169,231,163,196, 66,202, -129, 9,117,245, 33,158, 98,160,112, 71,136,224, 32,158,132,126, 26, 84, 48, 2,250,134,223,233,191,126,157,125,253,112,216,241, - 18,202,161, 65, 55, 29, 0,222,246,181,135,238, 29,126,252, 64, 99,219,127,112,181,112,123, 74,183,173,166, 28, 82,255, 0,130, -214,206,212, 89,178, 82,176, 66, 90,159, 67,176,105, 47, 75, 67, 68,147,204,215,137, 82, 24, 35,204, 30,154,228,170,206, 51,216, -231,166, 58, 99,237,251, 53,183, 60,121,238, 60, 93,220,227, 99,138,189,200,132,233,122,157,114,111,133,244,154,114,249,150,180, -154,125, 6,168,171, 94, 25,104,172,228, 50, 89,161,161, 72, 29,130, 92, 0,116, 26,212,101,246, 56, 61, 59, 96,227, 63,241,212, -247, 43,140,165, 5, 18,176,179, 8,144,144,122,130, 84, 18, 62, 32,155, 28,114,150,121, 50, 85,103,185,197, 66, 29, 81,207, 87, - 80,202,123, 21, 51, 57, 82, 15,189,108,126,252, 8,178, 15, 79, 76,232,117,245, 36,142,192,224,252,191,179, 85,214,174,254,137, -207,231,246,104,101,224, 28,231,161,235,248,233,200,126,252,104, 1,220,109,129,221,230,199, 97,142,189,189, 51,215, 63,159, 61, - 14, 64, 0, 96,247, 29,126, 71, 68,169, 89, 62,120,252,245,208,202,238, 79,204,253,154, 92,108, 5,240, 48, 58,192,202,135, 67, -215,243,231,249,198,133, 81, 3, 57,249,224,119,237,229,162, 28, 39,169,249,249,126,125, 52, 26,200,251,199,127,179, 74, 45,198, -227,126,216,200,253,248,160,178, 50, 58, 3,211,207, 63,184,253,186, 90,240,163,147,159,195,236,210,210,184, 24,175,170,168, 61, - 49,215,167,225,161, 16,112,122,156,116,213, 97,248,103,161,251, 51,164,216, 90,227,174,173,255, 0, 60,100,245, 38,214,190, 14, - 73, 56, 0,142,152,239,145,247,116,213, 66,176, 7, 82,172,142,216,249,246,207,222, 52, 58, 84, 83,211, 29, 7,111,236, 58,242, - 80,162,174,101, 47, 8, 61,128,206, 71,222, 7,174,116,131,222,222,236,101, 69,254,127,150, 46,141,168, 96, 0, 57,137,206, 73, -254,145,243,192,215,213, 44,173, 73, 8, 39, 9, 56, 87,124,103,247,245,254,141, 80,105,188,242,146,174, 81,158,128,117, 61, 49, -215, 25,244,209,205,167, 57,192,206,127,164,117,237,249,237,164,172, 79,207,166, 48,109,219, 21, 90, 56, 35, 35, 32,143, 46,221, - 61,125, 15,125, 28, 57, 72, 79,160, 62,127,205,251, 62,125,244, 50,121,112, 0,252,253,190,154, 37,176, 85,142,192,124,135,244, -231,207,166,177, 97,123,227, 24,184,178, 15, 76,159, 82, 63,163,247,234,184, 24, 57, 24,201, 57, 7, 31,135,219,161, 16,175, 35, -231,219,250, 49,162,146,113,220,245,232, 65,198, 59,246,199,175,246,233, 22, 22, 36, 97, 50,187,220,155,223,231,255, 0, 56, 37, - 43, 8,199, 58,186,159, 32, 59,244,249,104,146,238, 70,113,140,249,250,227,183,159, 77, 4,113,144,190,153, 63, 44,227,184,200, -252, 53, 81, 36,116, 32,231, 29,201,251,125, 7,150,146, 98, 58,223,225,130,219,221,123,117,193, 41,119, 24,248,249, 64, 32,224, -227,175, 94,160,122,244,206,167, 39,236,166,220,118,247,115,129,157,165,148,252,148, 73,171, 88, 74,169,237,245, 93, 33, 73, 46, - 54,186, 44,133, 38, 1,113, 61, 74, 65,132,228,126, 92,227, 35,168,212, 42,118,215,108,110,189,211,185, 98,219, 86,181, 49, 83, -231, 73, 5,229,186,227,137,139, 78,167,194, 66,128,145, 85,173, 84, 93, 79,135, 74,164,183,252,247,156,234,162, 66, 26, 67,174, -148,160,203, 23,217, 2,214,215,112,241,106,238,110,209,215,119,102,143, 34,181, 87,151, 2,239,168, 76,172, 75,110,139,108, 53, - 53,136,201,133, 34, 21,179,239,238, 5,184,218, 82,218, 11,139,119,149,215, 15,196, 91, 66,126, 17, 4,227, 9,104,167,142,154, -137,228, 6,169, 95, 86,155, 95, 74, 21, 96, 75,158,136, 11, 5, 3, 81, 26,142,194,230,246,184, 60, 26,124,214,135,136,167,204, - 41,105,100,124,178, 88, 36,167,158, 80, 44,129,137, 73, 35, 0,159,180,193,212, 2, 20, 18,129,238,218, 65, 23,235,214,231, 75, -174,219, 59, 83,184, 21,235, 93,151, 30,184,224, 91,147, 13, 27,193,104,188,236,105,178, 18, 35, 38,162,134, 82, 50,234,163, 33, -213,188, 0,207, 86, 70,181,171,102,120, 8,183,217,222,155,115,124, 46, 59,138, 53,229,105,208,108, 90,123, 86, 21, 10, 66,223, -155, 42,179,121,215, 33,166, 69,211,124,221,210, 95,234,244,211, 45,231, 83, 25,177,128,216,198,122,164,107,107,162,239,150,195, - 32,148, 57,188,187,110,233,193, 75,141, 34,227,167, 60,130,146, 48,180, 45, 33,226, 20, 8, 39, 35,207, 26, 14,226,227, 7,134, - 29,183,182,107,183, 12,173,200,163,213,169,246,180, 23, 39,205,163, 89,141,125,115, 86, 84,102,186,172, 83,169,144,129, 84,133, -127,178,128,126,237, 65,225,142,150,158, 82,226,162, 33,169,116, 0, 89,111,114, 69,200, 23, 59,157,133,183, 61,135, 91, 99,179, -242,190, 62,226, 28,135, 33,205,114,204,161,165,203, 70,109,205,246,202,132, 82, 30, 74, 87,138, 56,249, 76,250,117, 70,177, 5, -155, 76,136,234,116, 85, 84, 45,129,101, 97,144,207,224,179,103,238,181, 56,183, 81,123,208,158,152,250,158,156,245,169,125,220, - 20,116, 60,235,202, 42,121,197, 48,137, 42, 66,150, 73, 60,184, 78, 0, 56,244,208, 91,129,114,240,113,236,166,216,187,155,114, -235, 20,202,117,183, 21,229,201,153, 69,162,189, 37,138,222,236,111, 13,232,227, 74, 84, 26, 29, 62,109, 77, 74,149, 44, 56,247, - 39,140,233, 40,139, 17,165, 41,231,112, 0,207, 27,248,128,250, 66,114,226, 82,170, 52,190, 16,184,115,190, 43, 19, 3, 14, 52, -141,201,220,155,106,174, 41, 84,247,112, 66,100,195,183, 41,209, 86,185, 78,160, 14, 96, 30,113, 8, 56,248,186,103, 81,143,226, - 11,136,157,247,226,127,114,100,238, 30,253,238, 45,126,244,188,158,105,214,162,199,173, 62,168,205, 81,169,238, 40,172,211,168, - 86,223,192,221, 6,154, 50, 7, 43, 76,160,168, 1,206,181,158,186,127,203, 56,124,207, 46,161, 18,211, 34,253,166, 54, 14, 6, -215,180,103,204, 24,247, 50, 42,129,179, 89,197,215, 20,239, 27,253, 36,248,135,244, 13, 71, 12, 80,113, 94, 97,196, 20,179,105, - 38, 7,168,168,108,188, 50,127,118,243,135, 96,181, 38, 34,111, 20, 96, 58,169,220, 60,100, 95, 24, 39,180,115,137,253,201,226, -247,127,170,251,223,186, 82, 27,254, 16, 94, 74,118,124, 26, 44, 87, 92,118,155,105, 91, 81,121,162, 91, 54,141, 31,196, 63, 13, - 58, 13, 59, 9,230,192, 47, 62,243,210, 23,241,186,117,175, 92, 57,196, 97,202,237,211, 57,208,178,252, 42, 34,147, 24, 1,211, - 46,149, 5, 18, 60,253, 6,173,251,228,231, 53,219, 29,128, 65,247, 42, 12, 6, 79, 41,200, 5, 73, 4,129,215,191,174,178, 14, - 26,216,118, 93,122,230,134,202,121,164,204,167, 68,139, 29, 9,238,183,223,119,194,101, 41,207,153,113,104, 31,126,172,212,141, - 41,120,124,197, 24,209, 26, 34,128, 46,118, 28,192,119, 59,147,183, 82, 73, 39,169, 36,239,142, 53, 53,117, 21,115,214, 86, 85, - 74,211,213, 84,180,178, 72,231,118,103, 42,204, 73,176,238,123, 0, 0,232, 0, 27, 98,109, 63, 71,223,128,234,125,203,195, 15, - 16,156, 74,220,244,174,123,199,114, 99,200,218,237,155,145, 45,177,136,116,123, 98, 92, 90,221,217, 83,134,149,167,225, 85, 82, -187, 18, 29, 56,186, 15,197, 30,152,164, 14,138, 57,216,168,246, 17,161,213, 31,142,228,117, 50, 90,146,235, 97, 10,230, 75,225, - 8, 56,228,115,185, 67,169,229, 41,229,239,204,112, 8, 58,236,151, 0,219, 99, 15, 98,184, 76,225,239,107,105,113, 83, 17,187, - 99,109,109,231,167,180,148,132, 41, 85,138,164, 38,234,181,105, 14,116, 28,206,174,124,199,201, 39,174,123,233,168,226, 23,134, -171,150, 93,110,226,220, 91, 38, 61, 58,161, 65,144,255, 0,214,146,168, 44, 62,182, 43,237,206,148,240,247,152, 52,168, 9,103, -146,167,207, 53,197, 58,202, 3,136, 63,166, 80, 94, 2, 65, 52,151, 19,209, 54, 99, 28, 89,138, 38,170,131,118,127, 82,142,117, - 40, 61, 55,137, 74,160,247, 13,239,215, 29,145,225,180,210,240,102, 89, 6, 69, 36,194, 24, 42,163, 73,100,212,214, 95,105,101, - 94,110,228,237,169,174, 22,254,128,108, 0, 3, 82,108,234, 84,116, 52,134,210,201, 41,147, 33, 50, 29, 8,240,203,143,186, 2, - 0, 83,220,201,207, 58, 67, 40, 7, 36, 0, 19,132,156,107, 99,104, 52, 8,210, 93, 98,116,150,210, 36,193,113, 47, 65, 13,129, -225,199,203,101,135,198, 79,235, 74,113,133, 41, 10, 89, 5, 32, 16,148,242,167, 36,170, 87, 15, 59,203, 71, 82, 20,230,223, 76, -148,128,134,151,205, 74,153, 75,168, 33,105,194, 64, 39, 19,144,162, 0, 37, 71, 41, 4, 99, 28,189,244,241,218,123, 83,186, 79, - 41,180, 35,109,238,133, 20,114,133, 45,113,162, 37, 61, 14, 28, 74,221,114,104, 72, 79, 81,147,216,245,198,162, 81,100,213, 74, - 64,146,146, 66, 91,182,134,244, 22,232, 13,237,215,211,210,214, 24,178, 78,125, 70,186,229,108,198, 24,237,177,102,158, 32, 0, - 54, 4, 18, 91, 96, 64, 3,222, 5,177,113,161,208, 12,134, 16,211, 10, 90, 34,143,242,202,115,224,151, 49,158,230, 50, 29, 74, -147,238,236, 18,160, 10,191, 89, 64,114, 35, 1, 74, 86,178,171,163,112,237,237,158, 85,185, 95,170,208,239,234,203,242, 38,132, - 82,227,109,214,216,222,251,153, 34, 51,212,224,196,176,253,106,153, 99,209,229, 46,149, 79, 64,228, 45, 41,208,217,144,176, 88, -142,149,168, 40, 7,150,209,216, 45,211,158,164, 57, 54,149, 73,183,217, 80,229, 46,213,234, 77, 72,113, 41, 0,142,127,114,166, -182,234,138,136, 63, 8,231, 66,124,250,119,214,136,251,111,106,123,151,194, 15,179, 87,116,183, 91,103,247, 82,225,178,183, 81, - 55, 54,223, 91, 16,111, 43,121,168,212,249,212,202,101,201,112,177, 6,177, 22,136,227,168,117,112,106, 47,198, 43, 67,115,185, -253,229,144, 74,152, 83, 75,194,132,166,147,135,179, 55,167,146,177,104,218, 8,163, 49,131, 44,171,101, 82,242, 36,105,101, 37, - 93,174,238, 0,210, 13,137,213,184,190, 34, 25,199,137,124, 27,150, 48, 25,157, 89,207,105, 98, 73,154, 90, 74, 25,209,101,153, - 68, 78,197, 69, 87, 38,162, 8,201, 42, 11,115, 17,137, 23, 64, 22,225,150, 51,124,116,238, 62,206,240, 93,121,221, 53,125,139, - 98,254,183,183,166,236,173,213, 46,123, 18,139,190, 78, 91,107,223,205,183,143,115, 74,157, 85, 27,132,254,217,209, 34,200,137, -176,244,148, 57, 59,154,223,149,118,189, 34,254,168, 6,195,212,202, 37, 1,178,229,101, 17,220,184, 46,123,134,236,174, 85,110, -107,134,183, 87,184,110, 58,228,233,117, 42,229,201, 93,156,253, 74,191, 90,168,206,125,114, 39, 77,169, 84,100,184, 86,235,239, - 72, 90,214,224, 4, 37, 74, 86, 72, 39, 36,218, 42,181, 73,149,138,165, 74,181, 92,157, 58,167, 88,172,212,165, 86, 43, 53,106, -148,217, 85, 42,173, 98,179, 80,115,198,159, 87,171,212,230,186,183,234,149, 55,158, 37, 78,200,125,199, 29,112,245, 90,142, 6, -128,109,101,110, 97, 36, 6,179,241,128, 71, 49, 62,185,242, 26,176,114, 30, 31,163,201, 33,178, 14,117, 76,191,106, 66, 5,197, -194,141, 9,251, 40, 52,128, 22,229,136, 85,214,206, 85, 72,164,252,120,250, 73,120,157,244,128,204,169, 36,227, 28,238, 99,195, -217, 60,113, 67, 69,150,137,165,120, 17, 41,193, 88,102,171,119, 98,213,213,195, 83,191,180, 77,245,112, 73, 61, 64,160,130,138, - 25,228,133,136, 90,148,234, 57, 93, 9,121, 9, 80, 90, 91,144,148,188,144,176,114,149,165, 14, 2, 18,224, 80, 4, 40, 96,130, - 50, 8, 58,204,169,155,143,113,209,211, 21,169,110,192,185,160, 68, 11, 17,232,183,173, 53,187,170,154,198, 82, 82, 61,205,249, -174, 9,212,229, 15,255, 0,131, 48, 54, 63,248,163,211, 24, 96,228, 10, 88,201, 41, 7,162,137,244,238, 63, 57,213, 53,164, 43, - 36, 14,185,200,252,159,150,159, 39,166,130,161, 52, 77, 10,202,163,166,160, 13,137,238, 13,174,167,222, 44, 71, 99,138,111,135, -120,167,136,248, 74,170,106,190, 27,206,170, 50,105, 42,192, 74,133,134, 66,176,213, 68, 13,249, 53,148,230,244,245,180,228,253, -170,106,184,166,129,255, 0, 94, 54, 24,116,231,239,189,238,150, 89,133, 64,254, 15,237,252, 36,248,206,123,141,131, 77, 48, 29, -151, 33,230,210,209,151, 80,170, 84,195,206,184,250, 26, 64,229, 8, 74, 50,160,149, 45,107, 8,109, 8,177,171,117,119, 10,108, - 7,169,170,189,110,207,170,159, 74,208,253, 57, 21,201,173, 71,113, 46,161, 40,144,133, 73, 74,196,165, 54,232, 78, 92,111,222, - 60, 37,149,168,148,124, 74,206, 0,166,219,230, 33,120, 36,117,206,124,251,143,219,175,170, 91, 74, 90, 19,207,241, 32, 19,200, -147,240,156,250,254,205, 37, 29, 21, 36, 32,133,167, 64, 24,223,236,130,111,182,228,145,114, 71, 98, 73, 54,218,248,156,102,190, - 58,120,209,157,242, 99,172,241, 87, 62,130,146,154,148, 80,197, 71, 69,153,213,101,153,108, 20, 34, 40,225, 52, 84,185, 86, 89, - 37, 30, 91, 75, 70,241, 68,139, 37, 45, 45, 36, 84,242,232, 13, 44,108,196,177,172,227,188,193, 37, 92,169, 75,105, 8,109,150, -208, 16,219,109,131,209, 13,161, 0, 37,180,228,147,128, 7, 82, 79,114,117, 72,146,163,205,129,140, 14, 81,216,140,129,158,184, -237,223, 94, 84,177,158,216, 4,224, 31, 32, 73,237,246,107,233, 9, 80, 79, 50,129,198, 79,194, 64, 35,215, 61,126,205,109, 95, -111, 47,109,189,216,170, 85, 2,233, 91,105, 10, 6,221, 0, 3,160, 30,158,131,165,177,229,212,133,160,131,128,125,112, 51,211, -236,243,208,105, 11,230, 60,201, 8,109,191,139,226,248, 78, 71,159,207,251,116,122, 20, 20, 50, 7,145,200, 61,199,151, 95,191, - 67,169, 36, 55,151, 49,215,161,201, 4,252,137, 0,246,233,161,179,111,219, 6,177, 6,221,251,126,255, 0,227,138,110,123,186, -192, 82,130,150, 8,200,194, 73, 3,182, 73, 31, 61, 75,227,232,215,112,195, 99,223,219, 35,198, 38,227,110,133,131,105,238, 13, -175,184,202,183,248,125, 93,173,121, 80, 32, 92, 54,253,118,207, 69, 45,203,170,246,167, 78,131, 84, 97,109,174, 60,137,213,122, - 35, 78,132,242,171, 48, 16,160,164,173,180, 40, 68, 24,149,143, 8, 54,158,138, 74,147,205,144,144,181, 99, 24, 3, 29, 15,109, - 77,123,217,103,184,103,103,189,143,246,187,116, 6,164, 81,171,123,149,186,219,227, 85,173,205, 79, 52,105,170,164, 82,174,168, -214,139, 78,199,144,180,167,195,143, 48, 82, 93, 67, 79,160,169, 10,102, 26,210,135, 57,138,185, 98,156, 99,155,193,146,101, 73, - 89, 80, 12,138, 37, 10,177,139, 6,150, 66,173,201,141, 9,232, 76,161, 9, 36, 16,136, 25,200, 33, 72,197,129,225,126, 86,115, -110, 47,162,164, 72,185,210,136,228,101, 7,117,187, 20,132,234,244, 26,101,111,190,214,223, 28,193,223, 63, 97, 79, 4,115,184, -194,185,209,179, 27,239,185, 54,175, 14,116,135,150, 47, 93,165,163, 83,105,149,186,237,191,122,205, 66,164,162,196,218,237,215, -185, 31,144,220,155, 36, 48,243, 62, 60,137,208, 39,207,167, 56,164, 69,140,229, 65, 78,120,204,111, 6,212,251, 26,125,155,123, -125, 58,216,185,109,203, 55,136,138,110,227, 80, 37,198,122,216,220, 26, 55, 21,119,221,175,121,219,245,200,177,194,145,114, 81, -170, 86,149, 42, 2,105, 21,166,212, 60, 80,227, 40, 75, 45,172,132,134,150,223,194,108, 27, 71,113,203,157, 91,184, 42,197, 34, - 81,147,122, 93, 21, 71, 34,115, 36, 46, 82,152,170, 10,100, 82,181,243,128,150,154, 17, 84,177,200, 6, 11,105, 81, 80, 1, 58, -222,155, 74,229,118,163, 38,164,121, 90,136,212, 8,204, 83, 34,180,202,131,110,158, 98, 36, 84,159, 83, 97, 28,172, 45, 43, 91, -109, 37, 72,230, 95, 43, 74, 4,164,144, 53, 71,103,220, 99,198,175, 58,200,217,245, 68, 48,132, 0,197, 3,242, 22,221, 8, 44, -154,100,147,169, 93, 83,188,174, 86,218,156,144,111,212,220, 79,225, 79, 9,228, 78,100,161,201,225, 89, 2,172,143, 33, 82, 89, -164,178,130,234, 9,180,107,204, 58,149, 35, 85, 80,157, 55, 14,113,212,219, 99,136,234,228,106,101, 18,155, 87, 66, 43,171,106, - 35, 20,230,230,213, 86,165, 86,106, 81,233,145,219,143,245,157, 94,162,202, 82, 39,213,158, 8, 74,228, 72,240,144, 31,125,213, -185,225,160,171,151, 78,181,189,187, 22,141,226,232,140,220,143,169,234, 75,115,193,110, 28,247, 27, 75, 82, 94,236, 27,137, 40, - 30, 71, 22, 72,232,147,202,162,122, 0, 78,185, 81, 30,244,240, 36, 85, 11, 97, 75,143, 66,134,205, 38, 36,144,114,151,170,110, -182,100, 75, 96, 4,171,162,144,234,163,165, 65, 32,245, 74,178, 8, 26, 10, 61,219, 41,136, 17,203,239, 31,124,142,204,154,156, -175, 13,210,158, 95,136, 52,201,108,142,169, 62, 50,148,126, 69,191,150,148,202,184,199, 54,167,208, 37,169, 53,106, 7,153,101, -243, 27, 0,162,250,143,152, 27,234, 59,146, 0,182,199, 21,248,142,186,130, 68, 16, 73,204, 22, 91,197, 37,200, 58,148,200, 0, - 63,105,108,186, 23, 99,179, 29,212,244, 27,233,106,113,119,182,151,183, 20,183,231, 10, 22, 90, 95,184,110,205,174,179, 85,117, -110, 45,213, 17,214, 92,183,173,234,168,126, 51, 38,204, 66,193,230,145, 91,105, 50,153,247,130, 7, 35, 78, 18,214, 74,210,172, -108,130,235,136, 99,157,106, 88,230, 57, 24,206,126, 30,184, 29,122, 99, 35,174,184,239,193,253,153,180, 27, 99,196,214,228,110, -244, 17, 42,218,187,248,132,179, 97,219,181,104, 40,144,201,180,230,222, 73,172,174,167, 38,226,195,235, 46,192,175,213,208,195, -104,125, 33, 94,236,228,180, 23,194, 91,114, 74,129,232,125,205,113, 42, 50,221, 64,113, 73, 41, 74,147,200, 62, 21,165,105, 39, - 60,201, 61,142, 2,178, 62, 90,181,184,106,180,102,212,111, 59, 48, 18, 60,132, 50, 0, 46,130,202, 66,144, 55,247,134, 61, 71, -223,105,215, 25, 75,194, 85,210,100,173,193,144,212,211,209, 46, 91, 68,149,130,172,222, 99,154, 8,239, 94,118,188, 98, 35, 41, - 2, 1, 17,229,242, 66,157,152,184, 14,149, 74,248,109,178, 71,136, 2,123,168,115, 2, 14, 14, 57,186,118, 32,228, 31, 62,191, - 45, 97, 51, 47, 98, 23,151, 29, 87,134,165, 30, 85, 12,144, 73, 56, 9, 36, 28,115,140,128, 50, 48,190,217,242,214,190, 84,238, -181,120,174, 53,206, 10,138, 20,251,121, 81,248,208, 14, 28,111, 62,153, 35,167,145, 94,177,148, 93,188,217,104,175,152, 41, 36, -165, 46, 12,115, 32, 15,137, 25, 36, 18,180, 96,127,181,202,144,175, 93, 74, 99,129, 80,108,110,126, 63, 15,221,249,252,113, 22, -167,164, 88,198,195, 87, 75,254, 23,239,215,227,252,142, 54,149,187,161, 46,158,100,184, 10, 85,203,158,101, 4,148,156,144,121, -194,199,192,114, 21,229,141, 90, 42,114,158, 91,107,145, 76, 8,113,208, 10,213, 17, 74, 45,161,212,100,229, 76, 41, 32,144,224, -234,174, 78,161, 92,159, 14, 20,113,166, 18, 37,213,201,202, 92,120, 40, 0, 57, 92, 36, 41, 65, 39, 56, 67,160,145,146, 15, 76, -158,152, 57, 32, 19,157,102,144,110, 4,175,225, 82,207, 50, 70, 72, 4,148,117, 57,200,207, 83,144, 6, 64,237,203,243,234,149, - 69, 58, 78,154, 36, 23,244, 61,193,236,111,235,211,249,140,110, 67, 81, 45, 20,162,104, 13,237,177, 83,114,174, 63,101,198,215, - 30,253,136,189,193, 83,190, 47,109,215,101,185,200,130,228,102,194, 92, 90, 75,164, 58,231, 42,146, 73,229, 80,113, 35, 60,189, -138,136,248, 74,128, 86, 58,234,234,212,199,221, 1, 78,200, 88, 33, 68, 16,142,102, 27, 82, 21,132,242, 40, 55,146, 82,112, 59, - 17,133, 39, 33, 64,231, 88, 13,198,183, 11, 6,169, 79, 9, 91,204, 2,185,108,130,176,149,181,132,149,201, 71,135,250,206,161, -180,146,226,123,173, 0,158,139, 29,113,232,181,233,174, 28,169, 77,128,142, 71, 27, 45,169,120, 83, 43, 79, 55, 50,121,143,249, - 64, 84,147,211,161, 24,193,202,134, 98,211, 43, 81,204, 98,153,246,107,216,216, 88,131,109,238, 59,250,223,241, 6,248,157, 80, -188,121,165, 42,212, 83, 34, 68,192,217,212,145,169, 24,117,235,185,235,117, 35,175,186,197, 67,227, 22, 64, 10, 60,141,168,243, -128, 10,146, 74,212, 91, 65, 32, 37, 74, 41, 42, 91, 32,227,252,152,234, 9,207, 49, 35, 87,149, 84, 92,140,217, 90, 25, 74, 60, -117, 4, 33, 47,165,213,199,195,201, 42,109,160,129,149,198,144,226,142, 19,206, 49,147,240,163,148,243,105,158,139, 82, 82,138, - 1,113, 92,142, 19,203, 33,183,156,229, 70, 87,204,203,109,242,184,163, 29,174,101,225, 33, 28,203, 82,148,148,148,231, 35, 87, -196, 84,214,134,138,188, 73, 40,112,151,217, 83,209,203,109,180,180,164,252, 94, 34, 22,162,183,100,103, 28,223,168, 83,130,148, -143,136,157, 47, 28,195,190,192, 88, 95,247,119,235,183,190,247,177,191, 77,244, 42,224,209,114, 95, 93,183,232,119,183,196,245, - 29, 59, 16, 63, 12,178,167, 82,117,101,214,158,116,143, 5, 24, 90, 23,206,135,176,149, 30,171, 28,152, 67,133,148, 37, 68,130, - 72, 82,136,233,216,106,111, 20,187,199, 75,216, 78, 31,183,187,123,107, 14, 3, 11,107, 54,178,243,187,194, 90, 57,118, 69, 74, - 29, 37,232,118,227, 17, 80,181, 15, 26, 67,151, 45, 70,140,218, 83,159,252, 98,186,121,105,253,153, 86, 47, 7, 9,115, 32, 43, - 45, 41,124,222, 48,200, 88, 62, 39, 83,200,159,140,117, 57, 42,192,233,231,168,229,253, 33,126, 36,209,101,112,247,183,156, 51, - 81,166, 20,220,123,253,118,139,190,234,105, 14,114,189, 19,107, 54,170,107, 47, 14,101, 54,172, 24,245, 77,192,149, 76,140,166, - 92,229,230,106,223,125, 65, 36, 5, 99,118,157, 26,170,122,122, 52, 39, 85, 75, 0,125, 66,117,118, 29, 62,202, 6, 59,122,116, -190,198, 41,159, 87,166, 83,147,230, 89,163, 16,134,138, 38,100,189,183,152,128,144,169, 29,124,210,178, 41,223, 96, 73,219, 16, -244, 92,153, 82,150,236,202,131,161,234,140,247,159,157, 80,125, 32, 97,234,132,215,151, 38,107,224, 96,116, 92,167, 94, 87,207, -155, 66,172,131,211,207, 61,115,246,127,110,136,115,169, 29,135,115,161, 87,230,174,152,245,239,216,121,254,124,181,105,160, 0, - 11,108, 63, 45,182,199, 34, 42,236, 13,205,207,174,253, 14, 6, 86, 50,113,249, 63, 47,150,135, 81, 10,242,192,235,159,159,204, -250,104,133,250,130, 20, 72,252,244, 26, 21, 71,161, 62,125, 79,223,165, 20, 18, 70, 21,192,234, 32,117,249,224,103,231,246,124, -180, 51,131, 57,234, 1, 4,245,209, 90, 17,194, 14,122,247, 57,199,203,231,165,199, 81,129,129, 85,211,167, 82, 79,115,242,244, -199,166,116, 42,200,207,108,117,199,219,215,207, 68,185,242,238, 7,159,111, 95,223,160,150, 79,126,152, 61,193,243, 61,127, 63, -118,148, 65, 97,210,247,249,255, 0, 92, 12, 82, 36, 2,122,129,247,254,255, 0, 61, 45, 81, 95,235,119,242,252, 62, 95,159, 93, - 45, 31, 3,108, 86, 29,251,103,229,162, 52, 42, 87,219, 61, 15,145,199, 76,131,229,170,129, 68,158, 94,108,116,207,111,159, 94, -190,189,244, 71, 2,221,108, 70, 14,195,173,190, 63,195, 7, 54,123, 21,125,223, 63, 67,162, 7, 95, 35,246,121,232, 38,240, 58, -100,147,243,252,247,254,173, 22,149,245,244, 62, 94,126, 95,102,146,193, 58,116, 56, 41,161,203,212,156, 99,200,252,243,216,104, -214,200,243, 0,253,248, 39, 64,165, 89, 29,191, 17,231,231,131,157, 86,108, 20, 44,168,172, 16,172, 1,159, 47,179,238,210,109, -233,109,135,242,198,113,112, 10,193, 1, 67, 4,249,129,223,237, 35,243,215, 68,167, 3,168,200, 39,161, 29,191,102,122,118,208, -169, 81, 32, 12, 12,140,119,237,140, 1,140,143, 60,232,128,172,100,156,100, 96,228, 96,147,246, 99,229,253, 58, 79, 24,193,141, -168,119, 61,113,211,239,233,131,248,104,132, 28,224,245, 56,235,243,233,235,143, 45, 0,133,103, 3,168, 4,250, 14,255, 0,105, -213,126,108, 17,133, 41, 57,207,234,250,255, 0,195, 72, 55, 94,183,198, 45,251,240, 96,194,212, 65,206, 15, 99,156, 99,167, 83, -223,166,178,107, 86,133, 46,228,174, 83,168, 84,230,131,242,231,203,102, 43, 41, 89,195, 69,215, 20,122,190,224,255, 0, 37, 29, - 13,165,110, 56,175,230,182,210,136,235,140,226,141,149,172,148, 40,242,164,140,243, 0,115,229,231,167, 83,107,106,201,163,215, - 27,102, 59,168,106,161, 80, 68,168, 17,165,168, 14,120,254,244,202,121,148,223, 55,119,212,203,110,165, 63, 53,159, 44,231, 74, -177,164,138,154,105, 34, 0,200,138, 72,248,250,159,147,183, 77,240,231,146,208,195,153,231, 25, 94, 91, 81, 57,166,167,174,158, - 24,157,199, 85, 87,117, 86, 43,125,181, 16,108,183,219, 81, 23,218,248,222,138,101,205,111,109, 53,188,139, 14,206, 6, 92,185, -106, 97,219,158,165, 20, 33,169,181,218,147,105,229, 75,211,229, 39,172,106,107, 74, 42, 76, 88,249,229,105,177,148,165, 78,169, -197,168,202, 52, 58,189,201, 45,107,152,251,134, 43,136,241, 26,136,133, 56,212, 96, 73,206, 22, 82,160,183,187,255, 0, 56,129, -159,230,233,172,181,109,231,101, 77,113,174, 96, 84,151, 11,234, 90,143, 58,214,238,114,165,184,181, 28,173,106, 39,185,234,115, -211,167, 77,109, 61,163, 22, 44, 22, 27, 91,137, 83,171, 74,128, 82, 1,207,234,158,188,201, 56, 29,255, 0, 15,232,173, 43,102, -142,152, 57, 86,230,207, 39,153,152,245, 98,109,185,219,238, 30,131, 97,176,176,238, 92,135,135, 96,160,165,130,158,154,139,217, -233,169,194,164, 80, 40,217, 20, 91,173,247,102, 39,119, 98,117, 51, 18,204, 75, 18,113,157, 88, 27, 77, 6,162,243, 10, 91, 45, -173,210, 17,204,134,249,192, 79, 80, 63,214,237,246,249, 13,116,123, 98,182, 58, 4, 74,205, 30,167, 79,136,195, 21, 8,242, 27, -109,110,132, 5, 41, 73, 87,235,167, 43, 4, 56,130,140,228, 96,131,208, 99, 90,225,182, 40, 67,142, 48, 16,148,176,211,139,108, -165, 13,164, 41,196,146, 1, 0, 28, 0,122,103,200,227, 93, 65,218,186,205,175,107,194, 23, 45,203, 58, 29, 22,218,182, 96, 72, -174,220,149,170,131,237,177, 22,155, 74,165,199, 84,185,211,101,200,116,132,182,210, 35, 52,242,142, 78,112,156, 0, 78, 6,171, - 12,238,173,234,222, 88,228,156,164,106, 9, 35,215,160, 2,195,177, 61,189, 58, 92,224,103,185,230,105,150, 32,167,167,102, 26, -193, 82, 7,165,183, 6,219, 90,219, 1,190, 56,205,197,103,181,207,127,173, 13,203,184,118,215,133,170,141, 31,104,108,203, 18, -227,169,219,114,110, 38,173, 59,114,175,120,222, 85,138, 12,199, 41,181,154,156,153, 53,154,123,241,232,148,133, 84,163, 74,110, - 60, 86, 88, 82,220,105,176,227,238,146,190, 68,232,182,233,123, 64,184,141,223,154, 60,154, 6,249, 57,181,123,167, 78,146, 84, -227, 18,107,187, 67, 98, 81,110, 42,116,165, 0,145, 34,159,117,218,148,120,114, 99,114,227,163,101, 42, 70, 84,115,229,173, 86, -221,155,170, 61,231,185, 27,133,121, 69, 66, 4, 43,174,251,188, 46,104, 37,150,148,210, 87, 78,184, 46,106,173, 86,152,226, 26, - 95, 86,138,160, 76,140, 84,147,241, 37, 74, 32,128, 65, 26,194,202,138, 27, 72, 66, 66,146,164,249,147,216,250,231,207, 87, 69, - 31, 7,240,224,142,134,170,163, 33,165,108,202, 5, 70, 19,180, 17,154,132,144, 1,186,205,167,154,132, 27,219, 75, 46,158,139, -101,216,113, 46,113,196, 25,150,101,152,213,213, 75, 88,211,164,146,185, 69, 33, 74, 4,212,116, 0, 45,109,150,194,253, 77,174, -196,146, 78, 25, 29,226, 14, 57,121,205,113,232,130, 3,142,211,225,184, 35,161,210,251, 60,158, 24,194,153,113, 74, 39,194,232, - 48, 51,240,246,211,245,236,251,162,194,185,248,143,179, 45,121, 83, 19, 21,250,213,203,107,181, 9,165, 71,118, 87,191,186,213, -102, 27,130, 3, 81,152, 66,148,243,239, 41, 41,105, 3, 24, 5,238,101,124, 41, 58,101,247,161,159, 22,181, 69,168, 39, 42,110, -109, 13,166,193,234, 48,228,124, 36,164,245,239,145,174,129,251, 9,174,186, 5,165,237, 66,225,233,203,134,153, 75,169,179, 93, -122,232,183,105,102,171, 29,185, 77,211,107,245, 27,114,161,245, 77, 90, 19,110,130,148, 84,153,121,149, 6, 86, 70, 82, 94, 37, - 63, 16, 4, 76,106,145,166,225,202,216,163,115, 19,154,118, 0,141,244, 17,182,175, 48,111,179,107,216,131,211,124, 55,240,245, - 50,102,121,237, 29, 36,238, 33, 74,218,128,140, 64, 27,115, 13,172,189, 64, 38,246, 91,130, 3, 17,112, 70,216,253, 60,108,203, -170, 61, 38,218,163, 69,169,210,215, 6,123, 52,168, 12, 42, 18, 30, 74,149, 13, 45,197,109, 30, 2,136,232, 84,156, 96,142,195, - 24,211,173, 99,205,135, 95, 67,163,195, 82,216,105,226,174, 71,124,148,149, 2, 51,235,129,141,105, 44, 90,227,175,203,110, 58, -159, 60,234,145,200,227,139, 86,113,133,225, 74, 81,201,236,156,159,187,231,170, 28, 4,113, 50,246,254,220,188, 78,211, 27,167, -174,157, 67,217,253,200, 98,198,160, 62,226, 84,149,213,154,110, 59,134, 85, 65, 74, 80,193, 38, 67, 46,128,145,156, 36,167, 56, -206,171,117,160,130,138,122, 97,237, 82,206,210, 2,164, 74,193,245,233, 0,234, 42, 2,170,144,127,100, 1,189,173,233,213,116, - 57, 94,103,152,229, 89,246,102,140,213, 17,228,201, 12,179, 73, 36,128, 58, 9,234, 18,153, 52, 40,182,162,210, 72,183, 8, 0, - 85, 5,141,128, 24,234, 84, 22, 97,190,160,211,140,160, 37, 73, 9, 37, 39,151, 35,203, 4,118, 61, 53,114,153, 78,153, 71,107, -235, 40, 14, 61, 50,158,222, 60, 88,104, 36,186,207,108, 43,161,248,155, 29, 63, 29, 97, 20,201,202, 47,103,152,116,235,202, 79, -126,158, 94,167,229,242,211,203,110,200,247,142, 86,186, 45, 43, 28,139, 74,199, 69, 36,140, 40, 28,142,185,211,232,142, 26,149, -210,124,143,250,172, 54, 32,246,233,212,123,143,108, 87, 57,193,168,203, 88, 74,126,186, 30,174,140,110, 24, 27, 95,115,186,183, -163, 11, 88,251,182, 38, 90,149,147, 81,103, 43,113, 42, 36,101, 41, 4, 97, 63,236,131,246,106, 57,159, 74,191,116, 98, 90,254, -207, 59, 39,109,189,229, 13,212,183,107,126, 44,232,173, 70, 10, 79,139, 34,151,103,194,170,220, 21, 37, 33, 4,228,182,151, 83, - 3,152,129,211,196, 79, 81,158,178, 30,102,146,109,219,145, 41, 96, 40, 65,169, 43,197,142,145,209, 8,117, 68, 7, 25, 3,237, - 80, 32,127,181,168, 24,253, 41,190, 42,105,187,177,198, 54,217,240,225,110, 85, 81, 54,139,195,101,145, 34,125,214,152,206, 7, - 99,181,184,187,128,182, 37, 59, 9,124,170,199,189,197,183, 98, 83,146,176,122,161, 83, 8, 58, 74, 58,202,145, 17,201,101, 26, -102,168,170,131, 88,244, 90,105, 22,173,158,223,176,226, 5,136,155, 90,243, 32,234,192, 98, 1,158, 71, 76,139, 85, 95, 79,189, - 36,176, 18,155, 91,205, 48,228,232,235,246,147, 91,189,183, 39,148,198,196, 2,113, 23,105, 12,224,142, 92,114,128, 57,115,230, - 60,193, 31,158,218,166,220,116, 96,148,167, 35,185, 0, 30,135,231,131,219, 70, 58, 91,112,228,147,129,219,200,129,212,245, 26, -163,239, 1,162,164,182, 58, 16, 2,148, 48,123,246,233,248,234, 69,123,110, 78,199,253, 49, 95,238,192, 91,182, 41,184,218,146, -112, 2, 85,145,205,128,115,240,232,117,175,166, 2,185, 84,122,144,123,252,146, 48, 58,249,126, 26,246,165,183,205,207,226,242, - 41, 68, 0,146,160, 57,188,186,141, 8,236,164,182,248, 10, 66, 79, 40,192, 24,234, 78, 51,205,246,235, 5,182,178,131,140,233, - 61,206, 62, 37, 37,100,130, 84,143, 85, 20,247,251, 9,215,196, 52,218, 22, 28,108, 23, 20, 73, 10, 73, 32, 16, 58,117, 3, 29, -117,111, 83,203,146,247, 41,116,161,190, 96,162,140,245, 64, 79,113,246,247,209,173,134,220,112, 58,130,174, 68,156, 21, 96,167, - 56, 29,142,124,186,235, 23, 38,226,214,237,108, 24, 0, 8,223,231,108, 84,202, 80,181, 45, 75, 37, 10,236,140, 14, 84, 19,208, - 21, 19,249,206,145,240, 91, 89, 35, 4,168, 2,181, 39, 36, 1,143, 63,207,219,175, 14,180,248, 91,135,225, 44, 44, 19,203,230, -113,158,202, 35,190,147, 72, 75,188,184, 10, 97,180,167,149, 94,101, 68,116,193,200,235,219, 67,113,176,234, 62,253,255, 0,241, -140, 88, 27,158,199,247, 99,223,138,128,176, 16, 74,202,192,200, 64,234, 51,216,159,151,174,144, 56,112,168,255, 0,226,210, 65, - 39,211,169,193, 30,191,219,161,201, 91, 97,101, 11,229, 33,124,169,112,164, 97, 67, 25, 41,193, 29, 62,221, 18,149, 30, 64, 28, - 41, 83,138,201, 81,233,203,131,211, 7,167, 95,158,178,160,129,238,248, 99, 4, 11,219,211,111,159,187, 23, 91,122,216,174,223, -151, 45,171,103, 91, 30, 48,173, 94, 23, 45, 2,211,161,169,134,124,101,166,185,117,214,160,219,116, 71, 18,206, 63, 72,148,213, -170,176,202,135,110, 84,156,234,116,188, 70, 90, 86,214,200,237,141,191,195,253,145, 22, 45, 26,196,217,203, 30,212,219, 59,118, -140,216, 15, 52,105,182, 85, 52,210,220,144,228,146, 7,188, 57, 58,187, 14,173, 81,121,213,101,199,100, 86,221,117,213, 5,175, - 81, 5,246,122, 41,151,120,231,225, 49,165, 45,167, 25, 70,253,237,171,138,109, 68, 6,138,152,185, 35, 72, 66, 58,164,128, 60, - 86, 81,140,142,248, 24,212,167,184,174,185,213, 80,146,133, 73, 46,189, 42,116,101,176,243,171,116,136,206,165, 92,181, 24,242, - 29, 66,122, 56,175,137,244, 12,128,174,102,202,115,202, 19,170, 83,197, 9,101,168,206,184,107, 46, 36,242, 99,215, 57,177, 27, -176, 33,119, 7,246, 0,242,159,241,145,183,126,148,250, 56,229,176,205,157, 87,230, 36, 3, 52, 82, 67, 18,237,186, 42,142,113, - 96, 78,222,114, 22,253,238,138, 65,198,134,236,221,125, 48,227, 85,230, 51, 33,182, 20, 46,139,193, 78, 71,146, 11,172,173, 49, -107,213, 39, 22,218,176, 65,104, 45,181, 17,240, 28,231, 10, 57,192,214,224, 91, 87, 56, 52,186,124, 87, 37, 60,195, 17, 27,114, -181, 86,168, 52,165, 33,208,211,232, 84,135, 35,180, 82,172, 45,194,149, 57,206, 62, 17,225,181,156,149, 19,174,110, 88, 21,191, -119,114,244,165,183,202, 67, 27,155,118,199, 87, 58,178, 4, 89, 50, 96,212,208,176,140,117, 30, 4,208, 18, 6,122, 47,168, 24, -193,216,148,220,233, 17, 19, 8, 58,234,126,185,152,195,115,214,218,208, 94, 77, 49, 13,178,244,133,248,196, 0,223,193, 29,180, - 33, 36,116, 68,133,242,242,101, 71, 81,250,188,185,106, 15, 67,113, 99,239,183,107,245,232, 9,183,107,219,224, 58,227, 63,165, -142,190,158, 48, 77,158,254, 98, 55,217,118, 36, 14,246, 5,200, 7,112, 64, 22, 35,166,219,210, 47,185, 82,233, 80,131,107,114, - 60,217, 83, 30,159, 55, 1, 97, 10,126, 99,143, 59,200, 93, 39, 36,248, 79, 52,216, 74,146, 85,208,149, 28,227, 87, 58,150,229, - 67,154,202, 4, 96, 35, 72,171, 77,110, 44, 73,100, 36,180,229, 58,157,136,136, 91,136, 10,230,111,157,193, 37,215, 17,208,101, -244,168,228,117,214,181, 64,187,158,122, 93, 82, 99, 15, 54,251, 37,214,153,128, 31,117, 72,105,199, 39,177,225, 23,146,164,156, - 48,194, 20,135,157, 91,128,140, 41,148,243,100, 17,156, 82,117,230,220,185,110, 46,150,234,204, 86,210,213, 38, 18,207, 68,178, -246, 20,194,221,232, 57,159, 45, 69, 67,133, 75, 72, 8, 74,217, 4,243, 28,107, 65,114,134, 28,192, 19, 72,150,215,216,116,216, -247, 29,143,240, 35,215, 20,246,103,146, 44,245, 78,252,176,174,237,171, 80, 54,208, 8, 14, 67, 30,182, 4,169, 0,130, 8,141, -150,215, 27,108,165, 82,240, 65, 91,130, 60,226,182,132,167,101,192,151, 29,238, 83, 25, 20,197,120, 81,158, 74,218, 87,253,240, - 30, 74,156, 5, 56, 40, 82,144, 70, 78, 52,237, 90, 94,211,206, 31,238, 61,215, 87, 13,251,187,120,211,246, 99,125,216,166,219, - 53, 27, 46, 70,225,213,169,180,173,188,223,218, 29,126, 20,116,211,238, 11, 14,254,117,214,224,219,183,114,235, 2,165, 77,157, -110,215,151, 5,255, 0,172, 41,143, 26,124,233,201, 95,132,215, 47,235,155,134,253, 49,169,137,139, 33, 17,217, 13,120,112, 82, - 15, 49,240, 35, 44,163,195,112,169, 32,252,110,120,100, 14,255, 0, 6, 84, 78,117,197,111,105,134,220,238, 93,231, 65,219, 45, -247,167,109,213,197, 90,217,251, 58,155,114,237,149,225,186, 16,105,102,169,111,209,111, 26,133,206,237,223, 6,220,186, 37, 68, - 46, 57, 71, 74,105,117,120,239,199,126, 99, 76,195, 90,234,170,101,153, 10,125, 14,182,139, 3,128,178,227, 14,113,200,102, 49, -197, 94,146, 41, 26,186, 58, 14,100, 76, 1, 54,102, 4, 50,105,239,205,107, 48,109,241, 25,226,106, 58,222, 29,225,154,236,230, -154,152, 85, 54, 88,209,177,136, 41, 60,216,218,101,137,193, 42, 24,198,232,143,175, 85,138,168,137,139, 93, 73, 6,112,183, 37, - 78,163, 2, 75,208,150,135,161,212, 82,216,153, 17,169,141,173,151,176,166,195,172,115, 50,232, 25,142,243, 42,192, 88,248, 20, -135, 67,169, 82,146, 1,214, 30,110,102,229, 6,164, 37,229,248, 15,167,153, 14, 21,167,199,131, 45,149, 41,178,218,193,232,133, - 37,208,234, 20,133, 14,138, 74,146,161,200,172,136, 53,240,131,237,106,226,159,133, 24, 84, 59, 53,218,219, 59,239,178, 52,133, -176, 33,109, 62,233,213, 42,115, 87,110, 83,210, 19,207, 27,108,183, 21,133,187, 86,176, 89, 90, 16,222, 98,161, 83,232,235, 9, -248,233, 74,207, 48,145,223, 13,254,212,238, 15,184,152,159, 78,162,209, 47,183, 54,118,249,175,188,219, 14,237, 94,249, 74,164, -218,245, 37, 92, 79,169, 49, 99, 27, 63,112,216,112, 91,183,164,105,106, 74, 80,226, 84,253, 38,123,107, 83, 14,125, 94,162,183, - 66,108,186,204,183, 48,166,102,149, 71, 62,156, 30,169,168,233, 30,174,159,105, 0, 23, 14,192, 50,168, 43,245,131, 77,196, 95, -135,248,215,135,243,244,142, 40, 42,125,147, 48, 63,251, 60,246, 73, 9, 31,170,141,253,220,164,236, 80, 35,107,102, 86, 28,176, - 93, 65,235,149, 54,227,231, 82,252, 98,143,120,111, 30, 50, 3,153, 10, 74,242,148,190,207, 95,141,149, 1,219,201, 64,160,158, -157, 92, 10, 45,120, 41, 72, 30, 42,210,211,129, 60,138, 36, 39,194, 40, 56, 9,201,199, 34, 15,194, 82,125, 71, 47, 98, 51,173, - 78, 57, 42, 4,150,225, 74, 68,136, 85, 24,204, 38, 66, 27,148,194,153, 91,140, 60,112,210,188, 53,165, 42, 92, 71, 18,144, 65, - 31, 2,199, 43,141, 41, 93, 9,204,232,245,213, 45, 41,192, 82, 28, 24, 15, 5,245, 67,125, 1,240,211,143,214, 37, 36, 97, 93, -148, 8, 56, 7, 58,212, 89, 53, 45,155,126,155,250,244,189,247,220,131,214,195,222, 7, 80, 36, 83, 0,111,109,143, 66, 55,176, -233,219,176,244,244,232,113,182,208,103, 41,109, 2,130, 8, 28,170, 10, 7, 24, 72, 25,194,155, 35,170,130,179,216, 16,115,215, - 3, 58,111, 43, 10,114,143, 57, 62, 8, 83,116,247,138,158,104, 35, 42,247, 7, 50, 75,237, 35, 36,226, 62, 87,206, 17,241, 16, - 21,132,140, 32, 1,125,182,231,180,168, 76, 58, 9, 40, 84,116,130,133, 30, 98,133, 5, 4,164,144,145,213, 29,122,131,213, 61, - 0, 36, 29, 13,118, 6,157,142,165,164,161, 74, 66,131,137, 36, 16, 75,137, 11,198, 66, 58, 1,225,133,117, 7,177,199, 76,105, -179, 52,167, 21, 20,206, 20, 94, 88,188,203,247, 14,159,247, 13,175,219, 99,141,204,138,188,229,245,233,172,222,154,164,132,144, -123,143, 71,223, 96, 84,155,244, 59,106, 94,135,127, 84,218,177, 40, 8,109, 77,171,152, 21,173,176,163,224,169, 71,153, 72,125, - 10, 73,232,160, 71, 80,122,228,147,140,224,235, 37,102,160, 10, 82,164,185,132, 45, 57, 74,215,202,149, 96,228, 37, 5, 93, 73, - 30, 65, 68,115, 96,128, 73,233,134, 98,157, 41, 13, 56, 75, 78,101, 30, 32, 41,200, 60,139,109,106, 31,174,223, 79,137, 36, 30, -189,207, 76,140,117,214, 72,221,101, 45,182,162,165, 36, 32,100,243, 41, 75, 81, 70,115,204, 0,245,193,235,219, 60,157,117, 24, -134, 67,166,254,131,225,214,223,195,240,185, 63, 9,141,122, 6,118, 85, 58,239,247, 92,246,191,191,212,255, 0,166, 51, 26,229, -207, 71,161, 82,171, 21,250,253, 86, 21, 10,222,160,210,170, 53,218,245,110,162,164,183, 78,161,208,104,176,228, 85, 43,117,153, -206, 45, 73, 9,137, 18,151, 18, 91,238,228,225, 72,142,160,158,165, 57,252,241,248,236,226,198,175,198,143, 19,187,139,190,210, -211, 34, 37,167, 54, 67, 54,134,209, 80, 36, 40,149, 91,187, 67,106, 59, 42, 29,153, 29,224, 82, 63,247, 86,123, 78,203,172, 84, - 21,128,163, 54,224,117, 10,232,210,117,219,143,110, 55, 31,168,247, 9,220, 13,237, 45,117,106,153, 60, 65,155,196,245,118,153, - 33, 73,250,186,148,129, 22,167,110,108,123, 50,218, 88,204,249,174, 8,181, 59,157,180,158,102, 99, 49, 2,144,247, 42,222,154, -216,140, 58,201, 42, 87, 55, 92,245, 24,242, 62, 93, 51,208, 99, 86, 23, 10,101,174,168,115, 74,133,179,204,161, 98, 4,110, 35, -184, 38, 79,255, 0, 83,109, 63,224, 1,129, 34, 76,115,135,139, 28, 75, 29, 69, 68,124, 51, 69, 46,168,168, 95, 93, 91, 41,184, -105,192,178, 67,126,252,133, 36,200, 55,250,214,208, 64,120,119,164,226,207, 66, 6, 58, 99, 61,253,127,110,168, 40,146, 14, 79, -145, 3,176,234,117,236,175, 32,140,119,245,254,173, 14,178, 50, 7,166,115,251, 53, 54,197, 56, 6,195,215,223,143, 26, 25,222, -163,190,112,127,103, 95,199,190,136, 80, 4, 28,249,117,233,242,208,171,236, 62,223,191, 74,170,144, 55, 30,252, 27, 3,172, 12, - 19,233,219,241, 26, 21,194,122,100, 96, 15, 50,122, 99,167,203, 68, 45, 88, 7,168,198,127, 12,119,207,207, 39,246,104, 39, 14, - 65,238,122,244,207, 92,117,243,209,240, 49, 73,194,122,158,135,167, 78,221,191,225,160,214, 70, 49,230,127,175, 85,214,124,179, -246,254,237, 12,162,115,131,131,230, 15,203, 74,168,176, 3,231,255, 0, 56, 24,164,161,156,124, 57,251,241,165,175, 42, 81, 4, -128,123,105,104,248, 61,215,161,234, 61,195, 9, 4, 17,131,140,142,223,159,183, 85, 65,193, 7,254, 56,208,233, 56, 57,252,117, - 84, 28,245,242,237,243,207,245,104, 16, 14,221,176,115,176,176,216,246,251,173,130,144,113,212,117, 31,209,147,251, 52, 64, 81, - 7, 3, 57,199, 92, 12,227,237,208,169, 35,151, 56,237,220,122,227,174,171,161, 97, 64, 96, 17,233,247, 31,233,206,144, 35,125, -251,225, 50, 15,218,181,186,127, 44, 28,217, 61,137,207, 79,219,211, 69,160,115, 4,228,115, 96,228, 12,227,183,110,191,142,129, - 66,176,164,143, 53, 1,246,117,209,136, 61,199,167, 81,162,144, 13,182,219, 5,193,232, 56,201, 61,187,103,231,233,170,157, 57, -128,201,237,219,190,122,158,195, 61,244, 58, 14, 70, 85,219,229,220,254, 78,137, 78, 6, 9,248,142, 58, 30,199,229,215, 73,176, - 32,251,176, 49, 85,178, 80, 71, 49, 24, 29,179,128,122,159,234,206,170,161,228,172,227, 5, 63, 51,208,106,130,129, 57, 36, 12, - 43,246, 12,103,250, 53,245, 33, 41, 28,169, 39,168,200, 39,169,243, 62,154,215,113,110,214,192,193, 69, 75, 80, 41, 11, 40, 72, -242, 79,235, 44,117,198, 14,142,138, 84,193, 74,208,181,165,208, 82,164,172, 44,165,214,212,133, 5,182,227,107, 79, 84, 56,149, - 0, 82, 71,108,122,116,213,184, 21,116, 32, 12, 36, 16,175, 92,121, 99,240, 58, 41, 11, 82,192,198, 50,156, 1,158,159,143,207, - 73,144, 8, 32,238, 14, 5,200, 32,131, 98, 8, 32,251,198,227,247, 28,108, 53,141,190,213,107,108,134, 43,180,182,171,204,124, - 41, 19, 35, 60,136, 85, 18,145,128, 11,205,175, 13,186,160, 60,210,164,149, 28,156, 13,108,141,181,197, 54,220, 70, 82,197, 66, -151,116,195,121, 72,202,146,221, 49,185,109,229, 32,244, 75,141, 75, 60,221,199, 95, 93,115,201, 4,164,124, 94,189,207, 82, 7, -168,253,186, 37,176, 66,144, 22, 84,164,142,169, 32,227,161,236, 8,243,244,251,245, 28,174,225,188,174,181,153,164,137,162,103, -235,203,114,160,244,191,151,117, 31,114,140, 91,121, 55,141,220,125,147,211,199, 74,107,169,243, 88,225, 80,170,107, 41,214, 89, - 52,139, 90,242,161,142, 87, 35,177,119,115,110,248,235,133,191,199,206,218,219, 45, 52,170,125,157,118,214,229, 55,146,132,186, -136,148,166,213,201,219,244,179,102,224, 18, 71,250,170, 3, 29,180,196,241, 5,199, 86,232,111,197, 1,251, 8, 50,221,147,182, -143, 56,211,211,237, 58, 60,167,100, 74,185,156,140,226, 94,138,213,215, 87, 83,109,251,229, 61,183,144,219,158,226,195,104,140, -227,141,161,111,151,249, 82,145,162, 3,148,130, 92, 5,192, 20, 20,148,231,148, 55,212,227, 4, 14,186, 61,162, 86,176,146,225, - 80, 56,228,194,113,201,219,161,207,235,116, 56,211,117, 47, 5,112,245, 21, 84,117,201, 69,207,170,132,134, 71,149,218, 77, 12, - 8, 33,149, 73,229,134, 82, 46,173,163, 82,145,169, 72, 32, 28, 53,241, 15,138,188, 97,196,116,243, 82,213, 84,195, 69, 77, 80, - 10,200,180,176, 44, 69,212,245, 83, 35, 25, 38, 10,219,134, 85,145, 85,193, 42,192,169, 32,158,135, 75,235,241, 20,165,243,156, -130,149,228,227,191,234,252,191,175, 69, 53,226, 20,169,146, 9, 42, 80, 87, 50,134, 0, 79, 79,192,118,208,142, 44, 52,130, 84, -175,137, 56,248,146, 49,143, 64,122,117,233,170,145,222, 81, 66, 66, 73,248,178, 73, 87, 82, 79,108, 12,246, 29, 53, 36, 61, 54, - 29, 62, 70, 43, 94,183, 35,123, 91,175,205,241,136,238,148, 54,166, 91, 20,250,139, 88, 47,209,166,170, 59,233, 79,254, 76,255, - 0, 80,172, 99,160,230, 39,240, 58,198,120,103,221, 57,187, 25,196,150,199,238,244, 21,134, 94,176, 55, 62,210,175,186,181, 28, - 15,112,143, 87,142,138,146, 84,113,217, 84,215,101, 39,255, 0,165,167,117,218,108,106,205, 62,177, 68, 90, 2, 93,157, 79,120, -165, 71,245, 68,134, 82, 86,218,243,228,123,254, 61,245,167, 85, 38, 11,109,188,210,135,233,152, 91,140,184,160,122,120,145,212, - 83,145,142,255, 0,171,251,117,187, 66, 18,104,170, 41, 36,251, 18,234, 83,255, 0, 68,162,196,254,253, 93,251,227, 20,149, 82, -101,249,133, 45,100, 91, 73, 4,145,202,189, 62,212,108,174, 63, 16, 49,250,180,211,238,200,245, 37, 67,171,211,156, 15,194,174, - 65,129, 89,167, 45, 4, 20,189, 10,173, 21,153,145,214,133,121,160,178,242,122,249,231,190,180,239,217, 89,188,242,168, 28,101, -113,223,195, 53, 74,165, 21,248,241,110,200, 59,151,105, 48,148, 54,212,150, 99, 85, 66, 25,171, 70, 90,211,133, 72, 8,121,198, -149,215, 37, 35, 61,129,214,138,112,241,237, 18,181,246,247,217, 85,195,199, 23, 55,221,185, 92,188, 87,110,170,222,216,155,158, -135, 70,113,168, 85, 74,133,213, 66,154,237,182,137,209,228,212, 2, 90,247, 81, 18, 12,119,150,178,172, 40, 40,165, 36,172, 99, - 92, 76,225,195,218, 43,112,108,191,180, 68,241,163, 87,137, 53,218, 13,213,121, 85, 13,251,109, 69,117, 79, 59,252, 93,220,210, - 61,214, 85, 57,148,140, 9,179,169,240, 12, 87, 90, 24,253, 35,176,207, 39, 85,140,213, 94,201, 95, 89, 89, 81, 50, 68, 88,229, - 41, 44, 77, 97,114,211,137, 33, 50, 70,130,251,177,141, 24, 11,126,210,130,124,216,234, 92,247,139,178,110, 30,135,135, 86, 26, -240,171,156,212, 69, 53, 68, 96, 18, 70, 89, 60, 14, 18, 89, 46, 45,161,102,104,166, 0, 18,247,167,107, 0, 6,255, 0,166, 5, - 42,103, 57, 65, 82,185, 64, 32,133,247,194,134, 58, 28,253,191,183, 79,189,167, 40,130,133, 15,136,130, 15, 48,207, 92,244,234, - 62,127,191, 90,215,182,213,122, 45,249,108, 90, 55,197,175, 49, 85, 11, 94,248,160,211,110, 91,114,123,145,228,195, 92,170, 77, - 82, 51,114,163, 41,232, 51, 90,109,232,174,134,220, 0,165,196, 37, 67, 29,181,181, 22,173, 32,176,218, 22,172, 0, 58,144, 15, - 48, 35,161,232, 51,211,182,149,165,204, 0,210,250,182, 96, 8, 55,216,131,107, 17,234, 8,177, 7,208,223, 12,252,106,244,209, - 69, 44, 79,229,112, 89, 74,158,160,131,165,148,142,161,131, 2, 8,234, 8, 32,216,139, 99, 84,189,166, 92, 73, 94, 92, 36,240, - 71,190, 60, 72,109,253,170,139,190,243,218,251, 81,202,181, 6,152,247, 63,185,197,151, 53,246,105,136,172, 84, 2, 7, 50,224, - 67, 84,180,200,117, 35, 4,165,140, 2,158,227,242,123,220, 13,193,188,183,102,246,187, 55, 70,255, 0,174,202,185,175,125,193, -184,106,119,117,217, 95,154,225, 92,154,165,106,179, 33, 82,165,200, 61,127, 70,202, 74,130, 26, 64,248, 91,109,180, 33, 32, 37, - 35, 95,176,103, 17, 91, 65, 79,226, 3, 96, 55,155,100,106, 73,104,195,221, 29,180,188, 44,162,167,194, 11, 49,228,215,104,147, - 33, 65,146,176,160, 71, 43, 83, 28, 97,207,145,107, 58,252,126,111,173,183,174,109,101,223,114,237,205,200,243, 14, 87,172,107, -134,183,104, 86, 21, 21,196,191, 31,235, 27,118,163, 34,153, 41,108, 62,142,143, 50,181,199, 42, 74,135,250,248,242,211,205, 11, - 23,205,103,169,168,185,146,170,158, 46, 83,159, 68,102, 90,132, 67,211,202, 69, 43,202,122,183, 50, 37, 98,121,105,106, 87, 55, - 74,198,201,233,231,141, 79,232,234, 57,204, 82, 16, 6,132,158, 85, 50, 83,153, 27,174,169, 99, 74,129, 10, 55,149, 68, 19,180, -118, 47, 41, 56, 67,100,168,171,151,155, 61, 79, 95, 60,122, 15, 61, 35,130,164,243, 43,195,200,232, 85,144,149, 30,190,103,160, -235,163,138, 10, 81,148,161, 61, 1, 57,207,196, 1,237,229,215, 58,179, 73, 73,100, 1, 32,169,109,175, 10,108,133,117, 65, 61, - 64, 35,211,190,164, 33, 71, 78,184,138, 6, 12,221,108,127,211,249, 99,203,205, 18,188,146,148,164, 30,157,114,114, 49,212,122, -121,235,227,237, 45,212, 2, 7, 84,167,184, 57,230,251,255, 0,214,210,105,196,231,225,201, 72, 78,112, 71,161,193,239,249,235, -162,163, 54,227,231, 9,229,102, 56, 25, 86,126, 37, 18, 58,142,158,154, 26, 64,223,165,177,147,211,115,112, 58,252,252,223, 22, -213, 70,117,150,146,176,201, 81, 88,230, 39, 35,152, 1,253, 61,115,159,248,104,168,146,144,231,232,202,255, 0, 85, 56, 40,229, - 0, 30,157, 78,124,245,114, 83, 5, 65, 72, 11,202,122,142,131, 4, 30,196,245,208, 41,136,220, 55, 57,130, 80,160,172,229, 74, - 5, 71, 24, 57,192, 61,188,255, 0, 13,102,195,174, 10, 13,246,245,219,231,231,243,194, 75,106, 66,138,139,202,121, 62, 73, 39, - 41, 64,244,249,235,195,175,165, 29, 16,164,129,215, 3,176, 10,244,237,242, 58, 13,247, 86, 20,162,210,241,205,219, 9,199, 76, -118, 57,252,252,244, 57,121,183, 22, 18,162,114, 8, 46, 36,167,166,122, 30,132,122,147,160, 1, 61,122,224,218,109,176, 59,124, -252,244,193, 73, 62, 42,249,210,160,160, 6, 10, 58, 4,243,117,237,215,174,169,202,116,144,148,163, 9, 35, 41,232,112, 73, 35, - 26,244,226,149,225, 44, 52,218, 83,202, 50, 6,112, 73, 3,166, 20, 60,186,106,200, 38, 56, 22,159, 25, 41, 42, 74,136,229, 35, - 39,237,230, 7, 25, 25,253,154,205,172, 79, 99,140,129,115,240,254,120,124,184,115,189,156,218,173,243,217,253,196,140,226,154, -114,201,221, 29,189,186,157,144, 2, 28, 76,104,148, 91,202,137, 62,170,234,144,226,146, 10, 19, 71,106,164, 78, 72,192,235,229, -214, 89,252, 84, 79,135, 38,165, 91,167, 64,144,125,222, 21, 90, 83,212,194, 9,203,148,103,102,202,149, 75,147, 29,226,231,198, -199,134,165,180, 86,174, 83,250, 48, 82,145,204,117, 12,134, 36, 32, 58, 89,144,219,141, 68,148, 28, 97,215, 25,112,135,124, 41, - 13,150, 30, 13,148,156,182,191, 13,197,224,142,160,224,143, 93, 73,106,193,222, 9,123,221,195,158,213,110, 37, 84, 5,220,177, -173,145, 99,221,170, 9, 90, 82,245,211, 97, 33,139, 66,186,235,106,113, 41, 18, 89,144,221, 38,151, 80,109,206,169,241,170, 79, - 3,133,165, 68,213,126, 32,229,133,243, 12,131, 53, 81,228,136,205, 3,157,175,169,213, 36,139,223,107, 71, 40,244, 5,135, 82, -109,142,146,250, 55,230, 49,199,158,230,217, 92,205,165,166,142, 42,152,199,111,171, 99, 12,173,241,188,212,235,255, 0,117,239, -229,177,215, 10, 45,116,211,119, 43,112,233,170, 37,182,230, 76,183, 43,177, 16, 48, 67,141,212,104,203,167, 84, 84,210, 85,250, -200,247,186, 39, 42,135, 76,169,127, 17,201, 25,126, 41,181,229, 37, 94,246,130,227,139, 83, 98,158,134,210,180,160,134,139,132, -169, 8,228,234, 57,157, 60,196,119, 33,160, 58, 3,173, 54,220,106,162,232,187,147, 64,173, 32,128,221,114,157, 86,182,101,168, - 2,112,236, 98,110, 58, 71, 42, 0,200, 82,156,139, 85,108,168, 12, 37, 47, 14, 99,215, 89,237, 42,241,122, 42, 89,121,149,120, -143, 68,240,228, 71, 67,193, 97, 42,112, 20,248,104, 82,146, 14, 81,149, 36, 43, 61,130,149,202, 79, 77, 54,154, 98,201, 79, 48, - 93,157, 23,215,245, 64,140,254,242,183,247, 3,113,214,216,234,185,107, 85, 90,190,153,200,103,134, 73, 8,185,181,196,141,207, - 0,122,217, 95, 77,199,166, 54, 18,161, 94,151, 79,143,238,201, 90,156, 74, 11,144,195, 67, 45,167,222,100,242,185, 41,107, 79, - 47, 68,161,128,211, 94, 17, 4,143,139,237,214, 33, 94,188,163, 65,166, 48,194, 95, 91,117, 54,202,144,132, 54,165,128,183, 95, -199,188,184,162,159,133, 33, 12,114, 39, 3,184,113, 99, 62, 90,108,110,125,200,155, 57,192,243,237, 54,135, 98, 37, 65,105,104, -184, 83, 38, 67,170, 74,157,117,106, 82, 65,231, 43, 42, 36,158,164, 28,103,182,152, 91,179,113, 22,203, 82, 31,144,227,141,177, - 29,133, 60,243,188,138,117,126, 27,202,229, 79,134,132,140,173,213,186,224, 64,230, 35, 28,249, 82,146,156,168,109, 83, 80,180, -133, 70,155,131,247,250, 91,173,253,215,233,123,143,190, 31,153,230, 40,116,234, 94, 76,155, 11, 13,199,112,250,136, 0, 48,181, -193, 30,164,142,215, 14, 21,209,121,205, 91,172,198,128, 37,214, 37,203,151, 18,147, 71,162, 69, 74,158,159, 91,173, 84, 31, 76, - 74, 61, 38, 10, 82, 57,149, 46, 76,199,210,132, 36,116, 79,141,204,122, 13, 72,111,103,182,153,253,140,217, 59, 59,105,234,166, - 43,245,214, 40,146,102,238, 75,165,136,243,169,213, 75,230,241,120, 86, 47, 54, 36,211,230,178,227, 21, 26, 75, 53, 55, 26,167, - 24,207,180,236,119, 35,210, 16, 22,218,146,117, 21, 91, 99,137, 58,134,192,111, 54,211,110, 76,122, 84, 42,181,197,100,221,246, -174,224,205,167, 84,216, 19,169,212,123, 66, 37, 89, 42,151, 77, 97,181, 39,195,159,114, 79,128,212,245,169,240, 22,212,111,116, -105, 13,225, 69, 58,152,173,218,236, 42,179,108, 87,233, 14,186,253, 46,181, 6,157,112, 82, 30,120, 56,211,238,209,110, 10,124, -106,204, 5, 62,219,128, 41, 18, 61,194,107, 60,193, 64, 44, 45, 4, 30,186,117,106,119,163, 48,188,177,253, 92,232,116, 31,218, -177, 26,182, 29, 0, 5,108,118, 44, 24,145,181,142, 35,114,231,116, 85,239,152,101,148,181,162, 92,195, 43,146, 35, 87, 18,135, -188, 13, 42, 22,128, 23, 42, 35, 98, 66,200, 24, 35, 57,137,208,164,161, 30,202,120, 41,197,183,177,147, 96, 55,194,117, 82,245, -225,250,163, 11,134,125,197,158,169, 14,206,182,216,166, 75,169,236, 93,114,190,156,248,141,189,108,196, 90,166,237,169,121,196, -181,250,106, 40,147, 79, 30, 49,116, 81,219, 78,117, 26, 30, 33,248, 90,223,142, 22,238, 53, 90,251,235,183, 21, 75, 77,169,146, -228, 66,162, 92,232, 13, 87,118,250,239,240, 22,241, 75,150,189,233, 78, 11,167,214, 10,153, 99,198, 17,203,141,204,109,181,161, - 79, 69,104,144, 53, 62, 58,210, 27,142,235,239, 21,135, 25, 12,160, 78,108, 32,130, 2, 20,150,218,156,215,108, 60,148,173, 41, - 88, 7, 42, 65, 24, 28,201, 25,193,174,203,122,131,116,219,213,139,110,241,182,232, 55,173,161,112, 70, 84, 43,170,207,186,169, - 84,234,253,183,113,211,152,109, 97, 46, 84,104,245, 86, 28,142,237, 70, 59, 5,226,196,128,132,200, 66, 22,182,154,125,146, 80, -180,201,178,222, 38,170,167,211, 29, 71,246,200, 86,223,104,218, 69, 29, 1, 87,177,189,186,233, 96,214, 30, 85, 40, 0, 56,170, -184,143,195,156,143, 60, 18, 84, 69, 23,232,156,193,247, 18,194,160, 70,237,183,247,176,221, 84,146, 79,219, 83, 27,110, 29,203, -146,109, 13, 30, 23, 61,163, 28,100,240,219, 38,149,107,237,182,228, 73,189,236,148, 58,150,218,218, 61,216, 67,151,221,136,166, -144,210, 25,240, 41, 6,169, 45, 53, 11, 53, 66, 58, 57, 80,186, 76,248, 97,190, 98,160,218,142,164,109,178,158,214,237,167,175, - 65,161,127, 41,109,181,191,248, 74,174, 85,212,196, 72,247,141,118,159, 86,189,184,118,184, 38, 56,243,200, 67, 20,205,205,163, - 65, 92,187,103,244,108,243,134, 42,113, 37,120, 42,121, 41,114,160, 80, 84,117,167,220, 73,251, 19,182,242,247,150,245,217,194, - 29,220,173,162,186,165, 45,185,180,237,176,187,166,214,235, 27,115, 85,154,242,203,141, 53,105,221,169,247,138,213,131, 33,111, - 58, 60, 24,243, 19, 85,132,218, 80, 19,227,198, 71,195,173, 7,218,190, 57,120,161,246,121,238,117,107,135, 46, 42, 54,246,212, -222,125,182, 66,215, 76,220,221,149,190,133,155,115,191, 81,182,165,170, 84, 41, 82,173,155,198,146,212,216, 50,159,240,155,121, -200,241,235, 44, 76, 97,206, 80,135,152,140,178,151, 90,121,170,146, 44,222, 17, 46, 79, 77, 21,101, 90,144,210, 68,210, 26, 90, -141, 23, 26,157, 24, 36,177, 72,226,224,221,193, 66, 60,166,100, 39,106,230,105,184,247,129,158, 20,172,144,102, 25, 56, 96,130, - 73, 11, 77, 13,172, 72, 85,114, 4,208,176, 63,238,220,198, 0, 12,193, 90,219,205,107,111, 55, 22,222,185,109,106, 77,203,105, - 92,212, 27,170,209,172,183,227,209, 46,123, 90,179, 79,185, 45,186,219, 47,160, 44, 55, 78,175, 80,230, 63, 25,215,130, 20, 20, -227, 72,116,188,206, 64,121,180, 19,141,103,175, 87,204,134,148,133, 47,152,148,124, 42, 90,135, 81,202, 0, 79, 42,142, 57,128, -233,159,246, 64, 39, 57, 58,138, 47, 16, 27, 71,120,112, 95, 98,211, 61,164, 94,203, 13,207,174,217,124, 50,238, 29,187,102,110, - 70,229,240,243,119,189, 42, 85,155, 77,162,222,245, 72, 16, 41,117, 22,108,155,169,231, 90,184,109, 7,235, 46,162,151, 58,152, -243,203,175,208,101,130,245, 6,171, 58,144, 89,145, 18, 68,155, 3,127,214,247,155, 98,118,115,120,231, 91,109, 90,114,247, 99, -108,236,173,194,145,108,177, 83, 77, 90, 45,188,253,219, 67,139, 87,122,147, 14,164,243,190, 44,248, 45,185, 37, 98, 59,143,101, -242,194,155, 18, 15,188, 7, 73,143,214,196, 35,167,138,170, 9,185,212,211, 51, 37,153,116, 75, 28,128, 41, 49, 75, 29,205,152, - 95,170,150, 83,177,218,235,123, 43,134,115,213,207,218, 72,189,141,233,170,169,213, 93,148,221,209,145,142,149,120,220, 40,189, -200,177, 4, 41, 27, 0, 8,185,198,215,109,149, 22, 37,219,112, 75,167, 73,165, 92, 21,191,118,183,110, 26,195, 20,107, 85,228, - 68,174, 84,165, 82,105,206,202, 98, 44, 87, 92,162,212, 48,165, 45,180,169,192,152,142,168,161, 4, 36, 36,229, 99, 64, 56,226, -223, 77,219,218,203, 74,243,176,184,111,131,100,212,184,131,106,210,106,188,182,174,237,198,176,104,236,108,117, 26,191,107,238, - 45,231, 67,159,114, 83,238, 42,188, 53,220, 59,203, 46,201,218,125,206,169,219, 54,146, 99,166,100,164,216,146,234, 18,227,161, - 2,157, 2,167,204, 14, 62, 61,170,123,199,195,134,245,239, 23, 13,187,105,102,194,182,165, 83,246,238,171,105, 84,183, 81, 53, -244,170,245,137, 87,220,107, 45,183,233,117,187, 54, 41,166, 73,133, 64,143, 76,250,217,135,130,156, 67,211,229, 61, 20,165, 50, - 32,160,164,235,150,155,127,199,229, 2,218,166,220, 17, 47,141,155,184,239,201,213, 27, 39,106,105,180,122,212,125,229,250,134, -170,214,227,109, 78,199,111,230,200, 68,190,174,249,149,109,181,172,187,121, 82,106, 16, 56,129,184, 42,147, 41, 97,218,124,229, - 79,183,224, 36,215,213, 28,203,110, 70,206, 69,195,144, 85, 69, 5, 70, 98,154,105,203, 23, 84, 82, 9,145, 88, 2,188,203, 43, - 29, 22,223, 64,107,155,217,130, 11,134,211,227, 63, 18,206, 91, 83, 89,150,100, 83,153,115, 5, 2, 9,166,100,112, 41,101, 77, - 75, 50,195,172,141, 83, 43,150, 83, 39, 47, 66,149,186, 60,183, 82,141,110,225,240, 39,196,221,155, 81,191,231,222,141, 89,213, - 55,237, 88,247,245,205,127,221,171,222,173,181,185, 61,226,240,182,175, 86,237, 91,186,211,159, 89, 98,236,113,202,246,245, 75, -190,106,209,152,110,218,100, 61,112, 84, 36,212, 28, 91, 16, 22,220,105,170,139,127,159,236,242,222,186, 77, 26,239,166, 87,232, -112,233,215,213,183,115, 90,106,118,188, 55, 27,106, 92,217,154, 61,128,237, 3,137,199,119, 10,177,114,223, 77,221,139, 75, 53, -122, 53,223,195, 53,253, 73,112, 71,241, 98,181, 54,200,172, 83,221,113,115,223,163, 51, 57,230,147,199, 5,183,187,182,199, 20, -139,188,118,233,203, 98,159, 84,186,183,115,137, 91, 34, 52, 27,238, 84,170,188, 61,236,220, 94, 32, 44,203,171,108, 40,237, 75, -107,110, 95,141, 88,160, 80,145, 95,186, 77, 97,137,205, 83, 25,174,211,162,188, 99, 84, 40,149, 52, 64,143, 46,157, 75,218, 83, -101, 77,186,105, 19,162,236, 45,249,108,218, 84, 43,254,198,220, 58,109, 34,211,226, 14,155, 2,237, 19,173,203,215,141, 77,199, -186,173,217,247,125, 99, 98,170, 16,170,182,125,110,232,227, 78,236,167,187, 2, 77, 5,212,166,211,181,219,161, 84, 87, 88,151, - 81,153, 91, 22, 42,173, 58,216, 2, 66,109,243,176,249,247,227,159,188,172,197,153,181, 23,220,146, 73, 36,158,189,183, 55,238, -119,191, 83,134, 79,133, 94, 26, 54,163,119, 40, 23,245, 15,114,220,191,142,226,213, 56,139,225,227,133,189,165,172,237,181,249, - 97,155, 30,221,191,119,242,131,196, 96,167, 93,151,172, 39,236,250,202, 55, 62,208,102,241,218,107, 53,128,138, 37,126,130,149, - 83,107, 53, 9,204, 84,230, 17, 17,189, 55,212,190, 3,248,146,172,211,160,212,169,214,189,181, 33,186,142,219,211,247, 54, 44, - 95,227, 14,196,106,162,186,125, 98,181,178,180, 58, 45,166,105,207, 92, 9,120,110,100,217, 28, 70,108,107,177,109,190, 79,173, -221, 99,115, 41,203, 76, 94, 97, 37, 17,242,109,137,226,246,211,217,104,251,163, 81,127,101, 62,187,186,171,187,235,180,188, 70, -108,210,237,235,249, 22, 93,137,180,219,153,179, 84,221,245,137,101, 55, 93,179, 23, 99,212,230,110, 13,155, 14,126,244, 71,153, - 30,155, 22,183,110, 58,135, 44,136,172,191, 58, 84,105, 79,178,151,218, 87,181, 90,244, 52,109,183, 49,108, 26,164,171,191,110, - 45, 11, 30,153, 2,181,115,110, 83,149,219, 97,171,198,196,221, 46, 9,183, 14, 21,126,223,177, 98,217, 80,152,183,109,137, 17, -184, 39,182,216,149, 73,247,169,115, 94,157,126,212, 38,174,188,170,109, 62,145, 66,136,100, 17, 21, 93, 71,204, 47,211,227,220, -219,115,111,195,225,108, 1,107, 11,252,252,239,134,106, 63,179,199,115,133,155,125,215,171,187,135,179,118,237,197,106,110,150, -201,109,205, 10,223,153,185,246, 52,250, 21,249, 15,122,172, 61,215,189,169, 23, 85,173,123,210,110, 87,226, 85,161,161,221,180, - 69, 50, 35, 16,154,153,245,133, 70,101, 86, 39,143, 18,101,191, 50, 43,173, 61,131,193, 94,250,238,142,241,110, 54,200, 89,144, -172,105,247,150,215, 94, 63,197,253,209, 54,126,230, 88,150,253,156,245,230,245,238,157,187,165, 91,118,205,231,112, 87,162,211, -175, 26,213, 74,234, 15,179, 73,139, 75,126, 92,138,179, 48,164, 75,167,183, 38, 43, 46, 58,157,172,107,218, 71,106,187,184,205, - 93,151, 6,202,110, 37,197,110,209,175, 29,134,190,172,246, 39,241, 13, 5,253,203,160, 93, 60, 62,109,135, 18,118,213,139,112, - 73,220, 10,142,200, 73,165, 84,170,177,119, 63,136, 8, 23, 60, 70,218,180,225,210,217,143,182,241, 40,114,169,117, 3, 80,155, - 86, 12, 7, 9,252, 89,216,124, 52,223,247, 21,199, 92,217,203,159,115,109, 71,183, 27,106,119, 94,200,183,218,221,216, 86, 93, -205,110,222, 91, 37,184,134,249,219,247, 46, 91,196,109, 93, 86, 53,227, 71, 49,101, 84,161,213,227,179, 69,164, 59, 61,217, 13, - 76,139, 38,154,150, 85, 17,245,109, 21,212, 94,194,230,253,122,118,237,252, 63,118, 51,229,219,231,249, 97,202,188, 61,155,155, -199,118,239,117,185,183,155, 45,111,219, 48,169,151,253,165,181,247, 29,144,197,255, 0,186, 86, 69,154,185,177,175,167, 54,191, -110,233, 53, 41,149, 43,218,189, 9,184,108,215,247,190,249,155, 69,160, 50,234,210,253, 65,250, 53, 77,200,172, 42,159, 74,151, - 45,166,227,134, 30, 29,118,127,120,246,186,191, 46,244, 59,148,198,229, 93, 91,162,198,209,109, 69, 98,214,187, 45,122, 85,145, -109,220,147, 54,155,112,111,218, 69, 66,255, 0,180,170,251,125, 80,157,121, 82,101,220,150,181, 18,154,240,167,215,104, 46, 83, -162, 85, 36,212, 19,245,147,172, 55, 5,237,158,182,189,170,118,111,241,175,183,251,177,186, 92, 50,213, 47,138,213,133, 67,216, - 27,113, 74,181,183,186, 14,223, 84,174,122, 47, 11,119,174,202,223, 59, 29, 14,226,170,191,178,245,148,204,114,158,230,219,222, - 52, 89,210, 61,212, 74,157,109,221,244, 74,100,119,233,207,218,140,207,171,105,175, 15, 60, 86,219, 59, 19,183, 23, 37,185, 55, -107, 42,215,157,246,197,244,141,202,218,155,189,189,196,135,110,218,246, 85,232,222,219,222,187,117, 26,163,120, 88,142,109,229, - 70, 70,225, 69,136,139,192, 85, 33, 71,143, 94,160, 33, 53, 10, 36,116,205, 53, 8, 43,126, 27,135, 2, 45, 74,111,229,107,222, -224,251,173,219,227,235,252,241,159, 47, 99,243,255, 0,140,109,229,209,192, 61,139, 67,254, 54, 13, 55,134, 30, 56,238,159,226, -247,134,189,165,221,155, 88, 82,239, 26, 58,127,141, 58,134,224, 29,184,254, 17,110,133,181,238,252, 37, 74,228,217,202, 39,240, -190,165,239, 17, 99,253,100,191,208, 49,227,221, 17,185, 92,241,117, 46,135,178,187, 35, 81, 28, 31,213, 31,183,183,186,171, 31, -122,172,157,204, 93,241,102,218,215,157,151, 58,233,188,119, 54,204,184,111, 91, 90,206,160,237,157, 94,102,218, 53, 31,110,232, - 55, 5,201, 73,181, 97, 62,229, 82, 21,212,253, 17,170,156,202,136, 53,143, 5,170,122,233,238,255, 0, 21,182, 21,251, 73,221, - 38,109, 61,163,187,173, 42,230,243,109,206,204,217,215,189, 66,226,221,186, 53,235, 74,102,187,180, 15, 88,202,106,225,181, 40, -212,205,160,161, 61, 71,164,207,141,102,114, 42,155, 50,125, 77,232,203,169,120,130,166,250, 89,240,157,111,237,173,252,177, 83, - 70,217,139, 67,114,246,121,205,192,178,182,194,199,221,235, 38,179, 78,133,124, 51,107,215,171,138,221, 10,189,205, 93,167, 93, - 54,173,114, 93,149, 85,143,101, 93, 20, 42,173,118, 11,240,157,147, 78,174, 70,121,218, 70, 95,139,225,190, 91,109, 66, 82,230, -223, 59,143,119,166, 50, 8,184, 3,231,127,135,166, 49, 78, 42,118,162,139,177,156, 68,238,246,208, 80, 63,132, 77, 83,182,246, -242,168, 91, 74,166, 93,239, 65,153,117,219,117, 40, 41,100, 86,172,219,150,169, 75,166,194,137, 94,175, 81, 43, 42,159, 72,151, - 83,133, 10, 28, 42,156,138, 35,149, 8, 81, 34,197,146,211, 13,173, 88,184,129,221,147,190, 91,193,122,238,130, 40, 10,181,162, - 92,146,233,172,210,109,231,107, 47, 92,147, 40,244, 11,118,135, 75,181,237,216, 53, 75,142, 68, 40,170,184,107, 72,161, 81,105, -222,253, 60, 68,134,137,147, 11,242, 90,133, 13,183, 81, 21,165,172, 21, 55, 58, 70,221,186,116,193,180,169,223,215, 31,255,217, +255,216,255,224, + 0, 16, 74, 70, 73, 70, 0, 1, 2, 0, 0,100, 0,100, 0, 0,255,236, 0, 17, 68,117, 99,107,121, 0, 1, 0, 4, 0, 0, 0, + 85, 0, 0,255,238, 0, 14, 65,100,111, 98,101, 0,100,192, 0, 0, 0, 1,255,219, 0,132, 0, 2, 1, 1, 1, 1, 1, 2, 1, + 1, 2, 3, 2, 1, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 4, 4, 4, 4, 3, 5, 5, 5, 6, 6, + 6, 5, 5, 7, 7, 8, 8, 7, 7, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 2, 2, 2, 4, 3, 4, 7, + 5, 5, 7, 10, 8, 7, 8, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,255,192, 0, 17, 8, 1, 26, + 1,245, 3, 1, 17, 0, 2, 17, 1, 3, 17, 1,255,196, 0,213, 0, 0, 2, 2, 3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 6, 4, 7, 0, 3, 8, 2, 9, 1, 1, 0, 1, 5, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 2, + 4, 5, 6, 7, 8, 9, 16, 0, 1, 3, 3, 3, 2, 3, 4, 6, 6, 6, 6, 6, 6, 8, 7, 1, 2, 3, 4, 17, 5, 6, 0, 33, + 18, 49, 7, 65, 19, 8, 81, 97, 34, 20,113,129,145, 50, 35, 9,161,177, 66, 51, 36, 21,193, 82, 98,114, 52, 22,209,225,130,115, + 53, 54,240,146, 67, 83, 23, 55,162,131, 68,116, 37, 10,241,178,194, 84,132,148,180, 25, 99,147,100,212, 69,213, 56, 17, 0, 1, + 4, 1, 2, 3, 5, 5, 6, 3, 6, 3, 6, 7, 1, 0, 1, 0, 17, 2, 3, 4, 33, 18, 49, 65, 5, 81, 97,113, 19, 6,129,145, + 34, 50, 7,240,161,177,193,210, 20,209, 66, 35,225, 82,146, 51, 21, 23,114,178, 67,241, 98,130, 83, 99, 52,162, 36, 68, 84, 37, + 22, 8,115,255,218, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0,251,245,164,146,205, 36,148,123,178,174, 73,181,201, 85,152, + 33, 87,112,211,134, 42, 95, 36, 54, 94,224,120, 5,148,239,199,149, 43, 77, 10,253,251, 37,177,183, 49,103,224,252,159,185, 22, +141,155,227,189,246,184,118,226,220,219,189,114,126, 3,235,143,186, 93,174,238, 44,204, 7,213, 60, 34,150, 60,213, 1, 50, 60, +100, 52,228, 64, 79,194, 82,134, 64, 75,172,211,162,133, 85,239, 58,241, 94,153,245, 19, 55,166,229,203, 27,171, 69,181,249,128, +102,246, 15,154, 61,227, 95, 21,237,221, 79,233,198, 23, 83,196,142, 79, 72,147,233,242,146,239,237, 63, 44,187,142,158, 11,170, +241,236,138,197,150, 89,216,200, 49,169,109, 78,178,201, 72,113,137, 49,150,149,182,180,159, 97, 78,189,163, 27, 38,188,136, 11, + 43,144,148,101,168, 35, 80, 87,137,228,226,217,143, 97,174,200,152,202, 58, 16, 67, 16,166,232,232, 11, 52,146, 89,164,146,205, + 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, + 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36, +150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73, +102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150, +105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,230,239, 83,144, 61,109,201,238, 67,139,237, 12,178,207, +111,124,166,132, 36,219,220,142,218,130,184, 15, 51,206,243,135, 34,174,117,165, 54,165, 61,250,242,207, 86, 97,250,146,220,178, +112,166, 5, 44, 25,140, 65,239,119,213,223,216,203,213,189, 37,153,233,170,113, 0,205,129, 55, 57,119, 18, 35,185,155, 70,111, +107,170, 3, 63,239,223,171,190,217,222, 63,203,217,118, 89, 33,155,226, 69, 93,138,212,136,175, 56,213, 69, 71,152, 26, 7,137, + 32,244, 59,235,203,122,207,168,186,247, 75,179,202,187, 36,239,230, 4,162, 72,241,110, 11,213, 58, 55,167, 58, 7, 84,175,205, +163, 27,224,228, 76,101, 16,124, 31,138,136,246, 41,234,175,212,188, 8,215, 43,179, 18,175, 48, 26,170,226, 74,154,150, 26, 52, + 80,161,224,181, 4,168,131,246,105,199, 70,245, 7,168,170,140,231, 25, 78, 3, 88,153,109,143,184,150, 45,247, 37,254,179,233, +239, 78, 91, 40, 66, 81,132,206,146, 17,221, 47,120, 14, 31,239, 68, 59,117,220, 79, 80,158,139, 50, 38,153,200,173,207,183,136, +204,114,178, 45,115, 13, 98,200,167,222, 83, 46, 39,146, 82,224, 30, 35,235, 7, 68,233,157, 75,171,250, 62,208, 46,172,249, 82, + 58,196,252,167,254, 18, 28, 3,246, 33, 11,170,116,222,145,235, 26,137,166,193,230,196,105, 33,164,135,252, 64,177, 35,236, 10, +237, 44, 63,212, 22, 7,155,246,118,103,121,236, 42,113,235, 13,186, 36,153,243,226, 32, 39,230, 89, 84, 54, 11,238,178, 82,162, + 19,204, 1,182,244, 59,111, 77,125, 27,233,238,173, 79, 89,166, 22,208,116,145,109,121, 30, 96,248, 47,155,125, 71,210, 46,232, +183, 78,171,198,176, 15,167, 49,200,143, 31,236, 41,111,209,183,173,190,197,250,234,237,163,189,210,236, 84,137,110, 89, 98,200, + 54,233,241,174,177, 85, 18, 76,105, 73,105, 14,169,181,164,149, 37, 84, 74,199,196,133, 41, 62,253,116,253, 91,163,221,211,173, +242,237,103,103, 12, 95, 69,202,244,110,183, 71, 84,171,205,164,150, 5,139,134, 32,167, 62,246,119,167,183, 62,158, 59, 97,118, +239, 31,118,167,155,103,111,108,141,161,251,148,224,203,207,150,144,183, 82,202, 79,151, 29, 43, 89,170,148, 6,195, 85, 48,240, +236,202,176, 87, 88,121, 75,128, 87, 51,179,107,196,170, 86,218, 90, 49,226, 86,190,197,119,215,182, 30,164,251, 95,108,239, 39, +103, 46, 63,205,123,123,119, 14,170, 4,226,203,209,203,129,151,215, 25,117,110, 66, 80,226,104,182,212, 55, 2,189,122,105,243, +112,236,196,180,213, 96,105, 71,136,251,210,193,206,171, 50,168,219, 81,120, 75,129,246,183, 52,221,170,170,218,205, 36,150,105, + 36,179, 73, 37, 73,246, 47,215,231,167,239, 81,157,255, 0,205,189, 57,118,185,233,210,179,108, 1,107,141,144, 73,147, 17, 81, +225,166, 75, 82,215, 9,214, 25, 91,170, 11, 90,144,227,102,164, 35,137, 29, 9,214,190,119, 68,191, 18,138,238,177,132,108,225, +174,172,206,235, 23,167,245,252,124,204,139, 40,173,204,171,249,180, 96,238,204,174,205,100, 45,165,154, 73, 33, 57,246,117,138, +246,195, 7,188,119, 35, 58,152,155,126, 23, 96,133, 38,241,118,156,224, 82,146,196, 72,108,170, 67,206, 20,160, 21, 30, 40, 73, + 52, 0,147,224, 43,162,209, 76,174,156, 97, 0,242,145, 0, 14,242,131,145,124, 40,174, 86, 76,180, 98, 9, 39,184,113, 95, 58, +151,249,245,119,191,186,119, 25,215,239, 73,222,155,178, 44,215,180, 22,231,150,202,175,174, 61, 45, 47, 72,225, 66,164,134,173, +208,165, 52,218,248,239,196, 58,225, 21, 21, 3,161,239, 15,162,168,160, 8,228,229, 66, 19, 60,180,252,200,252, 2,243,177,235, +204,140,130,101,139,137, 59, 43, 28,245,215,221, 18, 62,242,186, 63,242,243,252,209,187, 57,249,128,192,186, 89,108,118,217, 88, +175,120,108, 20, 55,204, 74,238,164,184,235, 77,149,249,126,115, 15, 37, 40, 14,182, 28,248, 21, 84, 33, 73, 86,202, 72, 5, 36, +224,117,239, 78, 93,210,204, 76,136,148, 37,194, 67,243,236, 62,255, 0, 21,210,122,119,213, 20,245, 97, 33, 16, 97,100,120,196, +254, 32,243, 28,185, 30,238, 11,167, 53,206,174,153,102,146, 74,131,245,151,249,132,246,127,209,174, 77,131,246,239, 38,109,119, +142,233,103,183,120, 22, 91, 77,134, 19,200,109,214, 98, 75,152,136,142,220,100, 41, 65, 92, 25,108,170,137,218,174, 43,225, 78, +193, 74, 78,223, 73,232, 86,231,194,201,199, 72, 87, 18, 73,239, 1,216,119,254, 30,229,129,214,125, 67, 79, 79,157,117,203,226, +157,146, 0, 1,216, 75, 57,238, 31,121,246,178,127,230, 65,249,160, 91,191, 47,119,240, 8, 74,194, 37,230,183, 28,249, 87, 86, +161, 71,183,206, 76, 71, 25,114,218,168, 72, 8, 8, 44, 62,167, 20,233,152, 2, 64, 0,212,120,215, 86,189, 61,233,195,213, 5, +135,204, 16, 21,179,184,126, 47,222, 25,153, 84,245, 55,169,199, 72, 53, 15, 44,216,108,118, 98,220, 27,184,187,186,163, 7,231, +209,222, 66, 42, 61, 44,102,148,254,252,239,255, 0,213,235,103,255, 0,210,232,255, 0,239, 43,251,191, 82,195,255, 0,247,188, +143,254,202,223,191,244,174,254,237, 62,116,255, 0,115, 59,107, 98,207,229,219,158,180, 76,188,219,225,220,222,181, 75,175,159, + 13,201, 81,208,250,163,185,201, 40, 60,155, 42,226,106,145,184,232, 53,195,228, 84, 42,178, 80, 5,216,144,253,172,120,174,255, + 0, 26,227,109,113,153, 12,100, 1, 99,201,195,183,177, 48,232, 40,235, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, + 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164, +146,205, 36,148, 75,158, 65, 97,178, 41, 9,188,205,143, 17, 78, 84,182, 37, 60,219, 69, 64,117,167, 50, 43, 74,234, 81,129,151, + 0,233,137,101,170, 46, 91,138,206,200, 31,196,161, 92,226, 61,149, 69,105,185,114,173,141, 72,101,114,217, 97,223,221,186,227, + 41, 81, 90, 80,175, 5, 17, 67,167, 53,200, 71,113, 5,187,121, 36,225,217, 16,212, 19,168, 25, 30, 87,139,225,240, 81,116,203, +110, 81,109,118,215, 29,110, 43,114, 46, 50, 25,140,210,158,116,241,109,176,183,148,148,149, 40,236, 5,106,124, 53, 56, 87, 41, +150,136, 36,247, 38, 36, 14, 42,126,160,157, 66,155,145,227,214,217,105,183,220,103,198,143, 61,116, 40, 97,247,218, 67,138, 10, + 52, 20, 74,136, 38,167,166,166, 33, 34, 28, 2,153,194,155,168, 39, 89,164,146,140,187,213,157,187,195,120,235,146,217, 78, 64, +243, 46, 77,106, 9,117, 2, 66,227,178,180, 52,227,169,104,158,101, 9, 91,136, 74,148, 5, 1, 80, 7,168,212,182, 22,118,209, + 51,173,210,100,198,133, 29,114,230, 56,150,162,182, 10,220,117,213, 4,161, 41, 27,146, 84,173,128,211, 0,233,215,189, 50, 75, + 52,146, 89,164,146, 83,238, 15,119,177, 92, 6,209, 38,235,113,144,134,224,196, 81,110,109,194, 71, 52, 64,133,197, 60,214,169, + 50, 0, 41, 72, 74, 65, 36,117,240, 52,174,156, 7, 73,113,223,121,191, 53, 59, 98,175, 82, 48,142,193, 88,110,249,166, 82, 21, +242,204,223,100,201,151,102,181,121,165, 92, 20,235, 49,162, 22,223,113,148, 26,145,200,130, 64,251,221, 9,219,167,162,157,187, +172, 45,236,251,126,106,148,243, 3,180, 67,169,142,254,100, 12,219,108,145, 45, 95,201,228,223,175, 44, 71,100, 76,187,179,145, + 76,102, 43,239,134,135,152,182,126, 77,180, 5, 55,202,180, 62, 61,119,235,171, 21,244, 13,218,153,105,225,253,168,114,207,110, + 74,252,244,105,234,154,219,234,106,193,123,145, 18, 60,136,242,236,178, 25,142,234,100, 41, 15,160, 7,217,231, 68, 73,108, 36, + 57,197,105, 90,126, 36,133, 10,111, 94,186,202,207,192, 56,196,106,224,171, 84, 95,230, 14, 10,232,213, 4,117,229,247,216,138, +194,228,201, 90, 91,140,218, 74,220,113,194, 18,148,165, 34,164,146,118, 0, 13, 70, 82, 17, 4,146,192, 41, 70, 38, 68, 0, 28, +149,201,254,168,125,125,121, 78,191,219,158,193, 57,231, 92, 20, 85, 22, 86, 64,216,230, 2,143,192, 81, 12,111,200,255, 0,252, + 79,250,190,221,120,151,172,190,167, 23, 56,221, 60,188,142,134, 99, 95,100, 59,124,125,221,171,220,125, 25,244,191, 65,149,212, + 67, 68,106, 32,116,239,121,246,120,123,251, 23, 52,246,163, 31, 25,199,121,237, 22, 12,181, 75,117, 83,167,132, 79,249,146,162, +226,215,200,169, 97,101, 91,213, 68, 80,215, 94, 87,233,156, 17,155,213,106,171, 33,206,233,252, 79,196,179,146, 15,137, 12, 87, +171,250,163, 56,225,116,155,173,199, 97,182, 31, 11,112, 14,192, 17,224, 11,133,199,223,156,239,171,191, 81,110,250,203,201,187, + 11,110,188, 92,113,126,212, 97, 46, 49,105,178, 88,109, 82, 31,130,203,205,252,171,111,124,235,161,146,143, 49, 79, 21,114, 73, + 53, 1, 52, 3, 95,166,126,138,232,152,181, 96,194, 98, 49, 50,144,212,176,211,147, 14,198, 95,150,222,188,235,217,118,245, 11, + 43, 51,148, 99, 19,160,114, 31,155,158,210, 85,235,249, 38,122,135,239, 15,169,222,216,119, 63,211, 79,125,238, 50,242, 94,222, + 88,109, 41,200, 49,251,205,225,197,201,126,211, 49, 60,192,101, 50, 30,170,248, 43,143, 52,164,171,110, 42,166,196,235,206,254, +181,122, 99, 10,236, 9, 19, 17, 19, 40,203,134,154,196, 56,151,136, 63,138,244,159,161,126,170,206,167,168, 68,110, 50, 17,148, + 89,245,210, 69,140,124, 8,224, 57, 50,232, 31, 74,185,213,202,205, 96,238, 30, 21,230, 40,217,174,120,197,226, 66,154,169,226, + 30, 98, 19,137, 10,167, 64, 74, 84, 65, 62,225,175,149,126,135,245, 25,195,168,203, 29,254, 25, 52,189,162, 64,125,224,253,193, +125,111,245,215,167, 66,125, 52,100, 55,197, 23,143,178, 81, 39,238, 35,239, 43,141, 63, 39,175, 68,254,164, 61, 95,246,115, 34, +103, 7,238,253,227,183, 29,171,181, 92,214,150,224, 99, 11, 91,110,202,185,185, 21,165, 56,252,133, 50,235, 36,161, 40, 8, 9, + 73, 38,187,211,143,143,220,158,174,235, 84, 96, 95, 23,162, 54, 76,199,140,185, 7, 58, 13, 15,122,248, 43,209,125, 11, 39,168, +227,207,110, 68,170,172, 75,132,121,150, 26,157, 71,119,246, 40,249,247,171, 47, 85,125,188,237,215,168,191,203, 75,212,190, 82, +238,117, 19, 31,182,190,171, 69,254, 98,212,252,150, 94,182, 93, 34, 40,143, 57,202,186, 90,121,149,242,226,226,137, 66,133, 1, +220,232,180,244,204,107,108,197,206,162, 27, 55, 29, 71, 45, 65,251,193,236,226,133,127, 86,203,170,172,190,159,145, 63, 51,108, +116,151, 61, 8,251,136,237,224,144, 17,235,155,189,152,231,167,174,201,122, 56,193,239,247,156, 87,180,203,128,229,227, 40,153, +133,165,195,124,184, 25,183,233,192,180,207,148,164, 41, 73,109,150,193, 74, 2,128, 82,137,229, 90, 10, 92, 29, 22,153, 95,145, +149, 40,198, 83,118,136,151,202, 26, 49,227,237, 84, 79, 94,190, 56,248,184,144,148,161, 94,215,145,143,204, 94, 82,225,224, 57, +118,167,107,103,170,206,235,122, 89,239, 62, 35,220,111, 69,215,222,234, 95,177, 52,188, 27,204,241,206,230, 91,229,200,135, 41, +130,226, 2,131, 97, 42,113, 7,154, 10,247,226, 20,130, 1, 7, 84,143, 78,175, 50,153,195, 40, 83, 25,127, 41,129, 0,143,183, +222,175, 14,169,110, 13,245,217,134,111,148, 95,226,141,128,144, 71,219,220,175, 46,213,247, 83,243, 5,252,196, 61,108,247,159, +210,197,163,188,119, 44, 67,177, 54, 11,205,216,147,106,141, 17,171,139, 16, 24,187,187, 26, 36, 56,207,178,134,158, 64,225,178, +212, 87, 90, 36, 3, 93, 98,229,211,131,210,176,177,242, 60,129, 59, 39, 17,196,150,118, 4,147,196, 45,220, 59,250,135, 88,207, +201,198,253,193,133, 80,145,224, 3,182,226, 0, 7, 67,227,170, 87,192, 61, 74,122,169,252,170,253,109,119, 79,211,214, 79,157, + 92,123,149,128, 88,177,105,249, 28, 22, 50, 89, 18, 95, 74,165, 34,214,139,148, 39, 56,186,227,138,109, 65,107,242,220,224,160, + 20,154,157,182,165,188,142,159,141,214,112,169,184, 86, 43,148,166, 34,118,246, 59, 31,226, 21, 60,110,165,149,208,243,175,162, + 86, 27, 97, 26,204,134,231,226,206, 60, 59, 11, 35,158,134,125, 56,250,254,252,205,176, 59,151,171,140,195,212, 54, 67,139, 94, + 37,206,148,213,138, 5,149,247,211, 13,151, 34,174,149, 84,118, 31,101,166,219, 11,248, 67,105, 71,221, 21, 39,125, 87,235,125, + 79, 11,164, 90, 49,161,141, 25, 0, 3,147,199, 94,246, 62,245,103,160,116,172,254,181, 81,203,179, 42,112, 36,157,160,112,211, +185,192, 3,185,115,119,100,125, 79,250,129,244, 83,115,245, 55,220, 69, 92, 91,127,212,179,151, 54,113, 41,183,246, 80,203,173, +183,120,151,121,150, 38,207,109, 60, 3,100,213,151, 74, 62, 26,114, 32,211,195, 93, 22,119, 77,163,168,156, 72, 55,244,182,153, + 55,112, 1,135,222, 23, 51,211,250,174, 71, 76, 25,179,119,183,112,137, 61,230, 69,207,220, 89,121,198,123,175,123,191,246, 53, + 93,203,149,220, 46,244, 63,234,241,246,156,185, 64,184, 91,154,156,245,129,114,124,194,182,153,243, 3,254, 97,109, 73, 0, 21, +167,161, 53, 9, 32, 80,181,184,226, 57, 27, 60,188,113, 64, 44, 65,109,205,238,227,221,247,167,171, 36,207, 27,204,243, 50, 78, + 65, 14, 8, 7,107,242, 28,120,119,253,202,205,238,159,230,197,249,144,223,187,113,217, 27, 6, 49,145,205,196,187,183,119,114, +227,139,223, 85, 38,221, 25,175,230,178,217,184, 69, 98, 28,199, 81, 54, 58,136,228,219,224, 44,160, 0, 84, 9,213, 12, 95, 77, +116,232,217,145, 41, 68, 78, 17,105, 6, 60, 3, 18, 70,135,185,104,229,250,175,169,206,188,104,198, 70, 22, 73,226, 92, 13, 75, +128, 14,163,189,125, 78,252,190,253, 44,119, 51,211, 87,102,174,184,151,121,179,153,221,197,201,178, 75,139,217, 21,194,233,124, +230,181,161,217,112,163,198,118, 58, 3,206, 58,124,160, 88, 42, 0,159,218, 59, 13,121,151, 90,234,112,205,184, 78,186,197,113, +136, 96, 7,113, 37,249,107,170,245,126,131,210,103,129, 73,133,150, 27,101, 41,110, 36,247,128, 27,158,154,125,234,220,193,251, + 87,219, 62,211, 98,172,226,248, 69,166, 29,151, 13,183,182,164,198,131, 9,150,163, 69,140,208, 37,197, 4, 33, 0, 37, 41,169, + 36,253,186,204,182,233,221, 51, 41,147, 41, 30,103, 82, 86,181, 52,215, 68, 4, 32, 4, 98, 56, 1,160, 11,229,143,229, 69, 29, +190,253,126,110,189,240,245, 77,219, 6,252,174,204, 37,235,196, 40,178,227, 2,150,102, 42,233,118,109,200,235, 29, 1,243, 91, +138,183,212, 60, 9, 77,122,141,122, 79,170,143,237,122, 86, 62, 52,255, 0,204,208,248, 48, 47,238,118, 94, 91,232,241,251,190, +177,149,149, 95,249,122,135,237,121, 6,247,128, 74,250,231,175, 49, 94,176,169,191, 93, 30,181,187, 91,232, 71,176,243,251,203, +220,119, 3,247, 19, 88, 56,237,137,165,132,200,187, 92,214,217, 83, 81,219, 52, 60, 82, 40, 84,226,200,162, 18, 9,220,208, 29, +110,139,209,237,234, 87,138,161,226, 79, 96,237,254, 3,154,198,235,221,110,174,151,142,109,179,143, 0, 57,147,217,252, 79, 32, +190, 44,247,183,183,126,166,238,126,165, 59, 27,235, 27,213,140,181,142,231,119,139, 45,106,227, 26,198,182,212,216,181, 90,173, +151, 43, 95,201, 50,148, 41, 74, 45,164,183, 46,137,104,252, 72, 74, 71, 50, 86,165, 83,214,176,242,241,191,109,147,141,142, 62, + 10, 96,207,218, 72,147,248,240,227,207,150,140,188, 99, 55, 15, 43,247, 88,185,121, 71,227,190,199,219,253,216,131, 22,240,227, +195,144,227,171,174,182,255, 0,230, 12,202,173,184, 47,117, 61, 43,102,247,164, 56,229,158,205,118,190, 93,101,183, 25, 33,111, + 41,152,147,172, 50, 28, 13,164,144, 10,138, 82,104, 42, 42,117,203,250, 14,147,109, 25,112, 28,101, 24,143,120,152, 93,119,212, + 75,133, 57, 24, 83, 60, 35, 41, 19,236, 48, 41,215, 8,255, 0,230, 10,244,177, 27, 54,133,132,119,135,183,153, 70, 21,100,150, +164, 34, 61,238,239, 22, 58,210,219,107, 95, 16,252,136,232, 88,121, 45,143, 18,208,112,251,142,169, 89,232, 28,143, 44,202,171, + 33, 50, 57, 3,247, 3,195,222,202,253, 95, 81,177,188,193, 11,107,178,176,121,145,247,145,197,188, 29,125, 16,198, 47,120,246, + 75,143,195,200,177, 73, 44,204,198,231,178,220,200, 51, 33,173, 46,176,251, 15, 32, 56,219,141,173, 4,165, 73, 82, 72, 32,131, + 66, 53,195, 78, 6, 4,196,134, 35,138,244, 24, 76, 78, 34, 81, 46, 14,160,169,250,138,146,205, 36,150,105, 36,179, 73, 37,154, + 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, 52,146, 89,164, +146,205, 36,150,105, 36,179, 73, 37,243,203,243,157,237, 93,255, 0,184,221,243,237, 99,173,219, 39, 72,195,153,179,102, 17,110, + 55, 56, 56,204,220,161,168,111, 73,128,150,226,133,196,135,199,241, 22,247, 16,218,202,135,150,170, 57, 67,194,154,237, 61, 47, +144, 43,166,221, 67,188, 88,110, 17,125,117,212,253,253,188, 57,172,236,216, 60,163,237,228,234,140,195,172,126,189,251,111,133, +139,231,110,177, 28,147, 27,203, 19,138, 96,246, 28,149, 80, 33, 78, 93,213,155, 20, 59,132,246,228, 46, 42,148,203,142,166, 66, +155, 76,119, 22,134,208, 92,101, 11, 34,128, 39, 90,214,207, 14,217, 52,231, 25, 13,211, 35, 80,206, 64,103,215,135, 30,226,171, +196, 89, 17,160, 35, 64,157,251,111,115,252,193, 59,157,113,187,225,151,188,243, 62,135,133, 90, 49,124,170,253, 98,189, 64,182, + 92,237,146, 39, 75,183,150,223,183, 68,122, 69,226, 3, 79,200, 81,113,197,182, 84,148, 33,110, 4,241, 77, 41,170,183,199, 10, +160, 36, 33, 89, 38, 81, 4, 56, 44, 15, 18,192,176,252,145, 34,108,150,142,120, 20, 3, 55,200,189, 92,247,162,219,101,133,223, +166,179,249,153,171,115,123,103, 62,197, 99,143,100,156,222, 54,236, 20, 69,140,245,218,124,239, 34, 55, 15,153, 76,206,124,202, +212,146,149, 18, 0,166,201, 53, 80,198,160,147, 87,150, 3, 88,229,198,231,213,128,215,131, 40,200,206, 95, 51,242,240, 81,178, + 14,239,254,106,214,102,178, 59,157,214,235,153,196,238,185, 23,134,175,120,244,123, 29,230, 84, 22,120, 63,230,194,145,107,113, +168, 63, 32,195, 67,138, 16,149, 54,242,203,129, 84,167,197,187,195, 27,167, 75,104, 2, 6, 58, 49,112, 15,120, 58,185, 62,205, + 19, 25,219,175, 23, 93, 35,143,122, 89,239,139,189,226,207, 50, 87,110,141,101,249,188, 12, 71, 20,185, 91, 47, 29,200,197,237, +247,105, 19,238,107,118,247, 44, 66,133, 36,152,140, 69, 44,175,203, 66,184, 54,170, 5, 32,168,108, 43,137, 62,161, 87,149, 0, +219, 98,103, 32, 68,100, 67, 15,132, 57, 26,146,255, 0,197, 90, 21, 75,113,230, 88,113, 30, 43, 71,111, 59,193,223, 28, 27,187, +216, 46, 72, 38,247, 6,237,233,225,166,237,237,247, 37,204,150,195,124,149, 37,140,138, 77,130,246,137, 17,218,141,242, 66, 81, +104, 76, 16,249,134, 27, 83, 13,185,192, 36,142, 68, 23,191, 26,171, 42,152,106,197,154,237, 98, 62, 87,142,174,236,236,252,117, + 33,211, 70,114, 4,113,110,126, 44, 86,156, 63, 32,245,109,148,224,211,179,219,213,223, 47,137,147,227,214,126,222, 93, 44,208, + 3,114,163,183, 46,117,203, 41,184, 49,119, 76,184,171,102,178, 8,134,211, 65,198,214, 8, 66, 72, 36, 3, 66, 30,216, 99, 66, + 98, 32, 65,164,102, 15,112, 17, 12,199,150,174,197, 40,153,144,250,232,223,138, 77, 86, 81,223, 84,229, 86,108,250,237, 23, 54, +159,221,249, 24,141,206,199,220, 9,242, 99,100,208, 98, 99,215, 41,121,189,139,230, 5,189,112,161,172,252,187, 76,178,226,138, + 32, 5, 41,108,128,174, 66,188,245,107,203,167,105,136, 48, 16,222, 12,126, 82,100, 4, 36,206,231,139,255, 0,123,129,247, 40, + 60,157,245,118,215,142,154,143,182,136, 62, 77,110,239,182, 77,137,100,217, 78,118,114,203,221,237, 88, 94,123,139,226,139,145, + 98,189,169,139,154,162,222, 83, 50, 4,105,177, 39,198,117,242, 23, 25,194,180, 38,105,171,129,180,133, 21, 20,144, 73, 92,169, +140,163, 24,236, 3,124, 9,212,105,163, 18, 8, 45,199,179,131,168,145, 34, 9, 47,192,171, 3, 60,204, 61, 92, 56,219,204, 98, +183, 60,225,142,236,189,114,188,196,238, 20, 83, 2,106,109, 54,171,114,178,102,152,180, 57,102,117,216,198, 39, 35, 21, 73,242, +213, 25,110, 21,181,230, 41,218,144, 72,167, 77, 88,223,204, 33,181,134,221, 67,147,183, 93,218,191, 30,214,213,153, 18, 82,159, + 39,126,126,253, 25,116,247,165, 72,249,221,153,238,227, 97,185,140,203,173,194,201, 98,203,164, 91,177,121,153, 35,143,200,148, +237,165,203, 21,178,112,227, 38, 64,230,243, 98, 83,239,165, 42,169,165, 10,107,240,208, 96,117, 19, 9,121,114,136, 0,152, 57, +110,215, 35,135, 45, 0, 86,170,112,224,246,167,126,232,228,179, 49,124, 69,233,150,214, 36, 74,185,186,164, 50,212,123,115, 97, +217, 75, 73, 85, 94, 44,160,169, 32,173, 45, 5,168, 84,210,163, 89,200,201, 11,183, 88,219,157,221,201,102,228,153,132, 36,198, +194, 44, 50, 36,217,108,120,203,233, 74,208,215,225,121,111,201,146,146, 84,135, 30,121, 14, 40, 87,112, 27, 85, 1, 37,107,169, +223,103, 14, 42, 44,233,197,188, 75,182,189,162,198,213,111,194,172, 16, 32, 38, 64,249, 88,208, 45,241, 99,177,243, 46, 44,113, + 74, 21,196, 10,131,227, 95, 13, 70,203,167, 97,121, 18,124, 82,140, 4,120, 6, 92, 5,234, 15,178, 94,153,109, 93,213,184,183, +105,181, 73,184, 92,144,180,155,139, 81,230,165,155, 67, 87, 0, 74,159, 76, 72,233,105, 95, 0, 81,166,197, 59,131,174,171, 0, +218,107, 27,136,246,241,252, 86,101,226, 59,139, 43,175,242,233,238, 62, 27,139,101, 83,187, 23,140,218, 88,180,192,184, 52,237, +241,166, 98, 41,229, 36, 62,200, 67, 74,175,154,165,144, 92, 64, 36, 1, 65,240, 18, 5,107, 92,238,177,143, 45, 38,239,249, 35, +226, 76,112,101,216, 26,193, 87,149, 23,235,191, 10,239, 78,121,219,203,125,143,181, 28,222,180,173,247, 5,246, 20,119, 3,110, +190,217, 74, 75, 53, 36,128, 91, 74,130,185, 38,187,154,123, 53,231, 95, 81,250, 87, 81,234, 24,176,175, 15, 80, 73,222, 1, 98, + 70,141,197,180, 26,184,240, 94,143,244,219,170,244,222,159,149, 59,115, 52,144, 3, 97, 33,192, 58,191, 7,212,232,199,197, 46, +122, 86,244, 67,110,193, 67, 57,167,113,144,153, 89, 86,203,105,146, 42,220,122,142,137, 7,169,246,171,236,208,189, 21,244,246, +158,144, 5,215, 52,239,251,163,225,223,223,238, 70,245,191,212, 75,186,185, 52,208,240,163,239,151,143,119,119,189, 80,126,172, +251, 83,145,246, 3,190,239,100, 86, 48,182, 44,147,228,170,245, 99,154,132,252, 40,112,185,230,173,160,119, 28,155, 89,233,236, +167,183, 94, 67,235,142,141,127, 67,234,134,250,220, 70, 82,223, 9,118, 23,114, 60, 65,251,153,123, 7,161,122,205, 29,119,165, + 10, 44, 99, 40, 71,100,227,218, 25,129,240, 35,239,116, 59,189,182, 95,203,243,215, 90, 96,100,158,176, 49, 41,112,187,185,111, +142,220, 21,100,120,242,222,105,114, 89,107,116,165,102, 58,210,162, 1, 38,129,105, 87, 26,236,117,236,158,146,255, 0,250, 3, +246,116,236,183,117,114,230,195,116, 73,237, 28,199,219, 85,226,190,176,255, 0,249,220,103, 93,190,177, 27, 7, 34, 73,140,128, +236, 60,139,125,130,131, 3, 34,244,225,233,223,181, 23, 14,197,250, 50,198, 92,176,226,247,131, 75,229,238,113, 42,157, 57, 28, +120, 20,149, 45,110, 56,121, 39,225, 37,106,216, 84, 0, 43,174, 55,234, 39,214, 75,186,245,114,166,173,205, 32,198, 69,134,156, +196, 64,224, 15, 51,197,118,191, 77,254,139, 83,233,249,198,235, 4, 94, 37,196, 98,231,226,228,101, 35,196,142, 67,130,181,125, + 17,122,119,188,230,152,174, 79,145,206, 63, 39, 26,245,108,155, 97,183, 72,113, 5, 92, 68,166, 20,210,158,227, 81, 84,242, 34, +148, 59,208,235, 67,232,215, 67,158, 43,231,216, 62,102, 17, 28,200, 4, 18,124, 9, 0, 15, 2,168,125,105,235,176,203, 3,167, +214,126, 87, 50, 60,129, 32,128, 60, 64, 36,159, 16,169, 14,197,254, 75, 63,152, 39,163,187, 61,197, 62,148,251,244,205,150,227, +119, 93, 46,177, 28,182, 17, 9,244, 33, 60, 90,117, 40,116,200, 9,117, 53, 80,228, 19, 90, 83,125,125, 89,157,235, 12, 44,249, + 3,145,141,184, 14, 26,235,249,104,190, 71,192,244, 70,127, 78,137, 24,217, 91, 76,184,141,186,126,122,163,157,188,252,132,114, + 38, 59, 83,220,233, 29,211,207, 77,251,212,199,114,163, 42, 36,188,186,116,119, 30, 68,111, 58,115,115,228,171,130,221,243, 28, + 91,206, 55,241, 45, 74, 7,165, 0,222,160,191,214,251,174,171,101,123,106,168,184,136, 60,116, 97,203, 70,236, 86, 49,253, 3, +182,139,188,203,119, 93,104, 99, 34, 56,106, 9,230,229,200,212,175, 87,223,200, 50,241,255, 0,130,221,183, 95,111,179,180,227, +222,170,123,104,151,163, 65,203, 98,196, 95,202,207,142,110, 79,220,163,165,214, 11,133, 72, 83, 43,125, 65, 42, 4,212, 18, 8, + 34,148,106,253,109,253,107,188,202,247, 83,111, 24,191, 13, 0, 58,183, 54, 74,223, 64,255, 0, 70,159, 46,221,183, 85,160,144, + 26, 29, 73, 26, 63, 39, 86, 15, 96,253, 5,254, 99,140,119,242,197,221,207, 83, 61,242, 85,207, 30,176,161, 81,198, 59,141, 66, +102, 28, 27,131, 42, 33, 74, 68,182,203, 72,105, 65, 74, 72,228,124,162,186, 15,133, 73,235,172,236,238,179,128,104,149, 84, 99, + 8,153,127, 52,139,145,225,207,239,110,229,167,211,250, 23, 81, 25, 17,183, 35, 40,200, 71,249, 98, 24, 31, 30, 95,115,247,132, +229,232,223,242,217,201,189, 44,250,207,238,199,169,185,217, 35, 23,107, 39,114, 39, 78,185,199,182, 51, 17,113,215, 4, 76,185, +187,112, 13,169,106,113, 97,124, 67,156,106, 0,173, 43,170,253, 95,175,140,220, 90,104, 16,111, 40, 0,239,197,128, 10,207, 69, +244,217,192,204,191, 32,207,119,154, 73,102,102,114, 79,110,168, 23,119,255, 0, 41, 81,222, 47,204, 46,245,234,235, 48,190,199, +153,218,252,142,202,238, 47,117,196,204,103, 16,250,163,191,103, 22,151, 8,146, 28,160, 52,170,133, 17,182,143, 71,170, 13, 56, + 17,198,132, 90, 81,144,144,147,246, 23,224,129,145,233, 33,127, 81,150, 84,228, 12, 37, 19, 19, 22,228, 98,220, 93, 83,253,186, +252,159,127, 48,175, 74, 50,238,248, 7,163,206,254,155, 15, 98,239, 18, 87, 37,113, 37,193, 14, 76, 96, 57,240, 21,160, 20,173, +176,239, 0, 1, 91,101,186,144, 13, 6,218,214,201,245,102, 14, 99, 79, 39, 27,117,128,113, 7, 67,253,158,245,141,139,232,222, +161,130,240,197,202,219, 81, 60, 8,212,127,111,120,101, 35,211,255, 0,255, 0, 47,196, 76, 43, 29,238,119,111,251,207,154, 43, + 35,197, 59,129, 17,134,163, 78, 98, 41,102,227, 2,116, 73,106,152,196,210,183, 92,117, 43,112, 45, 95, 22,223, 21, 72,232,117, + 12,239, 93, 74,217,211, 58,235,218,107, 39,155,130, 8, 98, 57,104,137,211,254,158,194,152, 93, 93,182,111,141,160,106,204, 65, + 5,193,226,117, 80, 44,223,149,111,230, 85,217,254,217, 35,177, 24,175,168,152,182, 95, 78,144, 20, 11, 51,154,131,242,183, 56, +145,131,222,104,109,185, 68,135, 27, 79, 46,128, 72, 3,195,166,218,149,158,165,233,247,219,231, 75, 23,117,167,189,193, 62, 31, +216,161, 95,165,122,158, 61, 94, 76,115, 54,210, 59,152,129,227,203,222,172,255, 0, 86, 31,148,119,113,189, 72,102, 29,150,206, + 95,207,195,215,190,215, 33,132, 92,229,221,224,165,217,151,167, 26,158,204,213, 60,227,145,150,211,104, 82,188,162, 62,225,235, +227,172,238,151,234,136, 98, 87,124, 5, 95,230,187, 49, 97, 29, 8,230,253,171, 83,171,250, 74,121,182,227,216,109,214,150,114, + 67,153, 49, 7,147,118, 46,234,183,176,184,208, 89,142,191,190,132, 37, 38,158,208, 41,174, 61,118,203,231,255, 0,231,131,235, +111, 40,197,241,187,103,160, 15, 78, 37,115,253, 69,247, 64, 55,110,185,181, 1, 85,126, 13,154, 98,254, 95,201,168,160, 67,147, + 13, 81, 82,126, 22,130,212,105, 84,171, 93,215,163,186, 60, 37, 35,153,126,149, 85,168,126,100,127, 15,197,151,158,250,227,173, +206, 49,142, 14, 62,182,219,161,110, 81, 58,127,241,125,193,251,151, 65,126, 91,222,139,113,127, 69, 62,156,173, 29,179,181, 4, +189,146, 41, 63, 63,127,185, 4,241, 84,219,155,232, 79,158,246,251,132,138, 4, 32,120, 33, 34,181, 53, 39,157,235,189, 94,125, + 71, 38, 86,203,135, 0, 59, 7, 33,249,158,245,211,250,127,162,195,165,226,198,152,234,120,200,246,200,241, 63,144,238, 93, 8, +163,196, 21, 30,131,125, 99,173,181,240,243,185,189,236,245,111,223,255, 0, 92,173,122,166,245, 59,233,203,184, 25, 47,111,177, +133, 41, 24, 7,111,155,178,222,162,194,182, 37, 14,133,180,236,146,236, 23, 67,174,213, 33,199, 40,144, 22,224, 77,126, 4, 37, + 26,246, 10,177, 49, 49,176,191,111, 70, 85, 80,148,190,121,238,137, 39,184,106, 27,176,118, 14,242,235,196,110,204,205,202,207, + 25, 57, 24,118,206, 16,249, 33,182, 64, 14,194,126, 18,231,153,237, 61,193,144,223,204,175,215, 55,116,189, 65,119,115,176,249, + 22, 83,216,236,155,183,179,176,139,196,201,246,171, 78, 64,212,196, 72,200, 93,122,117,173,227, 30, 16,126, 19, 4,173, 38, 50, + 80,120,165,102,174, 39,110,149, 47,167, 58, 37, 56,180,100, 70, 25, 16,176, 78, 32, 18, 25,163,164,181, 58,158,222,238, 5, 11, +213, 29,122,252,188,140,105, 79, 26,117,152, 72,144, 36, 11,203, 88,232, 30, 35,179,191,136, 95, 89,251, 18,222, 27,235, 3,180, +248, 47,125,251,199,219,143,242,247,114,173,137,151, 46,213,106,202,161,165,203,189,133,231, 30, 84, 87, 60,181,202,101,167, 90, + 83,168,101, 11, 52, 74,106, 56,245,160, 58,242,220,193, 44, 59, 44,166,187,119, 64,176, 38, 39, 73,115,228, 72, 44,235,215,112, +140,115,171,174,251,105,219, 48,228, 9, 15,138, 60,185,128, 67,183,224,169,159,207, 83,179, 29,179,201,127, 46, 12,207, 44,190, +194, 97, 57, 14, 44,187, 93,210,197,112,113, 40, 14,198,146,237,218, 52, 21, 37,181,171,113,230,182,242,155, 34,187,212,120,129, +173,175, 68,228, 78,190,163, 92, 98,116,147,130, 59, 67, 19,247, 51,172, 47, 94,226,215,111, 76,178, 82, 1,224,196, 30,194,224, +125,224,178, 7,249, 73,250,173,193,251,119,232, 23,177,248, 79,119, 46,197, 61,192,203,100, 77,198, 49,155, 98, 65,118, 83,205, + 49,121,153, 30, 59,133, 21,170, 24,110, 59, 72, 5,197, 81, 35,100,141,200, 4,190,167,233,179,183, 63, 34, 85,143,134, 13, 34, +121,107, 16, 79,180,147,193, 11,210,125, 86, 21,116,236, 88, 91, 47,142,111, 24,142,122, 74, 64,123, 0, 28, 87, 92, 98,254,161, + 59,115,155,119,118,253,217,124, 69,215,238, 25, 54, 46,211, 11,200,102, 71, 97, 70,223, 2, 76,148,165,214, 96,185, 36,209, 42, +146,166,150, 29, 45,163,151, 20,238,190, 36,164, 30, 98,220, 43, 43,170, 54,201,128,151, 14,210, 7, 54,236,125, 31,220,186,186, +179,235,182,233, 85, 23, 38, 31, 49,228, 9,228,253,173,171,114, 28, 81, 94,226,119, 79, 21,237,130,172, 45,100,223, 50,169, 25, + 45,222, 30, 45,105,102, 4, 71,229,184,228,233,169,113,196,115, 76,116,168,161,164, 54,210,220,113,197, 81, 40, 66, 74,148, 64, + 4,234, 24,248,210,187,118,214,248, 98,100, 92,182,131,243,228, 7, 50,137,147,151, 10, 54,238,127,138, 66, 33,131,234,127, 45, + 28,158, 65, 87, 16,125,122,118, 70,255, 0,101,179, 93,112,120, 57, 22, 73, 58,245,106,107, 43,110,211,143,227,151, 89,151, 24, +150,105, 14, 45,184,243,102, 71, 67, 65, 76,162, 65,109,101,132,171,227,124, 2, 90, 74,192, 36,104, 75,162, 93, 19, 33, 51, 24, +177,218,230, 64, 2,121,128,121,183, 62, 67,155, 44,216,245,250, 39, 24,152, 9,200,202, 59,152, 68,146, 34,120, 18, 27, 71,229, +204,242, 5, 92, 81,238,214,233, 43,101,148, 58, 19, 46, 67, 66, 75, 81,222, 5,167,203,123,124, 69,151, 66, 92, 20,168, 4, 20, +130, 14,199,125,100,152,144,182, 68,193,246,173,127,230, 44,127,130,220,249,232,254, 91,126, 80,113, 94,115,116, 73,124, 5, 53, +200,215,110, 96,130,159,111,134,159,203,151, 97, 77,230, 71,180, 45,203,185, 91,154,152, 45,206,200,109, 55, 2,130,248, 97, 75, + 72,112,182, 13, 10,248,147, 94, 32,248,244,212,118,150,116,251,131,179,234,180, 55,146, 99,175, 41, 40,106,124,101, 45,106,105, +180, 4,190,209, 42, 83,232,243, 90, 72,161,220,173, 31, 18, 71,136,220,106, 94, 92,187, 10, 97,108,123, 66, 64,201,125, 88,246, +167, 19,238,155,157,159,188, 55,116, 25,123, 87, 60,127, 31, 90,154,181, 77,118, 47,204,100,241,229,200,183,184, 36, 33, 5,178, +201,249, 39, 80,227,128,241,109,116, 10,165, 70,175, 87,210,237,157, 94, 96,109,173, 35,196, 63,194,207,167,110,161,135, 49,193, +103,219,213,234,174,223, 40,238,220,241, 28, 11, 60,129,109,123, 52, 32,158, 71,138,179, 53,156,180,214,105, 36,179, 73, 37,154, + 73, 44,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 74,188,245, 11,234, + 63, 19,244,221,107,181, 95,115,104, 82,228, 88,174,142, 92, 98,166, 84, 20,182,176,212,136, 22, 73,119,180, 52,164,169, 73, 81, + 83,232,134,182,154, 9, 6,174, 20,143, 29, 93,194,193,150, 73, 34, 36, 56,111,188,129,247, 59,158,228, 59, 45, 16,226,170,137, +255, 0,154,111, 99, 45,246, 73, 57, 43,150,123,203,150, 22, 97,137,209,222,102, 51, 78, 57, 41,244,198,177, 74,126, 27, 76,161, +101,210,251, 9,191,181,230, 32,164,113, 45, 59,253, 77,244, 71,167,238, 36, 7, 14,255, 0,171, 95, 3,180,183,136, 65,253,220, +126,222,207,226,167, 73,252,203,187, 49,111,190, 34,217,115,181,221, 26,180,204,186, 53,102,179,221, 80,136,239, 69,184, 50,114, + 11,141,130, 76,230, 75, 78, 21,124,188,115,108,118, 67,138,165,124,146, 20, 7, 80, 32, 58, 21,164, 56, 33,192,114, 59, 62, 16, + 64,241, 46, 7,138,127,221, 71,237,226,202,118, 77,234,231, 49,188, 89,187, 51,155,118,123, 28,114,231,103,238,101,198,123, 31, +201,102, 57, 22, 60,199,160, 53,142,220, 46,177,157,106, 67,174,134, 27, 10, 49,155,120,146, 85, 86,234, 0, 42, 32,106, 21,244, +216,196,221, 27, 36,198,176, 53,228,251,128, 58,113,230,222, 41,205,199,225, 32,113,254, 10,171,176,126,110,118, 31,230,153, 18, +239,152,236,149,182,153,171, 69,142,208,227,176,173,239,197,141,108,198,237,115,174,172, 73,149, 41,239, 37,233, 41,184, 78, 45, + 52,134,190,248,161,216, 10,157, 25,250,108,180, 90, 67,134,167, 83,198, 82, 1,135, 16, 24, 57,116, 33,152, 53,211,236,193, 57, + 55,249,159,225,107,199,218,206,156,194,111,141,246,234,227, 42,253,101,199,238, 43,118,216, 36, 92,174,150, 39,254, 95,229,147, + 19,207,243, 26, 15,174,169,109, 78,241,162,129, 10, 9, 20, 81,171,254,129, 61,219,119,199,112, 0,145,174,128,243,118,213,187, +148,255, 0,116, 56,177,100, 2,249,249,157, 94,187, 83,220, 92,215, 7,239, 46, 30,228,107,245,150,106,156,183,217, 33,220, 45, +129,230, 45,145, 49,219, 77,206, 66, 85, 41,215,210,212,169, 78,189,113, 5,150,154, 2,169,216,144, 83, 82,104,116, 17,116, 33, + 42,231,161, 26,150, 60, 76,164, 56, 54,128, 54,164,168,156,173,164,130, 62,204, 21,141,108,245,221,101,190,246,242,243,220,235, + 30, 25,121,123, 20,135,125,255, 0, 35,216, 30,117,219, 83, 74,191, 94,220,200, 6, 56,203, 17,155, 50, 75,173, 33,114, 20,146, + 87, 33, 8,226,154,236,104, 43, 74, 93, 32,198, 98, 6, 97,204,119, 30, 58, 13,187,181,211,179,177,209, 6, 67,135,110,109,247, +178, 94,151,249,149, 89, 96, 93,178,140,102, 87,111,111,202,202,112,150, 26,119, 43,140,196,139, 42,154,133, 34, 77,210, 69,162, + 44,100, 56,228,180, 23,149, 33,230, 80, 91, 40, 73, 79, 23, 1, 89, 69, 8,209,135, 66, 36, 68,249,145,105,240,227,174,128,147, +195, 70, 28,124, 20,127,117,199, 67,162,182,251, 33,222,249,189,218,185,229,120,197,255, 0, 30,145,141,102,152,117,194, 53,154, +241,111,149, 38, 44,196,121,178,237,113,239, 12,173,167,226, 41, 73, 82, 75, 18,155,175, 66, 13, 71,134,179,114,241, 5, 34, 50, + 18,220, 36, 28, 29, 71, 2, 71, 62,240,141, 93,155,159, 70,101, 15,212,150, 96,238, 21,103,133,115, 73, 92,102, 31, 76,136, 43, +185, 2,176,220, 98,234,153, 85, 20,164,236,146,176,130,144,163, 74,110, 1,169,212, 49, 34, 37, 61, 83,216, 88, 42,107,181, 61, +235, 70, 45,100,157,148,228, 83, 46, 45, 99,247,233, 6, 85,138, 5,171,229,208,227,241,155,108, 48,101,190,185, 73, 43, 72,121, + 73,170, 56, 83,110,181, 53,165,235, 48,205,242,120,232,130, 45,216, 53, 90,115,223, 80, 70,251,103,144,206, 4,101,217,242,159, + 37,104,137,118,186,220, 28,152, 67,138, 79, 14, 60, 93, 10, 8, 43, 73, 40,170, 72,251,213,251,193, 36, 56,233,222, 83, 72,252, + 77,201, 49,191,118,131, 69,207, 22,222,221,119,143, 32,201,158,195,236,184,164,227,146, 69, 89,102,115, 15, 39,145, 97,193,178, +129,249,127, 50,180, 62, 42, 41, 7,173,117,190,114, 96, 34, 36, 72, 0,170, 62, 89,118, 93,121,232,127,210,221,239,179, 48,110, + 25,223,113,144, 7,113,110,164,178,150,127, 12,252,180, 96, 65,160,242,202,128, 42,160, 20,169,160, 27,238, 78,185,238,165,154, + 45,104,196,233,249,171,216,244,237,212,241, 93, 3,172,149,105,101, 43,177,233,164,146,205, 36,144, 30,227,118,207, 11,238,182, + 54,238, 41,156,193,110,109,165,221,192, 88,162,219, 85, 40, 22,218,197, 20,149, 15,104, 53,214,127, 83,233, 88,253, 66,163, 85, +240, 19,137,237,252, 65,226, 15,120, 90, 29, 47,170,228,116,235,133,212, 76,194, 99,152,252, 8,224, 71,113, 92,211,150,254, 87, +246,199,231, 41,236, 51, 35,114, 52, 5, 18, 82,204,198, 18,250,146, 61,129,105, 91,127,164,107,202,115,126,141, 99, 78, 79, 77, +242,128,236, 49, 18,251,222, 43,214,176,190,180,100,215, 22,186,136,204,246,137, 24,253,205, 36, 87,182,255, 0,150,206, 33,143, +220, 90,184,230,247, 5,221,139, 74, 11, 12,113, 13, 50,162, 13,126, 36, 2, 73,250, 9,166,180,186, 55,210,108, 12, 73,137,221, + 35,113, 28,142,145,246,128,239,237, 44,178,250,215,213,204,252,184, 24, 83, 17, 72, 60,198,178,246, 18,205,236, 14,186, 74,193, +143, 90,113,155, 99,118,139, 51, 41, 98, 11, 73, 8, 66, 16, 0, 20, 2,131, 97,175, 82,132, 4, 0, 0, 48, 11,202,231, 51, 50, + 73, 46, 74,155,169, 40,172,210, 73,102,146, 75, 52,146, 89,164,146,205, 36,149, 5,234,219,182,126,168,114,174,228, 98, 19,251, + 9,144,202,182,118,254,236,164,227,189,193,101,153,166, 58,224, 91, 89,156,205,225, 55, 27,120,168, 41,148,227,113,223,183,169, + 72,170,169, 37, 43,232,213, 70,215, 77,201,198,174,185,249,177, 6, 67, 88,105,196,177, 12,123,181, 18,255, 0,194, 71, 53,133, +213,113,114,172,182,191, 38,100, 64,233, 61, 89,131,137,110, 29,229,140,116,254,240, 60,151, 57, 79,236,247,230,163,117,186,230, + 76, 92,242, 91,251, 50,230, 92,225, 54,217,182, 76,182,198,129, 46,220,238,115, 2, 90,164, 90, 37,255, 0, 56, 83,209, 12, 91, + 27,111,182,182,204, 8,254, 96, 81, 73,243, 92,162,149,184, 51,122,108, 68, 26, 17,208, 30, 32,146, 15,151, 32,210, 27, 24,188, +216,131,186, 77,220, 23, 62,112, 58,172,141,143, 57,107, 33,192,128, 8,243, 34, 94, 39,123,134,131,130, 54, 69,251,207, 19,221, +244,236,135,173, 43,158, 65,220,126,223,224, 76,228,215,190,218, 92,108, 48, 99,227, 55, 28,131, 34,134,150,218,159, 1,235, 99, +173,199,132,133, 92,157, 83,233,119,200,125, 79, 59, 54, 51, 14,215,154, 75,175, 33,192, 18, 12, 44,236, 72,198,169,207,100,102, + 36,119, 1, 19,192,238,212,252, 58, 51,134, 17, 36,112,210, 36,106,124,254,159,155, 41, 93, 10,196,229, 3, 17,180,153, 14, 35, +110,131,226, 46,236, 92,200, 68,241,214, 64,233,179,188, 24, 55,230, 75, 55, 54,207,215,219,169, 23,180,203,155, 11, 52, 77,150, +226,213,238,214,205,141,232, 18,177,119, 99, 99, 48,109,112,213, 33, 15,197,185, 49,116, 44,184,236,135, 90,109, 63, 10,207,156, +164,168, 37, 45,137,145,211,196, 43,222, 35,161,131,141,167,115,137, 13,230, 69,152,196,197,192, 0,158, 90, 41,102,227,117, 41, + 89,111,150,101,168,177,142,225,181,140, 8,128,136,119, 18, 18, 98, 73, 0,113,248,139,171, 95,211,213,183,213,119,102, 49, 78, +232, 51,149,195,187,102,191, 34,236,123,159,109,237,247,187,196, 25, 19,174, 69,120,196, 39,101, 68,249,233, 47, 15, 41, 6,239, +243, 8, 73,144,160, 16, 55, 77, 81,198,185,185,182, 99,100, 78,173,164, 65,193, 19, 32, 22, 31, 17, 98,192,107,240,183, 14, 62, + 43, 83, 2,188,172,104, 93,184, 74,108, 65,128, 50, 4,159,130, 46, 28,157, 62, 55, 26,240,229,163, 47,153,152,119,165,223,206, +187, 9,245, 97,123,245,149, 47,181,144, 47,189,243,188,185, 41,213,203,200, 46,120,244,182, 33,153, 52, 65, 17, 91,110,234,216, + 64, 67, 32, 50,141,207, 22,254, 17,175, 68,200,234,189, 22,220, 88,226,249,198, 53,197,180, 2, 65,219,183,225,237,212,247,175, + 51,197,233, 29,122,156,201,101,249, 17,149,146,125,101, 40, 22,126,207,140, 54,154, 14,237, 23, 76,224, 93,250,255, 0,230, 20, +190,229, 48,113,236,191,183, 88,197,143, 22,150,179, 22, 85,221, 6,208,231,200,161,196, 20, 9, 28, 25,187, 72, 90,131,106, 33, + 68, 37,165,147, 79,186,122,107,157,191, 27,160, 66, 4,194,217,200,142, 3,226,215,187,229, 31,136, 93, 54, 62, 95,169, 39, 49, + 25,213, 8,196,241, 47, 29, 59,254,115,195,192,167, 47,201,227, 6,252,207, 48,108,175, 58, 71,174,187,165,206,110, 41, 45,214, + 77,154, 62, 75,116,106,237, 36, 77, 75,139, 50, 29,136,227,110,189,229, 70, 40, 41, 1, 1, 65, 53,167, 20,141,235, 83,213,153, + 61, 54,209, 95,237, 0, 4,113, 96,193,185, 63, 7, 63, 98, 85,207, 70,226,245, 74, 77,191,189,145, 32,157, 28,238, 47,204,141, + 75, 14,239,112, 93,228,187,101,189,197, 21,184,202, 74,143, 82, 70,184,197,221, 46, 20,252,223, 61, 30,119,239,212, 79,125, 61, + 59,102,157,141,198,191,156, 98,248, 69,246,117,199, 43,146,220,203,116, 79,146,142,245,194,206,251,107, 40,154,251, 75,114,168, +138,233,163, 73, 81, 28,122, 84,138,246, 94,151,234,216,248,152,249, 80,182, 76,108,136, 17,208,151, 45, 46,192, 91,136,226,184, +111, 87,116,124,156,220,156, 73,211, 29,209,174,100,203, 80, 24, 60, 15, 50, 31,129,224,234,192,252,193, 99,126,100,184,204, 76, + 27, 58,252,191, 19,107,152,205,144,206, 57, 94, 47,116, 83, 9, 93,223,230, 18,210, 99,164,137,106,101,162,219, 97, 43, 39,139, +237,185, 82, 40, 72,168,213, 14,128,122,113, 19,134,102,225,185,182,200,114,226,252, 28,235,224, 66,209,245, 24,234, 96,215, 60, + 29,167,107,238,137,111,137,217,184,176, 97,175, 48, 87, 34,247,251, 6,252,232,127, 52, 27,109,171,177, 29,238,195,172,253,173, +236, 91,115, 88,157,123,145, 17,198,201,148,227, 6,169, 83,141,137,146,228, 59,229,130, 84,219,105, 8, 65, 93, 10,149, 80, 10, +122,172, 44,190,143,209,137,182,153,202,219, 25,135,119,220, 0,239, 58,150,224, 23, 33,159,133,215, 58,224,141, 55, 66, 52,212, +238, 75,241,251,201, 61,195, 64,252, 79,103,101,100,126,141,229,118,231,180, 61,145,237, 87,103, 45,134, 85,147, 1,202, 44, 51, +110, 46,169,216,237, 60,221,174,221,110,154,195,178, 92, 46,169, 5,197, 23, 95, 10, 82, 81, 85, 21, 44,144,154, 87, 92,133, 93, + 83,205,179, 34,203, 78,182, 66, 77,226, 72,211,220, 62,229,218,221,210, 60,170,177,170,164, 60,106,156, 95,135, 0, 8,126,253, + 79,222,171,222,196,250, 88,245, 1,217,255, 0, 81,240,103,217,109,183,168, 45, 43, 49,203,178,204,207, 49,145,145, 34, 78, 61, +144,216,111,139,159, 38, 20, 54,172,198,107,142, 34, 91,110,200,139,205, 74,136,218, 80,166,150,164,184,190,116, 55,243,186,157, + 23,227,144, 76, 79,244,225, 24,199,107, 74, 50,142,208, 78,230,225,161,254, 98,238, 52, 12,179,176, 58, 86, 70, 62, 72, 32, 72, +127, 82,114,148,183, 60,101, 25,110, 32,109,221,243, 2, 99,252,161,152,234, 93,118,212,235, 53,170,240, 34,185,119,140,220,135, + 97,186,137,177, 75,200, 74,203, 50, 16,146,132,184,138,244, 80, 10, 34,163,192,157,114,145,153,139,177,226,187, 25, 64, 73,156, + 59,106,185,179, 58,237, 63,121, 59, 45,220,174,225,205,236,182, 25,112,191,118,251,184,118,123, 28, 59, 92,140, 30,233, 98,179, +221, 49,187,149,138, 3,150,182,217, 41,189,201,134,215,201,169,160,202,208,182, 84,181,161, 69,193,229,144, 65,215, 67, 78, 85, + 57, 21,214, 45,152,140,171,148,159,112,145, 18, 18, 47,252,160,235,199,139, 3,166,171,153,191, 18,236,107,109, 53, 86,101, 27, + 35, 22,218, 99, 19, 19, 16,223,204, 64,218,205,193,200,215, 69, 80,200,244,183,235, 94,235,222,222,217,119, 7,184, 56,239,243, + 44,215, 18,145,219,137, 23, 92,190,196, 48,166,254,125,152, 86,136,240,114,117,220,174,115,148,221,249,217, 31, 52,185, 28, 25, + 99,132,101,199,220,243,117, 92, 53,172, 58,158, 28,105,182, 16,147, 70, 98,198,137,223,163,146, 96,192,124, 0, 51,106, 94, 66, + 93,131, 85,142,122, 86,116,175,166,115,139,202, 6,167,144,217,171, 0, 39,186, 71,227, 37,221,128,104,152,246,157, 22,190,213, +126, 89, 14, 91,240, 28, 2,205,158,118,174,198,187,180, 30,205,228, 24,174, 80,137, 12, 88, 31, 81,205,223,122,215,252,188,186, +180,173, 65,217, 9,109, 51, 2, 36,130,164,160, 21, 15, 49, 60,133, 86, 87,168,222,203, 12, 45,147, 27,227, 40,252,223, 39,196, +254, 3,229,211,159,102,137,177, 61, 46,213,212, 39, 76, 92, 99,202, 50,249,127,204,248, 91,196,252,205, 46, 90,235,170,135,217, +255, 0, 64,221,247,110,251,110,119,191,118, 60,134,225,220,214,101,218,114, 72,121,229,162,127,111,214,196,116, 65,177, 71,105, + 22,153,211,103, 52,230, 67,197, 14, 52,168, 78,181, 25,213, 48,235,106, 82,130,211,201, 90,158, 95, 92,163,105,242,101, 17, 6, + 35,105, 22,115,145,248,128, 31, 7,253,224, 72,112,116,109, 16,240,253, 63,145,184,121,209,153,155,137,111, 6,189, 26, 35,225, + 36,143, 51,150,210, 1,218, 70,175,170, 31,221,143,203,187,188, 42,244,157,219,110,205,118,227,182, 86,216,121,108,126,220, 57, +106,200,110, 88,252, 44, 17, 87,168,217,226,173,112,155, 65,184, 92,239,229, 74, 68, 79,152,109,107, 92,139,106,151, 39,204, 66, + 74, 22,132,132,171, 68,197,235,245,126,234,219,103,105, 35,205,112, 9,155, 24, 57,224, 35,205,185, 73,162,199, 80, 84, 50,253, + 57,119,237, 42,170,186, 64,144,169,137, 2,189,194,198, 28,101, 46, 79,196,193,228,227, 66, 56,174,247,196, 48,219, 51,182,123, + 86, 69,145,217, 35,179,158,148, 68,185,206,126, 83, 17, 28,154,221,205, 54,209,111, 91,174, 62,201,112, 41,228,178, 84,193,113, + 43, 87,193, 84,133, 20,235,135,182,226,230, 49,145,219,168,230,204,239,195,177,245,110,213,223,211, 76, 90, 50,148, 70,237, 9, +224,238,205,199,181,180,119,225,220,153, 53, 93, 89, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 44,210, 73,102,146, 75, + 52,146, 89,164,146,205, 36,150,105, 36,179, 73, 37,154, 73, 37,158,233,246,127,183,221,232,179, 91,241,254,227,192, 23, 11, 69, +178,231,110,200,226, 50,165, 45, 33, 51,173,114, 83, 42, 58,207, 2, 57, 36, 45, 52, 82, 78,202, 4,130, 40,116,124,124,153,208, + 73,129, 98, 65, 30,195,197, 70,112, 18,226,149,109,254,141,125, 58, 91,101,218,229,199,199,155, 81,179, 94,239,121,132, 6,157, +113,215, 26, 69,203, 32,105,214, 39, 44,182,181, 20,169, 10, 67,196, 37, 4,113, 69, 19,196, 14, 35, 86,101,213, 47, 32,252, 92, + 98, 35,236,143, 5, 1, 76,123, 57,191,189, 68,111,208,223,166,134,241,171, 30, 39,254, 95,229,102,199,113,251,190, 11,107, 75, +146, 36, 45,104,180, 95, 16,148, 77,109, 75, 82,138,148,181,132,236,181, 30, 73, 42, 85, 8,169,212,191,213,175,221, 41,110,214, + 82, 18, 62, 35,130,111, 34, 44, 3,112, 12,183, 95,189, 26,246, 98,251, 18,209, 13, 42,188, 91,145,143,174, 35,150, 21,217,175, +183,107,123,150,211, 10,204,171, 3, 98, 34,226, 60,133, 52,147, 13,106, 66,194, 8, 11,169, 42,169, 39, 77, 14,167,108, 73,224, +119, 59,184, 5,220,238,213,199,106, 70,136,159,103,253,136, 93,175,242,255, 0,244,205,142, 56,153,120, 93,182,225,143,222, 80, +164,169,171,166, 61,124,188, 91,103,182,143,229,145,109, 14, 54, 37,196,144,135,138, 29, 98, 27, 37,192,165, 30,110, 36, 56,127, + 19,226,212,229,214,111,151,204, 68,135, 97, 0,142, 36,240, 35,145, 37,187,180,224,152, 99,196,112,209, 77,149,232,111,211,108, +236, 38, 47,110,231, 89, 94,127, 17,135, 42,249,115,143, 25,235,132,247, 22,153, 57, 17,116,206,115,207, 91,165,226,162,167, 84, +164, 40,175,146, 21, 66,146, 8, 7, 81, 29, 90,241, 51, 48,117, 32, 14, 3,249,120, 39,242, 34,205,246,213, 70,143,232, 63,176, +208,238,114,114, 56, 78,228, 76,102,147, 93,122, 68,220,133,140,175, 35,106,239, 32, 73,135, 22, 11,237, 59, 57,185, 97,245, 54, +182,225, 49,240, 21, 81, 37, 9, 41,226, 64,212,143, 87,184,128, 62, 22, 28,182,197,184,147,193,155,153,247,166,253,188,123,253, +229, 79, 71,162,222,193, 35, 22,155,132,136, 51,191,202,211,156,153, 45,200,127,205,238,128, 55, 46,109,233, 57, 10,165,180,160, +240, 90, 36, 55, 53, 33,198,221, 74,185,162,148, 6,149, 26,135,250,165,219,132,156, 56,110, 67,128, 27, 91,135, 6,226, 19,249, + 17,102,251,118,161,119, 47, 66,253,148,131,133,102, 22, 76, 58,220, 14, 79,152, 90,191,147, 93, 39,228, 83, 46,215, 49, 49,198, +231,201,186,181, 34, 98,254,105,169, 75,116, 75,148,181,151, 16,242, 86, 62, 16,149, 0,148,128, 72,245,107, 76,224,100,116,137, +112,192, 6,208, 6, 26, 55, 1,193,153, 49,162, 44, 91,154, 39,233, 75,211,125,223,211,221,171, 38,149,149,223,220,200,179,108, +182,234,155,237,206,107,139,184, 56,134,203, 54,248,246,198, 90, 67,151, 89, 83, 37, 47,139, 81,210, 74,156,120,238,104,144,148, +132,164, 15,168,231, 12,131, 29,177,219, 24,134, 28, 59, 73,228, 0,231,216,158,154,182, 59,151,117,104, 92,173,118,235,196, 69, + 64,186,176,137, 16,151,247,155,121, 33, 73, 62,250, 31, 29, 80,140,140, 75,132, 82, 29,115,111,125,189, 35,247, 5,236,176,223, + 59, 60, 89,145,141,201, 72,173,170, 87, 0, 96,173, 63,120, 50,183, 30,104,121, 74, 63, 16, 73,169, 4,154,109, 74,108, 98,117, + 8,198, 45, 34,202,181,180,146,116, 66,123, 95,232,167,184,151,156,177,137,221,227,242,163,227, 17, 20, 31, 76, 88,165,170,184, +161,208,126, 27,175, 30, 95,218, 42, 20, 29, 5,119, 4,191,169, 68, 71,225, 46, 84, 97, 65,125, 87, 85, 67,133, 14,223, 29, 17, + 32,182,150,163, 33, 41, 66, 16,128, 0, 9, 74, 66, 82, 62,160, 41,172, 34, 73,226,174, 50,219,166, 73,102,146, 75,231, 46, 63, +249,187,122,158,185,249,159, 59, 96,198, 83,197, 37, 73,242,225,221, 5,104, 43,227, 60,235,197,170,250,143,155, 63,229,175,221, + 47,212,131, 57,144,180,221,127, 55,239, 84, 13,217,127,152, 90,241,252,100,201, 73, 1, 65,232, 87, 85, 39,236, 76,240,127, 78, +166,126,162,230, 3,242,215,238,151,234, 79,188,173, 80, 63, 55,127, 87, 55, 8,168,125,172,119, 22,230,170, 2, 62, 70,239,250, + 63,248,142,133, 63,169, 89,145,254, 90,253,210,253, 73, 70, 68,162, 81,255, 0, 53,159, 87,101,250, 72,199, 49,159,151,240, 40, +133,118, 7,167,190,224,117, 84,253, 82,204,254,229,126,233,126,164, 64,232,196, 79,205, 51,212,106,156,109,169,150, 60,121, 43, + 80,170,169, 14,230, 62,138, 86,105,208, 39,245, 83, 60,127, 37, 94,233,126,180,218,169,183, 95,205, 3,191,182,242, 11,118, 91, + 10,155, 62,216,183, 26,236,105,225, 51, 67,135,213,110,163, 47,228,171,221, 47,214,164, 10,214,159,205, 15,212, 2,225,153, 73, +179, 88, 43, 83,196,124,165,203,244,255, 0, 27,162, 15,170,125, 69,219,101, 94,233,126,180,150,184,255, 0,154, 31,169, 7,149, +229,155, 5,128,184,122,113,135,114,255, 0,251,221, 41,253, 85,207,143,242, 85,238,151,235, 73, 23,133,249,139,250,155,144,217, +113,220,126,196, 18, 0, 87,195, 14,228, 63, 92,211,160, 31,171, 89,238,219, 41,247, 75,245,169, 70, 46, 20,156,107,243, 12,245, + 41,120, 83,142, 75,176,216,209, 21,181,240, 42, 68, 75,136, 52,229, 79,218,152,116,174,250,179,212, 34,205, 10,125,210,253,106, +117,213,184,169,240,255, 0, 48, 46,253, 79,121, 41, 98,209,100, 13, 82,171, 81,141, 60,211,236,151,164, 62,171,245, 34, 88, 87, + 81, 63,240,203,245,171, 7, 20, 33, 23,207,204,127,212, 29,154,236,237,189,118,156,124,182,157,144, 76, 91,141,107, 90,111,252, +102,141, 71,213, 62,163,103,242, 85,238,151,235, 66,149, 12,129,187,249,154,250,170, 68,192,215,242,108, 99,229,137, 52, 38, 21, +215,149, 60, 63,246,253, 91, 31, 84, 51, 27, 88, 87,238,151,234, 66, 48, 71,237,127,152,111,168,169,240, 85, 57,251,126, 50,130, +145,208, 66,185,117,167,254,253,172,252,159,171,121,213,159,134,186,253,210,253,105,196, 7, 52, 58, 71,230, 91,234, 29,190, 78, + 34,217,141, 20, 32,241, 36,195,185,125, 31,253,251, 76, 62,173,103,145,254, 93, 94,233,126,180,132, 66,158,159,204,111,191,207, + 33, 14,179,106,199,150,159,218,164, 75,143, 74, 87,111,227,117, 40,253, 88,234, 18,255, 0,167, 87,186, 95,173, 64,179,168, 25, + 15,230,133,222,187, 26, 18,143,229, 22, 19, 36,141,210, 98,220, 41,211,221, 48,104,227,234,135, 82, 63,201, 87,186, 95,173, 49, + 75,147,127, 55, 14,250,166, 90, 97,194,177, 99,190,122,129, 63,137, 18,226,124, 61,211, 70,141,254,229,245, 22,125,149,123,165, +250,211, 2,165, 65,252,214,251,252,227, 11, 84,171, 6, 60, 31, 29, 56, 68,184,129,250,102,147,161,127,186, 29, 67,251,149,123, +165,250,212,128, 90, 46,191,155, 31,168,168,173, 3,108,177, 99,102, 81, 52, 33,112,238,100, 83,253,153,195, 69,143,212,236,254, +112,171,221, 47,214,162, 65, 81,162,126,107,126,174,222, 99,230, 28,199,113,143, 47,246,105, 6,237,191,219,112,212,101,245, 75, + 55,148, 42,247, 75,245, 41,109, 41,135, 31,252,208,253, 65, 92, 35,242,187,217,113,244,189,236,110, 29,200, 10,255, 0,181, 52, +234,142, 71,213,142,165, 14, 21,213,238,151,235, 68,141, 96,135, 40,244, 31,204,159,187,146,225,115,114,217,100, 18, 9,160, 31, + 43, 63,143,217,243,122,174,126,174,245, 63,252,186,125,211,253,104,158, 92, 89, 25,123,243, 7,206,161, 65, 68,135, 96, 89,211, + 49, 95,120, 8,242,192,255, 0,245, 53,253, 58, 20,126,175,245, 82,127,203,167,252, 51,253,105,121,112,239, 81, 99,254, 98, 61, +216,185, 7, 4, 8, 54, 62,104, 21, 72, 92,105,198,166,190,233, 99, 69,255, 0,119, 58,160,227, 85, 94,233,254,181, 63, 34, 39, +130, 84,185,254,100,254,170, 34, 42, 66,162,216,177,183, 80,201, 88, 74,132, 11,169,217, 29, 73,164,239, 15, 29,108,226,125, 79, +206,184, 57,174,191,116,191, 82, 9,164,190,156, 20,120,191,154, 31,169,119,203, 73, 85,151, 27,243, 86,160,149, 36, 67,185,248, +164, 40,211,248,253, 18,223,169,153,177, 26, 66,191,116,191, 82,128,129, 76,150,207,204,135,189,171, 83,137,187, 91, 44, 77,169, + 9, 10, 1,184,215, 1,191,251, 83, 14,179,109,250,171,212,128,210,186,189,210,253,105,128, 76,120,207,175, 30,237,100, 22,183, +167,166, 13,148, 45,170,236,152,243,105,183,211, 43, 84, 44,250,193,212,225,198,186,127,195, 63,214,165,180, 47,199,253,122,119, +102, 27, 2, 68,155,125,156,182,118,170, 99,205,254,153, 90,171, 47,173, 61, 76, 22,242,233,255, 0, 12,255, 0, 90, 32,174, 40, + 92,207,204, 55,188,173,188,132,197,183,216,212,202,235,186,163, 79, 39,165,124, 37,234,205,127, 88,250,148,134,181,213,238,159, +235, 81,242,194, 29,145,254,100, 61,243,180, 50, 36, 69,182,216, 20,215,237,121,145,110, 7,245, 76, 26,181, 71,213,206,161, 51, +173,117,123,165,250,211,121, 97, 13,183,126,105, 61,225,185,173,108,181,108,176,165,212, 3, 94, 81,167,210,191,254,115, 87,127, +221, 46,161,253,202,189,210,253,105,140, 16,135,127, 53, 63, 81,233,184, 57, 25,187, 70, 52,166, 82,118,254, 18,231,202,149,255, + 0,223,181, 33,245, 71, 63,251,149,123,165,250,211, 8, 58,144,159,205, 31,212,131,197,191, 42,207,141,132,168,144,162,168,151, + 63, 15,255, 0, 29,165,254,232,231,255, 0,114,175,116,191, 90, 91, 10,203,239,230,143,234, 62,214,105, 30,207,142, 56,125,241, + 46,103,195,221, 56,106, 31,238,143, 81,254,229, 94,233,126,180,230, 0, 47,199,255, 0, 52,159, 82, 95, 34,212,136,246, 76,119, +205, 81,163,156,162, 92,200, 30, 59, 82,112,210,255, 0,116,122,139,235, 10,191,195, 47,214,163, 32,200,153,252,208, 59,208,213, +184,202,126,217, 97, 75,225, 60,136,249,107,133, 43,255, 0,231, 52, 57,253, 85,234, 35,254,157, 94,233,126,180,128, 90,113,159, +205, 51,188,183,103,146,212,251,101,129, 33, 70,137, 45, 70,184, 15,254,180,195,160,207,234,199, 82,229, 93, 95,225,159,235, 82, + 17,143, 52,114,251,249,144,119,122,210,210, 95,110,223, 99, 83, 52, 5, 85,141, 62,180, 39,221, 47, 64,255, 0,119, 58,167,254, + 85, 95,225,159,235, 77,240,160,115,255, 0, 53, 30,239, 70,105, 78, 51,109,176,146, 5, 82, 21, 26,224,127, 84,193,169, 15,171, + 93, 83,255, 0, 46,175,240,207,245,164, 54,161,209, 63, 53,254,250,186,190, 79,218,113,224,198,244,164, 91,136, 59,125, 51,117, +108,125, 84,234, 95,249,117,123,165,250,212, 75, 34, 22,159,205, 7,191,183, 69,184,164, 89,108, 38, 58,126,234,147, 22,227,244, +239,252,102,165, 47,170,153,241, 26,194,175,116,191, 90, 76, 74,253,147,249,152,250,153,104,169,230,172, 24,250,162, 36,138,159, +148,185, 86,135,255, 0,198,234, 7,234,206,112,254, 90,189,210,253,106, 91, 10,241, 7,243, 65,245, 13, 48,184, 6, 63, 99,248, + 83,201, 39,229,110, 52, 39,255, 0,206,104,176,250,167,158,127,150,175,116,191, 90,139, 20, 45,191,205,103,212,171, 83,147, 18, +125,131, 30, 64, 89,160,164, 75,152, 61,125,243,181, 41,125, 81,234, 0, 56,133, 94,233,126,181, 33, 2, 83, 53,163,243, 37,245, + 5,113,228,181, 89,172, 33,164,210,188, 98,220,107,250,102,106,145,250,181,212, 71,253, 58,189,210,253,104,166,144, 2,252,202, + 63, 51,174,239, 99,176,154,116,218,236,134, 83,132, 14, 42,143, 62,155,154,120, 75,174,139, 31,170,125, 76,143,146,159,240,207, +245,168,236,138,220,223,230,111,221, 71,162,165, 77, 90,236,198, 74,129, 81, 31, 47, 59,143,135,255, 0,213, 87, 72,125, 82,234, +135,254,157, 63,225,159,235, 81, 34, 33, 3,185,126,107,125,228,183,220,211, 7,249, 77,132,182, 77, 9, 49,174, 21,255, 0,245, +154, 48,250,161,212,191,242,234,255, 0, 12,191, 90,139, 4,102,229,249,150,119,181,171, 31,243, 91,117,170,196,183, 41, 80,149, +198,184, 17,250, 38, 13, 71,253,209,234, 96,235, 93, 95,225,151,235, 73,180, 74, 71,243, 94,245, 48, 94, 33, 22, 60,111,200, 29, + 73,135,116,175, 74,255, 0,247,253, 16,253, 80,234, 3,249, 42,247, 75,245,168,162,182, 95,205, 27,212, 37,218, 56,150, 45, 24, +239,146, 15, 21,113,137,114,168,251,102,234, 51,250,165,212, 34, 91,101, 94,233,126,181, 49, 20,106,245,249,143,247,250, 4, 38, +167, 68,180,216, 84,210,233,203,156, 91,129,161, 35,194,147, 6,170, 67,234,231, 80, 50,219,178,175,116,191, 90, 39,148,162,255, + 0,251,152,119,253, 54,181, 73, 54,107, 9,152, 55, 74, 68, 91,143, 19,245,124,229,127, 78,154,127, 87,115,227, 38,217, 87,186, + 95,173, 35, 80, 73,185, 95,230,245,234, 67, 24,113,128,230, 63,142,169, 14, 40, 37, 99,228,238,149, 0,251, 41, 59, 86,241,254, +169,117, 27,120, 66,175,116,191, 90, 28,162,203,100, 31,206, 15,190,111,201, 74, 36, 88,172, 9, 96,245, 41,139,114, 7,244,204, +212,238,250,153,213, 33,252,148,255, 0,134,127,173, 65,194,131,148,254,114,157,255, 0,179, 73,242, 45,246, 28,117,196,248, 23, + 34, 92,201,167,251, 51,134,137, 95,212,190,165, 32,251, 42,255, 0, 12,191, 90,144, 1,104,179,254,114,254,163,103,147,243, 88, +254, 54,129, 66, 83,198, 37,208,116,250,103, 29, 47,247, 47,169,127,114,175,240,203,245,165, 32, 2,252, 31,157, 15,127,188,245, + 70, 85,139, 28, 14,164,248,195,186,110, 7,179,248,237, 56,250,149,212,155,228,171,221, 47,214,162, 8, 41,131, 26,252,222,251, +205,120,152,220,105,150,107, 10, 18,189,137, 68, 91,136,222,149,241,152,116,227,234, 79, 82, 35,228,171,221, 47,214,152,150, 70, +191,253,212,123,197,230,150,205,162,198, 7, 36, 37, 63,195, 79,220, 43,169,255, 0, 23,170,255, 0,238,127, 83,118,217, 87,248, +101,250,211,130,137,159,204,215,187,194,114, 97,255, 0, 42,178,212,176,167,255, 0,195, 79,234, 20, 5, 63,197,123,244,191,221, + 14,165,253,202,191,195, 47,214,153,215, 20, 91,109,151, 43, 85,201, 81,156, 28,152, 8,226,165,120, 87, 92, 6, 14, 64,144,116, +211,138,101,198, 44,182, 91,141,165,230,228, 41, 36,133, 21, 41, 39,195,195, 81,200,182, 70, 90, 41, 16, 20,137,183,140, 83, 31, +138,208,143,199,152,167,214, 65,213, 57,215,108,148, 92, 5, 38,209,220, 59, 68,136,107,113, 33, 42, 82, 85,176,167,191, 85,191, +101, 53, 35,102,138, 67,247,184,215, 71, 17, 33,134,192, 80, 1, 52,165, 60,117, 90,112,144,209,245, 67,223,216,138,218,152,143, + 62,224,219, 83,144, 60,170, 37, 70,190,250,232, 96,152,196,234,165, 25, 45,238,204,199,161, 60,155,122,144, 10,212,118, 31, 94, +152, 89, 57, 35, 70, 65, 26,181, 94,113,171, 13,254, 43, 87, 22,211,229,186, 7,222, 3,199, 84,114,161,108,195,133, 47, 48, 50, +122,159,220, 76, 65,151,126, 94, 43,104,242, 72, 27,237, 79,103,134,170, 87,137,113,213, 60, 44, 26,163, 61,164, 54,158,226, 38, + 86, 49, 96, 91, 45,221, 82,133,204, 5,243, 70,212, 26, 32,169, 37, 93, 5,107,246, 87,232,215, 73,208,253, 59,147,212,111, 16, +143, 47,183,225,170,183,137, 89,178, 65,149, 93,234,167,213,206, 45,233,176,175, 18,237, 76, 86, 36,229,206, 71,109,187,210, 37, +150,164,195,113,185, 76, 20, 56, 26, 80, 1, 73, 88, 77, 22, 8, 88,234, 5, 43, 93,125, 43,233, 79, 66, 99, 98,192, 78,216,188, +199,107, 16,235,168,175,167,136,128,227, 95,237, 76, 61,192,192,238,189,224,244,225, 97,245, 65,139, 69, 9,186, 34, 11, 3, 32, +142,194, 64, 15,178,218, 72, 23, 4,129,212,211,136,112, 15,239,120, 29,115, 30,181,244,157, 80, 31,184,198,139, 8,252,195,223, +241,126, 71,196, 44,158,167,141,178, 78, 57,253,202,152, 98,244,233, 64,149, 41, 91, 10,129,246,107,202,231, 88,224, 22, 20,160, + 93, 65,133,153,202, 50, 95,183,182,237, 26,166,194,186,171,109, 1,144,229, 21, 51, 20, 50,175, 48,229, 33,213, 18, 27, 82,149, + 95,170,163, 64, 34, 32,104,134, 3, 47,198, 59,133,252,174, 90, 96,242,252, 46, 69, 53, 39,216, 53, 58,107,125, 83,136,173, 89, + 44,248,119, 75,170, 11,148,162,147,201, 62,255, 0,134,186, 59, 16,144, 65,166, 68,180, 25,232,144, 54,113, 59,125,186,177, 93, +135,129, 83,109, 17,123, 50, 98,132,188, 37, 15,189,186, 15,213, 67,160,203, 66,136, 2, 45, 15, 23,183,189, 29,187,139,192, 6, +235, 67, 94,155, 43, 89,249, 57, 36, 6, 9,135, 20,236,226, 49, 56, 54,120,237,168, 38,135,142,244, 30,202,107,155, 55, 91,188, +162, 27, 2,211, 14,193,143, 59,117, 12,161, 73,242, 92, 78,223, 81,209,229,125,140,152,200, 40,247,155,125,138,202,235, 45,249, +137, 9, 43, 74, 78,254,221, 79, 30,203, 36, 89,148, 4,130,135,151,219,140,251,131, 12, 91, 22, 86,149, 39,144, 74, 42,106, 2, +106,122,123,134,180,105, 5,142,136,155, 31, 64,174, 43,119,110,123, 91,233,115,181,223,248,143,222,245,252,254,113,115,138, 29, +182,227,201, 52, 83, 1,207,197,252, 93,246, 82,135, 20,146,126,232,168, 21, 58,245,239, 77,122, 24,221, 92,108,188, 49, 35,135, + 96, 61,189,235,107,167, 98, 57,220, 70,157,255, 0,151,217,146,151,110,125, 83,118,174,126, 97,112,118,108, 24,198,216,228, 70, +163,183, 20,181,193,183,228,189, 47,138,252,180,168,124, 41, 8, 41, 59,248, 39,125,206,187,250,125, 27,141, 92, 12, 0,226,182, + 37,141, 2, 11, 15,179,161,126,162,241,220, 67,183,253,250,123, 25,192,210, 21,140,195,106, 42,252,212,171,146, 93, 91,241, 83, + 39,154, 77, 78,220, 86,145,244,131,175, 33,245, 87, 77,142, 54, 84,171,135, 0,184,235,254, 18,204,202,171,203,115,175, 42,231, + 51,202, 87, 14, 2,148, 39,216, 53,207, 67, 20,201, 81,156,216,168,253,180,239,195,136,133, 54, 27, 14,111,241, 38,149,241,212, +165,209,247,113, 80,149,200,237,207,186,147, 30,177,169, 60,170,158, 36,142,190,205, 97,221,211, 4,108, 83,132,220, 37,188, 91, +185, 87, 57, 13,134,223, 81, 43, 4,132,141,253,180,213,200,244,248, 4, 51,105,117,249,151,228,121, 4,251,122,162,199, 39,205, + 63,119,232, 26, 37, 56,240,137, 69,137, 41, 78,219, 43, 44,182, 77, 42,117, 10, 5, 70,167,175, 74,107, 65,171,102, 9,245, 71, +108, 41,155,112,186,169,101, 68, 40, 37, 32,138,251, 58,234,181,145, 3,130,148,100, 66,100, 72,118, 60, 21, 58, 72, 43,108,215, +237, 59,232, 76,197, 56, 46, 87,236, 25,145,239,113,144,241, 32,254,201,175,211, 77, 25,152, 58, 69, 78,186, 22, 97, 69,114, 32, + 86,244,168,251, 53, 92,201,202,138, 82,184, 42,115,241,220, 42,119,240, 73, 41,235,245,105, 70,200,187, 20,220, 87,171,102, 61, + 42, 12, 52,207,101,234,132, 16,179, 67,245,232,224,192, 38,213, 79,188,223, 38, 92,224, 47,201, 89, 45, 37, 31, 22,245,241,174, +137,228,198, 90,166, 33,146, 80,118, 92,249,172,196, 14, 42,139, 52,219,217,169,154,162, 20,132, 83,115,184, 36,232,173,199,117, +194,124,133,129,184,175,142,179, 47,204,132, 75, 5, 40,214, 85,149,128,167, 31,199,112,185, 50,238, 52, 50,147,202,149,251, 53, +205,229,217,101,146,209, 91,129, 17, 10,118, 53,149, 88,167, 90,188,137, 41, 0,186,163,185,246, 87, 66,149, 22,146, 19,121,193, +122,191,100,152,181,168,152,208,194, 3,188,104, 72,166,137, 69, 87, 13, 74, 97, 96, 85,238, 73,144,219, 38,177,243, 45,148,135, +153, 53,228, 58,143, 29,106,209, 27, 18, 51, 12,191,112,142,227, 72, 98, 74,154, 82,194,162, 42,169, 59,214,154,182,104,112,132, +108, 80,243,123,140,107,197,195,203,117,127, 0, 33,198,253,149, 78,231, 87,107,129, 80, 50, 66,109,249, 75,237,203, 84,100, 40, +121,109,130,145,239,213,216, 64, 5, 23,117,162, 76, 87,110,215, 36,204, 89, 32, 87,169,212, 37, 32,250, 41, 4,126,126, 90,205, +162,208,109,104, 88, 91,132, 83,111,126,161, 52,130, 25, 62,236,151,236,129,168,128, 9,142,212, 10,117,169, 30, 26,106,196, 73, +213, 49, 8,135,110, 68,203,101,109, 19, 77, 86,170, 44,215,216, 69,117, 87, 49,134,161, 40,185, 41,205,121, 4,105,176, 19,108, + 82,147,197, 20,169,215, 59,107,196,184, 87, 97, 20,215,140, 99,182,137,150,161, 45,245, 36,212,128, 5, 71,211,172,108,187,236, +228,136, 32, 29, 40,119,139, 6,177,193, 75,115,150,132,173, 4, 2, 7,215,174,135,211,134,118, 30,197, 27, 42,113,162,172,127, +150, 91,101, 91,228, 78,109, 60, 93, 65, 41,108, 15,236,141,117,163, 82,197, 80, 60, 82,250,113,231,175,243,154, 97,164,149,202, + 52,219,245,232, 54,216, 32, 20,226, 93, 50, 89,187, 63,146, 77,112,161,136,202, 10,103,225,115,111,118,169, 30,161, 8,243, 83, +242, 73, 69,222,244,237, 53,199,155,187, 45,146,150,197, 66,199,215,190,171,203,173,196,104, 20,191,110, 83,172, 95, 79, 78,193, +177, 55, 54,219, 28,173,213,144,106, 7,141, 41,170, 51,245, 29,100,176, 44, 81,134, 25, 33,214,169,157,180,153, 30,224,204, 89, +109, 20, 56,120,245, 26, 23,250,177,150,160,168, 74,150, 91, 14, 57, 39,252,224,155, 71, 31,136,199, 81,229,238, 4,104,191,191, +150,221,200, 91, 2,173, 49,235,234,229,201,118, 60,197,126, 35,128,138,251, 53,208,199, 31,202,224,128,181,227,232, 69,189, 51, +191, 28,252, 68,237, 95, 15,102,172, 11,192,228,145,173,208,249, 54,203,125,233,246,193,112,209, 53, 61,116,199, 33,249, 38, 53, +133, 47, 16,183,192,131, 49,196, 56, 74,152, 74,186, 31,112,208,238,176,144,163, 48, 2, 45, 47, 43,143,108,154, 17, 25, 4,180, + 56,210,154,206,150, 33,145,213, 13,215,155,143,118, 36,219,228, 41,213, 54,161,176, 9, 20,246, 13, 74,190,156, 9, 81,220, 80, +136,253,196,149,114,188,176,249, 4, 36, 29,201,246,146, 52,106, 48, 3,145,216,141, 41, 48, 69,115,220,178, 93,206,225, 21,248, +196,213,180,131, 81,208,104,223,181,140, 67, 20,163, 23, 91,172,153,101,214,231,111, 49, 1, 82,165, 45, 65, 9,226,119, 36,154, + 0, 62,179,167,174,136,141, 0,226, 81,163, 73, 60, 23,231,112, 61, 64,206,244,253,104,184,224, 48,102,214,226,225, 45, 92, 86, +133, 17, 73, 1,176,149,160,116, 53,109, 69,104,247,235,232, 79, 76,122,112, 97,227, 68,144,211, 32, 19,226, 87,160,116,140,120, +208, 35, 22,213,181,241, 92,147,158,247, 50,243,155,228, 9,185, 77, 89,112,173, 99, 99,224,146,173,133, 62,205,117,240,248, 70, +139,166,141, 97,254,223,110,245,246,215,177,214, 91, 38, 13,232,127, 15,199,178, 8,192,219, 31,199,162,193,145, 24,214,170,110, + 92, 96,135,146, 64,161, 31,134,226,135,215,174,127,124,103,108,163, 45, 99, 45, 8, 92, 85,213,249,247,202, 35,128, 92, 61,158, +118,198,255, 0, 96,201,238, 88,123,206, 85, 86,217, 50, 34, 7,147, 94, 46,134, 93, 40, 14, 38,190, 10, 0, 17,244,235,231,110, +165, 87,236,178,167, 68,181, 48,145,137,246, 22, 92,229,173, 9, 17,222,201,103,255, 0, 11,239,204,129, 56, 56, 67,142, 18,145, +244,248,106,149,217,176, 1,149, 9,151, 41,235, 30,193,238,216,253,151,205, 59,174, 66,104,173, 97,254,244, 58,130,171,243,139, + 29,210,198,167, 30, 88, 43,115,153, 80,167,211,173,124, 92,136,200, 39, 8,173,169,102,241, 13,137,136, 20,121,164,209, 64,245, +233, 77, 89,180, 14, 73,192,117,230,237,105,146,203, 37,231, 15, 23,156, 39,128,253, 90,175, 18,164, 75, 39, 92, 50,194,205,234, + 36,117,205,162, 20,216, 60,253,251, 15,233,214, 94,126, 68,161,160, 77,189, 29,187,200,198,162,194, 77,153, 14, 14, 92,128,251, +117,144, 77,135, 86, 75,112, 69,108,182,124, 99, 37,105,187, 19,235, 1,240,145,199,126,186,170,103, 96, 46,201,206,214, 82,178, + 44, 37,171, 85,153,225, 13,124,110, 44,212,182,175,235,120,131,246,107, 67, 10,215,151,197,193, 68, 7, 72,153, 6, 5,125,202, + 44,172,200,133, 32,252,210, 84, 15, 94,132,107, 71, 30,248, 70,210,227, 68, 79, 44,174,183,244,159,233,106,215,133,224, 49, 59, +201,220, 23, 4,139,241,136,183,162, 71,119,100, 54, 93, 71,150, 43, 94,191, 9,167,215,175, 97,244,175,166,171,200,128,186,113, +227,160, 11, 95, 18, 62, 84,163, 17,243, 30, 61,192,255, 0, 98,225, 47, 92, 30,166,111,157,199,238,220,235,116,119,202,172, 17, + 36, 62,142, 85,248, 85,229,184, 91,175, 74, 1, 65,244,211,111, 13,123, 52, 68, 97,240, 69,118, 17,163,225,126, 67,128, 84,254, + 17,159,121,174,190,251,235, 45, 58,213, 16,170, 42,189, 18, 9, 72,223,218,154,215, 70,226, 10, 1,142,210, 35,246,212,174,150, +193, 51, 43,111,112,187, 62,197,245,136,143, 63,155,227,228, 34,124,180, 81, 72, 93,173,105, 8,109,111,120,242,109,194, 17, 90, +253,210,159,102,222, 79,245, 11,165, 9, 8,100, 68,124, 92, 37,248,131,248,172, 78,185,129,177,167, 30, 10,172,207,225,220,175, +183, 9, 15, 90,118, 91,156,137, 30,234,107,206,105,178, 49, 33,215, 47, 42, 73, 74,120, 54, 25,146,218,110,206,165,205,252,197, + 18,175,175,166,175, 89,155, 6,209, 87, 52, 50,126,130,242,213, 29,118,247, 1, 11, 2,128, 31,118,185,251,154,122,162, 68, 48, +100, 61,153, 14, 89,238,201,109,198,200,100,147, 85, 83, 85,200, 50, 10, 39, 69,178, 78,109,230, 78, 83,188, 79,150,210,183,250, + 41,190,137, 86, 43,197,209, 1, 71,133,225,236,128,137,112, 88,168, 74, 40, 82, 7, 83, 65,161,154,152,241, 82, 18,101, 5, 83, +151,107,150,135, 84,146,135,214, 77, 82, 71,191, 71, 96,201, 5, 38,217, 58,235,112,157, 33,133, 36,166, 47,137,223,233,208,167, + 16,144, 44, 84, 40,215, 85, 90,231, 11,115, 10, 37,178, 73, 63,175, 82, 46, 98,162,189,221,111, 50,238,114, 10, 99,172,151, 0, + 21, 27,244,166,131,160, 77,181,212,107,106, 46, 18,225, 62,203,202, 33,196,215,237,165,116,164, 34, 53, 78, 34, 66,217,108,255, + 0, 52, 65, 74, 35, 73, 39,228,158, 28, 69,126,154,234,212, 77,102, 61,232,127, 19,169, 54, 72, 51,224, 74,126, 60,181,131, 13, +100,238,125,135, 66,187, 36, 66, 58, 35,194, 47,197, 54, 96,216, 70, 53, 61,228,188,162, 8,110,148, 39,174,177, 50, 51,172, 33, +149,145, 24,133, 97, 93, 21,139,124,131,118,212, 41, 37,198, 71, 47, 15, 13,181,129,253, 89, 73,203,162, 78,216, 50,253,126,201, +141, 77,196, 92,101, 10, 1,215, 42, 7,188,245,211,215,101,155,147, 60, 87,235,184,166, 45,111,177, 69,106, 50,199,205,132,239, + 79,163, 90, 53,217, 55,225,162, 20,163, 21, 94, 93,113,149,200, 14, 74, 46, 16, 84,178,145, 83,224, 85,254,141,107, 70,224,220, + 16, 77,104, 77,199,183,239, 71,182,188,146,239,196,232, 36,126,173, 30, 25, 64,114, 72, 65,106,176,118,252, 89,224, 32, 56,225, + 46, 47,145,175,186,154,144,191,114,159,148, 23,185,120,108,187,140,158, 17, 84, 84,180,236, 62,202,106, 99, 41,147, 26,194,137, + 35,183,115,173,146, 67,174,238,175, 16, 61,221,116,195, 51,114, 66,176,141,228,150, 84, 64,181,199,113, 35,138,148, 42,162, 61, +180,211,194, 74, 81, 1, 36,197,252, 71,223,113,127, 18,146,162, 19, 93,246, 26, 36,138,114,193, 18,182,182,185,210,155,105,161, +248,136,248,142,171,206, 91, 80,230, 2, 56,204, 73,161, 78, 72, 77,126,100,164,164, 31,163, 76,100, 8,213, 15,130, 68,189,228, +121, 45,166,115,209,209,200,171,145, 41, 3,223,162, 67, 18, 19,226,156, 88, 93, 88,221,173,205, 47,210, 88,141,111,156, 74, 82, +163,241, 18,124, 56,234,134, 94, 4, 57, 39,223, 36,237,150, 24,179,173,165, 51,213,201,161, 78, 39, 84,168,145,171, 72,232,139, + 11,143,106, 93,180,227, 88,130,217,249,114,177,230, 45,102,181,246, 87,125, 28,100, 90,144,136, 42,124, 27, 38, 39,100,188, 42, +229, 23,136,242, 5,118,166,231,254,131, 80,148,236,176, 50, 36, 76, 98,155,113,158,238,227,205, 45,242,219, 40,162,129,228, 64, + 21,165, 53,147,118, 5,132,241, 68, 57,128, 41,209,187,149,106,188,175,228,227, 37, 37,151, 5, 72,218,128,211, 76,122,108,130, + 29,153,125,138, 29,179,190,141,217, 94,118,202,178, 10, 26, 81, 72, 6,158, 27,141, 6,206,139,205, 22, 57,186, 45, 55, 62,236, +217,242, 87, 28,117, 64, 38, 99, 35,146, 72,166,244,223, 71,171,167, 24,232,165,251,136,203,138, 70,255, 0,197,113,254, 98, 23, +110, 31,143,187, 31, 87, 42,107, 95,246, 31, 11, 42,126,110,170,157,195, 45,183,251,197,245, 82, 56, 41, 9, 64, 37, 73, 80,167, + 94,154,236,137,139, 42,242,118, 94,231, 71,188,140,141,203,122, 42, 26, 83,156, 77, 43,208,237,170, 80, 96, 84,157, 30,110,205, + 18,208,223,146,242,255, 0, 16,128,165,123,129,220,234,173,132,182,136,102,197, 55, 26,183, 48,169,110,185,214, 42, 71, 51,250, +244, 56,200,158, 41,188,192, 83, 54, 58,140, 78, 83, 42,144,250, 80,167, 57, 17,241,117,235, 77, 83,190,203, 4,152, 33, 27, 89, +109,200,236,248,132,135,124,222, 8,242, 91, 20,247,109,171, 20,155, 25, 74, 54, 58, 7, 38,211,136,177, 5, 50, 26, 9, 74,143, +136,167,142,173,195,120, 69,222, 17,139, 77,163, 24,147, 5, 75,124,167,131,137, 5, 4,253, 99, 84,238,149,142,152,204, 5, 94, +101, 55, 72,152, 76, 89,247, 88,143,124, 17, 18, 86, 55, 27, 40,252, 40,235,253,181, 39, 94,137,232, 62,137, 44,219,133,147, 31, + 12, 8, 63,111,114,217,232,248,230,251, 1, 28,138,230, 46,238,103,215, 28,226,255, 0, 42,116,231, 73,184,203,117,201,139, 93, +119, 43,113,126,105,175,188,147,175,161,108, 3,107, 14, 11,190,193,172,194, 78, 70,173,248,160,157,171,110,227,124,204,173,214, + 53, 0,228,233, 51,163,180,210, 23,176, 52,112, 26,106,145, 96, 8, 91,146,145,218, 36, 2,251,139,234, 75,184,145,108, 29,134, + 17,236, 77,169, 13,170, 15, 56,104, 52,252, 54,213, 24, 10, 26,108, 56,131, 79,167, 92,182, 49, 18,180,120,174,111, 19, 24,131, + 41,158, 39, 69,205,125,193,206,109,183,159,150,200,157,248,103, 77,139, 10, 82,171,247,137,122, 3, 78, 18,122, 86,164,235,199, + 62,160, 97, 24,245,139,219,153, 7,252, 81, 18,252, 74,224,122,188,133,119,200,119,254, 73, 70,103,114,237, 81, 97, 53, 10, 66, +128,124,113, 88,233, 93,235,174, 42,204, 9, 72,184, 88,214,222,202, 96,239, 4, 73, 22, 6,216, 82,135, 47,186, 43,237,173,127, + 86,179,207, 79, 32,170,241,202, 33, 38,229,249, 18,100,203,109,199,192, 44, 57, 90, 86,157, 60, 53,115, 31, 28,196,171,181, 91, +185, 66,125,153, 81,153, 76,168, 67,131, 70,133, 84,233,236, 58,215, 7, 77, 85,168, 69,121,201, 19,122,184,197,142,251, 10,168, +107,138,182,247,111,161, 85,197, 41, 5,230, 63,113,174,150,166, 86,193,170, 29, 74, 8,219,232,209,127, 97, 27, 14,171, 54,217, +145, 38, 85,163,253,208,203,110,249, 19,230, 48, 90,155,105,116, 36, 86,149, 26,189, 62,157, 92, 98,202, 95, 19, 43, 47,182,249, +157,234, 77,238, 45,193,231, 20,217, 64, 21,174,221, 69, 70,177,115, 49, 33, 88, 68,140,137, 10,209,200,243,213, 75,142, 31,126, + 71,198,148,208,208,245, 61, 53,155,229,128,116, 10,221, 80, 40,143,100,161,220, 50,140,174, 5,145,165,149, 69,146,242, 75,131, +216,223, 46, 74,251, 0,214,255, 0, 78,233,163, 34,248, 65,184,149,167,131, 71,153,100, 65,225,252, 23, 89,250,154,238, 28,206, +223,246,112,197,178,130, 26,135,111,156, 83, 77,210,218,225, 65,118,107, 74, 52,241, 11,101, 39,234,215,209,254,159,162, 53,200, + 68, 15,146, 37,189,139,166,199,196,142,233, 72,142, 36,127, 5,241,235, 34,126, 67,151, 87, 36, 54, 60,218,211,204,113,123,239, + 78, 68,239,212,212,131,173,250,194,216,180,143, 4,173,106, 98,105, 67,241,218, 88, 68, 67, 90,240, 20, 87, 37,171,245,158,154, +156,193,224, 57,168, 9, 65,220,190,139,168,125, 6,230, 86,235, 30, 70,254, 39,149, 57,195, 14,200, 98,200,199,111, 74,221, 69, + 16,230,163,202, 83,201,241,228,210,130, 93, 20,222,169,214, 87, 82,199,142, 68, 77,115, 31, 12,129, 7,193, 79, 35, 22, 57, 24, +210,143, 19,196,119, 16,255, 0,199, 84, 99, 63,237,212,158,218,231,215, 60, 46,246,186, 76,129, 50, 77,184,186,118, 11, 68,103, + 75, 97,196,143, 20,184,126, 32,125,131,223,175,156,115,241,101,139,108,234,151, 24, 72,131,236, 44,188,234, 81,209, 70,106,200, +212, 16,236,184,235,243, 61,159, 71, 77,103,249,133, 84,176, 50, 7, 50,230,218,238,173,166, 58,127, 18,160, 46,158,253,180, 45, +165, 52, 98,141,101, 86,150, 3,108,150,219,171,188, 2,148, 41,253,154,233,156,197, 40,193,210,221,134, 20, 53, 23, 27,117,158, + 78, 45,100, 29,181, 45,242, 70, 21,133, 97, 99,139,181, 89,156,101,176,128,148,157,148, 8,246,234,189,162, 71,130, 20,244, 43, +101,234,213,103,189,220,150,164,165, 35,129, 11, 73, 3,111,110,161, 8,205, 45,234, 93,158, 37,141,215,222,132, 2, 65, 82, 64, + 39,253,157, 33, 25,130,160, 75,160,242,112,123, 75, 51,229,202, 85, 57, 54,217, 82, 1, 63,217,213,208,100, 98,202, 60, 18, 75, + 23, 24, 54,247, 92,147, 78, 74, 4,133,125, 91,106, 21,214,100,164, 10,136,230, 73, 33, 82,139,176,209,248, 10, 34,167,233,235, +169,203, 29,194,152,154, 34,214, 81, 42,107,205,169,224, 4,118,134,223,101, 53, 24,210,193, 62,224,129,231, 25, 53,214, 12,114, +236,122,148, 57,208,167, 69,134, 48,151, 20, 57, 30,197,187,183,249,173,234,219,102,145, 50, 74,148,144, 71,194, 21,238, 21,241, +209,165,211,226, 80,229, 34,203,123,157,192,187,186,215,206,135, 15,226, 2, 40, 61,231, 85,165,211,226, 16, 68,137, 41,146,203, +159, 94,103,194,141, 31,145, 9, 70,228, 87,173, 53,156, 48,162, 29, 89, 94,243, 14,225,223, 96, 73,142,168,156,138, 18, 2, 72, +250,181,163, 28, 72,237, 77,170,147, 55, 55,113,235, 83, 34,180,127,101, 47,234, 21,208,255, 0,104,200,132,150, 67, 14, 99, 62, +230,201, 90, 87, 86,134,218, 25,160, 59, 38,114,182,222,114,185, 40,136,210, 34, 26,185, 74, 80,123,244, 74,232, 9,196,138,223, +133,101,146,154,121, 78,201, 63,137, 95, 31,211,169, 75, 28, 20,198,101, 77,200,123,137,252, 71,150, 40, 64, 0,172,251,201,255, + 0, 78,165, 86, 18,136,185, 67,189,102,205, 94,224, 55,111, 10, 1,225,177,220,123, 55,212,109,164,192,128,141, 9,115, 42, 21, +154,200,155,156,159,144, 96,132,186, 5, 84,107,239,174,165,176,128,161, 57,186,214,167,133,130,239,242,140,175,148,147,240,154, +125, 59,233,252,131, 48,134, 78,137,170, 45,213,149,216, 87, 32, 40,121,200, 4, 19,227, 83,182,129, 44,111,137, 73,244, 73,151, + 22,147, 49,105,144,229, 57,169, 69, 74, 62,192, 14,175, 66,161, 16,134, 9, 68,160,200,159, 14, 75, 75, 96,128,193, 20, 65, 30, + 53,213,107, 32, 25, 17, 16,200,175,151, 9, 44, 34, 2, 94,226,242,104, 85,191,187, 84,170,199, 27,156,164,200, 1, 69,237,137, +237,252,163,138, 83, 91,114, 80, 39,233,213,227, 76, 64, 72, 22, 70,204,153,159, 46,180,114, 42, 36,124, 71,115,211, 77, 93, 81, + 72,201,208, 7, 47,146,236,105,125, 72, 10,242,192, 80, 7,127, 1, 77, 16, 85, 25, 21, 18, 29,109,192,243,233, 48,155, 84,169, + 42, 32, 87,138, 65,235,190,165, 44,112,160,120,173,121, 19,183,197, 73,114,247, 20, 40,178,231,197, 81, 93,246,208,182, 68,150, + 82, 5, 64,176,222, 46,239,203,242,220, 82,146,225, 6,160,251,245, 35, 76, 66,111, 49,145, 79, 53, 5,144,175,218, 4,212,255, + 0,104,159,245,105,182, 39,222, 17,155,203,204,217,239, 63, 49,110,108, 33,135, 0,173, 7,184,234,196, 0, 33, 94, 41,110,248, +228,212, 93, 90,184, 50,215,196,165,164,158,187,143, 29, 6, 1, 2,113, 67, 59,133,112,188, 37,223,152,101, 10,226,180,132,138, + 87,196, 29,104,215, 8, 51, 42,147,166, 74, 53,147, 36,188,196,182, 58,209, 74,131,139, 79,136,235,182,152,209, 4, 47, 42, 65, +122,199,230,223, 27, 74, 82,178, 71, 35, 83,244,242, 39, 64,149, 80, 5,209,127,110,233,235, 29,176,221, 47, 88, 44,249, 79,147, +243, 21,224,217, 61,122,127,175, 83,223, 0, 81, 99, 67, 4, 27, 36,193,242, 24, 24,163, 46,149, 31, 55,128, 63, 96,209,133,177, + 7, 85, 41,210,202, 0,187,221,218,197, 88, 2,161,109, 10, 84,215,192,232,103,100,164, 20, 14, 57, 33, 80,157,227,238, 29,206, +109,198,101,144,186, 83, 13,181,182,251,232,168, 63,140,134,248,211,219, 80, 14,250,250, 43,211, 61, 42, 24, 24,145,139,107, 45, + 79,228,189, 3,211,125, 56,213, 3, 46, 10,160,189, 94,138,100, 42, 83, 67,146,197,104, 43, 90, 87,111,232,214,185,158,238, 11, +179,142, 56,129, 46,117, 94, 48, 92,190,117,143, 50,183, 95, 98, 43,141,194, 44,150,100,164,170,160, 14, 46, 36,128,117, 33, 94, +224,167, 99, 70, 44,190,185,247,143,186,206,229, 94,155, 44,183,214,138, 83,115,186,196,142,148, 52, 56,148,149,186,218, 92,113, + 2,164, 0, 2, 91, 36,109,225,239,215, 35,143, 29,183, 55, 97, 65, 21, 60, 10,230, 92,203,185,109,255, 0,151,177,103,203,160, +169,251, 84, 96,105,237, 97,199, 34, 80,251,199,151,174, 71,215,152, 66,121,242,179,182, 48, 62,232, 68, 47, 35,245, 21, 77,147, + 63,103,224,171,110,225,247, 2,106,178,136,172, 68, 89, 41, 45,212,129, 95, 0,125,154,229, 40,193, 27, 87, 49,100, 10,141, 27, +185, 23, 95,152, 17,199, 34,158, 72, 73, 27,239, 78,132,123,255, 0, 94,178,115, 48, 68, 71,138,141, 84,238, 41,203,187,185,162, +160, 99, 22,153,172, 43,227, 90, 69, 74, 79, 90,157,103,226, 98,157,228, 17,193, 88,140, 76, 10,100,237,238,110, 50, 60,124,181, + 40,236, 17, 90,125, 84,213,203,113,196, 85,216, 88,232,157,166,226,152,240,158,125,213, 85,164, 3, 64,125,192,141, 81,149, 91, + 74, 46,231, 80, 33, 72,181,100,126,107,203,160,112,166,155,127,118,154,153, 50,137, 12,135,176, 2,160,227,118,187, 28, 37, 72, +226,148,149,149,158,103,110,160,233, 89, 41, 73, 19, 68,196,136,182,248,237,173,200,128, 33,208,147, 74,109,176, 26,171,108, 76, +131, 20, 35, 23, 42, 13,206,229, 42, 85,185, 65,165,124, 64,245,246,208,234,165, 20,185,215,146,211,172, 6,101,114,250, 81,189, + 46,215,148,166,123,231,247, 45,113, 66,186,209, 69, 99,250, 53,232, 62,148,197,123,141,135,249, 98, 87, 77,233,220, 93,215, 19, +220, 85,171,235, 67, 63,254,103,130, 73,182, 64,124,121,191,202,111,142, 41, 9,241, 42,180, 62,209, 39,174,233, 74,149, 77,181, +236, 93, 8, 29,230, 93,160,254, 11,160,186,177, 86,157,225,124,180,149,144, 60,103,161, 9, 81, 72, 82,131,123, 83,195,199,244, +235,118, 33,138, 86,252,164,253,181, 88,212,135, 26,146,209,228, 67, 11,170,210, 19,215,144, 87, 83,183,133,125,186, 59, 42, 17, +146,181,189, 63,220, 87,108,202, 25,146, 8, 87, 53,166,137,222,188, 8,223, 89, 57,238, 3,174,143,165, 84, 39,240,157, 2,232, +223, 90,182,217,183, 56, 24, 71,114,237,200,226,253,206,220,229,182,230,162,162, 86,228,219, 83,137, 73,116,142,148, 83, 14,180, + 1,246,131,175, 42,245,150, 0, 18,133,224,124,193,143,136,255, 0,176,175, 60,245, 22, 31,147,149, 38,249, 73,209, 87, 24, 53, +194,229, 54, 50,219,144, 42,162, 10,105,245,107,207,109,172, 21,205,217, 18,234,127,109,240,245,220, 50, 73,111, 92,118,101,181, + 2,154,143,234,171, 77,101, 96, 69, 68, 72,132,205,121, 84, 22, 38, 41,183, 72,170, 91,227, 83, 79,110,169,206,189,195, 68,226, +214, 74,217, 5,194,219,141, 91, 17,113, 72, 21, 43, 53, 34,157, 73,213,184, 99,104,167,231, 45, 54,123,201,188, 66,118,226, 86, + 2, 82,158, 73, 26, 70,157,168, 68,186,142,238,122,136,138,110, 34, 79,241, 78,109, 95,171,142,138,106, 0, 38, 95,152,166,118, +182,179, 86,173,175, 16, 80,224,170,141, 70,192,104,102,141, 29, 70, 65,107,206, 51,215, 90,204, 36,178,211,156, 98, 20,112, 2, +187, 29, 26,186,244, 67,212,132,187,139,190,139,156,137,173, 47,226, 69, 73, 31, 89,210, 20,178,125,204,181,179,123, 97, 19,151, +109,216, 33, 34,181,250, 79,183, 78, 43,116,241,154, 59,108,136,213,210, 55,150,193, 27,147, 82, 15,179, 77,229, 34, 41,173, 88, +161, 92, 27,110,215, 34,133,105, 93, 20, 79,176,106,141,207, 19,162, 98, 87,230, 79, 14,201,110,179, 61, 29,176,144,150,182, 52, +167,179, 70,166, 82,109, 84, 76,144, 12,101, 16, 39, 64,109,102,133, 33, 92, 71,208, 14,136, 65,100,225,145,136, 50, 89,102,235, +229,197,161,105, 4, 3, 79,167, 84, 4, 52,213, 54,229, 38,229, 33,137, 19,138,151,247, 19,185, 31,160,232,241,212, 5, 33, 45, + 16, 27,133,222, 50,239,255, 0, 38,133,254, 3,136, 0, 13,182, 53,161,213,232,129,197, 33, 45,193, 28,181, 99,238, 70,177,249, +172, 85, 96,172,214,155,237,170,214,134, 46,159,114,243, 55,229,224, 75, 67,242,104, 16,148, 21, 16,122,117, 27,104, 85, 3, 36, +238,134, 61,120, 66,101,186, 99,236,133, 18, 80, 71,187, 71,217,180, 40, 18,225, 70,122, 66, 17,107,149, 33,229,254, 49,220,114, + 62,193, 81,162, 70,212, 33,161, 64,236, 23, 85,191,122, 4,172,148,167,166,254,193,162, 24, 3,197, 20,148,241, 22, 99,150,185, +107,149, 29,202, 60,226, 2, 82, 1,241,165,116, 57,199, 69, 21,183, 22,180, 61,119,187,162,100,195,248,203,169, 21,246,232, 50, +188, 13, 20,181, 68,231,217, 36,216, 97,203, 68,245,209,181,154,182, 61,213,168,213,115, 45,210,112,156,165,166,211, 34, 76, 7, + 86, 15,195,209,179,171, 17,159, 34,148, 84,236,114, 75,175, 51,202, 90,168,152,192, 40, 19,227,161,204, 4,139,168, 15, 93,205, +219, 40, 80,105, 85,105, 73,240, 62, 58, 97, 16, 2,112,152,172,210, 35,218,225,186, 38, 40, 21,171,238, 3,239,213, 91,164, 72, + 78, 23,229,178,251, 13,135,190, 85, 68, 41,215,148, 0, 30,202,157, 14,161, 41, 4,164,193, 72,201, 87,143,198, 81,130,104, 86, + 18, 10,171, 78,167,127,215,162, 87, 92,129,116,201, 50,227, 18, 53, 88, 49,200, 72, 82,194,232, 15,191, 68,243, 75,164,201,237, +119,219, 75,118, 1, 14, 64, 72, 80, 64, 9, 38,157, 71, 77, 68,213, 46, 40, 36,234,133, 95,216,181,219,162, 51,119,102,129, 75, + 27,145,239,209,163, 92,164,161, 61, 23,145, 1,175,242,242,174,127,246, 53, 75,188,189,251,143,215,162,121, 69,217, 15,147,175, + 87,185,237, 77, 96,240, 87,227, 35,136,160,240,213, 56,146, 22,225,144,100, 71, 33,141, 21, 24,181,190,234,208, 27, 0,151, 15, +190,135, 79,171, 40, 62,168, 5,220,137,246,163, 33, 0, 40, 50,119, 61,124,117, 33, 34,236,156, 72, 40,119,179, 6, 53,181, 15, + 54, 0, 42,167,196, 62,144, 52, 93, 89, 62,232,148, 45,219,211,113,135,146,159,223,109, 74,104,226,178, 98,131, 41,178,183, 48, + 9,100,224, 77, 33,196,128,167, 8,113, 68,211,222,106,117, 1, 94,136, 18,183, 85, 43, 50,157, 30, 77,166,223, 28,210,142,252, + 31, 80, 6,154,115, 89, 10, 98,110, 93, 85,253,212,200,173,216, 63,108,110,185,139,173,243,131,108,121,134,222,105, 37, 33,107, + 75,206,165,181,112,175,136, 10, 42,250,181,214,122, 43,165,254,239,168, 86, 8,120,135, 39,192, 2, 71,222,193, 93,195,172,206, +192, 59,215, 19, 74,203,100, 93,231, 63,115,152,170,200,148,227,146, 93,229,226,183, 22, 86,161,191,211,175,160,237,150,210,195, +130,245, 92, 10,255, 0,167,160,102, 31,197,208,105,242,219, 50, 72,108,130, 20,106,147,236,222,186,141,112,218,116, 86, 39,118, +248,187,241, 68, 59, 91,137,207,204,187,133, 26,201,109,108, 58,243,171,111,147, 70,181, 80, 42,162,130,105,236, 30,193,163, 89, + 49, 88, 37, 87,220,102, 25,125, 52,206,240,201, 56,127,165, 91, 29,189,228,184,227,214,118,203, 14,177, 33,101, 5,178, 91, 89, + 69, 84, 1, 73, 79, 32, 40,122, 82,131, 92, 97,183,118, 65, 35,154,208,199, 31, 1, 5,114,191,108,173, 87,174,228, 98,226, 12, +149, 41, 74,199,164,170, 26, 84,176, 66,148, 36,214, 97, 77,127,178, 87,250,117,141,245, 22,193, 92,105,159, 51, 22,241,227,255, + 0, 98,243, 46,191, 80,156,221, 52, 66,237, 60,111,243, 99, 15, 92,147,201, 37, 52,170,136,216, 16, 71,142,188,182, 57,211,102, + 0,191,130,230,141, 8,236,254,210,217, 32,182,242,163,179,201,226,180, 22,200, 21,161, 7,151, 93, 44,140, 28,203, 64, 62, 92, +136,240, 37, 76, 98,145,201, 5,238, 78, 61,141, 92,236,177,224,221,164,136,239,182, 2,138,125,148, 53,174,192,210,164, 83,233, +250,245,208,116, 47, 74,231,102,105,229,152,247,144,195,239,251,143,228,156, 97,153,241, 8, 4,110,242,118,215,183, 22,183,109, +143,190, 93,116,178,175, 45,224,146, 8, 90, 85,247, 86, 5, 72,168,251, 62,189,186,203,126,148,230,202, 64,198,200, 17,227,203, +248,247, 38,158, 41,138,222,215,169, 46,208,221,176,194,166, 46,106,143,114, 40, 42, 91, 15, 52,224, 80, 59,147, 66,144, 66,128, +241,166,177,242,254,153,245, 90, 38,194, 17,152,228, 65, 30,230, 40, 70,137,197, 6,196,251,147,108,139,113, 13, 49, 61,165,161, +105, 82,209,197,193, 66,133, 30, 33, 94,224, 79, 74,235,159,201,244,214,102, 49,254,165, 50,143,179,236,232, 83, 18, 8,221,171, + 37,125,134,167,203,229, 95,197,230,154, 26,142, 42,232, 69, 53,155, 44, 93,120, 32,139, 8, 8,180, 14,224,187, 43, 39,102,222, +237,124,183, 83, 66, 62,162,117, 8,226,130,234, 62,113, 82, 51, 28,177, 22, 40, 43, 76,115, 85,149, 5, 26,111,196, 42,157,124, + 62,173, 84,167, 9,230, 95,130,209,174,237, 21,129,233,207, 56,126,107, 46,203, 42,226,216, 82, 27, 10, 38,149, 41,221, 66,167, +220,160,117,222,122, 90,141,176,182, 93,171,186,244,137, 54, 72,158,196,203,222,172,230, 69,226, 20,216, 41,124, 58, 63,149,221, + 89, 10,175, 94, 86,151,154,165, 71,133, 87,175, 78,232, 92,214,175, 84,248,108, 15,205,112,181,189,245,201,150,135, 92,235, 82, +106,106, 55,234, 79,233,215, 64, 34, 10, 29,164,136,150,224,139, 64, 46, 75, 9,116,252, 45, 2, 27, 66,143, 80,147, 93,254,146, + 70,164, 98,234,157,101,164,202,210,236,176, 66,111, 16,162, 52, 79,158,217,111,205, 90,250,242, 94,224, 19,238, 26,200,234, 37, +184, 46,159,164,142, 47,205,118, 95,117,109, 12,221,189, 49,133, 60,134,215, 46,215, 58, 20,182, 92, 45,149, 60,148, 72,105,200, +174, 37, 42, 27, 37, 10, 81, 65, 85,122,144,157,121,231,170, 43, 54, 97,159,251,178, 7,241, 30,237, 87, 63,235, 26, 67, 70,206, +223,204, 42,119,183,144,173,232, 97,201, 18, 77, 36,160,145,196,251, 43,175, 46,148, 93,112, 18,144, 83,109,183,200, 48,157,150, +250, 22, 0,173, 54,250,105,160, 77,217, 85,153, 9, 63, 42,186, 95,103, 60,161, 8,242,113,210,174, 59,248, 40,106, 84,200, 13, + 10, 25,134,224,133,230,107,147, 39, 21, 76, 9, 70,146, 27, 36, 40, 30,181,173, 53,106, 86, 54,137,227, 20, 58,215,114,153, 14, +206,171, 92, 90,249,203,216,125, 0, 83, 72, 37,181,215,171,141,154, 75,211,163,188,163, 69,148,210,163,218,116,206,157,145,171, +110, 6,252, 75,227, 55, 82,162,165, 45, 39,226,246, 80, 83, 82, 36, 33,237, 41, 99, 63,179, 92,158,191, 25, 76, 87,203,169, 6, +158,208, 52,160, 66, 91, 74,139,142,195,202,108, 16,158,148,251, 71,202,119,225,229, 67,236,212,173,156, 93, 68,196,160,175, 68, +189, 54,137, 23, 67, 90, 80,145,237, 2,135, 79, 89,137, 81, 98, 17,238,208,102,139,122,210,242,159, 85, 95,111,150,223, 70,138, + 64,137, 76, 9, 40,149,183, 38,188, 63,112,115,201, 6,170, 89,223,127, 29, 81,148,225, 50,234,102, 37, 67,201, 45,217,125,232, +188,148,114, 12, 56,118,235,236, 7, 77, 43,225, 29, 19, 10,202,204, 83, 24,200,173,145, 93,140,225, 37, 73, 4,167,175,142,250, +107, 50, 34, 20,132, 17, 76, 73,153,113,238,174,196,184,168,135, 92, 5,202,159, 13,245, 31,134, 65, 75,104, 69,185,134,224,186, +243,194,166,156, 74,190,131, 77, 3,107, 37,181, 44,197,129, 25, 55, 69, 92,121,115, 2,165, 59,253,122, 60,166,120, 34, 8, 58, +109,178,229,207, 65,179,252,176, 77, 89, 89,160, 81,251,116, 43,102, 8,101, 17, 4,175,146, 79,155,114, 91,136, 46,113, 20,246, +251,119,219, 82,140,246,104,201, 16,143, 98,216,252, 89,209,163,115, 80, 83,193, 36,171,244,104, 22,100, 18, 83, 16, 0, 81,243, + 44, 72, 8,138, 83,107,224,215,197, 93,253,130,186, 53,115, 96,233,182,165,251, 28, 8,118, 88, 10,152,241, 10,121,102,155,245, +212,231, 97, 60, 20,163, 16, 19,222, 45,103,106,242,194,101,172,209,134,144, 9, 81, 62,234,234,173,150,201, 45, 22,203, 21,204, + 55,112,114, 99, 42, 30, 67, 42,242,219, 3,161, 61, 6,128,204, 18, 91,251,153,145, 41,232,105, 71, 46, 75,162,121,111,210,163, + 70,174,173, 18, 66,110, 50,154,131, 97,107,229,135,197,196, 21,159,125, 43,167,218, 93, 74, 43,198, 7, 14, 70, 73, 30, 91, 64, + 20,182, 18,119,222,155,244,210,156, 74,114, 2, 7,106,177, 94,224,101, 47,176, 62,234,106, 81, 83,225,255, 0,209,171, 85,152, +144,161, 40,149, 38,228, 47, 14,172,173, 68,134,144,119, 30,250,211,245,106, 22,136,144,193, 49, 5,107,181,217,114, 23, 37, 51, +118, 74, 73, 64, 81, 41, 30,255, 0, 13, 42,118, 71, 68,138, 89,206,238,153,164,108,171,131,168, 87,146,162, 43, 74,236, 58,106, +236, 99, 2, 10, 28,201, 10, 67, 87, 27,220,165,130,148, 41, 69, 0, 0, 7,182,154,203, 17, 27,212,181,101,178, 76,156,174,230, + 91, 77, 20,150,154, 21, 95, 95, 1,173, 41,152,136,160,135,116, 82,229, 58,235,123,176, 53, 9,178,106,143,128,253, 91,106, 56, +243,142,210,149,160,190,136,152,187,223, 63,240,241, 88,233, 73,249,222,105, 72, 59,215,143, 19, 95,211, 77, 19,204,135, 30,229, + 29,133,144,167, 50,198, 17,120, 44,169, 91, 26, 84,125, 85,214,116,104, 44, 10,186,108,209, 31,201,114,146,206, 0,166,210,170, +167,144, 41,247,111,169,198,151, 81, 18,117, 3, 14,157, 42,243,219,219,156,180,110,227,102,164, 15,175, 66,157,109, 96, 72, 88, +235,197,198, 29,198,243,133, 38, 84, 38,202,148,154, 3, 65, 93,193,247,106,208,136, 72, 73, 45, 51, 14,224,187,145, 92,160, 82, +218, 91,216, 31,111,253, 6,172, 0, 25, 41, 18,172,251, 62, 76,229,175, 24, 68, 71, 21,199,205,103,240,190,193,183,233,209,170, +168, 21, 74,195, 39, 67,174,249,179,211,110, 86,219, 58, 9, 46, 69,108,184,189,252, 77,122,233,237,172, 69, 26,178, 85, 43,234, +243, 37,189, 35,180, 83, 35,182, 20, 45,174,206,142, 38, 81, 43,226, 83,200,148,213,105, 52, 7,144,241, 26,244,223,166,213, 1, + 57,200,142, 32,177,211,248,191,220,183,250, 59,139, 1,239, 92,163, 26,238,165,184, 2,213,183, 77,245,233,209,134,233, 47, 69, + 57, 27, 32,235,241,249,203, 83,192, 21, 80,131,176,220,245,209,101, 6, 40,117, 93,186, 62, 10,229,244,153,107,150,223,114,109, +247,166, 88, 14,165,183, 26,121,206, 73, 37, 73, 8,115,226, 80, 41, 5, 67,168, 32,141, 83,206, 47, 2, 21,188, 82,250,242, 95, + 68,253, 89,101, 82,110,158,158,226,222,108,107, 66, 67,145, 20,196,148,238, 16,243, 43,110,138, 74,131,117, 41,226,174, 42, 73, + 29, 55,167, 74,107,146,194,164,249,172, 85,171,174, 16,129, 61,171,147,187,127,119,149,131,225,151,108,145,153,113,219, 19,223, +101,192,216, 62,105, 65, 67,124, 10,148,164,108, 79, 26, 3, 67,225, 95,118,181,186,223, 68,163,169,249,112,180, 22,137,125, 52, +126, 58,118,113, 61,133,113, 25, 85,139,184,242, 65,167,247,166,226,250,150,203,215, 86,214,166,213,243, 45, 7, 22,186,240, 73, +169, 69, 82, 41,191,128, 35,221,173, 92, 62,155,141,141, 16, 42,172, 15,102,191,128, 89,147, 2, 37, 14,202,251,151, 62,122,129, +129,121, 49,194,195,106, 75, 37, 42,117, 13,168,138, 40, 18, 14,219,244,223,221, 77,104,198,198,228, 2,137, 61,139,205,130,251, +103, 93,201,219,117,214, 67, 82, 82,251,128,184,219,224, 20,115,227,200,148, 5,148,240,175,176, 16, 61,213,211, 74,201, 18,225, + 60,102, 6,133, 87,125,233,236,205,165,155,130,110, 56,180,163,242,139, 10, 90, 25, 66,214,226, 77,106, 83,192, 44,169, 65, 52, +240, 81,168,213,170,178, 73, 12, 80,229, 0,171,100,203,187,226, 76, 61, 26,109, 23, 8, 20,165,198,214,223, 34, 90, 66,234,165, + 26, 42,155,110, 13, 5, 52, 97,105,228,134,204, 23,140,179, 44,183,220, 98,176,221,144, 5,176,210, 80,180, 58,129,202,187, 4, +144, 69,107, 78,170, 3,195,245, 30,171,228, 56,148, 59, 0, 60, 23,172, 27,189, 89,142, 47, 36, 38, 12,133, 44,185,196, 45, 15, + 56,162,133, 83, 96, 22,149, 29,192,216, 10, 17, 77, 80,234,125, 23, 11, 62, 6, 54,214, 59,136, 0, 17,238, 84,229, 72,151, 37, +209, 93,186,239, 13,155, 33,186,183,121,189,197, 48,156, 40, 75, 65,198,255, 0, 21, 32,154, 2,161, 68,208, 18,125,166,131,175, +134,254, 79,213,190,157,221,140,101, 58, 37,230, 68,106, 1, 12,124, 57,187,123,202, 12,176,149,207,103,197,241, 78,225, 91,151, + 6, 52,216,238, 44, 2,190, 13, 60,219,138, 6,191,181, 69, 19, 83,239,215,152,223, 70, 70, 57, 50,182, 18, 29,228, 17,238,112, +134, 98,151,114,252,178, 39,105, 27,131,131,195,119,201,185, 75, 87,204,149, 2, 65,226, 84, 17,212,127,100,107,208,189, 43,142, +101,131,230, 31,230,252,139, 47, 72,244,139, 87, 91,255, 0,121,108,177,102,174,220,190,114,109,229, 5, 54,248, 54,201, 41, 88, + 53, 87,154,226,218, 80, 27, 13,190, 53,171,166,189, 15,164, 87,161, 79,214, 44, 62,116, 66,161, 45,238, 56,243,171,120,245, 65, + 59, 18, 5, 55,165, 7, 79, 19, 77,106, 19,170, 52,100, 54,183,106, 47,107,100,178, 20,146,121, 60,181, 37, 3,217, 94, 32,114, +175,210, 78,156, 29, 18,136, 14, 11,104, 53,251,202,182,123, 29, 0,156,149,190, 42, 10, 66,150,146, 87,202,187,141,171,183,217, +172,140,229,189,211, 72, 1,118,245,246, 44,145,233,162,253,112, 67,126,115,205,252,132, 68, 37, 47,161,151,120,184, 92,113,197, + 36, 57, 94, 97, 33, 9,170, 18, 9, 32,248,107,132,245, 4,141,120, 22, 22,226, 64,239,237,127,187,177, 97,122,206,248,237,140, + 7, 29, 79,185, 81, 16, 68, 8,209,151,113, 67,148, 82,211,247,125,228, 83, 94, 77, 25,149,230,178,213, 47, 76,242, 69,201, 49, + 24, 86,210, 13, 85,191,141,107,161,202,221, 89, 2, 81, 70,172, 22,184,235,185, 37,114,126,235, 73,167,184,211, 67,144,116,162, + 8, 8, 14,125, 97, 84,151,144,243, 95,185,125,116, 32, 31,237, 31,244,104,149,105,197, 73,148, 41,177, 90,180,200, 41,109,170, +136,205,142, 71,111, 16, 63,215,169,151,226,155,114, 21, 19, 36,249,251,162, 90, 90, 72,109, 59,133, 83,110,181,211,194, 36,148, +210,179,181, 48, 92,115,230,236,147, 89,183,172,143, 55,134,213,250, 53, 96,208, 83,121,168, 12,172,162, 60,136, 34, 77, 65,116, +185,191,215,215,245,104, 70,178, 20, 60,224, 74,107,129,148, 90,110, 61,185,146,185, 44,165, 75, 36,165, 4, 15, 18,105,253, 26, + 13,180, 18, 93,212,227, 32, 80,171,197,186,213, 19, 1,155, 53,196,143, 51,203, 33, 3,199,238,234, 24,178, 50, 46,165, 32,171, +206,214, 64,110, 4,180,195,121, 6,143,146,181,127,180,107,171,153, 51,113,162,140, 67, 43, 2,211,109,139, 14,242,166, 56,241, + 73, 53, 79, 77,197, 14,177,235,119,101, 34,156,156, 77,170, 38, 55,230, 60, 0,113, 41,169, 86,221,104, 71,244,104,115,150,227, +224,131, 41, 23, 80, 49,117,198,155, 96,145,118,112, 14, 9,168,173, 61,244,210,147,168,204,151, 64,173,205,162,239,127,126, 98, + 69, 25,101, 42, 82,136,219,225,165,117,111, 24,148,162, 75,173,136, 72,188,218,102, 51,111, 79, 37, 41, 42, 74, 0,246,131, 79, +215,162, 89, 47,140, 4, 66,233,111, 9,192,242,123,179,142, 14, 10, 72, 99,225,114,181,241,248, 78,172,202,200, 69, 56, 37,214, +236,138,201,144, 91,236, 95, 45, 24,126, 59, 46,209, 99,220, 70,133, 27, 32, 74,125, 80, 73,216,230, 71,113,118, 60,184,234, 33, +162, 0, 88,220,245, 58, 54,248, 20,128, 36, 39, 44, 31, 29,190, 89,239,237,177,112, 37, 80, 84, 6,254,192,119,213,121, 8,238, + 67,178, 37, 66,239,246, 66,171, 12, 2,204, 58,144,165,124, 60,122,238,106,118,213,184,214, 36, 64, 80, 50, 32, 42, 90,127,114, +174,134, 92, 91, 97, 73, 10, 42, 28,146,107,215,174,175, 28, 32, 2, 81,180,149,104, 61,221, 79,242,183,111, 22, 80, 72,158,226, +119, 30, 61, 53, 67,246,160,201, 41, 72,146,134,246,215, 63,126, 77,141, 82,229,214,133, 69,195, 90,239,212,233, 89,136, 55,132, +198,122,169, 55,220,186,109,198,202,212,213,215,148,137, 9, 72,175,130,121, 83,245,104,194,144, 17,119,232,157, 35, 64,145,125, +199,219,105,148,254, 27,128, 2,175,102,213, 58,205,182,192, 9,100, 65,162,120,198,109,182,108, 79, 10, 89,104, 15,159, 85,121, +145,214,180, 26, 0,153,146, 78,171,247, 47, 18, 95,202, 20,243, 91,175,113, 79,104, 3, 86, 54,104,166, 39,162,215,113,191, 37, + 73, 91,142,167,138, 66,136, 88,253, 7, 83,141, 74, 41,155, 8,200, 98, 77,142,136,160, 2,144,161,199,233,213, 91, 98,197,148, + 93,121,207, 97,219, 98, 78, 55, 89, 8, 74,163,146, 16,118, 27, 84,255, 0,175, 82,216, 83,186,137,134, 91,225,200,154,244, 38, + 80,146,226,135,152,131, 74,251,244,198,178, 20,244, 68,174,150, 6, 27,182,159, 33, 32, 60,237, 82,178, 7, 77, 51, 30, 9,152, + 37,113, 13,120,250,218,113, 96, 41, 5,101, 36, 30,149, 42,210,216,145,138, 36, 30,144,110, 5, 94, 80,160, 72,114,158,227, 95, +244,104,111,162,139, 42,114,221, 37,203,238, 72,194, 83, 80, 22, 40, 72,254,238,186, 31, 36, 70, 58,170, 59,137, 1, 63, 42,195, + 54, 69,181,203, 60,138,169,130,161,199,232,214,101,151, 0, 88, 43,245, 82, 89, 59,118,123, 25, 98,215, 99,157,109,150,154, 33, + 96,138, 43,198,163, 84,109,183,113,112,167, 26,245, 79, 88, 38, 37,107,139,137, 46, 28,148, 10,149, 26, 84,120, 84,143,233,210, +149,146, 68,140, 0, 74, 93,195,193,237,177,228,166, 84, 84,132,199, 9,240,218,189,116,133,242,100,251, 65, 40, 13,234, 0, 74, +173,145, 15,221,165, 65,254,206,218,181, 86, 73, 3,193, 52,234, 14,183, 79,198,173,240,175, 2,232,208,252, 87, 82, 27, 26,108, +156,195, 56,232,148,105, 0,164,191, 84, 61,188,178,228, 93,177,149,100,147, 33,200,197,198,148,235,110,199,228,178, 93, 79,198, + 7,150,144,121, 84,128, 79, 78,149,174,187, 79, 64,117,139,113,179, 35, 0, 6,201, 22,147,191, 2, 27,139,176,237,252,149,186, +108,242,164, 8, 92, 16,214, 61, 53,169,138,134,235,110, 9, 8, 87, 5, 0,154, 17, 77,183, 73,233,175,163,227,140, 14,160,174, +146, 29, 72,202, 41,130,211,218,220,198,247, 33, 44, 91,224, 63, 33,178, 43,201, 13, 44,168, 14,189, 18, 43,183,186,186, 29,241, + 17, 10,214, 53,196,151, 11,161,253, 53,246,251, 35,199,153,114, 98,237,242,221,122, 58,144,239, 40,136, 90,164,182,148,237,205, + 8, 69, 92,174,221, 66, 78,222, 26,192,202,176,153, 50,233,168, 48, 21,187,177, 86, 71,127,253, 64, 91,114, 75, 3, 56, 5,190, +100,241,108,141, 73, 82,143, 4,177, 71, 0, 53, 71, 5,167,204, 74,201,221, 84, 66,106,116,248,248,123, 37,187,154,192,203,204, +243, 6,213,206, 25, 62,107, 38,254,219,168,132, 30,136,132,133, 37,106,153, 32,185,205, 41,173, 62, 6,155,170, 65,254,246,181, +106,165,203,149,129,118, 67,104, 18,101,218,101,253,229,162, 68,194,164, 67, 66,146,227, 74, 87, 53, 36,131,247,130,121, 29,171, +212, 29, 93,133, 65,150,116,237, 46,152,237, 55, 81,114,181,162, 81,121, 46, 60,214,201, 91,206,135, 28, 27, 80,208,148, 3, 79, +113, 58, 9,164, 58,113, 97, 80,231,223,203,137, 15, 49, 33, 65,228, 20,182,243,133, 11, 20,226, 62, 26, 18, 0,240,209, 99, 80, + 81, 54, 39,142,207, 95,162,221,231, 42,220,250,188,201,193, 1,182,212, 20, 57, 30, 68, 55, 68,146, 64,162, 71, 77, 6,200, 54, +168,181, 77,210,215,122, 49,111,228,179,110,152,187,207, 45,198, 82,234, 20,177, 68,128,177, 66,180, 16, 8,235,241, 26,239,227, +165, 76,212,172, 28,149, 64, 49, 11,245,154,228,171, 57, 74,215, 21, 91,149, 0,160, 74,200,169, 78,227,168, 4,138,106,208,177, + 3,105, 26, 45,234,199, 28,110,226,155,106,199, 21,157,157, 60,146,158, 28,182, 9, 62,102,195,235,211,139, 10,111, 45, 88,118, +216,119,235, 53,169, 6,204,182,150,194, 20, 86, 22,132,182,149,171,144, 0, 32,114, 82,185, 36, 83,197, 26, 25,176, 58, 52, 70, +139, 94, 23,146,101, 81,114, 17, 63, 25, 97,216,153, 31, 18, 67,144, 29,109,161, 67,177, 42,105, 52,228,107,239, 3, 80,190,154, +178, 33,182,216,137, 14,240,232,114,168, 30, 72,159,115, 59,177,146,223, 50,155, 92,188,201,106, 55,168,136, 68, 68, 62, 91, 82, + 3,220, 87,205, 60,184,169, 98,190, 4,130, 53,146,122, 5, 56,216,230, 52, 6,139,146,218, 54,164,147,248,173,126,145,159,228, + 89, 24, 30, 31,197, 93, 88,124,213,220,241,139,147, 16,148, 0, 48, 66,222,124,144,132,178,148,138,169, 41, 53,253,162,106, 78, +155,165, 85,240,151, 90, 93, 94,207,235,130, 15, 32,170, 75, 36,201, 13, 7,192, 9, 92,102,212, 28, 21,219,110,116,173, 9,241, +165, 6,173, 69,209, 4,128, 26,113, 70, 45,178, 92,184, 5,203,113,207, 41,166,194, 82,223,130, 81,182,202, 53,241,161,160,212, +228, 9, 14,137, 93,162,178, 34, 53,237, 87, 39,166,116, 71,159,126,110, 45,172, 46, 83,109, 58,134,252,228, 2, 66,156, 38,128, + 36,117, 38,167,111,209,172,108,154,223, 78, 43,160,199,188,199, 83,162,234,142,250,102,179,152,198, 96,246,162,198,243,114, 33, +148,137, 55,165,178,220,103,129,184, 21, 87,224,125, 60,156, 79, 4, 81,178, 2,130, 77, 42, 69,117,228,126,179,234,162,100, 99, +194, 64,198, 39, 86,110, 62, 60, 87,155,245,188,179,147,121, 35,130,166,228,219, 47, 44,199,114,156,144,210, 10, 80, 18,161, 78, +158, 58,225,231,116, 34,177,132, 9, 11,202, 49,233,110, 95, 35, 44,172,143, 48,164, 2, 60, 14,170, 78,224, 82,140, 19, 85,226, +204,237,161,196,192,117, 92, 36, 43,170,188,119, 26, 7,156, 81, 4, 2,135,124,118, 44,118,163,193,121, 92,159, 73,248,125,253, +116,171,188,186,127, 40, 45, 22,232, 76, 75,146,252,121, 66,175, 61, 64, 71,187, 79, 60,130,116, 10, 63,183,209,101,203,182, 81, + 93,182, 25, 54,202, 7,218, 60,151, 78,180,241,209,106,200,218,135, 60,103, 72, 25, 86, 7,116,187, 94,219,187, 54,178, 89, 80, + 8,167,179,254,149,214,135,250,136, 32,168,126,213,150,219,159,111,223,128,227,112,119, 8,224, 86,125,228,141, 12,228,104,232, + 39, 27, 84,110,211,139,200,180,217,216,128,106,168,178, 8, 82,135,178,134,186, 17,200,220, 17,124,157,165,126, 95,218,106,100, + 68,219, 93,170, 35, 41,105, 65, 73,232, 64,235,182,154,175,128,104,150,199, 58,161,115,227, 91,172, 87, 52,184,216, 9, 9, 72, + 32,255, 0,119, 82, 36,201, 70,205, 20, 43, 94, 81, 38,237,125,117,244,254,237, 2,136, 62, 26,140,233, 16, 14, 80, 98, 73, 42, + 79,115,178,249,240,177,120,241, 98,146, 93,124,248,117, 53,213,108, 10, 55,146, 74, 86, 22, 94, 49,172,233,246,123, 97, 58, 27, + 64,170, 67, 71,226,250,119, 63,211,171,211,198, 26, 4, 25, 79, 84,115,183,211, 31,147,133, 23, 18,209,249,217,202,242,138,252, +104,118,210,156, 5, 72,245,141, 17, 44, 22, 36,156, 94,242,228,121, 20, 80, 79, 45,143, 77,197,107,170, 54,203, 87, 71, 21,167, +204, 10,116, 88,208,101,121,233, 72,126, 66,213,184, 27,237,176,213, 57,185, 41,205,101, 47, 92, 96,139,237,213,216,204,167,225, + 82,137, 32,123,180,183, 24,135, 72, 86, 81,155,119,111, 91, 45, 71, 97,180, 15, 57, 91,145, 79,163, 74,171, 73,213, 48,129, 83, +220,180,197,135,118,106, 11,212,249,128,133, 41, 64,251,180, 83, 39, 75,105, 85,254,121,143, 91,110, 51,147,252,197, 1,109,135, + 56,164, 30,149, 39,109, 88,141,178, 18,209, 71,106, 66,185,246,142,195, 31, 41, 55, 87, 18,146, 18, 63, 9, 30,253,107,126,240, +178,136,136, 69, 91,237,125,166,231,106,114,229, 50,139,134, 15, 26, 30,128,245,166,170,207, 32,130,164, 34, 22,182, 48,251, 53, +190,206,166,216, 1, 12, 10,128, 7,141,116,142, 73,220,155,203, 5, 7,185,198,132,184,241,173,204,236,134,213,205, 53,246,214, +163, 79, 27,228,120,164, 43,213, 91,120, 43, 45,219,240,212, 46, 77, 42,173,211, 95,160, 29,101, 93, 18, 45,117, 46, 40, 60,236, +173,147, 33,216,124,255, 0, 9, 64,212,123,250, 87, 87, 43,173,148,118,175, 61,191,194,164, 95, 39, 59,121, 7,240, 80, 84,164, +251,197, 53, 9,204,196,164,129,101,205,197,110,236,182,212, 66, 91,113,101, 4,123,198,218, 52, 37, 34, 17, 97, 16, 87,238, 36, +226,109,151, 37, 41,181,127, 10,149, 4,159, 96, 36, 17,168, 90, 29,138,129,142,169,159, 41,109,139,237,157,232,104, 80, 60,207, + 48,107,211,106,232,209,147, 4,194, 11,243, 6,110, 61,158,224,137,202, 85, 80,144, 26, 62, 58,148, 62, 32,156, 7, 68,111,207, +205,182, 73,118, 42,197, 89, 90,188,214,143,182,187,106, 70, 17, 36, 40,149, 89,102,153, 44,200,239,182,218, 1, 40, 76,132,115, +167,176,171,125, 18,117,197,146, 4,171, 45, 66, 55, 36,206,219,129,128,167, 72,254,208, 41,166,178, 20,119,104,171, 60, 39, 27, +105,171,250,228, 74,103,203, 67, 42,224,216,161,233,211, 90,211,201,209, 76,212, 19,107,225, 49,178,102,227,160,255, 0, 15, 84, +144, 7,176,235, 46,113, 36,186,176, 44, 96,201,138,225,124,102,219,118, 85,189, 0, 36,134,195,155,120,232,120,213,153,161,217, + 61, 81,198,115, 38, 23,101,141, 38, 50,197, 43,193, 64,120,158,159,209,163,206, 59,100,201,226, 73, 8, 93,218,246,139,162, 29, + 74,212, 20,134,234, 69, 60, 52, 19, 23, 68, 35, 68, 14,232,243,115,226,183, 57,161,180, 97,192, 29, 56,208, 50,158,140,165,187, + 33,183,152,101,199, 55,229, 64,157,189,189, 52, 21, 48, 66,211,147,121, 14, 56,150, 93,169, 82, 0, 74,210, 9, 27, 31,160,215, + 69,162,217, 87, 45,195,138,112,197, 80,157,251,244,150,235, 63, 51,220, 30,220, 72,144,171,217,252, 85, 68, 33,151, 80,186,212, +148,165, 10, 77,106,126,147,175,110,244,143,212, 81,165, 25, 0, 55, 34, 63, 53, 98,191,135,130, 87,244,251,234,102,217,129,102, +236, 98,189,194,199, 82,153,173,150,210,250, 94, 74,152,146, 84, 13, 1, 9, 65, 28,171,224, 55,215,168,100, 84, 50,161,186,185, +184, 62, 11,160,193,207,140, 15,196, 23, 96,247,155,214, 94, 13,143,118,105,201,125,186,132,252, 91,252,150, 82,134,248, 63,229, + 42, 59,171, 65,163,128, 56,216, 93, 1, 21, 62,223,110,176,232,233,114, 19,121, 45,108,174,171, 25, 71,225, 95, 61,178,188,179, + 44,202, 47,207,190,212,246,213, 50, 81,114, 93,205,247, 75, 78, 5, 40,142,101, 68, 52, 84,175, 48,154,159, 3,174,134, 49,137, + 92,197,150, 21, 14,208,197,237,114, 87, 22, 4,180,195,183,121,137,229, 33,212,186,154,182,164,141,184,146, 16, 15, 65,190,143, + 29, 21, 41,241, 76,177, 49,108, 94, 57,117, 78, 60,143,230,139,226,176, 67,136, 14, 56,179,224,164,113, 85, 54,175,179,233,212, +101, 97, 9,180, 40,109,217,219, 69,160,150,221,248, 94,111,241, 24, 44,180,177,211,115,205, 60, 73, 59,120,214,154,136,176,168, +146, 16,116,183,252,246, 89,139,110, 82,158,101,105,171,143, 52,219,137, 72, 42,241, 9, 88, 10,229,169,249,189,168, 64, 57, 93, + 23,233,187,211,124,139,108, 35,151, 93, 88, 76, 88,204,121, 74, 75, 79,209,165,186,207, 34,165,175,115,200,141,136,175,178,190, +202,235, 59, 39, 60, 56, 11, 75, 31, 20,170, 59,212,151,112,161,220,243,185,247, 27,120, 66, 22,243,252,208,145,247, 19,197, 97, + 41, 41, 6,187, 4,164,109,171,244, 65,160,171,219, 55,146, 19,113,202, 33, 93, 88,136,234, 79, 55, 35,165,182,155, 91,102,129, +213,114, 43,243, 20, 18, 41,202,139,160,250, 43,227,169, 68, 40,202, 97, 17, 98, 38, 59,111,120, 73,152,133, 25, 73,162,252,197, +172, 44,112, 29, 70,251,113,175,133, 55,212,228,234, 34, 65, 16,191,247, 34,222,109, 14, 88,237, 37,182,152, 5, 38, 68,132,169, +199, 22,162,234,232,148, 2,176, 64, 28,169,176,160,210,174,135, 46,161,102, 78,212,177, 96,115,231,174,239, 79,121,231, 68,120, +252,154, 83,229,104,142,210,202, 9, 85, 10,148, 66,149,211,194,160, 83, 70,149, 69, 2, 25, 40,141,231, 60,139,121,129, 38, 44, +104,145,230, 70, 74, 1, 5,106, 83,156, 55,218,170,124,241, 81, 7,112, 64, 52,212,170,139,104,121,163,249,175,170, 98,237,223, +113,209,255, 0,135, 55,196,161, 72, 85,217, 49,214,148, 64, 75,116, 82, 16,131,183, 22,197,106,107,226,118, 29, 72,211, 28, 47, + 41,246,240, 42,228, 51, 13,146, 4,242,209, 32,218,123,131, 42,115, 10,109, 6,143,127,237, 43,229, 82, 18, 9, 60, 42,126,195, +191,134,171,138, 73, 28, 22,151,157, 16,123, 83, 85,146,237, 35, 49,151, 26,207,143, 52, 95,100, 16,216, 75, 97, 92, 66,137,216, +154,237,183,215,168, 89, 0, 2, 61, 51,109, 79, 53,220,158,145,113, 88,189,148,198, 25,205,242, 48,129,127, 45,151, 45, 81, 84, +194,220,242, 86,107,252, 75,161,189,194,252, 16, 15, 78,180,173, 41,200,117,254,187, 71, 78,131,203,231, 60, 3, 63,181, 7, 59, +168,233,182, 39,218,153, 31,188,204,191, 78, 55, 41,191,141,113,125,222,106, 81, 9, 78,213,167, 68,132,254,173,124,233,155,153, + 44,139,140,201,117,129, 57, 58,211,157, 24,145,173,143,200,101, 28,120,129, 81,253,173,101,137, 25,204,170,243,147, 4,161,137, + 92, 92,185,228,176,154, 88, 37, 10,226,174,157, 40,117,110,117, 0, 21, 67, 50,153,251,174,235,238,100, 12, 73,108,252, 41, 77, + 22, 62,132,106, 94, 72, 33, 48,153,116,141,122, 85,210, 83,176,164,178,146,165,169,101, 59,125, 58,170, 3, 20,104,204,186, 58, +226,151, 14, 84, 71, 80, 9,154,126, 23, 52,204,136, 36, 81, 11,102, 72, 90,185, 63, 9, 68,132,185, 81,238,209,197, 97,212,183, +148, 55, 31,150,204,229,204,183, 42,138,122, 58,138,146, 7,211,254,173, 52,226,201,141,139,213,152,200,203,178, 33,106, 80,252, + 85, 37, 73, 36,143,186, 6,250, 41, 31, 10,136,154,201,207,139,100,150,236,203,251,236,146, 9, 62, 20, 86,245,208,246,169,198, + 97,104,187, 88, 29,145,112, 76,132, 30, 81, 80,144,225, 35,165,104, 52,109,237,162, 26, 81,201,226, 73,154,243,142,161, 4,176, +154,163,149, 58,106, 66,196, 9,135, 43,222, 41,136,162, 51,106,156,107,193,193,196, 15,110,250,161,153,150, 72,100, 90,234,230, + 83,165,231, 3,182,171, 27,102,116,230,194,159, 41,226,192,235,198,191,234,209,177,175, 53,196, 40,249, 78, 84,107, 47,110,108, +246, 14,223, 73, 15,128,185,210,221,169, 7,173, 9,233,171, 51,203, 50, 82, 24,224, 20, 86,207, 18,221,143, 90, 35,169,105, 8, +132,200, 43, 53,233,207,168,208,103, 97,154, 32,128, 5, 40, 72,205,210,185,210, 93, 86,238,184,162, 16,125,131,167,234,211,138, +157, 66,114, 79, 56, 67,223, 59, 21,183,214,104,211, 77, 23,151,244,145, 81,161,202,164,254,102,137,135, 19,179,197,110, 43,215, + 73, 20, 15,186,190, 45, 15,113, 35,125, 82,176,238,208, 40, 25,128,136,219,111,241,160,101, 18, 22,234,135,203, 69,104,108,125, +180,174,136, 70,208,164, 10,175,242, 12,205, 79,100,143,222,249,124, 38,173,182, 7,191,109, 88,170, 26, 58,107, 11, 4, 26,244, +185,119,102, 35,188,210,170,242, 94, 10, 80,246,167,115,171, 52,176, 37,208,200,126, 10, 30, 97,111,150,139,188, 55, 98,142, 97, +227, 66, 7,133,116, 99, 56,149, 2, 25,120,152,205,206,211,132, 92, 44, 41, 36,207, 75,222, 98, 71,137, 7, 69, 6, 37,144,136, + 40, 19, 49,239, 47, 72,102, 52,160, 67, 42,220,143,175, 76, 98, 29, 16, 58,133,123,182, 76,183, 54,185, 37, 39,201,109, 99,130, +135,141, 14,167,183, 68,238,156,163,101, 78,205,197, 24,136,215,194,176,154, 10,125, 20,208,103, 72, 37,211, 18,202,190,200,110, +147,237,178,100, 56,242, 84, 10,135,193,244,147,171, 53, 86, 20, 12,203, 43,159,181, 87, 73, 16, 49,136,145,194, 74, 95,125,174, + 84, 62, 53, 3, 84,111,135,196,134,102, 89, 83,189,204,188, 92, 78,106,155,122, 82, 79,150,249, 82,168, 61,164,127,167, 87,233, +175, 69, 40,204,162,214, 84, 75,101,215, 96,187, 95, 49,215, 80,226, 79,246, 70,231, 66,156, 67, 41,130, 93, 18,141,115,185, 57, +243, 9, 96, 19, 20,114, 72, 95,190,157, 52,251, 3, 50,144, 37, 67,199,110,215,153,178,154,181, 50, 21,230,149,239, 95,236,157, + 40,196, 4,209, 37, 58, 93,242, 39, 47,183,104,118,226, 40,166, 27, 9, 81, 61, 74,147,170,147,150,210,164, 18,182, 89,102, 97, +167, 20,183,199,192,181,164,215,251, 85, 3, 68,140,204,194,103, 77, 5,226,111, 98,197,189, 68, 18, 15,210, 80, 20, 63, 86,151, +145,201, 13,123,188,219, 99,201, 92,151,160,163,136, 69, 20, 8, 26,204,172, 21,162, 67,132, 24, 68,184,185,152,161, 46,213, 72, + 44,130,159,164,127,244,235, 70, 36, 72, 50,166, 67, 45, 25,149,235,201,186,198,186,168, 41, 33,228, 42, 58,182,216, 45, 58,142, + 20, 90, 68, 21, 27, 11,128,161,196,201, 23,111,197,144,219,234,163,190, 97,216,251,207,191, 74,248,188,244, 68,140,246,169, 22, +236,148, 35, 18,157, 49,197,126, 47,153,196, 26,244, 7, 82,242, 24, 4,241,155,175,113,223,148,213,134, 52,119,149, 79,153, 95, +153, 90,254,205,107,161, 74,181, 35,102,136,188,107,135,157,193,212, 10,199,102,148,246, 84,109,170,222, 91,148,222, 98,139, 50, +236,221,194,236,153,149, 4, 57, 68,172,120, 87,174,136,106,209, 78, 54,178, 49, 6,242,212,124,157, 22,201, 4,112, 80, 10, 74, + 79,141, 55,219, 80,148, 8, 70, 23, 5, 79,122,225,237, 54, 31, 53,230,123,149, 98,137, 37,155,234,214,212, 87,166, 48,220,132, + 86,134,156, 11,143, 4, 54,145, 77,128, 73, 39,216, 60, 71,178,125, 51,234,121, 6,195, 76,166,240, 1,192,248,127, 45,126,228, +122,239,213,146, 38, 82,152,142, 96,172,219, 32,221,211, 33,128, 4,110, 11, 64, 74,249,113, 0,132,186,167, 28,113, 74,223,170, +146, 40, 58, 84,235,215, 76,137,151, 5,171, 18, 54,165,188,115,183, 86,166, 33,190,212,177,231, 78, 82, 66, 20,219,165,107,220, +124, 68,142, 42, 64,241, 59,145, 95, 96,246, 20,241, 85,228,154, 59, 79,217,233, 93,200,200,153,237,220,117, 46, 92,247, 22,137, + 83, 29,217, 44,197,101, 79, 2,149, 41, 69, 60,170,118,232,127, 78,129,145,144, 42,137,145,209, 14,186, 13,178, 97,197, 89,125, +204,238,215,162,143, 79,247,129,219, 28, 58,201, 39,185, 29,233,140,133, 42, 77,171, 26, 64, 83, 17, 31,105, 94, 83,136,126, 65, + 95,148,223, 21,144, 23,196, 45,105, 38,138, 0,144, 15, 55, 60,219,110, 46, 52,143,105, 93, 93, 61, 51, 31, 28, 53,174,102,121, + 14, 41, 34,127,106, 61, 71,122,149,192,207,119, 59,109,217, 27, 85,207, 10, 89, 91, 11, 93,131, 54,132,187,131, 14, 52, 65, 91, + 46, 53, 58, 52,100, 37,196,215,116, 41, 96,253,186,140,122,196,106,150,217, 75, 94,240,179,172,197,133,129,196, 8, 31,241, 7, +247, 16,168,188, 55,185,110,246,179,184,238, 97,121,118, 51, 42,195,147,197, 83,110,203,177,101,241, 12, 41,205,182,181,249,105, +144,149, 18, 82,243,100,138,115,108,241,250,122,235, 90, 25, 49,186, 47, 18,168,156,113, 29, 98,253,224,232, 71,241, 93, 11,221, + 31, 84,152, 15,109,123,111, 50,238,250,208,237,230,228,202,237,232,102, 50,197, 82, 22,128,144,144, 28, 42, 52, 9,220,236,145, + 79,168,105,168,195,157,147,213, 18,204,152,194, 58, 46, 16,191,119, 50,110,109,148, 57,144, 60,178,166, 95,112,172, 54,221, 56, +182,223, 34,174, 32, 36, 1,176,160,215, 72, 43,218, 25, 96, 27, 92,186,219,110,204, 46, 49, 50, 38, 33,201, 10,105,150,221,109, +148,114,253,170, 30, 32,208,109, 64,145,166,218,145,155, 43, 35,186, 55,246,173,248,148,124,142,206,201, 44,173,142, 46,202,108, + 84,166,169, 4, 4,143,235, 10, 18, 73,233, 95,177, 66, 42, 54, 77,152,170, 94, 78,125, 54,252, 27, 93,180,169,199,144, 60,198, +221,104, 26,252, 35,226, 88,165,122, 31, 17,163, 87,161, 85,231, 39, 71, 45,185,101,198, 53,193,153, 23, 40,200, 90, 16, 18,151, + 8,117, 77, 6,214, 71, 21, 5, 22,182, 73,166,195,150,250, 58,174, 74,127,129,151,220,219,182,201,138,218, 27,101, 97, 42, 64, +137, 40,169,228, 58,210,252, 67,139, 32,164,251, 15, 29, 12,192, 34, 70,194,132,225,147,215,111,186, 34, 67,124, 86,235, 74, 10, + 83, 65,124,131,136, 38,165,165, 43,159, 5, 37, 67,110, 38,186,177, 92,219, 66,137, 11, 72, 46,175,204, 15,183, 93,139,153, 5, +171,244, 21, 58,228,185,132, 60,228, 55,144, 94, 91,110, 44,241, 41, 80, 77, 17, 65, 77,128, 20, 30,205, 81,183,120, 37,184, 45, + 72,229,196, 55,106,185,123, 91,140,227,118, 11,131, 87,152, 54,196,162,209, 12,164, 54, 22,195,117, 83,132,212,249,156,141,104, +105,224,154,123,107,174, 35,212,158,164,175,166,192,185,121,145,160, 68,191, 60,136,171, 86,255, 0,220, 57,121, 89, 76,251,146, +144,150, 99,169, 45, 52,219, 96, 32, 1, 90,211,225,160, 63,102,190,122,235, 93, 90,236,235, 65,176,147,247,170, 39, 36,148, 86, +235,114, 78, 61,110,143, 62,180,145, 34,139, 4,248, 0,157, 99, 87,163,133, 8,218,232, 30, 73,148, 42,225,142,165,181,174,174, +200, 95, 65,227,184, 26,175, 94,147, 42, 50,150,228,103,183, 86,184, 34,106, 28,113, 32, 45,182,146,162,175, 97,235,163, 74, 69, + 32, 66,153,220,233, 17,221,186, 48,211, 10, 28, 30, 79,196,175,102,135,143,113, 32,167,248, 89, 9,105,219,101,189, 49, 99, 26, +121,168, 93, 83, 90, 86,149,211,234, 67,165,188, 5, 19, 34,151, 17, 16, 93,184,199, 88,230,194,185,245,247, 29, 24, 7, 9,163, + 32,135,192,158,137,141,155,130, 8, 4, 54,167, 73,250,191,213,162, 10,200, 42, 70,206, 74, 71,110,217,142,155,192,186, 83,147, +111,165,194,175,126,158,196, 57, 7, 76, 24, 21,145,111, 94,100,100,241,126, 22, 24,119,227,227,236,161, 4,126,157, 79,112, 17, +100, 55, 64,187,149, 45,135, 50,105, 51,161,236,133, 40,165, 63,237,117,208,145,107, 29,169,183, 18, 98, 36,140, 80,249,233,171, +206,160, 54, 20,127,172,122,104, 18, 58,163,237, 5, 15,200,236,118,187, 68, 85, 88,222, 74, 76,151, 80, 20, 78,219, 26,106, 17, +145, 67, 49, 65, 23, 29,136,150, 72,108,160,254, 58, 30,242,214,125,213,235,166,242,220,185, 86, 8, 0, 35, 63,205, 89,153,107, +126,223, 94, 66, 58,128, 30,225, 65,163, 8, 32,146, 0, 64,231,220,230, 75,142,210, 91,168,101,167, 56,113,246,154,237,254,157, + 24, 86,193, 71,115,168,189,200,187, 45, 48, 90,180,180,170, 6, 80, 22,224, 29, 74,136,211,152,136,186, 24,147,149, 86, 64,188, +201,185,228,191,202,227, 10,172, 16,143,168,157,245,126,184,124, 14,133, 62, 37, 95, 56,251,236,219, 49, 5,199, 64,163,239,173, + 12, 5,127,100, 1, 93, 84,200,210, 42, 60, 81, 43,214, 64,213,154, 48, 90,149,248, 77, 34,169, 3,250,196,106,181,116,104,253, +168, 70,101,210, 83,185,111,159, 1,217, 74,112,252,219,202, 37, 64, 31,217,212,103, 91,201,149,136,203, 68,159, 43, 34, 84,251, +203, 48,153, 63,135, 90,171,232, 27,235, 90, 20,180, 80,229, 55, 40,237,178,243,228,171,229, 1, 6, 82,149, 81,238, 77, 53, 94, +234,152, 58, 85,216,153, 45,247, 8, 47, 92,225, 9, 52, 86,252, 77,124, 8,255, 0, 94,170,236, 36, 34,111, 82, 27, 68, 37,222, + 31,184, 62,223, 38, 2,168, 82, 71, 90, 10,141, 41, 56,100,196,232,162,101,130,214,202, 33, 94,225,129,197,229,148, 41, 61, 8, +166,218, 35,151, 68,143, 4, 62,250,237,166,229, 21,171, 52,112, 15, 26,188,226,136,240, 34,191,175, 71, 23, 48, 81, 17, 66,177, +132,195,114, 35,150,183, 8, 4, 57,248,106, 39,160, 6,186, 47,152,218,166,219,201, 19,202,108,150, 91,163,177, 24,117,170,200, + 31, 18,168, 54,162,124,127, 70,163, 43,187, 20,188,176,139,193,201, 45,140,203, 12,180, 66, 92,134,208, 75, 65, 62, 39,166,171, +137,147, 36,165, 86,136,124,172, 82,207,119,156,230, 65, 53, 0, 60, 18, 72, 39,196,145, 93, 26, 89, 6, 37, 12,197,150,140,118, + 20, 43,189,194, 83,241,192, 63, 35, 29, 85,167,183,125, 57,158,137, 73,111, 77,157,136,214, 6, 99,162,137,113,247,133, 85,244, +157, 11,204, 58,148,162, 59, 84,102,226,198,176,102, 77, 37, 27, 44, 40, 54,170, 83,170,182,212, 68,204,131,164,203, 47, 79, 71, +182,103, 38, 58, 77, 3, 99,154,143,188,138,233,228,116, 72,112, 90,114,197,183,118,185,219,161,116,106, 67,168, 82,191,235, 3, +162,213, 45,169,132, 29, 31, 75, 44,127,156, 87,119,175,240,254, 98, 45,181,219,254,237, 67, 68,243,121,168,237,228,137,219, 90, +110, 69,178, 67,108,145,243, 8, 85, 40,105,189,124, 53,142, 74,210,218,188,217,225, 71, 50, 37, 93, 37, 80, 62,192, 13,239, 77, +143,179, 82,140,200,213, 14,113, 5, 47,247, 2, 36, 7,173,255, 0, 39, 65, 84,185,231, 36,248,133, 31,102,167, 92,200,147,164, + 40, 4, 36, 44,174, 43,239, 33,168,145,119, 90,143, 58, 15, 0, 55,213,234, 38,250,149, 94,250,214,204, 86,203, 54,247,140,220, + 45,138, 37, 42, 43, 10, 73,247,167,255, 0,163, 86,229, 33, 19,170,140, 99,162,105, 77,177,249,137,139,104, 86,207,178,205, 83, +244,210,154, 5,210, 3, 85, 22, 68, 49,187, 76,150,138,172,215, 4, 16, 93,170, 78,222,250, 3,160, 68,129,170,144,172,160,247, +235, 36,252, 86,234,211, 18, 18,124,133,172,148,168,251, 58,141, 18, 50, 18, 42, 70, 12, 20, 94,229,100, 44, 98,119,219, 62, 95, + 45,208,205,171,128, 47, 56, 73,167, 20,129, 93,128, 36,154,120, 1, 93,104, 99, 96,203, 34, 66, 48,137,148,137, 96, 7, 51,249, + 32, 18,120, 5, 89,247, 55, 55,190,119,154,252,111,236,182,235, 56,108, 37, 31,229, 81, 29, 41, 65, 10, 90, 2, 84,243,129, 71, +136, 91,148,160, 31,120, 13,190,245,117,239,190,152,244,212, 58, 69, 44,117,178, 95, 49,252,135,114,217,196,199,218, 28,241, 94, +109,157,164,187,202,182, 68,137, 54, 48, 10,152,181, 41, 84,120, 7, 74,212, 41,201,192, 40, 18, 19, 80, 79, 77,181,210, 74,206, + 37,105, 70, 4,128, 22,235,247, 96,114,204,125,232,246,120,149, 92, 71, 72,113,167,219,114, 43,172,190,154,208, 26,161,103,127, +167,125, 66, 25, 49,144,117, 41,227,144,152, 59,178,140,155,211, 55,164,140,165,252, 89, 50, 99,119,123, 45,121,139, 36, 41,212, +113,135,227,198, 9, 66, 74,154,147,199,144, 41, 14, 45, 65,104, 63, 9, 0,138, 83, 88,153,247,249,146, 3,147,173,190,147,143, +183,116,184, 24,135,252,191, 55, 92,249,150, 71,239,159,167,107,102, 43,219,127, 69,214,134,151,110,190, 64,110,118,103,220,137, + 81,226,202,254,105, 53,199, 7,155, 29,249, 82,249,183, 18, 43, 28, 18, 82,208, 41,216,215,226, 81, 82,149, 80,221, 89, 7,119, + 46, 74,190, 77,121, 53,204, 10, 70,135, 83, 46,247,231,220, 63, 53,246, 67,242,185,244,105,221,142,201,224,253,194,190,247,214, +212,213,141,204,134, 92, 24,214,251, 19, 75, 97,214,193,182, 48,227,111,207, 73,142,183, 91,227, 33,199,104,130, 20, 73, 74, 1, +232, 70,179, 51,250,124,252,157,243,208,131,162,161,155,213, 99,101,209, 21,123, 87, 37,126,118, 61,134,192,178,126,213,221, 47, + 41, 97,166,243, 44,105,185, 23,251, 28,244,128, 30,101,216,109, 42, 67,140,133, 36,138,182,243,105, 40, 82, 79,194, 73, 10, 34, +169, 20, 93, 32,201,149,239, 48,110, 4,246,133,241,251,188,153,157,223,228, 27,179, 2,227,241, 89, 89, 83,143,168, 18,165, 84, + 81, 94,222, 59,147, 81,227,227,190,189, 27,167,135,139,174,111, 59,225, 36, 4,173,133,100, 81,146,164,176,232, 0,211,141,119, + 7,226,216,244,246,141,104, 77,102, 87, 32,155,162,201,141,117, 71,206,202,119,132,160,164,148, 84,142, 66,130,131,199,250,163, +199, 67, 8,178, 42,220,236,143,112,177,233,246, 59,158, 3,144, 15,155, 19,152,226,174, 72, 75,156, 18, 27,226,146,147,213, 37, + 33, 53,168,223,233,208,236,129,119, 10, 2, 79,162,161, 47,114,226,195,187,220,225,246,242,220,253,214,205, 13, 14, 57,231,199, +109, 68, 68, 75,138, 28, 93, 83,159, 15, 20,149,158, 6,187, 84,145, 90,212,106,169,201,218, 81,191,100, 76, 93, 77,145,220, 89, + 88,223,149,117,189,219,164,193,109,198, 16, 46,141,206,105,213, 68,228,177,177, 83,169, 5,170, 42,129, 73, 80, 62, 62,221, 89, +142,104,224, 85, 51,143, 33,201, 49, 90,187,181, 18,253, 38, 44, 91, 36,166,121, 44, 37, 15,180,226, 93, 42, 73, 41,173, 40,121, +124, 42, 78,227, 98, 43,211,221,106,187, 68,248, 33,202, 6, 39, 84,235, 14,235, 98,182,135, 2,219,109,219,146, 82,159,154, 67, + 64, 22,195, 78, 14, 68,164, 41, 72, 38,158,193, 66, 61,157, 52, 70, 72, 73, 92, 62,142, 21,142,231,119, 71,240,155,123,143,177, + 42, 58,140,176,203,143, 41,178,164,172, 84,128,186,252, 67,106,143,175,174,178,189, 67,212, 63,101,133, 59,128,115, 22,238,226, + 81,234, 27,164,186,141,118,105,176,173,235,179,197, 28, 27, 72, 10,240,216, 15,120,215,202,125, 83,172, 89,159,116,173,176,243, + 86, 44,168,146,139,218,241,116,170,223,111,135,200,149, 62,239,152,178,124, 64,222,186,199,141,155,164,170,236, 42, 95,120,238, +107, 69,170, 50,163,159,194,105, 62, 90,105,210,160, 1,167, 17,123, 60, 83, 1,162, 85,180,203,113,251,108, 89,207, 18, 90, 74, +248,160,120,114, 29,117, 9, 86,214, 20,252, 0, 86, 94, 48,251,237, 88, 94,187,199, 77, 66,168,130,161,236,216, 29, 66,109,180, + 39,218, 74, 31,127,121, 55, 89, 72, 90, 85,240,183,239,247,106,172, 32, 64, 79, 48, 64, 65,111,145,110, 75,150,155,146,129, 1, +180,130,144, 58, 83,254,135, 87, 4,128, 9,132, 9, 8,102, 64, 95, 85,129,198, 65, 33, 75, 73,113, 71,127,126,141, 89, 5, 72, + 67, 68, 19, 4,188,202,145,103,149, 13,245, 20,188,134,138, 91, 39,161, 7,111,233,213,241, 16,132, 83, 54, 47,116, 54,139, 50, +121,170,146, 91,162, 18, 61,198,162,186,169,145, 80,100,206,159,240,187,162, 98,224, 51, 80,193,254, 53,199, 60,211,237, 32,141, + 86,152,112, 8, 74, 39, 84,142,202, 21,145,229, 95,201,222, 39,154,249, 45, 7,218, 70,250,148,131,106,172, 70, 65, 49, 51,147, +185, 97,198,149, 15,144, 11,101,208,163,254,202,169,253, 26, 20, 43,220,167,230,104,129,230,249, 79,157,112, 85,211,204,168, 91, + 97, 98,167,221,162,202,157,186, 40,139, 28,173, 86, 75,219, 55,140,122, 65, 89, 0,130,149,165,126,197, 2, 52, 72,212,158, 86, + 21,150,107,151,151,121,118, 35,171,226,212,196, 36, 34,167,246,128,174,159,104, 37, 6, 82, 82, 38, 72, 97,139, 12,169,168, 63, + 20,117,130,176, 60, 8,241,253, 26,148, 99,171, 40, 9,178, 86,206,110, 15, 25,106,144,149,114, 14,182,151, 6,253, 69, 52, 50, + 52, 61,201, 70, 76,146,241,119,154,137,148,155,162, 72,243, 86, 66, 0,254,209, 59,106,237, 35,224, 1, 41, 23, 42,227,181, 94, + 31, 92,115, 20,255, 0,216, 36, 41, 34,191,182,105, 93, 85,202,142,224, 2,104,201, 9,206,242,151,228, 77, 24,237, 56,190,211, + 97,210,124, 85, 81, 81,162,157, 25, 54,213, 5,219, 67,145, 89,138, 18, 9, 15, 50,167, 28, 62, 3, 81,132, 6,231, 69,150,129, +146,125,157,213, 53,117,114,232,248, 33,181,184, 89,110,189, 40,157,181,165, 25,196, 29,188,208, 8,208,173, 22,220,170,106,243, + 66, 29,248, 90,113, 74,160,246, 37, 35,109, 44,186,218, 40, 84,133, 97,227,243,153,135, 10, 29,254,112, 42, 74,159, 90, 83,244, +212,234,140,106, 96,200,132,151, 77,248,250, 25,184,216, 36, 93,158, 32, 37, 79,154, 15,160,109,250,181, 90,216,106,166,250, 36, + 62,224, 94,158,128,250, 34,127,217, 36,169,196,143,101, 78,152, 71,146, 53,101, 10,177, 92,228, 75,151,205,106, 41,243,126, 4, +143,104,166,139,100, 24, 38, 5,120,118,225,252,138, 91,172, 19, 71, 2,171, 66,119,223, 81,144, 44,164,116, 86, 47,146, 39, 49, + 10,236,206,233, 17,234,170,120,242, 21,208,226, 84,156,148,164,235, 75,254, 99,231,180,126, 53, 43,141, 62,179,167,140,117,117, + 39, 70,178,203,193,131, 10, 60, 52, 26, 56, 19,197, 64, 29,206,212,208,229, 2,232,114,208,161, 29,165,187,124,188,251,227,110, + 42,190, 96, 9, 0,159,117,124,117,114,218,254, 4, 18,117, 68,111,183,132,166, 59, 44,133,209,109,168, 57, 74,244, 32,234,179, + 16,139, 18,131, 92,111,235,115, 49,140,250,205, 66,214, 29,246,253,221,247,209,235,175, 69, 19,168, 67,110,247,247,174,185, 5, +206,238, 87,251,181,132,253, 92,105,167,148, 62, 20,137, 12,180, 94,243, 49, 14, 69,169,197, 44,121,137, 88, 53,175,128, 58, 45, + 84,186, 99, 45, 22,244,247, 60,213,103,204, 20,249,228, 57, 90,254,215, 5,105,121, 90,168,186,123,182, 95, 23, 24, 71,136,149, +126, 36,167,146, 79, 94,131, 89,178,165,145, 69,234, 52,252,164,199,155, 45,144,170, 23,100, 82,155,251, 70,139, 28,100,198,212, + 23, 53,191,169, 76,161,210,173,214,231, 17,185,240, 26,151,146,218, 41,249,186, 45,118,150,216,149,104,110,254,104, 84,128,177, +241,116, 32,105, 74, 59,116,237, 77, 25,191, 20,127,182,238,219,222,177,205,154,132,128,219,166,180,246, 30,186, 21,242, 32,163, + 86,200,232,139, 16,221, 35,220, 2,128,100, 36, 36,251,232, 52, 35,105, 60, 83,136, 34,147,101, 68,249,230,221,104, 10,161, 53, + 73, 26,173, 43,153, 26, 92, 16,190,242, 42, 52,155, 69,190, 74, 85,252, 79, 2,227,148,218,159, 89,213,204, 82,100,116,231,246, +225,196,161,104,203,154,111,157,216,151,223, 12,149,142,221,226, 37,165,227,246,135, 84,195,151, 37, 44, 41,151,159,175, 21,148, +146, 1, 82, 27, 27, 0,145,185,222,180,166,190,138,244, 71,166, 70, 5, 63,184,184, 31, 50, 92, 1,226, 7,223,199,199,144, 75, + 22,145, 41, 58,185,216,197,240,190,217,216, 89,109, 18,151, 42,238, 9,125, 92, 99,169,227,178,104, 82,138,212,242,169,167,221, + 20, 6,128, 15, 30,166, 83, 50, 61,129,111,194, 2, 33, 46,185,220,185, 88,220,215,174,115, 17,230, 76, 89,243, 91, 98, 50, 74, +248,165, 73, 4,115,175, 21, 36,238, 42, 1, 7,221,165, 32, 8,100,104,186,184,189, 61,119, 59,179,189,217,190,196,107,187, 63, + 20,198, 71,146,218, 28, 67,174,167,250,201,228,178,218,148, 10,105, 93,134,222,221,103,228,215, 42,135,194,174, 86, 68,147,255, + 0,170, 44, 91, 5,203, 32,217, 94,237, 12,200, 87, 60,175, 28,157, 30,247, 6, 52,183, 66, 96, 41,112,223, 68,196, 50,226,190, + 33,193,197, 55,229,184, 66, 43,197, 71, 99, 74,107, 14,248, 78,112, 35, 94, 43, 95, 2, 85,194,194, 38, 90, 50,137, 7,187, 77, + 62,246,246, 39,239, 79, 16,125, 15,118,222, 74, 59,139,112,237, 53,170,211,157,151, 90,152, 94,121,113,229,179, 22, 94,206,114, +140,203,175, 59, 29,149, 37, 95,180,202, 18, 43,189,116, 12,121,219, 81,121, 68, 72,142,208,177, 51,177,108,177,227, 27, 26, 42, +229,238,111,174,204,125, 22, 71,147,101, 97,231, 7, 15, 50,177,155, 83,245, 65, 21, 4, 22,121, 2, 41,239,209,239,202,158, 71, +249,133,135,135,217,213, 44,110,139, 40,200,109, 14,124, 71,230,190,103,126, 97,217,223,115, 59,210,196,220, 82, 4, 99, 2,211, +115,109,216,178, 38,188,235, 75,112,199,116, 6,221, 67, 13, 50,165, 30,106,109, 69, 60,151,192, 38,188,135, 35,182,174,224,237, +254, 87, 42,253,253, 58,116,151,180,129,220, 8, 39,238,112,184, 47,185,254,159, 35, 48,151,217,106,174, 58,194,200, 66,156, 33, + 45,172,114, 42, 81, 35, 97,254,191, 13,118,216,115,216, 25,115,183,213,184,191, 53,205,153,205,177, 56,238, 72,184, 80,137,228, +104,182,208,129, 82, 1, 87, 16, 54,233, 77, 91,222,235, 50, 84,152,148, 74,207,113,117,212,161, 14,149, 39,238,132,144,146, 55, + 62, 4,248,244,212, 29, 41, 2, 2,126,198, 45, 47, 42,212,252,168, 75, 9, 50, 16, 80,225, 4,161, 64,165, 10,219, 96,125,181, +168,209, 12, 30, 37, 6, 5,164, 22,175, 76,140,122,172, 99, 1,204, 36, 89, 35, 91, 7,167,187, 4,171, 93,199, 56,141,113,122, +211, 30, 83,204,222, 86,228, 56,207, 48, 29, 90,103, 74, 75, 37,142, 4, 49,204, 51,200, 21, 4,243, 36,224,201,163,175,122,215, +167, 34,221,251, 71,202,126,220, 87,208,207, 74, 30,137,111,119,255, 0, 68,246,156,251,187, 86,127,148,255, 0, 48,189, 58, 69, +158, 60,214, 60,181,189,102, 82,248, 48,181,182,232, 4,161,197, 5,169, 21, 27,160,131,208,235, 38,252,194, 38, 0, 86,140, 65, +118, 92, 81,235,107,210, 28, 63, 78,217, 52, 46,228,224, 10,249, 44, 49,217,204, 69,145, 21, 0,134, 45,114,228, 57,229, 50,251, +124,105,198, 43,142, 16,219,173, 86,129, 74, 74,147,190,218,215,198,180,176,144, 84,100,211,248, 15,177, 8,118,220,172,102, 56, +155,122, 63, 41,112,146,219,127,128,133,149,172,162,149,171,107, 59, 26,111,240,174,181, 27, 3, 93,111,215, 51, 48,178,109,134, +210,159,125, 34,229,127,229,158,250, 66,157, 62, 42,156,130,195,209,140,181, 21,243, 83, 8,125, 85, 81, 41, 60, 79,194,144,162, +120,147,160,117, 76, 67,149,133,117, 67,140,163,248,107,249, 41, 85, 54, 43,189,174,119,148,177, 34,115, 84, 28, 41,229,239,177, + 2,167, 95, 26,228,213, 56, 19, 9,134,144, 37,244,213,193,247,171,210,177, 77,114,243, 21,152,176, 86,202,232,180, 52, 72, 35, +223,182,171,194, 4, 20, 56,144, 74, 31,144, 92, 99, 94, 49, 70,150,250,170,166,221, 40, 62,250,157, 29,136,144, 61,138, 17, 8, + 43, 17,126, 79, 29, 67, 76,238, 4,128,164, 15,239, 43,125, 88,143,196, 93, 65,216, 43, 42,221, 61,184, 56, 84,200, 9, 60,121, + 80,166,189,106, 5, 78,169,202,174, 9, 70,105, 52, 95,221,106,216, 37, 0, 84,162,176,157,171,184, 38,154, 39,237,244, 79, 41, +184, 77,178, 37,199,149,109, 98, 74,168, 90, 13, 4,172,123,233, 77, 82,144, 32,178,132,102,201,107, 52,133, 75,107,173,197, 35, +226,108,175,233, 77, 55,166,172, 99,233, 34,136, 44,112,149,241,104,172, 42,195,193,103,139,171,229,193,126,211,214,154,210, 18, +213, 13, 69,147,145,173, 72, 96,179,247,218, 95,146,242,125,180,218,186,105,143,132,160, 74, 93,137,206, 6, 88, 96, 65,139, 49, +181,127, 15, 83,205, 35,161, 30,205, 83,119, 96,150,160,148,219, 22,221,102,135,145, 65,204, 24,160,132,235, 11,117, 64,120, 43, +254,131, 70,148, 9, 12,151,152,171,188,166,248, 85,116,155,107, 89,161, 46,121,141,239,213, 42, 53,211,215, 78,210,154, 54, 57, +100, 22,252,244,135,218,254, 94,209, 37,228, 36, 41, 53,241, 4,104,246, 67,154,144,119, 90,177,187,196,171,118, 53,115,138,160, + 75,201, 28,169,189, 71,191, 72, 0, 74, 36,138, 47, 10,106,110,201,182,201,136,175,199, 74, 3,202,247,142,132,104, 70, 35, 80, +144,213, 16,185,174, 76,104,151, 27,106,137,242, 39,209, 77,171,174,231,253,122,156, 8,116, 41,196,186,129,150, 98,215,104,120, +148, 75,146,129, 46, 54,124,146,124,120,158,154, 28,153,212,227, 20,153,145,227, 55, 11, 52, 91, 85,246, 56, 41, 76,135,130, 84, + 61,167,144, 35, 87, 41,218, 66,140,193, 77, 71, 36,187, 91,174,236,171,129,249, 87, 40, 85,214,181, 0, 84, 29, 67,104,146,136, + 12,136, 60,216,202,243,215, 46,172,143,133, 8, 66, 10,124, 54,213,108,147,180, 4,104,132,217, 34, 55,205,219,221,132,216, 6, +105,163, 13, 36,120,114, 77, 54,213, 11,108, 98,145,119, 75,153, 31,111,223,129,136, 6, 2, 71,207,176,240, 10,160,241, 82,180, + 60,108,147, 44,159, 16,166, 71,194,145,101,226,147,155,203,222,148,132, 17, 21,148,161,176, 71,245,136,169,215, 69,109,187,224, + 2, 8,139, 43, 18,234, 91,182, 98, 16, 25,124, 1, 29,149,121,138,254,241, 26,171, 41,114, 9,194, 99,237,178,227,206,178,195, +128,243,149, 98,115,235,168, 21,168,223,109, 86,151, 21, 38,116,159,222,203, 41,182,202, 66,159,162,127, 17,113,171,239,240, 58, +106,156,201, 56,146, 3,139,249, 33,108,202,112,138, 48, 74, 15,211, 93, 91,156, 95, 68,219,146,198,127,146, 39,252,206, 28,108, +209,181,128, 13, 61,218,120,210,193, 52,166, 21,195,219,155,210, 46, 24, 51,100, 42,170, 69, 27,169, 62, 27, 15, 29, 86,133, 90, +148,230, 73, 91, 53,185, 11, 6, 87, 21,142, 95,130,245, 22, 41,181, 77, 70,139,229,104, 82,140,212,200,168,115, 42,184, 34, 98, + 62, 38, 26, 95,150,126,146, 54,235,168, 93, 29,177, 83, 39,113, 73, 76, 95,164,227, 57,252,139, 81, 60, 67,170, 28,147,211, 86, +225,241, 86,171, 76,177, 83,110,183,231,110, 51,101, 70,140,170,200, 66,194, 83,244, 87, 65,149, 73, 70,213, 3, 52,187, 63, 98, +184,196,124,253,244,162,132,239,212,232,244, 86,233,231, 99, 45, 13, 92, 87, 27, 17,122,115,191,226, 38, 44,172, 31, 26, 13, 78, +200,114, 81,141,138,186,200,114, 91,131,207,199,220,144,218,142,254,202,157, 89,199,172, 37, 57,169, 13,222,157, 54, 87,156,228, +124,209, 53,148,211,122,238,203,138,254,141, 63,146, 55,123, 16,252,197,107, 90,179, 69,171, 56,131,107,113,127,187,228,119,240, + 35, 84, 37, 67,242, 66,243, 86, 74,200,145, 43, 46, 68,102,213,205, 43,146, 85, 81,253,145,190,172,254,216,162, 9,160, 93,206, +204, 16,197,205,184, 77,171,225,111,154,143,211,211, 80,141, 4,169, 74,205, 20,139, 14, 88,231,254, 16, 59, 33, 10,229, 32, 41, + 69, 32,120, 2, 78,135,101, 63, 27, 34,194,127, 10, 57,218,107,188,209,143, 34, 83,171,252, 37, 21, 7, 17,236,166,168,229,213, +170, 61, 51, 78,215, 11,139,240,236,232,123,149, 25, 90,121,160,239, 83, 67,191,234,214,116, 66,178,235,197,163, 32,114,228,180, +173,179,248,133, 35,138, 79,141, 58,232, 54,199,107,168,239,220, 21, 77,249,144,122,137,141,218, 30,207,198,182,192,115,134, 87, +144,159,144,138,161, 90,179, 29, 32,169,247, 69, 63,104,138, 37, 62,243, 95, 13,122, 71,211, 31, 79,142,161,157, 27,103,173,117, +252, 94, 36,112, 30,246, 39,193,144, 55,149, 77,122, 17,187,200,191,135,174, 18,130,156,186, 60,166,209,109,182, 64, 72,162, 91, + 4,133, 41, 84, 39,221,237, 63,105,215,209, 93, 70, 91, 64, 1,109,244,200,233,170,235, 12,249,251,126, 39,136,170,230,204,132, +185,145,184,134,219,146,226,156, 73,116, 36,172,164, 54,146, 57, 44,168,124, 91, 84, 15,102,199, 92,253, 82,148,166,199,130,220, +144, 17,142,138,162,185,187,112,185, 68,230,149,249, 77,186, 82, 18,130,242,150,225, 42,216, 41,102,129, 32,145,238,213,228, 39, + 44,138,226,119,203,222, 59, 14, 69,129,183,158,224, 40,217,107,204,116,138,208, 38,165, 32,211,106,127,171, 67,178, 2, 74, 80, +155, 43, 3, 25,202,238,146,172, 74, 76,135,202, 80, 1,242, 5, 18, 21,197, 39,122, 5, 85, 3,115,237, 30,237, 87, 53,177,100, +231, 80,163,220, 51,107,220,249, 2, 20,127, 55,229,121, 41,177,201, 74,115,226, 73,228,124,180,168,238, 64,216,145,250,116, 65, + 80, 10,188,164, 87,137, 93,217,206,241,203, 90,103,254, 58, 82,231,224,149, 16, 42, 27,248,147, 80,148, 16, 41,198,167,127,163, +221,168, 28,120,205, 48,178, 81, 85,214,115,234, 4, 73,186,249,247,116,174, 74, 8,161, 46, 21,143,188,181, 86,167,160,232, 9, +219, 86, 41,195, 0,104,135, 44,146,232, 44,238,212, 91, 59,151,107, 55, 23, 90, 82, 45,210, 26, 74,163,184,207,152, 27, 79, 45, +146,106,107,202,160, 29,200, 27,251,246, 58,117, 93, 24,241, 65, 53, 25,234, 23, 39,119,239,210,110, 87, 96,190, 57,124,178, 50, +244,203, 35,239, 17,230,113,252, 69, 45, 36,236,221,104,104,120,236,124, 53,100,218, 36,171,207, 28,141, 82, 5,179,182,185, 93, +185,197, 71,186,194,121,164,172,121,169, 74,146, 56,144, 72,167, 2, 9,251,164,113,210,112,171, 89, 81,101,100, 88, 49, 41,120, +206, 48, 92,185,178,182,227,189,184,243, 0, 11, 11, 34,128,128,163,210,159, 93, 53,110,160,235, 62,192, 2,181,125, 24,119,171, +181, 62,159,179,148,231, 25,167,108, 49,108,241,228,201, 67,168,111, 43,182,137,171,101,198,135,239,163,242, 80, 74, 92, 4, 3, + 85,182,232,218,161, 32,212,235, 31, 63, 14,195, 45,213,173,156, 11,104,182, 2, 22, 19, 25,118,143,204, 46,209,238,135,230,203, +110,245, 9,206,125,201, 38, 36,226, 3,127, 40,104, 3, 98,148, 9, 64, 79,128,233,184, 26,199, 29, 46,210, 94, 64,191,219,177, + 78,216, 70,176,213,202, 50,240,227,238, 43,144, 61,121,247, 42,201,155,246, 46,245,137,206, 41,254,109,123, 49,224,219,227, 59, +251,197,188,101,180,232, 90, 83,214,141, 4,151, 9,232, 2,117,160, 42, 53,197,155,185, 84,197,132,167,104, 45,160,212,170,195, +187,211, 49,187,189,147, 28,187, 72,142,133,150,109,205,196,150,202,144,242, 22,183,152, 71,148, 10,220,160, 77, 42, 73, 21,250, +235,177,214,254, 53,100, 5,151,147, 32,100, 91,181, 42,118,179, 32, 98,199,122,145, 21,129,229,220,228, 2, 66, 9, 53,242,210, +193, 79, 36, 56,149, 16, 21, 82,122,142,132,143,163, 67, 22, 77, 46, 10, 17, 93,191,218,174,226,207,238, 71,108,220,188, 73,228, +111, 86,230,217,141,115,113,102,165,105, 41, 62, 83,196,138,253,240,157,207,183,233,215,128,253, 80,244,140,177,114,142,109,122, +215,105,115,221, 46, 7,216, 78,190, 37, 76,157, 17,139, 78, 86,202,131, 42,125,207,195, 13,169, 41,223,221,175, 41, 20,235,193, + 68, 77, 69,103, 42,117,120,147,181, 63,134,100, 81,179,244, 29, 78, 84,178,113, 52,199,140,100,112,165,196,136, 31, 80,226, 93, + 8, 30,245,248,106, 38,162, 6,137,247, 39, 92,134,224,136,211, 83, 98,220, 60,166,249,173, 35,173, 84, 53, 90,209,180, 39,139, + 32,247,216,209,236,248,131, 40, 90, 72,113,194, 84,146,122,208,234, 66,110, 2, 48,136, 69, 49,233,129, 88,195,118,215, 5, 67, +139, 73, 66,235,184, 30, 58, 20,225,205, 14,202,220,168,247, 73, 63, 55, 14, 77,172, 14, 75, 66, 20,210, 28, 30,218, 29, 6,161, +168, 42, 32,106,148,237, 54,245,219,236,242, 99, 75, 85, 36, 33,196,174, 56,247, 43,195, 90, 51,144, 3, 69, 58,226,229,104, 56, +131,236,207,106,224, 43,242,210,106,181,131,224,160, 52,226, 96,132, 41,195,226,116,211,140, 90, 62,125, 45,227,178, 83, 71,146, +181, 58,158,155,208,244,251, 53,159,115, 68,186,150,212,238,171,123, 16, 44, 44, 89,222, 33, 79,113, 90, 17, 95,217, 10, 31,233, +209, 99,120,116, 51, 91,232,171, 44,146, 19, 98,233, 6, 83,201,252, 84,185,242,206,159,104, 10,160,209,167,112, 60, 20, 97, 4, +106,235,133,178,238, 82,204,152,123,199, 62, 90, 22, 61,196, 13, 70, 55,184, 32,162,236, 68, 50,142,222, 69,137,113,114,109,189, + 3,202, 45,252,180,132,143, 26,142, 85,253, 58,171, 27,136, 68,148, 18,237,134,207, 30, 19, 69,164, 30, 15, 70,251,190,244,158, +163, 79, 59, 9, 41,227, 4,126,197, 1,121, 37,158, 82, 31, 64,243,173,197, 60,149,237, 21,174,154,118, 17,170,150,192,143,228, +206, 70,157,106, 85,129, 9, 10,242,216, 67,181,247,129,160, 9,150, 78, 35,201, 47, 49,105,135,148,218,153,178,184,129,198, 58, +131,173, 87,168, 82,119,209,171,180,136,161,200, 37,236,208,166, 60,164, 53,198,142,144, 64,254,240, 26, 62, 44,202,105, 0, 86, +238,220, 92,154, 84,183,229, 44,129, 68,132, 43,233,211,228,130, 67, 41,104,157,112,247, 99, 74,191, 55, 37,197, 13,144,167, 5, + 79,237, 38,180,214,101,177, 46,152,234, 86,200, 87, 72,183,169, 47,197,124,142, 14, 72,173, 15,247,169,253, 26,157, 53,109,147, +243, 80,153,209, 67,201,172,182,166, 62,126, 4, 2, 23, 55,205, 11,168,166,212, 4,235, 82, 18, 36,178,128, 41, 31,184,183,229, + 53,129, 45,182,126, 41, 33, 92, 20, 7,133, 13, 53, 26,139,204,164, 84, 28, 7, 63,118,215,126,178,193, 67,149,101,165, 85, 67, +194,167, 70, 53,110, 41,110,100, 87,212,197,253,203,150, 28,197,238, 56,163,236,202, 10,118,158,202,245, 63, 81,212,177,169,105, +145,218,170,249,175,193, 87, 29,190,201, 28,187,220,228, 65, 66,170,218,136, 80,223,196,141, 92,157, 91, 36, 19,139, 28, 36,172, +250,246,251, 23,151, 18,239,239, 25, 90,144, 73,247, 29, 91, 20,252, 62, 42, 34,110,173,126,209,101,202, 61,189, 98, 75, 75,169, + 50, 18,147, 67,224,126,189, 80, 21, 49, 41,229, 50,142,247, 94,210,251,233,182,221,192,170,155,112,110, 63,169,215, 77, 1,241, + 49, 74, 18, 44,153,253, 60, 38, 53,239, 31,185,183, 34,133,228,203,252, 51,227,183,179, 67,207,171,108, 85,186, 75,133, 80,119, +174, 4,203, 31,116,228, 95, 92, 4, 71, 47,165,134,192,241, 33, 34,186, 62, 32, 6, 13,220,133, 96,114,235, 87,110,228,201,151, +150, 38, 68,228,145, 25,231, 20, 77,124, 64, 27,106, 54, 16,204,154, 48, 76, 93,194,182,179,113,101,135, 86, 42,143, 63,201,228, + 7,129,219, 66,170, 70, 37, 18, 80,112,160,100,113, 91, 22,104,246,148,117,140, 10, 62,145, 74,233,229, 61, 84, 60,190, 9, 35, + 60,181, 71,182, 99,104,152,194,127, 21,199, 18,149,171,250,191, 21, 0,213,156, 57,252, 73,172,142,136,138,112,212, 39, 7, 93, +208, 39,248,181, 20, 74, 35,251,173, 41, 35,244, 43, 82,253,199,199,247, 40,121, 92,211, 41,193, 46,182,236,214, 85,233,202,170, + 56,105,197, 70, 80,241, 38,181,251, 52,254,104, 33, 87,157, 36, 2,162,118,227, 24,187,204,205, 99, 71,151, 94,104,230,250,138, +186,208,146, 43,171, 50,190, 32, 34, 70,162,202, 46,107,219,139,141,214,227, 62,252,215, 35, 17,151,126, 93, 9, 3,175, 46,167, + 64, 25, 49,138, 36,168,117, 39, 23,192,239, 22, 92, 25,248,234, 5, 72, 43, 40, 35,233, 58,173,102, 76, 76,157, 19,202, 33, 74, +194,226, 93,109,215, 68,217, 92,170, 82,162, 10,134,244,220,106,173,196, 29, 81,225, 21,110,103, 22, 25,104,197, 97,219,216, 79, +227, 54,128,181,175,125,146,175,110,177,137,248,207, 98,156, 73, 0,160, 22, 56,143,192,200, 35,199, 64, 62, 91, 40, 42, 89,246, +212,106, 50, 59,156, 40,151,128,117,243,163,243, 89,239,148,158,229,250,143,107, 3,183,186,218,236,248,170, 4, 48,219, 41,227, + 73, 43,252, 71,188,199, 22,126, 37, 10,164, 26, 0, 19,210,149,169,215,211,127, 76,122, 40,196,233,240,181,142,251, 53,227,201, +249,118, 13, 61,170, 3, 85,110,250, 21, 98,233,129,246,253,172,158, 79, 52,202,152,225, 83, 62, 96,161,109,180, 0,157,193,241, + 81, 37, 66,187,237,174,183,168,252,114,101,209,244,209,178, 46,121,171,247,182,119, 75,101,229, 79,228, 25, 26,137, 97,181, 58, +219,105,112,212,149,132,249,105,219,125,192, 85, 77,126,141,181,153,105, 49, 96, 22,149, 68, 16,229, 22,177,223,240,185,119, 48, +194, 82,223, 22, 86,227,238, 44,208,161, 5,175,188,176,145, 80, 40, 79,135,143,188,234,102, 18,110, 41,133,145,117, 31, 33,205, + 49, 5, 66,126, 93,173,175, 45, 11, 5,196,147, 64,226,138,213,197, 1, 69, 39,225,223,115, 78,191,167, 74, 21,201,217, 41, 92, + 20,121,153,125,174, 4, 4, 77, 46,172,151,154, 66, 27,229,196, 81,197, 81, 35,143, 47,132, 82,132, 19, 67,191,219,167, 21,151, +224,135, 43, 64, 8,124, 12,182, 68,104,102,229,114,144, 18,218, 42,134, 20,190,161, 53, 38,161, 32,237,241, 10,239,214,154, 33, +172, 20, 19, 97, 81,102,103,173, 93, 35,183, 13,158, 44, 69, 90, 83, 85,184,173,139,109, 18, 86,120,131,176,240, 20, 30,222,186, + 66,160, 19, 27,221, 86, 29,250,191,219, 31, 74,213,109,224,153, 64, 81,110, 40, 26,124, 61, 82, 56,251, 0, 59,248,157, 89,162, + 61,168, 19,147,149,105,254, 95,183,184, 14,227, 19, 25,185, 48,252,155,187,109,190,136,136,124,188, 26,105, 9,230,181, 15,196, + 37, 6,139, 36, 0, 0,161,165, 65,213, 14,164, 36, 14,139, 91,167,109, 63, 50,189, 44,246,190,198,103,237,189,139,100, 73, 85, +142,246,197, 20,152,115,148, 18, 84,164,163,135,154,144,138, 5, 15,136,210,149, 34,187,208,235, 23,247,215,215, 45, 66,244,106, +186, 39, 78,190,128, 97, 45,199,155,113, 10,165,239,143,167, 12, 11, 18,181,252,205,162,231, 29, 86,244,176,168,233, 8, 74, 28, + 41, 66,136, 82,137, 11, 5, 66,165, 53,250, 78,181,241,122,156,143,204, 22, 6, 79,165, 41,176,252, 19, 35, 69,197,253,252,207, +254,110, 98,221, 82,210, 98, 68, 74,227,161,109, 41, 62, 75,174,182, 82, 1, 77, 58,146, 55, 39,173,126,189,117,184,214,131, 23, + 11,202, 51,168, 48,153,137, 46,197, 42,224, 88, 78,117,144,218, 25,158,235,170,140,201, 65, 90,124, 18,121,124, 65, 38,180,220, +251, 61,218, 28,236,114,158,186, 73,139,160,153,109,151, 40,180,220, 2,228,186,165,202, 88, 81, 83,123,146, 41,241, 83,245,248, +232,177, 67,176, 16,135,179,220,188,250,200,223,200, 33, 78, 75,182, 0, 79,146, 66,157, 77, 41,184, 41, 80, 35, 68,112,126, 96, +233, 70,249, 71,129, 70,229,231,215,204,205,134,173,242, 80,134, 20, 82, 27,113, 46,161,109,130, 62,233,220, 16, 70,194,157, 40, +125,154,181, 92, 34, 70,133, 14, 71,114,151,130, 90,219,199,175,204, 74,187,254, 27, 92,138,146,166, 18,209, 9,169, 59, 7, 16, + 19, 80, 69, 69,119,209, 5,100, 20,192, 46,228,244,245,141, 51,157,227, 74,187, 96, 87, 36,198,201,196,111,229,147,109,237,144, + 12,200,138, 3,146,120,213, 73, 87,196, 43,197, 94, 52, 59, 29, 87,234, 24,208,204,162,116,217,194, 65,190,222, 5, 88,133, 98, + 65,148, 92,223, 7,205,176, 41, 79, 91,175, 44,112, 40, 0, 52,234, 2,146,149,242,233,240,171,116,157,183, 30,222,154,249,147, +212, 94,159,151, 75,200, 21, 72, 14,208, 71, 2,168,217, 89,140,144,236,177,249, 86, 75, 13,166,220,215,220, 85, 29,127,220, 73, +241,214, 47,146, 9, 80, 14,152,176,187,124,166,173, 16,148,146, 84,249,185, 51,196,127, 96,170,186, 83,164, 8,148,163, 37,100, +127, 25,121,239,208,138,149,127, 8,211,109,182,176,127,181,215, 88, 89, 81,104, 35, 9, 58,113,238, 86, 30,213,202,243, 46,201, + 4, 19, 6,216,207,159,191,182,149,161,250,245, 70,169, 48, 70,140,146,139,127, 59, 11, 30,142,230,226, 65, 60,210, 63,179,162, +206,108,139, 35,162,159, 98,108, 34, 18,231, 57,241, 56, 66,214,107,253,106,116,213, 83, 55, 80,100, 26,109,138,124,143, 38,123, +167,240, 94,113, 59, 1, 77,130,180,111, 48, 50, 35, 50, 55,144, 54,164,227,162, 51, 32, 9,173,188,158, 32,117, 9, 59, 29, 66, + 51, 81,140, 73, 81,110,209,238,120,196,216,183, 86, 43,230,148, 7, 20,124, 57, 29, 52,134,229, 34, 22,203,174, 91, 46, 79,149, + 45,229,116, 4,168,123, 9, 53,208,219,146,113, 20, 26,239,112,106,124,184,104, 35,226, 92,134,220, 36,123,136, 58,156, 9,220, +130,155,174, 23,102, 16,227, 15, 53, 64,227,138, 77, 64,247, 4,232,230, 28,209, 35,193, 54, 76,109, 46,192,113,110,117,146,223, +154, 41,224, 80,154,127, 70,170,200,106,164,171,184,112, 85, 34,109,193,182,254,250, 91, 14,164,143,167, 79, 36,242, 44, 19,118, + 3, 5, 17, 98, 93, 88, 41, 60,230, 52,135, 5,125,201,210,155, 18,147, 50,142,182, 28, 91, 46, 75, 31,121, 77, 4,147,227, 64, +105,168, 72, 48, 81, 28, 86,118,254,218,212,135,209, 37, 35,116,249,202,161,241, 34,187,104,213, 51,234,148,254, 84,135,158,162, +109,203,205,122, 42,106,243, 79,158, 0,123, 2,168,117,106,150,130,174,163,246,246,197,114, 84,123,138,212,130, 28, 82,124,196, +143, 10,141, 90, 44, 66, 76, 84,252, 85,219,138,209, 34, 81, 81, 72,137,178,143,211,190,168,221, 0, 36, 20,235, 14,234, 53,158, +241, 45,188,136,121, 38,172, 21,249,138, 39,192,233, 8,135,116,242,142,137,186, 11, 15,202,201,164,160, 29,157,101, 75, 73, 62, + 42,166,165, 85,154,166,242,138,135, 59, 4,131, 34,207, 29,153,130,137,121, 78,169,100,244, 37, 53, 58,169,184,198, 68,132, 95, + 44, 50, 67,127,183, 83,109,235,114,248,221, 82,204,121, 8, 91,100, 86,156,107,173, 26,114, 53, 5, 10,117, 58,179,243, 14,220, + 69,201,240, 23,210, 5, 91,122, 63, 52,251,214, 83,165, 28,159,136, 30,194,129, 26, 54,146,169, 46,220,118,198,237,103,184, 38, +224, 1, 13,151, 67,106,175,181, 10,165, 62,205, 91,187, 48, 73, 12, 80,193, 37,119,191, 17,153, 15, 36,154,208, 77, 28, 90,148, +242, 64,175,141, 14,181, 49,110, 18,130, 82,169,111,244,213,117,149, 35, 30,151,102,144,126, 24,206,151, 0, 63,217,211,229,192, + 13, 80,182, 50,183, 50,252,183,206,237,136,186,210,175,199,230,105,227, 74,144, 53, 74,202,218,200,132,213,240, 37, 28,244,223, +115,143,109,178,187, 53,215, 2, 90,113, 10,152,226, 65,232,163, 82, 6,163,159, 29,218, 43, 84,150, 9, 79,188,114,224,229,147, +225,249, 84, 41, 92,174, 70,158, 63, 17,223, 85, 42,145,137, 40,140,191,110,240, 34, 68,202,237, 22,235,114, 66, 99,165,149, 45, + 92,124, 72, 27,147,165, 23, 47,226,144, 41,138,195,142, 39, 33,182,189,107,146, 15, 38,200,125, 39,251,101, 91,126,189, 14,226, +199, 68,224, 58, 88,207,163, 53,104,154, 82,165,124, 77,159, 45, 95,102,148, 1, 41, 20, 2,125,141,156,146,210,184, 41, 80, 82, + 22,227, 74, 66,122,239,200,106,113,153,174, 78,159,110,228,240,108,144,197,180, 89,120,143, 44,180, 69,126,132,129,215,235,208, + 60,195,199,189, 65,147,109,142, 45,170, 77,213,248,114, 72, 89,109,154, 55, 90, 80,168,130, 21,250,180,210,180,141, 85,141,129, +150,220,107, 23,183,183,112,157,127,105, 33, 42, 66,145, 13,175,160,157,207,219,161,221,144, 89, 74,170,244, 83,178, 59, 21,190, +200,204,139, 18, 16, 11,132,135,157, 86,213,169, 3, 85,236,182, 69, 78,184,106,180,163, 30,134,222, 44,185,203, 72,230, 18,227, +137,111,192,211,161,211, 69,202,150,208,232, 4, 11, 4,105,140, 69,190, 2, 3,169, 87,152,233,241, 60, 78,195, 86, 1,125, 18, + 0, 5,101, 73, 67, 23, 37,181, 17,208, 21,201,132,151, 41,189, 19, 74,211, 85,167, 91, 20, 50,201, 46, 20, 64, 23,115,187, 36, +127,134,168, 77,106, 64, 72,218,167,136, 39, 79, 93,111, 33,226,154,208,241, 95, 27,187,211, 45,251,255, 0,169,140,167, 33,134, +180,173,148, 92,222, 75, 47,169, 10, 74, 82, 67,198,170, 9, 59,142, 39, 97, 95,167,174,250,250,255, 0,211,180,121,125, 62,152, +183,242, 15,193, 86,172, 49, 11,167,251, 55,153,255, 0,151,240, 24, 13,184,232,120,178,147,242,204,236, 19, 66,121, 56,226,234, +107,236,255, 0,161,212,239,134,233, 46,139, 30,205,177, 70, 15,118,100, 41,137, 13, 52,178,134, 30,243, 93,109, 1, 84, 80, 73, + 71, 34, 71,179,199,221,166, 20,186, 94,105, 68, 45,153,124,215,144,211,112, 1, 72, 44,150,214, 82, 79,223, 36,148,167,109,213, +184,229,185,210, 49, 77,184,175,217,125,201,135,102,113,134, 84, 20,124,162, 11,105, 81, 20, 90,248,113, 46,174,189, 72, 27, 15, +163, 78, 41, 37, 49,181,138, 26,174,233,166,253,124,102, 85,201,197, 22, 34,175,204, 76,118, 1, 82,190, 2, 66, 84,178,162,132, +129, 83, 94,163,217,182,167, 26,140, 66, 28,173,117,234,251,220,104,172, 72,109,164,165,247,165, 58, 73, 80,142,164,164,167,145, +226,148, 10, 37,193, 82, 60, 6,250, 81,165, 52,172,101, 58,204,243,249, 92,245, 89,165,195,185, 67,157,229,143, 42, 58, 28,139, +230,148, 36, 84, 16,137,102, 57, 52, 78,228,147, 79, 30,154, 28,154, 60,199,223,253,169, 2, 74, 27,158, 88,123, 85, 18, 63, 27, +238,116,220, 23,194, 75, 72,128,152,223,204,228, 41,124, 2,120,133, 90,220,117,144,175,239, 56,157,252,116,245,219, 51,194, 46, + 61,195,239,215,238, 80,176, 1,198, 67,237,246,237, 87, 15,163,203,247,111,196, 6,113, 12, 55, 33,188, 92,103,150,203,234, 71, +242, 4,182,136,237, 54,247,146,151, 20,148, 92, 28, 8, 73, 95,237, 43,175,137,213,108,136,216, 11,202, 35,223,253,138,254, 53, +145,219,161,116,225,223, 88, 56, 12,232,225,135,165,155,149,185,130,159, 33,106, 73,143, 44, 33,179,201,106,109,232,206,147, 95, + 49, 95,126,187,248, 26,109,166,141, 70,200,180,226, 62,222,196,122,242,236,162,123,161, 34, 10, 78, 86, 33,140, 92,160, 38, 44, + 91,178,212,193, 72, 92,153,119,107,179, 97, 17,155, 82,210,130,162,103, 45,182,127,173, 67,200,154, 13,245, 60,108, 72,198, 78, +223,218,167,159,215, 50, 44,134,217, 75, 79,114,161, 59,185,216, 62,214,220,242,251,109,130,235,158,183, 62,227, 25,215,190,102, + 14, 53,107,145,114,150,144,133, 9, 27,249,238,198, 97,127, 10,184,146,135, 8,168,214,209,178, 77,164, 91,196,174, 76,252, 69, +201, 79, 88,170,253, 50, 71,181,181, 0,204,200,223,118, 50,214, 30, 90,227,219,162, 56,133,110,207,196,201, 91,224, 84,154, 83, +204,241,213, 50, 44,126, 74,240,150,136, 14, 73,153,246, 94, 53,208,255, 0,148,236,104,118, 96, 43,142,185, 23,104, 14,189, 37, + 20, 36, 85,167, 19,113, 28, 9, 20,220, 14,186,177, 8,207,153,251,255, 0,177, 87,145,117, 75,101,136,135,116,187,159, 54, 39, +152,226, 84, 90,120,187,243, 42,232, 2,146,161,230, 62,233,161, 73,246,234,208, 85,100,183, 68,198, 45, 65,176, 27,132,195, 78, +113,170,219, 73,146, 10, 72,253,186,121,148, 33, 73, 62, 30, 58, 36,102, 66,138,247, 54, 19,137,113, 49, 88, 90, 80,144, 66, 31, + 66,138,156, 64, 81, 2,138, 73, 85,126, 21, 39,127,183, 87,171,185,248,164, 10,232, 63, 72,153, 77,211, 0,202,224,221,173, 92, + 25,184,132,161,185, 12,154, 56,218,130,200,242,156, 79, 32, 9,222,169, 53,175,215,163,109, 4, 35, 87, 38,213,118,237,213,184, +157,230,129, 14, 29,234, 43, 79,200,121, 44, 74,136,254,193,228,164, 14, 78,165, 37, 32, 21, 36,114, 27, 43,122, 10,208,109,175, + 55,250,153,210,142, 70, 8,182, 48,221, 58,207, 30,108, 70,190, 58,142, 8,215,180,194,172,178, 30,202,180,111, 51,236,183, 52, +254, 19, 1, 74,110,190, 28, 58,107,231, 8,230,179, 42,134, 44,191, 49,108, 35,229,242, 56, 81,153,255, 0, 4,148, 9, 73, 30, +197,183,237,213,159,222,143, 44,191, 21, 3, 88,117,181, 18, 76, 94,238,155,164,132,249,111,173,214, 66,138, 77, 2,130, 77, 1, +213, 27,166, 37, 22, 72, 65,149,133, 38,252, 73,201,110, 50, 69, 30,146,160,194, 9,234, 65, 78,218,171, 42,192, 98,154, 4,164, + 11,230, 89, 21,216,177, 99,161, 60, 75, 73,242, 56,123, 77,116,214, 86,225,209,183, 41,179,158, 22,236, 93, 18, 16, 77, 29,124, + 1, 79,234,145,170,245, 69,194, 97, 36,218, 45,145,215,135, 67,117, 34,175, 33,196, 82,130,181, 36,238, 53, 86, 37,236,218,173, +158, 8, 5,202, 83, 98,238,182,194,122, 58, 2,171,211,125, 90,219,162,104, 22, 82,187,159, 46, 27,118,215, 80,205, 60,197,121, + 72,110,190, 0, 13,255, 0, 78,144, 96,162,101,197, 37,184,135,215,108,105,213,130, 82,174, 65, 95, 81, 52,212, 52,116,209,146, +133,102, 66,231, 74, 51,218, 37, 76, 51, 84,148,255, 0, 85, 67, 96,116, 82, 26, 73,160,204,183,220,242, 98,205,214, 12,126,123, +115,109, 39,125,183,165,117,116, 65,194, 25,147, 21, 97, 68,204,162,184,187,160,113, 85, 49, 16,132,178, 9, 62,205,233,170,118, + 86,197, 20, 76, 50, 31,219,169,241,110, 18,230, 75, 89,170, 86,213, 72,246, 83, 64,176, 22, 81, 50,209, 62, 63, 29,187, 83,176, +210,148,208, 57, 25,101, 84,241,218,163, 66,142,165, 18, 50, 12,150, 98, 92, 26, 45, 41,149,109,230, 36,166,158,193,207, 69,188, + 50,103, 96,183,225,179,153,129,116,114, 57,217,182, 92, 86,254, 31, 16,169,208,251, 10,140, 75,130,135, 89,173, 17,111, 57, 60, +216,136,253,215, 53, 60, 43,208,111, 93, 78,115, 41,226, 3, 39, 27, 62, 49,106,176, 95,225,197,121, 35,229, 93, 87,150,245, 7, +138,197, 71,233,209, 43,184,152,169, 0,225, 34,221, 97,179,143,100, 25, 62, 62,164,241, 60,202, 26,175,188,114, 31,163, 70, 58, +136,148, 58,248,144,150,176,139, 4,235,155, 87, 80, 83,248,172, 54,151, 27, 39,233,175,244,106, 82, 97, 23,228,144, 5, 60,150, +191,151,196,139, 61,123, 72, 45,164, 87,233, 20, 58,163, 68,183, 76,163, 29, 2,253,153, 52, 93, 44,209,173,204,167,248,198,214, +183, 0,241, 41, 59, 29, 28, 65,204,148, 39, 50,202, 10,159,105,120,220,187, 34,155,170,202,170, 42, 63,101, 39, 81, 49,218,150, +231, 1, 53,226,247, 72,146,109,177,172,206, 10, 52,147,229,168,127,179, 93, 68,196,135, 42, 22, 73,248, 33,240,113, 6,217,254, + 99, 25, 45,252, 81,143,204,176,145,214,149,169,211, 88,238, 59,208,183,104,202,146,239,181,136,191,220,152,138,242,207,202,186, +208, 27,244, 53, 7, 91,152,179,219, 6, 76, 75,164, 14,208, 90,151,143,222,114, 8,171, 20, 74,124,199, 19,244, 19, 93,107, 76, +137, 49, 85,200, 36,163,243, 46,190,126, 46, 44, 47, 43,224, 91, 74,113, 73,246,239, 93, 6, 48,221, 99,170,242, 59, 87,172, 99, + 55,115, 21,237,211,174, 45, 92, 95,152,191, 33,173,255, 0,103,113,165,100, 55, 76,162,137,176, 65, 33,101, 10, 93,202, 27, 15, +170,170, 75,156,134,250,173, 26, 82,243,139, 43, 41,171, 53,226,101,198, 45,249,214,202, 33, 33,131, 69,171,165, 58,255, 0, 70, +148,107, 1, 42,237,116,225,219,233,237,182,204,137,107, 31, 8, 79,154, 79,182,134,137,213, 57,212,232,145,177, 84,221,227,157, +115,114,234,176, 16, 67,143, 60, 72, 20, 61, 41,162,209, 21, 9, 76,234,162,226, 98,224,195, 48, 86,186,249,109, 40, 62,253,124, + 1, 86,218, 29,209,116,106,166, 74,182, 75,112,149,119, 3,255, 0,103, 76,114,162,105,253, 96, 20, 63,250,186,173,183,226,218, +166,250, 32,223,207, 29,110,230,227,209,205, 86,147,197, 60,124,106,116, 59, 70,138,123,147,166, 37, 61, 50,146,108,207,213, 42, +112,165,247, 20, 60, 56,158, 90,175, 92, 95,197, 28, 77, 66,201,243, 6,239,217, 28,215, 35,170,158,119,224,183,255, 0,171, 31, +211,162,249,111,162,111, 53,148,236, 74,106,114,107,252,108, 69, 43,170, 85, 13,194,177, 95,218, 52,240,210,219,182, 42, 50,181, + 1,141,117,105,187,219,184,195, 27,165,151, 60,144, 7,245,129,167,235,211,192,104,233,183,234,156, 46, 87,132,227,113,139, 46, + 56, 12,181, 32,165,197,215, 96, 72,233,168,100,190,129, 60, 78,133,112,103,174, 47,204, 14,251,141,181,117,236,111,104,166,170, + 28,151,148,166,175, 87,136,110, 36,187, 78,133,150,150, 1,227,239, 41, 85,124, 53,239, 30,134,244, 21, 80,136,201,201, 2, 69, +190, 24,158, 3,188,191,240, 80,149,132,174,100,236,142, 30,246,107, 53, 62, 77, 20,181,172,124, 11, 5, 75, 89, 39,175, 31, 19, +237, 58,245,203,164, 33, 30,192,137,143, 94,249, 43,190, 28, 3,143,220,156,105,198, 15,203,180,144,133, 7, 5, 19,181,118, 0, +144, 60, 55,214, 93,146,220,181,192,100,157,127,202, 34, 91,239,119, 15,147,120,188,133,213, 33,100,242,169, 85, 83,197, 62,192, + 1,254,141, 22, 32,178, 25,152, 5, 48,227,157,193,153, 28,121,150,167,121, 48, 92, 89,101, 78,113,168,110,137, 71, 21, 1, 95, +136,154,215,221,246,105,252,176, 82,243, 59, 17, 40,208, 46,247,187,143,241,199,204,148,175,141,146, 55, 37,197, 40,130,120, 80, +147, 68,212, 0,117, 45,194, 42, 1,228,181, 77,197, 94,180,180,155,147,114, 35,196,104,164,252,114,127, 17,250,162,170, 39,202, +109, 46, 41, 39,217,204, 36, 29, 39, 37, 66, 81,100, 38,109,233,167, 96, 59, 25,165, 73,153, 85,164, 9, 19,158,118, 59,101, 52, + 28,136,143, 25,202,133, 87,196,186,164,211,110, 58,127, 44,248, 33, 25,251, 84,123,142, 75,153, 94,210,187, 29,185, 42, 92,153, + 8, 66, 83, 14, 19, 73, 97,142, 35,238,169, 77,176,150,219, 38,130,165,100, 87,196,159, 29, 74, 85,198, 33,202,143,152, 74,109, +197, 59, 65,143,199, 84,105, 25, 74, 69,254,254,143, 49, 78,194,140,242,147,110,105,194,132, 4,121,178, 26,162,222, 32,214,168, + 96,161, 36, 80,135, 79, 77, 2,118,158, 3, 69, 40, 71,181, 23,200,175,221,200,176, 45,153,152,163, 47,252,149,181,149,187, 2, +209, 99,105, 45, 70, 62, 84,119, 56, 1, 25,158, 40, 91,170, 36, 81,106, 5,100,154,146,118,213,123,108,132, 3,159,127, 18,181, + 48,105,178,233,109,128,114,135, 99,221,247,184, 95,155, 91,239,220, 57,200, 87,148,102, 71,116,240,117,146,211,129, 38, 42,218, +112, 85,178, 7, 34,160,104,121, 31,102,130, 50, 98,120, 43, 6,131, 18,210,112, 71,114, 27,153,250,142,197,239,247,223,228, 44, +220, 82,140,189, 77,134,132, 37, 19,229,182,137, 41, 82, 93, 81,242,209, 74,213, 3,198,162,160,208, 2, 53,119, 15, 32, 18,203, + 63, 54,141, 28, 23, 75,183, 56,121,157,162,247,111,204,242,103,158,127,230, 19, 34,224, 91,112,135, 89,161, 43, 4, 20, 56,158, + 34,169, 9, 32, 83, 98, 61,167, 86,188,193, 45, 22,118,194, 3,166, 11,111,117,238,147,218, 93,151, 47,106, 37,205,165,184,181, + 50, 93, 79, 37,213, 9, 46, 37, 44, 72,110,142, 33, 59, 38,129, 36, 36,251, 60, 52,226,174,245, 19, 61, 20,107,153,199, 92,243, + 47, 86,133, 57, 18,115,203, 67,170,109,254, 78,178,150,254,237, 82,235, 73,220,212,116, 40, 20, 29, 78,136, 34, 80,204,144,140, +138,209, 38, 35,174,173,208, 12, 3, 85,124,210,126, 38,206,192, 18,151, 16, 74, 8, 73, 32,236, 79,244,104,142,132,232, 93,203, + 34,183,139, 75, 78, 52,178,155,211,116, 1,230,143, 54,212,129, 74, 86,149,246,131,167, 73, 2,183,228,143,205, 72, 18,104,151, +146, 20,145,196, 26,146,147,176, 62,207,134,159,103,191, 70,137,100,149,173,219,108,132,218,236, 17,110,109,173,104,226, 18,182, + 92, 81, 53, 40, 43, 34,160,143,101, 6,175, 86, 75, 39,117,217, 30,153,187,213, 37,219,133,165, 23,103, 74, 45, 50,155, 75, 75, + 43, 52,226,132,169, 96,169, 36,214,132,111,168,117, 44, 24,102, 99,217, 68,254, 89,134, 40,149,201,244, 87, 86,104,216,121,217, +215, 93,139,234, 81, 98,187, 86,131, 99, 90,107,226, 30,163,143, 44, 91, 37, 89,227, 18, 71,187,181, 13,181,100,150,196,159,229, +151,251, 99, 75, 20, 75,137, 88,229,237, 73,213, 80, 73,138,115,162, 95,207,194, 99,231,209,219, 99,103,129, 73,175,215, 93, 72, + 19,181, 74, 33, 53, 94,165,170,245,112,126,197, 0,132,190,162,203,155,120,154, 10,215, 80,149,191, 10,109,136, 54,109,219,191, +254, 56,203,136, 60, 27, 80, 11, 52,240,113, 61, 70,161, 94, 75, 64,132,251, 29, 19,201, 45,254, 69,174, 11, 42,111,248,101,132, + 21, 87,193, 64,141,244,209,155, 40,195,138, 32, 50,133, 69,198,141,184,241,167,156, 10,106,119, 0, 1, 67,250, 52, 26,225,241, +186, 52,229,162, 89, 92,137, 13,203,112, 46,138,117,110, 9, 13,215,196,120,234,228, 75, 22, 81, 18, 91,114,185,137,190, 88,207, +148, 65,146,148, 45, 65, 62, 60,135, 81,161,109,208,120,162,187,132, 59, 4,147, 26,245,111, 98, 28,149, 0, 27,115,202,112, 43, +192, 29, 70,208, 65,117, 16,206,163,227, 80, 17,109,191,221,237,174,142, 36, 41, 71,143,129, 65,220, 40,125, 35, 86,164,117,140, +144, 99, 38,209, 37,184,153, 73,201,146,212,143,136,199,125, 42, 29,119, 70,244, 58,191, 13, 84, 38, 83, 52, 91,202, 92,159, 60, + 48,186,249,169, 33,193, 95, 16, 42, 52, 11,126, 19,170, 81,147,169, 61,150,188, 56,234,231,182,163,241, 6,143, 31,162,180,211, + 91, 72, 42, 30,103, 37,107,119, 82,249,252,162,101,172, 36,241, 73,132, 84,163,225, 82, 41,170,162,141, 84,163,102,170,173,198, +242,215,174, 55, 25,237,242,171,113, 26, 82,235, 95, 10,215, 69,186, 3, 78,245, 41, 72,144,136,193,203,218,139, 45,114, 22,177, +193, 73, 75,138,223,218, 41,161,249, 90, 38,223,162,100,236,211,138,187,228, 23, 21,180,126, 58,126, 25,254,205,107,166, 48, 96, +161,231,104,139, 74,201,214,238, 86,195, 75, 53,108,186,144, 15,128,224, 64,208,233,135,194,141, 93,156, 86,159, 81,204,194,181, +102,237, 93,173,228, 40,221, 89,109,106, 66,119,170,210,154,104,210,137,224,137, 68,184,173, 93,183,141, 25,200,115,103,182,143, +142, 65,106, 45, 0,216, 15,218,211, 73,216, 5,103, 69,231,185,147, 35, 65, 75,109,182,186, 71, 72,242,154, 9,241, 41,208, 43, +172,196,184, 77, 50, 2,141,132, 20, 75,200, 27,184,201, 63,194, 50,148,165, 93,105, 90, 84,234,112,113, 36,206, 19, 5,190,201, + 14,226,151,167,172, 4,183, 38, 74,144,159,247,116,169,219, 76, 11,201, 65,150, 98, 48, 25,114,238, 25, 4, 7,196,147,196, 31, + 96, 26, 45,131,114,128, 26,166,139,162,217,180,229,237, 60,186,121,114,227,173,133,163,192, 21, 10, 15,174,186, 16,131,233,204, + 33,152,185, 85,110,117,132,162,255, 0,156,198,183, 13,220,138,142, 33, 94,210, 42,105,171, 66,237,170, 49,139,170,158,225,137, + 73,131,145, 60, 88, 28, 27,146,167, 97,184,174,149, 60,182,253, 90,212, 22,238,128, 80, 43, 85,199, 29, 76,139,106,165, 4,240, +125, 46,124,138, 79,129,218,186, 63,157,229,203,185, 71,202, 18, 14,128,228,184,132,233, 24,116, 71,208,133,121, 17,229, 41, 1, + 59,252, 84, 36, 29, 40,100, 13,202, 18,172,112, 90, 15,110,174,163, 52,138,226, 9,254, 88,176,208, 65, 31,247,135,239, 15,171, + 74, 23, 3, 22, 79,228,133,115,222,140,152, 88,195,214,148, 19,241, 22,153,108, 87,165, 15,196,126,205, 82, 22,124, 78,150,198, + 9,163,183,214, 59,124,155,108,132,164,209, 12, 45,164, 62, 79, 66, 54, 52, 26, 5,150,180, 84,227, 88, 1,210,142, 69,138, 65, +200,178,233,211,222, 0,196,142,178,150, 18, 63,172, 18, 55,253, 26,140, 45,104,167, 33,212,140, 59, 13,183, 57, 99,188,206,125, +158, 49, 90,101, 9,100,245, 37,100,255, 0, 70,166,117,101, 24,150, 40,191,242,246,133,183,205, 8,252,115, 23,200, 35,246,168, + 5, 1,250,104, 78,153,254, 55, 82,228,201, 58,199,108, 90, 20,229,229,223,240,229, 94, 90, 43,244,245,251,116, 57, 65,194,145, +237, 77, 45, 93,224,227,246, 11,197,205, 95,226, 18,218, 89,109, 71,175, 35,215, 77, 85,108, 82,220,171,152,185, 23,159,145,197, + 17,149,248,104, 37,199, 20,125,157, 78,143, 93, 46, 80,141,154,166,255, 0, 79,119,227, 51,186,151, 44,157,127, 13,182, 20,103, +212,154,157,190, 20,215,245,234, 82,164, 51, 40,206,106, 47,107,163, 61,120,187, 28,157,241,248,151, 91,130,153,140, 61,169, 14, + 18,163,191,187, 67,216, 61,200,206,144,189,126,247,230, 71,104,240,217,242,236, 13,149,221,156,121,113, 34,184,231, 20,180,133, + 1,197, 74,248,143,196, 71, 94, 32, 19,238,215, 87,233,111, 77,142,167,153, 88, 37,163, 18, 9,239, 31,109, 31,146,104,201,194, +249, 77,114,186,203,201,178, 39, 95,150, 84,236,151,157, 83,143, 62,225,161, 90,214,162,165, 40,129,225,236, 3, 95, 80, 68, 70, + 33,162, 52, 78,186, 71,209,254, 57, 5,203,147,114,219,125, 49,173,172,165, 38,108,165,166,135,143, 45,208,149, 43,161, 87, 67, + 78,131, 84, 51,102,118,178,212,193,135, 53,208, 57, 4, 59, 6, 85, 31,249,133,133,228, 27, 75,238,169,176, 29, 9,109,110,165, + 53, 66,120,214,138, 0,159, 15,139,109,102, 86,241,226, 53, 90, 83,105,112, 85,141,219,210,244,220,134,238,226,109,229, 75,101, + 78,126, 31,201,130,180,212,157,202,146,149, 2, 0, 52, 31,209,171, 95,187,136, 26,170,199, 24,201, 15, 95,105,239,125,189, 44, + 53,120,138,225, 66, 79, 52, 54, 17, 84, 4,244, 7,225, 0, 84,168, 84,147,189, 6,137, 27,227, 62, 9,188,131, 13, 10,155, 3, + 32,184, 59, 29,110,160, 41, 9, 75,161,214,151, 66, 43,193,202,129,176,222,181,210,112, 74,147,118, 40,162, 45,219, 45,146,139, +124, 6,202, 91, 1, 74, 90,148, 43, 85, 36,114, 34,131,112, 18, 18, 52, 81, 96,142,168, 6,162, 84,137, 29,189,189, 76,101,181, + 58,215,150,149,172, 15,133, 60,148, 91, 69, 82, 13, 60, 54,212,127,113, 16,162,113,202,149,137, 96,215, 31,154, 84, 63, 44,114, + 42, 83,170, 6,159,136, 60,190, 92,150,161,186,184,210,160, 86,130,157, 55,211, 89,120, 67,242,153, 89, 56, 6, 60,234,165, 51, +107,130,218,190,101,194, 67, 32, 2, 64, 37, 66,174, 29,170,122,236, 61,192,106,140,166,250,164, 32,228, 5,222, 62,153,127, 45, +123,157,239, 5,133,124,117,170,221, 33, 72, 23, 55, 28, 88,175,157, 84, 81, 64,211,160,166,201, 10,165, 6,185, 62,165,212,140, +165,182, 60, 23, 97,209,236,142, 28,132,228, 89,211, 95,168,159,202,195,208,215,122,109,105,188,119,119, 23,105,156,181, 60, 60, +217,241,218,122, 28,197, 20, 14, 52, 84,168, 74, 67,133, 52,240, 42, 35, 85, 33,146, 64, 12, 72, 43,183,187, 43, 31, 40,255, 0, + 86,168, 74, 61,174,210,247,134, 63,122,226,159, 80,222,135,189, 47,246, 66,249,106,199, 59, 27,142, 49, 13,165,190,149, 73,152, +231,157, 41,229,178,133, 5, 31, 49,233, 10, 91,138, 28,146, 58,171, 91,253, 54,102, 71,113,119, 11,151,245, 21,152,213,213,229, +211, 24,197,251, 56,251,248,253,233, 7,188,157,178,145,114,176,166,222,252,118,209, 62,221,205, 13,183, 80, 20,228,117,149,121, +106, 72, 32, 18, 66,118, 62,253,107, 71, 37,164,235,140,157, 78, 25,115,190,111, 98, 94, 61,123,122, 53,176, 4, 41, 0,150, 67, + 73,160, 80, 73,228, 80,164,138, 84,210,190,250, 82,154,216,166,123,128, 43, 46,234,246,173, 22,151,228, 48,133,189, 25,196,200, +140, 88,243,156, 65,113, 65,104,228,119, 29,118, 32,166,135,109,252,122,234,194,172,130,187,220, 9,182,235, 89,143,107,150,181, + 91,138,130,100, 49,181, 23,205, 9,167,194,107, 90, 5, 83,137,168,253, 26,102,116,146,180,121,220,175,207, 52,195, 73, 49, 29, +160, 79,151, 84, 5, 85, 69, 73, 60, 62,239, 79, 4,129,190,164, 2, 98, 81,123, 52, 64,227,222,100,149,121, 47, 46,165, 47, 20, +172, 22,235, 80,174, 98,170, 27, 84,251, 58,104,160, 38, 37, 88, 56, 94, 83, 17,187, 57,176, 92, 30, 10, 82, 63, 21,135,145, 68, +252, 41,226,162,129,239, 27,170,158,237, 91,174, 65,146, 26,171,155,178, 89,155,238,221,161, 69,134,164,252,160,243, 18, 16,190, + 74,223,239, 37, 41,167, 77,247,213,200, 23, 10, 97,118,109,166,246,153,214, 73,141,169, 1, 7,130, 21, 64,165, 16,162, 18, 62, + 33,200,158,181,250, 61,154,248,143,213,122,103,228, 0, 27,250,146,237,254,241, 72, 29, 84, 44,186, 60,119,114, 59, 84, 8,224, + 37,193, 24, 40,123,121, 84, 40,141, 99, 68, 52, 18,117,170,253,134, 27,213,202,101,194, 48,229, 57, 8, 14, 68,246,159, 41, 28, +149, 77, 70, 51,224, 20,193, 98,160,216, 99, 93, 32,223,226, 95,148,138,161, 43, 66,164, 87,216, 60, 62,173, 86,175,230,144, 70, + 58, 4,195,155,228,208,100,221, 16, 24, 72, 74, 82,162,149,143, 97, 52, 35, 77, 85,127, 55, 98,128,146,215,145, 74, 77,194,199, +252,169, 73,254, 37,149,133, 33, 94, 36, 40,109, 77, 16, 6, 1, 11,154, 64,186,189,114, 72,101,100,144,252,117, 40, 56, 61,161, + 39,253, 26,183, 16, 1,241, 77,169, 10, 68, 59,138, 29,129, 30,114,207,196,219,171, 64, 81,254,170,199, 77, 53,240, 32,104,161, + 92,220, 33, 50,175,111, 66,159,243,169,168,142,149, 41, 15, 39,217, 95, 29, 40, 2,116,237, 86, 1,209,120,183, 37,235, 13,217, + 78,199, 81, 85,158,119, 23, 25,115,122, 5, 19,186,126,157, 30, 85, 2, 21,121, 88, 68,147, 66,146,185,114,147,127, 64,254, 45, +176, 35, 72, 72, 31,121, 42, 27, 29, 13,158, 32,118, 40, 74,205, 82,102, 81, 9,216,193, 87,150,198,236,184, 90, 89, 31,213,174, +172, 85, 39,100, 87,112,132, 90, 25,186,177,150,188,134, 18, 87, 22, 83, 62, 98, 58,144, 84, 6,227, 71,201, 2,202,251,194, 29, +113, 32,167,142,218, 89, 83, 8, 92,110, 73,217,159,149, 90,211,238, 88, 59,131,170,248,150,249,145, 99,196, 40,219, 86,169,187, +188,247, 56,243,112, 88, 55,244, 26,173,112,208,211,103,222, 54,167,232,209,204,117, 85,193, 98,169, 12,110,245, 50,217, 34,232, +130, 42,228,166,210,210,125,212, 21, 35, 70,182,160, 68, 74,181, 18, 74,223,112,153, 62, 28, 71, 31,126,160, 45,180, 4, 39,127, + 29, 52,107,213, 8, 59, 21,109,250,112,184,202, 51, 46, 75,105, 63, 28,120, 60,137, 61, 10,202,122,111,170,214, 86,132, 11, 13, + 80,139,230,102,109,205,176,227,191, 12,245, 56, 92, 80, 61,119, 61, 53, 8, 86,202,221, 71,159,106,131,147,101, 23, 12,134,249, + 9, 79,184, 92,117,161,201, 38,181,162,148, 40, 0,211,144,218,162, 66, 65,149,161,136,121, 24,254, 32,220,101,124,119, 5, 15, + 49, 67,216,165,253,209,170,224,110, 82, 22, 42,239,184, 89, 35,106,184, 55, 25,213,243, 48,194,138,192,232, 92, 89,160, 31, 86, +141, 40, 48, 79, 41,186, 98,195, 93, 74, 45,140, 14, 84,248,121, 60,125,171, 86,244,213, 81, 6,114,152,205, 24,183, 94,156,102, +226,197,177,213, 81,182,185, 73,113, 62,196,251,254,173, 60, 32,159,204,209,106,192,110,174, 79,203,229, 95, 66,138,109,172,173, + 74, 4, 86,132,141,205, 52,113, 29, 19, 25, 50,147,118,202,156,151, 61,119,103, 84, 75, 65,192, 25, 29,119, 42,219, 65, 33,181, + 77, 25,144,131, 74,202,213, 23,185,101, 42, 53, 45, 4,184,225,247, 41, 52, 58, 30,215,131,246,167, 18,100,181,156,185, 25,118, +247, 87, 25, 35,230,155,150,167, 57, 10,116, 59,235, 66,191,132,109, 42, 0,169, 42,183, 64,149,133,198,147,194,146, 22,175,155, + 89, 63,214, 73,212,140,247, 58, 78,179, 33,143,110,143,111,249,116,182, 63,151, 37,191, 60, 5,116,243, 28,219,245,232, 85, 59, + 38,148,156,186, 93,145,113,182, 34, 93,190, 35, 31, 2, 99,172,243, 39,127,138,149,174,137, 45,206,158, 51, 68,114, 76,190, 59, +209,235, 21, 53, 17,192, 91,135,250,196,154,105,246,188, 89, 64,241, 91,187,119,220, 97,111,122,227, 26, 75,149,130,150,139,197, + 53,175,199,225,166,242, 92, 0, 82,148,217,121,181, 95,227,179, 1,153, 79, 40,243,125,215, 30,122,157,104,170,208,104, 83,210, + 64, 36,250, 38,158,218,220, 24,188, 89, 23,109, 70,200,124,184, 72, 63,217, 86,195, 78,100,210, 66,226,189, 38, 74, 63,205,203, +177,126,207, 36, 48, 15,254,173, 71, 76,220,212,183, 37,107,220,208,139, 76, 75,109,176,127, 15, 82,250,192, 31, 17, 0,237, 95, +175, 86, 99, 29, 64, 41,237,249, 82, 94,125,149, 62,206, 36,251,110, 57, 71, 29,123,226,247,211, 86,171,168, 25,170,190, 99, 4, +191, 21, 19,109, 24,172,139,212,138,166,227, 36, 37,166, 18,175, 15, 51,253, 90,182, 34, 4, 73, 74, 32,232,172, 46,215,199,122, +217,219,235,204,200,130,146,164,182,220, 52,171,253,231,222,233,172,201,216,192,149,118, 53,185, 76, 86,199,173,248,163, 22,169, + 16, 71,154,171, 52, 55, 36,169,132,169, 40, 30, 98,200, 5,199, 22,175,133, 8, 21,169, 42,235,224, 10,168, 11, 98, 86,103, 31, + 31,179, 14,243,253,188, 18, 60, 89,124,200,245,169,221,171,159,118,123,175, 41,232,211,156,184,219,161,169,200,209,156,230,175, + 32,173,106,228,234,163, 55, 64, 16,217, 86,194,191, 17, 2,170, 36,239,175,166,125, 25,210,191, 97,131, 16, 99,182, 82,212,246, +235,219,223,248,112, 83, 17, 84,196, 43,104,136,191, 63,133, 79, 34,165,169, 98,133, 70,155, 0, 20,122,123,117,213, 41, 0,202, +219,237, 85,202,245,100,100, 50,228,215, 17, 1,208,135,223,102, 58, 90,224,164,175,227, 74, 84, 86, 43,191,142,199, 64,178, 59, +149,218,100, 98, 21,163,134,228,178, 27,187, 25, 43,117, 1,197, 35,139, 97,117, 79,146, 9, 7,224,107,116, 18, 61,201, 26,132, +171, 12,143, 27, 53, 86,166, 37,147,223,236,252, 92,199,102,182,167, 1, 42, 17,229,151, 90, 73,216, 2, 84, 2,208,119, 59,252, + 58,163,117, 81, 35,130,187, 81,144, 58, 21,112,218,153,178,103,152,180,104, 23,171,120, 18,219, 72,105,197,249, 18, 62, 53, 41, + 74, 89, 82, 23, 32, 4,134,192, 36,130, 9,253, 52,214, 60,160,107,145, 33,106,129,188,106,128, 93,189, 30,216,165, 60,155,245, +184, 44, 41, 65,208, 26, 37,196,114,105,142, 43, 42,230,177, 94, 5, 75,222,130,190, 26,156,122,140,248, 21, 31,217, 68,168, 86, + 14,217, 59, 97,101,139,109,150, 10,155,138,162, 27,146,235,104,252, 69, 85, 37,197,110,104, 82, 14,196, 10,116,235, 93, 79,207, +221,169,213, 55,237,155,130, 62,239,111, 46, 46, 48,234,147, 1,100,176, 82,130,174, 32, 40, 14, 59, 2, 87,176,169, 30, 62,237, +180, 49,102,161,210, 56,250, 45, 24, 87,167, 12,178,249,115,100, 8,197, 45, 5, 37,181, 56,174, 67,136,116,113, 21, 36, 86,128, + 87,113,215, 70,187, 32, 68,119,170,159,180, 37,116, 87, 98,189, 45, 90,241,251,165,189,119, 40,193,198,220,113,180,191, 41,124, + 67,110,169,106, 42, 9,230,106,105,238, 3,235,214, 94, 70,105, 49, 40,213, 97,128, 67,175,169,253,146,193, 96,226,120, 44, 43, +124,101, 5, 35,202, 77, 82,132,241,108, 87,127,133, 52, 31,167,125,102,244,236, 49,105, 50, 37,100,117, 92,163, 43, 25,153,145, +252,143, 4,197, 50, 88,229,139,244, 54,164,180,161,196,165,196,131,215, 90, 57, 61, 54,184,135,118, 42,149, 25,214,215,242,146, +185,207,212,239,161,238,215,229, 54,177,125,129, 21, 13,200,140,146, 26,111,203, 11,160,161,216, 29,141, 42,117,154, 50,103,142, + 88, 29, 22,198, 53,255, 0,185, 45, 49,170,249,215,234,103,181, 12, 67,150,245,145, 8,228,244,116,121,141,167,129, 63, 3,103, +226, 64, 81,232,164,157,233,253, 26,214,162,211, 48,234,221,149,237,209,112,231,126,177,169, 23, 7,216,122, 50, 82,214, 65, 21, + 40, 42, 72, 4, 23, 60,186,132, 2,158,160,144,120,253, 90,232,112,167,162,199,204,130,161,110,243, 46,240, 36, 42,225,108,105, + 73,101,214, 40,161,184,248, 84,157,234, 0, 29, 64, 4,123,245,172, 36,178, 8, 74,206,192,191,161,196,183, 41,165, 54, 1, 33, + 69, 35,239, 4,149, 2, 77, 61,226,157,124, 61,218,155,178,101,180, 79,144,133, 37,207,151, 81,125, 52, 11, 65, 80, 90, 73, 79, + 34, 20,149, 87,122, 80, 83,253, 58,115, 36,204,137, 76,204,195,173, 41,181, 32,137,192,113, 90,233,247,130,192,165,124, 42, 52, +132,153, 38, 94,237, 25,140,132,203, 67,145,208,164, 71, 85, 91, 75, 78, 14, 73, 85, 73, 10,235,184,240,240,209, 33, 36,220, 23, + 71,122, 93, 98,101,211, 37,142, 84,219,172, 50,148,165,194, 22,127, 14,158, 36,151, 57, 2, 62,158,154,185, 11,153, 22,184,185, + 93,175,219,220,219, 4,189, 92,127,201, 22,219,155,107,184,186,148, 22, 25,248, 18, 73, 78,202,108, 20,147,189,122, 3,245,107, +199,126,165,122, 50, 89,245,156,204,120,189,177,249,135,247,135,110,173,168,211,159, 7,231,162,183, 44,112, 70,137,177,203, 11, +146,114, 21, 92,100, 33, 72,126, 8, 82,144, 22,146,154,130,142, 52,223, 95, 61,100, 66,116,141,147, 12,123, 15,219, 95, 98,168, + 33,170,101,197,226,197,110,237,104,142,247,239, 3, 15,200,116,255, 0,124,113, 0,215,221,170, 33,221, 40,234, 86,252,115, 22, +133,112,147, 46,214, 64, 46,199,125, 69,105, 52,175,150,164,109,250,117, 2, 8, 36,171, 58, 29, 18, 39,112, 49,246,224,221,164, + 72,173, 97, 21,182,133,120,113, 87, 16, 52,106, 78,224,156, 65,151,139,130,139, 55,178,218,235,195,202, 96,130,122, 29,182, 58, + 53,177,254,158,138, 16,139,113, 81,238,214,139,114,217,118,104, 2,174, 35,204,167,191,238,157, 14,162, 75, 30,196, 72,192, 7, + 73, 56,172,113, 41,235,134, 45, 33, 84,113,165,135, 89,254,234,183, 78,180, 50, 65,218, 36, 22,125, 81,109, 20,252,179, 15, 84, + 75,117,221,247, 5, 60,150, 90, 90,193,246,147, 74,232, 48,147,144,138,205,162, 71,199,178, 87,134, 52, 45,242,149,201, 37,242, + 88, 39,246, 84,147,225,173, 51, 4, 2, 53, 86,148, 52, 41,200, 13, 93, 34,142, 81,213, 21, 46, 58,145,226, 65,166,179,165,240, +132,246, 85,170, 29,116,179,252,230, 45, 47,229,192, 91,242, 30, 66, 66, 79,133,126,241,251, 53, 26,230,210, 69, 17,209, 52,118, +151,182,145,231,150,229,200, 64, 72,108,173, 13, 41, 67,168,225,211,125, 74,203, 8, 8,176,136, 65, 92,142, 44, 54,251,182, 47, +108,169,121,228,184, 82,179,185, 41, 39,115,244,106, 84, 71,226,222,163, 54, 91,111,214, 39,239, 56, 77,174,202,181,213, 48,163, +161,199,149,239,229, 82, 62,205,104, 59, 49, 89,230,179,185, 33, 90,112, 71,175, 25, 19,240,162,182, 75,252, 86,224,227,224, 86, + 54,174,148,236,208, 5,106, 35, 69, 63,188,152,164,139, 30,101, 97,192,163,163,148,245,195,105,249,101, 63,247,170, 20,167,213, +169, 87, 39,121, 33, 74, 46, 25, 53, 98, 18,162, 97, 57, 92,156,117,135, 7,203, 64,143,243, 23,103, 73,251,203, 82,107,195, 80, +144, 40, 86, 69,180, 84,198, 67,150,221,115,188,197,217,177, 63, 10,220,227,202, 76,100,143, 6,208,170,109,245,232,230,161, 1, +170, 36, 74,126,196,237,200,106,122, 29,144,121,169,134,170, 74,191,173, 81, 82,126,189,103,201,228,236,160,100, 93,147, 30,107, +220, 88,216,141,136, 56,135, 57,220, 87, 80,132,141,201, 89,216, 83,232, 26, 37, 84,104,167, 25,106,202,160,187,230, 78,221, 46, +205, 70,106,170,125,215, 2,151,190,229,100,236, 53,103,200,209, 74, 83,213,149,194, 38,167, 26,110,215, 99,121, 64,206, 74, 18, +252,148,255, 0,109, 99,149, 15,208, 53, 82, 85, 62,138,123,144,215,242, 73,108, 99,247, 12,177,229, 86,229,117,145,242, 48,135, +177, 35,225, 37, 62,237, 76, 82,193, 39, 77,246,230,145,141, 96,144,227,180,104,235,169, 83,146, 20, 77, 54, 61, 73,208, 46, 60, +130,121,142, 73,110,195,144, 38,234,183,230,201, 87, 27, 92,110,110,138,244, 33,190,154, 22, 68, 26, 0, 14, 42, 32,185, 73, 22, +188,213,251,142, 67,116,188,185, 85, 59, 32, 43,202, 79,246, 65,219, 70, 56,255, 0, 4, 66,145,150,171, 91,247,217,158, 76,166, + 36, 40,213, 92, 84, 9,175,245,117,110,202,120, 21, 88, 76,137, 38,203,198, 67,228, 98,173,179, 31,102,252,132, 33, 52,241, 36, +212,232,112,135, 20,140,245, 43,199,118, 46,206,199,237,226,209, 27,105, 76,180,203,142, 17,215,143, 93, 18,170,190, 32, 59, 84, + 68,221, 84,191,231, 9, 15, 50,110, 9, 63, 14,203, 42,175, 66, 5, 14,143, 58, 94, 76,167, 25, 40, 47,119, 77,113,109, 83,210, +242,183, 91, 39,141,125,160,234,197,120,206, 83, 78,107, 87,111, 50,217,247,152,111,249, 39,227,125, 21, 82,189,192,239,163,156, +112, 16,201,220,142,227,185,211,215,102, 31, 96, 18, 81, 29,222, 3,251,164,208, 29,102,229, 99,237, 46,137, 25,185, 79,152,118, +108,172, 99, 34, 22,228, 43,240,211,193, 66,167,193,205,143,235,213, 99, 83,234,155,118,169,201,182,100, 43, 59,118,127, 35,228, + 33,109, 72,229,239, 91, 14, 46,159, 98,116,182,124, 41,110,213, 14,237,195,104,184,150,221,157,187,239,180,178,132,157,194, 25, + 66,126,247,214,116, 27,102,197,213,194, 52,100,155,124,195,134, 71,155, 65,178,253,235, 92,112,227,239,167,192,210,170, 4,234, +223, 78,191,115,146,170,217, 79, 5,187, 57,199,221,145, 34,223,106, 41,227,200,124,225,246, 83,142,212,253, 90, 44,239,248, 76, + 81, 68, 0, 78, 93,177,179,202,186,217,191,203,237,158, 17,213,206, 91,228, 16, 10, 80,216,226, 9, 59,208,106,149,146, 4, 34, +192,234,169,175, 90,157,212,186,118,231,180, 18,236,248,161, 75, 2,226,240,183, 45,218,173, 46, 62,165, 87,154,170, 13, 74, 82, +158,181,235, 79,234,212, 43,187,244, 7, 77,142, 94,116,119,235,182, 36,247, 14, 31,111,237,100,226, 58,174, 5,139,106,151,126, +186,189, 49,180,131, 17,189,156,125,123, 37, 9, 42,227,201, 68,144, 1, 81, 27, 10,212,235,232,162, 91, 64,143, 16,234, 38, 85, +108,142,137,129,166, 92,242,210,146, 79,156,177,247,129,223,109,171,211,175, 77, 60, 74,140,194, 35, 99,153, 54, 43,160, 66, 88, + 75,169, 33,106, 88, 60, 73, 59,159,216,232, 71,215,167,100,226, 69, 60,226, 25, 11,182,214, 75,183,143,198,158,170, 20,114, 10, +168,166,252,184, 5, 38,170, 63, 70,162, 98,234,197, 82,237, 87,111, 99,174, 44,230, 23, 22,224,194, 92,175,230, 2,129,111,240, +142,160,138,251, 75,138,175, 31,109, 21,211,192,235, 43, 44,109, 91, 24,165,202,250,149,232,187,211, 68, 70,112,200, 25, 62, 90, + 32,200,152,166,212,164,221, 2,213,231, 41,181,184, 20, 91, 12,134, 5, 42,221, 64,161,226, 79,183, 92,142,102, 80, 50, 96,235, + 98, 47, 17,222,173,165,118, 35, 9,184,201,254, 83,103,101,182,218,142,163, 20,147, 21, 62,106, 68,129,201,214,234,148,168,165, + 42, 41,168,174,255, 0, 71, 77, 87, 54,144, 53, 68, 19,101, 34,127,162,238,222, 8,110, 72,141,198, 58,231, 60,167, 84, 80,130, + 62, 42, 42,158, 41, 36, 80,210,148, 31, 70,130, 50,230, 19,139, 65, 44,200, 77,159,209,238, 43,100,140,252,119, 82,153, 41,146, +165, 21,198, 64,122,142, 43,204, 9,231,178,193,228, 42, 0,169, 32, 3,211,218,231, 54, 74, 68,197, 74,199, 61, 48,192,178, 67, +126,222,244, 46, 44, 54, 80,219, 41, 41, 33,106,109, 0, 41, 41,234, 77,118,161,216,116,208,236,203,151, 30,105,124, 37, 66,204, + 48, 73,150,194,133, 91,217, 91, 11,130, 27,119,229,208,148,249,137, 72,113, 36,185,182,201,173, 13, 43,184,247,233,161,107,241, +213,211,109,236, 87, 87,106,125, 83, 99,239,217,226,217,175, 15,161,187,209, 75, 73, 17,247,228,149, 20, 37, 75, 36,253,221,138, +169, 74,254,173, 74,187, 44,171, 64,178, 51, 58,100,109,150,225,196,241, 86, 60, 62,238, 99,151, 84,173,200,143, 5, 70, 66, 74, +202,129,173, 18, 15, 30, 70,158,221, 18, 89,114,151,204,179,127,210,164, 18, 55,115,187,180,155,123, 82,146, 28, 66,225, 22,194, +185,114,221, 5, 68,129, 90,234, 59, 68,202,210,199,198, 21,248,174, 8,245,105,150,219,111,153,100, 59,181,149, 1,114, 80, 86, + 36,160, 29,184, 41, 60, 87,204, 39,122, 19,202,149,214,214, 38, 62,133, 26,219, 25,115,231,125,123, 21,137,100,214,225,147, 33, +174, 18, 36, 4,172,200,106,129, 74,109, 73, 36, 10,141,141, 20,106,118,235,171,248,119, 24,157,170,174, 85, 27,131,174,102,202, +123, 49,136,218, 46,201, 74,137,110, 40,115,247, 15, 37, 77,144,150,213,205, 20, 36,116,232, 62,173,116, 21,146, 66,193,182, 12, + 82,106,251, 69,110,152, 60,169, 79, 52, 74, 18,165,208, 84,158, 94, 95, 50, 5, 71, 66,181, 42,187,215,122,232,193,208, 76, 66, +136, 61, 62,170,241, 58, 52, 88,204,241,226, 67,203, 84,100, 14,102,131,192,109,189, 72,174,219,211,232,210, 54, 55, 20,133, 6, + 92, 23,236, 63, 73,119,151, 82,183,158,101,201, 72,113,192,162,181,182,148,166,133, 59, 80,159,103, 34, 58,105,188,225,218,138, + 49, 10,177, 59, 27,232,251, 16,141,116, 98,102, 65,107, 14, 73,109, 97,208, 29,146,149,164,211,127,221,165,178, 0, 32,120,154, +234,189,247,202, 33,129, 86,104,196,143,243, 46,131,201, 59, 71,142,195,198,184, 89,236,101,166, 84,128,143, 62,205, 23, 96,144, +118, 73,113,176,170,154,143,218, 26,169, 70, 77,128,235, 39,241, 43, 70,120,245,182,145,101, 78,222, 44, 89, 94, 27,116, 76,247, + 30,117, 49,138,184, 69,118, 74, 28, 82,146,160,106, 42,164,132,208,253, 71,232,214,237, 57, 59,130,207,148, 12, 75,174,157,244, +251,222, 25,121,189,137,252,119, 39,144,217,200,221, 74, 20,212,151,129, 74, 36, 20, 39,143,150,104,148,241, 81, 78,193, 85, 31, + 78,188,163,215,190,135, 25, 82, 57, 52, 2,228,124, 81, 0, 16, 88,104, 72,112,207,193,198,186,113, 66,200,173,195,132,223,105, +200, 34, 51,153,205,109,231, 22,204,168, 97, 16,148,195,136,170,144, 80, 62, 33, 94, 67,199,221,175, 6,191, 14, 48,147, 18, 65, + 28, 65, 3,248,172,232,150,116,115, 16,203, 32,198,238, 68,245, 37,194,166, 93,183,169,231, 10,146, 18, 2,208,120,142,138, 86, +171, 79, 28,109, 36, 31,187,251, 84,140,217,138, 85,206, 36,139,165,182,105,111,103, 36,187,243, 42, 31,213, 9, 77, 6,171,225, + 86,196,130,172, 78,122, 58, 3,113,186, 46,241,133, 69,189,176,170, 92,216, 96,177, 41, 3,239, 81,181, 85, 11,250, 41,171, 77, +240,144,161, 57,234,180, 93,239,234,107, 25,141,112,167, 36, 56,164,161, 95,250,193,254,157, 54, 13, 79, 19,226,152,218,150,108, +138,110, 85,233,219,228,115,198, 64,109, 77, 45, 63,218,105, 85,213,198,113,180,170,228,182,170,208,203, 45, 76,221, 93,118, 18, + 71, 20,221, 45,109, 42,158,213,240,255, 0, 78,171, 70,189,179, 8,126,118,139,153,100,179, 38,209,141,159, 63,103, 88,150,232, + 62,208, 82,170, 87, 91, 7, 82, 20,201,209,213,139,219,220,237,228,227,174,195,144, 69, 88, 1,183, 1,241,109,225, 64,126,163, +172,252,154, 81, 55,184, 78,178,100,197,139,142, 53, 63, 97, 21, 40, 14,169, 94,213, 26, 38,154, 0,165,202,104,201, 62, 98,153, + 52,107, 54, 40,242,211,254, 37, 12, 4,178,159, 16,167,198,234,251, 52,178, 96,208, 36, 34, 86, 92,178, 65,179,170, 21,199, 39, +126, 99,139, 41,140,218, 62, 81, 69, 93, 8,221,100,234,116, 68,236, 3,185, 52,198,171,212, 9,235,147,104,147, 13,162, 74,164, +185, 84,211,193,164,171,141, 52,113, 39, 74,113, 0, 38, 12, 34,221, 6,201,127,152,251,200, 9,113, 46, 48, 86,124, 74, 82,158, + 92,126,221, 85,184,157, 20, 15, 5, 19, 39,106, 37,223, 47,147,154,202, 64, 47, 71, 74,150,149,145, 90, 33,191,138,131,235,213, +152, 89,182, 44,152, 5, 95, 99,152,245,234,255, 0,141,222,239, 50,171,252,202,241, 37,231, 10,252, 67, 41, 77, 71,213, 77, 75, + 39, 36, 68,196, 40,237,116, 15, 22,193, 99,218,238, 48,217, 79,196,211,108, 56,226,213,253,162,106, 6,139,101,226,101, 74, 53, +178,118,129,142, 61, 34, 28,133,176, 13, 29, 91, 44,169,105,247,252,103,245,105,160,200, 70,191,137, 87, 22,203,117,195, 57,151, +124,190,206, 10,249, 43, 59, 79, 56,132,170,180, 73, 74,138, 19,245,154,106,252,154, 44, 2, 85,214,202,119,100,187, 88,139,194, +221,205, 46, 71,149,186,218,224,158,239, 33,212, 20,158, 35,237,212,204,128, 32, 40,206, 58,166, 73, 16,238, 87, 43,138,242,151, +235,252, 91, 15, 62,200, 62, 5,103,130, 71,212, 53, 82,168,130, 83,148, 49, 49,229, 77,185,217,109,178, 7,255, 0, 13,130,201, +121, 0,116, 83,165,116,174,158,233,129,162,156, 66,115,201,103, 63, 60,181,143,180,174, 44, 60, 2, 2,135,136, 9,255, 0, 78, +179,156, 72,186, 39, 20, 30,101,177, 17,237,169,176, 67,248, 95,152,219,173,109,237, 66,107,250,117, 10,190, 50,231,146,114, 25, + 40, 97,216,231,201,223,214,220,189,144,148,241,226,124, 20, 78,250,186, 44, 28, 20, 64, 70,123,165,141, 69,136,184, 73,182,208, + 33,104,226,225, 31,182,177,169,202,231, 12,135, 58,223, 84,207,103,197,227, 93,112,203,127,205, 15,139,205,249,115,244, 1, 93, + 85,149,187, 53, 76, 43, 82, 51,252, 37, 87, 56,115,224,179, 95,150,117,182,218, 65, 63,212,109, 28,206,167, 12,151, 46,154, 53, +106,170,187,111,103,165,201,130,227,105, 71, 27, 75, 40, 87, 37, 83,239,184,191, 15,171, 86, 70, 83, 57,230,159, 98, 11,147,118, + 13,215, 95,108, 13,163, 52,194, 82,177,189, 20,235,138,216,106,205, 25,193, 47, 40, 20,115,183,157,149, 86, 53,143, 75, 97,223, +134, 73,254, 28, 43,217,207,115,170,121,125, 65,230, 25, 60,106, 70,251,119,233,253,171,108,167,163, 56,174,102, 65, 67,197, 35, +246, 80,216, 36,143,183, 67,202,205,222,124, 2, 94, 91, 40, 89, 70, 29, 42, 22, 91, 26, 52, 74,151, 19,248,178, 92, 30,222, 95, + 10,126,161,161, 67, 32, 8, 38, 21,186,188, 6, 47, 27,228,213,103, 64, 63,206,127,151,166,115,138,253,175, 55,201, 41, 66,127, +254, 95, 45, 80,253,225,103,228,155, 96,116,135, 96,121, 54, 86,174, 1,147, 67, 21,161, 21, 39,217, 84,238, 62,189, 60,200,153, +101,116,214, 80,251, 36,182, 89,182,127,152,221, 80, 15,188,227,177,146, 63,105, 72,165, 13, 53,114,152,249,113,110,106, 22, 71, + 84, 42, 69,226, 77,238,107,210,102, 42,169,142, 26,140,221,127,101,180,158,159,102,167,102,131,189, 12,171, 75,177,236, 70, 24, +156,171,228,128,159,152,156,181, 70,104,175,163,108, 55, 85, 45, 95, 70,218,167,100,182,104,165, 18,184, 39,214,239,118,109,185, +207,112, 29,182, 70, 80,114,201,106, 91,200,105,178,104,133,184,163, 69, 41, 64, 31, 0, 41,246,253, 26,250, 55,233,231,166,207, + 79,198,243, 39,243,216, 3,142,193,197,191, 4,106,227,205, 85, 24,150, 31, 34,239, 29, 87,135,220,227, 25, 35,204,105, 41, 72, + 13,165, 36,208, 0, 18, 0, 21,175, 65,174,238,235, 0, 42,237, 85,184,116, 3, 34,198,210,226,214,134,202,148,134,198,206, 40, + 84,124, 70,160, 82,189,104, 70,139, 81,112,171,219, 21, 14,212, 80,218,203,107, 80,242,105,192, 45, 20,228,181,248, 20,138,211, +167, 78,186, 40, 66,224, 20,103,174,159, 39, 32,165,189,170,162,128,133, 18,107,190,230,136,235,169,152,232,161, 25,106,186, 71, +209,253,234,215,109,188,195,185, 93, 0, 48,138,208,162,243,172, 50,144, 56,147, 74, 41,224,164,141,246, 31,134, 78,179,178,232, + 50,142,156, 86,230, 45,192, 21,245, 47,179,158,167,145, 38,202, 45,136,156,164,196, 33,190, 41, 73,112,164,165,163,189, 20,191, +105, 29,104, 62,141,114,215,224, 16, 93,150,213,119,137,112, 87,159,111,251,209, 98,113, 42,189, 72,105, 79,184,232, 42,230,211, +142, 46, 64,112, 40, 13,254, 34, 13, 27, 42,233,239,250,179, 47,199, 60,145,120,171, 91, 24,191,218, 51,155, 90, 17, 99,112, 22, + 93, 75,111,182,183,169, 84,186,164,171,194,180, 32,142, 53,160,167,214, 53, 66, 64,196,178,129, 27, 75,168, 57, 23,243, 43, 14, + 67, 2, 51, 6,136, 75, 95, 50,182, 82, 42,158, 64,130,178, 15, 95,133, 94, 21,246,141, 76, 64, 72, 58,156, 38, 36, 10,117,130, +242, 94,152,196,181,214, 75, 77, 5,186,181, 54, 72,169, 53, 66,185, 17,236,118,160,141, 0,197, 84,155,109, 32,105,246,254, 9, +103, 55,198,173, 81,242, 54, 89,150,145, 42, 43,129,181, 4,186, 10,144,138,252, 65,183, 56, 40,114, 32,159, 29,137,211, 8,171, + 24,215,153,215,168,230,127,130, 11, 35,210,214, 37,125, 97,219,197,190, 47,203, 78,243, 60,213, 37,148,134,208,165,157,254,238, +199,165, 5, 9, 61, 61,250,144,178, 65, 70,121,113,140,128,146, 89,201,187, 37,220,236, 66,222,244,108, 66,121, 31, 52,149,198, + 74, 92, 11,251,138,108, 21, 21, 80, 80, 10,131, 77,182, 58,113, 99,241, 8,144,178, 19,224, 82, 62, 77,216, 30,249,230, 81,159, +102, 21,201,134, 99,178, 91, 76,170,121,161,245,150,218, 40, 71, 20,241, 80, 41,226, 2,190, 35, 82,117,102,172,170,226, 93,138, +148,224, 56, 58, 90,198,253, 37,199,198,236,178, 50, 44,149,196,220,174,110, 21,170,174, 32,171,128, 63, 17,226, 9, 6,162,191, +102,172,217,212, 37, 54, 17,209, 60, 49,163, 19,174,170,157,239,156,235, 54, 63, 21,219, 61, 16,134,144, 56,164,164, 33, 13,168, +236, 65, 52,166,231, 96, 71,187,219,171,216, 85, 74,122,148, 28,137,136,133,198,253,227,189,166,229,118, 13, 71,101, 41,144,131, +200,133,243, 35,219,183, 42,154,125, 52,215, 97,137, 81,136, 92,190,101,128,148,163,105,182,194,126,158,115, 64,172,168,114,227, + 95,133, 84, 30, 34,155,251, 14,174,237, 84,163, 48,156, 48,132, 67,133,120, 12,202,108,170, 47, 34, 80,130, 86, 40,144, 62, 32, + 40,124,107, 93,142,129,109,123,149,154,236,101,111, 97, 16,113,213,201,249,184, 42, 79,157,195,128, 15,242, 13,186, 20,154,148, + 41, 67,122,245, 0,235, 58,200, 16,175, 9,186,177,113,108, 46,199, 57,182,153,148,133,180,225, 42,242,212,144,151, 27, 82, 82, +118, 4,157,197, 0,165, 82, 70,218,165,101,146,138, 52, 64, 71,174,248, 34,229,180,227, 50, 31, 44,195,251,222,122, 2,100, 37, +105, 6,148, 80,120, 26, 80,232, 49,150,175,197, 24,203, 86,224,149, 59,165,233,214, 85,199, 15,114, 67, 95, 42,243,209,210, 93, +109,214, 86,219,110, 4,141,247, 67,169,228, 62,165, 1,239,209,232,203, 17,152, 10, 19,134,232,170, 27, 19,181,163, 16,200,154, +152,251,101, 60, 28, 1, 14, 54,175, 52,245,169, 33, 64, 19,255, 0,165,174,158,155, 4,130,167, 18,202,243,159,108,135, 33,136, +153,181,186, 91,210, 17, 45,104, 76,181,190, 18,126, 93,196,164, 4,161,106, 70,252, 72,160, 73, 35,110,149,166,188, 83,234, 95, +165,161,140, 70, 69,111,182, 68,191, 96,231,199,240,117,159,151, 64,131, 17,205, 47, 12,170, 84, 28,149,198,210,225, 75,238, 39, +202, 89, 59, 30, 53,173, 53,227,176,173,156, 21, 82,193,193, 75,139,126,147, 44,220,223,121, 95,128,212,117, 43,174,223,116,129, +160,211, 91, 74, 73,132,180, 74, 24, 62, 88,235, 51, 35, 67,144,121, 67,153, 25,113, 22,159,122,137, 3, 86, 12, 24, 21, 9, 79, +177, 49,201,142,134,177,244, 88,221, 38,173,171,204,229,236, 13,170,187,253, 90, 22, 33, 12, 71,122,105,104,171,135, 50,101, 90, + 46,247, 8,205,168,249, 77,200, 87, 78,148, 88, 6,154,212,149, 95, 16,239, 67, 18,119, 10,245,190,228,169,114,215,137,100, 80, +199,240,242, 34, 37,128, 71,181, 7,112,126,173, 2,202, 90, 74,177, 58, 21,206,185,237,208, 62, 47, 48,120,241, 82,102,172,132, +251,150,170,234,212,107,105, 5,102, 50,248, 71,122, 31,136,222,231, 63,122, 92,116,147,242,206, 71, 90, 92, 30,246,141, 65,211, +223, 88,218,234, 64, 18,173, 89,179,238, 47,246,166, 44, 26,147, 53,197, 37,197,164,245,242,146, 65, 21,213, 17, 16, 36,197, 79, + 80, 21,235,106,244,189,234,111,184, 22,168,151,172, 31, 13,186,200,181,201,130,193, 75,206, 70, 84,118,150,164,166,149, 74,228, +240, 10,250,142,180, 15,167,179,178,107,122,233,145, 7,185,191, 22, 86, 33,161, 66,103,122, 65,245, 71,133, 50,234,242,204, 38, +237, 22,222,176,183,228, 77,110, 42,164, 50,208,109, 28,135, 55, 35,115, 74,107,239, 35, 82,159,167,179,177,224,246, 83, 32, 27, +139, 63,224,233, 18,229, 47,250,122,178,255, 0,155,178,198,173,203, 73, 83, 45, 44, 50,229,125,137, 62, 98,171,246,107, 31,229, + 9, 89, 39, 8,235,240,100,204,202,238,240, 98,143,196, 19, 84,202, 71,246, 81, 82, 79,217,170, 89, 32,128, 16,193, 80,178,167, + 88, 89,184,121, 84, 68, 0,134,160,177, 79,218, 52,170,207,219,161,202, 70, 62,228,224,169, 54,232,214,251, 22, 5, 53,210, 2, + 94,110, 41, 40, 30, 53, 89,227,250,181, 74, 82, 54,106, 82,125, 85, 91,112,184,181, 17,210,227, 63,119,229,202,234, 61,251,106, +205, 19, 59,145,137,209, 57,224, 87, 85,189,218,249,207, 55,188,240,224, 83, 96,141,232,164, 17, 95,171, 90, 82,150,210, 16, 74, +203, 54, 31, 18, 47,105,114,119, 88, 64, 18,174, 70, 48, 0,108,106, 82,121,126,157,244,213,229,188,246,246, 36,189,118,110,216, +199,249, 54,237,138, 16, 3, 69,134, 67,171, 63,217, 30,221, 44,188,205,182, 69, 68,135, 81,187,138,136,246, 41, 81,109,113,254, + 22, 35,183,229, 45, 35,216, 17, 81,250,244,104, 88, 68,138,104, 33, 12, 90, 98, 69,110,205, 52,185,248,105,142,243,203,223,169, +230, 72, 26,141,182, 19, 36,137, 68, 93,182, 59, 42,209,106,190,196,170,149, 29, 74, 46,145,185,226,179,177,208, 12, 90, 41,110, +209, 71,102,142,100,102, 99,195,225,134, 86,175,119,197,190,158,161,183, 69, 53,213, 93,135,238,222,107,218, 63, 73, 54, 92,147, +181,114,218,182, 92,110,249, 5,245, 51,100,136,112,164, 56,235, 76,177, 21, 77,160,170, 83, 78,108,146,163,211, 94,183,233,108, +137, 81,211,163, 40,104, 76,228,229,135, 96, 84, 51,175,149, 96,109, 44,235, 85,219,189,118,238,236,195,106, 55,127,113, 11, 30, + 99, 9,193,201,114, 92,132,213,178,230,129,226, 88,155,109, 13, 45, 7,233, 4,123,181,127, 34, 85,100,134,190,168,207,189,154, + 94,240,197, 82,135, 80,156, 78,186,170,235,212,175,107,112,158,202,247, 33,142,217,224,139,146,188,120,174, 13,213,132, 92, 86, +135, 36, 50,139,132, 70,229,249, 74, 91,105, 72, 87, 15, 51,136, 52,173, 58,215,174,188,195,213, 93, 54,188, 12,163, 85,110, 98, +192,235,199, 80,235, 92,205,192, 40,119,120, 27,131,138,218,225, 71, 77, 5,194,117, 82,148,142,161, 42, 32,126,173,115,244,135, + 83, 28, 18,198, 69, 99, 70, 45,138,188,169, 95, 2,150,158, 73, 73,219,117, 29, 16,234, 11, 37, 18,145,103, 93,218, 49, 35,186, +237, 56,184,164, 1,239, 45,154,233,226,241, 10, 71,130, 46,244,180,162,203, 17,245, 80, 42,115,138,118,135,197, 64,209, 41,208, + 68, 53,116,194, 90, 35,118,199,191,148,135, 60,149, 3, 53,109,134, 83,238, 39,169,208,203,142, 41, 21,169,156, 78, 50,101, 42, +229, 62,132, 37,105, 42, 81,241,161,228, 70,250,168, 38, 73, 33, 52,142,136,160,190, 56,139,153,191,212,124,203,142, 7,184,215, +254,193,182,203, 28,126,197,234, 60,153, 50,141,155,118, 55, 42,197, 24,114,229, 30, 59,175,218,100, 60,228,201,110,210,170, 73, + 41, 60, 83, 64, 55, 72,246,235,175,204,232,226,169, 25,213,168,110, 31,195,181,118,249,253, 6,117,107, 0,225, 87,145,109,222, +108,132,197, 97, 36,181, 13, 44,178,218, 60, 11,178, 20, 1,247,107, 46,118, 57, 11,157,158, 58, 30,237,173,113,141,198,222,159, +138, 66,100, 20, 40,143,113, 52,253, 58,140,172,224,171,154,121,167,123,197,237, 88, 7,111,222,198,152,113, 49,229, 51, 13,201, + 18,102,184,126, 8,204,173, 3,146,206,196, 19,191,194,159,218, 86,221, 42,117, 44, 28,127,220,228, 7, 4,135, 12, 7, 51,249, +120,161, 8,176, 95, 49,123,131, 49, 23,155,212,149,199,169,101,215, 22,176,227,212,228, 82, 85,178,143,212, 54, 31, 71,211,175, +175,113, 43,242,235,140, 72,224, 7,224,142, 6,128, 43, 86,204,221,130,201,218,216,241,212,121, 73,100, 5, 56,225,216,184, 2, +107,193,180,251,214, 8, 39, 84,229,172,214,156, 64, 16, 84,222, 93,146,137,146,159,124, 16,219, 15,168,169, 0, 84, 0, 84,147, + 80,144, 41,225,176,214,173,113, 96,179, 45,155,165,185, 89, 60, 24,235, 83, 76, 26, 57,200,161, 1,190,136, 20,175, 47, 10,157, + 16, 32, 74, 64,168,234,125,239,153, 67, 45, 10, 62,104, 18,144, 42, 41,215,236,174,231,219,162,136,186, 31, 5,208, 93,141,184, + 69,181, 51, 30,243,125,123,230, 46, 43, 37, 44, 52,234,199, 4,165, 35,175,197, 95, 15, 0, 62,221, 35, 82,177, 27,153,116, 70, + 9,222,115,111, 44,190,191, 44, 62,165, 81,178, 1, 73, 74, 58, 18, 2,118,165, 14,213,213, 43,177,119, 43,212,229,178,186,112, + 79, 80,178, 36,165, 76,153, 42, 49,138,120,164,242,160, 53, 59,128, 41,184,166,219,253,154,199,200,192, 3,146,213,163, 45,215, + 97,122, 69,239, 37,149,251,139, 78,201,124, 60,211, 12,209, 9,111,145, 73,116,173, 75,224,144,104, 73, 34,181,219,160, 79,191, + 92,198,125, 6, 28,190,204,180, 28, 89, 22, 93, 35, 29, 76, 93,242,166, 23,112,101, 10,136, 45,111,173, 43, 82,170, 22,181,188, +149, 22,250, 83,112,125,187,212,107, 55,132, 80,108, 6, 3, 78,213, 54, 22, 75, 30, 30, 4,196,155, 98,120, 37,123,151,200, 10, + 42,105, 44,151,149, 83,225, 71,104, 20, 79,191,174,165,181,203, 32, 26,183, 90, 79, 16, 63, 30, 31,130, 31,101,204,172,249, 84, + 52, 94, 28,101,196,197, 67,210, 62,103,205, 71,196,164,176, 3,105,113, 97, 93, 18, 22,160, 70,164,107, 49, 69,156, 12, 56,119, + 34,183, 28,138, 61,146, 0, 74,164,135, 26,142,162,195,133,191,139,116,169, 72, 81,160,167, 74, 82,158,221,142,135,229, 58,132, +107,222, 93,184,169, 23,216,246,235,132, 38, 97,190,235,137,142,251,126, 99,124, 57,161, 84,160, 95, 20, 26,146, 9, 77, 71,143, + 67,165,179, 85, 26,137, 5,217, 87, 23,181,228,152,156,167, 77,164, 33,203,107,132, 74, 13, 41, 75, 39,143, 18, 9, 80, 36,158, +131,109,188, 62,141, 76, 66, 51, 90,113, 47,197, 40,119, 70, 96,157,105,101,248,142, 41, 1,103,227,143, 90,210,162,161, 73, 35, +101, 3,237,235,171, 88,240,213,146, 43,151,251,245,136, 34,244,211,229,144, 21, 44,167,101, 40,164,132,252, 53, 21, 7,221, 94, +186,220,195,158,214, 84,242, 32,224,174, 63,238, 7,106, 38,196,186, 8, 74,170, 28, 21, 40, 94,225, 38,167,161, 62,239,104,166, +186,204,123,196,131,142, 75,152,200,169,139, 37,137,120, 92,219,114,213,205,163,230, 55,247,128, 32,154,123,189,191,110,173, 9, +134, 84, 72,101,186,208,204,240,251,114, 34, 40, 21,141,184,171,168,222,157, 53, 9, 50,148,100,201,243, 9,157, 58, 27,234,243, + 65,171,148, 46,183,251, 53, 7,114, 41,208,248,143,110,170,219, 29, 21,168, 88,172,187, 86, 87,116,177, 33,165,176,190, 80,137, + 14,132,171,112, 15,137,216,238, 41,236,214,100,232,220, 85,200,218,193, 93,253,178,204,236, 23,150,146,151,146,150,166, 45, 32, + 6,215,186, 66,129,174,202, 80,232,126,205,100,228,211, 40, 43,117,216, 38,154,102, 73,198,175, 73,118, 27, 37, 77, 74, 1,105, +242,218,162,146,160, 19,186, 77,122, 26,248, 26,214,180,211, 64, 72, 51,132,251,187, 23, 30,119,186,219,105,178,229, 83,237,236, + 71, 9,184,178,178, 67,109,149,165, 42, 61, 65, 9, 81,165, 15,187, 93, 71, 77, 4,197,213, 11,239, 17, 42, 47,104,187,157, 18, +224, 46, 88,164,112, 85, 14,100,122,160, 18, 63, 13,214,126, 52,146,151, 1,219, 99, 90, 29, 47, 87,226, 11,250,101,145,211,128, + 58,240, 85,108,183,116, 72, 80,110,115, 93,135,152,249, 47, 86,137, 43, 61,127,100,108, 63,213,175,146, 68, 26, 37, 80, 33,207, +177, 20,135, 62, 73,182, 73,183, 64, 30,108,233,192, 52,202, 71, 82,159, 29, 66,184,252, 74, 50,142,138,110, 23,131, 49, 14,242, +235,210, 42,166, 97, 37,167, 16,147,253,115, 95,212,117, 71, 39, 36,142, 8,144,169,147, 55,201, 49,114,139,114, 90, 79,227,165, +167,120,255, 0,120,167, 65,170,102, 37, 16,192, 20,153, 31,183,209, 46,182,167, 46,206,128, 37, 58,215, 7, 54,234,234, 42, 1, +250,245,118,204,194,225, 15,201, 98, 83,162, 33,166, 6, 25, 96,198,164, 44,121,150,214, 83, 33, 68,157,234,170,212,105, 89,150, +100, 73, 77,228, 4,177,233,103,211, 75, 30,173,123,213,148, 99,215, 59,226, 49,220, 90,207, 14,126, 73,112,184, 46, 43,147, 22, + 98,219,148,223,154,134, 88,109, 72,230,231, 23, 10,128, 42, 27, 3,227,182,186,158,137,210,206,117,130,189,219, 90, 38, 68,179, +232, 27,128,237, 80, 44, 1, 39,128, 87,230, 57,216,175, 64,221,188,109, 77, 65,198, 50,108,193,214,219, 33,233,215,187,204,123, + 66, 87,203,117,121,108, 91, 88,112,165, 39,195,146,201,246,235,174,143, 68,233,240, 12, 68,231,226, 91,240, 10,140,186,136, 28, + 34,172,182,175,126,158,187, 5, 63,159,165,107,107,115,178, 11,141, 38, 28,159, 34, 97, 51, 36,218,144,226,249, 53,111,130,212, +180,169,180, 22, 17, 68,173,210, 20,165, 26,239, 74,106,221, 56, 88,152, 4,154, 35,186, 71, 93,210,212,199,176, 7,224,221,188, + 74,134, 79, 80,229, 4, 26,233,221,142,229,101,115, 37, 43, 46,200, 46, 19,164,182,146, 71,204,203,121, 73, 30, 63, 10, 57,113, + 72,175,128, 3, 79,118, 93,179,212,200,251,214,116,237,148,184,146, 84, 14,216,247, 95,185,216,221,216, 76,199,242, 11,132, 69, + 54, 22, 84,219, 50,223, 13,170,162,163,146, 57,113, 80,175,129, 26,157, 89, 86,192,184,145,247,165, 27,101, 30, 4,133,100,118, +187, 50,193, 59,227,123, 75, 29,201,133, 14,207,221,201, 14, 45,152, 57,157,181,134,162, 34, 99,234,248, 82,139,163, 12, 4,182, +190,100,129,231, 36, 5, 39,106,237, 93, 83,234, 29, 47, 31,170, 6,152, 16,183,148,198,142,127,239, 14,111,219,196, 45, 12,124, +253,223, 12,253,234,146,206, 49, 76,135,181, 93,208,191, 88,114,184,198, 46, 65, 29,217,107,121,133,110, 42, 83,240,173, 36,108, + 82,164,144,164,145,212, 26,235,203, 58,142, 21,152,215, 74,171, 3, 74, 39, 85,160, 92, 42,103, 43,204, 92,147,113,129, 99, 70, +201,113, 94,105, 35,170,148,179, 77,245, 78,117,238,137, 81,148,152,128,152,114,107,193,151,110,185,217,152, 63,143,229,182,218, + 71,185, 13,212,254,157, 6,140,125, 28,165,189,206,138,157,189, 95,132, 72,178,213, 95,220,196, 74, 79,184,147,169, 87, 64, 50, + 30, 40,219,222, 37, 51,118,155, 59,109,203,112,142, 21,252, 57,108, 54,177,239, 59,106,206,109, 91, 65, 42, 17,151, 5,103,219, +230, 54,140,110,100,122,255, 0, 14, 16,183,192,254,226, 13, 53,207,209, 97,253,203,119,127, 4,112, 52,116,183,136,222, 13,175, + 18,186, 78,109, 84, 92,148, 39,236, 78,137,212,220, 89, 95,121, 31,138,106,139,146,179,191,224, 51, 6,213,144,178,161, 73,144, + 91, 90,255, 0,188, 18, 5,117,183, 40,234,171,214,126, 20,176,237,221,169,184,133,166, 66, 21, 66, 10,163,172,131,225,185, 26, +121, 69,202,144, 42,197,236, 10, 88,201,109,159,203,230,111, 29,244,190,206,251,253,221,129,250,142,161,100, 8,138, 91,131, 37, + 60,206,228,213,138, 77,234, 35,103,241, 80,202, 25,229,237, 85, 74, 73,253, 26,120, 7, 14,164, 36,234,242,237, 5,225, 50, 63, + 47,219, 20,194,106,227, 25, 85,242, 18, 73,246,185, 6, 19,159,211,175, 82,244,232,126,154, 59,172,151,224, 22,103, 84, 58, 5, + 7, 28,184, 7,110,209,172,136,221,230,218,113, 74,167,183,168, 26,210, 17,209,214, 56,146, 57,235, 70, 50,165,250,249,149,142, + 43,226,136,196, 75, 5, 83,253, 84,162,205, 24,154,253,154,226, 61,107, 94,238,165, 62,225, 31,249, 66,232,172,147, 48, 85,119, +116,175,207,230, 93,222,199,160, 51, 83, 11,231, 92,168,234, 60,166,104, 53,205, 26, 26, 39,189, 79,126,137,123,213, 47,114, 25, +115, 39, 78, 49, 5, 64, 52,133,115, 80, 79,130, 64,162, 70,134, 42,104, 34,137, 42,190, 46, 82,139,173,254, 37,165, 31,185,142, +104,119,216,158,167, 79, 58,200,139,118,166,156,217, 62,101,183, 6,142, 79,138,227, 45, 31,134, 51,107,153, 32, 15, 10,157,171, +162,126,223,108, 2,104,203, 69, 63, 14,190,183,121,203,156,113,103,148,102,185,185, 74,237, 80,104,157, 84,190,166,138,121, 77, + 50,247,114,251, 26,208, 98, 90, 99, 14, 9, 82, 91,230, 69, 42, 84,231,196,163,172,186,234,121, 20,219,131,164,213,102, 13,127, + 56, 75,124,191, 0, 54,166,233,253,146,180,141, 16,212,120, 41,242, 95, 71, 59,113, 99,176, 93,237,173, 65,190,176,219,133, 67, +130,219,116, 38,132, 17,225, 93,119, 19,158,171,219,115, 37, 40,130,202,180,239,159,161,188, 81, 19, 92,206,187, 83,193, 18,208, +232,155, 46,208, 74, 66, 93, 83,105, 52,225,236, 59,253,122,163,147,136, 45,212,105, 46,222, 94,208,185,124,140, 15,220, 7, 3, +108,190,227,252, 23, 6, 94,127,204, 56,182, 77,125,131,149, 68,118, 13,204, 41, 69,198,159, 4, 81, 69,205,136, 34,128,143,122, + 78,178,103, 65,135,194, 70,171,152,203,170, 85, 72,198, 65,138, 9,222, 92,145,233,221,186,200, 38,161, 65, 79,174, 55,146, 8, +216, 36,113,162,138, 83,208, 26, 10,114, 53, 32,116,246,107,162,244,141, 95,252,228, 1,224,227,241,251,104,179, 76,151,206,252, +131, 49, 14,100, 13, 91,246, 81, 11,228,170,120,113,251,160,253,157, 60, 53,245, 24, 12, 20,183,185, 77, 19,187,143, 52,219, 62, + 79,114,250, 82,150, 18, 71, 68,165, 36, 13,135, 77,186,157, 0, 83,171,171, 70,214,139, 42,222,225,112,122,224,120, 54, 72, 74, + 79, 20,170,187,210,170, 31,171, 86,149, 25, 21, 46,203,143, 71, 80,249,169, 41, 89,117,123, 0, 9,167,135,196,163,224, 6,255, + 0, 80,212,196, 84, 56,169,174,182, 98,205,243,150,144, 31,170,146,128, 64,169, 74, 77, 42,117, 98,181, 2,143,216,115, 75,156, + 7,252,213,164,249, 68,134, 27, 74,183, 27,209, 85, 62,239,118,136, 82,116,231,140,247, 82,109,190,113, 92,151,124,192,162, 42, +154,144,154,141,184,245,161,167,179,244,106, 18, 9, 9, 43,111, 0,239,124, 65, 37,149, 58, 84,164,168,141,146, 74,121, 26,239, + 64,124, 0, 30,202, 13, 84,178,167, 87,168,185,151, 87,118, 31,190,171, 77,214,214,220,119, 84,197,181, 69, 9,121,182, 28,252, + 84,178, 86, 1, 9, 82,104, 2,143, 90,214,191, 70,185,236,236, 64, 65, 91,184,215,240, 11,184, 49, 30,247,205,154, 6, 73, 49, +224,181,177,206,216,211, 10, 80, 45, 82, 91, 46, 72,109, 59,208, 16, 56,164, 10,145,225,237,215, 45, 44,102,209,106, 59,167,124, +139,185, 10,189, 99, 54,139,117,145, 75, 50,209, 45,203,100,196,164,212, 37, 14,184,158, 42,113, 11, 59,165,101, 41, 4, 17, 81, + 95, 97,208,225, 94,217, 23,236, 81, 16,212,158,213,178,249,108,200, 24,187, 51,115,128,144,254, 38,243, 50, 31,125,180,236,228, +135, 66, 11,172, 50, 77,106, 56,171,226,161, 27,145,190,165, 25, 2, 59,221, 73, 3,196, 59,137,152,162,209,106,159,127,140, 34, +218,146, 83, 14, 67,201, 88,117, 94,114,154, 84,133,173,194, 77, 79,152,165,114,232,106, 41,227,169,206,161,171, 20,153, 31, 29, +246,182,222,103,221, 44,247, 87, 22,136,176,252,137,177,212,202, 15, 36, 3, 69,144,221, 9, 10, 28, 19, 81, 81,237,246,211, 81, +242, 8, 0,168, 70,160, 31,189, 25,187,231, 48,238, 23, 38, 33,202,108, 5, 33, 33, 49,110,105, 0,182,226, 92,227, 84, 37, 71, +196,145,200,117,233, 79,118,129,229, 17,170,156, 98, 2, 94,238, 75, 22,211, 26, 60, 83, 29, 77, 37,106, 47, 7, 27,221, 41, 95, + 34, 28, 5, 35,238,143,186,170, 13,186,232,148,184,213, 59,170, 87, 59,195, 90,122,232,228, 57, 95,133, 61,104, 9,110, 64,167, + 7, 43, 94, 36,145,246, 87, 90,180,216,193, 10,192,235,159,123,155,132,179,110,152,204,233, 40, 30,111, 37, 52,251,110, 14, 35, +144,170, 72, 80, 21, 2,190,209,181, 40,117,177,141,113, 98,203, 38,250,195,234,171,124,167, 10, 97,199,252,230, 91, 74, 90,235, + 68, 15, 5,110, 58,107, 90,155,244, 0,172,139,234, 74,114,241, 54,226,191,230, 51,178, 84,106,170,138,143,245, 29, 90, 18,117, + 80,197,138, 35, 6, 33,109,134, 86,217,224,242, 79, 23, 42, 15,221, 63,116,253, 26, 25, 82, 69,237,247, 43,131,113,156,180,190, +162,149,164,243, 96,157,194, 86, 55, 52, 61,104, 65,208, 76,117,117, 33, 34,204,139,192,206,239, 24,180, 51, 60,177,206, 58, 65, +228, 80, 78,212, 59,148,169, 63,116,212,116, 58, 28,233, 18, 83,174,227, 20,173,105,245,133, 54,221,119,126, 42,223, 43, 0, 56, +243, 75, 74,184,172, 80,138,130,157,193, 28,126, 33, 81, 74,106, 83,193, 12,158, 57, 68, 23, 73, 25,151,115,239, 29,200,205, 83, + 57,135,144,165, 37, 10, 5,214,208, 82, 84,146,158, 96, 40,110, 65,219,110,189, 60, 70,175,224,208, 33,162, 29,214,111, 41,131, + 3,149,118,115, 38, 90, 99,136,235,228,195,178, 4,142, 13,180,165, 33, 77,154,133,145,240,215,168,175,180,251,245, 95,214, 25, + 34,158,155,105, 60,192, 31,103,211,237,218,133, 34,192,166,199,113,166,110, 22,152,153, 75,187, 58,235, 12,196,112,116, 33,106, + 36,131,191,191, 95, 34,217, 99, 6,236, 66,130,247,143, 71, 78, 63,156, 71,145, 51,255, 0,103, 37, 41, 77, 60, 84,144,116, 29, +206, 29, 22, 45,205, 60,221, 88,141,107,191, 77, 68, 98, 10, 37,180,153, 44,129,226, 22, 43,250, 14,168, 93, 81,119, 76, 37,170, + 19, 46,107,118, 28,181,112, 10,169, 10, 75, 77,145,236,228,240,161, 31,110,155,102,232,247,165,185,181, 67,242,123,153,179, 89, + 26,131, 24, 81, 69,213, 45, 84,235, 64,170, 87, 84,163,102,203,128, 60, 17,221,226,131,119, 11, 42,144,211,241,230,199, 89,242, + 29,109, 45,212,120,120,142,159, 70,180,168,171, 67,226,129,185, 91,191,150,130, 99, 91,253, 77, 99,184,251, 68, 6,114,232,185, + 5,166,105,175,132,187, 84,132,160, 31,253, 98, 81,174,219,210, 23,255, 0,249, 10,199, 34, 37, 31,124, 79,230,202, 22, 13,192, +142,212,192,137, 9,117,187,139, 64, 80,180,149, 10, 30,180, 78,187, 53,203,175, 80,208,168,246,102,166, 36,127, 81,105,255, 0, +105, 90, 25, 42, 37, 78,112,186,244,151,103, 39,247,114, 27, 9, 3,251, 71,175,234,212,100,116, 72, 40, 54, 25, 14, 64,147, 41, + 67, 98,166,156,250,188, 53, 40,157, 20,147, 23,110, 98,249, 50,216, 46, 31,133,164, 57, 33,127, 80,219,245,232, 98,122,168,166, +238,240, 50,231,122,251, 9, 15,185,174,213,220,251, 12,125, 24,229,229,254,171,147,103,184, 5, 38, 3,206,168,238, 84,203,227, +202,175,136, 80,169,214, 71,171,177, 63,115,139, 28,145,243,214, 68,101,223, 19,192,159, 3,167,181,109, 96,219,230, 69,143, 37, +202,157,183,236,231,113,187,185,221,139,109,143, 7,178,205,187,205,136, 20,228,180, 64,142,227,193,164, 54,104, 20,226,144, 40, +128, 85,176, 42, 32,107,135,193,193,187, 40, 24,213, 3, 35,220, 29, 88,144, 36,247,171,170, 95,160,143, 84,233, 90,231,170,195, + 25,171,212,183, 22,217,129, 38,247, 99,106, 64,109, 93, 63, 13,201, 64,242,247,117,215, 69, 95,163,122,135,150,198,182, 61,155, +162,255, 0,138,132, 99,180,241, 11,149,189, 87,118, 59,189,158,157,173,183, 69,247,103, 25,184, 88,153,156,249,143, 10, 76,200, +235, 17,158, 13,167,149, 26,144,138,178,191,246, 84,117, 72,244, 92,140, 67, 17,116, 12,124, 70,158,254, 8,128, 16, 11,164, 14, +202,100,238, 57,102,144,250,201, 21, 88,227, 95,236,234,175, 84,172, 8,160,215, 45, 66,232,156,122,232, 39, 99, 79,190,181, 80, + 8,202,229,191,181, 52,215, 31,139, 83,228, 18,174, 74, 77, 4,175,104,185, 45, 86, 57, 22,142, 91,240, 82, 70,254,227,166,234, +207,230,214,123, 8, 79,137,168, 37,120,239,182, 74,243, 61,142,199, 36, 72, 87,241,141, 52, 99, 44,248,236, 43,174,170,186,183, +151, 64,145,218, 17, 63, 77,158,153,187,229,234, 71,181,133,254,223, 91, 66, 45, 17, 37,165, 83,175,247,119,155,129,106,134,142, + 53, 81,118, 92,130, 17,176, 34,169, 71, 37,111,211, 90, 56, 29, 11, 39, 54,210, 43,143,194, 56,200,233, 17,237,252,134,169,162, +126, 21,212, 29,142,244,141,218,142,219,185, 18,223,151,119,138,208,253,249,135, 92, 75,145,236, 54,187,149,202, 50,150,190,169, + 76,164,249,105, 59,248,241,215, 80,125, 21, 2, 26,121, 17, 7,186, 36,253,238, 21,115,149, 88,211,119,226,148,251,157,249,122, +228,217,173,206,233,116,236, 86,103,100,205, 31,121,247, 28, 85,141,151,149,109,187,210,132,209,184,211,248,165,124,119,173, 23, + 95, 96, 58,163,145,232,171,162, 30,153,198,206,225,161,247, 31,226,143, 85,208,159,202, 65, 95,157,173,194,179, 46,221,122, 22, +127, 7,238, 45,182, 77,171, 43,180,247, 26,231, 21,232, 87, 6, 92, 97,228, 37,120,244, 7,146, 74, 29, 0,208,131, 80,122, 30, +163, 91,253, 22,137,211,128, 97, 56,152,145,105,208,232,126, 80,169,245, 17,240,143, 20, 59,182, 72, 68,174,231, 0, 15,192, 57, + 86,190,194,157, 95,144,248, 86, 34,105,245,177, 49, 22,159, 93, 93,199,200,151,255, 0,248,232,118, 86,154, 39,218,172,122, 26, +255, 0,167, 92,167,170,171,126,163,111,254, 31,249, 98,186, 11,143,199,246,236, 84,196, 55,209,105, 97,172,234,225,247,153,109, +210,202,143, 94, 78,124, 71,174,185,249, 84,225,144,196,151, 57,247, 23,184,105,202,123,131, 38,122, 28, 36,149,240, 21,254,200, +212,109,165,130,179, 2,229,111,237, 3, 43,159,125, 76,201, 74,248, 25,113,210,234,137,240, 73,174,131,180, 25,129,224,167, 56, +232,153,153,204,211,113,190, 94,179,103,143,240,241,155, 48,226,154,237,182,219,106,237,212, 59, 4, 17, 52, 99,179,151,210, 60, +215,214,127, 21,213, 36,110,124, 43, 83,172,142,165, 13,177, 41,188,199, 43,103,116,115,117, 77,200,210,149, 57,200, 55, 83, 82, +124, 18, 40, 53, 71, 11, 24,136, 57,226, 83, 89, 99,200, 4,155,254,101,123,151,243, 10,159, 36,175,128,223,246, 70,150,207,234, +183,114,190,218, 47,161,152,127,168, 40,179,108,237,249,174,143, 49, 32, 41, 11, 6,138, 30, 61,117,218, 91,137, 32,116, 94,240, + 12,101,170, 90,238, 87,171,107,205,154, 89, 44, 62, 71,129,223,217,183,129,213,204,110,158, 39,197, 87,182,232,214, 21, 61,220, +126,227,226, 93,229,140,184,249,100, 64,227,171, 20, 18,153, 60, 31, 65,173, 65, 74,254,159, 3,171,243,232,177,156, 24,253,188, + 59, 23, 63,157, 58,178,162, 99, 48,253,253,158, 11,154,189, 82, 99,217, 6, 25,218,235,204,139, 3,174, 92, 49,183, 17, 71,215, + 25, 10, 50, 27, 71, 46,142,160,110, 18, 7, 85, 1, 79,109, 6,218,185,233, 94,129, 26,115, 68,166, 67, 13, 71, 47,177, 92,102, + 95, 74,149, 82,221, 19,186, 63,122,249,245,143, 91, 21,125,187, 72,190, 58,160,136,161,197,121,117,246,114,216, 15,171, 94,225, + 32,203, 50, 1,245, 83,239, 23, 24,177,228,173,166, 20, 84,148,143, 45, 70,190, 34,164,159,172,254,173, 52, 66,156,164,165,226, +248,146,111, 79, 39,146, 74,220,125,206, 72,225, 93,207, 42,127,167, 83, 67, 3,114,113,155, 6,219,219,235, 42, 36,222, 79,154, + 8, 80, 13,161, 37, 37,105, 64,167, 83,176,169,160,250,244,194, 78,167,177,134,169, 18, 22, 79, 10,235, 57,114,164, 33, 41,243, + 2,170,148,212, 37, 8, 73, 53, 2,187,248, 29,245,102,185,104,171,158, 43,107,247,187,114,227,161,165, 43,138, 10,139,131,143, +222, 32, 10,255, 0, 72,209,137, 5, 66, 75,211, 18,145,113,150,151, 32,168,212, 38,141,183, 80,126, 45,183,253, 58,150,215, 80, +224,136,219,178,139,206, 55,118, 9,223,138, 64,162,150, 84,160,125,158, 62, 58, 20,226,141, 25, 46,149,244,177,234, 1,184,247, +104,144,178,119,208,227,174, 40,124, 42, 72,160,230,120, 39, 99, 82,126, 34, 0, 27,120,147,211, 89,121,148,110,142,139, 95, 18, +246,103, 95, 67,187, 7, 53, 23,251, 12,171,180,135, 84,234,101,127, 19,228, 56,126, 10,184,215,150, 8, 73,165, 10, 81, 68,215, +192,141,114, 89,101,139, 5,208,211,168,117,110,246,159, 36,153, 38,246,227,210, 28, 13,188,203,233, 41,243,133, 10,202,152, 68, + 98, 1, 59, 26,150,133, 61,251,117, 27,211,184, 6, 71, 87,197,171, 34,114,100, 31,151, 42, 66,200, 41,125, 0,138, 0,182,151, +176, 32,215,175,196, 53,156, 99,183, 84,251, 80, 76,154,219, 42,210,227,113, 45,209,145, 43, 27, 33, 34, 69,180, 1,248,140,114, + 31,112, 42,137, 37, 1, 68,129,226,157,189,154, 61,115, 5, 50,131,111,197,173, 88,228, 23,230,198,105, 10, 83, 74, 13,201,226, + 63, 24, 6,194, 64, 53,241, 87, 17,201, 53, 7,167,191, 79,230, 18,146, 0, 38,220, 39, 93,164,219,225, 76, 15,218,201,243, 98, +133,143,129, 52, 32,167,142,251, 5, 0,118,222,132, 15, 96,169,244,109, 82, 76,217, 68,137, 19,237, 73,112, 1,243,124, 57,241, +235, 66, 90, 73, 59, 30,169, 10,228, 8,246,104, 48, 0, 20,146, 38, 77, 45,153,241, 3,202, 28,141, 2, 18, 79,222, 77,105, 64, + 65, 29, 66,169,245,106,212, 80,166, 85, 11,234, 18, 11,171,185, 49, 34, 25,226,149,254, 27,141, 40, 87,112, 64, 1, 84,240,223, + 91, 24, 39,181,101,228,151, 85,179,118,240,251,200,143,196, 37, 95, 19,117, 61, 66,121,168,128,105,236,233,173, 29,205,170,206, +150,169, 99, 45,180,182,195,106,117,176, 10, 9, 63, 79,188,141, 91,166, 78,169,216, 25, 8,181,178,182,166, 37, 46,143,192, 41, + 91,106,175, 74,116,167,233,174,143, 34,130, 22,185,206,203,180, 6,203, 42, 5,198,143, 14,149, 0, 2, 83,227,236, 26,140, 53, + 76, 82,238, 81,159, 53,104,129, 41,199,148,182, 31, 44,151, 10, 82,161,197, 96, 10, 40,138,212, 40,110, 42, 8,173, 61,190, 19, +216,160,185,126,237,155,174, 21,237, 87, 66,178,220,159, 48,150, 74,133, 19,197, 69, 73, 82, 84,127,170, 82,165, 15,175, 87, 76, + 62, 21, 16, 85,149,219,204,219, 25,254,105, 14,232,193, 8,243, 17,229,187,208,161, 36, 36,171,130,169,226, 55, 35, 74, 17, 32, +186, 44, 72,230,174,126,212,228,248,110, 73,109,186,192, 66,146,222, 68,219, 78, 22, 2,126, 32,182, 0,248,209,246,142, 64,142, +189, 53,205,125, 69,194,179, 43,165,203,103, 24,145, 47, 17,192,254, 42, 22,135,142,137,134, 77,237,155, 94, 28,171, 84,147, 84, +189, 21,135, 26, 80,253,151, 91,115, 99, 79,160,235,229, 73,234, 75, 40, 67, 64, 23,235,242, 85,118,154,171,146, 55,144, 16,135, +194, 71,137, 64,162,135,217,167,174, 44, 19,137, 38, 88,119,131,113,131,110,159,214, 68,117,152,206,147,226,217,221, 63,102,161, + 96,112,128,101,241, 32, 29,209,158,183, 84,155,188,113, 73, 13, 43,203, 52,246,162,139, 31,165, 58,133, 49,109, 17,206,161, 18, +189,249, 55,232, 16,238, 76, 39,240, 93,139,230,167,222, 78,228,107, 35,168, 84,100,224,113,226, 17, 49,202, 1,125,199,196,204, + 94, 68, 52,144,101, 53, 64,213,122,133, 36,114, 31,160,234,246, 5,198, 85, 70, 71,143, 52,167, 22, 37, 59,122, 36,200, 23,140, +122,156,237,125,237, 71,139,127,207,109,176, 95,169,251,159, 53, 49,184,203, 63,245, 86,117,208,250,110,253,153,180,159,253, 72, +253,229,148, 85,205,150, 99,139,199,187,133,148, 89,220, 79, 20, 71,186, 78,129,199,216,150,230, 56,207,244,107,211,179, 14,203, + 8,239, 43,150,156, 90, 68, 45, 70, 26, 30,181,196,128,157,151,204,176, 71,189, 42,219, 84, 37, 38, 76, 19,238, 33,217, 16,112, +209,152,247, 66,253,111,195,112,231,220,243, 45,178,111, 42, 90,164,205, 75, 71,227, 92,104,140,130,234,208,158,133, 84, 3,125, +171,163,200, 87, 85, 98,203,236,141,113, 60, 31,137,240, 28, 74,183, 78, 20,236,215,128, 94,147,233,234,197,152, 49,112,184,118, + 55, 48,182,102,207, 71, 66,213, 42,213,110, 15, 70,186, 54,223,222, 46, 34, 28,144, 22,226, 19,181, 74, 42,119,233,169,227,154, + 50, 65,253,181,177,176,142, 67, 73,123,142,170,118,224, 78, 1,198,169, 82,210,210,161,169,228, 16, 82,250, 89, 45, 16,122,131, +226, 63, 70,170, 2,203, 60,132,239,216, 28,147, 14,198,174, 23, 59, 71,113,210,227,157,190,191,218, 38, 65,184,181, 31,247,165, + 77, 82, 75, 62, 95, 80, 28,243, 91, 72, 73, 59, 2,106,118,213,204, 99, 85,144,157,119,124,147,137, 5,189,225,187,223,130,183, +139,112,170, 78,120, 50, 19,144,247,247, 36,186, 71, 94, 23,128, 70,107, 17,237, 99,104,121, 12, 88, 44, 85, 97,181, 44, 16, 60, +201,111, 38,142, 72,117, 64, 14, 74,112,154,157,232, 52, 90,242, 4, 43,242,233,136,174, 3,128,142,158,243,196,158,242,163,126, + 84,236,238, 9, 26,103, 57, 16,161, 17,191,150,226,156, 63,211,161,137,104,171,144,167, 64,239, 22,103,139, 71,123, 17,185, 54, +206, 73,218, 43,147, 75,102,241,135,100, 8, 19, 45, 51,152, 82,129, 40, 44,189,200, 54,189,170,149,162,138, 4, 3,238,213,234, +178,204, 96, 35, 47,138, 39, 66, 15, 4,106, 47,149,103, 67,167, 98,167,251,195,249,122, 72,197,239,118,140,167,210,149,190,125, +243,179,185,211,162, 70, 59,108,104, 46,100,251, 92,176,163,243,150,153, 5, 60,148,163, 29, 66,169,113, 95,121,189,201, 60, 84, +163,197,250,155,162, 78, 54, 67,200,137,148, 44,224, 6,164, 30, 96,248,126, 30, 11,106,160, 38, 55, 69, 89,216,215,229,231,222, + 56, 24,195,246,204,191, 39,196, 49,204,153,230, 11, 74,178,222,242, 40,237,206,109,207,234, 45, 49,146,243, 96,251, 71, 61,181, +159,133,232, 76,184,147, 41,202,184,203,176,203, 95,184, 17,247,166,178, 65,155,112, 30,213, 82,103, 30,148,253, 66,246, 42,240, +155,175,114,236, 15, 53,134, 56, 0,143,127,183,173,185,246,153, 1, 71,138, 74, 38, 68, 43,104, 21, 30,137, 81, 10,247,107,155, +245, 79, 64,202,195, 0,217, 2, 34, 72,248,134,177,227,218, 52, 70,193,137,136, 46,155,123, 69,233,131, 18,239,221,150,102, 97, +222, 73, 47, 65,244,245,132,150,174, 55,195, 24,148, 72,186, 60,231,248,123, 84, 69,237,197,199,212, 40,165, 3, 84, 39,125,137, + 4,117,190,148,233, 3, 46, 82,149,154, 87, 14, 61,253,193, 6,217, 0, 12,143, 4,245,220,222,237,100, 25,204, 56,152,227, 81, +217,178,118,206,218, 26, 99, 31,197, 45, 41, 12,219,173,209,210,126, 20,161,180, 0, 22,189,234,167, 20, 57, 40,251,182,215,113, +109,198, 76, 34, 26, 35,132, 71, 0,176,111,200,149,135, 94, 29,138, 22, 59, 43,249, 93,222, 51,205,116, 15,165, 75, 7,194,187, + 29, 2, 22, 60,152,246, 33, 24,232,167,153, 11,102,255, 0, 45, 0,209,213,200, 46, 54, 69, 65, 4, 16,161, 66, 52, 57, 30, 97, + 60,116, 70, 59,191,222,238,225,230, 88,245,171,181,217,116,211,113,198,224,202, 76,200,174,202, 5,114, 89, 80,101,108, 22,252, +226,106,164, 16,190,138,169, 20, 20, 32,109,171,115,205,178,202,246, 72,187, 31,106, 60,174,148,162, 34, 75,164, 44, 53,135,172, +185,212,169, 8, 53,226,221, 83,244, 87, 80,148,192,130,175,179,146,189,253, 94,122, 73,204, 59,141,234, 51, 60,207,178, 75,205, +187, 14,237,125,203,249, 48,141,124,191, 60, 65,152, 99, 88,225,176,242, 97,198,103,147,175, 20, 41, 36, 29,128,173, 69,106, 14, +170,117,126,129,118, 86,117,182, 18, 33, 15,133,137,231,240,142, 3,137, 93, 21,194, 32,188,139, 42,239,186,222,136,172, 89,183, +110,145,137,246, 83,186, 22, 75,142, 94,138,185, 10,223,120, 98,101,145, 18,214, 81, 64,203, 82, 37,114,111,154,142,201, 10,160, + 39,196,117,213, 56,250, 83,251,151, 70, 71,176,130, 16, 55,215, 61, 35, 32,254,229,243,195, 44,236,191,115,251, 73,220, 55,177, + 14,235,217,165, 89, 51, 72,174,186,220,251,116,246,203,110,182,226, 79, 32, 65,221, 42, 66,210, 65, 74,146, 74, 84, 55, 4,141, +115, 29, 70,169, 83, 41, 66, 97,136, 60, 10,179, 26,153, 73,193,111, 11,178, 34,239, 29, 38,171,113, 79,134,233,215,145,240,213, + 65, 91,204, 20, 78, 33,148, 91,189,233,235, 94, 25,109,177,180, 41, 34,124,132,135,189,191,122,166,191,102,181,205, 96,234,169, +236, 46,155,176,108,137,171, 72, 89, 42,221,176,105, 67,227,172, 44,186,124,201, 42,228,144, 82,206, 73,149,189,115,189, 41, 12, +158, 79, 56,175, 41, 35,233, 59,234,112,164, 66, 58,169, 87, 18,100,191, 21,123,134,111, 72,197,194,254, 20,197, 89, 81,175,253, +162,156, 77, 15,232, 58,199, 21,151, 54,119,143,118,171, 99,185, 89, 24,215,118,178,172, 70,150,251,130,139,177, 5, 18,151, 21, +253, 58,245,235, 48,227, 35,193,122,148, 51, 37, 1,218, 20,139,255, 0,113,191,204,109,146,165, 30,103,198,181,209, 40,197,216, +133,126,102,224,135, 90,239, 82, 34, 57, 85, 42,173,214,160,141, 94,216,179, 76,209, 73, 23,113, 61, 41, 33, 68, 19,209, 64,154, +131,244,141, 10, 81,229,201, 78, 18, 84,103,122,125, 34, 99,121, 91, 15,222,187,114,219, 54,108,165, 92,158, 45, 33, 28, 32,200, +117, 71,149, 92, 67, 96,240, 81, 53, 60,144, 40, 78,228, 87,125,116, 29, 63,175, 78,179,182,207,138, 63,120, 89,217, 93, 58, 51, + 15, 13, 15,220,184,215, 40,192,179,188, 19, 36,115, 25,206,160, 59, 6,246,165,243,242,222,165, 29, 65, 81, 72, 90, 22,154,165, +104,219,170, 77, 53,217,227,100, 66,248,110,129,112,185,187,105,149,101,165,162,191,187, 17,128,195, 54,232,243,214,159, 49, 79, + 26, 34,162,161, 1, 66,149, 36,251, 69, 42,125,250, 86,216,220, 21,154, 32,151, 61, 86, 35,228,110,194,218,133,114,141,197, 77, +138,236, 2, 82, 66,136, 3,222, 72,212, 40, 46,155, 40, 48, 84,205,170,216, 95, 80, 13,142, 8, 74, 69, 91, 29, 2,104,105, 95, +121,219, 87,224, 21, 5,147,224, 15, 39,231, 84, 74, 80, 85,196, 40, 31, 14, 33, 71, 71, 26, 40, 73, 15,199,242, 83,105,187,161, + 42, 87, 6,131,136, 74,146,158,164, 36,238, 43,246,234, 2,214, 42, 44,234,196, 68,203,125,249,105,150,150,255, 0,132, 32,249, + 73, 4,128, 77, 9, 42, 52, 4, 19,190,137, 57,129,197, 18, 49, 79,189,141,198,111,243, 50,118,158,182,195,118,111, 21, 9, 45, +161,134,214,186,148, 81,196,146, 18, 58, 0, 58,251, 14,178,242, 46,136,125, 86,142, 45, 5,215,208,158,193,247, 66,231,134,185, + 18,211,147,195,118, 32,114, 59, 15,150,100, 36,182,182,155, 80,248,194,194,192, 41, 38,169, 94,254, 0,235,153,202,128,153,120, +234,186, 60,114, 98, 24,171,251, 31,206, 91,148,137, 79,218,136,224,162,167,152, 93, 69, 84, 91, 63,136, 7,188, 20, 87,233, 58, +205,148, 85,176, 85,139,143,247,117,216,178, 99, 92, 16,232, 44, 85,184,243, 16,122, 40,154,132,148,159, 14, 64,237,239, 58,171, + 58,157,209, 1, 78, 81,187,174,222, 64, 24,199, 16,138,202, 66, 66,153,125, 60, 40,180,175,238,145,196,248, 20,148,144, 55, 7, +141, 42, 1,208, 5,109,170, 69,121,200,110,205,179, 10, 75,136, 15, 55,113,114, 59,140,186, 26, 40,115,206, 74, 0, 91, 68, 18, +104,165,113,161, 65,241,216, 29, 18,185,106, 20, 21,125,103,205, 31,117,232,151,139, 82,216, 80,109, 78, 50,165,238,211,156, 18, +160,135, 89,112, 82,135,138,146, 20,147, 74,129, 79, 96,173,221,160,232, 84, 9, 86, 20,124,190, 29,210,215, 13,183,214, 1, 40, +117, 40, 32,128, 80,164,168,180,180,158, 61, 8,169,247,108,117, 91, 99, 36,100,148, 46,183, 52,198,155, 34, 4,132, 16, 20, 25, +123,122, 10, 57, 66,146, 69, 63,180, 40,125,250, 56, 4,161, 74, 74,170,239,211,177, 87, 17,217,168, 33,104,101,106,113, 74, 62, +198,188,198,205, 79,188,237,173, 44, 55, 5,150,117,228, 21, 74, 92,114, 64,204,178,210,151,193,247,156,228,189,254,234, 74, 2, +149,185,233, 64,161,246,235, 94, 49,112,178,231, 38, 40, 13,235, 37,183,207,148,149,161, 99,228,212, 42, 0, 59,110,145, 80, 62, +130,117, 98,160, 64, 85,236, 33, 65,185,191,242,168,243,219, 59, 21,243,253, 66,159, 93, 52,120,151, 65,144,100,153,148,230,172, +176,219,206, 18, 2, 65, 87, 26,111,191, 64, 62,221, 26, 16,213, 12,151, 84, 71,118, 59,220,110,209,211,101,142,132,185, 13, 77, +128,226,149,247,154, 80, 21, 9, 7,223, 66, 55,251,118,213,184, 86, 29, 64,149,207,249,159,112,140,166,219,133, 29,202,112, 36, + 41, 74,169, 80, 33,100, 80,251, 71, 77, 18,114,112,202, 41,187, 1,186,186,218,216,134,167,131,113,158,113, 10,122,149, 77, 20, + 41, 67, 93,198,253, 62,157, 78, 60, 83,130,175,158,204,199,118,201,153,217,238, 19, 30, 82,109,111, 75, 98, 42,221, 21, 77, 27, +125,208,209, 42, 30,202, 19, 95,163, 86,178, 40, 23, 83, 56, 30, 6, 37, 77, 92,217,131,119, 27,123,237,218, 46, 41,227, 46, 49, +118, 3,200, 4, 40,121,145,159, 45,154, 17,177,220,108,117,241,127, 82,199,242, 47,178, 31,220,145, 30,226, 84, 64,213,145, 12, + 74,226,226,239, 12,113,175,146,128,107,244, 19,190,179,140,246,197,212, 72,213, 57, 98, 86, 89, 95, 41,118, 91,127,185,101, 73, +113,191, 97,252, 64, 8,255, 0,170, 70,162,255, 0, 10,134,199, 46,135,230, 86,135,238, 86,123,195,140, 38,166, 56,102, 90, 13, + 60, 43,197, 99,236,208,225, 45, 85,136,197,212,238,218, 71,110,231,141,197,183, 40,252, 77,165,196,167,220,149, 2, 83,160,219, +172,146, 26, 20, 17,251,138,204,183,155, 87,221,228, 66,143,246,146,158, 42,253, 90, 85,215,182, 12, 59, 81, 36, 28, 58, 35,218, + 73, 40,179,119, 6,219,145, 32,241,131, 10,237,110,185, 71, 80,216, 32,183, 37, 14, 40, 87,220, 69,117,163,131, 63, 46,218,229, +217, 33,248,161, 46,187,245, 39, 5,171,127,123,242,230,144,144, 57,221,167,188,191,114,157,125, 79, 3,245,215, 94,187,213, 67, +100, 79,196,174,107, 39,252,201,120,148,155,140, 46, 45,207, 40,179, 69,144,174, 49, 36, 92, 34, 50,249,254,170, 93,121, 45,168, +254,157, 86,170,177, 57,136,158, 4,133, 24,241, 81,253,103,220,239, 82,125, 83,229,169,191, 59,198,211, 29, 75,177,217, 35,116, +106, 52, 24, 40,249,118,218,105, 29, 18,144, 19,202,131,197, 68,248,235,203,125, 79,149,102, 71, 83,188, 79,249,100, 99, 17,200, + 70, 58, 0, 63, 31, 18,186,146, 0,136,101, 92,246,155, 36,200,112,119,160,231,248,204,181,197,201,225, 73, 18, 98, 72,104,209, +104,113,180, 26,125, 32,167, 98, 14,196,108,118,214, 70, 46, 77,152,246,137,214,118,202, 37,193, 76, 87, 73,250,145,102,220,207, +114,221,202,173,140,166, 52, 60,134,223,109,200, 76,116, 10, 37,183,167,194,110, 75,192, 15,122,212, 79,215,175,108,207, 59,228, + 38,205,190, 49,147,119,144, 9,251,215, 61,153, 17, 27, 11, 36,165, 62,220,112,202,186, 70,113,183,120,253, 43, 71, 79,183, 84, + 97, 38, 85, 86,174,214,246,250,110,121,124,185, 72,149, 49,139, 62, 13,105,100, 92, 47,249, 5,192,148,197,183,198,175, 16,165, +120,169,107, 63, 11,109,167,117,157,135,137, 23,177,234, 4, 25, 74, 66, 48,136,115, 35,192, 15,183, 1,205, 26,154, 13,164, 0, +152,176,187,207,161,222,224, 93,151,219,204, 63, 45,191, 70,201,211,201,184,247,219,229,190, 43, 54,103, 92, 39,138,106,148, 43, +230, 27, 65, 81, 31, 18,192, 9, 27,157, 84,167,174,116,203,103,229,198,115, 4,232, 36, 64,218,255, 0,136,246,133,164,122, 96, + 35, 67,170, 81,205,112, 59,230, 15,152,175, 9,202,152,242, 47,112, 22,227, 50,218, 38,160,112,169,228,146, 54, 41, 80,162,146, + 71, 80, 65,213,219,171,149, 71,108,184,133,151, 40,152,146, 15, 20,227,128,247, 35, 62,194,187, 61,115,195, 49, 43,147,176,172, +247,103, 20,236,148, 71, 81, 75,129, 72, 73, 10,242,214, 55, 71,152,138, 5,241,221, 65, 32,116,168, 51,143, 80,182, 17, 48,137, + 96, 83,198,233, 68, 24,131,161, 85,155,142,169,166, 16,186,244, 95, 19, 95, 30, 70,167, 84,235, 31, 17,240, 66, 33, 49,224, 93, +221,205,251, 89, 45,225,141, 74, 14,227,243, 85,229,220,108,147,210, 36,219,102,180,180,241, 91,114, 34,187, 86,214, 20,157,171, + 74,251, 8,213,138,242,167, 13, 6,177, 58, 16,117, 7,196,112, 83,162,233, 85,192,167, 14,229,101,221,173,201,187, 67, 3, 0, +237, 5,160,227,248,130, 12,139,205,206,211,201,107, 74,111, 50,221, 33,192,149,168,158,109,182,211,105, 75, 71,193, 6,158, 26, +183,100,233,170, 49,133, 17,219, 23, 50, 35,188,255, 0, 1,195,185, 19, 43, 43,205, 1,180,254, 42,168,149, 12, 73,180,177, 34, +148, 45, 60,211, 68,255, 0,102,155,159,183, 64,140,149, 34, 29, 58, 64,236, 78, 98,245,185,172,227, 34,157,105,196,240,153,139, +254, 2,231,152,221, 97,217,217,150, 83, 67, 86, 4,165, 5,172,111,177, 9,161,246,232,135, 24,196, 9,206, 81,132, 79, 3, 34, + 34,254, 14,175, 83,139, 57,135, 3, 68, 67, 52,236,254,101,131, 63,111,203,111, 13,199,153,137,205,117,147, 14,245,105,146,204, +235,116,154,128, 20, 17, 34, 50,148,138,236, 77, 13, 9, 27,210,154,107,104, 49,136,144, 34, 81, 60, 8, 46, 61,225, 10,236,121, + 86, 62, 32,150, 51, 91, 50, 36,229,179, 99, 15,184,210, 90,125, 4,116,161, 58,173,189,152,160,132, 53, 9,140,197,254, 84,162, + 41,230, 54, 18, 63, 81,211,217, 39,139, 5, 50, 19, 15,116,179, 28,195, 54,188, 75,201, 51,105,238,220, 47, 82, 91, 74, 16,243, +164, 81, 8,165, 82,134,208,154, 37, 9, 30, 1, 32, 13, 78, 89, 83,182,111, 34,238,165,100,204,203,158, 43, 89,131, 31, 38,196, + 82,149,167,224, 91,126, 82,146,127,101, 72, 27,157, 40,216,210, 67, 1,105,239, 78, 37, 35,212,135,166,123,149,151, 38,172,206, +236,246,202, 34,114,140, 98,230,176, 12,153, 24,243, 15, 37,171,165,189,231, 79,196,180, 48,218,195,237, 86,164,113, 32, 16,154, +234,175, 88,163,247,248, 82,145,255, 0, 50,160,224,243,218, 56,131,225,196, 45,140, 11,204,190, 19,203,130,226, 27, 47,111,220, +151,154, 41,149, 35,202,111,231, 57, 60,129,253, 80, 57, 37, 67,233,232,117,231, 81,204, 96, 60, 22,142,221, 86,187,222, 10,110, + 25,140,118, 26,105, 75,134, 26,145, 46, 26,169,240,135, 80,162,217, 79,210, 42, 14,180, 50,243,182, 87, 6,230,163, 24, 2,150, +111,140,220, 49, 75,131,144,165, 2, 42, 18,191,169, 64,255, 0,163, 83,174, 66, 97,213, 41, 85,241, 20, 2, 42,229, 90,166, 72, +186, 73,221, 8, 7,201,175,138,149,208,254,157, 53,196, 78, 32, 4, 90,225,179, 84, 49, 17,175, 98,107,185, 41, 74,188,227, 41, +166, 0,241,242,131, 75, 73, 63,245,200,208,182,195,110,213,107, 85,212,121, 94, 11, 22,187,164,115, 63,117, 73,235,175, 79, 18, + 94,130, 36,144,238,248, 99,214,199, 60,248,134,130,189, 6,194,191, 70,141, 11, 25, 52,163,185,121,139,115,106, 34,124,137,199, +141,126, 26,145,162, 56,146, 1,172,133, 62, 26,152, 36, 42, 19,129, 77,245, 41, 4, 29, 68,133, 49, 30,196, 94, 51,209,222, 71, + 39, 64,229,227, 90, 13, 12,197, 56,116,177,220,190,215,225, 29,201,179,155, 70, 79, 9,185,112, 65, 42,104,168,113,117,135, 10, +105,230, 50,177,241, 37, 67,218, 14,254, 32,141,180,124, 92,203, 49,229,186, 36,133, 11,105,141,161,164, 29, 86, 51,187,125,124, +236,117,129,119, 8, 9, 85,207, 13,132,193,101,169, 45,167,241,217, 43,216,173,244, 32, 80, 19,176, 11, 27,125, 26,236, 49,122, +172, 50,190, 19,164,187, 57, 31, 5,147, 60, 73, 81,222, 23, 56,119,183, 43,255, 0, 57,228, 46,220,150, 71,201, 50, 41,205, 32, +211,151, 37, 18, 7, 90,245, 39,236, 26,218,198,131, 5,151,151, 99,164, 1,120,135, 6, 42,227,215,139,238,116, 52, 38,164,129, +182,222,237, 92, 4, 5, 73,208,231, 81,113,154, 92,243, 29,226, 7, 21,249,116, 38,160, 36, 10,251,182, 30, 58, 40,135, 53, 2, + 84, 56, 88,172,139,236,241, 30, 18,194, 94, 59, 30, 7,153, 59,248, 15,110,218,143,149,185, 32, 85,247,216, 94,203, 66,189,221, + 80,220,183,188,215,194,195,105,136, 79,152,176,163,181, 21, 82, 16,157,235,177, 63, 73, 26,167,146,118,112, 90, 88,181,191, 21, +245, 51,242,253,236,206, 11,219,120,102, 61,202, 67, 75,188,188, 60,213,165, 73,142,167,210,145,189, 2, 80,186,128, 43,182,196, + 87,122,141,113,189, 78,114,153,101,211, 98, 87,180, 46,237,198,125, 28,246,183,189,157,175,148,223,114,236,241,231,181,112,108, + 42, 60,213,199,104, 77,100,165, 33, 72,117,167,136, 14, 37, 84, 32,138,212, 26,110, 8, 38,185,209, 50,137,248, 79, 5, 91, 47, + 48, 87, 33, 21,203,254,160,125, 46,102,254,156,103, 63,121,197, 60,235,183,108,190,100,202,141, 37,107, 65,151, 17, 64,173, 42, +109,228,142, 37, 72, 40, 9,248,146, 15,191,218, 79, 28,152, 88,123,214,165, 80,148,195,128,171, 43,119,118,162, 50,228,146,183, + 43, 6, 66,152, 99,133,105, 68, 58, 82, 91, 35,222,146, 79,217,162,154, 83, 3,170,108,194,187,187, 17,196, 33,217, 78,254, 8, +154, 28,128,180, 30, 42,143, 33, 36, 10, 84,111, 66, 66,210,124, 40,125,218, 28,233, 41,221, 94, 7, 38,180,102,208,164, 34,208, +190, 50, 91,100,201, 97,134, 86,144,234, 74, 85,247, 19, 93,137, 66,129,225, 93,142,192,236,117, 66, 0,197,157, 57, 84, 95,114, + 47,177,173,179, 26, 92, 71, 40,171,179, 50,156,137,112,100,169, 11, 50,227,178, 86, 26, 82,118, 1, 84,109, 73, 32,130, 71, 17, + 90,128,107,177, 68, 73,246,126, 10,165,211, 0,169, 61,155,238,156,140,170, 60, 91, 68,169, 73, 18, 90,142,210,208, 69, 7, 39, + 7, 31, 53, 32, 13,184, 45, 10, 65, 72,246,125,154,158, 77, 27, 92,170,245,220, 74,177,175,151, 70, 27, 76,139,171,235, 10,227, +197, 47, 19,253, 71, 17,243, 27,211,251, 72, 58,169, 30, 44,167, 46,107,155,123,173,220, 39,211, 5, 54, 73, 36,148,202, 18, 37, +188, 65, 39,156,117,220,156, 72, 31, 95, 45,110,227, 86, 31,193,101, 93, 50, 64, 84, 86, 87,150, 79,145, 46, 75, 11, 81,242,252, +233, 1, 42,175, 82, 86, 71,216, 91,223,234,214,188, 32, 4,125,139, 50,115, 46,130, 49,148, 43,231, 20, 92, 81, 8, 90,156, 75, +117, 63,247,105,225,250,211,162,109,100, 35, 45, 81, 72,189,203,133, 56,187,109, 82,249, 47,159,195, 83,238, 4,143,171, 76, 43, + 98,164,233, 10,225, 96,238, 87,113,163,204,145,130, 91, 94,145,101,140,241,139, 50,114, 80,165, 52,218,150, 66, 19,184,218,164, +157,170, 69,126,202,200,228,194, 5,137,213, 26,172, 41,204,110,109, 23, 60,119, 27, 5,238, 30, 31, 42, 99,121, 45,189, 97,165, +168,199,243, 24,230,146,219,174,213,109, 18, 22, 7,194,105, 74, 26, 26,235, 78, 17, 19, 26, 21, 90,202,140, 75, 21, 92, 68,237, +150,112,213,209,217,210,225, 56,235, 9, 82,159, 1, 3,115, 65,189, 82,189,254,192,122,105,126,214, 96,160,144,143,227,208,238, +110,202, 67,112,137, 18,192, 79,225, 40,148,172, 20,171,116,241, 52, 87, 93, 72,195, 84,195, 85,216, 93,139,176, 74,200,109, 81, +241,249,132, 42,228,128, 37, 50,211,180, 80, 10, 4,186, 40, 83,211,116,157,143,142,174, 13, 7,138, 34,180,123,179, 17,120,221, +174,197,112,144,158, 15,220,100, 72, 81,108,242,248, 84,133,142,104, 5, 71,113,241, 2, 61,128,143, 29,124,131,234,156, 93,153, +153, 29,130,115,252, 79,253,190, 10, 35, 73, 41,184,164, 2,208,113,242, 55, 75,100,129,254,240,211, 92, 93,147,254,154, 32, 26, +171, 58,212,132, 88,123,125, 26,115,244,249,153,238, 45,165,159,111, 21, 33, 35,245,104,181,203,114,104,142, 40, 86, 55, 41,153, + 56,124,233,210,232,126, 97, 82, 98, 30, 94, 33,164,168,234,112,135,198,166, 36,200, 39,105, 46,105,136, 99, 71, 87,245, 84,202, +189,202, 64, 38,191, 97,212,188,183,145, 67, 37, 39, 92,110,175,197, 85,237, 79,157,153,113,212,180, 79,137, 42,165,126,205, 88, + 48,102, 79, 25, 56, 68, 34,228, 45,217,177, 24,240,246,249,242,150,165, 45, 94,197,169, 93, 63,234,211, 76, 34,197, 50,237,223, + 88,147, 83,111,245, 23,148,161, 63,186,145, 37, 43, 85,125,139,140,211,168, 63, 97,215,179,117, 96,247,207,237,200, 46,119, 44, +127, 80,248,170,187, 30,122, 68,137,170,105,165,148, 80, 23, 91, 88,234,149, 32,243, 4, 31,113,213, 8,157,186,160, 18,172, 79, + 86,221,152,205, 61, 76, 68,183,122,132,236, 68, 21,223, 50,119,154,108,101,184,229,184,133, 92, 33,203, 44,165,167, 93,110, 53, +121,184,203,138, 72, 82, 75, 96,154,147, 80, 41,183, 51,234,127, 77,221,153,121,203,198,142,253,195,227,136,249,132,185,150,230, + 15, 29, 57,186,233, 49,114, 35,108,123,210,119,167,143, 72,125,229,190, 34,114,123,185,103,155,131,246,250, 4,152,206, 76,190, +101, 17,157,183, 33, 49,184, 31, 56, 71,110, 90, 82,227,174, 17, 80,132,161, 38,170,166,177,176, 61, 29,151,145,108,101,100, 13, + 80, 4,110, 50, 12,195,184, 29, 73,236,239, 68,156,196, 65, 39,130,116,239,159,112, 45,189,205,205,239,153, 6, 56,130,214, 56, +201,106, 13,165,162, 56,148,195,138,210, 98, 50, 56,239, 67,193, 9, 36,123,117,232,153,243,140,236,120,252,188, 7,128, 12, 23, + 55,125,190,100,201, 74, 44, 76,118,110, 56,150,191,237,227,146, 18,125,186,164, 96,199,197, 87, 7, 86, 78,183,108, 43,183, 25, +143,166, 11, 38, 41,149,231,145,241, 43,100,171,244,140,131, 37,133, 14, 51,151, 11,181,193,168,172, 38, 44, 24,233, 97,133, 36, + 37,176,162,226,130,157, 80, 72, 85, 8, 4,141,173,100,244,216,230, 97,198,169, 90, 33, 29,196,203, 71, 37,180, 1,191,138,215, +196,186, 21, 87,169,212,160,184,158, 63,232, 55, 4,200, 92,135,143,226, 89, 37,254, 67,173,173,183, 39,223,111, 77, 66, 43, 10, + 77, 85, 70,109,237,241, 0,211,109,235,170,149,250,119,165,194, 45,178,115,241,147,126, 10,103,169, 1,192, 47, 29,245,239,126, + 47,221, 46,225, 89,101,227, 86,135,172,241,173,246,168,246, 7,155,151, 47,231, 93,124, 70, 74,154,105,229,188,164,165, 74, 95, +150, 82,146, 85,185,166,182,114,108,133,177,137,136, 32, 8,129,169,115,167,122,206,201,200, 22,201,217,150,188, 17, 51,111,127, + 39,141, 64, 28,231,202,117,184,236,183,253,103, 92, 88,109, 35,235,174,179,225, 81,148,192, 28,208, 56,232,165,247,159,191,190, +156,189, 60,100, 83, 59, 91,108,237,251,121,155,182, 9,170,181,100, 87,203,197,210,108, 55, 37, 76, 97, 94, 92,161, 17,184,191, + 11, 40,109,208,164, 37, 70,164,211,112,122,156,174,161,234,156,124, 44,153, 81, 10,119,236,210, 82, 50, 33,200,208,128, 7, 13, +121,173,216,225, 87, 17,168,114,160,230,150, 46,223,231, 56, 29,183,191,189,133,113,243,218,201,243, 21,104,184,218,238, 10, 74, +230, 88,238,236,183,231, 42, 27,203, 78,203,109,109,144,182,151,226,157,149, 67,215,102,171, 41,201,160, 95, 75,237, 37,136, 60, + 98,123, 63,129, 89,185,216,222, 86,163,129, 67, 96, 60,136,206, 55, 25, 70,141,172, 23, 86, 62,144,116, 40,157, 85, 14, 73,163, +211, 78, 43,142,247, 11,187,208,172, 57, 82, 11,184,172, 4, 74,188, 92, 34,160, 84,200, 98,223, 29,114,203, 84,218,188,212,128, +147,238, 39, 87,240, 43,140,172,248,184, 0, 73,246,106,173, 98,212, 39, 48, 10,230, 63, 80, 29,195,202,251,241,220,137,253,204, +206,101,169,219,149,201,101,166, 34,133, 31, 34, 12,118, 84, 67, 17, 99,167,162, 27, 66, 77, 0, 3,222,119, 36,235,202,122,183, + 83,179, 50,211,108,203,147,247, 14, 64,119, 5,209,194, 46, 85,241,216,110,245,218,251, 61, 62,221,138,231, 77,200,184,118,110, +255, 0,102, 17,114,139, 84, 98,149,175,205,142,149, 22, 37,199, 67,138, 74, 82,251, 75, 9, 33, 85, 27,109,236,161, 61, 61,234, + 47,244,235, 12,109,115, 76,180,144, 31,113, 29,224,165,101, 66, 96,131,192,171,122,251, 19,211,246, 95,217,188,171, 60,237, 93, +190,236,155,181,165, 86, 72,226,227,127,121,142,110, 34,224,242,210, 66, 89,134,124,177, 68,183,185, 53,235,182,189, 11, 3, 63, + 19, 62,139,101, 76,102, 54,109,214, 77,252,196,242, 26,114, 89, 89, 56,144,174, 14, 29, 80,179,101, 7,221,115,203,251,233, 88, +169, 30,202,211, 72, 6, 11, 53, 91,125,234,207,187, 87,233,130, 60, 12, 29,236, 78, 62,103,220,159,149,139,112,188, 79,191, 59, + 33,152, 77, 51, 45,148, 72, 12, 68, 98, 43,137, 36,132, 56,144, 92, 89,168, 61, 5, 54, 21, 58,215, 94,171,165, 88, 41,141, 66, +201,176, 50, 50,225,168,118, 0,119,115, 91,152,248, 16,216, 12,181, 37,126,229,150,236, 6,225,135, 90, 59,175,217,214,156,139, +219,236,161,153, 11, 69,170, 83,133,231,109,179,224, 58, 24,155, 24, 56,170,169, 72, 28,146,164, 40,238, 65,213,225,109, 89, 53, +195, 34,160, 68,102,250,118, 17,161, 31,193,103,230,227,138,165,167, 2,180,122,109,183, 38,239,223,187, 62, 53, 51,226,180,221, +226,222, 44, 18,144,122, 45,169,246,185, 12,208,143, 17,201, 64,253, 90,179,210,198,235, 60,179,194, 96,143,120, 42, 24, 71,250, +129,115, 11,248, 99,118,254,224,206, 79,151,196,159, 59,203,219,163, 81,210, 26, 10,250,212, 14,188, 10,252,131, 29,123, 23, 77, + 24,104,138,217,187, 81, 30,211,143, 88, 23, 53, 63,197,207,122, 76,182,185,117, 40, 85, 87, 79,160,128, 53, 44,174,160,108,136, +101, 24,195, 86, 85,175,119,123,125,111,154,228,139,203, 45,114,121,109,242,140,138,126,211,138,226, 1,254,233,174,180, 41,234, + 59, 76, 98,152, 84,238,146,178, 78,206, 58,155,189,178,218,161, 70, 83,228, 45,253,190,242,156,112, 42,154,208,167, 59,112, 62, +212, 51, 83,178,222, 59,112,143, 48,176, 16, 60,144,248, 73, 20,218,134,164,106,183,238,116,119, 68,217,170,185, 46, 6, 29,222, + 15, 36,211,207, 72,251, 70,189,164, 21,220, 58, 95,118,209, 30, 90, 75,106, 77,107,245,234,105,221, 9,185,246,229,155,130, 15, +150,146, 2,182,168, 26,136,179,106, 36,117, 74, 55,124, 6,253,140,201,249,142, 10,242, 1,217, 64, 18, 8,250,181,106,187,196, +184,168, 74,178,165, 91, 35, 42,117, 23, 29,194,220,161,213,165,110, 21,244, 19,166,144,230,144,151,106, 42,214, 61, 38,224,215, + 20,168,161,241,251, 39, 65, 42, 78,203,212, 75, 92,219,115,230, 52,214,234,218,197, 21,226, 8,233,184,241,211,143,135,130,129, + 59,149, 21,234, 63,208,180, 44,173,147,146,118,156,162, 12,178, 84,185, 22, 83,240,196,123,157, 74,212,209, 20,242,150,122, 1, +247, 63,187, 90,235,167,233,125,124,193,161,102,163,183,159,183,181, 99,102,244,221,239, 40,104,123, 23, 14,101,248,214, 73,137, +100, 50,173, 55,200,111, 68,157, 8,165,153, 13, 73, 73, 66,195,138, 10,226,170, 31, 3, 77,136,216,245,241,215,105, 77,145,178, + 59,162, 92, 21,206,217, 19, 2,196, 49, 95,150, 56,243,166, 66,243, 86,176,175, 49,124, 93,173,121, 10,109, 79,179, 86, 68,180, + 67, 26,167,140, 50,210,196, 69, 0,243,124,210, 54,218,160,241,173, 65, 0,236,105,239, 7, 80,220,166,174,254,209,100, 16,241, + 7, 13,202,223, 25, 8,185, 10, 3, 33,180, 32, 40, 36,110, 10, 65, 4, 3, 94,180, 26,171,116,119, 43,248,243,101,214,126,154, + 59,223, 6,239,152,218, 96,220,167, 60,200,149, 41,152,142,185, 29,109, 33,213,121,138,224, 18,165, 55, 74, 39,125,245,207,117, + 42, 76, 32, 72, 11,160,233,214, 9,216, 1, 58, 47,173, 86, 14,254, 99,216,182, 46,204, 11,108,198,196, 8,108, 54,196, 84, 37, +196,148,209, 45,241, 32, 20,166,135,114, 42,117,194, 79, 34, 92,215, 68,125, 59, 27,100, 11,113,251,118,165, 76,191,186,182,108, +206, 2,162,185,228, 59, 29,242, 67,168,114,132, 40, 10,164,141,246,221, 36,142,154,165, 60,137, 30, 28, 87, 77,131,209,133, 61, +189,139,230,247,174, 76, 46,233,216,220,185,140,174,206,226, 21,128,223,222, 66,161, 54,195, 33,148,196, 91, 85,113,108,172, 35, +111,187,203,137,234, 71, 94,149,215, 95,209,114,198, 76, 54,159,152,113, 88, 62,160,233,135, 22,123,192,248, 15,220,126,223,139, + 42,223,181, 29,218,158, 83, 14, 4,213, 31,226, 38,121,234,169,173, 22,167, 80,234,142,254,192,154,125,122,218,182,142,107,148, +243,151, 65,118,163,186,146,237,249, 60, 91,219,114, 9,101,198,158,143, 41,165, 29,212, 30,142, 92, 7,221, 78, 21,250,117,153, +125, 0,197,187,255, 0, 52, 72, 95,171,170,135,186, 93,218,125,235,253,206,198,251,223,195,177,119,102, 83,107, 42, 53,109,197, +165,229,184,164, 87,160, 82, 86, 80, 64,240,160,240,214,182, 37, 13, 16,123,149, 11,174,212,133,239,179,217,244,203, 52,235, 85, +226, 10,248,182,133,173,185, 59,254,203, 47, 58,223, 33,254,192, 63,111,187, 70,190,177, 39, 5, 6, 19, 96,175,123, 15,120, 23, +124,193, 89,122, 83,188,190, 98, 20,178,233, 87,253,227, 16,193, 7,233, 5,103, 89, 39, 31,108,253,191,154,179,230,184, 92,241, +221,204,245, 45,222, 98, 54,240,248, 98,176,203, 85,222,171,109, 78, 7,192,167,247,137,214,214, 53, 47, 19,226,179,111,177,136, + 85, 46, 91,148, 63, 62, 65,184, 69,116,121, 1,231, 18, 7,180, 34,160,127, 72,214,148, 52, 12,168,207, 82,129,101,121, 19,144, +113,200,119, 20, 44,135,131,166, 50,169,212,169,105, 38,191,104,175,215,166, 5,138,137, 9,123, 19,205,237, 48,175,197,171,227, +139, 84, 93,199, 6, 9, 11, 83,202, 85, 82, 43, 77,146,161,212,143,187, 93, 14,251, 8,210, 60, 85,252, 44, 77,229,229,193,116, +150, 51,222,172, 82,219,137,196,194, 49, 11, 67, 86,235,123, 42,112,186,220,100,130, 30, 90,220, 60, 20,235,148,243, 29, 80, 4, + 10,175,169, 72,218,189,105,195, 12,153, 25, 18,175, 91,113,136,218, 2, 86, 93,148,156,133,216,210,217, 74,172, 50,211,197, 49, +228, 36,173, 36, 3, 93,130,106,160, 5, 73,175,244,215, 90,245, 75,104,112,177,173,153, 39, 84,187,220,236, 38,203,140, 74, 83, +207, 50,201,181,188,180, 54, 27,108, 23,252,162,180,113, 80,109,101, 45,184, 0,167,237, 38,163,219, 93,106, 81,145,185, 87,153, +101, 93,199,237,229,182, 69,248, 67,156,231,148, 21,196, 70,117,142, 43, 91,110, 18, 20,148, 87,110, 66,155, 26,244,247,234,193, +105, 40, 5,125,122,121,194,110,243,167, 53,112,132,219,107,156, 36, 46, 19,133,191,133,178,150, 18, 27,228,146, 61,164, 80,143, +125,117, 32,166, 29, 48,250,142,185,174,235,220, 28, 95, 19,165, 91,114, 49,146,163,200,138, 58,218,128, 74,183,235, 81, 84,154, +251,107,225,175,150, 61,127, 95,149,159,151, 31,239, 72, 55,137, 17, 47,237, 67,118,159,130,147,140,223,218, 82, 37, 44, 80, 54, + 84,148,164,251,147, 83,182,188,226,218, 14,208, 18, 22,166,254,239,228,200,178, 98, 56,197,173, 6,143, 37,145, 49,225, 90, 16, + 93, 81,115,127,209,167,170,163,230, 1,220,164, 39,240,186, 0, 47,206, 69,237,213,174, 27, 74,163,242, 30,126, 82,141,105,179, +170,220,159,171, 87,235,168, 57, 80, 54, 49,101,227, 8,112,219,224,221,174,107,216, 50, 92, 45,215,193, 42, 80, 21,250,244,140, + 62, 36,192,238, 9, 74,229, 53, 55,219,155,204, 55,251,128,162,252,138,123, 43, 90,125,122,156,131,106,137, 29, 2,247,104,103, +249,222, 89, 10,221, 44,129,111,105,192,236,195,224, 27, 64,230, 71,216, 41,160,119,169, 14, 43,186,125,104,188,183,253, 67,223, +228,126,194,154,179,184,145,237, 83,150, 72,174,126,181,107,217, 58,128,254,177,239, 3,240, 11, 3, 51,252,217,125,185, 37, 76, + 27, 13,189, 79, 67,217, 19, 12, 45,120,221,188,183, 26,108,180,138,161,167, 95, 74,150,132,174,157, 57,132, 40, 38,189,104,117, + 74, 80, 59, 12,155, 69, 85,139, 58,147,125,187, 77,182,184,155,157,177,247, 35, 56,210,168,211,172, 45, 77,173, 42, 72,169,162, +144, 65, 27,106, 0,152,151, 26, 20,129,100, 45,156,223, 40,189, 72,126,227,124,185, 74,156,233, 96,180,223,206,200,117,254, 7, +221,230, 40,211,234,213,137, 89, 41,233, 34, 74,121, 18,120,173,150,102, 46, 45, 99,162,239,229, 56,109, 92,252,151, 36,240, 87, +148, 30,113, 37,105, 65, 95, 78, 68, 36,144, 43, 93,181, 94, 96,152,187,112, 44,152, 5,190,198,130, 29, 43,115,104,142, 40, 16, + 61,195,174,154, 96, 16,132, 35,241, 58, 51,115,141,217, 78,217,246,148,250,131,239, 95,243, 75,165,142, 69,221,252,106,217,142, + 99,233,101,130,252,150, 99, 38,103,241, 83, 31, 81,242,154, 40, 87,236, 32,171,217,169, 93,147, 78, 21, 34,235,132,165,186, 76, + 0,237,103,212,242, 11, 79, 31, 22, 54, 71,113,224, 21,117,117,252,206,108,214, 27,188,104,253,174,236,230, 31,110,183,189, 68, +135, 50, 6,102, 95,229,182,145,236,126, 67,140,138,211,199,134,177,163,235, 25, 23,242,232,132, 71,123,200,251,244, 90, 35, 30, +184,240,136, 77, 93,142,245,121,223,206,255, 0,122,128,135,219, 91,109,143, 3,199,113, 70,173, 87, 12,150,249,127, 86, 25, 30, +111,242,248, 22,216,198, 67,174,249, 65,212,169, 64,168,161, 0,114, 27,168,106,223,167,189, 67,151,212,136,131, 87, 29, 9, 39, +102,128, 14,231, 80,156, 33, 25, 31,132, 48, 29,138,242,133,234,139, 4,181,199,118, 52,108,227, 32,117, 72,253,226,176,188, 99, + 22,199, 25, 88,175, 68,185, 33, 50,100,164,125, 6,186,233,103,108,153,141,243,255, 0,193, 24, 71,241, 4,170,135, 62,184,240, + 7,216, 0, 85, 31,115,113, 79, 68, 89,163, 87, 89,249, 76, 12,217, 51,167, 62,171,140,235,132, 75,189,165,217, 46, 62,242,252, +215, 29, 34, 76, 82,146, 84,163, 85, 87, 92,253,158,156,233,214,218,102,124,221,197,201, 59,135, 63, 98,111,245, 56,240, 98,188, +224,119,207, 75,221,171,236, 78, 95,218,174,204, 77,201,231, 92, 50,105,214,171,154, 27,203,152,181,134,226,185, 1, 74, 74,203, +110, 91,220,220,173,181,208,213, 30, 3, 90,152,216, 56,248, 52, 78,186,204,142,242, 14,173,163,120, 33,228,230,194,202,200, 14, +151,228, 93, 25, 98,120,113, 71,224, 67, 4,111,238, 77,117, 82, 80, 89,145, 58, 47,206,203,247,122,239,218,142,227,218,251,147, +104, 74, 93,147, 21,213,173,113,220, 52, 67,204, 44, 22,157,105, 93,118, 91,106, 41,173, 54,174,174,209, 97,166, 98, 67,146,177, + 77,134, 18, 4,114, 94, 59,137,232,169,158,231, 95, 30,205,125, 43,223,237, 83,240,139,140,165, 92,134, 49,123,184, 69,180,221, +236,229,127, 26,162,169, 19,150,134,221,105, 4,241, 67,136, 89,168,235,210,167,148,234, 30,143,149,182, 25,226,152,152, 31,229, + 37,140,123,181,226, 7, 34,235,160,175, 42, 19, 14,234,207,193,187,127,219,175, 78,141, 68,203,251,173, 34,209,151,119,125, 48, +159,137,105,197,227, 41,187,165,166, 17,120, 81,201, 55, 7,147,248, 78, 41, 40,170, 82,210, 9,220,214,189, 10, 99,210, 61, 53, + 14,159, 57, 93,147,178,201,240,140, 62,104,135,231, 46, 68,183, 47,176, 29,249,177,128,104,151, 40,142, 91,234, 19,183,247,142, +203,221,240,251, 22, 31, 19, 27,190, 94,157,133, 37,249, 22, 21, 45, 16, 92,249, 7, 84,180,164,198,113, 68, 53, 64,181, 83,129, + 53,232, 70,186,154,206, 61,117, 78, 53,212, 32,102,207,183,129,110,238, 92, 79, 5,159,118, 97,178, 27, 72, 84, 93,150, 98, 20, +234,156,116,213, 11,228,165,127, 70,129,104, 84, 66, 51,249,151,221,221,183,247,206, 68,164, 26, 33,203, 77,137, 41,250, 21,104, +140,173,190,205,113,190,180,139,245, 25,127,195, 31,249, 66,233,227, 47,128,120, 38, 47, 79,247,135, 30,244, 51,100,184, 74, 36, +249, 25,109,250, 18, 9,240, 14, 64,134,225, 27,255, 0,106,186,232,122, 4, 63,252,104, 29,150, 75,240, 11, 47,170, 73,196, 83, +247,165,230,131,190,163, 48,247,218, 20, 73,152,167,200, 62, 8,242, 86,218,126,210,117,173,210,166,249,113,241, 85,113,116,156, +124, 85, 63,150, 98,137, 70,117,124,156,249, 2,136, 22,230, 0, 27, 5, 58, 82,179, 79,180,235,231,188,191,148,142,101,116,224, +162,253,205, 49, 19,145, 66,152,210, 2, 45, 22, 56, 72,106, 50, 70,220,156,224, 83,250,183,208,161, 91, 17,216,156, 21, 82, 32, + 70,187, 72,181,166, 74, 69, 29,144,183, 0, 62, 40, 10, 36,125, 85,211,204,203,121, 61,131,248, 34,196,124, 46, 84, 5, 69,110, +243,147, 77,153,196, 24,208, 92, 15,171,109,130, 35,165, 71,127,175, 90,120, 78, 3,118,160,146,197, 6,249, 62, 56,159,243,178, +159,226, 22,239,204, 1, 79,217, 64,223,244,168,105,183,107,237, 70,219,162,210,213,198, 76,111,133,192,125,202, 4,235,222,215, +103, 40,130,189, 70,190, 8,242,131,206,138,182, 79,197, 77, 76, 20, 57,197, 60,225, 50, 45, 55, 7,146, 93, 0,182,122, 19,181, +126,157, 6,209,162, 45, 51,218, 85,158,174,216, 98,153, 61,167,136,109, 10, 81, 79,179, 89,147,186,112, 43, 82, 2, 51, 10,157, +207,251, 10,238, 51, 57, 83,108,131,148,112, 74,203, 43,220,127,178,122,141,104, 81,155,187,138,171,118, 59,112, 65,237,177, 26, + 7,138,218, 33, 73,251,220,190,242,126,143,110,173, 25,186,169,181,184,169, 87, 27, 75, 18, 69, 20, 7,149, 79,190,158,163,236, +211,137, 40,237, 8, 47,155, 50, 10,212,211,136, 46, 50, 13, 2,210, 55,167,188,105, 55, 52,198, 42,185,239,239,167,110,218,119, +231, 29,118, 53,226, 58, 90,190,165, 11,242, 37, 52, 2, 30,108,169, 5, 53, 74,169,191, 90,208,212, 87,195, 90, 24, 29, 82,220, + 66,241, 58, 30, 71,129,254,213, 87, 35, 18, 23,134,144,246,243, 92, 37,221,223, 78, 25,167, 98,239, 74,118,238, 21, 38,202,242, +138, 19, 45,180,168, 52,239, 30,133, 85, 39,138,233,185, 4,239,224, 72, 7, 94,133,129,212,171,202,143,194, 88,243, 31,110, 43, +151,202,195,157, 7, 94, 29,168, 86, 61,149, 54,194,145, 22, 69, 20,132,154, 37, 96,169, 42,219,219,199,199,219,177,213,210, 85, + 80, 89, 89,248,205,225,248,240,147,113,134,148, 60,201,253,180, 16,161, 83,181, 10,122, 3,245, 3,168, 29, 17, 99, 37, 41,174, +238, 93,241,124,142, 45,226,219,206, 37,205,165,130,135, 16,148,182,107, 95,105,241, 30,243,170, 89, 53,137, 68,133,167,133,121, +132,193,236, 43,179, 59, 47,235, 90,118, 73,132,177, 29,233, 74, 91,170, 64, 9,117,213,158, 92,147,214,160,239,183, 77,113,121, + 61, 52, 9, 21,233,248,157, 68, 89, 16, 85,249,218, 30,246,183,123,136, 45,207,200, 31, 54,165, 4,148, 2, 9,228,122,116,219, +166,176,242,240,246,133,208, 99,230, 3,170,129,221, 75,189,131,212,149,182,251,216,153, 74,109, 51,225, 71,114, 67,114, 85, 74, + 53, 37,176,162,205, 85,227,241, 1, 93, 71, 7,118, 53,177,179,147,162,231,152,229, 99, 74, 0, 57, 63,143, 34,184,187, 19,131, +113,133,116, 97,137, 73, 45, 63, 1, 10,243, 80,126,242, 93, 46, 20,172, 26,120,133, 10,107,210,228, 1,136, 35,154,241, 91, 30, + 50, 32,232, 85,181,141,203,184, 65,156,196,182, 84,124,132, 37,194,231, 93,146,168,197, 0,253, 90,161, 42,193, 26,166,220, 80, + 28,187,181,119, 75,245,237,204,134, 85,105, 37, 97,231, 19, 79,219, 65,165,127, 70,174,213,112,132, 64, 64,157,102, 69,212,155, + 94, 57, 55, 29,183,185, 9,196,148,184, 10,232,105, 74, 23,208,231,255, 0,105, 90,132,236,220, 83,109, 32, 34,118, 76,142,243, + 27, 15,143, 96,109, 42, 75,173, 51, 45, 10, 82,171, 94, 50,184, 32,125, 96, 38,154,140,224, 55, 19,246,226,150,226,147,251,133, + 14,227,120,187, 57, 36, 54, 74, 24,226,128,104,119, 67,116, 41, 63,104,213,170,102, 34, 21, 75, 34, 74,172, 46,214,123,163, 81, + 67, 41, 73, 73, 87,152, 57, 17,176, 80,116,172,126,189, 92,222, 10, 15,150, 82,127,116,110,146, 98, 97,178, 3,202,225, 49,181, +180,235, 35,218,243,106,224,138, 15, 29,149,184,212, 37, 38,213, 18,186, 12,228, 34,150,240, 12,102, 82, 75,119,155,138,150,252, +233, 69, 43, 95, 37, 16, 7, 33,208, 83,192,109, 77, 84,149,142, 87, 83, 78, 56,128,101,117, 98,205,173,134,153, 72, 36,190, 40, +180,121,135,126, 67,196,215,111,209,165,251,150, 66, 56,130, 68,186,182, 32,193,178,220,123, 93,123,184,222,164,134,154,180, 70, +143, 46, 50,129, 13,148,121,151, 8,209, 28,162,148,170, 84,135,126,186,104,184,121, 15, 34, 22,103, 83,195,217, 7, 85, 53,237, +200, 57, 23,150,235, 18, 80,107,178,148,219,203, 82,148, 0,168, 35,137,161, 27,248,141,134,182, 33, 32,185,151, 40,198, 15,219, +216,183,251,204, 86, 60,146, 32, 50,124,197,238, 82,183,156, 82, 58, 14,148,160, 31,210,119,213,168, 88,200,128, 58,185,187,117, +149,219,172, 86,168, 24, 6, 28,216, 69,214, 20,199,166,206,144,178, 74,156,121,213, 49,230, 33, 30,208, 2, 64,160,235, 74,141, + 91, 5, 25,212, 14,249, 89,203,119, 75,119,112,214,162, 84,212, 87,173,143,131,241,112,144,151, 60,218,130, 42, 40,176,121, 87, + 94, 1,245,115,165,145,124, 47,143, 9,176, 62, 35, 71,247, 0,161,111,106, 90,196,238, 14, 79,121,168,140,159,223, 40, 39,233, + 42, 35,145,251,117,229,102,151, 37,101,206,198, 83,251,243,152, 57,113,201, 28,136,209,248, 80, 89,183, 70, 64,240,109,150,194, + 84, 71,215,160,209, 91,205,251,149,160,126, 21, 51, 35,113,225,252,154,198,131,198, 59,104,105,201, 10,246, 0, 57, 4,253,103, + 86,170,172,110,240, 77, 45, 75,173,153,109,239,252,187,136, 4, 54,120,189, 61,110, 45,193,226, 25, 97, 60,135,218,173, 6,208, +243, 86,171, 12, 16, 78,218, 68,121,220, 85,119,137, 67,248,185,239,161, 8,175, 94, 59,154,126,141, 15, 46, 76, 89, 78, 1,202, + 39,112,103,252,183,140,185, 41,161,255, 0,198,174, 69,107, 30,212,160,175,203, 79, 79,112,208, 35,241,104,148,151,114,122,194, + 9,255, 0,199,187,142,219, 34, 21,141,106, 39,197, 70,195, 16,126,161,175,101,234, 31,230,251, 35,255, 0, 40, 88, 89,163,250, +135,237,201, 57,250, 59,202,110, 88,182, 23,220, 86,237,176, 98,221,110, 14,217, 13,229, 54,139,154, 74,227,205, 77,169,207, 53, +214, 10, 65,169, 82,153,113, 97, 52,232,119,161,166,155, 27, 38,116,213,118,192, 36, 68, 55, 49,224,118,241, 30,208,236,167,211, +216,200,131,192,133, 95,100,185,255, 0,163, 44,254, 12, 59,175,249,170,119,110,101,207, 91,138, 69,154,247,108,151,120,136,151, + 74,190, 52,177, 50,217,205,206, 3,162, 75,173,131, 78,186,195,198,235,253, 59, 36,110, 50,149, 71,176,131, 33,236, 35,151,136, + 86, 44,233,129,254, 18,200, 51, 25, 47,162, 28, 22,227, 30, 53,235, 62,184,230, 83,214,225,109, 54,108, 82,203, 42, 8,113, 73, + 79, 42, 57, 54,241,229, 37, 40,254,183, 4, 40,211,166,250,177, 46,179,211,235,212, 88,108, 61,145,137, 31,124,153, 48,233,173, +243, 20,253,219, 78,252,219,253, 88, 99,119,255, 0, 79,150,107, 28, 60, 98,200,212, 72,217, 95,111,172,112, 63, 17,106, 54,183, +157, 76,228, 58,250,199,152,252,151,226,184, 87, 83, 79,185,211,169, 49,233, 62,162,255, 0, 84,157,148,109, 16, 12,240, 3,185, +223, 94,100,131,247, 35,228,227, 15, 45,162, 56,106,171,169, 82, 85,252,192,195,134, 40,195, 53, 97, 20,240, 82,142,228,232,187, + 86, 26, 38,135,112, 46,231,118,250,255, 0,233,127,185, 87, 4,217,172, 55,195, 18,241,143,100, 79,161, 78, 71,180,223, 97, 5, +182,211,143,165, 27,134, 95,105,106,105,197, 10,148,131, 95,105, 6,183, 18, 25,152,242,162,101,156,131, 19,217, 33,249, 17,161, + 87, 48,239, 16,120,158, 5, 83,243, 63, 43,143, 87,232, 66,127,150,216, 34, 92,173,128,186,227,121, 4, 27,205,161, 86,146,216, + 9, 66, 93,249,149,200, 72, 8,161, 42,248,128, 85, 60, 43,182,185, 63,255, 0, 82,207,140,140, 68, 28,118,131, 22,247,186,214, +172,141,174, 72, 87, 44,124, 27, 8,244,213,218,107,166, 9,134, 93, 35,228, 93,229,202, 24,137,109,203,242, 27, 81, 43,183,193, +129, 17, 65,223,229,144, 31, 80, 10,119,205,120, 5, 60,224,162, 84, 18, 19, 67,225,209,244, 62,153, 14,149,142,107,220, 39,108, +190, 98, 56, 0,252, 1,231,222, 86,126,126, 76,100,241,143, 62, 41, 71, 0,199, 37, 95, 93,110,205, 13, 77,183, 58,124,134,160, +176,228,165,134,153, 74,222,113, 45,165, 78, 45, 91, 37, 32,157,201,233,173, 6, 51,144, 3,154,202,140, 31, 68,213,222, 30,234, +122,111,244,179,145, 92,123, 91,117,196, 38,119, 39,186,214,254, 81,111, 50, 46,178,228, 89,108,209,228,160, 81, 77,197,105,148, + 25, 15, 36, 31,135,154,248,165, 95,121, 59, 17,172,222,163,234, 28,110,159,105,168, 86,108,156, 75, 18, 78,208, 15,112,226,126, +204,181,171,233,208,128,248,131,159,185,104,186,100, 29,182,205, 61, 47,225,253,214, 95,109,162,246,243,187, 89,117,217,247,173, + 54,232, 55, 27,140,191, 59, 27,138,217, 96, 76,113,185,138, 1, 30,124,149, 81,186,163,226, 66,121, 37, 84, 58,222,174,248,228, + 99, 70,211, 1, 3, 35,166,167,135,106,169,159, 77,112,136, 17, 12, 79,224,154,125, 49,219,187,120,221,203, 59,205,251,189, 9, +115,187,127,142,227,179,221,184, 69,142,148,169,229,124,195,205, 70, 30, 87, 50, 0, 88, 73, 81, 65,168,162,168,106, 52, 44,123, +107,162, 22, 91,104,120, 66, 36,148, 62,157, 72,178,100, 30, 12,144,251,191,217, 9,221,184,180,195,203, 49, 25, 73,191,246,126, +234,210, 95,199,242,168, 73, 38, 52,166, 92, 95, 32,135,124, 90,125, 35,101,182,186, 16, 65,208,140, 98, 98, 44,132,132,171,151, + 9, 14, 7,248, 30,208,149,248,210,168,235,195,181, 65,177,216,159,110,201, 46, 98,232, 86,150,135,148,159,114,254, 18,127, 78, +170,190,168, 44,133,247, 10,244,187, 61,238, 61,161,147, 69,176,203, 77,159,164,167,146,191, 94,154,138, 92, 19,222,152,201,147, + 19,248,142, 84,174,202,183,159,185, 9,212, 98,233,154,155,127,207,173, 60, 90, 91,174, 54,165, 4, 36,154,114, 32, 36,214,149, +167,142,140, 41,147,110,111,135,243, 83,218, 89,219, 68,185,142, 33,155,133,196, 69,111,104,201,221,103,216,132, 10,157, 70,193, +170, 28,120, 41, 95,154, 3,168,115, 56,196, 46,234, 59,222,241,204,118,229,203,218,132, 91, 67,106, 63,245,155,166,184,239, 86, +197,250,128,151,247,171,135,240, 93, 28, 37,240, 71,192, 39,156, 54,212, 49,207,203,247, 23, 75, 0,164, 59,148, 92,230, 57, 94, +165, 79, 66,142, 43,246,157,116, 93, 5,191, 96,223,250,146,255, 0,150, 43, 59,169,134,140,124, 85,145,233,117, 8,139,223, 44, + 77,247,118, 91,139,138,218, 62,176, 73,213,142,139,255, 0,186,135,138, 6, 57,254,164,124, 85,115,221, 67, 14,207,150,189,110, +114,159,204, 66, 25,157, 32,127, 85,194,209, 0,125,130,186,241, 9,227,153, 88,123, 1, 43,163, 50, 96,171,206,230,230, 95, 63, + 13, 94, 73,163,101,177, 25, 38,187, 41,100, 4,147,245,104,118, 84, 31, 69, 16, 85,105, 47, 40,110, 62, 79,243, 44, 31,224,109, +233, 75, 13, 1,208,168, 10,157, 63,149,161, 86, 4,159, 68,193,135, 52,204,126,216,101,217,116,165, 14,111, 71, 49,153,175, 64, +165,186, 9,250,205,105,171, 20,196,196,132,172, 96, 16, 85,181, 39,249, 11, 86,224, 54, 22,247,102, 17, 77,128, 47,161, 32,254, +189, 75,202,209,251,212,124,213,174, 92, 20, 54,233,216, 20,248, 15,118,189,219,106,237, 55,149, 5,235,104, 65, 42,111,167,176, +233,153, 62,231, 94,109,119,217, 22, 7, 2,155, 36,178, 13, 72, 59,145,169,141, 83,152,171, 35, 7,239, 87,203, 0,219,142, 84, + 29,168, 78,129,118, 48,146, 37, 55,152,113, 76,247,140,246,223,122,136,124,202, 18,161,215,111,101, 53, 76, 99, 16, 85,207,220, + 9, 5, 90,100,228, 49, 55,230,225, 40, 32,215,127, 16,126,157, 92,172, 16, 21,121,144, 86,168, 55, 20, 73,248,217, 1, 47,138, + 5,180,118, 10,250, 43,162, 4, 50,188,207, 76,119, 17,243, 81,255, 0,122, 42, 20,133,117,247,234,109,205, 11, 84,181,115, 75, +115,219, 81, 67, 69, 18,147,247, 74, 77, 14,147,178,148, 98, 66, 91,201,113, 27, 62,115,105,127, 27,203, 34, 55, 42, 11,232, 45, + 56,212,132,213, 43, 7,223,238,246,245, 26,177, 69,210,166, 66, 81, 58,133, 27, 33, 27, 1, 18,224,184, 99,213, 95,166, 92,131, +211,229,193,204,158,200, 29,155,219, 87,148, 18,203,235, 73,113,112,157,240,106, 65, 3,238,158,137, 95, 67,208,239,215,186,233, +157, 98, 57, 49,105, 48,144,251,215, 43,157,211,205, 37,199,202,170,236,111,189, 87,107, 1, 13, 64,243, 71,154,120, 56,208, 37, + 65, 73,167,184,252, 67,254,148,214,176,177,249, 44,240,153, 87,159, 92,174,110,152,238, 36, 52,253, 0, 83,114, 56,173, 59, 80, +109,200, 87,169,167,133, 58,248,106, 38, 38, 72,245,219,181, 60,246,131, 34,153, 98,188, 70,141,113, 82,147, 10, 71,152,242, 66, + 20,126, 15, 45, 65, 38,128,157,133,117,153,155, 88,229,197,116,157, 47, 52,237, 33,248, 43, 55, 9,239,222, 99,100,238,218,172, +214,183, 86,213,173, 70,140, 61,204,146,167,128, 11, 88, 34,187, 80, 45, 7,235,214, 46, 70, 56, 49,220,120, 46,175, 7, 59,121, + 49, 39,144, 86, 6, 9,221,252,195,182, 94,171, 19, 18,254,231, 59,110, 73, 13, 18,136,169, 82,185,181, 78, 73, 39,161,228, 20, + 8,250, 14,178,175,197, 18, 27,187, 22,230, 31, 86,140, 9,131,242, 77,217, 43, 17, 46,185,197,202,247,111,108,181, 26,115,190, +111,150,161, 66,159, 52, 37,222,158,245, 18,117,211,224,218,124,160,235,207,250,236,132,178, 12,135,243,107,248,171, 3, 0,179, +181, 58, 19, 74,112, 5, 58,235, 97, 2,189, 1, 82,212, 55,250,180,214,217,180, 58,204,142,170,196,103, 28,129, 49,216,236,166, +134, 51,213,160,247,151, 21, 95,233,213, 99,105,111, 4, 81, 16,163,100,120, 52, 5, 94,218,142,234, 64,106, 66, 34,241, 52,232, +174,105, 0,159,169, 90,156, 44, 58,148,165, 0,134, 47, 2,130,148, 73,243,155, 9, 12,169,167, 0,166,252, 28, 79, 26, 87,233, + 26, 49,177,208,246, 58,146,215,102,163, 74, 91,241,214,143,137,105, 66,107, 79, 2,221, 18,126,209, 93, 4,228,178,148,105,114, +171,236,167,177,117,177,186,225,111,248,182, 74,130,144, 5, 57, 56,194,202,105,244,150,247,250,117, 98,188,150, 60, 82,253,184, +101, 75,230,189,142,114,239,109, 94, 93,119,143,207, 14,182,212,133,125,208,236,158, 28,119, 62, 33, 27,253,127, 70,161,118,120, +223,177,215, 73,210,250, 25,149, 30,113,209,206,158, 1, 86,157,158,141, 27,184, 87,121,230, 35,129,184,118,194,227,104, 42, 20, + 74,139,100,138, 15,111, 74,106, 2,254,212,246,215,183,146,177,236,144, 30, 97, 94, 90, 10, 92,113, 39,204, 42, 38,164, 3, 65, +211,174,138, 36, 25,213, 98, 20, 47, 83,217,212, 28, 35,182,246,252, 66, 69,192,195,185,223,165,178,169, 17,219,221, 78,219,226, +165,110,184, 93, 10, 60,120,121,193,162, 57,109, 84,215,168,213,206,154, 53, 50,228,177,122,245,160, 64, 67,153, 46,171,188, 71, + 40,141,120,154,220, 12, 97,213, 45,132, 20,243, 75, 68, 18, 58,117, 52, 3, 97, 77,169,236, 30,221,109, 65,202,229,140, 29, 91, +214,254,233,218,123, 95, 99, 13, 52, 10,178,185,161,216,240, 2,190, 63, 41, 33,178,183,164, 45,103,199,116,165, 63, 73, 35,166, +174, 82, 20,192,100, 71, 11,184,187,107,191, 67,186, 91, 92,160, 42,101,228, 44,255, 0, 94,156, 8, 63, 78,227,235,213,244,234, +219,238,211,141, 95,251, 80,251,232, 73, 15,185, 38, 56,113, 0, 1, 64,162,160, 77, 7, 77,233,245,235,204,254,166,211,187, 18, + 50,228, 8,252, 84,173, 15, 20,169,216,220, 62, 85,223, 35, 66, 82, 63,133,133, 29,201,143, 44,141,129, 74,171, 67,245,111,175, +159,108,183, 66,178, 77, 14, 82, 61,250,224,188,139,190, 13,193, 93,126, 88, 56,183, 82,141,246,105, 39,149, 79,247,186,234, 88, +245,109,175,113, 86,246,232,201,238,240,242,174,121,188, 59, 51, 91, 70,143, 24,220,165, 19,213, 74, 85, 66, 19,244, 36, 13, 66, +169,128,242,237, 40,219, 24, 33, 57,103,157,145,205,169, 85, 33,169, 34, 44,111,103, 16, 65, 90,135,211,160,217, 38, 42, 99,130, +105,195, 26,137, 38,208,169,108, 10, 89,173, 69,180, 51,227,205, 73,109,124,143,214,163,170,185, 58,158,242,201, 13, 20, 41, 50, + 25,189, 52,215,204,125,240,121,212,248, 32, 26, 39, 67, 14, 2, 32, 26,133,213,151,143,204,126,229,145,101,118, 24,242,187, 97, +136, 92, 50,107,179, 81,211, 46,101,226, 44,249,142, 22, 99,182,136,172,169, 73,249,132, 38,190, 75, 99,195, 93,193,245,189,164, + 63,147, 89, 35, 71, 32,158,238,212, 9,227,194, 69,200,212,167, 76, 51,243, 13,202,109,113,175,119, 91, 38, 3,132, 91,174,150, +216,174,144,236, 27, 52,150, 9, 14,159, 40,161, 69, 18,194,136, 80, 52, 32, 17, 93, 84,151,175,242,107,151,195, 77, 58,233,242, +159,212,156, 81, 8,157, 0,117,200,221,202,138,236,171,133,158,219, 29, 52, 17,120, 21, 37, 53, 33, 30,107,157, 7, 34, 79, 74, + 13,206,184,218,101,197, 30, 92,150,155,182, 44,244, 11,235,210, 26, 20,122, 37,185,247, 80,186,127,237, 19, 93, 75, 40,250,194, + 57,104,194,225, 8, 30,210, 82,144,114,172, 14,217,103, 23, 94,211,247, 69, 25,102, 38,176,205,255, 0, 26,182,176,245,173,213, + 10,132, 73,170, 64,228, 58, 16,170, 16,161,226, 42, 52, 44, 12,171, 40,178, 54,192,177,140,156, 21, 61,174, 89,116,236,155, 30, + 57,234, 98, 58,251,135,217,166,153,143,220,247, 91, 76,252,183, 5,101,127,196, 51, 33,230,194,220,151,110, 74,183,121,133,169, + 85, 41, 77, 84,130,105, 74, 17,175, 89,233,221, 70,174,175, 31, 50,173, 44,254,104,115,241,143,104, 62,240,177,115,112, 76, 73, + 49,212, 42,138,245,142,173,155,200,143,112,109, 77, 73, 67,190, 75,205,188,146,133,165, 12,142, 42, 5, 42,161, 4,157,180, 98, + 72, 37,249, 44,195, 21,145,108, 75,187,178,136,233, 79,198,165,158, 13,141,201,252, 64,160, 0, 30,225,169,137,178,134,213,111, +118,235,210,254, 87,120,199,227,187,156,200,141,137, 91,238, 82, 18,213,161,204,133, 95, 46,237,194, 75,160, 33,150, 99,176,170, + 56, 66,214, 82, 57, 16, 0, 6,187,244, 51, 24,123, 27,204,144,175,118,145,220, 88,146,120, 0, 21,218,240,231,102,188, 21,123, +148, 97,119, 28, 70,249,113,196,174, 76, 42, 45,194, 51,203,101,198, 28, 20, 83,101, 3,146,171,170,211, 50,129,219, 45, 8,226, +170, 24,237,112,156,174,125,209,194,115, 6,172,249, 7,121,112, 27, 62, 97,157,218, 81, 30, 20, 27,253,197,115, 25,125,212, 51, + 79, 40, 79,110, 51,137,110, 87, 0, 0,252, 80,106, 58,248,213,239,158, 61,228, 78,234, 99, 57,199,129, 46, 29,187, 91, 73,123, + 85,216,103, 74, 33,184,170,247, 44,190,101,253,216,238,196,236,227, 53,116, 59,112,243, 26,102, 35, 45, 32, 55, 30, 44, 72,167, +203,101,134, 26, 79,194,134,210, 54, 0,123,201,169, 36,232,246,102,202,211,175,246,120, 5, 78,217, 27, 9, 37, 58,246,251, 37, +137,219,107,141,233,188,146,218,155,190, 9,149, 91,213,106,191,218,212,226,216, 91,145,158,162,137,101,212, 84,161,196,168, 85, + 38,135,250, 64,225,124, 12,103, 9,141,208,144,218, 71,113,236,239, 82,197,176,211, 39,237, 76, 23, 75, 35, 30,148, 59,117,101, +202,187, 11,113,184,221,109, 25,231,203,193,111,182,249,189,181,139,139, 51, 35, 25, 62, 90, 31,121,152,142, 0,162,162,160,134, +202, 27, 74,150,157,235, 65, 77,115, 89, 66, 93, 2,202,206, 45,178,151,157,255, 0, 74, 81, 5,199,110,135,183, 64,192, 19,174, +186, 46,138,178, 45,131,145,167,122,253,206,114,110,213, 97,150,245, 61,220,254,212, 95,241,150,158, 82, 24,243, 44,151, 1,242, + 47, 73, 74, 11,190, 83,127,204, 24, 95,150,173,191,118, 86, 72, 30,237,105,203,212, 17,174,189,249, 24,179,175, 94, 71, 71,246, +141, 60, 21, 27,176,107, 7,159,177, 84,153,239,119, 6, 13,124,137,157,224,254,153,111,183,139, 92,134,163, 93, 63,206, 61,192, +151, 62,117,158, 36,103,210,151, 16,251,208,109,145,153,101,109, 20,169, 52, 91,142,240,223,223,173, 9,117,131, 85, 6,202,241, +164,204,239, 39, 33,143, 61, 7, 15,106, 81,193,132, 75,179,248,171,143,255, 0, 23,114,222,244,118, 1,120,215,168,124, 91, 45, +147, 1,233,236, 94,172,143,118,246,195, 8,192,102, 28,104,174, 70, 12,176,137, 15, 50,128,216, 82,213,191,196,118,221, 90, 31, + 77,235, 55,228, 82,101,147, 93,146, 18,144, 49,217, 16,192, 51,104,228,126,126, 40,215,208, 44,142,222, 1, 87,152, 53,223,209, +188, 78,218, 30,235, 70,129,220, 97,130, 77,121, 86,152,151, 73,214,203, 11, 77, 72,144, 13, 86,134, 92, 68,165,160,168,111, 93, +235,238,212, 50,186,238, 20, 43, 22, 24, 93,180,150, 5,162,207,216,238,168,255, 0,167,192,115, 42,187,245,243,150, 98,189,213, +238, 94, 5,130,225, 86,187,188, 8,214,156,122, 13,169,181,228,109,176,137, 15, 67,121,229,205,142,248, 17,137, 73, 74,153,127, + 99, 65, 81, 74,107,146,245, 63, 82,175, 34,117,217, 24,202, 34, 48, 3,226,103, 35, 82, 14,157,174,173,215, 16, 36, 34, 57, 43, +147, 41,238, 71,103,123, 81,233,203, 0,237,151,123,241,252,149, 98,251,115,155, 46,196,230, 62,168, 49,155,148, 22, 90, 73, 87, + 57,200, 88, 82, 80,144,138,241, 21, 21,214,151, 67,235, 53,225,224, 68,100, 85, 99, 19, 41, 2, 24, 9, 63, 99,241,109, 20,178, + 40,141,164, 2,234,196,179,229,221,144,237, 87,119, 44, 97,252, 79, 51,141,150,197,106, 28,251, 60,105, 42,128,164,203, 66,214, + 91,103,131, 33,148,184,231, 53, 36,167,225, 59,208,211, 90, 24,189,123, 31, 30,216, 19,143,116,102,117,136, 44,228, 30, 4, 6, +125, 80, 99,135, 8, 72, 23, 46,168, 94,233,225, 93,218,155,221,140,147, 38,187,227,247, 24, 86, 91,156,217,113,237,142,202, 97, + 97,181, 45, 64, 54,196,114,180,213, 1,195,203,238, 86,189,118,215, 15,212,122,101,212,188,205,114,136,145, 44,227,180,232, 60, +123,149,169, 72,186,174, 61, 67, 88, 47, 88,110, 99,142,246,106,219, 17,233, 25,219,129,184,174,219,217,109,106,144,185,171,123, +202,242, 82,218,106,162,178,231,194, 5, 42, 78,218,204,167, 6,195, 61,134, 39,123,179, 54,175,193,155,181,210,178, 92,149, 70, +206, 33,221,139,149,206, 5,154, 38, 63,112,122,247,127,145, 46, 45,154, 35,113,157, 83,147,164, 69,144, 98,190,220,116,129, 85, +169,183, 18, 80,160,154,208,138,106,216,233,118,153, 70, 34, 5,228, 88,105,197,142,173,224,141, 9,115, 87, 46,125,218, 62,233, +246,187,176,120,237,131, 48,178, 76,182,202,190,206,252,101, 75, 97,198,146, 28, 8, 83,200,105, 69, 67,169, 9, 38,158,227,167, +203,233,119, 99, 71,125,144, 49, 14,218,134, 81,222,101, 37, 17,181,219,134, 86,246, 44,120,124,170,153,103, 31, 74,168, 63,120, +152, 14, 56, 77,127,222,145,245,234,183,144,118, 38,222, 29,144,119,237,194, 74,118, 81, 11,246,131,175,104, 93,184,154,242,171, + 2,221, 70,219, 47,192,141, 50,150,228, 58,126, 46,234,106,162, 13, 79,136,223,244,105, 2,136, 36,151,101, 67,151,107,122,173, +212, 34,187, 17,210,186,152, 46, 19,241, 83,162,229, 87, 8, 77,142,100,173,161,224,116,194, 46,162, 92, 41, 78,100, 40,156,223, + 42,213, 52,222,186, 99, 90, 91,202,215, 18,245, 5,151,210,220,147,197,179,183, 47,119,191, 76,202, 92, 81, 39, 67,139,111,153, + 79,152,201,217, 15,160,236, 71,176,234, 32,169,131,162,253,137, 97,149, 33, 37,200,166,160,117, 73, 21,167,209,169,104, 82, 50, +101,189,140, 80,188,146,135,211,191,178,158, 61,116,152,133, 9, 73, 4,205, 59,107,104,200,237, 50,108, 23,200,232,147,106,150, +218,227,200,142,250, 66,144,235,110, 14, 42, 73, 7, 98, 8,212,171,176,192,130, 11, 16,152,180,131, 16,238,190,123,122,164,244, + 65,145,118, 58,254,238,115,134, 54,236,238,215,135, 22,226,184,114, 91,214,182,202, 69, 18,239, 42,169, 73, 43, 39,138,254,128, +173,247, 61,191, 74,234,241,191,225,158,146, 11,153,205,233,230,162,227, 80, 82, 44, 28,109,230,111,167,204, 30,100,197, 60,182, + 22,146, 1, 42,112,172, 2, 7,208, 63,167, 91, 52,220,241,220,121, 15,201,214, 90,182, 98,224, 69,171,172, 8, 60, 63, 22, 19, + 2, 84,133,215,143, 34,180,170, 67,149, 35,160,226, 82,145,239,214, 84,111, 22,213, 57, 30,114, 97,238, 13,247,171,120,249, 50, +168,146, 20,252, 43, 15,184, 74,238, 61,157,203,184,242,155,113, 18, 36,173,197,116,243, 29, 82, 22,163, 83,224, 0, 31,110,170, +103, 78, 32, 8, 71,128,251,126, 43,123,165,229, 19,190, 82, 61,138,199,238, 5,162, 78, 65, 50, 46,123,143,149,201,114,197, 45, +183,161, 45,177,187,204,150,190, 69,116,173, 62, 26, 41, 78, 1,253,145,170, 55,197,154,174,100, 63,231,248, 32,195,169,255, 0, +243, 36,190,135, 69,105, 64,184, 42,254,219, 25, 5, 0, 83,134, 59, 93, 8,169,225,192, 84,125, 35,125, 89,193,183, 67, 30,196, +186,165,131,205, 12, 92, 48,252,211,166, 5,122, 22,185,108,196,116, 1,229, 45, 14, 16,119,248, 81, 82,173, 15, 34,231,169,207, +247,128,251,213, 26,239, 1, 59,224,217, 48,151, 53, 41,112,252, 49,202,223, 65,254,207, 58, 83,255, 0, 75, 64,141,158,100,200, + 31,109, 2, 61,119, 57, 82,163,100,205,222,239, 7,122,169,132,176,132,146,127,238,212,131,253, 26,208,136,208,248,149, 33,107, +150, 9,174,229,109,102, 88,121,196, 36,114, 90, 2,200, 3,193, 14,164, 15,209, 93, 74, 58,125,187,145, 12,147,197,166,199, 22, + 67,209, 95,160,163,209, 90, 89,167,137, 28, 91,255, 0,237,211, 89,150,205,180, 86,171, 33,208,174,224,225,240, 98,218,231, 76, +112, 37, 13,180,147, 33,107, 35,238,148,164, 45, 74, 35,232, 70,250, 97,113, 10,237, 53,111,148, 71,105, 3,193,215, 53,250,248, +133, 11,183, 29,151,176,118,246,203, 41, 8,147,118,136, 39,201,101,154,126, 27,142,213,231, 20, 79,183,226,166,168,244,162,114, + 45, 50, 61,171,185,235, 25,112,198,197, 17, 26, 16, 24,123,191,138,231, 30,204,224,152,181,175,178, 17, 50,187,100,132, 12,134, +228,183, 94,122, 19,124,191, 9, 74, 93, 71,188, 10,158,135, 90, 91,165, 43, 54,142, 14,178,165, 40, 66,141,117, 97,199,189,103, +165,108,190, 46, 81,122,190,205,186,127, 29, 9, 19, 37, 67,130,107,208, 50,233, 96, 43,225, 0, 80,241, 36,123,181,122,234,200, +248, 98,126,220, 15,222,176, 33, 51, 40, 9,157, 57,251, 56,254, 9, 39,212,173,178, 22,109,220, 55,166, 93, 10,157,140,182,211, + 14, 25, 85, 15,203,180,209, 82,104,138, 1, 74,174,171,250, 78,186,140,106, 5,113,140, 87, 17,153,144,109,153, 37, 11,236,156, +104, 48,224,127, 40,183, 48,150,174, 12, 59,243, 28,105, 79,152,101,230,194, 92,105, 68,239, 81,186,146,117, 97,153, 85,220,156, +111,184,211, 17,100,198,146,167, 75,237, 44, 61,228,135, 77, 74, 18,227,117,166,255, 0, 78,173,227, 20,225, 88,125,190,183, 76, +133, 99,110,231, 36,121,140, 36, 54,226,144,107,186, 67,128,154,125, 0,242,213,192, 84,192, 87, 54, 78,239,200,225, 78,202,121, +206, 80, 86,166,159, 1, 67,144, 82,147, 85, 0, 65,232, 78,250,243,239,169, 54,109,233,197,187, 71,135, 17,246,252, 20,207, 4, + 95,182, 78,197,197, 59, 85, 39, 40,113,138, 38,242,161,104,168, 53, 80, 74,221, 73, 90,171,239, 72, 35, 95, 56,216, 33, 41, 0, + 31,241,254, 31,154,175, 49,162,169, 33,226, 82,109,221,216,186,228,179,147,184, 76,146,148,143,217, 21, 9, 66, 71,251, 0,106, +221,179, 30, 78,208,159,106,103, 84, 32,188,230, 74, 89,168,113,200,105, 97, 43,254,207,203,255, 0,166,186,160,126, 24,199,197, + 76,151, 40,125,230,220, 99,225,144,166, 69,175,157,111, 75,173, 60, 61,161,211, 84, 29, 8,106,117,237, 83,228, 17, 75, 52,145, +100,236,131, 47, 40, 81,215, 88,230,239,189,110, 58,105,250, 52,214,197,236, 80, 26,165,155,141,217,214,166, 61, 17,173,156, 87, +148,194, 66,125,165, 3,167,219,166,216,227,218,166, 14,169,195, 29,186, 11,119,121,255, 0,154,190, 57,199,178, 91,121,111,208, + 41, 17,194, 18, 55,250,244,171,131,192,248,168,147,162,116,180,180,252, 92, 74,232, 57,149, 61,120,149, 29, 32,251, 90, 43,230, +126,173,255, 0, 70,170, 26,158,207, 4,224,234,191, 18,134, 46,153,105, 10, 28,163, 33,131, 57,110, 30,135,137, 75, 72, 31, 69, +106,116, 48, 8, 4,247,169, 62,170, 86,101, 53,148,219,211, 53, 63,191,158,250,184, 83,254,238, 49,162, 64,250,193, 58,175, 50, + 76,219,177, 72, 29, 82,155,249,107,108,206,186, 74, 38,174, 63,229,181, 95,238, 80, 1,250,245,118,170,255, 0,166,202, 66, 77, + 34,172, 44, 62,255, 0,121,199, 96, 14,226, 88,229,187, 7, 36,109, 41, 69,182,108, 85,169,167,155,124,169, 12,165,109,173, 4, + 40, 30,187,131,225,170,149, 91, 58,109, 18,129, 32,141, 65, 26, 50, 14,231, 79,119,255, 0,204, 87,188, 81,157,143,108,238, 29, +171, 29,206, 36,243, 76, 86, 31,202,172,237,187, 45, 13,133,113, 32, 72,130,184,206,255, 0,214, 39,223, 93,118,244,250,215, 50, + 49,254,160,133,140, 63,154, 58,251,195, 38, 52, 66,124, 66, 59, 99,245,245,220, 72, 25, 43,144,112, 92, 99, 22,197,229,197, 73, + 42,159,100,179, 3, 48, 45,105, 34,137,122,224,236,130,158,187,208, 13, 66, 94,184,204, 58, 66, 21,214,123, 99, 29,127,248,137, + 79, 28,106,227,168, 9, 62,235,220, 60,203, 48,238, 12, 59,167,112,110,178,110,217, 28,184,160,187, 42,115,203,113,202,165,238, +105,167, 35,240,129, 93,128,160, 30, 26,228,250,150, 93,185,100,206,201, 25, 72,158, 36,235,197, 79,118,138,211, 71,171,220, 23, + 45,125,155, 63,169, 59, 19,183, 43,140,104,237,252,190, 91, 96,113,182, 47, 1,144,133, 33, 40,146,219,255, 0,129, 39, 97, 64, +165, 20,170,158, 39,174,187, 44, 63, 88,143, 42, 49,204,129,155, 6,223, 29, 39,237,125, 37,227,162,167,126, 52, 45,212,232, 84, +244,221,253, 29,205,197,154,186, 53,155,222, 19,108,101,228, 40,199, 93,128, 42, 77, 93, 7,138, 10,147, 39,203,174,253,107, 77, +106,207,212, 61, 47,105, 38,201,248,108,215,241,101, 76,116,237,126,111,185,109,183,122,149,236,207,109,164,124,199,105, 48,133, + 94,109,178,147,242,151,107,190, 96,240,249,201, 49,100, 5, 52,236,120,204,195, 62, 84,110, 84,251,245, 90,168,119,214,108,189, +119, 77, 82, 3, 26,157,195,153,153,212,142, 96, 1,164,124,117,240, 87, 41,194,132, 65,230,164,103,125,237,244,197,139,227,241, +115,140,115, 16,187,223,238, 43,242, 93,106,213,118,184,199,110,218,202,151, 84,130,234,163, 53,231, 58,134,213,213, 36,142, 93, + 9,223, 86, 71,172,112,132,119, 66,153,153,118, 72,141,160,251, 53, 40,112,192,172, 30,107,127,101,187,213,117,238,198, 93,147, +101, 89,165,201,136,221,194,149,111,184,218,177,137,107, 82, 33,198,131, 54, 76, 16,196,102, 99,169,100, 37,129,192, 45,166,205, +118, 82,134,245, 53, 56,125, 35,170, 89,151,159,101,214,200, 11,103, 92,163, 2,116, 2, 76,192, 14,205, 28, 14,243,218,180, 36, + 88, 48, 75, 29,186,198, 51, 94,223,219, 59,137,127,239,173,178, 85,151, 3,185,217,227, 91,161, 91,239, 76,185, 29,115,239, 73, +158,202,225, 63, 25,167,130, 84,224,142, 16,226,148,226, 65, 72, 73, 34,191, 22,150, 62, 53,152, 24,185, 49,200,137,132,108,131, + 1, 45, 12,166,227,105, 0,241,109, 73, 35, 64, 60, 80,184,151, 66,187,171,154,246,227,181,253,237,177,247, 54,211,106,159,112, +238,123, 88, 61,154,200,202,221,159, 29,171, 59,113,238,152,131, 80, 28, 83,241,209, 29, 78,188, 18,210,193,242,203,169, 5, 96, + 26,237, 77,109, 89,213, 42,197,157,100, 2,108, 52, 64,113, 27,117,172, 13, 67, 57, 96,120, 63, 20,199, 64,129,247,163,183,247, +142,227,225, 61,184,190, 89, 59, 91,126,205,146,172, 61,134,219,190, 88,101,202,110, 43, 47,174,231, 62,140, 45,182, 34, 62,146, +180,115, 11, 53, 88, 52, 80,219,199, 86,243,177, 13,148, 82,212, 78,207,233,128,224,150, 26,157, 56, 20, 32, 78,133, 24,237,229, +255, 0, 24,179,122, 97,237,167, 98,115,151,144,199,111,114,185, 57, 4, 57,146,151,210,217,114, 98,100,119,109,247, 3, 77,192, +105,213, 20,185,237,105,107, 29,105,172,234,115, 33, 60, 74, 40,176,255, 0, 78,221,238,127,186, 65,142,217,123, 9, 99,255, 0, +116,148,199,130,135,234, 63, 9,149,109,245, 31, 2,215,122,109, 31,230, 11, 94, 53,137,218,100, 33,181,165,196,180,244,123, 35, + 13,190,148,173, 4,164,209, 66,149, 26,161,234,140,105, 66,216,214,120,198,186,193,241, 17, 1, 63,203,170,106,238,215,112,251, + 77,147,119, 43,183, 29,190,239, 20,196,177,131, 89, 49,123, 30,111,143,184,134,220,121, 78,220,160, 94,174,144,166,219, 19,228, +133,112,249,232,156, 71, 37, 10, 5,180,138,144, 43,173,204,139,177,252,138, 40,188,180, 69,113,144,239, 34, 82,120,247,110, 31, +120, 10, 80, 44, 55, 20,237,146,119,121, 57, 15,123,112,120,247,105,173, 70,238,134, 89,219,187,163,214,153,139, 90, 90, 67, 55, + 73, 23, 9,197,180,165,197, 16, 26, 43,109,110,180,217, 36, 81, 74, 72,219, 87,229,105,182,218,236,145, 2,201,227,144, 15, 6, +148,140,189,220,192,246, 32,111,118, 61,161, 38,250, 97,237,167,112,123, 87, 51,185, 57, 7,119,109,178,172, 88,214, 64,149, 71, +183, 91,239, 44,185, 21, 83,166,199,156,211,241, 23, 25,151,194, 84,231,149,197,107,243, 18, 8, 74,107,190,251,225, 67, 14,204, +106, 46, 23, 68,198, 18,131, 0, 67, 60,156, 24,176, 60, 91, 82,227,128,241, 77, 81, 32,234,150, 61, 71,223,237, 24,230, 71, 47, +243, 23, 68,248,238, 74,176,217, 29,198,161, 91,252,212, 25, 8,238, 24,254, 2, 50,203, 36,215,136,138,240,184,212,126,211,100, +107, 86,168,196,196,103,147,241,109,102,255, 0,213,249, 93,188, 62, 63, 20,243, 58,238,251, 58,175, 61, 35, 79,122,249,152,250, + 67,140,218,188,197,124,230, 90,244,175,139,226, 9, 69,245,229, 18,175,101,125,250, 47, 78,128,223,135,220,101,255, 0, 49, 68, +140,180, 9,231,190,184, 60,155,126,109,104,157, 43,183,247,124, 99, 22,199,219, 17, 88,188, 93,158,144,184,111,184,227, 74, 88, +142,218, 94,142,210,121,209, 21,168, 89,216, 29,181,205,117, 78,158, 97, 16,124,153, 86, 31,137, 36,131,221,192, 33,212, 91, 86, +101, 71, 57,150,219,127,206, 77, 99, 73, 82,127,157,243,118,250,183,106, 43,231,252,203,106, 66,107,215,238,114, 26,169,229, 33, +239,230,139, 66,152,138,242, 89, 0, 10, 84,248,107,212,200, 93,200, 42,114, 3,211,169,199,100, 13,209,198,190, 58, 4,149,218, +117, 82, 95,132,251,209, 2, 82,215, 57, 93, 58,208, 19,160,155, 24,178,180, 41,112,233, 54,251,109,114, 60,149, 57, 48, 81, 71, + 98,144, 52,104,149, 2, 16,112,195, 75, 81,161,167,133, 14,136,162,202,124, 12,108,186,158,109,238,131,236,246,233,196,148, 10, +139,123,199, 28, 75,100,245, 3,167,184,233, 50, 97, 37,231, 27,189,220, 44, 14,152,210, 83,231, 91, 87,247,210,170,236, 61,218, +129, 10,103, 80,157, 45, 55, 8,164,165,232,138,229, 25, 91,208,210,169,211,119, 32,144, 81,246, 28,140,235, 99,153,161, 61, 8, +241,211, 58, 66, 74, 53,194,214, 31, 77, 87,186, 15,143,244,141, 50,146, 76,201,237,172, 60,181, 71,154,216, 83, 42,170, 22, 20, + 42,149, 37, 66,132, 43,218, 8,212,132,136, 69, 17,112,185,235,186, 30,137, 45,232,203, 99,102,216, 57, 13,227,234, 90,140,235, +109,127,115,231, 18, 92,117,165,117, 35,226, 36,164,238, 54,166,219, 13,177,215, 13,120,179,131, 19, 38, 13,236,102,247, 46,123, + 59,167,236,121,195,135, 48,134, 90,113, 52, 93,103,170, 83,232,226,245,245,229, 62,210,127,238,109,173, 44,148,147,253,244,167, +144,247, 13, 23,247,194,144, 53,248,106,137, 39,190, 71,226,251,150, 67,128,166, 91, 48,232,247,153,230,229,229, 2,134, 18,234, + 88, 36,159,251, 82, 5, 41,208,208, 15,209,173, 76, 2, 4, 6,225,171, 63,187,248,171, 21, 25, 1,161,103,226,172, 8,248, 99, + 22, 46,213,186,133, 14, 50,215, 41, 17,154, 20,241, 45, 17, 65,244, 21,157,114, 55,117, 97, 62,160,102,120, 8,159,185,207,224, +170,202, 95, 18, 51,108,198,100, 47,229,173, 41,218, 71,226, 44,159, 2,164,188,161, 95,253, 16,117,119, 15,168,136, 87,101,146, + 58,150, 8,177, 58, 41,214,203,123,211,110, 87,187,187, 9, 41,143, 21,135,139,105, 30,222, 9, 74,126,211,172, 44,174,173,182, +160, 15, 29,192,251,245, 85,165, 97, 0, 35, 16, 30, 85,142, 59, 98,164,201, 12,128,247,188,169,126, 97, 31,250, 35, 86,125, 59, +157,230,239,127,230,151,220,223,246,171, 20, 89,197, 75,192,146,251,243,228,186, 62,231, 47,189,239, 90,130,104, 62,218,107,107, + 3,168,249,166, 93,196,253,229, 18,137,147, 39, 86,197,142, 75, 75,150, 10,205, 91, 84,114, 21,244, 7, 58,253,180,214,173,147, + 15, 17,218,181, 4,157, 31,194,239,203,185,101, 12,217,153, 63,135, 26, 34,156, 81,254,175,199,230, 15,210,128, 62,189,100,100, +216,249, 17,135,115,159,122, 44, 39,171, 41,189,205,201, 33,162,223, 34, 52,162, 3, 82, 89, 92,111,136, 2, 57,165, 69, 73,168, + 52,235, 90, 29, 89, 52,238,211,187,242, 90, 20,228,249, 82,140,135, 34, 15,185,124,249,245, 67,117,201,179,158,224, 46, 21,221, +255, 0,152,110, 50,209, 25,143, 43,102,188,148, 10,113, 72, 36,248,143,175, 93, 7, 72,233,145,199,175, 77, 95, 85, 14,181,214, +236,205,155,144,192,112, 8, 31,109,109, 87, 8, 88,231,249,106, 68, 32,211,172,189,205, 50, 5, 40,228,114,225,113,160, 0, 63, +212, 32, 31,126,158,140, 34, 46,220,120, 42,121, 93, 75,250, 27, 65,212,176, 41,179, 14,237,102, 29,219,167, 20,172,110, 48,138, +221,201,110, 57, 42,138, 89, 1,111, 41,117, 82, 66,137, 9,169,222,131,109, 95, 24,240, 18, 37,181, 89, 54,103, 90, 99,177,244, +101, 85,103,246,144,205,241, 50, 37, 10, 56,211,129,192,149, 10,133,182,208,162,135,212, 77,117,163, 21,154,120,161, 24,109,173, +171, 85,230,109,185,128, 62, 97, 77,249,241, 92, 35,122, 52,162,217, 3,237, 65,250,180, 80, 82, 77,115,237,239, 62,195, 83, 25, +221,180, 36, 18,131,247,144,165, 43,137,175,214, 72,209,170, 44, 84,199, 5, 98,226, 83, 18,188,124,218,155,160, 90, 19,228, 1, +253,223,132,159,180,164,106,224, 68,138,181,115,209,110,129,219, 23,227,135,146,169,110,121, 73,224,175,235,133, 5, 5,167,233, +223, 94,109,245, 19,168, 85,251, 59, 41, 60,116, 35,216, 71,240, 83,145,209, 74,178,220, 98, 92,240,124,127, 16, 97, 92,154, 97, +212, 63, 41, 35,250,196,128, 63, 70,250,249,230, 33,135, 30,104, 27,117, 74, 87,171,236, 73, 89,195,246,242,105, 34,232,250,226, +164,142,136,224,107,255, 0,217,166,136, 67,251,147,148, 93,108, 54,229,241,213, 32,113,146,211, 97,147, 94,164,150,233,170,246, + 23,144, 9,130,139, 30, 1,184, 98,242,216, 77, 21,248,204, 23, 1,240,105,182,247, 52,250,116,237,167,181, 78, 42, 37,228, 9, + 93,177,151,107,104, 85,184,171,101,164,211,192, 33, 64,254,163,166,254,103, 67,175,129, 65, 27,181, 9,121,172, 55, 80,159,225, +106,183,214, 79, 79,133, 73, 74, 1,250,107,167, 18,104,165, 41, 50, 37, 25,224,229,147, 40,200, 73,254, 34, 91,141,219,219, 62, + 52, 83,129, 10,253, 3, 77, 19,183, 69, 18,116, 78, 39, 34,249, 92, 9,187,179,198,137, 74,208,195, 3,218, 91, 4, 40,254,157, + 6,248, 17,170,157,106,124,123,138, 45, 56, 11, 87,103, 5, 37, 77,110, 52, 80,127,177,230,149,210,191, 86,130, 96,229,148,164, + 89, 12,187,228,173, 92, 31,135,109,108,242, 22,232,143,200, 80, 31,215,120,154, 87,237,208,124,159,136,158,213, 8, 77,210, 37, +250,224,184,239, 71,180, 71, 5, 82,214,150,157,116,255, 0, 93,215,135, 36,164,123,128, 63,110,174,215, 95,195,237, 82,148,149, +181,118,158,187, 42,108,216, 74, 13, 95,138,207,205, 72,166,244, 91, 77, 21,212,253, 10, 93,126,173,103,194,189,198, 94, 41,171, +208, 58, 68,190,201,242,115,116,207,148, 43, 18, 3, 63, 54, 66,142,197,213,167,154,107,245,144,117,116, 67,225,251,148,129, 71, + 59,117,127, 14, 94,219,145, 48,254, 59,229, 78, 57, 83,189,120,147,168, 66, 12,233,229, 38, 9,141,236,149, 82, 59,132,101, 50, +121, 34, 43, 65,148,251,191,103, 85,132, 30, 35,237,205, 14,103,225, 65,251,161,147,124,190, 83, 61,166,206,205, 49, 21, 27, 31, + 20,182, 65,253, 90,149,149,188, 83, 68,175,219, 22,102,127,200, 2, 50, 85, 95, 48,165,100,215,254,233, 98,159,163, 84,242,170, +213,187, 83,199, 84,223,100,204,218,103, 5, 14,184,170,149,184,210,145,239, 90, 93,228,127, 64,212,171,161,167,236, 82,220,193, + 21,133,144, 68,145,142, 92,237,106, 93, 88, 20,126, 56, 62, 9,115,226,167,212,161,171,130,157,164,160, 11, 18,246, 47,157, 52, +225,184,218, 95, 85, 25,144,242, 82, 69,118,175, 47, 15,183, 74, 52,252, 33, 72,216,160,156,133,236,117, 23,187, 11,198,143,173, +176, 15,210,149,115, 7,235, 7, 80,157, 27,136, 61,137,161, 98, 25, 31, 39, 67,215,134,227,180, 0, 92,198,130,222, 3,197, 92, + 10, 15,234,174,141, 8,109,114,144,155,169, 24, 54, 55, 18,213,219, 58,206, 79, 59,164, 25,111, 58,223, 61,213,229,201, 87,196, + 5,125,155, 29, 66,235,141,135,142,173,249, 35,237,100, 53,203,132,133,134,154, 88,229, 56,185, 68, 32,117, 42, 41, 52, 26,161, +135, 47, 54,226, 7, 0, 20,140, 88, 38, 60, 58,244,214, 9,136,220, 47, 82,156,224,243, 44, 21, 45,207,234,184,180,147,246,131, +174,174, 21,105,185, 85,180, 59, 5, 83,118,123, 34, 85,247,186, 43,186, 58,121, 71,141,230, 72,117,100,215,112,159,135, 79, 94, + 62,226,231,216,154,226,225,130,126,236,133,222, 70,117,222, 11,166, 95, 33, 85,136,218, 85, 9,133, 87,225, 8, 65, 53, 3,235, +214,141,181,129, 31, 5, 86,216,237,128, 87, 71,110,111, 49,155,185, 93, 46,140,209, 48, 97, 33,108,182,125,171,112,213, 71,236, + 26,198,166, 62,100,143,138, 91,118,133,195,221,230,201, 81,149,247, 51, 42,204, 37, 30, 86, 91,123,142,147,253, 87, 29, 72, 8, + 66, 62,211,173, 12,129,182, 81,132,120,149, 98,170,159, 84,251,232,222,198,156, 66,207,115,238,253,249, 52,118, 59, 11, 44,115, +240, 90,128, 32, 10,232,205,203,177, 14,228,235,137,228, 46,197,197, 39,101, 23, 21, 86,235,120,144, 86, 10,137,173, 20,162,175, +111,213,160,249, 90,185, 80,169,202,169,219,203, 95, 61,203,123, 36,243, 63, 21, 50,217,100, 10,254,202,155,115,225,253, 26, 35, +243,228,137,228,150,101,120, 70,253,194,186,244,253,175,167,199, 94,147,201,119, 60,211, 62, 43,247, 81,215,253,190,159, 94,171, +216,175, 87,197, 54,197,234, 63,119,227,247, 58,244,214,124,214,165, 92, 18,119,113, 63,237, 63,117,227,244,253, 90, 45, 8, 54, +241,228,171, 89,127,188,253,175,246, 58,234,236, 85,116,197,139,125,193,251,222,158, 63,211,169, 32,216,166, 93, 58, 31,233,254, +157, 50, 9,226,128, 72,253,249,251,158, 29,122,105, 73, 88, 10,110, 59,254, 35,246,252, 62,231,221,208,212, 36,154, 89,255, 0, + 10, 62,255, 0, 95,233,240,211,132, 50,140,199,255, 0, 12,122,248,125,254,186,100,229, 46,228,255, 0,124,253,223,246,180,145, +160,180, 91, 63,225,223,111,222,233,167, 40, 86,240, 42,139,200,191,243, 50,239,251,191,248,112,255, 0, 13,251,175,240,135,252, + 63,246,127,215,161,102,127,237,127,241,143, 14, 92,123,151, 27,145,243, 31, 30, 92, 22, 97, 63,225,218,251,189,126,175,221, 47, +254,131, 93,108,248, 89,224,127, 17,195,185, 88,237, 79, 89,183,252,191, 96,233,255, 0, 20, 79,251,191, 15,191,239,246,107,204, + 97,254,124,188, 15,224, 85, 14,104,196, 79,248,243,125, 62,243,189, 58,253,213,244,254,157,106,127,244,231,143, 17,249,162,242, + 82,112, 47,248,117,247,238,254,237,191,189,254,240,127,208,235, 7,170,255, 0,150,127,255, 0, 65,248, 21, 78,238, 8,124,239, +241,206,127,117, 95,127,167, 81,211,250, 53,169,233,127,150, 72,180,240, 70,176, 95,248,113,255, 0,120,143,185,215,247,254, 62, +255, 0,245,107, 71,162,124,151,127,196, 63, 53,115, 31,243, 79,182,239,241, 67,239,127,133, 95,221,251,191,188, 58,235,191,234, +215,224, 22,144,226,138,118,183,254,120,185,253,255, 0,240,200,251,159,123,239,163,166,178,191,250,249,248,126,124,146,167,231, + 42, 63,126,255, 0,225,223,183,254, 44,126,239,232, 71, 79,118,186, 44,110, 42,205,139,142,115,207,249,194, 23,238,255, 0,111, +239,245,251,171,251,254,255, 0,245,235,165,198,249, 22,101,223, 50, 43,143,126,241,207,220,255, 0,135,107,175,247, 19,211,223, +168,215,197, 14,212, 67, 38,255, 0, 3, 27,239,126,241, 31,119,233,209,163,197, 83, 85, 87,115,255, 0,196, 35,238,125,233, 63, +127,239,116, 61,125,222,223,126,172,197, 13, 40, 99, 63,243, 20, 95,247,111,125,254,191,117, 29,125,222,221, 18, 41,147,107,253, + 36,253,239,221,253, 95,124,104,213,169,197, 58, 96,255, 0,191,253,158,175,253,255, 0,247,205,255, 0,208,106,224,224,137, 20, +225,220,255, 0,248,122,191,123,209,158,191,119,199,166,190,114,245,215,254,250,127, 55,183,135, 20, 67,242,163,189,175,255, 0, +139, 55,215,238, 39,239,244,251,154,243,168,254,106, 3,130, 66,127,255, 0, 52,227,253,255, 0,241,238,253,238,189, 23,247,125, +254,221, 90, 28, 20, 39,193, 89, 10,255, 0,156, 93,233,213, 29, 63,221,248,234,164,190, 98,163,205, 66,237,247,248,107,167,254, +232,191,191,247,122,126,189, 18,206, 72,144,224,160, 64,255, 0,147,111,255, 0,239, 83,247,186,125, 90,132,184,133, 24,240, 43, + 93,155,247, 35,238,254,241,158,159,188,253,218,122,127,103,219,239,212,121,168, 77, 71, 63,249,126,255, 0, 79,241,235,251,157, + 63,124,175,189,239,246,105,127,214, 30, 31,146,105,112, 68, 50, 79,249, 15, 31,251,255, 0,188,127,238,254,235,160,251,222,253, + 62,127,201, 47,103,228,137, 74, 97,238, 7,254, 90, 99,189,127,120,207,238,190,239,220,241,208, 97,196,166,179,229, 74,152,199, +252,126,243,247,191,118,143,222,245,251,135,167,187,217,169, 79,128, 85,234,228,160,202,255, 0,205,187, 55,220,253,252, 31,222, +126,239,247, 77,245,254,141, 22, 31, 34, 45,138,197,191,255, 0,230,237,235,175,248, 73, 31,189,250,254,231,187,219,238,213, 28, +110, 30,210,159,249,125,137, 75, 63,255, 0,141, 93,255, 0,223,163,251,189, 19,215,251, 58,178, 56, 39,151, 37, 23, 6,255, 0, +153,191,237, 63,107,175, 78,159,179,167, 60, 19, 91,193, 50,226,127,243, 60,207,189,213,191,222,117,251,250,174, 62, 80,163, 63, +145, 4,238,159,252,199,119,251,221, 83,215,175,221, 58,126, 67,197, 60,120,251, 22,188,123,254, 84, 79,222,253,202,190,142,186, + 6, 71,249,138,112, 76,145,127,228,139,111,239, 63,120,231,221,233,211,199,223,162,199,230, 81, 60,209,107,103,248, 4,126,243, +247, 13,125,223,247,170,251,222,237, 89,146,170,149,109, 63,241, 89, 95,189,253,248,251,159,222, 29, 52,255, 0,202,151, 52,193, +221,143,249,166, 71, 79,240,140,125,207,189,251,179,247,253,255, 0,234,208,199,202,158, 60, 82,238, 29,255, 0, 59, 90,186,253, +199, 63,121,247,116,231,129, 78, 57, 39,145,210, 71,222,253,159,185,251,174,169,235,239,213, 8,113, 42,244,190, 80,150, 45,127, +243,181,179,167,248,159,219,251,159,113,127,167, 85,186, 87,249,146, 72,242, 67,251,181,255, 0,147,215, 31,223,127,139, 63,185, +235,225,247,255, 0,179,174,198,191,144,120, 32,219,199,218,144, 61, 63,127,130,190,125,239,184,191,187,251,207,187,171,180,124, +195,130, 1,252,213,157,233,111,254, 85,153,244,189,251,159,222,253,243,215,223,237,213,110,167,254, 76,184,251, 20,167,243,127, + 21,103, 98, 31,249,125,115,251,255, 0,125,223,185,247,254,224,251,222,253,102,116,127,179,168,228,241, 92, 91,148,127,229,157, +219,238,255, 0,198, 87,211,239,254,248,126,255, 0,221,171,215,127,239,191,240,243,241, 86, 7,200,174,187,127,255, 0,243,119, +143,239, 19,254, 19,238,127,235, 61,218,179,143,198,106,174, 71, 0,188, 79,255, 0,148,237,223,188,251,136,253,223,221,251,222, + 30,255, 0,110,167,103,228,165,140,170,132,127,139,115,255, 0,122,111,251,223,113,127,167, 64, 63, 40,251,118, 43, 43,255,217, }; - From 1cf33787932aabc9e2d812f4cf50655059dcbff2 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 30 Apr 2008 15:41:54 +0000 Subject: [PATCH 087/430] Added Freestyle to extern/ directory --- extern/freestyle/AUTHORS.TXT | 6 + extern/freestyle/BUGS.TXT | 11 + extern/freestyle/COPYRIGHT.TXT | 9 + extern/freestyle/INSTALL.TXT | 79 + extern/freestyle/LICENSE.TXT | 340 + extern/freestyle/README.TXT | 51 + extern/freestyle/THANKS.TXT | 6 + extern/freestyle/TODO.TXT | 9 + extern/freestyle/src/Config.pri | 176 + extern/freestyle/src/Freestyle-vc7-debug.sln | 113 + .../freestyle/src/Freestyle-vc7-release.sln | 111 + extern/freestyle/src/Freestyle-vc8-debug.sln | 87 + .../freestyle/src/Freestyle-vc8-release.sln | 87 + extern/freestyle/src/Makefile.pro | 18 + extern/freestyle/src/app/AppAboutWindow.cpp | 36 + extern/freestyle/src/app/AppAboutWindow.h | 40 + extern/freestyle/src/app/AppCanvas.cpp | 404 + extern/freestyle/src/app/AppCanvas.h | 84 + extern/freestyle/src/app/AppConfig.cpp | 120 + extern/freestyle/src/app/AppConfig.h | 125 + .../src/app/AppDensityCurvesWindow.cpp | 65 + .../src/app/AppDensityCurvesWindow.h | 85 + .../freestyle/src/app/AppGL2DCurvesViewer.cpp | 152 + .../freestyle/src/app/AppGL2DCurvesViewer.h | 80 + extern/freestyle/src/app/AppGLWidget.cpp | 1049 + extern/freestyle/src/app/AppGLWidget.h | 526 + .../src/app/AppInteractiveShaderWindow.cpp | 119 + .../src/app/AppInteractiveShaderWindow.h | 73 + extern/freestyle/src/app/AppMainWindow.cpp | 288 + extern/freestyle/src/app/AppMainWindow.h | 83 + extern/freestyle/src/app/AppOptionsWindow.cpp | 410 + extern/freestyle/src/app/AppOptionsWindow.h | 74 + extern/freestyle/src/app/AppProgressBar.cpp | 78 + extern/freestyle/src/app/AppProgressBar.h | 55 + extern/freestyle/src/app/AppStyleWindow.cpp | 366 + extern/freestyle/src/app/AppStyleWindow.h | 93 + extern/freestyle/src/app/ConfigIO.cpp | 116 + extern/freestyle/src/app/ConfigIO.h | 181 + extern/freestyle/src/app/Controller.cpp | 1498 + extern/freestyle/src/app/Controller.h | 232 + extern/freestyle/src/app/Main.cpp | 57 + extern/freestyle/src/app/QGLBasicWidget.cpp | 141 + extern/freestyle/src/app/QGLBasicWidget.h | 102 + .../src/app/QStyleModuleSyntaxHighlighter.cpp | 155 + .../src/app/QStyleModuleSyntaxHighlighter.h | 57 + extern/freestyle/src/app/app.pro | 179 + .../freestyle/src/app/appmainwindowbase4.ui | 237 + .../freestyle/src/app/densitycurveswindow4.ui | 442 + extern/freestyle/src/app/freestyle.qrc | 23 + extern/freestyle/src/app/icons/add.png | Bin 0 -> 400 bytes extern/freestyle/src/app/icons/arrow_down.png | Bin 0 -> 813 bytes extern/freestyle/src/app/icons/arrow_left.png | Bin 0 -> 776 bytes .../freestyle/src/app/icons/arrow_right.png | Bin 0 -> 773 bytes extern/freestyle/src/app/icons/arrow_up.png | Bin 0 -> 782 bytes extern/freestyle/src/app/icons/clear.png | Bin 0 -> 1057 bytes extern/freestyle/src/app/icons/close.png | Bin 0 -> 1437 bytes extern/freestyle/src/app/icons/edit.png | Bin 0 -> 896 bytes extern/freestyle/src/app/icons/eye0.png | Bin 0 -> 406 bytes extern/freestyle/src/app/icons/eye1.png | Bin 0 -> 402 bytes extern/freestyle/src/app/icons/folder.png | Bin 0 -> 1015 bytes extern/freestyle/src/app/icons/home.png | Bin 0 -> 1050 bytes extern/freestyle/src/app/icons/mod0.png | Bin 0 -> 910 bytes extern/freestyle/src/app/icons/mod1.png | Bin 0 -> 1051 bytes extern/freestyle/src/app/icons/ok.png | Bin 0 -> 769 bytes extern/freestyle/src/app/icons/reload.png | Bin 0 -> 1113 bytes extern/freestyle/src/app/icons/remove.png | Bin 0 -> 375 bytes extern/freestyle/src/app/icons/save.png | Bin 0 -> 1329 bytes extern/freestyle/src/app/icons/save_as.png | Bin 0 -> 1024 bytes .../src/app/interactiveshaderwindow4.ui | 103 + extern/freestyle/src/app/optionswindow4.ui | 651 + extern/freestyle/src/app/progressdialog4.ui | 26 + extern/freestyle/src/app/src.pri | 50 + extern/freestyle/src/app/stylewindow4.ui | 182 + extern/freestyle/src/build_bundle.macosx.py | 183 + extern/freestyle/src/geometry/BBox.h | 141 + extern/freestyle/src/geometry/Bezier.cpp | 118 + extern/freestyle/src/geometry/Bezier.h | 73 + extern/freestyle/src/geometry/FastGrid.cpp | 62 + extern/freestyle/src/geometry/FastGrid.h | 85 + extern/freestyle/src/geometry/FitCurve.cpp | 602 + extern/freestyle/src/geometry/FitCurve.h | 101 + extern/freestyle/src/geometry/Geom.h | 78 + extern/freestyle/src/geometry/GeomCleaner.cpp | 240 + extern/freestyle/src/geometry/GeomCleaner.h | 219 + extern/freestyle/src/geometry/GeomUtils.cpp | 742 + extern/freestyle/src/geometry/GeomUtils.h | 309 + extern/freestyle/src/geometry/Grid.cpp | 388 + extern/freestyle/src/geometry/Grid.h | 358 + extern/freestyle/src/geometry/HashGrid.cpp | 41 + extern/freestyle/src/geometry/HashGrid.h | 109 + extern/freestyle/src/geometry/Noise.cpp | 264 + extern/freestyle/src/geometry/Noise.h | 77 + extern/freestyle/src/geometry/Polygon.h | 215 + extern/freestyle/src/geometry/SweepLine.h | 334 + extern/freestyle/src/geometry/VecMat.h | 899 + extern/freestyle/src/geometry/geometry.pro | 64 + extern/freestyle/src/geometry/matrix_util.cpp | 265 + extern/freestyle/src/geometry/matrix_util.h | 69 + .../freestyle/src/geometry/normal_cycle.cpp | 103 + extern/freestyle/src/geometry/normal_cycle.h | 97 + extern/freestyle/src/geometry/src.pri | 33 + extern/freestyle/src/image/GaussianFilter.cpp | 96 + extern/freestyle/src/image/GaussianFilter.h | 144 + extern/freestyle/src/image/Image.h | 389 + extern/freestyle/src/image/ImagePyramid.cpp | 166 + extern/freestyle/src/image/ImagePyramid.h | 92 + extern/freestyle/src/image/image.pro | 66 + extern/freestyle/src/image/src.pri | 13 + extern/freestyle/src/libconfig.pri | 110 + extern/freestyle/src/makedsp.vcnet.debug.bat | 25 + .../freestyle/src/makedsp.vcnet.release.bat | 25 + .../src/rendering/GLBBoxRenderer.cpp | 108 + .../freestyle/src/rendering/GLBBoxRenderer.h | 59 + .../src/rendering/GLDebugRenderer.cpp | 197 + .../freestyle/src/rendering/GLDebugRenderer.h | 182 + .../src/rendering/GLFreeMemoryVisitor.cpp | 27 + .../src/rendering/GLFreeMemoryVisitor.h | 23 + .../src/rendering/GLMonoColorRenderer.cpp | 43 + .../src/rendering/GLMonoColorRenderer.h | 60 + extern/freestyle/src/rendering/GLRenderer.cpp | 467 + extern/freestyle/src/rendering/GLRenderer.h | 204 + .../src/rendering/GLSelectRenderer.cpp | 159 + .../src/rendering/GLSelectRenderer.h | 85 + .../src/rendering/GLStrokeRenderer.cpp | 495 + .../src/rendering/GLStrokeRenderer.h | 98 + extern/freestyle/src/rendering/GLUtils.cpp | 68 + extern/freestyle/src/rendering/GLUtils.h | 29 + .../src/rendering/GLXOffscreenViewer.cpp | 86 + .../src/rendering/GLXOffscreenViewer.h | 545 + extern/freestyle/src/rendering/extgl.cpp | 2249 + extern/freestyle/src/rendering/extgl.h | 5106 + extern/freestyle/src/rendering/pbuffer.cpp | 292 + extern/freestyle/src/rendering/pbuffer.h | 77 + extern/freestyle/src/rendering/rendering.pro | 102 + extern/freestyle/src/rendering/src.pri | 33 + .../freestyle/src/scene_graph/DrawingStyle.h | 82 + .../src/scene_graph/IndexedFaceSet.cpp | 321 + .../src/scene_graph/IndexedFaceSet.h | 222 + extern/freestyle/src/scene_graph/LineRep.cpp | 58 + extern/freestyle/src/scene_graph/LineRep.h | 130 + extern/freestyle/src/scene_graph/Material.h | 304 + .../src/scene_graph/MaxFileLoader.cpp | 388 + .../freestyle/src/scene_graph/MaxFileLoader.h | 94 + extern/freestyle/src/scene_graph/Node.h | 97 + .../freestyle/src/scene_graph/NodeCamera.cpp | 119 + extern/freestyle/src/scene_graph/NodeCamera.h | 192 + .../src/scene_graph/NodeDrawingStyle.cpp | 34 + .../src/scene_graph/NodeDrawingStyle.h | 70 + .../freestyle/src/scene_graph/NodeGroup.cpp | 122 + extern/freestyle/src/scene_graph/NodeGroup.h | 84 + .../freestyle/src/scene_graph/NodeLight.cpp | 80 + extern/freestyle/src/scene_graph/NodeLight.h | 86 + .../freestyle/src/scene_graph/NodeShape.cpp | 51 + extern/freestyle/src/scene_graph/NodeShape.h | 89 + .../src/scene_graph/NodeTransform.cpp | 166 + .../freestyle/src/scene_graph/NodeTransform.h | 107 + .../src/scene_graph/OrientedLineRep.cpp | 31 + .../src/scene_graph/OrientedLineRep.h | 67 + extern/freestyle/src/scene_graph/Rep.cpp | 1 + extern/freestyle/src/scene_graph/Rep.h | 127 + .../src/scene_graph/ScenePrettyPrinter.cpp | 86 + .../src/scene_graph/ScenePrettyPrinter.h | 105 + .../src/scene_graph/SceneVisitor.cpp | 1 + .../freestyle/src/scene_graph/SceneVisitor.h | 98 + .../freestyle/src/scene_graph/TriangleRep.cpp | 59 + .../freestyle/src/scene_graph/TriangleRep.h | 106 + .../freestyle/src/scene_graph/VertexRep.cpp | 29 + extern/freestyle/src/scene_graph/VertexRep.h | 87 + .../freestyle/src/scene_graph/scene_graph.pro | 86 + extern/freestyle/src/scene_graph/src.pri | 41 + .../src/stroke/AdvancedFunctions0D.cpp | 85 + .../src/stroke/AdvancedFunctions0D.h | 209 + .../src/stroke/AdvancedFunctions1D.cpp | 108 + .../src/stroke/AdvancedFunctions1D.h | 286 + .../src/stroke/AdvancedPredicates1D.h | 81 + .../src/stroke/AdvancedStrokeShaders.cpp | 423 + .../src/stroke/AdvancedStrokeShaders.h | 222 + .../src/stroke/BasicStrokeShaders.cpp | 1100 + .../freestyle/src/stroke/BasicStrokeShaders.h | 791 + extern/freestyle/src/stroke/Canvas.cpp | 427 + extern/freestyle/src/stroke/Canvas.h | 198 + extern/freestyle/src/stroke/Chain.cpp | 126 + extern/freestyle/src/stroke/Chain.h | 82 + .../src/stroke/ChainingIterators.cpp | 147 + .../freestyle/src/stroke/ChainingIterators.h | 364 + .../freestyle/src/stroke/ContextFunctions.cpp | 60 + .../freestyle/src/stroke/ContextFunctions.h | 124 + extern/freestyle/src/stroke/Curve.cpp | 818 + extern/freestyle/src/stroke/Curve.h | 463 + .../src/stroke/CurveAdvancedIterators.h | 378 + extern/freestyle/src/stroke/CurveIterators.h | 295 + extern/freestyle/src/stroke/Modifiers.h | 71 + extern/freestyle/src/stroke/Module.h | 72 + extern/freestyle/src/stroke/Operators.cpp | 862 + extern/freestyle/src/stroke/Operators.h | 311 + .../freestyle/src/stroke/PSStrokeRenderer.cpp | 89 + .../freestyle/src/stroke/PSStrokeRenderer.h | 63 + extern/freestyle/src/stroke/Predicates0D.h | 160 + extern/freestyle/src/stroke/Predicates1D.h | 438 + extern/freestyle/src/stroke/QInformationMap.h | 58 + extern/freestyle/src/stroke/Stroke.cpp | 949 + extern/freestyle/src/stroke/Stroke.h | 584 + .../src/stroke/StrokeAdvancedIterators.h | 142 + extern/freestyle/src/stroke/StrokeIO.cpp | 55 + extern/freestyle/src/stroke/StrokeIO.h | 47 + extern/freestyle/src/stroke/StrokeIterators.h | 227 + extern/freestyle/src/stroke/StrokeLayer.cpp | 55 + extern/freestyle/src/stroke/StrokeLayer.h | 75 + .../freestyle/src/stroke/StrokeRenderer.cpp | 146 + extern/freestyle/src/stroke/StrokeRenderer.h | 140 + extern/freestyle/src/stroke/StrokeRep.cpp | 820 + extern/freestyle/src/stroke/StrokeRep.h | 138 + extern/freestyle/src/stroke/StrokeShader.h | 119 + .../freestyle/src/stroke/StrokeTesselator.cpp | 88 + .../freestyle/src/stroke/StrokeTesselator.h | 67 + extern/freestyle/src/stroke/StyleModule.h | 144 + .../src/stroke/TextStrokeRenderer.cpp | 73 + .../freestyle/src/stroke/TextStrokeRenderer.h | 68 + extern/freestyle/src/stroke/src.pri | 54 + extern/freestyle/src/stroke/stroke.pro | 89 + extern/freestyle/src/swig/Freestyle.i | 283 + .../src/swig/FreestyleWrapper.vc7.vcproj | 217 + .../src/swig/FreestyleWrapper.vc8.vcproj | 283 + extern/freestyle/src/swig/Makefile | 90 + extern/freestyle/src/swig/Makefile.cygwin | 92 + extern/freestyle/src/swig/Makefile.linux | 91 + extern/freestyle/src/swig/Makefile.mac | 91 + extern/freestyle/src/swig/Makefile.noswig | 64 + extern/freestyle/src/swig/ModuleWrapper.cpp | 111845 +++++++++++++++ extern/freestyle/src/swig/ModuleWrapper.h | 1045 + extern/freestyle/src/system/BaseIterator.h | 90 + extern/freestyle/src/system/BaseObject.cpp | 1 + extern/freestyle/src/system/BaseObject.h | 73 + extern/freestyle/src/system/Cast.h | 44 + extern/freestyle/src/system/Exception.cpp | 24 + extern/freestyle/src/system/Exception.h | 64 + extern/freestyle/src/system/FreestyleConfig.h | 152 + extern/freestyle/src/system/Id.h | 126 + extern/freestyle/src/system/Interpreter.h | 56 + extern/freestyle/src/system/Precision.h | 39 + extern/freestyle/src/system/ProgressBar.h | 85 + extern/freestyle/src/system/PseudoNoise.cpp | 108 + extern/freestyle/src/system/PseudoNoise.h | 58 + .../src/system/PythonInterpreter.cpp | 25 + .../freestyle/src/system/PythonInterpreter.h | 111 + extern/freestyle/src/system/RandGen.cpp | 86 + extern/freestyle/src/system/RandGen.h | 48 + extern/freestyle/src/system/StringUtils.cpp | 46 + extern/freestyle/src/system/StringUtils.h | 51 + extern/freestyle/src/system/TimeStamp.cpp | 25 + extern/freestyle/src/system/TimeStamp.h | 71 + extern/freestyle/src/system/TimeUtils.h | 58 + extern/freestyle/src/system/src.pri | 30 + extern/freestyle/src/system/system.pro | 73 + .../freestyle/src/view_map/FEdgeXDetector.cpp | 677 + .../freestyle/src/view_map/FEdgeXDetector.h | 150 + extern/freestyle/src/view_map/Functions0D.cpp | 356 + extern/freestyle/src/view_map/Functions0D.h | 487 + extern/freestyle/src/view_map/Functions1D.cpp | 209 + extern/freestyle/src/view_map/Functions1D.h | 537 + extern/freestyle/src/view_map/Interface0D.h | 351 + extern/freestyle/src/view_map/Interface1D.h | 202 + extern/freestyle/src/view_map/Silhouette.cpp | 370 + extern/freestyle/src/view_map/Silhouette.h | 1417 + .../src/view_map/SilhouetteGeomEngine.cpp | 185 + .../src/view_map/SilhouetteGeomEngine.h | 122 + .../src/view_map/SteerableViewMap.cpp | 243 + .../freestyle/src/view_map/SteerableViewMap.h | 153 + .../src/view_map/ViewEdgeXBuilder.cpp | 666 + .../freestyle/src/view_map/ViewEdgeXBuilder.h | 214 + extern/freestyle/src/view_map/ViewMap.cpp | 703 + extern/freestyle/src/view_map/ViewMap.h | 1487 + .../src/view_map/ViewMapAdvancedIterators.h | 691 + .../freestyle/src/view_map/ViewMapBuilder.cpp | 1027 + .../freestyle/src/view_map/ViewMapBuilder.h | 224 + extern/freestyle/src/view_map/ViewMapIO.cpp | 1245 + extern/freestyle/src/view_map/ViewMapIO.h | 116 + .../freestyle/src/view_map/ViewMapIterators.h | 542 + .../src/view_map/ViewMapTesselator.cpp | 36 + .../src/view_map/ViewMapTesselator.h | 196 + extern/freestyle/src/view_map/src.pri | 34 + extern/freestyle/src/view_map/view_map.pro | 89 + .../freestyle/src/winged_edge/Curvature.cpp | 647 + extern/freestyle/src/winged_edge/Curvature.h | 156 + extern/freestyle/src/winged_edge/Nature.h | 75 + extern/freestyle/src/winged_edge/WEdge.cpp | 732 + extern/freestyle/src/winged_edge/WEdge.h | 952 + .../freestyle/src/winged_edge/WFillGrid.cpp | 60 + extern/freestyle/src/winged_edge/WFillGrid.h | 80 + .../freestyle/src/winged_edge/WSFillGrid.cpp | 60 + extern/freestyle/src/winged_edge/WSFillGrid.h | 79 + extern/freestyle/src/winged_edge/WXEdge.cpp | 296 + extern/freestyle/src/winged_edge/WXEdge.h | 582 + .../src/winged_edge/WXEdgeBuilder.cpp | 43 + .../freestyle/src/winged_edge/WXEdgeBuilder.h | 51 + .../src/winged_edge/WingedEdgeBuilder.cpp | 362 + .../src/winged_edge/WingedEdgeBuilder.h | 160 + extern/freestyle/src/winged_edge/src.pri | 21 + .../freestyle/src/winged_edge/winged_edge.pro | 84 + .../style_modules/ChainingIterators.py | 731 + extern/freestyle/style_modules/Functions0D.py | 81 + extern/freestyle/style_modules/Functions1D.py | 45 + .../freestyle/style_modules/PredicatesB1D.py | 70 + .../freestyle/style_modules/PredicatesU0D.py | 103 + .../freestyle/style_modules/PredicatesU1D.py | 381 + .../style_modules/anisotropic_diffusion.py | 75 + .../apriori_and_causal_density.py | 45 + .../style_modules/apriori_density.py | 43 + .../style_modules/backbone_stretcher.py | 36 + .../style_modules/blueprint_circles.py | 46 + .../style_modules/blueprint_ellipses.py | 46 + .../style_modules/blueprint_squares.py | 45 + extern/freestyle/style_modules/cartoon.py | 42 + extern/freestyle/style_modules/contour.py | 42 + extern/freestyle/style_modules/curvature2d.py | 60 + .../style_modules/external_contour.py | 43 + .../style_modules/external_contour_sketchy.py | 48 + .../style_modules/external_contour_smooth.py | 44 + .../freestyle/style_modules/extra-lines.sml | 3 + extern/freestyle/style_modules/haloing.py | 50 + .../style_modules/ignore_small_occlusions.py | 41 + .../style_modules/invisible_lines.py | 42 + .../style_modules/japanese_bigbrush.py | 59 + .../style_modules/logical_operators.py | 36 + .../long_anisotropically_dense.py | 81 + .../multiple_parameterization.py | 51 + extern/freestyle/style_modules/nature.py | 43 + extern/freestyle/style_modules/near_lines.py | 44 + .../occluded_by_specific_object.py | 45 + .../freestyle/style_modules/polygonalize.py | 40 + extern/freestyle/style_modules/qi0.py | 41 + .../style_modules/qi0_not_external_contour.py | 43 + extern/freestyle/style_modules/qi1.py | 42 + extern/freestyle/style_modules/qi2.py | 42 + .../style_modules/sequentialsplit_sketchy.py | 68 + extern/freestyle/style_modules/shaders.py | 1288 + .../sketchy_multiple_parameterization.py | 48 + .../style_modules/sketchy_topology_broken.py | 89 + .../sketchy_topology_preserved.py | 49 + .../split_at_highest_2d_curvatures.py | 40 + .../style_modules/split_at_tvertices.py | 42 + .../freestyle/style_modules/stroke_texture.py | 43 + extern/freestyle/style_modules/suggestive.py | 43 + .../thickness_fof_depth_discontinuity.py | 62 + extern/freestyle/style_modules/tipremover.py | 42 + .../style_modules/tvertex_remover.py | 42 + .../style_modules/uniformpruning_zsort.py | 40 + extern/freestyle/style_modules/vector.py | 241 + 348 files changed, 182620 insertions(+) create mode 100755 extern/freestyle/AUTHORS.TXT create mode 100755 extern/freestyle/BUGS.TXT create mode 100755 extern/freestyle/COPYRIGHT.TXT create mode 100755 extern/freestyle/INSTALL.TXT create mode 100755 extern/freestyle/LICENSE.TXT create mode 100755 extern/freestyle/README.TXT create mode 100755 extern/freestyle/THANKS.TXT create mode 100755 extern/freestyle/TODO.TXT create mode 100755 extern/freestyle/src/Config.pri create mode 100755 extern/freestyle/src/Freestyle-vc7-debug.sln create mode 100755 extern/freestyle/src/Freestyle-vc7-release.sln create mode 100755 extern/freestyle/src/Freestyle-vc8-debug.sln create mode 100755 extern/freestyle/src/Freestyle-vc8-release.sln create mode 100755 extern/freestyle/src/Makefile.pro create mode 100755 extern/freestyle/src/app/AppAboutWindow.cpp create mode 100755 extern/freestyle/src/app/AppAboutWindow.h create mode 100755 extern/freestyle/src/app/AppCanvas.cpp create mode 100755 extern/freestyle/src/app/AppCanvas.h create mode 100755 extern/freestyle/src/app/AppConfig.cpp create mode 100755 extern/freestyle/src/app/AppConfig.h create mode 100755 extern/freestyle/src/app/AppDensityCurvesWindow.cpp create mode 100755 extern/freestyle/src/app/AppDensityCurvesWindow.h create mode 100755 extern/freestyle/src/app/AppGL2DCurvesViewer.cpp create mode 100755 extern/freestyle/src/app/AppGL2DCurvesViewer.h create mode 100755 extern/freestyle/src/app/AppGLWidget.cpp create mode 100755 extern/freestyle/src/app/AppGLWidget.h create mode 100755 extern/freestyle/src/app/AppInteractiveShaderWindow.cpp create mode 100755 extern/freestyle/src/app/AppInteractiveShaderWindow.h create mode 100755 extern/freestyle/src/app/AppMainWindow.cpp create mode 100755 extern/freestyle/src/app/AppMainWindow.h create mode 100755 extern/freestyle/src/app/AppOptionsWindow.cpp create mode 100755 extern/freestyle/src/app/AppOptionsWindow.h create mode 100755 extern/freestyle/src/app/AppProgressBar.cpp create mode 100755 extern/freestyle/src/app/AppProgressBar.h create mode 100755 extern/freestyle/src/app/AppStyleWindow.cpp create mode 100755 extern/freestyle/src/app/AppStyleWindow.h create mode 100755 extern/freestyle/src/app/ConfigIO.cpp create mode 100755 extern/freestyle/src/app/ConfigIO.h create mode 100755 extern/freestyle/src/app/Controller.cpp create mode 100755 extern/freestyle/src/app/Controller.h create mode 100755 extern/freestyle/src/app/Main.cpp create mode 100755 extern/freestyle/src/app/QGLBasicWidget.cpp create mode 100755 extern/freestyle/src/app/QGLBasicWidget.h create mode 100755 extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.cpp create mode 100755 extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.h create mode 100755 extern/freestyle/src/app/app.pro create mode 100755 extern/freestyle/src/app/appmainwindowbase4.ui create mode 100755 extern/freestyle/src/app/densitycurveswindow4.ui create mode 100755 extern/freestyle/src/app/freestyle.qrc create mode 100755 extern/freestyle/src/app/icons/add.png create mode 100755 extern/freestyle/src/app/icons/arrow_down.png create mode 100755 extern/freestyle/src/app/icons/arrow_left.png create mode 100755 extern/freestyle/src/app/icons/arrow_right.png create mode 100755 extern/freestyle/src/app/icons/arrow_up.png create mode 100755 extern/freestyle/src/app/icons/clear.png create mode 100755 extern/freestyle/src/app/icons/close.png create mode 100755 extern/freestyle/src/app/icons/edit.png create mode 100755 extern/freestyle/src/app/icons/eye0.png create mode 100755 extern/freestyle/src/app/icons/eye1.png create mode 100755 extern/freestyle/src/app/icons/folder.png create mode 100755 extern/freestyle/src/app/icons/home.png create mode 100755 extern/freestyle/src/app/icons/mod0.png create mode 100755 extern/freestyle/src/app/icons/mod1.png create mode 100755 extern/freestyle/src/app/icons/ok.png create mode 100755 extern/freestyle/src/app/icons/reload.png create mode 100755 extern/freestyle/src/app/icons/remove.png create mode 100755 extern/freestyle/src/app/icons/save.png create mode 100755 extern/freestyle/src/app/icons/save_as.png create mode 100755 extern/freestyle/src/app/interactiveshaderwindow4.ui create mode 100755 extern/freestyle/src/app/optionswindow4.ui create mode 100755 extern/freestyle/src/app/progressdialog4.ui create mode 100755 extern/freestyle/src/app/src.pri create mode 100755 extern/freestyle/src/app/stylewindow4.ui create mode 100755 extern/freestyle/src/build_bundle.macosx.py create mode 100755 extern/freestyle/src/geometry/BBox.h create mode 100755 extern/freestyle/src/geometry/Bezier.cpp create mode 100755 extern/freestyle/src/geometry/Bezier.h create mode 100755 extern/freestyle/src/geometry/FastGrid.cpp create mode 100755 extern/freestyle/src/geometry/FastGrid.h create mode 100755 extern/freestyle/src/geometry/FitCurve.cpp create mode 100755 extern/freestyle/src/geometry/FitCurve.h create mode 100755 extern/freestyle/src/geometry/Geom.h create mode 100755 extern/freestyle/src/geometry/GeomCleaner.cpp create mode 100755 extern/freestyle/src/geometry/GeomCleaner.h create mode 100755 extern/freestyle/src/geometry/GeomUtils.cpp create mode 100755 extern/freestyle/src/geometry/GeomUtils.h create mode 100755 extern/freestyle/src/geometry/Grid.cpp create mode 100755 extern/freestyle/src/geometry/Grid.h create mode 100755 extern/freestyle/src/geometry/HashGrid.cpp create mode 100755 extern/freestyle/src/geometry/HashGrid.h create mode 100755 extern/freestyle/src/geometry/Noise.cpp create mode 100755 extern/freestyle/src/geometry/Noise.h create mode 100755 extern/freestyle/src/geometry/Polygon.h create mode 100755 extern/freestyle/src/geometry/SweepLine.h create mode 100755 extern/freestyle/src/geometry/VecMat.h create mode 100755 extern/freestyle/src/geometry/geometry.pro create mode 100755 extern/freestyle/src/geometry/matrix_util.cpp create mode 100755 extern/freestyle/src/geometry/matrix_util.h create mode 100755 extern/freestyle/src/geometry/normal_cycle.cpp create mode 100755 extern/freestyle/src/geometry/normal_cycle.h create mode 100755 extern/freestyle/src/geometry/src.pri create mode 100755 extern/freestyle/src/image/GaussianFilter.cpp create mode 100755 extern/freestyle/src/image/GaussianFilter.h create mode 100755 extern/freestyle/src/image/Image.h create mode 100755 extern/freestyle/src/image/ImagePyramid.cpp create mode 100755 extern/freestyle/src/image/ImagePyramid.h create mode 100755 extern/freestyle/src/image/image.pro create mode 100755 extern/freestyle/src/image/src.pri create mode 100755 extern/freestyle/src/libconfig.pri create mode 100755 extern/freestyle/src/makedsp.vcnet.debug.bat create mode 100755 extern/freestyle/src/makedsp.vcnet.release.bat create mode 100755 extern/freestyle/src/rendering/GLBBoxRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLBBoxRenderer.h create mode 100755 extern/freestyle/src/rendering/GLDebugRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLDebugRenderer.h create mode 100644 extern/freestyle/src/rendering/GLFreeMemoryVisitor.cpp create mode 100644 extern/freestyle/src/rendering/GLFreeMemoryVisitor.h create mode 100755 extern/freestyle/src/rendering/GLMonoColorRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLMonoColorRenderer.h create mode 100755 extern/freestyle/src/rendering/GLRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLRenderer.h create mode 100755 extern/freestyle/src/rendering/GLSelectRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLSelectRenderer.h create mode 100755 extern/freestyle/src/rendering/GLStrokeRenderer.cpp create mode 100755 extern/freestyle/src/rendering/GLStrokeRenderer.h create mode 100755 extern/freestyle/src/rendering/GLUtils.cpp create mode 100755 extern/freestyle/src/rendering/GLUtils.h create mode 100755 extern/freestyle/src/rendering/GLXOffscreenViewer.cpp create mode 100755 extern/freestyle/src/rendering/GLXOffscreenViewer.h create mode 100755 extern/freestyle/src/rendering/extgl.cpp create mode 100755 extern/freestyle/src/rendering/extgl.h create mode 100755 extern/freestyle/src/rendering/pbuffer.cpp create mode 100755 extern/freestyle/src/rendering/pbuffer.h create mode 100755 extern/freestyle/src/rendering/rendering.pro create mode 100755 extern/freestyle/src/rendering/src.pri create mode 100755 extern/freestyle/src/scene_graph/DrawingStyle.h create mode 100755 extern/freestyle/src/scene_graph/IndexedFaceSet.cpp create mode 100755 extern/freestyle/src/scene_graph/IndexedFaceSet.h create mode 100755 extern/freestyle/src/scene_graph/LineRep.cpp create mode 100755 extern/freestyle/src/scene_graph/LineRep.h create mode 100755 extern/freestyle/src/scene_graph/Material.h create mode 100755 extern/freestyle/src/scene_graph/MaxFileLoader.cpp create mode 100755 extern/freestyle/src/scene_graph/MaxFileLoader.h create mode 100755 extern/freestyle/src/scene_graph/Node.h create mode 100644 extern/freestyle/src/scene_graph/NodeCamera.cpp create mode 100644 extern/freestyle/src/scene_graph/NodeCamera.h create mode 100755 extern/freestyle/src/scene_graph/NodeDrawingStyle.cpp create mode 100755 extern/freestyle/src/scene_graph/NodeDrawingStyle.h create mode 100755 extern/freestyle/src/scene_graph/NodeGroup.cpp create mode 100755 extern/freestyle/src/scene_graph/NodeGroup.h create mode 100755 extern/freestyle/src/scene_graph/NodeLight.cpp create mode 100755 extern/freestyle/src/scene_graph/NodeLight.h create mode 100755 extern/freestyle/src/scene_graph/NodeShape.cpp create mode 100755 extern/freestyle/src/scene_graph/NodeShape.h create mode 100755 extern/freestyle/src/scene_graph/NodeTransform.cpp create mode 100755 extern/freestyle/src/scene_graph/NodeTransform.h create mode 100755 extern/freestyle/src/scene_graph/OrientedLineRep.cpp create mode 100755 extern/freestyle/src/scene_graph/OrientedLineRep.h create mode 100755 extern/freestyle/src/scene_graph/Rep.cpp create mode 100755 extern/freestyle/src/scene_graph/Rep.h create mode 100755 extern/freestyle/src/scene_graph/ScenePrettyPrinter.cpp create mode 100755 extern/freestyle/src/scene_graph/ScenePrettyPrinter.h create mode 100755 extern/freestyle/src/scene_graph/SceneVisitor.cpp create mode 100755 extern/freestyle/src/scene_graph/SceneVisitor.h create mode 100755 extern/freestyle/src/scene_graph/TriangleRep.cpp create mode 100755 extern/freestyle/src/scene_graph/TriangleRep.h create mode 100755 extern/freestyle/src/scene_graph/VertexRep.cpp create mode 100755 extern/freestyle/src/scene_graph/VertexRep.h create mode 100755 extern/freestyle/src/scene_graph/scene_graph.pro create mode 100755 extern/freestyle/src/scene_graph/src.pri create mode 100755 extern/freestyle/src/stroke/AdvancedFunctions0D.cpp create mode 100755 extern/freestyle/src/stroke/AdvancedFunctions0D.h create mode 100755 extern/freestyle/src/stroke/AdvancedFunctions1D.cpp create mode 100755 extern/freestyle/src/stroke/AdvancedFunctions1D.h create mode 100755 extern/freestyle/src/stroke/AdvancedPredicates1D.h create mode 100755 extern/freestyle/src/stroke/AdvancedStrokeShaders.cpp create mode 100755 extern/freestyle/src/stroke/AdvancedStrokeShaders.h create mode 100755 extern/freestyle/src/stroke/BasicStrokeShaders.cpp create mode 100755 extern/freestyle/src/stroke/BasicStrokeShaders.h create mode 100755 extern/freestyle/src/stroke/Canvas.cpp create mode 100755 extern/freestyle/src/stroke/Canvas.h create mode 100755 extern/freestyle/src/stroke/Chain.cpp create mode 100755 extern/freestyle/src/stroke/Chain.h create mode 100755 extern/freestyle/src/stroke/ChainingIterators.cpp create mode 100755 extern/freestyle/src/stroke/ChainingIterators.h create mode 100755 extern/freestyle/src/stroke/ContextFunctions.cpp create mode 100755 extern/freestyle/src/stroke/ContextFunctions.h create mode 100755 extern/freestyle/src/stroke/Curve.cpp create mode 100755 extern/freestyle/src/stroke/Curve.h create mode 100755 extern/freestyle/src/stroke/CurveAdvancedIterators.h create mode 100755 extern/freestyle/src/stroke/CurveIterators.h create mode 100755 extern/freestyle/src/stroke/Modifiers.h create mode 100755 extern/freestyle/src/stroke/Module.h create mode 100755 extern/freestyle/src/stroke/Operators.cpp create mode 100755 extern/freestyle/src/stroke/Operators.h create mode 100755 extern/freestyle/src/stroke/PSStrokeRenderer.cpp create mode 100755 extern/freestyle/src/stroke/PSStrokeRenderer.h create mode 100755 extern/freestyle/src/stroke/Predicates0D.h create mode 100755 extern/freestyle/src/stroke/Predicates1D.h create mode 100755 extern/freestyle/src/stroke/QInformationMap.h create mode 100755 extern/freestyle/src/stroke/Stroke.cpp create mode 100755 extern/freestyle/src/stroke/Stroke.h create mode 100755 extern/freestyle/src/stroke/StrokeAdvancedIterators.h create mode 100755 extern/freestyle/src/stroke/StrokeIO.cpp create mode 100755 extern/freestyle/src/stroke/StrokeIO.h create mode 100755 extern/freestyle/src/stroke/StrokeIterators.h create mode 100755 extern/freestyle/src/stroke/StrokeLayer.cpp create mode 100755 extern/freestyle/src/stroke/StrokeLayer.h create mode 100755 extern/freestyle/src/stroke/StrokeRenderer.cpp create mode 100755 extern/freestyle/src/stroke/StrokeRenderer.h create mode 100755 extern/freestyle/src/stroke/StrokeRep.cpp create mode 100755 extern/freestyle/src/stroke/StrokeRep.h create mode 100755 extern/freestyle/src/stroke/StrokeShader.h create mode 100755 extern/freestyle/src/stroke/StrokeTesselator.cpp create mode 100755 extern/freestyle/src/stroke/StrokeTesselator.h create mode 100755 extern/freestyle/src/stroke/StyleModule.h create mode 100755 extern/freestyle/src/stroke/TextStrokeRenderer.cpp create mode 100755 extern/freestyle/src/stroke/TextStrokeRenderer.h create mode 100755 extern/freestyle/src/stroke/src.pri create mode 100755 extern/freestyle/src/stroke/stroke.pro create mode 100755 extern/freestyle/src/swig/Freestyle.i create mode 100755 extern/freestyle/src/swig/FreestyleWrapper.vc7.vcproj create mode 100755 extern/freestyle/src/swig/FreestyleWrapper.vc8.vcproj create mode 100755 extern/freestyle/src/swig/Makefile create mode 100755 extern/freestyle/src/swig/Makefile.cygwin create mode 100755 extern/freestyle/src/swig/Makefile.linux create mode 100644 extern/freestyle/src/swig/Makefile.mac create mode 100755 extern/freestyle/src/swig/Makefile.noswig create mode 100755 extern/freestyle/src/swig/ModuleWrapper.cpp create mode 100755 extern/freestyle/src/swig/ModuleWrapper.h create mode 100755 extern/freestyle/src/system/BaseIterator.h create mode 100755 extern/freestyle/src/system/BaseObject.cpp create mode 100755 extern/freestyle/src/system/BaseObject.h create mode 100755 extern/freestyle/src/system/Cast.h create mode 100755 extern/freestyle/src/system/Exception.cpp create mode 100755 extern/freestyle/src/system/Exception.h create mode 100755 extern/freestyle/src/system/FreestyleConfig.h create mode 100755 extern/freestyle/src/system/Id.h create mode 100755 extern/freestyle/src/system/Interpreter.h create mode 100755 extern/freestyle/src/system/Precision.h create mode 100755 extern/freestyle/src/system/ProgressBar.h create mode 100755 extern/freestyle/src/system/PseudoNoise.cpp create mode 100755 extern/freestyle/src/system/PseudoNoise.h create mode 100755 extern/freestyle/src/system/PythonInterpreter.cpp create mode 100755 extern/freestyle/src/system/PythonInterpreter.h create mode 100755 extern/freestyle/src/system/RandGen.cpp create mode 100755 extern/freestyle/src/system/RandGen.h create mode 100755 extern/freestyle/src/system/StringUtils.cpp create mode 100755 extern/freestyle/src/system/StringUtils.h create mode 100755 extern/freestyle/src/system/TimeStamp.cpp create mode 100755 extern/freestyle/src/system/TimeStamp.h create mode 100755 extern/freestyle/src/system/TimeUtils.h create mode 100755 extern/freestyle/src/system/src.pri create mode 100755 extern/freestyle/src/system/system.pro create mode 100755 extern/freestyle/src/view_map/FEdgeXDetector.cpp create mode 100755 extern/freestyle/src/view_map/FEdgeXDetector.h create mode 100755 extern/freestyle/src/view_map/Functions0D.cpp create mode 100755 extern/freestyle/src/view_map/Functions0D.h create mode 100755 extern/freestyle/src/view_map/Functions1D.cpp create mode 100755 extern/freestyle/src/view_map/Functions1D.h create mode 100755 extern/freestyle/src/view_map/Interface0D.h create mode 100755 extern/freestyle/src/view_map/Interface1D.h create mode 100755 extern/freestyle/src/view_map/Silhouette.cpp create mode 100755 extern/freestyle/src/view_map/Silhouette.h create mode 100755 extern/freestyle/src/view_map/SilhouetteGeomEngine.cpp create mode 100755 extern/freestyle/src/view_map/SilhouetteGeomEngine.h create mode 100755 extern/freestyle/src/view_map/SteerableViewMap.cpp create mode 100755 extern/freestyle/src/view_map/SteerableViewMap.h create mode 100755 extern/freestyle/src/view_map/ViewEdgeXBuilder.cpp create mode 100755 extern/freestyle/src/view_map/ViewEdgeXBuilder.h create mode 100755 extern/freestyle/src/view_map/ViewMap.cpp create mode 100755 extern/freestyle/src/view_map/ViewMap.h create mode 100755 extern/freestyle/src/view_map/ViewMapAdvancedIterators.h create mode 100755 extern/freestyle/src/view_map/ViewMapBuilder.cpp create mode 100755 extern/freestyle/src/view_map/ViewMapBuilder.h create mode 100755 extern/freestyle/src/view_map/ViewMapIO.cpp create mode 100755 extern/freestyle/src/view_map/ViewMapIO.h create mode 100755 extern/freestyle/src/view_map/ViewMapIterators.h create mode 100755 extern/freestyle/src/view_map/ViewMapTesselator.cpp create mode 100755 extern/freestyle/src/view_map/ViewMapTesselator.h create mode 100755 extern/freestyle/src/view_map/src.pri create mode 100755 extern/freestyle/src/view_map/view_map.pro create mode 100755 extern/freestyle/src/winged_edge/Curvature.cpp create mode 100755 extern/freestyle/src/winged_edge/Curvature.h create mode 100755 extern/freestyle/src/winged_edge/Nature.h create mode 100755 extern/freestyle/src/winged_edge/WEdge.cpp create mode 100755 extern/freestyle/src/winged_edge/WEdge.h create mode 100755 extern/freestyle/src/winged_edge/WFillGrid.cpp create mode 100755 extern/freestyle/src/winged_edge/WFillGrid.h create mode 100755 extern/freestyle/src/winged_edge/WSFillGrid.cpp create mode 100755 extern/freestyle/src/winged_edge/WSFillGrid.h create mode 100755 extern/freestyle/src/winged_edge/WXEdge.cpp create mode 100755 extern/freestyle/src/winged_edge/WXEdge.h create mode 100755 extern/freestyle/src/winged_edge/WXEdgeBuilder.cpp create mode 100755 extern/freestyle/src/winged_edge/WXEdgeBuilder.h create mode 100755 extern/freestyle/src/winged_edge/WingedEdgeBuilder.cpp create mode 100755 extern/freestyle/src/winged_edge/WingedEdgeBuilder.h create mode 100755 extern/freestyle/src/winged_edge/src.pri create mode 100755 extern/freestyle/src/winged_edge/winged_edge.pro create mode 100755 extern/freestyle/style_modules/ChainingIterators.py create mode 100755 extern/freestyle/style_modules/Functions0D.py create mode 100755 extern/freestyle/style_modules/Functions1D.py create mode 100755 extern/freestyle/style_modules/PredicatesB1D.py create mode 100755 extern/freestyle/style_modules/PredicatesU0D.py create mode 100755 extern/freestyle/style_modules/PredicatesU1D.py create mode 100755 extern/freestyle/style_modules/anisotropic_diffusion.py create mode 100755 extern/freestyle/style_modules/apriori_and_causal_density.py create mode 100755 extern/freestyle/style_modules/apriori_density.py create mode 100755 extern/freestyle/style_modules/backbone_stretcher.py create mode 100755 extern/freestyle/style_modules/blueprint_circles.py create mode 100755 extern/freestyle/style_modules/blueprint_ellipses.py create mode 100755 extern/freestyle/style_modules/blueprint_squares.py create mode 100755 extern/freestyle/style_modules/cartoon.py create mode 100755 extern/freestyle/style_modules/contour.py create mode 100755 extern/freestyle/style_modules/curvature2d.py create mode 100755 extern/freestyle/style_modules/external_contour.py create mode 100755 extern/freestyle/style_modules/external_contour_sketchy.py create mode 100755 extern/freestyle/style_modules/external_contour_smooth.py create mode 100755 extern/freestyle/style_modules/extra-lines.sml create mode 100755 extern/freestyle/style_modules/haloing.py create mode 100755 extern/freestyle/style_modules/ignore_small_occlusions.py create mode 100755 extern/freestyle/style_modules/invisible_lines.py create mode 100755 extern/freestyle/style_modules/japanese_bigbrush.py create mode 100755 extern/freestyle/style_modules/logical_operators.py create mode 100755 extern/freestyle/style_modules/long_anisotropically_dense.py create mode 100755 extern/freestyle/style_modules/multiple_parameterization.py create mode 100755 extern/freestyle/style_modules/nature.py create mode 100755 extern/freestyle/style_modules/near_lines.py create mode 100755 extern/freestyle/style_modules/occluded_by_specific_object.py create mode 100755 extern/freestyle/style_modules/polygonalize.py create mode 100755 extern/freestyle/style_modules/qi0.py create mode 100755 extern/freestyle/style_modules/qi0_not_external_contour.py create mode 100755 extern/freestyle/style_modules/qi1.py create mode 100755 extern/freestyle/style_modules/qi2.py create mode 100755 extern/freestyle/style_modules/sequentialsplit_sketchy.py create mode 100755 extern/freestyle/style_modules/shaders.py create mode 100755 extern/freestyle/style_modules/sketchy_multiple_parameterization.py create mode 100755 extern/freestyle/style_modules/sketchy_topology_broken.py create mode 100755 extern/freestyle/style_modules/sketchy_topology_preserved.py create mode 100755 extern/freestyle/style_modules/split_at_highest_2d_curvatures.py create mode 100755 extern/freestyle/style_modules/split_at_tvertices.py create mode 100755 extern/freestyle/style_modules/stroke_texture.py create mode 100755 extern/freestyle/style_modules/suggestive.py create mode 100755 extern/freestyle/style_modules/thickness_fof_depth_discontinuity.py create mode 100755 extern/freestyle/style_modules/tipremover.py create mode 100755 extern/freestyle/style_modules/tvertex_remover.py create mode 100755 extern/freestyle/style_modules/uniformpruning_zsort.py create mode 100755 extern/freestyle/style_modules/vector.py diff --git a/extern/freestyle/AUTHORS.TXT b/extern/freestyle/AUTHORS.TXT new file mode 100755 index 00000000000..27cdb70d5ec --- /dev/null +++ b/extern/freestyle/AUTHORS.TXT @@ -0,0 +1,6 @@ +Authors +------- +Frédo Durand +Stéphane Grabli +François Sillion +Emmanuel Turquin diff --git a/extern/freestyle/BUGS.TXT b/extern/freestyle/BUGS.TXT new file mode 100755 index 00000000000..c5bad029a47 --- /dev/null +++ b/extern/freestyle/BUGS.TXT @@ -0,0 +1,11 @@ +* Application doesn't exit properly (eg style window still hangs out) +* macosx: Window bar is unaccessible. +* macosx: Build leds to an application that is half-bundle (for the executable) half UNIX-style (for libraries). +* Strokes Strips are sometimes incorrect +* TVertex sometimes points towards NULL ViewEdges +* Some points are found to be outside of the grid. (for big models and mostly in release mode). Probably due to precision problems. +* Operators::recursiveChains() and ViewEdgeIterator change ViewEdgeIterator so that it supports the copy of specialized types in a transparent way. It works here only because we're never copying it and because it is passed as a reference. +* Functions0D takes a Interface0DIterator& insted of a const Interface0DIterator& as argument. dangerous. +* crashes on big models + + diff --git a/extern/freestyle/COPYRIGHT.TXT b/extern/freestyle/COPYRIGHT.TXT new file mode 100755 index 00000000000..cd37bd16786 --- /dev/null +++ b/extern/freestyle/COPYRIGHT.TXT @@ -0,0 +1,9 @@ +Freestyle + +Copyright (c) 2001-2007 by the following: + + +Frédo Durand +Stéphane Grabli +François Sillion +Emmanuel Turquin diff --git a/extern/freestyle/INSTALL.TXT b/extern/freestyle/INSTALL.TXT new file mode 100755 index 00000000000..4fab1275116 --- /dev/null +++ b/extern/freestyle/INSTALL.TXT @@ -0,0 +1,79 @@ +Install +------- + +* UNIX/LINUX + +(for a more detailed description, see doc/linuxinstall.html) + + This is quite straightforward, provided that you have all the +needed libraries properly installed (see Requirements section in +the README.TXT file). +First, set the FREESTYLE-DIR environment variable to your +freestyle directory and then, simply type: + +$> cd "$FREESTYLE_DIR"/src +$> qmake +$> make + +Note: The SWIG wrapper hasn't been included in the qmake build +cycle yet and thus has to be compiled separately, by hand: + +$> cd "$FREESTYLE_DIR"/src/swig +$> make + +And to run the app: + +$> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./lib" +$> cd "$FREESTYLE_DIR"/build/linux-g++/release/ +$> ./Freestyle + + +* WINDOWS + + - If you downloaded the binary version: + +1) unzip the package +2) run vcredist_x86.exe +3) run Freestyle.exe + +- Compilation Instructions: + +(for a more detailed description, including the cygwin +compilation instructions, see doc/wininstall.html) + +1) launch 'makedsp.vcnet.debug.bat' in the 'src' subdir of your FREESTYLE_DIR to generate + a .vcproj file for each sub-project +2) open 'src/Freestyle-vc8-debug.sln' with Visual Studio (tested with VC++ 8 express edition) +3) compile the whole project using 'build solution' in the 'build' menu +4) run the app and enjoy ;) + +* MAC OS X + +(for a more detailed description, see doc/macosxinstall.html) + + This is quite straightforward, provided that you have all the +needed libraries properly installed (see Requirements section in +the README.TXT file). +First, set the FREESTYLE-DIR environment variable to your +freestyle directory and then, simply type: + +$> cd "$FREESTYLE_DIR"/src +$> qmake +$> make + +Note: The SWIG wrapper hasn't been included in the qmake build +cycle yet and thus has to be compiled separately, by hand: + +$> cd "$FREESTYLE_DIR"/src/swig +$> make + +And to run the app: + +$> build_bundle.macosx.py +$> cd "$FREESTYLE_DIR"/ +$> open Freestyle.App + + +* IRIX + +Not tested yet... diff --git a/extern/freestyle/LICENSE.TXT b/extern/freestyle/LICENSE.TXT new file mode 100755 index 00000000000..5b6e7c66c27 --- /dev/null +++ b/extern/freestyle/LICENSE.TXT @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/extern/freestyle/README.TXT b/extern/freestyle/README.TXT new file mode 100755 index 00000000000..b0d026c8b9b --- /dev/null +++ b/extern/freestyle/README.TXT @@ -0,0 +1,51 @@ +Freestyle, a procedural line drawing system +http://freestyle.sourceforge.net + +INTRODUCTION +------------ +Freestyle is a software for Non-Photorealistic Line Drawing rendering +from 3D scenes. It is designed as a programmable interface to allow +maximum control over the style of the final drawing: the user +"programs" how the silhouettes and other feature lines from the 3D +model should be turned into stylized strokes using a set of +programmable operators dedicated to style description. This +programmable approach, inspired by the shading languages available in +photorealistic renderers such as Pixar's RenderMan, overcomes the +limitations of integrated software with access to a limited number of +parameters and permits the design of an infinite variety of rich and +complex styles. The system currently focuses on pure line drawing as a +first step. The style description language is Python augmented with +our set of operators. Freestyle was developed in the framework of a +research project dedicated to the study of stylized line drawing +rendering from 3D scenes. Details about this research can be found at: + +http://artis.imag.fr/Projects/Style + +This software is distributed under +the terms of the GPL License. + +INSTALL +------- +Please see the file INSTALL.TXT for instructions on installation. + +REQUIREMENTS +------------ +- OpenGL >= 1.2 +- libQGLViewer = 2.2.5-1 +- lib3ds = 1.2 +- Qt = 4.2.3 +- SWIG = 1.3.31 +- Python = 2.5 + +For Linux and MacOSX: +- g++ = 4.0 or 4.1 + +For Windows: +- Visual Studio = 2003 or 2005 + +CONTACTING THE AUTHORS +---------------------- +See the AUTHORS.TXT file for contact information. + +Thank you for your interest in this project, we hope you enjoy using it. +--- diff --git a/extern/freestyle/THANKS.TXT b/extern/freestyle/THANKS.TXT new file mode 100755 index 00000000000..3147715a63f --- /dev/null +++ b/extern/freestyle/THANKS.TXT @@ -0,0 +1,6 @@ +The following is an incomplete list of people that have contributed to this +project in some way or another, in no particular order... + +* Thomas Netter (lib3ds fix) +* Gilles Debunne, creator and maintainer of the great libQGLViewer. +* Mark Rose, for his work on the SWIG director feature, and his help. diff --git a/extern/freestyle/TODO.TXT b/extern/freestyle/TODO.TXT new file mode 100755 index 00000000000..2e24752e026 --- /dev/null +++ b/extern/freestyle/TODO.TXT @@ -0,0 +1,9 @@ +sgrabli: +-------- + +* Update help and make it display correctly +* Recode the ViewMap building - the Y junctions are not detected for smooth objects right now. +* Check the strokes strippification code. It seems some parts are inverted. +* Fix the pbuffer so that ATI cards are supported + +* Merge Chain and Stroke classes (to Stroke) and improve the base of operators (select, chain, split, shade) consquently (also think about a way to easily specify the pipeline synchronization mode). diff --git a/extern/freestyle/src/Config.pri b/extern/freestyle/src/Config.pri new file mode 100755 index 00000000000..68763dba502 --- /dev/null +++ b/extern/freestyle/src/Config.pri @@ -0,0 +1,176 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# A p p l i c a t i o n & L i b r a r i e s # +# b u i l d c o n f i g u r a t i o n # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +# +# APPLICATION +# +####################################### + +APPNAME = Freestyle +APPVERSION_MAJ = 2 +APPVERSION_MID = 2 +APPVERSION_MIN = 0 +APPVERSION = $${APPVERSION_MAJ}.$${APPVERSION_MID}.$${APPVERSION_MIN} + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 5 + +LIB3DS_VERSION_MAJ = 1 +LIB3DS_VERSION_MIN = 30 + +# +# CONFIG +# +####################################### + +CONFIG -= debug release ReleaseBuild Release build_pass precompile_header debug_and_release debug_and_release_target +CONFIG *= qt shared stl exceptions rtti thread +CONFIG *= release # debug or release +CONFIG *= warn_off # warn_off or warn_on +mac:CONFIG += x86 +#mac:CONFIG += ppc +#mac:CONFIG *= lib_bundle + +#mac:QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.4u.sdk +#message($$CONFIG) +#CONFIG *= static +#CONFIG *= profiling + + + +QT += opengl + +# +# LIBRARIES +# +####################################### + +debug{ + LIB_GEOMETRY = $${APPNAME}Geometry_d + LIB_IMAGE = $${APPNAME}Image_d + LIB_RENDERING = $${APPNAME}Rendering_d + LIB_SCENE_GRAPH = $${APPNAME}SceneGraph_d + LIB_SYSTEM = $${APPNAME}System_d + LIB_VIEW_MAP = $${APPNAME}ViewMap_d + LIB_STROKE = $${APPNAME}Stroke_d + LIB_WINGED_EDGE = $${APPNAME}WingedEdge_d +}else{ + LIB_GEOMETRY = $${APPNAME}Geometry + LIB_IMAGE = $${APPNAME}Image + LIB_RENDERING = $${APPNAME}Rendering + LIB_SCENE_GRAPH = $${APPNAME}SceneGraph + LIB_SYSTEM = $${APPNAME}System + LIB_VIEW_MAP = $${APPNAME}ViewMap + LIB_STROKE = $${APPNAME}Stroke + LIB_WINGED_EDGE = $${APPNAME}WingedEdge +} + +LIBVERSION = $${APPVERSION_MAJ}.$${APPVERSION_MID} + + +# +# FLAGS +# +####################################### + +win32:QMAKE_CXXFLAGS *= /GR /GX +win32:QMAKE_CFLAGS *= /GR /GX +irix-n32:QMAKE_CFLAGS *= -LANG:std +irix-n32:QMAKE_CXXFLAGS *= -LANG:std +linux-g++:QMAKE_CFLAGS *= -Wno-deprecated +linux-g++:QMAKE_CXXFLAGS *= -Wno-deprecated +cygwin-g++:QMAKE_CFLAGS *= -Wno-deprecated +cygwin-g++:QMAKE_CXXFLAGS *= -Wno-deprecated -mno-win32 +mac:QMAKE_CFLAGS *= -Wno-deprecated +mac:QMAKE_CXXFLAGS *= -Wno-deprecated + +linux-g++:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +linux-g++:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +cygwin-g++:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +cygwin-g++:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +mac:QMAKE_CFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +mac:QMAKE_CXXFLAGS_RELEASE = -O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 + +profiling { + linux-g++:QMAKE_CFLAGS_DEBUG = -pg + linux-g++:QMAKE_CXXFLAGS_DEBUG = -pg + linux-g++:QMAKE_LFLAGS_DEBUG = -pg + cygwin-g++:QMAKE_CFLAGS_DEBUG = -pg + cygwin-g++:QMAKE_CXXFLAGS_DEBUG = -pg + cygwin-g++:QMAKE_LFLAGS_DEBUG = -pg + mac:QMAKE_CFLAGS_DEBUG = -pg + mac:QMAKE_CXXFLAGS_DEBUG = -pg + mac:QMAKE_LFLAGS_DEBUG = -pg +} + +# +# DEFINES +# +####################################### + +win32:DEFINES *= WIN32 QT_DLL QT_THREAD_SUPPORT +linux-g++:DEFINES *= LINUX +cygwin-g++:DEFINES *= CYGWIN +irix-n32:DEFINES *= IRIX +mac:DEFINES *= MACOSX + +# +# BUILD DIRECTORIES (RELATIVE) +# +####################################### + +release { + win32 { + REL_OBJECTS_DIR = \\win32\\release\\obj + REL_DESTDIR = \\win32\\release + } + linux-g++ { + REL_OBJECTS_DIR = linux-g++/release/obj + REL_DESTDIR = linux-g++/release + } + cygwin-g++ { + REL_OBJECTS_DIR = cygwin-g++/release/obj + REL_DESTDIR = cygwin-g++/release + } + irix-n32 { + REL_OBJECTS_DIR = irix-n32/release/obj + REL_DESTDIR = irix-n32/release + } + mac { + REL_OBJECTS_DIR = macosx/release/obj + REL_DESTDIR = macosx/release + } +} +debug { + win32 { + REL_OBJECTS_DIR = \\win32\\debug\\obj + REL_DESTDIR = \\win32\\debug + } + linux-g++ { + REL_OBJECTS_DIR = linux-g++/debug/obj + REL_DESTDIR = linux-g++/debug + } + cygwin-g++ { + REL_OBJECTS_DIR = cygwin-g++/debug/obj + REL_DESTDIR = cygwin-g++/debug + } + irix-n32 { + REL_OBJECTS_DIR = irix-n32/debug/obj + REL_DESTDIR = irix-n32/debug + } + mac { + REL_OBJECTS_DIR = macosx/debug/obj + REL_DESTDIR = macosx/debug + } +} + +# +# INSTALL +# +####################################### + +#QMAKE_COPY_FILE = $${QMAKE_COPY} -P diff --git a/extern/freestyle/src/Freestyle-vc7-debug.sln b/extern/freestyle/src/Freestyle-vc7-debug.sln new file mode 100755 index 00000000000..937f3f9faf9 --- /dev/null +++ b/extern/freestyle/src/Freestyle-vc7-debug.sln @@ -0,0 +1,113 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle_d", "app\app_d.vcproj", "{0BC94A80-9E3E-40D8-B2CF-6594F96361C5}" + ProjectSection(ProjectDependencies) = postProject + {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} + {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} = {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} + {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry_d", "geometry\geometry_d.vcproj", "{3E1C0A57-8206-402F-A12E-3B100F121DDE}" + ProjectSection(ProjectDependencies) = postProject + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage_d", "image\image_d.vcproj", "{4C44396A-8016-4360-8F5C-35CA6CC282BD}" + ProjectSection(ProjectDependencies) = postProject + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering_d", "rendering\rendering_d.vcproj", "{9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}" + ProjectSection(ProjectDependencies) = postProject + {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph_d", "scene_graph\scene_graph_d.vcproj", "{858093EF-6B95-4D0F-AA0A-CF187C6F369F}" + ProjectSection(ProjectDependencies) = postProject + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke_d", "stroke\stroke_d.vcproj", "{DFCED64E-AEFA-4D06-8609-DE23A69D0361}" + ProjectSection(ProjectDependencies) = postProject + {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem_d", "system\system_d.vcproj", "{AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap_d", "view_map\view_map_d.vcproj", "{FA76B552-8A89-4A50-92F7-A77935515005}" + ProjectSection(ProjectDependencies) = postProject + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge_d", "winged_edge\winged_edge_d.vcproj", "{AF37DD50-8CD3-4339-AB32-C6F8F770CB30}" + ProjectSection(ProjectDependencies) = postProject + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.ActiveCfg = Debug|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.Build.0 = Debug|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.ActiveCfg = Debug|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.Build.0 = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.ActiveCfg = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.Build.0 = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.ActiveCfg = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.Build.0 = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.ActiveCfg = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.Build.0 = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.ActiveCfg = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.Build.0 = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.ActiveCfg = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.Build.0 = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.ActiveCfg = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.Build.0 = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.ActiveCfg = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.Build.0 = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.ActiveCfg = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.Build.0 = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.ActiveCfg = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.Build.0 = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.ActiveCfg = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.Build.0 = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.ActiveCfg = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.Build.0 = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.ActiveCfg = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.Build.0 = Debug|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.ActiveCfg = Debug|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.Build.0 = Debug|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Release.ActiveCfg = Release|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Release.Build.0 = Release|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.ActiveCfg = Debug|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.Build.0 = Debug|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.ActiveCfg = Debug|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/extern/freestyle/src/Freestyle-vc7-release.sln b/extern/freestyle/src/Freestyle-vc7-release.sln new file mode 100755 index 00000000000..74d5dc77f86 --- /dev/null +++ b/extern/freestyle/src/Freestyle-vc7-release.sln @@ -0,0 +1,111 @@ +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle", "app\app.vcproj", "{0BC94A80-9E3E-40D8-B2CF-6594F96361C5}" + ProjectSection(ProjectDependencies) = postProject + {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} + {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} = {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C} + {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry", "geometry\geometry.vcproj", "{3E1C0A57-8206-402F-A12E-3B100F121DDE}" + ProjectSection(ProjectDependencies) = postProject + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage", "image\image.vcproj", "{4C44396A-8016-4360-8F5C-35CA6CC282BD}" + ProjectSection(ProjectDependencies) = postProject + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering", "rendering\rendering.vcproj", "{9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}" + ProjectSection(ProjectDependencies) = postProject + {DFCED64E-AEFA-4D06-8609-DE23A69D0361} = {DFCED64E-AEFA-4D06-8609-DE23A69D0361} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph", "scene_graph\scene_graph.vcproj", "{858093EF-6B95-4D0F-AA0A-CF187C6F369F}" + ProjectSection(ProjectDependencies) = postProject + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke", "stroke\stroke.vcproj", "{DFCED64E-AEFA-4D06-8609-DE23A69D0361}" + ProjectSection(ProjectDependencies) = postProject + {FA76B552-8A89-4A50-92F7-A77935515005} = {FA76B552-8A89-4A50-92F7-A77935515005} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem", "system\system.vcproj", "{AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap", "view_map\view_map.vcproj", "{FA76B552-8A89-4A50-92F7-A77935515005}" + ProjectSection(ProjectDependencies) = postProject + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} = {AF37DD50-8CD3-4339-AB32-C6F8F770CB30} + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {4C44396A-8016-4360-8F5C-35CA6CC282BD} = {4C44396A-8016-4360-8F5C-35CA6CC282BD} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge", "winged_edge\winged_edge.vcproj", "{AF37DD50-8CD3-4339-AB32-C6F8F770CB30}" + ProjectSection(ProjectDependencies) = postProject + {3E1C0A57-8206-402F-A12E-3B100F121DDE} = {3E1C0A57-8206-402F-A12E-3B100F121DDE} + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} = {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A} + {858093EF-6B95-4D0F-AA0A-CF187C6F369F} = {858093EF-6B95-4D0F-AA0A-CF187C6F369F} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.ActiveCfg = Debug|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Debug.Build.0 = Debug|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.ActiveCfg = Release|Win32 + {0BC94A80-9E3E-40D8-B2CF-6594F96361C5}.Release.Build.0 = Release|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.ActiveCfg = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Debug.Build.0 = Debug|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.ActiveCfg = Release|Win32 + {3E1C0A57-8206-402F-A12E-3B100F121DDE}.Release.Build.0 = Release|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.ActiveCfg = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Debug.Build.0 = Debug|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.ActiveCfg = Release|Win32 + {4C44396A-8016-4360-8F5C-35CA6CC282BD}.Release.Build.0 = Release|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.ActiveCfg = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Debug.Build.0 = Debug|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.ActiveCfg = Release|Win32 + {9F2B9C57-F57F-4A8A-9590-6DDD1E51433C}.Release.Build.0 = Release|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.ActiveCfg = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Debug.Build.0 = Debug|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.ActiveCfg = Release|Win32 + {858093EF-6B95-4D0F-AA0A-CF187C6F369F}.Release.Build.0 = Release|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.ActiveCfg = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Debug.Build.0 = Debug|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.ActiveCfg = Release|Win32 + {DFCED64E-AEFA-4D06-8609-DE23A69D0361}.Release.Build.0 = Release|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.ActiveCfg = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Debug.Build.0 = Debug|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.ActiveCfg = Release|Win32 + {AE79BAD6-6F46-4AA1-BBEA-28CC209FC28A}.Release.Build.0 = Release|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.ActiveCfg = Debug|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Debug.Build.0 = Debug|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Release.ActiveCfg = Release|Win32 + {FA76B552-8A89-4A50-92F7-A77935515005}.Release.Build.0 = Release|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.ActiveCfg = Debug|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Debug.Build.0 = Debug|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.ActiveCfg = Release|Win32 + {AF37DD50-8CD3-4339-AB32-C6F8F770CB30}.Release.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/extern/freestyle/src/Freestyle-vc8-debug.sln b/extern/freestyle/src/Freestyle-vc8-debug.sln new file mode 100755 index 00000000000..097ca30a174 --- /dev/null +++ b/extern/freestyle/src/Freestyle-vc8-debug.sln @@ -0,0 +1,87 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem_d", "system\system_d.vcproj", "{AAAAA9BB-8C01-3BC3-9808-AB6717F08393}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry_d", "geometry\geometry_d.vcproj", "{5F60164C-8544-3259-A8CB-24636A092489}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage_d", "image\image_d.vcproj", "{28F6AC11-2A9B-3886-97DD-82FB353409CB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph_d", "scene_graph\scene_graph_d.vcproj", "{C98C60D8-9836-30A5-BEA9-0D320E5AF308}" + ProjectSection(ProjectDependencies) = postProject + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge_d", "winged_edge\winged_edge_d.vcproj", "{E46825D6-9581-3D8A-96FE-7C90BC188602}" + ProjectSection(ProjectDependencies) = postProject + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap_d", "view_map\view_map_d.vcproj", "{6769BAB7-2894-3453-B07A-58C32D6646E3}" + ProjectSection(ProjectDependencies) = postProject + {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308} + {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602} + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke_d", "stroke\stroke_d.vcproj", "{EDA5F096-B8D0-336F-82DB-501B2F00C1CD}" + ProjectSection(ProjectDependencies) = postProject + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + {6769BAB7-2894-3453-B07A-58C32D6646E3} = {6769BAB7-2894-3453-B07A-58C32D6646E3} + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602} + {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering_d", "rendering\rendering_d.vcproj", "{D5EA771F-A1FF-3F68-A391-98EEEB407E78}" + ProjectSection(ProjectDependencies) = postProject + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} = {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle_d", "app\app_d.vcproj", "{606D6459-D5F6-3A09-8962-50E8551545AB}" + ProjectSection(ProjectDependencies) = postProject + {C98C60D8-9836-30A5-BEA9-0D320E5AF308} = {C98C60D8-9836-30A5-BEA9-0D320E5AF308} + {E46825D6-9581-3D8A-96FE-7C90BC188602} = {E46825D6-9581-3D8A-96FE-7C90BC188602} + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} = {AAAAA9BB-8C01-3BC3-9808-AB6717F08393} + {6769BAB7-2894-3453-B07A-58C32D6646E3} = {6769BAB7-2894-3453-B07A-58C32D6646E3} + {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} = {EDA5F096-B8D0-336F-82DB-501B2F00C1CD} + {5F60164C-8544-3259-A8CB-24636A092489} = {5F60164C-8544-3259-A8CB-24636A092489} + {D5EA771F-A1FF-3F68-A391-98EEEB407E78} = {D5EA771F-A1FF-3F68-A391-98EEEB407E78} + {28F6AC11-2A9B-3886-97DD-82FB353409CB} = {28F6AC11-2A9B-3886-97DD-82FB353409CB} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAAAA9BB-8C01-3BC3-9808-AB6717F08393}.Debug|Win32.Build.0 = Debug|Win32 + {5F60164C-8544-3259-A8CB-24636A092489}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F60164C-8544-3259-A8CB-24636A092489}.Debug|Win32.Build.0 = Debug|Win32 + {28F6AC11-2A9B-3886-97DD-82FB353409CB}.Debug|Win32.ActiveCfg = Debug|Win32 + {28F6AC11-2A9B-3886-97DD-82FB353409CB}.Debug|Win32.Build.0 = Debug|Win32 + {C98C60D8-9836-30A5-BEA9-0D320E5AF308}.Debug|Win32.ActiveCfg = Debug|Win32 + {C98C60D8-9836-30A5-BEA9-0D320E5AF308}.Debug|Win32.Build.0 = Debug|Win32 + {E46825D6-9581-3D8A-96FE-7C90BC188602}.Debug|Win32.ActiveCfg = Debug|Win32 + {E46825D6-9581-3D8A-96FE-7C90BC188602}.Debug|Win32.Build.0 = Debug|Win32 + {6769BAB7-2894-3453-B07A-58C32D6646E3}.Debug|Win32.ActiveCfg = Debug|Win32 + {6769BAB7-2894-3453-B07A-58C32D6646E3}.Debug|Win32.Build.0 = Debug|Win32 + {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDA5F096-B8D0-336F-82DB-501B2F00C1CD}.Debug|Win32.Build.0 = Debug|Win32 + {D5EA771F-A1FF-3F68-A391-98EEEB407E78}.Debug|Win32.ActiveCfg = Debug|Win32 + {D5EA771F-A1FF-3F68-A391-98EEEB407E78}.Debug|Win32.Build.0 = Debug|Win32 + {606D6459-D5F6-3A09-8962-50E8551545AB}.Debug|Win32.ActiveCfg = Debug|Win32 + {606D6459-D5F6-3A09-8962-50E8551545AB}.Debug|Win32.Build.0 = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/extern/freestyle/src/Freestyle-vc8-release.sln b/extern/freestyle/src/Freestyle-vc8-release.sln new file mode 100755 index 00000000000..82b22ff0c3e --- /dev/null +++ b/extern/freestyle/src/Freestyle-vc8-release.sln @@ -0,0 +1,87 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Freestyle", "app\app.vcproj", "{B56F2464-158F-32C1-A9F7-EE85397706EC}" + ProjectSection(ProjectDependencies) = postProject + {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9} + {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} = {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} + {9A93A87D-09E4-3492-A68C-A7B1A38DE002} = {9A93A87D-09E4-3492-A68C-A7B1A38DE002} + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5} = {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5} + {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE} + {0FDD8610-0785-3089-900D-53F786E9AC9B} = {0FDD8610-0785-3089-900D-53F786E9AC9B} + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleGeometry", "geometry\geometry.vcproj", "{1D57A40D-AE4B-3E40-A023-4F37C9D7446C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleImage", "image\image.vcproj", "{A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleRendering", "rendering\rendering.vcproj", "{0FDD8610-0785-3089-900D-53F786E9AC9B}" + ProjectSection(ProjectDependencies) = postProject + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE} + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + {9A93A87D-09E4-3492-A68C-A7B1A38DE002} = {9A93A87D-09E4-3492-A68C-A7B1A38DE002} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSceneGraph", "scene_graph\scene_graph.vcproj", "{35891119-E049-35BB-AB8E-8536817F5CEE}" + ProjectSection(ProjectDependencies) = postProject + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleStroke", "stroke\stroke.vcproj", "{9A93A87D-09E4-3492-A68C-A7B1A38DE002}" + ProjectSection(ProjectDependencies) = postProject + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE} + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} = {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759} + {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleSystem", "system\system.vcproj", "{3804962B-1D5B-382E-B69E-96FFB2372A46}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleViewMap", "view_map\view_map.vcproj", "{F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}" + ProjectSection(ProjectDependencies) = postProject + {555B73B2-B07B-3865-9D41-0FB69091E0C9} = {555B73B2-B07B-3865-9D41-0FB69091E0C9} + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE} + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreestyleWingedEdge", "winged_edge\winged_edge.vcproj", "{555B73B2-B07B-3865-9D41-0FB69091E0C9}" + ProjectSection(ProjectDependencies) = postProject + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} = {1D57A40D-AE4B-3E40-A023-4F37C9D7446C} + {35891119-E049-35BB-AB8E-8536817F5CEE} = {35891119-E049-35BB-AB8E-8536817F5CEE} + {3804962B-1D5B-382E-B69E-96FFB2372A46} = {3804962B-1D5B-382E-B69E-96FFB2372A46} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B56F2464-158F-32C1-A9F7-EE85397706EC}.Release|Win32.ActiveCfg = Release|Win32 + {B56F2464-158F-32C1-A9F7-EE85397706EC}.Release|Win32.Build.0 = Release|Win32 + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}.Release|Win32.ActiveCfg = Release|Win32 + {1D57A40D-AE4B-3E40-A023-4F37C9D7446C}.Release|Win32.Build.0 = Release|Win32 + {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}.Release|Win32.ActiveCfg = Release|Win32 + {A494B81F-F5EC-35DE-8DDC-4F6FD6B536D5}.Release|Win32.Build.0 = Release|Win32 + {0FDD8610-0785-3089-900D-53F786E9AC9B}.Release|Win32.ActiveCfg = Release|Win32 + {0FDD8610-0785-3089-900D-53F786E9AC9B}.Release|Win32.Build.0 = Release|Win32 + {35891119-E049-35BB-AB8E-8536817F5CEE}.Release|Win32.ActiveCfg = Release|Win32 + {35891119-E049-35BB-AB8E-8536817F5CEE}.Release|Win32.Build.0 = Release|Win32 + {9A93A87D-09E4-3492-A68C-A7B1A38DE002}.Release|Win32.ActiveCfg = Release|Win32 + {9A93A87D-09E4-3492-A68C-A7B1A38DE002}.Release|Win32.Build.0 = Release|Win32 + {3804962B-1D5B-382E-B69E-96FFB2372A46}.Release|Win32.ActiveCfg = Release|Win32 + {3804962B-1D5B-382E-B69E-96FFB2372A46}.Release|Win32.Build.0 = Release|Win32 + {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}.Release|Win32.ActiveCfg = Release|Win32 + {F6589FA0-9FA2-31F9-BD0F-FFE303DE8759}.Release|Win32.Build.0 = Release|Win32 + {555B73B2-B07B-3865-9D41-0FB69091E0C9}.Release|Win32.ActiveCfg = Release|Win32 + {555B73B2-B07B-3865-9D41-0FB69091E0C9}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/extern/freestyle/src/Makefile.pro b/extern/freestyle/src/Makefile.pro new file mode 100755 index 00000000000..0e64bb342c3 --- /dev/null +++ b/extern/freestyle/src/Makefile.pro @@ -0,0 +1,18 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +TEMPLATE = subdirs +SUBDIRS = system \ + image \ + geometry \ + scene_graph \ + winged_edge \ + view_map \ + stroke \ + rendering \ +# swig \ + app + + diff --git a/extern/freestyle/src/app/AppAboutWindow.cpp b/extern/freestyle/src/app/AppAboutWindow.cpp new file mode 100755 index 00000000000..d20e3f4e1ac --- /dev/null +++ b/extern/freestyle/src/app/AppAboutWindow.cpp @@ -0,0 +1,36 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "AppConfig.h" +#include "AppAboutWindow.h" + +void AppAboutWindow::display() { + QMessageBox* mb; + + mb = new QMessageBox("About " + Config::APPLICATION_NAME, + Config::ABOUT_STRING, + QMessageBox::NoIcon, + QMessageBox::Ok | QMessageBox::Default, QMessageBox::NoButton, QMessageBox::NoButton, + NULL, + (Qt::WFlags)(Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint | Qt::WA_DeleteOnClose)); + mb->show(); +} diff --git a/extern/freestyle/src/app/AppAboutWindow.h b/extern/freestyle/src/app/AppAboutWindow.h new file mode 100755 index 00000000000..ee04d27ae71 --- /dev/null +++ b/extern/freestyle/src/app/AppAboutWindow.h @@ -0,0 +1,40 @@ +// +// Filename : AppAboutWindow.h +// Author : Emmanuel Turquin +// Purpose : Class to display a "About" window +// Date of creation : 13/06/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef APPABOUTWINDOWS_H +# define APPABOUTWINDOWS_H + +class AppAboutWindow +{ + public: + + static void display(); +}; + +#endif // APPABOUTWINDOWS_H diff --git a/extern/freestyle/src/app/AppCanvas.cpp b/extern/freestyle/src/app/AppCanvas.cpp new file mode 100755 index 00000000000..60d36880c12 --- /dev/null +++ b/extern/freestyle/src/app/AppCanvas.cpp @@ -0,0 +1,404 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppGLWidget.h" +#include "../image/Image.h" +#include "../system/TimeStamp.h" +#include "Controller.h" +#include "../stroke/StrokeRenderer.h" +#include "AppCanvas.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLStrokeRenderer.h" +#include "../rendering/GLUtils.h" +#include "AppConfig.h" +#include + +#ifdef WIN32 +# include +# include "../rendering/extgl.h" +#endif +#ifdef __MACH__ +# include +#else +# include +#endif + +AppCanvas::AppCanvas() +:Canvas() +{ + _pViewer = 0; + _blendEquation = true; + _MapsPath = (const char*)(Config::Path::getInstance()->getMapsDir().toAscii().data()); +} + +AppCanvas::AppCanvas(AppGLWidget* iViewer) +:Canvas() +{ + _pViewer = iViewer; + _blendEquation = true; +} + +AppCanvas::AppCanvas(const AppCanvas& iBrother) +:Canvas(iBrother) +{ + _pViewer = iBrother._pViewer; + _blendEquation = iBrother._blendEquation; +} + +AppCanvas::~AppCanvas() +{ + _pViewer = 0; +} + +void AppCanvas::SetViewer(AppGLWidget *iViewer) +{ + _pViewer = iViewer; +} + +int AppCanvas::width() const +{ + return _pViewer->width(); +} + +int AppCanvas::height() const +{ + return _pViewer->height(); +} + +BBox AppCanvas::scene3DBBox() const +{ + return _pViewer->scene3DBBox(); +} + +void AppCanvas::preDraw() +{ + Canvas::preDraw(); + + _pViewer->prepareCanvas(); + glClearColor(0,0,0,0); + glClear(GL_COLOR_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + glDisable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_BLEND); +} + +void AppCanvas::init() +{ +#ifdef WIN32 + static bool firsttime = true; + if (firsttime) + { + if (extgl_Initialize() != 0) + cerr << "Error: problem occurred while initializing GL extensions" << endl; + else + cout << "GL extensions initialized" << endl; + + if(!glutils_extgl_GetProcAddress("glBlendEquation")){ + _blendEquation = false; + cout << "glBlendEquation unavailable on this hardware -> switching to strokes basic rendering mode" << endl; + } + firsttime=false; + } +#endif + + _Renderer = new GLStrokeRenderer; + if(!StrokeRenderer::loadTextures()) + { + cerr << "unable to load stroke textures" << endl; + return; + } +} + +void AppCanvas::postDraw() +{ + //inverse frame buffer + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); + _pViewer->releaseCanvas(); + + Canvas::postDraw(); +} + +void AppCanvas::Erase() +{ + Canvas::Erase(); + //_pViewer->clear(); +} + +#include "../image/GaussianFilter.h" +void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const +{ + //static unsigned number = 0; + float *rgb = new float[3*w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::RGB,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); + // FIXME + // QImage qtmp(w, h, 32); + // for(unsigned py=0;pyreadPixels(0,0,width(),height(),AppGLWidget::RGB,rgbtmp); + // img.setArray(rgbtmp, width(), height(), width(), height(), 0, 0, false); + // QImage qtmp(width(), height(), 32); + // for(unsigned py=0;pywidth()) + // || (py2-bound < 0) || (py2+bound>height())) + // continue; + // int g = 255*filter.getSmoothedPixel(&img, px2,py2); + // qtmp2.setPixel(px2,height()-1-py2,qRgb(g,g,g)); + // } + // } + // qtmp2.save("blurredCausalDensity"+QString::number(number)+".png", "PNG"); + // } + // cout << number << endl; + // ++number; +} + +void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const +{ + float *rgb = new float[w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::DEPTH,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); +} + +void AppCanvas::update() +{ +// static int counter = 0; +// char fileName[100] = "framebuffer"; +// char number[10]; +// + _pViewer->updateGL(); + _pViewer->swapBuffers(); + //QImage fb = _pViewer->grabFrameBuffer(); + // sprintf(number, "%3d", counter); + // strcat(fileName, number); + // strcat(fileName, ".bmp"); + // fb.save(fileName, "BMP"); + //counter++; +} + +void AppCanvas::Render(const StrokeRenderer *iRenderer) +{ + if(!_blendEquation){ + RenderBasic(iRenderer); + return; + } + + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor4f(1,1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::Render(iRenderer); + // + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor3f(1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + +void AppCanvas::RenderBasic(const StrokeRenderer *iRenderer) +{ + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glDisable(GL_DEPTH_TEST); + glPushAttrib(GL_COLOR_BUFFER_BIT); + glEnable(GL_BLEND); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::RenderBasic(iRenderer); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + + +void AppCanvas::RenderStroke(Stroke *iStroke) { + iStroke->Render(_Renderer); + if(_pViewer->getRecordFlag()){ + //Sleep(1000); + _pViewer->saveSnapshot(true); + } +} diff --git a/extern/freestyle/src/app/AppCanvas.h b/extern/freestyle/src/app/AppCanvas.h new file mode 100755 index 00000000000..703970c0fb1 --- /dev/null +++ b/extern/freestyle/src/app/AppCanvas.h @@ -0,0 +1,84 @@ +#ifndef ARTCANVAS_H +#define ARTCANVAS_H + +//------------------------------------------------------------------------------------------// +// +// FileName : AppCanvas.h +// Author : Stephane Grabli +// Purpose : Class to define the App Canvas. +// Date Of Creation : 05/01/2003 +// +//------------------------------------------------------------------------------------------// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../stroke/Canvas.h" + +class AppGLWidget; +class AppCanvas : public Canvas +{ +private: + mutable AppGLWidget *_pViewer; + bool _blendEquation; +public: + AppCanvas(); + AppCanvas(AppGLWidget *iViewer); + AppCanvas(const AppCanvas& iBrother); + virtual ~AppCanvas(); + + /*! operations that need to be done before a draw */ + virtual void preDraw(); + + /*! operations that need to be done after a draw */ + virtual void postDraw(); + + /*! Erases the layers and clears the canvas */ + virtual void Erase(); + + /* init the canvas */ + virtual void init(); + + /*! Reads a pixel area from the canvas */ + virtual void readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const; + /*! Reads a depth pixel area from the canvas */ + virtual void readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const; + + virtual BBox scene3DBBox() const ; + + /*! update the canvas (display) */ + virtual void update() ; + + /*! Renders the created strokes */ + virtual void Render(const StrokeRenderer *iRenderer); + virtual void RenderBasic(const StrokeRenderer *iRenderer); + virtual void RenderStroke(Stroke *iStroke) ; + + /*! accessors */ + virtual int width() const ; + virtual int height() const ; + inline const AppGLWidget * viewer() const {return _pViewer;} + + /*! modifiers */ + void SetViewer(AppGLWidget *iViewer) ; +}; + + +#endif diff --git a/extern/freestyle/src/app/AppConfig.cpp b/extern/freestyle/src/app/AppConfig.cpp new file mode 100755 index 00000000000..217f58ee806 --- /dev/null +++ b/extern/freestyle/src/app/AppConfig.cpp @@ -0,0 +1,120 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppConfig.h" +#include +using namespace std; +namespace Config{ + Path* Path::_pInstance = 0; + Path::Path(){ + // get the home directory + _HomeDir = getEnvVar("HOME"); + // get the root directory + setRootDir(getEnvVar("FREESTYLE_DIR")); + //setRootDir(QString(".")); + _pInstance = this; + } + void Path::setRootDir(const QString& iRootDir){ + _ProjectDir = iRootDir; + _ModelsPath = ""; + _PatternsPath = _ProjectDir + + QString(DIR_SEP.c_str()) + + "data" + + QString(DIR_SEP.c_str()) + + "textures" + + QString(DIR_SEP.c_str()) + + "variation_patterns" + + QString(DIR_SEP.c_str()); + _BrushesPath = _ProjectDir + + QString(DIR_SEP.c_str()) + + "data" + + QString(DIR_SEP.c_str()) + + "textures" + + QString(DIR_SEP.c_str()) + + "brushes" + + QString(DIR_SEP.c_str()); + _PythonPath = _ProjectDir + + QString(DIR_SEP.c_str()) + + "python" + + QString(PATH_SEP.c_str()) + + _ProjectDir + + QString(DIR_SEP.c_str()) + + "style_modules" + + QString(DIR_SEP.c_str()) ; + if (getenv("PYTHONPATH")) { + _PythonPath += QString(PATH_SEP.c_str()) + QString(getenv("PYTHONPATH")); + } +#ifdef WIN32 + _BrowserCmd = "C:\\Program Files\\Internet Explorer\\iexplore.exe %s"; +#else + _BrowserCmd = "mozilla %s"; +#endif + _HelpIndexPath = _ProjectDir + + QString(DIR_SEP.c_str()) + + "doc" + + QString(DIR_SEP.c_str()) + + "html" + + QString(DIR_SEP.c_str()) + + "index.html"; + _PapersDir = _ProjectDir + + QString(DIR_SEP.c_str()) + + "data" + + QString(DIR_SEP.c_str()) + + "textures" + + QString(DIR_SEP.c_str()) + + "papers" + + QString(DIR_SEP.c_str()); + _EnvMapDir = _ProjectDir + + QString(DIR_SEP.c_str()) + + "data" + + QString(DIR_SEP.c_str()) + + "env_map" + + QString(DIR_SEP.c_str()); + _MapsDir = _ProjectDir + + QString(DIR_SEP.c_str()) + + "data" + + QString(DIR_SEP.c_str()) + + "maps" + + QString(DIR_SEP.c_str()); + } + void Path::setHomeDir(const QString& iHomeDir){ + _HomeDir = iHomeDir; + } + Path::~Path(){ + _pInstance = 0; + } + Path* Path::getInstance() { + return _pInstance; + } + QString Path::getEnvVar(const QString& iEnvVarName){ + QString value; + if (!getenv(iEnvVarName.toAscii().data())) { + cerr << "Warning: You may want to set the $"<< iEnvVarName.toAscii().data() + << " environment variable to use " << QString(Config::APPLICATION_NAME).toAscii().data() << "." << endl + << " Otherwise, the current directory will be used instead." << endl; + value = "."; + }else{ + value = getenv(iEnvVarName.toAscii().data()); + } + return value; + } + +} // End of namepace Config + diff --git a/extern/freestyle/src/app/AppConfig.h b/extern/freestyle/src/app/AppConfig.h new file mode 100755 index 00000000000..54e00571275 --- /dev/null +++ b/extern/freestyle/src/app/AppConfig.h @@ -0,0 +1,125 @@ +// +// Filename : AppConfig.h +// Author : Emmanuel Turquin +// Purpose : Configuration file +// Date of creation : 26/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef APP_CONFIG_H +# define APP_CONFIG_H + +# include +# include "../system/FreestyleConfig.h" +# include "../system/Precision.h" + +using namespace std; + +namespace Config { + + class Path{ + protected: + static Path * _pInstance; + QString _ProjectDir; + QString _ModelsPath; + QString _PatternsPath; + QString _BrushesPath; + QString _PythonPath; + QString _BrowserCmd; + QString _HelpIndexPath; + QString _PapersDir; + QString _EnvMapDir; + QString _MapsDir; + QString _HomeDir; + public: + Path(); + virtual ~Path(); + static Path* getInstance(); + + void setRootDir(const QString& iRootDir) ; + void setHomeDir(const QString& iHomeDir) ; + + const QString& getProjectDir() const {return _ProjectDir;} + const QString& getModelsPath() const {return _ModelsPath;} + const QString& getPatternsPath() const {return _PatternsPath;} + const QString& getBrushesPath() const {return _BrushesPath;} + const QString& getPythonPath() const {return _PythonPath;} + const QString& getBrowserCmd() const {return _BrowserCmd;} + const QString& getHelpIndexpath() const {return _HelpIndexPath;} + const QString& getPapersDir() const {return _PapersDir;} + const QString& getEnvMapDir() const {return _EnvMapDir;} + const QString& getMapsDir() const {return _MapsDir;} + const QString& getHomeDir() const {return _HomeDir;} + + static QString getEnvVar(const QString& iEnvVarName); + + }; + + // + // Configuration, default values + // + ////////////////////////////////////////////////////////////// + + // Application + static const QString APPLICATION_NAME(APPNAME); + static const QString APPLICATION_VERSION(APPVERSION); + + // ViewMap + static const QString VIEWMAP_EXTENSION("vm"); + static const QString VIEWMAP_MAGIC("ViewMap File"); + static const QString VIEWMAP_VERSION("1.9"); + + // Style modules + static const QString STYLE_MODULE_EXTENSION("py"); + static const QString STYLE_MODULES_LIST_EXTENSION("sml"); + + // Options + static const QString OPTIONS_DIR("." + APPLICATION_NAME); + static const QString OPTIONS_FILE("options.xml"); + static const QString OPTIONS_CURRENT_DIRS_FILE("current_dirs.xml"); + static const QString OPTIONS_QGLVIEWER_FILE("qglviewer.xml"); + + // Default options + static const real DEFAULT_SPHERE_RADIUS = 1.0; + static const real DEFAULT_DKR_EPSILON = 0.0; + + // Papers + static const QString DEFAULT_PAPER_TEXTURE("whitepaper.jpg"); + + // Help & About texts + static const QString HELP_FILE("help.html"); + static const QString ABOUT_STRING + ( + "

" + APPLICATION_NAME + " " + APPLICATION_VERSION + "

" + "

A programmable line drawing system

" + "
    " + "
  • Frédo Durand" + "
  • Stéphane Grabli" + "
  • François Sillion" + "
  • Emmanuel Turquin" + "
" + "
(C) Artis 2003
" + ); + +} // End of namepace Config + +#endif // APP_CONFIG_H diff --git a/extern/freestyle/src/app/AppDensityCurvesWindow.cpp b/extern/freestyle/src/app/AppDensityCurvesWindow.cpp new file mode 100755 index 00000000000..fe2ae994f77 --- /dev/null +++ b/extern/freestyle/src/app/AppDensityCurvesWindow.cpp @@ -0,0 +1,65 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "AppDensityCurvesWindow.h" +#include "../scene_graph/NodeGroup.h" +#include "AppGL2DCurvesViewer.h" +#include +using namespace std; + + +AppDensityCurvesWindow::AppDensityCurvesWindow(QWidget *parent, const char *name, bool modal, Qt::WFlags fl) + : QDialog(parent, fl) +{ + setupUi(this); +} +AppDensityCurvesWindow::~AppDensityCurvesWindow(){ +} + +void AppDensityCurvesWindow::SetOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ + AppGL2DCurvesViewer * viewer = 0; + switch(i){ + case 0:viewer = CurvesViewer0; break; + case 1:viewer = CurvesViewer1; break; + case 2:viewer = CurvesViewer2; break; + case 3:viewer = CurvesViewer3; break; + case 4:viewer = CurvesViewer4; break; + default:return; + } + + viewer->SetCurve(vmin, vmax, iCurve, xlabel, ylabel); +} + +void AppDensityCurvesWindow::SetLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ + AppGL2DCurvesViewer * viewer = 0; + switch(i){ + case 1:viewer = LevelCurveViewer1; break; + case 2:viewer = LevelCurveViewer2; break; + case 3:viewer = LevelCurveViewer3; break; + case 4:viewer = LevelCurveViewer4; break; + case 5:viewer = LevelCurveViewer5; break; + case 6:viewer = LevelCurveViewer6; break; + case 7:viewer = LevelCurveViewer7; break; + case 8:viewer = LevelCurveViewer8; break; + default:return; + } + + viewer->SetCurve(vmin, vmax, iCurve, xlabel, ylabel); +} diff --git a/extern/freestyle/src/app/AppDensityCurvesWindow.h b/extern/freestyle/src/app/AppDensityCurvesWindow.h new file mode 100755 index 00000000000..d7091440e06 --- /dev/null +++ b/extern/freestyle/src/app/AppDensityCurvesWindow.h @@ -0,0 +1,85 @@ +// +// Filename : AppDensityCurvesWindow.h +// Author : Stephane Grabli +// Purpose : Class to define the density curves display window +// Date of creation : 14/03/04 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef APPDENSITYCURVESWINDOW_H +# define APPDENSITYCURVESWINDOW_H + +#include "ui_dir/ui_densitycurveswindow4.h" +#include +#include "../geometry/Geom.h" +using namespace std; +using namespace Geometry; +using namespace Ui; + +class NodeGroup; + +class AppDensityCurvesWindow : public QDialog, public DensityCurvesWindow +{ +Q_OBJECT +public: + AppDensityCurvesWindow(QWidget *parent = 0, const char *name = 0, bool modal = FALSE, Qt::WFlags fl = 0); + virtual ~AppDensityCurvesWindow(); + + /*! Sets the node that contains the orientation curve i in + * viewer i (among 5). + * \param i + * The number of the viewer where the curve must be displayed.(0<=i<5). + * \param vmin + * The x,y min of the curve + * \param vmax + * The x,y max of the curve + * \param iCurve + * The array of XYZ coordinates of the points. + * \param xlabel + * The label of the x-axis + * \param ylabel + * The label of the y-axis + */ + void SetOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); + + /*! Sets the node that contains the level curve i in + * viewer i (i in [1,8]). + * \param i + * The number of the viewer where the curve must be displayed.(0<=i<5). + * \param vmin + * The x,y min of the curve + * \param vmax + * The x,y max of the curve + * \param iCurve + * The array of XYZ coordinates of the points. + * \param xlabel + * The label of the x-axis + * \param ylabel + * The label of the y-axis + */ + void SetLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); +}; + +#endif // APPDENSITYCURVESWINDOW_H + + diff --git a/extern/freestyle/src/app/AppGL2DCurvesViewer.cpp b/extern/freestyle/src/app/AppGL2DCurvesViewer.cpp new file mode 100755 index 00000000000..0915a4c3cbd --- /dev/null +++ b/extern/freestyle/src/app/AppGL2DCurvesViewer.cpp @@ -0,0 +1,152 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppGL2DCurvesViewer.h" +#include "../rendering/GLRenderer.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/LineRep.h" +#include "../scene_graph/VertexRep.h" + +AppGL2DCurvesViewer::AppGL2DCurvesViewer(QWidget *iParent, const char *iName) +: QGLViewer(iParent) +{ + _RootNode.SetLightingEnabled(false); + _RootNode.SetLineWidth(1.0); + _pGLRenderer = new GLRenderer; +} +AppGL2DCurvesViewer::~AppGL2DCurvesViewer(){ + makeCurrent(); + _RootNode.destroy(); + if(_pGLRenderer) + delete _pGLRenderer; +} + +void AppGL2DCurvesViewer::SetRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel){ + _vmin = vmin; + _vmax = vmax; + _xmargin = (vmax.x()-vmin.x())/20.0; + _ymargin = (vmax.y()-vmin.y())/20.0; + _left = vmin.x()-_xmargin; + _right = vmax.x()+_xmargin; + _bottom = vmin.y()- _ymargin; + _top = vmax.y()+_ymargin; + if(xlabel) + _xlabel = xlabel; + if(ylabel) + _ylabel = ylabel; +} +void AppGL2DCurvesViewer::SetCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel){ + SetRange(vmin, vmax, xlabel, ylabel); + vector nodes; + _RootNode.RetrieveChildren(nodes); + _RootNode.DetachChildren(); + for(vector::iterator n=nodes.begin(), nend=nodes.end(); + n!=nend; + ++n){ + delete (*n); + } + _curve.clear(); + _curve = iPoints; + NodeGroup * curveNode = new NodeGroup; + NodeShape * shape = new NodeShape; + shape->material().SetDiffuse(0,0,0,1); + curveNode->AddChild(shape); + shape->AddRep(new LineRep(iPoints)); + for(vector::const_iterator v=iPoints.begin(), vend=iPoints.end(); + v!=vend; + ++v){ + shape->AddRep(new VertexRep(v->x(), v->y(), v->z())); + } + _RootNode.AddChild(curveNode); + updateGL(); +} + +void AppGL2DCurvesViewer::AddNode(Node* iNode){ + _RootNode.AddChild(iNode); +} + +void AppGL2DCurvesViewer::DetachNode(Node* iNode){ + _RootNode.DetachChild(iNode); +} + +void AppGL2DCurvesViewer::RetrieveNodes(vector& oNodes){ + _RootNode.RetrieveChildren(oNodes); +} + +void AppGL2DCurvesViewer::init(){ + glClearColor(1,1,1,1); + _left = 0; + _right = width(); + _bottom = 0; + _top = height(); +} +void AppGL2DCurvesViewer::draw(){ + glPushAttrib(GL_ALL_ATTRIB_BITS); + +// // Projection Matrix +// //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(_left,_right, _bottom, _top, -1.0, 1.0); + + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glDisable(GL_DEPTH_TEST); + // draw axis + glColor3f(0.5, 0.5, 0.5); + // x axis + glBegin(GL_LINES); + glVertex2f(_left, _vmin.y()); + glVertex2f(_vmax.x(), _vmin.y()); + glEnd(); + QFont serifFont( "Times", 8); + if(!_xlabel.isEmpty()){ + renderText(width()-30, height()-1, _xlabel, serifFont); + //renderText(_vmax.x()-_xmargin, _vmin.y(), 0, _xlabel, serifFont); + } + + // y axis + glBegin(GL_LINES); + glVertex2f(_vmin.x(), _bottom); + glVertex2f(_vmin.x(), _vmax.y()); + glEnd(); + if(!_ylabel.isEmpty()){ + //renderText(_vmin.x(), _vmax.y()-3*_ymargin, _ylabel, serifFont); + renderText(12, 10, _ylabel, serifFont); + } + _RootNode.accept(*_pGLRenderer); + serifFont.setPointSize(7); + for(vector::iterator v=_curve.begin(), vend=_curve.end(); + v!=vend; + ++v){ + if(v->y() == 0) + continue; + QString label = QString( "(%1, %2)" ) + .arg( (int)v->x()) + .arg( v->y(), 0, 'E', 1 ); + + renderText(v->x(), v->y(), 0, label, serifFont); + } + glPopAttrib(); + +} \ No newline at end of file diff --git a/extern/freestyle/src/app/AppGL2DCurvesViewer.h b/extern/freestyle/src/app/AppGL2DCurvesViewer.h new file mode 100755 index 00000000000..c0bb8b4109c --- /dev/null +++ b/extern/freestyle/src/app/AppGL2DCurvesViewer.h @@ -0,0 +1,80 @@ +// +// Filename : AppGL2DCurvesViewer.h +// Author : Stephane Grabli +// Purpose : 2D GL Curves viewer +// Date of creation : 14/03/2004 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef APPGL2DCURVESVIEWER_H +# define APPGL2DCURVESVIEWER_H + +# include +# include "../scene_graph/NodeDrawingStyle.h" +# include + +class GLRenderer; + +class AppGL2DCurvesViewer : public QGLViewer +{ + Q_OBJECT + +public: + + AppGL2DCurvesViewer(QWidget *iParent, const char *iName = 0); + virtual ~AppGL2DCurvesViewer(); + + /*! Sets the ranges. + */ + void SetRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel); + void SetCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel); + void AddNode(Node* iNode); + void DetachNode(Node* iNode); + void RetrieveNodes(vector& oNodes); + + virtual QSize sizeHint() const {return QSize(200,200);} + virtual QSizePolicy sizePolicy() const {return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);} +protected: + virtual void init(); + virtual void draw(); + +private: + NodeDrawingStyle _RootNode; + GLRenderer *_pGLRenderer; + vector _curve; + Vec2d _vmin; // curve bbox min + Vec2d _vmax; // curve bbox max + double _left; // frustum clipping planes (slightly differemt from the bbox for a clear view) + double _right; + double _bottom; + float _xmargin; // margin around plot in x direction + float _ymargin; // margin around plot in y direction + double _top; + QString _xlabel; + QString _ylabel; + +}; + + +#endif // APPGL2DCURVESVIEWER_H + diff --git a/extern/freestyle/src/app/AppGLWidget.cpp b/extern/freestyle/src/app/AppGLWidget.cpp new file mode 100755 index 00000000000..d59ad716c18 --- /dev/null +++ b/extern/freestyle/src/app/AppGLWidget.cpp @@ -0,0 +1,1049 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include "../stroke/Canvas.h" +#include "AppGLWidget.h" +#include "../scene_graph/NodeLight.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLSelectRenderer.h" +#include "../rendering/GLBBoxRenderer.h" +#include "../rendering/GLMonoColorRenderer.h" +#include "Controller.h" +#include "../view_map/Silhouette.h" +#include "../view_map/ViewMap.h" +#include "../scene_graph/LineRep.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/VertexRep.h" +#include "AppConfig.h" + +// glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005 +#ifdef __MACH__ +# include +#else +# include +#endif + +GLuint texture = 0; + +bool AppGLWidget::_frontBufferFlag = false; +bool AppGLWidget::_backBufferFlag = true; + +AppGLWidget::AppGLWidget(QWidget *iParent, const char *iName) + : QGLViewer(iParent) +{ + _Fovy = 30.f; + //_SceneDepth = 2.f; + _RenderStyle = LINE; + //_ModelRootNode->SetBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); + _ModelRootNode = new NodeDrawingStyle; + _SilhouetteRootNode = new NodeDrawingStyle; + _DebugRootNode = new NodeDrawingStyle; + + _RootNode.AddChild(_ModelRootNode); + _SilhouetteRootNode->SetStyle(DrawingStyle::LINES); + _SilhouetteRootNode->SetLightingEnabled(false); + _SilhouetteRootNode->SetLineWidth(2.f); + _SilhouetteRootNode->SetPointSize(3.f); + + _RootNode.AddChild(_SilhouetteRootNode); + + _DebugRootNode->SetStyle(DrawingStyle::LINES); + _DebugRootNode->SetLightingEnabled(false); + _DebugRootNode->SetLineWidth(1.f); + + _RootNode.AddChild(_DebugRootNode); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + camera()->setZNearCoefficient(0.1); + + // 2D Scene + // _pFENode = new NodeDrawingStyle; + // _pFENode->SetStyle(DrawingStyle::LINES); + // _pFENode->SetLightingEnabled(false); + // _pFENode->SetLineWidth(1.f); + // + // _p2DNode.AddChild(_pFENode); + // + // _pVisibleSilhouetteNode = new NodeDrawingStyle; + // _pVisibleSilhouetteNode->SetStyle(DrawingStyle::LINES); + // _pVisibleSilhouetteNode->SetLightingEnabled(false); + // _pVisibleSilhouetteNode->SetLineWidth(3.f); + // + // _p2DNode.AddChild(_pVisibleSilhouetteNode); + // + _p2DSelectionNode = new NodeDrawingStyle; + _p2DSelectionNode->SetLightingEnabled(false); + _p2DSelectionNode->SetStyle(DrawingStyle::LINES); + _p2DSelectionNode->SetLineWidth(5.f); + + _p2DNode.AddChild(_p2DSelectionNode); + + _pGLRenderer = new GLRenderer; + _pSelectRenderer = new GLSelectRenderer; + _pBBoxRenderer = new GLBBoxRenderer; + _pMonoColorRenderer = new GLMonoColorRenderer; + _pDebugRenderer = new GLDebugRenderer; + + _pMainWindow = NULL; + _cameraStateSaved = false; + _drawBBox = false; + _silhouette = false; + _fedges = false; + _debug = false; + _selection_mode = false; + _Draw2DScene = true; + _Draw3DScene = true; + _drawEnvMap = false; + _currentEnvMap = 1; + _maxId = 0; + _blendFunc = 0; + + const QString sep(Config::DIR_SEP.c_str()); + const QString filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_QGLVIEWER_FILE; + setStateFileName(filename); + + //get camera frame: + qglviewer::Camera * cam = camera(); + qglviewer::ManipulatedFrame * fr = cam->frame() ; + _enableUpdateSilhouettes = false; + connect(fr, SIGNAL(modified()), this, SLOT(updateSilhouettes())); + _captureMovie = false; + // _frontBufferFlag = false; + // _backBufferFlag = true; + _record = false; +} + +AppGLWidget::~AppGLWidget() +{ + int ref = _RootNode.destroy(); + + _Light.destroy(); + ref = _p2DNode.destroy(); + + if(NULL != _pGLRenderer) + { + delete _pGLRenderer; + _pGLRenderer = NULL; + } + + if(NULL != _pSelectRenderer) + { + delete _pSelectRenderer; + _pSelectRenderer = NULL; + } + + if(NULL != _pBBoxRenderer) + { + delete _pBBoxRenderer; + _pBBoxRenderer = NULL; + } + + if(NULL != _pMonoColorRenderer) + { + delete _pMonoColorRenderer; + _pMonoColorRenderer = NULL; + } + + if(NULL != _pDebugRenderer) + { + delete _pDebugRenderer; + _pDebugRenderer = NULL; + } + + makeCurrent(); + //saveToFile(filename); +} + +void AppGLWidget::SetMainWindow(QMainWindow *iMainWindow) { + _pMainWindow = iMainWindow; +} +void AppGLWidget::captureMovie() +{ + _captureMovie = true; + setSnapshotFormat("BMP"); + setSnapshotFileName("anim"); + camera()->playPath(0); + //_captureMovie = false; +} + +void +AppGLWidget::updateSilhouettes() +{ + if(!_enableUpdateSilhouettes || !g_pController) + return; + g_pController->ComputeViewMap(); + g_pController->DrawStrokes(); + if(_captureMovie) + { + if(!camera()->keyFrameInterpolator(0)->interpolationIsStarted()) + { + _captureMovie = false; + return; + } + saveSnapshot(true); + } +} + +void +AppGLWidget::select(const QMouseEvent *e) { + + // 3D Shape selection + + if (_selection_mode) { + + // Make openGL context current + makeCurrent(); + + const unsigned SENSITIVITY = 4; + const unsigned NB_HITS_MAX = 64; + + // Prepare the selection mode + static GLuint hits[NB_HITS_MAX]; + + glSelectBuffer(NB_HITS_MAX, hits); + glRenderMode(GL_SELECT); + glInitNames(); + + // Loads the matrices + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + GLint viewport[4]; + camera()->getViewport(viewport); + gluPickMatrix(static_cast(e->x()), static_cast(e->y()), SENSITIVITY, SENSITIVITY, viewport); + + // loadProjectionMatrix() first resets the GL_PROJECTION matrix with a glLoadIdentity. + // Give false as a parameter in order to prevent this and to combine the matrices. + camera()->loadProjectionMatrix(false); + + camera()->loadModelViewMatrix(); + + // Render scene with objects ids + _pSelectRenderer->setSelectRendering(true); + DrawScene(_pSelectRenderer); + glFlush(); + + // Get the results + GLint nb_hits = glRenderMode(GL_RENDER); + + if (nb_hits <= 0) { + _pSelectRenderer->setSelectedId(-1); + return; + } + + // Interpret results + unsigned int zMin = hits[1]; + unsigned int selected = hits[3]; + for (int i=1; isetSelectedId(selected); + + cout << "SHAPE" << endl; + cout << "-----" << endl; + cout << "Id: " << _pSelectRenderer->getSelectedId() << endl; + cout << endl; + + return; + } + + // ViewMap selection + + FEdge *fe = g_pController->SelectFEdge(e->x(), height()-e->y()); + if (!fe) + return; + ViewEdge * ve = fe->viewedge(); + + if (ve) { + cout << "VIEWEDGE" << endl; + cout << "--------" << endl; + cout << "ViewEdge Id: " << ve->getId().getFirst() << ", " << ve->getId().getSecond() << endl; + cout << "Shape Id: " << ve->shape_id() << endl; + cout << "Nature: " << ve->getNature() << endl; + cout << "QI: " << ve->qi() << endl; + if(ve->aShape()) + cout << "Occludee: " << ve->aShape()->getId() << endl; + else + cout << "Occludee: NULL" << endl ; + cout << endl; + + cout << "FEDGE" << endl; + cout << "-----" << endl; + cout << "FEdge Id: " << fe->getId().getFirst() << ", " << fe->getId().getSecond() << endl; + cout << "Vertex A Id: " << fe->vertexA()->getId() << endl; + cout << "Vertex B Id: " << fe->vertexB()->getId() << endl; + cout << endl; + + vector vedges; + vedges.push_back(ve); + _p2DSelectionNode->AddChild(g_pController->BuildRep(vedges.begin(), vedges.end())); + // FEdge + LineRep * fedgeRep = new LineRep(fe->vertexA()->point2d(), fe->vertexB()->point2d()); + fedgeRep->SetWidth(3.f); + NodeShape * fedgeNode = new NodeShape; + fedgeNode->AddRep(fedgeRep); + fedgeNode->material().SetDiffuse(0.2, 1, 0.2, 1.0); + _p2DSelectionNode->AddChild(fedgeNode); + //SVertex A + Vec3r A(fe->vertexA()->point2d()); + VertexRep * aVertexRep = new VertexRep(A.x(), A.y(), A.z()); + aVertexRep->SetPointSize(3.f); + NodeShape * aVertexNode = new NodeShape; + aVertexNode->AddRep(aVertexRep); + aVertexNode->material().SetDiffuse(1, 0, 0, 1.0); + _p2DSelectionNode->AddChild(aVertexNode); + // and its fedges + const vector& afedges = fe->vertexA()->fedges(); + vector::const_iterator f=afedges.begin(), fend=afedges.end(); + for(; + f!=fend; + ++f) + { + LineRep * lrep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d()); + lrep->SetWidth(1.f); + aVertexNode->AddRep(lrep); + } + //SVertex B + Vec3r B(fe->vertexB()->point2d()); + VertexRep * bVertexRep = new VertexRep(B.x(), B.y(), B.z()); + bVertexRep->SetPointSize(3.f); + NodeShape * bVertexNode = new NodeShape; + bVertexNode->AddRep(bVertexRep); + bVertexNode->material().SetDiffuse(0, 0, 1, 1.0); + _p2DSelectionNode->AddChild(bVertexNode); + // and its fedges + const vector& bfedges = fe->vertexB()->fedges(); + f=bfedges.begin(); + fend=bfedges.end(); + for(; + f!=fend; + ++f) + { + LineRep * lrep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d()); + lrep->SetWidth(1.f); + bVertexNode->AddRep(lrep); + } + + } +} + + +void +AppGLWidget::mousePressEvent(QMouseEvent *e) +{ + _p2DSelectionNode->destroy(); + if (e->button() == Qt::LeftButton) + { + if(e->modifiers() == Qt::ShiftModifier) + { + select(e); + } + else if(e->modifiers() == Qt::ControlModifier) + { + // Density Observation + g_pController->displayDensityCurves(e->x(), height()-1-e->y()); + }else{ + QGLViewer::mousePressEvent(e); + } + updateGL(); + } + else + QGLViewer::mousePressEvent(e); +} + +void +AppGLWidget::mouseReleaseEvent ( QMouseEvent * e ) +{ + // if(g_pController) + // g_pController->ComputeViewMap(); + // g_pController->DrawStrokes(); + QGLViewer::mouseReleaseEvent(e); +} + +void +AppGLWidget::keyPressEvent(QKeyEvent* e) +{ + switch (e->key()) { + + case Qt::Key_U: + _enableUpdateSilhouettes = !_enableUpdateSilhouettes; + break; + case Qt::Key_Escape: + break; + case Qt::Key_V: + g_pController->toggleVisibilityAlgo(); + break; + case Qt::Key_R: + if(e->modifiers() == Qt::ShiftModifier){ + _record = !_record; + if(_record){ + setSnapshotFormat("JPEG"); + setSnapshotFileName("anim"); + g_pController->displayMessage("record", true); + }else{ + g_pController->displayMessage(""); + } + + } + else if(_cameraStateSaved) { + setCameraState(_cameraPosition, _cameraOrientation); + updateGL(); + } + break; + case Qt::Key_M: + _drawEnvMap = !_drawEnvMap ; + updateGL(); break; + case Qt::Key_Plus: + Canvas::getInstance()->changePaperTexture(true);updateGL(); + break; + case Qt::Key_Minus: + Canvas::getInstance()->changePaperTexture(false);updateGL(); + break; + case Qt::Key_P: + Canvas::getInstance()->togglePaperTexture();updateGL(); + break; + case Qt::Key_PageUp: + if(e->modifiers() == Qt::ControlModifier) + _blendFunc = (_blendFunc + 1) % 2; + else { + _currentEnvMap++; + if(_currentEnvMap > _maxId) + _currentEnvMap = 1; + } + updateGL(); + break; + case Qt::Key_PageDown: + if(e->modifiers() == Qt::ControlModifier) + _blendFunc = (_blendFunc + 1) % 2; + else { + _currentEnvMap--; + if(_currentEnvMap < 1) + _currentEnvMap = _maxId; + } + updateGL(); + break; + case Qt::Key_1: _ModelRootNode->SetStyle(DrawingStyle::FILLED); updateGL(); break; + case Qt::Key_2: _ModelRootNode->SetStyle(DrawingStyle::LINES); _ModelRootNode->SetLineWidth(1.0); updateGL(); break; + case Qt::Key_3: _ModelRootNode->SetStyle(DrawingStyle::INVISIBLE); updateGL(); break; + case Qt::Key_B: + { +// if(e->state() == ShiftButton) +// { +// g_pController->toggleEdgeTesselationNature(Nature::BORDER); updateGL(); break; +// } +// else + { + _drawBBox == true ? _drawBBox = false : _drawBBox = true; updateGL(); break; + } + } +// case Key_C: +// if(e->state() == ShiftButton) +// { +// g_pController->toggleEdgeTesselationNature(Nature::CREASE); updateGL(); break; +// } +// break; + case Qt::Key_S: + { +// if(e->state() == ShiftButton) +// { +// g_pController->toggleEdgeTesselationNature(Nature::SILHOUETTE); updateGL(); break; +// } +// else + { + _silhouette == true ? _silhouette = false : _silhouette = true; updateGL(); break; + } + } + case Qt::Key_L: + { + _selection_mode = !_selection_mode; updateGL(); break; + } + break; + case Qt::Key_E: + { + _fedges == true ? _fedges = false : _fedges = true; updateGL(); break; + } + break; + case Qt::Key_D: + { + _debug == true ? _debug = false : _debug = true; updateGL(); + } + break; + case Qt::Key_F2: _Draw2DScene == true ? _Draw2DScene = false : _Draw2DScene = true; updateGL(); break; + case Qt::Key_F3: _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL(); break; + default: + QGLViewer::keyPressEvent(e); + } +} + +void AppGLWidget::LoadEnvMap(const char *filename) +{ + GLuint textureId; + GLubyte *data; + //sgiImage img; + //cout << filename << endl; + QImage img(filename, "PNG"); + QImage glImage = QGLWidget::convertToGLFormat(img); + int d = glImage.depth(); + //data = img.read(filename); // tres beau bleu gris mauve!! + // allocate a texture name + glGenTextures( 1, &textureId ); + if(textureId > _maxId) + _maxId = textureId; + + // select our current texture + glBindTexture( GL_TEXTURE_2D, textureId ); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_NEAREST); + + glTexImage2D(GL_TEXTURE_2D, 0,GL_RGBA, glImage.width(), glImage.height(), 0, + GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits() ); +} + +void AppGLWidget::help(){ + emit helpRequired(); + + bool resize = false; + int width=600; + int height=400; + + static QString label[] = {" &Keyboard ", " &Mouse "}; + + QTabWidget * hWidget = helpWidget(); + if (!hWidget){ + hWidget = new QTabWidget(NULL); + hWidget->setWindowTitle("Control Bindings"); + resize = true; + for (int i=0; i<2; ++i){ + QTextEdit* tab = new QTextEdit(hWidget); + //tab->setAcceptRichText(true); // FIXME: commented because qt 4.0 is incomplete +#if QT_VERSION >= 300 + tab->setReadOnly(true); +#endif + hWidget->insertTab(i, tab, label[i]); + } + } + +#if QT_VERSION < 300 + const int currentPageIndex = hWidget->currentPageIndex(); +#endif + + for (int i=0; i<2; ++i) + { + QString text; + switch (i) + { + case 0 : text = keyboardString(); break; + case 1 : text = mouseString(); break; + default : break; + } + +#if QT_VERSION < 300 + hWidget->setCurrentPage(i); + QTextEdit* textEdit = (QTextEdit*)(hWidget->currentPage()); +#else + hWidget->setCurrentIndex(i); + QTextEdit* textEdit = (QTextEdit*)(hWidget->currentWidget()); +#endif + textEdit->setHtml(text); + + if (resize && (textEdit->heightForWidth(width) > height)) + height = textEdit->heightForWidth(width); + } + +#if QT_VERSION < 300 + hWidget->setCurrentPage(currentPageIndex); +#endif + + if (resize) + hWidget->resize(width, height+40); // 40 is tabs' height + hWidget->show(); + hWidget->raise(); +} + +QString AppGLWidget::helpString() const{ + QString pdir(Config::Path::getInstance()->getProjectDir()); + QString text = "
help content"; + return text; +} + +QString AppGLWidget::mouseString() const{ + QString text("\n"); + text += "\n"; + text += ""; + text += "
ButtonDescription
Shift+LeftIf view map exists, selects a view edge.
If in selection mode, selects a shape
"; + text += QGLViewer::mouseString(); + return text; +} + +QString AppGLWidget::keyboardString() const { + + QString text("\n"); + text += "\n"; + text += ""; + text += ""; + + text += ""; + text += ""; + text += ""; + + text += ""; + text += ""; + text += ""; + text += ""; + text += ""; + text += ""; + text += ""; + text += ""; + + text += ""; + text += ""; + + text += ""; + + text += ""; + text += ""; + text += ""; + text += "
KeyDescription
F2Toggles 2D Scene display
F3Toggles 3D Scene display
1Filled display mode
2Lines display mode
3Invisible display mode
EToggles ViewMap display
BToggles bounding boxes display
SToggles GL silhouettes display
DToggles debug information display
LToggles shape selection mode
PToggles paper texture display
MToggles toon shading
VToggles visibility algorithm
RReset camera to the latest ViewMap computation settings
Shift+RToggles snapshots mode
URecomputes the ViewMap when the view changes
+/-Change paper texture
PgUp/PgDnChanges EnvMap
Ctrl+PgUp/PgDnChanges blending function
"; + text += QGLViewer::keyboardString(); + return text; +} + +void AppGLWidget::init() +{ + setShortcut(QGLViewer::EXIT_VIEWER, 0); +// setShortcut(QGLViewer::DISPLAY_Z_BUFFER, 0); + setShortcut(QGLViewer::STEREO, 0); + setShortcut(QGLViewer::ANIMATION, 0); + setShortcut(QGLViewer::EDIT_CAMERA, 0); + + restoreStateFromFile(); + + //trackball().fitBBox(_ModelRootNode->bbox().getMin(), _ModelRootNode->bbox().getMax(), _Fovy); + + glClearColor(1,1,1,0); + glShadeModel(GL_SMOOTH); + + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + glEnable(GL_DEPTH_TEST); + + // open and read texture data + Config::Path * cpath = Config::Path::getInstance(); + QString envmapDir = cpath->getEnvMapDir(); + LoadEnvMap((envmapDir + QString("gray00.png")).toAscii().data()); + //LoadEnvMap(Config::ENV_MAP_DIR + "gray01.bmp"); + LoadEnvMap((envmapDir + QString("gray02.png")).toAscii().data()); + LoadEnvMap((envmapDir + QString("gray03.png")).toAscii().data()); + LoadEnvMap((envmapDir + QString("brown00.png")).toAscii().data()); + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + + // gl settings for Environmental Texturing: + glColor3f(1, 1, 1); + + // Use GL auto-computed enviroment texture coordinates + //glEnable(GL_TEXTURE_GEN_S); + //glEnable(GL_TEXTURE_GEN_T); + + // Bind the texture to use + //glBindTexture(GL_TEXTURE_2D,texture); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + // parametres de melange + //glBlendFunc(GL_ONE, GL_ONE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + //glBlendEquatio(GL_FUNC_ADD); + + //glEnable(GL_BLEND); + NodeLight *light = new NodeLight; + _Light.AddChild(light); + + // Change QGLViewer's default shortcut for snapshots + setShortcut(QGLViewer::SAVE_SCREENSHOT, Qt::CTRL + Qt::Key_W); + // setShortcutKey (QGLViewer::SAVE_SCREENSHOT, Key_W); + // setShortcutStateKey(QGLViewer::SAVE_SCREENSHOT, ControlButton); + + cout << "Renderer (GL) : " << glGetString(GL_RENDERER) << endl + << "Vendor (GL) : " << glGetString(GL_VENDOR) << endl << endl; +} + +void AppGLWidget::draw() +{ + if (true == _Draw3DScene) + { + if (true == _selection_mode) { + _pSelectRenderer->setSelectRendering(false); + _pSelectRenderer->resetColor(); + DrawScene(_pSelectRenderer); + } else + DrawScene(_pGLRenderer); + + if (true == _silhouette) + DrawSilhouette(); + + if (true == _drawBBox) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _ModelRootNode->accept(*_pBBoxRenderer); + glPopAttrib(); + } + + if (true == _debug) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _DebugRootNode->accept(*_pDebugRenderer); + glPopAttrib(); + } + } + + if (true == _Draw2DScene) { + Draw2DScene(_pGLRenderer); + Set3DContext(); + } + if(_record){ + saveSnapshot(true); + } + if(_captureMovie) + { + if(!camera()->keyFrameInterpolator(0)->interpolationIsStarted()) + { + _captureMovie = false; + return; + } + saveSnapshot(true); + } +} + +void AppGLWidget::DrawScene(SceneVisitor *iRenderer) +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_drawEnvMap) + { + _ModelRootNode->SetLightingEnabled(false); + glEnable(GL_COLOR_MATERIAL); + + glEnable(GL_TEXTURE_2D); + // Bind the texture to use + glBindTexture(GL_TEXTURE_2D,_currentEnvMap); + switch(_blendFunc) + { + case 0: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + break; + case 1: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE) ; + glDisable(GL_BLEND); + break; + // case 2: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + // glEnable(GL_BLEND); + // break; + // case 3: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR); + // glEnable(GL_BLEND); + // break; + // case 4: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA); + // glEnable(GL_BLEND); + // break; + default: + break; + } + + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + } + + // FIXME + // //_ModelRootNode->SetLightingEnabled(true); + // if(_ModelRootNode->style() == DrawingStyle::LINES){ + // glPushAttrib(GL_ALL_ATTRIB_BITS); + // //glDisable(GL_COLOR_MATERIAL); + // _ModelRootNode->SetStyle(DrawingStyle::FILLED); + // _ModelRootNode->SetLightingEnabled(true); + // _ModelRootNode->accept(*iRenderer); + // _ModelRootNode->SetStyle(DrawingStyle::LINES); + // _ModelRootNode->SetLightingEnabled(false); + // _ModelRootNode->accept(*iRenderer); + // glPopAttrib(); + // } + // else + _ModelRootNode->accept(*iRenderer); + + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + glDisable(GL_TEXTURE_2D); + glDisable(GL_COLOR_MATERIAL); + _ModelRootNode->SetLightingEnabled(true); + + if(_fedges == true) + _SilhouetteRootNode->accept(*iRenderer); + + // FIXME: deprecated +// if(_debug == true) +// _DebugRootNode->accept(*iRenderer); + + glPopAttrib(); +} + +void AppGLWidget::prepareCanvas() +{ + makeCurrent(); + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_frontBufferFlag){ + if(_backBufferFlag) + glDrawBuffer(GL_FRONT_AND_BACK); + else + glDrawBuffer(GL_FRONT); + } + else if(_backBufferFlag) + glDrawBuffer(GL_BACK); + + // Projection Matrix + //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0,width(), 0, height(), -1.0, 1.0); + + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +void AppGLWidget::releaseCanvas() +{ + makeCurrent(); + glDrawBuffer(GL_BACK); + glPopAttrib(); +} + +void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer) +{ + static bool first = 1; + glPushAttrib(GL_ALL_ATTRIB_BITS); + +// // Projection Matrix +// //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0,width(), 0, height(), -1.0, 1.0); + +// //Modelview Matrix +// //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // glBegin(GL_LINE_LOOP); + // glVertex2f(0,0); + // glVertex2f(100,0); + // glVertex2f(100,100); + // glVertex2f(0,100); + // glEnd(); + + //glDrawBuffer(GL_FRONT_AND_BACK); + // Draw visible silhouette + //_pVisibleSilhouetteNode->Render(iRenderer); + Canvas * canvas = Canvas::getInstance(); + if((canvas) && (!canvas->isEmpty())) + { + if (first) + { + canvas->init(); + first = false; + } + canvas->Render(canvas->renderer()); + } + + glLoadIdentity(); + // glColor3f(0.f,1.f,0.f); + // glLineWidth(5.f); + //glPolygonOffset(0.5f, 0.5f); + glPushAttrib(GL_DEPTH_BUFFER_BIT); + glDisable(GL_DEPTH_TEST); + _p2DSelectionNode->accept(*iRenderer); + glPopAttrib(); + // Draw Feature edges + // if(_fedges == true) + // { + // _pFENode->Render(iRenderer); + // } + + glPopAttrib(); +} + +void AppGLWidget::DrawSilhouette() +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + glDepthFunc(GL_LESS); + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + DrawScene(_pMonoColorRenderer); + + glCullFace(GL_FRONT); + glDepthFunc(GL_LEQUAL); + glEnable(GL_POLYGON_OFFSET_FILL); + glLineWidth(3.0); + //glPolygonOffset(10.f, 10.f); + glPolygonOffset(0.5f, 0.5f); + + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + _pMonoColorRenderer->setColor(0.f, 0.f, 0.f); + DrawScene(_pMonoColorRenderer); + + //Restore old context + glPopAttrib(); + +} + +void AppGLWidget::ReInitRenderers() +{ + // Debug Renderer + if(NULL != _pDebugRenderer) + _pDebugRenderer->ReInit(rabs(_ModelRootNode->bbox().getMax()[1] - + _ModelRootNode->bbox().getMin()[1])); +} + +void AppGLWidget::setFrontBufferFlag(bool iBool){ + _frontBufferFlag = iBool; +} +bool AppGLWidget::getFrontBufferFlag() { + return _frontBufferFlag; +} +void AppGLWidget::setBackBufferFlag(bool iBool){ + _backBufferFlag = iBool; +} +bool AppGLWidget::getBackBufferFlag() { + return _backBufferFlag; +} + +//void AppGLWidget::DrawLines() +//{ +// //Antialiasing: +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +// glEnable(GL_BLEND); +// glEnable(GL_LINE_SMOOTH); +// glPolygonMode(GL_FRONT, GL_LINE); +// +// glColor3f(0.f, 0.f, 0.f); +// glLineWidth(2.f); +// +// DrawScene(); +//} +// +//void AppGLWidget::DrawSurfacic() +//{ +// glPolygonMode(GL_FRONT, GL_FILL); +// glShadeModel(GL_SMOOTH); +// +// glEnable(GL_LIGHTING); +// glEnable(GL_LIGHT0); +// +// +// GLreal diffuseV[] = {0.5, 0.7, 0.5, 1.0}; +// glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseV); +// +// //glColor3f(0.f, 0.f, 0.f); +// +// DrawScene(); +// +// glDisable(GL_LIGHTING); +//} +// +//void AppGLWidget::DrawDepthBuffer() +//{ +// GLint w = width(); +// GLint h = height(); +// +// glPolygonMode(GL_FRONT, GL_FILL); +// +// //Disable the writing in the frame buffer +// glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); +// +// //This rendering will only fills the depth buffer +// DrawScene(); +// +// //Re-enable the frame buffer writing +// glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); +// +// +// GLreal *zPixels = new real[w*h]; +// GLreal *colorPixels = new real[4*w*h]; +// +// // glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK +// glReadPixels(0,0,w, h, GL_DEPTH_COMPONENT, GL_real, (GLreal*)zPixels); +// +// real *tmpZ = zPixels; +// real *tmpColor = colorPixels; +// +// for(int i=0; i +using namespace std; +# define __min(x,y) (min(x,y)) +# define __max(x,y) (max(x,y)) +# endif // WIN32 + + +# include +# include "../geometry/Geom.h" +# include "../geometry/BBox.h" +# include "../scene_graph/NodeDrawingStyle.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "AppConfig.h" +# include "../rendering/GLDebugRenderer.h" +# include + +using namespace Geometry; + +typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; + +class FEdge; +class QMainWindow; +class GLRenderer; +class GLSelectRenderer; +class GLBBoxRenderer; +class GLMonoColorRenderer; +class GLDebugRenderer; + +class AppGLWidget : public QGLViewer +{ + Q_OBJECT + +public: + + AppGLWidget(QWidget *iParent, const char *iName = 0); + ~AppGLWidget(); + +public slots: + virtual void updateSilhouettes(); + +public: + virtual void help(); + + // captures a frame animation that was previously registered + void captureMovie(); + + /*! Sets the rendering style. + iStyle + The style used to render. Can be: + SURFACIC : usual rendering + LINES : line rendering + DEPTHBUFFER : grey-levels rendering of the depth buffer + */ + inline void SetRenderStyle(RenderStyle iStyle) + { + _RenderStyle = iStyle; + } + + /*! Sets the model to draw in the viewer + * iModel + * The Root Node of the model + */ + inline void SetModel(NodeGroup *iModel) + { + if(0 != _ModelRootNode->numberOfChildren()) + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + } + + AddModel(iModel); + } + + /*! Adds a model for displaying in the viewer */ + inline void AddModel(NodeGroup *iModel) + { + _ModelRootNode->AddChild(iModel); + + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + // DEBUG: + ReInitRenderers(); + + } + + inline void AddSilhouette(NodeGroup* iSilhouette) + { + _SilhouetteRootNode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DSilhouette(NodeGroup *iSilhouette) + { + //_pFENode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) + { + //_pVisibleSilhouetteNode->AddChild(iVSilhouette); + updateGL(); + } + + inline void SetDebug(NodeGroup* iDebug) + { + if(0 != _DebugRootNode->numberOfChildren()) + { + _DebugRootNode->DetachChildren(); + _DebugRootNode->clearBBox(); + } + + AddDebug(iDebug); + } + + inline void AddDebug(NodeGroup* iDebug) + { + _DebugRootNode->AddChild(iDebug); + updateGL(); + } + + inline void DetachModel(Node *iModel) + { + _ModelRootNode->DetachChild(iModel); + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + } + + inline void DetachModel() + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + + // 2D Scene + //_p2DNode.DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + updateGL(); + } + + inline void DetachSilhouette() + { + _SilhouetteRootNode->DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + //updateGL(); //FIXME + } + + inline void DetachVisibleSilhouette() + { + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + updateGL(); + } + + inline void DetachDebug() + { + _DebugRootNode->DetachChildren(); + updateGL(); + } + + void SetMainWindow(QMainWindow *iMainWindow) ; + + inline void Set3DContext() + { + // GL_PROJECTION matrix + camera()->loadProjectionMatrix(); + // GL_MODELVIEW matrix + camera()->loadModelViewMatrix(); + } + + inline void RetriveModelViewMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_MODELVIEW_MATRIX, p); + } + inline void RetriveModelViewMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_MODELVIEW_MATRIX, p); + } + + inline void RetrieveProjectionMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_PROJECTION_MATRIX, p); + + } + inline void RetrieveProjectionMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_PROJECTION_MATRIX, p); + + } + + inline void RetrieveViewport(int *p) + { + makeCurrent(); + glGetIntegerv(GL_VIEWPORT,(GLint *)p); + } + + inline real GetFocalLength() const + { + real Near = __max(0.1,(real)(-2.f*_maxAbs+camera()->distanceToSceneCenter())); + return Near; + } + + inline real GetAspect() const + { + return ((real) width()/(real) height()); + } + + inline real GetFovyRadian() const + { + return _Fovy/180.0 * M_PI; + } + + inline real GetFovyDegrees() const + { + return _Fovy; + } + + inline void FitBBox() + { + qglviewer::Vec min_(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1], + _ModelRootNode->bbox().getMin()[2]); + qglviewer::Vec max_(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1], + _ModelRootNode->bbox().getMax()[2]); + setSceneBoundingBox(min_, max_); + camera()->showEntireScene(); + } + + inline void ToggleSilhouette(bool enabled) + { + _fedges = enabled; + updateGL(); + } + + // Reinit the renderers which need to be informed + // when a model is added to the scene. + void ReInitRenderers(); + + inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + + inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } + inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} + + /*! glReadPixels */ + typedef enum{ + RGB, + DEPTH + } PixelFormat; + void readPixels(int x, + int y, + int width, + int height, + PixelFormat format, + float *pixels) + { + makeCurrent(); + //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK + glReadBuffer(GL_BACK); + GLenum glformat; + switch(format) + { + case RGB: + glformat = GL_RGB; + break; + case DEPTH: + glformat = GL_DEPTH_COMPONENT; + break; + default: + break; + } + glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); + } + + void clear() { makeCurrent(); glClear(GL_COLOR_BUFFER_BIT ); } + + void prepareCanvas(); + void releaseCanvas(); + + typedef enum { + FRONT, + BACK + } GLBuffer; + + void setReadPixelsBuffer(int iBuffer) + { + makeCurrent(); + switch(iBuffer) + { + case FRONT: + glReadBuffer(GL_FRONT); + break; + case BACK: + glReadBuffer(GL_BACK); + break; + default: + break; + } + } + + BBox scene3DBBox() const { return _ModelRootNode->bbox(); } + + inline real znear() const { + // return __max((float)_maxAbs/5,(float)(-_maxAbs+camera()->distanceToSceneCenter())); + return camera()->zNear(); + } + + inline real zfar() const { + // return _maxAbs+camera()->distanceToSceneCenter(); + return camera()->zFar(); + } + + inline bool draw3DsceneEnabled() const { return _Draw3DScene; } + + inline bool getRecordFlag() const {return _record;} + + void setCameraState(const float* position, const float* orientation) { + camera()->setPosition(qglviewer::Vec(position[0], position[1], position[2])); + camera()->setOrientation(qglviewer::Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); + } + + void getCameraState(float* position, float* orientation) const { + qglviewer::Vec pos = camera()->position(); + qglviewer::Quaternion orient = camera()->orientation(); + int i; + for(i=0;i<3;++i){ + position[i] = pos[i]; + } + for(i=0;i<4;++i){ + orientation[i] = orient[i]; + } + } + + void saveCameraState() { + getCameraState(_cameraPosition, _cameraOrientation); + _cameraStateSaved = true; + } + + void setUpdateMode(bool b) { + _enableUpdateSilhouettes = b; + } + + bool getUpdateMode() const { + return _enableUpdateSilhouettes; + } + static void setFrontBufferFlag(bool iBool); + static bool getFrontBufferFlag(); + static void setBackBufferFlag(bool iBool); + static bool getBackBufferFlag(); + + // help + virtual QString helpString() const ; + + virtual QString mouseString() const; + virtual QString keyboardString() const; + +protected: + virtual void mousePressEvent(QMouseEvent *); + virtual void mouseReleaseEvent ( QMouseEvent * e ) ; + virtual void select(const QMouseEvent *); + virtual void keyPressEvent(QKeyEvent* e); + virtual void init(); + virtual void draw(); + + /*! Loads an envmap */ + void LoadEnvMap(const char *filename); + +public: + /*! Core scene drawing */ + void DrawScene(SceneVisitor *iRenderer); + + /*! 2D Scene Drawing */ + void Draw2DScene(SceneVisitor *iRenderer); + + /*! Draws scene silhouettes in real time */ + void DrawSilhouette(); + + /*! Draws the Scene in lines style */ + // void DrawLines(); + // /*! Draws the scene in surfacic style */ + // void DrawSurfacic(); + // /*! Draws the scene as a depth buffer image */ + // void DrawDepthBuffer(); + + GLRenderer* glRenderer() {return _pGLRenderer;} + +protected: + + + //QString shortcutBindingsString() const; + + /*! fabs or abs */ + inline int rabs(int x) {return abs(x);} + inline real rabs(real x) {return fabs(x);} + + +protected: + float _Fovy; + //float _SceneDepth; + //BBox _BBox; + + RenderStyle _RenderStyle; + + //The root node container + NodeGroup _RootNode; + NodeDrawingStyle *_ModelRootNode; + NodeDrawingStyle *_SilhouetteRootNode; + NodeDrawingStyle *_DebugRootNode; + + bool _silhouette; + bool _fedges; + bool _debug; + bool _selection_mode; + + //a Universal light: + NodeGroup _Light; + + real _minBBox; + real _maxBBox; + real _maxAbs; + + real _minAbs; + bool _drawBBox; + + // OpenGL Renderer + GLRenderer *_pGLRenderer; + GLSelectRenderer *_pSelectRenderer; + GLBBoxRenderer *_pBBoxRenderer; + GLMonoColorRenderer *_pMonoColorRenderer; + GLDebugRenderer *_pDebugRenderer; + + QMainWindow *_pMainWindow; + + Chronometer _Chrono; + + // 2D Scene + bool _Draw2DScene; + bool _Draw3DScene; NodeGroup _p2DNode; + //NodeDrawingStyle *_pFENode; // Feature edges node + //NodeDrawingStyle *_pVisibleSilhouetteNode; + NodeDrawingStyle *_p2DSelectionNode; + + // EnvMap + bool _drawEnvMap; + int _currentEnvMap; + int _maxId; + int _blendFunc; + + // Each time we compute the view map, the camera state is + // saved in order to be able to restore it later + bool _cameraStateSaved; + float _cameraPosition[3]; + float _cameraOrientation[4]; + + // interactive silhouette update + bool _enableUpdateSilhouettes; + //capture movie + bool _captureMovie; + // 2D drawing buffers + static bool _frontBufferFlag; + static bool _backBufferFlag; + + bool _record; +}; + +#endif // ARTGLWIDGET_H diff --git a/extern/freestyle/src/app/AppInteractiveShaderWindow.cpp b/extern/freestyle/src/app/AppInteractiveShaderWindow.cpp new file mode 100755 index 00000000000..b074c85f9f9 --- /dev/null +++ b/extern/freestyle/src/app/AppInteractiveShaderWindow.cpp @@ -0,0 +1,119 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include "AppConfig.h" +#include "Controller.h" +#include "AppInteractiveShaderWindow.h" +#include "QStyleModuleSyntaxHighlighter.h" + +AppInteractiveShaderWindow::AppInteractiveShaderWindow(QWidget* parent /* = 0 */, const char* name /* = 0 */, bool modal /* = FALSE */, Qt::WFlags fl /* = 0 */) +: InteractiveShaderWindow() // parent, name, modal, fl) +{ + setupUi(this); + _CurrentShaderRow = -1; + _syntaxHighlighter = new QStyleModuleSyntaxHighlighter(TextArea); + // signals and slots connections + connect( CancelButton, SIGNAL( clicked() ), this, SLOT( fileClose() ) ); + connect( SaveButton, SIGNAL( clicked() ), this, SLOT( fileSave() ) ); + connect( SaveAsButton, SIGNAL( clicked() ), this, SLOT( fileSaveAs() ) ); + connect( OkButton, SIGNAL( clicked() ), this, SLOT( fileOk() ) ); +} + +AppInteractiveShaderWindow::~AppInteractiveShaderWindow() +{ + if(_syntaxHighlighter){ + delete _syntaxHighlighter; + } +} + +void AppInteractiveShaderWindow::fileOk() +{ + fileSave(); + fileClose(); +} + +void AppInteractiveShaderWindow::fileClose() +{ + TextArea->clear(); + close(); +} + +void AppInteractiveShaderWindow::fileSave() +{ + QFile file(_CurrentShader); + if ( !file.open( QIODevice::WriteOnly ) ) + return; + QTextStream ts( &file ); + ts << TextArea->toPlainText(); + + file.close(); + emit save(); + g_pController->setModified(_CurrentShaderRow, true); +} + +void AppInteractiveShaderWindow::fileSaveAs() +{ + QFileInfo fi1(_CurrentShader); + QString ext1 = fi1.suffix(); + QString fn; + + if (ext1 == Config::STYLE_MODULE_EXTENSION) + fn = QFileDialog::getSaveFileName(this, + "save file dialog" + "Choose a file", + g_pController->getModulesDir(), + "Style modules (*." + Config::STYLE_MODULE_EXTENSION + ")"); + if (!fn.isEmpty() && (_CurrentShader == fn)) + fileSave(); + else if (!fn.isEmpty()) + { + QFileInfo fi2(fn); + QString ext2 = fi2.suffix(); + if (ext1 != ext2) + fn += "." + ext1; + QFile file(fn); + if ( !file.open( QIODevice::WriteOnly ) ) + return; + QTextStream ts( &file ); + ts << TextArea->toPlainText(); + file.close(); + g_pController->AddStyleModule(fn.toAscii().data()); + g_pController->setModulesDir(fi2.dir().path()); + } +} + +void AppInteractiveShaderWindow::DisplayShader(QString& iName) +{ + _CurrentShader = iName; + QFile file( iName); + if ( !file.open( QIODevice::ReadOnly ) ) + return; + + QTextStream ts( &file ); + TextArea->setText( ts.readAll() ); + TextArea->viewport()->setFocus(); + + // Set window title: + QFileInfo fi(iName); + setWindowTitle(fi.fileName()); + g_pController->setModulesDir(fi.dir().path()); +} diff --git a/extern/freestyle/src/app/AppInteractiveShaderWindow.h b/extern/freestyle/src/app/AppInteractiveShaderWindow.h new file mode 100755 index 00000000000..58f2aa1f01a --- /dev/null +++ b/extern/freestyle/src/app/AppInteractiveShaderWindow.h @@ -0,0 +1,73 @@ +#ifndef ARTINTERACTIVESHADERWINDOW_H +#define ARTINTERACTIVESHADERWINDOW_H + +//------------------------------------------------------------------------------------------// +// +// FileName : AppInteractiveShaderWindow.h +// Author : Stephane Grabli +// Purpose : Class to define the graphic window displaying the interactive shader +// Date Of Creation : 21/10/2002 +// +//------------------------------------------------------------------------------------------// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "ui_dir/ui_interactiveshaderwindow4.h" +#include + +using namespace Ui; + +class QStyleModuleSyntaxHighlighter; +class AppInteractiveShaderWindow : public QDialog, public InteractiveShaderWindow +{ + Q_OBJECT + public: + AppInteractiveShaderWindow(QWidget *parent = 0, const char *name = 0, bool modal = FALSE, Qt::WFlags fl = 0); + virtual ~AppInteractiveShaderWindow(); + +public slots: + virtual void fileOk(); + virtual void fileClose(); + virtual void fileSave(); + virtual void fileSaveAs(); + + void DisplayShader(QString& iName); + void setCurrentShaderRow(int current) { _CurrentShaderRow = current; } + int getCurrentShaderRow() const { return _CurrentShaderRow; } + + signals: + void save( ); + + protected: + + void keyPressEvent(QKeyEvent *e) { + if (e->key() == Qt::Key_Escape) + return; + QDialog::keyPressEvent(e); + } + + private: + int _CurrentShaderRow; + QString _CurrentShader; + QStyleModuleSyntaxHighlighter *_syntaxHighlighter; +}; + +#endif + diff --git a/extern/freestyle/src/app/AppMainWindow.cpp b/extern/freestyle/src/app/AppMainWindow.cpp new file mode 100755 index 00000000000..03b4f3a28ea --- /dev/null +++ b/extern/freestyle/src/app/AppMainWindow.cpp @@ -0,0 +1,288 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "AppMainWindow.h" +#include "AppGLWidget.h" +#include "Controller.h" +#include "AppConfig.h" + +AppMainWindow::AppMainWindow(QWidget *parent, const char *name, Qt::WindowFlags f) + : QMainWindow(parent, f) // parent, name, f) +{ + setupUi(this); + pQGLWidget = new AppGLWidget(this); + gridLayout->addWidget(pQGLWidget); + + // setCaption(Config::APPLICATION_NAME + " " + Config::APPLICATION_VERSION); + setGeometry(20,20,700,700); + pQGLWidget->SetMainWindow(this); + + _ProgressBar = new QProgressDialog(Config::APPLICATION_NAME + " Progress Dialog", "Cancel", + 0, 100, this); + // signals and slots connections + connect( actionOpen, SIGNAL( triggered() ), this, SLOT( fileOpen() ) ); + connect( actionQuit, SIGNAL( triggered() ), this, SLOT( close() ) ); + connect( actionClose, SIGNAL( triggered() ), this, SLOT( fileClose() ) ); + connect( actionComputeViewMap, SIGNAL( triggered() ), this, SLOT( ComputeViewMap() ) ); + connect( actionSave, SIGNAL( triggered() ), this, SLOT( ViewMapFileSave() ) ); + connect( actionStyleModelerWindow, SIGNAL( triggered() ), this, SLOT( DisplayStylesWindow() ) ); + connect( actionOptionsWindow, SIGNAL( triggered() ), this, SLOT( DisplayOptionsWindow() ) ); + connect( actionComputeStrokes, SIGNAL( triggered() ), this, SLOT( ComputeStrokes() ) ); + connect( actionHelp, SIGNAL( triggered() ), this, SLOT( DisplayHelp() ) ); + connect( actionSaveSnapshot, SIGNAL( triggered() ), this, SLOT( Snapshot() ) ); + connect( actionCaptureMovie, SIGNAL( triggered() ), this, SLOT( captureMovie() ) ); + connect( actionResetInterpreter, SIGNAL( triggered() ), this, SLOT( ResetInterpreter() ) ); + connect( actionSaveDirectionalViewMapImages, SIGNAL( triggered() ), this, SLOT( SaveDirectionalViewMapImages() ) ); + connect( actionAbout, SIGNAL( triggered() ), this, SLOT( About() ) ); + connect( actionLoadCamera, SIGNAL( triggered() ), this, SLOT( loadCamera() ) ); + connect( actionSavePSSnapshot, SIGNAL( triggered() ), this, SLOT( PSSnapshot() ) ); + connect( actionSaveTextSnapshot, SIGNAL( triggered() ), this, SLOT( TextSnapshot() ) ); + connect( actionControlBindings, SIGNAL( triggered() ), pQGLWidget, SLOT( help() ) ); +} + +AppMainWindow::~AppMainWindow() {} + +void AppMainWindow::fileOpen() +{ + QString s = QFileDialog::getOpenFileName(this, + "open file dialog" + "Choose a file", + g_pController->getModelsDir(), + "Scenes (*.3ds *.3DS);;ViewMaps (*." + Config::VIEWMAP_EXTENSION + ")"); + if ( s.isEmpty() ) { + statusBar()->showMessage( "Loading aborted", 2000 ); + return; + } + + QFileInfo fi(s); + QString ext = fi.suffix(); + if ((ext == "3ds") || (ext == "3DS")) + { + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->Load3DSFile(s.toAscii().data()); // lunch time... + g_pController->setModelsDir(fi.dir().path()); + QApplication::restoreOverrideCursor(); + } + else if (ext == Config::VIEWMAP_EXTENSION) + { + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->LoadViewMapFile(s.toAscii().data()); // ...and now tea time... + g_pController->setModelsDir(fi.dir().path()); + QApplication::restoreOverrideCursor(); + } +} + +void AppMainWindow::loadCamera() +{ + QString s = QFileDialog::getOpenFileName(this, + "open file dialog" + "Choose a file", + g_pController->getModelsDir(), + "ViewMaps (*." + Config::VIEWMAP_EXTENSION + ")"); + if ( s.isEmpty() ) { + statusBar()->showMessage( "Loading aborted", 2000 ); + return; + } + + QFileInfo fi(s); + QString ext = fi.suffix(); + if (ext == Config::VIEWMAP_EXTENSION) + { + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->LoadViewMapFile(s.toAscii().data(), true); + QApplication::restoreOverrideCursor(); + } +} + +void AppMainWindow::ViewMapFileSave() { + QString s = QFileDialog::getSaveFileName(this, + "save file dialog" + "Choose a file", + g_pController->getModelsDir(), + "ViewMaps (*." + Config::VIEWMAP_EXTENSION + ")"); + if (s.isEmpty()) { + statusBar()->showMessage( "Saving aborted", 2000 ); + return; + } + + QFileInfo fi(s); + QString ext = fi.suffix(); + if(ext != Config::VIEWMAP_EXTENSION) + s += "." + Config::VIEWMAP_EXTENSION; + + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->setModelsDir(fi.dir().path()); + g_pController->SaveViewMapFile(s.toAscii().data()); + QApplication::restoreOverrideCursor(); +} + +void AppMainWindow::fileClose() +{ + g_pController->CloseFile(); +} + +void AppMainWindow::DisplayStylesWindow() { + g_pController->ExposeStyleWindow(); +} + +void AppMainWindow::DisplayOptionsWindow() { + g_pController->ExposeOptionsWindow(); +} + +void AppMainWindow::DisplayHelp() { + g_pController->ExposeHelpWindow(); +} + +void AppMainWindow::About() { + g_pController->ExposeAboutWindow(); +} + +void AppMainWindow::Snapshot() { + g_pController->saveSnapshot(); +} + +void AppMainWindow::captureMovie() { + g_pController->captureMovie(); +} + +void AppMainWindow::ResetInterpreter() { + g_pController->resetInterpreter(); +} + +//void AppMainWindow::BrutForceSilhouette() +//{ +// QApplication::setOverrideCursor( Qt::WaitCursor ); +// g_pController->ComputeSilhouette(Controller::BRUT_FORCE); +// QApplication::restoreOverrideCursor(); +//} +// +//void AppMainWindow::AppelSilhouette() +//{ +// QApplication::setOverrideCursor( Qt::WaitCursor ); +// g_pController->ComputeSilhouette(); +// QApplication::restoreOverrideCursor(); +//} + +void AppMainWindow::ComputeViewMap() +{ + QApplication::setOverrideCursor(Qt::WaitCursor); + g_pController->ComputeViewMap(); + QApplication::restoreOverrideCursor(); +} + +void AppMainWindow::SaveDirectionalViewMapImages(){ + QApplication::setOverrideCursor(Qt::WaitCursor); + g_pController->saveSteerableViewMapImages(); + QApplication::restoreOverrideCursor(); +} + +void AppMainWindow::ComputeStrokes() +{ + g_pController->DrawStrokes(); +} + +//void AppMainWindow::InitProgressBar(const char *title, int numSteps) +//{ +// _ProgressBar = new QProgressDialog(title, 0, numSteps, this, "progress", TRUE); +// _ProgressBar->show(); +// _ProgressBar->setProgress(0); +//} +// +//void AppMainWindow::SetProgressLabel(const char *label) +//{ +// if(NULL == _ProgressBar) +// return; +// _ProgressBar->setLabelText(label); +//} +// +//void AppMainWindow::SetProgress(int i) +//{ +// _ProgressBar->setProgress(i); +// qApp->processEvents(); +// +// if(i == _ProgressBar->totalSteps()) +// { +// _ProgressBar->setProgress(_ProgressBar->totalSteps()); +// delete _ProgressBar; +// _ProgressBar = NULL; +// } +//} + +void AppMainWindow::DisplayMessage(const char* msg, bool persistent) +{ + if(persistent) + statusBar()->showMessage( msg); + else + statusBar()->showMessage( msg, 2000 ); +} +//void AppMainWindow::toggleSilhouette(bool enabled) +//{ +// pQGLWidget->ToggleSilhouette(enabled); +//} + +void AppMainWindow::PSSnapshot() { + QString s = QFileDialog::getSaveFileName(this, + "save file dialog" + "Choose a file", + g_pController->view()->snapshotFileName(), + "Encapsulated Postscript (*.eps)"); + if (s.isEmpty()) { + statusBar()->showMessage( "Saving aborted", 2000 ); + return; + } + + QFileInfo fi(s); + QString ext = fi.suffix(); + if(ext != "eps") + s += ".eps" ; + + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->savePSSnapshot(s); + QApplication::restoreOverrideCursor(); +} + +void AppMainWindow::TextSnapshot() { + QString s = QFileDialog::getSaveFileName(this, + "save file dialog" + "Choose a file", + g_pController->getModelsDir(), + "Text File (*.txt)"); + if (s.isEmpty()) { + statusBar()->showMessage( "Saving aborted", 2000 ); + return; + } + + QFileInfo fi(s); + QString ext = fi.suffix(); + if(ext != "txt") + s += ".txt" ; + + QApplication::setOverrideCursor( Qt::WaitCursor ); + g_pController->saveTextSnapshot(s); + QApplication::restoreOverrideCursor(); +} diff --git a/extern/freestyle/src/app/AppMainWindow.h b/extern/freestyle/src/app/AppMainWindow.h new file mode 100755 index 00000000000..750283f85ba --- /dev/null +++ b/extern/freestyle/src/app/AppMainWindow.h @@ -0,0 +1,83 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef ARTMAINWINDOW_H +#define ARTMAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include "ui_dir/ui_appmainwindowbase4.h" + +using namespace Ui; + +class QProgressDialog; +class AppGLWidget; +class AppMainWindow : public QMainWindow, public AppMainWindowBase +{ + Q_OBJECT + +public: + + AppMainWindow(QWidget *parent = 0, const char *name = 0, Qt::WindowFlags f = Qt::Window); + ~AppMainWindow(); + + QToolBar *pTools; + +public slots: + virtual void fileOpen(); + virtual void fileClose(); + virtual void loadCamera(); + virtual void DisplayStylesWindow(); + virtual void DisplayOptionsWindow(); + virtual void DisplayHelp(); + virtual void About(); + virtual void ViewMapFileSave(); + // virtual void AppelSilhouette(); + // virtual void BrutForceSilhouette(); + virtual void ComputeViewMap(); + virtual void SaveDirectionalViewMapImages(); + virtual void ComputeStrokes(); + virtual void Snapshot(); + virtual void captureMovie(); + virtual void ResetInterpreter(); + virtual void PSSnapshot(); + virtual void TextSnapshot(); + +public: + // void InitProgressBar(const char *title, int numSteps) + ; + // void SetProgressLabel(const char *label); + // void SetProgress(int i); + // + void DisplayMessage(const char* msg, bool persistent = false); + + QProgressDialog * qtProgressDialog() {return _ProgressBar;} + AppGLWidget * pQGLWidget; + +private: + QProgressDialog* _ProgressBar; +}; + + +#endif diff --git a/extern/freestyle/src/app/AppOptionsWindow.cpp b/extern/freestyle/src/app/AppOptionsWindow.cpp new file mode 100755 index 00000000000..6c3dc9a83aa --- /dev/null +++ b/extern/freestyle/src/app/AppOptionsWindow.cpp @@ -0,0 +1,410 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +// Must be included before any QT header, because of moc +#include "../system/PythonInterpreter.h" + +#include +#include +#include +#include +#include +#include +#include "../stroke/StrokeRenderer.h" +#include "AppConfig.h" +#include "Controller.h" +#include "../view_map/ViewMapIO.h" +#include "AppOptionsWindow.h" + +AppOptionsWindow::AppOptionsWindow(QWidget *parent, const char *name, bool modal, Qt::WFlags fl) +: QDialog(parent, fl) { // parent, name, modal, fl) { + + setupUi(this); + const QString sep(Config::DIR_SEP.c_str()); + QString filename; + + // Create a ConfigIO object + filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + sep + Config::OPTIONS_FILE; + _options = new ConfigIO(filename, Config::APPLICATION_NAME + "Options"); + _options->loadFile(); + + // Set the widgets to correct values + + // -> Directories tab + QString str; + Config::Path * cpath = Config::Path::getInstance(); + if (_options->getValue("default_path/models/path", str)) + str = cpath->getModelsPath(); + modelsPathLineEdit->setText(str); + if (_options->getValue("default_path/patterns/path", str)) + str = cpath->getPatternsPath(); + patternsPathLineEdit->setText(str); + if (_options->getValue("default_path/brushes/path", str)) + str = cpath->getBrushesPath(); + brushesPathLineEdit->setText(str); + if (_options->getValue("default_path/python/path", str)) + str = cpath->getPythonPath(); + pythonPathLineEdit->setText(str); + + // -> Papers Textures tab + unsigned papers_nb; + QStringList sl; + if (_options->getValue("papers/nb", papers_nb)) { + sl.push_back(cpath->getPapersDir() + Config::DEFAULT_PAPER_TEXTURE); + } else { + for (unsigned i = 0; i < papers_nb; i++) { + QString path; + QTextStream(&path) << "papers/texture" << i << "/filename"; + _options->getValue(path, str); + paperTexturesList->insertItem(paperTexturesList->count(), str); + } + } + + + // -> Help tab + if (_options->getValue("default_browser/cmd", str)) + str = cpath->getBrowserCmd(); + browserCmdLineEdit->setText(str); + if (_options->getValue("default_path/help/index", str)) + str = cpath->getHelpIndexpath(); + helpIndexPathLineEdit->setText(str); + + // -> Misc tab + bool b; + if (_options->getValue("default_viewmap_format/float_vectors", b)) + b = false; + asFloatCheckBox->setChecked(b); + if (_options->getValue("default_viewmap_format/no_occluders", b)) + b = false; + noOccluderListCheckBox->setChecked(b); + if (_options->getValue("default_viewmap_format/compute_steerable", b)) + b = false; + steerableViewMapCheckBox->setChecked(b); + if (_options->getValue("default_visibility/exhaustive_computation", b)) + b = true; + qiCheckBox->setChecked(b); + if (_options->getValue("default_drawing_buffers/back_buffer", b)) + b = true; + backBufferCheckBox->setChecked(b); + if (_options->getValue("default_drawing_buffers/front_buffer", b)) + b = false; + frontBufferCheckBox->setChecked(b); + real r; + if (_options->getValue("default_ridges/sphere_radius", r)) + r = Config::DEFAULT_SPHERE_RADIUS; + sphereRadiusLineEdit->setText(QString(QString::number(r))); + if (_options->getValue("default_ridges/enable", b)) + b = false; + ridgeValleyCheckBox->setChecked(b); + if (_options->getValue("default_suggestive_contours/enable", b)) + b = false; + suggestiveContoursCheckBox->setChecked(b); + if (_options->getValue("default_suggestive_contours/dkr_epsilon", r)) + r = Config::DEFAULT_DKR_EPSILON; + krEpsilonLineEdit->setText(QString(QString::number(r))); + + // Propagate changes + Propagate(); + + // signals and slots connections + connect( okButton, SIGNAL( clicked() ), this, SLOT( Ok() ) ); + connect( applyButton, SIGNAL( clicked() ), this, SLOT( Apply() ) ); + connect( closeButton, SIGNAL( clicked() ), this, SLOT( Cancel() ) ); + connect( patternsPathAddButton, SIGNAL( clicked() ), this, SLOT( PatternsAdd() ) ); + connect( modelPathAddButton, SIGNAL( clicked() ), this, SLOT( ModelsAdd() ) ); + connect( addPaperTextureButton, SIGNAL( clicked() ), this, SLOT( PaperAdd() ) ); + connect( removePaperTextureButton, SIGNAL( clicked() ), this, SLOT( PaperRemove() ) ); + connect( moveUpPaperTextureButton, SIGNAL( clicked() ), this, SLOT( PaperUp() ) ); + connect( moveDownPaperTextureButton, SIGNAL( clicked() ), this, SLOT( PaperDown() ) ); + connect( clearPaperTextureButton, SIGNAL( clicked() ), this, SLOT( PaperClear() ) ); + connect( pythonPathAddButton, SIGNAL( clicked() ), this, SLOT( PythonAdd() ) ); + connect( helpIndexPathButton, SIGNAL( clicked() ), this, SLOT( HelpAdd() ) ); + connect( brushesPathAddButton, SIGNAL( clicked() ), this, SLOT( BrushesAdd() ) ); +} + +AppOptionsWindow::~AppOptionsWindow() { + delete _options; +} + +void AppOptionsWindow::Propagate() { + + // Directories + ViewMapIO::Options::setModelsPath((const char*)modelsPathLineEdit->text().toAscii().data()); + PythonInterpreter::Options::setPythonPath((const char*)pythonPathLineEdit->text().toAscii().data()); + TextureManager::Options::setPatternsPath((const char*)patternsPathLineEdit->text().toAscii().data()); + TextureManager::Options::setBrushesPath((const char*)brushesPathLineEdit->text().toAscii().data()); + g_pController->setBrowserCmd(browserCmdLineEdit->text()); + g_pController->setHelpIndex(helpIndexPathLineEdit->text()); + + // ViewMap Format + if (asFloatCheckBox->isChecked()) + ViewMapIO::Options::addFlags(ViewMapIO::Options::FLOAT_VECTORS); + else + ViewMapIO::Options::rmFlags(ViewMapIO::Options::FLOAT_VECTORS); + if (noOccluderListCheckBox->isChecked()) + ViewMapIO::Options::addFlags(ViewMapIO::Options::NO_OCCLUDERS); + else + ViewMapIO::Options::rmFlags(ViewMapIO::Options::NO_OCCLUDERS); + g_pController->setComputeSteerableViewMapFlag(steerableViewMapCheckBox->isChecked()); + + // Visibility + if (qiCheckBox->isChecked()) + g_pController->setQuantitativeInvisibility(true); + else + g_pController->setQuantitativeInvisibility(false); + + // Papers Textures + vector sl; + for (unsigned i = 0; i < paperTexturesList->count(); i++) { + sl.push_back(paperTexturesList->item(i)->text().toAscii().constData()); + } + TextureManager::Options::setPaperTextures(sl); + + // Drawing Buffers + if (frontBufferCheckBox->isChecked()) + g_pController->setFrontBufferFlag(true); + else + g_pController->setFrontBufferFlag(false); + if (backBufferCheckBox->isChecked()) + g_pController->setBackBufferFlag(true); + else + g_pController->setBackBufferFlag(false); + + // Ridges and Valleys + g_pController->setComputeRidgesAndValleysFlag(ridgeValleyCheckBox->isChecked()); + // Suggestive Contours + g_pController->setComputeSuggestiveContoursFlag(suggestiveContoursCheckBox->isChecked()); + bool ok; + real r = sphereRadiusLineEdit->text().toFloat(&ok); + if(ok) + g_pController->setSphereRadius(r); + else + sphereRadiusLineEdit->setText(QString(QString::number(g_pController->getSphereRadius()))); + r = krEpsilonLineEdit->text().toFloat(&ok); + if(ok) + g_pController->setSuggestiveContourKrDerivativeEpsilon(r); + else + krEpsilonLineEdit->setText(QString(QString::number(g_pController->getSuggestiveContourKrDerivativeEpsilon()))); +} + +void AppOptionsWindow::Ok() { + Apply(); + close(); +} + +void AppOptionsWindow::Apply() { + + // Propagate changes + Propagate(); + + // Update values of the Options DOM Tree accordingly + _options->setValue("default_path/models/path", modelsPathLineEdit->text()); + _options->setValue("default_path/patterns/path", patternsPathLineEdit->text()); + _options->setValue("default_path/brushes/path", brushesPathLineEdit->text()); + _options->setValue("default_path/python/path", pythonPathLineEdit->text()); + _options->setValue("default_browser/cmd", browserCmdLineEdit->text()); + _options->setValue("default_path/help/index", helpIndexPathLineEdit->text()); + _options->setValue("default_viewmap_format/float_vectors", asFloatCheckBox->isChecked()); + _options->setValue("default_viewmap_format/no_occluders", noOccluderListCheckBox->isChecked()); + _options->setValue("default_visibility/exhaustive_computation", qiCheckBox->isChecked()); + _options->setValue("default_drawing_buffers/front_buffer", frontBufferCheckBox->isChecked()); + _options->setValue("default_drawing_buffers/back_buffer", backBufferCheckBox->isChecked()); + + // -> Papers Textures tab + unsigned papers_nb = paperTexturesList->count(); + _options->setValue("papers/nb", papers_nb); + for (unsigned i = 0; i < papers_nb; i++) { + QString path; + QTextStream(&path) << "papers/texture" << i << "/filename"; + _options->setValue(path, paperTexturesList->item(i)->text()); + } + + // -> Help tab + _options->setValue("default_browser/cmd", browserCmdLineEdit->text()); + _options->setValue("default_path/help/index", helpIndexPathLineEdit->text()); + + // -> Misc tab + _options->setValue("default_viewmap_format/float_vectors", asFloatCheckBox->isChecked()); + _options->setValue("default_viewmap_format/no_occluders", noOccluderListCheckBox->isChecked()); + _options->setValue("default_viewmap_format/compute_steerable", steerableViewMapCheckBox->isChecked()); + _options->setValue("default_visibility/exhaustive_computation", qiCheckBox->isChecked()); + _options->setValue("default_drawing_buffers/back_buffer", backBufferCheckBox->isChecked()); + _options->setValue("default_drawing_buffers/front_buffer", frontBufferCheckBox->isChecked()); + _options->setValue("default_ridges/enable", ridgeValleyCheckBox->isChecked()); + _options->setValue("default_suggestive_contours/enable", suggestiveContoursCheckBox->isChecked()); + bool ok; + real r = sphereRadiusLineEdit->text().toFloat(&ok); + if(!ok) + r = Config::DEFAULT_SPHERE_RADIUS; + _options->setValue("default_ridges/sphere_radius", r); + r = krEpsilonLineEdit->text().toFloat(&ok); + if(!ok) + r = Config::DEFAULT_DKR_EPSILON; + _options->setValue("default_suggestive_contours/dkr_epsilon", r); + + // Save options to disk + _options->saveFile(); +} + +void AppOptionsWindow::Cancel() { + + // Directories + QString qstr; + qstr = ViewMapIO::Options::getModelsPath().c_str(); + modelsPathLineEdit->setText(qstr); + qstr = PythonInterpreter::Options::getPythonPath().c_str(); + pythonPathLineEdit->setText(qstr); + qstr = TextureManager::Options::getPatternsPath().c_str(); + patternsPathLineEdit->setText(qstr); + qstr = TextureManager::Options::getBrushesPath().c_str(); + brushesPathLineEdit->setText(qstr); + qstr = g_pController->getBrowserCmd(); + browserCmdLineEdit->setText(qstr); + qstr = g_pController->getHelpIndex(); + helpIndexPathLineEdit->setText(qstr); + + // ViewMap Format + updateViewMapFormat(); + steerableViewMapCheckBox->setChecked(g_pController->getComputeSteerableViewMapFlag()); + + // Visibility + qiCheckBox->setChecked(g_pController->getQuantitativeInvisibility()); + + // Drawing buffers + frontBufferCheckBox->setChecked(g_pController->getFrontBufferFlag()); + backBufferCheckBox->setChecked(g_pController->getBackBufferFlag()); + + // Ridges and Valleys + ridgeValleyCheckBox->setChecked(g_pController->getComputeRidgesAndValleysFlag()); + // suggestive contours + suggestiveContoursCheckBox->setChecked(g_pController->getComputeSuggestiveContoursFlag()); + sphereRadiusLineEdit->setText(QString::number(g_pController->getSphereRadius())); + krEpsilonLineEdit->setText(QString(QString::number(g_pController->getSuggestiveContourKrDerivativeEpsilon()))); + + close(); +} + +void AppOptionsWindow::updateViewMapFormat() { + asFloatCheckBox->setChecked(ViewMapIO::Options::getFlags() & ViewMapIO::Options::FLOAT_VECTORS); + noOccluderListCheckBox->setChecked(ViewMapIO::Options::getFlags() & ViewMapIO::Options::NO_OCCLUDERS); +} + +void AppOptionsWindow::ModelsAdd() { + QString s = modelsPathLineEdit->text(); + QString new_s = DirDialog(); + if (new_s.isEmpty()) + return; + if (!s.isEmpty()) + s += Config::PATH_SEP.c_str(); + s += new_s; + modelsPathLineEdit->setText(s); +} + +void AppOptionsWindow::PatternsAdd() { + QString s = patternsPathLineEdit->text(); + QString new_s = DirDialog(); + if (new_s.isEmpty()) + return; + if (!s.isEmpty()) + s += Config::PATH_SEP.c_str(); + s += new_s; + patternsPathLineEdit->setText(s); +} + +void AppOptionsWindow::BrushesAdd() { + QString s = brushesPathLineEdit->text(); + QString new_s = DirDialog(); + if (new_s.isEmpty()) + return; + if (!s.isEmpty()) + s += Config::PATH_SEP.c_str(); + s += new_s; + brushesPathLineEdit->setText(s); +} + +void AppOptionsWindow::PythonAdd() { + QString s = pythonPathLineEdit->text(); + QString new_s = DirDialog(); + if (new_s.isEmpty()) + return; + if (!s.isEmpty()) + s += Config::PATH_SEP.c_str(); + s += new_s; + pythonPathLineEdit->setText(s); +} + +void AppOptionsWindow::HelpAdd() { + QString s = QFileDialog::getOpenFileName((QWidget *)this, + "Open file dialog" + "Choose a file", + g_pController->getHelpIndex(), + "HTML files (*.html *.htm)"); + if (s.isEmpty()) + return; + helpIndexPathLineEdit->setText(s); +} + +QString AppOptionsWindow::DirDialog() { + QString s = QFileDialog::getExistingDirectory((QWidget *)this, + "get existing directory" + "Choose a directory", + ".", + QFileDialog::ShowDirsOnly| QFileDialog::DontResolveSymlinks); + return s; +} + +void AppOptionsWindow::PaperAdd() { + QStringList sl = QFileDialog::getOpenFileNames((QWidget *)this, + "open files dialog" + "Choose a file", + g_pController->getPapersDir(), + "Images (*.bmp *.png *.jpg *.xpm)"); + paperTexturesList->insertItems(paperTexturesList->count(), sl); +} + +void AppOptionsWindow::PaperRemove() { + paperTexturesList->takeItem(paperTexturesList->currentRow()); +} + +void AppOptionsWindow::PaperUp() { + int current = paperTexturesList->currentRow(); + if (current < 1) + return; + QString s = paperTexturesList->currentItem()->text(); + paperTexturesList->item(current)->setText(paperTexturesList->item(current - 1)->text()); + paperTexturesList->item(current - 1)->setText(s); + paperTexturesList->setCurrentRow(current - 1); +} + +void AppOptionsWindow::PaperDown() { + int current = paperTexturesList->currentRow(); + if (current > paperTexturesList->count() - 2) + return; + QString s = paperTexturesList->currentItem()->text(); + paperTexturesList->item(current)->setText(paperTexturesList->item(current + 1)->text()); + paperTexturesList->item(current + 1)->setText(s); + paperTexturesList->setCurrentRow(current + 1); +} + +void AppOptionsWindow::PaperClear() { + paperTexturesList->clear(); +} + diff --git a/extern/freestyle/src/app/AppOptionsWindow.h b/extern/freestyle/src/app/AppOptionsWindow.h new file mode 100755 index 00000000000..aaa964739a6 --- /dev/null +++ b/extern/freestyle/src/app/AppOptionsWindow.h @@ -0,0 +1,74 @@ +// +// Filename : AppOptionsWindow.h +// Author : Emmanuel Turquin, Stephane Grabli +// Purpose : Class to define the options window +// Date of creation : 27/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ARTOPTIONSWINDOW_H +#define ARTOPTIONSWINDOW_H + +#include "ConfigIO.h" +#include "ui_dir/ui_optionswindow4.h" + +using namespace Ui; + +class AppOptionsWindow : public QDialog, public OptionsWindow +{ + Q_OBJECT + +public: + + AppOptionsWindow(QWidget *parent = 0, const char *name = 0, bool modal = FALSE, Qt::WFlags fl = 0); + ~AppOptionsWindow(); + + virtual void updateViewMapFormat(); + +public slots: + + virtual void Ok(); + virtual void Apply(); + virtual void Cancel(); + + virtual void ModelsAdd(); + virtual void PatternsAdd(); + virtual void BrushesAdd(); + virtual void PythonAdd(); + virtual void HelpAdd(); + + virtual void PaperAdd(); + virtual void PaperRemove(); + virtual void PaperUp(); + virtual void PaperDown(); + virtual void PaperClear(); + + private: + + virtual QString DirDialog(); + virtual void Propagate(); + + ConfigIO* _options; +}; + +#endif // ARTOPTIONSWINDOW_H diff --git a/extern/freestyle/src/app/AppProgressBar.cpp b/extern/freestyle/src/app/AppProgressBar.cpp new file mode 100755 index 00000000000..a4d18d07dd3 --- /dev/null +++ b/extern/freestyle/src/app/AppProgressBar.cpp @@ -0,0 +1,78 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include "AppProgressBar.h" + +AppProgressBar::AppProgressBar() + : ProgressBar() +{ + _qtProgressBar = 0; +} + +void AppProgressBar::reset() +{ + ProgressBar::reset(); + if(NULL == _qtProgressBar) + return; + + _qtProgressBar->reset(); + _qtProgressBar->show(); +} + +void AppProgressBar::setTotalSteps(unsigned n) +{ + ProgressBar::setTotalSteps(n); + if(NULL == _qtProgressBar) + return; + + _qtProgressBar->setRange(0,_numtotalsteps); +} + +void AppProgressBar::setProgress(unsigned i) +{ + if(i > _numtotalsteps) + return; + + ProgressBar::setProgress(i); + if(NULL == _qtProgressBar) + return; + + _qtProgressBar->setValue(_progress); + qApp->processEvents(); + + if(i == _numtotalsteps) + { + _qtProgressBar->setValue(_numtotalsteps); + + _qtProgressBar->reset(); + ProgressBar::reset(); + _qtProgressBar->hide(); + } +} + +void AppProgressBar::setLabelText(const string& label) +{ + ProgressBar::setLabelText(label); + if (NULL == _qtProgressBar) + return; + _qtProgressBar->setLabelText(_label.c_str()); +} diff --git a/extern/freestyle/src/app/AppProgressBar.h b/extern/freestyle/src/app/AppProgressBar.h new file mode 100755 index 00000000000..09cc500a981 --- /dev/null +++ b/extern/freestyle/src/app/AppProgressBar.h @@ -0,0 +1,55 @@ +#ifndef ARTPROGRESSBAR_H +#define ARTPROGRESSBAR_H + +// +// +// FileName : AppProgressBar.h +// Author : Stephane Grabli +// Purpose : Class to define the App progress bar +// Date Of Creation : 27/08/2002 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "../system/ProgressBar.h" + +class QProgressDialog; +class AppProgressBar : public ProgressBar +{ +public: + AppProgressBar(); + + virtual ~AppProgressBar() {} + + virtual void reset(); + virtual void setTotalSteps(unsigned n); + virtual void setProgress(unsigned i); + virtual void setLabelText(const string& text) ; + + void setQTProgressBar(QProgressDialog* qtBar) {_qtProgressBar = qtBar;} + + QProgressDialog * getQTProgressBar() {return _qtProgressBar;} + +private: + QProgressDialog *_qtProgressBar; +}; + +#endif diff --git a/extern/freestyle/src/app/AppStyleWindow.cpp b/extern/freestyle/src/app/AppStyleWindow.cpp new file mode 100755 index 00000000000..d8be753b498 --- /dev/null +++ b/extern/freestyle/src/app/AppStyleWindow.cpp @@ -0,0 +1,366 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include "AppStyleWindow.h" +#include "../stroke/Canvas.h" +#include "../stroke/StyleModule.h" +#include "Controller.h" +#include "AppInteractiveShaderWindow.h" +#include "AppConfig.h" + +AppStyleWindow::AppStyleWindow(QWidget* parent /* = 0 */, const char* name /* = 0 */, Qt::WFlags fl /* = 0 */) + : QDialog(parent, fl) +{ + // QDialog *widget = new QDialog(parent); + setupUi(this); + PlayList->setShowGrid(false); + PlayList->verticalHeader()->setVisible(false); + PlayList->horizontalHeader()->setClickable(false); + PlayList->setSelectionBehavior(QAbstractItemView::SelectRows); + PlayList->setSelectionMode(QAbstractItemView::SingleSelection); + PlayList->setColumnCount(5); + PlayList->setColumnWidth(0, 37); + PlayList->setColumnWidth(1, width() - 98); + PlayList->setColumnWidth(2, 37); + PlayList->hideColumn(3); + PlayList->hideColumn(4); + PlayList->setRowCount(0); + //PlayList->setsetLeftMargin(0); + PlayList->setHorizontalHeaderLabels((QStringList() << "Disp." << "Style Modules" << "Mod.")); + _pInteractiveShaderWindow = new AppInteractiveShaderWindow(this); + _pInteractiveShaderWindow->hide(); + QString projectDir(Config::Path::getInstance()->getProjectDir()); + _mod0_image = new QPixmap(QString::fromUtf8(":/icons/icons/mod0.png")); + _mod1_image = new QPixmap(QString::fromUtf8(":/icons/icons/mod1.png")); + _disp0_image = new QPixmap(QString::fromUtf8(":/icons/icons/eye0.png")); + _disp1_image = new QPixmap(QString::fromUtf8(":/icons/icons/eye1.png")); + + connect(_pInteractiveShaderWindow, SIGNAL(save()), SLOT(fileSave())); + // signals and slots connections + connect( addButton, SIGNAL( clicked() ), this, SLOT( Add() ) ); + connect( removeButton, SIGNAL( clicked() ), this, SLOT( Remove() ) ); + connect( PlayList, SIGNAL( cellDoubleClicked(int,int) ), this, SLOT( Display(int,int) ) ); + connect( PlayList, SIGNAL( cellClicked(int,int) ), this, SLOT( ToggleLayer(int,int) ) ); + connect( clearButton, SIGNAL( clicked() ), this, SLOT( Clear() ) ); + connect( saveButton, SIGNAL( clicked() ), this, SLOT( SaveList() ) ); + connect( moveUpButton, SIGNAL( clicked() ), this, SLOT( Up() ) ); + connect( moveDownButton, SIGNAL( clicked() ), this, SLOT( Down() ) ); + connect( editButton, SIGNAL( clicked() ), this, SLOT( Edit() ) ); + connect( closeButton, SIGNAL( clicked() ), this, SLOT( Close() ) ); +} + +AppStyleWindow::~AppStyleWindow() +{ + delete _mod0_image; + delete _mod1_image; + delete _disp0_image; + delete _disp1_image; +} + +void AppStyleWindow::Add(const char* iFileName, bool iDisp) { + //Add the item in the view box + //PlayList->insertItem(fi.fileName()); + // PlayList->insertItem(s); + int currentRow; + QFileInfo fi(iFileName); + if(0 == PlayList->rowCount()) + { + currentRow = -1; + } + else + { + currentRow = PlayList->currentRow(); + } + PlayList->insertRow(currentRow+1); + for(int i=0; i< PlayList->rowCount(); ++i){ + PlayList->setRowHeight(i, 20); + } + //PlayList->setRowHeight(currentRow + 1, 20); + + // eye item + QTableWidgetItem * eye_item = new QTableWidgetItem; + eye_item->setFlags(Qt::ItemIsEnabled); + PlayList->setItem(currentRow + 1, 0, eye_item); + // style module name item + QTableWidgetItem * style_module_name_item = new QTableWidgetItem(fi.fileName()); + style_module_name_item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable); + PlayList->setItem(currentRow + 1, 1, style_module_name_item); + PlayList->setItem(currentRow + 1, 3, new QTableWidgetItem(iFileName)); + // refresh item + QTableWidgetItem * refresh_item = new QTableWidgetItem; + refresh_item->setFlags(Qt::ItemIsEnabled); + PlayList->setItem(currentRow + 1, 2, refresh_item); + + setModified(currentRow + 1, true); + QTableWidgetItem *checkItem = new QTableWidgetItem; + checkItem->setFlags(Qt::ItemIsUserCheckable); + if(iDisp) + checkItem->setCheckState(Qt::Checked); + else + checkItem->setCheckState(Qt::Unchecked); + PlayList->setItem(currentRow + 1, 4, checkItem); + setChecked(currentRow + 1, iDisp); + PlayList->setCurrentCell(currentRow + 1, 1); + //PlayList->setRangeSelected(QTableWidgetSelectionRange( currentRow+1, 0, currentRow+1, 4), true); + QString text = (PlayList->item(currentRow + 1, 3))->text(); + PlayList->takeVerticalHeaderItem(currentRow + 1); + _pInteractiveShaderWindow->setCurrentShaderRow(currentRow + 1); + _pInteractiveShaderWindow->DisplayShader(text); + + // Load the shader in memory and add it to the + // canvas list + g_pController->InsertStyleModule(currentRow + 1, iFileName); + g_pController->toggleLayer(currentRow + 1, iDisp); +} + +void AppStyleWindow::AddList(const char* iFileName) { + ifstream ifs(iFileName); + if (!ifs.is_open()) { + cerr << "Error: Cannot load this file" << endl; + return; + } + QFileInfo fi(iFileName); + char tmp_buffer[256]; + string s; + bool disp = true; + while (!ifs.eof()) { + ifs.getline(tmp_buffer, 255); + if (!tmp_buffer[0] || tmp_buffer[0] == '#') + continue; + if (tmp_buffer[0] == '0') + disp = false; + else + disp = true; + s = (const char*)fi.dir().path().toAscii().data(); + s += Config::DIR_SEP; + s += tmp_buffer + 1; + ifstream test(s.c_str(), ios::binary); + if (!test.is_open()) { + cerr << "Error: Cannot load \"" << tmp_buffer + 1 << "\"" << endl; + continue; + } + Add(s.c_str(), disp); + } +} + +void AppStyleWindow::SaveList() { + QString s = QFileDialog::getSaveFileName( + this, + "Save file dialog" + "Choose a file", + g_pController->getModulesDir(), + "Style modules lists (*." + Config::STYLE_MODULES_LIST_EXTENSION + ")"); + + if (s.isEmpty()) + return; + QFileInfo fi( s ); + QString ext = fi.suffix(); + if (ext != Config::STYLE_MODULES_LIST_EXTENSION) + s += "." + Config::STYLE_MODULES_LIST_EXTENSION; + ofstream ofs(s.toAscii().data(), ios::binary); + if (!ofs.is_open()) { + cerr << "Error: Cannot save this file" << endl; + return; + } + + QTableWidgetItem *checkItem; + for (unsigned i = 0 ; i < PlayList->rowCount(); i++) { + checkItem = PlayList->item(i, 4); + ofs << ((checkItem->checkState() == Qt::Checked) ? '1' : '0'); + ofs << PlayList->item(i, 1)->text().toAscii().data() << endl; + } + g_pController->setModulesDir(fi.dir().path()); + cout << "Style modules list saved" << endl; +} + +void AppStyleWindow::Add() +{ + // Load Module + QString s = QFileDialog::getOpenFileName(this, + "Open file dialog" + "Choose a file", + g_pController->getModulesDir(), + "Style modules (*." + Config::STYLE_MODULE_EXTENSION + ")" + ";;" + "Style modules lists (*." + Config::STYLE_MODULES_LIST_EXTENSION + ")"); + + QFileInfo fi( s ); + QString ext = fi.suffix(); // ext is taken after the last dot. + + if (ext == Config::STYLE_MODULE_EXTENSION) { + g_pController->setModulesDir(fi.dir().path()); + Add(s.toAscii().data()); + } + else if (ext == Config::STYLE_MODULES_LIST_EXTENSION) { + g_pController->setModulesDir(fi.dir().path()); + AddList(s.toAscii().data()); + } +} + +void AppStyleWindow::Remove() +{ + // Remove the selected item + g_pController->RemoveStyleModule(PlayList->currentRow()); + PlayList->removeRow(PlayList->currentRow()); + _pInteractiveShaderWindow->fileClose(); +} + +void AppStyleWindow::Clear() +{ + g_pController->Clear(); + for (int i = PlayList->rowCount() - 1; i >= 0; i--) + PlayList->removeRow(i); + _pInteractiveShaderWindow->fileClose(); +} + +void AppStyleWindow::ExposeInteractiveShader() +{ + _pInteractiveShaderWindow->show(); + //_pInteractiveShaderWindow->Load(); +} + +void AppStyleWindow::setModified(unsigned row, bool mod) { + if (mod) { + PlayList->item(row, 2)->setIcon(QIcon(*_mod1_image)); + return; + } + Canvas* canvas = Canvas::getInstance(); + StyleModule* sm = canvas->getCurrentStyleModule(); + if (sm && sm->getAlwaysRefresh()) + return; + PlayList->item(row, 2)->setIcon(QIcon(*_mod0_image)); +} + +void AppStyleWindow::setChecked(unsigned row, bool check) { + if (check) + PlayList->item(row, 0)->setIcon(QIcon(*_disp1_image)); + else + PlayList->item(row, 0)->setIcon(QIcon(*_disp0_image)); +} + +void AppStyleWindow::Edit() { + if(PlayList->rowCount() == 0) + return; + + int currentRow = PlayList->currentRow(); + + ExposeInteractiveShader(); + QString text = (PlayList->item(currentRow, 3)->text()); + _pInteractiveShaderWindow->setCurrentShaderRow(currentRow); + _pInteractiveShaderWindow->DisplayShader(text); +} + +void AppStyleWindow::Display( int row, int col ) { + if(col != 1) + return; + + Edit(); +} + +void AppStyleWindow::ToggleLayer(int row, int col) +{ + if(0 == PlayList->rowCount()) + return; + + if(col != 0) + return; + + QTableWidgetItem *checkItem = PlayList->item(row, 4); + if(checkItem->flags() != Qt::ItemIsUserCheckable) + return; + + bool isChecked; + if(checkItem->checkState() == Qt::Checked){ + checkItem->setCheckState(Qt::Unchecked); + isChecked = false; + }else{ + checkItem->setCheckState(Qt::Checked); + isChecked = true; + } + g_pController->toggleLayer(row, isChecked); + setChecked(row, isChecked); +} + +void AppStyleWindow::Up() { + int current = PlayList->currentRow(); + if (current > 0) { + SwapShaders(current, current - 1); + PlayList->clearSelection(); + + PlayList->setRangeSelected(QTableWidgetSelectionRange( current-1, 0, current-1, 4), true); + PlayList->setCurrentCell(current-1, 1); + g_pController->updateCausalStyleModules(current - 1); + current = current-1; + } +} + +void AppStyleWindow::Down() { + int current = PlayList->currentRow(); + if (current < PlayList->rowCount() - 1) { + SwapShaders(current, current + 1); + PlayList->clearSelection(); + + PlayList->setRangeSelected(QTableWidgetSelectionRange( current+1, 0, current+1, 4), true); + PlayList->setCurrentCell(current+1, 1); + + g_pController->updateCausalStyleModules(current); + current = current +1; + } +} + +void AppStyleWindow::fileSave() { + int current = _pInteractiveShaderWindow->getCurrentShaderRow(); + QString text = (PlayList->item(current, 3)->text()); + g_pController->ReloadStyleModule(current, text.toAscii().data()); + QTableWidgetItem *checkItem = PlayList->item(current, 4); + bool isChecked = (checkItem->checkState() == Qt::Checked) ? true : false; + g_pController->toggleLayer(current, isChecked); +} + +void AppStyleWindow::resetModified(bool iMod) +{ + for(int i=0; i < PlayList->rowCount(); i++) + { + setModified(i,iMod); + } +} + +void AppStyleWindow::SwapShaders(int i1, int i2) { + g_pController->SwapStyleModules(i1, i2); + //PlayList->swapRows(i1, i2); + QTableWidgetItem *first_row_items[5]; + QTableWidgetItem *second_row_items[5]; + int i; + for(i=0;i<5;++i){ + first_row_items[i] = PlayList->takeItem(i1, i); + second_row_items[i] = PlayList->takeItem(i2, i); + } + for(i=0;i<5;++i){ + PlayList->setItem(i1, i, second_row_items[i]); + PlayList->setItem(i2, i, first_row_items[i]); + } +} diff --git a/extern/freestyle/src/app/AppStyleWindow.h b/extern/freestyle/src/app/AppStyleWindow.h new file mode 100755 index 00000000000..a9339abf9c8 --- /dev/null +++ b/extern/freestyle/src/app/AppStyleWindow.h @@ -0,0 +1,93 @@ +// +// Filename : AppStyleWindow.h +// Author : Stephane Grabli +// Purpose : Class to define the style window +// Date of creation : 18/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ARTSTYLEWINDOW_H +#define ARTSTYLEWINDOW_H + +#include +#include +#include +#include +#include "ui_dir/ui_stylewindow4.h" + +using namespace Ui; + +class AppInteractiveShaderWindow; +class AppStyleWindow : public QDialog, public StyleWindow +{ + Q_OBJECT +public: + AppStyleWindow(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); + virtual ~AppStyleWindow(); + + void ExposeInteractiveShader(); + /*! sets all layers to visible */ + //void resetLayers(); + + virtual int currentRow() const { return PlayList->currentRow(); } + virtual void setModified(unsigned row, bool mod); + virtual void resetModified(bool iMod = false); + virtual void setChecked(unsigned row, bool check); + +public slots: + virtual void Add(); + virtual void Add(const char* iFileName, bool iDisp = true); + virtual void SaveList(); + virtual void Remove(); + virtual void Clear(); + virtual void Up(); + virtual void Down(); + virtual void Edit(); + virtual void Close() { close(); } + virtual void Display( int row, int col); + virtual void ToggleLayer(int row, int col); + virtual void SwapShaders(int i1, int i2); + void fileSave(); + + protected: + + void keyPressEvent(QKeyEvent *e) { + if (e->key() == Qt::Key_Escape) + return; + QDialog::keyPressEvent(e); + } + +private: + + void AddList(const char* iFileName); + + AppInteractiveShaderWindow* _pInteractiveShaderWindow; + + QPixmap* _mod0_image; + QPixmap* _mod1_image; + QPixmap* _disp0_image; + QPixmap* _disp1_image; +}; + +#endif // ARTSTYLEWINDOW_H diff --git a/extern/freestyle/src/app/ConfigIO.cpp b/extern/freestyle/src/app/ConfigIO.cpp new file mode 100755 index 00000000000..8165deb07fd --- /dev/null +++ b/extern/freestyle/src/app/ConfigIO.cpp @@ -0,0 +1,116 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include "ConfigIO.h" + +ConfigIO::ConfigIO(QString filename, const QString& doc_type, bool automatic, const QString& sep) + : _default_file(filename), _automatic(automatic) { + _doc_type = doc_type; + _path_sep = sep; + if (_automatic) + loadFile(); +} + +ConfigIO::~ConfigIO() { + if (_automatic) + saveFile(); +} + +QString ConfigIO::getDefaultFile() const { + return _default_file; +} + +void ConfigIO::setDefaultFile(const QString& filename) { + _default_file = filename; +} + +bool ConfigIO::getAuto() const { + return _automatic; +} + +void ConfigIO::setAuto(bool automatic) { + _automatic = automatic; +} + +QString ConfigIO::getPathSep() const { + return _path_sep; +} + +void ConfigIO::setPathSep(const QString& sep) { + _path_sep = sep; +} + +int ConfigIO::loadFile(const QString& _filename) { + + const QString filename = _filename.isEmpty() ? _default_file : _filename; + + // check wether filename is a valid file and is readable + QFileInfo fileinfo(filename); + if (!fileinfo.isFile() || !fileinfo.isReadable()) { + std::cerr << "Warning: unable to load configuration file \"" + << fileinfo.fileName().toAscii().data() << "\"" << std::endl; + return 1; + } + + // read the DOM tree from file + QFile file(filename); + file.open(QIODevice::ReadOnly); + _tree.setContent(&file); + file.close(); + + return 0; +} + +int ConfigIO::saveFile(const QString& _filename) const { + + QString str_tree = _tree.toString(); + if (str_tree.isEmpty()) + return 1; + + const QString filename = _filename.isEmpty() ? _default_file : _filename; + + // if the directory in which we want to generate a file + // does not exist yet, try to create it + QFileInfo fileinfo(filename); + if (!fileinfo.exists()) { + QDir dir; + dir.mkdir(fileinfo.dir().path()); + } + + // check wether filename is a valid file and is writable + QFile file(filename); + file.open(QIODevice::WriteOnly); + if (!file.isOpen()) { + std::cerr << "Warning: unable to save configuration file \"" + << fileinfo.fileName().toAscii().data() << "\"" << std::endl; + return 1; + } + + // write the DOM tree to file + QTextStream out(&file); + out << str_tree; + file.close(); + + return 0; +} diff --git a/extern/freestyle/src/app/ConfigIO.h b/extern/freestyle/src/app/ConfigIO.h new file mode 100755 index 00000000000..15f3cd07575 --- /dev/null +++ b/extern/freestyle/src/app/ConfigIO.h @@ -0,0 +1,181 @@ +// +// Filename : ConfigIO.h +// Author(s) : Emmanuel Turquin +// Purpose : Configuration management +// Date of creation : 26/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CONFIGIO_H +# define CONFIGIO_H + +# include +# include +# include +# include +# include "../system/FreestyleConfig.h" + +class ConfigIO +{ + public: + + ConfigIO(QString filename = "", + const QString& doc_type = "config_file", + bool automatic = false, + const QString& sep = "/"); + ~ConfigIO(); + + QString getDefaultFile() const; + void setDefaultFile(const QString& filename); + + bool getAuto() const; + void setAuto(bool automatic); + + QString getPathSep() const; + void setPathSep(const QString& sep); + + int loadFile(const QString& filename = ""); + int saveFile(const QString& filename = "") const; + + template int getValue(const QString& path, T& res) const; + template int setValue(const QString& path, const T& src); + + private: + + QString _path_sep; + QString _default_file; + bool _automatic; + + QDomDocument _tree; + QString _doc_type; +}; + + +// +// Implementation of templated methods +// +/////////////////////////////////////////////////// + +namespace Internal { + + template + struct readValue { + void operator()(const QString &value, T &res) { + QTextStream((QString *)&value, QIODevice::ReadOnly)>> res; + } + }; + + template <> + struct readValue { + void operator()(const QString& value, QString& res) { + res = value; + } + }; + + template <> + struct readValue { + void operator()(const QString& value, bool& res) { + short res_tmp; + QTextStream((QString *)&value, QIODevice::ReadOnly) >> res_tmp; + res = res_tmp; + } + }; + +} // end of namespace Internal + + +template +int ConfigIO::getValue(const QString& path, T& res) const { + + // Split path + QStringList strlist; + strlist = path.split(_path_sep); + + unsigned size = strlist.size(); + if (size-- < 2) + return 1; + + // try to find the right element + QDomElement right_node; + QDomElement node = _tree.documentElement().firstChild().toElement(); + for (unsigned i = 0; + !node.isNull() && i < size; + node = node.firstChild().toElement(), i++) { + while (!node.isNull() && node.tagName() != strlist[i]) + node = node.nextSibling().toElement(); + right_node = node; + } + + // and the right attribute + if (right_node.hasAttribute(strlist[size])) { + QString value = right_node.attribute(strlist[size]); + Internal::readValue rv; + rv(value, res); + return 0; + } + + return 1; +} + + +template +int ConfigIO::setValue(const QString& path, const T& src) { + + // Split path + QStringList strlist = path.split(_path_sep); + + unsigned size = strlist.size(); + if (size-- < 2) + return 1; + + // verify that the tree isn't empty + // if so, create a root + QDomElement node = _tree.documentElement(); + if (node.isNull()) { + node = _tree.createElement(_doc_type); + _tree.appendChild(node); + } + + // find the right element + QDomElement child = node.firstChild().toElement(); + for (unsigned i = 0; + i < size; + node = child, child = child.firstChild().toElement(), i++) { + while (!child.isNull() && child.tagName() != strlist[i]) + child = child.nextSibling().toElement(); + if (child.isNull()) { + child = _tree.createElement(strlist[i]); + node.appendChild(child); + } + } + + // and set the attribute + QString value; + QTextStream(&value, QIODevice::WriteOnly) << src; + node.setAttribute(strlist[size], value); + + return 0; +} + +#endif // CONFIGIO_H diff --git a/extern/freestyle/src/app/Controller.cpp b/extern/freestyle/src/app/Controller.cpp new file mode 100755 index 00000000000..ac41b31ac78 --- /dev/null +++ b/extern/freestyle/src/app/Controller.cpp @@ -0,0 +1,1498 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +// Must be included before any QT header, because of moc +#include "../system/PythonInterpreter.h" + +#include +#include +#include +#include +#include + +#include "AppGLWidget.h" +#include "AppMainWindow.h" +#include "AppProgressBar.h" +#include "AppStyleWindow.h" +#include "AppOptionsWindow.h" +#include "AppAboutWindow.h" +#include "AppCanvas.h" +#include "AppConfig.h" +#include "AppDensityCurvesWindow.h" + +#include "../system/StringUtils.h" +#include "../scene_graph/MaxFileLoader.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/NodeTransform.h" +#include "../scene_graph/NodeDrawingStyle.h" +#include "../winged_edge/WingedEdgeBuilder.h" +#include "../winged_edge/WEdge.h" +#include "../scene_graph/VertexRep.h" +#include "../winged_edge/WXEdgeBuilder.h" +#include "../scene_graph/ScenePrettyPrinter.h" +#include "../winged_edge/WFillGrid.h" + +#include "../view_map/ViewMapTesselator.h" +#include "../stroke/StrokeTesselator.h" +#include "../view_map/ViewMapIO.h" +#include "Controller.h" +#include "../view_map/ViewMap.h" +#include "../winged_edge/Curvature.h" +#include "QGLBasicWidget.h" +#include +#include "../image/Image.h" +#include "../view_map/SteerableViewMap.h" +#include "../stroke/PSStrokeRenderer.h" +#include "../stroke/TextStrokeRenderer.h" +#include "../stroke/StyleModule.h" + +#ifndef WIN32 +//# include "GLXOffscreenBuffer.h" +//# include "GLXOffscreenBuffer.h" +#endif + +Controller::Controller() +{ + const QString sep(Config::DIR_SEP.c_str()); + const QString filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; + _current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true); + + _RootNode = new NodeGroup; + _RootNode->addRef(); + + _SilhouetteNode = NULL; + //_ProjectedSilhouette = NULL; + //_VisibleProjectedSilhouette = NULL; + + _DebugNode = new NodeGroup; + _DebugNode->addRef(); + + _winged_edge = NULL; + + _pMainWindow = NULL; + _pView = NULL; + + _edgeTesselationNature = (Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE); + + _ProgressBar = new AppProgressBar; + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + _bboxDiag = 0; + + _ViewMap = 0; + + _Canvas = 0; + + _VisibilityAlgo = ViewMapBuilder::ray_casting; + //_VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + + _Canvas = new AppCanvas; + + _inter = new PythonInterpreter; + _EnableQI = true; + _ComputeRidges = true; + _ComputeSteerableViewMap = false; + _ComputeSuggestive = true; + _sphereRadius = 1.0; +} + +Controller::~Controller() +{ + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + delete _RootNode; + } + + if(NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + delete _DebugNode; + } + + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _VisibleProjectedSilhouette; + // } + + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + + if(NULL != _ProgressBar) + { + delete _ProgressBar; + _ProgressBar = NULL; + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + if(0 != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + if(0 != _Canvas) + { + delete _Canvas; + _Canvas = 0; + } + + if (_inter) { + delete _inter; + _inter = NULL; + } + + // if(_pDensityCurvesWindow){ + // delete _pDensityCurvesWindow; + // _pDensityCurvesWindow = 0; + // } + delete _current_dirs; +} + +void Controller::SetView(AppGLWidget *iView) +{ + if(NULL == iView) + return; + + _pView = iView; + //_pView2D->setGeometry(_pView->rect()); + _Canvas->SetViewer(_pView); +} + +void Controller::SetMainWindow(AppMainWindow *iMainWindow) +{ + _pMainWindow = iMainWindow; + _ProgressBar->setQTProgressBar(_pMainWindow->qtProgressDialog()); + _pStyleWindow = new AppStyleWindow(_pMainWindow, "StyleWindow"); + _pOptionsWindow = new AppOptionsWindow(_pMainWindow, "MainWindow"); + _pDensityCurvesWindow = new AppDensityCurvesWindow(_pMainWindow, "MainWindow"); +} + +int Controller::Load3DSFile(const char *iFileName) +{ + if (_pView) + _pView->setUpdateMode(false); + + //_pMainWindow->InitProgressBar("Loading 3DS Model", 4); + _ProgressBar->reset(); + _ProgressBar->setLabelText("Loading 3DS Model"); + _ProgressBar->setTotalSteps(3); + _ProgressBar->setProgress(0); + + //_pMainWindow->setProgressLabel("Reading File"); + //_pMainWindow->setProgressLabel("Cleaning mesh"); + + _pMainWindow->DisplayMessage("Reading File"); + _pMainWindow->DisplayMessage("Cleaning Mesh"); + + MaxFileLoader loader3DS(iFileName); + //_RootNode->AddChild(BuildSceneTest()); + + _Chrono.start(); + + NodeGroup *maxScene = loader3DS.Load(); + + if (maxScene == NULL) { + _ProgressBar->setProgress(3); + return 1; + } + + printf("Mesh cleaning : %lf\n", _Chrono.stop()); + _SceneNumFaces += loader3DS.numFacesRead(); + + if(loader3DS.minEdgeSize() < _minEdgeSize) + { + _minEdgeSize = loader3DS.minEdgeSize(); + _EPSILON = _minEdgeSize*1e-6; + if(_EPSILON < DBL_MIN) + _EPSILON = 0.0; + } + + cout << "Epsilon computed : " << _EPSILON << endl; + + _ProgressBar->setProgress(1); + + // DEBUG +// ScenePrettyPrinter spp; +// maxScene->accept(spp); + + _RootNode->AddChild(maxScene); + _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox + + _pView->SetModel(_RootNode); + _pView->FitBBox(); + + _pMainWindow->DisplayMessage("Building Winged Edge structure"); + _Chrono.start(); + + + WXEdgeBuilder wx_builder; + maxScene->accept(wx_builder); + _winged_edge = wx_builder.getWingedEdge(); + + printf("WEdge building : %lf\n", _Chrono.stop()); + + _ProgressBar->setProgress(2); + + _pMainWindow->DisplayMessage("Building Grid"); + _Chrono.start(); + + _Grid.clear(); + Vec3r size; + for(unsigned int i=0; i<3; i++) + { + size[i] = fabs(_RootNode->bbox().getMax()[i] - _RootNode->bbox().getMin()[i]); + size[i] += size[i]/10.0; // let make the grid 1/10 bigger to avoid numerical errors while computing triangles/cells intersections + if(size[i]==0){ + cout << "Warning: the bbox size is 0 in dimension "<bbox().getMin() - size / 20.0), size, + _SceneNumFaces); + + // Fill in the grid: + WFillGrid fillGridRenderer(&_Grid, _winged_edge); + fillGridRenderer.fillGrid(); + + printf("Grid building : %lf\n", _Chrono.stop()); + + // DEBUG +// _Grid.displayDebug(); + + _ProgressBar->setProgress(3); + + _pView->SetDebug(_DebugNode); + + //delete stuff + // if(0 != ws_builder) + // { + // delete ws_builder; + // ws_builder = 0; + // } + _pView->updateGL(); + QFileInfo qfi(iFileName); + string basename((const char*)qfi.fileName().toAscii().data()); + _ListOfModels.push_back(basename); + + cout << "Triangles nb : " << _SceneNumFaces << endl; + _bboxDiag = (_RootNode->bbox().getMax()-_RootNode->bbox().getMin()).norm(); + cout << "Bounding Box : " << _bboxDiag << endl; + return 0; +} + +void Controller::CloseFile() +{ + WShape::SetCurrentId(0); + _pView->DetachModel(); + _ListOfModels.clear(); + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + _RootNode->addRef(); + + _RootNode->clearBBox(); + } + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + { + delete _SilhouetteNode; + _SilhouetteNode = NULL; + } + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _ProjectedSilhouette; + // _ProjectedSilhouette = NULL; + // } + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = NULL; + // } + // } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + // We deallocate the memory: + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + // clears the canvas + _Canvas->Erase(); + + // clears the grid + _Grid.clear(); + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + // _pView2D->DetachScene(); + // if(NULL != _SRoot) + // { + // int ref = _SRoot->destroy(); + // if(0 == ref) + // { + // //_SRoot->addRef(); + // delete _SRoot; + // _SRoot = NULL; + // } + // } +} + +// static const streamsize buffer_size = 512 * 1024; + +void Controller::SaveViewMapFile(const char *oFileName) +{ + if (!_ViewMap) + return; + + ofstream ofs(oFileName, ios::binary); + if (!ofs.is_open()) { + _pMainWindow->DisplayMessage("Error: Cannot save this file"); + cerr << "Error: Cannot save this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ofs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ofs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + _Chrono.start(); + + ofs << Config::VIEWMAP_MAGIC.toAscii().data() << endl << Config::VIEWMAP_VERSION.toAscii().data() << endl; + + // Write the models filenames + ofs << _ListOfModels.size() << endl; + for (vector::const_iterator i = _ListOfModels.begin(); i != _ListOfModels.end(); i++) + ofs << *i << "\n"; + + // Save the camera position + float position[3]; + float orientation[4]; + _pView->getCameraState(position, orientation); + ofs.write((char*)position, 3 * sizeof(*position)); + ofs.write((char*)orientation, 4 * sizeof(*orientation)); + + // Write ViewMap + if (ViewMapIO::save(ofs, _ViewMap, _ProgressBar)) { + _Chrono.stop(); + cerr << "Error: Cannot save this file" << endl; + return; + } + + real d = _Chrono.stop(); + cout << "ViewMap saving : " << d << endl; +} + +void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) +{ + ifstream ifs(iFileName, ios::binary); + if (!ifs.is_open()) { + _pMainWindow->DisplayMessage("Error: Cannot load this file"); + cerr << "Error: Cannot load this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ifs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ifs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + + // Test File Magic and version + char tmp_buffer[256]; + QString test; + + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_MAGIC) { + _pMainWindow->DisplayMessage( + (QString("Error: This is not a valid .") + Config::VIEWMAP_EXTENSION + QString(" file")).toAscii().data()); + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION.toAscii().data() << " file" << endl; + return; + } + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_VERSION && !only_camera) { + _pMainWindow->DisplayMessage( + (QString("Error: This version of the .") + Config::VIEWMAP_EXTENSION + QString(" file format is no longer supported")).toAscii().data()); + cerr << "Error: This version of the ." << Config::VIEWMAP_EXTENSION.toAscii().data() << " file format is no longer supported" << endl; + return; + } + + // Read the models filenames and open them (if not already done) + string tmp; + vector tmp_vec; + unsigned models_nb, i; + + ifs.getline(tmp_buffer, 255); + models_nb = atoi(tmp_buffer); + for (i = 0; i < models_nb; i++) { + ifs.getline(tmp_buffer, 255); + tmp = tmp_buffer; + tmp_vec.push_back(tmp); + } + if (_ListOfModels != tmp_vec && !only_camera) { + CloseFile(); + vector pathnames; + int err = 0; + for (vector::const_iterator i = tmp_vec.begin(); i != tmp_vec.end(); i++) + { + pathnames.clear(); + StringUtils::getPathName(ViewMapIO::Options::getModelsPath(), *i, pathnames); + for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) + if (!(err = Load3DSFile(j->c_str()))) + break; + if (err) { + _pMainWindow->DisplayMessage("Error: cannot find the right model(s)"); + cerr << "Error: cannot find model \"" << *i << "\" - check the path in the Options" << endl; + return; + } + } + } + + // Set the camera position + float position[3]; + float orientation[4]; + ifs.read((char*)position, 3 * sizeof(*position)); + ifs.read((char*)orientation, 4 * sizeof(*orientation)); + _pView->setCameraState(position, orientation); + _pView->saveCameraState(); + + if (only_camera) { + _pMainWindow->DisplayMessage("Camera parameters loaded"); + return; + } + + // Reset ViewMap + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + _ViewMap = new ViewMap(); + + // Read ViewMap + _Chrono.start(); + if (ViewMapIO::load(ifs, _ViewMap, _ProgressBar)) { + _Chrono.stop(); + _pMainWindow->DisplayMessage( + (QString("Error: This is not a valid .") + Config::VIEWMAP_EXTENSION + QString(" file")).toAscii().data()); + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION.toAscii().data() << " file" << endl; + return; + } + + // Update display + _pMainWindow->DisplayMessage("Updating display"); + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + // Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + // + _pView->AddSilhouette(_SilhouetteNode); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + + // Update options window + _pOptionsWindow->updateViewMapFormat(); + + real d = _Chrono.stop(); + cout << "ViewMap loading : " << d << endl; + + // Compute the Directional ViewMap: + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeViewMap() +{ + + if (!_ListOfModels.size()) + return; + + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + + // retrieve the 3D viewpoint and transformations information + //---------------------------------------------------------- + // Save the viewpoint context at the view level in order + // to be able to restore it later: + _pView->saveCameraState(); + + // Restore the context of view: + // we need to perform all these operations while the + // 3D context is on. + _pView->Set3DContext(); + float src[3] = { 0, 0, 0 }; + float vp_tmp[3]; + _pView->camera()->getWorldCoordinatesOf(src, vp_tmp); + Vec3r vp(vp_tmp[0], vp_tmp[1], vp_tmp[2]); + + real mv[4][4]; + _pView->RetriveModelViewMatrix((real *)mv); + // retrieve the projection matrix: + real proj[4][4]; + _pView->RetrieveProjectionMatrix((real *)proj); + int viewport[4]; + _pView->RetrieveViewport(viewport); + real focalLength = _pView->GetFocalLength(); + + // Flag the WXEdge structure for silhouette edge detection: + //---------------------------------------------------------- + + _Chrono.start(); + if (_SceneNumFaces > 2000) + edgeDetector.SetProgressBar(_ProgressBar); + + edgeDetector.SetViewpoint(Vec3r(vp)); + edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); + edgeDetector.enableSuggestiveContours(_ComputeSuggestive); + edgeDetector.setSphereRadius(_sphereRadius); + edgeDetector.setSuggestiveContourKrDerivativeEpsilon(_suggestiveContourKrDerivativeEpsilon); + edgeDetector.processShapes(*_winged_edge); + + real duration = _Chrono.stop(); + printf("Feature lines : %lf\n", duration); + + // FIXME GLDEBUG + //==================================================================== + // NodeShape * silhouetteDebugShape = new NodeShape; + // _DebugNode->AddChild(silhouetteDebugShape); + // vector& wshapes = _winged_edge->getWShapes(); + // vector::iterator ws, wsend; + // for(ws=wshapes.begin(), wsend=wshapes.end(); + // ws!=wsend; + // ++ws){ + // smooth +// vector& wvertices = (*ws)->GetVertexList(); +// unsigned modulo(1), currentIndex(0); +// for(vector::iterator wv=wvertices.begin(), wvend=wvertices.end(); +// wv!=wvend; +// ++wv){ +// if(currentIndex%modulo != 0){ +// ++currentIndex; +// continue; +// }else +// ++currentIndex; + +// WVertex::face_iterator fit=(*wv)->faces_begin(); +// WVertex::face_iterator fitend=(*wv)->faces_end(); +// for(; fit!=fitend; ++fit){ +// WXFace *wxf = dynamic_cast(*fit); +// unsigned vindex = wxf->GetIndex((*wv)); +// vector flayers; +// wxf->retrieveSmoothLayers(Nature::RIDGE, flayers); +// for(vector::iterator fl=flayers.begin(), flend=flayers.end(); +// fl!=flend; +// ++fl){ +// Vec3r c[3]; +// unsigned index = 0; +// for(unsigned i=0; i<3; ++i){ +// // real d = (*fl)->dotP(i); +// real d = ((WXVertex*)(wxf->GetVertex(i)))->curvatures()->Kr; +// if(d < 0){ +// index = 1; +// d = -d; +// } +// else +// index = 0; +// c[i][index] = d; +// } +// TriangleRep * frep = new TriangleRep( wxf->GetVertex(0)->GetVertex(), +// c[0], +// wxf->GetVertex(1)->GetVertex(), +// c[1], +// wxf->GetVertex(2)->GetVertex(), +// c[2]); +// silhouetteDebugShape->AddRep(frep); + // + // // + // Vec3r e2 = ((Face_Curvature_Info*)(*fl)->userdata)->vec_curvature_info[vindex]->e2; + // Vec3r e1 = ((Face_Curvature_Info*)(*fl)->userdata)->vec_curvature_info[vindex]->e1; + // OrientedLineRep * olrep1 = new OrientedLineRep((*wv)->GetVertex(), (*wv)->GetVertex()+e1); + // OrientedLineRep * olrep2 = new OrientedLineRep((*wv)->GetVertex(), (*wv)->GetVertex()+e2); + // silhouetteDebugShape->AddRep(olrep1); + // silhouetteDebugShape->AddRep(olrep2); + // WOEdge * oppositeEdge; + // if(!(wxf->getOppositeEdge(*wv, oppositeEdge))) + // continue; + // Vec3r v1v2 = oppositeEdge->GetbVertex()->GetVertex() - oppositeEdge->GetaVertex()->GetVertex(); + // OrientedLineRep * opplrep = new OrientedLineRep(oppositeEdge->GetaVertex()->GetVertex(), oppositeEdge->GetaVertex()->GetVertex()+v1v2); + // silhouetteDebugShape->AddRep(opplrep); + // GeomUtils::intersection_test res; + // real t; + // res = GeomUtils::intersectRayPlane(oppositeEdge->GetaVertex()->GetVertex(), v1v2, + // e2, -((*wv)->GetVertex()*e2), + // t,1.e-06); + // if((res == GeomUtils::DO_INTERSECT) && (t>=0.0) && (t<=1.0)){ + // Vec3r inter(oppositeEdge->GetaVertex()->GetVertex() + t*v1v2); + // VertexRep * irep = new VertexRep(inter.x(), inter.y(), inter.z()); + // irep->SetPointSize(5.0); + // silhouetteDebugShape->AddRep(irep); + // } +// } +// } +// //break; +// } + + // vector& wfaces = (*ws)->GetFaceList(); + // for(vector::iterator wf=wfaces.begin(), wfend=wfaces.end(); + // wf!=wfend; + // ++wf){ + // WXFace *wxf = dynamic_cast(*wf); + // vector smoothEdges; + // wxf->retrieveSmoothEdges(Nature::RIDGE, smoothEdges); + // for(vector::iterator se=smoothEdges.begin(), send=smoothEdges.end(); + // se!=send; + // ++se){ + // real ta = (*se)->ta(); + // Vec3r A1((*se)->woea()->GetaVertex()->GetVertex()); + // Vec3r A2((*se)->woea()->GetbVertex()->GetVertex()); + // Vec3r A(A1+ta*(A2-A1)); + // + // real tb = (*se)->tb(); + // Vec3r B1((*se)->woeb()->GetaVertex()->GetVertex()); + // Vec3r B2((*se)->woeb()->GetbVertex()->GetVertex()); +// Vec3r B(B1+tb*(B2-B1)); +// OrientedLineRep * line = new OrientedLineRep(A,B); +// silhouetteDebugShape->AddRep(line); +// } +// Material redmat; +// redmat.SetDiffuse(1,0,0,1); +// Material greenmat; +// greenmat.SetDiffuse(0,1,0,1); +// real vecSize = _bboxDiag/70.0; +// vector flayers; +// wxf->retrieveSmoothLayers(Nature::RIDGE, flayers); +// for(vector::iterator fl=flayers.begin(), flend=flayers.end(); +// fl!=flend; +// ++fl){ + // Vec3r c[3]; + // unsigned nNegative = 0; + // unsigned index = 0; + // for(unsigned i=0; i<3; ++i){ + // //real d = (*fl)->dotP(i); + // real d = ((Face_Curvature_Info*)(*fl)->userdata)->vec_curvature_info[i]->K1/50.0; + // //cout << d << endl; + // if(d < 0){ + // nNegative++; + // index = 1; + // d = -d; + // } + // else + // index = 0; + // c[i][index] = d; + // } + // TriangleRep * frep = new TriangleRep( wxf->GetVertex(0)->GetVertex(), + // c[0], + // wxf->GetVertex(1)->GetVertex(), + // c[1], + // wxf->GetVertex(2)->GetVertex(), + // c[2]); + // //if((nNegative != 0) && (nNegative != 3)) + // silhouetteDebugShape->AddRep(frep); + + // 3D CURVATURES + //============== + // Face_Curvature_Info * fci = (Face_Curvature_Info*)(*fl)->userdata; + // unsigned nvertices = wxf->numberOfVertices(); + // for(i=0; ivec_curvature_info[i]; + // Vec3r v(wxf->GetVertex(i)->GetVertex()); + // // VertexRep *vrep = new VertexRep(v[0], v[1], v[2]); + // // vrep->SetMaterial(redmat); + // // vrep->SetPointSize(5.0); + // // silhouetteDebugShape->AddRep(vrep); + // // LineRep * maxc = new LineRep(v-vecSize*ci->e1/2.0, v+vecSize*ci->e1/2.0); + // // LineRep * maxc = new LineRep(v, v+vecSize*ci->e1); + // // maxc->SetMaterial(redmat); + // // maxc->SetWidth(2.0); + // // silhouetteDebugShape->AddRep(maxc); + // LineRep * minc = new LineRep(v, v+vecSize*ci->e2); + // minc->SetMaterial(greenmat); + // minc->SetWidth(2.0); + // silhouetteDebugShape->AddRep(minc); + // } +// } +// } +// } + + // + // // Sharp + // vector& wedges = (*ws)->GetEdgeList(); + // for(vector::iterator we=wedges.begin(), weend=wedges.end(); + // we!=weend; + // ++we){ + // WXEdge * wxe = dynamic_cast(*we); + // if((wxe)->nature() != Nature::NO_FEATURE){ + // OrientedLineRep * line = new OrientedLineRep( wxe->GetaVertex()->GetVertex(), + // wxe->GetbVertex()->GetVertex()); + // silhouetteDebugShape->AddRep(line); + // } + // } + // } + // WVertex *wvertex = _winged_edge->getWShapes()[0]->GetVertexList()[0]; + // Vec3r v(wvertex->GetVertex()); + // VertexRep * vrep = new VertexRep(v[0],v[1], v[2]); + // silhouetteDebugShape->AddRep(vrep ); + // WVertex::face_iterator fit = wvertex->faces_begin(); + // WVertex::face_iterator fitend = wvertex->faces_end(); + // while(fit!=fitend){ + // vector fvertices; + // (*fit)->RetrieveVertexList(fvertices); + // Vec3r v[3]; + // unsigned i=0; + // for(vector::iterator fv=fvertices.begin(), fvend=fvertices.end(); + // fv!=fvend; + // ++fv, ++i){ + // v[i] = (*fv)->GetVertex(); + // } + // TriangleRep * triangle = new TriangleRep(v[0], v[1], v[2]); + // silhouetteDebugShape->AddRep(triangle); + // ++fit; + // } + //==================================================================== + // END GLDEBUG + + // Builds the view map structure from the flagged WSEdge structure: + //---------------------------------------------------------- + ViewMapBuilder vmBuilder; + vmBuilder.SetProgressBar(_ProgressBar); + vmBuilder.SetEnableQI(_EnableQI); + vmBuilder.SetViewpoint(Vec3r(vp)); + + vmBuilder.SetTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.SetFrustum(_pView->znear(), _pView->zfar()); + + vmBuilder.SetGrid(&_Grid); + + // Builds a tesselated form of the silhouette for display purpose: + //--------------------------------------------------------------- + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + _Chrono.start(); + // Build View Map + _ViewMap = vmBuilder.BuildViewMap(*_winged_edge, _VisibilityAlgo, _EPSILON); + _ViewMap->setScene3dBBox(_RootNode->bbox()); + + //Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + + duration = _Chrono.stop(); + printf("ViewMap building : %lf\n", duration); + + // FIXME DEBUG + // vector& vvertices = _ViewMap->ViewVertices(); + // for(vector::iterator vv=vvertices.begin(), vvend=vvertices.end(); + // vv!=vvend; + // ++vv){ + // TVertex * tvertex = (*vv)->castToTVertex(); + // if(!tvertex) + // continue; + // cout << "TVertex : " << tvertex->getId() << endl; + // if (!(tvertex->frontEdgeA().first)) + // cout << "null FrontEdgeA" << endl; + // if (!(tvertex->frontEdgeB().first)) + // cout << "null FrontEdgeB" << endl; + // if (!(tvertex->backEdgeA().first)) + // cout << "null BackEdgeA" << endl; + // if (!(tvertex->backEdgeB().first)) + // cout << "null backEdgeB" << endl; + // } + // cout << "-----------" << endl; + // vector& svertices = _ViewMap->SVertices(); + // unsigned i = 0; + // for(vector::iterator sv = svertices.begin(), svend = svertices.end(); + // sv != svend && i < 10; + // ++sv, ++i) { + // cout << "SVertex - Id : " << (*sv)->getId() << endl; + // cout << "SVertex - P3D : " << (*sv)->point3D() << endl; + // cout << "SVertex - P2D : " << (*sv)->point2D() << endl; + // set::const_iterator i; + // unsigned tmp; + // for (i = (*sv)->normals().begin(), tmp = 0; + // i != (*sv)->normals().end(); + // i++, tmp++); + // cout << "SVertex - Normals : " << tmp << endl; + // cout << "SVertex - FEdges : " << (*sv)->fedges().size() << endl; + // } + // cout << "-----------" << endl; + // vector& fedges = _ViewMap->FEdges(); + // for(vector::iterator fe = fedges.begin(), feend = fedges.end(); + // fe != feend && i < 10; + // ++fe, ++i) { + // cout << "FEdge - Id: " << (*fe)->getId() << endl; + // cout << "FEdge - Occl: " << (*fe)->getOccludeeIntersection() << endl; + // } + // cout << "-----------" << endl; + // END DEBUG + + // FIXME GLDEBUG + //==================================================================== + // CUSPS + //======= + // vector& vedges = _ViewMap->ViewEdges(); + // //typedef ViewEdgeInternal::fedge_iterator_base > fedge_iterator; + // //fedge_iterator fit = vedges[0]->fedge_iterator_begin(); + // for(vector::iterator ve=vedges.begin(), veend=vedges.end(); + // ve!=veend; + // ++ve){ + // if((!((*ve)->getNature() & Nature::SILHOUETTE)) || (!((*ve)->fedgeA()->isSmooth()))) + // continue; + // FEdge *fe = (*ve)->fedgeA(); + // FEdge * fefirst = fe; + // //ViewEdge::fedge_iterator fit = (*ve)->fedge_iterator_begin(); + // //ViewEdge::vertex_iterator vit = (*ve)->vertices_begin(); + // + // Material mat; + // // for(; !(fe.end()); ++fe){ + // bool first = true; + // bool front = true; + // bool positive = true; + // do{ + // FEdgeSmooth * fes = dynamic_cast(fe); + // Vec3r A((fes)->vertexA()->point3d()); + // Vec3r B((fes)->vertexB()->point3d()); + // Vec3r AB(B-A); + // AB.normalize(); + // LineRep * lrep = new LineRep(A,B); + // silhouetteDebugShape->AddRep(lrep); + // Vec3r m((A+B)/2.0); + // Vec3r crossP(AB^(fes)->normal()); + // crossP.normalize(); + // Vec3r viewvector(m-vp); + // viewvector.normalize(); + // if(first){ + // if(((crossP)*(viewvector)) > 0) + // positive = true; + // else + // positive = false; + // first = false; + // } + // if(positive){ + // if(((crossP)*(viewvector)) < -0.2) + // positive = false; + // }else{ + // if(((crossP)*(viewvector)) > 0.2) + // positive = true; + // } + // if(positive) + // mat.SetDiffuse(1,1,0,1); + // else + // mat.SetDiffuse(1,0,0,1); + // lrep->SetMaterial(mat); + // fe = fe->nextEdge(); + // }while((fe!=0) && (fe!=fefirst)); + // } + //==================================================================== + // END FIXME GLDEBUG + + _pView->AddSilhouette(_SilhouetteNode); + //_pView->AddSilhouette(_WRoot); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + //_pView->Add2DVisibleSilhouette(_VisibleProjectedSilhouette); + _pView->AddDebug(_DebugNode); + + // Draw the steerable density map: + //-------------------------------- + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeSteerableViewMap(){ + if((!_Canvas) || (!_ViewMap)) + return; + + if(_ProgressBar){ + _ProgressBar->reset(); + _ProgressBar->setLabelText("Computing Steerable ViewMap"); + _ProgressBar->setTotalSteps(3); + _ProgressBar->setProgress(0); + } + + // Build 4 nodes containing the edges in the 4 directions + NodeGroup *ng[Canvas::NB_STEERABLE_VIEWMAP]; + unsigned i; + real c = 32.f/255.f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32. + for(i=0; imaterial().SetDiffuse(c,c,c,1); + ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + svm->Reset(); + + _pMainWindow->DisplayMessage("Dividing up edges"); + ViewMap::fedges_container& fedges = _ViewMap->FEdges(); + LineRep * fRep; + NodeShape *ns; + for(ViewMap::fedges_container::iterator f=fedges.begin(), fend=fedges.end(); + f!=fend; + ++f){ + if((*f)->viewedge()->qi() != 0) + continue; + fRep = new LineRep((*f)->vertexA()->point2d(),(*f)->vertexB()->point2d()) ; + completeNS->AddRep(fRep); // add to the complete map anyway + double *oweights = svm->AddFEdge(*f); + for(i=0; imaterial().SetDiffuse(wc, wc, wc, 1); + ns->AddRep(fRep); + ng[i]->AddChild(ns); + } + } + if(_ProgressBar) + _ProgressBar->setProgress(1); + _pMainWindow->DisplayMessage("Rendering Steerable ViewMap"); + GrayImage *img[Canvas::NB_STEERABLE_VIEWMAP]; + //#ifdef WIN32 + QGLBasicWidget offscreenBuffer(_pView, "SteerableViewMap", _pView->width(), _pView->height()); + QPixmap pm; + QImage qimg; + for(i=0; iwidth(), _pView->height()); + //offscreenBuffer.readPixels(0,0,_pView->width(), _pView->height(), img[i]->getArray()); + pm = offscreenBuffer.renderPixmap(_pView->width(), _pView->height()); + + if(pm.isNull()) + cout << "BuildViewMap Warning: couldn't render the steerable ViewMap" << endl; + //pm.save(QString("steerable")+QString::number(i)+QString(".bmp"), "BMP"); + // FIXME!! Lost of time ! + qimg = pm.toImage(); + // FIXME !! again! + img[i] = new GrayImage(_pView->width(), _pView->height()); + for(unsigned y=0;yheight();++y){ + for(unsigned x=0;xwidth();++x){ + //img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))/255.f); + img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))); + // float c = qGray(qimg.pixel(x,y)); + // img[i]->setPixel(x,y,qGray(qimg.pixel(x,y))); + } + } + offscreenBuffer.DetachNode(ng[i]); + ng[i]->destroy(); + delete ng[i]; + // check + // qimg = QImage(_pView->width(), _pView->height(), 32); + // for(y=0;yheight();++y){ + // for(unsigned x=0;xwidth();++x){ + // float v = img[i]->pixel(x,y); + // qimg.setPixel(x,y,qRgb(v,v,v)); + // } + // } + // qimg.save(QString("newsteerable")+QString::number(i)+QString(".bmp"), "BMP"); + } + //#else +// // LINUX +// QGLBasicWidget offscreenBuffer(_pView, "SteerableViewMap", _pView->width(), _pView->height()); + +// float * buffer = 0; +// for(i=0; iwidth(), _pView->height()); +// buffer = img[i]->getArray(); +// offscreenBuffer.readPixels(0,0,_pView->width(), _pView->height(), buffer); +// for(unsigned y=0;yheight();++y){ +// for(unsigned x=0;xwidth();++x){ +// img[i]->setPixel(x,y,255.f *img[i]->pixel(x,y)); +// } +// } + +// offscreenBuffer.DetachNode(ng[i]); +// ng[i]->destroy(); +// delete ng[i]; +// } +// #endif + if(_ProgressBar) + _ProgressBar->setProgress(2); + _pMainWindow->DisplayMessage("Building Gaussian Pyramids"); + svm->buildImagesPyramids(img,false,0,1.f); + if(_ProgressBar) + _ProgressBar->setProgress(3); +} + +void Controller::saveSteerableViewMapImages(){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm){ + cerr << "the Steerable ViewMap has not been computed yet" << endl; + return; + } + svm->saveSteerableViewMap(); +} + +void Controller::toggleVisibilityAlgo() +{ + if(_VisibilityAlgo == ViewMapBuilder::ray_casting) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + _pMainWindow->DisplayMessage("Visibility algorithm switched to \"fast ray casting\""); + } + else if (_VisibilityAlgo == ViewMapBuilder::ray_casting_fast) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_very_fast; + _pMainWindow->DisplayMessage("Visibility algorithm switched to \"very fast ray casting\""); + } + else { + _VisibilityAlgo = ViewMapBuilder::ray_casting; + _pMainWindow->DisplayMessage("Visibility algorithm switched to \"ray casting\""); + } +} + +void Controller::setQuantitativeInvisibility(bool iBool) +{ + _EnableQI = iBool; +} + +bool Controller::getQuantitativeInvisibility() const +{ + return _EnableQI; +} + +void Controller::setComputeRidgesAndValleysFlag(bool iBool){ + _ComputeRidges = iBool; +} + +bool Controller::getComputeRidgesAndValleysFlag() const { + return _ComputeRidges; +} +void Controller::setComputeSuggestiveContoursFlag(bool b){ + _ComputeSuggestive = b; +} + +bool Controller::getComputeSuggestiveContoursFlag() const { + return _ComputeSuggestive; +} +void Controller::setComputeSteerableViewMapFlag(bool iBool){ + _ComputeSteerableViewMap = iBool; +} + +bool Controller::getComputeSteerableViewMapFlag() const { + return _ComputeSteerableViewMap; +} +void Controller::setFrontBufferFlag(bool iBool) +{ + AppGLWidget::setFrontBufferFlag(iBool); +} + +bool Controller::getFrontBufferFlag() const +{ + return AppGLWidget::getFrontBufferFlag(); +} + +void Controller::setBackBufferFlag(bool iBool) +{ + AppGLWidget::setBackBufferFlag(iBool); +} + +bool Controller::getBackBufferFlag() const +{ + return AppGLWidget::getBackBufferFlag(); +} + +void Controller::DrawStrokes() +{ + if(_ViewMap == 0) + return; + + _Chrono.start(); + _Canvas->Draw(); + real d = _Chrono.stop(); + cout << "Strokes drawing : " << d << endl; + resetModified(); +} + +void Controller::InsertStyleModule(unsigned index, const char *iFileName) +{ + QFileInfo fi(iFileName); + QString ext = fi.suffix(); + if (ext != "py") { + cerr << "Error: Cannot load \"" << fi.fileName().toAscii().data() + << "\", unknown extension" << endl; + return; + } + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->InsertStyleModule(index, sm); + +} + +void Controller::AddStyleModule(const char *iFileName) +{ + _pStyleWindow->Add(iFileName); +} + +void Controller::RemoveStyleModule(unsigned index) +{ + _Canvas->RemoveStyleModule(index); +} + +void Controller::Clear() +{ + _Canvas->Clear(); +} + +void Controller::ReloadStyleModule(unsigned index, const char * iFileName) +{ + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->ReplaceStyleModule(index, sm); +} + +void Controller::ExposeStyleWindow() +{ + _pStyleWindow->show(); +} + +void Controller::ExposeOptionsWindow() +{ + _pOptionsWindow->show(); +} + +void Controller::ExposeHelpWindow() +{ + QStringList cmd_list = _browser_cmd.split(" "); + for (QStringList::iterator it = cmd_list.begin(); + it != cmd_list.end(); + ++it) + (*it).replace("%s", _help_index); + QProcess browser(0); + QString exe = cmd_list.first(); + cmd_list.removeFirst(); + browser.start(exe, cmd_list); +} + +void Controller::ExposeAboutWindow() +{ + AppAboutWindow::display(); +} + +void Controller::SwapStyleModules(unsigned i1, unsigned i2) +{ + _Canvas->SwapStyleModules(i1, i2); +} + + +void Controller::toggleLayer(unsigned index, bool iDisplay) +{ + _Canvas->SetVisible(index, iDisplay); + _pView->updateGL(); +} + +void Controller::setModified(unsigned index, bool iMod) +{ + _pStyleWindow->setModified(index, iMod); + _Canvas->setModified(index, iMod); + updateCausalStyleModules(index + 1); +} + +void Controller::updateCausalStyleModules(unsigned index) { + vector vec; + _Canvas->causalStyleModules(vec, index); + for (vector::const_iterator it = vec.begin(); it != vec.end(); it++) { + _pStyleWindow->setModified(*it, true); + _Canvas->setModified(*it, true); + } +} + +void Controller::saveSnapshot(bool b) { + _pView->saveSnapshot(b); +} + +void Controller::savePSSnapshot(const QString& iFileName){ + PSStrokeRenderer psRenderer((const char*)iFileName.toAscii().data()); + _Canvas->Render(&psRenderer); + psRenderer.Close(); +} + +void Controller::saveTextSnapshot(const QString& iFileName){ + TextStrokeRenderer textRenderer((const char*)iFileName.toAscii().data()); + _Canvas->Render(&textRenderer); + textRenderer.Close(); +} + +void Controller::captureMovie() { + _pView->captureMovie(); +} + +void Controller::resetModified(bool iMod) +{ + _pStyleWindow->resetModified(iMod); + _Canvas->resetModified(iMod); +} + +FEdge* Controller::SelectFEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return fedge; +} + +ViewEdge* Controller::SelectViewEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return selection; +} + +NodeGroup * Controller::BuildRep(vector::iterator vedges_begin, + vector::iterator vedges_end) +{ + ViewMapTesselator2D tesselator2D; + Material mat; + mat.SetDiffuse(1,1,0.3,1); + tesselator2D.SetMaterial(mat); + + return (tesselator2D.Tesselate(vedges_begin, vedges_end)); +} + +void Controller::toggleEdgeTesselationNature(Nature::EdgeNature iNature) +{ + _edgeTesselationNature ^= (iNature); + ComputeViewMap(); +} + +void Controller::setModelsDir(const QString& dir) { + _current_dirs->setValue("models/dir", dir); +} + +QString Controller::getModelsDir() const { + QString dir = "."; + _current_dirs->getValue("models/dir", dir); + return dir; +} + +void Controller::setModulesDir(const QString& dir) { + _current_dirs->setValue("modules/dir", dir); +} + +QString Controller::getModulesDir() const { + QString dir = "."; + _current_dirs->getValue("modules/dir", dir); + return dir; +} + +void Controller::setPapersDir(const QString& dir) { + _current_dirs->setValue("papers/dir", dir); +} + +QString Controller::getPapersDir() const { + QString dir = Config::Path::getInstance()->getPapersDir(); + _current_dirs->getValue("papers/dir", dir); + return dir; +} + +void Controller::setHelpIndex(const QString& index) { + _help_index = index; +} + +QString Controller::getHelpIndex() const { + return _help_index; +} + +void Controller::setBrowserCmd(const QString& cmd) { + _browser_cmd = cmd; +} + +QString Controller::getBrowserCmd() const { + return _browser_cmd; +} + +void Controller::resetInterpreter() { + if (_inter) + _inter->reset(); +} + +void Controller::displayMessage(const char * msg, bool persistent){ + _pMainWindow->DisplayMessage(msg, persistent); +} + +void Controller::displayDensityCurves(int x, int y){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm) + return; + + unsigned i,j; + typedef vector densityCurve; + vector curves(svm->getNumberOfOrientations()+1); + vector curvesDirection(svm->getNumberOfPyramidLevels()); + + // collect the curves values + unsigned nbCurves = svm->getNumberOfOrientations()+1; + unsigned nbPoints = svm->getNumberOfPyramidLevels(); + if(!nbPoints) + return; + + // build the density/nbLevels curves for each orientation + for(i=0;ireadSteerableViewMapPixel(i, j, x, y), 0)); + } + } + // build the density/nbOrientations curves for each level + for(i=0;ireadSteerableViewMapPixel(j, i, x, y), 0)); + } + } + + // display the curves + for(i=0; iSetOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + for(i=1; i<=8; ++i) + _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); + _pDensityCurvesWindow->show(); +} diff --git a/extern/freestyle/src/app/Controller.h b/extern/freestyle/src/app/Controller.h new file mode 100755 index 00000000000..95b97ebcda3 --- /dev/null +++ b/extern/freestyle/src/app/Controller.h @@ -0,0 +1,232 @@ +// +// Filename : Controller.h +// Author : Stephane Grabli +// Purpose : The spinal tap of the system +// Date of creation : 01/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CONTROLLER_H +# define CONTROLLER_H + +# include +# include "ConfigIO.h" +# include "../geometry/FastGrid.h" +# include "../geometry/HashGrid.h" +# include "../view_map/ViewMapBuilder.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "../system/Interpreter.h" +# include "../view_map/FEdgeXDetector.h" + +class AppProgressBar; +class AppGLWidget; +class AppMainWindow; +class NodeGroup; +class WShape; +class SShape; +class ViewMap; +class ViewEdge; +class AppCanvas; +class InteractiveShader; +class Shader; +class AppInteractiveShaderWindow; +class AppStyleWindow; +class AppOptionsWindow; +class AppDensityCurvesWindow; + +class Controller +{ +public: + Controller() ; + ~Controller() ; + + void SetView(AppGLWidget *iView); + void SetMainWindow(AppMainWindow *iMainWindow); + int Load3DSFile(const char *iFileName); + void CloseFile(); + void LoadViewMapFile(const char *iFileName, bool only_camera = false); + void SaveViewMapFile(const char *iFileName); + void ComputeViewMap(); + void ComputeSteerableViewMap(); + void saveSteerableViewMapImages(); + void toggleEdgeTesselationNature(Nature::EdgeNature iNature); + void DrawStrokes(); + void ExposeStyleWindow(); + void ExposeOptionsWindow(); + void ExposeHelpWindow(); + void ExposeAboutWindow(); + void SwapStyleModules(unsigned i1, unsigned i2); + void InsertStyleModule(unsigned index, const char *iFileName); + void AddStyleModule(const char *iFileName); + void RemoveStyleModule(unsigned index); + void ReloadStyleModule(unsigned index, const char * iFileName); + void Clear(); + void toggleLayer(unsigned index, bool iDisplay); + void setModified(unsigned index, bool iMod); + void resetModified(bool iMod=false); + void updateCausalStyleModules(unsigned index); + void saveSnapshot(bool b = false); + void savePSSnapshot(const QString& iFileName); + void saveTextSnapshot(const QString& iFileName); + void captureMovie(); + void displayMessage(const char *msg, bool persistent = false); + void displayDensityCurves(int x, int y); + + + ViewEdge * SelectViewEdge(real x, real y); + FEdge * SelectFEdge(real x, real y); + NodeGroup* BuildRep(vector::iterator vedges_begin, + vector::iterator vedges_end) ; + + NodeGroup* debugNode() {return _DebugNode;} + AppGLWidget * view() {return _pView;} + NodeGroup* debugScene() {return _DebugNode;} + Grid& grid() {return _Grid;} + + void toggleVisibilityAlgo(); + + void setQuantitativeInvisibility(bool iBool); // if true, we compute quantitativeInvisibility + bool getQuantitativeInvisibility() const; + + void setFrontBufferFlag(bool b); + bool getFrontBufferFlag() const; + void setBackBufferFlag(bool b); + bool getBackBufferFlag() const; + + void setComputeRidgesAndValleysFlag(bool b); + bool getComputeRidgesAndValleysFlag() const ; + void setComputeSuggestiveContoursFlag(bool b); + bool getComputeSuggestiveContoursFlag() const ; + + void setComputeSteerableViewMapFlag(bool iBool); + bool getComputeSteerableViewMapFlag() const; + void setSphereRadius(real s){_sphereRadius=s;} + real getSphereRadius() const {return _sphereRadius;} + void setSuggestiveContourKrDerivativeEpsilon(real dkr){_suggestiveContourKrDerivativeEpsilon=dkr;} + real getSuggestiveContourKrDerivativeEpsilon() const {return _suggestiveContourKrDerivativeEpsilon;} + + AppProgressBar* getProgressBar(void) { return _ProgressBar; } + + void setModelsDir(const QString& dir); + QString getModelsDir() const; + void setModulesDir(const QString& dir); + QString getModulesDir() const; + void setPapersDir(const QString& dir); + QString getPapersDir() const; + void setHelpIndex(const QString& dir); + QString getHelpIndex() const; + void setBrowserCmd(const QString& cmd); + QString getBrowserCmd() const; + + void resetInterpreter(); + +private: + + // Main Window: + AppMainWindow *_pMainWindow; + + // List of models currently loaded + vector _ListOfModels; + + // Current directories + ConfigIO* _current_dirs; + + //View + // 3D + AppGLWidget *_pView; + + // 2D + //Viewer2DWindow *_pView2DWindow; + //Viewer2D *_pView2D; + + //Model + // Drawing Structure + NodeGroup *_RootNode; + + // Winged-Edge structure + WingedEdge* _winged_edge; + + ViewMap * _ViewMap; + + // Silhouette structure: + //std::vector _SShapes; + //NodeGroup *_SRoot; + + // Silhouette + NodeGroup *_SilhouetteNode; + NodeGroup *_ProjectedSilhouette; + NodeGroup *_VisibleProjectedSilhouette; + + // more Debug info + NodeGroup *_DebugNode; + + // debug + // NodeUser *_ViewMapNode; // FIXME + + // Chronometer: + Chronometer _Chrono; + + // Progress Bar + AppProgressBar *_ProgressBar; + + // edges tesselation nature + int _edgeTesselationNature; + + FastGrid _Grid; + //HashGrid _Grid; + + unsigned int _SceneNumFaces; + real _minEdgeSize; + real _EPSILON; + real _bboxDiag; + + AppCanvas *_Canvas; + + AppStyleWindow *_pStyleWindow; + AppOptionsWindow *_pOptionsWindow; + AppDensityCurvesWindow *_pDensityCurvesWindow; + + ViewMapBuilder::visibility_algo _VisibilityAlgo; + + // Script Interpreter + Interpreter* _inter; + + QString _help_index; + QString _browser_cmd; + + bool _EnableQI; + bool _ComputeRidges; + bool _ComputeSuggestive; + real _sphereRadius; + real _suggestiveContourKrDerivativeEpsilon; + + bool _ComputeSteerableViewMap; + + FEdgeXDetector edgeDetector; +}; + +extern Controller *g_pController; + +#endif // CONTROLLER_H diff --git a/extern/freestyle/src/app/Main.cpp b/extern/freestyle/src/app/Main.cpp new file mode 100755 index 00000000000..ae4d28017c5 --- /dev/null +++ b/extern/freestyle/src/app/Main.cpp @@ -0,0 +1,57 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include "Controller.h" +#include "AppMainWindow.h" +#include "AppConfig.h" + +// Global +Controller *g_pController; + +int main(int argc, char** argv) +{ + // sets the paths + QApplication::setColorSpec(QApplication::ManyColor); + QApplication *app = new QApplication(argc, argv); + Q_INIT_RESOURCE(freestyle); + + Config::Path pathconfig; + + QGLFormat myformat; + myformat.setAlpha(true); + QGLFormat::setDefaultFormat( myformat ); + + AppMainWindow mainWindow(NULL, "Freestyle"); + //app->setMainWidget(mainWindow); // QT3 + + g_pController = new Controller; + g_pController->SetMainWindow(&mainWindow); + g_pController->SetView(mainWindow.pQGLWidget); + + mainWindow.show(); + + int res = app->exec(); + + delete g_pController; + + return res; +} diff --git a/extern/freestyle/src/app/QGLBasicWidget.cpp b/extern/freestyle/src/app/QGLBasicWidget.cpp new file mode 100755 index 00000000000..44b5e0de224 --- /dev/null +++ b/extern/freestyle/src/app/QGLBasicWidget.cpp @@ -0,0 +1,141 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "QGLBasicWidget.h" +#include "../rendering/GLRenderer.h" +// #ifndef WIN32 +// #include "../rendering/pbuffer.h" +// #endif + +QGLBasicWidget::QGLBasicWidget( QWidget* parent, const char* name, int w, int h, const QGLWidget* shareWidget ) + : QGLWidget( parent, shareWidget ) +{ + _pGLRenderer = new GLRenderer; +// #ifndef WIN32 +// _Pbuffer = new PBuffer(w,h, +// PBuffer::SingleBuffer +// | PBuffer::DepthBuffer +// | PBuffer::StencilBuffer); + +// _Pbuffer->create(false); +// #endif + resizeGL(w,h); + _RootNode.SetLightingEnabled(false); + _RootNode.SetLineWidth(1.0); +} + +QGLBasicWidget::QGLBasicWidget( const QGLFormat& format, QWidget* parent, const char* name, + int w, int h, const QGLWidget* shareWidget ) + : QGLWidget( format, parent, shareWidget ) +{ + _pGLRenderer = new GLRenderer; +// #ifndef WIN32 +// _Pbuffer = new PBuffer(w,h, +// PBuffer::SingleBuffer +// | PBuffer::DepthBuffer +// | PBuffer::StencilBuffer); +// _Pbuffer->create(false); +// #endif + resizeGL(w,h); + _RootNode.SetLightingEnabled(false); + _RootNode.SetLineWidth(1.0); +} + +QGLBasicWidget::~QGLBasicWidget() +{ + _RootNode.destroy(); + if(_pGLRenderer) + delete _pGLRenderer; +// #ifndef WIN32 +// if(_Pbuffer) +// delete _Pbuffer; +// #endif +} + +void QGLBasicWidget::AddNode(Node* iNode){ + _RootNode.AddChild(iNode); +} + +void QGLBasicWidget::DetachNode(Node* iNode){ + _RootNode.DetachChild(iNode); +} + +void QGLBasicWidget::readPixels(int x, + int y, + int width, + int height, + float *pixels){ +// #ifndef WIN32 +// _Pbuffer->makeCurrent(); + +// glReadBuffer(GL_FRONT); +// GLenum e = glGetError(); +// GLenum glformat = GL_RED; +// glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); +// e = glGetError(); +// #endif +} + +void QGLBasicWidget::initializeGL() +{ + glClearColor(_clearColor[0],_clearColor[1],_clearColor[2],1); +} + +void QGLBasicWidget::resizeGL( int w, int h ) +{ +// #ifndef WIN32 +// _Pbuffer->makeCurrent(); +// #endif + + glViewport( 0, 0, (GLint)w, (GLint)h ); + // Projection Matrix + //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); +// #ifndef WIN32 +// // FXS- changed order of y bounds for glRead +// glOrtho(0,w, h, 0, -1.0, 1.0); +// #else + glOrtho(0,w, 0, h, -1.0, 1.0); + //#endif +} + +void QGLBasicWidget::paintGL() +{ +// #ifndef WIN32 +// _Pbuffer->makeCurrent(); +// glClearColor(_clearColor[0],_clearColor[1],_clearColor[2],1); +// #endif + + glDrawBuffer( GL_FRONT); + glPushAttrib(GL_ALL_ATTRIB_BITS); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE); + glDisable(GL_DEPTH_TEST); + _RootNode.accept(*_pGLRenderer); + glPopAttrib(); +} + diff --git a/extern/freestyle/src/app/QGLBasicWidget.h b/extern/freestyle/src/app/QGLBasicWidget.h new file mode 100755 index 00000000000..9b29a641f28 --- /dev/null +++ b/extern/freestyle/src/app/QGLBasicWidget.h @@ -0,0 +1,102 @@ +// +// Filename : QGLBasicWidget.h +// Author : Stephane Grabli +// Purpose : A basic qgl widget designed to be used as +// a 2D offscreen buffer. (no interactive function) +// Date of creation : 26/12/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef QGLBASICWIDGET_H +#define QGLBASICWIDGET_H + +#include +#include "../geometry/Geom.h" +//#include "../rendering/pbuffer.h" +#include "../scene_graph/NodeDrawingStyle.h" +using namespace Geometry; + +class GLRenderer; +class ViewMap; +// #ifndef WIN32 +// class PBuffer; +// #endif +class QGLBasicWidget : public QGLWidget +{ + Q_OBJECT + +public: + + QGLBasicWidget( QWidget* parent, const char* name, int w, int h, const QGLWidget* shareWidget=0 ); + QGLBasicWidget( const QGLFormat& format, QWidget* parent, const char* name, + int w, int h, const QGLWidget* shareWidget=0 ); + ~QGLBasicWidget(); + + /*! Adds a node directly under the root node */ + void AddNode(Node* iNode); + /*! Detach the node iNode which must + * be directly under the root node. + */ + void DetachNode(Node *iNode); + + /*! reads the frame buffer pixels as luminance . + * \param x + * The lower-left corner x-coordinate of the + * rectangle we want to grab. + * \param y + * The lower-left corner y-coordinate of the + * rectangle we want to grab. + * \param width + * The width of the rectangle we want to grab. + * \param height + * The height of the rectangle we want to grab. + * \params pixels + * The array of float (of size width*height) in which + * the read values are stored. + */ + void readPixels(int x,int y,int width,int height,float *pixels) ; +// #ifndef WIN32 +// void draw() { paintGL(); } +// #endif + + inline void SetClearColor(const Vec3f& c) {_clearColor = c;} + inline Vec3f getClearColor() const {return _clearColor;} + +protected: + + virtual void initializeGL(); + virtual void paintGL(); + virtual void resizeGL(int w, int h); + +private: +// #ifndef WIN32 +// PBuffer *_Pbuffer; +// #endif + NodeDrawingStyle _RootNode; + Vec3f _clearColor; + GLRenderer *_pGLRenderer; +}; + + +#endif // QGLBASICWIDGET_H diff --git a/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.cpp b/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.cpp new file mode 100755 index 00000000000..16ea53f157c --- /dev/null +++ b/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.cpp @@ -0,0 +1,155 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "QStyleModuleSyntaxHighlighter.h" +#include +#include +#include +using namespace std; + +QStyleModuleSyntaxHighlighter::QStyleModuleSyntaxHighlighter(QTextEdit *iTextEdit) + : QSyntaxHighlighter(iTextEdit){ + _operators.push_back("Operators"); + _operators.push_back("select"); + _operators.push_back("chain"); + _operators.push_back("bidirectionalChain"); + _operators.push_back("sequentialSplit"); + _operators.push_back("recursiveSplit"); + _operators.push_back("sort"); + _operators.push_back("create"); + + _functors.push_back("StrokeShader"); + _functors.push_back("UnaryPredicate1D"); + _functors.push_back("UnaryPredicate0D"); + _functors.push_back("BinaryPredicate1D"); + _functors.push_back("ChainingIterator"); + // _functors.push_back("getName"); + // _functors.push_back("shade"); + // _functors.push_back("getObject"); + + _python.push_back("class "); + _python.push_back("from "); + _python.push_back("import "); + _python.push_back("__init__"); + _python.push_back("__call__"); + _python.push_back("def "); + _python.push_back("self"); + _python.push_back("return"); + //_python.push_back("print"); + // _python.push_back("for"); + // _python.push_back("if"); + // _python.push_back("while"); + // _python.push_back("range"); + // _python.push_back("in"); + + _defaultColor = iTextEdit->textColor(); +} + +QStyleModuleSyntaxHighlighter::~QStyleModuleSyntaxHighlighter(){ + _operators.clear(); + _functors.clear(); + _python.clear(); +} + +void QStyleModuleSyntaxHighlighter::highlightKeywords(const QString& text, vector& iKeywords, const QColor& iColor){ + int pos = 0; + int pos1 = 0; + int pos2 = 0; + bool found = false; + for(vector::iterator o=iKeywords.begin(), oend=iKeywords.end(); + o!=oend; + ++o){ + pos =0; + QString word = *o; + while ( ( pos = text.indexOf(word,pos) ) != -1 ){ + setFormat( pos , word.length() , iColor); + pos += text.length()+1; + } + + // while ( ( pos = text.find(QRegExp("(^|\\W)"+word+"\\W"),pos) ) != -1 ){ + // setFormat( pos , word.length()+1 , iColor); + // pos += text.length()+1; + // } + } +} + +void QStyleModuleSyntaxHighlighter::dynamicHighlight(const QString& text){ + int pos = 0; + int pos1 = 0; + int pos2 = 0; + while((pos1 = text.indexOf("class", pos, Qt::CaseSensitive) ) != -1 ){ + int tmpPos = pos1+6; + if( ( pos2 = text.indexOf('(',tmpPos, Qt::CaseSensitive) ) != -1 ){ + setFormat( tmpPos , pos2-tmpPos , QColor(0,0,255)); + pos += pos2 - pos1+1; + } else{ + setFormat( tmpPos, text.length()-tmpPos, QColor(0,0,255)); + pos += text.length()+1; + } + } + + while((pos1 = text.indexOf("def",pos, Qt::CaseSensitive) ) != -1 ){ + int tmpPos = pos1+4; + if( ( pos2 = text.indexOf('(',tmpPos, Qt::CaseSensitive) ) != -1 ){ + setFormat( tmpPos , pos2-tmpPos , QColor(136,0,0)); + pos += pos2 - pos1+1; + } else{ + setFormat( tmpPos, text.length()-tmpPos, QColor(136,0,0)); + pos += text.length()+1; + } + } + + pos = 0; + while((pos1 = text.indexOf("UnaryFunction", pos) ) != -1 ){ + if( ( pos2 = text.indexOf(QRegExp("\\W"), pos1) ) != -1 ){ + setFormat( pos1 , pos2-pos1 , QColor(0,0,255)); + pos += pos2 - pos1+1; + } else{ + setFormat( pos1, text.length()-pos1, QColor(0,0,255)); + pos += text.length()+1; + } + } +} + +void QStyleModuleSyntaxHighlighter::highlightComment(const QString& text){ + int pos = 0; + int pos1 = 0; + int pos2 = 0; + while((pos1 = text.indexOf('#',pos, Qt::CaseSensitive) ) != -1 ){ + if( ( pos2 = text.indexOf('\n',pos1, Qt::CaseSensitive) ) != -1 ){ + setFormat( pos1 , pos2 , QColor(0,128,0)); + pos += pos2 - pos1; + //setFormat( pos , text.length()-pos , _defaultColor ); + } else{ + setFormat( pos1 , text.length()-pos1, QColor(0,128,0)); + pos += text.length()+1; + } + } +} + +void QStyleModuleSyntaxHighlighter::highlightBlock ( const QString & text) { + setFormat( 0 , text.length() , _defaultColor ); + + highlightKeywords(text, _python, QColor(128,128,128)); + highlightKeywords(text, _functors, QColor(136,0,0)); + dynamicHighlight(text); + highlightKeywords(text, _operators, QColor(0,0,255)); + highlightComment(text); +} \ No newline at end of file diff --git a/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.h b/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.h new file mode 100755 index 00000000000..ff3591ac45d --- /dev/null +++ b/extern/freestyle/src/app/QStyleModuleSyntaxHighlighter.h @@ -0,0 +1,57 @@ +// +// Filename : QStyleModuleSyntaxHighlighter.h +// Author : Stephane Grabli +// Purpose : Class to define the syntax highlighting +// of the style module +// Date of creation : 07/01/2004 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef QSTYLEMODULESYNTAXHIGHLIGHTER_H +#define QSTYLEMODULESYNTAXHIGHLIGHTER_H + +#include +#include + +class QStyleModuleSyntaxHighlighter : public QSyntaxHighlighter +{ +public: + QStyleModuleSyntaxHighlighter(QTextEdit *iTextEdit); + virtual ~QStyleModuleSyntaxHighlighter(); + + virtual void highlightBlock ( const QString & text) ; + +protected: + void highlightKeywords(const QString& text, std::vector& iKeywords, const QColor& iColor); + void dynamicHighlight(const QString& text); + void highlightComment(const QString& text); + +private: + std::vector _operators; + std::vector _functors; + std::vector _python; + QColor _defaultColor; +}; + +#endif diff --git a/extern/freestyle/src/app/app.pro b/extern/freestyle/src/app/app.pro new file mode 100755 index 00000000000..e2ba9aec6f7 --- /dev/null +++ b/extern/freestyle/src/app/app.pro @@ -0,0 +1,179 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = app +TARGET = $${APPNAME} +debug: TARGET = $${TARGET}_d +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + + + +# +# CONFIG +# +####################################### + +CONFIG *= console qglviewer2 3ds$${LIB3DS_VERSION_MAJ}.$${LIB3DS_VERSION_MIN} python$${PYTHON_VERSION_MAJ}.$${PYTHON_VERSION_MIN} glut +win32: CONFIG += embed_manifest_exe +QT += xml + +exists (../libconfig.pri) { + include (../libconfig.pri) +} + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} +UI_DIR = ui_dir + +#!win32:PYTHON_DIR_REL = build/$${REL_DESTDIR}/lib/python +#win32:PYTHON_DIR_REL = build\\$${REL_DESTDIR}\\python + +# +# LIBS +# +####################################### + +!static { + !win32 { + lib_bundle { + LIBS += -F$${BUILD_DIR}/$${REL_DESTDIR}/lib -framework $${LIB_GEOMETRY} -framework $${LIB_IMAGE} \ + -framework $${LIB_SCENE_GRAPH} -framework $${LIB_SYSTEM} \ + -framework $${LIB_WINGED_EDGE} -framework $${LIB_VIEW_MAP} \ + -framework $${LIB_RENDERING} -framework $${LIB_STROKE} + } else { + LIBS *= -L$${BUILD_DIR}/$${REL_DESTDIR}/lib \ + -l$${LIB_SYSTEM} -l$${LIB_IMAGE} -l$${LIB_GEOMETRY} \ + -l$${LIB_SCENE_GRAPH} -l$${LIB_WINGED_EDGE} -l$${LIB_VIEW_MAP} \ + -l$${LIB_RENDERING} -l$${LIB_STROKE} + } + } + + win32:LIBS *= $${DESTDIR}/$${LIB_SCENE_GRAPH}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_WINGED_EDGE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_VIEW_MAP}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_STROKE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_RENDERING}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_IMAGE}$${LIBVERSION}.lib +} + +# irix-n32:LIBS *= -l3ds -lglut -lQGLViewer -lpython$${PYTHON_VERSION_MAJ}.$${PYTHON_VERSION_MIN} +# mac:LIBS *= -framework GLUT -lobjc -l3ds -lm -lQGLViewer -lpython$${PYTHON_VERSION_MAJ}.$${PYTHON_VERSION_MIN} + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../geometry ../image ../scene_graph ../stroke ../system \ +# ../view_map ../winged_edge ../rendering + +# +# DEFINES +# +####################################### + +DEFINES *= APPNAME=\\\"$${APPNAME}\\\" \ + APPVERSION=\\\"$${APPVERSION}\\\" \ + #ROOT_DIR=\\"$(FREESTYLE_DIR)\\" \ + PYTHON_DIR_REL=\\\"$${PYTHON_DIR_REL}\\\" + +# +# MOC DIRECTORY +# +####################################### + +win32:MOCEXT = win32 +linux-g++:MOCEXT = linux +cygwin-g++:MOCEXT = cygwin +irix-n32:MOCEXT = irix +mac:MOCEXT = mac +MOC_DIR = moc_$$MOCEXT + +# +# INSTALL +# +####################################### + +EXE_DIR = ../../ +# install library +target.path = $$EXE_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES, HEADERS & FORMS +# +####################################### + + +static { + include(../system/src.pri) + include(../image/src.pri) + include(../geometry/src.pri) + include(../scene_graph/src.pri) + include(../winged_edge/src.pri) + include(../view_map/src.pri) + include(../stroke/src.pri) + include(../rendering/src.pri) +} +#include(src.pri) +APP_DIR = ../app +DEPENDPATH += . +INCLUDEPATH += . + +FORMS += appmainwindowbase4.ui \ + interactiveshaderwindow4.ui \ + optionswindow4.ui \ + progressdialog4.ui \ + stylewindow4.ui \ + densitycurveswindow4.ui +RESOURCES += $${APP_DIR}/freestyle.qrc +SOURCES *= $${APP_DIR}/AppAboutWindow.cpp \ + $${APP_DIR}/AppCanvas.cpp \ + $${APP_DIR}/AppConfig.cpp \ + $${APP_DIR}/AppGLWidget.cpp \ + $${APP_DIR}/AppInteractiveShaderWindow.cpp \ + $${APP_DIR}/AppMainWindow.cpp \ + $${APP_DIR}/AppOptionsWindow.cpp \ + $${APP_DIR}/AppProgressBar.cpp \ + $${APP_DIR}/AppStyleWindow.cpp \ + $${APP_DIR}/Controller.cpp \ + $${APP_DIR}/QGLBasicWidget.cpp \ + $${APP_DIR}/QStyleModuleSyntaxHighlighter.cpp \ + $${APP_DIR}/AppGL2DCurvesViewer.cpp \ + $${APP_DIR}/AppDensityCurvesWindow.cpp \ + $${APP_DIR}/ConfigIO.cpp \ + $${APP_DIR}/Main.cpp + +HEADERS *= $${APP_DIR}/AppAboutWindow.h \ + $${APP_DIR}/AppCanvas.h \ + $${APP_DIR}/AppConfig.h \ + $${APP_DIR}/AppGLWidget.h \ + $${APP_DIR}/AppInteractiveShaderWindow.h \ + $${APP_DIR}/AppMainWindow.h \ + $${APP_DIR}/AppOptionsWindow.h \ + $${APP_DIR}/AppProgressBar.h \ + $${APP_DIR}/AppStyleWindow.h \ + $${APP_DIR}/QGLBasicWidget.h \ + $${APP_DIR}/QStyleModuleSyntaxHighlighter.h \ + $${APP_DIR}/AppGL2DCurvesViewer.h \ + $${APP_DIR}/AppDensityCurvesWindow.h \ + $${APP_DIR}/ConfigIO.h \ + $${APP_DIR}/Controller.h + diff --git a/extern/freestyle/src/app/appmainwindowbase4.ui b/extern/freestyle/src/app/appmainwindowbase4.ui new file mode 100755 index 00000000000..13e758d49dd --- /dev/null +++ b/extern/freestyle/src/app/appmainwindowbase4.ui @@ -0,0 +1,237 @@ + + AppMainWindowBase + + + + 0 + 0 + 510 + 523 + + + + Freestyle + + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + + 0 + 0 + 510 + 21 + + + + + &Help + + + + + + + + + &File + + + + + + + + + + + + + + + + + &Windows + + + + + + + &Tools + + + + + + + + + + + + + + + + &Open + + + Ctrl+O + + + + + &Save + + + Ctrl+S + + + + + &Close + + + Ctrl+C + + + + + Load Camera + + + Ctrl+L + + + + + Save PS Snapshot... + + + Ctrl+P + + + + + Save Snapshot + + + Ctrl+W + + + + + Save Text Snapshot + + + Ctrl+T + + + + + Capture Movie + + + Ctrl+M + + + + + &Quit + + + Ctrl+Q + + + + + Compute View Map + + + Ctrl+B + + + + + Save Directional ViewMap Images + + + Ctrl+Shift+B + + + + + Compute Strokes + + + Ctrl+D + + + + + Reset Interpreter + + + Ctrl+R + + + + + Style Modeler Window + + + Ctrl+I + + + + + Options Window + + + Alt+O + + + + + &Help + + + Ctrl+H + + + + + Control Bindings + + + H + + + + + About + + + + + + diff --git a/extern/freestyle/src/app/densitycurveswindow4.ui b/extern/freestyle/src/app/densitycurveswindow4.ui new file mode 100755 index 00000000000..1a35e3247d1 --- /dev/null +++ b/extern/freestyle/src/app/densitycurveswindow4.ui @@ -0,0 +1,442 @@ + + DensityCurvesWindow + + + + 0 + 0 + 838 + 272 + + + + Density Curves + + + + 9 + + + 6 + + + + + 1 + + + + [ density / pyramid level ] for each Orientation + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + 0 degree + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + + + 45 degrees + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + + + 90 degrees + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + + + 135 degrees + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + + + all directions + + + Qt::AlignCenter + + + + + + + + + + [ density / orientation ] for each Level + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 1 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 2 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 3 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 4 + + + Qt::AlignCenter + + + + + + + + + + + 0 + + + 6 + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 5 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 6 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 7 + + + Qt::AlignCenter + + + + + + + + + 0 + + + 6 + + + + + + 50 + 50 + + + + + + + + level 8 + + + Qt::AlignCenter + + + + + + + + + + + + + + + + + AppGL2DCurvesViewer + QWidget +
AppGL2DCurvesViewer.h
+
+
+ + +
diff --git a/extern/freestyle/src/app/freestyle.qrc b/extern/freestyle/src/app/freestyle.qrc new file mode 100755 index 00000000000..b37a6702af6 --- /dev/null +++ b/extern/freestyle/src/app/freestyle.qrc @@ -0,0 +1,23 @@ + + + icons/add.png + icons/arrow_down.png + icons/arrow_left.png + icons/arrow_right.png + icons/arrow_up.png + icons/clear.png + icons/close.png + icons/edit.png + icons/eye0.png + icons/eye1.png + icons/folder.png + icons/home.png + icons/mod0.png + icons/mod1.png + icons/ok.png + icons/reload.png + icons/remove.png + icons/save.png + icons/save_as.png + + diff --git a/extern/freestyle/src/app/icons/add.png b/extern/freestyle/src/app/icons/add.png new file mode 100755 index 0000000000000000000000000000000000000000..d3388dcb3a977562e4ce812ddd429faf7bd671bf GIT binary patch literal 400 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fY)RhkE)4%caKYZ?lYt_f1s;*b z3=G_YAk0{w5<>&kwaNsLF!x?!7h76SvLtfz}(NX4A1Q}+5DHV|>^S5Eup zSIel<*41kMLVBT2$5QR2m)-}$Rwm0c9GS2*Dan;br-SkKl~fMDKf>1o1w4K(@%Xu0 z-F@G=){U-TD$?zjn6cl>zbAI~=q4@32|{6?4}W!+EMQ?V(2BpzEyJ|*+;x$a?E3FT z8Lodk*$Jm{C z@5aeKYxP!SD6Fj3i?f$&-Fju!))HU+cgqf4YngOYv1HSV#0zF0D<8kVxh^HWb+`ZS qUGu%J?Xd8!F-ZQC-dtDnlg-F)=gnE2J2ik|$KdJe=d#Wzp$PyaBBbpA literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/arrow_down.png b/extern/freestyle/src/app/icons/arrow_down.png new file mode 100755 index 0000000000000000000000000000000000000000..6cf2e9bba266cbc7e7d654477d85ba8deb923495 GIT binary patch literal 813 zcmV+|1JeA7P)a z?V!lEa8L%QOb00(7USTs3Pvb{O8+1g1q_6l>=&NJ;*&mHcl*##n580X3xi7kHbw!3 zt~@*fFUw#uVIT$;DOTiBC~B(R-nWcEAW-dzA#7~KVs5B-| z=7q2)OJ7x-8A3*?99N(A1J9>L%)EZ|MDv8`i8=LDai(w8J8Fu5!E8)!sefKHpxtG` zm(ii-v6k|B0N|X*uDnY9z-6ybzIlJtf`G*1I$NDnejV_bU92dycziX1Qx-miLW)=cQeY=UyCaTF+P$*6_WpLFciD z3V$^*#~+V=<0TIm&pFrMxM5@K!5W@_H+bW458;I!jAx&Jacv_sDOkg8jtQ6#oZ0Xd rYMF5I5=Hc%E}1b&!~Ytaw&(o@&9xsD0e7hn00000NkvXXu0mjf%@k}o literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/arrow_left.png b/extern/freestyle/src/app/icons/arrow_left.png new file mode 100755 index 0000000000000000000000000000000000000000..72a5c462af6624985fb90335fe17b8c26bafba64 GIT binary patch literal 776 zcmV+j1NZ!iP)J69}y%!stO^LFHnEAX-c%SY!_< zUtkYv6Im&=F?u4(j1bL?iZaotb2W9w$LQ7X-g{b@;`QDc$At&Z;``3|e&7E)eCH4| zV$sxEV3iMOWW?g%hC3oh9PI5SKxjQ|5tpzcDkZa*p57ghfRZ`u717+uL2hQd{;|9>Mk!s zSDOy}DFlqf!9_VTvTPc}DyUDg;)UM||A$)YtWONpfg>|O&lvNO?J^uT)u>dm;Cj$Lp8o04@`5UG*kBJC7 zs$(FF&Bv@}K-1Dz1bIOUz6{qKxViMwl)+2zRBYYg_1ZrSSHTGGT_Qp=i6uJJ7M(J>1%(GeutRpJLxi^|uqd&Q zQxaA})Ic8!MRYC`hiOeIkXdjbPGn_fRWRo$r>`td0e=9ta6yGMKP8Fcn-9?0bl@3 z0t{=lvpO(72PoMUcH@M%GMR`#L{K!sV3;WNmr7PTL)14x)H|jW*0^;cV?Pi0n8rpD zz?a_y%d+S#6)Y%(45`6UiR zQ68$QvL|Ppcv%<#x?aersu8JkpN0dChGRaL;V=~QLRD4vyu*&WejrafL>%6hXCKl6 z5`Q=tre*7$qJi%HIq+T|9l7$lau@*49jr#{R_kLX&%rQFM+d5P)OZNQ`@tA1tn;{- z0Dw11Ox6l|sHHv&eO=Uw#&Can3zCV?!&A3U*=DX8kIrIJz)Gm4PI1g+jl;c2Es`@4 z>C^Q?oon~kyt44i1SSRKLd~^uN%T%6fYeM>iuE~BpiC6f3?_KWh4ut8FxDMoS>rG; z9Y87`mEt!`qb1?TQH*<$J-W9p19M%bvc_Q`Qjc%(sFb`_9(BME!nkYc>hWOXBFqvy z?T<7d6^}{Z``uBXDC6Guz*1JDle-ojk8fJQ@N7L&@t8C}urX?b0ibPA@5$=uAyeaF znN=WStAJ_b)8UbygYDNUK^<`M0e7oP{*$if_LLj$L;r&!O-tL2 z&_(oPW&_KuHkV~!ZO$~)sT)~Ql)T%!*Y}+Be!CdcUN^T2ec*wYbI$YO%Q@e3UIP(f zBV^nV>c4=8<3QxwI)lAY^nQ^*-dWH!uQ>HrWFpGz;5F&LqN3%z%h2-H_Fm@T&M)Ay4Nxfq7kee9iuTVa~Bs!Ta_PYtF+vQU#$aa1%O4Eszp&AcsrlRp+5@w6FyY6P}Ko&Uq3$^>UBms>>`jRDwX7Qi8tVM^ErlWgP&#ZaLDINJuqZAv^r>BHdb*6BL!3GQ3ThkDm&J z!UVWk003O$Tk&jU%JaS@4F%FY4q?(S91HM=>gwVhRK@~Z`^NV0iBXmX_@Qlno8E?%E%_wxv z9*~n#^{uc2zPJ^P0Gh|z941F$!9DDZ& ze+Dz&+qR$!7J9)lEA^yk=F;kH)?2Y&+OU7#Z{OE^pRYwDPyhe` M07*qoM6N<$f}Dk7W&i*H literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/clear.png b/extern/freestyle/src/app/icons/clear.png new file mode 100755 index 0000000000000000000000000000000000000000..1e3b2e37bd92039170e0c8c4b6800cbb304b2acb GIT binary patch literal 1057 zcmV++1m63JP)(`g6t82kY;JjQO`)BY2=#|n_`~GqV zioOvT$l>;9@LUVaQMi`EBwfPN4g$|Kl3#p&qkrP}%3)w!ejIzq(w%BWIJ@VWeaqgi zq7N{TBD*U?Z;wOLR=5CS(Dg>>`hGK87j2z<>)ExwymPiM@5CaHfuA2r54}BBYycFJ zWb!?v1VEr2mvlUhh&Hw@*|hUSHXR4sos*nrvpd&PmQUcd*9~CtXe*{|%ZLuQuE)UT z^+x6RFxk}_(YI6aXaGb&b<7Vw?j(M_S=*Sq8+3g)2Cg+tV*xIH_yVuJv!Cquw`ojO z2+INH-UenMg)XJh2X;G7$%9YMuarOg*CGTC9ieOs?r>;AP=lb{gvk}SIU6xKTV--CVD@ehrx>~{21dF) zq`gsELmuJt?}|;ggS3Z8Yk#}`{twv19UO_sNE1&rBFhdpNth~0sgl&uW{9&2R`b6p z7O=oAx{O*d)Gkhipb;!(u$3X90?)F7z5r{}C%r(_4UW~St8w%2rVB#~P#TPYh(ali z)()0sqgAVH9Tj<5+usXDZ#}`7;@-5=>j3Kw2sG525QQM3QOZJV3&&32B{hy6Q4MN@ zCbArRqw9jiZ&w)72WG<^vABe;MH1R&ZBqQU@-aM&zT>mkPY`YLUYuee8WKjq6(2 zw#}V;0aqr}@$1t>GK!e}4{DBwZ;@*l#(`4+OrHSa b|C+x6EX1(}8FF_Z00000NkvXXu0mjfK}zX* literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/close.png b/extern/freestyle/src/app/icons/close.png new file mode 100755 index 0000000000000000000000000000000000000000..2042ec3d1bab5ad174c0f0976fa11a8330668416 GIT binary patch literal 1437 zcmV;O1!DS%P)A7)A&6kmlx!GT(^ilT_3D0Q$>hhn9}SfrDFOf$)R#&=bm%+^5NdO z3_f@s_StOMKi2-Q|5{4`1X!wt4<3r#b6PIX7-LdZ1eD>YddF6WJMT4c-DG7g$zD0L z(>>>ae8A+p2cnZ-JvMu)`tU;9-MvKo8}FFcKVE<6r@P&M*vG5UOP_i2u}^oJ8-Dk~c`Je-7)=wC?(LXjt!~C< z?=!V~=1p9wnY`UJNpr_I7a9>UsESW|CaRXaIA^w2*4!P$DjWpQGEik9($|Hw6@l%Ow3T4n58r^OXcY2Sbps^$^I>jiv(+7 zknt=EaH@#+eNBCmQ9U%rv2ULys!y=@;dw6q@iq3ZeS(ck;4`XoiyVGziPFR@3s1km z#aDkot{!m)%{?e00tOVpW2{Bt@8$2a@$Yj?J^Ta@yz~poGsn30 z&o@~9*=c&WHYiWcGx>!thazW z>Y-mKHZIe=`VqaI4N9Myq*R|6LUkCiDyoWzB5`>bz4s}`S`dTC;9=H)F_^&NeNLA4 z!1Vnt)R2V0AcLh>}BJb8q$Hcoqcon&tpSBU%I+ZwAXn&-G; znccMy*}e2W7|W5bJVR6&A#LxICM^K6q(iUOq;mIRrXKkw0NutVvR)SxM5xzc#BR`| z5F?nd!0Mk~rFwXQ^1Uax|LN~>`Rp&b^41^NeD54-yUF1?dhc=vAv z#Sy$$H20{2h~kFn6v0L@`x|Rq`pr+6`}%jN%%9-?=>=Nrmr2@9ilgI{?wST0knC)5 zR#jEOd9R|Xh%unKx?)*wd~lxbnUhR?>1$MG78#j2HgFE~cDHD) z{)fhezmxS6Ojy9UKz*)ct;nES(#l(7L`!h^+Mhdv9R2?&~E>`Q$;OYRRit#acCC zsHPBWuhY`j<~40^uWS3}mU>ieR8$ZJQJ;J5Zm#R~H{X=t+P1vi>^?tg?V13*P>)YO zI&<(;xHzkEy#lJzPlO*<8(#a9!{=zOgNCDIt&X;?Z(?q?R<0!3E8jR+K6iGj&5wrQ!Ln2ol4P9OZUgXNPi&?HohzRx00000NkvXXu0mjfZSKb> literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/edit.png b/extern/freestyle/src/app/icons/edit.png new file mode 100755 index 0000000000000000000000000000000000000000..244751b1933fcc0554fcdae42a52b80747601215 GIT binary patch literal 896 zcmV-`1AqL9P)S9qJRK$%%FmA+%AJtAtOG?v8iA^cfBr}=G%)F0#TuhmEI&qTpz=gx* zoge4^|L49dfBtg`V+7|^jS<$0Fp7!7h$L}Ts&#gs9f#a=%>RC_bm7N8-g~R0pY{}; zDbAv*oGH%gT9G)X^+u?bm8RZUTGjL49M|wK)J?ytZs9k*{=*0QZs&e~Et=Zxo zVU6I7V2vSfPLUb{e*G5oG{fbcMg(gOs^BjFOm1Wf=7AWv9&z>T4D<8N z&wA=M(lLMt=SV%+4gXJNLdS0k^vQ{r3gch z==lQ#*5FioYBmIp{+=KhE5Jn{<)D`3e5t{GZ;qo5^lrdT6_!4M`v;+wKxBYHs*k5m@oT zHi3Yv({n^S-=SPC6URwgTLHI*d3`mGTON3?!O+WuZWq(jO6JiqR6#^K%Sbn7UGplH z2!OD@g`YnBj*){C|NE_opt^|aBCyW5O-{{WE}Ujt{a+q=_bULBq+3gCE$P8DnSo5# zeqXRQn)vlgJb36R&UFJl&m)@+2!a6T6p`-Nr|-BuvG+v^&%Drqs#C%!VPGJGv4$je zs47l3aPxf6cJduBy$-amtSUICIH#RlNKh1sd*8~GwT8n-j<>&kwaNmN+OP%M6i1_J}5vZsq%&wu7PJi%}I;Y(F=&%bnqXt5r+uvU$`^O7qo~0#wNGdK>=~9yFJ(iKUFyMfR zuZgd7XlPit*vroFO}BUNaW%HFvn?(w@vxC|4;0}!ED?WuTP}mvRIa;u;@fLZ`W4Q9 ybdT}sD)-e_f33=jyjJm0{bk9o@5hDzNy=~2&(wL<)#(fjK?YA(KbLh*2~7Y!q^2SO literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/eye1.png b/extern/freestyle/src/app/icons/eye1.png new file mode 100755 index 0000000000000000000000000000000000000000..f762b66b482a898e848f8a1f91812d4c116ecb17 GIT binary patch literal 402 zcmV;D0d4+?P)&_8jAau;7wqI+5@8dPl754^+63mDu4THen?eX4p5Jk5X_Kc{c}~nmIVOjg zIm*#-90mdb0tj_9`Tc$xhG995!+O2WnUy59i#)^OFaa>Kk>t2CN6WHUtJPXcrN2$J zT17k_9|ZuC`21+%;qe)zQVE)-VR&c|qzjU8T^FWl0zesn+)|iIrH&Ovf!FJWBuQAF zpGH&ISl`;iyE}lF@+&US4&d|o;PH4M%fFttwy_h5#5MpH3I#SA4eB?y+)Zbh&g`>T wG+3!rexfoKi!FA&W>r-q9nL1$|EgZ*3q^XL$P=a5X#fBK07*qoM6N<$f}1z2d;kCd literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/folder.png b/extern/freestyle/src/app/icons/folder.png new file mode 100755 index 0000000000000000000000000000000000000000..3a99ad5ee9264bc91614c6549f1ea091f5bdd9ef GIT binary patch literal 1015 zcmV`$u?0Ztu^JC**zCOMQ ztg1YB;x~XzU3_ELvImTn20Bk3ed$1HaG)Cz3qYD$h9BR>#i{EjflXlV+2fZ1^rN@; zk~$Czi9o$tXYtw$uRiktho0Jl2Ux3QnI+5IdPa$G>db|66XTWM>`Rh zLvQ?kll!6t-hJzb0A}$2_0Rq=%K(w4O z{qt3Z_ipFl;e(s}KKAWZR&2mmA0DC+LoCn|@I3fsYM#^IO_kQI*!j*BfDY~MrCzDg zRSf9cRzw}Bb6BUSRjQ4Ip$AJGdutyT|AMdywFsImsQg`K=HfKB%D2!fZ+Za16A$+S zaQ>712vDvjY#%5R0nH4WNnYG+K^VcMxm;zELA@r-UA{qOc9G7azoGqsu6iLr6R22^ zayg~DufS3r{;9(J5`+z2+EVV|){A@^Nb`h22HqANSA3Jw;VtiyYQ0G`XYc0U< zFED*=g^pT*g=MIQN+lG^)r_U8uv8HmVN4P>LGxOhDV0VHs!WWJi~<-{MO8_G*unfV zL_rU;Hxp6;$rO=|nTf+W2dXq9VX@XCD|SQMKnrZXDKRh?=3ZJ4TFxM~lvE5!mV25A zq@q}>SP?4a2F@?w_w?pW+XnVl9nVr2EWkE}0T1rq(Lq>_aVUen5C%e66zbh6QN6`V zC5D}yI0b7HoO4Vrv^CGH%HLhclb-cHknZUqNiswrNkGISO$|xXg-8cUBBZI1rWqm` zlb3D}yTENR=#2s2_Xz@rbA})=IA<^>|7NXE5Lm4B@qLH22HO5MgK~%QlZWqn_`bmy zgYWwolW&l}d#lge*$!Sm$6Kj3#-M6RrA6Fo5k)a^D<+N-qBy1%Cy2FVl5GHcJoE)y lYrgx?>nA(_?_OP|{{lw42X^C7OA`P9002ovPDHLkV1k6-(M13N literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/home.png b/extern/freestyle/src/app/icons/home.png new file mode 100755 index 0000000000000000000000000000000000000000..ec4b22098b270daffdb13bc14d4982d3b5bee257 GIT binary patch literal 1050 zcmV+#1m*jQP)yVI)QmKmakKyO^tv0W9#XiGh(ZV4i>w z5Bri&-+z0&To}u&l)mgc@D3J^eW zgQM-$egj?iLrzS9;SMR_w?r(W`wssDxe;U@KmdV*0+deA z-hK07POiHE%$2|JxboL;h`~RB^!a;#7>?XzVEFWtnSp_cg(2GX8aS;31Q0xo<0hW` zA8Dt9Vkj3oBg5mDpBcV>{RTATAH#>Q{}?{~;$RTu=VK7&V`b>v@*8L%(9_HyLzy7- z9Cjs;c>n8v& zOpHKtnSg2-89=cIbnJbA0D>F*18DGvZ~wps-g@z$Vci)KG)00Rjka@b{1R_Wk(##~zl>fk~3#^z&ED z8~3n-(>^2AbVeW)Bh(?0ZjxbYDlf`Kp6xefEa02nF0hD06)Rp U$7SziSpWb407*qoM6N<$f>S-^3jhEB literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/mod0.png b/extern/freestyle/src/app/icons/mod0.png new file mode 100755 index 0000000000000000000000000000000000000000..816d814528aab101dfbe3de1ef011f6a2c477bf7 GIT binary patch literal 910 zcmV;919AL`P)Y=TvZsyf9KwrOeQm(2jgQ*Tl?Zl6l;F?m3@}+nFJ{ap51n#rY2W zzCYhX<#IW)*(_}>uR*B>8y;-=;02&9Xal~1#_Tx%R5qJMiAX0gUxK=Z-3i#$2mQT( zK)C^TD^H44Jf5#iv$(jp4HRiV@~e=F!AKesJ=-fjlM3U|AY6YKW4?Hj5!eQE+D?)^ z!oi)EcvLXfVyvYZgkh}3il9Y!`Dx+x;a;xy9VM5`b*n9vh1olnYBRtO0$RS$>}tS~ zDGL(<6T*=x%S_QQdPyj3SX$ch`8CVf`OuMw;QU#Gblehm1sxcsi;812E_JOqcUU-g zNZ8VfcfNC&djyLWh`MlKr$8*#F%(&=!@j2sejsdm0q^A#9Nq;#z9qz6&{kNg!ctWM zuvk^RxkngG8f-M#1yx&+h#0gH@@1E`7My=gh(|)pjX-!~2#yZH(uQJBLO@_g)L`61 z7qsbvHWmk{cwusHQm|GqR_Jwv)BC}79UK+9+G_cMUwXVWXn6O9fc|(C*HK(9MYvjaPzpwO!^ypZuMK~!)wpmY z&NtuYx&6uU&K@Zdp-?FB_T>Ri98jD(sM(i};V1{!QDK9XLI;MGM@^)a3A`}BAR(moSc zDMcoeK`F&oXHU?2Zj5X9VWtpc@>Y_`n>|eb-r(njyWE-knge1E@(v zK~#90U6fsjlw}mhf6x2Q>^SbYo7$Kw;(F0m?56lp>4Juo8I(mrH$??OAb3&eMG;~% z+f^Z1M221@-B?gUX(4VHN#)kAC29HYSexsn?7Q>zKJW89r;BkT`@{d@95{at z=i{&P`8>H?j%gH1Pz+%*f{KR7KKv8)(!-(*Bj zMbjA>Bz6>H%Q0>FZ1JT}2ZJEENht9jk%hq06Gfh^#yrz83zpml?K1#@@fxc}ud}L9 z;*~SAAK%u~&AUMm*lDq8p)9a$-~yZ5Qas$9h1Qmv+h5q$(#%Y{m;c=j8QAFe`h9g;rWF;^hfwh2fk$_)VS zy8RZ5Ho{b7*fP+{id*5^$Aq*Gu@i>NFkDsu1ZBk|i-eAh#U(RqftJKnb5sjk6PDNt z1LHoW2JBfQq!S<_)Qs@J0(fu%3{NT+wF(H#N?NSn+6A;Ew1X*)#Ma>f*Q4f^Ix~WE zf_1_SPk6oyeBZ-U&8{j9O(Qnct*?NDXB}wAxog$tVRp4S01k~oY#iDc8ahTBi?t5x zgvn}ysd|GyCmhwVJPP2or@%UXJUii`l%l)cv3`N&&C?!x3yR1%v~hg!yU*T&hjT&{ z$JC>k)7N~$@e3ybuAM>ag zZ~}jY9w#ohFi|*u6wuSZHus7B(F-d(>>JN5HMFOb_@3fOF~QKdhf>fx4>ooRI<}lI zg?#v1nuGlVyZ?A+!%pBbB7%sdM@B|cE8nZU{n}SmIXPCAuvV8!J(7B)CDO4(v5`tW zlAq6)WqW^Bx?UYR0Q3N}0Oc#CShsGS%$YOCZC;h?zqVv+bvVpCbT!l%s}ZXy*EGLg z(R^{%vH#2r`oI2e_vo(scLGJAA|jFi=!`O&{nN~s&x(sF~-E@1$DgR%Ul_#ab> V6P!|1z)=7I002ovPDHLkV1nTL^q2qu literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/ok.png b/extern/freestyle/src/app/icons/ok.png new file mode 100755 index 0000000000000000000000000000000000000000..31c064ba9221ee125c0e45fd78c5c5aee61df26e GIT binary patch literal 769 zcmV+c1OEJpP)cHeO`Ol5zyLImnGt9T1H%VqW(G%q0AggA&F~&9`H#VoA)Q3SX95jmWT@xj;7a)R z^BV(@{Q!sq8Il<;00a;d!!L#n;(X!)41XB*GfZYMAj-f=Km(^R%;#X{xbI--kf0)> z!T>bq0>f_xLy(~$B>({gGI%4<76vm1GXbE)euf@AhW7vs>}8nG%FKFS(^xaXBh-W8 z%8e@wmu_A<0CbomLngxqm{NcMVqoZE5MbzF_^Sy{dctr5O#t#j!dhU7L{~0=gA&dn81P~-iG%@UF4rO*=QfFfLbMX(u|4sitF#HF) z;6Km>z%XRs1V)NE0|Sd03j-quP|FJjhChpe>VE!Tz);7Kh|OSt0Ac}?KN&Xuz4X`N zul!#I26Z6c4d{z4z+hnq(q=$D2y*}p144#}K=u-_oP$4LH|iN6a)YQh#7^a2TZY_83Gt?0om_>hAsuh{$++Aq$gGRCwBA z{Qv(y11$hR0I`4wMn*>LvdIhq4F4GX8U8XT0BHvXh#L+7@dF^<$gq@Q12%0S#{vWp zBbY!pI2CMQKLaz+Kp7xkoPoh!#vUwn@%crD4^KWYFgyfuet|70M7IEBCO`l&U<5@9 z(7+_1+xi*)N1TiJf9S)Z{~!K*K*1NkT>M{lt?WPl1pfaF(F`Emk8UtP0HL}#8SKge z4KEFb4x0`JEp9Em;rQv#Cx)`aWeodP?*qAh0?_4!FoOXC2w`vn(EI-x)++}nGfcLh z%)rac3)Xz~{#6DZMji$QVFiWkY~l;JC|Uw?gN zh?j|nYixbe%5dZR4HQ>@`|yo{{|`TdsDLQL=g*%RZhV8vOMnel05Jgq2xhRuf1dvg zPk%iHb2P;@!StOUcNq45+zSbUFRTo%oUROdTzU*<+GY#_Tmo>5823R_6(qhLKmm<1vL0tk|&K}iIdjhT-z|7SkS{9pK@@c#?nF8n739Qb?y ztOukQToeG!0+|UAKoA#$3Xz`-57;iSF$l0gA|>cv5W}&r$FTbR>W`~%_Q|g&!FoV? zL1w@TB!B>7K~i7%{pk1gf(n8RTyk7sf%pgU3|bso3~qdGkg@@o5q5pv1&+`Vfe;26 zHW`MM?^iOgKV@fld-N^X447d60fbrz0ZS=n4(0-tP!$F~1wNu;|I>p{40l%FVfg#w zFG?W<5I~saF{B7AP;^jaP_$5FVC7)NYT)l5zZveIxX*C^z`Qvc6f) z=~KH+zjFWcdv|1?teMrMQu65v(}Nqi0zL;b7m#+uxdI=PIl9BzEadoCnO}$H z7-s(t$ZOimo#Q%l?>WA!&2Q`H2?XaIn%(wY;1FZM^u5O4`^61+PFPZO?X0?tMPb!q TU50bOAY$-z^>bP0l+XkKp@En? literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/save.png b/extern/freestyle/src/app/icons/save.png new file mode 100755 index 0000000000000000000000000000000000000000..932100d98e9a5cc13465268cc51c83afb3659b05 GIT binary patch literal 1329 zcmV-11RFGON5~78IN^A?-7^@FCAjIX%M}*yOCmaq_Qc}X%vu8&;KC0|bZ&X%R(%l_o)v5|~ z-H>*>gZ%vQ96$cPC@(KZ(=^)J+Fl&IdGmhh^=2cbBs)6?n@wS0AVGQg4(W2a@%zW4 zs&5HJQE)n)|9Qy>@Y=O&>FWBEdGn?qB@7Me)YYvZ6iRa9#E-b$P9l*%ifh6HdJx`{0+8ktHS3SJ0hUBH$g+g_Xr`-G@U@8 zm+b5u3JddSXn0cyAqa&+BQxH*^%FU1Qa+X?>Fevq=Nt1(i3J5&95}EBfIuL|p+gst zQX+(4;llT1Ufy^b8{ZbnlR<$%h{D2Lq?BZ3Wj$TcGb$|fQ2W7aq*5A|CE2rQ9lgCF zEX#VFaamaziNqj@gvP~-KT}(~{JBs7Aq4dwHc?#s5}Kx?syYsbgRHCtkHKr!d?dYI z50+&S4o4X?HuHbMhG7y4^-)yhr?PSyhYx>4OUuV1olc_w96fr4?(QJj*>1w&IJ$1| z#pgd@S=MvG!C(@vcO0f^k(1*_*L8}EU&penVQ_Wz5)z3)G|fQM43;ikfZOe4_wKLR zxbaht9cvvGyl>wbCQdBCG}8e(&@~^>&?P$R}eywPFqMR z$;hzN(-Yz0!ywUUKTDU+XXnl(bay|Zrlx_}vtOaAYC84xO|-Ne5CEE{4Zm?m$9*a) zW}|63*RS6~RaNry{mh&>8C}=#c-)khPQo;c>F(}h`}X4mgJI^(nGS%*<0Kl5V6&BA z7@ff1&P%5)R8=RLRGBtyGS$_UT)1$X=H_c;WMq(=>%s3Ihtui6?RHXB5{V%!OA-ntId`s|t5@3r zL22m}48tUymKcV~iWOzl*Po%KWxud23)3_KP_A6LiVzTwr%=@tt5?q?5*Z{MPBJ*C zlb1J!b?fFbfBpt(8{7NDvsilU%tL&Rb!{Qf*5k>AjD{V}+y=^Zh3 zY6)Fk0YI>E<7eEw8KA#^kp6y^L_(vz{SRWX1gX>zZg(a=pO1Jv$@=w+Ie4&<#>QG< znw=v?(Vk2uIePRB0U)KMy847Xb?Q4z)5K=8v1QAvT)K3FMT_QOx7%oL{t2&l98yX= zo=oELI2jpJ(6nDig8!L20GG?fkt17$q9{ly*|FnG`PEm$m$bIFv2x{NR8=K6HwP&t zu~-VPcRcBI`Wf>)_xo}<99Y({QEF;V%FfO%48z23w_zB=-EVC@DNOVC7Xyzbo6Sab n^-0;$(MdsppVOynMrHg3XD>JFd(#Jg00000NkvXXu0mjfC*pp_ literal 0 HcmV?d00001 diff --git a/extern/freestyle/src/app/icons/save_as.png b/extern/freestyle/src/app/icons/save_as.png new file mode 100755 index 0000000000000000000000000000000000000000..2c8b3f3e7b4ffc635b4a333d5e0ad5eb2d0301b7 GIT binary patch literal 1024 zcmV+b1poVqP)iGZw1C2>U zK~#90wUkL{T~!#zfA_xo(!^NWBu&X8R)fU}U8tdzXboxAjiN{w3JQw2aA5`M;8GDq z7p>hiMXf@ewbf0bsHIX$BZ^gOC}=T4%uw5AFyqV1d*>Tm-20wQT8D-G!-0G6Irn$| z=NnGs?rhq&$DLH}o{j7oa0fHX<^j@q%hrMO?(SzIfazOrae!pgwmts9gX=MO?z-)2 z#wJSSauG=`VrhMzf74654`b%6S--`fT=o6L<@KYKEFy8hEOiO+?2G%WKfSl}(Tl>| z9no}DbZ191SFL-Yp?mLhJl#4+f`h2yf34xMhwea3E($ewLNLnWm^mUw-%sE2*3PZW zN)4ZW*3R?C50W_P&VC-*QQ|1N02;(72Sd~eqLj)?d;BV$_pIWRFOO0?KgpTV5ymIv zzQi3wQpY0B-tCVNMG!^Nf>Q)Bf*8f(9O`*WW#M$sW;*U}WZ750uk{mw8p+ewj-SrIj_dQ-Y zVT?l%C8%a#B?Ljm(27$t)EpJ%%J_3SZ~m2)Q%&R!oaC4|9~5t3pm5WIe8divMKSZN z?6UHMMNQ(gB)xQ9_YEz%HsX(epf`$md%BhRhWjr_bON5nRg5P#wr6#kmX)ewRzfX@ zs8i_KOl#8`=sreYl4F0;#$3}zB$Sa*T;$jx1g%!a`A{_@W-5iw&eC@Ky=Zq2r)v^k zn^?-VU0WF+>1T3$kaB5yv13rJ+ylBS%$P(b&YY<6{6Usr%z1$&)k`X3iBY zD^sW#L5-P0nKNSr@-<3*WR!y<>X@e+|D6&@lU0fFz}ZnkQ0C@^Qb{QVC5TfBLI{>M zi(%$8H8lJ)SS4-gBVP|^&QmuP=c=iD70(h2ZZJ4Kj%E4D=W`3dk-M{Y!xmrgb>Z88 u(sxI8RIkJHZ_58w?oNDZ&{-%hh5iH)WvQo_3>g{#0000 + InteractiveShaderWindow + + + + 0 + 0 + 368 + 482 + + + + InteractiveShader + + + + 9 + + + 6 + + + + + + + + 0 + + + 6 + + + + + Save and close window + + + + + + :/icons/icons/ok.png + + + + + + + Save module + + + + + + :/icons/icons/save.png + + + Ctrl+S + + + + + + + Save module as + + + + + + :/icons/icons/save_as.png + + + Ctrl+W + + + + + + + Close window + + + + + + :/icons/icons/close.png + + + Ctrl+C + + + + + + + + + + + + + diff --git a/extern/freestyle/src/app/optionswindow4.ui b/extern/freestyle/src/app/optionswindow4.ui new file mode 100755 index 00000000000..48c322c6d84 --- /dev/null +++ b/extern/freestyle/src/app/optionswindow4.ui @@ -0,0 +1,651 @@ + + OptionsWindow + + + + 0 + 0 + 414 + 443 + + + + Options + + + + 9 + + + 6 + + + + + 4 + + + + Directories + + + + 9 + + + 6 + + + + + Models Path: + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Add a folder to the path... + + + + + + :/icons/icons/folder.png + + + + + + + + + + + + Patterns Path: + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Add a folder to the path... + + + + + + :/icons/icons/folder.png + + + + + + + + + + + + Brushes Path: + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Add a folder to the path... + + + + + + :/icons/icons/folder.png + + + + + + + + + + + + Python Path: + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Add a folder to the path... + + + + + + :/icons/icons/folder.png + + + + + + + + + + + + + Paper textures + + + + 9 + + + 6 + + + + + + + + 0 + + + 6 + + + + + Add Texture(s) + + + + + + :/icons/icons/add.png + + + + + + + Remove Texture + + + + + + :/icons/icons/remove.png + + + + + + + Move up + + + + + + :/icons/icons/arrow_up.png + + + + + + + Move down + + + + + + :/icons/icons/arrow_down.png + + + + + + + Clear list + + + + + + :/icons/icons/clear.png + + + + + + + + + + Feature Lines + + + + 9 + + + 6 + + + + + Curvatures + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Sphere Radius (x mean edge size) + + + + + + + + + + + + + + + Ridges and Valleys + + + + 9 + + + 6 + + + + + Compute Ridges and Valleys + + + + + + + + + + Suggestive Contours + + + + 9 + + + 6 + + + + + Compute Suggestive Contours + + + + + + + 0 + + + 6 + + + + + kr Derivative Epsilon + + + + + + + + + + + + + + + + Miscelleanous + + + + 9 + + + 6 + + + + + View Map + + + + 9 + + + 6 + + + + + Save vector coordinates as floats + + + + + + + Do not save occluders lists + + + + + + + Compute Steerable ViewMap + + + + + + + + + + Visibility + + + + 9 + + + 6 + + + + + Enable Quantitative Invisibility + + + + + + + + + + Drawing + + + + 9 + + + 6 + + + + + Back Buffer + + + + + + + Front Buffer + + + + + + + + + + + Help + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Browser Command + + + + + + + + + + + + Help index file: + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Browse + + + + + + :/icons/icons/folder.png + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + 0 + + + 6 + + + + + Save and close window + + + + + + :/icons/icons/ok.png + + + + + + + Save Options + + + + + + :/icons/icons/save.png + + + + + + + Close window + + + + + + :/icons/icons/close.png + + + + + + + + + + + + diff --git a/extern/freestyle/src/app/progressdialog4.ui b/extern/freestyle/src/app/progressdialog4.ui new file mode 100755 index 00000000000..78cc67ed440 --- /dev/null +++ b/extern/freestyle/src/app/progressdialog4.ui @@ -0,0 +1,26 @@ + + + + + ProgressDialog + + + + 0 + 0 + 350 + 64 + + + + Progress Dialog + + + + + + + + + qPixmapFromMimeSource + diff --git a/extern/freestyle/src/app/src.pri b/extern/freestyle/src/app/src.pri new file mode 100755 index 00000000000..2fcc9146216 --- /dev/null +++ b/extern/freestyle/src/app/src.pri @@ -0,0 +1,50 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +APP_DIR = ../app + +SOURCES *= $${APP_DIR}/AppAboutWindow.cpp \ + $${APP_DIR}/AppCanvas.cpp \ + $${APP_DIR}/AppConfig.cpp \ + $${APP_DIR}/AppGLWidget.cpp \ + $${APP_DIR}/AppInteractiveShaderWindow.cpp \ + $${APP_DIR}/AppMainWindow.cpp \ + $${APP_DIR}/AppOptionsWindow.cpp \ + $${APP_DIR}/AppProgressBar.cpp \ + $${APP_DIR}/AppStyleWindow.cpp \ + $${APP_DIR}/Controller.cpp \ + $${APP_DIR}/QGLBasicWidget.cpp \ + $${APP_DIR}/QStyleModuleSyntaxHighlighter.cpp \ + $${APP_DIR}/AppGL2DCurvesViewer.cpp \ + $${APP_DIR}/AppDensityCurvesWindow.cpp \ + $${APP_DIR}/ConfigIO.cpp \ + $${APP_DIR}/Main.cpp + +HEADERS *= $${APP_DIR}/AppAboutWindow.h \ + $${APP_DIR}/AppCanvas.h \ + $${APP_DIR}/AppConfig.h \ + $${APP_DIR}/AppGLWidget.h \ + $${APP_DIR}/AppInteractiveShaderWindow.h \ + $${APP_DIR}/AppMainWindow.h \ + $${APP_DIR}/AppOptionsWindow.h \ + $${APP_DIR}/AppProgressBar.h \ + $${APP_DIR}/AppStyleWindow.h \ + $${APP_DIR}/QGLBasicWidget.h \ + $${APP_DIR}/QStyleModuleSyntaxHighlighter.h \ + $${APP_DIR}/AppGL2DCurvesViewer.h \ + $${APP_DIR}/AppDensityCurvesWindow.h \ + $${APP_DIR}/ConfigIO.h \ + $${APP_DIR}/Controller.h + +FORMS *= $${APP_DIR}/appmainwindowbase4.ui \ + $${APP_DIR}/interactiveshaderwindow4.ui \ + $${APP_DIR}/optionswindow4.ui \ + $${APP_DIR}/progressdialog4.ui \ + $${APP_DIR}/stylewindow4.ui \ + $${APP_DIR}/densitycurveswindow4.ui + +RESOURCES = $${APP_DIR}/freestyle.qrc + + diff --git a/extern/freestyle/src/app/stylewindow4.ui b/extern/freestyle/src/app/stylewindow4.ui new file mode 100755 index 00000000000..c4ff5f656ae --- /dev/null +++ b/extern/freestyle/src/app/stylewindow4.ui @@ -0,0 +1,182 @@ + + StyleWindow + + + + 0 + 0 + 571 + 421 + + + + Style Modules + + + + 9 + + + 6 + + + + + false + + + 0 + + + 3 + + + + + + + + + + 0 + + + 6 + + + + + Add a Style Module + + + + + + :/icons/icons/add.png + + + Ctrl+A + + + + + + + Remove a Style Module + + + + + + :/icons/icons/remove.png + + + Ctrl+R + + + + + + + Move up + + + + + + :/icons/icons/arrow_up.png + + + Ctrl+U + + + + + + + Move down + + + + + + :/icons/icons/arrow_down.png + + + Ctrl+D + + + + + + + Edit Style Module + + + + + + :/icons/icons/edit.png + + + Ctrl+E + + + + + + + Save Modules list + + + + + + :/icons/icons/save.png + + + Ctrl+S + + + + + + + Clear Modules list + + + + + + :/icons/icons/clear.png + + + Ctrl+X + + + + + + + Close window + + + + + + :/icons/icons/close.png + + + Ctrl+C + + + + + + + + + + + + diff --git a/extern/freestyle/src/build_bundle.macosx.py b/extern/freestyle/src/build_bundle.macosx.py new file mode 100755 index 00000000000..e97153f269c --- /dev/null +++ b/extern/freestyle/src/build_bundle.macosx.py @@ -0,0 +1,183 @@ +#!/usr/bin/python + +import os,sys,string + +install_dependencies=["GLUT",\ + "QtCore", "QtGui", "QtXml", \ + "libQGLViewer", "FreestyleSystem", "FreestyleRendering",\ + "FreestyleImage","FreestyleGeometry", "FreestyleSceneGraph", "FreestyleWingedEdge",\ + "FreestyleViewMap", "FreestyleStroke"] + +if not("FREESTYLE_DIR" in os.environ): + print "FREESTYLE_DIR must be set to your Freestyle directory" + sys.exit() + +src_dir_path=os.environ['FREESTYLE_DIR'] +dest_dir_path=os.path.join(os.environ['FREESTYLE_DIR'], "freestyle.2.0.0-macosx-x86") +bundle_name="Freestyle.app" +bundle_path=os.path.join(dest_dir_path,bundle_name) +frameworks_path=os.path.join(bundle_path,"Contents/Frameworks") +exe_path=os.path.join(bundle_path, "Contents/MacOS") +original_lib_path=os.path.join(src_dir_path,"build/macosx/release/lib") +original_exe_path=os.path.join(src_dir_path,"build/macosx/release",bundle_name,"Contents/MacOS") + + + +# Builds a dictionary of dependencies for +# a given binary +# The table format is: +# "dependency name" "dependency path" +def buildDependenciesTable(binary_file, dep_table): + cmd="otool -L %s" % binary_file + #print cmd + #otool_output = os.system(cmd) + otool_output = os.popen(cmd).read().split('\n') + for dep_text in otool_output: + if (dep_text.count(":") == 0): + dep = dep_text.split(' ')[0].lstrip() + dep_base_name=os.path.basename(dep) + dep_table[dep_base_name] = dep + + +def fixPaths(dep_table): + for k,v in dep_table.items(): + if(k.count("Freestyle")): + dep_table[k] = os.path.join(src_dir_path, "build/macosx/release/lib",v) + if(k.count("QGLViewer")): + dep_table[k] = os.path.join("/usr/lib", v) + +def extractFrameworkBaseDir(framework_lib): + parts=framework_lib.split("/") + head="/" + tail="" + in_head=True + for p in parts: + if(in_head == True): + head=os.path.join(head,p) + else: + tail=os.path.join(tail,p) + if(p.count(".framework") != 0): + in_head=False + return (head,tail) + +def installDependencies(dep_table, install_dependencies, new_dep_table): + for k,v in dep_table.items(): + for d in install_dependencies: + if(k.count(d)!=0): + framework_dir_path=v + cp_option="" + head="" + tail="" + if(v.count("framework")): + (head,tail) = extractFrameworkBaseDir(v) + framework_dir_path=head + cp_option="-R" + lib_name=os.path.split(framework_dir_path)[1] + target=os.path.join(frameworks_path,lib_name) + # update new table + if(tail != ""): + new_dep_table[k] = os.path.join("@executable_path/../Frameworks",lib_name,tail) + else: + new_dep_table[k] = os.path.join("@executable_path/../Frameworks",lib_name) + if(os.path.exists(target) != True): + cmd = "cp %s %s %s" % (cp_option, framework_dir_path,frameworks_path) + print "Installing dependency:",lib_name + os.system(cmd) + +def updatePathsToDependencies(binary_file, install_dependencies, dep_table, new_dep_table): + # executable: + f_dep_table={} + buildDependenciesTable(binary_file,f_dep_table) + for k,v in f_dep_table.items(): + # is k in install_dependencies? + for ld in install_dependencies: + if(k.count(ld) != 0): + #print new_dep_table + cmd="install_name_tool -change %s %s %s" % (v,new_dep_table[k], binary_file) + os.system(cmd) + # check + cmd="otool -L %s" % binary_file + os.system(cmd) + +def cleanDir(dir, to_delete): + os.chdir(dir) + #print os.getcwd() + for d in os.listdir("."): + #print d + if(d == "Headers"): + cmd="rm -rf Headers" + to_delete.append(os.path.join(dir,d)) + #os.system(cmd) + elif(d.count("debug") != 0): + cmd="rm -rf %s"%(d) + #print cmd + to_delete.append(os.path.join(dir,d)) + #os.system(cmd) + elif(os.path.isdir(d) == True): + #print d + cleanDir(os.path.join(dir,d), to_delete) + #else: + # print d + os.chdir(os.path.join(dir,"..")) + #print os.getcwd() + + +# build bundle structure +if( os.path.exists(dest_dir_path) != True): + print "Creating directory",dest_dir_path + os.mkdir(dest_dir_path) + +if(os.path.exists(bundle_path) != True): + print "Creating the bundle structure", bundle_path + cmd = "cp -R %s %s" % (os.path.join(src_dir_path, "build/macosx/release/",bundle_name), bundle_path) + os.system(cmd) + os.mkdir(os.path.join(bundle_path,"Contents/Frameworks")) + + +dep_table = {} +new_dep_table = {} +# Executable +for f in os.listdir(original_exe_path): + if(f[0] == '.'): + continue + exe_file_path=os.path.join(original_exe_path, f) + buildDependenciesTable(exe_file_path, dep_table) + +# Frameworks +for f in os.listdir(original_lib_path): + if (f.count("framework") == 0): + continue + f_name=f.split('.')[0] + fwk_path=os.path.join(original_lib_path, "%s.framework" % f_name,f_name) + buildDependenciesTable(fwk_path, dep_table) + +# Fix ad-hoc paths +fixPaths(dep_table) + +# install dependent libs +installDependencies(dep_table, install_dependencies, new_dep_table) + +# update paths to installed dependencies +for f in os.listdir(exe_path): + if(f[0] == '.'): + continue + updatePathsToDependencies(os.path.join(exe_path,f), install_dependencies, dep_table, new_dep_table) + +# Frameworks +for f in os.listdir(frameworks_path): + if (f.count("framework") == 0): + continue + f_name=f.split('.')[0] + fwk_path=os.path.join(frameworks_path, "%s.framework" % f_name,f_name) + updatePathsToDependencies(fwk_path, install_dependencies, dep_table, new_dep_table) + + +# Clean-up +# Remove debug libs +print "Cleaning..." +to_delete=[] +cleanDir(bundle_path, to_delete) +for f in to_delete: + cmd = "rm -rf %s"%f + print cmd + os.system(cmd) diff --git a/extern/freestyle/src/geometry/BBox.h b/extern/freestyle/src/geometry/BBox.h new file mode 100755 index 00000000000..9c46d7918e2 --- /dev/null +++ b/extern/freestyle/src/geometry/BBox.h @@ -0,0 +1,141 @@ +// +// Filename : BBox.h +// Author(s) : Stephane Grabli +// Purpose : A class to hold a bounding box +// Date of creation : 22/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BBOX_H +# define BBOX_H + +template +class BBox +{ + public: + + inline BBox() { + _empty = true; + } + + template + inline BBox(const T& min_in, const T& max_in) : _min(min_in), _max(max_in) { + _empty = false; + } + + template + inline BBox(const BBox& b) : _min(b.getMin()), _max(b.getMax()) { + _empty = false; + } + + template + inline void extendToContain(const T& p) { + if (_empty) { + _min = p; + _max = p; + _empty = false; + return; + } + for (unsigned i = 0; i < Point::dim(); i++) { + if (p[i] < _min[i]) + _min[i] = p[i]; + else if (p[i] > _max[i]) + _max[i] = p[i]; + } + _empty = false; + } + + inline void clear() { + _empty = true; + } + + inline bool empty() const { + return _empty; + } + + inline const Point& getMin() const { + return _min; + } + + inline const Point& getMax() const { + return _max; + } + + inline BBox& operator=(const BBox& b) { + _min = b.getMin(); + _max = b.getMax(); + _empty = false; + return *this; + } + + inline BBox& operator+=(const BBox& b) { + if (_empty) { + _min = b.getMin(); + _max = b.getMax(); + _empty = false; + } + else { + for (unsigned i = 0; i < Point::dim(); i++) { + if (b.getMin()[i] < _min[i]) + _min[i] = b.getMin()[i]; + if (b.getMax()[i] > _max[i]) + _max[i] = b.getMax()[i]; + } + } + return *this; + } + + inline bool inside(const Point& p){ + if(empty()) + return false; + for (unsigned i = 0; i < Point::dim(); i++) { + if((_min[i]>p[i]) || (_max[i] +BBox& operator+(const BBox &b1, const BBox &b2) +{ + Point new_min; + Point new_max; + + for (unsigned i = 0; i < Point::dim(); i++) { + new_min[i] = b1.getMin()[i] < b2.getMin()[i] ? b1.getMin()[i] : b2.getMin()[i]; + new_max[i] = b1.getMax()[i] > b2.getMax()[i] ? b1.getMax()[i] : b2.getMax()[i]; + } + + return BBox(new_min, new_max); +} + +#endif // BBOX_H diff --git a/extern/freestyle/src/geometry/Bezier.cpp b/extern/freestyle/src/geometry/Bezier.cpp new file mode 100755 index 00000000000..8f9771f29d3 --- /dev/null +++ b/extern/freestyle/src/geometry/Bezier.cpp @@ -0,0 +1,118 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Bezier.h" +#include "FitCurve.h" + +using namespace std; + +BezierCurveSegment::BezierCurveSegment() +{ +} + +BezierCurveSegment::~BezierCurveSegment() +{ +} + +void BezierCurveSegment::AddControlPoint(const Vec2d& iPoint) +{ + _ControlPolygon.push_back(iPoint); + if(_ControlPolygon.size() == 4) + Build(); +} + +void BezierCurveSegment::Build() +{ + if(_ControlPolygon.size() != 4) + return; + + // Compute the rightmost part of the matrix: + vector::const_iterator p0,p1,p2,p3; + p0 = _ControlPolygon.begin(); + p1 = p0;++p1; + p2 = p1;++p2; + p3 = p2;++p3; + float x[4], y[4]; + + x[0] = -p0->x()+3*p1->x()-3*p2->x()+p3->x(); + x[1] = 3*p0->x()-6*p1->x()+3*p2->x(); + x[2] = -3*p0->x()+3*p1->x(); + x[3] = p0->x(); + + y[0] = -p0->y()+3*p1->y()-3*p2->y()+p3->y(); + y[1] = 3*p0->y()-6*p1->y()+3*p2->y(); + y[2] = -3*p0->y()+3*p1->y(); + y[3] = p0->y(); + + int nvertices = 12; + float increment = 1.0/(float)nvertices; + float t = 0.f; + for(int i=0; i<=nvertices; ++i) + { + _Vertices.push_back(Vec2d((x[3] + t*(x[2] + t*(x[1] + t*x[0]))), + (y[3] + t*(y[2] + t*(y[1] + t*y[0]))))); + t+=increment; + } +} + +BezierCurve::BezierCurve() +{ + _currentSegment = new BezierCurveSegment; +} + +BezierCurve::BezierCurve(vector& iPoints, double error) +{ + FitCurveWrapper fitcurve; + _currentSegment = new BezierCurveSegment; + vector curve; + + fitcurve.FitCurve(iPoints, curve, error); + int i=0; + vector::iterator v,vend; + for(v=curve.begin(),vend=curve.end(); + v!=vend; + ++v) + { + if((i == 0) || (i%4 != 0)) + AddControlPoint(*v); + ++i; + } +} + +BezierCurve::~BezierCurve() +{ + if(_currentSegment) + delete _currentSegment; +} + +void BezierCurve::AddControlPoint(const Vec2d& iPoint) +{ + _ControlPolygon.push_back(iPoint); + _currentSegment->AddControlPoint(iPoint); + if(_currentSegment->size() == 4) + { + _Segments.push_back(_currentSegment); + _currentSegment = new BezierCurveSegment; + _currentSegment->AddControlPoint(iPoint); + } +} + + diff --git a/extern/freestyle/src/geometry/Bezier.h b/extern/freestyle/src/geometry/Bezier.h new file mode 100755 index 00000000000..acae71bbb2c --- /dev/null +++ b/extern/freestyle/src/geometry/Bezier.h @@ -0,0 +1,73 @@ +// +// Filename : Bezier.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a Bezier curve of order 4. +// Date of creation : 04/06/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BEZIER_H +# define BEZIER_H + +#include +#include "../system/FreestyleConfig.h" +#include "Geom.h" + +using namespace Geometry; + +class LIB_GEOMETRY_EXPORT BezierCurveSegment +{ +private: + std::vector _ControlPolygon; + std::vector _Vertices; + +public: + BezierCurveSegment(); + virtual ~BezierCurveSegment(); + + void AddControlPoint(const Vec2d& iPoint); + void Build(); + inline int size() const {return _ControlPolygon.size();} + inline std::vector& vertices() {return _Vertices;} +}; + + +class LIB_GEOMETRY_EXPORT BezierCurve +{ +private: + std::vector _ControlPolygon; + std::vector _Segments; + BezierCurveSegment *_currentSegment; + +public: + BezierCurve(); + BezierCurve(std::vector& iPoints, double error=4.0); + virtual ~BezierCurve(); + + void AddControlPoint(const Vec2d& iPoint); + std::vector& controlPolygon() {return _ControlPolygon;} + std::vector& segments() {return _Segments;} +}; + +#endif // BEZIER_H diff --git a/extern/freestyle/src/geometry/FastGrid.cpp b/extern/freestyle/src/geometry/FastGrid.cpp new file mode 100755 index 00000000000..b090a3df67f --- /dev/null +++ b/extern/freestyle/src/geometry/FastGrid.cpp @@ -0,0 +1,62 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "FastGrid.h" + +void FastGrid::clear() { + if(!_cells) + return; + + for(unsigned i = 0; i < _cells_size; i++) + if (_cells[i]) + delete _cells[i]; + delete[] _cells; + _cells = NULL; + _cells_size = 0; + + Grid::clear(); +} + +void FastGrid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb) { + Grid::configure(orig, size, nb); + _cells_size = _cells_nb[0] * _cells_nb[1] * _cells_nb[2]; + _cells = new Cell*[_cells_size]; + memset(_cells, 0, _cells_size * sizeof(*_cells)); +} + +Cell* FastGrid::getCell(const Vec3u& p) { + //cout << _cells<< " "<< p << " " <<_cells_nb[0]<<"-"<< _cells_nb[1]<<"-"<< _cells_nb[2]<< " "<<_cells_size<< endl; + assert(_cells||("_cells is a null pointer")); + assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0])<_cells_size); + assert(p[0]<_cells_nb[0]); + assert(p[1]<_cells_nb[1]); + assert(p[2]<_cells_nb[2]); + return _cells[_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]]; +} + +void FastGrid::fillCell(const Vec3u& p, Cell& cell) { + assert(_cells||("_cells is a null pointer")); + assert((_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0])<_cells_size); + assert(p[0]<_cells_nb[0]); + assert(p[1]<_cells_nb[1]); + assert(p[2]<_cells_nb[2]); + _cells[_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]] = &cell; +} \ No newline at end of file diff --git a/extern/freestyle/src/geometry/FastGrid.h b/extern/freestyle/src/geometry/FastGrid.h new file mode 100755 index 00000000000..e620ff24385 --- /dev/null +++ b/extern/freestyle/src/geometry/FastGrid.h @@ -0,0 +1,85 @@ +// +// Filename : FastGrid.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a cell grid surrounding the +// bounding box of the scene +// Date of creation : 30/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef FASTGRID_H +# define FASTGRID_H + +# include "Grid.h" +# include +/*! Class to define a regular grid used for ray + * casting computations + * We don't use a hashtable here. The grid is + * explicitly stored for faster computations. + * However, this might result in significant + * increase in memory usage (compared to the regular grid) + */ + +class LIB_GEOMETRY_EXPORT FastGrid : public Grid +{ + public: + + FastGrid() : Grid() { + _cells = NULL; + _cells_size = 0; + } + + virtual ~FastGrid() { + clear(); + } + + /*! clears the grid + * Deletes all the cells, clears the hashtable, + * resets size, size of cell, number of cells. + */ + virtual void clear(); + + /*! Sets the different parameters of the grid + * orig + * The grid origin + * size + * The grid's dimensions + * nb + * The number of cells of the grid + */ + virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); + + /*! returns the cell whose coordinates are pased as argument */ + Cell* getCell(const Vec3u& p) ; + + /*! Fills the case p with the cell iCell */ + virtual void fillCell(const Vec3u& p, Cell& cell); + +protected: + + Cell** _cells; + unsigned _cells_size; +}; + +#endif // FASTGRID_H diff --git a/extern/freestyle/src/geometry/FitCurve.cpp b/extern/freestyle/src/geometry/FitCurve.cpp new file mode 100755 index 00000000000..ade40b050ca --- /dev/null +++ b/extern/freestyle/src/geometry/FitCurve.cpp @@ -0,0 +1,602 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include "FitCurve.h" + +using namespace std; + +typedef Vector2 *BezierCurve; + +#ifdef __cplusplus +extern "C" +{ +#endif + +/* Forward declarations */ +static double *Reparameterize(Vector2 *d, int first, int last, double *u, BezierCurve bezCurve); +static double NewtonRaphsonRootFind(BezierCurve Q, Vector2 P, double u); +static Vector2 BezierII(int degree, Vector2 *V, double t); +static double B0(double u); +static double B1(double u); +static double B2(double u); +static double B3(double u); +static Vector2 ComputeLeftTangent(Vector2 *d, int end); +static Vector2 ComputeLeftTangent(Vector2 *d, int end); +static Vector2 ComputeLeftTangent(Vector2 *d, int end); +static double ComputeMaxError(Vector2 *d, int first, int last, BezierCurve bezCurve, double *u, int *splitPoint); +static double *ChordLengthParameterize(Vector2 *d, int first, int last); +static BezierCurve GenerateBezier(Vector2 *d, int first, int last, double *uPrime, Vector2 tHat1, Vector2 tHat2); +static Vector2 V2AddII(Vector2 a, Vector2 b); +static Vector2 V2ScaleIII(Vector2 v, double s); +static Vector2 V2SubII(Vector2 a, Vector2 b); + + +#define MAXPOINTS 1000 /* The most points you can have */ + +/* returns squared length of input vector */ +double V2SquaredLength(Vector2 *a) +{ return(((*a)[0] * (*a)[0])+((*a)[1] * (*a)[1])); +} + +/* returns length of input vector */ +double V2Length(Vector2 *a) +{ + return(sqrt(V2SquaredLength(a))); +} + +Vector2 *V2Scale(Vector2 *v, double newlen) +{ + double len = V2Length(v); + if (len != 0.0) { (*v)[0] *= newlen/len; (*v)[1] *= newlen/len; } + return(v); +} + +/* return the dot product of vectors a and b */ +double V2Dot(Vector2 *a, Vector2 *b) +{ + return(((*a)[0]*(*b)[0])+((*a)[1]*(*b)[1])); +} + +/* return the distance between two points */ +double V2DistanceBetween2Points(Vector2 *a, Vector2 *b) +{ +double dx = (*a)[0] - (*b)[0]; +double dy = (*a)[1] - (*b)[1]; + return(sqrt((dx*dx)+(dy*dy))); +} + +/* return vector sum c = a+b */ +Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c) +{ + (*c)[0] = (*a)[0]+(*b)[0]; (*c)[1] = (*a)[1]+(*b)[1]; + return(c); +} + +/* normalizes the input vector and returns it */ +Vector2 *V2Normalize(Vector2 *v) +{ +double len = V2Length(v); + if (len != 0.0) { (*v)[0] /= len; (*v)[1] /= len; } + return(v); +} + +/* negates the input vector and returns it */ +Vector2 *V2Negate(Vector2 *v) +{ + (*v)[0] = -(*v)[0]; (*v)[1] = -(*v)[1]; + return(v); +} + + +/* + * GenerateBezier : + * Use least-squares method to find Bezier control points for region. + * + */ +static BezierCurve GenerateBezier(Vector2 *d, int first, int last, double *uPrime, Vector2 tHat1, Vector2 tHat2) +// Vector2 *d; /* Array of digitized points */ +// int first, last; /* Indices defining region */ +// double *uPrime; /* Parameter values for region */ +// Vector2 tHat1, tHat2; /* Unit tangents at endpoints */ +{ + int i; + Vector2 A[MAXPOINTS][2]; /* Precomputed rhs for eqn */ + int nPts; /* Number of pts in sub-curve */ + double C[2][2]; /* Matrix C */ + double X[2]; /* Matrix X */ + double det_C0_C1, /* Determinants of matrices */ + det_C0_X, + det_X_C1; + double alpha_l, /* Alpha values, left and right */ + alpha_r; + Vector2 tmp; /* Utility variable */ + BezierCurve bezCurve; /* RETURN bezier curve ctl pts */ + + bezCurve = (Vector2 *)malloc(4 * sizeof(Vector2)); + nPts = last - first + 1; + + + /* Compute the A's */ + for (i = 0; i < nPts; i++) { + Vector2 v1, v2; + v1 = tHat1; + v2 = tHat2; + V2Scale(&v1, B1(uPrime[i])); + V2Scale(&v2, B2(uPrime[i])); + A[i][0] = v1; + A[i][1] = v2; + } + + /* Create the C and X matrices */ + C[0][0] = 0.0; + C[0][1] = 0.0; + C[1][0] = 0.0; + C[1][1] = 0.0; + X[0] = 0.0; + X[1] = 0.0; + + for (i = 0; i < nPts; i++) { + C[0][0] += V2Dot(&A[i][0], &A[i][0]); + C[0][1] += V2Dot(&A[i][0], &A[i][1]); +/* C[1][0] += V2Dot(&A[i][0], &A[i][1]);*/ + C[1][0] = C[0][1]; + C[1][1] += V2Dot(&A[i][1], &A[i][1]); + + tmp = V2SubII(d[first + i], + V2AddII( + V2ScaleIII(d[first], B0(uPrime[i])), + V2AddII( + V2ScaleIII(d[first], B1(uPrime[i])), + V2AddII( + V2ScaleIII(d[last], B2(uPrime[i])), + V2ScaleIII(d[last], B3(uPrime[i])))))); + + + X[0] += V2Dot(&((A[i])[0]), &tmp); + X[1] += V2Dot(&((A[i])[1]), &tmp); + } + + /* Compute the determinants of C and X */ + det_C0_C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1]; + det_C0_X = C[0][0] * X[1] - C[0][1] * X[0]; + det_X_C1 = X[0] * C[1][1] - X[1] * C[0][1]; + + /* Finally, derive alpha values */ + if (det_C0_C1 == 0.0) { + det_C0_C1 = (C[0][0] * C[1][1]) * 10e-12; + } + alpha_l = det_X_C1 / det_C0_C1; + alpha_r = det_C0_X / det_C0_C1; + + + /* If alpha negative, use the Wu/Barsky heuristic (see text) */ + /* (if alpha is 0, you get coincident control points that lead to + * divide by zero in any subsequent NewtonRaphsonRootFind() call. */ + if (alpha_l < 1.0e-6 || alpha_r < 1.0e-6) { + double dist = V2DistanceBetween2Points(&d[last], &d[first]) / + 3.0; + + bezCurve[0] = d[first]; + bezCurve[3] = d[last]; + V2Add(&(bezCurve[0]), V2Scale(&(tHat1), dist), &(bezCurve[1])); + V2Add(&(bezCurve[3]), V2Scale(&(tHat2), dist), &(bezCurve[2])); + return (bezCurve); + } + + /* First and last control points of the Bezier curve are */ + /* positioned exactly at the first and last data points */ + /* Control points 1 and 2 are positioned an alpha distance out */ + /* on the tangent vectors, left and right, respectively */ + bezCurve[0] = d[first]; + bezCurve[3] = d[last]; + V2Add(&bezCurve[0], V2Scale(&tHat1, alpha_l), &bezCurve[1]); + V2Add(&bezCurve[3], V2Scale(&tHat2, alpha_r), &bezCurve[2]); + return (bezCurve); +} + + +/* + * Reparameterize: + * Given set of points and their parameterization, try to find + * a better parameterization. + * + */ +static double *Reparameterize(Vector2 *d, int first, int last, double *u, BezierCurve bezCurve) +// Vector2 *d; /* Array of digitized points */ +// int first, last; /* Indices defining region */ +// double *u; /* Current parameter values */ +// BezierCurve bezCurve; /* Current fitted curve */ +{ + int nPts = last-first+1; + int i; + double *uPrime; /* New parameter values */ + + uPrime = (double *)malloc(nPts * sizeof(double)); + for (i = first; i <= last; i++) { + uPrime[i-first] = NewtonRaphsonRootFind(bezCurve, d[i], u[i- + first]); + } + return (uPrime); +} + + + +/* + * NewtonRaphsonRootFind : + * Use Newton-Raphson iteration to find better root. + */ +static double NewtonRaphsonRootFind(BezierCurve Q, Vector2 P, double u) +// BezierCurve Q; /* Current fitted curve */ +// Vector2 P; /* Digitized point */ +// double u; /* Parameter value for "P" */ +{ + double numerator, denominator; + Vector2 Q1[3], Q2[2]; /* Q' and Q'' */ + Vector2 Q_u, Q1_u, Q2_u; /*u evaluated at Q, Q', & Q'' */ + double uPrime; /* Improved u */ + int i; + + /* Compute Q(u) */ + Q_u = BezierII(3, Q, u); + + /* Generate control vertices for Q' */ + for (i = 0; i <= 2; i++) { + Q1[i][0] = (Q[i+1][0] - Q[i][0]) * 3.0; + Q1[i][1] = (Q[i+1][1] - Q[i][1]) * 3.0; + } + + /* Generate control vertices for Q'' */ + for (i = 0; i <= 1; i++) { + Q2[i][0] = (Q1[i+1][0] - Q1[i][0]) * 2.0; + Q2[i][1] = (Q1[i+1][1] - Q1[i][1]) * 2.0; + } + + /* Compute Q'(u) and Q''(u) */ + Q1_u = BezierII(2, Q1, u); + Q2_u = BezierII(1, Q2, u); + + /* Compute f(u)/f'(u) */ + numerator = (Q_u[0] - P[0]) * (Q1_u[0]) + (Q_u[1] - P[1]) * (Q1_u[1]); + denominator = (Q1_u[0]) * (Q1_u[0]) + (Q1_u[1]) * (Q1_u[1]) + + (Q_u[0] - P[0]) * (Q2_u[0]) + (Q_u[1] - P[1]) * (Q2_u[1]); + + /* u = u - f(u)/f'(u) */ + if(denominator == 0) // FIXME + return u; + uPrime = u - (numerator/denominator); + return (uPrime); +} + + + +/* + * Bezier : + * Evaluate a Bezier curve at a particular parameter value + * + */ +static Vector2 BezierII(int degree, Vector2 *V, double t) +// int degree; /* The degree of the bezier curve */ +// Vector2 *V; /* Array of control points */ +// double t; /* Parametric value to find point for */ +{ + int i, j; + Vector2 Q; /* Point on curve at parameter t */ + Vector2 *Vtemp; /* Local copy of control points */ + + /* Copy array */ + Vtemp = (Vector2 *)malloc((unsigned)((degree+1) + * sizeof (Vector2))); + for (i = 0; i <= degree; i++) { + Vtemp[i] = V[i]; + } + + /* Triangle computation */ + for (i = 1; i <= degree; i++) { + for (j = 0; j <= degree-i; j++) { + Vtemp[j][0] = (1.0 - t) * Vtemp[j][0] + t * Vtemp[j+1][0]; + Vtemp[j][1] = (1.0 - t) * Vtemp[j][1] + t * Vtemp[j+1][1]; + } + } + + Q = Vtemp[0]; + free((void *)Vtemp); + return Q; +} + + +/* + * B0, B1, B2, B3 : + * Bezier multipliers + */ +static double B0(double u) +{ + double tmp = 1.0 - u; + return (tmp * tmp * tmp); +} + + +static double B1(double u) +{ + double tmp = 1.0 - u; + return (3 * u * (tmp * tmp)); +} + +static double B2(double u) +{ + double tmp = 1.0 - u; + return (3 * u * u * tmp); +} + +static double B3(double u) +{ + return (u * u * u); +} + + + +/* + * ComputeLeftTangent, ComputeRightTangent, ComputeCenterTangent : + *Approximate unit tangents at endpoints and "center" of digitized curve + */ +static Vector2 ComputeLeftTangent(Vector2 *d, int end) +// Vector2 *d; /* Digitized points*/ +// int end; /* Index to "left" end of region */ +{ + Vector2 tHat1; + tHat1 = V2SubII(d[end+1], d[end]); + tHat1 = *V2Normalize(&tHat1); + return tHat1; +} + +static Vector2 ComputeRightTangent(Vector2 *d, int end) +// Vector2 *d; /* Digitized points */ +// int end; /* Index to "right" end of region */ +{ + Vector2 tHat2; + tHat2 = V2SubII(d[end-1], d[end]); + tHat2 = *V2Normalize(&tHat2); + return tHat2; +} + +static Vector2 ComputeCenterTangent(Vector2 *d, int center) +// Vector2 *d; /* Digitized points */ +// int center; /* Index to point inside region */ +{ + Vector2 V1, V2, tHatCenter; + + V1 = V2SubII(d[center-1], d[center]); + V2 = V2SubII(d[center], d[center+1]); + tHatCenter[0] = (V1[0] + V2[0])/2.0; + tHatCenter[1] = (V1[1] + V2[1])/2.0; + tHatCenter = *V2Normalize(&tHatCenter); + return tHatCenter; +} + + +/* + * ChordLengthParameterize : + * Assign parameter values to digitized points + * using relative distances between points. + */ +static double *ChordLengthParameterize(Vector2 *d, int first, int last) +// Vector2 *d; /* Array of digitized points */ +// int first, last; /* Indices defining region */ +{ + int i; + double *u; /* Parameterization */ + + u = (double *)malloc((unsigned)(last-first+1) * sizeof(double)); + + u[0] = 0.0; + for (i = first+1; i <= last; i++) { + u[i-first] = u[i-first-1] + + V2DistanceBetween2Points(&d[i], &d[i-1]); + } + + for (i = first + 1; i <= last; i++) { + u[i-first] = u[i-first] / u[last-first]; + } + + return(u); +} + + + + +/* + * ComputeMaxError : + * Find the maximum squared distance of digitized points + * to fitted curve. +*/ +static double ComputeMaxError(Vector2 *d, int first, int last, BezierCurve bezCurve, double *u, int *splitPoint) +// Vector2 *d; /* Array of digitized points */ +// int first, last; /* Indices defining region */ +// BezierCurve bezCurve; /* Fitted Bezier curve */ +// double *u; /* Parameterization of points */ +// int *splitPoint; /* Point of maximum error */ +{ + int i; + double maxDist; /* Maximum error */ + double dist; /* Current error */ + Vector2 P; /* Point on curve */ + Vector2 v; /* Vector from point to curve */ + + *splitPoint = (last - first + 1)/2; + maxDist = 0.0; + for (i = first + 1; i < last; i++) { + P = BezierII(3, bezCurve, u[i-first]); + v = V2SubII(P, d[i]); + dist = V2SquaredLength(&v); + if (dist >= maxDist) { + maxDist = dist; + *splitPoint = i; + } + } + return (maxDist); +} +static Vector2 V2AddII(Vector2 a, Vector2 b) +{ + Vector2 c; + c[0] = a[0] + b[0]; c[1] = a[1] + b[1]; + return (c); +} +static Vector2 V2ScaleIII(Vector2 v, double s) +{ + Vector2 result; + result[0] = v[0] * s; result[1] = v[1] * s; + return (result); +} + +static Vector2 V2SubII(Vector2 a, Vector2 b) +{ + Vector2 c; + c[0] = a[0] - b[0]; c[1] = a[1] - b[1]; + return (c); +} + +#ifdef __cplusplus +} +#endif + + +//------------------------- WRAPPER -----------------------------// + +FitCurveWrapper::FitCurveWrapper() +{ +} + +FitCurveWrapper::~FitCurveWrapper() +{ + _vertices.clear(); +} + +void FitCurveWrapper::DrawBezierCurve(int n, Vector2 *curve ) +{ + for(int i=0; i& data, vector& oCurve, double error) +{ + int size = data.size(); + Vector2 *d = new Vector2[size]; + for(int i=0; i::iterator v=_vertices.begin(), vend=_vertices.end(); + v!=vend; + ++v) + { + oCurve.push_back(Vec2d(v->x(), v->y())) ; + } + +} + +void FitCurveWrapper::FitCurve(Vector2 *d, int nPts, double error) +{ + Vector2 tHat1, tHat2; /* Unit tangent vectors at endpoints */ + + tHat1 = ComputeLeftTangent(d, 0); + tHat2 = ComputeRightTangent(d, nPts - 1); + FitCubic(d, 0, nPts - 1, tHat1, tHat2, error); +} + +void FitCurveWrapper::FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, Vector2 tHat2, double error) +{ + BezierCurve bezCurve; /*Control points of fitted Bezier curve*/ + double *u; /* Parameter values for point */ + double *uPrime; /* Improved parameter values */ + double maxError; /* Maximum fitting error */ + int splitPoint; /* Point to split point set at */ + int nPts; /* Number of points in subset */ + double iterationError; /*Error below which you try iterating */ + int maxIterations = 4; /* Max times to try iterating */ + Vector2 tHatCenter; /* Unit tangent vector at splitPoint */ + int i; + + iterationError = error * error; + nPts = last - first + 1; + + /* Use heuristic if region only has two points in it */ + if (nPts == 2) { + double dist = V2DistanceBetween2Points(&d[last], &d[first]) / 3.0; + + bezCurve = (Vector2 *)malloc(4 * sizeof(Vector2)); + bezCurve[0] = d[first]; + bezCurve[3] = d[last]; + V2Add(&bezCurve[0], V2Scale(&tHat1, dist), &bezCurve[1]); + V2Add(&bezCurve[3], V2Scale(&tHat2, dist), &bezCurve[2]); + DrawBezierCurve(3, bezCurve); + free((void *)bezCurve); + return; + } + + /* Parameterize points, and attempt to fit curve */ + u = ChordLengthParameterize(d, first, last); + bezCurve = GenerateBezier(d, first, last, u, tHat1, tHat2); + + /* Find max deviation of points to fitted curve */ + maxError = ComputeMaxError(d, first, last, bezCurve, u, &splitPoint); + if (maxError < error) { + DrawBezierCurve(3, bezCurve); + free((void *)u); + free((void *)bezCurve); + return; + } + + + /* If error not too large, try some reparameterization */ + /* and iteration */ + if (maxError < iterationError) { + for (i = 0; i < maxIterations; i++) { + uPrime = Reparameterize(d, first, last, u, bezCurve); + bezCurve = GenerateBezier(d, first, last, uPrime, tHat1, tHat2); + maxError = ComputeMaxError(d, first, last, + bezCurve, uPrime, &splitPoint); + if (maxError < error) { + DrawBezierCurve(3, bezCurve); + free((void *)u); + free((void *)bezCurve); + return; + } + free((void *)u); + u = uPrime; + } + } + + /* Fitting failed -- split at max error point and fit recursively */ + free((void *)u); + free((void *)bezCurve); + tHatCenter = ComputeCenterTangent(d, splitPoint); + FitCubic(d, first, splitPoint, tHat1, tHatCenter, error); + V2Negate(&tHatCenter); + FitCubic(d, splitPoint, last, tHatCenter, tHat2, error); + +} + diff --git a/extern/freestyle/src/geometry/FitCurve.h b/extern/freestyle/src/geometry/FitCurve.h new file mode 100755 index 00000000000..ed7cbe34780 --- /dev/null +++ b/extern/freestyle/src/geometry/FitCurve.h @@ -0,0 +1,101 @@ +// +// Filename : FitCurve.h +// Author(s) : Stephane Grabli +// Purpose : An Algorithm for Automatically Fitting Digitized Curves +// by Philip J. Schneider +// from "Graphics Gems", Academic Press, 1990 +// Date of creation : 06/06/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef FITCURVE_H +# define FITCURVE_H + +#include +#include "../system/FreestyleConfig.h" +#include "Geom.h" + +using namespace Geometry; + +typedef struct Point2Struct { /* 2d point */ + double coordinates[2]; + Point2Struct() {coordinates[0]=0;coordinates[1]=0;} + inline double operator[](const int i) const + { + return coordinates[i]; + } + inline double& operator[](const int i) + { + return coordinates[i]; + } + inline double x() const {return coordinates[0];} + inline double y() const {return coordinates[1];} + } Point2; + +typedef Point2 Vector2; + + + +class LIB_GEOMETRY_EXPORT FitCurveWrapper +{ +private: + std::vector _vertices; + +public: + FitCurveWrapper(); + ~FitCurveWrapper(); + + /*! Fits a set of 2D data points to a set of Bezier Curve segments + * data + * Input data points + * oCurve + * Control points of the sets of bezier curve segments. + * Each segment is made of 4 points (polynomial degree of curve = 3) + * error + * max error tolerance between resulting curve and input data + */ + void FitCurve(std::vector& data, std::vector& oCurve, double error); +protected: + /* Vec2d *d; Array of digitized points */ + /* int nPts; Number of digitized points */ + /* double error; User-defined error squared */ + void FitCurve(Vector2 *d, int nPts, double error); + + /*! Draws a Bezier curve segment + * n + * degree of curve (=3) + * curve + * bezier segments control points + */ + void DrawBezierCurve(int n, Vector2 *curve); + + /* Vec2d *d; Array of digitized points */ + /* int first, last; Indices of first and last pts in region */ + /* Vec2d tHat1, tHat2; Unit tangent vectors at endpoints */ + /* double error; User-defined error squared */ + void FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, Vector2 tHat2, double error); + +}; + +#endif // FITCURVE_H diff --git a/extern/freestyle/src/geometry/Geom.h b/extern/freestyle/src/geometry/Geom.h new file mode 100755 index 00000000000..ac94213fe98 --- /dev/null +++ b/extern/freestyle/src/geometry/Geom.h @@ -0,0 +1,78 @@ +// +// Filename : Geom.h +// Author(s) : Sylvain Paris +// Emmanuel Turquin +// Stephane Grabli +// Purpose : Vectors and Matrices (useful type definitions) +// Date of creation : 20/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GEOM_H +# define GEOM_H + +# include "VecMat.h" +# include "../system/Precision.h" + +namespace Geometry { + + typedef VecMat::Vec2 Vec2u; + typedef VecMat::Vec2 Vec2i; + typedef VecMat::Vec2 Vec2f; + typedef VecMat::Vec2 Vec2d; + typedef VecMat::Vec2 Vec2r; + + typedef VecMat::Vec3 Vec3u; + typedef VecMat::Vec3 Vec3i; + typedef VecMat::Vec3 Vec3f; + typedef VecMat::Vec3 Vec3d; + typedef VecMat::Vec3 Vec3r; + + typedef VecMat::HVec3 HVec3u; + typedef VecMat::HVec3 HVec3i; + typedef VecMat::HVec3 HVec3f; + typedef VecMat::HVec3 HVec3d; + typedef VecMat::HVec3 HVec3r; + + typedef VecMat::SquareMatrix Matrix22u; + typedef VecMat::SquareMatrix Matrix22i; + typedef VecMat::SquareMatrix Matrix22f; + typedef VecMat::SquareMatrix Matrix22d; + typedef VecMat::SquareMatrix Matrix22r; + + typedef VecMat::SquareMatrix Matrix33u; + typedef VecMat::SquareMatrix Matrix33i; + typedef VecMat::SquareMatrix Matrix33f; + typedef VecMat::SquareMatrix Matrix33d; + typedef VecMat::SquareMatrix Matrix33r; + + typedef VecMat::SquareMatrix Matrix44u; + typedef VecMat::SquareMatrix Matrix44i; + typedef VecMat::SquareMatrix Matrix44f; + typedef VecMat::SquareMatrix Matrix44d; + typedef VecMat::SquareMatrix Matrix44r; + +} // end of namespace Geometry + +#endif // GEOM_H diff --git a/extern/freestyle/src/geometry/GeomCleaner.cpp b/extern/freestyle/src/geometry/GeomCleaner.cpp new file mode 100755 index 00000000000..c148c521a46 --- /dev/null +++ b/extern/freestyle/src/geometry/GeomCleaner.cpp @@ -0,0 +1,240 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +//#if defined(__GNUC__) && (__GNUC__ >= 3) +//// hash_map is not part of the C++ standard anymore; +//// hash_map.h has been kept though for backward compatibility +//# include +//#else +//# include +//#endif + +#include +#include +#include +#include "../system/TimeUtils.h" +#include "GeomCleaner.h" + +using namespace std; + + +void GeomCleaner::SortIndexedVertexArray( const float *iVertices, unsigned iVSize, + const unsigned *iIndices, unsigned iISize, + real **oVertices, + unsigned **oIndices) +{ + // First, we build a list of IndexVertex: + list indexedVertices; + unsigned i; + for(i=0; i::iterator iv; + unsigned newIndex = 0; + unsigned vIndex = 0; + for(iv=indexedVertices.begin(); iv!=indexedVertices.end(); iv++) + { + // Build the final results: + (*oVertices)[vIndex] = iv->x(); + (*oVertices)[vIndex+1] = iv->y(); + (*oVertices)[vIndex+2] = iv->z(); + + mapIndices[iv->index()] = newIndex; + newIndex++; + vIndex+=3; + } + + + // Build the final index array: + *oIndices = new unsigned[iISize]; + for(i=0; i vertices; + unsigned i; + for(i=0; i::iterator v = vertices.begin(); + + vector compressedVertices; + Vec3r previous = *v; + mapVertex[0] = 0; + compressedVertices.push_back(vertices.front()); + + v++; + Vec3r current; + i=1; + for(; v!=vertices.end(); v++) + { + current = *v; + if(current == previous) + mapVertex[i] = compressedVertices.size()-1; + else + { + compressedVertices.push_back(current); + mapVertex[i] = compressedVertices.size()-1; + } + previous = current; + i++; + } + + // Builds the resulting vertex array: + *oVSize = 3*compressedVertices.size(); + *oVertices = new real [*oVSize]; + i=0; + for(v=compressedVertices.begin(); v!=compressedVertices.end(); v++) + { + (*oVertices)[i] = (*v)[0]; + (*oVertices)[i+1] = (*v)[1]; + (*oVertices)[i+2] = (*v)[2]; + i += 3; + } + + // Map the index array: + *oIndices = new unsigned[iISize]; + for(i=0; i cleanHashTable; + vector vertices; + unsigned i; + for(i=0; i newIndices; + vector newVertices; + + // elimination of needless points + unsigned currentIndex = 0; + vector::const_iterator v = vertices.begin(); + vector::const_iterator end = vertices.end(); + cleanHashTable::const_iterator found; + for(; v!=end; v++) + { + found = ht.find(*v); + if(found != ht.end()) + { + // The vertex is already in the new array. + newIndices.push_back((*found).second); + } + else + { + newVertices.push_back(*v); + newIndices.push_back(currentIndex); + ht[*v] = currentIndex; + currentIndex++; + } + } + + // creation of oVertices array: + *oVSize = 3*newVertices.size(); + *oVertices = new real[*oVSize]; + currentIndex = 0; + end = newVertices.end(); + for(v=newVertices.begin(); v!=end ; v++) + { + (*oVertices)[currentIndex++] = (*v)[0]; + (*oVertices)[currentIndex++] = (*v)[1]; + (*oVertices)[currentIndex++] = (*v)[2]; + } + + // map new indices: + *oIndices = new unsigned[iISize]; + for(i=0; i A[0])&&(A[0] > min[0]))&&((max[0] > B[0])&&(B[0] > min[0]))) + && (((max[1] > A[1])&&(A[1] > min[1]))&&((max[1] > B[1])&&(B[1] > min[1])))) + return true; + return false; + } + + intersection_test intersect2dSeg2dSeg(const Vec2r& p1, + const Vec2r& p2, + const Vec2r& p3, + const Vec2r& p4, + Vec2r& res) { + real a1, a2, b1, b2, c1, c2; // Coefficients of line eqns + real r1, r2, r3, r4; // 'Sign' values + real denom, num; // Intermediate values + + // Compute a1, b1, c1, where line joining points p1 and p2 + // is "a1 x + b1 y + c1 = 0". + a1 = p2[1] - p1[1]; + b1 = p1[0] - p2[0]; + c1 = p2[0] * p1[1] - p1[0] * p2[1]; + + // Compute r3 and r4. + r3 = a1 * p3[0] + b1 * p3[1] + c1; + r4 = a1 * p4[0] + b1 * p4[1] + c1; + + // Check signs of r3 and r4. If both point 3 and point 4 lie on + // same side of line 1, the line segments do not intersect. + if ( r3 != 0 && r4 != 0 && r3 * r4 > 0.0) + return (DONT_INTERSECT); + + // Compute a2, b2, c2 + a2 = p4[1] - p3[1]; + b2 = p3[0] - p4[0]; + c2 = p4[0] * p3[1] - p3[0] * p4[1]; + + // Compute r1 and r2 + r1 = a2 * p1[0] + b2 * p1[1] + c2; + r2 = a2 * p2[0] + b2 * p2[1] + c2; + + // Check signs of r1 and r2. If both point 1 and point 2 lie + // on same side of second line segment, the line segments do + // not intersect. + if ( r1 != 0 && r2 != 0 && r1 * r2 > 0.0) + return (DONT_INTERSECT); + + // Line segments intersect: compute intersection point. + denom = a1 * b2 - a2 * b1; + if (fabs(denom) < M_EPSILON) + return (COLINEAR); + + num = b1 * c2 - b2 * c1; + res[0] = num / denom; + + num = a2 * c1 - a1 * c2; + res[1] = num / denom; + + return (DO_INTERSECT); + } + + intersection_test intersect2dLine2dLine(const Vec2r& p1, + const Vec2r& p2, + const Vec2r& p3, + const Vec2r& p4, + Vec2r& res) { + real a1, a2, b1, b2, c1, c2; // Coefficients of line eqns + real denom, num; // Intermediate values + + // Compute a1, b1, c1, where line joining points p1 and p2 + // is "a1 x + b1 y + c1 = 0". + a1 = p2[1] - p1[1]; + b1 = p1[0] - p2[0]; + c1 = p2[0] * p1[1] - p1[0] * p2[1]; + + // Compute a2, b2, c2 + a2 = p4[1] - p3[1]; + b2 = p3[0] - p4[0]; + c2 = p4[0] * p3[1] - p3[0] * p4[1]; + + // Line segments intersect: compute intersection point. + denom = a1 * b2 - a2 * b1; + if (fabs(denom) < M_EPSILON) + return (COLINEAR); + + num = b1 * c2 - b2 * c1; + res[0] = num / denom; + + num = a2 * c1 - a1 * c2; + res[1] = num / denom; + + return (DO_INTERSECT); + } + + intersection_test intersect2dSeg2dSegParametric(const Vec2r& p1, + const Vec2r& p2, + const Vec2r& p3, + const Vec2r& p4, + real& t, + real& u) { + real a1, a2, b1, b2, c1, c2; // Coefficients of line eqns + real r1, r2, r3, r4; // 'Sign' values + real denom, num; // Intermediate values + + // Compute a1, b1, c1, where line joining points p1 and p2 + // is "a1 x + b1 y + c1 = 0". + a1 = p2[1] - p1[1]; + b1 = p1[0] - p2[0]; + c1 = p2[0] * p1[1] - p1[0] * p2[1]; + + // Compute r3 and r4. + r3 = a1 * p3[0] + b1 * p3[1] + c1; + r4 = a1 * p4[0] + b1 * p4[1] + c1; + + // Check signs of r3 and r4. If both point 3 and point 4 lie on + // same side of line 1, the line segments do not intersect. + if ( r3 != 0 && r4 != 0 && r3 * r4 > 0.0) + return (DONT_INTERSECT); + + // Compute a2, b2, c2 + a2 = p4[1] - p3[1]; + b2 = p3[0] - p4[0]; + c2 = p4[0] * p3[1] - p3[0] * p4[1]; + + // Compute r1 and r2 + r1 = a2 * p1[0] + b2 * p1[1] + c2; + r2 = a2 * p2[0] + b2 * p2[1] + c2; + + // Check signs of r1 and r2. If both point 1 and point 2 lie + // on same side of second line segment, the line segments do + // not intersect. + if ( r1 != 0 && r2 != 0 && r1 * r2 > 0.0) + return (DONT_INTERSECT); + + // Line segments intersect: compute intersection point. + denom = a1 * b2 - a2 * b1; + if (fabs(denom) < M_EPSILON) + return (COLINEAR); + + real d1, d2, e1; + + d1 = p1[1] - p3[1]; + d2 = p2[1] - p1[1]; + e1 = p1[0] - p3[0]; + + num = -b2 * d1 - a2 * e1; + t = num / denom; + + num = -b1 * d1 - a1 * e1; + u = num / denom; + + return (DO_INTERSECT); + } + + // AABB-triangle overlap test code + // by Tomas Akenine-Möller + // Function: int triBoxOverlap(real boxcenter[3], + // real boxhalfsize[3],real triverts[3][3]); + // History: + // 2001-03-05: released the code in its first version + // 2001-06-18: changed the order of the tests, faster + // + // Acknowledgement: Many thanks to Pierre Terdiman for + // suggestions and discussions on how to optimize code. + // Thanks to David Hunt for finding a ">="-bug! + +#define X 0 +#define Y 1 +#define Z 2 + +#define FINDMINMAX(x0, x1, x2, min, max) \ + min = max = x0; \ + if(x1max) max=x1; \ + if(x2max) max=x2; + + //======================== X-tests ========================// +#define AXISTEST_X01(a, b, fa, fb) \ + p0 = a*v0[Y] - b*v0[Z]; \ + p2 = a*v2[Y] - b*v2[Z]; \ + if(p0rad || max<-rad) return 0; + +#define AXISTEST_X2(a, b, fa, fb) \ + p0 = a*v0[Y] - b*v0[Z]; \ + p1 = a*v1[Y] - b*v1[Z]; \ + if(p0rad || max<-rad) return 0; + + //======================== Y-tests ========================// +#define AXISTEST_Y02(a, b, fa, fb) \ + p0 = -a*v0[X] + b*v0[Z]; \ + p2 = -a*v2[X] + b*v2[Z]; \ + if(p0rad || max<-rad) return 0; + +#define AXISTEST_Y1(a, b, fa, fb) \ + p0 = -a*v0[X] + b*v0[Z]; \ + p1 = -a*v1[X] + b*v1[Z]; \ + if(p0rad || max<-rad) return 0; + + //======================== Z-tests ========================// +#define AXISTEST_Z12(a, b, fa, fb) \ + p1 = a*v1[X] - b*v1[Y]; \ + p2 = a*v2[X] - b*v2[Y]; \ + if(p2rad || max<-rad) return 0; + +#define AXISTEST_Z0(a, b, fa, fb) \ + p0 = a*v0[X] - b*v0[Y]; \ + p1 = a*v1[X] - b*v1[Y]; \ + if(p0rad || max<-rad) return 0; + + // This internal procedure is defined below. + bool overlapPlaneBox(Vec3r& normal, real d, Vec3r& maxbox); + + // Use separating axis theorem to test overlap between triangle and box + // need to test for overlap in these directions: + // 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle + // we do not even need to test these) + // 2) normal of the triangle + // 3) crossproduct(edge from tri, {x,y,z}-directin) + // this gives 3x3=9 more tests + bool overlapTriangleBox(Vec3r& boxcenter, + Vec3r& boxhalfsize, + Vec3r triverts[3]) { + Vec3r v0, v1, v2, normal, e0, e1, e2; + real min, max, d, p0, p1, p2, rad, fex, fey, fez; + + // This is the fastest branch on Sun + // move everything so that the boxcenter is in (0, 0, 0) + v0 = triverts[0] - boxcenter; + v1 = triverts[1] - boxcenter; + v2 = triverts[2] - boxcenter; + + // compute triangle edges + e0 = v1 - v0; + e1 = v2 - v1; + e2 = v0 - v2; + + // Bullet 3: + // Do the 9 tests first (this was faster) + fex = fabs(e0[X]); + fey = fabs(e0[Y]); + fez = fabs(e0[Z]); + AXISTEST_X01(e0[Z], e0[Y], fez, fey); + AXISTEST_Y02(e0[Z], e0[X], fez, fex); + AXISTEST_Z12(e0[Y], e0[X], fey, fex); + + fex = fabs(e1[X]); + fey = fabs(e1[Y]); + fez = fabs(e1[Z]); + AXISTEST_X01(e1[Z], e1[Y], fez, fey); + AXISTEST_Y02(e1[Z], e1[X], fez, fex); + AXISTEST_Z0(e1[Y], e1[X], fey, fex); + + fex = fabs(e2[X]); + fey = fabs(e2[Y]); + fez = fabs(e2[Z]); + AXISTEST_X2(e2[Z], e2[Y], fez, fey); + AXISTEST_Y1(e2[Z], e2[X], fez, fex); + AXISTEST_Z12(e2[Y], e2[X], fey, fex); + + // Bullet 1: + // first test overlap in the {x,y,z}-directions + // find min, max of the triangle each direction, and test for overlap in + // that direction -- this is equivalent to testing a minimal AABB around + // the triangle against the AABB + + // test in X-direction + FINDMINMAX(v0[X], v1[X], v2[X], min, max); + if (min > boxhalfsize[X] || max < -boxhalfsize[X]) + return false; + + // test in Y-direction + FINDMINMAX(v0[Y], v1[Y], v2[Y], min, max); + if (min > boxhalfsize[Y] || max < -boxhalfsize[Y]) + return false; + + // test in Z-direction + FINDMINMAX(v0[Z], v1[Z], v2[Z], min, max); + if(min > boxhalfsize[Z] || max < -boxhalfsize[Z]) + return false; + + // Bullet 2: + // test if the box intersects the plane of the triangle + // compute plane equation of triangle: normal * x + d = 0 + normal = e0 ^ e1; + d = -(normal * v0); // plane eq: normal.x + d = 0 + if (!overlapPlaneBox(normal, d, boxhalfsize)) + return false; + + return true; // box and triangle overlaps + } + + // Fast, Minimum Storage Ray-Triangle Intersection + // + // Tomas Möller + // Prosolvia Clarus AB + // Sweden + // tompa@clarus.se + // + // Ben Trumbore + // Cornell University + // Ithaca, New York + // wbt@graphics.cornell.edu + + bool intersectRayTriangle(Vec3r& orig, Vec3r& dir, + Vec3r& v0, Vec3r& v1, Vec3r& v2, + real& t, real& u, real& v, real epsilon) { + Vec3r edge1, edge2, tvec, pvec, qvec; + real det, inv_det; + + // find vectors for two edges sharing v0 + edge1 = v1 - v0; + edge2 = v2 - v0; + + // begin calculating determinant - also used to calculate U parameter + pvec = dir ^ edge2; + + // if determinant is near zero, ray lies in plane of triangle + det = edge1 * pvec; + + // calculate distance from v0 to ray origin + tvec = orig - v0; + inv_det = 1.0 / det; + + qvec = tvec ^ edge1; + + if (det > epsilon) { + u = tvec * pvec; + if (u < 0.0 || u > det) + return false; + + // calculate V parameter and test bounds + v = dir * qvec; + if (v < 0.0 || u + v > det) + return false; + } + else if(det < -epsilon) { + // calculate U parameter and test bounds + u = tvec * pvec; + if (u > 0.0 || u < det) + return false; + + // calculate V parameter and test bounds + v = dir * qvec; + if (v > 0.0 || u + v < det) + return false; + } + else + return false; // ray is parallell to the plane of the triangle + + u *= inv_det; + v *= inv_det; + t = (edge2 * qvec) * inv_det; + + return true; + } + + // Intersection between plane and ray, adapted from Graphics Gems, Didier Badouel + intersection_test intersectRayPlane(Vec3r& orig, Vec3r& dir, + Vec3r& norm, real d, + real& t, + real epsilon) { + real denom = norm * dir; + + if(fabs(denom) <= epsilon) { // plane and ray are parallel + if(fabs((norm * orig) + d) <= epsilon) + return COINCIDENT; // plane and ray are coincident + else + return COLINEAR; + } + + t = -(d + (norm * orig)) / denom; + + if (t < 0.0f) + return DONT_INTERSECT; + + return DO_INTERSECT; + } + + bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin and direction + const Vec3r& boxMin, const Vec3r& boxMax, // the bbox + real t0, real t1, + real& tmin, real& tmax, // I0=orig+tmin*dir is the first intersection, I1=orig+tmax*dir is the second intersection + real epsilon){ + + float tymin, tymax, tzmin, tzmax; + Vec3r inv_direction(1.0/dir[0], 1.0/dir[1], 1.0/dir[2]); + int sign[3]; + sign[0] = (inv_direction.x() < 0); + sign[1] = (inv_direction.y() < 0); + sign[2] = (inv_direction.z() < 0); + + Vec3r bounds[2]; + bounds[0] = boxMin; + bounds[1] = boxMax; + + tmin = (bounds[sign[0]].x() - orig.x()) * inv_direction.x(); + tmax = (bounds[1-sign[0]].x() - orig.x()) * inv_direction.x(); + tymin = (bounds[sign[1]].y() - orig.y()) * inv_direction.y(); + tymax = (bounds[1-sign[1]].y() - orig.y()) * inv_direction.y(); + if ( (tmin > tymax) || (tymin > tmax) ) + return false; + if (tymin > tmin) + tmin = tymin; + if (tymax < tmax) + tmax = tymax; + tzmin = (bounds[sign[2]].z() - orig.z()) * inv_direction.z(); + tzmax = (bounds[1-sign[2]].z() - orig.z()) * inv_direction.z(); + if ( (tmin > tzmax) || (tzmin > tmax) ) + return false; + if (tzmin > tmin) + tmin = tzmin; + if (tzmax < tmax) + tmax = tzmax; + return ( (tmin < t1) && (tmax > t0) ); + } + + // Checks whether 3D points p lies inside or outside of the triangle ABC + bool includePointTriangle(Vec3r& P, + Vec3r& A, + Vec3r& B, + Vec3r& C) { + Vec3r AB(B - A); + Vec3r BC(C - B); + Vec3r CA(A - C); + Vec3r AP(P - A); + Vec3r BP(P - B); + Vec3r CP(P - C); + + Vec3r N(AB ^ BC); // triangle's normal + + N.normalize(); + + Vec3r J(AB ^ AP), K(BC ^ BP), L(CA ^ CP); + J.normalize(); + K.normalize(); + L.normalize(); + + if(J * N < 0) + return false; // on the right of AB + + if(K * N < 0) + return false; // on the right of BC + + if(L * N < 0) + return false; // on the right of CA + + return true; + } + + void transformVertex(const Vec3r& vert, + const Matrix44r& matrix, + Vec3r& res) { + HVec3r hvert(vert), res_tmp; + real scale; + for (unsigned j = 0; j < 4; j++) { + scale = hvert[j]; + for (unsigned i = 0; i < 4; i++) + res_tmp[i] += matrix(i, j) * scale; + } + + res[0] = res_tmp.x(); + res[1] = res_tmp.y(); + res[2] = res_tmp.z(); + } + + void transformVertices(const vector& vertices, + const Matrix44r& trans, + vector& res) { + for (vector::const_iterator v = vertices.begin(); + v != vertices.end(); + v++) { + Vec3r *res_tmp = new Vec3r; + transformVertex(*v, trans, *res_tmp); + res.push_back(*res_tmp); + } + } + + Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v) { + Vec3r res; + for (unsigned i = 0; i < 3; i++) { + res[i] = 0; + for (unsigned j = 0; j < 3; j++) + res[i] += mat(i, j) * v[j]; + } + res.normalize(); + return res; + } + + // This internal procedure is defined below. + void fromCoordAToCoordB(const Vec3r& p, + Vec3r& q, + const real transform[4][4]); + + void fromWorldToCamera(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4]) { + fromCoordAToCoordB(p, q, model_view_matrix); + } + + void fromCameraToRetina(const Vec3r& p, + Vec3r& q, + const real projection_matrix[4][4]) { + fromCoordAToCoordB(p, q, projection_matrix); + } + + void fromRetinaToImage(const Vec3r& p, + Vec3r& q, + const int viewport[4]) { + // winX: + q[0] = viewport[0] + viewport[2] * (p[0] + 1.0) / 2.0; + + // winY: + q[1] = viewport[1] + viewport[3] * (p[1] + 1.0) / 2.0; + + // winZ: + q[2] = (p[2] + 1.0) / 2.0; + } + + void fromWorldToImage(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4], + const real projection_matrix[4][4], + const int viewport[4]) { + Vec3r p1, p2; + fromWorldToCamera(p, p1, model_view_matrix); + fromCameraToRetina(p1, p2, projection_matrix); + fromRetinaToImage(p2, q, viewport); + q[2] = p1[2]; + } + + void fromWorldToImage(const Vec3r& p, + Vec3r& q, + const real transform[4][4], + const int viewport[4]) { + fromCoordAToCoordB(p, q, transform); + + // winX: + q[0] = viewport[0] + viewport[2] * (q[0] + 1.0) / 2.0; + + //winY: + q[1] = viewport[1] + viewport[3] * (q[1] + 1.0) / 2.0; + } + + void fromImageToRetina(const Vec3r& p, + Vec3r& q, + const int viewport[4]) { + q = p; + q[0] = 2.0 * (q[0] - viewport[0]) / viewport[2] - 1; + q[1] = 2.0 * (q[1] - viewport[1]) / viewport[3] - 1; + } + + void fromRetinaToCamera(const Vec3r& p, + Vec3r& q, + real z, + const real projection_matrix[4][4]) { + q[0] = (-p[0] * z) / projection_matrix[0][0]; + q[1] = (-p[1] * z) / projection_matrix[1][1]; + q[2] = z; + } + + void fromCameraToWorld(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4]) { + + real translation[3] = { model_view_matrix[0][3], + model_view_matrix[1][3], + model_view_matrix[2][3] }; + for (unsigned i = 0; i < 3; i++) { + q[i] = 0.0; + for (unsigned short j = 0; j < 3; j++) + q[i] += model_view_matrix[j][i] * (p[j] - translation[j]); + } + } + + + // + // Internal code + // + ///////////////////////////////////////////////////////////////////////////// + + // Copyright 2001, softSurfer (www.softsurfer.com) + // This code may be freely used and modified for any purpose + // providing that this copyright notice is included with it. + // SoftSurfer makes no warranty for this code, and cannot be held + // liable for any real or imagined damage resulting from its use. + // Users of this code must verify correctness for their application. + +#define perp(u,v) ((u)[0] * (v)[1] - (u)[1] * (v)[0]) // 2D perp product + + inline bool intersect2dSegPoly(Vec2r* seg, + Vec2r* poly, + unsigned n) { + if (seg[0] == seg[1]) + return false; + + real tE = 0; // the maximum entering segment parameter + real tL = 1; // the minimum leaving segment parameter + real t, N, D; // intersect parameter t = N / D + Vec2r dseg; // the segment direction vector + dseg = seg[1] - seg[0]; + Vec2r e; // edge vector + + for (unsigned i = 0; i < n; i++) { // process polygon edge poly[i]poly[i+1] + e = poly[i+1] - poly[i]; + N = perp(e, seg[0] - poly[i]); + D = -perp(e, dseg); + if (fabs(D) < M_EPSILON) { + if (N < 0) + return false; + else + continue; + } + + t = N / D; + if (D < 0) { // segment seg is entering across this edge + if (t > tE) { // new max tE + tE = t; + if (tE > tL) // seg enters after leaving polygon + return false; + } + } + else { // segment seg is leaving across this edge + if (t < tL) { // new min tL + tL = t; + if (tL < tE) // seg leaves before entering polygon + return false; + } + } + } + + // tE <= tL implies that there is a valid intersection subsegment + return true; + } + + inline bool overlapPlaneBox(Vec3r& normal, real d, Vec3r& maxbox) { + Vec3r vmin, vmax; + + for(unsigned q = X; q <= Z; q++) { + if(normal[q] > 0.0f) { + vmin[q] = -maxbox[q]; + vmax[q] = maxbox[q]; + } + else { + vmin[q] = maxbox[q]; + vmax[q] = -maxbox[q]; + } + } + if((normal * vmin) + d > 0.0f) + return false; + if((normal * vmax) + d >= 0.0f) + return true; + return false; + } + + inline void fromCoordAToCoordB(const Vec3r&p, + Vec3r& q, + const real transform[4][4]) { + HVec3r hp(p); + HVec3r hq(0, 0, 0, 0); + + for (unsigned i = 0; i < 4; i++) + for (unsigned j = 0; j < 4; j++) + hq[i] += transform[i][j] * hp[j]; + + if(hq[3] == 0) { + q = p; + return; + } + + for (unsigned k = 0; k < 3; k++) + q[k] = hq[k] / hq[3]; + } + +} // end of namespace GeomUtils diff --git a/extern/freestyle/src/geometry/GeomUtils.h b/extern/freestyle/src/geometry/GeomUtils.h new file mode 100755 index 00000000000..53c94c22f8b --- /dev/null +++ b/extern/freestyle/src/geometry/GeomUtils.h @@ -0,0 +1,309 @@ +// +// Filename : GeomUtils.h +// Author(s) : Stephane Grabli +// Purpose : Various tools for geometry +// Date of creation : 12/04/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GEOMUTILS_H +# define GEOMUTILS_H + +# include +# include "../system/FreestyleConfig.h" +# include "Geom.h" + +using namespace std; +using namespace Geometry; + +namespace GeomUtils { + + // + // Templated procedures + // + ///////////////////////////////////////////////////////////////////////////// + + /*! Computes the distance from a point P to a segment AB */ + template + real distPointSegment( const T& P, const T& A , const T& B) { + T AB, AP, BP; + AB = B - A; + AP = P - A; + BP = P - B; + + real c1(AB * AP); + if (c1 <= 0) + return AP.norm(); + + real c2(AB * AB); + if (c2 <= c1) + return BP.norm(); + + real b = c1 / c2; + T Pb, PPb; + Pb = A + b * AB; + PPb = P - Pb; + + return PPb.norm(); + } + + // + // Non-templated procedures + // + ///////////////////////////////////////////////////////////////////////////// + + typedef enum { + DONT_INTERSECT, + DO_INTERSECT, + COLINEAR, + COINCIDENT + } intersection_test; + + LIB_GEOMETRY_EXPORT + intersection_test intersect2dSeg2dSeg(const Vec2r& p1, const Vec2r& p2, // first segment + const Vec2r& p3, const Vec2r& p4, // second segment + Vec2r& res); // found intersection point + + LIB_GEOMETRY_EXPORT + intersection_test intersect2dLine2dLine(const Vec2r& p1, const Vec2r& p2, // first segment + const Vec2r& p3, const Vec2r& p4, // second segment + Vec2r& res); // found intersection point + + LIB_GEOMETRY_EXPORT + intersection_test intersect2dSeg2dSegParametric(const Vec2r& p1, const Vec2r& p2, // first segment + const Vec2r& p3, const Vec2r& p4, // second segment + real& t, // I = P1 + t * P1P2) + real& u); // I = P3 + u * P3P4 + + /*! check whether a 2D segment intersect a 2D region or not */ + LIB_GEOMETRY_EXPORT + bool intersect2dSeg2dArea(const Vec2r& min, + const Vec2r& max, + const Vec2r& A, + const Vec2r& B); + + /*! check whether a 2D segment is included in a 2D region or not */ + LIB_GEOMETRY_EXPORT + bool include2dSeg2dArea(const Vec2r& min, + const Vec2r& max, + const Vec2r& A, + const Vec2r& B); + + /*! Box-triangle overlap test, adapted from Tomas Akenine-Möller code */ + LIB_GEOMETRY_EXPORT + bool overlapTriangleBox(Vec3r& boxcenter, + Vec3r& boxhalfsize, + Vec3r triverts[3]); + + /*! Fast, Minimum Storage Ray-Triangle Intersection, + * adapted from Tomas Möller and Ben Trumbore code. + */ + LIB_GEOMETRY_EXPORT + bool intersectRayTriangle(Vec3r& orig, Vec3r& dir, + Vec3r& v0, Vec3r& v1, Vec3r& v2, + real& t, // I = orig + t * dir + real& u, real& v, // I = (1-u-v)*v0+u*v1+v*v2 + real epsilon = M_EPSILON); // the epsilon to use + + /*! Intersection between plane and ray + * adapted from Graphics Gems, Didier Badouel + */ + LIB_GEOMETRY_EXPORT + intersection_test intersectRayPlane(Vec3r& orig, Vec3r& dir, // ray origin and direction + Vec3r& norm, real d, // plane's normal and offset (plane = { P / P.N + d = 0 }) + real& t, // I = orig + t * dir + real epsilon = M_EPSILON); // the epsilon to use + + /*! Intersection Ray-Bounding box (axis aligned). + * Adapted from Williams et al, "An Efficient Robust Ray-Box Intersection Algorithm", + * JGT 10:1 (2005), pp. 49-54. + * Returns + */ + LIB_GEOMETRY_EXPORT + bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin and direction + const Vec3r& boxMin, const Vec3r& boxMax, // the bbox + real t0, real t1, // the interval in which at least on of the intersections must happen + real& tmin, real& tmax, // Imin=orig+tmin*dir is the first intersection, Imax=orig+tmax*dir is the second intersection + real epsilon = M_EPSILON); // the epsilon to use + + + /*! Checks whether 3D point P lies inside or outside of the triangle ABC */ + LIB_GEOMETRY_EXPORT + bool includePointTriangle(Vec3r& P, + Vec3r& A, + Vec3r& B, + Vec3r& C); + + LIB_GEOMETRY_EXPORT + void transformVertex(const Vec3r& vert, + const Matrix44r& matrix, + Vec3r& res); + + LIB_GEOMETRY_EXPORT + void transformVertices(const vector& vertices, + const Matrix44r& trans, + vector& res); + + LIB_GEOMETRY_EXPORT + Vec3r rotateVector(const Matrix44r& mat, const Vec3r& v); + + // + // Coordinates systems changing procedures + // + ///////////////////////////////////////////////////////////////////////////// + + /*! From world to image + * p + * point's coordinates expressed in world coordinates system + * q + * vector in which the result will be stored + * model_view_matrix + * The model view matrix expressed in line major order (OpenGL + * matrices are column major ordered) + * projection_matrix + * The projection matrix expressed in line major order (OpenGL + * matrices are column major ordered) + * viewport + * The viewport: x,y coordinates followed by width and height (OpenGL like viewport) + */ + LIB_GEOMETRY_EXPORT + void fromWorldToImage(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4], + const real projection_matrix[4][4], + const int viewport[4]); + + /*! From world to image + * p + * point's coordinates expressed in world coordinates system + * q + * vector in which the result will be stored + * transform + * The transformation matrix (gathering model view and projection), + * expressed in line major order (OpenGL matrices are column major ordered) + * viewport + * The viewport: x,y coordinates followed by width and height (OpenGL like viewport) + */ + LIB_GEOMETRY_EXPORT + void fromWorldToImage(const Vec3r& p, + Vec3r& q, + const real transform[4][4], + const int viewport[4]); + + /*! Projects from world coordinates to camera coordinates + * Returns the point's coordinates expressed in the camera's + * coordinates system. + * p + * point's coordinates expressed in world coordinates system + * q + * vector in which the result will be stored + * model_view_matrix + * The model view matrix expressed in line major order (OpenGL + * matrices are column major ordered) + */ + LIB_GEOMETRY_EXPORT + void fromWorldToCamera(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4]); + + /*! Projects from World Coordinates to retina coordinates + * Returns the point's coordinates expressed in Retina system. + * p + * point's coordinates expressed in camera system + * q + * vector in which the result will be stored + * projection_matrix + * The projection matrix expressed in line major order (OpenGL + * matrices are column major ordered) + */ + LIB_GEOMETRY_EXPORT + void fromCameraToRetina(const Vec3r& p, + Vec3r& q, + const real projection_matrix[4][4]); + + /*! From retina to image. + * Returns the coordinates expressed in Image coorinates system. + * p + * point's coordinates expressed in retina system + * q + * vector in which the result will be stored + * viewport + * The viewport: x,y coordinates followed by width and height (OpenGL like viewport). + */ + LIB_GEOMETRY_EXPORT + void fromRetinaToImage(const Vec3r& p, + Vec3r& q, + const int viewport[4]); + + /*! From image to retina + * p + * point's coordinates expressed in image system + * q + * vector in which the result will be stored + * viewport + * The viewport: x,y coordinates followed by width and height (OpenGL like viewport). + */ + LIB_GEOMETRY_EXPORT + void fromImageToRetina(const Vec3r& p, + Vec3r& q, + const int viewport[4]); + + /*! computes the coordinates of q in the camera coordinates system, + * using the known z coordinates of the 3D point. + * That means that this method does not inverse any matrices, + * it only computes X and Y from x,y and Z) + * p + * point's coordinates expressed in retina system + * q + * vector in which the result will be stored + * projection_matrix + * The projection matrix expressed in line major order (OpenGL + * matrices are column major ordered) + + */ + LIB_GEOMETRY_EXPORT + void fromRetinaToCamera(const Vec3r& p, + Vec3r& q, + real z, + const real projection_matrix[4][4]); + + /*! Projects from camera coordinates to world coordinates + * Returns the point's coordinates expressed in the world's + * coordinates system. + * p + * point's coordinates expressed in the camera coordinates system + * q + * vector in which the result will be stored + * model_view_matrix + * The model view matrix expressed in line major order (OpenGL + * matrices are column major ordered) + */ + LIB_GEOMETRY_EXPORT + void fromCameraToWorld(const Vec3r& p, + Vec3r& q, + const real model_view_matrix[4][4]); + +} // end of namespace GeomUtils + +#endif // GEOMUTILS_H diff --git a/extern/freestyle/src/geometry/Grid.cpp b/extern/freestyle/src/geometry/Grid.cpp new file mode 100755 index 00000000000..59b730358bc --- /dev/null +++ b/extern/freestyle/src/geometry/Grid.cpp @@ -0,0 +1,388 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Grid.h" +#include "BBox.h" +#include +#include + +// Grid Visitors +///////////////// +void allOccludersGridVisitor::examineOccluder(Polygon3r *occ){ + occluders_.push_back(occ); +} + +bool inBox(const Vec3r& inter, const Vec3r& box_min, const Vec3r& box_max){ + if(((inter.x()>=box_min.x()) && (inter.x() =box_min.y()) && (inter.y() =box_min.z()) && (inter.z() getVertices())[0]); + Vec3d normal((occ)->getNormal()); + double d = -(v1 * normal); + + double tmp_u, tmp_v, tmp_t; + if((occ)->rayIntersect(ray_org_, ray_dir_, tmp_t, tmp_u, tmp_v)){ + if (fabs(ray_dir_ * normal) > 0.0001){ + // Check whether the intersection is in the cell: + if(inBox(ray_org_+tmp_t*ray_dir_/ray_dir_.norm(), current_cell_->getOrigin(), current_cell_->getOrigin()+cell_size_)){ + + //Vec3d bboxdiag(_scene3d->bbox().getMax()-_scene3d->bbox().getMin()); + //if ((t>1.0E-06*(min(min(bboxdiag.x(),bboxdiag.y()),bboxdiag.z()))) && (tuserdata2 = 0; + } + } + } +} + +bool firstIntersectionGridVisitor::stop(){ + if(occluder_) + return true; + return false; +} + +// Grid +///////////////// + +void Grid::clear() { + if (_occluders.size() != 0) { + for(OccludersSet::iterator it = _occluders.begin(); + it != _occluders.end(); + it++) { + delete (*it); + } + _occluders.clear(); + } + + _size = Vec3r(0, 0, 0); + _cell_size = Vec3r(0, 0, 0); + _orig = Vec3r(0, 0, 0); + _cells_nb = Vec3u(0, 0, 0); + //_ray_occluders.clear(); +} + +void Grid::configure(const Vec3r& orig, + const Vec3r& size, + unsigned nb) { + + _orig = orig; + Vec3r tmpSize=size; + // Compute the volume of the desired grid + real grid_vol = size[0] * size[1] * size[2]; + + if(grid_vol == 0){ + double min=DBL_MAX; + int index; + int nzeros=0; + for(int i=0;i<3;++i){ + if(size[i] == 0){ + ++nzeros; + index=i; + } + if((size[i]!=0) && (min>size[i])){ + min=size[i]; + } + } + if(nzeros>1){ + throw std::runtime_error("Warning: the 3D grid has more than one null dimension"); + } + tmpSize[index]=min; + _orig[index] = _orig[index]-min/2; + } + // Compute the desired volume of a single cell + real cell_vol = grid_vol / nb; + // The edge of such a cubic cell is cubic root of cellVolume + real edge = pow(cell_vol, 1.0 / 3.0); + + // We compute the number of cells par edge + // such as we cover at least the whole box. + unsigned i; + for (i = 0; i < 3; i++) + _cells_nb[i] = (unsigned)floor(tmpSize[i] / edge) + 1; + + _size = tmpSize; + + for(i = 0; i < 3; i++) + _cell_size[i] = _size[i] / _cells_nb[i]; +} + +void Grid::insertOccluder(Polygon3r* occluder) { + const vector vertices = occluder->getVertices(); + if (vertices.size() == 0) + return; + + // add this occluder to the grid's occluders list + addOccluder(occluder); + + // find the bbox associated to this polygon + Vec3r min, max; + occluder->getBBox(min, max); + + // Retrieve the cell x, y, z cordinates associated with these min and max + Vec3u imax, imin; + getCellCoordinates(max, imax); + getCellCoordinates(min, imin); + + // We are now going to fill in the cells overlapping with the + // polygon bbox. + // If the polygon is a triangle (most of cases), we also + // check for each of these cells if it is overlapping with + // the triangle in order to only fill in the ones really overlapping + // the triangle. + + unsigned i, x, y, z; + vector::const_iterator it; + Vec3u coord; + + if (vertices.size() == 3) { // Triangle case + Vec3r triverts[3]; + i = 0; + for(it = vertices.begin(); + it != vertices.end(); + it++) { + triverts[i] = Vec3r(*it); + i++; + } + + Vec3r boxmin, boxmax; + + for (z = imin[2]; z <= imax[2]; z++) + for (y = imin[1]; y <= imax[1]; y++) + for (x = imin[0]; x <= imax[0]; x++) { + coord[0] = x; + coord[1] = y; + coord[2] = z; + // We retrieve the box coordinates of the current cell + getCellBox(coord, boxmin, boxmax); + // We check whether the triangle and the box ovewrlap: + Vec3r boxcenter((boxmin + boxmax) / 2.0); + Vec3r boxhalfsize(_cell_size / 2.0); + if (GeomUtils::overlapTriangleBox(boxcenter, boxhalfsize, triverts)) { + // We must then create the Cell and add it to the cells list + // if it does not exist yet. + // We must then add the occluder to the occluders list of this cell. + Cell* cell = getCell(coord); + if (!cell) { + cell = new Cell(boxmin); + fillCell(coord, *cell); + } + cell->addOccluder(occluder); + } + } + } + else { // The polygon is not a triangle, we add all the cells overlapping the polygon bbox. + for (z = imin[2]; z <= imax[2]; z++) + for (y = imin[1]; y <= imax[1]; y++) + for (x = imin[0]; x <= imax[0]; x++) { + coord[0] = x; + coord[1] = y; + coord[2] = z; + Cell* cell = getCell(coord); + if (!cell) { + Vec3r orig; + getCellOrigin(coord, orig); + cell = new Cell(orig); + fillCell(coord, *cell); + } + cell->addOccluder(occluder); + } + } +} + +bool Grid::nextRayCell(Vec3u& current_cell, Vec3u& next_cell) { + next_cell = current_cell; + real t_min, t; + unsigned i; + + t_min = FLT_MAX; // init tmin with handle of the case where one or 2 _u[i] = 0. + unsigned coord = 0; // predominant coord(0=x, 1=y, 2=z) + + + // using a parametric equation of + // a line : B = A + t u, we find + // the tx, ty and tz respectively coresponding + // to the intersections with the plans: + // x = _cell_size[0], y = _cell_size[1], z = _cell_size[2] + for (i = 0; i < 3; i++) { + if (_ray_dir[i] == 0) + continue; + if (_ray_dir[i] > 0) + t = (_cell_size[i] - _pt[i]) / _ray_dir[i]; + else + t = -_pt[i] / _ray_dir[i]; + if (t < t_min) { + t_min = t; + coord = i; + } + } + + // We use the parametric line equation and + // the found t (tamx) to compute the + // B coordinates: + Vec3r pt_tmp(_pt); + _pt = pt_tmp + t_min * _ray_dir; + + // We express B coordinates in the next cell + // coordinates system. We just have to + // set the coordinate coord of B to 0 + // of _CellSize[coord] depending on the sign + // of _u[coord] + if (_ray_dir[coord] > 0) { + next_cell[coord]++; + _pt[coord] -= _cell_size[coord]; + // if we are out of the grid, we must stop + if (next_cell[coord] >= _cells_nb[coord]) + return false; + } + else { + int tmp = next_cell[coord] - 1; + _pt[coord] = _cell_size[coord]; + if (tmp < 0) + return false; + next_cell[coord]--; + } + + _t += t_min; + if (_t >= _t_end) + return false; + + return true; +} + +void Grid::castRay(const Vec3r& orig, + const Vec3r& end, + OccludersSet& occluders, + unsigned timestamp) { + initRay(orig, end, timestamp); + allOccludersGridVisitor visitor(occluders); + castRayInternal(visitor); +} + +void Grid::castInfiniteRay(const Vec3r& orig, + const Vec3r& dir, + OccludersSet& occluders, + unsigned timestamp) { + Vec3r end = Vec3r(orig + FLT_MAX * dir / dir.norm()); + bool inter = initInfiniteRay(orig, dir, timestamp); + if(!inter) + return; + allOccludersGridVisitor visitor(occluders); + castRayInternal(visitor); +} + +Polygon3r* Grid::castRayToFindFirstIntersection(const Vec3r& orig, + const Vec3r& dir, + double& t, + double& u, + double& v, + unsigned timestamp){ + Polygon3r *occluder = 0; + Vec3r end = Vec3r(orig + FLT_MAX * dir / dir.norm()); + bool inter = initInfiniteRay(orig, dir, timestamp); + if(!inter){ + return 0; + } + firstIntersectionGridVisitor visitor(orig,dir,_cell_size); + castRayInternal(visitor); + occluder = visitor.occluder(); + t = visitor.t_; + u = visitor.u_; + v = visitor.v_; + return occluder; +} + +void Grid::initRay (const Vec3r &orig, + const Vec3r& end, + unsigned timestamp) { + _ray_dir = end - orig; + _t_end = _ray_dir.norm(); + _t = 0; + _ray_dir.normalize(); + _timestamp = timestamp; + + for(unsigned i = 0; i < 3; i++) { + _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]); + unsigned u = _current_cell[i]; + _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; + } + //_ray_occluders.clear(); + +} + +bool Grid::initInfiniteRay (const Vec3r &orig, + const Vec3r& dir, + unsigned timestamp) { + _ray_dir = dir; + _t_end = FLT_MAX; + _t = 0; + _ray_dir.normalize(); + _timestamp = timestamp; + + // check whether the origin is in or out the box: + Vec3r boxMin(_orig); + Vec3r boxMax(_orig+_size); + BBox box(boxMin, boxMax); + if(box.inside(orig)){ + for(unsigned i = 0; i < 3; i++) { + _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]); + unsigned u = _current_cell[i]; + _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; + } + }else{ + // is the ray intersecting the box? + real tmin(-1.0), tmax(-1.0); + if(GeomUtils::intersectRayBBox(orig, _ray_dir, boxMin, boxMax, 0, _t_end, tmin, tmax)){ + assert(tmin != -1.0); + Vec3r newOrig = orig + tmin*_ray_dir; + for(unsigned i = 0; i < 3; i++) { + _current_cell[i] = (unsigned)floor((newOrig[i] - _orig[i]) / _cell_size[i]); + if(_current_cell[i] == _cells_nb[i]) + _current_cell[i] = _cells_nb[i] - 1; + unsigned u = _current_cell[i]; + _pt[i] = newOrig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; + } + + }else{ + return false; + } + } + //_ray_occluders.clear(); + + return true; + +} + diff --git a/extern/freestyle/src/geometry/Grid.h b/extern/freestyle/src/geometry/Grid.h new file mode 100755 index 00000000000..6197721bb45 --- /dev/null +++ b/extern/freestyle/src/geometry/Grid.h @@ -0,0 +1,358 @@ +// +// Filename : Grid.h +// Author(s) : Stephane Grabli +// Purpose : Base class to define a cell grid surrounding +// the bounding box of the scene +// Date of creation : 30/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GRID_H +# define GRID_H + +# include +# include +# include "../system/FreestyleConfig.h" +# include "GeomUtils.h" +# include "Geom.h" +# include "Polygon.h" + +using namespace std; +using namespace Geometry; + +typedef vector OccludersSet; + + +// +// Class to define cells used by the regular grid +// +/////////////////////////////////////////////////////////////////////////////// + +class LIB_GEOMETRY_EXPORT Cell +{ + public: + + Cell(Vec3r& orig) { + _orig = orig; + } + + virtual ~Cell() {} + + inline void addOccluder(Polygon3r* o) { + if (o) + _occluders.push_back(o); + } + + inline const Vec3r& getOrigin() { + return _orig; + } + + inline OccludersSet& getOccluders() { + return _occluders; + } + + private: + + Vec3r _orig; + OccludersSet _occluders; +}; + + +class GridVisitor{ +public: + virtual void discoverCell(Cell *cell) {} + virtual void examineOccluder(Polygon3r *occ) {} + virtual void finishCell(Cell *cell) {} + virtual bool stop() {return false;} +}; + +/*! Gathers all the occluders belonging to the cells + * traversed by the ray */ +class allOccludersGridVisitor : public GridVisitor{ +public: + allOccludersGridVisitor(OccludersSet& occluders) + :GridVisitor(), occluders_(occluders){} + virtual void examineOccluder(Polygon3r *occ); + + OccludersSet& occluders() {return occluders_;} + void clear() {occluders_.clear();} + +private: + OccludersSet& occluders_; +}; + +/*! Finds the first intersection and breaks. The occluder and + * the intersection information are stored and accessible. + */ +class firstIntersectionGridVisitor : public GridVisitor { +public: + firstIntersectionGridVisitor(const Vec3r& ray_org, const Vec3r& ray_dir, const Vec3r& cell_size) : + GridVisitor(), ray_org_(ray_org), cell_size_(cell_size),ray_dir_(ray_dir),occluder_(0), + u_(0),v_(0),t_(DBL_MAX),current_cell_(0){} + virtual ~firstIntersectionGridVisitor() {} + + virtual void discoverCell(Cell *cell) {current_cell_=cell;} + virtual void examineOccluder(Polygon3r *occ); + virtual bool stop(); + + Polygon3r * occluder() {return occluder_;} + +public: + double u_, v_, t_; +private: + Polygon3r *occluder_; + Vec3r ray_org_, ray_dir_; + Vec3r cell_size_; + Cell * current_cell_; +}; + +// +// Class to define a regular grid used for ray casting computations +// +/////////////////////////////////////////////////////////////////////////////// + +class LIB_GEOMETRY_EXPORT Grid +{ +public: + + /*! Builds a Grid + * Must be followed by a call to configure() + */ + Grid() {} + + virtual ~Grid() { + clear(); + } + + /*! clears the grid + * Deletes all the cells, clears the hashtable, + * resets size, size of cell, number of cells. + */ + virtual void clear(); + + /*! Sets the different parameters of the grid + * orig + * The grid origin + * size + * The grid's dimensions + * nb + * The number of cells of the grid + */ + virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); + + /*! returns a vector of integer containing the + * coordinates of the cell containing the point + * passed as argument + * p + * The point for which we're looking the cell + */ + inline void getCellCoordinates(const Vec3r& p, Vec3u& res) { + int tmp; + for (int i = 0; i < 3; i++) { + tmp = (int)((p[i] - _orig[i]) / _cell_size[i]); + if (tmp < 0) + res[i] = 0; + else if ((unsigned)tmp >= _cells_nb[i]) + res[i] = _cells_nb[i] - 1; + else + res[i] = tmp; + } + } + + /*! Fills the case corresponding to coord with the cell */ + virtual void fillCell(const Vec3u& coord, Cell& cell) = 0; + + /*! returns the cell whose coordinates + * are pased as argument + */ + virtual Cell* getCell(const Vec3u& coord) = 0; + + /*! returns the cell containing the point + * passed as argument. If the cell is empty + * (contains no occluder), NULL is returned + * p + * The point for which we're looking the cell + */ + inline Cell* getCell(const Vec3r& p) { + Vec3u coord; + getCellCoordinates(p, coord); + return getCell(coord); + } + + /*! Retrieves the x,y,z coordinates of the origin of the cell whose coordinates (i,j,k) + * is passed as argument + * cell_coord + * i,j,k integer coordinates for the cell + * orig + * x,y,x vector to be filled in with the cell origin's coordinates + */ + inline void getCellOrigin(const Vec3u& cell_coord, Vec3r& orig) { + for (unsigned i = 0; i < 3; i++) + orig[i] = _orig[i] + cell_coord[i] * _cell_size[i]; + } + + /*! Retrieves the box corresponding to the cell whose coordinates + * are passed as argument. + * cell_coord + * i,j,k integer coordinates for the cell + * min_out + * The min x,y,x vector of the box. Filled in by the method. + * max_out + * The max x,y,z coordinates of the box. Filled in by the method. + */ + inline void getCellBox(const Vec3u& cell_coord, Vec3r& min_out, Vec3r& max_out) { + getCellOrigin(cell_coord, min_out); + max_out = min_out + _cell_size; + } + + /*! inserts a convex polygon occluder + * This method is quite coarse insofar as it + * adds all cells intersecting the polygon bounding box + * convex_poly + * The list of 3D points constituing a convex polygon + */ + void insertOccluder(Polygon3r * convex_poly); + + /*! Adds an occluder to the list of occluders */ + void addOccluder(Polygon3r* occluder) { + _occluders.push_back(occluder); + } + + /*! Casts a ray between a starting point and an ending point + * Returns the list of occluders contained + * in the cells intersected by this ray + * Starts with a call to InitRay. + */ + void castRay(const Vec3r& orig, + const Vec3r& end, + OccludersSet& occluders, + unsigned timestamp); + + /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a given direction. + * Returns the list of occluders contained + * in the cells intersected by this ray + * Starts with a call to InitRay. + */ + void castInfiniteRay(const Vec3r& orig, + const Vec3r& dir, + OccludersSet& occluders, + unsigned timestamp); + + /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a given direction. + * Returns the first intersection (occluder,t,u,v) or null. + * Starts with a call to InitRay. + */ + Polygon3r * castRayToFindFirstIntersection(const Vec3r& orig, + const Vec3r& dir, + double& t, + double& u, + double& v, + unsigned timestamp); + + + /*! Init all structures and values for computing + * the cells intersected by this new ray + */ + void initRay (const Vec3r &orig, + const Vec3r& end, + unsigned timestamp); + + /*! Init all structures and values for computing + * the cells intersected by this infinite ray. + * Returns false if the ray doesn't intersect the + * grid. + */ + bool initInfiniteRay (const Vec3r &orig, + const Vec3r& dir, + unsigned timestamp); + + + /*! Accessors */ + inline const Vec3r& getOrigin() const { + return _orig; + } + inline Vec3r gridSize() const { + return _size; + } + inline Vec3r getCellSize() const { + return _cell_size; + } + + void displayDebug() { + cerr << "Cells nb : " << _cells_nb << endl; + cerr << "Cell size : " << _cell_size << endl; + cerr << "Origin : " << _orig << endl; + cerr << "Occluders nb : " << _occluders.size() << endl; + } + + protected: + + /*! Core of castRay and castInfiniteRay, find occluders + * along the given ray + */ + inline void castRayInternal(GridVisitor& visitor) { + Cell* current_cell = NULL; + do { + current_cell = getCell(_current_cell); + if (current_cell){ + visitor.discoverCell(current_cell); + OccludersSet& occluders = current_cell->getOccluders(); // FIXME: I had forgotten the ref & + for (OccludersSet::iterator it = occluders.begin(); + it != occluders.end(); + it++) { + if ((unsigned)(*it)->userdata2 != _timestamp) { + (*it)->userdata2 = (void*)_timestamp; + visitor.examineOccluder(*it); + } + } + visitor.finishCell(current_cell); + } + } while ((!visitor.stop()) && (nextRayCell(_current_cell, _current_cell))); + } + + + /*! returns the cell next to the cell + * passed as argument. + */ + bool nextRayCell(Vec3u& current_cell, Vec3u& next_cell); + + unsigned _timestamp; + + Vec3u _cells_nb; // number of cells for x,y,z axis + Vec3r _cell_size; // cell x,y,z dimensions + Vec3r _size; // grid x,y,x dimensions + Vec3r _orig; // grid origin + + Vec3r _ray_dir; // direction vector for the ray + Vec3u _current_cell; // The current cell being processed (designated by its 3 coordinates) + Vec3r _pt; // Points corresponding to the incoming and outgoing intersections + // of one cell with the ray + real _t_end; // To know when we are at the end of the ray + real _t; + + //OccludersSet _ray_occluders; // Set storing the occluders contained in the cells traversed by a ray + OccludersSet _occluders; // List of all occluders inserted in the grid +}; + +#endif // GRID_H diff --git a/extern/freestyle/src/geometry/HashGrid.cpp b/extern/freestyle/src/geometry/HashGrid.cpp new file mode 100755 index 00000000000..3cf845d57ef --- /dev/null +++ b/extern/freestyle/src/geometry/HashGrid.cpp @@ -0,0 +1,41 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "HashGrid.h" + +void HashGrid::clear() +{ + if(!_cells.empty()) { + for(GridHashTable::iterator it = _cells.begin(); + it !=_cells.end(); + it++) { + Cell* cell = (*it).second; + delete cell; + } + _cells.clear(); + } + + Grid::clear(); +} + +void HashGrid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb) { + Grid::configure(orig, size, nb); +} diff --git a/extern/freestyle/src/geometry/HashGrid.h b/extern/freestyle/src/geometry/HashGrid.h new file mode 100755 index 00000000000..f6605957676 --- /dev/null +++ b/extern/freestyle/src/geometry/HashGrid.h @@ -0,0 +1,109 @@ +// +// Filename : HashGrid.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a cell grid surrounding the +// bounding box of the scene +// Date of creation : 30/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef HASHGRID_H +# define HASHGRID_H + +//# if defined(__GNUC__) && (__GNUC__ >= 3) +// hash_map is not part of the C++ standard anymore; +// hash_map.h has been kept though for backward compatibility +//# include +//# else +//# include +//# endif + +# include "Grid.h" +# include +/*! Defines a hash table used for searching the Cells */ +struct GridHasher{ +#define _MUL 950706376UL +#define _MOD 2147483647UL + inline size_t operator() (const Vec3u& p) const + { + size_t res = ((unsigned long) (p[0] * _MUL)) % _MOD; + res = ((res + (unsigned long) (p[1]) * _MUL)) % _MOD; + return ((res +(unsigned long) (p[2]) * _MUL)) % _MOD; + } +}; + +/*! Class to define a regular grid used for ray + casting computations */ + +class LIB_GEOMETRY_EXPORT HashGrid : public Grid +{ + public: + + typedef map GridHashTable; + + HashGrid() : Grid() {} + + virtual ~HashGrid() { + clear(); + } + + /*! clears the grid + * Deletes all the cells, clears the hashtable, + * resets size, size of cell, number of cells. + */ + virtual void clear(); + + /*! Sets the different parameters of the grid + * orig + * The grid origin + * size + * The grid's dimensions + * nb + * The number of cells of the grid + */ + virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); + + /*! returns the cell whose coordinates + * are pased as argument + */ + virtual Cell* getCell(const Vec3u& p) { + Cell* found_cell = NULL; + + GridHashTable::const_iterator found = _cells.find(p); + if (found != _cells.end()) + found_cell = (*found).second; + return found_cell; + } + + /*! Fills the case p with the cell iCell */ + virtual void fillCell(const Vec3u& p, Cell& cell) { + _cells[p] = &cell; + } + +protected: + + GridHashTable _cells; +}; + +#endif // HASHGRID_H diff --git a/extern/freestyle/src/geometry/Noise.cpp b/extern/freestyle/src/geometry/Noise.cpp new file mode 100755 index 00000000000..396fc3bbb47 --- /dev/null +++ b/extern/freestyle/src/geometry/Noise.cpp @@ -0,0 +1,264 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Noise.h" +# include +# include +# include +#include + +#define MINX -1000000 +#define MINY MINX +#define MINZ MINX +#define SCURVE(a) ((a)*(a)*(3.0-2.0*(a))) +#define REALSCALE ( 2.0 / 65536.0 ) +#define NREALSCALE ( 2.0 / 4096.0 ) +#define HASH3D(a,b,c) hashTable[hashTable[hashTable[(a) & 0xfff] ^ ((b) & 0xfff)] ^ ((c) & 0xfff)] +#define HASH(a,b,c) (xtab[(xtab[(xtab[(a) & 0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff) +#define INCRSUM(m,s,x,y,z) ((s)*(RTable[m]*0.5 \ + + RTable[m+1]*(x) \ + + RTable[m+2]*(y) \ + + RTable[m+3]*(z))) +#define MAXSIZE 500 +#define nrand() ((float)rand()/(float)RAND_MAX) +#define seednrand(x) srand(x*RAND_MAX) + +#define BM 0xff + +#define N 0x1000 +#define NP 12 /* 2^N */ +#define NM 0xfff + +#define s_curve(t) ( t * t * (3. - 2. * t) ) + +#define lerp(t, a, b) ( a + t * (b - a) ) + +#define setup(i,b0,b1,r0,r1)\ + t = i + N;\ + b0 = ((int)t) & BM;\ + b1 = (b0+1) & BM;\ + r0 = t - (int)t;\ + r1 = r0 - 1.; + +void normalize2(float v[2]) +{ + float s; + + s = sqrt(v[0] * v[0] + v[1] * v[1]); + v[0] = v[0] / s; + v[1] = v[1] / s; +} + +void normalize3(float v[3]) +{ + float s; + + s = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); + v[0] = v[0] / s; + v[1] = v[1] / s; + v[2] = v[2] / s; +} + +float Noise::turbulence1(float arg, float freq, float amp, unsigned oct) +{ + float t; + float vec; + + for (t = 0; oct > 0 && freq > 0; freq *= 2, amp /= 2, --oct) + { + vec = freq * arg; + t += smoothNoise1(vec) * amp; + } + return t; +} + +float Noise::turbulence2(Vec2f& v, float freq, float amp, unsigned oct) +{ + float t; + Vec2f vec; + + for (t = 0; oct > 0 && freq > 0; freq *= 2, amp /= 2, --oct) + { + vec.x() = freq * v.x(); + vec.y() = freq * v.y(); + t += smoothNoise2(vec) * amp; + } + return t; +} + +float Noise::turbulence3(Vec3f& v, float freq, float amp, unsigned oct) +{ + float t; + Vec3f vec; + + for (t = 0; oct > 0 && freq > 0; freq *= 2, amp /= 2, --oct) + { + vec.x() = freq * v.x(); + vec.y() = freq * v.y(); + vec.z() = freq * v.z(); + t += smoothNoise3(vec) * amp; + } + return t; +} + +// Noise functions over 1, 2, and 3 dimensions + +float Noise::smoothNoise1(float arg) +{ + int bx0, bx1; + float rx0, rx1, sx, t, u, v, vec; + + vec = arg; + setup(vec, bx0,bx1, rx0,rx1); + + sx = s_curve(rx0); + + u = rx0 * g1[ p[ bx0 ] ]; + v = rx1 * g1[ p[ bx1 ] ]; + + return lerp(sx, u, v); +} + +float Noise::smoothNoise2(Vec2f& vec) +{ + int bx0, bx1, by0, by1, b00, b10, b01, b11; + float rx0, rx1, ry0, ry1, *q, sx, sy, a, b, t, u, v; + register int i, j; + + setup(vec.x(), bx0,bx1, rx0,rx1); + setup(vec.y(), by0,by1, ry0,ry1); + + i = p[ bx0 ]; + j = p[ bx1 ]; + + b00 = p[ i + by0 ]; + b10 = p[ j + by0 ]; + b01 = p[ i + by1 ]; + b11 = p[ j + by1 ]; + + sx = s_curve(rx0); + sy = s_curve(ry0); + +#define at2(rx,ry) ( rx * q[0] + ry * q[1] ) + + q = g2[ b00 ] ; u = at2(rx0,ry0); + q = g2[ b10 ] ; v = at2(rx1,ry0); + a = lerp(sx, u, v); + + q = g2[ b01 ] ; u = at2(rx0,ry1); + q = g2[ b11 ] ; v = at2(rx1,ry1); + b = lerp(sx, u, v); + + return lerp(sy, a, b); +} + +float Noise::smoothNoise3(Vec3f& vec) +{ + int bx0, bx1, by0, by1, bz0, bz1, b00, b10, b01, b11; + float rx0, rx1, ry0, ry1, rz0, rz1, *q, sy, sz, a, b, c, d, t, u, v; + register int i, j; + + setup(vec.x(), bx0,bx1, rx0,rx1); + setup(vec.y(), by0,by1, ry0,ry1); + setup(vec.z(), bz0,bz1, rz0,rz1); + + i = p[ bx0 ]; + j = p[ bx1 ]; + + b00 = p[ i + by0 ]; + b10 = p[ j + by0 ]; + b01 = p[ i + by1 ]; + b11 = p[ j + by1 ]; + + t = s_curve(rx0); + sy = s_curve(ry0); + sz = s_curve(rz0); + +#define at3(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] ) + + q = g3[ b00 + bz0 ] ; + u = at3(rx0,ry0,rz0); + q = g3[ b10 + bz0 ] ; + v = at3(rx1,ry0,rz0); + a = lerp(t, u, v); + + q = g3[ b01 + bz0 ] ; + u = at3(rx0,ry1,rz0); + q = g3[ b11 + bz0 ] ; + v = at3(rx1,ry1,rz0); + b = lerp(t, u, v); + + c = lerp(sy, a, b); + + q = g3[ b00 + bz1 ] ; + u = at3(rx0,ry0,rz1); + q = g3[ b10 + bz1 ] ; + v = at3(rx1,ry0,rz1); + a = lerp(t, u, v); + + q = g3[ b01 + bz1 ] ; + u = at3(rx0,ry1,rz1); + q = g3[ b11 + bz1 ] ; + v = at3(rx1,ry1,rz1); + b = lerp(t, u, v); + + d = lerp(sy, a, b); + + return lerp(sz, c, d); +} + +Noise::Noise() +{ + int i, j, k; + + seednrand(time(NULL)); + for (i = 0 ; i < _Noise_B_ ; i++) + { + p[i] = i; + + g1[i] = (float)((rand() % (_Noise_B_ + _Noise_B_)) - _Noise_B_) / _Noise_B_; + + for (j = 0 ; j < 2 ; j++) + g2[i][j] = (float)((rand() % (_Noise_B_ + _Noise_B_)) - _Noise_B_) / _Noise_B_; + normalize2(g2[i]); + + for (j = 0 ; j < 3 ; j++) + g3[i][j] = (float)((rand() % (_Noise_B_ + _Noise_B_)) - _Noise_B_) / _Noise_B_; + normalize3(g3[i]); + } + + while (--i) + { + k = p[i]; + p[i] = p[j = rand() % _Noise_B_]; + p[j] = k; + } + + for (i = 0 ; i < _Noise_B_ + 2 ; i++) + { + p[_Noise_B_ + i] = p[i]; + g1[_Noise_B_ + i] = g1[i]; + for (j = 0 ; j < 2 ; j++) + g2[_Noise_B_ + i][j] = g2[i][j]; + for (j = 0 ; j < 3 ; j++) + g3[_Noise_B_ + i][j] = g3[i][j]; + } +} diff --git a/extern/freestyle/src/geometry/Noise.h b/extern/freestyle/src/geometry/Noise.h new file mode 100755 index 00000000000..00cebbb451e --- /dev/null +++ b/extern/freestyle/src/geometry/Noise.h @@ -0,0 +1,77 @@ +// +// Filename : Noise.h +// Author(s) : Emmanuel Turquin +// Purpose : Class to define Perlin noise +// Date of creation : 12/01/2004 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NOISE_H +# define NOISE_H + + +# include "../system/FreestyleConfig.h" +# include "Geom.h" + +#define _Noise_B_ 0x100 + +using namespace Geometry; +using namespace std; + +/*! Class to provide Perlin Noise functionalities */ +class LIB_GEOMETRY_EXPORT Noise +{ + public: + + /*! Builds a Noise object */ + Noise(); + /*! Destructor */ + ~Noise() {} + + /*! Returns a noise value for a 1D element */ + float turbulence1(float arg, float freq, float amp, unsigned oct = 4); + + /*! Returns a noise value for a 2D element */ + float turbulence2(Vec2f& v, float freq, float amp, unsigned oct = 4); + + /*! Returns a noise value for a 3D element */ + float turbulence3(Vec3f& v, float freq, float amp, unsigned oct = 4); + + /*! Returns a smooth noise value for a 1D element */ + float smoothNoise1(float arg); + /*! Returns a smooth noise value for a 2D element */ + float smoothNoise2(Vec2f& vec); + /*! Returns a smooth noise value for a 3D element */ + float smoothNoise3(Vec3f& vec); + + private: + + int p[ _Noise_B_ + _Noise_B_ + 2]; + float g3[ _Noise_B_ + _Noise_B_ + 2][3]; + float g2[ _Noise_B_ + _Noise_B_ + 2][2]; + float g1[ _Noise_B_ + _Noise_B_ + 2]; + int start; +}; + +#endif // NOISE_H diff --git a/extern/freestyle/src/geometry/Polygon.h b/extern/freestyle/src/geometry/Polygon.h new file mode 100755 index 00000000000..f9c4c78d424 --- /dev/null +++ b/extern/freestyle/src/geometry/Polygon.h @@ -0,0 +1,215 @@ +// +// Filename : Polygon.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a polygon +// Date of creation : 30/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef POLYGON_H +# define POLYGON_H + +# include +# include "Geom.h" +# include "GeomUtils.h" + +using namespace std; + +namespace Geometry { + +template +class Polygon +{ + public: + + inline Polygon() { + _id = 0; + userdata = 0; + userdata2 = 0; + } + + inline Polygon(const vector& vertices) { + _vertices = vertices; + computeBBox(); + _id = 0; + userdata = 0; + userdata2 = 0; + } + + inline Polygon(const Polygon& poly) { + Point p; + for(typename vector::const_iterator it = poly.getVertices().begin(); + it != poly.getVertices().end(); + it++) { + p = *it; + _vertices.push_back(p); + } + + _id = poly.getId(); + poly.getBBox(_min, _max); + userdata = 0; + userdata2 = 0; + } + + virtual ~Polygon() {} + + // + // Accessors + // + ///////////////////////////////////////////////////////////////////////////// + + inline const vector& getVertices() const { + return _vertices; + } + + inline void getBBox(Point& min, Point& max) const { + min = _min; + max = _max; + } + + inline Point& getBBoxCenter() + { + Point result; + result = (_min + _max) / 2; + return result; + } + + inline Point& getCenter() { + Point result; + for (typename vector::iterator it = _vertices.begin(); + it != _vertices.end(); + it++) + result += *it; + result /= _vertices.size(); + return result; + } + + inline unsigned getId() const { + return _id; + } + + // + // Modifiers + // + ///////////////////////////////////////////////////////////////////////////// + + inline void setVertices(const vector& vertices) { + _vertices.clear(); + Point p; + for (typename vector::const_iterator it = vertices.begin(); + it != vertices.end(); + it++) { + p = *it; + _vertices.push_back(p); + } + computeBBox(); + } + + inline void setId(unsigned id) { + _id = id; + } + + // + // Other methods + // + ///////////////////////////////////////////////////////////////////////////// + + inline void computeBBox() { + if(_vertices.empty()) + return; + + _max = _vertices[0]; + _min = _vertices[0]; + + for(typename vector::iterator it = _vertices.begin(); + it != _vertices.end(); + it++) { + for(unsigned i = 0; i < Point::dim(); i++) { + if((*it)[i] > _max[i]) + _max[i] = (*it)[i]; + if((*it)[i] < _min[i]) + _min[i] = (*it)[i]; + } + } + } + + // FIXME Is it possible to get rid of userdatas ? + void* userdata; + void* userdata2; // Used during ray casting + + protected: + + vector _vertices; + Point _min; + Point _max; + unsigned _id; +}; + + +// +// Polygon3r class +// +/////////////////////////////////////////////////////////////////////////////// + +class Polygon3r : public Polygon +{ + public: + + inline Polygon3r() : Polygon() {} + + inline Polygon3r(const vector& vertices, + const Vec3r& normal) : Polygon(vertices) { + setNormal(normal); + } + + inline Polygon3r(const Polygon3r& poly) : Polygon(poly) {} + + virtual ~Polygon3r() {} + + void setNormal(const Vec3r& normal) { + _normal = normal; + } + + Vec3r getNormal() const { + return _normal; + } + + /*! Check whether the Polygon intersects with the ray or not */ + inline bool rayIntersect(Vec3r& orig, Vec3r& dir, + real& t, real& u, real& v, real epsilon = M_EPSILON) { + // if (_vertices.size() < 3) + // return false; + return GeomUtils::intersectRayTriangle(orig, dir, + _vertices[0], _vertices[1], _vertices[2], + t, u, v, epsilon); + } + + private: + + Vec3r _normal; +}; + +} // end of namespace Geometry + +#endif // POLYGON_H diff --git a/extern/freestyle/src/geometry/SweepLine.h b/extern/freestyle/src/geometry/SweepLine.h new file mode 100755 index 00000000000..e3fb4ad8c0c --- /dev/null +++ b/extern/freestyle/src/geometry/SweepLine.h @@ -0,0 +1,334 @@ +// +// Filename : SweepLine.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a Sweep Line +// Date of creation : 29/08/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SWEEPLINE_H +# define SWEEPLINE_H + +# include +# include + +/*! Class to define the intersection berween two segments*/ +template +class Intersection +{ +public: + + template + Intersection(EdgeClass* eA, real ta, EdgeClass* eB, real tb) + { + EdgeA = eA; + EdgeB = eB; + tA = ta; + tB = tb; + userdata = 0; + } + + Intersection(const Intersection& iBrother) + { + EdgeA = iBrother.EdgeA; + EdgeB = iBrother.EdgeB; + tA = iBrother.tA; + tB = iBrother.tB; + userdata = 0; + } + + /*! returns the parameter giving the + * intersection, for the edge iEdge + */ + real getParameter(Edge *iEdge) + { + if(iEdge == EdgeA) + return tA; + if(iEdge == EdgeB) + return tB; + return 0; + } + +public: + void * userdata; // FIXME + + Edge *EdgeA; // first segment + Edge *EdgeB; // second segment + real tA; // parameter defining the intersection point with respect to the segment EdgeA. + real tB; // parameter defining the intersection point with respect to the segment EdgeB. +}; + + + + + + + + +template +class Segment +{ + public: + Segment() + { + } + Segment(T& s, const Point& iA, const Point& iB) + { + _edge = s; + if(iA < iB) + { + A = iA; + B = iB; + _order = true; + } + else + { + A = iB; + B = iA; + _order = false; + } + } + + Segment(Segment& iBrother) + { + _edge = iBrother.edge(); + A = iBrother.A; + B = iBrother.B; + _Intersections = iBrother._Intersections; + _order = iBrother._order; + } + + Segment(const Segment& iBrother) + { + _edge = iBrother._edge; + A = iBrother.A; + B = iBrother.B; + _Intersections = iBrother._Intersections; + _order = iBrother._order; + } + + ~Segment() { + _Intersections.clear(); + } + + inline Point operator[](const unsigned short int& i) const + { + return i%2==0 ? A : B; + } + + inline bool operator==(const Segment& iBrother) + { + if(_edge == iBrother._edge) + return true; + + return false; + } + + /* Adds an intersection for this segment */ + inline void AddIntersection(Intersection > *i) {_Intersections.push_back(i);} + + /*! Checks for a common vertex with another edge */ + inline bool CommonVertex(const Segment& S, Point& CP) + { + if((A == S[0]) || (A == S[1])) + { + CP = A; + return true; + } + if((B == S[0]) || (B == S[1])) + { + CP = B; + return true; + } + + return false; + } + + inline vector >*>& intersections() {return _Intersections;} + inline bool order() {return _order;} + inline T& edge() {return _edge;} + + private: + T _edge; + Point A; + Point B; + std::vector >*> _Intersections; // list of intersections parameters + bool _order; // true if A and B are in the same order than _edge.A and _edge.B. false otherwise. +}; + +/*! defines a binary function that can be overload + * by the user to specify at each condition + * the intersection between 2 edges must be computed + */ +template +struct binary_rule +{ + binary_rule() {} + template + binary_rule(const binary_rule& brother) {} + virtual ~binary_rule() {} + + virtual bool operator()(T1&, T2&) + { + return true; + } +}; + + +template +class SweepLine +{ +public: + + SweepLine() {} + ~SweepLine() + { + for(typename vector >*>::iterator i=_Intersections.begin(),iend=_Intersections.end(); + i!=iend; + i++) + { + delete (*i); + } + _Intersections.clear(); + + for(typename vector* >::iterator ie=_IntersectedEdges.begin(),ieend=_IntersectedEdges.end(); + ie!=ieend; + ie++) + { + delete (*ie); + } + _IntersectedEdges.clear(); + + _set.clear(); + } + + + inline void process(Point& p, + vector*>& segments, + binary_rule,Segment >& binrule + //binary_rule,Segment >& binrule = binary_rule,Segment >() + ) + { + // first we remove the segments that need to be removed and then + // we add the segments to add + vector*> toadd; + typename vector*>::iterator s, send; + for(s=segments.begin(), send=segments.end(); + s!=send; + s++) + { + if(p == (*(*s))[0]) + toadd.push_back((*s)); + else + remove((*s)); + } + for(s=toadd.begin(), send=toadd.end(); + s!=send; + s++) + { + add((*s), binrule); + } + } + + inline void add(Segment* S, + binary_rule,Segment >& binrule + //binary_rule,Segment >& binrule = binary_rule, Segment >() + ) + { + real t,u; + Point CP; + Vec2r v0, v1, v2, v3; + if(true == S->order()) + { + v0[0] = ((*S)[0])[0]; + v0[1] = ((*S)[0])[1]; + v1[0] = ((*S)[1])[0]; + v1[1] = ((*S)[1])[1]; + } + else + { + v1[0] = ((*S)[0])[0]; + v1[1] = ((*S)[0])[1]; + v0[0] = ((*S)[1])[0]; + v0[1] = ((*S)[1])[1]; + } + for(typename std::list* >::iterator s=_set.begin(), send=_set.end(); + s!=send; + s++) + { + Segment* currentS = (*s); + if(true != binrule(*S, *currentS)) + continue; + + if(true == currentS->order()) + { + v2[0] = ((*currentS)[0])[0]; + v2[1] = ((*currentS)[0])[1]; + v3[0] = ((*currentS)[1])[0]; + v3[1] = ((*currentS)[1])[1]; + } + else + { + v3[0] = ((*currentS)[0])[0]; + v3[1] = ((*currentS)[0])[1]; + v2[0] = ((*currentS)[1])[0]; + v2[1] = ((*currentS)[1])[1]; + } + if(S->CommonVertex(*currentS, CP)) + continue; // the two edges have a common vertex->no need to check + + if(GeomUtils::intersect2dSeg2dSegParametric(v0, v1, v2, v3, t, u)) + { + // create the intersection + Intersection > * inter = new Intersection >(S,t,currentS,u); + // add it to the intersections list + _Intersections.push_back(inter); + // add this intersection to the first edge intersections list + S->AddIntersection(inter); + // add this intersection to the second edge intersections list + currentS->AddIntersection(inter); + } + } + // add the added segment to the list of active segments + _set.push_back(S); + } + + inline void remove(Segment* s) + { + if(s->intersections().size() > 0) + _IntersectedEdges.push_back(s); + _set.remove(s); + } + + vector* >& intersectedEdges() {return _IntersectedEdges;} + vector >*>& intersections() {return _Intersections;} + + +private: + std::list* > _set; // set of active edges for a given position of the sweep line + std::vector* > _IntersectedEdges; // the list of intersected edges + std::vector >*> _Intersections; // the list of all intersections. +}; + +#endif // SWEEPLINE_H diff --git a/extern/freestyle/src/geometry/VecMat.h b/extern/freestyle/src/geometry/VecMat.h new file mode 100755 index 00000000000..9bbec3b1349 --- /dev/null +++ b/extern/freestyle/src/geometry/VecMat.h @@ -0,0 +1,899 @@ +// +// Filename : VecMat.h +// Author(s) : Sylvain Paris +// Emmanuel Turquin +// Stephane Grabli +// Purpose : Vectors and Matrices definition and manipulation +// Date of creation : 12/06/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VECMAT_H +# define VECMAT_H + +# include +# include +# include + +namespace VecMat { + + namespace Internal { + + template + struct is_false {}; + + template <> + struct is_false { + static inline void ensure() {} + }; + + } // end of namespace Internal + + // + // Vector class + // - T: value type + // - N: dimension + // + ///////////////////////////////////////////////////////////////////////////// + + template + class Vec + { + public: + + typedef T value_type; + + // constructors + + inline Vec() { + for (unsigned i = 0; i < N; i++) + this->_coord[i] = 0; + } + + ~Vec() { + Internal::is_false<(N == 0)>::ensure(); + } + + template + explicit inline Vec(const U tab[N]) { + for (unsigned i = 0; i < N; i++) + this->_coord[i] = (T)tab[i]; + } + + template + explicit inline Vec(const std::vector& tab) { + for (unsigned i = 0; i < N; i++) + this->_coord[i] = (T)tab[i]; + } + + template + explicit inline Vec(const Vec& v) { + for (unsigned i = 0; i < N; i++) + this->_coord[i] = (T)v[i]; + } + + // accessors + + inline value_type operator[](const unsigned i) const { + return this->_coord[i]; + } + + inline value_type& operator[](const unsigned i) { + return this->_coord[i]; + } + + static inline unsigned dim() { + return N; + } + + // various useful methods + + inline value_type norm() const { + return (T)sqrt((float)squareNorm()); + } + + inline value_type squareNorm() const { + return (*this) * (*this); + } + + inline Vec& normalize() { + value_type n = norm(); + for (unsigned i = 0; i < N; i++) + this->_coord[i] /= n; + return *this; + } + + inline Vec& normalizeSafe() { + value_type n = norm(); + if (n) + for (unsigned i=0; i < N; i++) + this->_coord[i] /= n; + return *this; + } + + // classical operators + inline Vec operator+(const Vec& v) const{ + Vec res(v); + res += *this; + return res; + } + + inline Vec operator-(const Vec& v) const{ + Vec res(*this); + res -= v; + return res; + } + + inline Vec operator*(const typename Vec::value_type r) const{ + Vec res(*this); + res *= r; + return res; + } + + inline Vec operator/(const typename Vec::value_type r) const{ + Vec res(*this); + if (r) + res /= r; + return res; + } + + // dot product + inline value_type operator*(const Vec& v) const{ + value_type sum = 0; + for (unsigned i = 0; i < N; i++) + sum += (*this)[i] * v[i]; + return sum; + } + + template + inline Vec& operator=(const Vec& v) { + if (this != &v) + for (unsigned i = 0; i < N; i++) + this->_coord[i] = (T)v[i]; + return *this; + } + + template + inline Vec& operator+=(const Vec& v) { + for (unsigned i = 0 ; i < N; i++) + this->_coord[i] += (T)v[i]; + return *this; + } + + template + inline Vec& operator-=(const Vec& v) { + for (unsigned i = 0 ; i < N; i++) + this->_coord[i] -= (T)v[i]; + return *this; + } + + template + inline Vec& operator*=(const U r) { + for (unsigned i = 0 ; i < N; i++) + this->_coord[i] *= r; + return *this; + } + + template + inline Vec& operator/=(const U r) { + if (r) + for (unsigned i = 0 ; i < N; i++) + this->_coord[i] /= r; + return *this; + } + + + inline bool operator==(const Vec& v) const { + for(unsigned i = 0; i < N; i++) + if (this->_coord[i] != v[i]) + return false; + return true; + } + + inline bool operator!=(const Vec& v) const { + for(unsigned i = 0; i < N; i++) + if (this->_coord[i] != v[i]) + return true; + return false; + } + + inline bool operator<(const Vec& v) const { + for (unsigned i = 0; i_coord[i] < v[i]) + return true; + if (this->_coord[i] > v[i]) + return false; + if (this->_coord[i] == v[i]) + continue; + } + return false; + } + + inline bool operator>(const Vec& v) const { + for (unsigned i=0; i_coord[i] > v[i]) + return true; + if(this->_coord[i] < v[i]) + return false; + if(this->_coord[i] == v[i]) + continue; + } + return false; + } + + protected: + + value_type _coord[N]; + enum { + _dim = N, + }; + }; + + + // + // Vec2 class (2D Vector) + // - T: value type + // + ///////////////////////////////////////////////////////////////////////////// + + template + class Vec2 : public Vec + { + public: + + typedef typename Vec::value_type value_type; + + inline Vec2() : Vec() {} + + template + explicit inline Vec2(const U tab[2]) : Vec(tab) {} + + template + explicit inline Vec2(const std::vector& tab) : Vec(tab) {} + + template + inline Vec2(const Vec& v) : Vec(v) {} + + inline Vec2(const value_type x, + const value_type y = 0) : Vec() { + this->_coord[0] = (T)x; + this->_coord[1] = (T)y; + } + + inline value_type x() const { + return this->_coord[0]; + } + + inline value_type& x() { + return this->_coord[0]; + } + + inline value_type y() const { + return this->_coord[1]; + } + + inline value_type& y() { + return this->_coord[1]; + } + + inline void setX(const value_type v) { + this->_coord[0] = v; + } + + inline void setY(const value_type v) { + this->_coord[1] = v; + } + + // FIXME: hack swig -- no choice + inline Vec2 operator+(const Vec2& v) const{ + Vec2 res(v); + res += *this; + return res; + } + + inline Vec2 operator-(const Vec2& v) const{ + Vec2 res(*this); + res -= v; + return res; + } + + inline Vec2 operator*(const value_type r) const{ + Vec2 res(*this); + res *= r; + return res; + } + + inline Vec2 operator/(const value_type r) const{ + Vec2 res(*this); + if (r) + res /= r; + return res; + } + + // dot product + inline value_type operator*(const Vec2& v) const{ + value_type sum = 0; + for (unsigned i = 0; i < 2; i++) + sum += (*this)[i] * v[i]; + return sum; + } + }; + + + // + // HVec3 class (3D Vector in homogeneous coordinates) + // - T: value type + // + ///////////////////////////////////////////////////////////////////////////// + + template + class HVec3 : public Vec + { + public: + + typedef typename Vec::value_type value_type; + + inline HVec3() : Vec() {} + + template + explicit inline HVec3(const U tab[4]) : Vec(tab) {} + + template + explicit inline HVec3(const std::vector& tab) : Vec(tab) {} + + template + inline HVec3(const Vec& v) : Vec(v) {} + + inline HVec3(const value_type sx, + const value_type sy = 0, + const value_type sz = 0, + const value_type s = 1) { + this->_coord[0] = sx; + this->_coord[1] = sy; + this->_coord[2] = sz; + this->_coord[3] = s; + } + + template + inline HVec3(const Vec& sv, + const U s = 1) { + this->_coord[0] = (T)sv[0]; + this->_coord[1] = (T)sv[1]; + this->_coord[2] = (T)sv[2]; + this->_coord[3] = (T)s; + } + + inline value_type sx() const { + return this->_coord[0]; + } + + inline value_type& sx() { + return this->_coord[0]; + } + + inline value_type sy() const { + return this->_coord[1]; + } + + inline value_type& sy() { + return this->_coord[1]; + } + + inline value_type sz() const { + return this->_coord[2]; + } + + inline value_type& sz() { + return this->_coord[2]; + } + + inline value_type s() const { + return this->_coord[3]; + } + + inline value_type& s() { + return this->_coord[3]; + } + + // Acces to non-homogeneous coordinates in 3D + + inline value_type x() const { + return this->_coord[0] / this->_coord[3]; + } + + inline value_type y() const { + return this->_coord[1] / this->_coord[3]; + } + + inline value_type z() const { + return this->_coord[2] / this->_coord[3]; + } + }; + + + // + // Vec3 class (3D Vec) + // - T: value type + // + ///////////////////////////////////////////////////////////////////////////// + + template + class Vec3 : public Vec + { + public: + + typedef typename Vec::value_type value_type; + + inline Vec3() : Vec() {} + + template + explicit inline Vec3(const U tab[3]) : Vec(tab) {} + + template + explicit inline Vec3(const std::vector& tab) : Vec(tab) {} + + template + inline Vec3(const Vec& v) : Vec(v) {} + + template + inline Vec3(const HVec3& v) { + this->_coord[0] = (T)v.x(); + this->_coord[1] = (T)v.y(); + this->_coord[2] = (T)v.z(); + } + + inline Vec3(const value_type x, + const value_type y = 0, + const value_type z = 0) : Vec() { + this->_coord[0] = x; + this->_coord[1] = y; + this->_coord[2] = z; + } + + inline value_type x() const { + return this->_coord[0]; + } + + inline value_type& x() { + return this->_coord[0]; + } + + inline value_type y() const { + return this->_coord[1]; + } + + inline value_type& y() { + return this->_coord[1]; + } + + inline value_type z() const { + return this->_coord[2]; + } + + inline value_type& z() { + return this->_coord[2]; + } + + inline void setX(const value_type v) { + this->_coord[0] = v; + } + + inline void setY(const value_type v) { + this->_coord[1] = v; + } + + inline void setZ(const value_type v) { + this->_coord[2] = v; + } + + // classical operators + // FIXME: hack swig -- no choice + inline Vec3 operator+(const Vec3& v) const{ + Vec3 res(v); + res += *this; + return res; + } + + inline Vec3 operator-(const Vec3& v) const{ + Vec3 res(*this); + res -= v; + return res; + } + + inline Vec3 operator*(const value_type r) const{ + Vec3 res(*this); + res *= r; + return res; + } + + inline Vec3 operator/(const value_type r) const{ + Vec3 res(*this); + if (r) + res /= r; + return res; + } + + // dot product + inline value_type operator*(const Vec3& v) const{ + value_type sum = 0; + for (unsigned i = 0; i < 3; i++) + sum += (*this)[i] * v[i]; + return sum; + } + + // cross product for 3D Vectors + // FIXME: hack swig -- no choice + inline Vec3 operator^(const Vec3& v) const{ + Vec3 res((*this)[1] * v[2] - (*this)[2] * v[1], + (*this)[2] * v[0] - (*this)[0] * v[2], + (*this)[0] * v[1] - (*this)[1] * v[0]); + return res; + } + + // cross product for 3D Vectors + template + inline Vec3 operator^(const Vec& v) const{ + Vec3 res((*this)[1] * v[2] - (*this)[2] * v[1], + (*this)[2] * v[0] - (*this)[0] * v[2], + (*this)[0] * v[1] - (*this)[1] * v[0]); + return res; + } + }; + + + // + // Matrix class + // - T: value type + // - M: rows + // - N: cols + // + ///////////////////////////////////////////////////////////////////////////// + + // Dirty, but icc under Windows needs this +# define _SIZE (M * N) + + template + class Matrix + { + public: + + typedef T value_type; + + inline Matrix() { + for (unsigned i = 0; i < _SIZE; i++) + this->_coord[i] = 0; + } + + ~Matrix() { + Internal::is_false<(M == 0)>::ensure(); + Internal::is_false<(N == 0)>::ensure(); + } + + template + explicit inline Matrix(const U tab[_SIZE]) { + for (unsigned i = 0; i < _SIZE; i++) + this->_coord[i] = tab[i]; + } + + template + explicit inline Matrix(const std::vector& tab) { + for (unsigned i = 0; i < _SIZE; i++) + this->_coord[i] = tab[i]; + } + + template + inline Matrix(const Matrix& m) { + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] = (T)m(i, j); + } + + inline value_type operator()(const unsigned i, const unsigned j) const { + return this->_coord[i * N + j]; + } + + inline value_type& operator()(const unsigned i, const unsigned j) { + return this->_coord[i * N + j]; + } + + static inline unsigned rows() { + return M; + } + + static inline unsigned cols() { + return N; + } + + inline Matrix& transpose() const { + Matrix res; + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + res(j,i) = this->_coord[i * N + j]; + return res; + } + + template + inline Matrix& operator=(const Matrix& m) { + if (this != &m) + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] = (T)m(i, j); + return *this; + } + + template + inline Matrix& operator+=(const Matrix& m) { + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] += (T)m(i, j); + return *this; + } + + template + inline Matrix& operator-=(const Matrix& m) { + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] -= (T)m(i, j); + return *this; + } + + template + inline Matrix& operator*=(const U lambda) { + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] *= lambda; + return *this; + } + + template + inline Matrix& operator/=(const U lambda) { + if (lambda) + for (unsigned i = 0; i < M; i++) + for (unsigned j = 0; j < N; j++) + this->_coord[i * N + j] /= lambda; + return *this; + } + + protected: + + value_type _coord[_SIZE]; + }; + + + // + // SquareMatrix class + // - T: value type + // - N: rows & cols + // + ///////////////////////////////////////////////////////////////////////////// + + // Dirty, but icc under Windows needs this +# define __SIZE (N * N) + + template + class SquareMatrix : public Matrix + { + public: + + typedef T value_type; + + inline SquareMatrix() : Matrix() {} + + template + explicit inline SquareMatrix(const U tab[__SIZE]) : Matrix(tab) {} + + template + explicit inline SquareMatrix(const std::vector& tab) : Matrix(tab) {} + + template + inline SquareMatrix(const Matrix& m) : Matrix(m) {} + + static inline SquareMatrix identity() { + SquareMatrix res; + for (unsigned i = 0; i < N; i++) + res(i, i) = 1; + return res; + } + }; + + + // + // Vector external functions + // + ///////////////////////////////////////////////////////////////////////////// + + // template + // inline Vec operator+(const Vec& v1, + // const Vec& v2) { + // Vec res(v1); + // res += v2; + // return res; + // } + // + // template + // inline Vec operator-(const Vec& v1, + // const Vec& v2) { + // Vec res(v1); + // res -= v2; + // return res; + // } + // template + // inline Vec operator*(const Vec& v, + // const typename Vec::value_type r) { + // Vec res(v); + // res *= r; + // return res; + // } + + template + inline Vec operator*(const typename Vec::value_type r, + const Vec& v) { + Vec res(v); + res *= r; + return res; + } + // + // template + // inline Vec operator/(const Vec& v, + // const typename Vec::value_type r) { + // Vec res(v); + // if (r) + // res /= r; + // return res; + // } + // + // dot product + // template + // inline typename Vec::value_type operator*(const Vec& v1, + // const Vec& v2) { + // typename Vec::value_type sum = 0; + // for (unsigned i = 0; i < N; i++) + // sum += v1[i] * v2[i]; + // return sum; + // } + // + // // cross product for 3D Vectors + // template + // inline Vec3 operator^(const Vec& v1, + // const Vec& v2) { + // Vec3 res(v1[1] * v2[2] - v1[2] * v2[1], + // v1[2] * v2[0] - v1[0] * v2[2], + // v1[0] * v2[1] - v1[1] * v2[0]); + // return res; + // } + + // stream operator + template + inline std::ostream& operator<<(std::ostream& s, + const Vec& v) { + unsigned i; + s << "["; + for (i = 0; i < N - 1; i++) + s << v[i] << ", "; + s << v[i] << "]"; + return s; + } + + + // + // Matrix external functions + // + ///////////////////////////////////////////////////////////////////////////// + + template + inline Matrix + operator+(const Matrix& m1, + const Matrix& m2) { + Matrix res(m1); + res += m2; + return res; + } + + template + inline Matrix + operator-(const Matrix& m1, + const Matrix& m2) { + Matrix res(m1); + res -= m2; + return res; + } + + template + inline Matrix + operator*(const Matrix& m1, + const typename Matrix::value_type lambda) { + Matrix res(m1); + res *= lambda; + return res; + } + + template + inline Matrix + operator*(const typename Matrix::value_type lambda, + const Matrix& m1) { + Matrix res(m1); + res *= lambda; + return res; + } + + template + inline Matrix + operator/(const Matrix& m1, + const typename Matrix::value_type lambda) { + Matrix res(m1); + res /= lambda; + return res; + } + + template + inline Matrix + operator*(const Matrix& m1, + const Matrix& m2) { + unsigned i, j, k; + Matrix res; + typename Matrix::value_type scale; + + for (j = 0; j < P; j++) { + for (k = 0; k < N; k++) { + scale = m2(k, j); + for (i = 0; i < N; i++) + res(i, j) += m1(i, k) * scale; + } + } + return res; + } + + template + inline Vec + operator*(const Matrix& m, + const Vec& v) { + + Vec res; + typename Matrix::value_type scale; + + for (unsigned j = 0; j < M; j++) { + scale = v[j]; + for (unsigned i = 0; i < N; i++) + res[i] += m(i, j) * scale; + } + return res; + } + + // stream operator + template + inline std::ostream& operator<<(std::ostream& s, + const Matrix& m) { + unsigned i, j; + for (i = 0; i < M; i++) { + s << "["; + for (j = 0; j < N - 1; j++) + s << m(i, j) << ", "; + s << m(i, j) << "]" << std::endl; + } + return s; + } + +} // end of namespace VecMat + +#endif // VECMAT_H diff --git a/extern/freestyle/src/geometry/geometry.pro b/extern/freestyle/src/geometry/geometry.pro new file mode 100755 index 00000000000..a63aa6483b4 --- /dev/null +++ b/extern/freestyle/src/geometry/geometry.pro @@ -0,0 +1,64 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib +TARGET = $${LIB_GEOMETRY} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_GEOMETRY_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../system + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} diff --git a/extern/freestyle/src/geometry/matrix_util.cpp b/extern/freestyle/src/geometry/matrix_util.cpp new file mode 100755 index 00000000000..2117b06e62f --- /dev/null +++ b/extern/freestyle/src/geometry/matrix_util.cpp @@ -0,0 +1,265 @@ +/* + * GXML/Graphite: Geometry and Graphics Programming Library + Utilities + * Copyright (C) 2000 Bruno Levy + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * If you modify this software, you should include a notice giving the + * name of the person performing the modification, the date of modification, + * and the reason for such modification. + * + * Contact: Bruno Levy + * + * levy@loria.fr + * + * ISA Project + * LORIA, INRIA Lorraine, + * Campus Scientifique, BP 239 + * 54506 VANDOEUVRE LES NANCY CEDEX + * FRANCE + * + * Note that the GNU General Public License does not permit incorporating + * the Software into proprietary programs. + */ + + +#include "matrix_util.h" +#include + + + +namespace OGF { + + namespace MatrixUtil { + + static const double EPS = 0.00001 ; + static int MAX_ITER = 100 ; + + void semi_definite_symmetric_eigen( + const double *mat, int n, double *eigen_vec, double *eigen_val + ) { + double *a,*v; + double a_norm,a_normEPS,thr,thr_nn; + int nb_iter = 0; + int jj; + int i,j,k,ij,ik,l,m,lm,mq,lq,ll,mm,imv,im,iq,ilv,il,nn; + int *index; + double a_ij,a_lm,a_ll,a_mm,a_im,a_il; + double a_lm_2; + double v_ilv,v_imv; + double x; + double sinx,sinx_2,cosx,cosx_2,sincos; + double delta; + + // Number of entries in mat + + nn = (n*(n+1))/2; + + // Step 1: Copy mat to a + + a = new double[nn]; + + for( ij=0; ij a_normEPS && nb_iter < MAX_ITER ) { + + nb_iter++; + thr_nn = thr / nn; + + for( l=1 ; l< n; l++ ) { + for( m=l+1; m<=n; m++ ) { + + // compute sinx and cosx + + lq = (l*l-l)/2; + mq = (m*m-m)/2; + + lm = l+mq; + a_lm = a[lm]; + a_lm_2 = a_lm*a_lm; + + if( a_lm_2 < thr_nn ) { + continue ; + } + + ll = l+lq; + mm = m+mq; + a_ll = a[ll]; + a_mm = a[mm]; + + delta = a_ll - a_mm; + + if( delta == 0.0 ) { + x = - M_PI/4 ; + } else { + x = - atan( (a_lm+a_lm) / delta ) / 2.0 ; + } + + sinx = sin(x) ; + cosx = cos(x) ; + sinx_2 = sinx*sinx; + cosx_2 = cosx*cosx; + sincos = sinx*cosx; + + // rotate L and M columns + + ilv = n*(l-1); + imv = n*(m-1); + + for( i=1; i<=n;i++ ) { + if( (i!=l) && (i!=m) ) { + iq = (i*i-i)/2; + + if( i l0) { + ogf_swap(l0 , l1 ) ; + ogf_swap(i_[0], i_[1]) ; + } + if(l2 > l1) { + ogf_swap(l1 , l2 ) ; + ogf_swap(i_[1], i_[2]) ; + } + if(l1 > l0) { + ogf_swap(l0 , l1 ) ; + ogf_swap(i_[0],i_[1]) ; + } + + } + + void NormalCycle::accumulate_dihedral_angle( + const Vec3r& edge, double beta, double neigh_area + ) { + Vec3r e = edge ; + e.normalize() ; + + double s = edge.norm() * beta * neigh_area ; + + M_[0] += s * e.x() * e.x() ; + M_[1] += s * e.x() * e.y() ; + M_[2] += s * e.y() * e.y() ; + M_[3] += s * e.x() * e.z() ; + M_[4] += s * e.y() * e.z() ; + M_[5] += s * e.z() * e.z() ; + } + +//_________________________________________________________ + +} diff --git a/extern/freestyle/src/geometry/normal_cycle.h b/extern/freestyle/src/geometry/normal_cycle.h new file mode 100755 index 00000000000..41fbf7b3fab --- /dev/null +++ b/extern/freestyle/src/geometry/normal_cycle.h @@ -0,0 +1,97 @@ +/* + * OGF/Graphite: Geometry and Graphics Programming Library + Utilities + * Copyright (C) 2000 Bruno Levy + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * If you modify this software, you should include a notice giving the + * name of the person performing the modification, the date of modification, + * and the reason for such modification. + * + * Contact: Bruno Levy + * + * levy@loria.fr + * + * ISA Project + * LORIA, INRIA Lorraine, + * Campus Scientifique, BP 239 + * 54506 VANDOEUVRE LES NANCY CEDEX + * FRANCE + * + * Note that the GNU General Public License does not permit incorporating + * the Software into proprietary programs. + */ + +#ifndef __MESH_TOOLS_MATH_NORMAL_CYCLE__ +#define __MESH_TOOLS_MATH_NORMAL_CYCLE__ + +# include "../system/FreestyleConfig.h" +# include "Geom.h" +using namespace Geometry; + +namespace OGF { + +template inline void ogf_swap(T& x, T& y) { + T z = x ; + x = y ; + y = z ; + } + +//_________________________________________________________ + + /** + * NormalCycle evaluates the curvature tensor in function + * of a set of dihedral angles and associated vectors. + * Reference: + * Restricted Delaunay Triangulation and Normal Cycle, + * D. Cohen-Steiner and J.M. Morvan, + * SOCG 2003 + */ + class LIB_GEOMETRY_EXPORT NormalCycle { + public: + NormalCycle() ; + void begin() ; + void end() ; + /** + * Note: the specified edge vector needs to be pre-clipped + * by the neighborhood. + */ + void accumulate_dihedral_angle( + const Vec3r& edge, real angle, real neigh_area = 1.0 + ) ; + const Vec3r& eigen_vector(int i) const { return axis_[i_[i]] ; } + real eigen_value(int i) const { return eigen_value_[i_[i]] ; } + + const Vec3r& N() const { return eigen_vector(2) ; } + const Vec3r& Kmax() const { return eigen_vector(1) ; } + const Vec3r& Kmin() const { return eigen_vector(0) ; } + + real n() const { return eigen_value(2) ; } + real kmax() const { return eigen_value(1) ; } + real kmin() const { return eigen_value(0) ; } + + private: + real center_[3] ; + Vec3r axis_[3] ; + real eigen_value_[3] ; + real M_[6] ; + int i_[3] ; + } ; + +//_________________________________________________________ + +} + +#endif diff --git a/extern/freestyle/src/geometry/src.pri b/extern/freestyle/src/geometry/src.pri new file mode 100755 index 00000000000..a35760fe892 --- /dev/null +++ b/extern/freestyle/src/geometry/src.pri @@ -0,0 +1,33 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +GEOMETRY_DIR = ../geometry + +SOURCES *= $${GEOMETRY_DIR}/GeomCleaner.cpp \ + $${GEOMETRY_DIR}/GeomUtils.cpp \ + $${GEOMETRY_DIR}/Grid.cpp \ + $${GEOMETRY_DIR}/FastGrid.cpp \ + $${GEOMETRY_DIR}/HashGrid.cpp \ + $${GEOMETRY_DIR}/FitCurve.cpp \ + $${GEOMETRY_DIR}/Bezier.cpp \ + $${GEOMETRY_DIR}/Noise.cpp \ + $${GEOMETRY_DIR}/matrix_util.cpp \ + $${GEOMETRY_DIR}/normal_cycle.cpp + +HEADERS *= $${GEOMETRY_DIR}/BBox.h \ + $${GEOMETRY_DIR}/FastGrid.h \ + $${GEOMETRY_DIR}/Geom.h \ + $${GEOMETRY_DIR}/GeomCleaner.h \ + $${GEOMETRY_DIR}/GeomUtils.h \ + $${GEOMETRY_DIR}/Grid.h \ + $${GEOMETRY_DIR}/HashGrid.h \ + $${GEOMETRY_DIR}/Polygon.h \ + $${GEOMETRY_DIR}/SweepLine.h \ + $${GEOMETRY_DIR}/FitCurve.h \ + $${GEOMETRY_DIR}/Bezier.h \ + $${GEOMETRY_DIR}/Noise.h \ + $${GEOMETRY_DIR}/VecMat.h \ + $${GEOMETRY_DIR}/matrix_util.h \ + $${GEOMETRY_DIR}/normal_cycle.h diff --git a/extern/freestyle/src/image/GaussianFilter.cpp b/extern/freestyle/src/image/GaussianFilter.cpp new file mode 100755 index 00000000000..97c2aedc62e --- /dev/null +++ b/extern/freestyle/src/image/GaussianFilter.cpp @@ -0,0 +1,96 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "GaussianFilter.h" +#include + +GaussianFilter::GaussianFilter(float iSigma ) +{ + _sigma = iSigma; + _mask = 0; + computeMask(); +} + +GaussianFilter::GaussianFilter(const GaussianFilter& iBrother) +{ + _sigma = iBrother._sigma; + _maskSize = iBrother._maskSize; + _bound = iBrother._bound; + _storedMaskSize = iBrother._storedMaskSize; + _mask = new float[_maskSize*_maskSize]; + memcpy(_mask, iBrother._mask, _maskSize*_maskSize*sizeof(float)); +} + + +GaussianFilter& GaussianFilter::operator= (const GaussianFilter& iBrother) +{ + _sigma = iBrother._sigma; + _maskSize = iBrother._maskSize; + _bound = iBrother._bound; + _storedMaskSize = iBrother._storedMaskSize; + _mask = new float[_storedMaskSize*_storedMaskSize]; + memcpy(_mask, iBrother._mask, _storedMaskSize*_storedMaskSize*sizeof(float)); + return *this; +} + + +GaussianFilter::~GaussianFilter() +{ + if(0!=_mask) + { + delete [] _mask; + } +} + +int GaussianFilter::computeMaskSize(float sigma) +{ + int maskSize = (int)floor(4*sigma)+1; + if(0 == maskSize%2) + ++maskSize; + + return maskSize; +} + +void GaussianFilter::SetSigma(float sigma) +{ + _sigma = sigma; + computeMask(); +} + +void GaussianFilter::computeMask() +{ + if(0 != _mask){ + delete [] _mask; + } + + _maskSize = computeMaskSize(_sigma); + _storedMaskSize = (_maskSize+1)>>1; + _bound = _storedMaskSize-1; + + float norm = _sigma*_sigma*2.f*M_PI; + float invNorm = 1.0/norm; + _mask = new float[_storedMaskSize*_storedMaskSize*sizeof(float)]; + for(int i=0; i<_storedMaskSize; ++i) + for(int j=0; j<_storedMaskSize; ++j) + _mask[i*_storedMaskSize+j] = invNorm*exp(-(i*i + j*j)/(2.0*_sigma*_sigma)); + //_mask[i*_storedMaskSize+j] = exp(-(i*i + j*j)/(2.0*_sigma*_sigma)); +} + diff --git a/extern/freestyle/src/image/GaussianFilter.h b/extern/freestyle/src/image/GaussianFilter.h new file mode 100755 index 00000000000..c75177541d3 --- /dev/null +++ b/extern/freestyle/src/image/GaussianFilter.h @@ -0,0 +1,144 @@ +// +// Filename : Image.h +// Author(s) : Stephane Grabli +// Purpose : Class to perform gaussian filtering operations on an image +// Date of creation : 20/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GAUSSIANFILTER_H +# define GAUSSIANFILTER_H + +#include "../system/FreestyleConfig.h" + +class LIB_IMAGE_EXPORT GaussianFilter{ +protected: + /* the mask is a symetrical 2d array (with respect + to the middle point). + Thus, M(i,j) = M(-i,j) = M(i,-j) = M(-i,-j). + For this reason, to represent a NxN array (N odd), we only store + a ((N+1)/2)x((N+1)/2) array. + */ + float _sigma; + float *_mask; + int _bound; + int _maskSize; // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + int _storedMaskSize; //(_maskSize+1)/2) + +public: + GaussianFilter(float iSigma = 1.f) ; + GaussianFilter(const GaussianFilter&) ; + GaussianFilter& operator= (const GaussianFilter&) ; + virtual ~GaussianFilter() ; + + /*! Returns the value for pixel x,y of image "map" after a gaussian blur, + * made using the sigma value. + * The sigma value determines the mask size (~ 2 x sigma). + * \param map + * The image we wish to work on. The Map template must implement the + * foloowing methods: + * - float pixel(unsigned int x,unsigned int y) const; + * - unsigned width() const; + * - unsigned height() const; + * \param x + * The abscissa of the pixel where we want to evaluate the gaussian blur. + * \param y + * The ordinate of the pixel where we want to evaluate the gaussian blur. + * \param sigma + * The sigma value of the gaussian function. + */ + template + float getSmoothedPixel(Map * map, int x, int y) ; + + /*! Compute the mask size and returns the REAL mask size ((2*_maskSize)-1) + * This method is provided for convenience. + */ + static int computeMaskSize(float sigma) ; + + /*! accessors */ + inline float sigma() const {return _sigma;} + inline int maskSize() const {return _maskSize;} + inline int getBound() {return _bound;} + + /*! modifiers */ + void SetSigma(float sigma) ; + // void SetMaskSize(int size) {_maskSize = size;_storedMaskSize=(_maskSize+1)>>1;} + + +protected: + void computeMask(); +}; + +/* + + ############################################# + ############################################# + ############################################# + ###### ###### + ###### I M P L E M E N T A T I O N ###### + ###### ###### + ############################################# + ############################################# + ############################################# + +*/ + + +#include + +#ifdef __MACH__ +#define sqrtf(x) (sqrt(x)) +#endif + +template +float GaussianFilter::getSmoothedPixel(Map * map, int x, int y) +{ + float sum = 0.f; + float L=0.f; + unsigned w=map->width(); + unsigned h=map->height(); + + // Current pixel is x,y + // Sum surrounding pixels L value: + for(int i=-_bound; i<=_bound; ++i) + { + if((y+i < 0) || (y+i >= h)) + continue; + for(int j=-_bound; j<=_bound; ++j) + { + if((x+j < 0) || (x+j >= w)) + continue; + + float tmpL = map->pixel(x+j,y+i); + float m = _mask[abs(i)*_storedMaskSize+abs(j)]; + L += m*tmpL; + sum += m; + } + } + //L /= sum; + return L; +} + + +#endif // GAUSSIANFILTER diff --git a/extern/freestyle/src/image/Image.h b/extern/freestyle/src/image/Image.h new file mode 100755 index 00000000000..83d6785e32f --- /dev/null +++ b/extern/freestyle/src/image/Image.h @@ -0,0 +1,389 @@ +// +// Filename : Image.h +// Author(s) : Stephane Grabli +// Purpose : Class to encapsulate an array of RGB or Gray level values +// Date of creation : 20/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef IMAGE_H +# define IMAGE_H + +# include // for memcpy + +// +// Image base class, for all types of images +// +/////////////////////////////////////////////////////////////////////////////// + +/*! This class allows the storing of part of an image, + * while allowing a normal access to its pixel values. + * You can for example only a rectangle of sw*sh, whose + * lower-left corner is at (ox, oy), of an image of + * size w*h, and access these pixels using x,y coordinates + * specified in the whole image coordinate system. + */ +class Image +{ + public: + + /*! Default constructor */ + Image() { + _storedWidth = 0; + _storedHeight = 0; + _width = 0; + _height = 0; + _Ox = 0; + _Oy = 0; + } + + /*! Copy constructor */ + Image(const Image& brother) { + _storedWidth = brother._storedWidth; + _storedHeight = brother._storedHeight; + _width = brother._width; + _height = brother._height; + _Ox = brother._Ox; + _Oy = brother._Oy; + } + + /*! Builds an image from its width and height. + * The memory is allocated consequently. + */ + Image(unsigned w, unsigned h) { + _width = w; + _height = h; + _storedWidth = w; + _storedHeight = h; + _Ox = 0; + _Oy = 0; + } + + /*! Builds a partial-storing image. + * \param w + * The width of the complete image + * \param h + * The height of the complete image + * \param sw + * The width of the rectangle that will actually + * be stored. + * \param sh + * The height of the rectangle that will actually + * be stored. + * \param ox + * The x-abscissa of the origin of the rectangle that will actually + * be stored. + * \param oy + * The x-abscissa of the origin of the rectangle that will actually + * be stored. + */ + Image(unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) { + _width = w; + _height = h; + _storedWidth = sw; + _storedHeight = sh; + _Ox = ox; + _Oy = oy; + } + + /*! Operator= */ + Image& operator=(const Image& brother) { + _width = brother._width; + _height = brother._height; + _storedWidth = brother._storedWidth; + _storedHeight = brother._storedHeight; + _Ox = brother._Ox; + _Oy = brother._Oy; + return* this; + } + + /*! Destructor */ + virtual ~Image() {} + + /*! Returns the width of the complete image */ + inline unsigned width() const { + return _width; + } + /*! Returns the height of the complete image */ + inline unsigned height() const { + return _height; + } + + /*! Returns the grey value for pixel x,y */ + virtual float pixel(unsigned x, unsigned y) const = 0; + + /*! Sets the array. + * \param array + * The array containing the values we wish to store. + * Its size is sw*sh. + * \param width + * The width of the complete image + * \param height + * The height of the complete image + * \param sw + * The width of the rectangle that will actually + * be stored. + * \param sh + * The height of the rectangle that will actually + * be stored. + * \param ox + * The x-abscissa of the origin of the rectangle that will actually + * be stored. + * \param oy + * The x-abscissa of the origin of the rectangle that will actually + * be stored. + * \param copy + * If true, the array is copied, otherwise the pointer is + * copied + */ + virtual void setArray(float* array, unsigned width, unsigned height, unsigned sw, unsigned sh, unsigned x, unsigned y, bool copy = true) = 0; + + /*! Returns the array containing the pixels values. + * Its size is sw*sh, i.e. potentially a smaller + * rectangular part of the complete image. + */ + virtual float * getArray() = 0; + + protected: + + unsigned _width; + unsigned _height; + unsigned _storedWidth; + unsigned _storedHeight; + unsigned _Ox; // origin of the stored part + unsigned _Oy; // origin of the stored part +}; + + +// +// RGBImage +// +/////////////////////////////////////////////////////////////////////////////// + +class RGBImage : public Image +{ + public: + + RGBImage() : Image() { + _rgb = 0; + } + + RGBImage(const RGBImage& brother) : Image(brother) { + _rgb = new float[3 * _storedWidth * _storedHeight]; + memcpy(_rgb, brother._rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); + } + + RGBImage(unsigned w, unsigned h) : Image(w, h) { + _rgb = new float[3 * _width * _height]; + } + + RGBImage(float* rgb, unsigned w, unsigned h) : Image(w, h) { + _rgb = new float[3 * _width * _height]; + memcpy(_rgb, rgb, 3 * _width * _height * sizeof(float)); + } + + /*! Builds an RGB partial image from the useful part buffer. + * \param rgb + * The array of size 3*sw*sh containing the RGB values + * of the sw*sh pixels we need to stored. + * These sw*sh pixels constitute a rectangular part of + * a bigger RGB image containing w*h pixels. + * \param w + * The width of the complete image + * \param h + * The height of the complete image + * \param sw + * The width of the part of the image we want to store and work on + * \param sh + * The height of the part of the image we want to store and work on + */ + RGBImage(float* rgb, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : Image(w, h, sw, sh, ox, oy) { + _rgb = new float[3 * _storedWidth * _storedHeight]; + memcpy(_rgb, rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); + } + + RGBImage& operator=(const RGBImage& brother) { + dynamic_cast(*this) = brother; + _rgb = new float[3 * _storedWidth * _storedHeight]; + memcpy(_rgb, brother._rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); + return* this; + } + + virtual ~RGBImage() { + if(_rgb) + delete[] _rgb; + } + + inline float getR(unsigned x, unsigned y) const { + return _rgb[3 * (y-_Oy) * _storedWidth + (x-_Ox) * 3]; + } + + inline float getG(unsigned x, unsigned y) const { + return _rgb[3 * (y-_Oy) * _storedWidth + (x-_Ox) * 3 + 1]; + } + + inline float getB(unsigned x, unsigned y) const { + return _rgb[3 * (y-_Oy) * _storedWidth + (x-_Ox) * 3 + 2]; + } + + virtual void setPixel(unsigned x, unsigned y, float r, float g, float b){ + float * tmp = &(_rgb[3 * (y-_Oy) * _storedWidth + (x-_Ox) * 3]); + *tmp = r;++tmp; + *tmp = g;++tmp; + *tmp = b; + } + + virtual float pixel(unsigned x, unsigned y) const { + float res = 0; + float* tmp = &(_rgb[3 * (y-_Oy) * _storedWidth + (x-_Ox) * 3]); + res += 11 * (*tmp++); + res += 16 * (*tmp++); + res += 5 * (*tmp); + return res / 32; + } + + /*! Sets the RGB array. + * copy + * If true, the array is copied, otherwise the pointer is + * copied + */ + virtual void setArray(float* rgb, unsigned width, unsigned height, unsigned sw, unsigned sh, unsigned x, unsigned y, bool copy = true) { + _width = width; + _height = height; + _storedWidth = sw; + _storedHeight = sh; + _Ox = x; + _Oy = y; + if(!copy) { + _rgb = rgb; + return; + } + + memcpy(_rgb, rgb, 3 * _storedWidth * _storedHeight* sizeof(float)); + } + + virtual float * getArray() {return _rgb;} + + protected: + + float* _rgb; +}; + + +// +// GrayImage +// +/////////////////////////////////////////////////////////////////////////////// + +class GrayImage : public Image +{ + public: + + GrayImage() : Image() { + _lvl = 0; + } + + GrayImage(const GrayImage& brother) : Image(brother) { + _lvl = new float[_storedWidth*_storedHeight]; + memcpy(_lvl, brother._lvl, _storedWidth*_storedHeight*sizeof(*_lvl)); + } + + /*! Builds an empty gray image */ + GrayImage(unsigned w, unsigned h) : Image(w, h) { + _lvl = new float[_width*_height]; + } + + GrayImage(float* lvl, unsigned w, unsigned h) : Image(w, h) { + _lvl = new float[_width*_height]; + memcpy(_lvl, lvl, _width*_height*sizeof(*_lvl)); + } + + /*! Builds a partial image from the useful part buffer. + * \param lvl + * The array of size sw*sh containing the gray values + * of the sw*sh pixels we need to stored. + * These sw*sh pixels constitute a rectangular part of + * a bigger gray image containing w*h pixels. + * \param w + * The width of the complete image + * \param h + * The height of the complete image + * \param sw + * The width of the part of the image we want to store and work on + * \param sh + * The height of the part of the image we want to store and work on + */ + GrayImage(float* lvl, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : Image(w, h, sw, sh, ox, oy) { + _lvl = new float[_storedWidth*_storedHeight]; + memcpy(_lvl, lvl, _storedWidth*_storedHeight*sizeof(float)); + } + + GrayImage& operator=(const GrayImage& brother) { + dynamic_cast(*this) = brother; + _lvl = new float[_storedWidth * _storedHeight]; + memcpy(_lvl, brother._lvl, _storedWidth * _storedHeight * sizeof(float)); + return *this; + } + + virtual ~GrayImage() { + if(_lvl) + delete[] _lvl; + } + + inline void setPixel(unsigned x, unsigned y, float v){ + _lvl[(y-_Oy) * _storedWidth+ (x-_Ox)] = v; + } + + inline float pixel(unsigned x, unsigned y) const { + return _lvl[(y-_Oy) * _storedWidth+ (x-_Ox)]; + } + + /*! Sets the array. + * copy + * If true, the array is copie, otherwise the pounsigneder is + * copied + */ + void setArray(float *lvl, unsigned width, unsigned height, unsigned sw, unsigned sh, unsigned x, unsigned y, bool copy = true) { + _width = width; + _height = height; + _storedWidth = sw; + _storedHeight = sh; + _Ox = x; + _Oy = y; + if(!copy) { + _lvl = lvl; + return; + } + + memcpy(_lvl, lvl, _storedWidth * _storedHeight * sizeof(float)); + } + /*! Returns the array containing the gray values. */ + virtual float * getArray() {return _lvl;} + + protected: + + float *_lvl; +}; + +#endif // IMAGE_H diff --git a/extern/freestyle/src/image/ImagePyramid.cpp b/extern/freestyle/src/image/ImagePyramid.cpp new file mode 100755 index 00000000000..45c02004d1c --- /dev/null +++ b/extern/freestyle/src/image/ImagePyramid.cpp @@ -0,0 +1,166 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "ImagePyramid.h" +#include "Image.h" +#include "GaussianFilter.h" +#include + +using namespace std; + +//ImagePyramid::ImagePyramid(const GrayImage& level0, unsigned nbLevels){ +// //BuildPyramid(level0,nbLevels); +//} + +ImagePyramid::ImagePyramid(const ImagePyramid& iBrother){ + if(!_levels.empty()){ + for(vector::iterator im=_levels.begin(), imend=_levels.end(); + im!=imend; + ++im){ + _levels.push_back(new GrayImage(**im)); + } + } +} +ImagePyramid::~ImagePyramid(){ + if(!_levels.empty()){ + for(vector::iterator im=_levels.begin(), imend=_levels.end(); + im!=imend; + ++im){ + delete (*im); + } + _levels.clear(); + } +} + +GrayImage * ImagePyramid::getLevel(int l){ + return _levels[l]; +} + +float ImagePyramid::pixel(int x, int y, int level){ + GrayImage *img = _levels[level]; + if(0 == level){ + return img->pixel(x,y); + } + int i = 1<>level; + int sy = y>>level; + if(sx >= img->width()) + sx = img->width()-1; + if(sy >= img->height()) + sy = img->height()-1; + + // bilinear interpolation + float A = i*(sx+1)-x; + float B = x-i*sx; + float C = i*(sy+1)-y; + float D = y-i*sy; + + float P1(0), P2(0); + P1 = A*img->pixel(sx,sy); + if(sx < img->width()-1){ + if(x%i != 0) + P1 += B*img->pixel(sx+1,sy); + }else{ + P1 += B*img->pixel(sx,sy); + } + if(syheight()-1){ + if(y%i != 0){ + P2 = A*img->pixel(sx,sy+1); + if(sx < img->width()-1){ + if(x%i != 0) + P2 += B*img->pixel(sx+1,sy+1); + }else{ + P2 += B*img->pixel(sx,sy+1); + } + } + }else{ + P2 = P1; + } + return (1.f/(float)(1<<2*level))*(C*P1 + D*P2); +} + +int ImagePyramid::width(int level){ + return _levels[level]->width(); +} + +int ImagePyramid::height(int level){ + return _levels[level]->height(); +} + +GaussianPyramid::GaussianPyramid(const GrayImage& level0, unsigned nbLevels, float iSigma) + : ImagePyramid() +{ + _sigma = iSigma; + BuildPyramid(level0,nbLevels); +} +GaussianPyramid::GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma) + : ImagePyramid() +{ + _sigma = iSigma; + BuildPyramid(level0,nbLevels); +} + +GaussianPyramid::GaussianPyramid(const GaussianPyramid& iBrother) +: ImagePyramid(iBrother){ + _sigma = iBrother._sigma; +} +void GaussianPyramid::BuildPyramid(const GrayImage& level0, unsigned nbLevels){ + GrayImage *pLevel = new GrayImage(level0); + BuildPyramid(pLevel, nbLevels); +} + +void GaussianPyramid::BuildPyramid(GrayImage* level0, unsigned nbLevels){ + GrayImage *pLevel = level0; + _levels.push_back(pLevel); + GaussianFilter gf(_sigma); + // build the nbLevels: + unsigned w = pLevel->width(); + unsigned h = pLevel->height(); + if(nbLevels!=0) + { + for(unsigned i=0; iwidth()>>1; + h = pLevel->height()>>1; + GrayImage *img = new GrayImage(w,h); + for(unsigned y=0; y(pLevel, 2*x,2*y); + img->setPixel(x,y,v); + } + } + _levels.push_back(img); + pLevel = img; + } + }else{ + while((w>1) && (h>1)){ + w = pLevel->width()>>1; + h = pLevel->height()>>1; + GrayImage *img = new GrayImage(w,h); + for(unsigned y=0; y(pLevel, 2*x,2*y); + img->setPixel(x,y,v); + } + } + _levels.push_back(img); + pLevel = img; + } + } +} diff --git a/extern/freestyle/src/image/ImagePyramid.h b/extern/freestyle/src/image/ImagePyramid.h new file mode 100755 index 00000000000..9e326757f02 --- /dev/null +++ b/extern/freestyle/src/image/ImagePyramid.h @@ -0,0 +1,92 @@ +// +// Filename : ImagePyramid.h +// Author(s) : Stephane Grabli +// Purpose : Class to represent a pyramid of images +// Date of creation : 25/12/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef IMAGEPYRAMID_H +# define IMAGEPYRAMID_H + +#include "../system/FreestyleConfig.h" +#include + +class GrayImage; +class LIB_IMAGE_EXPORT ImagePyramid{ +protected: + std::vector _levels; + +public: + ImagePyramid(){} + ImagePyramid(const ImagePyramid& iBrother); + //ImagePyramid(const GrayImage& level0, unsigned nbLevels); + virtual ~ImagePyramid(); + + /*! Builds the pyramid. + * must be overloaded by inherited classes. + * if nbLevels==0, the complete pyramid is built + */ + virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels) = 0; + + /*! Builds a pyramid without copying the base level */ + virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels) = 0; + + virtual GrayImage * getLevel(int l); + /*! Returns the pixel x,y using bilinear interpolation. + * \param x + * the abscissa specified in the finest level coordinate system + * \param y + * the ordinate specified in the finest level coordinate system + * \param level + * the level from which we want the pixel to be evaluated + */ + virtual float pixel(int x, int y, int level=0); + /*! Returns the width of the level-th level image */ + virtual int width(int level=0); + /*! Returns the height of the level-th level image */ + virtual int height(int level=0); + /*! Returns the number of levels in the pyramid */ + inline int getNumberOfLevels() const { return _levels.size();} +}; + +class LIB_IMAGE_EXPORT GaussianPyramid : public ImagePyramid +{ +protected: + float _sigma; +public: + GaussianPyramid(float iSigma=1.f) : ImagePyramid() {_sigma=iSigma;} + GaussianPyramid(const GrayImage& level0, unsigned nbLevels, float iSigma=1.f); + GaussianPyramid(GrayImage* level0, unsigned nbLevels, float iSigma=1.f); + GaussianPyramid(const GaussianPyramid& iBrother); + virtual ~GaussianPyramid(){} + + virtual void BuildPyramid(const GrayImage& level0, unsigned nbLevels); + virtual void BuildPyramid(GrayImage* level0, unsigned nbLevels); + /* accessors */ + inline float getSigma() const {return _sigma;} + /* modifiers */ + +}; +#endif // IMAGEPYRAMID_H diff --git a/extern/freestyle/src/image/image.pro b/extern/freestyle/src/image/image.pro new file mode 100755 index 00000000000..133b6cf4f35 --- /dev/null +++ b/extern/freestyle/src/image/image.pro @@ -0,0 +1,66 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_IMAGE} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll + +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_IMAGE_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../system + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} diff --git a/extern/freestyle/src/image/src.pri b/extern/freestyle/src/image/src.pri new file mode 100755 index 00000000000..c047929b49f --- /dev/null +++ b/extern/freestyle/src/image/src.pri @@ -0,0 +1,13 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +IMAGE_DIR = ../image + +SOURCES *= $${IMAGE_DIR}/GaussianFilter.cpp \ + $${IMAGE_DIR}/ImagePyramid.cpp + +HEADERS *= $${IMAGE_DIR}/Image.h \ + $${IMAGE_DIR}/GaussianFilter.h \ + $${IMAGE_DIR}/ImagePyramid.h diff --git a/extern/freestyle/src/libconfig.pri b/extern/freestyle/src/libconfig.pri new file mode 100755 index 00000000000..6fec8878694 --- /dev/null +++ b/extern/freestyle/src/libconfig.pri @@ -0,0 +1,110 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +contains( CONFIG, 3ds1.20 ) { + message ("Using 3ds 1.2.0 module") + linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX + linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds + cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.2.0 + cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.2.0/lib3ds -l3ds + mac:INCLUDEPATH *= /usr/local/include + mac:LIBS *= -l3ds + mac:QMAKE_LIBDIR *= /usr/local/lib + win32: INCLUDEPATH *= C:\include\lib3ds\1.2.0 + win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.2.0 + win32:debug: LIBS *= lib3ds-120sd.lib + win32:release: LIBS *= lib3ds-120s.lib +} + +contains( CONFIG, 3ds1.30 ) { + message ("Using 3ds 1.3.0 module") + linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE/LINUX + linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -l3ds + cygwin-g++:INCLUDEPATH *= /usr/lib/lib3ds-1.3.0 + cygwin-g++:LIBS *= -L/usr/lib/lib3ds-1.3.0/lib3ds -l3ds + mac:INCLUDEPATH *= /usr/local/include + mac:LIBS *= -l3ds + mac:QMAKE_LIBDIR *= /usr/local/lib + win32: INCLUDEPATH *= C:\include\lib3ds\1.3.0 + win32: QMAKE_LIBDIR *= C:\lib\lib3ds\1.3.0 + win32:debug: LIBS *= lib3ds-1_3d.lib + win32:release: LIBS *= lib3ds-1_3.lib +} + +contains( CONFIG, qglviewer ) { + message ("Using QGLViewer module") + CONFIG *= qt thread opengl glut + linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE + linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer + cygwin-g++:LIBS *= -lQGLViewer + win32: INCLUDEPATH *= $(HOME)\INCLUDE + win32: QMAKE_LIBDIR *= $(HOME)\LIB + win32: LIBS *= QGLViewer.lib +} + +contains( CONFIG, python2.3) { + message ("Using python 2.3 module") + linux-g++:INCLUDEPATH *= /usr/include/python2.3 + linux-g++:LIBS *= -lpthread -lm -lutil + linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.3 -L$(HOME)/LIB/LINUX + win32: INCLUDEPATH *= C:\python23\include + win32: QMAKE_LIBDIR *= C:\python23\libs + win32: LIBS *= python23.lib +} + +contains( CONFIG, python2.4) { + message ("Using python 2.4 module") + linux-g++:INCLUDEPATH *= /usr/include/python2.4 + linux-g++:LIBS *= -lpthread -lm -lutil + linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.4 -L$(HOME)/LIB/LINUX + cygwin-g++:INCLUDEPATH *= /usr/include/python2.4 + cygwin-g++:LIBS *= -lpthread -lm -lutil + cygwin-g++:LIBS *= -L/usr/lib/python2.4/config -lpython2.4 + win32: INCLUDEPATH *= C:\python24\include + win32: QMAKE_LIBDIR *= C:\python24\libs + win32: LIBS *= python24.lib +} + +contains( CONFIG, python2.5) { + message ("Using python 2.5 module") + linux-g++:INCLUDEPATH *= /usr/include/python2.5 + linux-g++:LIBS *= -lpthread -lm -lutil + linux-g++:LIBS *= -L/usr/local/lib/ -lpython2.5 -L$(HOME)/LIB/LINUX + mac: INCLUDEPATH *= /usr/include/python2.5 + mac: LIBS *= -L/usr/lib/python2.5/config -lpython2.5 + cygwin-g++:INCLUDEPATH *= /usr/include/python2.5 + cygwin-g++:LIBS *= -lpthread -lm -lutil + cygwin-g++:LIBS *= -L/usr/lib/python2.5/config -lpython2.5 + win32: INCLUDEPATH *= C:\python25\include + win32: QMAKE_LIBDIR *= C:\python25\libs + win32: LIBS *= python25.lib +} + + +contains( CONFIG, glut) { + message ("Using glut module") + linux-g++:LIBS *= -lglut -lXi + cygwin-g++:LIBS *= -lglut -lXi + mac: LIBS *= -framework Glut + win32:INCLUDEPATH *= C:\include + win32: QMAKE_LIBDIR *= C:\lib\glut + win32: LIBS *= glut32.lib +} + +contains( CONFIG, qglviewer2 ) { + message ("Using QGLViewer module") + CONFIG *= qt thread opengl glut + linux-g++:INCLUDEPATH *= $(HOME)/INCLUDE + linux-g++:LIBS *= -L$(HOME)/LIB/LINUX -lQGLViewer + mac: LIBS *= -lQGLViewer + cygwin-g++:LIBS *= -lQGLViewer2 + win32: INCLUDEPATH *= C:\include\QGLViewer\2.2.5 + win32{ + release{ + QMAKE_LIBDIR *= C:\lib\QGLViewer\release + } + debug{ + QMAKE_LIBDIR *= C:\lib\QGLViewer\debug + } + } + win32: LIBS *= QGLViewer2.lib +} diff --git a/extern/freestyle/src/makedsp.vcnet.debug.bat b/extern/freestyle/src/makedsp.vcnet.debug.bat new file mode 100755 index 00000000000..e19ca52b4f7 --- /dev/null +++ b/extern/freestyle/src/makedsp.vcnet.debug.bat @@ -0,0 +1,25 @@ +@echo off +for /D %%d in (*) do call :FOR2 %%d +rem cd .. +goto :EOF + +:FOR2 +set componentpath=%1 +set dirname=%~n1 +for %%p in (%componentpath%\*.pro) do if exist %%p call :DSP %%p + +goto :EOF + +:DSP +set drive=%~d1 +set filepath=%~p1 +cd %drive%%filepath% +rem echo %drive%%filepath% +set filename=%~n1 +echo creating %filename%_d.vcproj from %filename%.pro ... +if %filename% == app ( + qmake -t vcapp -win32 -o %filename%_d %filename%.pro +) else ( + qmake -t vclib -win32 -o %filename%_d %filename%.pro +) +cd.. diff --git a/extern/freestyle/src/makedsp.vcnet.release.bat b/extern/freestyle/src/makedsp.vcnet.release.bat new file mode 100755 index 00000000000..3050a2fe4ea --- /dev/null +++ b/extern/freestyle/src/makedsp.vcnet.release.bat @@ -0,0 +1,25 @@ +@echo off +for /D %%d in (*) do call :FOR2 %%d +rem cd .. +goto :EOF + +:FOR2 +set componentpath=%1 +set dirname=%~n1 +for %%p in (%componentpath%\*.pro) do if exist %%p call :DSP %%p + +goto :EOF + +:DSP +set drive=%~d1 +set filepath=%~p1 +cd %drive%%filepath% +rem echo %drive%%filepath% +set filename=%~n1 +echo creating %filename%.vcproj from %filename%.pro ... +if %filename% == app ( + qmake -t vcapp -win32 -o %filename% %filename%.pro +) else ( + qmake -t vclib -win32 -o %filename% %filename%.pro +) +cd.. diff --git a/extern/freestyle/src/rendering/GLBBoxRenderer.cpp b/extern/freestyle/src/rendering/GLBBoxRenderer.cpp new file mode 100755 index 00000000000..464779d6a43 --- /dev/null +++ b/extern/freestyle/src/rendering/GLBBoxRenderer.cpp @@ -0,0 +1,108 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "GLBBoxRenderer.h" +#include "../scene_graph/IndexedFaceSet.h" +#include "../scene_graph/NodeDrawingStyle.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/NodeLight.h" +#include "../scene_graph/NodeTransform.h" + +#include "../scene_graph/Rep.h" +#include "../scene_graph/Node.h" + +void GLBBoxRenderer::visitIndexedFaceSet(IndexedFaceSet& iFaceSet) +{ + RenderRep(iFaceSet); +} + +void GLBBoxRenderer::visitNodeGroup(NodeGroup& iGroupNode) +{ + RenderNode(iGroupNode); +} + +void GLBBoxRenderer::visitNodeTransform(NodeTransform& iTransformNode) +{ + RenderNode(iTransformNode); +} + +void GLBBoxRenderer::visitDrawingStyle(DrawingStyle& iDrawingStyle) +{ + if(DrawingStyle::INVISIBLE == iDrawingStyle.style()) + return ; + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glEnable(GL_LINE_SMOOTH); + glPolygonMode(GL_FRONT, GL_LINE); + glLineWidth(1.f); + + glDisable(GL_LIGHTING); +} + +void GLBBoxRenderer::RenderRep(const Rep& iRep) const +{ + RenderBBox(iRep.bbox()); +} + +void GLBBoxRenderer::RenderNode(const Node& iNode) const +{ + RenderBBox(iNode.bbox()); +} + +void GLBBoxRenderer::RenderBBox(const BBox& iBox) const +{ + if(iBox.empty()) + return; + + Vec3r m = iBox.getMin(); + Vec3r M = iBox.getMax(); + + glColor3f(0.f, 0.f, 0.f); + glBegin(GL_LINE_LOOP); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], m[1], m[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], m[1], m[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], M[1], m[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], M[1], m[2]); + glEnd(); + + glBegin(GL_LINE_LOOP); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], m[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], m[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], M[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], M[1], M[2]); + glEnd(); + + glBegin(GL_LINE_LOOP); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], m[1], m[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], m[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], M[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(m[0], M[1], m[2]); + glEnd(); + + glBegin(GL_LINE_LOOP); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], m[1], m[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], m[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], M[1], M[2]); + ((GLBBoxRenderer*)(this))->glVertex3r(M[0], M[1], m[2]); + glEnd(); + +} diff --git a/extern/freestyle/src/rendering/GLBBoxRenderer.h b/extern/freestyle/src/rendering/GLBBoxRenderer.h new file mode 100755 index 00000000000..4bb72ba80b0 --- /dev/null +++ b/extern/freestyle/src/rendering/GLBBoxRenderer.h @@ -0,0 +1,59 @@ +// +// Filename : GLBBoxRenderer.h +// Author(s) : Stephane Grabli +// Purpose : Class to render BBoxes of a 3D scene thanks to OpenGL +// Date of creation : 07/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GLBBOXRENDERER_H +# define GLBBOXRENDERER_H + +# include "../system/FreestyleConfig.h" +# include "GLRenderer.h" +# include "../geometry/BBox.h" + +class Rep; +class Node; + +class LIB_RENDERING_EXPORT GLBBoxRenderer : public GLRenderer +{ +public: + + inline GLBBoxRenderer() : GLRenderer() {} + virtual ~GLBBoxRenderer() {} + + VISIT_DECL(NodeGroup) + VISIT_DECL(NodeTransform) + VISIT_DECL(IndexedFaceSet) + VISIT_DECL(DrawingStyle) + + protected: + + void RenderRep(const Rep& iRep) const ; + void RenderNode(const Node& iNode) const ; + void RenderBBox(const BBox& iBox) const ; +}; + +#endif // GLBBOXRENDERER_H diff --git a/extern/freestyle/src/rendering/GLDebugRenderer.cpp b/extern/freestyle/src/rendering/GLDebugRenderer.cpp new file mode 100755 index 00000000000..b396a0ce6d3 --- /dev/null +++ b/extern/freestyle/src/rendering/GLDebugRenderer.cpp @@ -0,0 +1,197 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "../scene_graph/VertexRep.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/IndexedFaceSet.h" +#include "../scene_graph/LineRep.h" +#include "../geometry/Grid.h" + +#include "GLDebugRenderer.h" + +#ifdef __MACH__ +#include +#else +#include +#endif + +void GLDebugRenderer::visitIndexedFaceSet(IndexedFaceSet& iFaceSet) +{ + unsigned int fIndex = 0; + + const real * vertices = iFaceSet.vertices(); + const real * normals = iFaceSet.normals(); + const Material *const* materials = (const Material**)iFaceSet.materials(); + const unsigned *vindices = iFaceSet.vindices(); + const unsigned *nindices = iFaceSet.nindices(); + const unsigned *mindices = iFaceSet.mindices(); + const unsigned numfaces = iFaceSet.numFaces(); + const unsigned *numVertexPerFace = iFaceSet.numVertexPerFaces(); + const IndexedFaceSet::TRIANGLES_STYLE * faceStyle = iFaceSet.trianglesStyle(); + + const unsigned *pvi = vindices; + const unsigned *pni = nindices; + const unsigned* pmi = mindices; + + for(fIndex=0; fIndex1000) + textSize *= 10.0; + + glScalef(size, size, size); + glScalef(textSize/200.0, textSize/200.0, textSize/200.0); + for (c=string; *c != '\0'; c++) + { + glutStrokeCharacter(font, *c); + } + glPopMatrix(); +} + +void GLDebugRenderer::RenderTriangleStrip(const real *iVertices, + const real *iNormals, + const Material *const* iMaterials, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned iNVertices) +{ + // glBegin(GL_TRIANGLE_STRIP); + // for(unsigned int i=0; i +# include "../system/FreestyleConfig.h" +# include "GLRenderer.h" +# include "../view_map/Silhouette.h" +# include "../winged_edge/Curvature.h" + +class WSMeshShape; +class WSExactShape; + +class LIB_RENDERING_EXPORT GLDebugRenderer : public GLRenderer +{ +public: + + inline GLDebugRenderer() : GLRenderer() { + _bboxSize = 2.0; + SetMaxValue(&_minEdgeSize); + _SelectedFEdge = 0; + } + + inline ~GLDebugRenderer() {} + + VISIT_DECL(NodeShape) + + VISIT_DECL(IndexedFaceSet) + VISIT_DECL(LineRep) + VISIT_DECL(OrientedLineRep) + VISIT_DECL(VertexRep) + + /*! Renders a bitmap string in world coordinates + * x, y, z + * The world coordinates of the sentence's starting point + * font + * The font used to display the text. + * Must be one of : + * - GLUT_STROKE_ROMAN + * - GLUT_STROKE_MONO_ROMAN + * string + * The text to display + * size + * The relative size of the text to display + */ + void renderBitmapString(real x, + real y, + real z, + void *font, + char *string, + float size = 1.f) ; + + /*! Reinitialize the Renderer so as the previous + * text size does not affect the current one. + * iBBoxSize + * The size of the scene bounding box. + */ + inline void ReInit(real iBBoxSize) {_bboxSize = iBBoxSize; SetMaxValue(&_minEdgeSize);} + + inline void SetSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} + inline FEdge * selectedFEdge() {return _SelectedFEdge;} + +protected: + + /*! Renders a face made of a triangles strip + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangleStrip(const real *iVertices, + const real *iNormals, + const Material *const* iMaterials, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned iNVertices); + + /*! Renders a face made of a triangles fan + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangleFan(const real *iVertices, + const real *iNormals, + const Material *const*iMaterials, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned iNVertices); + + /*! Renders a face made of single triangles + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangles(const real *iVertices, + const real *iNormals, + const Material *const* iMaterials, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned iNVertices); + + /*! glTranslatef or glTranslated */ + inline void glTranslater(float x, float y, float z) {glTranslatef(x,y,z);} + inline void glTranslater(real x, real y, real z) {glTranslated(x,y,z);} + + +private: + + inline void SetMaxValue(float *oValue) {*oValue = FLT_MAX;} + inline void SetMaxValue(real *oValue) {*oValue = DBL_MAX;} + + mutable real _bboxSize; + mutable real _minEdgeSize; + + FEdge *_SelectedFEdge; +}; + +#endif // GLDEBUGRENDERER_H diff --git a/extern/freestyle/src/rendering/GLFreeMemoryVisitor.cpp b/extern/freestyle/src/rendering/GLFreeMemoryVisitor.cpp new file mode 100644 index 00000000000..b5a835f5104 --- /dev/null +++ b/extern/freestyle/src/rendering/GLFreeMemoryVisitor.cpp @@ -0,0 +1,27 @@ +#include "GLFreeMemoryVisitor.h" +#include "../scene_graph/IndexedFaceSet.h" + +# ifdef WIN32 +# include +# endif +# ifdef __MACH__ +# include +# else +# include +# endif + +GLFreeMemoryVisitor::GLFreeMemoryVisitor() +:SceneVisitor(){ +} + +GLFreeMemoryVisitor::~GLFreeMemoryVisitor(){ +} + +void GLFreeMemoryVisitor::visitIndexedFaceSet(IndexedFaceSet& ifs){ + GLuint dl = ifs.displayList(); + if(dl != 0){ + if(glIsList(dl)){ + glDeleteLists(dl, 1); + } + } +} diff --git a/extern/freestyle/src/rendering/GLFreeMemoryVisitor.h b/extern/freestyle/src/rendering/GLFreeMemoryVisitor.h new file mode 100644 index 00000000000..dd6412b1bb7 --- /dev/null +++ b/extern/freestyle/src/rendering/GLFreeMemoryVisitor.h @@ -0,0 +1,23 @@ +#ifndef GL_FREE_MEMORY_VISITOR_H_ +#define GL_FREE_MEMORY_VISITOR_H_ + +# include "../system/FreestyleConfig.h" +# include "../scene_graph/SceneVisitor.h" + +/*! Mainly used to delete display lists */ +class LIB_RENDERING_EXPORT GLFreeMemoryVisitor : public SceneVisitor +{ +public: + + GLFreeMemoryVisitor() ; + virtual ~GLFreeMemoryVisitor() ; + + // + // visitClass methods + // + ////////////////////////////////////////////// + + VISIT_DECL(IndexedFaceSet) +}; + +#endif // GL_FREE_MEMORY_H_ \ No newline at end of file diff --git a/extern/freestyle/src/rendering/GLMonoColorRenderer.cpp b/extern/freestyle/src/rendering/GLMonoColorRenderer.cpp new file mode 100755 index 00000000000..792846fa020 --- /dev/null +++ b/extern/freestyle/src/rendering/GLMonoColorRenderer.cpp @@ -0,0 +1,43 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "GLMonoColorRenderer.h" + +void GLMonoColorRenderer::visitMaterial(Material&) { + glColor3f(_r, _g, _b); +} + +void GLMonoColorRenderer::visitDrawingStyle(DrawingStyle&) { + glDisable(GL_LIGHTING); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glEnable(GL_LINE_SMOOTH); + glLineWidth(3.0); + glPolygonMode(GL_BACK, GL_LINE); + //glPolygonMode(GL_BACK, GL_FILL); +} + +void GLMonoColorRenderer::setColor(float r, float g, float b, float alpha) { + _r = r; + _g = g; + _b = b; + _alpha = alpha; +} diff --git a/extern/freestyle/src/rendering/GLMonoColorRenderer.h b/extern/freestyle/src/rendering/GLMonoColorRenderer.h new file mode 100755 index 00000000000..d8e3cf536ec --- /dev/null +++ b/extern/freestyle/src/rendering/GLMonoColorRenderer.h @@ -0,0 +1,60 @@ +// +// Filename : GLMonoColorRenderer.h +// Author(s) : Stephane Grabli +// Purpose : Class to render 3D scene in 2 colors thanks to OpenGL +// Date of creation : 07/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GLMONOCOLORRENDERER_H +# define GLMONOCOLORRENDERER_H + +# include "../system/FreestyleConfig.h" +# include "GLRenderer.h" + +class LIB_RENDERING_EXPORT GLMonoColorRenderer : public GLRenderer +{ + public: + + GLMonoColorRenderer() : GLRenderer() { + _r = _g = _b = 0.f; + _alpha = 1.f; + } + + virtual ~GLMonoColorRenderer() {} + + VISIT_DECL(DrawingStyle) + VISIT_DECL(Material) + + void setColor(float r, float g, float b, float alpha = 1.f); + +private: + + float _r; + float _g; + float _b; + float _alpha; +}; + +#endif // GLMONOCOLORRENDERER_H diff --git a/extern/freestyle/src/rendering/GLRenderer.cpp b/extern/freestyle/src/rendering/GLRenderer.cpp new file mode 100755 index 00000000000..d566060dfc7 --- /dev/null +++ b/extern/freestyle/src/rendering/GLRenderer.cpp @@ -0,0 +1,467 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../scene_graph/IndexedFaceSet.h" +#include "../scene_graph/NodeDrawingStyle.h" +#include "../scene_graph/NodeLight.h" +#include "../scene_graph/NodeCamera.h" +#include "../scene_graph/NodeTransform.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/OrientedLineRep.h" +#include "../scene_graph/VertexRep.h" +#include "../stroke/Stroke.h" + +#include "../scene_graph/TriangleRep.h" + +#include "GLRenderer.h" + +static GLenum lights[8] = {GL_LIGHT0, + GL_LIGHT1, + GL_LIGHT2, + GL_LIGHT3, + GL_LIGHT4, + GL_LIGHT5, + GL_LIGHT6, + GL_LIGHT7}; + +void GLRenderer::visitIndexedFaceSet(IndexedFaceSet& ifs) +{ + /*GLuint dl = ifs.displayList(); + if(dl != 0){ + glCallList(dl); + return; + }*/ + unsigned int fIndex = 0; + + const real * vertices = ifs.vertices(); + const real * normals = ifs.normals(); + const real * texCoords = ifs.texCoords(); + const Material *const* materials = ifs.materials(); + const unsigned *vindices = ifs.vindices(); + const unsigned *nindices = ifs.nindices(); + const unsigned *mindices = ifs.mindices(); + const unsigned *tindices = ifs.tindices(); + const unsigned numfaces = ifs.numFaces(); + const IndexedFaceSet::TRIANGLES_STYLE * faceStyle = ifs.trianglesStyle(); + const unsigned *numVertexPerFace = ifs.numVertexPerFaces(); + + + const unsigned* pvi = vindices; + const unsigned* pni = nindices; + const unsigned* pmi = mindices; + const unsigned* pti = tindices; + + //dl = glGenLists(1); + //glNewList(dl, GL_COMPILE_AND_EXECUTE); + for(fIndex=0; fIndex& vertices = iLine.vertices(); + float step=1.f/vertices.size(); + vector::const_iterator v; + + for(v=vertices.begin(); v!=vertices.end(); v++) + glVertex3r((*v)[0], (*v)[1], (*v)[2]); + + glEnd(); +} + + +void GLRenderer::visitTriangleRep( TriangleRep& iTriangle) +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + switch(iTriangle.style()) + { + case TriangleRep::FILL: + glPolygonMode(GL_FRONT, GL_FILL); + break; + case TriangleRep::LINES: + glPolygonMode(GL_FRONT, GL_LINES); + break; + default: + return; + } + + glBegin(GL_TRIANGLES); + for(int i=0; i<3; ++i) + { + glColor3f(iTriangle.color(i)[0], iTriangle.color(i)[1], iTriangle.color(i)[2]); + glVertex3r(iTriangle.vertex(i)[0], iTriangle.vertex(i)[1], iTriangle.vertex(i)[2]); + } + + glEnd(); + + + + glPopAttrib(); + +} + +void GLRenderer::visitOrientedLineRep(OrientedLineRep& iLine) +{ + switch(iLine.style()) + { + case LineRep::LINES: + glBegin(GL_LINES); + break; + case LineRep::LINE_STRIP: + glBegin(GL_LINE_STRIP); + break; + case LineRep::LINE_LOOP: + glBegin(GL_LINE_LOOP); + break; + default: + return; + } + + int i=0; + int ncolor = iLine.getId().getFirst()%3; + + const vector& vertices = iLine.vertices(); + float step=1.f/vertices.size(); + vector::const_iterator v; + for(v=vertices.begin(); v!=vertices.end(); v++) + { + switch(ncolor) + { + case 0: + glColor3f(i*step,0.f,0.f); + break; + case 1: + glColor3f(0.f, i*step, 0.f); + break; + case 2: + glColor3f(0.f, 0.f, i*step); + break; + default: + glColor3f(i*step, i*step,i*step); + break; + } + i++; + glVertex3r((*v)[0], (*v)[1], (*v)[2]); + } + + glEnd(); +} + +void GLRenderer::visitVertexRep( VertexRep& iVertex) +{ + if(iVertex.pointSize() != 0.f) + glPointSize(iVertex.pointSize()); + + glBegin(GL_POINTS); + glVertex3r(iVertex.x(), iVertex.y(), iVertex.z()); + glEnd(); +} + +void GLRenderer::visitDrawingStyle(DrawingStyle& iDrawingStyle) +{ + + // Drawing Style management + switch(iDrawingStyle.style()) + { + case DrawingStyle::FILLED: + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + break; + + case DrawingStyle::LINES: + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glEnable(GL_LINE_SMOOTH); + glPolygonMode(GL_FRONT, GL_LINE); + glLineWidth(iDrawingStyle.lineWidth()); + break; + + case DrawingStyle::POINTS: + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + glEnable(GL_POINT_SMOOTH); + glPolygonMode(GL_FRONT, GL_POINT); + glPointSize(iDrawingStyle.pointSize()); + break; + + case DrawingStyle::INVISIBLE: + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + glDepthMask(0); + break; + + default: + break; + } + + glLineWidth(iDrawingStyle.lineWidth()); + glPointSize(iDrawingStyle.pointSize()); + + // FIXME + if(true == iDrawingStyle.lightingEnabled()) + glEnable(GL_LIGHTING); + else + glDisable(GL_LIGHTING); +} + +void GLRenderer::visitMaterial(Material& m) { + const float* diff = m.diffuse(); + const float* amb = m.ambient(); + const float* spec = m.specular(); + const float* em = m.emission(); + + RenderColor(diff); + glMaterialfv(GL_FRONT, GL_AMBIENT, amb); + glMaterialfv(GL_FRONT, GL_DIFFUSE, diff); + glMaterialfv(GL_FRONT, GL_SPECULAR, spec); + glMaterialfv(GL_FRONT, GL_EMISSION, em); + glMaterialf(GL_FRONT, GL_SHININESS, m.shininess()); +} + +void GLRenderer::visitMaterial(const Material& m) { + const float* diff = m.diffuse(); + const float* amb = m.ambient(); + const float* spec = m.specular(); + const float* em = m.emission(); + + RenderColor(diff); + glMaterialfv(GL_FRONT, GL_AMBIENT, amb); + glMaterialfv(GL_FRONT, GL_DIFFUSE, diff); + glMaterialfv(GL_FRONT, GL_SPECULAR, spec); + glMaterialfv(GL_FRONT, GL_EMISSION, em); + glMaterialf(GL_FRONT, GL_SHININESS, m.shininess()); +} +void GLRenderer::applyTransform( const Matrix44r &iMatrix) +{ + real m[16]; + for(int lign=0; lign<4; lign++) + for(int column=0; column<4; column++) + m[column*4+lign] = iMatrix(lign, column); + + glMultMatrixr(m); +} + +void GLRenderer::RenderColor( const float *rgba) +{ + glColor4fv(rgba); +} diff --git a/extern/freestyle/src/rendering/GLRenderer.h b/extern/freestyle/src/rendering/GLRenderer.h new file mode 100755 index 00000000000..ddbf082038b --- /dev/null +++ b/extern/freestyle/src/rendering/GLRenderer.h @@ -0,0 +1,204 @@ +// +// Filename : GLRenderer.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class to render a 3D scene thanks to OpenGL +// Date of creation : 07/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GLRENDERER_H +# define GLRENDERER_H + +# ifdef WIN32 +# include +# endif +# ifdef __MACH__ +# include +# else +# include +# endif + +# include "../system/FreestyleConfig.h" +# include "../system/Precision.h" +# include "../scene_graph/SceneVisitor.h" +# include "../geometry/Geom.h" +using namespace Geometry; + +class LIB_RENDERING_EXPORT GLRenderer : public SceneVisitor +{ + public: + + inline GLRenderer() : SceneVisitor() {} + virtual ~GLRenderer() {} + + // + // visitClass methods + // + ////////////////////////////////////////////// + + VISIT_DECL(NodeLight) + VISIT_DECL(NodeCamera) + VISIT_DECL(NodeTransform) + + VISIT_DECL(LineRep) + VISIT_DECL(OrientedLineRep) + VISIT_DECL(TriangleRep) + VISIT_DECL(VertexRep) + VISIT_DECL(IndexedFaceSet) + VISIT_DECL(DrawingStyle) + VISIT_DECL(Material) + + virtual void visitMaterial(const Material&); + virtual void visitNodeTransformBefore(NodeTransform&); + virtual void visitNodeTransformAfter(NodeTransform&); + virtual void visitNodeDrawingStyleBefore(NodeDrawingStyle&); + virtual void visitNodeDrawingStyleAfter(NodeDrawingStyle&); + + protected: + + /*! Renders a face made of a triangles strip + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iTexCoords + * Array of float containing the face uv coords. 2 floats per + * u,v vertex texture coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iTIndices + * Array of texture coordinates indices (to use with iTexCoords array) + * describing the texture coordinates parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangleStrip(const real *iVertices, + const real *iNormals, + const Material *const*iMaterials, + const real *iTexCoords, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned* iTIndices, + const unsigned iNVertices) ; + + /*! Renders a face made of a triangles fan + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iTexCoords + * Array of float containing the face uv coords. 2 floats per + * u,v vertex texture coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iTIndices + * Array of texture coordinates indices (to use with iTexCoords array) + * describing the texture coordinates parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangleFan(const real *iVertices, + const real *iNormals, + const Material *const* iMaterials, + const real *iTexCoords, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned* iTIndices, + const unsigned iNVertices) ; + + /*! Renders a face made of single triangles + * iVertices + * Array of float containing the face vertices. 3 floats per + * x, y, z vertex coordinates + * iNormals + * Array of float containing the face normals. 3 floats per + * x, y, z vertex normal coordinates + * iTexCoords + * Array of float containing the face uv coords. 2 floats per + * u,v vertex texture coordinates + * iVIndices + * Array of the indices (to use with the iVertices array) + * describing the vertices parsing order + * iNIndices + * Array of normals indices (to use with iNormals array) + * describing the normals parsing order + * iTIndices + * Array of texture coordinates indices (to use with iTexCoords array) + * describing the texture coordinates parsing order + * iNVertices + * The number of vertices in the face + */ + virtual void RenderTriangles(const real *iVertices, + const real *iNormals, + const Material *const* iMaterials, + const real *iTexCoords, + const unsigned* iVIndices, + const unsigned* iNIndices, + const unsigned* iMIndices, + const unsigned* iTIndices, + const unsigned iNVertices) ; + + /*! Apply a transform matrix by multiplying + * the current OpenGL ModelView Matrix by + * iMatrix + */ + virtual void applyTransform( const Matrix44r &iMatrix) ; + + /*! Sets the current drawing color. + * Active only when light is disabled + * (simple call to glColor4fv) + * rgba + * array of 4 floats (r, g, b and alpha) + */ + virtual void RenderColor( const float *rgba); + + /*! glVertex3f or glVertex3d */ + inline void glVertex3r(float x, float y, float z) {glVertex3f(x,y,z);} + inline void glVertex3r(real x, real y, real z) {glVertex3d(x,y,z);} + + /*! glVertex3f or glNormal3d */ + inline void glNormal3r(float x, float y, float z) {glNormal3f(x,y,z);} + inline void glNormal3r(real x, real y, real z) {glNormal3d(x,y,z);} + + /*! glMultMatrixf or glMultMatrixd */ + inline void glMultMatrixr(float *m) {glMultMatrixf(m);} + inline void glMultMatrixr(real *m) {glMultMatrixd(m);} + +}; + +#endif // GLRENDERER_H diff --git a/extern/freestyle/src/rendering/GLSelectRenderer.cpp b/extern/freestyle/src/rendering/GLSelectRenderer.cpp new file mode 100755 index 00000000000..b4a2406c644 --- /dev/null +++ b/extern/freestyle/src/rendering/GLSelectRenderer.cpp @@ -0,0 +1,159 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../scene_graph/IndexedFaceSet.h" +#include "../scene_graph/NodeShape.h" +#include "GLSelectRenderer.h" + +static const float INACTIVE_COLOR_MIN = 0.2; +static const float INACTIVE_COLOR_MAX = 0.8; +static const float INACTIVE_COLOR_OFFSET = 0.2; + +static const float ACTIVE_COLOR[4] = {0.8, + 0.2, + 0.2, + 1}; + +static float selection_color[4] = {INACTIVE_COLOR_MIN, + INACTIVE_COLOR_MIN, + INACTIVE_COLOR_MIN, + 1}; + + +void GLSelectRenderer::resetColor() { + for (unsigned i = 0; i < 3; ++i) + selection_color[i] = INACTIVE_COLOR_MIN; +} + +void GLSelectRenderer::visitNodeShape(NodeShape& sn) { + if (_gl_select_rendering) + return; + for (unsigned i = 0; i < 3; ++i) { + selection_color[i] += INACTIVE_COLOR_OFFSET; + if (selection_color[i] > INACTIVE_COLOR_MAX) + selection_color[i] = INACTIVE_COLOR_MIN; + } + if (sn.shapes()[0]->getId() == _selected_shape) { + _current_shape_active = true; + return; + } + _current_shape_active = false; +} + +void GLSelectRenderer::visitMaterial(Material& m) { + if (_gl_select_rendering) + return; + + const float* amb = m.ambient(); + const float* spec = m.specular(); + const float* em = m.emission(); + + if (_current_shape_active) { + RenderColor(ACTIVE_COLOR); + glMaterialfv(GL_FRONT, GL_DIFFUSE, ACTIVE_COLOR); + } else { + RenderColor(selection_color); + glMaterialfv(GL_FRONT, GL_DIFFUSE, selection_color); + } + glMaterialfv(GL_FRONT, GL_AMBIENT, amb); + glMaterialfv(GL_FRONT, GL_SPECULAR, spec); + glMaterialfv(GL_FRONT, GL_EMISSION, em); + glMaterialf(GL_FRONT, GL_SHININESS, m.shininess()); +} + +void GLSelectRenderer::visitMaterial(const Material& m) { + if (_gl_select_rendering) + return; + + const float* amb = m.ambient(); + const float* spec = m.specular(); + const float* em = m.emission(); + + if (_current_shape_active) { + RenderColor(ACTIVE_COLOR); + glMaterialfv(GL_FRONT, GL_DIFFUSE, ACTIVE_COLOR); + } else { + RenderColor(selection_color); + glMaterialfv(GL_FRONT, GL_DIFFUSE, selection_color); + } + glMaterialfv(GL_FRONT, GL_AMBIENT, amb); + glMaterialfv(GL_FRONT, GL_SPECULAR, spec); + glMaterialfv(GL_FRONT, GL_EMISSION, em); + glMaterialf(GL_FRONT, GL_SHININESS, m.shininess()); +} + +void GLSelectRenderer::visitIndexedFaceSet(IndexedFaceSet& ifs) +{ + unsigned int fIndex = 0; + + const real * vertices = ifs.vertices(); + const real * normals = ifs.normals(); + const Material *const* materials = ifs.materials(); + const real * texCoords= ifs.texCoords(); + const unsigned *vindices = ifs.vindices(); + const unsigned *nindices = ifs.nindices(); + const unsigned *mindices = ifs.mindices(); + const unsigned *tindices = ifs.tindices(); + const unsigned numfaces = ifs.numFaces(); + const IndexedFaceSet::TRIANGLES_STYLE * faceStyle = ifs.trianglesStyle(); + const unsigned *numVertexPerFace = ifs.numVertexPerFaces(); + + + const unsigned* pvi = vindices; + const unsigned* pni = nindices; + const unsigned* pmi = mindices; + const unsigned* pti = tindices; + + for(fIndex=0; fIndexgetId().getFirst()); +} + +void GLSelectRenderer::visitNodeShapeAfter(NodeShape& sn) { + if (!_gl_select_rendering) + return; + + glPopName(); +} diff --git a/extern/freestyle/src/rendering/GLSelectRenderer.h b/extern/freestyle/src/rendering/GLSelectRenderer.h new file mode 100755 index 00000000000..bf8a334aebb --- /dev/null +++ b/extern/freestyle/src/rendering/GLSelectRenderer.h @@ -0,0 +1,85 @@ +// +// Filename : GLSelectRenderer.h +// Author(s) : Emmanuel Turquin +// Purpose : Class to highlight selected shapes +// Date of creation : 09/01/2004 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GL_SELECT_RENDERER_H +# define GL_SELECT_RENDERER_H + +# include "GLRenderer.h" + +class LIB_RENDERING_EXPORT GLSelectRenderer : public GLRenderer +{ + public: + + inline GLSelectRenderer() : GLRenderer() { + _selected_shape = -1; // -1 means no selection + _current_shape_active = false; + _gl_select_rendering = false; + } + virtual ~GLSelectRenderer() {} + + // + // visitClass methods + // + ////////////////////////////////////////////// + + VISIT_DECL(NodeShape) + + VISIT_DECL(IndexedFaceSet) + VISIT_DECL(Material) + + virtual void visitMaterial(const Material&); + virtual void visitNodeShapeBefore(NodeShape&); + virtual void visitNodeShapeAfter(NodeShape&); + + void resetColor(); + + void setSelectedId(const int id) { + _selected_shape = id; + } + + void setSelectRendering(bool b) { + _gl_select_rendering = b; + } + + int getSelectedId() const { + return _selected_shape; + } + + bool getSelectRendering() const { + return _gl_select_rendering; + } + + private: + + int _selected_shape; + bool _current_shape_active; + bool _gl_select_rendering; +}; + +#endif // GL_SELECT_RENDERER_H diff --git a/extern/freestyle/src/rendering/GLStrokeRenderer.cpp b/extern/freestyle/src/rendering/GLStrokeRenderer.cpp new file mode 100755 index 00000000000..7525807da47 --- /dev/null +++ b/extern/freestyle/src/rendering/GLStrokeRenderer.cpp @@ -0,0 +1,495 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include "GLStrokeRenderer.h" + +#ifdef WIN32 +# include "extgl.h" +#endif // WIN32 + +//#define glBlendEquation(x) + +GLStrokeRenderer::GLStrokeRenderer() +:StrokeRenderer() +{ + _textureManager = new GLTextureManager; +} + +GLStrokeRenderer::~GLStrokeRenderer() +{ + if(0 != _textureManager) + { + delete _textureManager; + _textureManager = 0; + } +} + +float initialColor(float x, float avTex=0.5) +{ + float y=(1-x)/avTex; + return (y>1 ? 1 : y); +} +//float complementColor(float x, float avTex=0.5) +//{ +// float y=(1-x)/avTex-1; +// return (y<0 ? 0 : y); +//} + +float complementColor(float x, float avTex=0.5) +{ + float y=(1-x);///avTex-1; + return (y<0 ? 0 : y); +} + +void GLStrokeRenderer::RenderStrokeRep(StrokeRep *iStrokeRep) const +{ + glPushAttrib(GL_COLOR_BUFFER_BIT); + Stroke::MediumType strokeType = iStrokeRep->getMediumType(); + // int averageTextureAlpha=0.5; //default value + // if (strokeType==OIL_STROKE) + // averageTextureAlpha=0.75; + // if (strokeType>=NO_BLEND_STROKE) + // averageTextureAlpha=1.0; + // if (strokeType<0) + // { + // renderNoTexture(iStrokeRep); + // return; + // } + int i; + glDisable(GL_CULL_FACE); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glShadeModel(GL_SMOOTH); + glDisable(GL_DEPTH_TEST); + + glEnable(GL_BLEND); + + if(strokeType==Stroke::DRY_MEDIUM) + { + glBlendEquation(GL_MAX); + } + else if(strokeType==Stroke::OPAQUE_MEDIUM) + { + glBlendEquation(GL_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + else + { + glBlendEquation(GL_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + } + glEnable(GL_TEXTURE_2D); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + //first texture, basically the only one for lighter strokes + glBindTexture(GL_TEXTURE_2D, iStrokeRep->getTextureId()); + //glBindTexture(GL_TEXTURE_2D, _textureManager.getPaperTextureIndex()); + + vector& strips = iStrokeRep->getStrips(); + for(vector::iterator s=strips.begin(), send=strips.end(); + s!=send; + ++s){ + Strip::vertex_container& vertices = (*s)->vertices(); + glBegin(GL_TRIANGLE_STRIP); + for(Strip::vertex_container::iterator v=vertices.begin(), vend=vertices.end(); + v!=vend; + ++v){ + StrokeVertexRep * svRep = (*v); + Vec3r color = svRep->color(); + real alpha = svRep->alpha(); + glColor4f(complementColor(color[0]), + complementColor(color[1]), + complementColor(color[2]), alpha); + glTexCoord2f(svRep->texCoord()[0],svRep->texCoord()[1] ); + glVertex2f(svRep->point2d()[0], svRep->point2d()[1]); + } + glEnd(); + } +// if (strokeType>=NO_BLEND_STROKE) return; + // //return; + // + // //second texture, the complement, for stronger strokes + // glBindTexture(GL_TEXTURE_2D, _textureManager.getTextureIndex(2*strokeType+1)); + // glBegin(GL_TRIANGLE_STRIP); + // for(i=0; i<_sizeStrip; i++) + // { + // glColor4f(complementColor(_color[i][0]), + // complementColor(_color[i][1]), + // complementColor(_color[i][2]), _alpha[i]); + // glTexCoord2f(_texCoord[i][0],_texCoord[i][1] ); + // glVertex2f(_vertex[i][0], _vertex[i][1]); + // } + // glEnd(); + + glPopAttrib(); +} + +void GLStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const +{ + glPushAttrib(GL_COLOR_BUFFER_BIT); + Stroke::MediumType strokeType = iStrokeRep->getMediumType(); + int i; + glDisable(GL_CULL_FACE); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + glShadeModel(GL_SMOOTH); + glDisable(GL_DEPTH_TEST); + + glEnable(GL_BLEND); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_TEXTURE_2D); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + //first texture, basically the only one for lighter strokes + glBindTexture(GL_TEXTURE_2D, iStrokeRep->getTextureId()); + //glBindTexture(GL_TEXTURE_2D, _textureManager.getPaperTextureIndex()); + + vector& strips = iStrokeRep->getStrips(); + for(vector::iterator s=strips.begin(), send=strips.end(); + s!=send; + ++s){ + Strip::vertex_container& vertices = (*s)->vertices(); + glBegin(GL_TRIANGLE_STRIP); + for(Strip::vertex_container::iterator v=vertices.begin(), vend=vertices.end(); + v!=vend; + ++v){ + StrokeVertexRep * svRep = (*v); + Vec3r color = svRep->color(); + real alpha = svRep->alpha(); + glColor4f(color[0], + color[1], + color[2], alpha); + glTexCoord2f(svRep->texCoord()[0],svRep->texCoord()[1] ); + glVertex2f(svRep->point2d()[0], svRep->point2d()[1]); + } + glEnd(); + } + glPopAttrib(); +} + +//No Texture +//void GLStrokeRenderer::renderNoTexture(StrokeRep *iStrokeRep) const +//{ +// Stroke::MediumType strokeType = iStrokeRep->getMediumType(); +// int sizeStrip = iStrokeRep->sizeStrip(); +// const Vec3r *color = iStrokeRep->colors(); +// const Vec2r *vertex = iStrokeRep->vertices(); +// const float *alpha = iStrokeRep->alpha(); +// +// glDisable(GL_LIGHTING); +// glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); +// glShadeModel(GL_SMOOTH); +// glDisable(GL_DEPTH_TEST); +// +// //if (strokeType==NO_TEXTURE_STROKE) +// if(strokeType < 0) +// { +// glDisable(GL_BLEND); +// glDisable(GL_TEXTURE_2D); +// glBegin(GL_TRIANGLE_STRIP); +// for(int i=0; i pathnames; + QString path; + StringUtils::getPathName(TextureManager::Options::getBrushesPath(), + sname, + pathnames); + for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) { + path = j->c_str(); + if(QFile::exists(path)){ + found = true; + break; + } + } + if(!found) + return 0; + // Brush texture + cout << "Loading brush texture..." << endl; + switch(mediumType){ + case Stroke::DRY_MEDIUM: + prepareTextureLuminance((const char*)path.toAscii(), texId); + break; + case Stroke::HUMID_MEDIUM: + case Stroke::OPAQUE_MEDIUM: + default: + prepareTextureAlpha((const char*)path.toAscii(), texId); + break; + } + cout << "Done." << endl << endl; + + return texId; +} + +bool +GLTextureManager::prepareTextureAlpha (string sname, GLuint itexname) +{ + const char * name = sname.c_str(); + QImage qim(name); + QFileInfo fi(name); + QString filename = fi.fileName(); + if (qim.isNull()) + { + cerr << " Error: unable to read \"" << name << "\"" << endl; + return false; + } + if (qim.depth()>8) + { + cerr<<" Error: \""<< name <<"\" has "< 8) + { + cerr<<" Error: \""< 8) + { + cerr<<" Error: \""< +# endif +# ifdef __MACH__ +# include +# else +# include +# endif + +/**********************************/ +/* */ +/* */ +/* GLTextureManager */ +/* */ +/* */ +/**********************************/ + +/*! Class to load textures + */ +class LIB_RENDERING_EXPORT GLTextureManager : public TextureManager +{ + public: + GLTextureManager (); + virtual ~GLTextureManager (); +protected: + virtual unsigned loadBrush(string fileName, Stroke::MediumType = Stroke::OPAQUE_MEDIUM); + + protected: + virtual void loadPapers(); + virtual void loadStandardBrushes(); + bool prepareTextureAlpha (string name, GLuint itexname); + bool prepareTextureLuminance (string name, GLuint itexname); + bool prepareTextureLuminanceAndAlpha (string name, GLuint itexname); + bool preparePaper (const char *name, GLuint itexname); +}; + + + +/**********************************/ +/* */ +/* */ +/* GLStrokeRenderer */ +/* */ +/* */ +/**********************************/ + +class LIB_RENDERING_EXPORT GLStrokeRenderer : public StrokeRenderer +{ +public: + GLStrokeRenderer(); + virtual ~GLStrokeRenderer(); + + /*! Renders a stroke rep */ + virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; + virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; + +protected: + //void renderNoTexture(StrokeRep *iStrokeRep) const; +}; + +#endif // GLSTROKERENDERER_H diff --git a/extern/freestyle/src/rendering/GLUtils.cpp b/extern/freestyle/src/rendering/GLUtils.cpp new file mode 100755 index 00000000000..5e9ba2a5bf4 --- /dev/null +++ b/extern/freestyle/src/rendering/GLUtils.cpp @@ -0,0 +1,68 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "GLUtils.h" + +# ifdef WIN32 +# include +# endif +# ifdef __MACH__ +# include +# else +# include +# endif +#include + +int isExtensionSupported(const char *extension) +{ + const GLubyte *extensions = NULL; + const GLubyte *start; + GLubyte *where, *terminator; + + /* Extension names should not have spaces. */ + where = (GLubyte *) strchr(extension, ' '); + if (where || *extension == '\0') + return 0; + extensions = glGetString(GL_EXTENSIONS); + /* It takes a bit of care to be fool-proof about parsing the + OpenGL extensions string. Don't be fooled by sub-strings, + etc. */ + start = extensions; + for (;;) { + where = (GLubyte *) strstr((const char *) start, extension); + if (!where) + break; + terminator = where + strlen(extension); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') + return 1; + start = terminator; + } + return 0; +} + +void *glutils_extgl_GetProcAddress(const char *name) +{ +#ifdef _WIN32 + void *t = wglGetProcAddress(name); + return t; +#endif +} + diff --git a/extern/freestyle/src/rendering/GLUtils.h b/extern/freestyle/src/rendering/GLUtils.h new file mode 100755 index 00000000000..453b3f31259 --- /dev/null +++ b/extern/freestyle/src/rendering/GLUtils.h @@ -0,0 +1,29 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef GLUTILS_H +#define GLUTILS_H + +#include "../system/FreestyleConfig.h" + +int LIB_RENDERING_EXPORT isExtensionSupported(const char *extension); +void LIB_RENDERING_EXPORT *glutils_extgl_GetProcAddress(const char *name); + +#endif diff --git a/extern/freestyle/src/rendering/GLXOffscreenViewer.cpp b/extern/freestyle/src/rendering/GLXOffscreenViewer.cpp new file mode 100755 index 00000000000..7135cedd7ad --- /dev/null +++ b/extern/freestyle/src/rendering/GLXOffscreenViewer.cpp @@ -0,0 +1,86 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WIN32 +# include "GLRenderer.h" +# include "GLXOffscreenViewer.h" + + +GLXOffscreenViewer::GLXOffscreenViewer(int w, int h){ + _offscreenArea = new OffScreenArea(OffScreenArea::PIXMAP_OFFSCREEN_TYPE); + _offscreenArea->AllocateOffScreenArea(w,h); + _RootNode.SetLightingEnabled(false); + _RootNode.SetLineWidth(1.0); + _pGLRenderer = new GLRenderer; +} + +GLXOffscreenViewer::~GLXOffscreenViewer(){ + if(_offscreenArea) + delete _offscreenArea; + if(_pGLRenderer) + delete _pGLRenderer; + _RootNode.destroy(); +} + +void GLXOffscreenViewer::AddNode(Node* iNode){ + _RootNode.AddChild(iNode); +} + +void GLXOffscreenViewer::DetachNode(Node* iNode){ + _RootNode.DetachChild(iNode); +} + +void GLXOffscreenViewer::init(){ + glClearColor(_clearColor[0],_clearColor[1],_clearColor[2],1); +} + +void GLXOffscreenViewer::readPixels(int x, + int y, + int width, + int height, + float *pixels){ + _offscreenArea->MakeCurrent(); + glReadBuffer(GL_FRONT); + GLenum glformat = GL_RED; + glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); +} + + + +void GLXOffscreenViewer::draw() +{ + _offscreenArea->MakeCurrent(); + glPushAttrib(GL_ALL_ATTRIB_BITS); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE); + glDisable(GL_DEPTH_TEST); + _RootNode.accept(*_pGLRenderer); + glFlush(); + glPopAttrib(); +} + +#endif diff --git a/extern/freestyle/src/rendering/GLXOffscreenViewer.h b/extern/freestyle/src/rendering/GLXOffscreenViewer.h new file mode 100755 index 00000000000..c09a23f500b --- /dev/null +++ b/extern/freestyle/src/rendering/GLXOffscreenViewer.h @@ -0,0 +1,545 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef GLXOFFSCREENVIEWER_H +# define GLXOFFSCREENVIEWER_H + +# ifdef 0 +//#ifndef WIN32 +// +// @(#)OffScreen.h 1.4 10/11/00 +// + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace OFFSCREEN { // I put this here to avoid conflicts between Qt and + // X11 in the definition of INT32 + + /*! \namespace OFFSCREEN + * \bugs attention a la restauration de context quand il n'avait rien avant l'OffScreenArea !! + */ + +static bool OutOfMemory = false ; +static XErrorHandler oldHandler = NULL ; + +static int myXErrorHandler (Display *_d, XErrorEvent *_xee) +{ + OutOfMemory = True; + if(oldHandler) + { + return (*oldHandler)(_d,_xee); + } + else + { + return false; + } + + return 0; +} + +class OffScreenArea +{ + public: + static const int UNKNOWN_OFFSCREEN_TYPE = 0 ; + static const int PIXMAP_OFFSCREEN_TYPE = 1 ; + static const int PBUFFER_OFFSCREEN_TYPE = 2 ; + static const int KEEP_PIXMAP = 1 ; + + OffScreenArea (int type = UNKNOWN_OFFSCREEN_TYPE,GLXContext shareCtx = NULL) + { + DefaultType = type ; + i_Screen = -1; + i_Height = 0; + i_Width = 0; + + i_OffScreenAreaType = UNKNOWN_OFFSCREEN_TYPE ; + i_GLContext = NULL; + i_Drawable = GLXDrawable(0); + i_XPix = Pixmap(0); + i_pXVisual = NULL; + i_pDisplay = NULL; + + SetDisplayAndScreen((Display *)NULL,(int)-1) ; + } + + GLXContext GetGLXContext() { return i_GLContext ; } + ~OffScreenArea () + { + DestroyOffScreenArea(); + } + + /* + * 0 : cannot allocate + * 1 : allocation done + * FIRST : try to allocate PixelBuffer (Single, double buffer) + * SECOND : try to allocate GLXPixmap if PixelBuffer is not available + */ + /* + * Here, we try to allocate an OffScreen Area + * first, with PBuffer (if this GLX_ext. is + * available and we can create one) + * second, with a pixmap + */ + int AllocateOffScreenArea(int width,int height) + { + save_GLContext = glXGetCurrentContext(); + save_pDisplay = glXGetCurrentDisplay(); + save_Drawable = glXGetCurrentDrawable(); + + int AlreadyThere = 0; +#ifdef A_VIRER + static int AlreadyThere = 0; + + if ( ( width != i_Width ) || ( height != i_Height ) ) + { + AlreadyThere = 0; + DestroyOffScreenArea(); + } +#endif + if(!AlreadyThere) + { + AlreadyThere = 1; + + /** Before to use a Pixmap, we try with pbuffer **/ + if(TryPBuffer(false,width,height)) + { +#ifdef DEBUG + fprintf(stderr, "Using single-buffer PBuffer for off-screen rendering.\n") ; +#endif + return true ; + } + + fprintf(stderr, "Cannot use a single-buffer PBuffer, trying double buffer.\n") ; + + if(TryPBuffer(true,width,height)) + { +#ifdef DEBUG + fprintf(stderr, "Using double-buffer PBuffer for off-screen rendering.\n") ; +#endif + return true ; + } +#ifdef DEBUG + fprintf(stderr, "Warning : cannot create a PBuffer, trying Pixmap\n"); +#endif + if(TryPixmap(width,height)) + { +#ifdef DEBUG + fprintf(stderr, "Notice : using Pixmap for offScreen rendering\n"); +#endif + return true ; + } +#ifdef DEBUG + fprintf (stderr, "Warning : cannot create a Pixmap\n"); +#endif + + return false; + } + return true ; + } + + void MakeCurrent() + { + glXMakeCurrent(i_pDisplay,i_Drawable,i_GLContext); + } + + protected: + inline Display * XServer ( void ) { return i_pDisplay; } + inline GLXContext GraphicContext ( void ) { return i_GLContext; } + inline GLXDrawable Drawable ( void ) { return i_Drawable; } + inline XVisualInfo * XVisual ( void ) { return i_pXVisual; } + + int DefaultType ; + int i_OffScreenAreaType; + int i_Height; + int i_Width; + + GLXContext save_GLContext; + Display * save_pDisplay; + GLXDrawable save_Drawable; + + Display * i_pDisplay; + int i_Screen; + GLXContext i_GLContext; + GLXContext i_shareContext; + GLXDrawable i_Drawable; + Pixmap i_XPix; + XVisualInfo * i_pXVisual; + + /* + * Define Display and screen + * IF display == NULL THEN try to open default Display + * IF screenNumber is < 0 THEN take default Screen + */ + void SetDisplayAndScreen ( Display *pDisplay , int Screen ) + { + if ( pDisplay == NULL ) + i_pDisplay = XOpenDisplay ( NULL ); + else + i_pDisplay = pDisplay; + + if ( Screen < 0 ) + i_Screen = DefaultScreen ( i_pDisplay ); + else + i_Screen = Screen; + } + + // + // Creates a PBuffer + // + // + // 0 : failure + // 1 : succeed + // + + bool CreatePBuffer (unsigned int width, unsigned int height , int * pAttribList) + { +#ifdef DEBUG + int error = 0 ; + while((error = glGetError()) > 0) + std::cerr << "GLError " << (void *)error << " encountered." << std::endl ; +#endif + GLXFBConfig *pfbConfigs; + int nbConfigs; + static int pbAttribs[] = { GLX_LARGEST_PBUFFER, true, + GLX_PRESERVED_CONTENTS, true, + GLX_PBUFFER_WIDTH,0, + GLX_PBUFFER_HEIGHT,0, + None }; + + pbAttribs[5] = width ; + pbAttribs[7] = height ; + + // Looks for a config that matches pAttribList + pfbConfigs = glXChooseFBConfig(i_pDisplay,i_Screen,pAttribList,&nbConfigs) ; +#ifdef DEBUG + std::cout << nbConfigs << " found for pbuffer." << std::endl ; +#endif + + if(pfbConfigs == NULL) + return false ; + + i_pXVisual = glXGetVisualFromFBConfig(i_pDisplay,pfbConfigs[0]); + i_OffScreenAreaType = PBUFFER_OFFSCREEN_TYPE; + + // Sets current error handler + OutOfMemory = False; + oldHandler = XSetErrorHandler( myXErrorHandler ); + + i_Drawable = glXCreatePbuffer(i_pDisplay,pfbConfigs[0],pbAttribs); + + if(i_Drawable == 0) + { + i_pXVisual = NULL; + return false ; + } + unsigned int w=0,h=0; + glXQueryDrawable(i_pDisplay,i_Drawable,GLX_WIDTH,&w) ; + glXQueryDrawable(i_pDisplay,i_Drawable,GLX_HEIGHT,&h) ; + + if((w != width)||(h != height)) + { +#ifdef DEBUG + std::cerr << "Could not allocate Pbuffer. Only size " << w << "x" << h << " found." << std::endl ; +#endif + return false ; + } +#ifdef DEBUG + else + std::cerr << "Could allocate Pbuffer. Size " << w << "x" << h << " found." << std::endl ; +#endif +#ifdef DEBUG + while((error = glGetError()) > 0) + std::cerr << "GLError " << (void *)error << " encountered." << std::endl ; +#endif + // now create GLXContext + + if((i_GLContext = glXCreateContext(i_pDisplay,i_pXVisual,NULL,true)) == NULL) + { + DestroyOffScreenArea() ; + return false ; + } + + /* Restore original X error handler */ + (void) XSetErrorHandler( oldHandler ); + + if(!OutOfMemory) + { + i_Height = height; + i_Width = width; + + return true ; + } + else + return false ; + } + + // + // Creates a Pixmap + // + // + // false : failure + // true : succeed + // + + bool CreatePixmap (int width, int height , int * pAttribList) + { + int depth; + int totdepth=0; + XErrorHandler oldHandler; + XVisualInfo * pvisP; + + pvisP = glXChooseVisual ( i_pDisplay, i_Screen , pAttribList); + + if ( pvisP == NULL) + { + fprintf( stderr , "Warning : no 24-bit true color visual available\n" ); + return false ; + } + + OutOfMemory = False; + oldHandler = XSetErrorHandler(myXErrorHandler); + if(i_XPix == Pixmap(NULL)) + { + depth = 0; + for (unsigned int i=0,j=0; (pAttribList[i] != None) && (j<3) ; i++ ) + { + switch ( pAttribList[i] ) + { + case GLX_RED_SIZE: glXGetConfig(i_pDisplay,pvisP,GLX_RED_SIZE,&depth) ; + totdepth += depth ; + i++ ; + j++ ; + break; + + case GLX_GREEN_SIZE: glXGetConfig(i_pDisplay,pvisP,GLX_GREEN_SIZE,&depth) ; + totdepth += depth ; + i++ ; + j++ ; + break; + + case GLX_BLUE_SIZE: glXGetConfig(i_pDisplay,pvisP,GLX_BLUE_SIZE,&depth) ; + totdepth += depth ; + i++ ; + j++ ; + break; + default: + break; + } + } + + fprintf(stderr,"%d bits color buffer found\n",depth) ; + i_XPix = XCreatePixmap(i_pDisplay,RootWindow (i_pDisplay,0),width,height,totdepth); + XSync(i_pDisplay,False); + if(OutOfMemory) + { + i_XPix = Pixmap(0); + XSetErrorHandler(oldHandler); + oldHandler = NULL ; + fprintf(stderr,"Warning : could not allocate Pixmap\n"); + return false ; + } + } + + // Perhaps should we verify th type of Area (Pixmap) ? + if ( i_Drawable == GLXDrawable(NULL) ) + { + // i_Drawable = i_XPix; + i_Drawable = glXCreateGLXPixmap ( i_pDisplay , pvisP , i_XPix ); + XSync ( i_pDisplay , False ); + if(OutOfMemory) + { + i_Drawable = GLXDrawable(0); + DestroyOffScreenArea(); + fprintf ( stderr , "Warning : could not allocate GLX Pixmap\n"); + return false ; + } + else + { + if(i_GLContext != NULL) + { + glXDestroyContext ( i_pDisplay , i_GLContext ); + i_GLContext = NULL; + } + if((i_GLContext = glXCreateContext(i_pDisplay,pvisP,NULL,GL_FALSE)) == NULL) + { + DestroyOffScreenArea(); + fprintf(stderr, "Warning : could not create rendering context"); + } + } + } + XSetErrorHandler(oldHandler); + + i_pXVisual = (i_Drawable != GLXDrawable(NULL) ? pvisP : NULL); + + i_Height = height; + i_Width = width; + + if(i_Drawable != GLXDrawable(NULL)) + { + i_OffScreenAreaType = PIXMAP_OFFSCREEN_TYPE; + return true ; + } + + return false ; + } + + bool TryPixmap(int width,int height) + { + int attrList[30]; + int n = 0; + + attrList[n++] = GLX_RED_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_GREEN_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_BLUE_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_RGBA; + attrList[n++] = GLX_DEPTH_SIZE; + attrList[n++] = 16; + attrList[n++] = GLX_STENCIL_SIZE; + attrList[n++] = 1; + attrList[n++] = None; + + return CreatePixmap(width,height,attrList) ; + } + + bool TryPBuffer(bool double_buffer,int width,int height) + { + int attrList[30]; + int n = 0; + + attrList[n++] = GLX_RENDER_TYPE; + attrList[n++] = GLX_RGBA_BIT; + attrList[n++] = GLX_DRAWABLE_TYPE; + attrList[n++] = GLX_PBUFFER_BIT; + attrList[n++] = GLX_RED_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_GREEN_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_BLUE_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_DEPTH_SIZE; + attrList[n++] = 8; + attrList[n++] = GLX_DOUBLEBUFFER; + attrList[n++] = double_buffer; + attrList[n++] = None; + + return CreatePBuffer(width,height,attrList) ; + } + + void DestroyOffScreenArea() + { + glXMakeCurrent(save_pDisplay,save_Drawable,save_GLContext); + + switch ( i_OffScreenAreaType ) + { + case PIXMAP_OFFSCREEN_TYPE : if(i_Drawable != 0) + glXDestroyGLXPixmap(i_pDisplay,i_Drawable); + + if (i_XPix != 0) + { + XFreePixmap (i_pDisplay,i_XPix); + i_XPix = 0; + } + break; + case PBUFFER_OFFSCREEN_TYPE : if(i_Drawable != 0) + glXDestroyPbuffer(i_pDisplay,i_Drawable); + break; + default: break; + } + + if (i_GLContext != NULL) + { + glXDestroyContext(i_pDisplay,i_GLContext); + i_GLContext = NULL; + } + + i_Drawable = 0; + i_OffScreenAreaType = UNKNOWN_OFFSCREEN_TYPE; + } +} ; + +} + + +#include "Geom.h" +#include "NodeDrawingStyle.h" +using namespace Geometry; +//using namespace OFFSCREEN; +class GLXOffscreenViewer{ +public: + GLXOffscreenViewer(int w, int h); + virtual ~GLXOffscreenViewer(); + + /*! Adds a node directly under the root node */ + void AddNode(Node* iNode); + /*! Detach the node iNode which must + * be directly under the root node. + */ + void DetachNode(Node *iNode); + + /*! reads the frame buffer pixels as luminance . + * \param x + * The lower-left corner x-coordinate of the + * rectangle we want to grab. + * \param y + * The lower-left corner y-coordinate of the + * rectangle we want to grab. + * \param width + * The width of the rectangle we want to grab. + * \param height + * The height of the rectangle we want to grab. + * \params pixels + * The array of float (of size width*height) in which + * the read values are stored. + */ + void readPixels(int x,int y,int width,int height,float *pixels) ; + + inline void SetClearColor(const Vec3f& c) {_clearColor = c;} + inline Vec3f getClearColor() const {return _clearColor;} + + void init(); + void draw(); + +protected: + OffScreenArea *_offscreenArea; + NodeDrawingStyle _RootNode; + Vec3f _clearColor; + GLRenderer *_pGLRenderer; + +}; + +#endif // WIN32 + +#endif diff --git a/extern/freestyle/src/rendering/extgl.cpp b/extern/freestyle/src/rendering/extgl.cpp new file mode 100755 index 00000000000..d7207f21299 --- /dev/null +++ b/extern/freestyle/src/rendering/extgl.cpp @@ -0,0 +1,2249 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#include "extgl.h" +#include +#include + +#ifndef _WIN32 +#include +#endif /* _WIN32 */ + +/* turn off the warning for the borland compiler*/ +#ifdef __BORLANDC__ +#pragma warn -8064 +#pragma warn -8065 +#endif /* __BORLANDC__ */ + +/* function variables */ + +/*-------------------------------------*/ +/* WGL stuff */ +/*-------------------------------------*/ + +#ifdef _WIN32 + +/* WGL_EXT_etxension_string */ + +#ifdef WGL_EXT_extensions_string +wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT = NULL; +#endif /* WGL_EXT_extension_string */ + +/* WGL_ARB_buffer_region */ + +#ifdef WGL_ARB_buffer_region +wglCreateBufferRegionARBPROC wglCreateBufferRegionARB = NULL; +wglDeleteBufferRegionARBPROC wglDeleteBufferRegionARB = NULL; +wglSaveBufferRegionARBPROC wglSaveBufferRegionARB = NULL; +wglRestoreBufferRegionARBPROC wglRestoreBufferRegionARB = NULL; +#endif /* WGL_ARB_buffer_region */ + +/* WGL_ARB_extension_string */ + + +#ifdef WGL_ARB_extensions_string +wglGetExtensionsStringARBPROC wglGetExtensionsStringARB = NULL; +#endif /* WGL_ARB_extension_string */ + +/* WGL_ARB_pbuffer */ + +#ifdef WGL_ARB_pbuffer +wglCreatePbufferARBPROC wglCreatePbufferARB = NULL; +wglGetPbufferDCARBPROC wglGetPbufferDCARB = NULL; +wglReleasePbufferDCARBPROC wglReleasePbufferDCARB = NULL; +wglDestroyPbufferARBPROC wglDestroyPbufferARB = NULL; +wglQueryPbufferARBPROC wglQueryPbufferARB = NULL; +#endif /* WGL_ARB_pbuffer */ + +/* WGL_ARB_pixel_format */ + +#ifdef WGL_ARB_pixel_format +wglGetPixelFormatAttribivARBPROC wglGetPixelFormatAttribivARB = NULL; +wglGetPixelFormatAttribfvARBPROC wglGetPixelFormatAttribfvARB = NULL; +wglChoosePixelFormatARBPROC wglChoosePixelFormatARB = NULL; +#endif /* WGL_ARB_pixel_format */ + +/* WGL_ARB_render_texture */ + +#ifdef WGL_ARB_render_texture +wglBindTexImageARBPROC wglBindTexImageARB = NULL; +wglReleaseTexImageARBPROC wglReleaseTexImageARB = NULL; +wglSetPbufferAttribARBPROC wglSetPbufferAttribARB = NULL; +#endif /* WGL_ARB_render_texture */ + +/* WGL_EXT_swap_control */ + +#ifdef WGL_EXT_swap_control +wglSwapIntervalEXTPROC wglSwapIntervalEXT = NULL; +wglGetSwapIntervalEXTPROC wglGetSwapIntervalEXT = NULL; +#endif /* WGL_EXT_swap_control */ + +/* WGL_ARB_make_current_read */ + +#ifdef WGL_ARB_make_current_read +wglMakeContextCurrentARBPROC wglMakeContextCurrentARB = NULL; +wglGetCurrentReadDCARBPROC wglGetCurrentReadDCARB = NULL; +#endif /* WGL_ARB_make_current_read*/ + +/* VAR */ + +#endif /* WIN32 */ + +/*-------------------------------------*/ +/*---WGL STUFF END---------------------*/ +/*-------------------------------------*/ + +#ifdef _WIN32 + +#ifdef GL_VERSION_1_2 +glDrawRangeElementsPROC glDrawRangeElements = NULL; +glTexImage3DPROC glTexImage3D = NULL; +glTexSubImage3DPROC glTexSubImage3D = NULL; +glCopyTexSubImage3DPROC glCopyTexSubImage3D = NULL; +#endif /* GL_VERSION_1_2 */ + +#ifdef GL_ARB_imaging +glBlendColorPROC glBlendColor = NULL; +LIB_RENDERING_EXPORT +glBlendEquationPROC glBlendEquation = NULL; +glColorTablePROC glColorTable = NULL; +glColorTableParameterfvPROC glColorTableParameterfv = NULL; +glColorTableParameterivPROC glColorTableParameteriv = NULL; +glCopyColorTablePROC glCopyColorTable = NULL; +glGetColorTablePROC glGetColorTable = NULL; +glGetColorTableParameterfvPROC glGetColorTableParameterfv = NULL; +glGetColorTableParameterivPROC glGetColorTableParameteriv = NULL; +glColorSubTablePROC glColorSubTable = NULL; +glCopyColorSubTablePROC glCopyColorSubTable = NULL; +glConvolutionFilter1DPROC glConvolutionFilter1D = NULL; +glConvolutionFilter2DPROC glConvolutionFilter2D = NULL; +glConvolutionParameterfPROC glConvolutionParameterf = NULL; +glConvolutionParameterfvPROC glConvolutionParameterfv = NULL; +glConvolutionParameteriPROC glConvolutionParameteri = NULL; +glConvolutionParameterivPROC glConvolutionParameteriv = NULL; +glCopyConvolutionFilter1DPROC glCopyConvolutionFilter1D = NULL; +glCopyConvolutionFilter2DPROC glCopyConvolutionFilter2D = NULL; +glGetConvolutionFilterPROC glGetConvolutionFilter = NULL; +glGetConvolutionParameterfvPROC glGetConvolutionParameterfv = NULL; +glGetConvolutionParameterivPROC glGetConvolutionParameteriv = NULL; +glGetSeparableFilterPROC glGetSeparableFilter = NULL; +glSeparableFilter2DPROC glSeparableFilter2D = NULL; +glGetHistogramPROC glGetHistogram = NULL; +glGetHistogramParameterfvPROC glGetHistogramParameterfv = NULL; +glGetHistogramParameterivPROC glGetHistogramParameteriv = NULL; +glGetMinmaxPROC glGetMinmax = NULL; +glGetMinmaxParameterfvPROC glGetMinmaxParameterfv = NULL; +glGetMinmaxParameterivPROC glGetMinmaxParameteriv = NULL; +glHistogramPROC glHistogram = NULL; +glMinmaxPROC glMinmax = NULL; +glResetHistogramPROC glResetHistogram = NULL; +glResetMinmaxPROC glResetMinmax = NULL; +#endif /* GL_ARB_imaging */ + +/* 1.3 */ + +#ifdef GL_VERSION_1_3 +glActiveTexturePROC glActiveTexture = NULL; +glClientActiveTexturePROC glClientActiveTexture = NULL; +glMultiTexCoord1dPROC glMultiTexCoord1d = NULL; +glMultiTexCoord1dvPROC glMultiTexCoord1dv = NULL; +glMultiTexCoord1fPROC glMultiTexCoord1f = NULL; +glMultiTexCoord1fvPROC glMultiTexCoord1fv = NULL; +glMultiTexCoord1iPROC glMultiTexCoord1i = NULL; +glMultiTexCoord1ivPROC glMultiTexCoord1iv = NULL; +glMultiTexCoord1sPROC glMultiTexCoord1s = NULL; +glMultiTexCoord1svPROC glMultiTexCoord1sv = NULL; +glMultiTexCoord2dPROC glMultiTexCoord2d = NULL; +glMultiTexCoord2dvPROC glMultiTexCoord2dv = NULL; +glMultiTexCoord2fPROC glMultiTexCoord2f = NULL; +glMultiTexCoord2fvPROC glMultiTexCoord2fv = NULL; +glMultiTexCoord2iPROC glMultiTexCoord2i = NULL; +glMultiTexCoord2ivPROC glMultiTexCoord2iv = NULL; +glMultiTexCoord2sPROC glMultiTexCoord2s = NULL; +glMultiTexCoord2svPROC glMultiTexCoord2sv = NULL; +glMultiTexCoord3dPROC glMultiTexCoord3d = NULL; +glMultiTexCoord3dvPROC glMultiTexCoord3dv = NULL; +glMultiTexCoord3fPROC glMultiTexCoord3f = NULL; +glMultiTexCoord3fvPROC glMultiTexCoord3fv = NULL; +glMultiTexCoord3iPROC glMultiTexCoord3i = NULL; +glMultiTexCoord3ivPROC glMultiTexCoord3iv = NULL; +glMultiTexCoord3sPROC glMultiTexCoord3s = NULL; +glMultiTexCoord3svPROC glMultiTexCoord3sv = NULL; +glMultiTexCoord4dPROC glMultiTexCoord4d = NULL; +glMultiTexCoord4dvPROC glMultiTexCoord4dv = NULL; +glMultiTexCoord4fPROC glMultiTexCoord4f = NULL; +glMultiTexCoord4fvPROC glMultiTexCoord4fv = NULL; +glMultiTexCoord4iPROC glMultiTexCoord4i = NULL; +glMultiTexCoord4ivPROC glMultiTexCoord4iv = NULL; +glMultiTexCoord4sPROC glMultiTexCoord4s = NULL; +glMultiTexCoord4svPROC glMultiTexCoord4sv = NULL; +glLoadTransposeMatrixfPROC glLoadTransposeMatrixf = NULL; +glLoadTransposeMatrixdPROC glLoadTransposeMatrixd = NULL; +glMultTransposeMatrixfPROC glMultTransposeMatrixf = NULL; +glMultTransposeMatrixdPROC glMultTransposeMatrixd = NULL; +glCompressedTexImage3DPROC glCompressedTexImage3D = NULL; +glCompressedTexImage2DPROC glCompressedTexImage2D = NULL; +glCompressedTexImage1DPROC glCompressedTexImage1D = NULL; +glCompressedTexSubImage3DPROC glCompressedTexSubImage3D = NULL; +glCompressedTexSubImage2DPROC glCompressedTexSubImage2D = NULL; +glCompressedTexSubImage1DPROC glCompressedTexSubImage1D = NULL; +glGetCompressedTexImagePROC glGetCompressedTexImage = NULL; +glSampleCoveragePROC glSampleCoverage = NULL; +#endif /* GL_VERSION_1_3 */ + +/* ARB_multitexture */ + +#ifdef GL_ARB_multitexture +glActiveTextureARBPROC glActiveTextureARB = NULL; +glClientActiveTextureARBPROC glClientActiveTextureARB = NULL; +glMultiTexCoord1dARBPROC glMultiTexCoord1dARB = NULL; +glMultiTexCoord1dvARBPROC glMultiTexCoord1dvARB = NULL; +glMultiTexCoord1fARBPROC glMultiTexCoord1fARB = NULL; +glMultiTexCoord1fvARBPROC glMultiTexCoord1fvARB = NULL; +glMultiTexCoord1iARBPROC glMultiTexCoord1iARB = NULL; +glMultiTexCoord1ivARBPROC glMultiTexCoord1ivARB = NULL; +glMultiTexCoord1sARBPROC glMultiTexCoord1sARB = NULL; +glMultiTexCoord1svARBPROC glMultiTexCoord1svARB = NULL; +glMultiTexCoord2dARBPROC glMultiTexCoord2dARB = NULL; +glMultiTexCoord2dvARBPROC glMultiTexCoord2dvARB = NULL; +glMultiTexCoord2fARBPROC glMultiTexCoord2fARB = NULL; +glMultiTexCoord2fvARBPROC glMultiTexCoord2fvARB = NULL; +glMultiTexCoord2iARBPROC glMultiTexCoord2iARB = NULL; +glMultiTexCoord2ivARBPROC glMultiTexCoord2ivARB = NULL; +glMultiTexCoord2sARBPROC glMultiTexCoord2sARB = NULL; +glMultiTexCoord2svARBPROC glMultiTexCoord2svARB = NULL; +glMultiTexCoord3dARBPROC glMultiTexCoord3dARB = NULL; +glMultiTexCoord3dvARBPROC glMultiTexCoord3dvARB = NULL; +glMultiTexCoord3fARBPROC glMultiTexCoord3fARB = NULL; +glMultiTexCoord3fvARBPROC glMultiTexCoord3fvARB = NULL; +glMultiTexCoord3iARBPROC glMultiTexCoord3iARB = NULL; +glMultiTexCoord3ivARBPROC glMultiTexCoord3ivARB = NULL; +glMultiTexCoord3sARBPROC glMultiTexCoord3sARB = NULL; +glMultiTexCoord3svARBPROC glMultiTexCoord3svARB = NULL; +glMultiTexCoord4dARBPROC glMultiTexCoord4dARB = NULL; +glMultiTexCoord4dvARBPROC glMultiTexCoord4dvARB = NULL; +glMultiTexCoord4fARBPROC glMultiTexCoord4fARB = NULL; +glMultiTexCoord4fvARBPROC glMultiTexCoord4fvARB = NULL; +glMultiTexCoord4iARBPROC glMultiTexCoord4iARB = NULL; +glMultiTexCoord4ivARBPROC glMultiTexCoord4ivARB = NULL; +glMultiTexCoord4sARBPROC glMultiTexCoord4sARB = NULL; +glMultiTexCoord4svARBPROC glMultiTexCoord4svARB = NULL; +#endif /* GL_ARB_multitexture */ + +#endif /* WIN32 */ + +/* ARB_transpose_matrix */ + +#ifdef GL_ARB_transpose_matrix +glLoadTransposeMatrixfARBPROC glLoadTransposeMatrixfARB = NULL; +glLoadTransposeMatrixdARBPROC glLoadTransposeMatrixdARB = NULL; +glMultTransposeMatrixfARBPROC glMultTransposeMatrixfARB = NULL; +glMultTransposeMatrixdARBPROC glMultTransposeMatrixdARB = NULL; +#endif /* GL_ARB_transpose_matrix */ + +/* ARB_texture_compression */ + +#ifdef GL_ARB_texture_compression +glCompressedTexImage3DARBPROC glCompressedTexImage3DARB = NULL; +glCompressedTexImage2DARBPROC glCompressedTexImage2DARB = NULL; +glCompressedTexImage1DARBPROC glCompressedTexImage1DARB = NULL; +glCompressedTexSubImage3DARBPROC glCompressedTexSubImage3DARB = NULL; +glCompressedTexSubImage2DARBPROC glCompressedTexSubImage2DARB = NULL; +glCompressedTexSubImage1DARBPROC glCompressedTexSubImage1DARB = NULL; +glGetCompressedTexImageARBPROC glGetCompressedTexImageARB = NULL; +#endif /* GL_ARB_texture_compression */ + +/* EXT_secondary_color */ + +#ifdef GL_EXT_secondary_color +glSecondaryColor3bEXTPROC glSecondaryColor3bEXT = NULL; +glSecondaryColor3bvEXTPROC glSecondaryColor3bvEXT = NULL; +glSecondaryColor3dEXTPROC glSecondaryColor3dEXT = NULL; +glSecondaryColor3dvEXTPROC glSecondaryColor3dvEXT = NULL; +glSecondaryColor3fEXTPROC glSecondaryColor3fEXT = NULL; +glSecondaryColor3fvEXTPROC glSecondaryColor3fvEXT = NULL; +glSecondaryColor3iEXTPROC glSecondaryColor3iEXT = NULL; +glSecondaryColor3ivEXTPROC glSecondaryColor3ivEXT = NULL; +glSecondaryColor3sEXTPROC glSecondaryColor3sEXT = NULL; +glSecondaryColor3svEXTPROC glSecondaryColor3svEXT = NULL; +glSecondaryColor3ubEXTPROC glSecondaryColor3ubEXT = NULL; +glSecondaryColor3ubvEXTPROC glSecondaryColor3ubvEXT = NULL; +glSecondaryColor3uiEXTPROC glSecondaryColor3uiEXT = NULL; +glSecondaryColor3uivEXTPROC glSecondaryColor3uivEXT = NULL; +glSecondaryColor3usEXTPROC glSecondaryColor3usEXT = NULL; +glSecondaryColor3usvEXTPROC glSecondaryColor3usvEXT = NULL; +glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT = NULL; +#endif /* GL_EXT_secondary_color */ + +/* EXT_compiled_vertex_array */ + +#ifdef GL_EXT_compiled_vertex_array +glLockArraysEXTPROC glLockArraysEXT = NULL; +glUnlockArraysEXTPROC glUnlockArraysEXT = NULL; +#endif /* GL_EXT_compiled_vertex_array */ + +/* EXT_fog_coord */ + +#ifdef GL_EXT_fog_coord +glFogCoordfEXTPROC glFogCoordfEXT = NULL; +glFogCoordfvEXTPROC glFogCoordfvEXT = NULL; +glFogCoorddEXTPROC glFogCoorddEXT = NULL; +glFogCoorddvEXTPROC glFogCoorddvEXT = NULL; +glFogCoordPointerEXTPROC glFogCoordPointerEXT = NULL; +#endif /* GL_EXT_for_color */ + +/* NV_vertex_array_range */ + +#ifdef GL_NV_vertex_array_range +glFlushVertexArrayRangeNVPROC glFlushVertexArrayRangeNV = NULL; +glVertexArrayRangeNVPROC glVertexArrayRangeNV = NULL; + +#ifdef _WIN32 +wglAllocateMemoryNVPROC wglAllocateMemoryNV = NULL; +wglFreeMemoryNVPROC wglFreeMemoryNV = NULL; +#else +glXAllocateMemoryNVPROC glXAllocateMemoryNV = NULL; +glXFreeMemoryNVPROC glXFreeMemoryNV = NULL; +#endif /* WIN32 */ + +#endif /* GL_NV_vertex_array_range */ + +/* EXT_point_parameters */ + +#ifdef GL_EXT_point_parameters +glPointParameterfEXTPROC glPointParameterfEXT = NULL; +glPointParameterfvEXTPROC glPointParameterfvEXT = NULL; +#endif /* GL_EXT_point_parameters */ + +/* NV_register_combiners */ + +#ifdef GL_NV_register_combiners +glCombinerParameterfvNVPROC glCombinerParameterfvNV = NULL; +glCombinerParameterfNVPROC glCombinerParameterfNV = NULL; +glCombinerParameterivNVPROC glCombinerParameterivNV = NULL; +glCombinerParameteriNVPROC glCombinerParameteriNV = NULL; +glCombinerInputNVPROC glCombinerInputNV = NULL; +glCombinerOutputNVPROC glCombinerOutputNV = NULL; +glFinalCombinerInputNVPROC glFinalCombinerInputNV = NULL; +glGetCombinerInputParameterfvNVPROC glGetCombinerInputParameterfvNV = NULL; +glGetCombinerInputParameterivNVPROC glGetCombinerInputParameterivNV = NULL; +glGetCombinerOutputParameterfvNVPROC glGetCombinerOutputParameterfvNV = NULL; +glGetCombinerOutputParameterivNVPROC glGetCombinerOutputParameterivNV = NULL; +glGetFinalCombinerInputParameterfvNVPROC glGetFinalCombinerInputParameterfvNV = NULL; +glGetFinalCombinerInputParameterivNVPROC glGetFinalCombinerInputParameterivNV = NULL; +#endif /* GL_NV_register_combiners */ + +/* ARB_multisample */ + +#ifdef GL_ARB_multisample +glSampleCoverageARBPROC glSampleCoverageARB = NULL; +#endif /* GL_ARB_multisample */ + +/* EXT_vertex_weighting */ + +#ifdef GL_EXT_vertex_weighting +glVertexWeightfEXTPROC glVertexWeightfEXT = NULL; +glVertexWeightfvEXTPROC glVertexWeightfvEXT = NULL; +glVertexWeightPointerEXTPROC glVertexWeightPointerEXT = NULL; +#endif /* GL_EXT_vertex_weighting */ + +/* NV_vertex_program */ + +#ifdef GL_NV_vertex_program +glBindProgramNVPROC glBindProgramNV = NULL; +glDeleteProgramsNVPROC glDeleteProgramsNV = NULL; +glExecuteProgramNVPROC glExecuteProgramNV = NULL; +glGenProgramsNVPROC glGenProgramsNV = NULL; +glAreProgramsResidentNVPROC glAreProgramsResidentNV = NULL; +glRequestResidentProgramsNVPROC glRequestResidentProgramsNV = NULL; +glGetProgramParameterfvNVPROC glGetProgramParameterfvNV = NULL; +glGetProgramParameterdvNVPROC glGetProgramParameterdvNV = NULL; +glGetProgramivNVPROC glGetProgramivNV = NULL; +glGetProgramStringNVPROC glGetProgramStringNV = NULL; +glGetTrackMatrixivNVPROC glGetTrackMatrixivNV = NULL; +glGetVertexAttribdvNVPROC glGetVertexAttribdvNV = NULL; +glGetVertexAttribfvNVPROC glGetVertexAttribfvNV = NULL; +glGetVertexAttribivNVPROC glGetVertexAttribivNV = NULL; +glGetVertexAttribPointervNVPROC glGetVertexAttribPointervNV = NULL; +glIsProgramNVPROC glIsProgramNV = NULL; +glLoadProgramNVPROC glLoadProgramNV = NULL; +glProgramParameter4fNVPROC glProgramParameter4fNV = NULL; +glProgramParameter4dNVPROC glProgramParameter4dNV = NULL; +glProgramParameter4dvNVPROC glProgramParameter4dvNV = NULL; +glProgramParameter4fvNVPROC glProgramParameter4fvNV = NULL; +glProgramParameters4dvNVPROC glProgramParameters4dvNV = NULL; +glProgramParameters4fvNVPROC glProgramParameters4fvNV = NULL; +glTrackMatrixNVPROC glTrackMatrixNV = NULL; +glVertexAttribPointerNVPROC glVertexAttribPointerNV = NULL; +glVertexAttrib1sNVPROC glVertexAttrib1sNV = NULL; +glVertexAttrib1fNVPROC glVertexAttrib1fNV = NULL; +glVertexAttrib1dNVPROC glVertexAttrib1dNV = NULL; +glVertexAttrib2sNVPROC glVertexAttrib2sNV = NULL; +glVertexAttrib2fNVPROC glVertexAttrib2fNV = NULL; +glVertexAttrib2dNVPROC glVertexAttrib2dNV = NULL; +glVertexAttrib3sNVPROC glVertexAttrib3sNV = NULL; +glVertexAttrib3fNVPROC glVertexAttrib3fNV = NULL; +glVertexAttrib3dNVPROC glVertexAttrib3dNV = NULL; +glVertexAttrib4sNVPROC glVertexAttrib4sNV = NULL; +glVertexAttrib4fNVPROC glVertexAttrib4fNV = NULL; +glVertexAttrib4dNVPROC glVertexAttrib4dNV = NULL; +glVertexAttrib4ubNVPROC glVertexAttrib4ubNV = NULL; +glVertexAttrib1svNVPROC glVertexAttrib1svNV = NULL; +glVertexAttrib1fvNVPROC glVertexAttrib1fvNV = NULL; +glVertexAttrib1dvNVPROC glVertexAttrib1dvNV = NULL; +glVertexAttrib2svNVPROC glVertexAttrib2svNV = NULL; +glVertexAttrib2fvNVPROC glVertexAttrib2fvNV = NULL; +glVertexAttrib2dvNVPROC glVertexAttrib2dvNV = NULL; +glVertexAttrib3svNVPROC glVertexAttrib3svNV = NULL; +glVertexAttrib3fvNVPROC glVertexAttrib3fvNV = NULL; +glVertexAttrib3dvNVPROC glVertexAttrib3dvNV = NULL; +glVertexAttrib4svNVPROC glVertexAttrib4svNV = NULL; +glVertexAttrib4fvNVPROC glVertexAttrib4fvNV = NULL; +glVertexAttrib4dvNVPROC glVertexAttrib4dvNV = NULL; +glVertexAttrib4ubvNVPROC glVertexAttrib4ubvNV = NULL; +glVertexAttribs1svNVPROC glVertexAttribs1svNV = NULL; +glVertexAttribs1fvNVPROC glVertexAttribs1fvNV = NULL; +glVertexAttribs1dvNVPROC glVertexAttribs1dvNV = NULL; +glVertexAttribs2svNVPROC glVertexAttribs2svNV = NULL; +glVertexAttribs2fvNVPROC glVertexAttribs2fvNV = NULL; +glVertexAttribs2dvNVPROC glVertexAttribs2dvNV = NULL; +glVertexAttribs3svNVPROC glVertexAttribs3svNV = NULL; +glVertexAttribs3fvNVPROC glVertexAttribs3fvNV = NULL; +glVertexAttribs3dvNVPROC glVertexAttribs3dvNV = NULL; +glVertexAttribs4svNVPROC glVertexAttribs4svNV = NULL; +glVertexAttribs4fvNVPROC glVertexAttribs4fvNV = NULL; +glVertexAttribs4dvNVPROC glVertexAttribs4dvNV = NULL; +glVertexAttribs4ubvNVPROC glVertexAttribs4ubvNV = NULL; +#endif /* GL_NV_vertex_program */ + +/* NV_fence */ + +#ifdef GL_NV_fence +glGenFencesNVPROC glGenFencesNV = NULL; +glDeleteFencesNVPROC glDeleteFencesNV = NULL; +glSetFenceNVPROC glSetFenceNV = NULL; +glTestFenceNVPROC glTestFenceNV = NULL; +glFinishFenceNVPROC glFinishFenceNV = NULL; +glIsFenceNVPROC glIsFenceNV = NULL; +glGetFenceivNVPROC glGetFenceivNV = NULL; +#endif /* GL_NV_fence */ + +/* NV_register_combiners2 */ + +#ifdef GL_NV_register_combiners2 +glCombinerStageParameterfvNVPROC glCombinerStageParameterfvNV = NULL; +glGetCombinerStageParameterfvNVPROC glGetCombinerStageParameterfvNV = NULL; +#endif /* GL_NV_register_combiners2 */ + +/* NV_evaluators */ + +#ifdef GL_NV_evaluators +glMapControlPointsNVPROC glMapControlPointsNV = NULL; +glMapParameterivNVPROC glMapParameterivNV = NULL; +glMapParameterfvNVPROC glMapParameterfvNV = NULL; +glGetMapControlPointsNVPROC glGetMapControlPointsNV = NULL; +glGetMapParameterivNVPROC glGetMapParameterivNV = NULL; +glGetMapParameterfvNVPROC glGetMapParameterfvNV = NULL; +glGetMapAttribParameterivNVPROC glGetMapAttribParameterivNV = NULL; +glGetMapAttribParameterfvNVPROC glGetMapAttribParameterfvNV = NULL; +glEvalMapsNVPROC glEvalMapsNV = NULL; +#endif /* GL_NV_evaluators */ + +/* ATI_pn_triangles */ + +#ifdef GL_ATI_pn_triangles +glPNTrianglesiATIPROC glPNTrianglesiATI = NULL; +glPNTrianglesfATIPROC glPNTrianglesfATI = NULL; +#endif /* GL_ATI_pn_triangles */ + +/* ARB_point_parameters */ + +#ifdef GL_ARB_point_parameters +glPointParameterfARBPROC glPointParameterfARB = NULL; +glPointParameterfvARBPROC glPointParameterfvARB = NULL; +#endif /* GL_ABR_point_parameters */ + +/* ARB_vertex_blend */ + +#ifdef GL_ARB_vertex_blend +glWeightbvARBPROC glWeightbvARB = NULL; +glWeightsvARBPROC glWeightsvARB = NULL; +glWeightivARBPROC glWeightivARB = NULL; +glWeightfvARBPROC glWeightfvARB = NULL; +glWeightdvARBPROC glWeightdvARB = NULL; +glWeightubvARBPROC glWeightubvARB = NULL; +glWeightusvARBPROC glWeightusvARB = NULL; +glWeightuivARBPROC glWeightuivARB = NULL; +glWeightPointerARBPROC glWeightPointerARB = NULL; +glVertexBlendARBPROC glVertexBlendARB = NULL; +#endif /* GL_ARB_vertex_blend */ + +/* EXT_multi_draw_arrays */ + +#ifdef GL_EXT_multi_draw_arrays +glMultiDrawArraysEXTPROC glMultiDrawArraysEXT = NULL; +glMultiDrawElementsEXTPROC glMultiDrawElementsEXT = NULL; +#endif /* GL_EXT_multi_draw_arrays */ + +/* ARB_matrix_palette */ + +#ifdef GL_ARB_matrix_palette +glCurrentPaletteMatrixARBPROC glCurrentPaletteMatrixARB = NULL; +glMatrixIndexubvARBPROC glMatrixIndexubvARB = NULL; +glMatrixIndexusvARBPROC glMatrixIndexusvARB = NULL; +glMatrixIndexuivARBPROC glMatrixIndexuivARB = NULL; +glMatrixIndexPointerARBPROC glMatrixIndexPointerARB = NULL; +#endif /* GL_ARB_matrix_palette */ + +/* EXT_vertex_shader */ + +#ifdef GL_EXT_vertex_shader +glBeginVertexShaderEXTPROC glBeginVertexShaderEXT = NULL; +glEndVertexShaderEXTPROC glEndVertexShaderEXT = NULL; +glBindVertexShaderEXTPROC glBindVertexShaderEXT = NULL; +glGenVertexShadersEXTPROC glGenVertexShadersEXT = NULL; +glDeleteVertexShaderEXTPROC glDeleteVertexShaderEXT = NULL; +glShaderOp1EXTPROC glShaderOp1EXT = NULL; +glShaderOp2EXTPROC glShaderOp2EXT = NULL; +glShaderOp3EXTPROC glShaderOp3EXT = NULL; +glSwizzleEXTPROC glSwizzleEXT = NULL; +glWriteMaskEXTPROC glWriteMaskEXT = NULL; +glInsertComponentEXTPROC glInsertComponentEXT = NULL; +glExtractComponentEXTPROC glExtractComponentEXT = NULL; +glGenSymbolsEXTPROC glGenSymbolsEXT = NULL; +glSetInvariantEXTPROC glSetInvariantEXT = NULL; +glSetLocalConstantEXTPROC glSetLocalConstantEXT = NULL; +glVariantbvEXTPROC glVariantbvEXT = NULL; +glVariantsvEXTPROC glVariantsvEXT = NULL; +glVariantivEXTPROC glVariantivEXT = NULL; +glVariantfvEXTPROC glVariantfvEXT = NULL; +glVariantdvEXTPROC glVariantdvEXT = NULL; +glVariantubvEXTPROC glVariantubvEXT = NULL; +glVariantusvEXTPROC glVariantusvEXT = NULL; +glVariantuivEXTPROC glVariantuivEXT = NULL; +glVariantPointerEXTPROC glVariantPointerEXT = NULL; +glEnableVariantClientStateEXTPROC glEnableVariantClientStateEXT = NULL; +glDisableVariantClientStateEXTPROC glDisableVariantClientStateEXT = NULL; +glBindLightParameterEXTPROC glBindLightParameterEXT = NULL; +glBindMaterialParameterEXTPROC glBindMaterialParameterEXT = NULL; +glBindTexGenParameterEXTPROC glBindTexGenParameterEXT = NULL; +glBindTextureUnitParameterEXTPROC glBindTextureUnitParameterEXT = NULL; +glBindParameterEXTPROC glBindParameterEXT = NULL; +glIsVariantEnabledEXTPROC glIsVariantEnabledEXT = NULL; +glGetVariantBooleanvEXTPROC glGetVariantBooleanvEXT = NULL; +glGetVariantIntegervEXTPROC glGetVariantIntegervEXT = NULL; +glGetVariantFloatvEXTPROC glGetVariantFloatvEXT = NULL; +glGetVariantPointervEXTPROC glGetVariantPointervEXT = NULL; +glGetInvariantBooleanvEXTPROC glGetInvariantBooleanvEXT = NULL; +glGetInvariantIntegervEXTPROC glGetInvariantIntegervEXT = NULL; +glGetInvariantFloatvEXTPROC glGetInvariantFloatvEXT = NULL; +glGetLocalConstantBooleanvEXTPROC glGetLocalConstantBooleanvEXT = NULL; +glGetLocalConstantIntegervEXTPROC glGetLocalConstantIntegervEXT = NULL; +glGetLocalConstantFloatvEXTPROC glGetLocalConstantFloatvEXT = NULL; +#endif /* GL_EXT_vertex_shader */ + +/* ATI_envmap_bumpmap */ + +#ifdef GL_ATI_envmap_bumpmap +glTexBumpParameterivATIPROC glTexBumpParameterivATI = NULL; +glTexBumpParameterfvATIPROC glTexBumpParameterfvATI = NULL; +glGetTexBumpParameterivATIPROC glGetTexBumpParameterivATI = NULL; +glGetTexBumpParameterfvATIPROC glGetTexBumpParameterfvATI = NULL; +#endif /* GL_ATI_envmap_bumpmap */ + +/* ATI_fragment_shader */ + +#ifdef GL_ATI_fragment_shader +glGenFragmentShadersATIPROC glGenFragmentShadersATI = NULL; +glBindFragmentShaderATIPROC glBindFragmentShaderATI = NULL; +glDeleteFragmentShaderATIPROC glDeleteFragmentShaderATI = NULL; +glBeginFragmentShaderATIPROC glBeginFragmentShaderATI = NULL; +glEndFragmentShaderATIPROC glEndFragmentShaderATI = NULL; +glPassTexCoordATIPROC glPassTexCoordATI = NULL; +glSampleMapATIPROC glSampleMapATI = NULL; +glColorFragmentOp1ATIPROC glColorFragmentOp1ATI = NULL; +glColorFragmentOp2ATIPROC glColorFragmentOp2ATI = NULL; +glColorFragmentOp3ATIPROC glColorFragmentOp3ATI = NULL; +glAlphaFragmentOp1ATIPROC glAlphaFragmentOp1ATI = NULL; +glAlphaFragmentOp2ATIPROC glAlphaFragmentOp2ATI = NULL; +glAlphaFragmentOp3ATIPROC glAlphaFragmentOp3ATI = NULL; +glSetFragmentShaderConstantATIPROC glSetFragmentShaderConstantATI = NULL; +#endif /* GL_ATI_fragment_shader */ + +/* ATI_element_array */ + +#ifdef GL_ATI_element_array +glElementPointerATIPROC glElementPointerATI = NULL; +glDrawElementArrayATIPROC glDrawElementArrayATI = NULL; +glDrawRangeElementArrayATIPROC glDrawRangeElementArrayATI = NULL; +#endif /* GL_ATI_element_array */ + +/* ATI_vertex_streams */ + +#ifdef GL_ATI_vertex_streams +glClientActiveVertexStreamATIPROC glClientActiveVertexStreamATI = NULL; +glVertexBlendEnviATIPROC glVertexBlendEnviATI = NULL; +glVertexBlendEnvfATIPROC glVertexBlendEnvfATI = NULL; +glVertexStream2sATIPROC glVertexStream2sATI = NULL; +glVertexStream2svATIPROC glVertexStream2svATI = NULL; +glVertexStream2iATIPROC glVertexStream2iATI = NULL; +glVertexStream2ivATIPROC glVertexStream2ivATI = NULL; +glVertexStream2fATIPROC glVertexStream2fATI = NULL; +glVertexStream2fvATIPROC glVertexStream2fvATI = NULL; +glVertexStream2dATIPROC glVertexStream2dATI = NULL; +glVertexStream2dvATIPROC glVertexStream2dvATI = NULL; +glVertexStream3sATIPROC glVertexStream3sATI = NULL; +glVertexStream3svATIPROC glVertexStream3svATI = NULL; +glVertexStream3iATIPROC glVertexStream3iATI = NULL; +glVertexStream3ivATIPROC glVertexStream3ivATI = NULL; +glVertexStream3fATIPROC glVertexStream3fATI = NULL; +glVertexStream3fvATIPROC glVertexStream3fvATI = NULL; +glVertexStream3dATIPROC glVertexStream3dATI = NULL; +glVertexStream3dvATIPROC glVertexStream3dvATI = NULL; +glVertexStream4sATIPROC glVertexStream4sATI = NULL; +glVertexStream4svATIPROC glVertexStream4svATI = NULL; +glVertexStream4iATIPROC glVertexStream4iATI = NULL; +glVertexStream4ivATIPROC glVertexStream4ivATI = NULL; +glVertexStream4fATIPROC glVertexStream4fATI = NULL; +glVertexStream4fvATIPROC glVertexStream4fvATI = NULL; +glVertexStream4dATIPROC glVertexStream4dATI = NULL; +glVertexStream4dvATIPROC glVertexStream4dvATI = NULL; +glNormalStream3bATIPROC glNormalStream3bATI = NULL; +glNormalStream3bvATIPROC glNormalStream3bvATI = NULL; +glNormalStream3sATIPROC glNormalStream3sATI = NULL; +glNormalStream3svATIPROC glNormalStream3svATI = NULL; +glNormalStream3iATIPROC glNormalStream3iATI = NULL; +glNormalStream3ivATIPROC glNormalStream3ivATI = NULL; +glNormalStream3fATIPROC glNormalStream3fATI = NULL; +glNormalStream3fvATIPROC glNormalStream3fvATI = NULL; +glNormalStream3dATIPROC glNormalStream3dATI = NULL; +glNormalStream3dvATIPROC glNormalStream3dvATI = NULL; +#endif /* GL_ATI_vertex_streams */ + +/* ATI_vertex_array_object */ + +#ifdef GL_ATI_vertex_array_object +glNewObjectBufferATIPROC glNewObjectBufferATI = NULL; +glIsObjectBufferATIPROC glIsObjectBufferATI = NULL; +glUpdateObjectBufferATIPROC glUpdateObjectBufferATI = NULL; +glGetObjectBufferfvATIPROC glGetObjectBufferfvATI = NULL; +glGetObjectBufferivATIPROC glGetObjectBufferivATI = NULL; +glFreeObjectBufferATIPROC glFreeObjectBufferATI = NULL; +glArrayObjectATIPROC glArrayObjectATI = NULL; +glGetArrayObjectfvATIPROC glGetArrayObjectfvATI = NULL; +glGetArrayObjectivATIPROC glGetArrayObjectivATI = NULL; +glVariantArrayObjectATIPROC glVariantArrayObjectATI = NULL; +glGetVariantArrayObjectfvATIPROC glGetVariantArrayObjectfvATI = NULL; +glGetVariantArrayObjectivATIPROC glGetVariantArrayObjectivATI = NULL; +#endif /* GL_ATI_vertex_array_object */ + +/* NV_occlusion_query */ + +#ifdef GL_NV_occlusion_query +glGenOcclusionQueriesNVPROC glGenOcclusionQueriesNV = NULL; +glDeleteOcclusionQueriesNVPROC glDeleteOcclusionQueriesNV = NULL; +glIsOcclusionQueryNVPROC glIsOcclusionQueryNV = NULL; +glBeginOcclusionQueryNVPROC glBeginOcclusionQueryNV = NULL; +glEndOcclusionQueryNVPROC glEndOcclusionQueryNV = NULL; +glGetOcclusionQueryivNVPROC glGetOcclusionQueryivNV = NULL; +glGetOcclusionQueryuivNVPROC glGetOcclusionQueryuivNV = NULL; +#endif /* GL_NV_occlusion_query */ + +/* NV_point_sprite */ + +#ifdef GL_NV_point_sprite +glPointParameteriNVPROC glPointParameteriNV = NULL; +glPointParameterivNVPROC glPointParameterivNV = NULL; +#endif /* GL_NV_point_sprite */ + +/* ARB_window_pos */ + +#ifdef GL_ARB_window_pos +glWindowPos2dARBPROC glWindowPos2dARB = NULL; +glWindowPos2fARBPROC glWindowPos2fARB = NULL; +glWindowPos2iARBPROC glWindowPos2iARB = NULL; +glWindowPos2sARBPROC glWindowPos2sARB = NULL; +glWindowPos2dvARBPROC glWindowPos2dvARB = NULL; +glWindowPos2fvARBPROC glWindowPos2fvARB = NULL; +glWindowPos2ivARBPROC glWindowPos2ivARB = NULL; +glWindowPos2svARBPROC glWindowPos2svARB = NULL; +glWindowPos3dARBPROC glWindowPos3dARB = NULL; +glWindowPos3fARBPROC glWindowPos3fARB = NULL; +glWindowPos3iARBPROC glWindowPos3iARB = NULL; +glWindowPos3sARBPROC glWindowPos3sARB = NULL; +glWindowPos3dvARBPROC glWindowPos3dvARB = NULL; +glWindowPos3fvARBPROC glWindowPos3fvARB = NULL; +glWindowPos3ivARBPROC glWindowPos3ivARB = NULL; +glWindowPos3svARBPROC glWindowPos3svARB = NULL; +#endif /* GL_ARB_window_pos */ + +/* EXT_draw_range_elements */ + +#ifdef GL_EXT_draw_range_elements +glDrawRangeElementsEXTPROC glDrawRangeElementsEXT = NULL; +#endif /* GL_EXT_draw_range_elements */ + +/* EXT_stencil_two_side */ + +#ifdef GL_EXT_stencil_two_side +glActiveStencilFaceEXTPROC glActiveStencilFaceEXT = NULL; +#endif /* GL_EXT_stencil_two_side */ + +/* ARB_vertex_program */ + +#ifdef GL_ARB_vertex_program +glVertexAttrib1sARBPROC glVertexAttrib1sARB = NULL; +glVertexAttrib1fARBPROC glVertexAttrib1fARB = NULL; +glVertexAttrib1dARBPROC glVertexAttrib1dARB = NULL; +glVertexAttrib2sARBPROC glVertexAttrib2sARB = NULL; +glVertexAttrib2fARBPROC glVertexAttrib2fARB = NULL; +glVertexAttrib2dARBPROC glVertexAttrib2dARB = NULL; +glVertexAttrib3sARBPROC glVertexAttrib3sARB = NULL; +glVertexAttrib3fARBPROC glVertexAttrib3fARB = NULL; +glVertexAttrib3dARBPROC glVertexAttrib3dARB = NULL; +glVertexAttrib4sARBPROC glVertexAttrib4sARB = NULL; +glVertexAttrib4fARBPROC glVertexAttrib4fARB = NULL; +glVertexAttrib4dARBPROC glVertexAttrib4dARB = NULL; +glVertexAttrib4NubARBPROC glVertexAttrib4NubARB = NULL; +glVertexAttrib1svARBPROC glVertexAttrib1svARB = NULL; +glVertexAttrib1fvARBPROC glVertexAttrib1fvARB = NULL; +glVertexAttrib1dvARBPROC glVertexAttrib1dvARB = NULL; +glVertexAttrib2svARBPROC glVertexAttrib2svARB = NULL; +glVertexAttrib2fvARBPROC glVertexAttrib2fvARB = NULL; +glVertexAttrib2dvARBPROC glVertexAttrib2dvARB = NULL; +glVertexAttrib3svARBPROC glVertexAttrib3svARB = NULL; +glVertexAttrib3fvARBPROC glVertexAttrib3fvARB = NULL; +glVertexAttrib3dvARBPROC glVertexAttrib3dvARB = NULL; +glVertexAttrib4bvARBPROC glVertexAttrib4bvARB = NULL; +glVertexAttrib4svARBPROC glVertexAttrib4svARB = NULL; +glVertexAttrib4ivARBPROC glVertexAttrib4ivARB = NULL; +glVertexAttrib4ubvARBPROC glVertexAttrib4ubvARB = NULL; +glVertexAttrib4usvARBPROC glVertexAttrib4usvARB = NULL; +glVertexAttrib4uivARBPROC glVertexAttrib4uivARB = NULL; +glVertexAttrib4fvARBPROC glVertexAttrib4fvARB = NULL; +glVertexAttrib4dvARBPROC glVertexAttrib4dvARB = NULL; +glVertexAttrib4NbvARBPROC glVertexAttrib4NbvARB = NULL; +glVertexAttrib4NsvARBPROC glVertexAttrib4NsvARB = NULL; +glVertexAttrib4NivARBPROC glVertexAttrib4NivARB = NULL; +glVertexAttrib4NubvARBPROC glVertexAttrib4NubvARB = NULL; +glVertexAttrib4NusvARBPROC glVertexAttrib4NusvARB = NULL; +glVertexAttrib4NuivARBPROC glVertexAttrib4NuivARB = NULL; +glVertexAttribPointerARBPROC glVertexAttribPointerARB = NULL; +glEnableVertexAttribArrayARBPROC glEnableVertexAttribArrayARB = NULL; +glDisableVertexAttribArrayARBPROC glDisableVertexAttribArrayARB = NULL; +glProgramStringARBPROC glProgramStringARB = NULL; +glBindProgramARBPROC glBindProgramARB = NULL; +glDeleteProgramsARBPROC glDeleteProgramsARB = NULL; +glGenProgramsARBPROC glGenProgramsARB = NULL; +glProgramEnvParameter4dARBPROC glProgramEnvParameter4dARB = NULL; +glProgramEnvParameter4dvARBPROC glProgramEnvParameter4dvARB = NULL; +glProgramEnvParameter4fARBPROC glProgramEnvParameter4fARB = NULL; +glProgramEnvParameter4fvARBPROC glProgramEnvParameter4fvARB = NULL; +glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB = NULL; +glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB = NULL; +glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB = NULL; +glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB = NULL; +glGetProgramEnvParameterdvARBPROC glGetProgramEnvParameterdvARB = NULL; +glGetProgramEnvParameterfvARBPROC glGetProgramEnvParameterfvARB = NULL; +glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB = NULL; +glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB = NULL; +glGetProgramivARBPROC glGetProgramivARB = NULL; +glGetProgramStringARBPROC glGetProgramStringARB = NULL; +glGetVertexAttribdvARBPROC glGetVertexAttribdvARB = NULL; +glGetVertexAttribfvARBPROC glGetVertexAttribfvARB = NULL; +glGetVertexAttribivARBPROC glGetVertexAttribivARB = NULL; +glGetVertexAttribPointervARBPROC glGetVertexAttribPointervARB = NULL; +glIsProgramARBPROC glIsProgramARB = NULL; +#endif /* GL_ARB_vertex_program */ + +/* EXT_cull_vertex */ + +#ifdef GL_EXT_cull_vertex +glCullParameterfvEXTPROC glCullParameterfvEXT = NULL; +glCullParameterdvEXTPROC glCullParameterdvEXT = NULL; +#endif /* GL_EXT_cull_vertex */ + +#ifdef GL_EXT_blend_function_sepatate +glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT = NULL; +glBlendFuncSeparateINGRPROC glBlendFuncSeparateINGR = NULL; +#endif /* GL_EXT_blend_func_separate */ + +#ifdef _WIN32 +#ifdef GL_VERSION_1_4 +/*#ifndef GL_VERSION_1_2 +glBlendColorPROC glBlendColor = NULL; +glBlendEquationPROC glBlendEquation = NULL; +#endif *//* GL_VERSION_1_2 */ +glFogCoordfPROC glFogCoordf = NULL; +glFogCoordfvPROC glFogCoordfv = NULL; +glFogCoorddPROC glFogCoordd = NULL; +glFogCoorddvPROC glFogCoorddv = NULL; +glFogCoordPointerPROC glFogCoordPointer = NULL; +glMultiDrawArraysPROC glMultiDrawArrays = NULL; +glMultiDrawElementsPROC glMultiDrawElements = NULL; +glPointParameterfPROC glPointParameterf = NULL; +glPointParameterfvPROC glPointParameterfv = NULL; +glSecondaryColor3bPROC glSecondaryColor3b = NULL; +glSecondaryColor3bvPROC glSecondaryColor3bv = NULL; +glSecondaryColor3dPROC glSecondaryColor3d = NULL; +glSecondaryColor3dvPROC glSecondaryColor3dv = NULL; +glSecondaryColor3fPROC glSecondaryColor3f = NULL; +glSecondaryColor3fvPROC glSecondaryColor3fv = NULL; +glSecondaryColor3iPROC glSecondaryColor3i = NULL; +glSecondaryColor3ivPROC glSecondaryColor3iv = NULL; +glSecondaryColor3sPROC glSecondaryColor3s = NULL; +glSecondaryColor3svPROC glSecondaryColor3sv = NULL; +glSecondaryColor3ubPROC glSecondaryColor3ub = NULL; +glSecondaryColor3ubvPROC glSecondaryColor3ubv = NULL; +glSecondaryColor3uiPROC glSecondaryColor3ui = NULL; +glSecondaryColor3uivPROC glSecondaryColor3uiv = NULL; +glSecondaryColor3usPROC glSecondaryColor3us = NULL; +glSecondaryColor3usvPROC glSecondaryColor3usv = NULL; +glSecondaryColorPointerPROC glSecondaryColorPointer = NULL; +glBlendFuncSeparatePROC glBlendFuncSeparate = NULL; +glWindowPos2dPROC glWindowPos2d = NULL; +glWindowPos2fPROC glWindowPos2f = NULL; +glWindowPos2iPROC glWindowPos2i = NULL; +glWindowPos2sPROC glWindowPos2s = NULL; +glWindowPos2dvPROC glWindowPos2dv = NULL; +glWindowPos2fvPROC glWindowPos2fv = NULL; +glWindowPos2ivPROC glWindowPos2iv = NULL; +glWindowPos2svPROC glWindowPos2sv = NULL; +glWindowPos3dPROC glWindowPos3d = NULL; +glWindowPos3fPROC glWindowPos3f = NULL; +glWindowPos3iPROC glWindowPos3i = NULL; +glWindowPos3sPROC glWindowPos3s = NULL; +glWindowPos3dvPROC glWindowPos3dv = NULL; +glWindowPos3fvPROC glWindowPos3fv = NULL; +glWindowPos3ivPROC glWindowPos3iv = NULL; +glWindowPos3svPROC glWindowPos3sv = NULL; +#endif /* GL_VERSION_1_4 */ +#endif /* WIN32 */ + +#ifdef GL_EXT_blend_func_separate +glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT = NULL; +#endif /* GL_EXT_blend_func_separate */ + + +#ifdef GL_NV_element_array +glElementPointerNVPROC glElementPointerNV = NULL; +glDrawElementArrayNVPROC glDrawElementArrayNV = NULL; +glDrawRangeElementArrayNVPROC glDrawRangeElementArrayNV = NULL; +glMultiDrawElementArrayNVPROC glMultiDrawElementArrayNV = NULL; +glMultiDrawRangeElementArrayNVPROC glMultiDrawRangeElementArrayNV = NULL; +#endif /* GL_NV_element_array */ + +#ifdef GL_NV_fragment_program +glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV = NULL; +glProgramNamedParameter4dNVPROC glProgramNamedParameter4dNV = NULL; +glProgramNamedParameter4fvNVPROC glProgramNamedParameter4fvNV = NULL; +glProgramNamedParameter4dvNVPROC glProgramNamedParameter4dvNV = NULL; +glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV = NULL; +glGetProgramNamedParameterdvNVPROC glGetProgramNamedParameterdvNV = NULL; +#ifndef GL_ARB_vertex_program +glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB = NULL; +glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB = NULL; +glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB = NULL; +glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB = NULL; +glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB = NULL; +glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB = NULL; +#endif /* GL_ARB_vertex_program */ +#endif /* GL_NV_fragment_program */ + + +#ifdef GL_NV_primitive_restart +glPrimitiveRestartNVPROC glPrimitiveRestartNV = NULL; +glPrimitiveRestartIndexNVPROC glPrimitiveRestartIndexNV = NULL; +#endif /* GL_NV_primitive_restart */ + +// added -ec +#ifdef GL_ATI_draw_buffers +PFNGLDRAWBUFFERS glDrawBuffersATI; +#endif + +static int extgl_error = 0; + +struct ExtensionTypes extgl_Extensions; + +struct ExtensionTypes SupportedExtensions; /* deprecated, please do not use */ + + +/* getProcAddress */ + +void *extgl_GetProcAddress(const char *name) +{ +#ifdef _WIN32 + void *t = wglGetProcAddress(name); + if (t == NULL) + { + extgl_error = 1; + } + return t; +#else + void *t = (void*)glXGetProcAddressARB((GLubyte *)name); + if (t == NULL) + { + extgl_error = 1; + } + return t; +#endif +} + +/*-----------------------------------------------------*/ +/* WGL stuff */ +/*-----------------------------------------------------*/ + +#ifdef _WIN32 + +/** returns true if the extention is available */ +int QueryWGLExtension(const char *name) +{ + const GLubyte *extensions; + const GLubyte *start; + GLubyte *where, *terminator; + + /* Extension names should not have spaces. */ + where = (GLubyte *) strchr(name, ' '); + if (where || *name == '\0') + return 0; + if (wglGetExtensionsStringARB == NULL) + if (wglGetExtensionsStringEXT == NULL) + return 0; + else + extensions = (GLubyte*)wglGetExtensionsStringEXT(); + else + extensions = (GLubyte*)wglGetExtensionsStringARB(wglGetCurrentDC()); + /* It takes a bit of care to be fool-proof about parsing the + OpenGL extensions string. Don't be fooled by sub-strings, + etc. */ + start = extensions; + for (;;) + { + where = (GLubyte *) strstr((const char *) start, name); + if (!where) + break; + terminator = where + strlen(name); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') + return 1; + start = terminator; + } + return 0; +} + +void extgl_InitWGLARBBufferRegion() +{ +#ifdef WGL_ARB_buffer_region + if (!extgl_Extensions.wgl.ARB_buffer_region) + return; + wglCreateBufferRegionARB = (wglCreateBufferRegionARBPROC) extgl_GetProcAddress("wglCreateBufferRegionARB"); + wglDeleteBufferRegionARB = (wglDeleteBufferRegionARBPROC) extgl_GetProcAddress("wglDeleteBufferRegionARB"); + wglSaveBufferRegionARB = (wglSaveBufferRegionARBPROC) extgl_GetProcAddress("wglSaveBufferRegionARB"); + wglRestoreBufferRegionARB = (wglRestoreBufferRegionARBPROC) extgl_GetProcAddress("wglRestoreBufferRegionARB"); +#endif +} + +void extgl_InitWGLARBPbuffer() +{ +#ifdef WGL_ARB_pbuffer + if (!extgl_Extensions.wgl.ARB_pbuffer) + return; + wglCreatePbufferARB = (wglCreatePbufferARBPROC) extgl_GetProcAddress("wglCreatePbufferARB"); + wglGetPbufferDCARB = (wglGetPbufferDCARBPROC) extgl_GetProcAddress("wglGetPbufferDCARB"); + wglReleasePbufferDCARB = (wglReleasePbufferDCARBPROC) extgl_GetProcAddress("wglReleasePbufferDCARB"); + wglDestroyPbufferARB = (wglDestroyPbufferARBPROC) extgl_GetProcAddress("wglDestroyPbufferARB"); + wglQueryPbufferARB = (wglQueryPbufferARBPROC) extgl_GetProcAddress("wglQueryPbufferARB"); +#endif +} + +void extgl_InitWGLARBPixelFormat() +{ +#ifdef WGL_ARB_pixel_format + if (!extgl_Extensions.wgl.ARB_pixel_format) + return; + wglGetPixelFormatAttribivARB = (wglGetPixelFormatAttribivARBPROC) extgl_GetProcAddress("wglGetPixelFormatAttribivARB"); + wglGetPixelFormatAttribfvARB = (wglGetPixelFormatAttribfvARBPROC) extgl_GetProcAddress("wglGetPixelFormatAttribfvARB"); + wglChoosePixelFormatARB = (wglChoosePixelFormatARBPROC) extgl_GetProcAddress("wglChoosePixelFormatARB"); +#endif +} + +void extgl_InitWGLARBRenderTexture() +{ +#ifdef WGL_ARB_render_texture + if (!extgl_Extensions.wgl.ARB_render_texture) + return; + wglBindTexImageARB = (wglBindTexImageARBPROC) extgl_GetProcAddress("wglBindTexImageARB"); + wglReleaseTexImageARB = (wglReleaseTexImageARBPROC) extgl_GetProcAddress("wglReleaseTexImageARB"); + wglSetPbufferAttribARB = (wglSetPbufferAttribARBPROC) extgl_GetProcAddress("wglSetPbufferAttribARB"); +#endif +} + +void extgl_InitWGLEXTSwapControl() +{ +#ifdef WGL_EXT_swap_control + if (!extgl_Extensions.wgl.EXT_swap_control) + return; + wglSwapIntervalEXT = (wglSwapIntervalEXTPROC) extgl_GetProcAddress("wglSwapIntervalEXT"); + wglGetSwapIntervalEXT = (wglGetSwapIntervalEXTPROC) extgl_GetProcAddress("wglGetSwapIntervalEXT"); +#endif +} + +void extgl_InitWGLARBMakeCurrentRead() +{ +#ifdef WGL_ARB_make_current_read + if (!extgl_Extensions.wgl.ARB_make_current_read) + return; + wglMakeContextCurrentARB = (wglMakeContextCurrentARBPROC) extgl_GetProcAddress("wglMakeContextCurrentARB"); + wglGetCurrentReadDCARB = (wglGetCurrentReadDCARBPROC) extgl_GetProcAddress("wglGetCurrentReadDCARB"); +#endif +} + +void extgl_InitSupportedWGLExtensions() +{ + extgl_Extensions.wgl.ARB_buffer_region = QueryWGLExtension("WGL_ARB_buffer_region"); + extgl_Extensions.wgl.ARB_make_current_read = QueryWGLExtension("WGL_ARB_make_current_read"); + extgl_Extensions.wgl.ARB_multisample = QueryWGLExtension("WGL_ARB_multisample"); + extgl_Extensions.wgl.ARB_pbuffer = QueryWGLExtension("WGL_ARB_pbuffer"); + extgl_Extensions.wgl.ARB_pixel_format = QueryWGLExtension("WGL_ARB_pixel_format"); + extgl_Extensions.wgl.ARB_render_texture = QueryWGLExtension("WGL_ARB_render_texture"); + extgl_Extensions.wgl.EXT_swap_control = QueryWGLExtension("WGL_EXT_swap_control"); + extgl_Extensions.wgl.NV_render_depth_texture = QueryWGLExtension("WGL_NV_render_depth_texture"); + extgl_Extensions.wgl.NV_render_texture_rectangle = QueryWGLExtension("WGL_NV_render_texture_rectangle"); + extgl_Extensions.wgl.ATI_pixel_format_float = QueryWGLExtension("WGL_ATI_pixel_format_float"); // added -ec +} + +int extgl_InitializeWGL() +{ + extgl_error = 0; + wglGetExtensionsStringARB = (wglGetExtensionsStringARBPROC) extgl_GetProcAddress("wglGetExtensionsStringARB"); + wglGetExtensionsStringEXT = (wglGetExtensionsStringEXTPROC) extgl_GetProcAddress("wglGetExtensionsStringEXT"); + extgl_Extensions.wgl.ARB_extensions_string = wglGetExtensionsStringARB != NULL; + extgl_Extensions.wgl.EXT_extensions_string = wglGetExtensionsStringEXT != NULL; + extgl_error = 0; + + extgl_InitSupportedWGLExtensions(); + + + extgl_InitWGLARBMakeCurrentRead(); + extgl_InitWGLEXTSwapControl(); + extgl_InitWGLARBRenderTexture(); + extgl_InitWGLARBPixelFormat(); + extgl_InitWGLARBPbuffer(); + extgl_InitWGLARBBufferRegion(); + + return extgl_error; +} + +#endif /* WIN32 */ + +/*-----------------------------------------------------*/ +/* WGL stuff END*/ +/*-----------------------------------------------------*/ + +/** returns true if the extention is available */ +int QueryExtension(const char *name) +{ + const GLubyte *extensions; + const GLubyte *start; + GLubyte *where, *terminator; + + /* Extension names should not have spaces. */ + where = (GLubyte *) strchr(name, ' '); + if (where || *name == '\0') + return 0; + extensions = glGetString(GL_EXTENSIONS); + /* It takes a bit of care to be fool-proof about parsing the + OpenGL extensions string. Don't be fooled by sub-strings, + etc. */ + start = extensions; + for (;;) + { + where = (GLubyte *) strstr((const char *) start, name); + if (!where) + break; + terminator = where + strlen(name); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') + return 1; + start = terminator; + } + return 0; +} + +// added -ec +/* ATI_draw_buffers */ +void extgl_InitATIDrawBuffers() +{ +#ifdef GL_ATI_draw_buffers + if (!extgl_Extensions.ATI_draw_buffers) + return; + glDrawBuffersATI = (PFNGLDRAWBUFFERS) extgl_GetProcAddress("glDrawBuffersATI"); +#endif +} + +void extgl_InitARBFragmentProgram() +{ +#ifdef GL_ARB_fragment_program + if (!extgl_Extensions.ARB_fragment_program) + return; + glProgramStringARB = (glProgramStringARBPROC) extgl_GetProcAddress("glProgramStringARB"); + glBindProgramARB = (glBindProgramARBPROC) extgl_GetProcAddress("glBindProgramARB"); + glDeleteProgramsARB = (glDeleteProgramsARBPROC) extgl_GetProcAddress("glDeleteProgramsARB"); + glGenProgramsARB = (glGenProgramsARBPROC) extgl_GetProcAddress("glGenProgramsARB"); + glProgramEnvParameter4dARB = (glProgramEnvParameter4dARBPROC) extgl_GetProcAddress("glProgramEnvParameter4dARB"); + glProgramEnvParameter4dvARB = (glProgramEnvParameter4dvARBPROC) extgl_GetProcAddress("glProgramEnvParameter4dvARB"); + glProgramEnvParameter4fARB = (glProgramEnvParameter4fARBPROC) extgl_GetProcAddress("glProgramEnvParameter4fARB"); + glProgramEnvParameter4fvARB = (glProgramEnvParameter4fvARBPROC) extgl_GetProcAddress("glProgramEnvParameter4fvARB"); + glProgramLocalParameter4dARB = (glProgramLocalParameter4dARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dARB"); + glProgramLocalParameter4dvARB = (glProgramLocalParameter4dvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dvARB"); + glProgramLocalParameter4fARB = (glProgramLocalParameter4fARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fARB"); + glProgramLocalParameter4fvARB = (glProgramLocalParameter4fvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fvARB"); + glGetProgramEnvParameterdvARB = (glGetProgramEnvParameterdvARBPROC) extgl_GetProcAddress("glGetProgramEnvParameterdvARB"); + glGetProgramEnvParameterfvARB = (glGetProgramEnvParameterfvARBPROC) extgl_GetProcAddress("glGetProgramEnvParameterfvARB"); + glGetProgramLocalParameterdvARB = (glGetProgramLocalParameterdvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterdvARB"); + glGetProgramLocalParameterfvARB = (glGetProgramLocalParameterfvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterfvARB"); + glGetProgramivARB = (glGetProgramivARBPROC) extgl_GetProcAddress("glGetProgramivARB"); + glGetProgramStringARB = (glGetProgramStringARBPROC) extgl_GetProcAddress("glGetProgramStringARB"); + glIsProgramARB = (glIsProgramARBPROC) extgl_GetProcAddress("glIsProgramARB"); +#endif +} + +void extgl_InitNVPrimitiveRestart() +{ +#ifdef GL_NV_primitive_restart + if (!extgl_Extensions.NV_primitive_restart) + return; + glPrimitiveRestartNV = (glPrimitiveRestartNVPROC) extgl_GetProcAddress("glPrimitiveRestartNV"); + glPrimitiveRestartIndexNV = (glPrimitiveRestartIndexNVPROC) extgl_GetProcAddress("glPrimitiveRestartIndexNV"); +#endif /* GL_NV_primitive_restart */ +} + +void extgl_InitNVFragmentProgram() +{ +#ifdef GL_NV_fragment_program + if (!extgl_Extensions.NV_fragment_program) + return; + glProgramNamedParameter4fNV = (glProgramNamedParameter4fNVPROC) extgl_GetProcAddress("glProgramNamedParameter4fNV"); + glProgramNamedParameter4dNV = (glProgramNamedParameter4dNVPROC) extgl_GetProcAddress("glProgramNamedParameter4dNV"); + glProgramNamedParameter4fvNV = (glProgramNamedParameter4fvNVPROC) extgl_GetProcAddress("glProgramNamedParameter4fvNV"); + glProgramNamedParameter4dvNV = (glProgramNamedParameter4dvNVPROC) extgl_GetProcAddress("glProgramNamedParameter4dvNV"); + glGetProgramNamedParameterfvNV = (glGetProgramNamedParameterfvNVPROC) extgl_GetProcAddress("glGetProgramNamedParameterfvNV"); + glGetProgramNamedParameterdvNV = (glGetProgramNamedParameterdvNVPROC) extgl_GetProcAddress("glGetProgramNamedParameterdvNV"); +#ifndef GL_ARB_vertex_program + glProgramLocalParameter4dARB = (glProgramLocalParameter4dARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dARB"); + glProgramLocalParameter4dvARB = (glProgramLocalParameter4dvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dvARB"); + glProgramLocalParameter4fARB = (glProgramLocalParameter4fARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fARB"); + glProgramLocalParameter4fvARB = (glProgramLocalParameter4fvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fvARB"); + glGetProgramLocalParameterdvARB = (glGetProgramLocalParameterdvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterdvARB"); + glGetProgramLocalParameterfvARB = (glGetProgramLocalParameterfvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterfvARB"); +#endif /* GL_ARB_vertex_program */ +#endif /* GL_NV_fragment_program */ +} + +void extgl_InitNVElementArray() +{ +#ifdef GL_NV_element_array + if (!extgl_Extensions.NV_element_array) + return; + glElementPointerNV = (glElementPointerNVPROC) extgl_GetProcAddress("glElementPointerNV"); + glDrawElementArrayNV = (glDrawElementArrayNVPROC) extgl_GetProcAddress("glDrawElementArrayNV"); + glDrawRangeElementArrayNV = (glDrawRangeElementArrayNVPROC) extgl_GetProcAddress("glDrawRangeElementArrayNV"); + glMultiDrawElementArrayNV = (glMultiDrawElementArrayNVPROC) extgl_GetProcAddress("glMultiDrawElementArrayNV"); + glMultiDrawRangeElementArrayNV = (glMultiDrawRangeElementArrayNVPROC) extgl_GetProcAddress("glMultiDrawRangeElementArrayNV"); +#endif +} + + +void extgl_InitEXTBlendFuncSeparate() +{ +#ifdef GL_EXT_blend_func_separate + if (!extgl_Extensions.EXT_blend_func_separate) + return; + glBlendFuncSeparateEXT = (glBlendFuncSeparateEXTPROC) extgl_GetProcAddress("glBlendFuncSeparateEXT"); +#endif +} + +void extgl_InitEXTCullVertex() +{ +#ifdef GL_EXT_cull_vertex + if (!extgl_Extensions.EXT_cull_vertex) + return; + glCullParameterfvEXT = (glCullParameterfvEXTPROC) extgl_GetProcAddress("glCullParameterfvEXT"); + glCullParameterdvEXT = (glCullParameterdvEXTPROC) extgl_GetProcAddress("glCullParameterdvEXT"); +#endif +} + +void extgl_InitARBVertexProgram() +{ +#ifdef GL_ARB_vertex_program + if (!extgl_Extensions.ARB_vertex_program) + return; + glVertexAttrib1sARB = (glVertexAttrib1sARBPROC) extgl_GetProcAddress("glVertexAttrib1sARB"); + glVertexAttrib1fARB = (glVertexAttrib1fARBPROC) extgl_GetProcAddress("glVertexAttrib1fARB"); + glVertexAttrib1dARB = (glVertexAttrib1dARBPROC) extgl_GetProcAddress("glVertexAttrib1dARB"); + glVertexAttrib2sARB = (glVertexAttrib2sARBPROC) extgl_GetProcAddress("glVertexAttrib2sARB"); + glVertexAttrib2fARB = (glVertexAttrib2fARBPROC) extgl_GetProcAddress("glVertexAttrib2fARB"); + glVertexAttrib2dARB = (glVertexAttrib2dARBPROC) extgl_GetProcAddress("glVertexAttrib2dARB"); + glVertexAttrib3sARB = (glVertexAttrib3sARBPROC) extgl_GetProcAddress("glVertexAttrib3sARB"); + glVertexAttrib3fARB = (glVertexAttrib3fARBPROC) extgl_GetProcAddress("glVertexAttrib3fARB"); + glVertexAttrib3dARB = (glVertexAttrib3dARBPROC) extgl_GetProcAddress("glVertexAttrib3dARB"); + glVertexAttrib4sARB = (glVertexAttrib4sARBPROC) extgl_GetProcAddress("glVertexAttrib4sARB"); + glVertexAttrib4fARB = (glVertexAttrib4fARBPROC) extgl_GetProcAddress("glVertexAttrib4fARB"); + glVertexAttrib4dARB = (glVertexAttrib4dARBPROC) extgl_GetProcAddress("glVertexAttrib4dARB"); + glVertexAttrib4NubARB = (glVertexAttrib4NubARBPROC) extgl_GetProcAddress("glVertexAttrib4NubARB"); + glVertexAttrib1svARB = (glVertexAttrib1svARBPROC) extgl_GetProcAddress("glVertexAttrib1svARB"); + glVertexAttrib1fvARB = (glVertexAttrib1fvARBPROC) extgl_GetProcAddress("glVertexAttrib1fvARB"); + glVertexAttrib1dvARB = (glVertexAttrib1dvARBPROC) extgl_GetProcAddress("glVertexAttrib1dvARB"); + glVertexAttrib2svARB = (glVertexAttrib2svARBPROC) extgl_GetProcAddress("glVertexAttrib2svARB"); + glVertexAttrib2fvARB = (glVertexAttrib2fvARBPROC) extgl_GetProcAddress("glVertexAttrib2fvARB"); + glVertexAttrib2dvARB = (glVertexAttrib2dvARBPROC) extgl_GetProcAddress("glVertexAttrib2dvARB"); + glVertexAttrib3svARB = (glVertexAttrib3svARBPROC) extgl_GetProcAddress("glVertexAttrib3svARB"); + glVertexAttrib3fvARB = (glVertexAttrib3fvARBPROC) extgl_GetProcAddress("glVertexAttrib3fvARB"); + glVertexAttrib3dvARB = (glVertexAttrib3dvARBPROC) extgl_GetProcAddress("glVertexAttrib3dvARB"); + glVertexAttrib4bvARB = (glVertexAttrib4bvARBPROC) extgl_GetProcAddress("glVertexAttrib4bvARB"); + glVertexAttrib4svARB = (glVertexAttrib4svARBPROC) extgl_GetProcAddress("glVertexAttrib4svARB"); + glVertexAttrib4ivARB = (glVertexAttrib4ivARBPROC) extgl_GetProcAddress("glVertexAttrib4ivARB"); + glVertexAttrib4ubvARB = (glVertexAttrib4ubvARBPROC) extgl_GetProcAddress("glVertexAttrib4ubvARB"); + glVertexAttrib4usvARB = (glVertexAttrib4usvARBPROC) extgl_GetProcAddress("glVertexAttrib4usvARB"); + glVertexAttrib4uivARB = (glVertexAttrib4uivARBPROC) extgl_GetProcAddress("glVertexAttrib4uivARB"); + glVertexAttrib4fvARB = (glVertexAttrib4fvARBPROC) extgl_GetProcAddress("glVertexAttrib4fvARB"); + glVertexAttrib4dvARB = (glVertexAttrib4dvARBPROC) extgl_GetProcAddress("glVertexAttrib4dvARB"); + glVertexAttrib4NbvARB = (glVertexAttrib4NbvARBPROC) extgl_GetProcAddress("glVertexAttrib4NbvARB"); + glVertexAttrib4NsvARB = (glVertexAttrib4NsvARBPROC) extgl_GetProcAddress("glVertexAttrib4NsvARB"); + glVertexAttrib4NivARB = (glVertexAttrib4NivARBPROC) extgl_GetProcAddress("glVertexAttrib4NivARB"); + glVertexAttrib4NubvARB = (glVertexAttrib4NubvARBPROC) extgl_GetProcAddress("glVertexAttrib4NubvARB"); + glVertexAttrib4NusvARB = (glVertexAttrib4NusvARBPROC) extgl_GetProcAddress("glVertexAttrib4NusvARB"); + glVertexAttrib4NuivARB = (glVertexAttrib4NuivARBPROC) extgl_GetProcAddress("glVertexAttrib4NuivARB"); + glVertexAttribPointerARB = (glVertexAttribPointerARBPROC) extgl_GetProcAddress("glVertexAttribPointerARB"); + glEnableVertexAttribArrayARB = (glEnableVertexAttribArrayARBPROC) extgl_GetProcAddress("glEnableVertexAttribArrayARB"); + glDisableVertexAttribArrayARB = (glDisableVertexAttribArrayARBPROC) extgl_GetProcAddress("glDisableVertexAttribArrayARB"); + glProgramStringARB = (glProgramStringARBPROC) extgl_GetProcAddress("glProgramStringARB"); + glBindProgramARB = (glBindProgramARBPROC) extgl_GetProcAddress("glBindProgramARB"); + glDeleteProgramsARB = (glDeleteProgramsARBPROC) extgl_GetProcAddress("glDeleteProgramsARB"); + glGenProgramsARB = (glGenProgramsARBPROC) extgl_GetProcAddress("glGenProgramsARB"); + glProgramEnvParameter4dARB = (glProgramEnvParameter4dARBPROC) extgl_GetProcAddress("glProgramEnvParameter4dARB"); + glProgramEnvParameter4dvARB = (glProgramEnvParameter4dvARBPROC) extgl_GetProcAddress("glProgramEnvParameter4dvARB"); + glProgramEnvParameter4fARB = (glProgramEnvParameter4fARBPROC) extgl_GetProcAddress("glProgramEnvParameter4fARB"); + glProgramEnvParameter4fvARB = (glProgramEnvParameter4fvARBPROC) extgl_GetProcAddress("glProgramEnvParameter4fvARB"); + glProgramLocalParameter4dARB = (glProgramLocalParameter4dARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dARB"); + glProgramLocalParameter4dvARB = (glProgramLocalParameter4dvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4dvARB"); + glProgramLocalParameter4fARB = (glProgramLocalParameter4fARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fARB"); + glProgramLocalParameter4fvARB = (glProgramLocalParameter4fvARBPROC) extgl_GetProcAddress("glProgramLocalParameter4fvARB"); + glGetProgramEnvParameterdvARB = (glGetProgramEnvParameterdvARBPROC) extgl_GetProcAddress("glGetProgramEnvParameterdvARB"); + glGetProgramEnvParameterfvARB = (glGetProgramEnvParameterfvARBPROC) extgl_GetProcAddress("glGetProgramEnvParameterfvARB"); + glGetProgramLocalParameterdvARB = (glGetProgramLocalParameterdvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterdvARB"); + glGetProgramLocalParameterfvARB = (glGetProgramLocalParameterfvARBPROC) extgl_GetProcAddress("glGetProgramLocalParameterfvARB"); + glGetProgramivARB = (glGetProgramivARBPROC) extgl_GetProcAddress("glGetProgramivARB"); + glGetProgramStringARB = (glGetProgramStringARBPROC) extgl_GetProcAddress("glGetProgramStringARB"); + glGetVertexAttribdvARB = (glGetVertexAttribdvARBPROC) extgl_GetProcAddress("glGetVertexAttribdvARB"); + glGetVertexAttribfvARB = (glGetVertexAttribfvARBPROC) extgl_GetProcAddress("glGetVertexAttribfvARB"); + glGetVertexAttribivARB = (glGetVertexAttribivARBPROC) extgl_GetProcAddress("glGetVertexAttribivARB"); + glGetVertexAttribPointervARB = (glGetVertexAttribPointervARBPROC) extgl_GetProcAddress("glGetVertexAttribPointervARB"); + glIsProgramARB = (glIsProgramARBPROC) extgl_GetProcAddress("glIsProgramARB"); +#endif +} + +void extgl_InitEXTStencilTwoSide() +{ +#ifdef GL_EXT_stencil_two_side + if (!extgl_Extensions.EXT_stencil_two_side) + return; + glActiveStencilFaceEXT = (glActiveStencilFaceEXTPROC) extgl_GetProcAddress("glActiveStencilFaceEXT"); +#endif +} + +void extgl_InitARBWindowPos() +{ +#ifdef GL_ARB_window_pos + if (!extgl_Extensions.ARB_window_pos) + return; + glWindowPos2dARB = (glWindowPos2dARBPROC) extgl_GetProcAddress("glWindowPos2dARB"); + glWindowPos2fARB = (glWindowPos2fARBPROC) extgl_GetProcAddress("glWindowPos2fARB"); + glWindowPos2iARB = (glWindowPos2iARBPROC) extgl_GetProcAddress("glWindowPos2iARB"); + glWindowPos2sARB = (glWindowPos2sARBPROC) extgl_GetProcAddress("glWindowPos2sARB"); + glWindowPos2dvARB = (glWindowPos2dvARBPROC) extgl_GetProcAddress("glWindowPos2dvARB"); + glWindowPos2fvARB = (glWindowPos2fvARBPROC) extgl_GetProcAddress("glWindowPos2fvARB"); + glWindowPos2ivARB = (glWindowPos2ivARBPROC) extgl_GetProcAddress("glWindowPos2ivARB"); + glWindowPos2svARB = (glWindowPos2svARBPROC) extgl_GetProcAddress("glWindowPos2svARB"); + glWindowPos3dARB = (glWindowPos3dARBPROC) extgl_GetProcAddress("glWindowPos3dARB"); + glWindowPos3fARB = (glWindowPos3fARBPROC) extgl_GetProcAddress("glWindowPos3fARB"); + glWindowPos3iARB = (glWindowPos3iARBPROC) extgl_GetProcAddress("glWindowPos3iARB"); + glWindowPos3sARB = (glWindowPos3sARBPROC) extgl_GetProcAddress("glWindowPos3sARB"); + glWindowPos3dvARB = (glWindowPos3dvARBPROC) extgl_GetProcAddress("glWindowPos3dvARB"); + glWindowPos3fvARB = (glWindowPos3fvARBPROC) extgl_GetProcAddress("glWindowPos3fvARB"); + glWindowPos3ivARB = (glWindowPos3ivARBPROC) extgl_GetProcAddress("glWindowPos3ivARB"); + glWindowPos3svARB = (glWindowPos3svARBPROC) extgl_GetProcAddress("glWindowPos3svARB"); +#endif +} + +void extgl_InitARBTextureCompression() +{ +#ifdef GL_ARB_texture_compression + if (!extgl_Extensions.ARB_texture_compression) + return; + glCompressedTexImage3DARB = (glCompressedTexImage3DARBPROC) extgl_GetProcAddress("glCompressedTexImage3DARB"); + glCompressedTexImage2DARB = (glCompressedTexImage2DARBPROC) extgl_GetProcAddress("glCompressedTexImage2DARB"); + glCompressedTexImage1DARB = (glCompressedTexImage1DARBPROC) extgl_GetProcAddress("glCompressedTexImage1DARB"); + glCompressedTexSubImage3DARB = (glCompressedTexSubImage3DARBPROC) extgl_GetProcAddress("glCompressedTexSubImage3DARB"); + glCompressedTexSubImage2DARB = (glCompressedTexSubImage2DARBPROC) extgl_GetProcAddress("glCompressedTexSubImage2DARB"); + glCompressedTexSubImage1DARB = (glCompressedTexSubImage1DARBPROC) extgl_GetProcAddress("glCompressedTexSubImage1DARB"); + glGetCompressedTexImageARB = (glGetCompressedTexImageARBPROC) extgl_GetProcAddress("glGetCompressedTexImageARB"); +#endif +} + +void extgl_InitNVPointSprite() +{ +#ifdef GL_NV_point_sprite + if (!extgl_Extensions.NV_point_sprite) + return; + glPointParameteriNV = (glPointParameteriNVPROC) extgl_GetProcAddress("glPointParameteriNV"); + glPointParameterivNV = (glPointParameterivNVPROC) extgl_GetProcAddress("glPointParameterivNV"); +#endif +} + +void extgl_InitNVOcclusionQuery() +{ +#ifdef GL_NV_occlusion_query + if (!extgl_Extensions.NV_occlusion_query) + return; + glGenOcclusionQueriesNV = (glGenOcclusionQueriesNVPROC) extgl_GetProcAddress("glGenOcclusionQueriesNV"); + glDeleteOcclusionQueriesNV = (glDeleteOcclusionQueriesNVPROC) extgl_GetProcAddress("glDeleteOcclusionQueriesNV"); + glIsOcclusionQueryNV = (glIsOcclusionQueryNVPROC) extgl_GetProcAddress("glIsOcclusionQueryNV"); + glBeginOcclusionQueryNV = (glBeginOcclusionQueryNVPROC) extgl_GetProcAddress("glBeginOcclusionQueryNV"); + glEndOcclusionQueryNV = (glEndOcclusionQueryNVPROC) extgl_GetProcAddress("glEndOcclusionQueryNV"); + glGetOcclusionQueryivNV = (glGetOcclusionQueryivNVPROC) extgl_GetProcAddress("glGetOcclusionQueryivNV"); + glGetOcclusionQueryuivNV = (glGetOcclusionQueryuivNVPROC) extgl_GetProcAddress("glGetOcclusionQueryuivNV"); +#endif +} + +void extgl_InitATIVertexArrayObject() +{ +#ifdef GL_ATI_vertex_array_object + if (!extgl_Extensions.ATI_vertex_array_object) + return; + glNewObjectBufferATI = (glNewObjectBufferATIPROC) extgl_GetProcAddress("glNewObjectBufferATI"); + glIsObjectBufferATI = (glIsObjectBufferATIPROC) extgl_GetProcAddress("glIsObjectBufferATI"); + glUpdateObjectBufferATI = (glUpdateObjectBufferATIPROC) extgl_GetProcAddress("glUpdateObjectBufferATI"); + glGetObjectBufferfvATI = (glGetObjectBufferfvATIPROC) extgl_GetProcAddress("glGetObjectBufferfvATI"); + glGetObjectBufferivATI = (glGetObjectBufferivATIPROC) extgl_GetProcAddress("glGetObjectBufferivATI"); + glFreeObjectBufferATI = (glFreeObjectBufferATIPROC) extgl_GetProcAddress("glFreeObjectBufferATI"); + glArrayObjectATI = (glArrayObjectATIPROC) extgl_GetProcAddress("glArrayObjectATI"); + glGetArrayObjectfvATI = (glGetArrayObjectfvATIPROC) extgl_GetProcAddress("glGetArrayObjectfvATI"); + glGetArrayObjectivATI = (glGetArrayObjectivATIPROC) extgl_GetProcAddress("glGetArrayObjectivATI"); + glVariantArrayObjectATI = (glVariantArrayObjectATIPROC) extgl_GetProcAddress("glVariantArrayObjectATI"); + glGetVariantArrayObjectfvATI = (glGetVariantArrayObjectfvATIPROC) extgl_GetProcAddress("glGetVariantArrayObjectfvATI"); + glGetVariantArrayObjectivATI = (glGetVariantArrayObjectivATIPROC) extgl_GetProcAddress("glGetVariantArrayObjectivATI"); +#endif +} + +void extgl_InitATIVertexStreams() +{ +#ifdef GL_ATI_vertex_streams + if (!extgl_Extensions.ATI_vertex_streams) + return; + glClientActiveVertexStreamATI = (glClientActiveVertexStreamATIPROC) extgl_GetProcAddress("glClientActiveVertexStreamATI"); + glVertexBlendEnviATI = (glVertexBlendEnviATIPROC) extgl_GetProcAddress("glVertexBlendEnviATI"); + glVertexBlendEnvfATI = (glVertexBlendEnvfATIPROC) extgl_GetProcAddress("glVertexBlendEnvfATI"); + glVertexStream2sATI = (glVertexStream2sATIPROC) extgl_GetProcAddress("glVertexStream2sATI"); + glVertexStream2svATI = (glVertexStream2svATIPROC) extgl_GetProcAddress("glVertexStream2svATI"); + glVertexStream2iATI = (glVertexStream2iATIPROC) extgl_GetProcAddress("glVertexStream2iATI"); + glVertexStream2ivATI = (glVertexStream2ivATIPROC) extgl_GetProcAddress("glVertexStream2ivATI"); + glVertexStream2fATI = (glVertexStream2fATIPROC) extgl_GetProcAddress("glVertexStream2fATI"); + glVertexStream2fvATI = (glVertexStream2fvATIPROC) extgl_GetProcAddress("glVertexStream2fvATI"); + glVertexStream2dATI = (glVertexStream2dATIPROC) extgl_GetProcAddress("glVertexStream2dATI"); + glVertexStream2dvATI = (glVertexStream2dvATIPROC) extgl_GetProcAddress("glVertexStream2dvATI"); + glVertexStream3sATI = (glVertexStream3sATIPROC) extgl_GetProcAddress("glVertexStream3sATI"); + glVertexStream3svATI = (glVertexStream3svATIPROC) extgl_GetProcAddress("glVertexStream3svATI"); + glVertexStream3iATI = (glVertexStream3iATIPROC) extgl_GetProcAddress("glVertexStream3iATI"); + glVertexStream3ivATI = (glVertexStream3ivATIPROC) extgl_GetProcAddress("glVertexStream3ivATI"); + glVertexStream3fATI = (glVertexStream3fATIPROC) extgl_GetProcAddress("glVertexStream3fATI"); + glVertexStream3fvATI = (glVertexStream3fvATIPROC) extgl_GetProcAddress("glVertexStream3fvATI"); + glVertexStream3dATI = (glVertexStream3dATIPROC) extgl_GetProcAddress("glVertexStream3dATI"); + glVertexStream3dvATI = (glVertexStream3dvATIPROC) extgl_GetProcAddress("glVertexStream3dvATI"); + glVertexStream4sATI = (glVertexStream4sATIPROC) extgl_GetProcAddress("glVertexStream4sATI"); + glVertexStream4svATI = (glVertexStream4svATIPROC) extgl_GetProcAddress("glVertexStream4svATI"); + glVertexStream4iATI = (glVertexStream4iATIPROC) extgl_GetProcAddress("glVertexStream4iATI"); + glVertexStream4ivATI = (glVertexStream4ivATIPROC) extgl_GetProcAddress("glVertexStream4ivATI"); + glVertexStream4fATI = (glVertexStream4fATIPROC) extgl_GetProcAddress("glVertexStream4fATI"); + glVertexStream4fvATI = (glVertexStream4fvATIPROC) extgl_GetProcAddress("glVertexStream4fvATI"); + glVertexStream4dATI = (glVertexStream4dATIPROC) extgl_GetProcAddress("glVertexStream4dATI"); + glVertexStream4dvATI = (glVertexStream4dvATIPROC) extgl_GetProcAddress("glVertexStream4dvATI"); + glNormalStream3bATI = (glNormalStream3bATIPROC) extgl_GetProcAddress("glNormalStream3bATI"); + glNormalStream3bvATI = (glNormalStream3bvATIPROC) extgl_GetProcAddress("glNormalStream3bvATI"); + glNormalStream3sATI = (glNormalStream3sATIPROC) extgl_GetProcAddress("glNormalStream3sATI"); + glNormalStream3svATI = (glNormalStream3svATIPROC) extgl_GetProcAddress("glNormalStream3svATI"); + glNormalStream3iATI = (glNormalStream3iATIPROC) extgl_GetProcAddress("glNormalStream3iATI"); + glNormalStream3ivATI = (glNormalStream3ivATIPROC) extgl_GetProcAddress("glNormalStream3ivATI"); + glNormalStream3fATI = (glNormalStream3fATIPROC) extgl_GetProcAddress("glNormalStream3fATI"); + glNormalStream3fvATI = (glNormalStream3fvATIPROC) extgl_GetProcAddress("glNormalStream3fvATI"); + glNormalStream3dATI = (glNormalStream3dATIPROC) extgl_GetProcAddress("glNormalStream3dATI"); + glNormalStream3dvATI = (glNormalStream3dvATIPROC) extgl_GetProcAddress("glNormalStream3dvATI"); +#endif +} + +void extgl_InitATIElementArray() +{ +#ifdef GL_ATI_element_array + if (!extgl_Extensions.ATI_element_array) + return; + glElementPointerATI = (glElementPointerATIPROC) extgl_GetProcAddress("glElementPointerATI"); + glDrawElementArrayATI = (glDrawElementArrayATIPROC) extgl_GetProcAddress("glDrawElementArrayATI"); + glDrawRangeElementArrayATI = (glDrawRangeElementArrayATIPROC) extgl_GetProcAddress("glDrawRangeElementArrayATI"); +#endif +} + +void extgl_InitATIFragmentShader() +{ +#ifdef GL_ATI_fragment_shader + if (!extgl_Extensions.ATI_fragment_shader) + return; + glGenFragmentShadersATI = (glGenFragmentShadersATIPROC) extgl_GetProcAddress("glGenFragmentShadersATI"); + glBindFragmentShaderATI = (glBindFragmentShaderATIPROC) extgl_GetProcAddress("glBindFragmentShaderATI"); + glDeleteFragmentShaderATI = (glDeleteFragmentShaderATIPROC) extgl_GetProcAddress("glDeleteFragmentShaderATI"); + glBeginFragmentShaderATI = (glBeginFragmentShaderATIPROC) extgl_GetProcAddress("glBeginFragmentShaderATI"); + glEndFragmentShaderATI = (glEndFragmentShaderATIPROC) extgl_GetProcAddress("glEndFragmentShaderATI"); + glPassTexCoordATI = (glPassTexCoordATIPROC) extgl_GetProcAddress("glPassTexCoordATI"); + glSampleMapATI = (glSampleMapATIPROC) extgl_GetProcAddress("glSampleMapATI"); + glColorFragmentOp1ATI = (glColorFragmentOp1ATIPROC) extgl_GetProcAddress("glColorFragmentOp1ATI"); + glColorFragmentOp2ATI = (glColorFragmentOp2ATIPROC) extgl_GetProcAddress("glColorFragmentOp2ATI"); + glColorFragmentOp3ATI = (glColorFragmentOp3ATIPROC) extgl_GetProcAddress("glColorFragmentOp3ATI"); + glAlphaFragmentOp1ATI = (glAlphaFragmentOp1ATIPROC) extgl_GetProcAddress("glAlphaFragmentOp1ATI"); + glAlphaFragmentOp2ATI = (glAlphaFragmentOp2ATIPROC) extgl_GetProcAddress("glAlphaFragmentOp2ATI"); + glAlphaFragmentOp3ATI = (glAlphaFragmentOp3ATIPROC) extgl_GetProcAddress("glAlphaFragmentOp3ATI"); + glSetFragmentShaderConstantATI = (glSetFragmentShaderConstantATIPROC) extgl_GetProcAddress("glSetFragmentShaderConstantATI"); +#endif +} + + +void extgl_InitATIEnvmapBumpmap() +{ +#ifdef GL_ATI_envmap_bumpmap + if (!extgl_Extensions.ATI_envmap_bumpmap) + return; + glTexBumpParameterivATI = (glTexBumpParameterivATIPROC) extgl_GetProcAddress("glTexBumpParameterivATI"); + glTexBumpParameterfvATI = (glTexBumpParameterfvATIPROC) extgl_GetProcAddress("glTexBumpParameterfvATI"); + glGetTexBumpParameterivATI = (glGetTexBumpParameterivATIPROC) extgl_GetProcAddress("glGetTexBumpParameterivATI"); + glGetTexBumpParameterfvATI = (glGetTexBumpParameterfvATIPROC) extgl_GetProcAddress("glGetTexBumpParameterfvATI"); +#endif +} + +void extgl_InitEXTVertexShader() +{ +#ifdef GL_EXT_vertex_shader + if (!extgl_Extensions.EXT_vertex_shader) + return; + glBeginVertexShaderEXT = (glBeginVertexShaderEXTPROC) extgl_GetProcAddress("glBeginVertexShaderEXT"); + glEndVertexShaderEXT = (glEndVertexShaderEXTPROC) extgl_GetProcAddress("glEndVertexShaderEXT"); + glBindVertexShaderEXT = (glBindVertexShaderEXTPROC) extgl_GetProcAddress("glBindVertexShaderEXT"); + glGenVertexShadersEXT = (glGenVertexShadersEXTPROC) extgl_GetProcAddress("glGenVertexShadersEXT"); + glDeleteVertexShaderEXT = (glDeleteVertexShaderEXTPROC) extgl_GetProcAddress("glDeleteVertexShaderEXT"); + glShaderOp1EXT = (glShaderOp1EXTPROC) extgl_GetProcAddress("glShaderOp1EXT"); + glShaderOp2EXT = (glShaderOp2EXTPROC) extgl_GetProcAddress("glShaderOp2EXT"); + glShaderOp3EXT = (glShaderOp3EXTPROC) extgl_GetProcAddress("glShaderOp3EXT"); + glSwizzleEXT = (glSwizzleEXTPROC) extgl_GetProcAddress("glSwizzleEXT"); + glWriteMaskEXT = (glWriteMaskEXTPROC) extgl_GetProcAddress("glWriteMaskEXT"); + glInsertComponentEXT = (glInsertComponentEXTPROC) extgl_GetProcAddress("glInsertComponentEXT"); + glExtractComponentEXT = (glExtractComponentEXTPROC) extgl_GetProcAddress("glExtractComponentEXT"); + glGenSymbolsEXT = (glGenSymbolsEXTPROC) extgl_GetProcAddress("glGenSymbolsEXT"); + glSetInvariantEXT = (glSetInvariantEXTPROC) extgl_GetProcAddress("glSetInvarianceEXT"); + glSetLocalConstantEXT = (glSetLocalConstantEXTPROC) extgl_GetProcAddress("glSetLocalConstantEXT"); + glVariantbvEXT = (glVariantbvEXTPROC) extgl_GetProcAddress("glVariantbvEXT"); + glVariantsvEXT = (glVariantsvEXTPROC) extgl_GetProcAddress("glVariantsvEXT"); + glVariantivEXT = (glVariantivEXTPROC) extgl_GetProcAddress("glVariantivEXT"); + glVariantfvEXT = (glVariantfvEXTPROC) extgl_GetProcAddress("glVariantfvEXT"); + glVariantdvEXT = (glVariantdvEXTPROC) extgl_GetProcAddress("glVariantdvEXT"); + glVariantubvEXT = (glVariantubvEXTPROC) extgl_GetProcAddress("glVariantubvEXT"); + glVariantusvEXT = (glVariantusvEXTPROC) extgl_GetProcAddress("glVariantusvEXT"); + glVariantuivEXT = (glVariantuivEXTPROC) extgl_GetProcAddress("glVariantuivEXT"); + glVariantPointerEXT = (glVariantPointerEXTPROC) extgl_GetProcAddress("glVariantPointerEXT"); + glEnableVariantClientStateEXT = (glEnableVariantClientStateEXTPROC) extgl_GetProcAddress("glEnableVariantClientStateEXT"); + glDisableVariantClientStateEXT = (glDisableVariantClientStateEXTPROC) extgl_GetProcAddress("glDisableVariantClientStateEXT"); + glBindLightParameterEXT = (glBindLightParameterEXTPROC) extgl_GetProcAddress("glBindLightParameterEXT"); + glBindMaterialParameterEXT = (glBindMaterialParameterEXTPROC) extgl_GetProcAddress("glBindMaterialParameterEXT"); + glBindTexGenParameterEXT = (glBindTexGenParameterEXTPROC) extgl_GetProcAddress("glBindTexGenParameterEXT"); + glBindTextureUnitParameterEXT = (glBindTextureUnitParameterEXTPROC) extgl_GetProcAddress("glBindTextureUnitParameterEXT"); + glBindParameterEXT = (glBindParameterEXTPROC) extgl_GetProcAddress("glBindParameterEXT"); + glIsVariantEnabledEXT = (glIsVariantEnabledEXTPROC) extgl_GetProcAddress("glIsVariantEnabledEXT"); + glGetVariantBooleanvEXT = (glGetVariantBooleanvEXTPROC) extgl_GetProcAddress("glGetVariantBooleanvEXT"); + glGetVariantIntegervEXT = (glGetVariantIntegervEXTPROC) extgl_GetProcAddress("glGetVariantIntegervEXT"); + glGetVariantFloatvEXT = (glGetVariantFloatvEXTPROC) extgl_GetProcAddress("glGetVariantFloatvEXT"); + glGetVariantPointervEXT = (glGetVariantPointervEXTPROC) extgl_GetProcAddress("glGetVariantPointervEXT"); + glGetInvariantBooleanvEXT = (glGetInvariantBooleanvEXTPROC) extgl_GetProcAddress("glGetInvariantBooleanvEXT"); + glGetInvariantIntegervEXT = (glGetInvariantIntegervEXTPROC) extgl_GetProcAddress("glGetInvariantIntegervEXT"); + glGetInvariantFloatvEXT = (glGetInvariantFloatvEXTPROC) extgl_GetProcAddress("glGetInvariantFloatvEXT"); + glGetLocalConstantBooleanvEXT = (glGetLocalConstantBooleanvEXTPROC) extgl_GetProcAddress("glGetLocalConstantBooleanvEXT"); + glGetLocalConstantIntegervEXT = (glGetLocalConstantIntegervEXTPROC) extgl_GetProcAddress("glGetLocalConstantIntegervEXT"); + glGetLocalConstantFloatvEXT = (glGetLocalConstantFloatvEXTPROC) extgl_GetProcAddress("glGetLocalConstantFloatvEXT"); +#endif +} + +void extgl_InitARBMatrixPalette() +{ +#ifdef GL_ARB_matrix_palette + if (!extgl_Extensions.ARB_matrix_palette) + return; + glCurrentPaletteMatrixARB = (glCurrentPaletteMatrixARBPROC) extgl_GetProcAddress("glCurrentPaletteMatrixARB"); + glMatrixIndexubvARB = (glMatrixIndexubvARBPROC) extgl_GetProcAddress("glMatrixIndexubvARB"); + glMatrixIndexusvARB = (glMatrixIndexusvARBPROC) extgl_GetProcAddress("glMatrixIndexusvARB"); + glMatrixIndexuivARB = (glMatrixIndexuivARBPROC) extgl_GetProcAddress("glMatrixIndexuivARB"); + glMatrixIndexPointerARB = (glMatrixIndexPointerARBPROC) extgl_GetProcAddress("glMatrixIndexPointerARB"); +#endif +} + +void extgl_InitEXTMultiDrawArrays() +{ +#ifdef GL_EXT_multi_draw_arrays + if (!extgl_Extensions.EXT_multi_draw_arrays) + return; + glMultiDrawArraysEXT = (glMultiDrawArraysEXTPROC) extgl_GetProcAddress("glMultiDrawArraysEXT"); + glMultiDrawElementsEXT = (glMultiDrawElementsEXTPROC) extgl_GetProcAddress("glMultiDrawElementsEXT"); +#endif +} + +void extgl_InitARBVertexBlend() +{ +#ifdef GL_ARB_vertex_blend + if (!extgl_Extensions.ARB_vertex_blend) + return; + glWeightbvARB = (glWeightbvARBPROC) extgl_GetProcAddress("glWeightbvARB"); + glWeightsvARB = (glWeightsvARBPROC) extgl_GetProcAddress("glWeightsvARB"); + glWeightivARB = (glWeightivARBPROC) extgl_GetProcAddress("glWeightivARB"); + glWeightfvARB = (glWeightfvARBPROC) extgl_GetProcAddress("glWeightfvARB"); + glWeightdvARB = (glWeightdvARBPROC) extgl_GetProcAddress("glWeightdvARB"); + glWeightubvARB = (glWeightubvARBPROC) extgl_GetProcAddress("glWeightubvARB"); + glWeightusvARB = (glWeightusvARBPROC) extgl_GetProcAddress("glWeightusvARB"); + glWeightuivARB = (glWeightuivARBPROC) extgl_GetProcAddress("glWeightuivARB"); + glWeightPointerARB = (glWeightPointerARBPROC) extgl_GetProcAddress("glWeightPointerARB"); + glVertexBlendARB = (glVertexBlendARBPROC) extgl_GetProcAddress("glVertexBlendARB"); +#endif +} + +void extgl_InitARBPointParameters() +{ +#ifdef GL_ARB_point_parameters + if (!extgl_Extensions.ARB_point_parameters) + return; + glPointParameterfARB = (glPointParameterfARBPROC) extgl_GetProcAddress("glPointParameterfARB"); + glPointParameterfvARB = (glPointParameterfvARBPROC) extgl_GetProcAddress("glPointParameterfvARB"); +#endif +} + +void extgl_InitATIPNTriangles() +{ +#ifdef GL_ATI_pn_triangles + if (!extgl_Extensions.ATI_pn_triangles) + return; + glPNTrianglesiATI = (glPNTrianglesiATIPROC) extgl_GetProcAddress("glPNTrianglesiATI"); + glPNTrianglesfATI = (glPNTrianglesfATIPROC) extgl_GetProcAddress("glPNTrianglesfATI"); +#endif +} + +void extgl_InitNVEvaluators() +{ +#ifdef GL_NV_evaluators + if (!extgl_Extensions.NV_evaluators) + return; + glMapControlPointsNV = (glMapControlPointsNVPROC) extgl_GetProcAddress("glMapControlPointsNV"); + glMapParameterivNV = (glMapParameterivNVPROC) extgl_GetProcAddress("glMapParameterivNV"); + glMapParameterfvNV = (glMapParameterfvNVPROC) extgl_GetProcAddress("glMapParameterfvNV"); + glGetMapControlPointsNV = (glGetMapControlPointsNVPROC) extgl_GetProcAddress("glGetMapControlPointsNV"); + glGetMapParameterivNV = (glGetMapParameterivNVPROC) extgl_GetProcAddress("glGetMapParameterivNV"); + glGetMapParameterfvNV = (glGetMapParameterfvNVPROC) extgl_GetProcAddress("glGetMapParameterfvNV"); + glGetMapAttribParameterivNV = (glGetMapAttribParameterivNVPROC) extgl_GetProcAddress("glGetMapAttribParameterivNV"); + glGetMapAttribParameterfvNV = (glGetMapAttribParameterfvNVPROC) extgl_GetProcAddress("glGetMapAttribParameterfvNV"); + glEvalMapsNV = (glEvalMapsNVPROC) extgl_GetProcAddress("glEvalMapsNV"); +#endif +} + +void extgl_InitNVRegisterCombiners2() +{ +#ifdef GL_NV_register_combiners + if (!extgl_Extensions.NV_register_combiners2) + return; + glCombinerStageParameterfvNV = (glCombinerStageParameterfvNVPROC) extgl_GetProcAddress("glCombinerStageParameterfvNV"); + glGetCombinerStageParameterfvNV = (glGetCombinerStageParameterfvNVPROC) extgl_GetProcAddress("glGetCombinerStageParameterfvNV"); +#endif +} + +void extgl_InitNVFence() +{ +#ifdef GL_NV_fence + if (!extgl_Extensions.NV_fence) + return; + glGenFencesNV = (glGenFencesNVPROC) extgl_GetProcAddress("glGenFencesNV"); + glDeleteFencesNV = (glDeleteFencesNVPROC) extgl_GetProcAddress("glDeleteFencesNV"); + glSetFenceNV = (glSetFenceNVPROC) extgl_GetProcAddress("glSetFenceNV"); + glTestFenceNV = (glTestFenceNVPROC) extgl_GetProcAddress("glTestFenceNV"); + glFinishFenceNV = (glFinishFenceNVPROC) extgl_GetProcAddress("glFinishFenceNV"); + glIsFenceNV = (glIsFenceNVPROC) extgl_GetProcAddress("glIsFenceNV"); + glGetFenceivNV = (glGetFenceivNVPROC) extgl_GetProcAddress("glGetFenceivNV"); +#endif +} + +void extgl_InitNVVertexProgram() +{ +#ifdef GL_NV_vertex_program + if (!extgl_Extensions.NV_vertex_program) + return; + glBindProgramNV = (glBindProgramNVPROC) extgl_GetProcAddress("glBindProgramNV"); + glDeleteProgramsNV = (glDeleteProgramsNVPROC) extgl_GetProcAddress("glDeleteProgramsNV"); + glExecuteProgramNV = (glExecuteProgramNVPROC) extgl_GetProcAddress("glExecuteProgramNV"); + glGenProgramsNV = (glGenProgramsNVPROC) extgl_GetProcAddress("glGenProgramsNV"); + glAreProgramsResidentNV = (glAreProgramsResidentNVPROC) extgl_GetProcAddress("glAreProgramsResidentNV"); + glRequestResidentProgramsNV = (glRequestResidentProgramsNVPROC) extgl_GetProcAddress("glRequestResidentProgramsNV"); + glGetProgramParameterfvNV = (glGetProgramParameterfvNVPROC) extgl_GetProcAddress("glGetProgramParameterfvNV"); + glGetProgramParameterdvNV = (glGetProgramParameterdvNVPROC) extgl_GetProcAddress("glGetProgramParameterdvNV"); + glGetProgramivNV = (glGetProgramivNVPROC) extgl_GetProcAddress("glGetProgramivNV"); + glGetProgramStringNV = (glGetProgramStringNVPROC) extgl_GetProcAddress("glGetProgramStringNV"); + glGetTrackMatrixivNV = (glGetTrackMatrixivNVPROC) extgl_GetProcAddress("glGetTrackMatrixivNV"); + glGetVertexAttribdvNV = (glGetVertexAttribdvNVPROC) extgl_GetProcAddress("glGetVertexAttribdvNV"); + glGetVertexAttribfvNV = (glGetVertexAttribfvNVPROC) extgl_GetProcAddress("glGetVertexAttribfvNV"); + glGetVertexAttribivNV = (glGetVertexAttribivNVPROC) extgl_GetProcAddress("glGetVertexAttribivNV"); + glGetVertexAttribPointervNV = (glGetVertexAttribPointervNVPROC) extgl_GetProcAddress("glGetVertexAttribPointervNV"); + glIsProgramNV = (glIsProgramNVPROC) extgl_GetProcAddress("glIsProgramNV"); + glLoadProgramNV = (glLoadProgramNVPROC) extgl_GetProcAddress("glLoadProgramNV"); + glProgramParameter4fNV = (glProgramParameter4fNVPROC) extgl_GetProcAddress("glProgramParameter4fNV"); + glProgramParameter4dNV = (glProgramParameter4dNVPROC) extgl_GetProcAddress("glProgramParameter4dNV"); + glProgramParameter4dvNV = (glProgramParameter4dvNVPROC) extgl_GetProcAddress("glProgramParameter4dvNV"); + glProgramParameter4fvNV = (glProgramParameter4fvNVPROC) extgl_GetProcAddress("glProgramParameter4fvNV"); + glProgramParameters4dvNV = (glProgramParameters4dvNVPROC) extgl_GetProcAddress("glProgramParameters4dvNV"); + glProgramParameters4fvNV = (glProgramParameters4fvNVPROC) extgl_GetProcAddress("glProgramParameters4fvNV"); + glTrackMatrixNV = (glTrackMatrixNVPROC) extgl_GetProcAddress("glTrackMatrixNV"); + glVertexAttribPointerNV = (glVertexAttribPointerNVPROC) extgl_GetProcAddress("glVertexAttribPointerNV"); + glVertexAttrib1sNV = (glVertexAttrib1sNVPROC) extgl_GetProcAddress("glVertexAttrib1sNV"); + glVertexAttrib1fNV = (glVertexAttrib1fNVPROC) extgl_GetProcAddress("glVertexAttrib1fNV"); + glVertexAttrib1dNV = (glVertexAttrib1dNVPROC) extgl_GetProcAddress("glVertexAttrib1dNV"); + glVertexAttrib2sNV = (glVertexAttrib2sNVPROC) extgl_GetProcAddress("glVertexAttrib2sNV"); + glVertexAttrib2fNV = (glVertexAttrib2fNVPROC) extgl_GetProcAddress("glVertexAttrib2fNV"); + glVertexAttrib2dNV = (glVertexAttrib2dNVPROC) extgl_GetProcAddress("glVertexAttrib2dNV"); + glVertexAttrib3sNV = (glVertexAttrib3sNVPROC) extgl_GetProcAddress("glVertexAttrib3sNV"); + glVertexAttrib3fNV = (glVertexAttrib3fNVPROC) extgl_GetProcAddress("glVertexAttrib3fNV"); + glVertexAttrib3dNV = (glVertexAttrib3dNVPROC) extgl_GetProcAddress("glVertexAttrib3dNV"); + glVertexAttrib4sNV = (glVertexAttrib4sNVPROC) extgl_GetProcAddress("glVertexAttrib4sNV"); + glVertexAttrib4fNV = (glVertexAttrib4fNVPROC) extgl_GetProcAddress("glVertexAttrib4fNV"); + glVertexAttrib4dNV = (glVertexAttrib4dNVPROC) extgl_GetProcAddress("glVertexAttrib4dNV"); + glVertexAttrib4ubNV = (glVertexAttrib4ubNVPROC) extgl_GetProcAddress("glVertexAttrib4ubNV"); + glVertexAttrib1svNV = (glVertexAttrib1svNVPROC) extgl_GetProcAddress("glVertexAttrib1svNV"); + glVertexAttrib1fvNV = (glVertexAttrib1fvNVPROC) extgl_GetProcAddress("glVertexAttrib1fvNV"); + glVertexAttrib1dvNV = (glVertexAttrib1dvNVPROC) extgl_GetProcAddress("glVertexAttrib1dvNV"); + glVertexAttrib2svNV = (glVertexAttrib2svNVPROC) extgl_GetProcAddress("glVertexAttrib2svNV"); + glVertexAttrib2fvNV = (glVertexAttrib2fvNVPROC) extgl_GetProcAddress("glVertexAttrib2fvNV"); + glVertexAttrib2dvNV = (glVertexAttrib2dvNVPROC) extgl_GetProcAddress("glVertexAttrib2dvNV"); + glVertexAttrib3svNV = (glVertexAttrib3svNVPROC) extgl_GetProcAddress("glVertexAttrib3svNV"); + glVertexAttrib3fvNV = (glVertexAttrib3fvNVPROC) extgl_GetProcAddress("glVertexAttrib3fvNV"); + glVertexAttrib3dvNV = (glVertexAttrib3dvNVPROC) extgl_GetProcAddress("glVertexAttrib3dvNV"); + glVertexAttrib4svNV = (glVertexAttrib4svNVPROC) extgl_GetProcAddress("glVertexAttrib4svNV"); + glVertexAttrib4fvNV = (glVertexAttrib4fvNVPROC) extgl_GetProcAddress("glVertexAttrib4fvNV"); + glVertexAttrib4dvNV = (glVertexAttrib4dvNVPROC) extgl_GetProcAddress("glVertexAttrib4dvNV"); + glVertexAttrib4ubvNV = (glVertexAttrib4ubvNVPROC) extgl_GetProcAddress("glVertexAttrib4ubvNV"); + glVertexAttribs1svNV = (glVertexAttribs1svNVPROC) extgl_GetProcAddress("glVertexAttribs1svNV"); + glVertexAttribs1fvNV = (glVertexAttribs1fvNVPROC) extgl_GetProcAddress("glVertexAttribs1fvNV"); + glVertexAttribs1dvNV = (glVertexAttribs1dvNVPROC) extgl_GetProcAddress("glVertexAttribs1dvNV"); + glVertexAttribs2svNV = (glVertexAttribs2svNVPROC) extgl_GetProcAddress("glVertexAttribs2svNV"); + glVertexAttribs2fvNV = (glVertexAttribs2fvNVPROC) extgl_GetProcAddress("glVertexAttribs2fvNV"); + glVertexAttribs2dvNV = (glVertexAttribs2dvNVPROC) extgl_GetProcAddress("glVertexAttribs2dvNV"); + glVertexAttribs3svNV = (glVertexAttribs3svNVPROC) extgl_GetProcAddress("glVertexAttribs3svNV"); + glVertexAttribs3fvNV = (glVertexAttribs3fvNVPROC) extgl_GetProcAddress("glVertexAttribs3fvNV"); + glVertexAttribs3dvNV = (glVertexAttribs3dvNVPROC) extgl_GetProcAddress("glVertexAttribs3dvNV"); + glVertexAttribs4svNV = (glVertexAttribs4svNVPROC) extgl_GetProcAddress("glVertexAttribs4svNV"); + glVertexAttribs4fvNV = (glVertexAttribs4fvNVPROC) extgl_GetProcAddress("glVertexAttribs4fvNV"); + glVertexAttribs4dvNV = (glVertexAttribs4dvNVPROC) extgl_GetProcAddress("glVertexAttribs4dvNV"); + glVertexAttribs4ubvNV = (glVertexAttribs4ubvNVPROC) extgl_GetProcAddress("glVertexAttribs4ubvNV"); +#endif +} + +void extgl_InitEXTVertexWeighting() +{ +#ifdef GL_EXT_vertex_weighting + if (!extgl_Extensions.EXT_vertex_weighting) + return; + glVertexWeightfEXT = (glVertexWeightfEXTPROC) extgl_GetProcAddress("glVertexWeightfEXT"); + glVertexWeightfvEXT = (glVertexWeightfvEXTPROC) extgl_GetProcAddress("glVertexWeightfvEXT"); + glVertexWeightPointerEXT = (glVertexWeightPointerEXTPROC) extgl_GetProcAddress("glVertexWeightPointerEXT"); +#endif +} + +void extgl_InitARBMultisample() +{ +#ifdef GL_ARB_multisample + if (!extgl_Extensions.ARB_multisample) + return; + glSampleCoverageARB = (glSampleCoverageARBPROC) extgl_GetProcAddress("glSampleCoverageARB"); +#endif +} + +void extgl_InitNVRegisterCombiners() +{ +#ifdef GL_NV_register_combiners + if (!extgl_Extensions.NV_register_combiners) + return; + glCombinerParameterfvNV = (glCombinerParameterfvNVPROC) extgl_GetProcAddress("glCombinerParameterfvNV"); + glCombinerParameterfNV = (glCombinerParameterfNVPROC) extgl_GetProcAddress("glCombinerParameterfNV"); + glCombinerParameterivNV = (glCombinerParameterivNVPROC) extgl_GetProcAddress("glCombinerParameterivNV"); + glCombinerParameteriNV = (glCombinerParameteriNVPROC) extgl_GetProcAddress("glCombinerParameteriNV"); + glCombinerInputNV = (glCombinerInputNVPROC) extgl_GetProcAddress("glCombinerInputNV"); + glCombinerOutputNV = (glCombinerOutputNVPROC) extgl_GetProcAddress("glCombinerOutputNV"); + glFinalCombinerInputNV = (glFinalCombinerInputNVPROC) extgl_GetProcAddress("glFinalCombinerInputNV"); + glGetCombinerInputParameterfvNV = (glGetCombinerInputParameterfvNVPROC) extgl_GetProcAddress("glGetCombinerInputParameterfvNV"); + glGetCombinerInputParameterivNV = (glGetCombinerInputParameterivNVPROC) extgl_GetProcAddress("glGetCombinerInputParameterivNV"); + glGetCombinerOutputParameterfvNV = (glGetCombinerOutputParameterfvNVPROC) extgl_GetProcAddress("glGetCombinerOutputParameterfvNV"); + glGetCombinerOutputParameterivNV = (glGetCombinerOutputParameterivNVPROC) extgl_GetProcAddress("glGetCombinerOutputParameterivNV"); + glGetFinalCombinerInputParameterfvNV = (glGetFinalCombinerInputParameterfvNVPROC) extgl_GetProcAddress("glGetFinalCombinerInputParameterfvNV"); + glGetFinalCombinerInputParameterivNV = (glGetFinalCombinerInputParameterivNVPROC) extgl_GetProcAddress("glGetFinalCombinerInputParameterivNV"); +#endif +} + +void extgl_InitEXTPointParameters() +{ +#ifdef GL_EXT_point_parameters + if (!extgl_Extensions.EXT_point_parameters) + return; + glPointParameterfEXT = (glPointParameterfEXTPROC) extgl_GetProcAddress("glPointParameterfEXT"); + glPointParameterfvEXT = (glPointParameterfvEXTPROC) extgl_GetProcAddress("glPointParameterfvEXT"); +#endif +} + +void extgl_InitNVVertexArrayRange() +{ +#ifdef GL_NV_vertex_array_range + if (!extgl_Extensions.NV_vertex_array_range) + return; + glFlushVertexArrayRangeNV = (glFlushVertexArrayRangeNVPROC) extgl_GetProcAddress("glFlushVertexArrayRangeNV"); + glVertexArrayRangeNV = (glVertexArrayRangeNVPROC) extgl_GetProcAddress("glVertexArrayRangeNV"); +#ifdef _WIN32 + wglAllocateMemoryNV = (wglAllocateMemoryNVPROC) extgl_GetProcAddress("wglAllocateMemoryNV"); + wglFreeMemoryNV = (wglFreeMemoryNVPROC) extgl_GetProcAddress("wglFreeMemoryNV"); +#else + glXAllocateMemoryNV = (glXAllocateMemoryNVPROC) extgl_GetProcAddress("glXAllocateMemoryNV"); + glXFreeMemoryNV = (glXFreeMemoryNVPROC) extgl_GetProcAddress("glXFreeMemoryNV"); +#endif /* WIN32 */ +#endif +} + +void extgl_InitEXTFogCoord() +{ +#ifdef GL_EXT_fog_coord + if (!extgl_Extensions.EXT_fog_coord) + return; + glFogCoordfEXT = (glFogCoordfEXTPROC) extgl_GetProcAddress("glFogCoordfEXT"); + glFogCoordfvEXT = (glFogCoordfvEXTPROC) extgl_GetProcAddress("glFogCoordfvEXT"); + glFogCoorddEXT = (glFogCoorddEXTPROC) extgl_GetProcAddress("glFogCoorddEXT"); + glFogCoorddvEXT = (glFogCoorddvEXTPROC) extgl_GetProcAddress("glFogCoorddvEXT"); + glFogCoordPointerEXT = (glFogCoordPointerEXTPROC) extgl_GetProcAddress("glFogCoordPointerEXT"); +#endif +} + +void extgl_InitEXTSecondaryColor() +{ +#ifdef GL_EXT_secondary_color + if (!extgl_Extensions.EXT_secondary_color) + return; + glSecondaryColor3bEXT = (glSecondaryColor3bEXTPROC) extgl_GetProcAddress("glSecondaryColor3bEXT"); + glSecondaryColor3bvEXT = (glSecondaryColor3bvEXTPROC) extgl_GetProcAddress("glSecondaryColor3bvEXT"); + glSecondaryColor3dEXT = (glSecondaryColor3dEXTPROC) extgl_GetProcAddress("glSecondaryColor3dEXT"); + glSecondaryColor3dvEXT = (glSecondaryColor3dvEXTPROC) extgl_GetProcAddress("glSecondaryColor3dvEXT"); + glSecondaryColor3fEXT = (glSecondaryColor3fEXTPROC) extgl_GetProcAddress("glSecondaryColor3fEXT"); + glSecondaryColor3fvEXT = (glSecondaryColor3fvEXTPROC) extgl_GetProcAddress("glSecondaryColor3fvEXT"); + glSecondaryColor3iEXT = (glSecondaryColor3iEXTPROC) extgl_GetProcAddress("glSecondaryColor3iEXT"); + glSecondaryColor3ivEXT = (glSecondaryColor3ivEXTPROC) extgl_GetProcAddress("glSecondaryColor3ivEXT"); + glSecondaryColor3sEXT = (glSecondaryColor3sEXTPROC) extgl_GetProcAddress("glSecondaryColor3sEXT"); + glSecondaryColor3svEXT = (glSecondaryColor3svEXTPROC) extgl_GetProcAddress("glSecondaryColor3svEXT"); + glSecondaryColor3ubEXT = (glSecondaryColor3ubEXTPROC) extgl_GetProcAddress("glSecondaryColor3ubEXT"); + glSecondaryColor3ubvEXT = (glSecondaryColor3ubvEXTPROC) extgl_GetProcAddress("glSecondaryColor3ubvEXT"); + glSecondaryColor3uiEXT = (glSecondaryColor3uiEXTPROC) extgl_GetProcAddress("glSecondaryColor3uiEXT"); + glSecondaryColor3uivEXT = (glSecondaryColor3uivEXTPROC) extgl_GetProcAddress("glSecondaryColor3uivEXT"); + glSecondaryColor3usEXT = (glSecondaryColor3usEXTPROC) extgl_GetProcAddress("glSecondaryColor3usEXT"); + glSecondaryColor3usvEXT = (glSecondaryColor3usvEXTPROC) extgl_GetProcAddress("glSecondaryColor3usvEXT"); + glSecondaryColorPointerEXT = (glSecondaryColorPointerEXTPROC) extgl_GetProcAddress("glSecondaryColorPointerEXT"); +#endif +} + +void extgl_InitEXTCompiledVertexArray() +{ +#ifdef GL_EXT_compiled_vertex_array + if (!extgl_Extensions.EXT_compiled_vertex_array) + return; + glLockArraysEXT = (glLockArraysEXTPROC) extgl_GetProcAddress("glLockArraysEXT"); + glUnlockArraysEXT = (glUnlockArraysEXTPROC) extgl_GetProcAddress("glUnlockArraysEXT"); +#endif +} + +void extgl_InitARBTransposeMatrix() +{ +#ifdef GL_ARB_transpose_matrix + if (!extgl_Extensions.ARB_transpose_matrix) + return; + glLoadTransposeMatrixfARB = (glLoadTransposeMatrixfARBPROC) extgl_GetProcAddress("glLoadTransposeMatrixfARB"); + glLoadTransposeMatrixdARB = (glLoadTransposeMatrixdARBPROC) extgl_GetProcAddress("glLoadTransposeMatrixdARB"); + glMultTransposeMatrixfARB = (glMultTransposeMatrixfARBPROC) extgl_GetProcAddress("glMultTransposeMatrixfARB"); + glMultTransposeMatrixdARB = (glMultTransposeMatrixdARBPROC) extgl_GetProcAddress("glMultTransposeMatrixdARB"); +#endif +} + +void extgl_InitEXTDrawRangeElements() +{ +#ifdef GL_EXT_draw_range_elements + if (!extgl_Extensions.EXT_draw_range_elements) + return; + glDrawRangeElementsEXT = (glDrawRangeElementsEXTPROC) extgl_GetProcAddress("glDrawRangeElementsEXT"); +#endif +} + +void extgl_InitARBMultitexture() +{ +#ifdef _WIN32 +#ifdef GL_ARB_multitexture + if (!extgl_Extensions.ARB_multitexture) + return; + glActiveTextureARB = (glActiveTextureARBPROC) extgl_GetProcAddress("glActiveTextureARB"); + glClientActiveTextureARB = (glClientActiveTextureARBPROC) extgl_GetProcAddress("glClientActiveTextureARB"); + + glMultiTexCoord1dARB = (glMultiTexCoord1dARBPROC) extgl_GetProcAddress("glMultiTexCoord1dARB"); + glMultiTexCoord1dvARB = (glMultiTexCoord1dvARBPROC) extgl_GetProcAddress("glMultiTexCoord1dvARB"); + glMultiTexCoord1fARB = (glMultiTexCoord1fARBPROC) extgl_GetProcAddress("glMultiTexCoord1fARB"); + glMultiTexCoord1fvARB = (glMultiTexCoord1fvARBPROC) extgl_GetProcAddress("glMultiTexCoord1fvARB"); + glMultiTexCoord1iARB = (glMultiTexCoord1iARBPROC) extgl_GetProcAddress("glMultiTexCoord1iARB"); + glMultiTexCoord1ivARB = (glMultiTexCoord1ivARBPROC) extgl_GetProcAddress("glMultiTexCoord1ivARB"); + glMultiTexCoord1sARB = (glMultiTexCoord1sARBPROC) extgl_GetProcAddress("glMultiTexCoord1sARB"); + glMultiTexCoord1svARB = (glMultiTexCoord1svARBPROC) extgl_GetProcAddress("glMultiTexCoord1svARB"); + + glMultiTexCoord2dARB = (glMultiTexCoord2dARBPROC) extgl_GetProcAddress("glMultiTexCoord2dARB"); + glMultiTexCoord2dvARB = (glMultiTexCoord2dvARBPROC) extgl_GetProcAddress("glMultiTexCoord2dvARB"); + glMultiTexCoord2fARB = (glMultiTexCoord2fARBPROC) extgl_GetProcAddress("glMultiTexCoord2fARB"); + glMultiTexCoord2fvARB = (glMultiTexCoord2fvARBPROC) extgl_GetProcAddress("glMultiTexCoord2fvARB"); + glMultiTexCoord2iARB = (glMultiTexCoord2iARBPROC) extgl_GetProcAddress("glMultiTexCoord2iARB"); + glMultiTexCoord2ivARB = (glMultiTexCoord2ivARBPROC) extgl_GetProcAddress("glMultiTexCoord2ivARB"); + glMultiTexCoord2sARB = (glMultiTexCoord2sARBPROC) extgl_GetProcAddress("glMultiTexCoord2sARB"); + glMultiTexCoord2svARB = (glMultiTexCoord2svARBPROC) extgl_GetProcAddress("glMultiTexCoord2svARB"); + + glMultiTexCoord3dARB = (glMultiTexCoord3dARBPROC) extgl_GetProcAddress("glMultiTexCoord3dARB"); + glMultiTexCoord3dvARB = (glMultiTexCoord3dvARBPROC) extgl_GetProcAddress("glMultiTexCoord3dvARB"); + glMultiTexCoord3fARB = (glMultiTexCoord3fARBPROC) extgl_GetProcAddress("glMultiTexCoord3fARB"); + glMultiTexCoord3fvARB = (glMultiTexCoord3fvARBPROC) extgl_GetProcAddress("glMultiTexCoord3fvARB"); + glMultiTexCoord3iARB = (glMultiTexCoord3iARBPROC) extgl_GetProcAddress("glMultiTexCoord3iARB"); + glMultiTexCoord3ivARB = (glMultiTexCoord3ivARBPROC) extgl_GetProcAddress("glMultiTexCoord3ivARB"); + glMultiTexCoord3sARB = (glMultiTexCoord3sARBPROC) extgl_GetProcAddress("glMultiTexCoord3sARB"); + glMultiTexCoord3svARB = (glMultiTexCoord3svARBPROC) extgl_GetProcAddress("glMultiTexCoord3svARB"); + + glMultiTexCoord4dARB = (glMultiTexCoord4dARBPROC) extgl_GetProcAddress("glMultiTexCoord4dARB"); + glMultiTexCoord4dvARB = (glMultiTexCoord4dvARBPROC) extgl_GetProcAddress("glMultiTexCoord4dvARB"); + glMultiTexCoord4fARB = (glMultiTexCoord4fARBPROC) extgl_GetProcAddress("glMultiTexCoord4fARB"); + glMultiTexCoord4fvARB = (glMultiTexCoord4fvARBPROC) extgl_GetProcAddress("glMultiTexCoord4fvARB"); + glMultiTexCoord4iARB = (glMultiTexCoord4iARBPROC) extgl_GetProcAddress("glMultiTexCoord4iARB"); + glMultiTexCoord4ivARB = (glMultiTexCoord4ivARBPROC) extgl_GetProcAddress("glMultiTexCoord4ivARB"); + glMultiTexCoord4sARB = (glMultiTexCoord4sARBPROC) extgl_GetProcAddress("glMultiTexCoord4sARB"); + glMultiTexCoord4svARB = (glMultiTexCoord4svARBPROC) extgl_GetProcAddress("glMultiTexCoord4svARB"); +#endif /* GL_ARB_multitexture */ +#endif /* WIN32 */ +} + +void extgl_InitOpenGL1_2() +{ +#ifdef _WIN32 +#ifdef GL_VERSION_1_2 + if (!extgl_Extensions.OpenGL12) + return; + glTexImage3D = (glTexImage3DPROC) extgl_GetProcAddress("glTexImage3D"); + glTexSubImage3D = (glTexSubImage3DPROC) extgl_GetProcAddress("glTexSubImage3D"); + glCopyTexSubImage3D = (glCopyTexSubImage3DPROC) extgl_GetProcAddress("glCopyTexSubImage3D"); + glDrawRangeElements = (glDrawRangeElementsPROC) extgl_GetProcAddress("glDrawRangeElements"); +#endif /* GL_VERSION_1_2 */ +#endif /* WIN32 */ +} + +void extgl_InitARBImaging() +{ +#ifdef _WIN32 +#ifdef GL_ARB_imaging + if (!extgl_Extensions.ARB_imaging) + return; + glBlendColor = (glBlendColorPROC) extgl_GetProcAddress("glBlendColor"); + glBlendEquation = (glBlendEquationPROC) extgl_GetProcAddress("glBlendEquation"); + glColorTable = (glColorTablePROC) extgl_GetProcAddress("glColorTable"); + glColorTableParameterfv = (glColorTableParameterfvPROC) extgl_GetProcAddress("glColorTableParameterfv"); + glColorTableParameteriv = (glColorTableParameterivPROC) extgl_GetProcAddress("glColorTableParameteriv"); + glCopyColorTable = (glCopyColorTablePROC) extgl_GetProcAddress("glCopyColorTable"); + glGetColorTable = (glGetColorTablePROC) extgl_GetProcAddress("glGetColorTable"); + glGetColorTableParameterfv = (glGetColorTableParameterfvPROC) extgl_GetProcAddress("glGetColorTableParameterfv"); + glGetColorTableParameteriv = (glGetColorTableParameterivPROC) extgl_GetProcAddress("glGetColorTableParameteriv"); + glColorSubTable = (glColorSubTablePROC) extgl_GetProcAddress("glColorSubTable"); + glCopyColorSubTable = (glCopyColorSubTablePROC) extgl_GetProcAddress("glCopyColorSubTable"); + glConvolutionFilter1D = (glConvolutionFilter1DPROC) extgl_GetProcAddress("glConvolutionFilter1D"); + glConvolutionFilter2D = (glConvolutionFilter2DPROC) extgl_GetProcAddress("glConvolutionFilter2D"); + glConvolutionParameterf = (glConvolutionParameterfPROC) extgl_GetProcAddress("glConvolutionParameterf"); + glConvolutionParameterfv = (glConvolutionParameterfvPROC) extgl_GetProcAddress("glConvolutionParameterfv"); + glConvolutionParameteri = (glConvolutionParameteriPROC) extgl_GetProcAddress("glConvolutionParameteri"); + glConvolutionParameteriv = (glConvolutionParameterivPROC) extgl_GetProcAddress("glConvolutionParameteriv"); + glCopyConvolutionFilter1D = (glCopyConvolutionFilter1DPROC) extgl_GetProcAddress("glCopyConvolutionFilter1D"); + glCopyConvolutionFilter2D = (glCopyConvolutionFilter2DPROC) extgl_GetProcAddress("glCopyConvolutionFilter2D"); + glGetConvolutionFilter = (glGetConvolutionFilterPROC) extgl_GetProcAddress("glGetConvolutionFilter"); + glGetConvolutionParameterfv = (glGetConvolutionParameterfvPROC) extgl_GetProcAddress("glGetConvolutionParameterfv"); + glGetConvolutionParameteriv = (glGetConvolutionParameterivPROC) extgl_GetProcAddress("glGetConvolutionParameteriv"); + glGetSeparableFilter = (glGetSeparableFilterPROC) extgl_GetProcAddress("glGetSeparableFilter"); + glSeparableFilter2D = (glSeparableFilter2DPROC) extgl_GetProcAddress("glSeparableFilter2D"); + glGetHistogram = (glGetHistogramPROC) extgl_GetProcAddress("glGetHistogram"); + glGetHistogramParameterfv = (glGetHistogramParameterfvPROC) extgl_GetProcAddress("glGetHistogramParameterfv"); + glGetHistogramParameteriv = (glGetHistogramParameterivPROC) extgl_GetProcAddress("glGetHistogramParameteriv"); + glGetMinmax = (glGetMinmaxPROC) extgl_GetProcAddress("glGetMinmax"); + glGetMinmaxParameterfv = (glGetMinmaxParameterfvPROC) extgl_GetProcAddress("glGetMinmaxParameterfv"); + glGetMinmaxParameteriv = (glGetMinmaxParameterivPROC) extgl_GetProcAddress("glGetMinmaxParameteriv"); + glHistogram = (glHistogramPROC) extgl_GetProcAddress("glHistogram"); + glMinmax = (glMinmaxPROC) extgl_GetProcAddress("glMinmax"); + glResetHistogram = (glResetHistogramPROC) extgl_GetProcAddress("glResetHistogram"); + glResetMinmax = (glResetMinmaxPROC) extgl_GetProcAddress("glResetMinmax"); +#endif /* GL_ARB_imaging */ +#endif /* WIN32 */ +} + +void extgl_InitOpenGL1_3() +{ +#ifdef _WIN32 +#ifdef GL_VERSION_1_3 + if (!extgl_Extensions.OpenGL13) + return; + glActiveTexture = (glActiveTexturePROC) extgl_GetProcAddress("glActiveTexture"); + glClientActiveTexture = (glClientActiveTexturePROC) extgl_GetProcAddress("glClientActiveTexture"); + + glMultiTexCoord1d = (glMultiTexCoord1dPROC) extgl_GetProcAddress("glMultiTexCoord1d"); + glMultiTexCoord1dv = (glMultiTexCoord1dvPROC) extgl_GetProcAddress("glMultiTexCoord1dv"); + glMultiTexCoord1f = (glMultiTexCoord1fPROC) extgl_GetProcAddress("glMultiTexCoord1f"); + glMultiTexCoord1fv = (glMultiTexCoord1fvPROC) extgl_GetProcAddress("glMultiTexCoord1fv"); + glMultiTexCoord1i = (glMultiTexCoord1iPROC) extgl_GetProcAddress("glMultiTexCoord1i"); + glMultiTexCoord1iv = (glMultiTexCoord1ivPROC) extgl_GetProcAddress("glMultiTexCoord1iv"); + glMultiTexCoord1s = (glMultiTexCoord1sPROC) extgl_GetProcAddress("glMultiTexCoord1s"); + glMultiTexCoord1sv = (glMultiTexCoord1svPROC) extgl_GetProcAddress("glMultiTexCoord1sv"); + + glMultiTexCoord2d = (glMultiTexCoord2dPROC) extgl_GetProcAddress("glMultiTexCoord2d"); + glMultiTexCoord2dv = (glMultiTexCoord2dvPROC) extgl_GetProcAddress("glMultiTexCoord2dv"); + glMultiTexCoord2f = (glMultiTexCoord2fPROC) extgl_GetProcAddress("glMultiTexCoord2f"); + glMultiTexCoord2fv = (glMultiTexCoord2fvPROC) extgl_GetProcAddress("glMultiTexCoord2fv"); + glMultiTexCoord2i = (glMultiTexCoord2iPROC) extgl_GetProcAddress("glMultiTexCoord2i"); + glMultiTexCoord2iv = (glMultiTexCoord2ivPROC) extgl_GetProcAddress("glMultiTexCoord2iv"); + glMultiTexCoord2s = (glMultiTexCoord2sPROC) extgl_GetProcAddress("glMultiTexCoord2s"); + glMultiTexCoord2sv = (glMultiTexCoord2svPROC) extgl_GetProcAddress("glMultiTexCoord2sv"); + + glMultiTexCoord3d = (glMultiTexCoord3dPROC) extgl_GetProcAddress("glMultiTexCoord3d"); + glMultiTexCoord3dv = (glMultiTexCoord3dvPROC) extgl_GetProcAddress("glMultiTexCoord3dv"); + glMultiTexCoord3f = (glMultiTexCoord3fPROC) extgl_GetProcAddress("glMultiTexCoord3f"); + glMultiTexCoord3fv = (glMultiTexCoord3fvPROC) extgl_GetProcAddress("glMultiTexCoord3fv"); + glMultiTexCoord3i = (glMultiTexCoord3iPROC) extgl_GetProcAddress("glMultiTexCoord3i"); + glMultiTexCoord3iv = (glMultiTexCoord3ivPROC) extgl_GetProcAddress("glMultiTexCoord3iv"); + glMultiTexCoord3s = (glMultiTexCoord3sPROC) extgl_GetProcAddress("glMultiTexCoord3s"); + glMultiTexCoord3sv = (glMultiTexCoord3svPROC) extgl_GetProcAddress("glMultiTexCoord3sv"); + + glMultiTexCoord4d = (glMultiTexCoord4dPROC) extgl_GetProcAddress("glMultiTexCoord4d"); + glMultiTexCoord4dv = (glMultiTexCoord4dvPROC) extgl_GetProcAddress("glMultiTexCoord4dv"); + glMultiTexCoord4f = (glMultiTexCoord4fPROC) extgl_GetProcAddress("glMultiTexCoord4f"); + glMultiTexCoord4fv = (glMultiTexCoord4fvPROC) extgl_GetProcAddress("glMultiTexCoord4fv"); + glMultiTexCoord4i = (glMultiTexCoord4iPROC) extgl_GetProcAddress("glMultiTexCoord4i"); + glMultiTexCoord4iv = (glMultiTexCoord4ivPROC) extgl_GetProcAddress("glMultiTexCoord4iv"); + glMultiTexCoord4s = (glMultiTexCoord4sPROC) extgl_GetProcAddress("glMultiTexCoord4s"); + glMultiTexCoord4sv = (glMultiTexCoord4svPROC) extgl_GetProcAddress("glMultiTexCoord4sv"); + + glLoadTransposeMatrixf = (glLoadTransposeMatrixfPROC) extgl_GetProcAddress("glLoadTransposeMatrixf"); + glLoadTransposeMatrixd = (glLoadTransposeMatrixdPROC) extgl_GetProcAddress("glLoadTransposeMatrixd"); + glMultTransposeMatrixf = (glMultTransposeMatrixfPROC) extgl_GetProcAddress("glMultTransposeMatrixf"); + glMultTransposeMatrixd = (glMultTransposeMatrixdPROC) extgl_GetProcAddress("glMultTransposeMatrixd"); + glCompressedTexImage3D = (glCompressedTexImage3DPROC) extgl_GetProcAddress("glCompressedTexImage3D"); + glCompressedTexImage2D = (glCompressedTexImage2DPROC) extgl_GetProcAddress("glCompressedTexImage2D"); + glCompressedTexImage1D = (glCompressedTexImage1DPROC) extgl_GetProcAddress("glCompressedTexImage1D"); + glCompressedTexSubImage3D = (glCompressedTexSubImage3DPROC) extgl_GetProcAddress("glCompressedTexSubImage3D"); + glCompressedTexSubImage2D = (glCompressedTexSubImage2DPROC) extgl_GetProcAddress("glCompressedTexSubImage2D"); + glCompressedTexSubImage1D = (glCompressedTexSubImage1DPROC) extgl_GetProcAddress("glCompressedTexSubImage1D"); + glGetCompressedTexImage = (glGetCompressedTexImagePROC) extgl_GetProcAddress("glGetCompressedTexImage"); + + glSampleCoverage = (glSampleCoveragePROC) extgl_GetProcAddress("glSampleCoverage"); +#endif /* GL_VERSION_1_3 */ +#endif /* WIN32 */ +} + +void extgl_InitOpenGL1_4() +{ +#ifdef _WIN32 +#ifdef GL_VERSION_1_4 + if (!extgl_Extensions.OpenGL14) + return; + glBlendColor = (glBlendColorPROC) extgl_GetProcAddress("glBlendColor"); + glBlendEquation = (glBlendEquationPROC) extgl_GetProcAddress("glBlendEquation"); + glFogCoordf = (glFogCoordfPROC) extgl_GetProcAddress("glFogCoordf"); + glFogCoordfv = (glFogCoordfvPROC) extgl_GetProcAddress("glFogCoordfv"); + glFogCoordd = (glFogCoorddPROC) extgl_GetProcAddress("glFogCoordd"); + glFogCoorddv = (glFogCoorddvPROC) extgl_GetProcAddress("glFogCoorddv"); + glFogCoordPointer = (glFogCoordPointerPROC) extgl_GetProcAddress("glFogCoordPointer"); + glMultiDrawArrays = (glMultiDrawArraysPROC) extgl_GetProcAddress("glMultiDrawArrays"); + glMultiDrawElements = (glMultiDrawElementsPROC) extgl_GetProcAddress("glMultiDrawElements"); + glPointParameterf = (glPointParameterfPROC) extgl_GetProcAddress("glPointParameterf"); + glPointParameterfv = (glPointParameterfvPROC) extgl_GetProcAddress("glPointParameterfv"); + glSecondaryColor3b = (glSecondaryColor3bPROC) extgl_GetProcAddress("glSecondaryColor3b"); + glSecondaryColor3bv = (glSecondaryColor3bvPROC) extgl_GetProcAddress("glSecondaryColor3bv"); + glSecondaryColor3d = (glSecondaryColor3dPROC) extgl_GetProcAddress("glSecondaryColor3d"); + glSecondaryColor3dv = (glSecondaryColor3dvPROC) extgl_GetProcAddress("glSecondaryColor3dv"); + glSecondaryColor3f = (glSecondaryColor3fPROC) extgl_GetProcAddress("glSecondaryColor3f"); + glSecondaryColor3fv = (glSecondaryColor3fvPROC) extgl_GetProcAddress("glSecondaryColor3fv"); + glSecondaryColor3i = (glSecondaryColor3iPROC) extgl_GetProcAddress("glSecondaryColor3i"); + glSecondaryColor3iv = (glSecondaryColor3ivPROC) extgl_GetProcAddress("glSecondaryColor3iv"); + glSecondaryColor3s = (glSecondaryColor3sPROC) extgl_GetProcAddress("glSecondaryColor3s"); + glSecondaryColor3sv = (glSecondaryColor3svPROC) extgl_GetProcAddress("glSecondaryColor3sv"); + glSecondaryColor3ub = (glSecondaryColor3ubPROC) extgl_GetProcAddress("glSecondaryColor3ub"); + glSecondaryColor3ubv = (glSecondaryColor3ubvPROC) extgl_GetProcAddress("glSecondaryColor3ubv"); + glSecondaryColor3ui = (glSecondaryColor3uiPROC) extgl_GetProcAddress("glSecondaryColor3ui"); + glSecondaryColor3uiv = (glSecondaryColor3uivPROC) extgl_GetProcAddress("glSecondaryColor3uiv"); + glSecondaryColor3us = (glSecondaryColor3usPROC) extgl_GetProcAddress("glSecondaryColor3us"); + glSecondaryColor3usv = (glSecondaryColor3usvPROC) extgl_GetProcAddress("glSecondaryColor3usv"); + glSecondaryColorPointer = (glSecondaryColorPointerPROC) extgl_GetProcAddress("glSecondaryColorPointer"); + glBlendFuncSeparate = (glBlendFuncSeparatePROC) extgl_GetProcAddress("glBlendFuncSeparate"); + glWindowPos2d = (glWindowPos2dPROC) extgl_GetProcAddress("glWindowPos2d"); + glWindowPos2f = (glWindowPos2fPROC) extgl_GetProcAddress("glWindowPos2f"); + glWindowPos2i = (glWindowPos2iPROC) extgl_GetProcAddress("glWindowPos2i"); + glWindowPos2s = (glWindowPos2sPROC) extgl_GetProcAddress("glWindowPos2s"); + glWindowPos2dv = (glWindowPos2dvPROC) extgl_GetProcAddress("glWindowPos2dv"); + glWindowPos2fv = (glWindowPos2fvPROC) extgl_GetProcAddress("glWindowPos2fv"); + glWindowPos2iv = (glWindowPos2ivPROC) extgl_GetProcAddress("glWindowPos2iv"); + glWindowPos2sv = (glWindowPos2svPROC) extgl_GetProcAddress("glWindowPos2sv"); + glWindowPos3d = (glWindowPos3dPROC) extgl_GetProcAddress("glWindowPos3d"); + glWindowPos3f = (glWindowPos3fPROC) extgl_GetProcAddress("glWindowPos3f"); + glWindowPos3i = (glWindowPos3iPROC) extgl_GetProcAddress("glWindowPos3i"); + glWindowPos3s = (glWindowPos3sPROC) extgl_GetProcAddress("glWindowPos3s"); + glWindowPos3dv = (glWindowPos3dvPROC) extgl_GetProcAddress("glWindowPos3dv"); + glWindowPos3fv = (glWindowPos3fvPROC) extgl_GetProcAddress("glWindowPos3fv"); + glWindowPos3iv = (glWindowPos3ivPROC) extgl_GetProcAddress("glWindowPos3iv"); + glWindowPos3sv = (glWindowPos3svPROC) extgl_GetProcAddress("glWindowPos3sv"); +#endif /* GL_VERSION_1_4 */ +#endif /* WIN32 */ +} + +void extgl_InitSupportedExtensions() +{ + char *s = (char*) glGetString(GL_VERSION); + if (!s) + return; + const char v[2]={s[0],'\0'}; + int major = atoi(v); + if(atoi(v) >= 2){ + extgl_Extensions.OpenGL12 = 1; + extgl_Extensions.OpenGL13 = 1; + extgl_Extensions.OpenGL14 = 1; + }else{ + s = strstr(s, "1."); + } + if (s == NULL) + { + extgl_Extensions.OpenGL12 = 0; + extgl_Extensions.OpenGL13 = 0; + extgl_Extensions.OpenGL14 = 0; + } + else + { + extgl_Extensions.OpenGL12 = 0; + extgl_Extensions.OpenGL13 = 0; + extgl_Extensions.OpenGL14 = 0; + + if( s[2] >= '4' ) + { + extgl_Extensions.OpenGL12 = 1; + extgl_Extensions.OpenGL13 = 1; + extgl_Extensions.OpenGL14 = 1; + } + if( s[2] == '3' ) + { + extgl_Extensions.OpenGL12 = 1; + extgl_Extensions.OpenGL13 = 1; + } + if( s[2] == '2' ) + { + extgl_Extensions.OpenGL12 = 1; + } + } + extgl_Extensions.ARB_depth_texture = QueryExtension("GL_ARB_depth_texture"); + extgl_Extensions.ARB_fragment_program = QueryExtension("GL_ARB_fragment_program"); + extgl_Extensions.ARB_imaging = QueryExtension("GL_ARB_imaging"); + extgl_Extensions.ARB_matrix_palette = QueryExtension("GL_ARB_matrix_palette"); + extgl_Extensions.ARB_multisample = QueryExtension("GL_ARB_multisample"); + extgl_Extensions.ARB_multitexture = QueryExtension("GL_ARB_multitexture"); + extgl_Extensions.ARB_point_parameters = QueryExtension("GL_ARB_point_parameters"); + extgl_Extensions.ARB_shadow = QueryExtension("GL_ARB_shadow"); + extgl_Extensions.ARB_shadow_ambient = QueryExtension("GL_ARB_shadow_ambient"); + extgl_Extensions.ARB_texture_border_clamp = QueryExtension("GL_ARB_texture_border_clamp"); + extgl_Extensions.ARB_texture_compression = QueryExtension("GL_ARB_texture_compression"); + extgl_Extensions.ARB_texture_cube_map = QueryExtension("GL_ARB_texture_cube_map"); + extgl_Extensions.ARB_texture_env_add = QueryExtension("GL_ARB_texture_env_add"); + extgl_Extensions.ARB_texture_env_combine = QueryExtension("GL_ARB_texture_env_combine"); + extgl_Extensions.ARB_texture_env_crossbar = QueryExtension("GL_ARB_texture_env_crossbar"); + extgl_Extensions.ARB_texture_env_dot3 = QueryExtension("GL_ARB_texture_env_dot3"); + extgl_Extensions.ARB_texture_mirrored_repeat = QueryExtension("GL_ARB_texture_mirrored_repeat"); + extgl_Extensions.ARB_transpose_matrix = QueryExtension("GL_ARB_transpose_matrix"); + extgl_Extensions.ARB_vertex_blend = QueryExtension("GL_ARB_vertex_blend"); + extgl_Extensions.ARB_vertex_program = QueryExtension("GL_ARB_vertex_program"); + extgl_Extensions.ARB_window_pos = QueryExtension("GL_ARB_window_pos"); + extgl_Extensions.EXT_abgr = QueryExtension("GL_EXT_abgr"); + extgl_Extensions.EXT_bgra = QueryExtension("GL_EXT_bgra"); + extgl_Extensions.EXT_blend_func_separate = QueryExtension("GL_EXT_blend_function_separate"); + extgl_Extensions.EXT_compiled_vertex_array = QueryExtension("GL_EXT_compiled_vertex_array"); + extgl_Extensions.EXT_cull_vertex = QueryExtension("GL_EXT_cull_vertex"); + extgl_Extensions.EXT_draw_range_elements = QueryExtension("GL_EXT_draw_range_elements"); + extgl_Extensions.EXT_fog_coord = QueryExtension("GL_EXT_fog_coord"); + extgl_Extensions.EXT_multi_draw_arrays = QueryExtension("GL_EXT_multi_draw_arrays"); + extgl_Extensions.EXT_point_parameters = QueryExtension("GL_EXT_point_parameters"); + extgl_Extensions.EXT_secondary_color = QueryExtension("GL_EXT_secondary_color"); + extgl_Extensions.EXT_separate_specular_color = QueryExtension("GL_EXT_separate_specular_color"); + extgl_Extensions.EXT_shadow_funcs = QueryExtension("GL_EXT_shadow_funcs"); + extgl_Extensions.EXT_stencil_two_side = QueryExtension("GL_EXT_stencil_two_side"); + extgl_Extensions.EXT_stencil_wrap = QueryExtension("GL_EXT_stencil_wrap"); + extgl_Extensions.EXT_texture_compression_s3tc = QueryExtension("GL_EXT_texture_compression_s3tc"); + extgl_Extensions.EXT_texture_env_combine = QueryExtension("GL_EXT_texture_env_combine"); + extgl_Extensions.EXT_texture_filter_anisotropic = QueryExtension("GL_EXT_texture_filter_anisotropic"); + extgl_Extensions.EXT_texture_lod_bias = QueryExtension("GL_EXT_texture_lod_bias"); + extgl_Extensions.EXT_texture_rectangle = QueryExtension("GL_EXT_texture_rectangle"); // added -ec + extgl_Extensions.EXT_vertex_shader = QueryExtension("GL_EXT_vertex_shader"); + extgl_Extensions.EXT_vertex_weighting = QueryExtension("GL_EXT_vertex_weighting"); + extgl_Extensions.ATI_draw_buffers = QueryExtension("GL_ATI_draw_buffers"); // added -ec + extgl_Extensions.ATI_element_array = QueryExtension("GL_ATI_element_array"); + extgl_Extensions.ATI_envmap_bumpmap = QueryExtension("GL_ATI_envmap_bumpmap"); + extgl_Extensions.ATI_fragment_shader = QueryExtension("GL_ATI_fragment_shader"); + extgl_Extensions.ATI_pn_triangles = QueryExtension("GL_ATI_pn_triangles"); + extgl_Extensions.ATI_point_cull_mode = QueryExtension("GL_ATI_point_cull_mode"); + extgl_Extensions.ATI_text_fragment_shader = QueryExtension("GL_ATI_text_fragment_shader"); + extgl_Extensions.ATI_texture_float = QueryExtension("GL_ATI_texture_float"); // added -ec + extgl_Extensions.ATI_texture_mirror_once = QueryExtension("GL_ATI_texture_mirror_once"); + extgl_Extensions.ATI_vertex_array_object = QueryExtension("GL_ATI_vertex_array_object"); + extgl_Extensions.ATI_vertex_streams = QueryExtension("GL_ATI_vertex_streams"); + extgl_Extensions.ATIX_point_sprites = QueryExtension("GL_ATIX_point_sprites"); + extgl_Extensions.ATIX_texture_env_route = QueryExtension("GL_ATIX_texture_env_route"); + extgl_Extensions.HP_occlusion_test = QueryExtension("GL_HP_occlusion_test"); + extgl_Extensions.NV_blend_square = QueryExtension("GL_NV_blend_square"); + extgl_Extensions.NV_copy_depth_to_color = QueryExtension("GL_NV_copy_depth_to_color"); + extgl_Extensions.NV_depth_clamp = QueryExtension("GL_NV_depth_clamp"); + extgl_Extensions.NV_element_array = QueryExtension("GL_NV_element_array"); + extgl_Extensions.NV_evaluators = QueryExtension("GL_NV_evaluators"); + extgl_Extensions.NV_fence = QueryExtension("GL_NV_fence"); + extgl_Extensions.NV_float_buffer = QueryExtension("GL_NV_float_buffer"); + extgl_Extensions.NV_fog_distance = QueryExtension("GL_NV_fog_distance"); + extgl_Extensions.NV_fragment_program = QueryExtension("GL_NV_fragment_program"); + extgl_Extensions.NV_light_max_exponent = QueryExtension("GL_NV_light_max_exponent"); + extgl_Extensions.NV_occlusion_query = QueryExtension("GL_NV_occlusion_query"); + extgl_Extensions.NV_packed_depth_stencil = QueryExtension("GL_NV_packed_depth_stencil"); + extgl_Extensions.NV_point_sprite = QueryExtension("GL_NV_point_sprite"); + extgl_Extensions.NV_primitive_restart = QueryExtension("GL_NV_primitive_restart"); + extgl_Extensions.NV_register_combiners = QueryExtension("GL_NV_register_combiners"); + extgl_Extensions.NV_register_combiners2 = QueryExtension("GL_NV_register_combiners2"); + extgl_Extensions.NV_texgen_reflection = QueryExtension("GL_NV_texgen_reflection"); + extgl_Extensions.NV_texture_env_combine4 = QueryExtension("GL_NV_texture_env_combine4"); + extgl_Extensions.NV_texture_rectangle = QueryExtension("GL_NV_texture_rectangle"); + extgl_Extensions.NV_texture_shader = QueryExtension("GL_NV_texture_shader"); + extgl_Extensions.NV_texture_shader2 = QueryExtension("GL_NV_texture_shader2"); + extgl_Extensions.NV_texture_shader3 = QueryExtension("GL_NV_texture_shader3"); + extgl_Extensions.NV_vertex_array_range = QueryExtension("GL_NV_vertex_array_range"); + extgl_Extensions.NV_vertex_array_range2 = QueryExtension("GL_NV_vertex_array_range2"); + extgl_Extensions.NV_vertex_program = QueryExtension("GL_NV_vertex_program"); + extgl_Extensions.NV_vertex_program1_1 = QueryExtension("GL_NV_vertex_program1_1"); + extgl_Extensions.NV_vertex_program2 = QueryExtension("GL_NV_vertex_program2"); + extgl_Extensions.SGIS_generate_mipmap = QueryExtension("GL_SGIS_generate_mipmap"); + extgl_Extensions.SGIX_depth_texture = QueryExtension("GL_SGIX_depth_texture"); + extgl_Extensions.SGIX_shadow = QueryExtension("GL_SGIX_shadow"); +} + + +/* extgl_Init the extensions and load all the functions */ +int extgl_Initialize() +{ + extgl_error = 0; + extgl_InitSupportedExtensions(); + + /* first load the etensions */ + extgl_InitARBTransposeMatrix(); + extgl_InitARBMultisample(); + extgl_InitEXTCompiledVertexArray(); + extgl_InitEXTSecondaryColor(); + extgl_InitEXTFogCoord(); + extgl_InitNVVertexArrayRange(); + extgl_InitEXTPointParameters(); + extgl_InitNVRegisterCombiners(); + extgl_InitEXTVertexWeighting(); + extgl_InitNVVertexProgram(); + extgl_InitNVFence(); + extgl_InitNVRegisterCombiners2(); + extgl_InitATIPNTriangles(); + extgl_InitARBPointParameters(); + extgl_InitARBVertexBlend(); + extgl_InitEXTMultiDrawArrays(); + extgl_InitARBMatrixPalette(); + extgl_InitEXTVertexShader(); + extgl_InitATIEnvmapBumpmap(); + extgl_InitATIFragmentShader(); + extgl_InitATIElementArray(); + extgl_InitATIVertexStreams(); + extgl_InitATIVertexArrayObject(); + extgl_InitNVOcclusionQuery(); + extgl_InitNVPointSprite(); + extgl_InitARBWindowPos(); + extgl_InitARBTextureCompression(); + extgl_InitEXTDrawRangeElements(); + extgl_InitEXTStencilTwoSide(); + extgl_InitARBVertexProgram(); + extgl_InitEXTCullVertex(); + extgl_InitEXTBlendFuncSeparate(); + extgl_InitARBImaging(); + extgl_InitARBMultitexture(); + extgl_InitNVElementArray(); + extgl_InitNVFragmentProgram(); + extgl_InitNVPrimitiveRestart(); + extgl_InitARBFragmentProgram(); + extgl_InitATIDrawBuffers(); + + /* now load core opengl */ + extgl_InitOpenGL1_2(); + extgl_InitOpenGL1_3(); + extgl_InitOpenGL1_4(); + + /* load WGL extensions */ +#ifdef _WIN32 + extgl_InitializeWGL(); +#endif + + SupportedExtensions = extgl_Extensions; + return extgl_error; +} + +/* deprecated function please do not use it, use extgl_Initialize() instead */ +int glInitialize() +{ + return extgl_Initialize(); +} + +/* turn on the warning for the borland compiler*/ +#ifdef __BORLANDC__ +#pragma warn .8064 +#pragma warn .8065 +#endif /* __BORLANDC__ */ diff --git a/extern/freestyle/src/rendering/extgl.h b/extern/freestyle/src/rendering/extgl.h new file mode 100755 index 00000000000..68c13dea3d2 --- /dev/null +++ b/extern/freestyle/src/rendering/extgl.h @@ -0,0 +1,5106 @@ +/* Small parts were taken from glext.h, here's the lisence: */ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ + +/* Most parts copyright (c) 2001-2002 Lev Povalahev under this lisence: */ + +/* ---------------------------------------------------------------------------- +Copyright (c) 2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + GL_draw_range_elements support added by Benjamin Karaban + + Lev Povalahev contact information: + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ +*/ +/* These extensions are supported: +GL_ARB_depth_texture +GL_ARB_fragment_program +GL_ARB_imaging +GL_ARB_matrix_palette +GL_ARB_multisample +GL_ARB_multitexture +GL_ARB_point_parameters +GL_ARB_shadow +GL_ARB_shadow_ambient +GL_ARB_texture_compression +GL_ARB_texture_env_add +GL_ARB_texture_env_dot3 +GL_ARB_texture_env_combine +GL_ARB_texture_env_crossbar +GL_ARB_texture_border_clamp +GL_ARB_texture_cube_map +GL_ARB_texture_mirrored_repeat +GL_ARB_transpose_matrix +GL_ARB_vertex_blend +GL_ARB_vertex_program +GL_ARB_window_pos +GL_EXT_abgr +GL_EXT_bgra +GL_EXT_blend_function_separate +GL_EXT_compiled_vertex_array +GL_EXT_cull_vertex +GL_EXT_draw_range_elements +GL_EXT_fog_coord +GL_EXT_multi_draw_arrays +GL_EXT_point_parameters +GL_EXT_secondary_color +GL_EXT_separate_specular_color +GL_EXT_shadow_funcs +GL_EXT_stencil_two_side +GL_EXT_stencil_wrap +GL_EXT_texture_compression_s3tc +GL_EXT_texture_filter_anisotropic +GL_EXT_texture_lod_bias +GL_EXT_vertex_shader +GL_EXT_vertex_weighting +GL_ATI_element_array +GL_ATI_envmap_bumpmap +GL_ATI_fragment_shader +GL_ATI_pn_triangles +GL_ATI_text_fragment_shader +GL_ATI_texture_mirror_once +GL_ATI_vertex_array_object; +GL_ATI_vertex_streams +GL_ATIX_point_sprites +GL_ATIX_texture_env_route +GL_HP_occlusion_test +GL_NV_blend_square +GL_NV_copy_depth_to_color +GL_NV_depth_clamp +GL_NV_element_array +GL_NV_evaluators +GL_NV_fence +GL_NV_float_buffer +GL_NV_fog_distance +GL_NV_fragment_program +GL_NV_light_max_exponent +GL_NV_occlusion_query +GL_NV_packed_depth_stencil +GL_NV_point_sprite +GL_NV_primitive_restart +GL_NV_register_combiners +GL_NV_register_combiners2 +GL_NV_texgen_reflection +GL_NV_texture_env_combine4 +GL_NV_texture_rectangle +GL_NV_texture_shader +GL_NV_texture_shader2 +GL_NV_texture_shader3 +GL_NV_vertex_array_range +GL_NV_vertex_array_range2 +GL_NV_vertex_program +GL_NV_vertex_program1_1 +GL_NV_vertex_program2 +GL_SGIS_generate_mipmap +GL_SGIX_shadow +GL_SGIX_depth_texture +WGL_ARB_buffer_region +WGL_ARB_extensions_string +WGL_ARB_make_current_read; +WGL_ARB_multisample +WGL_ARB_pbuffer +WGL_ARB_pixel_format +WGL_ARB_render_texture +WGL_EXT_extensions_string +WGL_EXT_swap_control +WGL_NV_render_depth_texture +WGL_NV_render_texture_rectangle + +// Added -ec. Some of these are still proprietary, so do not +// distribute. + +EXT_texture_rectangle +ATI_draw_buffers +ATI_pixel_format_float +ATI_texture_float +*/ +#ifndef __EXTGL_H__ +#define __EXTGL_H__ + +#include "../system/FreestyleConfig.h" + +#if defined(_WIN32) && !defined(APIENTRY) +#define WIN32_LEAN_AND_MEAN 1 +#include +#endif + +#define __glext_h_ +#define __GLEXT_H_ +#define __gl_h_ +#define __GL_H__ + +#include + +#ifndef APIENTRY +#define APIENTRY +#endif + +#ifndef _WIN32 +#define GLAPI extern +#define GLAPIENTRY +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __MACH__ +/* OpenGL 1.1 definition */ + +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void GLvoid; + +#endif + +#ifndef _WIN32 +#ifndef __MACH__ +#include +#endif +#endif /* _WIN32 */ + +/* for mingw compatibility */ +typedef void (*_GLfuncptr)(); + +#define GL_VERSION_1_1 1 +#define GL_ACCUM 0x0100 +#define GL_LOAD 0x0101 +#define GL_RETURN 0x0102 +#define GL_MULT 0x0103 +#define GL_ADD 0x0104 +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_CURRENT_BIT 0x00000001 +#define GL_POINT_BIT 0x00000002 +#define GL_LINE_BIT 0x00000004 +#define GL_POLYGON_BIT 0x00000008 +#define GL_POLYGON_STIPPLE_BIT 0x00000010 +#define GL_PIXEL_MODE_BIT 0x00000020 +#define GL_LIGHTING_BIT 0x00000040 +#define GL_FOG_BIT 0x00000080 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_ACCUM_BUFFER_BIT 0x00000200 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_VIEWPORT_BIT 0x00000800 +#define GL_TRANSFORM_BIT 0x00001000 +#define GL_ENABLE_BIT 0x00002000 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_HINT_BIT 0x00008000 +#define GL_EVAL_BIT 0x00010000 +#define GL_LIST_BIT 0x00020000 +#define GL_TEXTURE_BIT 0x00040000 +#define GL_SCISSOR_BIT 0x00080000 +#define GL_ALL_ATTRIB_BITS 0x000fffff +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_QUADS 0x0007 +#define GL_QUAD_STRIP 0x0008 +#define GL_POLYGON 0x0009 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_TRUE 1 +#define GL_FALSE 0 +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_2_BYTES 0x1407 +#define GL_3_BYTES 0x1408 +#define GL_4_BYTES 0x1409 +#define GL_DOUBLE 0x140A +#define GL_NONE 0 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_AUX0 0x0409 +#define GL_AUX1 0x040A +#define GL_AUX2 0x040B +#define GL_AUX3 0x040C +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_2D 0x0600 +#define GL_3D 0x0601 +#define GL_3D_COLOR 0x0602 +#define GL_3D_COLOR_TEXTURE 0x0603 +#define GL_4D_COLOR_TEXTURE 0x0604 +#define GL_PASS_THROUGH_TOKEN 0x0700 +#define GL_POINT_TOKEN 0x0701 +#define GL_LINE_TOKEN 0x0702 +#define GL_POLYGON_TOKEN 0x0703 +#define GL_BITMAP_TOKEN 0x0704 +#define GL_DRAW_PIXEL_TOKEN 0x0705 +#define GL_COPY_PIXEL_TOKEN 0x0706 +#define GL_LINE_RESET_TOKEN 0x0707 +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_COEFF 0x0A00 +#define GL_ORDER 0x0A01 +#define GL_DOMAIN 0x0A02 +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_INDEX 0x0B01 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_CURRENT_RASTER_COLOR 0x0B04 +#define GL_CURRENT_RASTER_INDEX 0x0B05 +#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 +#define GL_CURRENT_RASTER_POSITION 0x0B07 +#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 +#define GL_CURRENT_RASTER_DISTANCE 0x0B09 +#define GL_POINT_SMOOTH 0x0B10 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 +#define GL_LIST_MODE 0x0B30 +#define GL_MAX_LIST_NESTING 0x0B31 +#define GL_LIST_BASE 0x0B32 +#define GL_LIST_INDEX 0x0B33 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_STIPPLE 0x0B42 +#define GL_EDGE_FLAG 0x0B43 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_LIGHTING 0x0B50 +#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_SHADE_MODEL 0x0B54 +#define GL_COLOR_MATERIAL_FACE 0x0B55 +#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_FOG 0x0B60 +#define GL_FOG_INDEX 0x0B61 +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_ACCUM_CLEAR_VALUE 0x0B80 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_MATRIX_MODE 0x0BA0 +#define GL_NORMALIZE 0x0BA1 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_ATTRIB_STACK_DEPTH 0x0BB0 +#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_DITHER 0x0BD0 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND 0x0BE2 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_INDEX_LOGIC_OP 0x0BF1 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_AUX_BUFFERS 0x0C00 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_READ_BUFFER 0x0C02 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_INDEX_CLEAR_VALUE 0x0C20 +#define GL_INDEX_WRITEMASK 0x0C21 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_INDEX_MODE 0x0C30 +#define GL_RGBA_MODE 0x0C31 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 +#define GL_RENDER_MODE 0x0C40 +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_FOG_HINT 0x0C54 +#define GL_TEXTURE_GEN_S 0x0C60 +#define GL_TEXTURE_GEN_T 0x0C61 +#define GL_TEXTURE_GEN_R 0x0C62 +#define GL_TEXTURE_GEN_Q 0x0C63 +#define GL_PIXEL_MAP_I_TO_I 0x0C70 +#define GL_PIXEL_MAP_S_TO_S 0x0C71 +#define GL_PIXEL_MAP_I_TO_R 0x0C72 +#define GL_PIXEL_MAP_I_TO_G 0x0C73 +#define GL_PIXEL_MAP_I_TO_B 0x0C74 +#define GL_PIXEL_MAP_I_TO_A 0x0C75 +#define GL_PIXEL_MAP_R_TO_R 0x0C76 +#define GL_PIXEL_MAP_G_TO_G 0x0C77 +#define GL_PIXEL_MAP_B_TO_B 0x0C78 +#define GL_PIXEL_MAP_A_TO_A 0x0C79 +#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 +#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 +#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 +#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 +#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 +#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 +#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 +#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 +#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 +#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAP_COLOR 0x0D10 +#define GL_MAP_STENCIL 0x0D11 +#define GL_INDEX_SHIFT 0x0D12 +#define GL_INDEX_OFFSET 0x0D13 +#define GL_RED_SCALE 0x0D14 +#define GL_RED_BIAS 0x0D15 +#define GL_ZOOM_X 0x0D16 +#define GL_ZOOM_Y 0x0D17 +#define GL_GREEN_SCALE 0x0D18 +#define GL_GREEN_BIAS 0x0D19 +#define GL_BLUE_SCALE 0x0D1A +#define GL_BLUE_BIAS 0x0D1B +#define GL_ALPHA_SCALE 0x0D1C +#define GL_ALPHA_BIAS 0x0D1D +#define GL_DEPTH_SCALE 0x0D1E +#define GL_DEPTH_BIAS 0x0D1F +#define GL_MAX_EVAL_ORDER 0x0D30 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 +#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_NAME_STACK_DEPTH 0x0D37 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_INDEX_BITS 0x0D51 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_ACCUM_RED_BITS 0x0D58 +#define GL_ACCUM_GREEN_BITS 0x0D59 +#define GL_ACCUM_BLUE_BITS 0x0D5A +#define GL_ACCUM_ALPHA_BITS 0x0D5B +#define GL_NAME_STACK_DEPTH 0x0D70 +#define GL_AUTO_NORMAL 0x0D80 +#define GL_MAP1_COLOR_4 0x0D90 +#define GL_MAP1_INDEX 0x0D91 +#define GL_MAP1_NORMAL 0x0D92 +#define GL_MAP1_TEXTURE_COORD_1 0x0D93 +#define GL_MAP1_TEXTURE_COORD_2 0x0D94 +#define GL_MAP1_TEXTURE_COORD_3 0x0D95 +#define GL_MAP1_TEXTURE_COORD_4 0x0D96 +#define GL_MAP1_VERTEX_3 0x0D97 +#define GL_MAP1_VERTEX_4 0x0D98 +#define GL_MAP2_COLOR_4 0x0DB0 +#define GL_MAP2_INDEX 0x0DB1 +#define GL_MAP2_NORMAL 0x0DB2 +#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 +#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 +#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 +#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 +#define GL_MAP2_VERTEX_3 0x0DB7 +#define GL_MAP2_VERTEX_4 0x0DB8 +#define GL_MAP1_GRID_DOMAIN 0x0DD0 +#define GL_MAP1_GRID_SEGMENTS 0x0DD1 +#define GL_MAP2_GRID_DOMAIN 0x0DD2 +#define GL_MAP2_GRID_SEGMENTS 0x0DD3 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 +#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 +#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 +#define GL_SELECTION_BUFFER_POINTER 0x0DF3 +#define GL_SELECTION_BUFFER_SIZE 0x0DF4 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_TEXTURE_BORDER 0x1005 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 +#define GL_COMPILE 0x1300 +#define GL_COMPILE_AND_EXECUTE 0x1301 +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +#define GL_COLOR_INDEXES 0x1603 +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_COLOR_INDEX 0x1900 +#define GL_STENCIL_INDEX 0x1901 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_RED 0x1903 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_BITMAP 0x1A00 +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_RENDER 0x1C00 +#define GL_FEEDBACK 0x1C01 +#define GL_SELECT 0x1C02 +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_S 0x2000 +#define GL_T 0x2001 +#define GL_R 0x2002 +#define GL_Q 0x2003 +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 +#define GL_TEXTURE_ENV 0x2300 +#define GL_EYE_LINEAR 0x2400 +#define GL_OBJECT_LINEAR 0x2401 +#define GL_SPHERE_MAP 0x2402 +#define GL_TEXTURE_GEN_MODE 0x2500 +#define GL_OBJECT_PLANE 0x2501 +#define GL_EYE_PLANE 0x2502 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_CLAMP 0x2900 +#define GL_REPEAT 0x2901 +#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 +#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 +#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_ALPHA4 0x803B +#define GL_ALPHA8 0x803C +#define GL_ALPHA12 0x803D +#define GL_ALPHA16 0x803E +#define GL_LUMINANCE4 0x803F +#define GL_LUMINANCE8 0x8040 +#define GL_LUMINANCE12 0x8041 +#define GL_LUMINANCE16 0x8042 +#define GL_LUMINANCE4_ALPHA4 0x8043 +#define GL_LUMINANCE6_ALPHA2 0x8044 +#define GL_LUMINANCE8_ALPHA8 0x8045 +#define GL_LUMINANCE12_ALPHA4 0x8046 +#define GL_LUMINANCE12_ALPHA12 0x8047 +#define GL_LUMINANCE16_ALPHA16 0x8048 +#define GL_INTENSITY 0x8049 +#define GL_INTENSITY4 0x804A +#define GL_INTENSITY8 0x804B +#define GL_INTENSITY12 0x804C +#define GL_INTENSITY16 0x804D +#define GL_R3_G3_B2 0x2A10 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGBA2 0x8055 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE 0x8061 +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_TEXTURE_PRIORITY 0x8066 +#define GL_TEXTURE_RESIDENT 0x8067 +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_INDEX_ARRAY 0x8077 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_EDGE_FLAG_ARRAY 0x8079 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_INDEX_ARRAY_TYPE 0x8085 +#define GL_INDEX_ARRAY_STRIDE 0x8086 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_INDEX_ARRAY_POINTER 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 +#define GL_V2F 0x2A20 +#define GL_V3F 0x2A21 +#define GL_C4UB_V2F 0x2A22 +#define GL_C4UB_V3F 0x2A23 +#define GL_C3F_V3F 0x2A24 +#define GL_N3F_V3F 0x2A25 +#define GL_C4F_N3F_V3F 0x2A26 +#define GL_T2F_V3F 0x2A27 +#define GL_T4F_V4F 0x2A28 +#define GL_T2F_C4UB_V3F 0x2A29 +#define GL_T2F_C3F_V3F 0x2A2A +#define GL_T2F_N3F_V3F 0x2A2B +#define GL_T2F_C4F_N3F_V3F 0x2A2C +#define GL_T4F_C4F_N3F_V4F 0x2A2D +#define GL_LOGIC_OP GL_INDEX_LOGIC_OP +#define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT + +/* functions */ + +extern void APIENTRY glAccum (GLenum op, GLfloat value); +extern void APIENTRY glAlphaFunc (GLenum func, GLclampf ref); +extern GLboolean APIENTRY glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences); +extern void APIENTRY glArrayElement (GLint i); +extern void APIENTRY glBegin (GLenum mode); +extern void APIENTRY glBindTexture (GLenum target, GLuint texture); +extern void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +extern void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +extern void APIENTRY glCallList (GLuint list); +extern void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists); +extern void APIENTRY glClear (GLbitfield mask); +extern void APIENTRY glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +extern void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +extern void APIENTRY glClearDepth (GLclampd depth); +extern void APIENTRY glClearIndex (GLfloat c); +extern void APIENTRY glClearStencil (GLint s); +extern void APIENTRY glClipPlane (GLenum plane, const GLdouble *equation); +extern void APIENTRY glColor3b (GLbyte red, GLbyte green, GLbyte blue); +extern void APIENTRY glColor3bv (const GLbyte *v); +extern void APIENTRY glColor3d (GLdouble red, GLdouble green, GLdouble blue); +extern void APIENTRY glColor3dv (const GLdouble *v); +extern void APIENTRY glColor3f (GLfloat red, GLfloat green, GLfloat blue); +extern void APIENTRY glColor3fv (const GLfloat *v); +extern void APIENTRY glColor3i (GLint red, GLint green, GLint blue); +extern void APIENTRY glColor3iv (const GLint *v); +extern void APIENTRY glColor3s (GLshort red, GLshort green, GLshort blue); +extern void APIENTRY glColor3sv (const GLshort *v); +extern void APIENTRY glColor3ub (GLubyte red, GLubyte green, GLubyte blue); +extern void APIENTRY glColor3ubv (const GLubyte *v); +extern void APIENTRY glColor3ui (GLuint red, GLuint green, GLuint blue); +extern void APIENTRY glColor3uiv (const GLuint *v); +extern void APIENTRY glColor3us (GLushort red, GLushort green, GLushort blue); +extern void APIENTRY glColor3usv (const GLushort *v); +extern void APIENTRY glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); +extern void APIENTRY glColor4bv (const GLbyte *v); +extern void APIENTRY glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); +extern void APIENTRY glColor4dv (const GLdouble *v); +extern void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +extern void APIENTRY glColor4fv (const GLfloat *v); +extern void APIENTRY glColor4i (GLint red, GLint green, GLint blue, GLint alpha); +extern void APIENTRY glColor4iv (const GLint *v); +extern void APIENTRY glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha); +extern void APIENTRY glColor4sv (const GLshort *v); +extern void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +extern void APIENTRY glColor4ubv (const GLubyte *v); +extern void APIENTRY glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha); +extern void APIENTRY glColor4uiv (const GLuint *v); +extern void APIENTRY glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha); +extern void APIENTRY glColor4usv (const GLushort *v); +extern void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +extern void APIENTRY glColorMaterial (GLenum face, GLenum mode); +extern void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +extern void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); +extern void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +extern void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +extern void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +extern void APIENTRY glCullFace (GLenum mode); +extern void APIENTRY glDeleteLists (GLuint list, GLsizei range); +extern void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +extern void APIENTRY glDepthFunc (GLenum func); +extern void APIENTRY glDepthMask (GLboolean flag); +extern void APIENTRY glDepthRange (GLclampd zNear, GLclampd zFar); +extern void APIENTRY glDisable (GLenum cap); +extern void APIENTRY glDisableClientState (GLenum array); +extern void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +extern void APIENTRY glDrawBuffer (GLenum mode); +extern void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +extern void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +extern void APIENTRY glEdgeFlag (GLboolean flag); +#ifndef __MACH__ +extern void APIENTRY glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer); +#endif +extern void APIENTRY glEdgeFlagv (const GLboolean *flag); +extern void APIENTRY glEnable (GLenum cap); +extern void APIENTRY glEnableClientState (GLenum array); +extern void APIENTRY glEnd (void); +extern void APIENTRY glEndList (void); +extern void APIENTRY glEvalCoord1d (GLdouble u); +extern void APIENTRY glEvalCoord1dv (const GLdouble *u); +extern void APIENTRY glEvalCoord1f (GLfloat u); +extern void APIENTRY glEvalCoord1fv (const GLfloat *u); +extern void APIENTRY glEvalCoord2d (GLdouble u, GLdouble v); +extern void APIENTRY glEvalCoord2dv (const GLdouble *u); +extern void APIENTRY glEvalCoord2f (GLfloat u, GLfloat v); +extern void APIENTRY glEvalCoord2fv (const GLfloat *u); +extern void APIENTRY glEvalMesh1 (GLenum mode, GLint i1, GLint i2); +extern void APIENTRY glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); +extern void APIENTRY glEvalPoint1 (GLint i); +extern void APIENTRY glEvalPoint2 (GLint i, GLint j); +extern void APIENTRY glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer); +extern void APIENTRY glFinish (void); +extern void APIENTRY glFlush (void); +extern void APIENTRY glFogf (GLenum pname, GLfloat param); +extern void APIENTRY glFogfv (GLenum pname, const GLfloat *params); +extern void APIENTRY glFogi (GLenum pname, GLint param); +extern void APIENTRY glFogiv (GLenum pname, const GLint *params); +extern void APIENTRY glFrontFace (GLenum mode); +extern void APIENTRY glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +extern GLuint APIENTRY glGenLists (GLsizei range); +extern void APIENTRY glGenTextures (GLsizei n, GLuint *textures); +extern void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); +extern void APIENTRY glGetClipPlane (GLenum plane, GLdouble *equation); +extern void APIENTRY glGetDoublev (GLenum pname, GLdouble *params); +extern GLenum APIENTRY glGetError (void); +extern void APIENTRY glGetFloatv (GLenum pname, GLfloat *params); +extern void APIENTRY glGetIntegerv (GLenum pname, GLint *params); +extern void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +extern void APIENTRY glGetLightiv (GLenum light, GLenum pname, GLint *params); +extern void APIENTRY glGetMapdv (GLenum target, GLenum query, GLdouble *v); +extern void APIENTRY glGetMapfv (GLenum target, GLenum query, GLfloat *v); +extern void APIENTRY glGetMapiv (GLenum target, GLenum query, GLint *v); +extern void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +extern void APIENTRY glGetMaterialiv (GLenum face, GLenum pname, GLint *params); +extern void APIENTRY glGetPixelMapfv (GLenum map, GLfloat *values); +extern void APIENTRY glGetPixelMapuiv (GLenum map, GLuint *values); +extern void APIENTRY glGetPixelMapusv (GLenum map, GLushort *values); +extern void APIENTRY glGetPointerv (GLenum pname, GLvoid* *params); +extern void APIENTRY glGetPolygonStipple (GLubyte *mask); +extern const GLubyte * APIENTRY glGetString (GLenum name); +extern void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +extern void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +extern void APIENTRY glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params); +extern void APIENTRY glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params); +extern void APIENTRY glGetTexGeniv (GLenum coord, GLenum pname, GLint *params); +extern void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +extern void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +extern void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +extern void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +extern void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +extern void APIENTRY glHint (GLenum target, GLenum mode); +extern void APIENTRY glIndexMask (GLuint mask); +extern void APIENTRY glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glIndexd (GLdouble c); +extern void APIENTRY glIndexdv (const GLdouble *c); +extern void APIENTRY glIndexf (GLfloat c); +extern void APIENTRY glIndexfv (const GLfloat *c); +extern void APIENTRY glIndexi (GLint c); +extern void APIENTRY glIndexiv (const GLint *c); +extern void APIENTRY glIndexs (GLshort c); +extern void APIENTRY glIndexsv (const GLshort *c); +extern void APIENTRY glIndexub (GLubyte c); +extern void APIENTRY glIndexubv (const GLubyte *c); +extern void APIENTRY glInitNames (void); +extern void APIENTRY glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer); +extern GLboolean APIENTRY glIsEnabled (GLenum cap); +extern GLboolean APIENTRY glIsList (GLuint list); +extern GLboolean APIENTRY glIsTexture (GLuint texture); +extern void APIENTRY glLightModelf (GLenum pname, GLfloat param); +extern void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +extern void APIENTRY glLightModeli (GLenum pname, GLint param); +extern void APIENTRY glLightModeliv (GLenum pname, const GLint *params); +extern void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); +extern void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +extern void APIENTRY glLighti (GLenum light, GLenum pname, GLint param); +extern void APIENTRY glLightiv (GLenum light, GLenum pname, const GLint *params); +extern void APIENTRY glLineStipple (GLint factor, GLushort pattern); +extern void APIENTRY glLineWidth (GLfloat width); +extern void APIENTRY glListBase (GLuint base); +extern void APIENTRY glLoadIdentity (void); +extern void APIENTRY glLoadMatrixd (const GLdouble *m); +extern void APIENTRY glLoadMatrixf (const GLfloat *m); +extern void APIENTRY glLoadName (GLuint name); +extern void APIENTRY glLogicOp (GLenum opcode); +extern void APIENTRY glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +extern void APIENTRY glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +extern void APIENTRY glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +extern void APIENTRY glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +extern void APIENTRY glMapGrid1d (GLint un, GLdouble u1, GLdouble u2); +extern void APIENTRY glMapGrid1f (GLint un, GLfloat u1, GLfloat u2); +extern void APIENTRY glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); +extern void APIENTRY glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); +extern void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +extern void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +extern void APIENTRY glMateriali (GLenum face, GLenum pname, GLint param); +extern void APIENTRY glMaterialiv (GLenum face, GLenum pname, const GLint *params); +extern void APIENTRY glMatrixMode (GLenum mode); +extern void APIENTRY glMultMatrixd (const GLdouble *m); +extern void APIENTRY glMultMatrixf (const GLfloat *m); +extern void APIENTRY glNewList (GLuint list, GLenum mode); +extern void APIENTRY glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz); +extern void APIENTRY glNormal3bv (const GLbyte *v); +extern void APIENTRY glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz); +extern void APIENTRY glNormal3dv (const GLdouble *v); +extern void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +extern void APIENTRY glNormal3fv (const GLfloat *v); +extern void APIENTRY glNormal3i (GLint nx, GLint ny, GLint nz); +extern void APIENTRY glNormal3iv (const GLint *v); +extern void APIENTRY glNormal3s (GLshort nx, GLshort ny, GLshort nz); +extern void APIENTRY glNormal3sv (const GLshort *v); +extern void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +extern void APIENTRY glPassThrough (GLfloat token); +extern void APIENTRY glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values); +extern void APIENTRY glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values); +extern void APIENTRY glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values); +extern void APIENTRY glPixelStoref (GLenum pname, GLfloat param); +extern void APIENTRY glPixelStorei (GLenum pname, GLint param); +extern void APIENTRY glPixelTransferf (GLenum pname, GLfloat param); +extern void APIENTRY glPixelTransferi (GLenum pname, GLint param); +extern void APIENTRY glPixelZoom (GLfloat xfactor, GLfloat yfactor); +extern void APIENTRY glPointSize (GLfloat size); +extern void APIENTRY glPolygonMode (GLenum face, GLenum mode); +extern void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +extern void APIENTRY glPolygonStipple (const GLubyte *mask); +extern void APIENTRY glPopAttrib (void); +extern void APIENTRY glPopClientAttrib (void); +extern void APIENTRY glPopMatrix (void); +extern void APIENTRY glPopName (void); +extern void APIENTRY glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities); +extern void APIENTRY glPushAttrib (GLbitfield mask); +extern void APIENTRY glPushClientAttrib (GLbitfield mask); +extern void APIENTRY glPushMatrix (void); +extern void APIENTRY glPushName (GLuint name); +extern void APIENTRY glRasterPos2d (GLdouble x, GLdouble y); +extern void APIENTRY glRasterPos2dv (const GLdouble *v); +extern void APIENTRY glRasterPos2f (GLfloat x, GLfloat y); +extern void APIENTRY glRasterPos2fv (const GLfloat *v); +extern void APIENTRY glRasterPos2i (GLint x, GLint y); +extern void APIENTRY glRasterPos2iv (const GLint *v); +extern void APIENTRY glRasterPos2s (GLshort x, GLshort y); +extern void APIENTRY glRasterPos2sv (const GLshort *v); +extern void APIENTRY glRasterPos3d (GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glRasterPos3dv (const GLdouble *v); +extern void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glRasterPos3fv (const GLfloat *v); +extern void APIENTRY glRasterPos3i (GLint x, GLint y, GLint z); + +extern void APIENTRY glRasterPos3iv (const GLint *v); +extern void APIENTRY glRasterPos3s (GLshort x, GLshort y, GLshort z); +extern void APIENTRY glRasterPos3sv (const GLshort *v); +extern void APIENTRY glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern void APIENTRY glRasterPos4dv (const GLdouble *v); +extern void APIENTRY glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern void APIENTRY glRasterPos4fv (const GLfloat *v); +extern void APIENTRY glRasterPos4i (GLint x, GLint y, GLint z, GLint w); +extern void APIENTRY glRasterPos4iv (const GLint *v); +extern void APIENTRY glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w); +extern void APIENTRY glRasterPos4sv (const GLshort *v); +extern void APIENTRY glReadBuffer (GLenum mode); +extern void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +extern void APIENTRY glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); +extern void APIENTRY glRectdv (const GLdouble *v1, const GLdouble *v2); +extern void APIENTRY glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); +extern void APIENTRY glRectfv (const GLfloat *v1, const GLfloat *v2); +extern void APIENTRY glRecti (GLint x1, GLint y1, GLint x2, GLint y2); +extern void APIENTRY glRectiv (const GLint *v1, const GLint *v2); +extern void APIENTRY glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2); +extern void APIENTRY glRectsv (const GLshort *v1, const GLshort *v2); +extern GLint APIENTRY glRenderMode (GLenum mode); +extern void APIENTRY glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glScaled (GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +extern void APIENTRY glSelectBuffer (GLsizei size, GLuint *buffer); +extern void APIENTRY glShadeModel (GLenum mode); +extern void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +extern void APIENTRY glStencilMask (GLuint mask); +extern void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +extern void APIENTRY glTexCoord1d (GLdouble s); +extern void APIENTRY glTexCoord1dv (const GLdouble *v); +extern void APIENTRY glTexCoord1f (GLfloat s); +extern void APIENTRY glTexCoord1fv (const GLfloat *v); +extern void APIENTRY glTexCoord1i (GLint s); +extern void APIENTRY glTexCoord1iv (const GLint *v); +extern void APIENTRY glTexCoord1s (GLshort s); +extern void APIENTRY glTexCoord1sv (const GLshort *v); +extern void APIENTRY glTexCoord2d (GLdouble s, GLdouble t); +extern void APIENTRY glTexCoord2dv (const GLdouble *v); +extern void APIENTRY glTexCoord2f (GLfloat s, GLfloat t); +extern void APIENTRY glTexCoord2fv (const GLfloat *v); +extern void APIENTRY glTexCoord2i (GLint s, GLint t); +extern void APIENTRY glTexCoord2iv (const GLint *v); +extern void APIENTRY glTexCoord2s (GLshort s, GLshort t); +extern void APIENTRY glTexCoord2sv (const GLshort *v); +extern void APIENTRY glTexCoord3d (GLdouble s, GLdouble t, GLdouble r); +extern void APIENTRY glTexCoord3dv (const GLdouble *v); +extern void APIENTRY glTexCoord3f (GLfloat s, GLfloat t, GLfloat r); +extern void APIENTRY glTexCoord3fv (const GLfloat *v); +extern void APIENTRY glTexCoord3i (GLint s, GLint t, GLint r); +extern void APIENTRY glTexCoord3iv (const GLint *v); +extern void APIENTRY glTexCoord3s (GLshort s, GLshort t, GLshort r); +extern void APIENTRY glTexCoord3sv (const GLshort *v); +extern void APIENTRY glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q); +extern void APIENTRY glTexCoord4dv (const GLdouble *v); +extern void APIENTRY glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q); +extern void APIENTRY glTexCoord4fv (const GLfloat *v); +extern void APIENTRY glTexCoord4i (GLint s, GLint t, GLint r, GLint q); +extern void APIENTRY glTexCoord4iv (const GLint *v); +extern void APIENTRY glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q); +extern void APIENTRY glTexCoord4sv (const GLshort *v); +extern void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); +extern void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +extern void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +extern void APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); +extern void APIENTRY glTexGend (GLenum coord, GLenum pname, GLdouble param); +extern void APIENTRY glTexGendv (GLenum coord, GLenum pname, const GLdouble *params); +extern void APIENTRY glTexGenf (GLenum coord, GLenum pname, GLfloat param); +extern void APIENTRY glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params); +extern void APIENTRY glTexGeni (GLenum coord, GLenum pname, GLint param); +extern void APIENTRY glTexGeniv (GLenum coord, GLenum pname, const GLint *params); +#ifndef __MACH__ +extern void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +extern void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +#endif +extern void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +extern void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +extern void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +extern void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +extern void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +extern void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +extern void APIENTRY glTranslated (GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glVertex2d (GLdouble x, GLdouble y); +extern void APIENTRY glVertex2dv (const GLdouble *v); +extern void APIENTRY glVertex2f (GLfloat x, GLfloat y); +extern void APIENTRY glVertex2fv (const GLfloat *v); +extern void APIENTRY glVertex2i (GLint x, GLint y); +extern void APIENTRY glVertex2iv (const GLint *v); +extern void APIENTRY glVertex2s (GLshort x, GLshort y); +extern void APIENTRY glVertex2sv (const GLshort *v); +extern void APIENTRY glVertex3d (GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glVertex3dv (const GLdouble *v); +extern void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glVertex3fv (const GLfloat *v); +extern void APIENTRY glVertex3i (GLint x, GLint y, GLint z); +extern void APIENTRY glVertex3iv (const GLint *v); +extern void APIENTRY glVertex3s (GLshort x, GLshort y, GLshort z); +extern void APIENTRY glVertex3sv (const GLshort *v); +extern void APIENTRY glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +extern void APIENTRY glVertex4dv (const GLdouble *v); +extern void APIENTRY glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +extern void APIENTRY glVertex4fv (const GLfloat *v); +extern void APIENTRY glVertex4i (GLint x, GLint y, GLint z, GLint w); +extern void APIENTRY glVertex4iv (const GLint *v); +extern void APIENTRY glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w); +extern void APIENTRY glVertex4sv (const GLshort *v); +extern void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +/* OpenGL 1.2 */ + +#ifndef GL_VERSION_1_2 +#define GL_ARB_imaging 1 +#define GL_VERSION_1_2 1 +#define GL_RESCALE_NORMAL 0x803A +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_BLEND_EQUATION 0x8009 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_COLOR 0x8005 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 + +typedef void (APIENTRY * glColorTablePROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ); +typedef void (APIENTRY * glColorSubTablePROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ); +typedef void (APIENTRY * glColorTableParameterivPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRY * glColorTableParameterfvPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRY * glCopyColorSubTablePROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRY * glCopyColorTablePROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRY * glGetColorTablePROC) (GLenum target, GLenum format, GLenum type, GLvoid *table ); +typedef void (APIENTRY * glGetColorTableParameterfvPROC) (GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRY * glGetColorTableParameterivPROC) (GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRY * glBlendEquationPROC) (GLenum mode ); +typedef void (APIENTRY * glBlendColorPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); +typedef void (APIENTRY * glHistogramPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ); +typedef void (APIENTRY * glResetHistogramPROC) (GLenum target ); +typedef void (APIENTRY * glGetHistogramPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values ); +typedef void (APIENTRY * glGetHistogramParameterfvPROC) (GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRY * glGetHistogramParameterivPROC) (GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRY * glMinmaxPROC) (GLenum target, GLenum internalformat, GLboolean sink ); +typedef void (APIENTRY * glResetMinmaxPROC) (GLenum target ); +typedef void (APIENTRY * glGetMinmaxPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values ); +typedef void (APIENTRY * glGetMinmaxParameterfvPROC) (GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRY * glGetMinmaxParameterivPROC) (GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRY * glConvolutionFilter1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image ); +typedef void (APIENTRY * glConvolutionFilter2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image ); +typedef void (APIENTRY * glConvolutionParameterfPROC) (GLenum target, GLenum pname, GLfloat params ); +typedef void (APIENTRY * glConvolutionParameterfvPROC) (GLenum target, GLenum pname, const GLfloat *params ); +typedef void (APIENTRY * glConvolutionParameteriPROC) (GLenum target, GLenum pname, GLint params ); +typedef void (APIENTRY * glConvolutionParameterivPROC) (GLenum target, GLenum pname, const GLint *params ); +typedef void (APIENTRY * glCopyConvolutionFilter1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); +typedef void (APIENTRY * glCopyConvolutionFilter2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY * glGetConvolutionFilterPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image ); +typedef void (APIENTRY * glGetConvolutionParameterfvPROC) (GLenum target, GLenum pname, GLfloat *params ); +typedef void (APIENTRY * glGetConvolutionParameterivPROC) (GLenum target, GLenum pname, GLint *params ); +typedef void (APIENTRY * glSeparableFilter2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column ); +typedef void (APIENTRY * glGetSeparableFilterPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); +typedef void (APIENTRY * glDrawRangeElementsPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); +typedef void (APIENTRY * glTexImage3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +typedef void (APIENTRY * glTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (APIENTRY * glCopyTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); + +#ifdef _WIN32 + +extern glBlendColorPROC glBlendColor; +LIB_RENDERING_EXPORT +extern glBlendEquationPROC glBlendEquation; +extern glColorTablePROC glColorTable; +extern glColorTableParameterfvPROC glColorTableParameterfv; +extern glColorTableParameterivPROC glColorTableParameteriv; +extern glCopyColorTablePROC glCopyColorTable; +extern glGetColorTablePROC glGetColorTable; +extern glGetColorTableParameterfvPROC glGetColorTableParameterfv; +extern glGetColorTableParameterivPROC glGetColorTableParameteriv; +extern glColorSubTablePROC glColorSubTable; +extern glCopyColorSubTablePROC glCopyColorSubTable; +extern glConvolutionFilter1DPROC glConvolutionFilter1D; +extern glConvolutionFilter2DPROC glConvolutionFilter2D; +extern glConvolutionParameterfPROC glConvolutionParameterf; +extern glConvolutionParameterfvPROC glConvolutionParameterfv; +extern glConvolutionParameteriPROC glConvolutionParameteri; +extern glConvolutionParameterivPROC glConvolutionParameteriv; +extern glCopyConvolutionFilter1DPROC glCopyConvolutionFilter1D; +extern glCopyConvolutionFilter2DPROC glCopyConvolutionFilter2D; +extern glGetConvolutionFilterPROC glGetConvolutionFilter; +extern glGetConvolutionParameterfvPROC glGetConvolutionParameterfv; +extern glGetConvolutionParameterivPROC glGetConvolutionParameteriv; +extern glGetSeparableFilterPROC glGetSeparableFilter; +extern glSeparableFilter2DPROC glSeparableFilter2D; +extern glGetHistogramPROC glGetHistogram; +extern glGetHistogramParameterfvPROC glGetHistogramParameterfv; +extern glGetHistogramParameterivPROC glGetHistogramParameteriv; +extern glGetMinmaxPROC glGetMinmax; +extern glGetMinmaxParameterfvPROC glGetMinmaxParameterfv; +extern glGetMinmaxParameterivPROC glGetMinmaxParameteriv; +extern glHistogramPROC glHistogram; +extern glMinmaxPROC glMinmax; +extern glResetHistogramPROC glResetHistogram; +extern glResetMinmaxPROC glResetMinmax; +extern glDrawRangeElementsPROC glDrawRangeElements; +extern glTexImage3DPROC glTexImage3D; +extern glTexSubImage3DPROC glTexSubImage3D; +extern glCopyTexSubImage3DPROC glCopyTexSubImage3D; + +#else + +extern void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table ); +extern void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data ); +extern void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +extern void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +extern void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); +extern void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); +extern void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table ); +extern void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params ); +extern void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params ); +extern void APIENTRY glBlendEquation (GLenum mode ); +extern void APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); +extern void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink ); +extern void APIENTRY glResetHistogram (GLenum target ); +extern void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values ); +extern void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params ); +extern void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params ); +extern void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink ); +extern void APIENTRY glResetMinmax (GLenum target ); +extern void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values ); +extern void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params ); +extern void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params ); +extern void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image ); +extern void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image ); +extern void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params ); +extern void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params ); +extern void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params ); +extern void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params ); +extern void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); +extern void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +extern void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image ); +extern void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params ); +extern void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params ); +extern void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column ); +extern void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); +extern void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); +extern void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +extern void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +extern void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); + +#endif /* WIN32 */ + +#endif /* GL_VERSION_1_2 */ + +/* OpenGL 1.3 */ + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 + +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 + +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 + +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#define GL_CLAMP_TO_BORDER 0x812D + +typedef void (APIENTRY * glActiveTexturePROC) (GLenum texture ); +typedef void (APIENTRY * glClientActiveTexturePROC) (GLenum texture ); +typedef void (APIENTRY * glCompressedTexImage1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexImage2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexImage3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glGetCompressedTexImagePROC) (GLenum target, GLint lod, GLvoid *img ); +typedef void (APIENTRY * glMultiTexCoord1dPROC) (GLenum target, GLdouble s ); +typedef void (APIENTRY * glMultiTexCoord1dvPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord1fPROC) (GLenum target, GLfloat s ); +typedef void (APIENTRY * glMultiTexCoord1fvPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord1iPROC) (GLenum target, GLint s ); +typedef void (APIENTRY * glMultiTexCoord1ivPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord1sPROC) (GLenum target, GLshort s ); +typedef void (APIENTRY * glMultiTexCoord1svPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord2dPROC) (GLenum target, GLdouble s, GLdouble t ); +typedef void (APIENTRY * glMultiTexCoord2dvPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord2fPROC) (GLenum target, GLfloat s, GLfloat t ); +typedef void (APIENTRY * glMultiTexCoord2fvPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord2iPROC) (GLenum target, GLint s, GLint t ); +typedef void (APIENTRY * glMultiTexCoord2ivPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord2sPROC) (GLenum target, GLshort s, GLshort t ); +typedef void (APIENTRY * glMultiTexCoord2svPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord3dPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r ); +typedef void (APIENTRY * glMultiTexCoord3dvPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord3fPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r ); +typedef void (APIENTRY * glMultiTexCoord3fvPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord3iPROC) (GLenum target, GLint s, GLint t, GLint r ); +typedef void (APIENTRY * glMultiTexCoord3ivPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord3sPROC) (GLenum target, GLshort s, GLshort t, GLshort r ); +typedef void (APIENTRY * glMultiTexCoord3svPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord4dPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +typedef void (APIENTRY * glMultiTexCoord4dvPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord4fPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +typedef void (APIENTRY * glMultiTexCoord4fvPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord4iPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q ); +typedef void (APIENTRY * glMultiTexCoord4ivPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord4sPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +typedef void (APIENTRY * glMultiTexCoord4svPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glLoadTransposeMatrixdPROC) (const GLdouble m[16] ); +typedef void (APIENTRY * glLoadTransposeMatrixfPROC) (const GLfloat m[16] ); +typedef void (APIENTRY * glMultTransposeMatrixdPROC) (const GLdouble m[16] ); +typedef void (APIENTRY * glMultTransposeMatrixfPROC) (const GLfloat m[16] ); +typedef void (APIENTRY * glSampleCoveragePROC) (GLclampf value, GLboolean invert ); + +#ifdef _WIN32 + +extern glActiveTexturePROC glActiveTexture; +extern glClientActiveTexturePROC glClientActiveTexture; +extern glMultiTexCoord1dPROC glMultiTexCoord1d; +extern glMultiTexCoord1dvPROC glMultiTexCoord1dv; +extern glMultiTexCoord1fPROC glMultiTexCoord1f; +extern glMultiTexCoord1fvPROC glMultiTexCoord1fv; +extern glMultiTexCoord1iPROC glMultiTexCoord1i; +extern glMultiTexCoord1ivPROC glMultiTexCoord1iv; +extern glMultiTexCoord1sPROC glMultiTexCoord1s; +extern glMultiTexCoord1svPROC glMultiTexCoord1sv; +extern glMultiTexCoord2dPROC glMultiTexCoord2d; +extern glMultiTexCoord2dvPROC glMultiTexCoord2dv; +extern glMultiTexCoord2fPROC glMultiTexCoord2f; +extern glMultiTexCoord2fvPROC glMultiTexCoord2fv; +extern glMultiTexCoord2iPROC glMultiTexCoord2i; +extern glMultiTexCoord2ivPROC glMultiTexCoord2iv; +extern glMultiTexCoord2sPROC glMultiTexCoord2s; +extern glMultiTexCoord2svPROC glMultiTexCoord2sv; +extern glMultiTexCoord3dPROC glMultiTexCoord3d; +extern glMultiTexCoord3dvPROC glMultiTexCoord3dv; +extern glMultiTexCoord3fPROC glMultiTexCoord3f; +extern glMultiTexCoord3fvPROC glMultiTexCoord3fv; +extern glMultiTexCoord3iPROC glMultiTexCoord3i; +extern glMultiTexCoord3ivPROC glMultiTexCoord3iv; +extern glMultiTexCoord3sPROC glMultiTexCoord3s; +extern glMultiTexCoord3svPROC glMultiTexCoord3sv; +extern glMultiTexCoord4dPROC glMultiTexCoord4d; +extern glMultiTexCoord4dvPROC glMultiTexCoord4dv; +extern glMultiTexCoord4fPROC glMultiTexCoord4f; +extern glMultiTexCoord4fvPROC glMultiTexCoord4fv; +extern glMultiTexCoord4iPROC glMultiTexCoord4i; +extern glMultiTexCoord4ivPROC glMultiTexCoord4iv; +extern glMultiTexCoord4sPROC glMultiTexCoord4s; +extern glMultiTexCoord4svPROC glMultiTexCoord4sv; +extern glLoadTransposeMatrixfPROC glLoadTransposeMatrixf; +extern glLoadTransposeMatrixdPROC glLoadTransposeMatrixd; +extern glMultTransposeMatrixfPROC glMultTransposeMatrixf; +extern glMultTransposeMatrixdPROC glMultTransposeMatrixd; +extern glCompressedTexImage3DPROC glCompressedTexImage3D; +extern glCompressedTexImage2DPROC glCompressedTexImage2D; +extern glCompressedTexImage1DPROC glCompressedTexImage1D; +extern glCompressedTexSubImage3DPROC glCompressedTexSubImage3D; +extern glCompressedTexSubImage2DPROC glCompressedTexSubImage2D; +extern glCompressedTexSubImage1DPROC glCompressedTexSubImage1D; +extern glGetCompressedTexImagePROC glGetCompressedTexImage; +extern glSampleCoveragePROC glSampleCoverage; + +#else + +extern void APIENTRY glActiveTexture (GLenum texture ); +extern void APIENTRY glClientActiveTexture (GLenum texture ); +extern void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); +extern void APIENTRY glGetCompressedTexImage (GLenum target, GLint lod, GLvoid *img ); +extern void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s ); +extern void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s ); +extern void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord1i (GLenum target, GLint s ); +extern void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s ); +extern void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t ); +extern void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t ); +extern void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t ); +extern void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t ); +extern void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r ); +extern void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r ); +extern void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r ); +extern void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r ); +extern void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +extern void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +extern void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q ); +extern void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +extern void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v ); +extern void APIENTRY glLoadTransposeMatrixd (const GLdouble m[16] ); +extern void APIENTRY glLoadTransposeMatrixf (const GLfloat m[16] ); +extern void APIENTRY glMultTransposeMatrixd (const GLdouble m[16] ); +extern void APIENTRY glMultTransposeMatrixf (const GLfloat m[16] ); +extern void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert ); + +#endif /* WIN32 */ + +#endif /* GL_VERSION_1_3 */ + +/* OpenGL 1.4 */ + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 + +/*#ifndef GL_VERSION_1_2 +#define GL_BLEND_EQUATION 0x8009 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_COLOR 0x8005 +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#endif *//* GL_VERSION_1_2 */ + +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_GL_MIRRORED_REPEAT 0x8370 + +/*#ifndef GL_VERSION_1_2 +typedef void (APIENTRY * glBlendEquationPROC) (GLenum mode ); +typedef void (APIENTRY * glBlendColorPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); +#endif *//* GL_VERSION_1_2 */ +typedef void (APIENTRY * glFogCoordfPROC) (GLfloat coord); +typedef void (APIENTRY * glFogCoordfvPROC) (const GLfloat *coord); +typedef void (APIENTRY * glFogCoorddPROC) (GLdouble coord); +typedef void (APIENTRY * glFogCoorddvPROC) (const GLdouble *coord); +typedef void (APIENTRY * glFogCoordPointerPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRY * glMultiDrawArraysPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRY * glMultiDrawElementsPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); +typedef void (APIENTRY * glPointParameterfPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * glPointParameterfvPROC) (GLenum pname, GLfloat *params); +typedef void (APIENTRY * glSecondaryColor3bPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRY * glSecondaryColor3bvPROC) (const GLbyte *v); +typedef void (APIENTRY * glSecondaryColor3dPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRY * glSecondaryColor3dvPROC) (const GLdouble *v); +typedef void (APIENTRY * glSecondaryColor3fPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRY * glSecondaryColor3fvPROC) (const GLfloat *v); +typedef void (APIENTRY * glSecondaryColor3iPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRY * glSecondaryColor3ivPROC) (const GLint *v); +typedef void (APIENTRY * glSecondaryColor3sPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRY * glSecondaryColor3svPROC) (const GLshort *v); +typedef void (APIENTRY * glSecondaryColor3ubPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRY * glSecondaryColor3ubvPROC) (const GLubyte *v); +typedef void (APIENTRY * glSecondaryColor3uiPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRY * glSecondaryColor3uivPROC) (const GLuint *v); +typedef void (APIENTRY * glSecondaryColor3usPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRY * glSecondaryColor3usvPROC) (const GLushort *v); +typedef void (APIENTRY * glSecondaryColorPointerPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +typedef void (APIENTRY * glBlendFuncSeparatePROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRY * glWindowPos2dPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY * glWindowPos2fPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY * glWindowPos2iPROC) (GLint x, GLint y); +typedef void (APIENTRY * glWindowPos2sPROC) (GLshort x, GLshort y); +typedef void (APIENTRY * glWindowPos2dvPROC) (const GLdouble *p); +typedef void (APIENTRY * glWindowPos2fvPROC) (const GLfloat *p); +typedef void (APIENTRY * glWindowPos2ivPROC) (const GLint *p); +typedef void (APIENTRY * glWindowPos2svPROC) (const GLshort *p); +typedef void (APIENTRY * glWindowPos3dPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glWindowPos3fPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glWindowPos3iPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY * glWindowPos3sPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glWindowPos3dvPROC) (const GLdouble *p); +typedef void (APIENTRY * glWindowPos3fvPROC) (const GLfloat *p); +typedef void (APIENTRY * glWindowPos3ivPROC) (const GLint *p); +typedef void (APIENTRY * glWindowPos3svPROC) (const GLshort *p); + +/*#ifndef GL_VERSION_1_2 +extern glBlendColorPROC glBlendColor; +extern glBlendEquationPROC glBlendEquation; +#endif *//* GL_VERSION_1_2 */ + +#ifdef _WIN32 + +extern glFogCoordfPROC glFogCoordf; +extern glFogCoordfvPROC glFogCoordfv; +extern glFogCoorddPROC glFogCoordd; +extern glFogCoorddvPROC glFogCoorddv; +extern glFogCoordPointerPROC glFogCoordPointer; +extern glMultiDrawArraysPROC glMultiDrawArrays; +extern glMultiDrawElementsPROC glMultiDrawElements; +extern glPointParameterfPROC glPointParameterf; +extern glPointParameterfvPROC glPointParameterfv; +extern glSecondaryColor3bPROC glSecondaryColor3b; +extern glSecondaryColor3bvPROC glSecondaryColor3bv; +extern glSecondaryColor3dPROC glSecondaryColor3d; +extern glSecondaryColor3dvPROC glSecondaryColor3dv; +extern glSecondaryColor3fPROC glSecondaryColor3f; +extern glSecondaryColor3fvPROC glSecondaryColor3fv; +extern glSecondaryColor3iPROC glSecondaryColor3i; +extern glSecondaryColor3ivPROC glSecondaryColor3iv; +extern glSecondaryColor3sPROC glSecondaryColor3s; +extern glSecondaryColor3svPROC glSecondaryColor3sv; +extern glSecondaryColor3ubPROC glSecondaryColor3ub; +extern glSecondaryColor3ubvPROC glSecondaryColor3ubv; +extern glSecondaryColor3uiPROC glSecondaryColor3ui; +extern glSecondaryColor3uivPROC glSecondaryColor3uiv; +extern glSecondaryColor3usPROC glSecondaryColor3us; +extern glSecondaryColor3usvPROC glSecondaryColor3usv; +extern glSecondaryColorPointerPROC glSecondaryColorPointer; +extern glBlendFuncSeparatePROC glBlendFuncSeparate; +extern glWindowPos2dPROC glWindowPos2d; +extern glWindowPos2fPROC glWindowPos2f; +extern glWindowPos2iPROC glWindowPos2i; +extern glWindowPos2sPROC glWindowPos2s; +extern glWindowPos2dvPROC glWindowPos2dv; +extern glWindowPos2fvPROC glWindowPos2fv; +extern glWindowPos2ivPROC glWindowPos2iv; +extern glWindowPos2svPROC glWindowPos2sv; +extern glWindowPos3dPROC glWindowPos3d; +extern glWindowPos3fPROC glWindowPos3f; +extern glWindowPos3iPROC glWindowPos3i; +extern glWindowPos3sPROC glWindowPos3s; +extern glWindowPos3dvPROC glWindowPos3dv; +extern glWindowPos3fvPROC glWindowPos3fv; +extern glWindowPos3ivPROC glWindowPos3iv; +extern glWindowPos3svPROC glWindowPos3sv; + +#else + +extern void APIENTRY glFogCoordf (GLfloat coord); +extern void APIENTRY glFogCoordfv (const GLfloat *coord); +extern void APIENTRY glFogCoordd (GLdouble coord); +extern void APIENTRY glFogCoorddv (const GLdouble *coord); +extern void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +extern void APIENTRY glMultiDrawArrays (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +extern void APIENTRY glMultiDrawElements (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); +extern void APIENTRY glPointParameterf (GLenum pname, GLfloat param); +extern void APIENTRY glPointParameterfv (GLenum pname, GLfloat *params); +extern void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +extern void APIENTRY glSecondaryColor3bv (const GLbyte *v); +extern void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +extern void APIENTRY glSecondaryColor3dv (const GLdouble *v); +extern void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +extern void APIENTRY glSecondaryColor3fv (const GLfloat *v); +extern void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); +extern void APIENTRY glSecondaryColor3iv (const GLint *v); +extern void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +extern void APIENTRY glSecondaryColor3sv (const GLshort *v); +extern void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +extern void APIENTRY glSecondaryColor3ubv (const GLubyte *v); +extern void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +extern void APIENTRY glSecondaryColor3uiv (const GLuint *v); +extern void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +extern void APIENTRY glSecondaryColor3usv (const GLushort *v); +extern void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +extern void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +extern void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); +extern void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); +extern void APIENTRY glWindowPos2i (GLint x, GLint y); +extern void APIENTRY glWindowPos2s (GLshort x, GLshort y); +extern void APIENTRY glWindowPos2dv (const GLdouble *p); +extern void APIENTRY glWindowPos2fv (const GLfloat *p); +extern void APIENTRY glWindowPos2iv (const GLint *p); +extern void APIENTRY glWindowPos2sv (const GLshort *p); +extern void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +extern void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +extern void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); +extern void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); +extern void APIENTRY glWindowPos3dv (const GLdouble *p); +extern void APIENTRY glWindowPos3fv (const GLfloat *p); +extern void APIENTRY glWindowPos3iv (const GLint *p); +extern void APIENTRY glWindowPos3sv (const GLshort *p); + +#endif /* WIN32 */ + +#endif /* GL_VERSION_1_4 */ + +/*-------------------------------------------------------------------*/ +/*------------EXTENSIONS---------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------*/ +/*------------ARB_MULTITEXTURE---------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 + +typedef void (APIENTRY * glActiveTextureARBPROC) (GLenum texture ); +typedef void (APIENTRY * glClientActiveTextureARBPROC) (GLenum texture ); +typedef void (APIENTRY * glMultiTexCoord1dARBPROC) (GLenum target, GLdouble s ); +typedef void (APIENTRY * glMultiTexCoord1dvARBPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord1fARBPROC) (GLenum target, GLfloat s ); +typedef void (APIENTRY * glMultiTexCoord1fvARBPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord1iARBPROC) (GLenum target, GLint s ); +typedef void (APIENTRY * glMultiTexCoord1ivARBPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord1sARBPROC) (GLenum target, GLshort s ); +typedef void (APIENTRY * glMultiTexCoord1svARBPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord2dARBPROC) (GLenum target, GLdouble s, GLdouble t ); +typedef void (APIENTRY * glMultiTexCoord2dvARBPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord2fARBPROC) (GLenum target, GLfloat s, GLfloat t ); +typedef void (APIENTRY * glMultiTexCoord2fvARBPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord2iARBPROC) (GLenum target, GLint s, GLint t ); +typedef void (APIENTRY * glMultiTexCoord2ivARBPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord2sARBPROC) (GLenum target, GLshort s, GLshort t ); +typedef void (APIENTRY * glMultiTexCoord2svARBPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord3dARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r ); +typedef void (APIENTRY * glMultiTexCoord3dvARBPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord3fARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r ); +typedef void (APIENTRY * glMultiTexCoord3fvARBPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord3iARBPROC) (GLenum target, GLint s, GLint t, GLint r ); +typedef void (APIENTRY * glMultiTexCoord3ivARBPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord3sARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r ); +typedef void (APIENTRY * glMultiTexCoord3svARBPROC) (GLenum target, const GLshort *v ); +typedef void (APIENTRY * glMultiTexCoord4dARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +typedef void (APIENTRY * glMultiTexCoord4dvARBPROC) (GLenum target, const GLdouble *v ); +typedef void (APIENTRY * glMultiTexCoord4fARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +typedef void (APIENTRY * glMultiTexCoord4fvARBPROC) (GLenum target, const GLfloat *v ); +typedef void (APIENTRY * glMultiTexCoord4iARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q ); +typedef void (APIENTRY * glMultiTexCoord4ivARBPROC) (GLenum target, const GLint *v ); +typedef void (APIENTRY * glMultiTexCoord4sARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +typedef void (APIENTRY * glMultiTexCoord4svARBPROC) (GLenum target, const GLshort *v ); + +#ifdef _WIN32 + +extern glActiveTextureARBPROC glActiveTextureARB; +extern glClientActiveTextureARBPROC glClientActiveTextureARB; +extern glMultiTexCoord1dARBPROC glMultiTexCoord1dARB; +extern glMultiTexCoord1dvARBPROC glMultiTexCoord1dvARB; +extern glMultiTexCoord1fARBPROC glMultiTexCoord1fARB; +extern glMultiTexCoord1fvARBPROC glMultiTexCoord1fvARB; +extern glMultiTexCoord1iARBPROC glMultiTexCoord1iARB; +extern glMultiTexCoord1ivARBPROC glMultiTexCoord1ivARB; +extern glMultiTexCoord1sARBPROC glMultiTexCoord1sARB; +extern glMultiTexCoord1svARBPROC glMultiTexCoord1svARB; +extern glMultiTexCoord2dARBPROC glMultiTexCoord2dARB; +extern glMultiTexCoord2dvARBPROC glMultiTexCoord2dvARB; +extern glMultiTexCoord2fARBPROC glMultiTexCoord2fARB; +extern glMultiTexCoord2fvARBPROC glMultiTexCoord2fvARB; +extern glMultiTexCoord2iARBPROC glMultiTexCoord2iARB; +extern glMultiTexCoord2ivARBPROC glMultiTexCoord2ivARB; +extern glMultiTexCoord2sARBPROC glMultiTexCoord2sARB; +extern glMultiTexCoord2svARBPROC glMultiTexCoord2svARB; +extern glMultiTexCoord3dARBPROC glMultiTexCoord3dARB; +extern glMultiTexCoord3dvARBPROC glMultiTexCoord3dvARB; +extern glMultiTexCoord3fARBPROC glMultiTexCoord3fARB; +extern glMultiTexCoord3fvARBPROC glMultiTexCoord3fvARB; +extern glMultiTexCoord3iARBPROC glMultiTexCoord3iARB; +extern glMultiTexCoord3ivARBPROC glMultiTexCoord3ivARB; +extern glMultiTexCoord3sARBPROC glMultiTexCoord3sARB; +extern glMultiTexCoord3svARBPROC glMultiTexCoord3svARB; +extern glMultiTexCoord4dARBPROC glMultiTexCoord4dARB; +extern glMultiTexCoord4dvARBPROC glMultiTexCoord4dvARB; +extern glMultiTexCoord4fARBPROC glMultiTexCoord4fARB; +extern glMultiTexCoord4fvARBPROC glMultiTexCoord4fvARB; +extern glMultiTexCoord4iARBPROC glMultiTexCoord4iARB; +extern glMultiTexCoord4ivARBPROC glMultiTexCoord4ivARB; +extern glMultiTexCoord4sARBPROC glMultiTexCoord4sARB; +extern glMultiTexCoord4svARBPROC glMultiTexCoord4svARB; + +#else + +extern void APIENTRY glActiveTextureARB (GLenum texture ); +extern void APIENTRY glClientActiveTextureARB (GLenum texture ); +extern void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s ); +extern void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s ); +extern void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s ); +extern void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s ); +extern void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t ); +extern void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t ); +extern void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t ); +extern void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t ); +extern void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r ); +extern void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r ); +extern void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r ); +extern void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r ); +extern void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v ); +extern void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +extern void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v ); +extern void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +extern void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v ); +extern void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q ); +extern void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v ); +extern void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +extern void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v ); + +#endif /* WIN32 */ + +#endif /* GL_ARB_multitexture */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TRANSPOSE_MATRIX-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 + +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 + +typedef void (APIENTRY * glLoadTransposeMatrixdARBPROC) (const GLdouble m[16] ); +typedef void (APIENTRY * glLoadTransposeMatrixfARBPROC) (const GLfloat m[16] ); +typedef void (APIENTRY * glMultTransposeMatrixdARBPROC) (const GLdouble m[16] ); +typedef void (APIENTRY * glMultTransposeMatrixfARBPROC) (const GLfloat m[16] ); + +extern glLoadTransposeMatrixfARBPROC glLoadTransposeMatrixfARB; +extern glLoadTransposeMatrixdARBPROC glLoadTransposeMatrixdARB; +extern glMultTransposeMatrixfARBPROC glMultTransposeMatrixfARB; +extern glMultTransposeMatrixdARBPROC glMultTransposeMatrixdARB; + +#endif /* GL_ARB_transpose_matrix */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_COMPRESSION--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 + +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 + +typedef void (APIENTRY * glCompressedTexImage1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexImage2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexImage3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glCompressedTexSubImage3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); +typedef void (APIENTRY * glGetCompressedTexImageARBPROC) (GLenum target, GLint lod, GLvoid *img ); + +extern glCompressedTexImage3DARBPROC glCompressedTexImage3DARB; +extern glCompressedTexImage2DARBPROC glCompressedTexImage2DARB; +extern glCompressedTexImage1DARBPROC glCompressedTexImage1DARB; +extern glCompressedTexSubImage3DARBPROC glCompressedTexSubImage3DARB; +extern glCompressedTexSubImage2DARBPROC glCompressedTexSubImage2DARB; +extern glCompressedTexSubImage1DARBPROC glCompressedTexSubImage1DARB; +extern glGetCompressedTexImageARBPROC glGetCompressedTexImageARB; + +#endif /* GL_ARB_texture_compression */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_CUBE_MAP-------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 + +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C + +#endif /* GL_ARB_texture_cube_map */ + +/*-------------------------------------------------------------------*/ +/*------------SGIX_SHADOW--------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 + +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D + +#endif /* GL_SGIX_shadow */ + +/*-------------------------------------------------------------------*/ +/*------------SGIX_DEPTH_TEXTURE-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 + +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 + +#endif /* GL_SGIX_depth_texture */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_COMPILED_VERTEX_ARRAY------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 + +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 + +typedef void (APIENTRY * glLockArraysEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRY * glUnlockArraysEXTPROC) (); + +extern glLockArraysEXTPROC glLockArraysEXT; +extern glUnlockArraysEXTPROC glUnlockArraysEXT; + +#endif /* GL_EXT_compiled_vertex_array */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_ENV_COMBINE--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 + +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A + +#endif /* GL_ARB_texture_env_combine */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_ENV_DOT3-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 + +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF + +#endif /* GL_ARB_texture_env_dot3 */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_BORDER_CLAMP-------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 + +#define GL_CLAMP_TO_BORDER_ARB 0x812D + +#endif /* GL_ARB_texture_border_clamp */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_ENV_ADD------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 + + +#endif /* GL_ARB_texture_env_add */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_SECONDARY_COLOR------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 + +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E + +typedef void (APIENTRY * glSecondaryColor3bEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRY * glSecondaryColor3bvEXTPROC) (const GLbyte *v); +typedef void (APIENTRY * glSecondaryColor3dEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRY * glSecondaryColor3dvEXTPROC) (const GLdouble *v); +typedef void (APIENTRY * glSecondaryColor3fEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRY * glSecondaryColor3fvEXTPROC) (const GLfloat *v); +typedef void (APIENTRY * glSecondaryColor3iEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRY * glSecondaryColor3ivEXTPROC) (const GLint *v); +typedef void (APIENTRY * glSecondaryColor3sEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRY * glSecondaryColor3svEXTPROC) (const GLshort *v); +typedef void (APIENTRY * glSecondaryColor3ubEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRY * glSecondaryColor3ubvEXTPROC) (const GLubyte *v); +typedef void (APIENTRY * glSecondaryColor3uiEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRY * glSecondaryColor3uivEXTPROC) (const GLuint *v); +typedef void (APIENTRY * glSecondaryColor3usEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRY * glSecondaryColor3usvEXTPROC) (const GLushort *v); +typedef void (APIENTRY * glSecondaryColorPointerEXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); + +extern glSecondaryColor3bEXTPROC glSecondaryColor3bEXT; +extern glSecondaryColor3bvEXTPROC glSecondaryColor3bvEXT; +extern glSecondaryColor3dEXTPROC glSecondaryColor3dEXT; +extern glSecondaryColor3dvEXTPROC glSecondaryColor3dvEXT; +extern glSecondaryColor3fEXTPROC glSecondaryColor3fEXT; +extern glSecondaryColor3fvEXTPROC glSecondaryColor3fvEXT; +extern glSecondaryColor3iEXTPROC glSecondaryColor3iEXT; +extern glSecondaryColor3ivEXTPROC glSecondaryColor3ivEXT; +extern glSecondaryColor3sEXTPROC glSecondaryColor3sEXT; +extern glSecondaryColor3svEXTPROC glSecondaryColor3svEXT; +extern glSecondaryColor3ubEXTPROC glSecondaryColor3ubEXT; +extern glSecondaryColor3ubvEXTPROC glSecondaryColor3ubvEXT; +extern glSecondaryColor3uiEXTPROC glSecondaryColor3uiEXT; +extern glSecondaryColor3uivEXTPROC glSecondaryColor3uivEXT; +extern glSecondaryColor3usEXTPROC glSecondaryColor3usEXT; +extern glSecondaryColor3usvEXTPROC glSecondaryColor3usvEXT; +extern glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT; + +#endif /* GL_EXT_secondary_color */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_FOG_COORD------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 + +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 + +typedef void (APIENTRY * glFogCoordfEXTPROC) (GLfloat coord); +typedef void (APIENTRY * glFogCoordfvEXTPROC) (const GLfloat *coord); +typedef void (APIENTRY * glFogCoorddEXTPROC) (GLdouble coord); +typedef void (APIENTRY * glFogCoorddvEXTPROC) (const GLdouble *coord); +typedef void (APIENTRY * glFogCoordPointerEXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); + +extern glFogCoordfEXTPROC glFogCoordfEXT; +extern glFogCoordfvEXTPROC glFogCoordfvEXT; +extern glFogCoorddEXTPROC glFogCoorddEXT; +extern glFogCoorddvEXTPROC glFogCoorddvEXT; +extern glFogCoordPointerEXTPROC glFogCoordPointerEXT; + +#endif /* GL_EXT_fog_coord */ + +/*-------------------------------------------------------------------*/ +/*------------NV_VERTEX_ARRAY_RANGE----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 + +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 + +typedef void (APIENTRY * glFlushVertexArrayRangeNVPROC) (void); +typedef void (APIENTRY * glVertexArrayRangeNVPROC) (GLsizei size, const GLvoid *pointer); + +extern glFlushVertexArrayRangeNVPROC glFlushVertexArrayRangeNV; +extern glVertexArrayRangeNVPROC glVertexArrayRangeNV; + +#ifdef _WIN32 + +typedef void * (APIENTRY * wglAllocateMemoryNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); +typedef void (APIENTRY * wglFreeMemoryNVPROC) (void *pointer); + +extern wglAllocateMemoryNVPROC wglAllocateMemoryNV; +extern wglFreeMemoryNVPROC wglFreeMemoryNV; + +#else + +typedef void * (APIENTRY * glXAllocateMemoryNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); +typedef void (APIENTRY * glXFreeMemoryNVPROC) (void *pointer); + +extern glXAllocateMemoryNVPROC glXAllocateMemoryNV; +extern glXFreeMemoryNVPROC glXFreeMemoryNV; + +#endif /* WIN32 */ + +#endif /* GL_NV_vertex_array_range */ + +/*-------------------------------------------------------------------*/ +/*------------NV_VERTEX_ARRAY_RANGE2---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 + +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 + +#endif /* GL_NV_vertex_array_range2 */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_POINT_PARAMETERS-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 + +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 + +typedef void (APIENTRY * glPointParameterfEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * glPointParameterfvEXTPROC) (GLenum pname, const GLfloat *params); + +extern glPointParameterfEXTPROC glPointParameterfEXT; +extern glPointParameterfvEXTPROC glPointParameterfvEXT; + +#endif /* GL_EXT_point_parameters */ + +/*-------------------------------------------------------------------*/ +/*------------NV_REGISTER_COMBINERS----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 + +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_DISCARD_NV 0x8530 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D + +typedef void (APIENTRY * glCombinerParameterfvNVPROC) (GLenum pname, const GLfloat *params); +typedef void (APIENTRY * glCombinerParameterfNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * glCombinerParameterivNVPROC) (GLenum pname, const GLint *params); +typedef void (APIENTRY * glCombinerParameteriNVPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * glCombinerInputNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRY * glCombinerOutputNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRY * glFinalCombinerInputNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRY * glGetCombinerInputParameterfvNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetCombinerInputParameterivNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetCombinerOutputParameterfvNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetCombinerOutputParameterivNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetFinalCombinerInputParameterfvNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetFinalCombinerInputParameterivNVPROC) (GLenum variable, GLenum pname, GLint *params); + +extern glCombinerParameterfvNVPROC glCombinerParameterfvNV; +extern glCombinerParameterfNVPROC glCombinerParameterfNV; +extern glCombinerParameterivNVPROC glCombinerParameterivNV; +extern glCombinerParameteriNVPROC glCombinerParameteriNV; +extern glCombinerInputNVPROC glCombinerInputNV; +extern glCombinerOutputNVPROC glCombinerOutputNV; +extern glFinalCombinerInputNVPROC glFinalCombinerInputNV; +extern glGetCombinerInputParameterfvNVPROC glGetCombinerInputParameterfvNV; +extern glGetCombinerInputParameterivNVPROC glGetCombinerInputParameterivNV; +extern glGetCombinerOutputParameterfvNVPROC glGetCombinerOutputParameterfvNV; +extern glGetCombinerOutputParameterivNVPROC glGetCombinerOutputParameterivNV; +extern glGetFinalCombinerInputParameterfvNVPROC glGetFinalCombinerInputParameterfvNV; +extern glGetFinalCombinerInputParameterivNVPROC glGetFinalCombinerInputParameterivNV; + +#endif /* GL_NV_register_combiners */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_MULTISAMPLE----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 + +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 + +typedef void (APIENTRY * glSampleCoverageARBPROC) (GLclampf value, GLboolean invert ); + +extern glSampleCoverageARBPROC glSampleCoverageARB; + +#endif /* GL_ARB_multisample */ + +/*-------------------------------------------------------------------*/ +/*------------NV_TEXTURE_SHADER--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 + +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F + +#endif /* GL_NV_texture_shader */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_TEXTURE_RECTANGLE--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 + +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 + +#endif /* GL_NV_texture_recrangle */ + +/*-------------------------------------------------------------------*/ +/*------------NV_TEXTURE_ENV_COMBINE4--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 + +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B + +#endif /* GL_NV_texture_env_combine */ + +/*-------------------------------------------------------------------*/ +/*------------NV_FOG_DISTANCE----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 + +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C + +#endif /* GL_NV_fog_distance */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_TEXTURE_FILTER_ANISOTROPIC-------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 + +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF + +#endif /* GL_EXT_texture_filter_anisotropic */ + +/*-------------------------------------------------------------------*/ +/*------------SGIS_GENERATE_MIPMAP-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 + +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 + +#endif /* GL_SGIS_generate_mipmap */ + +/*-------------------------------------------------------------------*/ +/*------------NV_TEXGEN_REFLECTION-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 + +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 + +#endif /* GL_NV_texgen_reflection */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_VERTEX_WEIGHTING-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 + +#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 /* alias to GL_MODELVIEW_STACK_DEPTH */ +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 /* alias to GL_MODELVIEW_MATRIX */ +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT 0x1700 /* alias to GL_MODELVIEW */ +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 + +typedef void (APIENTRY * glVertexWeightfEXTPROC) (GLfloat weight); +typedef void (APIENTRY * glVertexWeightfvEXTPROC) (const GLfloat *weight); +typedef void (APIENTRY * glVertexWeightPointerEXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); + +extern glVertexWeightfEXTPROC glVertexWeightfEXT; +extern glVertexWeightfvEXTPROC glVertexWeightfvEXT; +extern glVertexWeightPointerEXTPROC glVertexWeightPointerEXT; + +#endif /* GL_EXT_vertex_weighting */ + +/*-------------------------------------------------------------------*/ +/*------------NV_VERTEX_PROGRAM--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 + +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F + +typedef void (APIENTRY * glBindProgramNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRY * glDeleteProgramsNVPROC) (GLsizei n, const GLuint *ids); +typedef void (APIENTRY * glExecuteProgramNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void (APIENTRY * glGenProgramsNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean (APIENTRY * glAreProgramsResidentNVPROC) (GLsizei n, const GLuint *ids, GLboolean *residences); +typedef void (APIENTRY * glRequestResidentProgramsNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRY * glGetProgramParameterfvNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetProgramParameterdvNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRY * glGetProgramivNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetProgramStringNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void (APIENTRY * glGetTrackMatrixivNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetVertexAttribdvNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRY * glGetVertexAttribfvNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetVertexAttribivNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetVertexAttribPointervNVPROC) (GLuint index, GLenum pname, GLvoid **pointer); +typedef GLboolean (APIENTRY * glIsProgramNVPROC) (GLuint id); +typedef void (APIENTRY * glLoadProgramNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void (APIENTRY * glProgramParameter4fNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glProgramParameter4dNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glProgramParameter4dvNVPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRY * glProgramParameter4fvNVPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRY * glProgramParameters4dvNVPROC) (GLenum target, GLuint index, GLuint num, const GLdouble *params); +typedef void (APIENTRY * glProgramParameters4fvNVPROC) (GLenum target, GLuint index, GLuint num, const GLfloat *params); +typedef void (APIENTRY * glTrackMatrixNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRY * glVertexAttribPointerNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRY * glVertexAttrib1sNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRY * glVertexAttrib1fNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY * glVertexAttrib1dNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY * glVertexAttrib2sNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRY * glVertexAttrib2fNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRY * glVertexAttrib2dNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY * glVertexAttrib3sNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glVertexAttrib3fNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glVertexAttrib3dNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glVertexAttrib4sNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY * glVertexAttrib4fNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glVertexAttrib4dNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glVertexAttrib4ubNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRY * glVertexAttrib1svNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib1fvNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib1dvNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib2svNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib2fvNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib2dvNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib3svNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib3fvNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib3dvNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib4svNVPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib4fvNVPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib4dvNVPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib4ubvNVPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRY * glVertexAttribs1svNVPROC) (GLuint index, GLsizei n, const GLshort *v); +typedef void (APIENTRY * glVertexAttribs1fvNVPROC) (GLuint index, GLsizei n, const GLfloat *v); +typedef void (APIENTRY * glVertexAttribs1dvNVPROC) (GLuint index, GLsizei n, const GLdouble *v); +typedef void (APIENTRY * glVertexAttribs2svNVPROC) (GLuint index, GLsizei n, const GLshort *v); +typedef void (APIENTRY * glVertexAttribs2fvNVPROC) (GLuint index, GLsizei n, const GLfloat *v); +typedef void (APIENTRY * glVertexAttribs2dvNVPROC) (GLuint index, GLsizei n, const GLdouble *v); +typedef void (APIENTRY * glVertexAttribs3svNVPROC) (GLuint index, GLsizei n, const GLshort *v); +typedef void (APIENTRY * glVertexAttribs3fvNVPROC) (GLuint index, GLsizei n, const GLfloat *v); +typedef void (APIENTRY * glVertexAttribs3dvNVPROC) (GLuint index, GLsizei n, const GLdouble *v); +typedef void (APIENTRY * glVertexAttribs4svNVPROC) (GLuint index, GLsizei n, const GLshort *v); +typedef void (APIENTRY * glVertexAttribs4fvNVPROC) (GLuint index, GLsizei n, const GLfloat *v); +typedef void (APIENTRY * glVertexAttribs4dvNVPROC) (GLuint index, GLsizei n, const GLdouble *v); +typedef void (APIENTRY * glVertexAttribs4ubvNVPROC) (GLuint index, GLsizei n, const GLubyte *v); + +extern glBindProgramNVPROC glBindProgramNV; +extern glDeleteProgramsNVPROC glDeleteProgramsNV; +extern glExecuteProgramNVPROC glExecuteProgramNV; +extern glGenProgramsNVPROC glGenProgramsNV; +extern glAreProgramsResidentNVPROC glAreProgramsResidentNV; +extern glRequestResidentProgramsNVPROC glRequestResidentProgramsNV; +extern glGetProgramParameterfvNVPROC glGetProgramParameterfvNV; +extern glGetProgramParameterdvNVPROC glGetProgramParameterdvNV; +extern glGetProgramivNVPROC glGetProgramivNV; +extern glGetProgramStringNVPROC glGetProgramStringNV; +extern glGetTrackMatrixivNVPROC glGetTrackMatrixivNV; +extern glGetVertexAttribdvNVPROC glGetVertexAttribdvNV; +extern glGetVertexAttribfvNVPROC glGetVertexAttribfvNV; +extern glGetVertexAttribivNVPROC glGetVertexAttribivNV; +extern glGetVertexAttribPointervNVPROC glGetVertexAttribPointervNV; +extern glIsProgramNVPROC glIsProgramNV; +extern glLoadProgramNVPROC glLoadProgramNV; +extern glProgramParameter4fNVPROC glProgramParameter4fNV; +extern glProgramParameter4dNVPROC glProgramParameter4dNV; +extern glProgramParameter4dvNVPROC glProgramParameter4dvNV; +extern glProgramParameter4fvNVPROC glProgramParameter4fvNV; +extern glProgramParameters4dvNVPROC glProgramParameters4dvNV; +extern glProgramParameters4fvNVPROC glProgramParameters4fvNV; +extern glTrackMatrixNVPROC glTrackMatrixNV; +extern glVertexAttribPointerNVPROC glVertexAttribPointerNV; +extern glVertexAttrib1sNVPROC glVertexAttrib1sNV; +extern glVertexAttrib1fNVPROC glVertexAttrib1fNV; +extern glVertexAttrib1dNVPROC glVertexAttrib1dNV; +extern glVertexAttrib2sNVPROC glVertexAttrib2sNV; +extern glVertexAttrib2fNVPROC glVertexAttrib2fNV; +extern glVertexAttrib2dNVPROC glVertexAttrib2dNV; +extern glVertexAttrib3sNVPROC glVertexAttrib3sNV; +extern glVertexAttrib3fNVPROC glVertexAttrib3fNV; +extern glVertexAttrib3dNVPROC glVertexAttrib3dNV; +extern glVertexAttrib4sNVPROC glVertexAttrib4sNV; +extern glVertexAttrib4fNVPROC glVertexAttrib4fNV; +extern glVertexAttrib4dNVPROC glVertexAttrib4dNV; +extern glVertexAttrib4ubNVPROC glVertexAttrib4ubNV; +extern glVertexAttrib1svNVPROC glVertexAttrib1svNV; +extern glVertexAttrib1fvNVPROC glVertexAttrib1fvNV; +extern glVertexAttrib1dvNVPROC glVertexAttrib1dvNV; +extern glVertexAttrib2svNVPROC glVertexAttrib2svNV; +extern glVertexAttrib2fvNVPROC glVertexAttrib2fvNV; +extern glVertexAttrib2dvNVPROC glVertexAttrib2dvNV; +extern glVertexAttrib3svNVPROC glVertexAttrib3svNV; +extern glVertexAttrib3fvNVPROC glVertexAttrib3fvNV; +extern glVertexAttrib3dvNVPROC glVertexAttrib3dvNV; +extern glVertexAttrib4svNVPROC glVertexAttrib4svNV; +extern glVertexAttrib4fvNVPROC glVertexAttrib4fvNV; +extern glVertexAttrib4dvNVPROC glVertexAttrib4dvNV; +extern glVertexAttrib4ubvNVPROC glVertexAttrib4ubvNV; +extern glVertexAttribs1svNVPROC glVertexAttribs1svNV; +extern glVertexAttribs1fvNVPROC glVertexAttribs1fvNV; +extern glVertexAttribs1dvNVPROC glVertexAttribs1dvNV; +extern glVertexAttribs2svNVPROC glVertexAttribs2svNV; +extern glVertexAttribs2fvNVPROC glVertexAttribs2fvNV; +extern glVertexAttribs2dvNVPROC glVertexAttribs2dvNV; +extern glVertexAttribs3svNVPROC glVertexAttribs3svNV; +extern glVertexAttribs3fvNVPROC glVertexAttribs3fvNV; +extern glVertexAttribs3dvNVPROC glVertexAttribs3dvNV; +extern glVertexAttribs4svNVPROC glVertexAttribs4svNV; +extern glVertexAttribs4fvNVPROC glVertexAttribs4fvNV; +extern glVertexAttribs4dvNVPROC glVertexAttribs4dvNV; +extern glVertexAttribs4ubvNVPROC glVertexAttribs4ubvNV; + +#endif /* GL_NV_vertex_program */ + +/*-------------------------------------------------------------------*/ +/*------------NV_FENCE-----------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 + +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 + +typedef void (APIENTRY * glGenFencesNVPROC) (GLsizei n, GLuint *fences); +typedef void (APIENTRY * glDeleteFencesNVPROC) (GLsizei n, const GLuint *fences); +typedef void (APIENTRY * glSetFenceNVPROC) (GLuint fence, GLenum condition); +typedef GLboolean (APIENTRY * glTestFenceNVPROC) (GLuint fence); +typedef void (APIENTRY * glFinishFenceNVPROC) (GLuint fence); +typedef GLboolean (APIENTRY * glIsFenceNVPROC) (GLuint fence); +typedef void (APIENTRY * glGetFenceivNVPROC) (GLuint fence, GLenum pname, GLint *params); + +extern glGenFencesNVPROC glGenFencesNV; +extern glDeleteFencesNVPROC glDeleteFencesNV; +extern glSetFenceNVPROC glSetFenceNV; +extern glTestFenceNVPROC glTestFenceNV; +extern glFinishFenceNVPROC glFinishFenceNV; +extern glIsFenceNVPROC glIsFenceNV; +extern glGetFenceivNVPROC glGetFenceivNV; + +#endif /* GL_NV_fence */ + +/*-------------------------------------------------------------------*/ +/*------------NV_TEXTURE_SHADER2-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 + +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B + +#endif /* GL_NV_texture_shader2 */ + +/*-------------------------------------------------------------------*/ +/*------------NV_BLEND_SQUARE----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 + +#endif /* GL_NV_blend_square */ + +/*-------------------------------------------------------------------*/ +/*------------NV_LIGHT_MAX_EXPONENT----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 + +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 + +#endif /* GL_NV_light_max_exponent */ + +/*-------------------------------------------------------------------*/ +/*------------NV_PACKED_DEPTH_STENCIL--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 + +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA + +#endif /* GL_NV_packed_depth_stencil */ + +/*-------------------------------------------------------------------*/ +/*------------NV_REGISTER_COMBINERS2---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 + +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 + +typedef void (APIENTRY * glCombinerStageParameterfvNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void (APIENTRY * glGetCombinerStageParameterfvNVPROC) (GLenum stage, GLenum pname, GLfloat *params); + +extern glCombinerStageParameterfvNVPROC glCombinerStageParameterfvNV; +extern glGetCombinerStageParameterfvNVPROC glGetCombinerStageParameterfvNV; + +#endif /* GL_NV_register_combiners2 */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_ABGR-----------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 + +#define GL_ABGR_EXT 0x8000 + +#endif /* GL_EXT_abgr */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_STENCIL_WRAP---------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 + +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 + +#endif /* GL_EXT_stencil_wrap */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_TEXTURE_LOD_BIAS-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 + +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD + +#endif /* GL_EXT_texture_lod_bias */ + +/*-------------------------------------------------------------------*/ +/*------------NV_EVALUATORS------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 + +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 + +typedef void (APIENTRY * glMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void (APIENTRY * glMapParameterivNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (APIENTRY * glMapParameterfvNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (APIENTRY * glGetMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void (APIENTRY * glGetMapParameterivNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetMapParameterfvNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetMapAttribParameterivNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetMapAttribParameterfvNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glEvalMapsNVPROC) (GLenum target, GLenum mode); + +extern glMapControlPointsNVPROC glMapControlPointsNV; +extern glMapParameterivNVPROC glMapParameterivNV; +extern glMapParameterfvNVPROC glMapParameterfvNV; +extern glGetMapControlPointsNVPROC glGetMapControlPointsNV; +extern glGetMapParameterivNVPROC glGetMapParameterivNV; +extern glGetMapParameterfvNVPROC glGetMapParameterfvNV; +extern glGetMapAttribParameterivNVPROC glGetMapAttribParameterivNV; +extern glGetMapAttribParameterfvNVPROC glGetMapAttribParameterfvNV; +extern glEvalMapsNVPROC glEvalMapsNV; + +#endif /* GL_NV_evaluators */ + +/*-------------------------------------------------------------------*/ +/*------------NV_COPY_DEPTH_TO_COLOR---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 + +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F + +#endif /* GL_NV_copy_depth_to_color */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_PN_TRIANGLES---------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 + +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 + +typedef void (APIENTRY * glPNTrianglesiATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * glPNTrianglesfATIPROC) (GLenum pname, GLfloat param); + +extern glPNTrianglesiATIPROC glPNTrianglesiATI; +extern glPNTrianglesfATIPROC glPNTrianglesfATI; + +#endif /* GL_ATI_pn_triangles */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_POINT_PARAMETERS-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 + +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 + +typedef void (APIENTRY * glPointParameterfARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * glPointParameterfvARBPROC) (GLenum pname, GLfloat *params); + +extern glPointParameterfARBPROC glPointParameterfARB; +extern glPointParameterfvARBPROC glPointParameterfvARB; + +#endif /* GL_ARB_point_parameters */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_ENV_CROSSBAR-------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 + +#endif + +/*-------------------------------------------------------------------*/ +/*------------ARB_VERTEX_BLEND---------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 + +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F + +typedef void (APIENTRY * glWeightbvARBPROC) (GLint size, GLbyte *weights); +typedef void (APIENTRY * glWeightsvARBPROC) (GLint size, GLshort *weights); +typedef void (APIENTRY * glWeightivARBPROC) (GLint size, GLint *weights); +typedef void (APIENTRY * glWeightfvARBPROC) (GLint size, GLfloat *weights); +typedef void (APIENTRY * glWeightdvARBPROC) (GLint size, GLdouble *weights); +typedef void (APIENTRY * glWeightubvARBPROC) (GLint size, GLubyte *weights); +typedef void (APIENTRY * glWeightusvARBPROC) (GLint size, GLushort *weights); +typedef void (APIENTRY * glWeightuivARBPROC) (GLint size, GLuint *weights); +typedef void (APIENTRY * glWeightPointerARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +typedef void (APIENTRY * glVertexBlendARBPROC) (GLint count); + +extern glWeightbvARBPROC glWeightbvARB; +extern glWeightsvARBPROC glWeightsvARB; +extern glWeightivARBPROC glWeightivARB; +extern glWeightfvARBPROC glWeightfvARB; +extern glWeightdvARBPROC glWeightdvARB; +extern glWeightubvARBPROC glWeightubvARB; +extern glWeightusvARBPROC glWeightusvARB; +extern glWeightuivARBPROC glWeightuivARB; +extern glWeightPointerARBPROC glWeightPointerARB; +extern glVertexBlendARBPROC glVertexBlendARB; + +#endif /* GL_ARB_vertex_blend */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_MULTI_DRAW_ARRAYS----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 + +typedef void (APIENTRY * glMultiDrawArraysEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (APIENTRY * glMultiDrawElementsEXTPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); + +extern glMultiDrawArraysEXTPROC glMultiDrawArraysEXT; +extern glMultiDrawElementsEXTPROC glMultiDrawElementsEXT; + +#endif /* GL_EXT_multi_draw_arrays */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_MATRIX_PALETTE-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 + +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 + +typedef void (APIENTRY * glCurrentPaletteMatrixARBPROC) (GLint index); +typedef void (APIENTRY * glMatrixIndexubvARBPROC) (GLint size, GLubyte *indices); +typedef void (APIENTRY * glMatrixIndexusvARBPROC) (GLint size, GLushort *indices); +typedef void (APIENTRY * glMatrixIndexuivARBPROC) (GLint size, GLuint *indices); +typedef void (APIENTRY * glMatrixIndexPointerARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); + +extern glCurrentPaletteMatrixARBPROC glCurrentPaletteMatrixARB; +extern glMatrixIndexubvARBPROC glMatrixIndexubvARB; +extern glMatrixIndexusvARBPROC glMatrixIndexusvARB; +extern glMatrixIndexuivARBPROC glMatrixIndexuivARB; +extern glMatrixIndexPointerARBPROC glMatrixIndexPointerARB; + +#endif /* GL_ARB_matrix_palette */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_VERTEX_SHADER--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 + +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED + +typedef void (APIENTRY * glBeginVertexShaderEXTPROC) (); +typedef void (APIENTRY * glEndVertexShaderEXTPROC) (); +typedef void (APIENTRY * glBindVertexShaderEXTPROC) (GLuint id); +typedef GLuint (APIENTRY * glGenVertexShadersEXTPROC) (GLuint range); +typedef void (APIENTRY * glDeleteVertexShaderEXTPROC) (GLuint id); +typedef void (APIENTRY * glShaderOp1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRY * glShaderOp2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRY * glShaderOp3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRY * glSwizzleEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRY * glWriteMaskEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRY * glInsertComponentEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRY * glExtractComponentEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRY * glGenSymbolsEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components); +typedef void (APIENTRY * glSetInvariantEXTPROC) (GLuint id, GLenum type, GLvoid *addr); +typedef void (APIENTRY * glSetLocalConstantEXTPROC) (GLuint id, GLenum type, GLvoid *addr); +typedef void (APIENTRY * glVariantbvEXTPROC) (GLuint id, GLbyte *addr); +typedef void (APIENTRY * glVariantsvEXTPROC) (GLuint id, GLshort *addr); +typedef void (APIENTRY * glVariantivEXTPROC) (GLuint id, GLint *addr); +typedef void (APIENTRY * glVariantfvEXTPROC) (GLuint id, GLfloat *addr); +typedef void (APIENTRY * glVariantdvEXTPROC) (GLuint id, GLdouble *addr); +typedef void (APIENTRY * glVariantubvEXTPROC) (GLuint id, GLubyte *addr); +typedef void (APIENTRY * glVariantusvEXTPROC) (GLuint id, GLushort *addr); +typedef void (APIENTRY * glVariantuivEXTPROC) (GLuint id, GLuint *addr); +typedef void (APIENTRY * glVariantPointerEXTPROC) (GLuint id, GLenum type, GLuint stride, GLvoid *addr); +typedef void (APIENTRY * glEnableVariantClientStateEXTPROC) (GLuint id); +typedef void (APIENTRY * glDisableVariantClientStateEXTPROC) (GLuint id); +typedef GLuint (APIENTRY * glBindLightParameterEXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRY * glBindMaterialParameterEXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRY * glBindTexGenParameterEXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRY * glBindTextureUnitParameterEXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRY * glBindParameterEXTPROC) (GLenum value); +typedef GLboolean (APIENTRY * glIsVariantEnabledEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRY * glGetVariantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRY * glGetVariantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRY * glGetVariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRY * glGetVariantPointervEXTPROC) (GLuint id, GLenum value, GLvoid **data); +typedef void (APIENTRY * glGetInvariantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRY * glGetInvariantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRY * glGetInvariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (APIENTRY * glGetLocalConstantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (APIENTRY * glGetLocalConstantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (APIENTRY * glGetLocalConstantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); + +extern glBeginVertexShaderEXTPROC glBeginVertexShaderEXT; +extern glEndVertexShaderEXTPROC glEndVertexShaderEXT; +extern glBindVertexShaderEXTPROC glBindVertexShaderEXT; +extern glGenVertexShadersEXTPROC glGenVertexShadersEXT; +extern glDeleteVertexShaderEXTPROC glDeleteVertexShaderEXT; +extern glShaderOp1EXTPROC glShaderOp1EXT; +extern glShaderOp2EXTPROC glShaderOp2EXT; +extern glShaderOp3EXTPROC glShaderOp3EXT; +extern glSwizzleEXTPROC glSwizzleEXT; +extern glWriteMaskEXTPROC glWriteMaskEXT; +extern glInsertComponentEXTPROC glInsertComponentEXT; +extern glExtractComponentEXTPROC glExtractComponentEXT; +extern glGenSymbolsEXTPROC glGenSymbolsEXT; +extern glSetInvariantEXTPROC glSetInvariantEXT; +extern glSetLocalConstantEXTPROC glSetLocalConstantEXT; +extern glVariantbvEXTPROC glVariantbvEXT; +extern glVariantsvEXTPROC glVariantsvEXT; +extern glVariantivEXTPROC glVariantivEXT; +extern glVariantfvEXTPROC glVariantfvEXT; +extern glVariantdvEXTPROC glVariantdvEXT; +extern glVariantubvEXTPROC glVariantubvEXT; +extern glVariantusvEXTPROC glVariantusvEXT; +extern glVariantuivEXTPROC glVariantuivEXT; +extern glVariantPointerEXTPROC glVariantPointerEXT; +extern glEnableVariantClientStateEXTPROC glEnableVariantClientStateEXT; +extern glDisableVariantClientStateEXTPROC glDisableVariantClientStateEXT; +extern glBindLightParameterEXTPROC glBindLightParameterEXT; +extern glBindMaterialParameterEXTPROC glBindMaterialParameterEXT; +extern glBindTexGenParameterEXTPROC glBindTexGenParameterEXT; +extern glBindTextureUnitParameterEXTPROC glBindTextureUnitParameterEXT; +extern glBindParameterEXTPROC glBindParameterEXT; +extern glIsVariantEnabledEXTPROC glIsVariantEnabledEXT; +extern glGetVariantBooleanvEXTPROC glGetVariantBooleanvEXT; +extern glGetVariantIntegervEXTPROC glGetVariantIntegervEXT; +extern glGetVariantFloatvEXTPROC glGetVariantFloatvEXT; +extern glGetVariantPointervEXTPROC glGetVariantPointervEXT; +extern glGetInvariantBooleanvEXTPROC glGetInvariantBooleanvEXT; +extern glGetInvariantIntegervEXTPROC glGetInvariantIntegervEXT; +extern glGetInvariantFloatvEXTPROC glGetInvariantFloatvEXT; +extern glGetLocalConstantBooleanvEXTPROC glGetLocalConstantBooleanvEXT; +extern glGetLocalConstantIntegervEXTPROC glGetLocalConstantIntegervEXT; +extern glGetLocalConstantFloatvEXTPROC glGetLocalConstantFloatvEXT; + +#endif /* GL_EXT_vertex_shader */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_ENVMAP_BUMPMAP-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 + +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C + +typedef void (APIENTRY * glTexBumpParameterivATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRY * glTexBumpParameterfvATIPROC) (GLenum pname, GLfloat *param); +typedef void (APIENTRY * glGetTexBumpParameterivATIPROC) (GLenum pname, GLint *param); +typedef void (APIENTRY * glGetTexBumpParameterfvATIPROC) (GLenum pname, GLfloat *param); + +extern glTexBumpParameterivATIPROC glTexBumpParameterivATI; +extern glTexBumpParameterfvATIPROC glTexBumpParameterfvATI; +extern glGetTexBumpParameterivATIPROC glGetTexBumpParameterivATI; +extern glGetTexBumpParameterfvATIPROC glGetTexBumpParameterfvATI; + +#endif /* GL_ATI_envmap_bumpmap */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_FRAGMENT_SHADER------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 + +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 + +typedef GLuint (APIENTRY * glGenFragmentShadersATIPROC) (GLuint range); +typedef void (APIENTRY * glBindFragmentShaderATIPROC) (GLuint id); +typedef void (APIENTRY * glDeleteFragmentShaderATIPROC) (GLuint id); +typedef void (APIENTRY * glBeginFragmentShaderATIPROC) (GLvoid); +typedef void (APIENTRY * glEndFragmentShaderATIPROC) (GLvoid); +typedef void (APIENTRY * glPassTexCoordATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRY * glSampleMapATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRY * glColorFragmentOp1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRY * glColorFragmentOp2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRY * glColorFragmentOp3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRY * glAlphaFragmentOp1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRY * glAlphaFragmentOp2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRY * glAlphaFragmentOp3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRY * glSetFragmentShaderConstantATIPROC) (GLuint dst, const GLfloat *value); + +extern glGenFragmentShadersATIPROC glGenFragmentShadersATI; +extern glBindFragmentShaderATIPROC glBindFragmentShaderATI; +extern glDeleteFragmentShaderATIPROC glDeleteFragmentShaderATI; +extern glBeginFragmentShaderATIPROC glBeginFragmentShaderATI; +extern glEndFragmentShaderATIPROC glEndFragmentShaderATI; +extern glPassTexCoordATIPROC glPassTexCoordATI; +extern glSampleMapATIPROC glSampleMapATI; +extern glColorFragmentOp1ATIPROC glColorFragmentOp1ATI; +extern glColorFragmentOp2ATIPROC glColorFragmentOp2ATI; +extern glColorFragmentOp3ATIPROC glColorFragmentOp3ATI; +extern glAlphaFragmentOp1ATIPROC glAlphaFragmentOp1ATI; +extern glAlphaFragmentOp2ATIPROC glAlphaFragmentOp2ATI; +extern glAlphaFragmentOp3ATIPROC glAlphaFragmentOp3ATI; +extern glSetFragmentShaderConstantATIPROC glSetFragmentShaderConstantATI; + +#endif /* GL_ATI_fragment_shader */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_TEXTURE_MIRROR_ONCE--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 + +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 + +#endif + +/*-------------------------------------------------------------------*/ +/*------------ATI_ELEMENT_ARRAY--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 + +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A + +typedef void (APIENTRY * glElementPointerATIPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRY * glDrawElementArrayATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRY * glDrawRangeElementArrayATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); + +extern glElementPointerATIPROC glElementPointerATI; +extern glDrawElementArrayATIPROC glDrawElementArrayATI; +extern glDrawRangeElementArrayATIPROC glDrawRangeElementArrayATI; + +#endif /* GL_ATI_element_array */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_VERTEX_STREAMS-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 + +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_SOURCE_ATI 0x876C +#define GL_VERTEX_STREAM0_ATI 0x876D +#define GL_VERTEX_STREAM1_ATI 0x876E +#define GL_VERTEX_STREAM2_ATI 0x876F +#define GL_VERTEX_STREAM3_ATI 0x8770 +#define GL_VERTEX_STREAM4_ATI 0x8771 +#define GL_VERTEX_STREAM5_ATI 0x8772 +#define GL_VERTEX_STREAM6_ATI 0x8773 +#define GL_VERTEX_STREAM7_ATI 0x8774 + +typedef void (APIENTRY * glClientActiveVertexStreamATIPROC) (GLenum stream); +typedef void (APIENTRY * glVertexBlendEnviATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * glVertexBlendEnvfATIPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY * glVertexStream2sATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRY * glVertexStream2svATIPROC) (GLenum stream, const GLshort *v); +typedef void (APIENTRY * glVertexStream2iATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRY * glVertexStream2ivATIPROC) (GLenum stream, const GLint *v); +typedef void (APIENTRY * glVertexStream2fATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRY * glVertexStream2fvATIPROC) (GLenum stream, const GLfloat *v); +typedef void (APIENTRY * glVertexStream2dATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRY * glVertexStream2dvATIPROC) (GLenum stream, const GLdouble *v); +typedef void (APIENTRY * glVertexStream3sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glVertexStream3svATIPROC) (GLenum stream, const GLshort *v); +typedef void (APIENTRY * glVertexStream3iATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRY * glVertexStream3ivATIPROC) (GLenum stream, const GLint *v); +typedef void (APIENTRY * glVertexStream3fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glVertexStream3fvATIPROC) (GLenum stream, const GLfloat *v); +typedef void (APIENTRY * glVertexStream3dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glVertexStream3dvATIPROC) (GLenum stream, const GLdouble *v); +typedef void (APIENTRY * glVertexStream4sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY * glVertexStream4svATIPROC) (GLenum stream, const GLshort *v); +typedef void (APIENTRY * glVertexStream4iATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY * glVertexStream4ivATIPROC) (GLenum stream, const GLint *v); +typedef void (APIENTRY * glVertexStream4fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glVertexStream4fvATIPROC) (GLenum stream, const GLfloat *v); +typedef void (APIENTRY * glVertexStream4dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glVertexStream4dvATIPROC) (GLenum stream, const GLdouble *v); +typedef void (APIENTRY * glNormalStream3bATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z); +typedef void (APIENTRY * glNormalStream3bvATIPROC) (GLenum stream, const GLbyte *v); +typedef void (APIENTRY * glNormalStream3sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glNormalStream3svATIPROC) (GLenum stream, const GLshort *v); +typedef void (APIENTRY * glNormalStream3iATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRY * glNormalStream3ivATIPROC) (GLenum stream, const GLint *v); +typedef void (APIENTRY * glNormalStream3fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glNormalStream3fvATIPROC) (GLenum stream, const GLfloat *v); +typedef void (APIENTRY * glNormalStream3dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glNormalStream3dvATIPROC) (GLenum stream, const GLdouble *v); + + +extern glClientActiveVertexStreamATIPROC glClientActiveVertexStreamATI; +extern glVertexBlendEnviATIPROC glVertexBlendEnviATI; +extern glVertexBlendEnvfATIPROC glVertexBlendEnvfATI; +extern glVertexStream2sATIPROC glVertexStream2sATI; +extern glVertexStream2svATIPROC glVertexStream2svATI; +extern glVertexStream2iATIPROC glVertexStream2iATI; +extern glVertexStream2ivATIPROC glVertexStream2ivATI; +extern glVertexStream2fATIPROC glVertexStream2fATI; +extern glVertexStream2fvATIPROC glVertexStream2fvATI; +extern glVertexStream2dATIPROC glVertexStream2dATI; +extern glVertexStream2dvATIPROC glVertexStream2dvATI; +extern glVertexStream3sATIPROC glVertexStream3sATI; +extern glVertexStream3svATIPROC glVertexStream3svATI; +extern glVertexStream3iATIPROC glVertexStream3iATI; +extern glVertexStream3ivATIPROC glVertexStream3ivATI; +extern glVertexStream3fATIPROC glVertexStream3fATI; +extern glVertexStream3fvATIPROC glVertexStream3fvATI; +extern glVertexStream3dATIPROC glVertexStream3dATI; +extern glVertexStream3dvATIPROC glVertexStream3dvATI; +extern glVertexStream4sATIPROC glVertexStream4sATI; +extern glVertexStream4svATIPROC glVertexStream4svATI; +extern glVertexStream4iATIPROC glVertexStream4iATI; +extern glVertexStream4ivATIPROC glVertexStream4ivATI; +extern glVertexStream4fATIPROC glVertexStream4fATI; +extern glVertexStream4fvATIPROC glVertexStream4fvATI; +extern glVertexStream4dATIPROC glVertexStream4dATI; +extern glVertexStream4dvATIPROC glVertexStream4dvATI; +extern glNormalStream3bATIPROC glNormalStream3bATI; +extern glNormalStream3bvATIPROC glNormalStream3bvATI; +extern glNormalStream3sATIPROC glNormalStream3sATI; +extern glNormalStream3svATIPROC glNormalStream3svATI; +extern glNormalStream3iATIPROC glNormalStream3iATI; +extern glNormalStream3ivATIPROC glNormalStream3ivATI; +extern glNormalStream3fATIPROC glNormalStream3fATI; +extern glNormalStream3fvATIPROC glNormalStream3fvATI; +extern glNormalStream3dATIPROC glNormalStream3dATI; +extern glNormalStream3dvATIPROC glNormalStream3dvATI; + +#endif /* GL_ATI_vertex_streams */ + +/*-------------------------------------------------------------------*/ +/*------------ATI_VERTEX_ARRAY_OBJECT--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 + +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 + +typedef GLuint (APIENTRY * glNewObjectBufferATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean (APIENTRY * glIsObjectBufferATIPROC) (GLuint buffer); +typedef void (APIENTRY * glUpdateObjectBufferATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void (APIENTRY * glGetObjectBufferfvATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetObjectBufferivATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void (APIENTRY * glFreeObjectBufferATIPROC) (GLuint buffer); +typedef void (APIENTRY * glArrayObjectATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRY * glGetArrayObjectfvATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetArrayObjectivATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void (APIENTRY * glVariantArrayObjectATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRY * glGetVariantArrayObjectfvATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetVariantArrayObjectivATIPROC) (GLuint id, GLenum pname, GLint *params); + +extern glNewObjectBufferATIPROC glNewObjectBufferATI; +extern glIsObjectBufferATIPROC glIsObjectBufferATI; +extern glUpdateObjectBufferATIPROC glUpdateObjectBufferATI; +extern glGetObjectBufferfvATIPROC glGetObjectBufferfvATI; +extern glGetObjectBufferivATIPROC glGetObjectBufferivATI; +extern glFreeObjectBufferATIPROC glFreeObjectBufferATI; +extern glArrayObjectATIPROC glArrayObjectATI; +extern glGetArrayObjectfvATIPROC glGetArrayObjectfvATI; +extern glGetArrayObjectivATIPROC glGetArrayObjectivATI; +extern glVariantArrayObjectATIPROC glVariantArrayObjectATI; +extern glGetVariantArrayObjectfvATIPROC glGetVariantArrayObjectfvATI; +extern glGetVariantArrayObjectivATIPROC glGetVariantArrayObjectivATI; + +#endif /* GL_ATI_vertex_array_object */ + +/*-------------------------------------------------------------------*/ +/*------------HP_OCCLUSION_TEST--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 + +#define GL_OCCLUSION_TEST_HP 0x8165; +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166; + +#endif /* GL_HP_occlusion_test */ + +/*-------------------------------------------------------------------*/ +/*------------ATIX_POINT_SPRITES-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATIX_point_sprites +#define GL_ATIX_point_sprites 1 + +#define GL_TEXTURE_POINT_MODE_ATIX 0x60b0 +#define GL_TEXTURE_POINT_ONE_COORD_ATIX 0x60b1 +#define GL_TEXTURE_POINT_SPRITE_ATIX 0x60b2 +#define GL_POINT_SPRITE_CULL_MODE_ATIX 0x60b3 +#define GL_POINT_SPRITE_CULL_CENTER_ATIX 0x60b4 +#define GL_POINT_SPRITE_CULL_CLIP_ATIX 0x60b5 + +#endif /* GL_ATIX_point_sprites */ + +/*-------------------------------------------------------------------*/ +/*------------ATIX_TEXTURE_ENV_ROUTE---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATIX_texture_env_route +#define GL_ATIX_texture_env_route 1 + +#define GL_SECONDARY_COLOR_ATIX 0x8747 +#define GL_TEXTURE_OUTPUT_RGB_ATIX 0x8748 +#define GL_TEXTURE_OUTPUT_ALPHA_ATIX 0x8749 + +#endif /* GL_ATIX_texture_env_route */ + +/*-------------------------------------------------------------------*/ +/*------------NV_DEPTH_CLAMP-----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 + +#define GL_DEPTH_CLAMP_NV 0x864F + +#endif /* GL_NV_depth_clamp */ + +/*-------------------------------------------------------------------*/ +/*------------NV_OCCLUSION_QUERY-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 + +#ifndef GL_HP_occlusion_test +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif /* GL_HP_occlusion_test */ +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 + +typedef void (APIENTRY * glGenOcclusionQueriesNVPROC) (GLsizei n, GLuint *ids); +typedef void (APIENTRY * glDeleteOcclusionQueriesNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean (APIENTRY * glIsOcclusionQueryNVPROC) (GLuint id); +typedef void (APIENTRY * glBeginOcclusionQueryNVPROC) (GLuint id); +typedef void (APIENTRY * glEndOcclusionQueryNVPROC) (void); +typedef void (APIENTRY * glGetOcclusionQueryivNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetOcclusionQueryuivNVPROC) (GLuint id, GLenum pname, GLuint *params); + +extern glGenOcclusionQueriesNVPROC glGenOcclusionQueriesNV; +extern glDeleteOcclusionQueriesNVPROC glDeleteOcclusionQueriesNV; +extern glIsOcclusionQueryNVPROC glIsOcclusionQueryNV; +extern glBeginOcclusionQueryNVPROC glBeginOcclusionQueryNV; +extern glEndOcclusionQueryNVPROC glEndOcclusionQueryNV; +extern glGetOcclusionQueryivNVPROC glGetOcclusionQueryivNV; +extern glGetOcclusionQueryuivNVPROC glGetOcclusionQueryuivNV; + +#endif /* GL_NV_occlusion_query */ + +/*-------------------------------------------------------------------*/ +/*------------NV_POINT_SPRITE----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 + +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 + +typedef void (APIENTRY * glPointParameteriNVPROC) (GLenum pname, GLint param); +typedef void (APIENTRY * glPointParameterivNVPROC) (GLenum pname, const GLint *params); + +extern glPointParameteriNVPROC glPointParameteriNV; +extern glPointParameterivNVPROC glPointParameterivNV; + +#endif /* GL_NV_point_sprite */ + +/*-------------------------------------------------------------------*/ +/*------------NV_TEXTURE_SHADER3-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 + +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 + +#endif /* GL_NV_texture_shader3 */ + +/*-------------------------------------------------------------------*/ +/*------------NV_VERTEX_PROGRAM1_1-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 + +#endif /* GL_NV_vertex_program1_1 */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_TEXTURE_MIRRORED_REPEAT----------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 + +#define GL_GL_MIRRORED_REPEAT_ARB 0x8370 + +#endif /* GL_ARB_texture_mirrored_repeat */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_SHADOW---------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 + +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E + +#endif /* GL_ARB_shadow */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_SHADOW_AMBIENT-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 + +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF + +#endif /* GL_ARB_shadow_ambient */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_DEPTH_TEXTURE--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 + +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B + +#endif /* GL_ARB_depth_texture */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_WINDOW_POS-----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 + +typedef void (APIENTRY * glWindowPos2dARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY * glWindowPos2fARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY * glWindowPos2iARBPROC) (GLint x, GLint y); +typedef void (APIENTRY * glWindowPos2sARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRY * glWindowPos2dvARBPROC) (const GLdouble *p); +typedef void (APIENTRY * glWindowPos2fvARBPROC) (const GLfloat *p); +typedef void (APIENTRY * glWindowPos2ivARBPROC) (const GLint *p); +typedef void (APIENTRY * glWindowPos2svARBPROC) (const GLshort *p); +typedef void (APIENTRY * glWindowPos3dARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glWindowPos3fARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glWindowPos3iARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY * glWindowPos3sARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glWindowPos3dvARBPROC) (const GLdouble *p); +typedef void (APIENTRY * glWindowPos3fvARBPROC) (const GLfloat *p); +typedef void (APIENTRY * glWindowPos3ivARBPROC) (const GLint *p); +typedef void (APIENTRY * glWindowPos3svARBPROC) (const GLshort *p); + +extern glWindowPos2dARBPROC glWindowPos2dARB; +extern glWindowPos2fARBPROC glWindowPos2fARB; +extern glWindowPos2iARBPROC glWindowPos2iARB; +extern glWindowPos2sARBPROC glWindowPos2sARB; +extern glWindowPos2dvARBPROC glWindowPos2dvARB; +extern glWindowPos2fvARBPROC glWindowPos2fvARB; +extern glWindowPos2ivARBPROC glWindowPos2ivARB; +extern glWindowPos2svARBPROC glWindowPos2svARB; +extern glWindowPos3dARBPROC glWindowPos3dARB; +extern glWindowPos3fARBPROC glWindowPos3fARB; +extern glWindowPos3iARBPROC glWindowPos3iARB; +extern glWindowPos3sARBPROC glWindowPos3sARB; +extern glWindowPos3dvARBPROC glWindowPos3dvARB; +extern glWindowPos3fvARBPROC glWindowPos3fvARB; +extern glWindowPos3ivARBPROC glWindowPos3ivARB; +extern glWindowPos3svARBPROC glWindowPos3svARB; + +#endif /* GL_ARB_window_pos */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_SHADOW_FUNCS---------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 + +#endif /* GL_EXT_shadow_funcs */ + + +/*-------------------------------------------------------------------*/ +/*------------EXT_draw_range_elements--------------------------------*/ +/*-------------------------------------------------------------------*/ + + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 + +typedef void (APIENTRY * glDrawRangeElementsEXTPROC) ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); + +extern glDrawRangeElementsEXTPROC glDrawRangeElementsEXT; + +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 + +#endif + +/*-------------------------------------------------------------------*/ +/*------------EXT_texture_compression_s3tc---------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 + +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 + +#endif /* GL_EXT_texture_compression_s3tc */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_stencil_two_side-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 + +typedef void (APIENTRY * glActiveStencilFaceEXTPROC) (GLenum face); + +extern glActiveStencilFaceEXTPROC glActiveStencilFaceEXT; + +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 + +#endif /* GL_EXT_stencil_two_side */ + +/*-------------------------------------------------------------------*/ +/*------------ARB_vertex_program-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 + +typedef void (APIENTRY * glVertexAttrib1sARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRY * glVertexAttrib1fARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY * glVertexAttrib1dARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY * glVertexAttrib2sARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRY * glVertexAttrib2fARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRY * glVertexAttrib2dARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY * glVertexAttrib3sARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY * glVertexAttrib3fARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY * glVertexAttrib3dARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY * glVertexAttrib4sARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY * glVertexAttrib4fARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glVertexAttrib4dARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glVertexAttrib4NubARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRY * glVertexAttrib1svARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib1fvARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib1dvARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib2svARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib2fvARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib2dvARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib3svARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib3fvARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib3dvARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib4bvARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRY * glVertexAttrib4svARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib4ivARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRY * glVertexAttrib4ubvARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRY * glVertexAttrib4usvARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRY * glVertexAttrib4uivARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRY * glVertexAttrib4fvARBPROC) (GLuint index, const GLfloat *v); +typedef void (APIENTRY * glVertexAttrib4dvARBPROC) (GLuint index, const GLdouble *v); +typedef void (APIENTRY * glVertexAttrib4NbvARBPROC) (GLuint index, const GLbyte *v); +typedef void (APIENTRY * glVertexAttrib4NsvARBPROC) (GLuint index, const GLshort *v); +typedef void (APIENTRY * glVertexAttrib4NivARBPROC) (GLuint index, const GLint *v); +typedef void (APIENTRY * glVertexAttrib4NubvARBPROC) (GLuint index, const GLubyte *v); +typedef void (APIENTRY * glVertexAttrib4NusvARBPROC) (GLuint index, const GLushort *v); +typedef void (APIENTRY * glVertexAttrib4NuivARBPROC) (GLuint index, const GLuint *v); +typedef void (APIENTRY * glVertexAttribPointerARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRY * glEnableVertexAttribArrayARBPROC) (GLuint index); +typedef void (APIENTRY * glDisableVertexAttribArrayARBPROC) (GLuint index); +typedef void (APIENTRY * glProgramStringARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void (APIENTRY * glBindProgramARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRY * glDeleteProgramsARBPROC) (GLsizei n, const GLuint *programs); +typedef void (APIENTRY * glGenProgramsARBPROC) (GLsizei n, GLuint *programs); +typedef void (APIENTRY * glProgramEnvParameter4dARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glProgramEnvParameter4dvARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRY * glProgramEnvParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glProgramEnvParameter4fvARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRY * glProgramLocalParameter4dARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glProgramLocalParameter4dvARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRY * glProgramLocalParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glProgramLocalParameter4fvARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRY * glGetProgramEnvParameterdvARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRY * glGetProgramEnvParameterfvARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRY * glGetProgramLocalParameterdvARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRY * glGetProgramLocalParameterfvARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void (APIENTRY * glGetProgramivARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetProgramStringARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void (APIENTRY * glGetVertexAttribdvARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void (APIENTRY * glGetVertexAttribfvARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void (APIENTRY * glGetVertexAttribivARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void (APIENTRY * glGetVertexAttribPointervARBPROC) (GLuint index, GLenum pname, GLvoid **pointer); +typedef GLboolean (APIENTRY * glIsProgramARBPROC) (GLuint program); + +extern glVertexAttrib1sARBPROC glVertexAttrib1sARB; +extern glVertexAttrib1fARBPROC glVertexAttrib1fARB; +extern glVertexAttrib1dARBPROC glVertexAttrib1dARB; +extern glVertexAttrib2sARBPROC glVertexAttrib2sARB; +extern glVertexAttrib2fARBPROC glVertexAttrib2fARB; +extern glVertexAttrib2dARBPROC glVertexAttrib2dARB; +extern glVertexAttrib3sARBPROC glVertexAttrib3sARB; +extern glVertexAttrib3fARBPROC glVertexAttrib3fARB; +extern glVertexAttrib3dARBPROC glVertexAttrib3dARB; +extern glVertexAttrib4sARBPROC glVertexAttrib4sARB; +extern glVertexAttrib4fARBPROC glVertexAttrib4fARB; +extern glVertexAttrib4dARBPROC glVertexAttrib4dARB; +extern glVertexAttrib4NubARBPROC glVertexAttrib4NubARB; +extern glVertexAttrib1svARBPROC glVertexAttrib1svARB; +extern glVertexAttrib1fvARBPROC glVertexAttrib1fvARB; +extern glVertexAttrib1dvARBPROC glVertexAttrib1dvARB; +extern glVertexAttrib2svARBPROC glVertexAttrib2svARB; +extern glVertexAttrib2fvARBPROC glVertexAttrib2fvARB; +extern glVertexAttrib2dvARBPROC glVertexAttrib2dvARB; +extern glVertexAttrib3svARBPROC glVertexAttrib3svARB; +extern glVertexAttrib3fvARBPROC glVertexAttrib3fvARB; +extern glVertexAttrib3dvARBPROC glVertexAttrib3dvARB; +extern glVertexAttrib4bvARBPROC glVertexAttrib4bvARB; +extern glVertexAttrib4svARBPROC glVertexAttrib4svARB; +extern glVertexAttrib4ivARBPROC glVertexAttrib4ivARB; +extern glVertexAttrib4ubvARBPROC glVertexAttrib4ubvARB; +extern glVertexAttrib4usvARBPROC glVertexAttrib4usvARB; +extern glVertexAttrib4uivARBPROC glVertexAttrib4uivARB; +extern glVertexAttrib4fvARBPROC glVertexAttrib4fvARB; +extern glVertexAttrib4dvARBPROC glVertexAttrib4dvARB; +extern glVertexAttrib4NbvARBPROC glVertexAttrib4NbvARB; +extern glVertexAttrib4NsvARBPROC glVertexAttrib4NsvARB; +extern glVertexAttrib4NivARBPROC glVertexAttrib4NivARB; +extern glVertexAttrib4NubvARBPROC glVertexAttrib4NubvARB; +extern glVertexAttrib4NusvARBPROC glVertexAttrib4NusvARB; +extern glVertexAttrib4NuivARBPROC glVertexAttrib4NuivARB; +extern glVertexAttribPointerARBPROC glVertexAttribPointerARB; +extern glEnableVertexAttribArrayARBPROC glEnableVertexAttribArrayARB; +extern glDisableVertexAttribArrayARBPROC glDisableVertexAttribArrayARB; +extern glProgramStringARBPROC glProgramStringARB; +extern glBindProgramARBPROC glBindProgramARB; +extern glDeleteProgramsARBPROC glDeleteProgramsARB; +extern glGenProgramsARBPROC glGenProgramsARB; +extern glProgramEnvParameter4dARBPROC glProgramEnvParameter4dARB; +extern glProgramEnvParameter4dvARBPROC glProgramEnvParameter4dvARB; +extern glProgramEnvParameter4fARBPROC glProgramEnvParameter4fARB; +extern glProgramEnvParameter4fvARBPROC glProgramEnvParameter4fvARB; +extern glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB; +extern glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB; +extern glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB; +extern glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB; +extern glGetProgramEnvParameterdvARBPROC glGetProgramEnvParameterdvARB; +extern glGetProgramEnvParameterfvARBPROC glGetProgramEnvParameterfvARB; +extern glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB; +extern glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB; +extern glGetProgramivARBPROC glGetProgramivARB; +extern glGetProgramStringARBPROC glGetProgramStringARB; +extern glGetVertexAttribdvARBPROC glGetVertexAttribdvARB; +extern glGetVertexAttribfvARBPROC glGetVertexAttribfvARB; +extern glGetVertexAttribivARBPROC glGetVertexAttribivARB; +extern glGetVertexAttribPointervARBPROC glGetVertexAttribPointervARB; +extern glIsProgramARBPROC glIsProgramARB; + +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF + +#endif /* GL_ARB_vertex_program */ + +/*-------------------------------------------------------------------*/ +/*------------GL_EXT_BGRA--------------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 + +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 + +#endif /* GL_EXT_bgra */ + +/*-------------------------------------------------------------------*/ +/*------------EXT_CULL_VERTEX----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 + +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC + +typedef void (APIENTRY * glCullParameterfvEXTPROC) (GLenum pname, GLfloat *params); +typedef void (APIENTRY * glCullParameterdvEXTPROC) (GLenum pname, GLdouble *params); + +extern glCullParameterfvEXTPROC glCullParameterfvEXT; +extern glCullParameterdvEXTPROC glCullParameterdvEXT; + + +#endif /* GL_EXT_cull_vertex */ + +/*-------------------------------------------------------------------*/ +/*------------GL_ATI_POINT_CULL_MODE---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_point_cull_mode +#define GL_ATI_point_cull_mode 1 + +#define GL_POINT_CULL_MODE_ATI 0x60b3 +#define GL_POINT_CULL_CENTER_ATI 0x60b4 +#define GL_POINT_CLIP_ATI 0x60b5 + +#endif /* GL_ATI_point_cull_mode */ + +/*-------------------------------------------------------------------*/ +/*------------GL_BLEND_FUNC_SEPARATE---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 + +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB + +typedef void (APIENTRY * glBlendFuncSeparateEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +extern glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT; + +#endif /* GL_EXT_blend_func_separate */ + +/*-------------------------------------------------------------------*/ +/*------------GL_EXT_SEPARATE_SPECULAR_COLOR-------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 + +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA + +#endif /* GL_EXT_separate_specular_color */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_ELEMENT_ARRAY------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_element_array +#define GL_NV_element_array 1 + +#define GL_ELEMENT_ARRAY_TYPE_NV 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_NV 0x876A + +typedef void (APIENTRY * glElementPointerNVPROC) (GLenum type, const GLvoid *pointer); +typedef void (APIENTRY * glDrawElementArrayNVPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRY * glDrawRangeElementArrayNVPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRY * glMultiDrawElementArrayNVPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void (APIENTRY * glMultiDrawRangeElementArrayNVPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); + +extern glElementPointerNVPROC glElementPointerNV; +extern glDrawElementArrayNVPROC glDrawElementArrayNV; +extern glDrawRangeElementArrayNVPROC glDrawRangeElementArrayNV; +extern glMultiDrawElementArrayNVPROC glMultiDrawElementArrayNV; +extern glMultiDrawRangeElementArrayNVPROC glMultiDrawRangeElementArrayNV; + +#endif /* GL_NV_element_array */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_FLOAT_BUFFER-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 + +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E + +#ifdef _WIN32 +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif /* _WIN32 */ + +#endif /* GL_NV_float_buffer */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_FRAGMENT_PROGRAM---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 + +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 + +typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glProgramNamedParameter4dNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glProgramNamedParameter4fvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat v[]); +typedef void (APIENTRY * glProgramNamedParameter4dvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble v[]); +typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void (APIENTRY * glGetProgramNamedParameterdvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); + +#ifndef GL_ARB_vertex_program +typedef void (APIENTRY * glProgramLocalParameter4dARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY * glProgramLocalParameter4dvARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void (APIENTRY * glProgramLocalParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glProgramLocalParameter4fvARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void (APIENTRY * glGetProgramLocalParameterdvARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void (APIENTRY * glGetProgramLocalParameterfvARBPROC) (GLenum target, GLuint index, GLfloat *params); +#endif /* GL_ARB_vertex_program */ + +extern glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; +extern glProgramNamedParameter4dNVPROC glProgramNamedParameter4dNV; +extern glProgramNamedParameter4fvNVPROC glProgramNamedParameter4fvNV; +extern glProgramNamedParameter4dvNVPROC glProgramNamedParameter4dvNV; +extern glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; +extern glGetProgramNamedParameterdvNVPROC glGetProgramNamedParameterdvNV; + +#ifndef GL_ARB_vertex_program +extern glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB; +extern glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB; +extern glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB; +extern glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB; +extern glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB; +extern glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB; +#endif /* GL_ARB_vertex_program */ + +#endif /* GL_NV_fragment_program */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_PRIMITIVE_RESTART--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 + +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 + +typedef void (APIENTRY * glPrimitiveRestartNVPROC) (); +typedef void (APIENTRY * glPrimitiveRestartIndexNVPROC) (GLuint index); + +extern glPrimitiveRestartNVPROC glPrimitiveRestartNV; +extern glPrimitiveRestartIndexNVPROC glPrimitiveRestartIndexNV; + +#endif /* GL_NV_primitive_restart */ + +/*-------------------------------------------------------------------*/ +/*------------GL_NV_VERTEX_PROGRAM2----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 + +#endif /* GL_NV_vertex_program2 */ + +/*-------------------------------------------------------------------*/ +/*------------GL_ARB_FRAGMENT_PROGRAM--------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program + +#ifndef GL_ARB_vertex_program +#error ARB_vertex_program not defined +#endif + +/* no new entry points, all of ARB_vertex_program reused */ + +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 + +#endif /* GL_ARB_fragment_program */ + +/*-------------------------------------------------------------------*/ +/*------------GL_ATI_TEXT_FRAGMENT_SHADER----------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 + +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 + +#endif /* GL_ATI_text_fragment_shader */ + +/*-------------------------------------------------------------------*/ +/*------------GL_EXT_textzre_env_combine-----------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 + +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A + +#endif /* GL_EXT_texture_env_combine */ + +// added -ec +/*-------------------------------------------------------------------*/ +/*------------GL_EXT_TEXTURE_RECTANGLE-------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_EXT_texture_rectangle +#define GL_EXT_texture_rectangle 1 + +#define GL_TEXTURE_RECTANGLE_EXT 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8 + +#endif /* GL_EXT_texture_rectangle */ + +// added -ec +/*-------------------------------------------------------------------*/ +/*------------GL_ATI_texture_float-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 + +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F + +#endif /* GL_ATI_texture_float */ + +// added -ec +/*-------------------------------------------------------------------*/ +/*------------GL_ATI_draw_buffers------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +// +// requires GL_ARB_fragment_program +// + +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 + +typedef void (APIENTRY * PFNGLDRAWBUFFERS) (GLsizei n, const GLenum *bufs); + +extern PFNGLDRAWBUFFERS glDrawBuffersATI; + +#endif /* GL_ATI_draw_buffers */ + +// added -ec +/*-------------------------------------------------------------------*/ +/*------------GL_ATI_pixel_format_float------------------------------*/ +/*-------------------------------------------------------------------*/ +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float + +#define WGL_RGBA_FLOAT_MODE_ATI 0x8820 +#define WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 + +#endif /* WGL_ATI_pixel_format_float */ + +/*-------------------------------------------------------------------*/ +/*------------END GL EXTENSIONS--------------------------------------*/ +/*-------------------------------------------------------------------*/ + +/*-------------------------------------------------------------------*/ +/*------------WGL EXTENSIONS HERE------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifdef _WIN32 + +/*-------------------------------------------------------------------*/ +/*------------WGL_EXT_EXTENSION_STRING-------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 + +typedef const char* (APIENTRY * wglGetExtensionsStringEXTPROC) (); + +extern wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT; + +#endif /* WGL_EXT_extensions_string */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_BUFFER_REGION----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 + + +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 + +typedef HANDLE (APIENTRY * wglCreateBufferRegionARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (APIENTRY * wglDeleteBufferRegionARBPROC) (HANDLE hRegion); +typedef BOOL (APIENTRY * wglSaveBufferRegionARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (APIENTRY * wglRestoreBufferRegionARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); + +extern wglCreateBufferRegionARBPROC wglCreateBufferRegionARB; +extern wglDeleteBufferRegionARBPROC wglDeleteBufferRegionARB; +extern wglSaveBufferRegionARBPROC wglSaveBufferRegionARB; +extern wglRestoreBufferRegionARBPROC wglRestoreBufferRegionARB; + +#endif /* WGL_ARB_buffer_region */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_EXTENSION_STRING-------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 + +typedef const char* (APIENTRY * wglGetExtensionsStringARBPROC) (HDC hdc); + +extern wglGetExtensionsStringARBPROC wglGetExtensionsStringARB; + +#endif /* WGL_ARB_extensions_string */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_PBUFFER----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 + +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 + +DECLARE_HANDLE(HPBUFFERARB); + +typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (APIENTRY * wglGetPbufferDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (APIENTRY * wglReleasePbufferDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (APIENTRY * wglDestroyPbufferARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (APIENTRY * wglQueryPbufferARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); + +extern wglCreatePbufferARBPROC wglCreatePbufferARB; +extern wglGetPbufferDCARBPROC wglGetPbufferDCARB; +extern wglReleasePbufferDCARBPROC wglReleasePbufferDCARB; +extern wglDestroyPbufferARBPROC wglDestroyPbufferARB; +extern wglQueryPbufferARBPROC wglQueryPbufferARB; + +#endif /* WGL_ARB_pbuffer */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_PIXEL_FORMAT-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 + +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C + +typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (APIENTRY * wglChoosePixelFormatARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); + +extern wglGetPixelFormatAttribivARBPROC wglGetPixelFormatAttribivARB; +extern wglGetPixelFormatAttribfvARBPROC wglGetPixelFormatAttribfvARB; +extern wglChoosePixelFormatARBPROC wglChoosePixelFormatARB; + +#endif /* WGL_ARB_pixel_format */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_RENDER_TEXTURE---------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 + +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 + +typedef BOOL (APIENTRY * wglBindTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRY * wglReleaseTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRY * wglSetPbufferAttribARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); + +extern wglBindTexImageARBPROC wglBindTexImageARB; +extern wglReleaseTexImageARBPROC wglReleaseTexImageARB; +extern wglSetPbufferAttribARBPROC wglSetPbufferAttribARB; + +#endif /*WGL_ARB_render_texture */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_EXT_SWAP_CONTROL-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 + +typedef BOOL (APIENTRY * wglSwapIntervalEXTPROC) (int interval); +typedef int (APIENTRY * wglGetSwapIntervalEXTPROC) (void); + +extern wglSwapIntervalEXTPROC wglSwapIntervalEXT; +extern wglGetSwapIntervalEXTPROC wglGetSwapIntervalEXT; + +#endif /* WGL_EXT_swap_control */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_MAKE_CURRENT_READ------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 + +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 + +typedef BOOL (APIENTRY * wglMakeContextCurrentARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (APIENTRY * wglGetCurrentReadDCARBPROC) (void); + +extern wglMakeContextCurrentARBPROC wglMakeContextCurrentARB; +extern wglGetCurrentReadDCARBPROC wglGetCurrentReadDCARB; + +#endif /* WGL_ARB_make_current_read */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_MULTISAMPLE------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 + +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 + +#endif /* WGL_ARB_multisample */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_NV_RENDER_DEPTH_TEXTURE----------------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 + +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 + +#endif /* WGL_NV_render_depth_texture */ + +/*-------------------------------------------------------------------*/ +/*------------WGL_NV_RENDER_TEXTURE_RECTANGLE-----------------------*/ +/*-------------------------------------------------------------------*/ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 + +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 + +#endif /* WGL_NV_render_texture_rectangle */ + +/*-------------------------------------------------------------------*/ +/*------------END WGL EXTENSIONS-------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#endif /* WIN32 */ + +/* helper stuff */ + +/* I use int here because C does not know bool */ + +#ifdef _WIN32 + +struct WGLExtensionTypes +{ + int ARB_buffer_region; + int ARB_extensions_string; + int ARB_make_current_read; + int ARB_multisample; + int ARB_pbuffer; + int ARB_pixel_format; + int ARB_render_texture; + int EXT_extensions_string; + int EXT_swap_control; + int NV_render_depth_texture; + int NV_render_texture_rectangle; + int ATI_pixel_format_float; +}; + +#else /* No WIN32 */ + +struct GLXExtensionTypes +{ + +}; + +#endif /* WIN32 */ + +struct ExtensionTypes +{ +#ifdef _WIN32 /* WGL extensions */ + struct WGLExtensionTypes wgl; +#else /* no WIN32 */ + struct GLXExtensionTypes glx; +#endif /* WIN32 */ + int ARB_imaging; + int ARB_depth_texture; + int ARB_fragment_program; + int ARB_matrix_palette; + int ARB_multisample; + int ARB_multitexture; + int ARB_point_parameters; + int ARB_shadow; + int ARB_shadow_ambient; + int ARB_texture_border_clamp; + int ARB_texture_compression; + int ARB_texture_cube_map; + int ARB_texture_env_add; + int ARB_texture_env_dot3; + int ARB_texture_env_combine; + int ARB_texture_env_crossbar; + int ARB_texture_mirrored_repeat; + int ARB_transpose_matrix; + int ARB_vertex_blend; + int ARB_vertex_program; + int ARB_window_pos; + int EXT_abgr; + int EXT_bgra; + int EXT_blend_func_separate; + int EXT_compiled_vertex_array; + int EXT_cull_vertex; + int EXT_fog_coord; + int EXT_multi_draw_arrays; + int EXT_point_parameters; + int EXT_secondary_color; + int EXT_separate_specular_color; + int EXT_shadow_funcs; + int EXT_stencil_two_side; + int EXT_stencil_wrap; + int EXT_texture_compression_s3tc; + int EXT_texture_env_combine; + int EXT_texture_filter_anisotropic; + int EXT_texture_lod_bias; + int EXT_texture_rectangle; // added -ec + int EXT_vertex_shader; + int EXT_vertex_weighting; + int EXT_draw_range_elements; + int ATI_draw_buffers; // added -ec + int ATI_element_array; + int ATI_envmap_bumpmap; + int ATI_fragment_shader; + int ATI_pn_triangles; + int ATI_point_cull_mode; + int ATI_text_fragment_shader; + int ATI_texture_float; // added -ec + int ATI_texture_mirror_once; + int ATI_vertex_array_object; + int ATI_vertex_streams; + int ATIX_point_sprites; + int ATIX_texture_env_route; + int HP_occlusion_test; + int NV_blend_square; + int NV_copy_depth_to_color; + int NV_depth_clamp; + int NV_element_array; + int NV_evaluators; + int NV_fence; + int NV_float_buffer; + int NV_fog_distance; + int NV_fragment_program; + int NV_light_max_exponent; + int NV_occlusion_query; + int NV_packed_depth_stencil; + int NV_point_sprite; + int NV_primitive_restart; + int NV_register_combiners; + int NV_register_combiners2; + int NV_texgen_reflection; + int NV_texture_env_combine4; + int NV_texture_rectangle; + int NV_texture_shader; + int NV_texture_shader2; + int NV_texture_shader3; + int NV_vertex_array_range; + int NV_vertex_array_range2; + int NV_vertex_program; + int NV_vertex_program1_1; + int NV_vertex_program2; + int SGIS_generate_mipmap; + int SGIX_shadow; + int SGIX_depth_texture; + int OpenGL12; + int OpenGL13; + int OpenGL14; +}; + +extern struct ExtensionTypes extgl_Extensions; + +extern struct ExtensionTypes SupportedExtensions; /* deprecated, please do not use */ + +/* initializes everything, call this right after the rc is created. the function returns 0 if successful */ +LIB_RENDERING_EXPORT +int extgl_Initialize(); + +LIB_RENDERING_EXPORT +int glInitialize(); /* deprecated, please do not use */ + +#ifdef __cplusplus +} +#endif + +#endif /* __EXTGL_H__ */ diff --git a/extern/freestyle/src/rendering/pbuffer.cpp b/extern/freestyle/src/rendering/pbuffer.cpp new file mode 100755 index 00000000000..ec73fc52ae4 --- /dev/null +++ b/extern/freestyle/src/rendering/pbuffer.cpp @@ -0,0 +1,292 @@ +#include + +#include + +#define MAX_PFORMATS 256 +#define MAX_ATTRIBS 32 +#define PBUFFER_AS_TEXTURE 2048 + +//************************************************************ +// Implementation of PBuffer +//************************************************************ +/*! + * Creates a PBuffer of size \p w by \p h, eith mode \p mode. + */ +PBuffer::PBuffer(const unsigned int w, + const unsigned int h, + const int format) + : format_(format), + sharedContext_(false), + sharedLists_(false), + display_(NULL), + glxPbuffer_(0), + glxContext_(0), + width_(w), + height_(h) +{ +} +/*! + * Initialize the pbuffer. If \p shareContext is true, then the currently + * active context with be shared by the pbuffer, meaning for example that + * textures objects or display lists of the currently active GL context will + * be available to the pbuffer. If you want it to be the case just for + * display lists, set \p sharedContext to false and \p shareLists to true. + * + * This function is outside of the constructor for several reasons. First it + * might raise exceptions so it cannot be done in the constructor. Secondly, + * it is using the current context for sharing so you might want to create + * the pbuffer at a moment where this context is not yet active, and then + * initialise it once the context has been created and activated. + * + * Return false if creation failed. + */ +bool +PBuffer::create(const bool shareContext, const bool shareLists) +{ + // Set display and screen + Display *pDisplay = glXGetCurrentDisplay(); + if (pDisplay == NULL) + { + pDisplay = XOpenDisplay(NULL); + } + int iScreen = DefaultScreen(pDisplay); + GLXContext glxContext = glXGetCurrentContext(); + + GLXFBConfig *glxConfig; + int iConfigCount; + + sharedContext_ = shareContext; + sharedLists_ = shareLists; + + if (sharedContext_) + { + glxConfig = glXGetFBConfigs(pDisplay, iScreen, &iConfigCount); + if (!glxConfig) + { +// "pbuffer creation error: glXGetFBConfigs() failed" + return false; + } + } + else + { + int iAttributes[2*MAX_ATTRIBS]; + int curAttrib = 0; + + memset(iAttributes, 0, 2*MAX_ATTRIBS*sizeof(int)); + + iAttributes[2*curAttrib ] = GLX_DRAWABLE_TYPE; + iAttributes[2*curAttrib+1] = GLX_PBUFFER_BIT; + curAttrib++; + + if (format_ & ColorIndex) + { + iAttributes[2*curAttrib ] = GLX_RENDER_TYPE; + iAttributes[2*curAttrib+1] = GLX_COLOR_INDEX_BIT; + curAttrib++; + } + else + { + iAttributes[2*curAttrib ] = GLX_RENDER_TYPE; + iAttributes[2*curAttrib+1] = GLX_RGBA_BIT; + iAttributes[2*curAttrib ] = GLX_ALPHA_SIZE; + iAttributes[2*curAttrib+1] = 8; + curAttrib++; + } + + if (format_ & DoubleBuffer) + { + iAttributes[2*curAttrib ] = GLX_DOUBLEBUFFER; + iAttributes[2*curAttrib+1] = true; + curAttrib++; + } + else + { + iAttributes[2*curAttrib ] = GLX_DOUBLEBUFFER; + iAttributes[2*curAttrib+1] = false; + curAttrib++; + } + if (format_ & DepthBuffer) + { + iAttributes[2*curAttrib ] = GLX_DEPTH_SIZE; + iAttributes[2*curAttrib+1] = 1; + curAttrib++; + } + else + { + iAttributes[2*curAttrib ] = GLX_DEPTH_SIZE; + iAttributes[2*curAttrib+1] = 0; + curAttrib++; + } + + if (format_ & StencilBuffer) + { + iAttributes[2*curAttrib ] = GLX_STENCIL_SIZE; + iAttributes[2*curAttrib+1] = 1; + curAttrib++; + } + else + { + iAttributes[2*curAttrib ] = GLX_STENCIL_SIZE; + iAttributes[2*curAttrib+1] = 0; + curAttrib++; + } + + iAttributes[2*curAttrib ] = None; + + glxConfig = glXChooseFBConfigSGIX(pDisplay, iScreen, iAttributes, &iConfigCount); + if (!glxConfig) + { + // "pbuffer creation error: glXChooseFBConfig() failed" + return false; + } + } + + int attributes[5]; + int iCurAttrib = 0; + + memset(attributes, 0, 5*sizeof(int)); + + attributes[2*iCurAttrib ] = GLX_LARGEST_PBUFFER; + attributes[2*iCurAttrib+1] = true; + iCurAttrib++; + + attributes[2*iCurAttrib ] = GLX_PRESERVED_CONTENTS; + attributes[2*iCurAttrib+1] = true; + iCurAttrib++; + + attributes[2*iCurAttrib ] = None; + + glxPbuffer_ = glXCreateGLXPbufferSGIX(pDisplay, glxConfig[0], + width_, height_, attributes); + + if (!glxPbuffer_) + { + // "pbuffer creation error: glXCreatePbuffer() failed" + return false; + } + + if (sharedContext_) + { + glxContext_ = glxContext; + } + else + { + if (format_ & ColorIndex) + { + if (sharedLists_) + glxContext_ = glXCreateContextWithConfigSGIX(pDisplay, + glxConfig[0], + GLX_COLOR_INDEX_TYPE, + glxContext, true); + else + glxContext_ = glXCreateContextWithConfigSGIX(pDisplay, + glxConfig[0], + GLX_COLOR_INDEX_TYPE, + NULL, true); + } + else + { + if (sharedLists_) + glxContext_ = glXCreateContextWithConfigSGIX(pDisplay, + glxConfig[0], + GLX_RGBA_TYPE, + glxContext, true); + else + glxContext_ = glXCreateContextWithConfigSGIX(pDisplay, + glxConfig[0], + GLX_RGBA_TYPE, + NULL, true); + } + + if (!glxConfig) + { + // "pbuffer creation error: glXCreateNewContext() failed" + return false; + } + } + + display_ = pDisplay; + + glXQueryGLXPbufferSGIX(display_, glxPbuffer_, GLX_WIDTH, &width_); + glXQueryGLXPbufferSGIX(display_, glxPbuffer_, GLX_HEIGHT, &height_); + + return true; +} +/*! + * Destroy the pbuffer + */ +PBuffer::~PBuffer() +{ + if (glxPbuffer_) + { + glXDestroyGLXPbufferSGIX(display_, glxPbuffer_); + } +} +/*! + * Activate the pbuffer as the current GL context. All subsequents GL + * commands will now affect the pbuffer. If you want to push/pop the current + * OpenGL context use subclass PBufferEx instead. + * + * Return false if it failed. + */ +bool +PBuffer::makeCurrent() +{ + return glXMakeCurrent(display_, glxPbuffer_, glxContext_); +} +/*! + * Return the width of the pbuffer + */ +unsigned int +PBuffer::width() const +{ + return width_; +} +/*! + * Return the height of the pbuffer + */ +unsigned int +PBuffer::height() const +{ + return height_; +} +//************************************************************ +// Implementation of PBufferEx +//************************************************************ +PBufferEx::PBufferEx(const unsigned int width, + const unsigned int height, + const int mode) + : PBuffer(width, height, mode), + oldDisplay_(NULL), + glxOldDrawable_(0), + glxOldContext_(0) +{ +} +/*! + * Activate the pbuffer as the current GL context. All subsequents GL + * commands will now affect the pbuffer. Once you are done with you GL + * commands, you can call endCurrent() to restore the context that was active + * when you call makeCurrent(). + * + * Return false if it failed. + */ +bool +PBufferEx::makeCurrent() +{ + oldDisplay_ = glXGetCurrentDisplay(); + glxOldDrawable_ = glXGetCurrentDrawable(); + glxOldContext_ = glXGetCurrentContext(); + + return PBuffer::makeCurrent(); +} +/*! + * Restore the GL context that was active when makeCurrent() was called. + * + * Return false if it failed. + */ +bool +PBufferEx::endCurrent() +{ + return glXMakeCurrent(oldDisplay_, glxOldDrawable_, glxOldContext_); +} + diff --git a/extern/freestyle/src/rendering/pbuffer.h b/extern/freestyle/src/rendering/pbuffer.h new file mode 100755 index 00000000000..7f11f461b1c --- /dev/null +++ b/extern/freestyle/src/rendering/pbuffer.h @@ -0,0 +1,77 @@ +#ifndef PBUFFERS_H +#define PBUFFERS_H + +#ifndef WIN32 +# ifdef __MACH__ +# include +# else +# include +# include +# endif + +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Interface of PBuffer +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +class PBuffer +{ +public: + enum FormatOption + { + DoubleBuffer = 0x0001, + DepthBuffer = 0x0002, + Rgba = 0x0004, + StencilBuffer = 0x0020, + SingleBuffer = DoubleBuffer << 16, + NoDepthBuffer = DepthBuffer << 16, + ColorIndex = Rgba << 16, + NoStencilBuffer = StencilBuffer << 16, + }; + + PBuffer(const unsigned int width, + const unsigned int height, + int format); + bool create(const bool shareContext = false, + const bool shareLists = false); + virtual ~PBuffer(); + + virtual bool makeCurrent(); + unsigned int width() const; + unsigned int height() const; +protected: + ///! Flags indicating the type of pbuffer. + int format_; + ///! Flag indicating if the rendering context is shared with another context. + bool sharedContext_; + //! Flag indicating if display lists should be shared between rendering + // contexts.(If the rendering context is shared (default), then display + // lists are automatically shared). + bool sharedLists_; + Display* display_; + GLXPbuffer glxPbuffer_; + GLXContext glxContext_; + unsigned int width_; + unsigned int height_; +}; +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Interface of PBufferEx +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +/*! + * pbuffer layer to keep previous pbuffer states. + */ +class PBufferEx : public PBuffer +{ +public: + PBufferEx(const unsigned int width, + const unsigned int height, + const int mode ); + virtual bool makeCurrent(); + bool endCurrent(); +private: + Display* oldDisplay_; + GLXDrawable glxOldDrawable_; + GLXContext glxOldContext_; + int vp[4]; +}; + +#endif //PBUFFERS_H +#endif //WIN32 diff --git a/extern/freestyle/src/rendering/rendering.pro b/extern/freestyle/src/rendering/rendering.pro new file mode 100755 index 00000000000..0bbca195b6b --- /dev/null +++ b/extern/freestyle/src/rendering/rendering.pro @@ -0,0 +1,102 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_RENDERING} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= opengl glut dll + +exists (../libconfig.pri) { + include (../libconfig.pri) +} + +# +# DEFINES +# +####################################### + +#DEFINES *= ROOT_DIR=\"$(FREESTYLE_DIR)\" +win32:DEFINES *= MAKE_LIB_RENDERING_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../scene_graph ../winged_edge ../view_map ../geometry \ +# ../stroke ../system ../image + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# LIBS +# +####################################### + +win32:LIBS *= $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SCENE_GRAPH}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_WINGED_EDGE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_VIEW_MAP}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_STROKE}$${LIBVERSION}.lib + +!win32 { + lib_bundle { + LIBS += -F$${DESTDIR} -framework $${LIB_GEOMETRY} \ + -framework $${LIB_IMAGE} -framework $${LIB_SCENE_GRAPH} \ + -framework $${LIB_SYSTEM} -framework $${LIB_WINGED_EDGE} \ + -framework $${LIB_VIEW_MAP} -framework $${LIB_STROKE} + } else { + LIBS *= -L$${DESTDIR} -l$${LIB_GEOMETRY} -l$${LIB_IMAGE} -l$${LIB_SCENE_GRAPH} \ + -l$${LIB_SYSTEM} -l$${LIB_WINGED_EDGE} -l$${LIB_VIEW_MAP} -l$${LIB_STROKE} + } + } +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} + + +# +# DEFINES +# +####################################### +!win32: DEFINES += GLX_GLXEXT_PROTOTYPES diff --git a/extern/freestyle/src/rendering/src.pri b/extern/freestyle/src/rendering/src.pri new file mode 100755 index 00000000000..aee4cdb2782 --- /dev/null +++ b/extern/freestyle/src/rendering/src.pri @@ -0,0 +1,33 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +RENDERING_DIR = ../rendering + +SOURCES *= $${RENDERING_DIR}/GLBBoxRenderer.cpp \ + $${RENDERING_DIR}/GLDebugRenderer.cpp \ + $${RENDERING_DIR}/GLFreeMemoryVisitor.cpp \ + $${RENDERING_DIR}/GLMonoColorRenderer.cpp \ + $${RENDERING_DIR}/GLRenderer.cpp \ + $${RENDERING_DIR}/GLSelectRenderer.cpp \ + $${RENDERING_DIR}/GLStrokeRenderer.cpp \ + $${RENDERING_DIR}/GLUtils.cpp + +win32:SOURCES *= $${RENDERING_DIR}/extgl.cpp + +#!win32:SOURCES *= $${RENDERING_DIR}/pbuffer.cpp + +HEADERS *= $${RENDERING_DIR}/GLBBoxRenderer.h \ + $${RENDERING_DIR}/GLDebugRenderer.h \ + $${RENDERING_DIR}/GLFreeMemoryVisitor.h \ + $${RENDERING_DIR}/GLMonoColorRenderer.h \ + $${RENDERING_DIR}/GLRenderer.h \ + $${RENDERING_DIR}/GLSelectRenderer.h \ + $${RENDERING_DIR}/GLStrokeRenderer.h \ + $${RENDERING_DIR}/GLUtils.h + +win32:HEADERS *= $${RENDERING_DIR}/extgl.h + +#!win32:HEADERS *= $${RENDERING_DIR}/pbuffer.h + diff --git a/extern/freestyle/src/scene_graph/DrawingStyle.h b/extern/freestyle/src/scene_graph/DrawingStyle.h new file mode 100755 index 00000000000..e2be6fa8264 --- /dev/null +++ b/extern/freestyle/src/scene_graph/DrawingStyle.h @@ -0,0 +1,82 @@ +// +// Filename : DrawingStyle.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the drawing style of a node +// Date of creation : 10/10/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef DRAWINGSTYLE_H +# define DRAWINGSTYLE_H + +class DrawingStyle +{ +public: + enum STYLE + {FILLED, LINES, POINTS, INVISIBLE}; + + inline DrawingStyle() {Style = FILLED; LineWidth = 2.f; PointSize = 2.f; LightingEnabled = true;} + inline explicit DrawingStyle(const DrawingStyle& iBrother); + + virtual ~DrawingStyle() {} + + /*! operators */ + inline DrawingStyle& operator=(const DrawingStyle& ds); + + inline void SetStyle(const STYLE iStyle) {Style = iStyle;} + inline void SetLineWidth(const float iLineWidth) {LineWidth = iLineWidth;} + inline void SetPointSize(const float iPointSize) {PointSize = iPointSize;} + inline void SetLightingEnabled(const bool on) {LightingEnabled = on;} + + inline STYLE style() const {return Style;} + inline float lineWidth() const {return LineWidth;} + inline float pointSize() const {return PointSize;} + inline bool lightingEnabled() const {return LightingEnabled;} + +private: + STYLE Style; + float LineWidth; + float PointSize; + bool LightingEnabled; +}; + +DrawingStyle::DrawingStyle(const DrawingStyle& iBrother) +{ + Style = iBrother.Style; + LineWidth = iBrother.LineWidth; + PointSize = iBrother.PointSize; + LightingEnabled = iBrother.LightingEnabled; +} + +DrawingStyle& DrawingStyle::operator=(const DrawingStyle& ds) +{ + Style = ds.Style; + LineWidth = ds.LineWidth; + PointSize = ds.PointSize; + LightingEnabled = ds.LightingEnabled; + + return *this; +} + +#endif // DRAWINGSTYLE_H diff --git a/extern/freestyle/src/scene_graph/IndexedFaceSet.cpp b/extern/freestyle/src/scene_graph/IndexedFaceSet.cpp new file mode 100755 index 00000000000..ec3d3ad748c --- /dev/null +++ b/extern/freestyle/src/scene_graph/IndexedFaceSet.cpp @@ -0,0 +1,321 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "IndexedFaceSet.h" + +IndexedFaceSet::IndexedFaceSet() +: Rep() +{ + _Vertices = NULL; + _Normals = NULL; + _Materials = 0; + _TexCoords = 0; + _VSize = 0; + _NSize = 0; + _MSize = 0; + _TSize = 0; + _NumFaces = 0; + _NumVertexPerFace = NULL; + _FaceStyle = NULL; + _VIndices = NULL; + _VISize = 0; + _NIndices = NULL; + _NISize = 0; + _MIndices = NULL; + _MISize = 0; + _TIndices = NULL; + _TISize = 0; + _displayList = 0; +} + +IndexedFaceSet::IndexedFaceSet( real *iVertices, unsigned iVSize, + real *iNormals, unsigned iNSize, + Material **iMaterials, unsigned iMSize, + real *iTexCoords, unsigned iTSize, + unsigned iNumFaces, unsigned *iNumVertexPerFace, TRIANGLES_STYLE *iFaceStyle, + unsigned *iVIndices, unsigned iVISize, + unsigned *iNIndices, unsigned iNISize, + unsigned *iMIndices, unsigned iMISize, + unsigned *iTIndices, unsigned iTISize, + unsigned iCopy) + : Rep() +{ + if(1 == iCopy) + { + _VSize = iVSize; + _Vertices = new real[_VSize]; + memcpy(_Vertices, iVertices, iVSize*sizeof(real)); + + _NSize = iNSize; + _Normals = new real[_NSize]; + memcpy(_Normals, iNormals, iNSize*sizeof(real)); + + _MSize = iMSize; + _Materials = 0; + if(iMaterials){ + _Materials = new Material*[_MSize]; + for(unsigned i=0; i<_MSize; ++i) + _Materials[i] = new Material(*(iMaterials[i])); + } + _TSize = iTSize; + _TexCoords = 0; + if(_TSize){ + _TexCoords = new real[_TSize]; + memcpy(_TexCoords, iTexCoords, iTSize*sizeof(real)); + } + + _NumFaces = iNumFaces; + _NumVertexPerFace = new unsigned[_NumFaces]; + memcpy(_NumVertexPerFace, iNumVertexPerFace, _NumFaces*sizeof(unsigned)); + + _FaceStyle = new TRIANGLES_STYLE[_NumFaces]; + memcpy(_FaceStyle, iFaceStyle, _NumFaces*sizeof(TRIANGLES_STYLE)); + + _VISize = iVISize; + _VIndices = new unsigned[_VISize]; + memcpy(_VIndices, iVIndices, _VISize*sizeof(unsigned)); + + _NISize = iNISize; + _NIndices = new unsigned[_NISize]; + memcpy(_NIndices, iNIndices, _NISize*sizeof(unsigned)); + + _MISize = iMISize; + _MIndices = 0; + if(iMIndices){ + _MIndices = new unsigned[_MISize]; + memcpy(_MIndices, iMIndices, _MISize*sizeof(unsigned)); + } + _TISize = iTISize; + _TIndices = 0; + if(_TISize){ + _TIndices = new unsigned[_TISize]; + memcpy(_TIndices, iTIndices, _TISize*sizeof(unsigned)); + } + } + else + { + _VSize = iVSize; + _Vertices = iVertices; + + _NSize = iNSize; + _Normals = iNormals; + + _MSize = iMSize; + _Materials = 0; + if(iMaterials) + _Materials = iMaterials; + + _TSize = iTSize; + _TexCoords = iTexCoords; + + _NumFaces = iNumFaces; + _NumVertexPerFace = iNumVertexPerFace; + _FaceStyle = iFaceStyle; + + _VISize = iVISize; + _VIndices = iVIndices; + + _NISize = iNISize; + _NIndices = iNIndices; + + _MISize = iMISize; + _MIndices = 0; + if(iMISize) + _MIndices = iMIndices; + + _TISize = iTISize; + _TIndices = iTIndices; + } + + _displayList = 0; +} + +IndexedFaceSet::IndexedFaceSet( const IndexedFaceSet& iBrother) +:Rep(iBrother) +{ + _VSize = iBrother.vsize(); + _Vertices = new real[_VSize]; + memcpy(_Vertices, iBrother.vertices(), _VSize*sizeof(real)); + + _NSize = iBrother.nsize(); + _Normals = new real[_NSize]; + memcpy(_Normals, iBrother.normals(), _NSize*sizeof(real)); + + _MSize = iBrother.msize(); + if(_MSize){ + _Materials = new Material*[_MSize]; + for(unsigned i=0; i<_MSize; ++i){ + _Materials[i] = new Material(*(iBrother._Materials[i])); + } + }else{ + _Materials = 0; + } + + _TSize = iBrother.tsize(); + _TexCoords = 0; + if(_TSize){ + _TexCoords = new real[_TSize]; + memcpy(_TexCoords, iBrother.texCoords(), _TSize*sizeof(real)); + } + + _NumFaces = iBrother.numFaces(); + _NumVertexPerFace = new unsigned[_NumFaces]; + memcpy(_NumVertexPerFace, iBrother.numVertexPerFaces(), _NumFaces*sizeof(unsigned)); + + _FaceStyle = new TRIANGLES_STYLE[_NumFaces]; + memcpy(_FaceStyle, iBrother.trianglesStyle(), _NumFaces*sizeof(TRIANGLES_STYLE)); + + _VISize = iBrother.visize(); + _VIndices = new unsigned[_VISize]; + memcpy(_VIndices, iBrother.vindices(), _VISize*sizeof(unsigned)); + + _NISize = iBrother.nisize(); + _NIndices = new unsigned[_NISize]; + memcpy(_NIndices, iBrother.nindices(), _NISize*sizeof(unsigned)); + + _MISize = iBrother.misize(); + if(_MISize){ + _MIndices = new unsigned[_MISize]; + memcpy(_MIndices, iBrother.mindices(), _MISize*sizeof(unsigned)); + }else{ + _MIndices=0; + } + + _TISize = iBrother.tisize(); + _TIndices = 0; + if(_TISize){ + _TIndices = new unsigned[_TISize]; + memcpy(_TIndices, iBrother.tindices(), _TISize*sizeof(unsigned)); + } + + _displayList = 0; +} + +IndexedFaceSet::~IndexedFaceSet() +{ + if(NULL != _Vertices) + { + delete [] _Vertices; + _Vertices = NULL; + } + + if(NULL != _Normals) + { + delete [] _Normals; + _Normals = NULL; + } + + if(NULL != _Materials) + { + for(unsigned i=0; i<_MSize; ++i) + delete _Materials[i]; + delete [] _Materials; + _Materials = NULL; + } + + if(NULL != _TexCoords) + { + delete [] _TexCoords; + _TexCoords = NULL; + } + + if(NULL != _NumVertexPerFace) + { + delete [] _NumVertexPerFace; + _NumVertexPerFace = NULL; + } + + if(NULL != _FaceStyle) + { + delete [] _FaceStyle; + _FaceStyle = NULL; + } + + if(NULL != _VIndices) + { + delete [] _VIndices; + _VIndices = NULL; + } + + if(NULL != _NIndices) + { + delete [] _NIndices; + _NIndices = NULL; + } + + if(NULL != _MIndices) + { + delete [] _MIndices; + _MIndices = NULL; + } + if(NULL != _TIndices) + { + delete [] _TIndices; + _TIndices = NULL; + } + // should find a way to deallocates the displayList + // glDeleteLists(GLuint list, GLSizei range) + _displayList = 0; +} + +void IndexedFaceSet::accept(SceneVisitor& v) { + Rep::accept(v); + v.visitIndexedFaceSet(*this); +} + +void IndexedFaceSet::ComputeBBox() +{ + real XMax = _Vertices[0]; + real YMax = _Vertices[1]; + real ZMax = _Vertices[2]; + + real XMin = _Vertices[0]; + real YMin = _Vertices[1]; + real ZMin = _Vertices[2]; + + // parse all the coordinates to find + // the Xmax, YMax, ZMax + real *v = _Vertices; + + for(unsigned i=0; i<_VSize/3; i++) + { + // X + if(*v > XMax) + XMax = *v; + if(*v < XMin) + XMin = *v; + v++; + + if(*v > YMax) + YMax = *v; + if(*v < YMin) + YMin = *v; + v++; + + if(*v > ZMax) + ZMax = *v; + if(*v < ZMin) + ZMin = *v; + v++; + } + + SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); +} diff --git a/extern/freestyle/src/scene_graph/IndexedFaceSet.h b/extern/freestyle/src/scene_graph/IndexedFaceSet.h new file mode 100755 index 00000000000..c6951942dbb --- /dev/null +++ b/extern/freestyle/src/scene_graph/IndexedFaceSet.h @@ -0,0 +1,222 @@ +// +// Filename : IndexedFaceSet.h +// Author(s) : Stephane Grabli +// Purpose : A Set of indexed faces to represent a surfacic object +// Date of creation : 22/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef INDEXEDFACESET_H +# define INDEXEDFACESET_H + +# include +# include + +//! inherits from class Rep +# include "Rep.h" + +# include "../system/FreestyleConfig.h" + +class LIB_SCENE_GRAPH_EXPORT IndexedFaceSet : public Rep + { +public: + + /*! Triangles description style:*/ + enum TRIANGLES_STYLE{TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES}; + + /*! Builds an empty indexed face set + */ + IndexedFaceSet(); + /*! Builds an indexed face set + iVertices + The array of object vertices 3D coordinates (for all faces). + If iCopy != 0, the array is copied; you must desallocate iVertices. Else you must not. + iVSize + The size of iVertices (must be a multiple of 3) + iNormals + The array of object normals 3D coordinates. + If iCopy != 0, the array is copied; you must desallocate iNormals. Else you must not. + iNSize + The size of iNormals + iMaterials + The array of materials + iMSize + The size of iMaterials + iTexCoords + The array of texture coordinates. + iTSize + The size of iTexCoords (must be multiple of 2) + iNumFaces + The number of faces + iNumVertexPerFace + Array containing the number of vertices per face. + iFaceStyle + Array containing the description style of each faces. + The style belongs to: + - TRIANGLE_STRIP: the face indices describe a triangle strip + - TRIANGLE_FAN : the face indices describe a triangle fan + - TRIANGLES : the face indices describe single triangles + If iCopy != 0, the array is copied; you must desallocate iFaceStyle. Else you must not. + iVIndices, + Array of vertices indices. + The integers contained in this array must be multiple of 3. + If iCopy != 0, the array is copied; you must desallocate iVIndices. Else you must not. + iVISize + The size of iVIndices. + iNIndices + Array of normals indices. + The integers contained in this array must be multiple of 3. + If iCopy != 0, the array is copied; you must desallocate iNIndices. Else you must not. + iNISize + The size of iNIndices + iMIndices + The Material indices (per vertex) + iMISize + The size of iMIndices + iTIndices + The Texture coordinates indices (per vertex). The integers contained in this array must be multiple of 2. + iTISize + The size of iMIndices + iCopy + 0 : the arrays are not copied. The pointers passed as arguments are used. + IndexedFaceSet takes these arrays desallocation in charge. + 1 : the arrays are copied. The caller is in charge of the arrays, passed + as arguments desallocation. + */ + IndexedFaceSet( real *iVertices, unsigned iVSize, + real *iNormals, unsigned iNSize, + Material **iMaterials, unsigned iMSize, + real *iTexCoords, unsigned iTSize, + unsigned iNumFaces, unsigned *iNumVertexPerFace, TRIANGLES_STYLE *iFaceStyle, + unsigned *iVIndices, unsigned iVISize, + unsigned *iNIndices, unsigned iNISize, + unsigned *iMIndices, unsigned iMISize, + unsigned *iTIndices, unsigned iTISize, + unsigned iCopy = 1 + ); + + /*! Builds an indexed face set from an other indexed face set */ + IndexedFaceSet(const IndexedFaceSet& iBrother); + + void swap(IndexedFaceSet& ioOther){ + std::swap(_Vertices, ioOther._Vertices); + std::swap(_Normals, ioOther._Normals); + std::swap(_Materials, ioOther._Materials); + std::swap(_TexCoords, ioOther._TexCoords); + + std::swap(_VSize, ioOther._VSize); + std::swap(_NSize, ioOther._NSize); + std::swap(_MSize, ioOther._MSize); + std::swap(_TSize, ioOther._TSize); + + std::swap(_NumFaces, ioOther._NumFaces); + std::swap(_NumVertexPerFace, ioOther._NumVertexPerFace); + std::swap(_FaceStyle, ioOther._FaceStyle); + + std::swap(_VIndices, ioOther._VIndices); + std::swap(_NIndices, ioOther._NIndices); + std::swap(_MIndices, ioOther._MIndices); // Material Indices + std::swap(_TIndices, ioOther._TIndices); + + std::swap(_VISize, ioOther._VISize); + std::swap(_NISize, ioOther._NISize); + std::swap(_MISize, ioOther._MISize); + std::swap(_TISize, ioOther._TISize); + + std::swap(_displayList, ioOther._displayList); + + Rep::swap(ioOther); + } + + IndexedFaceSet& operator=(const IndexedFaceSet& iBrother){ + IndexedFaceSet tmp(iBrother); + swap(tmp); + return *this; + } + + /*! Desctructor + desallocates all the ressources */ + virtual ~IndexedFaceSet(); + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Compute the Bounding Box */ + virtual void ComputeBBox(); + + /*! modifiers */ + inline void SetDisplayList(unsigned int index) {_displayList = index;} + + /*! Accessors */ + virtual const real * vertices() const {return _Vertices;} + virtual const real * normals() const {return _Normals;} + virtual const Material*const* materials() const {return _Materials;} + virtual const real* texCoords() const {return _TexCoords;} + virtual const unsigned vsize() const {return _VSize;} + virtual const unsigned nsize() const {return _NSize;} + virtual const unsigned msize() const {return _MSize;} + virtual const unsigned tsize() const {return _TSize;} + virtual const unsigned numFaces() const {return _NumFaces;} + virtual const unsigned * numVertexPerFaces() const {return _NumVertexPerFace;} + virtual const TRIANGLES_STYLE * trianglesStyle() const {return _FaceStyle;} + virtual const unsigned* vindices() const {return _VIndices;} + virtual const unsigned* nindices() const {return _NIndices;} + virtual const unsigned* mindices() const {return _MIndices;} + virtual const unsigned* tindices() const {return _TIndices;} + virtual const unsigned visize() const {return _VISize;} + virtual const unsigned nisize() const {return _NISize;} + virtual const unsigned misize() const {return _MISize;} + virtual const unsigned tisize() const {return _TISize;} + inline unsigned int displayList() const {return _displayList;} + +protected: + real *_Vertices; + real *_Normals; + Material** _Materials; + real *_TexCoords; + + unsigned _VSize; + unsigned _NSize; + unsigned _MSize; + unsigned _TSize; + + unsigned _NumFaces; + unsigned *_NumVertexPerFace; + TRIANGLES_STYLE *_FaceStyle; + + unsigned *_VIndices; + unsigned *_NIndices; + unsigned *_MIndices; // Material Indices + unsigned *_TIndices; // Texture coordinates Indices + + unsigned _VISize; + unsigned _NISize; + unsigned _MISize; + unsigned _TISize; + + unsigned int _displayList; + +}; + +#endif // INDEXEDFACESET_H diff --git a/extern/freestyle/src/scene_graph/LineRep.cpp b/extern/freestyle/src/scene_graph/LineRep.cpp new file mode 100755 index 00000000000..9dec2ec803f --- /dev/null +++ b/extern/freestyle/src/scene_graph/LineRep.cpp @@ -0,0 +1,58 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "LineRep.h" + +void LineRep::ComputeBBox() +{ + real XMax = _vertices.front()[0]; + real YMax = _vertices.front()[1]; + real ZMax = _vertices.front()[2]; + + real XMin = _vertices.front()[0]; + real YMin = _vertices.front()[1]; + real ZMin = _vertices.front()[2]; + + // parse all the coordinates to find + // the XMax, YMax, ZMax + vector::iterator v; + for(v=_vertices.begin(); v!=_vertices.end(); v++) { + // X + if((*v)[0] > XMax) + XMax = (*v)[0]; + if((*v)[0] < XMin) + XMin = (*v)[0]; + + // Y + if((*v)[1] > YMax) + YMax = (*v)[1]; + if((*v)[1] < YMin) + YMin = (*v)[1]; + + // Z + if((*v)[2] > ZMax) + ZMax = (*v)[2]; + if((*v)[2] < ZMin) + ZMin = (*v)[2]; + } + + SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); +} diff --git a/extern/freestyle/src/scene_graph/LineRep.h b/extern/freestyle/src/scene_graph/LineRep.h new file mode 100755 index 00000000000..1bbba130ba3 --- /dev/null +++ b/extern/freestyle/src/scene_graph/LineRep.h @@ -0,0 +1,130 @@ +// +// Filename : LineRep.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the representation of 3D Line. +// Date of creation : 26/03/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef LINEREP_H +# define LINEREP_H + +# include +# include +# include "Rep.h" +# include "../system/FreestyleConfig.h" + +using namespace std; + +/*! Base class for all lines objects */ +class LIB_SCENE_GRAPH_EXPORT LineRep : public Rep +{ +public: + + /*! Line description style */ + enum LINES_STYLE{LINES, LINE_STRIP, LINE_LOOP}; + inline LineRep() : Rep() {_width = 0.f;} + + /*! Builds a single line from 2 vertices + * v1 + * first vertex + * v2 + * second vertex + */ + inline LineRep(const Vec3r& v1, const Vec3r& v2) + : Rep() + { + SetStyle(LINES); + AddVertex(v1); + AddVertex(v2); + _width = 0.f; + } + + /*! Builds a line rep from a vertex chain */ + inline LineRep(const vector& vertices) + : Rep() + { + _vertices = vertices; + SetStyle(LINE_STRIP); + _width = 0.f; + } + + /*! Builds a line rep from a vertex chain */ + inline LineRep(const list& vertices) + : Rep() + { + for(list::const_iterator v=vertices.begin(), end=vertices.end(); + v!=end; + v++) + { + _vertices.push_back(*v); + } + SetStyle(LINE_STRIP); + _width = 0.f; + } + + virtual ~LineRep() + { + _vertices.clear(); + } + + /*! accessors */ + inline const LINES_STYLE style() const {return _Style;} + inline const vector& vertices() const {return _vertices;} + inline float width() const {return _width;} + + /*! modifiers */ + inline void SetStyle(const LINES_STYLE iStyle) {_Style = iStyle;} + inline void AddVertex(const Vec3r& iVertex) {_vertices.push_back(iVertex);} + inline void SetVertices(const vector& iVertices) + { + if(0 != _vertices.size()) + { + _vertices.clear(); + } + for(vector::const_iterator v=iVertices.begin(), end=iVertices.end(); + v!=end; + v++) + { + _vertices.push_back(*v); + } + } + inline void SetWidth(float iWidth) {_width=iWidth;} + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v) { + Rep::accept(v); + v.visitLineRep(*this); + } + + /*! Computes the line bounding box.*/ + virtual void ComputeBBox(); + +private: + LINES_STYLE _Style; + vector _vertices; + float _width; +}; + +#endif // LINEREP_H diff --git a/extern/freestyle/src/scene_graph/Material.h b/extern/freestyle/src/scene_graph/Material.h new file mode 100755 index 00000000000..09557ad3473 --- /dev/null +++ b/extern/freestyle/src/scene_graph/Material.h @@ -0,0 +1,304 @@ +// +// Filename : Material.h +// Author(s) : Stephane Grabli +// Purpose : Class used to handle materials. +// Date of creation : 10/10/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MATERIAL_H +# define MATERIAL_H + +# include "../system/FreestyleConfig.h" + +/*! Class defining a material */ +class Material +{ +public: + /*! Default constructor */ + inline Material(); + /*! Builds a Material from its diffuse, ambiant, specular, emissive + * colors and a shininess coefficient. + * \param iDiffuse + * A 4 element float-array containing the diffuse color. + * \param iAmbiant + * A 4 element float-array containing the ambiant color. + * \param iSpecular + * A 4 element float-array containing the specular color. + * \param iEmission + * A 4 element float-array containing the emissive color. + * \param iShininess + * The shininess coefficient. + */ + inline Material(const float *iDiffuse, + const float *iAmbiant, + const float *iSpecular, + const float *iEmission, + const float iShininess); + + /*! Copy constructor */ + inline Material(const Material& m); + /*! Destructor */ + virtual ~Material() {} + + + /*! Returns the diffuse color as a 4 float array */ + inline const float * diffuse() const { return Diffuse; } + /*! Returns the red component of the diffuse color */ + inline const float diffuseR() const { return Diffuse[0]; } + /*! Returns the green component of the diffuse color */ + inline const float diffuseG() const { return Diffuse[1]; } + /*! Returns the blue component of the diffuse color */ + inline const float diffuseB() const { return Diffuse[2]; } + /*! Returns the alpha component of the diffuse color */ + inline const float diffuseA() const { return Diffuse[3]; } + + /*! Returns the specular color as a 4 float array */ + inline const float * specular() const { return Specular; } + /*! Returns the red component of the specular color */ + inline const float specularR() const { return Specular[0]; } + /*! Returns the green component of the specular color */ + inline const float specularG() const { return Specular[1]; } + /*! Returns the blue component of the specular color */ + inline const float specularB() const { return Specular[2]; } + /*! Returns the alpha component of the specular color */ + inline const float specularA() const { return Specular[3]; } + + /*! Returns the ambiant color as a 4 float array */ + inline const float * ambient() const { return Ambient; } + /*! Returns the red component of the ambiant color */ + inline const float ambientR() const { return Ambient[0]; } + /*! Returns the green component of the ambiant color */ + inline const float ambientG() const { return Ambient[1]; } + /*! Returns the blue component of the ambiant color */ + inline const float ambientB() const { return Ambient[2]; } + /*! Returns the alpha component of the ambiant color */ + inline const float ambientA() const { return Ambient[3]; } + + /*! Returns the emissive color as a 4 float array */ + inline const float * emission() const { return Emission; } + /*! Returns the red component of the emissive color */ + inline const float emissionR() const { return Emission[0]; } + /*! Returns the green component of the emissive color */ + inline const float emissionG() const { return Emission[1]; } + /*! Returns the blue component of the emissive color */ + inline const float emissionB() const { return Emission[2]; } + /*! Returns the alpha component of the emissive color */ + inline const float emissionA() const { return Emission[3]; } + + /*! Returns the shininess coefficient */ + inline const float shininess() const { return Shininess; } + + /*! Sets the diffuse color. + * \param r + * Red component + * \param g + * Green component + * \param b + * Blue component + * \param a + * Alpha component + */ + inline void SetDiffuse(const float r, const float g, const float b, const float a); + /*! Sets the specular color. + * \param r + * Red component + * \param g + * Green component + * \param b + * Blue component + * \param a + * Alpha component + */ + inline void SetSpecular(const float r, const float g, const float b, const float a); + /*! Sets the ambiant color. + * \param r + * Red component + * \param g + * Green component + * \param b + * Blue component + * \param a + * Alpha component + */ + inline void SetAmbient(const float r, const float g, const float b, const float a); + + /*! Sets the emissive color. + * \param r + * Red component + * \param g + * Green component + * \param b + * Blue component + * \param a + * Alpha component + */ + inline void SetEmission(const float r, const float g, const float b, const float a); + + /*! Sets the shininess. + * \param s + * Shininess + */ + inline void SetShininess(const float s); + + /* operators */ + inline Material& operator=(const Material& m); + inline bool operator!=(const Material& m) const; + inline bool operator==(const Material& m) const; + +private: + + /*! Material properties */ + float Diffuse[4]; + float Specular[4]; + float Ambient[4]; + float Emission[4]; + float Shininess; + +}; + +Material::Material() +{ + Ambient[0] = Ambient[1] = Ambient[2] = 0.2f; + Ambient[3] = 1.f; + + Diffuse[0] = Diffuse[1] = Diffuse[2] = 0.8f; + Diffuse[3] = 1.f; + + Emission[0] = Emission[1] = Emission[2] = 0.f; + Emission[3] = 1.f; + + Specular[0] = Specular[1] = Specular[2] = 0.f; + Specular[3] = 1.f; + + Shininess = 0.f; +} + +Material::Material(const float *iDiffuse, + const float *iAmbiant, + const float *iSpecular, + const float *iEmission, + const float iShininess) +{ + for(int i=0; i<4; i++) + { + Diffuse[i] = iDiffuse[i]; + Specular[i] = iSpecular[i]; + Ambient[i] = iAmbiant[i]; + Emission[i] = iEmission[i]; + } + + Shininess = iShininess; +} + +Material::Material(const Material& m) +{ + for(int i=0; i<4; i++) + { + Diffuse[i] = m.diffuse()[i]; + Specular[i] = m.specular()[i]; + Ambient[i] = m.ambient()[i]; + Emission[i] = m.emission()[i]; + } + + Shininess = m.shininess(); +} + +void Material::SetDiffuse(const float r, const float g, const float b, const float a) +{ + Diffuse[0] = r; + Diffuse[1] = g; + Diffuse[2] = b; + Diffuse[3] = a; +} + +void Material::SetSpecular(const float r, const float g, const float b, const float a) +{ + Specular[0] = r; + Specular[1] = g; + Specular[2] = b; + Specular[3] = a; +} + +void Material::SetAmbient(const float r, const float g, const float b, const float a) +{ + Ambient[0] = r; + Ambient[1] = g; + Ambient[2] = b; + Ambient[3] = a; +} + +void Material::SetEmission(const float r, const float g, const float b, const float a) +{ + Emission[0] = r; + Emission[1] = g; + Emission[2] = b; + Emission[3] = a; +} + +void Material::SetShininess(const float s) +{ + Shininess = s; +} + +Material& Material::operator=(const Material& m) +{ + for(int i=0; i<4; i++) + { + Diffuse[i] = m.diffuse()[i]; + Specular[i] = m.specular()[i]; + Ambient[i] = m.ambient()[i]; + Emission[i] = m.emission()[i]; + } + + Shininess = m.shininess(); + + return *this; +} + +bool Material::operator!=(const Material& m) const +{ + if(Shininess != m.shininess()) + return true; + for(int i=0; i<4; i++) + { + if(Diffuse[i] != m.diffuse()[i]) + return true; + if(Specular[i] != m.specular()[i]) + return true; + if(Ambient[i] != m.ambient()[i]) + return true; + if(Emission[i] != m.emission()[i]) + return true; + } + + return false; +} + +bool Material::operator==(const Material& m) const +{ + return (!((*this)!=m)); +} + +#endif // MATERIAL_H diff --git a/extern/freestyle/src/scene_graph/MaxFileLoader.cpp b/extern/freestyle/src/scene_graph/MaxFileLoader.cpp new file mode 100755 index 00000000000..515874c4021 --- /dev/null +++ b/extern/freestyle/src/scene_graph/MaxFileLoader.cpp @@ -0,0 +1,388 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "MaxFileLoader.h" + +MaxFileLoader::MaxFileLoader() +{ + _FileName = NULL; + _3dsFile = NULL; + _Scene = NULL; + _numFacesRead = 0; + _minEdgeSize = DBL_MAX; +} + +MaxFileLoader::MaxFileLoader(const char *iFileName) +{ + _FileName = new char[strlen(iFileName)+1]; + strcpy(_FileName, iFileName); + + _3dsFile = NULL; + _Scene = NULL; + _numFacesRead = 0; + _minEdgeSize = DBL_MAX; +} + +MaxFileLoader::~MaxFileLoader() +{ + if(NULL != _FileName) + { + delete [] _FileName; + _FileName = NULL; + } + + if(NULL != _3dsFile) + { + lib3ds_file_free(_3dsFile); + _3dsFile = NULL; + } + + _Scene = NULL; +} + +void MaxFileLoader::SetFileName(const char *iFileName) +{ + if(NULL != _FileName) + delete [] _FileName; + + _FileName = new char[strlen(iFileName)+1]; + strcpy(_FileName, iFileName); +} + +NodeGroup* MaxFileLoader::Load() +{ + _3dsFile=lib3ds_file_load(_FileName); + if(NULL == _3dsFile) + return NULL; + + /* No nodes? Fabricate nodes to display all the meshes. */ + if( !_3dsFile->nodes ) + { + Lib3dsMesh *mesh; + Lib3dsNode *node; + + for(mesh = _3dsFile->meshes; mesh != NULL; mesh = mesh->next) + { + node = lib3ds_node_new_object(); + strcpy(node->name, mesh->name); + node->parent_id = LIB3DS_NO_PARENT; + node->data.object.scl_track.keyL = lib3ds_lin3_key_new(); + node->data.object.scl_track.keyL->value[0] = 1.; + node->data.object.scl_track.keyL->value[1] = 1.; + node->data.object.scl_track.keyL->value[2] = 1.; + lib3ds_file_insert_node(_3dsFile, node); + } + } + + lib3ds_file_eval(_3dsFile, 0); + + // creation of the scene root node + _Scene = new NodeGroup; + + // converts the 3ds format to the scene format + // the RenderNode method modifies _Scene. + Lib3dsNode *p; + for (p=_3dsFile->nodes; p!=0; p=p->next) { + RenderNode(p); + } + //Returns the built scene. + return _Scene; +} + +void lib3ds_normal_transform(Lib3dsVector c, Lib3dsMatrix m, Lib3dsVector a) +{ + c[0]= (m[0][0]*a[0] + m[1][0]*a[1] + m[2][0]*a[2]); + c[1]= (m[0][1]*a[0] + m[1][1]*a[1] + m[2][1]*a[2]); + c[2]= (m[0][2]*a[0] + m[1][2]*a[1] + m[2][2]*a[2]); + + // c[0]= (m[0][0]*a[0] + m[1][0]*a[1] + m[2][0]*a[2])/m[0][0]; + // c[1]= (m[0][1]*a[0] + m[1][1]*a[1] + m[2][1]*a[2])/m[1][1]; + // c[2]= (m[0][2]*a[0] + m[1][2]*a[1] + m[2][2]*a[2])/m[2][2]; + + //lib3ds_vector_normalize(c); + + // c[0] = c[0]*m[0][0]; + // c[1] = c[1]*m[1][1]; + // c[2] = c[2]*m[2][2]; + +} + + + +void MaxFileLoader::RenderNode(Lib3dsNode *iNode) +{ + Lib3dsNode *p; + for (p=iNode->childs; p!=0; p=p->next) + RenderNode(p); + + float minBBox[3]; + float maxBBox[3]; + if (iNode->type==LIB3DS_OBJECT_NODE) + { + if (strcmp(iNode->name,"$$$DUMMY")==0) + return; + + NodeTransform *currentMesh = new NodeTransform; + NodeShape * shape; + + if (!iNode->user.d) // If the shape is not built yet, just do it ! + { + Lib3dsMesh *mesh=lib3ds_file_mesh_by_name(_3dsFile, iNode->name); + ASSERT(mesh); + if (!mesh) + return; + + // builds the shape: + shape = new NodeShape; + iNode->user.d=(unsigned long)shape; // We store as user data the NodeShape address + + // We invert the matrix in order to + // be able to retrieve the shape's coordinates + // in its local coordinates system (origin is the iNode pivot) + Lib3dsMatrix M; + lib3ds_matrix_copy(M, mesh->matrix); + lib3ds_matrix_inv(M); + + // We compute a normal per vertex and manages the smoothing of the shape: + Lib3dsVector *normalL=(Lib3dsVector*)malloc(3*sizeof(Lib3dsVector)*mesh->faces); + lib3ds_mesh_calculate_normals(mesh, normalL); + + // We build the rep: + IndexedFaceSet *rep; + unsigned numFaces = mesh->faces; + + unsigned vSize = 3*3*numFaces; + float *vertices = new float[vSize]; + unsigned nSize = vSize; + float *normals = new float[nSize]; + unsigned *numVertexPerFaces = new unsigned[numFaces]; + vector meshMaterials; + + IndexedFaceSet::TRIANGLES_STYLE *faceStyle = new IndexedFaceSet::TRIANGLES_STYLE[numFaces]; + unsigned i; + for (i = 0; i pointL[mesh->faceL[0].points[0]].pos); + minBBox[0] = pvtmp[0]; + maxBBox[0] = pvtmp[0]; + minBBox[1] = pvtmp[1]; + maxBBox[1] = pvtmp[1]; + minBBox[2] = pvtmp[2]; + maxBBox[2] = pvtmp[2]; + + unsigned p; + real vert[3][3]; + real norm; + for(p=0; pfaces; ++p) // we parse the faces of the mesh + { + Lib3dsFace *f=&mesh->faceL[p]; + Lib3dsMaterial *mat=0; + if (f->material[0]) + mat=lib3ds_file_material_by_name(_3dsFile, f->material); + + if (mat) + { + tmpMat.SetDiffuse(mat->diffuse[0], mat->diffuse[1], mat->diffuse[2], mat->diffuse[3]); + tmpMat.SetSpecular(mat->specular[0], mat->specular[1], mat->specular[2], mat->specular[3]); + float s = (float)pow(2.0, 10.0*mat->shininess); + if(s > 128.f) + s = 128.f; + tmpMat.SetShininess(s); + } + + if(meshMaterials.empty()){ + meshMaterials.push_back(tmpMat); + shape->SetMaterial(tmpMat); + }else{ + // find if the material is aleady in the list + unsigned i=0; + bool found = false; + for(vector::iterator it=meshMaterials.begin(), itend=meshMaterials.end(); + it!=itend; + ++it){ + if(*it == tmpMat){ + currentMIndex = i; + found = true; + break; + } + ++i; + } + if(!found){ + meshMaterials.push_back(tmpMat); + currentMIndex = meshMaterials.size()-1; + } + } + + + for(i=0; i<3; ++i) // we parse the vertices of the face f + { + unsigned j; + lib3ds_vector_transform(pv, M, mesh->pointL[f->points[i]].pos); //fills the cells of the pv array + for(j=0; j<3; j++) // we parse the xyz coordinates of the vertex i + { + if(minBBox[j] > pv[j]) + minBBox[j] = pv[j]; + + if(maxBBox[j] < pv[j]) + maxBBox[j] = pv[j]; + + vert[i][j] = pv[j]; + } + + for(j=0; j<3; j++) + pn[j] = f->normal[j]; + + lib3ds_normal_transform(pn, M, normalL[3*p+i]); //fills the cells of the pv array + //lib3ds_vector_normalize(pn); + + + *pvi = currentIndex; + *pni = currentIndex; + *pmi = currentMIndex; + + + currentIndex +=3; + pv += 3; + pn += 3; + pvi++; + pni++; + pmi++; + + } + + for(i=0; i<3; i++) + { + norm = 0.0; + for (unsigned j = 0; j < 3; j++) + norm += (vert[i][j] - vert[(i+1)%3][j])*(vert[i][j] - vert[(i+1)%3][j]); + norm = sqrt(norm); + if(_minEdgeSize > norm) + _minEdgeSize = norm; + } + + _numFacesRead++; + } + + free(normalL); + + // We might have several times the same vertex. We want a clean + // shape with no real-vertex. Here, we are making a cleaning + // pass. + real *cleanVertices = NULL; + unsigned cvSize; + unsigned *cleanVIndices = NULL; + + GeomCleaner::CleanIndexedVertexArray( + vertices, vSize, + VIndices, viSize, + &cleanVertices, &cvSize, + &cleanVIndices); + + real *cleanNormals = NULL; + unsigned cnSize; + unsigned *cleanNIndices = NULL; + + GeomCleaner::CleanIndexedVertexArray( + normals, nSize, + NIndices, niSize, + &cleanNormals, &cnSize, + &cleanNIndices); + + // format materials array + Material** marray = new Material*[meshMaterials.size()]; + unsigned mindex=0; + for(vector::iterator m=meshMaterials.begin(), mend=meshMaterials.end(); + m!=mend; + ++m){ + marray[mindex] = new Material(*m); + ++mindex; + } + // deallocates memory: + delete [] vertices; + delete [] normals; + delete [] VIndices; + delete [] NIndices; + + // Create the IndexedFaceSet with the retrieved attributes + rep = new IndexedFaceSet(cleanVertices, cvSize, + cleanNormals, cnSize, + marray, meshMaterials.size(), + 0, 0, + numFaces, numVertexPerFaces, faceStyle, + cleanVIndices, viSize, + cleanNIndices, niSize, + MIndices, viSize, + 0,0, + 0); + // sets the id of the rep + rep->SetId(Id(iNode->node_id, 0)); + + + const BBox bbox = BBox(Vec3r(minBBox[0], minBBox[1], minBBox[2]), + Vec3r(maxBBox[0], maxBBox[1], maxBBox[2])); + rep->SetBBox(bbox); + shape->AddRep(rep); + } + + if (iNode->user.d) + { + if(NULL != iNode->matrix) + { + Lib3dsObjectData *d = &iNode->data.object; + Matrix44r M44f; + for(unsigned i=0; i<4; i++) + for(unsigned j=0; j<4; j++) + M44f(i,j) = iNode->matrix[j][i]; + + currentMesh->SetMatrix(Matrix44r(M44f)); + currentMesh->Translate(-d->pivot[0], -d->pivot[1], -d->pivot[2]); + } + shape = (NodeShape*)iNode->user.d; + currentMesh->AddChild(shape); + _Scene->AddChild(currentMesh); + } + } + +} diff --git a/extern/freestyle/src/scene_graph/MaxFileLoader.h b/extern/freestyle/src/scene_graph/MaxFileLoader.h new file mode 100755 index 00000000000..ab31e656d46 --- /dev/null +++ b/extern/freestyle/src/scene_graph/MaxFileLoader.h @@ -0,0 +1,94 @@ +// +// Filename : MaxFileLoader.h +// Author(s) : Stephane Grabli +// Purpose : Class used to load 3ds models. +// Date of creation : 10/10/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MAX_FILE_LOADER_H +# define MAX_FILE_LOADER_H + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include "../system/FreestyleConfig.h" +# include "NodeGroup.h" +# include "NodeTransform.h" +# include "NodeShape.h" +# include "IndexedFaceSet.h" +# include "../geometry/BBox.h" +# include "../geometry/Geom.h" +# include "../geometry/GeomCleaner.h" + + +class NodeGroup; + +class LIB_SCENE_GRAPH_EXPORT MaxFileLoader +{ +public: + /*! Builds a MaxFileLoader */ + MaxFileLoader(); + /*! Builds a MaxFileLoader to load the iFileName + file. + iFileName + The name of the 3dsMax file to load + */ + explicit MaxFileLoader(const char *iFileName); + virtual ~MaxFileLoader(); + + /*! Sets the name of the 3dsMax file to load */ + void SetFileName(const char *iFileName); + + /*! Loads the 3D scene and returns + * a pointer to the scene root node + */ + NodeGroup * Load(); + //void Load(const char *iFileName); + + /*! Gets the number of read faces */ + inline unsigned int numFacesRead() {return _numFacesRead;} + + /*! Gets the smallest edge size read */ + inline real minEdgeSize() {return _minEdgeSize;} + +protected: + void RenderNode(Lib3dsNode *iNode); + +protected: + char *_FileName; + Lib3dsFile *_3dsFile; + NodeGroup* _Scene; + unsigned _numFacesRead; + real _minEdgeSize; +}; + +#endif // MAX_FILE_LOADER_H diff --git a/extern/freestyle/src/scene_graph/Node.h b/extern/freestyle/src/scene_graph/Node.h new file mode 100755 index 00000000000..1726dd3c853 --- /dev/null +++ b/extern/freestyle/src/scene_graph/Node.h @@ -0,0 +1,97 @@ +// +// Filename : Node.h +// Author(s) : Stephane Grabli +// Purpose : Abstract class for scene graph nodes. Inherits from +// BaseObject which defines the addRef release mechanism. +// Date of creation : 24/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODE_H +# define NODE_H + +# include "../system/FreestyleConfig.h" +# include "../system/BaseObject.h" +# include "SceneVisitor.h" +# include "../geometry/BBox.h" +# include "../geometry/Geom.h" +# include "../system/Precision.h" + +using namespace std; +using namespace Geometry; + +class LIB_SCENE_GRAPH_EXPORT Node : public BaseObject +{ +public: + + inline Node() : BaseObject() {} + inline Node(const Node& iBrother) : BaseObject() + { + _BBox = iBrother.bbox(); + } + virtual ~Node(){} + + /*! Accept the corresponding visitor + * Each inherited node + * must overload this method + */ + virtual void accept(SceneVisitor& v) { + v.visitNode(*this); + } + + /*! bounding box management */ + /*! Returns the node bounding box + * If no bounding box exists, an empty bbox + * is returned + */ + virtual const BBox& bbox() const {return _BBox;} + + /*! Sets the Node bounding box */ + virtual void SetBBox(const BBox& iBox) {_BBox = iBox;} + + /*! Makes the union of _BBox and iBox */ + virtual void AddBBox(const BBox& iBox) + { + if(iBox.empty()) + return; + + if(_BBox.empty()) + _BBox = iBox; + else + _BBox += iBox; + } + + /*! Updates the BBox */ + virtual const BBox& UpdateBBox() {return _BBox;} + + /*! Clears the bounding box */ + virtual void clearBBox() { _BBox.clear(); } + +protected: + +private: + BBox _BBox; +}; + +#endif // NODE_H diff --git a/extern/freestyle/src/scene_graph/NodeCamera.cpp b/extern/freestyle/src/scene_graph/NodeCamera.cpp new file mode 100644 index 00000000000..2d850287ae5 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeCamera.cpp @@ -0,0 +1,119 @@ +#include "NodeCamera.h" +#include + +void loadIdentity(double * matrix){ + int i; + + // Build Identity matrix + for(i=0;i<16;++i){ + double value ; + if((i % 5) == 0) + value = 1.0; + else + value = 0; + matrix[i] = value; + } +} + +NodeCamera::NodeCamera(CameraType camera_type) +:camera_type_(camera_type){ + loadIdentity(modelview_matrix_); + loadIdentity(projection_matrix_); +} + +NodeCamera::NodeCamera(const NodeCamera& iBrother) +:camera_type_(iBrother.camera_type_){ + memcpy(modelview_matrix_, iBrother.modelview_matrix_, 16*sizeof(double)); + memcpy(projection_matrix_, iBrother.projection_matrix_, 16*sizeof(double)); +} + +void NodeCamera::accept(SceneVisitor& v){ + v.visitNodeCamera(*this) ; +} + +void NodeCamera::setModelViewMatrix(double modelview_matrix[16]){ + memcpy(modelview_matrix_, modelview_matrix,16*sizeof(double)); +} + +void NodeCamera::setProjectionMatrix(double projection_matrix[16]){ + memcpy(projection_matrix_, projection_matrix,16*sizeof(double)); +} + +NodeOrthographicCamera::NodeOrthographicCamera() +:NodeCamera(NodeCamera::ORTHOGRAPHIC), +left_(0),right_(0),bottom_(0),top_(0),zNear_(0),zFar_(0){ + loadIdentity(projection_matrix_); + loadIdentity(modelview_matrix_); +} + +NodeOrthographicCamera::NodeOrthographicCamera(double left + , double right + , double bottom + , double top + , double zNear + , double zFar + ) +:NodeCamera(NodeCamera::ORTHOGRAPHIC), +left_(left), +right_(right), +bottom_(bottom), +top_(top), +zNear_(zNear), +zFar_(zFar){ + + loadIdentity(projection_matrix_); + + projection_matrix_[0] = 2.0/(right-left); + projection_matrix_[3] = -(right + left) / (right - left) ; + projection_matrix_[5] = 2.0/(top-bottom); + projection_matrix_[7] = -(top + bottom) / (top - bottom) ; + projection_matrix_[10] = -2.0/(zFar-zNear); + projection_matrix_[11] = -(zFar + zNear) / (zFar - zNear); + +} + +NodeOrthographicCamera::NodeOrthographicCamera(const NodeOrthographicCamera& iBrother) +:NodeCamera(iBrother),left_(iBrother.left_),right_(iBrother.right_),bottom_(iBrother.bottom_),top_(iBrother.top_),zNear_(iBrother.zNear_),zFar_(iBrother.zFar_){ +} + +NodePerspectiveCamera::NodePerspectiveCamera() +:NodeCamera(NodeCamera::PERSPECTIVE){ +} + +NodePerspectiveCamera::NodePerspectiveCamera(double fovy + , double aspect + , double zNear + , double zFar) +:NodeCamera(NodeCamera::PERSPECTIVE){ + loadIdentity(projection_matrix_); + + double f = cos(fovy/2.0)/sin(fovy/2.0); // cotangent + + projection_matrix_[0] = f/aspect; + projection_matrix_[5] = f; + projection_matrix_[10] = (zNear+zFar)/(zNear-zFar); + projection_matrix_[11] = (2.0*zNear*zFar)/(zNear-zFar); + projection_matrix_[14] = -1.0; + projection_matrix_[15] = 0; + +} + +NodePerspectiveCamera::NodePerspectiveCamera(double left, + double right, + double bottom, + double top, + double zNear, + double zFar) +:NodeCamera(NodeCamera::PERSPECTIVE){ + loadIdentity(projection_matrix_); + + projection_matrix_[0] = (2.0*zNear)/(right-left); + projection_matrix_[2] = (right+left)/(right-left); + projection_matrix_[5] = (2.0*zNear)/(top-bottom); + projection_matrix_[6] = (top+bottom)/(top-bottom); + projection_matrix_[10] = - (zFar+zNear)/(zFar-zNear); + projection_matrix_[11] = - (2.0*zFar*zNear)/(zFar-zNear); + projection_matrix_[14] = -1.0; + projection_matrix_[15] = 0; +} + diff --git a/extern/freestyle/src/scene_graph/NodeCamera.h b/extern/freestyle/src/scene_graph/NodeCamera.h new file mode 100644 index 00000000000..76ccf465d38 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeCamera.h @@ -0,0 +1,192 @@ +// +// Filename : NodeCamera.h +// Author(s) : Stephane Grabli +// Purpose : Class to represent a light node +// Date of creation : 25/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef NODE_CAMERA_H_ +#define NODE_CAMERA_H_ + +# include "../geometry/Geom.h" +# include "../system/FreestyleConfig.h" +# include "Node.h" + +using namespace Geometry; + +class NodeOrthographicCamera; +class NodePerspectiveCamera; +class LIB_SCENE_GRAPH_EXPORT NodeCamera : public Node +{ +public: + typedef enum {PERSPECTIVE,ORTHOGRAPHIC,GENERIC} CameraType; + + /*! Default matrices: Identity for both projection and modelview. */ + NodeCamera(CameraType camera_type = GENERIC); + NodeCamera(const NodeCamera& iBrother); + + virtual ~NodeCamera() {} + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Matrix is copied */ + void setModelViewMatrix(double modelview_matrix[16]); + /*! Matrix is copied */ + void setProjectionMatrix(double projection_matrix[16]); + + double * modelViewMatrix() {return modelview_matrix_;} + double * projectionMatrix() {return projection_matrix_;} + +protected: + // row major right handed matrix + double modelview_matrix_[16]; + // row major right handed matrix + double projection_matrix_[16]; + + CameraType camera_type_; +}; + +class LIB_SCENE_GRAPH_EXPORT NodeOrthographicCamera : public NodeCamera{ +public: + NodeOrthographicCamera(); + /*! Builds a parallel projection matrix a la glOrtho. + A 0 0 tx + 0 B 0 ty + 0 0 C tz + 0 0 0 1 + + where + + A = + 2 / (right - left) + B = + 2 / (top - bottom) + C = + -2 / (far - near) + tx = + -(right + left) / (right - left) + ty = + -(top + bottom) / (top - bottom) + tz = + -(zFar + zNear) / (zFar - zNear) + */ + NodeOrthographicCamera(double left + , double right + , double bottom + , double top + , double zNear + , double zFar + ); + + double left() const {return left_;} + double right() const {return right_;} + double bottom() const {return bottom_;} + double top() const {return top_;} + double zNear() const {return zNear_;} + double zFar() const {return zFar_;} + + NodeOrthographicCamera(const NodeOrthographicCamera& iBrother); + +private: + double left_; + double right_; + double bottom_; + double top_; + double zNear_; + double zFar_; +}; + +class LIB_SCENE_GRAPH_EXPORT NodePerspectiveCamera : public NodeCamera { +public: + NodePerspectiveCamera(); + /*! Builds a perspective projection matrix a la gluPerspective. + Given f defined as follows: + fovy + f = cotangent(____) + 2 + The generated matrix is + + + ( f ) + | ______ | + | aspect 0 0 0 | + | | + | 0 f 0 0 | + | | + | zNear+zFar 2*zNear*zFar | + | __________ ____________ | + | 0 0 zNear-zFar zNear-zFar | + | | + ( 0 0 -1 0 ) + \param fovy + Field of View specified in radians. + */ + NodePerspectiveCamera(double fovy + , double aspect + , double zNear + , double zFar); + + /*! Builds a perspective projection matrix a la glFrustum. + ( 2*zNear ) + | __________ | + | right-left 0 A 0 | + | | + | 2*zNear | + | 0 __________ B 0 | + | top-bottom | + | | + | 0 0 C D | + | | + | 0 0 -1 0 | + ( ) + + right+left + A = __________ + right-left + + top+bottom + B = __________ + top-bottom + + zFar+zNear + C = - __________ + zFar-zNear + + 2*zFar*zNear + D = - ____________ + zFar-zNear + */ + NodePerspectiveCamera(double left, + double right, + double bottom, + double top, + double zNear, + double zFar); +}; + + +#endif // NODE_CAMERA_H_ \ No newline at end of file diff --git a/extern/freestyle/src/scene_graph/NodeDrawingStyle.cpp b/extern/freestyle/src/scene_graph/NodeDrawingStyle.cpp new file mode 100755 index 00000000000..acd740ee055 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeDrawingStyle.cpp @@ -0,0 +1,34 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "NodeDrawingStyle.h" + +void NodeDrawingStyle::accept(SceneVisitor& v) { + v.visitNodeDrawingStyle(*this); + + v.visitNodeDrawingStyleBefore(*this); + v.visitDrawingStyle(_DrawingStyle); + for(vector::iterator node=_Children.begin(), end=_Children.end(); + node!=end; + node++) + (*node)->accept(v); + v.visitNodeDrawingStyleAfter(*this); +} diff --git a/extern/freestyle/src/scene_graph/NodeDrawingStyle.h b/extern/freestyle/src/scene_graph/NodeDrawingStyle.h new file mode 100755 index 00000000000..18442ae10f9 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeDrawingStyle.h @@ -0,0 +1,70 @@ +// +// Filename : NodeDrawingStyle.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a Drawing Style to be applied +// to the underlying children. Inherits from NodeGroup. +// Date of creation : 06/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODEDRAWINGSTYLE_H +# define NODEDRAWINGSTYLE_H + +# include "../system/FreestyleConfig.h" +# include "NodeGroup.h" +# include "DrawingStyle.h" + +class LIB_SCENE_GRAPH_EXPORT NodeDrawingStyle : public NodeGroup +{ +public: + + inline NodeDrawingStyle() : NodeGroup() {} + virtual ~NodeDrawingStyle() {} + + inline const DrawingStyle& drawingStyle() const { return _DrawingStyle; } + inline void SetDrawingStyle(const DrawingStyle& iDrawingStyle) { _DrawingStyle = iDrawingStyle; } + + /*! Sets the style. Must be one of FILLED, LINES, POINTS, INVISIBLE. */ + inline void SetStyle(const DrawingStyle::STYLE iStyle) { _DrawingStyle.SetStyle(iStyle); } + /*! Sets the line width in the LINES style case */ + inline void SetLineWidth(const float iLineWidth) { _DrawingStyle.SetLineWidth(iLineWidth); } + /*! Sets the Point size in the POINTS style case */ + inline void SetPointSize(const float iPointSize) { _DrawingStyle.SetPointSize(iPointSize); } + /*! Enables or disables the lighting. TRUE = enable */ + inline void SetLightingEnabled(const bool iEnableLighting) { _DrawingStyle.SetLightingEnabled(iEnableLighting); } + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! accessors */ + inline DrawingStyle::STYLE style() const {return _DrawingStyle.style();} + inline float lineWidth() const {return _DrawingStyle.lineWidth();} + inline float pointSize() const {return _DrawingStyle.pointSize();} + inline bool lightingEnabled() const {return _DrawingStyle.lightingEnabled();} + +private: + DrawingStyle _DrawingStyle; +}; + +#endif // NODEDRAWINGSTYLE_H diff --git a/extern/freestyle/src/scene_graph/NodeGroup.cpp b/extern/freestyle/src/scene_graph/NodeGroup.cpp new file mode 100755 index 00000000000..3d2aa2c8694 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeGroup.cpp @@ -0,0 +1,122 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "NodeGroup.h" + +void NodeGroup::AddChild(Node *iChild) +{ + if(NULL == iChild) + return; + + _Children.push_back(iChild); + iChild->addRef(); +} + +int NodeGroup::destroy() +{ + /*! Node::destroy makes a release on the object + * and then returns the reference counter. + * If the reference counter is equal to 0, + * that means that nobody else is linking + * this node group and that we can destroy the whole + * underlying tree. + * Else, one or several Node link this node group, + * and we only returns the reference counter + * decremented by Node::destroy(); + */ + int refThis = Node::destroy(); + + // if refThis != 0, we can't destroy the tree + if(0 != refThis) + return refThis; + + // If we are here, that means that nobody else + // needs our NodeGroup and we can destroy it. + int refCount = 0; + vector::iterator node; + + for(node=_Children.begin(); node!=_Children.end(); node++) + { + refCount = (*node)->destroy(); + if(0 == refCount) + delete (*node); + } + + _Children.clear(); + + return refThis; +} + +void NodeGroup::accept(SceneVisitor& v) { + v.visitNodeGroup(*this); + + v.visitNodeGroupBefore(*this); + for(vector::iterator node=_Children.begin(), end=_Children.end(); + node!=end; + node++) + (*node)->accept(v); + v.visitNodeGroupAfter(*this); +} + +void NodeGroup::DetachChildren() +{ + vector::iterator node; + + for(node=_Children.begin(); node!=_Children.end(); node++) + { + (*node)->release(); + } + + _Children.clear(); +} + +void NodeGroup::DetachChild(Node *iChild) +{ + int found = 0; + vector::iterator node; + + for(node=_Children.begin(); node!=_Children.end(); node++) + { + if((*node) == iChild) + { + (*node)->release(); + _Children.erase(node); + found = 1; + break; + } + } +} + +void NodeGroup::RetrieveChildren(vector& oNodes){ + oNodes = _Children; +} + +const BBox& NodeGroup::UpdateBBox() +{ + vector::iterator node; + clearBBox(); + for(node=_Children.begin(); node!=_Children.end(); node++) + { + AddBBox((*node)->UpdateBBox()); + } + + return Node::UpdateBBox(); +} diff --git a/extern/freestyle/src/scene_graph/NodeGroup.h b/extern/freestyle/src/scene_graph/NodeGroup.h new file mode 100755 index 00000000000..a1bd2b57e56 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeGroup.h @@ -0,0 +1,84 @@ +// +// Filename : NodeGroup.h +// Author(s) : Stephane Grabli +// Purpose : Class to represent a group node. This node can contains +// several children. It also contains a transform matrix +// indicating the transform state of the underlying +// children. +// Date of creation : 24/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODEGROUP_H +# define NODEGROUP_H + +# include +# include "../system/FreestyleConfig.h" +# include "Node.h" + +using namespace std; + +class LIB_SCENE_GRAPH_EXPORT NodeGroup : public Node +{ +public: + + inline NodeGroup(): Node() {} + virtual ~NodeGroup(){} + + /*! Adds a child. Makes a addRef on the + * iChild reference counter */ + virtual void AddChild(Node *iChild); + + /*! destroys all the underlying nodes + * Returns the reference counter + * after having done a release() */ + virtual int destroy(); + + /*! Detaches all the children */ + virtual void DetachChildren(); + + /*! Detached the sepcified child */ + virtual void DetachChild(Node *iChild); + + /*! Retrieve children */ + virtual void RetrieveChildren(vector& oNodes); + + + /*! Renders every children */ + // virtual void Render(Renderer *iRenderer); + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Updates the BBox */ + virtual const BBox& UpdateBBox(); + + /*! Returns the number of children */ + virtual int numberOfChildren() {return _Children.size();} + +protected: + vector _Children; +}; + +#endif // NODEGROUP_H diff --git a/extern/freestyle/src/scene_graph/NodeLight.cpp b/extern/freestyle/src/scene_graph/NodeLight.cpp new file mode 100755 index 00000000000..61a46155cfa --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeLight.cpp @@ -0,0 +1,80 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "NodeLight.h" + +int NodeLight::numberOfLights = 0; + +NodeLight::NodeLight() +: Node() +{ + if(numberOfLights > 7) + { + _number = 7; + } + else + { + _number = numberOfLights; + numberOfLights++; + } + + Ambient[0] = Ambient[1] = Ambient[2] = 0.f; + Ambient[3] = 1.f; + + for(int i=0; i<4; i++) + { + Diffuse[i] = 1.f; + Specular[i] = 1.f; + } + + Position[0] = Position[1] = Position[3] = 0.f; + Position[2] = 1.f; + + on = true; +} + +NodeLight::NodeLight(NodeLight& iBrother) +: Node(iBrother) +{ + if(numberOfLights > 7) + { + _number = 7; + } + else + { + _number = numberOfLights; + numberOfLights++; + } + + for(int i=0; i<4; i++) + { + Ambient[i] = iBrother.ambient()[i]; + Diffuse[i] = iBrother.diffuse()[i]; + Specular[i] = iBrother.specular()[i]; + Position[i] = iBrother.position()[i]; + } + + on = iBrother.isOn(); +} + +void NodeLight::accept(SceneVisitor& v) { + v.visitNodeLight(*this); +} diff --git a/extern/freestyle/src/scene_graph/NodeLight.h b/extern/freestyle/src/scene_graph/NodeLight.h new file mode 100755 index 00000000000..0689505fb24 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeLight.h @@ -0,0 +1,86 @@ +// +// Filename : NodeLight.h +// Author(s) : Stephane Grabli +// Purpose : Class to represent a light node +// Date of creation : 25/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODELIGHT_H +# define NODELIGHT_H + +# include "../geometry/Geom.h" +# include "../system/FreestyleConfig.h" +# include "Node.h" + +using namespace Geometry; + +class LIB_SCENE_GRAPH_EXPORT NodeLight : public Node +{ +public: + + NodeLight(); + NodeLight(NodeLight& iBrother); + + virtual ~NodeLight() {} + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Accessors for the light properties */ + inline const float * ambient() const {return Ambient;} + inline const float * diffuse() const {return Diffuse;} + inline const float * specular() const {return Specular;} + inline const float * position() const {return Position;} + inline bool isOn() const {return on;} + inline int number() const {return _number;} + +private: + // Data members + // ============ + + /*! on=true, the light is on */ + bool on; + + /*! The color definition */ + float Ambient[4]; + float Diffuse[4]; + float Specular[4]; + + /*! Light position. if w = 0, the light is + * placed at infinite. + */ + float Position[4]; + + /*! used to manage the number of lights */ + /*! numberOfLights + * the number of lights in the scene. + * Initially, 0. + */ + static int numberOfLights; + /*! The current lignt number */ + int _number; +}; + +#endif // NODELIGHT_H diff --git a/extern/freestyle/src/scene_graph/NodeShape.cpp b/extern/freestyle/src/scene_graph/NodeShape.cpp new file mode 100755 index 00000000000..2012ef83b9f --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeShape.cpp @@ -0,0 +1,51 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "NodeShape.h" + +NodeShape::~NodeShape() +{ + vector::iterator rep; + + if(0 != _Shapes.size()) + { + for(rep=_Shapes.begin(); rep!=_Shapes.end(); rep++) + { + int refCount = (*rep)->destroy(); + if(0 == refCount) + delete (*rep); + } + + _Shapes.clear(); + } +} + +void NodeShape::accept(SceneVisitor& v) { + v.visitNodeShape(*this); + + v.visitMaterial(_Material); + + v.visitNodeShapeBefore(*this); + vector::iterator rep; + for(rep = _Shapes.begin(); rep != _Shapes.end(); rep++) + (*rep)->accept(v); + v.visitNodeShapeAfter(*this); +} diff --git a/extern/freestyle/src/scene_graph/NodeShape.h b/extern/freestyle/src/scene_graph/NodeShape.h new file mode 100755 index 00000000000..3e963beec38 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeShape.h @@ -0,0 +1,89 @@ +// +// Filename : NodeShape.h +// Author(s) : Stephane Grabli +// Purpose : Class to build a shape node. It contains a Rep, +// which is the shape geometry +// Date of creation : 25/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODESHAPE_H +# define NODESHAPE_H + +# include +# include "../system/FreestyleConfig.h" +# include "Node.h" +# include "Rep.h" +# include "../geometry/BBox.h" +# include "../geometry/Geom.h" +# include "Material.h" + +using namespace std; +using namespace Geometry; + +class LIB_SCENE_GRAPH_EXPORT NodeShape : public Node +{ +public: + + inline NodeShape() : Node() {} + + virtual ~NodeShape(); + + /*! Adds a Rep to the _Shapes list + * The delete of the rep is done + * when it is not used any more by + * the Scene Manager. So, it must not + * be deleted by the caller + */ + virtual void AddRep(Rep *iRep) + { + if(NULL == iRep) + return; + _Shapes.push_back(iRep); + iRep->addRef(); + + // updates bbox: + AddBBox(iRep->bbox()); + } + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Sets the shape material */ + inline void SetMaterial(const Material& iMaterial) { _Material = iMaterial; } + + /*! accessors */ + /*! returns the shape's material */ + inline Material& material() { return _Material; } + inline const vector& shapes() {return _Shapes;} + +private: + /*! list of shapes */ + vector _Shapes; + + /*! Shape Material */ + Material _Material; +}; + +#endif // NODESHAPE_H diff --git a/extern/freestyle/src/scene_graph/NodeTransform.cpp b/extern/freestyle/src/scene_graph/NodeTransform.cpp new file mode 100755 index 00000000000..64e9b7a4dd6 --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeTransform.cpp @@ -0,0 +1,166 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + + +#include "../system/FreestyleConfig.h" +#include "NodeTransform.h" + +void NodeTransform::Translate(real x, real y, real z) +{ + _Matrix(0, 3) += x; + _Matrix(1, 3) += y; + _Matrix(2, 3) += z; +} + +void NodeTransform::Rotate(real iAngle, real x, real y, real z) +{ + //Normalize the x,y,z vector; + real norm = (real)sqrt(x*x+y*y+z*z); + if(0 == norm) + return; + + x /= norm; + y /= norm; + z /= norm; + + // find the corresponding matrix with the Rodrigues formula: + // R = I + sin(iAngle)*Ntilda + (1-cos(iAngle))*Ntilda*Ntilda + Matrix33r Ntilda; + Ntilda(0,0) = Ntilda(1,1) = Ntilda(2,2) = 0.f; + Ntilda(0,1) = -z; + Ntilda(0,2) = y; + Ntilda(1,0) = z; + Ntilda(1,2) = -x; + Ntilda(2,0) = -y; + Ntilda(2,1) = x; + + const Matrix33r Ntilda2(Ntilda * Ntilda); + + + const real sinAngle = (real)sin((iAngle/180.f)*M_PI); + const real cosAngle = (real)cos((iAngle/180.f)*M_PI); + + Matrix33r NS(Ntilda*sinAngle); + Matrix33r NC(Ntilda2*(1.f-cosAngle)); + Matrix33r R; + R = Matrix33r::identity(); + R += NS + NC; + + //R4 is the corresponding 4x4 matrix + Matrix44r R4; + R4 = Matrix44r::identity(); + + for(int i=0; i<3; i++) + for(int j=0; j<3; j++) + R4(i,j) = R(i,j); + + // Finally, we multiply our current matrix by R4: + Matrix44r mat_tmp(_Matrix); + _Matrix = mat_tmp * R4; +} + +void NodeTransform::Scale(real x, real y, real z) +{ + _Matrix(0,0) *= x; + _Matrix(1,1) *= y; + _Matrix(2,2) *= z; + + _Scaled = true; +} + +void NodeTransform::MultiplyMatrix(const Matrix44r &iMatrix) +{ + Matrix44r mat_tmp(_Matrix); + _Matrix = mat_tmp * iMatrix; +} + +void NodeTransform::SetMatrix(const Matrix44r &iMatrix) +{ + _Matrix = iMatrix; + if(isScaled(iMatrix)) + _Scaled = true; +} + +void NodeTransform::accept(SceneVisitor& v) { + v.visitNodeTransform(*this); + + v.visitNodeTransformBefore(*this); + for(vector::iterator node=_Children.begin(), end=_Children.end(); + node!=end; + node++) + (*node)->accept(v); + v.visitNodeTransformAfter(*this); +} + +void NodeTransform::AddBBox(const BBox& iBBox) +{ + Vec3r oldMin(iBBox.getMin()); + Vec3r oldMax(iBBox.getMax()); + + // compute the 8 corners of the bbox + HVec3r box[8]; + box[0] = HVec3r(iBBox.getMin()); + box[1] = HVec3r(oldMax[0], oldMin[1], oldMin[2]); + box[2] = HVec3r(oldMax[0], oldMax[1], oldMin[2]); + box[3] = HVec3r(oldMin[0], oldMax[1], oldMin[2]); + box[4] = HVec3r(oldMin[0], oldMin[1], oldMax[2]); + box[5] = HVec3r(oldMax[0], oldMin[1], oldMax[2]); + box[6] = HVec3r(oldMax[0], oldMax[1], oldMax[2]); + box[7] = HVec3r(oldMin[0], oldMax[1], oldMax[2]); + + // Computes the transform iBBox + HVec3r tbox[8]; + unsigned i; + for(i = 0; i < 8; i++) + tbox[i] = _Matrix * box[i]; + + Vec3r newMin(tbox[0]); + Vec3r newMax(tbox[0]); + for (i=0; i<8; i++) + { + for (unsigned int j=0; j<3; j++) + { + if (newMin[j] > tbox[i][j]) + newMin[j] = tbox[i][j]; + if (newMax[j] < tbox[i][j]) + newMax[j] = tbox[i][j]; + } + } + + BBox transformBox(newMin, newMax); + + Node::AddBBox(transformBox); +} + +bool NodeTransform::isScaled(const Matrix44r &M) +{ + for(unsigned int j=0; j<3; j++) + { + real norm = 0; + for(unsigned int i=0; i<3; i++) + { + norm += M(i,j)*M(i,j); + } + if((norm > 1.01) || (norm < 0.99)) + return true; + } + + return false; +} diff --git a/extern/freestyle/src/scene_graph/NodeTransform.h b/extern/freestyle/src/scene_graph/NodeTransform.h new file mode 100755 index 00000000000..3929c60996b --- /dev/null +++ b/extern/freestyle/src/scene_graph/NodeTransform.h @@ -0,0 +1,107 @@ +// +// Filename : NodeTransform.h +// Author(s) : Stephane Grabli +// Purpose : Class to represent a transform node. A Transform node +// contains one or several children, all affected by the +// transformation. +// Date of creation : 06/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NODETRANSFORM_H +# define NODETRANSFORM_H + +# include "../geometry/Geom.h" +# include "../system/FreestyleConfig.h" +# include "NodeGroup.h" + +using namespace Geometry; + +class LIB_SCENE_GRAPH_EXPORT NodeTransform : public NodeGroup +{ +public: + + inline NodeTransform() : NodeGroup() { + _Matrix = Matrix44r::identity(); + _Scaled=false; + } + + virtual ~NodeTransform() {} + + /*! multiplys the current matrix by the + * x, y, z translation matrix. + */ + void Translate(real x, real y, real z); + + /*! multiplys the current matrix by a + * rotation matrix + * iAngle + * The rotation angle + * x, y, z + * The rotation axis + */ + void Rotate(real iAngle, real x, real y, real z); + + /*! multiplys the current matrix by a + * scaling matrix. + * x, y, z + * The scaling coefficients + * with respect to the x,y,z axis + */ + void Scale(real x, real y, real z); + + /*! Multiplys the current matrix + * by iMatrix + */ + void MultiplyMatrix(const Matrix44r &iMatrix); + + /*! Sets the current matrix to iMatrix */ + void SetMatrix(const Matrix44r &iMatrix); + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); + + /*! Overloads the Node::AddBBox in order to take care + * about the transformation + */ + virtual void AddBBox(const BBox& iBBox); + + /*! Checks whether a matrix contains a scale factor + * or not. + * Returns true if yes. + * iMatrix + * The matrix to check + */ + bool isScaled(const Matrix44r &M); + + /*! accessors */ + inline const Matrix44r& matrix() const { return _Matrix; } + inline bool scaled() const {return _Scaled;} + +private: + Matrix44r _Matrix; + bool _Scaled; +}; + +#endif // NODETRANSFORM_H diff --git a/extern/freestyle/src/scene_graph/OrientedLineRep.cpp b/extern/freestyle/src/scene_graph/OrientedLineRep.cpp new file mode 100755 index 00000000000..2d0205308b9 --- /dev/null +++ b/extern/freestyle/src/scene_graph/OrientedLineRep.cpp @@ -0,0 +1,31 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "OrientedLineRep.h" +#include "../system/BaseObject.h" + +void OrientedLineRep::accept(SceneVisitor& v) { + Rep::accept(v); + if(!material()) + v.visitOrientedLineRep(*this); + else + v.visitLineRep(*this); +} diff --git a/extern/freestyle/src/scene_graph/OrientedLineRep.h b/extern/freestyle/src/scene_graph/OrientedLineRep.h new file mode 100755 index 00000000000..4274581e39a --- /dev/null +++ b/extern/freestyle/src/scene_graph/OrientedLineRep.h @@ -0,0 +1,67 @@ +// +// Filename : OrientedLineRep.h +// Author(s) : Stephane Grabli +// Purpose : Class to display an oriented line representation. +// Date of creation : 24/10/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWEDGEREP_H +# define VIEWEDGEREP_H + +# include "../system/FreestyleConfig.h" +# include "LineRep.h" + +class LIB_SCENE_GRAPH_EXPORT OrientedLineRep : public LineRep +{ +public: + + OrientedLineRep() : LineRep() {} + /*! Builds a single line from 2 vertices + * v1 + * first vertex + * v2 + * second vertex + */ + inline OrientedLineRep(const Vec3r& v1, const Vec3r& v2) + : LineRep(v1,v2) + {} + + /*! Builds a line rep from a vertex chain */ + inline OrientedLineRep(const vector& vertices) + : LineRep(vertices) + {} + + /*! Builds a line rep from a vertex chain */ + inline OrientedLineRep(const list& vertices) + : LineRep(vertices) + {} + + virtual ~OrientedLineRep() {} + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v); +}; + +#endif // VIEWEDGEREP_H diff --git a/extern/freestyle/src/scene_graph/Rep.cpp b/extern/freestyle/src/scene_graph/Rep.cpp new file mode 100755 index 00000000000..520d3c41e2e --- /dev/null +++ b/extern/freestyle/src/scene_graph/Rep.cpp @@ -0,0 +1 @@ +#include "Rep.h" \ No newline at end of file diff --git a/extern/freestyle/src/scene_graph/Rep.h b/extern/freestyle/src/scene_graph/Rep.h new file mode 100755 index 00000000000..6ccc2152c48 --- /dev/null +++ b/extern/freestyle/src/scene_graph/Rep.h @@ -0,0 +1,127 @@ +// +// Filename : Rep.h +// Author(s) : Stephane Grabli +// Purpose : Base class for all shapes. Inherits from BasicObjects +// for references counter management (addRef, release). +// Date of creation : 25/01/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef REP_H +# define REP_H + +# include "../system/BaseObject.h" +# include "SceneVisitor.h" +# include "../geometry/BBox.h" +# include "../geometry/Geom.h" +# include "../system/Precision.h" +# include "Material.h" +# include "../system/Id.h" + +using namespace Geometry; + +class LIB_SCENE_GRAPH_EXPORT Rep : public BaseObject +{ +public: + + inline Rep() : BaseObject() {_Id = 0; _Material=0;} + inline Rep(const Rep& iBrother) + : BaseObject() + { + _Id = iBrother._Id; + if(0 == iBrother._Material) + _Material = 0; + else + _Material = new Material(*(iBrother._Material)); + + _BBox = iBrother.bbox(); + } + inline void swap(Rep& ioOther){ + std::swap(_BBox,ioOther._BBox); + std::swap(_Id, ioOther._Id); + std::swap(_Material,ioOther._Material); + } + Rep& operator=(const Rep& iBrother){ + if(&iBrother != this){ + _Id = iBrother._Id; + if(0 == iBrother._Material) + _Material = 0; + else{ + if(_Material == 0){ + _Material = new Material(*iBrother._Material); + }else{ + (*_Material)=(*(iBrother._Material)); + } + _BBox = iBrother.bbox(); + } + } + return *this; + } + virtual ~Rep() + { + if(0 != _Material) + { + delete _Material; + _Material = 0; + } + } + + /*! Accept the corresponding visitor + * Must be overload by + * inherited classes + */ + virtual void accept(SceneVisitor& v) { + if(_Material) + v.visitMaterial(*_Material); + v.visitRep(*this); + } + + /*! Computes the rep bounding box. + * Each Inherited rep must compute + * its bbox depending on the way the data + * are stored. So, each inherited class + * must overload this method + */ + virtual void ComputeBBox() = 0; + + /*! Returns the rep bounding box */ + virtual const BBox& bbox() const {return _BBox;} + inline Id getId() const {return _Id;} + inline const Material * material() const {return _Material;} + + /*! Sets the Rep bounding box */ + virtual void SetBBox(const BBox& iBox) {_BBox = iBox;} + inline void SetId(const Id& id) {_Id = id;} + inline void SetMaterial(const Material& iMaterial) + { + _Material = new Material(iMaterial); + } + +private: + BBox _BBox; + Id _Id; + Material *_Material; +}; + +#endif // REP_H diff --git a/extern/freestyle/src/scene_graph/ScenePrettyPrinter.cpp b/extern/freestyle/src/scene_graph/ScenePrettyPrinter.cpp new file mode 100755 index 00000000000..aeee87f8222 --- /dev/null +++ b/extern/freestyle/src/scene_graph/ScenePrettyPrinter.cpp @@ -0,0 +1,86 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "ScenePrettyPrinter.h" +#include "IndexedFaceSet.h" + +#define VISIT(CLASS) \ + void ScenePrettyPrinter::visit##CLASS(CLASS&) { \ + _ofs << _space << #CLASS << endl; \ + } + +VISIT(Node) +VISIT(NodeShape) +VISIT(NodeGroup) +VISIT(NodeLight) +VISIT(NodeDrawingStyle) +VISIT(NodeTransform) + +void ScenePrettyPrinter::visitNodeShapeBefore(NodeShape&) { + increaseSpace(); +} + +void ScenePrettyPrinter::visitNodeShapeAfter(NodeShape&) { + decreaseSpace(); +} + +void ScenePrettyPrinter::visitNodeGroupBefore(NodeGroup&) { + increaseSpace(); +} + +void ScenePrettyPrinter::visitNodeGroupAfter(NodeGroup&) { + decreaseSpace(); +} + +void ScenePrettyPrinter::visitNodeDrawingStyleBefore(NodeDrawingStyle&) { + increaseSpace(); +} + +void ScenePrettyPrinter::visitNodeDrawingStyleAfter(NodeDrawingStyle&) { + decreaseSpace(); +} + +void ScenePrettyPrinter::visitNodeTransformBefore(NodeTransform&) { + increaseSpace(); +} + +void ScenePrettyPrinter::visitNodeTransformAfter(NodeTransform&) { + decreaseSpace(); +} + +VISIT(LineRep) +VISIT(OrientedLineRep) +VISIT(TriangleRep) +VISIT(VertexRep) + +void ScenePrettyPrinter::visitIndexedFaceSet(IndexedFaceSet& ifs) { + const real* vertices = ifs.vertices(); + unsigned vsize = ifs.vsize(); + + _ofs << _space << "IndexedFaceSet" << endl; + const real *p = vertices; + for (unsigned i = 0; i < vsize / 3; i++) { + _ofs << _space << " " << setw(3) << setfill('0') << i << ": " + << p[0] << ", " << p[1] << ", " << p[2] << endl; + p += 3; + } +} diff --git a/extern/freestyle/src/scene_graph/ScenePrettyPrinter.h b/extern/freestyle/src/scene_graph/ScenePrettyPrinter.h new file mode 100755 index 00000000000..4e83825ff55 --- /dev/null +++ b/extern/freestyle/src/scene_graph/ScenePrettyPrinter.h @@ -0,0 +1,105 @@ +// +// Filename : ScenePrettyPrinter.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class to display textual information +// about a scene graph. +// Date of creation : 26/04/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SCENE_PRETTY_PRINTER_H +# define SCENE_PRETTY_PRINTER_H + +# include +# include +# include +# include "SceneVisitor.h" + +using namespace std; + +class ScenePrettyPrinter : public SceneVisitor +{ +public: + + ScenePrettyPrinter(const string filename = "SceneLog.txt") + : SceneVisitor() { + if (!filename.empty()) + _ofs.open(filename.c_str()); + if (!_ofs.is_open()) + cerr << "Warning, unable to open file \"" << filename << "\"" << endl; + _space = ""; + } + + virtual ~ScenePrettyPrinter() { + if (_ofs.is_open()) + _ofs.close(); + } + + + // + // visitClass methods + // + ////////////////////////////////////////////// + + VISIT_DECL(Node) + VISIT_DECL(NodeShape) + VISIT_DECL(NodeGroup) + VISIT_DECL(NodeLight) + VISIT_DECL(NodeDrawingStyle) + VISIT_DECL(NodeTransform) + + VISIT_DECL(LineRep) + VISIT_DECL(OrientedLineRep) + VISIT_DECL(TriangleRep) + VISIT_DECL(VertexRep) + VISIT_DECL(IndexedFaceSet) + + virtual void visitNodeShapeBefore(NodeShape&); + virtual void visitNodeShapeAfter(NodeShape&); + virtual void visitNodeGroupBefore(NodeGroup&); + virtual void visitNodeGroupAfter(NodeGroup&); + virtual void visitNodeDrawingStyleBefore(NodeDrawingStyle&); + virtual void visitNodeDrawingStyleAfter(NodeDrawingStyle&); + virtual void visitNodeTransformBefore(NodeTransform&); + virtual void visitNodeTransformAfter(NodeTransform&); + + protected: + + void increaseSpace() + { + _space += " "; + } + + void decreaseSpace() + { + _space.erase(0, 2); + } + + private: + + ofstream _ofs; + string _space; +}; + +#endif // SCENE_PRETTY_PRINTER_H diff --git a/extern/freestyle/src/scene_graph/SceneVisitor.cpp b/extern/freestyle/src/scene_graph/SceneVisitor.cpp new file mode 100755 index 00000000000..9cfb9d40d24 --- /dev/null +++ b/extern/freestyle/src/scene_graph/SceneVisitor.cpp @@ -0,0 +1 @@ +#include "SceneVisitor.h" \ No newline at end of file diff --git a/extern/freestyle/src/scene_graph/SceneVisitor.h b/extern/freestyle/src/scene_graph/SceneVisitor.h new file mode 100755 index 00000000000..c57bd2e0f6e --- /dev/null +++ b/extern/freestyle/src/scene_graph/SceneVisitor.h @@ -0,0 +1,98 @@ +// +// Filename : SceneVisitor.h +// Author(s) : Emmanuel Turquin +// Purpose : Class to visit (without doing anything) +// a scene graph structure +// Date of creation : 26/04/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SCENE_VISITOR_H +# define SCENE_VISITOR_H + +# define VISIT_COMPLETE_DEF(type) \ +virtual void visit##type(type&) {} \ +virtual void visit##type##Before(type&) {} \ +virtual void visit##type##After(type&) {} + +# define VISIT_DECL(type) virtual void visit##type(type&); + +# define VISIT_COMPLETE_DECL(type) \ + virtual void visit##type##Before(type&); \ + virtual void visit##type(type&); \ + virtual void visit##type##After(type&); + +#include "../system/FreestyleConfig.h" + +class Node; +class NodeShape; +class NodeGroup; +class NodeLight; +class NodeCamera; +class NodeDrawingStyle; +class NodeTransform; + +class Rep; +class LineRep; +class OrientedLineRep; +class TriangleRep; +class VertexRep; +class IndexedFaceSet; +class DrawingStyle; +class Material; + +class LIB_SCENE_GRAPH_EXPORT SceneVisitor +{ +public: + + SceneVisitor() {} + virtual ~SceneVisitor() {} + + virtual void beginScene() {} + virtual void endScene() {} + + // + // visitClass methods + // + ////////////////////////////////////////////// + + VISIT_COMPLETE_DEF(Node) + VISIT_COMPLETE_DEF(NodeShape) + VISIT_COMPLETE_DEF(NodeGroup) + VISIT_COMPLETE_DEF(NodeLight) + VISIT_COMPLETE_DEF(NodeCamera) + VISIT_COMPLETE_DEF(NodeDrawingStyle) + VISIT_COMPLETE_DEF(NodeTransform) + + VISIT_COMPLETE_DEF(Rep) + VISIT_COMPLETE_DEF(LineRep) + VISIT_COMPLETE_DEF(OrientedLineRep) + VISIT_COMPLETE_DEF(TriangleRep) + VISIT_COMPLETE_DEF(VertexRep) + VISIT_COMPLETE_DEF(IndexedFaceSet) + VISIT_COMPLETE_DEF(DrawingStyle) + VISIT_COMPLETE_DEF(Material) +}; + +#endif // SCENEVISITOR_H diff --git a/extern/freestyle/src/scene_graph/TriangleRep.cpp b/extern/freestyle/src/scene_graph/TriangleRep.cpp new file mode 100755 index 00000000000..215124b0676 --- /dev/null +++ b/extern/freestyle/src/scene_graph/TriangleRep.cpp @@ -0,0 +1,59 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "TriangleRep.h" + +void TriangleRep::ComputeBBox() +{ + real XMax = _vertices[0][0]; + real YMax = _vertices[0][1]; + real ZMax = _vertices[0][2]; + + real XMin = _vertices[0][0]; + real YMin = _vertices[0][1]; + real ZMin = _vertices[0][2]; + + // parse all the coordinates to find + // the XMax, YMax, ZMax + for(int i=0; i<3; ++i) + { + // X + if(_vertices[i][0] > XMax) + XMax = _vertices[i][0]; + if(_vertices[i][0] < XMin) + XMin = _vertices[i][0]; + + // Y + if(_vertices[i][1] > YMax) + YMax = _vertices[i][1]; + if(_vertices[i][1] < YMin) + YMin = _vertices[i][1]; + + // Z + if(_vertices[i][2] > ZMax) + ZMax = _vertices[i][2]; + if(_vertices[i][2] < ZMin) + ZMin = _vertices[i][2]; + + } + + SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); +} diff --git a/extern/freestyle/src/scene_graph/TriangleRep.h b/extern/freestyle/src/scene_graph/TriangleRep.h new file mode 100755 index 00000000000..20df12cfd8f --- /dev/null +++ b/extern/freestyle/src/scene_graph/TriangleRep.h @@ -0,0 +1,106 @@ +// +// Filename : TriangleRep.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the represenation of a triangle +// Date of creation : 16/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef TRIANGLEREP_H +# define TRIANGLEREP_H + +//! inherits from class Rep +#include "Rep.h" + +/*! Base class for all lines objects */ +class LIB_SCENE_GRAPH_EXPORT TriangleRep : public Rep +{ +public: + + /*! Line description style */ + enum TRIANGLE_STYLE{FILL, LINES}; +private: + TRIANGLE_STYLE _Style; + Vec3r _vertices[3]; + Vec3r _colors[3]; +public: + inline TriangleRep() : Rep() {_Style = FILL;} + + /*! Builds a triangle from 3 vertices + * v0 + * first vertex + * v1 + * second vertex + * v2 + * third vertex + */ + inline TriangleRep(const Vec3r& v0, const Vec3r& v1, const Vec3r& v2) + : Rep() + { + _vertices[0] = v0; + _vertices[1] = v1; + _vertices[2] = v2; + _Style = FILL; + } + inline TriangleRep( const Vec3r& v0, const Vec3r& c0, + const Vec3r& v1, const Vec3r& c1, + const Vec3r& v2, const Vec3r& c2) + : Rep() + { + _vertices[0] = v0; + _vertices[1] = v1; + _vertices[2] = v2; + _colors[0] = c0; + _colors[1] = c1; + _colors[2] = c2; + _Style = FILL; + } + + virtual ~TriangleRep() + {} + + /*! accessors */ + inline const TRIANGLE_STYLE style() const {return _Style;} + inline const Vec3r& vertex(int index) const {return _vertices[index];} + inline const Vec3r& color(int index) const {return _colors[index];} + /*! modifiers */ + inline void SetStyle(const TRIANGLE_STYLE iStyle) {_Style = iStyle;} + inline void SetVertex(int index, const Vec3r& iVertex) {_vertices[index] = iVertex;} + inline void SetColor(int index, const Vec3r& iColor) {_colors[index] = iColor;} + inline void SetVertices(const Vec3r& v0, const Vec3r& v1, const Vec3r& v2) {_vertices[0] = v0; _vertices[1] = v1; _vertices[2] = v2;} + inline void SetColors(const Vec3r& c0, const Vec3r& c1, const Vec3r& c2) {_colors[0] = c0; _colors[1] = c1; _colors[2] = c2;} + + /*! Accept the corresponding visitor */ + virtual void accept(SceneVisitor& v) { + Rep::accept(v); + v.visitTriangleRep(*this); + } + + /*! Computes the triangle bounding box.*/ + virtual void ComputeBBox(); + + +}; + +#endif diff --git a/extern/freestyle/src/scene_graph/VertexRep.cpp b/extern/freestyle/src/scene_graph/VertexRep.cpp new file mode 100755 index 00000000000..1ecb5f141e1 --- /dev/null +++ b/extern/freestyle/src/scene_graph/VertexRep.cpp @@ -0,0 +1,29 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "VertexRep.h" + +void VertexRep::ComputeBBox() +{ + + SetBBox(BBox(Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]), + Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]))); +} diff --git a/extern/freestyle/src/scene_graph/VertexRep.h b/extern/freestyle/src/scene_graph/VertexRep.h new file mode 100755 index 00000000000..9dce7fbbe9c --- /dev/null +++ b/extern/freestyle/src/scene_graph/VertexRep.h @@ -0,0 +1,87 @@ +// +// Filename : VertexRep.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the representation of a vertex for +// displaying purpose. +// Date of creation : 03/04/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VERTEXREP_H +# define VERTEXREP_H + +#include "Rep.h" + +class LIB_SCENE_GRAPH_EXPORT VertexRep : public Rep +{ +public: + + inline VertexRep() : Rep() {_vid = 0;_PointSize = 0.f;} + inline VertexRep(real x, real y, real z, int id = 0) + : Rep() + { + _coordinates[0] = x; + _coordinates[1] = y; + _coordinates[2] = z; + + _vid = id; + _PointSize = 0.f; + } + + inline ~VertexRep() {} + + /*! Accept the corresponding visitor */ + + virtual void accept(SceneVisitor& v) { + Rep::accept(v); + v.visitVertexRep(*this); + } + + /*! Computes the rep bounding box. + */ + virtual void ComputeBBox(); + + /*! accessors */ + inline const int vid() const {return _vid;} + inline const real * coordinates() const {return _coordinates;} + inline real x() const {return _coordinates[0];} + inline real y() const {return _coordinates[1];} + inline real z() const {return _coordinates[2];} + inline float pointSize() const {return _PointSize;} + + /*! modifiers */ + inline void SetVid(int id) {_vid = id;} + inline void setX(real x) {_coordinates[0] = x;} + inline void setY(real y) {_coordinates[1] = y;} + inline void setZ(real z) {_coordinates[2] = z;} + inline void SetCoordinates(real x, real y, real z) {_coordinates[0] = x;_coordinates[1] = y; _coordinates[2] = z;} + inline void SetPointSize(float iPointSize) {_PointSize = iPointSize;} + +private: + int _vid; // vertex id + real _coordinates[3]; + float _PointSize; +}; + +#endif // VERTEXREP_H diff --git a/extern/freestyle/src/scene_graph/scene_graph.pro b/extern/freestyle/src/scene_graph/scene_graph.pro new file mode 100755 index 00000000000..5736104a597 --- /dev/null +++ b/extern/freestyle/src/scene_graph/scene_graph.pro @@ -0,0 +1,86 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_SCENE_GRAPH} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll 3ds$${LIB3DS_VERSION_MAJ}.$${LIB3DS_VERSION_MIN} + + +exists (../libconfig.pri) { + include (../libconfig.pri) +} +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_SCENE_GRAPH_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../geometry ../system + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# LIBS +# +####################################### + +win32:LIBS *= $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib +!win32 { + lib_bundle { + LIBS += -F$${DESTDIR} -framework $${LIB_GEOMETRY} \ + -framework $${LIB_SYSTEM} + } else { + LIBS *= -L$${DESTDIR}/ -l$${LIB_GEOMETRY} -l$${LIB_SYSTEM} + } +} + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} diff --git a/extern/freestyle/src/scene_graph/src.pri b/extern/freestyle/src/scene_graph/src.pri new file mode 100755 index 00000000000..994db200812 --- /dev/null +++ b/extern/freestyle/src/scene_graph/src.pri @@ -0,0 +1,41 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +SCENE_GRAPH_DIR = ../scene_graph + +SOURCES *= $${SCENE_GRAPH_DIR}/IndexedFaceSet.cpp \ + $${SCENE_GRAPH_DIR}/LineRep.cpp \ + $${SCENE_GRAPH_DIR}/MaxFileLoader.cpp \ + $${SCENE_GRAPH_DIR}/NodeCamera.cpp \ + $${SCENE_GRAPH_DIR}/NodeDrawingStyle.cpp \ + $${SCENE_GRAPH_DIR}/NodeGroup.cpp \ + $${SCENE_GRAPH_DIR}/NodeLight.cpp \ + $${SCENE_GRAPH_DIR}/NodeShape.cpp \ + $${SCENE_GRAPH_DIR}/NodeTransform.cpp \ + $${SCENE_GRAPH_DIR}/OrientedLineRep.cpp \ + $${SCENE_GRAPH_DIR}/ScenePrettyPrinter.cpp \ + $${SCENE_GRAPH_DIR}/TriangleRep.cpp \ + $${SCENE_GRAPH_DIR}/VertexRep.cpp \ + $${SCENE_GRAPH_DIR}/Rep.cpp \ + $${SCENE_GRAPH_DIR}/SceneVisitor.cpp + +HEADERS *= $${SCENE_GRAPH_DIR}/DrawingStyle.h \ + $${SCENE_GRAPH_DIR}/IndexedFaceSet.h \ + $${SCENE_GRAPH_DIR}/LineRep.h \ + $${SCENE_GRAPH_DIR}/Material.h \ + $${SCENE_GRAPH_DIR}/MaxFileLoader.h \ + $${SCENE_GRAPH_DIR}/Node.h \ + $${SCENE_GRAPH_DIR}/NodeCamera.h \ + $${SCENE_GRAPH_DIR}/NodeDrawingStyle.h \ + $${SCENE_GRAPH_DIR}/NodeGroup.h \ + $${SCENE_GRAPH_DIR}/NodeLight.h \ + $${SCENE_GRAPH_DIR}/NodeShape.h \ + $${SCENE_GRAPH_DIR}/NodeTransform.h \ + $${SCENE_GRAPH_DIR}/OrientedLineRep.h \ + $${SCENE_GRAPH_DIR}/Rep.h \ + $${SCENE_GRAPH_DIR}/ScenePrettyPrinter.h \ + $${SCENE_GRAPH_DIR}/SceneVisitor.h \ + $${SCENE_GRAPH_DIR}/TriangleRep.h \ + $${SCENE_GRAPH_DIR}/VertexRep.h diff --git a/extern/freestyle/src/stroke/AdvancedFunctions0D.cpp b/extern/freestyle/src/stroke/AdvancedFunctions0D.cpp new file mode 100755 index 00000000000..c22e183eccb --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedFunctions0D.cpp @@ -0,0 +1,85 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "../view_map/Functions0D.h" +# include "AdvancedFunctions0D.h" +# include "../view_map/SteerableViewMap.h" +# include "Canvas.h" + +namespace Functions0D { + + double DensityF0D::operator()(Interface0DIterator& iter) { + Canvas* canvas = Canvas::getInstance(); + int bound = _filter.getBound(); + if( (iter->getProjectedX()-bound < 0) || (iter->getProjectedX()+bound>canvas->width()) + || (iter->getProjectedY()-bound < 0) || (iter->getProjectedY()+bound>canvas->height())) + return 0.0; + RGBImage image; + canvas->readColorPixels((int)iter->getProjectedX() - bound, + (int)iter->getProjectedY() - bound, + _filter.maskSize(), + _filter.maskSize(), + image); + return _filter.getSmoothedPixel(&image, (int)iter->getProjectedX(), + (int)iter->getProjectedY()); + } + + + double LocalAverageDepthF0D::operator()(Interface0DIterator& iter) { + Canvas * iViewer = Canvas::getInstance(); + int bound = _filter.getBound(); + + if( (iter->getProjectedX()-bound < 0) || (iter->getProjectedX()+bound>iViewer->width()) + || (iter->getProjectedY()-bound < 0) || (iter->getProjectedY()+bound>iViewer->height())) + return 0.0; + GrayImage image ; + iViewer->readDepthPixels((int)iter->getProjectedX()-bound,(int)iter->getProjectedY()-bound,_filter.maskSize(),_filter.maskSize(),image); + return _filter.getSmoothedPixel(&image, (int)iter->getProjectedX(), (int)iter->getProjectedY()); + } + + float ReadMapPixelF0D::operator()(Interface0DIterator& iter) { + Canvas * canvas = Canvas::getInstance(); + return canvas->readMapPixel(_mapName, _level, (int)iter->getProjectedX(), (int)iter->getProjectedY()); + } + + float ReadSteerableViewMapPixelF0D::operator()(Interface0DIterator& iter) { + SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); + float v = svm->readSteerableViewMapPixel(_orientation, _level,(int)iter->getProjectedX(), (int)iter->getProjectedY()); + return v; + } + + float ReadCompleteViewMapPixelF0D::operator()(Interface0DIterator& iter) { + SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); + float v = svm->readCompleteViewMapPixel(_level,(int)iter->getProjectedX(), (int)iter->getProjectedY()); + return v; + } + + float GetViewMapGradientNormF0D::operator()(Interface0DIterator& iter){ + SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); + float pxy = svm->readCompleteViewMapPixel(_level,(int)iter->getProjectedX(), (int)iter->getProjectedY()); + float gx = svm->readCompleteViewMapPixel(_level,(int)iter->getProjectedX()+_step, (int)iter->getProjectedY()) + - pxy; + float gy = svm->readCompleteViewMapPixel(_level,(int)iter->getProjectedX(), (int)iter->getProjectedY()+_step) + - pxy; + float f = Vec2f(gx,gy).norm(); + return f; + } +} // end of namespace Functions0D diff --git a/extern/freestyle/src/stroke/AdvancedFunctions0D.h b/extern/freestyle/src/stroke/AdvancedFunctions0D.h new file mode 100755 index 00000000000..d92575cf110 --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedFunctions0D.h @@ -0,0 +1,209 @@ +// +// Filename : AdvancedFunctions0D.h +// Author(s) : Stephane Grabli +// Emmanuel Turquin +// Purpose : Functions taking 0D input +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ADVANCED_FUNCTIONS0D_HPP +# define ADVANCED_FUNCTIONS0D_HPP + + +# include "../image/Image.h" +# include "../image/GaussianFilter.h" +# include "../view_map/Functions0D.h" + +// +// Functions definitions +// +/////////////////////////////////////////////////////////// + +namespace Functions0D { + + // DensityF0D + /*! Returns the density of the (result) image evaluated at an Interface0D. + * This density is evaluated using a pixels square window around the + * evaluation point and integrating these values using + * a gaussian. + */ + class LIB_STROKE_EXPORT DensityF0D : public UnaryFunction0D + { + public: + /*! Builds the functor from the gaussian sigma value. + * \param sigma + * sigma indicates the x value for which the gaussian + * function is 0.5. It leads to the window size + * value. (the larger, the smoother) + */ + DensityF0D(double sigma = 2) : UnaryFunction0D() { + _filter.SetSigma((float)sigma); + } + /*! Returns the string "DensityF0D"*/ + string getName() const { + return "DensityF0D"; + } + /*! The () operator. */ + double operator()(Interface0DIterator& iter); + + private: + + GaussianFilter _filter; + }; + + // LocalAverageDepthF0D + /*! Returns the average depth around a point. + * The result is obtained by querying the + * depth buffer on a window around that point. + */ + class LIB_STROKE_EXPORT LocalAverageDepthF0D : public UnaryFunction0D + { + private: + GaussianFilter _filter; + public: + /*! Builds the functor from the size of the mask that + * will be used. + */ + LocalAverageDepthF0D(real maskSize=5.f) : UnaryFunction0D() { + _filter.SetSigma((float)maskSize/2.f); + } + /*! Returns the string "LocalAverageDepthF0D"*/ + string getName() const { + return "LocalAverageDepthF0D"; + } + /*! the () operator.*/ + double operator()(Interface0DIterator& iter); + }; + + // ReadMapPixel + /*! Reads a pixel in a map. + */ + class LIB_STROKE_EXPORT ReadMapPixelF0D : public UnaryFunction0D + { + private: + const char * _mapName; + int _level; + public: + /*! Builds the functor from name of the + * Map that must be read. + * \param iMapName + * The name of the map. + * \param level + * The level of the pyramid from which + * the pixel must be read. + */ + ReadMapPixelF0D(const char *iMapName, int level) : UnaryFunction0D() { + _mapName = iMapName; + _level = level; + } + /*! Returns the string "ReadMapPixelF0D"*/ + string getName() const { + return "ReadMapPixelF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter); + }; + + // ReadSteerableViewMapPixel + /*! Reads a pixel in one of the level of one of the steerable viewmaps. + */ + class LIB_STROKE_EXPORT ReadSteerableViewMapPixelF0D : public UnaryFunction0D + { + private: + unsigned _orientation; + int _level; + public: + /*! Builds the functor + * \param nOrientation + * The integer belonging to [0,4] indicating the orientation (E,NE,N,NW) + * we are interested in. + * \param level + * The level of the pyramid from which + * the pixel must be read. + */ + ReadSteerableViewMapPixelF0D(unsigned nOrientation, int level) : UnaryFunction0D() { + _orientation = nOrientation; + _level = level; + } + /*! Returns the string "ReadSteerableViewMapPixelF0D"*/ + string getName() const { + return "ReadSteerableViewMapPixelF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter); + }; + + // ReadCompleteViewMapPixel + /*! Reads a pixel in one of the level of the complete viewmap. + */ + class LIB_STROKE_EXPORT ReadCompleteViewMapPixelF0D : public UnaryFunction0D + { + private: + int _level; + public: + /*! Builds the functor + * \param level + * The level of the pyramid from which + * the pixel must be read. + */ + ReadCompleteViewMapPixelF0D(int level) : UnaryFunction0D() { + _level = level; + } + /*! Returns the string "ReadCompleteViewMapPixelF0D"*/ + string getName() const { + return "ReadCompleteViewMapPixelF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter); + }; + + // GetViewMapGradientNormF0D + /*! Returns the norm of the gradient of the global viewmap density image. + */ + class LIB_STROKE_EXPORT GetViewMapGradientNormF0D: public UnaryFunction0D< float> + { + private: + int _level; + float _step; + public: + /*! Builds the functor + * \param level + * The level of the pyramid from which + * the pixel must be read. + */ + GetViewMapGradientNormF0D(int level) : UnaryFunction0D() { + _level = level; + _step = (float)pow(2.0,_level); + } + /*! Returns the string "GetOccludeeF0D"*/ + string getName() const { + return "GetViewMapGradientNormF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter); + }; +} // end of namespace Functions0D + +#endif // ADVANCED_FUNCTIONS0D_HPP diff --git a/extern/freestyle/src/stroke/AdvancedFunctions1D.cpp b/extern/freestyle/src/stroke/AdvancedFunctions1D.cpp new file mode 100755 index 00000000000..cf2982606e0 --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedFunctions1D.cpp @@ -0,0 +1,108 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "AdvancedFunctions1D.h" +# include "../view_map/SteerableViewMap.h" +# include "Canvas.h" + +// FIXME +namespace Functions1D { + + real GetSteerableViewMapDensityF1D::operator()(Interface1D& inter) { + SteerableViewMap * svm = Canvas::getInstance()->getSteerableViewMap(); + Interface0DIterator it = inter.pointsBegin(_sampling); + Interface0DIterator itnext = it;++itnext; + FEdge *fe; + unsigned nSVM; + vector values; + while(!itnext.isEnd()){ + Interface0D& i0D = (*it); + Interface0D& i0Dnext = (*itnext); + fe = i0D.getFEdge(i0Dnext); + if(fe == 0){ + cerr << "GetSteerableViewMapDensityF1D warning: no FEdge between " << i0D.getId() << " and " << i0Dnext.getId() << endl; + // compute the direction between these two ??? + Vec2f dir = i0Dnext.getPoint2D()-i0D.getPoint2D(); + nSVM = svm->getSVMNumber(dir); + }else{ + nSVM = svm->getSVMNumber(fe->getId().getFirst()); + } + Vec2r m((i0D.getProjectedX()+i0Dnext.getProjectedX())/2.0, + (i0D.getProjectedY()+i0Dnext.getProjectedY())/2.0); + values.push_back(svm->readSteerableViewMapPixel(nSVM,_level,(int)m[0],(int)m[1])); + ++it;++itnext; + } + float res, res_tmp; + vector::iterator v = values.begin(), vend=values.end(); + unsigned size = 1; + switch(_integration) { + case MIN: + res = *v;++v; + for (; v!=vend; ++v) { + res_tmp = *v; + if (res_tmp < res) + res = res_tmp; + } + break; + case MAX: + res = *v;++v; + for (; v!=vend; ++v) { + res_tmp = *v; + if (res_tmp > res) + res = res_tmp; + } + break; + case FIRST: + res = *v; + break; + case LAST: + --vend; + res = *vend; + break; + case MEAN: + default: + res = *v;++v; + for (; v!=vend; ++v, ++size) + res += *v; + res /= (size ? size : 1); + break; + } + return res; + } + + double GetDirectionalViewMapDensityF1D::operator()(Interface1D& inter) { + unsigned size; + double res = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); + return res; + } + + double GetCompleteViewMapDensityF1D::operator()(Interface1D& inter) { + unsigned size; + Id id = inter.getId(); + double res = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); + return res; + } + + real GetViewMapGradientNormF1D::operator()(Interface1D& inter){ + return integrate(_func, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); + } +} + diff --git a/extern/freestyle/src/stroke/AdvancedFunctions1D.h b/extern/freestyle/src/stroke/AdvancedFunctions1D.h new file mode 100755 index 00000000000..65b0eec36fd --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedFunctions1D.h @@ -0,0 +1,286 @@ +// +// Filename : AdvancedFunctions1D.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Functions taking 1D input +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ADVANCED_FUNCTIONS1D_HPP +# define ADVANCED_FUNCTIONS1D_HPP + + +# include "AdvancedFunctions0D.h" +# include "../view_map/Functions1D.h" + +// +// Functions definitions +// +/////////////////////////////////////////////////////////// + +namespace Functions1D { + + // DensityF1D + /*! Returns the density evaluated for an Interface1D. + * The density is evaluated for a set of points along + * the Interface1D (using the DensityF0D functor) + * with a user-defined sampling and + * then integrated into a single value using + * a user-defined integration method. + */ + class DensityF1D : public UnaryFunction1D + { + private: + float _sampling; + public: + /*! Builds the functor. + * \param sigma + * Thesigma used in DensityF0D and determining + * the window size used in each density query. + * \param iType + * The integration method used to compute + * a single value from a set of values. + * \param sampling + * The resolution used to sample the chain: the corresponding 0D function + * is evaluated at each sample point and the result is obtained by + * combining the resulting values into a single one, following the + * method specified by iType. + */ + DensityF1D(double sigma = 2, IntegrationType iType = MEAN, float sampling=2.f) : UnaryFunction1D(iType), _fun(sigma) { + _sampling = sampling; + } + /*! Destructor */ + virtual ~DensityF1D(){} + + /*! Returns the string "DensityF1D"*/ + string getName() const { + return "DensityF1D"; + } + /*! the () operator.*/ + double operator()(Interface1D& inter) { + return integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); + } + private: + Functions0D::DensityF0D _fun; + }; + + // LocalAverageDepthF1D + /*! Returns the average depth evaluated for an Interface1D. + * The average depth is evaluated for a set of points along + * the Interface1D (using the LocalAverageDepthF0D functor) + * with a user-defined sampling and + * then integrated into a single value using + * a user-defined integration method. + */ + class LocalAverageDepthF1D : public UnaryFunction1D + { + public: + /*! Builds the functor. + * \param sigma + * The sigma used in DensityF0D and determining + * the window size used in each density query. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + LocalAverageDepthF1D(real sigma, IntegrationType iType = MEAN) + : UnaryFunction1D(iType), _fun(sigma){ + } + /*! Returns the string "LocalAverageDepthF1D"*/ + string getName() const { + return "LocalAverageDepthF1D"; + } + /*! the () operator.*/ + double operator()(Interface1D& inter) { + return integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + private: + Functions0D::LocalAverageDepthF0D _fun; + }; + + // GetCompleteViewMapDensity + /*! Returns the density evaluated for an Interface1D in the + * complete viewmap image. + * The density is evaluated for a set of points along + * the Interface1D (using the ReadCompleteViewMapPixelF0D functor) + * and then integrated into a single value using + * a user-defined integration method. + */ + class LIB_STROKE_EXPORT GetCompleteViewMapDensityF1D : public UnaryFunction1D + { + public: + /*! Builds the functor. + * \param level + * The level of the pyramid from which + * the pixel must be read. + * \param iType + * The integration method used to compute + * a single value from a set of values. + * \param sampling + * The resolution used to sample the chain: the corresponding 0D function + * is evaluated at each sample point and the result is obtained by + * combining the resulting values into a single one, following the + * method specified by iType. + */ + GetCompleteViewMapDensityF1D(unsigned level, IntegrationType iType = MEAN, float sampling=2.f) + : UnaryFunction1D(iType), _fun(level){_sampling = sampling;} + /*! Returns the string "GetCompleteViewMapDensityF1D"*/ + string getName() const { + return "GetCompleteViewMapDensityF1D"; + } + /*! the () operator.*/ + double operator()(Interface1D& inter); + + private: + Functions0D::ReadCompleteViewMapPixelF0D _fun; + float _sampling; + }; + + // GetDirectionalViewMapDensity + /*! Returns the density evaluated for an Interface1D in of the + * steerable viewmaps image. + * The direction telling which Directional map to choose + * is explicitely specified by the user. + * The density is evaluated for a set of points along + * the Interface1D (using the ReadSteerableViewMapPixelF0D functor) + * and then integrated into a single value using + * a user-defined integration method. + */ + class LIB_STROKE_EXPORT GetDirectionalViewMapDensityF1D : public UnaryFunction1D + { + public: + /*! Builds the functor. + * \param iOrientation + * The number of the directional map + * we must work with. + * \param level + * The level of the pyramid from which + * the pixel must be read. + * \param iType + * The integration method used to compute + * a single value from a set of values. + * \param sampling + * The resolution used to sample the chain: the corresponding 0D function + * is evaluated at each sample point and the result is obtained by + * combining the resulting values into a single one, following the + * method specified by iType. + */ + GetDirectionalViewMapDensityF1D(unsigned iOrientation, unsigned level, IntegrationType iType = MEAN, float sampling=2.f) + : UnaryFunction1D(iType), _fun(iOrientation,level){_sampling = sampling;} + /*! Returns the string "GetDirectionalViewMapDensityF1D"*/ + string getName() const { + return "GetDirectionalViewMapDensityF1D"; + } + /*! the () operator.*/ + double operator()(Interface1D& inter); + + private: + Functions0D::ReadSteerableViewMapPixelF0D _fun; + float _sampling; + }; + + // GetSteerableViewMapDensityF1D + /*! Returns the density of the viewmap + * for a given Interface1D. The density of each + * FEdge is evaluated in the proper steerable + * ViewMap depending on its oorientation. + */ + class LIB_STROKE_EXPORT GetSteerableViewMapDensityF1D : public UnaryFunction1D + { + private: + int _level; + float _sampling; + public: + /*! Builds the functor from the level + * of the pyramid from which the pixel must be read. + * \param level + * The level of the pyramid from which + * the pixel must be read. + * \param iType + * The integration method used to compute + * a single value from a set of values. + * \param sampling + * The resolution used to sample the chain: the corresponding 0D function + * is evaluated at each sample point and the result is obtained by + * combining the resulting values into a single one, following the + * method specified by iType. + */ + GetSteerableViewMapDensityF1D(int level,IntegrationType iType = MEAN, float sampling=2.f) : UnaryFunction1D(iType) { + _level = level; + _sampling = sampling; + } + /*! Destructor */ + virtual ~GetSteerableViewMapDensityF1D(){} + + /*! Returns the string "GetSteerableViewMapDensityF1D"*/ + string getName() const { + return "GetSteerableViewMapDensityF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; + + // GetViewMapGradientNormF1D + /*! Returns the density of the viewmap + * for a given Interface1D. The density of each + * FEdge is evaluated in the proper steerable + * ViewMap depending on its oorientation. + */ + class LIB_STROKE_EXPORT GetViewMapGradientNormF1D : public UnaryFunction1D + { + private: + int _level; + float _sampling; + Functions0D::GetViewMapGradientNormF0D _func; + public: + /*! Builds the functor from the level + * of the pyramid from which the pixel must be read. + * \param level + * The level of the pyramid from which + * the pixel must be read. + * \param iType + * The integration method used to compute + * a single value from a set of values. + * \param sampling + * The resolution used to sample the chain: the corresponding 0D function + * is evaluated at each sample point and the result is obtained by + * combining the resulting values into a single one, following the + * method specified by iType. + */ + GetViewMapGradientNormF1D(int level,IntegrationType iType = MEAN, float sampling=2.f) + : UnaryFunction1D(iType), _func(level) { + _level = level; + _sampling = sampling; + } + + /*! Returns the string "GetSteerableViewMapDensityF1D"*/ + string getName() const { + return "GetViewMapGradientNormF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; +} // end of namespace Functions1D + +#endif // ADVANCED_FUNCTIONS1D_HPP diff --git a/extern/freestyle/src/stroke/AdvancedPredicates1D.h b/extern/freestyle/src/stroke/AdvancedPredicates1D.h new file mode 100755 index 00000000000..f348f8593e5 --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedPredicates1D.h @@ -0,0 +1,81 @@ +// +// Filename : AdvancedPredicates1D.h +// Author(s) : Stephane Grabli +// Purpose : Class gathering stroke creation algorithms +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ADVANCED_PREDICATES1D_H +# define ADVANCED_PREDICATES1D_H + +# include +# include "../view_map/Interface1D.h" +# include "AdvancedFunctions1D.h" +# include "Predicates1D.h" + +// +// Predicates definitions +// +/////////////////////////////////////////////////////////// + +namespace Predicates1D { + + // DensityLowerThanUP1D + /*! Returns true if the density evaluated for the + * Interface1D is less than a user-defined density value. + */ + class DensityLowerThanUP1D : public UnaryPredicate1D + { + public: + /*! Builds the functor. + * \param threshold + * The value of the threshold density. + * Any Interface1D having a density lower than + * this threshold will match. + * \param sigma + * The sigma value defining the density evaluation window size + * used in the DensityF0D functor. + */ + DensityLowerThanUP1D(double threshold, double sigma = 2) { + _threshold = threshold; + _sigma = sigma; + } + /*! Returns the string "DensityLowerThanUP1D"*/ + string getName() const { + return "DensityLowerThanUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + Functions1D::DensityF1D fun(_sigma); + return (fun(inter) < _threshold); + } + private: + double _sigma; + double _threshold; + }; + +} // end of namespace Predicates1D + +#endif // ADVANCED_PREDICATES1D_H diff --git a/extern/freestyle/src/stroke/AdvancedStrokeShaders.cpp b/extern/freestyle/src/stroke/AdvancedStrokeShaders.cpp new file mode 100755 index 00000000000..b1c5317c5f1 --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedStrokeShaders.cpp @@ -0,0 +1,423 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../system/PseudoNoise.h" +#include "../system/RandGen.h" +#include "AdvancedStrokeShaders.h" +#include "StrokeIterators.h" + +///////////////////////////////////////// +// +// CALLIGRAPHICS SHADER +// +///////////////////////////////////////// + + +CalligraphicShader::CalligraphicShader (real iMinThickness, real iMaxThickness, + const Vec2f &iOrientation, bool clamp) + : StrokeShader() +{ + _minThickness=iMinThickness; + _maxThickness=iMaxThickness; + _orientation = iOrientation; + _orientation.normalize(); + _clamp = clamp; +} + +float ksinToto=0; + +void +CalligraphicShader::shade(Stroke &ioStroke) const +{ + Interface0DIterator v; + Functions0D::VertexOrientation2DF0D fun; + StrokeVertex* sv; + for(v=ioStroke.verticesBegin(); + !v.isEnd(); + ++v) + { + real thickness; + Vec2f vertexOri(fun(v)); + Vec2r ori2d(-vertexOri[1], vertexOri[0]); + ori2d.normalizeSafe(); + real scal = ori2d * _orientation; + sv = dynamic_cast(&(*v)); + if (_clamp && (scal<0)) { + scal=0.0; + sv->attribute().setColor(1,1,1); + } + else { + scal=fabs(scal); + sv->attribute().setColor(0,0,0); + } + thickness=_minThickness+scal*(_maxThickness-_minThickness); + if (thickness<0.0) + thickness=0.0; + sv->attribute().setThickness(thickness/2.0,thickness/2.0); + } + +} + +//void +//TipRemoverShader::shade(Stroke &ioStroke) const +//{ +// +// StrokeInternal::StrokeVertexIterator v, vend; +// for(v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); +// v!=vend; +// ++v) +// { +// if (((*v)->curvilinearAbscissa()<_tipLength) || +// ((*v)->strokeLength()-(*v)->curvilinearAbscissa()<_tipLength)) +// { +// (*v)->attribute().setThickness(0.0, 0.0); +// (*v)->attribute().setColor(1,1,1); +// } +// } +// +//} + + + +///////////////////////////////////////// +// +// SPATIAL NOISE SHADER +// +///////////////////////////////////////// + +static const unsigned NB_VALUE_NOISE = 512; + +SpatialNoiseShader::SpatialNoiseShader (float ioamount, float ixScale, int nbOctave, + bool smooth, bool pureRandom) + : StrokeShader() +{ + _amount = ioamount; + if (ixScale==0) _xScale=0; + else _xScale=1.0/ixScale/real(NB_VALUE_NOISE); + _nbOctave=nbOctave; + _smooth=smooth; + _pureRandom=pureRandom; +} +void +SpatialNoiseShader::shade(Stroke &ioStroke) const +{ + Interface0DIterator v, v2; + v=ioStroke.verticesBegin(); + Vec2r p(v->getProjectedX(), v->getProjectedY()); + v2=v; ++v2; + Vec2r p0(v2->getProjectedX(), v2->getProjectedY()); + p0=p+2*(p-p0); + StrokeVertex* sv; + sv = dynamic_cast(&(*v)); + real initU = sv->strokeLength()*real(NB_VALUE_NOISE); + if (_pureRandom) initU+=RandGen::drand48()*real(NB_VALUE_NOISE); + + Functions0D::VertexOrientation2DF0D fun; + while (!v.isEnd()) + { + sv = dynamic_cast(&(*v)); + Vec2r p(sv->getPoint()); + Vec2r vertexOri(fun(v)); + Vec2r ori2d(vertexOri[0], vertexOri[1]); + ori2d = Vec2r(p-p0); + ori2d.normalizeSafe(); + + PseudoNoise mynoise; + real bruit; + + if (_smooth) + bruit=mynoise.turbulenceSmooth(_xScale*sv->curvilinearAbscissa()+initU, + _nbOctave); + else + bruit=mynoise.turbulenceLinear(_xScale*sv->curvilinearAbscissa()+initU, + _nbOctave); + + Vec2r noise(-ori2d[1]*_amount*bruit, + ori2d[0]*_amount*bruit); + + sv->SetPoint(p[0]+noise[0], p[1]+noise[1]); + p0=p; + + ++v; + } + +} + + + +///////////////////////////////////////// +// +// SMOOTHING SHADER +// +///////////////////////////////////////// + + +SmoothingShader::SmoothingShader (int ionbIteration, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, + real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real iCarricatureFactor) + : StrokeShader() +{ + _nbIterations=ionbIteration; + _factorCurvature=ifactorCurvature; + _factorCurvatureDifference=iFactorCurvatureDifference; + _anisoNormal=iAnisoNormal; + _anisoCurvature=iAnisoCurvature; + _carricatureFactor=iCarricatureFactor; + _factorPoint=iFactorPoint; + _anisoPoint=iAnisoPoint; +} + + + +void +SmoothingShader::shade(Stroke &ioStroke) const +{ + //cerr<<" Smoothing a stroke "<getPoint(); + i++; + } + Vec2r vec_tmp(_vertex[0]-_vertex[_nbVertices-1]); + _isClosedCurve = (vec_tmp.norm() < M_EPSILON); + + _safeTest=(_nbVertices>4); +} + +void Smoother::smooth(int nbIteration, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, + real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real iCarricatureFactor) +{ + _factorCurvature=ifactorCurvature; + _factorCurvatureDifference=iFactorCurvatureDifference; + _anisoNormal=iAnisoNormal; + _anisoCurvature=iAnisoCurvature; + _carricatureFactor=iCarricatureFactor; + _factorPoint=iFactorPoint; + _anisoPoint=iAnisoPoint; + + for (int i=0; i M_EPSILON) + _curvature[i]/=(0.5*lba+lbc); + } + _curvature[0]=_curvature[1]; + _curvature[_nbVertices-1]=_curvature[_nbVertices-2]; + Vec2r di(_vertex[1]-_vertex[0]); + _normal[0] = Vec2r(-di[1], di[0]); + _normal[0].normalizeSafe(); + di=_vertex[_nbVertices-1]-_vertex[_nbVertices-2]; + _normal[_nbVertices-1]=Vec2r(-di[1], di[0]); + _normal[_nbVertices-1].normalizeSafe(); + + if (_isClosedCurve) + { + BA=_vertex[_nbVertices-2]-_vertex[0]; + BC=_vertex[1]-_vertex[0]; + real lba=BA.norm(), lbc=BC.norm(); + BA.normalizeSafe(); + BC.normalizeSafe(); + normalCurvature = BA + BC; + + _normal[i]=Vec2r(-(BC-BA)[1], (BC-BA)[0]); + _normal[i].normalizeSafe(); + + _curvature[i] = normalCurvature * _normal[i]; + if (lba+lbc > M_EPSILON) + _curvature[i]/=(0.5*lba+lbc); + + _normal[_nbVertices-1]=_normal[0]; + _curvature[_nbVertices-1]=_curvature[0]; + } +} + +void +Smoother::copyVertices () +{ + int i=0; + StrokeInternal::StrokeVertexIterator v, vend; + for(v=_stroke->strokeVerticesBegin(), vend=_stroke->strokeVerticesEnd(); + v!=vend; + ++v) + { + const Vec2r p0((v)->getPoint()); + const Vec2r p1(_vertex[i]); + Vec2r p(p0 + _carricatureFactor * (p1 - p0)); + + (v)->SetPoint(p[0], p[1]); + i++; + } + +} + + +///////////////////////////////////////// +// +// OMISSION SHADER +// +///////////////////////////////////////// + +OmissionShader::OmissionShader (real sizeWindow, real thrVari, real thrFlat, real lFlat) +{ + _sizeWindow=sizeWindow; + _thresholdVariation=thrVari; + _thresholdFlat=thrFlat; + _lengthFlat=lFlat; +} + +void +OmissionShader::shade(Stroke &ioStroke) const +{ + Omitter omi(ioStroke); + omi.omit(_sizeWindow, _thresholdVariation, _thresholdFlat, _lengthFlat); + +} + + +// OMITTER +/////////////////////////// + +Omitter::Omitter (Stroke &ioStroke) + :Smoother (ioStroke) +{ + StrokeInternal::StrokeVertexIterator v, vend; + int i=0; + for(v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + _u[i]=(v)->curvilinearAbscissa(); + i++; + } + +} + +void +Omitter::omit (real sizeWindow, real thrVari, real thrFlat, real lFlat) +{ + _sizeWindow=sizeWindow; + _thresholdVariation=thrVari; + _thresholdFlat=thrFlat; + _lengthFlat=lFlat; + + for (int i=1; i<_nbVertices-1; i++) + { + if (_u[i]<_lengthFlat) continue; + // is the previous segment flat? + int j=i-1; + while ((j>=0) && (_u[i]-_u[j]<_lengthFlat)) + { + if ((_normal[j] * _normal[i]) < _thresholdFlat) + ; // FIXME + j--; + } + + } +} diff --git a/extern/freestyle/src/stroke/AdvancedStrokeShaders.h b/extern/freestyle/src/stroke/AdvancedStrokeShaders.h new file mode 100755 index 00000000000..b624ccd3e6b --- /dev/null +++ b/extern/freestyle/src/stroke/AdvancedStrokeShaders.h @@ -0,0 +1,222 @@ +// +// Filename : AdvancedStrokeShaders.h +// Author : Fredo Durand +// Purpose : Fredo's stroke shaders +// Date of creation : 17/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ADVANCEDSTROKESHADERS_H +# define ADVANCEDSTROKESHADERS_H + +# include "BasicStrokeShaders.h" + +/*! [ Thickness Shader ]. + * Assigns thicknesses to the stroke vertices + * so that the stroke looks like made with a calligraphic tool. + * i.e. The stroke will be the thickest in a main direction, + * the thinest in the direction perpendicular to this one, + * and an interpolation inbetween. + */ +class LIB_STROKE_EXPORT CalligraphicShader : public StrokeShader +{ + +public: + /*! Builds the shader. + * \param iMinThickness + * The minimum thickness in the direction perpandicular + * to the main direction. + * \param iMaxThickness + * The maximum thickness in the main direction. + * \param iOrientation + * The 2D vector giving the main direction. + * \param clamp + * Tells ??? + */ + CalligraphicShader (real iMinThickness, real iMaxThickness, + const Vec2f &iOrientation, bool clamp); + /*! Destructor. */ + virtual ~CalligraphicShader () {} + /*! The shading method */ + virtual void shade(Stroke &ioStroke) const; +protected: + real _maxThickness; + real _minThickness; + Vec2f _orientation; + bool _clamp; +}; + +/*! [ Geometry Shader ]. + * Spatial Noise stroke shader. + * Moves the vertices to make the stroke more noisy. + * @see \htmlonly noise/noise.html \endhtmlonly + */ +class LIB_STROKE_EXPORT SpatialNoiseShader : public StrokeShader +{ +public: + /*! Builds the shader. + * \param iAmount + * The amplitude of the noise. + * \param ixScale + * The noise frequency + * \param nbOctave + * The number of octaves + * \param smooth + * If you want the noise to be smooth + * \param pureRandom + * If you don't want any coherence + */ + SpatialNoiseShader (float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom); + /*! Destructor. */ + virtual ~SpatialNoiseShader () {} + /*! The shading method. */ + virtual void shade(Stroke &ioStroke) const; + +protected: + + float _amount; + float _xScale; + int _nbOctave; + bool _smooth; + bool _pureRandom; +}; + +/*! [ Geometry Shader ]. + * Smoothes the stroke. + * (Moves the vertices to make the stroke smoother). + * Uses curvature flow to converge towards a curve of constant + * curvature. The diffusion method we use is anisotropic + * to prevent the diffusion accross corners. + * @see \htmlonly smoothing/smoothing.html endhtmlonly + */ +class LIB_STROKE_EXPORT SmoothingShader : public StrokeShader +{ +public: + /*! Builds the shader. + * \param iNbIteration + * The number of iterations. (400) + * \param iFactorPoint + * 0 + * \param ifactorCurvature + * 0 + * \param iFactorCurvatureDifference + * 0.2 + * \param iAnisoPoint + * 0 + * \param iAnisNormal + * 0 + * \param iAnisoCurvature + * 0 + * \param icarricatureFactor + * 1 + */ + SmoothingShader (int iNbIteration, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, + real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real icarricatureFactor); + /*! Destructor. */ + virtual ~SmoothingShader () {} + + /*! The shading method. */ + virtual void shade(Stroke &ioStroke) const; + +protected: + + int _nbIterations; + real _factorPoint; + real _factorCurvature; + real _factorCurvatureDifference; + real _anisoPoint; + real _anisoNormal; + real _anisoCurvature; + real _carricatureFactor; +}; + +class LIB_STROKE_EXPORT Smoother +{ +public: + Smoother (Stroke &ioStroke); + + virtual ~Smoother () {} + + void smooth (int nbIterations, real iFactorPoint, real ifactorCurvature, real iFactorCurvatureDifference, + real iAnisoPoint, real iAnisoNormal, real iAnisoCurvature, real icarricatureFactor); + void computeCurvature (); + +protected: + real _factorPoint; + real _factorCurvature; + real _factorCurvatureDifference; + real _anisoPoint; + real _anisoNormal; + real _anisoCurvature; + real _carricatureFactor; + + void iteration(); + void copyVertices (); + + Stroke *_stroke; + int _nbVertices; + Vec2r *_vertex; + Vec2r *_normal; + real *_curvature; + bool *_isFixedVertex; + + bool _isClosedCurve; + bool _safeTest; +}; + +class LIB_STROKE_EXPORT Omitter : public Smoother +{ +public: + Omitter (Stroke &ioStroke); + virtual ~Omitter () {} + + void omit (real sizeWindow, real thrVari, real thrFlat, real lFlat); +protected: + real *_u; + + real _sizeWindow; + real _thresholdVariation; + real _thresholdFlat; + real _lengthFlat; +}; + +/*! Omission shader + */ +class LIB_STROKE_EXPORT OmissionShader : public StrokeShader +{ +public: + OmissionShader (real sizeWindow, real thrVari, real thrFlat, real lFlat); + virtual ~OmissionShader () {} + + virtual void shade(Stroke &ioStroke) const; + +protected: + + real _sizeWindow; + real _thresholdVariation; + real _thresholdFlat; + real _lengthFlat; +}; + +#endif // ADVANCEDSTROKESHADERS_H diff --git a/extern/freestyle/src/stroke/BasicStrokeShaders.cpp b/extern/freestyle/src/stroke/BasicStrokeShaders.cpp new file mode 100755 index 00000000000..c3827ae3e36 --- /dev/null +++ b/extern/freestyle/src/stroke/BasicStrokeShaders.cpp @@ -0,0 +1,1100 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include "BasicStrokeShaders.h" +#include "../system/PseudoNoise.h" +#include "../system/RandGen.h" +#include "../view_map/Functions0D.h" +#include "../view_map/Functions1D.h" +#include "AdvancedFunctions0D.h" +#include "AdvancedFunctions1D.h" +#include "StrokeIterators.h" +#include "../system/StringUtils.h" +#include "StrokeRenderer.h" +#include "StrokeIO.h" +#include + +// Internal function +void convert(const QImage& iImage, float **oArray, unsigned &oSize) { + oSize = iImage.width(); + *oArray = new float[oSize]; + for(unsigned i=0; iattribute().setThickness(_thickness/4.0,_thickness/4.0); + if((0 == i) || (size-1 == i)) + v->attribute().setThickness(0,0); + + v->attribute().setThickness(_thickness/2.0, _thickness/2.0); + } + } + + void ConstantExternThicknessShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v, vend; + int i=0; + int size = stroke.strokeVerticesSize(); + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + if((1 == i) || (size-2 == i)) + v->attribute().setThickness(_thickness/2.0,0); + if((0 == i) || (size-1 == i)) + v->attribute().setThickness(0,0); + + v->attribute().setThickness(_thickness, 0); + } + } + + void IncreasingThicknessShader::shade(Stroke& stroke) const + { + + int n=stroke.strokeVerticesSize()-1; + StrokeInternal::StrokeVertexIterator v, vend; + int i=0; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + + ++v) + { + float t; + if(i < (float)n/2.f) + t = (1.0-(float)i/(float)n)*_ThicknessMin + (float)i/(float)n*_ThicknessMax; + else + t = (1.0-(float)i/(float)n)*_ThicknessMax + (float)i/(float)n*_ThicknessMin; + v->attribute().setThickness(t/2.0, t/2.0); + ++i; + } + } + + void ConstrainedIncreasingThicknessShader::shade(Stroke& stroke) const + { + float slength = stroke.getLength2D(); + float maxT = min(_ratio*slength,_ThicknessMax); + int n=stroke.strokeVerticesSize()-1; + StrokeInternal::StrokeVertexIterator v, vend; + int i=0; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + + ++v) + { + float t; + if(i < (float)n/2.f) + t = (1.0-(float)i/(float)n)*_ThicknessMin + (float)i/(float)n*maxT; + else + t = (1.0-(float)i/(float)n)*maxT + (float)i/(float)n*_ThicknessMin; + v->attribute().setThickness(t/2.0, t/2.0); + if(i == n-1) + v->attribute().setThickness(_ThicknessMin/2.0, _ThicknessMin/2.0); + ++i; + } + } + + + void LengthDependingThicknessShader::shade(Stroke& stroke) const + { + float step = (_maxThickness-_minThickness)/3.f; + float l = stroke.getLength2D(); + float thickness; + if(l>300.f) + thickness = _minThickness+3.f*step; + else if((l< 300.f) && (l>100.f)) + thickness = _minThickness+2.f*step; + else if((l<100.f) && (l>50.f)) + thickness = _minThickness+1.f*step; + else if(l< 50.f) + thickness = _minThickness; + + StrokeInternal::StrokeVertexIterator v, vend; + int i=0; + int size = stroke.strokeVerticesSize(); + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + if((1 == i) || (size-2 == i)) + v->attribute().setThickness(thickness/4.0,thickness/4.0); + if((0 == i) || (size-1 == i)) + v->attribute().setThickness(0,0); + + v->attribute().setThickness(thickness/2.0, thickness/2.0); + } + } + + + ThicknessVariationPatternShader::ThicknessVariationPatternShader(const string pattern_name, + float iMinThickness, + float iMaxThickness, + bool stretch) + : StrokeShader() { + _stretch = stretch; + _minThickness = iMinThickness; + _maxThickness = iMaxThickness; + QImage image; + vector pathnames; + StringUtils::getPathName(TextureManager::Options::getPatternsPath(), + pattern_name, + pathnames); + for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) { + ifstream ifs(j->c_str()); + if (ifs.is_open()) { + image.load(j->c_str()); + break; + } + } + if (image.isNull()) + cerr << "Error: cannot find pattern \"" << pattern_name + << "\" - check the path in the Options" << endl; + else + convert(image, &_aThickness, _size); + } + + void ThicknessVariationPatternShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v, vend; + float *array = 0; + int size; + array = _aThickness; + size = _size; + // } + int vert_size = stroke.strokeVerticesSize(); + int sig = 0; + unsigned index; + const float* originalThickness; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + originalThickness = v->attribute().getThickness(); + if (_stretch) { + float tmp = v->u()*(_size-1); + index = (unsigned)floor(tmp); + if((tmp-index) > (index+1-tmp)) + ++index; + } + else + index = (unsigned)floor(v->curvilinearAbscissa()); + index %= _size; + float thicknessR = array[index]*originalThickness[0]; + float thicknessL = array[index]*originalThickness[1]; + if(thicknessR+thicknessL < _minThickness) + { + thicknessL = _minThickness/2.f; + thicknessR = _minThickness/2.f; + } + if(thicknessR+thicknessL > _maxThickness) + { + thicknessL = _maxThickness/2.f; + thicknessR = _maxThickness/2.f; + } + if((sig==0) || (sig==vert_size-1)) + v->attribute().setThickness(1, 1); + else + v->attribute().setThickness(thicknessR, thicknessL); + ++sig; + } + } + + + static const unsigned NB_VALUE_NOISE = 512; + ThicknessNoiseShader::ThicknessNoiseShader() + :StrokeShader() + {_amplitude=1.f;_scale=1.f/2.f/(float)NB_VALUE_NOISE;} + + ThicknessNoiseShader::ThicknessNoiseShader(float iAmplitude, float iPeriod) + :StrokeShader() + {_amplitude=iAmplitude;_scale=1.f/iPeriod/(float)NB_VALUE_NOISE;} + + + void ThicknessNoiseShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + real initU1=v->strokeLength()*real(NB_VALUE_NOISE)+RandGen::drand48()*real(NB_VALUE_NOISE); + real initU2=v->strokeLength()*real(NB_VALUE_NOISE)+RandGen::drand48()*real(NB_VALUE_NOISE); + + real bruit, bruit2; + PseudoNoise mynoise, mynoise2; + for(; + v!=vend; + ++v) + { + + bruit=mynoise.turbulenceSmooth(_scale*v->curvilinearAbscissa()+initU1, + 2); //2 : nbOctaves + bruit2=mynoise2.turbulenceSmooth(_scale*v->curvilinearAbscissa()+initU2, + 2); //2 : nbOctaves + const float *originalThickness = v->attribute().getThickness(); + float r = bruit*_amplitude+originalThickness[0]; + float l = bruit2*_amplitude+originalThickness[1]; + v->attribute().setThickness(r,l); + } + + } + + // + // Color shaders + // + /////////////////////////////////////////////////////////////////////////////// + + void ConstantColorShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v, vend; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + v->attribute().setColor(_color[0], _color[1], _color[2]); + v->attribute().setAlpha(_color[3]); + } + } + + void IncreasingColorShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v, vend; + int n=stroke.strokeVerticesSize()-1; + int yo=0; + float newcolor[4]; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + + ++v) + { + for(int i=0; i<4; ++i) + { + newcolor[i] = (1.0-(float)yo/(float)n)*_colorMin[i] + (float)yo/(float)n*_colorMax[i]; + } + v->attribute().setColor(newcolor[0], newcolor[1], newcolor[2]); + v->attribute().setAlpha(newcolor[3]); + ++yo; + } + } + + ColorVariationPatternShader::ColorVariationPatternShader(const string pattern_name, + bool stretch) + : StrokeShader() { + _stretch = stretch; + QImage image; + vector pathnames; + StringUtils::getPathName(TextureManager::Options::getPatternsPath(), + pattern_name, + pathnames); + for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) { + ifstream ifs(j->c_str()); + if (ifs.is_open()) { + image.load(j->c_str()); + break; + } + } + if (image.isNull()) + cerr << "Error: cannot find pattern \"" << pattern_name + << "\" - check the path in the Options" << endl; + else + convert(image, &_aVariation, _size); + } + + void ColorVariationPatternShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v, vend; + unsigned index; + for(v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + v!=vend; + ++v) + { + const float *originalColor = v->attribute().getColor(); + if (_stretch) { + float tmp = v->u()*(_size-1); + index = (unsigned)floor(tmp); + if((tmp-index) > (index+1-tmp)) + ++index; + } + else + index = (unsigned)floor(v->curvilinearAbscissa()); + index %= _size; + float r = _aVariation[index]*originalColor[0]; + float g = _aVariation[index]*originalColor[1]; + float b = _aVariation[index]*originalColor[2]; + v->attribute().setColor(r,g,b); + } + } + + void MaterialColorShader::shade(Stroke& stroke) const + { + Interface0DIterator v, vend; + Functions0D::MaterialF0D fun; + StrokeVertex *sv; + for(v=stroke.verticesBegin(), vend=stroke.verticesEnd(); + v!=vend; + ++v) + { + const float *diffuse = fun(v).diffuse(); + sv = dynamic_cast(&(*v)); + sv->attribute().setColor(diffuse[0]*_coefficient, diffuse[1]*_coefficient, diffuse[2]*_coefficient); + sv->attribute().setAlpha(diffuse[3]); + } + } + + + void CalligraphicColorShader::shade(Stroke& stroke) const + { + Interface0DIterator v; + Functions0D::VertexOrientation2DF0D fun; + StrokeVertex* sv; + for(v=stroke.verticesBegin(); + !v.isEnd(); + ++v) + { + Vec2f vertexOri(fun(v)); + Vec2d ori2d(-vertexOri[1], vertexOri[0]); + ori2d.normalizeSafe(); + real scal = ori2d * _orientation; + sv = dynamic_cast(&(*v)); + if ((scal<0)) + sv->attribute().setColor(0,0,0); + else + sv->attribute().setColor(1,1,1); + } + } + + + ColorNoiseShader::ColorNoiseShader() + :StrokeShader() + {_amplitude=1.f;_scale=1.f/2.f/(float)NB_VALUE_NOISE;} + + ColorNoiseShader::ColorNoiseShader(float iAmplitude, float iPeriod) + :StrokeShader() + {_amplitude=iAmplitude;_scale=1.f/iPeriod/(float)NB_VALUE_NOISE;} + + + void ColorNoiseShader::shade(Stroke& stroke) const + { + StrokeInternal::StrokeVertexIterator v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + real initU=v->strokeLength()*real(NB_VALUE_NOISE)+RandGen::drand48()*real(NB_VALUE_NOISE); + + real bruit; + PseudoNoise mynoise; + for(; + v!=vend; + ++v) + { + + bruit=mynoise.turbulenceSmooth(_scale*v->curvilinearAbscissa()+initU, + 2); //2 : nbOctaves + const float *originalColor = v->attribute().getColor(); + float r = bruit*_amplitude+originalColor[0]; + float g = bruit*_amplitude+originalColor[1]; + float b = bruit*_amplitude+originalColor[2]; + v->attribute().setColor(r,g,b); + } + + } + + + // + // Texture Shaders + // + /////////////////////////////////////////////////////////////////////////////// + + void TextureAssignerShader::shade(Stroke& stroke) const + { + // getBrushTextureIndex(TEXTURES_DIR "/brushes/charcoalAlpha.bmp", Stroke::HUMID_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/washbrushAlpha.bmp", Stroke::HUMID_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/oil.bmp", Stroke::HUMID_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/oilnoblend.bmp", Stroke::HUMID_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/charcoalAlpha.bmp", Stroke::DRY_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/washbrushAlpha.bmp", Stroke::DRY_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/opaqueDryBrushAlpha.bmp", Stroke::OPAQUE_MEDIUM); + // getBrushTextureIndex(TEXTURES_DIR "/brushes/opaqueBrushAlpha.bmp", Stroke::OPAQUE_MEDIUM); + + TextureManager * instance = TextureManager::getInstance(); + if(!instance) + return; + string pathname; + Stroke::MediumType mediumType; + bool hasTips = false; + switch(_textureId) + { + case 0: + //pathname = TextureManager::Options::getBrushesPath() + "/charcoalAlpha.bmp"; + pathname = "/charcoalAlpha.bmp"; + mediumType = Stroke::HUMID_MEDIUM; + hasTips = false; + break; + case 1: + pathname = "/washbrushAlpha.bmp"; + mediumType = Stroke::HUMID_MEDIUM; + hasTips = true; + break; + case 2: + pathname = "/oil.bmp"; + mediumType = Stroke::HUMID_MEDIUM; + hasTips = true; + break; + case 3: + pathname = "/oilnoblend.bmp"; + mediumType = Stroke::HUMID_MEDIUM; + hasTips = true; + break; + case 4: + pathname = "/charcoalAlpha.bmp"; + mediumType = Stroke::DRY_MEDIUM; + hasTips = false; + break; + case 5: + mediumType = Stroke::DRY_MEDIUM; + hasTips = true; + break; + case 6: + pathname = "/opaqueDryBrushAlpha.bmp"; + mediumType = Stroke::OPAQUE_MEDIUM; + hasTips = true; + break; + case 7: + pathname = "/opaqueBrushAlpha.bmp"; + mediumType = Stroke::OPAQUE_MEDIUM; + hasTips = true; + break; + default: + pathname = "/smoothAlpha.bmp"; + mediumType = Stroke::OPAQUE_MEDIUM; + hasTips = false; + break; + } + unsigned int texId = instance->getBrushTextureIndex(pathname, mediumType); + stroke.SetMediumType(mediumType); + stroke.SetTips(hasTips); + stroke.SetTextureId(texId); + } + + // FIXME + void StrokeTextureShader::shade(Stroke& stroke) const + { + TextureManager * instance = TextureManager::getInstance(); + if(!instance) + return; + string pathname = TextureManager::Options::getBrushesPath() + "/" + _texturePath; + unsigned int texId = instance->getBrushTextureIndex(pathname, _mediumType); + stroke.SetMediumType(_mediumType); + stroke.SetTips(_tips); + stroke.SetTextureId(texId); + } + + // + // Geometry Shaders + // + /////////////////////////////////////////////////////////////////////////////// + + void BackboneStretcherShader::shade(Stroke& stroke) const + { + float l=stroke.getLength2D(); + if(l <= 50) + return; + + StrokeInternal::StrokeVertexIterator v0=stroke.strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator v1=v0;++v1; + StrokeInternal::StrokeVertexIterator vn=stroke.strokeVerticesEnd();--vn; + StrokeInternal::StrokeVertexIterator vn_1=vn;--vn_1; + + + Vec2d first((v0)->x(), (v0)->y()); + Vec2d last((vn)->x(), (vn)->y()); + + Vec2d d1(first-Vec2d((v1)->x(), (v1)->y())); + d1.normalize(); + Vec2d dn(last-Vec2d((vn_1)->x(), (vn_1)->y())); + dn.normalize(); + + Vec2d newFirst(first+_amount*d1); + (v0)->SetPoint(newFirst[0], newFirst[1]); + Vec2d newLast(last+_amount*dn); + (vn)->SetPoint(newLast[0], newLast[1]); + } + + void SamplingShader::shade(Stroke& stroke) const + { + stroke.Resample(_sampling); + } + + void ExternalContourStretcherShader::shade(Stroke& stroke) const + { + float l=stroke.getLength2D(); + Interface0DIterator it=stroke.verticesBegin(); + Functions0D::Normal2DF0D fun; + StrokeVertex* sv; + while (!it.isEnd()) + { + Vec2f n(fun(it)); + sv = dynamic_cast(&(*it)); + Vec2d newPoint(sv->x()+_amount*n.x(), sv->y()+_amount*n.y()); + sv->SetPoint(newPoint[0], newPoint[1]); + ++it; + } + } + + void BSplineShader::shade(Stroke& stroke) const + { + if(stroke.strokeVerticesSize() < 4) + return; + + // Find the new vertices + vector newVertices; + double t=0.f; + float _sampling = 5.f; + + StrokeInternal::StrokeVertexIterator p0,p1,p2,p3, end; + p0 = stroke.strokeVerticesBegin(); + p1 = p0; + p2 = p1; + p3 = p2; + end = stroke.strokeVerticesEnd(); + double a[4],b[4]; + int n=0; + while(p1 != end) + { + // if(p1 == end) + // p1 = p0; + if(p2 == end) + p2 = p1; + if(p3 == end) + p3 = p2; + // compute new matrix + a[0] = (-(p0)->x()+3*(p1)->x()-3*(p2)->x()+(p3)->x())/6.0; + a[1] = (3*(p0)->x()-6*(p1)->x()+3*(p2)->x())/6.0; + a[2] = (-3*(p0)->x()+3*(p2)->x())/6.0; + a[3] = ((p0)->x()+4*(p1)->x()+(p2)->x())/6.0; + + b[0] = (-(p0)->y()+3*(p1)->y()-3*(p2)->y()+(p3)->y())/6.0; + b[1] = (3*(p0)->y()-6*(p1)->y()+3*(p2)->y())/6.0; + b[2] = (-3*(p0)->y()+3*(p2)->y())/6.0; + b[3] = ((p0)->y()+4*(p1)->y()+(p2)->y())/6.0; + + + // draw the spline depending on resolution: + Vec2d p1p2((p2)->x()-(p1)->x(), (p2)->y()-(p1)->y()); + double norm = p1p2.norm(); + //t = _sampling/norm; + t=0; + while(t<1) + { + newVertices.push_back(Vec2d((a[3] + t*(a[2] + t*(a[1] + t*a[0]))), + (b[3] + t*(b[2] + t*(b[1] + t*b[0]))))); + t = t + _sampling/norm; + } + if(n > 2) + { + ++p0; + ++p1; + ++p2; + ++p3; + } + else + { + if(n==0) + ++p3; + if(n==1) + {++p2;++p3;} + if(n==2) + {++p1;++p2;++p3;} + ++n; + } + } + //last point: + newVertices.push_back(Vec2d((p0)->x(), (p0)->y())); + + int originalSize = newVertices.size(); + _sampling = stroke.ComputeSampling(originalSize); + + // Resample and set x,y coordinates + stroke.Resample(_sampling); + int newsize = stroke.strokeVerticesSize(); + + int nExtraVertex=0; + if(newsize < originalSize) + cerr << "Warning: unsufficient resampling" << endl; + else + { + nExtraVertex = newsize - originalSize; + } + + // assigns the new coordinates: + vector::iterator p,pend; + p=newVertices.begin();pend=newVertices.end(); + vector::iterator last = p; + n=0; + StrokeInternal::StrokeVertexIterator it=stroke.strokeVerticesBegin(), itend=stroke.strokeVerticesEnd(); + it=stroke.strokeVerticesBegin(); + for(; + ((it!=itend) && (p!=pend)); + ++it) + { + it->SetX(p->x()); + it->SetY(p->y()); + last = p; + ++p; + ++n; + } + // nExtraVertex should stay unassigned + for(int i=0; i< nExtraVertex; ++i) + { + it->SetX(last->x()); + it->SetY(last->y()); + if(it.isEnd()) + cerr << "Warning: Problem encountered while creating B-spline" << endl; + ++it; + ++n; + } + } + + //!! Bezier curve stroke shader + void BezierCurveShader::shade(Stroke& stroke) const + { + if(stroke.strokeVerticesSize() < 4) + return; + + // Build the Bezier curve from this set of data points: + vector data; + StrokeInternal::StrokeVertexIterator v=stroke.strokeVerticesBegin(), vend=stroke.strokeVerticesEnd(); + data.push_back(Vec2d(v->x(), v->y()));//first one + StrokeInternal::StrokeVertexIterator previous = v;++v; + for(; + v!=vend; + ++v) + { + if(!((fabs(v->x() -(previous)->x())y() - (previous)->y())x(), v->y())); + previous = v; + } + + // Vec2d tmp;bool equal=false; + // if(data.front() == data.back()) + // { + // tmp = data.back(); + // data.pop_back(); + // equal=true; + // } + // here we build the bezier curve + BezierCurve bcurve(data, _error); + + // bad performances are here !!! // FIXME + vector CurveVertices; + vector& bsegments = bcurve.segments(); + vector::iterator s=bsegments.begin(),send=bsegments.end(); + vector& segmentsVertices = (*s)->vertices(); + vector::iterator p,pend; + // first point + CurveVertices.push_back(segmentsVertices[0]); + for(; + s!=send; + ++s) + { + segmentsVertices = (*s)->vertices(); + p=segmentsVertices.begin(); pend=segmentsVertices.end(); + ++p; + for(; + p!=pend; + ++p) + { + CurveVertices.push_back((*p)); + } + } + + //if(equal) + // if(data.back() == data.front()) + // { + // vector::iterator d=data.begin(), dend=data.end(); + // cout << "ending point = starting point" << endl; + // cout << "---------------DATA----------" << endl; + // for(; + // d!=dend; + // ++d) + // { + // cout << d->x() << "-" << d->y() << endl; + // } + // cout << "--------------BEZIER RESULT----------" << endl; + // d=CurveVertices.begin(), dend=CurveVertices.end(); + // for(;d!=dend;++d) + // { + // cout << d->x() << "-" << d->y() << endl; + // } + // } + + // Resample the Stroke depending on the number of + // vertices of the bezier curve: + int originalSize = CurveVertices.size(); + //float sampling = stroke.ComputeSampling(originalSize); + //stroke.Resample(sampling); + stroke.Resample(originalSize); + int newsize = stroke.strokeVerticesSize(); + int nExtraVertex=0; + if(newsize < originalSize) + cerr << "Warning: unsufficient resampling" << endl; + else + { + //cout << "Oversampling" << endl; + nExtraVertex = newsize - originalSize; + if(nExtraVertex != 0) + cout << "Bezier Shader : Stroke " << stroke.getId() << " have not been resampled" << endl; + } + + // assigns the new coordinates: + p=CurveVertices.begin();pend=CurveVertices.end(); + vector::iterator last = p; + int n=0; + StrokeInternal::StrokeVertexIterator it=stroke.strokeVerticesBegin(), itend=stroke.strokeVerticesEnd(); + // while(p!=pend) + // { + // ++n; + // ++p; + // } + it=stroke.strokeVerticesBegin(); + for(; + ((it!=itend) && (p!=pend)); + ++it) + { + it->SetX(p->x()); + it->SetY(p->y()); + // double x = p->x(); + // double y = p->y(); + // cout << "x = " << x << "-" << "y = " << y << endl; + last = p; + ++p; + ++n; + } + + // Deal with extra vertices: + if(nExtraVertex == 0) + return; + + // nExtraVertex should stay unassigned + vector attributes; + vector verticesToRemove; + for(int i=0; i< nExtraVertex; ++i) + { + verticesToRemove.push_back(&(*it)); + if(it.isEnd()) + cout << "fucked up" << endl; + ++it; + ++n; + } + it=stroke.strokeVerticesBegin(); + for(; + it!=itend; + ++it) + { + attributes.push_back(it->attribute()); + } + + for(vector::iterator vr=verticesToRemove.begin(), vrend=verticesToRemove.end(); + vr!=vrend; + ++vr) + { + stroke.RemoveVertex(*vr); + } + it=stroke.strokeVerticesBegin(); + itend=stroke.strokeVerticesEnd(); + vector::iterator a=attributes.begin(), aend=attributes.end(); + int index = 0; + int index1 = (int)floor((float)originalSize/2.0); + int index2 = index1+nExtraVertex; + for(; + (it!=itend) && (a!=aend); + ++it) + { + (it)->SetAttribute(*a); + if((index <= index1)||(index>index2)) + ++a; + ++index; + } + } + + void InflateShader::shade(Stroke& stroke) const + { + // we're computing the curvature variance of the stroke.(Combo 5) + // If it's too high, forget about it + Functions1D::Curvature2DAngleF1D fun; + if(fun(stroke) > _curvatureThreshold) + return; + + Functions0D::VertexOrientation2DF0D ori_fun; + Functions0D::Curvature2DAngleF0D curv_fun; + Functions1D::Normal2DF1D norm_fun; + Interface0DIterator it=stroke.verticesBegin(); + StrokeVertex* sv; + while (!it.isEnd()) + { + Vec2f ntmp = ori_fun(it); + Vec2f n(ntmp.y(), -ntmp.x()); + Vec2f strokeN(norm_fun(stroke)); + if(n*strokeN < 0) + { + n[0] = -n[0]; + n[1] = -n[1]; + } + sv = dynamic_cast(&(*it)); + float u=sv->u(); + float t = 4.f*(0.25f - (u-0.5)*(u-0.5)); + float curvature_coeff = (M_PI-curv_fun(it))/M_PI; + Vec2d newPoint(sv->x()+curvature_coeff*t*_amount*n.x(), sv->y()+curvature_coeff*t*_amount*n.y()); + sv->SetPoint(newPoint[0], newPoint[1]); + ++it; + } + } + + class CurvePiece + { + public: + StrokeInternal::StrokeVertexIterator _begin; + StrokeInternal::StrokeVertexIterator _last; + Vec2d A; + Vec2d B; + int size; + float _error; + + CurvePiece(StrokeInternal::StrokeVertexIterator b, StrokeInternal::StrokeVertexIterator l, int iSize) + { + _begin = b; + _last = l; + A = Vec2d((_begin)->x(),(_begin)->y()); + B = Vec2d((_last)->x(),(_last)->y()); + size = iSize; + } + + float error() + { + float maxE = 0.f; + for(StrokeInternal::StrokeVertexIterator it=_begin; + it!=_last; + ++it) + { + Vec2d P(it->x(), it->y()); + float d = GeomUtils::distPointSegment(P,A,B); + if(d > maxE) + maxE = d; + } + _error = maxE; + return maxE; + } + //! Subdivides the curve into two pieces. + // The first piece is this same object (modified) + // the second piece is returned by the method + CurvePiece * subdivide() + { + StrokeInternal::StrokeVertexIterator it=_begin; + int actualSize = 1; + for(int i=0; ix(), (_last)->y()); + return second; + } + }; + + void PolygonalizationShader::shade(Stroke& stroke) const + { + vector _pieces; + vector _results; + vector::iterator cp,cpend; + + // Compute first approx: + StrokeInternal::StrokeVertexIterator a=stroke.strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator b=stroke.strokeVerticesEnd();--b; + int size = stroke.strokeVerticesSize(); + + CurvePiece * piece = new CurvePiece(a,b,size); + _pieces.push_back(piece); + + while(!_pieces.empty()) + { + piece = _pieces.back();_pieces.pop_back(); + if(piece->error() > _error) + { + CurvePiece * second = piece->subdivide(); + _pieces.push_back(second); + _pieces.push_back(piece); + } + else + { + _results.push_back(piece); + } + } + + // actually modify the geometry for each piece: + for(cp=_results.begin(), cpend=_results.end(); + cp!=cpend; + ++cp) + { + a = (*cp)->_begin; + b = (*cp)->_last; + Vec2d u = (*cp)->B-(*cp)->A; + Vec2d n(u[1], -u[0]);n.normalize(); + //Vec2d n(0,0); + float offset = ((*cp)->_error); + StrokeInternal::StrokeVertexIterator v,vlast; + for(v=a; + v!=b; + ++v) + { + v->SetPoint((*cp)->A.x()+v->u()*u.x()+n.x()*offset, (*cp)->A.y()+v->u()*u.y()+n.y()*offset); + } + // u.normalize(); + // (*a)->SetPoint((*a)->x()-u.x()*10, (*a)->y()-u.y()*10); + } + + // delete stuff + for(cp=_results.begin(), cpend=_results.end(); + cp!=cpend; + ++cp) + { + delete (*cp); + } + _results.clear(); + } + + void GuidingLinesShader::shade(Stroke& stroke) const + { + Functions1D::Normal2DF1D norm_fun; + StrokeInternal::StrokeVertexIterator a=stroke.strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator b=stroke.strokeVerticesEnd();--b; + int size = stroke.strokeVerticesSize(); + CurvePiece piece(a,b,size); + + Vec2d u = piece.B-piece.A; + Vec2f n(u[1], -u[0]);n.normalize(); + Vec2f strokeN(norm_fun(stroke)); + if(n*strokeN < 0) + { + n[0] = -n[0]; + n[1] = -n[1]; + } + float offset = (piece.error())/2.f*_offset; + StrokeInternal::StrokeVertexIterator v=a,vend=stroke.strokeVerticesEnd(); + for(; + v!=vend; + ++v) + { + v->SetPoint(piece.A.x()+v->u()*u.x()+n.x()*offset, piece.A.y()+v->u()*u.y()+n.y()*offset); + } + } + + ///////////////////////////////////////// + // + // Tip Remover + // + ///////////////////////////////////////// + + + TipRemoverShader::TipRemoverShader(real tipLength) + : StrokeShader() + { + _tipLength = tipLength; + } + + void + TipRemoverShader::shade(Stroke& stroke) const + { + int originalSize = stroke.strokeVerticesSize(); + + if(originalSize<4) + return; + + StrokeInternal::StrokeVertexIterator v, vend; + vector verticesToRemove; + vector oldAttributes; + v=stroke.strokeVerticesBegin(); vend=stroke.strokeVerticesEnd(); + for(; + v!=vend; + ++v) + { + if ((v->curvilinearAbscissa()<_tipLength) || + (v->strokeLength()-v->curvilinearAbscissa()<_tipLength)) + { + verticesToRemove.push_back(&(*v)); + } + oldAttributes.push_back(v->attribute()); + } + + if(originalSize-verticesToRemove.size() < 2) + return; + + vector::iterator sv=verticesToRemove.begin(), svend=verticesToRemove.end(); + for(; + sv!=svend; + ++sv) + { + stroke.RemoveVertex((*sv)); + } + + // Resample so that our new stroke have the same + // number of vertices than before + stroke.Resample(originalSize); + + if(stroke.strokeVerticesSize() != originalSize) + cerr << "Warning: resampling problem" << endl; + + // assign old attributes to new stroke vertices: + v=stroke.strokeVerticesBegin(); vend=stroke.strokeVerticesEnd(); + vector::iterator a=oldAttributes.begin(), aend=oldAttributes.end(); + //cout << "-----------------------------------------------" << endl; + for(;(v!=vend)&&(a!=aend);++v,++a) + { + v->SetAttribute(*a); + //cout << "thickness = " << (*a).getThickness()[0] << "-" << (*a).getThickness()[1] << endl; + } + // we're done! + } + + void streamShader::shade(Stroke& stroke) const{ + cout << stroke << endl; + } + void fstreamShader::shade(Stroke& stroke) const{ + _stream << stroke << endl; + } + +} // end of namespace StrokeShaders + diff --git a/extern/freestyle/src/stroke/BasicStrokeShaders.h b/extern/freestyle/src/stroke/BasicStrokeShaders.h new file mode 100755 index 00000000000..f68971a3966 --- /dev/null +++ b/extern/freestyle/src/stroke/BasicStrokeShaders.h @@ -0,0 +1,791 @@ +// +// Filename : BasicStrokeShaders.h +// Author : Stephane Grabli +// Purpose : Class gathering basic stroke shaders +// Date of creation : 17/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BASIC_STROKE_SHADERS_H +# define BASIC_STROKE_SHADERS_H + +# include "Stroke.h" +# include "../geometry/Geom.h" +# include "../geometry/Bezier.h" +# include "StrokeShader.h" +# include + +using namespace std; +using namespace Geometry; + +namespace StrokeShaders { + + // + // Thickness modifiers + // + ////////////////////////////////////////////////////// + /*! [ Thickness Shader ]. + * Assigns an absolute constant thickness to every + * vertices of the Stroke. + */ + class LIB_STROKE_EXPORT ConstantThicknessShader : public StrokeShader + { + public: + /*! Builds the shader. + * \param thickness + * The thickness that must be assigned + * to the stroke. + */ + ConstantThicknessShader(float thickness) : StrokeShader() { + _thickness = thickness; + } + /*! Destructor. */ + virtual ~ConstantThicknessShader() {} + /*! Returns the string "ConstantThicknessShader".*/ + virtual string getName() const { + return "ConstantThicknessShader"; + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + + private: + float _thickness; + }; + + /* [ Thickness Shader ]. + * Assigns an absolute constant external thickness to every + * vertices of the Stroke. The external thickness of a point + * is its thickness from the point to the strip border + * in the direction pointing outside the object the + * Stroke delimitates. + */ + class LIB_STROKE_EXPORT ConstantExternThicknessShader : public StrokeShader + { + public: + + ConstantExternThicknessShader(float thickness) : StrokeShader() { + _thickness = thickness; + } + + virtual ~ConstantExternThicknessShader() {} + + virtual string getName() const { + return "ConstantExternThicknessShader"; + } + + virtual void shade(Stroke& stroke) const; + + private: + + float _thickness; + }; + + /*! [ Thickness Shader ]. + * Assigns thicknesses values such as the thickness + * increases from a thickness value A to a thickness value B + * between the first vertex to the midpoint vertex and + * then decreases from B to a A between this midpoint vertex + * and the last vertex. + * The thickness is linearly interpolated from A to B. + */ + class LIB_STROKE_EXPORT IncreasingThicknessShader : public StrokeShader + { + public: + /*! Builds the shader. + * \param iThicknessMin + * The first thickness value. + * \param iThicknessMax + * The second thickness value. + */ + IncreasingThicknessShader(float iThicknessMin, float iThicknessMax) + : StrokeShader() + { + _ThicknessMin = iThicknessMin; + _ThicknessMax = iThicknessMax; + } + /*! Destructor.*/ + virtual ~IncreasingThicknessShader() {} + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + + private: + + float _ThicknessMin; + float _ThicknessMax; + }; + + /*! [ Thickness shader ]. + * Same as previous but + * here we allow the user to control the ratio thickness/length so that + * we don't get fat short lines + */ + class LIB_STROKE_EXPORT ConstrainedIncreasingThicknessShader : public StrokeShader + { + private: + float _ThicknessMin; + float _ThicknessMax; + float _ratio; + public: + /*! Builds the shader. + * \param iThicknessMin + * The first thickness value. + * \param iThicknessMax + * The second thickness value. + * \param iRatio + * The ration thickness/length we don't want to + * exceed. + */ + ConstrainedIncreasingThicknessShader(float iThicknessMin, float iThicknessMax, float iRatio) + : StrokeShader() + { + _ThicknessMin = iThicknessMin; + _ThicknessMax = iThicknessMax; + _ratio = iRatio; + } + /*! Destructor.*/ + virtual ~ConstrainedIncreasingThicknessShader() {} + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; + + /* [ Thickness Shader ]. + * Modifys the thickness in a relative way + * depending on its length. + */ + class LIB_STROKE_EXPORT LengthDependingThicknessShader : public StrokeShader + { + private: + float _minThickness; + float _maxThickness; + // We divide the strokes in 4 categories: + // l > 300 + // 100 < l < 300 + // 50 < l < 100 + // l < 50 + public: + LengthDependingThicknessShader(float iMinThickness, float iMaxThickness) + : StrokeShader() + { + _minThickness = iMinThickness; + _maxThickness = iMaxThickness; + } + virtual ~LengthDependingThicknessShader() {} + + virtual void shade(Stroke& stroke) const; + }; + + /*! [ Thickness Shader ]. + * Applys a pattern (texture) to vary thickness. + * The new thicknesses are the result of the multiplication + * of the pattern and the original thickness + */ + class LIB_STROKE_EXPORT ThicknessVariationPatternShader : public StrokeShader + { + public: + + /*! Builds the shader. + * \param pattern_name + * The texture file name. + * \param iMinThickness + * The minimum thickness we don't want to exceed. + * \param iMaxThickness + * The maximum thickness we don't want to exceed. + * \param stretch + * Tells whether the pattern texture must + * be stretched or repeted to fit the stroke. + */ + ThicknessVariationPatternShader(const string pattern_name, + float iMinThickness = 1.f, + float iMaxThickness = 5.f, + bool stretch = true); + /*! Destructor.*/ + virtual ~ThicknessVariationPatternShader() + { + if(0 != _aThickness) + { + delete [] _aThickness; + _aThickness = 0; + } + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + + private: + + float* _aThickness; // array of thickness values, in % of the max (i.e comprised between 0 and 1) + unsigned _size; + float _minThickness; + float _maxThickness; + bool _stretch; + }; + + /*! [ Thickness Shader ]. + * Adds some noise to the stroke thickness. + * \see \htmlonly noise/noise.html\endhtmlonly + */ + class LIB_STROKE_EXPORT ThicknessNoiseShader : public StrokeShader + { + private: + float _amplitude; + float _scale; + public: + ThicknessNoiseShader(); + /*! Builds a Thickness Noise Shader + * \param iAmplitude + * The amplitude of the noise signal + * \param iPeriod + * The period of the noise signal + */ + ThicknessNoiseShader(float iAmplitude, float iPeriod); + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; + + + // + // Color shaders + // + ///////////////////////////////////////////////////////// + /*! [ Color Shader ]. + * Assigns a constant color to every vertices of the Stroke. + */ + class LIB_STROKE_EXPORT ConstantColorShader : public StrokeShader + { + public: + /*! Builds the shader from a user-specified color. + * \param iR + * The red component + * \param iG + * The green component + * \param iB + * The blue component + * \param iAlpha + * The alpha value + */ + ConstantColorShader(float iR, float iG, float iB, float iAlpha=1.f) + : StrokeShader() + { + _color[0] = iR; + _color[1] = iG; + _color[2] = iB; + _color[3] = iAlpha; + } + + virtual string getName() const { + return "ConstantColorShader"; + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + + private: + + float _color[4]; + }; + + /*! [ Color Shader ]. + * Assigns a varying color to the stroke. + * The user specifies 2 colors A and B. The stroke + * color will change linearly from A to B between the + * first and the last vertex. + */ + class LIB_STROKE_EXPORT IncreasingColorShader : public StrokeShader + { + private: + float _colorMin[4]; + float _colorMax[4]; + public: + /*! Builds the shader from 2 user-specified colors. + * \param iRm + * The first color red component + * \param iGm + * The first color green component + * \param iBm + * The first color blue component + * \param iAlpham + * The first color alpha value + * \param iRM + * The second color red component + * \param iGM + * The second color green component + * \param iBM + * The second color blue component + * \param iAlphaM + * The second color alpha value + */ + IncreasingColorShader(float iRm, float iGm, float iBm, float iAlpham, + float iRM, float iGM, float iBM, float iAlphaM) + : StrokeShader() + { + _colorMin[0] = iRm; + _colorMin[1] = iGm; + _colorMin[2] = iBm; + _colorMin[3] = iAlpham; + + _colorMax[0] = iRM; + _colorMax[1] = iGM; + _colorMax[2] = iBM; + _colorMax[3] = iAlphaM; + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; + + /*! [ Color Shader ]. + * Applys a pattern to vary original color. + * The new color is the result of the multiplication + * of the pattern and the original color + */ + class LIB_STROKE_EXPORT ColorVariationPatternShader : public StrokeShader + { + public: + /*! Builds the shader from the pattern texture file name. + * \param pattern_name + * The file name of the texture file to use as pattern + * \param stretch + * Tells whether the texture must be strecthed or repeted + * to fit the stroke. + */ + ColorVariationPatternShader(const string pattern_name, bool stretch = true); + /*! Destructor */ + virtual ~ColorVariationPatternShader() + { + if(0 != _aVariation) + { + delete [] _aVariation; + _aVariation = 0; + } + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + + private: + + float* _aVariation; // array of coef values, in % of the max (i.e comprised between 0 and 1) + unsigned _size; + bool _stretch; + }; + + /* [ Color Shader ]. + * Assigns a color to the stroke depending + * on the material of the shape to which ot belongs + * to. (Disney shader) + */ + class LIB_STROKE_EXPORT MaterialColorShader : public StrokeShader + { + private: + float _coefficient; + public: + MaterialColorShader(float coeff=1.f) + : StrokeShader() + {_coefficient=coeff;} + + virtual void shade(Stroke& stroke) const; + }; + + class LIB_STROKE_EXPORT CalligraphicColorShader : public StrokeShader + { + private: + int _textureId; + Vec2d _orientation; + public: + CalligraphicColorShader( + const Vec2d &iOrientation) + : StrokeShader() + { + _orientation=iOrientation; + _orientation.normalize(); + } + virtual void shade(Stroke& stroke) const; + + }; + + /*! [ Color Shader ]. + * Shader to add noise to the stroke colors. + */ + class LIB_STROKE_EXPORT ColorNoiseShader : public StrokeShader + { + private: + float _amplitude; + float _scale; + + public: + ColorNoiseShader(); + /*! Builds a Color Noise Shader + * \param iAmplitude + * The amplitude of the noise signal + * \param iPeriod + * The period of the noise signal + */ + ColorNoiseShader(float iAmplitude, float iPeriod); + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; + + // + // Texture Shaders + // + /////////////////////////////////////////////////////////////////////////////// + /*! [ Texture Shader ]. + * Assigns a texture to the stroke in order to simulate + * its marks system. This shader takes as input an integer value + * telling which texture and blending mode to use among a set of + * predefined textures. + * Here are the different presets: + * 0) -> /brushes/charcoalAlpha.bmp, HUMID_MEDIUM + * 1) -> /brushes/washbrushAlpha.bmp, HUMID_MEDIUM + * 2) -> /brushes/oil.bmp, HUMID_MEDIUM + * 3) -> /brushes/oilnoblend.bmp, HUMID_MEDIUM + * 4) -> /brushes/charcoalAlpha.bmp, DRY_MEDIUM + * 5) -> /brushes/washbrushAlpha.bmp, DRY_MEDIUM + * 6) -> /brushes/opaqueDryBrushAlpha.bmp, OPAQUE_MEDIUM + * 7) -> /brushes/opaqueBrushAlpha.bmp, Stroke::OPAQUE_MEDIUM + * Any other value will lead to the following preset: + * default) -> /brushes/smoothAlpha.bmp, OPAQUE_MEDIUM. + */ + class LIB_STROKE_EXPORT TextureAssignerShader : public StrokeShader // FIXME + { + private: + int _textureId; + public: + /*! Builds the shader. + * \param id + * The number of the preset to use. + */ + TextureAssignerShader(int id) + : StrokeShader() + { + _textureId = id; + } + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + + }; + /*! [ Texture Shader ]. + * Assigns a texture and a blending mode to the stroke + * in order to simulate its marks system. + */ + class LIB_STROKE_EXPORT StrokeTextureShader : public StrokeShader + { + private: + string _texturePath; + Stroke::MediumType _mediumType; + bool _tips; // 0 or 1 + + public: + /*! Builds the shader from the texture file name and the blending mode to use. + * \param textureFile + * The the texture file name. + * \attention The textures must be placed in the $FREESTYLE_DIR/data/textures/brushes + * directory. + * \param mediumType + * The medium type and therefore, the blending mode that must + * be used for the rendering of this stroke. + * \param iTips + * Tells whether the texture includes tips or not. + * If it is the case, the texture image must respect the following + * format: + * \verbatim + * __________ + * | | + * | A | + * |__________| + * | | | + * | B | C | + * |_____|____| + * + * \endverbatim + * - A : The stroke's corpus texture + * - B : The stroke's left extremity texture + * - C : The stroke's right extremity texture + */ + StrokeTextureShader(const string textureFile, Stroke::MediumType mediumType = Stroke::OPAQUE_MEDIUM, bool iTips = false) + : StrokeShader() + { + _texturePath = textureFile; + _mediumType = mediumType; + _tips = iTips; + } + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + + }; + + + // + // Geometry Shaders + // + /////////////////////////////////////////////////////////////////////////////// + /*! [ Geometry Shader ]. + * Stretches the stroke at its two extremities and following the + * respective directions: v(1)v(0) and v(n-1)v(n). + */ + class LIB_STROKE_EXPORT BackboneStretcherShader : public StrokeShader + { + private: + float _amount; + public: + /*! Builds the shader. + * \param iAmount + * The stretching amount value. + */ + BackboneStretcherShader(float iAmount=2.f) + : StrokeShader() + { + _amount = iAmount; + } + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + /*! [ Geometry Shader. ] + * Resamples the stroke. + * @see Stroke::Resample(float). + */ + class LIB_STROKE_EXPORT SamplingShader: public StrokeShader + { + private: + float _sampling; + public: + /*! Builds the shader. + * \param sampling + * The sampling to use for the + * stroke resampling + */ + SamplingShader(float sampling) + : StrokeShader() + { + _sampling = sampling; + } + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + + class LIB_STROKE_EXPORT ExternalContourStretcherShader : public StrokeShader + { + private: + float _amount; + public: + ExternalContourStretcherShader(float iAmount=2.f) + : StrokeShader() + { + _amount = iAmount; + } + + virtual void shade(Stroke& stroke) const; + }; + + // B-Spline stroke shader + class LIB_STROKE_EXPORT BSplineShader: public StrokeShader + { + public: + BSplineShader() + : StrokeShader() + {} + + virtual void shade(Stroke& stroke) const; + }; + + + // Bezier curve stroke shader + /*! [ Geometry Shader ]. + * Transforms the stroke backbone geometry + * so that it corresponds to a Bezier Curve + * approximation of the original backbone geometry. + * @see \htmlonly bezier/bezier.html \endhtmlonly + */ + class LIB_STROKE_EXPORT BezierCurveShader : public StrokeShader + { + private: + float _error; + public: + /*! Builds the shader. + * \param error + * The error we're allowing for the approximation. + * This error is the max distance allowed between + * the new curve and the original geometry. + */ + BezierCurveShader(float error = 4.0) + : StrokeShader() + {_error=error;} + + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + /* Shader to inflate the curves. It keeps the extreme + * points positions and moves the other ones along + * the 2D normal. The displacement value is proportional + * to the 2d curvature at the considered point (the higher + * the curvature, the smaller the displacement) and to a value + * specified by the user. + */ + class LIB_STROKE_EXPORT InflateShader : public StrokeShader + { + private: + float _amount; + float _curvatureThreshold; + public: + /*! Builds an inflate shader + * \param iAmount + * A multiplicative coefficient that + * acts on the amount and direction of displacement + * \param iThreshold + * The curves having a 2d curvature > iThreshold + * at one of their points is not inflated + */ + InflateShader(float iAmount,float iThreshold) + : StrokeShader() + { + _amount = iAmount; + _curvatureThreshold = iThreshold; + } + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + /*! [ Geometry Shader ]. + * Shader to modify the Stroke geometry so that + * it looks more "polygonal". + * The basic idea is to start from the + * minimal stroke approximation consisting in + * a line joining the first vertex to the last one and + * to subdivide using the original stroke vertices + * until a certain error is reached. + */ + class LIB_STROKE_EXPORT PolygonalizationShader : public StrokeShader + { + private: + float _error; + public: + /*! Builds the shader. + * \param iError + * The error we want our polygonal approximation + * to have with respect to the original geometry. + * The smaller, the closer the new stroke to + * the orinal one. + * This error corresponds to the maximum distance + * between the new stroke and the old one. + */ + PolygonalizationShader(float iError) : StrokeShader() + {_error = iError;} + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + + /*! [ Geometry Shader ]. + * Shader to modify the Stroke geometry so that + * it corresponds to its main direction line. + * This shader must be used together with the + * splitting operator using the curvature criterion. + * Indeed, the precision of the approximation + * will depend on the size of the stroke's pieces. + * The bigger the pieces, the rougher the approximation. + */ + class LIB_STROKE_EXPORT GuidingLinesShader : public StrokeShader + { + private: + float _offset; + public: + /*! Builds a Guiding Lines shader + * \param iOffset + * The line that replaces the stroke + * is initially in the middle + * of the initial stroke "bbox". + * iOffset is the value of the displacement + * which is applied to this line along its + * normal. + */ + GuidingLinesShader(float iOffset) : StrokeShader() + {_offset = iOffset;} + /*! The shading method */ + virtual void shade(Stroke& stroke) const; + }; + + /*! [ Geometry Shader ]. + * Removes the stroke's extremities. + */ + class LIB_STROKE_EXPORT TipRemoverShader : public StrokeShader + { + public: + /*! Builds the shader. + * \param tipLength + * The length of the piece of stroke + * we want to remove at each extremity. + */ + TipRemoverShader (real tipLength); + /*! Destructor. */ + virtual ~TipRemoverShader () {} + /*! The shading method */ + virtual void shade(Stroke &stroke) const; + + protected: + + real _tipLength; + }; + + /*! [ output Shader ]. + * streams the Stroke + */ + class LIB_STROKE_EXPORT streamShader : public StrokeShader + { + public: + /*! Destructor. */ + virtual ~streamShader() {} + /*! Returns the string "streamShader".*/ + virtual string getName() const { + return "streamShader"; + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; + + /*! [ output Shader ]. + * streams the Stroke in a file + */ + class LIB_STROKE_EXPORT fstreamShader : public StrokeShader + { + protected: + mutable ofstream _stream; + public: + /*! Builds the shader from the output file name */ + fstreamShader(const char *iFileName) : StrokeShader(){ + _stream .open(iFileName); + if(!_stream.is_open()){ + cout << "couldn't open file " << iFileName << endl; + } + } + /*! Destructor. */ + virtual ~fstreamShader() {_stream.close();} + /*! Returns the string "fstreamShader".*/ + virtual string getName() const { + return "fstreamShader"; + } + /*! The shading method. */ + virtual void shade(Stroke& stroke) const; + }; +} // end of namespace StrokeShaders + +#endif // BASIC_STROKE_SHADERS_H diff --git a/extern/freestyle/src/stroke/Canvas.cpp b/extern/freestyle/src/stroke/Canvas.cpp new file mode 100755 index 00000000000..ecb76c4a015 --- /dev/null +++ b/extern/freestyle/src/stroke/Canvas.cpp @@ -0,0 +1,427 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "../system/FreestyleConfig.h" +#include "StrokeRenderer.h" +#include "../system/TimeStamp.h" +#include "../system/PseudoNoise.h" +#include "Canvas.h" +#include +#include +#include "../image/Image.h" +#include "../image/GaussianFilter.h" +#include "../image/ImagePyramid.h" +#include "../view_map/SteerableViewMap.h" +#include "StyleModule.h" + +using namespace std; + +LIB_STROKE_EXPORT +Canvas * Canvas::_pInstance = 0; + +LIB_STROKE_EXPORT +const char * Canvas::_MapsPath = 0; + +using namespace std; + +Canvas::Canvas() +{ + _SelectedFEdge = 0; + _pInstance = this; + PseudoNoise::init(42); + _paperTextureIndex = 0; + _Renderer = 0; + _drawPaper = true; + _current_sm = NULL; + _steerableViewMap = new SteerableViewMap(NB_STEERABLE_VIEWMAP-1); +} + +Canvas::Canvas(const Canvas& iBrother) +{ + _SelectedFEdge = iBrother._SelectedFEdge; + _pInstance = this; + PseudoNoise::init(42); + _paperTextureIndex = iBrother._paperTextureIndex; + _Renderer = iBrother._Renderer; + _drawPaper = iBrother._drawPaper; + _current_sm = iBrother._current_sm; + _steerableViewMap = new SteerableViewMap(*(iBrother._steerableViewMap)); + +} + +Canvas::~Canvas() +{ + _pInstance = 0; + + Clear(); + if(_Renderer) + { + delete _Renderer; + _Renderer = 0; + } + // FIXME: think about an easy control + // for the maps memory management... + if(!_maps.empty()){ + for(mapsMap::iterator m=_maps.begin(), mend=_maps.end(); + m!=mend; + ++m){ + delete ((*m).second); + } + _maps.clear(); + } + if(_steerableViewMap) + delete _steerableViewMap; +} + +void Canvas::preDraw() {} + +void Canvas::Draw() +{ + if(_StyleModules.empty()) + return; + preDraw(); + TimeStamp *timestamp = TimeStamp::instance(); + + for(unsigned i = 0; i < _StyleModules.size(); i++) { + _current_sm = _StyleModules[i]; + if (!_StyleModules[i]->getModified()) + { + if (_StyleModules[i]->getDrawable() && _Layers[i]) + _Layers[i]->Render(_Renderer); + continue; + } + if (i < _Layers.size() && _Layers[i]) + delete _Layers[i]; + + _Layers[i] = _StyleModules[i]->execute(); + + if (_StyleModules[i]->getDrawable() && _Layers[i]) + _Layers[i]->Render(_Renderer); + + timestamp->increment(); + } + postDraw(); +} + +void Canvas::postDraw() +{ + update(); +} + + +void Canvas::Clear() +{ + if(!_Layers.empty()) { + for (deque::iterator sl=_Layers.begin(), slend=_Layers.end(); + sl != slend; + ++sl) + if (*sl) + delete (*sl); + _Layers.clear(); + } + + if(!_StyleModules.empty()) { + for (deque::iterator s=_StyleModules.begin(), send=_StyleModules.end(); + s != send; + ++s) + if (*s) + delete (*s); + _StyleModules.clear(); + } + if(_steerableViewMap) + _steerableViewMap->Reset(); +} + +void Canvas::Erase() +{ + if(!_Layers.empty()) + { + for (deque::iterator sl=_Layers.begin(), slend=_Layers.end(); + sl != slend; + ++sl) + if (*sl) + (*sl)->clear(); + } + if(_steerableViewMap) + _steerableViewMap->Reset(); + update(); +} + +void Canvas::InsertStyleModule(unsigned index, StyleModule *iStyleModule) { + unsigned size = _StyleModules.size(); + StrokeLayer* layer = new StrokeLayer(); + if((_StyleModules.empty()) || (index == size)) { + _StyleModules.push_back(iStyleModule); + _Layers.push_back(layer); + return; + } + _StyleModules.insert(_StyleModules.begin() + index, iStyleModule); + _Layers.insert(_Layers.begin()+index, layer); +} + +void Canvas::RemoveStyleModule(unsigned index) +{ + unsigned i=0; + if (!_StyleModules.empty()) + { + for(deque::iterator s=_StyleModules.begin(), send=_StyleModules.end(); + s!=send; + ++s) + { + if(i == index) + { + // remove shader + if (*s) + delete *s; + _StyleModules.erase(s); + break; + } + ++i; + } + } + i=0; + if(!_Layers.empty()) + { + for(deque::iterator sl=_Layers.begin(), slend=_Layers.end(); + sl!=slend; + ++sl) + { + if(i == index) + { + // remove layer + if (*sl) + delete *sl; + _Layers.erase(sl); + break; + } + ++i; + } + } +} + + +void Canvas::SwapStyleModules(unsigned i1, unsigned i2) +{ + StyleModule* tmp; + tmp = _StyleModules[i1]; + _StyleModules[i1] = _StyleModules[i2]; + _StyleModules[i2] = tmp; + + StrokeLayer* tmp2; + tmp2 = _Layers[i1]; + _Layers[i1] = _Layers[i2]; + _Layers[i2] = tmp2; +} + +void Canvas::ReplaceStyleModule(unsigned index, StyleModule *iStyleModule) +{ + unsigned i=0; + for(deque::iterator s=_StyleModules.begin(), send=_StyleModules.end(); + s != send; + ++s) + { + if(i == index) + { + if (*s) + delete *s; + *s = iStyleModule; + break; + } + ++i; + } +} + +void Canvas::SetVisible(unsigned index, bool iVisible) { + _StyleModules[index]->setDisplayed(iVisible); +} + +void Canvas::setModified(unsigned index, bool iMod) +{ + _StyleModules[index]->setModified(iMod); +} + +void Canvas::resetModified(bool iMod/* =false */) +{ + unsigned size = _StyleModules.size(); + for(unsigned i = 0; i < size; ++i) + setModified(i,iMod); +} + +void Canvas::causalStyleModules(vector& vec, unsigned index) { + unsigned size = _StyleModules.size(); + + for(unsigned i = index; i < size; ++i) + if (_StyleModules[i]->getCausal()) + vec.push_back(i); +} + +void Canvas::changePaperTexture(bool increment) +{ + if(increment) + _paperTextureIndex = (_paperTextureIndex+1) % TextureManager::getPaperTexturesNumber(); + else + { + _paperTextureIndex--; + if(_paperTextureIndex < 0) + _paperTextureIndex = TextureManager::getPaperTexturesNumber() - 1; + } +} + +void Canvas::Render(const StrokeRenderer *iRenderer) +{ + for (unsigned i = 0; i < _StyleModules.size(); i++) { + if(!_StyleModules[i]->getDisplayed() || !_Layers[i]) + continue; + _Layers[i]->Render(iRenderer); + } +} + +void Canvas::RenderBasic(const StrokeRenderer *iRenderer) + +{ + for (unsigned i = 0; i < _StyleModules.size(); i++) { + if(!_StyleModules[i]->getDisplayed() || !_Layers[i]) + continue; + _Layers[i]->RenderBasic(iRenderer); + } +} + +void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int iNbLevels, float iSigma){ + // check whether this map was already loaded: + if(!_maps.empty()){ + mapsMap::iterator m = _maps.find(iMapName); + if(m!=_maps.end()){ + // lazy check for size changes + ImagePyramid * pyramid = (*m).second; + if((pyramid->width() != width()) || (pyramid->height() != height())){ + delete pyramid; + }else{ + return; + } + } + } + string filePath; + if(_MapsPath){ + filePath = _MapsPath; + filePath += iFileName; + }else{ + filePath = iFileName; + } + QImage * qimg; + QImage newMap(filePath.c_str()); + if(newMap.isNull()){ + cout << "Could not load image file " << filePath << endl; + return; + } + qimg = &newMap; + + //resize + QImage scaledImg; + if((newMap.width()!=width()) || (newMap.height()!=height())){ + scaledImg = newMap.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + qimg = &scaledImg; + } + + // deal with color image + // if(newMap->depth() != 8){ + // int w = newMap->width(); + // int h = newMap->height(); + // QImage *tmp = new QImage(w, h, 8); + // for(unsigned y=0;ypixel(x,y)); + // tmp->setPixel(x,y,c); + // } + // } + // delete newMap; + // newMap = tmp; + // } + + unsigned x,y; + int w = qimg->width(); + int h = qimg->height(); + GrayImage tmp(w,h); + for(y=0; ypixel(x,y));// /255.f; + tmp.setPixel(x,y,c); + } + } + + // GrayImage blur(w,h); + // GaussianFilter gf(4.f); + // //int bound = gf.getBound(); + // for(y=0; y(&tmp, x,y); + // blur.setPixel(x,y,c); + // } + // } + + GaussianPyramid *pyramid = new GaussianPyramid(tmp, iNbLevels, iSigma); + int ow = pyramid->width(0); + int oh = pyramid->height(0); + QString base(iMapName); + for(unsigned i=0; igetNumberOfLevels(); ++i){ + // save each image: + // w = pyramid.width(i); + // h = pyramid.height(i); + QImage qtmp(ow, oh, QImage::Format_RGB32); + //int k = (1<pixel(x,y,i);//255*pyramid->pixel(x,y,i); + qtmp.setPixel(x,y,qRgb(c,c,c)); + } + } + qtmp.save(base+QString::number(i)+".bmp", "BMP"); + } + // QImage *qtmp = new QImage(w, h, 32); + // for(y=0;ysetPixel(x,y,qRgb(c,c,c)); + // } + // } + // delete newMap; + // newMap = qtmp; + // + _maps[iMapName] = pyramid; + // newMap->save("toto.bmp", "BMP"); +} + +float Canvas::readMapPixel(const char *iMapName, int level, int x, int y){ + if(_maps.empty()){ + cout << "readMapPixel warning: no map was loaded "<< endl; + return -1; + } + mapsMap::iterator m = _maps.find(iMapName); + if(m==_maps.end()){ + cout << "readMapPixel warning: no map was loaded with the name " << iMapName << endl; + return -1; + } + ImagePyramid *pyramid = (*m).second; + if((x<0) || (x>=pyramid->width()) || (y<0) || (y>=pyramid->height())) + return 0; + + return pyramid->pixel(x,height()-1-y,level); +} diff --git a/extern/freestyle/src/stroke/Canvas.h b/extern/freestyle/src/stroke/Canvas.h new file mode 100755 index 00000000000..cae50162933 --- /dev/null +++ b/extern/freestyle/src/stroke/Canvas.h @@ -0,0 +1,198 @@ +// +// Filename : Canvas.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a canvas designed to draw style modules +// Date of creation : 20/10/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CANVAS_H +# define CANVAS_H + +# include +# include +# include +# include "../system/FreestyleConfig.h" +# include "StrokeLayer.h" +# include "../geometry/BBox.h" +# include "../geometry/Geom.h" + +using namespace Geometry; + +struct ltstr +{ + bool operator()(const char* s1, const char* s2) const + { + return strcmp(s1, s2) < 0; + } +}; + +class InformationMap; +class StrokeRenderer; +class ViewMap; +class ViewEdge; +class FEdge; +class RGBImage; +class GrayImage; +class QImage; +class ImagePyramid; +class SteerableViewMap; +class StyleModule; + +/*! Class to define the canvas on which strokes are drawn. + * It's used to store state information about the drawing. + */ +class LIB_STROKE_EXPORT Canvas +{ +public: + /*! Returns a pointer on the Canvas instance */ + static Canvas * getInstance() {return _pInstance;} + typedef std::map mapsMap ; + static const int NB_STEERABLE_VIEWMAP = 5; +protected: + static Canvas *_pInstance; + std::deque _Layers; + std::deque _StyleModules; + FEdge *_SelectedFEdge; + int _paperTextureIndex; + bool _drawPaper; + StrokeRenderer *_Renderer; + StyleModule* _current_sm; + mapsMap _maps; + static const char * _MapsPath; + SteerableViewMap *_steerableViewMap; + +public: + /* Builds the Canvas */ + Canvas(); + /* Copy constructor */ + Canvas(const Canvas& iBrother); + /* Destructor */ + virtual ~Canvas(); + + /* operations that need to be done before a draw */ + virtual void preDraw(); + + /* Draw the canvas using the current shader */ + virtual void Draw(); + + /* operations that need to be done after a draw */ + virtual void postDraw(); + + /* Renders the created strokes */ + virtual void Render(const StrokeRenderer *iRenderer); + /* Basic Renders the created strokes */ + virtual void RenderBasic(const StrokeRenderer *iRenderer); + /* Renders a stroke */ + virtual void RenderStroke(Stroke *iStroke) = 0; + + /* init the canvas */ + virtual void init() = 0; + + /* Clears the Canvas (shaders stack, layers stack...)*/ + void Clear(); + + /* Erases the layers */ + virtual void Erase(); + + /* Reads a pixel area from the canvas */ + virtual void readColorPixels(int x, int y,int w, int h, RGBImage& oImage) const = 0; + /* Reads a depth pixel area from the canvas */ + virtual void readDepthPixels(int x, int y,int w, int h, GrayImage& oImage) const = 0; + + /* update the canvas (display) */ + virtual void update() = 0; + + /* checks whether the canvas is empty or not */ + bool isEmpty() const {return (_Layers.empty());} + + /* Maps management */ + /*! Loads an image map. The map will be scaled + * (without preserving the ratio in order + * to fit the actual canvas size.) + * The image must be a gray values image... + * \param iFileName + * The name of the image file + * \param iMapName + * The name that will be used to access + * this image + * \param iNbLevels + * The number of levels in the map pyramid. (default = 4). + * If iNbLevels == 0, the complete pyramid is built. + */ + void loadMap(const char *iFileName, const char *iMapName, unsigned iNbLevels=4, float iSigma = 1.f); + + /*! Reads a pixel value in a map. + * Returns a value between 0 and 1. + * \param iMapName + * The name of the map + * \param level + * The level of the pyramid from which the pixel must + * be read. + * \param x + * The abscissa of the desired pixel specified in level0 coordinate + * system. The origin is the lower left corner. + * \param y + * The ordinate of the desired pixel specified in level0 coordinate + * system. The origin is the lower left corner. + */ + float readMapPixel(const char *iMapName, int level, int x, int y); + + /*! Sets the steerable viewmap */ + void loadSteerableViewMap(SteerableViewMap * iSVM) {_steerableViewMap = iSVM;} + + /*! Returns the steerable VM */ + SteerableViewMap * getSteerableViewMap() {return _steerableViewMap;} + + /*! accessors */ + inline const FEdge * selectedFEdge() const {return _SelectedFEdge;} + inline FEdge * selectedFEdge() {return _SelectedFEdge;} + virtual int width() const = 0; + virtual int height() const = 0; + inline int currentPaperTextureIndex() const {return _paperTextureIndex;} + virtual BBox scene3DBBox() const = 0; + inline const StrokeRenderer * renderer() const {return _Renderer;} + inline StyleModule* getCurrentStyleModule() { return _current_sm; } + virtual bool getRecordFlag() const {return false;} + + /*! modifiers */ + inline void SetSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} + /*! inserts a shader at pos index+1 */ + void InsertStyleModule(unsigned index, StyleModule *iStyleModule); + void RemoveStyleModule(unsigned index); + void SwapStyleModules(unsigned i1, unsigned i2); + void ReplaceStyleModule(unsigned index, StyleModule *iStyleModule); + void SetVisible(unsigned index, bool iVisible) ; + //inline void SetDensityMap(InformationMap* iMap) {_DensityMap = iMap;} + inline void AddLayer(StrokeLayer *iLayer) {_Layers.push_back(iLayer);} + inline void SetCurrentPaperTextureIndex(int i) {_paperTextureIndex = i;} + void changePaperTexture(bool increment=true) ; + /*! enables/disables paper texture */ + inline void togglePaperTexture() {_drawPaper = !_drawPaper;} + void resetModified(bool iMod=false); + void causalStyleModules(std::vector& vec, unsigned index = 0); + void setModified(unsigned index, bool b); +}; + +#endif // CANVAS_H diff --git a/extern/freestyle/src/stroke/Chain.cpp b/extern/freestyle/src/stroke/Chain.cpp new file mode 100755 index 00000000000..3776cd58a03 --- /dev/null +++ b/extern/freestyle/src/stroke/Chain.cpp @@ -0,0 +1,126 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Chain.h" +#include "../view_map/ViewMapIterators.h" +#include "../view_map/ViewMapAdvancedIterators.h" + +void Chain::push_viewedge_back(ViewEdge *iViewEdge, bool orientation) +{ + ViewEdge::vertex_iterator v; + ViewEdge::vertex_iterator vend; + ViewEdge::vertex_iterator vfirst; + Vec3r previous, current; + if(true == orientation) + { + v=iViewEdge->vertices_begin(); + vfirst = v; + vend=iViewEdge->vertices_end(); + } + else + { + v=iViewEdge->vertices_last(); + vfirst = v; + vend=iViewEdge->vertices_end(); + } + + if(!_Vertices.empty()) + { + previous = _Vertices.back()->point2d(); + if(orientation) + ++v; + else + --v; + } + else + previous = (*v)->point2d(); + do{ + current = (*v)->point2d(); + Curve::push_vertex_back(*v); + //_Length += (current-previous).norm(); + previous = current; + if(orientation) + ++v; + else + --v; + }while((v!=vend) && (v!=vfirst)); + + if(v==vfirst) + { + //Add last one: + current = (*v)->point2d(); + Curve::push_vertex_back(*v); + //_Length += (current-previous).norm(); + } +} + +void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation) +{ + orientation = !orientation; + ViewEdge::vertex_iterator v; + ViewEdge::vertex_iterator vend; + ViewEdge::vertex_iterator vfirst; + Vec3r previous, current; + if(true == orientation) + { + v=iViewEdge->vertices_begin(); + vfirst = v; + vend=iViewEdge->vertices_end(); + } + else + { + v=iViewEdge->vertices_last(); + vfirst = v; + vend=iViewEdge->vertices_end(); + } + + if(!_Vertices.empty()) + { + previous = _Vertices.front()->point2d(); + if(orientation) + ++v; + else + --v; + } + else + previous = (*v)->point2d(); + do{ + current = (*v)->point2d(); + Curve::push_vertex_front((*v)); + //_Length += (current-previous).norm(); + previous = current; + if(orientation) + ++v; + else + --v; + }while((v!=vend) && (v!=vfirst)); + + if(v==vfirst) + { + //Add last one: + current = (*v)->point2d(); + Curve::push_vertex_front(*v); + //_Length += (current-previous).norm(); + } +} + + + diff --git a/extern/freestyle/src/stroke/Chain.h b/extern/freestyle/src/stroke/Chain.h new file mode 100755 index 00000000000..042437a4154 --- /dev/null +++ b/extern/freestyle/src/stroke/Chain.h @@ -0,0 +1,82 @@ +// +// Filename : Chain.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a chain of viewedges. +// Date of creation : 09/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CHAIN_H +# define CHAIN_H + +# include "../view_map/ViewMap.h" +# include "Curve.h" +/*! Class to represent a 1D elements issued + * from the chaining process. + * A Chain is the last step before the Stroke and + * is used in the Splitting and Creation processes. + */ +class Chain : public Curve +{ +protected: + // tmp + Id * _splittingId; +public: + /*! Defult constructor. */ + Chain() : Curve() {_splittingId=0;} + /*! Builds a chain from its Id. */ + Chain(const Id& id) : Curve(id) {_splittingId=0;} + /*! Copy Constructor */ + Chain(const Chain& iBrother) : Curve(iBrother) {_splittingId=iBrother._splittingId;} + /*! Destructor. */ + virtual ~Chain() { + // only the last splitted deletes this id + if(_splittingId){ + if(*_splittingId == _Id) + delete _splittingId; + } + } + + /*! Adds a ViewEdge at the end of the chain + * \param iViewEdge + * The ViewEdge that must be added. + * \param orientation + * The orientation with which this ViewEdge + * must be processed. + */ + void push_viewedge_back(ViewEdge *iViewEdge, bool orientation) ; + /*! Adds a ViewEdge at the beginning of the chain + * \param iViewEdge + * The ViewEdge that must be added. + * \param orientation + * The orientation with which this ViewEdge + * must be processed. + */ + void push_viewedge_front(ViewEdge *iViewEdge, bool orientation) ; + + inline void setSplittingId(Id * sid){_splittingId = sid;} + inline Id* getSplittingId() {return _splittingId;} +}; + +#endif // CHAIN_H diff --git a/extern/freestyle/src/stroke/ChainingIterators.cpp b/extern/freestyle/src/stroke/ChainingIterators.cpp new file mode 100755 index 00000000000..206b6eb7364 --- /dev/null +++ b/extern/freestyle/src/stroke/ChainingIterators.cpp @@ -0,0 +1,147 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "ChainingIterators.h" +#include "../system/TimeStamp.h" + +ViewEdge* AdjacencyIterator::operator*() { + return (*_internalIterator).first; +} +bool AdjacencyIterator::isIncoming() const{ + return (*_internalIterator).second; +} + +void AdjacencyIterator::increment(){ + ++_internalIterator; + while((!_internalIterator.isEnd()) && (!isValid((*_internalIterator).first))) + ++_internalIterator; +} + +bool AdjacencyIterator::isValid(ViewEdge* edge){ + if(_restrictToSelection) + if(edge->getTimeStamp() != TimeStamp::instance()->getTimeStamp()) + return false; + if(_restrictToUnvisited) + if(edge->getChainingTimeStamp() > TimeStamp::instance()->getTimeStamp()) + return false; + return true; +} + +void ChainingIterator::increment() { + _increment = true; + ViewVertex * vertex = getVertex(); + if(!vertex){ + _edge = 0; + return; + } + AdjacencyIterator it = AdjacencyIterator(vertex, _restrictToSelection, _restrictToUnvisited); + if(it.isEnd()) + _edge = 0; + else + _edge = traverse(it); + if(_edge == 0) + return; + if(_edge->A() == vertex) + _orientation = true; + else + _orientation = false; +} + +void ChainingIterator::decrement() { + _increment = false; + ViewVertex * vertex = getVertex(); + if(!vertex){ + _edge = 0; + return; + } + AdjacencyIterator it = AdjacencyIterator(vertex, _restrictToSelection, _restrictToUnvisited); + if(it.isEnd()) + _edge = 0; + else + _edge = traverse(it); + if(_edge == 0) + return; + if(_edge->B() == vertex) + _orientation = true; + else + _orientation = false; +} + +// +// ChainSilhouetteIterators +// +/////////////////////////////////////////////////////////// + +ViewEdge * ChainSilhouetteIterator::traverse(const AdjacencyIterator& ait){ + AdjacencyIterator it(ait); + ViewVertex* nextVertex = getVertex(); + // we can't get a NULL nextVertex here, it was intercepted + // before + if(nextVertex->getNature() & Nature::T_VERTEX){ + TVertex * tvertex = (TVertex*)nextVertex; + ViewEdge *mate = (tvertex)->mate(getCurrentEdge()); + while(!it.isEnd()){ + ViewEdge *ve = *it; + if(ve == mate) + return ve; + ++it; + } + return 0; + } + if(nextVertex->getNature() & Nature::NON_T_VERTEX){ + NonTVertex * nontvertex = (NonTVertex*)nextVertex; + ViewEdge * newEdge(0); + // we'll try to chain the edges by keeping the same nature... + // the preseance order is : SILHOUETTE, BORDER, CREASE, SUGGESTIVE, VALLEY, RIDGE + Nature::EdgeNature natures[6] = {Nature::SILHOUETTE, Nature::BORDER, Nature::CREASE, Nature::SUGGESTIVE_CONTOUR, Nature::VALLEY, Nature::RIDGE}; + for(unsigned i=0; i<6; ++i){ + if(getCurrentEdge()->getNature() & natures[i]){ + int n = 0; + while(!it.isEnd()){ + ViewEdge *ve = *it; + if(ve->getNature() & natures[i]){ + ++n; + newEdge = ve; + } + ++it; + } + if(n == 1){ + return newEdge; + }else{ + return 0; + } + } + } + } + return 0; +} + +ViewEdge * ChainPredicateIterator::traverse(const AdjacencyIterator& ait){ + AdjacencyIterator it(ait); + // Iterates over next edges to see if one of them + // respects the predicate: + while(!it.isEnd()) { + ViewEdge *ve = *it; + if(((*_unary_predicate)(*ve)) && ((*_binary_predicate)(*(getCurrentEdge()),*(ve)))) + return ve; + ++it; + } + return 0; +} diff --git a/extern/freestyle/src/stroke/ChainingIterators.h b/extern/freestyle/src/stroke/ChainingIterators.h new file mode 100755 index 00000000000..1e946855dce --- /dev/null +++ b/extern/freestyle/src/stroke/ChainingIterators.h @@ -0,0 +1,364 @@ +// +// Filename : ChainingIterators +// Author : Stephane Grabli +// Purpose : Chaining iterators +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef CHAININGITERATORS_H +# define CHAININGITERATORS_H + +# include +# include "../view_map/ViewMap.h" +# include "../view_map/ViewMapIterators.h" +# include "../view_map/ViewMapAdvancedIterators.h" +# include "Predicates1D.h" + +//using namespace ViewEdgeInternal; + +// +// Adjacency iterator used in the chaining process +// +/////////////////////////////////////////////////////////// +class LIB_STROKE_EXPORT AdjacencyIterator{ +protected: + ViewVertexInternal::orientedViewEdgeIterator _internalIterator; + bool _restrictToSelection; + bool _restrictToUnvisited; +public: + AdjacencyIterator(){ + _restrictToSelection = true; + _restrictToUnvisited = true; + } + AdjacencyIterator(ViewVertex *iVertex, bool iRestrictToSelection = true, bool iRestrictToUnvisited = true){ + _restrictToSelection = iRestrictToSelection; + _restrictToUnvisited = iRestrictToUnvisited; + _internalIterator = iVertex->edgesBegin(); + while((!_internalIterator.isEnd()) && (!isValid((*_internalIterator).first))) + ++_internalIterator; + } + AdjacencyIterator(const AdjacencyIterator& iBrother){ + _internalIterator = iBrother._internalIterator; + _restrictToSelection = iBrother._restrictToSelection; + _restrictToUnvisited = iBrother._restrictToUnvisited; + } + AdjacencyIterator& operator=(const AdjacencyIterator& iBrother) { + _internalIterator = iBrother._internalIterator; + _restrictToSelection = iBrother._restrictToSelection; + _restrictToUnvisited = iBrother._restrictToUnvisited; + return *this; + } + virtual ~AdjacencyIterator(){ + } + + inline bool isEnd(){ + return _internalIterator.isEnd(); + } + inline bool isBegin(){ + return _internalIterator.isBegin(); + } + /*! Returns true if the current ViewEdge is is coming + * towards the iteration vertex. False otherwise. + */ + bool isIncoming() const ; + + /*! Returns a *pointer* to the pointed ViewEdge. */ + virtual ViewEdge* operator*() ; + virtual ViewEdge* operator->() {return operator*();} + virtual AdjacencyIterator& operator++() { + increment(); + return *this; + } + virtual AdjacencyIterator operator++(int) { + AdjacencyIterator tmp(*this); + increment(); + return tmp; + } + void increment(); + +protected: + bool isValid(ViewEdge* edge); +}; + +// +// Base class for Chaining Iterators +// +/////////////////////////////////////////////////////////// + +/*! Base class for chaining iterators. + * This class is designed to be overloaded + * in order to describe chaining rules. + * It makes the works of chaining rules description + * easier. + * The two main methods that need to overloaded are + * traverse() and init(). + * traverse() tells which ViewEdge to follow, among the adjacent ones. + * If you specify restriction rules (such as "Chain only + * ViewEdges of the selection"), they will be included + * in the adjacency iterator. (i.e, the adjacent iterator + * will only stop on "valid" edges). + */ +class LIB_STROKE_EXPORT ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator{ +protected: + bool _restrictToSelection; + bool _restrictToUnvisited; + bool _increment; //true if we're currently incrementing, false when decrementing + +public: + /*! Builds a Chaining Iterator from the first ViewEdge used for iteration + * and its orientation. + * \param iRestrictToSelection + * Indicates whether to force the chaining to stay within + * the set of selected ViewEdges or not. + * \param iRestrictToUnvisited + * Indicates whether a ViewEdge that has already been chained + * must be ignored ot not. + * \param begin + * The ViewEdge from which to start the chain. + * \param orientation + * The direction to follow to explore the graph. If true, + * the direction indicated by the first ViewEdge is used. + */ + ChainingIterator(bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge* begin = 0, bool orientation = true) + : ViewEdgeIterator(begin, orientation) { + _restrictToSelection = iRestrictToSelection; + _restrictToUnvisited = iRestrictToUnvisited; + _increment = true; + } + + /*! Copy constructor */ + ChainingIterator(const ChainingIterator& brother) + : ViewEdgeIterator(brother) { + _restrictToSelection = brother._restrictToSelection; + _restrictToUnvisited = brother._restrictToUnvisited; + _increment = brother._increment; + } + + /*! Returns the string "ChainingIterator" */ + virtual string getExactTypeName() const { + return "ChainingIterator"; + } + + /*! Inits the iterator context. + * This method is called each time + * a new chain is started. + * It can be used to reset some + * history information that you + * might want to keep. + */ + virtual void init(){} + + /*! This method iterates over the potential next + * ViewEdges and returns the one that will be + * followed next. + * returns the next ViewEdge to follow or + * 0 when the end of the chain is reached. + * \param it + * The iterator over the ViewEdges adjacent to + * the end vertex of the current ViewEdge. + * The Adjacency iterator reflects the restriction + * rules by only iterating over the valid ViewEdges. + */ + virtual ViewEdge * traverse(const AdjacencyIterator &it){ + cerr << "Warning: the traverse method was not defined" << endl; + return 0; + } + + /* accessors */ + /*! Returns true if the orientation of the current ViewEdge + * corresponds to its natural orientation + */ + //inline bool getOrientation() const {} + /*! Returns the vertex which is the next crossing */ + inline ViewVertex * getVertex() { + if(_increment){ + if(_orientation){ + return _edge->B(); + }else{ + return _edge->A(); + } + }else{ + if(_orientation){ + return _edge->A(); + }else{ + return _edge->B(); + } + } + } + + /*! Returns true if the current iteration is an incrementation */ + inline bool isIncrementing() const{ + return _increment; + } + + /* increments.*/ + virtual void increment() ; + virtual void decrement() ; +}; + +// +// Chaining iterators definitions +// +/////////////////////////////////////////////////////////// + +/*! A ViewEdge Iterator used to follow ViewEdges the most naturally. + * For example, it will follow visible ViewEdges of same nature. + * As soon, as the nature or the visibility changes, the iteration + * stops (by setting the pointed ViewEdge to 0). + * In the case of an iteration over a set of ViewEdge that are both + * Silhouette and Crease, there will be a precedence of the silhouette + * over the crease criterion. + */ +class LIB_STROKE_EXPORT ChainSilhouetteIterator : public ChainingIterator +{ +public: + /*! Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration + * and its orientation. + * \param iRestrictToSelection + * Indicates whether to force the chaining to stay within + * the set of selected ViewEdges or not. + * \param begin + * The ViewEdge from where to start the iteration. + * \param orientation + * If true, we'll look for the next ViewEdge among the + * ViewEdges that surround the ending ViewVertex of begin. + * If false, we'll search over the ViewEdges surrounding + * the ending ViewVertex of begin. + */ + ChainSilhouetteIterator(bool iRestrictToSelection = true, ViewEdge* begin = NULL, bool orientation = true) + : ChainingIterator(iRestrictToSelection, true, begin, orientation) {} + + /*! Copy constructor */ + ChainSilhouetteIterator(const ChainSilhouetteIterator& brother) + : ChainingIterator(brother) {} + + /*! Returns the string "ChainSilhouetteIterator" */ + virtual string getExactTypeName() const { + return "ChainSilhouetteIterator"; + } + + /*! This method iterates over the potential next + * ViewEdges and returns the one that will be + * followed next. + * When reaching the end of a chain, 0 is returned. + */ + virtual ViewEdge * traverse(const AdjacencyIterator& it); + +}; + +// +// ChainPredicateIterator +// +/////////////////////////////////////////////////////////// + +/*! A "generic" user-controlled ViewEdge iterator. This iterator + * is in particular built from a unary predicate and a binary predicate. + * First, the unary predicate is evaluated for all potential next ViewEdges + * in order to only keep the ones respecting a certain constraint. + * Then, the binary predicate is evaluated on the current ViewEdge + * together with each ViewEdge of the previous selection. The first + * ViewEdge respecting both the unary predicate and the binary predicate + * is kept as the next one. If none of the potential next ViewEdge respects + * these 2 predicates, 0 is returned. + */ +class LIB_STROKE_EXPORT ChainPredicateIterator : public ChainingIterator +{ +protected: + BinaryPredicate1D *_binary_predicate; // the caller is responsible for the deletion of this object + UnaryPredicate1D *_unary_predicate; // the caller is responsible for the deletion of this object +public: + + /*! Builds a ChainPredicateIterator from a starting ViewEdge and its orientation. + * \param iRestrictToSelection + * Indicates whether to force the chaining to stay within + * the set of selected ViewEdges or not. + * \param iRestrictToUnvisited + * Indicates whether a ViewEdge that has already been chained + * must be ignored ot not. + * \param begin + * The ViewEdge from where to start the iteration. + * \param orientation + * If true, we'll look for the next ViewEdge among the + * ViewEdges that surround the ending ViewVertex of begin. + * If false, we'll search over the ViewEdges surrounding + * the ending ViewVertex of begin. + */ + ChainPredicateIterator(bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge* begin = NULL, bool orientation = true) + : ChainingIterator(iRestrictToSelection, iRestrictToUnvisited, begin, orientation) { + _binary_predicate = 0; + _unary_predicate = 0; + } + + /*! Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting ViewEdge and its orientation. + * \param iRestrictToSelection + * Indicates whether to force the chaining to stay within + * the set of selected ViewEdges or not. + * \param iRestrictToUnvisited + * Indicates whether a ViewEdge that has already been chained + * must be ignored ot not. + * \param upred + * The unary predicate that the next ViewEdge must satisfy. + * \param bpred + * The binary predicate that the next ViewEdge must satisfy + * together with the actual pointed ViewEdge. + * \param begin + * The ViewEdge from where to start the iteration. + * \param orientation + * If true, we'll look for the next ViewEdge among the + * ViewEdges that surround the ending ViewVertex of begin. + * If false, we'll search over the ViewEdges surrounding + * the ending ViewVertex of begin. + */ + ChainPredicateIterator(UnaryPredicate1D& upred, BinaryPredicate1D& bpred, bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge* begin = NULL, bool orientation = true) + : ChainingIterator(iRestrictToSelection, iRestrictToUnvisited, begin, orientation) { + _unary_predicate = &upred; + _binary_predicate = &bpred; + } + + /*! Copy constructor */ + ChainPredicateIterator(const ChainPredicateIterator& brother) + : ChainingIterator(brother){ + _unary_predicate = brother._unary_predicate; + _binary_predicate = brother._binary_predicate; + } + + /*! Destructor. */ + virtual ~ChainPredicateIterator(){ + _unary_predicate = 0; + _binary_predicate = 0; + } + + /*! Returns the string "ChainPredicateIterator" */ + virtual string getExactTypeName() const { + return "ChainPredicateIterator"; + } + + /*! This method iterates over the potential next + * ViewEdges and returns the one that will be + * followed next. + * When reaching the end of a chain, 0 is returned. + */ + virtual ViewEdge * traverse(const AdjacencyIterator &it); +}; + +#endif // CHAININGITERATORS_H diff --git a/extern/freestyle/src/stroke/ContextFunctions.cpp b/extern/freestyle/src/stroke/ContextFunctions.cpp new file mode 100755 index 00000000000..b55da1fb0f8 --- /dev/null +++ b/extern/freestyle/src/stroke/ContextFunctions.cpp @@ -0,0 +1,60 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "ContextFunctions.h" +#include "../view_map/SteerableViewMap.h" +#include "../system/TimeStamp.h" +namespace ContextFunctions { + + unsigned GetTimeStampCF(){ + return TimeStamp::instance()->getTimeStamp(); + } + + unsigned GetCanvasWidthCF(){ + return Canvas::getInstance()->width(); + } + + unsigned GetCanvasHeightCF(){ + return Canvas::getInstance()->height(); + } + void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels, float iSigma ){ + return Canvas::getInstance()->loadMap(iFileName, iMapName, iNbLevels,iSigma); + } + + float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y){ + Canvas * canvas = Canvas::getInstance(); + return canvas->readMapPixel(iMapName, level, x,y); + } + + float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y){ + SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); + return svm->readCompleteViewMapPixel(level,x,y); + } + + float ReadDirectionalViewMapPixelCF(int iOrientation, int level, unsigned x, unsigned y){ + SteerableViewMap *svm = Canvas::getInstance()->getSteerableViewMap(); + return svm->readSteerableViewMapPixel(iOrientation, level,x,y); + } + + FEdge * GetSelectedFEdgeCF(){ + return Canvas::getInstance()->selectedFEdge(); + } +} diff --git a/extern/freestyle/src/stroke/ContextFunctions.h b/extern/freestyle/src/stroke/ContextFunctions.h new file mode 100755 index 00000000000..37c98656fa7 --- /dev/null +++ b/extern/freestyle/src/stroke/ContextFunctions.h @@ -0,0 +1,124 @@ +// +// Filename : AdvancedFunctions0D.h +// Author(s) : Stephane Grabli +// Purpose : Functions related to context queries +// Date of creation : 20/12/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CONTEXT_FUNCTIONS_HPP +# define CONTEXT_FUNCTIONS_HPP + +# include "Canvas.h" +# include "../image/Image.h" +# include "../image/GaussianFilter.h" + +/*! \file ContextFunctions.h + * Interface to access the context related + * information. + */ +// +// Context Functions definitions +// +/////////////////////////////////////////////////////////// +/*! namespace containing all the Context related functions */ +namespace ContextFunctions { + + // GetTimeStamp + LIB_STROKE_EXPORT + /*! Returns the system time stamp */ + unsigned GetTimeStampCF(); + + // GetCanvasWidth + /*! Returns the canvas width */ + LIB_STROKE_EXPORT + unsigned GetCanvasWidthCF(); + + // GetCanvasHeight + /*! Returns the canvas width */ + LIB_STROKE_EXPORT + unsigned GetCanvasHeightCF(); + + // Load map + /*! Loads an image map for further reading */ + LIB_STROKE_EXPORT + void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels=4, float iSigma=1.f); + + // ReadMapPixel + /*! Reads a pixel in a user-defined map + * \return the floating value stored for that pixel + * \param iMapName + * The name of the map + * \param level + * The level of the pyramid in which we wish to read the pixel + * \param x + * The x-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + * \param y + * The y-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + */ + LIB_STROKE_EXPORT + float ReadMapPixelCF(const char *iMapName, int level, unsigned x, unsigned y); + + // ReadCompleteViewMapPixel + /*! Reads a pixel in the complete view map + * \return the floating value stored for that pixel + * \param level + * The level of the pyramid in which we wish to read the pixel + * \param x + * The x-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + * \param y + * The y-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + */ + LIB_STROKE_EXPORT + float ReadCompleteViewMapPixelCF(int level, unsigned x, unsigned y); + + // ReadOrientedViewMapPixel + /*! Reads a pixel in one of the oriented view map images + * \return the floating value stored for that pixel + * \param iOrientation + * The number telling which orientation we want to check + * \param level + * The level of the pyramid in which we wish to read the pixel + * \param x + * The x-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + * \param y + * The y-coordinate of the pixel we wish to read. The origin is + * in the lower-left corner. + */ + LIB_STROKE_EXPORT + float ReadDirectionalViewMapPixelCF(int iOrientation, int level, unsigned x, unsigned y); + + // DEBUG + LIB_STROKE_EXPORT + FEdge * GetSelectedFEdgeCF(); + +} // end of namespace ContextFunctions + +#endif // CONTEXT_FUNCTIONS_HPP + diff --git a/extern/freestyle/src/stroke/Curve.cpp b/extern/freestyle/src/stroke/Curve.cpp new file mode 100755 index 00000000000..f7b255c3ef4 --- /dev/null +++ b/extern/freestyle/src/stroke/Curve.cpp @@ -0,0 +1,818 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Curve.h" +#include "CurveIterators.h" +#include "CurveAdvancedIterators.h" + + /**********************************/ + /* */ + /* */ + /* CurvePoint */ + /* */ + /* */ + /**********************************/ + +CurvePoint::CurvePoint() +{ + __A=0; + __B=0; + _t2d=0; +} + +CurvePoint::CurvePoint(SVertex *iA, SVertex *iB, float t) +{ + __A=iA; + __B=iB; + _t2d=t; + if((iA == 0) && (t == 1.f)) + { + _Point2d=__B->point2d(); + _Point3d=__B->point3d(); + } + else if((iB == 0) && (t == 0.f)) + { + _Point2d=__A->point2d(); + _Point3d=__A->point3d(); + } + else + { + _Point2d=__A->point2d()+_t2d*(__B->point2d()-__A->point2d()); + _Point3d=__A->point3d()+_t2d*(__B->point3d()-__A->point3d()); + } +} + +CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) +{ + float t1=iA->t2d(); + float t2=iB->t2d(); + if((iA->A() == iB->A()) && (iA->B() == iB->B()) && (iA->A() != 0) && (iA->B() != 0) && (iB->A() != 0) && (iB->B() != 0)) + { + __A=iA->A(); + __B=iB->B(); + _t2d=t1+t2*t3-t1*t3; + } + else if((iA->B() == 0) && (iB->B() == 0)) + { + __A = iA->A(); + __B = iB->A(); + _t2d = t3; + } + else if((iA->t2d() == 0) && (iB->t2d() == 0)) + { + __A = iA->A(); + __B = iB->A(); + _t2d = t3; + } + else if(iA->A() == iB->A()){ + if(iA->t2d() == 0){ + __A = iB->A(); + __B = iB->B(); + _t2d = t3; + }else if(iB->t2d() == 0){ + __A = iA->A(); + __B = iA->B(); + _t2d = t3; + } + }else if(iA->B() == iB->B()){ + if(iA->t2d() == 1){ + __A = iB->A(); + __B = iB->B(); + _t2d = t3; + }else if(iB->t2d() == 1){ + __A = iA->A(); + __B = iA->B(); + _t2d = t3; + } + } + else if(iA->B() == iB->A()) + { + if((iA->t2d() != 1.f) && (iB->t2d() == 0.f)) + { + __A = iA->A(); + __B = iA->B(); + _t2d=t1+t3-t1*t3; + //_t2d = t3; + } + else if((iA->t2d() == 1.f) && (iB->t2d() != 0.f)) + { + __A = iB->A(); + __B = iB->B(); + //_t2d = t3; + _t2d=t2*t3; + } + + } + //_Point2d=__A->point2d()+_t2d*(__B->point2d()-__A->point2d()); + //_Point3d=__A->point3d()+_t2d*(__B->point3d()-__A->point3d()); + + _Point2d= iA->point2d()+t3*(iB->point2d()-iA->point2d()); + _Point3d=__A->point3d()+_t2d*(__B->point3d()-__A->point3d()); +} + +CurvePoint::CurvePoint(const CurvePoint& iBrother) +{ + __A=iBrother.__A; + __B=iBrother.__B; + _t2d=iBrother._t2d; + _Point2d=iBrother._Point2d; + _Point3d=iBrother._Point3d; +} + +CurvePoint& CurvePoint::operator=(const CurvePoint& iBrother) +{ + __A=iBrother.__A; + __B=iBrother.__B; + _t2d=iBrother._t2d; + _Point2d=iBrother._Point2d; + _Point3d=iBrother._Point3d; + return *this; +} + + +FEdge *CurvePoint::fedge() +{ + if(getNature() & Nature::T_VERTEX) + return 0; + return __A->fedge(); +} + + +FEdge* CurvePoint::getFEdge(Interface0D& inter) +{ + CurvePoint* iVertexB = dynamic_cast(&inter); + if (!iVertexB) + return 0; + if(((__A == iVertexB->__A) && (__B == iVertexB->__B)) + || + ((__A == iVertexB->__B) && (__B == iVertexB->__A))) + return __A->getFEdge(*__B); + else if(__B == 0) + { + if(iVertexB->__B == 0) + return __A->getFEdge(*(iVertexB->__A)); + else if(iVertexB->__A == __A) + return __A->getFEdge(*(iVertexB->__B)); + else if(iVertexB->__B == __A) + return __A->getFEdge(*(iVertexB->__A)); + } + else if(iVertexB->__B == 0) + { + if(iVertexB->__A == __A) + return __B->getFEdge(*(iVertexB->__A)); + else if(iVertexB->__A == __B) + return __A->getFEdge(*(iVertexB->__A)); + } + else if(__B == iVertexB->__A) + { + if((_t2d != 1) && (iVertexB->_t2d == 0)) + return __A->getFEdge(*__B); + if((_t2d == 1) && (iVertexB->_t2d != 0)) + return iVertexB->__A->getFEdge(*(iVertexB->__B)); + } + else if(__B == iVertexB->__B) + { + if((_t2d != 1) && (iVertexB->_t2d == 1)) + return __A->getFEdge(*__B); + if((_t2d == 1) && (iVertexB->_t2d != 1)) + return iVertexB->__A->getFEdge(*(iVertexB->__B)); + } + else if(__A == iVertexB->__A) + { + if((_t2d == 0) && (iVertexB->_t2d != 0)) + return iVertexB->__A->getFEdge(*(iVertexB->__B)); + if((_t2d != 0) && (iVertexB->_t2d == 0)) + return __A->getFEdge(*__B); + } + else if(__A == iVertexB->__B) + { + if((_t2d == 0) && (iVertexB->_t2d != 1)) + return iVertexB->__A->getFEdge(*(iVertexB->__B)); + if((_t2d != 0) && (iVertexB->_t2d == 1)) + return __A->getFEdge(*__B); + } + + cerr << "Warning: you should not be there..." << endl; + + return 0; +} + + + Vec3r CurvePoint::normal() const +{ + if(__B == 0) + return __A->normal(); + if(__A == 0) + return __B->normal(); + Vec3r Na = __A->normal(); + if(Exception::getException()) + Na = Vec3r(0,0,0); + Vec3r Nb = __B->normal(); + if(Exception::getException()) + Nb = Vec3r(0,0,0); + // compute t3d: + real t3d = SilhouetteGeomEngine::ImageToWorldParameter(__A->getFEdge(*__B),_t2d); + return ((1-t3d)*Na+t3d*Nb); +} + + + // Material CurvePoint::material() const + //{ + // if(__A == 0) + // return __B->material(); + // return __A->material(); + //} + + +// Id CurvePoint::shape_id() const +// { +// if(__A == 0) +// return __B->shape_id(); +// return __A->shape_id(); +// } + + + const SShape * CurvePoint::shape() const +{ + if(__A == 0) + return __B->shape(); + return __A->shape(); +} + + + +// float CurvePoint::shape_importance() const +// { + +// if(__A == 0) + +// return __B->shape_importance(); +// return __A->shape_importance(); +// } + + + // const unsigned CurvePoint::qi() const + //{ + // if(__A == 0) + // return __B->qi(); + // if(__B == 0) + // return __A->qi(); + // return __A->getFEdge(*__B)->qi(); + //} + + + occluder_container::const_iterator CurvePoint::occluders_begin() const +{ + if(__A == 0) + return __B->occluders_begin(); + if(__B == 0) + return __A->occluders_begin(); + return __A->getFEdge(*__B)->occluders_begin(); +} + + occluder_container::const_iterator CurvePoint::occluders_end() const +{ + if(__A == 0) + return __B->occluders_end(); + if(__B == 0) + return __A->occluders_end(); + return __A->getFEdge(*__B)->occluders_end(); +} + + bool CurvePoint::occluders_empty() const +{ + if(__A == 0) + return __B->occluders_empty(); + if(__B == 0) + return __A->occluders_empty(); + return __A->getFEdge(*__B)->occluders_empty(); +} + + int CurvePoint::occluders_size() const +{ + if(__A == 0) + return __B->occluders_size(); + if(__B == 0) + return __A->occluders_size(); + return __A->getFEdge(*__B)->occluders_size(); +} + + const SShape * CurvePoint::occluded_shape() const +{ + if(__A == 0) + return __B->occluded_shape(); + if(__B == 0) + return __A->occluded_shape(); + return __A->getFEdge(*__B)->occluded_shape(); +} + + const Polygon3r& CurvePoint::occludee() const +{ + if(__A == 0) + return __B->occludee(); + if(__B == 0) + return __A->occludee(); + return __A->getFEdge(*__B)->occludee(); +} + + const bool CurvePoint::occludee_empty() const +{ + if(__A == 0) + return __B->occludee_empty(); + if(__B == 0) + return __A->occludee_empty(); + return __A->getFEdge(*__B)->occludee_empty(); +} + + real CurvePoint::z_discontinuity() const +{ + if(__A == 0) + return __B->z_discontinuity(); + if(__B == 0) + return __A->z_discontinuity(); + if(__A->getFEdge(*__B) == 0) + return 0.0; + + return __A->getFEdge(*__B)->z_discontinuity(); +} +// +// float CurvePoint::local_average_depth() const +//{ +// return local_average_depth_function(this); +//} +// +// float CurvePoint::local_depth_variance() const +//{ +// return local_depth_variance_function(this); +//} +// +// real CurvePoint::local_average_density(float sigma) const +//{ +// //return local_average_density(this); +// +// return density_function(this); +//} +// Vec3r shaded_color() const ; +// +// Vec3r CurvePoint::orientation2d() const +// { +// if(__A == 0) +// return __B->orientation2d(); +// if(__B == 0) +// return __A->orientation2d(); +// return __B->point2d()-__A->point2d(); +// } +// +// Vec3r CurvePoint::orientation3d() const +// { +// if(__A == 0) +// return __B->orientation3d(); +// if(__B == 0) +// return __A->orientation3d(); +// return __B->point3d()-__A->point3d(); +// } + +// real curvature2d() const {return viewedge()->curvature2d((_VertexA->point2d()+_VertexB->point2d())/2.0);} +// +// Vec3r CurvePoint::curvature2d_as_vector() const +//{ +// // Vec3r edgeA = (_FEdges[0])->orientation2d().normalize(); +// // Vec3r edgeB = (_FEdges[1])->orientation2d().normalize(); +// // return edgeA+edgeB; +// // +// if(__A == 0) +// return __B->curvature2d_as_vector(); +// if(__B == 0) +// return __A->curvature2d_as_vector(); +// return ((1-_t2d)*__A->curvature2d_as_vector()+_t2d*__B->curvature2d_as_vector()); +//} +// +// real CurvePoint::curvature2d_as_angle() const +//{ +// // Vec3r edgeA = (_FEdges[0])->orientation2d(); +// // Vec3r edgeB = (_FEdges[1])->orientation2d(); +// // Vec2d N1(-edgeA.y(), edgeA.x());N1.normalize(); +// // Vec2d N2(-edgeB.y(), edgeB.x());N2.normalize(); +// // return acos((N1*N2)); +// +// if(__A == 0) +// return __B->curvature2d_as_angle(); +// if(__B == 0) +// return __A->curvature2d_as_angle(); +// return ((1-_t2d)*__A->curvature2d_as_angle()+_t2d*__B->curvature2d_as_angle()); +//} + + +real CurvePoint::curvatureFredo() const +{ + if(__A == 0) + return __B->curvatureFredo(); + if(__B == 0) + return __A->curvatureFredo(); + return ((1-_t2d)*__A->curvatureFredo()+_t2d*__B->curvatureFredo()); +} + +Vec2d CurvePoint::directionFredo () const +{ + if(__A == 0) + return __B->directionFredo(); + if(__B == 0) + return __A->directionFredo(); + return ((1-_t2d)*__A->directionFredo()+_t2d*__B->directionFredo()); +} + + /**********************************/ + /* */ + /* */ + /* Curve */ + /* */ + /* */ + /**********************************/ + +/* for functions */ + + +Curve::~Curve() +{ + if(!_Vertices.empty()) + { + for(vertex_container::iterator it=_Vertices.begin(), itend =_Vertices.end(); + it!=itend; + ++it) + { + delete (*it); + } + _Vertices.clear(); + } +} + +/*! iterators access */ +Curve::point_iterator Curve::points_begin(float step) +{ + vertex_container::iterator second = _Vertices.begin();++second; + return point_iterator(_Vertices.begin(), second, _Vertices.begin(), _Vertices.end(), _nSegments, step, 0.f, 0.f); + //return point_iterator(_Vertices.begin(), second, _nSegments, step, 0.f, 0.f); +} +Curve::const_point_iterator Curve::points_begin(float step) const +{ + vertex_container::const_iterator second = _Vertices.begin();++second; + return const_point_iterator(_Vertices.begin(), second, _Vertices.begin(), _Vertices.end(), _nSegments, step, 0.f, 0.f); + //return const_point_iterator(_Vertices.begin(), second, _nSegments, step, 0.f, 0.f); +} +Curve::point_iterator Curve::points_end(float step) +{ + return point_iterator(_Vertices.end(), _Vertices.end(), _Vertices.begin(), _Vertices.end(), _nSegments, step, 1.f, _Length); + //return point_iterator(_Vertices.end(), _Vertices.end(), _nSegments, step, 1.f, _Length); +} +Curve::const_point_iterator Curve::points_end(float step) const +{ + return const_point_iterator(_Vertices.end(), _Vertices.end(), _Vertices.begin(), _Vertices.end(), _nSegments, step, 1.f, _Length); + //return const_point_iterator(_Vertices.end(), _Vertices.end(), _nSegments, step, 1.f, _Length); +} + +// Adavnced Iterators access +Curve::point_iterator Curve::vertices_begin(){return points_begin(0);} +Curve::const_point_iterator Curve::vertices_begin() const {return points_begin(0);} +Curve::point_iterator Curve::vertices_end(){return points_end(0);} +Curve::const_point_iterator Curve::vertices_end() const {return points_end(0);} + +// specialized iterators access +CurveInternal::CurvePointIterator Curve::curvePointsBegin(float t){ + vertex_container::iterator second = _Vertices.begin();++second; + return CurveInternal::CurvePointIterator(_Vertices.begin(), second, _Vertices.begin(), _Vertices.end(), 0, _nSegments, _Length, t, 0.f, 0.f); +} + +CurveInternal::CurvePointIterator Curve::curvePointsEnd(float t){ + vertex_container::iterator last = _Vertices.end();--last; + return CurveInternal::CurvePointIterator(last, _Vertices.end(), _Vertices.begin(), _Vertices.end(), _nSegments, _nSegments, _Length, t, 0.f, _Length); +} + +CurveInternal::CurvePointIterator Curve::curveVerticesBegin(){ + return curvePointsBegin(0); +} + +CurveInternal::CurvePointIterator Curve::curveVerticesEnd(){ + return curvePointsEnd(0); +} + +Interface0DIterator Curve::pointsBegin(float t){ + vertex_container::iterator second = _Vertices.begin();++second; + Interface0DIterator ret(new CurveInternal::CurvePointIterator(_Vertices.begin(), second, _Vertices.begin(), _Vertices.end(), 0, _nSegments, _Length, t, 0.f, 0.f)); + return ret; +} + +Interface0DIterator Curve::pointsEnd(float t){ + vertex_container::iterator last = _Vertices.end();--last; + Interface0DIterator ret(new CurveInternal::CurvePointIterator(last, _Vertices.end(), _Vertices.begin(), _Vertices.end(), _nSegments, _nSegments, _Length, t, 0.f, _Length)); + return ret; +} + +Interface0DIterator Curve::verticesBegin(){ + return pointsBegin(0); +} + +Interface0DIterator Curve::verticesEnd(){ + return pointsEnd(0); +} + + +// Vec3r shaded_color(int iCombination = 0) const ; +// +// Vec3r Curve::orientation2d(point_iterator it) const +//{ +// return (*it)->orientation2d(); +//} +/* template */ +/* Vec3r Curve::orientation2d(int iCombination) const */ +/* { */ +/* return edge_orientation2d_function(this, iCombination); */ +/* } */ +// +// Vec3r Curve::orientation3d(point_iterator it) const +//{ +// return (*it)->orientation3d(); +//} +/* */ +/* Vec3r Curve::orientation3d(int iCombination) const */ +/* { */ +/* return edge_orientation3d_function(this, iCombination); */ +/* } */ +// real curvature2d(point_iterator it) const {return (*it)->curvature2d();} +// real curvature2d(int iCombination = 0) const ; + +// Material Curve::material() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// const Material& mat = (*v)->material(); +// for(;v!=vend;++v) +// { +// if((*v)->material() != mat) +// Exception::raiseException(); +// } +// return mat; +//} + +// int Curve::qi() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// int qi_= (*v)->qi(); +// for(;v!=vend;++v) +// { +// if((*v)->qi() != qi_) +// Exception::raiseException(); +// } +// return qi_; +//} +// occluder_container::const_iterator occluders_begin() const {return _FEdgeA->occluders().begin();} +// occluder_container::const_iterator occluders_end() const {return _FEdgeA->occluders().end();} + +//int Curve::occluders_size() const +//{ +// return qi(); +//} + +// bool Curve::occluders_empty() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// bool empty = (*v)->occluders_empty(); +// for(;v!=vend;++v) +// { +// if((*v)->occluders_empty() != empty) +// Exception::raiseException(); +// } +// return empty; +//} +// const Polygon3r& occludee() const {return *(_FEdgeA->aFace());} + +// const SShape * Curve::occluded_shape() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// const SShape *sshape = (*v)->occluded_shape(); +// for(;v!=vend;++v) +// { +// if((*v)->occluded_shape() != sshape) +// Exception::raiseException(); +// } +// return sshape; +//} + + +// const bool Curve::occludee_empty() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// bool empty = (*v)->occludee_empty(); +// for(;v!=vend;++v) +// { +// if((*v)->occludee_empty() != empty) +// Exception::raiseException(); +// } +// return empty; +//} +/* */ +/* real Curve::z_discontinuity(int iCombination) const */ +/* { */ +/* return z_discontinuity_edge_function(this, iCombination); */ +/* } */ + +// int Curve::shape_id() const +// { +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// Id id = (*v)->shape_id(); +// for(;v!=vend;++v) +// { +// if((*v)->shape_id() != id) +// Exception::raiseException(); +// } +// return id.first; +// } + + +// const SShape * Curve::shape() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// const SShape *sshape = (*v)->shape(); +// for(;v!=vend;++v) +// { +// if((*v)->shape() != sshape) +// Exception::raiseException(); +// } +// return sshape; +//} + + +// occluder_container::const_iterator Curve::occluders_begin() const +//{ +// const_vertex_iterator v=vertices_begin(); +// return (*v)->occluders_begin(); +//} +// +// +// occluder_container::const_iterator Curve::occluders_end() const +//{ +// const_vertex_iterator v=vertices_end(); +// return (*v)->occluders_end(); +//} + +/* */ +/* Vec3r Curve::curvature2d_as_vector(int iCombination) const */ +/* { */ +/* return curvature2d_as_vector_edge_function(this, iCombination); */ +/* } */ +/* */ +/* real Curve::curvature2d_as_angle(int iCombination) const */ +/* { */ +/* return curvature2d_as_angle_edge_function(this, iCombination); */ +/* } */ + +/* */ +/* float Curve::shape_importance(int iCombination) const */ +/* { */ +/* return shape_importance_edge_function(this, iCombination); */ +/* } */ + +/* */ +/* float Curve::local_average_depth(int iCombination) const */ +/* { */ +/* return local_average_depth_edge_function(this, iCombination); */ +/* } */ +/* */ +/* float Curve::local_depth_variance(int iCombination ) const */ +/* { */ +/* return local_depth_variance_edge_function(this, iCombination); */ +/* // local_depth_variance_functor functor; */ +/* // float result; */ +/* // Evaluate >(&functor, iCombination, result); */ +/* // return result; */ +/* } */ + +/* */ +/* real Curve::local_average_density(float sigma, int iCombination ) const */ +/* { */ +/* return density_edge_function(this, iCombination); */ +/* // density_functor functor; */ +/* // real result; */ +/* // Evaluate >(&functor, iCombination, result); */ +/* // return result; */ +/* } */ + +#define EPS_CURVA_DIR 0.01 + + +void Curve::computeCurvatureAndOrientation () +{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(), v2, prevV, v0; +// Vec2d p0, p1, p2; +// Vec3r p; + +// p=(*v)->point2d(); +// p0=Vec2d(p[0], p[1]); +// prevV=v; ++v; +// p=(*v)->point2d(); +// p1=Vec2d(p[0], p[1]); +// Vec2d prevDir(p1-p0); + +// for(;v!=vend;++v) +// { +// v2=v; ++v2; +// if (v2==vend) break; +// Vec3r p2=(*v2)->point2d(); + +// Vec2d BA=p0-p1; +// Vec2d BC=p2-p1; +// real lba=BA.norm(), lbc=BC.norm(); +// BA.normalizeSafe(); +// BC.normalizeSafe(); +// Vec2d normalCurvature=BA+BC; +// Vec2d dir=Vec2d(BC-BA); +// Vec2d normal=Vec2d(-dir[1], dir[0]); + +// normal.normalizeSafe(); +// real curvature=normalCurvature*normal; +// if (lba+lbc > MY_EPSILON) +// curvature/=(0.5*lba+lbc); +// if (dir.norm() < MY_EPSILON) +// dir=0.1*prevDir; +// (*v)->setCurvatureFredo(curvature); +// (*v)->setDirectionFredo(dir); + +// prevV=v; p0=p1; p1=p2; prevDir=dir; prevDir.normalize(); +// } +// (*v)->setCurvatureFredo((*prevV)->curvatureFredo()); +// (*v)->setDirectionFredo((*v)->point2d()-(*prevV)->point2d()); +// v0=vertices_begin(); v2=v0; ++v2; +// (*v0)->setCurvatureFredo((*v2)->curvatureFredo()); +// (*v0)->setDirectionFredo((*v2)->point2d()-(*v0)->point2d()); + +// //closed curve case one day... + +// // +// return; + +// //numerical degeneracy verification.. we'll see later +// const_vertex_iterator vLastReliable=vertices_begin(); + +// v=vertices_begin(); +// p=(*v)->point2d(); +// p0=Vec2d(p[0], p[1]); +// prevV=v; ++v; +// p=(*v)->point2d(); +// p1=Vec2d(p[0], p[1]); +// bool isReliable=false; +// if ((p1-p0).norm>EPS_CURVA) +// { +// vLastReliable=v; +// isReliable=true; +// } + +// for(;v!=vend;++v) +// { +// v2=v; ++v2; +// if (v2==vend) break; +// Vec3r p2=(*v2)->point2d(); + +// Vec2d BA=p0-p1; +// Vec2d BC=p2-p1; +// real lba=BA.norm(), lbc=BC.norm(); + +// if ((lba+lbc)setCurvatureFredo((*v)->curvatureFredo()); +// (*vfix)->setDirectionFredo((*v)->directionFredo()); +// } +// } +// isReliable=true; +// vLastReliable=v; +// } +// prevV=v; p0=p1; p1=p2; +// } + +} diff --git a/extern/freestyle/src/stroke/Curve.h b/extern/freestyle/src/stroke/Curve.h new file mode 100755 index 00000000000..400f27e5d5a --- /dev/null +++ b/extern/freestyle/src/stroke/Curve.h @@ -0,0 +1,463 @@ +// +// Filename : Curve.h +// Author(s) : Stephane Grabli +// Purpose : Class to define a container for curves +// Date of creation : 11/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CURVE_H +# define CURVE_H + +# include +# include "../system/BaseIterator.h" +# include "../geometry/Geom.h" +//# include "../scene_graph/Material.h" +# include "../view_map/Silhouette.h" +# include "../view_map/SilhouetteGeomEngine.h" +# include "../view_map/Interface0D.h" +# include "../view_map/Interface1D.h" + +using namespace std; +using namespace Geometry; + + /**********************************/ + /* */ + /* */ + /* CurvePoint */ + /* */ + /* */ + /**********************************/ + +/*! Class to represent a point of a curve. + * A CurvePoint can be any point of a 1D curve + * (it doesn't have to be a vertex of the curve). + * Any Interface1D is built upon ViewEdges, themselves + * built upon FEdges. Therefore, a curve is basically + * a polyline made of a list SVertex. + * Thus, a CurvePoint is built by lineraly interpolating + * two SVertex. + * CurvePoint can be used as virtual points while + * querying 0D information along a curve at a given resolution. + */ +class LIB_STROKE_EXPORT CurvePoint : public Interface0D +{ +public: // Implementation of Interface0D + /*! Returns the string "CurvePoint"*/ + virtual string getExactTypeName() const { + return "CurvePoint"; + } + + // Data access methods + /*! Returns the 3D X coordinate of the point */ + virtual real getX() const { + return _Point3d.x(); + } + /*! Returns the 3D Y coordinate of the point */ + virtual real getY() const { + return _Point3d.y(); + } + /*! Returns the 3D Z coordinate of the point */ + virtual real getZ() const { + return _Point3d.z(); + } + /*! Returns the 3D point. */ + virtual Vec3f getPoint3D() const { + return _Point3d; + } + /*! Returns the projected 3D X coordinate of the point */ + virtual real getProjectedX() const { + return _Point2d.x(); + } + /*! Returns the projected 3D Y coordinate of the point */ + virtual real getProjectedY() const { + return _Point2d.y(); + } + /*! Returns the projected 3D Z coordinate of the point */ + virtual real getProjectedZ() const { + return _Point2d.z(); + } + /*! Returns the 2D point. */ + virtual Vec2f getPoint2D() const { + return Vec2f((float)_Point2d.x(),(float)_Point2d.y()); + } + + virtual FEdge* getFEdge(Interface0D& inter); + /*! Returns the CurvePoint's Id */ + virtual Id getId() const { + Id id; + if(_t2d == 0) + return __A->getId(); + else if(_t2d == 1) + return __B->getId(); + return id; + } + /*! Returns the CurvePoint's Nature */ + virtual Nature::VertexNature getNature() const { + Nature::VertexNature nature = Nature::POINT; + if(_t2d == 0) + nature |= __A->getNature(); + else if(_t2d == 1) + nature |= __B->getNature(); + return nature; + } + + /*! Cast the Interface0D in SVertex if it can be. */ + virtual SVertex * castToSVertex(){ + if(_t2d == 0) + return __A; + else if(_t2d == 1) + return __B; + return Interface0D::castToSVertex(); + } + + /*! Cast the Interface0D in ViewVertex if it can be. */ + virtual ViewVertex * castToViewVertex(){ + if(_t2d == 0) + return __A->castToViewVertex(); + else if(_t2d == 1) + return __B->castToViewVertex(); + return Interface0D::castToViewVertex(); + } + + /*! Cast the Interface0D in NonTVertex if it can be. */ + virtual NonTVertex * castToNonTVertex(){ + if(_t2d == 0) + return __A->castToNonTVertex(); + else if(_t2d == 1) + return __B->castToNonTVertex(); + return Interface0D::castToNonTVertex(); + } + + /*! Cast the Interface0D in TVertex if it can be. */ + virtual TVertex * castToTVertex(){ + if(_t2d == 0) + return __A->castToTVertex(); + else if(_t2d == 1) + return __B->castToTVertex(); + return Interface0D::castToTVertex(); + } +public: + typedef SVertex vertex_type; +protected: + SVertex *__A; + SVertex *__B; + float _t2d; + //float _t3d; + Vec3r _Point2d; + Vec3r _Point3d; +public: + /*! Defult Constructor. */ + CurvePoint(); + /*! Builds a CurvePoint from two SVertex and an interpolation + * parameter. + * \param iA + * The first SVertex + * \param iB + * The second SVertex + * \param t2d + * A 2D interpolation parameter + * used to linearly interpolate \a iA and \a iB + */ + CurvePoint(SVertex *iA, SVertex *iB, float t2d) ; + /*! Builds a CurvePoint from two CurvePoint and an interpolation parameter. + * \param iA + * The first CurvePoint + * \param iB + * The second CurvePoint + * \param t2d + * The 2D interpolation parameter used + * to linearly interpolate \a iA and \a iB. + */ + CurvePoint(CurvePoint *iA, CurvePoint *iB, float t2d) ; + // CurvePoint(SVertex *iA, SVertex *iB, float t2d, float t3d) ; + /*! Copy Constructor. */ + CurvePoint(const CurvePoint& iBrother) ; + /*! Operator = */ + CurvePoint& operator=(const CurvePoint& iBrother) ; + /*! Destructor */ + virtual ~CurvePoint() {} + /*! Operator == */ + bool operator==(const CurvePoint& b){ + return ((__A==b.__A) && (__B==b.__B) && (_t2d==b._t2d)); + } + + /* accessors */ + /*! Returns the first SVertex upon which + * the CurvePoint is built. */ + inline SVertex * A() {return __A;} + /*! Returns the second SVertex upon which + * the CurvePoint is built. */ + inline SVertex * B() {return __B;} + /*! Returns the interpolation parameter. */ + inline float t2d() const {return _t2d;} + //inline const float t3d() const {return _t3d;} + + /* modifiers */ + /*! Sets the first SVertex upon which to build + * the CurvePoint. + */ + inline void SetA(SVertex *iA) {__A = iA;} + /*! Sets the second SVertex upon which to build + * the CurvePoint. + */ + inline void SetB(SVertex *iB) {__B = iB;} + /*! Sets the 2D interpolation parameter to use. + */ + inline void SetT2d(float t) {_t2d = t;} + //inline void SetT3d(float t) {_t3d = t;} + + /* Information access interface */ + + FEdge *fedge() ; + inline const Vec3r& point2d() const {return _Point2d;} + inline const Vec3r& point3d() const {return _Point3d;} + Vec3r normal() const ; + //Material material() const ; + // Id shape_id() const ; + const SShape * shape() const ; + // float shape_importance() const ; + + //const unsigned qi() const ; + occluder_container::const_iterator occluders_begin() const ; + occluder_container::const_iterator occluders_end() const ; + bool occluders_empty() const ; + int occluders_size() const ; + const Polygon3r& occludee() const ; + const SShape * occluded_shape() const ; + const bool occludee_empty() const ; + real z_discontinuity() const ; + // float local_average_depth() const ; + // float local_depth_variance() const ; + // real local_average_density(float sigma = 2.3f) const ; + // Vec3r shaded_color() const ; +// Vec3r orientation2d() const ; +// Vec3r orientation3d() const ; + // // real curvature2d() const {return viewedge()->curvature2d((_VertexA->point2d()+_VertexB->point2d())/2.0);} + // Vec3r curvature2d_as_vector() const ; + // /*! angle in radians */ + // real curvature2d_as_angle() const ; + + real curvatureFredo () const; + Vec2d directionFredo () const; +}; + + + /**********************************/ + /* */ + /* */ + /* Curve */ + /* */ + /* */ + /**********************************/ + +namespace CurveInternal { + class CurvePoint_const_traits; + class CurvePoint_nonconst_traits; + template class __point_iterator; + class CurvePointIterator; +} // end of namespace CurveInternal + +/*! Base class for curves made of CurvePoints. + * SVertex is the type of the initial curve vertices. + * A Chain is a specialization of a Curve. + */ +class LIB_STROKE_EXPORT Curve : public Interface1D +{ +public: + typedef CurvePoint Vertex; + typedef CurvePoint Point; + typedef Point point_type; + typedef Vertex vertex_type; + typedef deque vertex_container; + + /* Iterator to iterate over a vertex edges */ + + typedef CurveInternal::__point_iterator point_iterator; + typedef CurveInternal::__point_iterator const_point_iterator; + typedef point_iterator vertex_iterator ; + typedef const_point_iterator const_vertex_iterator ; + +protected: + vertex_container _Vertices; + double _Length; + Id _Id; + unsigned _nSegments; // number of segments + +public: + /*! Default Constructor. */ + Curve() {_Length = 0;_Id = 0;_nSegments=0;} + /*! Builds a Curve from its id */ + Curve(const Id& id) {_Length = 0;_Id = id;_nSegments=0;} + /*! Copy Constructor. */ + Curve(const Curve& iBrother) {_Length = iBrother._Length;_Vertices = iBrother._Vertices;_Id=iBrother._Id;_nSegments=0;} + /*! Destructor. */ + virtual ~Curve() ; + + /* + fredo's curvature storage + */ + void computeCurvatureAndOrientation (); + + /*! Adds a single vertex (CurvePoint) at the end of the Curve */ + inline void push_vertex_back(Vertex *iVertex) + { + if(!_Vertices.empty()) + { + Vec3r vec_tmp(iVertex->point2d() - _Vertices.back()->point2d()); + _Length += vec_tmp.norm(); + ++_nSegments; + } + Vertex * new_vertex = new Vertex(*iVertex); + _Vertices.push_back(new_vertex); + } + /*! Adds a single vertex (SVertex) at the end of the Curve */ + inline void push_vertex_back(SVertex *iVertex) + { + if(!_Vertices.empty()) + { + Vec3r vec_tmp(iVertex->point2d() - _Vertices.back()->point2d()); + _Length += vec_tmp.norm(); + ++_nSegments; + } + Vertex *new_vertex = new Vertex(iVertex, 0,0); + _Vertices.push_back(new_vertex); + } + /*! Adds a single vertex (CurvePoint) at the front of the Curve */ + inline void push_vertex_front(Vertex *iVertex) + { + if(!_Vertices.empty()) + { + Vec3r vec_tmp(iVertex->point2d() - _Vertices.front()->point2d()); + _Length += vec_tmp.norm(); + ++_nSegments; + } + Vertex * new_vertex = new Vertex(*iVertex); + _Vertices.push_front(new_vertex); + } + /*! Adds a single vertex (SVertex) at the front of the Curve */ + inline void push_vertex_front(SVertex *iVertex) + { + if(!_Vertices.empty()) + { + Vec3r vec_tmp(iVertex->point2d() - _Vertices.front()->point2d()); + _Length += vec_tmp.norm(); + ++_nSegments; + } + Vertex *new_vertex = new Vertex(iVertex, 0,0); + _Vertices.push_front(new_vertex); + } + /*! Returns true is the Curve doesn't have any Vertex yet. */ + inline bool empty() const {return _Vertices.empty();} + /*! Returns the 2D length of the Curve.*/ + inline real getLength2D() const {return _Length;} + /*! Returns the Id of the 1D element .*/ + virtual Id getId() const { + return _Id; + } + /*! Returns the number of segments in the + * oplyline constituing the Curve. + */ + inline unsigned int nSegments() const {return _nSegments;} + + inline void setId(const Id& id){_Id = id;} + /* Information access interface */ + + + //inline Vec3r shaded_color(int iCombination = 0) const ; + // inline Vec3r orientation2d(point_iterator it) const ; + //Vec3r orientation2d(int iCombination = 0) const ; + // Vec3r orientation3d(point_iterator it) const ; + //Vec3r orientation3d(int iCombination = 0) const ; + // real curvature2d(point_iterator it) const {return (*it)->curvature2d();} + // real curvature2d(int iCombination = 0) const ; + //Material material() const ; + //int qi() const ; + // occluder_container::const_iterator occluders_begin() const ; + // occluder_container::const_iterator occluders_end() const ; + //int occluders_size() const; + //bool occluders_empty() const ; + // const Polygon3r& occludee() const {return *(_FEdgeA->aFace());} + //const SShape * occluded_shape() const; + //const bool occludee_empty() const ; + //real z_discontinuity(int iCombination = 0) const ; + // int shape_id() const ; + //const SShape * shape() const ; + //float shape_importance(int iCombination=0) const ; + //float local_average_depth(int iCombination = 0) const; + //float local_depth_variance(int iCombination = 0) const ; + //real local_average_density(float sigma = 2.3f, int iCombination = 0) const ; + //Vec3r curvature2d_as_vector(int iCombination=0) const ; + /*! angle in radians */ + //real curvature2d_as_angle(int iCombination=0) const ; + + /* advanced iterators access */ + point_iterator points_begin(float step = 0); + const_point_iterator points_begin(float step = 0) const; + point_iterator points_end(float step = 0); + const_point_iterator points_end(float step = 0) const; + + // methods given for convenience */ + point_iterator vertices_begin(); + const_point_iterator vertices_begin() const; + point_iterator vertices_end(); + const_point_iterator vertices_end() const; + + // specialized iterators access + CurveInternal::CurvePointIterator curvePointsBegin(float t=0.f); + CurveInternal::CurvePointIterator curvePointsEnd(float t=0.f); + + CurveInternal::CurvePointIterator curveVerticesBegin(); + CurveInternal::CurvePointIterator curveVerticesEnd(); + + // Iterators access + /*! Returns an Interface0DIterator pointing onto + * the first vertex of the Curve and that can iterate + * over the \a vertices of the Curve. + */ + virtual Interface0DIterator verticesBegin(); + /*! Returns an Interface0DIterator pointing after + * the last vertex of the Curve and that can iterate + * over the \a vertices of the Curve. + */ + virtual Interface0DIterator verticesEnd(); + /*! Returns an Interface0DIterator pointing onto + * the first point of the Curve and that can iterate + * over the \a points of the Curve at any resolution. + * At each iteration a virtual temporary CurvePoint + * is created. + */ + virtual Interface0DIterator pointsBegin(float t=0.f); + /*! Returns an Interface0DIterator pointing after + * the last point of the Curve and that can iterate + * over the \a points of the Curve at any resolution. + * At each iteration a virtual temporary CurvePoint + * is created. + */ + virtual Interface0DIterator pointsEnd(float t=0.f); +}; + + + +#endif diff --git a/extern/freestyle/src/stroke/CurveAdvancedIterators.h b/extern/freestyle/src/stroke/CurveAdvancedIterators.h new file mode 100755 index 00000000000..dfc9f2719f8 --- /dev/null +++ b/extern/freestyle/src/stroke/CurveAdvancedIterators.h @@ -0,0 +1,378 @@ +// +// Filename : CurveAdvancedIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the elements of the Curve +// Can't be used in python +// Date of creation : 01/08/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ADVANCEDCURVEITERATORS_H +# define ADVANCEDCURVEITERATORS_H + +# include "Stroke.h" + +namespace CurveInternal { + + class CurvePoint_const_traits : public Const_traits { + public: + typedef deque vertex_container; + typedef vertex_container::const_iterator vertex_container_iterator; + typedef SVertex vertex_type; + }; + + class CurvePoint_nonconst_traits : public Nonconst_traits { + public: + typedef deque vertex_container; + typedef vertex_container::iterator vertex_container_iterator ; + typedef SVertex vertex_type; + }; + + /**********************************/ + /* */ + /* */ + /* CurvePoint Iterator */ + /* */ + /* */ + /**********************************/ + + + /*! iterator on a curve. Allows an iterating outside + * initial vertices. A CurvePoint is instanciated an returned + * when the iterator is dereferenced. + */ + + template + class __point_iterator : public IteratorBase + { + public: + typedef __point_iterator Self; + typedef typename Traits::vertex_container_iterator vertex_container_iterator; + typedef typename Traits::vertex_type vertex_type; + typedef CurvePoint Point; + typedef Point point_type; + + typedef __point_iterator iterator; + typedef __point_iterator const_iterator; + + // public: + // typedef Vertex vertex_type ; + // typedef vertex_container_iterator vertex_iterator_type; + // typedef CurvePoint Point; + // typedef Point point_type; + typedef IteratorBase parent_class; + //# if defined(__GNUC__) && (__GNUC__ < 3) + // typedef bidirectional_iterator,ptrdiff_t> bidirectional_point_iterator; + //# else + // typedef iterator,ptrdiff_t> bidirectional_point_iterator; + //# endif + friend class Curve; + //friend class Curve::vertex_iterator; + //friend class __point_iterator; + //friend class iterator; + //protected: + public: + float _CurvilinearLength; + float _step; + vertex_container_iterator __A; + vertex_container_iterator __B; + vertex_container_iterator _begin; + vertex_container_iterator _end; + int _n; + int _currentn; + float _t; + mutable Point *_Point; + + public: + + public: + inline __point_iterator(float step = 0.f) + : parent_class() + { + _step = step; + _CurvilinearLength = 0.f; + _t = 0.f; + _Point = 0; + _n = 0; + _currentn = 0; + } + + inline __point_iterator(const iterator& iBrother) + : parent_class() + { + __A = iBrother.__A; + __B = iBrother.__B; + _begin = iBrother._begin; + _end = iBrother._end; + _CurvilinearLength = iBrother._CurvilinearLength; + _step = iBrother._step; + _t = iBrother._t; + if(iBrother._Point == 0) + _Point = 0; + else + _Point = new Point(*(iBrother._Point)); + _n = iBrother._n; + _currentn = iBrother._currentn; + } + inline __point_iterator(const const_iterator& iBrother) + : parent_class() + { + __A = iBrother.__A; + __B = iBrother.__B; + _begin = iBrother._begin; + _end = iBrother._end; + _CurvilinearLength = iBrother._CurvilinearLength; + _step = iBrother._step; + _t = iBrother._t; + if(iBrother._Point == 0) + _Point = 0; + else + _Point = new Point(*(iBrother._Point)); + _n = iBrother._n; + _currentn = iBrother._currentn; + } + inline Self& operator=(const Self& iBrother) + { + //((bidirectional_point_iterator*)this)->operator=(iBrother); + __A = iBrother.__A; + __B = iBrother.__B; + _begin = iBrother._begin; + _end = iBrother._end; + _CurvilinearLength = iBrother._CurvilinearLength; + _step = iBrother._step; + _t = iBrother._t; + if(iBrother._Point == 0) + _Point = 0; + else + _Point = new Point(*(iBrother._Point)); + _n = iBrother._n; + _currentn = iBrother._currentn; + return *this; + } + virtual ~__point_iterator() + { + if(_Point != 0) + delete _Point; + } + //protected://FIXME + public: + inline __point_iterator(vertex_container_iterator iA, + vertex_container_iterator iB, + vertex_container_iterator ibegin, + vertex_container_iterator iend, + int currentn, + int n, + float step, float t=0.f, float iCurvilinearLength = 0.f) + : parent_class() + { + __A = iA; + __B = iB; + _begin = ibegin; + _end = iend; + _CurvilinearLength = iCurvilinearLength; + _step = step; + _t = t; + _Point = 0; + _n = n; + _currentn = currentn; + } + + public: + + // operators + inline Self& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + inline Self operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + inline Self& operator--() // operator corresponding to ++i + { + decrement(); + return *this; + } + inline Self operator--(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + decrement(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + return ((__A!=b.__A) || (__B!=b.__B) || (_t != b._t)); + } + virtual bool operator==(const Self& b) const + { + return !(*this != b); + } + + // dereferencing + virtual typename Traits::reference operator*() const + { + if(_Point != 0) + { + delete _Point; + _Point = 0; + } + if((_currentn < 0) || (_currentn >= _n)) + return _Point; // 0 in this case + return (_Point = new Point(*__A,*__B,_t)); + } + virtual typename Traits::pointer operator->() const { return &(operator*());} + + public: + virtual bool begin() const + { + if((__A == _begin) && (_t < (float)M_EPSILON)) + return true; + return false; + } + virtual bool end() const + { + if((__B == _end)) + return true; + return false; + } + protected: + virtual void increment() + { + if(_Point != 0) + { + delete _Point; + _Point = 0; + } + if((_currentn == _n-1) && (_t == 1.f)) + { + // we're setting the iterator to end + ++__A; + ++__B; + ++_currentn; + _t = 0.f; + return; + } + + if(0 == _step) // means we iterate over initial vertices + { + Vec3r vec_tmp((*__B)->point2d() - (*__A)->point2d()); + _CurvilinearLength += vec_tmp.norm(); + if(_currentn == _n-1) + { + _t = 1.f; + return; + } + ++__B; + ++__A; + ++_currentn; + return; + } + + // compute the new position: + Vec3r vec_tmp2((*__A)->point2d() - (*__B)->point2d()); + float normAB = vec_tmp2.norm(); + + if(normAB > M_EPSILON) + { + _CurvilinearLength += _step; + _t = _t + _step/normAB; + } + else + _t = 1.f; // AB is a null segment, we're directly at its end + //if normAB ~= 0, we don't change these values + if(_t >= 1) + { + _CurvilinearLength -= normAB*(_t-1); + if(_currentn == _n-1) + _t=1.f; + else + { + _t = 0.f; + ++_currentn; + ++__A;++__B; + } + } + } + virtual void decrement() + { + if(_Point != 0) + { + delete _Point; + _Point = 0; + } + + if(_t == 0.f) //we're at the beginning of the edge + { + _t = 1.f; + --_currentn; + --__A; --__B; + if(_currentn == _n-1) + return; + } + + if(0 == _step) // means we iterate over initial vertices + { + Vec3r vec_tmp((*__B)->point2d() - (*__A)->point2d()); + _CurvilinearLength -= vec_tmp.norm(); + _t = 0; + return; + } + + // compute the new position: + Vec3r vec_tmp2((*__A)->point2d() - (*__B)->point2d()); + float normAB = vec_tmp2.norm(); + + if(normAB >M_EPSILON) + { + _CurvilinearLength -= _step; + _t = _t - _step/normAB; + } + else + _t = -1.f; // We just need a negative value here + + // round value + if(fabs(_t) < (float)M_EPSILON) + _t = 0.0; + if(_t < 0) + { + if(_currentn == 0) + _CurvilinearLength = 0.f; + else + _CurvilinearLength += normAB*(-_t); + _t = 0.f; + } + } + }; + + + +} // end of namespace StrokeInternal + + +#endif // ADVANCEDCURVEITERATORS_H diff --git a/extern/freestyle/src/stroke/CurveIterators.h b/extern/freestyle/src/stroke/CurveIterators.h new file mode 100755 index 00000000000..92f8bf065f4 --- /dev/null +++ b/extern/freestyle/src/stroke/CurveIterators.h @@ -0,0 +1,295 @@ +// +// Filename : CurveIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the elements of the Curve +// Date of creation : 01/08/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CURVEITERATORS_H +# define CURVEITERATORS_H + +#include "Stroke.h" +#include "Curve.h" + +namespace CurveInternal { + + /*! iterator on a curve. Allows an iterating outside + * initial vertices. A CurvePoint is instanciated an returned + * when the iterator is dereferenced. + */ + + class CurvePointIterator : public Interface0DIteratorNested + { + public: + friend class ::Curve; + public: + float _CurvilinearLength; + float _step; + ::Curve::vertex_container::iterator __A; + ::Curve::vertex_container::iterator __B; + ::Curve::vertex_container::iterator _begin; + ::Curve::vertex_container::iterator _end; + int _n; + int _currentn; + float _t; + mutable CurvePoint _Point; + float _CurveLength; + + public: + + public: + inline CurvePointIterator(float step = 0.f) + : Interface0DIteratorNested() + { + _step = step; + _CurvilinearLength = 0.f; + _t = 0.f; + //_Point = 0; + _n = 0; + _currentn = 0; + _CurveLength=0; + } + + inline CurvePointIterator(const CurvePointIterator& iBrother) + : Interface0DIteratorNested() + { + __A = iBrother.__A; + __B = iBrother.__B; + _begin = iBrother._begin; + _end = iBrother._end; + _CurvilinearLength = iBrother._CurvilinearLength; + _step = iBrother._step; + _t = iBrother._t; + _Point = iBrother._Point; + _n = iBrother._n; + _currentn = iBrother._currentn; + _CurveLength = iBrother._CurveLength; + } + inline CurvePointIterator& operator=(const CurvePointIterator& iBrother) + { + __A = iBrother.__A; + __B = iBrother.__B; + _begin = iBrother._begin; + _end = iBrother._end; + _CurvilinearLength = iBrother._CurvilinearLength; + _step = iBrother._step; + _t = iBrother._t; + _Point = iBrother._Point; + _n = iBrother._n; + _currentn = iBrother._currentn; + _CurveLength = iBrother._CurveLength; + return *this; + } + virtual ~CurvePointIterator() + { + } + protected: + inline CurvePointIterator(::Curve::vertex_container::iterator iA, + ::Curve::vertex_container::iterator iB, + ::Curve::vertex_container::iterator ibegin, + ::Curve::vertex_container::iterator iend, + int currentn, + int n, + float iCurveLength, + float step, float t=0.f, float iCurvilinearLength = 0.f) + : Interface0DIteratorNested() + { + __A = iA; + __B = iB; + _begin = ibegin; + _end = iend; + _CurvilinearLength = iCurvilinearLength; + _step = step; + _t = t; + _n = n; + _currentn = currentn; + _CurveLength = iCurveLength; + } + + public: + + virtual CurvePointIterator* copy() const { + return new CurvePointIterator(*this); + } + + inline Interface0DIterator CastToInterface0DIterator() const{ + Interface0DIterator ret(new CurveInternal::CurvePointIterator(*this)); + return ret; + } + virtual string getExactTypeName() const { + return "CurvePointIterator"; + } + + // operators + inline CurvePointIterator& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + + inline CurvePointIterator& operator--() // operator corresponding to ++i + { + decrement(); + return *this; + } + + // comparibility + virtual bool operator==(const Interface0DIteratorNested& b) const + { + const CurvePointIterator* it_exact = dynamic_cast(&b); + if (!it_exact) + return false; + return ((__A==it_exact->__A) && (__B==it_exact->__B) && (_t == it_exact->_t)); + } + + // dereferencing + virtual CurvePoint& operator*() + { + return (_Point = CurvePoint(*__A,*__B,_t)); + } + virtual CurvePoint* operator->() { return &(operator*());} + public: + virtual bool isBegin() const + { + if((__A == _begin) && (_t < (float)M_EPSILON)) + return true; + return false; + } + virtual bool isEnd() const + { + if(__B == _end) + return true; + return false; + } + protected: + virtual void increment() + { + if((_currentn == _n-1) && (_t == 1.f)) + { + // we're setting the iterator to end + ++__A; + ++__B; + ++_currentn; + _t = 0.f; + return; + } + + if(0 == _step) // means we iterate over initial vertices + { + Vec3r vec_tmp((*__B)->point2d() - (*__A)->point2d()); + _CurvilinearLength += (float)vec_tmp.norm(); + if(_currentn == _n-1) + { + _t = 1.f; + return; + } + ++__B; + ++__A; + ++_currentn; + return; + } + + // compute the new position: + Vec3r vec_tmp2((*__A)->point2d() - (*__B)->point2d()); + float normAB = (float)vec_tmp2.norm(); + + if(normAB > M_EPSILON) + { + _CurvilinearLength += _step; + _t = _t + _step/normAB; + } + else + _t = 1.f; // AB is a null segment, we're directly at its end + //if normAB ~= 0, we don't change these values + if(_t >= 1) + { + _CurvilinearLength -= normAB*(_t-1); + if(_currentn == _n-1) + _t=1.f; + else + { + _t = 0.f; + ++_currentn; + ++__A;++__B; + } + } + } + virtual void decrement() + { + if(_t == 0.f) //we're at the beginning of the edge + { + _t = 1.f; + --_currentn; + --__A; --__B; + if(_currentn == _n-1) + return; + } + + if(0 == _step) // means we iterate over initial vertices + { + Vec3r vec_tmp((*__B)->point2d() - (*__A)->point2d()); + _CurvilinearLength -= (float)vec_tmp.norm(); + _t = 0; + return; + } + + // compute the new position: + Vec3r vec_tmp2((*__A)->point2d() - (*__B)->point2d()); + float normAB = (float)vec_tmp2.norm(); + + if(normAB >M_EPSILON) + { + _CurvilinearLength -= _step; + _t = _t - _step/normAB; + } + else + _t = -1.f; // We just need a negative value here + + // round value + if(fabs(_t) < (float)M_EPSILON) + _t = 0.0; + if(_t < 0) + { + if(_currentn == 0) + _CurvilinearLength = 0.f; + else + _CurvilinearLength += normAB*(-_t); + _t = 0.f; + } + } + + virtual float t() const{ + return _CurvilinearLength; + } + virtual float u() const{ + return _CurvilinearLength/_CurveLength; + } + }; + + + +} // end of namespace StrokeInternal + +#endif // CURVEITERATORS_H diff --git a/extern/freestyle/src/stroke/Modifiers.h b/extern/freestyle/src/stroke/Modifiers.h new file mode 100755 index 00000000000..c3be65ffc89 --- /dev/null +++ b/extern/freestyle/src/stroke/Modifiers.h @@ -0,0 +1,71 @@ +// +// Filename : Modifiers.h +// Author : Stephane Grabli +// Purpose : modifiers... +// Date of creation : 05/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MODIFIERS_H +# define MODIFIERS_H + +# include "TimeStamp.h" + +/* ----------------------------------------- * + * * + * modifiers * + * * + * ----------------------------------------- */ +/*! Base class for modifiers. + * Modifiers are used in the + * Operators in order to "mark" + * the processed Interface1D. + */ +template +struct EdgeModifier : public unary_function +{ + /*! Default construction */ + EdgeModifier() : unary_function() {} + /*! the () operator */ + virtual void operator()(Edge& iEdge) {} +}; + +/*! Modifier that sets the time stamp + * of an Interface1D to the time stamp + * of the system. + */ +template +struct TimestampModifier : public EdgeModifier +{ + /*! Default constructor */ + TimestampModifier() : EdgeModifier() {} + /*! The () operator. */ + virtual void operator()(Edge& iEdge) + { + TimeStamp *timestamp = TimeStamp::instance(); + iEdge.SetTimeStamp(timestamp->getTimeStamp()); + } +}; + +#endif // MODIFIERS_H diff --git a/extern/freestyle/src/stroke/Module.h b/extern/freestyle/src/stroke/Module.h new file mode 100755 index 00000000000..591bb157392 --- /dev/null +++ b/extern/freestyle/src/stroke/Module.h @@ -0,0 +1,72 @@ +// +// Filename : Module.h +// Author(s) : Emmanuel Turquin +// Purpose : Set the type of the module +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MODULE_H +# define MODULE_H + +# include "Canvas.h" +# include "StyleModule.h" + +class Module +{ +public: + + static void setAlwaysRefresh(bool b = true) { + getCurrentStyleModule()->setAlwaysRefresh(b); + } + + static void setCausal(bool b = true) { + getCurrentStyleModule()->setCausal(b); + } + + static void setDrawable(bool b = true) { + getCurrentStyleModule()->setDrawable(b); + } + + static bool getAlwaysRefresh() { + return getCurrentStyleModule()->getAlwaysRefresh(); + } + + static bool getCausal() { + return getCurrentStyleModule()->getCausal(); + } + + static bool getDrawable() { + return getCurrentStyleModule()->getDrawable(); + } + +private: + + static StyleModule* getCurrentStyleModule() { + Canvas* canvas = Canvas::getInstance(); + return canvas->getCurrentStyleModule(); + } +}; + +#endif // MODULE_H diff --git a/extern/freestyle/src/stroke/Operators.cpp b/extern/freestyle/src/stroke/Operators.cpp new file mode 100755 index 00000000000..121dee3ba26 --- /dev/null +++ b/extern/freestyle/src/stroke/Operators.cpp @@ -0,0 +1,862 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "Operators.h" +#include "Canvas.h" +#include "Stroke.h" + +LIB_STROKE_EXPORT Operators::I1DContainer Operators::_current_view_edges_set; +LIB_STROKE_EXPORT Operators::I1DContainer Operators::_current_chains_set; +LIB_STROKE_EXPORT Operators::I1DContainer* Operators::_current_set = NULL; +LIB_STROKE_EXPORT Operators::StrokesContainer Operators::_current_strokes_set; + +void Operators::select(UnaryPredicate1D& pred) { + if (!_current_set) + return; + if(_current_set->empty()) + return; + I1DContainer new_set; + I1DContainer rejected; + Functions1D::ChainingTimeStampF1D cts; + Functions1D::TimeStampF1D ts; + I1DContainer::iterator it = _current_set->begin(); + I1DContainer::iterator itbegin = it; + while (it != _current_set->end()) { + Interface1D * i1d = *it; + cts(*i1d); // mark everyone's chaining time stamp anyway + if (pred(*i1d)){ + new_set.push_back(i1d); + ts(*i1d); + }else{ + rejected.push_back(i1d); + } + ++it; + } + if((*itbegin)->getExactTypeName() != "ViewEdge"){ + for (it = rejected.begin(); + it != rejected.end(); + ++it) + delete *it; + } + rejected.clear(); + _current_set->clear(); + *_current_set = new_set; +} + + +void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, + UnaryPredicate1D& pred, + UnaryFunction1D& modifier) { + if (_current_view_edges_set.empty()) + return; + + unsigned id = 0; + ViewEdge* edge; + Chain* new_chain; + + for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); + it_edge != _current_view_edges_set.end(); + ++it_edge) { + if (pred(**it_edge)) + continue; + + edge = dynamic_cast(*it_edge); + it.setBegin(edge); + it.setCurrentEdge(edge); + + Chain* new_chain = new Chain(id);++id; + do { + new_chain->push_viewedge_back(*it, it.getOrientation()); + modifier(**it); + ++it; + } while (!it.isEnd() && !pred(**it)); + + _current_chains_set.push_back(new_chain); + } + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + + +void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, + UnaryPredicate1D& pred) { + if (_current_view_edges_set.empty()) + return; + + unsigned id = 0; + Functions1D::IncrementChainingTimeStampF1D ts; + Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); + + ViewEdge* edge; + Chain* new_chain; + + for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); + it_edge != _current_view_edges_set.end(); + ++it_edge) { + if (pred(**it_edge) || pred_ts(**it_edge)) + continue; + + edge = dynamic_cast(*it_edge); + it.setBegin(edge); + it.setCurrentEdge(edge); + + Chain* new_chain = new Chain(id);++id; + do { + new_chain->push_viewedge_back(*it, it.getOrientation()); + ts(**it); + ++it; + } while (!it.isEnd() && !pred(**it) && !pred_ts(**it)); + + _current_chains_set.push_back(new_chain); + } + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + + +//void Operators::bidirectionalChain(ViewEdgeIterator& it, +// UnaryPredicate1D& pred, +// UnaryFunction1D& modifier) { +// if (_current_view_edges_set.empty()) +// return; +// +// unsigned id = 0; +// ViewEdge* edge; +// Chain* new_chain; +// +// for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); +// it_edge != _current_view_edges_set.end(); +// ++it_edge) { +// if (pred(**it_edge)) +// continue; +// +// edge = dynamic_cast(*it_edge); +// it.setBegin(edge); +// it.setCurrentEdge(edge); +// +// Chain* new_chain = new Chain(id);++id; +// //ViewEdgeIterator it_back(it);--it_back; // FIXME +// do { +// new_chain->push_viewedge_back(*it, it.getOrientation()); +// modifier(**it); +// ++it; +// } while (!it.isEnd() && !pred(**it)); +// it.setBegin(edge); +// it.setCurrentEdge(edge); +// --it; +// while (!it.isEnd() && !pred(**it)) { +// new_chain->push_viewedge_front(*it, it.getOrientation()); +// modifier(**it); +// --it; +// } +// +// _current_chains_set.push_back(new_chain); +// } +// +// if (!_current_chains_set.empty()) +// _current_set = &_current_chains_set; +//} +// +//void Operators::bidirectionalChain(ViewEdgeIterator& it, +// UnaryPredicate1D& pred) { +// if (_current_view_edges_set.empty()) +// return; +// +// unsigned id = 0; +// Functions1D::IncrementChainingTimeStampF1D ts; +// Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); +// +// ViewEdge* edge; +// Chain* new_chain; +// +// for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); +// it_edge != _current_view_edges_set.end(); +// ++it_edge) { +// if (pred(**it_edge) || pred_ts(**it_edge)) +// continue; +// +// edge = dynamic_cast(*it_edge); +// it.setBegin(edge); +// it.setCurrentEdge(edge); + // + // Chain* new_chain = new Chain(id);++id; + // //ViewEdgeIterator it_back(it);--it_back;//FIXME + // do { + // new_chain->push_viewedge_back(*it, it.getOrientation()); + // ts(**it); + // ++it; + // } while (!it.isEnd() && !pred(**it) && !pred_ts(**it)); + // it.setBegin(edge); + // it.setCurrentEdge(edge); + // --it; + // while (!it.isEnd() && !pred(**it) && !pred_ts(**it)) { + // new_chain->push_viewedge_front(*it, it.getOrientation()); + // ts(**it); + // --it; + // } + // + // _current_chains_set.push_back(new_chain); + // } + // + // if (!_current_chains_set.empty()) + // _current_set = &_current_chains_set; + //} + +void Operators::bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred) { + if (_current_view_edges_set.empty()) + return; + + unsigned id = 0; + Functions1D::IncrementChainingTimeStampF1D ts; + Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); + + ViewEdge* edge; + Chain* new_chain; + + for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); + it_edge != _current_view_edges_set.end(); + ++it_edge) { + if (pred(**it_edge) || pred_ts(**it_edge)) + continue; + + edge = dynamic_cast(*it_edge); + // re-init iterator + it.setBegin(edge); + it.setCurrentEdge(edge); + it.setOrientation(true); + it.init(); + + Chain* new_chain = new Chain(id);++id; + //ViewEdgeIterator it_back(it);--it_back;//FIXME + do { + new_chain->push_viewedge_back(*it, it.getOrientation()); + ts(**it); + it.increment(); // FIXME + } while (!it.isEnd() && !pred(**it)); + it.setBegin(edge); + it.setCurrentEdge(edge); + it.setOrientation(true); + it.decrement(); // FIXME + while (!it.isEnd() && !pred(**it)) { + new_chain->push_viewedge_front(*it, it.getOrientation()); + ts(**it); + it.decrement();// FIXME + } + _current_chains_set.push_back(new_chain); + } + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + +void Operators::bidirectionalChain(ChainingIterator& it) { + if (_current_view_edges_set.empty()) + return; + + unsigned id = 0; + Functions1D::IncrementChainingTimeStampF1D ts; + Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); + + ViewEdge* edge; + Chain* new_chain; + + for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); + it_edge != _current_view_edges_set.end(); + ++it_edge) { + if (pred_ts(**it_edge)) + continue; + + edge = dynamic_cast(*it_edge); + // re-init iterator + it.setBegin(edge); + it.setCurrentEdge(edge); + it.setOrientation(true); + it.init(); + + Chain* new_chain = new Chain(id);++id; + //ViewEdgeIterator it_back(it);--it_back;//FIXME + do { + new_chain->push_viewedge_back(*it, it.getOrientation()); + ts(**it); + it.increment(); // FIXME + } while (!it.isEnd()); + it.setBegin(edge); + it.setCurrentEdge(edge); + it.setOrientation(true); + it.decrement(); // FIXME + while (!it.isEnd()) { + new_chain->push_viewedge_front(*it, it.getOrientation()); + ts(**it); + it.decrement();// FIXME + } + _current_chains_set.push_back(new_chain); + } + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + +void Operators::sequentialSplit(UnaryPredicate0D& pred, + float sampling) +{ + if (_current_chains_set.empty()) { + cerr << "Warning: current set empty" << endl; + return; + } + CurvePoint *point; + Chain * new_curve; + I1DContainer splitted_chains; + Interface0DIterator first; + Interface0DIterator end; + Interface0DIterator last; + Interface0DIterator it; + I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end(); + for (; + cit != citend; + ++cit) { + + Id currentId = (*cit)->getId(); + new_curve = new Chain(currentId); + first = (*cit)->pointsBegin(sampling); + end = (*cit)->pointsEnd(sampling); + last = end;--last; + it = first; + + point = dynamic_cast(&(*it)); + new_curve->push_vertex_back(point);++it; + for(; it!= end; ++it) + { + point = dynamic_cast(&(*it)); + new_curve->push_vertex_back(point); + if((pred(it)) && (it!=last)) + { + splitted_chains.push_back(new_curve); + currentId.setSecond(currentId.getSecond()+1); + new_curve = new Chain(currentId); + new_curve->push_vertex_back(point); + } + } + if(new_curve->nSegments() == 0){ + delete new_curve; + return; + } + + splitted_chains.push_back(new_curve); + } + + // Update the current set of chains: + cit = _current_chains_set.begin(); + for(; + cit != citend; + ++cit){ + delete (*cit); + } + _current_chains_set.clear(); + _current_chains_set = splitted_chains; + splitted_chains.clear(); + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + +void Operators::sequentialSplit(UnaryPredicate0D& startingPred, UnaryPredicate0D& stoppingPred, + float sampling) +{ + if (_current_chains_set.empty()) { + cerr << "Warning: current set empty" << endl; + return; + } + CurvePoint *point; + Chain * new_curve; + I1DContainer splitted_chains; + Interface0DIterator first; + Interface0DIterator end; + Interface0DIterator last; + Interface0DIterator itStart; + Interface0DIterator itStop; + I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end(); + for (; + cit != citend; + ++cit) { + Id currentId = (*cit)->getId(); + first = (*cit)->pointsBegin(sampling); + end = (*cit)->pointsEnd(sampling); + last = end;--last; + itStart = first; + do{ + itStop = itStart;++itStop; + + new_curve = new Chain(currentId); + currentId.setSecond(currentId.getSecond()+1); + + point = dynamic_cast(&(*itStart)); + new_curve->push_vertex_back(point); + do{ + point = dynamic_cast(&(*itStop)); + new_curve->push_vertex_back(point); + ++itStop; + }while((itStop!=end) && (!stoppingPred(itStop))); + if(itStop!=end){ + point = dynamic_cast(&(*itStop)); + new_curve->push_vertex_back(point); + } + if(new_curve->nSegments() == 0){ + delete new_curve; + }else{ + splitted_chains.push_back(new_curve); + } + // find next start + do{ + ++itStart; + }while((itStart!=end) && (!startingPred(itStart))); + }while((itStart!=end) && (itStart!=last)); + } + + // Update the current set of chains: + cit = _current_chains_set.begin(); + for(; + cit != citend; + ++cit){ + delete (*cit); + } + _current_chains_set.clear(); + _current_chains_set = splitted_chains; + splitted_chains.clear(); + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + +#include "CurveIterators.h" + +// Internal function +void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredicate1D& pred, float sampling, + Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) +{ + if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){ + newChains.push_back(_curve); + return; + } + + CurveInternal::CurvePointIterator first = _curve->curvePointsBegin(sampling); + CurveInternal::CurvePointIterator second = first; ++second; + CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); + CurveInternal::CurvePointIterator it = second; + CurveInternal::CurvePointIterator split = second; + Interface0DIterator it0d = it.CastToInterface0DIterator(); + real _min = FLT_MAX;++it;//func(it0d);++it; + CurveInternal::CurvePointIterator next = it;++next; + real tmp; + + bool bsplit = false; + for(; ((it != end) && (next != end)); ++it,++next){ + it0d = it.CastToInterface0DIterator(); + tmp = func(it0d); + if(tmp < _min){ + _min = tmp; + split = it; + bsplit = true; + } + } + + if(!bsplit){ // we didn't find any minimum + newChains.push_back(_curve); + return; + } + + // retrieves the current splitting id + Id * newId = _curve->getSplittingId(); + if(newId == 0){ + newId = new Id(_curve->getId()); + _curve->setSplittingId(newId); + } + + Chain *new_curve_a = new Chain(*newId); + newId->setSecond(newId->getSecond()+1); + new_curve_a->setSplittingId(newId); + Chain *new_curve_b = new Chain(*newId); + newId->setSecond(newId->getSecond()+1); + new_curve_b->setSplittingId(newId); + + CurveInternal::CurvePointIterator vit = _curve->curveVerticesBegin(), vitend=_curve->curveVerticesEnd(); + CurveInternal::CurvePointIterator vnext = vit; ++vnext; + + + for(; (vit!=vitend)&&(vnext!=vitend)&&(split._CurvilinearLength-vit._CurvilinearLength> 0.001); ++vit,++vnext){ + new_curve_a->push_vertex_back(&(*vit)); + } + if((vit==vitend) || (vnext == vitend)){ + cout << "The split takes place in bad location" << endl; + newChains.push_back(_curve); + delete new_curve_a; + delete new_curve_b; + return; + } + + // build the two resulting chains + if(fabs(vit._CurvilinearLength-split._CurvilinearLength) > 0.001){ + new_curve_a->push_vertex_back(&(*split)); + new_curve_b->push_vertex_back(&(*split)); + } + else{ + new_curve_a->push_vertex_back(&(*vit)); + } + + for(;vit!=vitend;++vit) + new_curve_b->push_vertex_back(&(*vit)); + + // let's check whether one or two of the two new curves + // satisfy the stopping condition or not. + // (if one of them satisfies it, we don't split) + if((pred(*new_curve_a)) || (pred(*new_curve_b))){ + // we don't actually create these two chains + newChains.push_back(_curve); + delete new_curve_a; + delete new_curve_b; + return; + } + // here we know we'll split _curve: + splitted_chains.push_back(_curve); + + __recursiveSplit(new_curve_a, func, pred, sampling, newChains, splitted_chains); + __recursiveSplit(new_curve_b, func, pred, sampling, newChains, splitted_chains); +} + +void Operators::recursiveSplit(UnaryFunction0D& func, UnaryPredicate1D& pred, float sampling) +{ + if (_current_chains_set.empty()) { + cerr << "Warning: current set empty" << endl; + return; + } + + Chain *currentChain = 0; + I1DContainer splitted_chains; + I1DContainer newChains; + I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end(); + for (; + cit != citend; + ++cit) { + currentChain = dynamic_cast(*cit); + if(!currentChain) + continue; + // let's check the first one: + if(!pred(*currentChain)){ + __recursiveSplit(currentChain, func, pred, sampling, newChains, splitted_chains); + }else{ + newChains.push_back(currentChain); + } + } + // Update the current set of chains: + if(!splitted_chains.empty()){ + for(cit = splitted_chains.begin(), citend = splitted_chains.end(); + cit != citend; + ++cit){ + delete (*cit); + } + splitted_chains.clear(); + } + + _current_chains_set.clear(); + _current_chains_set = newChains; + newChains.clear(); + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} + + +// recursive split with pred 0D +void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling, + Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) +{ + if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){ + newChains.push_back(_curve); + return; + } + + CurveInternal::CurvePointIterator first = _curve->curvePointsBegin(sampling); + CurveInternal::CurvePointIterator second = first; ++second; + CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); + CurveInternal::CurvePointIterator it = second; + CurveInternal::CurvePointIterator split = second; + Interface0DIterator it0d = it.CastToInterface0DIterator(); + //real _min = func(it0d);++it; + real _min = FLT_MAX;++it; + real mean = 0.f; + real variance = 0.f; + unsigned count = 0; + CurveInternal::CurvePointIterator next = it;++next; + real tmp; + + bool bsplit = false; + for(; ((it != end) && (next != end)); ++it,++next){ + ++count; + it0d = it.CastToInterface0DIterator(); + if(!pred0d(it0d)) + continue; + tmp = func(it0d); + mean += tmp; + if(tmp < _min){ + _min = tmp; + split = it; + bsplit = true; + } + } + mean /= (float)count; + + //if((!bsplit) || (mean-_min>mean)){ // we didn't find any minimum + if(!bsplit){ // we didn't find any minimum + newChains.push_back(_curve); + return; + } + + // retrieves the current splitting id + Id * newId = _curve->getSplittingId(); + if(newId == 0){ + newId = new Id(_curve->getId()); + _curve->setSplittingId(newId); + } + + Chain *new_curve_a = new Chain(*newId); + newId->setSecond(newId->getSecond()+1); + new_curve_a->setSplittingId(newId); + Chain *new_curve_b = new Chain(*newId); + newId->setSecond(newId->getSecond()+1); + new_curve_b->setSplittingId(newId); + + CurveInternal::CurvePointIterator vit = _curve->curveVerticesBegin(), vitend=_curve->curveVerticesEnd(); + CurveInternal::CurvePointIterator vnext = vit; ++vnext; + + + for(; (vit!=vitend)&&(vnext!=vitend)&&(split._CurvilinearLength-vit._CurvilinearLength> 0.001); ++vit,++vnext){ + new_curve_a->push_vertex_back(&(*vit)); + } + if((vit==vitend) || (vnext == vitend)){ + cout << "The split takes place in bad location" << endl; + newChains.push_back(_curve); + delete new_curve_a; + delete new_curve_b; + return; + } + + // build the two resulting chains + if(fabs(vit._CurvilinearLength-split._CurvilinearLength) > 0.001){ + new_curve_a->push_vertex_back(&(*split)); + new_curve_b->push_vertex_back(&(*split)); + } + else{ + new_curve_a->push_vertex_back(&(*vit)); + } + + for(;vit!=vitend;++vit) + new_curve_b->push_vertex_back(&(*vit)); + + // let's check whether one or two of the two new curves + // satisfy the stopping condition or not. + // (if one of them satisfies it, we don't split) + if((pred(*new_curve_a)) || (pred(*new_curve_b))){ + // we don't actually create these two chains + newChains.push_back(_curve); + delete new_curve_a; + delete new_curve_b; + return; + } + // here we know we'll split _curve: + splitted_chains.push_back(_curve); + + __recursiveSplit(new_curve_a, func, pred0d, pred, sampling, newChains, splitted_chains); + __recursiveSplit(new_curve_b, func, pred0d, pred, sampling, newChains, splitted_chains); +} + +void Operators::recursiveSplit(UnaryFunction0D& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling) +{ + if (_current_chains_set.empty()) { + cerr << "Warning: current set empty" << endl; + return; + } + + Chain *currentChain = 0; + I1DContainer splitted_chains; + I1DContainer newChains; + I1DContainer::iterator cit = _current_chains_set.begin(), citend = _current_chains_set.end(); + for (; + cit != citend; + ++cit) { + currentChain = dynamic_cast(*cit); + if(!currentChain) + continue; + // let's check the first one: + if(!pred(*currentChain)){ + __recursiveSplit(currentChain, func, pred0d, pred, sampling, newChains, splitted_chains); + }else{ + newChains.push_back(currentChain); + } + } + // Update the current set of chains: + if(!splitted_chains.empty()){ + for(cit = splitted_chains.begin(), citend = splitted_chains.end(); + cit != citend; + ++cit){ + delete (*cit); + } + splitted_chains.clear(); + } + + _current_chains_set.clear(); + _current_chains_set = newChains; + newChains.clear(); + + if (!_current_chains_set.empty()) + _current_set = &_current_chains_set; +} +// Internal class +class PredicateWrapper +{ +public: + + inline PredicateWrapper(BinaryPredicate1D& pred) { + _pred = &pred; + } + + inline bool operator()(Interface1D* i1, Interface1D* i2) { + return (*_pred)(*i1, *i2); + } + +private: + + BinaryPredicate1D* _pred; +}; + +void Operators::sort(BinaryPredicate1D& pred) { + if (!_current_set) + return; + std::sort(_current_set->begin(), _current_set->end(), PredicateWrapper(pred)); +} + +Stroke* createStroke(Interface1D& inter) { + Stroke* stroke = new Stroke; + stroke->SetId(inter.getId()); + + float currentCurvilignAbscissa = 0.f; + + Interface0DIterator it = inter.verticesBegin(), itend = inter.verticesEnd(); + Interface0DIterator itfirst = it; + + Vec3r current(it->getProjectedX(), it->getProjectedY(), it->getProjectedZ()); + Vec3r previous = current; + SVertex* sv; + CurvePoint* cp; + StrokeVertex* stroke_vertex; + + do { + cp = dynamic_cast(&(*it)); + if (!cp) { + sv = dynamic_cast(&(*it)); + if (!sv) { + cerr << "Warning: unexpected Vertex type" << endl; + continue; + } + stroke_vertex = new StrokeVertex(sv); + } + else + stroke_vertex = new StrokeVertex(cp); + current = stroke_vertex->point2d(); + Vec3r vec_tmp(current - previous); + currentCurvilignAbscissa += vec_tmp.norm(); + stroke_vertex->SetCurvilinearAbscissa(currentCurvilignAbscissa); + stroke->push_back(stroke_vertex); + previous = current; + ++it; + } while((it != itend) && (it != itfirst)); + + if (it == itfirst) { + // Add last vertex: + cp = dynamic_cast(&(*it)); + if (!cp) { + sv = dynamic_cast(&(*it)); + if (!sv) + cerr << "Warning: unexpected Vertex type" << endl; + else + stroke_vertex = new StrokeVertex(sv); + } + else + stroke_vertex = new StrokeVertex(cp); + current = stroke_vertex->point2d(); + Vec3r vec_tmp(current - previous); + currentCurvilignAbscissa += vec_tmp.norm(); + stroke_vertex->SetCurvilinearAbscissa(currentCurvilignAbscissa); + stroke->push_back(stroke_vertex); + } + stroke->SetLength(currentCurvilignAbscissa); + return stroke; +} + + +inline void applyShading(Stroke& stroke, vector& shaders) { + for (vector::iterator it = shaders.begin(); + it != shaders.end(); + ++it) + (*it)->shade(stroke); +} + + +void Operators::create(UnaryPredicate1D& pred, vector shaders) { + Canvas* canvas = Canvas::getInstance(); + if (!_current_set) { + cerr << "Warning: current set empty" << endl; + return; + } + for (Operators::I1DContainer::iterator it = _current_set->begin(); + it != _current_set->end(); + ++it) { + if (!pred(**it)) + continue; + Stroke* stroke = createStroke(**it); + if (stroke) { + applyShading(*stroke, shaders); + canvas->RenderStroke(stroke); + _current_strokes_set.push_back(stroke); + } + } +} + + +void Operators::reset() { + ViewMap* vm = ViewMap::getInstance(); + if (!vm) { + cerr << "Error: no ViewMap computed yet" << endl; + return; + } + _current_view_edges_set.clear(); + for (I1DContainer::iterator it = _current_chains_set.begin(); + it != _current_chains_set.end(); + ++it) + delete *it; + _current_chains_set.clear(); + _current_view_edges_set.insert(_current_view_edges_set.begin(), + vm->ViewEdges().begin(), + vm->ViewEdges().end()); + _current_set = &_current_view_edges_set; + _current_strokes_set.clear(); +} diff --git a/extern/freestyle/src/stroke/Operators.h b/extern/freestyle/src/stroke/Operators.h new file mode 100755 index 00000000000..96ecd0aa75b --- /dev/null +++ b/extern/freestyle/src/stroke/Operators.h @@ -0,0 +1,311 @@ +// +// Filename : Operators.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class gathering stroke creation algorithms +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef OPERATORS_H +# define OPERATORS_H + +# include +# include +# include "../view_map/Interface1D.h" +# include "Predicates1D.h" +# include "Predicates0D.h" +# include "../view_map/ViewMap.h" +# include "Chain.h" +# include "ChainingIterators.h" +# include "../system/TimeStamp.h" +# include "StrokeShader.h" + +/*! Class defining the operators used in a style module. + * There are 4 classes of operators: Selection, Chaining, + * Splitting and Creating. All these operators are user controlled + * in the scripting language through Functors, Predicates and Shaders + * that are taken as arguments. + */ +class LIB_STROKE_EXPORT Operators { + +public: + + typedef vector I1DContainer; + typedef vector StrokesContainer; + + + // + // Operators + // + //////////////////////////////////////////////// + + /*! Selects the ViewEdges of the ViewMap verifying + * a specified condition. + * \param pred The predicate expressing this condition + */ + static void select(UnaryPredicate1D& pred); + + /*! Builds a set of chains from the current set of ViewEdges. + * Each ViewEdge of the current list starts a new chain. The chaining + * operator then iterates over the ViewEdges of the ViewMap using the + * user specified iterator. + * This operator only iterates using the increment operator and is + * therefore unidirectional. + * \param it + * The iterator on the ViewEdges of the ViewMap. It contains + * the chaining rule. + * \param pred + * The predicate on the ViewEdge that expresses the stopping + * condition. + * \param modifier + * A function that takes a ViewEdge as argument and that + * is used to modify the processed ViewEdge state (the timestamp + * incrementation is a typical illustration of such a modifier) + */ + static void chain(ViewEdgeInternal::ViewEdgeIterator& it, + UnaryPredicate1D& pred, + UnaryFunction1D& modifier); + + /*! Builds a set of chains from the current set of ViewEdges. + * Each ViewEdge of the current list starts a new chain. The chaining + * operator then iterates over the ViewEdges of the ViewMap using the + * user specified iterator. + * This operator only iterates using the increment operator and is + * therefore unidirectional. + * This chaining operator is different from the previous one because + * it doesn't take any modifier as argument. Indeed, the time stamp (insuring + * that a ViewEdge is processed one time) is automatically managed in this case. + * \param it + * The iterator on the ViewEdges of the ViewMap. It contains + * the chaining rule. + * \param pred + * The predicate on the ViewEdge that expresses the stopping + * condition. + */ + static void chain(ViewEdgeInternal::ViewEdgeIterator& it, + UnaryPredicate1D& pred); + + /*! Builds a set of chains from the current set of ViewEdges. + * Each ViewEdge of the current list potentially starts a new chain. The chaining + * operator then iterates over the ViewEdges of the ViewMap using the + * user specified iterator. + * This operator iterates both using the increment and decrement operators and is + * therefore bidirectional. + * This operator works with a ChainingIterator which contains the + * chaining rules. It is this last one which can be told + * to chain only edges that belong to the selection or not to + * process twice a ViewEdge during the chaining. + * Each time a ViewEdge is added to a chain, its chaining time stamp + * is incremented. This allows you to keep track of + * the number of chains to which a ViewEdge belongs to. + * \param it + * The ChainingIterator on the ViewEdges of the ViewMap. It contains + * the chaining rule. + * \param pred + * The predicate on the ViewEdge that expresses the stopping + * condition. + */ + static void bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred); + + /*! The only difference with the above bidirectional chaining algorithm is + * that we don't need to pass a stopping criterion. This might be desirable + * when the stopping criterion is already contained in the iterator + * definition. + * Builds a set of chains from the current set of ViewEdges. + * Each ViewEdge of the current list potentially starts a new chain. The chaining + * operator then iterates over the ViewEdges of the ViewMap using the + * user specified iterator. + * This operator iterates both using the increment and decrement operators and is + * therefore bidirectional. + * This operator works with a ChainingIterator which contains the + * chaining rules. It is this last one which can be told + * to chain only edges that belong to the selection or not to + * process twice a ViewEdge during the chaining. + * Each time a ViewEdge is added to a chain, its chaining time stamp + * is incremented. This allows you to keep track of + * the number of chains to which a ViewEdge belongs to. + * \param it + * The ChainingIterator on the ViewEdges of the ViewMap. It contains + * the chaining rule. + */ + static void bidirectionalChain(ChainingIterator& it); + + /*! Splits each chain of the current set of chains in a sequential way. + * The points of each chain are processed (with a specified sampling) sequentially. + * Each time a user specified starting condition is verified, a new chain begins and + * ends as soon as a user-defined stopping predicate is verified. + * This allows chains overlapping rather than chains partitioning. + * The first point of the initial chain is the first point of one of the + * resulting chains. + * The splitting ends when no more chain can start. + * \param startingPred + * The predicate on a point that expresses the starting + * condition + * \param stoppingPred + * The predicate on a point that expresses the stopping + * condition + * \param sampling + * The resolution used to sample the chain for the predicates + * evaluation. (The chain is not actually resampled, a virtual point + * only progresses along the curve using this resolution) + */ + static void sequentialSplit(UnaryPredicate0D& startingPred, UnaryPredicate0D& stoppingPred, + float sampling = 0.f); + + /*! Splits each chain of the current set of chains in a sequential way. + * The points of each chain are processed (with a specified sampling) sequentially + * and each time a user specified condition is verified, the chain is split into two chains. + * The resulting set of chains is a partition of the initial chain + * \param pred + * The predicate on a point that expresses the splitting + * condition + * \param sampling + * The resolution used to sample the chain for the predicate + * evaluation. (The chain is not actually resampled, a virtual point + * only progresses along the curve using this resolution) + */ + static void sequentialSplit(UnaryPredicate0D& pred, + float sampling = 0.f); + + /*! Splits the current set of chains in a recursive way. + * We process the points of each chain (with a specified sampling) to find + * the point minimizing a specified function. The chain is split in two at this + * point and the two new chains are processed in the same way. + * The recursivity level is controlled through a predicate 1D that expresses a stopping condition + * on the chain that is about to be processed. + * \param func + * The Unary Function evaluated at each point of the chain. + * The splitting point is the point minimizing this function + * \param pred + * The Unary Predicate ex pressing the recursivity stopping condition. + * This predicate is evaluated for each curve before it actually gets + * split. If pred(chain) is true, the curve won't be split anymore. + * \param sampling + * The resolution used to sample the chain for the predicates + * evaluation. (The chain is not actually resampled, a virtual point + * only progresses along the curve using this resolution) + */ + static void recursiveSplit(UnaryFunction0D& func, UnaryPredicate1D& pred, float sampling = 0); + + /*! Splits the current set of chains in a recursive way. + * We process the points of each chain (with a specified sampling) to find + * the point minimizing a specified function. The chain is split in two at this + * point and the two new chains are processed in the same way. + * The user can specify a 0D predicate to make a first selection + * on the points that can potentially be split. + * A point that doesn't verify the 0D predicate won't be candidate + * in realizing the min. + * The recursivity level is controlled through a predicate 1D that expresses a stopping condition + * on the chain that is about to be processed. + * \param func + * The Unary Function evaluated at each point of the chain. + * The splitting point is the point minimizing this function + * \param pred0d + * The Unary Predicate 0D used to select the candidate points + * where the split can occur. + * For example, it is very likely that would rather have + * your chain splitting around its middle point than around + * one of its extremities. A 0D predicate working on + * the curvilinear abscissa allows to add this kind of constraints. + * \param pred + * The Unary Predicate ex pressing the recursivity stopping condition. + * This predicate is evaluated for each curve before it actually gets + * split. If pred(chain) is true, the curve won't be split anymore. + * \param sampling + * The resolution used to sample the chain for the predicates + * evaluation. (The chain is not actually resampled, a virtual point + * only progresses along the curve using this resolution) + * + */ + static void recursiveSplit(UnaryFunction0D& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling = 0); + + /*! Sorts the current set of chains (or viewedges) according to the + * comparison predicate given as argument. + * \param pred + * The binary predicate used for the comparison + */ + static void sort(BinaryPredicate1D& pred); + + /*! Creates and shades the strokes from the current set of chains. + * A predicate can be specified to make a selection pass on the + * chains. + * \param pred + * The predicate that a chain must verify in order to + * be transform as a stroke + * \param shaders + * The list of shaders used to shade the strokes + */ + static void create(UnaryPredicate1D& pred, vector shaders); + + // + // Data access + // + //////////////////////////////////////////////// + + static ViewEdge* getViewEdgeFromIndex(unsigned i) { + return dynamic_cast(_current_view_edges_set[i]); + } + + static Chain* getChainFromIndex(unsigned i) { + return dynamic_cast(_current_chains_set[i]); + } + + static Stroke* getStrokeFromIndex(unsigned i) { + return _current_strokes_set[i]; + } + + static unsigned getViewEdgesSize() { + return _current_view_edges_set.size(); + } + + static unsigned getChainsSize() { + return _current_chains_set.size(); + } + + static unsigned getStrokesSize() { + return _current_strokes_set.size(); + } + + // + // Not exported in Python + // + ////////////////////////////////////////////////// + + static StrokesContainer* getStrokesSet() { + return &_current_strokes_set; + } + + static void reset(); + +private: + + Operators() {} + + static I1DContainer _current_view_edges_set; + static I1DContainer _current_chains_set; + static I1DContainer* _current_set; + static StrokesContainer _current_strokes_set; +}; + +#endif // OPERATORS_H diff --git a/extern/freestyle/src/stroke/PSStrokeRenderer.cpp b/extern/freestyle/src/stroke/PSStrokeRenderer.cpp new file mode 100755 index 00000000000..dc9c94e0e11 --- /dev/null +++ b/extern/freestyle/src/stroke/PSStrokeRenderer.cpp @@ -0,0 +1,89 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "PSStrokeRenderer.h" +# include "Canvas.h" + +PSStrokeRenderer::PSStrokeRenderer(const char* iFileName) +:StrokeRenderer(){ + if(!iFileName) + iFileName = "freestyle.ps"; + // open the stream: + _ofstream.open(iFileName, ios::out); + if(!_ofstream.is_open()){ + cerr << "couldn't open the output file " << iFileName << endl; + } + _ofstream << "%!PS-Adobe-2.0 EPSF-2.0" << endl; + _ofstream << "%%Creator: Freestyle (http://artis.imag.fr/Software/Freestyle)" << endl; + _ofstream << "%%BoundingBox: " << 0 << " "<< 0 << " " << Canvas::getInstance()->width() << " " << Canvas::getInstance()->height() << endl; + _ofstream << "%%EndComments" << endl; +} + +PSStrokeRenderer::~PSStrokeRenderer(){ + Close(); +} + +void PSStrokeRenderer::RenderStrokeRep(StrokeRep *iStrokeRep) const{ + RenderStrokeRepBasic(iStrokeRep); +} + +void PSStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const{ + vector& strips = iStrokeRep->getStrips(); + Strip::vertex_container::iterator v[3]; + StrokeVertexRep *svRep[3]; + Vec3r color[3]; + for(vector::iterator s=strips.begin(), send=strips.end(); + s!=send; + ++s){ + Strip::vertex_container& vertices = (*s)->vertices(); + v[0] = vertices.begin(); + v[1] = v[0];++(v[1]); + v[2] = v[1]; ++(v[2]); + + while(v[2]!=vertices.end()){ + svRep[0] = *(v[0]); + svRep[1] = *(v[1]); + svRep[2] = *(v[2]); + + color[0] = svRep[0]->color(); + //color[1] = svRep[1]->color(); + //color[2] = svRep[2]->color(); + + _ofstream << "newpath" << endl; + _ofstream << (color[0])[0] << " " << (color[0])[1] << " " << (color[0])[2] << " setrgbcolor" <point2d()[0] << " " <point2d()[1] << " moveto" << endl; + _ofstream << svRep[1]->point2d()[0] << " " <point2d()[1] << " lineto" << endl; + _ofstream << svRep[2]->point2d()[0] << " " <point2d()[1] << " lineto" << endl; + _ofstream << "closepath" << endl; + _ofstream << "fill" << endl; + + ++v[0]; + ++v[1]; + ++v[2]; + } + } +} + +void PSStrokeRenderer::Close(){ + if(_ofstream.is_open()) + _ofstream.close(); +} + diff --git a/extern/freestyle/src/stroke/PSStrokeRenderer.h b/extern/freestyle/src/stroke/PSStrokeRenderer.h new file mode 100755 index 00000000000..821c016ab91 --- /dev/null +++ b/extern/freestyle/src/stroke/PSStrokeRenderer.h @@ -0,0 +1,63 @@ +// +// Filename : PSStrokeRenderer.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the Postscript rendering of a stroke +// Date of creation : 10/26/2004 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PSSTROKERENDERER_H +# define PSSTROKERENDERER_H + +# include "../system/FreestyleConfig.h" +# include "StrokeRenderer.h" +# include + +/**********************************/ +/* */ +/* */ +/* PSStrokeRenderer */ +/* */ +/* */ +/**********************************/ + +class LIB_STROKE_EXPORT PSStrokeRenderer : public StrokeRenderer +{ +public: + PSStrokeRenderer(const char * iFileName = 0); + virtual ~PSStrokeRenderer(); + + /*! Renders a stroke rep */ + virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; + virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; + + /*! Closes the output PS file */ + void Close(); + +protected: + mutable ofstream _ofstream; +}; + +#endif // PSSTROKERENDERER_H + diff --git a/extern/freestyle/src/stroke/Predicates0D.h b/extern/freestyle/src/stroke/Predicates0D.h new file mode 100755 index 00000000000..4c2dfacdf98 --- /dev/null +++ b/extern/freestyle/src/stroke/Predicates0D.h @@ -0,0 +1,160 @@ +// +// Filename : Predicates0D.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class gathering stroke creation algorithms +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PREDICATES0D_H +# define PREDICATES0D_H + +# include "../view_map/Functions0D.h" + +// +// UnaryPredicate0D (base class for predicates in 0D) +// +/////////////////////////////////////////////////////////// +/*! Base class for Unary Predicates that work + * on Interface0DIterator. + * A UnaryPredicate0D is a functor that evaluates + * a condition on a Interface0DIterator and returns + * true or false depending on whether this condition is + * satisfied or not. + * The UnaryPredicate0D is used by calling its () operator. + * Any inherited class must overload the () operator. + */ +class UnaryPredicate0D +{ +public: + /*! Default constructor. */ + UnaryPredicate0D() {} + /*! Destructor. */ + virtual ~UnaryPredicate0D() {} + /*! Returns the string of the name + * of the UnaryPredicate0D. + */ + virtual string getName() const { + return "UnaryPredicate0D"; + } + /*! The () operator. Must be overload + * by inherited classes. + * \param it + * The Interface0DIterator pointing onto the + * Interface0D at which we wish to evaluate + * the predicate. + * \return true if the condition is satisfied, + * false otherwise. + */ + virtual bool operator()(Interface0DIterator& it) { + cerr << "Warning: operator() not implemented" << endl; + return false; + } +}; + + +// +// BinaryPredicate0D (base class for predicates in 0D) +// +/////////////////////////////////////////////////////////// +/*! Base class for Binary Predicates working on Interface0D. + * A BinaryPredicate0D is typically an ordering relation + * between two Interface0D. + * It evaluates a relation between 2 Interface0D and + * returns true or false. + * It is used by calling the () operator. + */ +class BinaryPredicate0D +{ +public: + /*! Default constructor. */ + BinaryPredicate0D() {} + /*! Destructor. */ + virtual ~BinaryPredicate0D() {} + /*! Returns the string of the name of the + * binary predicate. + */ + virtual string getName() const { + return "BinaryPredicate0D"; + } + + /*! The () operator. Must be overload by inherited classes. + * It evaluates a relation between 2 Interface0D. + * \param inter1 + * The first Interface0D. + * \param inter2 + * The second Interface0D. + * \return true or false. + */ + virtual bool operator()(Interface0D& inter1, Interface0D& inter2) { + cerr << "Warning: operator() not implemented" << endl; + return false; + } +}; + + +// +// Predicates definitions +// +/////////////////////////////////////////////////////////// + +namespace Predicates0D { + + // TrueUP0D + /*! Returns true any time */ + class TrueUP0D : public UnaryPredicate0D + { + public: + /*! Default constructor. */ + TrueUP0D() {} + /*! Returns the string "TrueUP0D"*/ + string getName() const { + return "TrueUP0D"; + } + /*! The () operator. */ + bool operator()(Interface0DIterator&) { + return true; + } + }; + + // FalseUP0D + /*! Returns false any time */ + class FalseUP0D : public UnaryPredicate0D + { + public: + /*! Default constructor. */ + FalseUP0D() {} + /*! Returns the string "FalseUP0D"*/ + string getName() const { + return "FalseUP0D"; + } + /*! The () operator. */ + bool operator()(Interface0DIterator&) { + return false; + } + }; + +} // end of namespace Predicates0D + +#endif // PREDICATES0D_H diff --git a/extern/freestyle/src/stroke/Predicates1D.h b/extern/freestyle/src/stroke/Predicates1D.h new file mode 100755 index 00000000000..cf9a3283ae4 --- /dev/null +++ b/extern/freestyle/src/stroke/Predicates1D.h @@ -0,0 +1,438 @@ +// +// Filename : Predicates1D.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class gathering stroke creation algorithms +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PREDICATES1D_H +# define PREDICATES1D_H + +# include +# include "../system/TimeStamp.h" +# include "../view_map/Interface1D.h" +# include "../view_map/Functions1D.h" +# include "AdvancedFunctions1D.h" + +// +// UnaryPredicate1D (base class for predicates in 1D) +// +/////////////////////////////////////////////////////////// +/*! Base class for Unary Predicates that work + * on Interface1D. + * A UnaryPredicate1D is a functor that evaluates + * a condition on a Interface1D and returns + * true or false depending on whether this condition is + * satisfied or not. + * The UnaryPredicate1D is used by calling its () operator. + * Any inherited class must overload the () operator. + */ +class UnaryPredicate1D +{ +public: + /*! Default constructor. */ + UnaryPredicate1D() {} + /*! Destructor. */ + virtual ~UnaryPredicate1D() {} + /*! Returns the string of the name + * of the UnaryPredicate1D. + */ + virtual string getName() const { + return "UnaryPredicate1D"; + } + /*! The () operator. Must be overload + * by inherited classes. + * \param inter + * The Interface1D on which we wish to evaluate + * the predicate. + * \return true if the condition is satisfied, + * false otherwise. + */ + virtual bool operator()(Interface1D& inter) { + cerr << "Warning: operator() not implemented" << endl; + return false; + } +}; + + +// +// BinaryPredicate1D (base class for predicates in 1D) +// +/////////////////////////////////////////////////////////// +/*! Base class for Binary Predicates working on Interface1D. + * A BinaryPredicate1D is typically an ordering relation + * between two Interface1D. + * It evaluates a relation between 2 Interface1D and + * returns true or false. + * It is used by calling the () operator. + */ +class BinaryPredicate1D +{ +public: + /*! Default constructor. */ + BinaryPredicate1D() {} + /*! Destructor. */ + virtual ~BinaryPredicate1D() {} + /*! Returns the string of the name of the + * binary predicate. + */ + virtual string getName() const { + return "BinaryPredicate1D"; + } + /*! The () operator. Must be overload by inherited classes. + * It evaluates a relation between 2 Interface1D. + * \param inter1 + * The first Interface1D. + * \param inter2 + * The second Interface1D. + * \return true or false. + */ + virtual bool operator()(Interface1D& inter1, Interface1D& inter2) { + cerr << "Warning: operator() not implemented" << endl; + return false; + } +}; + + +// +// Predicates definitions +// +/////////////////////////////////////////////////////////// + +namespace Predicates1D { + + // TrueUP1D + /*! Returns true */ + class TrueUP1D : public UnaryPredicate1D + { + public: + /*! Constructor */ + TrueUP1D() {} + /*! Returns the string "TrueUP1D"*/ + string getName() const { + return "TrueUP1D"; + } + /*! the () operator */ + bool operator()(Interface1D&) { + return true; + } + }; + + // FalseUP1D + /*! Returns false */ + class FalseUP1D : public UnaryPredicate1D + { + public: + /*! Constructor */ + FalseUP1D() {} + /*! Returns the string "FalseUP1D"*/ + string getName() const { + return "FalseUP1D"; + } + /*! the () operator */ + bool operator()(Interface1D&) { + return false; + } + }; + + // QuantitativeInvisibilityUP1D + /*! Returns true if the Quantitative Invisibility evaluated + * at an Interface1D, using the QuantitativeInvisibilityF1D + * functor, equals a certain user-defined value. + */ + class QuantitativeInvisibilityUP1D : public UnaryPredicate1D + { + public: + /*! Builds the Predicate. + * \param qi + * The Quantitative Invisibility you want + * the Interface1D to have + */ + QuantitativeInvisibilityUP1D(unsigned qi = 0) : _qi(qi) {} + /*! Returns the string "QuantitativeInvisibilityUP1D"*/ + string getName() const { + return "QuantitativeInvisibilityUP1D"; + } + /*! the () operator */ + bool operator()(Interface1D& inter) { + Functions1D::QuantitativeInvisibilityF1D func; + return (func(inter) == _qi); + } + private: + unsigned _qi; + }; + + // ContourUP1D + /*! Returns true if the Interface1D is a contour. + * An Interface1D is a contour if it is borded + * by a different shape on each of its sides. + */ + class ContourUP1D : public UnaryPredicate1D + { + private: + Functions1D::CurveNatureF1D _getNature; + public: + /*! Returns the string "ContourUP1D"*/ + string getName() const { + return "ContourUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + if((_getNature(inter) & Nature::SILHOUETTE) || (_getNature(inter) & Nature::BORDER)){ + Interface0DIterator it=inter.verticesBegin(); + for(; !it.isEnd(); ++it){ + if(Functions0D::getOccludeeF0D(it) != Functions0D::getShapeF0D(it)) + return true; + } + } + return false; + } + }; + + // ExternalContourUP1D + /*! Returns true if the Interface1D is an external contour. + * An Interface1D is an external contour if it is borded + * by no shape on one of its sides. + */ + class ExternalContourUP1D : public UnaryPredicate1D + { + private: + Functions1D::CurveNatureF1D _getNature; + public: + /*! Returns the string "ExternalContourUP1D"*/ + string getName() const { + return "ExternalContourUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + if((_getNature(inter) & Nature::SILHOUETTE) || (_getNature(inter) & Nature::BORDER)){ + set occluded; + Functions1D::getOccludeeF1D(inter, occluded); + for(set::iterator os=occluded.begin(), osend=occluded.end(); + os!=osend; + ++os){ + if((*os) == 0) + return true; + } + } + return false; + } + }; + + // EqualToTimeStampUP1D + /*! Returns true if the Interface1D's time stamp + * is equal to a certain user-defined value. + */ + class EqualToTimeStampUP1D : public UnaryPredicate1D + { + protected: + unsigned _timeStamp; + public: + EqualToTimeStampUP1D(unsigned ts) : UnaryPredicate1D(){ + _timeStamp = ts; + } + /*! Returns the string "EqualToTimeStampUP1D"*/ + string getName() const { + return "EqualToTimeStampUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + return (inter.getTimeStamp() == _timeStamp); + } + }; + + // EqualToChainingTimeStampUP1D + /*! Returns true if the Interface1D's time stamp + * is equal to a certain user-defined value. + */ + class EqualToChainingTimeStampUP1D : public UnaryPredicate1D + { + protected: + unsigned _timeStamp; + public: + EqualToChainingTimeStampUP1D(unsigned ts) : UnaryPredicate1D(){ + _timeStamp = ts; + } + /*! Returns the string "EqualToChainingTimeStampUP1D"*/ + string getName() const { + return "EqualToChainingTimeStampUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + ViewEdge* edge = dynamic_cast(&inter); + if (!edge) + return false; + return (edge->getChainingTimeStamp() >= _timeStamp); + } + }; + + // ShapeUP1D + /*! Returns true if the shape to which the Interface1D + * belongs to has the same Id as the one specified by the + * user. + */ + class ShapeUP1D: public UnaryPredicate1D + { + private: + Id _id; + public: + /*! Builds the Predicate. + * \param idFirst + * The first Id component. + * \param idSecond + * The second Id component. + */ + ShapeUP1D(unsigned idFirst, unsigned idSecond=0) + : UnaryPredicate1D(){ + _id = Id(idFirst, idSecond); + } + /*! Returns the string "ShapeUP1D"*/ + string getName() const { + return "ShapeUP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& inter) { + set shapes; + Functions1D::getShapeF1D(inter, shapes); + for(set::iterator s=shapes.begin(), send=shapes.end(); + s!=send; + ++s){ + if((*s)->getId() == _id) + return true; + } + return false; + } + }; + + // + // Binary Predicates definitions + // + /////////////////////////////////////////////////////////// + + // TrueBP1D + /*! Returns true. */ + class TrueBP1D : public BinaryPredicate1D + { + public: + /*! Returns the string "TrueBP1D"*/ + string getName() const { + return "TrueBP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& i1, Interface1D& i2) { + return true; + } + }; + + // FalseBP1D + /*! Returns false. */ + class FalseBP1D : public BinaryPredicate1D + { + public: + /*! Returns the string "FalseBP1D"*/ + string getName() const { + return "FalseBP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& i1, Interface1D& i2) { + return false; + } + }; + + // Length2DBP1D + /*! Returns true if the 2D length of the Interface1D i1 + * is less than the 2D length of the Interface1D i2. + */ + class Length2DBP1D : public BinaryPredicate1D + { + public: + /*! Returns the string "Length2DBP1D"*/ + string getName() const { + return "Length2DBP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& i1, Interface1D& i2) { + return (i1.getLength2D() > i2.getLength2D()); + } + }; + + // SameShapeIdBP1D + /*! Returns true if the Interface1D i1 and i2 belong + * to the same shape. + */ + class SameShapeIdBP1D : public BinaryPredicate1D + { + public: + /*! Returns the string "SameShapeIdBP1D"*/ + string getName() const { + return "SameShapeIdBP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& i1, Interface1D& i2) { + set shapes1; + Functions1D::getShapeF1D(i1, shapes1); + set shapes2; + Functions1D::getShapeF1D(i2, shapes2); + // FIXME:// n2 algo, can do better... + for(set::iterator s=shapes1.begin(), send=shapes1.end(); + s!=send; + ++s){ + Id current = (*s)->getId(); + for(set::iterator s2=shapes2.begin(), s2end=shapes2.end(); + s2!=s2end; + ++s2){ + if((*s2)->getId() == current) + return true; + } + } + return false; + } + }; + + // ViewMapGradientNormBP1D + /*! Returns true if the evaluation of the + * Gradient norm Function is higher for Interface1D i1 + * than for i2. + */ + class ViewMapGradientNormBP1D : public BinaryPredicate1D + { + private: + Functions1D::GetViewMapGradientNormF1D _func; + public: + ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0) + : BinaryPredicate1D(), _func(level, iType, sampling) { + } + /*! Returns the string "ViewMapGradientNormBP1D"*/ + string getName() const { + return "ViewMapGradientNormBP1D"; + } + /*! The () operator. */ + bool operator()(Interface1D& i1, Interface1D& i2) { + return (_func(i1) > _func(i2)); + } + }; +} // end of namespace Predicates1D + +#endif // PREDICATES1D_H diff --git a/extern/freestyle/src/stroke/QInformationMap.h b/extern/freestyle/src/stroke/QInformationMap.h new file mode 100755 index 00000000000..2542bdba147 --- /dev/null +++ b/extern/freestyle/src/stroke/QInformationMap.h @@ -0,0 +1,58 @@ +// +// Filename : QInformationMap.h +// Author : Stephane Grabli +// Purpose : Class defining an information map using a QImage +// Date of creation : 04/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef QINFORMATIONMAP_H +# define QINFORMATIONMAP_H + +# include +# include "InformationMap.h" + +class QInformationMap : public InformationMap +{ +private: + QImage _map; // the image or a piece of image + +public: + QInformationMap(); + QInformationMap(const QImage&); + QInformationMap(const QInformationMap&); + QInformationMap& operator=(const QInformationMap&); + + //float getSmoothedPixel(int x, int y, float sigma = 0.2f) + virtual float getMean(int x, int y) ; + virtual void retrieveMeanAndVariance(int x, int y, float &oMean, float &oVariance) ; + + inline const QImage& map() const {return _map;} + inline void SetMap(const QImage& iMap, float iw, float ih) {_map = iMap.copy();_w=iw;_h=ih;} + +protected: + virtual float computeGaussian(int x, int y); +}; + +#endif // QINFORMATIONMAP_H diff --git a/extern/freestyle/src/stroke/Stroke.cpp b/extern/freestyle/src/stroke/Stroke.cpp new file mode 100755 index 00000000000..d6ff4d255c4 --- /dev/null +++ b/extern/freestyle/src/stroke/Stroke.cpp @@ -0,0 +1,949 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Stroke.h" +#include "StrokeRenderer.h" +#include "StrokeIterators.h" +#include "StrokeAdvancedIterators.h" + + /**********************************/ + /* */ + /* */ + /* StrokeAttribute */ + /* */ + /* */ + /**********************************/ + +StrokeAttribute::StrokeAttribute() +{ + int i; + _alpha = 1.f; + _thickness[0] = 1.f; + _thickness[1] = 1.f; + for(i=0; i<3; ++i) + _color[i] = 0.2f; + _color[0]=0.8; + _userAttributesReal = 0; + _userAttributesVec2f = 0; + _userAttributesVec3f = 0; + _visible = true; +} +StrokeAttribute::StrokeAttribute(const StrokeAttribute& iBrother) +{ + _alpha = iBrother._alpha; + _thickness[0] = iBrother._thickness[0]; + _thickness[1] = iBrother._thickness[1]; + for(int i=0; i<3; ++i) + _color[i] = iBrother._color[i]; + _visible = iBrother._visible; + if(iBrother._userAttributesReal) + _userAttributesReal = new realMap(*iBrother._userAttributesReal); + else + _userAttributesReal = 0; + if(iBrother._userAttributesVec2f) + _userAttributesVec2f = new Vec2fMap(*iBrother._userAttributesVec2f); + else + _userAttributesVec2f = 0; + if(iBrother._userAttributesVec3f) + _userAttributesVec3f = new Vec3fMap(*iBrother._userAttributesVec3f); + else + _userAttributesVec3f = 0; +} +StrokeAttribute::StrokeAttribute( float iRColor, float iGColor, float iBColor, + float iAlpha, + float iRThickness, float iLThickness) +{ + _color[0] = iRColor; + _color[1] = iGColor; + _color[2] = iBColor; + + _alpha = iAlpha; + + _thickness[0] = iRThickness; + _thickness[1] = iLThickness; + + _visible = true; + + _userAttributesReal = 0; + _userAttributesVec2f = 0; + _userAttributesVec3f = 0; +} +StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribute& a2, float t) + +{ + + _alpha = (1-t)*a1._alpha + t*a2._alpha; + _thickness[0] = (1-t)*a1._thickness[0] + t*a2._thickness[0]; + _thickness[1] = (1-t)*a1._thickness[1] + t*a2._thickness[1]; + for(int i=0; i<3; ++i) + _color[i] = (1-t)*a1._color[i] + t*a2._color[i]; + + _visible = true; + + // FIXME: a verifier (et a ameliorer) + if((a1._userAttributesReal) && (a2._userAttributesReal)){ + if(a1._userAttributesReal->size() == a2._userAttributesReal->size()){ + _userAttributesReal = new realMap; + realMap::iterator it1=a1._userAttributesReal->begin(), it1end=a1._userAttributesReal->end(); + realMap::iterator it2=a2._userAttributesReal->begin(), it2end=a2._userAttributesReal->end(); + for(; (it1!=it1end); ++it1){ + (*_userAttributesReal)[(*it1).first] = ((1-t)*(*it1).second+t*(*it2).second); + } + } + }else{ + _userAttributesReal = 0; + } + if((a1._userAttributesVec2f) && (a2._userAttributesVec2f)){ + if(a1._userAttributesVec2f->size() == a2._userAttributesVec2f->size()){ + _userAttributesVec2f = new Vec2fMap; + Vec2fMap::iterator it1=a1._userAttributesVec2f->begin(), it1end=a1._userAttributesVec2f->end(); + Vec2fMap::iterator it2=a2._userAttributesVec2f->begin(), it2end=a2._userAttributesVec2f->end(); + for(; (it1!=it1end); ++it1){ + (*_userAttributesVec2f)[(*it1).first] = ((1-t)*(*it1).second+t*(*it2).second); + } + } + }else{ + _userAttributesVec2f = 0; + } + if((a1._userAttributesVec3f) && (a2._userAttributesVec3f)){ + if(a1._userAttributesVec3f->size() == a2._userAttributesVec3f->size()){ + _userAttributesVec3f = new Vec3fMap; + Vec3fMap::iterator it1=a1._userAttributesVec3f->begin(), it1end=a1._userAttributesVec3f->end(); + Vec3fMap::iterator it2=a2._userAttributesVec3f->begin(), it2end=a2._userAttributesVec3f->end(); + for(; (it1!=it1end); ++it1){ + (*_userAttributesVec3f)[(*it1).first] = ((1-t)*(*it1).second+t*(*it2).second); + } + } + }else{ + _userAttributesVec3f = 0; + } + +} +StrokeAttribute::~StrokeAttribute() +{ + if(_userAttributesReal){ + _userAttributesReal->clear(); + delete _userAttributesReal; + } + if(_userAttributesVec2f){ + _userAttributesVec2f->clear(); + delete _userAttributesVec2f; + } + if(_userAttributesVec3f){ + _userAttributesVec3f->clear(); + delete _userAttributesVec3f; + } +} + +StrokeAttribute& StrokeAttribute::operator=(const StrokeAttribute& iBrother) +{ + int i; + _alpha = iBrother._alpha; + _thickness[0] = iBrother._thickness[0]; + _thickness[1] = iBrother._thickness[1]; + for(i=0; i<3; ++i) + _color[i] = iBrother._color[i]; + _visible = iBrother._visible; + if(iBrother._userAttributesReal){ + if(!_userAttributesReal) + _userAttributesReal = new realMap; + _userAttributesReal = new realMap(*(iBrother._userAttributesReal)); + }else{ + _userAttributesReal = 0; + } + if(iBrother._userAttributesVec2f){ + if(!_userAttributesVec2f) + _userAttributesVec2f = new Vec2fMap; + _userAttributesVec2f = new Vec2fMap(*(iBrother._userAttributesVec2f)); + }else{ + _userAttributesVec2f = 0; + } + if(iBrother._userAttributesVec3f){ + if(!_userAttributesVec3f) + _userAttributesVec3f = new Vec3fMap; + _userAttributesVec3f = new Vec3fMap(*(iBrother._userAttributesVec3f)); + }else{ + _userAttributesVec3f = 0; + } + return *this; +} + +float StrokeAttribute::getAttributeReal(const char *iName) const{ + if(!_userAttributesReal){ + cout << "StrokeAttribute warning: no real attribute was defined"<< endl; + return 0; + } + realMap::iterator a = _userAttributesReal->find(iName); + if(a ==_userAttributesReal->end()){ + cout << "StrokeAttribute warning: no real attribute was added with the name " << iName << endl; + return 0; + } + return (*a).second; +} +Vec2f StrokeAttribute::getAttributeVec2f(const char *iName) const{ + if(!_userAttributesVec2f){ + cout << "StrokeAttribute warning: no Vec2f attribute was defined "<< endl; + return 0; + } + Vec2fMap::iterator a = _userAttributesVec2f->find(iName); + if(a ==_userAttributesVec2f->end()){ + cout << "StrokeAttribute warning: no Vec2f attribute was added with the name " << iName << endl; + return 0; + } + return (*a).second; +} +Vec3f StrokeAttribute::getAttributeVec3f(const char *iName) const{ + if(!_userAttributesVec3f){ + cout << "StrokeAttribute warning: no Vec3f attribute was defined"<< endl; + return 0; + } + Vec3fMap::iterator a = _userAttributesVec3f->find(iName); + if(a ==_userAttributesVec3f->end()){ + cout << "StrokeAttribute warning: no Vec3f attribute was added with the name " << iName << endl; + return 0; + } + return (*a).second; +} +bool StrokeAttribute::isAttributeAvailableReal(const char *iName) const{ + if(!_userAttributesReal){ + return false; + } + realMap::iterator a = _userAttributesReal->find(iName); + if(a ==_userAttributesReal->end()){ + return false; + } + return true; +} +bool StrokeAttribute::isAttributeAvailableVec2f(const char *iName) const{ + if(!_userAttributesVec2f){ + return false; + } + Vec2fMap::iterator a = _userAttributesVec2f->find(iName); + if(a ==_userAttributesVec2f->end()){ + return false; + } + return true; +} +bool StrokeAttribute::isAttributeAvailableVec3f(const char *iName) const{ + if(!_userAttributesVec3f){ + return false; + } + Vec3fMap::iterator a = _userAttributesVec3f->find(iName); + if(a ==_userAttributesVec3f->end()){ + return false; + } + return true; +} +void StrokeAttribute::setAttributeReal(const char *iName, float att){ + if(!_userAttributesReal) + _userAttributesReal = new realMap; + (*_userAttributesReal)[iName] = att; +} +void StrokeAttribute::setAttributeVec2f(const char *iName, const Vec2f& att){ + if(!_userAttributesVec2f) + _userAttributesVec2f = new Vec2fMap; + (*_userAttributesVec2f)[iName] = att; +} +void StrokeAttribute::setAttributeVec3f(const char *iName, const Vec3f& att){ + if(!_userAttributesVec3f) + _userAttributesVec3f = new Vec3fMap; + (*_userAttributesVec3f)[iName] = att; +} + /**********************************/ + /* */ + /* */ + /* StrokeVertex */ + /* */ + /* */ + /**********************************/ + +StrokeVertex::StrokeVertex() + +:CurvePoint() +{ + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; +} + + + +StrokeVertex::StrokeVertex(const StrokeVertex& iBrother) + +:CurvePoint(iBrother) +{ + _Attribute = iBrother._Attribute; + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; +} +StrokeVertex::StrokeVertex(SVertex *iSVertex) + +:CurvePoint(iSVertex,0,0.f) + +{ + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; + +} + + + +StrokeVertex::StrokeVertex(CurvePoint *iPoint) + +:CurvePoint(*iPoint) + +{ + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; + +} + + + +StrokeVertex::StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3) + +:CurvePoint(iA,iB,t3) + +{ + + // interpolate attributes: + + _Attribute = StrokeAttribute(iA->attribute(), iB->attribute(), t3); + _CurvilignAbscissa = (1-t3)*iA->curvilinearAbscissa()+t3*iB->curvilinearAbscissa(); + _StrokeLength = iA->strokeLength(); + +} + + + +StrokeVertex::StrokeVertex(SVertex *iSVertex, const StrokeAttribute& iAttribute) + +:CurvePoint(iSVertex,0,0.f) + +{ + + _Attribute = iAttribute; + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; + +} +StrokeVertex::~StrokeVertex() +{ +} + +StrokeVertex& StrokeVertex::operator=(const StrokeVertex& iBrother) +{ + ((CurvePoint*)this)->operator=(iBrother); + _Attribute = iBrother._Attribute; + + _CurvilignAbscissa = 0.f; + + _StrokeLength = 0.f; + return *this; +} + + /**********************************/ + /* */ + /* */ + /* Stroke */ + /* */ + /* */ + /**********************************/ + +Stroke::Stroke() +{ + _Length = 0; + _id = 0; + _sampling = FLT_MAX; + //_mediumType = DEFAULT_STROKE; + _mediumType = OPAQUE_MEDIUM; + _textureId = 0; + _tips = false; + _rep = 0; +} + +Stroke::Stroke(const Stroke& iBrother) +{ + for(vertex_container::const_iterator v=iBrother._Vertices.begin(), vend=iBrother._Vertices.end(); + v!=vend; + v++) + { + _Vertices.push_back(*v); + } + _Length = 0; + _id = iBrother._id; + _ViewEdges = iBrother._ViewEdges; + _sampling = iBrother._sampling; + _mediumType = iBrother._mediumType; + _textureId = iBrother._textureId; + _tips = iBrother._tips; + _rep = new StrokeRep(*(iBrother._rep)); +} + +Stroke::~Stroke() +{ + if(!_Vertices.empty()) + { + for(vertex_container::iterator v=_Vertices.begin(), vend=_Vertices.end(); + v!=vend; + v++) + { + delete (*v); + } + _Vertices.clear(); + } + + _ViewEdges.clear(); + if(_rep != 0) + { + delete _rep; + _rep = 0; + } +} + +Stroke& Stroke::operator=(const Stroke& iBrother) +{ + if(!_Vertices.empty()) + _Vertices.clear(); + + for(vertex_container::const_iterator v=iBrother._Vertices.begin(), vend=iBrother._Vertices.end(); + v!=vend; + v++) + { + _Vertices.push_back(*v); + } + _Length = iBrother._Length; + _id = iBrother._id; + _ViewEdges = iBrother._ViewEdges; + _sampling = iBrother._sampling; + if(_rep) delete _rep; + if(iBrother._rep) + _rep = new StrokeRep(*(iBrother._rep)); + return *this; +} + + +void Stroke::SetLength(float iLength) +{ + _Length = iLength; + for(vertex_container::iterator v=_Vertices.begin(), vend=_Vertices.end(); + v!=vend; + ++v) + { + (*v)->SetStrokeLength(iLength); + } +} + +float Stroke::ComputeSampling(int iNVertices) +{ + if(iNVertices <= _Vertices.size()) + return _sampling; + + float sampling = _Length/(float)(iNVertices-_Vertices.size()+1); + return sampling; +} + +class StrokeSegment +{ +public: + StrokeInternal::StrokeVertexIterator _begin; + StrokeInternal::StrokeVertexIterator _end; + float _length; + int _n; + float _sampling; + bool _resampled; + + StrokeSegment(StrokeInternal::StrokeVertexIterator ibegin, + StrokeInternal::StrokeVertexIterator iend, + float ilength, + int in, + float isampling) + { + _begin=ibegin; + _end=iend; + _length=ilength; + _n=in; + _sampling = isampling; + _resampled = false; + } +}; + +void Stroke::Resample(int iNPoints) +{ + int vertsize = strokeVerticesSize(); + if(iNPoints <= vertsize) + return; + + StrokeInternal::StrokeVertexIterator it = strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator next = it;++next; + StrokeInternal::StrokeVertexIterator itend = strokeVerticesEnd(); + + vertex_container newVertices; + real t=0.f; + StrokeVertex * newVertex = 0; + vector strokeSegments; + int N=0; + float meanlength = 0; + int nsegments = 0; + while(((it!=itend)&&(next!=itend))) + { + Vec3r a((it)->point2d()); + Vec3r b((next)->point2d()); + Vec3r vec_tmp(b - a); + real norm_var = vec_tmp.norm(); + int numberOfPointsToAdd = (int)floor((iNPoints-strokeVerticesSize())*norm_var/_Length); + float csampling = norm_var/(float)(numberOfPointsToAdd+1); + strokeSegments.push_back(StrokeSegment(it,next,norm_var,numberOfPointsToAdd, csampling)); + N+=numberOfPointsToAdd; + meanlength += norm_var; + ++nsegments; + ++it; ++next; + } + meanlength /= (float)nsegments; + + // if we don't have enough points let's resample + // finer some segments + int NPointsToAdd = iNPoints-vertsize; + bool checkEveryone = false; + while(N < NPointsToAdd) + { + for(vector::iterator s=strokeSegments.begin(), send=strokeSegments.end(); + s!=send; + ++s) + { + if(s->_sampling == 0.f) + continue; + + if(s->_resampled == false) + { + if((!checkEveryone) && (s->_length < meanlength)) + continue; + //resample + s->_n = s->_n+1; + s->_sampling = s->_length/(float)(s->_n+1); + s->_resampled = true; + N++; + if(N == NPointsToAdd) + break; + } + } + checkEveryone = true; + } + //actually resample: + for(vector::iterator s=strokeSegments.begin(), send=strokeSegments.end(); + s!=send; + ++s) + { + newVertices.push_back(&(*(s->_begin))); + if(s->_sampling < _sampling) + _sampling = s->_sampling; + + t = s->_sampling/s->_length; + for(int i=0; i_n; ++i) + { + newVertex = new StrokeVertex(&(*(s->_begin)),&(*(s->_end)),t); + newVertices.push_back(newVertex); + t += s->_sampling/s->_length; + } + it=s->_begin; + next=s->_end; + } + + // add last: + ++it;++next; + if((it != itend) && (next == itend))// && (t == 0.f)) + newVertices.push_back(&(*it)); + + int newsize = newVertices.size(); + if(newsize != iNPoints) + cerr << "Warning: incorrect points number" << endl; + + _Vertices.clear(); + _Vertices = newVertices; + newVertices.clear(); + + if(_rep) + { + delete _rep; + _rep = new StrokeRep(this); + } +} + + +void Stroke::Resample(float iSampling) +{ + // cerr<<"old size :"<= _sampling) + return ; + + _sampling = iSampling; + // Resample... + //real curvilinearLength = 0.f; + vertex_container newVertices; + real t=0.f; + StrokeVertex * newVertex = 0; + StrokeInternal::StrokeVertexIterator it = strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator next = it;++next; + StrokeInternal::StrokeVertexIterator itend = strokeVerticesEnd(); + while(((it!=itend)&&(next!=itend))) + { + newVertices.push_back(&(*it)); + Vec3r a((it)->point2d()); + Vec3r b((next)->point2d()); + Vec3r vec_tmp(b - a); + real norm_var = vec_tmp.norm(); + if(norm_var <= _sampling) + { + //curvilinearLength += norm_var; + ++it; ++next; + continue; + } + + //curvilinearLength += _sampling; + t = _sampling/norm_var; + float limit = 0.99f; + while(tSetCurvilinearAbscissa(curvilinearLength); + newVertices.push_back(newVertex); + t = t + _sampling/norm_var; + } + ++it; ++next; + } + // add last: + if((it != itend) && (next == itend))// && (t == 0.f)) + newVertices.push_back(&(*it)); + + _Vertices.clear(); + _Vertices = newVertices; + newVertices.clear(); + + if(_rep) + { + delete _rep; + _rep = new StrokeRep(this); + } +} + +void Stroke::RemoveVertex(StrokeVertex *iVertex) +{ + vertex_container::iterator it=_Vertices.begin(), itend=_Vertices.end(); + for(; + it!=itend; + ++it) + { + if((*it) == iVertex) + { + delete iVertex; + it = _Vertices.erase(it); // it is now the element just after the erased element + break; + } + } + // recompute various values (length, curvilign abscissa) + float curvabsc = 0.f; + it=_Vertices.begin(); + itend=_Vertices.end(); + vertex_container::iterator previous=it; + for(; + (it!=itend); + ++it) + { + if(it != previous) + curvabsc += ((*it)->point2d()-(*previous)->point2d()).norm(); + (*it)->SetCurvilinearAbscissa(curvabsc); + previous = it; + } + _Length = curvabsc; + it=_Vertices.begin(); + for(; + (it!=itend); + ++it) + { + (*it)->SetStrokeLength(_Length); + } +} + +void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next) +{ + vertex_container::iterator it=_Vertices.begin(), itend=_Vertices.end(); + + vertex_container::iterator itnext = next.getIt(); + _Vertices.insert(itnext, iVertex); + // recompute various values (length, curvilign abscissa) + float curvabsc = 0.f; + it=_Vertices.begin(); + itend=_Vertices.end(); + vertex_container::iterator previous=it; + for(; + (it!=itend); + ++it) + { + curvabsc += ((*it)->point2d()-(*previous)->point2d()).norm(); + (*it)->SetCurvilinearAbscissa(curvabsc); + previous = it; + } + _Length = curvabsc; + for(; + (it!=itend); + ++it) + { + (*it)->SetStrokeLength(_Length); + } +} + +//! embedding vertex iterator +Stroke::const_vertex_iterator Stroke::vertices_begin() const { return const_vertex_iterator(_Vertices.begin(),_Vertices.begin(), _Vertices.end()); } +Stroke::const_vertex_iterator Stroke::vertices_end() const { return const_vertex_iterator(_Vertices.end(),_Vertices.begin(), _Vertices.end()); } +Stroke::vertex_iterator Stroke::vertices_end() { return vertex_iterator(_Vertices.end(),_Vertices.begin(), _Vertices.end()); } + +StrokeInternal::StrokeVertexIterator Stroke::strokeVerticesBegin(float t) { + if((t!=0) && (t < _sampling)) + Resample(t); + return StrokeInternal::StrokeVertexIterator(this->_Vertices.begin(), this->_Vertices.begin(), this->_Vertices.end()); +} + +StrokeInternal::StrokeVertexIterator Stroke::strokeVerticesEnd() { + return StrokeInternal::StrokeVertexIterator(this->_Vertices.end(), this->_Vertices.begin(), this->_Vertices.end()); +} + +Interface0DIterator Stroke::verticesBegin() { + Interface0DIterator ret(new StrokeInternal::StrokeVertexIterator(this->_Vertices.begin(), + this->_Vertices.begin(), + this->_Vertices.end())); + return ret; +} + +Interface0DIterator Stroke::verticesEnd() { + Interface0DIterator ret(new StrokeInternal::StrokeVertexIterator(this->_Vertices.end(), + this->_Vertices.begin(), + this->_Vertices.end())); + return ret; +} + +Interface0DIterator Stroke::pointsBegin(float t) { + return verticesBegin(); // FIXME +} + +Interface0DIterator Stroke::pointsEnd(float t) { + return verticesEnd(); +} + +void Stroke::Render(const StrokeRenderer *iRenderer) +{ + if(!_rep) + _rep = new StrokeRep(this); + iRenderer->RenderStrokeRep(_rep); +} + +void Stroke::RenderBasic(const StrokeRenderer *iRenderer) +{ + if(!_rep) + _rep = new StrokeRep(this); + iRenderer->RenderStrokeRepBasic(_rep); +} + +Stroke::vertex_iterator Stroke::vertices_begin(float sampling) +{ + // Resample if necessary + if((sampling != 0) && (sampling < _sampling)) + Resample(sampling); + return vertex_iterator(_Vertices.begin(),_Vertices.begin(),_Vertices.end()); + //return _Vertices.begin(); +} +// +//Stroke::vertex_iterator Stroke::vertices_last() +//{ +// vertex_iterator res = vertices_begin(); +// vertex_iterator next = res;++next; +// while(!next.end()) +// { +// ++next; +// ++res; +// } +// return res; +//} +// +//Stroke::const_vertex_iterator Stroke::vertices_last() const +//{ +// const_vertex_iterator res = vertices_begin(); +// const_vertex_iterator next = res;++next; +// while(!next.end()) +// { +// ++next; +// ++res; +// } +// return res; +//} + +//Stroke::vertex_container::reverse_iterator Stroke::vertices_last(float sampling) +//{ +// // Resample if necessary +// if(sampling < _sampling) +// Resample(sampling); +// return _Vertices.rbegin(); +//} + + +//inline Vec3r shaded_color(int iCombination = 0) const ; +//inline Vec<3,real> Stroke::orientation2d(const_vertex_iterator it) const +//{ +// return iterator_edge_orientation2d_function(this, it); +//} +// Vec3r Stroke::orientation2d(int iCombination) const +// { +// return edge_orientation2d_function(*this, iCombination); +// } +//inline Vec3r Stroke::orientation3d(const_vertex_iterator it) const +//{ +// return iterator_edge_orientation3d_function(*this, it); +//} +// Vec3r Stroke::orientation3d(int iCombination) const +// { +// return edge_orientation3d_function(*this, iCombination); +// } + +//Material Stroke::material() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=strokeVerticesEnd(); +// Material mat = (*v)->material(); +// for(;v!=vend;++v) +// { +// if(mat != (*v)->material()) +// Exception::raiseException(); +// } +// return mat; +//} + +//int Stroke::qi() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// int qi_= (*v)->qi(); +// for(;v!=vend;++v) +// { +// if((*v)->qi() != qi_) +// Exception::raiseException(); +// } +// return qi_; +//} +//inline occluder_container::const_iterator occluders_begin() const {return _FEdgeA->occluders().begin();} +//inline occluder_container::const_iterator occluders_end() const {return _FEdgeA->occluders().end();} + +//int Stroke::occluders_size() const +//{ +// return qi(); +//} +// +//bool Stroke::occluders_empty() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// bool empty = (*v)->occluders_empty(); +// for(;v!=vend;++v) +// { +// if((*v)->occluders_empty() != empty) +// Exception::raiseException(); +// } +// return empty; +//} +////inline const polygon3d& occludee() const {return *(_FEdgeA->aFace());} +//const SShape * Stroke::occluded_shape() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// const SShape *sshape = (*v)->occluded_shape(); +// for(;v!=vend;++v) +// { +// if((*v)->occluded_shape() != sshape) +// Exception::raiseException(); +// } +// return sshape; +//} +// +//const bool Stroke::occludee_empty() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// bool empty = (*v)->occludee_empty(); +// for(;v!=vend;++v) +// { +// if((*v)->occludee_empty() != empty) +// Exception::raiseException(); +// } +// return empty; +//} + +//const SShape * Stroke::shape() const +//{ +// const_vertex_iterator v=vertices_begin(), vend=vertices_end(); +// const SShape *sshape = (*v)->shape(); +// for(;v!=vend;++v) +// { +// if((*v)->shape() != sshape) +// Exception::raiseException(); +// } +// return sshape; +//} + +// real Stroke::z_discontinuity(int iCombination) const +// { +// return z_discontinuity_edge_function(*this, iCombination); +// } + +// Vec3r Stroke::curvature2d_as_vector(int iCombination) const +// { +// return curvature2d_as_vector_edge_function(*this, iCombination); +// } + +// real Stroke::curvature2d_as_angle(int iCombination) const +// { +// return curvature2d_as_angle_edge_function(*this, iCombination); +// } + +// float Stroke::shape_importance(int iCombination) const +// { +// return shape_importance_edge_function(*this, iCombination); +// } + + +// float Stroke::local_average_depth(int iCombination ) const +// { +// return local_average_depth_edge_function(*this, iCombination); +// } + +// float Stroke::local_depth_variance(int iCombination) const +// { +// return local_depth_variance_edge_function(*this, iCombination); +// } + +// real Stroke::local_average_density(float sigma , int iCombination ) const +// { +// return density_edge_function(*this, iCombination); +// } diff --git a/extern/freestyle/src/stroke/Stroke.h b/extern/freestyle/src/stroke/Stroke.h new file mode 100755 index 00000000000..a5cf51f8224 --- /dev/null +++ b/extern/freestyle/src/stroke/Stroke.h @@ -0,0 +1,584 @@ +// +// Filename : Stroke.h +// Author(s) : Stephane Grabli +// Purpose : Classes to define a stroke +// Date of creation : 09/09/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKE_H +# define STROKE_H + +# include +# include +# include "../system/FreestyleConfig.h" +# include "../view_map/Silhouette.h" +# include "Curve.h" +# include "../view_map/Interface1D.h" +# include "../system/StringUtils.h" + +// +// StrokeAttribute +// +//////////////////////////////////////////////////////// + +/*! Class to define an attribute associated to a Stroke Vertex. + * This attribute stores the color, alpha and thickness values + * for a Stroke Vertex. + */ +class LIB_STROKE_EXPORT StrokeAttribute +{ +public: + + /*! default constructor */ + StrokeAttribute(); + /*! Copy constructor */ + StrokeAttribute(const StrokeAttribute& iBrother); + /*! Builds a stroke vertex attribute from + * a set of parameters. + * \param iRColor + * The Red Component value. + * \param iGColor + * The Green Component value. + * \param iBColor + * The Blue Component value. + * \param iAlpha + * The transparency value + * \param iRThickness + * The thickness of the stroke on the right + * \param iLThickness + * The Thickness of the stroke on the left + */ + StrokeAttribute(float iRColor, float iGColor, float iBColor, + float iAlpha, + float iRThickness, float iLThickness); + + /*! Interpolation constructor. + * Builds a StrokeAttribute from two + * StrokeAttributes and an interpolation parameter. + * \param a1 + * The first Attribute. + * \param a2 + * The second parameter. + * \param t + * The interpolation parameter. + */ + StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribute& a2, float t); + + /*! destructor */ + virtual ~StrokeAttribute(); + + /* operators */ + /*! operator = */ + StrokeAttribute& operator=(const StrokeAttribute& iBrother); + + /* accessors */ + /*! Returns the attribute's color. + * \return The array of 3 floats containing the R,G,B values + * of the attribute's color. + */ + inline const float* getColor() const { return _color; } + /*! Returns the R color component. */ + inline const float getColorR() const { return _color[0]; } + /*! Returns the G color component. */ + inline const float getColorG() const { return _color[1]; } + /*! Returns the B color component. */ + inline const float getColorB() const { return _color[2]; } + /*! Returns the RGB color components. */ + inline Vec3f getColorRGB() const { return Vec3f(_color[0], _color[1], _color[2]); } + /*! Returns the alpha color component. */ + inline float getAlpha() const { return _alpha; } + /*! Returns the attribute's thickness. + * \return an array of 2 floats. the first value is + * the thickness on the right of the vertex when following + * the stroke, the second one is the thickness on the left. + */ + inline const float* getThickness() const { return _thickness; } + /*! Returns the thickness on the right of the vertex when following the + * stroke. */ + inline const float getThicknessR() const { return _thickness[0]; } + /*! Returns the thickness on the left of the vertex when following the + * stroke. */ + inline const float getThicknessL() const { return _thickness[1]; } + /*! Returns the thickness on the right and on the left of the vertex when following the + * stroke. */ + inline Vec2f getThicknessRL() const { return Vec2f(_thickness[0], _thickness[1]); } + + /*! Returns true if the strokevertex is visible, false otherwise */ + inline bool isVisible() const {return _visible;} + + /*! Returns an attribute of type real + * \param iName + * The name of the attribute + */ + float getAttributeReal(const char *iName) const; + /*! Returns an attribute of type Vec2f + * \param iName + * The name of the attribute + */ + Vec2f getAttributeVec2f(const char *iName) const; + /*! Returns an attribute of type Vec3f + * \param iName + * The name of the attribute + */ + Vec3f getAttributeVec3f(const char *iName) const; + + /*! Checks whether the attribute iName is availbale */ + bool isAttributeAvailableReal(const char *iName) const ; + /*! Checks whether the attribute iName is availbale */ + bool isAttributeAvailableVec2f(const char *iName) const ; + /*! Checks whether the attribute iName is availbale */ + bool isAttributeAvailableVec3f(const char *iName) const ; + + /* modifiers */ + /*! Sets the attribute's color. + * \param r + * The new R value. + * \param g + * The new G value. + * \param b + * The new B value. + */ + inline void setColor(float r, float g, float b) { _color[0]=r; _color[1]=g; _color[2]=b; } + /*! Sets the attribute's color. + * \param iRGB + * The new RGB values. + */ + inline void setColor(const Vec3f& iRGB) { _color[0]=iRGB[0]; _color[1]=iRGB[1]; _color[2]=iRGB[2]; } + /*! Sets the attribute's alpha value. + * \param alpha + * The new alpha value. + */ + inline void setAlpha(float alpha) { _alpha = alpha; } + /*! Sets the attribute's thickness. + * \param tr + * The thickness on the right of the vertex when following the stroke. + * \param tl + * The thickness on the left of the vertex when following the stroke. + */ + inline void setThickness(float tr, float tl) { _thickness[0]=tr; _thickness[1]=tl; } + /*! Sets the attribute's thickness. + * \param tRL + * The thickness on the right and on the left of the vertex when following the stroke. + */ + inline void setThickness(const Vec2f& tRL) { _thickness[0]=tRL[0]; _thickness[1]=tRL[1]; } + + /*! Sets the visible flag. True means visible. */ + inline void SetVisible(bool iVisible){ _visible = iVisible; } + + /*! Adds a user defined attribute of type real + * If there is no attribute of name iName, it is added. + * Otherwise, the new value replaces the old one. + * \param iName + * The name of the attribute + * \param att + * The attribute's value + */ + void setAttributeReal(const char *iName, float att); + /*! Adds a user defined attribute of type Vec2f + * If there is no attribute of name iName, it is added. + * Otherwise, the new value replaces the old one. + * \param iName + * The name of the attribute + * \param att + * The attribute's value + */ + void setAttributeVec2f(const char *iName, const Vec2f& att); + /*! Adds a user defined attribute of type Vec3f + * If there is no attribute of name iName, it is added. + * Otherwise, the new value replaces the old one. + * \param iName + * The name of the attribute + * \param att + * The attribute's value + */ + void setAttributeVec3f(const char *iName, const Vec3f& att); + +private: + + typedef std::map realMap ; + typedef std::map Vec2fMap ; + typedef std::map Vec3fMap ; + + float _color[3]; //! the color + float _alpha; //! alpha + float _thickness[2]; //! the thickness on the right and on the left of the backbone vertex (the stroke is oriented) + bool _visible; + realMap *_userAttributesReal; + Vec2fMap *_userAttributesVec2f; + Vec3fMap *_userAttributesVec3f; +}; + + +// +// StrokeVertex +// +//////////////////////////////////////////////////////// + +/*! Class to define a stroke vertex. + */ +class LIB_STROKE_EXPORT StrokeVertex : public CurvePoint +{ +public: // Implementation of Interface0D + + /*! Returns the string "StrokeVertex"*/ + virtual string getExactTypeName() const { + return "StrokeVertex"; + } + +private: + + StrokeAttribute _Attribute; //! The attribute associated to the vertex + float _CurvilignAbscissa; //! the curvilign abscissa + float _StrokeLength; // stroke length + +public: + + /*! default constructor */ + StrokeVertex(); + /*! Copy constructor */ + StrokeVertex(const StrokeVertex& iBrother); + /*! Builds a stroke vertex from a SVertex */ + StrokeVertex(SVertex *iSVertex); + /*! Builds a stroke vertex from a CurvePoint */ + StrokeVertex(CurvePoint *iPoint); + /*! Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/ + StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3); + /*! Builds a stroke from a view vertex and an attribute */ + StrokeVertex(SVertex *iSVertex, const StrokeAttribute& iAttribute); + /*! destructor */ + virtual ~StrokeVertex(); + + /* operators */ + /*! operator = */ + StrokeVertex& operator=(const StrokeVertex& iBrother); + + /* accessors */ + /*! Returns the 2D point x coordinate */ + inline real x() const { return _Point2d[0]; } + /*! Returns the 2D point y coordinate */ + inline real y() const { return _Point2d[1]; } + /*! Returns the 2D point coordinates as a Vec2d */ + Vec2f getPoint () {return Vec2f((float)point2d()[0], (float)point2d()[1]);} + /*! Returns the ith 2D point coordinate (i=0 or 1)*/ + inline real operator[](const int i) const { return _Point2d[i]; } + /*! Returns the StrokeAttribute for this StrokeVertex */ + inline const StrokeAttribute& attribute() const { return _Attribute; } + /*! Returns a non-const reference to the StrokeAttribute of this StrokeVertex */ + inline StrokeAttribute& attribute() {return _Attribute;} + /*! Returns the curvilinear abscissa */ + inline float curvilinearAbscissa() const {return _CurvilignAbscissa;} + /*! Returns the length of the Stroke to which this StrokeVertex belongs */ + inline float strokeLength() const {return _StrokeLength;} + /*! Returns the curvilinear abscissa of this StrokeVertex in the Stroke */ + inline float u() const {return _CurvilignAbscissa/_StrokeLength;} + + /* modifiers */ + /*! Sets the 2D x value */ + inline void SetX(real x) { _Point2d[0]=x; } + /*! Sets the 2D y value */ + inline void SetY(real y) { _Point2d[1]=y; } + /*! Sets the 2D x and y values */ + inline void SetPoint(real x, real y) { _Point2d[0]=x; _Point2d[1]=y;} + /*! Sets the 2D x and y values */ + inline void SetPoint(const Vec2f& p) { _Point2d[0] = p[0];_Point2d[1] = p[1];} + /*! Returns a reference to the ith 2D point coordinate (i=0 or 1) */ + inline real& operator[](const int i) { return _Point2d[i]; } + /*! Sets the attribute. */ + inline void SetAttribute(const StrokeAttribute& iAttribute) { _Attribute = iAttribute; } + /*! Sets the curvilinear abscissa of this StrokeVertex in the Stroke */ + inline void SetCurvilinearAbscissa(float iAbscissa) {_CurvilignAbscissa = iAbscissa;} + /*! Sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't + * change the real Stroke's length.) + */ + inline void SetStrokeLength(float iLength) {_StrokeLength = iLength;} + + /* interface definition */ + /* inherited */ + +}; + + +// +// Stroke +// +//////////////////////////////////////////////////////// + +class StrokeRenderer; +class StrokeRep; + +namespace StrokeInternal { + class vertex_const_traits ; + class vertex_nonconst_traits ; + template class vertex_iterator_base; + class StrokeVertexIterator; +} // end of namespace StrokeInternal + +/*! Class to define a stroke. + * A stroke is made of a set of 2D vertices (StrokeVertex), regularly spaced out. + * This set of vertices defines the stroke's backbone geometry. + * Each of these stroke vertices defines the stroke's shape and appearance + * at this vertex position. + */ +class LIB_STROKE_EXPORT Stroke : public Interface1D +{ +public: // Implementation of Interface1D + + /*! Returns the string "Stroke" */ + virtual string getExactTypeName() const { + return "Stroke"; + } + + // Data access methods + + /*! Returns the Id of the Stroke */ + virtual Id getId() const { + return _id; + } + /*! The different blending modes + * available to similate the interaction + * media-medium. + */ + typedef enum{ + DRY_MEDIUM,/*!< To simulate a dry medium such as Pencil or Charcoal.*/ + HUMID_MEDIUM,/*!< To simulate ink painting (color substraction blending).*/ + OPAQUE_MEDIUM, /*!< To simulate an opaque medium (oil, spray...).*/ + } MediumType; + + +public: + typedef std::deque vertex_container; // the vertices container + typedef std::vector viewedge_container; // the viewedges container + typedef StrokeInternal::vertex_iterator_base vertex_iterator; + typedef StrokeInternal::vertex_iterator_base const_vertex_iterator; + +public: + //typedef StrokeVertex vertex_type; +private: + vertex_container _Vertices; //! The stroke's backbone vertices + Id _id; + float _Length; // The stroke length + viewedge_container _ViewEdges; + float _sampling; + StrokeRenderer *_renderer; // mark implementation OpenGL renderer + MediumType _mediumType; + unsigned int _textureId; + bool _tips; + Vec2r _extremityOrientations[2]; // the orientations of the first and last extermity + StrokeRep *_rep; + +public: + /*! default constructor */ + Stroke(); + /*! copy constructor */ + Stroke(const Stroke& iBrother); + /*! Builds a stroke from a set of StrokeVertex. + * This constructor is templated by an iterator type. + * This iterator type must allow the vertices parsing + * using the ++ operator. + * \param iBegin + * The iterator pointing to the first vertex. + * \param iEnd + * The iterator pointing to the end of the vertex list. + */ + template + Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd); + + /*! Destructor */ + virtual ~Stroke(); + + /* operators */ + /*! operator = */ + Stroke& operator=(const Stroke& iBrother); + + /*! Compute the sampling needed to get iNVertices + * vertices. + * If the specified number of vertices is less than the + * actual number of vertices, the actual sampling value is returned. + * (To remove Vertices, use the RemoveVertex() method of this class). + * \param iNVertices + * The number of StrokeVertices we eventually want + * in our Stroke. + * \return the sampling that must be used in the Resample(float) method. + * @see Resample(int) + * @see Resample(float) + */ + float ComputeSampling(int iNVertices); + + /*! Resampling method. + * Resamples the curve so that it eventually + * has iNPoints. That means it is going + * to add iNPoints-vertices_size, if vertices_size + * is the number of points we already have. + * Is vertices_size >= iNPoints, no resampling is done. + * \param iNPoints + * The number of vertices we eventually want in our stroke. + */ + void Resample(int iNPoints); + + /*! Resampling method. + * Resamples the curve with a given sampling. + * If this sampling is < to the actual sampling + * value, no resampling is done. + * \param iSampling + * The new sampling value. + */ + void Resample(float iSampling); + + /*! Removes the stroke vertex iVertex + * from the stroke. + * The length and curvilinear abscissa are updated + * consequently. + */ + void RemoveVertex(StrokeVertex *iVertex); + + /*! Inserts the stroke vertex iVertex + * in the stroke before next. + * The length, curvilinear abscissa are updated + * consequently. + * \param iVertex + * The StrokeVertex to insert in the Stroke. + * \param next + * A StrokeVertexIterator pointing to the StrokeVeretx before + * which iVertex must be inserted. + */ + void InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next); + + /* Render method */ + void Render(const StrokeRenderer *iRenderer ); + void RenderBasic(const StrokeRenderer *iRenderer ); + + /* Iterator definition */ + + /* accessors */ + /*! Returns the 2D length of the Stroke */ + inline real getLength2D() const {return _Length;} + /*! Returns a reference to the time stamp value of the stroke. */ + /*! Returns the MediumType used for this Stroke. */ + inline MediumType getMediumType() const {return _mediumType;} + /*! Returns the id of the texture used to simulate th marks system + * for this Stroke + */ + inline unsigned int getTextureId() {return _textureId;} + /*! Returns true if this Stroke uses a texture with tips, false + * otherwise. + */ + inline bool hasTips() const {return _tips;} + /* these advanced iterators are used only in C++ */ + inline int vertices_size() const {return _Vertices.size();} + inline viewedge_container::const_iterator viewedges_begin() const {return _ViewEdges.begin();} + inline viewedge_container::iterator viewedges_begin() {return _ViewEdges.begin();} + inline viewedge_container::const_iterator viewedges_end() const {return _ViewEdges.end();} + inline viewedge_container::iterator viewedges_end() {return _ViewEdges.end();} + inline int viewedges_size() const {return _ViewEdges.size();} + + inline Vec2r getBeginningOrientation() const {return _extremityOrientations[0];} + inline real getBeginningOrientationX() const {return _extremityOrientations[0].x();} + inline real getBeginningOrientationY() const {return _extremityOrientations[0].y();} + inline Vec2r getEndingOrientation() const {return _extremityOrientations[1];} + inline real getEndingOrientationX() const {return _extremityOrientations[1].x();} + inline real getEndingOrientationY() const {return _extremityOrientations[1].y();} + + + /* modifiers */ + /*! Sets the Id of the Stroke. */ + inline void SetId(const Id& id) {_id = id;} + /*! Sets the 2D length of the Stroke. */ + void SetLength(float iLength); + /*! Sets the medium type that must be used for this Stroke. */ + inline void SetMediumType(MediumType iType) {_mediumType = iType;} + /*! Sets the texture id to be used to simulate the marks system for this Stroke. */ + inline void SetTextureId(unsigned int id) {_textureId = id;} + /*! Sets the flag telling whether this stroke is using a texture with + * tips or not. + */ + inline void SetTips(bool iTips) {_tips = iTips;} + + inline void push_back(StrokeVertex* iVertex) { _Vertices.push_back(iVertex); } + inline void push_front(StrokeVertex* iVertex) { _Vertices.push_front(iVertex); } + inline void AddViewEdge(ViewEdge *iViewEdge) {_ViewEdges.push_back(iViewEdge);} + inline void SetBeginningOrientation(const Vec2r& iOrientation) {_extremityOrientations[0] = iOrientation;} + inline void SetBeginningOrientation(real x, real y) {_extremityOrientations[0] = Vec2r(x,y);} + inline void SetEndingOrientation(const Vec2r& iOrientation) {_extremityOrientations[1] = iOrientation;} + inline void SetEndingOrientation(real x, real y) {_extremityOrientations[1] = Vec2r(x,y);} + + /* Information access interface */ + + // embedding vertex iterator + const_vertex_iterator vertices_begin() const; + vertex_iterator vertices_begin(float t=0.f); + const_vertex_iterator vertices_end() const; + vertex_iterator vertices_end(); + + /*! Returns a StrokeVertexIterator pointing on the first StrokeVertex of the + * Stroke. One can specifly a sampling value to resample the Stroke + * on the fly if needed. + * \param t + * The resampling value with which we want our Stroke to be resampled. + * If 0 is specified, no resampling is done. + */ + StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t=0.f); + /*! Returns a StrokeVertexIterator pointing after the last StrokeVertex of the + * Stroke. + */ + StrokeInternal::StrokeVertexIterator strokeVerticesEnd(); + /*! Returns the number of StrokeVertex constituing the Stroke. */ + inline unsigned int strokeVerticesSize() const {return _Vertices.size();} + + // Iterator access (Interface1D) + /*! Returns an Interface0DIterator pointing on the first StrokeVertex of the + * Stroke. + */ + virtual Interface0DIterator verticesBegin(); + /*! Returns an Interface0DIterator pointing after the last StrokeVertex of the + * Stroke. + */ + virtual Interface0DIterator verticesEnd(); + + virtual Interface0DIterator pointsBegin(float t=0.f); + virtual Interface0DIterator pointsEnd(float t=0.f); +}; + + + +// +// Implementation +// +//////////////////////////////////////////////////////// + + +template +Stroke::Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd) +{ + for(InputVertexIterator v=iBegin, vend=iEnd; + v!=vend; + v++) + { + _Vertices.push_back(*v); + } + _Length = 0; + _id = 0; +} + +#endif // STROKE_H diff --git a/extern/freestyle/src/stroke/StrokeAdvancedIterators.h b/extern/freestyle/src/stroke/StrokeAdvancedIterators.h new file mode 100755 index 00000000000..279a0b12089 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeAdvancedIterators.h @@ -0,0 +1,142 @@ +// +// Filename : StrokeAdvancedIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the elements of the Stroke +// Can't be used in python +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKEADVANCEDITERATORS_H +# define STROKEADVANCEDITERATORS_H + +# include "Stroke.h" + +namespace StrokeInternal { + + class vertex_const_traits : public Const_traits { + public: + typedef std::deque vertex_container; + typedef vertex_container::const_iterator vertex_container_iterator ; + }; + class vertex_nonconst_traits : public Nonconst_traits { + public: + typedef std::deque vertex_container; //! the vertices container + typedef vertex_container::iterator vertex_container_iterator ; + }; + + + template + class vertex_iterator_base : public IteratorBase + { + public: + typedef vertex_iterator_base Self; + protected: + typedef IteratorBase parent_class; + typedef typename Traits::vertex_container_iterator vertex_container_iterator; + typedef vertex_iterator_base iterator; + typedef vertex_iterator_base const_iterator; + //protected: + public: + vertex_container_iterator _it; + vertex_container_iterator _begin; + vertex_container_iterator _end; + public: + friend class Stroke; + //friend class vertex_iterator; + inline vertex_iterator_base() + : parent_class() + {} + inline vertex_iterator_base(const iterator& iBrother) + : parent_class() + {_it = iBrother._it;_begin = iBrother._begin;_end = iBrother._end;} + inline vertex_iterator_base(const const_iterator& iBrother) + : parent_class() + {_it = iBrother._it;_begin = iBrother._begin;_end = iBrother._end;} + //protected://FIXME + public: + inline vertex_iterator_base(vertex_container_iterator it, vertex_container_iterator begin, vertex_container_iterator end) + : parent_class() + { + _it = it; + _begin = begin; + _end = end; + } + + public: + virtual ~vertex_iterator_base() {} + + virtual bool begin() const {return _it==_begin? true : false;} + virtual bool end() const {return _it==_end ? true : false;} + + // operators + inline Self& operator++() // operator corresponding to ++i + { + ++_it; + return *(this); + } + inline Self operator++(int) // opérateur correspondant à i++ + { + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + ++_it; // dans un temporaire. + return tmp; + } + inline Self& operator--() // operator corresponding to ++i + { + --_it; + return *(this); + } + inline Self operator--(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + --_it; // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + return (_it != b._it); + } + virtual bool operator==(const Self& b) const + { + return !(*this != b); + } + + // dereferencing + virtual typename Traits::reference operator*() const {return *(_it);} + virtual typename Traits::pointer operator->() const { return &(operator*());} + + /*! accessors */ + inline vertex_container_iterator it() const {return _it;} + inline vertex_container_iterator getBegin() const {return _begin;} + inline vertex_container_iterator getEnd() const {return _end;} + }; + +} // end of namespace StrokeInternal + + +#endif // STROKEADVANCEDITERATORS_H + + diff --git a/extern/freestyle/src/stroke/StrokeIO.cpp b/extern/freestyle/src/stroke/StrokeIO.cpp new file mode 100755 index 00000000000..7f540939fa1 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeIO.cpp @@ -0,0 +1,55 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StrokeIO.h" +#include "StrokeAdvancedIterators.h" + + +ostream& operator<<(ostream& out, const StrokeAttribute& iStrokeAttribute){ + out << " StrokeAttribute" << endl; + out << " color : (" << iStrokeAttribute.getColorR() << "," << iStrokeAttribute.getColorG() << "," << iStrokeAttribute.getColorB() << ")" << endl; + out << " alpha : " << iStrokeAttribute.getAlpha() << endl; + out << " thickness : " << iStrokeAttribute.getThicknessR() << ", " << iStrokeAttribute.getThicknessL() << endl; + out << " visible : " << iStrokeAttribute.isVisible() << endl; + return out; +} + +ostream& operator<<(ostream& out, const StrokeVertex& iStrokeVertex){ + out << " StrokeVertex" << endl; + out << " id : " << iStrokeVertex.getId() << endl; + out << " curvilinear length : " << iStrokeVertex.curvilinearAbscissa() << endl; + out << " 2d coordinates : (" << iStrokeVertex.getProjectedX() << "," << iStrokeVertex.getProjectedY() << "," << iStrokeVertex.getProjectedZ() << ")" << endl; + out << " 3d coordinates : (" << iStrokeVertex.getX() << "," << iStrokeVertex.getY() << "," << iStrokeVertex.getZ() << ")"<< endl; + out << iStrokeVertex.attribute() << endl; + return out; +} + +ostream& operator<<(ostream& out, const Stroke& iStroke){ + out << "Stroke" << endl; + out << " id : " << iStroke.getId() << endl; + out << " length : " << iStroke.getLength2D() << endl; + out << " medium type : " << iStroke.getMediumType() << endl; + for(Stroke::const_vertex_iterator v=iStroke.vertices_begin(), vend=iStroke.vertices_end(); + v!=vend; + ++v){ + out << *(*v) << endl; + } + return out; +} \ No newline at end of file diff --git a/extern/freestyle/src/stroke/StrokeIO.h b/extern/freestyle/src/stroke/StrokeIO.h new file mode 100755 index 00000000000..42b99420f4a --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeIO.h @@ -0,0 +1,47 @@ +// +// Filename : StrokeIO.h +// Author(s) : Stephane Grabli +// Purpose : Functions to manage I/O for the stroke +// Date of creation : 03/02/2004 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKEIO_H +# define STROKEIO_H + +# include +# include "../system/FreestyleConfig.h" +# include "Stroke.h" + +LIB_STROKE_EXPORT +ostream& operator<<(ostream& out, const StrokeAttribute& iStrokeAttribute); + +LIB_STROKE_EXPORT +ostream& operator<<(ostream& out, const StrokeVertex& iStrokeVertex); + +LIB_STROKE_EXPORT +ostream& operator<<(ostream& out, const Stroke& iStroke); + + +#endif // STROKEIO_H \ No newline at end of file diff --git a/extern/freestyle/src/stroke/StrokeIterators.h b/extern/freestyle/src/stroke/StrokeIterators.h new file mode 100755 index 00000000000..9cc08a0532a --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeIterators.h @@ -0,0 +1,227 @@ +// +// Filename : StrokeIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the elements of the Stroke +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKEITERATORS_H +# define STROKEITERATORS_H + +# include "Stroke.h" + +namespace StrokeInternal { + + // + // StrokeVertexIterator + // + ///////////////////////////////////////////////// + + /*! Class defining an iterator designed to iterate over + * the StrokeVertex of a Stroke. + * An instance of a StrokeVertexIterator can only be obtained + * from a Stroke by calling strokeVerticesBegin() or strokeVerticesEnd(). + * It is iterating over the same vertices as an Interface0DIterator. + * The difference resides in the object access. Indeed, an Interface0DIterator + * allows only an access to an Interface0D whereas we could need + * to access the specialized StrokeVertex type. In this case, one + * should use a StrokeVertexIterator. + * The castToInterface0DIterator() method is useful to get an Interface0DIterator + * from a StrokeVertexIterator in order to call any functions of the + * type UnaryFunction0D. + * \attention In the scripting language, you must call + * \code it2 = StrokeVertexIterator(it1) \endcode instead of + * \code it2 = it1 \endcode + * where \a it1 and \a it2 are 2 StrokeVertexIterator. + * Otherwise, incrementing \a it1 will also increment \a it2. + */ + class StrokeVertexIterator : public Interface0DIteratorNested + { + public: + + /*! Default constructor. */ + StrokeVertexIterator() {} + + /*! Copy constructor. */ + StrokeVertexIterator(const StrokeVertexIterator& vi) { + _it = vi._it; + _begin = vi._begin; + _end = vi._end; + } + + StrokeVertexIterator(const ::Stroke::vertex_container::iterator& it, + const ::Stroke::vertex_container::iterator& begin, + const ::Stroke::vertex_container::iterator& end) { + _it = it; + _begin = begin; + _end = end; + } + + virtual ~StrokeVertexIterator() {} + + /*! Casts this StrokeVertexIterator into an Interface0DIterator. + * Useful for any call to a function of the type UnaryFunction0D. + */ + inline Interface0DIterator castToInterface0DIterator() const { + Interface0DIterator ret(new StrokeVertexIterator(*this)); + return ret; + } + /*! operator= + * \attention In the scripting language, you must call + * \code it2 = StrokeVertexIterator(it1) \endcode instead of + * \code it2 = it1 \endcode + * where \a it1 and \a it2 are 2 StrokeVertexIterator. + * Otherwise, incrementing \a it1 will also increment \a it2. + * + */ + StrokeVertexIterator& operator=(const StrokeVertexIterator& vi) { + _it = vi._it; + _begin = vi._begin; + _end = vi._end; + return *this; + } + + /*! Returns the string "StrokeVertexIterator". */ + virtual string getExactTypeName() const { + return "StrokeVertexIterator"; + } + + /*! Returns a reference to the pointed StrokeVertex. + * In the scripting language, you must call + * "getObject()"instead. + */ + virtual StrokeVertex& operator*() { + return **_it; + } + + /*! Returns a pointer to the pointed StrokeVertex. + * Can't be called in the scripting language. + */ + virtual StrokeVertex* operator->() { + return &(operator*()); + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + virtual StrokeVertexIterator& operator++() { + increment(); + return *this; + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + virtual StrokeVertexIterator operator++(int) { + StrokeVertexIterator ret(*this); + increment(); + return ret; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + virtual StrokeVertexIterator& operator--() { + decrement(); + return *this; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + virtual StrokeVertexIterator operator--(int) { + StrokeVertexIterator ret(*this); + decrement(); + return ret; + } + + /*! Increments. */ + virtual void increment() { + ++_it; + } + + /*! Decrements. */ + virtual void decrement() { + --_it; + } + + /*! Returns true if the pointed StrokeVertex is the + * first of the Stroke. + */ + bool isBegin() const { + return _it == _begin; + } + + /*! Returns true if the pointed StrokeVertex is after the + * last StrokeVertex of the Stroke. + */ + bool isEnd() const { + return _it == _end; + } + + /*! operator == */ + virtual bool operator==(const Interface0DIteratorNested& it) const { + const StrokeVertexIterator* it_exact = dynamic_cast(&it); + if (!it_exact) + return false; + return (_it == it_exact->_it); + } + + /*! Returns the curvilinear abscissa of the current point */ + virtual float t() const{ + return (*_it)->curvilinearAbscissa(); + } + /*! Returns the point's parameter in the stroke */ + virtual float u() const{ + return (*_it)->u(); + } + + /*! Cloning method */ + virtual StrokeVertexIterator* copy() const { + return new StrokeVertexIterator(*this); + } + + // + // Not exported in Python + // + ////////////////////////////////////////////////// + + const ::Stroke::vertex_container::iterator& getIt() { + return _it; + } + + private: + + ::Stroke::vertex_container::iterator _it; + ::Stroke::vertex_container::iterator _begin; + ::Stroke::vertex_container::iterator _end; + }; + +} // end of namespace StrokeInternal + + +#endif // STROKEITERATORS_H + + diff --git a/extern/freestyle/src/stroke/StrokeLayer.cpp b/extern/freestyle/src/stroke/StrokeLayer.cpp new file mode 100755 index 00000000000..8b469399ca8 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeLayer.cpp @@ -0,0 +1,55 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StrokeLayer.h" +#include "Stroke.h" +#include "Canvas.h" + +StrokeLayer::~StrokeLayer() +{ + clear(); +} + +void StrokeLayer::Render(const StrokeRenderer *iRenderer ) +{ + for(StrokeLayer::stroke_container::iterator s=_strokes.begin(), send=_strokes.end(); + s!=send; + ++s){ + (*s)->Render(iRenderer); + } +} + +void StrokeLayer::RenderBasic(const StrokeRenderer *iRenderer ) +{ + for(StrokeLayer::stroke_container::iterator s=_strokes.begin(), send=_strokes.end(); + s!=send; + ++s){ + (*s)->RenderBasic(iRenderer); + } +} +void StrokeLayer::clear() +{ + for(stroke_container::iterator s=_strokes.begin(), send=_strokes.end(); + s!=send; + ++s) + delete *s; + _strokes.clear(); +} diff --git a/extern/freestyle/src/stroke/StrokeLayer.h b/extern/freestyle/src/stroke/StrokeLayer.h new file mode 100755 index 00000000000..b89b77a85a7 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeLayer.h @@ -0,0 +1,75 @@ +// +// Filename : StrokeLayer.h +// Author : Stephane Grabli +// Purpose : Class to define a layer of strokes. +// Date of creation : 18/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKELAYER_H +# define STROKELAYER_H + +# include + +class Stroke; +class StrokeRenderer; +class StrokeLayer +{ +public: + typedef std::deque stroke_container; + +protected: + stroke_container _strokes; +public: + StrokeLayer() {} + StrokeLayer(const stroke_container& iStrokes) + { + _strokes = iStrokes; + } + StrokeLayer(const StrokeLayer& iBrother) + { + _strokes = iBrother._strokes; + } + virtual ~StrokeLayer() ; + + /*! Render method */ + void Render(const StrokeRenderer *iRenderer ); + void RenderBasic(const StrokeRenderer *iRenderer ); + + /*! clears the layer */ + void clear() ; + + /*! accessors */ + inline stroke_container::iterator strokes_begin() {return _strokes.begin();} + inline stroke_container::iterator strokes_end() {return _strokes.end();} + inline int strokes_size() const {return _strokes.size();} + inline bool empty() const {return _strokes.empty();} + + /*! modifiers */ + inline void SetStrokes(stroke_container& iStrokes) {_strokes = iStrokes;} + inline void AddStroke(Stroke *iStroke) {_strokes.push_back(iStroke);} + +}; + +#endif // STROKELAYER_H diff --git a/extern/freestyle/src/stroke/StrokeRenderer.cpp b/extern/freestyle/src/stroke/StrokeRenderer.cpp new file mode 100755 index 00000000000..e747fb4f5cd --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeRenderer.cpp @@ -0,0 +1,146 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StrokeRenderer.h" +#include "../geometry/GeomUtils.h" +using namespace std; + +/**********************************/ +/* */ +/* */ +/* StrokeRenderer */ +/* */ +/* */ +/**********************************/ + +LIB_STROKE_EXPORT +TextureManager *StrokeRenderer::_textureManager = 0; + +StrokeRenderer::StrokeRenderer () +{ +} + +StrokeRenderer::~StrokeRenderer () +{ +} + +bool StrokeRenderer::loadTextures() +{ + _textureManager->load(); + return true; +} + +// unsigned int StrokeRenderer::getPaperTextureIndex(unsigned int index) +// { + // return _textureManager->getPaperTextureIndex(index); +// } + + +/**********************************/ +/* */ +/* */ +/* TextureManager */ +/* */ +/* */ +/**********************************/ + + +LIB_STROKE_EXPORT +TextureManager* TextureManager::_pInstance = 0; + +LIB_STROKE_EXPORT +vector TextureManager::_papertextures; + +LIB_STROKE_EXPORT +string TextureManager::_patterns_path; + +LIB_STROKE_EXPORT +string TextureManager::_brushes_path; + +TextureManager::TextureManager () +{ + _papertexname = NULL; + _hasLoadedTextures=false; + _pInstance = this; + _defaultTextureId = 0; +} + +TextureManager::~TextureManager () +{ + if (_papertexname) + delete _papertexname; + if(!_brushesMap.empty()) + _brushesMap.clear(); + _pInstance = 0; +} + +void TextureManager::load() +{ + if(_hasLoadedTextures) + return ; + loadPapers(); + loadStandardBrushes(); + _hasLoadedTextures = true; +} + +unsigned TextureManager::getBrushTextureIndex(string name, Stroke::MediumType loadingMode) +{ + BrushTexture bt(name,loadingMode); + brushesMap::iterator b = _brushesMap.find(bt); + if(b == _brushesMap.end()){ + unsigned texId = loadBrush(name, loadingMode); + _brushesMap[bt] = texId; + return texId; + cout << "brush file " << name << " not found" << endl; + return 0; + }else{ + return _brushesMap[bt]; + } +} + +vector& TextureManager::Options::getPaperTextures() { + return _papertextures; +} + +void TextureManager::Options::setPaperTextures(const vector& sl) { + _papertextures = sl; +} + +void TextureManager::Options::setPatternsPath(const string& path) { + _patterns_path = path; +} + +string TextureManager::Options::getPatternsPath() { + return _patterns_path; +} + +void TextureManager::Options::setBrushesPath(const string& path) { + _brushes_path = path; +} + +string TextureManager::Options::getBrushesPath() { + return _brushes_path; +} + +unsigned TextureManager::getPaperTexturesNumber() { + return _papertextures.size(); +} + diff --git a/extern/freestyle/src/stroke/StrokeRenderer.h b/extern/freestyle/src/stroke/StrokeRenderer.h new file mode 100755 index 00000000000..d192fe30145 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeRenderer.h @@ -0,0 +1,140 @@ +// +// Filename : StrokeRenderer.h +// Author(s) : Fredo Durand +// Purpose : Classes to render a stroke with OpenGL +// Date of creation : 09/09/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKE_RENDERER_H +# define STROKE_RENDERER_H + +# include +# include +# include +# include "../system/FreestyleConfig.h" +# include "Stroke.h" +# include "StrokeRep.h" +# include + + +/**********************************/ +/* */ +/* */ +/* TextureManager */ +/* */ +/* */ +/**********************************/ + + +/*! Class to load textures + */ +class LIB_STROKE_EXPORT TextureManager +{ +public: + + TextureManager (); + virtual ~TextureManager (); + static TextureManager * getInstance() {return _pInstance;} + void load () ; + unsigned getBrushTextureIndex(string name, Stroke::MediumType iType = Stroke::OPAQUE_MEDIUM) ; + unsigned getPaperTextureIndex(unsigned i) { return _papertexname[i]; } + + static unsigned getPaperTexturesNumber(); + inline bool hasLoaded() const {return _hasLoadedTextures;} + inline unsigned int getDefaultTextureId() const {return _defaultTextureId;} + + struct LIB_STROKE_EXPORT Options + { + static void setPaperTextures(const vector& sl); + static vector& getPaperTextures(); + + static void setPatternsPath(const string& path); + static string getPatternsPath(); + + static void setBrushesPath(const string& path); + static string getBrushesPath(); + }; + + protected: + virtual void loadPapers() = 0; + virtual void loadStandardBrushes() = 0; + virtual unsigned loadBrush(string fileName, Stroke::MediumType = Stroke::OPAQUE_MEDIUM) = 0; + + typedef std::pair BrushTexture; + struct cmpBrushTexture{ + bool operator()(const BrushTexture& bt1, const BrushTexture& bt2) const{ + int r = strcmp(bt1.first.c_str(), bt2.first.c_str()); + if(r != 0) + return (r<0); + else + return (bt1.second < bt2.second); + } + }; + typedef std::map brushesMap; + + static TextureManager * _pInstance; + bool _hasLoadedTextures; + brushesMap _brushesMap; + unsigned* _papertexname; + static string _patterns_path; + static string _brushes_path; + static vector _papertextures; + unsigned int _defaultTextureId; +}; + + +/**********************************/ +/* */ +/* */ +/* StrokeRenderer */ +/* */ +/* */ +/**********************************/ + +/*! Class to render a stroke. + Creates a triangle strip and stores it + strip is lazily created at the first rendering +*/ +class LIB_STROKE_EXPORT StrokeRenderer +{ + public: + StrokeRenderer(); + virtual ~StrokeRenderer (); + + /*! Renders a stroke rep */ + virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const = 0; + virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const = 0; + + // initializes the texture manager + // lazy, checks if it has already been done + static bool loadTextures() ; + + //static unsigned int getTextureIndex(unsigned int index) ; + //static unsigned int getPaperTextureIndex(unsigned int index) ; + static TextureManager *_textureManager; +}; + + +#endif // STROKE_RENDERER_H diff --git a/extern/freestyle/src/stroke/StrokeRep.cpp b/extern/freestyle/src/stroke/StrokeRep.cpp new file mode 100755 index 00000000000..055e1fb1be4 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeRep.cpp @@ -0,0 +1,820 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "StrokeRep.h" +#include "Stroke.h" +#include "StrokeRenderer.h" +#include "StrokeAdvancedIterators.h" +#include "StrokeIterators.h" + +using namespace std; + +// +// STROKE VERTEX REP +///////////////////////////////////// +StrokeVertexRep::StrokeVertexRep(const StrokeVertexRep& iBrother){ + _point2d = iBrother._point2d; + _texCoord = iBrother._texCoord; + _color = iBrother._color; + _alpha = iBrother._alpha; +} + +// +// STRIP +///////////////////////////////////// + +Strip::Strip(const vector& iStrokeVertices, bool hasTips, bool beginTip, bool endTip){ + createStrip(iStrokeVertices); + if (!hasTips) + computeTexCoord (iStrokeVertices); + else + computeTexCoordWithTips (iStrokeVertices, beginTip, endTip); +} +Strip::Strip(const Strip& iBrother){ + if(!iBrother._vertices.empty()){ + for(vertex_container::const_iterator v=iBrother._vertices.begin(), vend=iBrother._vertices.end(); + v!=vend; + ++v){ + _vertices.push_back(new StrokeVertexRep(**v)); + } + } + _averageThickness = iBrother._averageThickness; +} + +Strip::~Strip(){ + if(!_vertices.empty()){ + for(vertex_container::iterator v=_vertices.begin(), vend=_vertices.end(); + v!=vend; + ++v){ + delete (*v); + } + _vertices.clear(); + } +} + +////////////////////////// +// Strip creation +////////////////////////// +#define EPS_SINGULARITY_RENDERER 0.05 +#define ZERO 0.00001 +#define MAX_RATIO_LENGTH_SINGU 2 +#define HUGE_COORD 1e4 + +bool notValid (Vec2r p) +{ + return (p[0]!=p[0]) || (p[1]!=p[1]) || (fabs(p[0])>HUGE_COORD) || (fabs(p[1])>HUGE_COORD) + || (p[0] <-HUGE_COORD) || (p[1]<-HUGE_COORD); +} + +real crossP(const Vec2r& A, const Vec2r& B){ + return A[0]*B[1] - A[1]*B[0]; +} + +void +Strip::createStrip (const vector& iStrokeVertices) +{ + //computeParameterization(); + if (iStrokeVertices.size() <2) + { + cerr << "Warning: strip has less than 2 vertices" << endl; + return; + } + _vertices.reserve(2*iStrokeVertices.size()); + if(!_vertices.empty()){ + for(vertex_container::iterator v=_vertices.begin(), vend=_vertices.end(); + v!=vend; + ++v){ + delete (*v); + } + _vertices.clear(); + } + _averageThickness=0.0; + + vector::const_iterator v ,vend, v2, vPrev; + StrokeVertex *sv, *sv2, *svPrev; + + //special case of first vertex + v=iStrokeVertices.begin(); + sv=*v; + vPrev=v; //in case the stroke has only 2 vertices; + ++v; sv2=*v; + Vec2r dir(sv2->getPoint()-sv->getPoint()); + Vec2r orthDir(-dir[1], dir[0]); + if (orthDir.norm() > ZERO) + orthDir.normalize(); + const float *thickness = sv->attribute().getThickness(); + _vertices.push_back(new StrokeVertexRep(sv->getPoint()+thickness[1]*orthDir)); + _vertices.push_back(new StrokeVertexRep(sv->getPoint()-thickness[0]*orthDir)); + + Vec2r stripDir(orthDir); + // check whether the orientation + // was user defined + if(sv->attribute().isAttributeAvailableVec2f("orientation")){ + Vec2r userDir = sv->attribute().getAttributeVec2f("orientation"); + userDir.normalize(); + Vec2r t(orthDir[1], -orthDir[0]); + real dp1 = userDir*orthDir; + real dp2 = userDir*t; + real h = (thickness[1]+thickness[0])/dp1; + real x = fabs(h*dp2/2.0); + if(dp1>0){ + //i'm in the upper part of the unit circle + if(dp2>0){ + //i'm in the upper-right part of the unit circle + // i must move vertex 1 + _vertices[1]->setPoint2d(_vertices[0]->point2d()-userDir*(h)); + //_vertices[0]->setPoint2d(_vertices[0]->point2d()+t*x); + //_vertices[1]->setPoint2d(_vertices[1]->point2d()-t*x); + }else{ + //i'm in the upper-left part of the unit circle + // i must move vertex 0 + _vertices[0]->setPoint2d(_vertices[1]->point2d()+userDir*(h)); + //_vertices[0]->setPoint2d(_vertices[0]->point2d()-t*x); + //_vertices[1]->setPoint2d(_vertices[1]->point2d()+t*x); + } + }else{ + //i'm in the lower part of the unit circle + if(dp2>0){ + //i'm in the lower-right part of the unit circle + // i must move vertex 0 + //_vertices[0]->setPoint2d(_vertices[1]->point2d()-userDir*(h)); + _vertices[0]->setPoint2d(_vertices[0]->point2d()-t*x); + //_vertices[1]->setPoint2d(_vertices[1]->point2d()+t*x); + }else{ + //i'm in the lower-left part of the unit circle + // i must move vertex 1 + _vertices[1]->setPoint2d(_vertices[0]->point2d()+userDir*(h)); + //_vertices[0]->setPoint2d(_vertices[0]->point2d()-t*x); + //_vertices[1]->setPoint2d(_vertices[1]->point2d()-t*x); + } + } + } + + + // Vec2r userDir = _stroke->getBeginningOrientation(); + // if(userDir != Vec2r(0,0)){ + // userDir.normalize(); + // real o1 = (orthDir*userDir); + // real o2 = crossP(orthDir,userDir); + // real orientation = o1 * o2; + // if(orientation > 0){ + // // then the vertex to move is v0 + // if(o1 > 0) + // _vertex[0]=_vertex[1]+userDir; + // else + // _vertex[0]=_vertex[1]-userDir; + // } + // if(orientation < 0){ + // // then we must move v1 + // if(o1 < 0) + // _vertex[1]=_vertex[0]+userDir; + // else + // _vertex[1]=_vertex[0]-userDir; + // } + // } + + int i=2; //2 because we have already processed the first vertex + + for(vend=iStrokeVertices.end(); + v!=vend; + v++){ + v2=v; ++v2; + if (v2==vend) break; + sv= (*v); sv2 = (*v2); svPrev=(*vPrev); + Vec2r p(sv->getPoint()), p2(sv2->getPoint()), pPrev(svPrev->getPoint()); + + //direction and orthogonal vector to the next segment + Vec2r dir(p2-p); + float dirNorm=dir.norm(); + dir.normalize(); + Vec2r orthDir(-dir[1], dir[0]); + Vec2r stripDir = orthDir; + if(sv->attribute().isAttributeAvailableVec2f("orientation")){ + Vec2r userDir = sv->attribute().getAttributeVec2f("orientation"); + userDir.normalize(); + real dp = userDir*orthDir; + if(dp<0) + userDir = userDir*(-1.f); + stripDir = userDir; + } + + //direction and orthogonal vector to the previous segment + Vec2r dirPrev(p-pPrev); + float dirPrevNorm=dirPrev.norm(); + dirPrev.normalize(); + Vec2r orthDirPrev(-dirPrev[1], dirPrev[0]); + Vec2r stripDirPrev = orthDirPrev; + if(svPrev->attribute().isAttributeAvailableVec2f("orientation")){ + Vec2r userDir = svPrev->attribute().getAttributeVec2f("orientation"); + userDir.normalize(); + real dp = userDir*orthDir; + if(dp<0) + userDir = userDir*(-1.f); + stripDirPrev = userDir; + } + + const float *thickness = sv->attribute().getThickness(); + _averageThickness+=thickness[0]+thickness[1]; + Vec2r pInter; + int interResult; + + interResult=GeomUtils::intersect2dLine2dLine(Vec2r(pPrev+thickness[1]*stripDirPrev), Vec2r(p+thickness[1]*stripDirPrev), + Vec2r(p+thickness[1]*stripDir), Vec2r(p2+thickness[1]*stripDir), + pInter); + + if (interResult==GeomUtils::DO_INTERSECT) + _vertices.push_back(new StrokeVertexRep(pInter)); + else + _vertices.push_back(new StrokeVertexRep(p+thickness[1]*stripDir)); + ++i; + + interResult=GeomUtils::intersect2dLine2dLine(Vec2r(pPrev-thickness[0]*stripDirPrev), Vec2r(p-thickness[0]*stripDirPrev), + Vec2r(p-thickness[0]*stripDir), Vec2r(p2-thickness[0]*stripDir), + pInter); + if (interResult==GeomUtils::DO_INTERSECT) + _vertices.push_back(new StrokeVertexRep(pInter)); + else + _vertices.push_back(new StrokeVertexRep(p-thickness[0]*stripDir)); + ++i; + + // if the angle is obtuse, we simply average the directions to avoid the singularity + stripDir=stripDir+stripDirPrev; + if ((dirNormpoint2d()-p); + if ((vec_tmp.norm() > thickness[1]*MAX_RATIO_LENGTH_SINGU) || + (dirNormpoint2d()) + || (fabs(stripDir * dir) < EPS_SINGULARITY_RENDERER)) + _vertices[i-2]->setPoint2d(p+thickness[1]*stripDir); + + vec_tmp = _vertices[i-1]->point2d()-p; + if ((vec_tmp.norm() > thickness[1]*MAX_RATIO_LENGTH_SINGU) || + (dirNormpoint2d()) + || (fabs(stripDir * dir)setPoint2d(p-thickness[0]*stripDir); + + vPrev=v; + } // end of for + + //special case of last vertex + sv=*v; + sv2=*vPrev; + dir=Vec2r (sv->getPoint()-sv2->getPoint()); + orthDir=Vec2r(-dir[1], dir[0]); + if (orthDir.norm() > ZERO) + orthDir.normalize(); + const float *thicknessLast = sv->attribute().getThickness(); + _vertices.push_back(new StrokeVertexRep(sv->getPoint()+thicknessLast[1]*orthDir)); + ++i; + _vertices.push_back(new StrokeVertexRep(sv->getPoint()-thicknessLast[0]*orthDir)); + int n = i; + ++i; + + // check whether the orientation + // was user defined + if(sv->attribute().isAttributeAvailableVec2f("orientation")){ + Vec2r userDir = sv->attribute().getAttributeVec2f("orientation"); + userDir.normalize(); + Vec2r t(orthDir[1], -orthDir[0]); + real dp1 = userDir*orthDir; + real dp2 = userDir*t; + real h = (thicknessLast[1]+thicknessLast[0])/dp1; + real x = fabs(h*dp2/2.0); + if(dp1>0){ + //i'm in the upper part of the unit circle + if(dp2>0){ + //i'm in the upper-right part of the unit circle + // i must move vertex n-1 + _vertices[n-1]->setPoint2d(_vertices[n]->point2d()-userDir*(h)); + //_vertices[n-1]->setPoint2d(_vertices[n-1]->point2d()+t*x); + //_vertices[n]->setPoint2d(_vertices[n]->point2d()-t*x); + }else{ + //i'm in the upper-left part of the unit circle + // i must move vertex n + _vertices[n]->setPoint2d(_vertices[n-1]->point2d()+userDir*(h)); + //_vertices[n-1]->setPoint2d(_vertices[n-1]->point2d()-t*x); + //_vertices[n]->setPoint2d(_vertices[n]->point2d()+t*x); + } + }else{ + //i'm in the lower part of the unit circle + if(dp2>0){ + //i'm in the lower-right part of the unit circle + // i must move vertex n + _vertices[n]->setPoint2d(_vertices[n-1]->point2d()-userDir*(h)); + //_vertices[n-1]->setPoint2d(_vertices[n-1]->point2d()-t*x); + //_vertices[n]->setPoint2d(_vertices[n]->point2d()+t*x); + }else{ + //i'm in the lower-left part of the unit circle + // i must move vertex n-1 + _vertices[n-1]->setPoint2d(_vertices[n]->point2d()+userDir*(h)); + //_vertices[n-1]->setPoint2d(_vertices[n-1]->point2d()+t*x); + //_vertices[n]->setPoint2d(_vertices[n]->point2d()-t*x); + } + } + } + + + // check whether the orientation of the extremity + // was user defined + // userDir = _stroke->getEndingOrientation(); + // if(userDir != Vec2r(0,0)){ + // userDir.normalize(); + // real o1 = (orthDir*userDir); + // real o2 = crossP(orthDir,userDir); + // real orientation = o1 * o2; + // if(orientation > 0){ + // // then the vertex to move is vn + // if(o1 < 0) + // _vertex[n]=_vertex[n-1]+userDir; + // else + // _vertex[n]=_vertex[n-1]-userDir; + // } + // if(orientation < 0){ + // // then we must move vn-1 + // if(o1 > 0) + // _vertex[n-1]=_vertex[n]+userDir; + // else + // _vertex[n-1]=_vertex[n]-userDir; + // } + // } + + _averageThickness/=float(iStrokeVertices.size()-2); + //I did not use the first and last vertex for the average + if (iStrokeVertices.size()<3) + _averageThickness=0.5*(thicknessLast[1]+thicknessLast[0]+thickness[0]+thickness[1]); + + if (i!=2*iStrokeVertices.size()) + cerr << "Warning: problem with stripe size\n"; + + cleanUpSingularities (iStrokeVertices); +} + +// CLEAN UP +///////////////////////// + +void +Strip::cleanUpSingularities (const vector& iStrokeVertices) +{ + int k; + unsigned sizeStrip = _vertices.size(); + + for (k=0; kpoint2d())) + { + cerr << "Warning: strip vertex " << k << " non valid" << endl; + return; + } + + //return; + if (iStrokeVertices.size()<2) return; + int i=0, j; + vector::const_iterator v ,vend, v2, vPrev; + StrokeVertex *sv, *sv2, *svPrev; + + bool singu1=false, singu2=false; + int timeSinceSingu1=0, timeSinceSingu2=0; + + //special case of first vertex + v=iStrokeVertices.begin(); + for(vend=iStrokeVertices.end(); + v!=vend; + v++) + { + v2=v; ++v2; + if (v2==vend) break; + sv= (*v); sv2 = (*v2); + Vec2r p(sv->getPoint()), p2(sv2->getPoint()); + + Vec2r dir(p2-p); + if (dir.norm() > ZERO) + dir.normalize(); + Vec2r dir1, dir2; + dir1=_vertices[2*i+2]->point2d()-_vertices[2*i]->point2d(); + dir2=_vertices[2*i+3]->point2d()-_vertices[2*i+1]->point2d(); + + if ((dir1 * dir) < -ZERO) + { + singu1=true; + timeSinceSingu1++; + } + else + { + if (singu1) + { + int toto=i-timeSinceSingu1; + if (toto<0) + cerr << "Stephane dit \"Toto\"" << endl; + //traverse all the vertices of the singularity and average them + Vec2r avP(0.0,0.0); + for (j=i-timeSinceSingu1; jpoint2d()); + avP=Vec2r(1.0/float(timeSinceSingu1+1)*avP); + for (j=i-timeSinceSingu1; jsetPoint2d(avP); + //_vertex[2*j]=_vertex[2*i]; + singu1=false; timeSinceSingu1=0; + } + } + if ((dir2 * dir) < -ZERO) + { + singu2=true; + timeSinceSingu2++; + } + else + { + if (singu2) + { + int toto=i-timeSinceSingu2; + if (toto<0) + cerr << "Stephane dit \"Toto\"" << endl; + //traverse all the vertices of the singularity and average them + Vec2r avP(0.0,0.0); + for (j=i-timeSinceSingu2; jpoint2d()); + avP=Vec2r(1.0/float(timeSinceSingu2+1)*avP); + for (j=i-timeSinceSingu2; jsetPoint2d(avP); + //_vertex[2*j+1]=_vertex[2*i+1]; + singu2=false; timeSinceSingu2=0; + } + } + i++; + } + + if (singu1) + { + //traverse all the vertices of the singularity and average them + Vec2r avP(0.0,0.0); + for (int j=i-timeSinceSingu1; jpoint2d()); + avP=Vec2r(1.0/float(timeSinceSingu1)*avP); + for (j=i-timeSinceSingu1; jsetPoint2d(avP); + } + if (singu2) + { + //traverse all the vertices of the singularity and average them + Vec2r avP(0.0,0.0); + for (j=i-timeSinceSingu2; jpoint2d()); + avP=Vec2r(1.0/float(timeSinceSingu2)*avP); + for (j=i-timeSinceSingu2; jsetPoint2d(avP); + } + + + for (k=0; kpoint2d())) + { + cerr << "Warning: strip vertex " << k << " non valid after cleanup"<& iStrokeVertices) +{ + vector::const_iterator v ,vend; + StrokeVertex *sv; + int i=0; + for(v=iStrokeVertices.begin(), vend=iStrokeVertices.end(); + v!=vend; v++) + { + sv= (*v); + _vertices[i]->setTexCoord(Vec2r((real)(sv->curvilinearAbscissa() / _averageThickness),0)); + _vertices[i]->setColor(Vec3r(sv->attribute().getColor()[0],sv->attribute().getColor()[1],sv->attribute().getColor()[2])); + _vertices[i]->setAlpha(sv->attribute().getAlpha()); + i++; + _vertices[i]->setTexCoord(Vec2r((real)(sv->curvilinearAbscissa() / _averageThickness),1)); + _vertices[i]->setColor(Vec3r(sv->attribute().getColor()[0],sv->attribute().getColor()[1],sv->attribute().getColor()[2])); + _vertices[i]->setAlpha(sv->attribute().getAlpha()); + i++; + // cerr<<"col=("<attribute().getColor()[0]<<", " + // <attribute().getColor()[1]<<", "<attribute().getColor()[2]<<")"<& iStrokeVertices, bool tipBegin, bool tipEnd) +{ + unsigned int sizeStrip = _vertices.size()+8; //for the transition between the tip and the body + vector::const_iterator v ,vend; + StrokeVertex *sv; + + v=iStrokeVertices.begin(); + vend=iStrokeVertices.end(); + float l=(*v)->strokeLength()/_averageThickness; + int tiles=int(l); + float fact=(float(tiles)+0.5)/l; + float uTip2=float(tiles)+0.25; + float u=0; + float uPrev; + int i=0; + float t; + StrokeVertexRep *tvRep1, *tvRep2; + + // cerr<<"l="< 4*_averageThickness) + // cerr << "Warning (from Fredo): There is a pb in the texture coordinates computation" << endl; +} + +// +// StrokeRep +///////////////////////////////////// + +StrokeRep::StrokeRep() +{ + _stroke = 0; + _strokeType=Stroke::OPAQUE_MEDIUM; + TextureManager * ptm = TextureManager::getInstance(); + if(ptm) + _textureId = ptm->getDefaultTextureId(); + // _averageTextureAlpha=0.5; //default value + // if (_strokeType==OIL_STROKE) + // _averageTextureAlpha=0.75; + // if (_strokeType>=NO_BLEND_STROKE) + // _averageTextureAlpha=1.0 +} + +StrokeRep::StrokeRep(Stroke *iStroke) +{ + _stroke = iStroke; + _strokeType = iStroke->getMediumType(); + _textureId = iStroke->getTextureId(); + if(_textureId == 0){ + TextureManager * ptm = TextureManager::getInstance(); + if(ptm) + _textureId = ptm->getDefaultTextureId(); + } + + // _averageTextureAlpha=0.5; //default value + // if (_strokeType==OIL_STROKE) + // _averageTextureAlpha=0.75; + // if (_strokeType>=NO_BLEND_STROKE) + // _averageTextureAlpha=1.0; + create(); +} + +StrokeRep::StrokeRep(const StrokeRep& iBrother) +{ + int i=0; + _stroke = iBrother._stroke; + _strokeType=iBrother._strokeType; + _textureId = iBrother._textureId; + for(vector::const_iterator s=iBrother._strips.begin(), send=iBrother._strips.end(); + s!=send; + ++s){ + _strips.push_back(new Strip(**s)); + } +} + + +StrokeRep::~StrokeRep() +{ + if(!_strips.empty()){ + for(vector::iterator s=_strips.begin(), send=_strips.end(); + s!=send; + ++s){ + delete (*s); + } + _strips.clear(); + } +} + +void StrokeRep::create(){ + vector strip; + StrokeInternal::StrokeVertexIterator v = _stroke->strokeVerticesBegin(); + StrokeInternal::StrokeVertexIterator vend = _stroke->strokeVerticesEnd(); + + bool first=true; + bool end=false; + while(v!=vend){ + while((v!=vend) && (!(*v).attribute().isVisible())){ + ++v; + first = false; + } + while( (v!=vend) && ((*v).attribute().isVisible()) ) { + strip.push_back(&(*v)); + ++v; + } + if(v!=vend){ + // add the last vertex and create + strip.push_back(&(*v)); + }else{ + end=true; + } + if((!strip.empty()) && (strip.size()>1) ){ + _strips.push_back(new Strip(strip, _stroke->hasTips(), first, end)); + strip.clear(); + } + first = false; + } +} + +void StrokeRep::Render(const StrokeRenderer *iRenderer) +{ + iRenderer->RenderStrokeRep(this); +} + + + diff --git a/extern/freestyle/src/stroke/StrokeRep.h b/extern/freestyle/src/stroke/StrokeRep.h new file mode 100755 index 00000000000..129769e5489 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeRep.h @@ -0,0 +1,138 @@ +// +// Filename : StrokeRep.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the representation of a stroke +// (for display purpose) +// Date of creation : 05/03/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKEREP_H +# define STROKEREP_H + +# include "../geometry/Geom.h" +using namespace Geometry; + +//symbolic constant to call the appropriate renderers and textures +// # define NO_TEXTURE_WITH_BLEND_STROKE -2 +// # define NO_TEXTURE_STROKE -1 +// # define PSEUDO_CHARCOAL_STROKE 0 +// # define WASH_BRUSH_STROKE 1 +// # define OIL_STROKE 2 +// # define NO_BLEND_STROKE 3 +// # define CHARCOAL_MIN_STROKE 4 +// # define BRUSH_MIN_STROKE 5 +// # define OPAQUE_DRY_STROKE 6 +// # define OPAQUE_STROKE 7 +// +// # define DEFAULT_STROKE 0 +// +// # define NUMBER_STROKE_RENDERER 8 + +#include "Stroke.h" + +class StrokeVertexRep{ +public: + StrokeVertexRep(){} + StrokeVertexRep(const Vec2r& iPoint2d){_point2d=iPoint2d;} + StrokeVertexRep(const StrokeVertexRep& iBrother); + virtual ~StrokeVertexRep(){} + + inline Vec2r& point2d() {return _point2d;} + inline Vec2r& texCoord() {return _texCoord;} + inline Vec3r& color() {return _color;} + inline float alpha() {return _alpha;} + + inline void setPoint2d(const Vec2r& p){_point2d = p;} + inline void setTexCoord(const Vec2r& p){_texCoord = p;} + inline void setColor(const Vec3r& p){_color = p;} + inline void setAlpha(float a){_alpha = a;} +protected: + Vec2r _point2d; + Vec2r _texCoord; + Vec3r _color; + float _alpha; +}; + +class Strip{ +public: + typedef std::vector vertex_container; +protected: + vertex_container _vertices; + float _averageThickness; + + +public: + Strip(const std::vector& iStrokeVertices, bool hasTips=false, bool tipBegin=false, bool tipEnd=false) ; + Strip(const Strip& iBrother); + virtual ~Strip() ; + +protected: + void createStrip(const std::vector& iStrokeVertices); + void cleanUpSingularities(const std::vector& iStrokeVertices); + void computeTexCoord (const std::vector& iStrokeVertices); + void computeTexCoordWithTips (const std::vector& iStrokeVertices, bool tipBegin, bool tipEnd); +public: + inline int sizeStrip() const {return _vertices.size();} + inline vertex_container& vertices() {return _vertices;} +}; + +class StrokeRep +{ +protected: + Stroke *_stroke; + vector _strips; + Stroke::MediumType _strokeType; + unsigned int _textureId; + + // float _averageTextureAlpha; + + +public: + StrokeRep(); + StrokeRep(const StrokeRep&); + StrokeRep(Stroke *iStroke); + virtual ~StrokeRep(); + + /*! Creates the strips */ + virtual void create() ; + + /*! Renders the stroke using a Renderer */ + virtual void Render(const StrokeRenderer *iRenderer) ; + + /*! accessors */ + inline Stroke::MediumType getMediumType() const {return _strokeType;} + inline unsigned getTextureId() const {return _textureId;} + inline vector& getStrips() {return _strips;} + inline unsigned int getNumberOfStrips() const {return _strips.size();} + inline Stroke * getStroke() {return _stroke;} + + /*! modifiers */ + inline void setMediumType(Stroke::MediumType itype) {_strokeType=itype;} + inline void SetTextureId(unsigned textureId) {_textureId = textureId;} + + +}; + +#endif // STROKEREP_H diff --git a/extern/freestyle/src/stroke/StrokeShader.h b/extern/freestyle/src/stroke/StrokeShader.h new file mode 100755 index 00000000000..fa1289f6e0f --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeShader.h @@ -0,0 +1,119 @@ +// +// Filename : StrokeShader.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class defining StrokeShader +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SHADERS_H +# define SHADERS_H + +# include +# include + +// +// StrokeShader base class +// +////////////////////////////////////////////////////// + +class Stroke; +/*! Base class for Stroke Shaders. + * Any Stroke Shader must inherit from + * this class and overload the shade() method. + * A StrokeShader is designed to modify any + * Stroke's attribute such as Thickness, Color, + * Geometry, Texture, Blending mode... + * The basic way to achieve this operation consists + * in iterating over the StrokeVertices of the Stroke + * and to modify each one's StrokeAttribute. + * Here is a python code example of such an iteration: + * \code + * it = ioStroke.strokeVerticesBegin() + * while it.isEnd() == 0: + * att = it.getObject().attribute() + * ## perform here any attribute modification + * it.increment() + * \endcode + * Here is a C++ code example of such an iteration: + * \code + * for(StrokeInternal::StrokeVertexIterator v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); + * v!=vend; + * ++v){ + * StrokeAttribute& att = v->attribute(); + * // perform any attribute modification here... + * } + * \endcode + */ +class LIB_STROKE_EXPORT StrokeShader +{ +public: + /*! Default constructor. */ + StrokeShader() {} + /*! Destructor. */ + virtual ~StrokeShader() {} + /*! Returns the string corresponding to the + * shader's name. + */ + virtual string getName() const { + return "StrokeShader"; + } + /*! The shading method. This method must + * be overloaded by inherited classes. + * The shading method is designed to modify any + * Stroke's attribute such as Thickness, Color, + * Geometry, Texture, Blending mode... + * The basic way to achieve this operation consists + * in iterating over the StrokeVertices of the Stroke + * and to modify each one's StrokeAttribute. + * Here is a python code example of such an iteration: + * \code + * it = ioStroke.strokeVerticesBegin() + * while it.isEnd() == 0: + * att = it.getObject().attribute() + * ## perform here any attribute modification + * it.increment() + * \endcode + * Here is a C++ code example of such an iteration: + * \code + * for(StrokeInternal::StrokeVertexIterator v=ioStroke.strokeVerticesBegin(), vend=ioStroke.strokeVerticesEnd(); + * v!=vend; + * ++v){ + * StrokeAttribute& att = v->attribute(); + * // perform any attribute modification here... + * } + * \endcode + * \param ioStroke + * The stroke we wish to shade. this Stroke + * is modified by the Shader (which typically + * modifies the Stroke's attribute's values such + * as Color, Thickness, Geometry...) + */ + virtual void shade(Stroke& ioStroke) const { + cerr << "Warning: method shade() not implemented" << endl; + } + +}; + +# endif // SHADERS_H diff --git a/extern/freestyle/src/stroke/StrokeTesselator.cpp b/extern/freestyle/src/stroke/StrokeTesselator.cpp new file mode 100755 index 00000000000..6d0f5aa847c --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeTesselator.cpp @@ -0,0 +1,88 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../scene_graph/OrientedLineRep.h" +#include "../scene_graph/NodeGroup.h" +#include "../scene_graph/NodeShape.h" +#include "StrokeTesselator.h" +#include "StrokeAdvancedIterators.h" + +LineRep* StrokeTesselator::Tesselate(Stroke *iStroke) +{ + if(0 == iStroke) + return 0; + + LineRep* line; + line = new OrientedLineRep(); + + Stroke::vertex_iterator v,vend; + if(2 == iStroke->vertices_size()) + { + line->SetStyle(LineRep::LINES); + v = iStroke->vertices_begin(); + StrokeVertex *svA= (*v); + v++; + StrokeVertex *svB = (*v); + Vec3r A((*svA)[0], (*svA)[1], 0); + Vec3r B((*svB)[0], (*svB)[1], 0); + line->AddVertex(A); + line->AddVertex(B); + } + else + { + if(_overloadMaterial) + line->SetMaterial(_Material); + + line->SetStyle(LineRep::LINE_STRIP); + + for(v=iStroke->vertices_begin(), vend=iStroke->vertices_end(); + v!=vend; + v++) + { + StrokeVertex *sv= (*v); + Vec3r V((*sv)[0], (*sv)[1], 0); + line->AddVertex(V); + } + } + line->SetId(iStroke->getId()); + line->ComputeBBox(); + + return line; +} + +template +NodeGroup* StrokeTesselator::Tesselate(StrokeVertexIterator begin, StrokeVertexIterator end) +{ + NodeGroup *group = new NodeGroup; + NodeShape *tshape = new NodeShape; + group->AddChild(tshape); + //tshape->material().SetDiffuse(0.f, 0.f, 0.f, 1.f); + tshape->SetMaterial(_Material); + + for(StrokeVertexIterator c=begin, cend=end; + c!=cend; + c++) + { + tshape->AddRep(Tesselate((*c))); + } + + return group; +} diff --git a/extern/freestyle/src/stroke/StrokeTesselator.h b/extern/freestyle/src/stroke/StrokeTesselator.h new file mode 100755 index 00000000000..767d82d3d98 --- /dev/null +++ b/extern/freestyle/src/stroke/StrokeTesselator.h @@ -0,0 +1,67 @@ +// +// Filename : StrokeTesselator.h +// Author(s) : Stephane Grabli +// Purpose : Class to build a Node Tree designed to be displayed +// from a set of strokes structure. +// Date of creation : 26/03/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STROKETESSELATOR_H +# define STROKETESSELATOR_H + +# include "../scene_graph/LineRep.h" +# include "Stroke.h" + +class StrokeTesselator +{ +public: + + inline StrokeTesselator() {_Material.SetDiffuse(0,0,0,1);_overloadMaterial=false;} + virtual ~StrokeTesselator() {} + + /*! Builds a line rep contained from a Stroke + */ + LineRep* Tesselate(Stroke* iStroke) ; + + /*! Builds a set of lines rep contained under a + * a NodeShape, itself contained under a NodeGroup from a + * set of strokes + */ + template + NodeGroup* Tesselate(StrokeIterator begin, StrokeIterator end) ; + + + + inline void SetMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} + inline const Material& material() const {return _Material;} + +private: + + Material _Material; + bool _overloadMaterial; +}; + +#endif // STROKETESSELATOR_H + diff --git a/extern/freestyle/src/stroke/StyleModule.h b/extern/freestyle/src/stroke/StyleModule.h new file mode 100755 index 00000000000..3d39e53515b --- /dev/null +++ b/extern/freestyle/src/stroke/StyleModule.h @@ -0,0 +1,144 @@ +// +// Filename : StyleModule.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Class representing a style module +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STYLE_MODULE_H +# define STYLE_MODULE_H + +# include +# include +# include "../system/StringUtils.h" +# include "StrokeLayer.h" +# include "../system/Interpreter.h" +# include "Operators.h" +# include "StrokeShader.h" + +using namespace std; + +class StyleModule +{ +public: + + StyleModule(const string& file_name, + Interpreter* inter) : _file_name(file_name) { + _always_refresh = false; + _causal = false; + _drawable = true; + _modified = true; + _displayed = true; + _inter = inter; + } + + ~StyleModule() {} + + StrokeLayer* execute() { + if (!_inter) { + cerr << "Error: no interpreter was found to execute the script" << endl; + return NULL; + } + Operators::reset(); + if (_inter->interpretFile(_file_name)) + return NULL; + Operators::StrokesContainer* strokes_set = Operators::getStrokesSet(); + if (!_drawable || strokes_set->empty()) + return NULL; + StrokeLayer* sl = new StrokeLayer; + for (Operators::StrokesContainer::iterator it = strokes_set->begin(); + it != strokes_set->end(); + ++it) + sl->AddStroke(*it); + + return sl; + } + + // accessors + + const string getFileName() const { + return _file_name; + } + + bool getAlwaysRefresh() const { + return _always_refresh; + } + + bool getCausal() const { + return _causal; + } + + bool getDrawable() const { + return _drawable; + } + + bool getModified() const { + return _modified; + } + + bool getDisplayed() const { + return _displayed; + } + + // modifiers + + void setFileName(const string& file_name) { + _file_name = file_name; + } + + void setAlwaysRefresh(bool b = true) { + _always_refresh = b; + } + + void setCausal(bool b = true) { + _causal = b; + } + + void setDrawable(bool b = true) { + _drawable = b; + } + + void setModified(bool b = true) { + if (_always_refresh) + return; + _modified = b; + } + + void setDisplayed(bool b = true) { + _displayed = b; + } + +private: + + string _file_name; + bool _always_refresh; + bool _causal; + bool _drawable; + bool _modified; + bool _displayed; + Interpreter* _inter; +}; + +#endif // STYLE_MODULE_H diff --git a/extern/freestyle/src/stroke/TextStrokeRenderer.cpp b/extern/freestyle/src/stroke/TextStrokeRenderer.cpp new file mode 100755 index 00000000000..ea5af287bbe --- /dev/null +++ b/extern/freestyle/src/stroke/TextStrokeRenderer.cpp @@ -0,0 +1,73 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "TextStrokeRenderer.h" +# include "Canvas.h" +# include "StrokeIterators.h" + +TextStrokeRenderer::TextStrokeRenderer(const char* iFileName) +:StrokeRenderer(){ + if(!iFileName) + iFileName = "freestyle.txt"; + // open the stream: + _ofstream.open(iFileName, ios::out); + if(!_ofstream.is_open()){ + cerr << "couldn't open the output file " << iFileName << endl; + } + _ofstream << "%!FREESTYLE" << endl; + _ofstream << "%Creator: Freestyle (http://artis.imag.fr/Software/Freestyle)" << endl; + // Bounding box + _ofstream << 0 << " "<< 0 << " " << Canvas::getInstance()->width() << " " << Canvas::getInstance()->height() << endl; + _ofstream << "%u x y z tleft tright r g b ..." << endl; +} + +TextStrokeRenderer::~TextStrokeRenderer(){ + Close(); +} + +void TextStrokeRenderer::RenderStrokeRep(StrokeRep *iStrokeRep) const{ + RenderStrokeRepBasic(iStrokeRep); +} + +void TextStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const{ + Stroke *stroke = iStrokeRep->getStroke(); + if(!stroke){ + cerr << "no stroke associated with Rep" << endl; + return; + } + + StrokeInternal::StrokeVertexIterator v = stroke->strokeVerticesBegin(); + StrokeAttribute att; + while(!v.isEnd()){ + att = v->attribute(); + _ofstream << v->u() << " " << v->getProjectedX() << " " << v->getProjectedY() << " " << v->getProjectedZ() << " " \ + << att.getThicknessL() << " " << att.getThicknessR() << " " \ + << att.getColorR() << " " << att.getColorG() << " " << att.getColorB() << " "; + ++v; + } + _ofstream << endl; +} + +void TextStrokeRenderer::Close(){ + if(_ofstream.is_open()) + _ofstream.close(); +} + diff --git a/extern/freestyle/src/stroke/TextStrokeRenderer.h b/extern/freestyle/src/stroke/TextStrokeRenderer.h new file mode 100755 index 00000000000..ef610d63bdd --- /dev/null +++ b/extern/freestyle/src/stroke/TextStrokeRenderer.h @@ -0,0 +1,68 @@ +// +// Filename : TextStrokeRenderer.h +// Author(s) : Stephane Grabli +// Purpose : Class to define the text rendering of a stroke +// Format: +// x y width height // bbox +// //list of vertices : +// t x y z t1 t2 r g b alpha ... +// ... +// Date of creation : 01/14/2005 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef TEXTSTROKERENDERER_H +# define TEXTSTROKERENDERER_H + +# include "../system/FreestyleConfig.h" +# include "StrokeRenderer.h" +# include + +/**********************************/ +/* */ +/* */ +/* TextStrokeRenderer */ +/* */ +/* */ +/**********************************/ + +class LIB_STROKE_EXPORT TextStrokeRenderer : public StrokeRenderer +{ +public: + TextStrokeRenderer(const char * iFileName = 0); + virtual ~TextStrokeRenderer(); + + /*! Renders a stroke rep */ + virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const; + virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const; + + /*! Closes the output file */ + void Close(); + +protected: + mutable ofstream _ofstream; +}; + +#endif // TEXTSTROKERENDERER_H + diff --git a/extern/freestyle/src/stroke/src.pri b/extern/freestyle/src/stroke/src.pri new file mode 100755 index 00000000000..09707f86dbc --- /dev/null +++ b/extern/freestyle/src/stroke/src.pri @@ -0,0 +1,54 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +STROKE_DIR = ../stroke + +SOURCES *= $${STROKE_DIR}/AdvancedFunctions0D.cpp \ + $${STROKE_DIR}/AdvancedFunctions1D.cpp \ + $${STROKE_DIR}/AdvancedStrokeShaders.cpp \ + $${STROKE_DIR}/BasicStrokeShaders.cpp \ + $${STROKE_DIR}/Canvas.cpp \ + $${STROKE_DIR}/Chain.cpp \ + $${STROKE_DIR}/ChainingIterators.cpp \ + $${STROKE_DIR}/ContextFunctions.cpp \ + $${STROKE_DIR}/Operators.cpp \ + $${STROKE_DIR}/PSStrokeRenderer.cpp \ + $${STROKE_DIR}/Stroke.cpp \ + $${STROKE_DIR}/StrokeIO.cpp \ + $${STROKE_DIR}/StrokeLayer.cpp \ + $${STROKE_DIR}/StrokeRenderer.cpp \ + $${STROKE_DIR}/StrokeRep.cpp \ + $${STROKE_DIR}/StrokeTesselator.cpp \ + $${STROKE_DIR}/TextStrokeRenderer.cpp \ + $${STROKE_DIR}/Curve.cpp + +HEADERS *= $${STROKE_DIR}/AdvancedFunctions0D.h \ + $${STROKE_DIR}/AdvancedFunctions1D.h \ + $${STROKE_DIR}/AdvancedPredicates1D.h \ + $${STROKE_DIR}/AdvancedStrokeShaders.h \ + $${STROKE_DIR}/BasicStrokeShaders.h \ + $${STROKE_DIR}/Canvas.h \ + $${STROKE_DIR}/Chain.h \ + $${STROKE_DIR}/ChainingIterators.h \ + $${STROKE_DIR}/ContextFunctions.h \ + $${STROKE_DIR}/Curve.h \ + $${STROKE_DIR}/CurveIterators.h \ + $${STROKE_DIR}/CurveAdvancedIterators.h \ + $${STROKE_DIR}/Module.h \ + $${STROKE_DIR}/Operators.h \ + $${STROKE_DIR}/Predicates1D.h \ + $${STROKE_DIR}/Predicates0D.h \ + $${STROKE_DIR}/PSStrokeRenderer.h \ + $${STROKE_DIR}/Stroke.h \ + $${STROKE_DIR}/StrokeIO.h \ + $${STROKE_DIR}/StrokeIterators.h \ + $${STROKE_DIR}/StrokeAdvancedIterators.h \ + $${STROKE_DIR}/StrokeShader.h \ + $${STROKE_DIR}/StrokeLayer.h \ + $${STROKE_DIR}/StrokeRenderer.h \ + $${STROKE_DIR}/StrokeRep.h \ + $${STROKE_DIR}/StrokeTesselator.h \ + $${STROKE_DIR}/StyleModule.h \ + $${STROKE_DIR}/TextStrokeRenderer.h diff --git a/extern/freestyle/src/stroke/stroke.pro b/extern/freestyle/src/stroke/stroke.pro new file mode 100755 index 00000000000..90c0cc96592 --- /dev/null +++ b/extern/freestyle/src/stroke/stroke.pro @@ -0,0 +1,89 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_STROKE} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll + +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_STROKE_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../geometry ../image ../system ../view_map \ +# ../winged_edge ../scene_graph + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# LIBS +# +####################################### + +win32:LIBS *= $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_IMAGE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SCENE_GRAPH}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_WINGED_EDGE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_VIEW_MAP}$${LIBVERSION}.lib + +!win32 { + lib_bundle { + LIBS += -F$${DESTDIR} -framework $${LIB_GEOMETRY} -framework $${LIB_IMAGE} -framework $${LIB_SCENE_GRAPH} -framework $${LIB_SYSTEM} -framework $${LIB_WINGED_EDGE} -framework $${LIB_VIEW_MAP} + } else { + LIBS *= -L$${DESTDIR} -l$${LIB_GEOMETRY} -l$${LIB_IMAGE} -l$${LIB_SCENE_GRAPH} \ + -l$${LIB_SYSTEM} -l$${LIB_WINGED_EDGE} -l$${LIB_VIEW_MAP} + } +} + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + + +!static { + include(src.pri) +} diff --git a/extern/freestyle/src/swig/Freestyle.i b/extern/freestyle/src/swig/Freestyle.i new file mode 100755 index 00000000000..37daddc4e11 --- /dev/null +++ b/extern/freestyle/src/swig/Freestyle.i @@ -0,0 +1,283 @@ +// +// FileName : Freestyle.i +// Author : Emmanuel Turquin +// Purpose : SWIG file used to generate Python binding +// Date Of Creation : 18/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + + + +%module(directors="1") Freestyle +%{ + #include "../system/Cast.h" + #include "../stroke/Module.h" + #include "../system/Precision.h" + #include "../system/Id.h" + #include "../geometry/VecMat.h" + #include "../geometry/Geom.h" + #include "../geometry/Noise.h" + #include "../scene_graph/Material.h" + #include "../winged_edge/Nature.h" + #include "../view_map/Interface0D.h" + #include "../view_map/Interface1D.h" + #include "../view_map/Functions0D.h" + #include "../view_map/Functions1D.h" + #include "../view_map/Silhouette.h" + #include "../view_map/ViewMap.h" + #include "../view_map/ViewMapIterators.h" + #include "../stroke/AdvancedFunctions0D.h" + #include "../stroke/AdvancedFunctions1D.h" + #include "../stroke/ChainingIterators.h" + #include "../stroke/ContextFunctions.h" + #include "../stroke/Predicates0D.h" + #include "../stroke/Predicates1D.h" + #include "../stroke/AdvancedPredicates1D.h" + #include "../stroke/StrokeShader.h" +// #include "../stroke/Curve.h" + #include "../stroke/CurveIterators.h" + #include "../stroke/Stroke.h" + #include "../stroke/StrokeIterators.h" + #include "../stroke/BasicStrokeShaders.h" + #include "../stroke/AdvancedStrokeShaders.h" + #include "../stroke/Operators.h" + #include "../stroke/Canvas.h" +%} + +%include "stl.i" +%template(vectorInt) std::vector; + +#ifdef SWIG +# define LIB_GEOMETRY_EXPORT +# define LIB_VIEW_MAP_EXPORT +# define LIB_STROKE_EXPORT +# define LIB_GEOMETRY_EXPORT +#endif // SWIG + +// Generic exception handler +%exception { + try { + $action + } +// catch (Swig::DirectorTypeMismatch&) { +// cout << "Warning: return type mismatch" << endl; +// } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } +} + +// Precision +%include "../system/Precision.h" + +// Id +%include "../system/Id.h" + +// Vec +%include "../geometry/VecMat.h" + +%template(Vec_2u) VecMat::Vec; +%template(Vec_2i) VecMat::Vec; +%template(Vec_2d) VecMat::Vec; +%template(Vec_2f) VecMat::Vec; + +%template(Vec2u) VecMat::Vec2; +%template(Vec2i) VecMat::Vec2; +%template(Vec2f) VecMat::Vec2; +%template(Vec2d) VecMat::Vec2; + +%template(Vec_3u) VecMat::Vec; +%template(Vec_3i) VecMat::Vec; +%template(Vec_3d) VecMat::Vec; +%template(Vec_3f) VecMat::Vec; + +%template(Vec3u) VecMat::Vec3; +%template(Vec3i) VecMat::Vec3; +%template(Vec3f) VecMat::Vec3; +%template(Vec3d) VecMat::Vec3; + +//%template(HVec3u) VecMat::HVec3; +//%template(HVec3i) VecMat::HVec3; +//%template(HVec3f) VecMat::HVec3; +//%template(HVec3d) VecMat::HVec3; +//%template(HVec3r) VecMat::HVec3; + +//%template(Matrix22u) VecMat::SquareMatrix; +//%template(Matrix22i) VecMat::SquareMatrix; +//%template(Matrix22f) VecMat::SquareMatrix; +//%template(Matrix22d) VecMat::SquareMatrix; + +//%template(Matrix22r) VecMat::SquareMatrix; +//%template(Matrix33u) VecMat::SquareMatrix; +//%template(Matrix33i) VecMat::SquareMatrix; +//%template(Matrix33f) VecMat::SquareMatrix; +//%template(Matrix33d) VecMat::SquareMatrix; +//%template(Matrix33r) VecMat::SquareMatrix; + +//%template(Matrix44u) VecMat::SquareMatrix; +//%template(Matrix44i) VecMat::SquareMatrix; +//%template(Matrix44f) VecMat::SquareMatrix; +//%template(Matrix44d) VecMat::SquareMatrix; +//%template(Matrix44r) VecMat::SquareMatrix; + +%include "../geometry/Geom.h" + +// Noise +%include "../geometry/Noise.h" + +// Material +%include "../scene_graph/Material.h" + +// ViewMap Components +%include "../winged_edge/Nature.h" + +%rename(getObject) Interface0DIterator::operator*; +%rename(getObject) Interface0DIteratorNested::operator*; +%include "../view_map/Interface0D.h" + +%include "../view_map/Interface1D.h" +%template(integrateUnsigned) integrate; +%template(integrateFloat) integrate; +%template(integrateDouble) integrate; +//%template(integrateReal) integrate; + +%rename(getObject) FEdgeInternal::SVertexIterator::operator*; +%rename(FEdgeSVertexIterator) FEdgeInternal::SVertexIterator; +%include "../view_map/Silhouette.h" + +%template(ViewShapesContainer) std::vector; +%template(ViewEdgesContainer) std::vector; +%template(FEdgesContainer) std::vector; +%template(ViewVerticesContainer) std::vector; +%template(SVerticesContainer) std::vector; + +%ignore NonTVertex::edges_begin; +%ignore NonTVertex::edges_last; +%ignore NonTVertex::edges_iterator; +%ignore TVertex::edges_begin; +%ignore TVertex::edges_last; +%ignore TVertex::edges_iterator; +%ignore ViewEdge::ViewEdge_iterator; +%ignore ViewEdge::fedge_iterator_begin; +%ignore ViewEdge::fedge_iterator_last; +%ignore ViewEdge::fedge_iterator_end; +%ignore ViewEdge::vertices_begin; +%ignore ViewEdge::vertices_last; +%ignore ViewEdge::vertices_end; +%rename(directedViewEdge) ViewVertex::directedViewEdge; +//%template(directedViewEdge) std::pair; +%include "../view_map/ViewMap.h" + + +%feature("director") ViewEdgeInternal::ViewEdgeIterator; +%rename(getObject) ViewVertexInternal::orientedViewEdgeIterator::operator*; +%rename(ViewVertexOrientedViewEdgeIterator) ViewVertexInternal::orientedViewEdgeIterator; +%rename(getObject) ViewEdgeInternal::SVertexIterator::operator*; +%rename(ViewEdgeSVertexIterator) ViewEdgeInternal::SVertexIterator; +%rename(getObject) ViewEdgeInternal::ViewEdgeIterator::operator*; +%rename(ViewEdgeViewEdgeIterator) ViewEdgeInternal::ViewEdgeIterator; +%include "../view_map/ViewMapIterators.h" + +%include "../view_map/Interface0D.h" + +// SWIG directives in "../view_map/Functions0D.h" +%ignore Functions0D::getFEdges; +%ignore Functions0D::getViewEdges; +%ignore Functions0D::getShapeF0D; +%ignore Functions0D::getOccludersF0D; +%ignore Functions0D::getOccludeeF0D; +%include "../view_map/Functions0D.h" + +// SWIG directives in "../view_map/Functions1D.h" +%ignore Functions1D::getOccludeeF1D; +%ignore Functions1D::getOccludersF1D; +%ignore Functions1D::getShapeF1D; +%include "../view_map/Functions1D.h" + +// Module parameters +%include "../stroke/Module.h" + +%include "../stroke/AdvancedFunctions0D.h" +%include "../stroke/AdvancedFunctions1D.h" + +%include "../stroke/ContextFunctions.h" + +%rename(getObject) AdjacencyIterator::operator*; +%rename(getObject) ViewEdgeInternal::ViewEdgeIterator::operator*; +%feature("director") ChainingIterator; +%feature("director") ChainSilhouetteIterator; +%feature("director") ChainPredicateIterator; +%include "../stroke/ChainingIterators.h" + +%feature("director") UnaryPredicate0D; +%include "../stroke/Predicates0D.h" + +%feature("director") UnaryPredicate1D; +%feature("director") BinaryPredicate1D; +%include "../stroke/Predicates1D.h" +%include "../stroke/AdvancedPredicates1D.h" + +%rename(getObject) CurveInternal::CurvePointIterator::operator*; +%rename(CurvePointIterator) CurveInternal::CurvePointIterator; +%include "../stroke/CurveIterators.h" + +%ignore Curve::points_begin; +%ignore Curve::points_end; +%ignore Curve::vertices_begin; +%ignore Curve::vertices_end; +%include "../stroke/Curve.h" + +%ignore Stroke::vertices_begin; +%ignore Stroke::vertices_end; +%include "../stroke/StrokeIterators.h" +%include "../stroke/Stroke.h" + +%rename(getObject) StrokeInternal::StrokeVertexIterator::operator*; +%rename(StrokeVertexIterator) StrokeInternal::StrokeVertexIterator; +%include "../stroke/StrokeIterators.h" + +%feature("director") StrokeShader; +%template(ShadersContainer) std::vector; +%include "../stroke/StrokeShader.h" + +%include "../stroke/BasicStrokeShaders.h" +%include "../stroke/AdvancedStrokeShaders.h" + +%ignore Operators::getStrokesSet; +%ignore Operators::reset; +%include "../stroke/Operators.h" + +// Canvas.h +%include "../stroke/Canvas.h" + +// Cast functions +%include "../system/Cast.h" +%template(castToSVertex) Cast::cast; +%template(castToViewVertex) Cast::cast; +%template(castToTVertex) Cast::cast; +%template(castToCurvePoint) Cast::cast; +%template(castToStrokeVertex) Cast::cast; +%template(castToNonTVertex) Cast::cast; +%template(castToFEdge) Cast::cast; +%template(castToViewEdge) Cast::cast; +%template(castToStroke) Cast::cast; +%template(castToChain) Cast::cast; diff --git a/extern/freestyle/src/swig/FreestyleWrapper.vc7.vcproj b/extern/freestyle/src/swig/FreestyleWrapper.vc7.vcproj new file mode 100755 index 00000000000..060c1987ea1 --- /dev/null +++ b/extern/freestyle/src/swig/FreestyleWrapper.vc7.vcproj @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/freestyle/src/swig/FreestyleWrapper.vc8.vcproj b/extern/freestyle/src/swig/FreestyleWrapper.vc8.vcproj new file mode 100755 index 00000000000..833a4f89aca --- /dev/null +++ b/extern/freestyle/src/swig/FreestyleWrapper.vc8.vcproj @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/freestyle/src/swig/Makefile b/extern/freestyle/src/swig/Makefile new file mode 100755 index 00000000000..01829434be0 --- /dev/null +++ b/extern/freestyle/src/swig/Makefile @@ -0,0 +1,90 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +CXX = g++ +RM = rm -f +INSTALL = install +SWIG = swig + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 4 + +BUILD = debug +PLATEFORM = linux-g++ +MODNAME = Freestyle + +LIBNAME = _${MODNAME}.so +LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python +IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \ + -I../system -I../view_map -I../winged_edge \ + -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic +#OPTI = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +DBUG = #-ggdb #-pg +WARN = -w #-W -Wall #-pedantic -ansi + +CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} +LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} + +SWIG_SRC = Freestyle.i +PY_SRC = ${SWIG_SRC:.i=.py} +CXX_SRC = ModuleWrapper.cpp +CXX_INC = ${CXX_SRC:.cpp=.h} +CXX_OBJ = ${CXX_SRC:.cpp=.o} + +ifndef DBUG + STRIP = strip --strip-all ${LIBDIR}/${LIBNAME} +endif + +# # # # # # # # # # # # # # # # R u l e s # # # # # # # # # # # # # # # # # + +all : swig cxx + +.PHONY : clean re + +clean : swig_clean cxx_clean + +re : swig_re cxx_re + +# # # # # # # # # # # # # S W I G r u l e s # # # # # # # # # # # # # # # + +.SUFFIXES: +.SUFFIXES: .i .py .cpp .h .o + +.IGNORE : + +swig : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +.i.py : ${SWIG_SRC} + ${SWIG} -c++ -python -o ${CXX_SRC} $< + +.PHONY : swig_clean swig_re + +swig_clean : + ${RM} *~ \#* .\#* : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +swig_re : swig_clean swig + +# # # # # # # # # P y t h o n & C + + r u l e s # # # # # # # # # # # + +cxx : ${CXX_OBJ} ${PY_SRC} + ${INSTALL} -d ${LIBDIR} + ${CC} -shared -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ} + ${INSTALL} ${PY_SRC} ${LIBDIR} + @${STRIP} + +.cpp.o : ${CXX_INC} ${CXX_SRC} + ${CXX} ${CFLAGS} -c $< -o $@ + +${CXX_SRC} : ${PY_SRC} + +${CXX_INC} : ${PY_SRC} + +.PHONY : cxx_clean cxx_re + +cxx_clean : + ${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} + +cxx_re : cxx_clean cxx_all diff --git a/extern/freestyle/src/swig/Makefile.cygwin b/extern/freestyle/src/swig/Makefile.cygwin new file mode 100755 index 00000000000..1f5b3ce2a79 --- /dev/null +++ b/extern/freestyle/src/swig/Makefile.cygwin @@ -0,0 +1,92 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +CXX = g++ +RM = rm -f +INSTALL = install +SWIG = swig + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 5 + +BUILD = debug +PLATEFORM = cygwin-g++ +MODNAME = Freestyle + +LIBNAME = _${MODNAME}.dll +LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python +IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \ + -I../system -I../view_map -I../winged_edge \ + -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +LPATH = -L/usr/lib/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}/config -lpython${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} \ + -L../../build/${PLATEFORM}/${BUILD}/lib -lFreestyleSystem -lFreestyleImage -lFreestyleGeometry -lFreestyleSceneGraph -lFreestyleWingedEdge -lFreestyleViewMap -lFreestyleRendering -lFreestyleStroke +# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic +#OPTI = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +DBUG = #-ggdb #-pg +WARN = -w #-W -Wall #-pedantic -ansi + +CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} +LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} + +SWIG_SRC = Freestyle.i +PY_SRC = ${SWIG_SRC:.i=.py} +CXX_SRC = ModuleWrapper.cpp +CXX_INC = ${CXX_SRC:.cpp=.h} +CXX_OBJ = ${CXX_SRC:.cpp=.o} + +ifndef DBUG + STRIP = strip --strip-all ${LIBDIR}/${LIBNAME} +endif + +# # # # # # # # # # # # # # # # R u l e s # # # # # # # # # # # # # # # # # + +all : swig cxx + +.PHONY : clean re + +clean : swig_clean cxx_clean + +re : swig_re cxx_re + +# # # # # # # # # # # # # S W I G r u l e s # # # # # # # # # # # # # # # + +.SUFFIXES: +.SUFFIXES: .i .py .cpp .h .o + +.IGNORE : + +swig : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +.i.py : ${SWIG_SRC} + ${SWIG} -c++ -python -o ${CXX_SRC} $< + +.PHONY : swig_clean swig_re + +swig_clean : + ${RM} *~ \#* .\#* : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +swig_re : swig_clean swig + +# # # # # # # # # P y t h o n & C + + r u l e s # # # # # # # # # # # + +cxx : ${CXX_OBJ} ${PY_SRC} + ${INSTALL} -d ${LIBDIR} + ${CXX} -shared ${LDFLAGS} -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ} + ${INSTALL} ${PY_SRC} ${LIBDIR} + @${STRIP} + +.cpp.o : ${CXX_INC} ${CXX_SRC} + ${CXX} ${CFLAGS} -c $< -o $@ + +${CXX_SRC} : ${PY_SRC} + +${CXX_INC} : ${PY_SRC} + +.PHONY : cxx_clean cxx_re + +cxx_clean : + ${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} + +cxx_re : cxx_clean cxx_all diff --git a/extern/freestyle/src/swig/Makefile.linux b/extern/freestyle/src/swig/Makefile.linux new file mode 100755 index 00000000000..2a93971ccd5 --- /dev/null +++ b/extern/freestyle/src/swig/Makefile.linux @@ -0,0 +1,91 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +CXX = g++ +RM = rm -f +INSTALL = install +SWIG = swig + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 5 + +BUILD = debug +PLATEFORM = linux-g++ +MODNAME = Freestyle + +LIBNAME = _${MODNAME}.so +LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python +IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \ + -I../system -I../view_map -I../winged_edge \ + -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +LPATH = -L/usr/lib/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}/config -lpython${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic +#OPTI = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +DBUG = #-ggdb #-pg +WARN = -w #-W -Wall #-pedantic -ansi + +CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} +LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} + +SWIG_SRC = Freestyle.i +PY_SRC = ${SWIG_SRC:.i=.py} +CXX_SRC = ModuleWrapper.cpp +CXX_INC = ${CXX_SRC:.cpp=.h} +CXX_OBJ = ${CXX_SRC:.cpp=.o} + +ifndef DBUG + STRIP = strip --strip-all ${LIBDIR}/${LIBNAME} +endif + +# # # # # # # # # # # # # # # # R u l e s # # # # # # # # # # # # # # # # # + +all : swig cxx + +.PHONY : clean re + +clean : swig_clean cxx_clean + +re : swig_re cxx_re + +# # # # # # # # # # # # # S W I G r u l e s # # # # # # # # # # # # # # # + +.SUFFIXES: +.SUFFIXES: .i .py .cpp .h .o + +.IGNORE : + +swig : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +.i.py : ${SWIG_SRC} + ${SWIG} -c++ -python -o ${CXX_SRC} $< + +.PHONY : swig_clean swig_re + +swig_clean : + ${RM} *~ \#* .\#* : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +swig_re : swig_clean swig + +# # # # # # # # # P y t h o n & C + + r u l e s # # # # # # # # # # # + +cxx : ${CXX_OBJ} ${PY_SRC} + ${INSTALL} -d ${LIBDIR} + ${CXX} -shared ${LDFLAGS} -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ} + ${INSTALL} ${PY_SRC} ${LIBDIR} + @${STRIP} + +.cpp.o : ${CXX_INC} ${CXX_SRC} + ${CXX} ${CFLAGS} -c $< -o $@ + +${CXX_SRC} : ${PY_SRC} + +${CXX_INC} : ${PY_SRC} + +.PHONY : cxx_clean cxx_re + +cxx_clean : + ${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} + +cxx_re : cxx_clean cxx_all diff --git a/extern/freestyle/src/swig/Makefile.mac b/extern/freestyle/src/swig/Makefile.mac new file mode 100644 index 00000000000..2c46d74549e --- /dev/null +++ b/extern/freestyle/src/swig/Makefile.mac @@ -0,0 +1,91 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +CXX = g++ +RM = rm -f +INSTALL = install +SWIG = swig + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 5 + +BUILD = release +PLATEFORM = macosx +MODNAME = Freestyle + +LIBNAME = _${MODNAME}.so +LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python +IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \ + -I../system -I../view_map -I../winged_edge \ + -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +LPATH = -L/usr/lib/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN}/config -lpython${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +# options to compile with static python : -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic +#OPTI = -lpthread -lm -lutil -shared -Xlinker -x -export-dynamic #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +DBUG = #-ggdb #-pg +WARN = -w #-W -Wall #-pedantic -ansi + +CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} +LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} + +SWIG_SRC = Freestyle.i +PY_SRC = ${SWIG_SRC:.i=.py} +CXX_SRC = ModuleWrapper.cpp +CXX_INC = ${CXX_SRC:.cpp=.h} +CXX_OBJ = ${CXX_SRC:.cpp=.o} + +ifndef DBUG + STRIP = strip -x ${LIBDIR}/${LIBNAME} +endif + +# # # # # # # # # # # # # # # # R u l e s # # # # # # # # # # # # # # # # # + +all : swig cxx + +.PHONY : clean re + +clean : swig_clean cxx_clean + +re : swig_re cxx_re + +# # # # # # # # # # # # # S W I G r u l e s # # # # # # # # # # # # # # # + +.SUFFIXES: +.SUFFIXES: .i .py .cpp .h .o + +.IGNORE : + +swig : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +.i.py : ${SWIG_SRC} + ${SWIG} -c++ -python -o ${CXX_SRC} $< + +.PHONY : swig_clean swig_re + +swig_clean : + ${RM} *~ \#* .\#* : ${CXX_INC} ${CXX_SRC} ${PY_SRC} + +swig_re : swig_clean swig + +# # # # # # # # # P y t h o n & C + + r u l e s # # # # # # # # # # # + +cxx : ${CXX_OBJ} ${PY_SRC} + ${INSTALL} -d ${LIBDIR} + ${CXX} -bundle -flat_namespace -undefined suppress ${LDFLAGS} -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ} + ${INSTALL} ${PY_SRC} ${LIBDIR} + @${STRIP} + +.cpp.o : ${CXX_INC} ${CXX_SRC} + ${CXX} ${CFLAGS} -c $< -o $@ + +${CXX_SRC} : ${PY_SRC} + +${CXX_INC} : ${PY_SRC} + +.PHONY : cxx_clean cxx_re + +cxx_clean : + ${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} + +cxx_re : cxx_clean cxx_all diff --git a/extern/freestyle/src/swig/Makefile.noswig b/extern/freestyle/src/swig/Makefile.noswig new file mode 100755 index 00000000000..368c4fb173b --- /dev/null +++ b/extern/freestyle/src/swig/Makefile.noswig @@ -0,0 +1,64 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +CXX = g++ +RM = rm -f +INSTALL = install + +PYTHON_VERSION_MAJ = 2 +PYTHON_VERSION_MIN = 2 + +BUILD = debug +PLATEFORM = linux-g++ +MODNAME = Freestyle + +LIBNAME = _${MODNAME}.so +LIBDIR = ../../build/${PLATEFORM}/${BUILD}/lib/python +IPATH = -I../geometry -I../image -I../scene_graph -I../stroke \ + -I../system -I../view_map -I../winged_edge \ + -I/usr/include/python${PYTHON_VERSION_MAJ}.${PYTHON_VERSION_MIN} +OPTI = #-O3 -funroll-loops -fomit-frame-pointer -ffast-math -march=i686 +DBUG = #-ggdb #-pg +WARN = -w #-W -Wall #-pedantic -ansi + +CFLAGS = ${OPTI} ${DBUG} ${WARN} ${IPATH} +LDFLAGS = ${OPTI} ${DBUG} ${WARN} ${LPATH} + +PY_SRC = Freestyle.py +CXX_SRC = ModuleWrapper.cpp +CXX_INC = ${CXX_SRC:.cpp=.h} +CXX_OBJ = ${CXX_SRC:.cpp=.o} + +ifndef DBUG + STRIP = strip --strip-all ${LIBDIR}/${LIBNAME} +endif + +# # # # # # # # # # # # # # # # R u l e s # # # # # # # # # # # # # # # # # + +all : cxx + +.PHONY : clean re + +clean : cxx_clean + +re : cxx_re + +# # # # # # # # # P y t h o n & C + + r u l e s # # # # # # # # # # # + +cxx : ${CXX_OBJ} ${PY_SRC} + ${INSTALL} -d ${LIBDIR} + ${CC} -shared -o ${LIBDIR}/${LIBNAME} ${CXX_OBJ} + ${INSTALL} ${PY_SRC} ${LIBDIR} + @${STRIP} + +.cpp.o : ${CXX_INC} ${CXX_SRC} + ${CXX} ${CFLAGS} -c $< -o $@ + +.PHONY : cxx_clean cxx_re + +cxx_clean : + ${RM} *~ \#* .\#* *.core gmon.out ${CXX_OBJ} + +cxx_re : cxx_clean cxx_all diff --git a/extern/freestyle/src/swig/ModuleWrapper.cpp b/extern/freestyle/src/swig/ModuleWrapper.cpp new file mode 100755 index 00000000000..36bd39b2b15 --- /dev/null +++ b/extern/freestyle/src/swig/ModuleWrapper.cpp @@ -0,0 +1,111845 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.31 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGPYTHON +#define SWIG_DIRECTORS +#define SWIG_PYTHON_DIRECTOR_NO_VTABLE + +#ifdef __cplusplus +template class SwigValueWrapper { + T *tt; +public: + SwigValueWrapper() : tt(0) { } + SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } + SwigValueWrapper(const T& t) : tt(new T(t)) { } + ~SwigValueWrapper() { delete tt; } + SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } + operator T&() const { return *tt; } + T *operator&() { return tt; } +private: + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); +}; +#endif + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) +# if (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + + +/* Python.h has to appear first */ +#include + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic CAPI SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* This should only be incremented when either the layout of swig_type_info changes, + or for whatever reason, the runtime changes incompatibly */ +#define SWIG_RUNTIME_VERSION "3" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the swig runtime code. + In 99.9% of the cases, swig just needs to declare them as 'static'. + + But only do this if is strictly necessary, ie, if you have problems + with your compiler or so. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The swig conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old swig versions, you usually write code as: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit as: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + that seems to be the same, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + requires also to SWIG_ConvertPtr to return new result values, as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + swig errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() + + + */ +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* Structure to store inforomation on one type */ +typedef struct swig_type_info { + const char *name; /* mangled name of this type */ + const char *str; /* human readable name of this type */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (l1 - f1) - (l2 - f2); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* think of this as a c++ template<> or a scheme macro */ +#define SWIG_TypeCheck_Template(comparison, ty) \ + if (ty) { \ + swig_cast_info *iter = ty->cast; \ + while (iter) { \ + if (comparison) { \ + if (iter == ty->cast) return iter; \ + /* Move iter to the top of the linked list */ \ + iter->prev->next = iter->next; \ + if (iter->next) \ + iter->next->prev = iter->prev; \ + iter->next = ty->cast; \ + iter->prev = 0; \ + if (ty->cast) ty->cast->prev = iter; \ + ty->cast = iter; \ + return iter; \ + } \ + iter = iter->next; \ + } \ + } \ + return 0 + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} + +/* Same as previous function, except strcmp is replaced with a pointer comparison */ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + + +/* Add PyOS_snprintf for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) +# define PyOS_snprintf _snprintf +# else +# define PyOS_snprintf snprintf +# endif +#endif + +/* A crude PyString_FromFormat implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 + +#ifndef SWIG_PYBUFFER_SIZE +# define SWIG_PYBUFFER_SIZE 1024 +#endif + +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); +} +#endif + +/* Add PyObject_Del for old Pythons */ +#if PY_VERSION_HEX < 0x01060000 +# define PyObject_Del(op) PyMem_DEL((op)) +#endif +#ifndef PyObject_DEL +# define PyObject_DEL PyObject_Del +#endif + +/* A crude PyExc_StopIteration exception for old Pythons */ +#if PY_VERSION_HEX < 0x02020000 +# ifndef PyExc_StopIteration +# define PyExc_StopIteration PyExc_RuntimeError +# endif +# ifndef PyObject_GenericGetAttr +# define PyObject_GenericGetAttr 0 +# endif +#endif +/* Py_NotImplemented is defined in 2.1 and up. */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef Py_NotImplemented +# define Py_NotImplemented PyExc_RuntimeError +# endif +#endif + + +/* A crude PyString_AsStringAndSize implementation for old Pythons */ +#if PY_VERSION_HEX < 0x02010000 +# ifndef PyString_AsStringAndSize +# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} +# endif +#endif + +/* PySequence_Size for old Pythons */ +#if PY_VERSION_HEX < 0x02000000 +# ifndef PySequence_Size +# define PySequence_Size PySequence_Length +# endif +#endif + + +/* PyBool_FromLong for old Pythons */ +#if PY_VERSION_HEX < 0x02030000 +static +PyObject *PyBool_FromLong(long ok) +{ + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; +} +#endif + +/* Py_ssize_t for old Pythons */ +/* This code is as recommended by: */ +/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +# define PY_SSIZE_T_MAX INT_MAX +# define PY_SSIZE_T_MIN INT_MIN +#endif + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} + + +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_Format(PyExc_RuntimeError, mesg); + } +} + + + +#if defined(SWIG_PYTHON_NO_THREADS) +# if defined(SWIG_PYTHON_THREADS) +# undef SWIG_PYTHON_THREADS +# endif +#endif +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# define SWIG_PYTHON_USE_GIL +# endif +# endif +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# ifndef SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# endif +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block +# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow +# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() +# else /* C code */ +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() +# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() +# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) +# endif +# else /* Old thread way, not implemented, user must provide it */ +# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) +# define SWIG_PYTHON_INITIALIZE_THREADS +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) +# define SWIG_PYTHON_THREAD_END_BLOCK +# endif +# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# endif +# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) +# define SWIG_PYTHON_THREAD_END_ALLOW +# endif +# endif +#else /* No thread support */ +# define SWIG_PYTHON_INITIALIZE_THREADS +# define SWIG_PYTHON_THREAD_BEGIN_BLOCK +# define SWIG_PYTHON_THREAD_END_BLOCK +# define SWIG_PYTHON_THREAD_BEGIN_ALLOW +# define SWIG_PYTHON_THREAD_END_ALLOW +#endif + +/* ----------------------------------------------------------------------------- + * Python API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* ----------------------------------------------------------------------------- + * Constant declarations + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ +#define SWIG_PY_POINTER 4 +#define SWIG_PY_BINARY 5 + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * pyrun.swg + * + * This file contains the runtime support for Python modules + * and includes code for managing global variables and pointer + * type checking. + * + * ----------------------------------------------------------------------------- */ + +/* Common SWIG API */ + +/* for raw pointers */ +#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) +#define swig_owntype int + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) +#define SWIG_NewClientData(obj) PySwigClientData_New(obj) + +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Runtime API implementation */ + +/* Error manipulation */ + +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; +} + +#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) + +/* Set a constant value */ + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); +} + +/* Append a value to the result obj */ + +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { +#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; +#else + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; +#endif +} + +/* Unpack the argument tuple */ + +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register int l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), min, l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), max, l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} + +/* A functor is a function object with one single object argument */ +#if PY_VERSION_HEX >= 0x02020000 +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); +#else +#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); +#endif + +/* + Helper for static pointer initialization for both C and C++ code, for example + static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); +*/ +#ifdef __cplusplus +#define SWIG_STATIC_POINTER(var) var +#else +#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var +#endif + +/* ----------------------------------------------------------------------------- + * Pointer declarations + * ----------------------------------------------------------------------------- */ + +/* Flags for new pointer objects */ +#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) +#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) + +#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* cc-mode */ +#endif +#endif + +/* How to access Py_None */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# ifndef SWIG_PYTHON_NO_BUILD_NONE +# ifndef SWIG_PYTHON_BUILD_NONE +# define SWIG_PYTHON_BUILD_NONE +# endif +# endif +#endif + +#ifdef SWIG_PYTHON_BUILD_NONE +# ifdef Py_None +# undef Py_None +# define Py_None SWIG_Py_None() +# endif +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) +{ + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; +} +SWIGRUNTIME PyObject * +SWIG_Py_None(void) +{ + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; +} +#endif + +/* The python void return value */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = Py_None; + Py_INCREF(none); + return none; +} + +/* PySwigClientData */ + +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} PySwigClientData; + +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + PySwigClientData *data = (PySwigClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} + + +SWIGRUNTIME PySwigClientData * +PySwigClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { +#if (PY_VERSION_HEX < 0x02020000) + data->newraw = 0; +#else + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); +#endif + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); +#ifdef METH_O + data->delargs = !(flags & (METH_O)); +#else + data->delargs = 0; +#endif + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} + +SWIGRUNTIME void +PySwigClientData_Del(PySwigClientData* data) +{ + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); +} + +/* =============== PySwigObject =====================*/ + +typedef struct { + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} PySwigObject; + +SWIGRUNTIME PyObject * +PySwigObject_long(PySwigObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} + +SWIGRUNTIME PyObject * +PySwigObject_format(const char* fmt, PySwigObject *v) +{ + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { + PyObject *ofmt = PyString_FromString(fmt); + if (ofmt) { + res = PyString_Format(ofmt,args); + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; +} + +SWIGRUNTIME PyObject * +PySwigObject_oct(PySwigObject *v) +{ + return PySwigObject_format("%o",v); +} + +SWIGRUNTIME PyObject * +PySwigObject_hex(PySwigObject *v) +{ + return PySwigObject_format("%x",v); +} + +SWIGRUNTIME PyObject * +#ifdef METH_NOARGS +PySwigObject_repr(PySwigObject *v) +#else +PySwigObject_repr(PySwigObject *v, PyObject *args) +#endif +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = PySwigObject_hex(v); + PyObject *repr = PyString_FromFormat("", name, PyString_AsString(hex)); + Py_DECREF(hex); + if (v->next) { +#ifdef METH_NOARGS + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); +#else + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); +#endif + PyString_ConcatAndDel(&repr,nrep); + } + return repr; +} + +SWIGRUNTIME int +PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ +#ifdef METH_NOARGS + PyObject *repr = PySwigObject_repr(v); +#else + PyObject *repr = PySwigObject_repr(v, NULL); +#endif + if (repr) { + fputs(PyString_AsString(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } +} + +SWIGRUNTIME PyObject * +PySwigObject_str(PySwigObject *v) +{ + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + PyString_FromString(result) : 0; +} + +SWIGRUNTIME int +PySwigObject_compare(PySwigObject *v, PySwigObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} + +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigObject_Check(PyObject *op) { + return ((op)->ob_type == PySwigObject_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own); + +SWIGRUNTIME void +PySwigObject_dealloc(PyObject *v) +{ + PySwigObject *sobj = (PySwigObject *) v; + PyObject *next = sobj->next; + if (sobj->own) { + swig_type_info *ty = sobj->ty; + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } else { + const char *name = SWIG_TypePrettyName(ty); +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); +#endif + } + } + Py_XDECREF(next); + PyObject_DEL(v); +} + +SWIGRUNTIME PyObject* +PySwigObject_append(PyObject* v, PyObject* next) +{ + PySwigObject *sobj = (PySwigObject *) v; +#ifndef METH_O + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; +#endif + if (!PySwigObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); +} + +SWIGRUNTIME PyObject* +#ifdef METH_NOARGS +PySwigObject_next(PyObject* v) +#else +PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_disown(PyObject *v) +#else +PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +#ifdef METH_NOARGS +PySwigObject_acquire(PyObject *v) +#else +PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +#endif +{ + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject* +PySwigObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; +#if (PY_VERSION_HEX < 0x02020000) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) +#else + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#endif + { + return NULL; + } + else + { + PySwigObject *sobj = (PySwigObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { +#ifdef METH_NOARGS + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v); + } else { + PySwigObject_disown(v); + } +#else + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v,args); + } else { + PySwigObject_disown(v,args); + } +#endif + } + return obj; + } +} + +#ifdef METH_O +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#else +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +#endif + +#if PY_VERSION_HEX < 0x02020000 +SWIGINTERN PyObject * +PySwigObject_getattr(PySwigObject *sobj,char *name) +{ + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); +} +#endif + +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods PySwigObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + (binaryfunc)0, /*nb_divide*/ + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + (coercion)0, /*nb_coerce*/ + (unaryfunc)PySwigObject_long, /*nb_int*/ + (unaryfunc)PySwigObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ + (unaryfunc)PySwigObject_oct, /*nb_oct*/ + (unaryfunc)PySwigObject_hex, /*nb_hex*/ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ +#endif + }; + + static PyTypeObject pyswigobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigObject", /* tp_name */ + sizeof(PySwigObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigObject_dealloc, /* tp_dealloc */ + (printfunc)PySwigObject_print, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)PySwigObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigObject_compare, /* tp_compare */ + (reprfunc)PySwigObject_repr, /* tp_repr */ + &PySwigObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigobject_type = tmp; + pyswigobject_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigobject_type; +} + +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own) +{ + PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} + +/* ----------------------------------------------------------------------------- + * Implements a simple Swig Packed type, and use it instead of string + * ----------------------------------------------------------------------------- */ + +typedef struct { + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; +} PySwigPacked; + +SWIGRUNTIME int +PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +{ + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +PySwigPacked_repr(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return PyString_FromFormat("", result, v->ty->name); + } else { + return PyString_FromFormat("", v->ty->name); + } +} + +SWIGRUNTIME PyObject * +PySwigPacked_str(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return PyString_FromFormat("%s%s", result, v->ty->name); + } else { + return PyString_FromString(v->ty->name); + } +} + +SWIGRUNTIME int +PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} + +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; +} + +SWIGRUNTIMEINLINE int +PySwigPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); +} + +SWIGRUNTIME void +PySwigPacked_dealloc(PyObject *v) +{ + if (PySwigPacked_Check(v)) { + PySwigPacked *sobj = (PySwigPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); +} + +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject pyswigpacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigPacked", /* tp_name */ + sizeof(PySwigPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigPacked_dealloc, /* tp_dealloc */ + (printfunc)PySwigPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigPacked_compare, /* tp_compare */ + (reprfunc)PySwigPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + pyswigpacked_type = tmp; + pyswigpacked_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigpacked_type; +} + +SWIGRUNTIME PyObject * +PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} + +SWIGRUNTIME swig_type_info * +PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (PySwigPacked_Check(obj)) { + PySwigPacked *sobj = (PySwigPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) +{ + return PyString_FromString("this"); +} + +SWIGRUNTIME PyObject * +SWIG_This(void) +{ + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; +} + +/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ + +SWIGRUNTIME PySwigObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (PySwigObject_Check(pyobj)) { + return (PySwigObject *) pyobj; + } else { + PyObject *obj = 0; +#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { +#ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !PySwigObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + PySwigObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (PySwigObject *)obj; + } +} + +/* Acquire a pointer value */ + +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own) { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} + +/* Convert a pointer value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (PySwigObject *)sobj->next; + } else { + if (ptr) *ptr = SWIG_TypeCast(tc,vptr); + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) *own = sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } +} + +/* Convert a function ptr value */ + +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (!tc) return SWIG_ERROR; + *ptr = SWIG_TypeCast(tc,vptr); + } else { + *ptr = vptr; + } + return SWIG_OK; + } +} + +/* Convert a packed value value */ + +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} + +/* ----------------------------------------------------------------------------- + * Create a new pointer object + * ----------------------------------------------------------------------------- */ + +/* + Create a new instance object, whitout calling __init__, and set the + 'this' attribute. +*/ + +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) +{ +#if (PY_VERSION_HEX >= 0x02020000) + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { +#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return inst; +#else +#if (PY_VERSION_HEX >= 0x02010000) + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; +#else + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } +#ifdef Py_TPFLAGS_HAVE_WEAKREFS + inst->in_weakreflist = NULL; +#endif +#ifdef Py_TPFLAGS_GC + PyObject_GC_Init(inst); +#endif + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; +#endif +#endif +} + +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; +#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } +#endif + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} + + +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + PySwigObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} + +/* Create a new pointer object */ + +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = PySwigObject_New(ptr, type, own); + PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } +} + +/* Create a new packed object */ + +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} + +/* -----------------------------------------------------------------------------* + * Get type list + * -----------------------------------------------------------------------------*/ + +#ifdef SWIG_LINK_RUNTIME +void *SWIG_ReturnGlobalTypeList(void *); +#endif + +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { +#ifdef SWIG_LINK_RUNTIME + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); +#else + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } +#endif + } + return (swig_module_info *) type_pointer; +} + +#if PY_MAJOR_VERSION < 2 +/* PyModule_AddObject function was introduced in Python 2.0. The following function + is copied out of Python/modsupport.c in python version 2.3.4 */ +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) +{ + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; +} +#endif + +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + PySwigClientData *data = (PySwigClientData *) ty->clientdata; + if (data) PySwigClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); +} + +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ + + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +} + +/* The python cached type query */ +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; +} + +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = PyString_FromString(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; +} + +/* + For backward compatibility only +*/ +#define SWIG_POINTER_EXCEPTION 0 +#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) +#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) + +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); + } else { + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} + +SWIGRUNTIMEINLINE const char * +PySwigObject_GetDesc(PyObject *self) +{ + PySwigObject *v = (PySwigObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} + +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { +#if defined(SWIG_COBJECT_TYPES) + if (obj && PySwigObject_Check(obj)) { + const char *otype = (const char *) PySwigObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? PyString_AsString(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} + + +/* Convert a pointer value, signal an exception on a type mismatch */ +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; +} + + +#ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + + #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * director.swg + * + * This file contains support for director classes that proxy + * method calls from C++ to Python extensions. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_DIRECTOR_PYTHON_HEADER_ +#define SWIG_DIRECTOR_PYTHON_HEADER_ + +#ifdef __cplusplus + +#include +#include +#include +#include +#include + + +/* + Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual + table', and avoid multiple GetAttr calls to retrieve the python + methods. +*/ + +#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE +#ifndef SWIG_PYTHON_DIRECTOR_VTABLE +#define SWIG_PYTHON_DIRECTOR_VTABLE +#endif +#endif + + + +/* + Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the + Undefined Exception Handler provided by swift +*/ +#ifndef SWIG_DIRECTOR_NO_UEH +#ifndef SWIG_DIRECTOR_UEH +#define SWIG_DIRECTOR_UEH +#endif +#endif + + +/* + Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the + 'Swig' namespace. This could be usefull for multi-modules projects. +*/ +#ifdef SWIG_DIRECTOR_STATIC +/* Force anonymous (static) namespace */ +#define Swig +#endif + + +/* + Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the + native C++ RTTI and dynamic_cast<>. But be aware that directors + could stop working when using this option. +*/ +#ifdef SWIG_DIRECTOR_NORTTI +/* + When we don't use the native C++ RTTI, we implement a minimal one + only for Directors. +*/ +# ifndef SWIG_DIRECTOR_RTDIR +# define SWIG_DIRECTOR_RTDIR +#include + +namespace Swig { + class Director; + SWIGINTERN std::map& get_rtdir_map() { + static std::map rtdir_map; + return rtdir_map; + } + + SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) { + get_rtdir_map()[vptr] = rtdir; + } + + SWIGINTERNINLINE Director *get_rtdir(void *vptr) { + std::map::const_iterator pos = get_rtdir_map().find(vptr); + Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0; + return rtdir; + } +} +# endif /* SWIG_DIRECTOR_RTDIR */ + +# define SWIG_DIRECTOR_CAST(Arg) Swig::get_rtdir(static_cast(Arg)) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) Swig::set_rtdir(static_cast(Arg1), Arg2) + +#else + +# define SWIG_DIRECTOR_CAST(Arg) dynamic_cast(Arg) +# define SWIG_DIRECTOR_RGTR(Arg1, Arg2) + +#endif /* SWIG_DIRECTOR_NORTTI */ + +extern "C" { + struct swig_type_info; +} + +namespace Swig { + + /* memory handler */ + struct GCItem + { + virtual ~GCItem() = 0; + + virtual int get_own() const + { + return 0; + } + }; + + GCItem::~GCItem() + { + } + + struct GCItem_var + { + GCItem_var(GCItem *item = 0) : _item(item) + { + } + + GCItem_var& operator=(GCItem *item) + { + GCItem *tmp = _item; + _item = item; + delete tmp; + return *this; + } + + ~GCItem_var() + { + delete _item; + } + + GCItem * operator->() const + { + return _item; + } + + private: + GCItem *_item; + }; + + struct GCItem_Object : GCItem + { + GCItem_Object(int own) : _own(own) + { + } + + virtual ~GCItem_Object() + { + } + + int get_own() const + { + return _own; + } + + private: + int _own; + }; + + template + struct GCItem_T : GCItem + { + GCItem_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCItem_T() + { + delete _ptr; + } + + private: + Type *_ptr; + }; + + template + struct GCArray_T : GCItem + { + GCArray_T(Type *ptr) : _ptr(ptr) + { + } + + virtual ~GCArray_T() + { + delete[] _ptr; + } + + private: + Type *_ptr; + }; + + /* base class for director exceptions */ + class DirectorException { + protected: + std::string swig_msg; + public: + DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + : swig_msg(hdr) + { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + if (strlen(msg)) { + swig_msg += " "; + swig_msg += msg; + } + if (!PyErr_Occurred()) { + PyErr_SetString(error, getMessage()); + } else { + SWIG_Python_AddErrorMsg(getMessage()); + } + SWIG_PYTHON_THREAD_END_BLOCK; + } + + const char *getMessage() const + { + return swig_msg.c_str(); + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorException(error, msg); + } + + static void raise(const char *msg) + { + raise(PyExc_RuntimeError, msg); + } + }; + + /* unknown exception handler */ + class UnknownExceptionHandler + { +#ifdef SWIG_DIRECTOR_UEH + static void handler() { + try { + throw; + } catch (DirectorException& e) { + std::cerr << "Swig Director exception caught:" << std::endl + << e.getMessage() << std::endl; + } catch (std::exception& e) { + std::cerr << "std::exception caught: "<< e.what() << std::endl; + } catch (...) { + std::cerr << "Unknown exception caught." << std::endl; + } + + std::cerr << std::endl + << "Python interpreter traceback:" << std::endl; + PyErr_Print(); + std::cerr << std::endl; + + std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl + << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl + << std::endl + << "Exception is being re-thrown, program will like abort/terminate." << std::endl; + throw; + } + + public: + + std::unexpected_handler old; + UnknownExceptionHandler(std::unexpected_handler nh = handler) + { + old = std::set_unexpected(nh); + } + + ~UnknownExceptionHandler() + { + std::set_unexpected(old); + } +#endif + }; + + /* type mismatch in the return value from a python method call */ + class DirectorTypeMismatchException : public Swig::DirectorException { + public: + DirectorTypeMismatchException(PyObject *error, const char* msg="") + : Swig::DirectorException(error, "Swig director type mismatch", msg) + { + } + + DirectorTypeMismatchException(const char* msg="") + : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) + { + } + + static void raise(PyObject *error, const char *msg) + { + throw DirectorTypeMismatchException(error, msg); + } + + static void raise(const char *msg) + { + throw DirectorTypeMismatchException(msg); + } + }; + + /* any python exception that occurs during a director method call */ + class DirectorMethodException : public Swig::DirectorException { + public: + DirectorMethodException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director method error", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorMethodException(msg); + } + }; + + /* attempt to call a pure virtual method via a director method */ + class DirectorPureVirtualException : public Swig::DirectorException + { + public: + DirectorPureVirtualException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) + { + } + + static void raise(const char *msg) + { + throw DirectorPureVirtualException(msg); + } + }; + + +#if defined(SWIG_PYTHON_THREADS) +/* __THREAD__ is the old macro to activate some thread support */ +# if !defined(__THREAD__) +# define __THREAD__ 1 +# endif +#endif + +/* simple thread abstraction for pthreads on win32 */ +#ifdef __THREAD__ +# define __PTHREAD__ +# if defined(_WIN32) || defined(__WIN32__) +# define pthread_mutex_lock EnterCriticalSection +# define pthread_mutex_unlock LeaveCriticalSection +# define pthread_mutex_t CRITICAL_SECTION +# define SWIG_MUTEX_INIT(var) var +# else +# include +# define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER +# endif +#endif + +#ifdef __PTHREAD__ + struct Guard + { + pthread_mutex_t *_mutex; + + Guard(pthread_mutex_t &mutex) : _mutex(&mutex) + { + pthread_mutex_lock(_mutex); + } + + ~Guard() + { + pthread_mutex_unlock(_mutex); + } + }; +# define SWIG_GUARD(mutex) Guard _guard(mutex) +#else +# define SWIG_GUARD(mutex) +#endif + + /* director base class */ + class Director { + private: + /* pointer to the wrapped python object */ + PyObject* swig_self; + /* flag indicating whether the object is owned by python or c++ */ + mutable bool swig_disown_flag; + + /* decrement the reference count of the wrapped python object */ + void swig_decref() const { + if (swig_disown_flag) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + Py_DECREF(swig_self); + SWIG_PYTHON_THREAD_END_BLOCK; + } + } + + public: + /* wrap a python object, optionally taking ownership */ + Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + swig_incref(); + } + + + /* discard our reference at destruction */ + virtual ~Director() { + swig_decref(); + } + + + /* return a pointer to the wrapped python object */ + PyObject *swig_get_self() const { + return swig_self; + } + + /* acquire ownership of the wrapped python object (the sense of "disown" + * is from python) */ + void swig_disown() const { + if (!swig_disown_flag) { + swig_disown_flag=true; + swig_incref(); + } + } + + /* increase the reference count of the wrapped python object */ + void swig_incref() const { + if (swig_disown_flag) { + Py_INCREF(swig_self); + } + } + + /* methods to implement pseudo protected director members */ + virtual bool swig_get_inner(const char* /* name */) const { + return true; + } + + virtual void swig_set_inner(const char* /* name */, bool /* val */) const { + } + + /* ownership management */ + private: + typedef std::map ownership_map; + mutable ownership_map owner; +#ifdef __PTHREAD__ + static pthread_mutex_t swig_mutex_own; +#endif + + public: + template + void swig_acquire_ownership_array(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCArray_T(vptr); + } + } + + template + void swig_acquire_ownership(Type *vptr) const + { + if (vptr) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_T(vptr); + } + } + + void swig_acquire_ownership_obj(void *vptr, int own) const + { + if (vptr && own) { + SWIG_GUARD(swig_mutex_own); + owner[vptr] = new GCItem_Object(own); + } + } + + int swig_release_ownership(void *vptr) const + { + int own = 0; + if (vptr) { + SWIG_GUARD(swig_mutex_own); + ownership_map::iterator iter = owner.find(vptr); + if (iter != owner.end()) { + own = iter->second->get_own(); + owner.erase(iter); + } + } + return own; + } + }; + +#ifdef __PTHREAD__ + pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_own); +#endif +} + +#endif /* __cplusplus */ + + +#endif + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_AdjacencyIterator swig_types[0] +#define SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t swig_types[1] +#define SWIGTYPE_p_BinaryPredicate0D swig_types[2] +#define SWIGTYPE_p_BinaryPredicate1D swig_types[3] +#define SWIGTYPE_p_CalligraphicShader swig_types[4] +#define SWIGTYPE_p_Canvas swig_types[5] +#define SWIGTYPE_p_Chain swig_types[6] +#define SWIGTYPE_p_ChainPredicateIterator swig_types[7] +#define SWIGTYPE_p_ChainSilhouetteIterator swig_types[8] +#define SWIGTYPE_p_ChainingIterator swig_types[9] +#define SWIGTYPE_p_CurvatureInfo swig_types[10] +#define SWIGTYPE_p_Curve swig_types[11] +#define SWIGTYPE_p_CurveInternal__CurvePointIterator swig_types[12] +#define SWIGTYPE_p_CurvePoint swig_types[13] +#define SWIGTYPE_p_Curve__vertex_container__iterator swig_types[14] +#define SWIGTYPE_p_FEdge swig_types[15] +#define SWIGTYPE_p_FEdgeInternal__SVertexIterator swig_types[16] +#define SWIGTYPE_p_FEdgeSharp swig_types[17] +#define SWIGTYPE_p_FEdgeSmooth swig_types[18] +#define SWIGTYPE_p_Functions0D__Curvature2DAngleF0D swig_types[19] +#define SWIGTYPE_p_Functions0D__CurveNatureF0D swig_types[20] +#define SWIGTYPE_p_Functions0D__DensityF0D swig_types[21] +#define SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D swig_types[22] +#define SWIGTYPE_p_Functions0D__GetOccludeeF0D swig_types[23] +#define SWIGTYPE_p_Functions0D__GetOccludersF0D swig_types[24] +#define SWIGTYPE_p_Functions0D__GetParameterF0D swig_types[25] +#define SWIGTYPE_p_Functions0D__GetProjectedXF0D swig_types[26] +#define SWIGTYPE_p_Functions0D__GetProjectedYF0D swig_types[27] +#define SWIGTYPE_p_Functions0D__GetProjectedZF0D swig_types[28] +#define SWIGTYPE_p_Functions0D__GetShapeF0D swig_types[29] +#define SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D swig_types[30] +#define SWIGTYPE_p_Functions0D__GetXF0D swig_types[31] +#define SWIGTYPE_p_Functions0D__GetYF0D swig_types[32] +#define SWIGTYPE_p_Functions0D__GetZF0D swig_types[33] +#define SWIGTYPE_p_Functions0D__LocalAverageDepthF0D swig_types[34] +#define SWIGTYPE_p_Functions0D__MaterialF0D swig_types[35] +#define SWIGTYPE_p_Functions0D__Normal2DF0D swig_types[36] +#define SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D swig_types[37] +#define SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D swig_types[38] +#define SWIGTYPE_p_Functions0D__ReadMapPixelF0D swig_types[39] +#define SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D swig_types[40] +#define SWIGTYPE_p_Functions0D__ShapeIdF0D swig_types[41] +#define SWIGTYPE_p_Functions0D__VertexOrientation2DF0D swig_types[42] +#define SWIGTYPE_p_Functions0D__VertexOrientation3DF0D swig_types[43] +#define SWIGTYPE_p_Functions0D__ZDiscontinuityF0D swig_types[44] +#define SWIGTYPE_p_Functions1D__ChainingTimeStampF1D swig_types[45] +#define SWIGTYPE_p_Functions1D__Curvature2DAngleF1D swig_types[46] +#define SWIGTYPE_p_Functions1D__CurveNatureF1D swig_types[47] +#define SWIGTYPE_p_Functions1D__DensityF1D swig_types[48] +#define SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D swig_types[49] +#define SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D swig_types[50] +#define SWIGTYPE_p_Functions1D__GetOccludeeF1D swig_types[51] +#define SWIGTYPE_p_Functions1D__GetOccludersF1D swig_types[52] +#define SWIGTYPE_p_Functions1D__GetProjectedXF1D swig_types[53] +#define SWIGTYPE_p_Functions1D__GetProjectedYF1D swig_types[54] +#define SWIGTYPE_p_Functions1D__GetProjectedZF1D swig_types[55] +#define SWIGTYPE_p_Functions1D__GetShapeF1D swig_types[56] +#define SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D swig_types[57] +#define SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D swig_types[58] +#define SWIGTYPE_p_Functions1D__GetXF1D swig_types[59] +#define SWIGTYPE_p_Functions1D__GetYF1D swig_types[60] +#define SWIGTYPE_p_Functions1D__GetZF1D swig_types[61] +#define SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D swig_types[62] +#define SWIGTYPE_p_Functions1D__LocalAverageDepthF1D swig_types[63] +#define SWIGTYPE_p_Functions1D__Normal2DF1D swig_types[64] +#define SWIGTYPE_p_Functions1D__Orientation2DF1D swig_types[65] +#define SWIGTYPE_p_Functions1D__Orientation3DF1D swig_types[66] +#define SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D swig_types[67] +#define SWIGTYPE_p_Functions1D__TimeStampF1D swig_types[68] +#define SWIGTYPE_p_Functions1D__ZDiscontinuityF1D swig_types[69] +#define SWIGTYPE_p_GrayImage swig_types[70] +#define SWIGTYPE_p_I1DContainer swig_types[71] +#define SWIGTYPE_p_Id swig_types[72] +#define SWIGTYPE_p_IntegrationType swig_types[73] +#define SWIGTYPE_p_Interface0D swig_types[74] +#define SWIGTYPE_p_Interface0DIterator swig_types[75] +#define SWIGTYPE_p_Interface0DIteratorNested swig_types[76] +#define SWIGTYPE_p_Interface1D swig_types[77] +#define SWIGTYPE_p_Material swig_types[78] +#define SWIGTYPE_p_MediumType swig_types[79] +#define SWIGTYPE_p_Module swig_types[80] +#define SWIGTYPE_p_Noise swig_types[81] +#define SWIGTYPE_p_NonTVertex swig_types[82] +#define SWIGTYPE_p_OmissionShader swig_types[83] +#define SWIGTYPE_p_Omitter swig_types[84] +#define SWIGTYPE_p_Operators swig_types[85] +#define SWIGTYPE_p_Point swig_types[86] +#define SWIGTYPE_p_Polygon3r swig_types[87] +#define SWIGTYPE_p_Predicates0D__FalseUP0D swig_types[88] +#define SWIGTYPE_p_Predicates0D__TrueUP0D swig_types[89] +#define SWIGTYPE_p_Predicates1D__ContourUP1D swig_types[90] +#define SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D swig_types[91] +#define SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D swig_types[92] +#define SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D swig_types[93] +#define SWIGTYPE_p_Predicates1D__ExternalContourUP1D swig_types[94] +#define SWIGTYPE_p_Predicates1D__FalseBP1D swig_types[95] +#define SWIGTYPE_p_Predicates1D__FalseUP1D swig_types[96] +#define SWIGTYPE_p_Predicates1D__Length2DBP1D swig_types[97] +#define SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D swig_types[98] +#define SWIGTYPE_p_Predicates1D__SameShapeIdBP1D swig_types[99] +#define SWIGTYPE_p_Predicates1D__ShapeUP1D swig_types[100] +#define SWIGTYPE_p_Predicates1D__TrueBP1D swig_types[101] +#define SWIGTYPE_p_Predicates1D__TrueUP1D swig_types[102] +#define SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D swig_types[103] +#define SWIGTYPE_p_RGBImage swig_types[104] +#define SWIGTYPE_p_ReturnedValueType swig_types[105] +#define SWIGTYPE_p_SShape swig_types[106] +#define SWIGTYPE_p_SVertex swig_types[107] +#define SWIGTYPE_p_SVertex__fedges_container__iterator swig_types[108] +#define SWIGTYPE_p_Smoother swig_types[109] +#define SWIGTYPE_p_SmoothingShader swig_types[110] +#define SWIGTYPE_p_SpatialNoiseShader swig_types[111] +#define SWIGTYPE_p_SteerableViewMap swig_types[112] +#define SWIGTYPE_p_Stroke swig_types[113] +#define SWIGTYPE_p_StrokeAttribute swig_types[114] +#define SWIGTYPE_p_StrokeInternal__StrokeVertexIterator swig_types[115] +#define SWIGTYPE_p_StrokeLayer swig_types[116] +#define SWIGTYPE_p_StrokeRenderer swig_types[117] +#define SWIGTYPE_p_StrokeShader swig_types[118] +#define SWIGTYPE_p_StrokeShaders__BSplineShader swig_types[119] +#define SWIGTYPE_p_StrokeShaders__BackboneStretcherShader swig_types[120] +#define SWIGTYPE_p_StrokeShaders__BezierCurveShader swig_types[121] +#define SWIGTYPE_p_StrokeShaders__CalligraphicColorShader swig_types[122] +#define SWIGTYPE_p_StrokeShaders__ColorNoiseShader swig_types[123] +#define SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader swig_types[124] +#define SWIGTYPE_p_StrokeShaders__ConstantColorShader swig_types[125] +#define SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader swig_types[126] +#define SWIGTYPE_p_StrokeShaders__ConstantThicknessShader swig_types[127] +#define SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader swig_types[128] +#define SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader swig_types[129] +#define SWIGTYPE_p_StrokeShaders__GuidingLinesShader swig_types[130] +#define SWIGTYPE_p_StrokeShaders__IncreasingColorShader swig_types[131] +#define SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader swig_types[132] +#define SWIGTYPE_p_StrokeShaders__InflateShader swig_types[133] +#define SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader swig_types[134] +#define SWIGTYPE_p_StrokeShaders__MaterialColorShader swig_types[135] +#define SWIGTYPE_p_StrokeShaders__PolygonalizationShader swig_types[136] +#define SWIGTYPE_p_StrokeShaders__SamplingShader swig_types[137] +#define SWIGTYPE_p_StrokeShaders__StrokeTextureShader swig_types[138] +#define SWIGTYPE_p_StrokeShaders__TextureAssignerShader swig_types[139] +#define SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader swig_types[140] +#define SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader swig_types[141] +#define SWIGTYPE_p_StrokeShaders__TipRemoverShader swig_types[142] +#define SWIGTYPE_p_StrokeShaders__fstreamShader swig_types[143] +#define SWIGTYPE_p_StrokeShaders__streamShader swig_types[144] +#define SWIGTYPE_p_StrokeVertex swig_types[145] +#define SWIGTYPE_p_Stroke__vertex_container__iterator swig_types[146] +#define SWIGTYPE_p_Stroke__viewedge_container__const_iterator swig_types[147] +#define SWIGTYPE_p_Stroke__viewedge_container__iterator swig_types[148] +#define SWIGTYPE_p_StrokesContainer swig_types[149] +#define SWIGTYPE_p_StyleModule swig_types[150] +#define SWIGTYPE_p_TVertex swig_types[151] +#define SWIGTYPE_p_UnaryFunction0DTId_t swig_types[152] +#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t swig_types[153] +#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t swig_types[154] +#define SWIGTYPE_p_UnaryFunction0DTViewShape_p_t swig_types[155] +#define SWIGTYPE_p_UnaryFunction0DTdouble_t swig_types[156] +#define SWIGTYPE_p_UnaryFunction0DTfloat_t swig_types[157] +#define SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[158] +#define SWIGTYPE_p_UnaryFunction0DTunsigned_int_t swig_types[159] +#define SWIGTYPE_p_UnaryFunction0DTvoid_t swig_types[160] +#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t swig_types[161] +#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t swig_types[162] +#define SWIGTYPE_p_UnaryFunction1DTdouble_t swig_types[163] +#define SWIGTYPE_p_UnaryFunction1DTfloat_t swig_types[164] +#define SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[165] +#define SWIGTYPE_p_UnaryFunction1DTunsigned_int_t swig_types[166] +#define SWIGTYPE_p_UnaryFunction1DTvoid_t swig_types[167] +#define SWIGTYPE_p_UnaryPredicate0D swig_types[168] +#define SWIGTYPE_p_UnaryPredicate1D swig_types[169] +#define SWIGTYPE_p_VecMat__HVec3Tdouble_t swig_types[170] +#define SWIGTYPE_p_VecMat__HVec3Tfloat_t swig_types[171] +#define SWIGTYPE_p_VecMat__HVec3Tint_t swig_types[172] +#define SWIGTYPE_p_VecMat__HVec3Tunsigned_int_t swig_types[173] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_2_t swig_types[174] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_3_t swig_types[175] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_4_t swig_types[176] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_2_t swig_types[177] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_3_t swig_types[178] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_4_t swig_types[179] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_2_t swig_types[180] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_3_t swig_types[181] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_4_t swig_types[182] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_2_t swig_types[183] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_3_t swig_types[184] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_4_t swig_types[185] +#define SWIGTYPE_p_VecMat__Vec2Tdouble_t swig_types[186] +#define SWIGTYPE_p_VecMat__Vec2Tfloat_t swig_types[187] +#define SWIGTYPE_p_VecMat__Vec2Tint_t swig_types[188] +#define SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t swig_types[189] +#define SWIGTYPE_p_VecMat__Vec3Tdouble_t swig_types[190] +#define SWIGTYPE_p_VecMat__Vec3Tfloat_t swig_types[191] +#define SWIGTYPE_p_VecMat__Vec3Tint_t swig_types[192] +#define SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t swig_types[193] +#define SWIGTYPE_p_VecMat__VecTdouble_2_t swig_types[194] +#define SWIGTYPE_p_VecMat__VecTdouble_3_t swig_types[195] +#define SWIGTYPE_p_VecMat__VecTfloat_2_t swig_types[196] +#define SWIGTYPE_p_VecMat__VecTfloat_3_t swig_types[197] +#define SWIGTYPE_p_VecMat__VecTint_2_t swig_types[198] +#define SWIGTYPE_p_VecMat__VecTint_3_t swig_types[199] +#define SWIGTYPE_p_VecMat__VecTunsigned_int_2_t swig_types[200] +#define SWIGTYPE_p_VecMat__VecTunsigned_int_3_t swig_types[201] +#define SWIGTYPE_p_Vertex swig_types[202] +#define SWIGTYPE_p_ViewEdge swig_types[203] +#define SWIGTYPE_p_ViewEdgeInternal__SVertexIterator swig_types[204] +#define SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator swig_types[205] +#define SWIGTYPE_p_ViewMap swig_types[206] +#define SWIGTYPE_p_ViewShape swig_types[207] +#define SWIGTYPE_p_ViewVertex swig_types[208] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t swig_types[209] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t swig_types[210] +#define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator swig_types[211] +#define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator swig_types[212] +#define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator swig_types[213] +#define SWIGTYPE_p_allocator_type swig_types[214] +#define SWIGTYPE_p_char swig_types[215] +#define SWIGTYPE_p_const_edge_iterator swig_types[216] +#define SWIGTYPE_p_const_fedge_iterator swig_types[217] +#define SWIGTYPE_p_const_point_iterator swig_types[218] +#define SWIGTYPE_p_const_reference swig_types[219] +#define SWIGTYPE_p_const_vertex_iterator swig_types[220] +#define SWIGTYPE_p_difference_type swig_types[221] +#define SWIGTYPE_p_directedViewEdge swig_types[222] +#define SWIGTYPE_p_double swig_types[223] +#define SWIGTYPE_p_edge_iterator swig_types[224] +#define SWIGTYPE_p_edge_pointers_container swig_types[225] +#define SWIGTYPE_p_edges_container swig_types[226] +#define SWIGTYPE_p_fedge_iterator swig_types[227] +#define SWIGTYPE_p_fedges_container swig_types[228] +#define SWIGTYPE_p_float swig_types[229] +#define SWIGTYPE_p_id_type swig_types[230] +#define SWIGTYPE_p_int swig_types[231] +#define SWIGTYPE_p_ltstr swig_types[232] +#define SWIGTYPE_p_mapsMap swig_types[233] +#define SWIGTYPE_p_occluder_container__const_iterator swig_types[234] +#define SWIGTYPE_p_p_PyObject swig_types[235] +#define SWIGTYPE_p_point_iterator swig_types[236] +#define SWIGTYPE_p_point_type swig_types[237] +#define SWIGTYPE_p_reference swig_types[238] +#define SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t swig_types[239] +#define SWIGTYPE_p_size_type swig_types[240] +#define SWIGTYPE_p_std__invalid_argument swig_types[241] +#define SWIGTYPE_p_std__pairTViewEdge_p_bool_t swig_types[242] +#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t swig_types[243] +#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type swig_types[244] +#define SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t swig_types[245] +#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t swig_types[246] +#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type swig_types[247] +#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t swig_types[248] +#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type swig_types[249] +#define SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t swig_types[250] +#define SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t swig_types[251] +#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t swig_types[252] +#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type swig_types[253] +#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t swig_types[254] +#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type swig_types[255] +#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t swig_types[256] +#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type swig_types[257] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[258] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[259] +#define SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t swig_types[260] +#define SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t swig_types[261] +#define SWIGTYPE_p_svertices_container swig_types[262] +#define SWIGTYPE_p_swig__PySwigIterator swig_types[263] +#define SWIGTYPE_p_unsigned_int swig_types[264] +#define SWIGTYPE_p_unsigned_short swig_types[265] +#define SWIGTYPE_p_value_type swig_types[266] +#define SWIGTYPE_p_vertex_container swig_types[267] +#define SWIGTYPE_p_vertex_iterator swig_types[268] +#define SWIGTYPE_p_vertex_type swig_types[269] +#define SWIGTYPE_p_viewedge_container swig_types[270] +#define SWIGTYPE_p_viewedges_container swig_types[271] +#define SWIGTYPE_p_viewshapes_container swig_types[272] +#define SWIGTYPE_p_viewvertices_container swig_types[273] +#define SWIGTYPE_p_void swig_types[274] +#define SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type swig_types[275] +#define SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type swig_types[276] +#define SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type swig_types[277] +#define SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type swig_types[278] +#define SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type swig_types[279] +#define SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type swig_types[280] +static swig_type_info *swig_types[282]; +static swig_module_info swig_module = {swig_types, 281, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#if (PY_VERSION_HEX <= 0x02000000) +# if !defined(SWIG_PYTHON_CLASSIC) +# error "This python version requires swig to be run with the '-classic' option" +# endif +#endif + +/*----------------------------------------------- + @(target):= _Freestyle.so + ------------------------------------------------*/ +#define SWIG_init init_Freestyle + +#define SWIG_name "_Freestyle" + +#define SWIGVERSION 0x010331 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) + + +#include + + +namespace swig { + class PyObject_ptr { + protected: + PyObject *_obj; + + public: + PyObject_ptr() :_obj(0) + { + } + + PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj) + { + Py_XINCREF(_obj); + } + + PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) Py_XINCREF(_obj); + } + + PyObject_ptr & operator=(const PyObject_ptr& item) + { + Py_XINCREF(item._obj); + Py_XDECREF(_obj); + _obj = item._obj; + return *this; + } + + ~PyObject_ptr() + { + Py_XDECREF(_obj); + } + + operator PyObject *() const + { + return _obj; + } + + PyObject *operator->() const + { + return _obj; + } + }; +} + + +namespace swig { + struct PyObject_var : PyObject_ptr { + PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { } + + PyObject_var & operator = (PyObject* obj) + { + Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; +} + + + #include "../system/Cast.h" + #include "../stroke/Module.h" + #include "../system/Precision.h" + #include "../system/Id.h" + #include "../geometry/VecMat.h" + #include "../geometry/Geom.h" + #include "../geometry/Noise.h" + #include "../scene_graph/Material.h" + #include "../winged_edge/Nature.h" + #include "../view_map/Interface0D.h" + #include "../view_map/Interface1D.h" + #include "../view_map/Functions0D.h" + #include "../view_map/Functions1D.h" + #include "../view_map/Silhouette.h" + #include "../view_map/ViewMap.h" + #include "../view_map/ViewMapIterators.h" + #include "../stroke/AdvancedFunctions0D.h" + #include "../stroke/AdvancedFunctions1D.h" + #include "../stroke/ChainingIterators.h" + #include "../stroke/ContextFunctions.h" + #include "../stroke/Predicates0D.h" + #include "../stroke/Predicates1D.h" + #include "../stroke/AdvancedPredicates1D.h" + #include "../stroke/StrokeShader.h" +// #include "../stroke/Curve.h" + #include "../stroke/CurveIterators.h" + #include "../stroke/Stroke.h" + #include "../stroke/StrokeIterators.h" + #include "../stroke/BasicStrokeShaders.h" + #include "../stroke/AdvancedStrokeShaders.h" + #include "../stroke/Operators.h" + #include "../stroke/Canvas.h" + + +#include + + + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) +# define SWIG_STD_NOASSIGN_STL +# define SWIG_STD_NOINSERT_TEMPLATE_STL +# define SWIG_STD_NOITERATOR_TRAITS_STL +#endif + +#if defined(__GNUC__) +# if __GNUC__ == 2 && __GNUC_MINOR <= 96 +# define SWIG_STD_NOMODERN_STL +# endif +#endif + + + + +#include +#include + + +#include + + +#include + + +namespace swig { + struct stop_iteration { + }; + + struct PySwigIterator { + private: + PyObject_ptr _seq; + + protected: + PySwigIterator(PyObject *seq) : _seq(seq) + { + } + + public: + virtual ~PySwigIterator() {} + + // Access iterator method, required by Python + virtual PyObject *value() const = 0; + + // Forward iterator method, required by Python + virtual PySwigIterator *incr(size_t n = 1) = 0; + + // Backward iterator method, very common in C++, but not required in Python + virtual PySwigIterator *decr(size_t n = 1) + { + throw stop_iteration(); + } + + // Random access iterator methods, but not required in Python + virtual ptrdiff_t distance(const PySwigIterator &x) const + { + throw std::invalid_argument("operation not supported"); + } + + virtual bool equal (const PySwigIterator &x) const + { + throw std::invalid_argument("operation not supported"); + } + + // C++ common/needed methods + virtual PySwigIterator *copy() const = 0; + + PyObject *next() + { + PyObject *obj = value(); + incr(); + return obj; + } + + PyObject *previous() + { + decr(); + return value(); + } + + PySwigIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + + bool operator == (const PySwigIterator& x) const + { + return equal(x); + } + + bool operator != (const PySwigIterator& x) const + { + return ! operator==(x); + } + + PySwigIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + + PySwigIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + + PySwigIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } + + PySwigIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + + ptrdiff_t operator - (const PySwigIterator& x) const + { + return x.distance(*this); + } + + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_TypeQuery("swig::PySwigIterator *"); + init = 1; + } + return desc; + } + }; +} + + +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; + } else if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } +#endif + return res; +} + + +#include + + +#include + + +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v); + return res; +} + + + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ + return SWIG_From_long (static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject* + SWIG_From_bool (bool value) +{ + return PyBool_FromLong(value ? 1 : 0); +} + + +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) +{ + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } +#ifdef SWIG_PYTHON_CAST_MODE + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } +#endif + return SWIG_TypeError; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) +{ + long v; + int res = SWIG_AsVal_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v); + return res; +} + + +#include + + +#include + + +#include + + +#include + + +#include +#include +#include + + +namespace swig { + template + struct noconst_traits { + typedef Type noconst_type; + }; + + template + struct noconst_traits { + typedef Type noconst_type; + }; + + /* + type categories + */ + struct pointer_category { }; + struct value_category { }; + + /* + General traits that provides type_name and type_info + */ + template struct traits { }; + + template + inline const char* type_name() { + return traits::noconst_type >::type_name(); + } + + template + struct traits_info { + static swig_type_info *type_query(std::string name) { + name += " *"; + return SWIG_TypeQuery(name.c_str()); + } + static swig_type_info *type_info() { + static swig_type_info *info = type_query(type_name()); + return info; + } + }; + + template + inline swig_type_info *type_info() { + return traits_info::type_info(); + } + + /* + Partial specialization for pointers + */ + template struct traits { + typedef pointer_category category; + static std::string make_ptr_name(const char* name) { + std::string ptrname = name; + ptrname += " *"; + return ptrname; + } + static const char* type_name() { + static std::string name = make_ptr_name(swig::type_name()); + return name.c_str(); + } + }; + + template + struct traits_as { }; + + template + struct traits_check { }; + +} + + +namespace swig { + /* + Traits that provides the from method + */ + template struct traits_from_ptr { + static PyObject *from(Type *val, int owner = 0) { + return SWIG_NewPointerObj(val, type_info(), owner); + } + }; + + template struct traits_from { + static PyObject *from(const Type& val) { + return traits_from_ptr::from(new Type(val), 1); + } + }; + + template struct traits_from { + static PyObject *from(Type* val) { + return traits_from_ptr::from(val, 0); + } + }; + + template struct traits_from { + static PyObject *from(const Type* val) { + return traits_from_ptr::from(const_cast(val), 0); + } + }; + + + template + inline PyObject *from(const Type& val) { + return traits_from::from(val); + } + + template + inline PyObject *from_ptr(Type* val, int owner) { + return traits_from_ptr::from(val, owner); + } + + /* + Traits that provides the asval/as/check method + */ + template + struct traits_asptr { + static int asptr(PyObject *obj, Type **val) { + Type *p; + int res = (SWIG_ConvertPtr(obj, (void**)&p, type_info(), 0) == SWIG_OK) ? SWIG_OLDOBJ : 0; + if (SWIG_IsOK(res)) { + if (val) *val = p; + } + return res; + } + }; + + template + inline int asptr(PyObject *obj, Type **vptr) { + return traits_asptr::asptr(obj, vptr); + } + + template + struct traits_asval { + static int asval(PyObject *obj, Type *val) { + if (val) { + Type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (!SWIG_IsOK(res)) return res; + if (p) { + typedef typename noconst_traits::noconst_type noconst_type; + *(const_cast(val)) = *p; + if (SWIG_IsNewObj(res)){ + delete p; + res = SWIG_DelNewMask(res); + } + return res; + } else { + return SWIG_ERROR; + } + } else { + return traits_asptr::asptr(obj, (Type **)(0)); + } + } + }; + + template struct traits_asval { + static int asval(PyObject *obj, Type **val) { + if (val) { + typedef typename noconst_traits::noconst_type noconst_type; + noconst_type *p = 0; + int res = traits_asptr::asptr(obj, &p); + if (SWIG_IsOK(res)) { + *(const_cast(val)) = p; + } + return res; + } else { + return traits_asptr::asptr(obj, (Type **)(0)); + } + } + }; + + template + inline int asval(PyObject *obj, Type *val) { + return traits_asval::asval(obj, val); + } + + template + struct traits_as { + static Type as(PyObject *obj, bool throw_error) { + Type v; + int res = asval(obj, &v); + if (!obj || !SWIG_IsOK(res)) { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); + } + return v; + } + }; + + template + struct traits_as { + static Type as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res) && v) { + if (SWIG_IsNewObj(res)) { + Type r(*v); + delete v; + return r; + } else { + return *v; + } + } else { + // Uninitialized return value, no Type() constructor required. + static Type *v_def = (Type*) malloc(sizeof(Type)); + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); + memset(v_def,0,sizeof(Type)); + return *v_def; + } + } + }; + + template + struct traits_as { + static Type* as(PyObject *obj, bool throw_error) { + Type *v = 0; + int res = (obj ? traits_asptr::asptr(obj, &v) : SWIG_ERROR); + if (SWIG_IsOK(res)) { + return v; + } else { + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + if (throw_error) throw std::invalid_argument("bad type"); + return 0; + } + } + }; + + template + inline Type as(PyObject *obj, bool te = false) { + return traits_as::category>::as(obj, te); + } + + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template + struct traits_check { + static bool check(PyObject *obj) { + int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR; + return SWIG_IsOK(res) ? true : false; + } + }; + + template + inline bool check(PyObject *obj) { + return traits_check::category>::check(obj); + } +} + + +#include + +namespace std { + template <> + struct less : public binary_function + { + bool + operator()(PyObject * v, PyObject *w) const + { + bool res; + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + res = PyObject_Compare(v, w) < 0; + SWIG_PYTHON_THREAD_END_BLOCK; + return res; + } + }; + + template <> + struct less : public binary_function + { + bool + operator()(const swig::PyObject_ptr& v, const swig::PyObject_ptr& w) const + { + return std::less()(v, w); + } + }; + + template <> + struct less : public binary_function + { + bool + operator()(const swig::PyObject_var& v, const swig::PyObject_var& w) const + { + return std::less()(v, w); + } + }; + +} + +namespace swig { + template <> struct traits { + typedef value_category category; + static const char* type_name() { return "PyObject *"; } + }; + + template <> struct traits_asval { + typedef PyObject * value_type; + static int asval(PyObject *obj, value_type *val) { + if (val) *val = obj; + return SWIG_OK; + } + }; + + template <> + struct traits_check { + static bool check(PyObject *) { + return true; + } + }; + + template <> struct traits_from { + typedef PyObject * value_type; + static PyObject *from(const value_type& val) { + Py_XINCREF(val); + return val; + } + }; + +} + +namespace swig { + inline size_t + check_index(ptrdiff_t i, size_t size, bool insert = false) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) + return (size_t) (i + size); + } else if ( (size_t) i < size ) { + return (size_t) i; + } else if (insert && ((size_t) i == size)) { + return size; + } + + throw std::out_of_range("index out of range"); + } + + inline size_t + slice_index(ptrdiff_t i, size_t size) { + if ( i < 0 ) { + if ((size_t) (-i) <= size) { + return (size_t) (i + size); + } else { + throw std::out_of_range("index out of range"); + } + } else { + return ( (size_t) i < size ) ? ((size_t) i) : size; + } + } + + template + inline typename Sequence::iterator + getpos(Sequence* self, Difference i) { + typename Sequence::iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template + inline typename Sequence::const_iterator + cgetpos(const Sequence* self, Difference i) { + typename Sequence::const_iterator pos = self->begin(); + std::advance(pos, check_index(i,self->size())); + return pos; + } + + template + inline Sequence* + getslice(const Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size); + typename Sequence::size_type jj = swig::slice_index(j, size); + + if (jj > ii) { + typename Sequence::const_iterator vb = self->begin(); + typename Sequence::const_iterator ve = self->begin(); + std::advance(vb,ii); + std::advance(ve,jj); + return new Sequence(vb, ve); + } else { + return new Sequence(); + } + } + + template + inline void + setslice(Sequence* self, Difference i, Difference j, const InputSeq& v) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj < ii) jj = ii; + size_t ssize = jj - ii; + if (ssize <= v.size()) { + typename Sequence::iterator sb = self->begin(); + typename InputSeq::const_iterator vmid = v.begin(); + std::advance(sb,ii); + std::advance(vmid, jj - ii); + self->insert(std::copy(v.begin(), vmid, sb), vmid, v.end()); + } else { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + self->insert(sb, v.begin(), v.end()); + } + } + + template + inline void + delslice(Sequence* self, Difference i, Difference j) { + typename Sequence::size_type size = self->size(); + typename Sequence::size_type ii = swig::check_index(i, size, true); + typename Sequence::size_type jj = swig::slice_index(j, size); + if (jj > ii) { + typename Sequence::iterator sb = self->begin(); + typename Sequence::iterator se = self->begin(); + std::advance(sb,ii); + std::advance(se,jj); + self->erase(sb,se); + } + } +} + + +#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL) +#include +#else +namespace std { + template + struct iterator_traits { + typedef ptrdiff_t difference_type; + typedef typename Iterator::value_type value_type; + }; + +#if defined(__SUNPRO_CC) && defined(_RWSTD_VER) + template + struct iterator_traits<__reverse_bi_iterator > { + typedef Distance difference_type; + typedef T value_type; + }; +#endif + + template + struct iterator_traits { + typedef T value_type; + typedef ptrdiff_t difference_type; + }; + + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) { + ++__first; ++__n; + } + return __n; + } + +} +#endif + + +namespace swig { + template + class PySwigIterator_T : public PySwigIterator + { + public: + typedef OutIterator out_iterator; + typedef typename std::iterator_traits::value_type value_type; + typedef PySwigIterator_T self_type; + + PySwigIterator_T(out_iterator curr, PyObject *seq) + : PySwigIterator(seq), current(curr) + { + } + + const out_iterator& get_current() const + { + return current; + } + + + bool equal (const PySwigIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return (current == iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + ptrdiff_t distance(const PySwigIterator &iter) const + { + const self_type *iters = dynamic_cast(&iter); + if (iters) { + return std::distance(current, iters->get_current()); + } else { + throw std::invalid_argument("bad iterator type"); + } + } + + protected: + out_iterator current; + }; + + template + struct from_oper + { + typedef const ValueType& argument_type; + typedef PyObject *result_type; + result_type operator()(argument_type v) const + { + return swig::from(v); + } + }; + + template::value_type, + typename FromOper = from_oper > + class PySwigIteratorOpen_T : public PySwigIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef PySwigIterator_T base; + typedef PySwigIteratorOpen_T self_type; + + PySwigIteratorOpen_T(out_iterator curr, PyObject *seq) + : PySwigIterator_T(curr, seq) + { + } + + PyObject *value() const { + return from(static_cast(*(base::current))); + } + + PySwigIterator *copy() const + { + return new self_type(*this); + } + + PySwigIterator *incr(size_t n = 1) + { + while (n--) { + ++base::current; + } + return this; + } + + PySwigIterator *decr(size_t n = 1) + { + while (n--) { + --base::current; + } + return this; + } + }; + + template::value_type, + typename FromOper = from_oper > + class PySwigIteratorClosed_T : public PySwigIterator_T + { + public: + FromOper from; + typedef OutIterator out_iterator; + typedef ValueType value_type; + typedef PySwigIterator_T base; + typedef PySwigIteratorClosed_T self_type; + + PySwigIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq) + : PySwigIterator_T(curr, seq), begin(first), end(last) + { + } + + PyObject *value() const { + if (base::current == end) { + throw stop_iteration(); + } else { + return from(static_cast(*(base::current))); + } + } + + PySwigIterator *copy() const + { + return new self_type(*this); + } + + PySwigIterator *incr(size_t n = 1) + { + while (n--) { + if (base::current == end) { + throw stop_iteration(); + } else { + ++base::current; + } + } + return this; + } + + PySwigIterator *decr(size_t n = 1) + { + while (n--) { + if (base::current == begin) { + throw stop_iteration(); + } else { + --base::current; + } + } + return this; + } + + private: + out_iterator begin; + out_iterator end; + }; + + template + inline PySwigIterator* + make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0) + { + return new PySwigIteratorClosed_T(current, begin, end, seq); + } + + template + inline PySwigIterator* + make_output_iterator(const OutIter& current, PyObject *seq = 0) + { + return new PySwigIteratorOpen_T(current, seq); + } +} + + +namespace swig +{ + template + struct PySequence_Ref + { + PySequence_Ref(PyObject* seq, int index) + : _seq(seq), _index(index) + { + } + + operator T () const + { + swig::PyObject_var item = PySequence_GetItem(_seq, _index); + try { + return swig::as(item, true); + } catch (std::exception& e) { + char msg[1024]; + sprintf(msg, "in sequence element %d ", _index); + if (!PyErr_Occurred()) { + SWIG_Error(SWIG_TypeError, swig::type_name()); + } + SWIG_Python_AddErrorMsg(msg); + SWIG_Python_AddErrorMsg(e.what()); + throw; + } + } + + PySequence_Ref& operator=(const T& v) + { + PySequence_SetItem(_seq, _index, swig::from(v)); + return *this; + } + + private: + PyObject* _seq; + int _index; + }; + + template + struct PySequence_ArrowProxy + { + PySequence_ArrowProxy(const T& x): m_value(x) {} + const T* operator->() const { return &m_value; } + operator const T*() const { return &m_value; } + T m_value; + }; + + template + struct PySequence_InputIterator + { + typedef PySequence_InputIterator self; + + typedef std::random_access_iterator_tag iterator_category; + typedef Reference reference; + typedef T value_type; + typedef T* pointer; + typedef int difference_type; + + PySequence_InputIterator() + { + } + + PySequence_InputIterator(PyObject* seq, int index) + : _seq(seq), _index(index) + { + } + + reference operator*() const + { + return reference(_seq, _index); + } + + PySequence_ArrowProxy + operator->() const { + return PySequence_ArrowProxy(operator*()); + } + + bool operator==(const self& ri) const + { + return (_index == ri._index) && (_seq == ri._seq); + } + + bool operator!=(const self& ri) const + { + return !(operator==(ri)); + } + + self& operator ++ () + { + ++_index; + return *this; + } + + self& operator -- () + { + --_index; + return *this; + } + + self& operator += (difference_type n) + { + _index += n; + return *this; + } + + self operator +(difference_type n) const + { + return self(_seq, _index + n); + } + + self& operator -= (difference_type n) + { + _index -= n; + return *this; + } + + self operator -(difference_type n) const + { + return self(_seq, _index - n); + } + + difference_type operator - (const self& ri) const + { + return _index - ri._index; + } + + bool operator < (const self& ri) const + { + return _index < ri._index; + } + + reference + operator[](difference_type n) const + { + return reference(_seq, _index + n); + } + + private: + PyObject* _seq; + difference_type _index; + }; + + template + struct PySequence_Cont + { + typedef PySequence_Ref reference; + typedef const PySequence_Ref const_reference; + typedef T value_type; + typedef T* pointer; + typedef int difference_type; + typedef int size_type; + typedef const pointer const_pointer; + typedef PySequence_InputIterator iterator; + typedef PySequence_InputIterator const_iterator; + + PySequence_Cont(PyObject* seq) : _seq(0) + { + if (!PySequence_Check(seq)) { + throw std::invalid_argument("a sequence is expected"); + } + _seq = seq; + Py_INCREF(_seq); + } + + ~PySequence_Cont() + { + if (_seq) Py_DECREF(_seq); + } + + size_type size() const + { + return PySequence_Size(_seq); + } + + bool empty() const + { + return size() == 0; + } + + iterator begin() + { + return iterator(_seq, 0); + } + + const_iterator begin() const + { + return const_iterator(_seq, 0); + } + + iterator end() + { + return iterator(_seq, size()); + } + + const_iterator end() const + { + return const_iterator(_seq, size()); + } + + reference operator[](difference_type n) + { + return reference(_seq, n); + } + + const_reference operator[](difference_type n) const + { + return const_reference(_seq, n); + } + + bool check(bool set_err = true) const + { + int s = size(); + for (int i = 0; i < s; ++i) { + swig::PyObject_var item = PySequence_GetItem(_seq, i); + if (!swig::check(item)) { + if (set_err) { + char msg[1024]; + sprintf(msg, "in sequence element %d", i); + SWIG_Error(SWIG_RuntimeError, msg); + } + return false; + } + } + return true; + } + + private: + PyObject* _seq; + }; + +} + + +#include +#ifndef LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +#endif +#ifndef LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +#endif +#ifndef ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX +#endif + + +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +namespace swig { + template <> struct traits { + typedef value_category category; + static const char* type_name() { return"int"; } + }; + template <> struct traits_asval { + typedef int value_type; + static int asval(PyObject *obj, value_type *val) { + return SWIG_AsVal_int (obj, val); + } + }; + template <> struct traits_from { + typedef int value_type; + static PyObject *from(const value_type& val) { + return SWIG_From_int (val); + } + }; +} + + +namespace swig { + template + inline void + assign(const PySeq& pyseq, Seq* seq) { +#ifdef SWIG_STD_NOASSIGN_STL + typedef typename PySeq::value_type value_type; + typename PySeq::const_iterator it = pyseq.begin(); + for (;it != pyseq.end(); ++it) { + seq->insert(seq->end(),(value_type)(*it)); + } +#else + seq->assign(pyseq.begin(), pyseq.end()); +#endif + } + + template + struct traits_asptr_stdseq { + typedef Seq sequence; + typedef T value_type; + + static int asptr(PyObject *obj, sequence **seq) { + if (PySequence_Check(obj)) { + try { + PySequence_Cont pyseq(obj); + if (seq) { + sequence *pseq = new sequence(); + assign(pyseq, pseq); + *seq = pseq; + return SWIG_NEWOBJ; + } else { + return pyseq.check() ? SWIG_OK : SWIG_ERROR; + } + } catch (std::exception& e) { + if (seq) { + if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, e.what()); + } + } + return SWIG_ERROR; + } + } else { + sequence *p; + if (SWIG_ConvertPtr(obj,(void**)&p, + swig::type_info(),0) == SWIG_OK) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } + return SWIG_ERROR; + } + }; + + template + struct traits_from_stdseq { + typedef Seq sequence; + typedef T value_type; + typedef typename Seq::size_type size_type; + typedef typename sequence::const_iterator const_iterator; + + static PyObject *from(const sequence& seq) { + + + + + + + size_type size = seq.size(); + if (size <= (size_type)INT_MAX) { + PyObject *obj = PyTuple_New((int)size); + int i = 0; + for (const_iterator it = seq.begin(); + it != seq.end(); ++it, ++i) { + PyTuple_SetItem(obj,i,swig::from(*it)); + } + return obj; + } else { + PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python"); + return NULL; + } + } + }; +} + + + namespace swig { + template + struct traits_asptr > { + static int asptr(PyObject *obj, std::vector **vec) { + return traits_asptr_stdseq >::asptr(obj, vec); + } + }; + + template + struct traits_from > { + static PyObject *from(const std::vector& vec) { + return traits_from_stdseq >::from(vec); + } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef pointer_category category; + static const char* type_name() { + return "std::vector<" "int" "," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_int_Sg____len__(std::vector const *self){ + return self->size(); + } + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +} + +SWIGINTERN std::vector::value_type std_vector_Sl_int_Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_int_Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector const *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type const &x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector *self,std::vector::value_type const &x){ + self->push_back(x); + } + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + + #define SWIG_From_double PyFloat_FromDouble + + +SWIGINTERNINLINE PyObject * +SWIG_From_float (float value) +{ + return SWIG_From_double (value); +} + + +SWIGINTERN int +SWIG_AsVal_float (PyObject * obj, float *val) +{ + double v; + int res = SWIG_AsVal_double (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < -FLT_MAX || v > FLT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< float >(v); + } + } + return res; +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_short (unsigned short value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { + return PyString_FromStringAndSize(carray, static_cast< int >(size)); + } + } else { + return SWIG_Py_Void(); + } +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_std_string (const std::string& s) +{ + if (s.size()) { + return SWIG_FromCharPtrAndSize(s.data(), s.size()); + } else { + return SWIG_FromCharPtrAndSize(s.c_str(), 0); + } +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > USHRT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned short >(v); + } + } + return res; +} + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + if (obj == Py_True) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Py_False) { + if (val) *val = false; + return SWIG_OK; + } else { + long v = 0; + int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0)); + if (SWIG_IsOK(res) && val) *val = v ? true : false; + return res; + } +} + + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"ViewShape"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "ViewShape" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"ViewEdge"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "ViewEdge" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"FEdge"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "FEdge" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"ViewVertex"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "ViewVertex" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"SVertex"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "SVertex" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ + if (PyString_Check(obj)) { + char *cstr; Py_ssize_t len; + PyString_AsStringAndSize(obj, &cstr, &len); + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. + + The default behavior is just to return the pointer value, + so, be careful. + */ +#if defined(SWIG_PYTHON_SAFE_CSTRINGS) + if (*alloc != SWIG_OLDOBJ) +#else + if (*alloc == SWIG_NEWOBJ) +#endif + { + *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } + else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } else { + *cptr = PyString_AsString(obj); + } + } + if (psize) *psize = len + 1; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ; + if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == SWIG_NEWOBJ) delete[] buf; + return SWIG_NEWOBJ; + } else { + if (val) *val = 0; + return SWIG_OLDOBJ; + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0); + if (SWIG_IsOK(res) && val) *val = vptr; + return res; + } + } + return SWIG_ERROR; +} + + + + + + namespace swig { + template <> struct traits { + typedef pointer_category category; + static const char* type_name() { return"StrokeShader"; } + }; + } + + + namespace swig { + template <> struct traits > > { + typedef value_category category; + static const char* type_name() { + return "std::vector<" "StrokeShader" " *," "std::allocator" " >"; + } + }; + } + +SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ + return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); + } +SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector const *self){ + return !(self->empty()); + } +SWIGINTERN std::vector::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector const *self){ + return self->size(); + } +SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector *self){ + if (self->size() == 0) + throw std::out_of_range("pop from empty container"); + std::vector >::value_type x = self->back(); + self->pop_back(); + return x; + } +SWIGINTERN std::vector > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + return swig::getslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ + swig::setslice(self, i, j, v); + } +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ + swig::delslice(self, i, j); + } +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ + self->erase(swig::getpos(self,i)); + } +SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ + return *(swig::cgetpos(self, i)); + } +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ + *(swig::getpos(self,i)) = x; + } +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector *self,std::vector::value_type x){ + self->push_back(x); + } + + +/* --------------------------------------------------- + * C++ director class methods + * --------------------------------------------------- */ + +#include "ModuleWrapper.h" + +SwigDirector_ViewEdgeViewEdgeIterator::SwigDirector_ViewEdgeViewEdgeIterator(PyObject *self, ViewEdge *begin, bool orientation): ViewEdgeInternal::ViewEdgeIterator(begin, orientation), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ViewEdgeInternal::ViewEdgeIterator *)this, this); +} + + + + +SwigDirector_ViewEdgeViewEdgeIterator::SwigDirector_ViewEdgeViewEdgeIterator(PyObject *self, ViewEdgeInternal::ViewEdgeIterator const &it): ViewEdgeInternal::ViewEdgeIterator(it), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ViewEdgeInternal::ViewEdgeIterator *)this, this); +} + + + + +SwigDirector_ViewEdgeViewEdgeIterator::~SwigDirector_ViewEdgeViewEdgeIterator() { +} + +std::string SwigDirector_ViewEdgeViewEdgeIterator::getExactTypeName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getExactTypeName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getExactTypeName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.getExactTypeName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator *() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "getObject"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getObject", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.getObject'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator ->() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "__deref__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "__deref__", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.__deref__'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ViewEdgeViewEdgeIterator::operator ++() { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ViewEdgeViewEdgeIterator::operator ++(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(arg0); +} + + +void SwigDirector_ViewEdgeViewEdgeIterator::increment() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "increment"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "increment", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.increment'"); + } + } +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ViewEdgeViewEdgeIterator::operator --() { + return ViewEdgeInternal::ViewEdgeIterator::operator --(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ViewEdgeViewEdgeIterator::operator --(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator --(arg0); +} + + +void SwigDirector_ViewEdgeViewEdgeIterator::decrement() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 4; + const char * const swig_method_name = "decrement"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "decrement", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.decrement'"); + } + } +} + + +bool SwigDirector_ViewEdgeViewEdgeIterator::isBegin() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 5; + const char * const swig_method_name = "isBegin"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isBegin", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.isBegin'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ViewEdgeViewEdgeIterator::isEnd() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 6; + const char * const swig_method_name = "isEnd"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isEnd", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.isEnd'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ViewEdgeViewEdgeIterator::operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 7; + const char * const swig_method_name = "__eq__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__eq__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.__eq__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ViewEdgeViewEdgeIterator::operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ViewEdgeViewEdgeIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 8; + const char * const swig_method_name = "__ne__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__ne__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ViewEdgeViewEdgeIterator.__ne__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DVoid::~SwigDirector_UnaryFunction0DVoid() { +} + +std::string SwigDirector_UnaryFunction0DVoid::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVoid.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVoid.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +void SwigDirector_UnaryFunction0DVoid::operator ()(Interface0DIterator &iter) { + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVoid.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVoid.__call__'"); + } + } +} + + +SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DUnsigned::~SwigDirector_UnaryFunction0DUnsigned() { +} + +std::string SwigDirector_UnaryFunction0DUnsigned::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DUnsigned.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DUnsigned.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +unsigned int SwigDirector_UnaryFunction0DUnsigned::operator ()(Interface0DIterator &iter) { + unsigned int c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DUnsigned.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DUnsigned.__call__'"); + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""unsigned int""'"); + } + c_result = static_cast< unsigned int >(swig_val); + return (unsigned int) c_result; +} + + +SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DFloat::~SwigDirector_UnaryFunction0DFloat() { +} + +std::string SwigDirector_UnaryFunction0DFloat::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DFloat.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DFloat.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +float SwigDirector_UnaryFunction0DFloat::operator ()(Interface0DIterator &iter) { + float c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DFloat.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DFloat.__call__'"); + } + } + float swig_val; + int swig_res = SWIG_AsVal_float(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""float""'"); + } + c_result = static_cast< float >(swig_val); + return (float) c_result; +} + + +SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DDouble::~SwigDirector_UnaryFunction0DDouble() { +} + +std::string SwigDirector_UnaryFunction0DDouble::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DDouble.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DDouble.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +double SwigDirector_UnaryFunction0DDouble::operator ()(Interface0DIterator &iter) { + double c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DDouble.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DDouble.__call__'"); + } + } + double swig_val; + int swig_res = SWIG_AsVal_double(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'"); + } + c_result = static_cast< double >(swig_val); + return (double) c_result; +} + + +SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DVec2f::~SwigDirector_UnaryFunction0DVec2f() { +} + +std::string SwigDirector_UnaryFunction0DVec2f::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVec2f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec2f.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { + void *swig_argp ; + int swig_res = 0 ; + + VecMat::Vec2 c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVec2f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec2f.__call__'"); + } + } + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + } + c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); + return (VecMat::Vec2) c_result; +} + + +SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DVec3f::~SwigDirector_UnaryFunction0DVec3f() { +} + +std::string SwigDirector_UnaryFunction0DVec3f::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVec3f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec3f.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { + void *swig_argp ; + int swig_res = 0 ; + + VecMat::Vec3 c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DVec3f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec3f.__call__'"); + } + } + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + } + c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); + return (VecMat::Vec3) c_result; +} + + +SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +} + + + + +SwigDirector_UnaryFunction0DId::~SwigDirector_UnaryFunction0DId() { +} + +std::string SwigDirector_UnaryFunction0DId::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DId.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DId.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +Id SwigDirector_UnaryFunction0DId::operator ()(Interface0DIterator &iter) { + void *swig_argp ; + int swig_res = 0 ; + + Id c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction0DId.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DId.__call__'"); + } + } + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Id""'"); + } + c_result = *(reinterpret_cast< Id * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< Id * >(swig_argp); + return (Id) c_result; +} + + +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVoid::~SwigDirector_UnaryFunction1DVoid() { +} + +std::string SwigDirector_UnaryFunction1DVoid::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVoid.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVoid.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +void SwigDirector_UnaryFunction1DVoid::operator ()(Interface1D &inter) { + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVoid.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVoid.__call__'"); + } + } +} + + +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DUnsigned::~SwigDirector_UnaryFunction1DUnsigned() { +} + +std::string SwigDirector_UnaryFunction1DUnsigned::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DUnsigned.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DUnsigned.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +unsigned int SwigDirector_UnaryFunction1DUnsigned::operator ()(Interface1D &inter) { + unsigned int c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DUnsigned.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DUnsigned.__call__'"); + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""unsigned int""'"); + } + c_result = static_cast< unsigned int >(swig_val); + return (unsigned int) c_result; +} + + +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DFloat::~SwigDirector_UnaryFunction1DFloat() { +} + +std::string SwigDirector_UnaryFunction1DFloat::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DFloat.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DFloat.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +float SwigDirector_UnaryFunction1DFloat::operator ()(Interface1D &inter) { + float c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DFloat.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DFloat.__call__'"); + } + } + float swig_val; + int swig_res = SWIG_AsVal_float(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""float""'"); + } + c_result = static_cast< float >(swig_val); + return (float) c_result; +} + + +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DDouble::~SwigDirector_UnaryFunction1DDouble() { +} + +std::string SwigDirector_UnaryFunction1DDouble::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DDouble.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DDouble.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +double SwigDirector_UnaryFunction1DDouble::operator ()(Interface1D &inter) { + double c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DDouble.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DDouble.__call__'"); + } + } + double swig_val; + int swig_res = SWIG_AsVal_double(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""double""'"); + } + c_result = static_cast< double >(swig_val); + return (double) c_result; +} + + +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVec2f::~SwigDirector_UnaryFunction1DVec2f() { +} + +std::string SwigDirector_UnaryFunction1DVec2f::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVec2f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec2f.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { + void *swig_argp ; + int swig_res = 0 ; + + VecMat::Vec2 c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVec2f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec2f.__call__'"); + } + } + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + } + c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); + return (VecMat::Vec2) c_result; +} + + +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +} + + + + +SwigDirector_UnaryFunction1DVec3f::~SwigDirector_UnaryFunction1DVec3f() { +} + +std::string SwigDirector_UnaryFunction1DVec3f::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVec3f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec3f.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { + void *swig_argp ; + int swig_res = 0 ; + + VecMat::Vec3 c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryFunction1DVec3f.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec3f.__call__'"); + } + } + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + } + c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); + return (VecMat::Vec3) c_result; +} + + +SwigDirector_ChainingIterator::SwigDirector_ChainingIterator(PyObject *self, bool iRestrictToSelection, bool iRestrictToUnvisited, ViewEdge *begin, bool orientation): ChainingIterator(iRestrictToSelection, iRestrictToUnvisited, begin, orientation), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainingIterator *)this, this); +} + + + + +SwigDirector_ChainingIterator::SwigDirector_ChainingIterator(PyObject *self, ChainingIterator const &brother): ChainingIterator(brother), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainingIterator *)this, this); +} + + + + +SwigDirector_ChainingIterator::~SwigDirector_ChainingIterator() { +} + +std::string SwigDirector_ChainingIterator::getExactTypeName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getExactTypeName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getExactTypeName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.getExactTypeName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +ViewEdge *SwigDirector_ChainingIterator::operator *() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "getObject"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getObject", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.getObject'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdge *SwigDirector_ChainingIterator::operator ->() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "__deref__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "__deref__", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.__deref__'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainingIterator::operator ++() { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainingIterator::operator ++(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(arg0); +} + + +void SwigDirector_ChainingIterator::increment() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "increment"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "increment", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.increment'"); + } + } +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainingIterator::operator --() { + return ViewEdgeInternal::ViewEdgeIterator::operator --(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainingIterator::operator --(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator --(arg0); +} + + +void SwigDirector_ChainingIterator::decrement() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 4; + const char * const swig_method_name = "decrement"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "decrement", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.decrement'"); + } + } +} + + +bool SwigDirector_ChainingIterator::isBegin() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 5; + const char * const swig_method_name = "isBegin"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isBegin", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.isBegin'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainingIterator::isEnd() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 6; + const char * const swig_method_name = "isEnd"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isEnd", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.isEnd'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainingIterator::operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 7; + const char * const swig_method_name = "__eq__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__eq__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.__eq__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainingIterator::operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 8; + const char * const swig_method_name = "__ne__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__ne__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.__ne__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +void SwigDirector_ChainingIterator::init() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 9; + const char * const swig_method_name = "init"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "init", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.init'"); + } + } +} + + +ViewEdge *SwigDirector_ChainingIterator::traverse(AdjacencyIterator const &it) { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_AdjacencyIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainingIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 10; + const char * const swig_method_name = "traverse"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"traverse", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainingIterator.traverse'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +SwigDirector_ChainSilhouetteIterator::SwigDirector_ChainSilhouetteIterator(PyObject *self, bool iRestrictToSelection, ViewEdge *begin, bool orientation): ChainSilhouetteIterator(iRestrictToSelection, begin, orientation), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainSilhouetteIterator *)this, this); +} + + + + +SwigDirector_ChainSilhouetteIterator::SwigDirector_ChainSilhouetteIterator(PyObject *self, ChainSilhouetteIterator const &brother): ChainSilhouetteIterator(brother), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainSilhouetteIterator *)this, this); +} + + + + +SwigDirector_ChainSilhouetteIterator::~SwigDirector_ChainSilhouetteIterator() { +} + +std::string SwigDirector_ChainSilhouetteIterator::getExactTypeName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getExactTypeName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getExactTypeName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.getExactTypeName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +ViewEdge *SwigDirector_ChainSilhouetteIterator::operator *() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "getObject"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getObject", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.getObject'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdge *SwigDirector_ChainSilhouetteIterator::operator ->() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "__deref__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "__deref__", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.__deref__'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainSilhouetteIterator::operator ++() { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainSilhouetteIterator::operator ++(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(arg0); +} + + +void SwigDirector_ChainSilhouetteIterator::increment() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "increment"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "increment", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.increment'"); + } + } +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainSilhouetteIterator::operator --() { + return ViewEdgeInternal::ViewEdgeIterator::operator --(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainSilhouetteIterator::operator --(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator --(arg0); +} + + +void SwigDirector_ChainSilhouetteIterator::decrement() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 4; + const char * const swig_method_name = "decrement"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "decrement", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.decrement'"); + } + } +} + + +bool SwigDirector_ChainSilhouetteIterator::isBegin() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 5; + const char * const swig_method_name = "isBegin"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isBegin", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.isBegin'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainSilhouetteIterator::isEnd() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 6; + const char * const swig_method_name = "isEnd"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isEnd", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.isEnd'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainSilhouetteIterator::operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 7; + const char * const swig_method_name = "__eq__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__eq__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.__eq__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainSilhouetteIterator::operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 8; + const char * const swig_method_name = "__ne__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__ne__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.__ne__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +void SwigDirector_ChainSilhouetteIterator::init() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 9; + const char * const swig_method_name = "init"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "init", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.init'"); + } + } +} + + +ViewEdge *SwigDirector_ChainSilhouetteIterator::traverse(AdjacencyIterator const &it) { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_AdjacencyIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainSilhouetteIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 10; + const char * const swig_method_name = "traverse"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"traverse", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainSilhouetteIterator.traverse'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +SwigDirector_ChainPredicateIterator::SwigDirector_ChainPredicateIterator(PyObject *self, bool iRestrictToSelection, bool iRestrictToUnvisited, ViewEdge *begin, bool orientation): ChainPredicateIterator(iRestrictToSelection, iRestrictToUnvisited, begin, orientation), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainPredicateIterator *)this, this); +} + + + + +SwigDirector_ChainPredicateIterator::SwigDirector_ChainPredicateIterator(PyObject *self, UnaryPredicate1D &upred, BinaryPredicate1D &bpred, bool iRestrictToSelection, bool iRestrictToUnvisited, ViewEdge *begin, bool orientation): ChainPredicateIterator(upred, bpred, iRestrictToSelection, iRestrictToUnvisited, begin, orientation), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainPredicateIterator *)this, this); +} + + + + +SwigDirector_ChainPredicateIterator::SwigDirector_ChainPredicateIterator(PyObject *self, ChainPredicateIterator const &brother): ChainPredicateIterator(brother), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((ChainPredicateIterator *)this, this); +} + + + + +SwigDirector_ChainPredicateIterator::~SwigDirector_ChainPredicateIterator() { +} + +std::string SwigDirector_ChainPredicateIterator::getExactTypeName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getExactTypeName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getExactTypeName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.getExactTypeName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +ViewEdge *SwigDirector_ChainPredicateIterator::operator *() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "getObject"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getObject", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.getObject'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdge *SwigDirector_ChainPredicateIterator::operator ->() { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 2; + const char * const swig_method_name = "__deref__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "__deref__", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.__deref__'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainPredicateIterator::operator ++() { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainPredicateIterator::operator ++(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator ++(arg0); +} + + +void SwigDirector_ChainPredicateIterator::increment() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 3; + const char * const swig_method_name = "increment"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "increment", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.increment'"); + } + } +} + + +ViewEdgeInternal::ViewEdgeIterator &SwigDirector_ChainPredicateIterator::operator --() { + return ViewEdgeInternal::ViewEdgeIterator::operator --(); +} + + +ViewEdgeInternal::ViewEdgeIterator SwigDirector_ChainPredicateIterator::operator --(int arg0) { + return ViewEdgeInternal::ViewEdgeIterator::operator --(arg0); +} + + +void SwigDirector_ChainPredicateIterator::decrement() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 4; + const char * const swig_method_name = "decrement"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "decrement", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.decrement'"); + } + } +} + + +bool SwigDirector_ChainPredicateIterator::isBegin() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 5; + const char * const swig_method_name = "isBegin"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isBegin", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.isBegin'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainPredicateIterator::isEnd() const { + bool c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 6; + const char * const swig_method_name = "isEnd"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "isEnd", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.isEnd'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainPredicateIterator::operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 7; + const char * const swig_method_name = "__eq__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__eq__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.__eq__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +bool SwigDirector_ChainPredicateIterator::operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 8; + const char * const swig_method_name = "__ne__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__ne__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.__ne__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +void SwigDirector_ChainPredicateIterator::init() { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 9; + const char * const swig_method_name = "init"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "init", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.init'"); + } + } +} + + +ViewEdge *SwigDirector_ChainPredicateIterator::traverse(AdjacencyIterator const &it) { + void *swig_argp ; + int swig_res ; + swig_owntype own ; + + ViewEdge *c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_AdjacencyIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ChainPredicateIterator.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 10; + const char * const swig_method_name = "traverse"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"traverse", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'ChainPredicateIterator.traverse'"); + } + } + swig_res = SWIG_ConvertPtrAndOwn(result, &swig_argp, SWIGTYPE_p_ViewEdge, 0 | SWIG_POINTER_DISOWN, &own); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); + } + c_result = reinterpret_cast< ViewEdge * >(swig_argp); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + return (ViewEdge *) c_result; +} + + +SwigDirector_UnaryPredicate0D::SwigDirector_UnaryPredicate0D(PyObject *self): UnaryPredicate0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryPredicate0D *)this, this); +} + + + + +SwigDirector_UnaryPredicate0D::~SwigDirector_UnaryPredicate0D() { +} + +std::string SwigDirector_UnaryPredicate0D::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryPredicate0D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryPredicate0D.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +bool SwigDirector_UnaryPredicate0D::operator ()(Interface0DIterator &it) { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&it), SWIGTYPE_p_Interface0DIterator, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryPredicate0D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryPredicate0D.__call__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +SwigDirector_UnaryPredicate1D::SwigDirector_UnaryPredicate1D(PyObject *self): UnaryPredicate1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryPredicate1D *)this, this); +} + + + + +SwigDirector_UnaryPredicate1D::~SwigDirector_UnaryPredicate1D() { +} + +std::string SwigDirector_UnaryPredicate1D::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryPredicate1D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryPredicate1D.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +bool SwigDirector_UnaryPredicate1D::operator ()(Interface1D &inter) { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call UnaryPredicate1D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'UnaryPredicate1D.__call__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +SwigDirector_BinaryPredicate1D::SwigDirector_BinaryPredicate1D(PyObject *self): BinaryPredicate1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((BinaryPredicate1D *)this, this); +} + + + + +SwigDirector_BinaryPredicate1D::~SwigDirector_BinaryPredicate1D() { +} + +std::string SwigDirector_BinaryPredicate1D::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call BinaryPredicate1D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'BinaryPredicate1D.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +bool SwigDirector_BinaryPredicate1D::operator ()(Interface1D &inter1, Interface1D &inter2) { + bool c_result; + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter1), SWIGTYPE_p_Interface1D, 0 ); + swig::PyObject_var obj1; + obj1 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter2), SWIGTYPE_p_Interface1D, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call BinaryPredicate1D.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"__call__", (char *)"(OO)" ,(PyObject *)obj0,(PyObject *)obj1); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'BinaryPredicate1D.__call__'"); + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!SWIG_IsOK(swig_res)) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + return (bool) c_result; +} + + +SwigDirector_StrokeShader::SwigDirector_StrokeShader(PyObject *self): StrokeShader(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((StrokeShader *)this, this); +} + + + + +SwigDirector_StrokeShader::~SwigDirector_StrokeShader() { +} + +std::string SwigDirector_StrokeShader::getName() const { + std::string c_result; + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StrokeShader.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 0; + const char * const swig_method_name = "getName"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, NULL, NULL); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *) "getName", NULL); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'StrokeShader.getName'"); + } + } + std::string *swig_optr = 0; + int swig_ores = SWIG_AsPtr_std_string(result, &swig_optr); + if (!SWIG_IsOK(swig_ores) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (SWIG_IsNewObj(swig_ores)) delete swig_optr; + return (std::string) c_result; +} + + +void SwigDirector_StrokeShader::shade(Stroke &ioStroke) const { + swig::PyObject_var obj0; + obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&ioStroke), SWIGTYPE_p_Stroke, 0 ); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StrokeShader.__init__."); + } +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) + const size_t swig_method_index = 1; + const char * const swig_method_name = "shade"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::PyObject_var result = PyObject_CallFunction(method, (char *)"(O)" ,(PyObject *)obj0); +#else + swig::PyObject_var result = PyObject_CallMethod(swig_get_self(), (char *)"shade", (char *)"(O)" ,(PyObject *)obj0); +#endif + if (result == NULL) { + PyObject *error = PyErr_Occurred(); + if (error != NULL) { + Swig::DirectorMethodException::raise("Error detected when calling 'StrokeShader.shade'"); + } + } +} + + +#ifdef __cplusplus +extern "C" { +#endif +SWIGINTERN PyObject *_wrap_delete_PySwigIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_PySwigIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PySwigIterator" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + PyObject *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_value",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_value" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + try { + result = (PyObject *)((swig::PySwigIterator const *)arg1)->value(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + size_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator_incr",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_incr" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_incr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + try { + result = (swig::PySwigIterator *)(arg1)->incr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_incr",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_incr" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + try { + result = (swig::PySwigIterator *)(arg1)->incr(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_PySwigIterator_incr__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_PySwigIterator_incr__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n Possible C/C++ prototypes are:\n incr(size_t)\n incr()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + size_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator_decr",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_decr" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_decr" "', argument " "2"" of type '" "size_t""'"); + } + arg2 = static_cast< size_t >(val2); + try { + result = (swig::PySwigIterator *)(arg1)->decr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_decr",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_decr" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + try { + result = (swig::PySwigIterator *)(arg1)->decr(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_PySwigIterator_decr__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_PySwigIterator_decr__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n Possible C/C++ prototypes are:\n decr(size_t)\n decr()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *arg2 = 0 ; + ptrdiff_t result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator_distance",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_distance" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator_distance" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator_distance" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2); + try { + result = ((swig::PySwigIterator const *)arg1)->distance((swig::PySwigIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator_equal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_equal" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator_equal" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator_equal" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2); + try { + result = (bool)((swig::PySwigIterator const *)arg1)->equal((swig::PySwigIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail; + } + + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_copy" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->copy(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + PyObject *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_next",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_next" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + try { + result = (PyObject *)(arg1)->next(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + PyObject *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySwigIterator_previous",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_previous" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + try { + result = (PyObject *)(arg1)->previous(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = result; + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + ptrdiff_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator_advance",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator_advance" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::PySwigIterator *)(arg1)->advance(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___eq__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___eq__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___eq__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2); + result = (bool)((swig::PySwigIterator const *)arg1)->operator ==((swig::PySwigIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___ne__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___ne__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___ne__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2); + result = (bool)((swig::PySwigIterator const *)arg1)->operator !=((swig::PySwigIterator const &)*arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + ptrdiff_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___iadd__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___iadd__" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + { + swig::PySwigIterator &_result_ref = (arg1)->operator +=(arg2); + result = (swig::PySwigIterator *) &_result_ref; + } + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + ptrdiff_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___isub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___isub__" "', argument " "1"" of type '" "swig::PySwigIterator *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + { + swig::PySwigIterator &_result_ref = (arg1)->operator -=(arg2); + result = (swig::PySwigIterator *) &_result_ref; + } + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + ptrdiff_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___add__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->operator +(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + ptrdiff_t arg2 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___sub__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); + } + arg2 = static_cast< ptrdiff_t >(val2); + try { + result = (swig::PySwigIterator *)((swig::PySwigIterator const *)arg1)->operator -(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + SWIG_fail; + } + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + swig::PySwigIterator *arg1 = (swig::PySwigIterator *) 0 ; + swig::PySwigIterator *arg2 = 0 ; + ptrdiff_t result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySwigIterator___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__PySwigIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySwigIterator___sub__" "', argument " "1"" of type '" "swig::PySwigIterator const *""'"); + } + arg1 = reinterpret_cast< swig::PySwigIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__PySwigIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySwigIterator___sub__" "', argument " "2"" of type '" "swig::PySwigIterator const &""'"); + } + arg2 = reinterpret_cast< swig::PySwigIterator * >(argp2); + result = ((swig::PySwigIterator const *)arg1)->operator -((swig::PySwigIterator const &)*arg2); + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySwigIterator___sub__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_PySwigIterator___sub____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__PySwigIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_PySwigIterator___sub____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *PySwigIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_swig__PySwigIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (swig::PySwigIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector const *)arg1); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector const *)arg1); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + try { + result = (std::vector::value_type)std_vector_Sl_int_Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + try { + result = (std::vector > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + try { + std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + try { + std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + try { + std_vector_Sl_int_Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + try { + { + std::vector::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector const *)arg1,arg2); + result = (std::vector::value_type *) &_result_ref; + } + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + std::vector::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + temp3 = static_cast< std::vector::value_type >(val3); + arg3 = &temp3; + try { + std_vector_Sl_int_Sg____setitem__(arg1,arg2,(int const &)*arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + temp2 = static_cast< std::vector::value_type >(val2); + arg2 = &temp2; + std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_vectorInt")) SWIG_fail; + result = (std::vector *)new std::vector(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + result = (std::vector *)new std::vector((std::vector const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (bool)((std::vector const *)arg1)->empty(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->size(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + (arg1)->clear(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + (arg1)->swap(*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + result = (std::vector *)new std::vector(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + (arg1)->pop_back(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + (arg1)->resize(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + result = (arg1)->erase(arg2); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + result = (arg1)->erase(arg2,arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_vectorInt_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_vectorInt_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type *arg2 = 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + std::vector::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_vectorInt",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + temp2 = static_cast< std::vector::value_type >(val2); + arg2 = &temp2; + result = (std::vector *)new std::vector(arg1,(std::vector::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_vectorInt__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_vectorInt__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_vectorInt__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_vectorInt__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n Possible C/C++ prototypes are:\n std::vector<(int)>()\n std::vector<(int)>(std::vector const &)\n std::vector<(int)>(std::vector::size_type)\n std::vector<(int)>(std::vector::size_type,std::vector::value_type const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::vector::value_type temp2 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + temp2 = static_cast< std::vector::value_type >(val2); + arg2 = &temp2; + (arg1)->push_back((std::vector::value_type const &)*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->front(); + result = (std::vector::value_type *) &_result_ref; + } + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->back(); + result = (std::vector::value_type *) &_result_ref; + } + resultobj = SWIG_From_int(static_cast< int >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + temp3 = static_cast< std::vector::value_type >(val3); + arg3 = &temp3; + (arg1)->assign(arg2,(std::vector::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + std::vector::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + temp3 = static_cast< std::vector::value_type >(val3); + arg3 = &temp3; + (arg1)->resize(arg2,(std::vector::value_type const &)*arg3); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_vectorInt_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_vectorInt_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type *arg3 = 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + std::vector::value_type temp3 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + temp3 = static_cast< std::vector::value_type >(val3); + arg3 = &temp3; + result = (arg1)->insert(arg2,(std::vector::value_type const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + std::vector::value_type temp4 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + temp4 = static_cast< std::vector::value_type >(val4); + arg4 = &temp4; + (arg1)->insert(arg2,arg3,(std::vector::value_type const &)*arg4); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_vectorInt_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_vectorInt_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type const &)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + (arg1)->reserve(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->capacity(); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_vectorInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_vectorInt",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *vectorInt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Id__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Id")) SWIG_fail; + { + try { + result = (Id *)new Id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Id__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id::id_type arg1 ; + Id *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Id",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Id" "', argument " "1"" of type '" "Id::id_type""'"); + } + arg1 = static_cast< Id::id_type >(val1); + { + try { + result = (Id *)new Id(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Id__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id::id_type arg1 ; + Id::id_type arg2 ; + Id *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Id",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Id" "', argument " "1"" of type '" "Id::id_type""'"); + } + arg1 = static_cast< Id::id_type >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Id" "', argument " "2"" of type '" "Id::id_type""'"); + } + arg2 = static_cast< Id::id_type >(val2); + { + try { + result = (Id *)new Id(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Id__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = 0 ; + Id *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Id" "', argument " "1"" of type '" "Id const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Id" "', argument " "1"" of type '" "Id const &""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + { + try { + result = (Id *)new Id((Id const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Id__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Id, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Id__SWIG_3(self, args); + } + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Id__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Id__SWIG_2(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n Possible C/C++ prototypes are:\n Id()\n Id(Id::id_type)\n Id(Id::id_type,Id::id_type)\n Id(Id const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id_getFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id::id_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Id_getFirst",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id_getFirst" "', argument " "1"" of type '" "Id const *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + { + try { + result = (Id::id_type)((Id const *)arg1)->getFirst(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id_getSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id::id_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Id_getSecond",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id_getSecond" "', argument " "1"" of type '" "Id const *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + { + try { + result = (Id::id_type)((Id const *)arg1)->getSecond(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id_setFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id::id_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Id_setFirst",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id_setFirst" "', argument " "1"" of type '" "Id *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Id_setFirst" "', argument " "2"" of type '" "Id::id_type""'"); + } + arg2 = static_cast< Id::id_type >(val2); + { + try { + (arg1)->setFirst(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id_setSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id::id_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Id_setSecond",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id_setSecond" "', argument " "1"" of type '" "Id *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Id_setSecond" "', argument " "2"" of type '" "Id::id_type""'"); + } + arg2 = static_cast< Id::id_type >(val2); + { + try { + (arg1)->setSecond(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Id___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id___eq__" "', argument " "1"" of type '" "Id const *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Id___eq__" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Id___eq__" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + result = (bool)((Id const *)arg1)->operator ==((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Id___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id___ne__" "', argument " "1"" of type '" "Id const *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Id___ne__" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Id___ne__" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + result = (bool)((Id const *)arg1)->operator !=((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Id___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + Id *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Id___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Id___lt__" "', argument " "1"" of type '" "Id const *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Id___lt__" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Id___lt__" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + result = (bool)((Id const *)arg1)->operator <((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = (Id *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Id, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Id" "', argument " "1"" of type '" "Id *""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Id, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_2u")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_2u_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_2u___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_2u___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_2i")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2i",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_2i_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_2i___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_2i___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_2d")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_2d_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_2d___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_2d___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_2f")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_2f_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_2f___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_2f___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec2u")) SWIG_fail; + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2u",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2u",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec2u__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2u__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2u__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(unsigned int)>()\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2u_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2u_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2u_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2u_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2u___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec2u___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec2i")) SWIG_fail; + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2i",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2i",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec2i__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2i__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2i__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(int)>()\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2i_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2i_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2i_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2i_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2i___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec2i___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2i",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec2f")) SWIG_fail; + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2f",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2f",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec2f__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2f__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2f__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(float)>()\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2f_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2f_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2f_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2f_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2f___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec2f___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec2d")) SWIG_fail; + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2d",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2d",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + } + arg1 = static_cast< VecMat::Vec2::value_type >(val1); + { + try { + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec2d__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2d__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec2d__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(double)>()\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2d_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2d_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + { + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2d_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2d_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + } + arg2 = static_cast< VecMat::Vec2::value_type >(val2); + { + try { + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + { + try { + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec2d___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec2d___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_3u")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_3u_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_3u___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_3u___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_3i")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3i",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_3i_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_3i___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_3i___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_3d")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_3d_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_3d___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_3d___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec_3f")) SWIG_fail; + { + try { + result = (VecMat::Vec *)new VecMat::Vec(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Vec_3f_dim")) SWIG_fail; + { + try { + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_norm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_squareNorm",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalizeSafe",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + { + try { + { + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + } + arg2 = static_cast< VecMat::Vec::value_type >(val2); + { + try { + result = ((VecMat::Vec const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec_3f___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec_3f___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___lt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___gt__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + { + try { + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec_3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec3u")) SWIG_fail; + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3u",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + } + arg3 = static_cast< VecMat::Vec3::value_type >(val3); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3u",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3u",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec3u__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3u__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3u__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3u__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(unsigned int)>()\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_z__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u_z__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setZ",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setZ(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3u___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec3u___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___xor__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec3i")) SWIG_fail; + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3i",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + } + arg3 = static_cast< VecMat::Vec3::value_type >(val3); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3i",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3i",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec3i__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3i__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3i__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3i__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(int)>()\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_z__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i_z__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setZ",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setZ(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3i___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec3i___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___xor__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3i",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec3f")) SWIG_fail; + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3f",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + } + arg3 = static_cast< VecMat::Vec3::value_type >(val3); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3f",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3f",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec3f__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3f__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3f__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3f__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(float)>()\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_z__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f_z__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setZ",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setZ(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3f___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec3f___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___xor__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Vec3d")) SWIG_fail; + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3d",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + } + arg3 = static_cast< VecMat::Vec3::value_type >(val3); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3d",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3d",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + } + arg1 = static_cast< VecMat::Vec3::value_type >(val1); + { + try { + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Vec3d__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3d__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3d__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Vec3d__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(double)>()\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_x__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_x__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_y__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_y__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + { + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_z__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d_z__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setZ",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + (arg1)->setZ(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___add__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___sub__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___div__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + } + arg2 = static_cast< VecMat::Vec3::value_type >(val2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Vec3d___mul____SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Vec3d___mul____SWIG_0(self, args); + } + } + } + +fail: + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; +} + + +SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___xor__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + } + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + { + try { + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Vec3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + } + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Vec3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Noise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Noise")) SWIG_fail; + { + try { + result = (Noise *)new Noise(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Noise, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Noise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Noise",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Noise" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + unsigned int arg5 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + unsigned int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Noise_turbulence1",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence1" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Noise_turbulence1" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence1" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence1" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Noise_turbulence1" "', argument " "5"" of type '" "unsigned int""'"); + } + arg5 = static_cast< unsigned int >(val5); + { + try { + result = (float)(arg1)->turbulence1(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:Noise_turbulence1",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence1" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Noise_turbulence1" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence1" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence1" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + result = (float)(arg1)->turbulence1(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence1__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence1__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n Possible C/C++ prototypes are:\n turbulence1(float,float,float,unsigned int)\n turbulence1(float,float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + float arg3 ; + float arg4 ; + unsigned int arg5 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + unsigned int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Noise_turbulence2",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence2" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence2" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Noise_turbulence2" "', argument " "5"" of type '" "unsigned int""'"); + } + arg5 = static_cast< unsigned int >(val5); + { + try { + result = (float)(arg1)->turbulence2(*arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + float arg3 ; + float arg4 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:Noise_turbulence2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence2" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence2" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + result = (float)(arg1)->turbulence2(*arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence2__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence2__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n Possible C/C++ prototypes are:\n turbulence2(Geometry::Vec2f &,float,float,unsigned int)\n turbulence2(Geometry::Vec2f &,float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec3f *arg2 = 0 ; + float arg3 ; + float arg4 ; + unsigned int arg5 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + unsigned int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Noise_turbulence3",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3f * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence3" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence3" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Noise_turbulence3" "', argument " "5"" of type '" "unsigned int""'"); + } + arg5 = static_cast< unsigned int >(val5); + { + try { + result = (float)(arg1)->turbulence3(*arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec3f *arg2 = 0 ; + float arg3 ; + float arg4 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:Noise_turbulence3",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3f * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Noise_turbulence3" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Noise_turbulence3" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + result = (float)(arg1)->turbulence3(*arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence3__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Noise, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Noise_turbulence3__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n Possible C/C++ prototypes are:\n turbulence3(Geometry::Vec3f &,float,float,unsigned int)\n turbulence3(Geometry::Vec3f &,float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + float arg2 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Noise_smoothNoise1",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise1" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Noise_smoothNoise1" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (float)(arg1)->smoothNoise1(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Noise_smoothNoise2",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise2" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_smoothNoise2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + { + try { + result = (float)(arg1)->smoothNoise2(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Noise *arg1 = (Noise *) 0 ; + Geometry::Vec3f *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Noise_smoothNoise3",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Noise, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise3" "', argument " "1"" of type '" "Noise *""'"); + } + arg1 = reinterpret_cast< Noise * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Noise_smoothNoise3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3f * >(argp2); + { + try { + result = (float)(arg1)->smoothNoise3(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Noise_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Noise, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Material__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Material")) SWIG_fail; + { + try { + result = (Material *)new Material(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Material__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float *arg1 = (float *) 0 ; + float *arg2 = (float *) 0 ; + float *arg3 = (float *) 0 ; + float *arg4 = (float *) 0 ; + float arg5 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_Material",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Material" "', argument " "1"" of type '" "float const *""'"); + } + arg1 = reinterpret_cast< float * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Material" "', argument " "2"" of type '" "float const *""'"); + } + arg2 = reinterpret_cast< float * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Material" "', argument " "3"" of type '" "float const *""'"); + } + arg3 = reinterpret_cast< float * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Material" "', argument " "4"" of type '" "float const *""'"); + } + arg4 = reinterpret_cast< float * >(argp4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Material" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + result = (Material *)new Material((float const *)arg1,(float const *)arg2,(float const *)arg3,(float const *)arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Material__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = 0 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Material",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Material, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Material" "', argument " "1"" of type '" "Material const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Material" "', argument " "1"" of type '" "Material const &""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (Material *)new Material((Material const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Material__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Material, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Material__SWIG_2(self, args); + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Material__SWIG_1(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n Possible C/C++ prototypes are:\n Material()\n Material(float const *,float const *,float const *,float const *,float const)\n Material(Material const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Material",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Material" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_diffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_diffuse",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_diffuse" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float *)((Material const *)arg1)->diffuse(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_diffuseR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_diffuseR" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->diffuseR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_diffuseG",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_diffuseG" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->diffuseG(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_diffuseB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_diffuseB" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->diffuseB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_diffuseA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_diffuseA" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->diffuseA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_specular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_specular",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_specular" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float *)((Material const *)arg1)->specular(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_specularR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_specularR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_specularR" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->specularR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_specularG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_specularG",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_specularG" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->specularG(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_specularB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_specularB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_specularB" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->specularB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_specularA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_specularA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_specularA" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->specularA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_ambient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_ambient",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_ambient" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float *)((Material const *)arg1)->ambient(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_ambientR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_ambientR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_ambientR" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->ambientR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_ambientG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_ambientG",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_ambientG" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->ambientG(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_ambientB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_ambientB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_ambientB" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->ambientB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_ambientA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_ambientA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_ambientA" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->ambientA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_emission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_emission",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_emission" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float *)((Material const *)arg1)->emission(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_emissionR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_emissionR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_emissionR" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->emissionR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_emissionG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_emissionG",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_emissionG" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->emissionG(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_emissionB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_emissionB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_emissionB" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->emissionB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_emissionA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_emissionA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_emissionA" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->emissionA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_shininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Material_shininess",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_shininess" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + { + try { + result = (float)((Material const *)arg1)->shininess(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_SetDiffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetDiffuse",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetDiffuse" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetDiffuse" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetDiffuse" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetDiffuse" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetDiffuse" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + (arg1)->SetDiffuse(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_SetSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetSpecular",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetSpecular" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetSpecular" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetSpecular" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetSpecular" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetSpecular" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + (arg1)->SetSpecular(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_SetAmbient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetAmbient",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetAmbient" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetAmbient" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetAmbient" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetAmbient" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetAmbient" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + (arg1)->SetAmbient(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_SetEmission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetEmission",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetEmission" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetEmission" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetEmission" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetEmission" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetEmission" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + (arg1)->SetEmission(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material_SetShininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Material_SetShininess",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetShininess" "', argument " "1"" of type '" "Material *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetShininess" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetShininess(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + Material *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Material___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material___ne__" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Material, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Material___ne__" "', argument " "2"" of type '" "Material const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Material___ne__" "', argument " "2"" of type '" "Material const &""'"); + } + arg2 = reinterpret_cast< Material * >(argp2); + { + try { + result = (bool)((Material const *)arg1)->operator !=((Material const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Material___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Material *arg1 = (Material *) 0 ; + Material *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Material___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material___eq__" "', argument " "1"" of type '" "Material const *""'"); + } + arg1 = reinterpret_cast< Material * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Material, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Material___eq__" "', argument " "2"" of type '" "Material const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Material___eq__" "', argument " "2"" of type '" "Material const &""'"); + } + arg2 = reinterpret_cast< Material * >(argp2); + { + try { + result = (bool)((Material const *)arg1)->operator ==((Material const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Material_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Material, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN int POINT_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable POINT is read-only."); + return 1; +} + + +SWIGINTERN PyObject *POINT_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::POINT)); + return pyobj; +} + + +SWIGINTERN int S_VERTEX_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable S_VERTEX is read-only."); + return 1; +} + + +SWIGINTERN PyObject *S_VERTEX_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::S_VERTEX)); + return pyobj; +} + + +SWIGINTERN int VIEW_VERTEX_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable VIEW_VERTEX is read-only."); + return 1; +} + + +SWIGINTERN PyObject *VIEW_VERTEX_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VIEW_VERTEX)); + return pyobj; +} + + +SWIGINTERN int NON_T_VERTEX_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable NON_T_VERTEX is read-only."); + return 1; +} + + +SWIGINTERN PyObject *NON_T_VERTEX_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NON_T_VERTEX)); + return pyobj; +} + + +SWIGINTERN int T_VERTEX_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable T_VERTEX is read-only."); + return 1; +} + + +SWIGINTERN PyObject *T_VERTEX_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::T_VERTEX)); + return pyobj; +} + + +SWIGINTERN int CUSP_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable CUSP is read-only."); + return 1; +} + + +SWIGINTERN PyObject *CUSP_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CUSP)); + return pyobj; +} + + +SWIGINTERN int NO_FEATURE_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable NO_FEATURE is read-only."); + return 1; +} + + +SWIGINTERN PyObject *NO_FEATURE_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NO_FEATURE)); + return pyobj; +} + + +SWIGINTERN int SILHOUETTE_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable SILHOUETTE is read-only."); + return 1; +} + + +SWIGINTERN PyObject *SILHOUETTE_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SILHOUETTE)); + return pyobj; +} + + +SWIGINTERN int BORDER_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable BORDER is read-only."); + return 1; +} + + +SWIGINTERN PyObject *BORDER_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::BORDER)); + return pyobj; +} + + +SWIGINTERN int CREASE_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable CREASE is read-only."); + return 1; +} + + +SWIGINTERN PyObject *CREASE_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CREASE)); + return pyobj; +} + + +SWIGINTERN int RIDGE_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable RIDGE is read-only."); + return 1; +} + + +SWIGINTERN PyObject *RIDGE_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::RIDGE)); + return pyobj; +} + + +SWIGINTERN int VALLEY_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable VALLEY is read-only."); + return 1; +} + + +SWIGINTERN PyObject *VALLEY_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VALLEY)); + return pyobj; +} + + +SWIGINTERN int SUGGESTIVE_CONTOUR_set(PyObject *) { + SWIG_Error(SWIG_AttributeError,"Variable SUGGESTIVE_CONTOUR is read-only."); + return 1; +} + + +SWIGINTERN PyObject *SUGGESTIVE_CONTOUR_get(void) { + PyObject *pyobj = 0; + + pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SUGGESTIVE_CONTOUR)); + return pyobj; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getExactTypeName" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = ((Interface0D const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getX" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getY" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getZ" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getPoint3D" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = ((Interface0D const *)arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getProjectedX" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getProjectedY" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getProjectedZ" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (real)((Interface0D const *)arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getPoint2D" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = ((Interface0D const *)arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0D_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getFEdge" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0D_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0D_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getId" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = ((Interface0D const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_getNature" "', argument " "1"" of type '" "Interface0D const *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (Nature::VertexNature)((Interface0D const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_castToSVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (SVertex *)(arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_castToViewVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_castToNonTVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (NonTVertex *)(arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0D_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0D_castToTVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (TVertex *)(arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Interface0D")) SWIG_fail; + { + try { + result = (Interface0D *)new Interface0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface0D" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Interface0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Interface0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_Interface0DIteratorNested(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface0DIteratorNested",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface0DIteratorNested" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getExactTypeName" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = ((Interface0DIteratorNested const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0D *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getObject" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + { + Interface0D &_result_ref = (arg1)->operator *(); + result = (Interface0D *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0D, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0D *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested___deref__" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (Interface0D *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0D, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_increment" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_decrement" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_isBegin" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (bool)((Interface0DIteratorNested const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_isEnd" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (bool)((Interface0DIteratorNested const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIteratorNested___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested___eq__" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIteratorNested___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIteratorNested___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((Interface0DIteratorNested const *)arg1)->operator ==((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIteratorNested___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested___ne__" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIteratorNested___ne__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIteratorNested___ne__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((Interface0DIteratorNested const *)arg1)->operator !=((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_t" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (float)((Interface0DIteratorNested const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_u" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (float)((Interface0DIteratorNested const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0DIteratorNested *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_copy" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (Interface0DIteratorNested *)((Interface0DIteratorNested const *)arg1)->copy(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getX" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getY" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getZ" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getPoint3D" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getProjectedX" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getProjectedY" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getProjectedZ" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getPoint2D" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIteratorNested_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getFEdge" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIteratorNested_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIteratorNested_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getId" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_getNature" "', argument " "1"" of type '" "Interface0DIteratorNested const *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_castToSVertex" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_castToViewVertex" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_castToNonTVertex" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIteratorNested_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIteratorNested_castToTVertex" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Interface0DIteratorNested_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIteratorNested, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Interface0DIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIteratorNested *arg1 = (Interface0DIteratorNested *) 0 ; + Interface0DIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Interface0DIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIteratorNested, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Interface0DIterator" "', argument " "1"" of type '" "Interface0DIteratorNested *""'"); + } + arg1 = reinterpret_cast< Interface0DIteratorNested * >(argp1); + { + try { + result = (Interface0DIterator *)new Interface0DIterator(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Interface0DIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Interface0DIterator")) SWIG_fail; + { + try { + result = (Interface0DIterator *)new Interface0DIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Interface0DIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = 0 ; + Interface0DIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Interface0DIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Interface0DIterator" "', argument " "1"" of type '" "Interface0DIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Interface0DIterator" "', argument " "1"" of type '" "Interface0DIterator const &""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (Interface0DIterator *)new Interface0DIterator((Interface0DIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Interface0DIterator__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Interface0DIteratorNested, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Interface0DIterator__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Interface0DIterator__SWIG_2(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n Possible C/C++ prototypes are:\n Interface0DIterator(Interface0DIteratorNested *)\n Interface0DIterator()\n Interface0DIterator(Interface0DIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Interface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface0DIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface0DIterator" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getExactTypeName" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = ((Interface0DIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Interface0D *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getObject" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + { + Interface0D &_result_ref = (arg1)->operator *(); + result = (Interface0D *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0D, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Interface0D *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator___deref__" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (Interface0D *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface0D, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_increment" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_decrement" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_isBegin" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (bool)((Interface0DIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_isEnd" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (bool)((Interface0DIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Interface0DIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator___eq__" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIterator___eq__" "', argument " "2"" of type '" "Interface0DIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIterator___eq__" "', argument " "2"" of type '" "Interface0DIterator const &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (bool)((Interface0DIterator const *)arg1)->operator ==((Interface0DIterator const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Interface0DIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIterator___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator___ne__" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIterator___ne__" "', argument " "2"" of type '" "Interface0DIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIterator___ne__" "', argument " "2"" of type '" "Interface0DIterator const &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (bool)((Interface0DIterator const *)arg1)->operator !=((Interface0DIterator const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_t" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (float)((Interface0DIterator const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_u" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (float)((Interface0DIterator const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getX" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getY" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getZ" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getPoint3D" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getProjectedX" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getProjectedY" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getProjectedZ" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getPoint2D" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface0DIterator_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getFEdge" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Interface0DIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Interface0DIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getId" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_getNature" "', argument " "1"" of type '" "Interface0DIterator const *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_castToSVertex" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_castToViewVertex" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_castToNonTVertex" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0DIterator *arg1 = (Interface0DIterator *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface0DIterator_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0DIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface0DIterator_castToTVertex" "', argument " "1"" of type '" "Interface0DIterator *""'"); + } + arg1 = reinterpret_cast< Interface0DIterator * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Interface0DIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Interface1D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_getExactTypeName" "', argument " "1"" of type '" "Interface1D const *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = ((Interface1D const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_verticesBegin" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_verticesEnd" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface1D_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_pointsBegin" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interface1D_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_pointsBegin" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Interface1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Interface1D_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Interface1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Interface1D_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface1D_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_pointsEnd" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interface1D_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_pointsEnd" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Interface1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Interface1D_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Interface1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Interface1D_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_getLength2D" "', argument " "1"" of type '" "Interface1D const *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (real)((Interface1D const *)arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_getId" "', argument " "1"" of type '" "Interface1D const *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = ((Interface1D const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_getNature" "', argument " "1"" of type '" "Interface1D const *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (Nature::EdgeNature)((Interface1D const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Interface1D_getTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_getTimeStamp" "', argument " "1"" of type '" "Interface1D const *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (unsigned int)((Interface1D const *)arg1)->getTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Interface1D_setTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Interface1D_setTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Interface1D_setTimeStamp" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Interface1D_setTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->setTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Interface1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface1D" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Interface1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Interface1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + IntegrationType arg4 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateUnsigned",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateUnsigned" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateUnsigned" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "integrateUnsigned" "', argument " "4"" of type '" "IntegrationType""'"); + } + arg4 = static_cast< IntegrationType >(val4); + { + try { + result = (unsigned int)integrate(*arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:integrateUnsigned",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateUnsigned" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateUnsigned" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + result = (unsigned int)integrate(*arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_integrateUnsigned__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_integrateUnsigned__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n Possible C/C++ prototypes are:\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + IntegrationType arg4 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateFloat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateFloat" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateFloat" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "integrateFloat" "', argument " "4"" of type '" "IntegrationType""'"); + } + arg4 = static_cast< IntegrationType >(val4); + { + try { + result = (float)integrate(*arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:integrateFloat",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateFloat" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateFloat" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + result = (float)integrate(*arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_integrateFloat__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_integrateFloat__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n Possible C/C++ prototypes are:\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + IntegrationType arg4 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateDouble" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateDouble" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "integrateDouble" "', argument " "4"" of type '" "IntegrationType""'"); + } + arg4 = static_cast< IntegrationType >(val4); + { + try { + result = (double)integrate(*arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + Interface0DIterator arg2 ; + Interface0DIterator arg3 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:integrateDouble",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "integrateDouble" "', argument " "2"" of type '" "Interface0DIterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "2"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0DIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "integrateDouble" "', argument " "3"" of type '" "Interface0DIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "3"" of type '" "Interface0DIterator""'"); + } else { + Interface0DIterator * temp = reinterpret_cast< Interface0DIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + result = (double)integrate(*arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_integrateDouble__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Interface0DIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_integrateDouble__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n Possible C/C++ prototypes are:\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getExactTypeName" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getX" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getY" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getZ" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getPoint3D" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getProjectedX" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getProjectedY" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getProjectedZ" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getPoint2D" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getFEdge" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getId" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getNature" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (Nature::VertexNature)((SVertex const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_castToSVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_castToViewVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_castToNonTVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (NonTVertex *)(arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_castToTVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (TVertex *)(arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_userdata_set" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_userdata_get" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_SVertex")) SWIG_fail; + { + try { + result = (SVertex *)new SVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Geometry::Vec3r *arg1 = 0 ; + Id *arg2 = 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_SVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVertex" "', argument " "1"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVertex" "', argument " "1"" of type '" "Geometry::Vec3r const &""'"); + } + arg1 = reinterpret_cast< Geometry::Vec3r * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVertex" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVertex" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + result = (SVertex *)new SVertex((Geometry::Vec3r const &)*arg1,(Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_SVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_SVertex, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVertex" "', argument " "1"" of type '" "SVertex &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVertex" "', argument " "1"" of type '" "SVertex &""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SVertex *)new SVertex(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_SVertex__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_SVertex__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Id, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_SVertex__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n Possible C/C++ prototypes are:\n SVertex()\n SVertex(Geometry::Vec3r const &,Id const &)\n SVertex(SVertex &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_dupplicate" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex___eq__" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_SVertex, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex___eq__" "', argument " "2"" of type '" "SVertex const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex___eq__" "', argument " "2"" of type '" "SVertex const &""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + result = (bool)(arg1)->operator ==((SVertex const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_point3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_point3D" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((SVertex const *)arg1)->point3D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_point2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_point2D" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((SVertex const *)arg1)->point2D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SwigValueWrapper > > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_normals",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_normals" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (arg1)->normals(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_normalsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_normalsSize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_normalsSize" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (unsigned int)((SVertex const *)arg1)->normalsSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_fedges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_fedges" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + std::vector const &_result_ref = (arg1)->fedges(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_fedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_fedges_begin" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (arg1)->fedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_fedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_fedges_end" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (arg1)->fedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_shape" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SShape *)(arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_z" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_viewvertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_viewvertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_viewvertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->viewvertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetPoint3D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint3D" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetPoint2D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint2D" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_AddNormal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_AddNormal" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->AddNormal((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_setCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + CurvatureInfo *arg2 = (CurvatureInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setCurvatureInfo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setCurvatureInfo" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setCurvatureInfo" "', argument " "2"" of type '" "CurvatureInfo *""'"); + } + arg2 = reinterpret_cast< CurvatureInfo * >(argp2); + { + try { + (arg1)->setCurvatureInfo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_getCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + CurvatureInfo *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_getCurvatureInfo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_getCurvatureInfo" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (CurvatureInfo *)((SVertex const *)arg1)->getCurvatureInfo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_setCurvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setCurvatureFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setCurvatureFredo" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVertex_setCurvatureFredo" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (arg1)->setCurvatureFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec2r arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setDirectionFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setDirectionFredo" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } else { + Geometry::Vec2r * temp = reinterpret_cast< Geometry::Vec2r * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + (arg1)->setDirectionFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_curvatureFredo" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)(arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec2r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_directionFredo" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetId" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetFEdges",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetFEdges" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->SetFEdges((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SShape *arg2 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetShape" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetShape" "', argument " "2"" of type '" "SShape *""'"); + } + arg2 = reinterpret_cast< SShape * >(argp2); + { + try { + (arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetViewVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetViewVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->SetViewVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_AddFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_AddFEdge" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_AddFEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->AddFEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVertex_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_Replace" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_Replace" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVertex_Replace" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + { + try { + (arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_fedge" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (FEdge *)(arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_point2d" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((SVertex const *)arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_point3d" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((SVertex const *)arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_normal" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_shape_id" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_shape" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SShape *)((SVertex const *)arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVertex_shape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVertex_shape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_shape_importance" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (float)((SVertex const *)arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_qi" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (int)((SVertex const *)arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occluders_begin" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occluders_end" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = ((SVertex const *)arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occluders_empty" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (bool)((SVertex const *)arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occluders_size" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (int)((SVertex const *)arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occludee" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + { + Polygon3r const &_result_ref = ((SVertex const *)arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occluded_shape" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (SShape *)((SVertex const *)arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_occludee_empty" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (bool)((SVertex const *)arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVertex_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_z_discontinuity" "', argument " "1"" of type '" "SVertex const *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (real)((SVertex const *)arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_SVertex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_FEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getExactTypeName" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getLength2D" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (real)((FEdge const *)arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getId" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_userdata_set" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_userdata_get" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FEdge")) SWIG_fail; + { + try { + result = (FEdge *)new FEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdge" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdge" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + result = (FEdge *)new FEdge(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_FEdge, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdge" "', argument " "1"" of type '" "FEdge &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdge" "', argument " "1"" of type '" "FEdge &""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (FEdge *)new FEdge(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_FEdge__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdge__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdge__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n Possible C/C++ prototypes are:\n FEdge()\n FEdge(SVertex *,SVertex *)\n FEdge(FEdge &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_dupplicate" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (FEdge *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_vertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_vertexA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_vertexA" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SVertex *)(arg1)->vertexA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_vertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_vertexB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_vertexB" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SVertex *)(arg1)->vertexB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getNature" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (Nature::EdgeNature)((FEdge const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_nextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_nextEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_nextEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (FEdge *)(arg1)->nextEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_previousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_previousEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_previousEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (FEdge *)(arg1)->previousEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_shape" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SShape *)(arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_invisibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_invisibility",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_invisibility" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (int)((FEdge const *)arg1)->invisibility(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_viewedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_viewedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_viewedge" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (ViewEdge *)((FEdge const *)arg1)->viewedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_center3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_center3d" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->center3d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_center2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_center2d" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->center2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_aFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_aFace",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_aFace" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + { + Polygon3r const &_result_ref = ((FEdge const *)arg1)->aFace(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getOccludeeIntersection",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (arg1)->getOccludeeIntersection(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_getOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_getOccludeeEmpty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_getOccludeeEmpty" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (bool)(arg1)->getOccludeeEmpty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_isSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_isSmooth",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_isSmooth" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (bool)((FEdge const *)arg1)->isSmooth(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetVertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetVertexA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetVertexA" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetVertexA" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetVertexA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetVertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetVertexB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetVertexB" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetVertexB" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetVertexB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetId" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetNextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetNextEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetNextEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetNextEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->SetNextEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetPreviousEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetPreviousEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetPreviousEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->SetPreviousEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Nature::EdgeNature arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned short val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetNature",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetNature" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + } + arg2 = static_cast< Nature::EdgeNature >(val2); + { + try { + (arg1)->SetNature(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetViewEdge" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->SetViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetaFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Polygon3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetaFace",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetaFace" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Polygon3r, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetaFace" "', argument " "2"" of type '" "Polygon3r &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetaFace" "', argument " "2"" of type '" "Polygon3r &""'"); + } + arg2 = reinterpret_cast< Polygon3r * >(argp2); + { + try { + (arg1)->SetaFace(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetOccludeeIntersection",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetOccludeeIntersection((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetOccludeeEmpty",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetOccludeeEmpty" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetOccludeeEmpty" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->SetOccludeeEmpty(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetSmooth",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetSmooth" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetSmooth" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->SetSmooth(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_CommonVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_CommonVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_CommonVertex" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_CommonVertex" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + result = (SVertex *)FEdge::CommonVertex(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_min2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_min2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_min2d" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SVertex *)((FEdge const *)arg1)->min2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_max2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_max2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_max2d" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SVertex *)((FEdge const *)arg1)->max2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_shape_id" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_shape" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SShape *)((FEdge const *)arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdge_shape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdge_shape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_shape_importance" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (float)((FEdge const *)arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_qi" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (int)((FEdge const *)arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occluders_begin" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occluders_end" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occluders_empty" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (bool)((FEdge const *)arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occluders_size" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (int)((FEdge const *)arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occludee" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + { + Polygon3r const &_result_ref = ((FEdge const *)arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occluded_shape" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (SShape *)((FEdge const *)arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_occludee_empty" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (bool)((FEdge const *)arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_z_discontinuity" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (real)((FEdge const *)arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_viewedge_nature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_viewedge_nature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_viewedge_nature" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (int)((FEdge const *)arg1)->viewedge_nature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_orientation2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_orientation2d" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->orientation2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_orientation3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_orientation3d" "', argument " "1"" of type '" "FEdge const *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = ((FEdge const *)arg1)->orientation3d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_verticesBegin" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_verticesEnd" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_pointsBegin" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_pointsBegin" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdge_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_FEdge_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_pointsEnd" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *arg1 = (FEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_pointsEnd" "', argument " "1"" of type '" "FEdge *""'"); + } + arg1 = reinterpret_cast< FEdge * >(argp1); + { + try { + result = (arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdge_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_FEdge_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *FEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_FEdge, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FEdgeSVertexIterator")) SWIG_fail; + { + try { + result = (FEdgeInternal::SVertexIterator *)new FEdgeInternal::SVertexIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = 0 ; + FEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgeSVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSVertexIterator" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgeSVertexIterator" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const &""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (FEdgeInternal::SVertexIterator *)new FEdgeInternal::SVertexIterator((FEdgeInternal::SVertexIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + FEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgeSVertexIterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSVertexIterator" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgeSVertexIterator" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + result = (FEdgeInternal::SVertexIterator *)new FEdgeInternal::SVertexIterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_FEdgeSVertexIterator__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSVertexIterator__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSVertexIterator__SWIG_2(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n FEdgeInternal::SVertexIterator()\n FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getExactTypeName" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = ((FEdgeInternal::SVertexIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getObject" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + SVertex &_result_ref = (arg1)->operator *(); + result = (SVertex *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator___deref__" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_increment" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_decrement" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_isBegin" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)((FEdgeInternal::SVertexIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_isEnd" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)((FEdgeInternal::SVertexIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator___eq__" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((FEdgeInternal::SVertexIterator const *)arg1)->operator ==((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_t" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)((FEdgeInternal::SVertexIterator const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_u" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)((FEdgeInternal::SVertexIterator const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + FEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_copy" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (FEdgeInternal::SVertexIterator *)((FEdgeInternal::SVertexIterator const *)arg1)->copy(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FEdgeSVertexIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgeSVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgeSVertexIterator" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getX" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getY" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getZ" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getProjectedX" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getProjectedY" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getProjectedZ" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getFEdge" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getId" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getNature" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_castToSVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_castToViewVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_castToNonTVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_castToTVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_userdata_set" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (*arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_userdata_get" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + result = (void *) ((*arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_dupplicate" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_point3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_point3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_point2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_point2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SwigValueWrapper > > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_normals",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_normals" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->normals(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normalsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_normalsSize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_normalsSize" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->normalsSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_fedges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_fedges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + std::vector const &_result_ref = (*arg1)->fedges(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_fedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_fedges_begin" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->fedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_fedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_fedges_end" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->fedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_shape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_shape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgeSVertexIterator_shape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgeSVertexIterator_shape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_z" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_viewvertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_viewvertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_viewvertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->viewvertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetPoint3D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetPoint2D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_AddNormal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->AddNormal((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + CurvatureInfo *arg2 = (CurvatureInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setCurvatureInfo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setCurvatureInfo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setCurvatureInfo" "', argument " "2"" of type '" "CurvatureInfo *""'"); + } + arg2 = reinterpret_cast< CurvatureInfo * >(argp2); + { + try { + (*arg1)->setCurvatureInfo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + CurvatureInfo *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_getCurvatureInfo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_getCurvatureInfo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (CurvatureInfo *)(*arg1)->getCurvatureInfo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setCurvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setCurvatureFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setCurvatureFredo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSVertexIterator_setCurvatureFredo" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (*arg1)->setCurvatureFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setDirectionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2r arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setDirectionFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } else { + Geometry::Vec2r * temp = reinterpret_cast< Geometry::Vec2r * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + (*arg1)->setDirectionFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_curvatureFredo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_directionFredo" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetId" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetFEdges",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (*arg1)->SetFEdges((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SShape *arg2 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetShape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetShape" "', argument " "2"" of type '" "SShape *""'"); + } + arg2 = reinterpret_cast< SShape * >(argp2); + { + try { + (*arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetViewVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetViewVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetViewVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_AddFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_AddFEdge" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_AddFEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->AddFEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgeSVertexIterator_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_Replace" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_Replace" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgeSVertexIterator_Replace" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + { + try { + (*arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_fedge" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_point2d" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_point3d" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_normal" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_shape_id" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_shape_importance" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)(*arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_qi" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (int)(*arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occluders_begin" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occluders_end" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occluders_empty" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occluders_size" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occludee" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occluded_shape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_occludee_empty" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_z_discontinuity" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_FEdgeSharp__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FEdgeSharp")) SWIG_fail; + { + try { + result = (FEdgeSharp *)new FEdgeSharp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSharp, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSharp__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + FEdgeSharp *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgeSharp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSharp" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgeSharp" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + result = (FEdgeSharp *)new FEdgeSharp(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSharp, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSharp__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = 0 ; + FEdgeSharp *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgeSharp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_FEdgeSharp, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSharp" "', argument " "1"" of type '" "FEdgeSharp &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgeSharp" "', argument " "1"" of type '" "FEdgeSharp &""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + result = (FEdgeSharp *)new FEdgeSharp(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSharp, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_FEdgeSharp__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdgeSharp, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSharp__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSharp__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n Possible C/C++ prototypes are:\n FEdgeSharp()\n FEdgeSharp(SVertex *,SVertex *)\n FEdgeSharp(FEdgeSharp &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FEdgeSharp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgeSharp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgeSharp" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_dupplicate" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + result = (FEdge *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_normalA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_normalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (arg1)->normalA(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_normalB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_normalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (arg1)->normalB(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_aMaterialIndex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_aMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp const *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + result = (unsigned int)((FEdgeSharp const *)arg1)->aMaterialIndex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_aMaterial",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_aMaterial" "', argument " "1"" of type '" "FEdgeSharp const *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + { + Material const &_result_ref = ((FEdgeSharp const *)arg1)->aMaterial(); + result = (Material *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_bMaterialIndex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_bMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp const *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + result = (unsigned int)((FEdgeSharp const *)arg1)->bMaterialIndex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_bMaterial",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_bMaterial" "', argument " "1"" of type '" "FEdgeSharp const *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + { + try { + { + Material const &_result_ref = ((FEdgeSharp const *)arg1)->bMaterial(); + result = (Material *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetNormalA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_SetNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetNormalA((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetNormalB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_SetNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetNormalB((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetaMaterialIndex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetaMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_SetaMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->SetaMaterialIndex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetbMaterialIndex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetbMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); + } + arg1 = reinterpret_cast< FEdgeSharp * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_SetbMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->SetbMaterialIndex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FEdgeSharp_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSharp, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_FEdgeSmooth__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FEdgeSmooth")) SWIG_fail; + { + try { + result = (FEdgeSmooth *)new FEdgeSmooth(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSmooth, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSmooth__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + FEdgeSmooth *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgeSmooth",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSmooth" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgeSmooth" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + result = (FEdgeSmooth *)new FEdgeSmooth(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSmooth, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSmooth__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = 0 ; + FEdgeSmooth *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgeSmooth",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_FEdgeSmooth, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgeSmooth" "', argument " "1"" of type '" "FEdgeSmooth &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgeSmooth" "', argument " "1"" of type '" "FEdgeSmooth &""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + result = (FEdgeSmooth *)new FEdgeSmooth(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdgeSmooth, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_FEdgeSmooth__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FEdgeSmooth, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSmooth__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgeSmooth__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n Possible C/C++ prototypes are:\n FEdgeSmooth()\n FEdgeSmooth(SVertex *,SVertex *)\n FEdgeSmooth(FEdgeSmooth &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FEdgeSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgeSmooth",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgeSmooth" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_dupplicate" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + result = (FEdge *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_face(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_face",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_face" "', argument " "1"" of type '" "FEdgeSmooth const *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + result = (void *)((FEdgeSmooth const *)arg1)->face(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_normal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (arg1)->normal(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_materialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_materialIndex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_materialIndex" "', argument " "1"" of type '" "FEdgeSmooth const *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + result = (unsigned int)((FEdgeSmooth const *)arg1)->materialIndex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_material",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_material" "', argument " "1"" of type '" "FEdgeSmooth const *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + { + try { + { + Material const &_result_ref = ((FEdgeSmooth const *)arg1)->material(); + result = (Material *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetFace",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetFace" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_SetFace" "', argument " "2"" of type '" "void *""'"); + } + { + try { + (arg1)->SetFace(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetNormal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetNormal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_SetNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSmooth_SetNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (arg1)->SetNormal((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetMaterialIndex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetMaterialIndex" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + } + arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSmooth_SetMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->SetMaterialIndex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FEdgeSmooth_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSmooth, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_SShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_userdata_set" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_userdata_get" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_SShape")) SWIG_fail; + { + try { + result = (SShape *)new SShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_SShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_SShape, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SShape" "', argument " "1"" of type '" "SShape &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SShape" "', argument " "1"" of type '" "SShape &""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = (SShape *)new SShape(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_SShape__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_SShape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n Possible C/C++ prototypes are:\n SShape()\n SShape(SShape &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_dupplicate" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = (SShape *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SShape" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_AddEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_AddEdge" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_AddEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->AddEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_AddNewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_AddNewVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_AddNewVertex" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_AddNewVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->AddNewVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_AddChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_AddChain",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_AddChain" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_AddChain" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->AddChain(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + Geometry::Vec3r *arg3 = 0 ; + Id *arg4 = 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:SShape_CreateSVertex",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_CreateSVertex" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_CreateSVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec3r * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_CreateSVertex" "', argument " "4"" of type '" "Id const &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "4"" of type '" "Id const &""'"); + } + arg4 = reinterpret_cast< Id * >(argp4); + { + try { + result = (SVertex *)(arg1)->CreateSVertex((Geometry::Vec3r const &)*arg2,(Geometry::Vec3r const &)*arg3,(Id const &)*arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + std::vector *arg3 = 0 ; + std::vector *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:SShape_SplitEdge",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SplitEdge" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + } + arg3 = reinterpret_cast< std::vector * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + } + arg4 = reinterpret_cast< std::vector * >(argp4); + { + try { + (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + SVertex *arg3 = (SVertex *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SShape_SplitEdgeIn2",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SplitEdgeIn2" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SplitEdgeIn2" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdgeIn2" "', argument " "3"" of type '" "SVertex *""'"); + } + arg3 = reinterpret_cast< SVertex * >(argp3); + { + try { + result = (FEdge *)(arg1)->SplitEdgeIn2(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + BBox *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetBBox",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetBBox" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox const &""'"); + } + arg2 = reinterpret_cast< BBox * >(argp2); + { + try { + (arg1)->SetBBox((BBox const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_ComputeBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_ComputeBBox",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_ComputeBBox" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + (arg1)->ComputeBBox(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_RemoveEdgeFromChain",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_RemoveEdgeFromChain" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_RemoveEdgeFromChain" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->RemoveEdgeFromChain(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_RemoveEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_RemoveEdge" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_RemoveEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->RemoveEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetVertexList",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetVertexList" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->GetVertexList(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetEdgeList",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetEdgeList" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->GetEdgeList(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetChains",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetChains" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->GetChains(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + BBox *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_bbox",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_bbox" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + { + BBox const &_result_ref = (arg1)->bbox(); + result = (BBox *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + unsigned int arg2 ; + Material *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_material",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_material" "', argument " "1"" of type '" "SShape const *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SShape_material" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + { + Material const &_result_ref = ((SShape const *)arg1)->material(arg2); + result = (Material *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Material, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_materials",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_materials" "', argument " "1"" of type '" "SShape const *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + { + std::vector const &_result_ref = ((SShape const *)arg1)->materials(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_viewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_viewShape" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = (ViewShape *)(arg1)->viewShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_importance" "', argument " "1"" of type '" "SShape const *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = (float)((SShape const *)arg1)->importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SShape_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getId" "', argument " "1"" of type '" "SShape const *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = ((SShape const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + Id arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetId" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetId" "', argument " "2"" of type '" "Id""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetId" "', argument " "2"" of type '" "Id""'"); + } else { + Id * temp = reinterpret_cast< Id * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + (arg1)->SetId(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetMaterials",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetMaterials" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->SetMaterials((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SetViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetViewShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetViewShape" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetViewShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (arg1)->SetViewShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SShape_SetImportance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetImportance",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetImportance" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SShape_SetImportance" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetImportance(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_SShape, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_ViewShape_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_ViewShape_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_ViewShape_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_ViewShape_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_ViewShape_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewShapesContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewShapesContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewShapesContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewShapesContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewShapesContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewShapesContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewShapesContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewShapesContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewShape)>()\n std::vector<(p.ViewShape)>(std::vector const &)\n std::vector<(p.ViewShape)>(std::vector::size_type)\n std::vector<(p.ViewShape)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewShapesContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewShapesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewShapesContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewShapesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_ViewEdge_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_ViewEdge_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_ViewEdge_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_ViewEdge_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_ViewEdge_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewEdgesContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewEdgesContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewEdgesContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgesContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewEdgesContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewEdgesContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdgesContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdgesContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewEdge)>()\n std::vector<(p.ViewEdge)>(std::vector const &)\n std::vector<(p.ViewEdge)>(std::vector::size_type)\n std::vector<(p.ViewEdge)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewEdgesContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgesContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_FEdge_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_FEdge_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_FEdge_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_FEdge_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_FEdge_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FEdgesContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_FEdgesContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_FEdgesContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgesContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_FEdgesContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_FEdgesContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgesContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_FEdgesContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.FEdge)>()\n std::vector<(p.FEdge)>(std::vector const &)\n std::vector<(p.FEdge)>(std::vector::size_type)\n std::vector<(p.FEdge)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_FEdgesContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgesContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_ViewVertex_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_ViewVertex_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_ViewVertex_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_ViewVertex_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_ViewVertex_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewVerticesContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewVerticesContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ViewVerticesContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewVerticesContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewVerticesContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewVerticesContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewVerticesContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewVerticesContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewVertex)>()\n std::vector<(p.ViewVertex)>(std::vector const &)\n std::vector<(p.ViewVertex)>(std::vector::size_type)\n std::vector<(p.ViewVertex)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewVerticesContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVerticesContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_SVertex_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_SVertex_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_SVertex_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_SVertex_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_SVertex_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_SVerticesContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_SVerticesContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_SVerticesContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_SVerticesContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_SVerticesContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_SVerticesContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_SVerticesContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_SVerticesContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.SVertex)>()\n std::vector<(p.SVertex)>(std::vector const &)\n std::vector<(p.SVertex)>(std::vector::size_type)\n std::vector<(p.SVertex)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_SVerticesContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SVerticesContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewMap_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_userdata_set" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_userdata_get" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewMap")) SWIG_fail; + { + try { + result = (ViewMap *)new ViewMap(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewMap, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewMap",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewMap" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + real arg2 ; + real arg3 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_GetClosestViewEdge",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "1"" of type '" "ViewMap const *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (ViewEdge *)((ViewMap const *)arg1)->GetClosestViewEdge(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + real arg2 ; + real arg3 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_GetClosestFEdge",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_GetClosestFEdge" "', argument " "1"" of type '" "ViewMap const *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_GetClosestFEdge" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_GetClosestFEdge" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + result = (FEdge *)((ViewMap const *)arg1)->GetClosestFEdge(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":ViewMap_getInstance")) SWIG_fail; + { + try { + result = (ViewMap *)ViewMap::getInstance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewMap, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::viewshapes_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_ViewShapes",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_ViewShapes" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::viewshapes_container &_result_ref = (arg1)->ViewShapes(); + result = (ViewMap::viewshapes_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::viewedges_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_ViewEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_ViewEdges" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::viewedges_container &_result_ref = (arg1)->ViewEdges(); + result = (ViewMap::viewedges_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::viewvertices_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_ViewVertices",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_ViewVertices" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::viewvertices_container &_result_ref = (arg1)->ViewVertices(); + result = (ViewMap::viewvertices_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::fedges_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_FEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_FEdges" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::fedges_container &_result_ref = (arg1)->FEdges(); + result = (ViewMap::fedges_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::svertices_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_SVertices",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_SVertices" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::svertices_container &_result_ref = (arg1)->SVertices(); + result = (ViewMap::svertices_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::viewedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_viewedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_viewedges_begin" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + result = (arg1)->viewedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const ViewMap::viewedges_container::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::viewedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_viewedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_viewedges_end" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + result = (arg1)->viewedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const ViewMap::viewedges_container::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_viewedges_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_viewedges_size" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + result = (int)(arg1)->viewedges_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + unsigned int arg2 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_viewShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_viewShape" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_viewShape" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + result = (ViewShape *)(arg1)->viewShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + SwigValueWrapper > > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_getScene3dBBox",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_getScene3dBBox" "', argument " "1"" of type '" "ViewMap const *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + result = ((ViewMap const *)arg1)->getScene3dBBox(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_AddViewShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_AddViewShape" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_AddViewShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (arg1)->AddViewShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_AddViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_AddViewEdge" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_AddViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_AddViewVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_AddViewVertex" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_AddViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->AddViewVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_AddFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_AddFEdge" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_AddFEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->AddFEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_AddSVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_AddSVertex" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_AddSVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->AddSVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + BBox *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewMap_setScene3dBBox",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_setScene3dBBox" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + } + arg2 = reinterpret_cast< BBox * >(argp2); + { + try { + (arg1)->setScene3dBBox((BBox const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + Geometry::Vec3r *arg3 = 0 ; + FEdge *arg4 = (FEdge *) 0 ; + Geometry::Vec3r *arg5 = 0 ; + Geometry::Vec3r *arg6 = 0 ; + FEdge *arg7 = (FEdge *) 0 ; + Id *arg8 = 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + void *argp7 = 0 ; + int res7 = 0 ; + void *argp8 = 0 ; + int res8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:ViewMap_CreateTVertex",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_CreateTVertex" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_CreateTVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec3r * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewMap_CreateTVertex" "', argument " "4"" of type '" "FEdge *""'"); + } + arg4 = reinterpret_cast< FEdge * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); + } + arg5 = reinterpret_cast< Geometry::Vec3r * >(argp5); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ViewMap_CreateTVertex" "', argument " "6"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "6"" of type '" "Geometry::Vec3r const &""'"); + } + arg6 = reinterpret_cast< Geometry::Vec3r * >(argp6); + res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "ViewMap_CreateTVertex" "', argument " "7"" of type '" "FEdge *""'"); + } + arg7 = reinterpret_cast< FEdge * >(argp7); + res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "ViewMap_CreateTVertex" "', argument " "8"" of type '" "Id const &""'"); + } + if (!argp8) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "8"" of type '" "Id const &""'"); + } + arg8 = reinterpret_cast< Id * >(argp8); + { + try { + result = (TVertex *)(arg1)->CreateTVertex((Geometry::Vec3r const &)*arg2,(Geometry::Vec3r const &)*arg3,arg4,(Geometry::Vec3r const &)*arg5,(Geometry::Vec3r const &)*arg6,arg7,(Id const &)*arg8); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + std::vector *arg3 = 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_InsertViewVertex",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_InsertViewVertex" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_InsertViewVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + } + arg3 = reinterpret_cast< std::vector * >(argp3); + { + try { + result = (ViewVertex *)(arg1)->InsertViewVertex(arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewMap, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_getExactTypeName" "', argument " "1"" of type '" "ViewVertex const *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = ((ViewVertex const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertex_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_userdata_set" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertex_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_userdata_get" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVertex" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_getNature" "', argument " "1"" of type '" "ViewVertex const *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (Nature::VertexNature)((ViewVertex const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + Nature::VertexNature arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned short val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertex_setNature",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_setNature" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVertex_setNature" "', argument " "2"" of type '" "Nature::VertexNature""'"); + } + arg2 = static_cast< Nature::VertexNature >(val2); + { + try { + (arg1)->setNature(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewEdge *arg3 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVertex_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_Replace" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertex_Replace" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVertex_Replace" "', argument " "3"" of type '" "ViewEdge *""'"); + } + arg3 = reinterpret_cast< ViewEdge * >(argp3); + { + try { + (arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_begin" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (arg1)->edges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_begin" "', argument " "1"" of type '" "ViewVertex const *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = ((ViewVertex const *)arg1)->edges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n Possible C/C++ prototypes are:\n edges_begin()\n edges_begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_end" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_end" "', argument " "1"" of type '" "ViewVertex const *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = ((ViewVertex const *)arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertex_edges_iterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_iterator" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertex_edges_iterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = (arg1)->edges_iterator(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertex_edges_iterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edges_iterator" "', argument " "1"" of type '" "ViewVertex const *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertex_edges_iterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = ((ViewVertex const *)arg1)->edges_iterator(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_iterator__SWIG_0(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVertex_edges_iterator__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n Possible C/C++ prototypes are:\n edges_iterator(ViewEdge *)\n edges_iterator(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edgesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edgesBegin" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (arg1)->edgesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertex_edgesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edgesEnd" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (arg1)->edgesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertex_edgesIterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertex_edgesIterator" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertex_edgesIterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = (arg1)->edgesIterator(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_TVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getExactTypeName" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = ((TVertex const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getX" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getY" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getZ" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getPoint3D" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = ((TVertex const *)arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getProjectedX" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getProjectedY" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getProjectedZ" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (real)((TVertex const *)arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getPoint2D" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = ((TVertex const *)arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getId" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = ((TVertex const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_castToViewVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_castToTVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (TVertex *)(arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_TVertex")) SWIG_fail; + { + try { + result = (TVertex *)new TVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_TVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + result = (TVertex *)new TVertex(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_TVertex__SWIG_0(self, args); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_TVertex__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n Possible C/C++ prototypes are:\n TVertex()\n TVertex(SVertex *,SVertex *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_frontSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_frontSVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->frontSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_backSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_backSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_backSVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->backSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_frontEdgeA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_frontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + { + ViewVertex::directedViewEdge &_result_ref = (arg1)->frontEdgeA(); + result = (ViewVertex::directedViewEdge *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_frontEdgeB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_frontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + { + ViewVertex::directedViewEdge &_result_ref = (arg1)->frontEdgeB(); + result = (ViewVertex::directedViewEdge *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_backEdgeA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_backEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + { + ViewVertex::directedViewEdge &_result_ref = (arg1)->backEdgeA(); + result = (ViewVertex::directedViewEdge *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_backEdgeB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_backEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + { + ViewVertex::directedViewEdge &_result_ref = (arg1)->backEdgeB(); + result = (ViewVertex::directedViewEdge *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetFrontVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackSVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackSVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackSVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetBackSVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetFrontEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetFrontEdgeA" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->SetFrontEdgeA(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontEdgeA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->SetFrontEdgeA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_SetFrontEdgeA__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TVertex_SetFrontEdgeA__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeA'.\n Possible C/C++ prototypes are:\n SetFrontEdgeA(ViewEdge *,bool)\n SetFrontEdgeA(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetFrontEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetFrontEdgeB" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->SetFrontEdgeB(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontEdgeB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->SetFrontEdgeB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_SetFrontEdgeB__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TVertex_SetFrontEdgeB__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeB'.\n Possible C/C++ prototypes are:\n SetFrontEdgeB(ViewEdge *,bool)\n SetFrontEdgeB(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetBackEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetBackEdgeA" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->SetBackEdgeA(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackEdgeA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->SetBackEdgeA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_SetBackEdgeA__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TVertex_SetBackEdgeA__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeA'.\n Possible C/C++ prototypes are:\n SetBackEdgeA(ViewEdge *,bool)\n SetBackEdgeA(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetBackEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetBackEdgeB" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->SetBackEdgeB(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackEdgeB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->SetBackEdgeB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_SetBackEdgeB__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_TVertex_SetBackEdgeB__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeB'.\n Possible C/C++ prototypes are:\n SetBackEdgeB(ViewEdge *,bool)\n SetBackEdgeB(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetId" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_GetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_GetSVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_GetSVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_GetSVertex" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + result = (SVertex *)(arg1)->GetSVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewEdge *arg3 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_Replace" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_Replace" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TVertex_Replace" "', argument " "3"" of type '" "ViewEdge *""'"); + } + arg3 = reinterpret_cast< ViewEdge * >(argp3); + { + try { + (arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_mate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_mate",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_mate" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_mate" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = (ViewEdge *)(arg1)->mate(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_edges_end" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_edges_end" "', argument " "1"" of type '" "TVertex const *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = ((TVertex const *)arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_edges_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_TVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_TVertex_edges_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_edgesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_edgesBegin" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (arg1)->edgesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TVertex_edgesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_edgesEnd" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + result = (arg1)->edgesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_edgesIterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_edgesIterator" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_edgesIterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = (arg1)->edgesIterator(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + TVertex *arg1 = (TVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TVertex" "', argument " "1"" of type '" "TVertex *""'"); + } + arg1 = reinterpret_cast< TVertex * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_TVertex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_NonTVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getExactTypeName" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = ((NonTVertex const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getX" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getY" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getZ" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getPoint3D" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = ((NonTVertex const *)arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getProjectedX" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getProjectedY" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getProjectedZ" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (real)((NonTVertex const *)arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getPoint2D" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = ((NonTVertex const *)arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_getId" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = ((NonTVertex const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_castToSVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_castToViewVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_castToNonTVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (NonTVertex *)(arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_NonTVertex")) SWIG_fail; + { + try { + result = (NonTVertex *)new NonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_NonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NonTVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (NonTVertex *)new NonTVertex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_NonTVertex__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_NonTVertex__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n Possible C/C++ prototypes are:\n NonTVertex()\n NonTVertex(SVertex *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_NonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_NonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NonTVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_svertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_svertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_svertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (SVertex *)(arg1)->svertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + NonTVertex::edges_container *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_viewedges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_viewedges" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + { + NonTVertex::edges_container &_result_ref = (arg1)->viewedges(); + result = (NonTVertex::edges_container *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_SetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_SetSVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_SetSVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetSVertex" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetSVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_SetViewEdges",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_SetViewEdges" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->SetViewEdges((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddIncomingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_AddIncomingViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_AddIncomingViewEdge" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_AddIncomingViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddIncomingViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddOutgoingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_AddOutgoingViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_AddOutgoingViewEdge" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_AddOutgoingViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddOutgoingViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:NonTVertex_AddViewEdge",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_AddViewEdge" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_AddViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "NonTVertex_AddViewEdge" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->AddViewEdge(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_AddViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_AddViewEdge" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_AddViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_NonTVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_NonTVertex_AddViewEdge__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_NonTVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_NonTVertex_AddViewEdge__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n Possible C/C++ prototypes are:\n AddViewEdge(ViewEdge *,bool)\n AddViewEdge(ViewEdge *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewEdge *arg3 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:NonTVertex_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_Replace" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_Replace" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NonTVertex_Replace" "', argument " "3"" of type '" "ViewEdge *""'"); + } + arg3 = reinterpret_cast< ViewEdge * >(argp3); + { + try { + (arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_edges_end" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_edges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_edges_end" "', argument " "1"" of type '" "NonTVertex const *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = ((NonTVertex const *)arg1)->edges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_NonTVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_NonTVertex_edges_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_NonTVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_NonTVertex_edges_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_edgesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_edgesBegin" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (arg1)->edgesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:NonTVertex_edgesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_edgesEnd" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + { + try { + result = (arg1)->edgesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + NonTVertex *arg1 = (NonTVertex *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_edgesIterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_edgesIterator" "', argument " "1"" of type '" "NonTVertex *""'"); + } + arg1 = reinterpret_cast< NonTVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_edgesIterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + result = (arg1)->edgesIterator(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new ViewVertexInternal::orientedViewEdgeIterator(static_cast< const ViewVertexInternal::orientedViewEdgeIterator& >(result))), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *NonTVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_NonTVertex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_getExactTypeName" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = ((ViewEdge const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_getId" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = ((ViewEdge const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_getNature" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (Nature::EdgeNature)((ViewEdge const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_userdata_set" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_userdata_get" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewEdge")) SWIG_fail; + { + try { + result = (ViewEdge *)new ViewEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdge" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + result = (ViewEdge *)new ViewEdge(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ViewEdge",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdge" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ViewEdge" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + { + try { + result = (ViewEdge *)new ViewEdge(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + FEdge *arg4 = (FEdge *) 0 ; + ViewShape *arg5 = (ViewShape *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ViewEdge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdge" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ViewEdge" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ViewEdge" "', argument " "4"" of type '" "FEdge *""'"); + } + arg4 = reinterpret_cast< FEdge * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ViewEdge" "', argument " "5"" of type '" "ViewShape *""'"); + } + arg5 = reinterpret_cast< ViewShape * >(argp5); + { + try { + result = (ViewEdge *)new ViewEdge(arg1,arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewEdge__SWIG_0(self, args); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdge__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdge__SWIG_2(self, args); + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_ViewShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdge__SWIG_3(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n Possible C/C++ prototypes are:\n ViewEdge()\n ViewEdge(ViewVertex *,ViewVertex *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdge" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_A" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_B" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_fedgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_fedgeA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_fedgeA" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (FEdge *)(arg1)->fedgeA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_fedgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_fedgeB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_fedgeB" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (FEdge *)(arg1)->fedgeB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_viewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_viewShape" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewShape *)(arg1)->viewShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_aShape" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewShape *)(arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_isClosed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_isClosed",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_isClosed" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (bool)(arg1)->isClosed(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_getChainingTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_getChainingTimeStamp" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (unsigned int)(arg1)->getChainingTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_aShape" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewShape *)((ViewEdge const *)arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdge_aShape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdge_aShape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_bShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_bShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_bShape" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewShape *)((ViewEdge const *)arg1)->bShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluders",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluders" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->occluders(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_splittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Id *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_splittingId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_splittingId" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (Id *)(arg1)->splittingId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetA" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetB" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Nature::EdgeNature arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned short val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetNature",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetNature" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + } + arg2 = static_cast< Nature::EdgeNature >(val2); + { + try { + (arg1)->SetNature(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetFEdgeA" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->SetFEdgeA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetFEdgeB" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->SetFEdgeB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetShape" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetId" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_UpdateFEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_UpdateFEdges" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + (arg1)->UpdateFEdges(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetaShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetaShape" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (arg1)->SetaShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetQI",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetQI" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_SetQI" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + (arg1)->SetQI(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setChainingTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setChainingTimeStamp" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_setChainingTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->setChainingTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_AddOccluder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_AddOccluder",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_AddOccluder" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_AddOccluder" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (arg1)->AddOccluder(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_setSplittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Id *arg2 = (Id *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setSplittingId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setSplittingId" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setSplittingId" "', argument " "2"" of type '" "Id *""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->setSplittingId(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdge_intersect_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_intersect_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)((ViewEdge const *)arg1)->intersect_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdge_include_in_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_include_in_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)((ViewEdge const *)arg1)->include_in_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_getLength2D" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (real)((ViewEdge const *)arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_qi" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (int)((ViewEdge const *)arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluders_begin" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = ((ViewEdge const *)arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluders_end" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = ((ViewEdge const *)arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluders_size" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (int)((ViewEdge const *)arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluders_empty" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (bool)((ViewEdge const *)arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occludee" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + { + Polygon3r const &_result_ref = ((ViewEdge const *)arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occluded_shape" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (SShape *)((ViewEdge const *)arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_occludee_empty" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (bool)((ViewEdge const *)arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_shape_id" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = ((ViewEdge const *)arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_shape" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (SShape *)((ViewEdge const *)arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_shape_importance" "', argument " "1"" of type '" "ViewEdge const *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (float)((ViewEdge const *)arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_verticesBegin" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_verticesEnd" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_pointsBegin" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_pointsBegin" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdge_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewEdge_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_pointsEnd" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_pointsEnd" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdge_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewEdge_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *ViewEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdge, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ViewShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_userdata_set" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_userdata_get" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + result = (void *) ((arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewShape")) SWIG_fail; + { + try { + result = (ViewShape *)new ViewShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SShape *arg1 = (SShape *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShape" "', argument " "1"" of type '" "SShape *""'"); + } + arg1 = reinterpret_cast< SShape * >(argp1); + { + try { + result = (ViewShape *)new ViewShape(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewShape, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShape" "', argument " "1"" of type '" "ViewShape &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShape" "', argument " "1"" of type '" "ViewShape &""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + result = (ViewShape *)new ViewShape(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewShape__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewShape__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewShape__SWIG_2(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n Possible C/C++ prototypes are:\n ViewShape()\n ViewShape(SShape *)\n ViewShape(ViewShape &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_dupplicate" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + result = (ViewShape *)(arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShape" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + std::vector *arg3 = 0 ; + std::vector *arg4 = 0 ; + std::vector *arg5 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:ViewShape_SplitEdge",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SplitEdge" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + } + arg3 = reinterpret_cast< std::vector * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + } + if (!argp4) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + } + arg4 = reinterpret_cast< std::vector * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + } + arg5 = reinterpret_cast< std::vector * >(argp5); + { + try { + (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4,*arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_sshape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_sshape" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + result = (SShape *)(arg1)->sshape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_sshape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_sshape" "', argument " "1"" of type '" "ViewShape const *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + result = (SShape *)((ViewShape const *)arg1)->sshape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShape_sshape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewShape, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShape_sshape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n Possible C/C++ prototypes are:\n sshape()\n sshape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_vertices",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_vertices" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->vertices(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_edges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_edges" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + { + std::vector &_result_ref = (arg1)->edges(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_getId" "', argument " "1"" of type '" "ViewShape const *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + try { + result = ((ViewShape const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetSShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + SShape *arg2 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetSShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetSShape" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetSShape" "', argument " "2"" of type '" "SShape *""'"); + } + arg2 = reinterpret_cast< SShape * >(argp2); + { + try { + (arg1)->SetSShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetVertices",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetVertices" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + std::vector > *ptr = (std::vector > *)0; + res2 = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = ptr; + } + { + try { + (arg1)->SetVertices((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetEdges",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetEdges" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + { + std::vector > *ptr = (std::vector > *)0; + res2 = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = ptr; + } + { + try { + (arg1)->SetEdges((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_AddVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_AddVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_AddVertex" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_AddVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->AddVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_AddEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_AddEdge" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_AddEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_RemoveEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_RemoveEdge" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_RemoveEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->RemoveEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShape_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewShape *arg1 = (ViewShape *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_RemoveVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_RemoveVertex" "', argument " "1"" of type '" "ViewShape *""'"); + } + arg1 = reinterpret_cast< ViewShape * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_RemoveVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (arg1)->RemoveVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewShape, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewVertexOrientedViewEdgeIterator")) SWIG_fail; + { + try { + result = (ViewVertexInternal::orientedViewEdgeIterator *)new ViewVertexInternal::orientedViewEdgeIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Nature::VertexNature arg1 ; + ViewVertexInternal::orientedViewEdgeIterator *result = 0 ; + unsigned short val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVertexOrientedViewEdgeIterator",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "Nature::VertexNature""'"); + } + arg1 = static_cast< Nature::VertexNature >(val1); + { + try { + result = (ViewVertexInternal::orientedViewEdgeIterator *)new ViewVertexInternal::orientedViewEdgeIterator(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = 0 ; + ViewVertexInternal::orientedViewEdgeIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVertexOrientedViewEdgeIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + result = (ViewVertexInternal::orientedViewEdgeIterator *)new ViewVertexInternal::orientedViewEdgeIterator((ViewVertexInternal::orientedViewEdgeIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewVertexOrientedViewEdgeIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVertexOrientedViewEdgeIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator arg1 ; + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator arg2 ; + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator arg3 ; + ViewVertexInternal::orientedViewEdgeIterator *result = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ViewVertexOrientedViewEdgeIterator",&obj0,&obj1,&obj2)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "3"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "3"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + result = (ViewVertexInternal::orientedViewEdgeIterator *)new ViewVertexInternal::orientedViewEdgeIterator(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator arg1 ; + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator arg2 ; + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator arg3 ; + ViewVertexInternal::orientedViewEdgeIterator *result = 0 ; + void *argp1 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ViewVertexOrientedViewEdgeIterator",&obj0,&obj1,&obj2)) SWIG_fail; + { + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * >(argp1); + arg1 = *temp; + if (SWIG_IsNewObj(res1)) delete temp; + } + } + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "3"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVertexOrientedViewEdgeIterator" "', argument " "3"" of type '" "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator""'"); + } else { + ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * temp = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + result = (ViewVertexInternal::orientedViewEdgeIterator *)new ViewVertexInternal::orientedViewEdgeIterator(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_short(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_1(self, args); + } + } + if (argc == 3) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_3(self, args); + } + } + } + } + if (argc == 3) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewVertexOrientedViewEdgeIterator__SWIG_4(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewVertexInternal::orientedViewEdgeIterator()\n ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertexOrientedViewEdgeIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator_isBegin" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + result = (bool)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertexOrientedViewEdgeIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator_isEnd" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + result = (bool)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertexOrientedViewEdgeIterator___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator___ne__" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertexOrientedViewEdgeIterator___ne__" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVertexOrientedViewEdgeIterator___ne__" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + arg2 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp2); + { + try { + result = (bool)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator !=((ViewVertexInternal::orientedViewEdgeIterator const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + ViewVertexInternal::orientedViewEdgeIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewVertexOrientedViewEdgeIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator___eq__" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVertexOrientedViewEdgeIterator___eq__" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVertexOrientedViewEdgeIterator___eq__" "', argument " "2"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const &""'"); + } + arg2 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp2); + { + try { + result = (bool)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator ==((ViewVertexInternal::orientedViewEdgeIterator const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertexOrientedViewEdgeIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator_getObject" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + { + ViewVertex::directedViewEdge &_result_ref = ((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator *(); + result = (ViewVertex::directedViewEdge *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + ViewVertex::directedViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertexOrientedViewEdgeIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator___deref__" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + result = (ViewVertex::directedViewEdge *)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVertexOrientedViewEdgeIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVertexOrientedViewEdgeIterator_increment" "', argument " "1"" of type '" "ViewVertexInternal::orientedViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewVertexOrientedViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ViewEdgeSVertexIterator")) SWIG_fail; + { + try { + result = (ViewEdgeInternal::SVertexIterator *)new ViewEdgeInternal::SVertexIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = 0 ; + ViewEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgeSVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgeSVertexIterator" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const &""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewEdgeInternal::SVertexIterator *)new ViewEdgeInternal::SVertexIterator((ViewEdgeInternal::SVertexIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + FEdge *arg4 = (FEdge *) 0 ; + float arg5 ; + ViewEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ViewEdgeSVertexIterator",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "4"" of type '" "FEdge *""'"); + } + arg4 = reinterpret_cast< FEdge * >(argp4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ViewEdgeSVertexIterator" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + result = (ViewEdgeInternal::SVertexIterator *)new ViewEdgeInternal::SVertexIterator(arg1,arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ViewEdgeSVertexIterator__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdgeSVertexIterator__SWIG_1(self, args); + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_FEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewEdgeSVertexIterator__SWIG_2(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::SVertexIterator()\n ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewEdgeSVertexIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgeSVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgeSVertexIterator" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getExactTypeName" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = ((ViewEdgeInternal::SVertexIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getObject" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + SVertex &_result_ref = (arg1)->operator *(); + result = (SVertex *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator___deref__" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_increment" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_decrement" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_isBegin" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)((ViewEdgeInternal::SVertexIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_isEnd" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)((ViewEdgeInternal::SVertexIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_t" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)((ViewEdgeInternal::SVertexIterator const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_u" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)((ViewEdgeInternal::SVertexIterator const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator___eq__" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((ViewEdgeInternal::SVertexIterator const *)arg1)->operator ==((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + ViewEdgeInternal::SVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_copy" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewEdgeInternal::SVertexIterator *)((ViewEdgeInternal::SVertexIterator const *)arg1)->copy(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getX" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getY" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getZ" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getProjectedX" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getProjectedY" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getProjectedZ" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getFEdge" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getId" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getNature" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_castToSVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_castToViewVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_castToNonTVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_castToTVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_userdata_set" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (*arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_userdata_get" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + result = (void *) ((*arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_dupplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_dupplicate" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->dupplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_point3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_point3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_point2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_point2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2D(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SwigValueWrapper > > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_normals",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_normals" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->normals(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normalsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_normalsSize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_normalsSize" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->normalsSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_fedges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_fedges" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + std::vector const &_result_ref = (*arg1)->fedges(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(*result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_fedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_fedges_begin" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->fedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SVertex::fedges_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_fedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_fedges_end" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->fedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new SVertex::fedges_container::iterator(static_cast< const SVertex::fedges_container::iterator& >(result))), SWIGTYPE_p_SVertex__fedges_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_shape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_shape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeSVertexIterator_shape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeSVertexIterator_shape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_z",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_z" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->z(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_viewvertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_viewvertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_viewvertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->viewvertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetPoint3D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetPoint2D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_AddNormal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); + { + try { + (*arg1)->AddNormal((Geometry::Vec3r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + CurvatureInfo *arg2 = (CurvatureInfo *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setCurvatureInfo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setCurvatureInfo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setCurvatureInfo" "', argument " "2"" of type '" "CurvatureInfo *""'"); + } + arg2 = reinterpret_cast< CurvatureInfo * >(argp2); + { + try { + (*arg1)->setCurvatureInfo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + CurvatureInfo *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_getCurvatureInfo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_getCurvatureInfo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (CurvatureInfo *)(*arg1)->getCurvatureInfo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvatureInfo, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setCurvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setCurvatureFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setCurvatureFredo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeSVertexIterator_setCurvatureFredo" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (*arg1)->setCurvatureFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setDirectionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2r arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setDirectionFredo",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); + } else { + Geometry::Vec2r * temp = reinterpret_cast< Geometry::Vec2r * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + { + try { + (*arg1)->setDirectionFredo(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_curvatureFredo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec2r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_directionFredo" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetFEdges",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + std::vector > *ptr = (std::vector > *)0; + res2 = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + } + arg2 = ptr; + } + { + try { + (*arg1)->SetFEdges((std::vector const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res2)) delete arg2; + return resultobj; +fail: + if (SWIG_IsNewObj(res2)) delete arg2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SShape *arg2 = (SShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetShape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetShape" "', argument " "2"" of type '" "SShape *""'"); + } + arg2 = reinterpret_cast< SShape * >(argp2); + { + try { + (*arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetViewVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetViewVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetViewVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_AddFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_AddFEdge" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_AddFEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->AddFEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + FEdge *arg3 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgeSVertexIterator_Replace",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_Replace" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_Replace" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeSVertexIterator_Replace" "', argument " "3"" of type '" "FEdge *""'"); + } + arg3 = reinterpret_cast< FEdge * >(argp3); + { + try { + (*arg1)->Replace(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_fedge" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_point2d" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_point3d" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_normal" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_shape_id" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_shape_importance" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (float)(*arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_qi" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (int)(*arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occluders_begin" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occluders_end" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occluders_empty" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occluders_size" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occludee" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occluded_shape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_occludee_empty" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_z_discontinuity" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + bool arg3 ; + ViewEdgeInternal::ViewEdgeIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ViewEdgeViewEdgeIterator",&obj0,&obj1,&obj2)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgeViewEdgeIterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ViewEdgeViewEdgeIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ViewEdgeInternal::ViewEdgeIterator *)new SwigDirector_ViewEdgeViewEdgeIterator(arg1,arg2,arg3); + } else { + result = (ViewEdgeInternal::ViewEdgeIterator *)new ViewEdgeInternal::ViewEdgeIterator(arg2,arg3); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + ViewEdgeInternal::ViewEdgeIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgeViewEdgeIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgeViewEdgeIterator" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ViewEdgeInternal::ViewEdgeIterator *)new SwigDirector_ViewEdgeViewEdgeIterator(arg1,arg2); + } else { + result = (ViewEdgeInternal::ViewEdgeIterator *)new ViewEdgeInternal::ViewEdgeIterator(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ViewEdgeInternal::ViewEdgeIterator *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgeViewEdgeIterator",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ViewEdgeInternal::ViewEdgeIterator *)new SwigDirector_ViewEdgeViewEdgeIterator(arg1); + } else { + result = (ViewEdgeInternal::ViewEdgeIterator *)new ViewEdgeInternal::ViewEdgeIterator(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ViewEdgeInternal::ViewEdgeIterator *arg2 = 0 ; + ViewEdgeInternal::ViewEdgeIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgeViewEdgeIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgeViewEdgeIterator" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgeViewEdgeIterator" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator const &""'"); + } + arg2 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ViewEdgeInternal::ViewEdgeIterator *)new SwigDirector_ViewEdgeViewEdgeIterator(arg1,(ViewEdgeInternal::ViewEdgeIterator const &)*arg2); + } else { + result = (ViewEdgeInternal::ViewEdgeIterator *)new ViewEdgeInternal::ViewEdgeIterator((ViewEdgeInternal::ViewEdgeIterator const &)*arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_ViewEdgeViewEdgeIterator__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdgeViewEdgeIterator__SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdgeViewEdgeIterator__SWIG_3(self, args); + } + } + } + if (argc == 3) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewEdgeViewEdgeIterator__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewEdgeViewEdgeIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgeViewEdgeIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgeViewEdgeIterator" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getExactTypeName" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->ViewEdgeInternal::ViewEdgeIterator::getExactTypeName(); + } else { + result = ((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->getExactTypeName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getCurrentEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getCurrentEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getCurrentEdge" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewEdge *)(arg1)->getCurrentEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setCurrentEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setCurrentEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setCurrentEdge" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setCurrentEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->setCurrentEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewEdge *)(arg1)->getBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setBegin" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->setBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getOrientation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getOrientation" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->getOrientation(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setOrientation",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setOrientation" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_setOrientation" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->setOrientation(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_changeOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_changeOrientation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_changeOrientation" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + (arg1)->changeOrientation(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getObject" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (ViewEdge *)(arg1)->ViewEdgeInternal::ViewEdgeIterator::operator *(); + } else { + result = (ViewEdge *)(arg1)->operator *(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (director) { + SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result))); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator___deref__" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (ViewEdge *)(arg1)->ViewEdgeInternal::ViewEdgeIterator::operator ->(); + } else { + result = (ViewEdge *)(arg1)->operator ->(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (director) { + SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result))); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_increment" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->ViewEdgeInternal::ViewEdgeIterator::increment(); + } else { + (arg1)->increment(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_decrement" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->ViewEdgeInternal::ViewEdgeIterator::decrement(); + } else { + (arg1)->decrement(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_isBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->ViewEdgeInternal::ViewEdgeIterator::isBegin(); + } else { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->isBegin(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_isEnd" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->ViewEdgeInternal::ViewEdgeIterator::isEnd(); + } else { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->isEnd(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdgeInternal::ViewEdgeIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator___eq__" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator___eq__" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator___eq__" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + arg2 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->ViewEdgeInternal::ViewEdgeIterator::operator ==(*arg2); + } else { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->operator ==(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdgeInternal::ViewEdgeIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator___ne__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator___ne__" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator___ne__" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator___ne__" "', argument " "2"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + arg2 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->ViewEdgeInternal::ViewEdgeIterator::operator !=(*arg2); + } else { + result = (bool)((ViewEdgeInternal::ViewEdgeIterator const *)arg1)->operator !=(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getNature" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (Nature::EdgeNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_userdata_set" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (*arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_userdata_get" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + result = (void *) ((*arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_A" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_B" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_fedgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_fedgeA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_fedgeA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedgeA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_fedgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_fedgeB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_fedgeB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedgeB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_viewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_viewShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->viewShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_aShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_aShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_aShape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_aShape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_isClosed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_isClosed",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_isClosed" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (bool)(*arg1)->isClosed(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getChainingTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getChainingTimeStamp" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->getChainingTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_bShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_bShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_bShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->bShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluders",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluders" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + { + std::vector &_result_ref = (*arg1)->occluders(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_splittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Id *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_splittingId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_splittingId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (Id *)(*arg1)->splittingId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Nature::EdgeNature arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned short val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetNature",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetNature" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + } + arg2 = static_cast< Nature::EdgeNature >(val2); + { + try { + (*arg1)->SetNature(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->SetFEdgeA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->SetFEdgeB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_UpdateFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_UpdateFEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_UpdateFEdges" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + (*arg1)->UpdateFEdges(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetaShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetaShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->SetaShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetQI",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetQI" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_SetQI" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + (*arg1)->SetQI(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setChainingTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setChainingTimeStamp" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_setChainingTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (*arg1)->setChainingTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_AddOccluder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_AddOccluder",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_AddOccluder" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_AddOccluder" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->AddOccluder(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setSplittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Id *arg2 = (Id *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setSplittingId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setSplittingId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setSplittingId" "', argument " "2"" of type '" "Id *""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->setSplittingId(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgeViewEdgeIterator_intersect_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)(*arg1)->intersect_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgeViewEdgeIterator_include_in_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)(*arg1)->include_in_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getLength2D" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (real)(*arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_qi" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (int)(*arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluders_begin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluders_end" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluders_size" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluders_empty" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occludee" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occluded_shape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_occludee_empty" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_shape_id" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_shape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_shape_importance" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (float)(*arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_verticesBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_verticesEnd" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_pointsBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (*arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_pointsBegin" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_pointsEnd" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (*arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_pointsEnd" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (*arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ViewEdgeViewEdgeIterator_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_getTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_getTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_getTimeStamp" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->getTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setTimeStamp" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_setTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (*arg1)->setTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ViewEdgeViewEdgeIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ViewEdgeViewEdgeIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ViewEdgeViewEdgeIterator" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVoid",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVoid(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVoid",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVoid_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVoid___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVoid___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DVoid___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->UnaryFunction0D::operator ()(*arg2); + } else { + (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVoid",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DUnsigned(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DUnsigned_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DUnsigned___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (unsigned int)(arg1)->UnaryFunction0D::operator ()(*arg2); + } else { + result = (unsigned int)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DFloat",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DFloat(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DFloat",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DFloat_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DFloat___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DFloat___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DFloat___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (float)(arg1)->UnaryFunction0D::operator ()(*arg2); + } else { + result = (float)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DFloat",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DDouble",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DDouble(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DDouble",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DDouble_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DDouble___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DDouble___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DDouble___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (double)(arg1)->UnaryFunction0D::operator ()(*arg2); + } else { + result = (double)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DDouble",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec2f",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec2f(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec2f_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec2f___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DVec2f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + } else { + result = (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec3f",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec3f(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec3f_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec3f___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DVec3f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + } else { + result = (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DId",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DId(arg1); + } else { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DId_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + } else { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DId___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DId___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DId___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (arg1)->UnaryFunction0D::operator ()(*arg2); + } else { + result = (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DId_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DViewShape")) SWIG_fail; + { + try { + result = (UnaryFunction0D *)new UnaryFunction0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DViewShape_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + { + try { + result = ((UnaryFunction0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DViewShape___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (ViewShape *)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D > *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DVectorViewShape")) SWIG_fail; + { + try { + result = (UnaryFunction0D > *)new UnaryFunction0D >(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVectorViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVectorViewShape_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D > const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + { + try { + result = ((UnaryFunction0D > const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + Interface0DIterator *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction0DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetXF0D *arg1 = (Functions0D::GetXF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetXF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetXF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetXF0D_getName" "', argument " "1"" of type '" "Functions0D::GetXF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetXF0D * >(argp1); + { + try { + result = ((Functions0D::GetXF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetXF0D *arg1 = (Functions0D::GetXF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetXF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetXF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetXF0D___call__" "', argument " "1"" of type '" "Functions0D::GetXF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetXF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetXF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetXF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetXF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetXF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetXF0D *)new Functions0D::GetXF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetXF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetXF0D *arg1 = (Functions0D::GetXF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetXF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetXF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetXF0D" "', argument " "1"" of type '" "Functions0D::GetXF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetXF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetXF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetYF0D *arg1 = (Functions0D::GetYF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetYF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetYF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetYF0D_getName" "', argument " "1"" of type '" "Functions0D::GetYF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetYF0D * >(argp1); + { + try { + result = ((Functions0D::GetYF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetYF0D *arg1 = (Functions0D::GetYF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetYF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetYF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetYF0D___call__" "', argument " "1"" of type '" "Functions0D::GetYF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetYF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetYF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetYF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetYF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetYF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetYF0D *)new Functions0D::GetYF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetYF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetYF0D *arg1 = (Functions0D::GetYF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetYF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetYF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetYF0D" "', argument " "1"" of type '" "Functions0D::GetYF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetYF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetYF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetZF0D *arg1 = (Functions0D::GetZF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetZF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetZF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetZF0D_getName" "', argument " "1"" of type '" "Functions0D::GetZF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetZF0D * >(argp1); + { + try { + result = ((Functions0D::GetZF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetZF0D *arg1 = (Functions0D::GetZF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetZF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetZF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetZF0D___call__" "', argument " "1"" of type '" "Functions0D::GetZF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetZF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetZF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetZF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetZF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetZF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetZF0D *)new Functions0D::GetZF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetZF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetZF0D *arg1 = (Functions0D::GetZF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetZF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetZF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetZF0D" "', argument " "1"" of type '" "Functions0D::GetZF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetZF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetZF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetProjectedXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedXF0D *arg1 = (Functions0D::GetProjectedXF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedXF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedXF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedXF0D_getName" "', argument " "1"" of type '" "Functions0D::GetProjectedXF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedXF0D * >(argp1); + { + try { + result = ((Functions0D::GetProjectedXF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedXF0D *arg1 = (Functions0D::GetProjectedXF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedXF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedXF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedXF0D___call__" "', argument " "1"" of type '" "Functions0D::GetProjectedXF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedXF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedXF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedXF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedXF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedXF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetProjectedXF0D *)new Functions0D::GetProjectedXF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedXF0D *arg1 = (Functions0D::GetProjectedXF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedXF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedXF0D" "', argument " "1"" of type '" "Functions0D::GetProjectedXF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedXF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetProjectedYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedYF0D *arg1 = (Functions0D::GetProjectedYF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedYF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedYF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedYF0D_getName" "', argument " "1"" of type '" "Functions0D::GetProjectedYF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedYF0D * >(argp1); + { + try { + result = ((Functions0D::GetProjectedYF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedYF0D *arg1 = (Functions0D::GetProjectedYF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedYF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedYF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedYF0D___call__" "', argument " "1"" of type '" "Functions0D::GetProjectedYF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedYF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedYF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedYF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedYF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedYF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetProjectedYF0D *)new Functions0D::GetProjectedYF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedYF0D *arg1 = (Functions0D::GetProjectedYF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedYF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedYF0D" "', argument " "1"" of type '" "Functions0D::GetProjectedYF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedYF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetProjectedZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedZF0D *arg1 = (Functions0D::GetProjectedZF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedZF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedZF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedZF0D_getName" "', argument " "1"" of type '" "Functions0D::GetProjectedZF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedZF0D * >(argp1); + { + try { + result = ((Functions0D::GetProjectedZF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedZF0D *arg1 = (Functions0D::GetProjectedZF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedZF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedZF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedZF0D___call__" "', argument " "1"" of type '" "Functions0D::GetProjectedZF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedZF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedZF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedZF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedZF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedZF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetProjectedZF0D *)new Functions0D::GetProjectedZF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetProjectedZF0D *arg1 = (Functions0D::GetProjectedZF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedZF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedZF0D" "', argument " "1"" of type '" "Functions0D::GetProjectedZF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetProjectedZF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetCurvilinearAbscissaF0D *arg1 = (Functions0D::GetCurvilinearAbscissaF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetCurvilinearAbscissaF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCurvilinearAbscissaF0D_getName" "', argument " "1"" of type '" "Functions0D::GetCurvilinearAbscissaF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetCurvilinearAbscissaF0D * >(argp1); + { + try { + result = ((Functions0D::GetCurvilinearAbscissaF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetCurvilinearAbscissaF0D *arg1 = (Functions0D::GetCurvilinearAbscissaF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetCurvilinearAbscissaF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCurvilinearAbscissaF0D___call__" "', argument " "1"" of type '" "Functions0D::GetCurvilinearAbscissaF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetCurvilinearAbscissaF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCurvilinearAbscissaF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetCurvilinearAbscissaF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetCurvilinearAbscissaF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetCurvilinearAbscissaF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetCurvilinearAbscissaF0D *)new Functions0D::GetCurvilinearAbscissaF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetCurvilinearAbscissaF0D *arg1 = (Functions0D::GetCurvilinearAbscissaF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetCurvilinearAbscissaF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetCurvilinearAbscissaF0D" "', argument " "1"" of type '" "Functions0D::GetCurvilinearAbscissaF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetCurvilinearAbscissaF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetCurvilinearAbscissaF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetParameterF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetParameterF0D *arg1 = (Functions0D::GetParameterF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetParameterF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetParameterF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetParameterF0D_getName" "', argument " "1"" of type '" "Functions0D::GetParameterF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetParameterF0D * >(argp1); + { + try { + result = ((Functions0D::GetParameterF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetParameterF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetParameterF0D *arg1 = (Functions0D::GetParameterF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetParameterF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetParameterF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetParameterF0D___call__" "', argument " "1"" of type '" "Functions0D::GetParameterF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetParameterF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetParameterF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetParameterF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetParameterF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetParameterF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetParameterF0D *)new Functions0D::GetParameterF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetParameterF0D *arg1 = (Functions0D::GetParameterF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetParameterF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetParameterF0D" "', argument " "1"" of type '" "Functions0D::GetParameterF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetParameterF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetParameterF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation2DF0D *arg1 = (Functions0D::VertexOrientation2DF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:VertexOrientation2DF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VertexOrientation2DF0D_getName" "', argument " "1"" of type '" "Functions0D::VertexOrientation2DF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation2DF0D * >(argp1); + { + try { + result = ((Functions0D::VertexOrientation2DF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation2DF0D *arg1 = (Functions0D::VertexOrientation2DF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:VertexOrientation2DF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VertexOrientation2DF0D___call__" "', argument " "1"" of type '" "Functions0D::VertexOrientation2DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation2DF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VertexOrientation2DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VertexOrientation2DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation2DF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_VertexOrientation2DF0D")) SWIG_fail; + { + try { + result = (Functions0D::VertexOrientation2DF0D *)new Functions0D::VertexOrientation2DF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation2DF0D *arg1 = (Functions0D::VertexOrientation2DF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_VertexOrientation2DF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VertexOrientation2DF0D" "', argument " "1"" of type '" "Functions0D::VertexOrientation2DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation2DF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VertexOrientation2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation3DF0D *arg1 = (Functions0D::VertexOrientation3DF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:VertexOrientation3DF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VertexOrientation3DF0D_getName" "', argument " "1"" of type '" "Functions0D::VertexOrientation3DF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation3DF0D * >(argp1); + { + try { + result = ((Functions0D::VertexOrientation3DF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation3DF0D *arg1 = (Functions0D::VertexOrientation3DF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:VertexOrientation3DF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VertexOrientation3DF0D___call__" "', argument " "1"" of type '" "Functions0D::VertexOrientation3DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation3DF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VertexOrientation3DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VertexOrientation3DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation3DF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_VertexOrientation3DF0D")) SWIG_fail; + { + try { + result = (Functions0D::VertexOrientation3DF0D *)new Functions0D::VertexOrientation3DF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::VertexOrientation3DF0D *arg1 = (Functions0D::VertexOrientation3DF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_VertexOrientation3DF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VertexOrientation3DF0D" "', argument " "1"" of type '" "Functions0D::VertexOrientation3DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::VertexOrientation3DF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *VertexOrientation3DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Curvature2DAngleF0D *arg1 = (Functions0D::Curvature2DAngleF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curvature2DAngleF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curvature2DAngleF0D_getName" "', argument " "1"" of type '" "Functions0D::Curvature2DAngleF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::Curvature2DAngleF0D * >(argp1); + { + try { + result = ((Functions0D::Curvature2DAngleF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Curvature2DAngleF0D *arg1 = (Functions0D::Curvature2DAngleF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curvature2DAngleF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curvature2DAngleF0D___call__" "', argument " "1"" of type '" "Functions0D::Curvature2DAngleF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::Curvature2DAngleF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curvature2DAngleF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Curvature2DAngleF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Curvature2DAngleF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Curvature2DAngleF0D")) SWIG_fail; + { + try { + result = (Functions0D::Curvature2DAngleF0D *)new Functions0D::Curvature2DAngleF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Curvature2DAngleF0D *arg1 = (Functions0D::Curvature2DAngleF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Curvature2DAngleF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Curvature2DAngleF0D" "', argument " "1"" of type '" "Functions0D::Curvature2DAngleF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::Curvature2DAngleF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Curvature2DAngleF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ZDiscontinuityF0D *arg1 = (Functions0D::ZDiscontinuityF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ZDiscontinuityF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZDiscontinuityF0D_getName" "', argument " "1"" of type '" "Functions0D::ZDiscontinuityF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::ZDiscontinuityF0D * >(argp1); + { + try { + result = ((Functions0D::ZDiscontinuityF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ZDiscontinuityF0D *arg1 = (Functions0D::ZDiscontinuityF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ZDiscontinuityF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZDiscontinuityF0D___call__" "', argument " "1"" of type '" "Functions0D::ZDiscontinuityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ZDiscontinuityF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZDiscontinuityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZDiscontinuityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ZDiscontinuityF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ZDiscontinuityF0D")) SWIG_fail; + { + try { + result = (Functions0D::ZDiscontinuityF0D *)new Functions0D::ZDiscontinuityF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ZDiscontinuityF0D *arg1 = (Functions0D::ZDiscontinuityF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ZDiscontinuityF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZDiscontinuityF0D" "', argument " "1"" of type '" "Functions0D::ZDiscontinuityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ZDiscontinuityF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ZDiscontinuityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Normal2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Normal2DF0D *arg1 = (Functions0D::Normal2DF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Normal2DF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Normal2DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Normal2DF0D_getName" "', argument " "1"" of type '" "Functions0D::Normal2DF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::Normal2DF0D * >(argp1); + { + try { + result = ((Functions0D::Normal2DF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Normal2DF0D *arg1 = (Functions0D::Normal2DF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Normal2DF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Normal2DF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Normal2DF0D___call__" "', argument " "1"" of type '" "Functions0D::Normal2DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::Normal2DF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Normal2DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Normal2DF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Normal2DF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Normal2DF0D")) SWIG_fail; + { + try { + result = (Functions0D::Normal2DF0D *)new Functions0D::Normal2DF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::Normal2DF0D *arg1 = (Functions0D::Normal2DF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Normal2DF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Normal2DF0D" "', argument " "1"" of type '" "Functions0D::Normal2DF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::Normal2DF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Normal2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_MaterialF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::MaterialF0D *arg1 = (Functions0D::MaterialF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:MaterialF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__MaterialF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialF0D_getName" "', argument " "1"" of type '" "Functions0D::MaterialF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::MaterialF0D * >(argp1); + { + try { + result = ((Functions0D::MaterialF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MaterialF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::MaterialF0D *arg1 = (Functions0D::MaterialF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Material result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:MaterialF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__MaterialF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialF0D___call__" "', argument " "1"" of type '" "Functions0D::MaterialF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::MaterialF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MaterialF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MaterialF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Material(static_cast< const Material& >(result))), SWIGTYPE_p_Material, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::MaterialF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_MaterialF0D")) SWIG_fail; + { + try { + result = (Functions0D::MaterialF0D *)new Functions0D::MaterialF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::MaterialF0D *arg1 = (Functions0D::MaterialF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_MaterialF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaterialF0D" "', argument " "1"" of type '" "Functions0D::MaterialF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::MaterialF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MaterialF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ShapeIdF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ShapeIdF0D *arg1 = (Functions0D::ShapeIdF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShapeIdF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ShapeIdF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShapeIdF0D_getName" "', argument " "1"" of type '" "Functions0D::ShapeIdF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::ShapeIdF0D * >(argp1); + { + try { + result = ((Functions0D::ShapeIdF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShapeIdF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ShapeIdF0D *arg1 = (Functions0D::ShapeIdF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShapeIdF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ShapeIdF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShapeIdF0D___call__" "', argument " "1"" of type '" "Functions0D::ShapeIdF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ShapeIdF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShapeIdF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShapeIdF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ShapeIdF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ShapeIdF0D")) SWIG_fail; + { + try { + result = (Functions0D::ShapeIdF0D *)new Functions0D::ShapeIdF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ShapeIdF0D *arg1 = (Functions0D::ShapeIdF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ShapeIdF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShapeIdF0D" "', argument " "1"" of type '" "Functions0D::ShapeIdF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ShapeIdF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ShapeIdF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::QuantitativeInvisibilityF0D *arg1 = (Functions0D::QuantitativeInvisibilityF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:QuantitativeInvisibilityF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityF0D_getName" "', argument " "1"" of type '" "Functions0D::QuantitativeInvisibilityF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::QuantitativeInvisibilityF0D * >(argp1); + { + try { + result = ((Functions0D::QuantitativeInvisibilityF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::QuantitativeInvisibilityF0D *arg1 = (Functions0D::QuantitativeInvisibilityF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:QuantitativeInvisibilityF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityF0D___call__" "', argument " "1"" of type '" "Functions0D::QuantitativeInvisibilityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::QuantitativeInvisibilityF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QuantitativeInvisibilityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuantitativeInvisibilityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (unsigned int)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::QuantitativeInvisibilityF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_QuantitativeInvisibilityF0D")) SWIG_fail; + { + try { + result = (Functions0D::QuantitativeInvisibilityF0D *)new Functions0D::QuantitativeInvisibilityF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::QuantitativeInvisibilityF0D *arg1 = (Functions0D::QuantitativeInvisibilityF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_QuantitativeInvisibilityF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantitativeInvisibilityF0D" "', argument " "1"" of type '" "Functions0D::QuantitativeInvisibilityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::QuantitativeInvisibilityF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *QuantitativeInvisibilityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_CurveNatureF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::CurveNatureF0D *arg1 = (Functions0D::CurveNatureF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurveNatureF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__CurveNatureF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurveNatureF0D_getName" "', argument " "1"" of type '" "Functions0D::CurveNatureF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::CurveNatureF0D * >(argp1); + { + try { + result = ((Functions0D::CurveNatureF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurveNatureF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::CurveNatureF0D *arg1 = (Functions0D::CurveNatureF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurveNatureF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__CurveNatureF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurveNatureF0D___call__" "', argument " "1"" of type '" "Functions0D::CurveNatureF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::CurveNatureF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurveNatureF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurveNatureF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (Nature::EdgeNature)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::CurveNatureF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_CurveNatureF0D")) SWIG_fail; + { + try { + result = (Functions0D::CurveNatureF0D *)new Functions0D::CurveNatureF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::CurveNatureF0D *arg1 = (Functions0D::CurveNatureF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CurveNatureF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurveNatureF0D" "', argument " "1"" of type '" "Functions0D::CurveNatureF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::CurveNatureF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CurveNatureF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetShapeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetShapeF0D *arg1 = (Functions0D::GetShapeF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetShapeF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetShapeF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetShapeF0D_getName" "', argument " "1"" of type '" "Functions0D::GetShapeF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetShapeF0D * >(argp1); + { + try { + result = ((Functions0D::GetShapeF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetShapeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetShapeF0D *arg1 = (Functions0D::GetShapeF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetShapeF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetShapeF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetShapeF0D___call__" "', argument " "1"" of type '" "Functions0D::GetShapeF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetShapeF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetShapeF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetShapeF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (ViewShape *)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetShapeF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetShapeF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetShapeF0D *)new Functions0D::GetShapeF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetShapeF0D *arg1 = (Functions0D::GetShapeF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetShapeF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetShapeF0D" "', argument " "1"" of type '" "Functions0D::GetShapeF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetShapeF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetShapeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetOccludersF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetOccludersF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludersF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludersF0D_getName" "', argument " "1"" of type '" "Functions0D::GetOccludersF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludersF0D * >(argp1); + { + try { + result = ((Functions0D::GetOccludersF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetOccludersF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludersF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludersF0D___call__" "', argument " "1"" of type '" "Functions0D::GetOccludersF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludersF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetOccludersF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetOccludersF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludersF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetOccludersF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetOccludersF0D *)new Functions0D::GetOccludersF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetOccludersF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetOccludersF0D" "', argument " "1"" of type '" "Functions0D::GetOccludersF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludersF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetOccludersF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetOccludeeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludeeF0D *arg1 = (Functions0D::GetOccludeeF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetOccludeeF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludeeF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludeeF0D_getName" "', argument " "1"" of type '" "Functions0D::GetOccludeeF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludeeF0D * >(argp1); + { + try { + result = ((Functions0D::GetOccludeeF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludeeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludeeF0D *arg1 = (Functions0D::GetOccludeeF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetOccludeeF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludeeF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludeeF0D___call__" "', argument " "1"" of type '" "Functions0D::GetOccludeeF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludeeF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetOccludeeF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetOccludeeF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (ViewShape *)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludeeF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetOccludeeF0D")) SWIG_fail; + { + try { + result = (Functions0D::GetOccludeeF0D *)new Functions0D::GetOccludeeF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetOccludeeF0D *arg1 = (Functions0D::GetOccludeeF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetOccludeeF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetOccludeeF0D" "', argument " "1"" of type '" "Functions0D::GetOccludeeF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetOccludeeF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetOccludeeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getFEdge" "', argument " "1"" of type '" "Interface0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getFEdge" "', argument " "1"" of type '" "Interface0D &""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)Functions0D::getFEdge(*arg1,*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVoid",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DVoid",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DVoid" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DVoid__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DVoid__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(void)>(PyObject *)\n UnaryFunction1D<(void)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVoid",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVoid___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DVoid___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->UnaryFunction1D::operator ()(*arg2); + } else { + (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVoid",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DUnsigned",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DUnsigned" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DUnsigned__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DUnsigned__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(unsigned int)>(PyObject *)\n UnaryFunction1D<(unsigned int)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (unsigned int)(arg1)->UnaryFunction1D::operator ()(*arg2); + } else { + result = (unsigned int)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DFloat",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DFloat",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DFloat" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DFloat__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DFloat__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(float)>(PyObject *)\n UnaryFunction1D<(float)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DFloat",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DFloat___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DFloat___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (float)(arg1)->UnaryFunction1D::operator ()(*arg2); + } else { + result = (float)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DFloat",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DDouble",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DDouble",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DDouble" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DDouble__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DDouble__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(double)>(PyObject *)\n UnaryFunction1D<(double)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DDouble",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DDouble___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DDouble___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (double)(arg1)->UnaryFunction1D::operator ()(*arg2); + } else { + result = (double)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DDouble",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec2f",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DVec2f",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DVec2f" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DVec2f__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DVec2f__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + VecMat::Vec2 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DVec2f___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + } else { + result = (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec2f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryFunction1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec3f",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + IntegrationType arg2 ; + UnaryFunction1D *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_UnaryFunction1DVec3f",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnaryFunction1DVec3f" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); + } else { + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_UnaryFunction1DVec3f__SWIG_0(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DVec3f__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *,IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + } else { + result = ((UnaryFunction1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + Interface1D *arg2 = 0 ; + VecMat::Vec3 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DVec3f___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + } else { + result = (arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec3f",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction1DVectorViewShape")) SWIG_fail; + { + try { + result = (UnaryFunction1D > *)new UnaryFunction1D >(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + UnaryFunction1D > *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVectorViewShape",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (UnaryFunction1D > *)new UnaryFunction1D >(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>()\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>(IntegrationType)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVectorViewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + { + try { + result = ((UnaryFunction1D > const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + Interface1D *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + IntegrationType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape_setIntegrationType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + (arg1)->setIntegrationType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + IntegrationType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getIntegrationType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + } + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + { + try { + result = (IntegrationType)((UnaryFunction1D > const *)arg1)->getIntegrationType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryFunction1DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetXF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetXF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetXF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetXF1D *)new Functions1D::GetXF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetXF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetXF1D *arg1 = (Functions1D::GetXF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetXF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetXF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetXF1D_getName" "', argument " "1"" of type '" "Functions1D::GetXF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetXF1D * >(argp1); + { + try { + result = ((Functions1D::GetXF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetXF1D *arg1 = (Functions1D::GetXF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetXF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetXF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetXF1D___call__" "', argument " "1"" of type '" "Functions1D::GetXF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetXF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetXF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetXF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetXF1D *arg1 = (Functions1D::GetXF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetXF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetXF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetXF1D" "', argument " "1"" of type '" "Functions1D::GetXF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetXF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetXF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetYF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetYF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetYF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetYF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetYF1D *)new Functions1D::GetYF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetYF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetYF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetYF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetYF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetYF1D *)new Functions1D::GetYF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetYF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_GetYF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetYF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetYF1D(IntegrationType)\n Functions1D::GetYF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetYF1D *arg1 = (Functions1D::GetYF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetYF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetYF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetYF1D_getName" "', argument " "1"" of type '" "Functions1D::GetYF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetYF1D * >(argp1); + { + try { + result = ((Functions1D::GetYF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetYF1D *arg1 = (Functions1D::GetYF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetYF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetYF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetYF1D___call__" "', argument " "1"" of type '" "Functions1D::GetYF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetYF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetYF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetYF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetYF1D *arg1 = (Functions1D::GetYF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetYF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetYF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetYF1D" "', argument " "1"" of type '" "Functions1D::GetYF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetYF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetYF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetZF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetZF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetZF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetZF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetZF1D *)new Functions1D::GetZF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetZF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetZF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetZF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetZF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetZF1D *)new Functions1D::GetZF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetZF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_GetZF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetZF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetZF1D(IntegrationType)\n Functions1D::GetZF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetZF1D *arg1 = (Functions1D::GetZF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetZF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetZF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetZF1D_getName" "', argument " "1"" of type '" "Functions1D::GetZF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetZF1D * >(argp1); + { + try { + result = ((Functions1D::GetZF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetZF1D *arg1 = (Functions1D::GetZF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetZF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetZF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetZF1D___call__" "', argument " "1"" of type '" "Functions1D::GetZF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetZF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetZF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetZF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetZF1D *arg1 = (Functions1D::GetZF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetZF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetZF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetZF1D" "', argument " "1"" of type '" "Functions1D::GetZF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetZF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetZF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetProjectedXF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetProjectedXF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetProjectedXF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetProjectedXF1D *)new Functions1D::GetProjectedXF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedXF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedXF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetProjectedXF1D *)new Functions1D::GetProjectedXF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_GetProjectedXF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetProjectedXF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedXF1D(IntegrationType)\n Functions1D::GetProjectedXF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedXF1D *arg1 = (Functions1D::GetProjectedXF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedXF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedXF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedXF1D_getName" "', argument " "1"" of type '" "Functions1D::GetProjectedXF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedXF1D * >(argp1); + { + try { + result = ((Functions1D::GetProjectedXF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedXF1D *arg1 = (Functions1D::GetProjectedXF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedXF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedXF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedXF1D___call__" "', argument " "1"" of type '" "Functions1D::GetProjectedXF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedXF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedXF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedXF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedXF1D *arg1 = (Functions1D::GetProjectedXF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedXF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedXF1D" "', argument " "1"" of type '" "Functions1D::GetProjectedXF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedXF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetProjectedYF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetProjectedYF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetProjectedYF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetProjectedYF1D *)new Functions1D::GetProjectedYF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedYF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedYF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetProjectedYF1D *)new Functions1D::GetProjectedYF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_GetProjectedYF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetProjectedYF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedYF1D(IntegrationType)\n Functions1D::GetProjectedYF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedYF1D *arg1 = (Functions1D::GetProjectedYF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedYF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedYF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedYF1D_getName" "', argument " "1"" of type '" "Functions1D::GetProjectedYF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedYF1D * >(argp1); + { + try { + result = ((Functions1D::GetProjectedYF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedYF1D *arg1 = (Functions1D::GetProjectedYF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedYF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedYF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedYF1D___call__" "', argument " "1"" of type '" "Functions1D::GetProjectedYF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedYF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedYF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedYF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedYF1D *arg1 = (Functions1D::GetProjectedYF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedYF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedYF1D" "', argument " "1"" of type '" "Functions1D::GetProjectedYF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedYF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::GetProjectedZF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetProjectedZF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetProjectedZF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::GetProjectedZF1D *)new Functions1D::GetProjectedZF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedZF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetProjectedZF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetProjectedZF1D *)new Functions1D::GetProjectedZF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_GetProjectedZF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetProjectedZF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedZF1D(IntegrationType)\n Functions1D::GetProjectedZF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedZF1D *arg1 = (Functions1D::GetProjectedZF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetProjectedZF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedZF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedZF1D_getName" "', argument " "1"" of type '" "Functions1D::GetProjectedZF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedZF1D * >(argp1); + { + try { + result = ((Functions1D::GetProjectedZF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetProjectedZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedZF1D *arg1 = (Functions1D::GetProjectedZF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetProjectedZF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedZF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetProjectedZF1D___call__" "', argument " "1"" of type '" "Functions1D::GetProjectedZF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedZF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetProjectedZF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetProjectedZF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetProjectedZF1D *arg1 = (Functions1D::GetProjectedZF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetProjectedZF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetProjectedZF1D" "', argument " "1"" of type '" "Functions1D::GetProjectedZF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetProjectedZF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetProjectedZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Orientation2DF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::Orientation2DF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Orientation2DF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Orientation2DF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::Orientation2DF1D *)new Functions1D::Orientation2DF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Orientation2DF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation2DF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Orientation2DF1D")) SWIG_fail; + { + try { + result = (Functions1D::Orientation2DF1D *)new Functions1D::Orientation2DF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Orientation2DF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Orientation2DF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation2DF1D(IntegrationType)\n Functions1D::Orientation2DF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Orientation2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation2DF1D *arg1 = (Functions1D::Orientation2DF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Orientation2DF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation2DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Orientation2DF1D_getName" "', argument " "1"" of type '" "Functions1D::Orientation2DF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation2DF1D * >(argp1); + { + try { + result = ((Functions1D::Orientation2DF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation2DF1D *arg1 = (Functions1D::Orientation2DF1D *) 0 ; + Interface1D *arg2 = 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Orientation2DF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation2DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Orientation2DF1D___call__" "', argument " "1"" of type '" "Functions1D::Orientation2DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation2DF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Orientation2DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Orientation2DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Orientation2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation2DF1D *arg1 = (Functions1D::Orientation2DF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Orientation2DF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Orientation2DF1D" "', argument " "1"" of type '" "Functions1D::Orientation2DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation2DF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Orientation2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Orientation3DF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::Orientation3DF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Orientation3DF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Orientation3DF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::Orientation3DF1D *)new Functions1D::Orientation3DF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Orientation3DF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation3DF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Orientation3DF1D")) SWIG_fail; + { + try { + result = (Functions1D::Orientation3DF1D *)new Functions1D::Orientation3DF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Orientation3DF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Orientation3DF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation3DF1D(IntegrationType)\n Functions1D::Orientation3DF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Orientation3DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation3DF1D *arg1 = (Functions1D::Orientation3DF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Orientation3DF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation3DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Orientation3DF1D_getName" "', argument " "1"" of type '" "Functions1D::Orientation3DF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation3DF1D * >(argp1); + { + try { + result = ((Functions1D::Orientation3DF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation3DF1D *arg1 = (Functions1D::Orientation3DF1D *) 0 ; + Interface1D *arg2 = 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Orientation3DF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation3DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Orientation3DF1D___call__" "', argument " "1"" of type '" "Functions1D::Orientation3DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation3DF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Orientation3DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Orientation3DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Orientation3DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Orientation3DF1D *arg1 = (Functions1D::Orientation3DF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Orientation3DF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Orientation3DF1D" "', argument " "1"" of type '" "Functions1D::Orientation3DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Orientation3DF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Orientation3DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::ZDiscontinuityF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ZDiscontinuityF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZDiscontinuityF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::ZDiscontinuityF1D *)new Functions1D::ZDiscontinuityF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ZDiscontinuityF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ZDiscontinuityF1D")) SWIG_fail; + { + try { + result = (Functions1D::ZDiscontinuityF1D *)new Functions1D::ZDiscontinuityF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ZDiscontinuityF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ZDiscontinuityF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::ZDiscontinuityF1D(IntegrationType)\n Functions1D::ZDiscontinuityF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ZDiscontinuityF1D *arg1 = (Functions1D::ZDiscontinuityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ZDiscontinuityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZDiscontinuityF1D_getName" "', argument " "1"" of type '" "Functions1D::ZDiscontinuityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::ZDiscontinuityF1D * >(argp1); + { + try { + result = ((Functions1D::ZDiscontinuityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ZDiscontinuityF1D *arg1 = (Functions1D::ZDiscontinuityF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ZDiscontinuityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZDiscontinuityF1D___call__" "', argument " "1"" of type '" "Functions1D::ZDiscontinuityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::ZDiscontinuityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZDiscontinuityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZDiscontinuityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ZDiscontinuityF1D *arg1 = (Functions1D::ZDiscontinuityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ZDiscontinuityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZDiscontinuityF1D" "', argument " "1"" of type '" "Functions1D::ZDiscontinuityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::ZDiscontinuityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ZDiscontinuityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::QuantitativeInvisibilityF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_QuantitativeInvisibilityF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuantitativeInvisibilityF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::QuantitativeInvisibilityF1D *)new Functions1D::QuantitativeInvisibilityF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::QuantitativeInvisibilityF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_QuantitativeInvisibilityF1D")) SWIG_fail; + { + try { + result = (Functions1D::QuantitativeInvisibilityF1D *)new Functions1D::QuantitativeInvisibilityF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_QuantitativeInvisibilityF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_QuantitativeInvisibilityF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n Functions1D::QuantitativeInvisibilityF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::QuantitativeInvisibilityF1D *arg1 = (Functions1D::QuantitativeInvisibilityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:QuantitativeInvisibilityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityF1D_getName" "', argument " "1"" of type '" "Functions1D::QuantitativeInvisibilityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::QuantitativeInvisibilityF1D * >(argp1); + { + try { + result = ((Functions1D::QuantitativeInvisibilityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::QuantitativeInvisibilityF1D *arg1 = (Functions1D::QuantitativeInvisibilityF1D *) 0 ; + Interface1D *arg2 = 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:QuantitativeInvisibilityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityF1D___call__" "', argument " "1"" of type '" "Functions1D::QuantitativeInvisibilityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::QuantitativeInvisibilityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QuantitativeInvisibilityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuantitativeInvisibilityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (unsigned int)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::QuantitativeInvisibilityF1D *arg1 = (Functions1D::QuantitativeInvisibilityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_QuantitativeInvisibilityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantitativeInvisibilityF1D" "', argument " "1"" of type '" "Functions1D::QuantitativeInvisibilityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::QuantitativeInvisibilityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *QuantitativeInvisibilityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_CurveNatureF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::CurveNatureF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CurveNatureF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CurveNatureF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::CurveNatureF1D *)new Functions1D::CurveNatureF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurveNatureF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::CurveNatureF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_CurveNatureF1D")) SWIG_fail; + { + try { + result = (Functions1D::CurveNatureF1D *)new Functions1D::CurveNatureF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_CurveNatureF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CurveNatureF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n Possible C/C++ prototypes are:\n Functions1D::CurveNatureF1D(IntegrationType)\n Functions1D::CurveNatureF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurveNatureF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::CurveNatureF1D *arg1 = (Functions1D::CurveNatureF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurveNatureF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__CurveNatureF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurveNatureF1D_getName" "', argument " "1"" of type '" "Functions1D::CurveNatureF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::CurveNatureF1D * >(argp1); + { + try { + result = ((Functions1D::CurveNatureF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurveNatureF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::CurveNatureF1D *arg1 = (Functions1D::CurveNatureF1D *) 0 ; + Interface1D *arg2 = 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurveNatureF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__CurveNatureF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurveNatureF1D___call__" "', argument " "1"" of type '" "Functions1D::CurveNatureF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::CurveNatureF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurveNatureF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurveNatureF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (Nature::EdgeNature)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CurveNatureF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::CurveNatureF1D *arg1 = (Functions1D::CurveNatureF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CurveNatureF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurveNatureF1D" "', argument " "1"" of type '" "Functions1D::CurveNatureF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::CurveNatureF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CurveNatureF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_TimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::TimeStampF1D *arg1 = (Functions1D::TimeStampF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TimeStampF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__TimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeStampF1D_getName" "', argument " "1"" of type '" "Functions1D::TimeStampF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::TimeStampF1D * >(argp1); + { + try { + result = ((Functions1D::TimeStampF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::TimeStampF1D *arg1 = (Functions1D::TimeStampF1D *) 0 ; + Interface1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TimeStampF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__TimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeStampF1D___call__" "', argument " "1"" of type '" "Functions1D::TimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::TimeStampF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::TimeStampF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_TimeStampF1D")) SWIG_fail; + { + try { + result = (Functions1D::TimeStampF1D *)new Functions1D::TimeStampF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::TimeStampF1D *arg1 = (Functions1D::TimeStampF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TimeStampF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TimeStampF1D" "', argument " "1"" of type '" "Functions1D::TimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::TimeStampF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::IncrementChainingTimeStampF1D *arg1 = (Functions1D::IncrementChainingTimeStampF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:IncrementChainingTimeStampF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementChainingTimeStampF1D_getName" "', argument " "1"" of type '" "Functions1D::IncrementChainingTimeStampF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::IncrementChainingTimeStampF1D * >(argp1); + { + try { + result = ((Functions1D::IncrementChainingTimeStampF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::IncrementChainingTimeStampF1D *arg1 = (Functions1D::IncrementChainingTimeStampF1D *) 0 ; + Interface1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:IncrementChainingTimeStampF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementChainingTimeStampF1D___call__" "', argument " "1"" of type '" "Functions1D::IncrementChainingTimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::IncrementChainingTimeStampF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IncrementChainingTimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IncrementChainingTimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::IncrementChainingTimeStampF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_IncrementChainingTimeStampF1D")) SWIG_fail; + { + try { + result = (Functions1D::IncrementChainingTimeStampF1D *)new Functions1D::IncrementChainingTimeStampF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::IncrementChainingTimeStampF1D *arg1 = (Functions1D::IncrementChainingTimeStampF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_IncrementChainingTimeStampF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IncrementChainingTimeStampF1D" "', argument " "1"" of type '" "Functions1D::IncrementChainingTimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::IncrementChainingTimeStampF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IncrementChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ChainingTimeStampF1D *arg1 = (Functions1D::ChainingTimeStampF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingTimeStampF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingTimeStampF1D_getName" "', argument " "1"" of type '" "Functions1D::ChainingTimeStampF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::ChainingTimeStampF1D * >(argp1); + { + try { + result = ((Functions1D::ChainingTimeStampF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ChainingTimeStampF1D *arg1 = (Functions1D::ChainingTimeStampF1D *) 0 ; + Interface1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ChainingTimeStampF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingTimeStampF1D___call__" "', argument " "1"" of type '" "Functions1D::ChainingTimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::ChainingTimeStampF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ChainingTimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ChainingTimeStampF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ChainingTimeStampF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ChainingTimeStampF1D")) SWIG_fail; + { + try { + result = (Functions1D::ChainingTimeStampF1D *)new Functions1D::ChainingTimeStampF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::ChainingTimeStampF1D *arg1 = (Functions1D::ChainingTimeStampF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ChainingTimeStampF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ChainingTimeStampF1D" "', argument " "1"" of type '" "Functions1D::ChainingTimeStampF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::ChainingTimeStampF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::Curvature2DAngleF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Curvature2DAngleF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Curvature2DAngleF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::Curvature2DAngleF1D *)new Functions1D::Curvature2DAngleF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Curvature2DAngleF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Curvature2DAngleF1D")) SWIG_fail; + { + try { + result = (Functions1D::Curvature2DAngleF1D *)new Functions1D::Curvature2DAngleF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Curvature2DAngleF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Curvature2DAngleF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Curvature2DAngleF1D(IntegrationType)\n Functions1D::Curvature2DAngleF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Curvature2DAngleF1D *arg1 = (Functions1D::Curvature2DAngleF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curvature2DAngleF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curvature2DAngleF1D_getName" "', argument " "1"" of type '" "Functions1D::Curvature2DAngleF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::Curvature2DAngleF1D * >(argp1); + { + try { + result = ((Functions1D::Curvature2DAngleF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Curvature2DAngleF1D *arg1 = (Functions1D::Curvature2DAngleF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curvature2DAngleF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curvature2DAngleF1D___call__" "', argument " "1"" of type '" "Functions1D::Curvature2DAngleF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Curvature2DAngleF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curvature2DAngleF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Curvature2DAngleF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Curvature2DAngleF1D *arg1 = (Functions1D::Curvature2DAngleF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Curvature2DAngleF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Curvature2DAngleF1D" "', argument " "1"" of type '" "Functions1D::Curvature2DAngleF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Curvature2DAngleF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Curvature2DAngleF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Normal2DF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IntegrationType arg1 ; + Functions1D::Normal2DF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Normal2DF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Normal2DF1D" "', argument " "1"" of type '" "IntegrationType""'"); + } + arg1 = static_cast< IntegrationType >(val1); + { + try { + result = (Functions1D::Normal2DF1D *)new Functions1D::Normal2DF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Normal2DF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Normal2DF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Normal2DF1D")) SWIG_fail; + { + try { + result = (Functions1D::Normal2DF1D *)new Functions1D::Normal2DF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Normal2DF1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Normal2DF1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Normal2DF1D(IntegrationType)\n Functions1D::Normal2DF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Normal2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Normal2DF1D *arg1 = (Functions1D::Normal2DF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Normal2DF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Normal2DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Normal2DF1D_getName" "', argument " "1"" of type '" "Functions1D::Normal2DF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::Normal2DF1D * >(argp1); + { + try { + result = ((Functions1D::Normal2DF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Normal2DF1D *arg1 = (Functions1D::Normal2DF1D *) 0 ; + Interface1D *arg2 = 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Normal2DF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Normal2DF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Normal2DF1D___call__" "', argument " "1"" of type '" "Functions1D::Normal2DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Normal2DF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Normal2DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Normal2DF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Normal2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::Normal2DF1D *arg1 = (Functions1D::Normal2DF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Normal2DF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Normal2DF1D" "', argument " "1"" of type '" "Functions1D::Normal2DF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::Normal2DF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Normal2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetShapeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetShapeF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetShapeF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetShapeF1D *)new Functions1D::GetShapeF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetShapeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetShapeF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetShapeF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetShapeF1D_getName" "', argument " "1"" of type '" "Functions1D::GetShapeF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetShapeF1D * >(argp1); + { + try { + result = ((Functions1D::GetShapeF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; + Interface1D *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetShapeF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetShapeF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetShapeF1D___call__" "', argument " "1"" of type '" "Functions1D::GetShapeF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetShapeF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetShapeF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetShapeF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetShapeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetShapeF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetShapeF1D" "', argument " "1"" of type '" "Functions1D::GetShapeF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetShapeF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetShapeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetOccludersF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludersF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetOccludersF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetOccludersF1D *)new Functions1D::GetOccludersF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludersF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetOccludersF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludersF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludersF1D_getName" "', argument " "1"" of type '" "Functions1D::GetOccludersF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludersF1D * >(argp1); + { + try { + result = ((Functions1D::GetOccludersF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; + Interface1D *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetOccludersF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludersF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludersF1D___call__" "', argument " "1"" of type '" "Functions1D::GetOccludersF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludersF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetOccludersF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetOccludersF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludersF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetOccludersF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetOccludersF1D" "', argument " "1"" of type '" "Functions1D::GetOccludersF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludersF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetOccludersF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetOccludeeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludeeF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_GetOccludeeF1D")) SWIG_fail; + { + try { + result = (Functions1D::GetOccludeeF1D *)new Functions1D::GetOccludeeF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludeeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetOccludeeF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludeeF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludeeF1D_getName" "', argument " "1"" of type '" "Functions1D::GetOccludeeF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludeeF1D * >(argp1); + { + try { + result = ((Functions1D::GetOccludeeF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; + Interface1D *arg2 = 0 ; + std::vector > result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetOccludeeF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludeeF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetOccludeeF1D___call__" "', argument " "1"" of type '" "Functions1D::GetOccludeeF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludeeF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetOccludeeF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetOccludeeF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = swig::from(static_cast< std::vector > >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludeeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetOccludeeF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetOccludeeF1D" "', argument " "1"" of type '" "Functions1D::GetOccludeeF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetOccludeeF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetOccludeeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Module_setAlwaysRefresh",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_bool(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Module_setAlwaysRefresh" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + { + try { + Module::setAlwaysRefresh(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + + if (!PyArg_ParseTuple(args,(char *)":Module_setAlwaysRefresh")) SWIG_fail; + { + try { + Module::setAlwaysRefresh(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_Module_setAlwaysRefresh__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_bool(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Module_setAlwaysRefresh__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n Possible C/C++ prototypes are:\n setAlwaysRefresh(bool)\n Module::setAlwaysRefresh()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setCausal__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Module_setCausal",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_bool(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Module_setCausal" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + { + try { + Module::setCausal(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setCausal__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + + if (!PyArg_ParseTuple(args,(char *)":Module_setCausal")) SWIG_fail; + { + try { + Module::setCausal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_Module_setCausal__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_bool(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Module_setCausal__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n Possible C/C++ prototypes are:\n setCausal(bool)\n Module::setCausal()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setDrawable__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool arg1 ; + bool val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Module_setDrawable",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_bool(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Module_setDrawable" "', argument " "1"" of type '" "bool""'"); + } + arg1 = static_cast< bool >(val1); + { + try { + Module::setDrawable(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setDrawable__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + + if (!PyArg_ParseTuple(args,(char *)":Module_setDrawable")) SWIG_fail; + { + try { + Module::setDrawable(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_Module_setDrawable__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_bool(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Module_setDrawable__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n Possible C/C++ prototypes are:\n setDrawable(bool)\n Module::setDrawable()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_getAlwaysRefresh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":Module_getAlwaysRefresh")) SWIG_fail; + { + try { + result = (bool)Module::getAlwaysRefresh(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_getCausal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":Module_getCausal")) SWIG_fail; + { + try { + result = (bool)Module::getCausal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Module_getDrawable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + bool result; + + if (!PyArg_ParseTuple(args,(char *)":Module_getDrawable")) SWIG_fail; + { + try { + result = (bool)Module::getDrawable(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Module(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Module *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Module")) SWIG_fail; + { + try { + result = (Module *)new Module(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Module, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Module(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Module *arg1 = (Module *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Module",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Module, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Module" "', argument " "1"" of type '" "Module *""'"); + } + arg1 = reinterpret_cast< Module * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Module_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Module, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_DensityF0D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + Functions0D::DensityF0D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_DensityF0D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityF0D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (Functions0D::DensityF0D *)new Functions0D::DensityF0D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__DensityF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF0D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::DensityF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_DensityF0D")) SWIG_fail; + { + try { + result = (Functions0D::DensityF0D *)new Functions0D::DensityF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__DensityF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_DensityF0D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityF0D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n Possible C/C++ prototypes are:\n Functions0D::DensityF0D(double)\n Functions0D::DensityF0D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::DensityF0D *arg1 = (Functions0D::DensityF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:DensityF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__DensityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityF0D_getName" "', argument " "1"" of type '" "Functions0D::DensityF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::DensityF0D * >(argp1); + { + try { + result = ((Functions0D::DensityF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::DensityF0D *arg1 = (Functions0D::DensityF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:DensityF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__DensityF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityF0D___call__" "', argument " "1"" of type '" "Functions0D::DensityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::DensityF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DensityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DensityF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DensityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::DensityF0D *arg1 = (Functions0D::DensityF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_DensityF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__DensityF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DensityF0D" "', argument " "1"" of type '" "Functions0D::DensityF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::DensityF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DensityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__DensityF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + Functions0D::LocalAverageDepthF0D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_LocalAverageDepthF0D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocalAverageDepthF0D" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (Functions0D::LocalAverageDepthF0D *)new Functions0D::LocalAverageDepthF0D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::LocalAverageDepthF0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_LocalAverageDepthF0D")) SWIG_fail; + { + try { + result = (Functions0D::LocalAverageDepthF0D *)new Functions0D::LocalAverageDepthF0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_LocalAverageDepthF0D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_LocalAverageDepthF0D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n Possible C/C++ prototypes are:\n Functions0D::LocalAverageDepthF0D(real)\n Functions0D::LocalAverageDepthF0D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LocalAverageDepthF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::LocalAverageDepthF0D *arg1 = (Functions0D::LocalAverageDepthF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:LocalAverageDepthF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalAverageDepthF0D_getName" "', argument " "1"" of type '" "Functions0D::LocalAverageDepthF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::LocalAverageDepthF0D * >(argp1); + { + try { + result = ((Functions0D::LocalAverageDepthF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LocalAverageDepthF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::LocalAverageDepthF0D *arg1 = (Functions0D::LocalAverageDepthF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:LocalAverageDepthF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalAverageDepthF0D___call__" "', argument " "1"" of type '" "Functions0D::LocalAverageDepthF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::LocalAverageDepthF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalAverageDepthF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalAverageDepthF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LocalAverageDepthF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::LocalAverageDepthF0D *arg1 = (Functions0D::LocalAverageDepthF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_LocalAverageDepthF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalAverageDepthF0D" "', argument " "1"" of type '" "Functions0D::LocalAverageDepthF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::LocalAverageDepthF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LocalAverageDepthF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ReadMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + int arg2 ; + Functions0D::ReadMapPixelF0D *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ReadMapPixelF0D",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReadMapPixelF0D" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReadMapPixelF0D" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (Functions0D::ReadMapPixelF0D *)new Functions0D::ReadMapPixelF0D((char const *)arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadMapPixelF0D *arg1 = (Functions0D::ReadMapPixelF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ReadMapPixelF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadMapPixelF0D_getName" "', argument " "1"" of type '" "Functions0D::ReadMapPixelF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadMapPixelF0D * >(argp1); + { + try { + result = ((Functions0D::ReadMapPixelF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadMapPixelF0D *arg1 = (Functions0D::ReadMapPixelF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ReadMapPixelF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadMapPixelF0D___call__" "', argument " "1"" of type '" "Functions0D::ReadMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadMapPixelF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReadMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ReadMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ReadMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadMapPixelF0D *arg1 = (Functions0D::ReadMapPixelF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ReadMapPixelF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReadMapPixelF0D" "', argument " "1"" of type '" "Functions0D::ReadMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadMapPixelF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ReadMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ReadSteerableViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + int arg2 ; + Functions0D::ReadSteerableViewMapPixelF0D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ReadSteerableViewMapPixelF0D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ReadSteerableViewMapPixelF0D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReadSteerableViewMapPixelF0D" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (Functions0D::ReadSteerableViewMapPixelF0D *)new Functions0D::ReadSteerableViewMapPixelF0D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadSteerableViewMapPixelF0D *arg1 = (Functions0D::ReadSteerableViewMapPixelF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ReadSteerableViewMapPixelF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadSteerableViewMapPixelF0D_getName" "', argument " "1"" of type '" "Functions0D::ReadSteerableViewMapPixelF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadSteerableViewMapPixelF0D * >(argp1); + { + try { + result = ((Functions0D::ReadSteerableViewMapPixelF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadSteerableViewMapPixelF0D *arg1 = (Functions0D::ReadSteerableViewMapPixelF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ReadSteerableViewMapPixelF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadSteerableViewMapPixelF0D___call__" "', argument " "1"" of type '" "Functions0D::ReadSteerableViewMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadSteerableViewMapPixelF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReadSteerableViewMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ReadSteerableViewMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ReadSteerableViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadSteerableViewMapPixelF0D *arg1 = (Functions0D::ReadSteerableViewMapPixelF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ReadSteerableViewMapPixelF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReadSteerableViewMapPixelF0D" "', argument " "1"" of type '" "Functions0D::ReadSteerableViewMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadSteerableViewMapPixelF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ReadSteerableViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ReadCompleteViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + Functions0D::ReadCompleteViewMapPixelF0D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ReadCompleteViewMapPixelF0D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ReadCompleteViewMapPixelF0D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (Functions0D::ReadCompleteViewMapPixelF0D *)new Functions0D::ReadCompleteViewMapPixelF0D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadCompleteViewMapPixelF0D *arg1 = (Functions0D::ReadCompleteViewMapPixelF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ReadCompleteViewMapPixelF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadCompleteViewMapPixelF0D_getName" "', argument " "1"" of type '" "Functions0D::ReadCompleteViewMapPixelF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadCompleteViewMapPixelF0D * >(argp1); + { + try { + result = ((Functions0D::ReadCompleteViewMapPixelF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadCompleteViewMapPixelF0D *arg1 = (Functions0D::ReadCompleteViewMapPixelF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ReadCompleteViewMapPixelF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadCompleteViewMapPixelF0D___call__" "', argument " "1"" of type '" "Functions0D::ReadCompleteViewMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadCompleteViewMapPixelF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReadCompleteViewMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ReadCompleteViewMapPixelF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ReadCompleteViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::ReadCompleteViewMapPixelF0D *arg1 = (Functions0D::ReadCompleteViewMapPixelF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ReadCompleteViewMapPixelF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReadCompleteViewMapPixelF0D" "', argument " "1"" of type '" "Functions0D::ReadCompleteViewMapPixelF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::ReadCompleteViewMapPixelF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ReadCompleteViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + Functions0D::GetViewMapGradientNormF0D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetViewMapGradientNormF0D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetViewMapGradientNormF0D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (Functions0D::GetViewMapGradientNormF0D *)new Functions0D::GetViewMapGradientNormF0D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetViewMapGradientNormF0D *arg1 = (Functions0D::GetViewMapGradientNormF0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetViewMapGradientNormF0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetViewMapGradientNormF0D_getName" "', argument " "1"" of type '" "Functions0D::GetViewMapGradientNormF0D const *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetViewMapGradientNormF0D * >(argp1); + { + try { + result = ((Functions0D::GetViewMapGradientNormF0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetViewMapGradientNormF0D *arg1 = (Functions0D::GetViewMapGradientNormF0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetViewMapGradientNormF0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetViewMapGradientNormF0D___call__" "', argument " "1"" of type '" "Functions0D::GetViewMapGradientNormF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetViewMapGradientNormF0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetViewMapGradientNormF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetViewMapGradientNormF0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (float)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions0D::GetViewMapGradientNormF0D *arg1 = (Functions0D::GetViewMapGradientNormF0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetViewMapGradientNormF0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetViewMapGradientNormF0D" "', argument " "1"" of type '" "Functions0D::GetViewMapGradientNormF0D *""'"); + } + arg1 = reinterpret_cast< Functions0D::GetViewMapGradientNormF0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetViewMapGradientNormF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_DensityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + IntegrationType arg2 ; + float arg3 ; + Functions1D::DensityF1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_DensityF1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityF1D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DensityF1D" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (Functions1D::DensityF1D *)new Functions1D::DensityF1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__DensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + IntegrationType arg2 ; + Functions1D::DensityF1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_DensityF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityF1D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Functions1D::DensityF1D *)new Functions1D::DensityF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__DensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + Functions1D::DensityF1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_DensityF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityF1D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (Functions1D::DensityF1D *)new Functions1D::DensityF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__DensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF1D__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::DensityF1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_DensityF1D")) SWIG_fail; + { + try { + result = (Functions1D::DensityF1D *)new Functions1D::DensityF1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__DensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_DensityF1D__SWIG_3(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityF1D__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityF1D__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityF1D__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::DensityF1D(double,IntegrationType,float)\n Functions1D::DensityF1D(double,IntegrationType)\n Functions1D::DensityF1D(double)\n Functions1D::DensityF1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::DensityF1D *arg1 = (Functions1D::DensityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_DensityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__DensityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DensityF1D" "', argument " "1"" of type '" "Functions1D::DensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::DensityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::DensityF1D *arg1 = (Functions1D::DensityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:DensityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__DensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityF1D_getName" "', argument " "1"" of type '" "Functions1D::DensityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::DensityF1D * >(argp1); + { + try { + result = ((Functions1D::DensityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::DensityF1D *arg1 = (Functions1D::DensityF1D *) 0 ; + Interface1D *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:DensityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__DensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityF1D___call__" "', argument " "1"" of type '" "Functions1D::DensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::DensityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__DensityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + IntegrationType arg2 ; + Functions1D::LocalAverageDepthF1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_LocalAverageDepthF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocalAverageDepthF1D" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LocalAverageDepthF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Functions1D::LocalAverageDepthF1D *)new Functions1D::LocalAverageDepthF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + Functions1D::LocalAverageDepthF1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_LocalAverageDepthF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocalAverageDepthF1D" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (Functions1D::LocalAverageDepthF1D *)new Functions1D::LocalAverageDepthF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_LocalAverageDepthF1D__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_LocalAverageDepthF1D__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n Possible C/C++ prototypes are:\n Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n Functions1D::LocalAverageDepthF1D(real)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::LocalAverageDepthF1D *arg1 = (Functions1D::LocalAverageDepthF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:LocalAverageDepthF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalAverageDepthF1D_getName" "', argument " "1"" of type '" "Functions1D::LocalAverageDepthF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::LocalAverageDepthF1D * >(argp1); + { + try { + result = ((Functions1D::LocalAverageDepthF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::LocalAverageDepthF1D *arg1 = (Functions1D::LocalAverageDepthF1D *) 0 ; + Interface1D *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:LocalAverageDepthF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalAverageDepthF1D___call__" "', argument " "1"" of type '" "Functions1D::LocalAverageDepthF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::LocalAverageDepthF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalAverageDepthF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalAverageDepthF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LocalAverageDepthF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::LocalAverageDepthF1D *arg1 = (Functions1D::LocalAverageDepthF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_LocalAverageDepthF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalAverageDepthF1D" "', argument " "1"" of type '" "Functions1D::LocalAverageDepthF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::LocalAverageDepthF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LocalAverageDepthF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + IntegrationType arg2 ; + float arg3 ; + Functions1D::GetCompleteViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_GetCompleteViewMapDensityF1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (Functions1D::GetCompleteViewMapDensityF1D *)new Functions1D::GetCompleteViewMapDensityF1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + IntegrationType arg2 ; + Functions1D::GetCompleteViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_GetCompleteViewMapDensityF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Functions1D::GetCompleteViewMapDensityF1D *)new Functions1D::GetCompleteViewMapDensityF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Functions1D::GetCompleteViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetCompleteViewMapDensityF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetCompleteViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Functions1D::GetCompleteViewMapDensityF1D *)new Functions1D::GetCompleteViewMapDensityF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetCompleteViewMapDensityF1D__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetCompleteViewMapDensityF1D__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetCompleteViewMapDensityF1D__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetCompleteViewMapDensityF1D *arg1 = (Functions1D::GetCompleteViewMapDensityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetCompleteViewMapDensityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCompleteViewMapDensityF1D_getName" "', argument " "1"" of type '" "Functions1D::GetCompleteViewMapDensityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetCompleteViewMapDensityF1D * >(argp1); + { + try { + result = ((Functions1D::GetCompleteViewMapDensityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetCompleteViewMapDensityF1D *arg1 = (Functions1D::GetCompleteViewMapDensityF1D *) 0 ; + Interface1D *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetCompleteViewMapDensityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCompleteViewMapDensityF1D___call__" "', argument " "1"" of type '" "Functions1D::GetCompleteViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetCompleteViewMapDensityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetCompleteViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetCompleteViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetCompleteViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetCompleteViewMapDensityF1D *arg1 = (Functions1D::GetCompleteViewMapDensityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetCompleteViewMapDensityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetCompleteViewMapDensityF1D" "', argument " "1"" of type '" "Functions1D::GetCompleteViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetCompleteViewMapDensityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetCompleteViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + unsigned int arg2 ; + IntegrationType arg3 ; + float arg4 ; + Functions1D::GetDirectionalViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_GetDirectionalViewMapDensityF1D",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "3"" of type '" "IntegrationType""'"); + } + arg3 = static_cast< IntegrationType >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + result = (Functions1D::GetDirectionalViewMapDensityF1D *)new Functions1D::GetDirectionalViewMapDensityF1D(arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + unsigned int arg2 ; + IntegrationType arg3 ; + Functions1D::GetDirectionalViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_GetDirectionalViewMapDensityF1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "3"" of type '" "IntegrationType""'"); + } + arg3 = static_cast< IntegrationType >(val3); + { + try { + result = (Functions1D::GetDirectionalViewMapDensityF1D *)new Functions1D::GetDirectionalViewMapDensityF1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + unsigned int arg2 ; + Functions1D::GetDirectionalViewMapDensityF1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_GetDirectionalViewMapDensityF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetDirectionalViewMapDensityF1D" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + result = (Functions1D::GetDirectionalViewMapDensityF1D *)new Functions1D::GetDirectionalViewMapDensityF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetDirectionalViewMapDensityF1D__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetDirectionalViewMapDensityF1D__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetDirectionalViewMapDensityF1D__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetDirectionalViewMapDensityF1D *arg1 = (Functions1D::GetDirectionalViewMapDensityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetDirectionalViewMapDensityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDirectionalViewMapDensityF1D_getName" "', argument " "1"" of type '" "Functions1D::GetDirectionalViewMapDensityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetDirectionalViewMapDensityF1D * >(argp1); + { + try { + result = ((Functions1D::GetDirectionalViewMapDensityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetDirectionalViewMapDensityF1D *arg1 = (Functions1D::GetDirectionalViewMapDensityF1D *) 0 ; + Interface1D *arg2 = 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetDirectionalViewMapDensityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDirectionalViewMapDensityF1D___call__" "', argument " "1"" of type '" "Functions1D::GetDirectionalViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetDirectionalViewMapDensityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetDirectionalViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetDirectionalViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (double)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetDirectionalViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetDirectionalViewMapDensityF1D *arg1 = (Functions1D::GetDirectionalViewMapDensityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetDirectionalViewMapDensityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetDirectionalViewMapDensityF1D" "', argument " "1"" of type '" "Functions1D::GetDirectionalViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetDirectionalViewMapDensityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetDirectionalViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + float arg3 ; + Functions1D::GetSteerableViewMapDensityF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_GetSteerableViewMapDensityF1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (Functions1D::GetSteerableViewMapDensityF1D *)new Functions1D::GetSteerableViewMapDensityF1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + Functions1D::GetSteerableViewMapDensityF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_GetSteerableViewMapDensityF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Functions1D::GetSteerableViewMapDensityF1D *)new Functions1D::GetSteerableViewMapDensityF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + Functions1D::GetSteerableViewMapDensityF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetSteerableViewMapDensityF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetSteerableViewMapDensityF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (Functions1D::GetSteerableViewMapDensityF1D *)new Functions1D::GetSteerableViewMapDensityF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetSteerableViewMapDensityF1D__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetSteerableViewMapDensityF1D__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetSteerableViewMapDensityF1D__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n Functions1D::GetSteerableViewMapDensityF1D(int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetSteerableViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetSteerableViewMapDensityF1D *arg1 = (Functions1D::GetSteerableViewMapDensityF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetSteerableViewMapDensityF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetSteerableViewMapDensityF1D" "', argument " "1"" of type '" "Functions1D::GetSteerableViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetSteerableViewMapDensityF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetSteerableViewMapDensityF1D *arg1 = (Functions1D::GetSteerableViewMapDensityF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetSteerableViewMapDensityF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSteerableViewMapDensityF1D_getName" "', argument " "1"" of type '" "Functions1D::GetSteerableViewMapDensityF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetSteerableViewMapDensityF1D * >(argp1); + { + try { + result = ((Functions1D::GetSteerableViewMapDensityF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetSteerableViewMapDensityF1D *arg1 = (Functions1D::GetSteerableViewMapDensityF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetSteerableViewMapDensityF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetSteerableViewMapDensityF1D___call__" "', argument " "1"" of type '" "Functions1D::GetSteerableViewMapDensityF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetSteerableViewMapDensityF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetSteerableViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetSteerableViewMapDensityF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetSteerableViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + float arg3 ; + Functions1D::GetViewMapGradientNormF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_GetViewMapGradientNormF1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (Functions1D::GetViewMapGradientNormF1D *)new Functions1D::GetViewMapGradientNormF1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + Functions1D::GetViewMapGradientNormF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_GetViewMapGradientNormF1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Functions1D::GetViewMapGradientNormF1D *)new Functions1D::GetViewMapGradientNormF1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + Functions1D::GetViewMapGradientNormF1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GetViewMapGradientNormF1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GetViewMapGradientNormF1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (Functions1D::GetViewMapGradientNormF1D *)new Functions1D::GetViewMapGradientNormF1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetViewMapGradientNormF1D__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetViewMapGradientNormF1D__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_GetViewMapGradientNormF1D__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n Functions1D::GetViewMapGradientNormF1D(int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetViewMapGradientNormF1D *arg1 = (Functions1D::GetViewMapGradientNormF1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:GetViewMapGradientNormF1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetViewMapGradientNormF1D_getName" "', argument " "1"" of type '" "Functions1D::GetViewMapGradientNormF1D const *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetViewMapGradientNormF1D * >(argp1); + { + try { + result = ((Functions1D::GetViewMapGradientNormF1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetViewMapGradientNormF1D *arg1 = (Functions1D::GetViewMapGradientNormF1D *) 0 ; + Interface1D *arg2 = 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GetViewMapGradientNormF1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetViewMapGradientNormF1D___call__" "', argument " "1"" of type '" "Functions1D::GetViewMapGradientNormF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetViewMapGradientNormF1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GetViewMapGradientNormF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GetViewMapGradientNormF1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (real)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Functions1D::GetViewMapGradientNormF1D *arg1 = (Functions1D::GetViewMapGradientNormF1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GetViewMapGradientNormF1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GetViewMapGradientNormF1D" "', argument " "1"" of type '" "Functions1D::GetViewMapGradientNormF1D *""'"); + } + arg1 = reinterpret_cast< Functions1D::GetViewMapGradientNormF1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GetViewMapGradientNormF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_GetTimeStampCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":GetTimeStampCF")) SWIG_fail; + { + try { + result = (unsigned int)ContextFunctions::GetTimeStampCF(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetCanvasWidthCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":GetCanvasWidthCF")) SWIG_fail; + { + try { + result = (unsigned int)ContextFunctions::GetCanvasWidthCF(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetCanvasHeightCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":GetCanvasHeightCF")) SWIG_fail; + { + try { + result = (unsigned int)ContextFunctions::GetCanvasHeightCF(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LoadMapCF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + unsigned int arg3 ; + float arg4 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:LoadMapCF",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LoadMapCF" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LoadMapCF" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LoadMapCF" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LoadMapCF" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + ContextFunctions::LoadMapCF((char const *)arg1,(char const *)arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LoadMapCF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + unsigned int arg3 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:LoadMapCF",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LoadMapCF" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LoadMapCF" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LoadMapCF" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + { + try { + ContextFunctions::LoadMapCF((char const *)arg1,(char const *)arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LoadMapCF__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:LoadMapCF",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LoadMapCF" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LoadMapCF" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + ContextFunctions::LoadMapCF((char const *)arg1,(char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_LoadMapCF__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_LoadMapCF__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_LoadMapCF__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n Possible C/C++ prototypes are:\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n ContextFunctions::LoadMapCF(char const *,char const *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadMapPixelCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + int arg2 ; + unsigned int arg3 ; + unsigned int arg4 ; + float result; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ReadMapPixelCF",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReadMapPixelCF" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadMapPixelCF" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReadMapPixelCF" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ReadMapPixelCF" "', argument " "4"" of type '" "unsigned int""'"); + } + arg4 = static_cast< unsigned int >(val4); + { + try { + result = (float)ContextFunctions::ReadMapPixelCF((char const *)arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + unsigned int arg2 ; + unsigned int arg3 ; + float result; + int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ReadCompleteViewMapPixelCF",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReadCompleteViewMapPixelCF" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadCompleteViewMapPixelCF" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReadCompleteViewMapPixelCF" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + { + try { + result = (float)ContextFunctions::ReadCompleteViewMapPixelCF(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ReadDirectionalViewMapPixelCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + int arg2 ; + unsigned int arg3 ; + unsigned int arg4 ; + float result; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ReadDirectionalViewMapPixelCF",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReadDirectionalViewMapPixelCF" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReadDirectionalViewMapPixelCF" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReadDirectionalViewMapPixelCF" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ReadDirectionalViewMapPixelCF" "', argument " "4"" of type '" "unsigned int""'"); + } + arg4 = static_cast< unsigned int >(val4); + { + try { + result = (float)ContextFunctions::ReadDirectionalViewMapPixelCF(arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GetSelectedFEdgeCF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + FEdge *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":GetSelectedFEdgeCF")) SWIG_fail; + { + try { + result = (FEdge *)ContextFunctions::GetSelectedFEdgeCF(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_AdjacencyIterator")) SWIG_fail; + { + try { + result = (AdjacencyIterator *)new AdjacencyIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + bool arg2 ; + bool arg3 ; + AdjacencyIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_AdjacencyIterator",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AdjacencyIterator" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AdjacencyIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AdjacencyIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + result = (AdjacencyIterator *)new AdjacencyIterator(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + bool arg2 ; + AdjacencyIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_AdjacencyIterator",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AdjacencyIterator" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AdjacencyIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + result = (AdjacencyIterator *)new AdjacencyIterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewVertex *arg1 = (ViewVertex *) 0 ; + AdjacencyIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_AdjacencyIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AdjacencyIterator" "', argument " "1"" of type '" "ViewVertex *""'"); + } + arg1 = reinterpret_cast< ViewVertex * >(argp1); + { + try { + result = (AdjacencyIterator *)new AdjacencyIterator(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = 0 ; + AdjacencyIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_AdjacencyIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_AdjacencyIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AdjacencyIterator" "', argument " "1"" of type '" "AdjacencyIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AdjacencyIterator" "', argument " "1"" of type '" "AdjacencyIterator const &""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (AdjacencyIterator *)new AdjacencyIterator((AdjacencyIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_AdjacencyIterator__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_AdjacencyIterator__SWIG_3(self, args); + } + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_AdjacencyIterator__SWIG_4(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_AdjacencyIterator__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_AdjacencyIterator__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n Possible C/C++ prototypes are:\n AdjacencyIterator()\n AdjacencyIterator(ViewVertex *,bool,bool)\n AdjacencyIterator(ViewVertex *,bool)\n AdjacencyIterator(ViewVertex *)\n AdjacencyIterator(AdjacencyIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_AdjacencyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_AdjacencyIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AdjacencyIterator" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_isEnd" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)(arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_isBegin" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)(arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_isIncoming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_isIncoming",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_isIncoming" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)((AdjacencyIterator const *)arg1)->isIncoming(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getObject" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewEdge *)(arg1)->operator *(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator___deref__" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewEdge *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_increment" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getExactTypeName" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getId" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Nature::EdgeNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getNature" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (Nature::EdgeNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_userdata_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_userdata_set" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_userdata_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (*arg1)->userdata = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_userdata_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_userdata_get" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + result = (void *) ((*arg1)->userdata); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_A" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_B" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_fedgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_fedgeA",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_fedgeA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedgeA(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_fedgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_fedgeB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_fedgeB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedgeB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_viewShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_viewShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->viewShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_aShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_aShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_aShape" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->aShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_AdjacencyIterator_aShape__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_AdjacencyIterator_aShape__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_isClosed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_isClosed",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_isClosed" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)(*arg1)->isClosed(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getChainingTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getChainingTimeStamp" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->getChainingTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_bShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_bShape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_bShape" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewShape *)(*arg1)->bShape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + std::vector *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluders",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluders" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + { + std::vector &_result_ref = (*arg1)->occluders(); + result = (std::vector *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_splittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Id *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_splittingId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_splittingId" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (Id *)(*arg1)->splittingId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Id, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewVertex *arg2 = (ViewVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + } + arg2 = reinterpret_cast< ViewVertex * >(argp2); + { + try { + (*arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Nature::EdgeNature arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned short val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetNature",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetNature" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + } + arg2 = static_cast< Nature::EdgeNature >(val2); + { + try { + (*arg1)->SetNature(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetFEdgeA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->SetFEdgeA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetFEdgeB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (*arg1)->SetFEdgeB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->SetShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetId" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_UpdateFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_UpdateFEdges",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_UpdateFEdges" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + (*arg1)->UpdateFEdges(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetaShape",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetaShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->SetaShape(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetQI",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetQI" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_SetQI" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + (*arg1)->SetQI(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setChainingTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setChainingTimeStamp" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_setChainingTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (*arg1)->setChainingTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_AddOccluder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewShape *arg2 = (ViewShape *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_AddOccluder",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_AddOccluder" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_AddOccluder" "', argument " "2"" of type '" "ViewShape *""'"); + } + arg2 = reinterpret_cast< ViewShape * >(argp2); + { + try { + (*arg1)->AddOccluder(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setSplittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Id *arg2 = (Id *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setSplittingId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setSplittingId" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Id, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setSplittingId" "', argument " "2"" of type '" "Id *""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (*arg1)->setSplittingId(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:AdjacencyIterator_intersect_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)(*arg1)->intersect_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + Geometry::Vec2r *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:AdjacencyIterator_include_in_2d_area",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2r * >(argp3); + { + try { + result = (bool)(*arg1)->include_in_2d_area((Geometry::Vec2r const &)*arg2,(Geometry::Vec2r const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getLength2D" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (real)(*arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_qi",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_qi" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (int)(*arg1)->qi(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluders_begin" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluders_end" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluders_size" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluders_empty" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occludee" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occluded_shape" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_occludee_empty" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_shape_id",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_shape_id" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->shape_id(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_shape" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_shape_importance",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_shape_importance" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (float)(*arg1)->shape_importance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_verticesBegin" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_verticesEnd" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_pointsBegin" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (*arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_pointsBegin" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_AdjacencyIterator_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_AdjacencyIterator_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_pointsEnd" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (*arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_pointsEnd" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (*arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_AdjacencyIterator_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_AdjacencyIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_AdjacencyIterator_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getTimeStamp",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getTimeStamp" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (unsigned int)(*arg1)->getTimeStamp(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setTimeStamp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setTimeStamp" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_setTimeStamp" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (*arg1)->setTimeStamp(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *AdjacencyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_AdjacencyIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ViewEdge *arg4 = (ViewEdge *) 0 ; + bool arg5 ; + ChainingIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ChainingIterator",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainingIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ChainingIterator" "', argument " "4"" of type '" "ViewEdge *""'"); + } + arg4 = reinterpret_cast< ViewEdge * >(argp4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ChainingIterator" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1,arg2,arg3,arg4,arg5); + } else { + result = (ChainingIterator *)new ChainingIterator(arg2,arg3,arg4,arg5); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ViewEdge *arg4 = (ViewEdge *) 0 ; + ChainingIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ChainingIterator",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainingIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ChainingIterator" "', argument " "4"" of type '" "ViewEdge *""'"); + } + arg4 = reinterpret_cast< ViewEdge * >(argp4); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1,arg2,arg3,arg4); + } else { + result = (ChainingIterator *)new ChainingIterator(arg2,arg3,arg4); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ChainingIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ChainingIterator",&obj0,&obj1,&obj2)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainingIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1,arg2,arg3); + } else { + result = (ChainingIterator *)new ChainingIterator(arg2,arg3); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + ChainingIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainingIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1,arg2); + } else { + result = (ChainingIterator *)new ChainingIterator(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainingIterator *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ChainingIterator",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1); + } else { + result = (ChainingIterator *)new ChainingIterator(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainingIterator *arg2 = 0 ; + ChainingIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainingIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ChainingIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "ChainingIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainingIterator" "', argument " "2"" of type '" "ChainingIterator const &""'"); + } + arg2 = reinterpret_cast< ChainingIterator * >(argp2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainingIterator *)new SwigDirector_ChainingIterator(arg1,(ChainingIterator const &)*arg2); + } else { + result = (ChainingIterator *)new ChainingIterator((ChainingIterator const &)*arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainingIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_ChainingIterator__SWIG_4(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ChainingIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainingIterator__SWIG_5(self, args); + } + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainingIterator__SWIG_3(self, args); + } + } + } + if (argc == 3) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainingIterator__SWIG_2(self, args); + } + } + } + } + if (argc == 4) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainingIterator__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainingIterator__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n Possible C/C++ prototypes are:\n ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n ChainingIterator(PyObject *,bool,bool)\n ChainingIterator(PyObject *,bool)\n ChainingIterator(PyObject *)\n ChainingIterator(PyObject *,ChainingIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_getExactTypeName" "', argument " "1"" of type '" "ChainingIterator const *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((ChainingIterator const *)arg1)->ChainingIterator::getExactTypeName(); + } else { + result = ((ChainingIterator const *)arg1)->getExactTypeName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_init",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_init" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->ChainingIterator::init(); + } else { + (arg1)->init(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + AdjacencyIterator *arg2 = 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:ChainingIterator_traverse",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_traverse" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_AdjacencyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ChainingIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ChainingIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + arg2 = reinterpret_cast< AdjacencyIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (ViewEdge *)(arg1)->ChainingIterator::traverse((AdjacencyIterator const &)*arg2); + } else { + result = (ViewEdge *)(arg1)->traverse((AdjacencyIterator const &)*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (director) { + SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result))); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_getVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_getVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_getVertex" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->getVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_isIncrementing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_isIncrementing",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_isIncrementing" "', argument " "1"" of type '" "ChainingIterator const *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + { + try { + result = (bool)((ChainingIterator const *)arg1)->isIncrementing(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_increment" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->ChainingIterator::increment(); + } else { + (arg1)->increment(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainingIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainingIterator_decrement" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + (arg1)->ChainingIterator::decrement(); + } else { + (arg1)->decrement(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ChainingIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ChainingIterator" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = (ChainingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ChainingIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainingIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ChainingIterator" "', argument " "1"" of type '" "ChainingIterator *""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ChainingIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ChainingIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + ViewEdge *arg3 = (ViewEdge *) 0 ; + bool arg4 ; + ChainSilhouetteIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ChainSilhouetteIterator",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainSilhouetteIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainSilhouetteIterator" "', argument " "3"" of type '" "ViewEdge *""'"); + } + arg3 = reinterpret_cast< ViewEdge * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ChainSilhouetteIterator" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainSilhouetteIterator *)new SwigDirector_ChainSilhouetteIterator(arg1,arg2,arg3,arg4); + } else { + result = (ChainSilhouetteIterator *)new ChainSilhouetteIterator(arg2,arg3,arg4); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + ViewEdge *arg3 = (ViewEdge *) 0 ; + ChainSilhouetteIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ChainSilhouetteIterator",&obj0,&obj1,&obj2)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainSilhouetteIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainSilhouetteIterator" "', argument " "3"" of type '" "ViewEdge *""'"); + } + arg3 = reinterpret_cast< ViewEdge * >(argp3); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainSilhouetteIterator *)new SwigDirector_ChainSilhouetteIterator(arg1,arg2,arg3); + } else { + result = (ChainSilhouetteIterator *)new ChainSilhouetteIterator(arg2,arg3); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + ChainSilhouetteIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainSilhouetteIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainSilhouetteIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainSilhouetteIterator *)new SwigDirector_ChainSilhouetteIterator(arg1,arg2); + } else { + result = (ChainSilhouetteIterator *)new ChainSilhouetteIterator(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainSilhouetteIterator *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ChainSilhouetteIterator",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainSilhouetteIterator *)new SwigDirector_ChainSilhouetteIterator(arg1); + } else { + result = (ChainSilhouetteIterator *)new ChainSilhouetteIterator(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainSilhouetteIterator *arg2 = 0 ; + ChainSilhouetteIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainSilhouetteIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ChainSilhouetteIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainSilhouetteIterator" "', argument " "2"" of type '" "ChainSilhouetteIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainSilhouetteIterator" "', argument " "2"" of type '" "ChainSilhouetteIterator const &""'"); + } + arg2 = reinterpret_cast< ChainSilhouetteIterator * >(argp2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainSilhouetteIterator *)new SwigDirector_ChainSilhouetteIterator(arg1,(ChainSilhouetteIterator const &)*arg2); + } else { + result = (ChainSilhouetteIterator *)new ChainSilhouetteIterator((ChainSilhouetteIterator const &)*arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_ChainSilhouetteIterator__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ChainSilhouetteIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainSilhouetteIterator__SWIG_4(self, args); + } + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainSilhouetteIterator__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainSilhouetteIterator__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainSilhouetteIterator__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n Possible C/C++ prototypes are:\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n ChainSilhouetteIterator(PyObject *,bool)\n ChainSilhouetteIterator(PyObject *)\n ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainSilhouetteIterator *arg1 = (ChainSilhouetteIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainSilhouetteIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainSilhouetteIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainSilhouetteIterator_getExactTypeName" "', argument " "1"" of type '" "ChainSilhouetteIterator const *""'"); + } + arg1 = reinterpret_cast< ChainSilhouetteIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((ChainSilhouetteIterator const *)arg1)->ChainSilhouetteIterator::getExactTypeName(); + } else { + result = ((ChainSilhouetteIterator const *)arg1)->getExactTypeName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainSilhouetteIterator *arg1 = (ChainSilhouetteIterator *) 0 ; + AdjacencyIterator *arg2 = 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:ChainSilhouetteIterator_traverse",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainSilhouetteIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainSilhouetteIterator_traverse" "', argument " "1"" of type '" "ChainSilhouetteIterator *""'"); + } + arg1 = reinterpret_cast< ChainSilhouetteIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_AdjacencyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ChainSilhouetteIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ChainSilhouetteIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + arg2 = reinterpret_cast< AdjacencyIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (ViewEdge *)(arg1)->ChainSilhouetteIterator::traverse((AdjacencyIterator const &)*arg2); + } else { + result = (ViewEdge *)(arg1)->traverse((AdjacencyIterator const &)*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (director) { + SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result))); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainSilhouetteIterator *arg1 = (ChainSilhouetteIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ChainSilhouetteIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainSilhouetteIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ChainSilhouetteIterator" "', argument " "1"" of type '" "ChainSilhouetteIterator *""'"); + } + arg1 = reinterpret_cast< ChainSilhouetteIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainSilhouetteIterator *arg1 = (ChainSilhouetteIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ChainSilhouetteIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainSilhouetteIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ChainSilhouetteIterator" "', argument " "1"" of type '" "ChainSilhouetteIterator *""'"); + } + arg1 = reinterpret_cast< ChainSilhouetteIterator * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ChainSilhouetteIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ChainSilhouetteIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ViewEdge *arg4 = (ViewEdge *) 0 ; + bool arg5 ; + ChainPredicateIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "ViewEdge *""'"); + } + arg4 = reinterpret_cast< ViewEdge * >(argp4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ChainPredicateIterator" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,arg2,arg3,arg4,arg5); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(arg2,arg3,arg4,arg5); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ViewEdge *arg4 = (ViewEdge *) 0 ; + ChainPredicateIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "ViewEdge *""'"); + } + arg4 = reinterpret_cast< ViewEdge * >(argp4); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,arg2,arg3,arg4); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(arg2,arg3,arg4); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + bool arg3 ; + ChainPredicateIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,arg2,arg3); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(arg2,arg3); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + bool arg2 ; + ChainPredicateIterator *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainPredicateIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,arg2); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainPredicateIterator *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ChainPredicateIterator",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *arg2 = 0 ; + BinaryPredicate1D *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + ViewEdge *arg6 = (ViewEdge *) 0 ; + bool arg7 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + bool val7 ; + int ecode7 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< BinaryPredicate1D * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ChainPredicateIterator" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ChainPredicateIterator" "', argument " "6"" of type '" "ViewEdge *""'"); + } + arg6 = reinterpret_cast< ViewEdge * >(argp6); + ecode7 = SWIG_AsVal_bool(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ChainPredicateIterator" "', argument " "7"" of type '" "bool""'"); + } + arg7 = static_cast< bool >(val7); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,*arg2,*arg3,arg4,arg5,arg6,arg7); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(*arg2,*arg3,arg4,arg5,arg6,arg7); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *arg2 = 0 ; + BinaryPredicate1D *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + ViewEdge *arg6 = (ViewEdge *) 0 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< BinaryPredicate1D * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ChainPredicateIterator" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ChainPredicateIterator" "', argument " "6"" of type '" "ViewEdge *""'"); + } + arg6 = reinterpret_cast< ViewEdge * >(argp6); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,*arg2,*arg3,arg4,arg5,arg6); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(*arg2,*arg3,arg4,arg5,arg6); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *arg2 = 0 ; + BinaryPredicate1D *arg3 = 0 ; + bool arg4 ; + bool arg5 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< BinaryPredicate1D * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ChainPredicateIterator" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,*arg2,*arg3,arg4,arg5); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(*arg2,*arg3,arg4,arg5); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *arg2 = 0 ; + BinaryPredicate1D *arg3 = 0 ; + bool arg4 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< BinaryPredicate1D * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ChainPredicateIterator" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,*arg2,*arg3,arg4); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(*arg2,*arg3,arg4); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *arg2 = 0 ; + BinaryPredicate1D *arg3 = 0 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ChainPredicateIterator",&obj0,&obj1,&obj2)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "3"" of type '" "BinaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< BinaryPredicate1D * >(argp3); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,*arg2,*arg3); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator(*arg2,*arg3); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + ChainPredicateIterator *arg2 = 0 ; + ChainPredicateIterator *result = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ChainPredicateIterator",&obj0,&obj1)) SWIG_fail; + arg1 = obj0; + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_ChainPredicateIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "ChainPredicateIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ChainPredicateIterator" "', argument " "2"" of type '" "ChainPredicateIterator const &""'"); + } + arg2 = reinterpret_cast< ChainPredicateIterator * >(argp2); + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (ChainPredicateIterator *)new SwigDirector_ChainPredicateIterator(arg1,(ChainPredicateIterator const &)*arg2); + } else { + result = (ChainPredicateIterator *)new ChainPredicateIterator((ChainPredicateIterator const &)*arg2); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[8]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 7); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + _v = (argv[0] != 0); + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_4(self, args); + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_ChainPredicateIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_10(self, args); + } + } + } + if (argc == 2) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_3(self, args); + } + } + } + if (argc == 3) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_BinaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_9(self, args); + } + } + } + } + if (argc == 3) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_2(self, args); + } + } + } + } + if (argc == 4) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_BinaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_8(self, args); + } + } + } + } + } + if (argc == 4) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_BinaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_7(self, args); + } + } + } + } + } + } + if (argc == 5) { + int _v; + _v = (argv[0] != 0); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_0(self, args); + } + } + } + } + } + } + if (argc == 6) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_BinaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_6(self, args); + } + } + } + } + } + } + } + if (argc == 7) { + int _v; + _v = (argv[0] != 0); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_BinaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[6], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ChainPredicateIterator__SWIG_5(self, args); + } + } + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n Possible C/C++ prototypes are:\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,bool,bool)\n ChainPredicateIterator(PyObject *,bool)\n ChainPredicateIterator(PyObject *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ChainPredicateIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainPredicateIterator *arg1 = (ChainPredicateIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ChainPredicateIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainPredicateIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ChainPredicateIterator" "', argument " "1"" of type '" "ChainPredicateIterator *""'"); + } + arg1 = reinterpret_cast< ChainPredicateIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainPredicateIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainPredicateIterator *arg1 = (ChainPredicateIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:ChainPredicateIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainPredicateIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainPredicateIterator_getExactTypeName" "', argument " "1"" of type '" "ChainPredicateIterator const *""'"); + } + arg1 = reinterpret_cast< ChainPredicateIterator * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((ChainPredicateIterator const *)arg1)->ChainPredicateIterator::getExactTypeName(); + } else { + result = ((ChainPredicateIterator const *)arg1)->getExactTypeName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ChainPredicateIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainPredicateIterator *arg1 = (ChainPredicateIterator *) 0 ; + AdjacencyIterator *arg2 = 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:ChainPredicateIterator_traverse",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainPredicateIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ChainPredicateIterator_traverse" "', argument " "1"" of type '" "ChainPredicateIterator *""'"); + } + arg1 = reinterpret_cast< ChainPredicateIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_AdjacencyIterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ChainPredicateIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ChainPredicateIterator_traverse" "', argument " "2"" of type '" "AdjacencyIterator const &""'"); + } + arg2 = reinterpret_cast< AdjacencyIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (ViewEdge *)(arg1)->ChainPredicateIterator::traverse((AdjacencyIterator const &)*arg2); + } else { + result = (ViewEdge *)(arg1)->traverse((AdjacencyIterator const &)*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (director) { + SWIG_AcquirePtr(resultobj, director->swig_release_ownership(SWIG_as_voidptr(result))); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_ChainPredicateIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainPredicateIterator *arg1 = (ChainPredicateIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_ChainPredicateIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ChainPredicateIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ChainPredicateIterator" "', argument " "1"" of type '" "ChainPredicateIterator *""'"); + } + arg1 = reinterpret_cast< ChainPredicateIterator * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ChainPredicateIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ChainPredicateIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate0D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryPredicate0D",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryPredicate0D *)new SwigDirector_UnaryPredicate0D(arg1); + } else { + result = (UnaryPredicate0D *)new UnaryPredicate0D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryPredicate0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = (UnaryPredicate0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryPredicate0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryPredicate0D" "', argument " "1"" of type '" "UnaryPredicate0D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = (UnaryPredicate0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryPredicate0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryPredicate0D_getName" "', argument " "1"" of type '" "UnaryPredicate0D const *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryPredicate0D const *)arg1)->UnaryPredicate0D::getName(); + } else { + result = ((UnaryPredicate0D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = (UnaryPredicate0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryPredicate0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryPredicate0D___call__" "', argument " "1"" of type '" "UnaryPredicate0D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryPredicate0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryPredicate0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)(arg1)->UnaryPredicate0D::operator ()(*arg2); + } else { + result = (bool)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = (UnaryPredicate0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryPredicate0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryPredicate0D" "', argument " "1"" of type '" "UnaryPredicate0D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_BinaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_BinaryPredicate0D")) SWIG_fail; + { + try { + result = (BinaryPredicate0D *)new BinaryPredicate0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinaryPredicate0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BinaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate0D *arg1 = (BinaryPredicate0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_BinaryPredicate0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinaryPredicate0D" "', argument " "1"" of type '" "BinaryPredicate0D *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate0D *arg1 = (BinaryPredicate0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:BinaryPredicate0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BinaryPredicate0D_getName" "', argument " "1"" of type '" "BinaryPredicate0D const *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate0D * >(argp1); + { + try { + result = ((BinaryPredicate0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate0D *arg1 = (BinaryPredicate0D *) 0 ; + Interface0D *arg2 = 0 ; + Interface0D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate0D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BinaryPredicate0D___call__" "', argument " "1"" of type '" "BinaryPredicate0D *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BinaryPredicate0D___call__" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BinaryPredicate0D___call__" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BinaryPredicate0D___call__" "', argument " "3"" of type '" "Interface0D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BinaryPredicate0D___call__" "', argument " "3"" of type '" "Interface0D &""'"); + } + arg3 = reinterpret_cast< Interface0D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BinaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_TrueUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::TrueUP0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_TrueUP0D")) SWIG_fail; + { + try { + result = (Predicates0D::TrueUP0D *)new Predicates0D::TrueUP0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TrueUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::TrueUP0D *arg1 = (Predicates0D::TrueUP0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TrueUP0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__TrueUP0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueUP0D_getName" "', argument " "1"" of type '" "Predicates0D::TrueUP0D const *""'"); + } + arg1 = reinterpret_cast< Predicates0D::TrueUP0D * >(argp1); + { + try { + result = ((Predicates0D::TrueUP0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TrueUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::TrueUP0D *arg1 = (Predicates0D::TrueUP0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TrueUP0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__TrueUP0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueUP0D___call__" "', argument " "1"" of type '" "Predicates0D::TrueUP0D *""'"); + } + arg1 = reinterpret_cast< Predicates0D::TrueUP0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TrueUP0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TrueUP0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TrueUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::TrueUP0D *arg1 = (Predicates0D::TrueUP0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TrueUP0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrueUP0D" "', argument " "1"" of type '" "Predicates0D::TrueUP0D *""'"); + } + arg1 = reinterpret_cast< Predicates0D::TrueUP0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TrueUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_FalseUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::FalseUP0D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FalseUP0D")) SWIG_fail; + { + try { + result = (Predicates0D::FalseUP0D *)new Predicates0D::FalseUP0D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FalseUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::FalseUP0D *arg1 = (Predicates0D::FalseUP0D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FalseUP0D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__FalseUP0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseUP0D_getName" "', argument " "1"" of type '" "Predicates0D::FalseUP0D const *""'"); + } + arg1 = reinterpret_cast< Predicates0D::FalseUP0D * >(argp1); + { + try { + result = ((Predicates0D::FalseUP0D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FalseUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::FalseUP0D *arg1 = (Predicates0D::FalseUP0D *) 0 ; + Interface0DIterator *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FalseUP0D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__FalseUP0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseUP0D___call__" "', argument " "1"" of type '" "Predicates0D::FalseUP0D *""'"); + } + arg1 = reinterpret_cast< Predicates0D::FalseUP0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FalseUP0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FalseUP0D___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); + } + arg2 = reinterpret_cast< Interface0DIterator * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FalseUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates0D::FalseUP0D *arg1 = (Predicates0D::FalseUP0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FalseUP0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FalseUP0D" "', argument " "1"" of type '" "Predicates0D::FalseUP0D *""'"); + } + arg1 = reinterpret_cast< Predicates0D::FalseUP0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FalseUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_UnaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + UnaryPredicate1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryPredicate1D",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (UnaryPredicate1D *)new SwigDirector_UnaryPredicate1D(arg1); + } else { + result = (UnaryPredicate1D *)new UnaryPredicate1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryPredicate1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_UnaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = (UnaryPredicate1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryPredicate1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryPredicate1D" "', argument " "1"" of type '" "UnaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = (UnaryPredicate1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:UnaryPredicate1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryPredicate1D_getName" "', argument " "1"" of type '" "UnaryPredicate1D const *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((UnaryPredicate1D const *)arg1)->UnaryPredicate1D::getName(); + } else { + result = ((UnaryPredicate1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = (UnaryPredicate1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:UnaryPredicate1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryPredicate1D___call__" "', argument " "1"" of type '" "UnaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryPredicate1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "UnaryPredicate1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)(arg1)->UnaryPredicate1D::operator ()(*arg2); + } else { + result = (bool)(arg1)->operator ()(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = (UnaryPredicate1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryPredicate1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryPredicate1D" "', argument " "1"" of type '" "UnaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *UnaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + BinaryPredicate1D *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_BinaryPredicate1D",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (BinaryPredicate1D *)new SwigDirector_BinaryPredicate1D(arg1); + } else { + result = (BinaryPredicate1D *)new BinaryPredicate1D(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinaryPredicate1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate1D *arg1 = (BinaryPredicate1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_BinaryPredicate1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinaryPredicate1D" "', argument " "1"" of type '" "BinaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate1D *arg1 = (BinaryPredicate1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:BinaryPredicate1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BinaryPredicate1D_getName" "', argument " "1"" of type '" "BinaryPredicate1D const *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate1D * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((BinaryPredicate1D const *)arg1)->BinaryPredicate1D::getName(); + } else { + result = ((BinaryPredicate1D const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate1D *arg1 = (BinaryPredicate1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BinaryPredicate1D___call__" "', argument " "1"" of type '" "BinaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BinaryPredicate1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BinaryPredicate1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BinaryPredicate1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BinaryPredicate1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = (bool)(arg1)->BinaryPredicate1D::operator ()(*arg2,*arg3); + } else { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate1D *arg1 = (BinaryPredicate1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_BinaryPredicate1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_BinaryPredicate1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_BinaryPredicate1D" "', argument " "1"" of type '" "BinaryPredicate1D *""'"); + } + arg1 = reinterpret_cast< BinaryPredicate1D * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BinaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_TrueUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueUP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_TrueUP1D")) SWIG_fail; + { + try { + result = (Predicates1D::TrueUP1D *)new Predicates1D::TrueUP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TrueUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueUP1D *arg1 = (Predicates1D::TrueUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TrueUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueUP1D_getName" "', argument " "1"" of type '" "Predicates1D::TrueUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueUP1D * >(argp1); + { + try { + result = ((Predicates1D::TrueUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TrueUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueUP1D *arg1 = (Predicates1D::TrueUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TrueUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueUP1D___call__" "', argument " "1"" of type '" "Predicates1D::TrueUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TrueUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TrueUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TrueUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueUP1D *arg1 = (Predicates1D::TrueUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TrueUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrueUP1D" "', argument " "1"" of type '" "Predicates1D::TrueUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TrueUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_FalseUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseUP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FalseUP1D")) SWIG_fail; + { + try { + result = (Predicates1D::FalseUP1D *)new Predicates1D::FalseUP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FalseUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseUP1D *arg1 = (Predicates1D::FalseUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FalseUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseUP1D_getName" "', argument " "1"" of type '" "Predicates1D::FalseUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseUP1D * >(argp1); + { + try { + result = ((Predicates1D::FalseUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FalseUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseUP1D *arg1 = (Predicates1D::FalseUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:FalseUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseUP1D___call__" "', argument " "1"" of type '" "Predicates1D::FalseUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FalseUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FalseUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FalseUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseUP1D *arg1 = (Predicates1D::FalseUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FalseUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FalseUP1D" "', argument " "1"" of type '" "Predicates1D::FalseUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FalseUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Predicates1D::QuantitativeInvisibilityUP1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_QuantitativeInvisibilityUP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuantitativeInvisibilityUP1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Predicates1D::QuantitativeInvisibilityUP1D *)new Predicates1D::QuantitativeInvisibilityUP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::QuantitativeInvisibilityUP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_QuantitativeInvisibilityUP1D")) SWIG_fail; + { + try { + result = (Predicates1D::QuantitativeInvisibilityUP1D *)new Predicates1D::QuantitativeInvisibilityUP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_QuantitativeInvisibilityUP1D__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_QuantitativeInvisibilityUP1D__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n Predicates1D::QuantitativeInvisibilityUP1D()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::QuantitativeInvisibilityUP1D *arg1 = (Predicates1D::QuantitativeInvisibilityUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:QuantitativeInvisibilityUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityUP1D_getName" "', argument " "1"" of type '" "Predicates1D::QuantitativeInvisibilityUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::QuantitativeInvisibilityUP1D * >(argp1); + { + try { + result = ((Predicates1D::QuantitativeInvisibilityUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::QuantitativeInvisibilityUP1D *arg1 = (Predicates1D::QuantitativeInvisibilityUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:QuantitativeInvisibilityUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantitativeInvisibilityUP1D___call__" "', argument " "1"" of type '" "Predicates1D::QuantitativeInvisibilityUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::QuantitativeInvisibilityUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QuantitativeInvisibilityUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuantitativeInvisibilityUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::QuantitativeInvisibilityUP1D *arg1 = (Predicates1D::QuantitativeInvisibilityUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_QuantitativeInvisibilityUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantitativeInvisibilityUP1D" "', argument " "1"" of type '" "Predicates1D::QuantitativeInvisibilityUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::QuantitativeInvisibilityUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *QuantitativeInvisibilityUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ContourUP1D *arg1 = (Predicates1D::ContourUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ContourUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ContourUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourUP1D_getName" "', argument " "1"" of type '" "Predicates1D::ContourUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ContourUP1D * >(argp1); + { + try { + result = ((Predicates1D::ContourUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ContourUP1D *arg1 = (Predicates1D::ContourUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ContourUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ContourUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContourUP1D___call__" "', argument " "1"" of type '" "Predicates1D::ContourUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ContourUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ContourUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ContourUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ContourUP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ContourUP1D")) SWIG_fail; + { + try { + result = (Predicates1D::ContourUP1D *)new Predicates1D::ContourUP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ContourUP1D *arg1 = (Predicates1D::ContourUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ContourUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContourUP1D" "', argument " "1"" of type '" "Predicates1D::ContourUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ContourUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ExternalContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ExternalContourUP1D *arg1 = (Predicates1D::ExternalContourUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ExternalContourUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ExternalContourUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExternalContourUP1D_getName" "', argument " "1"" of type '" "Predicates1D::ExternalContourUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ExternalContourUP1D * >(argp1); + { + try { + result = ((Predicates1D::ExternalContourUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExternalContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ExternalContourUP1D *arg1 = (Predicates1D::ExternalContourUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ExternalContourUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ExternalContourUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExternalContourUP1D___call__" "', argument " "1"" of type '" "Predicates1D::ExternalContourUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ExternalContourUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExternalContourUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExternalContourUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ExternalContourUP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ExternalContourUP1D")) SWIG_fail; + { + try { + result = (Predicates1D::ExternalContourUP1D *)new Predicates1D::ExternalContourUP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ExternalContourUP1D *arg1 = (Predicates1D::ExternalContourUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ExternalContourUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExternalContourUP1D" "', argument " "1"" of type '" "Predicates1D::ExternalContourUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ExternalContourUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ExternalContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_EqualToTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Predicates1D::EqualToTimeStampUP1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_EqualToTimeStampUP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EqualToTimeStampUP1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Predicates1D::EqualToTimeStampUP1D *)new Predicates1D::EqualToTimeStampUP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToTimeStampUP1D *arg1 = (Predicates1D::EqualToTimeStampUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:EqualToTimeStampUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EqualToTimeStampUP1D_getName" "', argument " "1"" of type '" "Predicates1D::EqualToTimeStampUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToTimeStampUP1D * >(argp1); + { + try { + result = ((Predicates1D::EqualToTimeStampUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToTimeStampUP1D *arg1 = (Predicates1D::EqualToTimeStampUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:EqualToTimeStampUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EqualToTimeStampUP1D___call__" "', argument " "1"" of type '" "Predicates1D::EqualToTimeStampUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToTimeStampUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EqualToTimeStampUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EqualToTimeStampUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToTimeStampUP1D *arg1 = (Predicates1D::EqualToTimeStampUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_EqualToTimeStampUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EqualToTimeStampUP1D" "', argument " "1"" of type '" "Predicates1D::EqualToTimeStampUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToTimeStampUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *EqualToTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_EqualToChainingTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Predicates1D::EqualToChainingTimeStampUP1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_EqualToChainingTimeStampUP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EqualToChainingTimeStampUP1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Predicates1D::EqualToChainingTimeStampUP1D *)new Predicates1D::EqualToChainingTimeStampUP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToChainingTimeStampUP1D *arg1 = (Predicates1D::EqualToChainingTimeStampUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:EqualToChainingTimeStampUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EqualToChainingTimeStampUP1D_getName" "', argument " "1"" of type '" "Predicates1D::EqualToChainingTimeStampUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToChainingTimeStampUP1D * >(argp1); + { + try { + result = ((Predicates1D::EqualToChainingTimeStampUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToChainingTimeStampUP1D *arg1 = (Predicates1D::EqualToChainingTimeStampUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:EqualToChainingTimeStampUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EqualToChainingTimeStampUP1D___call__" "', argument " "1"" of type '" "Predicates1D::EqualToChainingTimeStampUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToChainingTimeStampUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "EqualToChainingTimeStampUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EqualToChainingTimeStampUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::EqualToChainingTimeStampUP1D *arg1 = (Predicates1D::EqualToChainingTimeStampUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_EqualToChainingTimeStampUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EqualToChainingTimeStampUP1D" "', argument " "1"" of type '" "Predicates1D::EqualToChainingTimeStampUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::EqualToChainingTimeStampUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *EqualToChainingTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ShapeUP1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + unsigned int arg2 ; + Predicates1D::ShapeUP1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ShapeUP1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShapeUP1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ShapeUP1D" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + result = (Predicates1D::ShapeUP1D *)new Predicates1D::ShapeUP1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShapeUP1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Predicates1D::ShapeUP1D *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ShapeUP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShapeUP1D" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Predicates1D::ShapeUP1D *)new Predicates1D::ShapeUP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ShapeUP1D__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_unsigned_SS_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ShapeUP1D__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n Predicates1D::ShapeUP1D(unsigned int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShapeUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ShapeUP1D *arg1 = (Predicates1D::ShapeUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShapeUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ShapeUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShapeUP1D_getName" "', argument " "1"" of type '" "Predicates1D::ShapeUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ShapeUP1D * >(argp1); + { + try { + result = ((Predicates1D::ShapeUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShapeUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ShapeUP1D *arg1 = (Predicates1D::ShapeUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShapeUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ShapeUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShapeUP1D___call__" "', argument " "1"" of type '" "Predicates1D::ShapeUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ShapeUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShapeUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShapeUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ShapeUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ShapeUP1D *arg1 = (Predicates1D::ShapeUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ShapeUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShapeUP1D" "', argument " "1"" of type '" "Predicates1D::ShapeUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ShapeUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ShapeUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_TrueBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueBP1D *arg1 = (Predicates1D::TrueBP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:TrueBP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueBP1D_getName" "', argument " "1"" of type '" "Predicates1D::TrueBP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueBP1D * >(argp1); + { + try { + result = ((Predicates1D::TrueBP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TrueBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueBP1D *arg1 = (Predicates1D::TrueBP1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:TrueBP1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TrueBP1D___call__" "', argument " "1"" of type '" "Predicates1D::TrueBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueBP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TrueBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TrueBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TrueBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TrueBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueBP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_TrueBP1D")) SWIG_fail; + { + try { + result = (Predicates1D::TrueBP1D *)new Predicates1D::TrueBP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::TrueBP1D *arg1 = (Predicates1D::TrueBP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TrueBP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrueBP1D" "', argument " "1"" of type '" "Predicates1D::TrueBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::TrueBP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TrueBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_FalseBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseBP1D *arg1 = (Predicates1D::FalseBP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FalseBP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseBP1D_getName" "', argument " "1"" of type '" "Predicates1D::FalseBP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseBP1D * >(argp1); + { + try { + result = ((Predicates1D::FalseBP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FalseBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseBP1D *arg1 = (Predicates1D::FalseBP1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:FalseBP1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalseBP1D___call__" "', argument " "1"" of type '" "Predicates1D::FalseBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseBP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FalseBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FalseBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FalseBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FalseBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseBP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_FalseBP1D")) SWIG_fail; + { + try { + result = (Predicates1D::FalseBP1D *)new Predicates1D::FalseBP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::FalseBP1D *arg1 = (Predicates1D::FalseBP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_FalseBP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FalseBP1D" "', argument " "1"" of type '" "Predicates1D::FalseBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::FalseBP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *FalseBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Length2DBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::Length2DBP1D *arg1 = (Predicates1D::Length2DBP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Length2DBP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__Length2DBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Length2DBP1D_getName" "', argument " "1"" of type '" "Predicates1D::Length2DBP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::Length2DBP1D * >(argp1); + { + try { + result = ((Predicates1D::Length2DBP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Length2DBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::Length2DBP1D *arg1 = (Predicates1D::Length2DBP1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Length2DBP1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__Length2DBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Length2DBP1D___call__" "', argument " "1"" of type '" "Predicates1D::Length2DBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::Length2DBP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Length2DBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Length2DBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Length2DBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Length2DBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::Length2DBP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Length2DBP1D")) SWIG_fail; + { + try { + result = (Predicates1D::Length2DBP1D *)new Predicates1D::Length2DBP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::Length2DBP1D *arg1 = (Predicates1D::Length2DBP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Length2DBP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Length2DBP1D" "', argument " "1"" of type '" "Predicates1D::Length2DBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::Length2DBP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Length2DBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::SameShapeIdBP1D *arg1 = (Predicates1D::SameShapeIdBP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SameShapeIdBP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SameShapeIdBP1D_getName" "', argument " "1"" of type '" "Predicates1D::SameShapeIdBP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::SameShapeIdBP1D * >(argp1); + { + try { + result = ((Predicates1D::SameShapeIdBP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::SameShapeIdBP1D *arg1 = (Predicates1D::SameShapeIdBP1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:SameShapeIdBP1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SameShapeIdBP1D___call__" "', argument " "1"" of type '" "Predicates1D::SameShapeIdBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::SameShapeIdBP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SameShapeIdBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SameShapeIdBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SameShapeIdBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SameShapeIdBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::SameShapeIdBP1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_SameShapeIdBP1D")) SWIG_fail; + { + try { + result = (Predicates1D::SameShapeIdBP1D *)new Predicates1D::SameShapeIdBP1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::SameShapeIdBP1D *arg1 = (Predicates1D::SameShapeIdBP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SameShapeIdBP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SameShapeIdBP1D" "', argument " "1"" of type '" "Predicates1D::SameShapeIdBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::SameShapeIdBP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SameShapeIdBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + float arg3 ; + Predicates1D::ViewMapGradientNormBP1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ViewMapGradientNormBP1D",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (Predicates1D::ViewMapGradientNormBP1D *)new Predicates1D::ViewMapGradientNormBP1D(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + IntegrationType arg2 ; + Predicates1D::ViewMapGradientNormBP1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewMapGradientNormBP1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "2"" of type '" "IntegrationType""'"); + } + arg2 = static_cast< IntegrationType >(val2); + { + try { + result = (Predicates1D::ViewMapGradientNormBP1D *)new Predicates1D::ViewMapGradientNormBP1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + Predicates1D::ViewMapGradientNormBP1D *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewMapGradientNormBP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewMapGradientNormBP1D" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (Predicates1D::ViewMapGradientNormBP1D *)new Predicates1D::ViewMapGradientNormBP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewMapGradientNormBP1D__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewMapGradientNormBP1D__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_int(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ViewMapGradientNormBP1D__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n Predicates1D::ViewMapGradientNormBP1D(int)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ViewMapGradientNormBP1D *arg1 = (Predicates1D::ViewMapGradientNormBP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMapGradientNormBP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMapGradientNormBP1D_getName" "', argument " "1"" of type '" "Predicates1D::ViewMapGradientNormBP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ViewMapGradientNormBP1D * >(argp1); + { + try { + result = ((Predicates1D::ViewMapGradientNormBP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ViewMapGradientNormBP1D *arg1 = (Predicates1D::ViewMapGradientNormBP1D *) 0 ; + Interface1D *arg2 = 0 ; + Interface1D *arg3 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMapGradientNormBP1D___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMapGradientNormBP1D___call__" "', argument " "1"" of type '" "Predicates1D::ViewMapGradientNormBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ViewMapGradientNormBP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMapGradientNormBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMapGradientNormBP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMapGradientNormBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMapGradientNormBP1D___call__" "', argument " "3"" of type '" "Interface1D &""'"); + } + arg3 = reinterpret_cast< Interface1D * >(argp3); + { + try { + result = (bool)(arg1)->operator ()(*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::ViewMapGradientNormBP1D *arg1 = (Predicates1D::ViewMapGradientNormBP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewMapGradientNormBP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewMapGradientNormBP1D" "', argument " "1"" of type '" "Predicates1D::ViewMapGradientNormBP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::ViewMapGradientNormBP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ViewMapGradientNormBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + Predicates1D::DensityLowerThanUP1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_DensityLowerThanUP1D",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityLowerThanUP1D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DensityLowerThanUP1D" "', argument " "2"" of type '" "double""'"); + } + arg2 = static_cast< double >(val2); + { + try { + result = (Predicates1D::DensityLowerThanUP1D *)new Predicates1D::DensityLowerThanUP1D(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + Predicates1D::DensityLowerThanUP1D *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_DensityLowerThanUP1D",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DensityLowerThanUP1D" "', argument " "1"" of type '" "double""'"); + } + arg1 = static_cast< double >(val1); + { + try { + result = (Predicates1D::DensityLowerThanUP1D *)new Predicates1D::DensityLowerThanUP1D(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityLowerThanUP1D__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_double(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_DensityLowerThanUP1D__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::DensityLowerThanUP1D(double,double)\n Predicates1D::DensityLowerThanUP1D(double)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::DensityLowerThanUP1D *arg1 = (Predicates1D::DensityLowerThanUP1D *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:DensityLowerThanUP1D_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityLowerThanUP1D_getName" "', argument " "1"" of type '" "Predicates1D::DensityLowerThanUP1D const *""'"); + } + arg1 = reinterpret_cast< Predicates1D::DensityLowerThanUP1D * >(argp1); + { + try { + result = ((Predicates1D::DensityLowerThanUP1D const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::DensityLowerThanUP1D *arg1 = (Predicates1D::DensityLowerThanUP1D *) 0 ; + Interface1D *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:DensityLowerThanUP1D___call__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DensityLowerThanUP1D___call__" "', argument " "1"" of type '" "Predicates1D::DensityLowerThanUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::DensityLowerThanUP1D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DensityLowerThanUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DensityLowerThanUP1D___call__" "', argument " "2"" of type '" "Interface1D &""'"); + } + arg2 = reinterpret_cast< Interface1D * >(argp2); + { + try { + result = (bool)(arg1)->operator ()(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Predicates1D::DensityLowerThanUP1D *arg1 = (Predicates1D::DensityLowerThanUP1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_DensityLowerThanUP1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DensityLowerThanUP1D" "', argument " "1"" of type '" "Predicates1D::DensityLowerThanUP1D *""'"); + } + arg1 = reinterpret_cast< Predicates1D::DensityLowerThanUP1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *DensityLowerThanUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__CurvilinearLength_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__CurvilinearLength_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__CurvilinearLength_set" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + if (arg1) (arg1)->_CurvilinearLength = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__CurvilinearLength_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__CurvilinearLength_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (float) ((arg1)->_CurvilinearLength); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__step_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__step_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__step_set" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + if (arg1) (arg1)->_step = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__step_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__step_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (float) ((arg1)->_step); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator___A_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___A_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } else { + Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + if (arg1) (arg1)->__A = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator___A_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___A_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = ((arg1)->__A); + resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator___B_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___B_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } else { + Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + if (arg1) (arg1)->__B = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator___B_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___B_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = ((arg1)->__B); + resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__begin_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__begin_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } else { + Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + if (arg1) (arg1)->_begin = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__begin_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__begin_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = ((arg1)->_begin); + resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__end_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__end_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + } else { + Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + if (arg1) (arg1)->_end = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Curve::vertex_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__end_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__end_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = ((arg1)->_end); + resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__n_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__n_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__n_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->_n = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__n_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__n_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (int) ((arg1)->_n); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__currentn_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__currentn_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__currentn_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->_currentn = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__currentn_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__currentn_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (int) ((arg1)->_currentn); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__t_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__t_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__t_set" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + if (arg1) (arg1)->_t = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__t_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__t_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (float) ((arg1)->_t); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + CurvePoint *arg2 = (CurvePoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__Point_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__Point_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__Point_set" "', argument " "2"" of type '" "CurvePoint *""'"); + } + arg2 = reinterpret_cast< CurvePoint * >(argp2); + if (arg1) (arg1)->_Point = *arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__Point_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__Point_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (CurvePoint *)& ((arg1)->_Point); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator__CurveLength_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__CurveLength_set" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator__CurveLength_set" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + if (arg1) (arg1)->_CurveLength = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator__CurveLength_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator__CurveLength_get" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + result = (float) ((arg1)->_CurveLength); + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + CurveInternal::CurvePointIterator *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CurvePointIterator",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CurvePointIterator" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (CurveInternal::CurvePointIterator *)new CurveInternal::CurvePointIterator(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_CurvePointIterator")) SWIG_fail; + { + try { + result = (CurveInternal::CurvePointIterator *)new CurveInternal::CurvePointIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = 0 ; + CurveInternal::CurvePointIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CurvePointIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurvePointIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurvePointIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const &""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (CurveInternal::CurvePointIterator *)new CurveInternal::CurvePointIterator((CurveInternal::CurvePointIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_CurvePointIterator__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_CurveInternal__CurvePointIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_CurvePointIterator__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CurvePointIterator__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n Possible C/C++ prototypes are:\n CurveInternal::CurvePointIterator(float)\n CurveInternal::CurvePointIterator()\n CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CurvePointIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CurvePointIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurvePointIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + CurveInternal::CurvePointIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_copy" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (CurveInternal::CurvePointIterator *)((CurveInternal::CurvePointIterator const *)arg1)->copy(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_CastToInterface0DIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_CastToInterface0DIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = ((CurveInternal::CurvePointIterator const *)arg1)->CastToInterface0DIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getExactTypeName" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = ((CurveInternal::CurvePointIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___eq__" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((CurveInternal::CurvePointIterator const *)arg1)->operator ==((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getObject" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + { + CurvePoint &_result_ref = (arg1)->operator *(); + result = (CurvePoint *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator___deref__" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (CurvePoint *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_isBegin" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (bool)((CurveInternal::CurvePointIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_isEnd" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (bool)((CurveInternal::CurvePointIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getX" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getY" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getZ" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getPoint3D" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getProjectedX" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getProjectedY" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getProjectedZ" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getPoint2D" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getFEdge" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getId" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_getNature" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToSVertex" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToViewVertex" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToNonTVertex" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToTVertex" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_A" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_B" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_t2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_t2d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (float)(*arg1)->t2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetA" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_SetA" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (*arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetB" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_SetB" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (*arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetT2d",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetT2d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator_SetT2d" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (*arg1)->SetT2d(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_fedge" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_point2d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_point3d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_normal" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_shape" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occluders_begin" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occluders_end" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occluders_empty" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occluders_size" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occludee" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occluded_shape" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_occludee_empty" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_z_discontinuity" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_curvatureFredo" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (real)(*arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + Geometry::Vec2d result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_directionFredo" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (*arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CurvePointIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_CurvePoint_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getExactTypeName" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getX" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getY" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getZ" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getPoint3D" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getProjectedX" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getProjectedY" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getProjectedZ" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getPoint2D" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getFEdge" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePoint_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getId" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_getNature" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (Nature::VertexNature)((CurvePoint const *)arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_castToSVertex" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (SVertex *)(arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_castToViewVertex" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (ViewVertex *)(arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_castToNonTVertex" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (NonTVertex *)(arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_castToTVertex" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (TVertex *)(arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_CurvePoint")) SWIG_fail; + { + try { + result = (CurvePoint *)new CurvePoint(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + float arg3 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_CurvePoint",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurvePoint" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurvePoint" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CurvePoint" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (CurvePoint *)new CurvePoint(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + CurvePoint *arg2 = (CurvePoint *) 0 ; + float arg3 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_CurvePoint",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurvePoint" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CurvePoint" "', argument " "2"" of type '" "CurvePoint *""'"); + } + arg2 = reinterpret_cast< CurvePoint * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CurvePoint" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (CurvePoint *)new CurvePoint(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = 0 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CurvePoint",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CurvePoint, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CurvePoint" "', argument " "1"" of type '" "CurvePoint const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CurvePoint" "', argument " "1"" of type '" "CurvePoint const &""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (CurvePoint *)new CurvePoint((CurvePoint const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_CurvePoint__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_CurvePoint__SWIG_3(self, args); + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CurvePoint__SWIG_2(self, args); + } + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_CurvePoint__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n Possible C/C++ prototypes are:\n CurvePoint()\n CurvePoint(SVertex *,SVertex *,float)\n CurvePoint(CurvePoint *,CurvePoint *,float)\n CurvePoint(CurvePoint const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CurvePoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CurvePoint",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CurvePoint" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + CurvePoint *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint___eq__" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CurvePoint, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint___eq__" "', argument " "2"" of type '" "CurvePoint const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePoint___eq__" "', argument " "2"" of type '" "CurvePoint const &""'"); + } + arg2 = reinterpret_cast< CurvePoint * >(argp2); + { + try { + result = (bool)(arg1)->operator ==((CurvePoint const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_A" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (SVertex *)(arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_B" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (SVertex *)(arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_t2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_t2d" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (float)((CurvePoint const *)arg1)->t2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetA" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_SetA" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetB" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_SetB" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetT2d",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetT2d" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePoint_SetT2d" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetT2d(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_fedge" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (FEdge *)(arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_point2d" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((CurvePoint const *)arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_point3d" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = ((CurvePoint const *)arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_normal" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_shape" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (SShape *)((CurvePoint const *)arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occluders_begin" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occluders_end" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occluders_empty" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (bool)((CurvePoint const *)arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occluders_size" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (int)((CurvePoint const *)arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occludee" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + { + Polygon3r const &_result_ref = ((CurvePoint const *)arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occluded_shape" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (SShape *)((CurvePoint const *)arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_occludee_empty" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (bool)((CurvePoint const *)arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_z_discontinuity" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_curvatureFredo" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (real)((CurvePoint const *)arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + Geometry::Vec2d result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePoint_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_directionFredo" "', argument " "1"" of type '" "CurvePoint const *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = ((CurvePoint const *)arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CurvePoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CurvePoint, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Curve__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Curve")) SWIG_fail; + { + try { + result = (Curve *)new Curve(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Curve, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curve__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Id *arg1 = 0 ; + Curve *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Curve",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Curve" "', argument " "1"" of type '" "Id const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Curve" "', argument " "1"" of type '" "Id const &""'"); + } + arg1 = reinterpret_cast< Id * >(argp1); + { + try { + result = (Curve *)new Curve((Id const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Curve, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curve__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = 0 ; + Curve *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Curve",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Curve, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Curve" "', argument " "1"" of type '" "Curve const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Curve" "', argument " "1"" of type '" "Curve const &""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (Curve *)new Curve((Curve const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Curve, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Curve__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Id, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Curve__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Curve__SWIG_2(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n Possible C/C++ prototypes are:\n Curve()\n Curve(Id const &)\n Curve(Curve const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Curve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Curve",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Curve" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_computeCurvatureAndOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_computeCurvatureAndOrientation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_computeCurvatureAndOrientation" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + (arg1)->computeCurvatureAndOrientation(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Curve::Vertex *arg2 = (Curve::Vertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_push_vertex_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_push_vertex_back" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curve_push_vertex_back" "', argument " "2"" of type '" "Curve::Vertex *""'"); + } + arg2 = reinterpret_cast< Curve::Vertex * >(argp2); + { + try { + (arg1)->push_vertex_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_push_vertex_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_push_vertex_back" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curve_push_vertex_back" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->push_vertex_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_push_vertex_back__SWIG_0(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_push_vertex_back__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n Possible C/C++ prototypes are:\n push_vertex_back(Curve::Vertex *)\n push_vertex_back(SVertex *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Curve::Vertex *arg2 = (Curve::Vertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_push_vertex_front",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_push_vertex_front" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curve_push_vertex_front" "', argument " "2"" of type '" "Curve::Vertex *""'"); + } + arg2 = reinterpret_cast< Curve::Vertex * >(argp2); + { + try { + (arg1)->push_vertex_front(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_push_vertex_front",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_push_vertex_front" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curve_push_vertex_front" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (arg1)->push_vertex_front(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_push_vertex_front__SWIG_0(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_push_vertex_front__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n Possible C/C++ prototypes are:\n push_vertex_front(Curve::Vertex *)\n push_vertex_front(SVertex *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_empty" "', argument " "1"" of type '" "Curve const *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (bool)((Curve const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_getLength2D" "', argument " "1"" of type '" "Curve const *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (real)((Curve const *)arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_getId" "', argument " "1"" of type '" "Curve const *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = ((Curve const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_nSegments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_nSegments",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_nSegments" "', argument " "1"" of type '" "Curve const *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (unsigned int)((Curve const *)arg1)->nSegments(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_setId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_setId" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Curve_setId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Curve_setId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->setId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + float arg2 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_curvePointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curvePointsBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Curve_curvePointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->curvePointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_curvePointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curvePointsBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->curvePointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_curvePointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Curve_curvePointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n Possible C/C++ prototypes are:\n curvePointsBegin(float)\n curvePointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + float arg2 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_curvePointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curvePointsEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Curve_curvePointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->curvePointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_curvePointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curvePointsEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->curvePointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_curvePointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Curve_curvePointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n Possible C/C++ prototypes are:\n curvePointsEnd(float)\n curvePointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curveVerticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_curveVerticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curveVerticesBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->curveVerticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_curveVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + CurveInternal::CurvePointIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_curveVerticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_curveVerticesEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->curveVerticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new CurveInternal::CurvePointIterator(static_cast< const CurveInternal::CurvePointIterator& >(result))), SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_verticesBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_verticesEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_pointsBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Curve_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_pointsBegin" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Curve_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Curve_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_pointsEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Curve_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Curve *arg1 = (Curve *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Curve_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Curve, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Curve_pointsEnd" "', argument " "1"" of type '" "Curve *""'"); + } + arg1 = reinterpret_cast< Curve * >(argp1); + { + try { + result = (arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Curve_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Curve, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Curve_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *Curve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Curve, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_StrokeVertexIterator")) SWIG_fail; + { + try { + result = (StrokeInternal::StrokeVertexIterator *)new StrokeInternal::StrokeVertexIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = 0 ; + StrokeInternal::StrokeVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertexIterator" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertexIterator" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const &""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (StrokeInternal::StrokeVertexIterator *)new StrokeInternal::StrokeVertexIterator((StrokeInternal::StrokeVertexIterator const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke::vertex_container::iterator *arg1 = 0 ; + Stroke::vertex_container::iterator *arg2 = 0 ; + Stroke::vertex_container::iterator *arg3 = 0 ; + StrokeInternal::StrokeVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_StrokeVertexIterator",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stroke__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertexIterator" "', argument " "1"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertexIterator" "', argument " "1"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + arg1 = reinterpret_cast< Stroke::vertex_container::iterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StrokeVertexIterator" "', argument " "2"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertexIterator" "', argument " "2"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + arg2 = reinterpret_cast< Stroke::vertex_container::iterator * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_Stroke__vertex_container__iterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_StrokeVertexIterator" "', argument " "3"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertexIterator" "', argument " "3"" of type '" "Stroke::vertex_container::iterator const &""'"); + } + arg3 = reinterpret_cast< Stroke::vertex_container::iterator * >(argp3); + { + try { + result = (StrokeInternal::StrokeVertexIterator *)new StrokeInternal::StrokeVertexIterator((Stroke::vertex_container::iterator const &)*arg1,(Stroke::vertex_container::iterator const &)*arg2,(Stroke::vertex_container::iterator const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_StrokeVertexIterator__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertexIterator__SWIG_1(self, args); + } + } + if (argc == 3) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Stroke__vertex_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Stroke__vertex_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Stroke__vertex_container__iterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertexIterator__SWIG_2(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n Possible C/C++ prototypes are:\n StrokeInternal::StrokeVertexIterator()\n StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeVertexIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StrokeVertexIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrokeVertexIterator" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_castToInterface0DIterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_castToInterface0DIterator" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = ((StrokeInternal::StrokeVertexIterator const *)arg1)->castToInterface0DIterator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getExactTypeName" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = ((StrokeInternal::StrokeVertexIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getObject",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getObject" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + StrokeVertex &_result_ref = (arg1)->operator *(); + result = (StrokeVertex *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator___deref__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator___deref__" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (StrokeVertex *)(arg1)->operator ->(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_increment" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_decrement" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_isBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_isBegin" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (bool)((StrokeInternal::StrokeVertexIterator const *)arg1)->isBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_isEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_isEnd" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (bool)((StrokeInternal::StrokeVertexIterator const *)arg1)->isEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Interface0DIteratorNested *arg2 = 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator___eq__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator___eq__" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIteratorNested, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator___eq__" "', argument " "2"" of type '" "Interface0DIteratorNested const &""'"); + } + arg2 = reinterpret_cast< Interface0DIteratorNested * >(argp2); + { + try { + result = (bool)((StrokeInternal::StrokeVertexIterator const *)arg1)->operator ==((Interface0DIteratorNested const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_t" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (float)((StrokeInternal::StrokeVertexIterator const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_u" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (float)((StrokeInternal::StrokeVertexIterator const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeInternal::StrokeVertexIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_copy",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_copy" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (StrokeInternal::StrokeVertexIterator *)((StrokeInternal::StrokeVertexIterator const *)arg1)->copy(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getIt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Stroke::vertex_container::iterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getIt",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getIt" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + Stroke::vertex_container::iterator const &_result_ref = (arg1)->getIt(); + result = (Stroke::vertex_container::iterator *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stroke__vertex_container__iterator, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_x" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_y" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getPoint",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_attribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_attribute" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + StrokeAttribute const &_result_ref = (*arg1)->attribute(); + result = (StrokeAttribute *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_attribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_attribute" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + StrokeAttribute &_result_ref = (*arg1)->attribute(); + result = (StrokeAttribute *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertexIterator_attribute__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertexIterator_attribute__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_curvilinearAbscissa",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_curvilinearAbscissa" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (float)(*arg1)->curvilinearAbscissa(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_strokeLength",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_strokeLength" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (float)(*arg1)->strokeLength(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetX" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetX" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (*arg1)->SetX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetY" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetY" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (*arg1)->SetY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertexIterator_SetPoint",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (*arg1)->SetPoint(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetPoint",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + { + try { + (*arg1)->SetPoint((Geometry::Vec2f const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertexIterator_SetPoint__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StrokeVertexIterator_SetPoint__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_SetPoint'.\n Possible C/C++ prototypes are:\n SetPoint(real,real)\n SetPoint(Geometry::Vec2f const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + StrokeAttribute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetAttribute",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + arg2 = reinterpret_cast< StrokeAttribute * >(argp2); + { + try { + (*arg1)->SetAttribute((StrokeAttribute const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (*arg1)->SetCurvilinearAbscissa(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetStrokeLength",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetStrokeLength" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetStrokeLength" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (*arg1)->SetStrokeLength(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getX" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getY" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getZ" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getPoint3D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getPoint3D" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint3D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getProjectedX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getProjectedX" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getProjectedY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getProjectedY" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getProjectedZ",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getProjectedZ" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->getProjectedZ(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getPoint2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getPoint2D" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->getPoint2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Interface0D *arg2 = 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_getFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getFEdge" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_getFEdge" "', argument " "2"" of type '" "Interface0D &""'"); + } + arg2 = reinterpret_cast< Interface0D * >(argp2); + { + try { + result = (FEdge *)(*arg1)->getFEdge(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getId" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Nature::VertexNature result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_getNature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_getNature" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (Nature::VertexNature)(*arg1)->getNature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_castToSVertex" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->castToSVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_castToViewVertex" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (ViewVertex *)(*arg1)->castToViewVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_castToNonTVertex" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (NonTVertex *)(*arg1)->castToNonTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_castToTVertex" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (TVertex *)(*arg1)->castToTVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_A",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_A" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->A(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_B",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_B" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (SVertex *)(*arg1)->B(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_t2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_t2d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (float)(*arg1)->t2d(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetA",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetA" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetA" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (*arg1)->SetA(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SVertex *arg2 = (SVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetB",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetB" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetB" "', argument " "2"" of type '" "SVertex *""'"); + } + arg2 = reinterpret_cast< SVertex * >(argp2); + { + try { + (*arg1)->SetB(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetT2d",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetT2d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetT2d" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (*arg1)->SetT2d(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_fedge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_fedge" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (FEdge *)(*arg1)->fedge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_point2d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_point2d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point2d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_point3d",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_point3d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + Geometry::Vec3r const &_result_ref = (*arg1)->point3d(); + result = (Geometry::Vec3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec3r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_normal",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_normal" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->normal(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_shape" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occluders_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occluders_begin" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + occluder_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occluders_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occluders_end" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->occluders_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new occluder_container::const_iterator(static_cast< const occluder_container::const_iterator& >(result))), SWIGTYPE_p_occluder_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occluders_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occluders_empty" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occluders_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occluders_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occluders_size" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (int)(*arg1)->occluders_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Polygon3r *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occludee",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occludee" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + { + Polygon3r const &_result_ref = (*arg1)->occludee(); + result = (Polygon3r *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Polygon3r, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + SShape *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occluded_shape",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occluded_shape" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (SShape *)(*arg1)->occluded_shape(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SShape, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_occludee_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_occludee_empty" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (bool)(*arg1)->occludee_empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_z_discontinuity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_z_discontinuity" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->z_discontinuity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_curvatureFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_curvatureFredo" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (real)(*arg1)->curvatureFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; + Geometry::Vec2d result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertexIterator_directionFredo",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_directionFredo" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator const *""'"); + } + arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); + { + try { + result = (*arg1)->directionFredo(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StrokeVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_StrokeAttribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_StrokeAttribute")) SWIG_fail; + { + try { + result = (StrokeAttribute *)new StrokeAttribute(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeAttribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = 0 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeAttribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeAttribute" "', argument " "1"" of type '" "StrokeAttribute const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeAttribute" "', argument " "1"" of type '" "StrokeAttribute const &""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (StrokeAttribute *)new StrokeAttribute((StrokeAttribute const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeAttribute__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + float arg6 ; + StrokeAttribute *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + float val6 ; + int ecode6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOO:new_StrokeAttribute",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StrokeAttribute" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_StrokeAttribute" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StrokeAttribute" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_StrokeAttribute" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_StrokeAttribute" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + ecode6 = SWIG_AsVal_float(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_StrokeAttribute" "', argument " "6"" of type '" "float""'"); + } + arg6 = static_cast< float >(val6); + { + try { + result = (StrokeAttribute *)new StrokeAttribute(arg1,arg2,arg3,arg4,arg5,arg6); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeAttribute__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = 0 ; + StrokeAttribute *arg2 = 0 ; + float arg3 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_StrokeAttribute",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeAttribute" "', argument " "1"" of type '" "StrokeAttribute const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeAttribute" "', argument " "1"" of type '" "StrokeAttribute const &""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StrokeAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + arg2 = reinterpret_cast< StrokeAttribute * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StrokeAttribute" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (StrokeAttribute *)new StrokeAttribute((StrokeAttribute const &)*arg1,(StrokeAttribute const &)*arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[7]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 6); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_StrokeAttribute__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeAttribute__SWIG_1(self, args); + } + } + if (argc == 3) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StrokeAttribute__SWIG_3(self, args); + } + } + } + } + if (argc == 6) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[5], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StrokeAttribute__SWIG_2(self, args); + } + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n Possible C/C++ prototypes are:\n StrokeAttribute()\n StrokeAttribute(StrokeAttribute const &)\n StrokeAttribute(float,float,float,float,float,float)\n StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StrokeAttribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrokeAttribute" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getColor",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getColor" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float *)((StrokeAttribute const *)arg1)->getColor(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getColorR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getColorR" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getColorR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getColorG",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getColorG" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getColorG(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getColorB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getColorB" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getColorB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getColorRGB",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getColorRGB" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = ((StrokeAttribute const *)arg1)->getColorRGB(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getAlpha",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getAlpha" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getAlpha(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThickness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getThickness",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getThickness" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float *)((StrokeAttribute const *)arg1)->getThickness(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getThicknessR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getThicknessR" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getThicknessR(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getThicknessL",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getThicknessL" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getThicknessL(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_getThicknessRL",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getThicknessRL" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = ((StrokeAttribute const *)arg1)->getThicknessRL(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeAttribute_isVisible",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_isVisible" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + { + try { + result = (bool)((StrokeAttribute const *)arg1)->isVisible(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_getAttributeReal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getAttributeReal" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_getAttributeReal" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = (float)((StrokeAttribute const *)arg1)->getAttributeReal((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_getAttributeVec2f",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getAttributeVec2f" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_getAttributeVec2f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = ((StrokeAttribute const *)arg1)->getAttributeVec2f((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + Geometry::Vec3f result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_getAttributeVec3f",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_getAttributeVec3f" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_getAttributeVec3f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = ((StrokeAttribute const *)arg1)->getAttributeVec3f((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_isAttributeAvailableReal",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_isAttributeAvailableReal" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_isAttributeAvailableReal" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = (bool)((StrokeAttribute const *)arg1)->isAttributeAvailableReal((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_isAttributeAvailableVec2f",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_isAttributeAvailableVec2f" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_isAttributeAvailableVec2f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = (bool)((StrokeAttribute const *)arg1)->isAttributeAvailableVec2f((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_isAttributeAvailableVec3f",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_isAttributeAvailableVec3f" "', argument " "1"" of type '" "StrokeAttribute const *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_isAttributeAvailableVec3f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + { + try { + result = (bool)((StrokeAttribute const *)arg1)->isAttributeAvailableVec3f((char const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float arg2 ; + float arg3 ; + float arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:StrokeAttribute_setColor",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setColor" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeAttribute_setColor" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StrokeAttribute_setColor" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + (arg1)->setColor(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + Geometry::Vec3f *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_setColor",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setColor" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "Geometry::Vec3f const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "Geometry::Vec3f const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec3f * >(argp2); + { + try { + (arg1)->setColor((Geometry::Vec3f const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeAttribute_setColor__SWIG_1(self, args); + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StrokeAttribute_setColor__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n Possible C/C++ prototypes are:\n setColor(float,float,float)\n setColor(Geometry::Vec3f const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_setAlpha",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setAlpha" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_setAlpha" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->setAlpha(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + float arg2 ; + float arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeAttribute_setThickness",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setThickness" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeAttribute_setThickness" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + (arg1)->setThickness(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_setThickness",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setThickness" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + { + try { + (arg1)->setThickness((Geometry::Vec2f const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeAttribute_setThickness__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StrokeAttribute_setThickness__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n Possible C/C++ prototypes are:\n setThickness(float,float)\n setThickness(Geometry::Vec2f const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_SetVisible",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_SetVisible" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_SetVisible" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->SetVisible(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + float arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeAttribute_setAttributeReal",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setAttributeReal" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeReal" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeAttribute_setAttributeReal" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + (arg1)->setAttributeReal((char const *)arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + Geometry::Vec2f *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeAttribute_setAttributeVec2f",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2f * >(argp3); + { + try { + (arg1)->setAttributeVec2f((char const *)arg2,(Geometry::Vec2f const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; + char *arg2 = (char *) 0 ; + Geometry::Vec3f *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeAttribute_setAttributeVec3f",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "1"" of type '" "StrokeAttribute *""'"); + } + arg1 = reinterpret_cast< StrokeAttribute * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "3"" of type '" "Geometry::Vec3f const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "3"" of type '" "Geometry::Vec3f const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec3f * >(argp3); + { + try { + (arg1)->setAttributeVec3f((char const *)arg2,(Geometry::Vec3f const &)*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *StrokeAttribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeAttribute, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_getExactTypeName" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = ((StrokeVertex const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_StrokeVertex")) SWIG_fail; + { + try { + result = (StrokeVertex *)new StrokeVertex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_StrokeVertex, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "StrokeVertex const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "StrokeVertex const &""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (StrokeVertex *)new StrokeVertex((StrokeVertex const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + { + try { + result = (StrokeVertex *)new StrokeVertex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurvePoint *arg1 = (CurvePoint *) 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "CurvePoint *""'"); + } + arg1 = reinterpret_cast< CurvePoint * >(argp1); + { + try { + result = (StrokeVertex *)new StrokeVertex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + StrokeVertex *arg2 = (StrokeVertex *) 0 ; + float arg3 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_StrokeVertex",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StrokeVertex" "', argument " "2"" of type '" "StrokeVertex *""'"); + } + arg2 = reinterpret_cast< StrokeVertex * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StrokeVertex" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (StrokeVertex *)new StrokeVertex(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SVertex *arg1 = (SVertex *) 0 ; + StrokeAttribute *arg2 = 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_StrokeVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrokeVertex" "', argument " "1"" of type '" "SVertex *""'"); + } + arg1 = reinterpret_cast< SVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StrokeVertex" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrokeVertex" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + arg2 = reinterpret_cast< StrokeAttribute * >(argp2); + { + try { + result = (StrokeVertex *)new StrokeVertex(arg1,(StrokeAttribute const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_StrokeVertex__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertex__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertex__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CurvePoint, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertex__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_SVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_StrokeAttribute, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeVertex__SWIG_5(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StrokeVertex__SWIG_4(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n Possible C/C++ prototypes are:\n StrokeVertex()\n StrokeVertex(StrokeVertex const &)\n StrokeVertex(SVertex *)\n StrokeVertex(CurvePoint *)\n StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n StrokeVertex(SVertex *,StrokeAttribute const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StrokeVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrokeVertex" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_x",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_x" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (real)((StrokeVertex const *)arg1)->x(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_y",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_y" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (real)((StrokeVertex const *)arg1)->y(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + Geometry::Vec2f result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_getPoint",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_getPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (arg1)->getPoint(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_attribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_attribute" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + { + StrokeAttribute const &_result_ref = ((StrokeVertex const *)arg1)->attribute(); + result = (StrokeAttribute *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + StrokeAttribute *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_attribute",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_attribute" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + { + StrokeAttribute &_result_ref = (arg1)->attribute(); + result = (StrokeAttribute *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeAttribute, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertex_attribute__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertex_attribute__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_curvilinearAbscissa",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_curvilinearAbscissa" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (float)((StrokeVertex const *)arg1)->curvilinearAbscissa(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_strokeLength",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_strokeLength" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (float)((StrokeVertex const *)arg1)->strokeLength(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeVertex_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_u" "', argument " "1"" of type '" "StrokeVertex const *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + { + try { + result = (float)((StrokeVertex const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetX",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetX" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetX" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (arg1)->SetX(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + real arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetY",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetY" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetY" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + { + try { + (arg1)->SetY(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertex_SetPoint",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertex_SetPoint" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->SetPoint(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + Geometry::Vec2f *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetPoint",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); + { + try { + (arg1)->SetPoint((Geometry::Vec2f const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_StrokeVertex_SetPoint__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_StrokeVertex_SetPoint__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_SetPoint'.\n Possible C/C++ prototypes are:\n SetPoint(real,real)\n SetPoint(Geometry::Vec2f const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + StrokeAttribute *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetAttribute",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetAttribute" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + } + arg2 = reinterpret_cast< StrokeAttribute * >(argp2); + { + try { + (arg1)->SetAttribute((StrokeAttribute const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetCurvilinearAbscissa(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeVertex *arg1 = (StrokeVertex *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetStrokeLength",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetStrokeLength" "', argument " "1"" of type '" "StrokeVertex *""'"); + } + arg1 = reinterpret_cast< StrokeVertex * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetStrokeLength" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetStrokeLength(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StrokeVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeVertex, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Stroke_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getExactTypeName" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Id result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getId" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->getId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Id(static_cast< const Id& >(result))), SWIGTYPE_p_Id, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Stroke")) SWIG_fail; + { + try { + result = (Stroke *)new Stroke(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stroke, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = 0 ; + Stroke *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Stroke",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stroke, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stroke" "', argument " "1"" of type '" "Stroke const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Stroke" "', argument " "1"" of type '" "Stroke const &""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (Stroke *)new Stroke((Stroke const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stroke, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Stroke__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Stroke__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n Possible C/C++ prototypes are:\n Stroke()\n Stroke(Stroke const &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Stroke(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Stroke",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stroke" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_ComputeSampling(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + int arg2 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_ComputeSampling",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_ComputeSampling" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_ComputeSampling" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + result = (float)(arg1)->ComputeSampling(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_Resample",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_Resample" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_Resample" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + (arg1)->Resample(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_Resample",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_Resample" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_Resample" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->Resample(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_Resample__SWIG_0(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_Resample__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n Possible C/C++ prototypes are:\n Resample(int)\n Resample(float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeVertex *arg2 = (StrokeVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_RemoveVertex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_RemoveVertex" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_RemoveVertex" "', argument " "2"" of type '" "StrokeVertex *""'"); + } + arg2 = reinterpret_cast< StrokeVertex * >(argp2); + { + try { + (arg1)->RemoveVertex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_InsertVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeVertex *arg2 = (StrokeVertex *) 0 ; + StrokeInternal::StrokeVertexIterator arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_InsertVertex",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_InsertVertex" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_InsertVertex" "', argument " "2"" of type '" "StrokeVertex *""'"); + } + arg2 = reinterpret_cast< StrokeVertex * >(argp2); + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Stroke_InsertVertex" "', argument " "3"" of type '" "StrokeInternal::StrokeVertexIterator""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_InsertVertex" "', argument " "3"" of type '" "StrokeInternal::StrokeVertexIterator""'"); + } else { + StrokeInternal::StrokeVertexIterator * temp = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + { + try { + (arg1)->InsertVertex(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_Render(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeRenderer *arg2 = (StrokeRenderer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_Render",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_Render" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeRenderer, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_Render" "', argument " "2"" of type '" "StrokeRenderer const *""'"); + } + arg2 = reinterpret_cast< StrokeRenderer * >(argp2); + { + try { + (arg1)->Render((StrokeRenderer const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_RenderBasic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeRenderer *arg2 = (StrokeRenderer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_RenderBasic",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_RenderBasic" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeRenderer, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_RenderBasic" "', argument " "2"" of type '" "StrokeRenderer const *""'"); + } + arg2 = reinterpret_cast< StrokeRenderer * >(argp2); + { + try { + (arg1)->RenderBasic((StrokeRenderer const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getLength2D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getLength2D" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (real)((Stroke const *)arg1)->getLength2D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::MediumType result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getMediumType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getMediumType" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (Stroke::MediumType)((Stroke const *)arg1)->getMediumType(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getTextureId",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getTextureId" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (unsigned int)(arg1)->getTextureId(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_hasTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_hasTips",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_hasTips" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (bool)((Stroke const *)arg1)->hasTips(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_vertices_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_vertices_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_vertices_size" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (int)((Stroke const *)arg1)->vertices_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::viewedge_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_viewedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_viewedges_begin" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->viewedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Stroke::viewedge_container::const_iterator(static_cast< const Stroke::viewedge_container::const_iterator& >(result))), SWIGTYPE_p_Stroke__viewedge_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::viewedge_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_viewedges_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_viewedges_begin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->viewedges_begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Stroke::viewedge_container::iterator(static_cast< const Stroke::viewedge_container::iterator& >(result))), SWIGTYPE_p_Stroke__viewedge_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_viewedges_begin__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_viewedges_begin__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n Possible C/C++ prototypes are:\n viewedges_begin()\n viewedges_begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::viewedge_container::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_viewedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_viewedges_end" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->viewedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Stroke::viewedge_container::const_iterator(static_cast< const Stroke::viewedge_container::const_iterator& >(result))), SWIGTYPE_p_Stroke__viewedge_container__const_iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::viewedge_container::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_viewedges_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_viewedges_end" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->viewedges_end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Stroke::viewedge_container::iterator(static_cast< const Stroke::viewedge_container::iterator& >(result))), SWIGTYPE_p_Stroke__viewedge_container__iterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_viewedges_end__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_viewedges_end__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n Possible C/C++ prototypes are:\n viewedges_end()\n viewedges_end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_viewedges_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_viewedges_size" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (int)((Stroke const *)arg1)->viewedges_size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Geometry::Vec2r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getBeginningOrientation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getBeginningOrientation" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->getBeginningOrientation(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getBeginningOrientationX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getBeginningOrientationX" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (real)((Stroke const *)arg1)->getBeginningOrientationX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getBeginningOrientationY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getBeginningOrientationY" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (real)((Stroke const *)arg1)->getBeginningOrientationY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Geometry::Vec2r result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getEndingOrientation",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getEndingOrientation" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = ((Stroke const *)arg1)->getEndingOrientation(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getEndingOrientationX",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getEndingOrientationX" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (real)((Stroke const *)arg1)->getEndingOrientationX(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_getEndingOrientationY",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_getEndingOrientationY" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (real)((Stroke const *)arg1)->getEndingOrientationY(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_double(static_cast< double >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Id *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetId" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetId" "', argument " "2"" of type '" "Id const &""'"); + } + arg2 = reinterpret_cast< Id * >(argp2); + { + try { + (arg1)->SetId((Id const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetLength",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetLength" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetLength" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + (arg1)->SetLength(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Stroke::MediumType arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetMediumType",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetMediumType" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetMediumType" "', argument " "2"" of type '" "Stroke::MediumType""'"); + } + arg2 = static_cast< Stroke::MediumType >(val2); + { + try { + (arg1)->SetMediumType(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetTextureId",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetTextureId" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetTextureId" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->SetTextureId(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetTips",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetTips" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetTips" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->SetTips(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeVertex *arg2 = (StrokeVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_push_back" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_push_back" "', argument " "2"" of type '" "StrokeVertex *""'"); + } + arg2 = reinterpret_cast< StrokeVertex * >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_push_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeVertex *arg2 = (StrokeVertex *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_push_front",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_push_front" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeVertex, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_push_front" "', argument " "2"" of type '" "StrokeVertex *""'"); + } + arg2 = reinterpret_cast< StrokeVertex * >(argp2); + { + try { + (arg1)->push_front(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + ViewEdge *arg2 = (ViewEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_AddViewEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_AddViewEdge" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_AddViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + } + arg2 = reinterpret_cast< ViewEdge * >(argp2); + { + try { + (arg1)->AddViewEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetBeginningOrientation",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + { + try { + (arg1)->SetBeginningOrientation((Geometry::Vec2r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_SetBeginningOrientation",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_SetBeginningOrientation" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->SetBeginningOrientation(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_SetBeginningOrientation__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_SetBeginningOrientation__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetBeginningOrientation'.\n Possible C/C++ prototypes are:\n SetBeginningOrientation(Geometry::Vec2r const &)\n SetBeginningOrientation(real,real)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Geometry::Vec2r *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetEndingOrientation",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + } + arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); + { + try { + (arg1)->SetEndingOrientation((Geometry::Vec2r const &)*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + real arg2 ; + real arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_SetEndingOrientation",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_SetEndingOrientation" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + { + try { + (arg1)->SetEndingOrientation(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_SetEndingOrientation__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_double(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_double(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_SetEndingOrientation__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetEndingOrientation'.\n Possible C/C++ prototypes are:\n SetEndingOrientation(Geometry::Vec2r const &)\n SetEndingOrientation(real,real)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + float arg2 ; + StrokeInternal::StrokeVertexIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_strokeVerticesBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_strokeVerticesBegin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_strokeVerticesBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->strokeVerticesBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new StrokeInternal::StrokeVertexIterator(static_cast< const StrokeInternal::StrokeVertexIterator& >(result))), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeInternal::StrokeVertexIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_strokeVerticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_strokeVerticesBegin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->strokeVerticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new StrokeInternal::StrokeVertexIterator(static_cast< const StrokeInternal::StrokeVertexIterator& >(result))), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_strokeVerticesBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_strokeVerticesBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n Possible C/C++ prototypes are:\n strokeVerticesBegin(float)\n strokeVerticesBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + StrokeInternal::StrokeVertexIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_strokeVerticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_strokeVerticesEnd" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->strokeVerticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new StrokeInternal::StrokeVertexIterator(static_cast< const StrokeInternal::StrokeVertexIterator& >(result))), SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_strokeVerticesSize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_strokeVerticesSize" "', argument " "1"" of type '" "Stroke const *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (unsigned int)((Stroke const *)arg1)->strokeVerticesSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_verticesBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_verticesBegin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->verticesBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_verticesEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_verticesEnd" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->verticesEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_pointsBegin",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_pointsBegin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_pointsBegin" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsBegin(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_pointsBegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_pointsBegin" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->pointsBegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_pointsBegin__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_pointsBegin__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + float arg2 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_pointsEnd",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_pointsEnd" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_pointsEnd" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (arg1)->pointsEnd(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = (Stroke *) 0 ; + Interface0DIterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stroke_pointsEnd",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_pointsEnd" "', argument " "1"" of type '" "Stroke *""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (arg1)->pointsEnd(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new Interface0DIterator(static_cast< const Interface0DIterator& >(result))), SWIGTYPE_p_Interface0DIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Stroke_pointsEnd__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Stroke_pointsEnd__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + return NULL; +} + + +SWIGINTERN PyObject *Stroke_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Stroke, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + PyObject **arg2 = (PyObject **) 0 ; + swig::PySwigIterator *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + arg2 = &obj0; + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_iterator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (swig::PySwigIterator *)std_vector_Sl_StrokeShader_Sm__Sg__iterator(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___nonzero__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___len__",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + result = (std::vector > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + int res4 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + std::vector > *ptr = (std::vector > *)0; + res4 = swig::asptr(obj3, &ptr); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + } + arg4 = ptr; + } + { + try { + try { + std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + catch(std::invalid_argument &_e) { + SWIG_exception_fail(SWIG_ValueError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsNewObj(res4)) delete arg4; + return resultobj; +fail: + if (SWIG_IsNewObj(res4)) delete arg4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + ptrdiff_t val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + } + arg3 = static_cast< std::vector::difference_type >(val3); + { + try { + try { + std_vector_Sl_StrokeShader_Sm__Sg____delslice__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___delitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + std_vector_Sl_StrokeShader_Sm__Sg____delitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___getitem__",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + { + try { + try { + result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + } + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + try { + std_vector_Sl_StrokeShader_Sm__Sg____setitem__(arg1,arg2,arg3); + } + catch(std::out_of_range &_e) { + SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_append",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + std_vector_Sl_StrokeShader_Sm__Sg__append(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ShadersContainer")) SWIG_fail; + { + try { + result = (std::vector *)new std::vector(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; + int res1 = SWIG_OLDOBJ ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; + { + std::vector > *ptr = (std::vector > *)0; + res1 = swig::asptr(obj0, &ptr); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + if (!ptr) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + } + arg1 = ptr; + } + { + try { + result = (std::vector *)new std::vector((std::vector const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + if (SWIG_IsNewObj(res1)) delete arg1; + return resultobj; +fail: + if (SWIG_IsNewObj(res1)) delete arg1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_empty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (bool)((std::vector const *)arg1)->empty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_size",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->size(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_swap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + } + arg2 = reinterpret_cast< std::vector * >(argp2); + { + try { + (arg1)->swap(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_get_allocator",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->get_allocator(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rbegin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + { + try { + result = (std::vector *)new std::vector(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + (arg1)->pop_back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_resize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->resize(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_erase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + swig::PySwigIterator *iter3 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res3) || !iter3) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + if (iter_t) { + arg3 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + } + } + { + try { + result = (arg1)->erase(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ShadersContainer_erase__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + return _wrap_ShadersContainer_erase__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; + size_t val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ShadersContainer",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_size_t(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + } + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + result = (std::vector *)new std::vector(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ShadersContainer__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ShadersContainer__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ShadersContainer__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_size_t(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ShadersContainer__SWIG_3(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.StrokeShader)>()\n std::vector<(p.StrokeShader)>(std::vector const &)\n std::vector<(p.StrokeShader)>(std::vector::size_type)\n std::vector<(p.StrokeShader)>(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_push_back",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + } + arg2 = reinterpret_cast< std::vector::value_type >(argp2); + { + try { + (arg1)->push_back(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_front",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->front(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_back",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (std::vector::value_type)((std::vector const *)arg1)->back(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->assign(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + (arg1)->resize(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_ShadersContainer_resize__SWIG_0(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_resize__SWIG_1(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + } + arg3 = reinterpret_cast< std::vector::value_type >(argp3); + { + try { + result = (arg1)->insert(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::PySwigIterator *iter2 = 0 ; + int res2 ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); + if (!SWIG_IsOK(res2) || !iter2) { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } else { + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + if (iter_t) { + arg2 = iter_t->get_current(); + } else { + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + } + } + ecode3 = SWIG_AsVal_size_t(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + } + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + } + arg4 = reinterpret_cast< std::vector::value_type >(argp4); + { + try { + (arg1)->insert(arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_insert__SWIG_0(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + swig::PySwigIterator *iter = 0; + int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + if (_v) { + { + int res = SWIG_AsVal_size_t(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_insert__SWIG_1(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_reserve",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + } + arg2 = static_cast< std::vector::size_type >(val2); + { + try { + (arg1)->reserve(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_capacity",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->capacity(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ShadersContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ShadersContainer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ShadersContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_StrokeShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + StrokeShader *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeShader",&obj0)) SWIG_fail; + arg1 = obj0; + { + try { + if ( arg1 != Py_None ) { + /* subclassed */ + result = (StrokeShader *)new SwigDirector_StrokeShader(arg1); + } else { + result = (StrokeShader *)new StrokeShader(); + } + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShader *arg1 = (StrokeShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StrokeShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrokeShader" "', argument " "1"" of type '" "StrokeShader *""'"); + } + arg1 = reinterpret_cast< StrokeShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShader *arg1 = (StrokeShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"O:StrokeShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeShader_getName" "', argument " "1"" of type '" "StrokeShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShader * >(argp1); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + result = ((StrokeShader const *)arg1)->StrokeShader::getName(); + } else { + result = ((StrokeShader const *)arg1)->getName(); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShader *arg1 = (StrokeShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + Swig::Director *director = 0; + bool upcall = false; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeShader_shade" "', argument " "1"" of type '" "StrokeShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + director = SWIG_DIRECTOR_CAST(arg1); + upcall = (director && (director->swig_get_self()==obj0)); + try { + { + try { + if (upcall) { + ((StrokeShader const *)arg1)->StrokeShader::shade(*arg2); + } else { + ((StrokeShader const *)arg1)->shade(*arg2); + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + } catch (Swig::DirectorException&) { + SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_disown_StrokeShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShader *arg1 = (StrokeShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:disown_StrokeShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_StrokeShader" "', argument " "1"" of type '" "StrokeShader *""'"); + } + arg1 = reinterpret_cast< StrokeShader * >(argp1); + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StrokeShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ConstantThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::ConstantThicknessShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ConstantThicknessShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantThicknessShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::ConstantThicknessShader *)new StrokeShaders::ConstantThicknessShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantThicknessShader *arg1 = (StrokeShaders::ConstantThicknessShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ConstantThicknessShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantThicknessShader" "', argument " "1"" of type '" "StrokeShaders::ConstantThicknessShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantThicknessShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantThicknessShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantThicknessShader *arg1 = (StrokeShaders::ConstantThicknessShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ConstantThicknessShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantThicknessShader_getName" "', argument " "1"" of type '" "StrokeShaders::ConstantThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantThicknessShader * >(argp1); + { + try { + result = ((StrokeShaders::ConstantThicknessShader const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantThicknessShader *arg1 = (StrokeShaders::ConstantThicknessShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ConstantThicknessShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantThicknessShader_shade" "', argument " "1"" of type '" "StrokeShaders::ConstantThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantThicknessShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ConstantThicknessShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstantThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ConstantExternThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::ConstantExternThicknessShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ConstantExternThicknessShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantExternThicknessShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::ConstantExternThicknessShader *)new StrokeShaders::ConstantExternThicknessShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantExternThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantExternThicknessShader *arg1 = (StrokeShaders::ConstantExternThicknessShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ConstantExternThicknessShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantExternThicknessShader" "', argument " "1"" of type '" "StrokeShaders::ConstantExternThicknessShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantExternThicknessShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantExternThicknessShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantExternThicknessShader *arg1 = (StrokeShaders::ConstantExternThicknessShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ConstantExternThicknessShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantExternThicknessShader_getName" "', argument " "1"" of type '" "StrokeShaders::ConstantExternThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantExternThicknessShader * >(argp1); + { + try { + result = ((StrokeShaders::ConstantExternThicknessShader const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantExternThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantExternThicknessShader *arg1 = (StrokeShaders::ConstantExternThicknessShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ConstantExternThicknessShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantExternThicknessShader_shade" "', argument " "1"" of type '" "StrokeShaders::ConstantExternThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantExternThicknessShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantExternThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantExternThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ConstantExternThicknessShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstantExternThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_IncreasingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + StrokeShaders::IncreasingThicknessShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_IncreasingThicknessShader",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IncreasingThicknessShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IncreasingThicknessShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::IncreasingThicknessShader *)new StrokeShaders::IncreasingThicknessShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IncreasingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::IncreasingThicknessShader *arg1 = (StrokeShaders::IncreasingThicknessShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_IncreasingThicknessShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IncreasingThicknessShader" "', argument " "1"" of type '" "StrokeShaders::IncreasingThicknessShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::IncreasingThicknessShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::IncreasingThicknessShader *arg1 = (StrokeShaders::IncreasingThicknessShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:IncreasingThicknessShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncreasingThicknessShader_shade" "', argument " "1"" of type '" "StrokeShaders::IncreasingThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::IncreasingThicknessShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IncreasingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IncreasingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::IncreasingThicknessShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ConstrainedIncreasingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + float arg3 ; + StrokeShaders::ConstrainedIncreasingThicknessShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ConstrainedIncreasingThicknessShader",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstrainedIncreasingThicknessShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConstrainedIncreasingThicknessShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstrainedIncreasingThicknessShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (StrokeShaders::ConstrainedIncreasingThicknessShader *)new StrokeShaders::ConstrainedIncreasingThicknessShader(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstrainedIncreasingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstrainedIncreasingThicknessShader *arg1 = (StrokeShaders::ConstrainedIncreasingThicknessShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ConstrainedIncreasingThicknessShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstrainedIncreasingThicknessShader" "', argument " "1"" of type '" "StrokeShaders::ConstrainedIncreasingThicknessShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstrainedIncreasingThicknessShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstrainedIncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstrainedIncreasingThicknessShader *arg1 = (StrokeShaders::ConstrainedIncreasingThicknessShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ConstrainedIncreasingThicknessShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstrainedIncreasingThicknessShader_shade" "', argument " "1"" of type '" "StrokeShaders::ConstrainedIncreasingThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstrainedIncreasingThicknessShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstrainedIncreasingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstrainedIncreasingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ConstrainedIncreasingThicknessShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstrainedIncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_LengthDependingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + StrokeShaders::LengthDependingThicknessShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_LengthDependingThicknessShader",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LengthDependingThicknessShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LengthDependingThicknessShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::LengthDependingThicknessShader *)new StrokeShaders::LengthDependingThicknessShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_LengthDependingThicknessShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::LengthDependingThicknessShader *arg1 = (StrokeShaders::LengthDependingThicknessShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_LengthDependingThicknessShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LengthDependingThicknessShader" "', argument " "1"" of type '" "StrokeShaders::LengthDependingThicknessShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::LengthDependingThicknessShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_LengthDependingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::LengthDependingThicknessShader *arg1 = (StrokeShaders::LengthDependingThicknessShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:LengthDependingThicknessShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LengthDependingThicknessShader_shade" "', argument " "1"" of type '" "StrokeShaders::LengthDependingThicknessShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::LengthDependingThicknessShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LengthDependingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LengthDependingThicknessShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::LengthDependingThicknessShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *LengthDependingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + float arg2 ; + float arg3 ; + bool arg4 ; + StrokeShaders::ThicknessVariationPatternShader *result = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ThicknessVariationPatternShader",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ThicknessVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ThicknessVariationPatternShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ThicknessVariationPatternShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ThicknessVariationPatternShader" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + try { + result = (StrokeShaders::ThicknessVariationPatternShader *)new StrokeShaders::ThicknessVariationPatternShader(arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + float arg2 ; + float arg3 ; + StrokeShaders::ThicknessVariationPatternShader *result = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ThicknessVariationPatternShader",&obj0,&obj1,&obj2)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ThicknessVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ThicknessVariationPatternShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ThicknessVariationPatternShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (StrokeShaders::ThicknessVariationPatternShader *)new StrokeShaders::ThicknessVariationPatternShader(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + float arg2 ; + StrokeShaders::ThicknessVariationPatternShader *result = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ThicknessVariationPatternShader",&obj0,&obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ThicknessVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ThicknessVariationPatternShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::ThicknessVariationPatternShader *)new StrokeShaders::ThicknessVariationPatternShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + StrokeShaders::ThicknessVariationPatternShader *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ThicknessVariationPatternShader",&obj0)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ThicknessVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (StrokeShaders::ThicknessVariationPatternShader *)new StrokeShaders::ThicknessVariationPatternShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ThicknessVariationPatternShader__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ThicknessVariationPatternShader__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ThicknessVariationPatternShader__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ThicknessVariationPatternShader__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ThicknessVariationPatternShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ThicknessVariationPatternShader *arg1 = (StrokeShaders::ThicknessVariationPatternShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ThicknessVariationPatternShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ThicknessVariationPatternShader" "', argument " "1"" of type '" "StrokeShaders::ThicknessVariationPatternShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ThicknessVariationPatternShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ThicknessVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ThicknessVariationPatternShader *arg1 = (StrokeShaders::ThicknessVariationPatternShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ThicknessVariationPatternShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ThicknessVariationPatternShader_shade" "', argument " "1"" of type '" "StrokeShaders::ThicknessVariationPatternShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ThicknessVariationPatternShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ThicknessVariationPatternShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ThicknessVariationPatternShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ThicknessVariationPatternShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ThicknessVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ThicknessNoiseShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ThicknessNoiseShader")) SWIG_fail; + { + try { + result = (StrokeShaders::ThicknessNoiseShader *)new StrokeShaders::ThicknessNoiseShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + StrokeShaders::ThicknessNoiseShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ThicknessNoiseShader",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ThicknessNoiseShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ThicknessNoiseShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::ThicknessNoiseShader *)new StrokeShaders::ThicknessNoiseShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ThicknessNoiseShader__SWIG_0(self, args); + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ThicknessNoiseShader__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessNoiseShader()\n StrokeShaders::ThicknessNoiseShader(float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ThicknessNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ThicknessNoiseShader *arg1 = (StrokeShaders::ThicknessNoiseShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ThicknessNoiseShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ThicknessNoiseShader_shade" "', argument " "1"" of type '" "StrokeShaders::ThicknessNoiseShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ThicknessNoiseShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ThicknessNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ThicknessNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ThicknessNoiseShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ThicknessNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ThicknessNoiseShader *arg1 = (StrokeShaders::ThicknessNoiseShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ThicknessNoiseShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ThicknessNoiseShader" "', argument " "1"" of type '" "StrokeShaders::ThicknessNoiseShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ThicknessNoiseShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ThicknessNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ConstantColorShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + float arg3 ; + float arg4 ; + StrokeShaders::ConstantColorShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ConstantColorShader",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantColorShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConstantColorShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantColorShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantColorShader" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + result = (StrokeShaders::ConstantColorShader *)new StrokeShaders::ConstantColorShader(arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantColorShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + float arg3 ; + StrokeShaders::ConstantColorShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_ConstantColorShader",&obj0,&obj1,&obj2)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantColorShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConstantColorShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantColorShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + result = (StrokeShaders::ConstantColorShader *)new StrokeShaders::ConstantColorShader(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ConstantColorShader__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ConstantColorShader__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ConstantColorShader(float,float,float,float)\n StrokeShaders::ConstantColorShader(float,float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantColorShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantColorShader *arg1 = (StrokeShaders::ConstantColorShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ConstantColorShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantColorShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantColorShader_getName" "', argument " "1"" of type '" "StrokeShaders::ConstantColorShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantColorShader * >(argp1); + { + try { + result = ((StrokeShaders::ConstantColorShader const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ConstantColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantColorShader *arg1 = (StrokeShaders::ConstantColorShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ConstantColorShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantColorShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantColorShader_shade" "', argument " "1"" of type '" "StrokeShaders::ConstantColorShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantColorShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ConstantColorShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ConstantColorShader *arg1 = (StrokeShaders::ConstantColorShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ConstantColorShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantColorShader" "', argument " "1"" of type '" "StrokeShaders::ConstantColorShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ConstantColorShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ConstantColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_IncreasingColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + float arg3 ; + float arg4 ; + float arg5 ; + float arg6 ; + float arg7 ; + float arg8 ; + StrokeShaders::IncreasingColorShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + float val3 ; + int ecode3 = 0 ; + float val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + float val6 ; + int ecode6 = 0 ; + float val7 ; + int ecode7 = 0 ; + float val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:new_IncreasingColorShader",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IncreasingColorShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IncreasingColorShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IncreasingColorShader" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IncreasingColorShader" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IncreasingColorShader" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + ecode6 = SWIG_AsVal_float(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_IncreasingColorShader" "', argument " "6"" of type '" "float""'"); + } + arg6 = static_cast< float >(val6); + ecode7 = SWIG_AsVal_float(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IncreasingColorShader" "', argument " "7"" of type '" "float""'"); + } + arg7 = static_cast< float >(val7); + ecode8 = SWIG_AsVal_float(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_IncreasingColorShader" "', argument " "8"" of type '" "float""'"); + } + arg8 = static_cast< float >(val8); + { + try { + result = (StrokeShaders::IncreasingColorShader *)new StrokeShaders::IncreasingColorShader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IncreasingColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::IncreasingColorShader *arg1 = (StrokeShaders::IncreasingColorShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:IncreasingColorShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__IncreasingColorShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncreasingColorShader_shade" "', argument " "1"" of type '" "StrokeShaders::IncreasingColorShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::IncreasingColorShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IncreasingColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IncreasingColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::IncreasingColorShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IncreasingColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::IncreasingColorShader *arg1 = (StrokeShaders::IncreasingColorShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_IncreasingColorShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IncreasingColorShader" "', argument " "1"" of type '" "StrokeShaders::IncreasingColorShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::IncreasingColorShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *IncreasingColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + bool arg2 ; + StrokeShaders::ColorVariationPatternShader *result = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ColorVariationPatternShader",&obj0,&obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ColorVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ColorVariationPatternShader" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + result = (StrokeShaders::ColorVariationPatternShader *)new StrokeShaders::ColorVariationPatternShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + StrokeShaders::ColorVariationPatternShader *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ColorVariationPatternShader",&obj0)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_ColorVariationPatternShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (StrokeShaders::ColorVariationPatternShader *)new StrokeShaders::ColorVariationPatternShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ColorVariationPatternShader__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ColorVariationPatternShader__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n StrokeShaders::ColorVariationPatternShader(std::string const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ColorVariationPatternShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ColorVariationPatternShader *arg1 = (StrokeShaders::ColorVariationPatternShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorVariationPatternShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorVariationPatternShader" "', argument " "1"" of type '" "StrokeShaders::ColorVariationPatternShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ColorVariationPatternShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ColorVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ColorVariationPatternShader *arg1 = (StrokeShaders::ColorVariationPatternShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ColorVariationPatternShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorVariationPatternShader_shade" "', argument " "1"" of type '" "StrokeShaders::ColorVariationPatternShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ColorVariationPatternShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColorVariationPatternShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColorVariationPatternShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ColorVariationPatternShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ColorVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_MaterialColorShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::MaterialColorShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_MaterialColorShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MaterialColorShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::MaterialColorShader *)new StrokeShaders::MaterialColorShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MaterialColorShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::MaterialColorShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_MaterialColorShader")) SWIG_fail; + { + try { + result = (StrokeShaders::MaterialColorShader *)new StrokeShaders::MaterialColorShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_MaterialColorShader__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_MaterialColorShader__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::MaterialColorShader(float)\n StrokeShaders::MaterialColorShader()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_MaterialColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::MaterialColorShader *arg1 = (StrokeShaders::MaterialColorShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:MaterialColorShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__MaterialColorShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MaterialColorShader_shade" "', argument " "1"" of type '" "StrokeShaders::MaterialColorShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::MaterialColorShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MaterialColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MaterialColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::MaterialColorShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_MaterialColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::MaterialColorShader *arg1 = (StrokeShaders::MaterialColorShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_MaterialColorShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaterialColorShader" "', argument " "1"" of type '" "StrokeShaders::MaterialColorShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::MaterialColorShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *MaterialColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_CalligraphicColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Geometry::Vec2d *arg1 = 0 ; + StrokeShaders::CalligraphicColorShader *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_CalligraphicColorShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CalligraphicColorShader" "', argument " "1"" of type '" "Geometry::Vec2d const &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CalligraphicColorShader" "', argument " "1"" of type '" "Geometry::Vec2d const &""'"); + } + arg1 = reinterpret_cast< Geometry::Vec2d * >(argp1); + { + try { + result = (StrokeShaders::CalligraphicColorShader *)new StrokeShaders::CalligraphicColorShader((Geometry::Vec2d const &)*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CalligraphicColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::CalligraphicColorShader *arg1 = (StrokeShaders::CalligraphicColorShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CalligraphicColorShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalligraphicColorShader_shade" "', argument " "1"" of type '" "StrokeShaders::CalligraphicColorShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::CalligraphicColorShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalligraphicColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalligraphicColorShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::CalligraphicColorShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CalligraphicColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::CalligraphicColorShader *arg1 = (StrokeShaders::CalligraphicColorShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CalligraphicColorShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalligraphicColorShader" "', argument " "1"" of type '" "StrokeShaders::CalligraphicColorShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::CalligraphicColorShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CalligraphicColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ColorNoiseShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ColorNoiseShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ColorNoiseShader")) SWIG_fail; + { + try { + result = (StrokeShaders::ColorNoiseShader *)new StrokeShaders::ColorNoiseShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ColorNoiseShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + StrokeShaders::ColorNoiseShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_ColorNoiseShader",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ColorNoiseShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ColorNoiseShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::ColorNoiseShader *)new StrokeShaders::ColorNoiseShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ColorNoiseShader__SWIG_0(self, args); + } + if (argc == 2) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ColorNoiseShader__SWIG_1(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorNoiseShader()\n StrokeShaders::ColorNoiseShader(float,float)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ColorNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ColorNoiseShader *arg1 = (StrokeShaders::ColorNoiseShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ColorNoiseShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ColorNoiseShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ColorNoiseShader_shade" "', argument " "1"" of type '" "StrokeShaders::ColorNoiseShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ColorNoiseShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ColorNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ColorNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ColorNoiseShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ColorNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ColorNoiseShader *arg1 = (StrokeShaders::ColorNoiseShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ColorNoiseShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ColorNoiseShader" "', argument " "1"" of type '" "StrokeShaders::ColorNoiseShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ColorNoiseShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ColorNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_TextureAssignerShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + StrokeShaders::TextureAssignerShader *result = 0 ; + int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_TextureAssignerShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TextureAssignerShader" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + { + try { + result = (StrokeShaders::TextureAssignerShader *)new StrokeShaders::TextureAssignerShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TextureAssignerShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::TextureAssignerShader *arg1 = (StrokeShaders::TextureAssignerShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TextureAssignerShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__TextureAssignerShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TextureAssignerShader_shade" "', argument " "1"" of type '" "StrokeShaders::TextureAssignerShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::TextureAssignerShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TextureAssignerShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TextureAssignerShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::TextureAssignerShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TextureAssignerShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::TextureAssignerShader *arg1 = (StrokeShaders::TextureAssignerShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TextureAssignerShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TextureAssignerShader" "', argument " "1"" of type '" "StrokeShaders::TextureAssignerShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::TextureAssignerShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TextureAssignerShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_StrokeTextureShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + Stroke::MediumType arg2 ; + bool arg3 ; + StrokeShaders::StrokeTextureShader *result = 0 ; + int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:new_StrokeTextureShader",&obj0,&obj1,&obj2)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StrokeTextureShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_StrokeTextureShader" "', argument " "2"" of type '" "Stroke::MediumType""'"); + } + arg2 = static_cast< Stroke::MediumType >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StrokeTextureShader" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + result = (StrokeShaders::StrokeTextureShader *)new StrokeShaders::StrokeTextureShader(arg1,arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeTextureShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + Stroke::MediumType arg2 ; + StrokeShaders::StrokeTextureShader *result = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_StrokeTextureShader",&obj0,&obj1)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StrokeTextureShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_StrokeTextureShader" "', argument " "2"" of type '" "Stroke::MediumType""'"); + } + arg2 = static_cast< Stroke::MediumType >(val2); + { + try { + result = (StrokeShaders::StrokeTextureShader *)new StrokeShaders::StrokeTextureShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeTextureShader__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::string arg1 ; + StrokeShaders::StrokeTextureShader *result = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_StrokeTextureShader",&obj0)) SWIG_fail; + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(obj0, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StrokeTextureShader" "', argument " "1"" of type '" "std::string const""'"); + } + arg1 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + result = (StrokeShaders::StrokeTextureShader *)new StrokeShaders::StrokeTextureShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_StrokeTextureShader__SWIG_2(self, args); + } + } + if (argc == 2) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StrokeTextureShader__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + int res = SWIG_AsPtr_std_string(argv[0], (std::string**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_bool(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_StrokeTextureShader__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n StrokeShaders::StrokeTextureShader(std::string const)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_StrokeTextureShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::StrokeTextureShader *arg1 = (StrokeShaders::StrokeTextureShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeTextureShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__StrokeTextureShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeTextureShader_shade" "', argument " "1"" of type '" "StrokeShaders::StrokeTextureShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::StrokeTextureShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeTextureShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeTextureShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::StrokeTextureShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeTextureShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::StrokeTextureShader *arg1 = (StrokeShaders::StrokeTextureShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_StrokeTextureShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrokeTextureShader" "', argument " "1"" of type '" "StrokeShaders::StrokeTextureShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::StrokeTextureShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *StrokeTextureShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::BackboneStretcherShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_BackboneStretcherShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BackboneStretcherShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::BackboneStretcherShader *)new StrokeShaders::BackboneStretcherShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BackboneStretcherShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_BackboneStretcherShader")) SWIG_fail; + { + try { + result = (StrokeShaders::BackboneStretcherShader *)new StrokeShaders::BackboneStretcherShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_BackboneStretcherShader__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_BackboneStretcherShader__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BackboneStretcherShader(float)\n StrokeShaders::BackboneStretcherShader()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BackboneStretcherShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BackboneStretcherShader *arg1 = (StrokeShaders::BackboneStretcherShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:BackboneStretcherShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackboneStretcherShader_shade" "', argument " "1"" of type '" "StrokeShaders::BackboneStretcherShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BackboneStretcherShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BackboneStretcherShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BackboneStretcherShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::BackboneStretcherShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BackboneStretcherShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BackboneStretcherShader *arg1 = (StrokeShaders::BackboneStretcherShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_BackboneStretcherShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BackboneStretcherShader" "', argument " "1"" of type '" "StrokeShaders::BackboneStretcherShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BackboneStretcherShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BackboneStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_SamplingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::SamplingShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_SamplingShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SamplingShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::SamplingShader *)new StrokeShaders::SamplingShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SamplingShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::SamplingShader *arg1 = (StrokeShaders::SamplingShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SamplingShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__SamplingShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SamplingShader_shade" "', argument " "1"" of type '" "StrokeShaders::SamplingShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::SamplingShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SamplingShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SamplingShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::SamplingShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SamplingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::SamplingShader *arg1 = (StrokeShaders::SamplingShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SamplingShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SamplingShader" "', argument " "1"" of type '" "StrokeShaders::SamplingShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::SamplingShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SamplingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::ExternalContourStretcherShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ExternalContourStretcherShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ExternalContourStretcherShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::ExternalContourStretcherShader *)new StrokeShaders::ExternalContourStretcherShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ExternalContourStretcherShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ExternalContourStretcherShader")) SWIG_fail; + { + try { + result = (StrokeShaders::ExternalContourStretcherShader *)new StrokeShaders::ExternalContourStretcherShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_ExternalContourStretcherShader__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_ExternalContourStretcherShader__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ExternalContourStretcherShader(float)\n StrokeShaders::ExternalContourStretcherShader()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ExternalContourStretcherShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ExternalContourStretcherShader *arg1 = (StrokeShaders::ExternalContourStretcherShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:ExternalContourStretcherShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExternalContourStretcherShader_shade" "', argument " "1"" of type '" "StrokeShaders::ExternalContourStretcherShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ExternalContourStretcherShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExternalContourStretcherShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExternalContourStretcherShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::ExternalContourStretcherShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ExternalContourStretcherShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::ExternalContourStretcherShader *arg1 = (StrokeShaders::ExternalContourStretcherShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ExternalContourStretcherShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExternalContourStretcherShader" "', argument " "1"" of type '" "StrokeShaders::ExternalContourStretcherShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::ExternalContourStretcherShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ExternalContourStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_BSplineShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BSplineShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_BSplineShader")) SWIG_fail; + { + try { + result = (StrokeShaders::BSplineShader *)new StrokeShaders::BSplineShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BSplineShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BSplineShader *arg1 = (StrokeShaders::BSplineShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:BSplineShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BSplineShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BSplineShader_shade" "', argument " "1"" of type '" "StrokeShaders::BSplineShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BSplineShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BSplineShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BSplineShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::BSplineShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BSplineShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BSplineShader *arg1 = (StrokeShaders::BSplineShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_BSplineShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BSplineShader" "', argument " "1"" of type '" "StrokeShaders::BSplineShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BSplineShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BSplineShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_BezierCurveShader__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::BezierCurveShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_BezierCurveShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BezierCurveShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::BezierCurveShader *)new StrokeShaders::BezierCurveShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BezierCurveShader__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BezierCurveShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_BezierCurveShader")) SWIG_fail; + { + try { + result = (StrokeShaders::BezierCurveShader *)new StrokeShaders::BezierCurveShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_BezierCurveShader__SWIG_1(self, args); + } + if (argc == 1) { + int _v; + { + int res = SWIG_AsVal_float(argv[0], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_BezierCurveShader__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BezierCurveShader(float)\n StrokeShaders::BezierCurveShader()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_BezierCurveShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BezierCurveShader *arg1 = (StrokeShaders::BezierCurveShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:BezierCurveShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BezierCurveShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BezierCurveShader_shade" "', argument " "1"" of type '" "StrokeShaders::BezierCurveShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BezierCurveShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BezierCurveShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BezierCurveShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::BezierCurveShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_BezierCurveShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::BezierCurveShader *arg1 = (StrokeShaders::BezierCurveShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_BezierCurveShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BezierCurveShader" "', argument " "1"" of type '" "StrokeShaders::BezierCurveShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::BezierCurveShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *BezierCurveShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_InflateShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + StrokeShaders::InflateShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_InflateShader",&obj0,&obj1)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InflateShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InflateShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + result = (StrokeShaders::InflateShader *)new StrokeShaders::InflateShader(arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_InflateShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::InflateShader *arg1 = (StrokeShaders::InflateShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:InflateShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__InflateShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InflateShader_shade" "', argument " "1"" of type '" "StrokeShaders::InflateShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::InflateShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InflateShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InflateShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::InflateShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_InflateShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::InflateShader *arg1 = (StrokeShaders::InflateShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_InflateShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InflateShader" "', argument " "1"" of type '" "StrokeShaders::InflateShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::InflateShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *InflateShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_PolygonalizationShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::PolygonalizationShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_PolygonalizationShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PolygonalizationShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::PolygonalizationShader *)new StrokeShaders::PolygonalizationShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PolygonalizationShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::PolygonalizationShader *arg1 = (StrokeShaders::PolygonalizationShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PolygonalizationShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__PolygonalizationShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolygonalizationShader_shade" "', argument " "1"" of type '" "StrokeShaders::PolygonalizationShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::PolygonalizationShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolygonalizationShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolygonalizationShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::PolygonalizationShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PolygonalizationShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::PolygonalizationShader *arg1 = (StrokeShaders::PolygonalizationShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_PolygonalizationShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PolygonalizationShader" "', argument " "1"" of type '" "StrokeShaders::PolygonalizationShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::PolygonalizationShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PolygonalizationShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_GuidingLinesShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + StrokeShaders::GuidingLinesShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_GuidingLinesShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GuidingLinesShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + { + try { + result = (StrokeShaders::GuidingLinesShader *)new StrokeShaders::GuidingLinesShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_GuidingLinesShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::GuidingLinesShader *arg1 = (StrokeShaders::GuidingLinesShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:GuidingLinesShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__GuidingLinesShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GuidingLinesShader_shade" "', argument " "1"" of type '" "StrokeShaders::GuidingLinesShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::GuidingLinesShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GuidingLinesShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GuidingLinesShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::GuidingLinesShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_GuidingLinesShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::GuidingLinesShader *arg1 = (StrokeShaders::GuidingLinesShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_GuidingLinesShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GuidingLinesShader" "', argument " "1"" of type '" "StrokeShaders::GuidingLinesShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::GuidingLinesShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *GuidingLinesShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_TipRemoverShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + StrokeShaders::TipRemoverShader *result = 0 ; + double val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_TipRemoverShader",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TipRemoverShader" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + { + try { + result = (StrokeShaders::TipRemoverShader *)new StrokeShaders::TipRemoverShader(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_TipRemoverShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::TipRemoverShader *arg1 = (StrokeShaders::TipRemoverShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_TipRemoverShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TipRemoverShader" "', argument " "1"" of type '" "StrokeShaders::TipRemoverShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::TipRemoverShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TipRemoverShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::TipRemoverShader *arg1 = (StrokeShaders::TipRemoverShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:TipRemoverShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__TipRemoverShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TipRemoverShader_shade" "', argument " "1"" of type '" "StrokeShaders::TipRemoverShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::TipRemoverShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TipRemoverShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TipRemoverShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::TipRemoverShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *TipRemoverShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_streamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::streamShader *arg1 = (StrokeShaders::streamShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_streamShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__streamShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_streamShader" "', argument " "1"" of type '" "StrokeShaders::streamShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::streamShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_streamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::streamShader *arg1 = (StrokeShaders::streamShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:streamShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__streamShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "streamShader_getName" "', argument " "1"" of type '" "StrokeShaders::streamShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::streamShader * >(argp1); + { + try { + result = ((StrokeShaders::streamShader const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_streamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::streamShader *arg1 = (StrokeShaders::streamShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:streamShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__streamShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "streamShader_shade" "', argument " "1"" of type '" "StrokeShaders::streamShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::streamShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "streamShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "streamShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::streamShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_streamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::streamShader *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_streamShader")) SWIG_fail; + { + try { + result = (StrokeShaders::streamShader *)new StrokeShaders::streamShader(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__streamShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *streamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__streamShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_fstreamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + StrokeShaders::fstreamShader *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_fstreamShader",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fstreamShader" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + { + try { + result = (StrokeShaders::fstreamShader *)new StrokeShaders::fstreamShader((char const *)arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_fstreamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::fstreamShader *arg1 = (StrokeShaders::fstreamShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_fstreamShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_fstreamShader" "', argument " "1"" of type '" "StrokeShaders::fstreamShader *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::fstreamShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_fstreamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::fstreamShader *arg1 = (StrokeShaders::fstreamShader *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:fstreamShader_getName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__fstreamShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fstreamShader_getName" "', argument " "1"" of type '" "StrokeShaders::fstreamShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::fstreamShader * >(argp1); + { + try { + result = ((StrokeShaders::fstreamShader const *)arg1)->getName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_fstreamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + StrokeShaders::fstreamShader *arg1 = (StrokeShaders::fstreamShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:fstreamShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeShaders__fstreamShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fstreamShader_shade" "', argument " "1"" of type '" "StrokeShaders::fstreamShader const *""'"); + } + arg1 = reinterpret_cast< StrokeShaders::fstreamShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fstreamShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fstreamShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((StrokeShaders::fstreamShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *fstreamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_CalligraphicShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + Geometry::Vec2f *arg3 = 0 ; + bool arg4 ; + CalligraphicShader *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_CalligraphicShader",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CalligraphicShader" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CalligraphicShader" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CalligraphicShader" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CalligraphicShader" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); + } + arg3 = reinterpret_cast< Geometry::Vec2f * >(argp3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CalligraphicShader" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + { + try { + result = (CalligraphicShader *)new CalligraphicShader(arg1,arg2,(Geometry::Vec2f const &)*arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CalligraphicShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_CalligraphicShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CalligraphicShader *arg1 = (CalligraphicShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CalligraphicShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CalligraphicShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalligraphicShader" "', argument " "1"" of type '" "CalligraphicShader *""'"); + } + arg1 = reinterpret_cast< CalligraphicShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CalligraphicShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CalligraphicShader *arg1 = (CalligraphicShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CalligraphicShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CalligraphicShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalligraphicShader_shade" "', argument " "1"" of type '" "CalligraphicShader const *""'"); + } + arg1 = reinterpret_cast< CalligraphicShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalligraphicShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalligraphicShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((CalligraphicShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CalligraphicShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CalligraphicShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_SpatialNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + float arg1 ; + float arg2 ; + int arg3 ; + bool arg4 ; + bool arg5 ; + SpatialNoiseShader *result = 0 ; + float val1 ; + int ecode1 = 0 ; + float val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + bool val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_SpatialNoiseShader",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + ecode1 = SWIG_AsVal_float(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SpatialNoiseShader" "', argument " "1"" of type '" "float""'"); + } + arg1 = static_cast< float >(val1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SpatialNoiseShader" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpatialNoiseShader" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_bool(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SpatialNoiseShader" "', argument " "4"" of type '" "bool""'"); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_bool(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpatialNoiseShader" "', argument " "5"" of type '" "bool""'"); + } + arg5 = static_cast< bool >(val5); + { + try { + result = (SpatialNoiseShader *)new SpatialNoiseShader(arg1,arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpatialNoiseShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SpatialNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SpatialNoiseShader *arg1 = (SpatialNoiseShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SpatialNoiseShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SpatialNoiseShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialNoiseShader" "', argument " "1"" of type '" "SpatialNoiseShader *""'"); + } + arg1 = reinterpret_cast< SpatialNoiseShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SpatialNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SpatialNoiseShader *arg1 = (SpatialNoiseShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SpatialNoiseShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SpatialNoiseShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialNoiseShader_shade" "', argument " "1"" of type '" "SpatialNoiseShader const *""'"); + } + arg1 = reinterpret_cast< SpatialNoiseShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SpatialNoiseShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((SpatialNoiseShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SpatialNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_SpatialNoiseShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_SmoothingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + int arg1 ; + real arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + real arg6 ; + real arg7 ; + real arg8 ; + SmoothingShader *result = 0 ; + int val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:new_SmoothingShader",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SmoothingShader" "', argument " "1"" of type '" "int""'"); + } + arg1 = static_cast< int >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SmoothingShader" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SmoothingShader" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SmoothingShader" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SmoothingShader" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SmoothingShader" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SmoothingShader" "', argument " "7"" of type '" "real""'"); + } + arg7 = static_cast< real >(val7); + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SmoothingShader" "', argument " "8"" of type '" "real""'"); + } + arg8 = static_cast< real >(val8); + { + try { + result = (SmoothingShader *)new SmoothingShader(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SmoothingShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_SmoothingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SmoothingShader *arg1 = (SmoothingShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_SmoothingShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SmoothingShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SmoothingShader" "', argument " "1"" of type '" "SmoothingShader *""'"); + } + arg1 = reinterpret_cast< SmoothingShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SmoothingShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + SmoothingShader *arg1 = (SmoothingShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:SmoothingShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SmoothingShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SmoothingShader_shade" "', argument " "1"" of type '" "SmoothingShader const *""'"); + } + arg1 = reinterpret_cast< SmoothingShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SmoothingShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SmoothingShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((SmoothingShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *SmoothingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_SmoothingShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Smoother(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = 0 ; + Smoother *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Smoother",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Smoother" "', argument " "1"" of type '" "Stroke &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Smoother" "', argument " "1"" of type '" "Stroke &""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (Smoother *)new Smoother(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Smoother, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Smoother(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Smoother *arg1 = (Smoother *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Smoother",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Smoother, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Smoother" "', argument " "1"" of type '" "Smoother *""'"); + } + arg1 = reinterpret_cast< Smoother * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Smoother_smooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Smoother *arg1 = (Smoother *) 0 ; + int arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + real arg6 ; + real arg7 ; + real arg8 ; + real arg9 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + double val6 ; + int ecode6 = 0 ; + double val7 ; + int ecode7 = 0 ; + double val8 ; + int ecode8 = 0 ; + double val9 ; + int ecode9 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Smoother_smooth",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Smoother, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Smoother_smooth" "', argument " "1"" of type '" "Smoother *""'"); + } + arg1 = reinterpret_cast< Smoother * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Smoother_smooth" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Smoother_smooth" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Smoother_smooth" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Smoother_smooth" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + ecode6 = SWIG_AsVal_double(obj5, &val6); + if (!SWIG_IsOK(ecode6)) { + SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Smoother_smooth" "', argument " "6"" of type '" "real""'"); + } + arg6 = static_cast< real >(val6); + ecode7 = SWIG_AsVal_double(obj6, &val7); + if (!SWIG_IsOK(ecode7)) { + SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Smoother_smooth" "', argument " "7"" of type '" "real""'"); + } + arg7 = static_cast< real >(val7); + ecode8 = SWIG_AsVal_double(obj7, &val8); + if (!SWIG_IsOK(ecode8)) { + SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Smoother_smooth" "', argument " "8"" of type '" "real""'"); + } + arg8 = static_cast< real >(val8); + ecode9 = SWIG_AsVal_double(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Smoother_smooth" "', argument " "9"" of type '" "real""'"); + } + arg9 = static_cast< real >(val9); + { + try { + (arg1)->smooth(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Smoother_computeCurvature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Smoother *arg1 = (Smoother *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Smoother_computeCurvature",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Smoother, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Smoother_computeCurvature" "', argument " "1"" of type '" "Smoother *""'"); + } + arg1 = reinterpret_cast< Smoother * >(argp1); + { + try { + (arg1)->computeCurvature(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Smoother_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Smoother, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Omitter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stroke *arg1 = 0 ; + Omitter *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Omitter",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Omitter" "', argument " "1"" of type '" "Stroke &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Omitter" "', argument " "1"" of type '" "Stroke &""'"); + } + arg1 = reinterpret_cast< Stroke * >(argp1); + { + try { + result = (Omitter *)new Omitter(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Omitter, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Omitter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Omitter *arg1 = (Omitter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Omitter",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Omitter, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Omitter" "', argument " "1"" of type '" "Omitter *""'"); + } + arg1 = reinterpret_cast< Omitter * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Omitter_omit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Omitter *arg1 = (Omitter *) 0 ; + real arg2 ; + real arg3 ; + real arg4 ; + real arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Omitter_omit",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Omitter, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Omitter_omit" "', argument " "1"" of type '" "Omitter *""'"); + } + arg1 = reinterpret_cast< Omitter * >(argp1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Omitter_omit" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Omitter_omit" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Omitter_omit" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + ecode5 = SWIG_AsVal_double(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Omitter_omit" "', argument " "5"" of type '" "real""'"); + } + arg5 = static_cast< real >(val5); + { + try { + (arg1)->omit(arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Omitter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Omitter, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_OmissionShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + real arg1 ; + real arg2 ; + real arg3 ; + real arg4 ; + OmissionShader *result = 0 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:new_OmissionShader",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + ecode1 = SWIG_AsVal_double(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OmissionShader" "', argument " "1"" of type '" "real""'"); + } + arg1 = static_cast< real >(val1); + ecode2 = SWIG_AsVal_double(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OmissionShader" "', argument " "2"" of type '" "real""'"); + } + arg2 = static_cast< real >(val2); + ecode3 = SWIG_AsVal_double(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OmissionShader" "', argument " "3"" of type '" "real""'"); + } + arg3 = static_cast< real >(val3); + ecode4 = SWIG_AsVal_double(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OmissionShader" "', argument " "4"" of type '" "real""'"); + } + arg4 = static_cast< real >(val4); + { + try { + result = (OmissionShader *)new OmissionShader(arg1,arg2,arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OmissionShader, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_OmissionShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + OmissionShader *arg1 = (OmissionShader *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_OmissionShader",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OmissionShader, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OmissionShader" "', argument " "1"" of type '" "OmissionShader *""'"); + } + arg1 = reinterpret_cast< OmissionShader * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_OmissionShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + OmissionShader *arg1 = (OmissionShader *) 0 ; + Stroke *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:OmissionShader_shade",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OmissionShader, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OmissionShader_shade" "', argument " "1"" of type '" "OmissionShader const *""'"); + } + arg1 = reinterpret_cast< OmissionShader * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Stroke, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OmissionShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OmissionShader_shade" "', argument " "2"" of type '" "Stroke &""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + ((OmissionShader const *)arg1)->shade(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *OmissionShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_OmissionShader, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Operators_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_select",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_select" "', argument " "1"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_select" "', argument " "1"" of type '" "UnaryPredicate1D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + { + try { + Operators::select(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = 0 ; + UnaryPredicate1D *arg2 = 0 ; + UnaryFunction1D *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_chain",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_chain" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + } + arg3 = reinterpret_cast< UnaryFunction1D * >(argp3); + { + try { + Operators::chain(*arg1,*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = 0 ; + UnaryPredicate1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_chain",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_chain" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator &""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + { + try { + Operators::chain(*arg1,*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_chain__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_chain__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n Possible C/C++ prototypes are:\n chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D &)\n Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = 0 ; + UnaryPredicate1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_bidirectionalChain",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ChainingIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_bidirectionalChain" "', argument " "1"" of type '" "ChainingIterator &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_bidirectionalChain" "', argument " "1"" of type '" "ChainingIterator &""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_bidirectionalChain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_bidirectionalChain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + { + try { + Operators::bidirectionalChain(*arg1,*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ChainingIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_bidirectionalChain",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ChainingIterator, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_bidirectionalChain" "', argument " "1"" of type '" "ChainingIterator &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_bidirectionalChain" "', argument " "1"" of type '" "ChainingIterator &""'"); + } + arg1 = reinterpret_cast< ChainingIterator * >(argp1); + { + try { + Operators::bidirectionalChain(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ChainingIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_bidirectionalChain__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ChainingIterator, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_bidirectionalChain__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n Possible C/C++ prototypes are:\n bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n Operators::bidirectionalChain(ChainingIterator &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = 0 ; + UnaryPredicate0D *arg2 = 0 ; + float arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_sequentialSplit",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_sequentialSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate0D * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Operators_sequentialSplit" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + Operators::sequentialSplit(*arg1,*arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = 0 ; + UnaryPredicate0D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_sequentialSplit",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_sequentialSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate0D * >(argp2); + { + try { + Operators::sequentialSplit(*arg1,*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = 0 ; + float arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + float val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_sequentialSplit",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + ecode2 = SWIG_AsVal_float(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Operators_sequentialSplit" "', argument " "2"" of type '" "float""'"); + } + arg2 = static_cast< float >(val2); + { + try { + Operators::sequentialSplit(*arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate0D *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_sequentialSplit",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sequentialSplit" "', argument " "1"" of type '" "UnaryPredicate0D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate0D * >(argp1); + { + try { + Operators::sequentialSplit(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_sequentialSplit__SWIG_3(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_sequentialSplit__SWIG_1(self, args); + } + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Operators_sequentialSplit__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Operators_sequentialSplit__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n Possible C/C++ prototypes are:\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n sequentialSplit(UnaryPredicate0D &,float)\n Operators::sequentialSplit(UnaryPredicate0D &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + UnaryPredicate1D *arg2 = 0 ; + float arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + float val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + ecode3 = SWIG_AsVal_float(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Operators_recursiveSplit" "', argument " "3"" of type '" "float""'"); + } + arg3 = static_cast< float >(val3); + { + try { + Operators::recursiveSplit(*arg1,*arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + UnaryPredicate1D *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_recursiveSplit",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); + { + try { + Operators::recursiveSplit(*arg1,*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + UnaryPredicate0D *arg2 = 0 ; + UnaryPredicate1D *arg3 = 0 ; + float arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + float val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:Operators_recursiveSplit",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate0D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_recursiveSplit" "', argument " "3"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "3"" of type '" "UnaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< UnaryPredicate1D * >(argp3); + ecode4 = SWIG_AsVal_float(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Operators_recursiveSplit" "', argument " "4"" of type '" "float""'"); + } + arg4 = static_cast< float >(val4); + { + try { + Operators::recursiveSplit(*arg1,*arg2,*arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryFunction0D *arg1 = 0 ; + UnaryPredicate0D *arg2 = 0 ; + UnaryPredicate1D *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + } + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); + } + arg2 = reinterpret_cast< UnaryPredicate0D * >(argp2); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_recursiveSplit" "', argument " "3"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "3"" of type '" "UnaryPredicate1D &""'"); + } + arg3 = reinterpret_cast< UnaryPredicate1D * >(argp3); + { + try { + Operators::recursiveSplit(*arg1,*arg2,*arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_recursiveSplit__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Operators_recursiveSplit__SWIG_0(self, args); + } + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Operators_recursiveSplit__SWIG_3(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_UnaryPredicate0D, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryPredicate1D, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_float(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Operators_recursiveSplit__SWIG_2(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n Possible C/C++ prototypes are:\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &,float)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n Operators::recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_sort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + BinaryPredicate1D *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_sort",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_BinaryPredicate1D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_sort" "', argument " "1"" of type '" "BinaryPredicate1D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_sort" "', argument " "1"" of type '" "BinaryPredicate1D &""'"); + } + arg1 = reinterpret_cast< BinaryPredicate1D * >(argp1); + { + try { + Operators::sort(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + UnaryPredicate1D *arg1 = 0 ; + std::vector arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Operators_create",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryPredicate1D, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_create" "', argument " "1"" of type '" "UnaryPredicate1D &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_create" "', argument " "1"" of type '" "UnaryPredicate1D &""'"); + } + arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); + { + std::vector > *ptr = (std::vector > *)0; + int res = swig::asptr(obj1, &ptr); + if (!SWIG_IsOK(res) || !ptr) { + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector""'"); + } + arg2 = *ptr; + if (SWIG_IsNewObj(res)) delete ptr; + } + { + try { + Operators::create(*arg1,arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getViewEdgeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + ViewEdge *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_getViewEdgeFromIndex",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Operators_getViewEdgeFromIndex" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (ViewEdge *)Operators::getViewEdgeFromIndex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getChainFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Chain *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_getChainFromIndex",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Operators_getChainFromIndex" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Chain *)Operators::getChainFromIndex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Chain, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getStrokeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int arg1 ; + Stroke *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Operators_getStrokeFromIndex",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Operators_getStrokeFromIndex" "', argument " "1"" of type '" "unsigned int""'"); + } + arg1 = static_cast< unsigned int >(val1); + { + try { + result = (Stroke *)Operators::getStrokeFromIndex(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stroke, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getViewEdgesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Operators_getViewEdgesSize")) SWIG_fail; + { + try { + result = (unsigned int)Operators::getViewEdgesSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getChainsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Operators_getChainsSize")) SWIG_fail; + { + try { + result = (unsigned int)Operators::getChainsSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Operators_getStrokesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + unsigned int result; + + if (!PyArg_ParseTuple(args,(char *)":Operators_getStrokesSize")) SWIG_fail; + { + try { + result = (unsigned int)Operators::getStrokesSize(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Operators *arg1 = (Operators *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Operators",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Operators, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Operators" "', argument " "1"" of type '" "Operators *""'"); + } + arg1 = reinterpret_cast< Operators * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Operators_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Operators, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_ltstr___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ltstr *arg1 = (ltstr *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:ltstr___call__",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ltstr, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ltstr___call__" "', argument " "1"" of type '" "ltstr const *""'"); + } + arg1 = reinterpret_cast< ltstr * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ltstr___call__" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ltstr___call__" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + try { + result = (bool)((ltstr const *)arg1)->operator ()((char const *)arg2,(char const *)arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_ltstr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ltstr *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_ltstr")) SWIG_fail; + { + try { + result = (ltstr *)new ltstr(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ltstr, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_ltstr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ltstr *arg1 = (ltstr *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_ltstr",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ltstr, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ltstr" "', argument " "1"" of type '" "ltstr *""'"); + } + arg1 = reinterpret_cast< ltstr * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *ltstr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_ltstr, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Canvas_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":Canvas_getInstance")) SWIG_fail; + { + try { + result = (Canvas *)Canvas::getInstance(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Canvas, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Canvas(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Canvas",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Canvas" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_preDraw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_preDraw",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_preDraw" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->preDraw(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_Draw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_Draw",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_Draw" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->Draw(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_postDraw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_postDraw",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_postDraw" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->postDraw(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_Render(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + StrokeRenderer *arg2 = (StrokeRenderer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_Render",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_Render" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeRenderer, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_Render" "', argument " "2"" of type '" "StrokeRenderer const *""'"); + } + arg2 = reinterpret_cast< StrokeRenderer * >(argp2); + { + try { + (arg1)->Render((StrokeRenderer const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_RenderBasic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + StrokeRenderer *arg2 = (StrokeRenderer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_RenderBasic",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_RenderBasic" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeRenderer, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_RenderBasic" "', argument " "2"" of type '" "StrokeRenderer const *""'"); + } + arg2 = reinterpret_cast< StrokeRenderer * >(argp2); + { + try { + (arg1)->RenderBasic((StrokeRenderer const *)arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_RenderStroke(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + Stroke *arg2 = (Stroke *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_RenderStroke",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_RenderStroke" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Stroke, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_RenderStroke" "', argument " "2"" of type '" "Stroke *""'"); + } + arg2 = reinterpret_cast< Stroke * >(argp2); + { + try { + (arg1)->RenderStroke(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_init",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_init" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->init(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_Clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_Clear",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_Clear" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->Clear(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_Erase",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_Erase" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->Erase(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_readColorPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + RGBImage *arg6 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Canvas_readColorPixels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_readColorPixels" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_readColorPixels" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_readColorPixels" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Canvas_readColorPixels" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Canvas_readColorPixels" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_RGBImage, 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Canvas_readColorPixels" "', argument " "6"" of type '" "RGBImage &""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_readColorPixels" "', argument " "6"" of type '" "RGBImage &""'"); + } + arg6 = reinterpret_cast< RGBImage * >(argp6); + { + try { + ((Canvas const *)arg1)->readColorPixels(arg2,arg3,arg4,arg5,*arg6); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_readDepthPixels(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + int arg5 ; + GrayImage *arg6 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Canvas_readDepthPixels",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_readDepthPixels" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_readDepthPixels" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_readDepthPixels" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Canvas_readDepthPixels" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Canvas_readDepthPixels" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_GrayImage, 0 ); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Canvas_readDepthPixels" "', argument " "6"" of type '" "GrayImage &""'"); + } + if (!argp6) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_readDepthPixels" "', argument " "6"" of type '" "GrayImage &""'"); + } + arg6 = reinterpret_cast< GrayImage * >(argp6); + { + try { + ((Canvas const *)arg1)->readDepthPixels(arg2,arg3,arg4,arg5,*arg6); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_update",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_update" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->update(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_isEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_isEmpty",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_isEmpty" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (bool)((Canvas const *)arg1)->isEmpty(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_loadMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + unsigned int arg4 ; + float arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + float val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Canvas_loadMap",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_loadMap" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_loadMap" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Canvas_loadMap" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Canvas_loadMap" "', argument " "4"" of type '" "unsigned int""'"); + } + arg4 = static_cast< unsigned int >(val4); + ecode5 = SWIG_AsVal_float(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Canvas_loadMap" "', argument " "5"" of type '" "float""'"); + } + arg5 = static_cast< float >(val5); + { + try { + (arg1)->loadMap((char const *)arg2,(char const *)arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_loadMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + unsigned int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:Canvas_loadMap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_loadMap" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_loadMap" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Canvas_loadMap" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Canvas_loadMap" "', argument " "4"" of type '" "unsigned int""'"); + } + arg4 = static_cast< unsigned int >(val4); + { + try { + (arg1)->loadMap((char const *)arg2,(char const *)arg3,arg4); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_loadMap__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_loadMap",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_loadMap" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_loadMap" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Canvas_loadMap" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + { + try { + (arg1)->loadMap((char const *)arg2,(char const *)arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_loadMap__SWIG_2(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Canvas_loadMap__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_float(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Canvas_loadMap__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n Possible C/C++ prototypes are:\n loadMap(char const *,char const *,unsigned int,float)\n loadMap(char const *,char const *,unsigned int)\n loadMap(char const *,char const *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_readMapPixel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Canvas_readMapPixel",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_readMapPixel" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_readMapPixel" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_readMapPixel" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Canvas_readMapPixel" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Canvas_readMapPixel" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + { + try { + result = (float)(arg1)->readMapPixel((char const *)arg2,arg3,arg4,arg5); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_loadSteerableViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + SteerableViewMap *arg2 = (SteerableViewMap *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_loadSteerableViewMap",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_loadSteerableViewMap" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SteerableViewMap, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_loadSteerableViewMap" "', argument " "2"" of type '" "SteerableViewMap *""'"); + } + arg2 = reinterpret_cast< SteerableViewMap * >(argp2); + { + try { + (arg1)->loadSteerableViewMap(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_getSteerableViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + SteerableViewMap *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_getSteerableViewMap",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_getSteerableViewMap" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (SteerableViewMap *)(arg1)->getSteerableViewMap(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SteerableViewMap, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_selectedFEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_selectedFEdge" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (FEdge *)((Canvas const *)arg1)->selectedFEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_selectedFEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_selectedFEdge" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (FEdge *)(arg1)->selectedFEdge(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_selectedFEdge__SWIG_1(self, args); + } + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_selectedFEdge__SWIG_0(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n Possible C/C++ prototypes are:\n selectedFEdge()\n selectedFEdge()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_width",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_width" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (int)((Canvas const *)arg1)->width(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_height",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_height" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (int)((Canvas const *)arg1)->height(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_currentPaperTextureIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_currentPaperTextureIndex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_currentPaperTextureIndex" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (int)((Canvas const *)arg1)->currentPaperTextureIndex(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + SwigValueWrapper > > result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_scene3DBBox",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_scene3DBBox" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = ((Canvas const *)arg1)->scene3DBBox(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_renderer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + StrokeRenderer *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_renderer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_renderer" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (StrokeRenderer *)((Canvas const *)arg1)->renderer(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeRenderer, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_getCurrentStyleModule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + StyleModule *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_getCurrentStyleModule",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_getCurrentStyleModule" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (StyleModule *)(arg1)->getCurrentStyleModule(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StyleModule, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_getRecordFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_getRecordFlag",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_getRecordFlag" "', argument " "1"" of type '" "Canvas const *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + result = (bool)((Canvas const *)arg1)->getRecordFlag(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_SetSelectedFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + FEdge *arg2 = (FEdge *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_SetSelectedFEdge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetSelectedFEdge" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_SetSelectedFEdge" "', argument " "2"" of type '" "FEdge *""'"); + } + arg2 = reinterpret_cast< FEdge * >(argp2); + { + try { + (arg1)->SetSelectedFEdge(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_InsertStyleModule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + StyleModule *arg3 = (StyleModule *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_InsertStyleModule",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_InsertStyleModule" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_InsertStyleModule" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_StyleModule, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Canvas_InsertStyleModule" "', argument " "3"" of type '" "StyleModule *""'"); + } + arg3 = reinterpret_cast< StyleModule * >(argp3); + { + try { + (arg1)->InsertStyleModule(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_RemoveStyleModule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_RemoveStyleModule",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_RemoveStyleModule" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_RemoveStyleModule" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + { + try { + (arg1)->RemoveStyleModule(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_SwapStyleModules(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_SwapStyleModules",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SwapStyleModules" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_SwapStyleModules" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_SwapStyleModules" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + { + try { + (arg1)->SwapStyleModules(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_ReplaceStyleModule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + StyleModule *arg3 = (StyleModule *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_ReplaceStyleModule",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_ReplaceStyleModule" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_ReplaceStyleModule" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_StyleModule, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Canvas_ReplaceStyleModule" "', argument " "3"" of type '" "StyleModule *""'"); + } + arg3 = reinterpret_cast< StyleModule * >(argp3); + { + try { + (arg1)->ReplaceStyleModule(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_SetVisible",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetVisible" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_SetVisible" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_SetVisible" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->SetVisible(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_AddLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + StrokeLayer *arg2 = (StrokeLayer *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_AddLayer",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_AddLayer" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_StrokeLayer, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_AddLayer" "', argument " "2"" of type '" "StrokeLayer *""'"); + } + arg2 = reinterpret_cast< StrokeLayer * >(argp2); + { + try { + (arg1)->AddLayer(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_SetCurrentPaperTextureIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_SetCurrentPaperTextureIndex",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetCurrentPaperTextureIndex" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_SetCurrentPaperTextureIndex" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + try { + (arg1)->SetCurrentPaperTextureIndex(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_changePaperTexture",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_changePaperTexture" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_changePaperTexture" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->changePaperTexture(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_changePaperTexture",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_changePaperTexture" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->changePaperTexture(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_changePaperTexture__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Canvas_changePaperTexture__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n Possible C/C++ prototypes are:\n changePaperTexture(bool)\n changePaperTexture()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_togglePaperTexture(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_togglePaperTexture",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_togglePaperTexture" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->togglePaperTexture(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_resetModified__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_resetModified",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_resetModified" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_resetModified" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + { + try { + (arg1)->resetModified(arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_resetModified__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Canvas_resetModified",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_resetModified" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + { + try { + (arg1)->resetModified(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_resetModified__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_bool(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Canvas_resetModified__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n Possible C/C++ prototypes are:\n resetModified(bool)\n resetModified()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + std::vector > *arg2 = 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_causalStyleModules",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + } + arg2 = reinterpret_cast< std::vector > * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_causalStyleModules" "', argument " "3"" of type '" "unsigned int""'"); + } + arg3 = static_cast< unsigned int >(val3); + { + try { + (arg1)->causalStyleModules(*arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + std::vector > *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_causalStyleModules",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + } + arg2 = reinterpret_cast< std::vector > * >(argp2); + { + try { + (arg1)->causalStyleModules(*arg2); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Canvas_causalStyleModules__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Canvas, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_Canvas_causalStyleModules__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n Possible C/C++ prototypes are:\n causalStyleModules(std::vector > &,unsigned int)\n causalStyleModules(std::vector > &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Canvas_setModified(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Canvas *arg1 = (Canvas *) 0 ; + unsigned int arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_setModified",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_setModified" "', argument " "1"" of type '" "Canvas *""'"); + } + arg1 = reinterpret_cast< Canvas * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_setModified" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_setModified" "', argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + { + try { + (arg1)->setModified(arg2,arg3); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Canvas_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Canvas, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + SVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToSVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToSVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + ViewVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToViewVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToViewVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + TVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToTVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToCurvePoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + CurvePoint *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToCurvePoint",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToCurvePoint" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CurvePoint, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToStrokeVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + StrokeVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToStrokeVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToStrokeVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrokeVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + NonTVertex *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToNonTVertex",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToNonTVertex" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonTVertex, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + FEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToFEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToFEdge" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToViewEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToViewEdge" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToStroke(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Stroke *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToStroke",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToStroke" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stroke, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_castToChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + Chain *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:castToChain",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "castToChain" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Chain, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +static PyMethodDef SwigMethods[] = { + { (char *)"delete_PySwigIterator", _wrap_delete_PySwigIterator, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_value", _wrap_PySwigIterator_value, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_incr", _wrap_PySwigIterator_incr, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_decr", _wrap_PySwigIterator_decr, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_distance", _wrap_PySwigIterator_distance, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_equal", _wrap_PySwigIterator_equal, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_copy", _wrap_PySwigIterator_copy, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_next", _wrap_PySwigIterator_next, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_previous", _wrap_PySwigIterator_previous, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_advance", _wrap_PySwigIterator_advance, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___eq__", _wrap_PySwigIterator___eq__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___ne__", _wrap_PySwigIterator___ne__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___iadd__", _wrap_PySwigIterator___iadd__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___isub__", _wrap_PySwigIterator___isub__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___add__", _wrap_PySwigIterator___add__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator___sub__", _wrap_PySwigIterator___sub__, METH_VARARGS, NULL}, + { (char *)"PySwigIterator_swigregister", PySwigIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"vectorInt_iterator", _wrap_vectorInt_iterator, METH_VARARGS, NULL}, + { (char *)"vectorInt___nonzero__", _wrap_vectorInt___nonzero__, METH_VARARGS, NULL}, + { (char *)"vectorInt___len__", _wrap_vectorInt___len__, METH_VARARGS, NULL}, + { (char *)"vectorInt_pop", _wrap_vectorInt_pop, METH_VARARGS, NULL}, + { (char *)"vectorInt___getslice__", _wrap_vectorInt___getslice__, METH_VARARGS, NULL}, + { (char *)"vectorInt___setslice__", _wrap_vectorInt___setslice__, METH_VARARGS, NULL}, + { (char *)"vectorInt___delslice__", _wrap_vectorInt___delslice__, METH_VARARGS, NULL}, + { (char *)"vectorInt___delitem__", _wrap_vectorInt___delitem__, METH_VARARGS, NULL}, + { (char *)"vectorInt___getitem__", _wrap_vectorInt___getitem__, METH_VARARGS, NULL}, + { (char *)"vectorInt___setitem__", _wrap_vectorInt___setitem__, METH_VARARGS, NULL}, + { (char *)"vectorInt_append", _wrap_vectorInt_append, METH_VARARGS, NULL}, + { (char *)"vectorInt_empty", _wrap_vectorInt_empty, METH_VARARGS, NULL}, + { (char *)"vectorInt_size", _wrap_vectorInt_size, METH_VARARGS, NULL}, + { (char *)"vectorInt_clear", _wrap_vectorInt_clear, METH_VARARGS, NULL}, + { (char *)"vectorInt_swap", _wrap_vectorInt_swap, METH_VARARGS, NULL}, + { (char *)"vectorInt_get_allocator", _wrap_vectorInt_get_allocator, METH_VARARGS, NULL}, + { (char *)"vectorInt_begin", _wrap_vectorInt_begin, METH_VARARGS, NULL}, + { (char *)"vectorInt_end", _wrap_vectorInt_end, METH_VARARGS, NULL}, + { (char *)"vectorInt_rbegin", _wrap_vectorInt_rbegin, METH_VARARGS, NULL}, + { (char *)"vectorInt_rend", _wrap_vectorInt_rend, METH_VARARGS, NULL}, + { (char *)"vectorInt_pop_back", _wrap_vectorInt_pop_back, METH_VARARGS, NULL}, + { (char *)"vectorInt_erase", _wrap_vectorInt_erase, METH_VARARGS, NULL}, + { (char *)"new_vectorInt", _wrap_new_vectorInt, METH_VARARGS, NULL}, + { (char *)"vectorInt_push_back", _wrap_vectorInt_push_back, METH_VARARGS, NULL}, + { (char *)"vectorInt_front", _wrap_vectorInt_front, METH_VARARGS, NULL}, + { (char *)"vectorInt_back", _wrap_vectorInt_back, METH_VARARGS, NULL}, + { (char *)"vectorInt_assign", _wrap_vectorInt_assign, METH_VARARGS, NULL}, + { (char *)"vectorInt_resize", _wrap_vectorInt_resize, METH_VARARGS, NULL}, + { (char *)"vectorInt_insert", _wrap_vectorInt_insert, METH_VARARGS, NULL}, + { (char *)"vectorInt_reserve", _wrap_vectorInt_reserve, METH_VARARGS, NULL}, + { (char *)"vectorInt_capacity", _wrap_vectorInt_capacity, METH_VARARGS, NULL}, + { (char *)"delete_vectorInt", _wrap_delete_vectorInt, METH_VARARGS, NULL}, + { (char *)"vectorInt_swigregister", vectorInt_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Id", _wrap_new_Id, METH_VARARGS, NULL}, + { (char *)"Id_getFirst", _wrap_Id_getFirst, METH_VARARGS, NULL}, + { (char *)"Id_getSecond", _wrap_Id_getSecond, METH_VARARGS, NULL}, + { (char *)"Id_setFirst", _wrap_Id_setFirst, METH_VARARGS, NULL}, + { (char *)"Id_setSecond", _wrap_Id_setSecond, METH_VARARGS, NULL}, + { (char *)"Id___eq__", _wrap_Id___eq__, METH_VARARGS, NULL}, + { (char *)"Id___ne__", _wrap_Id___ne__, METH_VARARGS, NULL}, + { (char *)"Id___lt__", _wrap_Id___lt__, METH_VARARGS, NULL}, + { (char *)"delete_Id", _wrap_delete_Id, METH_VARARGS, NULL}, + { (char *)"Id_swigregister", Id_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_2u", _wrap_new_Vec_2u, METH_VARARGS, NULL}, + { (char *)"delete_Vec_2u", _wrap_delete_Vec_2u, METH_VARARGS, NULL}, + { (char *)"Vec_2u_dim", _wrap_Vec_2u_dim, METH_VARARGS, NULL}, + { (char *)"Vec_2u_norm", _wrap_Vec_2u_norm, METH_VARARGS, NULL}, + { (char *)"Vec_2u_squareNorm", _wrap_Vec_2u_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_2u_normalize", _wrap_Vec_2u_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_2u_normalizeSafe", _wrap_Vec_2u_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_2u___add__", _wrap_Vec_2u___add__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___sub__", _wrap_Vec_2u___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___div__", _wrap_Vec_2u___div__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___mul__", _wrap_Vec_2u___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___eq__", _wrap_Vec_2u___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___ne__", _wrap_Vec_2u___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___lt__", _wrap_Vec_2u___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_2u___gt__", _wrap_Vec_2u___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_2u_swigregister", Vec_2u_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_2i", _wrap_new_Vec_2i, METH_VARARGS, NULL}, + { (char *)"delete_Vec_2i", _wrap_delete_Vec_2i, METH_VARARGS, NULL}, + { (char *)"Vec_2i_dim", _wrap_Vec_2i_dim, METH_VARARGS, NULL}, + { (char *)"Vec_2i_norm", _wrap_Vec_2i_norm, METH_VARARGS, NULL}, + { (char *)"Vec_2i_squareNorm", _wrap_Vec_2i_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_2i_normalize", _wrap_Vec_2i_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_2i_normalizeSafe", _wrap_Vec_2i_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_2i___add__", _wrap_Vec_2i___add__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___sub__", _wrap_Vec_2i___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___div__", _wrap_Vec_2i___div__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___mul__", _wrap_Vec_2i___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___eq__", _wrap_Vec_2i___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___ne__", _wrap_Vec_2i___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___lt__", _wrap_Vec_2i___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_2i___gt__", _wrap_Vec_2i___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_2i_swigregister", Vec_2i_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_2d", _wrap_new_Vec_2d, METH_VARARGS, NULL}, + { (char *)"delete_Vec_2d", _wrap_delete_Vec_2d, METH_VARARGS, NULL}, + { (char *)"Vec_2d_dim", _wrap_Vec_2d_dim, METH_VARARGS, NULL}, + { (char *)"Vec_2d_norm", _wrap_Vec_2d_norm, METH_VARARGS, NULL}, + { (char *)"Vec_2d_squareNorm", _wrap_Vec_2d_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_2d_normalize", _wrap_Vec_2d_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_2d_normalizeSafe", _wrap_Vec_2d_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_2d___add__", _wrap_Vec_2d___add__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___sub__", _wrap_Vec_2d___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___div__", _wrap_Vec_2d___div__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___mul__", _wrap_Vec_2d___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___eq__", _wrap_Vec_2d___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___ne__", _wrap_Vec_2d___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___lt__", _wrap_Vec_2d___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_2d___gt__", _wrap_Vec_2d___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_2d_swigregister", Vec_2d_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_2f", _wrap_new_Vec_2f, METH_VARARGS, NULL}, + { (char *)"delete_Vec_2f", _wrap_delete_Vec_2f, METH_VARARGS, NULL}, + { (char *)"Vec_2f_dim", _wrap_Vec_2f_dim, METH_VARARGS, NULL}, + { (char *)"Vec_2f_norm", _wrap_Vec_2f_norm, METH_VARARGS, NULL}, + { (char *)"Vec_2f_squareNorm", _wrap_Vec_2f_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_2f_normalize", _wrap_Vec_2f_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_2f_normalizeSafe", _wrap_Vec_2f_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_2f___add__", _wrap_Vec_2f___add__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___sub__", _wrap_Vec_2f___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___div__", _wrap_Vec_2f___div__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___mul__", _wrap_Vec_2f___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___eq__", _wrap_Vec_2f___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___ne__", _wrap_Vec_2f___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___lt__", _wrap_Vec_2f___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_2f___gt__", _wrap_Vec_2f___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_2f_swigregister", Vec_2f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec2u", _wrap_new_Vec2u, METH_VARARGS, NULL}, + { (char *)"Vec2u_x", _wrap_Vec2u_x, METH_VARARGS, NULL}, + { (char *)"Vec2u_y", _wrap_Vec2u_y, METH_VARARGS, NULL}, + { (char *)"Vec2u_setX", _wrap_Vec2u_setX, METH_VARARGS, NULL}, + { (char *)"Vec2u_setY", _wrap_Vec2u_setY, METH_VARARGS, NULL}, + { (char *)"Vec2u___add__", _wrap_Vec2u___add__, METH_VARARGS, NULL}, + { (char *)"Vec2u___sub__", _wrap_Vec2u___sub__, METH_VARARGS, NULL}, + { (char *)"Vec2u___div__", _wrap_Vec2u___div__, METH_VARARGS, NULL}, + { (char *)"Vec2u___mul__", _wrap_Vec2u___mul__, METH_VARARGS, NULL}, + { (char *)"delete_Vec2u", _wrap_delete_Vec2u, METH_VARARGS, NULL}, + { (char *)"Vec2u_swigregister", Vec2u_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec2i", _wrap_new_Vec2i, METH_VARARGS, NULL}, + { (char *)"Vec2i_x", _wrap_Vec2i_x, METH_VARARGS, NULL}, + { (char *)"Vec2i_y", _wrap_Vec2i_y, METH_VARARGS, NULL}, + { (char *)"Vec2i_setX", _wrap_Vec2i_setX, METH_VARARGS, NULL}, + { (char *)"Vec2i_setY", _wrap_Vec2i_setY, METH_VARARGS, NULL}, + { (char *)"Vec2i___add__", _wrap_Vec2i___add__, METH_VARARGS, NULL}, + { (char *)"Vec2i___sub__", _wrap_Vec2i___sub__, METH_VARARGS, NULL}, + { (char *)"Vec2i___div__", _wrap_Vec2i___div__, METH_VARARGS, NULL}, + { (char *)"Vec2i___mul__", _wrap_Vec2i___mul__, METH_VARARGS, NULL}, + { (char *)"delete_Vec2i", _wrap_delete_Vec2i, METH_VARARGS, NULL}, + { (char *)"Vec2i_swigregister", Vec2i_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec2f", _wrap_new_Vec2f, METH_VARARGS, NULL}, + { (char *)"Vec2f_x", _wrap_Vec2f_x, METH_VARARGS, NULL}, + { (char *)"Vec2f_y", _wrap_Vec2f_y, METH_VARARGS, NULL}, + { (char *)"Vec2f_setX", _wrap_Vec2f_setX, METH_VARARGS, NULL}, + { (char *)"Vec2f_setY", _wrap_Vec2f_setY, METH_VARARGS, NULL}, + { (char *)"Vec2f___add__", _wrap_Vec2f___add__, METH_VARARGS, NULL}, + { (char *)"Vec2f___sub__", _wrap_Vec2f___sub__, METH_VARARGS, NULL}, + { (char *)"Vec2f___div__", _wrap_Vec2f___div__, METH_VARARGS, NULL}, + { (char *)"Vec2f___mul__", _wrap_Vec2f___mul__, METH_VARARGS, NULL}, + { (char *)"delete_Vec2f", _wrap_delete_Vec2f, METH_VARARGS, NULL}, + { (char *)"Vec2f_swigregister", Vec2f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec2d", _wrap_new_Vec2d, METH_VARARGS, NULL}, + { (char *)"Vec2d_x", _wrap_Vec2d_x, METH_VARARGS, NULL}, + { (char *)"Vec2d_y", _wrap_Vec2d_y, METH_VARARGS, NULL}, + { (char *)"Vec2d_setX", _wrap_Vec2d_setX, METH_VARARGS, NULL}, + { (char *)"Vec2d_setY", _wrap_Vec2d_setY, METH_VARARGS, NULL}, + { (char *)"Vec2d___add__", _wrap_Vec2d___add__, METH_VARARGS, NULL}, + { (char *)"Vec2d___sub__", _wrap_Vec2d___sub__, METH_VARARGS, NULL}, + { (char *)"Vec2d___div__", _wrap_Vec2d___div__, METH_VARARGS, NULL}, + { (char *)"Vec2d___mul__", _wrap_Vec2d___mul__, METH_VARARGS, NULL}, + { (char *)"delete_Vec2d", _wrap_delete_Vec2d, METH_VARARGS, NULL}, + { (char *)"Vec2d_swigregister", Vec2d_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_3u", _wrap_new_Vec_3u, METH_VARARGS, NULL}, + { (char *)"delete_Vec_3u", _wrap_delete_Vec_3u, METH_VARARGS, NULL}, + { (char *)"Vec_3u_dim", _wrap_Vec_3u_dim, METH_VARARGS, NULL}, + { (char *)"Vec_3u_norm", _wrap_Vec_3u_norm, METH_VARARGS, NULL}, + { (char *)"Vec_3u_squareNorm", _wrap_Vec_3u_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_3u_normalize", _wrap_Vec_3u_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_3u_normalizeSafe", _wrap_Vec_3u_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_3u___add__", _wrap_Vec_3u___add__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___sub__", _wrap_Vec_3u___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___div__", _wrap_Vec_3u___div__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___mul__", _wrap_Vec_3u___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___eq__", _wrap_Vec_3u___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___ne__", _wrap_Vec_3u___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___lt__", _wrap_Vec_3u___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_3u___gt__", _wrap_Vec_3u___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_3u_swigregister", Vec_3u_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_3i", _wrap_new_Vec_3i, METH_VARARGS, NULL}, + { (char *)"delete_Vec_3i", _wrap_delete_Vec_3i, METH_VARARGS, NULL}, + { (char *)"Vec_3i_dim", _wrap_Vec_3i_dim, METH_VARARGS, NULL}, + { (char *)"Vec_3i_norm", _wrap_Vec_3i_norm, METH_VARARGS, NULL}, + { (char *)"Vec_3i_squareNorm", _wrap_Vec_3i_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_3i_normalize", _wrap_Vec_3i_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_3i_normalizeSafe", _wrap_Vec_3i_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_3i___add__", _wrap_Vec_3i___add__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___sub__", _wrap_Vec_3i___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___div__", _wrap_Vec_3i___div__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___mul__", _wrap_Vec_3i___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___eq__", _wrap_Vec_3i___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___ne__", _wrap_Vec_3i___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___lt__", _wrap_Vec_3i___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_3i___gt__", _wrap_Vec_3i___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_3i_swigregister", Vec_3i_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_3d", _wrap_new_Vec_3d, METH_VARARGS, NULL}, + { (char *)"delete_Vec_3d", _wrap_delete_Vec_3d, METH_VARARGS, NULL}, + { (char *)"Vec_3d_dim", _wrap_Vec_3d_dim, METH_VARARGS, NULL}, + { (char *)"Vec_3d_norm", _wrap_Vec_3d_norm, METH_VARARGS, NULL}, + { (char *)"Vec_3d_squareNorm", _wrap_Vec_3d_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_3d_normalize", _wrap_Vec_3d_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_3d_normalizeSafe", _wrap_Vec_3d_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_3d___add__", _wrap_Vec_3d___add__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___sub__", _wrap_Vec_3d___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___div__", _wrap_Vec_3d___div__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___mul__", _wrap_Vec_3d___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___eq__", _wrap_Vec_3d___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___ne__", _wrap_Vec_3d___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___lt__", _wrap_Vec_3d___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_3d___gt__", _wrap_Vec_3d___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_3d_swigregister", Vec_3d_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec_3f", _wrap_new_Vec_3f, METH_VARARGS, NULL}, + { (char *)"delete_Vec_3f", _wrap_delete_Vec_3f, METH_VARARGS, NULL}, + { (char *)"Vec_3f_dim", _wrap_Vec_3f_dim, METH_VARARGS, NULL}, + { (char *)"Vec_3f_norm", _wrap_Vec_3f_norm, METH_VARARGS, NULL}, + { (char *)"Vec_3f_squareNorm", _wrap_Vec_3f_squareNorm, METH_VARARGS, NULL}, + { (char *)"Vec_3f_normalize", _wrap_Vec_3f_normalize, METH_VARARGS, NULL}, + { (char *)"Vec_3f_normalizeSafe", _wrap_Vec_3f_normalizeSafe, METH_VARARGS, NULL}, + { (char *)"Vec_3f___add__", _wrap_Vec_3f___add__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___sub__", _wrap_Vec_3f___sub__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___div__", _wrap_Vec_3f___div__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___mul__", _wrap_Vec_3f___mul__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___eq__", _wrap_Vec_3f___eq__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___ne__", _wrap_Vec_3f___ne__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___lt__", _wrap_Vec_3f___lt__, METH_VARARGS, NULL}, + { (char *)"Vec_3f___gt__", _wrap_Vec_3f___gt__, METH_VARARGS, NULL}, + { (char *)"Vec_3f_swigregister", Vec_3f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec3u", _wrap_new_Vec3u, METH_VARARGS, NULL}, + { (char *)"Vec3u_x", _wrap_Vec3u_x, METH_VARARGS, NULL}, + { (char *)"Vec3u_y", _wrap_Vec3u_y, METH_VARARGS, NULL}, + { (char *)"Vec3u_z", _wrap_Vec3u_z, METH_VARARGS, NULL}, + { (char *)"Vec3u_setX", _wrap_Vec3u_setX, METH_VARARGS, NULL}, + { (char *)"Vec3u_setY", _wrap_Vec3u_setY, METH_VARARGS, NULL}, + { (char *)"Vec3u_setZ", _wrap_Vec3u_setZ, METH_VARARGS, NULL}, + { (char *)"Vec3u___add__", _wrap_Vec3u___add__, METH_VARARGS, NULL}, + { (char *)"Vec3u___sub__", _wrap_Vec3u___sub__, METH_VARARGS, NULL}, + { (char *)"Vec3u___div__", _wrap_Vec3u___div__, METH_VARARGS, NULL}, + { (char *)"Vec3u___mul__", _wrap_Vec3u___mul__, METH_VARARGS, NULL}, + { (char *)"Vec3u___xor__", _wrap_Vec3u___xor__, METH_VARARGS, NULL}, + { (char *)"delete_Vec3u", _wrap_delete_Vec3u, METH_VARARGS, NULL}, + { (char *)"Vec3u_swigregister", Vec3u_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec3i", _wrap_new_Vec3i, METH_VARARGS, NULL}, + { (char *)"Vec3i_x", _wrap_Vec3i_x, METH_VARARGS, NULL}, + { (char *)"Vec3i_y", _wrap_Vec3i_y, METH_VARARGS, NULL}, + { (char *)"Vec3i_z", _wrap_Vec3i_z, METH_VARARGS, NULL}, + { (char *)"Vec3i_setX", _wrap_Vec3i_setX, METH_VARARGS, NULL}, + { (char *)"Vec3i_setY", _wrap_Vec3i_setY, METH_VARARGS, NULL}, + { (char *)"Vec3i_setZ", _wrap_Vec3i_setZ, METH_VARARGS, NULL}, + { (char *)"Vec3i___add__", _wrap_Vec3i___add__, METH_VARARGS, NULL}, + { (char *)"Vec3i___sub__", _wrap_Vec3i___sub__, METH_VARARGS, NULL}, + { (char *)"Vec3i___div__", _wrap_Vec3i___div__, METH_VARARGS, NULL}, + { (char *)"Vec3i___mul__", _wrap_Vec3i___mul__, METH_VARARGS, NULL}, + { (char *)"Vec3i___xor__", _wrap_Vec3i___xor__, METH_VARARGS, NULL}, + { (char *)"delete_Vec3i", _wrap_delete_Vec3i, METH_VARARGS, NULL}, + { (char *)"Vec3i_swigregister", Vec3i_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec3f", _wrap_new_Vec3f, METH_VARARGS, NULL}, + { (char *)"Vec3f_x", _wrap_Vec3f_x, METH_VARARGS, NULL}, + { (char *)"Vec3f_y", _wrap_Vec3f_y, METH_VARARGS, NULL}, + { (char *)"Vec3f_z", _wrap_Vec3f_z, METH_VARARGS, NULL}, + { (char *)"Vec3f_setX", _wrap_Vec3f_setX, METH_VARARGS, NULL}, + { (char *)"Vec3f_setY", _wrap_Vec3f_setY, METH_VARARGS, NULL}, + { (char *)"Vec3f_setZ", _wrap_Vec3f_setZ, METH_VARARGS, NULL}, + { (char *)"Vec3f___add__", _wrap_Vec3f___add__, METH_VARARGS, NULL}, + { (char *)"Vec3f___sub__", _wrap_Vec3f___sub__, METH_VARARGS, NULL}, + { (char *)"Vec3f___div__", _wrap_Vec3f___div__, METH_VARARGS, NULL}, + { (char *)"Vec3f___mul__", _wrap_Vec3f___mul__, METH_VARARGS, NULL}, + { (char *)"Vec3f___xor__", _wrap_Vec3f___xor__, METH_VARARGS, NULL}, + { (char *)"delete_Vec3f", _wrap_delete_Vec3f, METH_VARARGS, NULL}, + { (char *)"Vec3f_swigregister", Vec3f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Vec3d", _wrap_new_Vec3d, METH_VARARGS, NULL}, + { (char *)"Vec3d_x", _wrap_Vec3d_x, METH_VARARGS, NULL}, + { (char *)"Vec3d_y", _wrap_Vec3d_y, METH_VARARGS, NULL}, + { (char *)"Vec3d_z", _wrap_Vec3d_z, METH_VARARGS, NULL}, + { (char *)"Vec3d_setX", _wrap_Vec3d_setX, METH_VARARGS, NULL}, + { (char *)"Vec3d_setY", _wrap_Vec3d_setY, METH_VARARGS, NULL}, + { (char *)"Vec3d_setZ", _wrap_Vec3d_setZ, METH_VARARGS, NULL}, + { (char *)"Vec3d___add__", _wrap_Vec3d___add__, METH_VARARGS, NULL}, + { (char *)"Vec3d___sub__", _wrap_Vec3d___sub__, METH_VARARGS, NULL}, + { (char *)"Vec3d___div__", _wrap_Vec3d___div__, METH_VARARGS, NULL}, + { (char *)"Vec3d___mul__", _wrap_Vec3d___mul__, METH_VARARGS, NULL}, + { (char *)"Vec3d___xor__", _wrap_Vec3d___xor__, METH_VARARGS, NULL}, + { (char *)"delete_Vec3d", _wrap_delete_Vec3d, METH_VARARGS, NULL}, + { (char *)"Vec3d_swigregister", Vec3d_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Noise", _wrap_new_Noise, METH_VARARGS, NULL}, + { (char *)"delete_Noise", _wrap_delete_Noise, METH_VARARGS, NULL}, + { (char *)"Noise_turbulence1", _wrap_Noise_turbulence1, METH_VARARGS, NULL}, + { (char *)"Noise_turbulence2", _wrap_Noise_turbulence2, METH_VARARGS, NULL}, + { (char *)"Noise_turbulence3", _wrap_Noise_turbulence3, METH_VARARGS, NULL}, + { (char *)"Noise_smoothNoise1", _wrap_Noise_smoothNoise1, METH_VARARGS, NULL}, + { (char *)"Noise_smoothNoise2", _wrap_Noise_smoothNoise2, METH_VARARGS, NULL}, + { (char *)"Noise_smoothNoise3", _wrap_Noise_smoothNoise3, METH_VARARGS, NULL}, + { (char *)"Noise_swigregister", Noise_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Material", _wrap_new_Material, METH_VARARGS, NULL}, + { (char *)"delete_Material", _wrap_delete_Material, METH_VARARGS, NULL}, + { (char *)"Material_diffuse", _wrap_Material_diffuse, METH_VARARGS, NULL}, + { (char *)"Material_diffuseR", _wrap_Material_diffuseR, METH_VARARGS, NULL}, + { (char *)"Material_diffuseG", _wrap_Material_diffuseG, METH_VARARGS, NULL}, + { (char *)"Material_diffuseB", _wrap_Material_diffuseB, METH_VARARGS, NULL}, + { (char *)"Material_diffuseA", _wrap_Material_diffuseA, METH_VARARGS, NULL}, + { (char *)"Material_specular", _wrap_Material_specular, METH_VARARGS, NULL}, + { (char *)"Material_specularR", _wrap_Material_specularR, METH_VARARGS, NULL}, + { (char *)"Material_specularG", _wrap_Material_specularG, METH_VARARGS, NULL}, + { (char *)"Material_specularB", _wrap_Material_specularB, METH_VARARGS, NULL}, + { (char *)"Material_specularA", _wrap_Material_specularA, METH_VARARGS, NULL}, + { (char *)"Material_ambient", _wrap_Material_ambient, METH_VARARGS, NULL}, + { (char *)"Material_ambientR", _wrap_Material_ambientR, METH_VARARGS, NULL}, + { (char *)"Material_ambientG", _wrap_Material_ambientG, METH_VARARGS, NULL}, + { (char *)"Material_ambientB", _wrap_Material_ambientB, METH_VARARGS, NULL}, + { (char *)"Material_ambientA", _wrap_Material_ambientA, METH_VARARGS, NULL}, + { (char *)"Material_emission", _wrap_Material_emission, METH_VARARGS, NULL}, + { (char *)"Material_emissionR", _wrap_Material_emissionR, METH_VARARGS, NULL}, + { (char *)"Material_emissionG", _wrap_Material_emissionG, METH_VARARGS, NULL}, + { (char *)"Material_emissionB", _wrap_Material_emissionB, METH_VARARGS, NULL}, + { (char *)"Material_emissionA", _wrap_Material_emissionA, METH_VARARGS, NULL}, + { (char *)"Material_shininess", _wrap_Material_shininess, METH_VARARGS, NULL}, + { (char *)"Material_SetDiffuse", _wrap_Material_SetDiffuse, METH_VARARGS, NULL}, + { (char *)"Material_SetSpecular", _wrap_Material_SetSpecular, METH_VARARGS, NULL}, + { (char *)"Material_SetAmbient", _wrap_Material_SetAmbient, METH_VARARGS, NULL}, + { (char *)"Material_SetEmission", _wrap_Material_SetEmission, METH_VARARGS, NULL}, + { (char *)"Material_SetShininess", _wrap_Material_SetShininess, METH_VARARGS, NULL}, + { (char *)"Material___ne__", _wrap_Material___ne__, METH_VARARGS, NULL}, + { (char *)"Material___eq__", _wrap_Material___eq__, METH_VARARGS, NULL}, + { (char *)"Material_swigregister", Material_swigregister, METH_VARARGS, NULL}, + { (char *)"Interface0D_getExactTypeName", _wrap_Interface0D_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"Interface0D_getX", _wrap_Interface0D_getX, METH_VARARGS, NULL}, + { (char *)"Interface0D_getY", _wrap_Interface0D_getY, METH_VARARGS, NULL}, + { (char *)"Interface0D_getZ", _wrap_Interface0D_getZ, METH_VARARGS, NULL}, + { (char *)"Interface0D_getPoint3D", _wrap_Interface0D_getPoint3D, METH_VARARGS, NULL}, + { (char *)"Interface0D_getProjectedX", _wrap_Interface0D_getProjectedX, METH_VARARGS, NULL}, + { (char *)"Interface0D_getProjectedY", _wrap_Interface0D_getProjectedY, METH_VARARGS, NULL}, + { (char *)"Interface0D_getProjectedZ", _wrap_Interface0D_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"Interface0D_getPoint2D", _wrap_Interface0D_getPoint2D, METH_VARARGS, NULL}, + { (char *)"Interface0D_getFEdge", _wrap_Interface0D_getFEdge, METH_VARARGS, NULL}, + { (char *)"Interface0D_getId", _wrap_Interface0D_getId, METH_VARARGS, NULL}, + { (char *)"Interface0D_getNature", _wrap_Interface0D_getNature, METH_VARARGS, NULL}, + { (char *)"Interface0D_castToSVertex", _wrap_Interface0D_castToSVertex, METH_VARARGS, NULL}, + { (char *)"Interface0D_castToViewVertex", _wrap_Interface0D_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"Interface0D_castToNonTVertex", _wrap_Interface0D_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"Interface0D_castToTVertex", _wrap_Interface0D_castToTVertex, METH_VARARGS, NULL}, + { (char *)"new_Interface0D", _wrap_new_Interface0D, METH_VARARGS, NULL}, + { (char *)"delete_Interface0D", _wrap_delete_Interface0D, METH_VARARGS, NULL}, + { (char *)"Interface0D_swigregister", Interface0D_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_Interface0DIteratorNested", _wrap_delete_Interface0DIteratorNested, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getExactTypeName", _wrap_Interface0DIteratorNested_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getObject", _wrap_Interface0DIteratorNested_getObject, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested___deref__", _wrap_Interface0DIteratorNested___deref__, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_increment", _wrap_Interface0DIteratorNested_increment, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_decrement", _wrap_Interface0DIteratorNested_decrement, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_isBegin", _wrap_Interface0DIteratorNested_isBegin, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_isEnd", _wrap_Interface0DIteratorNested_isEnd, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested___eq__", _wrap_Interface0DIteratorNested___eq__, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested___ne__", _wrap_Interface0DIteratorNested___ne__, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_t", _wrap_Interface0DIteratorNested_t, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_u", _wrap_Interface0DIteratorNested_u, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_copy", _wrap_Interface0DIteratorNested_copy, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getX", _wrap_Interface0DIteratorNested_getX, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getY", _wrap_Interface0DIteratorNested_getY, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getZ", _wrap_Interface0DIteratorNested_getZ, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getPoint3D", _wrap_Interface0DIteratorNested_getPoint3D, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getProjectedX", _wrap_Interface0DIteratorNested_getProjectedX, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getProjectedY", _wrap_Interface0DIteratorNested_getProjectedY, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getProjectedZ", _wrap_Interface0DIteratorNested_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getPoint2D", _wrap_Interface0DIteratorNested_getPoint2D, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getFEdge", _wrap_Interface0DIteratorNested_getFEdge, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getId", _wrap_Interface0DIteratorNested_getId, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_getNature", _wrap_Interface0DIteratorNested_getNature, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_castToSVertex", _wrap_Interface0DIteratorNested_castToSVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_castToViewVertex", _wrap_Interface0DIteratorNested_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_castToNonTVertex", _wrap_Interface0DIteratorNested_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_castToTVertex", _wrap_Interface0DIteratorNested_castToTVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIteratorNested_swigregister", Interface0DIteratorNested_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Interface0DIterator", _wrap_new_Interface0DIterator, METH_VARARGS, NULL}, + { (char *)"delete_Interface0DIterator", _wrap_delete_Interface0DIterator, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getExactTypeName", _wrap_Interface0DIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getObject", _wrap_Interface0DIterator_getObject, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator___deref__", _wrap_Interface0DIterator___deref__, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_increment", _wrap_Interface0DIterator_increment, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_decrement", _wrap_Interface0DIterator_decrement, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_isBegin", _wrap_Interface0DIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_isEnd", _wrap_Interface0DIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator___eq__", _wrap_Interface0DIterator___eq__, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator___ne__", _wrap_Interface0DIterator___ne__, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_t", _wrap_Interface0DIterator_t, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_u", _wrap_Interface0DIterator_u, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getX", _wrap_Interface0DIterator_getX, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getY", _wrap_Interface0DIterator_getY, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getZ", _wrap_Interface0DIterator_getZ, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getPoint3D", _wrap_Interface0DIterator_getPoint3D, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getProjectedX", _wrap_Interface0DIterator_getProjectedX, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getProjectedY", _wrap_Interface0DIterator_getProjectedY, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getProjectedZ", _wrap_Interface0DIterator_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getPoint2D", _wrap_Interface0DIterator_getPoint2D, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getFEdge", _wrap_Interface0DIterator_getFEdge, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getId", _wrap_Interface0DIterator_getId, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_getNature", _wrap_Interface0DIterator_getNature, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_castToSVertex", _wrap_Interface0DIterator_castToSVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_castToViewVertex", _wrap_Interface0DIterator_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_castToNonTVertex", _wrap_Interface0DIterator_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_castToTVertex", _wrap_Interface0DIterator_castToTVertex, METH_VARARGS, NULL}, + { (char *)"Interface0DIterator_swigregister", Interface0DIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"Interface1D_getExactTypeName", _wrap_Interface1D_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"Interface1D_verticesBegin", _wrap_Interface1D_verticesBegin, METH_VARARGS, NULL}, + { (char *)"Interface1D_verticesEnd", _wrap_Interface1D_verticesEnd, METH_VARARGS, NULL}, + { (char *)"Interface1D_pointsBegin", _wrap_Interface1D_pointsBegin, METH_VARARGS, NULL}, + { (char *)"Interface1D_pointsEnd", _wrap_Interface1D_pointsEnd, METH_VARARGS, NULL}, + { (char *)"Interface1D_getLength2D", _wrap_Interface1D_getLength2D, METH_VARARGS, NULL}, + { (char *)"Interface1D_getId", _wrap_Interface1D_getId, METH_VARARGS, NULL}, + { (char *)"Interface1D_getNature", _wrap_Interface1D_getNature, METH_VARARGS, NULL}, + { (char *)"Interface1D_getTimeStamp", _wrap_Interface1D_getTimeStamp, METH_VARARGS, NULL}, + { (char *)"Interface1D_setTimeStamp", _wrap_Interface1D_setTimeStamp, METH_VARARGS, NULL}, + { (char *)"delete_Interface1D", _wrap_delete_Interface1D, METH_VARARGS, NULL}, + { (char *)"Interface1D_swigregister", Interface1D_swigregister, METH_VARARGS, NULL}, + { (char *)"integrateUnsigned", _wrap_integrateUnsigned, METH_VARARGS, NULL}, + { (char *)"integrateFloat", _wrap_integrateFloat, METH_VARARGS, NULL}, + { (char *)"integrateDouble", _wrap_integrateDouble, METH_VARARGS, NULL}, + { (char *)"SVertex_getExactTypeName", _wrap_SVertex_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"SVertex_getX", _wrap_SVertex_getX, METH_VARARGS, NULL}, + { (char *)"SVertex_getY", _wrap_SVertex_getY, METH_VARARGS, NULL}, + { (char *)"SVertex_getZ", _wrap_SVertex_getZ, METH_VARARGS, NULL}, + { (char *)"SVertex_getPoint3D", _wrap_SVertex_getPoint3D, METH_VARARGS, NULL}, + { (char *)"SVertex_getProjectedX", _wrap_SVertex_getProjectedX, METH_VARARGS, NULL}, + { (char *)"SVertex_getProjectedY", _wrap_SVertex_getProjectedY, METH_VARARGS, NULL}, + { (char *)"SVertex_getProjectedZ", _wrap_SVertex_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"SVertex_getPoint2D", _wrap_SVertex_getPoint2D, METH_VARARGS, NULL}, + { (char *)"SVertex_getFEdge", _wrap_SVertex_getFEdge, METH_VARARGS, NULL}, + { (char *)"SVertex_getId", _wrap_SVertex_getId, METH_VARARGS, NULL}, + { (char *)"SVertex_getNature", _wrap_SVertex_getNature, METH_VARARGS, NULL}, + { (char *)"SVertex_castToSVertex", _wrap_SVertex_castToSVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_castToViewVertex", _wrap_SVertex_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_castToNonTVertex", _wrap_SVertex_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_castToTVertex", _wrap_SVertex_castToTVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_userdata_set", _wrap_SVertex_userdata_set, METH_VARARGS, NULL}, + { (char *)"SVertex_userdata_get", _wrap_SVertex_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_SVertex", _wrap_new_SVertex, METH_VARARGS, NULL}, + { (char *)"delete_SVertex", _wrap_delete_SVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_dupplicate", _wrap_SVertex_dupplicate, METH_VARARGS, NULL}, + { (char *)"SVertex___eq__", _wrap_SVertex___eq__, METH_VARARGS, NULL}, + { (char *)"SVertex_point3D", _wrap_SVertex_point3D, METH_VARARGS, NULL}, + { (char *)"SVertex_point2D", _wrap_SVertex_point2D, METH_VARARGS, NULL}, + { (char *)"SVertex_normals", _wrap_SVertex_normals, METH_VARARGS, NULL}, + { (char *)"SVertex_normalsSize", _wrap_SVertex_normalsSize, METH_VARARGS, NULL}, + { (char *)"SVertex_fedges", _wrap_SVertex_fedges, METH_VARARGS, NULL}, + { (char *)"SVertex_fedges_begin", _wrap_SVertex_fedges_begin, METH_VARARGS, NULL}, + { (char *)"SVertex_fedges_end", _wrap_SVertex_fedges_end, METH_VARARGS, NULL}, + { (char *)"SVertex_z", _wrap_SVertex_z, METH_VARARGS, NULL}, + { (char *)"SVertex_viewvertex", _wrap_SVertex_viewvertex, METH_VARARGS, NULL}, + { (char *)"SVertex_SetPoint3D", _wrap_SVertex_SetPoint3D, METH_VARARGS, NULL}, + { (char *)"SVertex_SetPoint2D", _wrap_SVertex_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"SVertex_AddNormal", _wrap_SVertex_AddNormal, METH_VARARGS, NULL}, + { (char *)"SVertex_setCurvatureInfo", _wrap_SVertex_setCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"SVertex_getCurvatureInfo", _wrap_SVertex_getCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"SVertex_setCurvatureFredo", _wrap_SVertex_setCurvatureFredo, METH_VARARGS, NULL}, + { (char *)"SVertex_setDirectionFredo", _wrap_SVertex_setDirectionFredo, METH_VARARGS, NULL}, + { (char *)"SVertex_curvatureFredo", _wrap_SVertex_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"SVertex_directionFredo", _wrap_SVertex_directionFredo, METH_VARARGS, NULL}, + { (char *)"SVertex_SetId", _wrap_SVertex_SetId, METH_VARARGS, NULL}, + { (char *)"SVertex_SetFEdges", _wrap_SVertex_SetFEdges, METH_VARARGS, NULL}, + { (char *)"SVertex_SetShape", _wrap_SVertex_SetShape, METH_VARARGS, NULL}, + { (char *)"SVertex_SetViewVertex", _wrap_SVertex_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_AddFEdge", _wrap_SVertex_AddFEdge, METH_VARARGS, NULL}, + { (char *)"SVertex_Replace", _wrap_SVertex_Replace, METH_VARARGS, NULL}, + { (char *)"SVertex_fedge", _wrap_SVertex_fedge, METH_VARARGS, NULL}, + { (char *)"SVertex_point2d", _wrap_SVertex_point2d, METH_VARARGS, NULL}, + { (char *)"SVertex_point3d", _wrap_SVertex_point3d, METH_VARARGS, NULL}, + { (char *)"SVertex_normal", _wrap_SVertex_normal, METH_VARARGS, NULL}, + { (char *)"SVertex_shape_id", _wrap_SVertex_shape_id, METH_VARARGS, NULL}, + { (char *)"SVertex_shape", _wrap_SVertex_shape, METH_VARARGS, NULL}, + { (char *)"SVertex_shape_importance", _wrap_SVertex_shape_importance, METH_VARARGS, NULL}, + { (char *)"SVertex_qi", _wrap_SVertex_qi, METH_VARARGS, NULL}, + { (char *)"SVertex_occluders_begin", _wrap_SVertex_occluders_begin, METH_VARARGS, NULL}, + { (char *)"SVertex_occluders_end", _wrap_SVertex_occluders_end, METH_VARARGS, NULL}, + { (char *)"SVertex_occluders_empty", _wrap_SVertex_occluders_empty, METH_VARARGS, NULL}, + { (char *)"SVertex_occluders_size", _wrap_SVertex_occluders_size, METH_VARARGS, NULL}, + { (char *)"SVertex_occludee", _wrap_SVertex_occludee, METH_VARARGS, NULL}, + { (char *)"SVertex_occluded_shape", _wrap_SVertex_occluded_shape, METH_VARARGS, NULL}, + { (char *)"SVertex_occludee_empty", _wrap_SVertex_occludee_empty, METH_VARARGS, NULL}, + { (char *)"SVertex_z_discontinuity", _wrap_SVertex_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"SVertex_swigregister", SVertex_swigregister, METH_VARARGS, NULL}, + { (char *)"FEdge_getExactTypeName", _wrap_FEdge_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"FEdge_getLength2D", _wrap_FEdge_getLength2D, METH_VARARGS, NULL}, + { (char *)"FEdge_getId", _wrap_FEdge_getId, METH_VARARGS, NULL}, + { (char *)"FEdge_userdata_set", _wrap_FEdge_userdata_set, METH_VARARGS, NULL}, + { (char *)"FEdge_userdata_get", _wrap_FEdge_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_FEdge", _wrap_new_FEdge, METH_VARARGS, NULL}, + { (char *)"delete_FEdge", _wrap_delete_FEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_dupplicate", _wrap_FEdge_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdge_vertexA", _wrap_FEdge_vertexA, METH_VARARGS, NULL}, + { (char *)"FEdge_vertexB", _wrap_FEdge_vertexB, METH_VARARGS, NULL}, + { (char *)"FEdge_getNature", _wrap_FEdge_getNature, METH_VARARGS, NULL}, + { (char *)"FEdge_nextEdge", _wrap_FEdge_nextEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_previousEdge", _wrap_FEdge_previousEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_invisibility", _wrap_FEdge_invisibility, METH_VARARGS, NULL}, + { (char *)"FEdge_viewedge", _wrap_FEdge_viewedge, METH_VARARGS, NULL}, + { (char *)"FEdge_center3d", _wrap_FEdge_center3d, METH_VARARGS, NULL}, + { (char *)"FEdge_center2d", _wrap_FEdge_center2d, METH_VARARGS, NULL}, + { (char *)"FEdge_aFace", _wrap_FEdge_aFace, METH_VARARGS, NULL}, + { (char *)"FEdge_getOccludeeIntersection", _wrap_FEdge_getOccludeeIntersection, METH_VARARGS, NULL}, + { (char *)"FEdge_getOccludeeEmpty", _wrap_FEdge_getOccludeeEmpty, METH_VARARGS, NULL}, + { (char *)"FEdge_isSmooth", _wrap_FEdge_isSmooth, METH_VARARGS, NULL}, + { (char *)"FEdge_SetVertexA", _wrap_FEdge_SetVertexA, METH_VARARGS, NULL}, + { (char *)"FEdge_SetVertexB", _wrap_FEdge_SetVertexB, METH_VARARGS, NULL}, + { (char *)"FEdge_SetId", _wrap_FEdge_SetId, METH_VARARGS, NULL}, + { (char *)"FEdge_SetNextEdge", _wrap_FEdge_SetNextEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_SetPreviousEdge", _wrap_FEdge_SetPreviousEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_SetNature", _wrap_FEdge_SetNature, METH_VARARGS, NULL}, + { (char *)"FEdge_SetViewEdge", _wrap_FEdge_SetViewEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_SetaFace", _wrap_FEdge_SetaFace, METH_VARARGS, NULL}, + { (char *)"FEdge_SetOccludeeIntersection", _wrap_FEdge_SetOccludeeIntersection, METH_VARARGS, NULL}, + { (char *)"FEdge_SetOccludeeEmpty", _wrap_FEdge_SetOccludeeEmpty, METH_VARARGS, NULL}, + { (char *)"FEdge_SetSmooth", _wrap_FEdge_SetSmooth, METH_VARARGS, NULL}, + { (char *)"FEdge_CommonVertex", _wrap_FEdge_CommonVertex, METH_VARARGS, NULL}, + { (char *)"FEdge_min2d", _wrap_FEdge_min2d, METH_VARARGS, NULL}, + { (char *)"FEdge_max2d", _wrap_FEdge_max2d, METH_VARARGS, NULL}, + { (char *)"FEdge_shape_id", _wrap_FEdge_shape_id, METH_VARARGS, NULL}, + { (char *)"FEdge_shape", _wrap_FEdge_shape, METH_VARARGS, NULL}, + { (char *)"FEdge_shape_importance", _wrap_FEdge_shape_importance, METH_VARARGS, NULL}, + { (char *)"FEdge_qi", _wrap_FEdge_qi, METH_VARARGS, NULL}, + { (char *)"FEdge_occluders_begin", _wrap_FEdge_occluders_begin, METH_VARARGS, NULL}, + { (char *)"FEdge_occluders_end", _wrap_FEdge_occluders_end, METH_VARARGS, NULL}, + { (char *)"FEdge_occluders_empty", _wrap_FEdge_occluders_empty, METH_VARARGS, NULL}, + { (char *)"FEdge_occluders_size", _wrap_FEdge_occluders_size, METH_VARARGS, NULL}, + { (char *)"FEdge_occludee", _wrap_FEdge_occludee, METH_VARARGS, NULL}, + { (char *)"FEdge_occluded_shape", _wrap_FEdge_occluded_shape, METH_VARARGS, NULL}, + { (char *)"FEdge_occludee_empty", _wrap_FEdge_occludee_empty, METH_VARARGS, NULL}, + { (char *)"FEdge_z_discontinuity", _wrap_FEdge_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"FEdge_viewedge_nature", _wrap_FEdge_viewedge_nature, METH_VARARGS, NULL}, + { (char *)"FEdge_orientation2d", _wrap_FEdge_orientation2d, METH_VARARGS, NULL}, + { (char *)"FEdge_orientation3d", _wrap_FEdge_orientation3d, METH_VARARGS, NULL}, + { (char *)"FEdge_verticesBegin", _wrap_FEdge_verticesBegin, METH_VARARGS, NULL}, + { (char *)"FEdge_verticesEnd", _wrap_FEdge_verticesEnd, METH_VARARGS, NULL}, + { (char *)"FEdge_pointsBegin", _wrap_FEdge_pointsBegin, METH_VARARGS, NULL}, + { (char *)"FEdge_pointsEnd", _wrap_FEdge_pointsEnd, METH_VARARGS, NULL}, + { (char *)"FEdge_swigregister", FEdge_swigregister, METH_VARARGS, NULL}, + { (char *)"new_FEdgeSVertexIterator", _wrap_new_FEdgeSVertexIterator, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getExactTypeName", _wrap_FEdgeSVertexIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getObject", _wrap_FEdgeSVertexIterator_getObject, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator___deref__", _wrap_FEdgeSVertexIterator___deref__, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_increment", _wrap_FEdgeSVertexIterator_increment, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_decrement", _wrap_FEdgeSVertexIterator_decrement, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_isBegin", _wrap_FEdgeSVertexIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_isEnd", _wrap_FEdgeSVertexIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator___eq__", _wrap_FEdgeSVertexIterator___eq__, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_t", _wrap_FEdgeSVertexIterator_t, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_u", _wrap_FEdgeSVertexIterator_u, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_copy", _wrap_FEdgeSVertexIterator_copy, METH_VARARGS, NULL}, + { (char *)"delete_FEdgeSVertexIterator", _wrap_delete_FEdgeSVertexIterator, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getX", _wrap_FEdgeSVertexIterator_getX, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getY", _wrap_FEdgeSVertexIterator_getY, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getZ", _wrap_FEdgeSVertexIterator_getZ, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getPoint3D", _wrap_FEdgeSVertexIterator_getPoint3D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getProjectedX", _wrap_FEdgeSVertexIterator_getProjectedX, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getProjectedY", _wrap_FEdgeSVertexIterator_getProjectedY, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getProjectedZ", _wrap_FEdgeSVertexIterator_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getPoint2D", _wrap_FEdgeSVertexIterator_getPoint2D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getFEdge", _wrap_FEdgeSVertexIterator_getFEdge, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getId", _wrap_FEdgeSVertexIterator_getId, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getNature", _wrap_FEdgeSVertexIterator_getNature, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_castToSVertex", _wrap_FEdgeSVertexIterator_castToSVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_castToViewVertex", _wrap_FEdgeSVertexIterator_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_castToNonTVertex", _wrap_FEdgeSVertexIterator_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_castToTVertex", _wrap_FEdgeSVertexIterator_castToTVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_userdata_set", _wrap_FEdgeSVertexIterator_userdata_set, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_userdata_get", _wrap_FEdgeSVertexIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_dupplicate", _wrap_FEdgeSVertexIterator_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_point3D", _wrap_FEdgeSVertexIterator_point3D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_point2D", _wrap_FEdgeSVertexIterator_point2D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_normals", _wrap_FEdgeSVertexIterator_normals, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_normalsSize", _wrap_FEdgeSVertexIterator_normalsSize, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_fedges", _wrap_FEdgeSVertexIterator_fedges, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_fedges_begin", _wrap_FEdgeSVertexIterator_fedges_begin, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_fedges_end", _wrap_FEdgeSVertexIterator_fedges_end, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_shape", _wrap_FEdgeSVertexIterator_shape, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_z", _wrap_FEdgeSVertexIterator_z, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_viewvertex", _wrap_FEdgeSVertexIterator_viewvertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetPoint3D", _wrap_FEdgeSVertexIterator_SetPoint3D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetPoint2D", _wrap_FEdgeSVertexIterator_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_AddNormal", _wrap_FEdgeSVertexIterator_AddNormal, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setCurvatureInfo", _wrap_FEdgeSVertexIterator_setCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_getCurvatureInfo", _wrap_FEdgeSVertexIterator_getCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setCurvatureFredo", _wrap_FEdgeSVertexIterator_setCurvatureFredo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setDirectionFredo", _wrap_FEdgeSVertexIterator_setDirectionFredo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_curvatureFredo", _wrap_FEdgeSVertexIterator_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_directionFredo", _wrap_FEdgeSVertexIterator_directionFredo, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetId", _wrap_FEdgeSVertexIterator_SetId, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetFEdges", _wrap_FEdgeSVertexIterator_SetFEdges, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetShape", _wrap_FEdgeSVertexIterator_SetShape, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_SetViewVertex", _wrap_FEdgeSVertexIterator_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_AddFEdge", _wrap_FEdgeSVertexIterator_AddFEdge, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_Replace", _wrap_FEdgeSVertexIterator_Replace, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_fedge", _wrap_FEdgeSVertexIterator_fedge, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_point2d", _wrap_FEdgeSVertexIterator_point2d, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_point3d", _wrap_FEdgeSVertexIterator_point3d, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_normal", _wrap_FEdgeSVertexIterator_normal, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_shape_id", _wrap_FEdgeSVertexIterator_shape_id, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_shape_importance", _wrap_FEdgeSVertexIterator_shape_importance, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_qi", _wrap_FEdgeSVertexIterator_qi, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occluders_begin", _wrap_FEdgeSVertexIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occluders_end", _wrap_FEdgeSVertexIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occluders_empty", _wrap_FEdgeSVertexIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occluders_size", _wrap_FEdgeSVertexIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occludee", _wrap_FEdgeSVertexIterator_occludee, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occluded_shape", _wrap_FEdgeSVertexIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_occludee_empty", _wrap_FEdgeSVertexIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_z_discontinuity", _wrap_FEdgeSVertexIterator_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_swigregister", FEdgeSVertexIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_FEdgeSharp", _wrap_new_FEdgeSharp, METH_VARARGS, NULL}, + { (char *)"delete_FEdgeSharp", _wrap_delete_FEdgeSharp, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_dupplicate", _wrap_FEdgeSharp_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_normalA", _wrap_FEdgeSharp_normalA, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_normalB", _wrap_FEdgeSharp_normalB, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_aMaterialIndex", _wrap_FEdgeSharp_aMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_aMaterial", _wrap_FEdgeSharp_aMaterial, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_bMaterialIndex", _wrap_FEdgeSharp_bMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_bMaterial", _wrap_FEdgeSharp_bMaterial, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_SetNormalA", _wrap_FEdgeSharp_SetNormalA, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_SetNormalB", _wrap_FEdgeSharp_SetNormalB, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_SetaMaterialIndex", _wrap_FEdgeSharp_SetaMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_SetbMaterialIndex", _wrap_FEdgeSharp_SetbMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_swigregister", FEdgeSharp_swigregister, METH_VARARGS, NULL}, + { (char *)"new_FEdgeSmooth", _wrap_new_FEdgeSmooth, METH_VARARGS, NULL}, + { (char *)"delete_FEdgeSmooth", _wrap_delete_FEdgeSmooth, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_dupplicate", _wrap_FEdgeSmooth_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_face", _wrap_FEdgeSmooth_face, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_normal", _wrap_FEdgeSmooth_normal, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_materialIndex", _wrap_FEdgeSmooth_materialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_material", _wrap_FEdgeSmooth_material, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_SetFace", _wrap_FEdgeSmooth_SetFace, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_SetNormal", _wrap_FEdgeSmooth_SetNormal, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_SetMaterialIndex", _wrap_FEdgeSmooth_SetMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_swigregister", FEdgeSmooth_swigregister, METH_VARARGS, NULL}, + { (char *)"SShape_userdata_set", _wrap_SShape_userdata_set, METH_VARARGS, NULL}, + { (char *)"SShape_userdata_get", _wrap_SShape_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_SShape", _wrap_new_SShape, METH_VARARGS, NULL}, + { (char *)"SShape_dupplicate", _wrap_SShape_dupplicate, METH_VARARGS, NULL}, + { (char *)"delete_SShape", _wrap_delete_SShape, METH_VARARGS, NULL}, + { (char *)"SShape_AddEdge", _wrap_SShape_AddEdge, METH_VARARGS, NULL}, + { (char *)"SShape_AddNewVertex", _wrap_SShape_AddNewVertex, METH_VARARGS, NULL}, + { (char *)"SShape_AddChain", _wrap_SShape_AddChain, METH_VARARGS, NULL}, + { (char *)"SShape_CreateSVertex", _wrap_SShape_CreateSVertex, METH_VARARGS, NULL}, + { (char *)"SShape_SplitEdge", _wrap_SShape_SplitEdge, METH_VARARGS, NULL}, + { (char *)"SShape_SplitEdgeIn2", _wrap_SShape_SplitEdgeIn2, METH_VARARGS, NULL}, + { (char *)"SShape_SetBBox", _wrap_SShape_SetBBox, METH_VARARGS, NULL}, + { (char *)"SShape_ComputeBBox", _wrap_SShape_ComputeBBox, METH_VARARGS, NULL}, + { (char *)"SShape_RemoveEdgeFromChain", _wrap_SShape_RemoveEdgeFromChain, METH_VARARGS, NULL}, + { (char *)"SShape_RemoveEdge", _wrap_SShape_RemoveEdge, METH_VARARGS, NULL}, + { (char *)"SShape_GetVertexList", _wrap_SShape_GetVertexList, METH_VARARGS, NULL}, + { (char *)"SShape_GetEdgeList", _wrap_SShape_GetEdgeList, METH_VARARGS, NULL}, + { (char *)"SShape_GetChains", _wrap_SShape_GetChains, METH_VARARGS, NULL}, + { (char *)"SShape_bbox", _wrap_SShape_bbox, METH_VARARGS, NULL}, + { (char *)"SShape_material", _wrap_SShape_material, METH_VARARGS, NULL}, + { (char *)"SShape_materials", _wrap_SShape_materials, METH_VARARGS, NULL}, + { (char *)"SShape_viewShape", _wrap_SShape_viewShape, METH_VARARGS, NULL}, + { (char *)"SShape_importance", _wrap_SShape_importance, METH_VARARGS, NULL}, + { (char *)"SShape_getId", _wrap_SShape_getId, METH_VARARGS, NULL}, + { (char *)"SShape_SetId", _wrap_SShape_SetId, METH_VARARGS, NULL}, + { (char *)"SShape_SetMaterials", _wrap_SShape_SetMaterials, METH_VARARGS, NULL}, + { (char *)"SShape_SetViewShape", _wrap_SShape_SetViewShape, METH_VARARGS, NULL}, + { (char *)"SShape_SetImportance", _wrap_SShape_SetImportance, METH_VARARGS, NULL}, + { (char *)"SShape_swigregister", SShape_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_iterator", _wrap_ViewShapesContainer_iterator, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___nonzero__", _wrap_ViewShapesContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___len__", _wrap_ViewShapesContainer___len__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_pop", _wrap_ViewShapesContainer_pop, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___getslice__", _wrap_ViewShapesContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___setslice__", _wrap_ViewShapesContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___delslice__", _wrap_ViewShapesContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___delitem__", _wrap_ViewShapesContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___getitem__", _wrap_ViewShapesContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer___setitem__", _wrap_ViewShapesContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_append", _wrap_ViewShapesContainer_append, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_empty", _wrap_ViewShapesContainer_empty, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_size", _wrap_ViewShapesContainer_size, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_clear", _wrap_ViewShapesContainer_clear, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_swap", _wrap_ViewShapesContainer_swap, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_get_allocator", _wrap_ViewShapesContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_begin", _wrap_ViewShapesContainer_begin, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_end", _wrap_ViewShapesContainer_end, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_rbegin", _wrap_ViewShapesContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_rend", _wrap_ViewShapesContainer_rend, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_pop_back", _wrap_ViewShapesContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_erase", _wrap_ViewShapesContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_ViewShapesContainer", _wrap_new_ViewShapesContainer, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_push_back", _wrap_ViewShapesContainer_push_back, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_front", _wrap_ViewShapesContainer_front, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_back", _wrap_ViewShapesContainer_back, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_assign", _wrap_ViewShapesContainer_assign, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_resize", _wrap_ViewShapesContainer_resize, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_insert", _wrap_ViewShapesContainer_insert, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_reserve", _wrap_ViewShapesContainer_reserve, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_capacity", _wrap_ViewShapesContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_ViewShapesContainer", _wrap_delete_ViewShapesContainer, METH_VARARGS, NULL}, + { (char *)"ViewShapesContainer_swigregister", ViewShapesContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_iterator", _wrap_ViewEdgesContainer_iterator, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___nonzero__", _wrap_ViewEdgesContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___len__", _wrap_ViewEdgesContainer___len__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_pop", _wrap_ViewEdgesContainer_pop, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___getslice__", _wrap_ViewEdgesContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___setslice__", _wrap_ViewEdgesContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___delslice__", _wrap_ViewEdgesContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___delitem__", _wrap_ViewEdgesContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___getitem__", _wrap_ViewEdgesContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer___setitem__", _wrap_ViewEdgesContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_append", _wrap_ViewEdgesContainer_append, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_empty", _wrap_ViewEdgesContainer_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_size", _wrap_ViewEdgesContainer_size, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_clear", _wrap_ViewEdgesContainer_clear, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_swap", _wrap_ViewEdgesContainer_swap, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_get_allocator", _wrap_ViewEdgesContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_begin", _wrap_ViewEdgesContainer_begin, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_end", _wrap_ViewEdgesContainer_end, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_rbegin", _wrap_ViewEdgesContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_rend", _wrap_ViewEdgesContainer_rend, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_pop_back", _wrap_ViewEdgesContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_erase", _wrap_ViewEdgesContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_ViewEdgesContainer", _wrap_new_ViewEdgesContainer, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_push_back", _wrap_ViewEdgesContainer_push_back, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_front", _wrap_ViewEdgesContainer_front, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_back", _wrap_ViewEdgesContainer_back, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_assign", _wrap_ViewEdgesContainer_assign, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_resize", _wrap_ViewEdgesContainer_resize, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_insert", _wrap_ViewEdgesContainer_insert, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_reserve", _wrap_ViewEdgesContainer_reserve, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_capacity", _wrap_ViewEdgesContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_ViewEdgesContainer", _wrap_delete_ViewEdgesContainer, METH_VARARGS, NULL}, + { (char *)"ViewEdgesContainer_swigregister", ViewEdgesContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_iterator", _wrap_FEdgesContainer_iterator, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___nonzero__", _wrap_FEdgesContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___len__", _wrap_FEdgesContainer___len__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_pop", _wrap_FEdgesContainer_pop, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___getslice__", _wrap_FEdgesContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___setslice__", _wrap_FEdgesContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___delslice__", _wrap_FEdgesContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___delitem__", _wrap_FEdgesContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___getitem__", _wrap_FEdgesContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer___setitem__", _wrap_FEdgesContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_append", _wrap_FEdgesContainer_append, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_empty", _wrap_FEdgesContainer_empty, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_size", _wrap_FEdgesContainer_size, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_clear", _wrap_FEdgesContainer_clear, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_swap", _wrap_FEdgesContainer_swap, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_get_allocator", _wrap_FEdgesContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_begin", _wrap_FEdgesContainer_begin, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_end", _wrap_FEdgesContainer_end, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_rbegin", _wrap_FEdgesContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_rend", _wrap_FEdgesContainer_rend, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_pop_back", _wrap_FEdgesContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_erase", _wrap_FEdgesContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_FEdgesContainer", _wrap_new_FEdgesContainer, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_push_back", _wrap_FEdgesContainer_push_back, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_front", _wrap_FEdgesContainer_front, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_back", _wrap_FEdgesContainer_back, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_assign", _wrap_FEdgesContainer_assign, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_resize", _wrap_FEdgesContainer_resize, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_insert", _wrap_FEdgesContainer_insert, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_reserve", _wrap_FEdgesContainer_reserve, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_capacity", _wrap_FEdgesContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_FEdgesContainer", _wrap_delete_FEdgesContainer, METH_VARARGS, NULL}, + { (char *)"FEdgesContainer_swigregister", FEdgesContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_iterator", _wrap_ViewVerticesContainer_iterator, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___nonzero__", _wrap_ViewVerticesContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___len__", _wrap_ViewVerticesContainer___len__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_pop", _wrap_ViewVerticesContainer_pop, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___getslice__", _wrap_ViewVerticesContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___setslice__", _wrap_ViewVerticesContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___delslice__", _wrap_ViewVerticesContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___delitem__", _wrap_ViewVerticesContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___getitem__", _wrap_ViewVerticesContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer___setitem__", _wrap_ViewVerticesContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_append", _wrap_ViewVerticesContainer_append, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_empty", _wrap_ViewVerticesContainer_empty, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_size", _wrap_ViewVerticesContainer_size, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_clear", _wrap_ViewVerticesContainer_clear, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_swap", _wrap_ViewVerticesContainer_swap, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_get_allocator", _wrap_ViewVerticesContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_begin", _wrap_ViewVerticesContainer_begin, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_end", _wrap_ViewVerticesContainer_end, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_rbegin", _wrap_ViewVerticesContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_rend", _wrap_ViewVerticesContainer_rend, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_pop_back", _wrap_ViewVerticesContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_erase", _wrap_ViewVerticesContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_ViewVerticesContainer", _wrap_new_ViewVerticesContainer, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_push_back", _wrap_ViewVerticesContainer_push_back, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_front", _wrap_ViewVerticesContainer_front, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_back", _wrap_ViewVerticesContainer_back, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_assign", _wrap_ViewVerticesContainer_assign, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_resize", _wrap_ViewVerticesContainer_resize, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_insert", _wrap_ViewVerticesContainer_insert, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_reserve", _wrap_ViewVerticesContainer_reserve, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_capacity", _wrap_ViewVerticesContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_ViewVerticesContainer", _wrap_delete_ViewVerticesContainer, METH_VARARGS, NULL}, + { (char *)"ViewVerticesContainer_swigregister", ViewVerticesContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_iterator", _wrap_SVerticesContainer_iterator, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___nonzero__", _wrap_SVerticesContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___len__", _wrap_SVerticesContainer___len__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_pop", _wrap_SVerticesContainer_pop, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___getslice__", _wrap_SVerticesContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___setslice__", _wrap_SVerticesContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___delslice__", _wrap_SVerticesContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___delitem__", _wrap_SVerticesContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___getitem__", _wrap_SVerticesContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer___setitem__", _wrap_SVerticesContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_append", _wrap_SVerticesContainer_append, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_empty", _wrap_SVerticesContainer_empty, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_size", _wrap_SVerticesContainer_size, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_clear", _wrap_SVerticesContainer_clear, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_swap", _wrap_SVerticesContainer_swap, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_get_allocator", _wrap_SVerticesContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_begin", _wrap_SVerticesContainer_begin, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_end", _wrap_SVerticesContainer_end, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_rbegin", _wrap_SVerticesContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_rend", _wrap_SVerticesContainer_rend, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_pop_back", _wrap_SVerticesContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_erase", _wrap_SVerticesContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_SVerticesContainer", _wrap_new_SVerticesContainer, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_push_back", _wrap_SVerticesContainer_push_back, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_front", _wrap_SVerticesContainer_front, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_back", _wrap_SVerticesContainer_back, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_assign", _wrap_SVerticesContainer_assign, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_resize", _wrap_SVerticesContainer_resize, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_insert", _wrap_SVerticesContainer_insert, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_reserve", _wrap_SVerticesContainer_reserve, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_capacity", _wrap_SVerticesContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_SVerticesContainer", _wrap_delete_SVerticesContainer, METH_VARARGS, NULL}, + { (char *)"SVerticesContainer_swigregister", SVerticesContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewMap_userdata_set", _wrap_ViewMap_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewMap_userdata_get", _wrap_ViewMap_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_ViewMap", _wrap_new_ViewMap, METH_VARARGS, NULL}, + { (char *)"delete_ViewMap", _wrap_delete_ViewMap, METH_VARARGS, NULL}, + { (char *)"ViewMap_GetClosestViewEdge", _wrap_ViewMap_GetClosestViewEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_GetClosestFEdge", _wrap_ViewMap_GetClosestFEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_getInstance", _wrap_ViewMap_getInstance, METH_VARARGS, NULL}, + { (char *)"ViewMap_ViewShapes", _wrap_ViewMap_ViewShapes, METH_VARARGS, NULL}, + { (char *)"ViewMap_ViewEdges", _wrap_ViewMap_ViewEdges, METH_VARARGS, NULL}, + { (char *)"ViewMap_ViewVertices", _wrap_ViewMap_ViewVertices, METH_VARARGS, NULL}, + { (char *)"ViewMap_FEdges", _wrap_ViewMap_FEdges, METH_VARARGS, NULL}, + { (char *)"ViewMap_SVertices", _wrap_ViewMap_SVertices, METH_VARARGS, NULL}, + { (char *)"ViewMap_viewedges_begin", _wrap_ViewMap_viewedges_begin, METH_VARARGS, NULL}, + { (char *)"ViewMap_viewedges_end", _wrap_ViewMap_viewedges_end, METH_VARARGS, NULL}, + { (char *)"ViewMap_viewedges_size", _wrap_ViewMap_viewedges_size, METH_VARARGS, NULL}, + { (char *)"ViewMap_viewShape", _wrap_ViewMap_viewShape, METH_VARARGS, NULL}, + { (char *)"ViewMap_getScene3dBBox", _wrap_ViewMap_getScene3dBBox, METH_VARARGS, NULL}, + { (char *)"ViewMap_AddViewShape", _wrap_ViewMap_AddViewShape, METH_VARARGS, NULL}, + { (char *)"ViewMap_AddViewEdge", _wrap_ViewMap_AddViewEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_AddViewVertex", _wrap_ViewMap_AddViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewMap_AddFEdge", _wrap_ViewMap_AddFEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_AddSVertex", _wrap_ViewMap_AddSVertex, METH_VARARGS, NULL}, + { (char *)"ViewMap_setScene3dBBox", _wrap_ViewMap_setScene3dBBox, METH_VARARGS, NULL}, + { (char *)"ViewMap_CreateTVertex", _wrap_ViewMap_CreateTVertex, METH_VARARGS, NULL}, + { (char *)"ViewMap_InsertViewVertex", _wrap_ViewMap_InsertViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewMap_swigregister", ViewMap_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewVertex_getExactTypeName", _wrap_ViewVertex_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ViewVertex_userdata_set", _wrap_ViewVertex_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewVertex_userdata_get", _wrap_ViewVertex_userdata_get, METH_VARARGS, NULL}, + { (char *)"delete_ViewVertex", _wrap_delete_ViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewVertex_getNature", _wrap_ViewVertex_getNature, METH_VARARGS, NULL}, + { (char *)"ViewVertex_setNature", _wrap_ViewVertex_setNature, METH_VARARGS, NULL}, + { (char *)"ViewVertex_Replace", _wrap_ViewVertex_Replace, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edges_begin", _wrap_ViewVertex_edges_begin, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edges_end", _wrap_ViewVertex_edges_end, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edges_iterator", _wrap_ViewVertex_edges_iterator, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edgesBegin", _wrap_ViewVertex_edgesBegin, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edgesEnd", _wrap_ViewVertex_edgesEnd, METH_VARARGS, NULL}, + { (char *)"ViewVertex_edgesIterator", _wrap_ViewVertex_edgesIterator, METH_VARARGS, NULL}, + { (char *)"ViewVertex_swigregister", ViewVertex_swigregister, METH_VARARGS, NULL}, + { (char *)"TVertex_getExactTypeName", _wrap_TVertex_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"TVertex_getX", _wrap_TVertex_getX, METH_VARARGS, NULL}, + { (char *)"TVertex_getY", _wrap_TVertex_getY, METH_VARARGS, NULL}, + { (char *)"TVertex_getZ", _wrap_TVertex_getZ, METH_VARARGS, NULL}, + { (char *)"TVertex_getPoint3D", _wrap_TVertex_getPoint3D, METH_VARARGS, NULL}, + { (char *)"TVertex_getProjectedX", _wrap_TVertex_getProjectedX, METH_VARARGS, NULL}, + { (char *)"TVertex_getProjectedY", _wrap_TVertex_getProjectedY, METH_VARARGS, NULL}, + { (char *)"TVertex_getProjectedZ", _wrap_TVertex_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"TVertex_getPoint2D", _wrap_TVertex_getPoint2D, METH_VARARGS, NULL}, + { (char *)"TVertex_getId", _wrap_TVertex_getId, METH_VARARGS, NULL}, + { (char *)"TVertex_castToViewVertex", _wrap_TVertex_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_castToTVertex", _wrap_TVertex_castToTVertex, METH_VARARGS, NULL}, + { (char *)"new_TVertex", _wrap_new_TVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_frontSVertex", _wrap_TVertex_frontSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_backSVertex", _wrap_TVertex_backSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_frontEdgeA", _wrap_TVertex_frontEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_frontEdgeB", _wrap_TVertex_frontEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_backEdgeA", _wrap_TVertex_backEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_backEdgeB", _wrap_TVertex_backEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_SetFrontVertex", _wrap_TVertex_SetFrontVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_SetBackSVertex", _wrap_TVertex_SetBackSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_SetFrontEdgeA", _wrap_TVertex_SetFrontEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_SetFrontEdgeB", _wrap_TVertex_SetFrontEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_SetBackEdgeA", _wrap_TVertex_SetBackEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_SetBackEdgeB", _wrap_TVertex_SetBackEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_SetId", _wrap_TVertex_SetId, METH_VARARGS, NULL}, + { (char *)"TVertex_GetSVertex", _wrap_TVertex_GetSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_Replace", _wrap_TVertex_Replace, METH_VARARGS, NULL}, + { (char *)"TVertex_mate", _wrap_TVertex_mate, METH_VARARGS, NULL}, + { (char *)"TVertex_edges_end", _wrap_TVertex_edges_end, METH_VARARGS, NULL}, + { (char *)"TVertex_edgesBegin", _wrap_TVertex_edgesBegin, METH_VARARGS, NULL}, + { (char *)"TVertex_edgesEnd", _wrap_TVertex_edgesEnd, METH_VARARGS, NULL}, + { (char *)"TVertex_edgesIterator", _wrap_TVertex_edgesIterator, METH_VARARGS, NULL}, + { (char *)"delete_TVertex", _wrap_delete_TVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_swigregister", TVertex_swigregister, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getExactTypeName", _wrap_NonTVertex_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getX", _wrap_NonTVertex_getX, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getY", _wrap_NonTVertex_getY, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getZ", _wrap_NonTVertex_getZ, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getPoint3D", _wrap_NonTVertex_getPoint3D, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getProjectedX", _wrap_NonTVertex_getProjectedX, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getProjectedY", _wrap_NonTVertex_getProjectedY, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getProjectedZ", _wrap_NonTVertex_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getPoint2D", _wrap_NonTVertex_getPoint2D, METH_VARARGS, NULL}, + { (char *)"NonTVertex_getId", _wrap_NonTVertex_getId, METH_VARARGS, NULL}, + { (char *)"NonTVertex_castToSVertex", _wrap_NonTVertex_castToSVertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_castToViewVertex", _wrap_NonTVertex_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_castToNonTVertex", _wrap_NonTVertex_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"new_NonTVertex", _wrap_new_NonTVertex, METH_VARARGS, NULL}, + { (char *)"delete_NonTVertex", _wrap_delete_NonTVertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_svertex", _wrap_NonTVertex_svertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_viewedges", _wrap_NonTVertex_viewedges, METH_VARARGS, NULL}, + { (char *)"NonTVertex_SetSVertex", _wrap_NonTVertex_SetSVertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_SetViewEdges", _wrap_NonTVertex_SetViewEdges, METH_VARARGS, NULL}, + { (char *)"NonTVertex_AddIncomingViewEdge", _wrap_NonTVertex_AddIncomingViewEdge, METH_VARARGS, NULL}, + { (char *)"NonTVertex_AddOutgoingViewEdge", _wrap_NonTVertex_AddOutgoingViewEdge, METH_VARARGS, NULL}, + { (char *)"NonTVertex_AddViewEdge", _wrap_NonTVertex_AddViewEdge, METH_VARARGS, NULL}, + { (char *)"NonTVertex_Replace", _wrap_NonTVertex_Replace, METH_VARARGS, NULL}, + { (char *)"NonTVertex_edges_end", _wrap_NonTVertex_edges_end, METH_VARARGS, NULL}, + { (char *)"NonTVertex_edgesBegin", _wrap_NonTVertex_edgesBegin, METH_VARARGS, NULL}, + { (char *)"NonTVertex_edgesEnd", _wrap_NonTVertex_edgesEnd, METH_VARARGS, NULL}, + { (char *)"NonTVertex_edgesIterator", _wrap_NonTVertex_edgesIterator, METH_VARARGS, NULL}, + { (char *)"NonTVertex_swigregister", NonTVertex_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewEdge_getExactTypeName", _wrap_ViewEdge_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ViewEdge_getId", _wrap_ViewEdge_getId, METH_VARARGS, NULL}, + { (char *)"ViewEdge_getNature", _wrap_ViewEdge_getNature, METH_VARARGS, NULL}, + { (char *)"ViewEdge_userdata_set", _wrap_ViewEdge_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewEdge_userdata_get", _wrap_ViewEdge_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_ViewEdge", _wrap_new_ViewEdge, METH_VARARGS, NULL}, + { (char *)"delete_ViewEdge", _wrap_delete_ViewEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdge_A", _wrap_ViewEdge_A, METH_VARARGS, NULL}, + { (char *)"ViewEdge_B", _wrap_ViewEdge_B, METH_VARARGS, NULL}, + { (char *)"ViewEdge_fedgeA", _wrap_ViewEdge_fedgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdge_fedgeB", _wrap_ViewEdge_fedgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdge_viewShape", _wrap_ViewEdge_viewShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_isClosed", _wrap_ViewEdge_isClosed, METH_VARARGS, NULL}, + { (char *)"ViewEdge_getChainingTimeStamp", _wrap_ViewEdge_getChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"ViewEdge_aShape", _wrap_ViewEdge_aShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_bShape", _wrap_ViewEdge_bShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluders", _wrap_ViewEdge_occluders, METH_VARARGS, NULL}, + { (char *)"ViewEdge_splittingId", _wrap_ViewEdge_splittingId, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetA", _wrap_ViewEdge_SetA, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetB", _wrap_ViewEdge_SetB, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetNature", _wrap_ViewEdge_SetNature, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetFEdgeA", _wrap_ViewEdge_SetFEdgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetFEdgeB", _wrap_ViewEdge_SetFEdgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetShape", _wrap_ViewEdge_SetShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetId", _wrap_ViewEdge_SetId, METH_VARARGS, NULL}, + { (char *)"ViewEdge_UpdateFEdges", _wrap_ViewEdge_UpdateFEdges, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetaShape", _wrap_ViewEdge_SetaShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_SetQI", _wrap_ViewEdge_SetQI, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setChainingTimeStamp", _wrap_ViewEdge_setChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"ViewEdge_AddOccluder", _wrap_ViewEdge_AddOccluder, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setSplittingId", _wrap_ViewEdge_setSplittingId, METH_VARARGS, NULL}, + { (char *)"ViewEdge_intersect_2d_area", _wrap_ViewEdge_intersect_2d_area, METH_VARARGS, NULL}, + { (char *)"ViewEdge_include_in_2d_area", _wrap_ViewEdge_include_in_2d_area, METH_VARARGS, NULL}, + { (char *)"ViewEdge_getLength2D", _wrap_ViewEdge_getLength2D, METH_VARARGS, NULL}, + { (char *)"ViewEdge_qi", _wrap_ViewEdge_qi, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluders_begin", _wrap_ViewEdge_occluders_begin, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluders_end", _wrap_ViewEdge_occluders_end, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluders_size", _wrap_ViewEdge_occluders_size, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluders_empty", _wrap_ViewEdge_occluders_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occludee", _wrap_ViewEdge_occludee, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occluded_shape", _wrap_ViewEdge_occluded_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_occludee_empty", _wrap_ViewEdge_occludee_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdge_shape_id", _wrap_ViewEdge_shape_id, METH_VARARGS, NULL}, + { (char *)"ViewEdge_shape", _wrap_ViewEdge_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_shape_importance", _wrap_ViewEdge_shape_importance, METH_VARARGS, NULL}, + { (char *)"ViewEdge_verticesBegin", _wrap_ViewEdge_verticesBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdge_verticesEnd", _wrap_ViewEdge_verticesEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdge_pointsBegin", _wrap_ViewEdge_pointsBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdge_pointsEnd", _wrap_ViewEdge_pointsEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdge_swigregister", ViewEdge_swigregister, METH_VARARGS, NULL}, + { (char *)"ViewShape_userdata_set", _wrap_ViewShape_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewShape_userdata_get", _wrap_ViewShape_userdata_get, METH_VARARGS, NULL}, + { (char *)"new_ViewShape", _wrap_new_ViewShape, METH_VARARGS, NULL}, + { (char *)"ViewShape_dupplicate", _wrap_ViewShape_dupplicate, METH_VARARGS, NULL}, + { (char *)"delete_ViewShape", _wrap_delete_ViewShape, METH_VARARGS, NULL}, + { (char *)"ViewShape_SplitEdge", _wrap_ViewShape_SplitEdge, METH_VARARGS, NULL}, + { (char *)"ViewShape_sshape", _wrap_ViewShape_sshape, METH_VARARGS, NULL}, + { (char *)"ViewShape_vertices", _wrap_ViewShape_vertices, METH_VARARGS, NULL}, + { (char *)"ViewShape_edges", _wrap_ViewShape_edges, METH_VARARGS, NULL}, + { (char *)"ViewShape_getId", _wrap_ViewShape_getId, METH_VARARGS, NULL}, + { (char *)"ViewShape_SetSShape", _wrap_ViewShape_SetSShape, METH_VARARGS, NULL}, + { (char *)"ViewShape_SetVertices", _wrap_ViewShape_SetVertices, METH_VARARGS, NULL}, + { (char *)"ViewShape_SetEdges", _wrap_ViewShape_SetEdges, METH_VARARGS, NULL}, + { (char *)"ViewShape_AddVertex", _wrap_ViewShape_AddVertex, METH_VARARGS, NULL}, + { (char *)"ViewShape_AddEdge", _wrap_ViewShape_AddEdge, METH_VARARGS, NULL}, + { (char *)"ViewShape_RemoveEdge", _wrap_ViewShape_RemoveEdge, METH_VARARGS, NULL}, + { (char *)"ViewShape_RemoveVertex", _wrap_ViewShape_RemoveVertex, METH_VARARGS, NULL}, + { (char *)"ViewShape_swigregister", ViewShape_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_ViewVertexOrientedViewEdgeIterator", _wrap_delete_ViewVertexOrientedViewEdgeIterator, METH_VARARGS, NULL}, + { (char *)"new_ViewVertexOrientedViewEdgeIterator", _wrap_new_ViewVertexOrientedViewEdgeIterator, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator_isBegin", _wrap_ViewVertexOrientedViewEdgeIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator_isEnd", _wrap_ViewVertexOrientedViewEdgeIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator___ne__", _wrap_ViewVertexOrientedViewEdgeIterator___ne__, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator___eq__", _wrap_ViewVertexOrientedViewEdgeIterator___eq__, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator_getObject", _wrap_ViewVertexOrientedViewEdgeIterator_getObject, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator___deref__", _wrap_ViewVertexOrientedViewEdgeIterator___deref__, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator_increment", _wrap_ViewVertexOrientedViewEdgeIterator_increment, METH_VARARGS, NULL}, + { (char *)"ViewVertexOrientedViewEdgeIterator_swigregister", ViewVertexOrientedViewEdgeIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ViewEdgeSVertexIterator", _wrap_new_ViewEdgeSVertexIterator, METH_VARARGS, NULL}, + { (char *)"delete_ViewEdgeSVertexIterator", _wrap_delete_ViewEdgeSVertexIterator, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getExactTypeName", _wrap_ViewEdgeSVertexIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getObject", _wrap_ViewEdgeSVertexIterator_getObject, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator___deref__", _wrap_ViewEdgeSVertexIterator___deref__, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_increment", _wrap_ViewEdgeSVertexIterator_increment, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_decrement", _wrap_ViewEdgeSVertexIterator_decrement, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_isBegin", _wrap_ViewEdgeSVertexIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_isEnd", _wrap_ViewEdgeSVertexIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_t", _wrap_ViewEdgeSVertexIterator_t, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_u", _wrap_ViewEdgeSVertexIterator_u, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator___eq__", _wrap_ViewEdgeSVertexIterator___eq__, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_copy", _wrap_ViewEdgeSVertexIterator_copy, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getX", _wrap_ViewEdgeSVertexIterator_getX, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getY", _wrap_ViewEdgeSVertexIterator_getY, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getZ", _wrap_ViewEdgeSVertexIterator_getZ, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getPoint3D", _wrap_ViewEdgeSVertexIterator_getPoint3D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getProjectedX", _wrap_ViewEdgeSVertexIterator_getProjectedX, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getProjectedY", _wrap_ViewEdgeSVertexIterator_getProjectedY, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getProjectedZ", _wrap_ViewEdgeSVertexIterator_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getPoint2D", _wrap_ViewEdgeSVertexIterator_getPoint2D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getFEdge", _wrap_ViewEdgeSVertexIterator_getFEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getId", _wrap_ViewEdgeSVertexIterator_getId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getNature", _wrap_ViewEdgeSVertexIterator_getNature, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_castToSVertex", _wrap_ViewEdgeSVertexIterator_castToSVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_castToViewVertex", _wrap_ViewEdgeSVertexIterator_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_castToNonTVertex", _wrap_ViewEdgeSVertexIterator_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_castToTVertex", _wrap_ViewEdgeSVertexIterator_castToTVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_userdata_set", _wrap_ViewEdgeSVertexIterator_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_userdata_get", _wrap_ViewEdgeSVertexIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_dupplicate", _wrap_ViewEdgeSVertexIterator_dupplicate, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_point3D", _wrap_ViewEdgeSVertexIterator_point3D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_point2D", _wrap_ViewEdgeSVertexIterator_point2D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_normals", _wrap_ViewEdgeSVertexIterator_normals, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_normalsSize", _wrap_ViewEdgeSVertexIterator_normalsSize, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_fedges", _wrap_ViewEdgeSVertexIterator_fedges, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_fedges_begin", _wrap_ViewEdgeSVertexIterator_fedges_begin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_fedges_end", _wrap_ViewEdgeSVertexIterator_fedges_end, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_shape", _wrap_ViewEdgeSVertexIterator_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_z", _wrap_ViewEdgeSVertexIterator_z, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_viewvertex", _wrap_ViewEdgeSVertexIterator_viewvertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetPoint3D", _wrap_ViewEdgeSVertexIterator_SetPoint3D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetPoint2D", _wrap_ViewEdgeSVertexIterator_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_AddNormal", _wrap_ViewEdgeSVertexIterator_AddNormal, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setCurvatureInfo", _wrap_ViewEdgeSVertexIterator_setCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_getCurvatureInfo", _wrap_ViewEdgeSVertexIterator_getCurvatureInfo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setCurvatureFredo", _wrap_ViewEdgeSVertexIterator_setCurvatureFredo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setDirectionFredo", _wrap_ViewEdgeSVertexIterator_setDirectionFredo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_curvatureFredo", _wrap_ViewEdgeSVertexIterator_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_directionFredo", _wrap_ViewEdgeSVertexIterator_directionFredo, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetId", _wrap_ViewEdgeSVertexIterator_SetId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetFEdges", _wrap_ViewEdgeSVertexIterator_SetFEdges, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetShape", _wrap_ViewEdgeSVertexIterator_SetShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_SetViewVertex", _wrap_ViewEdgeSVertexIterator_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_AddFEdge", _wrap_ViewEdgeSVertexIterator_AddFEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_Replace", _wrap_ViewEdgeSVertexIterator_Replace, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_fedge", _wrap_ViewEdgeSVertexIterator_fedge, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_point2d", _wrap_ViewEdgeSVertexIterator_point2d, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_point3d", _wrap_ViewEdgeSVertexIterator_point3d, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_normal", _wrap_ViewEdgeSVertexIterator_normal, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_shape_id", _wrap_ViewEdgeSVertexIterator_shape_id, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_shape_importance", _wrap_ViewEdgeSVertexIterator_shape_importance, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_qi", _wrap_ViewEdgeSVertexIterator_qi, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occluders_begin", _wrap_ViewEdgeSVertexIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occluders_end", _wrap_ViewEdgeSVertexIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occluders_empty", _wrap_ViewEdgeSVertexIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occluders_size", _wrap_ViewEdgeSVertexIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occludee", _wrap_ViewEdgeSVertexIterator_occludee, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occluded_shape", _wrap_ViewEdgeSVertexIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_occludee_empty", _wrap_ViewEdgeSVertexIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_z_discontinuity", _wrap_ViewEdgeSVertexIterator_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_swigregister", ViewEdgeSVertexIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ViewEdgeViewEdgeIterator", _wrap_new_ViewEdgeViewEdgeIterator, METH_VARARGS, NULL}, + { (char *)"delete_ViewEdgeViewEdgeIterator", _wrap_delete_ViewEdgeViewEdgeIterator, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getExactTypeName", _wrap_ViewEdgeViewEdgeIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getCurrentEdge", _wrap_ViewEdgeViewEdgeIterator_getCurrentEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setCurrentEdge", _wrap_ViewEdgeViewEdgeIterator_setCurrentEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getBegin", _wrap_ViewEdgeViewEdgeIterator_getBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setBegin", _wrap_ViewEdgeViewEdgeIterator_setBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getOrientation", _wrap_ViewEdgeViewEdgeIterator_getOrientation, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setOrientation", _wrap_ViewEdgeViewEdgeIterator_setOrientation, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_changeOrientation", _wrap_ViewEdgeViewEdgeIterator_changeOrientation, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getObject", _wrap_ViewEdgeViewEdgeIterator_getObject, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator___deref__", _wrap_ViewEdgeViewEdgeIterator___deref__, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_increment", _wrap_ViewEdgeViewEdgeIterator_increment, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_decrement", _wrap_ViewEdgeViewEdgeIterator_decrement, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_isBegin", _wrap_ViewEdgeViewEdgeIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_isEnd", _wrap_ViewEdgeViewEdgeIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator___eq__", _wrap_ViewEdgeViewEdgeIterator___eq__, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator___ne__", _wrap_ViewEdgeViewEdgeIterator___ne__, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getId", _wrap_ViewEdgeViewEdgeIterator_getId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getNature", _wrap_ViewEdgeViewEdgeIterator_getNature, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_userdata_set", _wrap_ViewEdgeViewEdgeIterator_userdata_set, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_userdata_get", _wrap_ViewEdgeViewEdgeIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_A", _wrap_ViewEdgeViewEdgeIterator_A, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_B", _wrap_ViewEdgeViewEdgeIterator_B, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_fedgeA", _wrap_ViewEdgeViewEdgeIterator_fedgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_fedgeB", _wrap_ViewEdgeViewEdgeIterator_fedgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_viewShape", _wrap_ViewEdgeViewEdgeIterator_viewShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_aShape", _wrap_ViewEdgeViewEdgeIterator_aShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_isClosed", _wrap_ViewEdgeViewEdgeIterator_isClosed, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getChainingTimeStamp", _wrap_ViewEdgeViewEdgeIterator_getChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_bShape", _wrap_ViewEdgeViewEdgeIterator_bShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluders", _wrap_ViewEdgeViewEdgeIterator_occluders, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_splittingId", _wrap_ViewEdgeViewEdgeIterator_splittingId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetA", _wrap_ViewEdgeViewEdgeIterator_SetA, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetB", _wrap_ViewEdgeViewEdgeIterator_SetB, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetNature", _wrap_ViewEdgeViewEdgeIterator_SetNature, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetFEdgeA", _wrap_ViewEdgeViewEdgeIterator_SetFEdgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetFEdgeB", _wrap_ViewEdgeViewEdgeIterator_SetFEdgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetShape", _wrap_ViewEdgeViewEdgeIterator_SetShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetId", _wrap_ViewEdgeViewEdgeIterator_SetId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_UpdateFEdges", _wrap_ViewEdgeViewEdgeIterator_UpdateFEdges, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetaShape", _wrap_ViewEdgeViewEdgeIterator_SetaShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_SetQI", _wrap_ViewEdgeViewEdgeIterator_SetQI, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setChainingTimeStamp", _wrap_ViewEdgeViewEdgeIterator_setChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_AddOccluder", _wrap_ViewEdgeViewEdgeIterator_AddOccluder, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setSplittingId", _wrap_ViewEdgeViewEdgeIterator_setSplittingId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_intersect_2d_area", _wrap_ViewEdgeViewEdgeIterator_intersect_2d_area, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_include_in_2d_area", _wrap_ViewEdgeViewEdgeIterator_include_in_2d_area, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getLength2D", _wrap_ViewEdgeViewEdgeIterator_getLength2D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_qi", _wrap_ViewEdgeViewEdgeIterator_qi, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluders_begin", _wrap_ViewEdgeViewEdgeIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluders_end", _wrap_ViewEdgeViewEdgeIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluders_size", _wrap_ViewEdgeViewEdgeIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluders_empty", _wrap_ViewEdgeViewEdgeIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occludee", _wrap_ViewEdgeViewEdgeIterator_occludee, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occluded_shape", _wrap_ViewEdgeViewEdgeIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_occludee_empty", _wrap_ViewEdgeViewEdgeIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_shape_id", _wrap_ViewEdgeViewEdgeIterator_shape_id, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_shape", _wrap_ViewEdgeViewEdgeIterator_shape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_shape_importance", _wrap_ViewEdgeViewEdgeIterator_shape_importance, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_verticesBegin", _wrap_ViewEdgeViewEdgeIterator_verticesBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_verticesEnd", _wrap_ViewEdgeViewEdgeIterator_verticesEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_pointsBegin", _wrap_ViewEdgeViewEdgeIterator_pointsBegin, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_pointsEnd", _wrap_ViewEdgeViewEdgeIterator_pointsEnd, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_getTimeStamp", _wrap_ViewEdgeViewEdgeIterator_getTimeStamp, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setTimeStamp", _wrap_ViewEdgeViewEdgeIterator_setTimeStamp, METH_VARARGS, NULL}, + { (char *)"disown_ViewEdgeViewEdgeIterator", _wrap_disown_ViewEdgeViewEdgeIterator, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_swigregister", ViewEdgeViewEdgeIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DVoid", _wrap_new_UnaryFunction0DVoid, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DVoid", _wrap_delete_UnaryFunction0DVoid, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVoid_getName", _wrap_UnaryFunction0DVoid_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVoid___call__", _wrap_UnaryFunction0DVoid___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DVoid", _wrap_disown_UnaryFunction0DVoid, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVoid_swigregister", UnaryFunction0DVoid_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DUnsigned", _wrap_new_UnaryFunction0DUnsigned, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DUnsigned", _wrap_delete_UnaryFunction0DUnsigned, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DUnsigned_getName", _wrap_UnaryFunction0DUnsigned_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DUnsigned___call__", _wrap_UnaryFunction0DUnsigned___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DUnsigned", _wrap_disown_UnaryFunction0DUnsigned, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DUnsigned_swigregister", UnaryFunction0DUnsigned_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DFloat", _wrap_new_UnaryFunction0DFloat, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DFloat", _wrap_delete_UnaryFunction0DFloat, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DFloat_getName", _wrap_UnaryFunction0DFloat_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DFloat___call__", _wrap_UnaryFunction0DFloat___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DFloat", _wrap_disown_UnaryFunction0DFloat, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DFloat_swigregister", UnaryFunction0DFloat_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DDouble", _wrap_new_UnaryFunction0DDouble, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DDouble", _wrap_delete_UnaryFunction0DDouble, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DDouble_getName", _wrap_UnaryFunction0DDouble_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DDouble___call__", _wrap_UnaryFunction0DDouble___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DDouble", _wrap_disown_UnaryFunction0DDouble, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DDouble_swigregister", UnaryFunction0DDouble_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DVec2f", _wrap_new_UnaryFunction0DVec2f, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DVec2f", _wrap_delete_UnaryFunction0DVec2f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec2f_getName", _wrap_UnaryFunction0DVec2f_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec2f___call__", _wrap_UnaryFunction0DVec2f___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DVec2f", _wrap_disown_UnaryFunction0DVec2f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec2f_swigregister", UnaryFunction0DVec2f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DVec3f", _wrap_new_UnaryFunction0DVec3f, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DVec3f", _wrap_delete_UnaryFunction0DVec3f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec3f_getName", _wrap_UnaryFunction0DVec3f_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec3f___call__", _wrap_UnaryFunction0DVec3f___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DVec3f", _wrap_disown_UnaryFunction0DVec3f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVec3f_swigregister", UnaryFunction0DVec3f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DId", _wrap_new_UnaryFunction0DId, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DId", _wrap_delete_UnaryFunction0DId, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DId_getName", _wrap_UnaryFunction0DId_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DId___call__", _wrap_UnaryFunction0DId___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction0DId", _wrap_disown_UnaryFunction0DId, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DId_swigregister", UnaryFunction0DId_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DViewShape", _wrap_new_UnaryFunction0DViewShape, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DViewShape", _wrap_delete_UnaryFunction0DViewShape, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DViewShape_getName", _wrap_UnaryFunction0DViewShape_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DViewShape___call__", _wrap_UnaryFunction0DViewShape___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DViewShape_swigregister", UnaryFunction0DViewShape_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction0DVectorViewShape", _wrap_new_UnaryFunction0DVectorViewShape, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction0DVectorViewShape", _wrap_delete_UnaryFunction0DVectorViewShape, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVectorViewShape_getName", _wrap_UnaryFunction0DVectorViewShape_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVectorViewShape___call__", _wrap_UnaryFunction0DVectorViewShape___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction0DVectorViewShape_swigregister", UnaryFunction0DVectorViewShape_swigregister, METH_VARARGS, NULL}, + { (char *)"GetXF0D_getName", _wrap_GetXF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetXF0D___call__", _wrap_GetXF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetXF0D", _wrap_new_GetXF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetXF0D", _wrap_delete_GetXF0D, METH_VARARGS, NULL}, + { (char *)"GetXF0D_swigregister", GetXF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetYF0D_getName", _wrap_GetYF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetYF0D___call__", _wrap_GetYF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetYF0D", _wrap_new_GetYF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetYF0D", _wrap_delete_GetYF0D, METH_VARARGS, NULL}, + { (char *)"GetYF0D_swigregister", GetYF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetZF0D_getName", _wrap_GetZF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetZF0D___call__", _wrap_GetZF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetZF0D", _wrap_new_GetZF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetZF0D", _wrap_delete_GetZF0D, METH_VARARGS, NULL}, + { (char *)"GetZF0D_swigregister", GetZF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF0D_getName", _wrap_GetProjectedXF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF0D___call__", _wrap_GetProjectedXF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedXF0D", _wrap_new_GetProjectedXF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedXF0D", _wrap_delete_GetProjectedXF0D, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF0D_swigregister", GetProjectedXF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF0D_getName", _wrap_GetProjectedYF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF0D___call__", _wrap_GetProjectedYF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedYF0D", _wrap_new_GetProjectedYF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedYF0D", _wrap_delete_GetProjectedYF0D, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF0D_swigregister", GetProjectedYF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF0D_getName", _wrap_GetProjectedZF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF0D___call__", _wrap_GetProjectedZF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedZF0D", _wrap_new_GetProjectedZF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedZF0D", _wrap_delete_GetProjectedZF0D, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF0D_swigregister", GetProjectedZF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetCurvilinearAbscissaF0D_getName", _wrap_GetCurvilinearAbscissaF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetCurvilinearAbscissaF0D___call__", _wrap_GetCurvilinearAbscissaF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetCurvilinearAbscissaF0D", _wrap_new_GetCurvilinearAbscissaF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetCurvilinearAbscissaF0D", _wrap_delete_GetCurvilinearAbscissaF0D, METH_VARARGS, NULL}, + { (char *)"GetCurvilinearAbscissaF0D_swigregister", GetCurvilinearAbscissaF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetParameterF0D_getName", _wrap_GetParameterF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetParameterF0D___call__", _wrap_GetParameterF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetParameterF0D", _wrap_new_GetParameterF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetParameterF0D", _wrap_delete_GetParameterF0D, METH_VARARGS, NULL}, + { (char *)"GetParameterF0D_swigregister", GetParameterF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"VertexOrientation2DF0D_getName", _wrap_VertexOrientation2DF0D_getName, METH_VARARGS, NULL}, + { (char *)"VertexOrientation2DF0D___call__", _wrap_VertexOrientation2DF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_VertexOrientation2DF0D", _wrap_new_VertexOrientation2DF0D, METH_VARARGS, NULL}, + { (char *)"delete_VertexOrientation2DF0D", _wrap_delete_VertexOrientation2DF0D, METH_VARARGS, NULL}, + { (char *)"VertexOrientation2DF0D_swigregister", VertexOrientation2DF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"VertexOrientation3DF0D_getName", _wrap_VertexOrientation3DF0D_getName, METH_VARARGS, NULL}, + { (char *)"VertexOrientation3DF0D___call__", _wrap_VertexOrientation3DF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_VertexOrientation3DF0D", _wrap_new_VertexOrientation3DF0D, METH_VARARGS, NULL}, + { (char *)"delete_VertexOrientation3DF0D", _wrap_delete_VertexOrientation3DF0D, METH_VARARGS, NULL}, + { (char *)"VertexOrientation3DF0D_swigregister", VertexOrientation3DF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF0D_getName", _wrap_Curvature2DAngleF0D_getName, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF0D___call__", _wrap_Curvature2DAngleF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_Curvature2DAngleF0D", _wrap_new_Curvature2DAngleF0D, METH_VARARGS, NULL}, + { (char *)"delete_Curvature2DAngleF0D", _wrap_delete_Curvature2DAngleF0D, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF0D_swigregister", Curvature2DAngleF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF0D_getName", _wrap_ZDiscontinuityF0D_getName, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF0D___call__", _wrap_ZDiscontinuityF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_ZDiscontinuityF0D", _wrap_new_ZDiscontinuityF0D, METH_VARARGS, NULL}, + { (char *)"delete_ZDiscontinuityF0D", _wrap_delete_ZDiscontinuityF0D, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF0D_swigregister", ZDiscontinuityF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"Normal2DF0D_getName", _wrap_Normal2DF0D_getName, METH_VARARGS, NULL}, + { (char *)"Normal2DF0D___call__", _wrap_Normal2DF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_Normal2DF0D", _wrap_new_Normal2DF0D, METH_VARARGS, NULL}, + { (char *)"delete_Normal2DF0D", _wrap_delete_Normal2DF0D, METH_VARARGS, NULL}, + { (char *)"Normal2DF0D_swigregister", Normal2DF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"MaterialF0D_getName", _wrap_MaterialF0D_getName, METH_VARARGS, NULL}, + { (char *)"MaterialF0D___call__", _wrap_MaterialF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_MaterialF0D", _wrap_new_MaterialF0D, METH_VARARGS, NULL}, + { (char *)"delete_MaterialF0D", _wrap_delete_MaterialF0D, METH_VARARGS, NULL}, + { (char *)"MaterialF0D_swigregister", MaterialF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"ShapeIdF0D_getName", _wrap_ShapeIdF0D_getName, METH_VARARGS, NULL}, + { (char *)"ShapeIdF0D___call__", _wrap_ShapeIdF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_ShapeIdF0D", _wrap_new_ShapeIdF0D, METH_VARARGS, NULL}, + { (char *)"delete_ShapeIdF0D", _wrap_delete_ShapeIdF0D, METH_VARARGS, NULL}, + { (char *)"ShapeIdF0D_swigregister", ShapeIdF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF0D_getName", _wrap_QuantitativeInvisibilityF0D_getName, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF0D___call__", _wrap_QuantitativeInvisibilityF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_QuantitativeInvisibilityF0D", _wrap_new_QuantitativeInvisibilityF0D, METH_VARARGS, NULL}, + { (char *)"delete_QuantitativeInvisibilityF0D", _wrap_delete_QuantitativeInvisibilityF0D, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF0D_swigregister", QuantitativeInvisibilityF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"CurveNatureF0D_getName", _wrap_CurveNatureF0D_getName, METH_VARARGS, NULL}, + { (char *)"CurveNatureF0D___call__", _wrap_CurveNatureF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_CurveNatureF0D", _wrap_new_CurveNatureF0D, METH_VARARGS, NULL}, + { (char *)"delete_CurveNatureF0D", _wrap_delete_CurveNatureF0D, METH_VARARGS, NULL}, + { (char *)"CurveNatureF0D_swigregister", CurveNatureF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetShapeF0D_getName", _wrap_GetShapeF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetShapeF0D___call__", _wrap_GetShapeF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetShapeF0D", _wrap_new_GetShapeF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetShapeF0D", _wrap_delete_GetShapeF0D, METH_VARARGS, NULL}, + { (char *)"GetShapeF0D_swigregister", GetShapeF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetOccludersF0D_getName", _wrap_GetOccludersF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetOccludersF0D___call__", _wrap_GetOccludersF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetOccludersF0D", _wrap_new_GetOccludersF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetOccludersF0D", _wrap_delete_GetOccludersF0D, METH_VARARGS, NULL}, + { (char *)"GetOccludersF0D_swigregister", GetOccludersF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF0D_getName", _wrap_GetOccludeeF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF0D___call__", _wrap_GetOccludeeF0D___call__, METH_VARARGS, NULL}, + { (char *)"new_GetOccludeeF0D", _wrap_new_GetOccludeeF0D, METH_VARARGS, NULL}, + { (char *)"delete_GetOccludeeF0D", _wrap_delete_GetOccludeeF0D, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF0D_swigregister", GetOccludeeF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"getFEdge", _wrap_getFEdge, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DVoid", _wrap_new_UnaryFunction1DVoid, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DVoid", _wrap_delete_UnaryFunction1DVoid, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVoid_getName", _wrap_UnaryFunction1DVoid_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVoid___call__", _wrap_UnaryFunction1DVoid___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVoid_setIntegrationType", _wrap_UnaryFunction1DVoid_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVoid_getIntegrationType", _wrap_UnaryFunction1DVoid_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DVoid", _wrap_disown_UnaryFunction1DVoid, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVoid_swigregister", UnaryFunction1DVoid_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DUnsigned", _wrap_new_UnaryFunction1DUnsigned, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DUnsigned", _wrap_delete_UnaryFunction1DUnsigned, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DUnsigned_getName", _wrap_UnaryFunction1DUnsigned_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DUnsigned___call__", _wrap_UnaryFunction1DUnsigned___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DUnsigned_setIntegrationType", _wrap_UnaryFunction1DUnsigned_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DUnsigned_getIntegrationType", _wrap_UnaryFunction1DUnsigned_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DUnsigned", _wrap_disown_UnaryFunction1DUnsigned, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DUnsigned_swigregister", UnaryFunction1DUnsigned_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DFloat", _wrap_new_UnaryFunction1DFloat, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DFloat", _wrap_delete_UnaryFunction1DFloat, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DFloat_getName", _wrap_UnaryFunction1DFloat_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DFloat___call__", _wrap_UnaryFunction1DFloat___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DFloat_setIntegrationType", _wrap_UnaryFunction1DFloat_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DFloat_getIntegrationType", _wrap_UnaryFunction1DFloat_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DFloat", _wrap_disown_UnaryFunction1DFloat, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DFloat_swigregister", UnaryFunction1DFloat_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DDouble", _wrap_new_UnaryFunction1DDouble, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DDouble", _wrap_delete_UnaryFunction1DDouble, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DDouble_getName", _wrap_UnaryFunction1DDouble_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DDouble___call__", _wrap_UnaryFunction1DDouble___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DDouble_setIntegrationType", _wrap_UnaryFunction1DDouble_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DDouble_getIntegrationType", _wrap_UnaryFunction1DDouble_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DDouble", _wrap_disown_UnaryFunction1DDouble, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DDouble_swigregister", UnaryFunction1DDouble_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DVec2f", _wrap_new_UnaryFunction1DVec2f, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DVec2f", _wrap_delete_UnaryFunction1DVec2f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec2f_getName", _wrap_UnaryFunction1DVec2f_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec2f___call__", _wrap_UnaryFunction1DVec2f___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec2f_setIntegrationType", _wrap_UnaryFunction1DVec2f_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec2f_getIntegrationType", _wrap_UnaryFunction1DVec2f_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DVec2f", _wrap_disown_UnaryFunction1DVec2f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec2f_swigregister", UnaryFunction1DVec2f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DVec3f", _wrap_new_UnaryFunction1DVec3f, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DVec3f", _wrap_delete_UnaryFunction1DVec3f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec3f_getName", _wrap_UnaryFunction1DVec3f_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec3f___call__", _wrap_UnaryFunction1DVec3f___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec3f_setIntegrationType", _wrap_UnaryFunction1DVec3f_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec3f_getIntegrationType", _wrap_UnaryFunction1DVec3f_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"disown_UnaryFunction1DVec3f", _wrap_disown_UnaryFunction1DVec3f, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVec3f_swigregister", UnaryFunction1DVec3f_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryFunction1DVectorViewShape", _wrap_new_UnaryFunction1DVectorViewShape, METH_VARARGS, NULL}, + { (char *)"delete_UnaryFunction1DVectorViewShape", _wrap_delete_UnaryFunction1DVectorViewShape, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVectorViewShape_getName", _wrap_UnaryFunction1DVectorViewShape_getName, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVectorViewShape___call__", _wrap_UnaryFunction1DVectorViewShape___call__, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVectorViewShape_setIntegrationType", _wrap_UnaryFunction1DVectorViewShape_setIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVectorViewShape_getIntegrationType", _wrap_UnaryFunction1DVectorViewShape_getIntegrationType, METH_VARARGS, NULL}, + { (char *)"UnaryFunction1DVectorViewShape_swigregister", UnaryFunction1DVectorViewShape_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetXF1D", _wrap_new_GetXF1D, METH_VARARGS, NULL}, + { (char *)"GetXF1D_getName", _wrap_GetXF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetXF1D___call__", _wrap_GetXF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetXF1D", _wrap_delete_GetXF1D, METH_VARARGS, NULL}, + { (char *)"GetXF1D_swigregister", GetXF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetYF1D", _wrap_new_GetYF1D, METH_VARARGS, NULL}, + { (char *)"GetYF1D_getName", _wrap_GetYF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetYF1D___call__", _wrap_GetYF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetYF1D", _wrap_delete_GetYF1D, METH_VARARGS, NULL}, + { (char *)"GetYF1D_swigregister", GetYF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetZF1D", _wrap_new_GetZF1D, METH_VARARGS, NULL}, + { (char *)"GetZF1D_getName", _wrap_GetZF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetZF1D___call__", _wrap_GetZF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetZF1D", _wrap_delete_GetZF1D, METH_VARARGS, NULL}, + { (char *)"GetZF1D_swigregister", GetZF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedXF1D", _wrap_new_GetProjectedXF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF1D_getName", _wrap_GetProjectedXF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF1D___call__", _wrap_GetProjectedXF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedXF1D", _wrap_delete_GetProjectedXF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedXF1D_swigregister", GetProjectedXF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedYF1D", _wrap_new_GetProjectedYF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF1D_getName", _wrap_GetProjectedYF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF1D___call__", _wrap_GetProjectedYF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedYF1D", _wrap_delete_GetProjectedYF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedYF1D_swigregister", GetProjectedYF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetProjectedZF1D", _wrap_new_GetProjectedZF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF1D_getName", _wrap_GetProjectedZF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF1D___call__", _wrap_GetProjectedZF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetProjectedZF1D", _wrap_delete_GetProjectedZF1D, METH_VARARGS, NULL}, + { (char *)"GetProjectedZF1D_swigregister", GetProjectedZF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Orientation2DF1D", _wrap_new_Orientation2DF1D, METH_VARARGS, NULL}, + { (char *)"Orientation2DF1D_getName", _wrap_Orientation2DF1D_getName, METH_VARARGS, NULL}, + { (char *)"Orientation2DF1D___call__", _wrap_Orientation2DF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_Orientation2DF1D", _wrap_delete_Orientation2DF1D, METH_VARARGS, NULL}, + { (char *)"Orientation2DF1D_swigregister", Orientation2DF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Orientation3DF1D", _wrap_new_Orientation3DF1D, METH_VARARGS, NULL}, + { (char *)"Orientation3DF1D_getName", _wrap_Orientation3DF1D_getName, METH_VARARGS, NULL}, + { (char *)"Orientation3DF1D___call__", _wrap_Orientation3DF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_Orientation3DF1D", _wrap_delete_Orientation3DF1D, METH_VARARGS, NULL}, + { (char *)"Orientation3DF1D_swigregister", Orientation3DF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ZDiscontinuityF1D", _wrap_new_ZDiscontinuityF1D, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF1D_getName", _wrap_ZDiscontinuityF1D_getName, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF1D___call__", _wrap_ZDiscontinuityF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ZDiscontinuityF1D", _wrap_delete_ZDiscontinuityF1D, METH_VARARGS, NULL}, + { (char *)"ZDiscontinuityF1D_swigregister", ZDiscontinuityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_QuantitativeInvisibilityF1D", _wrap_new_QuantitativeInvisibilityF1D, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF1D_getName", _wrap_QuantitativeInvisibilityF1D_getName, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF1D___call__", _wrap_QuantitativeInvisibilityF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_QuantitativeInvisibilityF1D", _wrap_delete_QuantitativeInvisibilityF1D, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityF1D_swigregister", QuantitativeInvisibilityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_CurveNatureF1D", _wrap_new_CurveNatureF1D, METH_VARARGS, NULL}, + { (char *)"CurveNatureF1D_getName", _wrap_CurveNatureF1D_getName, METH_VARARGS, NULL}, + { (char *)"CurveNatureF1D___call__", _wrap_CurveNatureF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_CurveNatureF1D", _wrap_delete_CurveNatureF1D, METH_VARARGS, NULL}, + { (char *)"CurveNatureF1D_swigregister", CurveNatureF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"TimeStampF1D_getName", _wrap_TimeStampF1D_getName, METH_VARARGS, NULL}, + { (char *)"TimeStampF1D___call__", _wrap_TimeStampF1D___call__, METH_VARARGS, NULL}, + { (char *)"new_TimeStampF1D", _wrap_new_TimeStampF1D, METH_VARARGS, NULL}, + { (char *)"delete_TimeStampF1D", _wrap_delete_TimeStampF1D, METH_VARARGS, NULL}, + { (char *)"TimeStampF1D_swigregister", TimeStampF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"IncrementChainingTimeStampF1D_getName", _wrap_IncrementChainingTimeStampF1D_getName, METH_VARARGS, NULL}, + { (char *)"IncrementChainingTimeStampF1D___call__", _wrap_IncrementChainingTimeStampF1D___call__, METH_VARARGS, NULL}, + { (char *)"new_IncrementChainingTimeStampF1D", _wrap_new_IncrementChainingTimeStampF1D, METH_VARARGS, NULL}, + { (char *)"delete_IncrementChainingTimeStampF1D", _wrap_delete_IncrementChainingTimeStampF1D, METH_VARARGS, NULL}, + { (char *)"IncrementChainingTimeStampF1D_swigregister", IncrementChainingTimeStampF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"ChainingTimeStampF1D_getName", _wrap_ChainingTimeStampF1D_getName, METH_VARARGS, NULL}, + { (char *)"ChainingTimeStampF1D___call__", _wrap_ChainingTimeStampF1D___call__, METH_VARARGS, NULL}, + { (char *)"new_ChainingTimeStampF1D", _wrap_new_ChainingTimeStampF1D, METH_VARARGS, NULL}, + { (char *)"delete_ChainingTimeStampF1D", _wrap_delete_ChainingTimeStampF1D, METH_VARARGS, NULL}, + { (char *)"ChainingTimeStampF1D_swigregister", ChainingTimeStampF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Curvature2DAngleF1D", _wrap_new_Curvature2DAngleF1D, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF1D_getName", _wrap_Curvature2DAngleF1D_getName, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF1D___call__", _wrap_Curvature2DAngleF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_Curvature2DAngleF1D", _wrap_delete_Curvature2DAngleF1D, METH_VARARGS, NULL}, + { (char *)"Curvature2DAngleF1D_swigregister", Curvature2DAngleF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Normal2DF1D", _wrap_new_Normal2DF1D, METH_VARARGS, NULL}, + { (char *)"Normal2DF1D_getName", _wrap_Normal2DF1D_getName, METH_VARARGS, NULL}, + { (char *)"Normal2DF1D___call__", _wrap_Normal2DF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_Normal2DF1D", _wrap_delete_Normal2DF1D, METH_VARARGS, NULL}, + { (char *)"Normal2DF1D_swigregister", Normal2DF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetShapeF1D", _wrap_new_GetShapeF1D, METH_VARARGS, NULL}, + { (char *)"GetShapeF1D_getName", _wrap_GetShapeF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetShapeF1D___call__", _wrap_GetShapeF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetShapeF1D", _wrap_delete_GetShapeF1D, METH_VARARGS, NULL}, + { (char *)"GetShapeF1D_swigregister", GetShapeF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetOccludersF1D", _wrap_new_GetOccludersF1D, METH_VARARGS, NULL}, + { (char *)"GetOccludersF1D_getName", _wrap_GetOccludersF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetOccludersF1D___call__", _wrap_GetOccludersF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetOccludersF1D", _wrap_delete_GetOccludersF1D, METH_VARARGS, NULL}, + { (char *)"GetOccludersF1D_swigregister", GetOccludersF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetOccludeeF1D", _wrap_new_GetOccludeeF1D, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF1D_getName", _wrap_GetOccludeeF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF1D___call__", _wrap_GetOccludeeF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetOccludeeF1D", _wrap_delete_GetOccludeeF1D, METH_VARARGS, NULL}, + { (char *)"GetOccludeeF1D_swigregister", GetOccludeeF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"Module_setAlwaysRefresh", _wrap_Module_setAlwaysRefresh, METH_VARARGS, NULL}, + { (char *)"Module_setCausal", _wrap_Module_setCausal, METH_VARARGS, NULL}, + { (char *)"Module_setDrawable", _wrap_Module_setDrawable, METH_VARARGS, NULL}, + { (char *)"Module_getAlwaysRefresh", _wrap_Module_getAlwaysRefresh, METH_VARARGS, NULL}, + { (char *)"Module_getCausal", _wrap_Module_getCausal, METH_VARARGS, NULL}, + { (char *)"Module_getDrawable", _wrap_Module_getDrawable, METH_VARARGS, NULL}, + { (char *)"new_Module", _wrap_new_Module, METH_VARARGS, NULL}, + { (char *)"delete_Module", _wrap_delete_Module, METH_VARARGS, NULL}, + { (char *)"Module_swigregister", Module_swigregister, METH_VARARGS, NULL}, + { (char *)"new_DensityF0D", _wrap_new_DensityF0D, METH_VARARGS, NULL}, + { (char *)"DensityF0D_getName", _wrap_DensityF0D_getName, METH_VARARGS, NULL}, + { (char *)"DensityF0D___call__", _wrap_DensityF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_DensityF0D", _wrap_delete_DensityF0D, METH_VARARGS, NULL}, + { (char *)"DensityF0D_swigregister", DensityF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_LocalAverageDepthF0D", _wrap_new_LocalAverageDepthF0D, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF0D_getName", _wrap_LocalAverageDepthF0D_getName, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF0D___call__", _wrap_LocalAverageDepthF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_LocalAverageDepthF0D", _wrap_delete_LocalAverageDepthF0D, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF0D_swigregister", LocalAverageDepthF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ReadMapPixelF0D", _wrap_new_ReadMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadMapPixelF0D_getName", _wrap_ReadMapPixelF0D_getName, METH_VARARGS, NULL}, + { (char *)"ReadMapPixelF0D___call__", _wrap_ReadMapPixelF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ReadMapPixelF0D", _wrap_delete_ReadMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadMapPixelF0D_swigregister", ReadMapPixelF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ReadSteerableViewMapPixelF0D", _wrap_new_ReadSteerableViewMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadSteerableViewMapPixelF0D_getName", _wrap_ReadSteerableViewMapPixelF0D_getName, METH_VARARGS, NULL}, + { (char *)"ReadSteerableViewMapPixelF0D___call__", _wrap_ReadSteerableViewMapPixelF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ReadSteerableViewMapPixelF0D", _wrap_delete_ReadSteerableViewMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadSteerableViewMapPixelF0D_swigregister", ReadSteerableViewMapPixelF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ReadCompleteViewMapPixelF0D", _wrap_new_ReadCompleteViewMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadCompleteViewMapPixelF0D_getName", _wrap_ReadCompleteViewMapPixelF0D_getName, METH_VARARGS, NULL}, + { (char *)"ReadCompleteViewMapPixelF0D___call__", _wrap_ReadCompleteViewMapPixelF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ReadCompleteViewMapPixelF0D", _wrap_delete_ReadCompleteViewMapPixelF0D, METH_VARARGS, NULL}, + { (char *)"ReadCompleteViewMapPixelF0D_swigregister", ReadCompleteViewMapPixelF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetViewMapGradientNormF0D", _wrap_new_GetViewMapGradientNormF0D, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF0D_getName", _wrap_GetViewMapGradientNormF0D_getName, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF0D___call__", _wrap_GetViewMapGradientNormF0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetViewMapGradientNormF0D", _wrap_delete_GetViewMapGradientNormF0D, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF0D_swigregister", GetViewMapGradientNormF0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_DensityF1D", _wrap_new_DensityF1D, METH_VARARGS, NULL}, + { (char *)"delete_DensityF1D", _wrap_delete_DensityF1D, METH_VARARGS, NULL}, + { (char *)"DensityF1D_getName", _wrap_DensityF1D_getName, METH_VARARGS, NULL}, + { (char *)"DensityF1D___call__", _wrap_DensityF1D___call__, METH_VARARGS, NULL}, + { (char *)"DensityF1D_swigregister", DensityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_LocalAverageDepthF1D", _wrap_new_LocalAverageDepthF1D, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF1D_getName", _wrap_LocalAverageDepthF1D_getName, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF1D___call__", _wrap_LocalAverageDepthF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_LocalAverageDepthF1D", _wrap_delete_LocalAverageDepthF1D, METH_VARARGS, NULL}, + { (char *)"LocalAverageDepthF1D_swigregister", LocalAverageDepthF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetCompleteViewMapDensityF1D", _wrap_new_GetCompleteViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"GetCompleteViewMapDensityF1D_getName", _wrap_GetCompleteViewMapDensityF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetCompleteViewMapDensityF1D___call__", _wrap_GetCompleteViewMapDensityF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetCompleteViewMapDensityF1D", _wrap_delete_GetCompleteViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"GetCompleteViewMapDensityF1D_swigregister", GetCompleteViewMapDensityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetDirectionalViewMapDensityF1D", _wrap_new_GetDirectionalViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"GetDirectionalViewMapDensityF1D_getName", _wrap_GetDirectionalViewMapDensityF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetDirectionalViewMapDensityF1D___call__", _wrap_GetDirectionalViewMapDensityF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetDirectionalViewMapDensityF1D", _wrap_delete_GetDirectionalViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"GetDirectionalViewMapDensityF1D_swigregister", GetDirectionalViewMapDensityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetSteerableViewMapDensityF1D", _wrap_new_GetSteerableViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"delete_GetSteerableViewMapDensityF1D", _wrap_delete_GetSteerableViewMapDensityF1D, METH_VARARGS, NULL}, + { (char *)"GetSteerableViewMapDensityF1D_getName", _wrap_GetSteerableViewMapDensityF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetSteerableViewMapDensityF1D___call__", _wrap_GetSteerableViewMapDensityF1D___call__, METH_VARARGS, NULL}, + { (char *)"GetSteerableViewMapDensityF1D_swigregister", GetSteerableViewMapDensityF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GetViewMapGradientNormF1D", _wrap_new_GetViewMapGradientNormF1D, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF1D_getName", _wrap_GetViewMapGradientNormF1D_getName, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF1D___call__", _wrap_GetViewMapGradientNormF1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_GetViewMapGradientNormF1D", _wrap_delete_GetViewMapGradientNormF1D, METH_VARARGS, NULL}, + { (char *)"GetViewMapGradientNormF1D_swigregister", GetViewMapGradientNormF1D_swigregister, METH_VARARGS, NULL}, + { (char *)"GetTimeStampCF", _wrap_GetTimeStampCF, METH_VARARGS, NULL}, + { (char *)"GetCanvasWidthCF", _wrap_GetCanvasWidthCF, METH_VARARGS, NULL}, + { (char *)"GetCanvasHeightCF", _wrap_GetCanvasHeightCF, METH_VARARGS, NULL}, + { (char *)"LoadMapCF", _wrap_LoadMapCF, METH_VARARGS, NULL}, + { (char *)"ReadMapPixelCF", _wrap_ReadMapPixelCF, METH_VARARGS, NULL}, + { (char *)"ReadCompleteViewMapPixelCF", _wrap_ReadCompleteViewMapPixelCF, METH_VARARGS, NULL}, + { (char *)"ReadDirectionalViewMapPixelCF", _wrap_ReadDirectionalViewMapPixelCF, METH_VARARGS, NULL}, + { (char *)"GetSelectedFEdgeCF", _wrap_GetSelectedFEdgeCF, METH_VARARGS, NULL}, + { (char *)"new_AdjacencyIterator", _wrap_new_AdjacencyIterator, METH_VARARGS, NULL}, + { (char *)"delete_AdjacencyIterator", _wrap_delete_AdjacencyIterator, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_isEnd", _wrap_AdjacencyIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_isBegin", _wrap_AdjacencyIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_isIncoming", _wrap_AdjacencyIterator_isIncoming, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getObject", _wrap_AdjacencyIterator_getObject, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator___deref__", _wrap_AdjacencyIterator___deref__, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_increment", _wrap_AdjacencyIterator_increment, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getExactTypeName", _wrap_AdjacencyIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getId", _wrap_AdjacencyIterator_getId, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getNature", _wrap_AdjacencyIterator_getNature, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_userdata_set", _wrap_AdjacencyIterator_userdata_set, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_userdata_get", _wrap_AdjacencyIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_A", _wrap_AdjacencyIterator_A, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_B", _wrap_AdjacencyIterator_B, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_fedgeA", _wrap_AdjacencyIterator_fedgeA, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_fedgeB", _wrap_AdjacencyIterator_fedgeB, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_viewShape", _wrap_AdjacencyIterator_viewShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_aShape", _wrap_AdjacencyIterator_aShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_isClosed", _wrap_AdjacencyIterator_isClosed, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getChainingTimeStamp", _wrap_AdjacencyIterator_getChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_bShape", _wrap_AdjacencyIterator_bShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluders", _wrap_AdjacencyIterator_occluders, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_splittingId", _wrap_AdjacencyIterator_splittingId, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetA", _wrap_AdjacencyIterator_SetA, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetB", _wrap_AdjacencyIterator_SetB, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetNature", _wrap_AdjacencyIterator_SetNature, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetFEdgeA", _wrap_AdjacencyIterator_SetFEdgeA, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetFEdgeB", _wrap_AdjacencyIterator_SetFEdgeB, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetShape", _wrap_AdjacencyIterator_SetShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetId", _wrap_AdjacencyIterator_SetId, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_UpdateFEdges", _wrap_AdjacencyIterator_UpdateFEdges, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetaShape", _wrap_AdjacencyIterator_SetaShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_SetQI", _wrap_AdjacencyIterator_SetQI, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setChainingTimeStamp", _wrap_AdjacencyIterator_setChainingTimeStamp, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_AddOccluder", _wrap_AdjacencyIterator_AddOccluder, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setSplittingId", _wrap_AdjacencyIterator_setSplittingId, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_intersect_2d_area", _wrap_AdjacencyIterator_intersect_2d_area, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_include_in_2d_area", _wrap_AdjacencyIterator_include_in_2d_area, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getLength2D", _wrap_AdjacencyIterator_getLength2D, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_qi", _wrap_AdjacencyIterator_qi, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluders_begin", _wrap_AdjacencyIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluders_end", _wrap_AdjacencyIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluders_size", _wrap_AdjacencyIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluders_empty", _wrap_AdjacencyIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occludee", _wrap_AdjacencyIterator_occludee, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occluded_shape", _wrap_AdjacencyIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_occludee_empty", _wrap_AdjacencyIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_shape_id", _wrap_AdjacencyIterator_shape_id, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_shape", _wrap_AdjacencyIterator_shape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_shape_importance", _wrap_AdjacencyIterator_shape_importance, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_verticesBegin", _wrap_AdjacencyIterator_verticesBegin, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_verticesEnd", _wrap_AdjacencyIterator_verticesEnd, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_pointsBegin", _wrap_AdjacencyIterator_pointsBegin, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_pointsEnd", _wrap_AdjacencyIterator_pointsEnd, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getTimeStamp", _wrap_AdjacencyIterator_getTimeStamp, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setTimeStamp", _wrap_AdjacencyIterator_setTimeStamp, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_swigregister", AdjacencyIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ChainingIterator", _wrap_new_ChainingIterator, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_getExactTypeName", _wrap_ChainingIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_init", _wrap_ChainingIterator_init, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_traverse", _wrap_ChainingIterator_traverse, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_getVertex", _wrap_ChainingIterator_getVertex, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_isIncrementing", _wrap_ChainingIterator_isIncrementing, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_increment", _wrap_ChainingIterator_increment, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_decrement", _wrap_ChainingIterator_decrement, METH_VARARGS, NULL}, + { (char *)"delete_ChainingIterator", _wrap_delete_ChainingIterator, METH_VARARGS, NULL}, + { (char *)"disown_ChainingIterator", _wrap_disown_ChainingIterator, METH_VARARGS, NULL}, + { (char *)"ChainingIterator_swigregister", ChainingIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ChainSilhouetteIterator", _wrap_new_ChainSilhouetteIterator, METH_VARARGS, NULL}, + { (char *)"ChainSilhouetteIterator_getExactTypeName", _wrap_ChainSilhouetteIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ChainSilhouetteIterator_traverse", _wrap_ChainSilhouetteIterator_traverse, METH_VARARGS, NULL}, + { (char *)"delete_ChainSilhouetteIterator", _wrap_delete_ChainSilhouetteIterator, METH_VARARGS, NULL}, + { (char *)"disown_ChainSilhouetteIterator", _wrap_disown_ChainSilhouetteIterator, METH_VARARGS, NULL}, + { (char *)"ChainSilhouetteIterator_swigregister", ChainSilhouetteIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ChainPredicateIterator", _wrap_new_ChainPredicateIterator, METH_VARARGS, NULL}, + { (char *)"delete_ChainPredicateIterator", _wrap_delete_ChainPredicateIterator, METH_VARARGS, NULL}, + { (char *)"ChainPredicateIterator_getExactTypeName", _wrap_ChainPredicateIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"ChainPredicateIterator_traverse", _wrap_ChainPredicateIterator_traverse, METH_VARARGS, NULL}, + { (char *)"disown_ChainPredicateIterator", _wrap_disown_ChainPredicateIterator, METH_VARARGS, NULL}, + { (char *)"ChainPredicateIterator_swigregister", ChainPredicateIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryPredicate0D", _wrap_new_UnaryPredicate0D, METH_VARARGS, NULL}, + { (char *)"delete_UnaryPredicate0D", _wrap_delete_UnaryPredicate0D, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate0D_getName", _wrap_UnaryPredicate0D_getName, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate0D___call__", _wrap_UnaryPredicate0D___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryPredicate0D", _wrap_disown_UnaryPredicate0D, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate0D_swigregister", UnaryPredicate0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_BinaryPredicate0D", _wrap_new_BinaryPredicate0D, METH_VARARGS, NULL}, + { (char *)"delete_BinaryPredicate0D", _wrap_delete_BinaryPredicate0D, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate0D_getName", _wrap_BinaryPredicate0D_getName, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate0D___call__", _wrap_BinaryPredicate0D___call__, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate0D_swigregister", BinaryPredicate0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_TrueUP0D", _wrap_new_TrueUP0D, METH_VARARGS, NULL}, + { (char *)"TrueUP0D_getName", _wrap_TrueUP0D_getName, METH_VARARGS, NULL}, + { (char *)"TrueUP0D___call__", _wrap_TrueUP0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_TrueUP0D", _wrap_delete_TrueUP0D, METH_VARARGS, NULL}, + { (char *)"TrueUP0D_swigregister", TrueUP0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_FalseUP0D", _wrap_new_FalseUP0D, METH_VARARGS, NULL}, + { (char *)"FalseUP0D_getName", _wrap_FalseUP0D_getName, METH_VARARGS, NULL}, + { (char *)"FalseUP0D___call__", _wrap_FalseUP0D___call__, METH_VARARGS, NULL}, + { (char *)"delete_FalseUP0D", _wrap_delete_FalseUP0D, METH_VARARGS, NULL}, + { (char *)"FalseUP0D_swigregister", FalseUP0D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_UnaryPredicate1D", _wrap_new_UnaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"delete_UnaryPredicate1D", _wrap_delete_UnaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate1D_getName", _wrap_UnaryPredicate1D_getName, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate1D___call__", _wrap_UnaryPredicate1D___call__, METH_VARARGS, NULL}, + { (char *)"disown_UnaryPredicate1D", _wrap_disown_UnaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"UnaryPredicate1D_swigregister", UnaryPredicate1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_BinaryPredicate1D", _wrap_new_BinaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"delete_BinaryPredicate1D", _wrap_delete_BinaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate1D_getName", _wrap_BinaryPredicate1D_getName, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate1D___call__", _wrap_BinaryPredicate1D___call__, METH_VARARGS, NULL}, + { (char *)"disown_BinaryPredicate1D", _wrap_disown_BinaryPredicate1D, METH_VARARGS, NULL}, + { (char *)"BinaryPredicate1D_swigregister", BinaryPredicate1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_TrueUP1D", _wrap_new_TrueUP1D, METH_VARARGS, NULL}, + { (char *)"TrueUP1D_getName", _wrap_TrueUP1D_getName, METH_VARARGS, NULL}, + { (char *)"TrueUP1D___call__", _wrap_TrueUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_TrueUP1D", _wrap_delete_TrueUP1D, METH_VARARGS, NULL}, + { (char *)"TrueUP1D_swigregister", TrueUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_FalseUP1D", _wrap_new_FalseUP1D, METH_VARARGS, NULL}, + { (char *)"FalseUP1D_getName", _wrap_FalseUP1D_getName, METH_VARARGS, NULL}, + { (char *)"FalseUP1D___call__", _wrap_FalseUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_FalseUP1D", _wrap_delete_FalseUP1D, METH_VARARGS, NULL}, + { (char *)"FalseUP1D_swigregister", FalseUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_QuantitativeInvisibilityUP1D", _wrap_new_QuantitativeInvisibilityUP1D, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityUP1D_getName", _wrap_QuantitativeInvisibilityUP1D_getName, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityUP1D___call__", _wrap_QuantitativeInvisibilityUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_QuantitativeInvisibilityUP1D", _wrap_delete_QuantitativeInvisibilityUP1D, METH_VARARGS, NULL}, + { (char *)"QuantitativeInvisibilityUP1D_swigregister", QuantitativeInvisibilityUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"ContourUP1D_getName", _wrap_ContourUP1D_getName, METH_VARARGS, NULL}, + { (char *)"ContourUP1D___call__", _wrap_ContourUP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_ContourUP1D", _wrap_new_ContourUP1D, METH_VARARGS, NULL}, + { (char *)"delete_ContourUP1D", _wrap_delete_ContourUP1D, METH_VARARGS, NULL}, + { (char *)"ContourUP1D_swigregister", ContourUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"ExternalContourUP1D_getName", _wrap_ExternalContourUP1D_getName, METH_VARARGS, NULL}, + { (char *)"ExternalContourUP1D___call__", _wrap_ExternalContourUP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_ExternalContourUP1D", _wrap_new_ExternalContourUP1D, METH_VARARGS, NULL}, + { (char *)"delete_ExternalContourUP1D", _wrap_delete_ExternalContourUP1D, METH_VARARGS, NULL}, + { (char *)"ExternalContourUP1D_swigregister", ExternalContourUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_EqualToTimeStampUP1D", _wrap_new_EqualToTimeStampUP1D, METH_VARARGS, NULL}, + { (char *)"EqualToTimeStampUP1D_getName", _wrap_EqualToTimeStampUP1D_getName, METH_VARARGS, NULL}, + { (char *)"EqualToTimeStampUP1D___call__", _wrap_EqualToTimeStampUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_EqualToTimeStampUP1D", _wrap_delete_EqualToTimeStampUP1D, METH_VARARGS, NULL}, + { (char *)"EqualToTimeStampUP1D_swigregister", EqualToTimeStampUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_EqualToChainingTimeStampUP1D", _wrap_new_EqualToChainingTimeStampUP1D, METH_VARARGS, NULL}, + { (char *)"EqualToChainingTimeStampUP1D_getName", _wrap_EqualToChainingTimeStampUP1D_getName, METH_VARARGS, NULL}, + { (char *)"EqualToChainingTimeStampUP1D___call__", _wrap_EqualToChainingTimeStampUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_EqualToChainingTimeStampUP1D", _wrap_delete_EqualToChainingTimeStampUP1D, METH_VARARGS, NULL}, + { (char *)"EqualToChainingTimeStampUP1D_swigregister", EqualToChainingTimeStampUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ShapeUP1D", _wrap_new_ShapeUP1D, METH_VARARGS, NULL}, + { (char *)"ShapeUP1D_getName", _wrap_ShapeUP1D_getName, METH_VARARGS, NULL}, + { (char *)"ShapeUP1D___call__", _wrap_ShapeUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ShapeUP1D", _wrap_delete_ShapeUP1D, METH_VARARGS, NULL}, + { (char *)"ShapeUP1D_swigregister", ShapeUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"TrueBP1D_getName", _wrap_TrueBP1D_getName, METH_VARARGS, NULL}, + { (char *)"TrueBP1D___call__", _wrap_TrueBP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_TrueBP1D", _wrap_new_TrueBP1D, METH_VARARGS, NULL}, + { (char *)"delete_TrueBP1D", _wrap_delete_TrueBP1D, METH_VARARGS, NULL}, + { (char *)"TrueBP1D_swigregister", TrueBP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"FalseBP1D_getName", _wrap_FalseBP1D_getName, METH_VARARGS, NULL}, + { (char *)"FalseBP1D___call__", _wrap_FalseBP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_FalseBP1D", _wrap_new_FalseBP1D, METH_VARARGS, NULL}, + { (char *)"delete_FalseBP1D", _wrap_delete_FalseBP1D, METH_VARARGS, NULL}, + { (char *)"FalseBP1D_swigregister", FalseBP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"Length2DBP1D_getName", _wrap_Length2DBP1D_getName, METH_VARARGS, NULL}, + { (char *)"Length2DBP1D___call__", _wrap_Length2DBP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_Length2DBP1D", _wrap_new_Length2DBP1D, METH_VARARGS, NULL}, + { (char *)"delete_Length2DBP1D", _wrap_delete_Length2DBP1D, METH_VARARGS, NULL}, + { (char *)"Length2DBP1D_swigregister", Length2DBP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"SameShapeIdBP1D_getName", _wrap_SameShapeIdBP1D_getName, METH_VARARGS, NULL}, + { (char *)"SameShapeIdBP1D___call__", _wrap_SameShapeIdBP1D___call__, METH_VARARGS, NULL}, + { (char *)"new_SameShapeIdBP1D", _wrap_new_SameShapeIdBP1D, METH_VARARGS, NULL}, + { (char *)"delete_SameShapeIdBP1D", _wrap_delete_SameShapeIdBP1D, METH_VARARGS, NULL}, + { (char *)"SameShapeIdBP1D_swigregister", SameShapeIdBP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ViewMapGradientNormBP1D", _wrap_new_ViewMapGradientNormBP1D, METH_VARARGS, NULL}, + { (char *)"ViewMapGradientNormBP1D_getName", _wrap_ViewMapGradientNormBP1D_getName, METH_VARARGS, NULL}, + { (char *)"ViewMapGradientNormBP1D___call__", _wrap_ViewMapGradientNormBP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_ViewMapGradientNormBP1D", _wrap_delete_ViewMapGradientNormBP1D, METH_VARARGS, NULL}, + { (char *)"ViewMapGradientNormBP1D_swigregister", ViewMapGradientNormBP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"new_DensityLowerThanUP1D", _wrap_new_DensityLowerThanUP1D, METH_VARARGS, NULL}, + { (char *)"DensityLowerThanUP1D_getName", _wrap_DensityLowerThanUP1D_getName, METH_VARARGS, NULL}, + { (char *)"DensityLowerThanUP1D___call__", _wrap_DensityLowerThanUP1D___call__, METH_VARARGS, NULL}, + { (char *)"delete_DensityLowerThanUP1D", _wrap_delete_DensityLowerThanUP1D, METH_VARARGS, NULL}, + { (char *)"DensityLowerThanUP1D_swigregister", DensityLowerThanUP1D_swigregister, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__CurvilinearLength_set", _wrap_CurvePointIterator__CurvilinearLength_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__CurvilinearLength_get", _wrap_CurvePointIterator__CurvilinearLength_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__step_set", _wrap_CurvePointIterator__step_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__step_get", _wrap_CurvePointIterator__step_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___A_set", _wrap_CurvePointIterator___A_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___A_get", _wrap_CurvePointIterator___A_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___B_set", _wrap_CurvePointIterator___B_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___B_get", _wrap_CurvePointIterator___B_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__begin_set", _wrap_CurvePointIterator__begin_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__begin_get", _wrap_CurvePointIterator__begin_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__end_set", _wrap_CurvePointIterator__end_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__end_get", _wrap_CurvePointIterator__end_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__n_set", _wrap_CurvePointIterator__n_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__n_get", _wrap_CurvePointIterator__n_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__currentn_set", _wrap_CurvePointIterator__currentn_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__currentn_get", _wrap_CurvePointIterator__currentn_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__t_set", _wrap_CurvePointIterator__t_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__t_get", _wrap_CurvePointIterator__t_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__Point_set", _wrap_CurvePointIterator__Point_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__Point_get", _wrap_CurvePointIterator__Point_get, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__CurveLength_set", _wrap_CurvePointIterator__CurveLength_set, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator__CurveLength_get", _wrap_CurvePointIterator__CurveLength_get, METH_VARARGS, NULL}, + { (char *)"new_CurvePointIterator", _wrap_new_CurvePointIterator, METH_VARARGS, NULL}, + { (char *)"delete_CurvePointIterator", _wrap_delete_CurvePointIterator, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_copy", _wrap_CurvePointIterator_copy, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_CastToInterface0DIterator", _wrap_CurvePointIterator_CastToInterface0DIterator, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getExactTypeName", _wrap_CurvePointIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___eq__", _wrap_CurvePointIterator___eq__, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getObject", _wrap_CurvePointIterator_getObject, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator___deref__", _wrap_CurvePointIterator___deref__, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_isBegin", _wrap_CurvePointIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_isEnd", _wrap_CurvePointIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getX", _wrap_CurvePointIterator_getX, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getY", _wrap_CurvePointIterator_getY, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getZ", _wrap_CurvePointIterator_getZ, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getPoint3D", _wrap_CurvePointIterator_getPoint3D, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getProjectedX", _wrap_CurvePointIterator_getProjectedX, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getProjectedY", _wrap_CurvePointIterator_getProjectedY, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getProjectedZ", _wrap_CurvePointIterator_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getPoint2D", _wrap_CurvePointIterator_getPoint2D, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getFEdge", _wrap_CurvePointIterator_getFEdge, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getId", _wrap_CurvePointIterator_getId, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_getNature", _wrap_CurvePointIterator_getNature, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_castToSVertex", _wrap_CurvePointIterator_castToSVertex, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_castToViewVertex", _wrap_CurvePointIterator_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_castToNonTVertex", _wrap_CurvePointIterator_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_castToTVertex", _wrap_CurvePointIterator_castToTVertex, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_A", _wrap_CurvePointIterator_A, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_B", _wrap_CurvePointIterator_B, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_t2d", _wrap_CurvePointIterator_t2d, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_SetA", _wrap_CurvePointIterator_SetA, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_SetB", _wrap_CurvePointIterator_SetB, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_SetT2d", _wrap_CurvePointIterator_SetT2d, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_fedge", _wrap_CurvePointIterator_fedge, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_point2d", _wrap_CurvePointIterator_point2d, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_point3d", _wrap_CurvePointIterator_point3d, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_normal", _wrap_CurvePointIterator_normal, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_shape", _wrap_CurvePointIterator_shape, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occluders_begin", _wrap_CurvePointIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occluders_end", _wrap_CurvePointIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occluders_empty", _wrap_CurvePointIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occluders_size", _wrap_CurvePointIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occludee", _wrap_CurvePointIterator_occludee, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occluded_shape", _wrap_CurvePointIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_occludee_empty", _wrap_CurvePointIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_z_discontinuity", _wrap_CurvePointIterator_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_curvatureFredo", _wrap_CurvePointIterator_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_directionFredo", _wrap_CurvePointIterator_directionFredo, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_swigregister", CurvePointIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getExactTypeName", _wrap_CurvePoint_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getX", _wrap_CurvePoint_getX, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getY", _wrap_CurvePoint_getY, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getZ", _wrap_CurvePoint_getZ, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getPoint3D", _wrap_CurvePoint_getPoint3D, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getProjectedX", _wrap_CurvePoint_getProjectedX, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getProjectedY", _wrap_CurvePoint_getProjectedY, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getProjectedZ", _wrap_CurvePoint_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getPoint2D", _wrap_CurvePoint_getPoint2D, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getFEdge", _wrap_CurvePoint_getFEdge, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getId", _wrap_CurvePoint_getId, METH_VARARGS, NULL}, + { (char *)"CurvePoint_getNature", _wrap_CurvePoint_getNature, METH_VARARGS, NULL}, + { (char *)"CurvePoint_castToSVertex", _wrap_CurvePoint_castToSVertex, METH_VARARGS, NULL}, + { (char *)"CurvePoint_castToViewVertex", _wrap_CurvePoint_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"CurvePoint_castToNonTVertex", _wrap_CurvePoint_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"CurvePoint_castToTVertex", _wrap_CurvePoint_castToTVertex, METH_VARARGS, NULL}, + { (char *)"new_CurvePoint", _wrap_new_CurvePoint, METH_VARARGS, NULL}, + { (char *)"delete_CurvePoint", _wrap_delete_CurvePoint, METH_VARARGS, NULL}, + { (char *)"CurvePoint___eq__", _wrap_CurvePoint___eq__, METH_VARARGS, NULL}, + { (char *)"CurvePoint_A", _wrap_CurvePoint_A, METH_VARARGS, NULL}, + { (char *)"CurvePoint_B", _wrap_CurvePoint_B, METH_VARARGS, NULL}, + { (char *)"CurvePoint_t2d", _wrap_CurvePoint_t2d, METH_VARARGS, NULL}, + { (char *)"CurvePoint_SetA", _wrap_CurvePoint_SetA, METH_VARARGS, NULL}, + { (char *)"CurvePoint_SetB", _wrap_CurvePoint_SetB, METH_VARARGS, NULL}, + { (char *)"CurvePoint_SetT2d", _wrap_CurvePoint_SetT2d, METH_VARARGS, NULL}, + { (char *)"CurvePoint_fedge", _wrap_CurvePoint_fedge, METH_VARARGS, NULL}, + { (char *)"CurvePoint_point2d", _wrap_CurvePoint_point2d, METH_VARARGS, NULL}, + { (char *)"CurvePoint_point3d", _wrap_CurvePoint_point3d, METH_VARARGS, NULL}, + { (char *)"CurvePoint_normal", _wrap_CurvePoint_normal, METH_VARARGS, NULL}, + { (char *)"CurvePoint_shape", _wrap_CurvePoint_shape, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occluders_begin", _wrap_CurvePoint_occluders_begin, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occluders_end", _wrap_CurvePoint_occluders_end, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occluders_empty", _wrap_CurvePoint_occluders_empty, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occluders_size", _wrap_CurvePoint_occluders_size, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occludee", _wrap_CurvePoint_occludee, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occluded_shape", _wrap_CurvePoint_occluded_shape, METH_VARARGS, NULL}, + { (char *)"CurvePoint_occludee_empty", _wrap_CurvePoint_occludee_empty, METH_VARARGS, NULL}, + { (char *)"CurvePoint_z_discontinuity", _wrap_CurvePoint_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"CurvePoint_curvatureFredo", _wrap_CurvePoint_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"CurvePoint_directionFredo", _wrap_CurvePoint_directionFredo, METH_VARARGS, NULL}, + { (char *)"CurvePoint_swigregister", CurvePoint_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Curve", _wrap_new_Curve, METH_VARARGS, NULL}, + { (char *)"delete_Curve", _wrap_delete_Curve, METH_VARARGS, NULL}, + { (char *)"Curve_computeCurvatureAndOrientation", _wrap_Curve_computeCurvatureAndOrientation, METH_VARARGS, NULL}, + { (char *)"Curve_push_vertex_back", _wrap_Curve_push_vertex_back, METH_VARARGS, NULL}, + { (char *)"Curve_push_vertex_front", _wrap_Curve_push_vertex_front, METH_VARARGS, NULL}, + { (char *)"Curve_empty", _wrap_Curve_empty, METH_VARARGS, NULL}, + { (char *)"Curve_getLength2D", _wrap_Curve_getLength2D, METH_VARARGS, NULL}, + { (char *)"Curve_getId", _wrap_Curve_getId, METH_VARARGS, NULL}, + { (char *)"Curve_nSegments", _wrap_Curve_nSegments, METH_VARARGS, NULL}, + { (char *)"Curve_setId", _wrap_Curve_setId, METH_VARARGS, NULL}, + { (char *)"Curve_curvePointsBegin", _wrap_Curve_curvePointsBegin, METH_VARARGS, NULL}, + { (char *)"Curve_curvePointsEnd", _wrap_Curve_curvePointsEnd, METH_VARARGS, NULL}, + { (char *)"Curve_curveVerticesBegin", _wrap_Curve_curveVerticesBegin, METH_VARARGS, NULL}, + { (char *)"Curve_curveVerticesEnd", _wrap_Curve_curveVerticesEnd, METH_VARARGS, NULL}, + { (char *)"Curve_verticesBegin", _wrap_Curve_verticesBegin, METH_VARARGS, NULL}, + { (char *)"Curve_verticesEnd", _wrap_Curve_verticesEnd, METH_VARARGS, NULL}, + { (char *)"Curve_pointsBegin", _wrap_Curve_pointsBegin, METH_VARARGS, NULL}, + { (char *)"Curve_pointsEnd", _wrap_Curve_pointsEnd, METH_VARARGS, NULL}, + { (char *)"Curve_swigregister", Curve_swigregister, METH_VARARGS, NULL}, + { (char *)"new_StrokeVertexIterator", _wrap_new_StrokeVertexIterator, METH_VARARGS, NULL}, + { (char *)"delete_StrokeVertexIterator", _wrap_delete_StrokeVertexIterator, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_castToInterface0DIterator", _wrap_StrokeVertexIterator_castToInterface0DIterator, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getExactTypeName", _wrap_StrokeVertexIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getObject", _wrap_StrokeVertexIterator_getObject, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator___deref__", _wrap_StrokeVertexIterator___deref__, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_increment", _wrap_StrokeVertexIterator_increment, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_decrement", _wrap_StrokeVertexIterator_decrement, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_isBegin", _wrap_StrokeVertexIterator_isBegin, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_isEnd", _wrap_StrokeVertexIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator___eq__", _wrap_StrokeVertexIterator___eq__, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_t", _wrap_StrokeVertexIterator_t, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_u", _wrap_StrokeVertexIterator_u, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_copy", _wrap_StrokeVertexIterator_copy, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getIt", _wrap_StrokeVertexIterator_getIt, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_x", _wrap_StrokeVertexIterator_x, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_y", _wrap_StrokeVertexIterator_y, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getPoint", _wrap_StrokeVertexIterator_getPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_attribute", _wrap_StrokeVertexIterator_attribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_curvilinearAbscissa", _wrap_StrokeVertexIterator_curvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_strokeLength", _wrap_StrokeVertexIterator_strokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetX", _wrap_StrokeVertexIterator_SetX, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetY", _wrap_StrokeVertexIterator_SetY, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetPoint", _wrap_StrokeVertexIterator_SetPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetAttribute", _wrap_StrokeVertexIterator_SetAttribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetCurvilinearAbscissa", _wrap_StrokeVertexIterator_SetCurvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetStrokeLength", _wrap_StrokeVertexIterator_SetStrokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getX", _wrap_StrokeVertexIterator_getX, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getY", _wrap_StrokeVertexIterator_getY, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getZ", _wrap_StrokeVertexIterator_getZ, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getPoint3D", _wrap_StrokeVertexIterator_getPoint3D, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getProjectedX", _wrap_StrokeVertexIterator_getProjectedX, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getProjectedY", _wrap_StrokeVertexIterator_getProjectedY, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getProjectedZ", _wrap_StrokeVertexIterator_getProjectedZ, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getPoint2D", _wrap_StrokeVertexIterator_getPoint2D, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getFEdge", _wrap_StrokeVertexIterator_getFEdge, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getId", _wrap_StrokeVertexIterator_getId, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_getNature", _wrap_StrokeVertexIterator_getNature, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_castToSVertex", _wrap_StrokeVertexIterator_castToSVertex, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_castToViewVertex", _wrap_StrokeVertexIterator_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_castToNonTVertex", _wrap_StrokeVertexIterator_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_castToTVertex", _wrap_StrokeVertexIterator_castToTVertex, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_A", _wrap_StrokeVertexIterator_A, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_B", _wrap_StrokeVertexIterator_B, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_t2d", _wrap_StrokeVertexIterator_t2d, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetA", _wrap_StrokeVertexIterator_SetA, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetB", _wrap_StrokeVertexIterator_SetB, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_SetT2d", _wrap_StrokeVertexIterator_SetT2d, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_fedge", _wrap_StrokeVertexIterator_fedge, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_point2d", _wrap_StrokeVertexIterator_point2d, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_point3d", _wrap_StrokeVertexIterator_point3d, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_normal", _wrap_StrokeVertexIterator_normal, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_shape", _wrap_StrokeVertexIterator_shape, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occluders_begin", _wrap_StrokeVertexIterator_occluders_begin, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occluders_end", _wrap_StrokeVertexIterator_occluders_end, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occluders_empty", _wrap_StrokeVertexIterator_occluders_empty, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occluders_size", _wrap_StrokeVertexIterator_occluders_size, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occludee", _wrap_StrokeVertexIterator_occludee, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occluded_shape", _wrap_StrokeVertexIterator_occluded_shape, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_occludee_empty", _wrap_StrokeVertexIterator_occludee_empty, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_z_discontinuity", _wrap_StrokeVertexIterator_z_discontinuity, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_curvatureFredo", _wrap_StrokeVertexIterator_curvatureFredo, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_directionFredo", _wrap_StrokeVertexIterator_directionFredo, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_swigregister", StrokeVertexIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_StrokeAttribute", _wrap_new_StrokeAttribute, METH_VARARGS, NULL}, + { (char *)"delete_StrokeAttribute", _wrap_delete_StrokeAttribute, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getColor", _wrap_StrokeAttribute_getColor, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getColorR", _wrap_StrokeAttribute_getColorR, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getColorG", _wrap_StrokeAttribute_getColorG, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getColorB", _wrap_StrokeAttribute_getColorB, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getColorRGB", _wrap_StrokeAttribute_getColorRGB, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getAlpha", _wrap_StrokeAttribute_getAlpha, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getThickness", _wrap_StrokeAttribute_getThickness, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getThicknessR", _wrap_StrokeAttribute_getThicknessR, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getThicknessL", _wrap_StrokeAttribute_getThicknessL, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getThicknessRL", _wrap_StrokeAttribute_getThicknessRL, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_isVisible", _wrap_StrokeAttribute_isVisible, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getAttributeReal", _wrap_StrokeAttribute_getAttributeReal, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getAttributeVec2f", _wrap_StrokeAttribute_getAttributeVec2f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_getAttributeVec3f", _wrap_StrokeAttribute_getAttributeVec3f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_isAttributeAvailableReal", _wrap_StrokeAttribute_isAttributeAvailableReal, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_isAttributeAvailableVec2f", _wrap_StrokeAttribute_isAttributeAvailableVec2f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_isAttributeAvailableVec3f", _wrap_StrokeAttribute_isAttributeAvailableVec3f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setColor", _wrap_StrokeAttribute_setColor, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setAlpha", _wrap_StrokeAttribute_setAlpha, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setThickness", _wrap_StrokeAttribute_setThickness, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_SetVisible", _wrap_StrokeAttribute_SetVisible, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setAttributeReal", _wrap_StrokeAttribute_setAttributeReal, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setAttributeVec2f", _wrap_StrokeAttribute_setAttributeVec2f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setAttributeVec3f", _wrap_StrokeAttribute_setAttributeVec3f, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_swigregister", StrokeAttribute_swigregister, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_getExactTypeName", _wrap_StrokeVertex_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"new_StrokeVertex", _wrap_new_StrokeVertex, METH_VARARGS, NULL}, + { (char *)"delete_StrokeVertex", _wrap_delete_StrokeVertex, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_x", _wrap_StrokeVertex_x, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_y", _wrap_StrokeVertex_y, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_getPoint", _wrap_StrokeVertex_getPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_attribute", _wrap_StrokeVertex_attribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_curvilinearAbscissa", _wrap_StrokeVertex_curvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_strokeLength", _wrap_StrokeVertex_strokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_u", _wrap_StrokeVertex_u, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetX", _wrap_StrokeVertex_SetX, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetY", _wrap_StrokeVertex_SetY, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetPoint", _wrap_StrokeVertex_SetPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetAttribute", _wrap_StrokeVertex_SetAttribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetCurvilinearAbscissa", _wrap_StrokeVertex_SetCurvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_SetStrokeLength", _wrap_StrokeVertex_SetStrokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_swigregister", StrokeVertex_swigregister, METH_VARARGS, NULL}, + { (char *)"Stroke_getExactTypeName", _wrap_Stroke_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"Stroke_getId", _wrap_Stroke_getId, METH_VARARGS, NULL}, + { (char *)"new_Stroke", _wrap_new_Stroke, METH_VARARGS, NULL}, + { (char *)"delete_Stroke", _wrap_delete_Stroke, METH_VARARGS, NULL}, + { (char *)"Stroke_ComputeSampling", _wrap_Stroke_ComputeSampling, METH_VARARGS, NULL}, + { (char *)"Stroke_Resample", _wrap_Stroke_Resample, METH_VARARGS, NULL}, + { (char *)"Stroke_RemoveVertex", _wrap_Stroke_RemoveVertex, METH_VARARGS, NULL}, + { (char *)"Stroke_InsertVertex", _wrap_Stroke_InsertVertex, METH_VARARGS, NULL}, + { (char *)"Stroke_Render", _wrap_Stroke_Render, METH_VARARGS, NULL}, + { (char *)"Stroke_RenderBasic", _wrap_Stroke_RenderBasic, METH_VARARGS, NULL}, + { (char *)"Stroke_getLength2D", _wrap_Stroke_getLength2D, METH_VARARGS, NULL}, + { (char *)"Stroke_getMediumType", _wrap_Stroke_getMediumType, METH_VARARGS, NULL}, + { (char *)"Stroke_getTextureId", _wrap_Stroke_getTextureId, METH_VARARGS, NULL}, + { (char *)"Stroke_hasTips", _wrap_Stroke_hasTips, METH_VARARGS, NULL}, + { (char *)"Stroke_vertices_size", _wrap_Stroke_vertices_size, METH_VARARGS, NULL}, + { (char *)"Stroke_viewedges_begin", _wrap_Stroke_viewedges_begin, METH_VARARGS, NULL}, + { (char *)"Stroke_viewedges_end", _wrap_Stroke_viewedges_end, METH_VARARGS, NULL}, + { (char *)"Stroke_viewedges_size", _wrap_Stroke_viewedges_size, METH_VARARGS, NULL}, + { (char *)"Stroke_getBeginningOrientation", _wrap_Stroke_getBeginningOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_getBeginningOrientationX", _wrap_Stroke_getBeginningOrientationX, METH_VARARGS, NULL}, + { (char *)"Stroke_getBeginningOrientationY", _wrap_Stroke_getBeginningOrientationY, METH_VARARGS, NULL}, + { (char *)"Stroke_getEndingOrientation", _wrap_Stroke_getEndingOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_getEndingOrientationX", _wrap_Stroke_getEndingOrientationX, METH_VARARGS, NULL}, + { (char *)"Stroke_getEndingOrientationY", _wrap_Stroke_getEndingOrientationY, METH_VARARGS, NULL}, + { (char *)"Stroke_SetId", _wrap_Stroke_SetId, METH_VARARGS, NULL}, + { (char *)"Stroke_SetLength", _wrap_Stroke_SetLength, METH_VARARGS, NULL}, + { (char *)"Stroke_SetMediumType", _wrap_Stroke_SetMediumType, METH_VARARGS, NULL}, + { (char *)"Stroke_SetTextureId", _wrap_Stroke_SetTextureId, METH_VARARGS, NULL}, + { (char *)"Stroke_SetTips", _wrap_Stroke_SetTips, METH_VARARGS, NULL}, + { (char *)"Stroke_push_back", _wrap_Stroke_push_back, METH_VARARGS, NULL}, + { (char *)"Stroke_push_front", _wrap_Stroke_push_front, METH_VARARGS, NULL}, + { (char *)"Stroke_AddViewEdge", _wrap_Stroke_AddViewEdge, METH_VARARGS, NULL}, + { (char *)"Stroke_SetBeginningOrientation", _wrap_Stroke_SetBeginningOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_SetEndingOrientation", _wrap_Stroke_SetEndingOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_strokeVerticesBegin", _wrap_Stroke_strokeVerticesBegin, METH_VARARGS, NULL}, + { (char *)"Stroke_strokeVerticesEnd", _wrap_Stroke_strokeVerticesEnd, METH_VARARGS, NULL}, + { (char *)"Stroke_strokeVerticesSize", _wrap_Stroke_strokeVerticesSize, METH_VARARGS, NULL}, + { (char *)"Stroke_verticesBegin", _wrap_Stroke_verticesBegin, METH_VARARGS, NULL}, + { (char *)"Stroke_verticesEnd", _wrap_Stroke_verticesEnd, METH_VARARGS, NULL}, + { (char *)"Stroke_pointsBegin", _wrap_Stroke_pointsBegin, METH_VARARGS, NULL}, + { (char *)"Stroke_pointsEnd", _wrap_Stroke_pointsEnd, METH_VARARGS, NULL}, + { (char *)"Stroke_swigregister", Stroke_swigregister, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_iterator", _wrap_ShadersContainer_iterator, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___nonzero__", _wrap_ShadersContainer___nonzero__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___len__", _wrap_ShadersContainer___len__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_pop", _wrap_ShadersContainer_pop, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___getslice__", _wrap_ShadersContainer___getslice__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___setslice__", _wrap_ShadersContainer___setslice__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___delslice__", _wrap_ShadersContainer___delslice__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___delitem__", _wrap_ShadersContainer___delitem__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___getitem__", _wrap_ShadersContainer___getitem__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer___setitem__", _wrap_ShadersContainer___setitem__, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_append", _wrap_ShadersContainer_append, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_empty", _wrap_ShadersContainer_empty, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_size", _wrap_ShadersContainer_size, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_clear", _wrap_ShadersContainer_clear, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_swap", _wrap_ShadersContainer_swap, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_get_allocator", _wrap_ShadersContainer_get_allocator, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_begin", _wrap_ShadersContainer_begin, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_end", _wrap_ShadersContainer_end, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_rbegin", _wrap_ShadersContainer_rbegin, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_rend", _wrap_ShadersContainer_rend, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_pop_back", _wrap_ShadersContainer_pop_back, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_erase", _wrap_ShadersContainer_erase, METH_VARARGS, NULL}, + { (char *)"new_ShadersContainer", _wrap_new_ShadersContainer, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_push_back", _wrap_ShadersContainer_push_back, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_front", _wrap_ShadersContainer_front, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_back", _wrap_ShadersContainer_back, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_assign", _wrap_ShadersContainer_assign, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_resize", _wrap_ShadersContainer_resize, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_insert", _wrap_ShadersContainer_insert, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_reserve", _wrap_ShadersContainer_reserve, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_capacity", _wrap_ShadersContainer_capacity, METH_VARARGS, NULL}, + { (char *)"delete_ShadersContainer", _wrap_delete_ShadersContainer, METH_VARARGS, NULL}, + { (char *)"ShadersContainer_swigregister", ShadersContainer_swigregister, METH_VARARGS, NULL}, + { (char *)"new_StrokeShader", _wrap_new_StrokeShader, METH_VARARGS, NULL}, + { (char *)"delete_StrokeShader", _wrap_delete_StrokeShader, METH_VARARGS, NULL}, + { (char *)"StrokeShader_getName", _wrap_StrokeShader_getName, METH_VARARGS, NULL}, + { (char *)"StrokeShader_shade", _wrap_StrokeShader_shade, METH_VARARGS, NULL}, + { (char *)"disown_StrokeShader", _wrap_disown_StrokeShader, METH_VARARGS, NULL}, + { (char *)"StrokeShader_swigregister", StrokeShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ConstantThicknessShader", _wrap_new_ConstantThicknessShader, METH_VARARGS, NULL}, + { (char *)"delete_ConstantThicknessShader", _wrap_delete_ConstantThicknessShader, METH_VARARGS, NULL}, + { (char *)"ConstantThicknessShader_getName", _wrap_ConstantThicknessShader_getName, METH_VARARGS, NULL}, + { (char *)"ConstantThicknessShader_shade", _wrap_ConstantThicknessShader_shade, METH_VARARGS, NULL}, + { (char *)"ConstantThicknessShader_swigregister", ConstantThicknessShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ConstantExternThicknessShader", _wrap_new_ConstantExternThicknessShader, METH_VARARGS, NULL}, + { (char *)"delete_ConstantExternThicknessShader", _wrap_delete_ConstantExternThicknessShader, METH_VARARGS, NULL}, + { (char *)"ConstantExternThicknessShader_getName", _wrap_ConstantExternThicknessShader_getName, METH_VARARGS, NULL}, + { (char *)"ConstantExternThicknessShader_shade", _wrap_ConstantExternThicknessShader_shade, METH_VARARGS, NULL}, + { (char *)"ConstantExternThicknessShader_swigregister", ConstantExternThicknessShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_IncreasingThicknessShader", _wrap_new_IncreasingThicknessShader, METH_VARARGS, NULL}, + { (char *)"delete_IncreasingThicknessShader", _wrap_delete_IncreasingThicknessShader, METH_VARARGS, NULL}, + { (char *)"IncreasingThicknessShader_shade", _wrap_IncreasingThicknessShader_shade, METH_VARARGS, NULL}, + { (char *)"IncreasingThicknessShader_swigregister", IncreasingThicknessShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ConstrainedIncreasingThicknessShader", _wrap_new_ConstrainedIncreasingThicknessShader, METH_VARARGS, NULL}, + { (char *)"delete_ConstrainedIncreasingThicknessShader", _wrap_delete_ConstrainedIncreasingThicknessShader, METH_VARARGS, NULL}, + { (char *)"ConstrainedIncreasingThicknessShader_shade", _wrap_ConstrainedIncreasingThicknessShader_shade, METH_VARARGS, NULL}, + { (char *)"ConstrainedIncreasingThicknessShader_swigregister", ConstrainedIncreasingThicknessShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_LengthDependingThicknessShader", _wrap_new_LengthDependingThicknessShader, METH_VARARGS, NULL}, + { (char *)"delete_LengthDependingThicknessShader", _wrap_delete_LengthDependingThicknessShader, METH_VARARGS, NULL}, + { (char *)"LengthDependingThicknessShader_shade", _wrap_LengthDependingThicknessShader_shade, METH_VARARGS, NULL}, + { (char *)"LengthDependingThicknessShader_swigregister", LengthDependingThicknessShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ThicknessVariationPatternShader", _wrap_new_ThicknessVariationPatternShader, METH_VARARGS, NULL}, + { (char *)"delete_ThicknessVariationPatternShader", _wrap_delete_ThicknessVariationPatternShader, METH_VARARGS, NULL}, + { (char *)"ThicknessVariationPatternShader_shade", _wrap_ThicknessVariationPatternShader_shade, METH_VARARGS, NULL}, + { (char *)"ThicknessVariationPatternShader_swigregister", ThicknessVariationPatternShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ThicknessNoiseShader", _wrap_new_ThicknessNoiseShader, METH_VARARGS, NULL}, + { (char *)"ThicknessNoiseShader_shade", _wrap_ThicknessNoiseShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_ThicknessNoiseShader", _wrap_delete_ThicknessNoiseShader, METH_VARARGS, NULL}, + { (char *)"ThicknessNoiseShader_swigregister", ThicknessNoiseShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ConstantColorShader", _wrap_new_ConstantColorShader, METH_VARARGS, NULL}, + { (char *)"ConstantColorShader_getName", _wrap_ConstantColorShader_getName, METH_VARARGS, NULL}, + { (char *)"ConstantColorShader_shade", _wrap_ConstantColorShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_ConstantColorShader", _wrap_delete_ConstantColorShader, METH_VARARGS, NULL}, + { (char *)"ConstantColorShader_swigregister", ConstantColorShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_IncreasingColorShader", _wrap_new_IncreasingColorShader, METH_VARARGS, NULL}, + { (char *)"IncreasingColorShader_shade", _wrap_IncreasingColorShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_IncreasingColorShader", _wrap_delete_IncreasingColorShader, METH_VARARGS, NULL}, + { (char *)"IncreasingColorShader_swigregister", IncreasingColorShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ColorVariationPatternShader", _wrap_new_ColorVariationPatternShader, METH_VARARGS, NULL}, + { (char *)"delete_ColorVariationPatternShader", _wrap_delete_ColorVariationPatternShader, METH_VARARGS, NULL}, + { (char *)"ColorVariationPatternShader_shade", _wrap_ColorVariationPatternShader_shade, METH_VARARGS, NULL}, + { (char *)"ColorVariationPatternShader_swigregister", ColorVariationPatternShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_MaterialColorShader", _wrap_new_MaterialColorShader, METH_VARARGS, NULL}, + { (char *)"MaterialColorShader_shade", _wrap_MaterialColorShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_MaterialColorShader", _wrap_delete_MaterialColorShader, METH_VARARGS, NULL}, + { (char *)"MaterialColorShader_swigregister", MaterialColorShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_CalligraphicColorShader", _wrap_new_CalligraphicColorShader, METH_VARARGS, NULL}, + { (char *)"CalligraphicColorShader_shade", _wrap_CalligraphicColorShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_CalligraphicColorShader", _wrap_delete_CalligraphicColorShader, METH_VARARGS, NULL}, + { (char *)"CalligraphicColorShader_swigregister", CalligraphicColorShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ColorNoiseShader", _wrap_new_ColorNoiseShader, METH_VARARGS, NULL}, + { (char *)"ColorNoiseShader_shade", _wrap_ColorNoiseShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_ColorNoiseShader", _wrap_delete_ColorNoiseShader, METH_VARARGS, NULL}, + { (char *)"ColorNoiseShader_swigregister", ColorNoiseShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_TextureAssignerShader", _wrap_new_TextureAssignerShader, METH_VARARGS, NULL}, + { (char *)"TextureAssignerShader_shade", _wrap_TextureAssignerShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_TextureAssignerShader", _wrap_delete_TextureAssignerShader, METH_VARARGS, NULL}, + { (char *)"TextureAssignerShader_swigregister", TextureAssignerShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_StrokeTextureShader", _wrap_new_StrokeTextureShader, METH_VARARGS, NULL}, + { (char *)"StrokeTextureShader_shade", _wrap_StrokeTextureShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_StrokeTextureShader", _wrap_delete_StrokeTextureShader, METH_VARARGS, NULL}, + { (char *)"StrokeTextureShader_swigregister", StrokeTextureShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_BackboneStretcherShader", _wrap_new_BackboneStretcherShader, METH_VARARGS, NULL}, + { (char *)"BackboneStretcherShader_shade", _wrap_BackboneStretcherShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_BackboneStretcherShader", _wrap_delete_BackboneStretcherShader, METH_VARARGS, NULL}, + { (char *)"BackboneStretcherShader_swigregister", BackboneStretcherShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SamplingShader", _wrap_new_SamplingShader, METH_VARARGS, NULL}, + { (char *)"SamplingShader_shade", _wrap_SamplingShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_SamplingShader", _wrap_delete_SamplingShader, METH_VARARGS, NULL}, + { (char *)"SamplingShader_swigregister", SamplingShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_ExternalContourStretcherShader", _wrap_new_ExternalContourStretcherShader, METH_VARARGS, NULL}, + { (char *)"ExternalContourStretcherShader_shade", _wrap_ExternalContourStretcherShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_ExternalContourStretcherShader", _wrap_delete_ExternalContourStretcherShader, METH_VARARGS, NULL}, + { (char *)"ExternalContourStretcherShader_swigregister", ExternalContourStretcherShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_BSplineShader", _wrap_new_BSplineShader, METH_VARARGS, NULL}, + { (char *)"BSplineShader_shade", _wrap_BSplineShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_BSplineShader", _wrap_delete_BSplineShader, METH_VARARGS, NULL}, + { (char *)"BSplineShader_swigregister", BSplineShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_BezierCurveShader", _wrap_new_BezierCurveShader, METH_VARARGS, NULL}, + { (char *)"BezierCurveShader_shade", _wrap_BezierCurveShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_BezierCurveShader", _wrap_delete_BezierCurveShader, METH_VARARGS, NULL}, + { (char *)"BezierCurveShader_swigregister", BezierCurveShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_InflateShader", _wrap_new_InflateShader, METH_VARARGS, NULL}, + { (char *)"InflateShader_shade", _wrap_InflateShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_InflateShader", _wrap_delete_InflateShader, METH_VARARGS, NULL}, + { (char *)"InflateShader_swigregister", InflateShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_PolygonalizationShader", _wrap_new_PolygonalizationShader, METH_VARARGS, NULL}, + { (char *)"PolygonalizationShader_shade", _wrap_PolygonalizationShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_PolygonalizationShader", _wrap_delete_PolygonalizationShader, METH_VARARGS, NULL}, + { (char *)"PolygonalizationShader_swigregister", PolygonalizationShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_GuidingLinesShader", _wrap_new_GuidingLinesShader, METH_VARARGS, NULL}, + { (char *)"GuidingLinesShader_shade", _wrap_GuidingLinesShader_shade, METH_VARARGS, NULL}, + { (char *)"delete_GuidingLinesShader", _wrap_delete_GuidingLinesShader, METH_VARARGS, NULL}, + { (char *)"GuidingLinesShader_swigregister", GuidingLinesShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_TipRemoverShader", _wrap_new_TipRemoverShader, METH_VARARGS, NULL}, + { (char *)"delete_TipRemoverShader", _wrap_delete_TipRemoverShader, METH_VARARGS, NULL}, + { (char *)"TipRemoverShader_shade", _wrap_TipRemoverShader_shade, METH_VARARGS, NULL}, + { (char *)"TipRemoverShader_swigregister", TipRemoverShader_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_streamShader", _wrap_delete_streamShader, METH_VARARGS, NULL}, + { (char *)"streamShader_getName", _wrap_streamShader_getName, METH_VARARGS, NULL}, + { (char *)"streamShader_shade", _wrap_streamShader_shade, METH_VARARGS, NULL}, + { (char *)"new_streamShader", _wrap_new_streamShader, METH_VARARGS, NULL}, + { (char *)"streamShader_swigregister", streamShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_fstreamShader", _wrap_new_fstreamShader, METH_VARARGS, NULL}, + { (char *)"delete_fstreamShader", _wrap_delete_fstreamShader, METH_VARARGS, NULL}, + { (char *)"fstreamShader_getName", _wrap_fstreamShader_getName, METH_VARARGS, NULL}, + { (char *)"fstreamShader_shade", _wrap_fstreamShader_shade, METH_VARARGS, NULL}, + { (char *)"fstreamShader_swigregister", fstreamShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_CalligraphicShader", _wrap_new_CalligraphicShader, METH_VARARGS, NULL}, + { (char *)"delete_CalligraphicShader", _wrap_delete_CalligraphicShader, METH_VARARGS, NULL}, + { (char *)"CalligraphicShader_shade", _wrap_CalligraphicShader_shade, METH_VARARGS, NULL}, + { (char *)"CalligraphicShader_swigregister", CalligraphicShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SpatialNoiseShader", _wrap_new_SpatialNoiseShader, METH_VARARGS, NULL}, + { (char *)"delete_SpatialNoiseShader", _wrap_delete_SpatialNoiseShader, METH_VARARGS, NULL}, + { (char *)"SpatialNoiseShader_shade", _wrap_SpatialNoiseShader_shade, METH_VARARGS, NULL}, + { (char *)"SpatialNoiseShader_swigregister", SpatialNoiseShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_SmoothingShader", _wrap_new_SmoothingShader, METH_VARARGS, NULL}, + { (char *)"delete_SmoothingShader", _wrap_delete_SmoothingShader, METH_VARARGS, NULL}, + { (char *)"SmoothingShader_shade", _wrap_SmoothingShader_shade, METH_VARARGS, NULL}, + { (char *)"SmoothingShader_swigregister", SmoothingShader_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Smoother", _wrap_new_Smoother, METH_VARARGS, NULL}, + { (char *)"delete_Smoother", _wrap_delete_Smoother, METH_VARARGS, NULL}, + { (char *)"Smoother_smooth", _wrap_Smoother_smooth, METH_VARARGS, NULL}, + { (char *)"Smoother_computeCurvature", _wrap_Smoother_computeCurvature, METH_VARARGS, NULL}, + { (char *)"Smoother_swigregister", Smoother_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Omitter", _wrap_new_Omitter, METH_VARARGS, NULL}, + { (char *)"delete_Omitter", _wrap_delete_Omitter, METH_VARARGS, NULL}, + { (char *)"Omitter_omit", _wrap_Omitter_omit, METH_VARARGS, NULL}, + { (char *)"Omitter_swigregister", Omitter_swigregister, METH_VARARGS, NULL}, + { (char *)"new_OmissionShader", _wrap_new_OmissionShader, METH_VARARGS, NULL}, + { (char *)"delete_OmissionShader", _wrap_delete_OmissionShader, METH_VARARGS, NULL}, + { (char *)"OmissionShader_shade", _wrap_OmissionShader_shade, METH_VARARGS, NULL}, + { (char *)"OmissionShader_swigregister", OmissionShader_swigregister, METH_VARARGS, NULL}, + { (char *)"Operators_select", _wrap_Operators_select, METH_VARARGS, NULL}, + { (char *)"Operators_chain", _wrap_Operators_chain, METH_VARARGS, NULL}, + { (char *)"Operators_bidirectionalChain", _wrap_Operators_bidirectionalChain, METH_VARARGS, NULL}, + { (char *)"Operators_sequentialSplit", _wrap_Operators_sequentialSplit, METH_VARARGS, NULL}, + { (char *)"Operators_recursiveSplit", _wrap_Operators_recursiveSplit, METH_VARARGS, NULL}, + { (char *)"Operators_sort", _wrap_Operators_sort, METH_VARARGS, NULL}, + { (char *)"Operators_create", _wrap_Operators_create, METH_VARARGS, NULL}, + { (char *)"Operators_getViewEdgeFromIndex", _wrap_Operators_getViewEdgeFromIndex, METH_VARARGS, NULL}, + { (char *)"Operators_getChainFromIndex", _wrap_Operators_getChainFromIndex, METH_VARARGS, NULL}, + { (char *)"Operators_getStrokeFromIndex", _wrap_Operators_getStrokeFromIndex, METH_VARARGS, NULL}, + { (char *)"Operators_getViewEdgesSize", _wrap_Operators_getViewEdgesSize, METH_VARARGS, NULL}, + { (char *)"Operators_getChainsSize", _wrap_Operators_getChainsSize, METH_VARARGS, NULL}, + { (char *)"Operators_getStrokesSize", _wrap_Operators_getStrokesSize, METH_VARARGS, NULL}, + { (char *)"delete_Operators", _wrap_delete_Operators, METH_VARARGS, NULL}, + { (char *)"Operators_swigregister", Operators_swigregister, METH_VARARGS, NULL}, + { (char *)"ltstr___call__", _wrap_ltstr___call__, METH_VARARGS, NULL}, + { (char *)"new_ltstr", _wrap_new_ltstr, METH_VARARGS, NULL}, + { (char *)"delete_ltstr", _wrap_delete_ltstr, METH_VARARGS, NULL}, + { (char *)"ltstr_swigregister", ltstr_swigregister, METH_VARARGS, NULL}, + { (char *)"Canvas_getInstance", _wrap_Canvas_getInstance, METH_VARARGS, NULL}, + { (char *)"delete_Canvas", _wrap_delete_Canvas, METH_VARARGS, NULL}, + { (char *)"Canvas_preDraw", _wrap_Canvas_preDraw, METH_VARARGS, NULL}, + { (char *)"Canvas_Draw", _wrap_Canvas_Draw, METH_VARARGS, NULL}, + { (char *)"Canvas_postDraw", _wrap_Canvas_postDraw, METH_VARARGS, NULL}, + { (char *)"Canvas_Render", _wrap_Canvas_Render, METH_VARARGS, NULL}, + { (char *)"Canvas_RenderBasic", _wrap_Canvas_RenderBasic, METH_VARARGS, NULL}, + { (char *)"Canvas_RenderStroke", _wrap_Canvas_RenderStroke, METH_VARARGS, NULL}, + { (char *)"Canvas_init", _wrap_Canvas_init, METH_VARARGS, NULL}, + { (char *)"Canvas_Clear", _wrap_Canvas_Clear, METH_VARARGS, NULL}, + { (char *)"Canvas_Erase", _wrap_Canvas_Erase, METH_VARARGS, NULL}, + { (char *)"Canvas_readColorPixels", _wrap_Canvas_readColorPixels, METH_VARARGS, NULL}, + { (char *)"Canvas_readDepthPixels", _wrap_Canvas_readDepthPixels, METH_VARARGS, NULL}, + { (char *)"Canvas_update", _wrap_Canvas_update, METH_VARARGS, NULL}, + { (char *)"Canvas_isEmpty", _wrap_Canvas_isEmpty, METH_VARARGS, NULL}, + { (char *)"Canvas_loadMap", _wrap_Canvas_loadMap, METH_VARARGS, NULL}, + { (char *)"Canvas_readMapPixel", _wrap_Canvas_readMapPixel, METH_VARARGS, NULL}, + { (char *)"Canvas_loadSteerableViewMap", _wrap_Canvas_loadSteerableViewMap, METH_VARARGS, NULL}, + { (char *)"Canvas_getSteerableViewMap", _wrap_Canvas_getSteerableViewMap, METH_VARARGS, NULL}, + { (char *)"Canvas_selectedFEdge", _wrap_Canvas_selectedFEdge, METH_VARARGS, NULL}, + { (char *)"Canvas_width", _wrap_Canvas_width, METH_VARARGS, NULL}, + { (char *)"Canvas_height", _wrap_Canvas_height, METH_VARARGS, NULL}, + { (char *)"Canvas_currentPaperTextureIndex", _wrap_Canvas_currentPaperTextureIndex, METH_VARARGS, NULL}, + { (char *)"Canvas_scene3DBBox", _wrap_Canvas_scene3DBBox, METH_VARARGS, NULL}, + { (char *)"Canvas_renderer", _wrap_Canvas_renderer, METH_VARARGS, NULL}, + { (char *)"Canvas_getCurrentStyleModule", _wrap_Canvas_getCurrentStyleModule, METH_VARARGS, NULL}, + { (char *)"Canvas_getRecordFlag", _wrap_Canvas_getRecordFlag, METH_VARARGS, NULL}, + { (char *)"Canvas_SetSelectedFEdge", _wrap_Canvas_SetSelectedFEdge, METH_VARARGS, NULL}, + { (char *)"Canvas_InsertStyleModule", _wrap_Canvas_InsertStyleModule, METH_VARARGS, NULL}, + { (char *)"Canvas_RemoveStyleModule", _wrap_Canvas_RemoveStyleModule, METH_VARARGS, NULL}, + { (char *)"Canvas_SwapStyleModules", _wrap_Canvas_SwapStyleModules, METH_VARARGS, NULL}, + { (char *)"Canvas_ReplaceStyleModule", _wrap_Canvas_ReplaceStyleModule, METH_VARARGS, NULL}, + { (char *)"Canvas_SetVisible", _wrap_Canvas_SetVisible, METH_VARARGS, NULL}, + { (char *)"Canvas_AddLayer", _wrap_Canvas_AddLayer, METH_VARARGS, NULL}, + { (char *)"Canvas_SetCurrentPaperTextureIndex", _wrap_Canvas_SetCurrentPaperTextureIndex, METH_VARARGS, NULL}, + { (char *)"Canvas_changePaperTexture", _wrap_Canvas_changePaperTexture, METH_VARARGS, NULL}, + { (char *)"Canvas_togglePaperTexture", _wrap_Canvas_togglePaperTexture, METH_VARARGS, NULL}, + { (char *)"Canvas_resetModified", _wrap_Canvas_resetModified, METH_VARARGS, NULL}, + { (char *)"Canvas_causalStyleModules", _wrap_Canvas_causalStyleModules, METH_VARARGS, NULL}, + { (char *)"Canvas_setModified", _wrap_Canvas_setModified, METH_VARARGS, NULL}, + { (char *)"Canvas_swigregister", Canvas_swigregister, METH_VARARGS, NULL}, + { (char *)"castToSVertex", _wrap_castToSVertex, METH_VARARGS, NULL}, + { (char *)"castToViewVertex", _wrap_castToViewVertex, METH_VARARGS, NULL}, + { (char *)"castToTVertex", _wrap_castToTVertex, METH_VARARGS, NULL}, + { (char *)"castToCurvePoint", _wrap_castToCurvePoint, METH_VARARGS, NULL}, + { (char *)"castToStrokeVertex", _wrap_castToStrokeVertex, METH_VARARGS, NULL}, + { (char *)"castToNonTVertex", _wrap_castToNonTVertex, METH_VARARGS, NULL}, + { (char *)"castToFEdge", _wrap_castToFEdge, METH_VARARGS, NULL}, + { (char *)"castToViewEdge", _wrap_castToViewEdge, METH_VARARGS, NULL}, + { (char *)"castToStroke", _wrap_castToStroke, METH_VARARGS, NULL}, + { (char *)"castToChain", _wrap_castToChain, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction0D > > *) ((Functions0D::GetOccludersF0D *) x)); +} +static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludeeF1D *) x)); +} +static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetShapeF1D *) x)); +} +static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludersF1D *) x)); +} +static void *_p_TVertexTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) (ViewVertex *) ((TVertex *) x)); +} +static void *_p_NonTVertexTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) (ViewVertex *) ((NonTVertex *) x)); +} +static void *_p_SVertexTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) ((SVertex *) x)); +} +static void *_p_ViewVertexTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) ((ViewVertex *) x)); +} +static void *_p_StrokeVertexTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) (CurvePoint *) ((StrokeVertex *) x)); +} +static void *_p_CurvePointTo_p_Interface0D(void *x) { + return (void *)((Interface0D *) ((CurvePoint *) x)); +} +static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetShapeF0D *) x)); +} +static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetOccludeeF0D *) x)); +} +static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x) { + return (void *)((ChainingIterator *) ((ChainSilhouetteIterator *) x)); +} +static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x) { + return (void *)((ChainingIterator *) ((ChainPredicateIterator *) x)); +} +static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { + return (void *)((ViewEdgeInternal::ViewEdgeIterator *) ((ChainingIterator *) x)); +} +static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { + return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainSilhouetteIterator *) x)); +} +static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { + return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainPredicateIterator *) x)); +} +static void *_p_ViewEdgeTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) ((ViewEdge *) x)); +} +static void *_p_StrokeTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) ((Stroke *) x)); +} +static void *_p_CurveTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) ((Curve *) x)); +} +static void *_p_FEdgeSharpTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) (FEdge *) ((FEdgeSharp *) x)); +} +static void *_p_FEdgeSmoothTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) (FEdge *) ((FEdgeSmooth *) x)); +} +static void *_p_FEdgeTo_p_Interface1D(void *x) { + return (void *)((Interface1D *) ((FEdge *) x)); +} +static void *_p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +} +static void *_p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +} +static void *_p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +} +static void *_p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +} +static void *_p_StrokeVertexTo_p_CurvePoint(void *x) { + return (void *)((CurvePoint *) ((StrokeVertex *) x)); +} +static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x) { + return (void *)((UnaryPredicate0D *) ((Predicates0D::TrueUP0D *) x)); +} +static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x) { + return (void *)((UnaryPredicate0D *) ((Predicates0D::FalseUP0D *) x)); +} +static void *_p_FEdgeSharpTo_p_FEdge(void *x) { + return (void *)((FEdge *) ((FEdgeSharp *) x)); +} +static void *_p_FEdgeSmoothTo_p_FEdge(void *x) { + return (void *)((FEdge *) ((FEdgeSmooth *) x)); +} +static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ConstrainedIncreasingThicknessShader *) x)); +} +static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ColorNoiseShader *) x)); +} +static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ThicknessNoiseShader *) x)); +} +static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::LengthDependingThicknessShader *) x)); +} +static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::IncreasingThicknessShader *) x)); +} +static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ConstantExternThicknessShader *) x)); +} +static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ConstantThicknessShader *) x)); +} +static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::StrokeTextureShader *) x)); +} +static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::SamplingShader *) x)); +} +static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::BSplineShader *) x)); +} +static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::BezierCurveShader *) x)); +} +static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::InflateShader *) x)); +} +static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::GuidingLinesShader *) x)); +} +static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::streamShader *) x)); +} +static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::fstreamShader *) x)); +} +static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((CalligraphicShader *) x)); +} +static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((SpatialNoiseShader *) x)); +} +static void *_p_SmoothingShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((SmoothingShader *) x)); +} +static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::TextureAssignerShader *) x)); +} +static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::CalligraphicColorShader *) x)); +} +static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::MaterialColorShader *) x)); +} +static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ColorVariationPatternShader *) x)); +} +static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::IncreasingColorShader *) x)); +} +static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ConstantColorShader *) x)); +} +static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ThicknessVariationPatternShader *) x)); +} +static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::BackboneStretcherShader *) x)); +} +static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::ExternalContourStretcherShader *) x)); +} +static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::PolygonalizationShader *) x)); +} +static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((StrokeShaders::TipRemoverShader *) x)); +} +static void *_p_OmissionShaderTo_p_StrokeShader(void *x) { + return (void *)((StrokeShader *) ((OmissionShader *) x)); +} +static void *_p_OmitterTo_p_Smoother(void *x) { + return (void *)((Smoother *) ((Omitter *) x)); +} +static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x) { + return (void *)((BinaryPredicate1D *) ((Predicates1D::Length2DBP1D *) x)); +} +static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x) { + return (void *)((BinaryPredicate1D *) ((Predicates1D::FalseBP1D *) x)); +} +static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x) { + return (void *)((BinaryPredicate1D *) ((Predicates1D::ViewMapGradientNormBP1D *) x)); +} +static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x) { + return (void *)((BinaryPredicate1D *) ((Predicates1D::TrueBP1D *) x)); +} +static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x) { + return (void *)((BinaryPredicate1D *) ((Predicates1D::SameShapeIdBP1D *) x)); +} +static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::FalseUP1D *) x)); +} +static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::ShapeUP1D *) x)); +} +static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::DensityLowerThanUP1D *) x)); +} +static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToTimeStampUP1D *) x)); +} +static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToChainingTimeStampUP1D *) x)); +} +static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::TrueUP1D *) x)); +} +static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::QuantitativeInvisibilityUP1D *) x)); +} +static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::ContourUP1D *) x)); +} +static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x) { + return (void *)((UnaryPredicate1D *) ((Predicates1D::ExternalContourUP1D *) x)); +} +static void *_p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +} +static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::TimeStampF1D *) x)); +} +static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); +} +static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::ChainingTimeStampF1D *) x)); +} +static void *_p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +} +static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { + return (void *)((Interface0DIteratorNested *) ((FEdgeInternal::SVertexIterator *) x)); +} +static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { + return (void *)((Interface0DIteratorNested *) ((ViewEdgeInternal::SVertexIterator *) x)); +} +static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x) { + return (void *)((Interface0DIteratorNested *) ((CurveInternal::CurvePointIterator *) x)); +} +static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x) { + return (void *)((Interface0DIteratorNested *) ((StrokeInternal::StrokeVertexIterator *) x)); +} +static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation2DF0D *) x)); +} +static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::Normal2DF0D *) x)); +} +static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation3DF0D *) x)); +} +static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation2DF1D *) x)); +} +static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Normal2DF1D *) x)); +} +static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation3DF1D *) x)); +} +static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); +} +static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); +} +static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ShapeIdF0D *) x)); +} +static void *_p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +} +static void *_p_TVertexTo_p_ViewVertex(void *x) { + return (void *)((ViewVertex *) ((TVertex *) x)); +} +static void *_p_NonTVertexTo_p_ViewVertex(void *x) { + return (void *)((ViewVertex *) ((NonTVertex *) x)); +} +static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ZDiscontinuityF0D *) x)); +} +static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::DensityF0D *) x)); +} +static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetXF0D *) x)); +} +static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedXF0D *) x)); +} +static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::Curvature2DAngleF0D *) x)); +} +static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetYF0D *) x)); +} +static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedYF0D *) x)); +} +static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetZF0D *) x)); +} +static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedZF0D *) x)); +} +static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::LocalAverageDepthF0D *) x)); +} +static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); +} +static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); +} +static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); +} +static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::DensityF1D *) x)); +} +static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::ZDiscontinuityF1D *) x)); +} +static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetXF1D *) x)); +} +static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetZF1D *) x)); +} +static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetViewMapGradientNormF1D *) x)); +} +static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedYF1D *) x)); +} +static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::Curvature2DAngleF1D *) x)); +} +static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetYF1D *) x)); +} +static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedXF1D *) x)); +} +static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::LocalAverageDepthF1D *) x)); +} +static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedZF1D *) x)); +} +static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); +} +static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadMapPixelF0D *) x)); +} +static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); +} +static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); +} +static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetViewMapGradientNormF0D *) x)); +} +static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetParameterF0D *) x)); +} +static void *_p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +} +static swig_type_info _swigt__p_AdjacencyIterator = {"_p_AdjacencyIterator", "AdjacencyIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BBoxTVecMat__Vec3Tdouble_t_t = {"_p_BBoxTVecMat__Vec3Tdouble_t_t", "BBox > *|BBox *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BinaryPredicate0D = {"_p_BinaryPredicate0D", "BinaryPredicate0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BinaryPredicate1D = {"_p_BinaryPredicate1D", "BinaryPredicate1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CalligraphicShader = {"_p_CalligraphicShader", "CalligraphicShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Canvas = {"_p_Canvas", "Canvas *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Chain = {"_p_Chain", "Chain *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ChainPredicateIterator = {"_p_ChainPredicateIterator", "ChainPredicateIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ChainSilhouetteIterator = {"_p_ChainSilhouetteIterator", "ChainSilhouetteIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ChainingIterator = {"_p_ChainingIterator", "ChainingIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurvatureInfo = {"_p_CurvatureInfo", "CurvatureInfo *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Curve = {"_p_Curve", "Curve *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurveInternal__CurvePointIterator = {"_p_CurveInternal__CurvePointIterator", "CurveInternal::CurvePointIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "CurvePoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Curve__vertex_container__iterator = {"_p_Curve__vertex_container__iterator", "Curve::vertex_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_FEdge = {"_p_FEdge", "FEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_FEdgeInternal__SVertexIterator = {"_p_FEdgeInternal__SVertexIterator", "FEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_FEdgeSharp = {"_p_FEdgeSharp", "FEdgeSharp *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_FEdgeSmooth = {"_p_FEdgeSmooth", "FEdgeSmooth *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__Curvature2DAngleF0D = {"_p_Functions0D__Curvature2DAngleF0D", "Functions0D::Curvature2DAngleF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__CurveNatureF0D = {"_p_Functions0D__CurveNatureF0D", "Functions0D::CurveNatureF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__DensityF0D = {"_p_Functions0D__DensityF0D", "Functions0D::DensityF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetCurvilinearAbscissaF0D = {"_p_Functions0D__GetCurvilinearAbscissaF0D", "Functions0D::GetCurvilinearAbscissaF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetOccludeeF0D = {"_p_Functions0D__GetOccludeeF0D", "Functions0D::GetOccludeeF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetOccludersF0D = {"_p_Functions0D__GetOccludersF0D", "Functions0D::GetOccludersF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetParameterF0D = {"_p_Functions0D__GetParameterF0D", "Functions0D::GetParameterF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetProjectedXF0D = {"_p_Functions0D__GetProjectedXF0D", "Functions0D::GetProjectedXF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetProjectedYF0D = {"_p_Functions0D__GetProjectedYF0D", "Functions0D::GetProjectedYF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetProjectedZF0D = {"_p_Functions0D__GetProjectedZF0D", "Functions0D::GetProjectedZF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetShapeF0D = {"_p_Functions0D__GetShapeF0D", "Functions0D::GetShapeF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetViewMapGradientNormF0D = {"_p_Functions0D__GetViewMapGradientNormF0D", "Functions0D::GetViewMapGradientNormF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetXF0D = {"_p_Functions0D__GetXF0D", "Functions0D::GetXF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetYF0D = {"_p_Functions0D__GetYF0D", "Functions0D::GetYF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__GetZF0D = {"_p_Functions0D__GetZF0D", "Functions0D::GetZF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__LocalAverageDepthF0D = {"_p_Functions0D__LocalAverageDepthF0D", "Functions0D::LocalAverageDepthF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__MaterialF0D = {"_p_Functions0D__MaterialF0D", "Functions0D::MaterialF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__Normal2DF0D = {"_p_Functions0D__Normal2DF0D", "Functions0D::Normal2DF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__QuantitativeInvisibilityF0D = {"_p_Functions0D__QuantitativeInvisibilityF0D", "Functions0D::QuantitativeInvisibilityF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__ReadCompleteViewMapPixelF0D = {"_p_Functions0D__ReadCompleteViewMapPixelF0D", "Functions0D::ReadCompleteViewMapPixelF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__ReadMapPixelF0D = {"_p_Functions0D__ReadMapPixelF0D", "Functions0D::ReadMapPixelF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__ReadSteerableViewMapPixelF0D = {"_p_Functions0D__ReadSteerableViewMapPixelF0D", "Functions0D::ReadSteerableViewMapPixelF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__ShapeIdF0D = {"_p_Functions0D__ShapeIdF0D", "Functions0D::ShapeIdF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__VertexOrientation2DF0D = {"_p_Functions0D__VertexOrientation2DF0D", "Functions0D::VertexOrientation2DF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__VertexOrientation3DF0D = {"_p_Functions0D__VertexOrientation3DF0D", "Functions0D::VertexOrientation3DF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions0D__ZDiscontinuityF0D = {"_p_Functions0D__ZDiscontinuityF0D", "Functions0D::ZDiscontinuityF0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__ChainingTimeStampF1D = {"_p_Functions1D__ChainingTimeStampF1D", "Functions1D::ChainingTimeStampF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__Curvature2DAngleF1D = {"_p_Functions1D__Curvature2DAngleF1D", "Functions1D::Curvature2DAngleF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__CurveNatureF1D = {"_p_Functions1D__CurveNatureF1D", "Functions1D::CurveNatureF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__DensityF1D = {"_p_Functions1D__DensityF1D", "Functions1D::DensityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetCompleteViewMapDensityF1D = {"_p_Functions1D__GetCompleteViewMapDensityF1D", "Functions1D::GetCompleteViewMapDensityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetDirectionalViewMapDensityF1D = {"_p_Functions1D__GetDirectionalViewMapDensityF1D", "Functions1D::GetDirectionalViewMapDensityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetOccludeeF1D = {"_p_Functions1D__GetOccludeeF1D", "Functions1D::GetOccludeeF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetOccludersF1D = {"_p_Functions1D__GetOccludersF1D", "Functions1D::GetOccludersF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetProjectedXF1D = {"_p_Functions1D__GetProjectedXF1D", "Functions1D::GetProjectedXF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetProjectedYF1D = {"_p_Functions1D__GetProjectedYF1D", "Functions1D::GetProjectedYF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetProjectedZF1D = {"_p_Functions1D__GetProjectedZF1D", "Functions1D::GetProjectedZF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetShapeF1D = {"_p_Functions1D__GetShapeF1D", "Functions1D::GetShapeF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetSteerableViewMapDensityF1D = {"_p_Functions1D__GetSteerableViewMapDensityF1D", "Functions1D::GetSteerableViewMapDensityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetViewMapGradientNormF1D = {"_p_Functions1D__GetViewMapGradientNormF1D", "Functions1D::GetViewMapGradientNormF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetXF1D = {"_p_Functions1D__GetXF1D", "Functions1D::GetXF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetYF1D = {"_p_Functions1D__GetYF1D", "Functions1D::GetYF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__GetZF1D = {"_p_Functions1D__GetZF1D", "Functions1D::GetZF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__IncrementChainingTimeStampF1D = {"_p_Functions1D__IncrementChainingTimeStampF1D", "Functions1D::IncrementChainingTimeStampF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__LocalAverageDepthF1D = {"_p_Functions1D__LocalAverageDepthF1D", "Functions1D::LocalAverageDepthF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__Normal2DF1D = {"_p_Functions1D__Normal2DF1D", "Functions1D::Normal2DF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__Orientation2DF1D = {"_p_Functions1D__Orientation2DF1D", "Functions1D::Orientation2DF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__Orientation3DF1D = {"_p_Functions1D__Orientation3DF1D", "Functions1D::Orientation3DF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__QuantitativeInvisibilityF1D = {"_p_Functions1D__QuantitativeInvisibilityF1D", "Functions1D::QuantitativeInvisibilityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__TimeStampF1D = {"_p_Functions1D__TimeStampF1D", "Functions1D::TimeStampF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Functions1D__ZDiscontinuityF1D = {"_p_Functions1D__ZDiscontinuityF1D", "Functions1D::ZDiscontinuityF1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_GrayImage = {"_p_GrayImage", "GrayImage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_I1DContainer = {"_p_I1DContainer", "I1DContainer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Id = {"_p_Id", "Id *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_IntegrationType = {"_p_IntegrationType", "enum IntegrationType *|IntegrationType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Interface0D = {"_p_Interface0D", "Interface0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Interface0DIterator = {"_p_Interface0DIterator", "Interface0DIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Interface0DIteratorNested = {"_p_Interface0DIteratorNested", "Interface0DIteratorNested *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Interface1D = {"_p_Interface1D", "Interface1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Material = {"_p_Material", "Material *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_MediumType = {"_p_MediumType", "MediumType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Module = {"_p_Module", "Module *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Noise = {"_p_Noise", "Noise *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_NonTVertex = {"_p_NonTVertex", "NonTVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_OmissionShader = {"_p_OmissionShader", "OmissionShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Omitter = {"_p_Omitter", "Omitter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Operators = {"_p_Operators", "Operators *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Point = {"_p_Point", "Point *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Polygon3r = {"_p_Polygon3r", "Polygon3r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates0D__FalseUP0D = {"_p_Predicates0D__FalseUP0D", "Predicates0D::FalseUP0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates0D__TrueUP0D = {"_p_Predicates0D__TrueUP0D", "Predicates0D::TrueUP0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__ContourUP1D = {"_p_Predicates1D__ContourUP1D", "Predicates1D::ContourUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__DensityLowerThanUP1D = {"_p_Predicates1D__DensityLowerThanUP1D", "Predicates1D::DensityLowerThanUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__EqualToChainingTimeStampUP1D = {"_p_Predicates1D__EqualToChainingTimeStampUP1D", "Predicates1D::EqualToChainingTimeStampUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__EqualToTimeStampUP1D = {"_p_Predicates1D__EqualToTimeStampUP1D", "Predicates1D::EqualToTimeStampUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__ExternalContourUP1D = {"_p_Predicates1D__ExternalContourUP1D", "Predicates1D::ExternalContourUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__FalseBP1D = {"_p_Predicates1D__FalseBP1D", "Predicates1D::FalseBP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__FalseUP1D = {"_p_Predicates1D__FalseUP1D", "Predicates1D::FalseUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__Length2DBP1D = {"_p_Predicates1D__Length2DBP1D", "Predicates1D::Length2DBP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__QuantitativeInvisibilityUP1D = {"_p_Predicates1D__QuantitativeInvisibilityUP1D", "Predicates1D::QuantitativeInvisibilityUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__SameShapeIdBP1D = {"_p_Predicates1D__SameShapeIdBP1D", "Predicates1D::SameShapeIdBP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__ShapeUP1D = {"_p_Predicates1D__ShapeUP1D", "Predicates1D::ShapeUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__TrueBP1D = {"_p_Predicates1D__TrueBP1D", "Predicates1D::TrueBP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__TrueUP1D = {"_p_Predicates1D__TrueUP1D", "Predicates1D::TrueUP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Predicates1D__ViewMapGradientNormBP1D = {"_p_Predicates1D__ViewMapGradientNormBP1D", "Predicates1D::ViewMapGradientNormBP1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_RGBImage = {"_p_RGBImage", "RGBImage *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ReturnedValueType = {"_p_ReturnedValueType", "ReturnedValueType *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SShape = {"_p_SShape", "SShape *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SVertex = {"_p_SVertex", "SVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SVertex__fedges_container__iterator = {"_p_SVertex__fedges_container__iterator", "SVertex::fedges_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Smoother = {"_p_Smoother", "Smoother *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SmoothingShader = {"_p_SmoothingShader", "SmoothingShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SpatialNoiseShader = {"_p_SpatialNoiseShader", "SpatialNoiseShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_SteerableViewMap = {"_p_SteerableViewMap", "SteerableViewMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stroke = {"_p_Stroke", "Stroke *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeAttribute = {"_p_StrokeAttribute", "StrokeAttribute *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeInternal__StrokeVertexIterator = {"_p_StrokeInternal__StrokeVertexIterator", "StrokeInternal::StrokeVertexIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeLayer = {"_p_StrokeLayer", "StrokeLayer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeRenderer = {"_p_StrokeRenderer", "StrokeRenderer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShader = {"_p_StrokeShader", "StrokeShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__BSplineShader = {"_p_StrokeShaders__BSplineShader", "StrokeShaders::BSplineShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__BackboneStretcherShader = {"_p_StrokeShaders__BackboneStretcherShader", "StrokeShaders::BackboneStretcherShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__BezierCurveShader = {"_p_StrokeShaders__BezierCurveShader", "StrokeShaders::BezierCurveShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__CalligraphicColorShader = {"_p_StrokeShaders__CalligraphicColorShader", "StrokeShaders::CalligraphicColorShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ColorNoiseShader = {"_p_StrokeShaders__ColorNoiseShader", "StrokeShaders::ColorNoiseShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ColorVariationPatternShader = {"_p_StrokeShaders__ColorVariationPatternShader", "StrokeShaders::ColorVariationPatternShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ConstantColorShader = {"_p_StrokeShaders__ConstantColorShader", "StrokeShaders::ConstantColorShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ConstantExternThicknessShader = {"_p_StrokeShaders__ConstantExternThicknessShader", "StrokeShaders::ConstantExternThicknessShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ConstantThicknessShader = {"_p_StrokeShaders__ConstantThicknessShader", "StrokeShaders::ConstantThicknessShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader = {"_p_StrokeShaders__ConstrainedIncreasingThicknessShader", "StrokeShaders::ConstrainedIncreasingThicknessShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ExternalContourStretcherShader = {"_p_StrokeShaders__ExternalContourStretcherShader", "StrokeShaders::ExternalContourStretcherShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__GuidingLinesShader = {"_p_StrokeShaders__GuidingLinesShader", "StrokeShaders::GuidingLinesShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__IncreasingColorShader = {"_p_StrokeShaders__IncreasingColorShader", "StrokeShaders::IncreasingColorShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__IncreasingThicknessShader = {"_p_StrokeShaders__IncreasingThicknessShader", "StrokeShaders::IncreasingThicknessShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__InflateShader = {"_p_StrokeShaders__InflateShader", "StrokeShaders::InflateShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__LengthDependingThicknessShader = {"_p_StrokeShaders__LengthDependingThicknessShader", "StrokeShaders::LengthDependingThicknessShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__MaterialColorShader = {"_p_StrokeShaders__MaterialColorShader", "StrokeShaders::MaterialColorShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__PolygonalizationShader = {"_p_StrokeShaders__PolygonalizationShader", "StrokeShaders::PolygonalizationShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__SamplingShader = {"_p_StrokeShaders__SamplingShader", "StrokeShaders::SamplingShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__StrokeTextureShader = {"_p_StrokeShaders__StrokeTextureShader", "StrokeShaders::StrokeTextureShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__TextureAssignerShader = {"_p_StrokeShaders__TextureAssignerShader", "StrokeShaders::TextureAssignerShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ThicknessNoiseShader = {"_p_StrokeShaders__ThicknessNoiseShader", "StrokeShaders::ThicknessNoiseShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__ThicknessVariationPatternShader = {"_p_StrokeShaders__ThicknessVariationPatternShader", "StrokeShaders::ThicknessVariationPatternShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__TipRemoverShader = {"_p_StrokeShaders__TipRemoverShader", "StrokeShaders::TipRemoverShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__fstreamShader = {"_p_StrokeShaders__fstreamShader", "StrokeShaders::fstreamShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeShaders__streamShader = {"_p_StrokeShaders__streamShader", "StrokeShaders::streamShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokeVertex = {"_p_StrokeVertex", "StrokeVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stroke__vertex_container__iterator = {"_p_Stroke__vertex_container__iterator", "Stroke::vertex_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stroke__viewedge_container__const_iterator = {"_p_Stroke__viewedge_container__const_iterator", "Stroke::viewedge_container::const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stroke__viewedge_container__iterator = {"_p_Stroke__viewedge_container__iterator", "Stroke::viewedge_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StrokesContainer = {"_p_StrokesContainer", "StrokesContainer *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_StyleModule = {"_p_StyleModule", "StyleModule *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_TVertex = {"_p_TVertex", "TVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTId_t = {"_p_UnaryFunction0DTId_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTViewShape_p_t = {"_p_UnaryFunction0DTViewShape_p_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTdouble_t = {"_p_UnaryFunction0DTdouble_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTfloat_t = {"_p_UnaryFunction0DTfloat_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction0D > *|UnaryFunction0D > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTunsigned_int_t = {"_p_UnaryFunction0DTunsigned_int_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTvoid_t = {"_p_UnaryFunction0DTvoid_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTdouble_t = {"_p_UnaryFunction1DTdouble_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTfloat_t = {"_p_UnaryFunction1DTfloat_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction1D > *|UnaryFunction1D > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTunsigned_int_t = {"_p_UnaryFunction1DTunsigned_int_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTvoid_t = {"_p_UnaryFunction1DTvoid_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryPredicate0D = {"_p_UnaryPredicate0D", "UnaryPredicate0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryPredicate1D = {"_p_UnaryPredicate1D", "UnaryPredicate1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tdouble_t = {"_p_VecMat__HVec3Tdouble_t", "VecMat::HVec3 *|Geometry::HVec3r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tfloat_t = {"_p_VecMat__HVec3Tfloat_t", "VecMat::HVec3 *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tint_t = {"_p_VecMat__HVec3Tint_t", "VecMat::HVec3 *|Geometry::HVec3i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tunsigned_int_t = {"_p_VecMat__HVec3Tunsigned_int_t", "VecMat::HVec3 *|Geometry::HVec3u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_2_t = {"_p_VecMat__SquareMatrixTdouble_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_3_t = {"_p_VecMat__SquareMatrixTdouble_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_4_t = {"_p_VecMat__SquareMatrixTdouble_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_2_t = {"_p_VecMat__SquareMatrixTfloat_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_3_t = {"_p_VecMat__SquareMatrixTfloat_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_4_t = {"_p_VecMat__SquareMatrixTfloat_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_2_t = {"_p_VecMat__SquareMatrixTint_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_3_t = {"_p_VecMat__SquareMatrixTint_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_4_t = {"_p_VecMat__SquareMatrixTint_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_2_t = {"_p_VecMat__SquareMatrixTunsigned_int_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_3_t = {"_p_VecMat__SquareMatrixTunsigned_int_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_4_t = {"_p_VecMat__SquareMatrixTunsigned_int_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tdouble_t = {"_p_VecMat__Vec2Tdouble_t", "VecMat::Vec2 *|Geometry::Vec2d *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tfloat_t = {"_p_VecMat__Vec2Tfloat_t", "VecMat::Vec2 *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tint_t = {"_p_VecMat__Vec2Tint_t", "VecMat::Vec2 *|Geometry::Vec2i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tunsigned_int_t = {"_p_VecMat__Vec2Tunsigned_int_t", "VecMat::Vec2 *|Geometry::Vec2u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tdouble_t = {"_p_VecMat__Vec3Tdouble_t", "VecMat::Vec3 *|Geometry::Vec3r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tfloat_t = {"_p_VecMat__Vec3Tfloat_t", "VecMat::Vec3 *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tint_t = {"_p_VecMat__Vec3Tint_t", "VecMat::Vec3 *|Geometry::Vec3i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tunsigned_int_t = {"_p_VecMat__Vec3Tunsigned_int_t", "VecMat::Vec3 *|Geometry::Vec3u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTdouble_2_t = {"_p_VecMat__VecTdouble_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTdouble_3_t = {"_p_VecMat__VecTdouble_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTfloat_2_t = {"_p_VecMat__VecTfloat_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTfloat_3_t = {"_p_VecMat__VecTfloat_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTint_2_t = {"_p_VecMat__VecTint_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTint_3_t = {"_p_VecMat__VecTint_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTunsigned_int_2_t = {"_p_VecMat__VecTunsigned_int_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTunsigned_int_3_t = {"_p_VecMat__VecTunsigned_int_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Vertex = {"_p_Vertex", "Vertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewEdge = {"_p_ViewEdge", "ViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewEdgeInternal__SVertexIterator = {"_p_ViewEdgeInternal__SVertexIterator", "ViewEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewEdgeInternal__ViewEdgeIterator = {"_p_ViewEdgeInternal__ViewEdgeIterator", "ViewEdgeInternal::ViewEdgeIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewMap = {"_p_ViewMap", "ViewMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewShape = {"_p_ViewShape", "ViewShape *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertex = {"_p_ViewVertex", "ViewVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator", "ViewVertexInternal::orientedViewEdgeIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_edge_iterator = {"_p_const_edge_iterator", "const_edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_fedge_iterator = {"_p_const_fedge_iterator", "const_fedge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_point_iterator = {"_p_const_point_iterator", "const_point_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_reference = {"_p_const_reference", "const_reference *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_const_vertex_iterator = {"_p_const_vertex_iterator", "const_vertex_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_directedViewEdge = {"_p_directedViewEdge", "directedViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_edge_iterator = {"_p_edge_iterator", "edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_edge_pointers_container = {"_p_edge_pointers_container", "edge_pointers_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_edges_container = {"_p_edges_container", "edges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_fedge_iterator = {"_p_fedge_iterator", "fedge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_fedges_container = {"_p_fedges_container", "fedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_id_type = {"_p_id_type", "id_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ltstr = {"_p_ltstr", "ltstr *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_mapsMap = {"_p_mapsMap", "mapsMap *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_occluder_container__const_iterator = {"_p_occluder_container__const_iterator", "occluder_container::const_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_point_iterator = {"_p_point_iterator", "point_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_point_type = {"_p_point_type", "point_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_setTVecMat__Vec3Tdouble_t_t = {"_p_setTVecMat__Vec3Tdouble_t_t", "set > *|set *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__pairTViewEdge_p_bool_t = {"_p_std__pairTViewEdge_p_bool_t", "std::pair *|ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t = {"_p_std__vectorTMaterial_std__allocatorTMaterial_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t", "std::vector *|ViewMap::svertices_container *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t = {"_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t = {"_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t = {"_p_std__vectorTint_std__allocatorTint_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type = {"_p_std__vectorTint_std__allocatorTint_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t = {"_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t = {"_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t", "std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_svertices_container = {"_p_svertices_container", "svertices_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__PySwigIterator = {"_p_swig__PySwigIterator", "swig::PySwigIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|Nature::EdgeNature *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_vertex_container = {"_p_vertex_container", "vertex_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_vertex_iterator = {"_p_vertex_iterator", "vertex_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_vertex_type = {"_p_vertex_type", "vertex_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_viewedge_container = {"_p_viewedge_container", "viewedge_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_viewedges_container = {"_p_viewedges_container", "viewedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_viewshapes_container = {"_p_viewshapes_container", "viewshapes_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_viewvertices_container = {"_p_viewvertices_container", "viewvertices_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type = {"_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type", "FEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type = {"_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type", "SVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type = {"_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type", "StrokeShader *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type = {"_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type", "ViewEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type = {"_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type", "ViewShape *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type = {"_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type", "ViewVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_AdjacencyIterator, + &_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, + &_swigt__p_BinaryPredicate0D, + &_swigt__p_BinaryPredicate1D, + &_swigt__p_CalligraphicShader, + &_swigt__p_Canvas, + &_swigt__p_Chain, + &_swigt__p_ChainPredicateIterator, + &_swigt__p_ChainSilhouetteIterator, + &_swigt__p_ChainingIterator, + &_swigt__p_CurvatureInfo, + &_swigt__p_Curve, + &_swigt__p_CurveInternal__CurvePointIterator, + &_swigt__p_CurvePoint, + &_swigt__p_Curve__vertex_container__iterator, + &_swigt__p_FEdge, + &_swigt__p_FEdgeInternal__SVertexIterator, + &_swigt__p_FEdgeSharp, + &_swigt__p_FEdgeSmooth, + &_swigt__p_Functions0D__Curvature2DAngleF0D, + &_swigt__p_Functions0D__CurveNatureF0D, + &_swigt__p_Functions0D__DensityF0D, + &_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, + &_swigt__p_Functions0D__GetOccludeeF0D, + &_swigt__p_Functions0D__GetOccludersF0D, + &_swigt__p_Functions0D__GetParameterF0D, + &_swigt__p_Functions0D__GetProjectedXF0D, + &_swigt__p_Functions0D__GetProjectedYF0D, + &_swigt__p_Functions0D__GetProjectedZF0D, + &_swigt__p_Functions0D__GetShapeF0D, + &_swigt__p_Functions0D__GetViewMapGradientNormF0D, + &_swigt__p_Functions0D__GetXF0D, + &_swigt__p_Functions0D__GetYF0D, + &_swigt__p_Functions0D__GetZF0D, + &_swigt__p_Functions0D__LocalAverageDepthF0D, + &_swigt__p_Functions0D__MaterialF0D, + &_swigt__p_Functions0D__Normal2DF0D, + &_swigt__p_Functions0D__QuantitativeInvisibilityF0D, + &_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, + &_swigt__p_Functions0D__ReadMapPixelF0D, + &_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, + &_swigt__p_Functions0D__ShapeIdF0D, + &_swigt__p_Functions0D__VertexOrientation2DF0D, + &_swigt__p_Functions0D__VertexOrientation3DF0D, + &_swigt__p_Functions0D__ZDiscontinuityF0D, + &_swigt__p_Functions1D__ChainingTimeStampF1D, + &_swigt__p_Functions1D__Curvature2DAngleF1D, + &_swigt__p_Functions1D__CurveNatureF1D, + &_swigt__p_Functions1D__DensityF1D, + &_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, + &_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, + &_swigt__p_Functions1D__GetOccludeeF1D, + &_swigt__p_Functions1D__GetOccludersF1D, + &_swigt__p_Functions1D__GetProjectedXF1D, + &_swigt__p_Functions1D__GetProjectedYF1D, + &_swigt__p_Functions1D__GetProjectedZF1D, + &_swigt__p_Functions1D__GetShapeF1D, + &_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, + &_swigt__p_Functions1D__GetViewMapGradientNormF1D, + &_swigt__p_Functions1D__GetXF1D, + &_swigt__p_Functions1D__GetYF1D, + &_swigt__p_Functions1D__GetZF1D, + &_swigt__p_Functions1D__IncrementChainingTimeStampF1D, + &_swigt__p_Functions1D__LocalAverageDepthF1D, + &_swigt__p_Functions1D__Normal2DF1D, + &_swigt__p_Functions1D__Orientation2DF1D, + &_swigt__p_Functions1D__Orientation3DF1D, + &_swigt__p_Functions1D__QuantitativeInvisibilityF1D, + &_swigt__p_Functions1D__TimeStampF1D, + &_swigt__p_Functions1D__ZDiscontinuityF1D, + &_swigt__p_GrayImage, + &_swigt__p_I1DContainer, + &_swigt__p_Id, + &_swigt__p_IntegrationType, + &_swigt__p_Interface0D, + &_swigt__p_Interface0DIterator, + &_swigt__p_Interface0DIteratorNested, + &_swigt__p_Interface1D, + &_swigt__p_Material, + &_swigt__p_MediumType, + &_swigt__p_Module, + &_swigt__p_Noise, + &_swigt__p_NonTVertex, + &_swigt__p_OmissionShader, + &_swigt__p_Omitter, + &_swigt__p_Operators, + &_swigt__p_Point, + &_swigt__p_Polygon3r, + &_swigt__p_Predicates0D__FalseUP0D, + &_swigt__p_Predicates0D__TrueUP0D, + &_swigt__p_Predicates1D__ContourUP1D, + &_swigt__p_Predicates1D__DensityLowerThanUP1D, + &_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, + &_swigt__p_Predicates1D__EqualToTimeStampUP1D, + &_swigt__p_Predicates1D__ExternalContourUP1D, + &_swigt__p_Predicates1D__FalseBP1D, + &_swigt__p_Predicates1D__FalseUP1D, + &_swigt__p_Predicates1D__Length2DBP1D, + &_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, + &_swigt__p_Predicates1D__SameShapeIdBP1D, + &_swigt__p_Predicates1D__ShapeUP1D, + &_swigt__p_Predicates1D__TrueBP1D, + &_swigt__p_Predicates1D__TrueUP1D, + &_swigt__p_Predicates1D__ViewMapGradientNormBP1D, + &_swigt__p_RGBImage, + &_swigt__p_ReturnedValueType, + &_swigt__p_SShape, + &_swigt__p_SVertex, + &_swigt__p_SVertex__fedges_container__iterator, + &_swigt__p_Smoother, + &_swigt__p_SmoothingShader, + &_swigt__p_SpatialNoiseShader, + &_swigt__p_SteerableViewMap, + &_swigt__p_Stroke, + &_swigt__p_StrokeAttribute, + &_swigt__p_StrokeInternal__StrokeVertexIterator, + &_swigt__p_StrokeLayer, + &_swigt__p_StrokeRenderer, + &_swigt__p_StrokeShader, + &_swigt__p_StrokeShaders__BSplineShader, + &_swigt__p_StrokeShaders__BackboneStretcherShader, + &_swigt__p_StrokeShaders__BezierCurveShader, + &_swigt__p_StrokeShaders__CalligraphicColorShader, + &_swigt__p_StrokeShaders__ColorNoiseShader, + &_swigt__p_StrokeShaders__ColorVariationPatternShader, + &_swigt__p_StrokeShaders__ConstantColorShader, + &_swigt__p_StrokeShaders__ConstantExternThicknessShader, + &_swigt__p_StrokeShaders__ConstantThicknessShader, + &_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, + &_swigt__p_StrokeShaders__ExternalContourStretcherShader, + &_swigt__p_StrokeShaders__GuidingLinesShader, + &_swigt__p_StrokeShaders__IncreasingColorShader, + &_swigt__p_StrokeShaders__IncreasingThicknessShader, + &_swigt__p_StrokeShaders__InflateShader, + &_swigt__p_StrokeShaders__LengthDependingThicknessShader, + &_swigt__p_StrokeShaders__MaterialColorShader, + &_swigt__p_StrokeShaders__PolygonalizationShader, + &_swigt__p_StrokeShaders__SamplingShader, + &_swigt__p_StrokeShaders__StrokeTextureShader, + &_swigt__p_StrokeShaders__TextureAssignerShader, + &_swigt__p_StrokeShaders__ThicknessNoiseShader, + &_swigt__p_StrokeShaders__ThicknessVariationPatternShader, + &_swigt__p_StrokeShaders__TipRemoverShader, + &_swigt__p_StrokeShaders__fstreamShader, + &_swigt__p_StrokeShaders__streamShader, + &_swigt__p_StrokeVertex, + &_swigt__p_Stroke__vertex_container__iterator, + &_swigt__p_Stroke__viewedge_container__const_iterator, + &_swigt__p_Stroke__viewedge_container__iterator, + &_swigt__p_StrokesContainer, + &_swigt__p_StyleModule, + &_swigt__p_TVertex, + &_swigt__p_UnaryFunction0DTId_t, + &_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, + &_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, + &_swigt__p_UnaryFunction0DTViewShape_p_t, + &_swigt__p_UnaryFunction0DTdouble_t, + &_swigt__p_UnaryFunction0DTfloat_t, + &_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + &_swigt__p_UnaryFunction0DTunsigned_int_t, + &_swigt__p_UnaryFunction0DTvoid_t, + &_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, + &_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, + &_swigt__p_UnaryFunction1DTdouble_t, + &_swigt__p_UnaryFunction1DTfloat_t, + &_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + &_swigt__p_UnaryFunction1DTunsigned_int_t, + &_swigt__p_UnaryFunction1DTvoid_t, + &_swigt__p_UnaryPredicate0D, + &_swigt__p_UnaryPredicate1D, + &_swigt__p_VecMat__HVec3Tdouble_t, + &_swigt__p_VecMat__HVec3Tfloat_t, + &_swigt__p_VecMat__HVec3Tint_t, + &_swigt__p_VecMat__HVec3Tunsigned_int_t, + &_swigt__p_VecMat__SquareMatrixTdouble_2_t, + &_swigt__p_VecMat__SquareMatrixTdouble_3_t, + &_swigt__p_VecMat__SquareMatrixTdouble_4_t, + &_swigt__p_VecMat__SquareMatrixTfloat_2_t, + &_swigt__p_VecMat__SquareMatrixTfloat_3_t, + &_swigt__p_VecMat__SquareMatrixTfloat_4_t, + &_swigt__p_VecMat__SquareMatrixTint_2_t, + &_swigt__p_VecMat__SquareMatrixTint_3_t, + &_swigt__p_VecMat__SquareMatrixTint_4_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, + &_swigt__p_VecMat__Vec2Tdouble_t, + &_swigt__p_VecMat__Vec2Tfloat_t, + &_swigt__p_VecMat__Vec2Tint_t, + &_swigt__p_VecMat__Vec2Tunsigned_int_t, + &_swigt__p_VecMat__Vec3Tdouble_t, + &_swigt__p_VecMat__Vec3Tfloat_t, + &_swigt__p_VecMat__Vec3Tint_t, + &_swigt__p_VecMat__Vec3Tunsigned_int_t, + &_swigt__p_VecMat__VecTdouble_2_t, + &_swigt__p_VecMat__VecTdouble_3_t, + &_swigt__p_VecMat__VecTfloat_2_t, + &_swigt__p_VecMat__VecTfloat_3_t, + &_swigt__p_VecMat__VecTint_2_t, + &_swigt__p_VecMat__VecTint_3_t, + &_swigt__p_VecMat__VecTunsigned_int_2_t, + &_swigt__p_VecMat__VecTunsigned_int_3_t, + &_swigt__p_Vertex, + &_swigt__p_ViewEdge, + &_swigt__p_ViewEdgeInternal__SVertexIterator, + &_swigt__p_ViewEdgeInternal__ViewEdgeIterator, + &_swigt__p_ViewMap, + &_swigt__p_ViewShape, + &_swigt__p_ViewVertex, + &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, + &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, + &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, + &_swigt__p_allocator_type, + &_swigt__p_char, + &_swigt__p_const_edge_iterator, + &_swigt__p_const_fedge_iterator, + &_swigt__p_const_point_iterator, + &_swigt__p_const_reference, + &_swigt__p_const_vertex_iterator, + &_swigt__p_difference_type, + &_swigt__p_directedViewEdge, + &_swigt__p_double, + &_swigt__p_edge_iterator, + &_swigt__p_edge_pointers_container, + &_swigt__p_edges_container, + &_swigt__p_fedge_iterator, + &_swigt__p_fedges_container, + &_swigt__p_float, + &_swigt__p_id_type, + &_swigt__p_int, + &_swigt__p_ltstr, + &_swigt__p_mapsMap, + &_swigt__p_occluder_container__const_iterator, + &_swigt__p_p_PyObject, + &_swigt__p_point_iterator, + &_swigt__p_point_type, + &_swigt__p_reference, + &_swigt__p_setTVecMat__Vec3Tdouble_t_t, + &_swigt__p_size_type, + &_swigt__p_std__invalid_argument, + &_swigt__p_std__pairTViewEdge_p_bool_t, + &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, + &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, + &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, + &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, + &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, + &_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, + &_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, + &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, + &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, + &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, + &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, + &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorTint_std__allocatorTint_t_t, + &_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, + &_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, + &_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + &_swigt__p_svertices_container, + &_swigt__p_swig__PySwigIterator, + &_swigt__p_unsigned_int, + &_swigt__p_unsigned_short, + &_swigt__p_value_type, + &_swigt__p_vertex_container, + &_swigt__p_vertex_iterator, + &_swigt__p_vertex_type, + &_swigt__p_viewedge_container, + &_swigt__p_viewedges_container, + &_swigt__p_viewshapes_container, + &_swigt__p_viewvertices_container, + &_swigt__p_void, + &_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, + &_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, + &_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, + &_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, + &_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, + &_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, +}; + +static swig_cast_info _swigc__p_AdjacencyIterator[] = { {&_swigt__p_AdjacencyIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BinaryPredicate0D[] = { {&_swigt__p_BinaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BinaryPredicate1D[] = { {&_swigt__p_Predicates1D__Length2DBP1D, _p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__FalseBP1D, _p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_BinaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__ViewMapGradientNormBP1D, _p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueBP1D, _p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__SameShapeIdBP1D, _p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CalligraphicShader[] = { {&_swigt__p_CalligraphicShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Canvas[] = { {&_swigt__p_Canvas, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Chain[] = { {&_swigt__p_Chain, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ChainPredicateIterator[] = { {&_swigt__p_ChainPredicateIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ChainSilhouetteIterator[] = { {&_swigt__p_ChainSilhouetteIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ChainingIterator[] = { {&_swigt__p_ChainingIterator, 0, 0, 0}, {&_swigt__p_ChainSilhouetteIterator, _p_ChainSilhouetteIteratorTo_p_ChainingIterator, 0, 0}, {&_swigt__p_ChainPredicateIterator, _p_ChainPredicateIteratorTo_p_ChainingIterator, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CurvatureInfo[] = { {&_swigt__p_CurvatureInfo, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Curve[] = { {&_swigt__p_Curve, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CurveInternal__CurvePointIterator[] = { {&_swigt__p_CurveInternal__CurvePointIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_CurvePoint[] = { {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_CurvePoint, 0, 0}, {&_swigt__p_CurvePoint, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Curve__vertex_container__iterator[] = { {&_swigt__p_Curve__vertex_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdgeInternal__SVertexIterator[] = { {&_swigt__p_FEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdgeSharp[] = { {&_swigt__p_FEdgeSharp, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdgeSmooth[] = { {&_swigt__p_FEdgeSmooth, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__Curvature2DAngleF0D[] = { {&_swigt__p_Functions0D__Curvature2DAngleF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__CurveNatureF0D[] = { {&_swigt__p_Functions0D__CurveNatureF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__DensityF0D[] = { {&_swigt__p_Functions0D__DensityF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetCurvilinearAbscissaF0D[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetOccludeeF0D[] = { {&_swigt__p_Functions0D__GetOccludeeF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetOccludersF0D[] = { {&_swigt__p_Functions0D__GetOccludersF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetParameterF0D[] = { {&_swigt__p_Functions0D__GetParameterF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetProjectedXF0D[] = { {&_swigt__p_Functions0D__GetProjectedXF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetProjectedYF0D[] = { {&_swigt__p_Functions0D__GetProjectedYF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetProjectedZF0D[] = { {&_swigt__p_Functions0D__GetProjectedZF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetShapeF0D[] = { {&_swigt__p_Functions0D__GetShapeF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetViewMapGradientNormF0D[] = { {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetXF0D[] = { {&_swigt__p_Functions0D__GetXF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetYF0D[] = { {&_swigt__p_Functions0D__GetYF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__GetZF0D[] = { {&_swigt__p_Functions0D__GetZF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__LocalAverageDepthF0D[] = { {&_swigt__p_Functions0D__LocalAverageDepthF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__MaterialF0D[] = { {&_swigt__p_Functions0D__MaterialF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__Normal2DF0D[] = { {&_swigt__p_Functions0D__Normal2DF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__QuantitativeInvisibilityF0D[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__ReadCompleteViewMapPixelF0D[] = { {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__ReadMapPixelF0D[] = { {&_swigt__p_Functions0D__ReadMapPixelF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__ReadSteerableViewMapPixelF0D[] = { {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__ShapeIdF0D[] = { {&_swigt__p_Functions0D__ShapeIdF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__VertexOrientation2DF0D[] = { {&_swigt__p_Functions0D__VertexOrientation2DF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__VertexOrientation3DF0D[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions0D__ZDiscontinuityF0D[] = { {&_swigt__p_Functions0D__ZDiscontinuityF0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__ChainingTimeStampF1D[] = { {&_swigt__p_Functions1D__ChainingTimeStampF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__Curvature2DAngleF1D[] = { {&_swigt__p_Functions1D__Curvature2DAngleF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__CurveNatureF1D[] = { {&_swigt__p_Functions1D__CurveNatureF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__DensityF1D[] = { {&_swigt__p_Functions1D__DensityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetCompleteViewMapDensityF1D[] = { {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetDirectionalViewMapDensityF1D[] = { {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetOccludeeF1D[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetOccludersF1D[] = { {&_swigt__p_Functions1D__GetOccludersF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetProjectedXF1D[] = { {&_swigt__p_Functions1D__GetProjectedXF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetProjectedYF1D[] = { {&_swigt__p_Functions1D__GetProjectedYF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetProjectedZF1D[] = { {&_swigt__p_Functions1D__GetProjectedZF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetShapeF1D[] = { {&_swigt__p_Functions1D__GetShapeF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetSteerableViewMapDensityF1D[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetViewMapGradientNormF1D[] = { {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetXF1D[] = { {&_swigt__p_Functions1D__GetXF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetYF1D[] = { {&_swigt__p_Functions1D__GetYF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__GetZF1D[] = { {&_swigt__p_Functions1D__GetZF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__IncrementChainingTimeStampF1D[] = { {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__LocalAverageDepthF1D[] = { {&_swigt__p_Functions1D__LocalAverageDepthF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__Normal2DF1D[] = { {&_swigt__p_Functions1D__Normal2DF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__Orientation2DF1D[] = { {&_swigt__p_Functions1D__Orientation2DF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__Orientation3DF1D[] = { {&_swigt__p_Functions1D__Orientation3DF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__QuantitativeInvisibilityF1D[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__TimeStampF1D[] = { {&_swigt__p_Functions1D__TimeStampF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Functions1D__ZDiscontinuityF1D[] = { {&_swigt__p_Functions1D__ZDiscontinuityF1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_GrayImage[] = { {&_swigt__p_GrayImage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_I1DContainer[] = { {&_swigt__p_I1DContainer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Id[] = { {&_swigt__p_Id, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IntegrationType[] = { {&_swigt__p_IntegrationType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0DIterator[] = { {&_swigt__p_Interface0DIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0DIteratorNested[] = { {&_swigt__p_Interface0DIteratorNested, 0, 0, 0}, {&_swigt__p_FEdgeInternal__SVertexIterator, _p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_ViewEdgeInternal__SVertexIterator, _p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_CurveInternal__CurvePointIterator, _p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_StrokeInternal__StrokeVertexIterator, _p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Material[] = { {&_swigt__p_Material, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_MediumType[] = { {&_swigt__p_MediumType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Module[] = { {&_swigt__p_Module, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Noise[] = { {&_swigt__p_Noise, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_NonTVertex[] = { {&_swigt__p_NonTVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_OmissionShader[] = { {&_swigt__p_OmissionShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Omitter[] = { {&_swigt__p_Omitter, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Operators[] = { {&_swigt__p_Operators, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Point[] = { {&_swigt__p_Point, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Polygon3r[] = { {&_swigt__p_Polygon3r, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates0D__FalseUP0D[] = { {&_swigt__p_Predicates0D__FalseUP0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates0D__TrueUP0D[] = { {&_swigt__p_Predicates0D__TrueUP0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__ContourUP1D[] = { {&_swigt__p_Predicates1D__ContourUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__DensityLowerThanUP1D[] = { {&_swigt__p_Predicates1D__DensityLowerThanUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__EqualToChainingTimeStampUP1D[] = { {&_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__EqualToTimeStampUP1D[] = { {&_swigt__p_Predicates1D__EqualToTimeStampUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__ExternalContourUP1D[] = { {&_swigt__p_Predicates1D__ExternalContourUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__FalseBP1D[] = { {&_swigt__p_Predicates1D__FalseBP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__FalseUP1D[] = { {&_swigt__p_Predicates1D__FalseUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__Length2DBP1D[] = { {&_swigt__p_Predicates1D__Length2DBP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__QuantitativeInvisibilityUP1D[] = { {&_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__SameShapeIdBP1D[] = { {&_swigt__p_Predicates1D__SameShapeIdBP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__ShapeUP1D[] = { {&_swigt__p_Predicates1D__ShapeUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__TrueBP1D[] = { {&_swigt__p_Predicates1D__TrueBP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__TrueUP1D[] = { {&_swigt__p_Predicates1D__TrueUP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Predicates1D__ViewMapGradientNormBP1D[] = { {&_swigt__p_Predicates1D__ViewMapGradientNormBP1D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_RGBImage[] = { {&_swigt__p_RGBImage, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ReturnedValueType[] = { {&_swigt__p_ReturnedValueType, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SShape[] = { {&_swigt__p_SShape, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SVertex__fedges_container__iterator[] = { {&_swigt__p_SVertex__fedges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Smoother[] = { {&_swigt__p_Smoother, 0, 0, 0}, {&_swigt__p_Omitter, _p_OmitterTo_p_Smoother, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SmoothingShader[] = { {&_swigt__p_SmoothingShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SpatialNoiseShader[] = { {&_swigt__p_SpatialNoiseShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SteerableViewMap[] = { {&_swigt__p_SteerableViewMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Stroke[] = { {&_swigt__p_Stroke, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeAttribute[] = { {&_swigt__p_StrokeAttribute, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeInternal__StrokeVertexIterator[] = { {&_swigt__p_StrokeInternal__StrokeVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeLayer[] = { {&_swigt__p_StrokeLayer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeRenderer[] = { {&_swigt__p_StrokeRenderer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__BSplineShader[] = { {&_swigt__p_StrokeShaders__BSplineShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__BackboneStretcherShader[] = { {&_swigt__p_StrokeShaders__BackboneStretcherShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__BezierCurveShader[] = { {&_swigt__p_StrokeShaders__BezierCurveShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__CalligraphicColorShader[] = { {&_swigt__p_StrokeShaders__CalligraphicColorShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ColorNoiseShader[] = { {&_swigt__p_StrokeShaders__ColorNoiseShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ColorVariationPatternShader[] = { {&_swigt__p_StrokeShaders__ColorVariationPatternShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ConstantColorShader[] = { {&_swigt__p_StrokeShaders__ConstantColorShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ConstantExternThicknessShader[] = { {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ConstantThicknessShader[] = { {&_swigt__p_StrokeShaders__ConstantThicknessShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ConstrainedIncreasingThicknessShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ExternalContourStretcherShader[] = { {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__GuidingLinesShader[] = { {&_swigt__p_StrokeShaders__GuidingLinesShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__IncreasingColorShader[] = { {&_swigt__p_StrokeShaders__IncreasingColorShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__IncreasingThicknessShader[] = { {&_swigt__p_StrokeShaders__IncreasingThicknessShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__InflateShader[] = { {&_swigt__p_StrokeShaders__InflateShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__LengthDependingThicknessShader[] = { {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__MaterialColorShader[] = { {&_swigt__p_StrokeShaders__MaterialColorShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__PolygonalizationShader[] = { {&_swigt__p_StrokeShaders__PolygonalizationShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__SamplingShader[] = { {&_swigt__p_StrokeShaders__SamplingShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__StrokeTextureShader[] = { {&_swigt__p_StrokeShaders__StrokeTextureShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__TextureAssignerShader[] = { {&_swigt__p_StrokeShaders__TextureAssignerShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ThicknessNoiseShader[] = { {&_swigt__p_StrokeShaders__ThicknessNoiseShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__ThicknessVariationPatternShader[] = { {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__TipRemoverShader[] = { {&_swigt__p_StrokeShaders__TipRemoverShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__fstreamShader[] = { {&_swigt__p_StrokeShaders__fstreamShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShaders__streamShader[] = { {&_swigt__p_StrokeShaders__streamShader, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeVertex[] = { {&_swigt__p_StrokeVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Stroke__vertex_container__iterator[] = { {&_swigt__p_Stroke__vertex_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Stroke__viewedge_container__const_iterator[] = { {&_swigt__p_Stroke__viewedge_container__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Stroke__viewedge_container__iterator[] = { {&_swigt__p_Stroke__viewedge_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokesContainer[] = { {&_swigt__p_StrokesContainer, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StyleModule[] = { {&_swigt__p_StyleModule, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_TVertex[] = { {&_swigt__p_TVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTId_t[] = { {&_swigt__p_UnaryFunction0DTId_t, 0, 0, 0}, {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DTViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTdouble_t[] = { {&_swigt__p_UnaryFunction0DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTfloat_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_UnaryFunction0DTfloat_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTunsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTvoid_t[] = { {&_swigt__p_UnaryFunction0DTvoid_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTdouble_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_UnaryFunction1DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTfloat_t[] = { {&_swigt__p_UnaryFunction1DTfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTunsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTvoid_t[] = { {&_swigt__p_UnaryFunction1DTvoid_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryPredicate0D[] = { {&_swigt__p_Predicates0D__TrueUP0D, _p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_Predicates0D__FalseUP0D, _p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_UnaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryPredicate1D[] = { {&_swigt__p_Predicates1D__FalseUP1D, _p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ShapeUP1D, _p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__DensityLowerThanUP1D, _p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_UnaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__EqualToTimeStampUP1D, _p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, _p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueUP1D, _p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, _p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ContourUP1D, _p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ExternalContourUP1D, _p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tdouble_t[] = { {&_swigt__p_VecMat__HVec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tfloat_t[] = { {&_swigt__p_VecMat__HVec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tint_t[] = { {&_swigt__p_VecMat__HVec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__HVec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tdouble_t[] = { {&_swigt__p_VecMat__Vec2Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tfloat_t[] = { {&_swigt__p_VecMat__Vec2Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tint_t[] = { {&_swigt__p_VecMat__Vec2Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec2Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tdouble_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tfloat_t[] = { {&_swigt__p_VecMat__Vec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tint_t[] = { {&_swigt__p_VecMat__Vec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTdouble_2_t[] = { {&_swigt__p_VecMat__VecTdouble_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tdouble_t, _p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTdouble_3_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, _p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t, 0, 0}, {&_swigt__p_VecMat__VecTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTfloat_2_t[] = { {&_swigt__p_VecMat__VecTfloat_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tfloat_t, _p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTfloat_3_t[] = { {&_swigt__p_VecMat__VecTfloat_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tfloat_t, _p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTint_2_t[] = { {&_swigt__p_VecMat__VecTint_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tint_t, _p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTint_3_t[] = { {&_swigt__p_VecMat__VecTint_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tint_t, _p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_2_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tunsigned_int_t, _p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_3_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tunsigned_int_t, _p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Vertex[] = { {&_swigt__p_Vertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__p_ViewEdge, 0, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdgeInternal__SVertexIterator[] = { {&_swigt__p_ViewEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdgeInternal__ViewEdgeIterator[] = { {&_swigt__p_ViewEdgeInternal__ViewEdgeIterator, 0, 0, 0}, {&_swigt__p_ChainingIterator, _p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainSilhouetteIterator, _p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainPredicateIterator, _p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewMap[] = { {&_swigt__p_ViewMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_allocator_type[] = { {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_edge_iterator[] = { {&_swigt__p_const_edge_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_fedge_iterator[] = { {&_swigt__p_const_fedge_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_point_iterator[] = { {&_swigt__p_const_point_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_reference[] = { {&_swigt__p_const_reference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_const_vertex_iterator[] = { {&_swigt__p_const_vertex_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_difference_type[] = { {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_directedViewEdge[] = { {&_swigt__p_directedViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_edge_iterator[] = { {&_swigt__p_edge_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_edge_pointers_container[] = { {&_swigt__p_edge_pointers_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_edges_container[] = { {&_swigt__p_edges_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_fedge_iterator[] = { {&_swigt__p_fedge_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_fedges_container[] = { {&_swigt__p_fedges_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_id_type[] = { {&_swigt__p_id_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ltstr[] = { {&_swigt__p_ltstr, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_mapsMap[] = { {&_swigt__p_mapsMap, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_occluder_container__const_iterator[] = { {&_swigt__p_occluder_container__const_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_point_iterator[] = { {&_swigt__p_point_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_point_type[] = { {&_swigt__p_point_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_setTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_setTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__pairTViewEdge_p_bool_t[] = { {&_swigt__p_std__pairTViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t[] = { {&_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t[] = { {&_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t[] = { {&_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t[] = { {&_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_svertices_container[] = { {&_swigt__p_svertices_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__PySwigIterator[] = { {&_swigt__p_swig__PySwigIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_value_type[] = { {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_vertex_container[] = { {&_swigt__p_vertex_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_vertex_iterator[] = { {&_swigt__p_vertex_iterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_vertex_type[] = { {&_swigt__p_vertex_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_viewedge_container[] = { {&_swigt__p_viewedge_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_viewedges_container[] = { {&_swigt__p_viewedges_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_viewshapes_container[] = { {&_swigt__p_viewshapes_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_viewvertices_container[] = { {&_swigt__p_viewvertices_container, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_AdjacencyIterator, + _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t, + _swigc__p_BinaryPredicate0D, + _swigc__p_BinaryPredicate1D, + _swigc__p_CalligraphicShader, + _swigc__p_Canvas, + _swigc__p_Chain, + _swigc__p_ChainPredicateIterator, + _swigc__p_ChainSilhouetteIterator, + _swigc__p_ChainingIterator, + _swigc__p_CurvatureInfo, + _swigc__p_Curve, + _swigc__p_CurveInternal__CurvePointIterator, + _swigc__p_CurvePoint, + _swigc__p_Curve__vertex_container__iterator, + _swigc__p_FEdge, + _swigc__p_FEdgeInternal__SVertexIterator, + _swigc__p_FEdgeSharp, + _swigc__p_FEdgeSmooth, + _swigc__p_Functions0D__Curvature2DAngleF0D, + _swigc__p_Functions0D__CurveNatureF0D, + _swigc__p_Functions0D__DensityF0D, + _swigc__p_Functions0D__GetCurvilinearAbscissaF0D, + _swigc__p_Functions0D__GetOccludeeF0D, + _swigc__p_Functions0D__GetOccludersF0D, + _swigc__p_Functions0D__GetParameterF0D, + _swigc__p_Functions0D__GetProjectedXF0D, + _swigc__p_Functions0D__GetProjectedYF0D, + _swigc__p_Functions0D__GetProjectedZF0D, + _swigc__p_Functions0D__GetShapeF0D, + _swigc__p_Functions0D__GetViewMapGradientNormF0D, + _swigc__p_Functions0D__GetXF0D, + _swigc__p_Functions0D__GetYF0D, + _swigc__p_Functions0D__GetZF0D, + _swigc__p_Functions0D__LocalAverageDepthF0D, + _swigc__p_Functions0D__MaterialF0D, + _swigc__p_Functions0D__Normal2DF0D, + _swigc__p_Functions0D__QuantitativeInvisibilityF0D, + _swigc__p_Functions0D__ReadCompleteViewMapPixelF0D, + _swigc__p_Functions0D__ReadMapPixelF0D, + _swigc__p_Functions0D__ReadSteerableViewMapPixelF0D, + _swigc__p_Functions0D__ShapeIdF0D, + _swigc__p_Functions0D__VertexOrientation2DF0D, + _swigc__p_Functions0D__VertexOrientation3DF0D, + _swigc__p_Functions0D__ZDiscontinuityF0D, + _swigc__p_Functions1D__ChainingTimeStampF1D, + _swigc__p_Functions1D__Curvature2DAngleF1D, + _swigc__p_Functions1D__CurveNatureF1D, + _swigc__p_Functions1D__DensityF1D, + _swigc__p_Functions1D__GetCompleteViewMapDensityF1D, + _swigc__p_Functions1D__GetDirectionalViewMapDensityF1D, + _swigc__p_Functions1D__GetOccludeeF1D, + _swigc__p_Functions1D__GetOccludersF1D, + _swigc__p_Functions1D__GetProjectedXF1D, + _swigc__p_Functions1D__GetProjectedYF1D, + _swigc__p_Functions1D__GetProjectedZF1D, + _swigc__p_Functions1D__GetShapeF1D, + _swigc__p_Functions1D__GetSteerableViewMapDensityF1D, + _swigc__p_Functions1D__GetViewMapGradientNormF1D, + _swigc__p_Functions1D__GetXF1D, + _swigc__p_Functions1D__GetYF1D, + _swigc__p_Functions1D__GetZF1D, + _swigc__p_Functions1D__IncrementChainingTimeStampF1D, + _swigc__p_Functions1D__LocalAverageDepthF1D, + _swigc__p_Functions1D__Normal2DF1D, + _swigc__p_Functions1D__Orientation2DF1D, + _swigc__p_Functions1D__Orientation3DF1D, + _swigc__p_Functions1D__QuantitativeInvisibilityF1D, + _swigc__p_Functions1D__TimeStampF1D, + _swigc__p_Functions1D__ZDiscontinuityF1D, + _swigc__p_GrayImage, + _swigc__p_I1DContainer, + _swigc__p_Id, + _swigc__p_IntegrationType, + _swigc__p_Interface0D, + _swigc__p_Interface0DIterator, + _swigc__p_Interface0DIteratorNested, + _swigc__p_Interface1D, + _swigc__p_Material, + _swigc__p_MediumType, + _swigc__p_Module, + _swigc__p_Noise, + _swigc__p_NonTVertex, + _swigc__p_OmissionShader, + _swigc__p_Omitter, + _swigc__p_Operators, + _swigc__p_Point, + _swigc__p_Polygon3r, + _swigc__p_Predicates0D__FalseUP0D, + _swigc__p_Predicates0D__TrueUP0D, + _swigc__p_Predicates1D__ContourUP1D, + _swigc__p_Predicates1D__DensityLowerThanUP1D, + _swigc__p_Predicates1D__EqualToChainingTimeStampUP1D, + _swigc__p_Predicates1D__EqualToTimeStampUP1D, + _swigc__p_Predicates1D__ExternalContourUP1D, + _swigc__p_Predicates1D__FalseBP1D, + _swigc__p_Predicates1D__FalseUP1D, + _swigc__p_Predicates1D__Length2DBP1D, + _swigc__p_Predicates1D__QuantitativeInvisibilityUP1D, + _swigc__p_Predicates1D__SameShapeIdBP1D, + _swigc__p_Predicates1D__ShapeUP1D, + _swigc__p_Predicates1D__TrueBP1D, + _swigc__p_Predicates1D__TrueUP1D, + _swigc__p_Predicates1D__ViewMapGradientNormBP1D, + _swigc__p_RGBImage, + _swigc__p_ReturnedValueType, + _swigc__p_SShape, + _swigc__p_SVertex, + _swigc__p_SVertex__fedges_container__iterator, + _swigc__p_Smoother, + _swigc__p_SmoothingShader, + _swigc__p_SpatialNoiseShader, + _swigc__p_SteerableViewMap, + _swigc__p_Stroke, + _swigc__p_StrokeAttribute, + _swigc__p_StrokeInternal__StrokeVertexIterator, + _swigc__p_StrokeLayer, + _swigc__p_StrokeRenderer, + _swigc__p_StrokeShader, + _swigc__p_StrokeShaders__BSplineShader, + _swigc__p_StrokeShaders__BackboneStretcherShader, + _swigc__p_StrokeShaders__BezierCurveShader, + _swigc__p_StrokeShaders__CalligraphicColorShader, + _swigc__p_StrokeShaders__ColorNoiseShader, + _swigc__p_StrokeShaders__ColorVariationPatternShader, + _swigc__p_StrokeShaders__ConstantColorShader, + _swigc__p_StrokeShaders__ConstantExternThicknessShader, + _swigc__p_StrokeShaders__ConstantThicknessShader, + _swigc__p_StrokeShaders__ConstrainedIncreasingThicknessShader, + _swigc__p_StrokeShaders__ExternalContourStretcherShader, + _swigc__p_StrokeShaders__GuidingLinesShader, + _swigc__p_StrokeShaders__IncreasingColorShader, + _swigc__p_StrokeShaders__IncreasingThicknessShader, + _swigc__p_StrokeShaders__InflateShader, + _swigc__p_StrokeShaders__LengthDependingThicknessShader, + _swigc__p_StrokeShaders__MaterialColorShader, + _swigc__p_StrokeShaders__PolygonalizationShader, + _swigc__p_StrokeShaders__SamplingShader, + _swigc__p_StrokeShaders__StrokeTextureShader, + _swigc__p_StrokeShaders__TextureAssignerShader, + _swigc__p_StrokeShaders__ThicknessNoiseShader, + _swigc__p_StrokeShaders__ThicknessVariationPatternShader, + _swigc__p_StrokeShaders__TipRemoverShader, + _swigc__p_StrokeShaders__fstreamShader, + _swigc__p_StrokeShaders__streamShader, + _swigc__p_StrokeVertex, + _swigc__p_Stroke__vertex_container__iterator, + _swigc__p_Stroke__viewedge_container__const_iterator, + _swigc__p_Stroke__viewedge_container__iterator, + _swigc__p_StrokesContainer, + _swigc__p_StyleModule, + _swigc__p_TVertex, + _swigc__p_UnaryFunction0DTId_t, + _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, + _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, + _swigc__p_UnaryFunction0DTViewShape_p_t, + _swigc__p_UnaryFunction0DTdouble_t, + _swigc__p_UnaryFunction0DTfloat_t, + _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + _swigc__p_UnaryFunction0DTunsigned_int_t, + _swigc__p_UnaryFunction0DTvoid_t, + _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, + _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, + _swigc__p_UnaryFunction1DTdouble_t, + _swigc__p_UnaryFunction1DTfloat_t, + _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + _swigc__p_UnaryFunction1DTunsigned_int_t, + _swigc__p_UnaryFunction1DTvoid_t, + _swigc__p_UnaryPredicate0D, + _swigc__p_UnaryPredicate1D, + _swigc__p_VecMat__HVec3Tdouble_t, + _swigc__p_VecMat__HVec3Tfloat_t, + _swigc__p_VecMat__HVec3Tint_t, + _swigc__p_VecMat__HVec3Tunsigned_int_t, + _swigc__p_VecMat__SquareMatrixTdouble_2_t, + _swigc__p_VecMat__SquareMatrixTdouble_3_t, + _swigc__p_VecMat__SquareMatrixTdouble_4_t, + _swigc__p_VecMat__SquareMatrixTfloat_2_t, + _swigc__p_VecMat__SquareMatrixTfloat_3_t, + _swigc__p_VecMat__SquareMatrixTfloat_4_t, + _swigc__p_VecMat__SquareMatrixTint_2_t, + _swigc__p_VecMat__SquareMatrixTint_3_t, + _swigc__p_VecMat__SquareMatrixTint_4_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t, + _swigc__p_VecMat__Vec2Tdouble_t, + _swigc__p_VecMat__Vec2Tfloat_t, + _swigc__p_VecMat__Vec2Tint_t, + _swigc__p_VecMat__Vec2Tunsigned_int_t, + _swigc__p_VecMat__Vec3Tdouble_t, + _swigc__p_VecMat__Vec3Tfloat_t, + _swigc__p_VecMat__Vec3Tint_t, + _swigc__p_VecMat__Vec3Tunsigned_int_t, + _swigc__p_VecMat__VecTdouble_2_t, + _swigc__p_VecMat__VecTdouble_3_t, + _swigc__p_VecMat__VecTfloat_2_t, + _swigc__p_VecMat__VecTfloat_3_t, + _swigc__p_VecMat__VecTint_2_t, + _swigc__p_VecMat__VecTint_3_t, + _swigc__p_VecMat__VecTunsigned_int_2_t, + _swigc__p_VecMat__VecTunsigned_int_3_t, + _swigc__p_Vertex, + _swigc__p_ViewEdge, + _swigc__p_ViewEdgeInternal__SVertexIterator, + _swigc__p_ViewEdgeInternal__ViewEdgeIterator, + _swigc__p_ViewMap, + _swigc__p_ViewShape, + _swigc__p_ViewVertex, + _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + _swigc__p_ViewVertexInternal__orientedViewEdgeIterator, + _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, + _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, + _swigc__p_allocator_type, + _swigc__p_char, + _swigc__p_const_edge_iterator, + _swigc__p_const_fedge_iterator, + _swigc__p_const_point_iterator, + _swigc__p_const_reference, + _swigc__p_const_vertex_iterator, + _swigc__p_difference_type, + _swigc__p_directedViewEdge, + _swigc__p_double, + _swigc__p_edge_iterator, + _swigc__p_edge_pointers_container, + _swigc__p_edges_container, + _swigc__p_fedge_iterator, + _swigc__p_fedges_container, + _swigc__p_float, + _swigc__p_id_type, + _swigc__p_int, + _swigc__p_ltstr, + _swigc__p_mapsMap, + _swigc__p_occluder_container__const_iterator, + _swigc__p_p_PyObject, + _swigc__p_point_iterator, + _swigc__p_point_type, + _swigc__p_reference, + _swigc__p_setTVecMat__Vec3Tdouble_t_t, + _swigc__p_size_type, + _swigc__p_std__invalid_argument, + _swigc__p_std__pairTViewEdge_p_bool_t, + _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, + _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, + _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, + _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, + _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, + _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, + _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, + _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, + _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, + _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, + _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, + _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, + _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, + _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, + _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, + _swigc__p_std__vectorTint_std__allocatorTint_t_t, + _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, + _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, + _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + _swigc__p_svertices_container, + _swigc__p_swig__PySwigIterator, + _swigc__p_unsigned_int, + _swigc__p_unsigned_short, + _swigc__p_value_type, + _swigc__p_vertex_container, + _swigc__p_vertex_iterator, + _swigc__p_vertex_type, + _swigc__p_viewedge_container, + _swigc__p_viewedges_container, + _swigc__p_viewshapes_container, + _swigc__p_viewvertices_container, + _swigc__p_void, + _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, + _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, + _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, + _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, + _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, + _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; + +#ifdef __cplusplus +} +#endif +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ + /* c-mode */ +#endif +} +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Python-specific SWIG API */ +#define SWIG_newvarlink() SWIG_Python_newvarlink() +#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) +#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { + return PyString_FromString(""); + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", PyString_AsString(str)); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* Number of items in variable part (ob_size) */ + (char *)"swigvarlink", /* Type name (tp_name) */ + sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ + 0, /* Itemsize (tp_itemsize) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (printfunc) swig_varlink_print, /* Print (tp_print) */ + (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ + (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc)swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ +#endif +#if PY_VERSION_HEX >= 0x02030000 + 0, /* tp_del */ +#endif +#ifdef COUNT_ALLOCS + 0,0,0,0 /* tp_alloc -> tp_next */ +#endif + }; + varlink_type = tmp; + varlink_type.ob_type = &PyType_Type; + type_init = 1; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (c && (c = strstr(c, "swig_ptr: "))) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + +#ifdef __cplusplus +} +#endif + +/* -----------------------------------------------------------------------------* + * Partial Init method + * -----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void SWIG_init(void) { + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + + m = Py_InitModule((char *) SWIG_name, SwigMethods); + d = PyModule_GetDict(m); + + SWIG_InitializeModule(0); + SWIG_InstallConstants(d,swig_const_table); + + + SWIG_Python_SetConstant(d, "_Noise_B_",SWIG_From_int(static_cast< int >(0x100))); + PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); + SWIG_addvarlink(SWIG_globals(),(char*)"POINT",POINT_get, POINT_set); + SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",S_VERTEX_get, S_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",VIEW_VERTEX_get, VIEW_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",NON_T_VERTEX_get, NON_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",T_VERTEX_get, T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",CUSP_get, CUSP_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",NO_FEATURE_get, NO_FEATURE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",SILHOUETTE_get, SILHOUETTE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",BORDER_get, BORDER_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",CREASE_get, CREASE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",RIDGE_get, RIDGE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",VALLEY_get, VALLEY_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",SUGGESTIVE_CONTOUR_get, SUGGESTIVE_CONTOUR_set); + SWIG_Python_SetConstant(d, "MEAN",SWIG_From_int(static_cast< int >(MEAN))); + SWIG_Python_SetConstant(d, "MIN",SWIG_From_int(static_cast< int >(MIN))); + SWIG_Python_SetConstant(d, "MAX",SWIG_From_int(static_cast< int >(MAX))); + SWIG_Python_SetConstant(d, "FIRST",SWIG_From_int(static_cast< int >(FIRST))); + SWIG_Python_SetConstant(d, "LAST",SWIG_From_int(static_cast< int >(LAST))); + SWIG_Python_SetConstant(d, "Stroke_DRY_MEDIUM",SWIG_From_int(static_cast< int >(Stroke::DRY_MEDIUM))); + SWIG_Python_SetConstant(d, "Stroke_HUMID_MEDIUM",SWIG_From_int(static_cast< int >(Stroke::HUMID_MEDIUM))); + SWIG_Python_SetConstant(d, "Stroke_OPAQUE_MEDIUM",SWIG_From_int(static_cast< int >(Stroke::OPAQUE_MEDIUM))); + SWIG_Python_SetConstant(d, "Canvas_NB_STEERABLE_VIEWMAP",SWIG_From_int(static_cast< int >(Canvas::NB_STEERABLE_VIEWMAP))); +} + diff --git a/extern/freestyle/src/swig/ModuleWrapper.h b/extern/freestyle/src/swig/ModuleWrapper.h new file mode 100755 index 00000000000..06ca8c90f37 --- /dev/null +++ b/extern/freestyle/src/swig/ModuleWrapper.h @@ -0,0 +1,1045 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.31 + * + * This file is not intended to be easily readable and contains a number of + * coding conventions designed to improve portability and efficiency. Do not make + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#ifndef SWIG_Freestyle_WRAP_H_ +#define SWIG_Freestyle_WRAP_H_ + +#include +#include + + +class SwigDirector_ViewEdgeViewEdgeIterator : public ViewEdgeInternal::ViewEdgeIterator, public Swig::Director { + +public: + SwigDirector_ViewEdgeViewEdgeIterator(PyObject *self, ViewEdge *begin = 0, bool orientation = true); + SwigDirector_ViewEdgeViewEdgeIterator(PyObject *self, ViewEdgeInternal::ViewEdgeIterator const &it); + virtual ~SwigDirector_ViewEdgeViewEdgeIterator(); + virtual std::string getExactTypeName() const; + virtual ViewEdge *operator *(); + virtual ViewEdge *operator ->(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator ++(); + virtual ViewEdgeInternal::ViewEdgeIterator operator ++(int arg0); + virtual void increment(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator --(); + virtual ViewEdgeInternal::ViewEdgeIterator operator --(int arg0); + virtual void decrement(); + virtual bool isBegin() const; + virtual bool isEnd() const; + virtual bool operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual bool operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const; + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class ViewEdgeViewEdgeIterator doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[9]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DVoid(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DVoid(); + virtual std::string getName() const; + virtual void operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DVoid doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DUnsigned(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DUnsigned(); + virtual std::string getName() const; + virtual unsigned int operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DUnsigned doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DFloat(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DFloat(); + virtual std::string getName() const; + virtual float operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DFloat doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DDouble(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DDouble(); + virtual std::string getName() const; + virtual double operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DDouble doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DVec2f(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DVec2f(); + virtual std::string getName() const; + virtual VecMat::Vec2 operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DVec2f doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DVec3f(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DVec3f(); + virtual std::string getName() const; + virtual VecMat::Vec3 operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DVec3f doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction0DId : public UnaryFunction0D, public Swig::Director { + +public: + SwigDirector_UnaryFunction0DId(PyObject *self); + virtual ~SwigDirector_UnaryFunction0DId(); + virtual std::string getName() const; + virtual Id operator ()(Interface0DIterator &iter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction0DId doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DVoid(PyObject *self); + SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DVoid(); + virtual std::string getName() const; + virtual void operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DVoid doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DUnsigned(PyObject *self); + SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DUnsigned(); + virtual std::string getName() const; + virtual unsigned int operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DUnsigned doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DFloat(PyObject *self); + SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DFloat(); + virtual std::string getName() const; + virtual float operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DFloat doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DDouble(PyObject *self); + SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DDouble(); + virtual std::string getName() const; + virtual double operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DDouble doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DVec2f(PyObject *self); + SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DVec2f(); + virtual std::string getName() const; + virtual VecMat::Vec2 operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DVec2f doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D, public Swig::Director { + +public: + SwigDirector_UnaryFunction1DVec3f(PyObject *self); + SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType); + virtual ~SwigDirector_UnaryFunction1DVec3f(); + virtual std::string getName() const; + virtual VecMat::Vec3 operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryFunction1DVec3f doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_ChainingIterator : public ChainingIterator, public Swig::Director { + +public: + SwigDirector_ChainingIterator(PyObject *self, bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge *begin = 0, bool orientation = true); + SwigDirector_ChainingIterator(PyObject *self, ChainingIterator const &brother); + virtual ~SwigDirector_ChainingIterator(); + virtual std::string getExactTypeName() const; + virtual ViewEdge *operator *(); + virtual ViewEdge *operator ->(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator ++(); + virtual ViewEdgeInternal::ViewEdgeIterator operator ++(int arg0); + virtual void increment(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator --(); + virtual ViewEdgeInternal::ViewEdgeIterator operator --(int arg0); + virtual void decrement(); + virtual bool isBegin() const; + virtual bool isEnd() const; + virtual bool operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual bool operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual void init(); + virtual ViewEdge *traverse(AdjacencyIterator const &it); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class ChainingIterator doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[11]; +#endif + +}; + + +class SwigDirector_ChainSilhouetteIterator : public ChainSilhouetteIterator, public Swig::Director { + +public: + SwigDirector_ChainSilhouetteIterator(PyObject *self, bool iRestrictToSelection = true, ViewEdge *begin = NULL, bool orientation = true); + SwigDirector_ChainSilhouetteIterator(PyObject *self, ChainSilhouetteIterator const &brother); + virtual ~SwigDirector_ChainSilhouetteIterator(); + virtual std::string getExactTypeName() const; + virtual ViewEdge *operator *(); + virtual ViewEdge *operator ->(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator ++(); + virtual ViewEdgeInternal::ViewEdgeIterator operator ++(int arg0); + virtual void increment(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator --(); + virtual ViewEdgeInternal::ViewEdgeIterator operator --(int arg0); + virtual void decrement(); + virtual bool isBegin() const; + virtual bool isEnd() const; + virtual bool operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual bool operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual void init(); + virtual ViewEdge *traverse(AdjacencyIterator const &it); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class ChainSilhouetteIterator doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[11]; +#endif + +}; + + +class SwigDirector_ChainPredicateIterator : public ChainPredicateIterator, public Swig::Director { + +public: + SwigDirector_ChainPredicateIterator(PyObject *self, bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge *begin = NULL, bool orientation = true); + SwigDirector_ChainPredicateIterator(PyObject *self, UnaryPredicate1D &upred, BinaryPredicate1D &bpred, bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, ViewEdge *begin = NULL, bool orientation = true); + SwigDirector_ChainPredicateIterator(PyObject *self, ChainPredicateIterator const &brother); + virtual ~SwigDirector_ChainPredicateIterator(); + virtual std::string getExactTypeName() const; + virtual ViewEdge *operator *(); + virtual ViewEdge *operator ->(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator ++(); + virtual ViewEdgeInternal::ViewEdgeIterator operator ++(int arg0); + virtual void increment(); + virtual ViewEdgeInternal::ViewEdgeIterator &operator --(); + virtual ViewEdgeInternal::ViewEdgeIterator operator --(int arg0); + virtual void decrement(); + virtual bool isBegin() const; + virtual bool isEnd() const; + virtual bool operator ==(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual bool operator !=(ViewEdgeInternal::ViewEdgeIterator &it) const; + virtual void init(); + virtual ViewEdge *traverse(AdjacencyIterator const &it); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class ChainPredicateIterator doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[11]; +#endif + +}; + + +class SwigDirector_UnaryPredicate0D : public UnaryPredicate0D, public Swig::Director { + +public: + SwigDirector_UnaryPredicate0D(PyObject *self); + virtual ~SwigDirector_UnaryPredicate0D(); + virtual std::string getName() const; + virtual bool operator ()(Interface0DIterator &it); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryPredicate0D doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_UnaryPredicate1D : public UnaryPredicate1D, public Swig::Director { + +public: + SwigDirector_UnaryPredicate1D(PyObject *self); + virtual ~SwigDirector_UnaryPredicate1D(); + virtual std::string getName() const; + virtual bool operator ()(Interface1D &inter); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class UnaryPredicate1D doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_BinaryPredicate1D : public BinaryPredicate1D, public Swig::Director { + +public: + SwigDirector_BinaryPredicate1D(PyObject *self); + virtual ~SwigDirector_BinaryPredicate1D(); + virtual std::string getName() const; + virtual bool operator ()(Interface1D &inter1, Interface1D &inter2); + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class BinaryPredicate1D doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +class SwigDirector_StrokeShader : public StrokeShader, public Swig::Director { + +public: + SwigDirector_StrokeShader(PyObject *self); + virtual ~SwigDirector_StrokeShader(); + virtual std::string getName() const; + virtual void shade(Stroke &ioStroke) const; + + +/* Internal Director utilities */ +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} + +private: + mutable std::map inner; + + +#if defined(SWIG_PYTHON_DIRECTOR_VTABLE) +/* VTable implementation */ + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::PyObject_var name = PyString_FromString(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == NULL) { + std::string msg = "Method in class StrokeShader doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::PyObject_var vtable[2]; +#endif + +}; + + +#endif diff --git a/extern/freestyle/src/system/BaseIterator.h b/extern/freestyle/src/system/BaseIterator.h new file mode 100755 index 00000000000..45cc19df4fe --- /dev/null +++ b/extern/freestyle/src/system/BaseIterator.h @@ -0,0 +1,90 @@ +// +// Filename : BaseIterator.h +// Author(s) : Stephane Grabli +// Purpose : Classes defining the basic "Iterator" design pattern +// Date of creation : 18/03/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BASEITERATOR_H +# define BASEITERATOR_H + +# include + +// use for iterators defintions +template +class Nonconst_traits; + +template +class Const_traits { +public: + typedef Element value_type; + typedef const Element& reference; + typedef const Element* pointer; + typedef ptrdiff_t difference_type; + typedef Nonconst_traits Non_const_traits; +}; + +template +class Nonconst_traits { +public: + typedef Element value_type; + typedef Element& reference; + typedef Element* pointer; + typedef ptrdiff_t difference_type; + typedef Nonconst_traits Non_const_traits; +}; + +class InputIteratorTag_Traits { +public: + typedef std::input_iterator_tag iterator_category; +}; + +class BidirectionalIteratorTag_Traits { +public: + typedef std::bidirectional_iterator_tag iterator_category; +}; + +template +class IteratorBase +{ +public: + + virtual ~IteratorBase() {} + + virtual bool begin() const = 0; + virtual bool end() const = 0; + + typedef typename IteratorTagTraits::iterator_category iterator_category; + typedef typename Traits::value_type value_type; + typedef typename Traits::difference_type difference_type; + typedef typename Traits::pointer pointer; + typedef typename Traits::reference reference; + +protected: + + IteratorBase() {} +}; + +#endif // BASEITERATOR_H diff --git a/extern/freestyle/src/system/BaseObject.cpp b/extern/freestyle/src/system/BaseObject.cpp new file mode 100755 index 00000000000..21d8a77b268 --- /dev/null +++ b/extern/freestyle/src/system/BaseObject.cpp @@ -0,0 +1 @@ +#include "BaseObject.h" \ No newline at end of file diff --git a/extern/freestyle/src/system/BaseObject.h b/extern/freestyle/src/system/BaseObject.h new file mode 100755 index 00000000000..a8515f98385 --- /dev/null +++ b/extern/freestyle/src/system/BaseObject.h @@ -0,0 +1,73 @@ +// +// Filename : BaseObject.h +// Author(s) : Stephane Grabli +// Purpose : Base Class for most shared objects (Node, Rep). +// Defines the addRef, release system. +// Inspired by COM IUnknown system. +// Date of creation : 06/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef BASEOBJECT_H +# define BASEOBJECT_H + +#include "FreestyleConfig.h" + +class LIB_SYSTEM_EXPORT BaseObject +{ +public: + + inline BaseObject() { + _ref_counter = 0; + } + + virtual ~BaseObject() {} + + /*! At least makes a release on this. + * The BaseObject::destroy method must be + * explicitely called at the end of any + * overloaded destroy + */ + virtual int destroy() { + return release(); + } + + /*! Increments the reference counter */ + inline int addRef() { + return ++_ref_counter; + } + + /*! Decrements the reference counter */ + inline int release() { + if (_ref_counter) + _ref_counter--; + return _ref_counter; + } + +private: + + unsigned _ref_counter; +}; + +#endif // BASEOBJECT_H diff --git a/extern/freestyle/src/system/Cast.h b/extern/freestyle/src/system/Cast.h new file mode 100755 index 00000000000..15af767443e --- /dev/null +++ b/extern/freestyle/src/system/Cast.h @@ -0,0 +1,44 @@ +// +// Filename : Cast.h +// Author(s) : Emmanuel Turquin +// Purpose : Cast function +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CAST_HPP +# define CAST_HPP + +namespace Cast { + + template + U* cast(T* in) { + if (!in) + return NULL; + return dynamic_cast(in); + } + +} // end of namespace Cast + +#endif // CAST_HPP diff --git a/extern/freestyle/src/system/Exception.cpp b/extern/freestyle/src/system/Exception.cpp new file mode 100755 index 00000000000..d1d12d18297 --- /dev/null +++ b/extern/freestyle/src/system/Exception.cpp @@ -0,0 +1,24 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Exception.h" + +Exception::exception_type Exception::_exception = Exception::NO_EXCEPTION; diff --git a/extern/freestyle/src/system/Exception.h b/extern/freestyle/src/system/Exception.h new file mode 100755 index 00000000000..378de6b558f --- /dev/null +++ b/extern/freestyle/src/system/Exception.h @@ -0,0 +1,64 @@ +// +// Filename : Exception.h +// Author(s) : Stephane Grabli +// Purpose : Singleton to manage exceptions +// Date of creation : 10/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef EXCEPTION_H +# define EXCEPTION_H + +# include "FreestyleConfig.h" + +class LIB_SYSTEM_EXPORT Exception +{ +public: + + typedef enum { + NO_EXCEPTION, + UNDEFINED + } exception_type; + + static int getException() { + exception_type e = _exception; + _exception = NO_EXCEPTION; + return e; + } + + static int raiseException(exception_type exception = UNDEFINED) { + _exception = exception; + return _exception; + } + + static void reset() { + _exception = NO_EXCEPTION; + } + +private: + + static exception_type _exception; +}; + +#endif // EXCEPTION_H diff --git a/extern/freestyle/src/system/FreestyleConfig.h b/extern/freestyle/src/system/FreestyleConfig.h new file mode 100755 index 00000000000..45bd00a402e --- /dev/null +++ b/extern/freestyle/src/system/FreestyleConfig.h @@ -0,0 +1,152 @@ +// +// Filename : Config.h +// Author(s) : Emmanuel Turquin +// Purpose : Configuration definitions +// Date of creation : 25/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef CONFIG_H +# define CONFIG_H + +# include + +using namespace std; + +namespace Config { + + // Pi definition +# ifndef M_PI +# define M_PI 3.14159265 +# endif // M_PI + + // Directory separators +# ifdef WIN32 + static const string DIR_SEP("\\"); + static const string PATH_SEP(";"); +# else + static const string DIR_SEP("/"); + static const string PATH_SEP(":"); +# endif // WIN32 + + // DLL import/export macros for Win32 + +# ifdef WIN32 +# ifdef MAKE_LIB_SYSTEM_DLL +# define LIB_SYSTEM_EXPORT __declspec(dllexport) +# else +# define LIB_SYSTEM_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_SYSTEM_DLL + +# ifdef MAKE_LIB_IMAGE_DLL +# define LIB_IMAGE_EXPORT __declspec(dllexport) +# else +# define LIB_IMAGE_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_IMAGE_DLL + +# ifdef MAKE_LIB_GEOMETRY_DLL +# define LIB_GEOMETRY_EXPORT __declspec(dllexport) +# else +# define LIB_GEOMETRY_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_GEOMETRY_DLL + +# ifdef MAKE_LIB_SCENE_GRAPH_DLL +# define LIB_SCENE_GRAPH_EXPORT __declspec(dllexport) +# else +# define LIB_SCENE_GRAPH_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_SCENE_GRAPH_DLL + +# ifdef MAKE_LIB_WINGED_EDGE_DLL +# define LIB_WINGED_EDGE_EXPORT __declspec(dllexport) +# else +# define LIB_WINGED_EDGE_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_WINGED_EDGE_DLL + +# ifdef MAKE_LIB_VIEW_MAP_DLL +# define LIB_VIEW_MAP_EXPORT __declspec(dllexport) +# else +# define LIB_VIEW_MAP_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_VIEW_MAP_DLL + +# ifdef MAKE_LIB_STROKE_DLL +# define LIB_STROKE_EXPORT __declspec(dllexport) +# else +# define LIB_STROKE_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_STROKE_DLL + +# ifdef MAKE_LIB_RENDERING_DLL +# define LIB_RENDERING_EXPORT __declspec(dllexport) +# else +# define LIB_RENDERING_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_RENDERING_DLL + +# ifdef MAKE_LIB_WRAPPER_DLL +# define LIB_WRAPPER_EXPORT __declspec(dllexport) +# else +# define LIB_WRAPPER_EXPORT __declspec(dllimport) +# endif // MAKE_LIB_WRAPPER_DLL + +# else +# ifndef LIB_SYSTEM_EXPORT +# define LIB_SYSTEM_EXPORT +# endif // LIB_SYSTEM_EXPORT + +# ifndef LIB_IMAGE_EXPORT +# define LIB_IMAGE_EXPORT +# endif // LIB_IMAGE_EXPORT + +# ifndef LIB_GEOMETRY_EXPORT +# define LIB_GEOMETRY_EXPORT +# endif // LIB_GEOMETRY_EXPORT + +# ifndef LIB_SCENE_GRAPH_EXPORT +# define LIB_SCENE_GRAPH_EXPORT +# endif // LIB_SCENE_GRAPH_EXPORT + +# ifndef LIB_WINGED_EDGE_EXPORT +# define LIB_WINGED_EDGE_EXPORT +# endif // LIB_WINGED_EDGE_EXPORT + +# ifndef LIB_VIEW_MAP_EXPORT +# define LIB_VIEW_MAP_EXPORT +# endif // LIB_VIEW_MAP_EXPORT + +# ifndef LIB_STROKE_EXPORT +# define LIB_STROKE_EXPORT +# endif // LIB_STROKE_EXPORT + +# ifndef LIB_RENDERING_EXPORT +# define LIB_RENDERING_EXPORT +# endif // LIB_RENDERING_EXPORT + +# ifndef LIB_WRAPPER_EXPORT +# define LIB_WRAPPER_EXPORT +# endif // LIB_WRAPPER_EXPORT + +# endif // WIN32 + +} // end of namespace Config + +#endif // CONFIG_H diff --git a/extern/freestyle/src/system/Id.h b/extern/freestyle/src/system/Id.h new file mode 100755 index 00000000000..1f2206ed337 --- /dev/null +++ b/extern/freestyle/src/system/Id.h @@ -0,0 +1,126 @@ +// +// Filename : Id.h +// Author(s) : Emmanuel Turquin +// Purpose : Identification system +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ID_H +# define ID_H + +/*! Class used to tag any object by an id . + * It is made of two unsigned integers. + */ +class Id +{ +public: + + typedef unsigned id_type; + + /*! Default constructor */ + Id() { + _first = 0; + _second = 0; + } + + /*! Builds an Id from an integer. + * The second number is set to 0. + */ + Id(id_type id) { + _first = id; + _second = 0; + } + + /*! Builds the Id from the two numbers */ + Id(id_type ifirst, id_type isecond) { + _first = ifirst; + _second = isecond; + } + + /*! Copy constructor */ + Id(const Id& iBrother) { + _first = iBrother._first; + _second = iBrother._second; + } + + /*! Operator= */ + Id& operator=(const Id& iBrother) { + _first = iBrother._first; + _second = iBrother._second; + return *this; + } + + /*! Returns the first Id number */ + id_type getFirst() const { + return _first; + } + + /*! Returns the second Id number */ + id_type getSecond() const { + return _second; + } + + /*! Sets the first number constituing the Id */ + void setFirst(id_type first) { + _first = first; + } + + /*! Sets the second number constituing the Id */ + void setSecond(id_type second) { + _second = second; + } + + /*! Operator== */ + bool operator==(const Id& id) const { + return ((_first == id._first) && (_second == id._second)); + } + + /*! Operator!= */ + bool operator!=(const Id& id) const { + return !((*this)==id); + } + + /*! Operator< */ + bool operator<(const Id& id) const { + if (_first < id._first) + return true; + if (_first == id._first && _second < id._second) + return true; + return false; +} + +private: + + id_type _first; + id_type _second; +}; + +// stream operator +inline std::ostream& operator<<(std::ostream& s, const Id& id) { + s << "[" << id.getFirst() << ", " << id.getSecond() << "]"; + return s; +} + +# endif // ID_H diff --git a/extern/freestyle/src/system/Interpreter.h b/extern/freestyle/src/system/Interpreter.h new file mode 100755 index 00000000000..ce603b17238 --- /dev/null +++ b/extern/freestyle/src/system/Interpreter.h @@ -0,0 +1,56 @@ +// +// Filename : Interpreter.h +// Author(s) : Emmanuel Turquin +// Purpose : Base Class of all script interpreters +// Date of creation : 17/04/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef INTERPRETER_H +# define INTERPRETER_H + +# include + +using namespace std; + +class LIB_SYSTEM_EXPORT Interpreter +{ + public: + + Interpreter() { _language = "Unknown"; } + + virtual int interpretCmd(const string& cmd) = 0; + + virtual int interpretFile(const string& filename) = 0; + + virtual string getLanguage() const { return _language; } + + virtual void reset() = 0; + + protected: + + string _language; +}; + +#endif // INTERPRETER_H diff --git a/extern/freestyle/src/system/Precision.h b/extern/freestyle/src/system/Precision.h new file mode 100755 index 00000000000..24327a280df --- /dev/null +++ b/extern/freestyle/src/system/Precision.h @@ -0,0 +1,39 @@ +// +// Filename : Precision.h +// Author(s) : Stephane Grabli +// Purpose : Define the float precision used in the program +// Date of creation : 30/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PRECISION_H +# define PRECISION_H + +typedef double real; + +# ifndef SWIG +static const real M_EPSILON = 0.00000001; +# endif // SWIG + +#endif // PRECISION_H diff --git a/extern/freestyle/src/system/ProgressBar.h b/extern/freestyle/src/system/ProgressBar.h new file mode 100755 index 00000000000..5b61f936c90 --- /dev/null +++ b/extern/freestyle/src/system/ProgressBar.h @@ -0,0 +1,85 @@ +// +// Filename : ProgressBar.h +// Author(s) : Stephane Grabli +// Purpose : Class to encapsulate a progress bar +// Date of creation : 27/08/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef PROGRESSBAR_H +# define PROGRESSBAR_H + +# include + +using namespace std; + +class ProgressBar +{ +public: + + inline ProgressBar() { + _numtotalsteps = 0; + _progress = 0; + } + + virtual ~ProgressBar() {} + + virtual void reset() { + _numtotalsteps = 0; + _progress = 0; + } + + virtual void setTotalSteps(unsigned n) { + _numtotalsteps = n; + } + + virtual void setProgress(unsigned i) { + _progress = i; + } + + virtual void setLabelText(const string& s) { + _label = s; + } + + /*! accessors */ + inline unsigned int getTotalSteps() const { + return _numtotalsteps; + } + + inline unsigned int getProgress() const { + return _progress; + } + + inline string getLabelText() const { + return _label; + } + +protected: + + unsigned _numtotalsteps; + unsigned _progress; + string _label; +}; + +#endif // PROGRESSBAR_H diff --git a/extern/freestyle/src/system/PseudoNoise.cpp b/extern/freestyle/src/system/PseudoNoise.cpp new file mode 100755 index 00000000000..59332229ae2 --- /dev/null +++ b/extern/freestyle/src/system/PseudoNoise.cpp @@ -0,0 +1,108 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "RandGen.h" +#include "PseudoNoise.h" + +static const unsigned NB_VALUE_NOISE = 512; + +real *PseudoNoise::_values; + +PseudoNoise::PseudoNoise () +{ +} + +void +PseudoNoise::init (long seed) +{ + _values = new real[NB_VALUE_NOISE]; + RandGen::srand48(seed); + for (int i=0; i2) return 0; + if (fabs(t) +# include +# include "StringUtils.h" +# include "Interpreter.h" + +class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter +{ + public: + + PythonInterpreter() { + _language = "Python"; + Py_Initialize(); + } + + virtual ~PythonInterpreter() { + Py_Finalize(); + } + + int interpretCmd(const string& cmd) { + initPath(); + char* c_cmd = strdup(cmd.c_str()); + int err = PyRun_SimpleString(c_cmd); + free(c_cmd); + return err; + } + + int interpretFile(const string& filename) { + initPath(); + string cmd("execfile(\"" + filename + "\")"); + char* c_cmd = strdup(cmd.c_str()); + int err = PyRun_SimpleString(c_cmd); + free(c_cmd); + return err; + } + + struct Options + { + static void setPythonPath(const string& path) { + _path = path; + } + + static string getPythonPath() { + return _path; + } + }; + + void reset() { + Py_Finalize(); + Py_Initialize(); + _initialized = false; + } + +private: + + static void initPath() { + if (_initialized) + return; + PyRun_SimpleString("import sys"); + vector pathnames; + StringUtils::getPathName(_path, "", pathnames); + string cmd; + char* c_cmd; + for (vector::const_iterator it = pathnames.begin(); + it != pathnames.end(); + ++it) { + cmd = "sys.path.append(\"" + *it + "\")"; + c_cmd = strdup(cmd.c_str()); + PyRun_SimpleString(c_cmd); + free(c_cmd); + } + // PyRun_SimpleString("from Freestyle import *"); + _initialized = true; + } + + static bool _initialized; + static string _path; +}; + +#endif // PYTHON_INTERPRETER_H diff --git a/extern/freestyle/src/system/RandGen.cpp b/extern/freestyle/src/system/RandGen.cpp new file mode 100755 index 00000000000..a328cb7f583 --- /dev/null +++ b/extern/freestyle/src/system/RandGen.cpp @@ -0,0 +1,86 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "RandGen.h" + +// +// Macro definitions +// +/////////////////////////////////////////////////////////////////////////////// + +#define N 16 +#define MASK ((unsigned)(1 << (N - 1)) + (1 << (N - 1)) - 1) +#define X0 0x330E +#define X1 0xABCD +#define X2 0x1234 +#define A0 0xE66D +#define A1 0xDEEC +#define A2 0x5 +#define C 0xB +#define HI_BIT (1L << (2 * N - 1)) + +#define LOW(x) ((unsigned)(x) & MASK) +#define HIGH(x) LOW((x) >> N) +#define MUL(x, y, z) { long l = (long)(x) * (long)(y); \ + (z)[0] = LOW(l); (z)[1] = HIGH(l); } +#define CARRY(x, y) ((unsigned long)((long)(x) + (long)(y)) > MASK) +#define ADDEQU(x, y, z) (z = CARRY(x, (y)), x = LOW(x + (y))) +#define SET3(x, x0, x1, x2) ((x)[0] = (x0), (x)[1] = (x1), (x)[2] = (x2)) +#define SETLOW(x, y, n) SET3(x, LOW((y)[n]), LOW((y)[(n)+1]), LOW((y)[(n)+2])) +#define SEED(x0, x1, x2) (SET3(x, x0, x1, x2), SET3(a, A0, A1, A2), c = C) +#define REST(v) for (i = 0; i < 3; i++) { xsubi[i] = x[i]; x[i] = temp[i]; } \ + return (v); +#define NEST(TYPE, f, F) TYPE f(register unsigned short *xsubi) { \ + register int i; register TYPE v; unsigned temp[3]; \ + for (i = 0; i < 3; i++) { temp[i] = x[i]; x[i] = LOW(xsubi[i]); } \ + v = F(); REST(v); } + +static unsigned x[3] = { X0, X1, X2 }, a[3] = { A0, A1, A2 }, c = C; + +// +// Methods implementation +// +/////////////////////////////////////////////////////////////////////////////// + +real RandGen::drand48() { + static real two16m = 1.0 / (1L << N); + next(); + return (two16m * (two16m * (two16m * x[0] + x[1]) + x[2])); +} + +void RandGen::srand48(long seedval) { + SEED(X0, LOW(seedval), HIGH(seedval)); +} + +void RandGen::next() { + unsigned p[2], q[2], r[2], carry0, carry1; + + MUL(a[0], x[0], p); + ADDEQU(p[0], c, carry0); + ADDEQU(p[1], carry0, carry1); + MUL(a[0], x[1], q); + ADDEQU(p[1], q[0], carry0); + MUL(a[1], x[0], r); + x[2] = LOW(carry0 + carry1 + CARRY(p[1], r[0]) + q[1] + r[1] + + a[0] * x[2] + a[1] * x[1] + a[2] * x[0]); + x[1] = LOW(p[1] + r[0]); + x[0] = LOW(p[0]); +} diff --git a/extern/freestyle/src/system/RandGen.h b/extern/freestyle/src/system/RandGen.h new file mode 100755 index 00000000000..409d3b79609 --- /dev/null +++ b/extern/freestyle/src/system/RandGen.h @@ -0,0 +1,48 @@ +// +// Filename : RandGen.h +// Author(s) : Fredo Durand +// Purpose : Pseudo-random number generator +// Date of creation : 20/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef RAND_GEN_H +# define RAND_GEN_H + +# include "FreestyleConfig.h" +# include "../system/Precision.h" + +class LIB_SYSTEM_EXPORT RandGen +{ +public: + + static real drand48(); + static void srand48(long value); + +private: + + static void next(); +}; + +#endif // RAND_GEN_H diff --git a/extern/freestyle/src/system/StringUtils.cpp b/extern/freestyle/src/system/StringUtils.cpp new file mode 100755 index 00000000000..2af76feeb37 --- /dev/null +++ b/extern/freestyle/src/system/StringUtils.cpp @@ -0,0 +1,46 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "FreestyleConfig.h" +#include "StringUtils.h" + +namespace StringUtils { + + void getPathName(const string& path, const string& base, vector& pathnames) { + string dir; + unsigned size = path.size(); + pathnames.push_back(base); + for (unsigned pos = 0, sep = path.find(Config::PATH_SEP, pos); + pos < size; + pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) { + if (sep == (unsigned)string::npos) + sep = size; + dir = path.substr(pos, sep - pos); + QFileInfo fi(dir.c_str()); + string res = (const char*)fi.absoluteFilePath().toAscii(); + if (!base.empty()) + res += Config::DIR_SEP + base; + pathnames.push_back(res); + } + } + +} // end of namespace StringUtils diff --git a/extern/freestyle/src/system/StringUtils.h b/extern/freestyle/src/system/StringUtils.h new file mode 100755 index 00000000000..44adfc2b044 --- /dev/null +++ b/extern/freestyle/src/system/StringUtils.h @@ -0,0 +1,51 @@ +// +// Filename : StringUtils.h +// Author(s) : Emmanuel Turquin +// Purpose : String utilities +// Date of creation : 20/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef STRING_UTILS_H +# define STRING_UTILS_H + +# include +# include +# include "FreestyleConfig.h" + +using namespace std; + +namespace StringUtils { + + LIB_SYSTEM_EXPORT + void getPathName(const string& path, const string& base, vector& pathnames); + + // STL related + struct ltstr{ + bool operator()(const char* s1, const char* s2) const{ + return strcmp(s1, s2) < 0; + } +}; + +} // end of namespace StringUtils + +#endif // STRING_UTILS_H diff --git a/extern/freestyle/src/system/TimeStamp.cpp b/extern/freestyle/src/system/TimeStamp.cpp new file mode 100755 index 00000000000..c66e1131611 --- /dev/null +++ b/extern/freestyle/src/system/TimeStamp.cpp @@ -0,0 +1,25 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "TimeStamp.h" + +LIB_SYSTEM_EXPORT +TimeStamp* TimeStamp::_instance = 0; diff --git a/extern/freestyle/src/system/TimeStamp.h b/extern/freestyle/src/system/TimeStamp.h new file mode 100755 index 00000000000..568a7851e30 --- /dev/null +++ b/extern/freestyle/src/system/TimeStamp.h @@ -0,0 +1,71 @@ +// +// Filename : TimeStamp.h +// Author(s) : Stephane Grabli +// Purpose : Class defining a singleton used as timestamp +// Date of creation : 12/12/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef TIMESTAMP_H +# define TIMESTAMP_H + +# include "FreestyleConfig.h" + +class LIB_SYSTEM_EXPORT TimeStamp +{ + public: + + static inline TimeStamp* instance() { + if (_instance == 0) + _instance = new TimeStamp; + return _instance; + } + + inline unsigned getTimeStamp() const { + return _time_stamp; + } + + inline void increment() { + ++_time_stamp; + } + + inline void reset() { + _time_stamp = 1; + } + + protected: + + TimeStamp() { + _time_stamp = 1; + } + + TimeStamp(const TimeStamp&) {} + + private: + + static TimeStamp* _instance; + unsigned _time_stamp; +}; + +#endif // TIMESTAMP_H diff --git a/extern/freestyle/src/system/TimeUtils.h b/extern/freestyle/src/system/TimeUtils.h new file mode 100755 index 00000000000..99dd5b0a669 --- /dev/null +++ b/extern/freestyle/src/system/TimeUtils.h @@ -0,0 +1,58 @@ +// +// Filename : TimeUtils.h +// Author(s) : Stephane Grabli +// Purpose : Class to measure ellapsed time +// Date of creation : 10/04/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef TIMEUTILS_H +# define TIMEUTILS_H + +#include +#include "FreestyleConfig.h" + +class Chronometer +{ + public: + + inline Chronometer() {} + inline ~Chronometer() {} + + inline clock_t start() { + _start = clock(); + return _start; + } + + inline double stop() { + clock_t stop = clock(); + return (double)(stop - _start) / CLOCKS_PER_SEC ; + } + + private: + + clock_t _start; +}; + +#endif // TIMEUTILS_H diff --git a/extern/freestyle/src/system/src.pri b/extern/freestyle/src/system/src.pri new file mode 100755 index 00000000000..e7d69e142b4 --- /dev/null +++ b/extern/freestyle/src/system/src.pri @@ -0,0 +1,30 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +SYSTEM_DIR = ../system + +SOURCES *= $${SYSTEM_DIR}/Exception.cpp \ + $${SYSTEM_DIR}/PythonInterpreter.cpp \ + $${SYSTEM_DIR}/RandGen.cpp \ + $${SYSTEM_DIR}/StringUtils.cpp \ + $${SYSTEM_DIR}/TimeStamp.cpp \ + $${SYSTEM_DIR}/PseudoNoise.cpp \ + $${SYSTEM_DIR}/BaseObject.cpp + +HEADERS *= $${SYSTEM_DIR}/BaseObject.h \ + $${SYSTEM_DIR}/BaseIterator.h \ + $${SYSTEM_DIR}/Cast.h \ + $${SYSTEM_DIR}/FreestyleConfig.h \ + $${SYSTEM_DIR}/Exception.h \ + $${SYSTEM_DIR}/Id.h \ + $${SYSTEM_DIR}/Interpreter.h \ + $${SYSTEM_DIR}/ProgressBar.h \ + $${SYSTEM_DIR}/PythonInterpreter.h \ + $${SYSTEM_DIR}/RandGen.h \ + $${SYSTEM_DIR}/StringUtils.h \ + $${SYSTEM_DIR}/TimeStamp.h \ + $${SYSTEM_DIR}/TimeUtils.h \ + $${SYSTEM_DIR}/PseudoNoise.h \ + $${SYSTEM_DIR}/Precision.h diff --git a/extern/freestyle/src/system/system.pro b/extern/freestyle/src/system/system.pro new file mode 100755 index 00000000000..495cdf47105 --- /dev/null +++ b/extern/freestyle/src/system/system.pro @@ -0,0 +1,73 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +FOO_LIB_VERSION = $${APPVERSION_MAJ}$${APPVERSION_MID} +TEMPLATE = lib +TARGET = $${LIB_SYSTEM} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll python$${PYTHON_VERSION_MAJ}.$${PYTHON_VERSION_MIN} +QT += xml + +exists (../libconfig.pri) { + include (../libconfig.pri) +} +# +# INCLUDE PATH +# +####################################### + + +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_SYSTEM_DLL + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build/ + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +#win32:QMAKE_POST_LINK = "$$QMAKE_MOVE $${DESTDIR}/$${TARGET}$${LIBVERSION}.lib $${DESTDIR}\$${TARGET}$${FOO_LIB_VERSION}.lib" + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} + diff --git a/extern/freestyle/src/view_map/FEdgeXDetector.cpp b/extern/freestyle/src/view_map/FEdgeXDetector.cpp new file mode 100755 index 00000000000..628b3ad77aa --- /dev/null +++ b/extern/freestyle/src/view_map/FEdgeXDetector.cpp @@ -0,0 +1,677 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "FEdgeXDetector.h" +#include "float.h" +#include "../geometry/GeomUtils.h" +#include +#include "../geometry/normal_cycle.h" + +void FEdgeXDetector::processShapes(WingedEdge& we) { + bool progressBarDisplay = false; + Vec3r Min, Max; + vector wshapes = we.getWShapes(); + WXShape * wxs; + + if(_pProgressBar != NULL) { + _pProgressBar->reset(); + _pProgressBar->setLabelText("Detecting feature lines"); + _pProgressBar->setTotalSteps(wshapes.size() * 3); + _pProgressBar->setProgress(0); + progressBarDisplay = true; + } + + for(vector::const_iterator it = wshapes.begin(); + it != wshapes.end(); + it++){ + wxs = dynamic_cast(*it); + wxs->bbox(Min, Max); + _bbox_diagonal = (Max-Min).norm(); + if(_changes){ + vector& wfaces = wxs->GetFaceList(); + for(vector::iterator wf=wfaces.begin(), wfend=wfaces.end(); + wf!=wfend; + ++wf){ + WXFace* wxf = dynamic_cast(*wf); + wxf->Clear(); + } + _computeViewIndependant = true; + } else if (!(wxs)->getComputeViewIndependantFlag()) { + wxs->Reset(); + _computeViewIndependant = false; + } else { + _computeViewIndependant = true; + } + preProcessShape(wxs); + if (progressBarDisplay) + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + processBorderShape(wxs); + processCreaseShape(wxs); + if(_computeRidgesAndValleys) + processRidgesAndValleysShape(wxs); + if(_computeSuggestiveContours) + processSuggestiveContourShape(wxs); + processSilhouetteShape(wxs); + if (progressBarDisplay) + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + + // build smooth edges: + buildSmoothEdges(wxs); + + // Post processing for suggestive contours + if(_computeSuggestiveContours) + postProcessSuggestiveContourShape(wxs); + if (progressBarDisplay) + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + + wxs->setComputeViewIndependantFlag(false); + _computeViewIndependant = false; + _changes = false; + + // reset user data + (*it)->ResetUserData(); + } +} + +// GENERAL STUFF +//////////////// +void FEdgeXDetector::preProcessShape(WXShape* iWShape) { + _meanK1 = 0; + _meanKr = 0; + _minK1 = FLT_MAX; + _maxK1 = -FLT_MAX; + _minKr = FLT_MAX; + _maxKr = -FLT_MAX; + _nPoints = 0; + _meanEdgeSize = iWShape->getMeanEdgeSize(); + + vector& wfaces = iWShape->GetFaceList(); + vector::iterator f,fend; + // view dependant stuff + for(f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f){ + preProcessFace((WXFace*)(*f)); + } + + vector& wvertices = iWShape->GetVertexList(); + for(vector::iterator wv=wvertices.begin(), wvend=wvertices.end(); + wv!=wvend; + ++wv){ + // Compute curvatures + WXVertex * wxv = dynamic_cast(*wv); + computeCurvatures(wxv); + } + _meanK1 /= (real)(_nPoints); + _meanKr /= (real)(_nPoints); +} + +void FEdgeXDetector::preProcessFace(WXFace *iFace){ + Vec3r firstPoint = iFace->GetVertex(0)->GetVertex(); + Vec3r N = iFace->GetNormal(); + + // Compute the dot product between V (=_Viewpoint - firstPoint) and N: + Vec3r V(_Viewpoint - firstPoint); + N.normalize(); + V.normalize(); + iFace->SetDotP(N * V); + + // compute the distance between the face center and the viewpoint: + Vec3r dist_vec(iFace->center() - _Viewpoint); + iFace->SetZ(dist_vec.norm()); +} + +void FEdgeXDetector::computeCurvatures(WXVertex *vertex){ + // CURVATURE LAYER + // store all the curvature datas for each vertex + + real K1, K2, cos2theta, sin2theta; + Vec3r e1, n, v; + // one vertex curvature info : + CurvatureInfo *C; + float radius = _sphereRadius*_meanEdgeSize; + + // view independant stuff + if(_computeViewIndependant){ + C = new CurvatureInfo(); + vertex->setCurvatures(C); + OGF::NormalCycle ncycle ; + ncycle.begin() ; + if(radius > 0) { + OGF::compute_curvature_tensor(vertex, radius, ncycle) ; + } else { + OGF::compute_curvature_tensor_one_ring(vertex, ncycle) ; + } + ncycle.end() ; + C->K1 = ncycle.kmin(); + C->K2 = ncycle.kmax(); + C->e1 = ncycle.Kmax(); //ncycle.kmin() * ncycle.Kmax(); + C->e2 = ncycle.Kmin(); //ncycle.kmax() * ncycle.Kmin() ; + + real absK1 = fabs(C->K1); + _meanK1 += absK1; + if(absK1 > _maxK1) + _maxK1 = absK1; + if(absK1 < _minK1) + _minK1 = absK1; + } + // view dependant + C = vertex->curvatures(); + if(C == 0) + return; + + // compute radial curvature : + n = C->e1 ^ C->e2; + v = _Viewpoint - vertex->GetVertex(); + C->er = v - (v * n) * n; + C->er.normalize(); + e1 = C->e1; + e1.normalize(); + cos2theta = C->er * e1; + cos2theta *= cos2theta; + sin2theta = 1 - cos2theta; + C->Kr = C->K1 * cos2theta + C->K2 * sin2theta; + real absKr = fabs(C->Kr); + _meanKr += absKr; + if(absKr > _maxKr) + _maxKr = absKr; + if(absKr < _minKr) + _minKr = absKr; + + ++_nPoints; +} + +// SILHOUETTE +///////////// +void FEdgeXDetector::processSilhouetteShape(WXShape* iWShape) { + // Make a first pass on every polygons in order + // to compute all their silhouette relative values: + //------------------------------------------------ + vector& wfaces = iWShape->GetFaceList(); + vector::iterator f,fend; + for(f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f) + { + ProcessSilhouetteFace((WXFace*)(*f)); + } + + // Make a pass on the edges to detect + // the silhouette edges that are not smooth + // -------------------- + vector::iterator we, weend; + vector &wedges = iWShape->GetEdgeList(); + for(we=wedges.begin(), weend=wedges.end(); + we!=weend; + ++we) + { + ProcessSilhouetteEdge((WXEdge*)(*we)); + } +} + +void FEdgeXDetector::ProcessSilhouetteFace(WXFace *iFace) +{ + + // SILHOUETTE LAYER + Vec3r normal; + // Compute the dot products between View direction and N at each vertex + // of the face: + Vec3r point; + int closestPointId = 0; + real dist, minDist = FLT_MAX; + int numVertices = iFace->numberOfVertices(); + WXFaceLayer * faceLayer = new WXFaceLayer(iFace, Nature::SILHOUETTE, true); + for(int i=0; iGetVertex(i)->GetVertex(); + normal = iFace->GetVertexNormal(i); + Vec3r V(_Viewpoint - point); + normal.normalize(); + V.normalize(); + real d = normal * V; + faceLayer->PushDotP(d); + // Find the point the closest to the viewpoint + Vec3r dist_vec(point - _Viewpoint); + dist = dist_vec.norm(); + if(dist < minDist) { + minDist = dist; + closestPointId = i; + } + } + // Set the closest point id: + faceLayer->SetClosestPointIndex(closestPointId); + // Add this layer to the face: + iFace->AddSmoothLayer(faceLayer); +} + +void FEdgeXDetector::ProcessSilhouetteEdge(WXEdge *iEdge) +{ + if(iEdge->nature() & Nature::BORDER) + return; + // SILHOUETTE ? + //------------- + WXFace * fA = (WXFace *)iEdge->GetaOEdge()->GetaFace(); + WXFace * fB = (WXFace *)iEdge->GetaOEdge()->GetbFace(); + + if((fA->front())^(fB->front())){ // fA->visible XOR fB->visible (true if one is 0 and the other is 1) + // The only edges we want to set as silhouette edges in this + // way are the ones with 2 different normals for 1 vertex + // for these two faces + //-------------------- + // In reality we only test the normals for 1 of the 2 vertices. + if(fA->GetVertexNormal(iEdge->GetaVertex()) == fB->GetVertexNormal(iEdge->GetaVertex())) + return; + iEdge->AddNature(Nature::SILHOUETTE); + if(fB->front()) + iEdge->SetOrder(1); + else + iEdge->SetOrder(-1); + } +} + + +// BORDER +///////// +void FEdgeXDetector::processBorderShape(WXShape* iWShape) { + + if(!_computeViewIndependant) + return; + // Make a pass on the edges to detect + // the BORDER + // -------------------- + vector::iterator we, weend; + vector &wedges = iWShape->GetEdgeList(); + for(we=wedges.begin(), weend=wedges.end(); + we!=weend; + ++we){ + ProcessBorderEdge((WXEdge*)(*we)); + } +} + +void FEdgeXDetector::ProcessBorderEdge(WXEdge *iEdge) +{ + // first check whether it is a border edge: + // BORDER ? + //--------- + if(iEdge->GetaFace() == 0){ + // it is a border edge + iEdge->AddNature(Nature::BORDER); + } +} + + +// CREASE +///////// +void FEdgeXDetector::processCreaseShape(WXShape* iWShape) { + if(!_computeViewIndependant) + return; + + // Make a pass on the edges to detect + // the CREASE + // -------------------- + vector::iterator we, weend; + vector &wedges = iWShape->GetEdgeList(); + for(we=wedges.begin(), weend=wedges.end(); + we!=weend; + ++we){ + ProcessCreaseEdge((WXEdge*)(*we)); + } +} + +void FEdgeXDetector::ProcessCreaseEdge(WXEdge *iEdge) +{ + // CREASE ? + //--------- + if(iEdge->nature() & Nature::BORDER) + return; + WXFace * fA = (WXFace *)iEdge->GetaOEdge()->GetaFace(); + WXFace * fB = (WXFace *)iEdge->GetaOEdge()->GetbFace(); + + WVertex * aVertex = iEdge->GetaVertex(); + if((fA->GetVertexNormal(aVertex) * fB->GetVertexNormal(aVertex)) <= 0.7) // angle of 140 degrees + iEdge->AddNature(Nature::CREASE); +} + +// RIDGES AND VALLEYS +///////////////////// + +void FEdgeXDetector::processRidgesAndValleysShape(WXShape* iWShape) { + // Don't forget to add the built layer to the face at the end + // of the ProcessFace: + //iFace->AddSmoothLayer(faceLayer); + + if((!_computeViewIndependant)) + return; + + // Here the curvatures must already have been computed + vector& wfaces = iWShape->GetFaceList(); + vector::iterator f, fend; + for(f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f) + { + ProcessRidgeFace((WXFace*)(*f)); + } +} + + +// RIDGES +///////// + +void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace) +{ + WXFaceLayer * flayer = new WXFaceLayer(iFace, Nature::RIDGE|Nature::VALLEY, false); + iFace->AddSmoothLayer(flayer); + + unsigned int numVertices = iFace->numberOfVertices(); + for(unsigned int i=0; iGetVertex(i); + WXVertex * wxv = dynamic_cast(wv); + flayer->PushDotP(wxv->curvatures()->K1); + } + + real threshold = 0; + //real threshold = _maxK1 - (_maxK1-_meanK1)/20.0; + + if(flayer->nPosDotP()!=numVertices){ + if((fabs(flayer->dotP(0)) < threshold) && (fabs(flayer->dotP(1)) < threshold) && (fabs(flayer->dotP(2)) < threshold)){ + flayer->ReplaceDotP(0, 0); + flayer->ReplaceDotP(1, 0); + flayer->ReplaceDotP(2, 0); + } + } +} + +// void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace) +// { + +// // RIDGE LAYER +// // compute the RidgeFunction, that is the derivative of the ppal curvature +// // along e1 at each vertex of the face + +// WVertex *v; +// Vec3r v1v2; +// real t; +// vector SmoothLayers; +// WXFaceLayer *faceLayer; +// Face_Curvature_Info *layer_info; +// real K1_a(0), K1_b(0); +// Vec3r Inter_a, Inter_b; + +// // find the ridge layer of the face +// iFace->retrieveSmoothLayers(Nature::RIDGE, SmoothLayers); +// if(SmoothLayers.size()!=1) +// return; +// faceLayer = SmoothLayers[0]; +// // retrieve the curvature info of this layer +// layer_info = (Face_Curvature_Info *)faceLayer->userdata; + +// int numVertices = iFace->numberOfVertices(); +// for(int i=0; iGetVertex(i); +// // vec_curvature_info[i] contains the curvature info of this vertex +// Vec3r e2 = layer_info->vec_curvature_info[i]->K2*layer_info->vec_curvature_info[i]->e2; +// Vec3r e1 = layer_info->vec_curvature_info[i]->K1*layer_info->vec_curvature_info[i]->e1; +// e2.normalize(); + +// WVertex::face_iterator fit = v->faces_begin(); +// WVertex::face_iterator fitend = v->faces_end(); +// for(; fit!=fitend; ++fit){ +// WXFace * wxf = dynamic_cast(*fit); +// WOEdge * oppositeEdge; +// if(!(wxf->getOppositeEdge(v, oppositeEdge))) +// continue; +// v1v2 = oppositeEdge->GetbVertex()->GetVertex() - oppositeEdge->GetaVertex()->GetVertex(); +// GeomUtils::intersection_test res; +// res = GeomUtils::intersectRayPlane(oppositeEdge->GetaVertex()->GetVertex(), v1v2, +// e2, -(v->GetVertex()*e2), +// t,1.e-06); +// if((res == GeomUtils::DO_INTERSECT) && (t>=0.0) && (t<=1.0)){ +// vector second_ridge_layer; +// wxf->retrieveSmoothLayers(Nature::RIDGE, second_ridge_layer); +// if(second_ridge_layer.size()!=1) +// continue; +// Face_Curvature_Info *second_layer_info = (Face_Curvature_Info*)second_ridge_layer[0]->userdata; + +// unsigned index1 = wxf->GetIndex(oppositeEdge->GetaVertex()); +// unsigned index2 = wxf->GetIndex(oppositeEdge->GetbVertex()); +// real K1_1 = second_layer_info->vec_curvature_info[index1]->K1; +// real K1_2 = second_layer_info->vec_curvature_info[index2]->K1; +// real K1 = (1.0-t)*K1_1 + t*K1_2; +// Vec3r inter((1.0-t)*oppositeEdge->GetaVertex()->GetVertex() + t*oppositeEdge->GetbVertex()->GetVertex()); +// Vec3r vtmp(inter - v->GetVertex()); +// // is it K1_a or K1_b ? +// if(vtmp*e1 > 0){ +// K1_b = K1; +// Inter_b = inter; +// }else{ +// K1_a = K1; +// Inter_a = inter; +// } +// } +// } +// // Once we have K1 along the the ppal direction +// // compute the derivative : K1b - K1a +// // put it in DotP +// //real d = fabs(K1_b)-fabs(K1_a); +// real d = 0; +// real threshold = _meanK1 + (_maxK1-_meanK1)/7.0; +// //real threshold = _meanK1; +// //if((fabs(K1_b) > threshold) || ((fabs(K1_a) > threshold))) +// d = (K1_b)-(K1_a)/(Inter_b-Inter_a).norm(); +// faceLayer->PushDotP(d); +// //faceLayer->PushDotP(layer_info->vec_curvature_info[i]->K1); +// } + +// // Make the values relevant by checking whether all principal +// // directions have the "same" direction: +// Vec3r e0((layer_info->vec_curvature_info[0]->K1*layer_info->vec_curvature_info[0]->e1)); +// e0.normalize(); +// Vec3r e1((layer_info->vec_curvature_info[1]->K1*layer_info->vec_curvature_info[1]->e1)); +// e1.normalize(); +// Vec3r e2((layer_info->vec_curvature_info[2]->K1*layer_info->vec_curvature_info[2]->e1)); +// e2.normalize(); +// if (e0 * e1 < 0) +// // invert dotP[1] +// faceLayer->ReplaceDotP(1, -faceLayer->dotP(1)); +// if (e0 * e2 < 0) +// // invert dotP[2] +// faceLayer->ReplaceDotP(2, -faceLayer->dotP(2)); + +// // remove the weakest values; +// //real minDiff = (_maxK1 - _minK1)/10.0; +// // real minDiff = _meanK1; +// // if((faceLayer->dotP(0) < minDiff) && (faceLayer->dotP(1) < minDiff) && (faceLayer->dotP(2) < minDiff)){ +// // faceLayer->ReplaceDotP(0, 0); +// // faceLayer->ReplaceDotP(1, 0); +// // faceLayer->ReplaceDotP(2, 0); +// // } +// } + +// SUGGESTIVE CONTOURS +////////////////////// + +void FEdgeXDetector::processSuggestiveContourShape(WXShape* iWShape) { + + // Here the curvatures must already have been computed + vector& wfaces = iWShape->GetFaceList(); + vector::iterator f, fend; + for(f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f) + { + ProcessSuggestiveContourFace((WXFace*)(*f)); + } +} + +void FEdgeXDetector::ProcessSuggestiveContourFace(WXFace *iFace) +{ + WXFaceLayer *faceLayer = new WXFaceLayer(iFace, Nature::SUGGESTIVE_CONTOUR, true); + iFace->AddSmoothLayer(faceLayer); + + unsigned int numVertices = iFace->numberOfVertices(); + for(unsigned int i=0; iGetVertex(i); + WXVertex * wxv = dynamic_cast(wv); + faceLayer->PushDotP(wxv->curvatures()->Kr); + } + + // FIXME: find a more clever way to compute the threshold +// real threshold = _meanKr; +// if(faceLayer->nPosDotP()!=numVertices){ +// if((fabs(faceLayer->dotP(0)) < threshold) && (fabs(faceLayer->dotP(1)) < threshold) && (fabs(faceLayer->dotP(2)) < threshold)){ +// faceLayer->ReplaceDotP(0, 0); +// faceLayer->ReplaceDotP(1, 0); +// faceLayer->ReplaceDotP(2, 0); +// } +// } +} + +void FEdgeXDetector::postProcessSuggestiveContourShape(WXShape* iShape) { + vector& wfaces = iShape->GetFaceList(); + vector::iterator f, fend; + for(f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f) + { + postProcessSuggestiveContourFace((WXFace*)(*f)); + } +} + +void FEdgeXDetector::postProcessSuggestiveContourFace(WXFace *iFace) { + + // Compute the derivative of the radial curvature in the radial direction, + // at the two extremities of the smooth edge. + // If the derivative is smaller than a given threshold _kr_derivative_epsilon, + // discard the edge. + + // Find the suggestive contour layer of the face (zero or one edge). + vector sc_layers; + iFace->retrieveSmoothEdgesLayers(Nature::SUGGESTIVE_CONTOUR, sc_layers); + if(sc_layers.empty()) + return; + + WXFaceLayer *sc_layer; + sc_layer = sc_layers[0]; + + // Compute the derivative value at each vertex of the face, and add it in a vector. + vector kr_derivatives; + + unsigned vertices_nb = iFace->numberOfVertices(); + WXVertex *v, *opposite_vertex_a, *opposite_vertex_b; + WXFace *wxf; + WOEdge *opposite_edge; + Vec3r opposite_edge_vec, normal_vec, radial_normal_vec, er_vec, v_vec, inter, inter1, inter2, tmp_vec; + GeomUtils::intersection_test res; + real kr(0), kr1(0), kr2(0), t; + + for (unsigned i = 0; i < vertices_nb; ++i) { + v = (WXVertex*)(iFace->GetVertex(i)); + + // v is a singular vertex, skip it. + if (v->isBoundary()) { + kr_derivatives.push_back(0); + continue; + } + + v_vec = v->GetVertex(); + er_vec = v->curvatures()->er; + + // For each vertex, iterate on its adjacent faces. + for (WVertex::face_iterator fit = v->faces_begin(), fitend = v->faces_end(); + fit != fitend; + ++fit) { + wxf = dynamic_cast(*fit); + if(!(wxf->getOppositeEdge(v, opposite_edge))) + continue; + + opposite_vertex_a = (WXVertex*)opposite_edge->GetaVertex(); + opposite_vertex_b = (WXVertex*)opposite_edge->GetbVertex(); + opposite_edge_vec = opposite_vertex_b->GetVertex() - opposite_vertex_a->GetVertex(); + normal_vec = wxf->GetVertexNormal(v); // FIXME: what about e1 ^ e2 ? + radial_normal_vec = er_vec ^ normal_vec; + + // Test wether the radial plan intersects with the edge at the opposite of v. + res = GeomUtils::intersectRayPlane(opposite_vertex_a->GetVertex(), opposite_edge_vec, + radial_normal_vec, -(v_vec * radial_normal_vec), + t, + 1.e-06); + + // If there is an intersection, compute the value of the derivative ath that point. + if ((res == GeomUtils::DO_INTERSECT) && (t >= 0) && (t <= 1)) { + kr = t * opposite_vertex_a->curvatures()->Kr + (1 - t) * opposite_vertex_b->curvatures()->Kr; + inter = opposite_vertex_a->GetVertex() + t * opposite_edge_vec; + tmp_vec = inter - v->GetVertex(); + // Is it kr1 or kr2? + if (tmp_vec * er_vec > 0) { + kr2 = kr; + inter2 = inter; + } else { + kr1 = kr; + inter1 = inter; + } + } + } + + // Now we have kr1 and kr2 along the radial direction, for one vertex of iFace. + // We have to compute the derivative of kr for that vertex, equal to: + // (kr2 - kr1) / dist(inter1, inter2). + // Then we add it to the vector of derivatives. + v->curvatures()->dKr = (kr2 - kr1) / (inter2 - inter1).norm(); + kr_derivatives.push_back(v->curvatures()->dKr); + } + + // At that point, we have the derivatives for each vertex of iFace. + // All we have to do now is to use linear interpolation to compute the values at + // the extremities of the smooth edge. + WXSmoothEdge *sc_edge = sc_layer->getSmoothEdge(); + WOEdge *sc_oedge = sc_edge->woea(); + t = sc_edge->ta(); + if (t * kr_derivatives[iFace->GetIndex(sc_oedge->GetaVertex())] + + (1 - t) * kr_derivatives[iFace->GetIndex(sc_oedge->GetbVertex())] < _kr_derivative_epsilon) { + sc_layer->removeSmoothEdge(); + return; + } + sc_oedge = sc_edge->woeb(); + t = sc_edge->tb(); + if (t * kr_derivatives[iFace->GetIndex(sc_oedge->GetaVertex())] + + (1 - t) * kr_derivatives[iFace->GetIndex(sc_oedge->GetbVertex())] < _kr_derivative_epsilon) + sc_layer->removeSmoothEdge(); +} + + +// Build Smooth edges +///////////////////// +void FEdgeXDetector::buildSmoothEdges(WXShape* iShape){ + // Make a last pass to build smooth edges from the previous stored values: + //-------------------------------------------------------------------------- + vector& wfaces = iShape->GetFaceList(); + for(vector::iterator f=wfaces.begin(), fend=wfaces.end(); + f!=fend; + ++f) + { + vector& faceLayers = ((WXFace*)(*f))->getSmoothLayers(); + for(vector::iterator wxfl = faceLayers.begin(), wxflend=faceLayers.end(); + wxfl!=wxflend; + ++wxfl){ + (*wxfl)->BuildSmoothEdge(); + } + } +} diff --git a/extern/freestyle/src/view_map/FEdgeXDetector.h b/extern/freestyle/src/view_map/FEdgeXDetector.h new file mode 100755 index 00000000000..38d0f34e21f --- /dev/null +++ b/extern/freestyle/src/view_map/FEdgeXDetector.h @@ -0,0 +1,150 @@ +// +// Filename : FEdgeXDetector.h +// Author(s) : Stephane Grabli +// Purpose : Detects/flags/builds extended features edges on the +// WXEdge structure +// Date of creation : 26/10/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef FEDGEXDETECTOR_H +# define FEDGEXDETECTOR_H + +# include +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" +# include "../winged_edge/WXEdge.h" +# include "../winged_edge/Curvature.h" +# include "../system/ProgressBar.h" + +using namespace Geometry; + +/*! This class takes as input a WXEdge structure and fills it + */ + +class LIB_VIEW_MAP_EXPORT FEdgeXDetector +{ +public: + + FEdgeXDetector() { + _pProgressBar = 0; + _computeViewIndependant = true; + _bbox_diagonal = 1.0; + _meanEdgeSize = 0; + _computeRidgesAndValleys = true; + _computeSuggestiveContours = true; + _sphereRadius = 1.0; + _changes = false; + _kr_derivative_epsilon = 0.0; + } + virtual ~FEdgeXDetector() {} + + /*! Process shapes from a WingedEdge containing a list of WShapes */ + virtual void processShapes(WingedEdge&); + + // GENERAL STUFF + virtual void preProcessShape(WXShape* iShape); + virtual void preProcessFace(WXFace* iFace); + virtual void computeCurvatures(WXVertex *iVertex); + + // SILHOUETTE + virtual void processSilhouetteShape(WXShape* iShape); + virtual void ProcessSilhouetteFace(WXFace *iFace); + virtual void ProcessSilhouetteEdge(WXEdge *iEdge); + + // CREASE + virtual void processCreaseShape(WXShape* iShape); + virtual void ProcessCreaseEdge(WXEdge *iEdge); + + // BORDER + virtual void processBorderShape(WXShape* iShape); + virtual void ProcessBorderEdge(WXEdge *iEdge); + + // RIDGES AND VALLEYS + virtual void processRidgesAndValleysShape(WXShape* iShape); + virtual void ProcessRidgeFace(WXFace *iFace); + + // SUGGESTIVE CONTOURS + virtual void processSuggestiveContourShape(WXShape* iShape); + virtual void ProcessSuggestiveContourFace(WXFace *iFace); + virtual void postProcessSuggestiveContourShape(WXShape* iShape); + virtual void postProcessSuggestiveContourFace(WXFace *iFace); + /*! Sets the minimal derivative of the radial curvature for suggestive contours + * \param dkr + * The minimal derivative of the radial curvature + */ + inline void setSuggestiveContourKrDerivativeEpsilon(real dkr) { + if (dkr != _kr_derivative_epsilon){ + _kr_derivative_epsilon = dkr; + _changes = true; + } + } + + // EVERYBODY + virtual void buildSmoothEdges(WXShape* iShape); + + /*! Sets the current viewpoint */ + inline void SetViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} + inline void enableRidgesAndValleysFlag(bool b) {_computeRidgesAndValleys = b;} + inline void enableSuggestiveContours(bool b) {_computeSuggestiveContours = b;} + /*! Sets the radius of the geodesic sphere around each vertex (for the curvature computation) + * \param r + * The radius of the sphere expressed as a ratio of the mean edge size + */ + inline void setSphereRadius(real r) { + if(r!=_sphereRadius){ + _sphereRadius = r; + _changes=true; + } + } + + inline void SetProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} + +protected: + + Vec3r _Viewpoint; + real _bbox_diagonal; // diagonal of the current processed shape bbox + //tmp values + bool _computeViewIndependant; + real _meanK1; + real _meanKr; + real _minK1; + real _minKr; + real _maxK1; + real _maxKr; + unsigned _nPoints; + real _meanEdgeSize; + + bool _computeRidgesAndValleys; + bool _computeSuggestiveContours; + real _sphereRadius; // expressed as a ratio of the mean edge size + bool _changes; + + real _kr_derivative_epsilon; + + ProgressBar *_pProgressBar; +}; + +#endif // FEDGEDXETECTOR_H diff --git a/extern/freestyle/src/view_map/Functions0D.cpp b/extern/freestyle/src/view_map/Functions0D.cpp new file mode 100755 index 00000000000..c868510624c --- /dev/null +++ b/extern/freestyle/src/view_map/Functions0D.cpp @@ -0,0 +1,356 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "Functions0D.h" +# include "ViewMap.h" + +using namespace std; + +namespace Functions0D { + + // Internal function + FEdge* getFEdge(Interface0D& it1, Interface0D& it2){ + return it1.getFEdge(it2); + } + + void getFEdges(Interface0DIterator& it, + FEdge*& fe1, + FEdge*& fe2) { + // count number of vertices + Interface0DIterator prev = it, next = it; + ++next; + int count = 1; + while((!prev.isBegin()) && (count < 3)) + { + --prev; + ++count; + } + while((!next.isEnd()) && (count < 3)) + { + ++next; + ++count; + } + if(count < 3) + { + // if we only have 2 vertices + FEdge * fe = 0; + Interface0DIterator tmp = it; + if(it.isBegin()) + { + ++tmp; + fe = it->getFEdge(*tmp); + } + else + { + --tmp; + fe = it->getFEdge(*tmp); + } + fe1 = fe; + fe2 = 0; + } + else + { + // we have more than 2 vertices + bool begin=false,last=false; + Interface0DIterator previous = it; + if(!previous.isBegin()) + --previous; + else + begin=true; + Interface0DIterator next = it; + ++next; + if(next.isEnd()) + last = true; + if(begin) + { + fe1 = it->getFEdge(*next); + fe2 = 0; + } + else if(last) + { + fe1 = previous->getFEdge(*it); + fe2 = 0; + } + else + { + fe1 = previous->getFEdge(*it); + fe2 = it->getFEdge(*next); + } + } + } + + void getViewEdges(Interface0DIterator &it, + ViewEdge *&ve1, + ViewEdge *&ve2) + { + FEdge * fe1, *fe2; + getFEdges(it, fe1, fe2); + ve1 = fe1->viewedge(); + if(fe2 != 0) + { + ve2 = fe2->viewedge(); + if(ve2 == ve1) + ve2 = 0; + } + else + ve2 = 0; + } + + ViewShape* getShapeF0D(Interface0DIterator& it) + { + ViewEdge *ve1, *ve2; + getViewEdges(it, ve1, ve2); + return ve1->viewShape(); + } + + void getOccludersF0D(Interface0DIterator& it, set& oOccluders){ + ViewEdge * ve1, *ve2; + getViewEdges(it, ve1, ve2); + occluder_container::const_iterator oit = ve1->occluders_begin(); + occluder_container::const_iterator oitend = ve1->occluders_end(); + + for(;oit!=oitend; ++oit) + oOccluders.insert((*oit)); + + if(ve2!=0){ + oit = ve2->occluders_begin(); + oitend = ve2->occluders_end(); + for(;oit!=oitend; ++oit) + oOccluders.insert((*oit)); + } + } + + ViewShape * getOccludeeF0D(Interface0DIterator& it){ + ViewEdge * ve1, *ve2; + getViewEdges(it, ve1, ve2); + ViewShape *aShape = ve1->aShape(); + return aShape; + } + + // + Vec2f VertexOrientation2DF0D::operator()(Interface0DIterator& iter) { + Vec2f A,C; + Vec2f B(iter->getProjectedX(), iter->getProjectedY()); + if(iter.isBegin()) + A = Vec2f(iter->getProjectedX(), iter->getProjectedY()); + else + { + Interface0DIterator previous = iter; + --previous ; + A = Vec2f(previous->getProjectedX(), previous->getProjectedY()); + } + Interface0DIterator next = iter; + ++next ; + if(next.isEnd()) + C = Vec2f(iter->getProjectedX(), iter->getProjectedY()); + else + C = Vec2f(next->getProjectedX(), next->getProjectedY()); + + Vec2f AB(B-A); + if(AB.norm() != 0) + AB.normalize(); + Vec2f BC(C-B); + if(BC.norm() != 0) + BC.normalize(); + Vec2f res (AB + BC); + if(res.norm() != 0) + res.normalize(); + return res; + } + + Vec3f VertexOrientation3DF0D::operator()(Interface0DIterator& iter) { + Vec3r A,C; + Vec3r B(iter->getX(), iter->getY(), iter->getZ()); + if(iter.isBegin()) + A = Vec3r(iter->getX(), iter->getY(), iter->getZ()); + else + { + Interface0DIterator previous = iter; + --previous ; + A = Vec3r(previous->getX(), previous->getY(), previous->getZ()); + } + Interface0DIterator next = iter; + ++next ; + if(next.isEnd()) + C = Vec3r(iter->getX(), iter->getY(), iter->getZ()); + else + C = Vec3r(next->getX(), next->getY(), next->getZ()); + + Vec3r AB(B-A); + if(AB.norm() != 0) + AB.normalize(); + Vec3r BC(C-B); + if(BC.norm() != 0) + BC.normalize(); + Vec3f res (AB + BC); + if(res.norm() != 0) + res.normalize(); + return res; + } + + real Curvature2DAngleF0D::operator()(Interface0DIterator& iter) { + Interface0DIterator tmp1 = iter, tmp2 = iter; + ++tmp2; + unsigned count = 1; + while((!tmp1.isBegin()) && (count < 3)) + { + --tmp1; + ++count; + } + while((!tmp2.isEnd()) && (count < 3)) + { + ++tmp2; + ++count; + } + if(count < 3) + return 0; // if we only have 2 vertices + + Interface0DIterator v = iter; + if(iter.isBegin()) + ++v; + Interface0DIterator next=v; + ++next; + if(next.isEnd()) + { + next = v; + --v; + } + Interface0DIterator prev=v; + --prev; + + Vec2r A(prev->getProjectedX(), prev->getProjectedY()); + Vec2r B(v->getProjectedX(), v->getProjectedY()); + Vec2r C(next->getProjectedX(), next->getProjectedY()); + Vec2r AB(B-A); + Vec2r BC(C-B); + Vec2r N1(-AB[1], AB[0]); + if(N1.norm() != 0) + N1.normalize(); + Vec2r N2(-BC[1], BC[0]); + if(N2.norm() != 0) + N2.normalize(); + if((N1.norm() == 0) && (N2.norm() == 0)) + { + Exception::raiseException(); + return 0; + } + double cosin = N1*N2; + if(cosin > 1) + cosin = 1; + if(cosin < -1) + cosin = -1; + return acos(cosin); + } + + real ZDiscontinuityF0D::operator()(Interface0DIterator& iter) { + FEdge *fe1, *fe2; + getFEdges(iter, fe1, fe2); + real result ; + result = fe1->z_discontinuity(); + if(fe2!=0){ + result += fe2->z_discontinuity(); + result /= 2.f; + } + return result; + } + + Vec2f Normal2DF0D::operator()(Interface0DIterator& iter) { + FEdge *fe1, *fe2; + getFEdges(iter,fe1,fe2); + Vec3f e1(fe1->orientation2d()); + Vec2f n1(e1[1], -e1[0]); + Vec2f n(n1); + if(fe2 != 0) + { + Vec3f e2(fe2->orientation2d()); + Vec2f n2(e2[1], -e2[0]); + n += n2; + } + n.normalize(); + return n; + } + + Material MaterialF0D::operator()(Interface0DIterator& iter) { + FEdge *fe1, *fe2; + getFEdges(iter,fe1,fe2); + + if(fe1 == 0) + getFEdges(iter, fe1, fe2); + Material mat; + if(fe1->isSmooth()) + mat = ((FEdgeSmooth*)fe1)->material(); + else + mat = ((FEdgeSharp*)fe1)->bMaterial(); + // const SShape * sshape = getShapeF0D(iter); + // return sshape->material(); + return mat; + } + + Id ShapeIdF0D::operator()(Interface0DIterator& iter) { + ViewShape * vshape = getShapeF0D(iter); + return vshape->getId(); + } + + unsigned int QuantitativeInvisibilityF0D::operator()(Interface0DIterator& iter) { + ViewEdge * ve1, *ve2; + getViewEdges(iter,ve1,ve2); + unsigned int qi1, qi2; + qi1 = ve1->qi(); + if(ve2 != 0){ + qi2 = ve2->qi(); + if(qi2!=qi1) + cout << "QuantitativeInvisibilityF0D: ambiguous evaluation for point " << iter->getId() << endl; + } + return qi1; + } + + Nature::EdgeNature CurveNatureF0D::operator()(Interface0DIterator& iter) { + Nature::EdgeNature nat = 0; + ViewEdge * ve1, *ve2; + getViewEdges(iter, ve1, ve2); + nat |= ve1->getNature(); + if(ve2!=0) + nat |= ve2->getNature(); + return nat; + } + + vector GetOccludersF0D::operator()(Interface0DIterator& iter) { + set occluders; + getOccludersF0D(iter,occluders); + vector vsOccluders; + // vsOccluders.insert(vsOccluders.begin(), occluders.begin(), occluders.end()); + for(set::iterator it=occluders.begin(), itend=occluders.end(); + it!=itend; + ++it){ + vsOccluders.push_back((*it)); + } + return vsOccluders; + } + + ViewShape* GetShapeF0D::operator()(Interface0DIterator& iter) { + return getShapeF0D(iter); + } + + ViewShape* GetOccludeeF0D::operator()(Interface0DIterator& iter) { + return getOccludeeF0D(iter); + } + +} // end of namespace Functions0D diff --git a/extern/freestyle/src/view_map/Functions0D.h b/extern/freestyle/src/view_map/Functions0D.h new file mode 100755 index 00000000000..3160546da2f --- /dev/null +++ b/extern/freestyle/src/view_map/Functions0D.h @@ -0,0 +1,487 @@ +// +// Filename : Functions0D.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Functions taking 0D input +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef FUNCTIONS0D_H +# define FUNCTIONS0D_H + +# include "../system/Precision.h" +# include "Interface0D.h" +# include "../geometry/Geom.h" +# include "../system/Exception.h" +# include "../scene_graph/Material.h" +# include +# include +class FEdge; +class ViewEdge; +class SShape; + +using namespace Geometry; + +// +// UnaryFunction0D (base class for functions in 0D) +// +/////////////////////////////////////////////////////////// + +template +/*! Base class for Unary Functions (functors) working + * on Interface0DIterator. + * A unary function will be used by calling + * its operator() on an Interface0DIterator. + * \attention In the scripting language, there exists + * several prototypes depending on the returned value type. + * For example, you would inherit from a UnaryFunction0DDouble + * if you wish to define a function that returns a double. + * The different existing prototypes are: + * - UnaryFunction0DVoid + * - UnaryFunction0DUnsigned + * - UnaryFunction0DReal + * - UnaryFunction0DFloat + * - UnaryFunction0DDouble + * - UnaryFunction0DVec2f + * - UnaryFunction0DVec3f + */ +class /*LIB_VIEW_MAP_EXPORT*/ UnaryFunction0D +{ +public: + + /*! The type of the value + * returned by the functor. + */ + typedef T ReturnedValueType; + /*! Default constructor. */ + UnaryFunction0D() {} + /*! Destructor; */ + virtual ~UnaryFunction0D() {} + /*! Returns the string "UnaryFunction0D" */ + virtual string getName() const { + return "UnaryFunction0D"; + } + /*! The operator (). + * \param iter + * An Interface0DIterator pointing onto + * the point at which we wish to evaluate + * the function. + * \return the result of the function of type T. + */ + virtual T operator()(Interface0DIterator& iter) { + cerr << "Warning: operator() not implemented" << endl; + return T(); + } +}; + +# ifdef SWIG +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; +%feature("director") UnaryFunction0D; + +%template(UnaryFunction0DVoid) UnaryFunction0D; +%template(UnaryFunction0DUnsigned) UnaryFunction0D; +%template(UnaryFunction0DFloat) UnaryFunction0D; +%template(UnaryFunction0DDouble) UnaryFunction0D; +%template(UnaryFunction0DVec2f) UnaryFunction0D; +%template(UnaryFunction0DVec3f) UnaryFunction0D; +%template(UnaryFunction0DId) UnaryFunction0D; +%template(UnaryFunction0DViewShape) UnaryFunction0D; +%template(UnaryFunction0DVectorViewShape) UnaryFunction0D >; +# endif // SWIG + + +// +// Functions definitions +// +/////////////////////////////////////////////////////////// +class ViewShape; +namespace Functions0D { + + // GetXF0D + /*! Returns the X 3D coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetXF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetXF0D"*/ + string getName() const { + return "GetXF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getX(); + } + }; + + // GetYF0D + /*! Returns the Y 3D coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetYF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetYF0D"*/ + string getName() const { + return "GetYF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getY(); + } + }; + + // GetZF0D + /*! Returns the Z 3D coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetZF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetZF0D"*/ + string getName() const { + return "GetZF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getZ(); + } + }; + + // GetProjectedXF0D + /*! Returns the X 3D projected coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedXF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetProjectedXF0D"*/ + string getName() const { + return "GetProjectedXF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getProjectedX(); + } + }; + + // GetProjectedYF0D + /*! Returns the Y projected 3D coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedYF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetProjectedYF0D"*/ + string getName() const { + return "GetProjectedYF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getProjectedY(); + } + }; + + // GetProjectedZF0D + /*! Returns the Z projected 3D coordinate of an Interface0D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedZF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetProjectedZF0D"*/ + string getName() const { + return "GetProjectedZF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter) { + return iter->getProjectedZ(); + } + }; + + // GetCurvilinearAbscissaF0D + /*! Returns the curvilinear abscissa of an Interface0D in the context of its 1D element. */ + class LIB_VIEW_MAP_EXPORT GetCurvilinearAbscissaF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetCurvilinearAbscissaF0D"*/ + string getName() const { + return "GetCurvilinearAbscissaF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter) { + return iter.t(); + } + }; + + // GetParameterF0D + /*! Returns the parameter of an Interface0D in the context of its 1D element. */ + class LIB_VIEW_MAP_EXPORT GetParameterF0D : public UnaryFunction0D + { + public: + /*! Returns the string "GetCurvilinearAbscissaF0D"*/ + string getName() const { + return "GetParameterF0D"; + } + /*! the () operator.*/ + float operator()(Interface0DIterator& iter) { + return iter.u(); + } + }; + + // VertexOrientation2DF0D + /*! Returns a Vec2r giving the 2D oriented tangent to the 1D element + * to which the Interface0DIterator& belongs to and + * evaluated at the Interface0D pointed by this Interface0DIterator&. + */ + class LIB_VIEW_MAP_EXPORT VertexOrientation2DF0D : public UnaryFunction0D + { + public: + /*! Returns the string "VertexOrientation2DF0D"*/ + string getName() const { + return "VertexOrientation2DF0D"; + } + /*! the () operator.*/ + Vec2f operator()(Interface0DIterator& iter); + }; + + // VertexOrientation3DF0D + /*! Returns a Vec3r giving the 3D oriented tangent to the 1D element + * to which the Interface0DIterator& belongs to and + * evaluated at the Interface0D pointed by this Interface0DIterator&. + */ + class LIB_VIEW_MAP_EXPORT VertexOrientation3DF0D : public UnaryFunction0D + { + public: + /*! Returns the string "VertexOrientation3DF0D"*/ + string getName() const { + return "VertexOrientation3DF0D"; + } + /*! the () operator.*/ + Vec3f operator()(Interface0DIterator& iter); + }; + + // Curvature2DAngleF0D + /*! Returns a real giving the 2D curvature (as an angle) of the 1D element + * to which the Interface0DIterator& belongs to and + * evaluated at the Interface0D pointed by this Interface0DIterator&. + */ + class LIB_VIEW_MAP_EXPORT Curvature2DAngleF0D : public UnaryFunction0D + { + public: + /*! Returns the string "Curvature2DAngleF0D"*/ + string getName() const { + return "Curvature2DAngleF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter); + }; + + // ZDiscontinuity + /*! Returns a real giving the distance between + * and Interface0D and the shape that lies behind (occludee). + * This distance is evaluated in the camera space and normalized + * between 0 and 1. Therefore, if no oject is occluded by the + * shape to which the Interface0D belongs to, 1 is returned. + */ + class LIB_VIEW_MAP_EXPORT ZDiscontinuityF0D : public UnaryFunction0D + { + public: + /*! Returns the string "ZDiscontinuityF0D"*/ + string getName() const { + return "ZDiscontinuityF0D"; + } + /*! the () operator.*/ + real operator()(Interface0DIterator& iter); + }; + + // Normal2DF0D + /*! Returns a Vec2f giving the normalized 2D normal to the 1D element + * to which the Interface0DIterator& belongs to and + * evaluated at the Interface0D pointed by this Interface0DIterator&. + */ + class LIB_VIEW_MAP_EXPORT Normal2DF0D : public UnaryFunction0D + { + public: + /*! Returns the string "Normal2DF0D"*/ + string getName() const { + return "Normal2DF0D"; + } + /*! the () operator.*/ + Vec2f operator()(Interface0DIterator& iter); + }; + + // MaterialF0D + /*! Returns the material of the object evaluated at the Interface0D. + * This evaluation can be ambiguous (in the case of a TVertex for example. + * This functor tries to remove this ambiguity using the context + * offered by the 1D element to which the Interface0DIterator& belongs + * to and by arbitrary chosing the material of the face + * that lies on its left when following the 1D element if there + * are two different materials on each side of the point. + * However, there still can be problematic cases, and the user willing + * to deal with this cases in a specific way should implement + * its own getMaterial functor. + */ + class LIB_VIEW_MAP_EXPORT MaterialF0D : public UnaryFunction0D + { + public: + /*! Returns the string "MaterialF0D"*/ + string getName() const { + return "MaterialF0D"; + } + /*! the () operator.*/ + Material operator()(Interface0DIterator& iter); + }; + + // ShapeIdF0D + /*! Returns the Id of the Shape the Interface0D belongs to. + * This evaluation can be ambiguous (in the case of a TVertex for example). + * This functor tries to remove this ambiguity using the context + * offered by the 1D element to which the Interface0DIterator& belongs + * to. + * However, there still can be problematic cases, and the user willing + * to deal with this cases in a specific way should implement + * its own getShapeIdF0D functor. + */ + class LIB_VIEW_MAP_EXPORT ShapeIdF0D : public UnaryFunction0D + { + public: + /*! Returns the string "ShapeIdF0D"*/ + string getName() const { + return "ShapeIdF0D"; + } + /*! the () operator.*/ + Id operator()(Interface0DIterator& iter); + }; + + // QiF0D + /*! Returns the quantitative invisibility of this Interface0D. + * This evaluation can be ambiguous (in the case of a TVertex for example). + * This functor tries to remove this ambiguity using the context + * offered by the 1D element to which the Interface0DIterator& belongs + * to. + * However, there still can be problematic cases, and the user willing + * to deal with this cases in a specific way should implement + * its own getQIF0D functor. + */ + class LIB_VIEW_MAP_EXPORT QuantitativeInvisibilityF0D : public UnaryFunction0D + { + public: + /*! Returns the string "QuantitativeInvisibilityF0D"*/ + string getName() const { + return "QuantitativeInvisibilityF0D"; + } + /*! the () operator.*/ + unsigned int operator()(Interface0DIterator& iter); + }; + + // CurveNatureF0D + /*! Returns the Nature::EdgeNature of the 1D element the + * Interface0DIterator& belongs to. + */ + class LIB_VIEW_MAP_EXPORT CurveNatureF0D : public UnaryFunction0D + { + public: + /*! Returns the string "QuantitativeInvisibilityF0D"*/ + string getName() const { + return "CurveNatureF0D"; + } + /*! the () operator.*/ + Nature::EdgeNature operator()(Interface0DIterator& iter); + }; + + // GetShapeF0D + /*! Returns the ViewShape* + * containing the Interface0D + */ + class LIB_VIEW_MAP_EXPORT GetShapeF0D : public UnaryFunction0D< ViewShape*> + { + public: + /*! Returns the string "GetShapeF0D"*/ + string getName() const { + return "GetShapeF0D"; + } + /*! the () operator.*/ + ViewShape* operator()(Interface0DIterator& iter); + }; + + // GetOccludersF0D + /*! Returns a vector containing the ViewShape* + * occluding the Interface0D + */ + class LIB_VIEW_MAP_EXPORT GetOccludersF0D : public UnaryFunction0D< std::vector > + { + public: + /*! Returns the string "GetOccludersF0D"*/ + string getName() const { + return "GetOccludersF0D"; + } + /*! the () operator.*/ + std::vector operator()(Interface0DIterator& iter); + }; + + // GetOccludeeF0D + /*! Returns the ViewShape* + * "occluded" by the Interface0D + */ + class LIB_VIEW_MAP_EXPORT GetOccludeeF0D: public UnaryFunction0D< ViewShape*> + { + public: + /*! Returns the string "GetOccludeeF0D"*/ + string getName() const { + return "GetOccludeeF0D"; + } + /*! the () operator.*/ + ViewShape* operator()(Interface0DIterator& iter); + }; + + + + /////////////////////////// Internal //////////////////////////// + + // getFEdge + LIB_VIEW_MAP_EXPORT + FEdge* getFEdge(Interface0D& it1, Interface0D& it2); + + // getFEdges + LIB_VIEW_MAP_EXPORT + void getFEdges(Interface0DIterator& it, + FEdge*& fe1, + FEdge*& fe2); + + // getViewEdges + LIB_VIEW_MAP_EXPORT + void getViewEdges(Interface0DIterator& it, + ViewEdge *&ve1, + ViewEdge *&ve2); + + // getShapeF0D + LIB_VIEW_MAP_EXPORT + ViewShape* getShapeF0D(Interface0DIterator& it); + + // getOccludersF0D + LIB_VIEW_MAP_EXPORT + void getOccludersF0D(Interface0DIterator& it, std::set& oOccluders); + + // getOccludeeF0D + LIB_VIEW_MAP_EXPORT + ViewShape* getOccludeeF0D(Interface0DIterator& it); + +} // end of namespace Functions0D + +#endif // FUNCTIONS0D_H diff --git a/extern/freestyle/src/view_map/Functions1D.cpp b/extern/freestyle/src/view_map/Functions1D.cpp new file mode 100755 index 00000000000..a34124ded31 --- /dev/null +++ b/extern/freestyle/src/view_map/Functions1D.cpp @@ -0,0 +1,209 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "Functions1D.h" +using namespace std; + +namespace Functions1D { + + real GetXF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real GetYF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real GetZF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real GetProjectedXF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real GetProjectedYF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real GetProjectedZF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + Vec2f Orientation2DF1D::operator()(Interface1D& inter) { + FEdge * fe = dynamic_cast(&inter); + if(fe){ + Vec3r res = fe->orientation2d(); + return Vec2f(res[0], res[1]); + } + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + Vec3f Orientation3DF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + real ZDiscontinuityF1D::operator()(Interface1D& inter) { + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + unsigned QuantitativeInvisibilityF1D::operator()(Interface1D& inter) { + ViewEdge* ve = dynamic_cast(&inter); + if (ve) + return ve->qi(); + FEdge *fe = dynamic_cast(&inter); + if(fe) + return ve->qi(); + return integrate(_func, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + + Nature::EdgeNature CurveNatureF1D::operator()(Interface1D& inter) { + ViewEdge* ve = dynamic_cast(&inter); + if (ve) + return ve->getNature(); + else{ + // we return a nature that contains every + // natures of the viewedges spanned by the chain. + Nature::EdgeNature nat = Nature::NO_FEATURE; + Interface0DIterator it = inter.verticesBegin(); + while(!it.isEnd()){ + nat |= _func(it); + ++it; + } + return nat; + } + } + + void TimeStampF1D::operator()(Interface1D& inter) { + TimeStamp *timestamp = TimeStamp::instance(); + inter.setTimeStamp(timestamp->getTimeStamp()); + } + + void ChainingTimeStampF1D::operator()(Interface1D& inter) { + TimeStamp *timestamp = TimeStamp::instance(); + ViewEdge *ve = dynamic_cast(&inter); + if(ve) + ve->setChainingTimeStamp(timestamp->getTimeStamp()); + } + + void IncrementChainingTimeStampF1D::operator()(Interface1D& inter) { + ViewEdge *ve = dynamic_cast(&inter); + if(ve) + ve->setChainingTimeStamp(ve->getChainingTimeStamp()+1); + } + + vector GetShapeF1D::operator()(Interface1D& inter) { + vector shapesVector; + set shapesSet; + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + shapesVector.push_back(ve->viewShape()); + }else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it) + shapesSet.insert(Functions0D::getShapeF0D(it)); + shapesVector.insert::iterator>(shapesVector.begin(), shapesSet.begin(), shapesSet.end()); + } + return shapesVector; + } + + vector GetOccludersF1D::operator()(Interface1D& inter) { + vector shapesVector; + set shapesSet; + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + return ve->occluders(); + }else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it){ + Functions0D::getOccludersF0D(it, shapesSet); + } + shapesVector.insert(shapesVector.begin(), shapesSet.begin(), shapesSet.end()); + } + return shapesVector; + } + + vector GetOccludeeF1D::operator()(Interface1D& inter) { + vector shapesVector; + set shapesSet; + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + ViewShape * aShape = ve->aShape(); + shapesVector.push_back(aShape); + }else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it){ + shapesSet.insert(Functions0D::getOccludeeF0D(it)); + } + shapesVector.insert::iterator>(shapesVector.begin(), shapesSet.begin(), shapesSet.end()); + } + return shapesVector; + } + // Internal + //////////// + + void getOccludeeF1D(Interface1D& inter, set& oShapes){ + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + ViewShape * aShape = ve->aShape(); + if(aShape == 0){ + oShapes.insert(0); + return; + } + oShapes.insert(aShape); + } + else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it) + oShapes.insert(Functions0D::getOccludeeF0D(it)); + } + } + + void getOccludersF1D(Interface1D& inter, set& oShapes){ + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + vector& occluders = ve->occluders(); + oShapes.insert::iterator>(occluders.begin(), occluders.end()); + } + else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it){ + set shapes; + Functions0D::getOccludersF0D(it, shapes); + for(set::iterator s=shapes.begin(), send=shapes.end(); + s!=send; + ++s) + oShapes.insert(*s); + } + } + } + + void getShapeF1D(Interface1D& inter, set& oShapes){ + ViewEdge* ve = dynamic_cast(&inter); + if (ve){ + oShapes.insert(ve->viewShape()); + }else{ + Interface0DIterator it=inter.verticesBegin(), itend=inter.verticesEnd(); + for(;it!=itend;++it) + oShapes.insert(Functions0D::getShapeF0D(it)); + } + } +} // end of namespace Functions1D diff --git a/extern/freestyle/src/view_map/Functions1D.h b/extern/freestyle/src/view_map/Functions1D.h new file mode 100755 index 00000000000..c92d12ff330 --- /dev/null +++ b/extern/freestyle/src/view_map/Functions1D.h @@ -0,0 +1,537 @@ +// +// Filename : Functions1D.h +// Author(s) : Stephane Grabli, Emmanuel Turquin +// Purpose : Functions taking 1D input +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef FUNCTIONS1D_HPP +# define FUNCTIONS1D_HPP + +# include "../system/Precision.h" +# include "../system/TimeStamp.h" +# include "ViewMap.h" +# include "Functions0D.h" +# include "Interface1D.h" +# include "../system/FreestyleConfig.h" +// +// UnaryFunction1D (base class for functions in 1D) +// +/////////////////////////////////////////////////////////// + +/*! Base class for Unary Functions (functors) working + * on Interface1D. + * A unary function will be used by calling + * its operator() on an Interface1D. + * \attention In the scripting language, there exists + * several prototypes depending on the returned value type. + * For example, you would inherit from a UnaryFunction1DDouble + * if you wish to define a function that returns a double. + * The different existing prototypes are: + * - UnaryFunction1DVoid + * - UnaryFunction1DUnsigned + * - UnaryFunction1DReal + * - UnaryFunction1DFloat + * - UnaryFunction1DDouble + * - UnaryFunction1DVec2f + * - UnaryFunction1DVec3f + */ +template +class /*LIB_VIEW_MAP_EXPORT*/ UnaryFunction1D +{ +public: + /*! The type of the value + * returned by the functor. + */ + typedef T ReturnedValueType; + + /*! Default constructor */ + UnaryFunction1D(){_integration = MEAN;} + /*! Builds a UnaryFunction1D from an integration type. + * \param iType + * In case the result for the Interface1D would be + * obtained by evaluating a 0D function over the different + * Interface0D of the Interface1D, \a iType tells which + * integration method to use. + * The default integration method is the MEAN. + */ + UnaryFunction1D(IntegrationType iType){_integration = iType;} + /*! destructor. */ + virtual ~UnaryFunction1D() {} + + /*! returns the string "UnaryFunction1D". */ + virtual string getName() const { + return "UnaryFunction1D"; + } + /*! The operator (). + * \param inter + * The Interface1D on which we wish to evaluate + * the function. + * \return the result of the function of type T. + */ + virtual T operator()(Interface1D& inter) { + cerr << "Warning: operator() not implemented" << endl; + return T(0); + } + /*! Sets the integration method */ + void setIntegrationType(IntegrationType integration) { + _integration = integration; + } + /*! Returns the integration method. */ + IntegrationType getIntegrationType() const { + return _integration; + } + +protected: + + IntegrationType _integration; +}; + +# ifdef SWIG +%feature("director") UnaryFunction1D; +%feature("director") UnaryFunction1D; +%feature("director") UnaryFunction1D; +%feature("director") UnaryFunction1D; +%feature("director") UnaryFunction1D; +%feature("director") UnaryFunction1D; + +%template(UnaryFunction1DVoid) UnaryFunction1D; +%template(UnaryFunction1DUnsigned) UnaryFunction1D; +%template(UnaryFunction1DFloat) UnaryFunction1D; +%template(UnaryFunction1DDouble) UnaryFunction1D; +%template(UnaryFunction1DVec2f) UnaryFunction1D; +%template(UnaryFunction1DVec3f) UnaryFunction1D; +%template(UnaryFunction1DVectorViewShape) UnaryFunction1D >; +# endif // SWIG + + +// +// Functions definitions +// +/////////////////////////////////////////////////////////// + +namespace Functions1D { + + // GetXF1D + /*! Returns the X 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetXF1D : public UnaryFunction1D + { + private: + Functions0D::GetXF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetXF1D(IntegrationType iType) : UnaryFunction1D(iType){} + /*! Returns the string "GetXF1D"*/ + string getName() const { + return "GetXF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter) ; + }; + + // GetYF1D + /*! Returns the Y 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetYF1D : public UnaryFunction1D + { + private: + Functions0D::GetYF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetYF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + /*! Returns the string "GetYF1D"*/ + string getName() const { + return "GetYF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter) ; + }; + + // GetZF1D + /*! Returns the Z 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetZF1D : public UnaryFunction1D + { + private: + Functions0D::GetZF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetZF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + /*! Returns the string "GetZF1D"*/ + string getName() const { + return "GetZF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter) ; + }; + + // GetProjectedXF1D + /*! Returns the projected X 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedXF1D : public UnaryFunction1D + { + private: + Functions0D::GetProjectedXF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetProjectedXF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + public: + /*! Returns the string "GetProjectedXF1D"*/ + string getName() const { + return "GetProjectedXF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; + + // GetProjectedYF1D + /*! Returns the projected Y 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedYF1D : public UnaryFunction1D + { + private: + Functions0D::GetProjectedYF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetProjectedYF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + public: + /*! Returns the string "GetProjectedYF1D"*/ + string getName() const { + return "GetProjectedYF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; + + // GetProjectedZF1D + /*! Returns the projected Z 3D coordinate of an Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetProjectedZF1D : public UnaryFunction1D + { + private: + Functions0D::GetProjectedZF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + GetProjectedZF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + public: + /*! Returns the string "GetProjectedZF1D"*/ + string getName() const { + return "GetProjectedZF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; + + // Orientation2DF1D + /*! Returns the 2D orientation as a Vec2f*/ + class LIB_VIEW_MAP_EXPORT Orientation2DF1D : public UnaryFunction1D + { + private: + Functions0D::VertexOrientation2DF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + Orientation2DF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + /*! Returns the string "Orientation2DF1D"*/ + string getName() const { + return "Orientation2DF1D"; + } + /*! the () operator.*/ + Vec2f operator()(Interface1D& inter); + }; + + // Orientation3DF1D + /*! Returns the 3D orientation as a Vec3f. */ + class LIB_VIEW_MAP_EXPORT Orientation3DF1D : public UnaryFunction1D + { + private: + Functions0D::VertexOrientation3DF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + Orientation3DF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + /*! Returns the string "Orientation3DF1D"*/ + string getName() const { + return "Orientation3DF1D"; + } + /*! the () operator.*/ + Vec3f operator()(Interface1D& inter); + }; + + // ZDiscontinuityF1D + /*! Returns a real giving the distance between + * and Interface1D and the shape that lies behind (occludee). + * This distance is evaluated in the camera space and normalized + * between 0 and 1. Therefore, if no oject is occluded by the + * shape to which the Interface1D belongs to, 1 is returned. + */ + class LIB_VIEW_MAP_EXPORT ZDiscontinuityF1D : public UnaryFunction1D + { + private: + Functions0D::ZDiscontinuityF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + ZDiscontinuityF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType){} + /*! Returns the string "ZDiscontinuityF1D"*/ + string getName() const { + return "ZDiscontinuityF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter); + }; + + // QuantitativeInvisibilityF1D + /*! Returns the Quantitative Invisibility of an Interface1D element. + * If the Interface1D is a ViewEdge, then there is no ambiguity + * concerning the result. But, if the Interface1D results of a chaining + * (chain, stroke), then it might be made of several 1D elements + * of different Quantitative Invisibilities. + */ + class LIB_VIEW_MAP_EXPORT QuantitativeInvisibilityF1D : public UnaryFunction1D + { + private: + Functions0D::QuantitativeInvisibilityF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + QuantitativeInvisibilityF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType) {} + /*! Returns the string "QuantitativeInvisibilityF1D"*/ + string getName() const { + return "QuantitativeInvisibilityF1D"; + } + /*! the () operator.*/ + unsigned operator()(Interface1D& inter); + }; + + // CurveNatureF1D +/*! Returns the nature of the Interface1D (silhouette, ridge, crease...). + * Except if the Interface1D is a ViewEdge, this result might be ambiguous. + * Indeed, the Interface1D might result from the gathering of several 1D elements, + * each one being of a different nature. An integration method, such as + * the MEAN, might give, in this case, irrelevant results. + */ + class LIB_VIEW_MAP_EXPORT CurveNatureF1D : public UnaryFunction1D + { + private: + Functions0D::CurveNatureF0D _func; + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + CurveNatureF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType) {} + /*! Returns the string "CurveNatureF1D"*/ + string getName() const { + return "CurveNatureF1D"; + } + /*! the () operator.*/ + Nature::EdgeNature operator()(Interface1D& inter); + }; + + // TimeStampF1D +/*! Returns the time stamp of the Interface1D. */ + class LIB_VIEW_MAP_EXPORT TimeStampF1D : public UnaryFunction1D + { + public: + /*! Returns the string "TimeStampF1D"*/ + string getName() const { + return "TimeStampF1D"; + } + /*! the () operator.*/ + void operator()(Interface1D& inter); + }; + + // IncrementChainingTimeStampF1D +/*! Increments the chaining time stamp of the Interface1D. */ + class LIB_VIEW_MAP_EXPORT IncrementChainingTimeStampF1D : public UnaryFunction1D + { + public: + /*! Returns the string "IncrementChainingTimeStampF1D"*/ + string getName() const { + return "IncrementChainingTimeStampF1D"; + } + /*! the () operator.*/ + void operator()(Interface1D& inter); + }; + + // ChainingTimeStampF1D +/*! Sets the chaining time stamp of the Interface1D. */ + class LIB_VIEW_MAP_EXPORT ChainingTimeStampF1D : public UnaryFunction1D + { + public: + /*! Returns the string "ChainingTimeStampF1D"*/ + string getName() const { + return "ChainingTimeStampF1D"; + } + /*! the () operator.*/ + void operator()(Interface1D& inter); + }; + + + // Curvature2DAngleF1D +/*! Returns the 2D curvature as an angle for an Interface1D. */ + class LIB_VIEW_MAP_EXPORT Curvature2DAngleF1D : public UnaryFunction1D + { + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + Curvature2DAngleF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType) {} + /*! Returns the string "Curvature2DAngleF1D"*/ + string getName() const { + return "Curvature2DAngleF1D"; + } + /*! the () operator.*/ + real operator()(Interface1D& inter) { + return integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + private: + Functions0D::Curvature2DAngleF0D _fun; + }; + + // Normal2DF1D + /*! Returns the 2D normal for an interface 1D. */ + class LIB_VIEW_MAP_EXPORT Normal2DF1D : public UnaryFunction1D + { + public: + /*! Builds the functor. + * \param iType + * The integration method used to compute + * a single value from a set of values. + */ + Normal2DF1D(IntegrationType iType = MEAN) : UnaryFunction1D(iType) {} + /*! Returns the string "Normal2DF1D"*/ + string getName() const { + return "Normal2DF1D"; + } + /*! the () operator.*/ + Vec2f operator()(Interface1D& inter) { + return integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); + } + private: + Functions0D::Normal2DF0D _fun; + }; + + // GetShapeF1D + /*! Returns list of shapes covered by this Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetShapeF1D : public UnaryFunction1D > + { + public: + /*! Builds the functor. + */ + GetShapeF1D() : UnaryFunction1D >() {} + /*! Returns the string "GetShapeF1D"*/ + string getName() const { + return "GetShapeF1D"; + } + /*! the () operator.*/ + std::vector operator()(Interface1D& inter); + }; + + // GetOccludersF1D + /*! Returns list of occluding shapes covered by this Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetOccludersF1D : public UnaryFunction1D > + { + public: + /*! Builds the functor. + */ + GetOccludersF1D() : UnaryFunction1D >() {} + /*! Returns the string "GetOccludersF1D"*/ + string getName() const { + return "GetOccludersF1D"; + } + /*! the () operator.*/ + std::vector operator()(Interface1D& inter); + }; + + // GetOccludeeF1D + /*! Returns list of occluded shapes covered by this Interface1D. */ + class LIB_VIEW_MAP_EXPORT GetOccludeeF1D : public UnaryFunction1D > + { + public: + /*! Builds the functor. + */ + GetOccludeeF1D() : UnaryFunction1D >() {} + /*! Returns the string "GetOccludeeF1D"*/ + string getName() const { + return "GetOccludeeF1D"; + } + /*! the () operator.*/ + std::vector operator()(Interface1D& inter); + }; + + // internal + //////////// + + // getOccludeeF1D + LIB_VIEW_MAP_EXPORT + void getOccludeeF1D(Interface1D& inter, set& oShapes); + + // getOccludersF1D + LIB_VIEW_MAP_EXPORT + void getOccludersF1D(Interface1D& inter, set& oShapes); + + // getShapeF1D + LIB_VIEW_MAP_EXPORT + void getShapeF1D(Interface1D& inter, set& oShapes); + +} // end of namespace Functions1D + +#endif // FUNCTIONS1D_HPP diff --git a/extern/freestyle/src/view_map/Interface0D.h b/extern/freestyle/src/view_map/Interface0D.h new file mode 100755 index 00000000000..eec39d2f7bc --- /dev/null +++ b/extern/freestyle/src/view_map/Interface0D.h @@ -0,0 +1,351 @@ +// +// Filename : Interface0D.h +// Author(s) : Emmanuel Turquin +// Purpose : Interface to 0D elts +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef INTERFACE0D_H +# define INTERFACE0D_H + +# include +# include +# include "../system/Id.h" +# include "../system/Precision.h" +# include "../winged_edge/Nature.h" +# include "../geometry/Geom.h" +using namespace std; + +// +// Interface0D +// +////////////////////////////////////////////////// + +class FEdge; +class SVertex; +class ViewVertex; +class NonTVertex; +class TVertex; +/*! Base class for any 0D element. */ +class Interface0D +{ +public: + + /*! Returns the string "Interface0D".*/ + virtual string getExactTypeName() const { + return "Interface0D"; + } + + // Data access methods + + /*! Returns the 3D x coordinate of the point. */ + virtual real getX() const { + cerr << "Warning: method getX() not implemented" << endl; + return 0; + } + + /*! Returns the 3D y coordinate of the point. */ + virtual real getY() const { + cerr << "Warning: method getY() not implemented" << endl; + return 0; + } + + /*! Returns the 3D z coordinate of the point. */ + virtual real getZ() const { + cerr << "Warning: method getZ() not implemented" << endl; + return 0; + } + + /*! Returns the 3D point. */ + virtual Geometry::Vec3f getPoint3D() const { + cerr << "Warning: method getPoint3D() not implemented" << endl; + return 0; + } + + /*! Returns the 2D x coordinate of the point. */ + virtual real getProjectedX() const { + cerr << "Warning: method getProjectedX() not implemented" << endl; + return 0; + } + + /*! Returns the 2D y coordinate of the point. */ + virtual real getProjectedY() const { + cerr << "Warning: method getProjectedY() not implemented" << endl; + return 0; + } + + /*! Returns the 2D z coordinate of the point. */ + virtual real getProjectedZ() const { + cerr << "Warning: method getProjectedZ() not implemented" << endl; + return 0; + } + + /*! Returns the 2D point. */ + virtual Geometry::Vec2f getPoint2D() const { + cerr << "Warning: method getPoint2D() not implemented" << endl; + return 0; + } + + /*! Returns the FEdge that lies between this Interface0D and the + * Interface0D given as argument. */ + virtual FEdge* getFEdge(Interface0D&) { + cerr << "Warning: method getFEdge() not implemented" << endl; + return 0; + } + + /*! Returns the Id of the point. */ + virtual Id getId() const { + cerr << "Warning: method getId() not implemented" << endl; + return Id(0, 0); + } + + /*! Returns the nature of the point. */ + virtual Nature::VertexNature getNature() const { + cerr << "Warning: method getNature() not implemented" << endl; + return Nature::POINT; + } + + /*! Cast the Interface0D in SVertex if it can be. */ + virtual SVertex * castToSVertex(){ + cerr << "Warning: can't cast this Interface0D in SVertex" << endl; + return 0; + } + + /*! Cast the Interface0D in ViewVertex if it can be. */ + virtual ViewVertex * castToViewVertex(){ + cerr << "Warning: can't cast this Interface0D in ViewVertex" << endl; + return 0; + } + + /*! Cast the Interface0D in NonTVertex if it can be. */ + virtual NonTVertex * castToNonTVertex(){ + cerr << "Warning: can't cast this Interface0D in NonTVertex" << endl; + return 0; + } + + /*! Cast the Interface0D in TVertex if it can be. */ + virtual TVertex * castToTVertex(){ + cerr << "Warning: can't cast this Interface0D in TVertex" << endl; + return 0; + } +}; + + +// +// Interface0DIteratorNested +// +////////////////////////////////////////////////// + +class Interface0DIteratorNested +{ +public: + + virtual ~Interface0DIteratorNested() {} + + virtual string getExactTypeName() const { + return "Interface0DIteratorNested"; + } + + virtual Interface0D& operator*() = 0; + + virtual Interface0D* operator->() { + return &(operator*()); + } + + virtual void increment() = 0; + + virtual void decrement() = 0; + + virtual bool isBegin() const = 0; + + virtual bool isEnd() const = 0; + + virtual bool operator==(const Interface0DIteratorNested& it) const = 0; + + virtual bool operator!=(const Interface0DIteratorNested& it) const { + return !(*this == it); + } + + /*! Returns the curvilinear abscissa */ + virtual float t() const = 0; + /*! Returns the point parameter 0copy(); + } + + /*! Destructor */ + virtual ~Interface0DIterator() { + if (_iterator) + delete _iterator; + } + + /*! Operator = + * \attention In the scripting language, you must call + * \code it2 = Interface0DIterator(it1) \endcode instead of \code it2 = it1 \endcode + * where \a it1 and \a it2 are 2 Interface0DIterator. + * Otherwise, incrementing \a it1 will also increment \a it2. + */ + Interface0DIterator& operator=(const Interface0DIterator& it) { + if(_iterator) + delete _iterator; + _iterator = it._iterator->copy(); + return *this; + } + + /*! Returns the string "Interface0DIterator". */ + string getExactTypeName() const { + if (!_iterator) + return "Interface0DIterator"; + return _iterator->getExactTypeName() + "Proxy"; + } + + // FIXME test it != 0 (exceptions ?) + + /*! Returns a reference to the pointed Interface0D. + * In the scripting language, you must call + * "getObject()" instead using this operator. + */ + Interface0D& operator*() { + return _iterator->operator*(); + } + + /*! Returns a pointer to the pointed Interface0D. + * Can't be called in the scripting language. + */ + Interface0D* operator->() { + return &(operator*()); + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + Interface0DIterator& operator++() { + _iterator->increment(); + return *this; + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + Interface0DIterator operator++(int) { + Interface0DIterator ret(*this); + _iterator->increment(); + return ret; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + Interface0DIterator& operator--() { + _iterator->decrement(); + return *this; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + Interface0DIterator operator--(int) { + Interface0DIterator ret(*this); + _iterator->decrement(); + return ret; + } + + /*! Increments. */ + void increment() { + _iterator->increment(); + } + + /*! Decrements. */ + void decrement() { + _iterator->decrement(); + } + + /*! Returns true if the pointed Interface0D is the + * first of the 1D element containing the points over + * which we're iterating. + */ + bool isBegin() const { + return _iterator->isBegin(); + } + + /*! Returns true if the pointed Interface0D is after the + * after the last point of the 1D element we're iterating from. + */ + bool isEnd() const { + return _iterator->isEnd(); + } + + /*! operator == . */ + bool operator==(const Interface0DIterator& it) const { + return _iterator->operator==(*(it._iterator)); + } + + /*! operator != . */ + bool operator!=(const Interface0DIterator& it) const { + return !(*this == it); + } + + /*! Returns the curvilinear abscissa. */ + inline float t() const { + return _iterator->t(); + } + /*! Returns the point parameter in the curve 0<=u<=1. */ + inline float u() const { + return _iterator->u(); + } +protected: + + Interface0DIteratorNested* _iterator; +}; + +#endif // INTERFACE0D_H diff --git a/extern/freestyle/src/view_map/Interface1D.h b/extern/freestyle/src/view_map/Interface1D.h new file mode 100755 index 00000000000..812187e5ec1 --- /dev/null +++ b/extern/freestyle/src/view_map/Interface1D.h @@ -0,0 +1,202 @@ +// +// Filename : Interface1D.h +// Author(s) : Emmanuel Turquin +// Purpose : Interface to 1D elts +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef INTERFACE1D_H +# define INTERFACE1D_H + +# include +# include +# include +# include "../system/Id.h" +# include "../system/Precision.h" +# include "../winged_edge/Nature.h" +# include "Functions0D.h" + +using namespace std; +/*! \file Interface1D.h + * Interface1D and related tools definitions + */ +// Integration method +/*! The different integration + * methods that can be invoked + * to integrate into a single value the set of values obtained + * from each 0D element of a 1D element. + */ +typedef enum { + MEAN,/*!< The value computed for the 1D element is the mean of the values obtained for the 0D elements.*/ + MIN,/*!< The value computed for the 1D element is the minimum of the values obtained for the 0D elements.*/ + MAX,/*!< The value computed for the 1D element is the maximum of the values obtained for the 0D elements.*/ + FIRST,/*!< The value computed for the 1D element is the first of the values obtained for the 0D elements.*/ + LAST/*!< The value computed for the 1D element is the last of the values obtained for the 0D elements.*/ +} IntegrationType; + +/*! Returns a single + * value from a set of values evaluated at each 0D element + * of this 1D element. + * \param fun + * The UnaryFunction0D used to compute a value at each Interface0D. + * \param it + * The Interface0DIterator used to iterate over the 0D elements of + * this 1D element. The integration will occur over the 0D elements + * starting from the one pointed by it. + * \param it_end + * The Interface0DIterator pointing the end of the 0D elements of the + * 1D element. + * \param integration_type + * The integration method used to compute a single value from + * a set of values. + * \return the single value obtained for the 1D element. + */ +template +T integrate(UnaryFunction0D& fun, + Interface0DIterator it, + Interface0DIterator it_end, + IntegrationType integration_type = MEAN) { + T res; + T res_tmp; + unsigned size; + switch (integration_type) { + case MIN: + res = fun(it);++it; + for (; !it.isEnd(); ++it) { + res_tmp = fun(it); + if (res_tmp < res) + res = res_tmp; + } + break; + case MAX: + res = fun(it);++it; + for (; !it.isEnd(); ++it) { + res_tmp = fun(it); + if (res_tmp > res) + res = res_tmp; + } + break; + case FIRST: + res = fun(it); + break; + case LAST: + res = fun(--it_end); + break; + case MEAN: + default: + res = fun(it);++it; + for (size = 1; !it.isEnd(); ++it, ++size) + res += fun(it); + res /= (size ? size : 1); + break; + } + return res; +} + +// +// Interface1D +// +////////////////////////////////////////////////// + +/*! Base class for any 1D element. */ +class Interface1D +{ +public: + + /*! Default constructor */ + Interface1D() {_timeStamp=0;} + + /*! Returns the string "Interface1D" .*/ + virtual string getExactTypeName() const { + return "Interface1D"; + } + + // Iterator access + + /*! Returns an iterator over the Interface1D vertices, + * pointing to the first vertex. + */ + virtual Interface0DIterator verticesBegin() = 0; + /*! Returns an iterator over the Interface1D vertices, + * pointing after the last vertex. + */ + virtual Interface0DIterator verticesEnd() = 0; + /*! Returns an iterator over the Interface1D points, + * pointing to the first point. The difference with + * verticesBegin() is that here we can iterate over + * points of the 1D element at a any given sampling. + * Indeed, for each iteration, a virtual point is created. + * \param t + * The sampling with which we want to iterate over points of + * this 1D element. + */ + virtual Interface0DIterator pointsBegin(float t=0.f) = 0; + /*! Returns an iterator over the Interface1D points, + * pointing after the last point. The difference with + * verticesEnd() is that here we can iterate over + * points of the 1D element at a any given sampling. + * Indeed, for each iteration, a virtual point is created. + * \param t + * The sampling with which we want to iterate over points of + * this 1D element. + */ + virtual Interface0DIterator pointsEnd(float t=0.f) = 0; + + // Data access methods + + /*! Returns the 2D length of the 1D element. */ + virtual real getLength2D() const { + cerr << "Warning: method getLength2D() not implemented" << endl; + return 0; + } + + /*! Returns the Id of the 1D element .*/ + virtual Id getId() const { + cerr << "Warning: method getId() not implemented" << endl; + return Id(0, 0); + } + + // FIXME: ce truc n'a rien a faire la...(c une requete complexe qui doit etre ds les Function1D) + /*! Returns the nature of the 1D element. */ + virtual Nature::EdgeNature getNature() const { + cerr << "Warning: method getNature() not implemented" << endl; + return Nature::NO_FEATURE; + } + + /*! Returns the time stamp of the 1D element. Mainly used for selection. */ + virtual unsigned getTimeStamp() const { + return _timeStamp; + } + + /*! Sets the time stamp for the 1D element. */ + inline void setTimeStamp(unsigned iTimeStamp){ + _timeStamp = iTimeStamp; + } + +protected: + unsigned _timeStamp; +}; + +#endif // INTERFACE1D_H diff --git a/extern/freestyle/src/view_map/Silhouette.cpp b/extern/freestyle/src/view_map/Silhouette.cpp new file mode 100755 index 00000000000..db4f82d369e --- /dev/null +++ b/extern/freestyle/src/view_map/Silhouette.cpp @@ -0,0 +1,370 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "Silhouette.h" +#include "ViewMap.h" + + /**********************************/ + /* */ + /* */ + /* SVertex */ + /* */ + /* */ + /**********************************/ + +Nature::VertexNature SVertex::getNature() const { + Nature::VertexNature nature = Nature::S_VERTEX; + if (_pViewVertex) + nature |= _pViewVertex->getNature(); + return nature; +} + +SVertex * SVertex::castToSVertex(){ + return this; +} + +ViewVertex * SVertex::castToViewVertex(){ + return _pViewVertex; +} + +NonTVertex * SVertex::castToNonTVertex(){ + return dynamic_cast(_pViewVertex); +} + +TVertex * SVertex::castToTVertex(){ + return dynamic_cast(_pViewVertex); +} + +float SVertex::shape_importance() const +{ + return shape()->importance(); +} + +//Material SVertex::material() const {return _Shape->material();} +Id SVertex::shape_id() const {return _Shape->getId();} +const SShape * SVertex::shape() const {return _Shape;} + +const int SVertex::qi() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->qi(); +} + +occluder_container::const_iterator SVertex::occluders_begin() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occluders_begin(); +} + +occluder_container::const_iterator SVertex::occluders_end() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occluders_end(); +} + +bool SVertex::occluders_empty() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occluders_empty(); +} + +int SVertex::occluders_size() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occluders_size(); +} + +const Polygon3r& SVertex::occludee() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occludee(); +} + +const SShape* SVertex::occluded_shape() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occluded_shape(); +} + +const bool SVertex::occludee_empty() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->occludee_empty(); +} + +real SVertex::z_discontinuity() const +{ + if (getNature() & Nature::T_VERTEX) + Exception::raiseException(); + return (_FEdges[0])->z_discontinuity(); +} + +FEdge* SVertex::fedge() +{ + if (getNature() & Nature::T_VERTEX) + return 0; + return _FEdges[0]; +} + +FEdge* SVertex::getFEdge(Interface0D& inter) +{ + FEdge * result = 0; + SVertex* iVertexB = dynamic_cast(&inter); + if (!iVertexB) + return result; + vector::const_iterator fe=_FEdges.begin(), feend=_FEdges.end(); + for(; + fe!=feend; + ++fe) + { + if( (((*fe)->vertexA() == this) && ((*fe)->vertexB() == iVertexB)) + || (((*fe)->vertexB() == this) && ((*fe)->vertexA() == iVertexB))) + result = (*fe); + } + if((result == 0) && (getNature() & Nature::T_VERTEX)) + { + SVertex *brother; + ViewVertex *vvertex = viewvertex(); + TVertex * tvertex = dynamic_cast(vvertex); + if(tvertex) + { + brother = tvertex->frontSVertex(); + if(this == brother) + brother = tvertex->backSVertex(); + const vector& fedges = brother->fedges(); + for(fe=fedges.begin(),feend=fedges.end(); + fe!=feend; + ++fe) + { + if( (((*fe)->vertexA() == brother) && ((*fe)->vertexB() == iVertexB)) + || (((*fe)->vertexB() == brother) && ((*fe)->vertexA() == iVertexB))) + result = (*fe); + } + } + } + if((result == 0) && (iVertexB->getNature() & Nature::T_VERTEX)) + { + SVertex *brother; + ViewVertex *vvertex = iVertexB->viewvertex(); + TVertex * tvertex = dynamic_cast(vvertex); + if(tvertex) + { + brother = tvertex->frontSVertex(); + if(iVertexB == brother) + brother = tvertex->backSVertex(); + for(fe=_FEdges.begin(),feend=_FEdges.end(); + fe!=feend; + ++fe) + { + if( (((*fe)->vertexA() == this) && ((*fe)->vertexB() == brother)) + || (((*fe)->vertexB() == this) && ((*fe)->vertexA() == brother))) + result = (*fe); + } + } + } + + return result; +} + + + /**********************************/ + /* */ + /* */ + /* FEdge */ + /* */ + /* */ + /**********************************/ + + +int FEdge::viewedge_nature() const {return _ViewEdge->getNature();} +//float FEdge::viewedge_length() const {return _ViewEdge->viewedge_length();} +const SShape* FEdge::occluded_shape() const +{ + ViewShape * aShape = _ViewEdge->aShape(); + if(aShape == 0) + return 0; + return aShape->sshape(); +} + +float FEdge::shape_importance() const +{ + return _VertexA->shape()->importance(); +} + +int FEdge::invisibility() const +{ + return _ViewEdge->qi(); +} + +occluder_container::const_iterator FEdge::occluders_begin() const {return _ViewEdge->occluders_begin();} +occluder_container::const_iterator FEdge::occluders_end() const {return _ViewEdge->occluders_end();} +bool FEdge::occluders_empty() const {return _ViewEdge->occluders_empty();} +int FEdge::occluders_size() const {return _ViewEdge->occluders_size();} +const bool FEdge::occludee_empty() const +{ + return _ViewEdge->occludee_empty(); +} + + + +Id FEdge::shape_id() const +{ + return _VertexA->shape()->getId(); +} +const SShape* FEdge::shape() const +{ + return _VertexA->shape(); +} + +real FEdge::z_discontinuity() const +{ + if(!(getNature() & Nature::SILHOUETTE) && !(getNature() & Nature::BORDER)) + { + return 0; + } + + BBox box = ViewMap::getInstance()->getScene3dBBox(); + + Vec3r bbox_size_vec(box.getMax() - box.getMin()); + real bboxsize = bbox_size_vec.norm(); + if(occludee_empty()) + + { + //return FLT_MAX; + + return 1.0; + + //return bboxsize; + + } + // real result; + // z_discontinuity_functor _functor; + + // Evaluate >(&_functor, iCombination, result ) + Vec3r middle((_VertexB->point3d()-_VertexA->point3d())); + + middle /= 2; + Vec3r disc_vec(middle - _occludeeIntersection); + real res = disc_vec.norm() / bboxsize; + return res; + + //return fabs((middle.z()-_occludeeIntersection.z())); +} + + +//float FEdge::local_average_depth(int iCombination ) const +//{ +// +// float result; +// local_average_depth_functor functor; +// Evaluate(&functor, iCombination, result); +// +// return result; +//} +//float FEdge::local_depth_variance(int iCombination ) const +//{ +// float result; +// +// local_depth_variance_functor functor; +// +// Evaluate(&functor, iCombination, result); +// +// return result; +//} +// +// +//real FEdge::local_average_density( float sigma, int iCombination) const +//{ +// float result; +// +// density_functor functor(sigma); +// +// Evaluate(&functor, iCombination, result); +// +// return result; +//} +// +////Vec3r FEdge::normal(int& oException /* = Exception::NO_EXCEPTION */) +////{ +//// Vec3r Na = _VertexA->normal(oException); +//// if(oException != Exception::NO_EXCEPTION) +//// return Na; +//// Vec3r Nb = _VertexB->normal(oException); +//// if(oException != Exception::NO_EXCEPTION) +//// return Nb; +//// return (Na+Nb)/2.0; +////} +// +//Vec3r FEdge::curvature2d_as_vector(int iCombination) const +//{ +// Vec3r result; +// curvature2d_as_vector_functor _functor; +// Evaluate >(&_functor, iCombination, result ); +// return result; +//} +// +//real FEdge::curvature2d_as_angle(int iCombination) const +//{ +// real result; +// curvature2d_as_angle_functor _functor; +// Evaluate >(&_functor, iCombination, result ); +// return result; +//} + + /**********************************/ + /* */ + /* */ + /* FEdgeSharp */ + /* */ + /* */ + /**********************************/ + +//Material FEdge::material() const +//{ +// return _VertexA->shape()->material(); +//} +const Material& FEdgeSharp::aMaterial() const { + return _VertexA->shape()->material(_aMaterialIndex); +} + +const Material& FEdgeSharp::bMaterial() const { + return _VertexA->shape()->material(_bMaterialIndex); +} + + /**********************************/ + /* */ + /* */ + /* FEdgeSmooth */ + /* */ + /* */ + /**********************************/ + +const Material& FEdgeSmooth::material() const { + return _VertexA->shape()->material(_MaterialIndex); +} diff --git a/extern/freestyle/src/view_map/Silhouette.h b/extern/freestyle/src/view_map/Silhouette.h new file mode 100755 index 00000000000..e88bf23b210 --- /dev/null +++ b/extern/freestyle/src/view_map/Silhouette.h @@ -0,0 +1,1417 @@ +// +// Filename : Silhouette.h +// Author(s) : Stephane Grabli +// Purpose : Classes to define a silhouette structure +// Date of creation : 25/03/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SILHOUETTE_H +# define SILHOUETTE_H + +# include +# include +# include +# include +# include +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" +# include "../geometry/BBox.h" +# include "../scene_graph/Material.h" +# include "../geometry/Polygon.h" +# include "../system/Exception.h" +# include "Interface0D.h" +# include "Interface1D.h" +# include "../winged_edge/Curvature.h" + +using namespace std; +using namespace Geometry; + +class ViewShape; +typedef vector occluder_container; + + /**********************************/ + /* */ + /* */ + /* SVertex */ + /* */ + /* */ + /**********************************/ + +class FEdge; +class ViewVertex; +class SShape; + +/*! Class to define a vertex of the embedding. */ +class LIB_VIEW_MAP_EXPORT SVertex : public Interface0D +{ +public: // Implementation of Interface0D + + /*! Returns the string "SVertex" .*/ + virtual string getExactTypeName() const { + return "SVertex"; + } + + // Data access methods + + /*! Returns the 3D x coordinate of the vertex .*/ + virtual real getX() const { + return _Point3D.x(); + } + + /*! Returns the 3D y coordinate of the vertex .*/ + virtual real getY() const { + return _Point3D.y(); + } + + /*! Returns the 3D z coordinate of the vertex .*/ + virtual real getZ() const { + return _Point3D.z(); + } + + /*! Returns the 3D point. */ + virtual Vec3f getPoint3D() const { + return _Point3D; + } + + /*! Returns the projected 3D x coordinate of the vertex .*/ + virtual real getProjectedX() const { + return _Point2D.x(); + } + + /*! Returns the projected 3D y coordinate of the vertex .*/ + virtual real getProjectedY() const { + return _Point2D.y(); + } + + /*! Returns the projected 3D z coordinate of the vertex .*/ + virtual real getProjectedZ() const { + return _Point2D.z(); + } + + /*! Returns the 2D point. */ + virtual Vec2f getPoint2D() const { + return Vec2f((float)_Point2D.x(),(float)_Point2D.y()); + } + + /*! Returns the FEdge that lies between this Svertex and the + * Interface0D given as argument. */ + virtual FEdge* getFEdge(Interface0D&); + + /*! Returns the Id of the vertex .*/ + virtual Id getId() const { + return _Id; + } + + /*! Returns the nature of the vertex .*/ + virtual Nature::VertexNature getNature() const; + + /*! Cast the Interface0D in SVertex if it can be. */ + virtual SVertex * castToSVertex(); + + /*! Cast the Interface0D in ViewVertex if it can be. */ + virtual ViewVertex * castToViewVertex(); + + /*! Cast the Interface0D in NonTVertex if it can be. */ + virtual NonTVertex * castToNonTVertex(); + + /*! Cast the Interface0D in TVertex if it can be. */ + virtual TVertex * castToTVertex(); + +public: + + typedef vector fedges_container; + +private: + + Id _Id; + Vec3r _Point3D; + Vec3r _Point2D; + set _Normals; + vector _FEdges; // the edges containing this vertex + SShape *_Shape; // the shape to which belongs the vertex + ViewVertex *_pViewVertex; // The associated viewvertex, in case there is one. + real _curvatureFredo; + Vec2r _directionFredo; + CurvatureInfo* _curvature_info; + +public: + + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void *userdata; + + /*! Default constructor.*/ + inline SVertex() { + _Id = 0; + userdata = NULL; + _Shape = NULL; + _pViewVertex = 0; + _curvature_info = 0; + } + + /*! Builds a SVertex from 3D coordinates and an Id. */ + inline SVertex(const Vec3r &iPoint3D, const Id& id) { + _Point3D = iPoint3D; + _Id=id; + userdata = NULL; + _Shape = NULL; + _pViewVertex=0; + _curvature_info = 0; + } + + /*! Copy constructor. */ + inline SVertex(SVertex& iBrother) { + _Id = iBrother._Id; + _Point3D = iBrother.point3D(); + _Point2D = iBrother.point2D(); + _Normals = iBrother._Normals; + _FEdges = iBrother.fedges(); + _Shape = iBrother.shape(); + _pViewVertex = iBrother._pViewVertex; + if (!(iBrother._curvature_info)) + _curvature_info = 0; + else + _curvature_info = new CurvatureInfo(*(iBrother._curvature_info)); + iBrother.userdata = this; + userdata = 0; + } + + /*! Destructor. */ + virtual ~SVertex() { + if (_curvature_info) + delete _curvature_info; + } + + /*! Cloning method. */ + virtual SVertex * dupplicate() { + SVertex *clone = new SVertex(*this); + return clone; + } + + /*! operator == */ + virtual bool operator==(const SVertex& iBrother) { + return ((_Point2D == iBrother._Point2D) && + (_Point3D == iBrother._Point3D)); + } + + /* accessors */ + inline const Vec3r& point3D() const {return _Point3D;} + inline const Vec3r& point2D() const {return _Point2D;} + /*! Returns the set of normals for this Vertex. + * In a smooth surface, a vertex has exactly one normal. + * In a sharp surface, a vertex can have any number of normals. + */ + inline set normals() {return _Normals;} + /*! Returns the number of different normals for this vertex. */ + inline unsigned normalsSize() const {return _Normals.size();} + inline const vector& fedges() {return _FEdges;} + inline fedges_container::iterator fedges_begin() {return _FEdges.begin();} + inline fedges_container::iterator fedges_end() {return _FEdges.end();} + inline SShape * shape() {return _Shape;} + inline real z() const {return _Point2D[2];} + /*! If this SVertex is also a ViewVertex, this method + * returns a pointer onto this ViewVertex. 0 is returned + * otherwise. + */ + inline ViewVertex * viewvertex() {return _pViewVertex;} + + /*! modifiers */ + /*! Sets the 3D coordinates of the SVertex. */ + inline void SetPoint3D(const Vec3r &iPoint3D) {_Point3D = iPoint3D;} + /*! Sets the 3D projected coordinates of the SVertex. */ + inline void SetPoint2D(const Vec3r &iPoint2D) {_Point2D = iPoint2D;} + /*! Adds a normal to the Svertex's set of normals. If the same + * normal is already in the set, nothing changes. + */ + inline void AddNormal(const Vec3r& iNormal) + { + _Normals.insert(iNormal); // if iNormal in the set already exists, nothing is done + } + + void setCurvatureInfo(CurvatureInfo* ci) { + _curvature_info = ci; + } + + const CurvatureInfo* getCurvatureInfo() const { + return _curvature_info; + } + + /* Fredo's normal and curvature*/ + void setCurvatureFredo(real c) {_curvatureFredo=c;} + void setDirectionFredo(Vec2r d) {_directionFredo=d;} + real curvatureFredo () {return _curvatureFredo;} + const Vec2r directionFredo () {return _directionFredo;} + + /*! Sets the Id */ + inline void SetId(const Id& id) {_Id = id;} + inline void SetFEdges(const vector& iFEdges) {_FEdges = iFEdges;} + inline void SetShape(SShape *iShape) {_Shape = iShape;} + inline void SetViewVertex(ViewVertex *iViewVertex) {_pViewVertex = iViewVertex;} + /*! Add an FEdge to the list of edges emanating from this SVertex. */ + inline void AddFEdge(FEdge* iFEdge) {_FEdges.push_back(iFEdge);} + /* replaces edge 1 by edge 2 in the list of edges */ + inline void Replace(FEdge *e1, FEdge *e2) + { + vector::iterator insertedfe; + for(vector::iterator fe=_FEdges.begin(),fend=_FEdges.end(); + fe!=fend; + fe++) + { + if((*fe) == e1) + { + insertedfe = _FEdges.insert(fe, e2);// inserts e2 before fe. + // returns an iterator pointing toward e2. fe is invalidated. + // we want to remove e1, but we can't use fe anymore: + insertedfe++; // insertedfe points now to e1 + _FEdges.erase(insertedfe); + return; + } + } + } + +public: + + /* Information access interface */ + + FEdge *fedge() ; // for non T vertex + inline const Vec3r& point2d() const {return point2D();} + inline const Vec3r& point3d() const {return point3D();} + inline Vec3r normal() const {if(_Normals.size() == 1) return (*(_Normals.begin())); Exception::raiseException(); return *(_Normals.begin());} + //Material material() const ; + Id shape_id() const ; + const SShape* shape() const ; + float shape_importance() const ; + + const int qi() const ; + occluder_container::const_iterator occluders_begin() const ; + occluder_container::const_iterator occluders_end() const ; + bool occluders_empty() const ; + int occluders_size() const ; + const Polygon3r& occludee() const ; + const SShape * occluded_shape() const ; + const bool occludee_empty() const ; + real z_discontinuity() const ; + //inline float local_average_depth() const ; + // inline float local_depth_variance() const ; + // inline real local_average_density(float sigma = 2.3f) const ; + //inline Vec3r shaded_color() const ; + // inline Vec3r orientation2d() const ; + // inline Vec3r orientation3d() const ; + // inline Vec3r curvature2d_as_vector() const ; + /*! angle in radians */ + // inline real curvature2d_as_angle() const ; + +}; + + /**********************************/ + /* */ + /* */ + /* FEdge */ + /* */ + /* */ + /**********************************/ + + +class ViewEdge; +/*! Base Class for feature edges. + * This FEdge can represent a silhouette, a crease, + * a ridge/valley, a border or a suggestive contour. + * For silhouettes, the FEdge is oriented + * such as, the visible face lies on the left of the edge. + * For borders, the FEdge is oriented + * such as, the face lies on the left of the edge. + * An FEdge can represent an initial edge of the mesh + * or runs accross a face of the initial mesh depending + * on the smoothness or sharpness of the mesh. + * This class is specialized into a smooth and a sharp + * version since their properties slightly vary from + * one to the other. + */ +class LIB_VIEW_MAP_EXPORT FEdge : public Interface1D +{ +public: // Implementation of Interface0D + + /*! Returns the string "FEdge" . */ + virtual string getExactTypeName() const { + return "FEdge"; + } + + // Data access methods + + /*! Returns the 2D length of the FEdge. */ + virtual real getLength2D() const { + if (!_VertexA || !_VertexB) + return 0; + return (_VertexB->getPoint2D() - _VertexA->getPoint2D()).norm(); + } + + /*! Returns the Id of the FEdge. */ + virtual Id getId() const { + return _Id; + } + +public: + + // An edge can only be of one kind (SILHOUETTE or BORDER, etc...) + // For an multi-nature edge there must be several different FEdge. + // DEBUG: + // Vec3r A; + // Vec3r u; + // vector _Occludees; + // Vec3r intersection; + // vector _Cells; + +protected: + SVertex *_VertexA; + SVertex *_VertexB; + Id _Id; + Nature::EdgeNature _Nature; + //vector _Occluders; // visibility // NON GERE PAR LE COPY CONSTRUCTOR!! + + FEdge *_NextEdge; // next edge on the chain + FEdge *_PreviousEdge; + ViewEdge *_ViewEdge; + // Sometimes we need to deport the visibility computation onto another + // edge. For example the exact edges use edges of the mesh to + // compute their visibility + + Polygon3r _aFace; // The occluded face which lies on the right of a silhouette edge + Vec3r _occludeeIntersection; + bool _occludeeEmpty; + + bool _isSmooth; + +public: + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void *userdata; + /*! Default constructor */ + inline FEdge() { + userdata = NULL; + _Nature = Nature::NO_FEATURE; + _NextEdge = NULL; + _PreviousEdge = NULL; + _ViewEdge = NULL; + //_hasVisibilityPoint=false; + _occludeeEmpty = true; + _isSmooth = false; + } + /*! Builds an FEdge going from vA to vB. */ + inline FEdge(SVertex *vA, SVertex *vB) { + userdata = NULL; + _VertexA = vA; + _VertexB = vB; + _Nature = Nature::NO_FEATURE; + _NextEdge=NULL; + _PreviousEdge=NULL; + _ViewEdge = NULL; + //_hasVisibilityPoint=false; + _occludeeEmpty = true; + _isSmooth = false; + } + /*! Copy constructor */ + inline FEdge(FEdge& iBrother) + { + _VertexA = iBrother.vertexA(); + _VertexB = iBrother.vertexB(); + _NextEdge = iBrother.nextEdge(); + _PreviousEdge = iBrother._PreviousEdge; + _Nature = iBrother.getNature(); + _Id = iBrother._Id; + _ViewEdge = iBrother._ViewEdge; + //_hasVisibilityPoint = iBrother._hasVisibilityPoint; + //_VisibilityPointA = iBrother._VisibilityPointA; + //_VisibilityPointB = iBrother._VisibilityPointB; + _aFace = iBrother._aFace; + _occludeeEmpty = iBrother._occludeeEmpty; + _isSmooth = iBrother._isSmooth; + iBrother.userdata = this; + userdata = 0; + } + /*! Destructor */ + virtual ~FEdge() {} + /*! Cloning method. */ + virtual FEdge* dupplicate() + { + FEdge *clone = new FEdge(*this); + return clone; + } + /* accessors */ + /*! Returns the first SVertex. */ + inline SVertex* vertexA() {return _VertexA;} + /*! Returns the second SVertex. */ + inline SVertex* vertexB() {return _VertexB;} + /*! Returns the first SVertex if i=0, the seccond SVertex + * if i=1. */ + inline SVertex* operator[](const unsigned short int& i) const{ + return i%2==0 ? _VertexA : _VertexB; + } + /*! Returns the nature of the FEdge. */ + inline Nature::EdgeNature getNature() const {return _Nature;} + /*! Returns the FEdge following this one in the ViewEdge. + * If this FEdge is the last of the ViewEdge, 0 is returned. + */ + inline FEdge * nextEdge() {return _NextEdge;} + /*! Returns the Edge preceding this one in the ViewEdge. + * If this FEdge is the first one of the ViewEdge, 0 is returned. + */ + inline FEdge * previousEdge() {return _PreviousEdge;} + inline SShape * shape() {return _VertexA->shape();} + //inline int invisibility() const {return _Occluders.size();} + int invisibility() const ; + //inline const vector& occluders() const {return _Occluders;} + /*! Returns a pointer to the ViewEdge to which this FEdge belongs to. */ + inline ViewEdge * viewedge() const {return _ViewEdge;} + inline Vec3r center3d() {return Vec3r((_VertexA->point3D()+_VertexB->point3D())/2.0);} + inline Vec3r center2d() {return Vec3r((_VertexA->point2D()+_VertexB->point2D())/2.0);} + // inline bool hasVisibilityPoint() const {return _hasVisibilityPoint;} + // inline Vec3r visibilityPointA() const {return _VisibilityPointA;} + // inline Vec3r visibilityPointB() const {return _VisibilityPointB;} + inline const Polygon3r& aFace() const {return _aFace;} + inline const Vec3r& getOccludeeIntersection() { return _occludeeIntersection; } + inline bool getOccludeeEmpty() { return _occludeeEmpty; } + /*! Returns true if this FEdge is a smooth FEdge. */ + inline bool isSmooth() const {return _isSmooth;} + + /* modifiers */ + /*! Sets the first SVertex. */ + inline void SetVertexA(SVertex *vA) {_VertexA = vA;} + /*! Sets the second SVertex. */ + inline void SetVertexB(SVertex *vB) {_VertexB = vB;} + /*! Sets the FEdge Id . */ + inline void SetId(const Id& id) {_Id = id;} + /*! Sets the pointer to the next FEdge. */ + inline void SetNextEdge(FEdge* iEdge) {_NextEdge = iEdge;} + /*! Sets the pointer to the previous FEdge. */ + inline void SetPreviousEdge(FEdge *iEdge) {_PreviousEdge = iEdge;} + /*! Sets the nature of this FEdge. */ + inline void SetNature(Nature::EdgeNature iNature) {_Nature = iNature;} + //inline void AddOccluder(Polygon3r& iPolygon) {_Occluders.push_back(iPolygon);} + /*! Sets the ViewEdge to which this FEdge belongs to. */ + inline void SetViewEdge(ViewEdge *iViewEdge) {_ViewEdge = iViewEdge;} + // inline void SetHasVisibilityPoint(bool iBool) {_hasVisibilityPoint = iBool;} + // inline void SetVisibilityPointA(const Vec3r& iPoint) {_VisibilityPointA = iPoint;} + // inline void SetVisibilityPointB(const Vec3r& iPoint) {_VisibilityPointB = iPoint;} + inline void SetaFace(Polygon3r& iFace) {_aFace = iFace;} + inline void SetOccludeeIntersection(const Vec3r& iPoint) {_occludeeIntersection = iPoint;} + inline void SetOccludeeEmpty(bool iempty) {_occludeeEmpty = iempty;} + /*! Sets the flag telling whether this FEdge is smooth or sharp. + * true for Smooth, false for Sharp. + */ + inline void SetSmooth(bool iFlag) {_isSmooth = iFlag;} + + /* checks whether two FEdge have a common vertex. + * Returns a pointer on the common vertex if it exists, + * NULL otherwise. + */ + static inline SVertex* CommonVertex(FEdge *iEdge1, FEdge* iEdge2) + { + if((NULL == iEdge1) || (NULL == iEdge2)) + return NULL; + + SVertex *sv1 = iEdge1->vertexA(); + SVertex *sv2 = iEdge1->vertexB(); + SVertex *sv3 = iEdge2->vertexA(); + SVertex *sv4 = iEdge2->vertexB(); + + if((sv1 == sv3) || (sv1 == sv4)) + { + return sv1; + } + else if((sv2 == sv3) || (sv2 == sv4)) + { + return sv2; + } + + return NULL; + } + + inline const SVertex* min2d() const + { + if(_VertexA->point2D() < _VertexB->point2D()) + return _VertexA; + else + return _VertexB; + } + inline const SVertex* max2d() const + { + if(_VertexA->point2D() < _VertexB->point2D()) + return _VertexB; + else + return _VertexA; + } + + /* Information access interface */ + /* Information access interface */ + + //Material material() const ; + Id shape_id() const ; + const SShape * shape() const ; + float shape_importance() const ; + inline const int qi() const {return invisibility();} + occluder_container::const_iterator occluders_begin() const ; + occluder_container::const_iterator occluders_end() const ; + bool occluders_empty() const ; + int occluders_size() const ; + inline const Polygon3r& occludee() const {return aFace();} + const SShape * occluded_shape() const ; + //inline const bool occludee_empty() const {return _occludeeEmpty;} + const bool occludee_empty() const ; + real z_discontinuity() const ; + // inline float local_average_depth(int iCombination = 0) const ; + // inline float local_depth_variance(int iCombination = 0) const ; + // inline real local_average_density(float sigma = 2.3f, int iCombination = 0) const ; + //inline Vec3r shaded_color(int iCombination = 0) const {} + int viewedge_nature() const ; + //float viewedge_length() const ; + inline Vec3r orientation2d() const {return Vec3r(_VertexB->point2d()-_VertexA->point2d());} + inline Vec3r orientation3d() const {return Vec3r(_VertexB->point3d()-_VertexA->point3d());} + // //inline real curvature2d() const {return viewedge()->curvature2d((_VertexA->point2d()+_VertexB->point2d())/2.0);} + // inline Vec3r curvature2d_as_vector(int iCombination = 0) const ; + // /* angle in degrees*/ + // inline real curvature2d_as_angle(int iCombination = 0) const ; + + + // Iterator access (Interface1D) + /*! Returns an iterator over the 2 (!) SVertex + * pointing to the first SVertex. */ + virtual inline Interface0DIterator verticesBegin(); + /*! Returns an iterator over the 2 (!) SVertex + * pointing after the last SVertex. */ + virtual inline Interface0DIterator verticesEnd(); + + /*! Returns an iterator over the FEdge points, + * pointing to the first point. The difference with + * verticesBegin() is that here we can iterate over + * points of the FEdge at a any given sampling. + * Indeed, for each iteration, a virtual point is created. + * \param t + * The sampling with which we want to iterate over points of + * this FEdge. + */ + virtual inline Interface0DIterator pointsBegin(float t=0.f); + /*! Returns an iterator over the FEdge points, + * pointing after the last point. The difference with + * verticesEnd() is that here we can iterate over + * points of the FEdge at a any given sampling. + * Indeed, for each iteration, a virtual point is created. + * \param t + * The sampling with which we want to iterate over points of + * this FEdge. + */ + virtual inline Interface0DIterator pointsEnd(float t=0.f); +}; + +// +// SVertexIterator +// +///////////////////////////////////////////////// + +namespace FEdgeInternal { + + class SVertexIterator : public Interface0DIteratorNested + { + public: + + SVertexIterator() { + _vertex = NULL; + _edge = NULL; + } + + SVertexIterator(const SVertexIterator& vi) { + _vertex = vi._vertex; + _edge = vi._edge; + } + + SVertexIterator(SVertex* v, FEdge* edge) { + _vertex = v; + _edge = edge; + } + + SVertexIterator& operator=(const SVertexIterator& vi) { + _vertex = vi._vertex; + _edge = vi._edge; + return *this; + } + + virtual string getExactTypeName() const { + return "SVertexIterator"; + } + + virtual SVertex& operator*() { + return *_vertex; + } + + virtual SVertex* operator->() { + return &(operator*()); + } + + virtual SVertexIterator& operator++() { + increment(); + return *this; + } + + virtual SVertexIterator operator++(int) { + SVertexIterator ret(*this); + increment(); + return ret; + } + + virtual SVertexIterator& operator--() { + decrement(); + return *this; + } + + virtual SVertexIterator operator--(int) { + SVertexIterator ret(*this); + decrement(); + return ret; + } + + virtual void increment() { + if (_vertex == _edge->vertexB()) { + _vertex = 0; + return; + } + + _vertex = _edge->vertexB(); + } + + virtual void decrement() { + if (_vertex == _edge->vertexA()) { + _vertex = 0; + return; + } + _vertex = _edge->vertexA(); + } + + virtual bool isBegin() const { + return _vertex == _edge->vertexA(); + } + + virtual bool isEnd() const { + return _vertex == _edge->vertexB(); + } + + virtual bool operator==(const Interface0DIteratorNested& it) const { + const SVertexIterator* it_exact = dynamic_cast(&it); + if (!it_exact) + return false; + return ((_vertex == it_exact->_vertex) && + (_edge == it_exact->_edge)); + } + + virtual float t() const{ + if(_vertex == _edge->vertexA()){ + return 0; + } + return ((float)_edge->getLength2D()); + } + virtual float u() const{ + if(_vertex == _edge->vertexA()){ + return 0; + } + return 1.0; + } + virtual SVertexIterator* copy() const { + return new SVertexIterator(*this); + } + + private: + + SVertex* _vertex; + FEdge* _edge; + }; + +} // end of namespace FEdgeInternal + +// Iterator access (implementation) + +Interface0DIterator FEdge::verticesBegin() { + Interface0DIterator ret(new FEdgeInternal::SVertexIterator(_VertexA, this)); + return ret; +} + +Interface0DIterator FEdge::verticesEnd() { + Interface0DIterator ret(new FEdgeInternal::SVertexIterator(0, this)); + return ret; +} + +Interface0DIterator FEdge::pointsBegin(float t) { + return verticesBegin(); +} + +Interface0DIterator FEdge::pointsEnd(float t) { + return verticesEnd(); +} + +/*! Class defining a sharp FEdge. A Sharp FEdge + * corresponds to an initial edge of the input mesh. + * It can be a silhouette, a crease or a border. + * If it is a crease edge, then it is borded + * by two faces of the mesh. Face a lies on its right + * whereas Face b lies on its left. + * If it is a border edge, then it doesn't have any + * face on its right, and thus Face a = 0. + */ +class LIB_VIEW_MAP_EXPORT FEdgeSharp : public FEdge +{ +protected: + Vec3r _aNormal; // When following the edge, normal of the right face + Vec3r _bNormal; // When following the edge, normal of the left face + unsigned _aMaterialIndex; + unsigned _bMaterialIndex; + +public: + /*! Default constructor. */ + inline FEdgeSharp() : FEdge(){ + _aMaterialIndex = _bMaterialIndex = 0; + } + /*! Builds an FEdgeSharp going from vA to vB. */ + inline FEdgeSharp(SVertex *vA, SVertex *vB) : FEdge(vA, vB){ + _aMaterialIndex = _bMaterialIndex = 0; + } + /*! Copy constructor. */ + inline FEdgeSharp(FEdgeSharp& iBrother) : FEdge(iBrother){ + _aNormal = iBrother._aNormal; + _bNormal = iBrother._bNormal; + _aMaterialIndex = iBrother._aMaterialIndex; + _bMaterialIndex = iBrother._bMaterialIndex; + } + /*! Destructor. */ + virtual ~FEdgeSharp() {} + /*! Cloning method. */ + virtual FEdge* dupplicate(){ + FEdge *clone = new FEdgeSharp(*this); + return clone; + } + /*! Returns the normal to the face lying on the + * right of the FEdge. If this FEdge is a border, + * it has no Face on its right and therefore, no normal. + */ + inline const Vec3r& normalA() {return _aNormal;} + /*! Returns the normal to the face lying on the + * left of the FEdge. + */ + inline const Vec3r& normalB() {return _bNormal;} + /*! Returns the index of the material of the face lying on the + * right of the FEdge. If this FEdge is a border, + * it has no Face on its right and therefore, no material. + */ + inline unsigned aMaterialIndex() const {return _aMaterialIndex;} + /*! Returns the material of the face lying on the + * right of the FEdge. If this FEdge is a border, + * it has no Face on its right and therefore, no material. + */ + const Material& aMaterial() const ; + /*! Returns the index of the material of the face lying on the + * left of the FEdge. + */ + inline unsigned bMaterialIndex() const {return _bMaterialIndex;} + /*! Returns the material of the face lying on the + * left of the FEdge. + */ + const Material& bMaterial() const ; + + /*! Sets the normal to the face lying on the right of the FEdge. */ + inline void SetNormalA(const Vec3r& iNormal) {_aNormal = iNormal;} + /*! Sets the normal to the face lying on the left of the FEdge. */ + inline void SetNormalB(const Vec3r& iNormal) {_bNormal = iNormal;} + /*! Sets the index of the material lying on the right of the FEdge.*/ + inline void SetaMaterialIndex(unsigned i) {_aMaterialIndex = i;} + /*! Sets the index of the material lying on the left of the FEdge.*/ + inline void SetbMaterialIndex(unsigned i) {_bMaterialIndex = i;} + +}; + +/*! Class defining a smooth edge. This kind of edge typically + * runs across a face of the input mesh. It can be + * a silhouette, a ridge or valley, a suggestive contour. + */ +class LIB_VIEW_MAP_EXPORT FEdgeSmooth : public FEdge +{ +protected: + Vec3r _Normal; + unsigned _MaterialIndex; + // bool _hasVisibilityPoint; + // Vec3r _VisibilityPointA; // The edge on which the visibility will be computed represented + // Vec3r _VisibilityPointB; // using its 2 extremity points A and B + void * _Face; // In case of exact silhouette, Face is the WFace crossed by Fedge + // NON GERE PAR LE COPY CONSTRUCTEUR +public: + /*! Default constructor. */ + inline FEdgeSmooth() : FEdge(){ + _Face=0; + _MaterialIndex = 0; + _isSmooth = true; + } + /*! Builds an FEdgeSmooth going from vA to vB. */ + inline FEdgeSmooth(SVertex *vA, SVertex *vB) : FEdge(vA, vB){ + _Face=0; + _MaterialIndex = 0; + _isSmooth = true; + + } + /*! Copy constructor. */ + inline FEdgeSmooth(FEdgeSmooth& iBrother) : FEdge(iBrother){ + _Normal = iBrother._Normal; + _Face = iBrother._Face; + _MaterialIndex = iBrother._MaterialIndex; + _isSmooth = true; + } + /*! Destructor. */ + virtual ~FEdgeSmooth() {} + /*! Cloning method. */ + virtual FEdge* dupplicate(){ + FEdge *clone = new FEdgeSmooth(*this); + return clone; + } + + inline void * face() const {return _Face;} + /*! Returns the normal to the Face it is running accross. */ + inline const Vec3r& normal() {return _Normal;} + /*! Returns the index of the material of the face it is running accross. */ + inline unsigned materialIndex() const {return _MaterialIndex;} + /*! Returns the material of the face it is running accross. */ + const Material& material() const ; + + inline void SetFace(void * iFace) {_Face = iFace;} + /*! Sets the normal to the Face it is running accross. */ + inline void SetNormal(const Vec3r& iNormal) {_Normal = iNormal;} + /*! Sets the index of the material of the face it is running accross. */ + inline void SetMaterialIndex(unsigned i) {_MaterialIndex = i;} +}; + /**********************************/ + /* */ + /* */ + /* SShape */ + /* */ + /* */ + /**********************************/ + + +/*! Class to define a feature shape. It is the gathering + * of feature elements from an identified input shape + */ +class LIB_VIEW_MAP_EXPORT SShape +{ +private: + vector _chains; // list of fedges that are chains starting points. + vector _verticesList; // list of all vertices + vector _edgesList; // list of all edges + Id _Id; + BBox _BBox; + vector _Materials; + + float _importance; + + ViewShape *_ViewShape; + +public: + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void* userdata; // added by E.T. + /*! Default constructor */ + inline SShape() + { + userdata = 0; + + _importance = 0.f; + _ViewShape = 0; + } + /*! Copy constructor */ + inline SShape(SShape& iBrother) + { + userdata = 0; + _Id = iBrother._Id; + _BBox = iBrother.bbox(); + _Materials = iBrother._Materials; + + _importance = iBrother._importance; + + _ViewShape = iBrother._ViewShape; + + + //--------- + // vertices + //--------- + vector::iterator sv,svend; + vector& verticesList = iBrother.GetVertexList(); + for(sv=verticesList.begin(), svend=verticesList.end(); + sv!=svend; + sv++) + { + SVertex *newv = new SVertex(*(*sv)); + newv->SetShape(this); + _verticesList.push_back(newv); + } + + //------ + // edges + //------ + vector::iterator e,eend; + vector& edgesList = iBrother.GetEdgeList(); + for(e=edgesList.begin(),eend=edgesList.end(); + e!=eend; + e++) + { + FEdge *newe = (*e)->dupplicate(); + _edgesList.push_back(newe); + } + + //------------------------- + // starting chain edges + //------------------------- + vector::iterator fe,fend; + vector& fedges = iBrother.GetChains(); + for(fe=fedges.begin(),fend=fedges.end(); + fe!=fend; + fe++) + { + _chains.push_back((FEdge*)((*fe)->userdata)); + } + + + //------------------------- + // remap edges in vertices: + //------------------------- + for(sv=_verticesList.begin(),svend=_verticesList.end(); + sv!=svend; + sv++) + { + const vector& fedgeList = (*sv)->fedges(); + vector newfedgelist; + for(vector::const_iterator fed=fedgeList.begin(),fedend=fedgeList.end(); + fed!=fedend; + fed++) + { + FEdge *current = *fed; + newfedgelist.push_back((FEdge*)current->userdata); + } + (*sv)->SetFEdges(newfedgelist); + } + + //------------------------------------- + // remap vertices and nextedge in edges: + //------------------------------------- + for(e=_edgesList.begin(),eend=_edgesList.end(); + e!=eend; + e++) + { + (*e)->SetVertexA((SVertex*)((*e)->vertexA()->userdata)); + (*e)->SetVertexB((SVertex*)((*e)->vertexB()->userdata)); + (*e)->SetNextEdge((FEdge*)((*e)->nextEdge()->userdata)); + (*e)->SetPreviousEdge((FEdge*)((*e)->previousEdge()->userdata)); + } + + + // reset all brothers userdata to NULL: + //------------------------------------- + //--------- + // vertices + //--------- + for(sv=_verticesList.begin(),svend=_verticesList.end(); + sv!=svend; + sv++) + { + (*sv)->userdata = NULL; + } + + //------ + // edges + //------ + for(e=_edgesList.begin(),eend=_edgesList.end(); + e!=eend; + e++) + { + (*e)->userdata = NULL; + } + } + /*! Cloning method. */ + virtual SShape * dupplicate() + { + SShape *clone = new SShape(*this); + return clone; + } + /*! Destructor. */ + virtual inline ~SShape() + { + vector::iterator sv,svend; + vector::iterator e,eend; + if(0 != _verticesList.size()) + { + for(sv=_verticesList.begin(),svend=_verticesList.end(); + sv!=svend; + sv++) + { + delete (*sv); + } + _verticesList.clear(); + } + + if(0 != _edgesList.size()) + { + for(e=_edgesList.begin(),eend=_edgesList.end(); + e!=eend; + e++) + { + delete (*e); + } + _edgesList.clear(); + } + + //! Clear the chains list + //----------------------- + if(0 != _chains.size()) + { + _chains.clear(); + } + } + + /*! Adds a FEdge to the list of FEdges. */ + inline void AddEdge(FEdge *iEdge) + { + _edgesList.push_back(iEdge); + } + + /*! Adds a SVertex to the list of SVertex of this Shape. + * The SShape attribute of the SVertex is also set to 'this'. + */ + inline void AddNewVertex(SVertex* iv) {iv->SetShape(this);_verticesList.push_back(iv);} + inline void AddChain(FEdge *iEdge){ + _chains.push_back(iEdge); + } + + inline SVertex * CreateSVertex(const Vec3r& P3D, const Vec3r& P2D, const Id& id) + { + SVertex *Ia = new SVertex(P3D, id); + Ia->SetPoint2D(P2D); + AddNewVertex(Ia); + return Ia; + } + /* splits an edge into several edges. + * The edge's vertices are passed rather than + * the edge itself. This way, all feature edges (SILHOUETTE, + * CREASE, BORDER) are splitted in the same time. + * The processed edges are flagged as done (using the userdata + * flag).One single new vertex is created whereas + * several splitted edges might created for the different + * kinds of edges. These new elements are added to the lists + * maintained by the shape. + * new chains are also created. + * ioA + * The first vertex for the edge that gets splitted + * ioB + * The second vertex for the edge that gets splitted + * iParameters + * A vector containing 2D real vectors indicating the parameters + * giving the intersections coordinates in 3D and in 2D. + * These intersections points must be sorted from B to A. + * Each parameter defines the intersection point I as I=A+T*AB. + * T<0 and T>1 are then incorrect insofar as they give intersections + * points that lie outside the segment. + * ioNewEdges + * The edges that are newly created (the initial edges are not + * included) are added to this list. + */ + inline void SplitEdge(FEdge *fe, const vector& iParameters, vector& ioNewEdges) + { + + SVertex *ioA = fe->vertexA(); + SVertex *ioB = fe->vertexB(); + Vec3r A = ioA->point3D(); + Vec3r B = ioB->point3D(); + Vec3r a = ioA->point2D(); + Vec3r b = ioB->point2D(); + SVertex *svA, *svB; + + Vec3r newpoint3d,newpoint2d; + vector intersections; + real t,T; + for(vector::const_iterator p=iParameters.begin(),pend=iParameters.end(); + p!=pend; + p++) + { + T=(*p)[0]; + t=(*p)[1]; + + if((t < 0) || (t > 1)) + cerr << "Warning: Intersection out of range for edge " << ioA->getId() << " - " << ioB->getId() << endl; + + // compute the 3D and 2D coordinates for the intersections points: + newpoint3d = Vec3r(A + T*(B-A)); + newpoint2d = Vec3r(a + t*(b-a)); + + // create new SVertex: + // (we keep B's id) + SVertex* newVertex = new SVertex(newpoint3d, ioB->getId()); + newVertex->SetPoint2D(newpoint2d); + + // Add this vertex to the intersections list: + intersections.push_back(newVertex); + + // Add this vertex to this sshape: + AddNewVertex(newVertex); + } + + for(vector::iterator sv=intersections.begin(),svend=intersections.end(); + sv!=svend; + sv++) + { + svA = fe->vertexA(); + svB = fe->vertexB(); + + // We split edge AB into AA' and A'B. A' and A'B are created. + // AB becomes (address speaking) AA'. B is updated. + //-------------------------------------------------- + // The edge AB becomes edge AA'. + (fe)->SetVertexB((*sv)); + // a new edge, A'B is created. + FEdge *newEdge; + if(fe->isSmooth()){ + newEdge = new FEdgeSmooth((*sv), svB); + FEdgeSmooth * se = dynamic_cast(newEdge); + FEdgeSmooth * fes = dynamic_cast(fe); + se->SetMaterialIndex(fes->materialIndex()); + }else{ + newEdge = new FEdgeSharp((*sv), svB); + FEdgeSharp * se = dynamic_cast(newEdge); + FEdgeSharp * fes = dynamic_cast(fe); + se->SetaMaterialIndex(fes->aMaterialIndex()); + se->SetbMaterialIndex(fes->bMaterialIndex()); + } + + newEdge->SetNature((fe)->getNature()); + + + // to build a new chain: + AddChain(newEdge); + // add the new edge to the sshape edges list. + AddEdge(newEdge); + // add new edge to the list of new edges passed as argument: + ioNewEdges.push_back(newEdge); + + // update edge A'B for the next pointing edge + newEdge->SetNextEdge((fe)->nextEdge()); + fe->nextEdge()->SetPreviousEdge(newEdge); + Id id(fe->getId().getFirst(), fe->getId().getSecond()+1); + newEdge->SetId(fe->getId()); + fe->SetId(id); + + // update edge AA' for the next pointing edge + //ioEdge->SetNextEdge(newEdge); + (fe)->SetNextEdge(NULL); + + // update vertex pointing edges list: + // -- vertex B -- + svB->Replace((fe), newEdge); + // -- vertex A' -- + (*sv)->AddFEdge((fe)); + (*sv)->AddFEdge(newEdge); + } + + } + + /* splits an edge into 2 edges. The new vertex and edge are added + * to the sshape list of vertices and edges + * a new chain is also created. + * returns the new edge. + * ioEdge + * The edge that gets splitted + * newpoint + * x,y,z coordinates of the new point. + */ + inline FEdge* SplitEdgeIn2(FEdge* ioEdge, SVertex * ioNewVertex) + { + SVertex *A = ioEdge->vertexA(); + SVertex *B = ioEdge->vertexB(); + + + // We split edge AB into AA' and A'B. A' and A'B are created. + // AB becomes (address speaking) AA'. B is updated. + //-------------------------------------------------- + + // a new edge, A'B is created. + FEdge *newEdge; + if(ioEdge->isSmooth()){ + newEdge = new FEdgeSmooth(ioNewVertex, B); + FEdgeSmooth * se = dynamic_cast(newEdge); + FEdgeSmooth * fes = dynamic_cast(ioEdge); + se->SetMaterialIndex(fes->materialIndex()); + }else{ + newEdge = new FEdgeSharp(ioNewVertex, B); + FEdgeSharp * se = dynamic_cast(newEdge); + FEdgeSharp * fes = dynamic_cast(ioEdge); + se->SetaMaterialIndex(fes->aMaterialIndex()); + se->SetbMaterialIndex(fes->bMaterialIndex()); + } + newEdge->SetNature(ioEdge->getNature()); + + + if(ioEdge->nextEdge() != 0) + ioEdge->nextEdge()->SetPreviousEdge(newEdge); + + // update edge A'B for the next pointing edge + newEdge->SetNextEdge(ioEdge->nextEdge()); + // update edge A'B for the previous pointing edge + newEdge->SetPreviousEdge(0); // because it is now a TVertex + Id id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond()+1); + newEdge->SetId(ioEdge->getId()); + ioEdge->SetId(id); + + // update edge AA' for the next pointing edge + ioEdge->SetNextEdge(0); // because it is now a TVertex + + // update vertex pointing edges list: + // -- vertex B -- + B->Replace(ioEdge, newEdge); + // -- vertex A' -- + ioNewVertex->AddFEdge(ioEdge); + ioNewVertex->AddFEdge(newEdge); + + // to build a new chain: + AddChain(newEdge); + AddEdge(newEdge); // FIXME ?? + + // The edge AB becomes edge AA'. + ioEdge->SetVertexB(ioNewVertex); + + if(ioEdge->isSmooth()){ + ((FEdgeSmooth*)newEdge)->SetFace(((FEdgeSmooth*)ioEdge)->face()); + } + + return newEdge; + } + + /*! Sets the Bounding Box of the Shape */ + inline void SetBBox(const BBox& iBBox) {_BBox = iBBox;} + + /*! Compute the bbox of the sshape */ + inline void ComputeBBox() + { + if(0 == _verticesList.size()) + return; + + Vec3r firstVertex = _verticesList[0]->point3D(); + real XMax = firstVertex[0]; + real YMax = firstVertex[1]; + real ZMax = firstVertex[2]; + + real XMin = firstVertex[0]; + real YMin = firstVertex[1]; + real ZMin = firstVertex[2]; + + vector::iterator v,vend; + // parse all the coordinates to find + // the Xmax, YMax, ZMax + for(v=_verticesList.begin(),vend=_verticesList.end(); + v!=vend; + v++) + { + Vec3r vertex = (*v)->point3D(); + // X + real x = vertex[0]; + if(x > XMax) + XMax = x; + if(x < XMin) + XMin = x; + + // Y + real y = vertex[1]; + if(y > YMax) + YMax = y; + if(y < YMin) + YMin = y; + + // Z + real z = vertex[2]; + if(z > ZMax) + ZMax = z; + if(z < ZMin) + ZMin = z; + } + + + SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); + } + + inline void RemoveEdgeFromChain(FEdge *iEdge) + { + for(vector::iterator fe=_chains.begin(), feend=_chains.end(); + fe!=feend; + fe++) + { + if(iEdge == (*fe)) + { + _chains.erase(fe); + break; + } + } + } + + inline void RemoveEdge(FEdge *iEdge) + { + for(vector::iterator fe=_edgesList.begin(), feend=_edgesList.end(); + fe!=feend; + fe++) + { + if(iEdge == (*fe)) + { + _edgesList.erase(fe); + break; + } + } + } + + /* accessors */ + /*! Returns the list of SVertex of the Shape. */ + inline vector& GetVertexList() {return _verticesList;} // Get vertices list + /*! Returns the list of FEdges of the Shape. */ + inline vector& GetEdgeList() {return _edgesList;} // Get edges list + inline vector& GetChains() {return _chains;} + /*! Returns the bounding box of the shape. */ + inline const BBox& bbox() {return _BBox;} + /*! Returns the ith material of the shape. */ + inline const Material& material(unsigned i) const {return _Materials[i];} + /*! Returns the list of materials of the Shape. */ + inline const vector& materials() const {return _Materials;} + inline ViewShape * viewShape() {return _ViewShape;} + inline float importance() const {return _importance;} + /*! Returns the Id of the Shape. */ + inline Id getId() const { return _Id; } + + /* Modififers */ + /*! Sets the Id of the shape.*/ + inline void SetId(Id id) {_Id = id;} + /*! Sets the list of materials for the shape */ + inline void SetMaterials(const vector& iMaterials) {_Materials = iMaterials;} + inline void SetViewShape(ViewShape *iShape) {_ViewShape = iShape;} + inline void SetImportance(float importance){_importance = importance;} +}; + +#endif // SILHOUETTE_H diff --git a/extern/freestyle/src/view_map/SilhouetteGeomEngine.cpp b/extern/freestyle/src/view_map/SilhouetteGeomEngine.cpp new file mode 100755 index 00000000000..19b8a632ffe --- /dev/null +++ b/extern/freestyle/src/view_map/SilhouetteGeomEngine.cpp @@ -0,0 +1,185 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "SilhouetteGeomEngine.h" +#include "Silhouette.h" +#include "../geometry/GeomUtils.h" + +using namespace std; + +Vec3r SilhouetteGeomEngine::_Viewpoint = Vec3r(0,0,0); +real SilhouetteGeomEngine::_translation[3] = {0,0,0}; +real SilhouetteGeomEngine::_modelViewMatrix[4][4] = {{1,0,0,0}, + {0,1,0,0}, + {0,0,1,0}, + {0,0,0,1}}; +real SilhouetteGeomEngine::_projectionMatrix[4][4] = {{1,0,0,0}, + {0,1,0,0}, + {0,0,1,0}, + {0,0,0,1}}; +real SilhouetteGeomEngine::_transform[4][4] = {{1,0,0,0}, + {0,1,0,0}, + {0,0,1,0}, + {0,0,0,1}}; +int SilhouetteGeomEngine::_viewport[4] = {1,1,1,1}; // the viewport +real SilhouetteGeomEngine::_Focal = 0.0; + +real SilhouetteGeomEngine::_glProjectionMatrix[4][4] = {{1,0,0,0}, + {0,1,0,0}, + {0,0,1,0}, + {0,0,0,1}}; +real SilhouetteGeomEngine::_glModelViewMatrix[4][4] = {{1,0,0,0}, + {0,1,0,0}, + {0,0,1,0}, + {0,0,0,1}}; +real SilhouetteGeomEngine::_znear = 0.0; +real SilhouetteGeomEngine::_zfar = 100.0; + +SilhouetteGeomEngine * SilhouetteGeomEngine::_pInstance = 0; + +void SilhouetteGeomEngine::SetTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) +{ + unsigned int i,j; + _translation[0] = iModelViewMatrix[3][0]; + _translation[1] = iModelViewMatrix[3][1]; + _translation[2] = iModelViewMatrix[3][2]; + + for(i=0; i<4; i++){ + for(j=0; j<4; j++) + { + _modelViewMatrix[i][j] = iModelViewMatrix[j][i]; + _glModelViewMatrix[i][j] = iModelViewMatrix[i][j]; + } + } + + for(i=0; i<4; i++){ + for(j=0; j<4; j++) + { + _projectionMatrix[i][j] = iProjectionMatrix[j][i]; + _glProjectionMatrix[i][j] = iProjectionMatrix[i][j]; + } + } + + for(i=0; i<4; i++){ + for(j=0; j<4; j++) + { + _transform[i][j] = 0; + for(unsigned int k=0; k<4; k++) + _transform[i][j] += _projectionMatrix[i][k] * _modelViewMatrix[k][j]; + } + } + + for(i=0; i<4; i++){ + _viewport[i] = iViewport[i]; + } + _Focal = iFocal; +} + +void SilhouetteGeomEngine::SetFrustum(real iZNear, real iZFar) +{ + _znear = iZNear; + _zfar = iZFar; +} + +void SilhouetteGeomEngine::retrieveViewport(int viewport[4]){ + memcpy(viewport, _viewport, 4*sizeof(int)); +} +//#define HUGE 1e9 + +void SilhouetteGeomEngine::ProjectSilhouette(vector& ioVertices) +{ + Vec3r newPoint; + // real min=HUGE; + // real max=-HUGE; + vector::iterator sv, svend; + + for(sv=ioVertices.begin(), svend=ioVertices.end(); + sv!=svend; + sv++) + { + GeomUtils::fromWorldToImage((*sv)->point3D(), newPoint, _modelViewMatrix, _projectionMatrix, _viewport); + newPoint[2] = (-newPoint[2]-_znear)/(_zfar-_znear); // normalize Z between 0 and 1 + (*sv)->SetPoint2D(newPoint); + //cerr << (*sv)->point2d().z() << " "; + // real d=(*sv)->point2d()[2]; + // if (d>max) max =d; + // if (dpoint2d()); + // (*sv)->SetPoint2D(Vec3r(P[0], P[1], 1.0-(P[2]-min)/(max-min))); + // //cerr<<(*sv)->point2d()[2]<<" "; + // } +} + +void SilhouetteGeomEngine::ProjectSilhouette(SVertex* ioVertex) +{ + Vec3r newPoint; + // real min=HUGE; + // real max=-HUGE; + vector::iterator sv, svend; + GeomUtils::fromWorldToImage(ioVertex->point3D(), newPoint, _modelViewMatrix, _projectionMatrix, _viewport); + newPoint[2] = (-newPoint[2]-_znear)/(_zfar-_znear); // normalize Z between 0 and 1 + ioVertex->SetPoint2D(newPoint); +} + +real SilhouetteGeomEngine::ImageToWorldParameter(FEdge *fe, real t) +{ + // we need to compute for each parameter t the corresponding + // parameter T which gives the intersection in 3D. + //currentEdge = (*fe); + Vec3r A = (fe)->vertexA()->point3D(); + Vec3r B = (fe)->vertexB()->point3D(); + Vec3r Ai = (fe)->vertexA()->point2D(); + Vec3r Bi = (fe)->vertexB()->point2D(); + Vec3r AB = Vec3r((B-A)); // the edge + Vec3r ABi(Bi-Ai); + Vec3r Ac, Bc; + GeomUtils::fromWorldToCamera(A, Ac, _modelViewMatrix); + GeomUtils::fromWorldToCamera(B, Bc, _modelViewMatrix); + + Vec3r Ii = Vec3r((Ai+t*ABi)); // I image + // let us compute the 3D point corresponding to the 2D intersection point + // and lying on the edge: + Vec3r Ir, Ic; + GeomUtils::fromImageToRetina(Ii, Ir, _viewport); + GeomUtils::fromRetinaToCamera(Ir, Ic, -_Focal, _projectionMatrix); + + real T; + T = (Ic[2]*Ac[1] - Ic[1]*Ac[2])/(Ic[1]*(Bc[2]-Ac[2])-Ic[2]*(Bc[1]-Ac[1])); + + return T; +} + +Vec3r SilhouetteGeomEngine::WorldToImage(const Vec3r& M) + +{ + + Vec3r newPoint; + GeomUtils::fromWorldToImage(M, newPoint, _transform, _viewport); + newPoint[2] = (-newPoint[2]-_znear)/(_zfar-_znear); // normalize Z between 0 and 1 + return newPoint; + +} + diff --git a/extern/freestyle/src/view_map/SilhouetteGeomEngine.h b/extern/freestyle/src/view_map/SilhouetteGeomEngine.h new file mode 100755 index 00000000000..159dda1afc0 --- /dev/null +++ b/extern/freestyle/src/view_map/SilhouetteGeomEngine.h @@ -0,0 +1,122 @@ +// +// Filename : SilhouetteGeomEngine.h +// Author(s) : Stephane Grabli +// Purpose : Class to perform all geometric operations dedicated +// to silhouette. That, for example, implies that +// this geom engine has as member data the viewpoint, +// transformations, projections... +// Date of creation : 03/09/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef SILHOUETTEGEOMENGINE_H +# define SILHOUETTEGEOMENGINE_H + +# include +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" + +using namespace Geometry; + +class SVertex; +class FEdge; + +class LIB_VIEW_MAP_EXPORT SilhouetteGeomEngine +{ +private: + static Vec3r _Viewpoint; // The viewpoint under which the silhouette has to be computed + static real _translation[3]; + static real _modelViewMatrix[4][4]; // the model view matrix (_modelViewMatrix[i][j] means element of line i and column j) + static real _projectionMatrix[4][4]; // the projection matrix (_projectionMatrix[i][j] means element of line i and column j) + static real _transform[4][4]; // the global transformation from world to screen (projection included) (_transform[i][j] means element of line i and column j) + static int _viewport[4]; // the viewport + static real _Focal; + + static real _znear; + static real _zfar; + + static real _glProjectionMatrix[4][4]; // GL style (column major) projection matrix + static real _glModelViewMatrix[4][4]; // GL style (column major) model view matrix + + + + static SilhouetteGeomEngine *_pInstance; +public: + + /*! retrieves an instance on the singleton */ + static SilhouetteGeomEngine * getInstance() + { + if(0 == _pInstance) + { + _pInstance = new SilhouetteGeomEngine; + } + return _pInstance; + } + + /*! Sets the current viewpoint */ + static inline void SetViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} + + /*! Sets the current transformation + * iModelViewMatrix + * The 4x4 model view matrix, in column major order (openGL like). + * iProjection matrix + * The 4x4 projection matrix, in column major order (openGL like). + * iViewport + * The viewport. 4 real array: origin.x, origin.y, width, length + * iFocal + * The focal length + */ + static void SetTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) ; + + /*! Sets the current znear and zfar + */ + static void SetFrustum(real iZNear, real iZFar) ; + + /* accessors */ + static void retrieveViewport(int viewport[4]); + + /*! Projects the silhouette in camera coordinates + * This method modifies the ioEdges passed as argument. + * ioVertices + * The vertices to project. It is modified during the + * operation. + */ + static void ProjectSilhouette(std::vector& ioVertices); + static void ProjectSilhouette(SVertex* ioVertex); + + /*! transforms the parameter t defining a 2D intersection for edge fe in order to obtain + * the parameter giving the corresponding 3D intersection. + * Returns the 3D parameter + * fe + * The edge + * t + * The parameter for the 2D intersection. + */ + static real ImageToWorldParameter(FEdge *fe, real t); + + /*! From world to image */ + static Vec3r WorldToImage(const Vec3r& M); +}; + +#endif // SILHOUETTEGEOMENGINE_H diff --git a/extern/freestyle/src/view_map/SteerableViewMap.cpp b/extern/freestyle/src/view_map/SteerableViewMap.cpp new file mode 100755 index 00000000000..b2604606aa7 --- /dev/null +++ b/extern/freestyle/src/view_map/SteerableViewMap.cpp @@ -0,0 +1,243 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "SteerableViewMap.h" +#include "../image/ImagePyramid.h" +#include "../image/Image.h" +#include "Silhouette.h" +#include +#include "../geometry/Geom.h" +using namespace Geometry; + +#include +#include + +SteerableViewMap::SteerableViewMap(unsigned int nbOrientations){ + _nbOrientations = nbOrientations; + _bound = cos(M_PI/(float)_nbOrientations); + for(unsigned i=0; i<_nbOrientations; ++i){ + _directions.push_back(Vec2d(cos((float)i*M_PI/(float)_nbOrientations), sin((float)i*M_PI/(float)_nbOrientations))); + } + Build(); +} + +void SteerableViewMap::Build(){ + _imagesPyramids = new ImagePyramid*[_nbOrientations+1]; // one more map to store the complete visible VM + memset((_imagesPyramids),0,(_nbOrientations+1)*sizeof(ImagePyramid*)); +} + +SteerableViewMap::SteerableViewMap(const SteerableViewMap& iBrother){ + _nbOrientations = iBrother._nbOrientations; + unsigned i; + _bound = iBrother._bound; + _directions = iBrother._directions; + _mapping = iBrother._mapping; + _imagesPyramids = new ImagePyramid*[_nbOrientations+1]; // one more map to store the complete visible VM + for(i=0;i<_nbOrientations+1;++i) + _imagesPyramids[i] = new GaussianPyramid(*(dynamic_cast(iBrother._imagesPyramids[i]))); +} + +SteerableViewMap::~SteerableViewMap(){ + Clear(); +} + +void SteerableViewMap::Clear(){ + unsigned i; + if(_imagesPyramids){ + for(i=0; i<=_nbOrientations; ++i){ + if(_imagesPyramids[i]) + delete (_imagesPyramids)[i]; + } + delete [] _imagesPyramids; + _imagesPyramids = 0; + } + if(!_mapping.empty()){ + for(map::iterator m=_mapping.begin(), mend=_mapping.end(); + m!=mend; + ++m){ + delete [] (*m).second; + } + _mapping.clear(); + } +} + +void SteerableViewMap::Reset(){ + Clear(); + Build(); +} + +double SteerableViewMap::ComputeWeight(const Vec2d& dir, unsigned i){ + double dotp = fabs(dir*_directions[i]); + if(dotp < _bound) + return 0; + if(dotp>1) + dotp = 1; + + return cos((float)_nbOrientations/2.0*acos(dotp)); +} + +double * SteerableViewMap::AddFEdge(FEdge *iFEdge){ + unsigned i; + unsigned id = iFEdge->getId().getFirst(); + map::iterator o = _mapping.find(id); + if(o!=_mapping.end()){ + return (*o).second; + } + double * res = new double[_nbOrientations]; + for(i=0; i<_nbOrientations; ++i){ + res[i] = 0; + } + Vec3r o2d3 = iFEdge->orientation2d(); + Vec2r o2d2(o2d3.x(), o2d3.y()); + real norm = o2d2.norm(); + if(norm < 1e-6){ + return res; + } + o2d2/=norm; + + for(i=0; i<_nbOrientations; ++i){ + res[i] = ComputeWeight(o2d2, i); + } + _mapping[id] = res; + return res; +} + +unsigned SteerableViewMap::getSVMNumber(const Vec2f& orient){ + Vec2f dir(orient); + unsigned res = 0; + real norm = dir.norm(); + if(norm < 1e-6){ + return _nbOrientations+1; + } + dir/=norm; + double maxw = 0.f; + unsigned winner = _nbOrientations+1; + for(unsigned i=0; i<_nbOrientations; ++i){ + double w = ComputeWeight(dir, i); + if(w>maxw){ + maxw = w; + winner = i; + } + } + return winner; +} + + +unsigned SteerableViewMap::getSVMNumber(unsigned id){ + map::iterator o = _mapping.find(id); + if(o!=_mapping.end()){ + double* wvalues= (*o).second; + double maxw = 0.f; + unsigned winner = _nbOrientations+1; + for(unsigned i=0; i<_nbOrientations; ++i){ + double w = wvalues[i]; + if(w>maxw){ + maxw = w; + winner = i; + } + } + return winner; + } + return _nbOrientations+1; +} + +void SteerableViewMap::buildImagesPyramids(GrayImage **steerableBases, bool copy, unsigned iNbLevels, float iSigma){ + for(unsigned i=0; i<=_nbOrientations; ++i){ + ImagePyramid * svm = (_imagesPyramids)[i]; + if(svm) + delete svm; + if(copy) + svm = new GaussianPyramid(*(steerableBases[i]), iNbLevels, iSigma); + else + svm = new GaussianPyramid(steerableBases[i], iNbLevels, iSigma); + _imagesPyramids[i] = svm; + } +} + +float SteerableViewMap::readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y){ + ImagePyramid *pyramid = _imagesPyramids[iOrientation]; + if(pyramid==0){ + cout << "Warning: this steerable ViewMap level doesn't exist" << endl; + return 0; + } + if((x<0) || (x>=pyramid->width()) || (y<0) || (y>=pyramid->height())) + return 0; + //float v = pyramid->pixel(x,pyramid->height()-1-y,iLevel)*255.f; + float v = pyramid->pixel(x,pyramid->height()-1-y,iLevel)/32.f; // we encode both the directionality and the lines counting on 8 bits + // (because of frame buffer). Thus, we allow until 8 lines to pass through + // the same pixel, so that we can discretize the Pi/_nbOrientations angle into + // 32 slices. Therefore, for example, in the vertical direction, a vertical line + // will have the value 32 on each pixel it passes through. + return v; +} + +float SteerableViewMap::readCompleteViewMapPixel(int iLevel, int x, int y){ + return readSteerableViewMapPixel(_nbOrientations,iLevel,x,y); +} + +unsigned int SteerableViewMap::getNumberOfPyramidLevels() const{ + if(_imagesPyramids[0]) + return _imagesPyramids[0]->getNumberOfLevels(); + return 0; +} +void SteerableViewMap::saveSteerableViewMap() const { + for(unsigned i=0; i<=_nbOrientations; ++i){ + if(_imagesPyramids[i] == 0){ + cerr << "SteerableViewMap warning: orientation " << i <<" of steerable View Map whas not been computed yet" << endl; + continue; + } + int ow = _imagesPyramids[i]->width(0); + int oh = _imagesPyramids[i]->height(0); + QString base("SteerableViewMap"); + for(unsigned j=0; j<_imagesPyramids[i]->getNumberOfLevels(); ++j){ + float coeff = 1;//1/255.f; //100*255;//*pow(2,j); + QImage qtmp(ow, oh, QImage::Format_RGB32); + for(unsigned y=0;ypixel(x,y,j)); + if(c>255) + c=255; + //int c = (int)(_imagesPyramids[i]->pixel(x,y,j)); + qtmp.setPixel(x,y,qRgb(c,c,c)); + } + } + qtmp.save(base+QString::number(i)+"-"+QString::number(j)+".png", "PNG"); + } + // QString base("SteerableViewMap"); + // for(unsigned j=0; j<_imagesPyramids[i]->getNumberOfLevels(); ++j){ + // GrayImage * img = _imagesPyramids[i]->getLevel(j); + // int ow = img->width(); + // int oh = img->height(); + // float coeff = 1; //100*255;//*pow(2,j); + // QImage qtmp(ow, oh, 32); + // for(unsigned y=0;ypixel(x,y)); + // if(c>255) + // c=255; + // //int c = (int)(_imagesPyramids[i]->pixel(x,y,j)); + // qtmp.setPixel(x,y,qRgb(c,c,c)); + // } + // } + // qtmp.save(base+QString::number(i)+"-"+QString::number(j)+".png", "PNG"); + // } + // + } +} diff --git a/extern/freestyle/src/view_map/SteerableViewMap.h b/extern/freestyle/src/view_map/SteerableViewMap.h new file mode 100755 index 00000000000..fe7c2493752 --- /dev/null +++ b/extern/freestyle/src/view_map/SteerableViewMap.h @@ -0,0 +1,153 @@ +// +// Filename : SteerbaleViewMap.h +// Author(s) : Stephane Grabli +// Purpose : Convenient access to the steerable ViewMap +// to which any element of the ViewMap belongs to. +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef STEERABLEVIEWMAP_H +# define STEERABLEVIEWMAP_H + +#include +#include "../system/FreestyleConfig.h" +#include "../geometry/Geom.h" +using namespace Geometry; + +using namespace std; + +class FEdge; +class ImagePyramid; +class GrayImage; +/*! This class checks for every FEdge in which steerable + * it belongs and stores the mapping allowing to retrieve + * this information from the FEdge Id + */ +class LIB_VIEW_MAP_EXPORT SteerableViewMap{ +protected: + map _mapping; // for each vector the list of nbOrientations weigths corresponding to its contributions to the nbOrientations directional maps + unsigned _nbOrientations; + ImagePyramid **_imagesPyramids; // the pyramids of images storing the different SVM + + // internal + double _bound; // cos(Pi/N) + vector _directions; + +public: + SteerableViewMap(unsigned int nbOrientations = 4); + SteerableViewMap(const SteerableViewMap& iBrother); + virtual ~SteerableViewMap(); + + /*! Resets everything */ + virtual void Reset(); + + /*! Adds a FEdge to steerable VM. + * Returns the nbOrientations weigths corresponding to + * the FEdge contributions to the nbOrientations directional maps. + */ + double* AddFEdge(FEdge *iFEdge); + + /*! Compute the weight of direction dir for orientation iNOrientation */ + double ComputeWeight(const Vec2d& dir, unsigned iNOrientation); + + /*! Returns the number of the SVM to which a direction belongs + * to. + * \param dir + * The direction + */ + unsigned getSVMNumber(const Vec2f& dir); + + /*! Returns the number of the SVM to which a FEdge belongs + * most. + * \param id + * The First element of the Id struct of the FEdge + * we're intersted in. + */ + unsigned getSVMNumber(unsigned id); + + /*! Builds _nbOrientations+1 pyramids of images from the _nbOrientations+1 base images + * of the steerable viewmap. + * \param steerableBases + * The _nbOrientations+1 images constituing the basis for the steerable + * pyramid. + * \param copy + * If false, the data is not duplicated, and Canvas deals + * with the memory management of these _nbOrientations+1 images. If true, data + * is copied, and it's up to the caller to delete the images. + * \params iNbLevels + * The number of levels desired for each pyramid. + * If iNbLevels == 0, the complete pyramid is built. + * \param iSigma + * The sigma that will be used for the gaussian blur + */ + void buildImagesPyramids(GrayImage **steerableBases, bool copy = false, unsigned iNbLevels=4, float iSigma = 1.f); + + /*! Reads a pixel value in one of the VewMap density steerable pyramids. + * Returns a value between 0 and 1. + * \param iOrientation + * the number telling which orientation we need to check. + * There are _nbOrientations+1 oriented ViewMaps: + * 0 -> the ViewMap containing every horizontal lines + * 1 -> the ViewMap containing every lines whose orientation is around PI/4 + * 2 -> the ViewMap containing every vertical lines + * 3 -> the ViewMap containing every lines whose orientation is around 3PI/4 + * 4 -> the complete ViewMap + * \param iLevel + * The level of the pyramid we want to read + * \param x + * The abscissa of the desired pixel specified in level0 coordinate + * system. The origin is the lower left corner. + * \param y + * The ordinate of the desired pixel specified in level0 coordinate + * system. The origin is the lower left corner. + */ + float readSteerableViewMapPixel(unsigned iOrientation, int iLevel, int x, int y); + + /*! Reads a pixel in the one of the level of the + * pyramid containing the images of the complete + * ViewMap. + * Returns a value between 0 and 1. + * Equivalent to : readSteerableViewMapPixel(nbOrientations, x,y) + */ + float readCompleteViewMapPixel(int iLevel, int x, int y); + + /*! Returns the number of levels in the pyramids */ + unsigned int getNumberOfPyramidLevels() const; + + /*! Returns the number of orientations */ + unsigned int getNumberOfOrientations() const{ + return _nbOrientations; + } + + /*! for debug purposes */ + void saveSteerableViewMap() const ; + +protected: + void Clear(); + void Build(); + + +}; + +#endif // STEERABLEVIEWMAP_H diff --git a/extern/freestyle/src/view_map/ViewEdgeXBuilder.cpp b/extern/freestyle/src/view_map/ViewEdgeXBuilder.cpp new file mode 100755 index 00000000000..20b3aeb144d --- /dev/null +++ b/extern/freestyle/src/view_map/ViewEdgeXBuilder.cpp @@ -0,0 +1,666 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "ViewEdgeXBuilder.h" +#include "../winged_edge/WXEdge.h" +#include "ViewMap.h" +#include "SilhouetteGeomEngine.h" +#include + +using namespace std; + +void ViewEdgeXBuilder::Init(ViewShape *oVShape){ + if(0 == oVShape) + return; + + // for design conveniance, we store the current SShape. + _pCurrentSShape = oVShape->sshape(); + if(0 == _pCurrentSShape) + return; + + _pCurrentVShape = oVShape; + + // Reset previous data + //-------------------- + if(!_SVertexMap.empty()) + _SVertexMap.clear(); +} + +void ViewEdgeXBuilder::BuildViewEdges( WXShape *iWShape, ViewShape *oVShape, + vector& ioVEdges, + vector& ioVVertices, + vector& ioFEdges, + vector& ioSVertices){ + // Reinit structures + Init(oVShape); + + ViewEdge *vedge ; + // Let us build the smooth stuff + //---------------------------------------- + // We parse all faces to find the ones + // that contain smooth edges + vector& wfaces = iWShape->GetFaceList(); + vector::iterator wf, wfend; + WXFace *wxf; + for(wf=wfaces.begin(), wfend=wfaces.end(); + wf!=wfend; + wf++){ + wxf = dynamic_cast(*wf); + if(false == ((wxf))->hasSmoothEdges()) // does it contain at least one smooth edge ? + continue; + // parse all smooth layers: + vector& smoothLayers = wxf->getSmoothLayers(); + for(vector::iterator sl = smoothLayers.begin(), slend=smoothLayers.end(); + sl!=slend; + ++sl){ + if(!(*sl)->hasSmoothEdge()) + continue; + if(stopSmoothViewEdge((*sl))) // has it been parsed already ? + continue; + // here we know that we're dealing with a face layer that has not been + // processed yet and that contains a smooth edge. + vedge = BuildSmoothViewEdge(OWXFaceLayer(*sl, true)); + } + } + + // Now let's build sharp view edges: + //---------------------------------- + // Reset all userdata for WXEdge structure + //---------------------------------------- + //iWShape->ResetUserData(); + + WXEdge * wxe; + vector& wedges = iWShape->GetEdgeList(); + // + //------------------------------ + for(vector::iterator we=wedges.begin(),weend=wedges.end(); + we!=weend; + we++){ + wxe = dynamic_cast(*we); + if(Nature::NO_FEATURE == wxe->nature()) + continue; + + if(!stopSharpViewEdge(wxe)){ + bool b=true; + if(wxe->order() == -1) + b = false; + BuildSharpViewEdge(OWXEdge(wxe,b)); + } + } + + // Reset all userdata for WXEdge structure + //---------------------------------------- + iWShape->ResetUserData(); + + // Add all these new edges to the scene's feature edges list: + //----------------------------------------------------------- + vector& newedges = _pCurrentSShape->GetEdgeList(); + vector& newVertices = _pCurrentSShape->GetVertexList(); + vector& newVVertices = _pCurrentVShape->vertices(); + vector& newVEdges = _pCurrentVShape->edges(); + + // inserts in ioFEdges, at its end, all the edges of newedges + ioFEdges.insert(ioFEdges.end(), newedges.begin(), newedges.end()); + ioSVertices.insert(ioSVertices.end(), newVertices.begin(), newVertices.end()); + ioVVertices.insert(ioVVertices.end(), newVVertices.begin(), newVVertices.end()); + ioVEdges.insert(ioVEdges.end(), newVEdges.begin(), newVEdges.end()); + +} + +ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer){ + // Find first edge: + OWXFaceLayer first = iFaceLayer; + OWXFaceLayer currentFace = first; + + // bidirectional chaining. + // first direction + list facesChain; + unsigned size = 0; + while(!stopSmoothViewEdge(currentFace.fl)){ + facesChain.push_back(currentFace); + ++size; + currentFace.fl->userdata = (void*)1; // processed + // Find the next edge! + currentFace = FindNextFaceLayer(currentFace); + } + OWXFaceLayer end = facesChain.back(); + // second direction + currentFace = FindPreviousFaceLayer(first); + while(!stopSmoothViewEdge(currentFace.fl)){ + facesChain.push_front(currentFace); + ++size; + currentFace.fl->userdata = (void*)1; // processed + // Find the previous edge! + currentFace = FindPreviousFaceLayer(currentFace); + } + first = facesChain.front(); + + if(iFaceLayer.fl->nature() & Nature::RIDGE){ + if(size<4){ + return 0; + } + } + + // Start a new chain edges + ViewEdge * newVEdge = new ViewEdge; + newVEdge->SetId(_currentViewId); + ++_currentViewId; + + _pCurrentVShape->AddEdge(newVEdge); + + + // build FEdges + FEdge * feprevious = 0; + FEdge * fefirst = 0; + FEdge * fe; + for(list::iterator fl = facesChain.begin(), flend=facesChain.end(); + fl!=flend; + ++fl){ + fe = BuildSmoothFEdge(feprevious, (*fl)); + fe->SetViewEdge(newVEdge); + if(!fefirst) + fefirst = fe; + feprevious = fe; + } + // Store the chain starting edge: + _pCurrentSShape->AddChain(fefirst); + newVEdge->SetNature(iFaceLayer.fl->nature()); + newVEdge->SetFEdgeA(fefirst); + newVEdge->SetFEdgeB(fe); + + // is it a closed loop ? + if((first == end) && (size != 1)){ + fefirst->SetPreviousEdge(fe); + fe->SetNextEdge(fefirst); + newVEdge->SetA(0); + newVEdge->SetB(0); + }else{ + ViewVertex *vva = MakeViewVertex(fefirst->vertexA()); + ViewVertex *vvb = MakeViewVertex(fe->vertexB()); + + ((NonTVertex*)vva)->AddOutgoingViewEdge(newVEdge); + ((NonTVertex*)vvb)->AddIncomingViewEdge(newVEdge); + + newVEdge->SetA(vva); + newVEdge->SetB(vvb); + } + + return newVEdge; +} + +ViewEdge * ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) { + // Start a new sharp chain edges + ViewEdge * newVEdge = new ViewEdge; + newVEdge->SetId(_currentViewId); + ++_currentViewId; + unsigned size=0; + + _pCurrentVShape->AddEdge(newVEdge); + + // Find first edge: + OWXEdge firstWEdge = iWEdge; + OWXEdge previousWEdge = firstWEdge; + OWXEdge currentWEdge = firstWEdge; + list edgesChain; + // bidirectional chaining + // first direction: + while(!stopSharpViewEdge(currentWEdge.e)){ + edgesChain.push_back(currentWEdge); + ++size; + currentWEdge.e->userdata = (void*)1; // processed + // Find the next edge! + currentWEdge = FindNextWEdge(currentWEdge); + } + OWXEdge endWEdge = edgesChain.back(); + // second direction + currentWEdge = FindPreviousWEdge(firstWEdge); + while(!stopSharpViewEdge(currentWEdge.e)){ + edgesChain.push_front(currentWEdge); + ++size; + currentWEdge.e->userdata = (void*)1; // processed + // Find the previous edge! + currentWEdge = FindPreviousWEdge(currentWEdge); + } + firstWEdge = edgesChain.front(); + + // build FEdges + FEdge * feprevious = 0; + FEdge * fefirst = 0; + FEdge * fe; + for(list::iterator we = edgesChain.begin(), weend=edgesChain.end(); + we!=weend; + ++we){ + fe = BuildSharpFEdge(feprevious, (*we)); + fe->SetViewEdge(newVEdge); + if(!fefirst) + fefirst = fe; + feprevious = fe; + } + // Store the chain starting edge: + _pCurrentSShape->AddChain(fefirst); + newVEdge->SetNature(iWEdge.e->nature()); + newVEdge->SetFEdgeA(fefirst); + newVEdge->SetFEdgeB(fe); + + // is it a closed loop ? + if((firstWEdge == endWEdge) && (size!=1)){ + fefirst->SetPreviousEdge(fe); + fe->SetNextEdge(fefirst); + newVEdge->SetA(0); + newVEdge->SetB(0); + }else{ + ViewVertex *vva = MakeViewVertex(fefirst->vertexA()); + ViewVertex *vvb = MakeViewVertex(fe->vertexB()); + + ((NonTVertex*)vva)->AddOutgoingViewEdge(newVEdge); + ((NonTVertex*)vvb)->AddIncomingViewEdge(newVEdge); + + newVEdge->SetA(vva); + newVEdge->SetB(vvb); + } + + return newVEdge; +} + +OWXFaceLayer ViewEdgeXBuilder::FindNextFaceLayer(const OWXFaceLayer& iFaceLayer){ + WXFace *nextFace = 0; + WOEdge * woeend; + real tend; + if(iFaceLayer.order){ + woeend = iFaceLayer.fl->getSmoothEdge()->woeb(); + tend = iFaceLayer.fl->getSmoothEdge()->tb(); + }else{ + woeend = iFaceLayer.fl->getSmoothEdge()->woea(); + tend = iFaceLayer.fl->getSmoothEdge()->ta(); + } + // special case of EDGE_VERTEX config: + if((tend == 0.0) || (tend == 1.0)){ + WVertex *nextVertex; + if(tend == 0.0) + nextVertex = woeend->GetaVertex(); + else + nextVertex = woeend->GetbVertex(); + if(nextVertex->isBoundary()) // if it's a non-manifold vertex -> ignore + return OWXFaceLayer(0,true); + bool found = false; + WVertex::face_iterator f=nextVertex->faces_begin(); + WVertex::face_iterator fend=nextVertex->faces_end(); + while((!found) && (f!=fend)){ + nextFace = dynamic_cast(*f); + if((0 != nextFace) && (nextFace!=iFaceLayer.fl->getFace())){ + vector sameNatureLayers; + nextFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers); + if(sameNatureLayers.size() == 1) {// don't know + // maybe should test whether this face has + // also a vertex_edge configuration + WXFaceLayer * winner = sameNatureLayers[0]; + if(woeend == winner->getSmoothEdge()->woea()->twin()) + return OWXFaceLayer(winner,true); + else + return OWXFaceLayer(winner,false); + } + } + ++f; + } + }else{ + nextFace = dynamic_cast(iFaceLayer.fl->getFace()->GetBordingFace(woeend)); + if(0 == nextFace) + return OWXFaceLayer(0,true); + // if the next face layer has either no smooth edge or + // no smooth edge of same nature, no next face + if(!nextFace->hasSmoothEdges()) + return OWXFaceLayer(0,true); + vector sameNatureLayers; + nextFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers); + if((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) // don't know how to deal with several edges of same nature on a single face + return OWXFaceLayer(0,true); + else{ + WXFaceLayer * winner = sameNatureLayers[0]; + if(woeend == winner->getSmoothEdge()->woea()->twin()) + return OWXFaceLayer(winner,true); + else + return OWXFaceLayer(winner,false); + } + } + return OWXFaceLayer(0,true); +} + +OWXFaceLayer ViewEdgeXBuilder::FindPreviousFaceLayer(const OWXFaceLayer& iFaceLayer) { + WXFace *previousFace = 0; + WOEdge * woebegin; + real tend; + if(iFaceLayer.order){ + woebegin = iFaceLayer.fl->getSmoothEdge()->woea(); + tend = iFaceLayer.fl->getSmoothEdge()->ta(); + }else{ + woebegin = iFaceLayer.fl->getSmoothEdge()->woeb(); + tend = iFaceLayer.fl->getSmoothEdge()->tb(); + } + + // special case of EDGE_VERTEX config: + if((tend == 0.0) || (tend == 1.0)){ + WVertex *previousVertex; + if(tend == 0.0) + previousVertex = woebegin->GetaVertex(); + else + previousVertex = woebegin->GetbVertex(); + if(previousVertex->isBoundary()) // if it's a non-manifold vertex -> ignore + return OWXFaceLayer(0,true); + bool found = false; + WVertex::face_iterator f=previousVertex->faces_begin(); + WVertex::face_iterator fend=previousVertex->faces_end(); + while((!found) && (f!=fend)){ + previousFace = dynamic_cast(*f); + if((0 != previousFace) && (previousFace!=iFaceLayer.fl->getFace())){ + vector sameNatureLayers; + previousFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers); + if(sameNatureLayers.size() == 1) {// don't know + // maybe should test whether this face has + // also a vertex_edge configuration + WXFaceLayer * winner = sameNatureLayers[0]; + if(woebegin == winner->getSmoothEdge()->woeb()->twin()) + return OWXFaceLayer(winner,true); + else + return OWXFaceLayer(winner,false); + } + } + ++f; + } + }else{ + previousFace = dynamic_cast(iFaceLayer.fl->getFace()->GetBordingFace(woebegin)); + if(0 == previousFace) + return OWXFaceLayer(0,true); + + // if the next face layer has either no smooth edge or + // no smooth edge of same nature, no next face + if(!previousFace->hasSmoothEdges()) + return OWXFaceLayer(0,true); + vector sameNatureLayers; + previousFace->retrieveSmoothEdgesLayers(iFaceLayer.fl->nature(), sameNatureLayers); + if((sameNatureLayers.empty()) || (sameNatureLayers.size() != 1)) // don't know how to deal with several edges of same nature on a single face + return OWXFaceLayer(0,true); + else{ + WXFaceLayer * winner = sameNatureLayers[0]; + if(woebegin == winner->getSmoothEdge()->woeb()->twin()) + return OWXFaceLayer(winner,true); + else + return OWXFaceLayer(winner,false); + } + } + return OWXFaceLayer(0,true); +} + +FEdge * ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer& ifl){ + SVertex *va, *vb; + FEdgeSmooth *fe; + // retrieve exact silhouette data + WXSmoothEdge *se = ifl.fl->getSmoothEdge(); + + Vec3r normal; + // Make the 2 Svertices + if(feprevious == 0){ // that means that we don't have any vertex already built for that face + real ta = se->ta(); + Vec3r A1(se->woea()->GetaVertex()->GetVertex()); + Vec3r A2(se->woea()->GetbVertex()->GetVertex()); + Vec3r A(A1+ta*(A2-A1)); + + va = MakeSVertex(A); + // Set normal: + Vec3r NA1(ifl.fl->getFace()->GetVertexNormal(se->woea()->GetaVertex())); + Vec3r NA2(ifl.fl->getFace()->GetVertexNormal(se->woea()->GetbVertex())); + Vec3r na((1 - ta) * NA1 + ta * NA2); + na.normalize(); + va->AddNormal(na); + normal = na; + + // Set CurvatureInfo + CurvatureInfo* curvature_info_a = new CurvatureInfo(*(dynamic_cast(se->woea()->GetaVertex())->curvatures()), + *(dynamic_cast(se->woea()->GetbVertex())->curvatures()), + ta); + va->setCurvatureInfo(curvature_info_a); + } + else + va = feprevious->vertexB(); + + real tb = se->tb(); + Vec3r B1(se->woeb()->GetaVertex()->GetVertex()); + Vec3r B2(se->woeb()->GetbVertex()->GetVertex()); + Vec3r B(B1+tb*(B2-B1)); + + vb = MakeSVertex(B); + // Set normal: + Vec3r NB1(ifl.fl->getFace()->GetVertexNormal(se->woeb()->GetaVertex())); + Vec3r NB2(ifl.fl->getFace()->GetVertexNormal(se->woeb()->GetbVertex())); + Vec3r nb((1 - tb) * NB1 + tb * NB2); + nb.normalize(); + normal += nb; + vb->AddNormal(nb); + + // Set CurvatureInfo + CurvatureInfo* curvature_info_b = new CurvatureInfo(*(dynamic_cast(se->woeb()->GetaVertex())->curvatures()), + *(dynamic_cast(se->woeb()->GetbVertex())->curvatures()), + tb); + vb->setCurvatureInfo(curvature_info_b); + + // if the order is false we must swap va and vb + if(!ifl.order){ + SVertex *tmp = va; + va = vb; + vb = tmp; + } + + // Creates the corresponding feature edge + fe = new FEdgeSmooth(va, vb); + fe->SetNature(ifl.fl->nature()); + fe->SetId(_currentFId); + fe->SetMaterialIndex(ifl.fl->getFace()->materialIndex()); + fe->SetFace(ifl.fl->getFace()); + fe->SetNormal(normal); + fe->SetPreviousEdge(feprevious); + if(feprevious) + feprevious->SetNextEdge(fe); + _pCurrentSShape->AddEdge(fe); + va->AddFEdge(fe); + vb->AddFEdge(fe); + + ++_currentFId; + ifl.fl->userdata = fe; + return fe; +} + +bool ViewEdgeXBuilder::stopSmoothViewEdge(WXFaceLayer *iFaceLayer){ + if(0 == iFaceLayer) + return true; + if(iFaceLayer->userdata == 0) + return false; + return true; +} + +OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge& iEdge){ + if(Nature::NO_FEATURE == iEdge.e->nature()) + return OWXEdge(0, true); + + WVertex *v; + if(true == iEdge.order) + v = iEdge.e->GetbVertex(); + else + v = iEdge.e->GetaVertex(); + + if(((WXVertex*)v)->isFeature()) + return 0; + + + vector& vEdges = (v)->GetEdges(); + for(vector::iterator ve=vEdges.begin(),veend=vEdges.end(); + ve!=veend; + ve++){ + WXEdge *wxe = dynamic_cast(*ve); + if(wxe == iEdge.e) + continue; // same edge as the one processed + + if(wxe->nature() != iEdge.e->nature()) + continue; + + if(wxe->GetaVertex() == v){ + // That means that the face necesarily lies on the edge left. + // So the vertex order is OK. + return OWXEdge(wxe, true); + }else{ + // That means that the face necesarily lies on the edge left. + // So the vertex order is OK. + return OWXEdge(wxe, false); + } + } + // we did not find: + return OWXEdge(0, true); +} + +OWXEdge ViewEdgeXBuilder::FindPreviousWEdge(const OWXEdge& iEdge){ + if(Nature::NO_FEATURE == iEdge.e->nature()) + return OWXEdge(0, true); + + WVertex *v; + if(true == iEdge.order) + v = iEdge.e->GetaVertex(); + else + v = iEdge.e->GetbVertex(); + + if(((WXVertex*)v)->isFeature()) + return 0; + + + vector& vEdges = (v)->GetEdges(); + for(vector::iterator ve=vEdges.begin(),veend=vEdges.end(); + ve!=veend; + ve++){ + WXEdge *wxe = dynamic_cast(*ve); + if(wxe == iEdge.e) + continue; // same edge as the one processed + + if(wxe->nature() != iEdge.e->nature()) + continue; + + if(wxe->GetbVertex() == v){ + return OWXEdge(wxe, true); + }else{ + return OWXEdge(wxe, false); + } + } + // we did not find: + return OWXEdge(0, true); +} + +FEdge * ViewEdgeXBuilder::BuildSharpFEdge(FEdge *feprevious, const OWXEdge& iwe){ + SVertex *va, *vb; + FEdgeSharp *fe; + WXVertex *wxVA, *wxVB; + if(iwe.order){ + wxVA = (WXVertex*)iwe.e->GetaVertex(); + wxVB = (WXVertex*)iwe.e->GetbVertex(); + }else{ + wxVA = (WXVertex*)iwe.e->GetbVertex(); + wxVB = (WXVertex*)iwe.e->GetaVertex(); + } + // Make the 2 SVertex + va = MakeSVertex(wxVA->GetVertex()); + vb = MakeSVertex(wxVB->GetVertex()); + + // get the faces normals and the material indices + Vec3r normalA, normalB; + unsigned matA(0), matB(0); + if(iwe.order){ + normalB = (iwe.e->GetbFace()->GetNormal()); + matB = (iwe.e->GetbFace()->materialIndex()); + if(!(iwe.e->nature() & Nature::BORDER)) { + normalA = (iwe.e->GetaFace()->GetNormal()); + matA = (iwe.e->GetaFace()->materialIndex()); + } + }else{ + normalA = (iwe.e->GetbFace()->GetNormal()); + matA = (iwe.e->GetbFace()->materialIndex()); + if(!(iwe.e->nature() & Nature::BORDER)) { + normalB = (iwe.e->GetaFace()->GetNormal()); + matB = (iwe.e->GetaFace()->materialIndex()); + } + } + // Creates the corresponding feature edge + // Creates the corresponding feature edge + fe = new FEdgeSharp(va, vb); + fe->SetNature(iwe.e->nature()); + fe->SetId(_currentFId); + fe->SetaMaterialIndex(matA); + fe->SetbMaterialIndex(matB); + fe->SetNormalA(normalA); + fe->SetNormalB(normalB); + fe->SetPreviousEdge(feprevious); + if(feprevious) + feprevious->SetNextEdge(fe); + _pCurrentSShape->AddEdge(fe); + va->AddFEdge(fe); + vb->AddFEdge(fe); + //Add normals: + va->AddNormal(normalA); + va->AddNormal(normalB); + vb->AddNormal(normalA); + vb->AddNormal(normalB); + + ++_currentFId; + iwe.e->userdata = fe; + return fe; +} + +bool ViewEdgeXBuilder::stopSharpViewEdge(WXEdge *iEdge){ + if(0 == iEdge) + return true; + if(iEdge->userdata == 0) + return false; + return true; +} + +SVertex * ViewEdgeXBuilder::MakeSVertex(Vec3r& iPoint){ + SVertex *va; + // Check whether the vertices are already in the table: + // fisrt vertex + // ------------- + SVertexMap::const_iterator found = _SVertexMap.find(iPoint); + if (found != _SVertexMap.end()) { + va = (*found).second; + }else{ + va = new SVertex(iPoint, _currentSVertexId); + SilhouetteGeomEngine::ProjectSilhouette(va); + ++_currentSVertexId; + // Add the svertex to the SShape svertex list: + _pCurrentSShape->AddNewVertex(va); + // Add the svertex in the table using its id: + _SVertexMap[iPoint] = va; + } + return va; +} + +ViewVertex * ViewEdgeXBuilder::MakeViewVertex(SVertex *iSVertex){ + ViewVertex *vva = iSVertex->viewvertex(); + if(vva != 0) + return vva; + vva = new NonTVertex(iSVertex); + // Add the view vertex to the ViewShape svertex list: + _pCurrentVShape->AddVertex(vva); + return vva; +} + diff --git a/extern/freestyle/src/view_map/ViewEdgeXBuilder.h b/extern/freestyle/src/view_map/ViewEdgeXBuilder.h new file mode 100755 index 00000000000..9e2837b49a7 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewEdgeXBuilder.h @@ -0,0 +1,214 @@ +// +// Filename : ViewEdgeXBuilder.h +// Author(s) : Stephane Grabli +// Purpose : Class to build view edges and the underlying chains +// of feature edges... +// Date of creation : 27/10/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWEDGEXBUILDER_H +# define VIEWEDGEXBUILDER_H + +# include +# include +# include + +# if defined(__GNUC__) && (__GNUC__ >= 3) +//hash_map is not part of the C++ standard anymore; hash_map.h has been kept though for backward compatibility +# include +# else +# include +# endif + +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" +# include "Interface1D.h" + +using namespace Geometry; +using namespace std; + +class SVertex; +/*! Defines a hash table used for searching the SVertex */ +struct SVertexHasher { +#define _MUL 950706376UL +#define _MOD 2147483647UL + inline size_t operator() (const Vec3r& p) const { + size_t res = ((unsigned long) (p[0] * _MUL)) % _MOD; + res = ((res + (unsigned long) (p[1]) * _MUL)) % _MOD; + return ((res +(unsigned long) (p[2]) * _MUL)) % _MOD; + } +}; + +// Key_compare predicate for hash_map. In particular, return false if equal. +struct epsilonEquals{ + bool operator()(const Vec3r& v1, const Vec3r& v2) const{ + real norm = (v1-v2).norm(); + return (norm<1e-06); + } +}; + + +// typedef hash_map SVertexMap; +typedef map SVertexMap; + +class WXFaceLayer; +/*! class to describe an oriented smooth edge */ +class OWXFaceLayer{ +public: + WXFaceLayer * fl; + bool order; + + OWXFaceLayer() {fl=0;order=true;} + OWXFaceLayer(WXFaceLayer *ifl, bool iOrder=true){fl = ifl;order=iOrder;} + OWXFaceLayer& operator=(const OWXFaceLayer& iBrother){ + fl = iBrother.fl; + order = iBrother.order; + return *this; + } + bool operator==(const OWXFaceLayer& b){ + return ((fl == b.fl) && (order == b.order)); + } + bool operator!=(const OWXFaceLayer& b){ + return !(*this==b); + } +}; + +class WXEdge; +/*! class to describe an oriented sharp edge */ +class OWXEdge{ +public: + WXEdge * e; + bool order; + + OWXEdge() {e=0;order=true;} + OWXEdge(WXEdge *ie, bool iOrder=true){e = ie;order=iOrder;} + OWXEdge& operator=(const OWXEdge& iBrother){ + e = iBrother.e; + order = iBrother.order; + return *this; + } + bool operator==(const OWXEdge& b){ + return ((e == b.e) && (order == b.order)); + } + bool operator!=(const OWXEdge& b){ + return !(*this==b); + } +}; + +class WOEdge; +class WXEdge; +class WXShape; +class SVertex; +class FEdge; +class ViewVertex; +class ViewEdge; +class ViewShape; +class LIB_VIEW_MAP_EXPORT ViewEdgeXBuilder +{ +protected: + int _currentViewId; // Id for view edges + int _currentFId; // Id for FEdges + int _currentSVertexId; // Id for SVertex +public: + + inline ViewEdgeXBuilder() + {_currentViewId = 1;_currentFId=0;_currentSVertexId=0;} + virtual ~ViewEdgeXBuilder(){} + + /*! Builds a view shape from a WXShape in which the feature edges + * are flagged + * Builds chains of feature edges (so ViewEdges) from a WXShape + * iWShape + * The Winged Edge structure in which all silhouette edges + * and vertices are flagged. + * oViewShape + * The Silhouette Shape in which the chains must be added. + * ioVEdges + * The list of new ViewEdges. + * ioVVertices + * THe new ViewVertices + * ioFEdges + * A list in which all new FEdges are added + * ioSVertices + * A list of SVertex where all created SVertex are added. + */ + virtual void BuildViewEdges(WXShape *iWShape, ViewShape *oVShape, + std::vector& ioVEdges, + std::vector& ioVVertices, + std::vector& ioFEdges, + std::vector& ioSVertices) ; + + /*! Builds a smooth view edge, starting the face iFace.*/ + ViewEdge * BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer); + + /*! Makes a sharp viewedge + */ + ViewEdge * BuildSharpViewEdge(const OWXEdge& iWEdge) ; + + +public: + /*! accessors */ + inline int currentViewId() const { return _currentViewId; } + inline int currentFId() const { return _currentFId; } + inline int currentSVertexId() const { return _currentSVertexId; } + /*! modifiers */ + inline void SetCurrentViewId(int id) { _currentViewId = id; } + inline void SetCurrentFId(int id) { _currentFId = id; } + inline void SetCurrentSVertexId(int id) { _currentSVertexId = id; } + +protected: + /*! Init the view edges building */ + virtual void Init(ViewShape *oVShape) ; + + // SMOOTH // + /*! checks whether a face has already been processed or not */ + bool stopSmoothViewEdge(WXFaceLayer *iFaceLayer); + OWXFaceLayer FindNextFaceLayer(const OWXFaceLayer& iFaceLayer); + OWXFaceLayer FindPreviousFaceLayer(const OWXFaceLayer& iFaceLayer); + FEdge * BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer& ifl); + + // SHARP // + /*! checks whether a WEdge has already been processed or not */ + bool stopSharpViewEdge(WXEdge *iFace); + OWXEdge FindNextWEdge(const OWXEdge& iEdge); + OWXEdge FindPreviousWEdge(const OWXEdge& iEdge); + FEdge * BuildSharpFEdge(FEdge *feprevious, const OWXEdge& iwe); + + // GENERAL // + /*! Instanciate a SVertex if it hasn't been already created */ + SVertex * MakeSVertex(Vec3r& iPoint); + /*! instanciate a ViewVertex from a SVertex, if it doesn't exist yet */ + ViewVertex * MakeViewVertex(SVertex *iSVertex); + + //tmp values + // IdHashTable _hashtable; + // VVIdHashTable _multivertexHashTable; + SVertexMap _SVertexMap; + SShape *_pCurrentSShape; + ViewShape * _pCurrentVShape; +}; + +#endif + diff --git a/extern/freestyle/src/view_map/ViewMap.cpp b/extern/freestyle/src/view_map/ViewMap.cpp new file mode 100755 index 00000000000..9a2d262b703 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMap.cpp @@ -0,0 +1,703 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "ViewMap.h" +#include "../geometry/GeomUtils.h" +#include +#include "ViewMapIterators.h" +#include "ViewMapAdvancedIterators.h" + + /**********************************/ + /* */ + /* */ + /* ViewMap */ + /* */ + /* */ + /**********************************/ + +ViewMap * ViewMap::_pInstance = 0; + +ViewMap::~ViewMap() +{ + // The view vertices must be deleted here as some of them + // are shared between two shapes: + for(vector::iterator vv=_VVertices.begin(), vvend=_VVertices.end(); + vv!=vvend; + vv++) + { + delete (*vv); + } + _VVertices.clear(); + + for(vector::iterator vs=_VShapes.begin(),vsend=_VShapes.end(); + vs!=vsend; + vs++) + { + delete (*vs); + } + _VShapes.clear(); + + _FEdges.clear(); + _SVertices.clear(); + _VEdges.clear(); +} + +ViewShape * ViewMap::viewShape(unsigned id) +{ + int index = _shapeIdToIndex[id]; + return _VShapes[ index ]; +} +void ViewMap::AddViewShape(ViewShape *iVShape) { + _shapeIdToIndex[iVShape->getId().getFirst()] = _VShapes.size(); + _VShapes.push_back(iVShape); +} +const FEdge * ViewMap::GetClosestFEdge(real x, real y) const +{ + // find the closest of this candidates: + real minDist = DBL_MAX; + FEdge * winner = 0; + for(fedges_container::const_iterator fe=_FEdges.begin(),feend=_FEdges.end(); + fe!=feend; + fe++) + { + Vec2d A((*fe)->vertexA()->point2D()[0], (*fe)->vertexA()->point2D()[1]); + Vec2d B((*fe)->vertexB()->point2D()[0], (*fe)->vertexB()->point2D()[1]); + real dist = GeomUtils::distPointSegment(Vec2r(x,y),A, B); + if(dist < minDist) + { + minDist = dist; + winner = (*fe); + } + + } + if(winner==0) + return 0; + + return winner; +} + +const ViewEdge * ViewMap::GetClosestViewEdge(real x, real y) const +{ + // find the closest of this candidates: + real minDist = DBL_MAX; + FEdge * winner = 0; + for(fedges_container::const_iterator fe=_FEdges.begin(),feend=_FEdges.end(); + fe!=feend; + fe++) + { + Vec2d A((*fe)->vertexA()->point2D()[0], (*fe)->vertexA()->point2D()[1]); + Vec2d B((*fe)->vertexB()->point2D()[0], (*fe)->vertexB()->point2D()[1]); + real dist = GeomUtils::distPointSegment(Vec2r(x,y),A, B); + if(dist < minDist) + { + minDist = dist; + winner = (*fe); + } + + } + if(winner==0) + return 0; + + return winner->viewedge(); +} + + +TVertex* ViewMap::CreateTVertex(const Vec3r& iA3D, const Vec3r& iA2D, FEdge *iFEdgeA, + const Vec3r& iB3D, const Vec3r& iB2D, FEdge *iFEdgeB, + const Id& id) +{ + ViewShape *vshapeA = iFEdgeA->viewedge()->viewShape(); + SShape *shapeA = iFEdgeA->shape(); + ViewShape *vshapeB = iFEdgeB->viewedge()->viewShape(); + SShape *shapeB = iFEdgeB->shape(); + + SVertex * Ia = shapeA->CreateSVertex(iA3D, iA2D, iFEdgeA->vertexA()->getId()); + SVertex * Ib = shapeB->CreateSVertex(iB3D, iB2D, iFEdgeB->vertexA()->getId()); + + // depending on which of these 2 svertices is the nearest from the + // viewpoint, we're going to build the TVertex by giving them in + // an order or another (the first one must be the nearest) + real dista = Ia->point2D()[2]; + real distb = Ib->point2D()[2]; + + TVertex * tvertex; + if(dista < distb) + tvertex = new TVertex(Ia, Ib); + else + tvertex = new TVertex(Ib,Ia); + + tvertex->SetId(id); + + // add these vertices to the view map + AddViewVertex(tvertex); + AddSVertex(Ia); + AddSVertex(Ib); + + // and this T Vertex to the view shapes: + vshapeA->AddVertex(tvertex); + vshapeB->AddVertex(tvertex); + + return tvertex; +} + +ViewVertex * ViewMap::InsertViewVertex(SVertex *iVertex, + vector& newViewEdges){ + NonTVertex *vva = dynamic_cast(iVertex->viewvertex()); + if(vva != 0) + return vva; + // beacuse it is not already a ViewVertex, this SVertex must have only + // 2 FEdges. The incoming one still belongs to ioEdge, the outgoing one + // now belongs to newVEdge + const vector& fedges = iVertex->fedges(); + if(fedges.size()!=2){ + cerr << "ViewMap warning: Can't split the ViewEdge" << endl; + return 0; + } + FEdge * fend(0), * fbegin(0); + for(vector::const_iterator fe=fedges.begin(), feend=fedges.end(); + fe!=feend; + ++fe){ + if((*fe)->vertexB() == iVertex){ + fend = (*fe); + } + if((*fe)->vertexA() == iVertex){ + fbegin = (*fe); + } + if((fbegin!=0) && (fend!=0)) + break; + } + ViewEdge *ioEdge = fbegin->viewedge(); + ViewShape * vshape = ioEdge->viewShape(); + vva = new NonTVertex(iVertex); + // if the ViewEdge is a closed loop, we don't create + // a new VEdge + if(ioEdge->A() == 0){ + // closed loop + ioEdge->SetA(vva); + ioEdge->SetB(vva); + // update sshape + vshape->sshape()->RemoveEdgeFromChain(ioEdge->fedgeA()); + vshape->sshape()->RemoveEdgeFromChain(ioEdge->fedgeB()); + + ioEdge->SetFEdgeA(fbegin); + ioEdge->SetFEdgeB(fend); + + // Update FEdges + fend->SetNextEdge(0); + fbegin->SetPreviousEdge(0); + + // update new View Vertex: + vva->AddOutgoingViewEdge(ioEdge); + vva->AddIncomingViewEdge(ioEdge); + + vshape->sshape()->AddChain(ioEdge->fedgeA()); + vshape->sshape()->AddChain(ioEdge->fedgeB()); + }else{ + // Create new ViewEdge + ViewEdge * newVEdge = new ViewEdge(vva, ioEdge->B(), fbegin, ioEdge->fedgeB(), vshape); + newVEdge->SetId(Id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond()+1)); + newVEdge->SetNature(ioEdge->getNature()); + //newVEdge->UpdateFEdges(); // done in the ViewEdge constructor + // Update old ViewEdge + ioEdge->SetB(vva); + ioEdge->SetFEdgeB(fend); + + // Update FEdges + fend->SetNextEdge(0); + fbegin->SetPreviousEdge(0); + + // update new View Vertex: + vva->AddOutgoingViewEdge(newVEdge); + vva->AddIncomingViewEdge(ioEdge); + // update ViewShape + //vshape->AddEdge(newVEdge); + // update SShape + vshape->sshape()->AddChain(fbegin); + // update ViewMap + //_VEdges.push_back(newVEdge); + newViewEdges.push_back(newVEdge); + } + + // update ViewShape + vshape->AddVertex(vva); + + // update ViewMap + _VVertices.push_back(vva); + + return vva; +} + +//FEdge * ViewMap::Connect(FEdge *ioEdge, SVertex *ioVertex, vector& oNewVEdges){ +// SShape * sshape = ioEdge->shape(); +// FEdge *newFEdge = sshape->SplitEdgeIn2(ioEdge, ioVertex); +// AddFEdge(newFEdge); +// InsertViewVertex(ioVertex, oNewVEdges); +// return newFEdge; +//} + + /**********************************/ + /* */ + /* */ + /* TVertex */ + /* */ + /* */ + /**********************************/ + +// is dve1 before dve2 ? (does it have a smaller angle ?) +bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEdge& dve2){ + FEdge *fe1; + if(dve1.second) + fe1 = dve1.first->fedgeB(); + else + fe1 = dve1.first->fedgeA(); + FEdge *fe2; + if(dve2.second) + fe2 = dve2.first->fedgeB(); + else + fe2 = dve2.first->fedgeA(); + + Vec3r V1 = fe1->orientation2d(); + Vec2r v1(V1.x(), V1.y());v1.normalize(); + Vec3r V2 = fe2->orientation2d(); + Vec2r v2(V2.x(), V2.y());v2.normalize(); + if(v1.y() > 0){ + if(v2.y() < 0) + return true; + else + return (v1.x() > v2.x()); + }else{ + if(v2.y() > 0) + return false; + else + return (v1.x() < v2.x()); + } + return false; +} +void TVertex::SetFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming) { + if (!iFrontEdgeA) { + cerr << "Warning: null pointer passed as argument of TVertex::SetFrontEdgeA()" << endl; + return; + } + _FrontEdgeA = directedViewEdge(iFrontEdgeA, incoming); + if(!_sortedEdges.empty()){ + edge_pointers_container::iterator dve = _sortedEdges.begin(), dveend = _sortedEdges.end(); + while((dve!=dveend) && ViewEdgeComp(**dve, _FrontEdgeA)){ + ++dve; + } + _sortedEdges.insert( dve, &_FrontEdgeA); + } + else + _sortedEdges.push_back(&_FrontEdgeA); +} +void TVertex::SetFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming) { + if (!iFrontEdgeB) { + cerr << "Warning: null pointer passed as argument of TVertex::SetFrontEdgeB()" << endl; + return; + } + _FrontEdgeB = directedViewEdge(iFrontEdgeB, incoming); + if(!_sortedEdges.empty()){ + edge_pointers_container::iterator dve = _sortedEdges.begin(), dveend = _sortedEdges.end(); + while((dve!=dveend) && ViewEdgeComp(**dve, _FrontEdgeB)){ + ++dve; + } + _sortedEdges.insert(dve, &_FrontEdgeB); + } + else + _sortedEdges.push_back(&_FrontEdgeB); +} +void TVertex::SetBackEdgeA(ViewEdge *iBackEdgeA, bool incoming) { + if (!iBackEdgeA) { + cerr << "Warning: null pointer passed as argument of TVertex::SetBackEdgeA()" << endl; + return; + } + _BackEdgeA = directedViewEdge(iBackEdgeA, incoming); + if(!_sortedEdges.empty()){ + edge_pointers_container::iterator dve = _sortedEdges.begin(), dveend = _sortedEdges.end(); + while((dve!=dveend) && ViewEdgeComp(**dve, _BackEdgeA)){ + ++dve; + } + _sortedEdges.insert(dve, &_BackEdgeA); + } + else + _sortedEdges.push_back(&_BackEdgeA); +} +void TVertex::SetBackEdgeB(ViewEdge *iBackEdgeB, bool incoming) { + if (!iBackEdgeB) { + cerr << "Warning: null pointer passed as argument of TVertex::SetBackEdgeB()" << endl; + return; + } + _BackEdgeB = directedViewEdge(iBackEdgeB, incoming); + if(!_sortedEdges.empty()){ + edge_pointers_container::iterator dve = _sortedEdges.begin(), dveend = _sortedEdges.end(); + while((dve!=dveend) && ViewEdgeComp(**dve, _BackEdgeB)){ + ++dve; + } + _sortedEdges.insert(dve, &_BackEdgeB); + } + else + _sortedEdges.push_back(&_BackEdgeB); +} +void TVertex::Replace(ViewEdge *iOld, ViewEdge *iNew) +{ + // theoritically, we only replace edges for which this + // view vertex is the B vertex + if((iOld == _FrontEdgeA.first) && (_FrontEdgeA.first->B() == this)) + { + _FrontEdgeA.first = iNew; + return; + } + if((iOld == _FrontEdgeB.first) && (_FrontEdgeB.first->B() == this)) + { + _FrontEdgeB.first = iNew; + return; + } + if((iOld == _BackEdgeA.first) && (_BackEdgeA.first->B() == this)) + { + _BackEdgeA.first = iNew; + return; + } + if((iOld == _BackEdgeB.first) && (_BackEdgeB.first->B() == this)) + { + _BackEdgeB.first = iNew; + return; + } +} + +/*! iterators access */ +ViewVertex::edge_iterator TVertex::edges_begin() +{ + //return edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, _FrontEdgeA); + return edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); +} +ViewVertex::const_edge_iterator TVertex::edges_begin() const +{ + //return const_edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, _FrontEdgeA); + return const_edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); +} +ViewVertex::edge_iterator TVertex::edges_end() +{ + //return edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, directedViewEdge(0,true)); + return edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.end()); +} +ViewVertex::const_edge_iterator TVertex::edges_end() const +{ + //return const_edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, directedViewEdge(0, true)); + return const_edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.end()); +} +ViewVertex::edge_iterator TVertex::edges_iterator(ViewEdge *iEdge) +{ + for(edge_pointers_container::iterator it=_sortedEdges.begin(), itend=_sortedEdges.end(); + it!=itend; + it++) + { + if((*it)->first == iEdge) + return edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), it); + } + return edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); + + // directedViewEdge dEdge; + // if(_FrontEdgeA.first == iEdge) + // dEdge = _FrontEdgeA; + // else if(_FrontEdgeB.first == iEdge) + // dEdge = _FrontEdgeB; + // else if(_BackEdgeA.first == iEdge) + // dEdge = _BackEdgeA; + // else if(_BackEdgeB.first == iEdge) + // dEdge = _BackEdgeB; + // return edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, dEdge); +} +ViewVertex::const_edge_iterator TVertex::edges_iterator(ViewEdge *iEdge) const +{ + for(edge_pointers_container::const_iterator it=_sortedEdges.begin(), itend=_sortedEdges.end(); + it!=itend; + it++) + { + if((*it)->first == iEdge) + return const_edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), it); + } + return const_edge_iterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); + + // directedViewEdge dEdge; + // if(_FrontEdgeA.first == iEdge) + // dEdge = _FrontEdgeA; + // else if(_FrontEdgeB.first == iEdge) + // dEdge = _FrontEdgeB; + // else if(_BackEdgeA.first == iEdge) + // dEdge = _BackEdgeA; + // else if(_BackEdgeB.first == iEdge) + // dEdge = _BackEdgeB; + // return const_edge_iterator(_FrontEdgeA, _FrontEdgeB, _BackEdgeA, _BackEdgeB, dEdge); +} + +ViewVertexInternal::orientedViewEdgeIterator TVertex::edgesBegin() { + return ViewVertexInternal::orientedViewEdgeIterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); +} +ViewVertexInternal::orientedViewEdgeIterator TVertex::edgesEnd() { + return ViewVertexInternal::orientedViewEdgeIterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.end()); +} +ViewVertexInternal::orientedViewEdgeIterator TVertex::edgesIterator(ViewEdge *iEdge) { + for(edge_pointers_container::iterator it=_sortedEdges.begin(), itend=_sortedEdges.end(); + it!=itend; + it++) + { + if((*it)->first == iEdge) + return ViewVertexInternal::orientedViewEdgeIterator(_sortedEdges.begin(), _sortedEdges.end(), it); + } + return ViewVertexInternal::orientedViewEdgeIterator(_sortedEdges.begin(), _sortedEdges.end(), _sortedEdges.begin()); +} + /**********************************/ + /* */ + /* */ + /* NonTVertex */ + /* */ + /* */ + /**********************************/ + +void NonTVertex::AddOutgoingViewEdge(ViewEdge * iVEdge){ + // let's keep the viewedges ordered in CCW order + // in the 2D image plan + directedViewEdge idve(iVEdge, false); + if(!_ViewEdges.empty()){ + edges_container::iterator dve = _ViewEdges.begin(), dveend = _ViewEdges.end(); + while((dve!=dveend) && ViewEdgeComp(*dve, idve)){ + ++dve; + } + _ViewEdges.insert(dve, idve); + } + else + _ViewEdges.push_back(idve); +} + +void NonTVertex::AddIncomingViewEdge(ViewEdge * iVEdge){ + // let's keep the viewedges ordered in CCW order + // in the 2D image plan + directedViewEdge idve(iVEdge, true); + if(!_ViewEdges.empty()){ + edges_container::iterator dve = _ViewEdges.begin(), dveend = _ViewEdges.end(); + while((dve!=dveend) && ViewEdgeComp(*dve, idve)){ + ++dve; + } + _ViewEdges.insert(dve, idve); + } + else + _ViewEdges.push_back(idve); +} + +/*! iterators access */ +ViewVertex::edge_iterator NonTVertex::edges_begin() +{ + return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} +ViewVertex::const_edge_iterator NonTVertex::edges_begin() const +{ + return const_edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} +ViewVertex::edge_iterator NonTVertex::edges_end() +{ + return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.end()); +} +ViewVertex::const_edge_iterator NonTVertex::edges_end() const +{ + return const_edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.end()); +} +ViewVertex::edge_iterator NonTVertex::edges_iterator(ViewEdge *iEdge) +{ + for(edges_container::iterator it=_ViewEdges.begin(), itend=_ViewEdges.end(); + it!=itend; + it++) + { + if((it)->first == iEdge) + return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), it); + } + return edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} +ViewVertex::const_edge_iterator NonTVertex::edges_iterator(ViewEdge *iEdge) const +{ + for(edges_container::const_iterator it=_ViewEdges.begin(), itend=_ViewEdges.end(); + it!=itend; + it++) + { + if((it)->first == iEdge) + return const_edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), it); + } + return const_edge_iterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} + +ViewVertexInternal::orientedViewEdgeIterator NonTVertex::edgesBegin() { + return ViewVertexInternal::orientedViewEdgeIterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} +ViewVertexInternal::orientedViewEdgeIterator NonTVertex::edgesEnd() { + return ViewVertexInternal::orientedViewEdgeIterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.end()); +} +ViewVertexInternal::orientedViewEdgeIterator NonTVertex::edgesIterator(ViewEdge *iEdge) { + for(edges_container::iterator it=_ViewEdges.begin(), itend=_ViewEdges.end(); + it!=itend; + it++) + { + if((it)->first == iEdge) + return ViewVertexInternal::orientedViewEdgeIterator(_ViewEdges.begin(), _ViewEdges.end(), it); + } + return ViewVertexInternal::orientedViewEdgeIterator(_ViewEdges.begin(), _ViewEdges.end(), _ViewEdges.begin()); +} + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + +real ViewEdge::getLength2D() const +{ + float length = 0.f; + ViewEdge::const_fedge_iterator itlast = fedge_iterator_last(); + ViewEdge::const_fedge_iterator it = fedge_iterator_begin(), itend=fedge_iterator_end(); + Vec2r seg; + do{ + seg = Vec2r((*it)->orientation2d()[0], (*it)->orientation2d()[1]); + length += seg.norm(); + ++it; + }while((it!=itend) && (it!=itlast)); + return length; +} + + +//! view edge iterator +ViewEdge::edge_iterator ViewEdge::ViewEdge_iterator() {return edge_iterator(this);} +ViewEdge::const_edge_iterator ViewEdge::ViewEdge_iterator() const {return const_edge_iterator((ViewEdge*)this);} +//! feature edge iterator +ViewEdge::fedge_iterator ViewEdge::fedge_iterator_begin() {return fedge_iterator(this->_FEdgeA, this->_FEdgeB);} +ViewEdge::const_fedge_iterator ViewEdge::fedge_iterator_begin() const {return const_fedge_iterator(this->_FEdgeA, this->_FEdgeB);} +ViewEdge::fedge_iterator ViewEdge::fedge_iterator_last() {return fedge_iterator(this->_FEdgeB, this->_FEdgeB);} +ViewEdge::const_fedge_iterator ViewEdge::fedge_iterator_last() const {return const_fedge_iterator(this->_FEdgeB, this->_FEdgeB);} +ViewEdge::fedge_iterator ViewEdge::fedge_iterator_end() {return fedge_iterator(0, this->_FEdgeB);} +ViewEdge::const_fedge_iterator ViewEdge::fedge_iterator_end() const {return const_fedge_iterator(0, this->_FEdgeB);} +//! embedding vertex iterator +ViewEdge::const_vertex_iterator ViewEdge::vertices_begin() const {return const_vertex_iterator(this->_FEdgeA->vertexA(), 0, _FEdgeA);} +ViewEdge::vertex_iterator ViewEdge::vertices_begin() {return vertex_iterator(this->_FEdgeA->vertexA(), 0, _FEdgeA);} +ViewEdge::const_vertex_iterator ViewEdge::vertices_last() const {return const_vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, 0);} +ViewEdge::vertex_iterator ViewEdge::vertices_last() {return vertex_iterator(this->_FEdgeB->vertexB(), _FEdgeB, 0);} +ViewEdge::const_vertex_iterator ViewEdge::vertices_end() const {return const_vertex_iterator(0, _FEdgeB, 0);} +ViewEdge::vertex_iterator ViewEdge::vertices_end() {return vertex_iterator(0, _FEdgeB, 0);} + + +Interface0DIterator ViewEdge::verticesBegin() { + Interface0DIterator ret(new ViewEdgeInternal::SVertexIterator(this->_FEdgeA->vertexA(), this->_FEdgeA->vertexA(), 0, _FEdgeA, 0.f)); + return ret; +} + +Interface0DIterator ViewEdge::verticesEnd() { + Interface0DIterator ret(new ViewEdgeInternal::SVertexIterator(0, this->_FEdgeA->vertexA(), _FEdgeB, 0, getLength2D())); + return ret; +} + +Interface0DIterator ViewEdge::pointsBegin(float t) { + return verticesBegin(); +} + +Interface0DIterator ViewEdge::pointsEnd(float t) { + return verticesEnd(); +} + + + + /**********************************/ + /* */ + /* */ + /* ViewShape */ + /* */ + /* */ + /**********************************/ + + +ViewShape::~ViewShape() +{ + _Vertices.clear(); + + if(!(_Edges.empty())) + { + for(vector::iterator e=_Edges.begin(), eend=_Edges.end(); + e!=eend; + e++) + { + delete (*e); + } + _Edges.clear(); + } + + if(0 != _SShape) + { + delete _SShape; + _SShape = 0; + } +} + +void ViewShape::RemoveEdge(ViewEdge * iViewEdge) +{ + FEdge * fedge = iViewEdge->fedgeA(); + for(vector::iterator ve=_Edges.begin(),veend=_Edges.end(); + ve!=veend; + ve++) + { + if(iViewEdge == (*ve)) + { + _Edges.erase(ve); + _SShape->RemoveEdge(fedge); + break; + } + } +} + +void ViewShape::RemoveVertex(ViewVertex * iViewVertex) +{ + for(vector::iterator vv=_Vertices.begin(), vvend=_Vertices.end(); + vv!=vvend; + vv++) + { + if(iViewVertex == (*vv)) + { + _Vertices.erase(vv); + break; + } + } +} + + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + + +void ViewEdge::UpdateFEdges() +{ + FEdge *currentEdge = _FEdgeA; + do + { + currentEdge->SetViewEdge(this); + currentEdge = currentEdge->nextEdge(); + }while((currentEdge != NULL) && (currentEdge!= _FEdgeB)); + // last one + _FEdgeB->SetViewEdge(this); + +} diff --git a/extern/freestyle/src/view_map/ViewMap.h b/extern/freestyle/src/view_map/ViewMap.h new file mode 100755 index 00000000000..bdbb140e130 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMap.h @@ -0,0 +1,1487 @@ +// +// Filename : ViewMap.h +// Author(s) : Stephane Grabli +// Purpose : Classes to define a View Map (ViewVertex, ViewEdge, etc.) +// Date of creation : 03/09/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAP_H +# define VIEWMAP_H + +# include "../system/BaseIterator.h" +# include "../system/FreestyleConfig.h" +# include "../geometry/GeomUtils.h" +# include "Interface0D.h" +# include "Interface1D.h" +# include "Silhouette.h" // defines the embedding +# include + + /**********************************/ + /* */ + /* */ + /* ViewMap */ + /* */ + /* */ + /**********************************/ + + +/* Density + Mean area depth value + distance to a point + */ + +class ViewVertex; +class ViewEdge; +class ViewShape; +class TVertex; + +/*! Class defining the ViewMap.*/ +class LIB_VIEW_MAP_EXPORT ViewMap +{ +public: + + typedef vector viewedges_container; + typedef vector viewvertices_container; + typedef vector viewshapes_container; + typedef vector svertices_container; + typedef vector fedges_container; + typedef map id_to_index_map; + +private: + + static ViewMap *_pInstance; + viewshapes_container _VShapes; // view shapes + viewedges_container _VEdges; // view edges + viewvertices_container _VVertices; // view vertices + fedges_container _FEdges; // feature edges (embedded edges) + svertices_container _SVertices; // embedded vertices + BBox _scene3DBBox; + id_to_index_map _shapeIdToIndex; // Mapping between the WShape or VShape id to the VShape index in the + // _VShapes vector. Used in the method viewShape(int id) to access a shape from its id. + +public: + + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void* userdata; + + /*! Default constructor. */ + ViewMap() { + _pInstance = this; + userdata = 0; + } + /*! Destructor. */ + virtual ~ViewMap(); + + /*! Gets the viewedge the nearest to the + * 2D position specified as argument + */ + const ViewEdge * GetClosestViewEdge(real x, real y) const ; + + /*! Gets the Fedge the nearest to the + * 2D position specified as argument + */ + const FEdge * GetClosestFEdge(real x, real y) const ; + + /* accessors */ + /*! The ViewMap is a singleton class. This static method + * returns the instance of the ViewMap. + */ + static inline ViewMap * getInstance() {return _pInstance;} + /* Returns the list of ViewShapes of the scene. */ + inline viewshapes_container& ViewShapes() {return _VShapes;} + /* Returns the list of ViewEdges of the scene. */ + inline viewedges_container& ViewEdges() {return _VEdges;} + /* Returns the list of ViewVertices of the scene. */ + inline viewvertices_container& ViewVertices() {return _VVertices;} + /* Returns the list of FEdges of the scene. */ + inline fedges_container& FEdges() {return _FEdges;} + /* Returns the list of SVertices of the scene. */ + inline svertices_container& SVertices() {return _SVertices;} + /* Returns an iterator pointing onto the first ViewEdge of the list. */ + inline viewedges_container::iterator viewedges_begin() {return _VEdges.begin();} + inline viewedges_container::iterator viewedges_end() {return _VEdges.end();} + inline int viewedges_size() {return _VEdges.size();} + ViewShape * viewShape(unsigned index); + id_to_index_map& shapeIdToIndexMap() {return _shapeIdToIndex;} + + /*! Returns the scene 3D bounding box. */ + inline BBox getScene3dBBox() const {return _scene3DBBox;} + + /* modifiers */ + void AddViewShape(ViewShape *iVShape); + inline void AddViewEdge(ViewEdge *iVEdge) {_VEdges.push_back(iVEdge);} + inline void AddViewVertex(ViewVertex *iVVertex) {_VVertices.push_back(iVVertex);} + inline void AddFEdge(FEdge *iFEdge) {_FEdges.push_back(iFEdge);} + inline void AddSVertex(SVertex *iSVertex) {_SVertices.push_back(iSVertex);} + /*! Sets the scene 3D bounding box. */ + inline void setScene3dBBox(const BBox& bbox) {_scene3DBBox=bbox;} + + /* Creates a T vertex in the view map. + * A T vertex is the intersection between 2 + * FEdges (before these ones are splitted). + * The TVertex is a 2D intersection but it + * corresponds to a 3D point on each of the 2 FEdges. + * iA3D + * The 3D coordinates of the point corresponding + * to the intersection on the first edge. + * iA2D + * The x,y,z 2D coordinates of the projection + * of iA3D + * iFEdgeA + * The first FEdge + * iB3D + * The 3D coordinates of the point corresponding + * to the intersection on the second edge. + * iB2D + * The x,y,z 2D coordinates of the projection + * of iB3D + * iFEdgeB + * The second FEdge + * id + * The id that must be given to that TVertex + */ + TVertex* CreateTVertex(const Vec3r& iA3D, const Vec3r& iA2D, FEdge *iFEdgeA, + const Vec3r& iB3D, const Vec3r& iB2D, FEdge *iFEdgeB, + const Id& id); + + /* Updates the structures to take into account the fact + * that a SVertex must now be considered as a ViewVertex + * iVertex + * The SVertex on top of which the ViewVertex is built (it is necessarily + * a NonTVertex because it is a SVertex) + * newViewEdges + * The new ViewEdges that must be add to the ViewMap + */ + ViewVertex * InsertViewVertex(SVertex *iVertex, vector& newViewEdges); + + /* connects a FEdge to the graph trough a SVertex */ + //FEdge * Connect(FEdge *ioEdge, SVertex *ioVertex); +}; + + /**********************************/ + /* */ + /* */ + /* ViewVertex */ + /* */ + /* */ + /**********************************/ + +class ViewEdge; +class SShape; + +namespace ViewVertexInternal { + class edge_const_traits; + class edge_nonconst_traits; + template class edge_iterator_base ; + class orientedViewEdgeIterator; +} // end of namespace ViewEdgeInternal +/*! Class to define a view vertex + * A view vertex is a feature vertex corresponding + * to a point of the image graph, where the characteristics of an + * edge might change (nature, visibility, ...). + * A ViewVertex can be of two kinds: a TVertex when + * it corresponds to the intersection between two + * ViewEdges or a NonTVertex when it corresponds to a + * vertex of the initial input mesh (it is the case + * for vertices such as corners for example). + * Thus, this class can be specialized into two classes, + * the TVertex class and the NonTVertex class. + */ +class LIB_VIEW_MAP_EXPORT ViewVertex : public Interface0D +{ +public: // Implementation of Interface0D + + /*! Returns the string "ViewVertex" .*/ + virtual string getExactTypeName() const { + return "ViewVertex"; + } + +public: + friend class ViewShape; + typedef pair directedViewEdge; // if bool = true, the ViewEdge is incoming + + typedef vector edges_container; + + typedef ViewVertexInternal::edge_iterator_base edge_iterator; + typedef ViewVertexInternal::edge_iterator_base const_edge_iterator; + +private: + + Nature::VertexNature _Nature; + +public: + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void * userdata; + /*! Default constructor.*/ + inline ViewVertex() {userdata = 0;_Nature = Nature::VIEW_VERTEX; } + inline ViewVertex(Nature::VertexNature nature) { + userdata = 0; + _Nature = Nature::VIEW_VERTEX | nature; + } + +protected: + /*! Copy constructor. */ + inline ViewVertex(ViewVertex& iBrother) + { + _Nature = iBrother._Nature; + iBrother.userdata = this; + userdata = 0; + } + /*! Cloning method. */ + virtual ViewVertex * dupplicate() = 0; + +public: + /*! Destructor. */ + virtual ~ViewVertex() {} + + /* accessors */ + /*! Returns the nature of the vertex .*/ + virtual Nature::VertexNature getNature() const { + return _Nature; + } + + /* modifiers */ + /*! Sets the nature of the vertex. */ + inline void setNature(Nature::VertexNature iNature) {_Nature = iNature;} + + /* Replaces old edge by new edge */ + virtual void Replace(ViewEdge *, ViewEdge *) {} + +public: + + /* iterators access */ + // allows iteration on the edges that comes from/goes to + // this vertex in CCW order (order defined in 2D in the image plan) + virtual edge_iterator edges_begin() = 0; + virtual const_edge_iterator edges_begin() const = 0; + virtual edge_iterator edges_end() = 0; + virtual const_edge_iterator edges_end() const = 0; + virtual edge_iterator edges_iterator(ViewEdge *iEdge) = 0; + virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0; + + // Iterator access + /*! Returns an iterator over the ViewEdges that goes to or comes from + * this ViewVertex pointing to the first ViewEdge of the list. + * The orientedViewEdgeIterator allows to iterate in CCW order over these ViewEdges + * and to get the orientation for each ViewEdge (incoming/outgoing). + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() = 0; + /*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, + * pointing after the last ViewEdge. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() = 0; + /*! Returns an orientedViewEdgeIterator pointing to the ViewEdge + * given as argument. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) = 0; + +}; + + /**********************************/ + /* */ + /* */ + /* TVertex */ + /* */ + /* */ + /**********************************/ + +/*! class to define a T vertex, i.e. an intersection between + * two edges. + * It points towards 2 SVertex and 4 View edges. + * Among these ViewEdges, 2 are front and 2 are back. + * Basically the front edge hides part of the back edge. + * So, among the back edges, 1 is of invisibility n + * and the other of visibility n+1 + */ +class LIB_VIEW_MAP_EXPORT TVertex : public ViewVertex +{ +public: + typedef vector edge_pointers_container; +public: // Implementation of Interface0D + + /*! Returns the string "TVertex" .*/ + virtual string getExactTypeName() const { + return "TVertex"; + } + + // Data access methods + /* Returns the 3D x coordinate of the vertex . + * Ambiguous in this case. + */ + virtual real getX() const { + cerr << "Warning: getX() undefined for this point" << endl; + return _FrontSVertex->point3D().x(); + } + + virtual real getY() const { + cerr << "Warning: getX() undefined for this point" << endl; + return _FrontSVertex->point3D().y(); + } + + virtual real getZ() const { + cerr << "Warning: getX() undefined for this point" << endl; + return _FrontSVertex->point3D().z(); + } + + /*! Returns the 3D point. */ + virtual Vec3f getPoint3D() const { + cerr << "Warning: getPoint3D() undefined for this point" << endl; + return _FrontSVertex->getPoint3D(); + } + + /*! Returns the projected 3D x coordinate of the vertex .*/ + virtual real getProjectedX() const { + return _FrontSVertex->point2D().x(); + } + + /*! Returns the projected 3D y coordinate of the vertex .*/ + virtual real getProjectedY() const { + return _FrontSVertex->point2D().y(); + } + + virtual real getProjectedZ() const { + return _FrontSVertex->point2D().z(); + } + + /*! Returns the 2D point. */ + virtual Vec2f getPoint2D() const { + return _FrontSVertex->getPoint2D(); + } + + /*! Returns the Id of the TVertex .*/ + virtual Id getId() const { + return _Id; + } + + /*! Cast the Interface0D in SVertex if it can be. */ + // it can't + /*! Cast the Interface0D in ViewVertex if it can be. */ + virtual ViewVertex * castToViewVertex(){ + return this; + } + + /*! Cast the Interface0D in TVertex if it can be. */ + virtual TVertex * castToTVertex(){ + return this; + } + +private: + SVertex *_FrontSVertex; + SVertex *_BackSVertex; + directedViewEdge _FrontEdgeA; + directedViewEdge _FrontEdgeB; + directedViewEdge _BackEdgeA; + directedViewEdge _BackEdgeB; + Id _Id; // id to identify t vertices . these id will be negative in order not to be mixed with NonTVertex ids. + edge_pointers_container _sortedEdges; // the list of the four ViewEdges, ordered in CCW order (in the image plan) + + +public: + /*! Default constructor.*/ + inline TVertex() : ViewVertex(Nature::T_VERTEX) + { + _FrontSVertex = 0; + _BackSVertex = 0; + _FrontEdgeA.first = 0; + _FrontEdgeB.first = 0; + _BackEdgeA.first = 0; + _BackEdgeB.first = 0; + + } + + inline TVertex(SVertex *svFront, SVertex *svBack) + : ViewVertex(Nature::T_VERTEX) + { + _FrontSVertex = svFront; + _BackSVertex = svBack; + _FrontEdgeA.first = 0; + _FrontEdgeB.first = 0; + _BackEdgeA.first = 0; + _BackEdgeB.first = 0; + svFront->SetViewVertex(this); + svBack->SetViewVertex(this); + } + +protected: + /*! Copy constructor. */ + inline TVertex(TVertex& iBrother) + : ViewVertex(iBrother) + { + _FrontSVertex = iBrother._FrontSVertex; + _BackSVertex = iBrother._BackSVertex; + _FrontEdgeA = iBrother._FrontEdgeA; + _FrontEdgeB = iBrother._FrontEdgeB; + _BackEdgeA = iBrother._BackEdgeA; + _BackEdgeB = iBrother._BackEdgeB; + _sortedEdges = iBrother._sortedEdges; + } + + /*! Cloning method. */ + virtual ViewVertex * dupplicate() + { + TVertex *clone = new TVertex(*this); + return clone; + } + +public: + /* accessors */ + /*! Returns the SVertex that is closer to the viewpoint. */ + inline SVertex *frontSVertex() {return _FrontSVertex;} + /*! Returns the SVertex that is further away from the viewpoint. */ + inline SVertex *backSVertex() {return _BackSVertex;} + inline directedViewEdge& frontEdgeA() {return _FrontEdgeA;} + inline directedViewEdge& frontEdgeB() {return _FrontEdgeB;} + inline directedViewEdge& backEdgeA() {return _BackEdgeA;} + inline directedViewEdge& backEdgeB() {return _BackEdgeB;} + + /* modifiers */ + /*! Sets the SVertex that is closer to the viewpoint. */ + inline void SetFrontVertex(SVertex *iFrontSVertex) {_FrontSVertex = iFrontSVertex;_FrontSVertex->SetViewVertex(this);} + /*! Sets the SVertex that is further away from the viewpoint. */ + inline void SetBackSVertex(SVertex *iBackSVertex) {_BackSVertex = iBackSVertex;_BackSVertex->SetViewVertex(this);} + void SetFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming=true); + void SetFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming=true) ; + void SetBackEdgeA(ViewEdge *iBackEdgeA, bool incoming=true); + void SetBackEdgeB(ViewEdge *iBackEdgeB, bool incoming=true) ; + /*! Sets the Id. */ + inline void SetId(const Id& iId) {_Id = iId;} + + /*! Returns the SVertex (among the 2) belonging to the FEdge iFEdge */ + inline SVertex * GetSVertex(FEdge *iFEdge) + { + const vector& vfEdges = _FrontSVertex->fedges(); + vector::const_iterator fe,fend; + for(fe=vfEdges.begin(),fend=vfEdges.end(); + fe!=fend; + fe++) + { + if((*fe) == iFEdge) + return _FrontSVertex; + } + + const vector& vbEdges = _BackSVertex->fedges(); + for(fe=vbEdges.begin(),fend=vbEdges.end(); + fe!=fend; + fe++) + { + if((*fe) == iFEdge) + return _BackSVertex; + } + return 0; + } + + virtual void Replace(ViewEdge *iOld, ViewEdge *iNew); + + /*! returns the mate edge of iEdgeA. + * For example, if iEdgeA is frontEdgeA, + * then frontEdgeB is returned. If iEdgeA is + * frontEdgeB then frontEdgeA is returned. + * Same for back edges + */ + virtual ViewEdge * mate(ViewEdge* iEdgeA) + { + if(iEdgeA == _FrontEdgeA.first) + return _FrontEdgeB.first; + if(iEdgeA == _FrontEdgeB.first) + return _FrontEdgeA.first; + if(iEdgeA == _BackEdgeA.first) + return _BackEdgeB.first; + if(iEdgeA == _BackEdgeB.first) + return _BackEdgeA.first; + return 0; + } + + /* iterators access */ + virtual edge_iterator edges_begin(); + virtual const_edge_iterator edges_begin() const; + virtual edge_iterator edges_end(); + virtual const_edge_iterator edges_end() const; + virtual edge_iterator edges_iterator(ViewEdge *iEdge); + virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const; + + /*! Returns an iterator over the ViewEdges that goes to or comes from + * this ViewVertex pointing to the first ViewEdge of the list. + * The orientedViewEdgeIterator allows to iterate in CCW order over these ViewEdges + * and to get the orientation for each ViewEdge (incoming/outgoing). + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() ; + /*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, + * pointing after the last ViewEdge. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() ; + /*! Returns an orientedViewEdgeIterator pointing to the ViewEdge + * given as argument. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) ; +}; + + + /**********************************/ + /* */ + /* */ + /* NonTVertex */ + /* */ + /* */ + /**********************************/ + + +// (non T vertex) +/*! View vertex for corners, cusps, etc... + * Associated to a single SVertex. + * Can be associated to 2 or several view edges + */ +class LIB_VIEW_MAP_EXPORT NonTVertex : public ViewVertex +{ +public: + typedef vector edges_container; + +public: // Implementation of Interface0D + + /*! Returns the string "ViewVertex" .*/ + virtual string getExactTypeName() const { + return "NonTVertex"; + } + + // Data access methods + /*! Returns the 3D x coordinate of the vertex .*/ + virtual real getX() const { + return _SVertex->point3D().x(); + } + /*! Returns the 3D y coordinate of the vertex .*/ + virtual real getY() const { + return _SVertex->point3D().y(); + } + + /*! Returns the 3D z coordinate of the vertex .*/ + virtual real getZ() const { + return _SVertex->point3D().z(); + } + + /*! Returns the 3D point. */ + virtual Vec3f getPoint3D() const { + return _SVertex->getPoint3D(); + } + + /*! Returns the projected 3D x coordinate of the vertex .*/ + virtual real getProjectedX() const { + return _SVertex->point2D().x(); + } + + /*! Returns the projected 3D y coordinate of the vertex .*/ + virtual real getProjectedY() const { + return _SVertex->point2D().y(); + } + + /*! Returns the projected 3D z coordinate of the vertex .*/ + virtual real getProjectedZ() const { + return _SVertex->point2D().z(); + } + + /*! Returns the 2D point. */ + virtual Vec2f getPoint2D() const { + return _SVertex->getPoint2D(); + } + + /*! Returns the Id of the vertex .*/ + virtual Id getId() const { + return _SVertex->getId(); + } + + /*! Cast the Interface0D in SVertex if it can be. */ + virtual SVertex * castToSVertex(){ + return _SVertex; + } + + /*! Cast the Interface0D in ViewVertex if it can be. */ + virtual ViewVertex * castToViewVertex(){ + return this; + } + + /*! Cast the Interface0D in NonTVertex if it can be. */ + virtual NonTVertex * castToNonTVertex(){ + return this; + } + +private: + SVertex *_SVertex; + edges_container _ViewEdges; +public: + /*! Default constructor.*/ + inline NonTVertex() : ViewVertex(Nature::NON_T_VERTEX) { _SVertex = 0; } + /*! Builds a NonTVertex from a SVertex. */ + inline NonTVertex(SVertex* iSVertex) : ViewVertex(Nature::NON_T_VERTEX) + { + _SVertex = iSVertex; + _SVertex->SetViewVertex(this); + } +protected: + /*! Copy constructor. */ + inline NonTVertex(NonTVertex& iBrother) + : ViewVertex(iBrother) + { + _SVertex = iBrother._SVertex; + _SVertex->SetViewVertex(this); + _ViewEdges = iBrother._ViewEdges; + } + /*! Cloning method. */ + virtual ViewVertex * dupplicate() + { + NonTVertex *clone = new NonTVertex(*this); + return clone; + } +public: + /*! destructor. */ + virtual ~NonTVertex() {} + + /* accessors */ + /*! Returns the SVertex on top of which this NonTVertex is built. */ + inline SVertex * svertex() {return _SVertex;} + inline edges_container& viewedges() {return _ViewEdges;} + + /* modifiers */ + /*! Sets the SVertex on top of which this NonTVertex is built. */ + inline void SetSVertex(SVertex *iSVertex) {_SVertex = iSVertex;_SVertex->SetViewVertex(this);} + inline void SetViewEdges(const vector& iViewEdges) {_ViewEdges = iViewEdges;} + void AddIncomingViewEdge(ViewEdge * iVEdge) ; + void AddOutgoingViewEdge(ViewEdge * iVEdge) ; + inline void AddViewEdge(ViewEdge * iVEdge, bool incoming=true) { + if(incoming) + AddIncomingViewEdge(iVEdge); + else + AddOutgoingViewEdge(iVEdge); + } + /* Replaces old edge by new edge */ + virtual void Replace(ViewEdge *iOld, ViewEdge *iNew) + { + + edges_container::iterator insertedve; + for(edges_container::iterator ve=_ViewEdges.begin(),vend=_ViewEdges.end(); + ve!=vend; + ve++) + { + if((ve)->first == iOld) + { + insertedve = _ViewEdges.insert(ve, directedViewEdge(iNew, ve->second));// inserts e2 before ve. + // returns an iterator pointing toward e2. ve is invalidated. + // we want to remove e1, but we can't use ve anymore: + insertedve++; // insertedve points now to e1 + _ViewEdges.erase(insertedve); + return; + } + } + } + + + /* iterators access */ + virtual edge_iterator edges_begin(); + virtual const_edge_iterator edges_begin() const; + virtual edge_iterator edges_end(); + virtual const_edge_iterator edges_end() const; + virtual edge_iterator edges_iterator(ViewEdge *iEdge); + virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const; + + /*! Returns an iterator over the ViewEdges that goes to or comes from + * this ViewVertex pointing to the first ViewEdge of the list. + * The orientedViewEdgeIterator allows to iterate in CCW order over these ViewEdges + * and to get the orientation for each ViewEdge (incoming/outgoing). + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() ; + /*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, + * pointing after the last ViewEdge. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() ; + /*! Returns an orientedViewEdgeIterator pointing to the ViewEdge + * given as argument. + */ + virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) ; +}; + + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + +/* Geometry(normals...) + Nature of edges + 2D spaces (1or2, material, z...) + Parent Shape + 3D Shading, material + Importance + Occluders + */ +class ViewShape; + +namespace ViewEdgeInternal { + template class edge_iterator_base ; + template class fedge_iterator_base ; + template class vertex_iterator_base ; +} // end of namespace ViewEdgeInternal + +/*! Class defining a ViewEdge. A ViewEdge in an edge + * of the image graph. it connnects two ViewVertex. + * It is made by connecting a set of FEdges. + */ +class LIB_VIEW_MAP_EXPORT ViewEdge : public Interface1D +{ +public: // Implementation of Interface0D + + /*! Returns the string "ViewEdge" .*/ + virtual string getExactTypeName() const { + return "ViewEdge"; + } + + // Data access methods + /*! Returns the Id of the vertex .*/ + virtual Id getId() const { + return _Id; + } + + /*! Returns the nature of the ViewEdge. */ + virtual Nature::EdgeNature getNature() const { + return _Nature; + } + +public: + + typedef SVertex vertex_type; + friend class ViewShape; + // for ViewEdge iterator + typedef ViewEdgeInternal::edge_iterator_base > edge_iterator; + typedef ViewEdgeInternal::edge_iterator_base > const_edge_iterator; + // for fedge iterator + typedef ViewEdgeInternal::fedge_iterator_base > fedge_iterator; + typedef ViewEdgeInternal::fedge_iterator_base > const_fedge_iterator; + // for svertex iterator + typedef ViewEdgeInternal::vertex_iterator_base > vertex_iterator; + typedef ViewEdgeInternal::vertex_iterator_base > const_vertex_iterator; +private: + + ViewVertex * __A; // edge starting vertex + ViewVertex * __B; // edge ending vertex + Nature::EdgeNature _Nature; // nature of view edge + ViewShape *_Shape; // shape to which the view edge belongs + FEdge * _FEdgeA; // first edge of the embedded fedges chain + FEdge * _FEdgeB; // last edge of the embedded fedges chain + Id _Id; + unsigned _ChainingTimeStamp; + ViewShape *_aShape; // The silhouette view edge separates 2 2D spaces. The one on the left is + // necessarly the Shape _Shape (the one to which this edge belongs to) + // and _aShape is the one on its right // NON GERE PAR LE COPY CONSTRUCTEUR + int _qi; + vector _Occluders; + + // tmp + Id * _splittingId; + +public: + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void * userdata; + /*! Default constructor.*/ + inline ViewEdge() { + __A=0; + __B=0; + _FEdgeA = 0; + _FEdgeB = 0; + _ChainingTimeStamp = 0; + _qi = 0; + _aShape=0; + userdata = 0; + _splittingId = 0; + } + inline ViewEdge(ViewVertex* iA, ViewVertex *iB) + { + __A = iA; + __B = iB; + _FEdgeA = 0; + _FEdgeB = 0; + _Shape = 0; + _ChainingTimeStamp = 0; + _aShape = 0; + _qi = 0; + userdata = 0; + _splittingId = 0; + } + inline ViewEdge(ViewVertex* iA, ViewVertex *iB, FEdge *iFEdgeA) + { + __A = iA; + __B = iB; + _FEdgeA = iFEdgeA; + _FEdgeB = 0; + _Shape = 0; + _ChainingTimeStamp = 0; + _aShape = 0; + _qi = 0; + userdata = 0; + _splittingId = 0; + } + inline ViewEdge(ViewVertex* iA, ViewVertex *iB, FEdge *iFEdgeA, FEdge *iFEdgeB, ViewShape *iShape) + { + __A = iA; + __B = iB; + _FEdgeA = iFEdgeA; + _FEdgeB = iFEdgeB; + _Shape = iShape; + _ChainingTimeStamp = 0; + _aShape = 0; + _qi = 0; + userdata = 0; + _splittingId = 0; + UpdateFEdges(); // tells every FEdge between iFEdgeA and iFEdgeB that this is theit ViewEdge + } +protected: + /*! Copy constructor. */ + inline ViewEdge(ViewEdge& iBrother) + { + __A = iBrother.__A; + __B = iBrother.__B; + _FEdgeA = iBrother._FEdgeA; + _FEdgeB = iBrother._FEdgeB; + _Nature = iBrother._Nature; + _Shape = 0; + _Id = iBrother._Id; + _ChainingTimeStamp = iBrother._ChainingTimeStamp; + _aShape = iBrother._aShape; + _qi = iBrother._qi; + _splittingId = 0; + iBrother.userdata = this; + userdata = 0; + } + /*! Cloning method. */ + virtual ViewEdge * dupplicate() + { + ViewEdge *clone = new ViewEdge(*this); + return clone; + } + +public: + /*! Destructor. */ + virtual ~ViewEdge() + { + // if(0 != _aFace) + // { + // delete _aFace; + // _aFace = 0; + // } + // only the last splitted deletes this id + if(_splittingId){ + if(*_splittingId == _Id) + delete _splittingId; + } + } + + /* accessors */ + /*! Returns the first ViewVertex. */ + inline ViewVertex* A() {return __A;} + /*! Returns the second ViewVertex. */ + inline ViewVertex* B() {return __B;} + /*! Returns the first FEdge that constitues this ViewEdge. */ + inline FEdge* fedgeA() {return _FEdgeA;} + /*! Returns the last FEdge that constitues this ViewEdge. */ + inline FEdge* fedgeB() {return _FEdgeB;} + /*! Returns the ViewShape to which this ViewEdge belongs to .*/ + inline ViewShape * viewShape() {return _Shape;} + /*! Returns the shape that is occluded by the ViewShape + * to which this ViewEdge belongs to. If no object is occluded, + * 0 is returned. + * \return The occluded ViewShape. + */ + inline ViewShape * aShape() {return _aShape;} + /*! Tells whether this ViewEdge forms a closed loop + * or not. + */ + inline bool isClosed() + { + if(__B == 0) + return true; + return false; + } + /*! Returns the time stamp of this ViewEdge. */ + inline unsigned getChainingTimeStamp() {return _ChainingTimeStamp;} + inline const ViewShape * aShape() const {return _aShape;} + inline const ViewShape * bShape() const {return _Shape;} + inline vector& occluders() {return _Occluders;} + inline Id * splittingId() {return _splittingId;} + + /* modifiers */ + /*! Sets the first ViewVertex of the ViewEdge. */ + inline void SetA(ViewVertex* iA) { __A = iA; } + /*! Sets the last ViewVertex of the ViewEdge. */ + inline void SetB(ViewVertex* iB) { __B = iB; } + /*! Sets the nature of the ViewEdge. */ + inline void SetNature(Nature::EdgeNature iNature) { _Nature = iNature; } + /*! Sets the first FEdge of the ViewEdge. */ + inline void SetFEdgeA(FEdge* iFEdge) { _FEdgeA = iFEdge; } + /*! Sets the last FEdge of the ViewEdge. */ + inline void SetFEdgeB(FEdge* iFEdge) { _FEdgeB = iFEdge; } + /*! Sets the ViewShape to which this ViewEdge belongs to.*/ + inline void SetShape(ViewShape *iVShape) + { + _Shape = iVShape; + } + /*! Sets the ViewEdge id. */ + inline void SetId(const Id& id) {_Id = id;} + /*! Sets Viewedge to this for all embedded fedges */ + void UpdateFEdges(); + /*! Sets the occluded ViewShape */ + inline void SetaShape(ViewShape * iShape) {_aShape = iShape;} + /*! Sets the quantitative invisibility value. */ + inline void SetQI(int qi) {_qi = qi;} + /*! Sets the time stamp value. */ + inline void setChainingTimeStamp(unsigned ts) {_ChainingTimeStamp = ts;} + inline void AddOccluder(ViewShape *iShape) {_Occluders.push_back(iShape);} + inline void setSplittingId(Id * id) {_splittingId = id;} + + /* stroke interface definition */ + inline bool intersect_2d_area(const Vec2r& iMin, const Vec2r& iMax) const + { + // parse edges to check if one of them is intersection the region: + FEdge * current = _FEdgeA; + do + { + if(GeomUtils::intersect2dSeg2dArea(iMin,iMax, + Vec2r(current->vertexA()->point2D()[0],current->vertexA()->point2D()[1]), + Vec2r(current->vertexB()->point2D()[0],current->vertexB()->point2D()[1]))) + + return true; + current = current->nextEdge(); + }while((current != 0) && (current != _FEdgeA)); + + return false; + } + inline bool include_in_2d_area(const Vec2r& iMin, const Vec2r& iMax) const + { + // parse edges to check if all of them are intersection the region: + FEdge * current = _FEdgeA; + + do + { + if(!GeomUtils::include2dSeg2dArea(iMin,iMax, + Vec2r(current->vertexA()->point2D()[0],current->vertexA()->point2D()[1]), + Vec2r(current->vertexB()->point2D()[0],current->vertexB()->point2D()[1]))) + return false; + current = current->nextEdge(); + }while((current != 0) && (current != _FEdgeA)); + + return true; + } + + /* Information access interface */ + + //inline Nature::EdgeNature viewedge_nature() const {return getNature();} + //float viewedge_length() const ; + /*! Returns the 2D length of the Viewedge. */ + real getLength2D() const; + //inline Material material() const {return _FEdgeA->vertexA()->shape()->material();} + inline int qi() const {return _qi;} + inline occluder_container::const_iterator occluders_begin() const {return _Occluders.begin();} + inline occluder_container::const_iterator occluders_end() const {return _Occluders.end();} + inline int occluders_size() const {return _Occluders.size();} + inline bool occluders_empty() const {return _Occluders.empty();} + inline const Polygon3r& occludee() const {return (_FEdgeA->aFace());} + inline const SShape * occluded_shape() const ; + inline const bool occludee_empty() const {if(_aShape == 0) return true; return false;} + //inline real z_discontinuity(int iCombination = 0) const ; + inline Id shape_id() const {return _FEdgeA->vertexA()->shape()->getId();} + inline const SShape * shape() const {return _FEdgeA->vertexA()->shape();} + inline float shape_importance() const {return _FEdgeA->shape_importance();} + + /* iterators access */ + // view edge iterator + edge_iterator ViewEdge_iterator(); + const_edge_iterator ViewEdge_iterator() const; + // feature edge iterator + fedge_iterator fedge_iterator_begin(); + const_fedge_iterator fedge_iterator_begin() const; + fedge_iterator fedge_iterator_last(); + const_fedge_iterator fedge_iterator_last() const; + fedge_iterator fedge_iterator_end(); + const_fedge_iterator fedge_iterator_end() const; + // embedding vertex iterator + const_vertex_iterator vertices_begin() const; + vertex_iterator vertices_begin(); + const_vertex_iterator vertices_last() const; + vertex_iterator vertices_last(); + const_vertex_iterator vertices_end() const; + vertex_iterator vertices_end(); + + // Iterator access (Interface1D) + /*! Returns an Interface0DIterator to iterate over + * the SVertex constituing the embedding of this ViewEdge. + * The returned Interface0DIterator points to the first + * SVertex of the ViewEdge. + */ + virtual Interface0DIterator verticesBegin(); + /*! Returns an Interface0DIterator to iterate over + * the SVertex constituing the embedding of this ViewEdge. + * The returned Interface0DIterator points after the last + * SVertex of the ViewEdge. + */ + virtual Interface0DIterator verticesEnd(); + + /*! Returns an Interface0DIterator to iterate over + * the points of this ViewEdge at a given resolution. + * The returned Interface0DIterator points on the first + * Point of the ViewEdge. + * \param t + * the sampling value. + */ + virtual Interface0DIterator pointsBegin(float t=0.f); + /*! Returns an Interface0DIterator to iterate over + * the points of this ViewEdge at a given resolution. + * The returned Interface0DIterator points after the last + * Point of the ViewEdge. + * \param t + * the sampling value. + */ + virtual Interface0DIterator pointsEnd(float t=0.f); +}; + + + + /**********************************/ + /* */ + /* */ + /* ViewShape */ + /* */ + /* */ + /**********************************/ + +/*! Class gathering the elements of the ViewMap (ViewVertex, ViewEdge) + * that are issued from the same input shape. + */ +class LIB_VIEW_MAP_EXPORT ViewShape +{ +private: + vector _Vertices; + vector _Edges; + SShape * _SShape; + + +public: + /*! A field that can be used by the user to store any data. + * This field must be reseted afterwards using ResetUserData(). + */ + void* userdata; + /*! Default constructor.*/ + inline ViewShape() { userdata = 0; _SShape = 0;} + /*! Builds a ViewShape from a SShape. */ + inline ViewShape(SShape *iSShape) {userdata = 0; _SShape = iSShape;}//_SShape->SetViewShape(this);} + /*! Copy constructor. */ + inline ViewShape(ViewShape& iBrother) + { + userdata = 0; + vector::iterator vv,vvend; + vector::iterator ve, veend; + + _SShape = iBrother._SShape; + + vector& vvertices = iBrother.vertices(); + // dupplicate vertices + for(vv=vvertices.begin(), vvend=vvertices.end(); + vv!=vvend; + vv++) + { + ViewVertex * newVertex = (*vv)->dupplicate(); + AddVertex(newVertex); + } + + vector& vvedges = iBrother.edges(); + // dupplicate edges + for(ve=vvedges.begin(), veend=vvedges.end(); + ve!=veend; + ve++) + { + ViewEdge * newEdge = (*ve)->dupplicate(); + AddEdge(newEdge); // here the shape is set as the edge's shape + } + + //------------------------- + // remap edges in vertices: + //------------------------- + for(vv=_Vertices.begin(), vvend=_Vertices.end(); + vv!=vvend; + vv++) + { + switch((*vv)->getNature()) + { + case Nature::T_VERTEX: + { + TVertex *v = (TVertex*)(*vv); + ViewEdge *veFrontA = (ViewEdge*)(v)->frontEdgeA().first->userdata; + ViewEdge *veFrontB = (ViewEdge*)(v)->frontEdgeB().first->userdata; + ViewEdge *veBackA = (ViewEdge*)(v)->backEdgeA().first->userdata; + ViewEdge *veBackB = (ViewEdge*)(v)->backEdgeB().first->userdata; + + v->SetFrontEdgeA(veFrontA, v->frontEdgeA().second); + v->SetFrontEdgeB(veFrontB, v->frontEdgeB().second); + v->SetBackEdgeA(veBackA, v->backEdgeA().second); + v->SetBackEdgeB(veBackB, v->backEdgeB().second); + } + break; + case Nature::NON_T_VERTEX: + { + NonTVertex * v = (NonTVertex*)(*vv); + vector& vedges = (v)->viewedges(); + vector newEdges; + for(vector::iterator ve=vedges.begin(), veend=vedges.end(); + ve!=veend; + ve++) + { + ViewEdge *current = (ViewEdge*)((ve)->first)->userdata; + newEdges.push_back(ViewVertex::directedViewEdge(current, ve->second)); + } + (v)->SetViewEdges(newEdges); + } + break; + default: + ; + } + } + + //------------------------------------- + // remap vertices in edges: + //------------------------------------- + for(ve=_Edges.begin(),veend=_Edges.end(); + ve!=veend; + ve++) + { + (*ve)->SetA((ViewVertex*)((*ve)->A()->userdata)); + (*ve)->SetB((ViewVertex*)((*ve)->B()->userdata)); + //--------------------------------------- + // Update all embedded FEdges + //--------------------------------------- + (*ve)->UpdateFEdges(); + } + + + // reset all brothers userdata to NULL: + //------------------------------------- + //--------- + // vertices + //--------- + for(vv=vvertices.begin(),vvend=vvertices.end(); + vv!=vvend; + vv++) + { + (*vv)->userdata = NULL; + } + + //------ + // edges + //------ + for(ve=vvedges.begin(),veend=vvedges.end(); + ve!=veend; + ve++) + { + (*ve)->userdata = NULL; + } + } + + /*! Cloning method. */ + virtual ViewShape * dupplicate() + { + ViewShape *clone = new ViewShape(*this); + return clone; + } + + /*! Destructor. */ + virtual ~ViewShape(); + + /* splits a view edge into several view edges. + * fe + * The FEdge that gets splitted + * iViewVertices + * The view vertices corresponding to the different intersections for the edge fe. + * This list need to be sorted such as the first view vertex is the + * farther away from fe->vertexA. + * ioNewEdges + * The feature edges that are newly created (the initial edges are not + * included) are added to this list. + * ioNewViewEdges + * The view edges that are newly created (the initial edges are not + * included) are added to this list. + */ + inline void SplitEdge(FEdge *fe, + const vector& iViewVertices, + vector& ioNewEdges, + vector& ioNewViewEdges); + /* accessors */ + /*! Returns the SShape on top of which this ViewShape is built. */ + inline SShape * sshape() {return _SShape;} + /*! Returns the SShape on top of which this ViewShape is built. */ + inline const SShape * sshape() const {return _SShape;} + /*! Returns the list of ViewVertex contained in this ViewShape. */ + inline vector& vertices() {return _Vertices;} + /*! Returns the list of ViewEdge contained in this ViewShape. */ + inline vector& edges() {return _Edges;} + /*! Returns the ViewShape id. */ + inline Id getId() const {return _SShape->getId();} + + /* modifiers */ + /*! Sets the SShape on top of which the ViewShape is built. */ + inline void SetSShape(SShape* iSShape) {_SShape = iSShape;} + /*! Sets the list of ViewVertex contained in this ViewShape. */ + inline void SetVertices(const vector& iVertices) {_Vertices = iVertices;} + /*! Sets the list of ViewEdge contained in this ViewShape. */ + inline void SetEdges(const vector& iEdges) {_Edges = iEdges;} + /*! Adds a ViewVertex to the list. */ + inline void AddVertex(ViewVertex *iVertex) + { + _Vertices.push_back(iVertex); + //_SShape->AddNewVertex(iVertex->svertex()); + } + /*! Adds a ViewEdge to the list */ + inline void AddEdge(ViewEdge *iEdge) + { + _Edges.push_back(iEdge); + iEdge->SetShape(this); + //_SShape->AddNewEdge(iEdge->fedge()); + } + + /* removes the view edge iViewEdge in the + * View Shape and the associated FEdge chain entry + * in the underlying SShape + */ + void RemoveEdge(ViewEdge * iViewEdge); + + /* removes the view vertex iViewVertex in the + * View Shape. + */ + void RemoveVertex(ViewVertex * iViewVertex); +}; + + + +/* + + ############################################# + ############################################# + ############################################# + ###### ###### + ###### I M P L E M E N T A T I O N ###### + ###### ###### + ############################################# + ############################################# + ############################################# + +*/ +/* for inline functions */ + +void ViewShape::SplitEdge(FEdge *fe, + const vector& iViewVertices, + vector& ioNewEdges, + vector& ioNewViewEdges) +{ + ViewEdge *vEdge = fe->viewedge(); + + + // We first need to sort the view vertices from farther to closer to fe->vertexA + + SVertex *sv, *sv2; + ViewVertex *vva, *vvb; + vector::const_iterator vv, vvend; + for(vv=iViewVertices.begin(), vvend = iViewVertices.end(); + vv!=vvend; + vv++) + { + // Add the viewvertices to the ViewShape + AddVertex((*vv)); + + // retrieve the correct SVertex from the view vertex + //-------------------------------------------------- + sv = (*vv)->frontSVertex(); + sv2 = (*vv)->backSVertex(); + + if(sv->shape() != sv2->shape()) + { + if(sv->shape() != _SShape) + sv = sv2; + } + else + { + // if the shape is the same we can safely differ + // the two vertices using their ids: + if(sv->getId() != fe->vertexA()->getId()) + sv = sv2; + } + + vva = vEdge->A(); + vvb = vEdge->B(); + + // We split Fedge AB into AA' and A'B. A' and A'B are created. + // AB becomes (address speaking) AA'. B is updated. + //-------------------------------------------------- + SShape * shape = fe->shape(); + + // a new edge, A'B is created. + FEdge *newEdge = shape->SplitEdgeIn2(fe, sv); + + ioNewEdges.push_back(newEdge); + ViewEdge *newVEdge; + + if((vva == 0) || (vvb == 0)) // that means we're dealing with a closed viewedge (loop) + { + // remove the chain that was starting by the fedge A of vEdge (which is different from fe !!!!) + shape->RemoveEdgeFromChain(vEdge->fedgeA()); + // we set + vEdge->SetA(*vv); + vEdge->SetB(*vv); + vEdge->SetFEdgeA(newEdge); + //FEdge *previousEdge = newEdge->previousEdge(); + vEdge->SetFEdgeB(fe); + newVEdge = vEdge; + vEdge->fedgeA()->SetViewEdge(newVEdge); + } + else + { + + // while we create the view edge, it updates the "ViewEdge" pointer + // of every underlying FEdges to this. + newVEdge = new ViewEdge((*vv),vvb);//, newEdge, vEdge->fedgeB()); + newVEdge->SetNature((fe)->getNature()); + newVEdge->SetFEdgeA(newEdge); + //newVEdge->SetFEdgeB(fe); + // If our original viewedge is made of one FEdge, + // then + if((vEdge->fedgeA() == vEdge->fedgeB()) || (fe == vEdge->fedgeB())) + newVEdge->SetFEdgeB(newEdge); + else + newVEdge->SetFEdgeB(vEdge->fedgeB()); //MODIF + + Id * newId = vEdge->splittingId(); + if(newId == 0){ + newId = new Id(vEdge->getId()); + vEdge->setSplittingId(newId); + } + newId->setSecond(newId->getSecond()+1); + newVEdge->SetId(*newId); + newVEdge->setSplittingId(newId); + // Id id(vEdge->getId().getFirst(), vEdge->getId().getSecond()+1); + // newVEdge->SetId(vEdge->getId()); + // vEdge->SetId(id); + + AddEdge(newVEdge); // here this shape is set as the edge's shape + + // add new edge to the list of new edges passed as argument: + ioNewViewEdges.push_back(newVEdge); + + + + if(0 != vvb) + vvb->Replace((vEdge), newVEdge); + + // we split the view edge: + vEdge->SetB((*vv)); + vEdge->SetFEdgeB(fe); //MODIF + + // Update fedges so that they point to the new viewedge: + newVEdge->UpdateFEdges(); + + } + // check whether this vertex is a front vertex or a back + // one + + if(sv == (*vv)->frontSVertex()) + { + // -- View Vertex A' -- + (*vv)->SetFrontEdgeA(vEdge, true); + (*vv)->SetFrontEdgeB(newVEdge, false); + } + else + { + // -- View Vertex A' -- + (*vv)->SetBackEdgeA(vEdge, true); + (*vv)->SetBackEdgeB(newVEdge, false); + } + } +} + + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + + +// inline Vec3r ViewEdge::orientation2d(int iCombination) const +// { +// return edge_orientation2d_function(*this, iCombination); +// } + +// inline Vec3r ViewEdge::orientation3d(int iCombination) const +// { +// return edge_orientation3d_function(*this, iCombination); +// } + +// inline real ViewEdge::z_discontinuity(int iCombination) const +// { +// return z_discontinuity_edge_function(*this, iCombination); +// } + +// inline float ViewEdge::local_average_depth(int iCombination ) const +// { +// return local_average_depth_edge_function(*this, iCombination); +// } + +// inline float ViewEdge::local_depth_variance(int iCombination) const +// { +// return local_depth_variance_edge_function(*this, iCombination); +// } + +// inline real ViewEdge::local_average_density(float sigma, int iCombination) const +// { +// return density_edge_function(*this, iCombination); +// } + +inline const SShape * ViewEdge::occluded_shape() const +{ + if(0 == _aShape) + return 0; + return _aShape->sshape(); +} + +// inline Vec3r ViewEdge::curvature2d_as_vector(int iCombination) const +// { +// return curvature2d_as_vector_edge_function(*this, iCombination); +// } + +// inline real ViewEdge::curvature2d_as_angle(int iCombination) const +// { +// return curvature2d_as_angle_edge_function(*this, iCombination); +// } + + +#endif // VIEWMAP_H diff --git a/extern/freestyle/src/view_map/ViewMapAdvancedIterators.h b/extern/freestyle/src/view_map/ViewMapAdvancedIterators.h new file mode 100755 index 00000000000..bb2d916f2df --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapAdvancedIterators.h @@ -0,0 +1,691 @@ +// +// Filename : ViewMapAdvancedIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the various elements of the ViewMap +// These iterators can't be exported to python. +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAPADVANCEDITERATORS_H +# define VIEWMAPADVANCEDITERATORS_H + +#include "ViewMap.h" + + + /**********************************/ + /* */ + /* */ + /* ViewMap */ + /* */ + /* */ + /**********************************/ + + /**********************************/ + /* */ + /* */ + /* ViewVertex */ + /* */ + /* */ + /**********************************/ + +namespace ViewVertexInternal{ + + class edge_const_traits : public Const_traits< ::ViewVertex::directedViewEdge> { + public: + typedef vector< ::ViewVertex::directedViewEdge> edges_container; + typedef edges_container::const_iterator edges_container_iterator ; + typedef vector< ::ViewVertex::directedViewEdge*> edge_pointers_container; + typedef edge_pointers_container::const_iterator edge_pointers_container_iterator ; + }; + class edge_nonconst_traits : public Nonconst_traits< ::ViewVertex::directedViewEdge> { + public: + typedef vector< ::ViewVertex::directedViewEdge> edges_container; + typedef edges_container::iterator edges_container_iterator ; + typedef vector< ::ViewVertex::directedViewEdge*> edge_pointers_container; + typedef edge_pointers_container::iterator edge_pointers_container_iterator ; + }; + +template + class edge_iterator_base : public IteratorBase + { + public: + typedef typename Traits::value_type value_type; + typedef typename Traits::difference_type difference_type; + typedef typename Traits::pointer pointer; + typedef typename Traits::reference reference; + typedef edge_iterator_base Self; + typedef typename Traits::edges_container_iterator edges_container_iterator; + typedef typename Traits::edge_pointers_container_iterator edge_pointers_container_iterator; + typedef edge_iterator_base iterator; + typedef edge_iterator_base const_iterator; + public: + friend class ViewVertex; + friend class TVertex; + friend class NonTVertex; + friend class ViewEdge; + friend class edge_iterator; + protected: + Nature::VertexNature _Nature; // the nature of the underlying vertex + // T vertex attributes + edge_pointers_container_iterator _tbegin; + edge_pointers_container_iterator _tend; + edge_pointers_container_iterator _tvertex_iter; + + // mutable value_type _tvertex_iter; + // value_type _feA; + // value_type _feB; + // value_type _beA; + // value_type _beB; + + // Non TVertex attributes + edges_container_iterator _begin; + edges_container_iterator _end; + edges_container_iterator _nontvertex_iter; + + typedef IteratorBase parent_class; + + public: + inline edge_iterator_base() : parent_class() {} + inline edge_iterator_base(Nature::VertexNature iNature) + : parent_class() + {_Nature = iNature;} + edge_iterator_base(const edge_iterator_base& iBrother) + : parent_class(iBrother) + { + _Nature = iBrother._Nature; + if(_Nature & Nature::T_VERTEX) + { + // _feA = iBrother._feA; + // _feB = iBrother._feB; + // _beA = iBrother._beA; + // _beB = iBrother._beB; + // _tvertex_iter = iBrother._tvertex_iter; + _tbegin = iBrother._tbegin; + _tend = iBrother._tend; + _tvertex_iter = iBrother._tvertex_iter; + } + else + { + _begin = iBrother._begin; + _end = iBrother._end; + _nontvertex_iter = iBrother._nontvertex_iter; + } + } + edge_iterator_base(const edge_iterator_base& iBrother) + : parent_class(iBrother) + { + _Nature = iBrother._Nature; + if(_Nature & Nature::T_VERTEX) + { + // _feA = iBrother._feA; + // _feB = iBrother._feB; + // _beA = iBrother._beA; + // _beB = iBrother._beB; + // _tvertex_iter = iBrother._tvertex_iter; + _tbegin = iBrother._tbegin; + _tend = iBrother._tend; + _tvertex_iter = iBrother._tvertex_iter; + } + else + { + _begin = iBrother._begin; + _end = iBrother._end; + _nontvertex_iter = iBrother._nontvertex_iter; + } + } + virtual ~edge_iterator_base() {} + //protected://FIXME + public: + // inline edge_iterator_base(value_type ifeA, + // value_type ifeB, + // value_type ibeA, + // value_type ibeB, + // value_type iter) + // : parent_class() + // { + // _Nature = Nature::T_VERTEX; + // _feA = ifeA; + // _feB = ifeB; + // _beA = ibeA; + // _beB = ibeB; + // _tvertex_iter = iter; + // } + inline edge_iterator_base(edge_pointers_container_iterator begin, + edge_pointers_container_iterator end, + edge_pointers_container_iterator iter) + : parent_class() + { + _Nature = Nature::T_VERTEX; + _tbegin = begin; + _tend = end; + _tvertex_iter = iter; + } + inline edge_iterator_base(edges_container_iterator begin, + edges_container_iterator end, + edges_container_iterator iter) + : parent_class() + { + _Nature = Nature::NON_T_VERTEX; + _begin = begin; + _end = end; + _nontvertex_iter = iter; + } + + public: + + + virtual bool begin() const + { + if(_Nature & Nature::T_VERTEX) + return (_tvertex_iter == _tbegin); + //return (_tvertex_iter == _feA); + else + return (_nontvertex_iter == _begin); + } + virtual bool end() const + { + if(_Nature & Nature::T_VERTEX) + //return (_tvertex_iter.first == 0); + return (_tvertex_iter == _tend); + else + return (_nontvertex_iter == _end); + } + + // operators + virtual Self& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + virtual Self operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + if(_Nature & Nature::T_VERTEX) + return (_tvertex_iter != b._tvertex_iter); + else + return (_nontvertex_iter != b._nontvertex_iter); + } + + virtual bool operator==(const Self& b) const + {return !(*this != b);} + + // dereferencing + virtual reference operator*() const + { + if(_Nature & Nature::T_VERTEX) + //return _tvertex_iter; + return **_tvertex_iter; + else + return (*_nontvertex_iter); + } + virtual pointer operator->() const { return &(operator*());} + + protected: + inline void increment() + { + if(_Nature & Nature::T_VERTEX) + { + value_type tmp = (**_tvertex_iter); + ++_tvertex_iter; + value_type tmp2 = (**_tvertex_iter); + if(tmp2.first == tmp.first) + ++_tvertex_iter; + // // Hack to deal with cusp. the result of a cusp + // // is a TVertex having two identical viewedges. + // // In order to iterate properly, we chose to + // // to skip these last ones. + // if(_feB.first == _beA.first) + // { + // if(_feA.first == _beB.first) + // { + // _tvertex_iter.first = 0; + // return; + // } + // + // if(_tvertex_iter.first == _feA.first) + // _tvertex_iter.first = _beB.first; + // else if(_tvertex_iter.first == _beB.first) + // _tvertex_iter.first = 0; + // else + // _tvertex_iter.first = _feA.first; + // return; + // } + // if(_feA.first == _beB.first) + // { + // if(_feB.first == _beA.first) + // { + // _tvertex_iter.first = 0; + // return; + // } + // + // if(_tvertex_iter.first == _feB.first) + // _tvertex_iter.first = _beA.first; + // else if(_tvertex_iter.first == _beA.first) + // _tvertex_iter.first = 0; + // else + // _tvertex_iter.first = _feB.first; + // return; + // } + // // End of hack + // + // if(_tvertex_iter.first == _feA.first){ + // // we return bea or beb + // + // + // // choose one of them + // + // _tvertex_iter.first = _feB.first; + // return; + // } + // if(_tvertex_iter.first == _feB.first) + // { + // _tvertex_iter.first = _beA.first; + // return; + // } + // if(_tvertex_iter.first == _beA.first) + // { + // _tvertex_iter.first = _beB.first; + // return; + // } + // if(_tvertex_iter.first == _beB.first) + // { + // _tvertex_iter.first = 0; + // return; + // } + } + else + ++_nontvertex_iter; + } + }; + + } + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + +namespace ViewEdgeInternal { + + /*!----------------------*/ + /*! Iterators definition */ + /*!----------------------*/ + template + class edge_iterator_base : public IteratorBase + { + public: + typedef typename Traits::value_type value_type; + typedef typename Traits::difference_type difference_type; + typedef typename Traits::pointer pointer; + typedef typename Traits::reference reference; + typedef edge_iterator_base Self; + public: + mutable value_type _ViewEdge; + //friend class edge_iterator_base >; + //friend class edge_iterator_base >; + value_type _first; + bool _orientation; + typedef IteratorBase parent_class; + + public: + friend class ViewEdge; + inline edge_iterator_base() + : parent_class() + {_orientation=true;_first=0;} + + inline edge_iterator_base(const edge_iterator_base >& iBrother) + : parent_class() + { + _ViewEdge = iBrother._ViewEdge; + _first = iBrother._first; + _orientation = iBrother._orientation; + } + + inline edge_iterator_base(const edge_iterator_base >& iBrother) + : parent_class() + { + _ViewEdge = iBrother._ViewEdge; + _first = iBrother._first; + _orientation = iBrother._orientation; + } + + //protected://FIXME + public: + inline edge_iterator_base(value_type iEdge, bool orientation = true) + : parent_class() + { + _ViewEdge = iEdge; + _first = iEdge; + _orientation = orientation; + } + + + public: + virtual Self* clone() const + { + return new edge_iterator_base(*this); + } + virtual ~edge_iterator_base() {} + + public: + + virtual bool orientation() {return _orientation;} + virtual void set_edge(value_type iVE) {_ViewEdge=iVE;} + virtual void set_orientation(bool iOrientation) {_orientation = iOrientation;} + virtual void change_orientation() {_orientation = !_orientation;} + + // operators + inline Self& operator++() // operator corresponding to ++i + { + //++_ViewEdge->getTimeStamp(); + increment(); + return *this; + } + inline Self operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + //++_ViewEdge->getTimeStamp(); + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + inline Self& operator--() // operator corresponding to ++i + { + //++_ViewEdge->getTimeStamp(); + decrement(); + return *this; + } + inline Self operator--(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + //++_ViewEdge->getTimeStamp(); + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + decrement(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + return (_ViewEdge != b._ViewEdge); + } + virtual bool operator==(const Self& b) const + { + return !(*this != b); + } + + // dereferencing + virtual reference operator*() const {return (_ViewEdge);} + virtual pointer operator->() const { return &(operator*());} + + public: + virtual bool begin() const {return _ViewEdge==_first ? true : false;} + virtual bool end() const {return _ViewEdge==0 ? true : false;} + + protected: + virtual void increment() {} + virtual void decrement() {} + }; + + template + class fedge_iterator_base : public IteratorBase + { + public: + typedef typename Traits::value_type value_type; + typedef typename Traits::difference_type difference_type; + typedef typename Traits::pointer pointer; + typedef typename Traits::reference reference; + typedef fedge_iterator_base Self; + public: + typedef IteratorBase parent_class; + mutable value_type _FEdge; + value_type _first; + value_type _FEdgeB; // last fedge of the view edge + + public: + friend class ::ViewEdge; + friend class fedge_iterator; + inline fedge_iterator_base() + : parent_class() + {} + inline fedge_iterator_base(const fedge_iterator_base >& iBrother) + : parent_class() + { + _FEdge = iBrother._FEdge; + _first = iBrother._first; + _FEdgeB = iBrother._FEdgeB; + } + inline fedge_iterator_base(const fedge_iterator_base >& iBrother) + : parent_class() + { + _FEdge = iBrother._FEdge; + _first = iBrother._first; + _FEdgeB = iBrother._FEdgeB; + } + //protected://FIXME + public: + inline fedge_iterator_base(value_type iEdge, value_type iFEdgeB) + : parent_class() + { + _FEdge = iEdge; + _first = iEdge; + _FEdgeB = iFEdgeB; + } + + public: + virtual ~fedge_iterator_base() {} + // operators + inline Self& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + inline Self operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + inline Self& operator--() // operator corresponding to ++i + { + decrement(); + return *this; + } + inline Self operator--(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + decrement(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + return (_FEdge != b._FEdge); + } + virtual bool operator==(const Self& b) const + { + return !(*this != b); + } + + // dereferencing + virtual reference operator*() const {return (_FEdge);} + virtual pointer operator->() const { return &(operator*());} + + + public: + virtual bool begin() const {return _FEdge==_first ? true : false;} + virtual bool end() const {return _FEdge==0 ? true : false;} + protected: + virtual void increment() + { + _FEdge = _FEdge->nextEdge(); // we don't change or + } + + virtual void decrement() + { + if(0 == _FEdge) + { + _FEdge = _FEdgeB; + return; + } + _FEdge = _FEdge->previousEdge(); // we don't change or + } + }; + + template + class vertex_iterator_base : public IteratorBase + { + public: + typedef typename Traits::value_type value_type; + typedef typename Traits::difference_type difference_type; + typedef typename Traits::pointer pointer; + typedef typename Traits::reference reference; + typedef vertex_iterator_base Self; + protected: + typedef IteratorBase parent_class; + public: + mutable value_type _SVertex; + FEdge *_NextFEdge; + FEdge *_PreviousFEdge; + public: + friend class ViewEdge; + friend class vertex_iterator; + inline vertex_iterator_base() + : parent_class() + {} + inline vertex_iterator_base(const vertex_iterator_base >& iBrother) + : parent_class() + { + _SVertex = iBrother._SVertex; + _NextFEdge = iBrother._NextFEdge; + _PreviousFEdge = iBrother._PreviousFEdge; + } + inline vertex_iterator_base(const vertex_iterator_base >& iBrother) + : parent_class() + { + _SVertex = iBrother._SVertex; + _NextFEdge = iBrother._NextFEdge; + _PreviousFEdge = iBrother._PreviousFEdge; + } + + //protected://FIXME + public: + + inline vertex_iterator_base(value_type iVertex, FEdge *iPreviousFEdge, FEdge *iNextFEdge) + : parent_class() + { + _SVertex = iVertex; + _NextFEdge = iNextFEdge; + _PreviousFEdge = iPreviousFEdge; + } + + public: + virtual ~vertex_iterator_base() {} + + virtual bool begin() const {return _PreviousFEdge==0? true : false;} + virtual bool end() const {return _SVertex==0 ? true : false;} + + // operators + inline Self& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + inline Self operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + inline Self& operator--() // operator corresponding to ++i + { + decrement(); + return *this; + } + inline Self operator--(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + Self tmp = *this; // C'est pour cela qu'on stocke la valeur + decrement(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const Self& b) const + { + return (_SVertex != b._SVertex); + } + virtual bool operator==(const Self& b) const + { + return !(*this != b); + } + + // dereferencing + virtual reference operator*() const {return (_SVertex);} + virtual pointer operator->() const { return &(operator*());} + + protected: + virtual void increment() + { + if(0 == _NextFEdge) + { + _SVertex = 0; + return; + } + + _SVertex = _NextFEdge->vertexB(); + _PreviousFEdge = _NextFEdge; + _NextFEdge = _NextFEdge->nextEdge(); + + } + virtual void decrement() + { + // if(0 == _SVertex) + // { + // _SVertex = _PreviousFEdge->vertexB(); + // return; + // } + if(0 == _PreviousFEdge) + { + _SVertex = 0; + return; + } + _SVertex = _PreviousFEdge->vertexA(); + _NextFEdge = _PreviousFEdge; + _PreviousFEdge = _PreviousFEdge->previousEdge(); + } + }; + + +} // end of namespace ViewEdgeInternal + +#endif // VIEWMAPADVANCEDITERATORS_H diff --git a/extern/freestyle/src/view_map/ViewMapBuilder.cpp b/extern/freestyle/src/view_map/ViewMapBuilder.cpp new file mode 100755 index 00000000000..32f5283a63c --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapBuilder.cpp @@ -0,0 +1,1027 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "ViewMapBuilder.h" + +using namespace std; + +ViewMap* ViewMapBuilder::BuildViewMap(WingedEdge& we, visibility_algo iAlgo, real epsilon) { + _ViewMap = new ViewMap; + _currentId = 1; + _currentFId = 0; + _currentSVertexId = 0; + + // Builds initial view edges + computeInitialViewEdges(we); + + // Detects cusps + computeCusps(_ViewMap); + + // Compute intersections + ComputeIntersections(_ViewMap, sweep_line, epsilon); + + // Compute visibility + ComputeEdgesVisibility(_ViewMap, iAlgo, _Grid, epsilon); + + return _ViewMap; +} + +void ViewMapBuilder::computeInitialViewEdges(WingedEdge& we) +{ + vector wshapes = we.getWShapes(); + SShape* psShape; + + for (vector::const_iterator it = wshapes.begin(); + it != wshapes.end(); + it++) { + // create the embedding + psShape = new SShape; + psShape->SetId((*it)->GetId()); + psShape->SetMaterials((*it)->materials()); // FIXME + + // create the view shape + ViewShape * vshape = new ViewShape(psShape); + // add this view shape to the view map: + _ViewMap->AddViewShape(vshape); + + _pViewEdgeBuilder->SetCurrentViewId(_currentId); // we want to number the view edges in a unique way for the while scene. + _pViewEdgeBuilder->SetCurrentFId(_currentFId); // we want to number the feature edges in a unique way for the while scene. + _pViewEdgeBuilder->SetCurrentSVertexId(_currentFId); // we want to number the SVertex in a unique way for the while scene. + _pViewEdgeBuilder->BuildViewEdges(dynamic_cast(*it), vshape, + _ViewMap->ViewEdges(), + _ViewMap->ViewVertices(), + _ViewMap->FEdges(), + _ViewMap->SVertices()); + + _currentId = _pViewEdgeBuilder->currentViewId()+1; + _currentFId = _pViewEdgeBuilder->currentFId()+1; + _currentSVertexId = _pViewEdgeBuilder->currentSVertexId()+1; + + psShape->ComputeBBox(); + } +} + +void ViewMapBuilder::computeCusps(ViewMap *ioViewMap){ + vector newVVertices; + vector newVEdges; + ViewMap::viewedges_container& vedges = ioViewMap->ViewEdges(); + ViewMap::viewedges_container::iterator ve=vedges.begin(), veend=vedges.end(); + for(; + ve!=veend; + ++ve){ + if((!((*ve)->getNature() & Nature::SILHOUETTE)) || (!((*ve)->fedgeA()->isSmooth()))) + continue; + FEdge *fe = (*ve)->fedgeA(); + FEdge * fefirst = fe; + bool first = true; + bool positive = true; + do{ + FEdgeSmooth * fes = dynamic_cast(fe); + Vec3r A((fes)->vertexA()->point3d()); + Vec3r B((fes)->vertexB()->point3d()); + Vec3r AB(B-A); + AB.normalize(); + Vec3r m((A+B)/2.0); + Vec3r crossP(AB^(fes)->normal()); + crossP.normalize(); + Vec3r viewvector(m-_viewpoint); + viewvector.normalize(); + if(first){ + if(((crossP)*(viewvector)) > 0) + positive = true; + else + positive = false; + first = false; + } + // If we're in a positive part, we need + // a stronger negative value to change + NonTVertex *cusp = 0; + if(positive){ + if(((crossP)*(viewvector)) < -0.1){ + // state changes + positive = false; + // creates and insert cusp + cusp = dynamic_cast(ioViewMap->InsertViewVertex(fes->vertexA(), newVEdges)); + if(cusp!=0) + cusp->setNature(cusp->getNature()|Nature::CUSP); + } + + }else{ + // If we're in a negative part, we need + // a stronger negative value to change + if(((crossP)*(viewvector)) > 0.1){ + positive = true; + cusp = dynamic_cast(ioViewMap->InsertViewVertex(fes->vertexA(), newVEdges)); + if(cusp!=0) + cusp->setNature(cusp->getNature()|Nature::CUSP); + } + } + fe = fe->nextEdge(); + }while((fe!=0) && (fe!=fefirst)); + } + for(ve=newVEdges.begin(), veend=newVEdges.end(); + ve!=veend; + ++ve){ + (*ve)->viewShape()->AddEdge(*ve); + vedges.push_back(*ve); + } +} +void ViewMapBuilder::ComputeEdgesVisibility(ViewMap *ioViewMap, visibility_algo iAlgo, Grid *iGrid, real epsilon) +{ + if((iAlgo == ray_casting || + iAlgo == ray_casting_fast || + iAlgo == ray_casting_very_fast) && (NULL == iGrid)) + { + cerr << "Error: can't cast ray, no grid defined" << endl; + return; + } + + switch(iAlgo) + { + case ray_casting: + ComputeRayCastingVisibility(ioViewMap, iGrid, epsilon); + break; + case ray_casting_fast: + ComputeFastRayCastingVisibility(ioViewMap, iGrid, epsilon); + break; + case ray_casting_very_fast: + ComputeVeryFastRayCastingVisibility(ioViewMap, iGrid, epsilon); + break; + default: + break; + } +} + +static const unsigned gProgressBarMaxSteps = 10; +static const unsigned gProgressBarMinSize = 2000; + +void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid, real epsilon) +{ + vector& vedges = ioViewMap->ViewEdges(); + bool progressBarDisplay = false; + unsigned progressBarStep = 0; + unsigned vEdgesSize = vedges.size(); + unsigned fEdgesSize = ioViewMap->FEdges().size(); + + if(_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) { + unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize); + progressBarStep = vEdgesSize / progressBarSteps; + _pProgressBar->reset(); + _pProgressBar->setLabelText("Computing Ray casting Visibility"); + _pProgressBar->setTotalSteps(progressBarSteps); + _pProgressBar->setProgress(0); + progressBarDisplay = true; + } + + unsigned counter = progressBarStep; + FEdge * fe, *festart; + int nSamples = 0; + vector aFaces; + Polygon3r *aFace = 0; + unsigned tmpQI = 0; + unsigned qiClasses[256]; + unsigned maxIndex, maxCard; + unsigned qiMajority; + static unsigned timestamp = 1; + for(vector::iterator ve=vedges.begin(), veend=vedges.end(); + ve!=veend; + ve++) + { + festart = (*ve)->fedgeA(); + fe = (*ve)->fedgeA(); + qiMajority = 1; + do { + qiMajority++; + fe = fe->nextEdge(); + } while (fe && fe != festart); + qiMajority >>= 1; + + tmpQI = 0; + maxIndex = 0; + maxCard = 0; + nSamples = 0; + fe = (*ve)->fedgeA(); + memset(qiClasses, 0, 256 * sizeof(*qiClasses)); + set occluders; + do + { + if((maxCard < qiMajority)) { + tmpQI = ComputeRayCastingVisibility(fe, iGrid, epsilon, occluders, &aFace, timestamp++); + + if(tmpQI >= 256) + cerr << "Warning: too many occluding levels" << endl; + + if (++qiClasses[tmpQI] > maxCard) { + maxCard = qiClasses[tmpQI]; + maxIndex = tmpQI; + } + } + else + FindOccludee(fe, iGrid, epsilon, &aFace, timestamp++); + + if(aFace) { + fe->SetaFace(*aFace); + aFaces.push_back(aFace); + fe->SetOccludeeEmpty(false); + } + else + fe->SetOccludeeEmpty(true); + + ++nSamples; + fe = fe->nextEdge(); + } + while((maxCard < qiMajority) && (0!=fe) && (fe!=festart)); + + // ViewEdge + // qi -- + (*ve)->SetQI(maxIndex); + // occluders -- + for(set::iterator o=occluders.begin(), oend=occluders.end(); + o!=oend; + ++o) + (*ve)->AddOccluder((*o)); + // occludee -- + if(!aFaces.empty()) + { + if(aFaces.size() <= (float)nSamples/2.f) + { + (*ve)->SetaShape(0); + } + else + { + vector::iterator p = aFaces.begin(); + WFace * wface = (WFace*)((*p)->userdata); + ViewShape *vshape = ioViewMap->viewShape(wface->GetVertex(0)->shape()->GetId()); + ++p; + (*ve)->SetaShape(vshape); + } + } + + if(progressBarDisplay) { + counter--; + if (counter <= 0) { + counter = progressBarStep; + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + } + } + aFaces.clear(); + } +} + +void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid, real epsilon) +{ + vector& vedges = ioViewMap->ViewEdges(); + bool progressBarDisplay = false; + unsigned progressBarStep = 0; + unsigned vEdgesSize = vedges.size(); + unsigned fEdgesSize = ioViewMap->FEdges().size(); + + if(_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) { + unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize); + progressBarStep = vEdgesSize / progressBarSteps; + _pProgressBar->reset(); + _pProgressBar->setLabelText("Computing Ray casting Visibility"); + _pProgressBar->setTotalSteps(progressBarSteps); + _pProgressBar->setProgress(0); + progressBarDisplay = true; + } + + unsigned counter = progressBarStep; + FEdge * fe, *festart; + unsigned nSamples = 0; + vector aFaces; + Polygon3r *aFace = 0; + unsigned tmpQI = 0; + unsigned qiClasses[256]; + unsigned maxIndex, maxCard; + unsigned qiMajority; + static unsigned timestamp = 1; + bool even_test; + for(vector::iterator ve=vedges.begin(), veend=vedges.end(); + ve!=veend; + ve++) + { + festart = (*ve)->fedgeA(); + fe = (*ve)->fedgeA(); + qiMajority = 1; + do { + qiMajority++; + fe = fe->nextEdge(); + } while (fe && fe != festart); + if (qiMajority >= 4) + qiMajority >>= 2; + else + qiMajority = 1; + + set occluders; + + even_test = true; + maxIndex = 0; + maxCard = 0; + nSamples = 0; + memset(qiClasses, 0, 256 * sizeof(*qiClasses)); + fe = (*ve)->fedgeA(); + do + { + if (even_test) + { + if((maxCard < qiMajority)) { + tmpQI = ComputeRayCastingVisibility(fe, iGrid, epsilon, occluders, &aFace, timestamp++); + + if(tmpQI >= 256) + cerr << "Warning: too many occluding levels" << endl; + + if (++qiClasses[tmpQI] > maxCard) { + maxCard = qiClasses[tmpQI]; + maxIndex = tmpQI; + } + } + else + FindOccludee(fe, iGrid, epsilon, &aFace, timestamp++); + + if(aFace) + { + fe->SetaFace(*aFace); + aFaces.push_back(aFace); + } + ++nSamples; + even_test = false; + } + else + even_test = true; + fe = fe->nextEdge(); + } while ((maxCard < qiMajority) && (0!=fe) && (fe!=festart)); + + (*ve)->SetQI(maxIndex); + + if(!aFaces.empty()) + { + if(aFaces.size() < nSamples / 2) + { + (*ve)->SetaShape(0); + } + else + { + vector::iterator p = aFaces.begin(); + WFace * wface = (WFace*)((*p)->userdata); + ViewShape *vshape = ioViewMap->viewShape(wface->GetVertex(0)->shape()->GetId()); + ++p; + // for(; + // p!=pend; + // ++p) + // { + // WFace *f = (WFace*)((*p)->userdata); + // ViewShape *vs = ioViewMap->viewShape(f->GetVertex(0)->shape()->GetId()); + // if(vs != vshape) + // { + // sameShape = false; + // break; + // } + // } + // if(sameShape) + (*ve)->SetaShape(vshape); + } + } + + //(*ve)->SetaFace(aFace); + + if(progressBarDisplay) { + counter--; + if (counter <= 0) { + counter = progressBarStep; + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + } + } + aFaces.clear(); + } +} + +void ViewMapBuilder::ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid, real epsilon) +{ + vector& vedges = ioViewMap->ViewEdges(); + bool progressBarDisplay = false; + unsigned progressBarStep = 0; + unsigned vEdgesSize = vedges.size(); + unsigned fEdgesSize = ioViewMap->FEdges().size(); + + if(_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) { + unsigned progressBarSteps = min(gProgressBarMaxSteps, vEdgesSize); + progressBarStep = vEdgesSize / progressBarSteps; + _pProgressBar->reset(); + _pProgressBar->setLabelText("Computing Ray casting Visibility"); + _pProgressBar->setTotalSteps(progressBarSteps); + _pProgressBar->setProgress(0); + progressBarDisplay = true; + } + + unsigned counter = progressBarStep; + FEdge* fe; + unsigned qi = 0; + Polygon3r *aFace = 0; + static unsigned timestamp = 1; + for(vector::iterator ve=vedges.begin(), veend=vedges.end(); + ve!=veend; + ve++) + { + set occluders; + + fe = (*ve)->fedgeA(); + qi = ComputeRayCastingVisibility(fe, iGrid, epsilon, occluders, &aFace, timestamp++); + if(aFace) + { + fe->SetaFace(*aFace); + WFace * wface = (WFace*)(aFace->userdata); + ViewShape *vshape = ioViewMap->viewShape(wface->GetVertex(0)->shape()->GetId()); + (*ve)->SetaShape(vshape); + } + else + { + (*ve)->SetaShape(0); + } + + (*ve)->SetQI(qi); + + if(progressBarDisplay) { + counter--; + if (counter <= 0) { + counter = progressBarStep; + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + } + } + } +} + + +void ViewMapBuilder::FindOccludee(FEdge *fe, Grid* iGrid, real epsilon, Polygon3r** oaPolygon, unsigned timestamp, + Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector& faceVertices) +{ + WFace *face = 0; + if(fe->isSmooth()){ + FEdgeSmooth * fes = dynamic_cast(fe); + face = (WFace*)fes->face(); + } + OccludersSet occluders; + WFace * oface; + bool skipFace; + + WVertex::incoming_edge_iterator ie; + OccludersSet::iterator p, pend; + + *oaPolygon = 0; + if(((fe)->getNature() & Nature::SILHOUETTE) || ((fe)->getNature() & Nature::BORDER)) + { + occluders.clear(); + // we cast a ray from A in the same direction but looking behind + Vec3r v(-u[0],-u[1],-u[2]); + iGrid->castInfiniteRay(A, v, occluders, timestamp); + + bool noIntersection = true; + real mint=FLT_MAX; + // we met some occluders, let us fill the aShape field + // with the first intersected occluder + for(p=occluders.begin(),pend=occluders.end(); + p!=pend; + p++) + { + // check whether the edge and the polygon plane are coincident: + //------------------------------------------------------------- + //first let us compute the plane equation. + oface = (WFace*)(*p)->userdata; + Vec3r v1(((*p)->getVertices())[0]); + Vec3r normal((*p)->getNormal()); + real d = -(v1 * normal); + real t,t_u,t_v; + + if(0 != face) + { + skipFace = false; + + if(face == oface) + continue; + + if(faceVertices.empty()) + continue; + + for(vector::iterator fv=faceVertices.begin(), fvend=faceVertices.end(); + fv!=fvend; + ++fv) + { + if((*fv)->isBoundary()) + continue; + WVertex::incoming_edge_iterator iebegin=(*fv)->incoming_edges_begin(); + WVertex::incoming_edge_iterator ieend=(*fv)->incoming_edges_end(); + for(ie=iebegin;ie!=ieend; ++ie) + { + if((*ie) == 0) + continue; + + WFace * sface = (*ie)->GetbFace(); + if(sface == oface) + { + skipFace = true; + break; + } + } + if(skipFace) + break; + } + if(skipFace) + continue; + } + else + { + if(GeomUtils::COINCIDENT == GeomUtils::intersectRayPlane(origin, edge, normal, d, t, epsilon)) + continue; + } + if((*p)->rayIntersect(A, v, t,t_u,t_v)) + { + if (fabs(v * normal) > 0.0001) + if ((t>0.0)) // && (t<1.0)) + { + if (tSetOccludeeIntersection(Vec3r(A+t*v)); + } + } + } + } + + if(noIntersection) + *oaPolygon = 0; + } +} + +void ViewMapBuilder::FindOccludee(FEdge *fe, Grid* iGrid, real epsilon, Polygon3r** oaPolygon, unsigned timestamp) +{ + OccludersSet occluders; + + Vec3r A; + Vec3r edge; + Vec3r origin; + A = Vec3r(((fe)->vertexA()->point3D() + (fe)->vertexB()->point3D())/2.0); + edge = Vec3r((fe)->vertexB()->point3D()-(fe)->vertexA()->point3D()); + origin = Vec3r((fe)->vertexA()->point3D()); + Vec3r u(_viewpoint-A); + u.normalize(); + if(A < iGrid->getOrigin()) + cerr << "Warning: point is out of the grid for fedge " << fe->getId().getFirst() << "-" << fe->getId().getSecond() << endl; + + vector faceVertices; + + WFace *face = 0; + if(fe->isSmooth()){ + FEdgeSmooth * fes = dynamic_cast(fe); + face = (WFace*)fes->face(); + } + if(0 != face) + face->RetrieveVertexList(faceVertices); + + return FindOccludee(fe,iGrid, epsilon, oaPolygon, timestamp, + u, A, origin, edge, faceVertices); +} + +int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe, Grid* iGrid, real epsilon, set& oOccluders, + Polygon3r** oaPolygon, unsigned timestamp) +{ + OccludersSet occluders; + int qi = 0; + + Vec3r center; + Vec3r edge; + Vec3r origin; + + center = fe->center3d(); + edge = Vec3r(fe->vertexB()->point3D() - fe->vertexA()->point3D()); + origin = Vec3r(fe->vertexA()->point3D()); + // + // // Is the edge outside the view frustum ? + Vec3r gridOrigin(iGrid->getOrigin()); + Vec3r gridExtremity(iGrid->getOrigin()+iGrid->gridSize()); + + if( (center.x() < gridOrigin.x()) || (center.y() < gridOrigin.y()) || (center.z() < gridOrigin.z()) + ||(center.x() > gridExtremity.x()) || (center.y() > gridExtremity.y()) || (center.z() > gridExtremity.z())){ + cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl; + //return 0; + } + + + // Vec3r A(fe->vertexA()->point2d()); + // Vec3r B(fe->vertexB()->point2d()); + // int viewport[4]; + // SilhouetteGeomEngine::retrieveViewport(viewport); + // if( (A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) || (A.y() > viewport[3]) + // ||(B.x() < viewport[0]) || (B.x() > viewport[2]) || (B.y() < viewport[1]) || (B.y() > viewport[3])){ + // cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl; + // //return 0; + // } + + Vec3r u(_viewpoint - center); + real raylength = u.norm(); + u.normalize(); + //cout << "grid origin " << iGrid->getOrigin().x() << "," << iGrid->getOrigin().y() << "," << iGrid->getOrigin().z() << endl; + //cout << "center " << center.x() << "," << center.y() << "," << center.z() << endl; + + iGrid->castRay(center, Vec3r(_viewpoint), occluders, timestamp); + + WFace *face = 0; + if(fe->isSmooth()){ + FEdgeSmooth * fes = dynamic_cast(fe); + face = (WFace*)fes->face(); + } + vector faceVertices; + WVertex::incoming_edge_iterator ie; + + WFace * oface; + bool skipFace; + OccludersSet::iterator p, pend; + if(face) + face->RetrieveVertexList(faceVertices); + + for(p=occluders.begin(),pend=occluders.end(); + p!=pend; + p++) + { + // If we're dealing with an exact silhouette, check whether + // we must take care of this occluder of not. + // (Indeed, we don't consider the occluders that + // share at least one vertex with the face containing + // this edge). + //----------- + oface = (WFace*)(*p)->userdata; + Vec3r v1(((*p)->getVertices())[0]); + Vec3r normal((*p)->getNormal()); + real d = -(v1 * normal); + real t, t_u, t_v; + + if(0 != face) + { + skipFace = false; + + if(face == oface) + continue; + + + for(vector::iterator fv=faceVertices.begin(), fvend=faceVertices.end(); + fv!=fvend; + ++fv) + { + if((*fv)->isBoundary()) + continue; + + WVertex::incoming_edge_iterator iebegin=(*fv)->incoming_edges_begin(); + WVertex::incoming_edge_iterator ieend=(*fv)->incoming_edges_end(); + for(ie=iebegin;ie!=ieend; ++ie) + { + if((*ie) == 0) + continue; + + WFace * sface = (*ie)->GetbFace(); + //WFace * sfacea = (*ie)->GetaFace(); + //if((sface == oface) || (sfacea == oface)) + if(sface == oface) + { + skipFace = true; + break; + } + } + if(skipFace) + break; + } + if(skipFace) + continue; + } + else + { + // check whether the edge and the polygon plane are coincident: + //------------------------------------------------------------- + //first let us compute the plane equation. + + if(GeomUtils::COINCIDENT == GeomUtils::intersectRayPlane(origin, edge, normal, d, t, epsilon)) + continue; + } + + if((*p)->rayIntersect(center, u, t, t_u, t_v)) + { + if (fabs(u * normal) > 0.0001) + if ((t>0.0) && (tuserdata); + ViewShape *vshape = _ViewMap->viewShape(f->GetVertex(0)->shape()->GetId()); + oOccluders.insert(vshape); + ++qi; + if(!_EnableQI) + break; + } + } + } + + // Find occludee + FindOccludee(fe,iGrid, epsilon, oaPolygon, timestamp, + u, center, edge, origin, faceVertices); + + return qi; +} + +void ViewMapBuilder::ComputeIntersections(ViewMap *ioViewMap, intersection_algo iAlgo, real epsilon) +{ + switch(iAlgo) + { + case sweep_line: + ComputeSweepLineIntersections(ioViewMap, epsilon); + break; + default: + break; + } + ViewMap::viewvertices_container& vvertices = ioViewMap->ViewVertices(); + for(ViewMap::viewvertices_container::iterator vv=vvertices.begin(), vvend=vvertices.end(); + vv!=vvend; + ++vv) + { + if((*vv)->getNature() == Nature::T_VERTEX) + { + TVertex *tvertex = (TVertex*)(*vv); + cout << "TVertex " << tvertex->getId() << " has :" << endl; + cout << "FrontEdgeA: " << tvertex->frontEdgeA().first << endl; + cout << "FrontEdgeB: " << tvertex->frontEdgeB().first << endl; + cout << "BackEdgeA: " << tvertex->backEdgeA().first << endl; + cout << "BackEdgeB: " << tvertex->backEdgeB().first << endl << endl; + } + } +} + +struct less_SVertex2D : public binary_function +{ + real epsilon; + less_SVertex2D(real eps) + : binary_function() + { + epsilon = eps; + } + bool operator()(SVertex* x, SVertex* y) + { + Vec3r A = x->point2D(); + Vec3r B = y->point2D(); + for(unsigned int i=0; i<3; i++) + { + if((fabs(A[i] - B[i])) < epsilon) + continue; + if(A[i] < B[i]) + return true; + if(A[i] > B[i]) + return false; + } + + return false; + } +}; + +typedef Segment segment; +typedef Intersection intersection; + +struct less_Intersection : public binary_function +{ + segment *edge; + less_Intersection(segment *iEdge) + : binary_function() + { + edge = iEdge; + } + bool operator()(intersection* x, intersection* y) + { + real tx = x->getParameter(edge); + real ty = y->getParameter(edge); + if(tx > ty) + return true; + return false; + } +}; + +struct silhouette_binary_rule : public binary_rule +{ + silhouette_binary_rule() : binary_rule() {} + virtual bool operator() (segment& s1, segment& s2) + { + FEdge * f1 = s1.edge(); + FEdge * f2 = s2.edge(); + + if((!(((f1)->getNature() & Nature::SILHOUETTE) || ((f1)->getNature() & Nature::BORDER))) && (!(((f2)->getNature() & Nature::SILHOUETTE) || ((f2)->getNature() & Nature::BORDER)))) + return false; + + return true; + } +}; + +void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsilon) +{ + vector& svertices = ioViewMap->SVertices(); + bool progressBarDisplay = false; + unsigned sVerticesSize = svertices.size(); + unsigned fEdgesSize = ioViewMap->FEdges().size(); + // ViewMap::fedges_container& fedges = ioViewMap->FEdges(); + // for(ViewMap::fedges_container::const_iterator f=fedges.begin(), end=fedges.end(); + // f!=end; + // ++f){ + // cout << (*f)->aMaterialIndex() << "-" << (*f)->bMaterialIndex() << endl; + // } + + unsigned progressBarStep = 0; + + if(_pProgressBar != NULL && fEdgesSize > gProgressBarMinSize) { + unsigned progressBarSteps = min(gProgressBarMaxSteps, sVerticesSize); + progressBarStep = sVerticesSize / progressBarSteps; + _pProgressBar->reset(); + _pProgressBar->setLabelText("Computing Sweep Line Intersections"); + _pProgressBar->setTotalSteps(progressBarSteps); + _pProgressBar->setProgress(0); + progressBarDisplay = true; + } + + unsigned counter = progressBarStep; + + sort(svertices.begin(), svertices.end(), less_SVertex2D(epsilon)); + + SweepLine SL; + + vector& ioEdges = ioViewMap->FEdges(); + + vector segments; + + vector::iterator fe,fend; + + for(fe=ioEdges.begin(), fend=ioEdges.end(); + fe!=fend; + fe++) + { + segment * s = new segment((*fe), (*fe)->vertexA()->point2D(), (*fe)->vertexB()->point2D()); + (*fe)->userdata = s; + segments.push_back(s); + } + + vector vsegments; + for(vector::iterator sv=svertices.begin(),svend=svertices.end(); + sv!=svend; + sv++) + { + const vector& vedges = (*sv)->fedges(); + + for(vector::const_iterator sve=vedges.begin(), sveend=vedges.end(); + sve!=sveend; + sve++) + { + vsegments.push_back((segment*)((*sve)->userdata)); + } + + Vec3r evt((*sv)->point2D()); + silhouette_binary_rule sbr; + SL.process(evt, vsegments, sbr); + + if(progressBarDisplay) { + counter--; + if (counter <= 0) { + counter = progressBarStep; + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + } + } + vsegments.clear(); + } + + // reset userdata: + for(fe=ioEdges.begin(), fend=ioEdges.end(); + fe!=fend; + fe++) + (*fe)->userdata = NULL; + + // list containing the new edges resulting from splitting operations. + vector newEdges; + + // retrieve the intersected edges: + vector& iedges = SL.intersectedEdges(); + // retrieve the intersections: + vector& intersections = SL.intersections(); + + int id=0; + // create a view vertex for each intersection and linked this one + // with the intersection object + vector::iterator i, iend; + for(i=intersections.begin(),iend=intersections.end(); + i!=iend; + i++) + { + FEdge *fA = (*i)->EdgeA->edge(); + FEdge *fB = (*i)->EdgeB->edge(); + + Vec3r A1 = fA->vertexA()->point3D(); + Vec3r A2 = fA->vertexB()->point3D(); + Vec3r B1 = fB->vertexA()->point3D(); + Vec3r B2 = fB->vertexB()->point3D(); + + Vec3r a1 = fA->vertexA()->point2D(); + Vec3r a2 = fA->vertexB()->point2D(); + Vec3r b1 = fB->vertexA()->point2D(); + Vec3r b2 = fB->vertexB()->point2D(); + + real ta = (*i)->tA; + real tb = (*i)->tB; + + if((ta < -epsilon) || (ta > 1+epsilon)) + cerr << "Warning: intersection out of range for edge " << fA->vertexA()->getId() << " - " << fA->vertexB()->getId() << endl; + + if((tb < -epsilon) || (tb > 1+epsilon)) + cerr << "Warning: intersection out of range for edge " << fB->vertexA()->getId() << " - " << fB->vertexB()->getId() << endl; + + real Ta = SilhouetteGeomEngine::ImageToWorldParameter(fA, ta); + real Tb = SilhouetteGeomEngine::ImageToWorldParameter(fB, tb); + + TVertex * tvertex = ioViewMap->CreateTVertex(Vec3r(A1 + Ta*(A2-A1)), Vec3r(a1 + ta*(a2-a1)), fA, + Vec3r(B1 + Tb*(B2-B1)), Vec3r(b1 + tb*(b2-b1)), fB, id); + + (*i)->userdata = tvertex; + ++id; + } + + progressBarStep = 0; + + if(progressBarDisplay) { + unsigned iEdgesSize = iedges.size(); + unsigned progressBarSteps = min(gProgressBarMaxSteps, iEdgesSize); + progressBarStep = iEdgesSize / progressBarSteps; + _pProgressBar->reset(); + _pProgressBar->setLabelText("Splitting intersected edges"); + _pProgressBar->setTotalSteps(progressBarSteps); + _pProgressBar->setProgress(0); + } + + counter = progressBarStep; + + vector edgeVVertices; + vector newVEdges; + vector::iterator s, send; + for(s=iedges.begin(),send=iedges.end(); + s!=send; + s++) + { + edgeVVertices.clear(); + newEdges.clear(); + newVEdges.clear(); + + FEdge* fedge = (*s)->edge(); + ViewEdge *vEdge = fedge->viewedge(); + ViewShape *shape = vEdge->viewShape(); + + vector& eIntersections = (*s)->intersections(); + // we first need to sort these intersections from farther to closer to A + sort(eIntersections.begin(), eIntersections.end(), less_Intersection(*s)); + for(i=eIntersections.begin(),iend=eIntersections.end(); + i!=iend; + i++) + edgeVVertices.push_back((TVertex*)(*i)->userdata); + + shape->SplitEdge(fedge, edgeVVertices, ioViewMap->FEdges(), ioViewMap->ViewEdges()); + + if(progressBarDisplay) { + counter--; + if (counter <= 0) { + counter = progressBarStep; + _pProgressBar->setProgress(_pProgressBar->getProgress() + 1); + } + } + } + + // reset userdata: + for(fe=ioEdges.begin(), fend=ioEdges.end(); + fe!=fend; + fe++) + (*fe)->userdata = NULL; + + // delete segments + // if(!segments.empty()){ + // for(s=segments.begin(),send=segments.end(); + // s!=send; + // s++){ + // delete *s; + // } + // segments.clear(); + // } +} diff --git a/extern/freestyle/src/view_map/ViewMapBuilder.h b/extern/freestyle/src/view_map/ViewMapBuilder.h new file mode 100755 index 00000000000..ec52d4fdd7e --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapBuilder.h @@ -0,0 +1,224 @@ +// +// Filename : ViewMapBuilder.h +// Author(s) : Stephane Grabli +// Purpose : Class to build silhouette edges from a +// Winged-Edge structure +// Date of creation : 25/03/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAPBUILDER_H +# define VIEWMAPBUILDER_H + +# include +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" +# include "../scene_graph/NodeGroup.h" +# include "../winged_edge/WXEdge.h" +# include "Silhouette.h" +# include "../geometry/GeomUtils.h" +# include "../geometry/Grid.h" +# include "../system/ProgressBar.h" +# include "../geometry/SweepLine.h" +# include "ViewMap.h" +# include "SilhouetteGeomEngine.h" +# include "../scene_graph/TriangleRep.h" +# include "../winged_edge/WEdge.h" +# include "ViewEdgeXBuilder.h" + + +using namespace Geometry; + +class LIB_VIEW_MAP_EXPORT ViewMapBuilder +{ +private: + + ViewMap * _ViewMap; // result + //SilhouetteGeomEngine _GeomEngine; + ProgressBar *_pProgressBar; + Vec3r _viewpoint; + Grid* _Grid; + ViewEdgeXBuilder *_pViewEdgeBuilder; + bool _EnableQI; + double _epsilon; + + // tmp values: + int _currentId; + int _currentFId; + int _currentSVertexId; + + +public: + + typedef enum { + sweep_line + } intersection_algo; + + typedef enum { + ray_casting, + ray_casting_fast, + ray_casting_very_fast + } visibility_algo; + + inline ViewMapBuilder() + { + _pProgressBar = 0; + _Grid = 0; + _currentId = 1; + _currentFId = 0; + _currentSVertexId = 0; + _pViewEdgeBuilder = new ViewEdgeXBuilder; + _EnableQI = true; + } + + inline ~ViewMapBuilder() + { + if(_pViewEdgeBuilder){ + delete _pViewEdgeBuilder; + _pViewEdgeBuilder = 0; + } + } + + /*! Compute Shapes from a WingedEdge containing a list of WShapes */ + void computeInitialViewEdges(WingedEdge&); + + /*! Compute Cusps */ + void computeCusps(ViewMap *ioViewMap); + /*! Detects cusps (for a single ViewEdge) among SVertices and builds a ViewVertex on top of + * each cusp SVertex + * We use a hysteresis approach to avoid noise. + */ + void DetectCusps(ViewEdge *ioEdge); + + + /*! Sets the current viewpoint */ + inline void SetViewpoint(const Vec3r& ivp) {_viewpoint = ivp; SilhouetteGeomEngine::SetViewpoint(ivp);} + + /*! Sets the current transformation + * iModelViewMatrix + * The 4x4 model view matrix, in column major order (openGL like). + * iProjection matrix + * The 4x4 projection matrix, in column major order (openGL like). + * iViewport + * The viewport. 4 real array: origin.x, origin.y, width, length + */ + inline void SetTransform(const real iModelViewMatrix[4][4], + const real iProjectionMatrix[4][4], + const int iViewport[4], + real iFocalLength, + real iAspect, + real iFovy) { + SilhouetteGeomEngine::SetTransform(iModelViewMatrix, iProjectionMatrix, iViewport, iFocalLength); + } + + inline void SetFrustum(real iZnear, real iZfar) { + SilhouetteGeomEngine::SetFrustum(iZnear, iZfar); + } + + /*! Builds the scene view map + * returns the list the view map + * it is up to the caller to delete this ViewMap + * iWRoot + * The root group node containing the WEdge structured scene + */ + + ViewMap* BuildViewMap(WingedEdge& we, visibility_algo iAlgo = ray_casting, real epsilon=1e-06) ; + /*! computes the intersection between all 2D + * feature edges of the scene. + * ioViewMap + * The view map. It is modified by the method. + * The list of all features edges of the scene. + * Each time an intersection is found, the 2 intersecting + * edges are splitted (creating 2 new vertices) + * At the end, this list is updated with the adding + * of all new created edges (resulting from splitting). + * iAlgo + * The algo to use for computing the intersections + */ + void ComputeIntersections(ViewMap *ioViewMap, intersection_algo iAlgo = sweep_line, real epsilon=1e-06); + + /*! Computes the 2D scene silhouette edges visibility + * iGrid + * For the Ray Casting algorithm. + */ + void ComputeEdgesVisibility(ViewMap *ioViewMap, visibility_algo iAlgo= ray_casting, Grid* iGrid = 0, real epsilon=1e-6); + + void SetGrid(Grid *iGrid) {_Grid = iGrid;} + + /*! accessors */ + + /*! Modifiers */ + inline void SetProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} + inline void SetEnableQI(bool iBool) {_EnableQI = iBool;} + +protected: + + /*! Computes intersections on all edges of the scene using a sweep line + * algorithm*/ + void ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsilon = 1e-6); + + /*! Computes the 2D scene silhouette edges visibility + * using a ray casting. On each edge, a ray is cast + * to check its quantitative invisibility. The list + * of occluders are each time stored in the tested edge. + * ioViewMap + * The view map. + * The 2D scene silhouette edges as FEdges. + * These edges have already been splitted at their intersections points. + * Thus, these edges do not intersect anymore. + * The visibility corresponding to each edge of ioScene is set is this + * edge. + */ + void ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid *iGrid, real epsilon=1e-6); + void ComputeFastRayCastingVisibility(ViewMap *ioViewMap, Grid *iGrid, real epsilon=1e-6); + void ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, Grid *iGrid, real epsilon=1e-6); + + /*! Compute the visibility for the FEdge fe. + * The occluders are added to fe occluders list. + * fe + * The FEdge + * iGrid + * The grid used to compute the ray casting visibility + * epsilon + * The epsilon used for computation + * oShapeId + * fe is the border (in 2D) between 2 2D spaces. + * if fe is a silhouette, + * One of these 2D spaces is occupied by the shape + * to which fe belongs (on its left) and the other one is either occupied + * by another shape or empty or occupied by the same shape. + * We use this ray csating operation to determine which shape + * lies on fe's right. + * The result is the shape id stored in oShapeId + */ + int ComputeRayCastingVisibility(FEdge *fe, Grid* iGrid, real epsilon, set& oOccluders, + Polygon3r** oaPolygon, unsigned timestamp); + // FIXME + void FindOccludee(FEdge *fe, Grid* iGrid, real epsilon, Polygon3r** oaPolygon, unsigned timestamp); + void FindOccludee(FEdge *fe, Grid* iGrid, real epsilon, Polygon3r** oaPolygon, unsigned timestamp, + Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector& faceVertices); + +}; + +#endif // VIEWMAPBUILDER_H diff --git a/extern/freestyle/src/view_map/ViewMapIO.cpp b/extern/freestyle/src/view_map/ViewMapIO.cpp new file mode 100755 index 00000000000..d68164973a1 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapIO.cpp @@ -0,0 +1,1245 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "ViewMapIO.h" + +#ifdef IRIX +# define WRITE(n) Internal::write(out, (const char*)(&(n))) +# define READ(n) Internal::read(in, (char*)(&(n))) +#else +# define WRITE(n) out.write((const char*)(&(n)), sizeof((n))) +# define READ(n) in.read((char*)(&(n)), sizeof((n))) +#endif + +#define WRITE_IF_NON_NULL(ptr) if ((ptr) == NULL) { WRITE(ZERO); } else { WRITE((ptr)->userdata); } +#define READ_IF_NON_NULL(ptr, array) READ(tmp); if (tmp == ZERO) { (ptr) = NULL; } else { (ptr) = (array)[tmp]; } + +namespace ViewMapIO { + + namespace Internal { + + ViewMap* g_vm; + + //////////////////// 'load' Functions //////////////////// + + inline + int load(istream& in, Vec3r& v) { + + if (Options::getFlags() & Options::FLOAT_VECTORS) { + float tmp; + READ(tmp); + v[0] = tmp; + READ(tmp); + v[1] = tmp; + READ(tmp); + v[2] = tmp; + } else { + Vec3r::value_type tmp; + READ(tmp); + v[0] = tmp; + READ(tmp); + v[1] = tmp; + READ(tmp); + v[2] = tmp; + } + return 0; + } + + + inline + int load(istream& in, Polygon3r& p) { + + unsigned tmp; + + // Id + READ(tmp); + p.setId(tmp); + + // vertices (List) + vector tmp_vec; + Vec3r v; + READ(tmp); + for (unsigned i = 0; i < tmp; i++) { + load(in, v); + tmp_vec.push_back(v); + } + p.setVertices(tmp_vec); + + // min & max + // Already computed (in the SetVertices() method) + + return 0; + } + + + inline + int load(istream& in, Material& m) { + + float tmp_array[4]; + int i; + + // Diffuse + for (i = 0; i < 4; i++) + READ(tmp_array[i]); + m.SetDiffuse(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + + // Specular + for (i = 0; i < 4; i++) + READ(tmp_array[i]); + m.SetSpecular(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + + // Ambient + for (i = 0; i < 4; i++) + READ(tmp_array[i]); + m.SetAmbient(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + + // Emission + for (i = 0; i < 4; i++) + READ(tmp_array[i]); + m.SetEmission(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + + // Shininess + READ(tmp_array[0]); + m.SetShininess(tmp_array[0]); + + return 0; + } + + + int load(istream& in, ViewShape* vs) { + + if (!vs || !vs->sshape()) + return 1; + + // SShape + + // -> Id + Id::id_type id1, id2; + READ(id1); + READ(id2); + vs->sshape()->SetId(Id(id1, id2)); + + // -> Importance + float importance; + READ(importance); + vs->sshape()->SetImportance(importance); + + // -> BBox + // Not necessary (only used during view map computatiom) + + unsigned i, size, tmp; + + // -> Material + READ(size); + vector materials; + Material m; + for(i=0; isshape()->SetMaterials(materials); + + + + // -> VerticesList (List) + READ(size); + for (i = 0; i < size; i++) { + SVertex* sv; + READ_IF_NON_NULL(sv, g_vm->SVertices()); + vs->sshape()->AddNewVertex(sv); + } + + // -> Chains (List) + READ(size); + for (i = 0; i < size; i++) { + FEdge* fe; + READ_IF_NON_NULL(fe, g_vm->FEdges()); + vs->sshape()->AddChain(fe); + } + + // -> EdgesList (List) + READ(size); + for (i = 0; i < size; i++) { + FEdge* fe; + READ_IF_NON_NULL(fe, g_vm->FEdges()); + vs->sshape()->AddEdge(fe); + } + + // ViewEdges (List) + READ(size); + for (i = 0; i < size; i++) { + ViewEdge* ve; + READ_IF_NON_NULL(ve, g_vm->ViewEdges()); + vs->AddEdge(ve); + } + + // ViewVertices (List) + READ(size); + for (i = 0; i < size; i++) { + ViewVertex* vv; + READ_IF_NON_NULL(vv, g_vm->ViewVertices()); + vs->AddVertex(vv); + } + + return 0; + } + + + int load(istream& in, FEdge* fe) { + + if (!fe) + return 1; + + bool b; + + FEdgeSmooth *fesmooth = 0; + FEdgeSharp * fesharp = 0; + if(fe->isSmooth()){ + fesmooth = dynamic_cast(fe); + }else{ + fesharp = dynamic_cast(fe); + } + + // Id + Id::id_type id1, id2; + READ(id1); + READ(id2); + fe->SetId(Id(id1, id2)); + + // Nature + Nature::EdgeNature nature; + READ(nature); + fe->SetNature(nature); + + // hasVisibilityPoint + // bool b; + // READ(b); + // fe->SetHasVisibilityPoint(b); + + Vec3r v; + unsigned int matindex; + + // VisibilityPointA + // load(in, v); + // fe->SetVisibilityPointA(v); + + // VisibilityPointB + // load(in, v); + // fe->SetVisibilityPointB(v); + + if(fe->isSmooth()){ + // Normal + load(in, v); + fesmooth->SetNormal(v); + + // Material + READ(matindex); + fesmooth->SetMaterialIndex(matindex); + }else{ + // aNormal + load(in, v); + fesharp->SetNormalA(v); + + // bNormal + load(in, v); + fesharp->SetNormalB(v); + + // Materials + READ(matindex); + fesharp->SetaMaterialIndex(matindex); + READ(matindex); + fesharp->SetbMaterialIndex(matindex); + } + + unsigned tmp; + + // VertexA + SVertex* sva; + READ_IF_NON_NULL(sva, g_vm->SVertices()); + fe->SetVertexA(sva); + + // VertexB + SVertex* svb; + READ_IF_NON_NULL(svb, g_vm->SVertices()); + fe->SetVertexB(svb); + + // NextEdge + FEdge* nfe; + READ_IF_NON_NULL(nfe, g_vm->FEdges()); + fe->SetNextEdge(nfe); + + // PreviousEdge + FEdge* pfe; + READ_IF_NON_NULL(pfe, g_vm->FEdges()); + fe->SetPreviousEdge(pfe); + + // ViewEdge + ViewEdge* ve; + READ_IF_NON_NULL(ve, g_vm->ViewEdges()); + fe->SetViewEdge(ve); + + // Face + // Not necessary (only used during view map computatiom) + + Polygon3r p; + + // aFace + load(in, p); + fe->SetaFace(p); + + // occludeeEmpty + READ(b); + fe->SetOccludeeEmpty(b); + + // occludeeIntersection + load(in, v); + fe->SetOccludeeIntersection(v); + + return 0; + } + + + int load(istream& in, SVertex* sv) { + + if (!sv) + return 1; + + // Id + Id::id_type id1, id2; + READ(id1); + READ(id2); + sv->SetId(Id(id1, id2)); + + Vec3r v; + + // Point3D + load(in, v); + sv->SetPoint3D(v); + + // Point2D + load(in, v); + sv->SetPoint2D(v); + + unsigned tmp; + + // Shape + ViewShape* vs; + READ_IF_NON_NULL(vs, g_vm->ViewShapes()); + sv->SetShape(vs->sshape()); + + // pViewVertex + ViewVertex* vv; + READ_IF_NON_NULL(vv, g_vm->ViewVertices()); + sv->SetViewVertex(vv); + + unsigned i, size; + + // Normals (List) + READ(size); + for (i = 0; i < size; i++) { + load(in, v); + sv->AddNormal(v); + } + + // FEdges (List) + READ(size); + FEdge* fe; + for (i = 0; i < size; i++) { + READ_IF_NON_NULL(fe, g_vm->FEdges()); + sv->AddFEdge(fe); + } + + return 0; + } + + + int load(istream& in, ViewEdge* ve) { + + if (!ve) + return 1; + + unsigned tmp; + + // Id + Id::id_type id1, id2; + READ(id1); + READ(id2); + ve->SetId(Id(id1, id2)); + + // Nature + Nature::EdgeNature nature; + READ(nature); + ve->SetNature(nature); + + // QI + READ(tmp); + ve->SetQI(tmp); + + // Shape + ViewShape* vs; + READ_IF_NON_NULL(vs, g_vm->ViewShapes()); + ve->SetShape(vs); + + // aShape + ViewShape* avs; + READ_IF_NON_NULL(avs, g_vm->ViewShapes()); + ve->SetaShape(avs); + + // FEdgeA + FEdge* fea; + READ_IF_NON_NULL(fea, g_vm->FEdges()); + ve->SetFEdgeA(fea); + + // FEdgeB + FEdge* feb; + READ_IF_NON_NULL(feb, g_vm->FEdges()); + ve->SetFEdgeB(feb); + + // A + ViewVertex* vva; + READ_IF_NON_NULL(vva, g_vm->ViewVertices()); + ve->SetA(vva); + + // B + ViewVertex* vvb; + READ_IF_NON_NULL(vvb, g_vm->ViewVertices()); + ve->SetB(vvb); + + // Occluders (List) + if (!(Options::getFlags() & Options::NO_OCCLUDERS)) { + unsigned size; + READ(size); + ViewShape* vso; + for (unsigned i = 0; i < size; i++) { + READ_IF_NON_NULL(vso, g_vm->ViewShapes()); + ve->AddOccluder(vso); + } + } + + return 0; + } + + + int load(istream& in, ViewVertex* vv) { + + if (!vv) + return 1; + + unsigned tmp; + bool b; + + // Nature + Nature::VertexNature nature; + READ(nature); + vv->setNature(nature); + + if (vv->getNature() & Nature::T_VERTEX) { + TVertex* tv = dynamic_cast(vv); + + // Id + Id::id_type id1, id2; + READ(id1); + READ(id2); + tv->SetId(Id(id1, id2)); + + // FrontSVertex + SVertex* fsv; + READ_IF_NON_NULL(fsv, g_vm->SVertices()); + tv->SetFrontVertex(fsv); + + // BackSVertex + SVertex* bsv; + READ_IF_NON_NULL(bsv, g_vm->SVertices()); + tv->SetBackSVertex(bsv); + + // FrontEdgeA + ViewEdge* fea; + READ_IF_NON_NULL(fea, g_vm->ViewEdges()); + READ(b); + tv->SetFrontEdgeA(fea, b); + + // FrontEdgeB + ViewEdge* feb; + READ_IF_NON_NULL(feb, g_vm->ViewEdges()); + READ(b); + tv->SetFrontEdgeB(feb, b); + + // BackEdgeA + ViewEdge* bea; + READ_IF_NON_NULL(bea, g_vm->ViewEdges()); + READ(b); + tv->SetBackEdgeA(bea, b); + + // BackEdgeB + ViewEdge* beb; + READ_IF_NON_NULL(beb, g_vm->ViewEdges()); + READ(b); + tv->SetBackEdgeB(beb, b); + } + else if (vv->getNature() & Nature::NON_T_VERTEX) { + NonTVertex* ntv = dynamic_cast(vv); + + // SVertex + SVertex* sv; + READ_IF_NON_NULL(sv, g_vm->SVertices()); + ntv->SetSVertex(sv); + + // ViewEdges (List) + unsigned size; + READ(size); + ViewEdge* ve; + for (unsigned i = 0; i < size; i++) { + READ_IF_NON_NULL(ve, g_vm->ViewEdges()); + READ(b); + ntv->AddViewEdge(ve, b); + } + } + + return 0; + } + + //////////////////// 'save' Functions //////////////////// + + inline + int save(ostream& out, const Vec3r& v) { + + if (Options::getFlags() & Options::FLOAT_VECTORS) { + float tmp; + + tmp = v[0]; + WRITE(tmp); + tmp = v[1]; + WRITE(tmp); + tmp = v[2]; + WRITE(tmp); + } else { + Vec3r::value_type tmp; + + tmp = v[0]; + WRITE(tmp); + tmp = v[1]; + WRITE(tmp); + tmp = v[2]; + WRITE(tmp); + } + return 0; + } + + + inline + int save(ostream& out, const Polygon3r& p) { + + unsigned tmp; + + // Id + tmp = p.getId(); + WRITE(tmp); + + // vertices (List) + tmp = p.getVertices().size(); + WRITE(tmp); + for (vector::const_iterator i = p.getVertices().begin(); + i != p.getVertices().end(); i++) { + save(out, *i); + } + + // min & max + // Do not need to be saved + + return 0; + } + + + inline + int save(ostream& out, const Material& m) { + + unsigned i; + + // Diffuse + for (i = 0; i < 4; i++) + WRITE(m.diffuse()[i]); + + // Specular + for (i = 0; i < 4; i++) + WRITE(m.specular()[i]); + + // Ambient + for (i = 0; i < 4; i++) + WRITE(m.ambient()[i]); + + // Emission + for (i = 0; i < 4; i++) + WRITE(m.emission()[i]); + + // Shininess + float shininess = m.shininess(); + WRITE(shininess); + + return 0; + } + + + int save(ostream& out, ViewShape* vs) { + + if (!vs || !vs->sshape()) { + cerr << "Warning: null ViewShape" << endl; + return 1; + } + + unsigned tmp; + + // SShape + + // -> Id + Id::id_type id = vs->sshape()->getId().getFirst(); + WRITE(id); + id = vs->sshape()->getId().getSecond(); + WRITE(id); + + // -> Importance + float importance = vs->sshape()->importance(); + WRITE(importance); + + // -> BBox + // Not necessary (only used during view map computatiom) + + // -> Material + unsigned size = vs->sshape()->materials().size(); + WRITE(size); + for(unsigned i=0; isshape()->material(i)); + + // -> VerticesList (List) + tmp = vs->sshape()->GetVertexList().size(); + WRITE(tmp); + for (vector::const_iterator i1 = vs->sshape()->GetVertexList().begin(); + i1 != vs->sshape()->GetVertexList().end(); i1++) + WRITE_IF_NON_NULL(*i1); + + // -> Chains (List) + tmp = vs->sshape()->GetChains().size(); + WRITE(tmp); + for (vector::const_iterator i2 = vs->sshape()->GetChains().begin(); + i2 != vs->sshape()->GetChains().end(); i2++) + WRITE_IF_NON_NULL(*i2); + + // -> EdgesList (List) + tmp = vs->sshape()->GetEdgeList().size(); + WRITE(tmp); + for (vector::const_iterator i3 = vs->sshape()->GetEdgeList().begin(); + i3 != vs->sshape()->GetEdgeList().end(); i3++) + WRITE_IF_NON_NULL(*i3); + + // ViewEdges (List) + tmp = vs->edges().size(); + WRITE(tmp); + for (vector::const_iterator i4 = vs->edges().begin(); + i4 != vs->edges().end(); i4++) + WRITE_IF_NON_NULL(*i4); + + // ViewVertices (List) + tmp = vs->vertices().size(); + WRITE(tmp); + for (vector::const_iterator i5 = vs->vertices().begin(); + i5 != vs->vertices().end(); i5++) + WRITE_IF_NON_NULL(*i5); + + + return 0; + } + + + int save(ostream& out, FEdge* fe) { + + if (!fe) { + cerr << "Warning: null FEdge" << endl; + return 1; + } + + FEdgeSmooth * fesmooth = dynamic_cast(fe); + FEdgeSharp * fesharp = dynamic_cast(fe); + + // Id + Id::id_type id = fe->getId().getFirst(); + WRITE(id); + id = fe->getId().getSecond(); + WRITE(id); + + // Nature + Nature::EdgeNature nature = fe->getNature(); + WRITE(nature); + + bool b; + + // hasVisibilityPoint + // b = fe->hasVisibilityPoint(); + // WRITE(b); + + // VisibilityPointA + // save(out, fe->visibilityPointA()); + // + // // VisibilityPointB + // save(out, fe->visibilityPointB()); + + unsigned index; + if(fe->isSmooth()){ + // normal + save(out, fesmooth->normal()); + // material + index = fesmooth->materialIndex(); + WRITE(index); + }else{ + // aNormal + save(out, fesharp->normalA()); + // bNormal + save(out, fesharp->normalB()); + // aMaterial + index = fesharp->aMaterialIndex(); + WRITE(index); + // bMaterial + index = fesharp->bMaterialIndex(); + WRITE(index); + } + + + // VertexA + WRITE_IF_NON_NULL(fe->vertexA()); + + // VertexB + WRITE_IF_NON_NULL(fe->vertexB()); + + // NextEdge + WRITE_IF_NON_NULL(fe->nextEdge()); + + // PreviousEdge + WRITE_IF_NON_NULL(fe->previousEdge()); + + // ViewEdge + WRITE_IF_NON_NULL(fe->viewedge()); + + // Face + // Not necessary (only used during view map computatiom) + + // aFace + save(out, (Polygon3r&)fe->aFace()); + + // occludeeEmpty + b = fe->getOccludeeEmpty(); + WRITE(b); + + // occludeeIntersection + save(out, fe->getOccludeeIntersection()); + + return 0; + } + + + int save(ostream& out, SVertex* sv) { + + if (!sv) { + cerr << "Warning: null SVertex" << endl; + return 1; + } + + unsigned tmp; + + // Id + Id::id_type id = sv->getId().getFirst(); + WRITE(id); + id = sv->getId().getSecond(); + WRITE(id); + + Vec3r v; + + // Point3D + v = sv->point3D(); + save(out, sv->point3D()); + + // Point2D + v = sv->point2D(); + save(out, v); + + // Shape + WRITE_IF_NON_NULL(sv->shape()); + + // pViewVertex + WRITE_IF_NON_NULL(sv->viewvertex()); + + // Normals (List) + // Note: the 'size()' method of a set doesn't seem to return the + // actual size of the given set, so we have to hack it... + set::const_iterator i; + for (i = sv->normals().begin(), tmp = 0; + i != sv->normals().end(); + i++, tmp++); + WRITE(tmp); + for (i = sv->normals().begin(); i != sv->normals().end(); i++) + save(out, *i); + + // FEdges (List) + tmp = sv->fedges().size(); + WRITE(tmp); + for (vector::const_iterator j = sv->fedges_begin(); + j != sv->fedges_end(); j++) + WRITE_IF_NON_NULL(*j); + + return 0; + } + + + int save(ostream& out, ViewEdge* ve) { + + if (!ve) { + cerr << "Warning: null ViewEdge" << endl; + return 1; + } + + unsigned tmp; + + // Id + Id::id_type id = ve->getId().getFirst(); + WRITE(id); + id = ve->getId().getSecond(); + WRITE(id); + + // Nature + Nature::EdgeNature nature = ve->getNature(); + WRITE(nature); + + // QI + unsigned qi = ve->qi(); + WRITE(qi); + + // Shape + WRITE_IF_NON_NULL(ve->shape()); + + // aShape + WRITE_IF_NON_NULL(ve->aShape()); + + // FEdgeA + WRITE_IF_NON_NULL(ve->fedgeA()); + + // FEdgeB + WRITE_IF_NON_NULL(ve->fedgeB()); + + // A + WRITE_IF_NON_NULL(ve->A()); + + // B + WRITE_IF_NON_NULL(ve->B()); + + // Occluders (List) + if (!(Options::getFlags() & Options::NO_OCCLUDERS)) { + tmp = ve->occluders().size(); + WRITE(tmp); + for (vector::const_iterator i = ve->occluders().begin(); + i != ve->occluders().end(); i++) + WRITE_IF_NON_NULL((*i)); + } + + return 0; + } + + + int save(ostream& out, ViewVertex* vv) { + + if (!vv) { + cerr << "Warning: null ViewVertex" << endl; + return 1; + } + + // Nature + Nature::VertexNature nature = vv->getNature(); + WRITE(nature); + + if (vv->getNature() & Nature::T_VERTEX) { + TVertex* tv = dynamic_cast(vv); + + // Id + Id::id_type id = tv->getId().getFirst(); + WRITE(id); + id = tv->getId().getSecond(); + WRITE(id); + + // FrontSVertex + WRITE_IF_NON_NULL(tv->frontSVertex()); + + // BackSVertex + WRITE_IF_NON_NULL(tv->backSVertex()); + + // FrontEdgeA + WRITE_IF_NON_NULL(tv->frontEdgeA().first); + WRITE(tv->frontEdgeA().second); + + // FrontEdgeB + WRITE_IF_NON_NULL(tv->frontEdgeB().first); + WRITE(tv->frontEdgeB().second); + + // BackEdgeA + WRITE_IF_NON_NULL(tv->backEdgeA().first); + WRITE(tv->backEdgeA().second); + + // BackEdgeB + WRITE_IF_NON_NULL(tv->backEdgeB().first); + WRITE(tv->backEdgeB().second); + + } + else if (vv->getNature() & Nature::NON_T_VERTEX) { + NonTVertex* ntv = dynamic_cast(vv); + + // SVertex + WRITE_IF_NON_NULL(ntv->svertex()); + + // ViewEdges (List) + unsigned size = ntv->viewedges().size(); + WRITE(size); + vector::const_iterator i = ntv->viewedges().begin(); + for ( ; i != ntv->viewedges().end(); i++){ + WRITE_IF_NON_NULL(i->first); + WRITE(i->second); + } + + } else { + cerr << "Warning: unexpected ViewVertex nature" << endl; + return 1; + } + + return 0; + } + + } // End of namespace Internal + + + //////////////////// "Public" 'load' and 'save' functions //////////////////// + +#define SET_PROGRESS(n) if (pb) pb->setProgress((n)) + + int load(istream& in, ViewMap* vm, ProgressBar* pb) { + + if (!vm) + return 1; + + unsigned tmp; + + int err = 0; + + Internal::g_vm = vm; + + // Management of the progress bar (if present) + if (pb) { + pb->reset(); + pb->setLabelText("Loading View Map..."); + pb->setTotalSteps(6); + pb->setProgress(0); + } + + // Read and set the options + unsigned char flags; + READ(flags); + Options::setFlags(flags); + + // Read the size of the five ViewMap's lists (with some extra informations for the ViewVertices) + // and instantiate them (with default costructors) + unsigned vs_s, fe_s, fe_rle1, fe_rle2, sv_s, ve_s, vv_s, vv_rle1, vv_rle2; + READ(vs_s); + READ(fe_s); + + if (fe_s) { + bool b; + READ(b); + for (READ(fe_rle1), fe_rle2 = 0; + fe_rle1 < fe_s+1; + fe_rle2 = fe_rle1, READ(fe_rle1)) { + if (b) { + for (unsigned i = fe_rle2; i < fe_rle1; i++) { + FEdgeSmooth * fes = new FEdgeSmooth; + vm->AddFEdge(fes); + } + b = !b; + } + else if (!b) { + for (unsigned i = fe_rle2; i < fe_rle1; i++) { + FEdgeSharp * fes = new FEdgeSharp; + vm->AddFEdge(fes); + } + b = !b; + } + } + } + + READ(sv_s); + READ(ve_s); + READ(vv_s); + + if (vv_s) { + Nature::VertexNature nature; + READ(nature); + for (READ(vv_rle1), vv_rle2 = 0; + vv_rle1 < vv_s+1; + vv_rle2 = vv_rle1, READ(vv_rle1)) { + if (nature & Nature::T_VERTEX) { + for (unsigned i = vv_rle2; i < vv_rle1; i++) { + TVertex* tv = new TVertex(); + vm->AddViewVertex(tv); + } + nature = Nature::NON_T_VERTEX; + } + else if (nature & Nature::NON_T_VERTEX) { + for (unsigned i = vv_rle2; i < vv_rle1; i++) { + NonTVertex* ntv = new NonTVertex(); + vm->AddViewVertex(ntv); + } + nature = Nature::T_VERTEX; + } + } + } + + for (unsigned i0 = 0; i0 < vs_s; i0++) { + SShape* ss = new SShape(); + ViewShape* vs = new ViewShape(); + vs->SetSShape(ss); + ss->SetViewShape(vs); + vm->AddViewShape(vs); + } + // for (unsigned i1 = 0; i1 < fe_s; i1++) { + // FEdge* fe = new FEdge(); + // vm->AddFEdge(fe); + // } + for (unsigned i2 = 0; i2 < sv_s; i2++) { + SVertex* sv = new SVertex(); + vm->AddSVertex(sv); + } + for (unsigned i3 = 0; i3 < ve_s; i3++) { + ViewEdge* ve = new ViewEdge(); + vm->AddViewEdge(ve); + } + + + // Read the values for all the objects created above + SET_PROGRESS(1); + for (vector::const_iterator i4 = vm->ViewShapes().begin(); + i4 != vm->ViewShapes().end(); i4++) + err += Internal::load(in, *i4); + SET_PROGRESS(2); + for (vector::const_iterator i5 = vm->FEdges().begin(); + i5 != vm->FEdges().end(); i5++) + err += Internal::load(in, *i5); + SET_PROGRESS(3); + for (vector::const_iterator i6 = vm->SVertices().begin(); + i6 != vm->SVertices().end(); i6++) + err += Internal::load(in, *i6); + SET_PROGRESS(4); + for (vector::const_iterator i7 = vm->ViewEdges().begin(); + i7 != vm->ViewEdges().end(); i7++) + err += Internal::load(in, *i7); + SET_PROGRESS(5); + for (vector::const_iterator i8 = vm->ViewVertices().begin(); + i8 != vm->ViewVertices().end(); i8++) + err += Internal::load(in, *i8); + SET_PROGRESS(6); + + // Read the shape id to index mapping + unsigned map_s; + READ(map_s); + unsigned id,index; + for(unsigned i4=0;i4shapeIdToIndexMap()[id] = index; + } + + return err; + } + + + int save(ostream& out, ViewMap* vm, ProgressBar* pb) { + + if (!vm) + return 1; + + int err = 0; + + // Management of the progress bar (if present) + if (pb) { + pb->reset(); + pb->setLabelText("Saving View Map..."); + pb->setTotalSteps(6); + pb->setProgress(0); + } + + // For every object, initialize its userdata member to its index in the ViewMap list + for (unsigned i0 = 0; i0 < vm->ViewShapes().size(); i0++) { + vm->ViewShapes()[i0]->userdata = (void*)i0; + vm->ViewShapes()[i0]->sshape()->userdata = (void*)i0; + } + for (unsigned i1 = 0; i1 < vm->FEdges().size(); i1++) + vm->FEdges()[i1]->userdata = (void*)i1; + for (unsigned i2 = 0; i2 < vm->SVertices().size(); i2++) + vm->SVertices()[i2]->userdata = (void*)i2; + for (unsigned i3 = 0; i3 < vm->ViewEdges().size(); i3++) + vm->ViewEdges()[i3]->userdata = (void*)i3; + for (unsigned i4 = 0; i4 < vm->ViewVertices().size(); i4++) + vm->ViewVertices()[i4]->userdata = (void*)i4; + + // Write the current options + unsigned char flags = Options::getFlags(); + WRITE(flags); + + // Write the size of the five lists (with some extra informations for the ViewVertices) + unsigned size; + size = vm->ViewShapes().size(); + WRITE(size); + size = vm->FEdges().size(); + WRITE(size); + if (size) { + bool b = vm->FEdges()[0]->isSmooth(); + WRITE(b); + for (unsigned i = 0; i < size; i++) { + while (i < size && (vm->FEdges()[i]->isSmooth() == b)) + i++; + if (i < size) { + WRITE(i); + b = !b; + } + } + WRITE(size); + size++; + WRITE(size); + } + size = vm->SVertices().size(); + WRITE(size); + size = vm->ViewEdges().size(); + WRITE(size); + size = vm->ViewVertices().size(); + WRITE(size); + if (size) { + Nature::VertexNature nature = vm->ViewVertices()[0]->getNature(); + WRITE(nature); + nature &= ~Nature::VIEW_VERTEX; + for (unsigned i = 0; i < size; i++) { + while (i < size && (vm->ViewVertices()[i]->getNature() & nature)) + i++; + if (i < size) { + WRITE(i); + nature = vm->ViewVertices()[i]->getNature() & ~Nature::VIEW_VERTEX; + } + } + WRITE(size); + size++; + WRITE(size); + } + + + // Write all the elts of the ViewShapes List + SET_PROGRESS(1); + for (vector::const_iterator i5 = vm->ViewShapes().begin(); + i5 != vm->ViewShapes().end(); i5++) + err += Internal::save(out, *i5); + SET_PROGRESS(2); + for (vector::const_iterator i6 = vm->FEdges().begin(); + i6 != vm->FEdges().end(); i6++) + err += Internal::save(out, *i6); + SET_PROGRESS(3); + for (vector::const_iterator i7 = vm->SVertices().begin(); + i7 != vm->SVertices().end(); i7++) + err += Internal::save(out, *i7); + SET_PROGRESS(4); + for (vector::const_iterator i8 = vm->ViewEdges().begin(); + i8 != vm->ViewEdges().end(); i8++) + err += Internal::save(out, *i8); + SET_PROGRESS(5); + for (vector::const_iterator i9 = vm->ViewVertices().begin(); + i9 != vm->ViewVertices().end(); i9++) + err += Internal::save(out, *i9); + + // Write the shape id to index mapping + size = vm->shapeIdToIndexMap().size(); + WRITE(size); + unsigned id,index; + for(ViewMap::id_to_index_map::iterator mit=vm->shapeIdToIndexMap().begin(), mitend=vm->shapeIdToIndexMap().end(); mit!=mitend; ++mit){ + id = mit->first; + index = mit->second; + WRITE(id); + WRITE(index); + } + + // Reset 'userdata' members + for (vector::const_iterator j0 = vm->ViewShapes().begin(); + j0 != vm->ViewShapes().end(); j0++) { + (*j0)->userdata = 0; + (*j0)->sshape()->userdata = 0; + } + for (vector::const_iterator j1 = vm->FEdges().begin(); + j1 != vm->FEdges().end(); j1++) + (*j1)->userdata = 0; + for (vector::const_iterator j2 = vm->SVertices().begin(); + j2 != vm->SVertices().end(); j2++) + (*j2)->userdata = 0; + for (vector::const_iterator j3 = vm->ViewEdges().begin(); + j3 != vm->ViewEdges().end(); j3++) + (*j3)->userdata = 0; + for (vector::const_iterator j4 = vm->ViewVertices().begin(); + j4 != vm->ViewVertices().end(); j4++) + (*j4)->userdata = 0; + SET_PROGRESS(6); + + return err; + } + + + //////////////////// Options //////////////////// + + namespace Options { + + namespace Internal { + + static unsigned char g_flags = 0; + static string g_models_path; + + } // End of namespace Internal + + void setFlags(const unsigned char flags) { + Internal::g_flags = flags; + } + + void addFlags(const unsigned char flags) { + Internal::g_flags |= flags; + } + + void rmFlags(const unsigned char flags) { + Internal::g_flags &= ~flags; + } + + unsigned char getFlags() { + return Internal::g_flags; + } + + void setModelsPath(const string& path) { + Internal::g_models_path = path; + } + + string getModelsPath() { + return Internal::g_models_path; + } + + }; // End of namepace Options + +} // End of namespace ViewMapIO diff --git a/extern/freestyle/src/view_map/ViewMapIO.h b/extern/freestyle/src/view_map/ViewMapIO.h new file mode 100755 index 00000000000..33e168b537b --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapIO.h @@ -0,0 +1,116 @@ +// +// Filename : ViewMapIO.h +// Author(s) : Emmanuel Turquin +// Purpose : Functions to manage I/O for the view map +// Date of creation : 09/01/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAPIO_H +# define VIEWMAPIO_H + +# include +# include +# include "../system/FreestyleConfig.h" +# include "../system/ProgressBar.h" +# include "ViewMap.h" + +namespace ViewMapIO { + + static const unsigned ZERO = UINT_MAX; + + LIB_VIEW_MAP_EXPORT + int load(istream& in, ViewMap* vm, ProgressBar* pb = NULL); + + LIB_VIEW_MAP_EXPORT + int save(ostream& out, ViewMap* vm, ProgressBar* pb = NULL); + + namespace Options { + + static const unsigned char FLOAT_VECTORS = 1; + static const unsigned char NO_OCCLUDERS = 2; + + LIB_VIEW_MAP_EXPORT + void setFlags(const unsigned char flags); + + LIB_VIEW_MAP_EXPORT + void addFlags(const unsigned char flags); + + LIB_VIEW_MAP_EXPORT + void rmFlags(const unsigned char flags); + + LIB_VIEW_MAP_EXPORT + unsigned char getFlags(); + + LIB_VIEW_MAP_EXPORT + void setModelsPath(const string& path); + + LIB_VIEW_MAP_EXPORT + string getModelsPath(); + + }; // End of namepace Options + +# ifdef IRIX + + namespace Internal { + + template + ostream& write(ostream& out, const char* str) { + out.put(str[S - 1]); + return write(out, str); + } + + template<> + ostream& write<1>(ostream& out, const char* str) { + return out.put(str[0]); + } + + template<> + ostream& write<0>(ostream& out, const char*) { + return out; + } + + template + istream& read(istream& in, char* str) { + in.get(str[S - 1]); + return read(in, str); + } + + template<> + istream& read<1>(istream& in, char* str) { + return in.get(str[0]); + } + + template<> + istream& read<0>(istream& in, char*) { + return in; + } + + } // End of namespace Internal + +# endif // IRIX + +} // End of namespace ViewMapIO + +#endif // VIEWMAPIO_H diff --git a/extern/freestyle/src/view_map/ViewMapIterators.h b/extern/freestyle/src/view_map/ViewMapIterators.h new file mode 100755 index 00000000000..004674ba758 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapIterators.h @@ -0,0 +1,542 @@ +// +// Filename : ViewMapIterators.h +// Author(s) : Stephane Grabli +// Purpose : Iterators used to iterate over the various elements +// of the ViewMap +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAPITERATORS_H +# define VIEWMAPITERATORS_H + +#include "ViewMap.h" + + /**********************************/ + /* */ + /* */ + /* ViewMap */ + /* */ + /* */ + /**********************************/ + + /**********************************/ + /* */ + /* */ + /* ViewVertex */ + /* */ + /* */ + /**********************************/ + +namespace ViewVertexInternal{ + + /*! Class representing an iterator over oriented ViewEdges + * around a ViewVertex. This iterator allows a CCW iteration + * (in the image plane). + * An instance of an orientedViewEdgeIterator can only + * be obtained from a ViewVertex by calling edgesBegin() or edgesEnd(). + */ + class orientedViewEdgeIterator + { + public: + friend class ViewVertex; + friend class TVertex; + friend class NonTVertex; + friend class ViewEdge; + + // FIXME + typedef ::TVertex::edge_pointers_container edge_pointers_container; + typedef ::NonTVertex::edges_container edges_container; + protected: + + Nature::VertexNature _Nature; // the nature of the underlying vertex + // T vertex attributes + edge_pointers_container::iterator _tbegin; + edge_pointers_container::iterator _tend; + edge_pointers_container::iterator _tvertex_iter; + + // Non TVertex attributes + edges_container::iterator _begin; + edges_container::iterator _end; + edges_container::iterator _nontvertex_iter; + + public: + /*! Default constructor */ + inline orientedViewEdgeIterator() {} + inline orientedViewEdgeIterator(Nature::VertexNature iNature) + {_Nature = iNature;} + /*! Copy constructor */ + orientedViewEdgeIterator(const orientedViewEdgeIterator& iBrother) + { + _Nature = iBrother._Nature; + if(_Nature & Nature::T_VERTEX) + { + _tbegin = iBrother._tbegin; + _tend = iBrother._tend; + _tvertex_iter = iBrother._tvertex_iter; + } + else + { + _begin = iBrother._begin; + _end = iBrother._end; + _nontvertex_iter = iBrother._nontvertex_iter; + } + } + virtual ~orientedViewEdgeIterator() {} + + public: + inline orientedViewEdgeIterator(edge_pointers_container::iterator begin, + edge_pointers_container::iterator end, + edge_pointers_container::iterator iter) + { + _Nature = Nature::T_VERTEX; + _tbegin = begin; + _tend = end; + _tvertex_iter = iter; + } + inline orientedViewEdgeIterator(edges_container::iterator begin, + edges_container::iterator end, + edges_container::iterator iter) + { + _Nature = Nature::NON_T_VERTEX; + _begin = begin; + _end = end; + _nontvertex_iter = iter; + } + + public: + + + /*! Tells whether the ViewEdge pointed + * by this iterator is the first one of the + * iteration list or not. + */ + virtual bool isBegin() const + { + if(_Nature & Nature::T_VERTEX) + return (_tvertex_iter == _tbegin); + else + return (_nontvertex_iter == _begin); + } + /*! Tells whether the ViewEdge pointed + * by this iterator is after the last one of the + * iteration list or not. + */ + virtual bool isEnd() const + { + if(_Nature & Nature::T_VERTEX) + return (_tvertex_iter == _tend); + else + return (_nontvertex_iter == _end); + } + + // operators + /*! Increments.In the scripting language, call + * "increment()". + */ + virtual orientedViewEdgeIterator& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + /*! Increments.In the scripting language, call + * "increment()". + */ + virtual orientedViewEdgeIterator operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + orientedViewEdgeIterator tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + + // comparibility + /*! operator != */ + virtual bool operator!=(const orientedViewEdgeIterator& b) const + { + if(_Nature & Nature::T_VERTEX) + return (_tvertex_iter != b._tvertex_iter); + else + return (_nontvertex_iter != b._nontvertex_iter); + } + + /*! operator == */ + virtual bool operator==(const orientedViewEdgeIterator& b) const + {return !(*this != b);} + + // dereferencing + /*! Returns a reference to the pointed orientedViewEdge. + * In the scripting language, you must call + * "getObject()"instead. + */ + virtual ::ViewVertex::directedViewEdge& operator*() const + { + if(_Nature & Nature::T_VERTEX) + //return _tvertex_iter; + return **_tvertex_iter; + else + return (*_nontvertex_iter); + } + /*! Returns a pointer to the pointed orientedViewEdge. + * Can't be called in the scripting language. + */ + virtual ::ViewVertex::directedViewEdge* operator->() const { return &(operator*());} + + public: + /*! increments.*/ + inline void increment() + { + if(_Nature & Nature::T_VERTEX) + { + ::ViewVertex::directedViewEdge tmp = (**_tvertex_iter); + ++_tvertex_iter; + if(_tvertex_iter != _tend){ + // FIXME : pquoi deja ? + ::ViewVertex::directedViewEdge tmp2 = (**_tvertex_iter); + if(tmp2.first == tmp.first) + ++_tvertex_iter; + } + } + else + ++_nontvertex_iter; + } + }; + + } + /**********************************/ + /* */ + /* */ + /* ViewEdge */ + /* */ + /* */ + /**********************************/ + +namespace ViewEdgeInternal { +// +// SVertexIterator +// +///////////////////////////////////////////////// + + class SVertexIterator : public Interface0DIteratorNested + { + public: + + SVertexIterator() { + _vertex = NULL; + _begin = NULL; + _previous_edge = NULL; + _next_edge = NULL; + _t = 0; + } + + SVertexIterator(const SVertexIterator& vi) { + _vertex = vi._vertex; + _begin = vi._begin; + _previous_edge = vi._previous_edge; + _next_edge = vi._next_edge; + _t = vi._t; + } + + SVertexIterator(SVertex* v, SVertex* begin, FEdge* prev, FEdge* next, float t) { + _vertex = v; + _begin = begin; + _previous_edge = prev; + _next_edge = next; + _t = t; + } + + SVertexIterator& operator=(const SVertexIterator& vi) { + _vertex = vi._vertex; + _begin = vi._begin; + _previous_edge = vi._previous_edge; + _next_edge = vi._next_edge; + _t = vi._t; + return *this; + } + + virtual ~SVertexIterator() {} + + virtual string getExactTypeName() const { + return "SVertexIterator"; + } + + virtual SVertex& operator*() { + return *_vertex; + } + + virtual SVertex* operator->() { + return &(operator*()); + } + + virtual SVertexIterator& operator++() { + increment(); + return *this; + } + + virtual SVertexIterator operator++(int) { + SVertexIterator ret(*this); + increment(); + return ret; + } + + virtual SVertexIterator& operator--() { + decrement(); + return *this; + } + + virtual SVertexIterator operator--(int) { + SVertexIterator ret(*this); + decrement(); + return ret; + } + + virtual void increment(){ + if (!_next_edge) { + _vertex = 0; + return; + } + _t += (float)_next_edge->getLength2D(); + _vertex = _next_edge->vertexB(); + _previous_edge = _next_edge; + _next_edge = _next_edge->nextEdge(); + + } + virtual void decrement(){ + if (!_previous_edge) { + _vertex = 0; + return; + } + if((!_next_edge) && (!_vertex)){ + _vertex = _previous_edge->vertexB(); + return; + } + _t -= (float)_previous_edge->getLength2D(); + _vertex = _previous_edge->vertexA(); + _next_edge = _previous_edge; + _previous_edge = _previous_edge->previousEdge(); + } + + bool isBegin() const { + return _vertex == _begin; + } + + bool isEnd() const { + return (!_vertex) || (_vertex == _begin && _previous_edge); + } + + virtual float t() const { + return _t; + } + virtual float u() const { + return _t/(float)_next_edge->viewedge()->getLength2D(); + } + + virtual bool operator==(const Interface0DIteratorNested& it) const { + const SVertexIterator* it_exact = dynamic_cast(&it); + if (!it_exact) + return false; + return (_vertex == it_exact->_vertex); + } + + virtual SVertexIterator* copy() const { + return new SVertexIterator(*this); + } + + private: + + SVertex* _vertex; + SVertex* _begin; + FEdge* _previous_edge; + FEdge* _next_edge; + float _t; // curvilinear abscissa + }; + + + +// +// ViewEdgeIterator (base class) +// +/////////////////////////////////////////////////////////// + + /*! Base class for iterators over ViewEdges of the ViewMap Graph. + * Basically the "increment()" operator of this class should + * be able to take the decision of "where" (on which ViewEdge) to go + * when pointing on a given ViewEdge. + * ::Caution::: the dereferencing operator returns a *pointer* to + * the pointed ViewEdge. + */ +class ViewEdgeIterator +{ +public: + + /*! Builds a ViewEdgeIterator from a starting ViewEdge and its orientation. + * \param begin + * The ViewEdge from where to start the iteration. + * \param orientation + * If true, we'll look for the next ViewEdge among the + * ViewEdges that surround the ending ViewVertex of begin. + * If false, we'll search over the ViewEdges surrounding + * the ending ViewVertex of begin. + */ + ViewEdgeIterator(ViewEdge* begin = 0, bool orientation = true) { + _orientation = orientation; + _edge = begin; + _begin = begin; + } + + /*! Copy constructor */ + ViewEdgeIterator(const ViewEdgeIterator& it) { + _orientation = it._orientation; + _edge = it._edge; + _begin = it._begin; + } + + virtual ~ViewEdgeIterator() {} + + /*! Returns the string "ViewEdgeIterator" */ + virtual string getExactTypeName() const { + return "ViewEdgeIterator"; + } + + /*! Returns the current pointed ViewEdge. */ + ViewEdge* getCurrentEdge() { + return _edge; + } + + /*! Sets the current pointed ViewEdge. */ + void setCurrentEdge(ViewEdge* edge) { + _edge = edge; + } + + /*! Returns the first ViewEdge used for the iteration. */ + ViewEdge* getBegin() { + return _begin; + } + + /*! Sets the first ViewEdge used for the iteration. */ + void setBegin(ViewEdge* begin) { + _begin = begin; + } + + /*! Gets the orientation of the pointed ViewEdge in the iteration. */ + bool getOrientation() const { + return _orientation; + } + + /*! Sets the orientation of the pointed ViewEdge in the iteration. */ + void setOrientation(bool orientation) { + _orientation = orientation; + } + + /*! Changes the current orientation. */ + void changeOrientation() { + _orientation = !_orientation; + } + + /*! Returns a *pointer* to the pointed ViewEdge. */ + virtual ViewEdge* operator*() { + return _edge; + } + + virtual ViewEdge* operator->() { + return operator*(); + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + virtual ViewEdgeIterator& operator++() { + increment(); + return *this; + } + + /*! Increments. In the scripting language, call + * "increment()". + */ + virtual ViewEdgeIterator operator++(int) { + ViewEdgeIterator tmp(*this); + increment(); + return tmp; + } + + /*! increments. */ + virtual void increment() { + cerr << "Warning: method increment() not implemented" << endl; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + virtual ViewEdgeIterator& operator--() { + decrement(); + return *this; + } + + /*! Decrements. In the scripting language, call + * "decrement()". + */ + virtual ViewEdgeIterator operator--(int) { + ViewEdgeIterator tmp(*this); + decrement(); + return tmp; + } + + /*! decrements. */ + virtual void decrement(){ + cerr << "Warning: method decrement() not implemented" << endl; + } + + /*! Returns true if the pointed ViewEdge is the + * first one used for the iteration. + */ + virtual bool isBegin() const { + return _edge == _begin; + } + + /*! Returns true if the pointed ViewEdge* equals 0. + */ + virtual bool isEnd() const { + return !_edge; + } + + /*! operator == */ + virtual bool operator==(ViewEdgeIterator& it) const { + return _edge == it._edge; + } + + /*! operator != */ + virtual bool operator!=(ViewEdgeIterator& it) const { + return !(*this == it); + } + +protected: + + bool _orientation; + ViewEdge* _edge; + ViewEdge* _begin; +}; + +} // end of namespace ViewEdgeInternal + +#endif // VIEWMAPITERATORS_H + diff --git a/extern/freestyle/src/view_map/ViewMapTesselator.cpp b/extern/freestyle/src/view_map/ViewMapTesselator.cpp new file mode 100755 index 00000000000..6041f527d17 --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapTesselator.cpp @@ -0,0 +1,36 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "ViewMapTesselator.h" + +NodeGroup* ViewMapTesselator::Tesselate(ViewMap *iViewMap) +{ + if(0 == iViewMap->ViewEdges().size()) + return NULL; + + const vector& viewedges = iViewMap->ViewEdges(); + return Tesselate(viewedges.begin(), viewedges.end()); +} + +NodeGroup* ViewMapTesselator::Tesselate(WShape *) +{ + return NULL; +} diff --git a/extern/freestyle/src/view_map/ViewMapTesselator.h b/extern/freestyle/src/view_map/ViewMapTesselator.h new file mode 100755 index 00000000000..fc1ec8e373e --- /dev/null +++ b/extern/freestyle/src/view_map/ViewMapTesselator.h @@ -0,0 +1,196 @@ +// +// Filename : ViewMapTesselator.h +// Author(s) : Stephane Grabli +// Purpose : Class to build a Node Tree designed to be displayed +// from a Silhouette View Map structure. +// Date of creation : 26/03/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef VIEWMAPTESSELATOR_H +# define VIEWMAPTESSELATOR_H + +# include "../scene_graph/NodeShape.h" +# include "../winged_edge/WEdge.h" +# include "Silhouette.h" +# include "ViewMap.h" +# include "../scene_graph/NodeGroup.h" +# include "../scene_graph/LineRep.h" +# include "../scene_graph/OrientedLineRep.h" +# include "../scene_graph/VertexRep.h" + +class NodeShape; +class NodeGroup; +class SShape; +class WShape; + +class LIB_VIEW_MAP_EXPORT ViewMapTesselator +{ +public: + + inline ViewMapTesselator() {_nature = Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE;_Material.SetDiffuse(0,0,0,1);_overloadMaterial=false;} + virtual ~ViewMapTesselator() {} + + /*! Builds a set of lines rep contained under a + * a NodeShape, itself contained under a NodeGroup from a ViewMap + */ + NodeGroup* Tesselate(ViewMap* iViewMap) ; + + /*! Builds a set of lines rep contained under a + * a NodeShape, itself contained under a NodeGroup from a + * set of view edges + */ + template + NodeGroup* Tesselate(ViewEdgesIterator begin, ViewEdgesIterator end) ; + + /*! Builds a set of lines rep contained among a + * a NodeShape, from a WShape + */ + NodeGroup* Tesselate(WShape* iWShape); + + + inline void SetNature(Nature::EdgeNature iNature) {_nature = iNature;} + inline void SetMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} + inline Nature::EdgeNature nature() {return _nature;} + inline const Material& material() const {return _Material;} + +protected: + virtual void AddVertexToLine(LineRep *iLine, SVertex *v) = 0; + +private: + Nature::EdgeNature _nature; + Material _Material; + bool _overloadMaterial; +}; + +/*! Class to tesselate the 2D projected silhouette */ +class ViewMapTesselator2D : public ViewMapTesselator +{ +public: + inline ViewMapTesselator2D() : ViewMapTesselator() {} + virtual ~ViewMapTesselator2D() {} + +protected: + virtual void AddVertexToLine(LineRep *iLine, SVertex *v) + { + iLine->AddVertex(v->point2D()); + } +}; + +/*! Class to tesselate the 3D silhouette */ +class ViewMapTesselator3D : public ViewMapTesselator +{ +public: + inline ViewMapTesselator3D() : ViewMapTesselator() {} + virtual ~ViewMapTesselator3D() {} + +protected: + virtual void AddVertexToLine(LineRep *iLine, SVertex *v) + { + iLine->AddVertex(v->point3D()); + } +}; + +// +// Implementation +// +/////////////////////////////////////////////// + +template +NodeGroup * ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesIterator end) +{ + NodeGroup *group = new NodeGroup; + NodeShape *tshape = new NodeShape; + group->AddChild(tshape); + //tshape->material().SetDiffuse(0.f, 0.f, 0.f, 1.f); + tshape->SetMaterial(_Material); + + LineRep* line; + + + FEdge *firstEdge; + FEdge *nextFEdge, *currentEdge; + + int id=0; + // for(vector::const_iterator c=viewedges.begin(),cend=viewedges.end(); + // c!=cend; + // c++) + for(ViewEdgesIterator c=begin, cend=end; + c!=cend; + c++) + { + // if((*c)->qi() > 0){ + // continue; + // } + // if(!((*c)->nature() & (_nature))) + // continue; + // + firstEdge = (*c)->fedgeA(); + + // if(firstEdge->invisibility() > 0) + // continue; + + line = new OrientedLineRep(); + if(_overloadMaterial) + line->SetMaterial(_Material); + + // there might be chains containing a single element + if(0 == (firstEdge)->nextEdge()) + { + line->SetStyle(LineRep::LINES); + // line->AddVertex((*c)->vertexA()->point3D()); + // line->AddVertex((*c)->vertexB()->point3D()); + AddVertexToLine(line, firstEdge->vertexA()); + AddVertexToLine(line, firstEdge->vertexB()); + } + else + { + line->SetStyle(LineRep::LINE_STRIP); + + //firstEdge = (*c); + nextFEdge = firstEdge; + currentEdge = firstEdge; + do + { + //line->AddVertex(nextFEdge->vertexA()->point3D()); + AddVertexToLine(line, nextFEdge->vertexA()); + currentEdge = nextFEdge; + nextFEdge = nextFEdge->nextEdge(); + }while((nextFEdge != NULL) && (nextFEdge != firstEdge)); + // Add the last vertex + //line->AddVertex(currentEdge->vertexB()->point3D()); + AddVertexToLine(line, currentEdge->vertexB()); + + } + + line->SetId((*c)->getId().getFirst()); + line->ComputeBBox(); + tshape->AddRep(line); + id++; + } + + return group; +} + +#endif // VIEWMAPTESSELATOR_H diff --git a/extern/freestyle/src/view_map/src.pri b/extern/freestyle/src/view_map/src.pri new file mode 100755 index 00000000000..2faf6a81fea --- /dev/null +++ b/extern/freestyle/src/view_map/src.pri @@ -0,0 +1,34 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +VIEW_MAP_DIR = ../view_map + +SOURCES *= $${VIEW_MAP_DIR}/Functions0D.cpp \ + $${VIEW_MAP_DIR}/Functions1D.cpp \ + $${VIEW_MAP_DIR}/Silhouette.cpp \ + $${VIEW_MAP_DIR}/SilhouetteGeomEngine.cpp \ + $${VIEW_MAP_DIR}/ViewMap.cpp \ + $${VIEW_MAP_DIR}/ViewMapBuilder.cpp \ + $${VIEW_MAP_DIR}/ViewMapIO.cpp \ + $${VIEW_MAP_DIR}/ViewMapTesselator.cpp \ + $${VIEW_MAP_DIR}/FEdgeXDetector.cpp \ + $${VIEW_MAP_DIR}/ViewEdgeXBuilder.cpp \ + $${VIEW_MAP_DIR}/SteerableViewMap.cpp + +HEADERS *= $${VIEW_MAP_DIR}/Functions0D.h \ + $${VIEW_MAP_DIR}/Functions1D.h \ + $${VIEW_MAP_DIR}/Interface0D.h \ + $${VIEW_MAP_DIR}/Interface1D.h \ + $${VIEW_MAP_DIR}/Silhouette.h \ + $${VIEW_MAP_DIR}/SilhouetteGeomEngine.h \ + $${VIEW_MAP_DIR}/ViewMap.h \ + $${VIEW_MAP_DIR}/ViewMapAdvancedIterators.h \ + $${VIEW_MAP_DIR}/ViewMapBuilder.h \ + $${VIEW_MAP_DIR}/ViewMapIO.h \ + $${VIEW_MAP_DIR}/ViewMapIterators.h \ + $${VIEW_MAP_DIR}/ViewMapTesselator.h \ + $${VIEW_MAP_DIR}/FEdgeXDetector.h \ + $${VIEW_MAP_DIR}/ViewEdgeXBuilder.h \ + $${VIEW_MAP_DIR}/SteerableViewMap.h diff --git a/extern/freestyle/src/view_map/view_map.pro b/extern/freestyle/src/view_map/view_map.pro new file mode 100755 index 00000000000..ef629bcf6a7 --- /dev/null +++ b/extern/freestyle/src/view_map/view_map.pro @@ -0,0 +1,89 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_VIEW_MAP} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll + +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_VIEW_MAP_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../geometry ../image ../scene_graph ../system ../winged_edge + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# LIBS +# +####################################### + +win32:LIBS *= $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_IMAGE}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SCENE_GRAPH}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_WINGED_EDGE}$${LIBVERSION}.lib + +!win32 { + lib_bundle { + LIBS += -F$${DESTDIR} -framework $${LIB_GEOMETRY} \ + -framework $${LIB_IMAGE} -framework $${LIB_SCENE_GRAPH} \ + -framework $${LIB_SYSTEM} -framework $${LIB_WINGED_EDGE} + } else { + LIBS *= -L$${DESTDIR} -l$${LIB_GEOMETRY} -l$${LIB_IMAGE} -l$${LIB_SCENE_GRAPH} \ + -l$${LIB_SYSTEM} -l$${LIB_WINGED_EDGE} + } +} + + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} diff --git a/extern/freestyle/src/winged_edge/Curvature.cpp b/extern/freestyle/src/winged_edge/Curvature.cpp new file mode 100755 index 00000000000..a890fb92c04 --- /dev/null +++ b/extern/freestyle/src/winged_edge/Curvature.cpp @@ -0,0 +1,647 @@ +/* GTS - Library for the manipulation of triangulated surfaces + * Copyright (C) 1999-2002 Ray Jones, Stéphane Popinet + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "Curvature.h" +#include +#include "WEdge.h" +#include "../system/FreestyleConfig.h" +#include "../geometry/normal_cycle.h" +#include +#include + +static bool angle_obtuse (WVertex * v, WFace * f) +{ + WOEdge * e; + f->getOppositeEdge (v, e); + + Vec3r vec1(e->GetaVertex()->GetVertex()-v->GetVertex()); + Vec3r vec2(e->GetbVertex()->GetVertex()-v->GetVertex()); + return ((vec1 * vec2) < 0); +} + +// FIXME +// WVvertex is useless but kept for history reasons +static bool triangle_obtuse (WVertex*, WFace * f) +{ + bool b=false; + for (int i=0; i<3; i++) + b = b || + ((f->GetEdgeList()[i]->getVec3r() * f->GetEdgeList()[(i+1)%3]->getVec3r()) < 0); + return b; +} + +static real cotan (WVertex * vo, WVertex * v1, WVertex * v2) +{ + /* cf. Appendix B of [Meyer et al 2002] */ + real udotv, denom; + + Vec3r u(v1->GetVertex()- vo->GetVertex()); + Vec3r v(v2->GetVertex()- vo->GetVertex()); + + udotv = u * v; + denom = sqrt(u.squareNorm() * v.squareNorm() - udotv * udotv); + + /* denom can be zero if u==v. Returning 0 is acceptable, based on + * the callers of this function below. */ + if (denom == 0.0) return (0.0); + + return (udotv / denom); +} + +static real angle_from_cotan (WVertex * vo, WVertex * v1, WVertex * v2) +{ + /* cf. Appendix B and the caption of Table 1 from [Meyer et al 2002] */ + real udotv, denom; + + Vec3r u (v1->GetVertex()-vo->GetVertex()); + Vec3r v(v2->GetVertex()-vo->GetVertex()); + + udotv = u * v; + denom = sqrt(u.squareNorm() * v.squareNorm() - udotv * udotv); + + /* Note: I assume this is what they mean by using atan2 (). -Ray Jones */ + + /* tan = denom/udotv = y/x (see man page for atan2) */ + return (fabs (atan2 (denom, udotv))); +} + +/** + * gts_vertex_mean_curvature_normal: + * @v: a #WVertex. + * @s: a #GtsSurface. + * @Kh: the Mean Curvature Normal at @v. + * + * Computes the Discrete Mean Curvature Normal approximation at @v. + * The mean curvature at @v is half the magnitude of the vector @Kh. + * + * Note: the normal computed is not unit length, and may point either + * into or out of the surface, depending on the curvature at @v. It + * is the responsibility of the caller of the function to use the mean + * curvature normal appropriately. + * + * This approximation is from the paper: + * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds + * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr + * VisMath '02, Berlin (Germany) + * http://www-grail.usc.edu/pubs.html + * + * Returns: %TRUE if the operator could be evaluated, %FALSE if the + * evaluation failed for some reason (@v is boundary or is the + * endpoint of a non-manifold edge.) + */ +bool gts_vertex_mean_curvature_normal (WVertex * v, Vec3r &Kh) +{ + real area = 0.0; + + if (!v) return false; + + /* this operator is not defined for boundary edges */ + if (v->isBoundary()) return false; + + WVertex::incoming_edge_iterator itE; + + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + area+=(*itE)->GetaFace()->getArea(); + + Kh=Vec3r(0.0, 0.0, 0.0); + + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + { + WOEdge * e = (*itE)->getPrevOnFace(); + //if ((e->GetaVertex()==v) || (e->GetbVertex()==v)) cerr<< "BUG "; + + WVertex * v1 = e->GetaVertex(); + WVertex * v2 = e->GetbVertex(); + real temp; + + temp = cotan (v1, v, v2); + Kh = Vec3r(Kh+temp*(v2->GetVertex()-v->GetVertex())); + + temp = cotan (v2, v, v1); + Kh = Vec3r(Kh+temp*(v1->GetVertex()-v->GetVertex())); + } + if (area > 0.0) + { + Kh[0] /= 2*area; + Kh[1] /= 2*area; + Kh[2] /= 2*area; + } + else return false; + + return true; +} + +/** + * gts_vertex_gaussian_curvature: + * @v: a #WVertex. + * @s: a #GtsSurface. + * @Kg: the Discrete Gaussian Curvature approximation at @v. + * + * Computes the Discrete Gaussian Curvature approximation at @v. + * + * This approximation is from the paper: + * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds + * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr + * VisMath '02, Berlin (Germany) + * http://www-grail.usc.edu/pubs.html + * + * Returns: %TRUE if the operator could be evaluated, %FALSE if the + * evaluation failed for some reason (@v is boundary or is the + * endpoint of a non-manifold edge.) + */ +bool gts_vertex_gaussian_curvature (WVertex * v, real * Kg) +{ + real area = 0.0; + real angle_sum = 0.0; + + if (!v) return false; + if (!Kg) return false; + + /* this operator is not defined for boundary edges */ + if (v->isBoundary()) {*Kg=0.0 ;return false;} + + WVertex::incoming_edge_iterator itE; + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + area+=(*itE)->GetaFace()->getArea(); + + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + { + WOEdge * e = (*itE)->getPrevOnFace(); + WVertex * v1 = e->GetaVertex(); + WVertex * v2 = e->GetbVertex(); + angle_sum += angle_from_cotan (v, v1, v2); + } + + *Kg = (2.0*M_PI - angle_sum)/area; + + return true; +} + +/** + * gts_vertex_principal_curvatures: + * @Kh: mean curvature. + * @Kg: Gaussian curvature. + * @K1: first principal curvature. + * @K2: second principal curvature. + * + * Computes the principal curvatures at a point given the mean and + * Gaussian curvatures at that point. + * + * The mean curvature can be computed as one-half the magnitude of the + * vector computed by gts_vertex_mean_curvature_normal(). + * + * The Gaussian curvature can be computed with + * gts_vertex_gaussian_curvature(). + */ +void gts_vertex_principal_curvatures (real Kh, real Kg, + real * K1, real * K2) +{ + real temp = Kh*Kh - Kg; + + if (!K1) return; + if (!K1) return; + + if (temp < 0.0) temp = 0.0; + temp = sqrt (temp); + *K1 = Kh + temp; + *K2 = Kh - temp; +} + +/* from Maple */ +static void linsolve (real m11, real m12, real b1, + real m21, real m22, real b2, + real * x1, real * x2) +{ + real temp; + + temp = 1.0 / (m21*m12 - m11*m22); + *x1 = (m12*b2 - m22*b1)*temp; + *x2 = (m11*b2 - m21*b1)*temp; +} + +/* from Maple - largest eigenvector of [a b; b c] */ +static void eigenvector (real a, real b, real c, + Vec3r e) +{ + if (b == 0.0) { + e[0] = 0.0; + } else { + e[0] = -(c - a - sqrt (c*c - 2*a*c + a*a + 4*b*b))/(2*b); + } + e[1] = 1.0; + e[2] = 0.0; +} + +/** + * gts_vertex_principal_directions: + * @v: a #WVertex. + * @s: a #GtsSurface. + * @Kh: mean curvature normal (a #Vec3r). + * @Kg: Gaussian curvature (a real). + * @e1: first principal curvature direction (direction of largest curvature). + * @e2: second principal curvature direction. + * + * Computes the principal curvature directions at a point given @Kh + * and @Kg, the mean curvature normal and Gaussian curvatures at that + * point, computed with gts_vertex_mean_curvature_normal() and + * gts_vertex_gaussian_curvature(), respectively. + * + * Note that this computation is very approximate and tends to be + * unstable. Smoothing of the surface or the principal directions may + * be necessary to achieve reasonable results. + */ +void gts_vertex_principal_directions (WVertex * v, + Vec3r Kh, real Kg, + Vec3r &e1, Vec3r &e2) +{ + Vec3r N; + real normKh; + + Vec3r basis1, basis2, d, eig; + real ve2, vdotN; + real aterm_da, bterm_da, cterm_da, const_da; + real aterm_db, bterm_db, cterm_db, const_db; + real a, b, c; + real K1, K2; + real *weights, *kappas, *d1s, *d2s; + int edge_count; + real err_e1, err_e2; + int e; + WVertex::incoming_edge_iterator itE; + + /* compute unit normal */ + normKh = Kh.norm(); + + if (normKh > 0.0) { + Kh.normalize(); + } else { + /* This vertex is a point of zero mean curvature (flat or saddle + * point). Compute a normal by averaging the adjacent triangles + */ + N[0] = N[1] = N[2] = 0.0; + + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + N=Vec3r(N+(*itE)->GetaFace()->GetNormal()); + real normN = N.norm(); + if (normN <= 0.0) + return; + N.normalize(); + } + + + /* construct a basis from N: */ + /* set basis1 to any component not the largest of N */ + basis1[0] = basis1[1] = basis1[2] = 0.0; + if (fabs (N[0]) > fabs (N[1])) + basis1[1] = 1.0; + else + basis1[0] = 1.0; + + /* make basis2 orthogonal to N */ + basis2 = (N ^ basis1); + basis2.normalize(); + + /* make basis1 orthogonal to N and basis2 */ + basis1 = (N ^ basis2); + basis1.normalize(); + + aterm_da = bterm_da = cterm_da = const_da = 0.0; + aterm_db = bterm_db = cterm_db = const_db = 0.0; + int nb_edges=v->GetEdges().size(); + + weights = (real *) malloc (sizeof (real)*nb_edges); + kappas = (real*) malloc (sizeof (real)*nb_edges); + d1s = (real*) malloc (sizeof (real)*nb_edges); + d2s = (real*) malloc (sizeof (real)*nb_edges); + edge_count = 0; + + for (itE=v->incoming_edges_begin(); + itE!=v->incoming_edges_end(); itE++) + { + WOEdge * e; + WFace * f1, * f2; + real weight, kappa, d1, d2; + Vec3r vec_edge; + if (! *itE) continue; + e = *itE; + + /* since this vertex passed the tests in + * gts_vertex_mean_curvature_normal(), this should be true. */ + //g_assert (gts_edge_face_number (e, s) == 2); + + /* identify the two triangles bordering e in s */ + f1=e->GetaFace(); + f2=e->GetbFace(); + + /* We are solving for the values of the curvature tensor + * B = [ a b ; b c ]. + * The computations here are from section 5 of [Meyer et al 2002]. + * + * The first step is to calculate the linear equations governing + * the values of (a,b,c). These can be computed by setting the + * derivatives of the error E to zero (section 5.3). + * + * Since a + c = norm(Kh), we only compute the linear equations + * for dE/da and dE/db. (NB: [Meyer et al 2002] has the + * equation a + b = norm(Kh), but I'm almost positive this is + * incorrect.) + * + * Note that the w_ij (defined in section 5.2) are all scaled by + * (1/8*A_mixed). We drop this uniform scale factor because the + * solution of the linear equations doesn't rely on it. + * + * The terms of the linear equations are xterm_dy with x in + * {a,b,c} and y in {a,b}. There are also const_dy terms that are + * the constant factors in the equations. + */ + + /* find the vector from v along edge e */ + vec_edge=Vec3r(-1*e->getVec3r()); + + ve2 = vec_edge.squareNorm(); + vdotN = vec_edge * N; + + /* section 5.2 - There is a typo in the computation of kappa. The + * edges should be x_j-x_i. + */ + kappa = 2.0 * vdotN / ve2; + + /* section 5.2 */ + + /* I don't like performing a minimization where some of the + * weights can be negative (as can be the case if f1 or f2 are + * obtuse). To ensure all-positive weights, we check for + * obtuseness. */ + weight = 0.0; + if (! triangle_obtuse(v, f1)) { + weight += ve2 * + cotan (f1->GetNextOEdge(e->twin())->GetbVertex(), + e->GetaVertex(), e->GetbVertex()) / 8.0; + } else { + if (angle_obtuse (v, f1)) { + weight += ve2 * f1->getArea() / 4.0; + } else { + weight += ve2 * f1->getArea() / 8.0; + } + } + + if (! triangle_obtuse(v, f2)) { + weight += ve2 * + cotan (f2->GetNextOEdge(e)->GetbVertex(), + e->GetaVertex(), e->GetbVertex()) / 8.0; + } else { + if (angle_obtuse (v, f2)) { + weight += ve2 * f1->getArea() / 4.0; + } else { + weight += ve2 * f1->getArea() / 8.0; + } + } + + /* projection of edge perpendicular to N (section 5.3) */ + d[0] = vec_edge[0] - vdotN * N[0]; + d[1] = vec_edge[1] - vdotN * N[1]; + d[2] = vec_edge[2] - vdotN * N[2]; + d.normalize(); + + /* not explicit in the paper, but necessary. Move d to 2D basis. */ + d1 = d * basis1; + d2 = d * basis2; + + /* store off the curvature, direction of edge, and weights for later use */ + weights[edge_count] = weight; + kappas[edge_count] = kappa; + d1s[edge_count] = d1; + d2s[edge_count] = d2; + edge_count++; + + /* Finally, update the linear equations */ + aterm_da += weight * d1 * d1 * d1 * d1; + bterm_da += weight * d1 * d1 * 2 * d1 * d2; + cterm_da += weight * d1 * d1 * d2 * d2; + const_da += weight * d1 * d1 * (- kappa); + + aterm_db += weight * d1 * d2 * d1 * d1; + bterm_db += weight * d1 * d2 * 2 * d1 * d2; + cterm_db += weight * d1 * d2 * d2 * d2; + const_db += weight * d1 * d2 * (- kappa); + + } + + /* now use the identity (Section 5.3) a + c = |Kh| = 2 * kappa_h */ + aterm_da -= cterm_da; + const_da += cterm_da * normKh; + + aterm_db -= cterm_db; + const_db += cterm_db * normKh; + + /* check for solvability of the linear system */ + if (((aterm_da * bterm_db - aterm_db * bterm_da) != 0.0) && + ((const_da != 0.0) || (const_db != 0.0))) { + linsolve (aterm_da, bterm_da, -const_da, + aterm_db, bterm_db, -const_db, + &a, &b); + + c = normKh - a; + + eigenvector (a, b, c, eig); + } else { + /* region of v is planar */ + eig[0] = 1.0; + eig[1] = 0.0; + } + + /* Although the eigenvectors of B are good estimates of the + * principal directions, it seems that which one is attached to + * which curvature direction is a bit arbitrary. This may be a bug + * in my implementation, or just a side-effect of the inaccuracy of + * B due to the discrete nature of the sampling. + * + * To overcome this behavior, we'll evaluate which assignment best + * matches the given eigenvectors by comparing the curvature + * estimates computed above and the curvatures calculated from the + * discrete differential operators. */ + + gts_vertex_principal_curvatures (0.5 * normKh, Kg, &K1, &K2); + + err_e1 = err_e2 = 0.0; + /* loop through the values previously saved */ + for (e = 0; e < edge_count; e++) { + real weight, kappa, d1, d2; + real temp1, temp2; + real delta; + + weight = weights[e]; + kappa = kappas[e]; + d1 = d1s[e]; + d2 = d2s[e]; + + temp1 = fabs (eig[0] * d1 + eig[1] * d2); + temp1 = temp1 * temp1; + temp2 = fabs (eig[1] * d1 - eig[0] * d2); + temp2 = temp2 * temp2; + + /* err_e1 is for K1 associated with e1 */ + delta = K1 * temp1 + K2 * temp2 - kappa; + err_e1 += weight * delta * delta; + + /* err_e2 is for K1 associated with e2 */ + delta = K2 * temp1 + K1 * temp2 - kappa; + err_e2 += weight * delta * delta; + } + free (weights); + free (kappas); + free (d1s); + free (d2s); + + /* rotate eig by a right angle if that would decrease the error */ + if (err_e2 < err_e1) { + real temp = eig[0]; + + eig[0] = eig[1]; + eig[1] = -temp; + } + + e1[0] = eig[0] * basis1[0] + eig[1] * basis2[0]; + e1[1] = eig[0] * basis1[1] + eig[1] * basis2[1]; + e1[2] = eig[0] * basis1[2] + eig[1] * basis2[2]; + e1.normalize(); + + /* make N,e1,e2 a right handed coordinate sytem */ + e2 = N ^ e1; + e2.normalize(); +} + +namespace OGF { + static real angle(WOEdge* h) { + Vec3r e(h->GetbVertex()->GetVertex()-h->GetaVertex()->GetVertex()) ; + Vec3r n1 = h->GetbFace()->GetNormal(); + Vec3r n2 = h->GetaFace()->GetNormal(); + real sine = (n1 ^ n2) * e / e.norm() ; + if(sine >= 1.0) { + return M_PI / 2.0 ; + } + if(sine <= -1.0) { + return -M_PI / 2.0 ; + } + return ::asin(sine) ; + } + + // precondition1: P is inside the sphere + // precondition2: P,V points to the outside of + // the sphere (i.e. OP.V > 0) + static bool sphere_clip_vector( + const Vec3r& O, real r, + const Vec3r& P, Vec3r& V + ) { + + Vec3r W = P - O ; + real a = V.squareNorm() ; + real b = 2.0 * V * W ; + real c = W.squareNorm() - r*r ; + real delta = b*b - 4*a*c ; + if(delta < 0) { + // Should not happen, but happens sometimes (numerical precision) + return true ; + } + real t = - b + ::sqrt(delta) / (2.0 * a) ; + if(t < 0.0) { + // Should not happen, but happens sometimes (numerical precision) + return true ; + } + if(t >= 1.0) { + // Inside the sphere + return false ; + } + + V[0] = (t * V.x()) ; + V[1] = (t * V.y()) ; + V[2] = (t * V.z()) ; + + return true ; + } + + // TODO: check optimizations: + // use marking ? (measure *timings* ...) + void compute_curvature_tensor( + WVertex* start, real radius, NormalCycle& nc + ) { + // in case we have a non-manifold vertex, skip it... + if(start->isBoundary()) + return; + + std::set vertices ; + const Vec3r& O = start->GetVertex() ; + std::stack S ; + S.push(start) ; + vertices.insert(start) ; + while(!S.empty()) { + WVertex* v = S.top() ; + S.pop() ; + if(v->isBoundary()) + continue; + const Vec3r& P = v->GetVertex() ; + WVertex::incoming_edge_iterator woeit = v->incoming_edges_begin(); + WVertex::incoming_edge_iterator woeitend = v->incoming_edges_end(); + for(;woeit!=woeitend; ++woeit){ + WOEdge *h = *woeit; + Vec3r V(h->GetaVertex()->GetVertex()-h->GetbVertex()->GetVertex()) ; + if((v == start) || V * (P - O) > 0.0) { + bool isect = sphere_clip_vector(O, radius, P, V) ; + if(h->GetOwner()->GetNumberOfOEdges() == 2) { + real beta = angle(h) ; + nc.accumulate_dihedral_angle(V, beta) ; + } + if(!isect) { + WVertex* w = h->GetaVertex() ; + if(vertices.find(w) == vertices.end()) { + vertices.insert(w) ; + S.push(w) ; + } + } + } + } + } + } + + + void compute_curvature_tensor_one_ring( + WVertex* start, NormalCycle& nc + ) { + // in case we have a non-manifold vertex, skip it... + if(start->isBoundary()) + return; + + WVertex::incoming_edge_iterator woeit = start->incoming_edges_begin(); + WVertex::incoming_edge_iterator woeitend = start->incoming_edges_end(); + for(;woeit!=woeitend; ++woeit){ + WOEdge *h = (*woeit)->twin(); + Vec3r hvec(h->GetbVertex()->GetVertex()-h->GetaVertex()->GetVertex()); + nc.accumulate_dihedral_angle(hvec, angle(h)) ; + WOEdge *hprev = h->getPrevOnFace(); + Vec3r hprevvec(hprev->GetbVertex()->GetVertex()-hprev->GetaVertex()->GetVertex()); + nc.accumulate_dihedral_angle(hprevvec, angle(hprev)) ; + } + } + +} diff --git a/extern/freestyle/src/winged_edge/Curvature.h b/extern/freestyle/src/winged_edge/Curvature.h new file mode 100755 index 00000000000..214a32ca922 --- /dev/null +++ b/extern/freestyle/src/winged_edge/Curvature.h @@ -0,0 +1,156 @@ + +/* GTS - Library for the manipulation of triangulated surfaces + * Copyright (C) 1999 Stéphane Popinet + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __CURVATURE_H__ +#define __CURVATURE_H__ + +# include "../system/FreestyleConfig.h" +# include "../system/Precision.h" +# include "../geometry/Geom.h" +using namespace Geometry; + +class WVertex; + +class LIB_WINGED_EDGE_EXPORT CurvatureInfo +{ +public: + + CurvatureInfo() + { + K1 = 0.0; + K2 = 0.0; + e1 = Vec3r(0.0,0.0,0.0); + e2 = Vec3r(0.0,0.0,0.0); + Kr = 0.0; + dKr = 0.0; + er = Vec3r(0.0,0.0,0.0); + } + + CurvatureInfo(const CurvatureInfo& iBrother){ + K1 = iBrother.K1; + K2 = iBrother.K2; + e1 = iBrother.e1; + e2 = iBrother.e2; + Kr = iBrother.Kr; + dKr = iBrother.dKr; + er = iBrother.er; + } + + CurvatureInfo(const CurvatureInfo& ca, const CurvatureInfo& cb, real t) { + K1 = ca.K1 + t * (cb.K1 - ca.K1); + K2 = ca.K2 + t * (cb.K2 - ca.K2); + e1 = ca.e1 + t * (cb.e1 - ca.e1); + e2 = ca.e2 + t * (cb.e2 - ca.e2); + Kr = ca.Kr + t * (cb.Kr - ca.Kr); + dKr = ca.dKr + t * (cb.dKr - ca.dKr); + er = ca.er + t * (cb.er - ca.er); + } + + real K1; // maximum curvature + real K2; // minimum curvature + Vec3r e1; // maximum curvature direction + Vec3r e2; // minimum curvature direction + real Kr; // radial curvature + real dKr; // radial curvature + Vec3r er; // radial curvature direction +}; + +class Face_Curvature_Info{ +public: + Face_Curvature_Info() {} + ~Face_Curvature_Info(){ + for(vector::iterator ci=vec_curvature_info.begin(), ciend=vec_curvature_info.end(); + ci!=ciend; + ++ci){ + delete (*ci); + } + vec_curvature_info.clear(); + } + vector vec_curvature_info; +}; + +bool LIB_WINGED_EDGE_EXPORT gts_vertex_mean_curvature_normal (WVertex * v, + Vec3r &n); + +bool LIB_WINGED_EDGE_EXPORT gts_vertex_gaussian_curvature (WVertex * v, + real * Kg); + +void LIB_WINGED_EDGE_EXPORT gts_vertex_principal_curvatures (real Kh, + real Kg, + real * K1, + real * K2); + +void LIB_WINGED_EDGE_EXPORT gts_vertex_principal_directions (WVertex * v, + Vec3r Kh, + real Kg, + Vec3r &e1, + Vec3r &e2); + +/* + * OGF/Graphite: Geometry and Graphics Programming Library + Utilities + * Copyright (C) 2000-2003 Bruno Levy + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * If you modify this software, you should include a notice giving the + * name of the person performing the modification, the date of modification, + * and the reason for such modification. + * + * Contact: Bruno Levy + * + * levy@loria.fr + * + * ISA Project + * LORIA, INRIA Lorraine, + * Campus Scientifique, BP 239 + * 54506 VANDOEUVRE LES NANCY CEDEX + * FRANCE + * + * Note that the GNU General Public License does not permit incorporating + * the Software into proprietary programs. + */ + namespace OGF { + + class NormalCycle ; + + void LIB_WINGED_EDGE_EXPORT compute_curvature_tensor( + WVertex* start, double radius, NormalCycle& nc + ) ; + + void LIB_WINGED_EDGE_EXPORT compute_curvature_tensor_one_ring( + WVertex* start, NormalCycle& nc + ) ; + } + + +#endif /* __CURVATURE_H__ */ + diff --git a/extern/freestyle/src/winged_edge/Nature.h b/extern/freestyle/src/winged_edge/Nature.h new file mode 100755 index 00000000000..1f165e677f5 --- /dev/null +++ b/extern/freestyle/src/winged_edge/Nature.h @@ -0,0 +1,75 @@ +// +// Filename : Nature.h +// Author(s) : Emmanuel Turquin +// Purpose : Different natures for both vertices and edges +// Date of creation : 01/07/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef NATURE_H +# define NATURE_H + +/*! \file Nature.h + * Definitions of Natures of the ViewMap's elements + */ + +/*! Namespace gathering the different possible + * natures of 0D and 1D elements of the ViewMap + */ +namespace Nature { + + typedef unsigned short VertexNature; + + /*! true for any 0D element */ + static const VertexNature POINT = 0; // 0 + /*! true for SVertex */ + static const VertexNature S_VERTEX = (1 << 0); // 1 + /*! true for ViewVertex */ + static const VertexNature VIEW_VERTEX = (1 << 1); // 2 + /*! true for NonTVertex */ + static const VertexNature NON_T_VERTEX = (1 << 2); // 4 + /*! true for TVertex */ + static const VertexNature T_VERTEX = (1 << 3); // 8 + /*! true for CUSP */ + static const VertexNature CUSP = (1 << 4); // 16 + + typedef unsigned short EdgeNature; + /*! true for non feature edges (always false for 1D elements of the ViewMap) */ + static const EdgeNature NO_FEATURE = 0; // 0 + /*! true for silhouettes */ + static const EdgeNature SILHOUETTE = (1 << 0); // 1 + /*! true for borders */ + static const EdgeNature BORDER = (1 << 1); // 2 + /*! true for creases */ + static const EdgeNature CREASE = (1 << 2); // 4 + /*! true for ridges */ + static const EdgeNature RIDGE = (1 << 3); // 8 + /*! true for valleys */ + static const EdgeNature VALLEY = (1 << 4); // 16 + /*! true for suggestive contours */ + static const EdgeNature SUGGESTIVE_CONTOUR = (1 << 5); // 32 + +} // end of namespace Nature + +#endif // NATURE_H diff --git a/extern/freestyle/src/winged_edge/WEdge.cpp b/extern/freestyle/src/winged_edge/WEdge.cpp new file mode 100755 index 00000000000..79b3a8dae26 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WEdge.cpp @@ -0,0 +1,732 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "WEdge.h" + +/*! Temporary structures */ +class vertexdata +{ +public: + WVertex *_copy; +}; + +class oedgedata +{ +public: + WOEdge *_copy; +}; + +class edgedata +{ +public: + WEdge *_copy; +}; + +class facedata +{ +public: + WFace *_copy; +}; + + + /**********************************/ + /* */ + /* */ + /* WVertex */ + /* */ + /* */ + /**********************************/ + +WVertex::WVertex(WVertex& iBrother) +{ + _Id = iBrother._Id; + _Vertex = iBrother._Vertex; + _EdgeList = iBrother._EdgeList; + + _Shape = iBrother._Shape; + _Smooth = iBrother._Smooth; + _Border = iBrother._Border; + userdata = NULL; + iBrother.userdata = new vertexdata; + ((vertexdata*)(iBrother.userdata))->_copy = this; +} + +WVertex* WVertex::dupplicate() +{ + WVertex *clone = new WVertex(*this); + return clone; +} + + +WOEdge* WVertex::incoming_edge_iterator::operator*() + +{ + return _current; +} +void WVertex::incoming_edge_iterator::increment(){ + WOEdge *twin = _current->twin(); + if(!twin){ + // we reached a hole + _current = 0; + return; + } + WOEdge *next = twin->getPrevOnFace(); + if(next == _begin){ + next = 0; + } + _current = next; +} + +WFace* WVertex::face_iterator::operator*(){ + WOEdge * woedge = *_edge_it; + if(woedge == 0) + return 0; + return (woedge)->GetbFace(); +} + +//bool WVertex::isBoundary () const{ +// return _Border; +//} +bool WVertex::isBoundary () +{ + if(_Border == 1) + return true; + else if(_Border == 0) + return false; + + vector::const_iterator it; + for(it=_EdgeList.begin(); it!=_EdgeList.end(); it++){ + if((*it)->GetNumberOfOEdges() == 1){ + _Border = 1; + return true; + } + } + //if (!(*it)->GetaOEdge()->GetaFace()) return true; + _Border = 0; + return false; +} + +void WVertex::AddEdge(WEdge *iEdge) { + _EdgeList.push_back(iEdge); +} + +WVertex::incoming_edge_iterator WVertex::incoming_edges_begin(){ + WOEdge *begin; + WEdge * wedge = _EdgeList.front(); + WOEdge* aOEdge = wedge->GetaOEdge(); + if(aOEdge->GetbVertex() == this) + begin = aOEdge; + else + begin = _EdgeList.front()->GetbOEdge(); + return incoming_edge_iterator(this, begin, begin); +} +WVertex::incoming_edge_iterator WVertex::incoming_edges_end(){ + WOEdge *begin; + WOEdge* aOEdge = _EdgeList.front()->GetaOEdge(); + if(aOEdge->GetbVertex() == this) + begin = aOEdge; + else + begin = _EdgeList.front()->GetbOEdge(); + return incoming_edge_iterator(this, begin, 0); +} +//WOEdge** WVertex::incoming_edge_iterator::operator->() +//{ +// WOEdge ** ppaOEdge = (*_iter)->GetaOEdge(); +// if(aOEdge->GetbVertex() == _vertex) +// return ppaOEdge; +// else +// { +// WOEdge *bOEdge = (*_iter)->GetbOEdge(); +// return &bOEdge; +// } +// +//} + /**********************************/ + /* */ + /* */ + /* WOEdge */ + /* */ + /* */ + /**********************************/ + +WOEdge::WOEdge(WOEdge& iBrother) +{ + _paVertex = iBrother.GetaVertex(); + _pbVertex = iBrother.GetbVertex(); + _paFace = iBrother.GetaFace(); + _pbFace = iBrother.GetbFace(); + _pOwner = iBrother.GetOwner(); + userdata = NULL; + iBrother.userdata = new oedgedata; + ((oedgedata*)(iBrother.userdata))->_copy = this; +} + +WOEdge * WOEdge::dupplicate() +{ + WOEdge *clone = new WOEdge(*this); + return clone; +} + +Vec3r +WOEdge::getVec3r () +{ + return Vec3r(_pbVertex->GetVertex() - _paVertex->GetVertex()); +} + +WOEdge * WOEdge::twin () +{ + return GetOwner()->GetOtherOEdge(this); +} + +WOEdge * +WOEdge::getPrevOnFace() +{ + return _pbFace->GetPrevOEdge(this); +} + + /**********************************/ + /* */ + /* */ + /* WEdge */ + /* */ + /* */ + /**********************************/ + +WEdge::WEdge(WEdge& iBrother) +{ + _paOEdge = NULL; + _pbOEdge = NULL; + WOEdge *aoedge = iBrother.GetaOEdge(); + WOEdge *boedge = iBrother.GetbOEdge(); + userdata = NULL; + + if(NULL != aoedge) + //_paOEdge = new WOEdge(*aoedge); + _paOEdge = aoedge->dupplicate(); + if(NULL != boedge) + //_pbOEdge = new WOEdge(*boedge); + _pbOEdge = boedge->dupplicate(); + + _nOEdges = iBrother.GetNumberOfOEdges(); + _Id = iBrother.GetId(); + iBrother.userdata = new edgedata; + ((edgedata*)(iBrother.userdata))->_copy = this; +} + +WEdge * WEdge::dupplicate() +{ + WEdge *clone = new WEdge(*this); + return clone; +} + + /**********************************/ + /* */ + /* */ + /* WFace */ + /* */ + /* */ + /**********************************/ + + +WFace::WFace(WFace& iBrother) +{ + _OEdgeList = iBrother.GetEdgeList(); + _Normal = iBrother.GetNormal(); + _VerticesNormals = iBrother._VerticesNormals; + _VerticesTexCoords = iBrother._VerticesTexCoords; + _Id = iBrother.GetId(); + _MaterialIndex = iBrother._MaterialIndex; + userdata = NULL; + iBrother.userdata = new facedata; + ((facedata*)(iBrother.userdata))->_copy = this; +} + +WFace * WFace::dupplicate() +{ + WFace * clone = new WFace(*this); + return clone; +} + +const Material& WFace::material() { + return getShape()->material(_MaterialIndex); +} + +WOEdge * WFace::MakeEdge(WVertex *v1, WVertex *v2) +{ + // First check whether the same oriented edge already exists + // or not: + vector& v1Edges = v1->GetEdges(); + for(vector::iterator it1=v1Edges.begin(), end=v1Edges.end(); + it1!=end; + it1++) + { + + WEdge *we=(*it1); + + WOEdge *woea = we->GetaOEdge(); + + if((woea->GetaVertex() == v1) && (woea->GetbVertex() == v2)) + //if((*it1)->GetbVertex() == v2) + { + // The oriented edge already exists + cerr << "Warning: edge " << v1->GetId() << " - " << v2->GetId() << " appears twice, correcting" << endl; + // Adds the edge to the face + //AddEdge((*it1)->GetaOEdge()); + AddEdge(woea); + (*it1)->SetNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); + //sets these vertices as border: + v1->SetBorder(true); + v2->SetBorder(true); + //return (*it1)->GetaOEdge(); + return woea; + } + + WOEdge *woeb = we->GetbOEdge(); + if((woeb != 0) && (woeb->GetaVertex() == v1) && (woeb->GetbVertex() == v2)) + + //if((*it1)->GetbVertex() == v2) + + { + // The oriented edge already exists + cerr << "Warning: edge " << v1->GetId() << " - " << v2->GetId() << " appears twice, correcting" << endl; + // Adds the edge to the face + //AddEdge((*it1)->GetaOEdge()); + AddEdge(woeb); + (*it1)->SetNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); + //sets these vertices as border: + v1->SetBorder(true); + v2->SetBorder(true); + //return (*it1)->GetaOEdge(); + return woeb; + } + } + + // the oriented edge we're about to build + WOEdge *pOEdge = new WOEdge; + + WEdge * edge; // The edge containing the oriented edge. + + // checks whether this edge already exists or not + // If it exists, it points outward v2 + + bool exist = false; + WOEdge *pInvertEdge = NULL; // The inverted edge if it exists + vector& v2Edges = v2->GetEdges(); + vector::iterator it; + for(it=v2Edges.begin(); it!=v2Edges.end(); it++) + { + if((*it)->GetbVertex() == v1) + { + // The invert edge already exists + exist = true; + pInvertEdge = (*it)->GetaOEdge(); + break; + } + } + + //DEBUG: + + + if(true == exist) // The invert edge already exists + { + // Retrieves the corresponding edge + edge = pInvertEdge->GetOwner(); + + // Sets the a Face (retrieved from pInvertEdge + pOEdge->SetaFace(pInvertEdge->GetbFace()); + + // Updates the invert edge: + pInvertEdge->SetaFace(this); + } + else // The invert edge does not exist yet + { + // we must create a new edge + //edge = new WEdge; + edge = instanciateEdge(); + + // updates the a,b vertex edges list: + v1->AddEdge(edge); + v2->AddEdge(edge); + + } + + pOEdge->SetOwner(edge); + // Add the vertices: + pOEdge->SetaVertex(v1); + pOEdge->SetbVertex(v2); + + // Debug: + if(v1->GetId() == v2->GetId()) + cerr << "Warning: edge " << this << " null with vertex " << v1->GetId() << endl; + + edge->AddOEdge(pOEdge); + //edge->SetNumberOfOEdges(edge->GetNumberOfOEdges()+1); + + // Add this face (the b face) + pOEdge->SetbFace(this); + + // Adds the edge to the face + AddEdge(pOEdge); + + return pOEdge; +} + + +bool +WFace::getOppositeEdge (const WVertex *v, WOEdge* &e) +{ + if (_OEdgeList.size()!=3) return false; + + vector::iterator it; + e=NULL; + for(it=_OEdgeList.begin(); it!=_OEdgeList.end(); it++) + if ((*it)->GetaVertex()==v) e=*it; + if (!e) return false; + e=NULL; + for(it=_OEdgeList.begin(); it!=_OEdgeList.end(); it++) + if (((*it)->GetaVertex()!=v) && ((*it)->GetbVertex()!=v)) e=*it; + if (!e) return false; + else return true; +} + +real +WFace::getArea () +{ + vector::iterator it; + Vec3r origin=(*(_OEdgeList.begin()))->GetaVertex()->GetVertex(); + it=_OEdgeList.begin(); + real a=0; + for (it=it++; it!=_OEdgeList.end(); it++) { + Vec3r v1=Vec3r((*it)->GetaVertex()->GetVertex() - origin); + Vec3r v2=Vec3r((*it)->GetbVertex()->GetVertex() - origin); + a += (v1 ^ v2).norm() / 2.0; + } + return a; +} + + +WOEdge* +WFace::GetPrevOEdge(WOEdge* iOEdge) + { + vector::iterator woe,woend, woefirst; + woefirst = _OEdgeList.begin(); + woend=_OEdgeList.end(); + WOEdge *prev =*woefirst; + woe=woefirst; + woe++; + for(; + woe!=woend; + woe++) + { + if((*woe) == iOEdge) + return prev; + prev= *woe; + } + // We left the loop. That means that the first + // OEdge was the good one: + if((*woefirst)==iOEdge) + return prev; + + return NULL; + } + +WShape * WFace::getShape() +{ + return GetVertex(0)->shape(); +} + + /**********************************/ + /* */ + /* */ + /* WShape */ + /* */ + /* */ + /**********************************/ + + +LIB_WINGED_EDGE_EXPORT +unsigned WShape::_SceneCurrentId = 0; + +WShape * WShape::dupplicate() +{ + WShape *clone = new WShape(*this); + return clone; +} + +WShape::WShape(WShape& iBrother) +{ + _Id = iBrother.GetId(); + _Materials = iBrother._Materials; + _meanEdgeSize = iBrother._meanEdgeSize; + iBrother.bbox(_min, _max); + vector& vertexList = iBrother.GetVertexList(); + vector::iterator v=vertexList.begin(), vend=vertexList.end(); + for(; + v!=vend; + v++) + { + //WVertex *newVertex = new WVertex(*(*v)); + WVertex *newVertex = (*v)->dupplicate(); + + newVertex->SetShape(this); + AddVertex(newVertex); + } + + vector& edgeList = iBrother.GetEdgeList(); + vector::iterator e=edgeList.begin(), eend=edgeList.end(); + for(; + e!=eend; + e++) + { + //WEdge *newEdge = new WEdge(*(*e)); + WEdge *newEdge = (*e)->dupplicate(); + AddEdge(newEdge); + } + + vector& faceList = iBrother.GetFaceList(); + vector::iterator f=faceList.begin(), fend=faceList.end(); + for(; + f!=fend; + f++) + { + //WFace *newFace = new WFace(*(*f)); + WFace *newFace = (*f)->dupplicate(); + AddFace(newFace); + } + + // update all pointed addresses thanks to the newly created objects: + vend=_VertexList.end(); + for(v=_VertexList.begin(); + v!=vend; + v++) + { + const vector& vedgeList = (*v)->GetEdges(); + vector newvedgelist; + unsigned int i; + for(i=0; iuserdata; + newvedgelist.push_back(currentvedata->_copy); + } + (*v)->SetEdges(newvedgelist); + } + + eend = _EdgeList.end(); + for(e=_EdgeList.begin(); + e!=eend; + e++) + { + // update aOedge: + WOEdge *aoEdge = (*e)->GetaOEdge(); + aoEdge->SetaVertex(((vertexdata*)(aoEdge->GetaVertex()->userdata))->_copy); + aoEdge->SetbVertex(((vertexdata*)(aoEdge->GetbVertex()->userdata))->_copy); + if(NULL != aoEdge->GetaFace()) + aoEdge->SetaFace(((facedata*)(aoEdge->GetaFace()->userdata))->_copy); + aoEdge->SetbFace(((facedata*)(aoEdge->GetbFace()->userdata))->_copy); + aoEdge->SetOwner(((edgedata*)(aoEdge->GetOwner()->userdata))->_copy); + // update bOedge: + + WOEdge *boEdge = (*e)->GetbOEdge(); + if(boEdge != 0) + { + boEdge->SetaVertex(((vertexdata*)(boEdge->GetaVertex()->userdata))->_copy); + boEdge->SetbVertex(((vertexdata*)(boEdge->GetbVertex()->userdata))->_copy); + if(NULL != boEdge->GetaFace()) + boEdge->SetaFace(((facedata*)(boEdge->GetaFace()->userdata))->_copy); + boEdge->SetbFace(((facedata*)(boEdge->GetbFace()->userdata))->_copy); + boEdge->SetOwner(((edgedata*)(boEdge->GetOwner()->userdata))->_copy); + } + } + + fend = _FaceList.end(); + for(f=_FaceList.begin(); + f!=fend; + f++) + { + unsigned i; + const vector& oedgeList = (*f)->GetEdgeList(); + vector newoedgelist; + + unsigned n = oedgeList.size(); + for(i=0; iuserdata; + newoedgelist.push_back(currentoedata->_copy); + //oedgeList[i] = currentoedata->_copy; + //oedgeList[i] = ((oedgedata*)(oedgeList[i]->userdata))->_copy; + } + (*f)->SetEdgeList(newoedgelist); + } + + // Free all memory (arghh!) + // Vertex + vend = iBrother.GetVertexList().end(); + for(v=iBrother.GetVertexList().begin(); + v!=vend; + v++) + { + delete (vertexdata*)((*v)->userdata); + (*v)->userdata = NULL; + } + + // Edges and OEdges: + eend = iBrother.GetEdgeList().end(); + for(e=iBrother.GetEdgeList().begin(); + e!=eend; + e++) + { + delete (edgedata*)((*e)->userdata); + (*e)->userdata = NULL; + // OEdge a : + delete (oedgedata*)((*e)->GetaOEdge()->userdata); + (*e)->GetaOEdge()->userdata = NULL; + // OEdge b: + WOEdge* oedgeb = (*e)->GetbOEdge(); + if(NULL != oedgeb) + { + delete (oedgedata*)(oedgeb->userdata); + oedgeb->userdata = NULL; + } + } + // Faces + fend = iBrother.GetFaceList().end(); + for(f=iBrother.GetFaceList().begin(); + f!=fend; + f++) + { + delete (facedata*)((*f)->userdata); + (*f)->userdata = NULL; + } +} + +WFace* WShape::MakeFace(vector& iVertexList, unsigned iMaterial) +{ + // allocate the new face + WFace *face = instanciateFace(); + + return MakeFace(iVertexList, iMaterial, face); +} + +WFace * WShape::MakeFace(vector& iVertexList, vector& iNormalsList, vector& iTexCoordsList, unsigned iMaterial) +{ + // allocate the new face + WFace *face = MakeFace(iVertexList, iMaterial); + + if(0 == face) + + return 0; + + // set the list of per-vertex normals + face->SetNormalList(iNormalsList); + // set the list of per-vertex tex coords + face->SetTexCoordsList(iTexCoordsList); + + return face; +} + +WFace* WShape::MakeFace(vector& iVertexList, unsigned iMaterial, WFace *face) +{ + + int id = _FaceList.size(); + + face->SetMaterialIndex(iMaterial); + + // Check whether we have a degenerated face: + + // LET'S HACK IT FOR THE TRIANGLE CASE: + + if(3 == iVertexList.size()) + + { + + if((iVertexList[0] == iVertexList[1]) + + || (iVertexList[0] == iVertexList[2]) + + || (iVertexList[2] == iVertexList[1])) + + { + + cerr << "Warning: degenerated triangle detected, correcting" << endl; + return 0; + + } + + } + // vertex pointers used to build each edge + vector::iterator va, vb, it; + + va = iVertexList.begin(); + vb = va; + for(; va != iVertexList.end(); va = vb) + { + vb++; + // Adds va to the vertex list: + //face->AddVertex(*va); + + WOEdge * oedge; + if(*va == iVertexList.back()) + oedge = face->MakeEdge(*va, iVertexList.front()); //for the last (closing) edge + else + oedge = face->MakeEdge(*va, *vb); + + + if(oedge == 0) + return 0; + + + WEdge *edge = oedge->GetOwner(); + if(1 == edge->GetNumberOfOEdges()) + { + // means that we just created a new edge and that we must add it to the + // shape's edges list + edge->SetId(_EdgeList.size()); + AddEdge(edge); + // compute the mean edge value: + _meanEdgeSize += edge->GetaOEdge()->getVec3r().norm(); + } + } + + // compute the face normal (v1v2 ^ v1v3) + WVertex *v1, *v2, *v3; + it = iVertexList.begin(); + v1 = *it; + it++; + v2 = *it; + it++; + v3 = *it; + + Vec3r vector1(v2->GetVertex()-v1->GetVertex()); + Vec3r vector2(v3->GetVertex()-v1->GetVertex()); + + Vec3r normal(vector1 ^ vector2); + normal.normalize(); + face->SetNormal(normal); + + // Add the face to the shape's faces list: + face->SetId(id); + AddFace(face); + + return face; +} diff --git a/extern/freestyle/src/winged_edge/WEdge.h b/extern/freestyle/src/winged_edge/WEdge.h new file mode 100755 index 00000000000..2369caf4566 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WEdge.h @@ -0,0 +1,952 @@ +// +// Filename : WEdge.h +// Author(s) : Stephane Grabli +// Purpose : Classes to define a Winged Edge data structure. +// Date of creation : 18/02/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WEDGE_H +# define WEDGE_H + +# include +# include +# include "../system/FreestyleConfig.h" +# include "../geometry/Geom.h" +# include "../scene_graph/Material.h" + +using namespace std; +using namespace Geometry; + + + /**********************************/ + /* */ + /* */ + /* WVertex */ + /* */ + /* */ + /**********************************/ + + +class WOEdge; +class WEdge; +class WShape; +class WFace; +class LIB_WINGED_EDGE_EXPORT WVertex +{ +protected: + int _Id; // an identificator + Vec3r _Vertex; + vector _EdgeList; + WShape * _Shape; // the shape to which the vertex belongs + bool _Smooth; // flag to indicate whether the Vertex belongs to a smooth edge or not + int _Border; // 1 -> border, 0 -> no border, -1 -> not set + +public: + void * userdata; // designed to store specific user data + inline WVertex(const Vec3r &v) {_Id = 0; _Vertex = v; userdata = NULL; _Shape = NULL;_Smooth=true;_Border=-1;} + /*! Copy constructor */ + WVertex(WVertex& iBrother); + virtual WVertex * dupplicate(); + virtual ~WVertex() {} + + /*! accessors */ + inline Vec3r& GetVertex() {return _Vertex;} + inline vector& GetEdges() {return _EdgeList;} + inline int GetId() {return _Id;} + inline WShape * shape() const {return _Shape;} + inline bool isSmooth() const {return _Smooth;} + bool isBoundary(); + + /*! modifiers */ + inline void SetVertex(const Vec3r& v) {_Vertex = v;} + inline void SetEdges(const vector& iEdgeList) {_EdgeList = iEdgeList;} + inline void SetId(int id) {_Id = id;} + inline void SetShape(WShape *iShape) {_Shape = iShape;} + inline void SetSmooth(bool b) {_Smooth = b;} + inline void SetBorder(bool b) {if(b) _Border= 1; else _Border = 0;} + + /*! Adds an edge to the edges list */ + void AddEdge(WEdge *iEdge) ; + + virtual void ResetUserData() {userdata = 0;} + + + +public: + + + + /*! Iterator to iterate over a vertex incoming edges in the CCW order*/ +# if defined(__GNUC__) && (__GNUC__ < 3) + class incoming_edge_iterator : public input_iterator +# else + class LIB_WINGED_EDGE_EXPORT incoming_edge_iterator : public iterator +# endif + { + private: + WVertex *_vertex; + // + WOEdge *_begin; + WOEdge *_current; + + public: +# if defined(__GNUC__) && (__GNUC__ < 3) + inline incoming_edge_iterator() : input_iterator() {} +# else + inline incoming_edge_iterator() : iterator() {} +# endif + + protected: + friend class WVertex; + inline incoming_edge_iterator( + WVertex *iVertex, + WOEdge * iBegin, + WOEdge * iCurrent) +# if defined(__GNUC__) && (__GNUC__ < 3) + : input_iterator() +# else + : iterator() +# endif + { + _vertex = iVertex; + _begin = iBegin; + _current = iCurrent; + } + + public: + inline incoming_edge_iterator(const incoming_edge_iterator& iBrother) +# if defined(__GNUC__) && (__GNUC__ < 3) + : input_iterator(iBrother) +# else + : iterator(iBrother) +# endif + { + _vertex = iBrother._vertex; + _begin = iBrother._begin; + _current = iBrother._current; + } + + public: + // operators + virtual incoming_edge_iterator& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + virtual incoming_edge_iterator operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + incoming_edge_iterator tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const incoming_edge_iterator& b) const + { + return ((_current) != (b._current)); + } + + virtual bool operator==(const incoming_edge_iterator& b) const + { + return ((_current)== (b._current)); + } + + // dereferencing + virtual WOEdge* operator*(); + //virtual WOEdge** operator->(); + protected: + virtual void increment(); + }; + + + /*! Iterator to iterate over a vertex faces in the CCW order */ +# if defined(__GNUC__) && (__GNUC__ < 3) + class face_iterator : public input_iterator +# else + class LIB_WINGED_EDGE_EXPORT face_iterator : public iterator +# endif + { + private: + incoming_edge_iterator _edge_it; + + public: +# if defined(__GNUC__) && (__GNUC__ < 3) + inline face_iterator() : input_iterator() {} +# else + inline face_iterator() : iterator() {} +# endif + + protected: + friend class WVertex; + inline face_iterator( + incoming_edge_iterator it) +# if defined(__GNUC__) && (__GNUC__ < 3) + : input_iterator() +# else + : iterator() +# endif + { + _edge_it = it; + } + + public: + inline face_iterator(const face_iterator& iBrother) +# if defined(__GNUC__) && (__GNUC__ < 3) + : input_iterator(iBrother) +# else + : iterator(iBrother) +# endif + { + _edge_it = iBrother._edge_it; + } + + public: + // operators + virtual face_iterator& operator++() // operator corresponding to ++i + { + increment(); + return *this; + } + virtual face_iterator operator++(int) // opérateur correspondant à i++ + { // c.a.d qui renvoie la valeur *puis* incrémente. + face_iterator tmp = *this; // C'est pour cela qu'on stocke la valeur + increment(); // dans un temporaire. + return tmp; + } + + // comparibility + virtual bool operator!=(const face_iterator& b) const + { + return ((_edge_it) != (b._edge_it)); + } + + virtual bool operator==(const face_iterator& b) const + { + return ((_edge_it)== (b._edge_it)); + } + + // dereferencing + virtual WFace* operator*(); + //virtual WOEdge** operator->(); + protected: + inline void increment(){ + ++_edge_it; + } + }; + +public: + /*! iterators access */ + virtual incoming_edge_iterator incoming_edges_begin(); + virtual incoming_edge_iterator incoming_edges_end() ; + + virtual face_iterator faces_begin() { + return face_iterator(incoming_edges_begin()); + } + virtual face_iterator faces_end() { + return face_iterator(incoming_edges_end()); + } +}; + + + /**********************************/ + /* */ + /* */ + /* WOEdge */ + /* */ + /* */ + /**********************************/ +class WFace; +class WEdge; + +class LIB_WINGED_EDGE_EXPORT WOEdge +{ +protected: + // WOEdge *_paCWEdge; // edge reached when traveling clockwise on aFace from the edge + // WOEdge *_pbCWEdge; // edge reached when traveling clockwise on bFace from the edge + // WOEdge *_paCCWEdge; // edge reached when traveling counterclockwise on aFace from the edge + // WOEdge *_pbCCWEdge; // edge reached when traveling counterclockwise on bFace from the edge + WVertex *_paVertex; // starting vertex + WVertex *_pbVertex; // ending vertex + WFace *_paFace; // when following the edge, face on the right + WFace *_pbFace; // when following the edge, face on the left + WEdge *_pOwner; // Edge + +public: + void *userdata; + inline WOEdge() + { + // _paCWEdge = NULL; + // _pbCWEdge = NULL; + // _paCCWEdge = NULL; + // _pbCCWEdge = NULL; + _paVertex = NULL; + _pbVertex = NULL; + _paFace = NULL; + _pbFace = NULL; + _pOwner = NULL; + userdata = NULL; + } + + /*! copy constructor */ + WOEdge(WOEdge& iBrother); + virtual WOEdge * dupplicate(); + + /*! accessors */ + // inline WOEdge *GetaCWEdge() {return _paCWEdge;} + // inline WOEdge *GetbCWEdge() {return _pbCWEdge;} + // inline WOEdge *GetaCCWEdge() {return _paCCWEdge;} + // inline WOEdge *GetbCCWEdge() {return _pbCCWEdge;} + inline WVertex *GetaVertex() {return _paVertex;} + inline WVertex *GetbVertex() {return _pbVertex;} + inline WFace *GetaFace() {return _paFace;} + inline WFace *GetbFace() {return _pbFace;} + inline WEdge *GetOwner() {return _pOwner;} + + + /*! modifiers */ + // inline void SetaCWEdge(WOEdge *pe) {_paCWEdge = pe;} + // inline void SetbCWEdge(WOEdge *pe) {_pbCWEdge = pe;} + // inline void SetaCCWEdge(WOEdge *pe) {_paCCWEdge = pe;} + // inline void SetbCCCWEdge(WOEdge *pe) {_pbCCWEdge = pe;} + inline void SetaVertex(WVertex *pv) {_paVertex = pv;} + inline void SetbVertex(WVertex *pv) {_pbVertex = pv;} + inline void SetaFace(WFace *pf) {_paFace = pf;} + inline void SetbFace(WFace *pf) {_pbFace = pf;} + inline void SetOwner(WEdge *pe) {_pOwner = pe;} + + /*! Retrieves the list of edges in CW order */ + inline void RetrieveCWOrderedEdges(vector& oEdges); + /*! returns the vector between the two vertices */ + Vec3r getVec3r (); + WOEdge * twin (); + WOEdge * getPrevOnFace(); + virtual void ResetUserData() {userdata = 0;} +}; + + + /**********************************/ + /* */ + /* */ + /* WEdge */ + /* */ + /* */ + /**********************************/ + +class LIB_WINGED_EDGE_EXPORT WEdge +{ +protected: + WOEdge *_paOEdge; // first oriented edge + WOEdge *_pbOEdge; // second oriented edge + int _nOEdges; // number of oriented edges associated with this edge. (1 means border edge) + int _Id; // Identifier for the edge + +public: + void * userdata; // designed to store specific user data + inline WEdge() + { + _paOEdge = NULL; + _pbOEdge = NULL; + _nOEdges = 0; + userdata = NULL; + } + + inline WEdge(WOEdge *iOEdge) + { + _paOEdge = iOEdge; + _pbOEdge = NULL; + _nOEdges = 1; + userdata = NULL; + } + + inline WEdge(WOEdge *iaOEdge, WOEdge *ibOEdge) + { + _paOEdge = iaOEdge; + _pbOEdge = ibOEdge; + _nOEdges = 2; + userdata = NULL; + } + + /*! Copy constructor */ + WEdge(WEdge& iBrother); + virtual WEdge * dupplicate(); + + virtual ~WEdge() + { + if(NULL != _paOEdge) + { + delete _paOEdge; + _paOEdge = NULL; + } + + if(NULL != _pbOEdge) + { + delete _pbOEdge; + _pbOEdge = NULL; + } + } + + /*! checks whether two WEdge have a common vertex. + * Returns a pointer on the common vertex if it exists, + * NULL otherwise. + */ + static inline WVertex* CommonVertex(WEdge *iEdge1, WEdge* iEdge2) + { + if((NULL == iEdge1) || (NULL == iEdge2)) + return NULL; + + WVertex *wv1 = iEdge1->GetaOEdge()->GetaVertex(); + WVertex *wv2 = iEdge1->GetaOEdge()->GetbVertex(); + WVertex *wv3 = iEdge2->GetaOEdge()->GetaVertex(); + WVertex *wv4 = iEdge2->GetaOEdge()->GetbVertex(); + + if((wv1 == wv3) || (wv1 == wv4)) + { + return wv1; + } + else if((wv2 == wv3) || (wv2 == wv4)) + { + return wv2; + } + + return NULL; + } + /*! accessors */ + inline WOEdge * GetaOEdge() {return _paOEdge;} + inline WOEdge * GetbOEdge() {return _pbOEdge;} + inline int GetNumberOfOEdges() {return _nOEdges;} + inline int GetId() {return _Id;} + inline WVertex * GetaVertex() {return _paOEdge->GetaVertex();} + inline WVertex * GetbVertex() {return _paOEdge->GetbVertex();} + inline WFace * GetaFace() {return _paOEdge->GetaFace();} + inline WFace * GetbFace() {return _paOEdge->GetbFace();} + inline WOEdge* GetOtherOEdge(WOEdge* iOEdge) + { + if(iOEdge == _paOEdge) + return _pbOEdge; + else + return _paOEdge; + } + + /*! modifiers */ + inline void SetaOEdge(WOEdge *iEdge) {_paOEdge = iEdge;} + inline void SetbOEdge(WOEdge *iEdge) {_pbOEdge = iEdge;} + inline void AddOEdge(WOEdge *iEdge) + { + if(NULL == _paOEdge) + { + _paOEdge = iEdge; + _nOEdges++; + return; + } + if(NULL == _pbOEdge) + { + _pbOEdge = iEdge; + _nOEdges++; + return; + } + } + inline void SetNumberOfOEdges(int n) {_nOEdges = n;} + inline void SetId(int id) {_Id = id;} + virtual void ResetUserData() {userdata = 0;} +}; + + /**********************************/ + /* */ + /* */ + /* WFace */ + /* */ + /* */ + /**********************************/ + + +class LIB_WINGED_EDGE_EXPORT WFace +{ +protected: + vector _OEdgeList; // list of oriented edges of bording the face + Vec3r _Normal; // normal to the face + vector _VerticesNormals; // in case there is a normal per vertex. + // The normal number i corresponds to the + // aVertex of the oedge number i, for that face + vector _VerticesTexCoords; + + int _Id; + unsigned _MaterialIndex; + +public: + void *userdata; + inline WFace() {userdata = NULL;_MaterialIndex = 0;} + /*! copy constructor */ + WFace(WFace& iBrother); + virtual WFace * dupplicate(); + virtual ~WFace() {} + + /*! accessors */ + inline const vector& GetEdgeList() {return _OEdgeList;} + inline WOEdge * GetOEdge(int i) {return _OEdgeList[i];} + inline Vec3r& GetNormal() {return _Normal;} + inline int GetId() {return _Id;} + inline unsigned materialIndex() const {return _MaterialIndex;} + const Material& material() ; + + /*! The vertex of index i corresponds to the a vertex + * of the edge of index i + */ + inline WVertex* GetVertex(unsigned int index) + { + // if(index >= _OEdgeList.size()) + // return NULL; + return _OEdgeList[index]->GetaVertex(); + } + /*! returns the index at which iVertex is stored in the + * array. + * returns -1 if iVertex doesn't belong to the face. + */ + inline int GetIndex(WVertex *iVertex){ + int index = 0; + for(vector::iterator woe=_OEdgeList.begin(), woend=_OEdgeList.end(); + woe!=woend; + woe++){ + if((*woe)->GetaVertex() == iVertex) + return index; + ++index; + } + return -1; + } + inline void RetrieveVertexList(vector& oVertices) + { + for(vector::iterator woe=_OEdgeList.begin(), woend=_OEdgeList.end(); + woe!=woend; + woe++) + { + oVertices.push_back((*woe)->GetaVertex()); + } + } + inline void RetrieveBorderFaces(vector& oWFaces) + { + for(vector::iterator woe=_OEdgeList.begin(), woend=_OEdgeList.end(); + woe!=woend; + woe++) + { + WFace *af; + if(NULL != (af = (*woe)->GetaFace())) + oWFaces.push_back(af); + } + } + inline WFace * GetBordingFace(int index) + { + // if(index >= _OEdgeList.size()) + // return 0; + return _OEdgeList[index]->GetaFace(); + } + inline WFace * GetBordingFace(WOEdge *iOEdge) + { + return iOEdge->GetaFace(); + } + inline vector& GetPerVertexNormals() + { + return _VerticesNormals; + } + inline vector& GetPerVertexTexCoords() + { + return _VerticesTexCoords; + } + /*! Returns the normal of the vertex of index index */ + inline Vec3r& GetVertexNormal(int index) + { + return _VerticesNormals[index]; + } + /*! Returns the tex coords of the vertex of index index */ + inline Vec2r& GetVertexTexCoords(int index) + { + return _VerticesTexCoords[index]; + } + /*! Returns the normal of the vertex iVertex for that face */ + inline Vec3r& GetVertexNormal(WVertex *iVertex) + { + int i = 0; + int index = 0; + for(vector::const_iterator woe=_OEdgeList.begin(), woend=_OEdgeList.end(); + woe!=woend; + woe++) + { + if((*woe)->GetaVertex() == iVertex) + { + index = i; + break; + } + ++i; + } + + return _VerticesNormals[index]; + } + inline WOEdge* GetNextOEdge(WOEdge* iOEdge) + { + bool found = false; + vector::iterator woe,woend, woefirst; + woefirst = _OEdgeList.begin(); + for(woe=woefirst,woend=_OEdgeList.end(); + woe!=woend; + woe++) + { + if(true == found) + return (*woe); + + if((*woe) == iOEdge) + { + found = true; + } + } + + // We left the loop. That means that the first + // OEdge was the good one: + if(found) + return (*woefirst); + + return NULL; + } + WOEdge* GetPrevOEdge(WOEdge* iOEdge); + + inline int numberOfEdges() const { return _OEdgeList.size();} + inline int numberOfVertices() const { return _OEdgeList.size();} + /*! Returns true if the face has one ot its edge which is a border + * edge + */ + inline bool isBorder() const + { + for(vector::const_iterator woe=_OEdgeList.begin(), woeend=_OEdgeList.end(); + woe!=woeend; + ++woe) + { + if((*woe)->GetOwner()->GetbOEdge() == 0) + return true; + } + return false; + } + /*! modifiers */ + inline void SetEdgeList(const vector& iEdgeList) {_OEdgeList = iEdgeList;} + inline void SetNormal(const Vec3r& iNormal) {_Normal = iNormal;} + inline void SetNormalList(const vector& iNormalsList) {_VerticesNormals = iNormalsList;} + inline void SetTexCoordsList(const vector& iTexCoordsList) {_VerticesTexCoords = iTexCoordsList;} + inline void SetId(int id) {_Id = id;} + inline void SetMaterialIndex(unsigned iMaterialIndex) {_MaterialIndex = iMaterialIndex;} + + /*! designed to build a specialized WEdge + * for use in MakeEdge + */ + virtual WEdge * instanciateEdge() const {return new WEdge;} + + /*! Builds an oriented edge + * Returns the built edge. + * v1, v2 + * Vertices at the edge's extremities + * The edge is oriented from v1 to v2. + */ + virtual WOEdge * MakeEdge(WVertex *v1, WVertex *v2); + + /*! Adds an edge to the edges list */ + inline void AddEdge(WOEdge *iEdge) {_OEdgeList.push_back(iEdge);} + + /*! For triangles, returns the edge opposite to the vertex in e. + returns flase if the face is not a triangle or if the vertex is not found*/ + bool getOppositeEdge (const WVertex *v, WOEdge* &e); + + /*! compute the area of the face */ + real getArea (); + + WShape * getShape() ; + virtual void ResetUserData() {userdata = 0;} +}; + + + /**********************************/ + /* */ + /* */ + /* WShape */ + /* */ + /* */ + /**********************************/ + + +class LIB_WINGED_EDGE_EXPORT WShape +{ +protected: + vector _VertexList; + vector _EdgeList; + vector _FaceList; + int _Id; + static unsigned _SceneCurrentId; + Vec3r _min; + Vec3r _max; + vector _Materials; + real _meanEdgeSize; + +public: + inline WShape() {_meanEdgeSize = 0;_Id = _SceneCurrentId; _SceneCurrentId++;} + /*! copy constructor */ + WShape(WShape& iBrother); + virtual WShape * dupplicate(); + virtual ~WShape() + { + if(_EdgeList.size() != 0) + { + vector::iterator e; + for(e=_EdgeList.begin(); e!=_EdgeList.end(); e++) + { + delete (*e); + } + _EdgeList.clear(); + } + + if(_VertexList.size() != 0) + { + vector::iterator v; + for(v=_VertexList.begin(); v!=_VertexList.end(); v++) + { + delete (*v); + } + _VertexList.clear(); + } + + if(_FaceList.size() != 0) + { + vector::iterator f; + for(f=_FaceList.begin(); f!=_FaceList.end(); f++) + { + delete (*f); + } + _FaceList.clear(); + } + } + + /*! accessors */ + inline vector& GetEdgeList() {return _EdgeList;} + inline vector& GetVertexList() {return _VertexList;} + inline vector& GetFaceList() {return _FaceList;} + inline unsigned GetId() {return _Id;} + inline void bbox(Vec3r& min, Vec3r& max) {min=_min; max=_max;} + inline const Material& material(unsigned i) const {return _Materials[i];} + inline const vector& materials() const {return _Materials;} + inline const real getMeanEdgeSize() const {return _meanEdgeSize;} + /*! modifiers */ + static inline void SetCurrentId(const unsigned id) { _SceneCurrentId = id; } + inline void SetEdgeList(const vector& iEdgeList) {_EdgeList = iEdgeList;} + inline void SetVertexList(const vector& iVertexList) {_VertexList = iVertexList;} + inline void SetFaceList(const vector& iFaceList) {_FaceList = iFaceList;} + inline void SetId(int id) {_Id = id;} + inline void SetBBox(const Vec3r& min, const Vec3r& max) {_min = min; _max=max;} + inline void SetMaterial(const Material& material, unsigned i) {_Materials[i]=material;} + inline void SetMaterials(const vector& iMaterials) {_Materials = iMaterials;} + + /*! designed to build a specialized WFace + * for use in MakeFace + */ + virtual WFace * instanciateFace() const {return new WFace;} + + /*! adds a new face to the shape + * returns the built face. + * iVertexList + * List of face's vertices. These vertices are + * not added to the WShape vertex list; they are + * supposed to be already stored when calling MakeFace. + * The order in which the vertices are stored in the list + * determines the face's edges orientation and (so) the + * face orientation. + * iMaterialIndex + * The material index for this face + */ + virtual WFace * MakeFace(vector& iVertexList, unsigned iMaterialIndex); + + /*! adds a new face to the shape. The difference with + * the previous method is that this one is designed + * to build a WingedEdge structure for which there are + * per vertex normals, opposed to per face normals. + * returns the built face. + * iVertexList + * List of face's vertices. These vertices are + * not added to the WShape vertex list; they are + * supposed to be already stored when calling MakeFace. + * The order in which the vertices are stored in the list + * determines the face's edges orientation and (so) the + * face orientation. + * iMaterialIndex + * The materialIndex for this face + * iNormalsList + * The list of normals, iNormalsList[i] corresponding to the + * normal of the vertex iVertexList[i] for that face. + * iTexCoordsList + * The list of tex coords, iTexCoordsList[i] corresponding to the + * normal of the vertex iVertexList[i] for that face. + */ + virtual WFace * MakeFace(vector& iVertexList, vector& iNormalsList, vector& iTexCoordsList, unsigned iMaterialIndex); + + inline void AddEdge(WEdge *iEdge) {_EdgeList.push_back(iEdge);} + inline void AddFace(WFace* iFace) {_FaceList.push_back(iFace);} + inline void AddVertex(WVertex *iVertex) {iVertex->SetShape(this); _VertexList.push_back(iVertex);} + + inline void ResetUserData() + { + for(vector::iterator v=_VertexList.begin(),vend=_VertexList.end(); + v!=vend; + v++) + { + (*v)->ResetUserData(); + } + + for(vector::iterator e=_EdgeList.begin(),eend=_EdgeList.end(); + e!=eend; + e++) + { + (*e)->ResetUserData(); + // manages WOEdge: + WOEdge *oe = (*e)->GetaOEdge(); + if(oe != NULL) + oe->ResetUserData(); + oe = (*e)->GetbOEdge(); + if(oe != NULL) + oe->ResetUserData(); + } + + for(vector::iterator f=_FaceList.begin(),fend=_FaceList.end(); + f!=fend; + f++) + { + (*f)->ResetUserData(); + } + + } + + inline void ComputeBBox() + { + _min = _VertexList[0]->GetVertex(); + _max = _VertexList[0]->GetVertex(); + + Vec3r v; + for(vector::iterator wv=_VertexList.begin(), wvend=_VertexList.end(); + wv!=wvend; + wv++) + { + for(unsigned int i=0; i<3; i++) + { + v = (*wv)->GetVertex(); + if(v[i] < _min[i]) + _min[i] = v[i]; + if(v[i] > _max[i]) + _max[i] = v[i]; + } + } + } + + inline real ComputeMeanEdgeSize(){ + _meanEdgeSize = _meanEdgeSize/(_EdgeList.size()); + return _meanEdgeSize; + } + +protected: + /*! Builds the face passed as argument (which as already been allocated) + * iVertexList + * List of face's vertices. These vertices are + * not added to the WShape vertex list; they are + * supposed to be already stored when calling MakeFace. + * The order in which the vertices are stored in the list + * determines the face's edges orientation and (so) the + * face orientation. + * iMaterialIndex + * The material index for this face + * face + * The Face that is filled in + */ + virtual WFace * MakeFace(vector& iVertexList, unsigned iMaterialIndex, WFace *face); +}; + + + /**********************************/ + /* */ + /* */ + /* WingedEdge */ + /* */ + /* */ + /**********************************/ + +class WingedEdge { + + public: + + WingedEdge() {} + + ~WingedEdge() { + clear(); + } + + void clear() { + for (vector::iterator it = _wshapes.begin(); + it != _wshapes.end(); + it++) + delete *it; + _wshapes.clear(); + } + + void addWShape(WShape* wshape) { + _wshapes.push_back(wshape); + } + + vector& getWShapes() { + return _wshapes; + } + + private: + + vector _wshapes; +}; + + + +/* + + ############################################# + ############################################# + ############################################# + ###### ###### + ###### I M P L E M E N T A T I O N ###### + ###### ###### + ############################################# + ############################################# + ############################################# + +*/ +/* for inline functions */ +void WOEdge::RetrieveCWOrderedEdges(vector& oEdges) +{ + + WOEdge *currentOEdge = this; + do + { + WOEdge* nextOEdge = currentOEdge->GetbFace()->GetNextOEdge(currentOEdge); + oEdges.push_back(nextOEdge->GetOwner()); + currentOEdge = nextOEdge->GetOwner()->GetOtherOEdge(nextOEdge); + + } while((currentOEdge != NULL) && (currentOEdge->GetOwner() != GetOwner())); +} + +#endif // WEDGE_H diff --git a/extern/freestyle/src/winged_edge/WFillGrid.cpp b/extern/freestyle/src/winged_edge/WFillGrid.cpp new file mode 100755 index 00000000000..7d0a2d3c561 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WFillGrid.cpp @@ -0,0 +1,60 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "WEdge.h" +#include "WFillGrid.h" + +void WFillGrid::fillGrid() { + if (!_winged_edge || !_grid) + return; + + vector wshapes = _winged_edge->getWShapes(); + vector fvertices; + vector vectors; + vector faces; + + for (vector::const_iterator it = wshapes.begin(); + it != wshapes.end(); + it++) { + faces = (*it)->GetFaceList(); + + for (vector::const_iterator f = faces.begin(); + f != faces.end(); + f++) { + (*f)->RetrieveVertexList(fvertices); + + for (vector::const_iterator wv = fvertices.begin(); + wv != fvertices.end(); + wv++) + vectors.push_back(Vec3r((*wv)->GetVertex())); + + // occluder will be deleted by the grid + Polygon3r *occluder = + new Polygon3r(vectors, (*f)->GetNormal()); + occluder->setId(_polygon_id++); + occluder->userdata = (void*)(*f); + _grid->insertOccluder(occluder); + vectors.clear(); + fvertices.clear(); + } + faces.clear(); + } +} diff --git a/extern/freestyle/src/winged_edge/WFillGrid.h b/extern/freestyle/src/winged_edge/WFillGrid.h new file mode 100755 index 00000000000..2ebbc2f359a --- /dev/null +++ b/extern/freestyle/src/winged_edge/WFillGrid.h @@ -0,0 +1,80 @@ +// +// Filename : WFillGrid.h +// Author(s) : Stephane Grabli +// Emmanuel Turquin +// Purpose : Class to fill in a grid from a SceneGraph +// (uses only the WingedEdge structures) +// Date of creation : 03/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef W_FILL_GRID_H +# define W_FILL_GRID_H + +# include "../geometry/Grid.h" +# include "../geometry/Polygon.h" +# include "WEdge.h" + +class LIB_WINGED_EDGE_EXPORT WFillGrid +{ +public: + + inline WFillGrid(Grid* grid = 0, WingedEdge* winged_edge = 0) { + _winged_edge = winged_edge; + _grid = grid; + _polygon_id = 0; + } + + virtual ~WFillGrid() {} + + void fillGrid(); + + /*! Accessors */ + WingedEdge* getWingedEdge() { + return _winged_edge; + } + + Grid* getGrid() { + return _grid; + } + + /*! Modifiers */ + void setWingedEdge(WingedEdge* winged_edge) { + if (winged_edge) + _winged_edge = winged_edge; + } + + void setGrid(Grid* grid) { + if (grid) + _grid = grid; + } + +private: + + Grid* _grid; + WingedEdge* _winged_edge; + unsigned _polygon_id; +}; + +#endif // WS_FILL_GRID_H diff --git a/extern/freestyle/src/winged_edge/WSFillGrid.cpp b/extern/freestyle/src/winged_edge/WSFillGrid.cpp new file mode 100755 index 00000000000..cf3734b488e --- /dev/null +++ b/extern/freestyle/src/winged_edge/WSFillGrid.cpp @@ -0,0 +1,60 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "WSEdge.h" +#include "WSFillGrid.h" + +void WSFillGrid::fillGrid() { + if (!_winged_edge || !_grid) + return; + + vector wshapes = _winged_edge->getWShapes(); + vector fvertices; + vector vectors; + vector faces; + + for (vector::const_iterator it = wshapes.begin(); + it != wshapes.end(); + it++) { + faces = (*it)->GetFaceList(); + + for (vector::const_iterator f = faces.begin(); + f != faces.end(); + f++) { + (*f)->RetrieveVertexList(fvertices); + + for (vector::const_iterator wv = fvertices.begin(); + wv != fvertices.end(); + wv++) + vectors.push_back(Vec3r((*wv)->GetVertex())); + + // occluder will be deleted by the grid + Polygon3r *occluder = + new Polygon3r(vectors, (*f)->GetNormal()); + occluder->setId(_polygon_id++); + occluder->userdata = (void*)(*f); + _grid->insertOccluder(occluder); + vectors.clear(); + fvertices.clear(); + } + faces.clear(); + } +} diff --git a/extern/freestyle/src/winged_edge/WSFillGrid.h b/extern/freestyle/src/winged_edge/WSFillGrid.h new file mode 100755 index 00000000000..976fdca8e46 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WSFillGrid.h @@ -0,0 +1,79 @@ +// +// Filename : WSFillGrid.h +// Author(s) : Stephane Grabli +// Purpose : Class to fill in a grid from a SceneGraph +// (uses only the WingedEdge structures) +// Date of creation : 03/05/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WS_FILL_GRID_H +# define WS_FILL_GRID_H + +# include "Grid.h" +# include "Polygon.h" +# include "WEdge.h" + +class LIB_WINGED_EDGE_EXPORT WSFillGrid +{ +public: + + inline WSFillGrid(Grid* grid = 0, WingedEdge* winged_edge = 0) { + _winged_edge = winged_edge; + _grid = grid; + _polygon_id = 0; + } + + virtual ~WSFillGrid() {} + + void fillGrid(); + + /*! Accessors */ + WingedEdge* getWingedEdge() { + return _winged_edge; + } + + Grid* getGrid() { + return _grid; + } + + /*! Modifiers */ + void setWingedEdge(WingedEdge* winged_edge) { + if (winged_edge) + _winged_edge = winged_edge; + } + + void setGrid(Grid* grid) { + if (grid) + _grid = grid; + } + +private: + + Grid* _grid; + WingedEdge* _winged_edge; + unsigned _polygon_id; +}; + +#endif // WS_FILL_GRID_H diff --git a/extern/freestyle/src/winged_edge/WXEdge.cpp b/extern/freestyle/src/winged_edge/WXEdge.cpp new file mode 100755 index 00000000000..115a4f61789 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WXEdge.cpp @@ -0,0 +1,296 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "WXEdge.h" + + /**********************************/ + /* */ + /* */ + /* WXFace */ + /* */ + /* */ + /**********************************/ + +unsigned int WXFaceLayer::Get0VertexIndex() const { + int i = 0; + int nEdges = _pWXFace->numberOfEdges(); + for(i=0; inumberOfEdges(); + for(i=0; i& oCuspEdges){ + int i = 0; + int nEdges = _pWXFace->numberOfEdges(); + for(i=0; i cuspEdgesIndices; + int indexStart, indexEnd; + unsigned nedges = _pWXFace->numberOfEdges(); + if(_nNullDotP == nedges){ + _pSmoothEdge = 0; + return _pSmoothEdge; + } + if((_nPosDotP != 0) && (_nPosDotP != _DotP.size()) && (_nNullDotP == 0)){ + // that means that we have a smooth edge that starts from + // an edge and ends at an edge + //----------------------------- + // We retrieve the 2 edges for which we have + // opposite signs for each extremity + RetrieveCuspEdgesIndices(cuspEdgesIndices); + if(cuspEdgesIndices.size() != 2) // we necessarly have 2 cusp edges + return 0; + + // let us determine which cusp edge corresponds to the starting: + // We can do that because we defined that + // a silhouette edge had the back facing part on its right. + // So if the WOEdge woea is such that woea[0].dotp > 0 and + // woea[1].dotp < 0, it is the starting edge. + //------------------------------------------- + + if(_DotP[cuspEdgesIndices[0]] > 0){ + woea = _pWXFace->GetOEdge(cuspEdgesIndices[0]); + woeb = _pWXFace->GetOEdge(cuspEdgesIndices[1]); + indexStart = cuspEdgesIndices[0]; + indexEnd = cuspEdgesIndices[1]; + }else{ + woea = _pWXFace->GetOEdge(cuspEdgesIndices[1]); + woeb = _pWXFace->GetOEdge(cuspEdgesIndices[0]); + indexStart = cuspEdgesIndices[1]; + indexEnd = cuspEdgesIndices[0]; + } + + // Compute the interpolation: + ta = _DotP[indexStart]/(_DotP[indexStart]-_DotP[(indexStart+1)%nedges]); + tb = _DotP[indexEnd]/(_DotP[indexEnd]-_DotP[(indexEnd+1)%nedges]); + ok = true; + }else if(_nNullDotP == 1){ + // that means that we have exactly one of the + // 2 extremities of our silhouette edge is + // a vertex of the mesh + if((_nPosDotP == 2) || (_nPosDotP == 0)){ + _pSmoothEdge = 0; + return _pSmoothEdge; + } + RetrieveCuspEdgesIndices(cuspEdgesIndices); + // We should have only one EdgeCusp: + if(cuspEdgesIndices.size() != 1){ + cout << "Warning in BuildSmoothEdge: weird WXFace configuration" << endl; + _pSmoothEdge = 0; + return 0; + } + unsigned index0 = Get0VertexIndex(); // retrieve the 0 vertex index + unsigned nedges = _pWXFace->numberOfEdges(); + if(_DotP[cuspEdgesIndices[0]] > 0){ + woea = _pWXFace->GetOEdge(cuspEdgesIndices[0]); + woeb = _pWXFace->GetOEdge(index0); + indexStart = cuspEdgesIndices[0]; + ta = _DotP[indexStart]/(_DotP[indexStart]-_DotP[(indexStart+1)%nedges]); + tb = 0.0; + }else{ + woea = _pWXFace->GetOEdge(index0); + woeb = _pWXFace->GetOEdge(cuspEdgesIndices[0]); + indexEnd = cuspEdgesIndices[0]; + ta = 0.0; + tb = _DotP[indexEnd]/(_DotP[indexEnd]-_DotP[(indexEnd+1)%nedges]); + } + ok = true; + }else if(_nNullDotP == 2){ + // that means that the silhouette edge + // is an edge of the mesh + int index = GetSmoothEdgeIndex(); + if(!_pWXFace->front()) {// is it in the right order ? + // the order of the WOEdge index is wrong + woea = _pWXFace->GetOEdge((index+1)%nedges); + woeb = _pWXFace->GetOEdge((index-1)%nedges); + ta = 0; + tb = 1; + ok = true; + }else{ + // here it's not good, our edge is a single point -> skip that face + ok = false; + // the order of the WOEdge index is good + // woea = _pWXFace->GetOEdge((index-1)%nedges); + // woeb = _pWXFace->GetOEdge((index+1)%nedges); + // ta = 1; + // tb = 0; + } + } + if(ok){ + _pSmoothEdge = new WXSmoothEdge; + _pSmoothEdge->SetWOeA(woea); + _pSmoothEdge->SetWOeB(woeb); + _pSmoothEdge->SetTa(ta); + _pSmoothEdge->SetTb(tb); + if(_Nature & Nature::SILHOUETTE){ + if(_nNullDotP != 2){ + if(_DotP[_ClosestPointIndex] + 0.01 > 0) + _pSmoothEdge->SetFront(true); + else + _pSmoothEdge->SetFront(false); + } + } + } + + // check bording edges to see if they have different dotp values + // in bording faces. + // for(int i=0; ifront())) // fA->front XOR fB->front (true if one is 0 and the other is 1) + // { + // // that means that the edge i of the face is + // // a silhouette edge + // // TESTER D'ABORD SI LE EXACTSILHOUETTEEDGE N'A PAS + // // ETE CONSTRUIT SUR L'AUTRE FACE.(1 suffit) + // if(0 != ((WSExactFace*)bface)->exactSilhouetteEdge()) + // { + // // that means that this silhouette edge has already been built + // return ((WSExactFace*)bface)->exactSilhouetteEdge(); + // } + // // Else we must build it + // WOEdge *woea, *woeb; + // real ta, tb; + // if(!front()) // is it in the right order ? + // { + // // the order of the WOEdge index is wrong + // woea = _OEdgeList[(i+1)%numberOfEdges()]; + // if(0 == i) + // woeb = _OEdgeList[numberOfEdges()-1]; + // else + // woeb = _OEdgeList[(i-1)]; + // ta = 0; + // tb = 1; + // } + // else + // { + // // the order of the WOEdge index is good + // if(0 == i) + // woea = _OEdgeList[numberOfEdges()-1]; + // else + // woea = _OEdgeList[(i-1)]; + // woeb = _OEdgeList[(i+1)%numberOfEdges()]; + // ta = 1; + // tb = 0; + // } + // + // _pSmoothEdge = new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX); + // _pSmoothEdge->SetWOeA(woea); + // _pSmoothEdge->SetWOeA(woeb); + // _pSmoothEdge->SetTa(ta); + // _pSmoothEdge->SetTb(tb); + // + // return _pSmoothEdge; + // } + // } + //} + return _pSmoothEdge; +} + + +void WXFace::ComputeCenter() +{ + vector iVertexList; + RetrieveVertexList(iVertexList); + Vec3r center; + for(vector::iterator wv=iVertexList.begin(),wvend=iVertexList.end(); + wv!=wvend; + wv++) + { + center += (*wv)->GetVertex(); + } + center /= (real)iVertexList.size(); + SetCenter(center); +} + + /**********************************/ + /* */ + /* */ + /* WXShape */ + /* */ + /* */ + /**********************************/ + + +WFace* WXShape::MakeFace(vector& iVertexList, unsigned iMaterialIndex) +{ + WFace *face = WShape::MakeFace(iVertexList, iMaterialIndex); + if(0 == face) + return 0; + + Vec3r center; + for(vector::iterator wv=iVertexList.begin(),wvend=iVertexList.end(); + wv!=wvend; + wv++) + { + center += (*wv)->GetVertex(); + } + center /= (real)iVertexList.size(); + ((WXFace*)face)->SetCenter(center); + + return face; +} + +WFace * WXShape::MakeFace(vector& iVertexList, vector& iNormalsList, vector& iTexCoordsList, unsigned iMaterialIndex) +{ + WFace *face = WShape::MakeFace(iVertexList, iNormalsList, iTexCoordsList, iMaterialIndex); + + // Vec3r center; + // for(vector::iterator wv=iVertexList.begin(),wvend=iVertexList.end(); + // wv!=wvend; + // wv++) + // { + // center += (*wv)->GetVertex(); + // } + // center /= (real)iVertexList.size(); + // ((WSFace*)face)->SetCenter(center); + + return face; +} + diff --git a/extern/freestyle/src/winged_edge/WXEdge.h b/extern/freestyle/src/winged_edge/WXEdge.h new file mode 100755 index 00000000000..beacb1a9ca9 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WXEdge.h @@ -0,0 +1,582 @@ +// +// Filename : WXEdge.h +// Author(s) : Stephane Grabli +// Purpose : Classes to define an Extended Winged Edge data structure. +// Date of creation : 26/10/2003 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WXEDGE_H +# define WXEDGE_H + +# include "WEdge.h" +# include "Nature.h" +# include "Curvature.h" + +typedef Nature::EdgeNature WXNature; + + /**********************************/ + /* */ + /* */ + /* WXVertex */ + /* */ + /* */ + /**********************************/ + +class WXVertex : public WVertex +{ +private: + // Curvature info + CurvatureInfo *_curvatures; + +public: + inline WXVertex(const Vec3r &v) + : WVertex(v) + {_curvatures = 0;} + /*! Copy constructor */ + WXVertex(WXVertex& iBrother) + : WVertex(iBrother) + {_curvatures = new CurvatureInfo(*iBrother._curvatures);} + virtual WVertex * dupplicate() + { + WXVertex *clone = new WXVertex(*this); + return clone; + } + virtual ~WXVertex() {if(_curvatures) delete _curvatures;} + virtual void Reset() {if(_curvatures) _curvatures->Kr = 0.0;} + inline void setCurvatures(CurvatureInfo *ci) {_curvatures = ci;} + + inline bool isFeature(); + inline CurvatureInfo* curvatures() {return _curvatures;} + +}; + + + + /**********************************/ + /* */ + /* */ + /* WXEdge */ + /* */ + /* */ + /**********************************/ +class WXEdge : public WEdge +{ +private: + WXNature _nature; // flag to indicate whether the edge is a silhouette edge or not + int _order; // 0: the order doesn't matter. 1: the order is the orginal one. -1: the order is not good + bool _front; // a front facing edge is an edge for which the bording face which is the nearest + // from the viewpoint is front. A back facing edge is the opposite. + +public: + inline WXEdge() + : WEdge(){ + _nature = Nature::NO_FEATURE; + _front = false; + _order=0; + } + + inline WXEdge(WOEdge *iOEdge) + : WEdge(iOEdge) + { _nature = Nature::NO_FEATURE;_front = false;_order=0;} + + inline WXEdge(WOEdge *iaOEdge, WOEdge *ibOEdge) + : WEdge(iaOEdge, ibOEdge) + { _nature = Nature::NO_FEATURE;_front = false;_order=0;} + + /*! Copy constructor */ + inline WXEdge(WXEdge& iBrother) + : WEdge(iBrother) + {_nature = iBrother.nature();_front = iBrother._front;_order = iBrother._order;} + virtual WEdge * dupplicate() + { + WXEdge *clone = new WXEdge(*this); + return clone; + } + + virtual ~WXEdge() + {} + + virtual void Reset(){ + _nature = _nature & ~Nature::SILHOUETTE; + _nature = _nature & ~Nature::SUGGESTIVE_CONTOUR; + } + + /*! accessors */ + inline WXNature nature() {return _nature;} + inline bool front() {return _front;} + inline int order() const {return _order;} + + /*! modifiers */ + inline void SetFront(bool iFront) {_front = iFront;} + inline void SetNature(WXNature iNature) {_nature = iNature;} + inline void AddNature(WXNature iNature) {_nature = _nature|iNature;} + inline void SetOrder(int i) {_order = i;} + +}; + + /**********************************/ + /* */ + /* */ + /* WXFace */ + /* */ + /* */ + /**********************************/ + +/*! Class to store a smooth edge (i.e Hertzman & Zorin smooth silhouette edges) */ +class WXSmoothEdge{ +public: + typedef enum{ + EDGE_EDGE, + VERTEX_EDGE, + EDGE_VERTEX + } Configuration; + + WOEdge *_woea; // Oriented edge from which the silhouette edge starts + WOEdge *_woeb; // Oriented edge where the silhouette edge ends + real _ta; // The silhouette starting point's coordinates are : _woea[0]+ta*(_woea[1]-_woea[0]) + real _tb; // The silhouette ending point's coordinates are : _woeb[0]+ta*(_woeb[1]-_woeb[0]) + bool _front; + Configuration _config; + + WXSmoothEdge(){ + _woea = 0; + _woeb = 0; + _ta = 0; + _tb = 0; + _front = false; + _config = EDGE_EDGE; + } + WXSmoothEdge(const WXSmoothEdge& iBrother){ + _woea = iBrother._woea; + _woeb = iBrother._woeb; + _ta = iBrother._ta; + _tb = iBrother._tb; + _config = iBrother._config; + _front = iBrother._front; + } + ~WXSmoothEdge() {} + + inline WOEdge * woea() {return _woea;} + inline WOEdge * woeb() {return _woeb;} + inline real ta() const {return _ta;} + inline real tb() const {return _tb;} + inline bool front() const {return _front;} + inline Configuration configuration() const {return _config;} + + /*! modifiers */ + inline void SetWOeA(WOEdge *iwoea) {_woea = iwoea;} + inline void SetWOeB(WOEdge *iwoeb) {_woeb = iwoeb;} + inline void SetTa(real ta) {_ta = ta;} + inline void SetTb(real tb) {_tb = tb;} + inline void SetFront(bool iFront) {_front = iFront;} + inline void SetConfiguration(Configuration iConf) {_config = iConf;} + +}; +/* Class to store a value per vertex and a smooth edge. + * The WXFace stores a list of these + */ +class WXFace; +class LIB_WINGED_EDGE_EXPORT WXFaceLayer{ +public: + void * userdata; + WXFace * _pWXFace; + vector _DotP;// in case of silhouette: the values obtained when computing the normal-view direction + // dot product. _DotP[i] is this value for the vertex i for that + // face. + WXSmoothEdge * _pSmoothEdge; + WXNature _Nature; + + //tmp values + unsigned _nPosDotP; // count the number of positive dot products for vertices. + // if this number is != 0 and !=_DotP.size() -> it is a silhouette fac + + unsigned _nNullDotP; // count the number of null dot products for vertices. + unsigned _ClosestPointIndex; + bool _viewDependant; + + WXFaceLayer(WXFace *iFace, WXNature iNature, bool viewDependant){ + _pWXFace = iFace; + _pSmoothEdge = 0; + _nPosDotP = 0; + _nNullDotP=0; + _Nature = iNature; + _viewDependant = viewDependant; + userdata = 0; + } + WXFaceLayer(const WXFaceLayer& iBrother){ + _pWXFace = iBrother._pWXFace; + _pSmoothEdge = 0; + _DotP = iBrother._DotP; + _nPosDotP = iBrother._nPosDotP; + _nNullDotP = iBrother._nNullDotP; + _Nature = iBrother._Nature; + if(0 != iBrother._pSmoothEdge) + { + _pSmoothEdge = new WXSmoothEdge(*(iBrother._pSmoothEdge)); + } + _viewDependant = iBrother._viewDependant; + userdata = 0; + } + virtual ~WXFaceLayer() { + if(!_DotP.empty()) + _DotP.clear(); + if(0 != _pSmoothEdge){ + delete _pSmoothEdge; + _pSmoothEdge = 0; + } + } + inline const real dotP(int i) const {return _DotP[i];} + inline unsigned nPosDotP() const {return _nPosDotP;} + inline unsigned nNullDotP() const {return _nNullDotP;} + inline int closestPointIndex() const {return _ClosestPointIndex;} + inline Nature::EdgeNature nature() const {return _Nature;} + inline bool hasSmoothEdge() const {if(_pSmoothEdge) return true; return false;} + inline WXFace * getFace() {return _pWXFace;} + inline WXSmoothEdge * getSmoothEdge() {return _pSmoothEdge;} + inline bool isViewDependant() const {return _viewDependant;} + inline void SetClosestPointIndex(int iIndex) {_ClosestPointIndex = iIndex;} + + inline void removeSmoothEdge() { + if(!_DotP.empty()) + _DotP.clear(); + if (_pSmoothEdge) { + delete _pSmoothEdge; + _pSmoothEdge = 0; + } + } + + /*! If one of the face layer vertex has a DotP equal + * to 0, this method returns the vertex where it happens + */ + unsigned int Get0VertexIndex() const ; + + /*! In case one of the edge of the triangle + * is a smooth edge, this method + * allows to retrieve the concerned edge + */ + unsigned int GetSmoothEdgeIndex() const; + /*! retrieves the edges of the triangle for which + * the signs are different (a null value is not considered) for the dotp + * values at each edge extrimity + */ + void RetrieveCuspEdgesIndices(vector& oCuspEdges); + WXSmoothEdge * BuildSmoothEdge(); + inline void SetDotP(const vector& iDotP) {_DotP = iDotP;} + inline void PushDotP(real iDotP) { + _DotP.push_back(iDotP); + if(iDotP > 0) + ++_nPosDotP; + if(iDotP == 0) + ++_nNullDotP; + } + inline void ReplaceDotP(unsigned int index, real newDotP){ + _DotP[index] = newDotP; + updateDotPInfos(); + } + inline void updateDotPInfos() { + for(vector::iterator d=_DotP.begin(), dend=_DotP.end(); + d!=dend; + ++d){ + _nPosDotP = 0; + _nNullDotP = 0; + if((*d) > 0) + ++_nPosDotP; + if((*d) == 0) + ++_nNullDotP; + } + } +}; + + +class WXFace : public WFace +{ +protected: + Vec3r _center; // center of the face + real _Z; // distance from viewpoint to the center of the face + bool _front; // flag to tell whether the face is front facing or back facing + real _dotp; // value obtained when computing the normal-viewpoint dot product + + vector _SmoothLayers; // The data needed to store one or several smooth edges that traverse the face +public: + inline WXFace() : WFace() {_Z=0.0;_front = false;} + /*! Copy constructor */ + WXFace(WXFace& iBrother) + : WFace(iBrother) + { + _center = iBrother.center(); + _Z = iBrother.Z(); + _front = iBrother.front(); + for(vector::iterator wxf = iBrother._SmoothLayers.begin(), wxfend = iBrother._SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + _SmoothLayers.push_back(new WXFaceLayer(**wxf)); + } + } + virtual WFace * dupplicate() + { + WXFace * clone = new WXFace(*this); + return clone; + } + + virtual ~WXFace() { + if(!_SmoothLayers.empty()){ + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + delete (*wxf); + } + _SmoothLayers.clear(); + } + } + + /*! designed to build a specialized WEdge + * for use in MakeEdge + */ + virtual WEdge * instanciateEdge() const {return new WXEdge;} + + /*! accessors */ + inline Vec3r& center() {return _center;} + inline real Z() {return _Z;} + inline bool front() {return _front;} + inline real dotp() {return _dotp;} + inline bool hasSmoothEdges() const { + for(vector::const_iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + if( ((*wxf)->hasSmoothEdge())){ + return true; + } + } + return false; + } + vector& getSmoothLayers() {return _SmoothLayers;} + /*! retrieve the smooth edges that match the Nature given as argument */ + void retrieveSmoothEdges(WXNature iNature, vector& oSmoothEdges){ + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + if( ((*wxf)->hasSmoothEdge()) && ((*wxf)->_Nature & iNature) ){ + oSmoothEdges.push_back((*wxf)->_pSmoothEdge); + } + } + } + void retrieveSmoothEdgesLayers(WXNature iNature, vector& oSmoothEdgesLayers){ + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + if( ((*wxf)->hasSmoothEdge()) && ((*wxf)->_Nature & iNature) ){ + oSmoothEdgesLayers.push_back((*wxf)); + } + } + } + void retrieveSmoothLayers(WXNature iNature, vector& oSmoothLayers){ + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + if((*wxf)->_Nature & iNature){ + oSmoothLayers.push_back(*wxf); + } + } + } + /*! modifiers */ + inline void SetCenter(const Vec3r& iCenter) {_center = iCenter;} + void ComputeCenter(); + inline void SetZ(real z) {_Z = z;} + inline void SetFront(bool iFront) {_front = iFront;} + inline void SetDotP(real iDotP) + { + _dotp = iDotP; + if(_dotp > 0) + _front = true; + else + _front = false; + } + inline void AddSmoothLayer(WXFaceLayer * iLayer){ + _SmoothLayers.push_back(iLayer); + } + inline void Reset() { + vector layersToKeep; + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + if((*wxf)->isViewDependant()) + delete (*wxf); + else + layersToKeep.push_back(*wxf); + } + _SmoothLayers = layersToKeep; + } + /*! Clears everything */ + inline void Clear() { + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + delete (*wxf); + } + _SmoothLayers.clear(); + } + virtual void ResetUserData() { + WFace::ResetUserData(); + for(vector::iterator wxf = _SmoothLayers.begin(), wxfend = _SmoothLayers.end(); + wxf != wxfend; + ++wxf){ + (*wxf)->userdata = 0; + } + } +}; + + + /**********************************/ + /* */ + /* */ + /* WXShape */ + /* */ + /* */ + /**********************************/ + + +class WXShape : public WShape +{ +public: + typedef WXShape type_name; +protected: + bool _computeViewIndependant; // flag to indicate whether the view independant stuff must be computed or not +public: + inline WXShape() : WShape() {_computeViewIndependant = true;} + /*! copy constructor */ + inline WXShape(WXShape& iBrother) + :WShape(iBrother) + { + _computeViewIndependant = iBrother._computeViewIndependant; + } + virtual WShape * dupplicate() + { + WXShape *clone = new WXShape(*this); + return clone; + } + + virtual ~WXShape() + { + } + + inline bool getComputeViewIndependantFlag() const {return _computeViewIndependant;} + inline void setComputeViewIndependantFlag(bool iFlag) {_computeViewIndependant = iFlag;} + + /*! designed to build a specialized WFace + * for use in MakeFace + */ + virtual WFace * instanciateFace() const {return new WXFace;} + + /*! adds a new face to the shape + * returns the built face. + * iVertexList + * List of face's vertices. These vertices are + * not added to the WShape vertex list; they are + * supposed to be already stored when calling MakeFace. + * The order in which the vertices are stored in the list + * determines the face's edges orientation and (so) the + * face orientation. + */ + virtual WFace * MakeFace(vector& iVertexList, unsigned iMaterialIndex); + + /*! adds a new face to the shape. The difference with + * the previous method is that this one is designed + * to build a WingedEdge structure for which there are + * per vertex normals, opposed to per face normals. + * returns the built face. + * iVertexList + * List of face's vertices. These vertices are + * not added to the WShape vertex list; they are + * supposed to be already stored when calling MakeFace. + * The order in which the vertices are stored in the list + * determines the face's edges orientation and (so) the + * face orientation. + * iNormalsList + * The list of normals, iNormalsList[i] corresponding to the + * normal of the vertex iVertexList[i] for that face. + * iTexCoordsList + * The list of tex coords, iTexCoordsList[i] corresponding to the + * normal of the vertex iVertexList[i] for that face. + */ + virtual WFace * MakeFace(vector& iVertexList, vector& iNormalsList, vector& iTexCoordsList, unsigned iMaterialIndex); + + /*! Reset all edges and vertices flags (which might + * have been set up on a previous pass) + */ + virtual void Reset(){ + // Reset Edges + vector& wedges = GetEdgeList(); + for(vector::iterator we=wedges.begin(),weend=wedges.end(); + we!=weend; + we++){ + ((WXEdge*)(*we))->Reset(); + } + + //Reset faces: + vector& wfaces = GetFaceList(); + for(vector::iterator wf=wfaces.begin(),wfend=wfaces.end(); + wf!=wfend; + wf++){ + ((WXFace*)(*wf))->Reset(); + } + } + /*! accessors */ +}; + +/* + + ############################################# + ############################################# + ############################################# + ###### ###### + ###### I M P L E M E N T A T I O N ###### + ###### ###### + ############################################# + ############################################# + ############################################# + +*/ +/* for inline functions */ + +bool WXVertex::isFeature() +{ + int counter = 0; + vector& vedges = GetEdges(); + for(vector::iterator ve=vedges.begin(), vend=vedges.end(); + ve!=vend; + ve++) + { + if(((WXEdge*)(*ve))->nature() != Nature::NO_FEATURE) + counter++; + } + + if((counter == 1) || (counter > 2)) + return true; + + return false; +} + + +#endif diff --git a/extern/freestyle/src/winged_edge/WXEdgeBuilder.cpp b/extern/freestyle/src/winged_edge/WXEdgeBuilder.cpp new file mode 100755 index 00000000000..534c6e323a9 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WXEdgeBuilder.cpp @@ -0,0 +1,43 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "WXEdgeBuilder.h" +#include "WXEdge.h" + +void WXEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs) +{ + WXShape *shape = new WXShape; + buildWShape(*shape, ifs); + shape->SetId(ifs.getId().getFirst()); + //ifs.SetId(shape->GetId()); +} + +void WXEdgeBuilder::buildWVertices(WShape& shape, + const real *vertices, + unsigned vsize) { + WXVertex *vertex; + for (unsigned i = 0; i < vsize; i += 3) { + vertex = new WXVertex(Vec3r(vertices[i], + vertices[i + 1], + vertices[i + 2])); + vertex->SetId(i / 3); + shape.AddVertex(vertex); + } +} diff --git a/extern/freestyle/src/winged_edge/WXEdgeBuilder.h b/extern/freestyle/src/winged_edge/WXEdgeBuilder.h new file mode 100755 index 00000000000..b646d66a285 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WXEdgeBuilder.h @@ -0,0 +1,51 @@ +#ifndef WXEDGEBUILDER_H +# define WXEDGEBUILDER_H + +// +// Filename : WSBuilder.h +// Author(s) : Stephane Grabli +// Purpose : Class inherited from WingedEdgeBuilder and +// designed to build a WX (WingedEdge + extended info(silhouette etc...)) +// structure from a polygonal model +// Date of creation : 28/05/03 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +# include "WingedEdgeBuilder.h" +# include "../scene_graph/IndexedFaceSet.h" + +class LIB_WINGED_EDGE_EXPORT WXEdgeBuilder : public WingedEdgeBuilder +{ +public: + WXEdgeBuilder() : WingedEdgeBuilder() {} + virtual ~WXEdgeBuilder() {} + VISIT_DECL(IndexedFaceSet) + +protected: + virtual void buildWVertices(WShape& shape, + const real *vertices, + unsigned vsize); +}; + +#endif // WXEDGEBUILDER_H diff --git a/extern/freestyle/src/winged_edge/WingedEdgeBuilder.cpp b/extern/freestyle/src/winged_edge/WingedEdgeBuilder.cpp new file mode 100755 index 00000000000..98e7c269248 --- /dev/null +++ b/extern/freestyle/src/winged_edge/WingedEdgeBuilder.cpp @@ -0,0 +1,362 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "../geometry/GeomUtils.h" +#include "../scene_graph/NodeShape.h" +#include "WingedEdgeBuilder.h" +#include +using namespace std; + +void WingedEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs) { + WShape *shape = new WShape; + buildWShape(*shape, ifs); + shape->SetId(ifs.getId().getFirst()); + //ifs.SetId(shape->GetId()); +} + +void WingedEdgeBuilder::visitNodeShape(NodeShape& ns) { + //Sets the current material to iShapeode->material: + _current_material = &(ns.material()); +} + +void WingedEdgeBuilder::visitNodeTransform(NodeTransform& tn) { + if(!_current_matrix) { + _current_matrix = new Matrix44r(tn.matrix()); + return; + } + + _matrices_stack.push_back(_current_matrix); + Matrix44r *new_matrix = new Matrix44r(*_current_matrix * tn.matrix()); + _current_matrix = new_matrix; +} + +void WingedEdgeBuilder::visitNodeTransformAfter(NodeTransform&) { + if(_current_matrix) + delete _current_matrix; + + if(_matrices_stack.empty()) { + _current_matrix = NULL; + return; + } + + _current_matrix = _matrices_stack.back(); + _matrices_stack.pop_back(); +} + +void WingedEdgeBuilder::buildWShape(WShape& shape, IndexedFaceSet& ifs) { + unsigned vsize = ifs.vsize(); + unsigned nsize = ifs.nsize(); + unsigned tsize = ifs.tsize(); + + const real* vertices = ifs.vertices(); + const real* normals = ifs.normals(); + const real* texCoords = ifs.texCoords(); + + real* new_vertices; + real* new_normals; + + new_vertices = new real[vsize]; + new_normals = new real[nsize]; + + // transform coordinates from local to world system + if(_current_matrix) { + transformVertices(vertices, vsize, *_current_matrix, new_vertices); + transformNormals(normals, nsize, *_current_matrix, new_normals); + } + else { + memcpy(new_vertices, vertices, vsize * sizeof(*new_vertices)); + memcpy(new_normals, normals, nsize * sizeof(*new_normals)); + } + + const IndexedFaceSet::TRIANGLES_STYLE* faceStyle = ifs.trianglesStyle(); + + vector materials; + if(ifs.msize()){ + const Material*const* mats = ifs.materials(); + for(unsigned i=0; i normalsSet; + vector& wvertices = shape.GetVertexList(); + for(vector::iterator wv=wvertices.begin(), wvend=wvertices.end(); + wv!=wvend; + ++wv){ + if((*wv)->isBoundary()) + continue; + normalsSet.clear(); + WVertex::face_iterator fit = (*wv)->faces_begin(); + WVertex::face_iterator fitend = (*wv)->faces_end(); + while(fit!=fitend){ + WFace *face = *fit; + normalsSet.insert(face->GetVertexNormal(*wv)); + if(normalsSet.size()!=1){ + break; + } + ++fit; + } + if(normalsSet.size()!=1){ + (*wv)->SetSmooth(false); + } + } + // Adds the new WShape to the WingedEdge structure + _winged_edge->addWShape(&shape); +} + +void WingedEdgeBuilder::buildWVertices(WShape& shape, + const real *vertices, + unsigned vsize) { + WVertex *vertex; + for (unsigned i = 0; i < vsize; i += 3) { + vertex = new WVertex(Vec3r(vertices[i], + vertices[i + 1], + vertices[i + 2])); + vertex->SetId(i / 3); + shape.AddVertex(vertex); + } +} + +void WingedEdgeBuilder::buildTriangleStrip( const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices) { + unsigned nDoneVertices = 2; // number of vertices already treated + unsigned nTriangle = 0; // number of the triangle currently being treated + //int nVertex = 0; // vertex number + + WShape* currentShape = _current_wshape; // the current shape being built + vector triangleVertices; + vector triangleNormals; + vector triangleTexCoords; + + while(nDoneVertices < nvertices) + { + //clear the vertices list: + triangleVertices.clear(); + //Then rebuild it: + if(0 == nTriangle%2) // if nTriangle is even + { + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]); + + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+1]],normals[nindices[nTriangle+1]+1],normals[nindices[nTriangle+1]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+2]], normals[nindices[nTriangle+2]+1], normals[nindices[nTriangle+2]+2])); + + if(texCoords){ + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle]],texCoords[tindices[nTriangle]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle+1]],texCoords[tindices[nTriangle+1]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle+2]], texCoords[tindices[nTriangle+2]+1])); + } + } + else // if nTriangle is odd + { + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]); + + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+2]],normals[nindices[nTriangle+2]+1],normals[nindices[nTriangle+2]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+1]], normals[nindices[nTriangle+1]+1], normals[nindices[nTriangle+1]+2])); + + if(texCoords){ + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle]],texCoords[tindices[nTriangle]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle+2]],texCoords[tindices[nTriangle+2]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[nTriangle+1]], texCoords[tindices[nTriangle+1]+1])); + } + } + if(mindices) + currentShape->MakeFace(triangleVertices, triangleNormals, triangleTexCoords, mindices[nTriangle/3]); + else + currentShape->MakeFace(triangleVertices, triangleNormals, triangleTexCoords, 0); + nDoneVertices++; // with a strip, each triangle is one vertex more + nTriangle++; + } +} + +void WingedEdgeBuilder::buildTriangleFan( const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices) { + // Nothing to be done +} + +void WingedEdgeBuilder::buildTriangles(const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices) { + WShape * currentShape = _current_wshape; // the current shape begin built + vector triangleVertices; + vector triangleNormals; + vector triangleTexCoords; + + // Each triplet of vertices is considered as an independent triangle + for(unsigned i = 0; i < nvertices / 3; i++) + { + triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+1]/3]); + triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+2]/3]); + + triangleNormals.push_back(Vec3r(normals[nindices[3*i]],normals[nindices[3*i]+1], normals[nindices[3*i]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[3*i+1]],normals[nindices[3*i+1]+1],normals[nindices[3*i+1]+2])); + triangleNormals.push_back(Vec3r(normals[nindices[3*i+2]], normals[nindices[3*i+2]+1], normals[nindices[3*i+2]+2])); + + if(texCoords){ + triangleTexCoords.push_back(Vec2r(texCoords[tindices[3*i]],texCoords[tindices[3*i]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[3*i+1]],texCoords[tindices[3*i+1]+1])); + triangleTexCoords.push_back(Vec2r(texCoords[tindices[3*i+2]], texCoords[tindices[3*i+2]+1])); + } + } + if(mindices) + currentShape->MakeFace(triangleVertices, triangleNormals, triangleTexCoords, mindices[0]); + else + currentShape->MakeFace(triangleVertices, triangleNormals, triangleTexCoords,0); + +} + +void WingedEdgeBuilder::transformVertices(const real *vertices, + unsigned vsize, + const Matrix44r& transform, + real *res) { + const real *v = vertices; + real *pv = res; + + for (unsigned i = 0; i < vsize / 3; i++) { + HVec3r hv_tmp(v[0], v[1], v[2]); + HVec3r hv(transform * hv_tmp); + for (unsigned j = 0; j < 3; j++) + pv[j] = hv[j] / hv[3]; + v += 3; + pv += 3; + } +} + +void WingedEdgeBuilder::transformNormals(const real *normals, + unsigned nsize, + const Matrix44r& transform, + real* res) { + const real *n = normals; + real *pn = res; + + for (unsigned i = 0; i < nsize / 3; i++) { + Vec3r hn(n[0], n[1], n[2]); + hn = GeomUtils::rotateVector(transform, hn); + for (unsigned j = 0; j < 3; j++) + pn[j] = hn[j]; + n += 3; + pn += 3; + } +} diff --git a/extern/freestyle/src/winged_edge/WingedEdgeBuilder.h b/extern/freestyle/src/winged_edge/WingedEdgeBuilder.h new file mode 100755 index 00000000000..fe033f2ea0b --- /dev/null +++ b/extern/freestyle/src/winged_edge/WingedEdgeBuilder.h @@ -0,0 +1,160 @@ +// +// Filename : WingedEdgeBuilder.h +// Author(s) : Stephane Grabli +// Purpose : Class to render a WingedEdge data structure +// from a polyhedral data structure organized in +// nodes of a scene graph +// Date of creation : 28/05/03 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef WINGED_EDGE_BUILDER_H +# define WINGED_EDGE_BUILDER_H + +# include "../system/FreestyleConfig.h" +# include "../scene_graph/SceneVisitor.h" +# include "WEdge.h" +# include "../scene_graph/IndexedFaceSet.h" +# include "../scene_graph/NodeTransform.h" + +class LIB_WINGED_EDGE_EXPORT WingedEdgeBuilder : public SceneVisitor +{ + public: + + inline WingedEdgeBuilder() : SceneVisitor() { + _current_wshape = NULL; + _current_material = NULL; + _current_matrix = NULL; + _winged_edge = new WingedEdge; // Not deleted by the destructor + } + + virtual ~WingedEdgeBuilder() { + for (vector::iterator it = _matrices_stack.begin(); + it != _matrices_stack.end(); + it++) + delete *it; + _matrices_stack.clear(); + } + + VISIT_DECL(IndexedFaceSet) + VISIT_DECL(NodeShape) + VISIT_DECL(NodeTransform) + + virtual void visitNodeTransformAfter(NodeTransform&); + + // + // Accessors + // + ///////////////////////////////////////////////////////////////////////////// + + inline WingedEdge* getWingedEdge() { + return _winged_edge; + } + + inline WShape* getCurrentWShape() { + return _current_wshape; + } + + inline Material* getCurrentMaterial() { + return _current_material; + } + + inline Matrix44r* getCurrentMatrix() { + return _current_matrix; + } + + // + // Modifiers + // + ///////////////////////////////////////////////////////////////////////////// + + inline void setCurrentWShape(WShape* wshape) { + _current_wshape = wshape; + } + + inline void setCurrentMaterial(Material* mat) { + _current_material = mat; + } + + // inline void setCurrentMatrix(Matrix44r* matrix) { + // _current_matrix = matrix; + // } + + protected: + + virtual void buildWShape(WShape& shape, IndexedFaceSet& ifs); + virtual void buildWVertices(WShape& shape, + const real *vertices, + unsigned vsize); + + private: + + void buildTriangleStrip(const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices); + + void buildTriangleFan(const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices); + + void buildTriangles(const real *vertices, + const real *normals, + vector& iMaterials, + const real *texCoords, + const unsigned *vindices, + const unsigned *nindices, + const unsigned *mindices, + const unsigned *tindices, + const unsigned nvertices); + + void transformVertices(const real *vertices, + unsigned vsize, + const Matrix44r& transform, + real *res); + + void transformNormals(const real *normals, + unsigned nsize, + const Matrix44r& transform, + real *res); + + WShape* _current_wshape; + Material* _current_material; + WingedEdge* _winged_edge; + Matrix44r* _current_matrix; + vector _matrices_stack; +}; + +#endif // WINGED_EDGE_BUILDER_H diff --git a/extern/freestyle/src/winged_edge/src.pri b/extern/freestyle/src/winged_edge/src.pri new file mode 100755 index 00000000000..9cf40633dcf --- /dev/null +++ b/extern/freestyle/src/winged_edge/src.pri @@ -0,0 +1,21 @@ +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +WINGED_EDGE_DIR = ../winged_edge + +SOURCES *= $${WINGED_EDGE_DIR}/Curvature.cpp \ + $${WINGED_EDGE_DIR}/WEdge.cpp \ + $${WINGED_EDGE_DIR}/WFillGrid.cpp \ + $${WINGED_EDGE_DIR}/WingedEdgeBuilder.cpp \ + $${WINGED_EDGE_DIR}/WXEdgeBuilder.cpp \ + $${WINGED_EDGE_DIR}/WXEdge.cpp + +HEADERS *= $${WINGED_EDGE_DIR}/Curvature.h \ + $${WINGED_EDGE_DIR}/Nature.h \ + $${WINGED_EDGE_DIR}/WEdge.h \ + $${WINGED_EDGE_DIR}/WFillGrid.h \ + $${WINGED_EDGE_DIR}/WingedEdgeBuilder.h \ + $${WINGED_EDGE_DIR}/WXEdgeBuilder.h \ + $${WINGED_EDGE_DIR}/WXEdge.h diff --git a/extern/freestyle/src/winged_edge/winged_edge.pro b/extern/freestyle/src/winged_edge/winged_edge.pro new file mode 100755 index 00000000000..e36d69454b6 --- /dev/null +++ b/extern/freestyle/src/winged_edge/winged_edge.pro @@ -0,0 +1,84 @@ +# This file should be viewed as a -*- mode: Makefile -*- + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# W A R N I N G ! ! ! # +# a u t h o r i z e d p e r s o n a l o n l y # +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + +include(../Config.pri) + +TEMPLATE = lib + +TARGET = $${LIB_WINGED_EDGE} +VERSION = $${APPVERSION} +TARGET_VERSION_EXT = $${APPVERSION_MAJ}.$${APPVERSION_MID} + +# +# CONFIG +# +####################################### + +CONFIG *= dll + +# +# DEFINES +# +####################################### + +win32:DEFINES *= MAKE_LIB_WINGED_EDGE_DLL + +# +# INCLUDE PATH +# +####################################### + +#INCLUDEPATH *= ../geometry ../scene_graph ../system + +# +# BUILD DIRECTORIES +# +####################################### + +BUILD_DIR = ../../build + +OBJECTS_DIR = $${BUILD_DIR}/$${REL_OBJECTS_DIR} +!win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR}/lib +win32:DESTDIR = $${BUILD_DIR}/$${REL_DESTDIR} + +# +# LIBS +# +####################################### + +win32:LIBS *= $${DESTDIR}/$${LIB_GEOMETRY}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SCENE_GRAPH}$${LIBVERSION}.lib \ + $${DESTDIR}/$${LIB_SYSTEM}$${LIBVERSION}.lib +!win32 { + lib_bundle { + LIBS += -F$${DESTDIR} -framework $${LIB_GEOMETRY} \ + -framework $${LIB_SYSTEM} -framework $${LIB_SCENE_GRAPH} + } else { + LIBS += -L$${DESTDIR} -l$${LIB_GEOMETRY} -l$${LIB_SCENE_GRAPH} -l$${LIB_SYSTEM} + } +} + + +# +# INSTALL +# +####################################### + +LIB_DIR = ../../lib +# install library +target.path = $$LIB_DIR +# "make install" configuration options +INSTALLS += target + +# +# SOURCES & HEADERS +# +####################################### + +!static { + include(src.pri) +} diff --git a/extern/freestyle/style_modules/ChainingIterators.py b/extern/freestyle/style_modules/ChainingIterators.py new file mode 100755 index 00000000000..60255c3d094 --- /dev/null +++ b/extern/freestyle/style_modules/ChainingIterators.py @@ -0,0 +1,731 @@ +# +# Filename : ChainingIterators.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Chaining Iterators to be used with chaining operators +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * + +## the natural chaining iterator +## It follows the edges of same nature following the topology of +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +class pyChainSilhouetteIterator(ChainingIterator): + def __init__(self, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 1,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = it.getObject() + it.increment() + if(count != 1): + winner = None + break + return winner + +## the natural chaining iterator +## It follows the edges of same nature on the same +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +## You can specify whether to chain iterate over edges that were +## already visited or not. +class pyChainSilhouetteGenericIterator(ChainingIterator): + def __init__(self, stayInSelection=1, stayInUnvisited=1): + ChainingIterator.__init__(self, stayInSelection, stayInUnvisited,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteGenericIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = ve + it.increment() + if(count != 1): + winner = None + break + return winner + +class pyExternalContourChainingIterator(ChainingIterator): + def __init__(self): + ChainingIterator.__init__(self, 0, 1,None,1) + self._isExternalContour = ExternalContourUP1D() + + def getExactTypeName(self): + return "pyExternalContourIterator" + + def init(self): + self._nEdges = 0 + self._isInSelection = 1 + + def checkViewEdge(self, ve, orientation): + if(orientation != 0): + vertex = ve.B() + else: + vertex = ve.A() + it = AdjacencyIterator(vertex,1,1) + while(it.isEnd() == 0): + ave = it.getObject() + if(self._isExternalContour(ave)): + return 1 + it.increment() + print "pyExternlContourChainingIterator : didn't find next edge" + return 0 + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(self._isExternalContour(ve)): + if (ve.getTimeStamp() == GetTimeStampCF()): + winner = ve + it.increment() + + self._nEdges = self._nEdges+1 + if(winner == None): + orient = 1 + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(it.isIncoming() != 0): + orient = 0 + good = self.checkViewEdge(ve,orient) + if(good != 0): + winner = ve + it.increment() + return winner + +## the natural chaining iterator +## with a sketchy multiple touch +class pySketchyChainSilhouetteIterator(ChainingIterator): + def __init__(self, nRounds=3,stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 0,None,1) + self._timeStamp = GetTimeStampCF()+nRounds + self._nRounds = nRounds + def getExactTypeName(self): + return "pySketchyChainSilhouetteIterator" + def init(self): + self._timeStamp = GetTimeStampCF()+self._nRounds + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = ve + it.increment() + if(count != 1): + winner = None + break + if(winner == None): + winner = self.getCurrentEdge() + if(winner.getChainingTimeStamp() == self._timeStamp): + winner = None + return winner + + +# Chaining iterator designed for sketchy style. +# can chain several times the same ViewEdge +# in order to produce multiple strokes per ViewEdge. +class pySketchyChainingIterator(ChainingIterator): + def __init__(self, nRounds=3, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 0,None,1) + self._timeStamp = GetTimeStampCF()+nRounds + self._nRounds = nRounds + def getExactTypeName(self): + return "pySketchyChainingIterator" + + def init(self): + self._timeStamp = GetTimeStampCF()+self._nRounds + + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + winner = ve + it.increment() + if(winner == None): + winner = self.getCurrentEdge() + if(winner.getChainingTimeStamp() == self._timeStamp): + return None + return winner + + +## Chaining iterator that fills small occlusions +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillOcclusionsRelativeChainingIterator(ChainingIterator): + def __init__(self, percent): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if(connexl > self._percent * self._length): + winner = None + return winner + +## Chaining iterator that fills small occlusions +## size +## The max length of the occluded part +## expressed in pixels +class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator): + def __init__(self, length): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = float(length) + def getExactTypeName(self): + return "pySmallFillOcclusionsChainingIterator" + def traverse(self, iter): + winner = None + winnerOrientation = 0 + #print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if(connexl > self._length): + winner = None + return winner + + +## Chaining iterator that fills small occlusions +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator): + def __init__(self, percent, l): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._absLength = l + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if((connexl > self._percent * self._length) or (connexl > self._absLength)): + winner = None + return winner + +## Chaining iterator that fills small occlusions without caring about the +## actual selection +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator): + def __init__(self, percent, l): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._absLength = l + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.qi() != 0): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().qi() != 0)): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if((connexl > self._percent * self._length) or (connexl > self._absLength)): + winner = None + return winner + + +## the natural chaining iterator +## It follows the edges of same nature on the same +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +class pyNoIdChainSilhouetteIterator(ChainingIterator): + def __init__(self, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 1,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + feB = self.getCurrentEdge().fedgeB() + feA = ve.fedgeA() + vB = feB.vertexB() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeA() + feB = ve.fedgeB() + vB = feB.vertexB() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeB() + feB = ve.fedgeB() + vB = feB.vertexB() + vA = feA.vertexB() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeA() + feB = ve.fedgeA() + vB = feB.vertexA() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = it.getObject() + it.increment() + if(count != 1): + winner = None + break + return winner + diff --git a/extern/freestyle/style_modules/Functions0D.py b/extern/freestyle/style_modules/Functions0D.py new file mode 100755 index 00000000000..c1ba591c789 --- /dev/null +++ b/extern/freestyle/style_modules/Functions0D.py @@ -0,0 +1,81 @@ +from Freestyle import * + + +class pyInverseCurvature2DAngleF0D(UnaryFunction0DDouble): + def getName(self): + return "InverseCurvature2DAngleF0D" + + def __call__(self, inter): + func = Curvature2DAngleF0D() + c = func(inter) + return (3.1415 - c) + +class pyCurvilinearLengthF0D(UnaryFunction0DDouble): + def getName(self): + return "CurvilinearLengthF0D" + + def __call__(self, inter): + i0d = inter.getObject() + s = i0d.getExactTypeName() + if (string.find(s, "CurvePoint") == -1): + print "CurvilinearLengthF0D: not implemented yet for %s" % (s) + return -1 + cp = castToCurvePoint(i0d) + return cp.t2d() + +## estimate anisotropy of density +class pyDensityAnisotropyF0D(UnaryFunction0DDouble): + def __init__(self,level): + UnaryFunction0DDouble.__init__(self) + self.IsoDensity = ReadCompleteViewMapPixelF0D(level) + self.d0Density = ReadSteerableViewMapPixelF0D(0, level) + self.d1Density = ReadSteerableViewMapPixelF0D(1, level) + self.d2Density = ReadSteerableViewMapPixelF0D(2, level) + self.d3Density = ReadSteerableViewMapPixelF0D(3, level) + def getName(self): + return "pyDensityAnisotropyF0D" + def __call__(self, inter): + c_iso = self.IsoDensity(inter) + c_0 = self.d0Density(inter) + c_1 = self.d1Density(inter) + c_2 = self.d2Density(inter) + c_3 = self.d3Density(inter) + cMax = max( max(c_0,c_1), max(c_2,c_3)) + cMin = min( min(c_0,c_1), min(c_2,c_3)) + if ( c_iso == 0 ): + v = 0 + else: + v = (cMax-cMin)/c_iso + return (v) + +## Returns the gradient vector for a pixel +## l +## the level at which one wants to compute the gradient +class pyViewMapGradientVectorF0D(UnaryFunction0DVec2f): + def __init__(self, l): + UnaryFunction0DVec2f.__init__(self) + self._l = l + self._step = pow(2,self._l) + def getName(self): + return "pyViewMapGradientVectorF0D" + def __call__(self, iter): + p = iter.getObject().getPoint2D() + gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + return Vec2f(gx, gy) + +class pyViewMapGradientNormF0D(UnaryFunction0DDouble): + def __init__(self, l): + UnaryFunction0DDouble.__init__(self) + self._l = l + self._step = pow(2,self._l) + def getName(self): + return "pyViewMapGradientNormF0D" + def __call__(self, iter): + p = iter.getObject().getPoint2D() + gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + grad = Vec2f(gx, gy) + return grad.norm() + + diff --git a/extern/freestyle/style_modules/Functions1D.py b/extern/freestyle/style_modules/Functions1D.py new file mode 100755 index 00000000000..e2505466aae --- /dev/null +++ b/extern/freestyle/style_modules/Functions1D.py @@ -0,0 +1,45 @@ +from Freestyle import * +from Functions0D import * +import string + +class pyGetInverseProjectedZF1D(UnaryFunction1DDouble): + def getName(self): + return "pyGetInverseProjectedZF1D" + + def __call__(self, inter): + func = GetProjectedZF1D() + z = func(inter) + return (1.0 - z) + +class pyGetSquareInverseProjectedZF1D(UnaryFunction1DDouble): + def getName(self): + return "pyGetInverseProjectedZF1D" + + def __call__(self, inter): + func = GetProjectedZF1D() + z = func(inter) + return (1.0 - z*z) + +class pyDensityAnisotropyF1D(UnaryFunction1DDouble): + def __init__(self,level, integrationType=MEAN, sampling=2.0): + UnaryFunction1DDouble.__init__(self, integrationType) + self._func = pyDensityAnisotropyF0D(level) + self._integration = integrationType + self._sampling = sampling + def getName(self): + return "pyDensityAnisotropyF1D" + def __call__(self, inter): + v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration) + return v + +class pyViewMapGradientNormF1D(UnaryFunction1DDouble): + def __init__(self,l, integrationType, sampling=2.0): + UnaryFunction1DDouble.__init__(self, integrationType) + self._func = pyViewMapGradientNormF0D(l) + self._integration = integrationType + self._sampling = sampling + def getName(self): + return "pyViewMapGradientNormF1D" + def __call__(self, inter): + v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration) + return v diff --git a/extern/freestyle/style_modules/PredicatesB1D.py b/extern/freestyle/style_modules/PredicatesB1D.py new file mode 100755 index 00000000000..dfc895e8d9b --- /dev/null +++ b/extern/freestyle/style_modules/PredicatesB1D.py @@ -0,0 +1,70 @@ +from Freestyle import * +from Functions1D import * +from random import * + +class pyZBP1D(BinaryPredicate1D): + def getName(self): + return "pyZBP1D" + + def __call__(self, i1, i2): + func = GetZF1D() + return (func(i1) > func(i2)) + +class pyZDiscontinuityBP1D(BinaryPredicate1D): + def __init__(self, iType = MEAN): + BinaryPredicate1D.__init__(self) + self._GetZDiscontinuity = ZDiscontinuityF1D(iType) + + def getName(self): + return "pyZDiscontinuityBP1D" + + def __call__(self, i1, i2): + return (self._GetZDiscontinuity(i1) > self._GetZDiscontinuity(i2)) + +class pyLengthBP1D(BinaryPredicate1D): + def getName(self): + return "LengthBP1D" + + def __call__(self, i1, i2): + return (i1.getLength2D() > i2.getLength2D()) + +class pySilhouetteFirstBP1D(BinaryPredicate1D): + def getName(self): + return "SilhouetteFirstBP1D" + + def __call__(self, inter1, inter2): + bpred = SameShapeIdBP1D() + if (bpred(inter1, inter2) != 1): + return 0 + if (inter1.getNature() & SILHOUETTE): + return (inter2.getNature() & SILHOUETTE) + return (inter1.getNature() == inter2.getNature()) + +class pyNatureBP1D(BinaryPredicate1D): + def getName(self): + return "NatureBP1D" + + def __call__(self, inter1, inter2): + return (inter1.getNature() & inter2.getNature()) + +class pyViewMapGradientNormBP1D(BinaryPredicate1D): + def __init__(self,l, sampling=2.0): + BinaryPredicate1D.__init__(self) + self._GetGradient = pyViewMapGradientNormF1D(l, MEAN) + def getName(self): + return "pyViewMapGradientNormBP1D" + def __call__(self, i1,i2): + print "compare gradient" + return (self._GetGradient(i1) > self._GetGradient(i2)) + +class pyShuffleBP1D(BinaryPredicate1D): + def __init__(self): + BinaryPredicate1D.__init__(self) + seed(1) + def getName(self): + return "pyNearAndContourFirstBP1D" + + def __call__(self, inter1, inter2): + r1 = uniform(0,1) + r2 = uniform(0,1) + return (r1 self._a) + +class pyUEqualsUP0D(UnaryPredicate0D): + def __init__(self,u, w): + UnaryPredicate0D.__init__(self) + self._u = u + self._w = w + + def getName(self): + return "UEqualsUP0D" + + def __call__(self, inter): + func = pyCurvilinearLengthF0D() + u = func(inter) + return ( ( u > (self._u-self._w) ) and ( u < (self._u+self._w) ) ) + +class pyVertexNatureUP0D(UnaryPredicate0D): + def __init__(self,nature): + UnaryPredicate0D.__init__(self) + self._nature = nature + + def getName(self): + return "pyVertexNatureUP0D" + + def __call__(self, inter): + v = inter.getObject() + nat = v.getNature() + if(nat & self._nature): + return 1; + return 0 + +## check whether an Interface0DIterator +## is a TVertex and is the one that is +## hidden (inferred from the context) +class pyBackTVertexUP0D(UnaryPredicate0D): + def __init__(self): + UnaryPredicate0D.__init__(self) + self._getQI = QuantitativeInvisibilityF0D() + def getName(self): + return "pyBackTVertexUP0D" + def __call__(self, iter): + v = iter.getObject() + nat = v.getNature() + if(nat & T_VERTEX == 0): + return 0 + next = iter + if(next.isEnd()): + return 0 + if(self._getQI(next) != 0): + return 1 + return 0 + +class pyParameterUP0DGoodOne(UnaryPredicate0D): + def __init__(self,pmin,pmax): + UnaryPredicate0D.__init__(self) + self._m = pmin + self._M = pmax + #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D() + + def getName(self): + return "pyCurvilinearAbscissaHigherThanUP0D" + + def __call__(self, inter): + #s = self.getCurvilinearAbscissa(inter) + u = inter.u() + #print u + return ((u>=self._m) and (u<=self._M)) + +class pyParameterUP0D(UnaryPredicate0D): + def __init__(self,pmin,pmax): + UnaryPredicate0D.__init__(self) + self._m = pmin + self._M = pmax + #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D() + + def getName(self): + return "pyCurvilinearAbscissaHigherThanUP0D" + + def __call__(self, inter): + func = Curvature2DAngleF0D() + c = func(inter) + b1 = (c>0.1) + #s = self.getCurvilinearAbscissa(inter) + u = inter.u() + #print u + b = ((u>=self._m) and (u<=self._M)) + return b and b1 + + diff --git a/extern/freestyle/style_modules/PredicatesU1D.py b/extern/freestyle/style_modules/PredicatesU1D.py new file mode 100755 index 00000000000..18e9686f9df --- /dev/null +++ b/extern/freestyle/style_modules/PredicatesU1D.py @@ -0,0 +1,381 @@ +from Freestyle import * +from Functions1D import * + +count = 0 +class pyNFirstUP1D(UnaryPredicate1D): + def __init__(self, n): + UnaryPredicate1D.__init__(self) + self.__n = n + def __call__(self, inter): + global count + count = count + 1 + if count <= self.__n: + return 1 + return 0 + +class pyHigherLengthUP1D(UnaryPredicate1D): + def __init__(self,l): + UnaryPredicate1D.__init__(self) + self._l = l + + def getName(self): + return "HigherLengthUP1D" + + def __call__(self, inter): + return (inter.getLength2D() > self._l) + +class pyNatureUP1D(UnaryPredicate1D): + def __init__(self,nature): + UnaryPredicate1D.__init__(self) + self._nature = nature + self._getNature = CurveNatureF1D() + + def getName(self): + return "pyNatureUP1D" + + def __call__(self, inter): + if(self._getNature(inter) & self._nature): + return 1 + return 0 + +class pyHigherNumberOfTurnsUP1D(UnaryPredicate1D): + def __init__(self,n,a): + UnaryPredicate1D.__init__(self) + self._n = n + self._a = a + + def getName(self): + return "HigherNumberOfTurnsUP1D" + + def __call__(self, inter): + count = 0 + func = Curvature2DAngleF0D() + it = inter.verticesBegin() + while(it.isEnd() == 0): + if(func(it) > self._a): + count = count+1 + if(count > self._n): + return 1 + it.increment() + return 0 + +class pyDensityUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, integration = MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = threshold + self._integration = integration + self._func = DensityF1D(self._wsize, self._integration, sampling) + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + if(self._func(inter) < self._threshold): + return 1 + return 0 + +class pyLowSteerableViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + + def getName(self): + return "pyLowSteerableViewMapDensityUP1D" + + def __call__(self, inter): + func = GetSteerableViewMapDensityF1D(self._level, self._integration) + v = func(inter) + print v + if(v < self._threshold): + return 1 + return 0 + +class pyLowDirectionalViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, orientation, level,integration = MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._orientation = orientation + self._level = level + self._integration = integration + + def getName(self): + return "pyLowDirectionalViewMapDensityUP1D" + + def __call__(self, inter): + func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration) + v = func(inter) + #print v + if(v < self._threshold): + return 1 + return 0 + +class pyHighSteerableViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + self._func = GetSteerableViewMapDensityF1D(self._level, self._integration) + def getName(self): + return "pyHighSteerableViewMapDensityUP1D" + + def __call__(self, inter): + + v = self._func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyHighDirectionalViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, orientation, level,integration = MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._orientation = orientation + self._level = level + self._integration = integration + self._sampling = sampling + def getName(self): + return "pyLowDirectionalViewMapDensityUP1D" + + def __call__(self, inter): + func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration, self._sampling) + v = func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyHighViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + self._sampling = sampling + self._func = GetCompleteViewMapDensityF1D(self._level, self._integration, self._sampling) # 2.0 is the smpling + + def getName(self): + return "pyHighViewMapDensityUP1D" + + def __call__(self, inter): + #print "toto" + #print func.getName() + #print inter.getExactTypeName() + v= self._func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyDensityFunctorUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, functor, funcmin=0.0, funcmax=1.0, integration = MEAN): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = float(threshold) + self._functor = functor + self._funcmin = float(funcmin) + self._funcmax = float(funcmax) + self._integration = integration + + def getName(self): + return "pyDensityFunctorUP1D" + + def __call__(self, inter): + func = DensityF1D(self._wsize, self._integration) + res = self._functor(inter) + k = (res-self._funcmin)/(self._funcmax-self._funcmin) + if(func(inter) < self._threshold*k): + return 1 + return 0 + +class pyZSmallerUP1D(UnaryPredicate1D): + def __init__(self,z, integration=MEAN): + UnaryPredicate1D.__init__(self) + self._z = z + self._integration = integration + def getName(self): + return "pyZSmallerUP1D" + + def __call__(self, inter): + func = GetProjectedZF1D(self._integration) + if(func(inter) < self._z): + return 1 + return 0 + +class pyIsOccludedByUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyIsOccludedByUP1D" + def __call__(self, inter): + func = GetShapeF1D() + shapes = func(inter) + for s in shapes: + if(s.getId() == self._id): + return 0 + it = inter.verticesBegin() + itlast = inter.verticesEnd() + itlast.decrement() + v = it.getObject() + vlast = itlast.getObject() + tvertex = v.castToTVertex() + if(tvertex != None): + #print "TVertex: [ ", tvertex.getId().getFirst(), ",", tvertex.getId().getSecond()," ]" + eit = tvertex.edgesBegin() + while(eit.isEnd() == 0): + ve = eit.getObject().first + if(ve.shape_id() == self._id): + return 1 + #print "-------", ve.getId().getFirst(), "-", ve.getId().getSecond() + eit.increment() + tvertex = vlast.castToTVertex() + if(tvertex != None): + #print "TVertex: [ ", tvertex.getId().getFirst(), ",", tvertex.getId().getSecond()," ]" + eit = tvertex.edgesBegin() + while(eit.isEnd() == 0): + ve = eit.getObject().first + if(ve.shape_id() == self._id): + return 1 + #print "-------", ve.getId().getFirst(), "-", ve.getId().getSecond() + eit.increment() + return 0 + +class pyIsInOccludersListUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyIsInOccludersListUP1D" + def __call__(self, inter): + func = GetOccludersF1D() + occluders = func(inter) + for a in occluders: + if(a.getId() == self._id): + return 1 + return 0 + +class pyIsOccludedByItselfUP1D(UnaryPredicate1D): + def __init__(self): + UnaryPredicate1D.__init__(self) + self.__func1 = GetOccludersF1D() + self.__func2 = GetShapeF1D() + def getName(self): + return "pyIsOccludedByItselfUP1D" + def __call__(self, inter): + lst1 = self.__func1(inter) + lst2 = self.__func2(inter) + for vs1 in lst1: + for vs2 in lst2: + if vs1.getId() == vs2.getId(): + return 1 + return 0 + +class pyIsOccludedByIdListUP1D(UnaryPredicate1D): + def __init__(self, idlist): + UnaryPredicate1D.__init__(self) + self._idlist = idlist + self.__func1 = GetOccludersF1D() + def getName(self): + return "pyIsOccludedByIdListUP1D" + def __call__(self, inter): + lst1 = self.__func1(inter) + for vs1 in lst1: + for id in self._idlist: + if vs1.getId() == id: + return 1 + return 0 + +class pyShapeIdListUP1D(UnaryPredicate1D): + def __init__(self,idlist): + UnaryPredicate1D.__init__(self) + self._idlist = idlist + self._funcs = [] + for id in idlist : + self._funcs.append(ShapeUP1D(id.getFirst(), id.getSecond())) + + def getName(self): + return "pyShapeIdUP1D" + def __call__(self, inter): + for func in self._funcs : + if(func(inter) == 1) : + return 1 + return 0 + +## deprecated +class pyShapeIdUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyShapeIdUP1D" + def __call__(self, inter): + func = GetShapeF1D() + shapes = func(inter) + for a in shapes: + if(a.getId() == self._id): + return 1 + return 0 + +class pyHighDensityAnisotropyUP1D(UnaryPredicate1D): + def __init__(self,threshold, level, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._l = threshold + self.func = pyDensityAnisotropyF1D(level, MEAN, sampling) + def getName(self): + return "pyHighDensityAnisotropyUP1D" + def __call__(self, inter): + return (self.func(inter) > self._l) + +class pyHighViewMapGradientNormUP1D(UnaryPredicate1D): + def __init__(self,threshold, l, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._GetGradient = pyViewMapGradientNormF1D(l, MEAN) + def getName(self): + return "pyHighViewMapGradientNormUP1D" + def __call__(self, inter): + gn = self._GetGradient(inter) + #print gn + return (gn > self._threshold) + +class pyDensityVariableSigmaUP1D(UnaryPredicate1D): + def __init__(self,functor, sigmaMin,sigmaMax, lmin, lmax, tmin, tmax, integration = MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._functor = functor + self._sigmaMin = float(sigmaMin) + self._sigmaMax = float(sigmaMax) + self._lmin = float(lmin) + self._lmax = float(lmax) + self._tmin = tmin + self._tmax = tmax + self._integration = integration + self._sampling = sampling + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + sigma = (self._sigmaMax-self._sigmaMin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._sigmaMin + t = (self._tmax-self._tmin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._tmin + if(sigma 4* c ): + if ( c < 1.5*self._threshold ): + return 1 + return 0 + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0))) +Operators.select(pyHigherLengthUP1D(40)) +## selects lines having a high anisotropic a priori density +Operators.select(pyHighDensityAnisotropyUP1D(0.3,4)) +Operators.sort(pyLengthBP1D()) +shaders_list = [ + SamplingShader(2.0), + ConstantThicknessShader(2), + ConstantColorShader(0.2,0.2,0.25,1), + ] +## uniform culling +Operators.create(pyDensityUP1D(3.0,2.0e-2, MEAN, 0.1), shaders_list) + + diff --git a/extern/freestyle/style_modules/multiple_parameterization.py b/extern/freestyle/style_modules/multiple_parameterization.py new file mode 100755 index 00000000000..ff04c5930c5 --- /dev/null +++ b/extern/freestyle/style_modules/multiple_parameterization.py @@ -0,0 +1,51 @@ +# +# Filename : multiple_parameterization.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The thickness and the color of the strokes vary continuously +# independently from occlusions although only +# visible lines are actually drawn. This is equivalent +# to assigning the thickness using a parameterization covering +# the complete silhouette (visible+invisible) and drawing +# the strokes using a second parameterization that only +# covers the visible portions. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## Chain following the same nature, but without the restriction +## of staying inside the selection (0). +Operators.bidirectionalChain(ChainSilhouetteIterator(0)) +shaders_list = [ + SamplingShader(20), + IncreasingThicknessShader(1.5, 30), + ConstantColorShader(0.0,0.0,0.0), + IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(-1), + pyHLRShader() ## this shader draws only visible portions + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/nature.py b/extern/freestyle/style_modules/nature.py new file mode 100755 index 00000000000..8cfd480ba3b --- /dev/null +++ b/extern/freestyle/style_modules/nature.py @@ -0,0 +1,43 @@ +# +# Filename : nature.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Uses the NatureUP1D predicate to select the lines +# of a given type (among SILHOUETTE, CREASE, SUGGESTIVE_CONTOURS, +# BORDERS). +# The suggestive contours must have been enabled in the +# options dialog to appear in the View Map. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(pyNatureUP1D(SILHOUETTE)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D( pyNatureUP1D( SILHOUETTE) ) ) +shaders_list = [ + IncreasingThicknessShader(3, 10), + IncreasingColorShader(0.0,0.0,0.0, 1, 0.8,0,0,1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/near_lines.py b/extern/freestyle/style_modules/near_lines.py new file mode 100755 index 00000000000..b132f6b5802 --- /dev/null +++ b/extern/freestyle/style_modules/near_lines.py @@ -0,0 +1,44 @@ +# +# Filename : near_lines.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the lines that are "closer" than a threshold +# (between 0 and 1) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from PredicatesU1D import * +from shaders import * + +upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, MEAN)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + TextureAssignerShader(-1), + ConstantThicknessShader(5), + ConstantColorShader(0.0, 0.0, 0.0) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/occluded_by_specific_object.py b/extern/freestyle/style_modules/occluded_by_specific_object.py new file mode 100755 index 00000000000..96f431c2c4e --- /dev/null +++ b/extern/freestyle/style_modules/occluded_by_specific_object.py @@ -0,0 +1,45 @@ +# +# Filename : occluded_by_specific_object.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws only the lines that are occluded by a given object +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from shaders import * + +## the id of the occluder (use SHIFT+click on the ViewMap to +## retrieve ids) +id = Id(3,0) +upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)), +pyIsInOccludersListUP1D(id)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + SamplingShader(5), + ConstantThicknessShader(3), + ConstantColorShader(0.3,0.3,0.3,1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/polygonalize.py b/extern/freestyle/style_modules/polygonalize.py new file mode 100755 index 00000000000..81d47178404 --- /dev/null +++ b/extern/freestyle/style_modules/polygonalize.py @@ -0,0 +1,40 @@ +# +# Filename : polygonalize.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Make the strokes more "polygonal" +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(2.0), + ConstantThicknessShader(3), + ConstantColorShader(0.0,0.0,0.0), + PolygonalizationShader(8) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/extern/freestyle/style_modules/qi0.py b/extern/freestyle/style_modules/qi0.py new file mode 100755 index 00000000000..f742b777738 --- /dev/null +++ b/extern/freestyle/style_modules/qi0.py @@ -0,0 +1,41 @@ +# +# Filename : qi0.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# (most basic style module) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(5.0), + ConstantThicknessShader(4.0), + ConstantColorShader(0.0,0.0,0.0) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/extern/freestyle/style_modules/qi0_not_external_contour.py b/extern/freestyle/style_modules/qi0_not_external_contour.py new file mode 100755 index 00000000000..047ab7e1a8e --- /dev/null +++ b/extern/freestyle/style_modules/qi0_not_external_contour.py @@ -0,0 +1,43 @@ +# +# Filename : qi0_not_external_contour.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# that do not belong to the external contour of the scene +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * + +upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(4, 150, 2, 1, 1), + IncreasingThicknessShader(2, 5), + BackboneStretcherShader(20), + IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/qi1.py b/extern/freestyle/style_modules/qi1.py new file mode 100755 index 00000000000..234d196f15e --- /dev/null +++ b/extern/freestyle/style_modules/qi1.py @@ -0,0 +1,42 @@ +# +# Filename : qi1.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws lines hidden by one surface. +# *** Quantitative Invisibility must have been +# enabled in the options dialog to use this style module **** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(1)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(1))) +shaders_list = [ + SamplingShader(5.0), + ConstantThicknessShader(3), + ConstantColorShader(0.5,0.5,0.5, 1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/qi2.py b/extern/freestyle/style_modules/qi2.py new file mode 100755 index 00000000000..8e45914c619 --- /dev/null +++ b/extern/freestyle/style_modules/qi2.py @@ -0,0 +1,42 @@ +# +# Filename : qi2.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws lines hidden by two surfaces. +# *** Quantitative Invisibility must have been +# enabled in the options dialog to use this style module **** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(2)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(2))) +shaders_list = [ + SamplingShader(10), + ConstantThicknessShader(1.5), + ConstantColorShader(0.7,0.7,0.7, 1) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/extern/freestyle/style_modules/sequentialsplit_sketchy.py b/extern/freestyle/style_modules/sequentialsplit_sketchy.py new file mode 100755 index 00000000000..b33cd5d4043 --- /dev/null +++ b/extern/freestyle/style_modules/sequentialsplit_sketchy.py @@ -0,0 +1,68 @@ +# +# Filename : sequentialsplit_sketchy.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Use the sequential split with two different +# predicates to specify respectively the starting and +# the stopping extremities for strokes +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from Functions0D import * + +## Predicate to tell whether a TVertex +## corresponds to a change from 0 to 1 or not. +class pyBackTVertexUP0D(UnaryPredicate0D): + def __init__(self): + UnaryPredicate0D.__init__(self) + self._getQI = QuantitativeInvisibilityF0D() + def getName(self): + return "pyBackTVertexUP0D" + def __call__(self, iter): + v = iter.getObject() + nat = v.getNature() + if(nat & T_VERTEX == 0): + return 0 + if(self._getQI(iter) != 0): + return 1 + return 0 + + +upred = QuantitativeInvisibilityUP1D(0) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +## starting and stopping predicates: +start = pyVertexNatureUP0D(NON_T_VERTEX) +stop = pyBackTVertexUP0D() +Operators.sequentialSplit(start, stop, 10) +shaders_list = [ + SpatialNoiseShader(7, 120, 2, 1, 1), + IncreasingThicknessShader(5, 8), + ConstantColorShader(0.2, 0.2, 0.2, 1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/extern/freestyle/style_modules/shaders.py b/extern/freestyle/style_modules/shaders.py new file mode 100755 index 00000000000..17ad31961d5 --- /dev/null +++ b/extern/freestyle/style_modules/shaders.py @@ -0,0 +1,1288 @@ +from Freestyle import * +from PredicatesU0D import * +from PredicatesB1D import * +from PredicatesU1D import * +from logical_operators import * +from ChainingIterators import * +from random import * +from math import * +from vector import * + +## thickness modifiers +###################### + +class pyDepthDiscontinuityThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = float(min) + self.__max = float(max) + self.__func = ZDiscontinuityF0D() + def getName(self): + return "pyDepthDiscontinuityThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min=0.0 + z_max=1.0 + a = (self.__max - self.__min)/(z_max-z_min) + b = (self.__min*z_max-self.__max*z_min)/(z_max-z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + thickness = a*z+b + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + +class pyConstantThicknessShader(StrokeShader): + def __init__(self, thickness): + StrokeShader.__init__(self) + self._thickness = thickness + + def getName(self): + return "pyConstantThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + t = self._thickness/2.0 + att.setThickness(t, t) + it.increment() + +class pyFXSThicknessShader(StrokeShader): + def __init__(self, thickness): + StrokeShader.__init__(self) + self._thickness = thickness + + def getName(self): + return "pyFXSThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + t = self._thickness/2.0 + att.setThickness(t, t) + it.increment() + +class pyFXSVaryingThicknessWithDensityShader(StrokeShader): + def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax): + StrokeShader.__init__(self) + self.wsize= wsize + self.threshold_min= threshold_min + self.threshold_max= threshold_max + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyVaryingThicknessWithDensityShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = DensityF0D(self.wsize) + while it.isEnd() == 0: + att = it.getObject().attribute() + toto = it.castToInterface0DIterator() + c= func(toto) + if (c < self.threshold_min ): + c = self.threshold_min + if (c > self.threshold_max ): + c = self.threshold_max +## t = (c - self.threshold_min)/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin + t = (self.threshold_max - c )/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() +class pyIncreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyIncreasingThicknessShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = (1.0 - c)*self._thicknessMin + c * self._thicknessMax + else: + t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +class pyConstrainedIncreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax, ratio): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + self._ratio = ratio + + def getName(self): + return "pyConstrainedIncreasingThicknessShader" + def shade(self, stroke): + slength = stroke.getLength2D() + tmp = self._ratio*slength + maxT = 0.0 + if(tmp < self._thicknessMax): + maxT = tmp + else: + maxT = self._thicknessMax + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = (1.0 - c)*self._thicknessMin + c * maxT + else: + t = (1.0 - c)*maxT + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + if(i == n-1): + att.setThickness(self._thicknessMin/2.0, self._thicknessMin/2.0) + i = i+1 + it.increment() + +class pyDecreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMax, thicknessMin): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyDecreasingThicknessShader" + def shade(self, stroke): + l = stroke.getLength2D() + tMax = self._thicknessMax + if(self._thicknessMax > 0.33*l): + tMax = 0.33*l + tMin = self._thicknessMin + if(self._thicknessMin > 0.1*l): + tMin = 0.1*l + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + t = (1.0 - c)*tMax +c*tMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +def smoothC( a, exp ): + c = pow(float(a),exp)*pow(2.0,exp) + return c + +class pyNonLinearVaryingThicknessShader(StrokeShader): + def __init__(self, thicknessExtremity, thicknessMiddle, exponent): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMiddle + self._thicknessMax = thicknessExtremity + self._exponent = exponent + + def getName(self): + return "pyNonLinearVaryingThicknessShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + if(i < float(n)/2.0): + c = float(i)/float(n) + else: + c = float(n-i)/float(n) + c = smoothC(c, self._exponent) + t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +## Spherical linear interpolation (cos) +class pySLERPThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax, omega=1.2): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + self._omega = omega + + def getName(self): + return "pySLERPThicknessShader" + def shade(self, stroke): + slength = stroke.getLength2D() + tmp = 0.33*slength + maxT = self._thicknessMax + if(tmp < self._thicknessMax): + maxT = tmp + + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = sin((1-c)*self._omega)/sinh(self._omega)*self._thicknessMin + sin(c*self._omega)/sinh(self._omega) * maxT + else: + t = sin((1-c)*self._omega)/sinh(self._omega)*maxT + sin(c*self._omega)/sinh(self._omega) * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +class pyTVertexThickenerShader(StrokeShader): ## FIXME + def __init__(self, a=1.5, n=3): + StrokeShader.__init__(self) + self._a = a + self._n = n + + def getName(self): + return "pyTVertexThickenerShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + predTVertex = pyVertexNatureUP0D(T_VERTEX) + while it.isEnd() == 0: + if(predTVertex(it) == 1): + it2 = StrokeVertexIterator(it) + it2.increment() + if not(it.isBegin() or it2.isEnd()): + it.increment() + continue + n = self._n + a = self._a + if(it.isBegin()): + it3 = StrokeVertexIterator(it) + count = 0 + while (it3.isEnd() == 0 and count < n): + att = it3.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it3.increment() + count = count + 1 + if(it2.isEnd()): + it4 = StrokeVertexIterator(it) + count = 0 + while (it4.isBegin() == 0 and count < n): + att = it4.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it4.decrement() + count = count + 1 + if ((it4.isBegin() == 1)): + att = it4.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it.increment() + +class pyImportance2DThicknessShader(StrokeShader): + def __init__(self, x, y, w, kmin, kmax): + StrokeShader.__init__(self) + self._x = x + self._y = y + self._w = float(w) + self._kmin = float(kmin) + self._kmax = float(kmax) + + def getName(self): + return "pyImportanceThicknessShader" + def shade(self, stroke): + origin = Vec2(self._x, self._y) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + p = Vec2(v.getProjectedX(), v.getProjectedY()) + d = (p-origin).length() + if(d>self._w): + k = self._kmin + else: + k = (self._kmax*(self._w-d) + self._kmin*d)/self._w + att = v.attribute() + tr = att.getThicknessR() + tl = att.getThicknessL() + att.setThickness(k*tr/2.0, k*tl/2.0) + it.increment() + +class pyImportance3DThicknessShader(StrokeShader): + def __init__(self, x, y, z, w, kmin, kmax): + StrokeShader.__init__(self) + self._x = x + self._y = y + self._z = z + self._w = float(w) + self._kmin = float(kmin) + self._kmax = float(kmax) + + def getName(self): + return "pyImportance3DThicknessShader" + def shade(self, stroke): + origin = Vec3(self._x, self._y, self._z) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + p = Vec3(v.getX(), v.getY(), v.getZ()) + d = (p-origin).length() + if(d>self._w): + k = self._kmin + else: + k = (self._kmax*(self._w-d) + self._kmin*d)/self._w + att = v.attribute() + tr = att.getThicknessR() + tl = att.getThicknessL() + att.setThickness(k*tr/2.0, k*tl/2.0) + it.increment() + +class pyZDependingThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = min + self.__max = max + self.__func = GetProjectedZF0D() + def getName(self): + return "pyZDependingThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min = 1 + z_max = 0 + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + if z < z_min: + z_min = z + elif z > z_max: + z_max = z + it.increment() + z_diff = 1 / (z_max - z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = (self.__func(it.castToInterface0DIterator()) - z_min) * z_diff + thickness = (1 - z) * self.__max + z * self.__min + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + + +## color modifiers +################## + +class pyConstantColorShader(StrokeShader): + def __init__(self,r,g,b, a = 1): + StrokeShader.__init__(self) + self._r = r + self._g = g + self._b = b + self._a = a + def getName(self): + return "pyConstantColorShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + att.setColor(self._r, self._g, self._b) + att.setAlpha(self._a) + it.increment() + +#c1->c2 +class pyIncreasingColorShader(StrokeShader): + def __init__(self,r1,g1,b1,a1, r2,g2,b2,a2): + StrokeShader.__init__(self) + self._c1 = [r1,g1,b1,a1] + self._c2 = [r2,g2,b2,a2] + def getName(self): + return "pyIncreasingColorShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() - 1 + inc = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(inc)/float(n) + + att.setColor( (1-c)*self._c1[0] + c*self._c2[0], + (1-c)*self._c1[1] + c*self._c2[1], + (1-c)*self._c1[2] + c*self._c2[2],) + att.setAlpha((1-c)*self._c1[3] + c*self._c2[3],) + inc = inc+1 + it.increment() + +# c1->c2->c1 +class pyInterpolateColorShader(StrokeShader): + def __init__(self,r1,g1,b1,a1, r2,g2,b2,a2): + StrokeShader.__init__(self) + self._c1 = [r1,g1,b1,a1] + self._c2 = [r2,g2,b2,a2] + def getName(self): + return "pyInterpolateColorShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() - 1 + inc = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + u = float(inc)/float(n) + c = 1-2*(fabs(u-0.5)) + att.setColor( (1-c)*self._c1[0] + c*self._c2[0], + (1-c)*self._c1[1] + c*self._c2[1], + (1-c)*self._c1[2] + c*self._c2[2],) + att.setAlpha((1-c)*self._c1[3] + c*self._c2[3],) + inc = inc+1 + it.increment() + +class pyMaterialColorShader(StrokeShader): + def __init__(self, threshold=50): + StrokeShader.__init__(self) + self._threshold = threshold + + def getName(self): + return "pyMaterialColorShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = MaterialF0D() + xn = 0.312713 + yn = 0.329016 + Yn = 1.0 + un = 4.* xn/ ( -2.*xn + 12.*yn + 3. ) + vn= 9.* yn/ ( -2.*xn + 12.*yn +3. ) + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + mat = func(toto) + + r = mat.diffuseR() + g = mat.diffuseG() + b = mat.diffuseB() + + X = 0.412453*r + 0.35758 *g + 0.180423*b + Y = 0.212671*r + 0.71516 *g + 0.072169*b + Z = 0.019334*r + 0.119193*g + 0.950227*b + + if((X == 0) and (Y == 0) and (Z == 0)): + X = 0.01 + Y = 0.01 + Z = 0.01 + u = 4.*X / (X + 15.*Y + 3.*Z) + v = 9.*Y / (X + 15.*Y + 3.*Z) + + L= 116. * math.pow((Y/Yn),(1./3.)) -16 + U = 13. * L * (u - un) + V = 13. * L * (v - vn) + + if (L > self._threshold): + L = L/1.3 + U = U+10 + else: + L = L +2.5*(100-L)/5. + U = U/3.0 + V = V/3.0 + u = U / (13. * L) + un + v = V / (13. * L) + vn + + Y = Yn * math.pow( ((L+16.)/116.), 3.) + X = -9. * Y * u / ((u - 4.)* v - u * v) + Z = (9. * Y - 15*v*Y - v*X) /( 3. * v) + + r = 3.240479 * X - 1.53715 * Y - 0.498535 * Z + g = -0.969256 * X + 1.875991 * Y + 0.041556 * Z + b = 0.055648 * X - 0.204043 * Y + 1.057311 * Z + + att = it.getObject().attribute() + att.setColor(r, g, b) + it.increment() + +class pyRandomColorShader(StrokeShader): + def getName(self): + return "pyRandomColorShader" + def __init__(self, s=1): + StrokeShader.__init__(self) + seed(s) + def shade(self, stroke): + ## pick a random color + c0 = float(uniform(15,75))/100.0 + c1 = float(uniform(15,75))/100.0 + c2 = float(uniform(15,75))/100.0 + print c0, c1, c2 + it = stroke.strokeVerticesBegin() + while(it.isEnd() == 0): + it.getObject().attribute().setColor(c0,c1,c2) + it.increment() + +class py2DCurvatureColorShader(StrokeShader): + def getName(self): + return "py2DCurvatureColorShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = Curvature2DAngleF0D() + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + sv = it.getObject() + att = sv.attribute() + c = func(toto) + if (c<0): + print "negative 2D curvature" + color = 10.0 * c/3.1415 + print color + att.setColor(color,color,color); + it.increment() + +class pyTimeColorShader(StrokeShader): + def __init__(self, step=0.01): + StrokeShader.__init__(self) + self._t = 0 + self._step = step + def shade(self, stroke): + c = self._t*1.0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + att.setColor(c,c,c) + it.increment() + self._t = self._t+self._step + +## geometry modifiers + +class pySamplingShader(StrokeShader): + def __init__(self, sampling): + StrokeShader.__init__(self) + self._sampling = sampling + def getName(self): + return "pySamplingShader" + def shade(self, stroke): + stroke.Resample(float(self._sampling)) + +class pyBackboneStretcherShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + vn_1 = itn_1.getObject() + vn = itn.getObject() + p0 = Vec2f(v0.getProjectedX(), v0.getProjectedY()) + pn = Vec2f(vn.getProjectedX(), vn.getProjectedY()) + p1 = Vec2f(v1.getProjectedX(), v1.getProjectedY()) + pn_1 = Vec2f(vn_1.getProjectedX(), vn_1.getProjectedY()) + d1 = p0-p1 + d1 = d1/d1.norm() + dn = pn-pn_1 + dn = dn/dn.norm() + newFirst = p0+d1*float(self._l) + newLast = pn+dn*float(self._l) + v0.SetPoint(newFirst) + vn.SetPoint(newLast) + +class pyLengthDependingBackboneStretcherShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherShader" + def shade(self, stroke): + l = stroke.getLength2D() + stretch = self._l*l + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + vn_1 = itn_1.getObject() + vn = itn.getObject() + p0 = Vec2f(v0.getProjectedX(), v0.getProjectedY()) + pn = Vec2f(vn.getProjectedX(), vn.getProjectedY()) + p1 = Vec2f(v1.getProjectedX(), v1.getProjectedY()) + pn_1 = Vec2f(vn_1.getProjectedX(), vn_1.getProjectedY()) + d1 = p0-p1 + d1 = d1/d1.norm() + dn = pn-pn_1 + dn = dn/dn.norm() + newFirst = p0+d1*float(stretch) + newLast = pn+dn*float(stretch) + v0.SetPoint(newFirst) + vn.SetPoint(newLast) + + +## Shader to replace a stroke by its corresponding tangent +class pyGuidingLineShader(StrokeShader): + def getName(self): + return "pyGuidingLineShader" + ## shading method + def shade(self, stroke): + it = stroke.strokeVerticesBegin() ## get the first vertex + itlast = stroke.strokeVerticesEnd() ## + itlast.decrement() ## get the last one + t = itlast.getObject().getPoint() - it.getObject().getPoint() ## tangent direction + itmiddle = StrokeVertexIterator(it) ## + while(itmiddle.getObject().u()<0.5): ## look for the stroke middle vertex + itmiddle.increment() ## + it = StrokeVertexIterator(itmiddle) + it.increment() + while(it.isEnd() == 0): ## position all the vertices along the tangent for the right part + it.getObject().SetPoint(itmiddle.getObject().getPoint() \ + +t*(it.getObject().u()-itmiddle.getObject().u())) + it.increment() + it = StrokeVertexIterator(itmiddle) + it.decrement() + while(it.isBegin() == 0): ## position all the vertices along the tangent for the left part + it.getObject().SetPoint(itmiddle.getObject().getPoint() \ + -t*(itmiddle.getObject().u()-it.getObject().u())) + it.decrement() + it.getObject().SetPoint(itmiddle.getObject().getPoint()-t*(itmiddle.getObject().u())) ## first vertex + + +class pyBackboneStretcherNoCuspShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherNoCuspShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + p0 = v0.getPoint() + p1 = v1.getPoint() + d1 = p0-p1 + d1 = d1/d1.norm() + newFirst = p0+d1*float(self._l) + v0.SetPoint(newFirst) + vn_1 = itn_1.getObject() + vn = itn.getObject() + if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + pn = vn.getPoint() + pn_1 = vn_1.getPoint() + dn = pn-pn_1 + dn = dn/dn.norm() + newLast = pn+dn*float(self._l) + vn.SetPoint(newLast) + +normalInfo=Normal2DF0D() +curvatureInfo=Curvature2DAngleF0D() + +def edgestopping(x, sigma): + return exp(- x*x/(2*sigma*sigma)) + +class pyDiffusion2Shader(StrokeShader): + def __init__(self, lambda1, nbIter): + StrokeShader.__init__(self) + self._lambda = lambda1 + self._nbIter = nbIter + self._normalInfo = Normal2DF0D() + self._curvatureInfo = Curvature2DAngleF0D() + def getName(self): + return "pyDiffusionShader" + def shade(self, stroke): + for i in range (1, self._nbIter): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v=it.getObject() + p1 = v.getPoint() + p2 = self._normalInfo(it.castToInterface0DIterator())*self._lambda*self._curvatureInfo(it.castToInterface0DIterator()) + v.SetPoint(p1+p2) + it.increment() + +class pyTipRemoverShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyTipRemoverShader" + def shade(self, stroke): + originalSize = stroke.strokeVerticesSize() + if(originalSize<4): + return + verticesToRemove = [] + oldAttributes = [] + it = stroke.strokeVerticesBegin() + while(it.isEnd() == 0): + v = it.getObject() + if((v.curvilinearAbscissa() < self._l) or (v.strokeLength()-v.curvilinearAbscissa() < self._l)): + verticesToRemove.append(v) + oldAttributes.append(StrokeAttribute(v.attribute())) + it.increment() + if(originalSize-len(verticesToRemove) < 2): + return + for sv in verticesToRemove: + stroke.RemoveVertex(sv) + stroke.Resample(originalSize) + if(stroke.strokeVerticesSize() != originalSize): + print "pyTipRemover: Warning: resampling problem" + it = stroke.strokeVerticesBegin() + for a in oldAttributes: + if(it.isEnd() == 1): + break + v = it.getObject() + v.SetAttribute(a) + it.increment() + +class pyTVertexRemoverShader(StrokeShader): + def getName(self): + return "pyTVertexRemoverShader" + def shade(self, stroke): + if(stroke.strokeVerticesSize() <= 3 ): + return + predTVertex = pyVertexNatureUP0D(T_VERTEX) + it = stroke.strokeVerticesBegin() + itlast = stroke.strokeVerticesEnd() + itlast.decrement() + if(predTVertex(it) == 1): + stroke.RemoveVertex(it.getObject()) + if(predTVertex(itlast) == 1): + stroke.RemoveVertex(itlast.getObject()) + +class pyExtremitiesOrientationShader(StrokeShader): + def __init__(self, x1,y1,x2=0,y2=0): + StrokeShader.__init__(self) + self._v1 = Vec2(x1,y1) + self._v2 = Vec2(x2,y2) + def getName(self): + return "pyExtremitiesOrientationShader" + def shade(self, stroke): + print self._v1.x(),self._v1.y() + stroke.SetBeginningOrientation(self._v1.x(),self._v1.y()) + stroke.SetEndingOrientation(self._v2.x(),self._v2.y()) + +class pyHLRShader(StrokeShader): + def getName(self): + return "pyHLRShader" + def shade(self, stroke): + originalSize = stroke.strokeVerticesSize() + if(originalSize<4): + return + it = stroke.strokeVerticesBegin() + invisible = 0 + it2 = StrokeVertexIterator(it) + it2.increment() + fe = getFEdge(it.getObject(), it2.getObject()) + if(fe.qi() != 0): + invisible = 1 + while(it2.isEnd() == 0): + v = it.getObject() + vnext = it2.getObject() + if(v.getNature() & VIEW_VERTEX): + #if(v.getNature() & T_VERTEX): + fe = getFEdge(v,vnext) + qi = fe.qi() + if(qi != 0): + invisible = 1 + else: + invisible = 0 + if(invisible == 1): + v.attribute().SetVisible(0) + it.increment() + it2.increment() + +class pyTVertexOrientationShader(StrokeShader): + def __init__(self): + StrokeShader.__init__(self) + self._Get2dDirection = Orientation2DF1D() + def getName(self): + return "pyTVertexOrientationShader" + ## finds the TVertex orientation from the TVertex and + ## the previous or next edge + def findOrientation(self, tv, ve): + mateVE = tv.mate(ve) + if((ve.qi() != 0) or (mateVE.qi() != 0)): + ait = AdjacencyIterator(tv,1,0) + winner = None + incoming = 1 + while(ait.isEnd() == 0): + ave = ait.getObject() + if((ave.getId() != ve.getId()) and (ave.getId() != mateVE.getId())): + winner = ait.getObject() + if(ait.isIncoming() == 0): + incoming = 0 + break + ait.increment() + if(winner != None): + if(incoming != 0): + direction = self._Get2dDirection(winner.fedgeB()) + else: + direction = self._Get2dDirection(winner.fedgeA()) + return direction + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it2 = StrokeVertexIterator(it) + it2.increment() + ## case where the first vertex is a TVertex + v = it.getObject() + if(v.getNature() & T_VERTEX): + tv = v.castToTVertex() + ve = getFEdge(v, it2.getObject()).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + while(it2.isEnd() == 0): + vprevious = it.getObject() + v = it2.getObject() + if(v.getNature() & T_VERTEX): + tv = v.castToTVertex() + ve = getFEdge(vprevious, v).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + it.increment() + it2.increment() + ## case where the last vertex is a TVertex + v = it.getObject() + if(v.getNature() & T_VERTEX): + itPrevious = StrokeVertexIterator(it) + itPrevious.decrement() + tv = v.castToTVertex() + ve = getFEdge(itPrevious.getObject(), v).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + +class pySinusDisplacementShader(StrokeShader): + def __init__(self, f, a): + StrokeShader.__init__(self) + self._f = f + self._a = a + self._getNormal = Normal2DF0D() + + def getName(self): + return "pySinusDisplacementShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + #print self._getNormal.getName() + n = self._getNormal(it.castToInterface0DIterator()) + p = v.getPoint() + u = v.u() + a = self._a*(1-2*(fabs(u-0.5))) + n = n*a*cos(self._f*u*6.28) + #print n.x(), n.y() + v.SetPoint(p+n) + #v.SetPoint(v.getPoint()+n*a*cos(f*v.u())) + it.increment() + +class pyPerlinNoise1DShader(StrokeShader): + def __init__(self, freq = 10, amp = 10, oct = 4): + StrokeShader.__init__(self) + self.__noise = Noise() + self.__freq = freq + self.__amp = amp + self.__oct = oct + def getName(self): + return "pyPerlinNoise1DShader" + def shade(self, stroke): + i = randint(0, 50) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + nres = self.__noise.turbulence1(i, self.__freq, self.__amp, self.__oct) + v.SetPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + i = i+1 + it.increment() + +class pyPerlinNoise2DShader(StrokeShader): + def __init__(self, freq = 10, amp = 10, oct = 4): + StrokeShader.__init__(self) + self.__noise = Noise() + self.__freq = freq + self.__amp = amp + self.__oct = oct + def getName(self): + return "pyPerlinNoise2DShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + vec = Vec2f(v.getProjectedX(), v.getProjectedY()) + nres = self.__noise.turbulence2(vec, self.__freq, self.__amp, self.__oct) + v.SetPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + it.increment() + +class pyBluePrintCirclesShader(StrokeShader): + def __init__(self, turns = 1): + StrokeShader.__init__(self) + self.__turns = turns + def getName(self): + return "pyBluePrintCirclesShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +# print "min :", p_min.x(), p_min.y() # DEBUG +# print "mean :", p_sum.x(), p_sum.y() # DEBUG +# print "max :", p_max.x(), p_max.y() # DEBUG +# print "----------------------" # DEBUG +####################################################### + sv_nb = sv_nb / self.__turns + center = (p_min + p_max) / 2 + radius = (center.x() - p_min.x() + center.y() - p_min.y()) / 2 + p_new = Vec2f() +####################################################### + it = stroke.strokeVerticesBegin() + for j in range(self.__turns): + radius = radius + randint(-3, 3) + center_x = center.x() + randint(-5, 5) + center_y = center.y() + randint(-5, 5) + center.setX(center_x) + center.setY(center_y) + i = 0 + while i < sv_nb: + p_new.setX(center.x() + radius * cos(2 * pi * float(i) / float(sv_nb - 1))) + p_new.setY(center.y() + radius * sin(2 * pi * float(i) / float(sv_nb - 1))) + it.getObject().SetPoint(p_new.x(), p_new.y()) + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintEllipsesShader(StrokeShader): + def __init__(self, turns = 1): + StrokeShader.__init__(self) + self.__turns = turns + def getName(self): + return "pyBluePrintEllipsesShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +# print "min :", p_min.x(), p_min.y() # DEBUG +# print "mean :", p_sum.x(), p_sum.y() # DEBUG +# print "max :", p_max.x(), p_max.y() # DEBUG +# print "----------------------" # DEBUG +####################################################### + sv_nb = sv_nb / self.__turns + center = (p_min + p_max) / 2 + radius_x = center.x() - p_min.x() + radius_y = center.y() - p_min.y() + p_new = Vec2f() +####################################################### + it = stroke.strokeVerticesBegin() + for j in range(self.__turns): + radius_x = radius_x + randint(-3, 3) + radius_y = radius_y + randint(-3, 3) + center_x = center.x() + randint(-5, 5) + center_y = center.y() + randint(-5, 5) + center.setX(center_x) + center.setY(center_y) + i = 0 + while i < sv_nb: + p_new.setX(center.x() + radius_x * cos(2 * pi * float(i) / float(sv_nb - 1))) + p_new.setY(center.y() + radius_y * sin(2 * pi * float(i) / float(sv_nb - 1))) + it.getObject().SetPoint(p_new.x(), p_new.y()) + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintSquaresShader(StrokeShader): + def __init__(self, turns = 1, bb_len = 10): + StrokeShader.__init__(self) + self.__turns = turns + self.__bb_len = bb_len + def getName(self): + return "pyBluePrintSquaresShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +####################################################### + sv_nb = sv_nb / self.__turns + first = sv_nb / 4 + second = 2 * first + third = 3 * first + fourth = sv_nb + vec_first = Vec2f(p_max.x() - p_min.x() + 2 * self.__bb_len, 0) + vec_second = Vec2f(0, p_max.y() - p_min.y() + 2 * self.__bb_len) + vec_third = vec_first * -1 + vec_fourth = vec_second * -1 + p_first = Vec2f(p_min.x() - self.__bb_len, p_min.y()) + p_second = Vec2f(p_max.x(), p_min.y() - self.__bb_len) + p_third = Vec2f(p_max.x() + self.__bb_len, p_max.y()) + p_fourth = Vec2f(p_min.x(), p_max.y() + self.__bb_len) +####################################################### + it = stroke.strokeVerticesBegin() + visible = 1 + for j in range(self.__turns): + i = 0 + while i < sv_nb: + if i < first: + p_new = p_first + vec_first * float(i)/float(first - 1) + if i == first - 1: + visible = 0 + elif i < second: + p_new = p_second + vec_second * float(i - first)/float(second - first - 1) + if i == second - 1: + visible = 0 + elif i < third: + p_new = p_third + vec_third * float(i - second)/float(third - second - 1) + if i == third - 1: + visible = 0 + else: + p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) + if i == fourth - 1: + visible = 0 + it.getObject().SetPoint(p_new.x(), p_new.y()) + it.getObject().attribute().SetVisible(visible) + if visible == 0: + visible = 1 + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintDirectedSquaresShader(StrokeShader): + def __init__(self, turns = 1, bb_len = 10, mult = 1): + StrokeShader.__init__(self) + self.__mult = mult + self.__turns = turns + self.__bb_len = 1 + float(bb_len) / 100 + def getName(self): + return "pyBluePrintDirectedSquaresShader" + def shade(self, stroke): + stroke.Resample(32 * self.__turns) + p_mean = Vec2f(0, 0) + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + p_mean = p_mean + p +## if (p.x() < p_min.x()): +## p_min.setX(p.x()) +## if (p.x() > p_max.x()): +## p_max.setX(p.x()) +## if (p.y() < p_min.y()): +## p_min.setY(p.y()) +## if (p.y() > p_max.y()): +## p_max.setY(p.y()) + it.increment() + sv_nb = stroke.strokeVerticesSize() + p_mean = p_mean / sv_nb + p_var_xx = 0 + p_var_yy = 0 + p_var_xy = 0 + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + p_var_xx = p_var_xx + pow(p.x() - p_mean.x(), 2) + p_var_yy = p_var_yy + pow(p.y() - p_mean.y(), 2) + p_var_xy = p_var_xy + (p.x() - p_mean.x()) * (p.y() - p_mean.y()) + it.increment() + p_var_xx = p_var_xx / sv_nb + p_var_yy = p_var_yy / sv_nb + p_var_xy = p_var_xy / sv_nb +## print p_var_xx, p_var_yy, p_var_xy + trace = p_var_xx + p_var_yy + det = p_var_xx * p_var_yy - p_var_xy * p_var_xy + sqrt_coeff = sqrt(trace * trace - 4 * det) + lambda1 = (trace + sqrt_coeff) / 2 + lambda2 = (trace - sqrt_coeff) / 2 +## print lambda1, lambda2 + theta = atan(2 * p_var_xy / (p_var_xx - p_var_yy)) / 2 +## print theta + if p_var_yy > p_var_xx: + e1 = Vec2f(cos(theta + pi / 2), sin(theta + pi / 2)) * sqrt(lambda1) * self.__mult + e2 = Vec2f(cos(theta + pi), sin(theta + pi)) * sqrt(lambda2) * self.__mult + else: + e1 = Vec2f(cos(theta), sin(theta)) * sqrt(lambda1) * self.__mult + e2 = Vec2f(cos(theta + pi / 2), sin(theta + pi / 2)) * sqrt(lambda2) * self.__mult +####################################################### + sv_nb = sv_nb / self.__turns + first = sv_nb / 4 + second = 2 * first + third = 3 * first + fourth = sv_nb + bb_len1 = self.__bb_len + bb_len2 = 1 + (bb_len1 - 1) * sqrt(lambda1 / lambda2) + p_first = p_mean - e1 - e2 * bb_len2 + p_second = p_mean - e1 * bb_len1 + e2 + p_third = p_mean + e1 + e2 * bb_len2 + p_fourth = p_mean + e1 * bb_len1 - e2 + vec_first = e2 * bb_len2 * 2 + vec_second = e1 * bb_len1 * 2 + vec_third = vec_first * -1 + vec_fourth = vec_second * -1 +####################################################### + it = stroke.strokeVerticesBegin() + visible = 1 + for j in range(self.__turns): + i = 0 + while i < sv_nb: + if i < first: + p_new = p_first + vec_first * float(i)/float(first - 1) + if i == first - 1: + visible = 0 + elif i < second: + p_new = p_second + vec_second * float(i - first)/float(second - first - 1) + if i == second - 1: + visible = 0 + elif i < third: + p_new = p_third + vec_third * float(i - second)/float(third - second - 1) + if i == third - 1: + visible = 0 + else: + p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) + if i == fourth - 1: + visible = 0 + it.getObject().SetPoint(p_new.x(), p_new.y()) + it.getObject().attribute().SetVisible(visible) + if visible == 0: + visible = 1 + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + +class pyModulateAlphaShader(StrokeShader): + def __init__(self, min = 0, max = 1): + StrokeShader.__init__(self) + self.__min = min + self.__max = max + def getName(self): + return "pyModulateAlphaShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + alpha = it.getObject().attribute().getAlpha() + p = it.getObject().getPoint() + alpha = alpha * p.y() / 400 + if alpha < self.__min: + alpha = self.__min + elif alpha > self.__max: + alpha = self.__max + it.getObject().attribute().setAlpha(alpha) + it.increment() + + +## various +class pyDummyShader(StrokeShader): + def getName(self): + return "pyDummyShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + att = it.getObject().attribute() + att.setColor(0.3, 0.4, 0.4) + att.setThickness(0, 5) + it.increment() + +class pyDebugShader(StrokeShader): + def getName(self): + return "pyDebugShader" + + def shade(self, stroke): + fe = GetSelectedFEdgeCF() + id1=fe.vertexA().getId() + id2=fe.vertexB().getId() + #print id1.getFirst(), id1.getSecond() + #print id2.getFirst(), id2.getSecond() + it = stroke.strokeVerticesBegin() + found = 0 + foundfirst = 0 + foundsecond = 0 + while it.isEnd() == 0: + cp = it.getObject() + if((cp.A().getId() == id1) or (cp.B().getId() == id1)): + foundfirst = 1 + if((cp.A().getId() == id2) or (cp.B().getId() == id2)): + foundsecond = 1 + if((foundfirst != 0) and (foundsecond != 0)): + found = 1 + break + it.increment() + if(found != 0): + print "The selected Stroke id is: ", stroke.getId().getFirst(), stroke.getId().getSecond() + diff --git a/extern/freestyle/style_modules/sketchy_multiple_parameterization.py b/extern/freestyle/style_modules/sketchy_multiple_parameterization.py new file mode 100755 index 00000000000..69e6f11751d --- /dev/null +++ b/extern/freestyle/style_modules/sketchy_multiple_parameterization.py @@ -0,0 +1,48 @@ +# +# Filename : sketchy_multiple_parameterization.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Builds sketchy strokes whose topology relies on a +# parameterization that covers the complete lines (visible+invisible) +# whereas only the visible portions are actually drawn +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## 0: don't restrict to selection +Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(3,0)) +shaders_list = [ + SamplingShader(2), + SpatialNoiseShader(15, 120, 2, 1, 1), + IncreasingThicknessShader(5, 30), + SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1), + IncreasingColorShader(0,0.2,0,1,0.2,0.7,0.2,1), + TextureAssignerShader(6), + pyHLRShader() + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/sketchy_topology_broken.py b/extern/freestyle/style_modules/sketchy_topology_broken.py new file mode 100755 index 00000000000..c1cefedfad2 --- /dev/null +++ b/extern/freestyle/style_modules/sketchy_topology_broken.py @@ -0,0 +1,89 @@ +# +# Filename : sketchy_topology_broken.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The topology of the strokes is, first, built +# independantly from the 3D topology of objects, +# and, second, so as to chain several times the same ViewEdge. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +## Backbone stretcher that leaves cusps intact to avoid cracks +class pyBackboneStretcherNoCuspShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherNoCuspShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + p0 = v0.getPoint() + p1 = v1.getPoint() + d1 = p0-p1 + d1 = d1/d1.norm() + newFirst = p0+d1*float(self._l) + v0.SetPoint(newFirst) + else: + print "got a v0 cusp" + vn_1 = itn_1.getObject() + vn = itn.getObject() + if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + pn = vn.getPoint() + pn_1 = vn_1.getPoint() + dn = pn-pn_1 + dn = dn/dn.norm() + newLast = pn+dn*float(self._l) + vn.SetPoint(newLast) + else: + print "got a vn cusp" + + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## Chain 3 times each ViewEdge indpendantly from the +## initial objects topology +Operators.bidirectionalChain(pySketchyChainingIterator(3)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(6, 120, 2, 1, 1), + IncreasingThicknessShader(4, 10), + SmoothingShader(100, 0.1, 0, 0.2, 0, 0, 0, 1), + pyBackboneStretcherNoCuspShader(20), + #ConstantColorShader(0.0,0.0,0.0) + IncreasingColorShader(0.2,0.2,0.2,1,0.5,0.5,0.5,1), + #IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/sketchy_topology_preserved.py b/extern/freestyle/style_modules/sketchy_topology_preserved.py new file mode 100755 index 00000000000..bc56a272bd5 --- /dev/null +++ b/extern/freestyle/style_modules/sketchy_topology_preserved.py @@ -0,0 +1,49 @@ +# +# Filename : sketchy_topology_preserved.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The topology of the strokes is built +# so as to chain several times the same ViewEdge. +# The topology of the objects is preserved +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from PredicatesU1D import * +from shaders import * + +upred = QuantitativeInvisibilityUP1D(0) +Operators.select(upred) +Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(3,1)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(20, 220, 2, 1, 1), + IncreasingThicknessShader(4, 8), + SmoothingShader(300, 0.05, 0, 0.2, 0, 0, 0, 0.5), + ConstantColorShader(0.6,0.2,0.0), + TextureAssignerShader(4), + ] + +Operators.create(TrueUP1D(), shaders_list) + diff --git a/extern/freestyle/style_modules/split_at_highest_2d_curvatures.py b/extern/freestyle/style_modules/split_at_highest_2d_curvatures.py new file mode 100755 index 00000000000..0f42080292b --- /dev/null +++ b/extern/freestyle/style_modules/split_at_highest_2d_curvatures.py @@ -0,0 +1,40 @@ +# +# Filename : split_at_highest_2d_curvature.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# (most basic style module) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from Functions0D import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +func = pyInverseCurvature2DAngleF0D() +Operators.recursiveSplit(func, pyParameterUP0D(0.4,0.6), NotUP1D(pyHigherLengthUP1D(100)), 2) +shaders_list = [ConstantThicknessShader(10), IncreasingColorShader(1,0,0,1,0,1,0,1), TextureAssignerShader(3)] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/extern/freestyle/style_modules/split_at_tvertices.py b/extern/freestyle/style_modules/split_at_tvertices.py new file mode 100755 index 00000000000..dde586fd1f0 --- /dev/null +++ b/extern/freestyle/style_modules/split_at_tvertices.py @@ -0,0 +1,42 @@ +# +# Filename : split_at_tvertices.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws strokes that starts and stops at Tvertices (visible or not) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from Functions0D import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +start = pyVertexNatureUP0D(T_VERTEX) +## use the same predicate to decide where to start and where to stop +## the strokes: +Operators.sequentialSplit(start, start, 10) +shaders_list = [ConstantThicknessShader(5), IncreasingColorShader(1,0,0,1,0,1,0,1), TextureAssignerShader(3)] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/extern/freestyle/style_modules/stroke_texture.py b/extern/freestyle/style_modules/stroke_texture.py new file mode 100755 index 00000000000..d6c753bf9e6 --- /dev/null +++ b/extern/freestyle/style_modules/stroke_texture.py @@ -0,0 +1,43 @@ +# +# Filename : stroke_texture.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * +from ChainingIterators import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(3), + BezierCurveShader(4), + StrokeTextureShader("washbrushAlpha.bmp", Stroke.DRY_MEDIUM, 1), + ConstantThicknessShader(40), + ConstantColorShader(0,0,0,1), + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/suggestive.py b/extern/freestyle/style_modules/suggestive.py new file mode 100755 index 00000000000..99a419ca23f --- /dev/null +++ b/extern/freestyle/style_modules/suggestive.py @@ -0,0 +1,43 @@ +# +# Filename : suggestive.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the suggestive contours. +# ***** The suggestive contours must be enabled +# in the options dialog ***** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from PredicatesU1D import * +from shaders import * + +upred = AndUP1D(pyNatureUP1D(SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + IncreasingThicknessShader(1, 3), + ConstantColorShader(0.2,0.2,0.2, 1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/thickness_fof_depth_discontinuity.py b/extern/freestyle/style_modules/thickness_fof_depth_discontinuity.py new file mode 100755 index 00000000000..06687fd9a00 --- /dev/null +++ b/extern/freestyle/style_modules/thickness_fof_depth_discontinuity.py @@ -0,0 +1,62 @@ +# +# Filename : thickness_fof_depth_discontinuity.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +class pyDepthDiscontinuityThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = float(min) + self.__max = float(max) + self.__func = ZDiscontinuityF0D() + def getName(self): + return "pyDepthDiscontinuityThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min=0.0 + z_max=1.0 + a = (self.__max - self.__min)/(z_max-z_min) + b = (self.__min*z_max-self.__max*z_min)/(z_max-z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + thickness = a*z+b + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(1), + ConstantThicknessShader(3), + ConstantColorShader(0.0,0.0,0.0), + pyDepthDiscontinuityThicknessShader(0.8, 6) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/extern/freestyle/style_modules/tipremover.py b/extern/freestyle/style_modules/tipremover.py new file mode 100755 index 00000000000..b87eb7a573a --- /dev/null +++ b/extern/freestyle/style_modules/tipremover.py @@ -0,0 +1,42 @@ +# +# Filename : tipremover.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Removes strokes extremities +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(5), + ConstantThicknessShader(3), + ConstantColorShader(0,0,0), + TipRemoverShader(20) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/extern/freestyle/style_modules/tvertex_remover.py b/extern/freestyle/style_modules/tvertex_remover.py new file mode 100755 index 00000000000..b55754381f7 --- /dev/null +++ b/extern/freestyle/style_modules/tvertex_remover.py @@ -0,0 +1,42 @@ +# +# Filename : tvertex_remover.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Removes TVertices +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + IncreasingThicknessShader(3, 5), + ConstantColorShader(0.2,0.2,0.2, 1), + SamplingShader(10.0), + pyTVertexRemoverShader() + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/extern/freestyle/style_modules/uniformpruning_zsort.py b/extern/freestyle/style_modules/uniformpruning_zsort.py new file mode 100755 index 00000000000..7e719417af0 --- /dev/null +++ b/extern/freestyle/style_modules/uniformpruning_zsort.py @@ -0,0 +1,40 @@ +from Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from PredicatesB1D import * +from Functions0D import * +from Functions1D import * +from shaders import * + +class pyDensityUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, integration = MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = threshold + self._integration = integration + self._func = DensityF1D(self._wsize, self._integration, sampling) + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + d = self._func(inter) + print "For Chain ", inter.getId().getFirst(), inter.getId().getSecond(), "density is ", d + if(d < self._threshold): + return 1 + return 0 + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator()) +#Operators.sequentialSplit(pyVertexNatureUP0D(VIEW_VERTEX), 2) +Operators.sort(pyZBP1D()) +shaders_list = [ + StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, 0), + ConstantThicknessShader(3), + SamplingShader(5.0), + ConstantColorShader(0,0,0,1) + ] +Operators.create(pyDensityUP1D(2,0.05, MEAN,4), shaders_list) +#Operators.create(pyDensityFunctorUP1D(8,0.03, pyGetInverseProjectedZF1D(), 0,1, MEAN), shaders_list) + diff --git a/extern/freestyle/style_modules/vector.py b/extern/freestyle/style_modules/vector.py new file mode 100755 index 00000000000..039f262546b --- /dev/null +++ b/extern/freestyle/style_modules/vector.py @@ -0,0 +1,241 @@ +# This module defines 3d geometrical vectors with the standard +# operations on them. +# +# Written by: Konrad Hinsen +# Last revision: 1996-1-26 +# + +"""This module defines three-dimensional geometrical vectors. Vectors support +the usual mathematical operations (v1, v2: vectors, s: scalar): + v1+v2 addition + v1-v2 subtraction + v1*v2 scalar product + s*v1 multiplication with a scalar + v1/s division by a scalar + v1.cross(v2) cross product + v1.length() length + v1.normal() normal vector in direction of v1 + v1.angle(v2) angle between two vectors + v1.x(), v1[0] first element + v1.y(), v1[1] second element + v1.z(), v1[2] third element + +The module offers the following items for export: + Vec3D(x,y,z) the constructor for vectors + isVector(x) a type check function + ex, ey, ez unit vectors along the x-, y-, and z-axes (predefined constants) + +Note: vector elements can be any kind of numbers on which the operations +addition, subtraction, multiplication, division, comparison, sqrt, and acos +are defined. Integer elements are treated as floating point elements. +""" + +import math, types + +class Vec3: + + isVec3 = 1 + + def __init__(self, x=0., y=0., z=0.): + self.data = [x,y,z] + + def __repr__(self): + return 'Vec3(%s,%s,%s)' % (`self.data[0]`,\ + `self.data[1]`,`self.data[2]`) + + def __str__(self): + return `self.data` + + def __add__(self, other): + return Vec3(self.data[0]+other.data[0],\ + self.data[1]+other.data[1],self.data[2]+other.data[2]) + __radd__ = __add__ + + def __neg__(self): + return Vec3(-self.data[0], -self.data[1], -self.data[2]) + + def __sub__(self, other): + return Vec3(self.data[0]-other.data[0],\ + self.data[1]-other.data[1],self.data[2]-other.data[2]) + + def __rsub__(self, other): + return Vec3(other.data[0]-self.data[0],\ + other.data[1]-self.data[1],other.data[2]-self.data[2]) + + def __mul__(self, other): + if isVec3(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec3(self.data[0]*other, self.data[1]*other, + self.data[2]*other) + + def __rmul__(self, other): + if isVec3(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec3(other*self.data[0], other*self.data[1], + other*self.data[2]) + + def __div__(self, other): + if isVec3(other): + raise TypeError, "Can't divide by a vector" + else: + return Vec3(_div(self.data[0],other), _div(self.data[1],other), + _div(self.data[2],other)) + + def __rdiv__(self, other): + raise TypeError, "Can't divide by a vector" + + def __cmp__(self, other): + return cmp(self.data[0],other.data[0]) \ + or cmp(self.data[1],other.data[1]) \ + or cmp(self.data[2],other.data[2]) + + def __getitem__(self, index): + return self.data[index] + + def x(self): + return self.data[0] + def y(self): + return self.data[1] + def z(self): + return self.data[2] + + def length(self): + return math.sqrt(self*self) + + def normal(self): + len = self.length() + if len == 0: + raise ZeroDivisionError, "Can't normalize a zero-length vector" + return self/len + + def cross(self, other): + if not isVec3(other): + raise TypeError, "Cross product with non-vector" + return Vec3(self.data[1]*other.data[2]-self.data[2]*other.data[1], + self.data[2]*other.data[0]-self.data[0]*other.data[2], + self.data[0]*other.data[1]-self.data[1]*other.data[0]) + + def angle(self, other): + if not isVec3(other): + raise TypeError, "Angle between vector and non-vector" + cosa = (self*other)/(self.length()*other.length()) + cosa = max(-1.,min(1.,cosa)) + return math.acos(cosa) + + +class Vec2: + + isVec2 = 1 + + def __init__(self, x=0., y=0.): + self.data = [x,y] + + def __repr__(self): + return 'Vec2(%s,%s,%s)' % (`self.data[0]`,\ + `self.data[1]`) + + def __str__(self): + return `self.data` + + def __add__(self, other): + return Vec2(self.data[0]+other.data[0],\ + self.data[1]+other.data[1]) + __radd__ = __add__ + + def __neg__(self): + return Vec2(-self.data[0], -self.data[1]) + + def __sub__(self, other): + return Vec2(self.data[0]-other.data[0],\ + self.data[1]-other.data[1]) + + def __rsub__(self, other): + return Vec2(other.data[0]-self.data[0],\ + other.data[1]-self.data[1]) + + def __mul__(self, other): + if isVec2(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec2(self.data[0]*other, self.data[1]*other) + + def __rmul__(self, other): + if isVec2(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec2(other*self.data[0], other*self.data[1]) + + def __div__(self, other): + if isVec2(other): + raise TypeError, "Can't divide by a vector" + else: + return Vec2(_div(self.data[0],other), _div(self.data[1],other)) + + def __rdiv__(self, other): + raise TypeError, "Can't divide by a vector" + + def __cmp__(self, other): + return cmp(self.data[0],other.data[0]) \ + or cmp(self.data[1],other.data[1]) + + def __getitem__(self, index): + return self.data[index] + + def x(self): + return self.data[0] + def y(self): + return self.data[1] + + def length(self): + return math.sqrt(self*self) + + def normal(self): + len = self.length() + if len == 0: + raise ZeroDivisionError, "Can't normalize a zero-length vector" + return self/len + + #def cross(self, other): +# if not isVec2(other): +# raise TypeError, "Cross product with non-vector" +# return Vec2(self.data[1]*other.data[2]-self.data[2]*other.data[1], +# self.data[2]*other.data[0]-self.data[0]*other.data[2], +# self.data[0]*other.data[1]-self.data[1]*other.data[0]) + + def angle(self, other): + if not isVec2(other): + raise TypeError, "Angle between vector and non-vector" + cosa = (self*other)/(self.length()*other.length()) + cosa = max(-1.,min(1.,cosa)) + return math.acos(cosa) + + + +# Type check + +def isVec3(x): + return hasattr(x,'isVec3') + +def isVec2(x): + return hasattr(x,'isVec2') + +# "Correct" division for arbitrary number types + +def _div(a,b): + if type(a) == types.IntType and type(b) == types.IntType: + return float(a)/float(b) + else: + return a/b + + +# Some useful constants + +ex = Vec3(1.,0.,0.) +ey = Vec3(0.,1.,0.) +ez = Vec3(0.,0.,1.) From 102868467b619734f985718c4b1e8a483c56e911 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 5 May 2008 17:28:14 +0000 Subject: [PATCH 088/430] lib3ds, swig added to extern/freestyle --- extern/freestyle/SConscript | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 extern/freestyle/SConscript diff --git a/extern/freestyle/SConscript b/extern/freestyle/SConscript new file mode 100644 index 00000000000..e69de29bb2d From 914a4d1a6c39b90ca631fa82742097749236322d Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 5 May 2008 19:26:10 +0000 Subject: [PATCH 089/430] soc-2008-mxcurioni: lib3ds compiles as an external library --- SConstruct | 2 +- config/darwin-config.py | 2 +- extern/SConscript | 3 +++ extern/freestyle/SConscript | 0 tools/Blender.py | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) delete mode 100644 extern/freestyle/SConscript diff --git a/SConstruct b/SConstruct index bb8773329b2..90092c51573 100644 --- a/SConstruct +++ b/SConstruct @@ -269,7 +269,7 @@ if not quickie and do_clean: print "clean dir %s"%(B.root_build_dir+dir) shutil.rmtree(B.root_build_dir+dir) for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', - 'extern/xvidcore/build/generic/platform.inc']: + 'extern/xvidcore/build/generic/platform.inc','extern/freestyle/lib3ds/Makefile']: if os.path.exists(confile): print "clean file %s"%confile os.remove(confile) diff --git a/config/darwin-config.py b/config/darwin-config.py index 071a245202b..856317cd627 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -162,7 +162,7 @@ WITH_BF_YAFRAY = 'true' WITH_BF_FREESTYLE = 'true' BF_FREESTYLE = '#extern/freestyle' -BF_FREESTYLE_SRC = '${BF_FREESTYLE}/src' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' BF_SWIG = '${BF_FREESTYLE}/swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' diff --git a/extern/SConscript b/extern/SConscript index 09eaf080c28..8ab451a8024 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -9,6 +9,9 @@ if env['WITH_BF_GAMEENGINE']: if env['WITH_BF_BULLET']: SConscript(['bullet2/src/SConscript']) +if env['WITH_BF_FREESTYLE']: + SConscript(['freestyle/lib3ds/SConscript']) + if env['WITH_BF_INTERNATIONAL']: SConscript(['bFTGL/SConscript']) diff --git a/extern/freestyle/SConscript b/extern/freestyle/SConscript deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tools/Blender.py b/tools/Blender.py index e4d143935a3..17010fcd308 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -163,7 +163,7 @@ def setup_syslibs(lenv): syslibs += Split(lenv['BF_OPENEXR_LIB']) if lenv['WITH_BF_FFMPEG']: syslibs += Split(lenv['BF_FFMPEG_LIB']) - if lenv['WITH_BF_FREESTYLE']: + if lenv['WITH_BF_FREESTYLE']: syslibs += Split(lenv['BF_LIB3DS_LIB']) syslibs += Split(lenv['BF_SDL_LIB']) if not lenv['WITH_BF_STATICOPENGL']: From 959f1a0f92f09c08de88626e9958ab1cca37e02e Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 6 May 2008 17:23:27 +0000 Subject: [PATCH 090/430] soc-2008-mxcurioni: swig compiles as independent library --- SConstruct | 5 ++++- config/darwin-config.py | 1 + config/linux2-config.py | 10 ++++++++++ config/linuxcross-config.py | 12 ++++++++++++ config/openbsd3-config.py | 10 ++++++++++ config/sunos5-config.py | 10 ++++++++++ config/win32-mingw-config.py | 10 ++++++++++ config/win32-vc-config.py | 10 ++++++++++ extern/SConscript | 1 + source/blender/freestyle/SConscript | 24 +++++++++++++++--------- tools/btools.py | 5 +++-- 11 files changed, 86 insertions(+), 12 deletions(-) diff --git a/SConstruct b/SConstruct index 90092c51573..341638c0e0c 100644 --- a/SConstruct +++ b/SConstruct @@ -269,7 +269,7 @@ if not quickie and do_clean: print "clean dir %s"%(B.root_build_dir+dir) shutil.rmtree(B.root_build_dir+dir) for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak', - 'extern/xvidcore/build/generic/platform.inc','extern/freestyle/lib3ds/Makefile']: + 'extern/xvidcore/build/generic/platform.inc','extern/freestyle/lib3ds/Makefile','extern/freestyle/swig/Makefile']: if os.path.exists(confile): print "clean file %s"%confile os.remove(confile) @@ -340,12 +340,15 @@ if env['WITH_BF_PLAYER']: playerlist = B.create_blender_liblist(env, 'player') env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer') + + ##### Now define some targets #------------ INSTALL #-- binaries + blenderinstall = [] if env['OURPLATFORM']=='darwin': for prg in B.program_list: diff --git a/config/darwin-config.py b/config/darwin-config.py index 856317cd627..9ceb1d1644b 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -164,6 +164,7 @@ WITH_BF_FREESTYLE = 'true' BF_FREESTYLE = '#extern/freestyle' BF_FREESTYLE_SRC = '#source/blender/freestyle/src' BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' diff --git a/config/linux2-config.py b/config/linux2-config.py index 4d8b5c97512..3c8a48d12bc 100644 --- a/config/linux2-config.py +++ b/config/linux2-config.py @@ -86,6 +86,16 @@ BF_SOLID_LIB = 'extern_solid' WITH_BF_YAFRAY = 'true' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py index e6c4e8769b4..886b9f93f3f 100644 --- a/config/linuxcross-config.py +++ b/config/linuxcross-config.py @@ -6,6 +6,18 @@ BF_VERSE_INCLUDE = "#extern/verse/dist" WITH_BF_YAFRAY = 'true' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + +########################### + BF_PYTHON = LIBDIR + '/python' BF_PYTHON_VERSION = '2.5' BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py index f7f254973af..ad4891a0098 100644 --- a/config/openbsd3-config.py +++ b/config/openbsd3-config.py @@ -80,6 +80,16 @@ BF_SOLID_LIB = 'extern_solid' WITH_BF_YAFRAY = 'true' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr diff --git a/config/sunos5-config.py b/config/sunos5-config.py index b3ca0e267ff..6581ad2b692 100644 --- a/config/sunos5-config.py +++ b/config/sunos5-config.py @@ -82,6 +82,16 @@ BF_SOLID_LIB = 'extern_solid' WITH_BF_YAFRAY = 'true' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index d9fd6ce8d4f..b0a3c3ae18d 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -97,6 +97,16 @@ BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE' WITH_BF_YAFRAY = 'true' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 32b6597b5d5..849b153378f 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -108,6 +108,16 @@ WITH_BF_YAFRAY = 'true' WITH_BF_BINRELOC = 'false' +WITH_BF_FREESTYLE = 'true' +BF_FREESTYLE = '#extern/freestyle' +BF_FREESTYLE_SRC = '#source/blender/freestyle/src' +BF_SWIG = '${BF_FREESTYLE}/swig' +BF_SWIG_LIB = 'extern_swig' +BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' +BF_LIB3DS_LIB = 'extern_lib3ds' +BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' +BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' + #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr #BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr diff --git a/extern/SConscript b/extern/SConscript index 8ab451a8024..7997981b7f2 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -11,6 +11,7 @@ if env['WITH_BF_BULLET']: if env['WITH_BF_FREESTYLE']: SConscript(['freestyle/lib3ds/SConscript']) + SConscript(['freestyle/swig/SConscript']) if env['WITH_BF_INTERNATIONAL']: SConscript(['bFTGL/SConscript']) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index ce8b9d0f224..7e859e58c58 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -1,10 +1,16 @@ #!/usr/bin/python -# import sys -# Import ('env') -# -# sources = [''] -# -# incs = ' ' -# incs += ' ' + env['BF_LIB3DS_INC'] -# -# env.BlenderLib ( 'bf_freestyle', sources, Split(incs), Split(defs), libtype=['international','player'], priority=[0, 205] ) +import sys +Import ('env') + +sources = [] +defs = [] + +incs = '#/extern/freestyle/lib3ds #/extern/freestyle/swig' +incs += ' ' + env['BF_LIB3DS_INC'] + +# env.BlenderLib (libname="bf_freestyle", +# sources=sources, +# includes=Split(incs), +# defines=defs, +# libtype=['blender'], +# priority = [15] ) \ No newline at end of file diff --git a/tools/btools.py b/tools/btools.py index 8158bf6cfcc..deab2e687b6 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -66,7 +66,7 @@ def validate_arguments(args, bc): 'BF_FANCY', 'BF_QUIET', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', - 'BF_WITH_BF_FREESTYLE', 'BF_FREESTYLE', 'BF_FREESTYLE_SRC', 'BF_SWIG', 'BF_LIB3DS', 'BF_LIB3DS_LIB', 'BF_LIB3DS_LIBPATH', 'BF_LIB3DS_INC' + 'BF_WITH_BF_FREESTYLE', 'BF_FREESTYLE', 'BF_FREESTYLE_SRC', 'BF_SWIG', 'BF_SWIG_LIB', 'BF_LIB3DS', 'BF_LIB3DS_LIB', 'BF_LIB3DS_LIBPATH', 'BF_LIB3DS_INC' ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', @@ -242,7 +242,8 @@ def read_opts(cfg, args): ('BF_FREESTYLE', 'Freestyle base path', ''), ('BF_FREESTYLE_SRC', 'Freestyle source path', ''), ('BF_SWIG', 'SWIG base path', ''), - ('BF_LIB3DS', 'SWIG base path', ''), + ('BF_SWIG_LIB', 'SWIG library', ''), + ('BF_LIB3DS', 'lib3ds base path', ''), ('BF_LIB3DS_LIB', 'lib3ds library', ''), ('BF_LIB3DS_LIBPATH', 'lib3ds library path', ''), ('BF_LIB3DS_INC', 'lib3ds include path', ''), From cf2e1e2857cfc5b3c2848c7fc6c9d919ac72fabb Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 7 May 2008 03:37:16 +0000 Subject: [PATCH 091/430] soc=2008-mxcurioni: reverted back to compiling swig as a binary, instead of as a library --- tools/Blender.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/Blender.py b/tools/Blender.py index 17010fcd308..92ee1e3e6ec 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -462,7 +462,8 @@ class BlenderEnvironment(SConsEnvironment): program_list.append(prog) if lenv['OURPLATFORM']=='darwin': lenv['BINARYKIND'] = binarykind - lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print)) + if progname != "swig": + lenv.AddPostAction(prog,Action(AppIt,strfunction=my_appit_print)) return prog def Glob(lenv, pattern): From 3a36304bd908f15a5a5605e6939698e73b41e8b7 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 7 May 2008 20:06:28 +0000 Subject: [PATCH 092/430] Resolved other bad files in branch, had to kick old bullet, will have to copy from trunk --- extern/bullet2/CMakeLists.txt | 46 - extern/bullet2/Makefile | 64 - .../bullet2/make/msvc_7_0/Bullet_vc7.vcproj | 921 ------------ extern/bullet2/readme.txt | 12 - extern/bullet2/src/Bullet-C-Api.h | 37 - .../BroadphaseCollision/btAxisSweep3.cpp | 38 - .../BroadphaseCollision/btAxisSweep3.h | 880 ------------ .../btBroadphaseInterface.h | 46 - .../BroadphaseCollision/btBroadphaseProxy.cpp | 17 - .../BroadphaseCollision/btBroadphaseProxy.h | 232 --- .../btCollisionAlgorithm.cpp | 23 - .../btCollisionAlgorithm.h | 77 - .../BroadphaseCollision/btDispatcher.cpp | 22 - .../BroadphaseCollision/btDispatcher.h | 99 -- .../btMultiSapBroadphase.cpp | 204 --- .../btMultiSapBroadphase.h | 119 -- .../btOverlappingPairCache.cpp | 474 ------ .../btOverlappingPairCache.h | 323 ----- .../btOverlappingPairCallback.h | 37 - .../btSimpleBroadphase.cpp | 312 ---- .../BroadphaseCollision/btSimpleBroadphase.h | 147 -- .../src/BulletCollision/CMakeLists.txt | 68 - .../SphereTriangleDetector.cpp | 200 --- .../SphereTriangleDetector.h | 49 - .../btCollisionConfiguration.h | 47 - .../CollisionDispatch/btCollisionCreateFunc.h | 46 - .../btCollisionDispatcher.cpp | 287 ---- .../CollisionDispatch/btCollisionDispatcher.h | 145 -- .../CollisionDispatch/btCollisionObject.cpp | 62 - .../CollisionDispatch/btCollisionObject.h | 349 ----- .../CollisionDispatch/btCollisionWorld.cpp | 370 ----- .../CollisionDispatch/btCollisionWorld.h | 259 ---- .../btCompoundCollisionAlgorithm.cpp | 142 -- .../btCompoundCollisionAlgorithm.h | 67 - .../btConvexConcaveCollisionAlgorithm.cpp | 314 ---- .../btConvexConcaveCollisionAlgorithm.h | 113 -- .../btConvexConvexAlgorithm.cpp | 249 ---- .../btConvexConvexAlgorithm.h | 77 - .../btDefaultCollisionConfiguration.cpp | 237 --- .../btDefaultCollisionConfiguration.h | 87 -- .../btEmptyCollisionAlgorithm.cpp | 34 - .../btEmptyCollisionAlgorithm.h | 50 - .../CollisionDispatch/btManifoldResult.cpp | 114 -- .../CollisionDispatch/btManifoldResult.h | 102 -- .../btSimulationIslandManager.cpp | 359 ----- .../btSimulationIslandManager.h | 69 - .../btSphereBoxCollisionAlgorithm.cpp | 260 ---- .../btSphereBoxCollisionAlgorithm.h | 67 - .../btSphereSphereCollisionAlgorithm.cpp | 93 -- .../btSphereSphereCollisionAlgorithm.h | 59 - .../btSphereTriangleCollisionAlgorithm.cpp | 82 -- .../btSphereTriangleCollisionAlgorithm.h | 62 - .../CollisionDispatch/btUnionFind.cpp | 84 -- .../CollisionDispatch/btUnionFind.h | 124 -- .../CollisionShapes/btBoxShape.cpp | 54 - .../CollisionShapes/btBoxShape.h | 323 ----- .../btBvhTriangleMeshShape.cpp | 200 --- .../CollisionShapes/btBvhTriangleMeshShape.h | 90 -- .../CollisionShapes/btCapsuleShape.cpp | 146 -- .../CollisionShapes/btCapsuleShape.h | 60 - .../CollisionShapes/btCollisionMargin.h | 26 - .../CollisionShapes/btCollisionShape.cpp | 85 -- .../CollisionShapes/btCollisionShape.h | 94 -- .../CollisionShapes/btCompoundShape.cpp | 107 -- .../CollisionShapes/btCompoundShape.h | 136 -- .../CollisionShapes/btConcaveShape.cpp | 28 - .../CollisionShapes/btConcaveShape.h | 50 - .../CollisionShapes/btConeShape.cpp | 133 -- .../CollisionShapes/btConeShape.h | 103 -- .../CollisionShapes/btConvexHullShape.cpp | 179 --- .../CollisionShapes/btConvexHullShape.h | 77 - .../CollisionShapes/btConvexInternalShape.cpp | 78 - .../CollisionShapes/btConvexInternalShape.h | 99 -- .../CollisionShapes/btConvexShape.cpp | 18 - .../CollisionShapes/btConvexShape.h | 77 - .../btConvexTriangleMeshShape.cpp | 205 --- .../btConvexTriangleMeshShape.h | 55 - .../CollisionShapes/btCylinderShape.cpp | 206 --- .../CollisionShapes/btCylinderShape.h | 138 -- .../CollisionShapes/btEmptyShape.cpp | 49 - .../CollisionShapes/btEmptyShape.h | 70 - .../btHeightfieldTerrainShape.cpp | 339 ----- .../btHeightfieldTerrainShape.h | 88 -- .../CollisionShapes/btMinkowskiSumShape.cpp | 57 - .../CollisionShapes/btMinkowskiSumShape.h | 62 - .../CollisionShapes/btMultiSphereShape.cpp | 148 -- .../CollisionShapes/btMultiSphereShape.h | 74 - .../CollisionShapes/btOptimizedBvh.cpp | 1181 --------------- .../CollisionShapes/btOptimizedBvh.h | 393 ----- .../btPolyhedralConvexShape.cpp | 148 -- .../CollisionShapes/btPolyhedralConvexShape.h | 93 -- .../CollisionShapes/btSphereShape.cpp | 77 - .../CollisionShapes/btSphereShape.h | 65 - .../CollisionShapes/btStaticPlaneShape.cpp | 105 -- .../CollisionShapes/btStaticPlaneShape.h | 61 - .../btStridingMeshInterface.cpp | 124 -- .../CollisionShapes/btStridingMeshInterface.h | 89 -- .../CollisionShapes/btTetrahedronShape.cpp | 195 --- .../CollisionShapes/btTetrahedronShape.h | 75 - .../CollisionShapes/btTriangleBuffer.cpp | 42 - .../CollisionShapes/btTriangleBuffer.h | 61 - .../CollisionShapes/btTriangleCallback.cpp | 28 - .../CollisionShapes/btTriangleCallback.h | 40 - .../btTriangleIndexVertexArray.cpp | 78 - .../btTriangleIndexVertexArray.h | 105 -- .../CollisionShapes/btTriangleMesh.cpp | 60 - .../CollisionShapes/btTriangleMesh.h | 75 - .../CollisionShapes/btTriangleMeshShape.cpp | 202 --- .../CollisionShapes/btTriangleMeshShape.h | 80 -- .../CollisionShapes/btTriangleShape.h | 179 --- .../CollisionShapes/btUniformScalingShape.cpp | 114 -- .../CollisionShapes/btUniformScalingShape.h | 86 -- extern/bullet2/src/BulletCollision/Doxyfile | 746 ---------- .../btContinuousConvexCollision.cpp | 210 --- .../btContinuousConvexCollision.h | 52 - .../NarrowPhaseCollision/btConvexCast.cpp | 20 - .../NarrowPhaseCollision/btConvexCast.h | 71 - .../btConvexPenetrationDepthSolver.h | 43 - .../btDiscreteCollisionDetectorInterface.h | 88 -- .../NarrowPhaseCollision/btGjkConvexCast.cpp | 174 --- .../NarrowPhaseCollision/btGjkConvexCast.h | 50 - .../NarrowPhaseCollision/btGjkEpa.cpp | 628 -------- .../NarrowPhaseCollision/btGjkEpa.h | 53 - .../btGjkEpaPenetrationDepthSolver.cpp | 50 - .../btGjkEpaPenetrationDepthSolver.h | 39 - .../btGjkPairDetector.cpp | 299 ---- .../NarrowPhaseCollision/btGjkPairDetector.h | 85 -- .../NarrowPhaseCollision/btManifoldPoint.h | 99 -- .../btMinkowskiPenetrationDepthSolver.cpp | 333 ----- .../btMinkowskiPenetrationDepthSolver.h | 37 - .../btPersistentManifold.cpp | 248 ---- .../btPersistentManifold.h | 179 --- .../NarrowPhaseCollision/btPointCollector.h | 61 - .../btRaycastCallback.cpp | 101 -- .../NarrowPhaseCollision/btRaycastCallback.h | 42 - .../btSimplexSolverInterface.h | 64 - .../btSubSimplexConvexCast.cpp | 139 -- .../btSubSimplexConvexCast.h | 50 - .../btVoronoiSimplexSolver.cpp | 607 -------- .../btVoronoiSimplexSolver.h | 157 -- .../src/BulletCollision/ibmsdk/Makefile | 95 -- .../bullet2/src/BulletDynamics/CMakeLists.txt | 22 - .../btConeTwistConstraint.cpp | 286 ---- .../ConstraintSolver/btConeTwistConstraint.h | 126 -- .../ConstraintSolver/btConstraintSolver.h | 52 - .../ConstraintSolver/btContactConstraint.cpp | 417 ------ .../ConstraintSolver/btContactConstraint.h | 122 -- .../ConstraintSolver/btContactSolverInfo.h | 51 - .../btGeneric6DofConstraint.cpp | 497 ------- .../btGeneric6DofConstraint.h | 433 ------ .../ConstraintSolver/btHingeConstraint.cpp | 400 ------ .../ConstraintSolver/btHingeConstraint.h | 130 -- .../ConstraintSolver/btJacobianEntry.h | 156 -- .../btPoint2PointConstraint.cpp | 117 -- .../btPoint2PointConstraint.h | 89 -- .../btSequentialImpulseConstraintSolver.cpp | 1266 ----------------- .../btSequentialImpulseConstraintSolver.h | 126 -- .../btSolve2LinearConstraint.cpp | 255 ---- .../btSolve2LinearConstraint.h | 107 -- .../ConstraintSolver/btSolverBody.h | 76 - .../ConstraintSolver/btSolverConstraint.h | 69 - .../ConstraintSolver/btTypedConstraint.cpp | 56 - .../ConstraintSolver/btTypedConstraint.h | 112 -- .../BulletDynamics/Dynamics/Bullet-C-API.cpp | 120 -- .../BulletDynamics/Dynamics/Bullet-C-Api.cpp | 91 -- .../Dynamics/btContinuousDynamicsWorld.cpp | 194 --- .../Dynamics/btContinuousDynamicsWorld.h | 46 - .../Dynamics/btDiscreteDynamicsWorld.cpp | 1004 ------------- .../Dynamics/btDiscreteDynamicsWorld.h | 164 --- .../BulletDynamics/Dynamics/btDynamicsWorld.h | 89 -- .../BulletDynamics/Dynamics/btRigidBody.cpp | 350 ----- .../src/BulletDynamics/Dynamics/btRigidBody.h | 385 ----- .../Dynamics/btSimpleDynamicsWorld.cpp | 217 --- .../Dynamics/btSimpleDynamicsWorld.h | 86 -- .../Vehicle/btRaycastVehicle.cpp | 738 ---------- .../BulletDynamics/Vehicle/btRaycastVehicle.h | 201 --- .../Vehicle/btVehicleRaycaster.h | 35 - .../BulletDynamics/Vehicle/btWheelInfo.cpp | 56 - .../src/BulletDynamics/Vehicle/btWheelInfo.h | 116 -- .../src/BulletDynamics/ibmsdk/Makefile | 45 - extern/bullet2/src/CMakeLists.txt | 1 - extern/bullet2/src/LinearMath/CMakeLists.txt | 11 - extern/bullet2/src/LinearMath/btAabbUtil2.h | 125 -- .../src/LinearMath/btAlignedAllocator.cpp | 155 -- .../src/LinearMath/btAlignedAllocator.h | 94 -- .../src/LinearMath/btAlignedObjectArray.h | 386 ----- .../src/LinearMath/btDefaultMotionState.h | 38 - .../bullet2/src/LinearMath/btGeometryUtil.cpp | 178 --- .../bullet2/src/LinearMath/btGeometryUtil.h | 41 - extern/bullet2/src/LinearMath/btIDebugDraw.h | 102 -- extern/bullet2/src/LinearMath/btList.h | 73 - extern/bullet2/src/LinearMath/btMatrix3x3.h | 410 ------ extern/bullet2/src/LinearMath/btMinMax.h | 69 - extern/bullet2/src/LinearMath/btMotionState.h | 40 - extern/bullet2/src/LinearMath/btPoint3.h | 24 - .../bullet2/src/LinearMath/btPoolAllocator.h | 94 -- extern/bullet2/src/LinearMath/btQuadWord.h | 135 -- extern/bullet2/src/LinearMath/btQuaternion.h | 321 ----- extern/bullet2/src/LinearMath/btQuickprof.cpp | 38 - extern/bullet2/src/LinearMath/btQuickprof.h | 712 --------- extern/bullet2/src/LinearMath/btRandom.h | 42 - extern/bullet2/src/LinearMath/btScalar.h | 394 ----- extern/bullet2/src/LinearMath/btSimdMinMax.h | 41 - extern/bullet2/src/LinearMath/btStackAlloc.h | 115 -- extern/bullet2/src/LinearMath/btTransform.h | 200 --- .../bullet2/src/LinearMath/btTransformUtil.h | 142 -- extern/bullet2/src/LinearMath/btVector3.h | 452 ------ extern/bullet2/src/LinearMath/ibmsdk/Makefile | 30 - extern/bullet2/src/Makefile | 71 - extern/bullet2/src/SConscript | 98 -- extern/bullet2/src/btBulletCollisionCommon.h | 63 - extern/bullet2/src/btBulletDynamicsCommon.h | 44 - extern/bullet2/src/ibmsdk/Makefile | 10 - source/blender/include/BIF_imasel.h | 1 + source/blender/include/BSE_drawview.h | 2 +- source/blender/include/BSE_filesel.h | 1 + source/blender/makesdna/DNA_userdef_types.h | 5 +- 217 files changed, 6 insertions(+), 34741 deletions(-) delete mode 100644 extern/bullet2/CMakeLists.txt delete mode 100644 extern/bullet2/Makefile delete mode 100644 extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj delete mode 100644 extern/bullet2/readme.txt delete mode 100644 extern/bullet2/src/Bullet-C-Api.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp delete mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h delete mode 100644 extern/bullet2/src/BulletCollision/CMakeLists.txt delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp delete mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h delete mode 100644 extern/bullet2/src/BulletCollision/Doxyfile delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp delete mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h delete mode 100644 extern/bullet2/src/BulletCollision/ibmsdk/Makefile delete mode 100644 extern/bullet2/src/BulletDynamics/CMakeLists.txt delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h delete mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h delete mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h delete mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp delete mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h delete mode 100644 extern/bullet2/src/BulletDynamics/ibmsdk/Makefile delete mode 100644 extern/bullet2/src/CMakeLists.txt delete mode 100644 extern/bullet2/src/LinearMath/CMakeLists.txt delete mode 100644 extern/bullet2/src/LinearMath/btAabbUtil2.h delete mode 100644 extern/bullet2/src/LinearMath/btAlignedAllocator.cpp delete mode 100644 extern/bullet2/src/LinearMath/btAlignedAllocator.h delete mode 100644 extern/bullet2/src/LinearMath/btAlignedObjectArray.h delete mode 100644 extern/bullet2/src/LinearMath/btDefaultMotionState.h delete mode 100644 extern/bullet2/src/LinearMath/btGeometryUtil.cpp delete mode 100644 extern/bullet2/src/LinearMath/btGeometryUtil.h delete mode 100644 extern/bullet2/src/LinearMath/btIDebugDraw.h delete mode 100644 extern/bullet2/src/LinearMath/btList.h delete mode 100644 extern/bullet2/src/LinearMath/btMatrix3x3.h delete mode 100644 extern/bullet2/src/LinearMath/btMinMax.h delete mode 100644 extern/bullet2/src/LinearMath/btMotionState.h delete mode 100644 extern/bullet2/src/LinearMath/btPoint3.h delete mode 100755 extern/bullet2/src/LinearMath/btPoolAllocator.h delete mode 100644 extern/bullet2/src/LinearMath/btQuadWord.h delete mode 100644 extern/bullet2/src/LinearMath/btQuaternion.h delete mode 100644 extern/bullet2/src/LinearMath/btQuickprof.cpp delete mode 100644 extern/bullet2/src/LinearMath/btQuickprof.h delete mode 100644 extern/bullet2/src/LinearMath/btRandom.h delete mode 100644 extern/bullet2/src/LinearMath/btScalar.h delete mode 100644 extern/bullet2/src/LinearMath/btSimdMinMax.h delete mode 100644 extern/bullet2/src/LinearMath/btStackAlloc.h delete mode 100644 extern/bullet2/src/LinearMath/btTransform.h delete mode 100644 extern/bullet2/src/LinearMath/btTransformUtil.h delete mode 100644 extern/bullet2/src/LinearMath/btVector3.h delete mode 100644 extern/bullet2/src/LinearMath/ibmsdk/Makefile delete mode 100644 extern/bullet2/src/Makefile delete mode 100644 extern/bullet2/src/SConscript delete mode 100644 extern/bullet2/src/btBulletCollisionCommon.h delete mode 100644 extern/bullet2/src/btBulletDynamicsCommon.h delete mode 100644 extern/bullet2/src/ibmsdk/Makefile diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt deleted file mode 100644 index 19dc6e2ba77..00000000000 --- a/extern/bullet2/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurai, Erwin Coumans -# -# ***** END GPL/BL DUAL LICENSE BLOCK ***** - -SET(INC . src) - -FILE(GLOB SRC - src/LinearMath/*.cpp - src/BulletCollision/BroadphaseCollision/*.cpp - src/BulletCollision/CollisionShapes/*.cpp - src/BulletCollision/NarrowPhaseCollision/*.cpp - src/BulletCollision//CollisionDispatch/*.cpp - src/BulletDynamics/ConstraintSolver/*.cpp - src/BulletDynamics/Vehicle/*.cpp - src/BulletDynamics/Dynamics/*.cpp -) - -ADD_DEFINITIONS(-D_LIB) - -BLENDERLIB(extern_bullet "${SRC}" "${INC}") -#, libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) diff --git a/extern/bullet2/Makefile b/extern/bullet2/Makefile deleted file mode 100644 index be242c290ff..00000000000 --- a/extern/bullet2/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2002 by Hans Lambermont -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): -# -# ***** END GPL/BL DUAL LICENSE BLOCK ***** -LIBNAME = bullet2 -include nan_definitions.mk -SOURCEDIR = extern/$(LIBNAME) -DIR = $(OCGDIR)/extern/$(LIBNAME) -DIRS = src -DISTDIR = src - -BULLETDIRS = \ -LinearMath \ -BulletCollision/BroadphaseCollision \ -BulletCollision/CollisionShapes \ -BulletCollision/NarrowPhaseCollision \ -BulletCollision//CollisionDispatch \ -BulletDynamics/ConstraintSolver \ -BulletDynamics/Vehicle \ -BulletDynamics/Dynamics - -include nan_subdirs.mk - -CP = $(NANBLENDERHOME)/intern/tools/cpifdiff.sh - -install: all debug - @[ -d $(NAN_BULLET2) ] || mkdir -p $(NAN_BULLET2) - @[ -d $(NAN_BULLET2)/include ] || mkdir -p $(NAN_BULLET2)/include - @for i in $(BULLETDIRS); do \ - [ -d $(NAN_BULLET2)/include/$$i ] || mkdir -p $(NAN_BULLET2)/include/$$i; \ - $(CP) $(DISTDIR)/$$i/*.h $(NAN_BULLET2)/include/$$i; \ - done - @[ -d $(NAN_BULLET2)/lib ] || mkdir -p $(NAN_BULLET2)/lib - @$(CP) $(DISTDIR)/*.h $(NAN_BULLET2)/include - @$(CP) $(OCGDIR)/extern/bullet2/libbullet2.a $(NAN_BULLET2)/lib -ifeq ($(OS),darwin) - ranlib $(NAN_BULLET2)/lib/libbullet2.a -endif diff --git a/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj b/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj deleted file mode 100644 index 87a1e4546d1..00000000000 --- a/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj +++ /dev/null @@ -1,921 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extern/bullet2/readme.txt b/extern/bullet2/readme.txt deleted file mode 100644 index 4d1a4c11706..00000000000 --- a/extern/bullet2/readme.txt +++ /dev/null @@ -1,12 +0,0 @@ - -*** These files in extern/bullet2 are NOT part of the Blender build yet *** - -This is the new refactored version of Bullet physics library version 2.x - -Soon this will replace the old Bullet version in extern/bullet. -First the integration in Blender Game Engine needs to be updated. -Once that is done all build systems can be updated to use/build extern/bullet2 files. - -Questions? mail blender at erwincoumans.com, or check the bf-blender mailing list. -Thanks, -Erwin diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h deleted file mode 100644 index 078dcae63bb..00000000000 --- a/extern/bullet2/src/Bullet-C-Api.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* - Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. - Work in progress, functionality will be added on demand. - - If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h" -*/ - -#ifndef BULLET_C_API_H -#define BULLET_C_API_H - -#ifdef __cplusplus -extern "C" { -#endif - -double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]); - -#ifdef __cplusplus -} -#endif - -#endif //BULLET_C_API_H - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp deleted file mode 100644 index d7eea33ea41..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -//Bullet Continuous Collision Detection and Physics Library -//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - - -// -// btAxisSweep3 -// -// Copyright (c) 2006 Simon Hobbs -// -// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -#include "btAxisSweep3.h" - -#include - -btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache) -:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache) -{ - // 1 handle is reserved as sentinel - btAssert(maxHandles > 1 && maxHandles < 32767); - -} - - -bt32BitAxisSweep3::bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache ) -:btAxisSweep3Internal(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache) -{ - // 1 handle is reserved as sentinel - btAssert(maxHandles > 1 && maxHandles < 2147483647); -} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h deleted file mode 100644 index d36df6e6621..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h +++ /dev/null @@ -1,880 +0,0 @@ -//Bullet Continuous Collision Detection and Physics Library -//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -// -// btAxisSweep3.h -// -// Copyright (c) 2006 Simon Hobbs -// -// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. - -#ifndef AXIS_SWEEP_3_H -#define AXIS_SWEEP_3_H - -#include "LinearMath/btPoint3.h" -#include "LinearMath/btVector3.h" -#include "btOverlappingPairCache.h" -#include "btBroadphaseInterface.h" -#include "btBroadphaseProxy.h" -#include "btOverlappingPairCallback.h" - -//#define DEBUG_BROADPHASE 1 - -/// btAxisSweep3Internal is an internal template class that implements sweep and prune. -/// Dont use this class directly, use btAxisSweep3 or bt32BitAxisSweep3 instead. -template -class btAxisSweep3Internal : public btBroadphaseInterface -{ -protected: - - BP_FP_INT_TYPE m_bpHandleMask; - BP_FP_INT_TYPE m_handleSentinel; - -public: - - - class Edge - { - public: - BP_FP_INT_TYPE m_pos; // low bit is min/max - BP_FP_INT_TYPE m_handle; - - BP_FP_INT_TYPE IsMax() const {return m_pos & 1;} - }; - -public: - ATTRIBUTE_ALIGNED16(class) Handle : public btBroadphaseProxy - { - public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - - // indexes into the edge arrays - BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12 -// BP_FP_INT_TYPE m_uniqueId; - BP_FP_INT_TYPE m_pad; - - //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject - - SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;} - SIMD_FORCE_INLINE BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];} - }; // 24 bytes + 24 for Edge structures = 44 bytes total per entry - - -protected: - btPoint3 m_worldAabbMin; // overall system bounds - btPoint3 m_worldAabbMax; // overall system bounds - - btVector3 m_quantize; // scaling factor for quantization - - BP_FP_INT_TYPE m_numHandles; // number of active handles - BP_FP_INT_TYPE m_maxHandles; // max number of handles - Handle* m_pHandles; // handles pool - BP_FP_INT_TYPE m_firstFreeHandle; // free handles list - - Edge* m_pEdges[3]; // edge arrays for the 3 axes (each array has m_maxHandles * 2 + 2 sentinel entries) - - btOverlappingPairCache* m_pairCache; - - ///btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache. - btOverlappingPairCallback* m_userPairCallback; - - bool m_ownsPairCache; - - int m_invalidPair; - - // allocation/deallocation - BP_FP_INT_TYPE allocHandle(); - void freeHandle(BP_FP_INT_TYPE handle); - - - bool testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB); - -#ifdef DEBUG_BROADPHASE - void debugPrintAxis(int axis,bool checkCardinality=true); -#endif //DEBUG_BROADPHASE - - //Overlap* AddOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); - //void RemoveOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); - - void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const; - - void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); - void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); - void sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); - void sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps ); - -public: - - btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0); - - virtual ~btAxisSweep3Internal(); - - - virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - - BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher); - void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher); - void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher); - SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;} - - void processAllOverlappingPairs(btOverlapCallback* callback); - - //Broadphase Interface - virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher); - virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher); - - bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - btOverlappingPairCache* getOverlappingPairCache() - { - return m_pairCache; - } - const btOverlappingPairCache* getOverlappingPairCache() const - { - return m_pairCache; - } - - void setOverlappingPairUserCallback(btOverlappingPairCallback* pairCallback) - { - m_userPairCallback = pairCallback; - } - const btOverlappingPairCallback* getOverlappingPairUserCallback() const - { - return m_userPairCallback; - } -}; - -//////////////////////////////////////////////////////////////////// - - - - -#ifdef DEBUG_BROADPHASE -#include - -template -void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinality) -{ - int numEdges = m_pHandles[0].m_maxEdges[axis]; - printf("SAP Axis %d, numEdges=%d\n",axis,numEdges); - - int i; - for (i=0;im_handle); - int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis]; - char beginOrEnd; - beginOrEnd=pEdge->IsMax()?'E':'B'; - printf(" [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex); - } - - if (checkCardinality) - assert(numEdges == m_numHandles*2+1); -} -#endif //DEBUG_BROADPHASE - -template -btBroadphaseProxy* btAxisSweep3Internal::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher) -{ - (void)shapeType; - BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher); - - Handle* handle = getHandle(handleId); - - return handle; -} - - - -template -void btAxisSweep3Internal::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) -{ - Handle* handle = static_cast(proxy); - removeHandle(handle->m_uniqueId,dispatcher); -} - -template -void btAxisSweep3Internal::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher) -{ - Handle* handle = static_cast(proxy); - updateHandle(handle->m_uniqueId,aabbMin,aabbMax,dispatcher); - -} - - - - - -template -btAxisSweep3Internal::btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE maxHandles, btOverlappingPairCache* pairCache ) -:m_bpHandleMask(handleMask), -m_handleSentinel(handleSentinel), -m_pairCache(pairCache), -m_userPairCallback(0), -m_ownsPairCache(false), -m_invalidPair(0) -{ - if (!m_pairCache) - { - void* ptr = btAlignedAlloc(sizeof(btOverlappingPairCache),16); - m_pairCache = new(ptr) btOverlappingPairCache(); - m_ownsPairCache = true; - } - - //assert(bounds.HasVolume()); - - // init bounds - m_worldAabbMin = worldAabbMin; - m_worldAabbMax = worldAabbMax; - - btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin; - - BP_FP_INT_TYPE maxInt = m_handleSentinel; - - m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize; - - // allocate handles buffer and put all handles on free list - void* ptr = btAlignedAlloc(sizeof(Handle)*maxHandles,16); - m_pHandles = new(ptr) Handle[maxHandles]; - m_maxHandles = maxHandles; - m_numHandles = 0; - - // handle 0 is reserved as the null index, and is also used as the sentinel - m_firstFreeHandle = 1; - { - for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++) - m_pHandles[i].SetNextFree(i + 1); - m_pHandles[maxHandles - 1].SetNextFree(0); - } - - { - // allocate edge buffers - for (int i = 0; i < 3; i++) - { - void* ptr = btAlignedAlloc(sizeof(Edge)*maxHandles*2,16); - m_pEdges[i] = new(ptr) Edge[maxHandles * 2]; - } - } - //removed overlap management - - // make boundary sentinels - - m_pHandles[0].m_clientObject = 0; - - for (int axis = 0; axis < 3; axis++) - { - m_pHandles[0].m_minEdges[axis] = 0; - m_pHandles[0].m_maxEdges[axis] = 1; - - m_pEdges[axis][0].m_pos = 0; - m_pEdges[axis][0].m_handle = 0; - m_pEdges[axis][1].m_pos = m_handleSentinel; - m_pEdges[axis][1].m_handle = 0; -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - - } - -} - -template -btAxisSweep3Internal::~btAxisSweep3Internal() -{ - - for (int i = 2; i >= 0; i--) - { - btAlignedFree(m_pEdges[i]); - } - btAlignedFree(m_pHandles); - - if (m_ownsPairCache) - { - m_pairCache->~btOverlappingPairCache(); - btAlignedFree(m_pairCache); - } -} - -template -void btAxisSweep3Internal::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const -{ - btPoint3 clampedPoint(point); - - - - clampedPoint.setMax(m_worldAabbMin); - clampedPoint.setMin(m_worldAabbMax); - - btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize; - out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax); - out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax); - out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax); - -} - - -template -BP_FP_INT_TYPE btAxisSweep3Internal::allocHandle() -{ - assert(m_firstFreeHandle); - - BP_FP_INT_TYPE handle = m_firstFreeHandle; - m_firstFreeHandle = getHandle(handle)->GetNextFree(); - m_numHandles++; - - return handle; -} - -template -void btAxisSweep3Internal::freeHandle(BP_FP_INT_TYPE handle) -{ - assert(handle > 0 && handle < m_maxHandles); - - getHandle(handle)->SetNextFree(m_firstFreeHandle); - m_firstFreeHandle = handle; - - m_numHandles--; -} - - -template -BP_FP_INT_TYPE btAxisSweep3Internal::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher) -{ - // quantize the bounds - BP_FP_INT_TYPE min[3], max[3]; - quantize(min, aabbMin, 0); - quantize(max, aabbMax, 1); - - // allocate a handle - BP_FP_INT_TYPE handle = allocHandle(); - - - Handle* pHandle = getHandle(handle); - - pHandle->m_uniqueId = handle; - //pHandle->m_pOverlaps = 0; - pHandle->m_clientObject = pOwner; - pHandle->m_collisionFilterGroup = collisionFilterGroup; - pHandle->m_collisionFilterMask = collisionFilterMask; - - // compute current limit of edge arrays - BP_FP_INT_TYPE limit = m_numHandles * 2; - - - // insert new edges just inside the max boundary edge - for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++) - { - - m_pHandles[0].m_maxEdges[axis] += 2; - - m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1]; - - m_pEdges[axis][limit - 1].m_pos = min[axis]; - m_pEdges[axis][limit - 1].m_handle = handle; - - m_pEdges[axis][limit].m_pos = max[axis]; - m_pEdges[axis][limit].m_handle = handle; - - pHandle->m_minEdges[axis] = limit - 1; - pHandle->m_maxEdges[axis] = limit; - } - - // now sort the new edges to their correct position - sortMinDown(0, pHandle->m_minEdges[0], dispatcher,false); - sortMaxDown(0, pHandle->m_maxEdges[0], dispatcher,false); - sortMinDown(1, pHandle->m_minEdges[1], dispatcher,false); - sortMaxDown(1, pHandle->m_maxEdges[1], dispatcher,false); - sortMinDown(2, pHandle->m_minEdges[2], dispatcher,true); - sortMaxDown(2, pHandle->m_maxEdges[2], dispatcher,true); - - - return handle; -} - - -template -void btAxisSweep3Internal::removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher) -{ - - Handle* pHandle = getHandle(handle); - - //explicitly remove the pairs containing the proxy - //we could do it also in the sortMinUp (passing true) - //todo: compare performance - m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher); - - - // compute current limit of edge arrays - int limit = m_numHandles * 2; - - int axis; - - for (axis = 0;axis<3;axis++) - { - m_pHandles[0].m_maxEdges[axis] -= 2; - } - - // remove the edges by sorting them up to the end of the list - for ( axis = 0; axis < 3; axis++) - { - Edge* pEdges = m_pEdges[axis]; - BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis]; - pEdges[max].m_pos = m_handleSentinel; - - sortMaxUp(axis,max,dispatcher,false); - - - BP_FP_INT_TYPE i = pHandle->m_minEdges[axis]; - pEdges[i].m_pos = m_handleSentinel; - - - sortMinUp(axis,i,dispatcher,false); - - pEdges[limit-1].m_handle = 0; - pEdges[limit-1].m_pos = m_handleSentinel; - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis,false); -#endif //DEBUG_BROADPHASE - - - } - - - // free the handle - freeHandle(handle); - - -} - -extern int gOverlappingPairs; -#include - -template -void btAxisSweep3Internal::calculateOverlappingPairs(btDispatcher* dispatcher) -{ -#ifdef USE_LAZY_REMOVAL - - if (m_ownsPairCache) - { - - btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray(); - - //perform a sort, to find duplicates and to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; - - - int i; - - btBroadphasePair previousPair; - previousPair.m_pProxy0 = 0; - previousPair.m_pProxy1 = 0; - previousPair.m_algorithm = 0; - - - for (i=0;iprocessOverlap(pair); - } else - { - needsRemoval = true; - } - } else - { - //remove duplicate - needsRemoval = true; - //should have no algorithm - btAssert(!pair.m_algorithm); - } - - if (needsRemoval) - { - m_pairCache->cleanOverlappingPair(pair,dispatcher); - - // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); - // m_overlappingPairArray.pop_back(); - pair.m_pProxy0 = 0; - pair.m_pProxy1 = 0; - m_invalidPair++; - gOverlappingPairs--; - } - - } - - ///if you don't like to skip the invalid pairs in the array, execute following code: - #define CLEAN_INVALID_PAIRS 1 - #ifdef CLEAN_INVALID_PAIRS - - //perform a sort, to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; - #endif//CLEAN_INVALID_PAIRS - - //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size()); - } -#endif //USE_LAZY_REMOVAL - - - - -} - - -template -bool btAxisSweep3Internal::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) -{ - const Handle* pHandleA = static_cast(proxy0); - const Handle* pHandleB = static_cast(proxy1); - - //optimization 1: check the array index (memory address), instead of the m_pos - - for (int axis = 0; axis < 3; axis++) - { - if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || - pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) - { - return false; - } - } - return true; -} - -template -bool btAxisSweep3Internal::testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB) -{ - //optimization 1: check the array index (memory address), instead of the m_pos - - for (int axis = 0; axis < 3; axis++) - { - if (axis != ignoreAxis) - { - if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || - pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) - { - return false; - } - } - } - - //optimization 2: only 2 axis need to be tested (conflicts with 'delayed removal' optimization) - - /*for (int axis = 0; axis < 3; axis++) - { - if (m_pEdges[axis][pHandleA->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleB->m_minEdges[axis]].m_pos || - m_pEdges[axis][pHandleB->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleA->m_minEdges[axis]].m_pos) - { - return false; - } - } - */ - - return true; -} - -template -void btAxisSweep3Internal::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher) -{ -// assert(bounds.IsFinite()); - //assert(bounds.HasVolume()); - - Handle* pHandle = getHandle(handle); - - // quantize the new bounds - BP_FP_INT_TYPE min[3], max[3]; - quantize(min, aabbMin, 0); - quantize(max, aabbMax, 1); - - // update changed edges - for (int axis = 0; axis < 3; axis++) - { - BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis]; - BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis]; - - int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos; - int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos; - - m_pEdges[axis][emin].m_pos = min[axis]; - m_pEdges[axis][emax].m_pos = max[axis]; - - // expand (only adds overlaps) - if (dmin < 0) - sortMinDown(axis, emin,dispatcher,true); - - if (dmax > 0) - sortMaxUp(axis, emax,dispatcher,true); - - // shrink (only removes overlaps) - if (dmin > 0) - sortMinUp(axis, emin,dispatcher,true); - - if (dmax < 0) - sortMaxDown(axis, emax,dispatcher,true); - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - } - - -} - - - - -// sorting a min edge downwards can only ever *add* overlaps -template -void btAxisSweep3Internal::sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) -{ - - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pPrev = pEdge - 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pEdge->m_pos < pPrev->m_pos) - { - Handle* pHandlePrev = getHandle(pPrev->m_handle); - - if (pPrev->IsMax()) - { - // if previous edge is a maximum check the bounds and add an overlap if necessary - if (updateOverlaps && testOverlap(axis,pHandleEdge, pHandlePrev)) - { - m_pairCache->addOverlappingPair(pHandleEdge,pHandlePrev); - if (m_userPairCallback) - m_userPairCallback->addOverlappingPair(pHandleEdge,pHandlePrev); - - //AddOverlap(pEdge->m_handle, pPrev->m_handle); - - } - - // update edge reference in other handle - pHandlePrev->m_maxEdges[axis]++; - } - else - pHandlePrev->m_minEdges[axis]++; - - pHandleEdge->m_minEdges[axis]--; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pPrev; - *pPrev = swap; - - // decrement - pEdge--; - pPrev--; - } - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - -} - -// sorting a min edge upwards can only ever *remove* overlaps -template -void btAxisSweep3Internal::sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) -{ - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pNext = pEdge + 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) - { - Handle* pHandleNext = getHandle(pNext->m_handle); - - if (pNext->IsMax()) - { -#ifndef USE_LAZY_REMOVAL - // if next edge is maximum remove any overlap between the two handles - if (updateOverlaps) - { - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pNext->m_handle); - - m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher); - if (m_userPairCallback) - m_userPairCallback->removeOverlappingPair(handle0,handle1); - - } -#endif //USE_LAZY_REMOVAL - - // update edge reference in other handle - pHandleNext->m_maxEdges[axis]--; - } - else - pHandleNext->m_minEdges[axis]--; - - pHandleEdge->m_minEdges[axis]++; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pNext; - *pNext = swap; - - // increment - pEdge++; - pNext++; - } - - -} - -// sorting a max edge downwards can only ever *remove* overlaps -template -void btAxisSweep3Internal::sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) -{ - - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pPrev = pEdge - 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pEdge->m_pos < pPrev->m_pos) - { - Handle* pHandlePrev = getHandle(pPrev->m_handle); - - if (!pPrev->IsMax()) - { - // if previous edge was a minimum remove any overlap between the two handles - if (updateOverlaps) - { - //this is done during the overlappingpairarray iteration/narrowphase collision -#ifndef USE_LAZY_REMOVAL - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pPrev->m_handle); - m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher); - if (m_userPairCallback) - m_userPairCallback->removeOverlappingPair(handle0,handle1); - -#endif //USE_LAZY_REMOVAL - - } - - // update edge reference in other handle - pHandlePrev->m_minEdges[axis]++;; - } - else - pHandlePrev->m_maxEdges[axis]++; - - pHandleEdge->m_maxEdges[axis]--; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pPrev; - *pPrev = swap; - - // decrement - pEdge--; - pPrev--; - } - - -#ifdef DEBUG_BROADPHASE - debugPrintAxis(axis); -#endif //DEBUG_BROADPHASE - -} - -// sorting a max edge upwards can only ever *add* overlaps -template -void btAxisSweep3Internal::sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps) -{ - Edge* pEdge = m_pEdges[axis] + edge; - Edge* pNext = pEdge + 1; - Handle* pHandleEdge = getHandle(pEdge->m_handle); - - while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) - { - Handle* pHandleNext = getHandle(pNext->m_handle); - - if (!pNext->IsMax()) - { - // if next edge is a minimum check the bounds and add an overlap if necessary - if (updateOverlaps && testOverlap(axis, pHandleEdge, pHandleNext)) - { - Handle* handle0 = getHandle(pEdge->m_handle); - Handle* handle1 = getHandle(pNext->m_handle); - m_pairCache->addOverlappingPair(handle0,handle1); - if (m_userPairCallback) - m_userPairCallback->addOverlappingPair(handle0,handle1); - } - - // update edge reference in other handle - pHandleNext->m_minEdges[axis]--; - } - else - pHandleNext->m_maxEdges[axis]--; - - pHandleEdge->m_maxEdges[axis]++; - - // swap the edges - Edge swap = *pEdge; - *pEdge = *pNext; - *pNext = swap; - - // increment - pEdge++; - pNext++; - } - -} - - - -//////////////////////////////////////////////////////////////////// - - -/// btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase. -/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using 16 bit integer coordinates instead of floats. -/// For large worlds and many objects, use bt32BitAxisSweep3 instead. bt32BitAxisSweep3 has higher precision and allows more then 16384 objects at the cost of more memory and bit of performance. -class btAxisSweep3 : public btAxisSweep3Internal -{ -public: - - btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0); - -}; - -/// bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune. -/// This comes at the cost of more memory per handle, and a bit slower performance. -/// It uses arrays rather then lists for storage of the 3 axis. -class bt32BitAxisSweep3 : public btAxisSweep3Internal -{ -public: - - bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0); - -}; - -#endif - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h deleted file mode 100644 index 97ba20743d2..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BROADPHASE_INTERFACE_H -#define BROADPHASE_INTERFACE_H - - - -struct btDispatcherInfo; -class btDispatcher; -#include "btBroadphaseProxy.h" -class btOverlappingPairCache; - -#include "LinearMath/btVector3.h" - -///BroadphaseInterface for aabb-overlapping object pairs -class btBroadphaseInterface -{ -public: - virtual ~btBroadphaseInterface() {} - - virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) =0; - virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0; - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0; - - ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb - virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0; - - virtual btOverlappingPairCache* getOverlappingPairCache()=0; - virtual const btOverlappingPairCache* getOverlappingPairCache() const =0; - -}; - -#endif //BROADPHASE_INTERFACE_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp deleted file mode 100644 index f4d7341f8dd..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btBroadphaseProxy.h" - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h deleted file mode 100644 index f0a462cce02..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h +++ /dev/null @@ -1,232 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BROADPHASE_PROXY_H -#define BROADPHASE_PROXY_H - -#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE -#include "LinearMath/btAlignedAllocator.h" - - -/// btDispatcher uses these types -/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave -/// to facilitate type checking -enum BroadphaseNativeTypes -{ -// polyhedral convex shapes - BOX_SHAPE_PROXYTYPE, - TRIANGLE_SHAPE_PROXYTYPE, - TETRAHEDRAL_SHAPE_PROXYTYPE, - CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE, - CONVEX_HULL_SHAPE_PROXYTYPE, -//implicit convex shapes -IMPLICIT_CONVEX_SHAPES_START_HERE, - SPHERE_SHAPE_PROXYTYPE, - MULTI_SPHERE_SHAPE_PROXYTYPE, - CAPSULE_SHAPE_PROXYTYPE, - CONE_SHAPE_PROXYTYPE, - CONVEX_SHAPE_PROXYTYPE, - CYLINDER_SHAPE_PROXYTYPE, - UNIFORM_SCALING_SHAPE_PROXYTYPE, - MINKOWSKI_SUM_SHAPE_PROXYTYPE, - MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE, -//concave shapes -CONCAVE_SHAPES_START_HERE, - //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy! - TRIANGLE_MESH_SHAPE_PROXYTYPE, - ///used for demo integration FAST/Swift collision library and Bullet - FAST_CONCAVE_MESH_PROXYTYPE, - //terrain - TERRAIN_SHAPE_PROXYTYPE, -///Used for GIMPACT Trimesh integration - GIMPACT_SHAPE_PROXYTYPE, - - EMPTY_SHAPE_PROXYTYPE, - STATIC_PLANE_PROXYTYPE, -CONCAVE_SHAPES_END_HERE, - - COMPOUND_SHAPE_PROXYTYPE, - - MAX_BROADPHASE_COLLISION_TYPES -}; - - -///btBroadphaseProxy -ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy -{ - -BT_DECLARE_ALIGNED_ALLOCATOR(); - - ///optional filtering to cull potential collisions - enum CollisionFilterGroups - { - DefaultFilter = 1, - StaticFilter = 2, - KinematicFilter = 4, - DebrisFilter = 8, - SensorTrigger = 16, - AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger - }; - - //Usually the client btCollisionObject or Rigidbody class - void* m_clientObject; - - ///in the case of btMultiSapBroadphase, we store the collifionFilterGroup/Mask in the m_multiSapParentProxy - union - { - struct - { - short int m_collisionFilterGroup; - short int m_collisionFilterMask; - }; - - void* m_multiSapParentProxy; - - }; - - int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc. - int m_unusedPadding; //making the structure 16 bytes, better for alignment etc. - - SIMD_FORCE_INLINE int getUid() - { - return m_uniqueId;//(int)this; - } - - //used for memory pools - btBroadphaseProxy() :m_clientObject(0){} - - btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) - :m_clientObject(userPtr), - m_collisionFilterGroup(collisionFilterGroup), - m_collisionFilterMask(collisionFilterMask) - { - } - - - - static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType) - { - return (proxyType < IMPLICIT_CONVEX_SHAPES_START_HERE); - } - - static SIMD_FORCE_INLINE bool isConvex(int proxyType) - { - return (proxyType < CONCAVE_SHAPES_START_HERE); - } - - static SIMD_FORCE_INLINE bool isConcave(int proxyType) - { - return ((proxyType > CONCAVE_SHAPES_START_HERE) && - (proxyType < CONCAVE_SHAPES_END_HERE)); - } - static SIMD_FORCE_INLINE bool isCompound(int proxyType) - { - return (proxyType == COMPOUND_SHAPE_PROXYTYPE); - } - static SIMD_FORCE_INLINE bool isInfinite(int proxyType) - { - return (proxyType == STATIC_PLANE_PROXYTYPE); - } - -} -; - -class btCollisionAlgorithm; - -struct btBroadphaseProxy; - - - -/// contains a pair of aabb-overlapping objects -ATTRIBUTE_ALIGNED16(struct) btBroadphasePair -{ - btBroadphasePair () - : - m_pProxy0(0), - m_pProxy1(0), - m_algorithm(0), - m_userInfo(0) - { - } - -BT_DECLARE_ALIGNED_ALLOCATOR(); - - btBroadphasePair(const btBroadphasePair& other) - : m_pProxy0(other.m_pProxy0), - m_pProxy1(other.m_pProxy1), - m_algorithm(other.m_algorithm), - m_userInfo(other.m_userInfo) - { - } - btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1) - { - - //keep them sorted, so the std::set operations work - if (&proxy0 < &proxy1) - { - m_pProxy0 = &proxy0; - m_pProxy1 = &proxy1; - } - else - { - m_pProxy0 = &proxy1; - m_pProxy1 = &proxy0; - } - - m_algorithm = 0; - m_userInfo = 0; - - } - - btBroadphaseProxy* m_pProxy0; - btBroadphaseProxy* m_pProxy1; - - mutable btCollisionAlgorithm* m_algorithm; - mutable void* m_userInfo; - -}; - -/* -//comparison for set operation, see Solid DT_Encounter -SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePair& b) -{ - return a.m_pProxy0 < b.m_pProxy0 || - (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 < b.m_pProxy1); -} -*/ - - - -class btBroadphasePairSortPredicate -{ - public: - - bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b ) - { - return a.m_pProxy0 > b.m_pProxy0 || - (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 > b.m_pProxy1) || - (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm); - } -}; - - -SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadphasePair& b) -{ - return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1); -} - - -#endif //BROADPHASE_PROXY_H - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp deleted file mode 100644 index c95d1be0f2c..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btCollisionAlgorithm.h" -#include "btDispatcher.h" - -btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) -{ - m_dispatcher = ci.m_dispatcher1; -} - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h deleted file mode 100644 index 610eab4ce5e..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION_ALGORITHM_H -#define COLLISION_ALGORITHM_H - -#include "LinearMath/btScalar.h" - -struct btBroadphaseProxy; -class btDispatcher; -class btManifoldResult; -class btCollisionObject; -struct btDispatcherInfo; -class btPersistentManifold; - - -struct btCollisionAlgorithmConstructionInfo -{ - btCollisionAlgorithmConstructionInfo() - :m_dispatcher1(0), - m_manifold(0) - { - } - btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp) - :m_dispatcher1(dispatcher) - { - (void)temp; - } - - btDispatcher* m_dispatcher1; - btPersistentManifold* m_manifold; - - int getDispatcherId(); - -}; - - -///btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatcher. -///It is persistent over frames -class btCollisionAlgorithm -{ - -protected: - - btDispatcher* m_dispatcher; - -protected: - int getDispatcherId(); - -public: - - btCollisionAlgorithm() {}; - - btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci); - - virtual ~btCollisionAlgorithm() {}; - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0; - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0; - -}; - - -#endif //COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp deleted file mode 100644 index 20768225b3a..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btDispatcher.h" - -btDispatcher::~btDispatcher() -{ - -} - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h deleted file mode 100644 index daea11f7788..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef _DISPATCHER_H -#define _DISPATCHER_H - -#include "LinearMath/btScalar.h" - -class btCollisionAlgorithm; -struct btBroadphaseProxy; -class btRigidBody; -class btCollisionObject; -class btOverlappingPairCache; - - -class btPersistentManifold; -class btStackAlloc; - -struct btDispatcherInfo -{ - enum DispatchFunc - { - DISPATCH_DISCRETE = 1, - DISPATCH_CONTINUOUS - }; - btDispatcherInfo() - :m_timeStep(btScalar(0.)), - m_stepCount(0), - m_dispatchFunc(DISPATCH_DISCRETE), - m_timeOfImpact(btScalar(1.)), - m_useContinuous(false), - m_debugDraw(0), - m_enableSatConvex(false), - m_enableSPU(false), - m_stackAllocator(0) - { - - } - btScalar m_timeStep; - int m_stepCount; - int m_dispatchFunc; - btScalar m_timeOfImpact; - bool m_useContinuous; - class btIDebugDraw* m_debugDraw; - bool m_enableSatConvex; - bool m_enableSPU; - btStackAlloc* m_stackAllocator; - -}; - -/// btDispatcher can be used in combination with broadphase to dispatch overlapping pairs. -/// For example for pairwise collision detection or user callbacks (game logic). -class btDispatcher -{ - - -public: - virtual ~btDispatcher() ; - - virtual btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold=0) = 0; - - virtual btPersistentManifold* getNewManifold(void* body0,void* body1)=0; - - virtual void releaseManifold(btPersistentManifold* manifold)=0; - - virtual void clearManifold(btPersistentManifold* manifold)=0; - - virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1) = 0; - - virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1)=0; - - virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher)=0; - - virtual int getNumManifolds() const = 0; - - virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0; - - virtual btPersistentManifold** getInternalManifoldPointer() = 0; - - virtual void* allocateCollisionAlgorithm(int size) = 0; - - virtual void freeCollisionAlgorithm(void* ptr) = 0; - -}; - - -#endif //_DISPATCHER_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp deleted file mode 100644 index 41406ff49f9..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btMultiSapBroadphase.h" - -#include "btSimpleBroadphase.h" -#include "LinearMath/btAabbUtil2.h" - -/// btSapBroadphaseArray m_sapBroadphases; - -/// btOverlappingPairCache* m_overlappingPairs; -extern int gOverlappingPairs; - -btMultiSapBroadphase::btMultiSapBroadphase(int maxProxies,btOverlappingPairCache* pairCache) -:m_overlappingPairs(pairCache), -m_ownsPairCache(false), -m_invalidPair(0) -{ - if (!m_overlappingPairs) - { - m_ownsPairCache = true; - void* mem = btAlignedAlloc(sizeof(btOverlappingPairCache),16); - m_overlappingPairs = new (mem)btOverlappingPairCache(); - } - - struct btMultiSapOverlapFilterCallback : public btOverlapFilterCallback - { - virtual ~btMultiSapOverlapFilterCallback() - {} - // return true when pairs need collision - virtual bool needBroadphaseCollision(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) const - { - btMultiSapBroadphase::btMultiSapProxy* multiSapProxy0 = (btMultiSapBroadphase::btMultiSapProxy*)childProxy0->m_multiSapParentProxy; - btMultiSapBroadphase::btMultiSapProxy* multiSapProxy1 = (btMultiSapBroadphase::btMultiSapProxy*)childProxy1->m_multiSapParentProxy; - - bool collides = (multiSapProxy0->m_collisionFilterGroup & multiSapProxy1->m_collisionFilterMask) != 0; - collides = collides && (multiSapProxy1->m_collisionFilterGroup & multiSapProxy0->m_collisionFilterMask); - - return collides; - } - }; - - void* mem = btAlignedAlloc(sizeof(btMultiSapOverlapFilterCallback),16); - m_filterCallback = new (mem)btMultiSapOverlapFilterCallback(); - - m_overlappingPairs->setOverlapFilterCallback(m_filterCallback); - mem = btAlignedAlloc(sizeof(btSimpleBroadphase),16); - m_simpleBroadphase = new (mem) btSimpleBroadphase(maxProxies,m_overlappingPairs); -} - -btMultiSapBroadphase::~btMultiSapBroadphase() -{ - if (m_ownsPairCache) - { - btAlignedFree(m_overlappingPairs); - } -} - -btBroadphaseProxy* btMultiSapBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) -{ - void* mem = btAlignedAlloc(sizeof(btMultiSapProxy),16); - btMultiSapProxy* proxy = new (mem)btMultiSapProxy(aabbMin, aabbMax,shapeType,userPtr, collisionFilterGroup,collisionFilterMask); - m_multiSapProxies.push_back(proxy); - - ///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision - ///this is needed to be able to calculate the aabb overlap - btBroadphaseProxy* simpleProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask, dispatcher); - simpleProxy->m_multiSapParentProxy = proxy; - - mem = btAlignedAlloc(sizeof(btChildProxy),16); - btChildProxy* childProxyRef = new btChildProxy(); - childProxyRef->m_proxy = simpleProxy; - childProxyRef->m_childBroadphase = m_simpleBroadphase; - proxy->m_childProxies.push_back(childProxyRef); - - ///this should deal with inserting/removal into child broadphases - setAabb(proxy,aabbMin,aabbMax,dispatcher); - return proxy; -} - -void btMultiSapBroadphase::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) -{ - ///not yet - btAssert(0); - -} -void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher) -{ - btMultiSapProxy* multiProxy = static_cast(proxy); - multiProxy->m_aabbMin = aabbMin; - multiProxy->m_aabbMax = aabbMax; - - for (int i=0;im_childProxies.size();i++) - { - btChildProxy* childProxyRef = multiProxy->m_childProxies[i]; - childProxyRef->m_childBroadphase->setAabb(childProxyRef->m_proxy,aabbMin,aabbMax,dispatcher); - } - -} - - ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb -void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) -{ - m_simpleBroadphase->calculateOverlappingPairs(dispatcher); - -#ifndef USE_HASH_PAIRCACHE - - btBroadphasePairArray& overlappingPairArray = m_overlappingPairs->getOverlappingPairArray(); - - //perform a sort, to find duplicates and to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; - - - btBroadphasePair previousPair; - previousPair.m_pProxy0 = 0; - previousPair.m_pProxy1 = 0; - previousPair.m_algorithm = 0; - - int i; - - for (i=0;iprocessOverlap(pair); - } else - { - needsRemoval = true; - } - } else - { - //remove duplicate - needsRemoval = true; - //should have no algorithm - btAssert(!pair.m_algorithm); - } - - if (needsRemoval) - { - m_overlappingPairs->cleanOverlappingPair(pair,dispatcher); - - // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); - // m_overlappingPairArray.pop_back(); - pair.m_pProxy0 = 0; - pair.m_pProxy1 = 0; - m_invalidPair++; - gOverlappingPairs--; - } - - } - -///if you don't like to skip the invalid pairs in the array, execute following code: -#define CLEAN_INVALID_PAIRS 1 -#ifdef CLEAN_INVALID_PAIRS - - //perform a sort, to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; -#endif//CLEAN_INVALID_PAIRS - -#endif //USE_HASH_PAIRCACHE - -} - - -bool btMultiSapBroadphase::testAabbOverlap(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) -{ - btMultiSapProxy* multiSapProxy0 = (btMultiSapProxy*)childProxy0->m_multiSapParentProxy; - btMultiSapProxy* multiSapProxy1 = (btMultiSapProxy*)childProxy1->m_multiSapParentProxy; - - return TestAabbAgainstAabb2(multiSapProxy0->m_aabbMin,multiSapProxy0->m_aabbMax, - multiSapProxy1->m_aabbMin,multiSapProxy1->m_aabbMax); - -} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h deleted file mode 100644 index 1ee609b8d1f..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h +++ /dev/null @@ -1,119 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#ifndef BT_MULTI_SAP_BROADPHASE -#define BT_MULTI_SAP_BROADPHASE - -#include "btBroadphaseInterface.h" -#include "LinearMath/btAlignedObjectArray.h" -#include "btOverlappingPairCache.h" - -class btAxisSweep3; -class btSimpleBroadphase; - - -typedef btAlignedObjectArray btSapBroadphaseArray; - -///multi SAP broadphase -///See http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=328 -///and http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329 -class btMultiSapBroadphase :public btBroadphaseInterface -{ - btSapBroadphaseArray m_sapBroadphases; - - btSimpleBroadphase* m_simpleBroadphase; - - btOverlappingPairCache* m_overlappingPairs; - - bool m_ownsPairCache; - - btOverlapFilterCallback* m_filterCallback; - - int m_invalidPair; - - struct btChildProxy - { - btBroadphaseProxy* m_proxy; - btBroadphaseInterface* m_childBroadphase; - }; - -public: - - struct btMultiSapProxy : public btBroadphaseProxy - { - - ///array with all the entries that this proxy belongs to - btAlignedObjectArray m_childProxies; - btVector3 m_aabbMin; - btVector3 m_aabbMax; - - int m_shapeType; - void* m_userPtr; - short int m_collisionFilterGroup; - short int m_collisionFilterMask; - - btMultiSapProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) - :m_aabbMin(aabbMin), - m_aabbMax(aabbMax), - m_shapeType(shapeType), - m_userPtr(userPtr), - m_collisionFilterGroup(collisionFilterGroup), - m_collisionFilterMask(collisionFilterMask) - { - - } - - - }; - -protected: - - btAlignedObjectArray m_multiSapProxies; - -public: - - btMultiSapBroadphase(int maxProxies = 16384,btOverlappingPairCache* pairCache=0); - - btSapBroadphaseArray getBroadphaseArray() - { - return m_sapBroadphases; - } - - const btSapBroadphaseArray getBroadphaseArray() const - { - return m_sapBroadphases; - } - - virtual ~btMultiSapBroadphase(); - - virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher); - virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); - - ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb - virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - - bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - virtual btOverlappingPairCache* getOverlappingPairCache() - { - return m_overlappingPairs; - } - virtual const btOverlappingPairCache* getOverlappingPairCache() const - { - return m_overlappingPairs; - } -}; - -#endif //BT_MULTI_SAP_BROADPHASE diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp deleted file mode 100644 index e4ef043f064..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp +++ /dev/null @@ -1,474 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#include "btOverlappingPairCache.h" - -#include "btDispatcher.h" -#include "btCollisionAlgorithm.h" - -int gOverlappingPairs = 0; - -int gRemovePairs =0; -int gAddedPairs =0; -int gFindPairs =0; - -btOverlappingPairCache::btOverlappingPairCache(): - m_overlapFilterCallback(0), - m_blockedForChanges(false) -{ - int initialAllocatedSize= 2; - m_overlappingPairArray.reserve(initialAllocatedSize); -#ifdef USE_HASH_PAIRCACHE - growTables(); -#endif //USE_HASH_PAIRCACHE -} - - -btOverlappingPairCache::~btOverlappingPairCache() -{ - //todo/test: show we erase/delete data, or is it automatic -} - -void btOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) -{ - if (pair.m_algorithm) - { - { - pair.m_algorithm->~btCollisionAlgorithm(); - dispatcher->freeCollisionAlgorithm(pair.m_algorithm); - pair.m_algorithm=0; - } - } -} - - -void btOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher) -{ - - class CleanPairCallback : public btOverlapCallback - { - btBroadphaseProxy* m_cleanProxy; - btOverlappingPairCache* m_pairCache; - btDispatcher* m_dispatcher; - - public: - CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) - :m_cleanProxy(cleanProxy), - m_pairCache(pairCache), - m_dispatcher(dispatcher) - { - } - virtual bool processOverlap(btBroadphasePair& pair) - { - if ((pair.m_pProxy0 == m_cleanProxy) || - (pair.m_pProxy1 == m_cleanProxy)) - { - m_pairCache->cleanOverlappingPair(pair,m_dispatcher); - } - return false; - } - - }; - - CleanPairCallback cleanPairs(proxy,this,dispatcher); - - processAllOverlappingPairs(&cleanPairs,dispatcher); - -} - -void btOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher) -{ - - class RemovePairCallback : public btOverlapCallback - { - btBroadphaseProxy* m_obsoleteProxy; - - public: - RemovePairCallback(btBroadphaseProxy* obsoleteProxy) - :m_obsoleteProxy(obsoleteProxy) - { - } - virtual bool processOverlap(btBroadphasePair& pair) - { - return ((pair.m_pProxy0 == m_obsoleteProxy) || - (pair.m_pProxy1 == m_obsoleteProxy)); - } - - }; - - - RemovePairCallback removeCallback(proxy); - - processAllOverlappingPairs(&removeCallback,dispatcher); -} - - -#ifdef USE_HASH_PAIRCACHE - - - - - - - -btBroadphasePair* btOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) -{ - gFindPairs++; - - int proxyId1 = proxy0->getUid(); - int proxyId2 = proxy1->getUid(); - - if (proxyId1 > proxyId2) - btSwap(proxyId1, proxyId2); - - int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); - - int index = m_hashTable[hash]; - while (index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false) - { - index = m_next[index]; - } - - if (index == BT_NULL_PAIR) - { - return NULL; - } - - btAssert(index < m_overlappingPairArray.size()); - - return &m_overlappingPairArray[index]; -} - -#include - -void btOverlappingPairCache::growTables() -{ - - int newCapacity = m_overlappingPairArray.capacity(); - - if (m_hashTable.size() < newCapacity) - { - //grow hashtable and next table - int curHashtableSize = m_hashTable.size(); - - m_hashTable.resize(newCapacity); - m_next.resize(newCapacity); - - - int i; - - for (i= 0; i < newCapacity; ++i) - { - m_hashTable[i] = BT_NULL_PAIR; - } - for (i = 0; i < newCapacity; ++i) - { - m_next[i] = BT_NULL_PAIR; - } - - for(i=0;igetUid(); - int proxyId2 = pair.m_pProxy1->getUid(); - if (proxyId1 > proxyId2) - btSwap(proxyId1, proxyId2); - int hashValue = getHash(proxyId1,proxyId2) & (m_overlappingPairArray.capacity()-1); // New hash value with new mask - m_next[i] = m_hashTable[hashValue]; - m_hashTable[hashValue] = i; - } - - - } -} - -btBroadphasePair* btOverlappingPairCache::internalAddPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) -{ - int proxyId1 = proxy0->getUid(); - int proxyId2 = proxy1->getUid(); - - if (proxyId1 > proxyId2) - btSwap(proxyId1, proxyId2); - - int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); - - - - btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash); - if (pair != NULL) - { - return pair; - } - - int count = m_overlappingPairArray.size(); - int oldCapacity = m_overlappingPairArray.capacity(); - void* mem = &m_overlappingPairArray.expand(); - int newCapacity = m_overlappingPairArray.capacity(); - - if (oldCapacity < newCapacity) - { - growTables(); - //hash with new capacity - hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); - } - - pair = new (mem) btBroadphasePair(*proxy0,*proxy1); -// pair->m_pProxy0 = proxy0; -// pair->m_pProxy1 = proxy1; - pair->m_algorithm = 0; - pair->m_userInfo = 0; - - - m_next[count] = m_hashTable[hash]; - m_hashTable[hash] = count; - - return pair; -} - - - -void* btOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1,btDispatcher* dispatcher) -{ - gRemovePairs++; - - int proxyId1 = proxy0->getUid(); - int proxyId2 = proxy1->getUid(); - - if (proxyId1 > proxyId2) - btSwap(proxyId1, proxyId2); - - int hash = getHash(proxyId1, proxyId2) & (m_overlappingPairArray.capacity()-1); - - btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash); - if (pair == NULL) - { - return 0; - } - - cleanOverlappingPair(*pair,dispatcher); - - void* userData = pair->m_userInfo; - - btAssert(pair->m_pProxy0->getUid() == proxyId1); - btAssert(pair->m_pProxy1->getUid() == proxyId2); - - int pairIndex = int(pair - &m_overlappingPairArray[0]); - btAssert(pairIndex < m_overlappingPairArray.size()); - - // Remove the pair from the hash table. - int index = m_hashTable[hash]; - btAssert(index != BT_NULL_PAIR); - - int previous = BT_NULL_PAIR; - while (index != pairIndex) - { - previous = index; - index = m_next[index]; - } - - if (previous != BT_NULL_PAIR) - { - btAssert(m_next[previous] == pairIndex); - m_next[previous] = m_next[pairIndex]; - } - else - { - m_hashTable[hash] = m_next[pairIndex]; - } - - // We now move the last pair into spot of the - // pair being removed. We need to fix the hash - // table indices to support the move. - - int lastPairIndex = m_overlappingPairArray.size() - 1; - - // If the removed pair is the last pair, we are done. - if (lastPairIndex == pairIndex) - { - m_overlappingPairArray.pop_back(); - return userData; - } - - // Remove the last pair from the hash table. - const btBroadphasePair* last = &m_overlappingPairArray[lastPairIndex]; - int lastHash = getHash(last->m_pProxy0->getUid(), last->m_pProxy1->getUid()) & (m_overlappingPairArray.capacity()-1); - - index = m_hashTable[lastHash]; - btAssert(index != BT_NULL_PAIR); - - previous = BT_NULL_PAIR; - while (index != lastPairIndex) - { - previous = index; - index = m_next[index]; - } - - if (previous != BT_NULL_PAIR) - { - btAssert(m_next[previous] == lastPairIndex); - m_next[previous] = m_next[lastPairIndex]; - } - else - { - m_hashTable[lastHash] = m_next[lastPairIndex]; - } - - // Copy the last pair into the remove pair's spot. - m_overlappingPairArray[pairIndex] = m_overlappingPairArray[lastPairIndex]; - - // Insert the last pair into the hash table - m_next[pairIndex] = m_hashTable[lastHash]; - m_hashTable[lastHash] = pairIndex; - - m_overlappingPairArray.pop_back(); - - return userData; -} -#include - -void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher) -{ - - int i; - -// printf("m_overlappingPairArray.size()=%d\n",m_overlappingPairArray.size()); - for (i=0;iprocessOverlap(*pair)) - { - removeOverlappingPair(pair->m_pProxy0,pair->m_pProxy1,dispatcher); - - gOverlappingPairs--; - } else - { - i++; - } - } -} - -#else - - - - -void* btOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1, btDispatcher* dispatcher ) -{ -#ifndef USE_LAZY_REMOVAL - - btBroadphasePair findPair(*proxy0,*proxy1); - - int findIndex = m_overlappingPairArray.findLinearSearch(findPair); - if (findIndex < m_overlappingPairArray.size()) - { - gOverlappingPairs--; - btBroadphasePair& pair = m_overlappingPairArray[findIndex]; - void* userData = pair.m_userInfo; - cleanOverlappingPair(pair,dispatcher); - - m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1); - m_overlappingPairArray.pop_back(); - return userData; - } -#endif //USE_LAZY_REMOVAL - - return 0; -} - - - - - - - - -btBroadphasePair* btOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) -{ - //don't add overlap with own - assert(proxy0 != proxy1); - - if (!needsBroadphaseCollision(proxy0,proxy1)) - return 0; - - void* mem = &m_overlappingPairArray.expand(); - btBroadphasePair* pair = new (mem) btBroadphasePair(*proxy0,*proxy1); - gOverlappingPairs++; - return pair; - -} - -///this findPair becomes really slow. Either sort the list to speedup the query, or -///use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed. -///we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address) -///Also we can use a 2D bitmap, which can be useful for a future GPU implementation - btBroadphasePair* btOverlappingPairCache::findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) -{ - if (!needsBroadphaseCollision(proxy0,proxy1)) - return 0; - - btBroadphasePair tmpPair(*proxy0,*proxy1); - int findIndex = m_overlappingPairArray.findLinearSearch(tmpPair); - - if (findIndex < m_overlappingPairArray.size()) - { - //assert(it != m_overlappingPairSet.end()); - btBroadphasePair* pair = &m_overlappingPairArray[findIndex]; - return pair; - } - return 0; -} - - - - - - - - - - -#include - -void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher) -{ - - int i; - - for (i=0;iprocessOverlap(*pair)) - { - cleanOverlappingPair(*pair,dispatcher); - - m_overlappingPairArray.swap(i,m_overlappingPairArray.capacity()-1); - m_overlappingPairArray.pop_back(); - gOverlappingPairs--; - } else - { - i++; - } - } -} - - - -#endif //USE_HASH_PAIRCACHE diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h deleted file mode 100644 index a387505d1be..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h +++ /dev/null @@ -1,323 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef OVERLAPPING_PAIR_CACHE_H -#define OVERLAPPING_PAIR_CACHE_H - - -#include "btBroadphaseInterface.h" -#include "btBroadphaseProxy.h" -#include "LinearMath/btPoint3.h" -#include "LinearMath/btAlignedObjectArray.h" -class btDispatcher; - -///disable the USE_HASH_PAIRCACHE define to use a pair manager that sorts the pairs to find duplicates/non-overlap -#define USE_HASH_PAIRCACHE 1 - - -struct btOverlapCallback -{ - virtual ~btOverlapCallback() - {} - //return true for deletion of the pair - virtual bool processOverlap(btBroadphasePair& pair) = 0; -}; - -struct btOverlapFilterCallback -{ - virtual ~btOverlapFilterCallback() - {} - // return true when pairs need collision - virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0; -}; - -typedef btAlignedObjectArray btBroadphasePairArray; - -#ifdef USE_HASH_PAIRCACHE - - -/// Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com - -extern int gRemovePairs; -extern int gAddedPairs; -extern int gFindPairs; - -const int BT_NULL_PAIR=0xffffffff; - -class btOverlappingPairCache -{ - btBroadphasePairArray m_overlappingPairArray; - btOverlapFilterCallback* m_overlapFilterCallback; - bool m_blockedForChanges; - - -public: - btOverlappingPairCache(); - virtual ~btOverlappingPairCache(); - - - void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - - void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher); - - SIMD_FORCE_INLINE bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const - { - if (m_overlapFilterCallback) - return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1); - - bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0; - collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask); - - return collides; - } - - // Add a pair and return the new pair. If the pair already exists, - // no new pair is created and the old one is returned. - SIMD_FORCE_INLINE btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) - { - gAddedPairs++; - - if (!needsBroadphaseCollision(proxy0,proxy1)) - return 0; - - return internalAddPair(proxy0,proxy1); - } - - - - void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - - - virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher); - - btBroadphasePair* getOverlappingPairArrayPtr() - { - return &m_overlappingPairArray[0]; - } - - const btBroadphasePair* getOverlappingPairArrayPtr() const - { - return &m_overlappingPairArray[0]; - } - - btBroadphasePairArray& getOverlappingPairArray() - { - return m_overlappingPairArray; - } - - const btBroadphasePairArray& getOverlappingPairArray() const - { - return m_overlappingPairArray; - } - - void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher); - - - - btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1); - - int GetCount() const { return m_overlappingPairArray.size(); } -// btBroadphasePair* GetPairs() { return m_pairs; } - - btOverlapFilterCallback* getOverlapFilterCallback() - { - return m_overlapFilterCallback; - } - - void setOverlapFilterCallback(btOverlapFilterCallback* callback) - { - m_overlapFilterCallback = callback; - } - - int getNumOverlappingPairs() const - { - return m_overlappingPairArray.size(); - } -private: - - btBroadphasePair* internalAddPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - void growTables(); - - SIMD_FORCE_INLINE bool equalsPair(const btBroadphasePair& pair, int proxyId1, int proxyId2) - { - return pair.m_pProxy0->getUid() == proxyId1 && pair.m_pProxy1->getUid() == proxyId2; - } - - /* - // Thomas Wang's hash, see: http://www.concentric.net/~Ttwang/tech/inthash.htm - // This assumes proxyId1 and proxyId2 are 16-bit. - SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2) - { - int key = (proxyId2 << 16) | proxyId1; - key = ~key + (key << 15); - key = key ^ (key >> 12); - key = key + (key << 2); - key = key ^ (key >> 4); - key = key * 2057; - key = key ^ (key >> 16); - return key; - } - */ - - - - SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2) - { - int key = ((unsigned int)proxyId1) | (((unsigned int)proxyId1) <<16); - // Thomas Wang's hash - - key += ~(key << 15); - key ^= (key >> 10); - key += (key << 3); - key ^= (key >> 6); - key += ~(key << 11); - key ^= (key >> 16); - return key; - } - - - - - - SIMD_FORCE_INLINE btBroadphasePair* internalFindPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, int hash) - { - int proxyId1 = proxy0->getUid(); - int proxyId2 = proxy1->getUid(); - if (proxyId1 > proxyId2) - btSwap(proxyId1, proxyId2); - - int index = m_hashTable[hash]; - - while( index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false) - { - index = m_next[index]; - } - - if ( index == BT_NULL_PAIR ) - { - return NULL; - } - - btAssert(index < m_overlappingPairArray.size()); - - return &m_overlappingPairArray[index]; - } - - -public: - - btAlignedObjectArray m_hashTable; - btAlignedObjectArray m_next; - -}; - - - -#else//USE_HASH_PAIRCACHE - -#define USE_LAZY_REMOVAL 1 - -///btOverlappingPairCache maintains the objects with overlapping AABB -///Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase -class btOverlappingPairCache -{ - protected: - //avoid brute-force finding all the time - btBroadphasePairArray m_overlappingPairArray; - - //during the dispatch, check that user doesn't destroy/create proxy - bool m_blockedForChanges; - - //if set, use the callback instead of the built in filter in needBroadphaseCollision - btOverlapFilterCallback* m_overlapFilterCallback; - - public: - - btOverlappingPairCache(); - virtual ~btOverlappingPairCache(); - - virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher); - - void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher); - - void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher); - - btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - - void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - - void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - - - inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const - { - if (m_overlapFilterCallback) - return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1); - - bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0; - collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask); - - return collides; - } - - btBroadphasePairArray& getOverlappingPairArray() - { - return m_overlappingPairArray; - } - - const btBroadphasePairArray& getOverlappingPairArray() const - { - return m_overlappingPairArray; - } - - - - - btBroadphasePair* getOverlappingPairArrayPtr() - { - return &m_overlappingPairArray[0]; - } - - const btBroadphasePair* getOverlappingPairArrayPtr() const - { - return &m_overlappingPairArray[0]; - } - - int getNumOverlappingPairs() const - { - return m_overlappingPairArray.size(); - } - - btOverlapFilterCallback* getOverlapFilterCallback() - { - return m_overlapFilterCallback; - } - - void setOverlapFilterCallback(btOverlapFilterCallback* callback) - { - m_overlapFilterCallback = callback; - } - -}; -#endif //USE_HASH_PAIRCACHE - -#endif //OVERLAPPING_PAIR_CACHE_H - - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h deleted file mode 100644 index b8d967dc4b2..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h +++ /dev/null @@ -1,37 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef OVERLAPPING_PAIR_CALLBACK_H -#define OVERLAPPING_PAIR_CALLBACK_H - -///btOverlappingPairCallback provides user callback to keep track of overlap between objects, like a collision sensor -class btOverlappingPairCallback -{ -public: - virtual ~btOverlappingPairCallback() - { - - } - - virtual void addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; - - virtual void removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0; - - virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0) = 0; - -}; - -#endif //OVERLAPPING_PAIR_CALLBACK_H \ No newline at end of file diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp deleted file mode 100644 index e0bb0992933..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btSimpleBroadphase.h" -#include -#include - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" -#include "LinearMath/btMatrix3x3.h" -#include - -extern int gOverlappingPairs; - -void btSimpleBroadphase::validate() -{ - for (int i=0;i~btOverlappingPairCache(); - btAlignedFree(m_pairCache); - } -} - - -btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher) -{ - if (m_numHandles >= m_maxHandles) - { - btAssert(0); - return 0; //should never happen, but don't let the game crash ;-) - } - assert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]); - - int newHandleIndex = allocHandle(); - btSimpleBroadphaseProxy* proxy = new (&m_pHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask); - - return proxy; -} - -class RemovingOverlapCallback : public btOverlapCallback -{ -protected: - virtual bool processOverlap(btBroadphasePair& pair) - { - (void)pair; - btAssert(0); - return false; - } -}; - -class RemovePairContainingProxy -{ - - btBroadphaseProxy* m_targetProxy; - public: - virtual ~RemovePairContainingProxy() - { - } -protected: - virtual bool processOverlap(btBroadphasePair& pair) - { - btSimpleBroadphaseProxy* proxy0 = static_cast(pair.m_pProxy0); - btSimpleBroadphaseProxy* proxy1 = static_cast(pair.m_pProxy1); - - return ((m_targetProxy == proxy0 || m_targetProxy == proxy1)); - }; -}; - -void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg,btDispatcher* dispatcher) -{ - - btSimpleBroadphaseProxy* proxy0 = static_cast(proxyOrg); - freeHandle(proxy0); - - m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg,dispatcher); - - //validate(); - -} - -void btSimpleBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher) -{ - btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy); - sbp->m_min = aabbMin; - sbp->m_max = aabbMax; -} - - - - - - - - - -bool btSimpleBroadphase::aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1) -{ - return proxy0->m_min[0] <= proxy1->m_max[0] && proxy1->m_min[0] <= proxy0->m_max[0] && - proxy0->m_min[1] <= proxy1->m_max[1] && proxy1->m_min[1] <= proxy0->m_max[1] && - proxy0->m_min[2] <= proxy1->m_max[2] && proxy1->m_min[2] <= proxy0->m_max[2]; - -} - - - -//then remove non-overlapping ones -class CheckOverlapCallback : public btOverlapCallback -{ -public: - virtual bool processOverlap(btBroadphasePair& pair) - { - return (!btSimpleBroadphase::aabbOverlap(static_cast(pair.m_pProxy0),static_cast(pair.m_pProxy1))); - } -}; - -void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher) -{ - //first check for new overlapping pairs - int i,j; - - if (m_firstAllocatedHandle >= 0) - { - - btSimpleBroadphaseProxy* proxy0 = &m_pHandles[m_firstAllocatedHandle]; - - for (i=0;ifindPair(proxy0,proxy1)) - { - m_pairCache->addOverlappingPair(proxy0,proxy1); - } - } else - { - #ifdef USE_HASH_PAIRCACHE - if ( m_pairCache->findPair(proxy0,proxy1)) - { - m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher); - } - #endif //USE_HASH_PAIRCACHE - - } - } - proxy1 = &m_pHandles[proxy1->GetNextAllocated()]; - - } - proxy0 = &m_pHandles[proxy0->GetNextAllocated()]; - - } - - #ifndef USE_HASH_PAIRCACHE - - if (m_ownsPairCache) - { - - btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray(); - - //perform a sort, to find duplicates and to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; - - - btBroadphasePair previousPair; - previousPair.m_pProxy0 = 0; - previousPair.m_pProxy1 = 0; - previousPair.m_algorithm = 0; - - - for (i=0;iprocessOverlap(pair); - } else - { - needsRemoval = true; - } - } else - { - //remove duplicate - needsRemoval = true; - //should have no algorithm - btAssert(!pair.m_algorithm); - } - - if (needsRemoval) - { - m_pairCache->cleanOverlappingPair(pair,dispatcher); - - // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); - // m_overlappingPairArray.pop_back(); - pair.m_pProxy0 = 0; - pair.m_pProxy1 = 0; - m_invalidPair++; - gOverlappingPairs--; - } - - } - - ///if you don't like to skip the invalid pairs in the array, execute following code: - #define CLEAN_INVALID_PAIRS 1 - #ifdef CLEAN_INVALID_PAIRS - - //perform a sort, to sort 'invalid' pairs to the end - overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); - - overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair); - m_invalidPair = 0; - #endif//CLEAN_INVALID_PAIRS - - } - #endif //USE_HASH_PAIRCACHE - } -} - - -bool btSimpleBroadphase::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) -{ - btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0); - btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1); - return aabbOverlap(p0,p1); -} - - - diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h deleted file mode 100644 index 09367a79d2b..00000000000 --- a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SIMPLE_BROADPHASE_H -#define SIMPLE_BROADPHASE_H - - -#include "btOverlappingPairCache.h" - - -struct btSimpleBroadphaseProxy : public btBroadphaseProxy -{ - btVector3 m_min; - btVector3 m_max; - int m_nextFree; - int m_nextAllocated; -// int m_handleId; - - - btSimpleBroadphaseProxy() {}; - - btSimpleBroadphaseProxy(const btPoint3& minpt,const btPoint3& maxpt,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask) - :btBroadphaseProxy(userPtr,collisionFilterGroup,collisionFilterMask), - m_min(minpt),m_max(maxpt) - { - (void)shapeType; - } - - - SIMD_FORCE_INLINE void SetNextFree(int next) {m_nextFree = next;} - SIMD_FORCE_INLINE int GetNextFree() const {return m_nextFree;} - - SIMD_FORCE_INLINE void SetNextAllocated(int next) {m_nextAllocated = next;} - SIMD_FORCE_INLINE int GetNextAllocated() const {return m_nextAllocated;} - - -}; - -///SimpleBroadphase is a brute force aabb culling broadphase based on O(n^2) aabb checks -///btSimpleBroadphase is just a unit-test implementation to verify and test other broadphases. -///So please don't use this class, but use bt32BitAxisSweep3 or btAxisSweep3 instead! -class btSimpleBroadphase : public btBroadphaseInterface -{ - -protected: - - int m_numHandles; // number of active handles - int m_maxHandles; // max number of handles - btSimpleBroadphaseProxy* m_pHandles; // handles pool - int m_firstFreeHandle; // free handles list - int m_firstAllocatedHandle; - - int allocHandle() - { - - int freeHandle = m_firstFreeHandle; - m_firstFreeHandle = m_pHandles[freeHandle].GetNextFree(); - - m_pHandles[freeHandle].SetNextAllocated(m_firstAllocatedHandle); - m_firstAllocatedHandle = freeHandle; - - m_numHandles++; - - return freeHandle; - } - - void freeHandle(btSimpleBroadphaseProxy* proxy) - { - int handle = int(proxy-m_pHandles); - btAssert(handle >= 0 && handle < m_maxHandles); - - proxy->SetNextFree(m_firstFreeHandle); - m_firstFreeHandle = handle; - - m_firstAllocatedHandle = proxy->GetNextAllocated(); - proxy->SetNextAllocated(-1); - - m_numHandles--; - } - - - btOverlappingPairCache* m_pairCache; - bool m_ownsPairCache; - - int m_invalidPair; - - - - inline btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy) - { - btSimpleBroadphaseProxy* proxy0 = static_cast(proxy); - return proxy0; - } - - - void validate(); - -protected: - - - - -public: - btSimpleBroadphase(int maxProxies=16384,btOverlappingPairCache* overlappingPairCache=0); - virtual ~btSimpleBroadphase(); - - - static bool aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1); - - - virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher); - - virtual void calculateOverlappingPairs(btDispatcher* dispatcher); - - virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher); - virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher); - - btOverlappingPairCache* getOverlappingPairCache() - { - return m_pairCache; - } - const btOverlappingPairCache* getOverlappingPairCache() const - { - return m_pairCache; - } - - bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); - - -}; - - - -#endif //SIMPLE_BROADPHASE_H - diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt deleted file mode 100644 index d2d3dc6fabf..00000000000 --- a/extern/bullet2/src/BulletCollision/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ - -INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src } -) - -ADD_LIBRARY(LibBulletCollision - BroadphaseCollision/btAxisSweep3.cpp - BroadphaseCollision/btBroadphaseProxy.cpp - BroadphaseCollision/btCollisionAlgorithm.cpp - BroadphaseCollision/btDispatcher.cpp - BroadphaseCollision/btMultiSapBroadphase.cpp - BroadphaseCollision/btOverlappingPairCache.cpp - BroadphaseCollision/btSimpleBroadphase.cpp - CollisionDispatch/btCollisionDispatcher.cpp - CollisionDispatch/btCollisionObject.cpp - CollisionDispatch/btCollisionWorld.cpp - CollisionDispatch/btCompoundCollisionAlgorithm.cpp - CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp - CollisionDispatch/btDefaultCollisionConfiguration.cpp - CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp - CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp - CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp - CollisionDispatch/btConvexConvexAlgorithm.cpp - CollisionDispatch/btEmptyCollisionAlgorithm.cpp - CollisionDispatch/btManifoldResult.cpp - CollisionDispatch/btSimulationIslandManager.cpp - CollisionDispatch/btUnionFind.cpp - CollisionDispatch/SphereTriangleDetector.cpp - CollisionShapes/btBoxShape.cpp - CollisionShapes/btBvhTriangleMeshShape.cpp - CollisionShapes/btCapsuleShape.cpp - CollisionShapes/btCollisionShape.cpp - CollisionShapes/btCompoundShape.cpp - CollisionShapes/btConcaveShape.cpp - CollisionShapes/btConeShape.cpp - CollisionShapes/btConvexHullShape.cpp - CollisionShapes/btConvexShape.cpp - CollisionShapes/btConvexInternalShape.cpp - CollisionShapes/btConvexTriangleMeshShape.cpp - CollisionShapes/btCylinderShape.cpp - CollisionShapes/btEmptyShape.cpp - CollisionShapes/btHeightfieldTerrainShape.cpp - CollisionShapes/btMinkowskiSumShape.cpp - CollisionShapes/btMultiSphereShape.cpp - CollisionShapes/btOptimizedBvh.cpp - CollisionShapes/btPolyhedralConvexShape.cpp - CollisionShapes/btTetrahedronShape.cpp - CollisionShapes/btSphereShape.cpp - CollisionShapes/btStaticPlaneShape.cpp - CollisionShapes/btStridingMeshInterface.cpp - CollisionShapes/btTriangleCallback.cpp - CollisionShapes/btTriangleBuffer.cpp - CollisionShapes/btTriangleIndexVertexArray.cpp - CollisionShapes/btTriangleMesh.cpp - CollisionShapes/btTriangleMeshShape.cpp - CollisionShapes/btUniformScalingShape.cpp - NarrowPhaseCollision/btContinuousConvexCollision.cpp - NarrowPhaseCollision/btGjkEpa.cpp - NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp - NarrowPhaseCollision/btConvexCast.cpp - NarrowPhaseCollision/btGjkConvexCast.cpp - NarrowPhaseCollision/btGjkPairDetector.cpp - NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp - NarrowPhaseCollision/btPersistentManifold.cpp - NarrowPhaseCollision/btRaycastCallback.cpp - NarrowPhaseCollision/btSubSimplexConvexCast.cpp - NarrowPhaseCollision/btVoronoiSimplexSolver.cpp -) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp deleted file mode 100644 index 81133670f0c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "LinearMath/btScalar.h" -#include "SphereTriangleDetector.h" -#include "BulletCollision/CollisionShapes/btTriangleShape.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" - - -SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle) -:m_sphere(sphere), -m_triangle(triangle) -{ - -} - -void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) -{ - - (void)debugDraw; - const btTransform& transformA = input.m_transformA; - const btTransform& transformB = input.m_transformB; - - btVector3 point,normal; - btScalar timeOfImpact = btScalar(1.); - btScalar depth = btScalar(0.); -// output.m_distance = btScalar(1e30); - //move sphere into triangle space - btTransform sphereInTr = transformB.inverseTimes(transformA); - - if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact)) - { - output.addContactPoint(transformB.getBasis()*normal,transformB*point,depth); - } - -} - -#define MAX_OVERLAP btScalar(0.) - - - -// See also geometrictools.com -// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv -btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest) { - btVector3 diff = p - from; - btVector3 v = to - from; - btScalar t = v.dot(diff); - - if (t > 0) { - btScalar dotVV = v.dot(v); - if (t < dotVV) { - t /= dotVV; - diff -= t*v; - } else { - t = 1; - diff -= v; - } - } else - t = 0; - - nearest = from + t*v; - return diff.dot(diff); -} - -bool SphereTriangleDetector::facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal) { - btVector3 lp(p); - btVector3 lnormal(normal); - - return pointInTriangle(vertices, lnormal, &lp); -} - -///combined discrete/continuous sphere-triangle -bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact) -{ - - const btVector3* vertices = &m_triangle->getVertexPtr(0); - const btVector3& c = sphereCenter; - btScalar r = m_sphere->getRadius(); - - btVector3 delta (0,0,0); - - btVector3 normal = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]); - normal.normalize(); - btVector3 p1ToCentre = c - vertices[0]; - btScalar distanceFromPlane = p1ToCentre.dot(normal); - - if (distanceFromPlane < btScalar(0.)) - { - //triangle facing the other way - - distanceFromPlane *= btScalar(-1.); - normal *= btScalar(-1.); - } - - ///todo: move this gContactBreakingThreshold into a proper structure - extern btScalar gContactBreakingThreshold; - - btScalar contactMargin = gContactBreakingThreshold; - bool isInsideContactPlane = distanceFromPlane < r + contactMargin; - bool isInsideShellPlane = distanceFromPlane < r; - - btScalar deltaDotNormal = delta.dot(normal); - if (!isInsideShellPlane && deltaDotNormal >= btScalar(0.0)) - return false; - - // Check for contact / intersection - bool hasContact = false; - btVector3 contactPoint; - if (isInsideContactPlane) { - if (facecontains(c,vertices,normal)) { - // Inside the contact wedge - touches a point on the shell plane - hasContact = true; - contactPoint = c - normal*distanceFromPlane; - } else { - // Could be inside one of the contact capsules - btScalar contactCapsuleRadiusSqr = (r + contactMargin) * (r + contactMargin); - btVector3 nearestOnEdge; - for (int i = 0; i < m_triangle->getNumEdges(); i++) { - - btPoint3 pa; - btPoint3 pb; - - m_triangle->getEdge(i,pa,pb); - - btScalar distanceSqr = SegmentSqrDistance(pa,pb,c, nearestOnEdge); - if (distanceSqr < contactCapsuleRadiusSqr) { - // Yep, we're inside a capsule - hasContact = true; - contactPoint = nearestOnEdge; - } - - } - } - } - - if (hasContact) { - btVector3 contactToCentre = c - contactPoint; - btScalar distanceSqr = contactToCentre.length2(); - if (distanceSqr < (r - MAX_OVERLAP)*(r - MAX_OVERLAP)) { - btScalar distance = btSqrt(distanceSqr); - resultNormal = contactToCentre; - resultNormal.normalize(); - point = contactPoint; - depth = -(r-distance); - return true; - } - - if (delta.dot(contactToCentre) >= btScalar(0.0)) - return false; - - // Moving towards the contact point -> collision - point = contactPoint; - timeOfImpact = btScalar(0.0); - return true; - } - - return false; -} - - -bool SphereTriangleDetector::pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p ) -{ - const btVector3* p1 = &vertices[0]; - const btVector3* p2 = &vertices[1]; - const btVector3* p3 = &vertices[2]; - - btVector3 edge1( *p2 - *p1 ); - btVector3 edge2( *p3 - *p2 ); - btVector3 edge3( *p1 - *p3 ); - - btVector3 p1_to_p( *p - *p1 ); - btVector3 p2_to_p( *p - *p2 ); - btVector3 p3_to_p( *p - *p3 ); - - btVector3 edge1_normal( edge1.cross(normal)); - btVector3 edge2_normal( edge2.cross(normal)); - btVector3 edge3_normal( edge3.cross(normal)); - - btScalar r1, r2, r3; - r1 = edge1_normal.dot( p1_to_p ); - r2 = edge2_normal.dot( p2_to_p ); - r3 = edge3_normal.dot( p3_to_p ); - if ( ( r1 > 0 && r2 > 0 && r3 > 0 ) || - ( r1 <= 0 && r2 <= 0 && r3 <= 0 ) ) - return true; - return false; - -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h deleted file mode 100644 index 0c817b221c8..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SPHERE_TRIANGLE_DETECTOR_H -#define SPHERE_TRIANGLE_DETECTOR_H - -#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "LinearMath/btPoint3.h" - - -class btSphereShape; -class btTriangleShape; - - - -/// sphere-triangle to match the btDiscreteCollisionDetectorInterface -struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface -{ - virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw); - - SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle); - - virtual ~SphereTriangleDetector() {}; - -private: - - bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact); - bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p ); - bool facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal); - - btSphereShape* m_sphere; - btTriangleShape* m_triangle; - - -}; -#endif //SPHERE_TRIANGLE_DETECTOR_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h deleted file mode 100644 index fad770ac26d..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h +++ /dev/null @@ -1,47 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_COLLISION_CONFIGURATION -#define BT_COLLISION_CONFIGURATION -struct btCollisionAlgorithmCreateFunc; - -class btStackAlloc; -class btPoolAllocator; - -///btCollisionConfiguration allows to configure Bullet collision detection -///stack allocator size, default collision algorithms and persistent manifold pool size -///todo: describe the meaning -class btCollisionConfiguration -{ - -public: - - virtual ~btCollisionConfiguration() - { - } - - ///memory pools - virtual btPoolAllocator* getPersistentManifoldPool() = 0; - - virtual btPoolAllocator* getCollisionAlgorithmPool() = 0; - - virtual btStackAlloc* getStackAllocator() = 0; - - virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0; - -}; - -#endif //BT_COLLISION_CONFIGURATION - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h deleted file mode 100644 index c6728918d16..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION_CREATE_FUNC -#define COLLISION_CREATE_FUNC - -#include "LinearMath/btAlignedObjectArray.h" -typedef btAlignedObjectArray btCollisionObjectArray; -class btCollisionAlgorithm; -class btCollisionObject; - -struct btCollisionAlgorithmConstructionInfo; - -///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm -struct btCollisionAlgorithmCreateFunc -{ - bool m_swapped; - - btCollisionAlgorithmCreateFunc() - :m_swapped(false) - { - } - virtual ~btCollisionAlgorithmCreateFunc(){}; - - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , btCollisionObject* body0,btCollisionObject* body1) - { - - (void)body0; - (void)body1; - return 0; - } -}; -#endif //COLLISION_CREATE_FUNC - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp deleted file mode 100644 index 644caf2677b..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp +++ /dev/null @@ -1,287 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#include "btCollisionDispatcher.h" - - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" - -#include "BulletCollision/CollisionShapes/btCollisionShape.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" -#include "LinearMath/btPoolAllocator.h" -#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h" - -int gNumManifold = 0; - -#include - - - -btCollisionDispatcher::btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration): - m_count(0), - m_useIslands(true), - m_collisionConfiguration(collisionConfiguration) -{ - int i; - - setNearCallback(defaultNearCallback); - - m_collisionAlgorithmPoolAllocator = collisionConfiguration->getCollisionAlgorithmPool(); - - m_persistentManifoldPoolAllocator = collisionConfiguration->getPersistentManifoldPool(); - - for (i=0;igetCollisionAlgorithmCreateFunc(i,j); - assert(m_doubleDispatch[i][j]); - } - } - - -}; - - -void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc *createFunc) -{ - m_doubleDispatch[proxyType0][proxyType1] = createFunc; -} - -btCollisionDispatcher::~btCollisionDispatcher() -{ -} - -btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1) -{ - gNumManifold++; - - //btAssert(gNumManifold < 65535); - - - btCollisionObject* body0 = (btCollisionObject*)b0; - btCollisionObject* body1 = (btCollisionObject*)b1; - - void* mem = 0; - - if (m_persistentManifoldPoolAllocator->getFreeCount()) - { - mem = m_persistentManifoldPoolAllocator->allocate(sizeof(btPersistentManifold)); - } else - { - mem = btAlignedAlloc(sizeof(btPersistentManifold),16); - - } - btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0); - manifold->m_index1a = m_manifoldsPtr.size(); - m_manifoldsPtr.push_back(manifold); - - return manifold; -} - -void btCollisionDispatcher::clearManifold(btPersistentManifold* manifold) -{ - manifold->clearManifold(); -} - - -void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold) -{ - - gNumManifold--; - - //printf("releaseManifold: gNumManifold %d\n",gNumManifold); - clearManifold(manifold); - - int findIndex = manifold->m_index1a; - btAssert(findIndex < m_manifoldsPtr.size()); - m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1); - m_manifoldsPtr[findIndex]->m_index1a = findIndex; - m_manifoldsPtr.pop_back(); - - manifold->~btPersistentManifold(); - if (m_persistentManifoldPoolAllocator->validPtr(manifold)) - { - m_persistentManifoldPoolAllocator->free(manifold); - } else - { - btAlignedFree(manifold); - } - -} - - - -btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold) -{ - - btCollisionAlgorithmConstructionInfo ci; - - ci.m_dispatcher1 = this; - ci.m_manifold = sharedManifold; - btCollisionAlgorithm* algo = m_doubleDispatch[body0->getCollisionShape()->getShapeType()][body1->getCollisionShape()->getShapeType()]->CreateCollisionAlgorithm(ci,body0,body1); - - return algo; -} - - - - - -bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionObject* body1) -{ - //here you can do filtering - bool hasResponse = - (body0->hasContactResponse() && body1->hasContactResponse()); - //no response between two static/kinematic bodies: - hasResponse = hasResponse && - ((!body0->isStaticOrKinematicObject()) ||(! body1->isStaticOrKinematicObject())); - return hasResponse; -} - -bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionObject* body1) -{ - assert(body0); - assert(body1); - - bool needsCollision = true; - - //broadphase filtering already deals with this - if ((body0->isStaticObject() || body0->isKinematicObject()) && - (body1->isStaticObject() || body1->isKinematicObject())) - { - printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n"); - } - - if ((!body0->isActive()) && (!body1->isActive())) - needsCollision = false; - else if (!body0->checkCollideWith(body1)) - needsCollision = false; - - return needsCollision ; - -} - - - -///interface for iterating all overlapping collision pairs, no matter how those pairs are stored (array, set, map etc) -///this is useful for the collision dispatcher. -class btCollisionPairCallback : public btOverlapCallback -{ - btDispatcherInfo& m_dispatchInfo; - btCollisionDispatcher* m_dispatcher; - -public: - - btCollisionPairCallback(btDispatcherInfo& dispatchInfo,btCollisionDispatcher* dispatcher) - :m_dispatchInfo(dispatchInfo), - m_dispatcher(dispatcher) - { - } - - btCollisionPairCallback& operator=(btCollisionPairCallback& other) - { - m_dispatchInfo = other.m_dispatchInfo; - m_dispatcher = other.m_dispatcher; - return *this; - } - - virtual ~btCollisionPairCallback() {} - - - virtual bool processOverlap(btBroadphasePair& pair) - { - (*m_dispatcher->getNearCallback())(pair,*m_dispatcher,m_dispatchInfo); - - return false; - } -}; - - -void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) -{ - //m_blockedForChanges = true; - - btCollisionPairCallback collisionCallback(dispatchInfo,this); - - pairCache->processAllOverlappingPairs(&collisionCallback,dispatcher); - - //m_blockedForChanges = false; - -} - - - - -//by default, Bullet will use this near callback -void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo) -{ - btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject; - btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject; - - if (dispatcher.needsCollision(colObj0,colObj1)) - { - //dispatcher will keep algorithms persistent in the collision pair - if (!collisionPair.m_algorithm) - { - collisionPair.m_algorithm = dispatcher.findAlgorithm(colObj0,colObj1); - } - - if (collisionPair.m_algorithm) - { - btManifoldResult contactPointResult(colObj0,colObj1); - - if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE) - { - //discrete collision detection query - collisionPair.m_algorithm->processCollision(colObj0,colObj1,dispatchInfo,&contactPointResult); - } else - { - //continuous collision detection query, time of impact (toi) - btScalar toi = collisionPair.m_algorithm->calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&contactPointResult); - if (dispatchInfo.m_timeOfImpact > toi) - dispatchInfo.m_timeOfImpact = toi; - - } - } - } - -} - - -void* btCollisionDispatcher::allocateCollisionAlgorithm(int size) -{ - if (m_collisionAlgorithmPoolAllocator->getFreeCount()) - { - return m_collisionAlgorithmPoolAllocator->allocate(size); - } - - //warn user for overflow? - return btAlignedAlloc(size,16); -} - -void btCollisionDispatcher::freeCollisionAlgorithm(void* ptr) -{ - if (m_collisionAlgorithmPoolAllocator->validPtr(ptr)) - { - m_collisionAlgorithmPoolAllocator->free(ptr); - } else - { - btAlignedFree(ptr); - } -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h deleted file mode 100644 index 45aaa1bd90d..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h +++ /dev/null @@ -1,145 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION__DISPATCHER_H -#define COLLISION__DISPATCHER_H - -#include "BulletCollision/BroadphaseCollision/btDispatcher.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" - -#include "BulletCollision/CollisionDispatch/btManifoldResult.h" - -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "LinearMath/btAlignedObjectArray.h" - -class btIDebugDraw; -class btOverlappingPairCache; -class btPoolAllocator; -class btCollisionConfiguration; - -#include "btCollisionCreateFunc.h" - -#define USE_DISPATCH_REGISTRY_ARRAY 1 - -class btCollisionDispatcher; -///user can override this nearcallback for collision filtering and more finegrained control over collision detection -typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo); - - -///btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs. -///Time of Impact, Closest Points and Penetration Depth. -class btCollisionDispatcher : public btDispatcher -{ - int m_count; - - btAlignedObjectArray m_manifoldsPtr; - - bool m_useIslands; - - btManifoldResult m_defaultManifoldResult; - - btNearCallback m_nearCallback; - - btPoolAllocator* m_collisionAlgorithmPoolAllocator; - - btPoolAllocator* m_persistentManifoldPoolAllocator; - - btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES]; - - - btCollisionConfiguration* m_collisionConfiguration; - - -public: - - ///registerCollisionCreateFunc allows registration of custom/alternative collision create functions - void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc); - - int getNumManifolds() const - { - return int( m_manifoldsPtr.size()); - } - - btPersistentManifold** getInternalManifoldPointer() - { - return &m_manifoldsPtr[0]; - } - - btPersistentManifold* getManifoldByIndexInternal(int index) - { - return m_manifoldsPtr[index]; - } - - const btPersistentManifold* getManifoldByIndexInternal(int index) const - { - return m_manifoldsPtr[index]; - } - - btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration); - - virtual ~btCollisionDispatcher(); - - virtual btPersistentManifold* getNewManifold(void* b0,void* b1); - - virtual void releaseManifold(btPersistentManifold* manifold); - - - virtual void clearManifold(btPersistentManifold* manifold); - - - btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold = 0); - - virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1); - - virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1); - - virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher); - - void setNearCallback(btNearCallback nearCallback) - { - m_nearCallback = nearCallback; - } - - btNearCallback getNearCallback() const - { - return m_nearCallback; - } - - //by default, Bullet will use this near callback - static void defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo); - - virtual void* allocateCollisionAlgorithm(int size); - - virtual void freeCollisionAlgorithm(void* ptr); - - btCollisionConfiguration* getCollisionConfiguration() - { - return m_collisionConfiguration; - } - - const btCollisionConfiguration* getCollisionConfiguration() const - { - return m_collisionConfiguration; - } - - void setCollisionConfiguration(btCollisionConfiguration* config) - { - m_collisionConfiguration = config; - } - -}; - -#endif //COLLISION__DISPATCHER_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp deleted file mode 100644 index 6b72a131c4f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btCollisionObject.h" - -btCollisionObject::btCollisionObject() - : m_broadphaseHandle(0), - m_collisionShape(0), - m_collisionFlags(0), - m_islandTag1(-1), - m_companionId(-1), - m_activationState1(1), - m_deactivationTime(btScalar(0.)), - m_userObjectPointer(0), - m_internalOwner(0), - m_hitFraction(btScalar(1.)), - m_ccdSweptSphereRadius(btScalar(0.)), - m_ccdSquareMotionThreshold(btScalar(0.)), - m_checkCollideWith(false) -{ - -} - -btCollisionObject::~btCollisionObject() -{ -} - -void btCollisionObject::setActivationState(int newState) -{ - if ( (m_activationState1 != DISABLE_DEACTIVATION) && (m_activationState1 != DISABLE_SIMULATION)) - m_activationState1 = newState; -} - -void btCollisionObject::forceActivationState(int newState) -{ - m_activationState1 = newState; -} - -void btCollisionObject::activate(bool forceActivation) -{ - if (forceActivation || !(m_collisionFlags & (CF_STATIC_OBJECT|CF_KINEMATIC_OBJECT))) - { - setActivationState(ACTIVE_TAG); - m_deactivationTime = btScalar(0.); - } -} - - - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h deleted file mode 100644 index 7c1ddbf1e2d..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h +++ /dev/null @@ -1,349 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION_OBJECT_H -#define COLLISION_OBJECT_H - -#include "LinearMath/btTransform.h" - -//island management, m_activationState1 -#define ACTIVE_TAG 1 -#define ISLAND_SLEEPING 2 -#define WANTS_DEACTIVATION 3 -#define DISABLE_DEACTIVATION 4 -#define DISABLE_SIMULATION 5 - -struct btBroadphaseProxy; -class btCollisionShape; -#include "LinearMath/btMotionState.h" -#include "LinearMath/btAlignedAllocator.h" - - - -/// btCollisionObject can be used to manage collision detection objects. -/// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy. -/// They can be added to the btCollisionWorld. -ATTRIBUTE_ALIGNED16(class) btCollisionObject -{ - -protected: - - btTransform m_worldTransform; - - ///m_interpolationWorldTransform is used for CCD and interpolation - ///it can be either previous or future (predicted) transform - btTransform m_interpolationWorldTransform; - //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities) - //without destroying the continuous interpolated motion (which uses this interpolation velocities) - btVector3 m_interpolationLinearVelocity; - btVector3 m_interpolationAngularVelocity; - btBroadphaseProxy* m_broadphaseHandle; - btCollisionShape* m_collisionShape; - - int m_collisionFlags; - - int m_islandTag1; - int m_companionId; - - int m_activationState1; - btScalar m_deactivationTime; - - btScalar m_friction; - btScalar m_restitution; - - ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer - void* m_userObjectPointer; - - ///m_internalOwner is reserved to point to Bullet's btRigidBody. Don't use this, use m_userObjectPointer instead. - void* m_internalOwner; - - ///time of impact calculation - btScalar m_hitFraction; - - ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: - btScalar m_ccdSweptSphereRadius; - - /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold - btScalar m_ccdSquareMotionThreshold; - - /// If some object should have elaborate collision filtering by sub-classes - bool m_checkCollideWith; - - char m_pad[7]; - - virtual bool checkCollideWithOverride(btCollisionObject* co) - { - return true; - } - -public: - - BT_DECLARE_ALIGNED_ALLOCATOR(); - - enum CollisionFlags - { - CF_STATIC_OBJECT= 1, - CF_KINEMATIC_OBJECT= 2, - CF_NO_CONTACT_RESPONSE = 4, - CF_CUSTOM_MATERIAL_CALLBACK = 8//this allows per-triangle material (friction/restitution) - }; - - - SIMD_FORCE_INLINE bool mergesSimulationIslands() const - { - ///static objects, kinematic and object without contact response don't merge islands - return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0); - } - - - SIMD_FORCE_INLINE bool isStaticObject() const { - return (m_collisionFlags & CF_STATIC_OBJECT) != 0; - } - - SIMD_FORCE_INLINE bool isKinematicObject() const - { - return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0; - } - - SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const - { - return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ; - } - - SIMD_FORCE_INLINE bool hasContactResponse() const { - return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0; - } - - - btCollisionObject(); - - virtual ~btCollisionObject(); - - void setCollisionShape(btCollisionShape* collisionShape) - { - m_collisionShape = collisionShape; - } - - SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const - { - return m_collisionShape; - } - - SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() - { - return m_collisionShape; - } - - - - - int getActivationState() const { return m_activationState1;} - - void setActivationState(int newState); - - void setDeactivationTime(btScalar time) - { - m_deactivationTime = time; - } - btScalar getDeactivationTime() const - { - return m_deactivationTime; - } - - void forceActivationState(int newState); - - void activate(bool forceActivation = false); - - inline bool isActive() const - { - return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION)); - } - - void setRestitution(btScalar rest) - { - m_restitution = rest; - } - btScalar getRestitution() const - { - return m_restitution; - } - void setFriction(btScalar frict) - { - m_friction = frict; - } - btScalar getFriction() const - { - return m_friction; - } - - ///reserved for Bullet internal usage - void* getInternalOwner() - { - return m_internalOwner; - } - - const void* getInternalOwner() const - { - return m_internalOwner; - } - - btTransform& getWorldTransform() - { - return m_worldTransform; - } - - const btTransform& getWorldTransform() const - { - return m_worldTransform; - } - - void setWorldTransform(const btTransform& worldTrans) - { - m_worldTransform = worldTrans; - } - - - btBroadphaseProxy* getBroadphaseHandle() - { - return m_broadphaseHandle; - } - - const btBroadphaseProxy* getBroadphaseHandle() const - { - return m_broadphaseHandle; - } - - void setBroadphaseHandle(btBroadphaseProxy* handle) - { - m_broadphaseHandle = handle; - } - - - const btTransform& getInterpolationWorldTransform() const - { - return m_interpolationWorldTransform; - } - - btTransform& getInterpolationWorldTransform() - { - return m_interpolationWorldTransform; - } - - void setInterpolationWorldTransform(const btTransform& trans) - { - m_interpolationWorldTransform = trans; - } - - - const btVector3& getInterpolationLinearVelocity() const - { - return m_interpolationLinearVelocity; - } - - const btVector3& getInterpolationAngularVelocity() const - { - return m_interpolationAngularVelocity; - } - - const int getIslandTag() const - { - return m_islandTag1; - } - - void setIslandTag(int tag) - { - m_islandTag1 = tag; - } - - const int getCompanionId() const - { - return m_companionId; - } - - void setCompanionId(int id) - { - m_companionId = id; - } - - const btScalar getHitFraction() const - { - return m_hitFraction; - } - - void setHitFraction(btScalar hitFraction) - { - m_hitFraction = hitFraction; - } - - - const int getCollisionFlags() const - { - return m_collisionFlags; - } - - void setCollisionFlags(int flags) - { - m_collisionFlags = flags; - } - - ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: - btScalar getCcdSweptSphereRadius() const - { - return m_ccdSweptSphereRadius; - } - - ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: - void setCcdSweptSphereRadius(btScalar radius) - { - m_ccdSweptSphereRadius = radius; - } - - btScalar getCcdSquareMotionThreshold() const - { - return m_ccdSquareMotionThreshold; - } - - - /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold - void setCcdSquareMotionThreshold(btScalar ccdSquareMotionThreshold) - { - m_ccdSquareMotionThreshold = ccdSquareMotionThreshold; - } - - ///users can point to their objects, userPointer is not used by Bullet - void* getUserPointer() const - { - return m_userObjectPointer; - } - - ///users can point to their objects, userPointer is not used by Bullet - void setUserPointer(void* userPointer) - { - m_userObjectPointer = userPointer; - } - - inline bool checkCollideWith(btCollisionObject* co) - { - if (m_checkCollideWith) - return checkCollideWithOverride(co); - - return true; - } - - -} -; - -#endif //COLLISION_OBJECT_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp deleted file mode 100644 index b4828508bcb..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp +++ /dev/null @@ -1,370 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btCollisionWorld.h" -#include "btCollisionDispatcher.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/CollisionShapes/btCollisionShape.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" - -#include "BulletCollision/CollisionShapes/btSphereShape.h" //for raycasting -#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" //for raycasting -#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" -#include "BulletCollision/CollisionShapes/btCompoundShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h" - -#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" -#include "LinearMath/btAabbUtil2.h" -#include "LinearMath/btQuickprof.h" -#include "LinearMath/btStackAlloc.h" - -//When the user doesn't provide dispatcher or broadphase, create basic versions (and delete them in destructor) -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" -#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h" - - -btCollisionWorld::btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache, btCollisionConfiguration* collisionConfiguration) -:m_dispatcher1(dispatcher), -m_broadphasePairCache(pairCache) -{ - m_stackAlloc = collisionConfiguration->getStackAllocator(); - m_dispatchInfo.m_stackAllocator = m_stackAlloc; -} - - -btCollisionWorld::~btCollisionWorld() -{ - - //clean up remaining objects - int i; - for (i=0;igetBroadphaseHandle(); - if (bp) - { - // - // only clear the cached algorithms - // - getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1); - getBroadphase()->destroyProxy(bp,m_dispatcher1); - } - } - - -} - - - - - - - - - - -void btCollisionWorld::addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup,short int collisionFilterMask) -{ - - //check that the object isn't already added - btAssert( m_collisionObjects.findLinearSearch(collisionObject) == m_collisionObjects.size()); - - m_collisionObjects.push_back(collisionObject); - - //calculate new AABB - btTransform trans = collisionObject->getWorldTransform(); - - btVector3 minAabb; - btVector3 maxAabb; - collisionObject->getCollisionShape()->getAabb(trans,minAabb,maxAabb); - - int type = collisionObject->getCollisionShape()->getShapeType(); - collisionObject->setBroadphaseHandle( getBroadphase()->createProxy( - minAabb, - maxAabb, - type, - collisionObject, - collisionFilterGroup, - collisionFilterMask, - m_dispatcher1 - )) ; - - - - - -} - - - - -void btCollisionWorld::performDiscreteCollisionDetection() -{ - btDispatcherInfo& dispatchInfo = getDispatchInfo(); - - BEGIN_PROFILE("perform Broadphase Collision Detection"); - - - //update aabb (of all moved objects) - - btVector3 aabbMin,aabbMax; - for (int i=0;igetCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),aabbMin,aabbMax); - m_broadphasePairCache->setAabb(m_collisionObjects[i]->getBroadphaseHandle(),aabbMin,aabbMax,m_dispatcher1); - } - - m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1); - - END_PROFILE("perform Broadphase Collision Detection"); - - BEGIN_PROFILE("performDiscreteCollisionDetection"); - - btDispatcher* dispatcher = getDispatcher(); - if (dispatcher) - dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1); - - END_PROFILE("performDiscreteCollisionDetection"); - -} - - - -void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject) -{ - - - //bool removeFromBroadphase = false; - - { - - btBroadphaseProxy* bp = collisionObject->getBroadphaseHandle(); - if (bp) - { - // - // only clear the cached algorithms - // - getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1); - getBroadphase()->destroyProxy(bp,m_dispatcher1); - collisionObject->setBroadphaseHandle(0); - } - } - - - //swapremove - m_collisionObjects.remove(collisionObject); - -} - - - -void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, - btCollisionObject* collisionObject, - const btCollisionShape* collisionShape, - const btTransform& colObjWorldTransform, - RayResultCallback& resultCallback,short int collisionFilterMask) -{ - - btSphereShape pointShape(btScalar(0.0)); - pointShape.setMargin(0.f); - - objectQuerySingle(&pointShape,rayFromTrans,rayToTrans, - collisionObject, - collisionShape, - colObjWorldTransform, - resultCallback,collisionFilterMask); -} - -void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const btTransform& rayFromTrans,const btTransform& rayToTrans, - btCollisionObject* collisionObject, - const btCollisionShape* collisionShape, - const btTransform& colObjWorldTransform, - RayResultCallback& resultCallback,short int collisionFilterMask) -{ - - - if (collisionShape->isConvex()) - { - btConvexCast::CastResult castResult; - castResult.m_fraction = btScalar(1.);//?? - - btConvexShape* convexShape = (btConvexShape*) collisionShape; - btVoronoiSimplexSolver simplexSolver; -#define USE_SUBSIMPLEX_CONVEX_CAST 1 -#ifdef USE_SUBSIMPLEX_CONVEX_CAST - btSubsimplexConvexCast convexCaster(castShape,convexShape,&simplexSolver); -#else - //btGjkConvexCast convexCaster(castShape,convexShape,&simplexSolver); - //btContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0); -#endif //#USE_SUBSIMPLEX_CONVEX_CAST - - if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult)) - { - //add hit - if (castResult.m_normal.length2() > btScalar(0.0001)) - { - - if (castResult.m_fraction < resultCallback.m_closestHitFraction) - { -#ifdef USE_SUBSIMPLEX_CONVEX_CAST - //rotate normal into worldspace - castResult.m_normal = rayFromTrans.getBasis() * castResult.m_normal; -#endif //USE_SUBSIMPLEX_CONVEX_CAST - - castResult.m_normal.normalize(); - btCollisionWorld::LocalRayResult localRayResult - ( - collisionObject, - 0, - castResult.m_normal, - castResult.m_fraction - ); - - bool normalInWorldSpace = true; - resultCallback.AddSingleResult(localRayResult, normalInWorldSpace); - - } - } - } - } - else - { - - if (collisionShape->isConcave()) - { - - btTriangleMeshShape* triangleMesh = (btTriangleMeshShape*)collisionShape; - - btTransform worldTocollisionObject = colObjWorldTransform.inverse(); - - btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin(); - btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin(); - - //ConvexCast::CastResult - - struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback - { - btCollisionWorld::RayResultCallback* m_resultCallback; - btCollisionObject* m_collisionObject; - btTriangleMeshShape* m_triangleMesh; - - BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to, - btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh): - btTriangleRaycastCallback(from,to), - m_resultCallback(resultCallback), - m_collisionObject(collisionObject), - m_triangleMesh(triangleMesh) - { - } - - - virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex ) - { - btCollisionWorld::LocalShapeInfo shapeInfo; - shapeInfo.m_shapePart = partId; - shapeInfo.m_triangleIndex = triangleIndex; - - btCollisionWorld::LocalRayResult rayResult - (m_collisionObject, - &shapeInfo, - hitNormalLocal, - hitFraction); - - bool normalInWorldSpace = false; - return m_resultCallback->AddSingleResult(rayResult,normalInWorldSpace); - - - } - - }; - - - BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,triangleMesh); - rcb.m_hitFraction = resultCallback.m_closestHitFraction; - - btVector3 rayAabbMinLocal = rayFromLocal; - rayAabbMinLocal.setMin(rayToLocal); - btVector3 rayAabbMaxLocal = rayFromLocal; - rayAabbMaxLocal.setMax(rayToLocal); - - triangleMesh->processAllTriangles(&rcb,rayAabbMinLocal,rayAabbMaxLocal); - - } else - { - //todo: use AABB tree or other BVH acceleration structure! - if (collisionShape->isCompound()) - { - const btCompoundShape* compoundShape = static_cast(collisionShape); - int i=0; - for (i=0;igetNumChildShapes();i++) - { - btTransform childTrans = compoundShape->getChildTransform(i); - const btCollisionShape* childCollisionShape = compoundShape->getChildShape(i); - btTransform childWorldTrans = colObjWorldTransform * childTrans; - objectQuerySingle(castShape, rayFromTrans,rayToTrans, - collisionObject, - childCollisionShape, - childWorldTrans, - resultCallback, collisionFilterMask); - - } - - - } - } - } -} - -void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback,short int collisionFilterMask) -{ - - - btTransform rayFromTrans,rayToTrans; - rayFromTrans.setIdentity(); - rayFromTrans.setOrigin(rayFromWorld); - rayToTrans.setIdentity(); - - rayToTrans.setOrigin(rayToWorld); - - /// go over all objects, and if the ray intersects their aabb, do a ray-shape query using convexCaster (CCD) - - int i; - for (i=0;igetBroadphaseHandle()->m_collisionFilterGroup & collisionFilterMask) { - //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); - btVector3 collisionObjectAabbMin,collisionObjectAabbMax; - collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax); - - btScalar hitLambda = btScalar(1.); //could use resultCallback.m_closestHitFraction, but needs testing - btVector3 hitNormal; - if (btRayAabb(rayFromWorld,rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal)) - { - rayTestSingle(rayFromTrans,rayToTrans, - collisionObject, - collisionObject->getCollisionShape(), - collisionObject->getWorldTransform(), - resultCallback); - } - } - } - -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h deleted file mode 100644 index bda03ccedeb..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h +++ /dev/null @@ -1,259 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -/** - * @mainpage Bullet Documentation - * - * @section intro_sec Introduction - * Bullet Collision Detection & Physics SDK - * - * Bullet is a Collision Detection and Rigid Body Dynamics Library. The Library is Open Source and free for commercial use, under the ZLib license ( http://opensource.org/licenses/zlib-license.php ). - * - * There is the Physics Forum for Feedback and bteral Collision Detection and Physics discussions. - * Please visit http://www.continuousphysics.com/Bullet/phpBB2/index.php - * - * @section install_sec Installation - * - * @subsection step1 Step 1: Download - * You can download the Bullet Physics Library from our website: http://www.continuousphysics.com/Bullet/ - * @subsection step2 Step 2: Building - * Bullet comes with autogenerated Project Files for Microsoft Visual Studio 6, 7, 7.1 and 8. - * The main Workspace/Solution is located in Bullet/msvc/8/wksbullet.sln (replace 8 with your version). - * - * Under other platforms, like Linux or Mac OS-X, Bullet can be build using either using cmake, http://www.cmake.org, or jam, http://www.perforce.com/jam/jam.html . cmake can autogenerate Xcode, KDevelop, MSVC and other build systems. just run cmake . in the root of Bullet. - * Jam is a build system that can build the library, demos and also autogenerate the MSVC Project Files. - * So if you are not using MSVC, you can run configure and jam . - * If you don't have jam installed, you can make jam from the included jam-2.5 sources, or download jam from ftp://ftp.perforce.com/pub/jam/ - * - * @subsection step3 Step 3: Testing demos - * Try to run and experiment with CcdPhysicsDemo executable as a starting point. - * Bullet can be used in several ways, as Full Rigid Body simulation, as Collision Detector Library or Low Level / Snippets like the GJK Closest Point calculation. - * The Dependencies can be seen in this documentation under Directories - * - * @subsection step4 Step 4: Integrating in your application, Full Rigid Body Simulation - * Check out CcdPhysicsDemo how to create a btDynamicsWorld, btRigidBody and btCollisionShape, Stepping the simulation and synchronizing your graphics object transform. - * PLEASE NOTE THE CcdPhysicsEnvironment and CcdPhysicsController is obsolete and will be removed. It has been replaced by classes derived frmo btDynamicsWorld and btRididBody - * @subsection step5 Step 5 : Integrate the Collision Detection Library (without Dynamics and other Extras) - * Bullet Collision Detection can also be used without the Dynamics/Extras. - * Check out btCollisionWorld and btCollisionObject, and the CollisionInterfaceDemo. Also in Extras/test_BulletOde.cpp there is a sample Collision Detection integration with Open Dynamics Engine, ODE, http://www.ode.org - * @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calculation. - * Bullet has been designed in a modular way keeping dependencies to a minimum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetector. - * - * @section copyright Copyright - * Copyright (C) 2005-2007 Erwin Coumans, some contributions Copyright Gino van den Bergen, Christer Ericson, Simon Hobbs, Ricardo Padrela, F Richter(res), Stephane Redon - * Special thanks to all visitors of the Bullet Physics forum, and in particular above contributors, Dave Eberle, Dirk Gregorius, Erin Catto, Dave Eberle, Adam Moravanszky, - * Pierre Terdiman, Kenny Erleben, Russell Smith, Oliver Strunk, Jan Paul van Waveren, Marten Svanfeldt. - * - */ - - - -#ifndef COLLISION_WORLD_H -#define COLLISION_WORLD_H - -class btStackAlloc; -class btCollisionShape; -class btConvexShape; -class btBroadphaseInterface; -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" -#include "btCollisionObject.h" -#include "btCollisionDispatcher.h" //for definition of btCollisionObjectArray -#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" -#include "LinearMath/btAlignedObjectArray.h" - -///CollisionWorld is interface and container for the collision detection -class btCollisionWorld -{ - - -protected: - - btAlignedObjectArray m_collisionObjects; - - btDispatcher* m_dispatcher1; - - btDispatcherInfo m_dispatchInfo; - - btStackAlloc* m_stackAlloc; - - btBroadphaseInterface* m_broadphasePairCache; - -public: - - //this constructor doesn't own the dispatcher and paircache/broadphase - btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphasePairCache, btCollisionConfiguration* collisionConfiguration); - - virtual ~btCollisionWorld(); - - - btBroadphaseInterface* getBroadphase() - { - return m_broadphasePairCache; - } - - btOverlappingPairCache* getPairCache() - { - return m_broadphasePairCache->getOverlappingPairCache(); - } - - - btDispatcher* getDispatcher() - { - return m_dispatcher1; - } - - ///LocalShapeInfo gives extra information for complex shapes - ///Currently, only btTriangleMeshShape is available, so it just contains triangleIndex and subpart - struct LocalShapeInfo - { - int m_shapePart; - int m_triangleIndex; - - //const btCollisionShape* m_shapeTemp; - //const btTransform* m_shapeLocalTransform; - }; - - struct LocalRayResult - { - LocalRayResult(btCollisionObject* collisionObject, - LocalShapeInfo* localShapeInfo, - const btVector3& hitNormalLocal, - btScalar hitFraction) - :m_collisionObject(collisionObject), - m_localShapeInfo(localShapeInfo), - m_hitNormalLocal(hitNormalLocal), - m_hitFraction(hitFraction) - { - } - - btCollisionObject* m_collisionObject; - LocalShapeInfo* m_localShapeInfo; - btVector3 m_hitNormalLocal; - btScalar m_hitFraction; - - }; - - ///RayResultCallback is used to report new raycast results - struct RayResultCallback - { - virtual ~RayResultCallback() - { - } - btScalar m_closestHitFraction; - bool HasHit() - { - return (m_closestHitFraction < btScalar(1.)); - } - - RayResultCallback() - :m_closestHitFraction(btScalar(1.)) - { - } - virtual btScalar AddSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace) = 0; - }; - - struct ClosestRayResultCallback : public RayResultCallback - { - ClosestRayResultCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld) - :m_rayFromWorld(rayFromWorld), - m_rayToWorld(rayToWorld), - m_collisionObject(0) - { - } - - btVector3 m_rayFromWorld;//used to calculate hitPointWorld from hitFraction - btVector3 m_rayToWorld; - - btVector3 m_hitNormalWorld; - btVector3 m_hitPointWorld; - btCollisionObject* m_collisionObject; - - virtual btScalar AddSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace) - { - -//caller already does the filter on the m_closestHitFraction - assert(rayResult.m_hitFraction <= m_closestHitFraction); - - m_closestHitFraction = rayResult.m_hitFraction; - m_collisionObject = rayResult.m_collisionObject; - if (normalInWorldSpace) - { - m_hitNormalWorld = rayResult.m_hitNormalLocal; - } else - { - ///need to transform normal into worldspace - m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal; - } - m_hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction); - return rayResult.m_hitFraction; - } - }; - - - - - int getNumCollisionObjects() const - { - return int(m_collisionObjects.size()); - } - - /// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback - /// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback. - void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback, short int collisionFilterMask=-1); - - /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. - /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape. - /// This allows more customization. - static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, - btCollisionObject* collisionObject, - const btCollisionShape* collisionShape, - const btTransform& colObjWorldTransform, - RayResultCallback& resultCallback, short int collisionFilterMask=-1); - - /// objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest. - static void objectQuerySingle(const btConvexShape* castShape, const btTransform& rayFromTrans,const btTransform& rayToTrans, - btCollisionObject* collisionObject, - const btCollisionShape* collisionShape, - const btTransform& colObjWorldTransform, - RayResultCallback& resultCallback, short int collisionFilterMask=-1); - - void addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup=1,short int collisionFilterMask=1); - - btCollisionObjectArray& getCollisionObjectArray() - { - return m_collisionObjects; - } - - const btCollisionObjectArray& getCollisionObjectArray() const - { - return m_collisionObjects; - } - - - void removeCollisionObject(btCollisionObject* collisionObject); - - virtual void performDiscreteCollisionDetection(); - - btDispatcherInfo& getDispatchInfo() - { - return m_dispatchInfo; - } - -}; - - -#endif //COLLISION_WORLD_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp deleted file mode 100644 index 7c0c7a3b0a9..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/CollisionShapes/btCompoundShape.h" - - -btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) -:btCollisionAlgorithm(ci), -m_isSwapped(isSwapped) -{ - btCollisionObject* colObj = m_isSwapped? body1 : body0; - btCollisionObject* otherObj = m_isSwapped? body0 : body1; - assert (colObj->getCollisionShape()->isCompound()); - - btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); - int numChildren = compoundShape->getNumChildShapes(); - int i; - - m_childCollisionAlgorithms.resize(numChildren); - for (i=0;igetChildShape(i); - btCollisionShape* orgShape = colObj->getCollisionShape(); - colObj->setCollisionShape( childShape ); - m_childCollisionAlgorithms[i] = ci.m_dispatcher1->findAlgorithm(colObj,otherObj); - colObj->setCollisionShape( orgShape ); - } -} - - -btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() -{ - int numChildren = m_childCollisionAlgorithms.size(); - int i; - for (i=0;i~btCollisionAlgorithm(); - m_dispatcher->freeCollisionAlgorithm(m_childCollisionAlgorithms[i]); - } -} - -void btCompoundCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - btCollisionObject* colObj = m_isSwapped? body1 : body0; - btCollisionObject* otherObj = m_isSwapped? body0 : body1; - - assert (colObj->getCollisionShape()->isCompound()); - btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); - - //We will use the OptimizedBVH, AABB tree to cull potential child-overlaps - //If both proxies are Compound, we will deal with that directly, by performing sequential/parallel tree traversals - //given Proxy0 and Proxy1, if both have a tree, Tree0 and Tree1, this means: - //determine overlapping nodes of Proxy1 using Proxy0 AABB against Tree1 - //then use each overlapping node AABB against Tree0 - //and vise versa. - - int numChildren = m_childCollisionAlgorithms.size(); - int i; - for (i=0;igetChildShape(i); - - //backup - btTransform orgTrans = colObj->getWorldTransform(); - btCollisionShape* orgShape = colObj->getCollisionShape(); - - const btTransform& childTrans = compoundShape->getChildTransform(i); - //btTransform newChildWorldTrans = orgTrans*childTrans ; - colObj->setWorldTransform( orgTrans*childTrans ); - //the contactpoint is still projected back using the original inverted worldtrans - colObj->setCollisionShape( childShape ); - m_childCollisionAlgorithms[i]->processCollision(colObj,otherObj,dispatchInfo,resultOut); - //revert back - colObj->setCollisionShape( orgShape); - colObj->setWorldTransform( orgTrans ); - } -} - -btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - - btCollisionObject* colObj = m_isSwapped? body1 : body0; - btCollisionObject* otherObj = m_isSwapped? body0 : body1; - - assert (colObj->getCollisionShape()->isCompound()); - - btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); - - //We will use the OptimizedBVH, AABB tree to cull potential child-overlaps - //If both proxies are Compound, we will deal with that directly, by performing sequential/parallel tree traversals - //given Proxy0 and Proxy1, if both have a tree, Tree0 and Tree1, this means: - //determine overlapping nodes of Proxy1 using Proxy0 AABB against Tree1 - //then use each overlapping node AABB against Tree0 - //and vise versa. - - btScalar hitFraction = btScalar(1.); - - int numChildren = m_childCollisionAlgorithms.size(); - int i; - for (i=0;igetChildShape(i); - - //backup - btTransform orgTrans = colObj->getWorldTransform(); - btCollisionShape* orgShape = colObj->getCollisionShape(); - - const btTransform& childTrans = compoundShape->getChildTransform(i); - //btTransform newChildWorldTrans = orgTrans*childTrans ; - colObj->setWorldTransform( orgTrans*childTrans ); - - colObj->setCollisionShape( childShape ); - btScalar frac = m_childCollisionAlgorithms[i]->calculateTimeOfImpact(colObj,otherObj,dispatchInfo,resultOut); - if (fracsetCollisionShape( orgShape); - colObj->setWorldTransform( orgTrans); - } - return hitFraction; - -} - - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h deleted file mode 100644 index a381d8b3c3f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COMPOUND_COLLISION_ALGORITHM_H -#define COMPOUND_COLLISION_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/BroadphaseCollision/btDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" - -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -class btDispatcher; -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "btCollisionCreateFunc.h" -#include "LinearMath/btAlignedObjectArray.h" -class btDispatcher; - -/// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes -/// Place holder, not fully implemented yet -class btCompoundCollisionAlgorithm : public btCollisionAlgorithm -{ - btAlignedObjectArray m_childCollisionAlgorithms; - bool m_isSwapped; - -public: - - btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); - - virtual ~btCompoundCollisionAlgorithm(); - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm)); - return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,false); - } - }; - - struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm)); - return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,true); - } - }; - -}; - -#endif //COMPOUND_COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp deleted file mode 100644 index 559b633feb9..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btConvexConcaveCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionShapes/btConcaveShape.h" -#include "BulletCollision/CollisionDispatch/btManifoldResult.h" -#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" -#include "BulletCollision/CollisionShapes/btTriangleShape.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "LinearMath/btIDebugDraw.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" - -btConvexConcaveCollisionAlgorithm::btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) -: btCollisionAlgorithm(ci), -m_isSwapped(isSwapped), -m_btConvexTriangleCallback(ci.m_dispatcher1,body0,body1,isSwapped) -{ -} - -btConvexConcaveCollisionAlgorithm::~btConvexConcaveCollisionAlgorithm() -{ -} - - - -btConvexTriangleCallback::btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped): - m_dispatcher(dispatcher), - m_dispatchInfoPtr(0) -{ - m_convexBody = isSwapped? body1:body0; - m_triBody = isSwapped? body0:body1; - - // - // create the manifold from the dispatcher 'manifold pool' - // - m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody); - - clearCache(); -} - -btConvexTriangleCallback::~btConvexTriangleCallback() -{ - clearCache(); - m_dispatcher->releaseManifold( m_manifoldPtr ); - -} - - -void btConvexTriangleCallback::clearCache() -{ - m_dispatcher->clearManifold(m_manifoldPtr); -}; - - - -void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex) -{ - - //just for debugging purposes - //printf("triangle %d",m_triangleCount++); - - - //aabb filter is already applied! - - btCollisionAlgorithmConstructionInfo ci; - ci.m_dispatcher1 = m_dispatcher; - - btCollisionObject* ob = static_cast(m_triBody); - - - - ///debug drawing of the overlapping triangles - if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0) - { - btVector3 color(255,255,0); - btTransform& tr = ob->getWorldTransform(); - m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(triangle[1]),color); - m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(triangle[2]),color); - m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(triangle[0]),color); - - //btVector3 center = triangle[0] + triangle[1]+triangle[2]; - //center *= btScalar(0.333333); - //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(center),color); - //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(center),color); - //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(center),color); - - } - - - //btCollisionObject* colObj = static_cast(m_convexProxy->m_clientObject); - - if (m_convexBody->getCollisionShape()->isConvex()) - { - btTriangleShape tm(triangle[0],triangle[1],triangle[2]); - tm.setMargin(m_collisionMarginTriangle); - - - btCollisionShape* tmpShape = ob->getCollisionShape(); - ob->setCollisionShape( &tm ); - - - btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr); - ///this should use the btDispatcher, so the actual registered algorithm is used - // btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody); - - m_resultOut->setShapeIdentifiers(-1,-1,partId,triangleIndex); - // cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex); -// cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); - colAlgo->processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); - colAlgo->~btCollisionAlgorithm(); - ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo); - ob->setCollisionShape( tmpShape ); - - } - - - -} - - - -void btConvexTriangleCallback::setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - m_dispatchInfoPtr = &dispatchInfo; - m_collisionMarginTriangle = collisionMarginTriangle; - m_resultOut = resultOut; - - //recalc aabbs - btTransform convexInTriangleSpace; - convexInTriangleSpace = m_triBody->getWorldTransform().inverse() * m_convexBody->getWorldTransform(); - btCollisionShape* convexShape = static_cast(m_convexBody->getCollisionShape()); - //CollisionShape* triangleShape = static_cast(triBody->m_collisionShape); - convexShape->getAabb(convexInTriangleSpace,m_aabbMin,m_aabbMax); - btScalar extraMargin = collisionMarginTriangle; - btVector3 extra(extraMargin,extraMargin,extraMargin); - - m_aabbMax += extra; - m_aabbMin -= extra; - -} - -void btConvexConcaveCollisionAlgorithm::clearCache() -{ - m_btConvexTriangleCallback.clearCache(); - -} - -void btConvexConcaveCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - - - btCollisionObject* convexBody = m_isSwapped ? body1 : body0; - btCollisionObject* triBody = m_isSwapped ? body0 : body1; - - if (triBody->getCollisionShape()->isConcave()) - { - - - btCollisionObject* triOb = triBody; - btConcaveShape* concaveShape = static_cast( triOb->getCollisionShape()); - - if (convexBody->getCollisionShape()->isConvex()) - { - btScalar collisionMarginTriangle = concaveShape->getMargin(); - - resultOut->setPersistentManifold(m_btConvexTriangleCallback.m_manifoldPtr); - m_btConvexTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,dispatchInfo,resultOut); - - //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here. - //m_dispatcher->clearManifold(m_btConvexTriangleCallback.m_manifoldPtr); - - m_btConvexTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody); - - concaveShape->processAllTriangles( &m_btConvexTriangleCallback,m_btConvexTriangleCallback.getAabbMin(),m_btConvexTriangleCallback.getAabbMax()); - - resultOut->refreshContactPoints(); - - } - - } - -} - - -btScalar btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)resultOut; - (void)dispatchInfo; - btCollisionObject* convexbody = m_isSwapped ? body1 : body0; - btCollisionObject* triBody = m_isSwapped ? body0 : body1; - - - //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast) - - //only perform CCD above a certain threshold, this prevents blocking on the long run - //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame... - btScalar squareMot0 = (convexbody->getInterpolationWorldTransform().getOrigin() - convexbody->getWorldTransform().getOrigin()).length2(); - if (squareMot0 < convexbody->getCcdSquareMotionThreshold()) - { - return btScalar(1.); - } - - //const btVector3& from = convexbody->m_worldTransform.getOrigin(); - //btVector3 to = convexbody->m_interpolationWorldTransform.getOrigin(); - //todo: only do if the motion exceeds the 'radius' - - btTransform triInv = triBody->getWorldTransform().inverse(); - btTransform convexFromLocal = triInv * convexbody->getWorldTransform(); - btTransform convexToLocal = triInv * convexbody->getInterpolationWorldTransform(); - - struct LocalTriangleSphereCastCallback : public btTriangleCallback - { - btTransform m_ccdSphereFromTrans; - btTransform m_ccdSphereToTrans; - btTransform m_meshTransform; - - btScalar m_ccdSphereRadius; - btScalar m_hitFraction; - - - LocalTriangleSphereCastCallback(const btTransform& from,const btTransform& to,btScalar ccdSphereRadius,btScalar hitFraction) - :m_ccdSphereFromTrans(from), - m_ccdSphereToTrans(to), - m_ccdSphereRadius(ccdSphereRadius), - m_hitFraction(hitFraction) - { - } - - - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) - { - (void)partId; - (void)triangleIndex; - //do a swept sphere for now - btTransform ident; - ident.setIdentity(); - btConvexCast::CastResult castResult; - castResult.m_fraction = m_hitFraction; - btSphereShape pointShape(m_ccdSphereRadius); - btTriangleShape triShape(triangle[0],triangle[1],triangle[2]); - btVoronoiSimplexSolver simplexSolver; - btSubsimplexConvexCast convexCaster(&pointShape,&triShape,&simplexSolver); - //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver); - //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0); - //local space? - - if (convexCaster.calcTimeOfImpact(m_ccdSphereFromTrans,m_ccdSphereToTrans, - ident,ident,castResult)) - { - if (m_hitFraction > castResult.m_fraction) - m_hitFraction = castResult.m_fraction; - } - - } - - }; - - - - - - if (triBody->getCollisionShape()->isConcave()) - { - btVector3 rayAabbMin = convexFromLocal.getOrigin(); - rayAabbMin.setMin(convexToLocal.getOrigin()); - btVector3 rayAabbMax = convexFromLocal.getOrigin(); - rayAabbMax.setMax(convexToLocal.getOrigin()); - btScalar ccdRadius0 = convexbody->getCcdSweptSphereRadius(); - rayAabbMin -= btVector3(ccdRadius0,ccdRadius0,ccdRadius0); - rayAabbMax += btVector3(ccdRadius0,ccdRadius0,ccdRadius0); - - btScalar curHitFraction = btScalar(1.); //is this available? - LocalTriangleSphereCastCallback raycastCallback(convexFromLocal,convexToLocal, - convexbody->getCcdSweptSphereRadius(),curHitFraction); - - raycastCallback.m_hitFraction = convexbody->getHitFraction(); - - btCollisionObject* concavebody = triBody; - - btConcaveShape* triangleMesh = (btConcaveShape*) concavebody->getCollisionShape(); - - if (triangleMesh) - { - triangleMesh->processAllTriangles(&raycastCallback,rayAabbMin,rayAabbMax); - } - - - - if (raycastCallback.m_hitFraction < convexbody->getHitFraction()) - { - convexbody->setHitFraction( raycastCallback.m_hitFraction); - return raycastCallback.m_hitFraction; - } - } - - return btScalar(1.); - -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h deleted file mode 100644 index da33e988991..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H -#define CONVEX_CONCAVE_COLLISION_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/BroadphaseCollision/btDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" -#include "BulletCollision/CollisionShapes/btTriangleCallback.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -class btDispatcher; -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "btCollisionCreateFunc.h" - -///For each triangle in the concave mesh that overlaps with the AABB of a convex (m_convexProxy), processTriangle is called. -class btConvexTriangleCallback : public btTriangleCallback -{ - btCollisionObject* m_convexBody; - btCollisionObject* m_triBody; - - btVector3 m_aabbMin; - btVector3 m_aabbMax ; - - btManifoldResult* m_resultOut; - - btDispatcher* m_dispatcher; - const btDispatcherInfo* m_dispatchInfoPtr; - btScalar m_collisionMarginTriangle; - -public: -int m_triangleCount; - - btPersistentManifold* m_manifoldPtr; - - btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); - - void setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual ~btConvexTriangleCallback(); - - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); - - void clearCache(); - - SIMD_FORCE_INLINE const btVector3& getAabbMin() const - { - return m_aabbMin; - } - SIMD_FORCE_INLINE const btVector3& getAabbMax() const - { - return m_aabbMax; - } - -}; - - - - -/// btConvexConcaveCollisionAlgorithm supports collision between convex shapes and (concave) trianges meshes. -class btConvexConcaveCollisionAlgorithm : public btCollisionAlgorithm -{ - - bool m_isSwapped; - - btConvexTriangleCallback m_btConvexTriangleCallback; - - -public: - - btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); - - virtual ~btConvexConcaveCollisionAlgorithm(); - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - void clearCache(); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm)); - return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); - } - }; - - struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm)); - return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); - } - }; - -}; - -#endif //CONVEX_CONCAVE_COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp deleted file mode 100644 index d1692cdac69..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btConvexConvexAlgorithm.h" - -#include -#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/CollisionShapes/btBoxShape.h" -#include "BulletCollision/CollisionDispatch/btManifoldResult.h" - -#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" - - - -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" - -#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" - -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" - - - - - - - - - -btConvexConvexAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) -{ - m_simplexSolver = simplexSolver; - m_pdSolver = pdSolver; -} - -btConvexConvexAlgorithm::CreateFunc::~CreateFunc() -{ -} - -btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) -: btCollisionAlgorithm(ci), -m_gjkPairDetector(0,0,simplexSolver,pdSolver), -m_ownManifold (false), -m_manifoldPtr(mf), -m_lowLevelOfDetail(false) -{ - (void)body0; - (void)body1; - - -} - - - - -btConvexConvexAlgorithm::~btConvexConvexAlgorithm() -{ - if (m_ownManifold) - { - if (m_manifoldPtr) - m_dispatcher->releaseManifold(m_manifoldPtr); - } -} - -void btConvexConvexAlgorithm ::setLowLevelOfDetail(bool useLowLevel) -{ - m_lowLevelOfDetail = useLowLevel; -} - - - - - -// -// Convex-Convex collision algorithm -// -void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - - if (!m_manifoldPtr) - { - //swapped? - m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1); - m_ownManifold = true; - } - resultOut->setPersistentManifold(m_manifoldPtr); - -#ifdef USE_BT_GJKEPA - btConvexShape* shape0(static_cast(body0->getCollisionShape())); - btConvexShape* shape1(static_cast(body1->getCollisionShape())); - const btScalar radialmargin(0/*shape0->getMargin()+shape1->getMargin()*/); - btGjkEpaSolver::sResults results; - if(btGjkEpaSolver::Collide( shape0,body0->getWorldTransform(), - shape1,body1->getWorldTransform(), - radialmargin,results)) - { - dispatchInfo.m_debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); - resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); - } -#else - - btConvexShape* min0 = static_cast(body0->getCollisionShape()); - btConvexShape* min1 = static_cast(body1->getCollisionShape()); - - btGjkPairDetector::ClosestPointInput input; - - //TODO: if (dispatchInfo.m_useContinuous) - m_gjkPairDetector.setMinkowskiA(min0); - m_gjkPairDetector.setMinkowskiB(min1); - input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold(); - input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared; - input.m_stackAlloc = dispatchInfo.m_stackAllocator; - -// input.m_maximumDistanceSquared = btScalar(1e30); - - input.m_transformA = body0->getWorldTransform(); - input.m_transformB = body1->getWorldTransform(); - - m_gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); -#endif - - if (m_ownManifold) - { - resultOut->refreshContactPoints(); - } - -} - - - -bool disableCcd = false; -btScalar btConvexConvexAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)resultOut; - (void)dispatchInfo; - ///Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold - - ///Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold - ///col0->m_worldTransform, - btScalar resultFraction = btScalar(1.); - - - btScalar squareMot0 = (col0->getInterpolationWorldTransform().getOrigin() - col0->getWorldTransform().getOrigin()).length2(); - btScalar squareMot1 = (col1->getInterpolationWorldTransform().getOrigin() - col1->getWorldTransform().getOrigin()).length2(); - - if (squareMot0 < col0->getCcdSquareMotionThreshold() && - squareMot1 < col1->getCcdSquareMotionThreshold()) - return resultFraction; - - if (disableCcd) - return btScalar(1.); - - - //An adhoc way of testing the Continuous Collision Detection algorithms - //One object is approximated as a sphere, to simplify things - //Starting in penetration should report no time of impact - //For proper CCD, better accuracy and handling of 'allowed' penetration should be added - //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies) - - - /// Convex0 against sphere for Convex1 - { - btConvexShape* convex0 = static_cast(col0->getCollisionShape()); - - btSphereShape sphere1(col1->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation - btConvexCast::CastResult result; - btVoronoiSimplexSolver voronoiSimplex; - //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); - ///Simplification, one object is simplified as a sphere - btGjkConvexCast ccd1( convex0 ,&sphere1,&voronoiSimplex); - //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); - if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(), - col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result)) - { - - //store result.m_fraction in both bodies - - if (col0->getHitFraction()> result.m_fraction) - col0->setHitFraction( result.m_fraction ); - - if (col1->getHitFraction() > result.m_fraction) - col1->setHitFraction( result.m_fraction); - - if (resultFraction > result.m_fraction) - resultFraction = result.m_fraction; - - } - - - - - } - - /// Sphere (for convex0) against Convex1 - { - btConvexShape* convex1 = static_cast(col1->getCollisionShape()); - - btSphereShape sphere0(col0->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation - btConvexCast::CastResult result; - btVoronoiSimplexSolver voronoiSimplex; - //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); - ///Simplification, one object is simplified as a sphere - btGjkConvexCast ccd1(&sphere0,convex1,&voronoiSimplex); - //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); - if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(), - col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result)) - { - - //store result.m_fraction in both bodies - - if (col0->getHitFraction() > result.m_fraction) - col0->setHitFraction( result.m_fraction); - - if (col1->getHitFraction() > result.m_fraction) - col1->setHitFraction( result.m_fraction); - - if (resultFraction > result.m_fraction) - resultFraction = result.m_fraction; - - } - } - - return resultFraction; - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h deleted file mode 100644 index ca58bce25f1..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONVEX_CONVEX_ALGORITHM_H -#define CONVEX_CONVEX_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "btCollisionCreateFunc.h" -#include "btCollisionDispatcher.h" - -class btConvexPenetrationDepthSolver; - -///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations. -class btConvexConvexAlgorithm : public btCollisionAlgorithm -{ - btGjkPairDetector m_gjkPairDetector; -public: - - bool m_ownManifold; - btPersistentManifold* m_manifoldPtr; - bool m_lowLevelOfDetail; - - -public: - - btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); - - virtual ~btConvexConvexAlgorithm(); - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - void setLowLevelOfDetail(bool useLowLevel); - - - const btPersistentManifold* getManifold() - { - return m_manifoldPtr; - } - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - btConvexPenetrationDepthSolver* m_pdSolver; - btSimplexSolverInterface* m_simplexSolver; - - CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); - - virtual ~CreateFunc(); - - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConvexAlgorithm)); - return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver); - } - }; - - -}; - -#endif //CONVEX_CONVEX_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp deleted file mode 100644 index 661270b9bcb..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp +++ /dev/null @@ -1,237 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btDefaultCollisionConfiguration.h" - -#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" - - - -#include "LinearMath/btStackAlloc.h" -#include "LinearMath/btPoolAllocator.h" - - - -#define DEFAULT_MAX_OVERLAPPING_PAIRS 65535 -#define DEFAULT_STACK_ALLOCATOR_SIZE (5*1024*1024) - - -btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btStackAlloc* stackAlloc,btPoolAllocator* persistentManifoldPool,btPoolAllocator* collisionAlgorithmPool) -{ - - void* mem = btAlignedAlloc(sizeof(btVoronoiSimplexSolver),16); - m_simplexSolver = new (mem)btVoronoiSimplexSolver(); - mem = btAlignedAlloc(sizeof(btGjkEpaPenetrationDepthSolver),16); - m_pdSolver = new (mem)btGjkEpaPenetrationDepthSolver; - - //default CreationFunctions, filling the m_doubleDispatch table - mem = btAlignedAlloc(sizeof(btConvexConvexAlgorithm::CreateFunc),16); - m_convexConvexCreateFunc = new(mem) btConvexConvexAlgorithm::CreateFunc(m_simplexSolver,m_pdSolver); - mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16); - m_convexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::CreateFunc; - mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16); - m_swappedConvexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::SwappedCreateFunc; - mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::CreateFunc),16); - m_compoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::CreateFunc; - mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::SwappedCreateFunc),16); - m_swappedCompoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::SwappedCreateFunc; - mem = btAlignedAlloc(sizeof(btEmptyAlgorithm::CreateFunc),16); - m_emptyCreateFunc = new(mem) btEmptyAlgorithm::CreateFunc; - - mem = btAlignedAlloc(sizeof(btSphereSphereCollisionAlgorithm::CreateFunc),16); - m_sphereSphereCF = new(mem) btSphereSphereCollisionAlgorithm::CreateFunc; - mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16); - m_sphereBoxCF = new(mem) btSphereBoxCollisionAlgorithm::CreateFunc; - mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16); - m_boxSphereCF = new (mem)btSphereBoxCollisionAlgorithm::CreateFunc; - m_boxSphereCF->m_swapped = true; - mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16); - m_sphereTriangleCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc; - mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16); - m_triangleSphereCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc; - m_triangleSphereCF->m_swapped = true; - - - ///calculate maximum element size, big enough to fit any collision algorithm in the memory pool - int maxSize = sizeof(btConvexConvexAlgorithm); - int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm); - int maxSize3 = sizeof(btCompoundCollisionAlgorithm); - int maxSize4 = sizeof(btEmptyAlgorithm); - - int collisionAlgorithmMaxElementSize = btMax(maxSize,maxSize2); - collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3); - collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize4); - - if (stackAlloc) - { - m_ownsStackAllocator = false; - this->m_stackAlloc = stackAlloc; - } else - { - m_ownsStackAllocator = true; - void* mem = btAlignedAlloc(sizeof(btStackAlloc),16); - m_stackAlloc = new(mem)btStackAlloc(DEFAULT_STACK_ALLOCATOR_SIZE); - } - - if (persistentManifoldPool) - { - m_ownsPersistentManifoldPool = false; - m_persistentManifoldPool = persistentManifoldPool; - } else - { - m_ownsPersistentManifoldPool = true; - void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16); - m_persistentManifoldPool = new (mem) btPoolAllocator(sizeof(btPersistentManifold),DEFAULT_MAX_OVERLAPPING_PAIRS); - } - - if (collisionAlgorithmPool) - { - m_ownsCollisionAlgorithmPool = false; - m_collisionAlgorithmPool = collisionAlgorithmPool; - } else - { - m_ownsCollisionAlgorithmPool = true; - void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16); - m_collisionAlgorithmPool = new(mem) btPoolAllocator(collisionAlgorithmMaxElementSize,DEFAULT_MAX_OVERLAPPING_PAIRS); - } - - -} - -btDefaultCollisionConfiguration::~btDefaultCollisionConfiguration() -{ - if (m_ownsStackAllocator) - { - m_stackAlloc->destroy(); - m_stackAlloc->~btStackAlloc(); - btAlignedFree(m_stackAlloc); - } - if (m_ownsCollisionAlgorithmPool) - { - m_collisionAlgorithmPool->~btPoolAllocator(); - btAlignedFree(m_collisionAlgorithmPool); - } - if (m_ownsPersistentManifoldPool) - { - m_persistentManifoldPool->~btPoolAllocator(); - btAlignedFree(m_persistentManifoldPool); - } - - m_convexConvexCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_convexConvexCreateFunc); - - m_convexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_convexConcaveCreateFunc); - m_swappedConvexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_swappedConvexConcaveCreateFunc); - - m_compoundCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_compoundCreateFunc); - - m_swappedCompoundCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_swappedCompoundCreateFunc); - - m_emptyCreateFunc->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_emptyCreateFunc); - - m_sphereSphereCF->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_sphereSphereCF); - - m_sphereBoxCF->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_sphereBoxCF); - m_boxSphereCF->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_boxSphereCF); - m_sphereTriangleCF->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_sphereTriangleCF); - m_triangleSphereCF->~btCollisionAlgorithmCreateFunc(); - btAlignedFree( m_triangleSphereCF); - - m_simplexSolver->~btVoronoiSimplexSolver(); - btAlignedFree(m_simplexSolver); - m_pdSolver->~btGjkEpaPenetrationDepthSolver(); - btAlignedFree(m_pdSolver); - - -} - - -btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) -{ - - - if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) - { - return m_sphereSphereCF; - } - - if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==BOX_SHAPE_PROXYTYPE)) - { - return m_sphereBoxCF; - } - - if ((proxyType0 == BOX_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) - { - return m_boxSphereCF; - } - - if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE ) && (proxyType1==TRIANGLE_SHAPE_PROXYTYPE)) - { - return m_sphereTriangleCF; - } - - if ((proxyType0 == TRIANGLE_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE)) - { - return m_triangleSphereCF; - } - - - if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConvex(proxyType1)) - { - return m_convexConvexCreateFunc; - } - - if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConcave(proxyType1)) - { - return m_convexConcaveCreateFunc; - } - - if (btBroadphaseProxy::isConvex(proxyType1) && btBroadphaseProxy::isConcave(proxyType0)) - { - return m_swappedConvexConcaveCreateFunc; - } - - if (btBroadphaseProxy::isCompound(proxyType0)) - { - return m_compoundCreateFunc; - } else - { - if (btBroadphaseProxy::isCompound(proxyType1)) - { - return m_swappedCompoundCreateFunc; - } - } - - //failed to find an algorithm - return m_emptyCreateFunc; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h deleted file mode 100644 index 2e99f1db18f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_DEFAULT_COLLISION_CONFIGURATION -#define BT_DEFAULT_COLLISION_CONFIGURATION - -#include "btCollisionConfiguration.h" -class btVoronoiSimplexSolver; -class btGjkEpaPenetrationDepthSolver; - - -///btCollisionConfiguration allows to configure Bullet collision detection -///stack allocator, pool memory allocators -///todo: describe the meaning -class btDefaultCollisionConfiguration : public btCollisionConfiguration -{ - - int m_persistentManifoldPoolSize; - - btStackAlloc* m_stackAlloc; - bool m_ownsStackAllocator; - - btPoolAllocator* m_persistentManifoldPool; - bool m_ownsPersistentManifoldPool; - - btPoolAllocator* m_collisionAlgorithmPool; - bool m_ownsCollisionAlgorithmPool; - - //default simplex/penetration depth solvers - btVoronoiSimplexSolver* m_simplexSolver; - btGjkEpaPenetrationDepthSolver* m_pdSolver; - - //default CreationFunctions, filling the m_doubleDispatch table - btCollisionAlgorithmCreateFunc* m_convexConvexCreateFunc; - btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc; - btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc; - btCollisionAlgorithmCreateFunc* m_compoundCreateFunc; - btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc; - btCollisionAlgorithmCreateFunc* m_emptyCreateFunc; - btCollisionAlgorithmCreateFunc* m_sphereSphereCF; - btCollisionAlgorithmCreateFunc* m_sphereBoxCF; - btCollisionAlgorithmCreateFunc* m_boxSphereCF; - btCollisionAlgorithmCreateFunc* m_sphereTriangleCF; - btCollisionAlgorithmCreateFunc* m_triangleSphereCF; - -public: - - btDefaultCollisionConfiguration(btStackAlloc* stackAlloc=0,btPoolAllocator* persistentManifoldPool=0,btPoolAllocator* collisionAlgorithmPool=0); - - virtual ~btDefaultCollisionConfiguration(); - - ///memory pools - virtual btPoolAllocator* getPersistentManifoldPool() - { - return m_persistentManifoldPool; - } - - virtual btPoolAllocator* getCollisionAlgorithmPool() - { - return m_collisionAlgorithmPool; - } - - virtual btStackAlloc* getStackAllocator() - { - return m_stackAlloc; - } - - - btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1); - - -}; - -#endif //BT_DEFAULT_COLLISION_CONFIGURATION - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp deleted file mode 100644 index 936054387c4..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btEmptyCollisionAlgorithm.h" - - - -btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) -{ -} - -void btEmptyAlgorithm::processCollision (btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) -{ -} - -btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) -{ - return btScalar(1.); -} - - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h deleted file mode 100644 index 89e7080780c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef EMPTY_ALGORITH -#define EMPTY_ALGORITH -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "btCollisionCreateFunc.h" -#include "btCollisionDispatcher.h" - -#define ATTRIBUTE_ALIGNED(a) - -///EmptyAlgorithm is a stub for unsupported collision pairs. -///The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a search every frame. -class btEmptyAlgorithm : public btCollisionAlgorithm -{ - -public: - - btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci); - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - (void)body0; - (void)body1; - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btEmptyAlgorithm)); - return new(mem) btEmptyAlgorithm(ci); - } - }; - -} ATTRIBUTE_ALIGNED(16); - -#endif //EMPTY_ALGORITH diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp deleted file mode 100644 index 61c4c231da4..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btManifoldResult.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" - - -///This is to allow MaterialCombiner/Custom Friction/Restitution values -ContactAddedCallback gContactAddedCallback=0; - -///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback; -inline btScalar calculateCombinedFriction(const btCollisionObject* body0,const btCollisionObject* body1) -{ - btScalar friction = body0->getFriction() * body1->getFriction(); - - const btScalar MAX_FRICTION = btScalar(10.); - if (friction < -MAX_FRICTION) - friction = -MAX_FRICTION; - if (friction > MAX_FRICTION) - friction = MAX_FRICTION; - return friction; - -} - -inline btScalar calculateCombinedRestitution(const btCollisionObject* body0,const btCollisionObject* body1) -{ - return body0->getRestitution() * body1->getRestitution(); -} - - - -btManifoldResult::btManifoldResult(btCollisionObject* body0,btCollisionObject* body1) - :m_manifoldPtr(0), - m_body0(body0), - m_body1(body1) -{ - m_rootTransA = body0->getWorldTransform(); - m_rootTransB = body1->getWorldTransform(); -} - - -void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) -{ - assert(m_manifoldPtr); - //order in manifold needs to match - - if (depth > m_manifoldPtr->getContactBreakingThreshold()) - return; - - bool isSwapped = m_manifoldPtr->getBody0() != m_body0; - - btVector3 pointA = pointInWorld + normalOnBInWorld * depth; - - btVector3 localA; - btVector3 localB; - - if (isSwapped) - { - localA = m_rootTransB.invXform(pointA ); - localB = m_rootTransA.invXform(pointInWorld); - } else - { - localA = m_rootTransA.invXform(pointA ); - localB = m_rootTransB.invXform(pointInWorld); - } - - btManifoldPoint newPt(localA,localB,normalOnBInWorld,depth); - newPt.m_positionWorldOnA = pointA; - newPt.m_positionWorldOnB = pointInWorld; - - int insertIndex = m_manifoldPtr->getCacheEntry(newPt); - - newPt.m_combinedFriction = calculateCombinedFriction(m_body0,m_body1); - newPt.m_combinedRestitution = calculateCombinedRestitution(m_body0,m_body1); - - - ///todo, check this for any side effects - if (insertIndex >= 0) - { - //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex); - m_manifoldPtr->replaceContactPoint(newPt,insertIndex); - } else - { - m_manifoldPtr->AddManifoldPoint(newPt); - } - - //User can override friction and/or restitution - if (gContactAddedCallback && - //and if either of the two bodies requires custom material - ((m_body0->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK) || - (m_body1->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK))) - { - //experimental feature info, for per-triangle material etc. - btCollisionObject* obj0 = isSwapped? m_body1 : m_body0; - btCollisionObject* obj1 = isSwapped? m_body0 : m_body1; - (*gContactAddedCallback)(newPt,obj0,m_partId0,m_index0,obj1,m_partId1,m_index1); - } - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h deleted file mode 100644 index 5aac9a46f6a..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef MANIFOLD_RESULT_H -#define MANIFOLD_RESULT_H - -class btCollisionObject; -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -class btManifoldPoint; - -#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" - -#include "LinearMath/btTransform.h" - -typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1); -extern ContactAddedCallback gContactAddedCallback; - - - -///btManifoldResult is a helper class to manage contact results. -class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result -{ - btPersistentManifold* m_manifoldPtr; - - //we need this for compounds - btTransform m_rootTransA; - btTransform m_rootTransB; - - btCollisionObject* m_body0; - btCollisionObject* m_body1; - int m_partId0; - int m_partId1; - int m_index0; - int m_index1; -public: - - btManifoldResult() - { - } - - btManifoldResult(btCollisionObject* body0,btCollisionObject* body1); - - virtual ~btManifoldResult() {}; - - void setPersistentManifold(btPersistentManifold* manifoldPtr) - { - m_manifoldPtr = manifoldPtr; - } - - const btPersistentManifold* getPersistentManifold() const - { - return m_manifoldPtr; - } - btPersistentManifold* getPersistentManifold() - { - return m_manifoldPtr; - } - - virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) - { - m_partId0=partId0; - m_partId1=partId1; - m_index0=index0; - m_index1=index1; - } - - virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth); - - SIMD_FORCE_INLINE void refreshContactPoints() - { - btAssert(m_manifoldPtr); - if (!m_manifoldPtr->getNumContacts()) - return; - - bool isSwapped = m_manifoldPtr->getBody0() != m_body0; - - if (isSwapped) - { - m_manifoldPtr->refreshContactPoints(m_rootTransB,m_rootTransA); - } else - { - m_manifoldPtr->refreshContactPoints(m_rootTransA,m_rootTransB); - } - } - - -}; - -#endif //MANIFOLD_RESULT_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp deleted file mode 100644 index 6c42d1706ff..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp +++ /dev/null @@ -1,359 +0,0 @@ - - -#include "LinearMath/btScalar.h" -#include "btSimulationIslandManager.h" -#include "BulletCollision/BroadphaseCollision/btDispatcher.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" - -#include -#include "LinearMath/btQuickprof.h" - -btSimulationIslandManager::btSimulationIslandManager() -{ -} - -btSimulationIslandManager::~btSimulationIslandManager() -{ -} - - -void btSimulationIslandManager::initUnionFind(int n) -{ - m_unionFind.reset(n); -} - - -void btSimulationIslandManager::findUnions(btDispatcher* dispatcher,btCollisionWorld* colWorld) -{ - - { - btBroadphasePair* pairPtr = colWorld->getPairCache()->getOverlappingPairArrayPtr(); - - for (int i=0;igetPairCache()->getNumOverlappingPairs();i++) - { - const btBroadphasePair& collisionPair = pairPtr[i]; - btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject; - btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject; - - if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && - ((colObj1) && ((colObj1)->mergesSimulationIslands()))) - { - - m_unionFind.unite((colObj0)->getIslandTag(), - (colObj1)->getIslandTag()); - } - } - } -} - - -void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher) -{ - - initUnionFind( int (colWorld->getCollisionObjectArray().size())); - - // put the index into m_controllers into m_tag - { - - int index = 0; - int i; - for (i=0;igetCollisionObjectArray().size(); i++) - { - btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; - collisionObject->setIslandTag(index); - collisionObject->setCompanionId(-1); - collisionObject->setHitFraction(btScalar(1.)); - index++; - - } - } - // do the union find - - findUnions(dispatcher,colWorld); - - - -} - - - - -void btSimulationIslandManager::storeIslandActivationState(btCollisionWorld* colWorld) -{ - // put the islandId ('find' value) into m_tag - { - - - int index = 0; - int i; - for (i=0;igetCollisionObjectArray().size();i++) - { - btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; - if (collisionObject->mergesSimulationIslands()) - { - collisionObject->setIslandTag( m_unionFind.find(index) ); - collisionObject->setCompanionId(-1); - } else - { - collisionObject->setIslandTag(-1); - collisionObject->setCompanionId(-2); - } - index++; - } - } -} - -inline int getIslandId(const btPersistentManifold* lhs) -{ - int islandId; - const btCollisionObject* rcolObj0 = static_cast(lhs->getBody0()); - const btCollisionObject* rcolObj1 = static_cast(lhs->getBody1()); - islandId= rcolObj0->getIslandTag()>=0?rcolObj0->getIslandTag():rcolObj1->getIslandTag(); - return islandId; - -} - - - -/// function object that routes calls to operator< -class btPersistentManifoldSortPredicate -{ - public: - - SIMD_FORCE_INLINE bool operator() ( const btPersistentManifold* lhs, const btPersistentManifold* rhs ) - { - return getIslandId(lhs) < getIslandId(rhs); - } -}; - - - - - -// -// todo: this is random access, it can be walked 'cache friendly'! -// -void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback) -{ - - BEGIN_PROFILE("islandUnionFindAndHeapSort"); - - //we are going to sort the unionfind array, and store the element id in the size - //afterwards, we clean unionfind, to make sure no-one uses it anymore - - getUnionFind().sortIslands(); - int numElem = getUnionFind().getNumElements(); - - int endIslandIndex=1; - int startIslandIndex; - - - //update the sleeping state for bodies, if all are sleeping - for ( startIslandIndex=0;startIslandIndexgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) - { - printf("error in island management\n"); - } - - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); - if (colObj0->getIslandTag() == islandId) - { - if (colObj0->getActivationState()== ACTIVE_TAG) - { - allSleeping = false; - } - if (colObj0->getActivationState()== DISABLE_DEACTIVATION) - { - allSleeping = false; - } - } - } - - - if (allSleeping) - { - int idx; - for (idx=startIslandIndex;idxgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) - { - printf("error in island management\n"); - } - - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); - - if (colObj0->getIslandTag() == islandId) - { - colObj0->setActivationState( ISLAND_SLEEPING ); - } - } - } else - { - - int idx; - for (idx=startIslandIndex;idxgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) - { - printf("error in island management\n"); - } - - assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); - - if (colObj0->getIslandTag() == islandId) - { - if ( colObj0->getActivationState() == ISLAND_SLEEPING) - { - colObj0->setActivationState( WANTS_DEACTIVATION); - } - } - } - } - } - - - int i; - int maxNumManifolds = dispatcher->getNumManifolds(); - -#define SPLIT_ISLANDS 1 -#ifdef SPLIT_ISLANDS - - -#endif //SPLIT_ISLANDS - - - for (i=0;igetManifoldByIndexInternal(i); - - btCollisionObject* colObj0 = static_cast(manifold->getBody0()); - btCollisionObject* colObj1 = static_cast(manifold->getBody1()); - - //todo: check sleeping conditions! - if (((colObj0) && colObj0->getActivationState() != ISLAND_SLEEPING) || - ((colObj1) && colObj1->getActivationState() != ISLAND_SLEEPING)) - { - - //kinematic objects don't merge islands, but wake up all connected objects - if (colObj0->isKinematicObject() && colObj0->getActivationState() != ISLAND_SLEEPING) - { - colObj1->activate(); - } - if (colObj1->isKinematicObject() && colObj1->getActivationState() != ISLAND_SLEEPING) - { - colObj0->activate(); - } -#ifdef SPLIT_ISLANDS - // //filtering for response - if (dispatcher->needsResponse(colObj0,colObj1)) - m_islandmanifold.push_back(manifold); -#endif //SPLIT_ISLANDS - } - } - -#ifndef SPLIT_ISLANDS - btPersistentManifold** manifold = dispatcher->getInternalManifoldPointer(); - - callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, -1); -#else - // Sort manifolds, based on islands - // Sort the vector using predicate and std::sort - //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate); - - int numManifolds = int (m_islandmanifold.size()); - - //we should do radix sort, it it much faster (O(n) instead of O (n log2(n)) - m_islandmanifold.heapSort(btPersistentManifoldSortPredicate()); - - //now process all active islands (sets of manifolds for now) - - int startManifoldIndex = 0; - int endManifoldIndex = 1; - - //int islandId; - - END_PROFILE("islandUnionFindAndHeapSort"); - - - -// printf("Start Islands\n"); - - //traverse the simulation islands, and call the solver, unless all objects are sleeping/deactivated - for ( startIslandIndex=0;startIslandIndexisActive()) - islandSleeping = true; - } - - - //find the accompanying contact manifold for this islandId - int numIslandManifolds = 0; - btPersistentManifold** startManifold = 0; - - if (startManifoldIndexProcessIsland(&m_islandBodies[0],m_islandBodies.size(),startManifold,numIslandManifolds, islandId); -// printf("Island callback of size:%d bodies, %d manifolds\n",islandBodies.size(),numIslandManifolds); - } - - if (numIslandManifolds) - { - startManifoldIndex = endManifoldIndex; - } - - m_islandBodies.resize(0); - } -#endif //SPLIT_ISLANDS - - m_islandmanifold.resize(0); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h deleted file mode 100644 index 01a059b5fbe..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SIMULATION_ISLAND_MANAGER_H -#define SIMULATION_ISLAND_MANAGER_H - -#include "BulletCollision/CollisionDispatch/btUnionFind.h" -#include "btCollisionCreateFunc.h" -#include "LinearMath/btAlignedObjectArray.h" - - -class btCollisionObject; -class btCollisionWorld; -class btDispatcher; -class btPersistentManifold; - - -///SimulationIslandManager creates and handles simulation islands, using btUnionFind -class btSimulationIslandManager -{ - btUnionFind m_unionFind; - - btAlignedObjectArray m_islandmanifold; - btAlignedObjectArray m_islandBodies; - - -public: - btSimulationIslandManager(); - virtual ~btSimulationIslandManager(); - - - void initUnionFind(int n); - - - btUnionFind& getUnionFind() { return m_unionFind;} - - virtual void updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher); - virtual void storeIslandActivationState(btCollisionWorld* world); - - - void findUnions(btDispatcher* dispatcher,btCollisionWorld* colWorld); - - - - struct IslandCallback - { - virtual ~IslandCallback() {}; - - virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,class btPersistentManifold** manifolds,int numManifolds, int islandId) = 0; - }; - - void buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback); - -}; - -#endif //SIMULATION_ISLAND_MANAGER_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp deleted file mode 100644 index 1e4bbce451d..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btSphereBoxCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionShapes/btBoxShape.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -//#include - -btSphereBoxCollisionAlgorithm::btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped) -: btCollisionAlgorithm(ci), -m_ownManifold(false), -m_manifoldPtr(mf), -m_isSwapped(isSwapped) -{ - btCollisionObject* sphereObj = m_isSwapped? col1 : col0; - btCollisionObject* boxObj = m_isSwapped? col0 : col1; - - if (!m_manifoldPtr && m_dispatcher->needsCollision(sphereObj,boxObj)) - { - m_manifoldPtr = m_dispatcher->getNewManifold(sphereObj,boxObj); - m_ownManifold = true; - } -} - - -btSphereBoxCollisionAlgorithm::~btSphereBoxCollisionAlgorithm() -{ - if (m_ownManifold) - { - if (m_manifoldPtr) - m_dispatcher->releaseManifold(m_manifoldPtr); - } -} - - - -void btSphereBoxCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)dispatchInfo; - (void)resultOut; - if (!m_manifoldPtr) - return; - - btCollisionObject* sphereObj = m_isSwapped? body1 : body0; - btCollisionObject* boxObj = m_isSwapped? body0 : body1; - - - btSphereShape* sphere0 = (btSphereShape*)sphereObj->getCollisionShape(); - - btVector3 normalOnSurfaceB; - btVector3 pOnBox,pOnSphere; - btVector3 sphereCenter = sphereObj->getWorldTransform().getOrigin(); - btScalar radius = sphere0->getRadius(); - - btScalar dist = getSphereDistance(boxObj,pOnBox,pOnSphere,sphereCenter,radius); - - resultOut->setPersistentManifold(m_manifoldPtr); - - if (dist < SIMD_EPSILON) - { - btVector3 normalOnSurfaceB = (pOnBox- pOnSphere).normalize(); - - /// report a contact. internally this will be kept persistent, and contact reduction is done - - resultOut->addContactPoint(normalOnSurfaceB,pOnBox,dist); - - } - - if (m_ownManifold) - { - if (m_manifoldPtr->getNumContacts()) - { - resultOut->refreshContactPoints(); - } - } - -} - -btScalar btSphereBoxCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)resultOut; - (void)dispatchInfo; - (void)col0; - (void)col1; - - //not yet - return btScalar(1.); -} - - -btScalar btSphereBoxCollisionAlgorithm::getSphereDistance(btCollisionObject* boxObj, btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius ) -{ - - btScalar margins; - btVector3 bounds[2]; - btBoxShape* boxShape= (btBoxShape*)boxObj->getCollisionShape(); - - bounds[0] = -boxShape->getHalfExtentsWithoutMargin(); - bounds[1] = boxShape->getHalfExtentsWithoutMargin(); - - margins = boxShape->getMargin();//also add sphereShape margin? - - const btTransform& m44T = boxObj->getWorldTransform(); - - btVector3 boundsVec[2]; - btScalar fPenetration; - - boundsVec[0] = bounds[0]; - boundsVec[1] = bounds[1]; - - btVector3 marginsVec( margins, margins, margins ); - - // add margins - bounds[0] += marginsVec; - bounds[1] -= marginsVec; - - ///////////////////////////////////////////////// - - btVector3 tmp, prel, n[6], normal, v3P; - btScalar fSep = btScalar(10000000.0), fSepThis; - - n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) ); - n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) ); - n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) ); - n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) ); - n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) ); - n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) ); - - // convert point in local space - prel = m44T.invXform( sphereCenter); - - bool bFound = false; - - v3P = prel; - - for (int i=0;i<6;i++) - { - int j = i<3? 0:1; - if ( (fSepThis = ((v3P-bounds[j]) .dot(n[i]))) > btScalar(0.0) ) - { - v3P = v3P - n[i]*fSepThis; - bFound = true; - } - } - - // - - if ( bFound ) - { - bounds[0] = boundsVec[0]; - bounds[1] = boundsVec[1]; - - normal = (prel - v3P).normalize(); - pointOnBox = v3P + normal*margins; - v3PointOnSphere = prel - normal*fRadius; - - if ( ((v3PointOnSphere - pointOnBox) .dot (normal)) > btScalar(0.0) ) - { - return btScalar(1.0); - } - - // transform back in world space - tmp = m44T( pointOnBox); - pointOnBox = tmp; - tmp = m44T( v3PointOnSphere); - v3PointOnSphere = tmp; - btScalar fSeps2 = (pointOnBox-v3PointOnSphere).length2(); - - //if this fails, fallback into deeper penetration case, below - if (fSeps2 > SIMD_EPSILON) - { - fSep = - btSqrt(fSeps2); - normal = (pointOnBox-v3PointOnSphere); - normal *= btScalar(1.)/fSep; - } - - return fSep; - } - - ////////////////////////////////////////////////// - // Deep penetration case - - fPenetration = getSpherePenetration( boxObj,pointOnBox, v3PointOnSphere, sphereCenter, fRadius,bounds[0],bounds[1] ); - - bounds[0] = boundsVec[0]; - bounds[1] = boundsVec[1]; - - if ( fPenetration <= btScalar(0.0) ) - return (fPenetration-margins); - else - return btScalar(1.0); -} - -btScalar btSphereBoxCollisionAlgorithm::getSpherePenetration( btCollisionObject* boxObj,btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax) -{ - - btVector3 bounds[2]; - - bounds[0] = aabbMin; - bounds[1] = aabbMax; - - btVector3 p0, tmp, prel, n[6], normal; - btScalar fSep = btScalar(-10000000.0), fSepThis; - - // set p0 and normal to a default value to shup up GCC - p0.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); - normal.setValue(btScalar(0.), btScalar(0.), btScalar(0.)); - - n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) ); - n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) ); - n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) ); - n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) ); - n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) ); - n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) ); - - const btTransform& m44T = boxObj->getWorldTransform(); - - // convert point in local space - prel = m44T.invXform( sphereCenter); - - /////////// - - for (int i=0;i<6;i++) - { - int j = i<3 ? 0:1; - if ( (fSepThis = ((prel-bounds[j]) .dot( n[i]))-fRadius) > btScalar(0.0) ) return btScalar(1.0); - if ( fSepThis > fSep ) - { - p0 = bounds[j]; normal = (btVector3&)n[i]; - fSep = fSepThis; - } - } - - pointOnBox = prel - normal*(normal.dot((prel-p0))); - v3PointOnSphere = pointOnBox + normal*fSep; - - // transform back in world space - tmp = m44T( pointOnBox); - pointOnBox = tmp; - tmp = m44T( v3PointOnSphere); v3PointOnSphere = tmp; - normal = (pointOnBox-v3PointOnSphere).normalize(); - - return fSep; - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h deleted file mode 100644 index b839dc4adb1..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SPHERE_BOX_COLLISION_ALGORITHM_H -#define SPHERE_BOX_COLLISION_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" -class btPersistentManifold; -#include "btCollisionDispatcher.h" - -#include "LinearMath/btVector3.h" - -/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. -/// Other features are frame-coherency (persistent data) and collision response. -class btSphereBoxCollisionAlgorithm : public btCollisionAlgorithm -{ - bool m_ownManifold; - btPersistentManifold* m_manifoldPtr; - bool m_isSwapped; - -public: - - btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped); - - virtual ~btSphereBoxCollisionAlgorithm(); - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - btScalar getSphereDistance( btCollisionObject* boxObj,btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius ); - - btScalar getSpherePenetration( btCollisionObject* boxObj, btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereBoxCollisionAlgorithm)); - if (!m_swapped) - { - return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,false); - } else - { - return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,true); - } - } - }; - -}; - -#endif //SPHERE_BOX_COLLISION_ALGORITHM_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp deleted file mode 100644 index e7f42647e61..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btSphereSphereCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" - -btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1) -: btCollisionAlgorithm(ci), -m_ownManifold(false), -m_manifoldPtr(mf) -{ - if (!m_manifoldPtr) - { - m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1); - m_ownManifold = true; - } -} - -btSphereSphereCollisionAlgorithm::~btSphereSphereCollisionAlgorithm() -{ - if (m_ownManifold) - { - if (m_manifoldPtr) - m_dispatcher->releaseManifold(m_manifoldPtr); - } -} - -void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)dispatchInfo; - - if (!m_manifoldPtr) - return; - - resultOut->setPersistentManifold(m_manifoldPtr); - - btSphereShape* sphere0 = (btSphereShape*)col0->getCollisionShape(); - btSphereShape* sphere1 = (btSphereShape*)col1->getCollisionShape(); - - btVector3 diff = col0->getWorldTransform().getOrigin()- col1->getWorldTransform().getOrigin(); - btScalar len = diff.length(); - btScalar radius0 = sphere0->getRadius(); - btScalar radius1 = sphere1->getRadius(); - - m_manifoldPtr->clearManifold(); - - ///iff distance positive, don't generate a new contact - if ( len > (radius0+radius1)) - { - return; - } - ///distance (negative means penetration) - btScalar dist = len - (radius0+radius1); - - btVector3 normalOnSurfaceB = diff / len; - ///point on A (worldspace) - btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB; - ///point on B (worldspace) - btVector3 pos1 = col1->getWorldTransform().getOrigin() + radius1* normalOnSurfaceB; - - /// report a contact. internally this will be kept persistent, and contact reduction is done - - - resultOut->addContactPoint(normalOnSurfaceB,pos1,dist); - - //no resultOut->refreshContactPoints(); needed, because of clearManifold (all points are new) - -} - -btScalar btSphereSphereCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)col0; - (void)col1; - (void)dispatchInfo; - (void)resultOut; - - //not yet - return btScalar(1.); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h deleted file mode 100644 index bcaa0d303a9..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H -#define SPHERE_SPHERE_COLLISION_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" -#include "btCollisionDispatcher.h" - -class btPersistentManifold; - -/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. -/// Other features are frame-coherency (persistent data) and collision response. -/// Also provides the most basic sample for custom/user btCollisionAlgorithm -class btSphereSphereCollisionAlgorithm : public btCollisionAlgorithm -{ - bool m_ownManifold; - btPersistentManifold* m_manifoldPtr; - -public: - btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1); - - btSphereSphereCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) {} - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - - virtual ~btSphereSphereCollisionAlgorithm(); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereSphereCollisionAlgorithm)); - return new(mem) btSphereSphereCollisionAlgorithm(0,ci,body0,body1); - } - }; - -}; - -#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp deleted file mode 100644 index 5d50bfed7a1..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btSphereTriangleCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" -#include "SphereTriangleDetector.h" - - -btSphereTriangleCollisionAlgorithm::btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1,bool swapped) -: btCollisionAlgorithm(ci), -m_ownManifold(false), -m_manifoldPtr(mf), -m_swapped(swapped) -{ - if (!m_manifoldPtr) - { - m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1); - m_ownManifold = true; - } -} - -btSphereTriangleCollisionAlgorithm::~btSphereTriangleCollisionAlgorithm() -{ - if (m_ownManifold) - { - if (m_manifoldPtr) - m_dispatcher->releaseManifold(m_manifoldPtr); - } -} - -void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - if (!m_manifoldPtr) - return; - - btCollisionObject* sphereObj = m_swapped? col1 : col0; - btCollisionObject* triObj = m_swapped? col0 : col1; - - btSphereShape* sphere = (btSphereShape*)sphereObj->getCollisionShape(); - btTriangleShape* triangle = (btTriangleShape*)triObj->getCollisionShape(); - - /// report a contact. internally this will be kept persistent, and contact reduction is done - resultOut->setPersistentManifold(m_manifoldPtr); - SphereTriangleDetector detector(sphere,triangle); - - btDiscreteCollisionDetectorInterface::ClosestPointInput input; - input.m_maximumDistanceSquared = btScalar(1e30);//todo: tighter bounds - input.m_transformA = col0->getWorldTransform(); - input.m_transformB = col1->getWorldTransform(); - - detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); - - if (m_ownManifold) - resultOut->refreshContactPoints(); - -} - -btScalar btSphereTriangleCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) -{ - (void)resultOut; - (void)dispatchInfo; - (void)col0; - (void)col1; - - //not yet - return btScalar(1.); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h deleted file mode 100644 index 4aefc0c43a5..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H -#define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H - -#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h" -class btPersistentManifold; -#include "btCollisionDispatcher.h" - -/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. -/// Other features are frame-coherency (persistent data) and collision response. -/// Also provides the most basic sample for custom/user btCollisionAlgorithm -class btSphereTriangleCollisionAlgorithm : public btCollisionAlgorithm -{ - bool m_ownManifold; - btPersistentManifold* m_manifoldPtr; - bool m_swapped; - -public: - btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool swapped); - - btSphereTriangleCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) - : btCollisionAlgorithm(ci) {} - - virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); - - - virtual ~btSphereTriangleCollisionAlgorithm(); - - struct CreateFunc :public btCollisionAlgorithmCreateFunc - { - - virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) - { - - void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereTriangleCollisionAlgorithm)); - - return new(mem) btSphereTriangleCollisionAlgorithm(ci.m_manifold,ci,body0,body1,m_swapped); - } - }; - -}; - -#endif //SPHERE_TRIANGLE_COLLISION_ALGORITHM_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp deleted file mode 100644 index c81be8aa75c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btUnionFind.h" -#include - - - - -btUnionFind::~btUnionFind() -{ - Free(); - -} - -btUnionFind::btUnionFind() -{ - -} - -void btUnionFind::allocate(int N) -{ - m_elements.resize(N); -} -void btUnionFind::Free() -{ - m_elements.clear(); -} - - -void btUnionFind::reset(int N) -{ - allocate(N); - - for (int i = 0; i < N; i++) - { - m_elements[i].m_id = i; m_elements[i].m_sz = 1; - } -} - - -class btUnionFindElementSortPredicate -{ - public: - - bool operator() ( const btElement& lhs, const btElement& rhs ) - { - return lhs.m_id < rhs.m_id; - } -}; - -///this is a special operation, destroying the content of btUnionFind. -///it sorts the elements, based on island id, in order to make it easy to iterate over islands -void btUnionFind::sortIslands() -{ - - //first store the original body index, and islandId - int numElements = m_elements.size(); - - for (int i=0;i m_elements; - - public: - - btUnionFind(); - ~btUnionFind(); - - - //this is a special operation, destroying the content of btUnionFind. - //it sorts the elements, based on island id, in order to make it easy to iterate over islands - void sortIslands(); - - void reset(int N); - - SIMD_FORCE_INLINE int getNumElements() const - { - return int(m_elements.size()); - } - SIMD_FORCE_INLINE bool isRoot(int x) const - { - return (x == m_elements[x].m_id); - } - - btElement& getElement(int index) - { - return m_elements[index]; - } - const btElement& getElement(int index) const - { - return m_elements[index]; - } - - void allocate(int N); - void Free(); - - - - - int find(int p, int q) - { - return (find(p) == find(q)); - } - - void unite(int p, int q) - { - int i = find(p), j = find(q); - if (i == j) - return; - -#ifndef USE_PATH_COMPRESSION - //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) ) - if (m_elements[i].m_sz < m_elements[j].m_sz) - { - m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz; - } - else - { - m_elements[j].m_id = i; m_elements[i].m_sz += m_elements[j].m_sz; - } -#else - m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz; -#endif //USE_PATH_COMPRESSION - } - - int find(int x) - { - //assert(x < m_N); - //assert(x >= 0); - - while (x != m_elements[x].m_id) - { - //not really a reason not to use path compression, and it flattens the trees/improves find performance dramatically - - #ifdef USE_PATH_COMPRESSION - // - m_elements[x].m_id = m_elements[m_elements[x].m_id].m_id; - #endif // - x = m_elements[x].m_id; - //assert(x < m_N); - //assert(x >= 0); - - } - return x; - } - - - }; - - -#endif //UNION_FIND_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp deleted file mode 100644 index adac455bbcb..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btBoxShape.h" - - -//{ - - -void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const -{ - const btVector3& halfExtents = getHalfExtentsWithoutMargin(); - - btMatrix3x3 abs_b = t.getBasis().absolute(); - btPoint3 center = t.getOrigin(); - btVector3 extent = btVector3(abs_b[0].dot(halfExtents), - abs_b[1].dot(halfExtents), - abs_b[2].dot(halfExtents)); - extent += btVector3(getMargin(),getMargin(),getMargin()); - - aabbMin = center - extent; - aabbMax = center + extent; - - -} - - -void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - //btScalar margin = btScalar(0.); - btVector3 halfExtents = getHalfExtentsWithMargin(); - - btScalar lx=btScalar(2.)*(halfExtents.x()); - btScalar ly=btScalar(2.)*(halfExtents.y()); - btScalar lz=btScalar(2.)*(halfExtents.z()); - - inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz), - mass/(btScalar(12.0)) * (lx*lx + lz*lz), - mass/(btScalar(12.0)) * (lx*lx + ly*ly)); - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h deleted file mode 100644 index 98f1bd34b09..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h +++ /dev/null @@ -1,323 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef OBB_BOX_MINKOWSKI_H -#define OBB_BOX_MINKOWSKI_H - -#include "btPolyhedralConvexShape.h" -#include "btCollisionMargin.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "LinearMath/btPoint3.h" -#include "LinearMath/btMinMax.h" - -///btBoxShape implements both a feature based (vertex/edge/plane) and implicit (getSupportingVertex) Box -class btBoxShape: public btPolyhedralConvexShape -{ - - //btVector3 m_boxHalfExtents1; //use m_implicitShapeDimensions instead - - -public: - - btVector3 getHalfExtentsWithMargin() const - { - btVector3 halfExtents = getHalfExtentsWithoutMargin(); - btVector3 margin(getMargin(),getMargin(),getMargin()); - halfExtents += margin; - return halfExtents; - } - - const btVector3& getHalfExtentsWithoutMargin() const - { - return m_implicitShapeDimensions;//changed in Bullet 2.63: assume the scaling and margin are included - } - - - virtual int getShapeType() const { return BOX_SHAPE_PROXYTYPE;} - - virtual btVector3 localGetSupportingVertex(const btVector3& vec) const - { - btVector3 halfExtents = getHalfExtentsWithoutMargin(); - btVector3 margin(getMargin(),getMargin(),getMargin()); - halfExtents += margin; - - return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()), - btFsels(vec.y(), halfExtents.y(), -halfExtents.y()), - btFsels(vec.z(), halfExtents.z(), -halfExtents.z())); - } - - SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const - { - const btVector3& halfExtents = getHalfExtentsWithoutMargin(); - - return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()), - btFsels(vec.y(), halfExtents.y(), -halfExtents.y()), - btFsels(vec.z(), halfExtents.z(), -halfExtents.z())); - } - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const - { - const btVector3& halfExtents = getHalfExtentsWithoutMargin(); - - for (int i=0;i>1)) - halfExtents.y() * ((i&2)>>1), - halfExtents.z() * (1-((i&4)>>2)) - halfExtents.z() * ((i&4)>>2)); - } - - - virtual void getPlaneEquation(btVector4& plane,int i) const - { - btVector3 halfExtents = getHalfExtentsWithoutMargin(); - - switch (i) - { - case 0: - plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.)); - plane[3] = -halfExtents.x(); - break; - case 1: - plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.)); - plane[3] = -halfExtents.x(); - break; - case 2: - plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.)); - plane[3] = -halfExtents.y(); - break; - case 3: - plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.)); - plane[3] = -halfExtents.y(); - break; - case 4: - plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.)); - plane[3] = -halfExtents.z(); - break; - case 5: - plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); - plane[3] = -halfExtents.z(); - break; - default: - assert(0); - } - } - - - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const - //virtual void getEdge(int i,Edge& edge) const - { - int edgeVert0 = 0; - int edgeVert1 = 0; - - switch (i) - { - case 0: - edgeVert0 = 0; - edgeVert1 = 1; - break; - case 1: - edgeVert0 = 0; - edgeVert1 = 2; - break; - case 2: - edgeVert0 = 1; - edgeVert1 = 3; - - break; - case 3: - edgeVert0 = 2; - edgeVert1 = 3; - break; - case 4: - edgeVert0 = 0; - edgeVert1 = 4; - break; - case 5: - edgeVert0 = 1; - edgeVert1 = 5; - - break; - case 6: - edgeVert0 = 2; - edgeVert1 = 6; - break; - case 7: - edgeVert0 = 3; - edgeVert1 = 7; - break; - case 8: - edgeVert0 = 4; - edgeVert1 = 5; - break; - case 9: - edgeVert0 = 4; - edgeVert1 = 6; - break; - case 10: - edgeVert0 = 5; - edgeVert1 = 7; - break; - case 11: - edgeVert0 = 6; - edgeVert1 = 7; - break; - default: - btAssert(0); - - } - - getVertex(edgeVert0,pa ); - getVertex(edgeVert1,pb ); - } - - - - - - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const - { - btVector3 halfExtents = getHalfExtentsWithoutMargin(); - - //btScalar minDist = 2*tolerance; - - bool result = (pt.x() <= (halfExtents.x()+tolerance)) && - (pt.x() >= (-halfExtents.x()-tolerance)) && - (pt.y() <= (halfExtents.y()+tolerance)) && - (pt.y() >= (-halfExtents.y()-tolerance)) && - (pt.z() <= (halfExtents.z()+tolerance)) && - (pt.z() >= (-halfExtents.z()-tolerance)); - - return result; - } - - - //debugging - virtual const char* getName()const - { - return "Box"; - } - - virtual int getNumPreferredPenetrationDirections() const - { - return 6; - } - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const - { - switch (index) - { - case 0: - penetrationVector.setValue(btScalar(1.),btScalar(0.),btScalar(0.)); - break; - case 1: - penetrationVector.setValue(btScalar(-1.),btScalar(0.),btScalar(0.)); - break; - case 2: - penetrationVector.setValue(btScalar(0.),btScalar(1.),btScalar(0.)); - break; - case 3: - penetrationVector.setValue(btScalar(0.),btScalar(-1.),btScalar(0.)); - break; - case 4: - penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(1.)); - break; - case 5: - penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); - break; - default: - assert(0); - } - } - -}; - -#endif //OBB_BOX_MINKOWSKI_H - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp deleted file mode 100644 index eea263fe5b4..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -//#define DISABLE_BVH - -#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btOptimizedBvh.h" - - -///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. -///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. -btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh) -:btTriangleMeshShape(meshInterface), -m_bvh(0), -m_useQuantizedAabbCompression(useQuantizedAabbCompression), -m_ownsBvh(false) -{ - //construct bvh from meshInterface -#ifndef DISABLE_BVH - - btVector3 bvhAabbMin,bvhAabbMax; - meshInterface->calculateAabbBruteForce(bvhAabbMin,bvhAabbMax); - - if (buildBvh) - { - void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); - m_bvh = new (mem) btOptimizedBvh(); - m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); - m_ownsBvh = true; - } - -#endif //DISABLE_BVH - -} - -btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,bool buildBvh) -:btTriangleMeshShape(meshInterface), -m_bvh(0), -m_useQuantizedAabbCompression(useQuantizedAabbCompression), -m_ownsBvh(false) -{ - //construct bvh from meshInterface -#ifndef DISABLE_BVH - - if (buildBvh) - { - void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); - m_bvh = new (mem) btOptimizedBvh(); - - m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); - m_ownsBvh = true; - } - -#endif //DISABLE_BVH - -} - -void btBvhTriangleMeshShape::partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax) -{ - m_bvh->refitPartial( m_meshInterface,aabbMin,aabbMax ); - - m_localAabbMin.setMin(aabbMin); - m_localAabbMax.setMax(aabbMax); -} - - -void btBvhTriangleMeshShape::refitTree() -{ - m_bvh->refit( m_meshInterface ); - - recalcLocalAabb(); -} - -btBvhTriangleMeshShape::~btBvhTriangleMeshShape() -{ - if (m_ownsBvh) - { - m_bvh->~btOptimizedBvh(); - btAlignedFree(m_bvh); - } -} - -//perform bvh tree traversal and report overlapping triangles to 'callback' -void btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const -{ - -#ifdef DISABLE_BVH - //brute force traverse all triangles - btTriangleMeshShape::processAllTriangles(callback,aabbMin,aabbMax); -#else - - //first get all the nodes - - - struct MyNodeOverlapCallback : public btNodeOverlapCallback - { - btStridingMeshInterface* m_meshInterface; - btTriangleCallback* m_callback; - btVector3 m_triangle[3]; - - - MyNodeOverlapCallback(btTriangleCallback* callback,btStridingMeshInterface* meshInterface) - :m_meshInterface(meshInterface), - m_callback(callback) - { - } - - virtual void processNode(int nodeSubPart, int nodeTriangleIndex) - { - const unsigned char *vertexbase; - int numverts; - PHY_ScalarType type; - int stride; - const unsigned char *indexbase; - int indexstride; - int numfaces; - PHY_ScalarType indicestype; - - - m_meshInterface->getLockedReadOnlyVertexIndexBase( - &vertexbase, - numverts, - type, - stride, - &indexbase, - indexstride, - numfaces, - indicestype, - nodeSubPart); - - int* gfxbase = (int*)(indexbase+nodeTriangleIndex*indexstride); - - const btVector3& meshScaling = m_meshInterface->getScaling(); - for (int j=2;j>=0;j--) - { - - int graphicsindex = gfxbase[j]; - - -#ifdef DEBUG_TRIANGLE_MESH - printf("%d ,",graphicsindex); -#endif //DEBUG_TRIANGLE_MESH - btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); - - m_triangle[j] = btVector3( - graphicsbase[0]*meshScaling.getX(), - graphicsbase[1]*meshScaling.getY(), - graphicsbase[2]*meshScaling.getZ()); -#ifdef DEBUG_TRIANGLE_MESH - printf("triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z()); -#endif //DEBUG_TRIANGLE_MESH - } - - m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex); - m_meshInterface->unLockReadOnlyVertexBase(nodeSubPart); - } - - }; - - MyNodeOverlapCallback myNodeCallback(callback,m_meshInterface); - - m_bvh->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax); - - -#endif//DISABLE_BVH - - -} - - -void btBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling) -{ - if ((getLocalScaling() -scaling).length2() > SIMD_EPSILON) - { - btTriangleMeshShape::setLocalScaling(scaling); - if (m_ownsBvh) - { - m_bvh->~btOptimizedBvh(); - btAlignedFree(m_bvh); - } - ///m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work - void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16); - m_bvh = new(mem) btOptimizedBvh(); - //rebuild the bvh... - m_bvh->build(m_meshInterface,m_useQuantizedAabbCompression,m_localAabbMin,m_localAabbMax); - - } -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h deleted file mode 100644 index 95c73b2441f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h +++ /dev/null @@ -1,90 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BVH_TRIANGLE_MESH_SHAPE_H -#define BVH_TRIANGLE_MESH_SHAPE_H - -#include "btTriangleMeshShape.h" -#include "btOptimizedBvh.h" -#include "LinearMath/btAlignedAllocator.h" - -///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. -///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. -ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape -{ - - btOptimizedBvh* m_bvh; - bool m_useQuantizedAabbCompression; - bool m_ownsBvh; - bool m_pad[11];////need padding due to alignment - -public: - - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btBvhTriangleMeshShape() :btTriangleMeshShape(0),m_bvh(0),m_ownsBvh(false) {}; - btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true); - - ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb - btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true); - - virtual ~btBvhTriangleMeshShape(); - - - /* - virtual int getShapeType() const - { - return TRIANGLE_MESH_SHAPE_PROXYTYPE; - } - */ - - - - virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - void refitTree(); - - ///for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks - void partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax); - - //debugging - virtual const char* getName()const {return "BVHTRIANGLEMESH";} - - - virtual void setLocalScaling(const btVector3& scaling); - - btOptimizedBvh* getOptimizedBvh() - { - return m_bvh; - } - - - void setOptimizedBvh(btOptimizedBvh* bvh) - { - btAssert(!m_bvh); - btAssert(!m_ownsBvh); - - m_bvh = bvh; - m_ownsBvh = false; - } - - bool usesQuantizedAabbCompression() const - { - return m_useQuantizedAabbCompression; - } -} -; - -#endif //BVH_TRIANGLE_MESH_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp deleted file mode 100644 index b4f21f38b3d..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btCapsuleShape.h" - -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" -#include "LinearMath/btQuaternion.h" - -btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) -{ - m_implicitShapeDimensions.setValue(radius,0.5f*height,radius); -} - - - btVector3 btCapsuleShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const -{ - - btVector3 supVec(0,0,0); - - btScalar maxDot(btScalar(-1e30)); - - btVector3 vec = vec0; - btScalar lenSqr = vec.length2(); - if (lenSqr < btScalar(0.0001)) - { - vec.setValue(1,0,0); - } else - { - btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); - vec *= rlen; - } - - btVector3 vtx; - btScalar newDot; - - btScalar radius = getRadius(); - - - { - btVector3 pos(0,getHalfHeight(),0); - vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); - newDot = vec.dot(vtx); - if (newDot > maxDot) - { - maxDot = newDot; - supVec = vtx; - } - } - { - btVector3 pos(0,-getHalfHeight(),0); - vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); - newDot = vec.dot(vtx); - if (newDot > maxDot) - { - maxDot = newDot; - supVec = vtx; - } - } - - return supVec; - -} - - void btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - - - btScalar radius = getRadius(); - - for (int j=0;j maxDot) - { - maxDot = newDot; - supportVerticesOut[j] = vtx; - } - } - { - btVector3 pos(0,-getHalfHeight(),0); - vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); - newDot = vec.dot(vtx); - if (newDot > maxDot) - { - maxDot = newDot; - supportVerticesOut[j] = vtx; - } - } - - } -} - - -void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - //as an approximation, take the inertia of the box that bounds the spheres - - btTransform ident; - ident.setIdentity(); - - - btScalar radius = getRadius(); - - btVector3 halfExtents(radius,radius+getHalfHeight(),radius); - - btScalar margin = CONVEX_DISTANCE_MARGIN; - - btScalar lx=btScalar(2.)*(halfExtents[0]+margin); - btScalar ly=btScalar(2.)*(halfExtents[1]+margin); - btScalar lz=btScalar(2.)*(halfExtents[2]+margin); - const btScalar x2 = lx*lx; - const btScalar y2 = ly*ly; - const btScalar z2 = lz*lz; - const btScalar scaledmass = mass * btScalar(.08333333); - - inertia[0] = scaledmass * (y2+z2); - inertia[1] = scaledmass * (x2+z2); - inertia[2] = scaledmass * (x2+y2); - -} - - - - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h deleted file mode 100644 index 0b566450fef..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_CAPSULE_SHAPE_H -#define BT_CAPSULE_SHAPE_H - -#include "btConvexInternalShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types - - -///btCapsuleShape represents a capsule around the Y axis -///A more general solution that can represent capsules is the btMultiSphereShape -class btCapsuleShape : public btConvexInternalShape -{ - -public: - btCapsuleShape(btScalar radius,btScalar height); - - ///CollisionShape Interface - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - /// btConvexShape Interface - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - virtual int getShapeType() const { return CAPSULE_SHAPE_PROXYTYPE; } - - virtual const char* getName()const - { - return "CapsuleShape"; - } - - btScalar getRadius() const - { - return m_implicitShapeDimensions.getX(); - } - - btScalar getHalfHeight() const - { - return m_implicitShapeDimensions.getY(); - } - -}; - - - -#endif //BT_CAPSULE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h deleted file mode 100644 index 4730264d3df..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION_MARGIN_H -#define COLLISION_MARGIN_H - -//used by Gjk and some other algorithms - -#define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar(0.01) - - - -#endif //COLLISION_MARGIN_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp deleted file mode 100644 index 81d82428f4c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "BulletCollision/CollisionShapes/btCollisionShape.h" - - -/* - Make sure this dummy function never changes so that it - can be used by probes that are checking whether the - library is actually installed. -*/ -extern "C" void btBulletCollisionProbe () {} - - - -void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) const -{ - btTransform tr; - tr.setIdentity(); - btVector3 aabbMin,aabbMax; - - getAabb(tr,aabbMin,aabbMax); - - radius = (aabbMax-aabbMin).length()*btScalar(0.5); - center = (aabbMin+aabbMax)*btScalar(0.5); -} - -btScalar btCollisionShape::getAngularMotionDisc() const -{ - btVector3 center; - btScalar disc; - getBoundingSphere(center,disc); - disc += (center).length(); - return disc; -} - -void btCollisionShape::calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) -{ - //start with static aabb - getAabb(curTrans,temporalAabbMin,temporalAabbMax); - - btScalar temporalAabbMaxx = temporalAabbMax.getX(); - btScalar temporalAabbMaxy = temporalAabbMax.getY(); - btScalar temporalAabbMaxz = temporalAabbMax.getZ(); - btScalar temporalAabbMinx = temporalAabbMin.getX(); - btScalar temporalAabbMiny = temporalAabbMin.getY(); - btScalar temporalAabbMinz = temporalAabbMin.getZ(); - - // add linear motion - btVector3 linMotion = linvel*timeStep; - //todo: simd would have a vector max/min operation, instead of per-element access - if (linMotion.x() > btScalar(0.)) - temporalAabbMaxx += linMotion.x(); - else - temporalAabbMinx += linMotion.x(); - if (linMotion.y() > btScalar(0.)) - temporalAabbMaxy += linMotion.y(); - else - temporalAabbMiny += linMotion.y(); - if (linMotion.z() > btScalar(0.)) - temporalAabbMaxz += linMotion.z(); - else - temporalAabbMinz += linMotion.z(); - - //add conservative angular motion - btScalar angularMotion = angvel.length() * getAngularMotionDisc() * timeStep; - btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion); - temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz); - temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz); - - temporalAabbMin -= angularMotion3d; - temporalAabbMax += angularMotion3d; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h deleted file mode 100644 index 53fb12e33a1..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COLLISION_SHAPE_H -#define COLLISION_SHAPE_H - -#include "LinearMath/btTransform.h" -#include "LinearMath/btVector3.h" -#include "LinearMath/btMatrix3x3.h" -#include "LinearMath/btPoint3.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types - -///btCollisionShape provides interface for collision shapes that can be shared among btCollisionObjects. -class btCollisionShape -{ -public: - - btCollisionShape() - { - } - virtual ~btCollisionShape() - { - } - - ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; - - virtual void getBoundingSphere(btVector3& center,btScalar& radius) const; - - ///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations. - virtual btScalar getAngularMotionDisc() const; - - - ///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) - ///result is conservative - void calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax); - -#ifndef __SPU__ - - SIMD_FORCE_INLINE bool isPolyhedral() const - { - return btBroadphaseProxy::isPolyhedral(getShapeType()); - } - - SIMD_FORCE_INLINE bool isConvex() const - { - return btBroadphaseProxy::isConvex(getShapeType()); - } - SIMD_FORCE_INLINE bool isConcave() const - { - return btBroadphaseProxy::isConcave(getShapeType()); - } - SIMD_FORCE_INLINE bool isCompound() const - { - return btBroadphaseProxy::isCompound(getShapeType()); - } - - ///isInfinite is used to catch simulation error (aabb check) - SIMD_FORCE_INLINE bool isInfinite() const - { - return btBroadphaseProxy::isInfinite(getShapeType()); - } - - virtual int getShapeType() const=0; - virtual void setLocalScaling(const btVector3& scaling) =0; - virtual const btVector3& getLocalScaling() const =0; - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const = 0; - - -//debugging support - virtual const char* getName()const =0 ; -#endif //__SPU__ - - - - virtual void setMargin(btScalar margin) = 0; - virtual btScalar getMargin() const = 0; - -}; - -#endif //COLLISION_SHAPE_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp deleted file mode 100644 index 114a1f4c1fc..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btCompoundShape.h" - - -#include "btCollisionShape.h" - - -btCompoundShape::btCompoundShape() -:m_localAabbMin(btScalar(1e30),btScalar(1e30),btScalar(1e30)), -m_localAabbMax(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)), -m_aabbTree(0), -m_collisionMargin(btScalar(0.)), -m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)) -{ -} - - -btCompoundShape::~btCompoundShape() -{ -} - -void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisionShape* shape) -{ - //m_childTransforms.push_back(localTransform); - //m_childShapes.push_back(shape); - btCompoundShapeChild child; - child.m_transform = localTransform; - child.m_childShape = shape; - child.m_childShapeType = shape->getShapeType(); - child.m_childMargin = shape->getMargin(); - - m_children.push_back(child); - - //extend the local aabbMin/aabbMax - btVector3 localAabbMin,localAabbMax; - shape->getAabb(localTransform,localAabbMin,localAabbMax); - for (int i=0;i<3;i++) - { - if (m_localAabbMin[i] > localAabbMin[i]) - { - m_localAabbMin[i] = localAabbMin[i]; - } - if (m_localAabbMax[i] < localAabbMax[i]) - { - m_localAabbMax[i] = localAabbMax[i]; - } - - } -} - - - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version -void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const -{ - btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); - btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); - - btMatrix3x3 abs_b = trans.getBasis().absolute(); - - btPoint3 center = trans(localCenter); - - btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), - abs_b[1].dot(localHalfExtents), - abs_b[2].dot(localHalfExtents)); - extent += btVector3(getMargin(),getMargin(),getMargin()); - - aabbMin = center - extent; - aabbMax = center + extent; -} - -void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - //approximation: take the inertia from the aabb for now - btTransform ident; - ident.setIdentity(); - btVector3 aabbMin,aabbMax; - getAabb(ident,aabbMin,aabbMax); - - btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5); - - btScalar lx=btScalar(2.)*(halfExtents.x()); - btScalar ly=btScalar(2.)*(halfExtents.y()); - btScalar lz=btScalar(2.)*(halfExtents.z()); - - inertia[0] = mass/(btScalar(12.0)) * (ly*ly + lz*lz); - inertia[1] = mass/(btScalar(12.0)) * (lx*lx + lz*lz); - inertia[2] = mass/(btScalar(12.0)) * (lx*lx + ly*ly); - -} - - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h deleted file mode 100644 index d23bd65b5e8..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h +++ /dev/null @@ -1,136 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef COMPOUND_SHAPE_H -#define COMPOUND_SHAPE_H - -#include "btCollisionShape.h" - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" -#include "LinearMath/btMatrix3x3.h" -#include "btCollisionMargin.h" -#include "LinearMath/btAlignedObjectArray.h" - -class btOptimizedBvh; - -ATTRIBUTE_ALIGNED16(struct) btCompoundShapeChild -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btTransform m_transform; - btCollisionShape* m_childShape; - int m_childShapeType; - btScalar m_childMargin; -}; - -/// btCompoundShape allows to store multiple other btCollisionShapes -/// This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. -ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape -{ - //btAlignedObjectArray m_childTransforms; - //btAlignedObjectArray m_childShapes; - btAlignedObjectArray m_children; - btVector3 m_localAabbMin; - btVector3 m_localAabbMax; - - btOptimizedBvh* m_aabbTree; - -public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btCompoundShape(); - - virtual ~btCompoundShape(); - - void addChildShape(const btTransform& localTransform,btCollisionShape* shape); - - int getNumChildShapes() const - { - return int (m_children.size()); - } - - btCollisionShape* getChildShape(int index) - { - return m_children[index].m_childShape; - } - const btCollisionShape* getChildShape(int index) const - { - return m_children[index].m_childShape; - } - - btTransform getChildTransform(int index) - { - return m_children[index].m_transform; - } - const btTransform getChildTransform(int index) const - { - return m_children[index].m_transform; - } - - - btCompoundShapeChild* getChildList() - { - return &m_children[0]; - } - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version - void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - - virtual void setLocalScaling(const btVector3& scaling) - { - m_localScaling = scaling; - } - virtual const btVector3& getLocalScaling() const - { - return m_localScaling; - } - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - virtual int getShapeType() const { return COMPOUND_SHAPE_PROXYTYPE;} - - virtual void setMargin(btScalar margin) - { - m_collisionMargin = margin; - } - virtual btScalar getMargin() const - { - return m_collisionMargin; - } - virtual const char* getName()const - { - return "Compound"; - } - - //this is optional, but should make collision queries faster, by culling non-overlapping nodes - void createAabbTreeFromChildren(); - - const btOptimizedBvh* getAabbTree() const - { - return m_aabbTree; - } - -private: - btScalar m_collisionMargin; -protected: - btVector3 m_localScaling; - -}; - - - -#endif //COMPOUND_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp deleted file mode 100644 index 5103500a012..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp +++ /dev/null @@ -1,28 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btConcaveShape.h" - -btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.)) -{ - -} - -btConcaveShape::~btConcaveShape() -{ - -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h deleted file mode 100644 index 4db4e6513dd..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONCAVE_SHAPE_H -#define CONCAVE_SHAPE_H - -#include "btCollisionShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -#include "btTriangleCallback.h" - - -///Concave shape proves an interface concave shapes that can produce triangles that overlapping a given AABB. -///Static triangle mesh, infinite plane, height field/landscapes are example that implement this interface. -class btConcaveShape : public btCollisionShape -{ -protected: - btScalar m_collisionMargin; - -public: - btConcaveShape(); - - virtual ~btConcaveShape(); - - virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const = 0; - - virtual btScalar getMargin() const { - return m_collisionMargin; - } - virtual void setMargin(btScalar collisionMargin) - { - m_collisionMargin = collisionMargin; - } - - - -}; - -#endif //CONCAVE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp deleted file mode 100644 index 207b3024bc3..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btConeShape.h" -#include "LinearMath/btPoint3.h" - - - -btConeShape::btConeShape (btScalar radius,btScalar height): -m_radius (radius), -m_height(height) -{ - setConeUpIndex(1); - btVector3 halfExtents; - m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height)); -} - -btConeShapeZ::btConeShapeZ (btScalar radius,btScalar height): -btConeShape(radius,height) -{ - setConeUpIndex(2); -} - -btConeShapeX::btConeShapeX (btScalar radius,btScalar height): -btConeShape(radius,height) -{ - setConeUpIndex(0); -} - -///choose upAxis index -void btConeShape::setConeUpIndex(int upIndex) -{ - switch (upIndex) - { - case 0: - m_coneIndices[0] = 1; - m_coneIndices[1] = 0; - m_coneIndices[2] = 2; - break; - case 1: - m_coneIndices[0] = 0; - m_coneIndices[1] = 1; - m_coneIndices[2] = 2; - break; - case 2: - m_coneIndices[0] = 0; - m_coneIndices[1] = 2; - m_coneIndices[2] = 1; - break; - default: - assert(0); - }; -} - -btVector3 btConeShape::coneLocalSupport(const btVector3& v) const -{ - - btScalar halfHeight = m_height * btScalar(0.5); - - if (v[m_coneIndices[1]] > v.length() * m_sinAngle) - { - btVector3 tmp; - - tmp[m_coneIndices[0]] = btScalar(0.); - tmp[m_coneIndices[1]] = halfHeight; - tmp[m_coneIndices[2]] = btScalar(0.); - return tmp; - } - else { - btScalar s = btSqrt(v[m_coneIndices[0]] * v[m_coneIndices[0]] + v[m_coneIndices[2]] * v[m_coneIndices[2]]); - if (s > SIMD_EPSILON) { - btScalar d = m_radius / s; - btVector3 tmp; - tmp[m_coneIndices[0]] = v[m_coneIndices[0]] * d; - tmp[m_coneIndices[1]] = -halfHeight; - tmp[m_coneIndices[2]] = v[m_coneIndices[2]] * d; - return tmp; - } - else { - btVector3 tmp; - tmp[m_coneIndices[0]] = btScalar(0.); - tmp[m_coneIndices[1]] = -halfHeight; - tmp[m_coneIndices[2]] = btScalar(0.); - return tmp; - } - } - -} - -btVector3 btConeShape::localGetSupportingVertexWithoutMargin(const btVector3& vec) const -{ - return coneLocalSupport(vec); -} - -void btConeShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - for (int i=0;i maxDot) - { - maxDot = newDot; - supVec = vtx; - } - } - return supVec; -} - -void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - btScalar newDot; - //use 'w' component of supportVerticesOut? - { - for (int i=0;i supportVerticesOut[j][3]) - { - //WARNING: don't swap next lines, the w component would get overwritten! - supportVerticesOut[j] = vtx; - supportVerticesOut[j][3] = newDot; - } - } - } - - - -} - - - -btVector3 btConvexHullShape::localGetSupportingVertex(const btVector3& vec)const -{ - btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); - - if ( getMargin()!=btScalar(0.) ) - { - btVector3 vecnorm = vec; - if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) - { - vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); - } - vecnorm.normalize(); - supVertex+= getMargin() * vecnorm; - } - return supVertex; -} - - - - - - - - - -//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection -//Please note that you can debug-draw btConvexHullShape with the Raytracer Demo -int btConvexHullShape::getNumVertices() const -{ - return m_points.size(); -} - -int btConvexHullShape::getNumEdges() const -{ - return m_points.size(); -} - -void btConvexHullShape::getEdge(int i,btPoint3& pa,btPoint3& pb) const -{ - - int index0 = i%m_points.size(); - int index1 = (i+1)%m_points.size(); - pa = m_points[index0]*m_localScaling; - pb = m_points[index1]*m_localScaling; -} - -void btConvexHullShape::getVertex(int i,btPoint3& vtx) const -{ - vtx = m_points[i]*m_localScaling; -} - -int btConvexHullShape::getNumPlanes() const -{ - return 0; -} - -void btConvexHullShape::getPlane(btVector3& ,btPoint3& ,int ) const -{ - - btAssert(0); -} - -//not yet -bool btConvexHullShape::isInside(const btPoint3& ,btScalar ) const -{ - assert(0); - return false; -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h deleted file mode 100644 index 0928d68b8fc..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONVEX_HULL_SHAPE_H -#define CONVEX_HULL_SHAPE_H - -#include "btPolyhedralConvexShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types -#include "LinearMath/btAlignedObjectArray.h" - -///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices) -///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices. -///on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash. -///(memory is much slower then the cpu) -ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape -{ - btAlignedObjectArray m_points; - -public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - - - ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. - ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. - ///btConvexHullShape make an internal copy of the points. - btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btPoint3)); - - void addPoint(const btPoint3& point); - - btPoint3* getPoints() - { - return &m_points[0]; - } - - int getNumPoints() - { - return m_points.size(); - } - - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - - virtual int getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; } - - //debugging - virtual const char* getName()const {return "Convex";} - - - virtual int getNumVertices() const; - virtual int getNumEdges() const; - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; - virtual void getVertex(int i,btPoint3& vtx) const; - virtual int getNumPlanes() const; - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const; - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; - - - -}; - - -#endif //CONVEX_HULL_SHAPE_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp deleted file mode 100644 index f828d28e18c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btConvexInternalShape.h" - - -btConvexInternalShape::btConvexInternalShape() -: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), -m_collisionMargin(CONVEX_DISTANCE_MARGIN) -{ -} - - -void btConvexInternalShape::setLocalScaling(const btVector3& scaling) -{ - m_localScaling = scaling; -} - - - -void btConvexInternalShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVector3&maxAabb) const -{ - - btScalar margin = getMargin(); - for (int i=0;i<3;i++) - { - btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); - vec[i] = btScalar(1.); - - btVector3 sv = localGetSupportingVertex(vec*trans.getBasis()); - - btVector3 tmp = trans(sv); - maxAabb[i] = tmp[i]+margin; - vec[i] = btScalar(-1.); - tmp = trans(localGetSupportingVertex(vec*trans.getBasis())); - minAabb[i] = tmp[i]-margin; - } -}; - - -btVector3 btConvexInternalShape::localGetSupportingVertex(const btVector3& vec)const -{ -#ifndef __SPU__ - - btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); - - if ( getMargin()!=btScalar(0.) ) - { - btVector3 vecnorm = vec; - if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) - { - vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); - } - vecnorm.normalize(); - supVertex+= getMargin() * vecnorm; - } - return supVertex; - -#else - return btVector3(0,0,0); -#endif //__SPU__ - - } - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h deleted file mode 100644 index a03af873bd3..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexInternalShape.h +++ /dev/null @@ -1,99 +0,0 @@ - -#ifndef BT_CONVEX_INTERNAL_SHAPE_H -#define BT_CONVEX_INTERNAL_SHAPE_H - -#include "btConvexShape.h" - -///btConvexInternalShape carries some additional data, shared by most implementations -class btConvexInternalShape : public btConvexShape -{ - - protected: - - //local scaling. collisionMargin is not scaled ! - btVector3 m_localScaling; - - btVector3 m_implicitShapeDimensions; - - btScalar m_collisionMargin; - - btScalar m_padding[2]; - - - - -public: - - btConvexInternalShape(); - - virtual ~btConvexInternalShape() - { - - } - - - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; -#ifndef __SPU__ - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; - - //notice that the vectors should be unit length - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; -#endif //#ifndef __SPU__ - - const btVector3& getImplicitShapeDimensions() const - { - return m_implicitShapeDimensions; - } - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version - void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const - { - getAabbSlow(t,aabbMin,aabbMax); - } - - - - virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - - virtual void setLocalScaling(const btVector3& scaling); - virtual const btVector3& getLocalScaling() const - { - return m_localScaling; - } - - const btVector3& getLocalScalingNV() const - { - return m_localScaling; - } - - virtual void setMargin(btScalar margin) - { - m_collisionMargin = margin; - } - virtual btScalar getMargin() const - { - return m_collisionMargin; - } - - btScalar getMarginNV() const - { - return m_collisionMargin; - } - - virtual int getNumPreferredPenetrationDirections() const - { - return 0; - } - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const - { - (void)penetrationVector; - (void)index; - btAssert(0); - } - -}; - - -#endif //BT_CONVEX_INTERNAL_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp deleted file mode 100644 index 7afcccf8b03..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btConvexShape.h" - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h deleted file mode 100644 index 6dfd288e05b..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONVEX_SHAPE_INTERFACE1 -#define CONVEX_SHAPE_INTERFACE1 - -#include "btCollisionShape.h" - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" -#include "LinearMath/btMatrix3x3.h" -#include "btCollisionMargin.h" -#include "LinearMath/btAlignedAllocator.h" - -//todo: get rid of this btConvexCastResult thing! -struct btConvexCastResult; -#define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 - -/// btConvexShape is an abstract shape interface. -/// It describes general convex shapes using the localGetSupportingVertex interface -/// used in combination with GJK or btConvexCast -ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape -{ - - -public: - - BT_DECLARE_ALIGNED_ALLOCATOR(); - - virtual ~btConvexShape() - { - - } - - - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const =0; -#ifndef __SPU__ - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; - - //notice that the vectors should be unit length - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; -#endif //#ifndef __SPU__ - - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version - void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; - - virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; - - virtual void setLocalScaling(const btVector3& scaling) =0; - virtual const btVector3& getLocalScaling() const =0; - - virtual void setMargin(btScalar margin)=0; - - virtual btScalar getMargin() const=0; - - virtual int getNumPreferredPenetrationDirections() const=0; - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0; - -}; - - - -#endif //CONVEX_SHAPE_INTERFACE1 diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp deleted file mode 100644 index 6941030b15f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#include "btConvexTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" - -#include "LinearMath/btQuaternion.h" -#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h" - - -btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface) -:m_stridingMesh(meshInterface) -{ - recalcLocalAabb(); -} - - - - -///It's not nice to have all this virtual function overhead, so perhaps we can also gather the points once -///but then we are duplicating -class LocalSupportVertexCallback: public btInternalTriangleIndexCallback -{ - - btVector3 m_supportVertexLocal; -public: - - btScalar m_maxDot; - btVector3 m_supportVecLocal; - - LocalSupportVertexCallback(const btVector3& supportVecLocal) - : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), - m_maxDot(btScalar(-1e30)), - m_supportVecLocal(supportVecLocal) - { - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - (void)triangleIndex; - (void)partId; - - for (int i=0;i<3;i++) - { - btScalar dot = m_supportVecLocal.dot(triangle[i]); - if (dot > m_maxDot) - { - m_maxDot = dot; - m_supportVertexLocal = triangle[i]; - } - } - } - - btVector3 GetSupportVertexLocal() - { - return m_supportVertexLocal; - } - -}; - - - - - -btVector3 btConvexTriangleMeshShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const -{ - btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.)); - - btVector3 vec = vec0; - btScalar lenSqr = vec.length2(); - if (lenSqr < btScalar(0.0001)) - { - vec.setValue(1,0,0); - } else - { - btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); - vec *= rlen; - } - - LocalSupportVertexCallback supportCallback(vec); - btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); - supVec = supportCallback.GetSupportVertexLocal(); - - return supVec; -} - -void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - //use 'w' component of supportVerticesOut? - { - for (int i=0;iInternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); - supportVerticesOut[j] = supportCallback.GetSupportVertexLocal(); - } - -} - - - -btVector3 btConvexTriangleMeshShape::localGetSupportingVertex(const btVector3& vec)const -{ - btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); - - if ( getMargin()!=btScalar(0.) ) - { - btVector3 vecnorm = vec; - if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) - { - vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); - } - vecnorm.normalize(); - supVertex+= getMargin() * vecnorm; - } - return supVertex; -} - - - - - - - - - -//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection -//Please note that you can debug-draw btConvexTriangleMeshShape with the Raytracer Demo -int btConvexTriangleMeshShape::getNumVertices() const -{ - //cache this? - return 0; - -} - -int btConvexTriangleMeshShape::getNumEdges() const -{ - return 0; -} - -void btConvexTriangleMeshShape::getEdge(int ,btPoint3& ,btPoint3& ) const -{ - btAssert(0); -} - -void btConvexTriangleMeshShape::getVertex(int ,btPoint3& ) const -{ - btAssert(0); -} - -int btConvexTriangleMeshShape::getNumPlanes() const -{ - return 0; -} - -void btConvexTriangleMeshShape::getPlane(btVector3& ,btPoint3& ,int ) const -{ - btAssert(0); -} - -//not yet -bool btConvexTriangleMeshShape::isInside(const btPoint3& ,btScalar ) const -{ - btAssert(0); - return false; -} - - - -void btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling) -{ - m_stridingMesh->setScaling(scaling); - - recalcLocalAabb(); - -} - - -const btVector3& btConvexTriangleMeshShape::getLocalScaling() const -{ - return m_stridingMesh->getScaling(); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h deleted file mode 100644 index f3daa58368f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef CONVEX_TRIANGLEMESH_SHAPE_H -#define CONVEX_TRIANGLEMESH_SHAPE_H - - -#include "btPolyhedralConvexShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types - - -/// btConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use btConvexHullShape instead. -/// It uses the btStridingMeshInterface instead of a point cloud. This can avoid the duplication of the triangle mesh data. -class btConvexTriangleMeshShape : public btPolyhedralConvexShape -{ - - class btStridingMeshInterface* m_stridingMesh; - -public: - btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface); - - class btStridingMeshInterface* getMeshInterface() - { - return m_stridingMesh; - } - const class btStridingMeshInterface* getMeshInterface() const - { - return m_stridingMesh; - } - - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - virtual int getShapeType()const { return CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; } - - //debugging - virtual const char* getName()const {return "ConvexTrimesh";} - - virtual int getNumVertices() const; - virtual int getNumEdges() const; - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; - virtual void getVertex(int i,btPoint3& vtx) const; - virtual int getNumPlanes() const; - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const; - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; - - - virtual void setLocalScaling(const btVector3& scaling); - virtual const btVector3& getLocalScaling() const; - -}; - - - -#endif //CONVEX_TRIANGLEMESH_SHAPE_H - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp deleted file mode 100644 index 3afef1c7550..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#include "btCylinderShape.h" -#include "LinearMath/btPoint3.h" - -btCylinderShape::btCylinderShape (const btVector3& halfExtents) -:btBoxShape(halfExtents), -m_upAxis(1) -{ - recalcLocalAabb(); -} - - -btCylinderShapeX::btCylinderShapeX (const btVector3& halfExtents) -:btCylinderShape(halfExtents) -{ - m_upAxis = 0; - recalcLocalAabb(); -} - - -btCylinderShapeZ::btCylinderShapeZ (const btVector3& halfExtents) -:btCylinderShape(halfExtents) -{ - m_upAxis = 2; - recalcLocalAabb(); -} - -void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const -{ - //skip the box 'getAabb' - btPolyhedralConvexShape::getAabb(t,aabbMin,aabbMax); -} - - -SIMD_FORCE_INLINE btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v) -{ -const int cylinderUpAxis = 0; -const int XX = 1; -const int YY = 0; -const int ZZ = 2; - - //mapping depends on how cylinder local orientation is - // extents of the cylinder is: X,Y is for radius, and Z for height - - - btScalar radius = halfExtents[XX]; - btScalar halfHeight = halfExtents[cylinderUpAxis]; - - - btVector3 tmp; - btScalar d ; - - btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); - if (s != btScalar(0.0)) - { - d = radius / s; - tmp[XX] = v[XX] * d; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = v[ZZ] * d; - return tmp; - } - else - { - tmp[XX] = radius; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = btScalar(0.0); - return tmp; - } - - -} - - - - - - -inline btVector3 CylinderLocalSupportY(const btVector3& halfExtents,const btVector3& v) -{ - -const int cylinderUpAxis = 1; -const int XX = 0; -const int YY = 1; -const int ZZ = 2; - - - btScalar radius = halfExtents[XX]; - btScalar halfHeight = halfExtents[cylinderUpAxis]; - - - btVector3 tmp; - btScalar d ; - - btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); - if (s != btScalar(0.0)) - { - d = radius / s; - tmp[XX] = v[XX] * d; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = v[ZZ] * d; - return tmp; - } - else - { - tmp[XX] = radius; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = btScalar(0.0); - return tmp; - } - -} - -inline btVector3 CylinderLocalSupportZ(const btVector3& halfExtents,const btVector3& v) -{ -const int cylinderUpAxis = 2; -const int XX = 0; -const int YY = 2; -const int ZZ = 1; - - //mapping depends on how cylinder local orientation is - // extents of the cylinder is: X,Y is for radius, and Z for height - - - btScalar radius = halfExtents[XX]; - btScalar halfHeight = halfExtents[cylinderUpAxis]; - - - btVector3 tmp; - btScalar d ; - - btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); - if (s != btScalar(0.0)) - { - d = radius / s; - tmp[XX] = v[XX] * d; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = v[ZZ] * d; - return tmp; - } - else - { - tmp[XX] = radius; - tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; - tmp[ZZ] = btScalar(0.0); - return tmp; - } - - -} - -btVector3 btCylinderShapeX::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - return CylinderLocalSupportX(getHalfExtentsWithoutMargin(),vec); -} - - -btVector3 btCylinderShapeZ::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - return CylinderLocalSupportZ(getHalfExtentsWithoutMargin(),vec); -} -btVector3 btCylinderShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - return CylinderLocalSupportY(getHalfExtentsWithoutMargin(),vec); -} - -void btCylinderShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - for (int i=0;i=0); - btAssert(y>=0); - btAssert(xstartX) - startX = quantizedAabbMin[1]; - if (quantizedAabbMax[1]startJ) - startJ = quantizedAabbMin[2]; - if (quantizedAabbMax[2]startX) - startX = quantizedAabbMin[0]; - if (quantizedAabbMax[0]startJ) - startJ = quantizedAabbMin[2]; - if (quantizedAabbMax[2]startX) - startX = quantizedAabbMin[0]; - if (quantizedAabbMax[0]startJ) - startJ = quantizedAabbMin[1]; - if (quantizedAabbMax[1]processTriangle(vertices,x,j); - //second triangle - getVertex(x,j,vertices[0]); - getVertex(x+1,j+1,vertices[1]); - getVertex(x,j+1,vertices[2]); - callback->processTriangle(vertices,x,j); - } else - { - //first triangle - getVertex(x,j,vertices[0]); - getVertex(x,j+1,vertices[1]); - getVertex(x+1,j,vertices[2]); - callback->processTriangle(vertices,x,j); - //second triangle - getVertex(x+1,j,vertices[0]); - getVertex(x,j+1,vertices[1]); - getVertex(x+1,j+1,vertices[2]); - callback->processTriangle(vertices,x,j); - } - } - } - - - -} - -void btHeightfieldTerrainShape::calculateLocalInertia(btScalar ,btVector3& inertia) const -{ - //moving concave objects not supported - - inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); -} - -void btHeightfieldTerrainShape::setLocalScaling(const btVector3& scaling) -{ - m_localScaling = scaling; -} -const btVector3& btHeightfieldTerrainShape::getLocalScaling() const -{ - return m_localScaling; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h deleted file mode 100644 index 8dba7b3d5fe..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef HEIGHTFIELD_TERRAIN_SHAPE_H -#define HEIGHTFIELD_TERRAIN_SHAPE_H - -#include "btConcaveShape.h" - -///btHeightfieldTerrainShape simulates a 2D heightfield terrain -class btHeightfieldTerrainShape : public btConcaveShape -{ -protected: - btVector3 m_localAabbMin; - btVector3 m_localAabbMax; - - ///terrain data - int m_width; - int m_length; - btScalar m_maxHeight; - union - { - unsigned char* m_heightfieldDataUnsignedChar; - btScalar* m_heightfieldDataFloat; - void* m_heightfieldDataUnknown; - }; - - bool m_useFloatData; - bool m_flipQuadEdges; - bool m_useDiamondSubdivision; - - int m_upAxis; - - btVector3 m_localScaling; - - virtual btScalar getHeightFieldValue(int x,int y) const; - void quantizeWithClamp(int* out, const btVector3& point) const; - void getVertex(int x,int y,btVector3& vertex) const; - - inline bool testQuantizedAabbAgainstQuantizedAabb(int* aabbMin1, int* aabbMax1,const int* aabbMin2,const int* aabbMax2) const - { - bool overlap = true; - overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; - return overlap; - } - -public: - btHeightfieldTerrainShape(int width,int height,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges); - - virtual ~btHeightfieldTerrainShape(); - - - void setUseDiamondSubdivision(bool useDiamondSubdivision=true) { m_useDiamondSubdivision = useDiamondSubdivision;} - - virtual int getShapeType() const - { - return TERRAIN_SHAPE_PROXYTYPE; - } - - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - virtual void setLocalScaling(const btVector3& scaling); - - virtual const btVector3& getLocalScaling() const; - - //debugging - virtual const char* getName()const {return "HEIGHTFIELD";} - -}; - -#endif //HEIGHTFIELD_TERRAIN_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp deleted file mode 100644 index 7f7f2822189..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btMinkowskiSumShape.h" - - -btMinkowskiSumShape::btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB) -:m_shapeA(shapeA), -m_shapeB(shapeB) -{ - m_transA.setIdentity(); - m_transB.setIdentity(); -} - -btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - btVector3 supVertexA = m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(vec*m_transA.getBasis())); - btVector3 supVertexB = m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(vec*m_transB.getBasis())); - return supVertexA + supVertexB; -} - -void btMinkowskiSumShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - //todo: could make recursive use of batching. probably this shape is not used frequently. - for (int i=0;igetMargin() + m_shapeB->getMargin(); -} - - -void btMinkowskiSumShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - (void)mass; - btAssert(0); - inertia.setValue(0,0,0); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h deleted file mode 100644 index 484e317e6fc..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef MINKOWSKI_SUM_SHAPE_H -#define MINKOWSKI_SUM_SHAPE_H - -#include "btConvexInternalShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types - -/// btMinkowskiSumShape represents implicit (getSupportingVertex) based minkowski sum of two convex implicit shapes. -class btMinkowskiSumShape : public btConvexInternalShape -{ - - btTransform m_transA; - btTransform m_transB; - const btConvexShape* m_shapeA; - const btConvexShape* m_shapeB; - -public: - - btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB); - - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - void setTransformA(const btTransform& transA) { m_transA = transA;} - void setTransformB(const btTransform& transB) { m_transB = transB;} - - const btTransform& getTransformA()const { return m_transA;} - const btTransform& GetTransformB()const { return m_transB;} - - - virtual int getShapeType() const { return MINKOWSKI_SUM_SHAPE_PROXYTYPE; } - - virtual btScalar getMargin() const; - - const btConvexShape* getShapeA() const { return m_shapeA;} - const btConvexShape* getShapeB() const { return m_shapeB;} - - virtual const char* getName()const - { - return "MinkowskiSum"; - } -}; - -#endif //MINKOWSKI_SUM_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp deleted file mode 100644 index a8ce8622f9f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btMultiSphereShape.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" -#include "LinearMath/btQuaternion.h" - -btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,const btVector3* positions,const btScalar* radi,int numSpheres) -:m_inertiaHalfExtents(inertiaHalfExtents) -{ - btScalar startMargin = btScalar(1e30); - - m_numSpheres = numSpheres; - for (int i=0;i maxDot) - { - maxDot = newDot; - supVec = vtx; - } - } - - return supVec; - -} - - void btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - - for (int j=0;j maxDot) - { - maxDot = newDot; - supportVerticesOut[j] = vtx; - } - } - } -} - - - - - - - - -void btMultiSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - //as an approximation, take the inertia of the box that bounds the spheres - - btTransform ident; - ident.setIdentity(); -// btVector3 aabbMin,aabbMax; - -// getAabb(ident,aabbMin,aabbMax); - - btVector3 halfExtents = m_inertiaHalfExtents;//(aabbMax - aabbMin)* btScalar(0.5); - - btScalar margin = CONVEX_DISTANCE_MARGIN; - - btScalar lx=btScalar(2.)*(halfExtents[0]+margin); - btScalar ly=btScalar(2.)*(halfExtents[1]+margin); - btScalar lz=btScalar(2.)*(halfExtents[2]+margin); - const btScalar x2 = lx*lx; - const btScalar y2 = ly*ly; - const btScalar z2 = lz*lz; - const btScalar scaledmass = mass * btScalar(.08333333); - - inertia[0] = scaledmass * (y2+z2); - inertia[1] = scaledmass * (x2+z2); - inertia[2] = scaledmass * (x2+y2); - -} - - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h deleted file mode 100644 index 7db54e7a23c..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef MULTI_SPHERE_MINKOWSKI_H -#define MULTI_SPHERE_MINKOWSKI_H - -#include "btConvexInternalShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types - -#define MAX_NUM_SPHERES 5 - -///btMultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex) -class btMultiSphereShape : public btConvexInternalShape - -{ - - btVector3 m_localPositions[MAX_NUM_SPHERES]; - btScalar m_radi[MAX_NUM_SPHERES]; - btVector3 m_inertiaHalfExtents; - - int m_numSpheres; - - - - -public: - btMultiSphereShape (const btVector3& inertiaHalfExtents,const btVector3* positions,const btScalar* radi,int numSpheres); - - ///CollisionShape Interface - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - /// btConvexShape Interface - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - int getSphereCount() const - { - return m_numSpheres; - } - - const btVector3& getSpherePosition(int index) const - { - return m_localPositions[index]; - } - - btScalar getSphereRadius(int index) const - { - return m_radi[index]; - } - - virtual int getShapeType() const { return MULTI_SPHERE_SHAPE_PROXYTYPE; } - - virtual const char* getName()const - { - return "MultiSphere"; - } - -}; - - -#endif //MULTI_SPHERE_MINKOWSKI_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp deleted file mode 100644 index e80469f45cf..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp +++ /dev/null @@ -1,1181 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#include "btOptimizedBvh.h" -#include "btStridingMeshInterface.h" -#include "LinearMath/btAabbUtil2.h" -#include "LinearMath/btIDebugDraw.h" - - -btOptimizedBvh::btOptimizedBvh() : m_useQuantization(false), - //m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY) - m_traversalMode(TRAVERSAL_STACKLESS) - //m_traversalMode(TRAVERSAL_RECURSIVE) - ,m_subtreeHeaderCount(0) //PCK: add this line -{ - -} - - -void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax) -{ - m_useQuantization = useQuantizedAabbCompression; - - - // NodeArray triangleNodes; - - struct NodeTriangleCallback : public btInternalTriangleIndexCallback - { - - NodeArray& m_triangleNodes; - - NodeTriangleCallback& operator=(NodeTriangleCallback& other) - { - m_triangleNodes = other.m_triangleNodes; - return *this; - } - - NodeTriangleCallback(NodeArray& triangleNodes) - :m_triangleNodes(triangleNodes) - { - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - btOptimizedBvhNode node; - btVector3 aabbMin,aabbMax; - aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - aabbMin.setMin(triangle[0]); - aabbMax.setMax(triangle[0]); - aabbMin.setMin(triangle[1]); - aabbMax.setMax(triangle[1]); - aabbMin.setMin(triangle[2]); - aabbMax.setMax(triangle[2]); - - //with quantization? - node.m_aabbMinOrg = aabbMin; - node.m_aabbMaxOrg = aabbMax; - - node.m_escapeIndex = -1; - - //for child nodes - node.m_subPart = partId; - node.m_triangleIndex = triangleIndex; - m_triangleNodes.push_back(node); - } - }; - struct QuantizedNodeTriangleCallback : public btInternalTriangleIndexCallback - { - QuantizedNodeArray& m_triangleNodes; - const btOptimizedBvh* m_optimizedTree; // for quantization - - QuantizedNodeTriangleCallback& operator=(QuantizedNodeTriangleCallback& other) - { - m_triangleNodes = other.m_triangleNodes; - m_optimizedTree = other.m_optimizedTree; - return *this; - } - - QuantizedNodeTriangleCallback(QuantizedNodeArray& triangleNodes,const btOptimizedBvh* tree) - :m_triangleNodes(triangleNodes),m_optimizedTree(tree) - { - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - btAssert(partId==0); - //negative indices are reserved for escapeIndex - btAssert(triangleIndex>=0); - - btQuantizedBvhNode node; - btVector3 aabbMin,aabbMax; - aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - aabbMin.setMin(triangle[0]); - aabbMax.setMax(triangle[0]); - aabbMin.setMin(triangle[1]); - aabbMax.setMax(triangle[1]); - aabbMin.setMin(triangle[2]); - aabbMax.setMax(triangle[2]); - - //PCK: add these checks for zero dimensions of aabb - const btScalar MIN_AABB_DIMENSION = btScalar(0.002); - const btScalar MIN_AABB_HALF_DIMENSION = btScalar(0.001); - if (aabbMax.x() - aabbMin.x() < MIN_AABB_DIMENSION) - { - aabbMax.setX(aabbMax.x() + MIN_AABB_HALF_DIMENSION); - aabbMin.setX(aabbMin.x() - MIN_AABB_HALF_DIMENSION); - } - if (aabbMax.y() - aabbMin.y() < MIN_AABB_DIMENSION) - { - aabbMax.setY(aabbMax.y() + MIN_AABB_HALF_DIMENSION); - aabbMin.setY(aabbMin.y() - MIN_AABB_HALF_DIMENSION); - } - if (aabbMax.z() - aabbMin.z() < MIN_AABB_DIMENSION) - { - aabbMax.setZ(aabbMax.z() + MIN_AABB_HALF_DIMENSION); - aabbMin.setZ(aabbMin.z() - MIN_AABB_HALF_DIMENSION); - } - - m_optimizedTree->quantizeWithClamp(&node.m_quantizedAabbMin[0],aabbMin); - m_optimizedTree->quantizeWithClamp(&node.m_quantizedAabbMax[0],aabbMax); - - node.m_escapeIndexOrTriangleIndex = triangleIndex; - - m_triangleNodes.push_back(node); - } - }; - - - - int numLeafNodes = 0; - - - if (m_useQuantization) - { - - //initialize quantization values - setQuantizationValues(bvhAabbMin,bvhAabbMax); - - QuantizedNodeTriangleCallback callback(m_quantizedLeafNodes,this); - - - triangles->InternalProcessAllTriangles(&callback,m_bvhAabbMin,m_bvhAabbMax); - - //now we have an array of leafnodes in m_leafNodes - numLeafNodes = m_quantizedLeafNodes.size(); - - - m_quantizedContiguousNodes.resize(2*numLeafNodes); - - - } else - { - NodeTriangleCallback callback(m_leafNodes); - - btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - - triangles->InternalProcessAllTriangles(&callback,aabbMin,aabbMax); - - //now we have an array of leafnodes in m_leafNodes - numLeafNodes = m_leafNodes.size(); - - m_contiguousNodes.resize(2*numLeafNodes); - } - - m_curNodeIndex = 0; - - buildTree(0,numLeafNodes); - - ///if the entire tree is small then subtree size, we need to create a header info for the tree - if(m_useQuantization && !m_SubtreeHeaders.size()) - { - btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); - subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[0]); - subtree.m_rootNodeIndex = 0; - subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex(); - } - - //PCK: update the copy of the size - m_subtreeHeaderCount = m_SubtreeHeaders.size(); - - //PCK: clear m_quantizedLeafNodes and m_leafNodes, they are temporary - m_quantizedLeafNodes.clear(); - m_leafNodes.clear(); -} - - - -void btOptimizedBvh::refitPartial(btStridingMeshInterface* meshInterface,const btVector3& aabbMin,const btVector3& aabbMax) -{ - //incrementally initialize quantization values - btAssert(m_useQuantization); - - btAssert(aabbMin.getX() > m_bvhAabbMin.getX()); - btAssert(aabbMin.getY() > m_bvhAabbMin.getY()); - btAssert(aabbMin.getZ() > m_bvhAabbMin.getZ()); - - btAssert(aabbMax.getX() < m_bvhAabbMax.getX()); - btAssert(aabbMax.getY() < m_bvhAabbMax.getY()); - btAssert(aabbMax.getZ() < m_bvhAabbMax.getZ()); - - ///we should update all quantization values, using updateBvhNodes(meshInterface); - ///but we only update chunks that overlap the given aabb - - unsigned short quantizedQueryAabbMin[3]; - unsigned short quantizedQueryAabbMax[3]; - - quantizeWithClamp(&quantizedQueryAabbMin[0],aabbMin); - quantizeWithClamp(&quantizedQueryAabbMax[0],aabbMax); - - int i; - for (i=0;im_SubtreeHeaders.size();i++) - { - btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; - - //PCK: unsigned instead of bool - unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); - if (overlap != 0) - { - updateBvhNodes(meshInterface,subtree.m_rootNodeIndex,subtree.m_rootNodeIndex+subtree.m_subtreeSize,i); - - subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]); - } - } - -} - -///just for debugging, to visualize the individual patches/subtrees -#ifdef DEBUG_PATCH_COLORS -btVector3 color[4]= -{ - btVector3(255,0,0), - btVector3(0,255,0), - btVector3(0,0,255), - btVector3(0,255,255) -}; -#endif //DEBUG_PATCH_COLORS - - -void btOptimizedBvh::updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index) -{ - (void)index; - - btAssert(m_useQuantization); - - int nodeSubPart=0; - - //get access info to trianglemesh data - const unsigned char *vertexbase; - int numverts; - PHY_ScalarType type; - int stride; - const unsigned char *indexbase; - int indexstride; - int numfaces; - PHY_ScalarType indicestype; - meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,nodeSubPart); - - btVector3 triangleVerts[3]; - btVector3 aabbMin,aabbMax; - const btVector3& meshScaling = meshInterface->getScaling(); - - int i; - for (i=endNode-1;i>=firstNode;i--) - { - - - btQuantizedBvhNode& curNode = m_quantizedContiguousNodes[i]; - if (curNode.isLeafNode()) - { - //recalc aabb from triangle data - int nodeTriangleIndex = curNode.getTriangleIndex(); - //triangles->getLockedReadOnlyVertexIndexBase(vertexBase,numVerts, - - int* gfxbase = (int*)(indexbase+nodeTriangleIndex*indexstride); - - - for (int j=2;j>=0;j--) - { - - int graphicsindex = gfxbase[j]; - btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); -#ifdef DEBUG_PATCH_COLORS - btVector3 mycolor = color[index&3]; - graphicsbase[8] = mycolor.getX(); - graphicsbase[9] = mycolor.getY(); - graphicsbase[10] = mycolor.getZ(); -#endif //DEBUG_PATCH_COLORS - - - triangleVerts[j] = btVector3( - graphicsbase[0]*meshScaling.getX(), - graphicsbase[1]*meshScaling.getY(), - graphicsbase[2]*meshScaling.getZ()); - } - - - - aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - aabbMin.setMin(triangleVerts[0]); - aabbMax.setMax(triangleVerts[0]); - aabbMin.setMin(triangleVerts[1]); - aabbMax.setMax(triangleVerts[1]); - aabbMin.setMin(triangleVerts[2]); - aabbMax.setMax(triangleVerts[2]); - - quantizeWithClamp(&curNode.m_quantizedAabbMin[0],aabbMin); - quantizeWithClamp(&curNode.m_quantizedAabbMax[0],aabbMax); - - } else - { - //combine aabb from both children - - btQuantizedBvhNode* leftChildNode = &m_quantizedContiguousNodes[i+1]; - - btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? &m_quantizedContiguousNodes[i+2] : - &m_quantizedContiguousNodes[i+1+leftChildNode->getEscapeIndex()]; - - - { - for (int i=0;i<3;i++) - { - curNode.m_quantizedAabbMin[i] = leftChildNode->m_quantizedAabbMin[i]; - if (curNode.m_quantizedAabbMin[i]>rightChildNode->m_quantizedAabbMin[i]) - curNode.m_quantizedAabbMin[i]=rightChildNode->m_quantizedAabbMin[i]; - - curNode.m_quantizedAabbMax[i] = leftChildNode->m_quantizedAabbMax[i]; - if (curNode.m_quantizedAabbMax[i] < rightChildNode->m_quantizedAabbMax[i]) - curNode.m_quantizedAabbMax[i] = rightChildNode->m_quantizedAabbMax[i]; - } - } - } - - } - - meshInterface->unLockReadOnlyVertexBase(nodeSubPart); - - -} - -void btOptimizedBvh::setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin) -{ - //enlarge the AABB to avoid division by zero when initializing the quantization values - btVector3 clampValue(quantizationMargin,quantizationMargin,quantizationMargin); - m_bvhAabbMin = bvhAabbMin - clampValue; - m_bvhAabbMax = bvhAabbMax + clampValue; - btVector3 aabbSize = m_bvhAabbMax - m_bvhAabbMin; - m_bvhQuantization = btVector3(btScalar(65535.0),btScalar(65535.0),btScalar(65535.0)) / aabbSize; -} - - -void btOptimizedBvh::refit(btStridingMeshInterface* meshInterface) -{ - if (m_useQuantization) - { - //calculate new aabb - btVector3 aabbMin,aabbMax; - meshInterface->calculateAabbBruteForce(aabbMin,aabbMax); - - setQuantizationValues(aabbMin,aabbMax); - - updateBvhNodes(meshInterface,0,m_curNodeIndex,0); - - ///now update all subtree headers - - int i; - for (i=0;i gMaxStackDepth) - gMaxStackDepth = gStackDepth; -#endif //DEBUG_TREE_BUILDING - - - int splitAxis, splitIndex, i; - int numIndices =endIndex-startIndex; - int curIndex = m_curNodeIndex; - - assert(numIndices>0); - - if (numIndices==1) - { -#ifdef DEBUG_TREE_BUILDING - gStackDepth--; -#endif //DEBUG_TREE_BUILDING - - assignInternalNodeFromLeafNode(m_curNodeIndex,startIndex); - - m_curNodeIndex++; - return; - } - //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'. - - splitAxis = calcSplittingAxis(startIndex,endIndex); - - splitIndex = sortAndCalcSplittingIndex(startIndex,endIndex,splitAxis); - - int internalNodeIndex = m_curNodeIndex; - - setInternalNodeAabbMax(m_curNodeIndex,btVector3(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30))); - setInternalNodeAabbMin(m_curNodeIndex,btVector3(btScalar(1e30),btScalar(1e30),btScalar(1e30))); - - for (i=startIndex;im_escapeIndex; - - int leftChildNodexIndex = m_curNodeIndex; - - //build left child tree - buildTree(startIndex,splitIndex); - - int rightChildNodexIndex = m_curNodeIndex; - //build right child tree - buildTree(splitIndex,endIndex); - -#ifdef DEBUG_TREE_BUILDING - gStackDepth--; -#endif //DEBUG_TREE_BUILDING - - int escapeIndex = m_curNodeIndex - curIndex; - - if (m_useQuantization) - { - //escapeIndex is the number of nodes of this subtree - const int sizeQuantizedNode =sizeof(btQuantizedBvhNode); - const int treeSizeInBytes = escapeIndex * sizeQuantizedNode; - if (treeSizeInBytes > MAX_SUBTREE_SIZE_IN_BYTES) - { - updateSubtreeHeaders(leftChildNodexIndex,rightChildNodexIndex); - } - } - - setInternalNodeEscapeIndex(internalNodeIndex,escapeIndex); - -} - -void btOptimizedBvh::updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex) -{ - btAssert(m_useQuantization); - - btQuantizedBvhNode& leftChildNode = m_quantizedContiguousNodes[leftChildNodexIndex]; - int leftSubTreeSize = leftChildNode.isLeafNode() ? 1 : leftChildNode.getEscapeIndex(); - int leftSubTreeSizeInBytes = leftSubTreeSize * sizeof(btQuantizedBvhNode); - - btQuantizedBvhNode& rightChildNode = m_quantizedContiguousNodes[rightChildNodexIndex]; - int rightSubTreeSize = rightChildNode.isLeafNode() ? 1 : rightChildNode.getEscapeIndex(); - int rightSubTreeSizeInBytes = rightSubTreeSize * sizeof(btQuantizedBvhNode); - - if(leftSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES) - { - btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); - subtree.setAabbFromQuantizeNode(leftChildNode); - subtree.m_rootNodeIndex = leftChildNodexIndex; - subtree.m_subtreeSize = leftSubTreeSize; - } - - if(rightSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES) - { - btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); - subtree.setAabbFromQuantizeNode(rightChildNode); - subtree.m_rootNodeIndex = rightChildNodexIndex; - subtree.m_subtreeSize = rightSubTreeSize; - } - - //PCK: update the copy of the size - m_subtreeHeaderCount = m_SubtreeHeaders.size(); -} - - -int btOptimizedBvh::sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis) -{ - int i; - int splitIndex =startIndex; - int numIndices = endIndex - startIndex; - btScalar splitValue; - - btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.)); - for (i=startIndex;i splitValue) - { - //swap - swapLeafNodes(i,splitIndex); - splitIndex++; - } - } - - //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex - //otherwise the tree-building might fail due to stack-overflows in certain cases. - //unbalanced1 is unsafe: it can cause stack overflows - //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1))); - - //unbalanced2 should work too: always use center (perfect balanced trees) - //bool unbalanced2 = true; - - //this should be safe too: - int rangeBalancedIndices = numIndices/3; - bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices))); - - if (unbalanced) - { - splitIndex = startIndex+ (numIndices>>1); - } - - bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); - btAssert(!unbal); - - return splitIndex; -} - - -int btOptimizedBvh::calcSplittingAxis(int startIndex,int endIndex) -{ - int i; - - btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.)); - btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.)); - int numIndices = endIndex-startIndex; - - for (i=startIndex;im_aabbMinOrg,rootNode->m_aabbMaxOrg); - isLeafNode = rootNode->m_escapeIndex == -1; - - //PCK: unsigned instead of bool - if (isLeafNode && (aabbOverlap != 0)) - { - nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex); - } - - //PCK: unsigned instead of bool - if ((aabbOverlap != 0) || isLeafNode) - { - rootNode++; - curIndex++; - } else - { - escapeIndex = rootNode->m_escapeIndex; - rootNode += escapeIndex; - curIndex += escapeIndex; - } - } - if (maxIterations < walkIterations) - maxIterations = walkIterations; - -} - -/* -///this was the original recursive traversal, before we optimized towards stackless traversal -void btOptimizedBvh::walkTree(btOptimizedBvhNode* rootNode,btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const -{ - bool isLeafNode, aabbOverlap = TestAabbAgainstAabb2(aabbMin,aabbMax,rootNode->m_aabbMin,rootNode->m_aabbMax); - if (aabbOverlap) - { - isLeafNode = (!rootNode->m_leftChild && !rootNode->m_rightChild); - if (isLeafNode) - { - nodeCallback->processNode(rootNode); - } else - { - walkTree(rootNode->m_leftChild,nodeCallback,aabbMin,aabbMax); - walkTree(rootNode->m_rightChild,nodeCallback,aabbMin,aabbMax); - } - } - -} -*/ - -void btOptimizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const -{ - btAssert(m_useQuantization); - - bool isLeafNode; - //PCK: unsigned instead of bool - unsigned aabbOverlap; - - //PCK: unsigned instead of bool - aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,currentNode->m_quantizedAabbMin,currentNode->m_quantizedAabbMax); - isLeafNode = currentNode->isLeafNode(); - - //PCK: unsigned instead of bool - if (aabbOverlap != 0) - { - if (isLeafNode) - { - nodeCallback->processNode(0,currentNode->getTriangleIndex()); - } else - { - //process left and right children - const btQuantizedBvhNode* leftChildNode = currentNode+1; - walkRecursiveQuantizedTreeAgainstQueryAabb(leftChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax); - - const btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? leftChildNode+1:leftChildNode+leftChildNode->getEscapeIndex(); - walkRecursiveQuantizedTreeAgainstQueryAabb(rightChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax); - } - } -} - - - - - - - -void btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const -{ - btAssert(m_useQuantization); - - int curIndex = startNodeIndex; - int walkIterations = 0; - int subTreeSize = endNodeIndex - startNodeIndex; - - const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex]; - int escapeIndex; - - bool isLeafNode; - //PCK: unsigned instead of bool - unsigned aabbOverlap; - - while (curIndex < endNodeIndex) - { - -//#define VISUALLY_ANALYZE_BVH 1 -#ifdef VISUALLY_ANALYZE_BVH - //some code snippet to debugDraw aabb, to visually analyze bvh structure - static int drawPatch = 0; - //need some global access to a debugDrawer - extern btIDebugDraw* debugDrawerPtr; - if (curIndex==drawPatch) - { - btVector3 aabbMin,aabbMax; - aabbMin = unQuantize(rootNode->m_quantizedAabbMin); - aabbMax = unQuantize(rootNode->m_quantizedAabbMax); - btVector3 color(1,0,0); - debugDrawerPtr->drawAabb(aabbMin,aabbMax,color); - } -#endif//VISUALLY_ANALYZE_BVH - - //catch bugs in tree data - assert (walkIterations < subTreeSize); - - walkIterations++; - //PCK: unsigned instead of bool - aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax); - isLeafNode = rootNode->isLeafNode(); - - if (isLeafNode && aabbOverlap) - { - nodeCallback->processNode(0,rootNode->getTriangleIndex()); - } - - //PCK: unsigned instead of bool - if ((aabbOverlap != 0) || isLeafNode) - { - rootNode++; - curIndex++; - } else - { - escapeIndex = rootNode->getEscapeIndex(); - rootNode += escapeIndex; - curIndex += escapeIndex; - } - } - if (maxIterations < walkIterations) - maxIterations = walkIterations; - -} - -//This traversal can be called from Playstation 3 SPU -void btOptimizedBvh::walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const -{ - btAssert(m_useQuantization); - - int i; - - - for (i=0;im_SubtreeHeaders.size();i++) - { - const btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; - - //PCK: unsigned instead of bool - unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); - if (overlap != 0) - { - walkStacklessQuantizedTree(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax, - subtree.m_rootNodeIndex, - subtree.m_rootNodeIndex+subtree.m_subtreeSize); - } - } -} - - - - -void btOptimizedBvh::reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const -{ - (void)nodeCallback; - (void)aabbMin; - (void)aabbMax; - //not yet, please use aabb - btAssert(0); -} - - - - -btVector3 btOptimizedBvh::unQuantize(const unsigned short* vecIn) const -{ - btVector3 vecOut; - vecOut.setValue( - (btScalar)(vecIn[0]) / (m_bvhQuantization.getX()), - (btScalar)(vecIn[1]) / (m_bvhQuantization.getY()), - (btScalar)(vecIn[2]) / (m_bvhQuantization.getZ())); - vecOut += m_bvhAabbMin; - return vecOut; -} - - -void btOptimizedBvh::swapLeafNodes(int i,int splitIndex) -{ - if (m_useQuantization) - { - btQuantizedBvhNode tmp = m_quantizedLeafNodes[i]; - m_quantizedLeafNodes[i] = m_quantizedLeafNodes[splitIndex]; - m_quantizedLeafNodes[splitIndex] = tmp; - } else - { - btOptimizedBvhNode tmp = m_leafNodes[i]; - m_leafNodes[i] = m_leafNodes[splitIndex]; - m_leafNodes[splitIndex] = tmp; - } -} - -void btOptimizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex) -{ - if (m_useQuantization) - { - m_quantizedContiguousNodes[internalNode] = m_quantizedLeafNodes[leafNodeIndex]; - } else - { - m_contiguousNodes[internalNode] = m_leafNodes[leafNodeIndex]; - } -} - -//PCK: include -#include - -//PCK: consts -static const unsigned BVH_ALIGNMENT = 16; -static const unsigned BVH_ALIGNMENT_MASK = BVH_ALIGNMENT-1; - -static const unsigned BVH_ALIGNMENT_BLOCKS = 2; - - - -unsigned int btOptimizedBvh::getAlignmentSerializationPadding() -{ - return BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT; -} - -unsigned btOptimizedBvh::calculateSerializeBufferSize() -{ - unsigned baseSize = sizeof(btOptimizedBvh) + getAlignmentSerializationPadding(); - baseSize += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount; - if (m_useQuantization) - { - return baseSize + m_curNodeIndex * sizeof(btQuantizedBvhNode); - } - return baseSize + m_curNodeIndex * sizeof(btOptimizedBvhNode); -} - -bool btOptimizedBvh::serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) -{ - assert(m_subtreeHeaderCount == m_SubtreeHeaders.size()); - m_subtreeHeaderCount = m_SubtreeHeaders.size(); - -/* if (i_dataBufferSize < calculateSerializeBufferSize() || o_alignedDataBuffer == NULL || (((unsigned)o_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0)) - { - ///check alignedment for buffer? - btAssert(0); - return false; - } -*/ - - btOptimizedBvh *targetBvh = (btOptimizedBvh *)o_alignedDataBuffer; - - // construct the class so the virtual function table, etc will be set up - // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor - new (targetBvh) btOptimizedBvh; - - if (i_swapEndian) - { - targetBvh->m_curNodeIndex = btSwapEndian(m_curNodeIndex); - - - btSwapVector3Endian(m_bvhAabbMin,targetBvh->m_bvhAabbMin); - btSwapVector3Endian(m_bvhAabbMax,targetBvh->m_bvhAabbMax); - btSwapVector3Endian(m_bvhQuantization,targetBvh->m_bvhQuantization); - - targetBvh->m_traversalMode = (btTraversalMode)btSwapEndian(m_traversalMode); - targetBvh->m_subtreeHeaderCount = btSwapEndian(m_subtreeHeaderCount); - } - else - { - targetBvh->m_curNodeIndex = m_curNodeIndex; - targetBvh->m_bvhAabbMin = m_bvhAabbMin; - targetBvh->m_bvhAabbMax = m_bvhAabbMax; - targetBvh->m_bvhQuantization = m_bvhQuantization; - targetBvh->m_traversalMode = m_traversalMode; - targetBvh->m_subtreeHeaderCount = m_subtreeHeaderCount; - } - - targetBvh->m_useQuantization = m_useQuantization; - - unsigned char *nodeData = (unsigned char *)targetBvh; - nodeData += sizeof(btOptimizedBvh); - - unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; - nodeData += sizeToAdd; - - int nodeCount = m_curNodeIndex; - - if (m_useQuantization) - { - targetBvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); - - if (i_swapEndian) - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]); - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]); - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]); - - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]); - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]); - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]); - - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex); - } - } - else - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]; - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]; - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]; - - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]; - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]; - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]; - - targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex; - - - } - } - nodeData += sizeof(btQuantizedBvhNode) * nodeCount; - } - else - { - targetBvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); - - if (i_swapEndian) - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMinOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg); - btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMaxOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg); - - targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = btSwapEndian(m_contiguousNodes[nodeIndex].m_escapeIndex); - targetBvh->m_contiguousNodes[nodeIndex].m_subPart = btSwapEndian(m_contiguousNodes[nodeIndex].m_subPart); - targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = btSwapEndian(m_contiguousNodes[nodeIndex].m_triangleIndex); - } - } - else - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg = m_contiguousNodes[nodeIndex].m_aabbMinOrg; - targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg = m_contiguousNodes[nodeIndex].m_aabbMaxOrg; - - targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = m_contiguousNodes[nodeIndex].m_escapeIndex; - targetBvh->m_contiguousNodes[nodeIndex].m_subPart = m_contiguousNodes[nodeIndex].m_subPart; - targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = m_contiguousNodes[nodeIndex].m_triangleIndex; - } - } - nodeData += sizeof(btOptimizedBvhNode) * nodeCount; - } - - sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; - nodeData += sizeToAdd; - - // Now serialize the subtree headers - targetBvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, m_subtreeHeaderCount, m_subtreeHeaderCount); - if (i_swapEndian) - { - for (int i = 0; i < m_subtreeHeaderCount; i++) - { - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[0]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[1]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[2]); - - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[0]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[1]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[2]); - - targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = btSwapEndian(m_SubtreeHeaders[i].m_rootNodeIndex); - targetBvh->m_SubtreeHeaders[i].m_subtreeSize = btSwapEndian(m_SubtreeHeaders[i].m_subtreeSize); - } - } - else - { - for (int i = 0; i < m_subtreeHeaderCount; i++) - { - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = (m_SubtreeHeaders[i].m_quantizedAabbMin[0]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = (m_SubtreeHeaders[i].m_quantizedAabbMin[1]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = (m_SubtreeHeaders[i].m_quantizedAabbMin[2]); - - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = (m_SubtreeHeaders[i].m_quantizedAabbMax[0]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = (m_SubtreeHeaders[i].m_quantizedAabbMax[1]); - targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = (m_SubtreeHeaders[i].m_quantizedAabbMax[2]); - - targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = (m_SubtreeHeaders[i].m_rootNodeIndex); - targetBvh->m_SubtreeHeaders[i].m_subtreeSize = (m_SubtreeHeaders[i].m_subtreeSize); - targetBvh->m_SubtreeHeaders[i] = m_SubtreeHeaders[i]; - } - } - - nodeData += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount; - - return true; -} - -btOptimizedBvh *btOptimizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) -{ - - if (i_alignedDataBuffer == NULL)// || (((unsigned)i_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0)) - { - return NULL; - } - btOptimizedBvh *bvh = (btOptimizedBvh *)i_alignedDataBuffer; - - if (i_swapEndian) - { - bvh->m_curNodeIndex = btSwapEndian(bvh->m_curNodeIndex); - - btUnSwapVector3Endian(bvh->m_bvhAabbMin); - btUnSwapVector3Endian(bvh->m_bvhAabbMax); - btUnSwapVector3Endian(bvh->m_bvhQuantization); - - bvh->m_traversalMode = (btTraversalMode)btSwapEndian(bvh->m_traversalMode); - bvh->m_subtreeHeaderCount = btSwapEndian(bvh->m_subtreeHeaderCount); - } - - int calculatedBufSize = bvh->calculateSerializeBufferSize(); - btAssert(calculatedBufSize <= i_dataBufferSize); - - if (calculatedBufSize > i_dataBufferSize) - { - return NULL; - } - - unsigned char *nodeData = (unsigned char *)bvh; - nodeData += sizeof(btOptimizedBvh); - - unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; - nodeData += sizeToAdd; - - int nodeCount = bvh->m_curNodeIndex; - - // Must call placement new to fill in virtual function table, etc, but we don't want to overwrite most data, so call a special version of the constructor - // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor - new (bvh) btOptimizedBvh(*bvh, false); - - if (bvh->m_useQuantization) - { - bvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); - - if (i_swapEndian) - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]); - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]); - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]); - - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]); - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]); - bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]); - - bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex); - } - } - nodeData += sizeof(btQuantizedBvhNode) * nodeCount; - } - else - { - bvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount); - - if (i_swapEndian) - { - for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++) - { - btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg); - btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg); - - bvh->m_contiguousNodes[nodeIndex].m_escapeIndex = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_escapeIndex); - bvh->m_contiguousNodes[nodeIndex].m_subPart = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_subPart); - bvh->m_contiguousNodes[nodeIndex].m_triangleIndex = btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_triangleIndex); - } - } - nodeData += sizeof(btOptimizedBvhNode) * nodeCount; - } - - sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK; - nodeData += sizeToAdd; - - // Now serialize the subtree headers - bvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, bvh->m_subtreeHeaderCount, bvh->m_subtreeHeaderCount); - if (i_swapEndian) - { - for (int i = 0; i < bvh->m_subtreeHeaderCount; i++) - { - bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0]); - bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1]); - bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2]); - - bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0]); - bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1]); - bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2]); - - bvh->m_SubtreeHeaders[i].m_rootNodeIndex = btSwapEndian(bvh->m_SubtreeHeaders[i].m_rootNodeIndex); - bvh->m_SubtreeHeaders[i].m_subtreeSize = btSwapEndian(bvh->m_SubtreeHeaders[i].m_subtreeSize); - } - } - - return bvh; -} - -// Constructor that prevents btVector3's default constructor from being called -btOptimizedBvh::btOptimizedBvh(btOptimizedBvh &self, bool ownsMemory) : -m_bvhAabbMin(self.m_bvhAabbMin), -m_bvhAabbMax(self.m_bvhAabbMax), -m_bvhQuantization(self.m_bvhQuantization) -{ - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h deleted file mode 100644 index bcacdbe582b..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h +++ /dev/null @@ -1,393 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef OPTIMIZED_BVH_H -#define OPTIMIZED_BVH_H - - - -#include "LinearMath/btVector3.h" -#include "LinearMath/btAlignedAllocator.h" - - -//http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrf__m128.asp - - - -class btStridingMeshInterface; - -//Note: currently we have 16 bytes per quantized node -#define MAX_SUBTREE_SIZE_IN_BYTES 2048 - - -///btQuantizedBvhNode is a compressed aabb node, 16 bytes. -///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range). -ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - //12 bytes - unsigned short int m_quantizedAabbMin[3]; - unsigned short int m_quantizedAabbMax[3]; - //4 bytes - int m_escapeIndexOrTriangleIndex; - - bool isLeafNode() const - { - //skipindex is negative (internal node), triangleindex >=0 (leafnode) - return (m_escapeIndexOrTriangleIndex >= 0); - } - int getEscapeIndex() const - { - btAssert(!isLeafNode()); - return -m_escapeIndexOrTriangleIndex; - } - int getTriangleIndex() const - { - btAssert(isLeafNode()); - return m_escapeIndexOrTriangleIndex; - } -} -; - -/// btOptimizedBvhNode contains both internal and leaf node information. -/// Total node size is 44 bytes / node. You can use the compressed version of 16 bytes. -ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - //32 bytes - btVector3 m_aabbMinOrg; - btVector3 m_aabbMaxOrg; - - //4 - int m_escapeIndex; - - //8 - //for child nodes - int m_subPart; - int m_triangleIndex; - int m_padding[5];//bad, due to alignment - - -}; - - -///btBvhSubtreeInfo provides info to gather a subtree of limited size -ATTRIBUTE_ALIGNED16(class) btBvhSubtreeInfo -{ -public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - - //12 bytes - unsigned short int m_quantizedAabbMin[3]; - unsigned short int m_quantizedAabbMax[3]; - //4 bytes, points to the root of the subtree - int m_rootNodeIndex; - //4 bytes - int m_subtreeSize; - int m_padding[3]; - - btBvhSubtreeInfo() - { - //memset(&m_padding[0], 0, sizeof(m_padding)); - } - - - void setAabbFromQuantizeNode(const btQuantizedBvhNode& quantizedNode) - { - m_quantizedAabbMin[0] = quantizedNode.m_quantizedAabbMin[0]; - m_quantizedAabbMin[1] = quantizedNode.m_quantizedAabbMin[1]; - m_quantizedAabbMin[2] = quantizedNode.m_quantizedAabbMin[2]; - m_quantizedAabbMax[0] = quantizedNode.m_quantizedAabbMax[0]; - m_quantizedAabbMax[1] = quantizedNode.m_quantizedAabbMax[1]; - m_quantizedAabbMax[2] = quantizedNode.m_quantizedAabbMax[2]; - } -} -; - - -class btNodeOverlapCallback -{ -public: - virtual ~btNodeOverlapCallback() {}; - - virtual void processNode(int subPart, int triangleIndex) = 0; -}; - -#include "LinearMath/btAlignedAllocator.h" -#include "LinearMath/btAlignedObjectArray.h" - - - -///for code readability: -typedef btAlignedObjectArray NodeArray; -typedef btAlignedObjectArray QuantizedNodeArray; -typedef btAlignedObjectArray BvhSubtreeInfoArray; - - -///OptimizedBvh store an AABB tree that can be quickly traversed on CPU (and SPU,GPU in future) -ATTRIBUTE_ALIGNED16(class) btOptimizedBvh -{ - NodeArray m_leafNodes; - NodeArray m_contiguousNodes; - - QuantizedNodeArray m_quantizedLeafNodes; - - QuantizedNodeArray m_quantizedContiguousNodes; - - int m_curNodeIndex; - - - //quantization data - bool m_useQuantization; - btVector3 m_bvhAabbMin; - btVector3 m_bvhAabbMax; - btVector3 m_bvhQuantization; -public: - BT_DECLARE_ALIGNED_ALLOCATOR(); - - enum btTraversalMode - { - TRAVERSAL_STACKLESS = 0, - TRAVERSAL_STACKLESS_CACHE_FRIENDLY, - TRAVERSAL_RECURSIVE - }; -protected: - - btTraversalMode m_traversalMode; - - BvhSubtreeInfoArray m_SubtreeHeaders; - - //This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray - int m_subtreeHeaderCount; - - - ///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) - ///this might be refactored into a virtual, it is usually not calculated at run-time - void setInternalNodeAabbMin(int nodeIndex, const btVector3& aabbMin) - { - if (m_useQuantization) - { - quantizeWithClamp(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] ,aabbMin); - } else - { - m_contiguousNodes[nodeIndex].m_aabbMinOrg = aabbMin; - - } - } - void setInternalNodeAabbMax(int nodeIndex,const btVector3& aabbMax) - { - if (m_useQuantization) - { - quantizeWithClamp(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0],aabbMax); - } else - { - m_contiguousNodes[nodeIndex].m_aabbMaxOrg = aabbMax; - } - } - - btVector3 getAabbMin(int nodeIndex) const - { - if (m_useQuantization) - { - return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMin[0]); - } - //non-quantized - return m_leafNodes[nodeIndex].m_aabbMinOrg; - - } - btVector3 getAabbMax(int nodeIndex) const - { - if (m_useQuantization) - { - return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMax[0]); - } - //non-quantized - return m_leafNodes[nodeIndex].m_aabbMaxOrg; - - } - - void setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin=btScalar(1.0)); - - void setInternalNodeEscapeIndex(int nodeIndex, int escapeIndex) - { - if (m_useQuantization) - { - m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = -escapeIndex; - } - else - { - m_contiguousNodes[nodeIndex].m_escapeIndex = escapeIndex; - } - - } - - void mergeInternalNodeAabb(int nodeIndex,const btVector3& newAabbMin,const btVector3& newAabbMax) - { - if (m_useQuantization) - { - unsigned short int quantizedAabbMin[3]; - unsigned short int quantizedAabbMax[3]; - quantizeWithClamp(quantizedAabbMin,newAabbMin); - quantizeWithClamp(quantizedAabbMax,newAabbMax); - for (int i=0;i<3;i++) - { - if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] > quantizedAabbMin[i]) - m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] = quantizedAabbMin[i]; - - if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] < quantizedAabbMax[i]) - m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] = quantizedAabbMax[i]; - - } - } else - { - //non-quantized - m_contiguousNodes[nodeIndex].m_aabbMinOrg.setMin(newAabbMin); - m_contiguousNodes[nodeIndex].m_aabbMaxOrg.setMax(newAabbMax); - } - } - - void swapLeafNodes(int firstIndex,int secondIndex); - - void assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex); - -protected: - - - - void buildTree (int startIndex,int endIndex); - - int calcSplittingAxis(int startIndex,int endIndex); - - int sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis); - - void walkStacklessTree(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - void walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const; - - ///tree traversal designed for small-memory processors like PS3 SPU - void walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const; - - ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal - void walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const; - - ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal - void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const; - - -#define USE_BANCHLESS 1 -#ifdef USE_BANCHLESS - //This block replaces the block below and uses no branches, and replaces the 8 bit return with a 32 bit return for improved performance (~3x on XBox 360) - SIMD_FORCE_INLINE unsigned testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const - { - return btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0]) - & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2]) - & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])), - 1, 0); - } -#else - SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const - { - bool overlap = true; - overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; - return overlap; - } -#endif //USE_BANCHLESS - - void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex); - -public: - btOptimizedBvh(); - - virtual ~btOptimizedBvh(); - - void build(btStridingMeshInterface* triangles,bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax); - - void reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - void reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - SIMD_FORCE_INLINE void quantizeWithClamp(unsigned short* out, const btVector3& point) const - { - - btAssert(m_useQuantization); - - btVector3 clampedPoint(point); - clampedPoint.setMax(m_bvhAabbMin); - clampedPoint.setMin(m_bvhAabbMax); - - btVector3 v = (clampedPoint - m_bvhAabbMin) * m_bvhQuantization; - out[0] = (unsigned short)(v.getX()+0.5f); - out[1] = (unsigned short)(v.getY()+0.5f); - out[2] = (unsigned short)(v.getZ()+0.5f); - } - - - btVector3 unQuantize(const unsigned short* vecIn) const; - - ///setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees. - void setTraversalMode(btTraversalMode traversalMode) - { - m_traversalMode = traversalMode; - } - - void refit(btStridingMeshInterface* triangles); - - void refitPartial(btStridingMeshInterface* triangles,const btVector3& aabbMin, const btVector3& aabbMax); - - void updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index); - - - SIMD_FORCE_INLINE QuantizedNodeArray& getQuantizedNodeArray() - { - return m_quantizedContiguousNodes; - } - - SIMD_FORCE_INLINE BvhSubtreeInfoArray& getSubtreeInfoArray() - { - return m_SubtreeHeaders; - } - - /////Calculate space needed to store BVH for serialization - unsigned calculateSerializeBufferSize(); - - /// Data buffer MUST be 16 byte aligned - bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian); - - ///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place' - static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian); - - static unsigned int getAlignmentSerializationPadding(); - - SIMD_FORCE_INLINE bool isQuantized() - { - return m_useQuantization; - } - -private: - // Special "copy" constructor that allows for in-place deserialization - // Prevents btVector3's default constructor from being called, but doesn't inialize much else - // ownsMemory should most likely be false if deserializing, and if you are not, don't call this (it also changes the function signature, which we need) - btOptimizedBvh(btOptimizedBvh &other, bool ownsMemory); - -} -; - - -#endif //OPTIMIZED_BVH_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp deleted file mode 100644 index 30323deb3b5..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include - -btPolyhedralConvexShape::btPolyhedralConvexShape() -:m_localAabbMin(1,1,1), -m_localAabbMax(-1,-1,-1), -m_isLocalAabbValid(false), -m_optionalHull(0) -{ - -} - - - -btVector3 btPolyhedralConvexShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const -{ - int i; - btVector3 supVec(0,0,0); - - btScalar maxDot(btScalar(-1e30)); - - btVector3 vec = vec0; - btScalar lenSqr = vec.length2(); - if (lenSqr < btScalar(0.0001)) - { - vec.setValue(1,0,0); - } else - { - btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); - vec *= rlen; - } - - btVector3 vtx; - btScalar newDot; - - for (i=0;i maxDot) - { - maxDot = newDot; - supVec = vtx; - } - } - - return supVec; - -} - -void btPolyhedralConvexShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - int i; - - btVector3 vtx; - btScalar newDot; - - for (i=0;i supportVerticesOut[j][3]) - { - //WARNING: don't swap next lines, the w component would get overwritten! - supportVerticesOut[j] = vtx; - supportVerticesOut[j][3] = newDot; - } - } - } -} - - - -void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - //not yet, return box inertia - - btScalar margin = getMargin(); - - btTransform ident; - ident.setIdentity(); - btVector3 aabbMin,aabbMax; - getAabb(ident,aabbMin,aabbMax); - btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5); - - btScalar lx=btScalar(2.)*(halfExtents.x()+margin); - btScalar ly=btScalar(2.)*(halfExtents.y()+margin); - btScalar lz=btScalar(2.)*(halfExtents.z()+margin); - const btScalar x2 = lx*lx; - const btScalar y2 = ly*ly; - const btScalar z2 = lz*lz; - const btScalar scaledmass = mass * btScalar(0.08333333); - - inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2)); - -} - - - -void btPolyhedralConvexShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const -{ - getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin()); -} - - - - -void btPolyhedralConvexShape::recalcLocalAabb() -{ - m_isLocalAabbValid = true; - - for (int i=0;i<3;i++) - { - btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); - vec[i] = btScalar(1.); - btVector3 tmp = localGetSupportingVertex(vec); - m_localAabbMax[i] = tmp[i]+m_collisionMargin; - vec[i] = btScalar(-1.); - tmp = localGetSupportingVertex(vec); - m_localAabbMin[i] = tmp[i]-m_collisionMargin; - } -} - - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h deleted file mode 100644 index 9d46b991e10..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BU_SHAPE -#define BU_SHAPE - -#include "LinearMath/btPoint3.h" -#include "LinearMath/btMatrix3x3.h" -#include "btConvexInternalShape.h" - - -///PolyhedralConvexShape is an interface class for feature based (vertex/edge/face) convex shapes. -class btPolyhedralConvexShape : public btConvexInternalShape -{ - -protected: - btVector3 m_localAabbMin; - btVector3 m_localAabbMax; - bool m_isLocalAabbValid; - -public: - - btPolyhedralConvexShape(); - - //brute force implementations - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - - inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const - { - - //lazy evaluation of local aabb - btAssert(m_isLocalAabbValid); - - btAssert(m_localAabbMin.getX() <= m_localAabbMax.getX()); - btAssert(m_localAabbMin.getY() <= m_localAabbMax.getY()); - btAssert(m_localAabbMin.getZ() <= m_localAabbMax.getZ()); - - - btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); - btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); - - btMatrix3x3 abs_b = trans.getBasis().absolute(); - - btPoint3 center = trans(localCenter); - - btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), - abs_b[1].dot(localHalfExtents), - abs_b[2].dot(localHalfExtents)); - extent += btVector3(margin,margin,margin); - - aabbMin = center - extent; - aabbMax = center + extent; - - - } - - - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - void recalcLocalAabb(); - - virtual int getNumVertices() const = 0 ; - virtual int getNumEdges() const = 0; - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const = 0; - virtual void getVertex(int i,btPoint3& vtx) const = 0; - virtual int getNumPlanes() const = 0; - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const = 0; -// virtual int getIndex(int i) const = 0 ; - - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const = 0; - - /// optional Hull is for optional Separating Axis Test Hull collision detection, see Hull.cpp - class Hull* m_optionalHull; - -}; - -#endif //BU_SHAPE diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp deleted file mode 100644 index 15cfe432e27..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btSphereShape.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" - -#include "LinearMath/btQuaternion.h" - - -btSphereShape ::btSphereShape (btScalar radius) -{ - m_implicitShapeDimensions.setX(radius); -} - -btVector3 btSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - (void)vec; - return btVector3(btScalar(0.),btScalar(0.),btScalar(0.)); -} - -void btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - (void)vectors; - - for (int i=0;iprocessTriangle(triangle,0,0); - - triangle[0] = projectedCenter - tangentDir0*radius - tangentDir1*radius; - triangle[1] = projectedCenter - tangentDir0*radius + tangentDir1*radius; - triangle[2] = projectedCenter + tangentDir0*radius + tangentDir1*radius; - - callback->processTriangle(triangle,0,1); - -} - -void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - (void)mass; - - //moving concave objects not supported - - inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); -} - -void btStaticPlaneShape::setLocalScaling(const btVector3& scaling) -{ - m_localScaling = scaling; -} -const btVector3& btStaticPlaneShape::getLocalScaling() const -{ - return m_localScaling; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h deleted file mode 100644 index 0cbce3abd93..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef STATIC_PLANE_SHAPE_H -#define STATIC_PLANE_SHAPE_H - -#include "btConcaveShape.h" - - -///StaticPlaneShape simulates an 'infinite' plane by dynamically reporting triangles approximated by intersection of the plane with the AABB. -///Assumed is that the other objects is not also infinite, so a reasonable sized AABB. -class btStaticPlaneShape : public btConcaveShape -{ -protected: - btVector3 m_localAabbMin; - btVector3 m_localAabbMax; - - btVector3 m_planeNormal; - btScalar m_planeConstant; - btVector3 m_localScaling; - -public: - btStaticPlaneShape(const btVector3& planeNormal,btScalar planeConstant); - - virtual ~btStaticPlaneShape(); - - - virtual int getShapeType() const - { - return STATIC_PLANE_PROXYTYPE; - } - - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - virtual void setLocalScaling(const btVector3& scaling); - virtual const btVector3& getLocalScaling() const; - - - //debugging - virtual const char* getName()const {return "STATICPLANE";} - - -}; - -#endif //STATIC_PLANE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp deleted file mode 100644 index 3129b7c83ce..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btStridingMeshInterface.h" - -btStridingMeshInterface::~btStridingMeshInterface() -{ - -} - - -void btStridingMeshInterface::InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const -{ - (void)aabbMin; - (void)aabbMax; - int numtotalphysicsverts = 0; - int part,graphicssubparts = getNumSubParts(); - const unsigned char * vertexbase; - const unsigned char * indexbase; - int indexstride; - PHY_ScalarType type; - PHY_ScalarType gfxindextype; - int stride,numverts,numtriangles; - int gfxindex; - btVector3 triangle[3]; - btScalar* graphicsbase; - - btVector3 meshScaling = getScaling(); - - ///if the number of parts is big, the performance might drop due to the innerloop switch on indextype - for (part=0;partinternalProcessTriangleIndex(triangle,part,gfxindex); - } - break; - } - case PHY_SHORT: - { - for (gfxindex=0;gfxindexinternalProcessTriangleIndex(triangle,part,gfxindex); - } - break; - } - default: - btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT)); - } - - unLockReadOnlyVertexBase(part); - } -} - -void btStridingMeshInterface::calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax) -{ - - struct AabbCalculationCallback : public btInternalTriangleIndexCallback - { - btVector3 m_aabbMin; - btVector3 m_aabbMax; - - AabbCalculationCallback() - { - m_aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - m_aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - (void)partId; - (void)triangleIndex; - - m_aabbMin.setMin(triangle[0]); - m_aabbMax.setMax(triangle[0]); - m_aabbMin.setMin(triangle[1]); - m_aabbMax.setMax(triangle[1]); - m_aabbMin.setMin(triangle[2]); - m_aabbMax.setMax(triangle[2]); - } - }; - - //first calculate the total aabb for all triangles - AabbCalculationCallback aabbCallback; - aabbMin.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - aabbMax.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - InternalProcessAllTriangles(&aabbCallback,aabbMin,aabbMax); - - aabbMin = aabbCallback.m_aabbMin; - aabbMax = aabbCallback.m_aabbMax; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h deleted file mode 100644 index 4ce0bd2e2f9..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef STRIDING_MESHINTERFACE_H -#define STRIDING_MESHINTERFACE_H - -#include "LinearMath/btVector3.h" -#include "btTriangleCallback.h" - -/// PHY_ScalarType enumerates possible scalar types. -/// See the btStridingMeshInterface for its use -typedef enum PHY_ScalarType { - PHY_FLOAT, - PHY_DOUBLE, - PHY_INTEGER, - PHY_SHORT, - PHY_FIXEDPOINT88 -} PHY_ScalarType; - -/// btStridingMeshInterface is the interface class for high performance access to triangle meshes -/// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory. -class btStridingMeshInterface -{ - protected: - - btVector3 m_scaling; - - public: - btStridingMeshInterface() :m_scaling(btScalar(1.),btScalar(1.),btScalar(1.)) - { - - } - - virtual ~btStridingMeshInterface(); - - - - void InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - ///brute force method to calculate aabb - void calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax); - - /// get read and write access to a subpart of a triangle mesh - /// this subpart has a continuous array of vertices and indices - /// in this way the mesh can be handled as chunks of memory with striding - /// very similar to OpenGL vertexarray support - /// make a call to unLockVertexBase when the read and write access is finished - virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0)=0; - - virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const=0; - - /// unLockVertexBase finishes the access to a subpart of the triangle mesh - /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished - virtual void unLockVertexBase(int subpart)=0; - - virtual void unLockReadOnlyVertexBase(int subpart) const=0; - - - /// getNumSubParts returns the number of seperate subparts - /// each subpart has a continuous array of vertices and indices - virtual int getNumSubParts() const=0; - - virtual void preallocateVertices(int numverts)=0; - virtual void preallocateIndices(int numindices)=0; - - const btVector3& getScaling() const { - return m_scaling; - } - void setScaling(const btVector3& scaling) - { - m_scaling = scaling; - } - - -}; - -#endif //STRIDING_MESHINTERFACE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp deleted file mode 100644 index 3aa1eda9964..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp +++ /dev/null @@ -1,195 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#include "btTetrahedronShape.h" -#include "LinearMath/btMatrix3x3.h" - -btBU_Simplex1to4::btBU_Simplex1to4() -:m_numVertices(0) -{ -} - -btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0) -:m_numVertices(0) -{ - addVertex(pt0); -} - -btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1) -:m_numVertices(0) -{ - addVertex(pt0); - addVertex(pt1); -} - -btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2) -:m_numVertices(0) -{ - addVertex(pt0); - addVertex(pt1); - addVertex(pt2); -} - -btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2,const btPoint3& pt3) -:m_numVertices(0) -{ - addVertex(pt0); - addVertex(pt1); - addVertex(pt2); - addVertex(pt3); -} - - - - - -void btBU_Simplex1to4::addVertex(const btPoint3& pt) -{ - m_vertices[m_numVertices++] = pt; - - recalcLocalAabb(); -} - - -int btBU_Simplex1to4::getNumVertices() const -{ - return m_numVertices; -} - -int btBU_Simplex1to4::getNumEdges() const -{ - //euler formula, F-E+V = 2, so E = F+V-2 - - switch (m_numVertices) - { - case 0: - return 0; - case 1: return 0; - case 2: return 1; - case 3: return 3; - case 4: return 6; - - - } - - return 0; -} - -void btBU_Simplex1to4::getEdge(int i,btPoint3& pa,btPoint3& pb) const -{ - - switch (m_numVertices) - { - - case 2: - pa = m_vertices[0]; - pb = m_vertices[1]; - break; - case 3: - switch (i) - { - case 0: - pa = m_vertices[0]; - pb = m_vertices[1]; - break; - case 1: - pa = m_vertices[1]; - pb = m_vertices[2]; - break; - case 2: - pa = m_vertices[2]; - pb = m_vertices[0]; - break; - - } - break; - case 4: - switch (i) - { - case 0: - pa = m_vertices[0]; - pb = m_vertices[1]; - break; - case 1: - pa = m_vertices[1]; - pb = m_vertices[2]; - break; - case 2: - pa = m_vertices[2]; - pb = m_vertices[0]; - break; - case 3: - pa = m_vertices[0]; - pb = m_vertices[3]; - break; - case 4: - pa = m_vertices[1]; - pb = m_vertices[3]; - break; - case 5: - pa = m_vertices[2]; - pb = m_vertices[3]; - break; - } - - } - - - - -} - -void btBU_Simplex1to4::getVertex(int i,btPoint3& vtx) const -{ - vtx = m_vertices[i]; -} - -int btBU_Simplex1to4::getNumPlanes() const -{ - switch (m_numVertices) - { - case 0: - return 0; - case 1: - return 0; - case 2: - return 0; - case 3: - return 2; - case 4: - return 4; - default: - { - } - } - return 0; -} - - -void btBU_Simplex1to4::getPlane(btVector3&, btPoint3& ,int ) const -{ - -} - -int btBU_Simplex1to4::getIndex(int ) const -{ - return 0; -} - -bool btBU_Simplex1to4::isInside(const btPoint3& ,btScalar ) const -{ - return false; -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h deleted file mode 100644 index ca1b4b42a6f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BU_SIMPLEX_1TO4_SHAPE -#define BU_SIMPLEX_1TO4_SHAPE - - -#include "btPolyhedralConvexShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" - - -///BU_Simplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex). -class btBU_Simplex1to4 : public btPolyhedralConvexShape -{ -protected: - - int m_numVertices; - btPoint3 m_vertices[4]; - -public: - btBU_Simplex1to4(); - - btBU_Simplex1to4(const btPoint3& pt0); - btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1); - btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2); - btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2,const btPoint3& pt3); - - - void reset() - { - m_numVertices = 0; - } - - - virtual int getShapeType() const{ return TETRAHEDRAL_SHAPE_PROXYTYPE; } - - void addVertex(const btPoint3& pt); - - //PolyhedralConvexShape interface - - virtual int getNumVertices() const; - - virtual int getNumEdges() const; - - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; - - virtual void getVertex(int i,btPoint3& vtx) const; - - virtual int getNumPlanes() const; - - virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i) const; - - virtual int getIndex(int i) const; - - virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; - - - ///getName is for debugging - virtual const char* getName()const { return "btBU_Simplex1to4";} - -}; - -#endif //BU_SIMPLEX_1TO4_SHAPE diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp deleted file mode 100644 index 54864c32f3a..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btTriangleBuffer.h" - - -///example usage of this class: -// btTriangleBuffer triBuf; -// concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax); -// for (int i=0;i m_triangleBuffer; - -public: - - - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); - - int getNumTriangles() const - { - return int(m_triangleBuffer.size()); - } - - const btTriangle& getTriangle(int index) const - { - return m_triangleBuffer[index]; - } - - void clearBuffer() - { - m_triangleBuffer.clear(); - } - -}; - - -#endif //BT_TRIANGLE_BUFFER_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp deleted file mode 100644 index a020746db5f..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btTriangleCallback.h" - -btTriangleCallback::~btTriangleCallback() -{ - -} - - -btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback() -{ - -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h deleted file mode 100644 index 7b2337498ec..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef TRIANGLE_CALLBACK_H -#define TRIANGLE_CALLBACK_H - -#include "LinearMath/btVector3.h" - - -class btTriangleCallback -{ -public: - - virtual ~btTriangleCallback(); - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0; -}; - -class btInternalTriangleIndexCallback -{ -public: - - virtual ~btInternalTriangleIndexCallback(); - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) = 0; -}; - - - -#endif //TRIANGLE_CALLBACK_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp deleted file mode 100644 index 554915a7058..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btTriangleIndexVertexArray.h" - -btTriangleIndexVertexArray::btTriangleIndexVertexArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride) -{ - btIndexedMesh mesh; - - mesh.m_numTriangles = numTriangles; - mesh.m_triangleIndexBase = (const unsigned char *)triangleIndexBase; - mesh.m_triangleIndexStride = triangleIndexStride; - mesh.m_numVertices = numVertices; - mesh.m_vertexBase = (const unsigned char *)vertexBase; - mesh.m_vertexStride = vertexStride; - - addIndexedMesh(mesh); - -} - -btTriangleIndexVertexArray::~btTriangleIndexVertexArray() -{ - -} - -void btTriangleIndexVertexArray::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) -{ - btAssert(subpart< getNumSubParts() ); - - btIndexedMesh& mesh = m_indexedMeshes[subpart]; - - numverts = mesh.m_numVertices; - (*vertexbase) = (unsigned char *) mesh.m_vertexBase; - #ifdef BT_USE_DOUBLE_PRECISION - type = PHY_DOUBLE; - #else - type = PHY_FLOAT; - #endif - vertexStride = mesh.m_vertexStride; - - numfaces = mesh.m_numTriangles; - - (*indexbase) = (unsigned char *)mesh.m_triangleIndexBase; - indexstride = mesh.m_triangleIndexStride; - indicestype = PHY_INTEGER; -} - -void btTriangleIndexVertexArray::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const -{ - const btIndexedMesh& mesh = m_indexedMeshes[subpart]; - - numverts = mesh.m_numVertices; - (*vertexbase) = (const unsigned char *)mesh.m_vertexBase; - #ifdef BT_USE_DOUBLE_PRECISION - type = PHY_DOUBLE; - #else - type = PHY_FLOAT; - #endif - vertexStride = mesh.m_vertexStride; - - numfaces = mesh.m_numTriangles; - (*indexbase) = (const unsigned char *)mesh.m_triangleIndexBase; - indexstride = mesh.m_triangleIndexStride; - indicestype = PHY_INTEGER; -} - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h deleted file mode 100644 index 3441a8325e2..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_TRIANGLE_INDEX_VERTEX_ARRAY_H -#define BT_TRIANGLE_INDEX_VERTEX_ARRAY_H - -#include "btStridingMeshInterface.h" -#include "LinearMath/btAlignedObjectArray.h" -#include "LinearMath/btScalar.h" - - -///IndexedMesh indexes into existing vertex and index arrays, in a similar way OpenGL glDrawElements -///instead of the number of indices, we pass the number of triangles -///todo: explain with pictures -ATTRIBUTE_ALIGNED16( struct) btIndexedMesh -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - int m_numTriangles; - const unsigned char * m_triangleIndexBase; - int m_triangleIndexStride; - int m_numVertices; - const unsigned char * m_vertexBase; - int m_vertexStride; - int pad[2]; -} -; - - -typedef btAlignedObjectArray IndexedMeshArray; - -///TriangleIndexVertexArray allows to use multiple meshes, by indexing into existing triangle/index arrays. -///Additional meshes can be added using addIndexedMesh -///No duplcate is made of the vertex/index data, it only indexes into external vertex/index arrays. -///So keep those arrays around during the lifetime of this btTriangleIndexVertexArray. -ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshInterface -{ - IndexedMeshArray m_indexedMeshes; - int m_pad[3]; - - -public: - - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btTriangleIndexVertexArray() - { - } - - virtual ~btTriangleIndexVertexArray(); - - //just to be backwards compatible - btTriangleIndexVertexArray(int numTriangleIndices,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride); - - void addIndexedMesh(const btIndexedMesh& mesh) - { - m_indexedMeshes.push_back(mesh); - } - - - virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0); - - virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const; - - /// unLockVertexBase finishes the access to a subpart of the triangle mesh - /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished - virtual void unLockVertexBase(int subpart) {(void)subpart;} - - virtual void unLockReadOnlyVertexBase(int subpart) const {(void)subpart;} - - /// getNumSubParts returns the number of seperate subparts - /// each subpart has a continuous array of vertices and indices - virtual int getNumSubParts() const { - return (int)m_indexedMeshes.size(); - } - - IndexedMeshArray& getIndexedMeshArray() - { - return m_indexedMeshes; - } - - const IndexedMeshArray& getIndexedMeshArray() const - { - return m_indexedMeshes; - } - - virtual void preallocateVertices(int numverts){(void) numverts;} - virtual void preallocateIndices(int numindices){(void) numindices;} - -} -; - -#endif //BT_TRIANGLE_INDEX_VERTEX_ARRAY_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp deleted file mode 100644 index 98c54ef45f8..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btTriangleMesh.h" -#include - - -btTriangleMesh::btTriangleMesh () -{ - -} - -void btTriangleMesh::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) -{ - (void)subpart; - numverts = m_vertices.size(); - *vertexbase = (unsigned char*)&m_vertices[0]; - type = PHY_FLOAT; - stride = sizeof(btVector3); - - numfaces = m_indices.size()/3; - *indexbase = (unsigned char*) &m_indices[0]; - indicestype = PHY_INTEGER; - indexstride = 3*sizeof(int); - -} - -void btTriangleMesh::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const -{ - (void)subpart; - numverts = m_vertices.size(); - *vertexbase = (unsigned char*)&m_vertices[0]; - type = PHY_FLOAT; - stride = sizeof(btVector3); - - numfaces = m_indices.size()/3; - *indexbase = (unsigned char*) &m_indices[0]; - indicestype = PHY_INTEGER; - indexstride = 3*sizeof(int); - -} - - - -int btTriangleMesh::getNumSubParts() const -{ - return 1; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h deleted file mode 100644 index 83e5a56d16a..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef TRIANGLE_MESH_H -#define TRIANGLE_MESH_H - -#include "btStridingMeshInterface.h" -#include "LinearMath/btVector3.h" -#include "LinearMath/btAlignedObjectArray.h" - -///TriangleMesh provides storage for a concave triangle mesh. It can be used as data for the btTriangleMeshShape. -class btTriangleMesh : public btStridingMeshInterface -{ - btAlignedObjectArray m_vertices; - btAlignedObjectArray m_indices; - - public: - btTriangleMesh (); - - void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2) - { - int curIndex = m_indices.size(); - m_vertices.push_back(vertex0); - m_vertices.push_back(vertex1); - m_vertices.push_back(vertex2); - - m_indices.push_back(curIndex++); - m_indices.push_back(curIndex++); - m_indices.push_back(curIndex++); - } - - int getNumTriangles() const - { - return m_indices.size() / 3; - } - - - -//StridingMeshInterface interface implementation - - virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0); - - virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const; - - /// unLockVertexBase finishes the access to a subpart of the triangle mesh - /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished - virtual void unLockVertexBase(int subpart) {(void) subpart;} - - virtual void unLockReadOnlyVertexBase(int subpart) const { (void) subpart;} - - /// getNumSubParts returns the number of seperate subparts - /// each subpart has a continuous array of vertices and indices - virtual int getNumSubParts() const; - - virtual void preallocateVertices(int numverts){(void) numverts;} - virtual void preallocateIndices(int numindices){(void) numindices;} - - -}; - -#endif //TRIANGLE_MESH_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp deleted file mode 100644 index 0d390c88b68..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btTriangleMeshShape.h" -#include "LinearMath/btVector3.h" -#include "LinearMath/btQuaternion.h" -#include "btStridingMeshInterface.h" -#include "LinearMath/btAabbUtil2.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" - - -btTriangleMeshShape::btTriangleMeshShape(btStridingMeshInterface* meshInterface) -: m_meshInterface(meshInterface) -{ - recalcLocalAabb(); -} - - -btTriangleMeshShape::~btTriangleMeshShape() -{ - -} - - - - -void btTriangleMeshShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const -{ - - btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); - btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); - - btMatrix3x3 abs_b = trans.getBasis().absolute(); - - btPoint3 center = trans(localCenter); - - btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), - abs_b[1].dot(localHalfExtents), - abs_b[2].dot(localHalfExtents)); - extent += btVector3(getMargin(),getMargin(),getMargin()); - - aabbMin = center - extent; - aabbMax = center + extent; - - -} - -void btTriangleMeshShape::recalcLocalAabb() -{ - for (int i=0;i<3;i++) - { - btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); - vec[i] = btScalar(1.); - btVector3 tmp = localGetSupportingVertex(vec); - m_localAabbMax[i] = tmp[i]+m_collisionMargin; - vec[i] = btScalar(-1.); - tmp = localGetSupportingVertex(vec); - m_localAabbMin[i] = tmp[i]-m_collisionMargin; - } -} - - - -class SupportVertexCallback : public btTriangleCallback -{ - - btVector3 m_supportVertexLocal; -public: - - btTransform m_worldTrans; - btScalar m_maxDot; - btVector3 m_supportVecLocal; - - SupportVertexCallback(const btVector3& supportVecWorld,const btTransform& trans) - : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), m_worldTrans(trans) ,m_maxDot(btScalar(-1e30)) - - { - m_supportVecLocal = supportVecWorld * m_worldTrans.getBasis(); - } - - virtual void processTriangle( btVector3* triangle,int partId, int triangleIndex) - { - (void)partId; - (void)triangleIndex; - for (int i=0;i<3;i++) - { - btScalar dot = m_supportVecLocal.dot(triangle[i]); - if (dot > m_maxDot) - { - m_maxDot = dot; - m_supportVertexLocal = triangle[i]; - } - } - } - - btVector3 GetSupportVertexWorldSpace() - { - return m_worldTrans(m_supportVertexLocal); - } - - btVector3 GetSupportVertexLocal() - { - return m_supportVertexLocal; - } - -}; - - -void btTriangleMeshShape::setLocalScaling(const btVector3& scaling) -{ - m_meshInterface->setScaling(scaling); - recalcLocalAabb(); -} - -const btVector3& btTriangleMeshShape::getLocalScaling() const -{ - return m_meshInterface->getScaling(); -} - - - - - - -//#define DEBUG_TRIANGLE_MESH - - - -void btTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const -{ - struct FilteredCallback : public btInternalTriangleIndexCallback - { - btTriangleCallback* m_callback; - btVector3 m_aabbMin; - btVector3 m_aabbMax; - - FilteredCallback(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) - :m_callback(callback), - m_aabbMin(aabbMin), - m_aabbMax(aabbMax) - { - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - if (TestTriangleAgainstAabb2(&triangle[0],m_aabbMin,m_aabbMax)) - { - //check aabb in triangle-space, before doing this - m_callback->processTriangle(triangle,partId,triangleIndex); - } - - } - - }; - - FilteredCallback filterCallback(callback,aabbMin,aabbMax); - - m_meshInterface->InternalProcessAllTriangles(&filterCallback,aabbMin,aabbMax); -} - - - - - -void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - (void)mass; - //moving concave objects not supported - btAssert(0); - inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); -} - - -btVector3 btTriangleMeshShape::localGetSupportingVertex(const btVector3& vec) const -{ - btVector3 supportVertex; - - btTransform ident; - ident.setIdentity(); - - SupportVertexCallback supportCallback(vec,ident); - - btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - - processAllTriangles(&supportCallback,-aabbMax,aabbMax); - - supportVertex = supportCallback.GetSupportVertexLocal(); - - return supportVertex; -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h deleted file mode 100644 index 6657fc09147..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef TRIANGLE_MESH_SHAPE_H -#define TRIANGLE_MESH_SHAPE_H - -#include "btConcaveShape.h" -#include "btStridingMeshInterface.h" - - -///Concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. -class btTriangleMeshShape : public btConcaveShape -{ -protected: - btVector3 m_localAabbMin; - btVector3 m_localAabbMax; - btStridingMeshInterface* m_meshInterface; - - ///btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. - ///Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead! - btTriangleMeshShape(btStridingMeshInterface* meshInterface); - -public: - - virtual ~btTriangleMeshShape(); - - virtual btVector3 localGetSupportingVertex(const btVector3& vec) const; - - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const - { - assert(0); - return localGetSupportingVertex(vec); - } - - void recalcLocalAabb(); - - virtual int getShapeType() const - { - return TRIANGLE_MESH_SHAPE_PROXYTYPE; - } - - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - virtual void setLocalScaling(const btVector3& scaling); - virtual const btVector3& getLocalScaling() const; - - btStridingMeshInterface* getMeshInterface() - { - return m_meshInterface; - } - - const btStridingMeshInterface* getMeshInterface() const - { - return m_meshInterface; - } - - - //debugging - virtual const char* getName()const {return "TRIANGLEMESH";} - - -}; - -#endif //TRIANGLE_MESH_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h deleted file mode 100644 index 064c64fa6ab..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h +++ /dev/null @@ -1,179 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef OBB_TRIANGLE_MINKOWSKI_H -#define OBB_TRIANGLE_MINKOWSKI_H - -#include "btConvexShape.h" -#include "btBoxShape.h" - -class btTriangleShape : public btPolyhedralConvexShape -{ - - -public: - - btVector3 m_vertices1[3]; - - - virtual int getNumVertices() const - { - return 3; - } - - const btVector3& getVertexPtr(int index) const - { - return m_vertices1[index]; - } - virtual void getVertex(int index,btVector3& vert) const - { - vert = m_vertices1[index]; - } - virtual int getShapeType() const - { - return TRIANGLE_SHAPE_PROXYTYPE; - } - - virtual int getNumEdges() const - { - return 3; - } - - virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const - { - getVertex(i,pa); - getVertex((i+1)%3,pb); - } - - - virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax)const - { -// btAssert(0); - getAabbSlow(t,aabbMin,aabbMax); - } - - btVector3 localGetSupportingVertexWithoutMargin(const btVector3& dir)const - { - btVector3 dots(dir.dot(m_vertices1[0]), dir.dot(m_vertices1[1]), dir.dot(m_vertices1[2])); - return m_vertices1[dots.maxAxis()]; - - } - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const - { - for (int i=0;i= -tolerance && dist <= tolerance) - { - //inside check on edge-planes - int i; - for (i=0;i<3;i++) - { - btPoint3 pa,pb; - getEdge(i,pa,pb); - btVector3 edge = pb-pa; - btVector3 edgeNormal = edge.cross(normal); - edgeNormal.normalize(); - btScalar dist = pt.dot( edgeNormal); - btScalar edgeConst = pa.dot(edgeNormal); - dist -= edgeConst; - if (dist < -tolerance) - return false; - } - - return true; - } - - return false; - } - //debugging - virtual const char* getName()const - { - return "Triangle"; - } - - virtual int getNumPreferredPenetrationDirections() const - { - return 2; - } - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const - { - calcNormal(penetrationVector); - if (index) - penetrationVector *= btScalar(-1.); - } - - -}; - -#endif //OBB_TRIANGLE_MINKOWSKI_H - diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp deleted file mode 100644 index ef340286cb0..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btUniformScalingShape.h" - -btUniformScalingShape::btUniformScalingShape( btConvexShape* convexChildShape,btScalar uniformScalingFactor): -m_childConvexShape(convexChildShape), -m_uniformScalingFactor(uniformScalingFactor) -{ -} - -btUniformScalingShape::~btUniformScalingShape() -{ -} - - -btVector3 btUniformScalingShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const -{ - btVector3 tmpVertex; - tmpVertex = m_childConvexShape->localGetSupportingVertexWithoutMargin(vec); - return tmpVertex*m_uniformScalingFactor; -} - -void btUniformScalingShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const -{ - m_childConvexShape->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors,supportVerticesOut,numVectors); - int i; - for (i=0;ilocalGetSupportingVertex(vec); - return tmpVertex*m_uniformScalingFactor; -} - - -void btUniformScalingShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const -{ - - ///this linear upscaling is not realistic, but we don't deal with large mass ratios... - btVector3 tmpInertia; - m_childConvexShape->calculateLocalInertia(mass,tmpInertia); - inertia = tmpInertia * m_uniformScalingFactor; -} - - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version -void btUniformScalingShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const -{ - m_childConvexShape->getAabb(t,aabbMin,aabbMax); - btVector3 aabbCenter = (aabbMax+aabbMin)*btScalar(0.5); - btVector3 scaledAabbHalfExtends = (aabbMax-aabbMin)*btScalar(0.5)*m_uniformScalingFactor; - - aabbMin = aabbCenter - scaledAabbHalfExtends; - aabbMax = aabbCenter + scaledAabbHalfExtends; - -} - -void btUniformScalingShape::getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const -{ - m_childConvexShape->getAabbSlow(t,aabbMin,aabbMax); - btVector3 aabbCenter = (aabbMax+aabbMin)*btScalar(0.5); - btVector3 scaledAabbHalfExtends = (aabbMax-aabbMin)*btScalar(0.5)*m_uniformScalingFactor; - - aabbMin = aabbCenter - scaledAabbHalfExtends; - aabbMax = aabbCenter + scaledAabbHalfExtends; -} - -void btUniformScalingShape::setLocalScaling(const btVector3& scaling) -{ - m_childConvexShape->setLocalScaling(scaling); -} - -const btVector3& btUniformScalingShape::getLocalScaling() const -{ - return m_childConvexShape->getLocalScaling(); -} - -void btUniformScalingShape::setMargin(btScalar margin) -{ - m_childConvexShape->setMargin(margin); -} -btScalar btUniformScalingShape::getMargin() const -{ - return m_childConvexShape->getMargin() * m_uniformScalingFactor; -} - -int btUniformScalingShape::getNumPreferredPenetrationDirections() const -{ - return m_childConvexShape->getNumPreferredPenetrationDirections(); -} - -void btUniformScalingShape::getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const -{ - m_childConvexShape->getPreferredPenetrationDirection(index,penetrationVector); -} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h deleted file mode 100644 index 3a0ecf021d3..00000000000 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btUniformScalingShape.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_UNIFORM_SCALING_SHAPE_H -#define BT_UNIFORM_SCALING_SHAPE_H - -#include "btConvexShape.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types - -class btUniformScalingShape : public btConvexShape -{ - btConvexShape* m_childConvexShape; - - btScalar m_uniformScalingFactor; - - public: - - btUniformScalingShape( btConvexShape* convexChildShape, btScalar uniformScalingFactor); - - virtual ~btUniformScalingShape(); - - virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; - - virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; - - virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; - - virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; - - btScalar getUniformScalingFactor() const - { - return m_uniformScalingFactor; - } - - btConvexShape* getChildShape() - { - return m_childConvexShape; - } - - const btConvexShape* getChildShape() const - { - return m_childConvexShape; - } - - virtual const char* getName()const - { - return "UniformScalingShape"; - } - - virtual int getShapeType() const { return UNIFORM_SCALING_SHAPE_PROXYTYPE; } - - - /////////////////////////// - - - ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version - void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; - - virtual void setLocalScaling(const btVector3& scaling) ; - virtual const btVector3& getLocalScaling() const ; - - virtual void setMargin(btScalar margin); - virtual btScalar getMargin() const; - - virtual int getNumPreferredPenetrationDirections() const; - - virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const; - - -}; - -#endif //BT_UNIFORM_SCALING_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/Doxyfile b/extern/bullet2/src/BulletCollision/Doxyfile deleted file mode 100644 index 4ecb6acb62f..00000000000 --- a/extern/bullet2/src/BulletCollision/Doxyfile +++ /dev/null @@ -1,746 +0,0 @@ -# Doxyfile 1.2.4 - -# This file describes the settings to be used by doxygen for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. -PROJECT_NAME = "Bullet Continuous Collision Detection Library" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, -# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, -# Polish, Portuguese and Slovene. - -OUTPUT_LANGUAGE = English - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these class will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. It is allowed to use relative paths in the argument list. - -STRIP_FROM_PATH = - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a class diagram (in Html and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. - -CLASS_DIAGRAMS = YES - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower case letters. If set to YES upper case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are adviced to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explict @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# reimplements. - -INHERIT_DOCS = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# The ENABLE_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = . - - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -FILE_PATTERNS = *.h *.cpp *.c - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse. - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript and frames is required (for instance Netscape 4.0+ -# or Internet explorer 4.0+). - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimised for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using a WORD or other. -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assigments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. Warning: This feature -# is still experimental and very incomplete. - -GENERATE_XML = NO - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = ../../generic/extern - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES tag can be used to specify one or more tagfiles. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to -# YES then doxygen will generate a graph for each documented file showing -# the direct and indirect include dependencies of the file with other -# documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to -# YES then doxygen will generate a graph for each documented header file showing -# the documented files that directly or indirectly include this file - -INCLUDED_BY_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO - -# The CGI_NAME tag should be the name of the CGI script that -# starts the search engine (doxysearch) with the correct parameters. -# A script with this name will be generated by doxygen. - -CGI_NAME = search.cgi - -# The CGI_URL tag should be the absolute URL to the directory where the -# cgi binaries are located. See the documentation of your http daemon for -# details. - -CGI_URL = - -# The DOC_URL tag should be the absolute URL to the directory where the -# documentation is located. If left blank the absolute path to the -# documentation, with file:// prepended to it, will be used. - -DOC_URL = - -# The DOC_ABSPATH tag should be the absolute path to the directory where the -# documentation is located. If left blank the directory on the local machine -# will be used. - -DOC_ABSPATH = - -# The BIN_ABSPATH tag must point to the directory where the doxysearch binary -# is installed. - -BIN_ABSPATH = c:\program files\doxygen\bin - -# The EXT_DOC_PATHS tag can be used to specify one or more paths to -# documentation generated for other projects. This allows doxysearch to search -# the documentation for these projects as well. - -EXT_DOC_PATHS = diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp deleted file mode 100644 index c6a2b396d78..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btContinuousConvexCollision.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" -#include "LinearMath/btTransformUtil.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" - -#include "btGjkPairDetector.h" -#include "btPointCollector.h" - - - -btContinuousConvexCollision::btContinuousConvexCollision ( const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) -:m_simplexSolver(simplexSolver), -m_penetrationDepthSolver(penetrationDepthSolver), -m_convexA(convexA),m_convexB(convexB) -{ -} - -/// This maximum should not be necessary. It allows for untested/degenerate cases in production code. -/// You don't want your game ever to lock-up. -#define MAX_ITERATIONS 1000 - -bool btContinuousConvexCollision::calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result) -{ - - m_simplexSolver->reset(); - - /// compute linear and angular velocity for this interval, to interpolate - btVector3 linVelA,angVelA,linVelB,angVelB; - btTransformUtil::calculateVelocity(fromA,toA,btScalar(1.),linVelA,angVelA); - btTransformUtil::calculateVelocity(fromB,toB,btScalar(1.),linVelB,angVelB); - - btScalar boundingRadiusA = m_convexA->getAngularMotionDisc(); - btScalar boundingRadiusB = m_convexB->getAngularMotionDisc(); - - btScalar maxAngularProjectedVelocity = angVelA.length() * boundingRadiusA + angVelB.length() * boundingRadiusB; - - btScalar radius = btScalar(0.001); - - btScalar lambda = btScalar(0.); - btVector3 v(1,0,0); - - int maxIter = MAX_ITERATIONS; - - btVector3 n; - n.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - bool hasResult = false; - btVector3 c; - - btScalar lastLambda = lambda; - //btScalar epsilon = btScalar(0.001); - - int numIter = 0; - //first solution, using GJK - - - btTransform identityTrans; - identityTrans.setIdentity(); - - btSphereShape raySphere(btScalar(0.0)); - raySphere.setMargin(btScalar(0.)); - - -// result.drawCoordSystem(sphereTr); - - btPointCollector pointCollector1; - - { - - btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,m_penetrationDepthSolver); - btGjkPairDetector::ClosestPointInput input; - - //we don't use margins during CCD - // gjk.setIgnoreMargin(true); - - input.m_transformA = fromA; - input.m_transformB = fromB; - gjk.getClosestPoints(input,pointCollector1,0); - - hasResult = pointCollector1.m_hasResult; - c = pointCollector1.m_pointInWorld; - } - - if (hasResult) - { - btScalar dist; - dist = pointCollector1.m_distance; - n = pointCollector1.m_normalOnBInWorld; - - - - //not close enough - while (dist > radius) - { - numIter++; - if (numIter > maxIter) - { - return false; //todo: report a failure - } - btScalar dLambda = btScalar(0.); - - btScalar projectedLinearVelocity = (linVelB-linVelA).dot(n); - - //calculate safe moving fraction from distance / (linear+rotational velocity) - - //btScalar clippedDist = GEN_min(angularConservativeRadius,dist); - //btScalar clippedDist = dist; - - - dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity); - - lambda = lambda + dLambda; - - if (lambda > btScalar(1.)) - return false; - - if (lambda < btScalar(0.)) - return false; - - - //todo: next check with relative epsilon - if (lambda <= lastLambda) - { - return false; - //n.setValue(0,0,0); - break; - } - lastLambda = lambda; - - - - //interpolate to next lambda - btTransform interpolatedTransA,interpolatedTransB,relativeTrans; - - btTransformUtil::integrateTransform(fromA,linVelA,angVelA,lambda,interpolatedTransA); - btTransformUtil::integrateTransform(fromB,linVelB,angVelB,lambda,interpolatedTransB); - relativeTrans = interpolatedTransB.inverseTimes(interpolatedTransA); - - result.DebugDraw( lambda ); - - btPointCollector pointCollector; - btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,m_penetrationDepthSolver); - btGjkPairDetector::ClosestPointInput input; - input.m_transformA = interpolatedTransA; - input.m_transformB = interpolatedTransB; - gjk.getClosestPoints(input,pointCollector,0); - if (pointCollector.m_hasResult) - { - if (pointCollector.m_distance < btScalar(0.)) - { - //degenerate ?! - result.m_fraction = lastLambda; - n = pointCollector.m_normalOnBInWorld; - result.m_normal=n;//.setValue(1,1,1);// = n; - return true; - } - c = pointCollector.m_pointInWorld; - n = pointCollector.m_normalOnBInWorld; - dist = pointCollector.m_distance; - } else - { - //?? - return false; - } - - } - - result.m_fraction = lambda; - result.m_normal = n; - return true; - } - - return false; - -/* -//todo: - //if movement away from normal, discard result - btVector3 move = transBLocalTo.getOrigin() - transBLocalFrom.getOrigin(); - if (result.m_fraction < btScalar(1.)) - { - if (move.dot(result.m_normal) <= btScalar(0.)) - { - } - } -*/ - -} - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h deleted file mode 100644 index 28c2b4d6156..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef CONTINUOUS_COLLISION_CONVEX_CAST_H -#define CONTINUOUS_COLLISION_CONVEX_CAST_H - -#include "btConvexCast.h" -#include "btSimplexSolverInterface.h" -class btConvexPenetrationDepthSolver; -class btConvexShape; - -/// btContinuousConvexCollision implements angular and linear time of impact for convex objects. -/// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis). -/// Algorithm operates in worldspace, in order to keep inbetween motion globally consistent. -/// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops -class btContinuousConvexCollision : public btConvexCast -{ - btSimplexSolverInterface* m_simplexSolver; - btConvexPenetrationDepthSolver* m_penetrationDepthSolver; - const btConvexShape* m_convexA; - const btConvexShape* m_convexB; - - -public: - - btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); - - virtual bool calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result); - - -}; - -#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp deleted file mode 100644 index d2a1310b232..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btConvexCast.h" - -btConvexCast::~btConvexCast() -{ -} diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h deleted file mode 100644 index cc80f0aa8da..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef CONVEX_CAST_H -#define CONVEX_CAST_H - -#include "LinearMath/btTransform.h" -#include "LinearMath/btVector3.h" -#include "LinearMath/btScalar.h" -class btMinkowskiSumShape; -#include "LinearMath/btIDebugDraw.h" - -/// btConvexCast is an interface for Casting -class btConvexCast -{ -public: - - - virtual ~btConvexCast(); - - ///RayResult stores the closest result - /// alternatively, add a callback method to decide about closest/all results - struct CastResult - { - //virtual bool addRayResult(const btVector3& normal,btScalar fraction) = 0; - - virtual void DebugDraw(btScalar fraction) {(void)fraction;} - virtual void drawCoordSystem(const btTransform& trans) {(void)trans;} - - CastResult() - :m_fraction(btScalar(1e30)), - m_debugDrawer(0) - { - } - - - virtual ~CastResult() {}; - - btVector3 m_normal; - btScalar m_fraction; - btTransform m_hitTransformA; - btTransform m_hitTransformB; - - btIDebugDraw* m_debugDrawer; - - }; - - - /// cast a convex against another convex object - virtual bool calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result) = 0; -}; - -#endif //CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h deleted file mode 100644 index 99690921317..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef CONVEX_PENETRATION_DEPTH_H -#define CONVEX_PENETRATION_DEPTH_H - -class btStackAlloc; -class btVector3; -#include "btSimplexSolverInterface.h" -class btConvexShape; -#include "LinearMath/btPoint3.h" -class btTransform; - -///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. -class btConvexPenetrationDepthSolver -{ -public: - - virtual ~btConvexPenetrationDepthSolver() {}; - virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - const btConvexShape* convexA,const btConvexShape* convexB, - const btTransform& transA,const btTransform& transB, - btVector3& v, btPoint3& pa, btPoint3& pb, - class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc - ) = 0; - - -}; -#endif //CONVEX_PENETRATION_DEPTH_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h deleted file mode 100644 index f11c8bd1290..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h +++ /dev/null @@ -1,88 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H -#define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H -#include "LinearMath/btTransform.h" -#include "LinearMath/btVector3.h" -class btStackAlloc; - -/// This interface is made to be used by an iterative approach to do TimeOfImpact calculations -/// This interface allows to query for closest points and penetration depth between two (convex) objects -/// the closest point is on the second object (B), and the normal points from the surface on B towards A. -/// distance is between closest points on B and closest point on A. So you can calculate closest point on A -/// by taking closestPointInA = closestPointInB + m_distance * m_normalOnSurfaceB -struct btDiscreteCollisionDetectorInterface -{ - - struct Result - { - - virtual ~Result(){} - - ///setShapeIdentifiers provides experimental support for per-triangle material / custom material combiner - virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1)=0; - virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)=0; - }; - - struct ClosestPointInput - { - ClosestPointInput() - :m_maximumDistanceSquared(btScalar(1e30)), - m_stackAlloc(0) - { - } - - btTransform m_transformA; - btTransform m_transformB; - btScalar m_maximumDistanceSquared; - btStackAlloc* m_stackAlloc; - }; - - virtual ~btDiscreteCollisionDetectorInterface() {}; - - // - // give either closest points (distance > 0) or penetration (distance) - // the normal always points from B towards A - // - virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) = 0; - -}; - -struct btStorageResult : public btDiscreteCollisionDetectorInterface::Result -{ - btVector3 m_normalOnSurfaceB; - btVector3 m_closestPointInB; - btScalar m_distance; //negative means penetration ! - - btStorageResult() : m_distance(btScalar(1e30)) - { - - } - virtual ~btStorageResult() {}; - - virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) - { - if (depth < m_distance) - { - m_normalOnSurfaceB = normalOnBInWorld; - m_closestPointInB = pointInWorld; - m_distance = depth; - } - } -}; - -#endif //DISCRETE_COLLISION_DETECTOR_INTERFACE1_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp deleted file mode 100644 index da2a02b9839..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#include "btGjkConvexCast.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "btGjkPairDetector.h" -#include "btPointCollector.h" - - -btGjkConvexCast::btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) -:m_simplexSolver(simplexSolver), -m_convexA(convexA), -m_convexB(convexB) -{ -} - -bool btGjkConvexCast::calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result) -{ - - - btMinkowskiSumShape combi(m_convexA,m_convexB); - btMinkowskiSumShape* convex = &combi; - - btTransform rayFromLocalA; - btTransform rayToLocalA; - - rayFromLocalA = fromA.inverse()* fromB; - rayToLocalA = toA.inverse()* toB; - - - btTransform trA,trB; - trA = btTransform(fromA); - trB = btTransform(fromB); - trA.setOrigin(btPoint3(0,0,0)); - trB.setOrigin(btPoint3(0,0,0)); - - convex->setTransformA(trA); - convex->setTransformB(trB); - - - - - btScalar radius = btScalar(0.01); - - btScalar lambda = btScalar(0.); - btVector3 s = rayFromLocalA.getOrigin(); - btVector3 r = rayToLocalA.getOrigin()-rayFromLocalA.getOrigin(); - btVector3 x = s; - btVector3 n; - n.setValue(0,0,0); - bool hasResult = false; - btVector3 c; - - btScalar lastLambda = lambda; - - //first solution, using GJK - - //no penetration support for now, perhaps pass a pointer when we really want it - btConvexPenetrationDepthSolver* penSolverPtr = 0; - - btTransform identityTrans; - identityTrans.setIdentity(); - - btSphereShape raySphere(btScalar(0.0)); - raySphere.setMargin(btScalar(0.)); - - btTransform sphereTr; - sphereTr.setIdentity(); - sphereTr.setOrigin( rayFromLocalA.getOrigin()); - - result.drawCoordSystem(sphereTr); - { - btPointCollector pointCollector1; - btGjkPairDetector gjk(&raySphere,convex,m_simplexSolver,penSolverPtr); - - btGjkPairDetector::ClosestPointInput input; - input.m_transformA = sphereTr; - input.m_transformB = identityTrans; - gjk.getClosestPoints(input,pointCollector1,0); - - hasResult = pointCollector1.m_hasResult; - c = pointCollector1.m_pointInWorld; - n = pointCollector1.m_normalOnBInWorld; - } - - - - if (hasResult) - { - btScalar dist; - dist = (c-x).length(); - if (dist < radius) - { - //penetration - lastLambda = btScalar(1.); - } - - //not close enough - while (dist > radius) - { - - n = x - c; - btScalar nDotr = n.dot(r); - - if (nDotr >= -(SIMD_EPSILON*SIMD_EPSILON)) - return false; - - lambda = lambda - n.dot(n) / nDotr; - if (lambda <= lastLambda) - break; - - lastLambda = lambda; - - x = s + lambda * r; - - sphereTr.setOrigin( x ); - result.drawCoordSystem(sphereTr); - btPointCollector pointCollector; - btGjkPairDetector gjk(&raySphere,convex,m_simplexSolver,penSolverPtr); - btGjkPairDetector::ClosestPointInput input; - input.m_transformA = sphereTr; - input.m_transformB = identityTrans; - gjk.getClosestPoints(input,pointCollector,0); - if (pointCollector.m_hasResult) - { - if (pointCollector.m_distance < btScalar(0.)) - { - //degeneracy, report a hit - result.m_fraction = lastLambda; - result.m_normal = n; - return true; - } - c = pointCollector.m_pointInWorld; - dist = (c-x).length(); - } else - { - //?? - return false; - } - - } - - if (lastLambda < btScalar(1.)) - { - - result.m_fraction = lastLambda; - result.m_normal = n; - return true; - } - } - - return false; -} - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h deleted file mode 100644 index a977c9e83f7..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef GJK_CONVEX_CAST_H -#define GJK_CONVEX_CAST_H - -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" - -#include "LinearMath/btVector3.h" -#include "btConvexCast.h" -class btConvexShape; -class btMinkowskiSumShape; -#include "btSimplexSolverInterface.h" - -///GjkConvexCast performs a raycast on a convex object using support mapping. -class btGjkConvexCast : public btConvexCast -{ - btSimplexSolverInterface* m_simplexSolver; - const btConvexShape* m_convexA; - const btConvexShape* m_convexB; - -public: - - btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); - - /// cast a convex against another convex object - virtual bool calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result); - -}; - -#endif //GJK_CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp deleted file mode 100644 index f57868be044..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp +++ /dev/null @@ -1,628 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software in a -product, an acknowledgment in the product documentation would be appreciated -but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* -GJK-EPA collision solver by Nathanael Presson -Nov.2006 -*/ - -#include "btGjkEpa.h" -#include //for memset -#include - -#if defined(DEBUG) || defined (_DEBUG) -#include //for debug printf -#ifdef __SPU__ -#include -#define printf spu_printf -#endif //__SPU__ -#endif - -namespace gjkepa_impl -{ - -// -// Port. typedefs -// - -typedef btScalar F; -typedef bool Z; -typedef int I; -typedef unsigned int U; -typedef unsigned char U1; -typedef unsigned short U2; - -typedef btVector3 Vector3; -typedef btMatrix3x3 Rotation; - -// -// Config -// - -#if 0 -#define BTLOCALSUPPORT localGetSupportingVertexWithoutMargin -#else -#define BTLOCALSUPPORT localGetSupportingVertex -#endif - -// -// Const -// - - -#define cstInf SIMD_INFINITY -#define cstPi SIMD_PI -#define cst2Pi SIMD_2_PI -#define GJK_maxiterations (128) -#define GJK_hashsize (1<<6) -#define GJK_hashmask (GJK_hashsize-1) -#define GJK_insimplex_eps F(0.0001) -#define GJK_sqinsimplex_eps (GJK_insimplex_eps*GJK_insimplex_eps) -#define EPA_maxiterations 256 -#define EPA_inface_eps F(0.01) -#define EPA_accuracy F(0.001) - -// -// Utils -// - -static inline F Abs(F v) { return(v<0?-v:v); } -static inline F Sign(F v) { return(F(v<0?-1:1)); } -template static inline void Swap(T& a,T& b) { T -t(a);a=b;b=t; } -template static inline T Min(const T& a,const T& b) { -return(a static inline T Max(const T& a,const T& b) { -return(a>b?a:b); } -static inline void ClearMemory(void* p,U sz) { memset(p,0,(size_t)sz); -} -#if 0 -template static inline void Raise(const T& object) { -throw(object); } -#else -template static inline void Raise(const T&) {} -#endif - - - -// -// GJK -// -struct GJK - { - struct Mkv - { - Vector3 w; /* Minkowski vertice */ - Vector3 r; /* Ray */ - }; - struct He - { - Vector3 v; - He* n; - }; - btStackAlloc* sa; - btBlock* sablock; - He* table[GJK_hashsize]; - Rotation wrotations[2]; - Vector3 positions[2]; - const btConvexShape* shapes[2]; - Mkv simplex[5]; - Vector3 ray; - U order; - U iterations; - F margin; - Z failed; - // - GJK(btStackAlloc* psa, - const Rotation& wrot0,const Vector3& pos0,const btConvexShape* shape0, - const Rotation& wrot1,const Vector3& pos1,const btConvexShape* shape1, - F pmargin=0) - { - wrotations[0]=wrot0;positions[0]=pos0;shapes[0]=shape0; - wrotations[1]=wrot1;positions[1]=pos1;shapes[1]=shape1; - sa =psa; - sablock =sa->beginBlock(); - margin =pmargin; - failed =false; - } - // - ~GJK() - { - sa->endBlock(sablock); - } - // vdh : very dumm hash - static inline U Hash(const Vector3& v) - { - //this doesn't compile under GCC 3.3.5, so add the ()... - //const U h(U(v[0]*15461)^U(v[1]*83003)^U(v[2]*15473)); - //return(((*((const U*)&h))*169639)&GJK_hashmask); - const U h((U)(v[0]*15461)^(U)(v[1]*83003)^(U)(v[2]*15473)); - return(((*((const U*)&h))*169639)&GJK_hashmask); - } - // - inline Vector3 LocalSupport(const Vector3& d,U i) const - { - return(wrotations[i]*shapes[i]->BTLOCALSUPPORT(d*wrotations[i])+positions[i]); - } - // - inline void Support(const Vector3& d,Mkv& v) const - { - v.r = d; - v.w = LocalSupport(d,0)-LocalSupport(-d,1)+d*margin; - } - #define SPX(_i_) simplex[_i_] - #define SPXW(_i_) simplex[_i_].w - // - inline Z FetchSupport() - { - const U h(Hash(ray)); - He* e = (He*)(table[h]); - while(e) { if(e->v==ray) { --order;return(false); } else e=e->n; } - e=(He*)sa->allocate(sizeof(He));e->v=ray;e->n=table[h];table[h]=e; - Support(ray,simplex[++order]); - return(ray.dot(SPXW(order))>0); - } - // - inline Z SolveSimplex2(const Vector3& ao,const Vector3& ab) - { - if(ab.dot(ao)>=0) - { - const Vector3 cabo(cross(ab,ao)); - if(cabo.length2()>GJK_sqinsimplex_eps) - { ray=cross(cabo,ab); } - else - { return(true); } - } - else - { order=0;SPX(0)=SPX(1);ray=ao; } - return(false); - } - // - inline Z SolveSimplex3(const Vector3& ao,const Vector3& ab,const Vector3& -ac) - { - return(SolveSimplex3a(ao,ab,ac,cross(ab,ac))); - } - // - inline Z SolveSimplex3a(const Vector3& ao,const Vector3& ab,const Vector3& -ac,const Vector3& cabc) - { - if((cross(cabc,ab)).dot(ao)<-GJK_insimplex_eps) - { order=1;SPX(0)=SPX(1);SPX(1)=SPX(2);return(SolveSimplex2(ao,ab)); } - else if((cross(cabc,ac)).dot(ao)>+GJK_insimplex_eps) - { order=1;SPX(1)=SPX(2);return(SolveSimplex2(ao,ac)); } - else - { - const F d(cabc.dot(ao)); - if(Abs(d)>GJK_insimplex_eps) - { - if(d>0) - { ray=cabc; } - else - { ray=-cabc;Swap(SPX(0),SPX(1)); } - return(false); - } else return(true); - } - } - // - inline Z SolveSimplex4(const Vector3& ao,const Vector3& ab,const Vector3& -ac,const Vector3& ad) - { - Vector3 crs; - if((crs=cross(ab,ac)).dot(ao)>GJK_insimplex_eps) - { -order=2;SPX(0)=SPX(1);SPX(1)=SPX(2);SPX(2)=SPX(3);return(SolveSimplex3a(ao,ab,ac,crs)); -} - else if((crs=cross(ac,ad)).dot(ao)>GJK_insimplex_eps) - { order=2;SPX(2)=SPX(3);return(SolveSimplex3a(ao,ac,ad,crs)); } - else if((crs=cross(ad,ab)).dot(ao)>GJK_insimplex_eps) - { -order=2;SPX(1)=SPX(0);SPX(0)=SPX(2);SPX(2)=SPX(3);return(SolveSimplex3a(ao,ad,ab,crs)); -} - else return(true); - } - // - inline Z SearchOrigin(const Vector3& initray=Vector3(1,0,0)) - { - iterations = 0; - order = (U)-1; - failed = false; - ray = initray.normalized(); - ClearMemory(table,sizeof(void*)*GJK_hashsize); - FetchSupport(); - ray = -SPXW(0); - for(;iterations0?rl:1; - if(FetchSupport()) - { - Z found(false); - switch(order) - { - case 1: found=SolveSimplex2(-SPXW(1),SPXW(0)-SPXW(1));break; - case 2: found=SolveSimplex3(-SPXW(2),SPXW(1)-SPXW(2),SPXW(0)-SPXW(2));break; - case 3: found=SolveSimplex4(-SPXW(3),SPXW(2)-SPXW(3),SPXW(1)-SPXW(3),SPXW(0)-SPXW(3));break; - } - if(found) return(true); - } else return(false); - } - failed=true; - return(false); - } - // - inline Z EncloseOrigin() - { - switch(order) - { - /* Point */ - case 0: break; - /* Line */ - case 1: - { - const Vector3 ab(SPXW(1)-SPXW(0)); - const Vector3 b[]={ cross(ab,Vector3(1,0,0)), - cross(ab,Vector3(0,1,0)), - cross(ab,Vector3(0,0,1))}; - const F m[]={b[0].length2(),b[1].length2(),b[2].length2()}; - const Rotation r(btQuaternion(ab.normalized(),cst2Pi/3)); - Vector3 w(b[m[0]>m[1]?m[0]>m[2]?0:2:m[1]>m[2]?1:2]); - Support(w.normalized(),simplex[4]);w=r*w; - Support(w.normalized(),simplex[2]);w=r*w; - Support(w.normalized(),simplex[3]);w=r*w; - order=4; - return(true); - } - break; - /* Triangle */ - case 2: - { - const -Vector3 n(cross((SPXW(1)-SPXW(0)),(SPXW(2)-SPXW(0))).normalized()); - Support( n,simplex[3]); - Support(-n,simplex[4]); - order=4; - return(true); - } - break; - /* Tetrahedron */ - case 3: return(true); - /* Hexahedron */ - case 4: return(true); - } - return(false); - } - #undef SPX - #undef SPXW - }; - -// -// EPA -// -struct EPA - { - // - struct Face - { - const GJK::Mkv* v[3]; - Face* f[3]; - U e[3]; - Vector3 n; - F d; - U mark; - Face* prev; - Face* next; - Face() {} - }; - // - GJK* gjk; - btStackAlloc* sa; - Face* root; - U nfaces; - U iterations; - Vector3 features[2][3]; - Vector3 nearest[2]; - Vector3 normal; - F depth; - Z failed; - // - EPA(GJK* pgjk) - { - gjk = pgjk; - sa = pgjk->sa; - } - // - ~EPA() - { - } - // - inline Vector3 GetCoordinates(const Face* face) const - { - const Vector3 o(face->n*-face->d); - const F a[]={ cross(face->v[0]->w-o,face->v[1]->w-o).length(), - cross(face->v[1]->w-o,face->v[2]->w-o).length(), - cross(face->v[2]->w-o,face->v[0]->w-o).length()}; - const F sm(a[0]+a[1]+a[2]); - return(Vector3(a[1],a[2],a[0])/(sm>0?sm:1)); - } - // - inline Face* FindBest() const - { - Face* bf = 0; - if(root) - { - Face* cf = root; - F bd(cstInf); - do { - if(cf->dd;bf=cf; } - } while(0!=(cf=cf->next)); - } - return(bf); - } - // - inline Z Set(Face* f,const GJK::Mkv* a,const GJK::Mkv* b,const GJK::Mkv* -c) const - { - const Vector3 nrm(cross(b->w-a->w,c->w-a->w)); - const F len(nrm.length()); - const Z valid( (cross(a->w,b->w).dot(nrm)>=-EPA_inface_eps)&& - (cross(b->w,c->w).dot(nrm)>=-EPA_inface_eps)&& - (cross(c->w,a->w).dot(nrm)>=-EPA_inface_eps)); - f->v[0] = a; - f->v[1] = b; - f->v[2] = c; - f->mark = 0; - f->n = nrm/(len>0?len:cstInf); - f->d = Max(0,-f->n.dot(a->w)); - return(valid); - } - // - inline Face* NewFace(const GJK::Mkv* a,const GJK::Mkv* b,const GJK::Mkv* c) - { - Face* pf = (Face*)sa->allocate(sizeof(Face)); - if(Set(pf,a,b,c)) - { - if(root) root->prev=pf; - pf->prev=0; - pf->next=root; - root =pf; - ++nfaces; - } - else - { - pf->prev=pf->next=0; - } - return(pf); - } - // - inline void Detach(Face* face) - { - if(face->prev||face->next) - { - --nfaces; - if(face==root) - { root=face->next;root->prev=0; } - else - { - if(face->next==0) - { face->prev->next=0; } - else - { face->prev->next=face->next;face->next->prev=face->prev; } - } - face->prev=face->next=0; - } - } - // - inline void Link(Face* f0,U e0,Face* f1,U e1) const - { - f0->f[e0]=f1;f1->e[e1]=e0; - f1->f[e1]=f0;f0->e[e0]=e1; - } - // - GJK::Mkv* Support(const Vector3& w) const - { - GJK::Mkv* v =(GJK::Mkv*)sa->allocate(sizeof(GJK::Mkv)); - gjk->Support(w,*v); - return(v); - } - // - U BuildHorizon(U markid,const GJK::Mkv* w,Face& f,U e,Face*& cf,Face*& -ff) - { - static const U mod3[]={0,1,2,0,1}; - U ne(0); - if(f.mark!=markid) - { - const U e1(mod3[e+1]); - if((f.n.dot(w->w)+f.d)>0) - { - Face* nf = NewFace(f.v[e1],f.v[e],w); - Link(nf,0,&f,e); - if(cf) Link(cf,1,nf,2); else ff=nf; - cf=nf;ne=1; - } - else - { - const U e2(mod3[e+2]); - Detach(&f); - f.mark = markid; - ne += BuildHorizon(markid,w,*f.f[e1],f.e[e1],cf,ff); - ne += BuildHorizon(markid,w,*f.f[e2],f.e[e2],cf,ff); - } - } - return(ne); - } - // - inline F EvaluatePD(F accuracy=EPA_accuracy) - { - btBlock* sablock = sa->beginBlock(); - Face* bestface = 0; - U markid(1); - depth = -cstInf; - normal = Vector3(0,0,0); - root = 0; - nfaces = 0; - iterations = 0; - failed = false; - /* Prepare hull */ - if(gjk->EncloseOrigin()) - { - const U* pfidx = 0; - U nfidx= 0; - const U* peidx = 0; - U neidx = 0; - GJK::Mkv* basemkv[5]; - Face* basefaces[6]; - switch(gjk->order) - { - /* Tetrahedron */ - case 3: { - static const U fidx[4][3]={{2,1,0},{3,0,1},{3,1,2},{3,2,0}}; - static const -U eidx[6][4]={{0,0,2,1},{0,1,1,1},{0,2,3,1},{1,0,3,2},{2,0,1,2},{3,0,2,2}}; - pfidx=(const U*)fidx;nfidx=4;peidx=(const U*)eidx;neidx=6; - } break; - /* Hexahedron */ - case 4: { - static const -U fidx[6][3]={{2,0,4},{4,1,2},{1,4,0},{0,3,1},{0,2,3},{1,3,2}}; - static const -U eidx[9][4]={{0,0,4,0},{0,1,2,1},{0,2,1,2},{1,1,5,2},{1,0,2,0},{2,2,3,2},{3,1,5,0},{3,0,4,2},{5,1,4,1}}; - pfidx=(const U*)fidx;nfidx=6;peidx=(const U*)eidx;neidx=9; - } break; - } - U i; - - for( i=0;i<=gjk->order;++i) { -basemkv[i]=(GJK::Mkv*)sa->allocate(sizeof(GJK::Mkv));*basemkv[i]=gjk->simplex[i]; -} - for( i=0;iendBlock(sablock); - return(depth); - } - /* Expand hull */ - for(;iterationsn); - const F d(bf->n.dot(w->w)+bf->d); - bestface = bf; - if(d<-accuracy) - { - Face* cf =0; - Face* ff =0; - U nf = 0; - Detach(bf); - bf->mark=++markid; - for(U i=0;i<3;++i) { -nf+=BuildHorizon(markid,w,*bf->f[i],bf->e[i],cf,ff); } - if(nf<=2) { break; } - Link(cf,1,ff,2); - } else break; - } else break; - } - /* Extract contact */ - if(bestface) - { - const Vector3 b(GetCoordinates(bestface)); - normal = bestface->n; - depth = Max(0,bestface->d); - for(U i=0;i<2;++i) - { - const F s(F(i?-1:1)); - for(U j=0;j<3;++j) - { - features[i][j]=gjk->LocalSupport(s*bestface->v[j]->r,i); - } - } - nearest[0] = features[0][0]*b.x()+features[0][1]*b.y()+features[0][2]*b.z(); - nearest[1] = features[1][0]*b.x()+features[1][1]*b.y()+features[1][2]*b.z(); - } else failed=true; - sa->endBlock(sablock); - return(depth); - } - }; -} - -// -// Api -// - -using namespace gjkepa_impl; - - - -// -bool btGjkEpaSolver::Collide(const btConvexShape *shape0,const btTransform &wtrs0, - const btConvexShape *shape1,const btTransform &wtrs1, - btScalar radialmargin, - btStackAlloc* stackAlloc, - sResults& results) -{ - - -/* Initialize */ -results.witnesses[0] = -results.witnesses[1] = -results.normal = Vector3(0,0,0); -results.depth = 0; -results.status = sResults::Separated; -results.epa_iterations = 0; -results.gjk_iterations = 0; -/* Use GJK to locate origin */ -GJK gjk(stackAlloc, - wtrs0.getBasis(),wtrs0.getOrigin(),shape0, - wtrs1.getBasis(),wtrs1.getOrigin(),shape1, - radialmargin+EPA_accuracy); -const Z collide(gjk.SearchOrigin()); -results.gjk_iterations = gjk.iterations+1; -if(collide) - { - /* Then EPA for penetration depth */ - EPA epa(&gjk); - const F pd(epa.EvaluatePD()); - results.epa_iterations = epa.iterations+1; - if(pd>0) - { - results.status = sResults::Penetrating; - results.normal = epa.normal; - results.depth = pd; - results.witnesses[0] = epa.nearest[0]; - results.witnesses[1] = epa.nearest[1]; - return(true); - } else { if(epa.failed) results.status=sResults::EPA_Failed; } - } else { if(gjk.failed) results.status=sResults::GJK_Failed; } -return(false); -} - - - - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h deleted file mode 100644 index 1338e2714a8..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* -GJK-EPA collision solver by Nathanael Presson -Nov.2006 -*/ - - -#ifndef _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ -#define _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ -#include "BulletCollision/CollisionShapes/btConvexShape.h" - -class btStackAlloc; - -///btGjkEpaSolver contributed under zlib by Nathanael Presson -struct btGjkEpaSolver -{ -struct sResults - { - enum eStatus - { - Separated, /* Shapes doesnt penetrate */ - Penetrating, /* Shapes are penetrating */ - GJK_Failed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */ - EPA_Failed, /* EPA phase fail, bigger problem, need to save parameters, and debug */ - } status; - btVector3 witnesses[2]; - btVector3 normal; - btScalar depth; - int epa_iterations; - int gjk_iterations; - }; -static bool Collide(const btConvexShape* shape0,const btTransform& wtrs0, - const btConvexShape* shape1,const btTransform& wtrs1, - btScalar radialmargin, - btStackAlloc* stackAlloc, - sResults& results); -}; - -#endif diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp deleted file mode 100644 index 9e600652333..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -EPA Copyright (c) Ricardo Padrela 2006 - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" - -bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver, - const btConvexShape* pConvexA, const btConvexShape* pConvexB, - const btTransform& transformA, const btTransform& transformB, - btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, - class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc ) -{ - - (void)debugDraw; - (void)v; - (void)simplexSolver; - - const btScalar radialmargin(btScalar(0.)); - - btGjkEpaSolver::sResults results; - if(btGjkEpaSolver::Collide( pConvexA,transformA, - pConvexB,transformB, - radialmargin,stackAlloc,results)) - { - // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); - //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); - wWitnessOnA = results.witnesses[0]; - wWitnessOnB = results.witnesses[1]; - return true; - } - - return false; -} - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h deleted file mode 100644 index 2dc069ce5cf..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -EPA Copyright (c) Ricardo Padrela 2006 - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -#ifndef BT_GJP_EPA_PENETRATION_DEPTH_H -#define BT_GJP_EPA_PENETRATION_DEPTH_H - -#include "btConvexPenetrationDepthSolver.h" - -///EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to -///calculate the penetration depth between two convex shapes. -class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver -{ - public : - - bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - const btConvexShape* pConvexA, const btConvexShape* pConvexB, - const btTransform& transformA, const btTransform& transformB, - btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, - class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); - - private : - -}; - -#endif // BT_GJP_EPA_PENETRATION_DEPTH_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp deleted file mode 100644 index c5f50d4dd1a..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btGjkPairDetector.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" -#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h" - -#if defined(DEBUG) || defined (_DEBUG) -#include //for debug printf -#ifdef __SPU__ -#include -#define printf spu_printf -#endif //__SPU__ -#endif - -//must be above the machine epsilon -#define REL_ERROR2 btScalar(1.0e-6) - -//temp globals, to improve GJK/EPA/penetration calculations -int gNumDeepPenetrationChecks = 0; -int gNumGjkChecks = 0; - - - -btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver) -:m_cachedSeparatingAxis(btScalar(0.),btScalar(0.),btScalar(1.)), -m_penetrationDepthSolver(penetrationDepthSolver), -m_simplexSolver(simplexSolver), -m_minkowskiA(objectA), -m_minkowskiB(objectB), -m_ignoreMargin(false), -m_lastUsedMethod(-1), -m_catchDegeneracies(1) -{ -} - -void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) -{ - btScalar distance=btScalar(0.); - btVector3 normalInB(btScalar(0.),btScalar(0.),btScalar(0.)); - btVector3 pointOnA,pointOnB; - btTransform localTransA = input.m_transformA; - btTransform localTransB = input.m_transformB; - btVector3 positionOffset = (localTransA.getOrigin() + localTransB.getOrigin()) * btScalar(0.5); - localTransA.getOrigin() -= positionOffset; - localTransB.getOrigin() -= positionOffset; - - btScalar marginA = m_minkowskiA->getMargin(); - btScalar marginB = m_minkowskiB->getMargin(); - - gNumGjkChecks++; - - //for CCD we don't use margins - if (m_ignoreMargin) - { - marginA = btScalar(0.); - marginB = btScalar(0.); - } - - m_curIter = 0; - int gGjkMaxIter = 1000;//this is to catch invalid input, perhaps check for #NaN? - m_cachedSeparatingAxis.setValue(0,1,0); - - bool isValid = false; - bool checkSimplex = false; - bool checkPenetration = true; - m_degenerateSimplex = 0; - - m_lastUsedMethod = -1; - - { - btScalar squaredDistance = SIMD_INFINITY; - btScalar delta = btScalar(0.); - - btScalar margin = marginA + marginB; - - - - m_simplexSolver->reset(); - - for ( ; ; ) - //while (true) - { - - btVector3 seperatingAxisInA = (-m_cachedSeparatingAxis)* input.m_transformA.getBasis(); - btVector3 seperatingAxisInB = m_cachedSeparatingAxis* input.m_transformB.getBasis(); - - btVector3 pInA = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA); - btVector3 qInB = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); - btPoint3 pWorld = localTransA(pInA); - btPoint3 qWorld = localTransB(qInB); - - btVector3 w = pWorld - qWorld; - delta = m_cachedSeparatingAxis.dot(w); - - // potential exit, they don't overlap - if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared)) - { - checkPenetration = false; - break; - } - - //exit 0: the new point is already in the simplex, or we didn't come any closer - if (m_simplexSolver->inSimplex(w)) - { - m_degenerateSimplex = 1; - checkSimplex = true; - break; - } - // are we getting any closer ? - btScalar f0 = squaredDistance - delta; - btScalar f1 = squaredDistance * REL_ERROR2; - - if (f0 <= f1) - { - if (f0 <= btScalar(0.)) - { - m_degenerateSimplex = 2; - } - checkSimplex = true; - break; - } - //add current vertex to simplex - m_simplexSolver->addVertex(w, pWorld, qWorld); - - //calculate the closest point to the origin (update vector v) - if (!m_simplexSolver->closest(m_cachedSeparatingAxis)) - { - m_degenerateSimplex = 3; - checkSimplex = true; - break; - } - - btScalar previousSquaredDistance = squaredDistance; - squaredDistance = m_cachedSeparatingAxis.length2(); - - //redundant m_simplexSolver->compute_points(pointOnA, pointOnB); - - //are we getting any closer ? - if (previousSquaredDistance - squaredDistance <= SIMD_EPSILON * previousSquaredDistance) - { - m_simplexSolver->backup_closest(m_cachedSeparatingAxis); - checkSimplex = true; - break; - } - - //degeneracy, this is typically due to invalid/uninitialized worldtransforms for a btCollisionObject - if (m_curIter++ > gGjkMaxIter) - { - #if defined(DEBUG) || defined (_DEBUG) - - printf("btGjkPairDetector maxIter exceeded:%i\n",m_curIter); - printf("sepAxis=(%f,%f,%f), squaredDistance = %f, shapeTypeA=%i,shapeTypeB=%i\n", - m_cachedSeparatingAxis.getX(), - m_cachedSeparatingAxis.getY(), - m_cachedSeparatingAxis.getZ(), - squaredDistance, - m_minkowskiA->getShapeType(), - m_minkowskiB->getShapeType()); - - #endif - break; - - } - - - bool check = (!m_simplexSolver->fullSimplex()); - //bool check = (!m_simplexSolver->fullSimplex() && squaredDistance > SIMD_EPSILON * m_simplexSolver->maxVertex()); - - if (!check) - { - //do we need this backup_closest here ? - m_simplexSolver->backup_closest(m_cachedSeparatingAxis); - break; - } - } - - if (checkSimplex) - { - m_simplexSolver->compute_points(pointOnA, pointOnB); - normalInB = pointOnA-pointOnB; - btScalar lenSqr = m_cachedSeparatingAxis.length2(); - //valid normal - if (lenSqr < 0.0001) - { - m_degenerateSimplex = 5; - } - if (lenSqr > SIMD_EPSILON*SIMD_EPSILON) - { - btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); - normalInB *= rlen; //normalize - btScalar s = btSqrt(squaredDistance); - - btAssert(s > btScalar(0.0)); - pointOnA -= m_cachedSeparatingAxis * (marginA / s); - pointOnB += m_cachedSeparatingAxis * (marginB / s); - distance = ((btScalar(1.)/rlen) - margin); - isValid = true; - - m_lastUsedMethod = 1; - } else - { - m_lastUsedMethod = 2; - } - } - - bool catchDegeneratePenetrationCase = - (m_catchDegeneracies && m_penetrationDepthSolver && m_degenerateSimplex && ((distance+margin) < 0.01)); - - //if (checkPenetration && !isValid) - if (checkPenetration && (!isValid || catchDegeneratePenetrationCase )) - { - //penetration case - - //if there is no way to handle penetrations, bail out - if (m_penetrationDepthSolver) - { - // Penetration depth case. - btVector3 tmpPointOnA,tmpPointOnB; - - gNumDeepPenetrationChecks++; - - bool isValid2 = m_penetrationDepthSolver->calcPenDepth( - *m_simplexSolver, - m_minkowskiA,m_minkowskiB, - localTransA,localTransB, - m_cachedSeparatingAxis, tmpPointOnA, tmpPointOnB, - debugDraw,input.m_stackAlloc - ); - - if (isValid2) - { - btVector3 tmpNormalInB = tmpPointOnB-tmpPointOnA; - btScalar lenSqr = tmpNormalInB.length2(); - if (lenSqr > (SIMD_EPSILON*SIMD_EPSILON)) - { - tmpNormalInB /= btSqrt(lenSqr); - btScalar distance2 = -(tmpPointOnA-tmpPointOnB).length(); - //only replace valid penetrations when the result is deeper (check) - if (!isValid || (distance2 < distance)) - { - distance = distance2; - pointOnA = tmpPointOnA; - pointOnB = tmpPointOnB; - normalInB = tmpNormalInB; - isValid = true; - m_lastUsedMethod = 3; - } else - { - - } - } else - { - //isValid = false; - m_lastUsedMethod = 4; - } - } else - { - m_lastUsedMethod = 5; - } - - } - } - } - - if (isValid) - { -#ifdef __SPU__ - //spu_printf("distance\n"); -#endif //__CELLOS_LV2__ - - - output.addContactPoint( - normalInB, - pointOnB+positionOffset, - distance); - //printf("gjk add:%f",distance); - } - - -} - - - - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h deleted file mode 100644 index 1ec51f74069..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - - -#ifndef GJK_PAIR_DETECTOR_H -#define GJK_PAIR_DETECTOR_H - -#include "btDiscreteCollisionDetectorInterface.h" -#include "LinearMath/btPoint3.h" -#include "BulletCollision/CollisionShapes/btCollisionMargin.h" - -class btConvexShape; -#include "btSimplexSolverInterface.h" -class btConvexPenetrationDepthSolver; - -/// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface -class btGjkPairDetector : public btDiscreteCollisionDetectorInterface -{ - - - btVector3 m_cachedSeparatingAxis; - btConvexPenetrationDepthSolver* m_penetrationDepthSolver; - btSimplexSolverInterface* m_simplexSolver; - const btConvexShape* m_minkowskiA; - const btConvexShape* m_minkowskiB; - bool m_ignoreMargin; - - -public: - - //some debugging to fix degeneracy problems - int m_lastUsedMethod; - int m_curIter; - int m_degenerateSimplex; - int m_catchDegeneracies; - - - btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); - virtual ~btGjkPairDetector() {}; - - virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw); - - void setMinkowskiA(btConvexShape* minkA) - { - m_minkowskiA = minkA; - } - - void setMinkowskiB(btConvexShape* minkB) - { - m_minkowskiB = minkB; - } - void setCachedSeperatingAxis(const btVector3& seperatingAxis) - { - m_cachedSeparatingAxis = seperatingAxis; - } - - void setPenetrationDepthSolver(btConvexPenetrationDepthSolver* penetrationDepthSolver) - { - m_penetrationDepthSolver = penetrationDepthSolver; - } - - ///don't use setIgnoreMargin, it's for Bullet's internal use - void setIgnoreMargin(bool ignoreMargin) - { - m_ignoreMargin = ignoreMargin; - } - - -}; - -#endif //GJK_PAIR_DETECTOR_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h deleted file mode 100644 index 1933d378f4f..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef MANIFOLD_CONTACT_POINT_H -#define MANIFOLD_CONTACT_POINT_H - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransformUtil.h" - - - - - -/// ManifoldContactPoint collects and maintains persistent contactpoints. -/// used to improve stability and performance of rigidbody dynamics response. -class btManifoldPoint - { - public: - btManifoldPoint() - :m_userPersistentData(0), - m_lifeTime(0) - { - } - - btManifoldPoint( const btVector3 &pointA, const btVector3 &pointB, - const btVector3 &normal, - btScalar distance ) : - m_localPointA( pointA ), - m_localPointB( pointB ), - m_normalWorldOnB( normal ), - m_distance1( distance ), - m_combinedFriction(btScalar(0.)), - m_combinedRestitution(btScalar(0.)), - m_userPersistentData(0), - m_lifeTime(0) - { - - - } - - - - btVector3 m_localPointA; - btVector3 m_localPointB; - btVector3 m_positionWorldOnB; - ///m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity - btVector3 m_positionWorldOnA; - btVector3 m_normalWorldOnB; - - btScalar m_distance1; - btScalar m_combinedFriction; - btScalar m_combinedRestitution; - - - mutable void* m_userPersistentData; - - int m_lifeTime;//lifetime of the contactpoint in frames - - btScalar getDistance() const - { - return m_distance1; - } - int getLifeTime() const - { - return m_lifeTime; - } - - const btVector3& getPositionWorldOnA() const { - return m_positionWorldOnA; -// return m_positionWorldOnB + m_normalWorldOnB * m_distance1; - } - - const btVector3& getPositionWorldOnB() const - { - return m_positionWorldOnB; - } - - void setDistance(btScalar dist) - { - m_distance1 = dist; - } - - - - }; - -#endif //MANIFOLD_CONTACT_POINT_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp deleted file mode 100644 index 100bc240764..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btMinkowskiPenetrationDepthSolver.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" - - - - -#define NUM_UNITSPHERE_POINTS 42 -static btVector3 sPenetrationDirections[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] = -{ -btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)), -btVector3(btScalar(0.723608) , btScalar(-0.525725),btScalar(-0.447219)), -btVector3(btScalar(-0.276388) , btScalar(-0.850649),btScalar(-0.447219)), -btVector3(btScalar(-0.894426) , btScalar(-0.000000),btScalar(-0.447216)), -btVector3(btScalar(-0.276388) , btScalar(0.850649),btScalar(-0.447220)), -btVector3(btScalar(0.723608) , btScalar(0.525725),btScalar(-0.447219)), -btVector3(btScalar(0.276388) , btScalar(-0.850649),btScalar(0.447220)), -btVector3(btScalar(-0.723608) , btScalar(-0.525725),btScalar(0.447219)), -btVector3(btScalar(-0.723608) , btScalar(0.525725),btScalar(0.447219)), -btVector3(btScalar(0.276388) , btScalar(0.850649),btScalar(0.447219)), -btVector3(btScalar(0.894426) , btScalar(0.000000),btScalar(0.447216)), -btVector3(btScalar(-0.000000) , btScalar(0.000000),btScalar(1.000000)), -btVector3(btScalar(0.425323) , btScalar(-0.309011),btScalar(-0.850654)), -btVector3(btScalar(-0.162456) , btScalar(-0.499995),btScalar(-0.850654)), -btVector3(btScalar(0.262869) , btScalar(-0.809012),btScalar(-0.525738)), -btVector3(btScalar(0.425323) , btScalar(0.309011),btScalar(-0.850654)), -btVector3(btScalar(0.850648) , btScalar(-0.000000),btScalar(-0.525736)), -btVector3(btScalar(-0.525730) , btScalar(-0.000000),btScalar(-0.850652)), -btVector3(btScalar(-0.688190) , btScalar(-0.499997),btScalar(-0.525736)), -btVector3(btScalar(-0.162456) , btScalar(0.499995),btScalar(-0.850654)), -btVector3(btScalar(-0.688190) , btScalar(0.499997),btScalar(-0.525736)), -btVector3(btScalar(0.262869) , btScalar(0.809012),btScalar(-0.525738)), -btVector3(btScalar(0.951058) , btScalar(0.309013),btScalar(0.000000)), -btVector3(btScalar(0.951058) , btScalar(-0.309013),btScalar(0.000000)), -btVector3(btScalar(0.587786) , btScalar(-0.809017),btScalar(0.000000)), -btVector3(btScalar(0.000000) , btScalar(-1.000000),btScalar(0.000000)), -btVector3(btScalar(-0.587786) , btScalar(-0.809017),btScalar(0.000000)), -btVector3(btScalar(-0.951058) , btScalar(-0.309013),btScalar(-0.000000)), -btVector3(btScalar(-0.951058) , btScalar(0.309013),btScalar(-0.000000)), -btVector3(btScalar(-0.587786) , btScalar(0.809017),btScalar(-0.000000)), -btVector3(btScalar(-0.000000) , btScalar(1.000000),btScalar(-0.000000)), -btVector3(btScalar(0.587786) , btScalar(0.809017),btScalar(-0.000000)), -btVector3(btScalar(0.688190) , btScalar(-0.499997),btScalar(0.525736)), -btVector3(btScalar(-0.262869) , btScalar(-0.809012),btScalar(0.525738)), -btVector3(btScalar(-0.850648) , btScalar(0.000000),btScalar(0.525736)), -btVector3(btScalar(-0.262869) , btScalar(0.809012),btScalar(0.525738)), -btVector3(btScalar(0.688190) , btScalar(0.499997),btScalar(0.525736)), -btVector3(btScalar(0.525730) , btScalar(0.000000),btScalar(0.850652)), -btVector3(btScalar(0.162456) , btScalar(-0.499995),btScalar(0.850654)), -btVector3(btScalar(-0.425323) , btScalar(-0.309011),btScalar(0.850654)), -btVector3(btScalar(-0.425323) , btScalar(0.309011),btScalar(0.850654)), -btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654)) -}; - - -bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver, - const btConvexShape* convexA,const btConvexShape* convexB, - const btTransform& transA,const btTransform& transB, - btVector3& v, btPoint3& pa, btPoint3& pb, - class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc - ) -{ - - (void)stackAlloc; - (void)v; - - - struct btIntermediateResult : public btDiscreteCollisionDetectorInterface::Result - { - - btIntermediateResult():m_hasResult(false) - { - } - - btVector3 m_normalOnBInWorld; - btVector3 m_pointInWorld; - btScalar m_depth; - bool m_hasResult; - - virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) - { - (void)partId0; - (void)index0; - (void)partId1; - (void)index1; - } - void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) - { - m_normalOnBInWorld = normalOnBInWorld; - m_pointInWorld = pointInWorld; - m_depth = depth; - m_hasResult = true; - } - }; - - //just take fixed number of orientation, and sample the penetration depth in that direction - btScalar minProj = btScalar(1e30); - btVector3 minNorm(btScalar(0.), btScalar(0.), btScalar(0.)); - btVector3 minA,minB; - btVector3 seperatingAxisInA,seperatingAxisInB; - btVector3 pInA,qInB,pWorld,qWorld,w; - -#define USE_BATCHED_SUPPORT 1 -#ifdef USE_BATCHED_SUPPORT - - btVector3 supportVerticesABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; - btVector3 supportVerticesBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; - btVector3 seperatingAxisInABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; - btVector3 seperatingAxisInBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; - int i; - - int numSampleDirections = NUM_UNITSPHERE_POINTS; - - for (i=0;igetNumPreferredPenetrationDirections(); - if (numPDA) - { - for (int i=0;igetPreferredPenetrationDirection(i,norm); - norm = transA.getBasis() * norm; - sPenetrationDirections[numSampleDirections] = norm; - seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis(); - seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis(); - numSampleDirections++; - } - } - } - - { - int numPDB = convexB->getNumPreferredPenetrationDirections(); - if (numPDB) - { - for (int i=0;igetPreferredPenetrationDirection(i,norm); - norm = transB.getBasis() * norm; - sPenetrationDirections[numSampleDirections] = norm; - seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis(); - seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis(); - numSampleDirections++; - } - } - } - - - - convexA->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch,supportVerticesABatch,numSampleDirections); - convexB->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch,supportVerticesBBatch,numSampleDirections); - - for (i=0;igetNumPreferredPenetrationDirections(); - if (numPDA) - { - for (int i=0;igetPreferredPenetrationDirection(i,norm); - norm = transA.getBasis() * norm; - sPenetrationDirections[numSampleDirections] = norm; - numSampleDirections++; - } - } - } - - { - int numPDB = convexB->getNumPreferredPenetrationDirections(); - if (numPDB) - { - for (int i=0;igetPreferredPenetrationDirection(i,norm); - norm = transB.getBasis() * norm; - sPenetrationDirections[numSampleDirections] = norm; - numSampleDirections++; - } - } - } - - for (int i=0;ilocalGetSupportingVertexWithoutMargin(seperatingAxisInA); - qInB = convexB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); - pWorld = transA(pInA); - qWorld = transB(qInB); - w = qWorld - pWorld; - btScalar delta = norm.dot(w); - //find smallest delta - if (delta < minProj) - { - minProj = delta; - minNorm = norm; - minA = pWorld; - minB = qWorld; - } - } -#endif //USE_BATCHED_SUPPORT - - //add the margins - - minA += minNorm*convexA->getMargin(); - minB -= minNorm*convexB->getMargin(); - //no penetration - if (minProj < btScalar(0.)) - return false; - - minProj += (convexA->getMargin() + convexB->getMargin()); - - - - - -//#define DEBUG_DRAW 1 -#ifdef DEBUG_DRAW - if (debugDraw) - { - btVector3 color(0,1,0); - debugDraw->drawLine(minA,minB,color); - color = btVector3 (1,1,1); - btVector3 vec = minB-minA; - btScalar prj2 = minNorm.dot(vec); - debugDraw->drawLine(minA,minA+(minNorm*minProj),color); - - } -#endif //DEBUG_DRAW - - - - btGjkPairDetector gjkdet(convexA,convexB,&simplexSolver,0); - - btScalar offsetDist = minProj; - btVector3 offset = minNorm * offsetDist; - - - - btGjkPairDetector::ClosestPointInput input; - - btVector3 newOrg = transA.getOrigin() + offset; - - btTransform displacedTrans = transA; - displacedTrans.setOrigin(newOrg); - - input.m_transformA = displacedTrans; - input.m_transformB = transB; - input.m_maximumDistanceSquared = btScalar(1e30);//minProj; - - btIntermediateResult res; - gjkdet.getClosestPoints(input,res,debugDraw); - - btScalar correctedMinNorm = minProj - res.m_depth; - - - //the penetration depth is over-estimated, relax it - btScalar penetration_relaxation= btScalar(1.); - minNorm*=penetration_relaxation; - - if (res.m_hasResult) - { - - pa = res.m_pointInWorld - minNorm * correctedMinNorm; - pb = res.m_pointInWorld; - -#ifdef DEBUG_DRAW - if (debugDraw) - { - btVector3 color(1,0,0); - debugDraw->drawLine(pa,pb,color); - } -#endif//DEBUG_DRAW - - - } - return res.m_hasResult; -} - - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h deleted file mode 100644 index 27b42c2b47e..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H -#define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H - -#include "btConvexPenetrationDepthSolver.h" - -///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. -///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. -class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver -{ -public: - - virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, - const btConvexShape* convexA,const btConvexShape* convexB, - const btTransform& transA,const btTransform& transB, - btVector3& v, btPoint3& pa, btPoint3& pb, - class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc - ); - -}; - -#endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp deleted file mode 100644 index ee94ee01149..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btPersistentManifold.h" -#include "LinearMath/btTransform.h" -#include - -btScalar gContactBreakingThreshold = btScalar(0.02); -ContactDestroyedCallback gContactDestroyedCallback = 0; - - - -btPersistentManifold::btPersistentManifold() -:m_body0(0), -m_body1(0), -m_cachedPoints (0), -m_index1a(0) -{ -} - - - - -#ifdef DEBUG_PERSISTENCY -#include -void btPersistentManifold::DebugPersistency() -{ - int i; - printf("DebugPersistency : numPoints %d\n",m_cachedPoints); - for (i=0;i1) - printf("error in clearUserCache\n"); - } - } - assert(occurance<=0); -#endif //DEBUG_PERSISTENCY - - if (pt.m_userPersistentData && gContactDestroyedCallback) - { - (*gContactDestroyedCallback)(pt.m_userPersistentData); - pt.m_userPersistentData = 0; - } - -#ifdef DEBUG_PERSISTENCY - DebugPersistency(); -#endif - } - - -} - - -int btPersistentManifold::sortCachedPoints(const btManifoldPoint& pt) -{ - - //calculate 4 possible cases areas, and take biggest area - //also need to keep 'deepest' - - int maxPenetrationIndex = -1; -#define KEEP_DEEPEST_POINT 1 -#ifdef KEEP_DEEPEST_POINT - btScalar maxPenetration = pt.getDistance(); - for (int i=0;i<4;i++) - { - if (m_pointCache[i].getDistance() < maxPenetration) - { - maxPenetrationIndex = i; - maxPenetration = m_pointCache[i].getDistance(); - } - } -#endif //KEEP_DEEPEST_POINT - - btScalar res0(btScalar(0.)),res1(btScalar(0.)),res2(btScalar(0.)),res3(btScalar(0.)); - if (maxPenetrationIndex != 0) - { - btVector3 a0 = pt.m_localPointA-m_pointCache[1].m_localPointA; - btVector3 b0 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA; - btVector3 cross = a0.cross(b0); - res0 = cross.length2(); - } - if (maxPenetrationIndex != 1) - { - btVector3 a1 = pt.m_localPointA-m_pointCache[0].m_localPointA; - btVector3 b1 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA; - btVector3 cross = a1.cross(b1); - res1 = cross.length2(); - } - - if (maxPenetrationIndex != 2) - { - btVector3 a2 = pt.m_localPointA-m_pointCache[0].m_localPointA; - btVector3 b2 = m_pointCache[3].m_localPointA-m_pointCache[1].m_localPointA; - btVector3 cross = a2.cross(b2); - res2 = cross.length2(); - } - - if (maxPenetrationIndex != 3) - { - btVector3 a3 = pt.m_localPointA-m_pointCache[0].m_localPointA; - btVector3 b3 = m_pointCache[2].m_localPointA-m_pointCache[1].m_localPointA; - btVector3 cross = a3.cross(b3); - res3 = cross.length2(); - } - - btVector4 maxvec(res0,res1,res2,res3); - int biggestarea = maxvec.closestAxis4(); - return biggestarea; -} - - -int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const -{ - btScalar shortestDist = getContactBreakingThreshold() * getContactBreakingThreshold(); - int size = getNumContacts(); - int nearestPoint = -1; - for( int i = 0; i < size; i++ ) - { - const btManifoldPoint &mp = m_pointCache[i]; - - btVector3 diffA = mp.m_localPointA- newPoint.m_localPointA; - const btScalar distToManiPoint = diffA.dot(diffA); - if( distToManiPoint < shortestDist ) - { - shortestDist = distToManiPoint; - nearestPoint = i; - } - } - return nearestPoint; -} - -void btPersistentManifold::AddManifoldPoint(const btManifoldPoint& newPoint) -{ - assert(validContactDistance(newPoint)); - - int insertIndex = getNumContacts(); - if (insertIndex == MANIFOLD_CACHE_SIZE) - { -#if MANIFOLD_CACHE_SIZE >= 4 - //sort cache so best points come first, based on area - insertIndex = sortCachedPoints(newPoint); -#else - insertIndex = 0; -#endif - - - } else - { - m_cachedPoints++; - - - } - replaceContactPoint(newPoint,insertIndex); -} - -btScalar btPersistentManifold::getContactBreakingThreshold() const -{ - return gContactBreakingThreshold; -} - - - -void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btTransform& trB) -{ - int i; -#ifdef DEBUG_PERSISTENCY - printf("refreshContactPoints posA = (%f,%f,%f) posB = (%f,%f,%f)\n", - trA.getOrigin().getX(), - trA.getOrigin().getY(), - trA.getOrigin().getZ(), - trB.getOrigin().getX(), - trB.getOrigin().getY(), - trB.getOrigin().getZ()); -#endif //DEBUG_PERSISTENCY - /// first refresh worldspace positions and distance - for (i=getNumContacts()-1;i>=0;i--) - { - btManifoldPoint &manifoldPoint = m_pointCache[i]; - manifoldPoint.m_positionWorldOnA = trA( manifoldPoint.m_localPointA ); - manifoldPoint.m_positionWorldOnB = trB( manifoldPoint.m_localPointB ); - manifoldPoint.m_distance1 = (manifoldPoint.m_positionWorldOnA - manifoldPoint.m_positionWorldOnB).dot(manifoldPoint.m_normalWorldOnB); - manifoldPoint.m_lifeTime++; - } - - /// then - btScalar distance2d; - btVector3 projectedDifference,projectedPoint; - for (i=getNumContacts()-1;i>=0;i--) - { - - btManifoldPoint &manifoldPoint = m_pointCache[i]; - //contact becomes invalid when signed distance exceeds margin (projected on contactnormal direction) - if (!validContactDistance(manifoldPoint)) - { - removeContactPoint(i); - } else - { - //contact also becomes invalid when relative movement orthogonal to normal exceeds margin - projectedPoint = manifoldPoint.m_positionWorldOnA - manifoldPoint.m_normalWorldOnB * manifoldPoint.m_distance1; - projectedDifference = manifoldPoint.m_positionWorldOnB - projectedPoint; - distance2d = projectedDifference.dot(projectedDifference); - if (distance2d > getContactBreakingThreshold()*getContactBreakingThreshold() ) - { - removeContactPoint(i); - } - } - } -#ifdef DEBUG_PERSISTENCY - DebugPersistency(); -#endif // -} - - - - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h deleted file mode 100644 index f0b1ce58db7..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h +++ /dev/null @@ -1,179 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef PERSISTENT_MANIFOLD_H -#define PERSISTENT_MANIFOLD_H - - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" -#include "btManifoldPoint.h" -#include "LinearMath/btAlignedAllocator.h" - -struct btCollisionResult; - -///contact breaking and merging threshold -extern btScalar gContactBreakingThreshold; - -typedef bool (*ContactDestroyedCallback)(void* userPersistentData); -extern ContactDestroyedCallback gContactDestroyedCallback; - - - - -#define MANIFOLD_CACHE_SIZE 4 - -///btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase. -///Those contact points are created by the collision narrow phase. -///The cache can be empty, or hold 1,2,3 or 4 points. Some collision algorithms (GJK) might only add one point at a time. -///updates/refreshes old contact points, and throw them away if necessary (distance becomes too large) -///reduces the cache to 4 points, when more then 4 points are added, using following rules: -///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points -///note that some pairs of objects might have more then one contact manifold. -ATTRIBUTE_ALIGNED16( class) btPersistentManifold -{ - - btManifoldPoint m_pointCache[MANIFOLD_CACHE_SIZE]; - - /// this two body pointers can point to the physics rigidbody class. - /// void* will allow any rigidbody class - void* m_body0; - void* m_body1; - int m_cachedPoints; - - - /// sort cached points so most isolated points come first - int sortCachedPoints(const btManifoldPoint& pt); - - int findContactPoint(const btManifoldPoint* unUsed, int numUnused,const btManifoldPoint& pt); - -public: - - BT_DECLARE_ALIGNED_ALLOCATOR(); - - int m_index1a; - - btPersistentManifold(); - - btPersistentManifold(void* body0,void* body1,int bla) - : m_body0(body0),m_body1(body1),m_cachedPoints(0) - { - } - - SIMD_FORCE_INLINE void* getBody0() { return m_body0;} - SIMD_FORCE_INLINE void* getBody1() { return m_body1;} - - SIMD_FORCE_INLINE const void* getBody0() const { return m_body0;} - SIMD_FORCE_INLINE const void* getBody1() const { return m_body1;} - - void setBodies(void* body0,void* body1) - { - m_body0 = body0; - m_body1 = body1; - } - - void clearUserCache(btManifoldPoint& pt); - -#ifdef DEBUG_PERSISTENCY - void DebugPersistency(); -#endif // - - SIMD_FORCE_INLINE int getNumContacts() const { return m_cachedPoints;} - - SIMD_FORCE_INLINE const btManifoldPoint& getContactPoint(int index) const - { - btAssert(index < m_cachedPoints); - return m_pointCache[index]; - } - - SIMD_FORCE_INLINE btManifoldPoint& getContactPoint(int index) - { - btAssert(index < m_cachedPoints); - return m_pointCache[index]; - } - - /// todo: get this margin from the current physics / collision environment - btScalar getContactBreakingThreshold() const; - - int getCacheEntry(const btManifoldPoint& newPoint) const; - - void AddManifoldPoint( const btManifoldPoint& newPoint); - - void removeContactPoint (int index) - { - clearUserCache(m_pointCache[index]); - - int lastUsedIndex = getNumContacts() - 1; -// m_pointCache[index] = m_pointCache[lastUsedIndex]; - if(index != lastUsedIndex) - { - m_pointCache[index] = m_pointCache[lastUsedIndex]; - //get rid of duplicated userPersistentData pointer - m_pointCache[lastUsedIndex].m_userPersistentData = 0; - m_pointCache[lastUsedIndex].m_lifeTime = 0; - } - - btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0); - m_cachedPoints--; - } - void replaceContactPoint(const btManifoldPoint& newPoint,int insertIndex) - { - btAssert(validContactDistance(newPoint)); - -#define MAINTAIN_PERSISTENCY 1 -#ifdef MAINTAIN_PERSISTENCY - int lifeTime = m_pointCache[insertIndex].getLifeTime(); - btAssert(lifeTime>=0); - void* cache = m_pointCache[insertIndex].m_userPersistentData; - - m_pointCache[insertIndex] = newPoint; - - m_pointCache[insertIndex].m_userPersistentData = cache; - m_pointCache[insertIndex].m_lifeTime = lifeTime; -#else - clearUserCache(m_pointCache[insertIndex]); - m_pointCache[insertIndex] = newPoint; - -#endif - } - - bool validContactDistance(const btManifoldPoint& pt) const - { - return pt.m_distance1 <= getContactBreakingThreshold(); - } - /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin - void refreshContactPoints( const btTransform& trA,const btTransform& trB); - - - SIMD_FORCE_INLINE void clearManifold() - { - int i; - for (i=0;i= btScalar(0.0) ) - { - return ; // same sign - } - - const btScalar proj_length=dist_a-dist_b; - const btScalar distance = (dist_a)/(proj_length); - // Now we have the intersection point on the plane, we'll see if it's inside the triangle - // Add an epsilon as a tolerance for the raycast, - // in case the ray hits exacly on the edge of the triangle. - // It must be scaled for the triangle size. - - if(distance < m_hitFraction) - { - - - btScalar edge_tolerance =triangleNormal.length2(); - edge_tolerance *= btScalar(-0.0001); - btVector3 point; point.setInterpolate3( m_from, m_to, distance); - { - btVector3 v0p; v0p = vert0 - point; - btVector3 v1p; v1p = vert1 - point; - btVector3 cp0; cp0 = v0p.cross( v1p ); - - if ( (btScalar)(cp0.dot(triangleNormal)) >=edge_tolerance) - { - - - btVector3 v2p; v2p = vert2 - point; - btVector3 cp1; - cp1 = v1p.cross( v2p); - if ( (btScalar)(cp1.dot(triangleNormal)) >=edge_tolerance) - { - btVector3 cp2; - cp2 = v2p.cross(v0p); - - if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance) - { - - if ( dist_a > 0 ) - { - m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex); - } - else - { - m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex); - } - } - } - } - } - } -} diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h deleted file mode 100644 index 87490a345a2..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef RAYCAST_TRI_CALLBACK_H -#define RAYCAST_TRI_CALLBACK_H - -#include "BulletCollision/CollisionShapes/btTriangleCallback.h" -struct btBroadphaseProxy; - - -class btTriangleRaycastCallback: public btTriangleCallback -{ -public: - - //input - btVector3 m_from; - btVector3 m_to; - - btScalar m_hitFraction; - - btTriangleRaycastCallback(const btVector3& from,const btVector3& to); - - virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); - - virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex ) = 0; - -}; - -#endif //RAYCAST_TRI_CALLBACK_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h deleted file mode 100644 index cf65f46505b..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef SIMPLEX_SOLVER_INTERFACE_H -#define SIMPLEX_SOLVER_INTERFACE_H - -#include "LinearMath/btVector3.h" -#include "LinearMath/btPoint3.h" - -#define NO_VIRTUAL_INTERFACE 1 -#ifdef NO_VIRTUAL_INTERFACE -#include "btVoronoiSimplexSolver.h" -#define btSimplexSolverInterface btVoronoiSimplexSolver -#else - -/// btSimplexSolverInterface can incrementally calculate distance between origin and up to 4 vertices -/// Used by GJK or Linear Casting. Can be implemented by the Johnson-algorithm or alternative approaches based on -/// voronoi regions or barycentric coordinates -class btSimplexSolverInterface -{ - public: - virtual ~btSimplexSolverInterface() {}; - - virtual void reset() = 0; - - virtual void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) = 0; - - virtual bool closest(btVector3& v) = 0; - - virtual btScalar maxVertex() = 0; - - virtual bool fullSimplex() const = 0; - - virtual int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const = 0; - - virtual bool inSimplex(const btVector3& w) = 0; - - virtual void backup_closest(btVector3& v) = 0; - - virtual bool emptySimplex() const = 0; - - virtual void compute_points(btPoint3& p1, btPoint3& p2) = 0; - - virtual int numVertices() const =0; - - -}; -#endif -#endif //SIMPLEX_SOLVER_INTERFACE_H - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp deleted file mode 100644 index 687738b7fa9..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btSubSimplexConvexCast.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" - - -btSubsimplexConvexCast::btSubsimplexConvexCast (const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) -:m_simplexSolver(simplexSolver), -m_convexA(convexA),m_convexB(convexB) -{ -} - -///Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases. -///See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565 -#ifdef BT_USE_DOUBLE_PRECISION -#define MAX_ITERATIONS 64 -#else -#define MAX_ITERATIONS 32 -#endif -bool btSubsimplexConvexCast::calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result) -{ - - btMinkowskiSumShape combi(m_convexA,m_convexB); - btMinkowskiSumShape* convex = &combi; - - btTransform rayFromLocalA; - btTransform rayToLocalA; - - rayFromLocalA = fromA.inverse()* fromB; - rayToLocalA = toA.inverse()* toB; - - - m_simplexSolver->reset(); - - convex->setTransformB(btTransform(rayFromLocalA.getBasis())); - - //btScalar radius = btScalar(0.01); - - btScalar lambda = btScalar(0.); - //todo: need to verify this: - //because of minkowski difference, we need the inverse direction - - btVector3 s = -rayFromLocalA.getOrigin(); - btVector3 r = -(rayToLocalA.getOrigin()-rayFromLocalA.getOrigin()); - btVector3 x = s; - btVector3 v; - btVector3 arbitraryPoint = convex->localGetSupportingVertex(r); - - v = x - arbitraryPoint; - - int maxIter = MAX_ITERATIONS; - - btVector3 n; - n.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - bool hasResult = false; - btVector3 c; - - btScalar lastLambda = lambda; - - - btScalar dist2 = v.length2(); -#ifdef BT_USE_DOUBLE_PRECISION - btScalar epsilon = btScalar(0.0001); -#else - btScalar epsilon = btScalar(0.0001); -#endif //BT_USE_DOUBLE_PRECISION - btVector3 w,p; - btScalar VdotR; - - while ( (dist2 > epsilon) && maxIter--) - { - p = convex->localGetSupportingVertex( v); - w = x - p; - - btScalar VdotW = v.dot(w); - - if ( VdotW > btScalar(0.)) - { - VdotR = v.dot(r); - - if (VdotR >= -(SIMD_EPSILON*SIMD_EPSILON)) - return false; - else - { - lambda = lambda - VdotW / VdotR; - x = s + lambda * r; - m_simplexSolver->reset(); - //check next line - w = x-p; - lastLambda = lambda; - n = v; - hasResult = true; - } - } - m_simplexSolver->addVertex( w, x , p); - if (m_simplexSolver->closest(v)) - { - dist2 = v.length2(); - hasResult = true; - //printf("V=%f , %f, %f\n",v[0],v[1],v[2]); - //printf("DIST2=%f\n",dist2); - //printf("numverts = %i\n",m_simplexSolver->numVertices()); - } else - { - dist2 = btScalar(0.); - } - } - - //int numiter = MAX_ITERATIONS - maxIter; -// printf("number of iterations: %d", numiter); - result.m_fraction = lambda; - result.m_normal = n; - - return true; -} - - - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h deleted file mode 100644 index 05662db5d23..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef SUBSIMPLEX_CONVEX_CAST_H -#define SUBSIMPLEX_CONVEX_CAST_H - -#include "btConvexCast.h" -#include "btSimplexSolverInterface.h" -class btConvexShape; - -/// btSubsimplexConvexCast implements Gino van den Bergens' paper -///"Ray Casting against bteral Convex Objects with Application to Continuous Collision Detection" -/// GJK based Ray Cast, optimized version -/// Objects should not start in overlap, otherwise results are not defined. -class btSubsimplexConvexCast : public btConvexCast -{ - btSimplexSolverInterface* m_simplexSolver; - const btConvexShape* m_convexA; - const btConvexShape* m_convexB; - -public: - - btSubsimplexConvexCast (const btConvexShape* shapeA,const btConvexShape* shapeB,btSimplexSolverInterface* simplexSolver); - - //virtual ~btSubsimplexConvexCast(); - ///SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (sweep) between two moving objects. - ///Precondition is that objects should not penetration/overlap at the start from the interval. Overlap can be tested using btGjkPairDetector. - virtual bool calcTimeOfImpact( - const btTransform& fromA, - const btTransform& toA, - const btTransform& fromB, - const btTransform& toB, - CastResult& result); - -}; - -#endif //SUBSIMPLEX_CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp deleted file mode 100644 index 105b7eccefa..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp +++ /dev/null @@ -1,607 +0,0 @@ - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - Elsevier CDROM license agreements grants nonexclusive license to use the software - for any purpose, commercial or non-commercial as long as the following credit is included - identifying the original source of the software: - - Parts of the source are "from the book Real-Time Collision Detection by - Christer Ericson, published by Morgan Kaufmann Publishers, - (c) 2005 Elsevier Inc." - -*/ - - -#include "btVoronoiSimplexSolver.h" -#include -#include - -#define VERTA 0 -#define VERTB 1 -#define VERTC 2 -#define VERTD 3 - -#define CATCH_DEGENERATE_TETRAHEDRON 1 -void btVoronoiSimplexSolver::removeVertex(int index) -{ - - assert(m_numVertices>0); - m_numVertices--; - m_simplexVectorW[index] = m_simplexVectorW[m_numVertices]; - m_simplexPointsP[index] = m_simplexPointsP[m_numVertices]; - m_simplexPointsQ[index] = m_simplexPointsQ[m_numVertices]; -} - -void btVoronoiSimplexSolver::reduceVertices (const btUsageBitfield& usedVerts) -{ - if ((numVertices() >= 4) && (!usedVerts.usedVertexD)) - removeVertex(3); - - if ((numVertices() >= 3) && (!usedVerts.usedVertexC)) - removeVertex(2); - - if ((numVertices() >= 2) && (!usedVerts.usedVertexB)) - removeVertex(1); - - if ((numVertices() >= 1) && (!usedVerts.usedVertexA)) - removeVertex(0); - -} - - - - - -//clear the simplex, remove all the vertices -void btVoronoiSimplexSolver::reset() -{ - m_cachedValidClosest = false; - m_numVertices = 0; - m_needsUpdate = true; - m_lastW = btVector3(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - m_cachedBC.reset(); -} - - - - //add a vertex -void btVoronoiSimplexSolver::addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) -{ - m_lastW = w; - m_needsUpdate = true; - - m_simplexVectorW[m_numVertices] = w; - m_simplexPointsP[m_numVertices] = p; - m_simplexPointsQ[m_numVertices] = q; - - m_numVertices++; -} - -bool btVoronoiSimplexSolver::updateClosestVectorAndPoints() -{ - - if (m_needsUpdate) - { - m_cachedBC.reset(); - - m_needsUpdate = false; - - switch (numVertices()) - { - case 0: - m_cachedValidClosest = false; - break; - case 1: - { - m_cachedP1 = m_simplexPointsP[0]; - m_cachedP2 = m_simplexPointsQ[0]; - m_cachedV = m_cachedP1-m_cachedP2; //== m_simplexVectorW[0] - m_cachedBC.reset(); - m_cachedBC.setBarycentricCoordinates(btScalar(1.),btScalar(0.),btScalar(0.),btScalar(0.)); - m_cachedValidClosest = m_cachedBC.isValid(); - break; - }; - case 2: - { - //closest point origin from line segment - const btVector3& from = m_simplexVectorW[0]; - const btVector3& to = m_simplexVectorW[1]; - btVector3 nearest; - - btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); - btVector3 diff = p - from; - btVector3 v = to - from; - btScalar t = v.dot(diff); - - if (t > 0) { - btScalar dotVV = v.dot(v); - if (t < dotVV) { - t /= dotVV; - diff -= t*v; - m_cachedBC.m_usedVertices.usedVertexA = true; - m_cachedBC.m_usedVertices.usedVertexB = true; - } else { - t = 1; - diff -= v; - //reduce to 1 point - m_cachedBC.m_usedVertices.usedVertexB = true; - } - } else - { - t = 0; - //reduce to 1 point - m_cachedBC.m_usedVertices.usedVertexA = true; - } - m_cachedBC.setBarycentricCoordinates(1-t,t); - nearest = from + t*v; - - m_cachedP1 = m_simplexPointsP[0] + t * (m_simplexPointsP[1] - m_simplexPointsP[0]); - m_cachedP2 = m_simplexPointsQ[0] + t * (m_simplexPointsQ[1] - m_simplexPointsQ[0]); - m_cachedV = m_cachedP1 - m_cachedP2; - - reduceVertices(m_cachedBC.m_usedVertices); - - m_cachedValidClosest = m_cachedBC.isValid(); - break; - } - case 3: - { - //closest point origin from triangle - btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); - - const btVector3& a = m_simplexVectorW[0]; - const btVector3& b = m_simplexVectorW[1]; - const btVector3& c = m_simplexVectorW[2]; - - closestPtPointTriangle(p,a,b,c,m_cachedBC); - m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] + - m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] + - m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2]; - - m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] + - m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] + - m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2]; - - m_cachedV = m_cachedP1-m_cachedP2; - - reduceVertices (m_cachedBC.m_usedVertices); - m_cachedValidClosest = m_cachedBC.isValid(); - - break; - } - case 4: - { - - - btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); - - const btVector3& a = m_simplexVectorW[0]; - const btVector3& b = m_simplexVectorW[1]; - const btVector3& c = m_simplexVectorW[2]; - const btVector3& d = m_simplexVectorW[3]; - - bool hasSeperation = closestPtPointTetrahedron(p,a,b,c,d,m_cachedBC); - - if (hasSeperation) - { - - m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] + - m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] + - m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2] + - m_simplexPointsP[3] * m_cachedBC.m_barycentricCoords[3]; - - m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] + - m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] + - m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2] + - m_simplexPointsQ[3] * m_cachedBC.m_barycentricCoords[3]; - - m_cachedV = m_cachedP1-m_cachedP2; - reduceVertices (m_cachedBC.m_usedVertices); - } else - { -// printf("sub distance got penetration\n"); - - if (m_cachedBC.m_degenerate) - { - m_cachedValidClosest = false; - } else - { - m_cachedValidClosest = true; - //degenerate case == false, penetration = true + zero - m_cachedV.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - } - break; - } - - m_cachedValidClosest = m_cachedBC.isValid(); - - //closest point origin from tetrahedron - break; - } - default: - { - m_cachedValidClosest = false; - } - }; - } - - return m_cachedValidClosest; - -} - -//return/calculate the closest vertex -bool btVoronoiSimplexSolver::closest(btVector3& v) -{ - bool succes = updateClosestVectorAndPoints(); - v = m_cachedV; - return succes; -} - - - -btScalar btVoronoiSimplexSolver::maxVertex() -{ - int i, numverts = numVertices(); - btScalar maxV = btScalar(0.); - for (i=0;i= btScalar(0.0) && d4 <= d3) - { - result.m_closestPointOnSimplex = b; - result.m_usedVertices.usedVertexB = true; - result.setBarycentricCoordinates(0,1,0); - - return true; // b; // barycentric coordinates (0,1,0) - } - // Check if P in edge region of AB, if so return projection of P onto AB - btScalar vc = d1*d4 - d3*d2; - if (vc <= btScalar(0.0) && d1 >= btScalar(0.0) && d3 <= btScalar(0.0)) { - btScalar v = d1 / (d1 - d3); - result.m_closestPointOnSimplex = a + v * ab; - result.m_usedVertices.usedVertexA = true; - result.m_usedVertices.usedVertexB = true; - result.setBarycentricCoordinates(1-v,v,0); - return true; - //return a + v * ab; // barycentric coordinates (1-v,v,0) - } - - // Check if P in vertex region outside C - btVector3 cp = p - c; - btScalar d5 = ab.dot(cp); - btScalar d6 = ac.dot(cp); - if (d6 >= btScalar(0.0) && d5 <= d6) - { - result.m_closestPointOnSimplex = c; - result.m_usedVertices.usedVertexC = true; - result.setBarycentricCoordinates(0,0,1); - return true;//c; // barycentric coordinates (0,0,1) - } - - // Check if P in edge region of AC, if so return projection of P onto AC - btScalar vb = d5*d2 - d1*d6; - if (vb <= btScalar(0.0) && d2 >= btScalar(0.0) && d6 <= btScalar(0.0)) { - btScalar w = d2 / (d2 - d6); - result.m_closestPointOnSimplex = a + w * ac; - result.m_usedVertices.usedVertexA = true; - result.m_usedVertices.usedVertexC = true; - result.setBarycentricCoordinates(1-w,0,w); - return true; - //return a + w * ac; // barycentric coordinates (1-w,0,w) - } - - // Check if P in edge region of BC, if so return projection of P onto BC - btScalar va = d3*d6 - d5*d4; - if (va <= btScalar(0.0) && (d4 - d3) >= btScalar(0.0) && (d5 - d6) >= btScalar(0.0)) { - btScalar w = (d4 - d3) / ((d4 - d3) + (d5 - d6)); - - result.m_closestPointOnSimplex = b + w * (c - b); - result.m_usedVertices.usedVertexB = true; - result.m_usedVertices.usedVertexC = true; - result.setBarycentricCoordinates(0,1-w,w); - return true; - // return b + w * (c - b); // barycentric coordinates (0,1-w,w) - } - - // P inside face region. Compute Q through its barycentric coordinates (u,v,w) - btScalar denom = btScalar(1.0) / (va + vb + vc); - btScalar v = vb * denom; - btScalar w = vc * denom; - - result.m_closestPointOnSimplex = a + ab * v + ac * w; - result.m_usedVertices.usedVertexA = true; - result.m_usedVertices.usedVertexB = true; - result.m_usedVertices.usedVertexC = true; - result.setBarycentricCoordinates(1-v-w,v,w); - - return true; -// return a + ab * v + ac * w; // = u*a + v*b + w*c, u = va * denom = btScalar(1.0) - v - w - -} - - - - - -/// Test if point p and d lie on opposite sides of plane through abc -int btVoronoiSimplexSolver::pointOutsideOfPlane(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d) -{ - btVector3 normal = (b-a).cross(c-a); - - btScalar signp = (p - a).dot(normal); // [AP AB AC] - btScalar signd = (d - a).dot( normal); // [AD AB AC] - -#ifdef CATCH_DEGENERATE_TETRAHEDRON -#ifdef BT_USE_DOUBLE_PRECISION -if (signd * signd < (btScalar(1e-8) * btScalar(1e-8))) - { - return -1; - } -#else - if (signd * signd < (btScalar(1e-4) * btScalar(1e-4))) - { -// printf("affine dependent/degenerate\n");// - return -1; - } -#endif - -#endif - // Points on opposite sides if expression signs are opposite - return signp * signd < btScalar(0.); -} - - -bool btVoronoiSimplexSolver::closestPtPointTetrahedron(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d, btSubSimplexClosestResult& finalResult) -{ - btSubSimplexClosestResult tempResult; - - // Start out assuming point inside all halfspaces, so closest to itself - finalResult.m_closestPointOnSimplex = p; - finalResult.m_usedVertices.reset(); - finalResult.m_usedVertices.usedVertexA = true; - finalResult.m_usedVertices.usedVertexB = true; - finalResult.m_usedVertices.usedVertexC = true; - finalResult.m_usedVertices.usedVertexD = true; - - int pointOutsideABC = pointOutsideOfPlane(p, a, b, c, d); - int pointOutsideACD = pointOutsideOfPlane(p, a, c, d, b); - int pointOutsideADB = pointOutsideOfPlane(p, a, d, b, c); - int pointOutsideBDC = pointOutsideOfPlane(p, b, d, c, a); - - if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0) - { - finalResult.m_degenerate = true; - return false; - } - - if (!pointOutsideABC && !pointOutsideACD && !pointOutsideADB && !pointOutsideBDC) - { - return false; - } - - - btScalar bestSqDist = FLT_MAX; - // If point outside face abc then compute closest point on abc - if (pointOutsideABC) - { - closestPtPointTriangle(p, a, b, c,tempResult); - btPoint3 q = tempResult.m_closestPointOnSimplex; - - btScalar sqDist = (q - p).dot( q - p); - // Update best closest point if (squared) distance is less than current best - if (sqDist < bestSqDist) { - bestSqDist = sqDist; - finalResult.m_closestPointOnSimplex = q; - //convert result bitmask! - finalResult.m_usedVertices.reset(); - finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; - finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexB; - finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC; - finalResult.setBarycentricCoordinates( - tempResult.m_barycentricCoords[VERTA], - tempResult.m_barycentricCoords[VERTB], - tempResult.m_barycentricCoords[VERTC], - 0 - ); - - } - } - - - // Repeat test for face acd - if (pointOutsideACD) - { - closestPtPointTriangle(p, a, c, d,tempResult); - btPoint3 q = tempResult.m_closestPointOnSimplex; - //convert result bitmask! - - btScalar sqDist = (q - p).dot( q - p); - if (sqDist < bestSqDist) - { - bestSqDist = sqDist; - finalResult.m_closestPointOnSimplex = q; - finalResult.m_usedVertices.reset(); - finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; - - finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexB; - finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexC; - finalResult.setBarycentricCoordinates( - tempResult.m_barycentricCoords[VERTA], - 0, - tempResult.m_barycentricCoords[VERTB], - tempResult.m_barycentricCoords[VERTC] - ); - - } - } - // Repeat test for face adb - - - if (pointOutsideADB) - { - closestPtPointTriangle(p, a, d, b,tempResult); - btPoint3 q = tempResult.m_closestPointOnSimplex; - //convert result bitmask! - - btScalar sqDist = (q - p).dot( q - p); - if (sqDist < bestSqDist) - { - bestSqDist = sqDist; - finalResult.m_closestPointOnSimplex = q; - finalResult.m_usedVertices.reset(); - finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; - finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexC; - - finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB; - finalResult.setBarycentricCoordinates( - tempResult.m_barycentricCoords[VERTA], - tempResult.m_barycentricCoords[VERTC], - 0, - tempResult.m_barycentricCoords[VERTB] - ); - - } - } - // Repeat test for face bdc - - - if (pointOutsideBDC) - { - closestPtPointTriangle(p, b, d, c,tempResult); - btPoint3 q = tempResult.m_closestPointOnSimplex; - //convert result bitmask! - btScalar sqDist = (q - p).dot( q - p); - if (sqDist < bestSqDist) - { - bestSqDist = sqDist; - finalResult.m_closestPointOnSimplex = q; - finalResult.m_usedVertices.reset(); - // - finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexA; - finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC; - finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB; - - finalResult.setBarycentricCoordinates( - 0, - tempResult.m_barycentricCoords[VERTA], - tempResult.m_barycentricCoords[VERTC], - tempResult.m_barycentricCoords[VERTB] - ); - - } - } - - //help! we ended up full ! - - if (finalResult.m_usedVertices.usedVertexA && - finalResult.m_usedVertices.usedVertexB && - finalResult.m_usedVertices.usedVertexC && - finalResult.m_usedVertices.usedVertexD) - { - return true; - } - - return true; -} - diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h deleted file mode 100644 index 356d335bc93..00000000000 --- a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h +++ /dev/null @@ -1,157 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef btVoronoiSimplexSolver_H -#define btVoronoiSimplexSolver_H - -#include "btSimplexSolverInterface.h" - - - -#define VORONOI_SIMPLEX_MAX_VERTS 5 - -struct btUsageBitfield{ - btUsageBitfield() - { - reset(); - } - - void reset() - { - usedVertexA = false; - usedVertexB = false; - usedVertexC = false; - usedVertexD = false; - } - unsigned short usedVertexA : 1; - unsigned short usedVertexB : 1; - unsigned short usedVertexC : 1; - unsigned short usedVertexD : 1; - unsigned short unused1 : 1; - unsigned short unused2 : 1; - unsigned short unused3 : 1; - unsigned short unused4 : 1; -}; - - -struct btSubSimplexClosestResult -{ - btPoint3 m_closestPointOnSimplex; - //MASK for m_usedVertices - //stores the simplex vertex-usage, using the MASK, - // if m_usedVertices & MASK then the related vertex is used - btUsageBitfield m_usedVertices; - btScalar m_barycentricCoords[4]; - bool m_degenerate; - - void reset() - { - m_degenerate = false; - setBarycentricCoordinates(); - m_usedVertices.reset(); - } - bool isValid() - { - bool valid = (m_barycentricCoords[0] >= btScalar(0.)) && - (m_barycentricCoords[1] >= btScalar(0.)) && - (m_barycentricCoords[2] >= btScalar(0.)) && - (m_barycentricCoords[3] >= btScalar(0.)); - - - return valid; - } - void setBarycentricCoordinates(btScalar a=btScalar(0.),btScalar b=btScalar(0.),btScalar c=btScalar(0.),btScalar d=btScalar(0.)) - { - m_barycentricCoords[0] = a; - m_barycentricCoords[1] = b; - m_barycentricCoords[2] = c; - m_barycentricCoords[3] = d; - } - -}; - -/// btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points simplex to the origin. -/// Can be used with GJK, as an alternative to Johnson distance algorithm. -#ifdef NO_VIRTUAL_INTERFACE -class btVoronoiSimplexSolver -#else -class btVoronoiSimplexSolver : public btSimplexSolverInterface -#endif -{ -public: - - int m_numVertices; - - btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS]; - btPoint3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS]; - btPoint3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS]; - - - - btPoint3 m_cachedP1; - btPoint3 m_cachedP2; - btVector3 m_cachedV; - btVector3 m_lastW; - bool m_cachedValidClosest; - - btSubSimplexClosestResult m_cachedBC; - - bool m_needsUpdate; - - void removeVertex(int index); - void reduceVertices (const btUsageBitfield& usedVerts); - bool updateClosestVectorAndPoints(); - - bool closestPtPointTetrahedron(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d, btSubSimplexClosestResult& finalResult); - int pointOutsideOfPlane(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d); - bool closestPtPointTriangle(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c,btSubSimplexClosestResult& result); - -public: - - void reset(); - - void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q); - - - bool closest(btVector3& v); - - btScalar maxVertex(); - - bool fullSimplex() const - { - return (m_numVertices == 4); - } - - int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const; - - bool inSimplex(const btVector3& w); - - void backup_closest(btVector3& v) ; - - bool emptySimplex() const ; - - void compute_points(btPoint3& p1, btPoint3& p2) ; - - int numVertices() const - { - return m_numVertices; - } - - -}; - -#endif //VoronoiSimplexSolver diff --git a/extern/bullet2/src/BulletCollision/ibmsdk/Makefile b/extern/bullet2/src/BulletCollision/ibmsdk/Makefile deleted file mode 100644 index ad04ef1d295..00000000000 --- a/extern/bullet2/src/BulletCollision/ibmsdk/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -#### Source code Dirs -VPATH = \ -../BroadphaseCollision \ -../CollisionDispatch \ -../NarrowPhaseCollision \ -../CollisionShapes - -ROOT = ../../.. - -#### Library -LIBRARY_ppu = bulletcollision.a - -#### Compiler flags -CPPFLAGS = \ --DUSE_LIBSPE2 \ --I../BroadphaseCollision \ --I../CollisionDispath \ --I../NarrowPhaseCollision \ --I../CollisionShapes \ --I$(ROOT)/src/ \ --I$(SDKINC) - -#### Optimization level flags -#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG) -CC_OPT_LEVEL = -O3 - -##### Objects to be archived in lib - -OBJS = \ -btAxisSweep3.o \ -btBroadphaseProxy.o \ -btCollisionAlgorithm.o \ -btDispatcher.o \ -btOverlappingPairCache.o \ -btSimpleBroadphase.o \ -btContinuousConvexCollision.o \ -btConvexCast.o \ -btGjkConvexCast.o \ -btGjkEpa.o \ -btGjkEpaPenetrationDepthSolver.o \ -btGjkPairDetector.o \ -btDefaultCollisionConfiguration.o \ -btMinkowskiPenetrationDepthSolver.o \ -btPersistentManifold.o \ -btRaycastCallback.o \ -btSubSimplexConvexCast.o \ -btVoronoiSimplexSolver.o \ -btCollisionDispatcher.o \ -btCollisionObject.o \ -btCollisionWorld.o \ -btCompoundCollisionAlgorithm.o \ -btConvexConcaveCollisionAlgorithm.o \ -btConvexConvexAlgorithm.o \ -btEmptyCollisionAlgorithm.o \ -btManifoldResult.o \ -btSimulationIslandManager.o \ -btSphereBoxCollisionAlgorithm.o \ -btSphereSphereCollisionAlgorithm.o \ -btSphereTriangleCollisionAlgorithm.o \ -btUnionFind.o \ -SphereTriangleDetector.o \ -btBoxShape.o \ -btBvhTriangleMeshShape.o \ -btCapsuleShape.o \ -btCollisionShape.o \ -btCompoundShape.o \ -btConcaveShape.o \ -btConeShape.o \ -btConvexHullShape.o \ -btConvexShape.o \ -btConvexInternalShape.o \ -btConvexTriangleMeshShape.o \ -btCylinderShape.o \ -btEmptyShape.o \ -btHeightfieldTerrainShape.o \ -btMinkowskiSumShape.o \ -btMultiSphereShape.o \ -btOptimizedBvh.o \ -btPolyhedralConvexShape.o \ -btSphereShape.o \ -btStaticPlaneShape.o \ -btStridingMeshInterface.o \ -btTetrahedronShape.o \ -btTriangleBuffer.o \ -btTriangleCallback.o \ -btTriangleIndexVertexArray.o \ -btTriangleMesh.o \ -btTriangleMeshShape.o \ -btUniformScalingShape.o - -#### Install directories -INSTALL_DIR = $(ROOT)/lib/ibmsdk -INSTALL_FILES = $(LIBRARY_ppu) -CELL_TOP ?= /opt/ibm/cell-sdk/prototype -include $(CELL_TOP)/make.footer diff --git a/extern/bullet2/src/BulletDynamics/CMakeLists.txt b/extern/bullet2/src/BulletDynamics/CMakeLists.txt deleted file mode 100644 index 97ccd7ed08a..00000000000 --- a/extern/bullet2/src/BulletDynamics/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src } -) - -ADD_LIBRARY(LibBulletDynamics - - ConstraintSolver/btContactConstraint.cpp - ConstraintSolver/btConeTwistConstraint.cpp - ConstraintSolver/btGeneric6DofConstraint.cpp - ConstraintSolver/btHingeConstraint.cpp - ConstraintSolver/btPoint2PointConstraint.cpp - ConstraintSolver/btSequentialImpulseConstraintSolver.cpp - ConstraintSolver/btSolve2LinearConstraint.cpp - ConstraintSolver/btTypedConstraint.cpp - Dynamics/Bullet-C-API.cpp - Dynamics/btDiscreteDynamicsWorld.cpp - Dynamics/btSimpleDynamicsWorld.cpp - Dynamics/Bullet-C-API.cpp - Dynamics/btRigidBody.cpp - Vehicle/btRaycastVehicle.cpp - Vehicle/btWheelInfo.cpp -) diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp deleted file mode 100644 index a8a2c4f6763..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - -Written by: Marcus Hennix -*/ - - -#include "btConeTwistConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btTransformUtil.h" -#include "LinearMath/btMinMax.h" -#include - -btConeTwistConstraint::btConeTwistConstraint() -:btTypedConstraint(CONETWIST_CONSTRAINT_TYPE) -{ -} - - -btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB, - const btTransform& rbAFrame,const btTransform& rbBFrame) - :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), - m_angularOnly(false) -{ - // flip axis for correct angles - m_rbBFrame.getBasis()[1][0] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][1] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - - m_swingSpan1 = btScalar(1e30); - m_swingSpan2 = btScalar(1e30); - m_twistSpan = btScalar(1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - - m_solveTwistLimit = false; - m_solveSwingLimit = false; - -} - -btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame) - :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE,rbA),m_rbAFrame(rbAFrame), - m_angularOnly(false) -{ - m_rbBFrame = m_rbAFrame; - - // flip axis for correct angles - m_rbBFrame.getBasis()[1][0] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][1] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - - m_rbBFrame.getBasis()[2][0] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][1] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); - - m_swingSpan1 = btScalar(1e30); - m_swingSpan2 = btScalar(1e30); - m_twistSpan = btScalar(1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - - m_solveTwistLimit = false; - m_solveSwingLimit = false; - -} - -void btConeTwistConstraint::buildJacobian() -{ - m_appliedImpulse = btScalar(0.); - - //set bias, sign, clear accumulator - m_swingCorrection = btScalar(0.); - m_twistLimitSign = btScalar(0.); - m_solveTwistLimit = false; - m_solveSwingLimit = false; - m_accTwistLimitImpulse = btScalar(0.); - m_accSwingLimitImpulse = btScalar(0.); - - if (!m_angularOnly) - { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - btVector3 relPos = pivotBInW - pivotAInW; - - btVector3 normal[3]; - if (relPos.length2() > SIMD_EPSILON) - { - normal[0] = relPos.normalized(); - } - else - { - normal[0].setValue(btScalar(1.0),0,0); - } - - btPlaneSpace1(normal[0], normal[1], normal[2]); - - for (int i=0;i<3;i++) - { - new (&m_jac[i]) btJacobianEntry( - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - pivotAInW - m_rbA.getCenterOfMassPosition(), - pivotBInW - m_rbB.getCenterOfMassPosition(), - normal[i], - m_rbA.getInvInertiaDiagLocal(), - m_rbA.getInvMass(), - m_rbB.getInvInertiaDiagLocal(), - m_rbB.getInvMass()); - } - } - - btVector3 b1Axis1,b1Axis2,b1Axis3; - btVector3 b2Axis1,b2Axis2; - - b1Axis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(0); - b2Axis1 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(0); - - btScalar swing1=btScalar(0.),swing2 = btScalar(0.); - - // Get Frame into world space - if (m_swingSpan1 >= btScalar(0.05f)) - { - b1Axis2 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(1); - swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); - } - - if (m_swingSpan2 >= btScalar(0.05f)) - { - b1Axis3 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(2); - swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); - } - - btScalar RMaxAngle1Sq = 1.0f / (m_swingSpan1*m_swingSpan1); - btScalar RMaxAngle2Sq = 1.0f / (m_swingSpan2*m_swingSpan2); - btScalar EllipseAngle = btFabs(swing1)* RMaxAngle1Sq + btFabs(swing2) * RMaxAngle2Sq; - - if (EllipseAngle > 1.0f) - { - m_swingCorrection = EllipseAngle-1.0f; - m_solveSwingLimit = true; - - // Calculate necessary axis & factors - m_swingAxis = b2Axis1.cross(b1Axis2* b2Axis1.dot(b1Axis2) + b1Axis3* b2Axis1.dot(b1Axis3)); - m_swingAxis.normalize(); - - btScalar swingAxisSign = (b2Axis1.dot(b1Axis1) >= 0.0f) ? 1.0f : -1.0f; - m_swingAxis *= swingAxisSign; - - m_kSwing = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_swingAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_swingAxis)); - - } - - // Twist limits - if (m_twistSpan >= btScalar(0.)) - { - btVector3 b2Axis2 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(1); - btQuaternion rotationArc = shortestArcQuat(b2Axis1,b1Axis1); - btVector3 TwistRef = quatRotate(rotationArc,b2Axis2); - btScalar twist = btAtan2Fast( TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2) ); - - btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? m_limitSoftness : btScalar(0.); - if (twist <= -m_twistSpan*lockedFreeFactor) - { - m_twistCorrection = -(twist + m_twistSpan); - m_solveTwistLimit = true; - - m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; - m_twistAxis.normalize(); - m_twistAxis *= -1.0f; - - m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); - - } else - if (twist > m_twistSpan*lockedFreeFactor) - { - m_twistCorrection = (twist - m_twistSpan); - m_solveTwistLimit = true; - - m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; - m_twistAxis.normalize(); - - m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + - getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); - - } - } -} - -void btConeTwistConstraint::solveConstraint(btScalar timeStep) -{ - - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - - btScalar tau = btScalar(0.3); - - //linear part - if (!m_angularOnly) - { - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - for (int i=0;i<3;i++) - { - const btVector3& normal = m_jac[i].m_linearJointAxis; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - - btScalar rel_vel; - rel_vel = normal.dot(vel); - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; - m_appliedImpulse += impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); - } - } - - { - ///solve angular part - const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); - const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); - - // solve swing limit - if (m_solveSwingLimit) - { - btScalar amplitude = ((angVelB - angVelA).dot( m_swingAxis )*m_relaxationFactor*m_relaxationFactor + m_swingCorrection*(btScalar(1.)/timeStep)*m_biasFactor); - btScalar impulseMag = amplitude * m_kSwing; - - // Clamp the accumulated impulse - btScalar temp = m_accSwingLimitImpulse; - m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, btScalar(0.0) ); - impulseMag = m_accSwingLimitImpulse - temp; - - btVector3 impulse = m_swingAxis * impulseMag; - - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); - - } - - // solve twist limit - if (m_solveTwistLimit) - { - btScalar amplitude = ((angVelB - angVelA).dot( m_twistAxis )*m_relaxationFactor*m_relaxationFactor + m_twistCorrection*(btScalar(1.)/timeStep)*m_biasFactor ); - btScalar impulseMag = amplitude * m_kTwist; - - // Clamp the accumulated impulse - btScalar temp = m_accTwistLimitImpulse; - m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, btScalar(0.0) ); - impulseMag = m_accTwistLimitImpulse - temp; - - btVector3 impulse = m_twistAxis * impulseMag; - - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); - - } - - } - -} - -void btConeTwistConstraint::updateRHS(btScalar timeStep) -{ - (void)timeStep; - -} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h deleted file mode 100644 index f121919c8f9..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h +++ /dev/null @@ -1,126 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - -Written by: Marcus Hennix -*/ - - - -#ifndef CONETWISTCONSTRAINT_H -#define CONETWISTCONSTRAINT_H - -#include "../../LinearMath/btVector3.h" -#include "btJacobianEntry.h" -#include "btTypedConstraint.h" - -class btRigidBody; - - -///btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc) -class btConeTwistConstraint : public btTypedConstraint -{ -#ifdef IN_PARALLELL_SOLVER -public: -#endif - btJacobianEntry m_jac[3]; //3 orthogonal linear constraints - - btTransform m_rbAFrame; - btTransform m_rbBFrame; - - btScalar m_limitSoftness; - btScalar m_biasFactor; - btScalar m_relaxationFactor; - - btScalar m_swingSpan1; - btScalar m_swingSpan2; - btScalar m_twistSpan; - - btVector3 m_swingAxis; - btVector3 m_twistAxis; - - btScalar m_kSwing; - btScalar m_kTwist; - - btScalar m_twistLimitSign; - btScalar m_swingCorrection; - btScalar m_twistCorrection; - - btScalar m_accSwingLimitImpulse; - btScalar m_accTwistLimitImpulse; - - bool m_angularOnly; - bool m_solveTwistLimit; - bool m_solveSwingLimit; - - -public: - - btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,const btTransform& rbAFrame, const btTransform& rbBFrame); - - btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame); - - btConeTwistConstraint(); - - virtual void buildJacobian(); - - virtual void solveConstraint(btScalar timeStep); - - void updateRHS(btScalar timeStep); - - const btRigidBody& getRigidBodyA() const - { - return m_rbA; - } - const btRigidBody& getRigidBodyB() const - { - return m_rbB; - } - - void setAngularOnly(bool angularOnly) - { - m_angularOnly = angularOnly; - } - - void setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 0.8f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) - { - m_swingSpan1 = _swingSpan1; - m_swingSpan2 = _swingSpan2; - m_twistSpan = _twistSpan; - - m_limitSoftness = _softness; - m_biasFactor = _biasFactor; - m_relaxationFactor = _relaxationFactor; - } - - const btTransform& getAFrame() { return m_rbAFrame; }; - const btTransform& getBFrame() { return m_rbBFrame; }; - - inline int getSolveTwistLimit() - { - return m_solveTwistLimit; - } - - inline int getSolveSwingLimit() - { - return m_solveTwistLimit; - } - - inline btScalar getTwistLimitSign() - { - return m_twistLimitSign; - } - -}; - -#endif //CONETWISTCONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h deleted file mode 100644 index addfb67a839..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONSTRAINT_SOLVER_H -#define CONSTRAINT_SOLVER_H - -#include "LinearMath/btScalar.h" - -class btPersistentManifold; -class btRigidBody; -class btCollisionObject; -class btTypedConstraint; -struct btContactSolverInfo; -struct btBroadphaseProxy; -class btIDebugDraw; -class btStackAlloc; -class btDispatcher; -/// btConstraintSolver provides solver interface -class btConstraintSolver -{ - -public: - - virtual ~btConstraintSolver() {} - - virtual void prepareSolve (int numBodies, int numManifolds) {;} - - ///solve a group of constraints - virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0; - - virtual void allSolved (const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc) {;} - - ///clear internal cached data and reset random seed - virtual void reset() = 0; -}; - - - - -#endif //CONSTRAINT_SOLVER_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp deleted file mode 100644 index 1588428503a..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp +++ /dev/null @@ -1,417 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btContactConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btVector3.h" -#include "btJacobianEntry.h" -#include "btContactSolverInfo.h" -#include "LinearMath/btMinMax.h" -#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h" - -#define ASSERT2 assert - -#define USE_INTERNAL_APPLY_IMPULSE 1 - - -//bilateral constraint between two dynamic objects -void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, - btRigidBody& body2, const btVector3& pos2, - btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep) -{ - (void)timeStep; - (void)distance; - - - btScalar normalLenSqr = normal.length2(); - ASSERT2(btFabs(normalLenSqr) < btScalar(1.1)); - if (normalLenSqr > btScalar(1.1)) - { - impulse = btScalar(0.); - return; - } - btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); - //this jacobian entry could be re-used for all iterations - - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - - btJacobianEntry jac(body1.getCenterOfMassTransform().getBasis().transpose(), - body2.getCenterOfMassTransform().getBasis().transpose(), - rel_pos1,rel_pos2,normal,body1.getInvInertiaDiagLocal(),body1.getInvMass(), - body2.getInvInertiaDiagLocal(),body2.getInvMass()); - - btScalar jacDiagAB = jac.getDiagonal(); - btScalar jacDiagABInv = btScalar(1.) / jacDiagAB; - - btScalar rel_vel = jac.getRelativeVelocity( - body1.getLinearVelocity(), - body1.getCenterOfMassTransform().getBasis().transpose() * body1.getAngularVelocity(), - body2.getLinearVelocity(), - body2.getCenterOfMassTransform().getBasis().transpose() * body2.getAngularVelocity()); - btScalar a; - a=jacDiagABInv; - - - rel_vel = normal.dot(vel); - - //todo: move this into proper structure - btScalar contactDamping = btScalar(0.2); - -#ifdef ONLY_USE_LINEAR_MASS - btScalar massTerm = btScalar(1.) / (body1.getInvMass() + body2.getInvMass()); - impulse = - contactDamping * rel_vel * massTerm; -#else - btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv; - impulse = velocityImpulse; -#endif -} - - - -//response between two dynamic objects with friction -btScalar resolveSingleCollision( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo) -{ - - const btVector3& pos1_ = contactPoint.getPositionWorldOnA(); - const btVector3& pos2_ = contactPoint.getPositionWorldOnB(); - const btVector3& normal = contactPoint.m_normalWorldOnB; - - //constant over all iterations - btVector3 rel_pos1 = pos1_ - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2_ - body2.getCenterOfMassPosition(); - - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = normal.dot(vel); - - btScalar Kfps = btScalar(1.) / solverInfo.m_timeStep ; - - // btScalar damping = solverInfo.m_damping ; - btScalar Kerp = solverInfo.m_erp; - btScalar Kcor = Kerp *Kfps; - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); - btScalar distance = cpd->m_penetration; - btScalar positionalError = Kcor *-distance; - btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; - - btScalar penetrationImpulse = positionalError * cpd->m_jacDiagABInv; - - btScalar velocityImpulse = velocityError * cpd->m_jacDiagABInv; - - btScalar normalImpulse = penetrationImpulse+velocityImpulse; - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = cpd->m_appliedImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - cpd->m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - - normalImpulse = cpd->m_appliedImpulse - oldNormalImpulse; - -#ifdef USE_INTERNAL_APPLY_IMPULSE - if (body1.getInvMass()) - { - body1.internalApplyImpulse(contactPoint.m_normalWorldOnB*body1.getInvMass(),cpd->m_angularComponentA,normalImpulse); - } - if (body2.getInvMass()) - { - body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse); - } -#else //USE_INTERNAL_APPLY_IMPULSE - body1.applyImpulse(normal*(normalImpulse), rel_pos1); - body2.applyImpulse(-normal*(normalImpulse), rel_pos2); -#endif //USE_INTERNAL_APPLY_IMPULSE - - return normalImpulse; -} - - -btScalar resolveSingleFriction( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo) -{ - - (void)solverInfo; - - const btVector3& pos1 = contactPoint.getPositionWorldOnA(); - const btVector3& pos2 = contactPoint.getPositionWorldOnB(); - - btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); - - btScalar combinedFriction = cpd->m_friction; - - btScalar limit = cpd->m_appliedImpulse * combinedFriction; - - if (cpd->m_appliedImpulse>btScalar(0.)) - //friction - { - //apply friction in the 2 tangential directions - - // 1st tangent - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar j1,j2; - - { - - btScalar vrel = cpd->m_frictionWorldTangential0.dot(vel); - - // calculate j that moves us to zero relative velocity - j1 = -vrel * cpd->m_jacDiagABInvTangent0; - btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse0; - cpd->m_accumulatedTangentImpulse0 = oldTangentImpulse + j1; - btSetMin(cpd->m_accumulatedTangentImpulse0, limit); - btSetMax(cpd->m_accumulatedTangentImpulse0, -limit); - j1 = cpd->m_accumulatedTangentImpulse0 - oldTangentImpulse; - - } - { - // 2nd tangent - - btScalar vrel = cpd->m_frictionWorldTangential1.dot(vel); - - // calculate j that moves us to zero relative velocity - j2 = -vrel * cpd->m_jacDiagABInvTangent1; - btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse1; - cpd->m_accumulatedTangentImpulse1 = oldTangentImpulse + j2; - btSetMin(cpd->m_accumulatedTangentImpulse1, limit); - btSetMax(cpd->m_accumulatedTangentImpulse1, -limit); - j2 = cpd->m_accumulatedTangentImpulse1 - oldTangentImpulse; - } - -#ifdef USE_INTERNAL_APPLY_IMPULSE - if (body1.getInvMass()) - { - body1.internalApplyImpulse(cpd->m_frictionWorldTangential0*body1.getInvMass(),cpd->m_frictionAngularComponent0A,j1); - body1.internalApplyImpulse(cpd->m_frictionWorldTangential1*body1.getInvMass(),cpd->m_frictionAngularComponent1A,j2); - } - if (body2.getInvMass()) - { - body2.internalApplyImpulse(cpd->m_frictionWorldTangential0*body2.getInvMass(),cpd->m_frictionAngularComponent0B,-j1); - body2.internalApplyImpulse(cpd->m_frictionWorldTangential1*body2.getInvMass(),cpd->m_frictionAngularComponent1B,-j2); - } -#else //USE_INTERNAL_APPLY_IMPULSE - body1.applyImpulse((j1 * cpd->m_frictionWorldTangential0)+(j2 * cpd->m_frictionWorldTangential1), rel_pos1); - body2.applyImpulse((j1 * -cpd->m_frictionWorldTangential0)+(j2 * -cpd->m_frictionWorldTangential1), rel_pos2); -#endif //USE_INTERNAL_APPLY_IMPULSE - - - } - return cpd->m_appliedImpulse; -} - - -btScalar resolveSingleFrictionOriginal( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo) -{ - - (void)solverInfo; - - const btVector3& pos1 = contactPoint.getPositionWorldOnA(); - const btVector3& pos2 = contactPoint.getPositionWorldOnB(); - - btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); - - btScalar combinedFriction = cpd->m_friction; - - btScalar limit = cpd->m_appliedImpulse * combinedFriction; - //if (contactPoint.m_appliedImpulse>btScalar(0.)) - //friction - { - //apply friction in the 2 tangential directions - - { - // 1st tangent - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar vrel = cpd->m_frictionWorldTangential0.dot(vel); - - // calculate j that moves us to zero relative velocity - btScalar j = -vrel * cpd->m_jacDiagABInvTangent0; - btScalar total = cpd->m_accumulatedTangentImpulse0 + j; - btSetMin(total, limit); - btSetMax(total, -limit); - j = total - cpd->m_accumulatedTangentImpulse0; - cpd->m_accumulatedTangentImpulse0 = total; - body1.applyImpulse(j * cpd->m_frictionWorldTangential0, rel_pos1); - body2.applyImpulse(j * -cpd->m_frictionWorldTangential0, rel_pos2); - } - - - { - // 2nd tangent - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar vrel = cpd->m_frictionWorldTangential1.dot(vel); - - // calculate j that moves us to zero relative velocity - btScalar j = -vrel * cpd->m_jacDiagABInvTangent1; - btScalar total = cpd->m_accumulatedTangentImpulse1 + j; - btSetMin(total, limit); - btSetMax(total, -limit); - j = total - cpd->m_accumulatedTangentImpulse1; - cpd->m_accumulatedTangentImpulse1 = total; - body1.applyImpulse(j * cpd->m_frictionWorldTangential1, rel_pos1); - body2.applyImpulse(j * -cpd->m_frictionWorldTangential1, rel_pos2); - } - } - return cpd->m_appliedImpulse; -} - - -//velocity + friction -//response between two dynamic objects with friction -btScalar resolveSingleCollisionCombined( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo) -{ - - const btVector3& pos1 = contactPoint.getPositionWorldOnA(); - const btVector3& pos2 = contactPoint.getPositionWorldOnB(); - const btVector3& normal = contactPoint.m_normalWorldOnB; - - btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); - - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = normal.dot(vel); - - btScalar Kfps = btScalar(1.) / solverInfo.m_timeStep ; - - //btScalar damping = solverInfo.m_damping ; - btScalar Kerp = solverInfo.m_erp; - btScalar Kcor = Kerp *Kfps; - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; - assert(cpd); - btScalar distance = cpd->m_penetration; - btScalar positionalError = Kcor *-distance; - btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; - - btScalar penetrationImpulse = positionalError * cpd->m_jacDiagABInv; - - btScalar velocityImpulse = velocityError * cpd->m_jacDiagABInv; - - btScalar normalImpulse = penetrationImpulse+velocityImpulse; - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = cpd->m_appliedImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - cpd->m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - - normalImpulse = cpd->m_appliedImpulse - oldNormalImpulse; - - -#ifdef USE_INTERNAL_APPLY_IMPULSE - if (body1.getInvMass()) - { - body1.internalApplyImpulse(contactPoint.m_normalWorldOnB*body1.getInvMass(),cpd->m_angularComponentA,normalImpulse); - } - if (body2.getInvMass()) - { - body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse); - } -#else //USE_INTERNAL_APPLY_IMPULSE - body1.applyImpulse(normal*(normalImpulse), rel_pos1); - body2.applyImpulse(-normal*(normalImpulse), rel_pos2); -#endif //USE_INTERNAL_APPLY_IMPULSE - - { - //friction - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - rel_vel = normal.dot(vel); - - - btVector3 lat_vel = vel - normal * rel_vel; - btScalar lat_rel_vel = lat_vel.length(); - - btScalar combinedFriction = cpd->m_friction; - - if (cpd->m_appliedImpulse > 0) - if (lat_rel_vel > SIMD_EPSILON) - { - lat_vel /= lat_rel_vel; - btVector3 temp1 = body1.getInvInertiaTensorWorld() * rel_pos1.cross(lat_vel); - btVector3 temp2 = body2.getInvInertiaTensorWorld() * rel_pos2.cross(lat_vel); - btScalar friction_impulse = lat_rel_vel / - (body1.getInvMass() + body2.getInvMass() + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); - btScalar normal_impulse = cpd->m_appliedImpulse * combinedFriction; - - btSetMin(friction_impulse, normal_impulse); - btSetMax(friction_impulse, -normal_impulse); - body1.applyImpulse(lat_vel * -friction_impulse, rel_pos1); - body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); - } - } - - - - return normalImpulse; -} - -btScalar resolveSingleFrictionEmpty( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo) -{ - (void)contactPoint; - (void)body1; - (void)body2; - (void)solverInfo; - - - return btScalar(0.); -}; - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h deleted file mode 100644 index 826e79f78bd..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONTACT_CONSTRAINT_H -#define CONTACT_CONSTRAINT_H - -//todo: make into a proper class working with the iterative constraint solver - -class btRigidBody; -#include "LinearMath/btVector3.h" -#include "LinearMath/btScalar.h" -struct btContactSolverInfo; -class btManifoldPoint; - -enum { - DEFAULT_CONTACT_SOLVER_TYPE=0, - CONTACT_SOLVER_TYPE1, - CONTACT_SOLVER_TYPE2, - USER_CONTACT_SOLVER_TYPE1, - MAX_CONTACT_SOLVER_TYPES -}; - - -typedef btScalar (*ContactSolverFunc)(btRigidBody& body1, - btRigidBody& body2, - class btManifoldPoint& contactPoint, - const btContactSolverInfo& info); - -///stores some extra information to each contact point. It is not in the contact point, because that want to keep the collision detection independent from the constraint solver. -struct btConstraintPersistentData -{ - inline btConstraintPersistentData() - :m_appliedImpulse(btScalar(0.)), - m_prevAppliedImpulse(btScalar(0.)), - m_accumulatedTangentImpulse0(btScalar(0.)), - m_accumulatedTangentImpulse1(btScalar(0.)), - m_jacDiagABInv(btScalar(0.)), - m_persistentLifeTime(0), - m_restitution(btScalar(0.)), - m_friction(btScalar(0.)), - m_penetration(btScalar(0.)), - m_contactSolverFunc(0), - m_frictionSolverFunc(0) - { - } - - - /// total applied impulse during most recent frame - btScalar m_appliedImpulse; - btScalar m_prevAppliedImpulse; - btScalar m_accumulatedTangentImpulse0; - btScalar m_accumulatedTangentImpulse1; - - btScalar m_jacDiagABInv; - btScalar m_jacDiagABInvTangent0; - btScalar m_jacDiagABInvTangent1; - int m_persistentLifeTime; - btScalar m_restitution; - btScalar m_friction; - btScalar m_penetration; - btVector3 m_frictionWorldTangential0; - btVector3 m_frictionWorldTangential1; - - btVector3 m_frictionAngularComponent0A; - btVector3 m_frictionAngularComponent0B; - btVector3 m_frictionAngularComponent1A; - btVector3 m_frictionAngularComponent1B; - - //some data doesn't need to be persistent over frames: todo: clean/reuse this - btVector3 m_angularComponentA; - btVector3 m_angularComponentB; - - ContactSolverFunc m_contactSolverFunc; - ContactSolverFunc m_frictionSolverFunc; - -}; - -///bilateral constraint between two dynamic objects -///positive distance = separation, negative distance = penetration -void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, - btRigidBody& body2, const btVector3& pos2, - btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep); - - -///contact constraint resolution: -///calculate and apply impulse to satisfy non-penetration and non-negative relative velocity constraint -///positive distance = separation, negative distance = penetration -btScalar resolveSingleCollision( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& info); - -btScalar resolveSingleFriction( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo - ); - - - -btScalar resolveSingleCollisionCombined( - btRigidBody& body1, - btRigidBody& body2, - btManifoldPoint& contactPoint, - const btContactSolverInfo& solverInfo - ); - -#endif //CONTACT_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h deleted file mode 100644 index ad2c40e2107..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef CONTACT_SOLVER_INFO -#define CONTACT_SOLVER_INFO - -struct btContactSolverInfoData -{ - btScalar m_tau; - btScalar m_damping; - btScalar m_friction; - btScalar m_timeStep; - btScalar m_restitution; - int m_numIterations; - btScalar m_maxErrorReduction; - btScalar m_sor; - btScalar m_erp; - -}; - -struct btContactSolverInfo : public btContactSolverInfoData -{ - - inline btContactSolverInfo() - { - m_tau = btScalar(0.6); - m_damping = btScalar(1.0); - m_friction = btScalar(0.3); - m_restitution = btScalar(0.); - m_maxErrorReduction = btScalar(20.); - m_numIterations = 10; - m_erp = btScalar(0.4); - m_sor = btScalar(1.3); - } - - -}; - -#endif //CONTACT_SOLVER_INFO diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp deleted file mode 100644 index 96d48f9f7dd..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp +++ /dev/null @@ -1,497 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -/* -2007-09-09 -Refactored by Francisco León -email: projectileman@yahoo.com -http://gimpact.sf.net -*/ - - -#include "btGeneric6DofConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btTransformUtil.h" -#include - - -static const btScalar kSign[] = { btScalar(1.0), btScalar(-1.0), btScalar(1.0) }; -static const int kAxisA[] = { 1, 0, 0 }; -static const int kAxisB[] = { 2, 2, 1 }; -#define GENERIC_D6_DISABLE_WARMSTARTING 1 - -btScalar btGetMatrixElem(const btMatrix3x3& mat, int index) -{ - int i = index%3; - int j = index/3; - return mat[i][j]; -} - -///MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html -bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz) -{ -// // rot = cy*cz -cy*sz sy -// // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx -// // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy -// - - if (btGetMatrixElem(mat,2) < btScalar(1.0)) - { - if (btGetMatrixElem(mat,2) > btScalar(-1.0)) - { - xyz[0] = btAtan2(-btGetMatrixElem(mat,5),btGetMatrixElem(mat,8)); - xyz[1] = btAsin(btGetMatrixElem(mat,2)); - xyz[2] = btAtan2(-btGetMatrixElem(mat,1),btGetMatrixElem(mat,0)); - return true; - } - else - { - // WARNING. Not unique. XA - ZA = -atan2(r10,r11) - xyz[0] = -btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); - xyz[1] = -SIMD_HALF_PI; - xyz[2] = btScalar(0.0); - return false; - } - } - else - { - // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) - xyz[0] = btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4)); - xyz[1] = SIMD_HALF_PI; - xyz[2] = 0.0; - - } - - - return false; -} - - - -//////////////////////////// btRotationalLimitMotor //////////////////////////////////// - - -int btRotationalLimitMotor::testLimitValue(btScalar test_value) -{ - if(m_loLimit>m_hiLimit) - { - m_currentLimit = 0;//Free from violation - return 0; - } - - if (test_value < m_loLimit) - { - m_currentLimit = 1;//low limit violation - m_currentLimitError = test_value - m_loLimit; - return 1; - } - else if (test_value> m_hiLimit) - { - m_currentLimit = 2;//High limit violation - m_currentLimitError = test_value - m_hiLimit; - return 2; - } - else - { - m_currentLimit = 0;//Free from violation - return 0; - } - return 0; -} - - -btScalar btRotationalLimitMotor::solveAngularLimits( - btScalar timeStep,btVector3& axis,btScalar jacDiagABInv, - btRigidBody * body0, btRigidBody * body1) -{ - if (needApplyTorques()==false) return 0.0f; - - btScalar target_velocity = m_targetVelocity; - btScalar maxMotorForce = m_maxMotorForce; - - //current error correction - if (m_currentLimit!=0) - { - target_velocity = -m_ERP*m_currentLimitError/(timeStep); - maxMotorForce = m_maxLimitForce; - } - - maxMotorForce *= timeStep; - - // current velocity difference - btVector3 vel_diff = body0->getAngularVelocity(); - if (body1) - { - vel_diff -= body1->getAngularVelocity(); - } - - - - btScalar rel_vel = axis.dot(vel_diff); - - // correction velocity - btScalar motor_relvel = m_limitSoftness*(target_velocity - m_damping*rel_vel); - - - if ( motor_relvel < SIMD_EPSILON && motor_relvel > -SIMD_EPSILON ) - { - return 0.0f;//no need for applying force - } - - - // correction impulse - btScalar unclippedMotorImpulse = (1+m_bounce)*motor_relvel*jacDiagABInv; - - // clip correction impulse - btScalar clippedMotorImpulse; - - //todo: should clip against accumulated impulse - if (unclippedMotorImpulse>0.0f) - { - clippedMotorImpulse = unclippedMotorImpulse > maxMotorForce? maxMotorForce: unclippedMotorImpulse; - } - else - { - clippedMotorImpulse = unclippedMotorImpulse < -maxMotorForce ? -maxMotorForce: unclippedMotorImpulse; - } - - - // sort with accumulated impulses - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); - - btScalar oldaccumImpulse = m_accumulatedImpulse; - btScalar sum = oldaccumImpulse + clippedMotorImpulse; - m_accumulatedImpulse = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - - clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse; - - - - btVector3 motorImp = clippedMotorImpulse * axis; - - - body0->applyTorqueImpulse(motorImp); - if (body1) body1->applyTorqueImpulse(-motorImp); - - return clippedMotorImpulse; - - -} - -//////////////////////////// End btRotationalLimitMotor //////////////////////////////////// - -//////////////////////////// btTranslationalLimitMotor //////////////////////////////////// -btScalar btTranslationalLimitMotor::solveLinearAxis( - btScalar timeStep, - btScalar jacDiagABInv, - btRigidBody& body1,const btVector3 &pointInA, - btRigidBody& body2,const btVector3 &pointInB, - int limit_index, - const btVector3 & axis_normal_on_a) -{ - -///find relative velocity - btVector3 rel_pos1 = pointInA - body1.getCenterOfMassPosition(); - btVector3 rel_pos2 = pointInB - body2.getCenterOfMassPosition(); - - btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar rel_vel = axis_normal_on_a.dot(vel); - - - -/// apply displacement correction - -//positional error (zeroth order error) - btScalar depth = -(pointInA - pointInB).dot(axis_normal_on_a); - btScalar lo = btScalar(-1e30); - btScalar hi = btScalar(1e30); - - btScalar minLimit = m_lowerLimit[limit_index]; - btScalar maxLimit = m_upperLimit[limit_index]; - - //handle the limits - if (minLimit < maxLimit) - { - { - if (depth > maxLimit) - { - depth -= maxLimit; - lo = btScalar(0.); - - } - else - { - if (depth < minLimit) - { - depth -= minLimit; - hi = btScalar(0.); - } - else - { - return 0.0f; - } - } - } - } - - btScalar normalImpulse= m_limitSoftness*(m_restitution*depth/timeStep - m_damping*rel_vel) * jacDiagABInv; - - - - - btScalar oldNormalImpulse = m_accumulatedImpulse[limit_index]; - btScalar sum = oldNormalImpulse + normalImpulse; - m_accumulatedImpulse[limit_index] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; - normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse; - - btVector3 impulse_vector = axis_normal_on_a * normalImpulse; - body1.applyImpulse( impulse_vector, rel_pos1); - body2.applyImpulse(-impulse_vector, rel_pos2); - return normalImpulse; -} - -//////////////////////////// btTranslationalLimitMotor //////////////////////////////////// - - -btGeneric6DofConstraint::btGeneric6DofConstraint() - :btTypedConstraint(D6_CONSTRAINT_TYPE), - m_useLinearReferenceFrameA(true) -{ -} - -btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA) - : btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB) - , m_frameInA(frameInA) - , m_frameInB(frameInB), - m_useLinearReferenceFrameA(useLinearReferenceFrameA) -{ - -} - - - - - -void btGeneric6DofConstraint::calculateAngleInfo() -{ - btMatrix3x3 relative_frame = m_calculatedTransformA.getBasis().inverse()*m_calculatedTransformB.getBasis(); - - matrixToEulerXYZ(relative_frame,m_calculatedAxisAngleDiff); - - - - // in euler angle mode we do not actually constrain the angular velocity - // along the axes axis[0] and axis[2] (although we do use axis[1]) : - // - // to get constrain w2-w1 along ...not - // ------ --------------------- ------ - // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0] - // d(angle[1])/dt = 0 ax[1] - // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2] - // - // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0. - // to prove the result for angle[0], write the expression for angle[0] from - // GetInfo1 then take the derivative. to prove this for angle[2] it is - // easier to take the euler rate expression for d(angle[2])/dt with respect - // to the components of w and set that to 0. - - btVector3 axis0 = m_calculatedTransformB.getBasis().getColumn(0); - btVector3 axis2 = m_calculatedTransformA.getBasis().getColumn(2); - - m_calculatedAxis[1] = axis2.cross(axis0); - m_calculatedAxis[0] = m_calculatedAxis[1].cross(axis2); - m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]); - - -// if(m_debugDrawer) -// { -// -// char buff[300]; -// sprintf(buff,"\n X: %.2f ; Y: %.2f ; Z: %.2f ", -// m_calculatedAxisAngleDiff[0], -// m_calculatedAxisAngleDiff[1], -// m_calculatedAxisAngleDiff[2]); -// m_debugDrawer->reportErrorWarning(buff); -// } - -} - -void btGeneric6DofConstraint::calculateTransforms() -{ - m_calculatedTransformA = m_rbA.getCenterOfMassTransform() * m_frameInA; - m_calculatedTransformB = m_rbB.getCenterOfMassTransform() * m_frameInB; - - calculateAngleInfo(); -} - - -void btGeneric6DofConstraint::buildLinearJacobian( - btJacobianEntry & jacLinear,const btVector3 & normalWorld, - const btVector3 & pivotAInW,const btVector3 & pivotBInW) -{ - new (&jacLinear) btJacobianEntry( - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - pivotAInW - m_rbA.getCenterOfMassPosition(), - pivotBInW - m_rbB.getCenterOfMassPosition(), - normalWorld, - m_rbA.getInvInertiaDiagLocal(), - m_rbA.getInvMass(), - m_rbB.getInvInertiaDiagLocal(), - m_rbB.getInvMass()); - -} - -void btGeneric6DofConstraint::buildAngularJacobian( - btJacobianEntry & jacAngular,const btVector3 & jointAxisW) -{ - new (&jacAngular) btJacobianEntry(jointAxisW, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); - -} - -bool btGeneric6DofConstraint::testAngularLimitMotor(int axis_index) -{ - btScalar angle = m_calculatedAxisAngleDiff[axis_index]; - - //test limits - m_angularLimits[axis_index].testLimitValue(angle); - return m_angularLimits[axis_index].needApplyTorques(); -} - -void btGeneric6DofConstraint::buildJacobian() -{ - //calculates transform - calculateTransforms(); - - const btVector3& pivotAInW = m_calculatedTransformA.getOrigin(); - const btVector3& pivotBInW = m_calculatedTransformB.getOrigin(); - - - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 normalWorld; - int i; - //linear part - for (i=0;i<3;i++) - { - if (m_linearLimits.isLimited(i)) - { - if (m_useLinearReferenceFrameA) - normalWorld = m_calculatedTransformA.getBasis().getColumn(i); - else - normalWorld = m_calculatedTransformB.getBasis().getColumn(i); - - buildLinearJacobian( - m_jacLinear[i],normalWorld , - pivotAInW,pivotBInW); - - } - } - - // angular part - for (i=0;i<3;i++) - { - //calculates error angle - if (testAngularLimitMotor(i)) - { - normalWorld = this->getAxis(i); - // Create angular atom - buildAngularJacobian(m_jacAng[i],normalWorld); - } - } - - -} - - -void btGeneric6DofConstraint::solveConstraint(btScalar timeStep) -{ - m_timeStep = timeStep; - - //calculateTransforms(); - - int i; - - // linear - - btVector3 pointInA = m_calculatedTransformA.getOrigin(); - btVector3 pointInB = m_calculatedTransformB.getOrigin(); - - btScalar jacDiagABInv; - btVector3 linear_axis; - for (i=0;i<3;i++) - { - if (m_linearLimits.isLimited(i)) - { - jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); - - if (m_useLinearReferenceFrameA) - linear_axis = m_calculatedTransformA.getBasis().getColumn(i); - else - linear_axis = m_calculatedTransformB.getBasis().getColumn(i); - - m_linearLimits.solveLinearAxis( - m_timeStep, - jacDiagABInv, - m_rbA,pointInA, - m_rbB,pointInB, - i,linear_axis); - - } - } - - // angular - btVector3 angular_axis; - btScalar angularJacDiagABInv; - for (i=0;i<3;i++) - { - if (m_angularLimits[i].needApplyTorques()) - { - - // get axis - angular_axis = getAxis(i); - - angularJacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); - - m_angularLimits[i].solveAngularLimits(m_timeStep,angular_axis,angularJacDiagABInv, &m_rbA,&m_rbB); - } - } -} - -void btGeneric6DofConstraint::updateRHS(btScalar timeStep) -{ - (void)timeStep; - -} - -btVector3 btGeneric6DofConstraint::getAxis(int axis_index) const -{ - return m_calculatedAxis[axis_index]; -} - -btScalar btGeneric6DofConstraint::getAngle(int axis_index) const -{ - return m_calculatedAxisAngleDiff[axis_index]; -} - - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h deleted file mode 100644 index e4683b91b9e..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h +++ /dev/null @@ -1,433 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ -/* -2007-09-09 -btGeneric6DofConstraint Refactored by Francisco León -email: projectileman@yahoo.com -http://gimpact.sf.net -*/ - - -#ifndef GENERIC_6DOF_CONSTRAINT_H -#define GENERIC_6DOF_CONSTRAINT_H - -#include "LinearMath/btVector3.h" -#include "btJacobianEntry.h" -#include "btTypedConstraint.h" - -class btRigidBody; - - -//! Rotation Limit structure for generic joints -class btRotationalLimitMotor -{ -public: - //! limit_parameters - //!@{ - btScalar m_loLimit;//!< joint limit - btScalar m_hiLimit;//!< joint limit - btScalar m_targetVelocity;//!< target motor velocity - btScalar m_maxMotorForce;//!< max force on motor - btScalar m_maxLimitForce;//!< max force on limit - btScalar m_damping;//!< Damping. - btScalar m_limitSoftness;//! Relaxation factor - btScalar m_ERP;//!< Error tolerance factor when joint is at limit - btScalar m_bounce;//!< restitution factor - bool m_enableMotor; - - //!@} - - //! temp_variables - //!@{ - btScalar m_currentLimitError;//! How much is violated this limit - int m_currentLimit;//!< 0=free, 1=at lo limit, 2=at hi limit - btScalar m_accumulatedImpulse; - //!@} - - btRotationalLimitMotor() - { - m_accumulatedImpulse = 0.f; - m_targetVelocity = 0; - m_maxMotorForce = 0.1f; - m_maxLimitForce = 300.0f; - m_loLimit = -SIMD_INFINITY; - m_hiLimit = SIMD_INFINITY; - m_ERP = 0.5f; - m_bounce = 0.0f; - m_damping = 1.0f; - m_limitSoftness = 0.5f; - m_currentLimit = 0; - m_currentLimitError = 0; - m_enableMotor = false; - } - - btRotationalLimitMotor(const btRotationalLimitMotor & limot) - { - m_targetVelocity = limot.m_targetVelocity; - m_maxMotorForce = limot.m_maxMotorForce; - m_limitSoftness = limot.m_limitSoftness; - m_loLimit = limot.m_loLimit; - m_hiLimit = limot.m_hiLimit; - m_ERP = limot.m_ERP; - m_bounce = limot.m_bounce; - m_currentLimit = limot.m_currentLimit; - m_currentLimitError = limot.m_currentLimitError; - m_enableMotor = limot.m_enableMotor; - } - - - - //! Is limited - bool isLimited() - { - if(m_loLimit>=m_hiLimit) return false; - return true; - } - - //! Need apply correction - bool needApplyTorques() - { - if(m_currentLimit == 0 && m_enableMotor == false) return false; - return true; - } - - //! calculates error - /*! - calculates m_currentLimit and m_currentLimitError. - */ - int testLimitValue(btScalar test_value); - - //! apply the correction impulses for two bodies - btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btRigidBody * body1); - - -}; - - - -class btTranslationalLimitMotor -{ -public: - btVector3 m_lowerLimit;//!< the constraint lower limits - btVector3 m_upperLimit;//!< the constraint upper limits - btVector3 m_accumulatedImpulse; - //! Linear_Limit_parameters - //!@{ - btScalar m_limitSoftness;//!< Softness for linear limit - btScalar m_damping;//!< Damping for linear limit - btScalar m_restitution;//! Bounce parameter for linear limit - //!@} - - btTranslationalLimitMotor() - { - m_lowerLimit.setValue(0.f,0.f,0.f); - m_upperLimit.setValue(0.f,0.f,0.f); - m_accumulatedImpulse.setValue(0.f,0.f,0.f); - - m_limitSoftness = 0.7f; - m_damping = btScalar(1.0f); - m_restitution = btScalar(0.5f); - } - - btTranslationalLimitMotor(const btTranslationalLimitMotor & other ) - { - m_lowerLimit = other.m_lowerLimit; - m_upperLimit = other.m_upperLimit; - m_accumulatedImpulse = other.m_accumulatedImpulse; - - m_limitSoftness = other.m_limitSoftness ; - m_damping = other.m_damping; - m_restitution = other.m_restitution; - } - - //! Test limit - /*! - - free means upper < lower, - - locked means upper == lower - - limited means upper > lower - - limitIndex: first 3 are linear, next 3 are angular - */ - inline bool isLimited(int limitIndex) - { - return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); - } - - - btScalar solveLinearAxis( - btScalar timeStep, - btScalar jacDiagABInv, - btRigidBody& body1,const btVector3 &pointInA, - btRigidBody& body2,const btVector3 &pointInB, - int limit_index, - const btVector3 & axis_normal_on_a); - - -}; - -/// btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space -/*! -btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked'. -currently this limit supports rotational motors
-
    -
  • For Linear limits, use btGeneric6DofConstraint.setLinearUpperLimit, btGeneric6DofConstraint.setLinearLowerLimit. You can set the parameters with the btTranslationalLimitMotor structure accsesible through the btGeneric6DofConstraint.getTranslationalLimitMotor method. -At this moment translational motors are not supported. May be in the future.
  • - -
  • For Angular limits, use the btRotationalLimitMotor structure for configuring the limit. -This is accessible through btGeneric6DofConstraint.getLimitMotor method, -This brings support for limit parameters and motors.
  • - -
  • Angulars limits have these possible ranges: - -AXIS - - - - - - - - - - - - -
    MIN ANGLEMAX ANGLEX-PIPIY-PI/2PI/2Z-PI/2PI/2
    -
  • -
- -*/ -class btGeneric6DofConstraint : public btTypedConstraint -{ -protected: - - //! relative_frames - //!@{ - btTransform m_frameInA;//!< the constraint space w.r.t body A - btTransform m_frameInB;//!< the constraint space w.r.t body B - //!@} - - //! Jacobians - //!@{ - btJacobianEntry m_jacLinear[3];//!< 3 orthogonal linear constraints - btJacobianEntry m_jacAng[3];//!< 3 orthogonal angular constraints - //!@} - - //! Linear_Limit_parameters - //!@{ - btTranslationalLimitMotor m_linearLimits; - //!@} - - - //! hinge_parameters - //!@{ - btRotationalLimitMotor m_angularLimits[3]; - //!@} - - -protected: - //! temporal variables - //!@{ - btScalar m_timeStep; - btTransform m_calculatedTransformA; - btTransform m_calculatedTransformB; - btVector3 m_calculatedAxisAngleDiff; - btVector3 m_calculatedAxis[3]; - - bool m_useLinearReferenceFrameA; - - //!@} - - btGeneric6DofConstraint& operator=(btGeneric6DofConstraint& other) - { - btAssert(0); - (void) other; - return *this; - } - - - - void buildLinearJacobian( - btJacobianEntry & jacLinear,const btVector3 & normalWorld, - const btVector3 & pivotAInW,const btVector3 & pivotBInW); - - void buildAngularJacobian(btJacobianEntry & jacAngular,const btVector3 & jointAxisW); - - - //! calcs the euler angles between the two bodies. - void calculateAngleInfo(); - - - -public: - btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA); - - btGeneric6DofConstraint(); - - //! Calcs global transform of the offsets - /*! - Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies. - \sa btGeneric6DofConstraint.getCalculatedTransformA , btGeneric6DofConstraint.getCalculatedTransformB, btGeneric6DofConstraint.calculateAngleInfo - */ - void calculateTransforms(); - - //! Gets the global transform of the offset for body A - /*! - \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo. - */ - const btTransform & getCalculatedTransformA() const - { - return m_calculatedTransformA; - } - - //! Gets the global transform of the offset for body B - /*! - \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo. - */ - const btTransform & getCalculatedTransformB() const - { - return m_calculatedTransformB; - } - - const btTransform & getFrameOffsetA() const - { - return m_frameInA; - } - - const btTransform & getFrameOffsetB() const - { - return m_frameInB; - } - - - btTransform & getFrameOffsetA() - { - return m_frameInA; - } - - btTransform & getFrameOffsetB() - { - return m_frameInB; - } - - - //! performs Jacobian calculation, and also calculates angle differences and axis - virtual void buildJacobian(); - - virtual void solveConstraint(btScalar timeStep); - - void updateRHS(btScalar timeStep); - - //! Get the rotation axis in global coordinates - /*! - \pre btGeneric6DofConstraint.buildJacobian must be called previously. - */ - btVector3 getAxis(int axis_index) const; - - //! Get the relative Euler angle - /*! - \pre btGeneric6DofConstraint.buildJacobian must be called previously. - */ - btScalar getAngle(int axis_index) const; - - //! Test angular limit. - /*! - Calculates angular correction and returns true if limit needs to be corrected. - \pre btGeneric6DofConstraint.buildJacobian must be called previously. - */ - bool testAngularLimitMotor(int axis_index); - - void setLinearLowerLimit(const btVector3& linearLower) - { - m_linearLimits.m_lowerLimit = linearLower; - } - - void setLinearUpperLimit(const btVector3& linearUpper) - { - m_linearLimits.m_upperLimit = linearUpper; - } - - void setAngularLowerLimit(const btVector3& angularLower) - { - m_angularLimits[0].m_loLimit = angularLower.getX(); - m_angularLimits[1].m_loLimit = angularLower.getY(); - m_angularLimits[2].m_loLimit = angularLower.getZ(); - } - - void setAngularUpperLimit(const btVector3& angularUpper) - { - m_angularLimits[0].m_hiLimit = angularUpper.getX(); - m_angularLimits[1].m_hiLimit = angularUpper.getY(); - m_angularLimits[2].m_hiLimit = angularUpper.getZ(); - } - - //! Retrieves the angular limit informacion - btRotationalLimitMotor * getRotationalLimitMotor(int index) - { - return &m_angularLimits[index]; - } - - //! Retrieves the limit informacion - btTranslationalLimitMotor * getTranslationalLimitMotor() - { - return &m_linearLimits; - } - - //first 3 are linear, next 3 are angular - void setLimit(int axis, btScalar lo, btScalar hi) - { - if(axis<3) - { - m_linearLimits.m_lowerLimit[axis] = lo; - m_linearLimits.m_upperLimit[axis] = hi; - } - else - { - m_angularLimits[axis-3].m_loLimit = lo; - m_angularLimits[axis-3].m_hiLimit = hi; - } - } - - //! Test limit - /*! - - free means upper < lower, - - locked means upper == lower - - limited means upper > lower - - limitIndex: first 3 are linear, next 3 are angular - */ - bool isLimited(int limitIndex) - { - if(limitIndex<3) - { - return m_linearLimits.isLimited(limitIndex); - - } - return m_angularLimits[limitIndex-3].isLimited(); - } - - const btRigidBody& getRigidBodyA() const - { - return m_rbA; - } - const btRigidBody& getRigidBodyB() const - { - return m_rbB; - } - - -}; - -#endif //GENERIC_6DOF_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp deleted file mode 100644 index f71698fa6ee..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btHingeConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btTransformUtil.h" -#include "LinearMath/btMinMax.h" -#include - - -btHingeConstraint::btHingeConstraint() -: btTypedConstraint (HINGE_CONSTRAINT_TYPE), -m_enableAngularMotor(false) -{ -} - -btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, - btVector3& axisInA,btVector3& axisInB) - :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB), - m_angularOnly(false), - m_enableAngularMotor(false) -{ - m_rbAFrame.getOrigin() = pivotInA; - - // since no frame is given, assume this to be zero angle and just pick rb transform axis - btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0); - btScalar projection = rbAxisA1.dot(axisInA); - if (projection > SIMD_EPSILON) - rbAxisA1 = rbAxisA1*projection - axisInA; - else - rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1); - - btVector3 rbAxisA2 = rbAxisA1.cross(axisInA); - - m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(), - rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), - rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); - - btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); - btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); - btVector3 rbAxisB2 = rbAxisB1.cross(axisInB); - - - m_rbBFrame.getOrigin() = pivotInB; - m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),-axisInB.getX(), - rbAxisB1.getY(),rbAxisB2.getY(),-axisInB.getY(), - rbAxisB1.getZ(),rbAxisB2.getZ(),-axisInB.getZ() ); - - //start with free - m_lowerLimit = btScalar(1e30); - m_upperLimit = btScalar(-1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - m_limitSoftness = 0.9f; - m_solveLimit = false; - -} - - -btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA) -:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA), m_angularOnly(false), m_enableAngularMotor(false) -{ - - // since no frame is given, assume this to be zero angle and just pick rb transform axis - // fixed axis in worldspace - btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0); - btScalar projection = rbAxisA1.dot(axisInA); - if (projection > SIMD_EPSILON) - rbAxisA1 = rbAxisA1*projection - axisInA; - else - rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1); - - btVector3 rbAxisA2 = axisInA.cross(rbAxisA1); - - m_rbAFrame.getOrigin() = pivotInA; - m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(), - rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(), - rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() ); - - - btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * -axisInA; - - btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB); - btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1); - btVector3 rbAxisB2 = axisInB.cross(rbAxisB1); - - - m_rbBFrame.getOrigin() = rbA.getCenterOfMassTransform()(pivotInA); - m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(), - rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(), - rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() ); - - //start with free - m_lowerLimit = btScalar(1e30); - m_upperLimit = btScalar(-1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - m_limitSoftness = 0.9f; - m_solveLimit = false; -} - -btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, - const btTransform& rbAFrame, const btTransform& rbBFrame) -:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), -m_angularOnly(false), -m_enableAngularMotor(false) -{ - // flip axis - m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); - - //start with free - m_lowerLimit = btScalar(1e30); - m_upperLimit = btScalar(-1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - m_limitSoftness = 0.9f; - m_solveLimit = false; -} - - - -btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame) -:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame), -m_angularOnly(false), -m_enableAngularMotor(false) -{ - ///not providing rigidbody B means implicitly using worldspace for body B - - // flip axis - m_rbBFrame.getBasis()[0][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); - m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); - - m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(m_rbAFrame.getOrigin()); - - //start with free - m_lowerLimit = btScalar(1e30); - m_upperLimit = btScalar(-1e30); - m_biasFactor = 0.3f; - m_relaxationFactor = 1.0f; - m_limitSoftness = 0.9f; - m_solveLimit = false; -} - -void btHingeConstraint::buildJacobian() -{ - m_appliedImpulse = btScalar(0.); - - if (!m_angularOnly) - { - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - btVector3 relPos = pivotBInW - pivotAInW; - - btVector3 normal[3]; - if (relPos.length2() > SIMD_EPSILON) - { - normal[0] = relPos.normalized(); - } - else - { - normal[0].setValue(btScalar(1.0),0,0); - } - - btPlaneSpace1(normal[0], normal[1], normal[2]); - - for (int i=0;i<3;i++) - { - new (&m_jac[i]) btJacobianEntry( - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - pivotAInW - m_rbA.getCenterOfMassPosition(), - pivotBInW - m_rbB.getCenterOfMassPosition(), - normal[i], - m_rbA.getInvInertiaDiagLocal(), - m_rbA.getInvMass(), - m_rbB.getInvInertiaDiagLocal(), - m_rbB.getInvMass()); - } - } - - //calculate two perpendicular jointAxis, orthogonal to hingeAxis - //these two jointAxis require equal angular velocities for both bodies - - //this is unused for now, it's a todo - btVector3 jointAxis0local; - btVector3 jointAxis1local; - - btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local); - - getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local; - btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local; - btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - - new (&m_jacAng[0]) btJacobianEntry(jointAxis0, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); - - new (&m_jacAng[1]) btJacobianEntry(jointAxis1, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); - - new (&m_jacAng[2]) btJacobianEntry(hingeAxisWorld, - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getInvInertiaDiagLocal(), - m_rbB.getInvInertiaDiagLocal()); - - - // Compute limit information - btScalar hingeAngle = getHingeAngle(); - - //set bias, sign, clear accumulator - m_correction = btScalar(0.); - m_limitSign = btScalar(0.); - m_solveLimit = false; - m_accLimitImpulse = btScalar(0.); - - if (m_lowerLimit < m_upperLimit) - { - if (hingeAngle <= m_lowerLimit*m_limitSoftness) - { - m_correction = (m_lowerLimit - hingeAngle); - m_limitSign = 1.0f; - m_solveLimit = true; - } - else if (hingeAngle >= m_upperLimit*m_limitSoftness) - { - m_correction = m_upperLimit - hingeAngle; - m_limitSign = -1.0f; - m_solveLimit = true; - } - } - - //Compute K = J*W*J' for hinge axis - btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - m_kHinge = 1.0f / (getRigidBodyA().computeAngularImpulseDenominator(axisA) + - getRigidBodyB().computeAngularImpulseDenominator(axisA)); - -} - -void btHingeConstraint::solveConstraint(btScalar timeStep) -{ - - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); - - btScalar tau = btScalar(0.3); - - //linear part - if (!m_angularOnly) - { - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - for (int i=0;i<3;i++) - { - const btVector3& normal = m_jac[i].m_linearJointAxis; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - - btScalar rel_vel; - rel_vel = normal.dot(vel); - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; - m_appliedImpulse += impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); - } - } - - - { - ///solve angular part - - // get axes in world space - btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2); - btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(2); - - const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); - const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); - - btVector3 angVelAroundHingeAxisA = axisA * axisA.dot(angVelA); - btVector3 angVelAroundHingeAxisB = axisB * axisB.dot(angVelB); - - btVector3 angAorthog = angVelA - angVelAroundHingeAxisA; - btVector3 angBorthog = angVelB - angVelAroundHingeAxisB; - btVector3 velrelOrthog = angAorthog-angBorthog; - { - //solve orthogonal angular velocity correction - btScalar relaxation = btScalar(1.); - btScalar len = velrelOrthog.length(); - if (len > btScalar(0.00001)) - { - btVector3 normal = velrelOrthog.normalized(); - btScalar denom = getRigidBodyA().computeAngularImpulseDenominator(normal) + - getRigidBodyB().computeAngularImpulseDenominator(normal); - // scale for mass and relaxation - //todo: expose this 0.9 factor to developer - velrelOrthog *= (btScalar(1.)/denom) * m_relaxationFactor; - } - - //solve angular positional correction - btVector3 angularError = -axisA.cross(axisB) *(btScalar(1.)/timeStep); - btScalar len2 = angularError.length(); - if (len2>btScalar(0.00001)) - { - btVector3 normal2 = angularError.normalized(); - btScalar denom2 = getRigidBodyA().computeAngularImpulseDenominator(normal2) + - getRigidBodyB().computeAngularImpulseDenominator(normal2); - angularError *= (btScalar(1.)/denom2) * relaxation; - } - - m_rbA.applyTorqueImpulse(-velrelOrthog+angularError); - m_rbB.applyTorqueImpulse(velrelOrthog-angularError); - - // solve limit - if (m_solveLimit) - { - btScalar amplitude = ( (angVelB - angVelA).dot( axisA )*m_relaxationFactor + m_correction* (btScalar(1.)/timeStep)*m_biasFactor ) * m_limitSign; - - btScalar impulseMag = amplitude * m_kHinge; - - // Clamp the accumulated impulse - btScalar temp = m_accLimitImpulse; - m_accLimitImpulse = btMax(m_accLimitImpulse + impulseMag, btScalar(0) ); - impulseMag = m_accLimitImpulse - temp; - - - btVector3 impulse = axisA * impulseMag * m_limitSign; - m_rbA.applyTorqueImpulse(impulse); - m_rbB.applyTorqueImpulse(-impulse); - } - } - - //apply motor - if (m_enableAngularMotor) - { - //todo: add limits too - btVector3 angularLimit(0,0,0); - - btVector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB; - btScalar projRelVel = velrel.dot(axisA); - - btScalar desiredMotorVel = m_motorTargetVelocity; - btScalar motor_relvel = desiredMotorVel - projRelVel; - - btScalar unclippedMotorImpulse = m_kHinge * motor_relvel;; - //todo: should clip against accumulated impulse - btScalar clippedMotorImpulse = unclippedMotorImpulse > m_maxMotorImpulse ? m_maxMotorImpulse : unclippedMotorImpulse; - clippedMotorImpulse = clippedMotorImpulse < -m_maxMotorImpulse ? -m_maxMotorImpulse : clippedMotorImpulse; - btVector3 motorImp = clippedMotorImpulse * axisA; - - m_rbA.applyTorqueImpulse(motorImp+angularLimit); - m_rbB.applyTorqueImpulse(-motorImp-angularLimit); - - } - } - -} - -void btHingeConstraint::updateRHS(btScalar timeStep) -{ - (void)timeStep; - -} - -btScalar btHingeConstraint::getHingeAngle() -{ - const btVector3 refAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(0); - const btVector3 refAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(1); - const btVector3 swingAxis = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_rbBFrame.getBasis().getColumn(1); - - return btAtan2Fast( swingAxis.dot(refAxis0), swingAxis.dot(refAxis1) ); -} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h deleted file mode 100644 index 8d8adfe9250..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* Hinge Constraint by Dirk Gregorius. Limits added by Marcus Hennix at Starbreeze Studios */ - -#ifndef HINGECONSTRAINT_H -#define HINGECONSTRAINT_H - -#include "LinearMath/btVector3.h" -#include "btJacobianEntry.h" -#include "btTypedConstraint.h" - -class btRigidBody; - -/// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space -/// axis defines the orientation of the hinge axis -class btHingeConstraint : public btTypedConstraint -{ -#ifdef IN_PARALLELL_SOLVER -public: -#endif - btJacobianEntry m_jac[3]; //3 orthogonal linear constraints - btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 for limit/motor - - btTransform m_rbAFrame; // constraint axii. Assumes z is hinge axis. - btTransform m_rbBFrame; - - btScalar m_motorTargetVelocity; - btScalar m_maxMotorImpulse; - - btScalar m_limitSoftness; - btScalar m_biasFactor; - btScalar m_relaxationFactor; - - btScalar m_lowerLimit; - btScalar m_upperLimit; - - btScalar m_kHinge; - - btScalar m_limitSign; - btScalar m_correction; - - btScalar m_accLimitImpulse; - - bool m_angularOnly; - bool m_enableAngularMotor; - bool m_solveLimit; - - -public: - - btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, btVector3& axisInA,btVector3& axisInB); - - btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA); - - btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame); - - btHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame); - - btHingeConstraint(); - - virtual void buildJacobian(); - - virtual void solveConstraint(btScalar timeStep); - - void updateRHS(btScalar timeStep); - - const btRigidBody& getRigidBodyA() const - { - return m_rbA; - } - const btRigidBody& getRigidBodyB() const - { - return m_rbB; - } - - void setAngularOnly(bool angularOnly) - { - m_angularOnly = angularOnly; - } - - void enableAngularMotor(bool enableMotor,btScalar targetVelocity,btScalar maxMotorImpulse) - { - m_enableAngularMotor = enableMotor; - m_motorTargetVelocity = targetVelocity; - m_maxMotorImpulse = maxMotorImpulse; - } - - void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) - { - m_lowerLimit = low; - m_upperLimit = high; - - m_limitSoftness = _softness; - m_biasFactor = _biasFactor; - m_relaxationFactor = _relaxationFactor; - - } - - btScalar getHingeAngle(); - - - const btTransform& getAFrame() { return m_rbAFrame; }; - const btTransform& getBFrame() { return m_rbBFrame; }; - - inline int getSolveLimit() - { - return m_solveLimit; - } - - inline btScalar getLimitSign() - { - return m_limitSign; - } - -}; - -#endif //HINGECONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h deleted file mode 100644 index bfeb24c2dfb..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef JACOBIAN_ENTRY_H -#define JACOBIAN_ENTRY_H - -#include "LinearMath/btVector3.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" - - -//notes: -// Another memory optimization would be to store m_1MinvJt in the remaining 3 w components -// which makes the btJacobianEntry memory layout 16 bytes -// if you only are interested in angular part, just feed massInvA and massInvB zero - -/// Jacobian entry is an abstraction that allows to describe constraints -/// it can be used in combination with a constraint solver -/// Can be used to relate the effect of an impulse to the constraint error -class btJacobianEntry -{ -public: - btJacobianEntry() {}; - //constraint between two different rigidbodies - btJacobianEntry( - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - const btVector3& rel_pos1,const btVector3& rel_pos2, - const btVector3& jointAxis, - const btVector3& inertiaInvA, - const btScalar massInvA, - const btVector3& inertiaInvB, - const btScalar massInvB) - :m_linearJointAxis(jointAxis) - { - m_aJ = world2A*(rel_pos1.cross(m_linearJointAxis)); - m_bJ = world2B*(rel_pos2.cross(-m_linearJointAxis)); - m_0MinvJt = inertiaInvA * m_aJ; - m_1MinvJt = inertiaInvB * m_bJ; - m_Adiag = massInvA + m_0MinvJt.dot(m_aJ) + massInvB + m_1MinvJt.dot(m_bJ); - - btAssert(m_Adiag > btScalar(0.0)); - } - - //angular constraint between two different rigidbodies - btJacobianEntry(const btVector3& jointAxis, - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - const btVector3& inertiaInvA, - const btVector3& inertiaInvB) - :m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.))) - { - m_aJ= world2A*jointAxis; - m_bJ = world2B*-jointAxis; - m_0MinvJt = inertiaInvA * m_aJ; - m_1MinvJt = inertiaInvB * m_bJ; - m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ); - - btAssert(m_Adiag > btScalar(0.0)); - } - - //angular constraint between two different rigidbodies - btJacobianEntry(const btVector3& axisInA, - const btVector3& axisInB, - const btVector3& inertiaInvA, - const btVector3& inertiaInvB) - : m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.))) - , m_aJ(axisInA) - , m_bJ(-axisInB) - { - m_0MinvJt = inertiaInvA * m_aJ; - m_1MinvJt = inertiaInvB * m_bJ; - m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ); - - btAssert(m_Adiag > btScalar(0.0)); - } - - //constraint on one rigidbody - btJacobianEntry( - const btMatrix3x3& world2A, - const btVector3& rel_pos1,const btVector3& rel_pos2, - const btVector3& jointAxis, - const btVector3& inertiaInvA, - const btScalar massInvA) - :m_linearJointAxis(jointAxis) - { - m_aJ= world2A*(rel_pos1.cross(jointAxis)); - m_bJ = world2A*(rel_pos2.cross(-jointAxis)); - m_0MinvJt = inertiaInvA * m_aJ; - m_1MinvJt = btVector3(btScalar(0.),btScalar(0.),btScalar(0.)); - m_Adiag = massInvA + m_0MinvJt.dot(m_aJ); - - btAssert(m_Adiag > btScalar(0.0)); - } - - btScalar getDiagonal() const { return m_Adiag; } - - // for two constraints on the same rigidbody (for example vehicle friction) - btScalar getNonDiagonal(const btJacobianEntry& jacB, const btScalar massInvA) const - { - const btJacobianEntry& jacA = *this; - btScalar lin = massInvA * jacA.m_linearJointAxis.dot(jacB.m_linearJointAxis); - btScalar ang = jacA.m_0MinvJt.dot(jacB.m_aJ); - return lin + ang; - } - - - - // for two constraints on sharing two same rigidbodies (for example two contact points between two rigidbodies) - btScalar getNonDiagonal(const btJacobianEntry& jacB,const btScalar massInvA,const btScalar massInvB) const - { - const btJacobianEntry& jacA = *this; - btVector3 lin = jacA.m_linearJointAxis * jacB.m_linearJointAxis; - btVector3 ang0 = jacA.m_0MinvJt * jacB.m_aJ; - btVector3 ang1 = jacA.m_1MinvJt * jacB.m_bJ; - btVector3 lin0 = massInvA * lin ; - btVector3 lin1 = massInvB * lin; - btVector3 sum = ang0+ang1+lin0+lin1; - return sum[0]+sum[1]+sum[2]; - } - - btScalar getRelativeVelocity(const btVector3& linvelA,const btVector3& angvelA,const btVector3& linvelB,const btVector3& angvelB) - { - btVector3 linrel = linvelA - linvelB; - btVector3 angvela = angvelA * m_aJ; - btVector3 angvelb = angvelB * m_bJ; - linrel *= m_linearJointAxis; - angvela += angvelb; - angvela += linrel; - btScalar rel_vel2 = angvela[0]+angvela[1]+angvela[2]; - return rel_vel2 + SIMD_EPSILON; - } -//private: - - btVector3 m_linearJointAxis; - btVector3 m_aJ; - btVector3 m_bJ; - btVector3 m_0MinvJt; - btVector3 m_1MinvJt; - //Optimization: can be stored in the w/last component of one of the vectors - btScalar m_Adiag; - -}; - -#endif //JACOBIAN_ENTRY_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp deleted file mode 100644 index ff918ea5625..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btPoint2PointConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include - - - -btPoint2PointConstraint::btPoint2PointConstraint() -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE) -{ -} - -btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB) -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB) -{ - -} - - -btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA) -:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)) -{ - -} - -void btPoint2PointConstraint::buildJacobian() -{ - m_appliedImpulse = btScalar(0.); - - btVector3 normal(0,0,0); - - for (int i=0;i<3;i++) - { - normal[i] = 1; - new (&m_jac[i]) btJacobianEntry( - m_rbA.getCenterOfMassTransform().getBasis().transpose(), - m_rbB.getCenterOfMassTransform().getBasis().transpose(), - m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(), - m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(), - normal, - m_rbA.getInvInertiaDiagLocal(), - m_rbA.getInvMass(), - m_rbB.getInvInertiaDiagLocal(), - m_rbB.getInvMass()); - normal[i] = 0; - } - -} - -void btPoint2PointConstraint::solveConstraint(btScalar timeStep) -{ - btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; - btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; - - - btVector3 normal(0,0,0); - - -// btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); -// btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); - - for (int i=0;i<3;i++) - { - normal[i] = 1; - btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); - - btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); - btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); - //this jacobian entry could be re-used for all iterations - - btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar rel_vel; - rel_vel = normal.dot(vel); - - /* - //velocity error (first order error) - btScalar rel_vel = m_jac[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, - m_rbB.getLinearVelocity(),angvelB); - */ - - //positional error (zeroth order error) - btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal - - btScalar impulse = depth*m_setting.m_tau/timeStep * jacDiagABInv - m_setting.m_damping * rel_vel * jacDiagABInv; - m_appliedImpulse+=impulse; - btVector3 impulse_vector = normal * impulse; - m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); - m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); - - normal[i] = 0; - } -} - -void btPoint2PointConstraint::updateRHS(btScalar timeStep) -{ - (void)timeStep; - -} - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h deleted file mode 100644 index 27872b9c8aa..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef POINT2POINTCONSTRAINT_H -#define POINT2POINTCONSTRAINT_H - -#include "LinearMath/btVector3.h" -#include "btJacobianEntry.h" -#include "btTypedConstraint.h" - -class btRigidBody; - -struct btConstraintSetting -{ - btConstraintSetting() : - m_tau(btScalar(0.3)), - m_damping(btScalar(1.)) - { - } - btScalar m_tau; - btScalar m_damping; -}; - -/// point to point constraint between two rigidbodies each with a pivotpoint that descibes the 'ballsocket' location in local space -class btPoint2PointConstraint : public btTypedConstraint -{ -#ifdef IN_PARALLELL_SOLVER -public: -#endif - btJacobianEntry m_jac[3]; //3 orthogonal linear constraints - - btVector3 m_pivotInA; - btVector3 m_pivotInB; - - - -public: - - btConstraintSetting m_setting; - - btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB); - - btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA); - - btPoint2PointConstraint(); - - virtual void buildJacobian(); - - - virtual void solveConstraint(btScalar timeStep); - - void updateRHS(btScalar timeStep); - - void setPivotA(const btVector3& pivotA) - { - m_pivotInA = pivotA; - } - - void setPivotB(const btVector3& pivotB) - { - m_pivotInB = pivotB; - } - - const btVector3& getPivotInA() const - { - return m_pivotInA; - } - - const btVector3& getPivotInB() const - { - return m_pivotInB; - } - - -}; - -#endif //POINT2POINTCONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp deleted file mode 100644 index 7d4ed7856c3..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp +++ /dev/null @@ -1,1266 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -//#define COMPUTE_IMPULSE_DENOM 1 -//It is not necessary (redundant) to refresh contact manifolds, this refresh has been moved to the collision algorithms. -//#define FORCE_REFESH_CONTACT_MANIFOLDS 1 - -#include "btSequentialImpulseConstraintSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "btContactConstraint.h" -#include "btSolve2LinearConstraint.h" -#include "btContactSolverInfo.h" -#include "LinearMath/btIDebugDraw.h" -#include "btJacobianEntry.h" -#include "LinearMath/btMinMax.h" -#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" -#include -#include "LinearMath/btStackAlloc.h" -#include "LinearMath/btQuickprof.h" -#include "btSolverBody.h" -#include "btSolverConstraint.h" - -#include "LinearMath/btAlignedObjectArray.h" - -#ifdef USE_PROFILE -#include "LinearMath/btQuickprof.h" -#endif //USE_PROFILE - -int totalCpd = 0; - -int gTotalContactPoints = 0; - -struct btOrderIndex -{ - int m_manifoldIndex; - int m_pointIndex; -}; - - - -#define SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS 16384 -static btOrderIndex gOrder[SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS]; - - -unsigned long btSequentialImpulseConstraintSolver::btRand2() -{ - m_btSeed2 = (1664525L*m_btSeed2 + 1013904223L) & 0xffffffff; - return m_btSeed2; -} - - - -//See ODE: adam's all-int straightforward(?) dRandInt (0..n-1) -int btSequentialImpulseConstraintSolver::btRandInt2 (int n) -{ - // seems good; xor-fold and modulus - const unsigned long un = n; - unsigned long r = btRand2(); - - // note: probably more aggressive than it needs to be -- might be - // able to get away without one or two of the innermost branches. - if (un <= 0x00010000UL) { - r ^= (r >> 16); - if (un <= 0x00000100UL) { - r ^= (r >> 8); - if (un <= 0x00000010UL) { - r ^= (r >> 4); - if (un <= 0x00000004UL) { - r ^= (r >> 2); - if (un <= 0x00000002UL) { - r ^= (r >> 1); - } - } - } - } - } - - return (int) (r % un); -} - - - - - -bool MyContactDestroyedCallback(void* userPersistentData) -{ - assert (userPersistentData); - btConstraintPersistentData* cpd = (btConstraintPersistentData*)userPersistentData; - btAlignedFree(cpd); - totalCpd--; - //printf("totalCpd = %i. DELETED Ptr %x\n",totalCpd,userPersistentData); - return true; -} - - - -btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver() -:m_solverMode(SOLVER_RANDMIZE_ORDER | SOLVER_CACHE_FRIENDLY), //not using SOLVER_USE_WARMSTARTING, -m_btSeed2(0) -{ - gContactDestroyedCallback = &MyContactDestroyedCallback; - - //initialize default friction/contact funcs - int i,j; - for (i=0;im_angularVelocity = rigidbody->getAngularVelocity(); - solverBody->m_centerOfMassPosition = rigidbody->getCenterOfMassPosition(); - solverBody->m_friction = rigidbody->getFriction(); -// solverBody->m_invInertiaWorld = rigidbody->getInvInertiaTensorWorld(); - solverBody->m_invMass = rigidbody->getInvMass(); - solverBody->m_linearVelocity = rigidbody->getLinearVelocity(); - solverBody->m_originalBody = rigidbody; - solverBody->m_angularFactor = rigidbody->getAngularFactor(); -} - -btScalar penetrationResolveFactor = btScalar(0.9); -btScalar restitutionCurve(btScalar rel_vel, btScalar restitution) -{ - btScalar rest = restitution * -rel_vel; - return rest; -} - - - - - - -//velocity + friction -//response between two dynamic objects with friction -//SIMD_FORCE_INLINE -btScalar resolveSingleCollisionCombinedCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo) -{ - (void)solverInfo; - - btScalar normalImpulse; - - // Optimized version of projected relative velocity, use precomputed cross products with normal - // body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); - // body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); - // btVector3 vel = vel1 - vel2; - // btScalar rel_vel = contactConstraint.m_contactNormal.dot(vel); - - btScalar rel_vel; - btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); - btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); - - rel_vel = vel1Dotn-vel2Dotn; - - - btScalar positionalError = contactConstraint.m_penetration; - btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; - - btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; - btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; - normalImpulse = penetrationImpulse+velocityImpulse; - - // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse - btScalar oldNormalImpulse = contactConstraint.m_appliedImpulse; - btScalar sum = oldNormalImpulse + normalImpulse; - contactConstraint.m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; - - btScalar oldVelocityImpulse = contactConstraint.m_appliedVelocityImpulse; - btScalar velocitySum = oldVelocityImpulse + velocityImpulse; - contactConstraint.m_appliedVelocityImpulse = btScalar(0.) > velocitySum ? btScalar(0.): velocitySum; - - normalImpulse = contactConstraint.m_appliedImpulse - oldNormalImpulse; - - if (body1.m_invMass) - { - body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass, - contactConstraint.m_angularComponentA,normalImpulse); - } - if (body2.m_invMass) - { - body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass, - contactConstraint.m_angularComponentB,-normalImpulse); - } - - - - - - return normalImpulse; -} - - -#ifndef NO_FRICTION_TANGENTIALS - -//SIMD_FORCE_INLINE -btScalar resolveSingleFrictionCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - const btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo, - btScalar appliedNormalImpulse) -{ - (void)solverInfo; - - - const btScalar combinedFriction = contactConstraint.m_friction; - - const btScalar limit = appliedNormalImpulse * combinedFriction; - - if (appliedNormalImpulse>btScalar(0.)) - //friction - { - - btScalar j1; - { - - btScalar rel_vel; - const btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) - + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); - const btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) - + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); - rel_vel = vel1Dotn-vel2Dotn; - - // calculate j that moves us to zero relative velocity - j1 = -rel_vel * contactConstraint.m_jacDiagABInv; -#define CLAMP_ACCUMULATED_FRICTION_IMPULSE 1 -#ifdef CLAMP_ACCUMULATED_FRICTION_IMPULSE - btScalar oldTangentImpulse = contactConstraint.m_appliedImpulse; - contactConstraint.m_appliedImpulse = oldTangentImpulse + j1; - - if (limit < contactConstraint.m_appliedImpulse) - { - contactConstraint.m_appliedImpulse = limit; - } else - { - if (contactConstraint.m_appliedImpulse < -limit) - contactConstraint.m_appliedImpulse = -limit; - } - j1 = contactConstraint.m_appliedImpulse - oldTangentImpulse; -#else - if (limit < j1) - { - j1 = limit; - } else - { - if (j1 < -limit) - j1 = -limit; - } - -#endif //CLAMP_ACCUMULATED_FRICTION_IMPULSE - - //GEN_set_min(contactConstraint.m_appliedImpulse, limit); - //GEN_set_max(contactConstraint.m_appliedImpulse, -limit); - - - - } - - if (body1.m_invMass) - { - body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass,contactConstraint.m_angularComponentA,j1); - } - if (body2.m_invMass) - { - body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass,contactConstraint.m_angularComponentB,-j1); - } - - } - return 0.f; -} - - -#else - -//velocity + friction -//response between two dynamic objects with friction -btScalar resolveSingleFrictionCacheFriendly( - btSolverBody& body1, - btSolverBody& body2, - btSolverConstraint& contactConstraint, - const btContactSolverInfo& solverInfo) -{ - - btVector3 vel1; - btVector3 vel2; - btScalar normalImpulse(0.f); - - { - const btVector3& normal = contactConstraint.m_contactNormal; - if (contactConstraint.m_penetration < 0.f) - return 0.f; - - - body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); - body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = normal.dot(vel); - - btVector3 lat_vel = vel - normal * rel_vel; - btScalar lat_rel_vel = lat_vel.length2(); - - btScalar combinedFriction = contactConstraint.m_friction; - const btVector3& rel_pos1 = contactConstraint.m_rel_posA; - const btVector3& rel_pos2 = contactConstraint.m_rel_posB; - - - //if (contactConstraint.m_appliedVelocityImpulse > 0.f) - if (lat_rel_vel > SIMD_EPSILON*SIMD_EPSILON) - { - lat_rel_vel = btSqrt(lat_rel_vel); - - lat_vel /= lat_rel_vel; - btVector3 temp1 = body1.m_invInertiaWorld * rel_pos1.cross(lat_vel); - btVector3 temp2 = body2.m_invInertiaWorld * rel_pos2.cross(lat_vel); - btScalar friction_impulse = lat_rel_vel / - (body1.m_invMass + body2.m_invMass + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); - btScalar normal_impulse = contactConstraint.m_appliedVelocityImpulse * combinedFriction; - - GEN_set_min(friction_impulse, normal_impulse); - GEN_set_max(friction_impulse, -normal_impulse); - body1.applyImpulse(lat_vel * -friction_impulse, rel_pos1); - body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); - } - } - - return normalImpulse; -} - -#endif //NO_FRICTION_TANGENTIALS - - - - - -void btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btRigidBody* rb0,btRigidBody* rb1, btScalar relaxation) -{ - - btSolverConstraint& solverConstraint = m_tmpSolverFrictionConstraintPool.expand(); - solverConstraint.m_contactNormal = normalAxis; - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; - solverConstraint.m_frictionIndex = frictionIndex; - - solverConstraint.m_friction = cp.m_combinedFriction; - - solverConstraint.m_appliedImpulse = btScalar(0.); - solverConstraint.m_appliedVelocityImpulse = 0.f; - solverConstraint.m_penetration = 0.f; - { - btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis1; - } - { - btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal); - solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; - solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis1; - } - -#ifdef COMPUTE_IMPULSE_DENOM - btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); -#else - btVector3 vec; - vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); - btScalar denom0 = rb0->getInvMass() + normalAxis.dot(vec); - vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); - btScalar denom1 = rb1->getInvMass() + normalAxis.dot(vec); - - -#endif //COMPUTE_IMPULSE_DENOM - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; - -} - - -btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) -{ - (void)stackAlloc; - (void)debugDrawer; - - if (!(numConstraints + numManifolds)) - { -// printf("empty\n"); - return 0.f; - } - btPersistentManifold* manifold = 0; - btRigidBody* rb0=0,*rb1=0; - -#ifdef FORCE_REFESH_CONTACT_MANIFOLDS - - BEGIN_PROFILE("refreshManifolds"); - - int i; - - - - for (i=0;igetBody1(); - rb0 = (btRigidBody*)manifold->getBody0(); - - manifold->refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); - - } - - END_PROFILE("refreshManifolds"); -#endif //FORCE_REFESH_CONTACT_MANIFOLDS - - btVector3 color(0,1,0); - - - BEGIN_PROFILE("gatherSolverData"); - - //int sizeofSB = sizeof(btSolverBody); - //int sizeofSC = sizeof(btSolverConstraint); - - - //if (1) - { - //if m_stackAlloc, try to pack bodies/constraints to speed up solving -// btBlock* sablock; -// sablock = stackAlloc->beginBlock(); - - // int memsize = 16; -// unsigned char* stackMemory = stackAlloc->allocate(memsize); - - - //todo: use stack allocator for this temp memory - int minReservation = numManifolds*2; - - //m_tmpSolverBodyPool.reserve(minReservation); - - //don't convert all bodies, only the one we need so solver the constraints -/* - { - for (int i=0;igetIslandTag() >= 0)) - { - btAssert(rb->getCompanionId() < 0); - int solverBodyId = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb); - rb->setCompanionId(solverBodyId); - } - } - } -*/ - - //m_tmpSolverConstraintPool.reserve(minReservation); - //m_tmpSolverFrictionConstraintPool.reserve(minReservation); - - { - int i; - - for (i=0;igetBody1(); - - rb0 = (btRigidBody*)manifold->getBody0(); - - - int solverBodyIdA=-1; - int solverBodyIdB=-1; - - if (manifold->getNumContacts()) - { - - - - if (rb0->getIslandTag() >= 0) - { - if (rb0->getCompanionId() >= 0) - { - //body has already been converted - solverBodyIdA = rb0->getCompanionId(); - } else - { - solverBodyIdA = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb0); - rb0->setCompanionId(solverBodyIdA); - } - } else - { - //create a static body - solverBodyIdA = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb0); - } - - if (rb1->getIslandTag() >= 0) - { - if (rb1->getCompanionId() >= 0) - { - solverBodyIdB = rb1->getCompanionId(); - } else - { - solverBodyIdB = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb1); - rb1->setCompanionId(solverBodyIdB); - } - } else - { - //create a static body - solverBodyIdB = m_tmpSolverBodyPool.size(); - btSolverBody& solverBody = m_tmpSolverBodyPool.expand(); - initSolverBody(&solverBody,rb1); - } - } - - btVector3 rel_pos1; - btVector3 rel_pos2; - btScalar relaxation; - - for (int j=0;jgetNumContacts();j++) - { - - btManifoldPoint& cp = manifold->getContactPoint(j); - - if (debugDrawer) - debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); - - - if (cp.getDistance() <= btScalar(0.)) - { - - const btVector3& pos1 = cp.getPositionWorldOnA(); - const btVector3& pos2 = cp.getPositionWorldOnB(); - - rel_pos1 = pos1 - rb0->getCenterOfMassPosition(); - rel_pos2 = pos2 - rb1->getCenterOfMassPosition(); - - - relaxation = 1.f; - btScalar rel_vel; - btVector3 vel; - - int frictionIndex = m_tmpSolverConstraintPool.size(); - - { - btSolverConstraint& solverConstraint = m_tmpSolverConstraintPool.expand(); - - solverConstraint.m_solverBodyIdA = solverBodyIdA; - solverConstraint.m_solverBodyIdB = solverBodyIdB; - solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_CONTACT_1D; - - btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*torqueAxis0; - btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); - solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*torqueAxis1; - { -#ifdef COMPUTE_IMPULSE_DENOM - btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB); - btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB); -#else - btVector3 vec; - vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1); - btScalar denom0 = rb0->getInvMass() + cp.m_normalWorldOnB.dot(vec); - vec = ( solverConstraint.m_angularComponentB).cross(rel_pos2); - btScalar denom1 = rb1->getInvMass() + cp.m_normalWorldOnB.dot(vec); -#endif //COMPUTE_IMPULSE_DENOM - - btScalar denom = relaxation/(denom0+denom1); - solverConstraint.m_jacDiagABInv = denom; - } - - solverConstraint.m_contactNormal = cp.m_normalWorldOnB; - solverConstraint.m_relpos1CrossNormal = rel_pos1.cross(cp.m_normalWorldOnB); - solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(cp.m_normalWorldOnB); - - - btVector3 vel1 = rb0->getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = rb1->getVelocityInLocalPoint(rel_pos2); - - vel = vel1 - vel2; - - rel_vel = cp.m_normalWorldOnB.dot(vel); - - - solverConstraint.m_penetration = cp.getDistance();///btScalar(infoGlobal.m_numIterations); - solverConstraint.m_friction = cp.m_combinedFriction; - solverConstraint.m_restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution); - if (solverConstraint.m_restitution <= btScalar(0.)) - { - solverConstraint.m_restitution = 0.f; - }; - - btScalar penVel = -solverConstraint.m_penetration/infoGlobal.m_timeStep; - solverConstraint.m_penetration *= -(infoGlobal.m_erp/infoGlobal.m_timeStep); - - if (solverConstraint.m_restitution > penVel) - { - solverConstraint.m_penetration = btScalar(0.); - } - - - - solverConstraint.m_appliedImpulse = 0.f; - solverConstraint.m_appliedVelocityImpulse = 0.f; - - - - } - - - { - btVector3 frictionDir1 = vel - cp.m_normalWorldOnB * rel_vel; - btScalar lat_rel_vel = frictionDir1.length2(); - if (lat_rel_vel > SIMD_EPSILON)//0.0f) - { - frictionDir1 /= btSqrt(lat_rel_vel); - addFrictionConstraint(frictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); - btVector3 frictionDir2 = frictionDir1.cross(cp.m_normalWorldOnB); - frictionDir2.normalize();//?? - addFrictionConstraint(frictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); - } else - { - //re-calculate friction direction every frame, todo: check if this is really needed - btVector3 frictionDir1,frictionDir2; - btPlaneSpace1(cp.m_normalWorldOnB,frictionDir1,frictionDir2); - addFrictionConstraint(frictionDir1,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); - addFrictionConstraint(frictionDir2,solverBodyIdA,solverBodyIdB,frictionIndex,cp,rel_pos1,rel_pos2,rb0,rb1, relaxation); - } - - } - } - } - } - } - } - END_PROFILE("gatherSolverData"); - - BEGIN_PROFILE("prepareConstraints"); - - btContactSolverInfo info = infoGlobal; - - { - int j; - for (j=0;jbuildJacobian(); - } - } - - - - int numConstraintPool = m_tmpSolverConstraintPool.size(); - int numFrictionPool = m_tmpSolverFrictionConstraintPool.size(); - - ///todo: use stack allocator for such temporarily memory, same for solver bodies/constraints - m_orderTmpConstraintPool.resize(numConstraintPool); - m_orderFrictionConstraintPool.resize(numFrictionPool); - { - int i; - for (i=0;igetRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].writebackVelocity(); - } - if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].writebackVelocity(); - } - - constraint->solveConstraint(infoGlobal.m_timeStep); - - if ((constraint->getRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].readVelocity(); - } - if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) - { - m_tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].readVelocity(); - } - - } - - { - int numPoolConstraints = m_tmpSolverConstraintPool.size(); - for (j=0;jgetNumContacts();p++) - { - gOrder[totalPoints].m_manifoldIndex = j; - gOrder[totalPoints].m_pointIndex = p; - totalPoints++; - } - } - } - - { - int j; - for (j=0;jbuildJacobian(); - } - } - - END_PROFILE("prepareConstraints"); - - - BEGIN_PROFILE("solveConstraints"); - - //should traverse the contacts random order... - int iteration; - - { - for ( iteration = 0;iterationsolveConstraint(info.m_timeStep); - } - - for (j=0;jgetBody0(), - (btRigidBody*)manifold->getBody1() - ,manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); - } - - for (j=0;jgetBody0(), - (btRigidBody*)manifold->getBody1(),manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); - } - - } - } - - END_PROFILE("solveConstraints"); - - -#ifdef USE_PROFILE - btProfiler::endBlock("solve"); -#endif //USE_PROFILE - - - - - return btScalar(0.); -} - - - - - - - -void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer) -{ - - (void)debugDrawer; - - btRigidBody* body0 = (btRigidBody*)manifoldPtr->getBody0(); - btRigidBody* body1 = (btRigidBody*)manifoldPtr->getBody1(); - - - //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop - { -#ifdef FORCE_REFESH_CONTACT_MANIFOLDS - manifoldPtr->refreshContactPoints(body0->getCenterOfMassTransform(),body1->getCenterOfMassTransform()); -#endif //FORCE_REFESH_CONTACT_MANIFOLDS - int numpoints = manifoldPtr->getNumContacts(); - - gTotalContactPoints += numpoints; - - btVector3 color(0,1,0); - for (int i=0;igetContactPoint(i); - if (cp.getDistance() <= btScalar(0.)) - { - const btVector3& pos1 = cp.getPositionWorldOnA(); - const btVector3& pos2 = cp.getPositionWorldOnB(); - - btVector3 rel_pos1 = pos1 - body0->getCenterOfMassPosition(); - btVector3 rel_pos2 = pos2 - body1->getCenterOfMassPosition(); - - - //this jacobian entry is re-used for all iterations - btJacobianEntry jac(body0->getCenterOfMassTransform().getBasis().transpose(), - body1->getCenterOfMassTransform().getBasis().transpose(), - rel_pos1,rel_pos2,cp.m_normalWorldOnB,body0->getInvInertiaDiagLocal(),body0->getInvMass(), - body1->getInvInertiaDiagLocal(),body1->getInvMass()); - - - btScalar jacDiagAB = jac.getDiagonal(); - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - if (cpd) - { - //might be invalid - cpd->m_persistentLifeTime++; - if (cpd->m_persistentLifeTime != cp.getLifeTime()) - { - //printf("Invalid: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); - new (cpd) btConstraintPersistentData; - cpd->m_persistentLifeTime = cp.getLifeTime(); - - } else - { - //printf("Persistent: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); - - } - } else - { - - //todo: should this be in a pool? - void* mem = btAlignedAlloc(sizeof(btConstraintPersistentData),16); - cpd = new (mem)btConstraintPersistentData; - assert(cpd); - - totalCpd ++; - //printf("totalCpd = %i Created Ptr %x\n",totalCpd,cpd); - cp.m_userPersistentData = cpd; - cpd->m_persistentLifeTime = cp.getLifeTime(); - //printf("CREATED: %x . cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd,cpd->m_persistentLifeTime,cp.getLifeTime()); - - } - assert(cpd); - - cpd->m_jacDiagABInv = btScalar(1.) / jacDiagAB; - - //Dependent on Rigidbody A and B types, fetch the contact/friction response func - //perhaps do a similar thing for friction/restutution combiner funcs... - - cpd->m_frictionSolverFunc = m_frictionDispatch[body0->m_frictionSolverType][body1->m_frictionSolverType]; - cpd->m_contactSolverFunc = m_contactDispatch[body0->m_contactSolverType][body1->m_contactSolverType]; - - btVector3 vel1 = body0->getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = body1->getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - btScalar rel_vel; - rel_vel = cp.m_normalWorldOnB.dot(vel); - - btScalar combinedRestitution = cp.m_combinedRestitution; - - cpd->m_penetration = cp.getDistance();///btScalar(info.m_numIterations); - cpd->m_friction = cp.m_combinedFriction; - cpd->m_restitution = restitutionCurve(rel_vel, combinedRestitution); - if (cpd->m_restitution <= btScalar(0.)) - { - cpd->m_restitution = btScalar(0.0); - - }; - - //restitution and penetration work in same direction so - //rel_vel - - btScalar penVel = -cpd->m_penetration/info.m_timeStep; - - if (cpd->m_restitution > penVel) - { - cpd->m_penetration = btScalar(0.); - } - - - btScalar relaxation = info.m_damping; - if (m_solverMode & SOLVER_USE_WARMSTARTING) - { - cpd->m_appliedImpulse *= relaxation; - } else - { - cpd->m_appliedImpulse =btScalar(0.); - } - - //for friction - cpd->m_prevAppliedImpulse = cpd->m_appliedImpulse; - - //re-calculate friction direction every frame, todo: check if this is really needed - btPlaneSpace1(cp.m_normalWorldOnB,cpd->m_frictionWorldTangential0,cpd->m_frictionWorldTangential1); - - -#define NO_FRICTION_WARMSTART 1 - - #ifdef NO_FRICTION_WARMSTART - cpd->m_accumulatedTangentImpulse0 = btScalar(0.); - cpd->m_accumulatedTangentImpulse1 = btScalar(0.); - #endif //NO_FRICTION_WARMSTART - btScalar denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential0); - btScalar denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential0); - btScalar denom = relaxation/(denom0+denom1); - cpd->m_jacDiagABInvTangent0 = denom; - - - denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential1); - denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential1); - denom = relaxation/(denom0+denom1); - cpd->m_jacDiagABInvTangent1 = denom; - - btVector3 totalImpulse = - #ifndef NO_FRICTION_WARMSTART - cpd->m_frictionWorldTangential0*cpd->m_accumulatedTangentImpulse0+ - cpd->m_frictionWorldTangential1*cpd->m_accumulatedTangentImpulse1+ - #endif //NO_FRICTION_WARMSTART - cp.m_normalWorldOnB*cpd->m_appliedImpulse; - - - - /// - { - btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); - cpd->m_angularComponentA = body0->getInvInertiaTensorWorld()*torqueAxis0; - btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); - cpd->m_angularComponentB = body1->getInvInertiaTensorWorld()*torqueAxis1; - } - { - btVector3 ftorqueAxis0 = rel_pos1.cross(cpd->m_frictionWorldTangential0); - cpd->m_frictionAngularComponent0A = body0->getInvInertiaTensorWorld()*ftorqueAxis0; - } - { - btVector3 ftorqueAxis1 = rel_pos1.cross(cpd->m_frictionWorldTangential1); - cpd->m_frictionAngularComponent1A = body0->getInvInertiaTensorWorld()*ftorqueAxis1; - } - { - btVector3 ftorqueAxis0 = rel_pos2.cross(cpd->m_frictionWorldTangential0); - cpd->m_frictionAngularComponent0B = body1->getInvInertiaTensorWorld()*ftorqueAxis0; - } - { - btVector3 ftorqueAxis1 = rel_pos2.cross(cpd->m_frictionWorldTangential1); - cpd->m_frictionAngularComponent1B = body1->getInvInertiaTensorWorld()*ftorqueAxis1; - } - - /// - - - - //apply previous frames impulse on both bodies - body0->applyImpulse(totalImpulse, rel_pos1); - body1->applyImpulse(-totalImpulse, rel_pos2); - } - - } - } -} - - -btScalar btSequentialImpulseConstraintSolver::solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - btScalar maxImpulse = btScalar(0.); - - { - - btVector3 color(0,1,0); - { - if (cp.getDistance() <= btScalar(0.)) - { - - if (iter == 0) - { - if (debugDrawer) - debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); - } - - { - - //btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - btScalar impulse = resolveSingleCollisionCombined( - *body0,*body1, - cp, - info); - - if (maxImpulse < impulse) - maxImpulse = impulse; - - } - } - } - } - return maxImpulse; -} - - - -btScalar btSequentialImpulseConstraintSolver::solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - - btScalar maxImpulse = btScalar(0.); - - { - - btVector3 color(0,1,0); - { - if (cp.getDistance() <= btScalar(0.)) - { - - if (iter == 0) - { - if (debugDrawer) - debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); - } - - { - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - btScalar impulse = cpd->m_contactSolverFunc( - *body0,*body1, - cp, - info); - - if (maxImpulse < impulse) - maxImpulse = impulse; - - } - } - } - } - return maxImpulse; -} - -btScalar btSequentialImpulseConstraintSolver::solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) -{ - - (void)debugDrawer; - (void)iter; - - - { - - btVector3 color(0,1,0); - { - - if (cp.getDistance() <= btScalar(0.)) - { - - btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; - cpd->m_frictionSolverFunc( - *body0,*body1, - cp, - info); - - - } - } - - - } - return btScalar(0.); -} - - -void btSequentialImpulseConstraintSolver::reset() -{ - m_btSeed2 = 0; -} - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h deleted file mode 100644 index 83a96d4dc44..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h +++ /dev/null @@ -1,126 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H -#define SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H - -#include "btConstraintSolver.h" -class btIDebugDraw; -#include "btContactConstraint.h" -#include "btSolverBody.h" -#include "btSolverConstraint.h" - - -/// btSequentialImpulseConstraintSolver uses a Propagation Method and Sequentially applies impulses -/// The approach is the 3D version of Erin Catto's GDC 2006 tutorial. See http://www.gphysics.com -/// Although Sequential Impulse is more intuitive, it is mathematically equivalent to Projected Successive Overrelaxation (iterative LCP) -/// Applies impulses for combined restitution and penetration recovery and to simulate friction -class btSequentialImpulseConstraintSolver : public btConstraintSolver -{ - - btAlignedObjectArray m_tmpSolverBodyPool; - btAlignedObjectArray m_tmpSolverConstraintPool; - btAlignedObjectArray m_tmpSolverFrictionConstraintPool; - btAlignedObjectArray m_orderTmpConstraintPool; - btAlignedObjectArray m_orderFrictionConstraintPool; - - -protected: - btScalar solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - btScalar solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - void prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer); - void addFrictionConstraint(const btVector3& normalAxis,int solverBodyIdA,int solverBodyIdB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btRigidBody* rb0,btRigidBody* rb1, btScalar relaxation); - - ContactSolverFunc m_contactDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; - ContactSolverFunc m_frictionDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; - - //choose between several modes, different friction model etc. - int m_solverMode; - ///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction - unsigned long m_btSeed2; - -public: - - enum eSolverMode - { - SOLVER_RANDMIZE_ORDER = 1, - SOLVER_FRICTION_SEPARATE = 2, - SOLVER_USE_WARMSTARTING = 4, - SOLVER_CACHE_FRIENDLY = 8 - }; - - btSequentialImpulseConstraintSolver(); - - ///Advanced: Override the default contact solving function for contacts, for certain types of rigidbody - ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType - void setContactSolverFunc(ContactSolverFunc func,int type0,int type1) - { - m_contactDispatch[type0][type1] = func; - } - - ///Advanced: Override the default friction solving function for contacts, for certain types of rigidbody - ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType - void SetFrictionSolverFunc(ContactSolverFunc func,int type0,int type1) - { - m_frictionDispatch[type0][type1] = func; - } - - virtual ~btSequentialImpulseConstraintSolver(); - - virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher); - - virtual btScalar solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); - btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); - btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); - - - ///clear internal cached data and reset random seed - virtual void reset(); - - btScalar solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); - - - void setSolverMode(int mode) - { - m_solverMode = mode; - } - - int getSolverMode() const - { - return m_solverMode; - } - - unsigned long btRand2(); - - int btRandInt2 (int n); - - void setRandSeed(unsigned long seed) - { - m_btSeed2 = seed; - } - unsigned long getRandSeed() const - { - return m_btSeed2; - } - -}; - -#ifndef BT_PREFER_SIMD -typedef btSequentialImpulseConstraintSolver btSequentialImpulseConstraintSolverPrefered; -#endif - - -#endif //SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp deleted file mode 100644 index 0c7dbd668bb..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#include "btSolve2LinearConstraint.h" - -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btVector3.h" -#include "btJacobianEntry.h" - - -void btSolve2LinearConstraint::resolveUnilateralPairConstraint( - btRigidBody* body1, - btRigidBody* body2, - - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - - const btVector3& invInertiaADiag, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btVector3& invInertiaBDiag, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1) -{ - (void)linvelA; - (void)linvelB; - (void)angvelB; - (void)angvelA; - - - - imp0 = btScalar(0.); - imp1 = btScalar(0.); - - btScalar len = btFabs(normalA.length()) - btScalar(1.); - if (btFabs(len) >= SIMD_EPSILON) - return; - - btAssert(len < SIMD_EPSILON); - - - //this jacobian entry could be re-used for all iterations - btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA, - invInertiaBDiag,invMassB); - btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA, - invInertiaBDiag,invMassB); - - //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); - //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); - - const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1)); - const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1)); - -// btScalar penetrationImpulse = (depth*contactTau*timeCorrection) * massTerm;//jacDiagABInv - btScalar massTerm = btScalar(1.) / (invMassA + invMassB); - - - // calculate rhs (or error) terms - const btScalar dv0 = depthA * m_tau * massTerm - vel0 * m_damping; - const btScalar dv1 = depthB * m_tau * massTerm - vel1 * m_damping; - - - // dC/dv * dv = -C - - // jacobian * impulse = -error - // - - //impulse = jacobianInverse * -error - - // inverting 2x2 symmetric system (offdiagonal are equal!) - // - - - btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB); - btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag ); - - //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; - //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; - - imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; - imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; - - //[a b] [d -c] - //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc) - - //[jA nD] * [imp0] = [dv0] - //[nD jB] [imp1] [dv1] - -} - - - -void btSolve2LinearConstraint::resolveBilateralPairConstraint( - btRigidBody* body1, - btRigidBody* body2, - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - - const btVector3& invInertiaADiag, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btVector3& invInertiaBDiag, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1) -{ - - (void)linvelA; - (void)linvelB; - (void)angvelA; - (void)angvelB; - - - - imp0 = btScalar(0.); - imp1 = btScalar(0.); - - btScalar len = btFabs(normalA.length()) - btScalar(1.); - if (btFabs(len) >= SIMD_EPSILON) - return; - - btAssert(len < SIMD_EPSILON); - - - //this jacobian entry could be re-used for all iterations - btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA, - invInertiaBDiag,invMassB); - btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA, - invInertiaBDiag,invMassB); - - //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); - //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); - - const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1)); - const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1)); - - // calculate rhs (or error) terms - const btScalar dv0 = depthA * m_tau - vel0 * m_damping; - const btScalar dv1 = depthB * m_tau - vel1 * m_damping; - - // dC/dv * dv = -C - - // jacobian * impulse = -error - // - - //impulse = jacobianInverse * -error - - // inverting 2x2 symmetric system (offdiagonal are equal!) - // - - - btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB); - btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag ); - - //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; - //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; - - imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; - imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; - - //[a b] [d -c] - //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc) - - //[jA nD] * [imp0] = [dv0] - //[nD jB] [imp1] [dv1] - - if ( imp0 > btScalar(0.0)) - { - if ( imp1 > btScalar(0.0) ) - { - //both positive - } - else - { - imp1 = btScalar(0.); - - // now imp0>0 imp1<0 - imp0 = dv0 / jacA.getDiagonal(); - if ( imp0 > btScalar(0.0) ) - { - } else - { - imp0 = btScalar(0.); - } - } - } - else - { - imp0 = btScalar(0.); - - imp1 = dv1 / jacB.getDiagonal(); - if ( imp1 <= btScalar(0.0) ) - { - imp1 = btScalar(0.); - // now imp0>0 imp1<0 - imp0 = dv0 / jacA.getDiagonal(); - if ( imp0 > btScalar(0.0) ) - { - } else - { - imp0 = btScalar(0.); - } - } else - { - } - } -} - - -/* -void btSolve2LinearConstraint::resolveAngularConstraint( const btMatrix3x3& invInertiaAWS, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btMatrix3x3& invInertiaBWS, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1) -{ - -} -*/ - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h deleted file mode 100644 index 057d3fac827..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SOLVE_2LINEAR_CONSTRAINT_H -#define SOLVE_2LINEAR_CONSTRAINT_H - -#include "LinearMath/btMatrix3x3.h" -#include "LinearMath/btVector3.h" - - -class btRigidBody; - - - -/// constraint class used for lateral tyre friction. -class btSolve2LinearConstraint -{ - btScalar m_tau; - btScalar m_damping; - -public: - - btSolve2LinearConstraint(btScalar tau,btScalar damping) - { - m_tau = tau; - m_damping = damping; - } - // - // solve unilateral constraint (equality, direct method) - // - void resolveUnilateralPairConstraint( - btRigidBody* body0, - btRigidBody* body1, - - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - - const btVector3& invInertiaADiag, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btVector3& invInertiaBDiag, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1); - - - // - // solving 2x2 lcp problem (inequality, direct solution ) - // - void resolveBilateralPairConstraint( - btRigidBody* body0, - btRigidBody* body1, - const btMatrix3x3& world2A, - const btMatrix3x3& world2B, - - const btVector3& invInertiaADiag, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btVector3& invInertiaBDiag, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1); - -/* - void resolveAngularConstraint( const btMatrix3x3& invInertiaAWS, - const btScalar invMassA, - const btVector3& linvelA,const btVector3& angvelA, - const btVector3& rel_posA1, - const btMatrix3x3& invInertiaBWS, - const btScalar invMassB, - const btVector3& linvelB,const btVector3& angvelB, - const btVector3& rel_posA2, - - btScalar depthA, const btVector3& normalA, - const btVector3& rel_posB1,const btVector3& rel_posB2, - btScalar depthB, const btVector3& normalB, - btScalar& imp0,btScalar& imp1); - -*/ - -}; - -#endif //SOLVE_2LINEAR_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h deleted file mode 100644 index 21305b3164e..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_SOLVER_BODY_H -#define BT_SOLVER_BODY_H - -class btRigidBody; -#include "LinearMath/btVector3.h" -#include "LinearMath/btMatrix3x3.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "LinearMath/btAlignedAllocator.h" - - -///btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packed to increase cache coherence/performance. -ATTRIBUTE_ALIGNED16 (struct) btSolverBody -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btVector3 m_angularVelocity; - float m_angularFactor; - float m_invMass; - float m_friction; - btRigidBody* m_originalBody; - btVector3 m_linearVelocity; - btVector3 m_centerOfMassPosition; - - SIMD_FORCE_INLINE void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const - { - velocity = m_linearVelocity + m_angularVelocity.cross(rel_pos); - } - - //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position - SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) - { - m_linearVelocity += linearComponent*impulseMagnitude; - m_angularVelocity += angularComponent*(impulseMagnitude*m_angularFactor); - } - - void writebackVelocity() - { - if (m_invMass) - { - m_originalBody->setLinearVelocity(m_linearVelocity); - m_originalBody->setAngularVelocity(m_angularVelocity); - //m_originalBody->setCompanionId(-1); - } - } - - void readVelocity() - { - if (m_invMass) - { - m_linearVelocity = m_originalBody->getLinearVelocity(); - m_angularVelocity = m_originalBody->getAngularVelocity(); - } - } - - - - -}; - -#endif //BT_SOLVER_BODY_H - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h deleted file mode 100644 index a750560d33c..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h +++ /dev/null @@ -1,69 +0,0 @@ - - -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_SOLVER_CONSTRAINT_H -#define BT_SOLVER_CONSTRAINT_H - -class btRigidBody; -#include "LinearMath/btVector3.h" -#include "LinearMath/btMatrix3x3.h" - -//#define NO_FRICTION_TANGENTIALS 1 - -///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. -ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint -{ - BT_DECLARE_ALIGNED_ALLOCATOR(); - - btVector3 m_relpos1CrossNormal; - btVector3 m_contactNormal; - - btVector3 m_relpos2CrossNormal; - btVector3 m_angularComponentA; - - btVector3 m_angularComponentB; - mutable btScalar m_appliedVelocityImpulse; - mutable btScalar m_appliedImpulse; - int m_solverBodyIdA; - int m_solverBodyIdB; - - btScalar m_friction; - btScalar m_restitution; - btScalar m_jacDiagABInv; - btScalar m_penetration; - - - - int m_constraintType; - int m_frictionIndex; - int m_unusedPadding[2]; - - enum btSolverConstraintType - { - BT_SOLVER_CONTACT_1D = 0, - BT_SOLVER_FRICTION_1D - }; -}; - - - - - - -#endif //BT_SOLVER_CONSTRAINT_H - - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp deleted file mode 100644 index 6e8b552dbbc..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btTypedConstraint.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" - -static btRigidBody s_fixed(0, 0,0); - -btTypedConstraint::btTypedConstraint(btTypedConstraintType type) -:m_userConstraintType(-1), -m_userConstraintId(-1), -m_constraintType (type), -m_rbA(s_fixed), -m_rbB(s_fixed), -m_appliedImpulse(btScalar(0.)) -{ - s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); -} -btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA) -:m_userConstraintType(-1), -m_userConstraintId(-1), -m_constraintType (type), -m_rbA(rbA), -m_rbB(s_fixed), -m_appliedImpulse(btScalar(0.)) -{ - s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); - -} - - -btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB) -:m_userConstraintType(-1), -m_userConstraintId(-1), -m_constraintType (type), -m_rbA(rbA), -m_rbB(rbB), -m_appliedImpulse(btScalar(0.)) -{ - s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); - -} - diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h deleted file mode 100644 index 745d0afde6d..00000000000 --- a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef TYPED_CONSTRAINT_H -#define TYPED_CONSTRAINT_H - -class btRigidBody; -#include "LinearMath/btScalar.h" - -enum btTypedConstraintType -{ - POINT2POINT_CONSTRAINT_TYPE, - HINGE_CONSTRAINT_TYPE, - CONETWIST_CONSTRAINT_TYPE, - D6_CONSTRAINT_TYPE, - VEHICLE_CONSTRAINT_TYPE -}; - -///TypedConstraint is the baseclass for Bullet constraints and vehicles -class btTypedConstraint -{ - int m_userConstraintType; - int m_userConstraintId; - - btTypedConstraintType m_constraintType; - - btTypedConstraint& operator=(btTypedConstraint& other) - { - btAssert(0); - (void) other; - return *this; - } - -protected: - btRigidBody& m_rbA; - btRigidBody& m_rbB; - btScalar m_appliedImpulse; - - -public: - - btTypedConstraint(btTypedConstraintType type); - virtual ~btTypedConstraint() {}; - btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA); - - btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB); - - virtual void buildJacobian() = 0; - - virtual void solveConstraint(btScalar timeStep) = 0; - - const btRigidBody& getRigidBodyA() const - { - return m_rbA; - } - const btRigidBody& getRigidBodyB() const - { - return m_rbB; - } - - btRigidBody& getRigidBodyA() - { - return m_rbA; - } - btRigidBody& getRigidBodyB() - { - return m_rbB; - } - - int getUserConstraintType() const - { - return m_userConstraintType ; - } - - void setUserConstraintType(int userConstraintType) - { - m_userConstraintType = userConstraintType; - }; - - void setUserConstraintId(int uid) - { - m_userConstraintId = uid; - } - - int getUserConstraintId() const - { - return m_userConstraintId; - } - btScalar getAppliedImpulse() const - { - return m_appliedImpulse; - } - - btTypedConstraintType getConstraintType () const - { - return m_constraintType; - } -}; - -#endif //TYPED_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp deleted file mode 100644 index 248c582dcd8..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* - Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. - Work in progress, functionality will be added on demand. - - If possible, use the richer Bullet C++ API, by including -*/ - -#include "Bullet-C-Api.h" -#include "btBulletDynamicsCommon.h" -#include "LinearMath/btAlignedAllocator.h" - - -#include "LinearMath/btVector3.h" -#include "LinearMath/btScalar.h" -#include "LinearMath/btMatrix3x3.h" -#include "LinearMath/btTransform.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/CollisionShapes/btTriangleShape.h" - -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" - -#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" -#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "LinearMath/btStackAlloc.h" - -extern "C" -double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]) -{ - btVector3 vp(p1[0], p1[1], p1[2]); - btTriangleShape trishapeA(vp, - btVector3(p2[0], p2[1], p2[2]), - btVector3(p3[0], p3[1], p3[2])); - trishapeA.setMargin(0.000001f); - btVector3 vq(q1[0], q1[1], q1[2]); - btTriangleShape trishapeB(vq, - btVector3(q2[0], q2[1], q2[2]), - btVector3(q3[0], q3[1], q3[2])); - trishapeB.setMargin(0.000001f); - - // btVoronoiSimplexSolver sGjkSimplexSolver; - // btGjkEpaPenetrationDepthSolver penSolverPtr; - - static btSimplexSolverInterface sGjkSimplexSolver; - sGjkSimplexSolver.reset(); - - static btGjkEpaPenetrationDepthSolver Solver0; - static btMinkowskiPenetrationDepthSolver Solver1; - - btConvexPenetrationDepthSolver* Solver = NULL; - - Solver = &Solver1; - - btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); - - convexConvex.m_catchDegeneracies = 1; - - // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0); - - btPointCollector gjkOutput; - btGjkPairDetector::ClosestPointInput input; - - btStackAlloc gStackAlloc(1024*1024*2); - - input.m_stackAlloc = &gStackAlloc; - - btTransform tr; - tr.setIdentity(); - - input.m_transformA = tr; - input.m_transformB = tr; - - convexConvex.getClosestPoints(input, gjkOutput, 0); - - - if (gjkOutput.m_hasResult) - { - - pb[0] = pa[0] = gjkOutput.m_pointInWorld[0]; - pb[1] = pa[1] = gjkOutput.m_pointInWorld[1]; - pb[2] = pa[2] = gjkOutput.m_pointInWorld[2]; - - pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance; - pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance; - pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance; - - normal[0] = gjkOutput.m_normalOnBInWorld[0]; - normal[1] = gjkOutput.m_normalOnBInWorld[1]; - normal[2] = gjkOutput.m_normalOnBInWorld[2]; - - return gjkOutput.m_distance; - } - return -1.0f; -} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp deleted file mode 100644 index 4051d3f3e1f..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-Api.cpp +++ /dev/null @@ -1,91 +0,0 @@ -#include "LinearMath/btVector3.h" -#include "LinearMath/btScalar.h" -#include "LinearMath/btMatrix3x3.h" -#include "LinearMath/btTransform.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/CollisionShapes/btTriangleShape.h" - -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" -#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" -#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" -#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" - -#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" -#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" -#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" -#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" -#include "LinearMath/btStackAlloc.h" - - -extern "C" -double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]) -{ - btTriangleShape trishapeA(btVector3(p1[0], p1[1], p1[2]), btVector3(p2[0], p2[1], p2[2]), btVector3(p3[0], p3[1], p3[2])); - trishapeA.setMargin(0.000001f); - - btTriangleShape trishapeB(btVector3(q1[0], q1[1], q1[2]), btVector3(q2[0], q2[1], q2[2]), btVector3(q3[0], q3[1], q3[2])); - trishapeB.setMargin(0.000001f); - - // btVoronoiSimplexSolver sGjkSimplexSolver; - // btGjkEpaPenetrationDepthSolver penSolverPtr; - - static btSimplexSolverInterface sGjkSimplexSolver; - sGjkSimplexSolver.reset(); - - static btGjkEpaPenetrationDepthSolver Solver0; - static btMinkowskiPenetrationDepthSolver Solver1; - - btConvexPenetrationDepthSolver* Solver = NULL; - - Solver = &Solver1; - - btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); - - convexConvex.m_catchDegeneracies = 1; - - // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0); - - btPointCollector gjkOutput; - btGjkPairDetector::ClosestPointInput input; - - btStackAlloc gStackAlloc(1024*1024*2); - - input.m_stackAlloc = &gStackAlloc; - - btTransform tr; - tr.setIdentity(); - - input.m_transformA = tr; - input.m_transformB = tr; - - convexConvex.getClosestPoints(input, gjkOutput, 0); - - - if (gjkOutput.m_hasResult) - { - - pb[0] = pa[0] = gjkOutput.m_pointInWorld[0]; - pb[1] = pa[1] = gjkOutput.m_pointInWorld[1]; - pb[2] = pa[2] = gjkOutput.m_pointInWorld[2]; - - pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance; - pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance; - pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance; - - normal[0] = gjkOutput.m_normalOnBInWorld[0]; - normal[1] = gjkOutput.m_normalOnBInWorld[1]; - normal[2] = gjkOutput.m_normalOnBInWorld[2]; - - return gjkOutput.m_distance; - } - return -1.0f; -} - - diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp deleted file mode 100644 index 5e330cb64f2..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btContinuousDynamicsWorld.h" -#include "LinearMath/btQuickprof.h" - -//collision detection -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" -#include "BulletCollision/CollisionShapes/btCollisionShape.h" -#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" - -//rigidbody & constraints -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" -#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" -#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" - - - -#include - -btContinuousDynamicsWorld::btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration) -:btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration) -{ -} - -btContinuousDynamicsWorld::~btContinuousDynamicsWorld() -{ -} - - -void btContinuousDynamicsWorld::internalSingleStepSimulation( btScalar timeStep) -{ - - startProfiling(timeStep); - - ///update aabbs information - updateAabbs(); - //static int frame=0; -// printf("frame %d\n",frame++); - - ///apply gravity, predict motion - predictUnconstraintMotion(timeStep); - - btDispatcherInfo& dispatchInfo = getDispatchInfo(); - - dispatchInfo.m_timeStep = timeStep; - dispatchInfo.m_stepCount = 0; - dispatchInfo.m_debugDraw = getDebugDrawer(); - - ///perform collision detection - performDiscreteCollisionDetection(); - - calculateSimulationIslands(); - - - getSolverInfo().m_timeStep = timeStep; - - - - ///solve contact and other joint constraints - solveConstraints(getSolverInfo()); - - ///CallbackTriggers(); - - calculateTimeOfImpacts(timeStep); - - btScalar toi = dispatchInfo.m_timeOfImpact; -// if (toi < 1.f) -// printf("toi = %f\n",toi); - if (toi < 0.f) - printf("toi = %f\n",toi); - - - ///integrate transforms - integrateTransforms(timeStep * toi); - - ///update vehicle simulation - updateVehicles(timeStep); - - - updateActivationState( timeStep ); - -} - -void btContinuousDynamicsWorld::calculateTimeOfImpacts(btScalar timeStep) -{ - ///these should be 'temporal' aabbs! - updateTemporalAabbs(timeStep); - - ///'toi' is the global smallest time of impact. However, we just calculate the time of impact for each object individually. - ///so we handle the case moving versus static properly, and we cheat for moving versus moving - float toi = 1.f; - - - btDispatcherInfo& dispatchInfo = getDispatchInfo(); - dispatchInfo.m_timeStep = timeStep; - dispatchInfo.m_timeOfImpact = 1.f; - dispatchInfo.m_stepCount = 0; - dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_CONTINUOUS; - - ///calculate time of impact for overlapping pairs - - BEGIN_PROFILE("performContinuousCollisionDetection"); - - btDispatcher* dispatcher = getDispatcher(); - if (dispatcher) - dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1); - - END_PROFILE("performContinuousCollisionDetection"); - - toi = dispatchInfo.m_timeOfImpact; - - dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_DISCRETE; - -} - -void btContinuousDynamicsWorld::updateTemporalAabbs(btScalar timeStep) -{ - BEGIN_PROFILE("perform Temporal Broadphase Collision Detection"); - - btVector3 temporalAabbMin,temporalAabbMax; - - for ( int i=0;igetCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),temporalAabbMin,temporalAabbMax); - const btVector3& linvel = body->getLinearVelocity(); - - //make the AABB temporal - float temporalAabbMaxx = temporalAabbMax.getX(); - float temporalAabbMaxy = temporalAabbMax.getY(); - float temporalAabbMaxz = temporalAabbMax.getZ(); - float temporalAabbMinx = temporalAabbMin.getX(); - float temporalAabbMiny = temporalAabbMin.getY(); - float temporalAabbMinz = temporalAabbMin.getZ(); - - // add linear motion - btVector3 linMotion = linvel*timeStep; - - if (linMotion.x() > 0.f) - temporalAabbMaxx += linMotion.x(); - else - temporalAabbMinx += linMotion.x(); - if (linMotion.y() > 0.f) - temporalAabbMaxy += linMotion.y(); - else - temporalAabbMiny += linMotion.y(); - if (linMotion.z() > 0.f) - temporalAabbMaxz += linMotion.z(); - else - temporalAabbMinz += linMotion.z(); - - //add conservative angular motion - btScalar angularMotion(0);// = angvel.length() * GetAngularMotionDisc() * timeStep; - btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion); - temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz); - temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz); - - temporalAabbMin -= angularMotion3d; - temporalAabbMax += angularMotion3d; - - m_broadphasePairCache->setAabb(body->getBroadphaseHandle(),temporalAabbMin,temporalAabbMax,m_dispatcher1); - } - } - - //update aabb (of all moved objects) - - m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1); - - END_PROFILE("perform Temporal Broadphase Collision Detection"); - - -} - - diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h deleted file mode 100644 index 61c8dea03eb..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_CONTINUOUS_DYNAMICS_WORLD_H -#define BT_CONTINUOUS_DYNAMICS_WORLD_H - -#include "btDiscreteDynamicsWorld.h" - -///btContinuousDynamicsWorld adds optional (per object) continuous collision detection for fast moving objects to the btDiscreteDynamicsWorld. -///This copes with fast moving objects that otherwise would tunnel/miss collisions. -///Under construction, don't use yet! Please use btDiscreteDynamicsWorld instead. -class btContinuousDynamicsWorld : public btDiscreteDynamicsWorld -{ - - void updateTemporalAabbs(btScalar timeStep); - - public: - - btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); - virtual ~btContinuousDynamicsWorld(); - - ///time stepping with calculation of time of impact for selected fast moving objects - virtual void internalSingleStepSimulation( btScalar timeStep); - - virtual void calculateTimeOfImpacts(btScalar timeStep); - - virtual btDynamicsWorldType getWorldType() const - { - return BT_CONTINUOUS_DYNAMICS_WORLD; - } - -}; - -#endif //BT_CONTINUOUS_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp deleted file mode 100644 index 88b11c878c5..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp +++ /dev/null @@ -1,1004 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#include "btDiscreteDynamicsWorld.h" - -//collision detection -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" -#include "BulletCollision/CollisionShapes/btCollisionShape.h" -#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" -#include - -//rigidbody & constraints -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" -#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" -#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" - -//for debug rendering -#include "BulletCollision/CollisionShapes/btBoxShape.h" -#include "BulletCollision/CollisionShapes/btCapsuleShape.h" -#include "BulletCollision/CollisionShapes/btCompoundShape.h" -#include "BulletCollision/CollisionShapes/btConeShape.h" -#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btCylinderShape.h" -#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" -#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionShapes/btTriangleCallback.h" -#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" -#include "LinearMath/btIDebugDraw.h" - - - -//vehicle -#include "BulletDynamics/Vehicle/btRaycastVehicle.h" -#include "BulletDynamics/Vehicle/btVehicleRaycaster.h" -#include "BulletDynamics/Vehicle/btWheelInfo.h" -#include "LinearMath/btIDebugDraw.h" -#include "LinearMath/btQuickprof.h" -#include "LinearMath/btMotionState.h" - - - - - -btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration) -:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration), -m_constraintSolver(constraintSolver), -m_debugDrawer(0), -m_gravity(0,-10,0), -m_localTime(btScalar(1.)/btScalar(60.)), -m_profileTimings(0) -{ - if (!m_constraintSolver) - { - void* mem = btAlignedAlloc(sizeof(btSequentialImpulseConstraintSolver),16); - m_constraintSolver = new (mem) btSequentialImpulseConstraintSolver; - m_ownsConstraintSolver = true; - } else - { - m_ownsConstraintSolver = false; - } - - { - void* mem = btAlignedAlloc(sizeof(btSimulationIslandManager),16); - m_islandManager = new (mem) btSimulationIslandManager(); - } - - m_ownsIslandManager = true; -} - - -btDiscreteDynamicsWorld::~btDiscreteDynamicsWorld() -{ - //only delete it when we created it - if (m_ownsIslandManager) - { - m_islandManager->~btSimulationIslandManager(); - btAlignedFree( m_islandManager); - } - if (m_ownsConstraintSolver) - { - - m_constraintSolver->~btConstraintSolver(); - btAlignedFree(m_constraintSolver); - } -} - -void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep) -{ - - for (int i=0;igetActivationState() != ISLAND_SLEEPING) - { - if (body->isKinematicObject()) - { - //to calculate velocities next frame - body->saveKinematicState(timeStep); - } - } - } - } -} - -void btDiscreteDynamicsWorld::synchronizeMotionStates() -{ - //debug vehicle wheels - - - { - //todo: iterate over awake simulation islands! - for ( int i=0;igetDebugMode() & btIDebugDraw::DBG_DrawWireframe) - { - btVector3 color(btScalar(255.),btScalar(255.),btScalar(255.)); - switch(colObj->getActivationState()) - { - case ACTIVE_TAG: - color = btVector3(btScalar(255.),btScalar(255.),btScalar(255.)); break; - case ISLAND_SLEEPING: - color = btVector3(btScalar(0.),btScalar(255.),btScalar(0.));break; - case WANTS_DEACTIVATION: - color = btVector3(btScalar(0.),btScalar(255.),btScalar(255.));break; - case DISABLE_DEACTIVATION: - color = btVector3(btScalar(255.),btScalar(0.),btScalar(0.));break; - case DISABLE_SIMULATION: - color = btVector3(btScalar(255.),btScalar(255.),btScalar(0.));break; - default: - { - color = btVector3(btScalar(255.),btScalar(0.),btScalar(0.)); - } - }; - - debugDrawObject(colObj->getWorldTransform(),colObj->getCollisionShape(),color); - } - btRigidBody* body = btRigidBody::upcast(colObj); - if (body && body->getMotionState() && !body->isStaticOrKinematicObject()) - { - //we need to call the update at least once, even for sleeping objects - //otherwise the 'graphics' transform never updates properly - //so todo: add 'dirty' flag - //if (body->getActivationState() != ISLAND_SLEEPING) - { - btTransform interpolatedTransform; - btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(), - body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime,interpolatedTransform); - body->getMotionState()->setWorldTransform(interpolatedTransform); - } - } - } - } - - if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawWireframe) - { - for ( int i=0;im_vehicles.size();i++) - { - for (int v=0;vgetNumWheels();v++) - { - btVector3 wheelColor(0,255,255); - if (m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_isInContact) - { - wheelColor.setValue(0,0,255); - } else - { - wheelColor.setValue(255,0,255); - } - - //synchronize the wheels with the (interpolated) chassis worldtransform - m_vehicles[i]->updateWheelTransform(v,true); - - btVector3 wheelPosWS = m_vehicles[i]->getWheelInfo(v).m_worldTransform.getOrigin(); - - btVector3 axle = btVector3( - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[0][m_vehicles[i]->getRightAxis()], - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[1][m_vehicles[i]->getRightAxis()], - m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[2][m_vehicles[i]->getRightAxis()]); - - - //m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_wheelAxleWS - //debug wheels (cylinders) - m_debugDrawer->drawLine(wheelPosWS,wheelPosWS+axle,wheelColor); - m_debugDrawer->drawLine(wheelPosWS,m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_contactPointWS,wheelColor); - - } - } - } - -} - - -int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep) -{ - int numSimulationSubSteps = 0; - - if (maxSubSteps) - { - //fixed timestep with interpolation - m_localTime += timeStep; - if (m_localTime >= fixedTimeStep) - { - numSimulationSubSteps = int( m_localTime / fixedTimeStep); - m_localTime -= numSimulationSubSteps * fixedTimeStep; - } - } else - { - //variable timestep - fixedTimeStep = timeStep; - m_localTime = timeStep; - if (btFuzzyZero(timeStep)) - { - numSimulationSubSteps = 0; - maxSubSteps = 0; - } else - { - numSimulationSubSteps = 1; - maxSubSteps = 1; - } - } - - //process some debugging flags - if (getDebugDrawer()) - { - gDisableDeactivation = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_NoDeactivation) != 0; - } - if (numSimulationSubSteps) - { - - saveKinematicState(fixedTimeStep); - - //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt - int clampedSimulationSteps = (numSimulationSubSteps > maxSubSteps)? maxSubSteps : numSimulationSubSteps; - - for (int i=0;isetGravity(gravity); - } - } -} - - -void btDiscreteDynamicsWorld::removeRigidBody(btRigidBody* body) -{ - removeCollisionObject(body); -} - -void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body) -{ - if (!body->isStaticOrKinematicObject()) - { - body->setGravity(m_gravity); - } - - if (body->getCollisionShape()) - { - bool isDynamic = !(body->isStaticObject() || body->isKinematicObject()); - short collisionFilterGroup = isDynamic? short(btBroadphaseProxy::DefaultFilter) : short(btBroadphaseProxy::StaticFilter); - short collisionFilterMask = isDynamic? short(btBroadphaseProxy::AllFilter) : short(btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter); - - addCollisionObject(body,collisionFilterGroup,collisionFilterMask); - } -} - -void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body, short group, short mask) -{ - if (!body->isStaticOrKinematicObject()) - { - body->setGravity(m_gravity); - } - - if (body->getCollisionShape()) - { - addCollisionObject(body,group,mask); - } -} - - -void btDiscreteDynamicsWorld::updateVehicles(btScalar timeStep) -{ - BEGIN_PROFILE("updateVehicles"); - - for ( int i=0;iupdateVehicle( timeStep); - } - END_PROFILE("updateVehicles"); -} - -void btDiscreteDynamicsWorld::updateActivationState(btScalar timeStep) -{ - BEGIN_PROFILE("updateActivationState"); - - for ( int i=0;iupdateDeactivation(timeStep); - - if (body->wantsSleeping()) - { - if (body->isStaticOrKinematicObject()) - { - body->setActivationState(ISLAND_SLEEPING); - } else - { - if (body->getActivationState() == ACTIVE_TAG) - body->setActivationState( WANTS_DEACTIVATION ); - } - } else - { - if (body->getActivationState() != DISABLE_DEACTIVATION) - body->setActivationState( ACTIVE_TAG ); - } - } - } - END_PROFILE("updateActivationState"); -} - -void btDiscreteDynamicsWorld::addConstraint(btTypedConstraint* constraint,bool disableCollisionsBetweenLinkedBodies) -{ - m_constraints.push_back(constraint); - if (disableCollisionsBetweenLinkedBodies) - { - constraint->getRigidBodyA().addConstraintRef(constraint); - constraint->getRigidBodyB().addConstraintRef(constraint); - } -} - -void btDiscreteDynamicsWorld::removeConstraint(btTypedConstraint* constraint) -{ - m_constraints.remove(constraint); - constraint->getRigidBodyA().removeConstraintRef(constraint); - constraint->getRigidBodyB().removeConstraintRef(constraint); -} - -void btDiscreteDynamicsWorld::addVehicle(btRaycastVehicle* vehicle) -{ - m_vehicles.push_back(vehicle); -} - -void btDiscreteDynamicsWorld::removeVehicle(btRaycastVehicle* vehicle) -{ - m_vehicles.remove(vehicle); -} - -SIMD_FORCE_INLINE int btGetConstraintIslandId(const btTypedConstraint* lhs) -{ - int islandId; - - const btCollisionObject& rcolObj0 = lhs->getRigidBodyA(); - const btCollisionObject& rcolObj1 = lhs->getRigidBodyB(); - islandId= rcolObj0.getIslandTag()>=0?rcolObj0.getIslandTag():rcolObj1.getIslandTag(); - return islandId; - -} - - -class btSortConstraintOnIslandPredicate -{ - public: - - bool operator() ( const btTypedConstraint* lhs, const btTypedConstraint* rhs ) - { - int rIslandId0,lIslandId0; - rIslandId0 = btGetConstraintIslandId(rhs); - lIslandId0 = btGetConstraintIslandId(lhs); - return lIslandId0 < rIslandId0; - } -}; - - - - -void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) -{ - - struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCallback - { - - btContactSolverInfo& m_solverInfo; - btConstraintSolver* m_solver; - btTypedConstraint** m_sortedConstraints; - int m_numConstraints; - btIDebugDraw* m_debugDrawer; - btStackAlloc* m_stackAlloc; - btDispatcher* m_dispatcher; - - InplaceSolverIslandCallback( - btContactSolverInfo& solverInfo, - btConstraintSolver* solver, - btTypedConstraint** sortedConstraints, - int numConstraints, - btIDebugDraw* debugDrawer, - btStackAlloc* stackAlloc, - btDispatcher* dispatcher) - :m_solverInfo(solverInfo), - m_solver(solver), - m_sortedConstraints(sortedConstraints), - m_numConstraints(numConstraints), - m_debugDrawer(debugDrawer), - m_stackAlloc(stackAlloc), - m_dispatcher(dispatcher) - { - - } - - InplaceSolverIslandCallback& operator=(InplaceSolverIslandCallback& other) - { - btAssert(0); - (void)other; - return *this; - } - virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifolds,int numManifolds, int islandId) - { - if (islandId<0) - { - ///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id - m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); - } else - { - //also add all non-contact constraints/joints for this island - btTypedConstraint** startConstraint = 0; - int numCurConstraints = 0; - int i; - - //find the first constraint for this island - for (i=0;isolveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher); - - } - } - - }; - - //sorted version of all btTypedConstraint, based on islandId - btAlignedObjectArray sortedConstraints; - sortedConstraints.resize( m_constraints.size()); - int i; - for (i=0;iprepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds()); - - /// solve all the constraints for this island - m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld()->getCollisionObjectArray(),&solverCallback); - - m_constraintSolver->allSolved(solverInfo, m_debugDrawer, m_stackAlloc); -} - - - - -void btDiscreteDynamicsWorld::calculateSimulationIslands() -{ - BEGIN_PROFILE("calculateSimulationIslands"); - - getSimulationIslandManager()->updateActivationState(getCollisionWorld(),getCollisionWorld()->getDispatcher()); - - { - int i; - int numConstraints = int(m_constraints.size()); - for (i=0;i< numConstraints ; i++ ) - { - btTypedConstraint* constraint = m_constraints[i]; - - const btRigidBody* colObj0 = &constraint->getRigidBodyA(); - const btRigidBody* colObj1 = &constraint->getRigidBodyB(); - - if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && - ((colObj1) && ((colObj1)->mergesSimulationIslands()))) - { - if (colObj0->isActive() || colObj1->isActive()) - { - - getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(), - (colObj1)->getIslandTag()); - } - } - } - } - - //Store the island id in each body - getSimulationIslandManager()->storeIslandActivationState(getCollisionWorld()); - - END_PROFILE("calculateSimulationIslands"); - -} - - -void btDiscreteDynamicsWorld::updateAabbs() -{ - BEGIN_PROFILE("updateAabbs"); - - btVector3 colorvec(1,0,0); - btTransform predictedTrans; - for ( int i=0;iIsActive() && (!body->IsStatic())) - { - btPoint3 minAabb,maxAabb; - colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); - btBroadphaseInterface* bp = (btBroadphaseInterface*)m_broadphasePairCache; - - //moving objects should be moderately sized, probably something wrong if not - if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12))) - { - bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); - } else - { - //something went wrong, investigate - //this assert is unwanted in 3D modelers (danger of loosing work) - body->setActivationState(DISABLE_SIMULATION); - - static bool reportMe = true; - if (reportMe && m_debugDrawer) - { - reportMe = false; - m_debugDrawer->reportErrorWarning("Overflow in AABB, object removed from simulation"); - m_debugDrawer->reportErrorWarning("If you can reproduce this, please email bugs@continuousphysics.com\n"); - m_debugDrawer->reportErrorWarning("Please include above information, your Platform, version of OS.\n"); - m_debugDrawer->reportErrorWarning("Thanks.\n"); - } - - - } - if (m_debugDrawer && (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawAabb)) - { - m_debugDrawer->drawAabb(minAabb,maxAabb,colorvec); - } - } - } - } - - END_PROFILE("updateAabbs"); -} - -void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep) -{ - BEGIN_PROFILE("integrateTransforms"); - btTransform predictedTrans; - for ( int i=0;iisActive() && (!body->isStaticOrKinematicObject())) - { - body->predictIntegratedTransform(timeStep, predictedTrans); - body->proceedToTransform( predictedTrans); - } - } - } - END_PROFILE("integrateTransforms"); -} - - - -void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) -{ - BEGIN_PROFILE("predictUnconstraintMotion"); - for ( int i=0;iisStaticOrKinematicObject()) - { - if (body->isActive()) - { - body->applyForces( timeStep); - body->integrateVelocities( timeStep); - body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); - } - } - } - } - END_PROFILE("predictUnconstraintMotion"); -} - - -void btDiscreteDynamicsWorld::startProfiling(btScalar timeStep) -{ - (void)timeStep; - #ifdef USE_QUICKPROF - - - //toggle btProfiler - if ( m_debugDrawer && m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_ProfileTimings) - { - if (!m_profileTimings) - { - m_profileTimings = 1; - // To disable profiling, simply comment out the following line. - static int counter = 0; - - char filename[128]; - sprintf(filename,"quickprof_bullet_timings%i.csv",counter++); - btProfiler::init(filename, btProfiler::BLOCK_CYCLE_SECONDS);//BLOCK_TOTAL_MICROSECONDS - } else - { - btProfiler::endProfilingCycle(); - } - - } else - { - if (m_profileTimings) - { - btProfiler::endProfilingCycle(); - - m_profileTimings = 0; - btProfiler::destroy(); - } - } -#endif //USE_QUICKPROF -} - - - - - - -class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIndexCallback -{ - btIDebugDraw* m_debugDrawer; - btVector3 m_color; - btTransform m_worldTrans; - -public: - - DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color) : - m_debugDrawer(debugDrawer), - m_color(color), - m_worldTrans(worldTrans) - { - } - - virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) - { - processTriangle(triangle,partId,triangleIndex); - } - - virtual void processTriangle(btVector3* triangle,int partId, int triangleIndex) - { - (void)partId; - (void)triangleIndex; - - btVector3 wv0,wv1,wv2; - wv0 = m_worldTrans*triangle[0]; - wv1 = m_worldTrans*triangle[1]; - wv2 = m_worldTrans*triangle[2]; - m_debugDrawer->drawLine(wv0,wv1,m_color); - m_debugDrawer->drawLine(wv1,wv2,m_color); - m_debugDrawer->drawLine(wv2,wv0,m_color); - } -}; - -void btDiscreteDynamicsWorld::debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color) -{ - btVector3 start = transform.getOrigin(); - - const btVector3 xoffs = transform.getBasis() * btVector3(radius,0,0); - const btVector3 yoffs = transform.getBasis() * btVector3(0,radius,0); - const btVector3 zoffs = transform.getBasis() * btVector3(0,0,radius); - - // XY - getDebugDrawer()->drawLine(start-xoffs, start+yoffs, color); - getDebugDrawer()->drawLine(start+yoffs, start+xoffs, color); - getDebugDrawer()->drawLine(start+xoffs, start-yoffs, color); - getDebugDrawer()->drawLine(start-yoffs, start-xoffs, color); - - // XZ - getDebugDrawer()->drawLine(start-xoffs, start+zoffs, color); - getDebugDrawer()->drawLine(start+zoffs, start+xoffs, color); - getDebugDrawer()->drawLine(start+xoffs, start-zoffs, color); - getDebugDrawer()->drawLine(start-zoffs, start-xoffs, color); - - // YZ - getDebugDrawer()->drawLine(start-yoffs, start+zoffs, color); - getDebugDrawer()->drawLine(start+zoffs, start+yoffs, color); - getDebugDrawer()->drawLine(start+yoffs, start-zoffs, color); - getDebugDrawer()->drawLine(start-zoffs, start-yoffs, color); -} - -void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color) -{ - // Draw a small simplex at the center of the object - { - btVector3 start = worldTransform.getOrigin(); - getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(1,0,0), btVector3(1,0,0)); - getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(0,1,0), btVector3(0,1,0)); - getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(0,0,1), btVector3(0,0,1)); - } - - if (shape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) - { - const btCompoundShape* compoundShape = static_cast(shape); - for (int i=compoundShape->getNumChildShapes()-1;i>=0;i--) - { - btTransform childTrans = compoundShape->getChildTransform(i); - const btCollisionShape* colShape = compoundShape->getChildShape(i); - debugDrawObject(worldTransform*childTrans,colShape,color); - } - - } else - { - switch (shape->getShapeType()) - { - - case SPHERE_SHAPE_PROXYTYPE: - { - const btSphereShape* sphereShape = static_cast(shape); - btScalar radius = sphereShape->getMargin();//radius doesn't include the margin, so draw with margin - - debugDrawSphere(radius, worldTransform, color); - break; - } - case MULTI_SPHERE_SHAPE_PROXYTYPE: - { - const btMultiSphereShape* multiSphereShape = static_cast(shape); - - for (int i = multiSphereShape->getSphereCount()-1; i>=0;i--) - { - btTransform childTransform = worldTransform; - childTransform.getOrigin() += multiSphereShape->getSpherePosition(i); - debugDrawSphere(multiSphereShape->getSphereRadius(i), childTransform, color); - } - - break; - } - case CAPSULE_SHAPE_PROXYTYPE: - { - const btCapsuleShape* capsuleShape = static_cast(shape); - - btScalar radius = capsuleShape->getRadius(); - btScalar halfHeight = capsuleShape->getHalfHeight(); - - // Draw the ends - { - btTransform childTransform = worldTransform; - childTransform.getOrigin() = worldTransform * btVector3(0,halfHeight,0); - debugDrawSphere(radius, childTransform, color); - } - - { - btTransform childTransform = worldTransform; - childTransform.getOrigin() = worldTransform * btVector3(0,-halfHeight,0); - debugDrawSphere(radius, childTransform, color); - } - - // Draw some additional lines - btVector3 start = worldTransform.getOrigin(); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(-radius,halfHeight,0),start+worldTransform.getBasis() * btVector3(-radius,-halfHeight,0), color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(radius,halfHeight,0),start+worldTransform.getBasis() * btVector3(radius,-halfHeight,0), color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(0,halfHeight,-radius),start+worldTransform.getBasis() * btVector3(0,-halfHeight,-radius), color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(0,halfHeight,radius),start+worldTransform.getBasis() * btVector3(0,-halfHeight,radius), color); - - break; - } - case CONE_SHAPE_PROXYTYPE: - { - const btConeShape* coneShape = static_cast(shape); - btScalar radius = coneShape->getRadius();//+coneShape->getMargin(); - btScalar height = coneShape->getHeight();//+coneShape->getMargin(); - btVector3 start = worldTransform.getOrigin(); - - int upAxis= coneShape->getConeUpIndex(); - - - btVector3 offsetHeight(0,0,0); - offsetHeight[upAxis] = height * btScalar(0.5); - btVector3 offsetRadius(0,0,0); - offsetRadius[(upAxis+1)%3] = radius; - btVector3 offset2Radius(0,0,0); - offset2Radius[(upAxis+2)%3] = radius; - - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offsetRadius),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offsetRadius),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight+offset2Radius),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight),start+worldTransform.getBasis() * (-offsetHeight-offset2Radius),color); - - - - break; - - } - case CYLINDER_SHAPE_PROXYTYPE: - { - const btCylinderShape* cylinder = static_cast(shape); - int upAxis = cylinder->getUpAxis(); - btScalar radius = cylinder->getRadius(); - btScalar halfHeight = cylinder->getHalfExtentsWithMargin()[upAxis]; - btVector3 start = worldTransform.getOrigin(); - btVector3 offsetHeight(0,0,0); - offsetHeight[upAxis] = halfHeight; - btVector3 offsetRadius(0,0,0); - offsetRadius[(upAxis+1)%3] = radius; - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight+offsetRadius),start+worldTransform.getBasis() * (-offsetHeight+offsetRadius),color); - getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight-offsetRadius),start+worldTransform.getBasis() * (-offsetHeight-offsetRadius),color); - break; - } - default: - { - - if (shape->isConcave()) - { - btConcaveShape* concaveMesh = (btConcaveShape*) shape; - - //todo pass camera, for some culling - btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - - DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color); - concaveMesh->processAllTriangles(&drawCallback,aabbMin,aabbMax); - - } - - if (shape->getShapeType() == CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE) - { - btConvexTriangleMeshShape* convexMesh = (btConvexTriangleMeshShape*) shape; - //todo: pass camera for some culling - btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); - btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); - //DebugDrawcallback drawCallback; - DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color); - convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax); - } - - - /// for polyhedral shapes - if (shape->isPolyhedral()) - { - btPolyhedralConvexShape* polyshape = (btPolyhedralConvexShape*) shape; - - int i; - for (i=0;igetNumEdges();i++) - { - btPoint3 a,b; - polyshape->getEdge(i,a,b); - btVector3 wa = worldTransform * a; - btVector3 wb = worldTransform * b; - getDebugDrawer()->drawLine(wa,wb,color); - - } - - - } - } - } - } -} - - -void btDiscreteDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) -{ - if (m_ownsConstraintSolver) - { - btAlignedFree( m_constraintSolver); - } - m_ownsConstraintSolver = false; - m_constraintSolver = solver; -} - -btConstraintSolver* btDiscreteDynamicsWorld::getConstraintSolver() -{ - return m_constraintSolver; -} - - -int btDiscreteDynamicsWorld::getNumConstraints() const -{ - return int(m_constraints.size()); -} -btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) -{ - return m_constraints[index]; -} -const btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) const -{ - return m_constraints[index]; -} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h deleted file mode 100644 index 7364c4cd6b9..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h +++ /dev/null @@ -1,164 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_DISCRETE_DYNAMICS_WORLD_H -#define BT_DISCRETE_DYNAMICS_WORLD_H - -#include "btDynamicsWorld.h" - -class btDispatcher; -class btOverlappingPairCache; -class btConstraintSolver; -class btSimulationIslandManager; -class btTypedConstraint; -#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" - -class btRaycastVehicle; -class btIDebugDraw; -#include "LinearMath/btAlignedObjectArray.h" - - -///btDiscreteDynamicsWorld provides discrete rigid body simulation -///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController -class btDiscreteDynamicsWorld : public btDynamicsWorld -{ -protected: - - btConstraintSolver* m_constraintSolver; - - btSimulationIslandManager* m_islandManager; - - btAlignedObjectArray m_constraints; - - btIDebugDraw* m_debugDrawer; - - btVector3 m_gravity; - - //for variable timesteps - btScalar m_localTime; - //for variable timesteps - - bool m_ownsIslandManager; - bool m_ownsConstraintSolver; - - btContactSolverInfo m_solverInfo; - - - btAlignedObjectArray m_vehicles; - - int m_profileTimings; - - void predictUnconstraintMotion(btScalar timeStep); - - void integrateTransforms(btScalar timeStep); - - void calculateSimulationIslands(); - - void solveConstraints(btContactSolverInfo& solverInfo); - - void updateActivationState(btScalar timeStep); - - void updateVehicles(btScalar timeStep); - - void startProfiling(btScalar timeStep); - - virtual void internalSingleStepSimulation( btScalar timeStep); - - void synchronizeMotionStates(); - - void saveKinematicState(btScalar timeStep); - - void debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color); - -public: - - - ///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those - btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); - - virtual ~btDiscreteDynamicsWorld(); - - ///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's - virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); - - virtual void updateAabbs(); - - void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false); - - void removeConstraint(btTypedConstraint* constraint); - - void addVehicle(btRaycastVehicle* vehicle); - - void removeVehicle(btRaycastVehicle* vehicle); - - btSimulationIslandManager* getSimulationIslandManager() - { - return m_islandManager; - } - - const btSimulationIslandManager* getSimulationIslandManager() const - { - return m_islandManager; - } - - btCollisionWorld* getCollisionWorld() - { - return this; - } - - virtual void setDebugDrawer(btIDebugDraw* debugDrawer) - { - m_debugDrawer = debugDrawer; - } - - virtual btIDebugDraw* getDebugDrawer() - { - return m_debugDrawer; - } - - virtual void setGravity(const btVector3& gravity); - - virtual void addRigidBody(btRigidBody* body); - - virtual void addRigidBody(btRigidBody* body, short group, short mask); - - virtual void removeRigidBody(btRigidBody* body); - - void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color); - - virtual void setConstraintSolver(btConstraintSolver* solver); - - virtual btConstraintSolver* getConstraintSolver(); - - virtual int getNumConstraints() const; - - virtual btTypedConstraint* getConstraint(int index) ; - - virtual const btTypedConstraint* getConstraint(int index) const; - - btContactSolverInfo& getSolverInfo() - { - return m_solverInfo; - } - - virtual btDynamicsWorldType getWorldType() const - { - return BT_DISCRETE_DYNAMICS_WORLD; - } - - -}; - -#endif //BT_DISCRETE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h deleted file mode 100644 index a4c8bf3c559..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_DYNAMICS_WORLD_H -#define BT_DYNAMICS_WORLD_H - -#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" -class btTypedConstraint; -class btRaycastVehicle; -class btConstraintSolver; - - -enum btDynamicsWorldType -{ - BT_SIMPLE_DYNAMICS_WORLD=1, - BT_DISCRETE_DYNAMICS_WORLD=2, - BT_CONTINUOUS_DYNAMICS_WORLD=3 -}; - -///btDynamicsWorld is the baseclass for several dynamics implementation, basic, discrete, parallel, and continuous -class btDynamicsWorld : public btCollisionWorld -{ - public: - - - btDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphase,btCollisionConfiguration* collisionConfiguration) - :btCollisionWorld(dispatcher,broadphase,collisionConfiguration) - { - } - - virtual ~btDynamicsWorld() - { - } - - ///stepSimulation proceeds the simulation over timeStep units - ///if maxSubSteps > 0, it will interpolate time steps - virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0; - - virtual void updateAabbs() = 0; - - virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false) { (void)constraint;}; - - virtual void removeConstraint(btTypedConstraint* constraint) {(void)constraint;}; - - virtual void addVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}; - - virtual void removeVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}; - - - virtual void setDebugDrawer(btIDebugDraw* debugDrawer) = 0; - - virtual btIDebugDraw* getDebugDrawer() = 0; - - //once a rigidbody is added to the dynamics world, it will get this gravity assigned - //existing rigidbodies in the world get gravity assigned too, during this method - virtual void setGravity(const btVector3& gravity) = 0; - - virtual void addRigidBody(btRigidBody* body) = 0; - - virtual void removeRigidBody(btRigidBody* body) = 0; - - virtual void setConstraintSolver(btConstraintSolver* solver) = 0; - - virtual btConstraintSolver* getConstraintSolver() = 0; - - virtual int getNumConstraints() const { return 0; } - - virtual btTypedConstraint* getConstraint(int index) { (void)index; return 0; } - - virtual const btTypedConstraint* getConstraint(int index) const { (void)index; return 0; } - - virtual btDynamicsWorldType getWorldType() const=0; - -}; - -#endif //BT_DYNAMICS_WORLD_H - diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp deleted file mode 100644 index 03e60acdb19..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btRigidBody.h" -#include "BulletCollision/CollisionShapes/btConvexShape.h" -#include "LinearMath/btMinMax.h" -#include "LinearMath/btTransformUtil.h" -#include "LinearMath/btMotionState.h" -#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" - -btScalar gLinearAirDamping = btScalar(1.); -//'temporarily' global variables -btScalar gDeactivationTime = btScalar(2.); -bool gDisableDeactivation = false; - -btScalar gLinearSleepingThreshold = btScalar(0.8); -btScalar gAngularSleepingThreshold = btScalar(1.0); -static int uniqueId = 0; - -btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution) -: - m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), - m_angularFactor(btScalar(1.)), - m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_linearDamping(btScalar(0.)), - m_angularDamping(btScalar(0.5)), - m_linearSleepingThreshold(gLinearSleepingThreshold), - m_angularSleepingThreshold(gAngularSleepingThreshold), - m_optionalMotionState(motionState), - m_contactSolverType(0), - m_frictionSolverType(0) -{ - - if (motionState) - { - motionState->getWorldTransform(m_worldTransform); - } else - { - m_worldTransform = btTransform::getIdentity(); - } - - m_interpolationWorldTransform = m_worldTransform; - m_interpolationLinearVelocity.setValue(0,0,0); - m_interpolationAngularVelocity.setValue(0,0,0); - - //moved to btCollisionObject - m_friction = friction; - m_restitution = restitution; - - m_collisionShape = collisionShape; - m_debugBodyId = uniqueId++; - - //m_internalOwner is to allow upcasting from collision object to rigid body - m_internalOwner = this; - - setMassProps(mass, localInertia); - setDamping(linearDamping, angularDamping); - updateInertiaTensor(); - -} - -#ifdef OBSOLETE_MOTIONSTATE_LESS -btRigidBody::btRigidBody( btScalar mass,const btTransform& worldTransform,btCollisionShape* collisionShape,const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution) -: - m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), - m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), - m_linearSleepingThreshold(gLinearSleepingThreshold), - m_angularSleepingThreshold(gAngularSleepingThreshold), - m_linearDamping(btScalar(0.)), - m_angularDamping(btScalar(0.5)), - m_optionalMotionState(0), - m_contactSolverType(0), - m_frictionSolverType(0) - -{ - - m_worldTransform = worldTransform; - m_interpolationWorldTransform = m_worldTransform; - m_interpolationLinearVelocity.setValue(0,0,0); - m_interpolationAngularVelocity.setValue(0,0,0); - - //moved to btCollisionObject - m_friction = friction; - m_restitution = restitution; - - m_collisionShape = collisionShape; - m_debugBodyId = uniqueId++; - - //m_internalOwner is to allow upcasting from collision object to rigid body - m_internalOwner = this; - - setMassProps(mass, localInertia); - setDamping(linearDamping, angularDamping); - updateInertiaTensor(); - -} - -#endif //OBSOLETE_MOTIONSTATE_LESS - - - - -#define EXPERIMENTAL_JITTER_REMOVAL 1 -#ifdef EXPERIMENTAL_JITTER_REMOVAL -//Bullet 2.20b has experimental damping code to reduce jitter just before objects fall asleep/deactivate -//doesn't work very well yet (value 0 disabled this damping) -//note there this influences deactivation thresholds! -btScalar gClippedAngvelThresholdSqr = btScalar(0.01); -btScalar gClippedLinearThresholdSqr = btScalar(0.01); -#endif //EXPERIMENTAL_JITTER_REMOVAL - -btScalar gJitterVelocityDampingFactor = btScalar(0.7); - -void btRigidBody::predictIntegratedTransform(btScalar timeStep,btTransform& predictedTransform) -{ - -#ifdef EXPERIMENTAL_JITTER_REMOVAL - //if (wantsSleeping()) - { - //clip to avoid jitter - if ((m_angularVelocity.length2() < gClippedAngvelThresholdSqr) && - (m_linearVelocity.length2() < gClippedLinearThresholdSqr)) - { - m_angularVelocity *= gJitterVelocityDampingFactor; - m_linearVelocity *= gJitterVelocityDampingFactor; - } - } - -#endif //EXPERIMENTAL_JITTER_REMOVAL - - btTransformUtil::integrateTransform(m_worldTransform,m_linearVelocity,m_angularVelocity,timeStep,predictedTransform); -} - -void btRigidBody::saveKinematicState(btScalar timeStep) -{ - //todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities - if (timeStep != btScalar(0.)) - { - //if we use motionstate to synchronize world transforms, get the new kinematic/animated world transform - if (getMotionState()) - getMotionState()->getWorldTransform(m_worldTransform); - btVector3 linVel,angVel; - - btTransformUtil::calculateVelocity(m_interpolationWorldTransform,m_worldTransform,timeStep,m_linearVelocity,m_angularVelocity); - m_interpolationLinearVelocity = m_linearVelocity; - m_interpolationAngularVelocity = m_angularVelocity; - m_interpolationWorldTransform = m_worldTransform; - //printf("angular = %f %f %f\n",m_angularVelocity.getX(),m_angularVelocity.getY(),m_angularVelocity.getZ()); - } -} - -void btRigidBody::getAabb(btVector3& aabbMin,btVector3& aabbMax) const -{ - getCollisionShape()->getAabb(m_worldTransform,aabbMin,aabbMax); -} - - - - -void btRigidBody::setGravity(const btVector3& acceleration) -{ - if (m_inverseMass != btScalar(0.0)) - { - m_gravity = acceleration * (btScalar(1.0) / m_inverseMass); - } -} - - - - - - -void btRigidBody::setDamping(btScalar lin_damping, btScalar ang_damping) -{ - m_linearDamping = GEN_clamped(lin_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); - m_angularDamping = GEN_clamped(ang_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); -} - - - -#include - - -void btRigidBody::applyForces(btScalar step) -{ - if (isStaticOrKinematicObject()) - return; - - applyCentralForce(m_gravity); - - m_linearVelocity *= GEN_clamped((btScalar(1.) - step * gLinearAirDamping * m_linearDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); - m_angularVelocity *= GEN_clamped((btScalar(1.) - step * m_angularDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); - -#define FORCE_VELOCITY_DAMPING 1 -#ifdef FORCE_VELOCITY_DAMPING - btScalar speed = m_linearVelocity.length(); - if (speed < m_linearDamping) - { - btScalar dampVel = btScalar(0.005); - if (speed > dampVel) - { - btVector3 dir = m_linearVelocity.normalized(); - m_linearVelocity -= dir * dampVel; - } else - { - m_linearVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - } - } - - btScalar angSpeed = m_angularVelocity.length(); - if (angSpeed < m_angularDamping) - { - btScalar angDampVel = btScalar(0.005); - if (angSpeed > angDampVel) - { - btVector3 dir = m_angularVelocity.normalized(); - m_angularVelocity -= dir * angDampVel; - } else - { - m_angularVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); - } - } -#endif //FORCE_VELOCITY_DAMPING - -} - -void btRigidBody::proceedToTransform(const btTransform& newTrans) -{ - setCenterOfMassTransform( newTrans ); -} - - -void btRigidBody::setMassProps(btScalar mass, const btVector3& inertia) -{ - if (mass == btScalar(0.)) - { - m_collisionFlags |= btCollisionObject::CF_STATIC_OBJECT; - m_inverseMass = btScalar(0.); - } else - { - m_collisionFlags &= (~btCollisionObject::CF_STATIC_OBJECT); - m_inverseMass = btScalar(1.0) / mass; - } - - m_invInertiaLocal.setValue(inertia.x() != btScalar(0.0) ? btScalar(1.0) / inertia.x(): btScalar(0.0), - inertia.y() != btScalar(0.0) ? btScalar(1.0) / inertia.y(): btScalar(0.0), - inertia.z() != btScalar(0.0) ? btScalar(1.0) / inertia.z(): btScalar(0.0)); - -} - - - -void btRigidBody::updateInertiaTensor() -{ - m_invInertiaTensorWorld = m_worldTransform.getBasis().scaled(m_invInertiaLocal) * m_worldTransform.getBasis().transpose(); -} - - -void btRigidBody::integrateVelocities(btScalar step) -{ - if (isStaticOrKinematicObject()) - return; - - m_linearVelocity += m_totalForce * (m_inverseMass * step); - m_angularVelocity += m_invInertiaTensorWorld * m_totalTorque * step; - -#define MAX_ANGVEL SIMD_HALF_PI - /// clamp angular velocity. collision calculations will fail on higher angular velocities - btScalar angvel = m_angularVelocity.length(); - if (angvel*step > MAX_ANGVEL) - { - m_angularVelocity *= (MAX_ANGVEL/step) /angvel; - } - - clearForces(); -} - -btQuaternion btRigidBody::getOrientation() const -{ - btQuaternion orn; - m_worldTransform.getBasis().getRotation(orn); - return orn; -} - - -void btRigidBody::setCenterOfMassTransform(const btTransform& xform) -{ - - if (isStaticOrKinematicObject()) - { - m_interpolationWorldTransform = m_worldTransform; - } else - { - m_interpolationWorldTransform = xform; - } - m_interpolationLinearVelocity = getLinearVelocity(); - m_interpolationAngularVelocity = getAngularVelocity(); - m_worldTransform = xform; - updateInertiaTensor(); -} - - -bool btRigidBody::checkCollideWithOverride(btCollisionObject* co) -{ - btRigidBody* otherRb = btRigidBody::upcast(co); - if (!otherRb) - return true; - - for (int i = 0; i < m_constraintRefs.size(); ++i) - { - btTypedConstraint* c = m_constraintRefs[i]; - if (&c->getRigidBodyA() == otherRb || &c->getRigidBodyB() == otherRb) - return false; - } - - return true; -} - -void btRigidBody::addConstraintRef(btTypedConstraint* c) -{ - int index = m_constraintRefs.findLinearSearch(c); - if (index == m_constraintRefs.size()) - m_constraintRefs.push_back(c); - - m_checkCollideWith = true; -} - -void btRigidBody::removeConstraintRef(btTypedConstraint* c) -{ - m_constraintRefs.remove(c); - m_checkCollideWith = m_constraintRefs.size() > 0; -} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h deleted file mode 100644 index b11f9f76d7d..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h +++ /dev/null @@ -1,385 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef RIGIDBODY_H -#define RIGIDBODY_H - -#include "LinearMath/btAlignedObjectArray.h" -#include "LinearMath/btPoint3.h" -#include "LinearMath/btTransform.h" -#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" - -class btCollisionShape; -class btMotionState; -class btTypedConstraint; - - -extern btScalar gLinearAirDamping; - -extern btScalar gDeactivationTime; -extern bool gDisableDeactivation; -extern btScalar gLinearSleepingThreshold; -extern btScalar gAngularSleepingThreshold; - - -/// btRigidBody class for btRigidBody Dynamics -/// -class btRigidBody : public btCollisionObject -{ - - btMatrix3x3 m_invInertiaTensorWorld; - btVector3 m_linearVelocity; - btVector3 m_angularVelocity; - btScalar m_inverseMass; - btScalar m_angularFactor; - - btVector3 m_gravity; - btVector3 m_invInertiaLocal; - btVector3 m_totalForce; - btVector3 m_totalTorque; - - btScalar m_linearDamping; - btScalar m_angularDamping; - - btScalar m_linearSleepingThreshold; - btScalar m_angularSleepingThreshold; - - - //m_optionalMotionState allows to automatic synchronize the world transform for active objects - btMotionState* m_optionalMotionState; - - //keep track of typed constraints referencing this rigid body - btAlignedObjectArray m_constraintRefs; - -public: - -#ifdef OBSOLETE_MOTIONSTATE_LESS - //not supported, please use btMotionState - btRigidBody(btScalar mass, const btTransform& worldTransform, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=btScalar(0.),btScalar angularDamping=btScalar(0.),btScalar friction=btScalar(0.5),btScalar restitution=btScalar(0.)); -#endif //OBSOLETE_MOTIONSTATE_LESS - - btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=btScalar(0.),btScalar angularDamping=btScalar(0.),btScalar friction=btScalar(0.5),btScalar restitution=btScalar(0.)); - - virtual ~btRigidBody() - { - //No constraints should point to this rigidbody - //Remove constraints from the dynamics world before you delete the related rigidbodies. - btAssert(m_constraintRefs.size()==0); - } - - - void proceedToTransform(const btTransform& newTrans); - - ///to keep collision detection and dynamics separate we don't store a rigidbody pointer - ///but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast - static const btRigidBody* upcast(const btCollisionObject* colObj) - { - return (const btRigidBody*)colObj->getInternalOwner(); - } - static btRigidBody* upcast(btCollisionObject* colObj) - { - return (btRigidBody*)colObj->getInternalOwner(); - } - - /// continuous collision detection needs prediction - void predictIntegratedTransform(btScalar step, btTransform& predictedTransform) ; - - void saveKinematicState(btScalar step); - - - void applyForces(btScalar step); - - void setGravity(const btVector3& acceleration); - - const btVector3& getGravity() const - { - return m_gravity; - } - - void setDamping(btScalar lin_damping, btScalar ang_damping); - - SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const { - return m_collisionShape; - } - - SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() { - return m_collisionShape; - } - - void setMassProps(btScalar mass, const btVector3& inertia); - - btScalar getInvMass() const { return m_inverseMass; } - const btMatrix3x3& getInvInertiaTensorWorld() const { - return m_invInertiaTensorWorld; - } - - void integrateVelocities(btScalar step); - - void setCenterOfMassTransform(const btTransform& xform); - - void applyCentralForce(const btVector3& force) - { - m_totalForce += force; - } - - const btVector3& getInvInertiaDiagLocal() - { - return m_invInertiaLocal; - }; - - void setInvInertiaDiagLocal(const btVector3& diagInvInertia) - { - m_invInertiaLocal = diagInvInertia; - } - - void setSleepingThresholds(btScalar linear,btScalar angular) - { - m_linearSleepingThreshold = linear; - m_angularSleepingThreshold = angular; - } - - void applyTorque(const btVector3& torque) - { - m_totalTorque += torque; - } - - void applyForce(const btVector3& force, const btVector3& rel_pos) - { - applyCentralForce(force); - applyTorque(rel_pos.cross(force)); - } - - void applyCentralImpulse(const btVector3& impulse) - { - m_linearVelocity += impulse * m_inverseMass; - } - - void applyTorqueImpulse(const btVector3& torque) - { - m_angularVelocity += m_invInertiaTensorWorld * torque; - } - - void applyImpulse(const btVector3& impulse, const btVector3& rel_pos) - { - if (m_inverseMass != btScalar(0.)) - { - applyCentralImpulse(impulse); - if (m_angularFactor) - { - applyTorqueImpulse(rel_pos.cross(impulse)*m_angularFactor); - } - } - } - - //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position - SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) - { - if (m_inverseMass != btScalar(0.)) - { - m_linearVelocity += linearComponent*impulseMagnitude; - if (m_angularFactor) - { - m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor; - } - } - } - - void clearForces() - { - m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); - m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); - } - - void updateInertiaTensor(); - - const btPoint3& getCenterOfMassPosition() const { - return m_worldTransform.getOrigin(); - } - btQuaternion getOrientation() const; - - const btTransform& getCenterOfMassTransform() const { - return m_worldTransform; - } - const btVector3& getLinearVelocity() const { - return m_linearVelocity; - } - const btVector3& getAngularVelocity() const { - return m_angularVelocity; - } - - - inline void setLinearVelocity(const btVector3& lin_vel) - { - assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); - m_linearVelocity = lin_vel; - } - - inline void setAngularVelocity(const btVector3& ang_vel) { - assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); - { - m_angularVelocity = ang_vel; - } - } - - btVector3 getVelocityInLocalPoint(const btVector3& rel_pos) const - { - //we also calculate lin/ang velocity for kinematic objects - return m_linearVelocity + m_angularVelocity.cross(rel_pos); - - //for kinematic objects, we could also use use: - // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep; - } - - void translate(const btVector3& v) - { - m_worldTransform.getOrigin() += v; - } - - - void getAabb(btVector3& aabbMin,btVector3& aabbMax) const; - - - - - - SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btPoint3& pos, const btVector3& normal) const - { - btVector3 r0 = pos - getCenterOfMassPosition(); - - btVector3 c0 = (r0).cross(normal); - - btVector3 vec = (c0 * getInvInertiaTensorWorld()).cross(r0); - - return m_inverseMass + normal.dot(vec); - - } - - SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3& axis) const - { - btVector3 vec = axis * getInvInertiaTensorWorld(); - return axis.dot(vec); - } - - SIMD_FORCE_INLINE void updateDeactivation(btScalar timeStep) - { - if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION)) - return; - - if ((getLinearVelocity().length2() < m_linearSleepingThreshold*m_linearSleepingThreshold) && - (getAngularVelocity().length2() < m_angularSleepingThreshold*m_angularSleepingThreshold)) - { - m_deactivationTime += timeStep; - } else - { - m_deactivationTime=btScalar(0.); - setActivationState(0); - } - - } - - SIMD_FORCE_INLINE bool wantsSleeping() - { - - if (getActivationState() == DISABLE_DEACTIVATION) - return false; - - //disable deactivation - if (gDisableDeactivation || (gDeactivationTime == btScalar(0.))) - return false; - - if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION)) - return true; - - if (m_deactivationTime> gDeactivationTime) - { - return true; - } - return false; - } - - - - const btBroadphaseProxy* getBroadphaseProxy() const - { - return m_broadphaseHandle; - } - btBroadphaseProxy* getBroadphaseProxy() - { - return m_broadphaseHandle; - } - void setNewBroadphaseProxy(btBroadphaseProxy* broadphaseProxy) - { - m_broadphaseHandle = broadphaseProxy; - } - - //btMotionState allows to automatic synchronize the world transform for active objects - btMotionState* getMotionState() - { - return m_optionalMotionState; - } - const btMotionState* getMotionState() const - { - return m_optionalMotionState; - } - void setMotionState(btMotionState* motionState) - { - m_optionalMotionState = motionState; - if (m_optionalMotionState) - motionState->getWorldTransform(m_worldTransform); - } - - //for experimental overriding of friction/contact solver func - int m_contactSolverType; - int m_frictionSolverType; - - void setAngularFactor(btScalar angFac) - { - m_angularFactor = angFac; - } - btScalar getAngularFactor() const - { - return m_angularFactor; - } - - //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase? - bool isInWorld() const - { - return (getBroadphaseProxy() != 0); - } - - virtual bool checkCollideWithOverride(btCollisionObject* co); - - void addConstraintRef(btTypedConstraint* c); - void removeConstraintRef(btTypedConstraint* c); - - btTypedConstraint* getConstraintRef(int index) - { - return m_constraintRefs[index]; - } - - int getNumConstraintRefs() - { - return m_constraintRefs.size(); - } - - - int m_debugBodyId; -}; - - - -#endif - diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp deleted file mode 100644 index 3a78ec54f1c..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btSimpleDynamicsWorld.h" -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" -#include "BulletCollision/CollisionShapes/btCollisionShape.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" -#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" - - -/* - Make sure this dummy function never changes so that it - can be used by probes that are checking whether the - library is actually installed. -*/ -extern "C" void btBulletDynamicsProbe () {} - - - - -btSimpleDynamicsWorld::btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration) -:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration), -m_constraintSolver(constraintSolver), -m_ownsConstraintSolver(false), -m_debugDrawer(0), -m_gravity(0,0,-10) -{ - -} - - -btSimpleDynamicsWorld::~btSimpleDynamicsWorld() -{ - if (m_ownsConstraintSolver) - btAlignedFree( m_constraintSolver); -} - -int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep) -{ - (void)fixedTimeStep; - (void)maxSubSteps; - - - ///apply gravity, predict motion - predictUnconstraintMotion(timeStep); - - btDispatcherInfo& dispatchInfo = getDispatchInfo(); - dispatchInfo.m_timeStep = timeStep; - dispatchInfo.m_stepCount = 0; - dispatchInfo.m_debugDraw = getDebugDrawer(); - - ///perform collision detection - performDiscreteCollisionDetection(); - - ///solve contact constraints - int numManifolds = m_dispatcher1->getNumManifolds(); - if (numManifolds) - { - btPersistentManifold** manifoldPtr = ((btCollisionDispatcher*)m_dispatcher1)->getInternalManifoldPointer(); - - btContactSolverInfo infoGlobal; - infoGlobal.m_timeStep = timeStep; - m_constraintSolver->prepareSolve(0,numManifolds); - m_constraintSolver->solveGroup(0,0,manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc,m_dispatcher1); - m_constraintSolver->allSolved(infoGlobal,m_debugDrawer, m_stackAlloc); - } - - ///integrate transforms - integrateTransforms(timeStep); - - updateAabbs(); - - synchronizeMotionStates(); - - return 1; - -} - - -void btSimpleDynamicsWorld::setGravity(const btVector3& gravity) -{ - m_gravity = gravity; - for ( int i=0;isetGravity(gravity); - } - } -} - -void btSimpleDynamicsWorld::removeRigidBody(btRigidBody* body) -{ - removeCollisionObject(body); -} - -void btSimpleDynamicsWorld::addRigidBody(btRigidBody* body) -{ - body->setGravity(m_gravity); - - if (body->getCollisionShape()) - { - addCollisionObject(body); - } -} - -void btSimpleDynamicsWorld::updateAabbs() -{ - btTransform predictedTrans; - for ( int i=0;iisActive() && (!body->isStaticObject())) - { - btPoint3 minAabb,maxAabb; - colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); - btBroadphaseInterface* bp = getBroadphase(); - bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1); - } - } - } -} - -void btSimpleDynamicsWorld::integrateTransforms(btScalar timeStep) -{ - btTransform predictedTrans; - for ( int i=0;iisActive() && (!body->isStaticObject())) - { - body->predictIntegratedTransform(timeStep, predictedTrans); - body->proceedToTransform( predictedTrans); - } - } - } -} - - - -void btSimpleDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) -{ - for ( int i=0;iisStaticObject()) - { - if (body->isActive()) - { - body->applyForces( timeStep); - body->integrateVelocities( timeStep); - body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); - } - } - } - } -} - - -void btSimpleDynamicsWorld::synchronizeMotionStates() -{ - //todo: iterate over awake simulation islands! - for ( int i=0;igetMotionState()) - { - if (body->getActivationState() != ISLAND_SLEEPING) - { - body->getMotionState()->setWorldTransform(body->getWorldTransform()); - } - } - } - -} - - -void btSimpleDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) -{ - if (m_ownsConstraintSolver) - { - btAlignedFree(m_constraintSolver); - } - m_ownsConstraintSolver = false; - m_constraintSolver = solver; -} - -btConstraintSolver* btSimpleDynamicsWorld::getConstraintSolver() -{ - return m_constraintSolver; -} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h deleted file mode 100644 index 4e38f74a731..00000000000 --- a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_SIMPLE_DYNAMICS_WORLD_H -#define BT_SIMPLE_DYNAMICS_WORLD_H - -#include "btDynamicsWorld.h" - -class btDispatcher; -class btOverlappingPairCache; -class btConstraintSolver; - -///btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds. -///Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished). -class btSimpleDynamicsWorld : public btDynamicsWorld -{ -protected: - - btConstraintSolver* m_constraintSolver; - - bool m_ownsConstraintSolver; - - btIDebugDraw* m_debugDrawer; - - void predictUnconstraintMotion(btScalar timeStep); - - void integrateTransforms(btScalar timeStep); - - btVector3 m_gravity; - -public: - - - - ///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver - btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration); - - virtual ~btSimpleDynamicsWorld(); - - ///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead - virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); - - virtual void setDebugDrawer(btIDebugDraw* debugDrawer) - { - m_debugDrawer = debugDrawer; - }; - - virtual btIDebugDraw* getDebugDrawer() - { - return m_debugDrawer; - } - - virtual void setGravity(const btVector3& gravity); - - virtual void addRigidBody(btRigidBody* body); - - virtual void removeRigidBody(btRigidBody* body); - - virtual void updateAabbs(); - - void synchronizeMotionStates(); - - virtual void setConstraintSolver(btConstraintSolver* solver); - - virtual btConstraintSolver* getConstraintSolver(); - - virtual btDynamicsWorldType getWorldType() const - { - return BT_SIMPLE_DYNAMICS_WORLD; - } - -}; - -#endif //BT_SIMPLE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp deleted file mode 100644 index 8dcd6d895e4..00000000000 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies. - * Erwin Coumans makes no representations about the suitability - * of this software for any purpose. - * It is provided "as is" without express or implied warranty. -*/ - -#include "LinearMath/btVector3.h" -#include "btRaycastVehicle.h" - -#include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h" -#include "BulletDynamics/ConstraintSolver/btJacobianEntry.h" -#include "LinearMath/btQuaternion.h" -#include "BulletDynamics/Dynamics/btDynamicsWorld.h" -#include "btVehicleRaycaster.h" -#include "btWheelInfo.h" -#include "LinearMath/btMinMax.h" - - -#include "BulletDynamics/ConstraintSolver/btContactConstraint.h" - - - -static btRigidBody s_fixedObject( 0,0,0); - -btRaycastVehicle::btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster ) -: btTypedConstraint(VEHICLE_CONSTRAINT_TYPE), -m_vehicleRaycaster(raycaster), -m_pitchControl(btScalar(0.)) -{ - m_chassisBody = chassis; - m_indexRightAxis = 0; - m_indexUpAxis = 2; - m_indexForwardAxis = 1; - defaultInit(tuning); -} - - -void btRaycastVehicle::defaultInit(const btVehicleTuning& tuning) -{ - (void)tuning; - m_currentVehicleSpeedKmHour = btScalar(0.); - m_steeringValue = btScalar(0.); - -} - - - -btRaycastVehicle::~btRaycastVehicle() -{ -} - - -// -// basically most of the code is general for 2 or 4 wheel vehicles, but some of it needs to be reviewed -// -btWheelInfo& btRaycastVehicle::addWheel( const btVector3& connectionPointCS, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel) -{ - - btWheelInfoConstructionInfo ci; - - ci.m_chassisConnectionCS = connectionPointCS; - ci.m_wheelDirectionCS = wheelDirectionCS0; - ci.m_wheelAxleCS = wheelAxleCS; - ci.m_suspensionRestLength = suspensionRestLength; - ci.m_wheelRadius = wheelRadius; - ci.m_suspensionStiffness = tuning.m_suspensionStiffness; - ci.m_wheelsDampingCompression = tuning.m_suspensionCompression; - ci.m_wheelsDampingRelaxation = tuning.m_suspensionDamping; - ci.m_frictionSlip = tuning.m_frictionSlip; - ci.m_bIsFrontWheel = isFrontWheel; - ci.m_maxSuspensionTravelCm = tuning.m_maxSuspensionTravelCm; - - m_wheelInfo.push_back( btWheelInfo(ci)); - - btWheelInfo& wheel = m_wheelInfo[getNumWheels()-1]; - - updateWheelTransformsWS( wheel , false ); - updateWheelTransform(getNumWheels()-1,false); - return wheel; -} - - - - -const btTransform& btRaycastVehicle::getWheelTransformWS( int wheelIndex ) const -{ - assert(wheelIndex < getNumWheels()); - const btWheelInfo& wheel = m_wheelInfo[wheelIndex]; - return wheel.m_worldTransform; - -} - -void btRaycastVehicle::updateWheelTransform( int wheelIndex , bool interpolatedTransform) -{ - - btWheelInfo& wheel = m_wheelInfo[ wheelIndex ]; - updateWheelTransformsWS(wheel,interpolatedTransform); - btVector3 up = -wheel.m_raycastInfo.m_wheelDirectionWS; - const btVector3& right = wheel.m_raycastInfo.m_wheelAxleWS; - btVector3 fwd = up.cross(right); - fwd = fwd.normalize(); -// up = right.cross(fwd); -// up.normalize(); - - //rotate around steering over de wheelAxleWS - btScalar steering = wheel.m_steering; - - btQuaternion steeringOrn(up,steering);//wheel.m_steering); - btMatrix3x3 steeringMat(steeringOrn); - - btQuaternion rotatingOrn(right,-wheel.m_rotation); - btMatrix3x3 rotatingMat(rotatingOrn); - - btMatrix3x3 basis2( - right[0],fwd[0],up[0], - right[1],fwd[1],up[1], - right[2],fwd[2],up[2] - ); - - wheel.m_worldTransform.setBasis(steeringMat * rotatingMat * basis2); - wheel.m_worldTransform.setOrigin( - wheel.m_raycastInfo.m_hardPointWS + wheel.m_raycastInfo.m_wheelDirectionWS * wheel.m_raycastInfo.m_suspensionLength - ); -} - -void btRaycastVehicle::resetSuspension() -{ - - int i; - for (i=0;igetMotionState())) - { - getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); - } - - wheel.m_raycastInfo.m_hardPointWS = chassisTrans( wheel.m_chassisConnectionPointCS ); - wheel.m_raycastInfo.m_wheelDirectionWS = chassisTrans.getBasis() * wheel.m_wheelDirectionCS ; - wheel.m_raycastInfo.m_wheelAxleWS = chassisTrans.getBasis() * wheel.m_wheelAxleCS; -} - -btScalar btRaycastVehicle::rayCast(btWheelInfo& wheel) -{ - updateWheelTransformsWS( wheel,false); - - - btScalar depth = -1; - - btScalar raylen = wheel.getSuspensionRestLength()+wheel.m_wheelsRadius; - - btVector3 rayvector = wheel.m_raycastInfo.m_wheelDirectionWS * (raylen); - const btVector3& source = wheel.m_raycastInfo.m_hardPointWS; - wheel.m_raycastInfo.m_contactPointWS = source + rayvector; - const btVector3& target = wheel.m_raycastInfo.m_contactPointWS; - - btScalar param = btScalar(0.); - - btVehicleRaycaster::btVehicleRaycasterResult rayResults; - - assert(m_vehicleRaycaster); - - void* object = m_vehicleRaycaster->castRay(source,target,rayResults); - - wheel.m_raycastInfo.m_groundObject = 0; - - if (object) - { - param = rayResults.m_distFraction; - depth = raylen * rayResults.m_distFraction; - wheel.m_raycastInfo.m_contactNormalWS = rayResults.m_hitNormalInWorld; - wheel.m_raycastInfo.m_isInContact = true; - - wheel.m_raycastInfo.m_groundObject = &s_fixedObject;//todo for driving on dynamic/movable objects!; - //wheel.m_raycastInfo.m_groundObject = object; - - - btScalar hitDistance = param*raylen; - wheel.m_raycastInfo.m_suspensionLength = hitDistance - wheel.m_wheelsRadius; - //clamp on max suspension travel - - btScalar minSuspensionLength = wheel.getSuspensionRestLength() - wheel.m_maxSuspensionTravelCm*btScalar(0.01); - btScalar maxSuspensionLength = wheel.getSuspensionRestLength()+ wheel.m_maxSuspensionTravelCm*btScalar(0.01); - if (wheel.m_raycastInfo.m_suspensionLength < minSuspensionLength) - { - wheel.m_raycastInfo.m_suspensionLength = minSuspensionLength; - } - if (wheel.m_raycastInfo.m_suspensionLength > maxSuspensionLength) - { - wheel.m_raycastInfo.m_suspensionLength = maxSuspensionLength; - } - - wheel.m_raycastInfo.m_contactPointWS = rayResults.m_hitPointInWorld; - - btScalar denominator= wheel.m_raycastInfo.m_contactNormalWS.dot( wheel.m_raycastInfo.m_wheelDirectionWS ); - - btVector3 chassis_velocity_at_contactPoint; - btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS-getRigidBody()->getCenterOfMassPosition(); - - chassis_velocity_at_contactPoint = getRigidBody()->getVelocityInLocalPoint(relpos); - - btScalar projVel = wheel.m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); - - if ( denominator >= btScalar(-0.1)) - { - wheel.m_suspensionRelativeVelocity = btScalar(0.0); - wheel.m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1); - } - else - { - btScalar inv = btScalar(-1.) / denominator; - wheel.m_suspensionRelativeVelocity = projVel * inv; - wheel.m_clippedInvContactDotSuspension = inv; - } - - } else - { - //put wheel info as in rest position - wheel.m_raycastInfo.m_suspensionLength = wheel.getSuspensionRestLength(); - wheel.m_suspensionRelativeVelocity = btScalar(0.0); - wheel.m_raycastInfo.m_contactNormalWS = - wheel.m_raycastInfo.m_wheelDirectionWS; - wheel.m_clippedInvContactDotSuspension = btScalar(1.0); - } - - return depth; -} - - -const btTransform& btRaycastVehicle::getChassisWorldTransform() const -{ - /*if (getRigidBody()->getMotionState()) - { - btTransform chassisWorldTrans; - getRigidBody()->getMotionState()->getWorldTransform(chassisWorldTrans); - return chassisWorldTrans; - } - */ - - - return getRigidBody()->getCenterOfMassTransform(); -} - - -void btRaycastVehicle::updateVehicle( btScalar step ) -{ - { - for (int i=0;igetLinearVelocity().length(); - - const btTransform& chassisTrans = getChassisWorldTransform(); - - btVector3 forwardW ( - chassisTrans.getBasis()[0][m_indexForwardAxis], - chassisTrans.getBasis()[1][m_indexForwardAxis], - chassisTrans.getBasis()[2][m_indexForwardAxis]); - - if (forwardW.dot(getRigidBody()->getLinearVelocity()) < btScalar(0.)) - { - m_currentVehicleSpeedKmHour *= btScalar(-1.); - } - - // - // simulate suspension - // - - int i=0; - for (i=0;i gMaxSuspensionForce) - { - suspensionForce = gMaxSuspensionForce; - } - btVector3 impulse = wheel.m_raycastInfo.m_contactNormalWS * suspensionForce * step; - btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS - getRigidBody()->getCenterOfMassPosition(); - - getRigidBody()->applyImpulse(impulse, relpos); - - } - - - - updateFriction( step); - - - for (i=0;igetCenterOfMassPosition(); - btVector3 vel = getRigidBody()->getVelocityInLocalPoint( relpos ); - - if (wheel.m_raycastInfo.m_isInContact) - { - const btTransform& chassisWorldTransform = getChassisWorldTransform(); - - btVector3 fwd ( - chassisWorldTransform.getBasis()[0][m_indexForwardAxis], - chassisWorldTransform.getBasis()[1][m_indexForwardAxis], - chassisWorldTransform.getBasis()[2][m_indexForwardAxis]); - - btScalar proj = fwd.dot(wheel.m_raycastInfo.m_contactNormalWS); - fwd -= wheel.m_raycastInfo.m_contactNormalWS * proj; - - btScalar proj2 = fwd.dot(vel); - - wheel.m_deltaRotation = (proj2 * step) / (wheel.m_wheelsRadius); - wheel.m_rotation += wheel.m_deltaRotation; - - } else - { - wheel.m_rotation += wheel.m_deltaRotation; - } - - wheel.m_deltaRotation *= btScalar(0.99);//damping of rotation when not in contact - - } - - - -} - - -void btRaycastVehicle::setSteeringValue(btScalar steering,int wheel) -{ - assert(wheel>=0 && wheel < getNumWheels()); - - btWheelInfo& wheelInfo = getWheelInfo(wheel); - wheelInfo.m_steering = steering; -} - - - -btScalar btRaycastVehicle::getSteeringValue(int wheel) const -{ - return getWheelInfo(wheel).m_steering; -} - - -void btRaycastVehicle::applyEngineForce(btScalar force, int wheel) -{ - assert(wheel>=0 && wheel < getNumWheels()); - btWheelInfo& wheelInfo = getWheelInfo(wheel); - wheelInfo.m_engineForce = force; -} - - -const btWheelInfo& btRaycastVehicle::getWheelInfo(int index) const -{ - btAssert((index >= 0) && (index < getNumWheels())); - - return m_wheelInfo[index]; -} - -btWheelInfo& btRaycastVehicle::getWheelInfo(int index) -{ - btAssert((index >= 0) && (index < getNumWheels())); - - return m_wheelInfo[index]; -} - -void btRaycastVehicle::setBrake(btScalar brake,int wheelIndex) -{ - btAssert((wheelIndex >= 0) && (wheelIndex < getNumWheels())); - getWheelInfo(wheelIndex).m_brake = brake; -} - - -void btRaycastVehicle::updateSuspension(btScalar deltaTime) -{ - (void)deltaTime; - - btScalar chassisMass = btScalar(1.) / m_chassisBody->getInvMass(); - - for (int w_it=0; w_itcomputeImpulseDenominator(frictionPosWorld,frictionDirectionWorld); - btScalar denom1 = body1->computeImpulseDenominator(frictionPosWorld,frictionDirectionWorld); - btScalar relaxation = 1.f; - m_jacDiagABInv = relaxation/(denom0+denom1); - } - - - -}; - -btScalar calcRollingFriction(btWheelContactPoint& contactPoint) -{ - - btScalar j1=0.f; - - const btVector3& contactPosWorld = contactPoint.m_frictionPositionWorld; - - btVector3 rel_pos1 = contactPosWorld - contactPoint.m_body0->getCenterOfMassPosition(); - btVector3 rel_pos2 = contactPosWorld - contactPoint.m_body1->getCenterOfMassPosition(); - - btScalar maxImpulse = contactPoint.m_maxImpulse; - - btVector3 vel1 = contactPoint.m_body0->getVelocityInLocalPoint(rel_pos1); - btVector3 vel2 = contactPoint.m_body1->getVelocityInLocalPoint(rel_pos2); - btVector3 vel = vel1 - vel2; - - btScalar vrel = contactPoint.m_frictionDirectionWorld.dot(vel); - - // calculate j that moves us to zero relative velocity - j1 = -vrel * contactPoint.m_jacDiagABInv; - btSetMin(j1, maxImpulse); - btSetMax(j1, -maxImpulse); - - return j1; -} - - - - -btScalar sideFrictionStiffness2 = btScalar(1.0); -void btRaycastVehicle::updateFriction(btScalar timeStep) -{ - - //calculate the impulse, so that the wheels don't move sidewards - int numWheel = getNumWheels(); - if (!numWheel) - return; - - - void* mem = btAlignedAlloc(numWheel*sizeof(btVector3),16); - btVector3* forwardWS = new (mem)btVector3[numWheel]; - mem = btAlignedAlloc(numWheel*sizeof(btVector3),16); - btVector3* axle = new (mem)btVector3[numWheel]; - mem = btAlignedAlloc(numWheel*sizeof(btScalar),16); - btScalar* forwardImpulse = new (mem)btScalar[numWheel]; - mem = btAlignedAlloc(numWheel*sizeof(btScalar),16); - btScalar* sideImpulse = new(mem) btScalar[numWheel]; - - int numWheelsOnGround = 0; - - - //collapse all those loops into one! - for (int i=0;i maximpSquared) - { - sliding = true; - - btScalar factor = maximp / btSqrt(impulseSquared); - - m_wheelInfo[wheel].m_skidInfo *= factor; - } - } - - } - } - - - - - if (sliding) - { - for (int wheel = 0;wheel < getNumWheels(); wheel++) - { - if (sideImpulse[wheel] != btScalar(0.)) - { - if (m_wheelInfo[wheel].m_skidInfo< btScalar(1.)) - { - forwardImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo; - sideImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo; - } - } - } - } - - // apply the impulses - { - for (int wheel = 0;wheelgetCenterOfMassPosition(); - - if (forwardImpulse[wheel] != btScalar(0.)) - { - m_chassisBody->applyImpulse(forwardWS[wheel]*(forwardImpulse[wheel]),rel_pos); - } - if (sideImpulse[wheel] != btScalar(0.)) - { - class btRigidBody* groundObject = (class btRigidBody*) m_wheelInfo[wheel].m_raycastInfo.m_groundObject; - - btVector3 rel_pos2 = wheelInfo.m_raycastInfo.m_contactPointWS - - groundObject->getCenterOfMassPosition(); - - - btVector3 sideImp = axle[wheel] * sideImpulse[wheel]; - - rel_pos[2] *= wheelInfo.m_rollInfluence; - m_chassisBody->applyImpulse(sideImp,rel_pos); - - //apply friction impulse on the ground - groundObject->applyImpulse(-sideImp,rel_pos2); - } - } - } - - btAlignedFree(forwardWS); - btAlignedFree(axle); - btAlignedFree(forwardImpulse); - btAlignedFree(sideImpulse); -} - - -void* btDefaultVehicleRaycaster::castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) -{ -// RayResultCallback& resultCallback; - - btCollisionWorld::ClosestRayResultCallback rayCallback(from,to); - - m_dynamicsWorld->rayTest(from, to, rayCallback); - - if (rayCallback.HasHit()) - { - - btRigidBody* body = btRigidBody::upcast(rayCallback.m_collisionObject); - if (body) - { - result.m_hitPointInWorld = rayCallback.m_hitPointWorld; - result.m_hitNormalInWorld = rayCallback.m_hitNormalWorld; - result.m_hitNormalInWorld.normalize(); - result.m_distFraction = rayCallback.m_closestHitFraction; - return body; - } - } - return 0; -} diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h deleted file mode 100644 index a84b185e947..00000000000 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies. - * Erwin Coumans makes no representations about the suitability - * of this software for any purpose. - * It is provided "as is" without express or implied warranty. -*/ -#ifndef RAYCASTVEHICLE_H -#define RAYCASTVEHICLE_H - -#include "BulletDynamics/Dynamics/btRigidBody.h" -#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" -#include "btVehicleRaycaster.h" -class btDynamicsWorld; -#include "LinearMath/btAlignedObjectArray.h" -#include "btWheelInfo.h" - -class btVehicleTuning; - -///rayCast vehicle, very special constraint that turn a rigidbody into a vehicle. -class btRaycastVehicle : public btTypedConstraint -{ -public: - class btVehicleTuning - { - public: - - btVehicleTuning() - :m_suspensionStiffness(btScalar(5.88)), - m_suspensionCompression(btScalar(0.83)), - m_suspensionDamping(btScalar(0.88)), - m_maxSuspensionTravelCm(btScalar(500.)), - m_frictionSlip(btScalar(10.5)) - { - } - btScalar m_suspensionStiffness; - btScalar m_suspensionCompression; - btScalar m_suspensionDamping; - btScalar m_maxSuspensionTravelCm; - btScalar m_frictionSlip; - - }; -private: - - btScalar m_tau; - btScalar m_damping; - btVehicleRaycaster* m_vehicleRaycaster; - btScalar m_pitchControl; - btScalar m_steeringValue; - btScalar m_currentVehicleSpeedKmHour; - - btRigidBody* m_chassisBody; - - int m_indexRightAxis; - int m_indexUpAxis; - int m_indexForwardAxis; - - void defaultInit(const btVehicleTuning& tuning); - -public: - - //constructor to create a car from an existing rigidbody - btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster ); - - virtual ~btRaycastVehicle() ; - - - const btTransform& getChassisWorldTransform() const; - - btScalar rayCast(btWheelInfo& wheel); - - virtual void updateVehicle(btScalar step); - - void resetSuspension(); - - btScalar getSteeringValue(int wheel) const; - - void setSteeringValue(btScalar steering,int wheel); - - - void applyEngineForce(btScalar force, int wheel); - - const btTransform& getWheelTransformWS( int wheelIndex ) const; - - void updateWheelTransform( int wheelIndex, bool interpolatedTransform = true ); - - void setRaycastWheelInfo( int wheelIndex , bool isInContact, const btVector3& hitPoint, const btVector3& hitNormal,btScalar depth); - - btWheelInfo& addWheel( const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspensionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel); - - inline int getNumWheels() const { - return int (m_wheelInfo.size()); - } - - btAlignedObjectArray m_wheelInfo; - - - const btWheelInfo& getWheelInfo(int index) const; - - btWheelInfo& getWheelInfo(int index); - - void updateWheelTransformsWS(btWheelInfo& wheel , bool interpolatedTransform = true); - - - void setBrake(btScalar brake,int wheelIndex); - - void setPitchControl(btScalar pitch) - { - m_pitchControl = pitch; - } - - void updateSuspension(btScalar deltaTime); - - void updateFriction(btScalar timeStep); - - - - inline btRigidBody* getRigidBody() - { - return m_chassisBody; - } - - const btRigidBody* getRigidBody() const - { - return m_chassisBody; - } - - inline int getRightAxis() const - { - return m_indexRightAxis; - } - inline int getUpAxis() const - { - return m_indexUpAxis; - } - - inline int getForwardAxis() const - { - return m_indexForwardAxis; - } - - - ///Worldspace forward vector - btVector3 getForwardVector() const - { - const btTransform& chassisTrans = getChassisWorldTransform(); - - btVector3 forwardW ( - chassisTrans.getBasis()[0][m_indexForwardAxis], - chassisTrans.getBasis()[1][m_indexForwardAxis], - chassisTrans.getBasis()[2][m_indexForwardAxis]); - - return forwardW; - } - - ///Velocity of vehicle (positive if velocity vector has same direction as foward vector) - btScalar getCurrentSpeedKmHour() const - { - return m_currentVehicleSpeedKmHour; - } - - virtual void setCoordinateSystem(int rightIndex,int upIndex,int forwardIndex) - { - m_indexRightAxis = rightIndex; - m_indexUpAxis = upIndex; - m_indexForwardAxis = forwardIndex; - } - - virtual void buildJacobian() - { - //not yet - } - - virtual void solveConstraint(btScalar timeStep) - { - (void)timeStep; - //not yet - } - - -}; - -class btDefaultVehicleRaycaster : public btVehicleRaycaster -{ - btDynamicsWorld* m_dynamicsWorld; -public: - btDefaultVehicleRaycaster(btDynamicsWorld* world) - :m_dynamicsWorld(world) - { - } - - virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result); - -}; - - -#endif //RAYCASTVEHICLE_H - diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h b/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h deleted file mode 100644 index 5112ce6d420..00000000000 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies. - * Erwin Coumans makes no representations about the suitability - * of this software for any purpose. - * It is provided "as is" without express or implied warranty. -*/ -#ifndef VEHICLE_RAYCASTER_H -#define VEHICLE_RAYCASTER_H - -#include "LinearMath/btVector3.h" - -/// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting -struct btVehicleRaycaster -{ -virtual ~btVehicleRaycaster() -{ -} - struct btVehicleRaycasterResult - { - btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; - btVector3 m_hitPointInWorld; - btVector3 m_hitNormalInWorld; - btScalar m_distFraction; - }; - - virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0; - -}; - -#endif //VEHICLE_RAYCASTER_H - diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp deleted file mode 100644 index ef93c16fffc..00000000000 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies. - * Erwin Coumans makes no representations about the suitability - * of this software for any purpose. - * It is provided "as is" without express or implied warranty. -*/ -#include "btWheelInfo.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" // for pointvelocity - - -btScalar btWheelInfo::getSuspensionRestLength() const -{ - - return m_suspensionRestLength1; - -} - -void btWheelInfo::updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo) -{ - (void)raycastInfo; - - - if (m_raycastInfo.m_isInContact) - - { - btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS ); - btVector3 chassis_velocity_at_contactPoint; - btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition(); - chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos ); - btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); - if ( project >= btScalar(-0.1)) - { - m_suspensionRelativeVelocity = btScalar(0.0); - m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1); - } - else - { - btScalar inv = btScalar(-1.) / project; - m_suspensionRelativeVelocity = projVel * inv; - m_clippedInvContactDotSuspension = inv; - } - - } - - else // Not in contact : position wheel in a nice (rest length) position - { - m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength(); - m_suspensionRelativeVelocity = btScalar(0.0); - m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS; - m_clippedInvContactDotSuspension = btScalar(1.0); - } -} diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h deleted file mode 100644 index ac2729f4fd7..00000000000 --- a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies. - * Erwin Coumans makes no representations about the suitability - * of this software for any purpose. - * It is provided "as is" without express or implied warranty. -*/ -#ifndef WHEEL_INFO_H -#define WHEEL_INFO_H - -#include "LinearMath/btVector3.h" -#include "LinearMath/btTransform.h" - -class btRigidBody; - -struct btWheelInfoConstructionInfo -{ - btVector3 m_chassisConnectionCS; - btVector3 m_wheelDirectionCS; - btVector3 m_wheelAxleCS; - btScalar m_suspensionRestLength; - btScalar m_maxSuspensionTravelCm; - btScalar m_wheelRadius; - - btScalar m_suspensionStiffness; - btScalar m_wheelsDampingCompression; - btScalar m_wheelsDampingRelaxation; - btScalar m_frictionSlip; - bool m_bIsFrontWheel; - -}; - -/// btWheelInfo contains information per wheel about friction and suspension. -struct btWheelInfo -{ - struct RaycastInfo - { - //set by raycaster - btVector3 m_contactNormalWS;//contactnormal - btVector3 m_contactPointWS;//raycast hitpoint - btScalar m_suspensionLength; - btVector3 m_hardPointWS;//raycast starting point - btVector3 m_wheelDirectionWS; //direction in worldspace - btVector3 m_wheelAxleWS; // axle in worldspace - bool m_isInContact; - void* m_groundObject; //could be general void* ptr - }; - - RaycastInfo m_raycastInfo; - - btTransform m_worldTransform; - - btVector3 m_chassisConnectionPointCS; //const - btVector3 m_wheelDirectionCS;//const - btVector3 m_wheelAxleCS; // const or modified by steering - btScalar m_suspensionRestLength1;//const - btScalar m_maxSuspensionTravelCm; - btScalar getSuspensionRestLength() const; - btScalar m_wheelsRadius;//const - btScalar m_suspensionStiffness;//const - btScalar m_wheelsDampingCompression;//const - btScalar m_wheelsDampingRelaxation;//const - btScalar m_frictionSlip; - btScalar m_steering; - btScalar m_rotation; - btScalar m_deltaRotation; - btScalar m_rollInfluence; - - btScalar m_engineForce; - - btScalar m_brake; - - bool m_bIsFrontWheel; - - void* m_clientInfo;//can be used to store pointer to sync transforms... - - btWheelInfo(btWheelInfoConstructionInfo& ci) - - { - - m_suspensionRestLength1 = ci.m_suspensionRestLength; - m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm; - - m_wheelsRadius = ci.m_wheelRadius; - m_suspensionStiffness = ci.m_suspensionStiffness; - m_wheelsDampingCompression = ci.m_wheelsDampingCompression; - m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation; - m_chassisConnectionPointCS = ci.m_chassisConnectionCS; - m_wheelDirectionCS = ci.m_wheelDirectionCS; - m_wheelAxleCS = ci.m_wheelAxleCS; - m_frictionSlip = ci.m_frictionSlip; - m_steering = btScalar(0.); - m_engineForce = btScalar(0.); - m_rotation = btScalar(0.); - m_deltaRotation = btScalar(0.); - m_brake = btScalar(0.); - m_rollInfluence = btScalar(0.1); - m_bIsFrontWheel = ci.m_bIsFrontWheel; - - } - - void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo); - - btScalar m_clippedInvContactDotSuspension; - btScalar m_suspensionRelativeVelocity; - //calculated by suspension - btScalar m_wheelsSuspensionForce; - btScalar m_skidInfo; - -}; - -#endif //WHEEL_INFO_H - diff --git a/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile b/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile deleted file mode 100644 index b599a0fd9a1..00000000000 --- a/extern/bullet2/src/BulletDynamics/ibmsdk/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -#### Source code Dirs -VPATH = \ -../ConstraintSolver \ -../Dynamics \ -../Vehicle - -ROOT = ../../.. - -#### Library -LIBRARY_ppu = bulletdynamics.a - -#### Compiler flags -CPPFLAGS = \ --DUSE_LIBSPE2 \ --I../ConstraintSolver \ --I../Dynamics \ --I../Vehicle \ --I$(ROOT)/src \ --I$(SDKINC) - -#### Optimization level flags -#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG) -CC_OPT_LEVEL = -O3 - -##### Objects to be archived in lib - -OBJS = \ -btContactConstraint.o \ -btGeneric6DofConstraint.o \ -btHingeConstraint.o \ -btPoint2PointConstraint.o \ -btSequentialImpulseConstraintSolver.o \ -btSolve2LinearConstraint.o \ -btTypedConstraint.o \ -btDiscreteDynamicsWorld.o \ -btRigidBody.o \ -btSimpleDynamicsWorld.o \ -btRaycastVehicle.o \ -btWheelInfo.o -#### Install directories -INSTALL_DIR = $(ROOT)/lib/ibmsdk -INSTALL_FILES = $(LIBRARY_ppu) -CELL_TOP ?= /opt/ibm/cell-sdk/prototype - -include $(CELL_TOP)/make.footer diff --git a/extern/bullet2/src/CMakeLists.txt b/extern/bullet2/src/CMakeLists.txt deleted file mode 100644 index 0ae1a7ab6ab..00000000000 --- a/extern/bullet2/src/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS( BulletCollision BulletDynamics LinearMath ) diff --git a/extern/bullet2/src/LinearMath/CMakeLists.txt b/extern/bullet2/src/LinearMath/CMakeLists.txt deleted file mode 100644 index 82393547bfb..00000000000 --- a/extern/bullet2/src/LinearMath/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src } -) - -ADD_LIBRARY(LibLinearMath -btQuickprof.cpp -btGeometryUtil.cpp -btAlignedAllocator.cpp -) - diff --git a/extern/bullet2/src/LinearMath/btAabbUtil2.h b/extern/bullet2/src/LinearMath/btAabbUtil2.h deleted file mode 100644 index 9b320961ba1..00000000000 --- a/extern/bullet2/src/LinearMath/btAabbUtil2.h +++ /dev/null @@ -1,125 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef AABB_UTIL2 -#define AABB_UTIL2 - -#include "btVector3.h" -#include "btMinMax.h" - - - - -/// conservative test for overlap between two aabbs -SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, - const btVector3 &aabbMin2, const btVector3 &aabbMax2) -{ - bool overlap = true; - overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; - overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; - overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; - return overlap; -} - -/// conservative test for overlap between triangle and aabb -SIMD_FORCE_INLINE bool TestTriangleAgainstAabb2(const btVector3 *vertices, - const btVector3 &aabbMin, const btVector3 &aabbMax) -{ - const btVector3 &p1 = vertices[0]; - const btVector3 &p2 = vertices[1]; - const btVector3 &p3 = vertices[2]; - - if (btMin(btMin(p1[0], p2[0]), p3[0]) > aabbMax[0]) return false; - if (btMax(btMax(p1[0], p2[0]), p3[0]) < aabbMin[0]) return false; - - if (btMin(btMin(p1[2], p2[2]), p3[2]) > aabbMax[2]) return false; - if (btMax(btMax(p1[2], p2[2]), p3[2]) < aabbMin[2]) return false; - - if (btMin(btMin(p1[1], p2[1]), p3[1]) > aabbMax[1]) return false; - if (btMax(btMax(p1[1], p2[1]), p3[1]) < aabbMin[1]) return false; - return true; -} - - -SIMD_FORCE_INLINE int btOutcode(const btVector3& p,const btVector3& halfExtent) -{ - return (p.getX() < -halfExtent.getX() ? 0x01 : 0x0) | - (p.getX() > halfExtent.getX() ? 0x08 : 0x0) | - (p.getY() < -halfExtent.getY() ? 0x02 : 0x0) | - (p.getY() > halfExtent.getY() ? 0x10 : 0x0) | - (p.getZ() < -halfExtent.getZ() ? 0x4 : 0x0) | - (p.getZ() > halfExtent.getZ() ? 0x20 : 0x0); -} - - -SIMD_FORCE_INLINE bool btRayAabb(const btVector3& rayFrom, - const btVector3& rayTo, - const btVector3& aabbMin, - const btVector3& aabbMax, - btScalar& param, btVector3& normal) -{ - btVector3 aabbHalfExtent = (aabbMax-aabbMin)* btScalar(0.5); - btVector3 aabbCenter = (aabbMax+aabbMin)* btScalar(0.5); - btVector3 source = rayFrom - aabbCenter; - btVector3 target = rayTo - aabbCenter; - int sourceOutcode = btOutcode(source,aabbHalfExtent); - int targetOutcode = btOutcode(target,aabbHalfExtent); - if ((sourceOutcode & targetOutcode) == 0x0) - { - btScalar lambda_enter = btScalar(0.0); - btScalar lambda_exit = param; - btVector3 r = target - source; - int i; - btScalar normSign = 1; - btVector3 hitNormal(0,0,0); - int bit=1; - - for (int j=0;j<2;j++) - { - for (i = 0; i != 3; ++i) - { - if (sourceOutcode & bit) - { - btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i]; - if (lambda_enter <= lambda) - { - lambda_enter = lambda; - hitNormal.setValue(0,0,0); - hitNormal[i] = normSign; - } - } - else if (targetOutcode & bit) - { - btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i]; - btSetMin(lambda_exit, lambda); - } - bit<<=1; - } - normSign = btScalar(-1.); - } - if (lambda_enter <= lambda_exit) - { - param = lambda_enter; - normal = hitNormal; - return true; - } - } - return false; -} - - -#endif - diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp deleted file mode 100644 index 6b33ddbb8cf..00000000000 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#include "btAlignedAllocator.h" - -int gNumAlignedAllocs = 0; -int gNumAlignedFree = 0; -int gTotalBytesAlignedAllocs = 0;//detect memory leaks - -#ifdef BT_DEBUG_MEMORY_ALLOCATIONS -//this generic allocator provides the total allocated number of bytes -#include - -void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename) -{ - void *ret; - char *real; - unsigned long offset; - - gTotalBytesAlignedAllocs += size; - gNumAlignedAllocs++; - - printf("allocation#%d from %s,line %d, size %d\n",gNumAlignedAllocs,filename,line,size); - real = (char *)malloc(size + 2*sizeof(void *) + (alignment-1)); - if (real) { - offset = (alignment - (unsigned long)(real + 2*sizeof(void *))) & -(alignment-1); - ret = (void *)((real + 2*sizeof(void *)) + offset); - *((void **)(ret)-1) = (void *)(real); - *((int*)(ret)-2) = size; - - } else { - ret = (void *)(real);//?? - } - int* ptr = (int*)ret; - *ptr = 12; - return (ret); -} -#include -void btAlignedFreeInternal (void* ptr,int line,char* filename) -{ - - void* real; - gNumAlignedFree++; - - if (ptr) { - real = *((void **)(ptr)-1); - int size = *((int*)(ptr)-2); - gTotalBytesAlignedAllocs -= size; - - printf("free #%d from %s,line %d, size %d\n",gNumAlignedFree,filename,line,size); - - free(real); - } else - { - printf("NULL ptr\n"); - } -} - -#else //BT_DEBUG_MEMORY_ALLOCATIONS - - -#if defined (BT_HAS_ALIGNED_ALLOCATOR) - - - - - -#include -void* btAlignedAllocInternal (size_t size, int alignment) -{ - gNumAlignedAllocs++; - - void* ptr = _aligned_malloc(size,alignment); -// printf("btAlignedAllocInternal %d, %x\n",size,ptr); - return ptr; -} - -void btAlignedFreeInternal (void* ptr) -{ - gNumAlignedFree++; -// printf("btAlignedFreeInternal %x\n",ptr); - _aligned_free(ptr); -} - -#else - -#ifdef __CELLOS_LV2__ - -#include - - - -void* btAlignedAllocInternal (size_t size, int alignment) -{ - gNumAlignedAllocs++; - return memalign(alignment, size); -} - -void btAlignedFreeInternal (void* ptr) -{ - gNumAlignedFree++; - free(ptr); -} - -#else - -void* btAlignedAllocInternal (size_t size, int alignment) -{ - void *ret; - char *real; - unsigned long offset; - - gNumAlignedAllocs++; - - real = (char *)malloc(size + sizeof(void *) + (alignment-1)); - if (real) { - offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1); - ret = (void *)((real + sizeof(void *)) + offset); - *((void **)(ret)-1) = (void *)(real); - } else { - ret = (void *)(real); - } - return (ret); -} - -void btAlignedFreeInternal (void* ptr) -{ - - void* real; - gNumAlignedFree++; - - if (ptr) { - real = *((void **)(ptr)-1); - free(real); - } -} -#endif // - -#endif - -#endif //BT_DEBUG_MEMORY_ALLOCATIONS - diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.h b/extern/bullet2/src/LinearMath/btAlignedAllocator.h deleted file mode 100644 index 2b48e79e497..00000000000 --- a/extern/bullet2/src/LinearMath/btAlignedAllocator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_ALIGNED_ALLOCATOR -#define BT_ALIGNED_ALLOCATOR - -///we probably replace this with our own aligned memory allocator -///so we replace _aligned_malloc and _aligned_free with our own -///that is better portable and more predictable - -#include "btScalar.h" -//#define BT_DEBUG_MEMORY_ALLOCATIONS 1 -#ifdef BT_DEBUG_MEMORY_ALLOCATIONS - -#define btAlignedAlloc(a,b) \ - btAlignedAllocInternal(a,b,__LINE__,__FILE__) - -#define btAlignedFree(ptr) \ - btAlignedFreeInternal(ptr,__LINE__,__FILE__) - -void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename); - -void btAlignedFreeInternal (void* ptr,int line,char* filename); - -#else - void* btAlignedAllocInternal (size_t size, int alignment); - void btAlignedFreeInternal (void* ptr); - - #define btAlignedAlloc(a,b) btAlignedAllocInternal(a,b) - #define btAlignedFree(ptr) btAlignedFreeInternal(ptr) -#endif -typedef int size_type; - - -template < typename T , unsigned Alignment > -class btAlignedAllocator { - - typedef btAlignedAllocator< T , Alignment > self_type; - -public: - - //just going down a list: - btAlignedAllocator() {} - /* - btAlignedAllocator( const self_type & ) {} - */ - - template < typename Other > - btAlignedAllocator( const btAlignedAllocator< Other , Alignment > & ) {} - - typedef const T* const_pointer; - typedef const T& const_reference; - typedef T* pointer; - typedef T& reference; - typedef T value_type; - - pointer address ( reference ref ) const { return &ref; } - const_pointer address ( const_reference ref ) const { return &ref; } - pointer allocate ( size_type n , const_pointer * hint = 0 ) { - (void)hint; - return reinterpret_cast< pointer >(btAlignedAlloc( sizeof(value_type) * n , Alignment )); - } - void construct ( pointer ptr , const value_type & value ) { new (ptr) value_type( value ); } - void deallocate( pointer ptr ) { - btAlignedFree( reinterpret_cast< void * >( ptr ) ); - } - void destroy ( pointer ptr ) { ptr->~value_type(); } - - - template < typename O > struct rebind { - typedef btAlignedAllocator< O , Alignment > other; - }; - template < typename O > - self_type & operator=( const btAlignedAllocator< O , Alignment > & ) { return *this; } - - friend bool operator==( const self_type & , const self_type & ) { return true; } -}; - - - -#endif //BT_ALIGNED_ALLOCATOR - diff --git a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h deleted file mode 100644 index 66911316fbb..00000000000 --- a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h +++ /dev/null @@ -1,386 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef BT_OBJECT_ARRAY__ -#define BT_OBJECT_ARRAY__ - -#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE -#include "btAlignedAllocator.h" - -///If the platform doesn't support placement new, you can disable BT_USE_PLACEMENT_NEW -///then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors -///You can enable BT_USE_MEMCPY, then swapping elements in the array will use memcpy instead of operator= -///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231 and -///http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1240 - -#define BT_USE_PLACEMENT_NEW 1 -//#define BT_USE_MEMCPY 1 //disable, because it is cumbersome to find out for each platform where memcpy is defined. It can be in or or otherwise... - -#ifdef BT_USE_MEMCPY -#include -#include -#endif //BT_USE_MEMCPY - -#ifdef BT_USE_PLACEMENT_NEW -#include //for placement new -#endif //BT_USE_PLACEMENT_NEW - - -///btAlignedObjectArray uses a subset of the stl::vector interface for its methods -///It is developed to replace stl::vector to avoid STL alignment issues to add SIMD/SSE data -template -//template -class btAlignedObjectArray -{ - btAlignedAllocator m_allocator; - - int m_size; - int m_capacity; - T* m_data; - //PCK: added this line - bool m_ownsMemory; - - protected: - SIMD_FORCE_INLINE int allocSize(int size) - { - return (size ? size*2 : 1); - } - SIMD_FORCE_INLINE void copy(int start,int end, T* dest) - { - int i; - for (i=start;i size()) - { - reserve(newsize); - } -#ifdef BT_USE_PLACEMENT_NEW - for (int i=curSize;i - void downHeap(T *pArr, int k, int n,L CompareFunc) - { - /* PRE: a[k+1..N] is a heap */ - /* POST: a[k..N] is a heap */ - - T temp = pArr[k - 1]; - /* k has child(s) */ - while (k <= n/2) - { - int child = 2*k; - - if ((child < n) && CompareFunc(pArr[child - 1] , pArr[child])) - { - child++; - } - /* pick larger child */ - if (CompareFunc(temp , pArr[child - 1])) - { - /* move child up */ - pArr[k - 1] = pArr[child - 1]; - k = child; - } - else - { - break; - } - } - pArr[k - 1] = temp; - } /*downHeap*/ - - void swap(int index0,int index1) - { -#ifdef BT_USE_MEMCPY - char temp[sizeof(T)]; - memcpy(temp,&m_data[index0],sizeof(T)); - memcpy(&m_data[index0],&m_data[index1],sizeof(T)); - memcpy(&m_data[index1],temp,sizeof(T)); -#else - T temp = m_data[index0]; - m_data[index0] = m_data[index1]; - m_data[index1] = temp; -#endif //BT_USE_PLACEMENT_NEW - - } - - template - void heapSort(L CompareFunc) - { - /* sort a[0..N-1], N.B. 0 to N-1 */ - int k; - int n = m_size; - for (k = n/2; k > 0; k--) - { - downHeap(m_data, k, n, CompareFunc); - } - - /* a[1..N] is now a heap */ - while ( n>=1 ) - { - swap(0,n-1); /* largest of a[0..n-1] */ - - - n = n - 1; - /* restore a[1..i-1] heap */ - downHeap(m_data, 1, n, CompareFunc); - } - } - - ///non-recursive binary search, assumes sorted array - int findBinarySearch(const T& key) const - { - int first = 0; - int last = size(); - - //assume sorted array - while (first <= last) { - int mid = (first + last) / 2; // compute mid point. - if (key > m_data[mid]) - first = mid + 1; // repeat search in top half. - else if (key < m_data[mid]) - last = mid - 1; // repeat search in bottom half. - else - return mid; // found it. return position ///// - } - return size(); // failed to find key - } - - - int findLinearSearch(const T& key) const - { - int index=size(); - int i; - - for (i=0;i& planeEquations, const btVector3& point, btScalar margin) -{ - int numbrushes = planeEquations.size(); - for (int i=0;ibtScalar(0.)) - { - return false; - } - } - return true; - -} - - -bool btGeometryUtil::areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin) -{ - int numvertices = vertices.size(); - for (int i=0;ibtScalar(0.)) - { - return false; - } - } - return true; -} - -bool notExist(const btVector3& planeEquation,const btAlignedObjectArray& planeEquations) -{ - int numbrushes = planeEquations.size(); - for (int i=0;i btScalar(0.999)) - { - return false; - } - } - return true; -} - -void btGeometryUtil::getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ) -{ - const int numvertices = vertices.size(); - // brute force: - for (int i=0;i btScalar(0.0001)) - { - planeEquation.normalize(); - if (notExist(planeEquation,planeEquationsOut)) - { - planeEquation[3] = -planeEquation.dot(N1); - - //check if inside, and replace supportingVertexOut if needed - if (areVerticesBehindPlane(planeEquation,vertices,btScalar(0.01))) - { - planeEquationsOut.push_back(planeEquation); - } - } - } - normalSign = btScalar(-1.); - } - - } - } - } - -} - -void btGeometryUtil::getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ) -{ - const int numbrushes = planeEquations.size(); - // brute force: - for (int i=0;i btScalar(0.0001) ) && - ( n3n1.length2() > btScalar(0.0001) ) && - ( n1n2.length2() > btScalar(0.0001) ) ) - { - //point P out of 3 plane equations: - - // d1 ( N2 * N3 ) + d2 ( N3 * N1 ) + d3 ( N1 * N2 ) - //P = ------------------------------------------------------------------------- - // N1 . ( N2 * N3 ) - - - btScalar quotient = (N1.dot(n2n3)); - if (btFabs(quotient) > btScalar(0.000001)) - { - quotient = btScalar(-1.) / quotient; - n2n3 *= N1[3]; - n3n1 *= N2[3]; - n1n2 *= N3[3]; - btVector3 potentialVertex = n2n3; - potentialVertex += n3n1; - potentialVertex += n1n2; - potentialVertex *= quotient; - - //check if inside, and replace supportingVertexOut if needed - if (isPointInsidePlanes(planeEquations,potentialVertex,btScalar(0.01))) - { - verticesOut.push_back(potentialVertex); - } - } - } - } - } - } -} - diff --git a/extern/bullet2/src/LinearMath/btGeometryUtil.h b/extern/bullet2/src/LinearMath/btGeometryUtil.h deleted file mode 100644 index 766cd75c383..00000000000 --- a/extern/bullet2/src/LinearMath/btGeometryUtil.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef BT_GEOMETRY_UTIL_H -#define BT_GEOMETRY_UTIL_H - -#include "btVector3.h" -#include "btAlignedObjectArray.h" - -class btGeometryUtil -{ - public: - - - static void getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ); - - static void getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ); - - static bool isInside(const btAlignedObjectArray& vertices, const btVector3& planeNormal, btScalar margin); - - static bool isPointInsidePlanes(const btAlignedObjectArray& planeEquations, const btVector3& point, btScalar margin); - - static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin); - -}; - - -#endif //BT_GEOMETRY_UTIL_H - diff --git a/extern/bullet2/src/LinearMath/btIDebugDraw.h b/extern/bullet2/src/LinearMath/btIDebugDraw.h deleted file mode 100644 index 2d96cff5055..00000000000 --- a/extern/bullet2/src/LinearMath/btIDebugDraw.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright (c) 2005 Gino van den Bergen / Erwin Coumans http://continuousphysics.com - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -*/ - - -#ifndef IDEBUG_DRAW__H -#define IDEBUG_DRAW__H - -#include "btVector3.h" - - -class btIDebugDraw -{ - public: - - enum DebugDrawModes - { - DBG_NoDebug=0, - DBG_DrawWireframe = 1, - DBG_DrawAabb=2, - DBG_DrawFeaturesText=4, - DBG_DrawContactPoints=8, - DBG_NoDeactivation=16, - DBG_NoHelpText = 32, - DBG_DrawText=64, - DBG_ProfileTimings = 128, - DBG_EnableSatComparison = 256, - DBG_DisableBulletLCP = 512, - DBG_EnableCCD = 1024, - DBG_MAX_DEBUG_DRAW_MODE - }; - - virtual ~btIDebugDraw() {}; - - virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)=0; - - virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)=0; - - virtual void reportErrorWarning(const char* warningString) = 0; - - virtual void draw3dText(const btVector3& location,const char* textString) = 0; - - virtual void setDebugMode(int debugMode) =0; - - virtual int getDebugMode() const = 0; - - inline void drawAabb(const btVector3& from,const btVector3& to,const btVector3& color) - { - - btVector3 halfExtents = (to-from)* 0.5f; - btVector3 center = (to+from) *0.5f; - int i,j; - - btVector3 edgecoord(1.f,1.f,1.f),pa,pb; - for (i=0;i<4;i++) - { - for (j=0;j<3;j++) - { - pa = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], - edgecoord[2]*halfExtents[2]); - pa+=center; - - int othercoord = j%3; - edgecoord[othercoord]*=-1.f; - pb = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], - edgecoord[2]*halfExtents[2]); - pb+=center; - - drawLine(pa,pb,color); - } - edgecoord = btVector3(-1.f,-1.f,-1.f); - if (i<3) - edgecoord[i]*=-1.f; - } - } -}; - - -#endif //IDEBUG_DRAW__H - diff --git a/extern/bullet2/src/LinearMath/btList.h b/extern/bullet2/src/LinearMath/btList.h deleted file mode 100644 index c87b47faf2b..00000000000 --- a/extern/bullet2/src/LinearMath/btList.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef GEN_LIST_H -#define GEN_LIST_H - -class btGEN_Link { -public: - btGEN_Link() : m_next(0), m_prev(0) {} - btGEN_Link(btGEN_Link *next, btGEN_Link *prev) : m_next(next), m_prev(prev) {} - - btGEN_Link *getNext() const { return m_next; } - btGEN_Link *getPrev() const { return m_prev; } - - bool isHead() const { return m_prev == 0; } - bool isTail() const { return m_next == 0; } - - void insertBefore(btGEN_Link *link) { - m_next = link; - m_prev = link->m_prev; - m_next->m_prev = this; - m_prev->m_next = this; - } - - void insertAfter(btGEN_Link *link) { - m_next = link->m_next; - m_prev = link; - m_next->m_prev = this; - m_prev->m_next = this; - } - - void remove() { - m_next->m_prev = m_prev; - m_prev->m_next = m_next; - } - -private: - btGEN_Link *m_next; - btGEN_Link *m_prev; -}; - -class btGEN_List { -public: - btGEN_List() : m_head(&m_tail, 0), m_tail(0, &m_head) {} - - btGEN_Link *getHead() const { return m_head.getNext(); } - btGEN_Link *getTail() const { return m_tail.getPrev(); } - - void addHead(btGEN_Link *link) { link->insertAfter(&m_head); } - void addTail(btGEN_Link *link) { link->insertBefore(&m_tail); } - -private: - btGEN_Link m_head; - btGEN_Link m_tail; -}; - -#endif - - - diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h deleted file mode 100644 index 59680ff460d..00000000000 --- a/extern/bullet2/src/LinearMath/btMatrix3x3.h +++ /dev/null @@ -1,410 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef btMatrix3x3_H -#define btMatrix3x3_H - -#include "btScalar.h" - -#include "btVector3.h" -#include "btQuaternion.h" - - -class btMatrix3x3 { - public: - btMatrix3x3 () {} - -// explicit btMatrix3x3(const btScalar *m) { setFromOpenGLSubMatrix(m); } - - explicit btMatrix3x3(const btQuaternion& q) { setRotation(q); } - /* - template - Matrix3x3(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) - { - setEulerYPR(yaw, pitch, roll); - } - */ - btMatrix3x3(const btScalar& xx, const btScalar& xy, const btScalar& xz, - const btScalar& yx, const btScalar& yy, const btScalar& yz, - const btScalar& zx, const btScalar& zy, const btScalar& zz) - { - setValue(xx, xy, xz, - yx, yy, yz, - zx, zy, zz); - } - - SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other) - { - m_el[0] = other.m_el[0]; - m_el[1] = other.m_el[1]; - m_el[2] = other.m_el[2]; - } - - SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other) - { - m_el[0] = other.m_el[0]; - m_el[1] = other.m_el[1]; - m_el[2] = other.m_el[2]; - return *this; - } - - SIMD_FORCE_INLINE btVector3 getColumn(int i) const - { - return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]); - } - - - - SIMD_FORCE_INLINE const btVector3& getRow(int i) const - { - return m_el[i]; - } - - - SIMD_FORCE_INLINE btVector3& operator[](int i) - { - btFullAssert(0 <= i && i < 3); - return m_el[i]; - } - - SIMD_FORCE_INLINE const btVector3& operator[](int i) const - { - btFullAssert(0 <= i && i < 3); - return m_el[i]; - } - - btMatrix3x3& operator*=(const btMatrix3x3& m); - - - void setFromOpenGLSubMatrix(const btScalar *m) - { - m_el[0].setValue(m[0],m[4],m[8]); - m_el[1].setValue(m[1],m[5],m[9]); - m_el[2].setValue(m[2],m[6],m[10]); - - } - - void setValue(const btScalar& xx, const btScalar& xy, const btScalar& xz, - const btScalar& yx, const btScalar& yy, const btScalar& yz, - const btScalar& zx, const btScalar& zy, const btScalar& zz) - { - m_el[0].setValue(xx,xy,xz); - m_el[1].setValue(yx,yy,yz); - m_el[2].setValue(zx,zy,zz); - } - - void setRotation(const btQuaternion& q) - { - btScalar d = q.length2(); - btFullAssert(d != btScalar(0.0)); - btScalar s = btScalar(2.0) / d; - btScalar xs = q.x() * s, ys = q.y() * s, zs = q.z() * s; - btScalar wx = q.w() * xs, wy = q.w() * ys, wz = q.w() * zs; - btScalar xx = q.x() * xs, xy = q.x() * ys, xz = q.x() * zs; - btScalar yy = q.y() * ys, yz = q.y() * zs, zz = q.z() * zs; - setValue(btScalar(1.0) - (yy + zz), xy - wz, xz + wy, - xy + wz, btScalar(1.0) - (xx + zz), yz - wx, - xz - wy, yz + wx, btScalar(1.0) - (xx + yy)); - } - - - - void setEulerYPR(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) - { - - btScalar cy(btCos(yaw)); - btScalar sy(btSin(yaw)); - btScalar cp(btCos(pitch)); - btScalar sp(btSin(pitch)); - btScalar cr(btCos(roll)); - btScalar sr(btSin(roll)); - btScalar cc = cy * cr; - btScalar cs = cy * sr; - btScalar sc = sy * cr; - btScalar ss = sy * sr; - setValue(cc - sp * ss, -cs - sp * sc, -sy * cp, - cp * sr, cp * cr, -sp, - sc + sp * cs, -ss + sp * cc, cy * cp); - - } - - /** - * setEulerZYX - * @param euler a const reference to a btVector3 of euler angles - * These angles are used to produce a rotation matrix. The euler - * angles are applied in ZYX order. I.e a vector is first rotated - * about X then Y and then Z - **/ - - void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) { - btScalar ci ( btCos(eulerX)); - btScalar cj ( btCos(eulerY)); - btScalar ch ( btCos(eulerZ)); - btScalar si ( btSin(eulerX)); - btScalar sj ( btSin(eulerY)); - btScalar sh ( btSin(eulerZ)); - btScalar cc = ci * ch; - btScalar cs = ci * sh; - btScalar sc = si * ch; - btScalar ss = si * sh; - - setValue(cj * ch, sj * sc - cs, sj * cc + ss, - cj * sh, sj * ss + cc, sj * cs - sc, - -sj, cj * si, cj * ci); - } - - void setIdentity() - { - setValue(btScalar(1.0), btScalar(0.0), btScalar(0.0), - btScalar(0.0), btScalar(1.0), btScalar(0.0), - btScalar(0.0), btScalar(0.0), btScalar(1.0)); - } - - void getOpenGLSubMatrix(btScalar *m) const - { - m[0] = btScalar(m_el[0].x()); - m[1] = btScalar(m_el[1].x()); - m[2] = btScalar(m_el[2].x()); - m[3] = btScalar(0.0); - m[4] = btScalar(m_el[0].y()); - m[5] = btScalar(m_el[1].y()); - m[6] = btScalar(m_el[2].y()); - m[7] = btScalar(0.0); - m[8] = btScalar(m_el[0].z()); - m[9] = btScalar(m_el[1].z()); - m[10] = btScalar(m_el[2].z()); - m[11] = btScalar(0.0); - } - - void getRotation(btQuaternion& q) const - { - btScalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z(); - btScalar temp[4]; - - if (trace > btScalar(0.0)) - { - btScalar s = btSqrt(trace + btScalar(1.0)); - temp[3]=(s * btScalar(0.5)); - s = btScalar(0.5) / s; - - temp[0]=((m_el[2].y() - m_el[1].z()) * s); - temp[1]=((m_el[0].z() - m_el[2].x()) * s); - temp[2]=((m_el[1].x() - m_el[0].y()) * s); - } - else - { - int i = m_el[0].x() < m_el[1].y() ? - (m_el[1].y() < m_el[2].z() ? 2 : 1) : - (m_el[0].x() < m_el[2].z() ? 2 : 0); - int j = (i + 1) % 3; - int k = (i + 2) % 3; - - btScalar s = btSqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + btScalar(1.0)); - temp[i] = s * btScalar(0.5); - s = btScalar(0.5) / s; - - temp[3] = (m_el[k][j] - m_el[j][k]) * s; - temp[j] = (m_el[j][i] + m_el[i][j]) * s; - temp[k] = (m_el[k][i] + m_el[i][k]) * s; - } - q.setValue(temp[0],temp[1],temp[2],temp[3]); - } - - void getEuler(btScalar& yaw, btScalar& pitch, btScalar& roll) const - { - - if (btScalar(m_el[1].z()) < btScalar(1)) - { - if (btScalar(m_el[1].z()) > -btScalar(1)) - { - yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x())); - pitch = btScalar(btAsin(-m_el[1].y())); - roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z())); - } - else - { - yaw = btScalar(-btAtan2(-m_el[0].y(), m_el[0].z())); - pitch = SIMD_HALF_PI; - roll = btScalar(0.0); - } - } - else - { - yaw = btScalar(btAtan2(-m_el[0].y(), m_el[0].z())); - pitch = -SIMD_HALF_PI; - roll = btScalar(0.0); - } - } - - - - - btMatrix3x3 scaled(const btVector3& s) const - { - return btMatrix3x3(m_el[0].x() * s.x(), m_el[0].y() * s.y(), m_el[0].z() * s.z(), - m_el[1].x() * s.x(), m_el[1].y() * s.y(), m_el[1].z() * s.z(), - m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z()); - } - - btScalar determinant() const; - btMatrix3x3 adjoint() const; - btMatrix3x3 absolute() const; - btMatrix3x3 transpose() const; - btMatrix3x3 inverse() const; - - btMatrix3x3 transposeTimes(const btMatrix3x3& m) const; - btMatrix3x3 timesTranspose(const btMatrix3x3& m) const; - - SIMD_FORCE_INLINE btScalar tdotx(const btVector3& v) const - { - return m_el[0].x() * v.x() + m_el[1].x() * v.y() + m_el[2].x() * v.z(); - } - SIMD_FORCE_INLINE btScalar tdoty(const btVector3& v) const - { - return m_el[0].y() * v.x() + m_el[1].y() * v.y() + m_el[2].y() * v.z(); - } - SIMD_FORCE_INLINE btScalar tdotz(const btVector3& v) const - { - return m_el[0].z() * v.x() + m_el[1].z() * v.y() + m_el[2].z() * v.z(); - } - - - - protected: - btScalar cofac(int r1, int c1, int r2, int c2) const - { - return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1]; - } - - btVector3 m_el[3]; - }; - - SIMD_FORCE_INLINE btMatrix3x3& - btMatrix3x3::operator*=(const btMatrix3x3& m) - { - setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]), - m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]), - m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2])); - return *this; - } - - SIMD_FORCE_INLINE btScalar - btMatrix3x3::determinant() const - { - return triple((*this)[0], (*this)[1], (*this)[2]); - } - - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::absolute() const - { - return btMatrix3x3( - btFabs(m_el[0].x()), btFabs(m_el[0].y()), btFabs(m_el[0].z()), - btFabs(m_el[1].x()), btFabs(m_el[1].y()), btFabs(m_el[1].z()), - btFabs(m_el[2].x()), btFabs(m_el[2].y()), btFabs(m_el[2].z())); - } - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::transpose() const - { - return btMatrix3x3(m_el[0].x(), m_el[1].x(), m_el[2].x(), - m_el[0].y(), m_el[1].y(), m_el[2].y(), - m_el[0].z(), m_el[1].z(), m_el[2].z()); - } - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::adjoint() const - { - return btMatrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2), - cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0), - cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1)); - } - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::inverse() const - { - btVector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1)); - btScalar det = (*this)[0].dot(co); - btFullAssert(det != btScalar(0.0)); - btScalar s = btScalar(1.0) / det; - return btMatrix3x3(co.x() * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s, - co.y() * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s, - co.z() * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s); - } - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::transposeTimes(const btMatrix3x3& m) const - { - return btMatrix3x3( - m_el[0].x() * m[0].x() + m_el[1].x() * m[1].x() + m_el[2].x() * m[2].x(), - m_el[0].x() * m[0].y() + m_el[1].x() * m[1].y() + m_el[2].x() * m[2].y(), - m_el[0].x() * m[0].z() + m_el[1].x() * m[1].z() + m_el[2].x() * m[2].z(), - m_el[0].y() * m[0].x() + m_el[1].y() * m[1].x() + m_el[2].y() * m[2].x(), - m_el[0].y() * m[0].y() + m_el[1].y() * m[1].y() + m_el[2].y() * m[2].y(), - m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(), - m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(), - m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(), - m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].z()); - } - - SIMD_FORCE_INLINE btMatrix3x3 - btMatrix3x3::timesTranspose(const btMatrix3x3& m) const - { - return btMatrix3x3( - m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]), - m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]), - m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2])); - - } - - SIMD_FORCE_INLINE btVector3 - operator*(const btMatrix3x3& m, const btVector3& v) - { - return btVector3(m[0].dot(v), m[1].dot(v), m[2].dot(v)); - } - - - SIMD_FORCE_INLINE btVector3 - operator*(const btVector3& v, const btMatrix3x3& m) - { - return btVector3(m.tdotx(v), m.tdoty(v), m.tdotz(v)); - } - - SIMD_FORCE_INLINE btMatrix3x3 - operator*(const btMatrix3x3& m1, const btMatrix3x3& m2) - { - return btMatrix3x3( - m2.tdotx( m1[0]), m2.tdoty( m1[0]), m2.tdotz( m1[0]), - m2.tdotx( m1[1]), m2.tdoty( m1[1]), m2.tdotz( m1[1]), - m2.tdotx( m1[2]), m2.tdoty( m1[2]), m2.tdotz( m1[2])); - } - -/* - SIMD_FORCE_INLINE btMatrix3x3 btMultTransposeLeft(const btMatrix3x3& m1, const btMatrix3x3& m2) { - return btMatrix3x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[1][0] + m1[2][0] * m2[2][0], - m1[0][0] * m2[0][1] + m1[1][0] * m2[1][1] + m1[2][0] * m2[2][1], - m1[0][0] * m2[0][2] + m1[1][0] * m2[1][2] + m1[2][0] * m2[2][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[1][0] + m1[2][1] * m2[2][0], - m1[0][1] * m2[0][1] + m1[1][1] * m2[1][1] + m1[2][1] * m2[2][1], - m1[0][1] * m2[0][2] + m1[1][1] * m2[1][2] + m1[2][1] * m2[2][2], - m1[0][2] * m2[0][0] + m1[1][2] * m2[1][0] + m1[2][2] * m2[2][0], - m1[0][2] * m2[0][1] + m1[1][2] * m2[1][1] + m1[2][2] * m2[2][1], - m1[0][2] * m2[0][2] + m1[1][2] * m2[1][2] + m1[2][2] * m2[2][2]); -} -*/ - - -#endif diff --git a/extern/bullet2/src/LinearMath/btMinMax.h b/extern/bullet2/src/LinearMath/btMinMax.h deleted file mode 100644 index 5e27d62a4a4..00000000000 --- a/extern/bullet2/src/LinearMath/btMinMax.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef GEN_MINMAX_H -#define GEN_MINMAX_H - -template -SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) -{ - return a < b ? a : b ; -} - -template -SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) -{ - return a > b ? a : b; -} - -template -SIMD_FORCE_INLINE const T& GEN_clamped(const T& a, const T& lb, const T& ub) -{ - return a < lb ? lb : (ub < a ? ub : a); -} - -template -SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) -{ - if (b < a) - { - a = b; - } -} - -template -SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) -{ - if (a < b) - { - a = b; - } -} - -template -SIMD_FORCE_INLINE void GEN_clamp(T& a, const T& lb, const T& ub) -{ - if (a < lb) - { - a = lb; - } - else if (ub < a) - { - a = ub; - } -} - -#endif diff --git a/extern/bullet2/src/LinearMath/btMotionState.h b/extern/bullet2/src/LinearMath/btMotionState.h deleted file mode 100644 index 1975e5ff900..00000000000 --- a/extern/bullet2/src/LinearMath/btMotionState.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BT_MOTIONSTATE_H -#define BT_MOTIONSTATE_H - -#include "btTransform.h" - -///btMotionState allows the dynamics world to synchronize the updated world transforms with graphics -///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) -class btMotionState -{ - public: - - virtual ~btMotionState() - { - - } - - virtual void getWorldTransform(btTransform& worldTrans ) const =0; - - //Bullet only calls the update of worldtransform for active objects - virtual void setWorldTransform(const btTransform& worldTrans)=0; - - -}; - -#endif //BT_MOTIONSTATE_H diff --git a/extern/bullet2/src/LinearMath/btPoint3.h b/extern/bullet2/src/LinearMath/btPoint3.h deleted file mode 100644 index a2020e26d12..00000000000 --- a/extern/bullet2/src/LinearMath/btPoint3.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef btPoint3_H -#define btPoint3_H - -#include "btVector3.h" - -typedef btVector3 btPoint3; - -#endif diff --git a/extern/bullet2/src/LinearMath/btPoolAllocator.h b/extern/bullet2/src/LinearMath/btPoolAllocator.h deleted file mode 100755 index ad772ae123f..00000000000 --- a/extern/bullet2/src/LinearMath/btPoolAllocator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef _BT_POOL_ALLOCATOR_H -#define _BT_POOL_ALLOCATOR_H - -#include "btScalar.h" -#include "btAlignedAllocator.h" - -class btPoolAllocator -{ - int m_elemSize; - int m_maxElements; - int m_freeCount; - void* m_firstFree; - unsigned char* m_pool; - -public: - - btPoolAllocator(int elemSize, int maxElements) - :m_elemSize(elemSize), - m_maxElements(maxElements) - { - m_pool = (unsigned char*) btAlignedAlloc(m_elemSize*m_maxElements,16); - - unsigned char* p = m_pool; - m_firstFree = p; - m_freeCount = m_maxElements; - int count = m_maxElements; - while (--count) { - *(void**)p = (p + m_elemSize); - p += m_elemSize; - } - *(void**)p = 0; - } - - ~btPoolAllocator() - { - btAlignedFree( m_pool); - } - - int getFreeCount() const - { - return m_freeCount; - } - - void* allocate(int size) - { - btAssert(!size || size<=m_elemSize); - btAssert(m_freeCount>0); - void* result = m_firstFree; - m_firstFree = *(void**)m_firstFree; - --m_freeCount; - return result; - } - - bool validPtr(void* ptr) - { - if (ptr) { - if (((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize)) - { - return true; - } - } - return false; - } - - void free(void* ptr) - { - if (ptr) { - btAssert((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize); - - *(void**)ptr = m_firstFree; - m_firstFree = ptr; - ++m_freeCount; - } - } - - -}; - -#endif //_BT_POOL_ALLOCATOR_H diff --git a/extern/bullet2/src/LinearMath/btQuadWord.h b/extern/bullet2/src/LinearMath/btQuadWord.h deleted file mode 100644 index 2e5950ebd5d..00000000000 --- a/extern/bullet2/src/LinearMath/btQuadWord.h +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef SIMD_QUADWORD_H -#define SIMD_QUADWORD_H - -#include "btScalar.h" -#include "btMinMax.h" - -//ATTRIBUTE_ALIGNED16(class) btQuadWordStorage -//some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. todo: look into this - -class btQuadWordStorage -{ -protected: - btScalar m_x; - btScalar m_y; - btScalar m_z; - btScalar m_unusedW; -}; - - -///btQuadWord is base-class for vectors, points -class btQuadWord : public btQuadWordStorage -{ - public: - -// SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_x)[i]; } -// SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_x)[i]; } - - SIMD_FORCE_INLINE const btScalar& getX() const { return m_x; } - - SIMD_FORCE_INLINE const btScalar& getY() const { return m_y; } - - SIMD_FORCE_INLINE const btScalar& getZ() const { return m_z; } - - SIMD_FORCE_INLINE void setX(btScalar x) { m_x = x;}; - - SIMD_FORCE_INLINE void setY(btScalar y) { m_y = y;}; - - SIMD_FORCE_INLINE void setZ(btScalar z) { m_z = z;}; - - SIMD_FORCE_INLINE void setW(btScalar w) { m_unusedW = w;}; - - SIMD_FORCE_INLINE const btScalar& x() const { return m_x; } - - SIMD_FORCE_INLINE const btScalar& y() const { return m_y; } - - SIMD_FORCE_INLINE const btScalar& z() const { return m_z; } - - SIMD_FORCE_INLINE const btScalar& w() const { return m_unusedW; } - - - SIMD_FORCE_INLINE operator btScalar *() { return &m_x; } - SIMD_FORCE_INLINE operator const btScalar *() const { return &m_x; } - - - - SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z) - { - m_x=x; - m_y=y; - m_z=z; - m_unusedW = 0.f; - } - -/* void getValue(btScalar *m) const - { - m[0] = m_x; - m[1] = m_y; - m[2] = m_z; - } -*/ - SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) - { - m_x=x; - m_y=y; - m_z=z; - m_unusedW=w; - } - - SIMD_FORCE_INLINE btQuadWord() - // :m_x(btScalar(0.)),m_y(btScalar(0.)),m_z(btScalar(0.)),m_unusedW(btScalar(0.)) - { - } - - SIMD_FORCE_INLINE btQuadWord(const btQuadWordStorage& q) - { - *((btQuadWordStorage*)this) = q; - } - - SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z) - { - m_x = x, m_y = y, m_z = z, m_unusedW = 0.0f; - } - - SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) - { - m_x = x, m_y = y, m_z = z, m_unusedW = w; - } - - - SIMD_FORCE_INLINE void setMax(const btQuadWord& other) - { - btSetMax(m_x, other.m_x); - btSetMax(m_y, other.m_y); - btSetMax(m_z, other.m_z); - btSetMax(m_unusedW, other.m_unusedW); - } - - SIMD_FORCE_INLINE void setMin(const btQuadWord& other) - { - btSetMin(m_x, other.m_x); - btSetMin(m_y, other.m_y); - btSetMin(m_z, other.m_z); - btSetMin(m_unusedW, other.m_unusedW); - } - - - -}; - -#endif //SIMD_QUADWORD_H diff --git a/extern/bullet2/src/LinearMath/btQuaternion.h b/extern/bullet2/src/LinearMath/btQuaternion.h deleted file mode 100644 index 27ab1fcd2c3..00000000000 --- a/extern/bullet2/src/LinearMath/btQuaternion.h +++ /dev/null @@ -1,321 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef SIMD__QUATERNION_H_ -#define SIMD__QUATERNION_H_ - -#include "btVector3.h" - -class btQuaternion : public btQuadWord { -public: - btQuaternion() {} - - // template - // explicit Quaternion(const btScalar *v) : Tuple4(v) {} - - btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w) - : btQuadWord(x, y, z, w) - {} - - btQuaternion(const btVector3& axis, const btScalar& angle) - { - setRotation(axis, angle); - } - - btQuaternion(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) - { - setEuler(yaw, pitch, roll); - } - - void setRotation(const btVector3& axis, const btScalar& angle) - { - btScalar d = axis.length(); - assert(d != btScalar(0.0)); - btScalar s = btSin(angle * btScalar(0.5)) / d; - setValue(axis.x() * s, axis.y() * s, axis.z() * s, - btCos(angle * btScalar(0.5))); - } - - void setEuler(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) - { - btScalar halfYaw = btScalar(yaw) * btScalar(0.5); - btScalar halfPitch = btScalar(pitch) * btScalar(0.5); - btScalar halfRoll = btScalar(roll) * btScalar(0.5); - btScalar cosYaw = btCos(halfYaw); - btScalar sinYaw = btSin(halfYaw); - btScalar cosPitch = btCos(halfPitch); - btScalar sinPitch = btSin(halfPitch); - btScalar cosRoll = btCos(halfRoll); - btScalar sinRoll = btSin(halfRoll); - setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, - cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, - sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, - cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); - } - - btQuaternion& operator+=(const btQuaternion& q) - { - m_x += q.x(); m_y += q.y(); m_z += q.z(); m_unusedW += q.m_unusedW; - return *this; - } - - btQuaternion& operator-=(const btQuaternion& q) - { - m_x -= q.x(); m_y -= q.y(); m_z -= q.z(); m_unusedW -= q.m_unusedW; - return *this; - } - - btQuaternion& operator*=(const btScalar& s) - { - m_x *= s; m_y *= s; m_z *= s; m_unusedW *= s; - return *this; - } - - - btQuaternion& operator*=(const btQuaternion& q) - { - setValue(m_unusedW * q.x() + m_x * q.m_unusedW + m_y * q.z() - m_z * q.y(), - m_unusedW * q.y() + m_y * q.m_unusedW + m_z * q.x() - m_x * q.z(), - m_unusedW * q.z() + m_z * q.m_unusedW + m_x * q.y() - m_y * q.x(), - m_unusedW * q.m_unusedW - m_x * q.x() - m_y * q.y() - m_z * q.z()); - return *this; - } - - btScalar dot(const btQuaternion& q) const - { - return m_x * q.x() + m_y * q.y() + m_z * q.z() + m_unusedW * q.m_unusedW; - } - - btScalar length2() const - { - return dot(*this); - } - - btScalar length() const - { - return btSqrt(length2()); - } - - btQuaternion& normalize() - { - return *this /= length(); - } - - SIMD_FORCE_INLINE btQuaternion - operator*(const btScalar& s) const - { - return btQuaternion(x() * s, y() * s, z() * s, m_unusedW * s); - } - - - - btQuaternion operator/(const btScalar& s) const - { - assert(s != btScalar(0.0)); - return *this * (btScalar(1.0) / s); - } - - - btQuaternion& operator/=(const btScalar& s) - { - assert(s != btScalar(0.0)); - return *this *= btScalar(1.0) / s; - } - - - btQuaternion normalized() const - { - return *this / length(); - } - - btScalar angle(const btQuaternion& q) const - { - btScalar s = btSqrt(length2() * q.length2()); - assert(s != btScalar(0.0)); - return btAcos(dot(q) / s); - } - - btScalar getAngle() const - { - btScalar s = btScalar(2.) * btAcos(m_unusedW); - return s; - } - - - - btQuaternion inverse() const - { - return btQuaternion(m_x, m_y, m_z, -m_unusedW); - } - - SIMD_FORCE_INLINE btQuaternion - operator+(const btQuaternion& q2) const - { - const btQuaternion& q1 = *this; - return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_unusedW + q2.m_unusedW); - } - - SIMD_FORCE_INLINE btQuaternion - operator-(const btQuaternion& q2) const - { - const btQuaternion& q1 = *this; - return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_unusedW - q2.m_unusedW); - } - - SIMD_FORCE_INLINE btQuaternion operator-() const - { - const btQuaternion& q2 = *this; - return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_unusedW); - } - - SIMD_FORCE_INLINE btQuaternion farthest( const btQuaternion& qd) const - { - btQuaternion diff,sum; - diff = *this - qd; - sum = *this + qd; - if( diff.dot(diff) > sum.dot(sum) ) - return qd; - return (-qd); - } - - btQuaternion slerp(const btQuaternion& q, const btScalar& t) const - { - btScalar theta = angle(q); - if (theta != btScalar(0.0)) - { - btScalar d = btScalar(1.0) / btSin(theta); - btScalar s0 = btSin((btScalar(1.0) - t) * theta); - btScalar s1 = btSin(t * theta); - return btQuaternion((m_x * s0 + q.x() * s1) * d, - (m_y * s0 + q.y() * s1) * d, - (m_z * s0 + q.z() * s1) * d, - (m_unusedW * s0 + q.m_unusedW * s1) * d); - } - else - { - return *this; - } - } - - SIMD_FORCE_INLINE const btScalar& getW() const { return m_unusedW; } - - -}; - - - -SIMD_FORCE_INLINE btQuaternion -operator-(const btQuaternion& q) -{ - return btQuaternion(-q.x(), -q.y(), -q.z(), -q.w()); -} - - - - -SIMD_FORCE_INLINE btQuaternion -operator*(const btQuaternion& q1, const btQuaternion& q2) { - return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(), - q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(), - q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(), - q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z()); -} - -SIMD_FORCE_INLINE btQuaternion -operator*(const btQuaternion& q, const btVector3& w) -{ - return btQuaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(), - q.w() * w.y() + q.z() * w.x() - q.x() * w.z(), - q.w() * w.z() + q.x() * w.y() - q.y() * w.x(), - -q.x() * w.x() - q.y() * w.y() - q.z() * w.z()); -} - -SIMD_FORCE_INLINE btQuaternion -operator*(const btVector3& w, const btQuaternion& q) -{ - return btQuaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(), - w.y() * q.w() + w.z() * q.x() - w.x() * q.z(), - w.z() * q.w() + w.x() * q.y() - w.y() * q.x(), - -w.x() * q.x() - w.y() * q.y() - w.z() * q.z()); -} - -SIMD_FORCE_INLINE btScalar -dot(const btQuaternion& q1, const btQuaternion& q2) -{ - return q1.dot(q2); -} - - -SIMD_FORCE_INLINE btScalar -length(const btQuaternion& q) -{ - return q.length(); -} - -SIMD_FORCE_INLINE btScalar -angle(const btQuaternion& q1, const btQuaternion& q2) -{ - return q1.angle(q2); -} - - -SIMD_FORCE_INLINE btQuaternion -inverse(const btQuaternion& q) -{ - return q.inverse(); -} - -SIMD_FORCE_INLINE btQuaternion -slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t) -{ - return q1.slerp(q2, t); -} - -SIMD_FORCE_INLINE btVector3 -quatRotate(const btQuaternion& rotation, const btVector3& v) -{ - btQuaternion q = rotation * v; - q *= rotation.inverse(); - return btVector3(q.getX(),q.getY(),q.getZ()); -} - -SIMD_FORCE_INLINE btQuaternion -shortestArcQuat(const btVector3& v0, const btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized -{ - btVector3 c = v0.cross(v1); - btScalar d = v0.dot(v1); - - if (d < -1.0 + SIMD_EPSILON) - return btQuaternion(0.0f,1.0f,0.0f,0.0f); // just pick any vector - - btScalar s = btSqrt((1.0f + d) * 2.0f); - btScalar rs = 1.0f / s; - - return btQuaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f); -} - -SIMD_FORCE_INLINE btQuaternion -shortestArcQuatNormalize2(btVector3& v0,btVector3& v1) -{ - v0.normalize(); - v1.normalize(); - return shortestArcQuat(v0,v1); -} - -#endif - - - diff --git a/extern/bullet2/src/LinearMath/btQuickprof.cpp b/extern/bullet2/src/LinearMath/btQuickprof.cpp deleted file mode 100644 index 37a0c8c3be5..00000000000 --- a/extern/bullet2/src/LinearMath/btQuickprof.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright (c) 2006 Tyler Streeter - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - -*/ - - -// Please visit the project website (http://quickprof.sourceforge.net) -// for usage instructions. - -// Credits: The Clock class was inspired by the Timer classes in -// Ogre (www.ogre3d.org). - -#include "LinearMath/btQuickprof.h" - -#ifdef USE_QUICKPROF - -// Note: We must declare these private static variables again here to -// avoid link errors. -bool btProfiler::mEnabled = false; -btClock btProfiler::mClock; -unsigned long int btProfiler::mCurrentCycleStartMicroseconds = 0; -unsigned long int btProfiler::mLastCycleDurationMicroseconds = 0; -std::map btProfiler::mProfileBlocks; -std::ofstream btProfiler::mOutputFile; -bool btProfiler::mFirstFileOutput = true; -btProfiler::BlockTimingMethod btProfiler::mFileOutputMethod; -unsigned long int btProfiler::mCycleNumber = 0; -#endif //USE_QUICKPROF diff --git a/extern/bullet2/src/LinearMath/btQuickprof.h b/extern/bullet2/src/LinearMath/btQuickprof.h deleted file mode 100644 index a885967c5fa..00000000000 --- a/extern/bullet2/src/LinearMath/btQuickprof.h +++ /dev/null @@ -1,712 +0,0 @@ -/* -Copyright (c) 2006 Tyler Streeter - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - -*/ - -// Please visit the project website (http://quickprof.sourceforge.net) -// for usage instructions. - -// Credits: The Clock class was inspired by the Timer classes in -// Ogre (www.ogre3d.org). - -#ifndef QUICK_PROF_H -#define QUICK_PROF_H - -#include "btScalar.h" - -//#define USE_QUICKPROF 1 -//Don't use quickprof for now, because it contains STL. TODO: replace STL by Bullet container classes. - - -//if you don't need btClock, you can comment next line -#define USE_BT_CLOCK 1 - -#ifdef USE_BT_CLOCK -#ifdef __CELLOS_LV2__ -#include -#include -typedef uint64_t __int64; -#endif - -#if defined (SUNOS) || defined (__SUNOS__) - #include -#endif - -#if defined(WIN32) || defined(_WIN32) - - #define USE_WINDOWS_TIMERS - #define WIN32_LEAN_AND_MEAN - #define NOWINRES - #define NOMCX - #define NOIME -#ifdef _XBOX - #include -#else - #include -#endif - #include - -#else - #include -#endif - -#define mymin(a,b) (a > b ? a : b) - -/// basic clock -class btClock - { - public: - btClock() - { -#ifdef USE_WINDOWS_TIMERS - QueryPerformanceFrequency(&mClockFrequency); -#endif - reset(); - } - - ~btClock() - { - } - - /// Resets the initial reference time. - void reset() - { -#ifdef USE_WINDOWS_TIMERS - QueryPerformanceCounter(&mStartTime); - mStartTick = GetTickCount(); - mPrevElapsedTime = 0; -#else -#ifdef __CELLOS_LV2__ - - typedef uint64_t __int64; - typedef __int64 ClockSize; - ClockSize newTime; - __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); - mStartTime = newTime; -#else - gettimeofday(&mStartTime, 0); -#endif - -#endif - } - - /// Returns the time in ms since the last call to reset or since - /// the btClock was created. - unsigned long int getTimeMilliseconds() - { -#ifdef USE_WINDOWS_TIMERS - LARGE_INTEGER currentTime; - QueryPerformanceCounter(¤tTime); - LONGLONG elapsedTime = currentTime.QuadPart - - mStartTime.QuadPart; - - // Compute the number of millisecond ticks elapsed. - unsigned long msecTicks = (unsigned long)(1000 * elapsedTime / - mClockFrequency.QuadPart); - - // Check for unexpected leaps in the Win32 performance counter. - // (This is caused by unexpected data across the PCI to ISA - // bridge, aka south bridge. See Microsoft KB274323.) - unsigned long elapsedTicks = GetTickCount() - mStartTick; - signed long msecOff = (signed long)(msecTicks - elapsedTicks); - if (msecOff < -100 || msecOff > 100) - { - // Adjust the starting time forwards. - LONGLONG msecAdjustment = mymin(msecOff * - mClockFrequency.QuadPart / 1000, elapsedTime - - mPrevElapsedTime); - mStartTime.QuadPart += msecAdjustment; - elapsedTime -= msecAdjustment; - - // Recompute the number of millisecond ticks elapsed. - msecTicks = (unsigned long)(1000 * elapsedTime / - mClockFrequency.QuadPart); - } - - // Store the current elapsed time for adjustments next time. - mPrevElapsedTime = elapsedTime; - - return msecTicks; -#else - -#ifdef __CELLOS_LV2__ - __int64 freq=sys_time_get_timebase_frequency(); - double dFreq=((double) freq) / 1000.0; - typedef uint64_t __int64; - typedef __int64 ClockSize; - ClockSize newTime; - __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); - - return (newTime-mStartTime) / dFreq; -#else - - struct timeval currentTime; - gettimeofday(¤tTime, 0); - return (currentTime.tv_sec - mStartTime.tv_sec) * 1000 + - (currentTime.tv_usec - mStartTime.tv_usec) / 1000; -#endif //__CELLOS_LV2__ -#endif - } - - /// Returns the time in us since the last call to reset or since - /// the Clock was created. - unsigned long int getTimeMicroseconds() - { -#ifdef USE_WINDOWS_TIMERS - LARGE_INTEGER currentTime; - QueryPerformanceCounter(¤tTime); - LONGLONG elapsedTime = currentTime.QuadPart - - mStartTime.QuadPart; - - // Compute the number of millisecond ticks elapsed. - unsigned long msecTicks = (unsigned long)(1000 * elapsedTime / - mClockFrequency.QuadPart); - - // Check for unexpected leaps in the Win32 performance counter. - // (This is caused by unexpected data across the PCI to ISA - // bridge, aka south bridge. See Microsoft KB274323.) - unsigned long elapsedTicks = GetTickCount() - mStartTick; - signed long msecOff = (signed long)(msecTicks - elapsedTicks); - if (msecOff < -100 || msecOff > 100) - { - // Adjust the starting time forwards. - LONGLONG msecAdjustment = mymin(msecOff * - mClockFrequency.QuadPart / 1000, elapsedTime - - mPrevElapsedTime); - mStartTime.QuadPart += msecAdjustment; - elapsedTime -= msecAdjustment; - } - - // Store the current elapsed time for adjustments next time. - mPrevElapsedTime = elapsedTime; - - // Convert to microseconds. - unsigned long usecTicks = (unsigned long)(1000000 * elapsedTime / - mClockFrequency.QuadPart); - - return usecTicks; -#else - -#ifdef __CELLOS_LV2__ - __int64 freq=sys_time_get_timebase_frequency(); - double dFreq=((double) freq)/ 1000000.0; - typedef uint64_t __int64; - typedef __int64 ClockSize; - ClockSize newTime; - __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); - - return (newTime-mStartTime) / dFreq; -#else - - struct timeval currentTime; - gettimeofday(¤tTime, 0); - return (currentTime.tv_sec - mStartTime.tv_sec) * 1000000 + - (currentTime.tv_usec - mStartTime.tv_usec); -#endif//__CELLOS_LV2__ -#endif - } - - private: -#ifdef USE_WINDOWS_TIMERS - LARGE_INTEGER mClockFrequency; - DWORD mStartTick; - LONGLONG mPrevElapsedTime; - LARGE_INTEGER mStartTime; -#else -#ifdef __CELLOS_LV2__ - uint64_t mStartTime; -#else - struct timeval mStartTime; -#endif -#endif //__CELLOS_LV2__ - - }; - -#endif //USE_BT_CLOCK - - -#ifdef USE_QUICKPROF - - -#include -#include -#include -#include - - - - -namespace hidden -{ - /// A simple data structure representing a single timed block - /// of code. - struct ProfileBlock - { - ProfileBlock() - { - currentBlockStartMicroseconds = 0; - currentCycleTotalMicroseconds = 0; - lastCycleTotalMicroseconds = 0; - totalMicroseconds = 0; - } - - /// The starting time (in us) of the current block update. - unsigned long int currentBlockStartMicroseconds; - - /// The accumulated time (in us) spent in this block during the - /// current profiling cycle. - unsigned long int currentCycleTotalMicroseconds; - - /// The accumulated time (in us) spent in this block during the - /// past profiling cycle. - unsigned long int lastCycleTotalMicroseconds; - - /// The total accumulated time (in us) spent in this block. - unsigned long int totalMicroseconds; - }; - -}; - -/// A static class that manages timing for a set of profiling blocks. -class btProfiler -{ -public: - /// A set of ways to retrieve block timing data. - enum BlockTimingMethod - { - /// The total time spent in the block (in seconds) since the - /// profiler was initialized. - BLOCK_TOTAL_SECONDS, - - /// The total time spent in the block (in ms) since the - /// profiler was initialized. - BLOCK_TOTAL_MILLISECONDS, - - /// The total time spent in the block (in us) since the - /// profiler was initialized. - BLOCK_TOTAL_MICROSECONDS, - - /// The total time spent in the block, as a % of the total - /// elapsed time since the profiler was initialized. - BLOCK_TOTAL_PERCENT, - - /// The time spent in the block (in seconds) in the most recent - /// profiling cycle. - BLOCK_CYCLE_SECONDS, - - /// The time spent in the block (in ms) in the most recent - /// profiling cycle. - BLOCK_CYCLE_MILLISECONDS, - - /// The time spent in the block (in us) in the most recent - /// profiling cycle. - BLOCK_CYCLE_MICROSECONDS, - - /// The time spent in the block (in seconds) in the most recent - /// profiling cycle, as a % of the total cycle time. - BLOCK_CYCLE_PERCENT - }; - - /// Initializes the profiler. This must be called first. If this is - /// never called, the profiler is effectively disabled; all other - /// functions will return immediately. The first parameter - /// is the name of an output data file; if this string is not empty, - /// data will be saved on every profiling cycle; if this string is - /// empty, no data will be saved to a file. The second parameter - /// determines which timing method is used when printing data to the - /// output file. - inline static void init(const std::string outputFilename="", - BlockTimingMethod outputMethod=BLOCK_CYCLE_MILLISECONDS); - - /// Cleans up allocated memory. - inline static void destroy(); - - /// Begins timing the named block of code. - inline static void beginBlock(const std::string& name); - - /// Updates the accumulated time spent in the named block by adding - /// the elapsed time since the last call to startBlock for this block - /// name. - inline static void endBlock(const std::string& name); - - /// Returns the time spent in the named block according to the - /// given timing method. See comments on BlockTimingMethod for details. - inline static double getBlockTime(const std::string& name, - BlockTimingMethod method=BLOCK_CYCLE_MILLISECONDS); - - /// Defines the end of a profiling cycle. Use this regularly if you - /// want to generate detailed timing information. This must not be - /// called within a timing block. - inline static void endProfilingCycle(); - - /// A helper function that creates a string of statistics for - /// each timing block. This is mainly for printing an overall - /// summary to the command line. - inline static std::string createStatsString( - BlockTimingMethod method=BLOCK_TOTAL_PERCENT); - -//private: - inline btProfiler(); - - inline ~btProfiler(); - - /// Prints an error message to standard output. - inline static void printError(const std::string& msg) - { - //btAssert(0); - std::cout << "[QuickProf error] " << msg << std::endl; - } - - /// Determines whether the profiler is enabled. - static bool mEnabled; - - /// The clock used to time profile blocks. - static btClock mClock; - - /// The starting time (in us) of the current profiling cycle. - static unsigned long int mCurrentCycleStartMicroseconds; - - /// The duration (in us) of the most recent profiling cycle. - static unsigned long int mLastCycleDurationMicroseconds; - - /// Internal map of named profile blocks. - static std::map mProfileBlocks; - - /// The data file used if this feature is enabled in 'init.' - static std::ofstream mOutputFile; - - /// Tracks whether we have begun print data to the output file. - static bool mFirstFileOutput; - - /// The method used when printing timing data to an output file. - static BlockTimingMethod mFileOutputMethod; - - /// The number of the current profiling cycle. - static unsigned long int mCycleNumber; -}; - - -btProfiler::btProfiler() -{ - // This never gets called because a btProfiler instance is never - // created. -} - -btProfiler::~btProfiler() -{ - // This never gets called because a btProfiler instance is never - // created. -} - -void btProfiler::init(const std::string outputFilename, - BlockTimingMethod outputMethod) -{ - mEnabled = true; - - if (!outputFilename.empty()) - { - mOutputFile.open(outputFilename.c_str()); - } - - mFileOutputMethod = outputMethod; - - mClock.reset(); - - // Set the start time for the first cycle. - mCurrentCycleStartMicroseconds = mClock.getTimeMicroseconds(); -} - -void btProfiler::destroy() -{ - if (!mEnabled) - { - return; - } - - if (mOutputFile.is_open()) - { - mOutputFile.close(); - } - - // Destroy all ProfileBlocks. - while (!mProfileBlocks.empty()) - { - delete (*mProfileBlocks.begin()).second; - mProfileBlocks.erase(mProfileBlocks.begin()); - } -} - -void btProfiler::beginBlock(const std::string& name) -{ - if (!mEnabled) - { - return; - } - - if (name.empty()) - { - printError("Cannot allow unnamed profile blocks."); - return; - } - - hidden::ProfileBlock* block = mProfileBlocks[name]; - - if (!block) - { - // Create a new ProfileBlock. - mProfileBlocks[name] = new hidden::ProfileBlock(); - block = mProfileBlocks[name]; - } - - // We do this at the end to get more accurate results. - block->currentBlockStartMicroseconds = mClock.getTimeMicroseconds(); -} - -void btProfiler::endBlock(const std::string& name) -{ - if (!mEnabled) - { - return; - } - - // We do this at the beginning to get more accurate results. - unsigned long int endTick = mClock.getTimeMicroseconds(); - - hidden::ProfileBlock* block = mProfileBlocks[name]; - - if (!block) - { - // The named block does not exist. Print an error. - printError("The profile block named '" + name + - "' does not exist."); - return; - } - - unsigned long int blockDuration = endTick - - block->currentBlockStartMicroseconds; - block->currentCycleTotalMicroseconds += blockDuration; - block->totalMicroseconds += blockDuration; -} - -double btProfiler::getBlockTime(const std::string& name, - BlockTimingMethod method) -{ - if (!mEnabled) - { - return 0; - } - - hidden::ProfileBlock* block = mProfileBlocks[name]; - - if (!block) - { - // The named block does not exist. Print an error. - printError("The profile block named '" + name + - "' does not exist."); - return 0; - } - - double result = 0; - - switch(method) - { - case BLOCK_TOTAL_SECONDS: - result = (double)block->totalMicroseconds * (double)0.000001; - break; - case BLOCK_TOTAL_MILLISECONDS: - result = (double)block->totalMicroseconds * (double)0.001; - break; - case BLOCK_TOTAL_MICROSECONDS: - result = (double)block->totalMicroseconds; - break; - case BLOCK_TOTAL_PERCENT: - { - double timeSinceInit = (double)mClock.getTimeMicroseconds(); - if (timeSinceInit <= 0) - { - result = 0; - } - else - { - result = 100.0 * (double)block->totalMicroseconds / - timeSinceInit; - } - break; - } - case BLOCK_CYCLE_SECONDS: - result = (double)block->lastCycleTotalMicroseconds * - (double)0.000001; - break; - case BLOCK_CYCLE_MILLISECONDS: - result = (double)block->lastCycleTotalMicroseconds * - (double)0.001; - break; - case BLOCK_CYCLE_MICROSECONDS: - result = (double)block->lastCycleTotalMicroseconds; - break; - case BLOCK_CYCLE_PERCENT: - { - if (0 == mLastCycleDurationMicroseconds) - { - // We have not yet finished a cycle, so just return zero - // percent to avoid a divide by zero error. - result = 0; - } - else - { - result = 100.0 * (double)block->lastCycleTotalMicroseconds / - mLastCycleDurationMicroseconds; - } - break; - } - default: - break; - } - - return result; -} - -void btProfiler::endProfilingCycle() -{ - if (!mEnabled) - { - return; - } - - // Store the duration of the cycle that just finished. - mLastCycleDurationMicroseconds = mClock.getTimeMicroseconds() - - mCurrentCycleStartMicroseconds; - - // For each block, update data for the cycle that just finished. - std::map::iterator iter; - for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); ++iter) - { - hidden::ProfileBlock* block = (*iter).second; - block->lastCycleTotalMicroseconds = - block->currentCycleTotalMicroseconds; - block->currentCycleTotalMicroseconds = 0; - } - - if (mOutputFile.is_open()) - { - // Print data to the output file. - if (mFirstFileOutput) - { - // On the first iteration, print a header line that shows the - // names of each profiling block. - mOutputFile << "#cycle, "; - - for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); - ++iter) - { - mOutputFile << (*iter).first << ", "; - } - - mOutputFile << std::endl; - mFirstFileOutput = false; - } - - mOutputFile << mCycleNumber << ", "; - - for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); - ++iter) - { - mOutputFile << getBlockTime((*iter).first, mFileOutputMethod) - << ", "; - } - - mOutputFile << std::endl; - } - - ++mCycleNumber; - mCurrentCycleStartMicroseconds = mClock.getTimeMicroseconds(); -} - -std::string btProfiler::createStatsString(BlockTimingMethod method) -{ - if (!mEnabled) - { - return ""; - } - - std::string s; - std::string suffix; - - switch(method) - { - case BLOCK_TOTAL_SECONDS: - suffix = "s"; - break; - case BLOCK_TOTAL_MILLISECONDS: - suffix = "ms"; - break; - case BLOCK_TOTAL_MICROSECONDS: - suffix = "us"; - break; - case BLOCK_TOTAL_PERCENT: - { - suffix = "%"; - break; - } - case BLOCK_CYCLE_SECONDS: - suffix = "s"; - break; - case BLOCK_CYCLE_MILLISECONDS: - suffix = "ms"; - break; - case BLOCK_CYCLE_MICROSECONDS: - suffix = "us"; - break; - case BLOCK_CYCLE_PERCENT: - { - suffix = "%"; - break; - } - default: - break; - } - - std::map::iterator iter; - for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); ++iter) - { - if (iter != mProfileBlocks.begin()) - { - s += "\n"; - } - - char blockTime[64]; - sprintf(blockTime, "%lf", getBlockTime((*iter).first, method)); - - s += (*iter).first; - s += ": "; - s += blockTime; - s += " "; - s += suffix; - } - - return s; -} - - -#define BEGIN_PROFILE(a) btProfiler::beginBlock(a) -#define END_PROFILE(a) btProfiler::endBlock(a) - -#else //USE_QUICKPROF -#define BEGIN_PROFILE(a) -#define END_PROFILE(a) - -#endif //USE_QUICKPROF - -#endif //QUICK_PROF_H - - diff --git a/extern/bullet2/src/LinearMath/btRandom.h b/extern/bullet2/src/LinearMath/btRandom.h deleted file mode 100644 index fdf65e01caf..00000000000 --- a/extern/bullet2/src/LinearMath/btRandom.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef GEN_RANDOM_H -#define GEN_RANDOM_H - -#ifdef MT19937 - -#include -#include - -#define GEN_RAND_MAX UINT_MAX - -SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); } -SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); } - -#else - -#include - -#define GEN_RAND_MAX RAND_MAX - -SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); } -SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); } - -#endif - -#endif - diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h deleted file mode 100644 index 85dfaf3eb83..00000000000 --- a/extern/bullet2/src/LinearMath/btScalar.h +++ /dev/null @@ -1,394 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef SIMD___SCALAR_H -#define SIMD___SCALAR_H - -#include - -#include -#include -#include - - -inline int btGetVersion() -{ - return 264; -} - -#ifdef WIN32 - - #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) - - #define SIMD_FORCE_INLINE inline - #define ATTRIBUTE_ALIGNED16(a) a - #define ATTRIBUTE_ALIGNED128(a) a - #else - #define BT_HAS_ALIGNED_ALLOCATOR - #pragma warning(disable:4530) - #pragma warning(disable:4996) - #pragma warning(disable:4786) - #define SIMD_FORCE_INLINE __forceinline - #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a - #define ATTRIBUTE_ALIGNED128(a) __declspec (align(128)) a - #ifdef _XBOX - #define BT_USE_VMX128 - - #include - #define BT_HAVE_NATIVE_FSEL - #define btFsel(a,b,c) __fsel((a),(b),(c)) - #else - #define BT_USE_SSE - #endif - #endif //__MINGW32__ - - #include - #define btAssert assert - //btFullAssert is optional, slows down a lot - #define btFullAssert(x) - - #define btLikely(_c) _c - #define btUnlikely(_c) _c - -#else - -#if defined (__CELLOS_LV2__) - #define SIMD_FORCE_INLINE inline - #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) - #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128))) - #ifndef assert - #include - #endif - #define btAssert assert - //btFullAssert is optional, slows down a lot - #define btFullAssert(x) - - #define btLikely(_c) _c - #define btUnlikely(_c) _c - -#else - -#ifdef USE_LIBSPE2 - - #define SIMD_FORCE_INLINE __inline - #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) - #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128))) - #ifndef assert - #include - #endif - #define btAssert assert - //btFullAssert is optional, slows down a lot - #define btFullAssert(x) - - - #define btLikely(_c) __builtin_expect((_c), 1) - #define btUnlikely(_c) __builtin_expect((_c), 0) - - -#else - //non-windows systems - - #define SIMD_FORCE_INLINE inline - #define ATTRIBUTE_ALIGNED16(a) a - #define ATTRIBUTE_ALIGNED128(a) a - #ifndef assert - #include - #endif - #define btAssert assert - //btFullAssert is optional, slows down a lot - #define btFullAssert(x) - - -#endif // LIBSPE2 - -#endif //__CELLOS_LV2__ -#endif - -/// older compilers (gcc 3.x) and Sun needs double version of sqrt etc. -/// exclude Apple Intel (i's assumed to be a Macbook or new Intel Dual Core Processor) -#if defined (__sun) || defined (__sun__) || defined (__sparc) || (defined (__APPLE__) && ! defined (__i386__)) -//use slow double float precision operation on those platforms -#ifndef BT_USE_DOUBLE_PRECISION -#define BT_FORCE_DOUBLE_FUNCTIONS -#endif -#endif - -#if defined(BT_USE_DOUBLE_PRECISION) -typedef double btScalar; -#else -typedef float btScalar; -#endif - - -#define BT_DECLARE_ALIGNED_ALLOCATOR() \ - SIMD_FORCE_INLINE void* operator new(size_t sizeInBytes) { return btAlignedAlloc(sizeInBytes,16); } \ - SIMD_FORCE_INLINE void operator delete(void* ptr) { btAlignedFree(ptr); } \ - SIMD_FORCE_INLINE void* operator new(size_t, void* ptr) { return ptr; } \ - SIMD_FORCE_INLINE void operator delete(void*, void*) { } \ - - - -#if defined(BT_USE_DOUBLE_PRECISION) || defined(BT_FORCE_DOUBLE_FUNCTIONS) - -SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrt(x); } -SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabs(x); } -SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cos(x); } -SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sin(x); } -SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tan(x); } -SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acos(x); } -SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asin(x); } -SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atan(x); } -SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2(x, y); } -SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return exp(x); } -SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return log(x); } -SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return pow(x,y); } - -#else - -SIMD_FORCE_INLINE btScalar btSqrt(btScalar y) -{ -#ifdef USE_APPROXIMATION - double x, z, tempf; - unsigned long *tfptr = ((unsigned long *)&tempf) + 1; - - tempf = y; - *tfptr = (0xbfcdd90a - *tfptr)>>1; /* estimate of 1/sqrt(y) */ - x = tempf; - z = y*btScalar(0.5); /* hoist out the “/2” */ - x = (btScalar(1.5)*x)-(x*x)*(x*z); /* iteration formula */ - x = (btScalar(1.5)*x)-(x*x)*(x*z); - x = (btScalar(1.5)*x)-(x*x)*(x*z); - x = (btScalar(1.5)*x)-(x*x)*(x*z); - x = (btScalar(1.5)*x)-(x*x)*(x*z); - return x*y; -#else - return sqrtf(y); -#endif -} -SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabsf(x); } -SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); } -SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); } -SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); } -SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { - btAssert(x <= btScalar(1.)); - return acosf(x); -} -SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asinf(x); } -SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); } -SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); } -SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return expf(x); } -SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return logf(x); } -SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return powf(x,y); } - -#endif - -#define SIMD_2_PI btScalar(6.283185307179586232) -#define SIMD_PI (SIMD_2_PI * btScalar(0.5)) -#define SIMD_HALF_PI (SIMD_2_PI * btScalar(0.25)) -#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0)) -#define SIMD_DEGS_PER_RAD (btScalar(360.0) / SIMD_2_PI) - -#ifdef BT_USE_DOUBLE_PRECISION -#define SIMD_EPSILON DBL_EPSILON -#define SIMD_INFINITY DBL_MAX -#else -#define SIMD_EPSILON FLT_EPSILON -#define SIMD_INFINITY FLT_MAX -#endif - -SIMD_FORCE_INLINE btScalar btAtan2Fast(btScalar y, btScalar x) -{ - btScalar coeff_1 = SIMD_PI / 4.0f; - btScalar coeff_2 = 3.0f * coeff_1; - btScalar abs_y = btFabs(y); - btScalar angle; - if (x >= 0.0f) { - btScalar r = (x - abs_y) / (x + abs_y); - angle = coeff_1 - coeff_1 * r; - } else { - btScalar r = (x + abs_y) / (abs_y - x); - angle = coeff_2 - coeff_1 * r; - } - return (y < 0.0f) ? -angle : angle; -} - -SIMD_FORCE_INLINE bool btFuzzyZero(btScalar x) { return btFabs(x) < SIMD_EPSILON; } - -SIMD_FORCE_INLINE bool btEqual(btScalar a, btScalar eps) { - return (((a) <= eps) && !((a) < -eps)); -} -SIMD_FORCE_INLINE bool btGreaterEqual (btScalar a, btScalar eps) { - return (!((a) <= eps)); -} - - -SIMD_FORCE_INLINE int btIsNegative(btScalar x) { - return x < btScalar(0.0) ? 1 : 0; -} - -SIMD_FORCE_INLINE btScalar btRadians(btScalar x) { return x * SIMD_RADS_PER_DEG; } -SIMD_FORCE_INLINE btScalar btDegrees(btScalar x) { return x * SIMD_DEGS_PER_RAD; } - -#define BT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name - -#ifndef btFsel -SIMD_FORCE_INLINE btScalar btFsel(btScalar a, btScalar b, btScalar c) -{ - return a >= 0 ? b : c; -} -#endif -#define btFsels(a,b,c) (btScalar)btFsel(a,b,c) - - -SIMD_FORCE_INLINE bool btMachineIsLittleEndian() -{ - long int i = 1; - const char *p = (const char *) &i; - if (p[0] == 1) // Lowest address contains the least significant byte - return true; - else - return false; -} - - - -///btSelect avoids branches, which makes performance much better for consoles like Playstation 3 and XBox 360 -///Thanks Phil Knight. See also http://www.cellperformance.com/articles/2006/04/more_techniques_for_eliminatin_1.html -SIMD_FORCE_INLINE unsigned btSelect(unsigned condition, unsigned valueIfConditionNonZero, unsigned valueIfConditionZero) -{ - // Set testNz to 0xFFFFFFFF if condition is nonzero, 0x00000000 if condition is zero - // Rely on positive value or'ed with its negative having sign bit on - // and zero value or'ed with its negative (which is still zero) having sign bit off - // Use arithmetic shift right, shifting the sign bit through all 32 bits - unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31); - unsigned testEqz = ~testNz; - return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz)); -} -SIMD_FORCE_INLINE int btSelect(unsigned condition, int valueIfConditionNonZero, int valueIfConditionZero) -{ - unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31); - unsigned testEqz = ~testNz; - return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz)); -} -SIMD_FORCE_INLINE float btSelect(unsigned condition, float valueIfConditionNonZero, float valueIfConditionZero) -{ -#ifdef BT_HAVE_NATIVE_FSEL - return (float)btFsel((btScalar)condition - btScalar(1.0f), valueIfConditionNonZero, valueIfConditionZero); -#else - return (condition != 0) ? valueIfConditionNonZero : valueIfConditionZero; -#endif -} - -template SIMD_FORCE_INLINE void btSwap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - - -//PCK: endian swapping functions -SIMD_FORCE_INLINE unsigned btSwapEndian(unsigned val) -{ - return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24)); -} - -SIMD_FORCE_INLINE unsigned short btSwapEndian(unsigned short val) -{ - return (((val & 0xff00) >> 8) | ((val & 0x00ff) << 8)); -} - -SIMD_FORCE_INLINE unsigned btSwapEndian(int val) -{ - return btSwapEndian((unsigned)val); -} - -SIMD_FORCE_INLINE unsigned short btSwapEndian(short val) -{ - return btSwapEndian((unsigned short) val); -} - -///btSwapFloat uses using char pointers to swap the endianness -////btSwapFloat/btSwapDouble will NOT return a float, because the machine might 'correct' invalid floating point values -///Not all values of sign/exponent/mantissa are valid floating point numbers according to IEEE 754. -///When a floating point unit is faced with an invalid value, it may actually change the value, or worse, throw an exception. -///In most systems, running user mode code, you wouldn't get an exception, but instead the hardware/os/runtime will 'fix' the number for you. -///so instead of returning a float/double, we return integer/long long integer -SIMD_FORCE_INLINE unsigned int btSwapEndianFloat(float d) -{ - unsigned int a; - unsigned char *dst = (unsigned char *)&a; - unsigned char *src = (unsigned char *)&d; - - dst[0] = src[3]; - dst[1] = src[2]; - dst[2] = src[1]; - dst[3] = src[0]; - return a; -} - -// unswap using char pointers -SIMD_FORCE_INLINE float btUnswapEndianFloat(unsigned int a) -{ - float d; - unsigned char *src = (unsigned char *)&a; - unsigned char *dst = (unsigned char *)&d; - - dst[0] = src[3]; - dst[1] = src[2]; - dst[2] = src[1]; - dst[3] = src[0]; - - return d; -} - - -// swap using char pointers -SIMD_FORCE_INLINE void btSwapEndianDouble(double d, unsigned char* dst) -{ - unsigned char *src = (unsigned char *)&d; - - dst[0] = src[7]; - dst[1] = src[6]; - dst[2] = src[5]; - dst[3] = src[4]; - dst[4] = src[3]; - dst[5] = src[2]; - dst[6] = src[1]; - dst[7] = src[0]; - -} - -// unswap using char pointers -SIMD_FORCE_INLINE double btUnswapEndianDouble(const unsigned char *src) -{ - double d; - unsigned char *dst = (unsigned char *)&d; - - dst[0] = src[7]; - dst[1] = src[6]; - dst[2] = src[5]; - dst[3] = src[4]; - dst[4] = src[3]; - dst[5] = src[2]; - dst[6] = src[1]; - dst[7] = src[0]; - - return d; -} - - -#endif //SIMD___SCALAR_H diff --git a/extern/bullet2/src/LinearMath/btSimdMinMax.h b/extern/bullet2/src/LinearMath/btSimdMinMax.h deleted file mode 100644 index 75e83f3c53f..00000000000 --- a/extern/bullet2/src/LinearMath/btSimdMinMax.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef SIMD_MINMAX_H -#define SIMD_MINMAX_H -#include "btScalar.h" - -template -SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) { - return b < a ? b : a; -} - -template -SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) { - return a < b ? b : a; -} - -template -SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) { - if (a > b) a = b; -} - -template -SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) { - if (a < b) a = b; -} - -#endif diff --git a/extern/bullet2/src/LinearMath/btStackAlloc.h b/extern/bullet2/src/LinearMath/btStackAlloc.h deleted file mode 100644 index ac940cd2edd..00000000000 --- a/extern/bullet2/src/LinearMath/btStackAlloc.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -/* -StackAlloc extracted from GJK-EPA collision solver by Nathanael Presson -Nov.2006 -*/ - -#ifndef BT_STACK_ALLOC -#define BT_STACK_ALLOC - -#include "btScalar.h" //for btAssert -#include "btAlignedAllocator.h" - -struct btBlock -{ - btBlock* previous; - unsigned char* address; -}; - -///StackAlloc provides some fast stack-based memory allocator (LIFO last-in first-out) -class btStackAlloc -{ -public: - - btStackAlloc(unsigned int size) { ctor();create(size); } - ~btStackAlloc() { destroy(); } - - inline void create(unsigned int size) - { - destroy(); - data = (unsigned char*) btAlignedAlloc(size,16); - totalsize = size; - } - inline void destroy() - { - btAssert(usedsize==0); - //Raise(L"StackAlloc is still in use"); - - if(usedsize==0) - { - if(!ischild && data) - btAlignedFree(data); - - data = 0; - usedsize = 0; - } - - } - - int getAvailableMemory() const - { - return totalsize - usedsize; - } - - unsigned char* allocate(unsigned int size) - { - const unsigned int nus(usedsize+size); - if(nusprevious = current; - pb->address = data+usedsize; - current = pb; - return(pb); - } - SIMD_FORCE_INLINE void endBlock(btBlock* block) - { - btAssert(block==current); - //Raise(L"Unmatched blocks"); - if(block==current) - { - current = block->previous; - usedsize = (unsigned int)((block->address-data)-sizeof(btBlock)); - } - } - -private: - void ctor() - { - data = 0; - totalsize = 0; - usedsize = 0; - current = 0; - ischild = false; - } - unsigned char* data; - unsigned int totalsize; - unsigned int usedsize; - btBlock* current; - bool ischild; -}; - -#endif //BT_STACK_ALLOC diff --git a/extern/bullet2/src/LinearMath/btTransform.h b/extern/bullet2/src/LinearMath/btTransform.h deleted file mode 100644 index 883b3a5d2b7..00000000000 --- a/extern/bullet2/src/LinearMath/btTransform.h +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef btTransform_H -#define btTransform_H - -#include "btVector3.h" -#include "btMatrix3x3.h" - - -///btTransform supports rigid transforms (only translation and rotation, no scaling/shear) -class btTransform { - - -public: - - - btTransform() {} - - explicit SIMD_FORCE_INLINE btTransform(const btQuaternion& q, - const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) - : m_basis(q), - m_origin(c) - {} - - explicit SIMD_FORCE_INLINE btTransform(const btMatrix3x3& b, - const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) - : m_basis(b), - m_origin(c) - {} - - SIMD_FORCE_INLINE btTransform (const btTransform& other) - : m_basis(other.m_basis), - m_origin(other.m_origin) - { - } - - SIMD_FORCE_INLINE btTransform& operator=(const btTransform& other) - { - m_basis = other.m_basis; - m_origin = other.m_origin; - return *this; - } - - - SIMD_FORCE_INLINE void mult(const btTransform& t1, const btTransform& t2) { - m_basis = t1.m_basis * t2.m_basis; - m_origin = t1(t2.m_origin); - } - -/* void multInverseLeft(const btTransform& t1, const btTransform& t2) { - btVector3 v = t2.m_origin - t1.m_origin; - m_basis = btMultTransposeLeft(t1.m_basis, t2.m_basis); - m_origin = v * t1.m_basis; - } - */ - - - SIMD_FORCE_INLINE btVector3 operator()(const btVector3& x) const - { - return btVector3(m_basis[0].dot(x) + m_origin.x(), - m_basis[1].dot(x) + m_origin.y(), - m_basis[2].dot(x) + m_origin.z()); - } - - SIMD_FORCE_INLINE btVector3 operator*(const btVector3& x) const - { - return (*this)(x); - } - - SIMD_FORCE_INLINE btMatrix3x3& getBasis() { return m_basis; } - SIMD_FORCE_INLINE const btMatrix3x3& getBasis() const { return m_basis; } - - SIMD_FORCE_INLINE btVector3& getOrigin() { return m_origin; } - SIMD_FORCE_INLINE const btVector3& getOrigin() const { return m_origin; } - - btQuaternion getRotation() const { - btQuaternion q; - m_basis.getRotation(q); - return q; - } - - - void setFromOpenGLMatrix(const btScalar *m) - { - m_basis.setFromOpenGLSubMatrix(m); - m_origin.setValue(m[12],m[13],m[14]); - } - - void getOpenGLMatrix(btScalar *m) const - { - m_basis.getOpenGLSubMatrix(m); - m[12] = m_origin.x(); - m[13] = m_origin.y(); - m[14] = m_origin.z(); - m[15] = btScalar(1.0); - } - - SIMD_FORCE_INLINE void setOrigin(const btVector3& origin) - { - m_origin = origin; - } - - SIMD_FORCE_INLINE btVector3 invXform(const btVector3& inVec) const; - - - - SIMD_FORCE_INLINE void setBasis(const btMatrix3x3& basis) - { - m_basis = basis; - } - - SIMD_FORCE_INLINE void setRotation(const btQuaternion& q) - { - m_basis.setRotation(q); - } - - - - void setIdentity() - { - m_basis.setIdentity(); - m_origin.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); - } - - - btTransform& operator*=(const btTransform& t) - { - m_origin += m_basis * t.m_origin; - m_basis *= t.m_basis; - return *this; - } - - btTransform inverse() const - { - btMatrix3x3 inv = m_basis.transpose(); - return btTransform(inv, inv * -m_origin); - } - - btTransform inverseTimes(const btTransform& t) const; - - btTransform operator*(const btTransform& t) const; - - static btTransform getIdentity() - { - btTransform tr; - tr.setIdentity(); - return tr; - } - -private: - - btMatrix3x3 m_basis; - btVector3 m_origin; -}; - - -SIMD_FORCE_INLINE btVector3 -btTransform::invXform(const btVector3& inVec) const -{ - btVector3 v = inVec - m_origin; - return (m_basis.transpose() * v); -} - -SIMD_FORCE_INLINE btTransform -btTransform::inverseTimes(const btTransform& t) const -{ - btVector3 v = t.getOrigin() - m_origin; - return btTransform(m_basis.transposeTimes(t.m_basis), - v * m_basis); -} - -SIMD_FORCE_INLINE btTransform -btTransform::operator*(const btTransform& t) const -{ - return btTransform(m_basis * t.m_basis, - (*this)(t.m_origin)); -} - - - -#endif - - - - - diff --git a/extern/bullet2/src/LinearMath/btTransformUtil.h b/extern/bullet2/src/LinearMath/btTransformUtil.h deleted file mode 100644 index d39e2e10074..00000000000 --- a/extern/bullet2/src/LinearMath/btTransformUtil.h +++ /dev/null @@ -1,142 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - -#ifndef SIMD_TRANSFORM_UTIL_H -#define SIMD_TRANSFORM_UTIL_H - -#include "btTransform.h" -#define ANGULAR_MOTION_THRESHOLD btScalar(0.5)*SIMD_HALF_PI - - - -#define SIMDSQRT12 btScalar(0.7071067811865475244008443621048490) - -#define btRecipSqrt(x) ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */ - -SIMD_FORCE_INLINE btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& supportDir) -{ - return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), - supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), - supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); -} - - -SIMD_FORCE_INLINE void btPlaneSpace1 (const btVector3& n, btVector3& p, btVector3& q) -{ - if (btFabs(n.z()) > SIMDSQRT12) { - // choose p in y-z plane - btScalar a = n[1]*n[1] + n[2]*n[2]; - btScalar k = btRecipSqrt (a); - p.setValue(0,-n[2]*k,n[1]*k); - // set q = n x p - q.setValue(a*k,-n[0]*p[2],n[0]*p[1]); - } - else { - // choose p in x-y plane - btScalar a = n.x()*n.x() + n.y()*n.y(); - btScalar k = btRecipSqrt (a); - p.setValue(-n.y()*k,n.x()*k,0); - // set q = n x p - q.setValue(-n.z()*p.y(),n.z()*p.x(),a*k); - } -} - - - -/// Utils related to temporal transforms -class btTransformUtil -{ - -public: - - static void integrateTransform(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep,btTransform& predictedTransform) - { - predictedTransform.setOrigin(curTrans.getOrigin() + linvel * timeStep); -// #define QUATERNION_DERIVATIVE - #ifdef QUATERNION_DERIVATIVE - btQuaternion predictedOrn = curTrans.getRotation(); - predictedOrn += (angvel * predictedOrn) * (timeStep * btScalar(0.5)); - predictedOrn.normalize(); - #else - //exponential map - btVector3 axis; - btScalar fAngle = angvel.length(); - //limit the angular motion - if (fAngle*timeStep > ANGULAR_MOTION_THRESHOLD) - { - fAngle = ANGULAR_MOTION_THRESHOLD / timeStep; - } - - if ( fAngle < btScalar(0.001) ) - { - // use Taylor's expansions of sync function - axis = angvel*( btScalar(0.5)*timeStep-(timeStep*timeStep*timeStep)*(btScalar(0.020833333333))*fAngle*fAngle ); - } - else - { - // sync(fAngle) = sin(c*fAngle)/t - axis = angvel*( btSin(btScalar(0.5)*fAngle*timeStep)/fAngle ); - } - btQuaternion dorn (axis.x(),axis.y(),axis.z(),btCos( fAngle*timeStep*btScalar(0.5) )); - btQuaternion orn0 = curTrans.getRotation(); - - btQuaternion predictedOrn = dorn * orn0; - predictedOrn.normalize(); - #endif - predictedTransform.setRotation(predictedOrn); - } - - static void calculateVelocity(const btTransform& transform0,const btTransform& transform1,btScalar timeStep,btVector3& linVel,btVector3& angVel) - { - linVel = (transform1.getOrigin() - transform0.getOrigin()) / timeStep; - btVector3 axis; - btScalar angle; - calculateDiffAxisAngle(transform0,transform1,axis,angle); - angVel = axis * angle / timeStep; - } - - static void calculateDiffAxisAngle(const btTransform& transform0,const btTransform& transform1,btVector3& axis,btScalar& angle) - { - - #ifdef USE_QUATERNION_DIFF - btQuaternion orn0 = transform0.getRotation(); - btQuaternion orn1a = transform1.getRotation(); - btQuaternion orn1 = orn0.farthest(orn1a); - btQuaternion dorn = orn1 * orn0.inverse(); -#else - btMatrix3x3 dmat = transform1.getBasis() * transform0.getBasis().inverse(); - btQuaternion dorn; - dmat.getRotation(dorn); -#endif//USE_QUATERNION_DIFF - - ///floating point inaccuracy can lead to w component > 1..., which breaks - - dorn.normalize(); - - angle = dorn.getAngle(); - axis = btVector3(dorn.x(),dorn.y(),dorn.z()); - axis[3] = btScalar(0.); - //check for axis length - btScalar len = axis.length2(); - if (len < SIMD_EPSILON*SIMD_EPSILON) - axis = btVector3(btScalar(1.),btScalar(0.),btScalar(0.)); - else - axis /= btSqrt(len); - } - -}; - -#endif //SIMD_TRANSFORM_UTIL_H - diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h deleted file mode 100644 index 1e331272dd8..00000000000 --- a/extern/bullet2/src/LinearMath/btVector3.h +++ /dev/null @@ -1,452 +0,0 @@ -/* -Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - - - -#ifndef SIMD__VECTOR3_H -#define SIMD__VECTOR3_H - -#include "btQuadWord.h" - -///btVector3 can be used to represent 3D points and vectors. -///It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user -///Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers -class btVector3 : public btQuadWord { - -public: - SIMD_FORCE_INLINE btVector3() {} - - SIMD_FORCE_INLINE btVector3(const btQuadWordStorage& q) - : btQuadWord(q) - { - } - - - SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z) - :btQuadWord(x,y,z,btScalar(0.)) - { - } - -// SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) -// : btQuadWord(x,y,z,w) -// { -// } - - - - SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v) - { - m_x += v.x(); m_y += v.y(); m_z += v.z(); - return *this; - } - - - - SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v) - { - m_x -= v.x(); m_y -= v.y(); m_z -= v.z(); - return *this; - } - - SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s) - { - m_x *= s; m_y *= s; m_z *= s; - return *this; - } - - SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s) - { - btFullAssert(s != btScalar(0.0)); - return *this *= btScalar(1.0) / s; - } - - SIMD_FORCE_INLINE btScalar dot(const btVector3& v) const - { - return m_x * v.x() + m_y * v.y() + m_z * v.z(); - } - - SIMD_FORCE_INLINE btScalar length2() const - { - return dot(*this); - } - - SIMD_FORCE_INLINE btScalar length() const - { - return btSqrt(length2()); - } - - SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const; - - SIMD_FORCE_INLINE btScalar distance(const btVector3& v) const; - - SIMD_FORCE_INLINE btVector3& normalize() - { - return *this /= length(); - } - - SIMD_FORCE_INLINE btVector3 normalized() const; - - SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ); - - SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const - { - btScalar s = btSqrt(length2() * v.length2()); - btFullAssert(s != btScalar(0.0)); - return btAcos(dot(v) / s); - } - - SIMD_FORCE_INLINE btVector3 absolute() const - { - return btVector3( - btFabs(m_x), - btFabs(m_y), - btFabs(m_z)); - } - - SIMD_FORCE_INLINE btVector3 cross(const btVector3& v) const - { - return btVector3( - m_y * v.z() - m_z * v.y(), - m_z * v.x() - m_x * v.z(), - m_x * v.y() - m_y * v.x()); - } - - SIMD_FORCE_INLINE btScalar triple(const btVector3& v1, const btVector3& v2) const - { - return m_x * (v1.y() * v2.z() - v1.z() * v2.y()) + - m_y * (v1.z() * v2.x() - v1.x() * v2.z()) + - m_z * (v1.x() * v2.y() - v1.y() * v2.x()); - } - - SIMD_FORCE_INLINE int minAxis() const - { - return m_x < m_y ? (m_x < m_z ? 0 : 2) : (m_y < m_z ? 1 : 2); - } - - SIMD_FORCE_INLINE int maxAxis() const - { - return m_x < m_y ? (m_y < m_z ? 2 : 1) : (m_x < m_z ? 2 : 0); - } - - SIMD_FORCE_INLINE int furthestAxis() const - { - return absolute().minAxis(); - } - - SIMD_FORCE_INLINE int closestAxis() const - { - return absolute().maxAxis(); - } - - SIMD_FORCE_INLINE void setInterpolate3(const btVector3& v0, const btVector3& v1, btScalar rt) - { - btScalar s = btScalar(1.0) - rt; - m_x = s * v0.x() + rt * v1.x(); - m_y = s * v0.y() + rt * v1.y(); - m_z = s * v0.z() + rt * v1.z(); - //don't do the unused w component - // m_co[3] = s * v0[3] + rt * v1[3]; - } - - SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v, const btScalar& t) const - { - return btVector3(m_x + (v.x() - m_x) * t, - m_y + (v.y() - m_y) * t, - m_z + (v.z() - m_z) * t); - } - - - SIMD_FORCE_INLINE btVector3& operator*=(const btVector3& v) - { - m_x *= v.x(); m_y *= v.y(); m_z *= v.z(); - return *this; - } - - - -}; - -SIMD_FORCE_INLINE btVector3 -operator+(const btVector3& v1, const btVector3& v2) -{ - return btVector3(v1.x() + v2.x(), v1.y() + v2.y(), v1.z() + v2.z()); -} - -SIMD_FORCE_INLINE btVector3 -operator*(const btVector3& v1, const btVector3& v2) -{ - return btVector3(v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z()); -} - -SIMD_FORCE_INLINE btVector3 -operator-(const btVector3& v1, const btVector3& v2) -{ - return btVector3(v1.x() - v2.x(), v1.y() - v2.y(), v1.z() - v2.z()); -} - -SIMD_FORCE_INLINE btVector3 -operator-(const btVector3& v) -{ - return btVector3(-v.x(), -v.y(), -v.z()); -} - -SIMD_FORCE_INLINE btVector3 -operator*(const btVector3& v, const btScalar& s) -{ - return btVector3(v.x() * s, v.y() * s, v.z() * s); -} - -SIMD_FORCE_INLINE btVector3 -operator*(const btScalar& s, const btVector3& v) -{ - return v * s; -} - -SIMD_FORCE_INLINE btVector3 -operator/(const btVector3& v, const btScalar& s) -{ - btFullAssert(s != btScalar(0.0)); - return v * (btScalar(1.0) / s); -} - -SIMD_FORCE_INLINE btVector3 -operator/(const btVector3& v1, const btVector3& v2) -{ - return btVector3(v1.x() / v2.x(),v1.y() / v2.y(),v1.z() / v2.z()); -} - -SIMD_FORCE_INLINE btScalar -dot(const btVector3& v1, const btVector3& v2) -{ - return v1.dot(v2); -} - - - -SIMD_FORCE_INLINE btScalar -distance2(const btVector3& v1, const btVector3& v2) -{ - return v1.distance2(v2); -} - - -SIMD_FORCE_INLINE btScalar -distance(const btVector3& v1, const btVector3& v2) -{ - return v1.distance(v2); -} - -SIMD_FORCE_INLINE btScalar -angle(const btVector3& v1, const btVector3& v2) -{ - return v1.angle(v2); -} - -SIMD_FORCE_INLINE btVector3 -cross(const btVector3& v1, const btVector3& v2) -{ - return v1.cross(v2); -} - -SIMD_FORCE_INLINE btScalar -triple(const btVector3& v1, const btVector3& v2, const btVector3& v3) -{ - return v1.triple(v2, v3); -} - -SIMD_FORCE_INLINE btVector3 -lerp(const btVector3& v1, const btVector3& v2, const btScalar& t) -{ - return v1.lerp(v2, t); -} - - -SIMD_FORCE_INLINE bool operator==(const btVector3& p1, const btVector3& p2) -{ - return p1.x() == p2.x() && p1.y() == p2.y() && p1.z() == p2.z(); -} - -SIMD_FORCE_INLINE btScalar btVector3::distance2(const btVector3& v) const -{ - return (v - *this).length2(); -} - -SIMD_FORCE_INLINE btScalar btVector3::distance(const btVector3& v) const -{ - return (v - *this).length(); -} - -SIMD_FORCE_INLINE btVector3 btVector3::normalized() const -{ - return *this / length(); -} - -SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) -{ - // wAxis must be a unit lenght vector - - btVector3 o = wAxis * wAxis.dot( *this ); - btVector3 x = *this - o; - btVector3 y; - - y = wAxis.cross( *this ); - - return ( o + x * btCos( angle ) + y * btSin( angle ) ); -} - -class btVector4 : public btVector3 -{ -public: - - SIMD_FORCE_INLINE btVector4() {} - - - SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) - : btVector3(x,y,z) - { - m_unusedW = w; - } - - - SIMD_FORCE_INLINE btVector4 absolute4() const - { - return btVector4( - btFabs(m_x), - btFabs(m_y), - btFabs(m_z), - btFabs(m_unusedW)); - } - - - - btScalar getW() const { return m_unusedW;} - - - SIMD_FORCE_INLINE int maxAxis4() const - { - int maxIndex = -1; - btScalar maxVal = btScalar(-1e30); - if (m_x > maxVal) - { - maxIndex = 0; - maxVal = m_x; - } - if (m_y > maxVal) - { - maxIndex = 1; - maxVal = m_y; - } - if (m_z > maxVal) - { - maxIndex = 2; - maxVal = m_z; - } - if (m_unusedW > maxVal) - { - maxIndex = 3; - maxVal = m_unusedW; - } - - - - - return maxIndex; - - } - - - SIMD_FORCE_INLINE int minAxis4() const - { - int minIndex = -1; - btScalar minVal = btScalar(1e30); - if (m_x < minVal) - { - minIndex = 0; - minVal = m_x; - } - if (m_y < minVal) - { - minIndex = 1; - minVal = m_y; - } - if (m_z < minVal) - { - minIndex = 2; - minVal = m_z; - } - if (m_unusedW < minVal) - { - minIndex = 3; - minVal = m_unusedW; - } - - return minIndex; - - } - - - SIMD_FORCE_INLINE int closestAxis4() const - { - return absolute4().maxAxis4(); - } - -}; - - -///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization -SIMD_FORCE_INLINE void btSwapScalarEndian(const btScalar& sourceVal, btScalar& destVal) -{ - #ifdef BT_USE_DOUBLE_PRECISION - unsigned char* dest = (unsigned char*) &destVal; - unsigned char* src = (unsigned char*) &sourceVal; - dest[0] = src[7]; - dest[1] = src[6]; - dest[2] = src[5]; - dest[3] = src[4]; - dest[4] = src[3]; - dest[5] = src[2]; - dest[6] = src[1]; - dest[7] = src[0]; -#else - unsigned char* dest = (unsigned char*) &destVal; - unsigned char* src = (unsigned char*) &sourceVal; - dest[0] = src[3]; - dest[1] = src[2]; - dest[2] = src[1]; - dest[3] = src[0]; -#endif //BT_USE_DOUBLE_PRECISION -} -///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization -SIMD_FORCE_INLINE void btSwapVector3Endian(const btVector3& sourceVec, btVector3& destVec) -{ - for (int i=0;i<4;i++) - { - btSwapScalarEndian(sourceVec[i],destVec[i]); - } - -} - -///btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization -SIMD_FORCE_INLINE void btUnSwapVector3Endian(btVector3& vector) -{ - - btVector3 swappedVec; - for (int i=0;i<4;i++) - { - btSwapScalarEndian(vector[i],swappedVec[i]); - } - vector = swappedVec; -} - -#endif //SIMD__VECTOR3_H diff --git a/extern/bullet2/src/LinearMath/ibmsdk/Makefile b/extern/bullet2/src/LinearMath/ibmsdk/Makefile deleted file mode 100644 index 2ad26576241..00000000000 --- a/extern/bullet2/src/LinearMath/ibmsdk/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -#### Source code Dirs -VPATH = ../ - -ROOT = ../../.. - -#### Library -LIBRARY_ppu = bulletmath.a - -#### Compiler flags -CPPFLAGS = \ --DUSE_LIBSPE2 \ --I$(ROOT)/src \ --I$(SDKINC) - -#### Optimization level flags -#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG) -CC_OPT_LEVEL = -O3 - -##### Objects to be archived in lib - -OBJS = \ -btAlignedAllocator.o \ -btGeometryUtil.o \ -btQuickprof.o - -#### Install directories -INSTALL_DIR = $(ROOT)/lib/ibmsdk -INSTALL_FILES = $(LIBRARY_ppu) -CELL_TOP ?= /opt/ibm/cell-sdk/prototype -include $(CELL_TOP)/make.footer diff --git a/extern/bullet2/src/Makefile b/extern/bullet2/src/Makefile deleted file mode 100644 index 567811bae28..00000000000 --- a/extern/bullet2/src/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. The Blender -# Foundation also sells licenses for use in proprietary software under -# the Blender License. See http://www.blender.org/BL/ for information -# about this. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL/BL DUAL LICENSE BLOCK ***** -# - -LIBNAME = bullet2 -DIR = $(OCGDIR)/extern/$(LIBNAME) - -BULLETDIRS = \ -LinearMath \ -BulletCollision/BroadphaseCollision \ -BulletCollision/CollisionShapes \ -BulletCollision/NarrowPhaseCollision \ -BulletCollision/CollisionDispatch \ -BulletDynamics/ConstraintSolver \ -BulletDynamics/Vehicle \ -BulletDynamics/Dynamics - -CCSRCS = $(wildcard \ -LinearMath/*.cpp \ -BulletCollision/BroadphaseCollision/*.cpp \ -BulletCollision/CollisionShapes/*.cpp \ -BulletCollision/NarrowPhaseCollision/*.cpp \ -BulletCollision/CollisionDispatch/*.cpp \ -BulletDynamics/ConstraintSolver/*.cpp \ -BulletDynamics/Vehicle/*.cpp \ -BulletDynamics/Dynamics/*.cpp) - -CPPFLAGS += -D_LIB -I. -IBulletCollision -IBulletDynamics -ILinearMath - -all debug:: objdirs - -include nan_compile.mk - -.PHONY: objdirs clean -objdirs: - @for i in $(BULLETDIRS); do \ - [ -d $(DIR)/$(DEBUG_DIR)$$i ] || mkdir -p $(DIR)/$(DEBUG_DIR)$$i; \ - done - -clean:: - rm -rf $(DIR) - rm -rf $(NAN_BULLET2)/lib/libbullet2.a - rm -rf $(NAN_BULLET2)/include diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript deleted file mode 100644 index 19702782b0d..00000000000 --- a/extern/bullet2/src/SConscript +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/python -import sys -import os - -Import('env') - -defs = 'USE_DOUBLES QHULL _LIB' -cflags = [] - -if env['OURPLATFORM']=='win32-vc': - defs += ' WIN32 NDEBUG _WINDOWS _LIB' - #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] - cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] -elif env['OURPLATFORM']=='win32-mingw': - defs += ' NDEBUG' - cflags += ['-O2'] -elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5': - defs += ' NDEBUG' - cflags += ['-O2'] -elif sys.platform=='darwin': - defs += ' NDEBUG' - cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math'] - -linearmath_src = env.Glob("LinearMath/*.cpp") -bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp", - "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp", - "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp", - "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp", - "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp", - "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp", - "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp", - "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp", - "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp", - "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp", - "BulletDynamics/Dynamics/btRigidBody.cpp", - "BulletDynamics/Vehicle/btRaycastVehicle.cpp", - "BulletDynamics/Dynamics/Bullet-C-API.cpp", - "BulletDynamics/Vehicle/btWheelInfo.cpp"] -collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp", - "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp", - "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp", - "BulletCollision/BroadphaseCollision/btDispatcher.cpp", - "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp", - "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp", - "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp", - "BulletCollision/CollisionDispatch/btCollisionObject.cpp", - "BulletCollision/CollisionDispatch/btCollisionWorld.cpp", - "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp", - "BulletCollision/CollisionDispatch/btManifoldResult.cpp", - "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp", - "BulletCollision/CollisionDispatch/btUnionFind.cpp", - "BulletCollision/CollisionShapes/btBoxShape.cpp", - "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btCollisionShape.cpp", - "BulletCollision/CollisionShapes/btCompoundShape.cpp", - "BulletCollision/CollisionShapes/btConcaveShape.cpp", - "BulletCollision/CollisionShapes/btConeShape.cpp", - "BulletCollision/CollisionShapes/btConvexHullShape.cpp", - "BulletCollision/CollisionShapes/btConvexShape.cpp", - "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btCylinderShape.cpp", - "BulletCollision/CollisionShapes/btEmptyShape.cpp", - "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp", - "BulletCollision/CollisionShapes/btMultiSphereShape.cpp", - "BulletCollision/CollisionShapes/btOptimizedBvh.cpp", - "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp", - "BulletCollision/CollisionShapes/btTetrahedronShape.cpp", - "BulletCollision/CollisionShapes/btSphereShape.cpp", - "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp", - "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp", - "BulletCollision/CollisionShapes/btTriangleCallback.cpp", - "BulletCollision/CollisionShapes/btTriangleBuffer.cpp", - "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp", - "BulletCollision/CollisionShapes/btTriangleMesh.cpp", - "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp", - "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp", - "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp", - "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp", - "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp", - "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp", - "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp", - "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp", - "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"] - -incs = '. BulletCollision BulletDynamics LinearMath' - -env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[19, 169], compileflags=cflags ) -env.BlenderLib ( libname = 'extern_bullet2collision', sources=collision_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) diff --git a/extern/bullet2/src/btBulletCollisionCommon.h b/extern/bullet2/src/btBulletCollisionCommon.h deleted file mode 100644 index a309f7d76d2..00000000000 --- a/extern/bullet2/src/btBulletCollisionCommon.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BULLET_COLLISION_COMMON_H -#define BULLET_COLLISION_COMMON_H - -///Common headerfile includes for Bullet Collision Detection - -///Bullet's btCollisionWorld and btCollisionObject definitions -#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" -#include "BulletCollision/CollisionDispatch/btCollisionObject.h" - -///Collision Shapes -#include "BulletCollision/CollisionShapes/btBoxShape.h" -#include "BulletCollision/CollisionShapes/btSphereShape.h" -#include "BulletCollision/CollisionShapes/btCapsuleShape.h" -#include "BulletCollision/CollisionShapes/btCylinderShape.h" -#include "BulletCollision/CollisionShapes/btConeShape.h" -#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" -#include "BulletCollision/CollisionShapes/btConvexHullShape.h" -#include "BulletCollision/CollisionShapes/btTriangleMesh.h" -#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" -#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h" -#include "BulletCollision/CollisionShapes/btCompoundShape.h" -#include "BulletCollision/CollisionShapes/btTetrahedronShape.h" -#include "BulletCollision/CollisionShapes/btEmptyShape.h" -#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" -#include "BulletCollision/CollisionShapes/btUniformScalingShape.h" - -///Narrowphase Collision Detector -#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h" -#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h" - -///Dispatching and generation of collision pairs (broadphase) -#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" -#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" -#include "BulletCollision/BroadphaseCollision/btAxisSweep3.h" - - -///Math library & Utils -#include "LinearMath/btQuaternion.h" -#include "LinearMath/btTransform.h" -#include "LinearMath/btDefaultMotionState.h" -#include "LinearMath/btQuickprof.h" -#include "LinearMath/btIDebugDraw.h" - -#endif //BULLET_COLLISION_COMMON_H - diff --git a/extern/bullet2/src/btBulletDynamicsCommon.h b/extern/bullet2/src/btBulletDynamicsCommon.h deleted file mode 100644 index 5d08dac0c0d..00000000000 --- a/extern/bullet2/src/btBulletDynamicsCommon.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -Bullet Continuous Collision Detection and Physics Library -Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it freely, -subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef BULLET_DYNAMICS_COMMON_H -#define BULLET_DYNAMICS_COMMON_H - -///Common headerfile includes for Bullet Dynamics, including Collision Detection -#include "btBulletCollisionCommon.h" - -#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h" -#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h" - -#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h" -#include "BulletDynamics/Dynamics/btRigidBody.h" - -#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h" -#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h" -#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h" -#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h" - - -#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" -///Vehicle simulation, with wheel contact simulated by raycasts -#include "BulletDynamics/Vehicle/btRaycastVehicle.h" - - - - - - -#endif //BULLET_DYNAMICS_COMMON_H - diff --git a/extern/bullet2/src/ibmsdk/Makefile b/extern/bullet2/src/ibmsdk/Makefile deleted file mode 100644 index 768fffd35a4..00000000000 --- a/extern/bullet2/src/ibmsdk/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -#### Visit Bullet library ibmsdk dirs and build code -CELL_TOP ?= /opt/ibm/cell-sdk/prototype - -DIRS := \ -../BulletCollision/ibmsdk \ -../BulletDynamics/ibmsdk \ -../LinearMath/ibmsdk - - -include $(CELL_TOP)/make.footer diff --git a/source/blender/include/BIF_imasel.h b/source/blender/include/BIF_imasel.h index a3a3b7531d6..cbd547602e1 100644 --- a/source/blender/include/BIF_imasel.h +++ b/source/blender/include/BIF_imasel.h @@ -34,6 +34,7 @@ struct ScrArea; struct ID; void free_imasel(struct SpaceImaSel *simasel); +void reset_imaselspace(struct ScrArea *sa); void clever_numbuts_imasel(void); diff --git a/source/blender/include/BSE_drawview.h b/source/blender/include/BSE_drawview.h index 09ce87015d9..be1f5581be7 100644 --- a/source/blender/include/BSE_drawview.h +++ b/source/blender/include/BSE_drawview.h @@ -46,7 +46,7 @@ void do_viewbuts(unsigned short event); /* View3DAfter->type */ #define V3D_XRAY 1 #define V3D_TRANSP 2 -void add_view3d_after(struct View3D *v3d, struct Base *base, int type); +void add_view3d_after(struct View3D *v3d, struct Base *base, int type, int flag); void backdrawview3d(int test); void check_backbuf(void); diff --git a/source/blender/include/BSE_filesel.h b/source/blender/include/BSE_filesel.h index 13e38d50c47..b46b2328ea4 100644 --- a/source/blender/include/BSE_filesel.h +++ b/source/blender/include/BSE_filesel.h @@ -54,6 +54,7 @@ void activate_databrowse(struct ID *id, int idcode, int fromcode, int retval, sh void activate_databrowse_args(struct ID *id, int idcode, int fromcode, short *menup, void (*func)(char *, void *, void *), void *arg1, void *arg2); void filesel_prevspace(void); +void reset_filespace(struct ScrArea *sa); void free_filesel_spec(char *dir); void winqreadfilespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt); void main_to_filelist(struct SpaceFile *sfile); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c45571cb583..acc1651e9fa 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -224,7 +224,7 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_DUPLILINK (1 << 6) #define USER_FSCOLLUM (1 << 7) #define USER_MAT_ON_OB (1 << 8) -#define USER_NO_CAPSLOCK (1 << 9) +/*#define USER_NO_CAPSLOCK (1 << 9)*/ /* not used anywhere */ #define USER_VIEWMOVE (1 << 10) #define USER_TOOLTIPS (1 << 11) #define USER_TWOBUTTONMOUSE (1 << 12) @@ -236,7 +236,8 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_ADD_EDITMODE (1 << 18) #define USER_ADD_VIEWALIGNED (1 << 19) #define USER_RELPATHS (1 << 20) -#define USER_DRAGIMMEDIATE (1 << 21) +#define USER_DRAGIMMEDIATE (1 << 21) +#define USER_DONT_DOSCRIPTLINKS (1 << 22) /* viewzom */ #define USER_ZOOM_CONT 0 From 96408da81a8c8cd5cb737ed4236fc1386ce70c6e Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 7 May 2008 20:22:28 +0000 Subject: [PATCH 093/430] Added bullet back to branch, compiling works again --- extern/bullet2/CMakeLists.txt | 43 + extern/bullet2/Makefile | 61 + .../bullet2/make/msvc_7_0/Bullet_vc7.vcproj | 927 +++++++++++++ extern/bullet2/readme.txt | 12 + extern/bullet2/src/Bullet-C-Api.h | 37 + .../BroadphaseCollision/btAxisSweep3.cpp | 660 ++++++++++ .../BroadphaseCollision/btAxisSweep3.h | 138 ++ .../btBroadphaseInterface.h | 40 + .../BroadphaseCollision/btBroadphaseProxy.cpp | 17 + .../BroadphaseCollision/btBroadphaseProxy.h | 204 +++ .../btCollisionAlgorithm.cpp | 23 + .../btCollisionAlgorithm.h | 77 ++ .../BroadphaseCollision/btDispatcher.cpp | 22 + .../BroadphaseCollision/btDispatcher.h | 93 ++ .../btOverlappingPairCache.cpp | 196 +++ .../btOverlappingPairCache.h | 120 ++ .../btSimpleBroadphase.cpp | 222 ++++ .../BroadphaseCollision/btSimpleBroadphase.h | 95 ++ .../src/BulletCollision/CMakeLists.txt | 60 + .../SphereTriangleDetector.cpp | 200 +++ .../SphereTriangleDetector.h | 49 + .../CollisionDispatch/btCollisionCreateFunc.h | 46 + .../btCollisionDispatcher.cpp | 367 ++++++ .../CollisionDispatch/btCollisionDispatcher.h | 135 ++ .../CollisionDispatch/btCollisionObject.cpp | 57 + .../CollisionDispatch/btCollisionObject.h | 346 +++++ .../CollisionDispatch/btCollisionWorld.cpp | 362 ++++++ .../CollisionDispatch/btCollisionWorld.h | 255 ++++ .../btCompoundCollisionAlgorithm.cpp | 140 ++ .../btCompoundCollisionAlgorithm.h | 64 + .../btConvexConcaveCollisionAlgorithm.cpp | 312 +++++ .../btConvexConcaveCollisionAlgorithm.h | 111 ++ .../btConvexConvexAlgorithm.cpp | 254 ++++ .../btConvexConvexAlgorithm.h | 76 ++ .../btEmptyCollisionAlgorithm.cpp | 34 + .../btEmptyCollisionAlgorithm.h | 48 + .../CollisionDispatch/btManifoldResult.cpp | 109 ++ .../CollisionDispatch/btManifoldResult.h | 77 ++ .../btSimulationIslandManager.cpp | 357 +++++ .../btSimulationIslandManager.h | 61 + .../btSphereBoxCollisionAlgorithm.cpp | 249 ++++ .../btSphereBoxCollisionAlgorithm.h | 64 + .../btSphereSphereCollisionAlgorithm.cpp | 85 ++ .../btSphereSphereCollisionAlgorithm.h | 56 + .../btSphereTriangleCollisionAlgorithm.cpp | 76 ++ .../btSphereTriangleCollisionAlgorithm.h | 59 + .../CollisionDispatch/btUnionFind.cpp | 83 ++ .../CollisionDispatch/btUnionFind.h | 124 ++ .../CollisionShapes/btBoxShape.cpp | 57 + .../CollisionShapes/btBoxShape.h | 293 +++++ .../btBvhTriangleMeshShape.cpp | 173 +++ .../CollisionShapes/btBvhTriangleMeshShape.h | 75 ++ .../CollisionShapes/btCapsuleShape.cpp | 146 +++ .../CollisionShapes/btCapsuleShape.h | 60 + .../CollisionShapes/btCollisionMargin.h | 26 + .../CollisionShapes/btCollisionShape.cpp | 85 ++ .../CollisionShapes/btCollisionShape.h | 94 ++ .../CollisionShapes/btCompoundShape.cpp | 100 ++ .../CollisionShapes/btCompoundShape.h | 117 ++ .../CollisionShapes/btConcaveShape.cpp | 28 + .../CollisionShapes/btConcaveShape.h | 50 + .../CollisionShapes/btConeShape.cpp | 133 ++ .../CollisionShapes/btConeShape.h | 103 ++ .../CollisionShapes/btConvexHullShape.cpp | 179 +++ .../CollisionShapes/btConvexHullShape.h | 76 ++ .../CollisionShapes/btConvexShape.cpp | 77 ++ .../CollisionShapes/btConvexShape.h | 127 ++ .../btConvexTriangleMeshShape.cpp | 205 +++ .../btConvexTriangleMeshShape.h | 51 + .../CollisionShapes/btCylinderShape.cpp | 206 +++ .../CollisionShapes/btCylinderShape.h | 138 ++ .../CollisionShapes/btEmptyShape.cpp | 49 + .../CollisionShapes/btEmptyShape.h | 70 + .../btHeightfieldTerrainShape.cpp | 339 +++++ .../btHeightfieldTerrainShape.h | 88 ++ .../CollisionShapes/btMinkowskiSumShape.cpp | 57 + .../CollisionShapes/btMinkowskiSumShape.h | 62 + .../CollisionShapes/btMultiSphereShape.cpp | 148 +++ .../CollisionShapes/btMultiSphereShape.h | 74 ++ .../CollisionShapes/btOptimizedBvh.cpp | 845 ++++++++++++ .../CollisionShapes/btOptimizedBvh.h | 330 +++++ .../btPolyhedralConvexShape.cpp | 148 +++ .../CollisionShapes/btPolyhedralConvexShape.h | 93 ++ .../CollisionShapes/btSphereShape.cpp | 77 ++ .../CollisionShapes/btSphereShape.h | 63 + .../CollisionShapes/btStaticPlaneShape.cpp | 105 ++ .../CollisionShapes/btStaticPlaneShape.h | 61 + .../btStridingMeshInterface.cpp | 124 ++ .../CollisionShapes/btStridingMeshInterface.h | 89 ++ .../CollisionShapes/btTetrahedronShape.cpp | 195 +++ .../CollisionShapes/btTetrahedronShape.h | 75 ++ .../CollisionShapes/btTriangleBuffer.cpp | 42 + .../CollisionShapes/btTriangleBuffer.h | 61 + .../CollisionShapes/btTriangleCallback.cpp | 28 + .../CollisionShapes/btTriangleCallback.h | 40 + .../btTriangleIndexVertexArray.cpp | 65 + .../btTriangleIndexVertexArray.h | 97 ++ .../CollisionShapes/btTriangleMesh.cpp | 60 + .../CollisionShapes/btTriangleMesh.h | 75 ++ .../CollisionShapes/btTriangleMeshShape.cpp | 203 +++ .../CollisionShapes/btTriangleMeshShape.h | 78 ++ .../CollisionShapes/btTriangleShape.h | 179 +++ extern/bullet2/src/BulletCollision/Doxyfile | 746 +++++++++++ .../btContinuousConvexCollision.cpp | 200 +++ .../btContinuousConvexCollision.h | 52 + .../NarrowPhaseCollision/btConvexCast.cpp | 20 + .../NarrowPhaseCollision/btConvexCast.h | 71 + .../btConvexPenetrationDepthSolver.h | 43 + .../btDiscreteCollisionDetectorInterface.h | 88 ++ .../NarrowPhaseCollision/btGjkConvexCast.cpp | 174 +++ .../NarrowPhaseCollision/btGjkConvexCast.h | 50 + .../NarrowPhaseCollision/btGjkEpa.cpp | 628 +++++++++ .../NarrowPhaseCollision/btGjkEpa.h | 53 + .../btGjkEpaPenetrationDepthSolver.cpp | 50 + .../btGjkEpaPenetrationDepthSolver.h | 39 + .../btGjkPairDetector.cpp | 299 +++++ .../NarrowPhaseCollision/btGjkPairDetector.h | 85 ++ .../NarrowPhaseCollision/btManifoldPoint.h | 99 ++ .../btMinkowskiPenetrationDepthSolver.cpp | 334 +++++ .../btMinkowskiPenetrationDepthSolver.h | 37 + .../btPersistentManifold.cpp | 246 ++++ .../btPersistentManifold.h | 161 +++ .../NarrowPhaseCollision/btPointCollector.h | 61 + .../btRaycastCallback.cpp | 101 ++ .../NarrowPhaseCollision/btRaycastCallback.h | 42 + .../btSimplexSolverInterface.h | 64 + .../btSubSimplexConvexCast.cpp | 139 ++ .../btSubSimplexConvexCast.h | 50 + .../btVoronoiSimplexSolver.cpp | 607 +++++++++ .../btVoronoiSimplexSolver.h | 157 +++ .../bullet2/src/BulletDynamics/CMakeLists.txt | 20 + .../btConeTwistConstraint.cpp | 285 ++++ .../ConstraintSolver/btConeTwistConstraint.h | 123 ++ .../ConstraintSolver/btConstraintSolver.h | 45 + .../ConstraintSolver/btContactConstraint.cpp | 417 ++++++ .../ConstraintSolver/btContactConstraint.h | 122 ++ .../ConstraintSolver/btContactSolverInfo.h | 47 + .../btGeneric6DofConstraint.cpp | 389 ++++++ .../btGeneric6DofConstraint.h | 120 ++ .../ConstraintSolver/btHingeConstraint.cpp | 229 ++++ .../ConstraintSolver/btHingeConstraint.h | 81 ++ .../ConstraintSolver/btJacobianEntry.h | 156 +++ .../btPoint2PointConstraint.cpp | 116 ++ .../btPoint2PointConstraint.h | 77 ++ .../btSequentialImpulseConstraintSolver.cpp | 1158 +++++++++++++++++ .../btSequentialImpulseConstraintSolver.h | 109 ++ .../btSolve2LinearConstraint.cpp | 255 ++++ .../btSolve2LinearConstraint.h | 107 ++ .../ConstraintSolver/btSolverBody.h | 71 + .../ConstraintSolver/btSolverConstraint.h | 63 + .../ConstraintSolver/btTypedConstraint.cpp | 53 + .../ConstraintSolver/btTypedConstraint.h | 96 ++ .../BulletDynamics/Dynamics/Bullet-C-API.cpp | 120 ++ .../Dynamics/btDiscreteDynamicsWorld.cpp | 954 ++++++++++++++ .../Dynamics/btDiscreteDynamicsWorld.h | 157 +++ .../BulletDynamics/Dynamics/btDynamicsWorld.h | 78 ++ .../BulletDynamics/Dynamics/btRigidBody.cpp | 345 +++++ .../src/BulletDynamics/Dynamics/btRigidBody.h | 357 +++++ .../Dynamics/btSimpleDynamicsWorld.cpp | 211 +++ .../Dynamics/btSimpleDynamicsWorld.h | 82 ++ .../Vehicle/btRaycastVehicle.cpp | 733 +++++++++++ .../BulletDynamics/Vehicle/btRaycastVehicle.h | 201 +++ .../Vehicle/btVehicleRaycaster.h | 35 + .../BulletDynamics/Vehicle/btWheelInfo.cpp | 56 + .../src/BulletDynamics/Vehicle/btWheelInfo.h | 116 ++ extern/bullet2/src/CMakeLists.txt | 1 + extern/bullet2/src/LinearMath/CMakeLists.txt | 10 + extern/bullet2/src/LinearMath/btAabbUtil2.h | 127 ++ .../src/LinearMath/btAlignedAllocator.cpp | 70 + .../src/LinearMath/btAlignedAllocator.h | 80 ++ .../src/LinearMath/btAlignedObjectArray.h | 367 ++++++ .../src/LinearMath/btDefaultMotionState.h | 38 + .../bullet2/src/LinearMath/btGeometryUtil.cpp | 178 +++ .../bullet2/src/LinearMath/btGeometryUtil.h | 41 + extern/bullet2/src/LinearMath/btIDebugDraw.h | 100 ++ extern/bullet2/src/LinearMath/btList.h | 73 ++ extern/bullet2/src/LinearMath/btMatrix3x3.h | 410 ++++++ extern/bullet2/src/LinearMath/btMinMax.h | 69 + extern/bullet2/src/LinearMath/btMotionState.h | 40 + extern/bullet2/src/LinearMath/btPoint3.h | 24 + extern/bullet2/src/LinearMath/btQuadWord.h | 139 ++ extern/bullet2/src/LinearMath/btQuaternion.h | 321 +++++ extern/bullet2/src/LinearMath/btQuickprof.cpp | 38 + extern/bullet2/src/LinearMath/btQuickprof.h | 712 ++++++++++ extern/bullet2/src/LinearMath/btRandom.h | 42 + extern/bullet2/src/LinearMath/btScalar.h | 181 +++ extern/bullet2/src/LinearMath/btSimdMinMax.h | 41 + extern/bullet2/src/LinearMath/btStackAlloc.h | 106 ++ extern/bullet2/src/LinearMath/btTransform.h | 206 +++ .../bullet2/src/LinearMath/btTransformUtil.h | 138 ++ extern/bullet2/src/LinearMath/btVector3.h | 402 ++++++ extern/bullet2/src/Makefile | 68 + extern/bullet2/src/SConscript | 98 ++ extern/bullet2/src/btBulletCollisionCommon.h | 61 + extern/bullet2/src/btBulletDynamicsCommon.h | 42 + 195 files changed, 30425 insertions(+) create mode 100644 extern/bullet2/CMakeLists.txt create mode 100644 extern/bullet2/Makefile create mode 100644 extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj create mode 100644 extern/bullet2/readme.txt create mode 100644 extern/bullet2/src/Bullet-C-Api.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp create mode 100644 extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h create mode 100644 extern/bullet2/src/BulletCollision/CMakeLists.txt create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h create mode 100644 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h create mode 100644 extern/bullet2/src/BulletCollision/Doxyfile create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp create mode 100644 extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h create mode 100644 extern/bullet2/src/BulletDynamics/CMakeLists.txt create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp create mode 100644 extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h create mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h create mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h create mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp create mode 100644 extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h create mode 100644 extern/bullet2/src/CMakeLists.txt create mode 100644 extern/bullet2/src/LinearMath/CMakeLists.txt create mode 100644 extern/bullet2/src/LinearMath/btAabbUtil2.h create mode 100644 extern/bullet2/src/LinearMath/btAlignedAllocator.cpp create mode 100644 extern/bullet2/src/LinearMath/btAlignedAllocator.h create mode 100644 extern/bullet2/src/LinearMath/btAlignedObjectArray.h create mode 100644 extern/bullet2/src/LinearMath/btDefaultMotionState.h create mode 100644 extern/bullet2/src/LinearMath/btGeometryUtil.cpp create mode 100644 extern/bullet2/src/LinearMath/btGeometryUtil.h create mode 100644 extern/bullet2/src/LinearMath/btIDebugDraw.h create mode 100644 extern/bullet2/src/LinearMath/btList.h create mode 100644 extern/bullet2/src/LinearMath/btMatrix3x3.h create mode 100644 extern/bullet2/src/LinearMath/btMinMax.h create mode 100644 extern/bullet2/src/LinearMath/btMotionState.h create mode 100644 extern/bullet2/src/LinearMath/btPoint3.h create mode 100644 extern/bullet2/src/LinearMath/btQuadWord.h create mode 100644 extern/bullet2/src/LinearMath/btQuaternion.h create mode 100644 extern/bullet2/src/LinearMath/btQuickprof.cpp create mode 100644 extern/bullet2/src/LinearMath/btQuickprof.h create mode 100644 extern/bullet2/src/LinearMath/btRandom.h create mode 100644 extern/bullet2/src/LinearMath/btScalar.h create mode 100644 extern/bullet2/src/LinearMath/btSimdMinMax.h create mode 100644 extern/bullet2/src/LinearMath/btStackAlloc.h create mode 100644 extern/bullet2/src/LinearMath/btTransform.h create mode 100644 extern/bullet2/src/LinearMath/btTransformUtil.h create mode 100644 extern/bullet2/src/LinearMath/btVector3.h create mode 100644 extern/bullet2/src/Makefile create mode 100644 extern/bullet2/src/SConscript create mode 100644 extern/bullet2/src/btBulletCollisionCommon.h create mode 100644 extern/bullet2/src/btBulletDynamicsCommon.h diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt new file mode 100644 index 00000000000..b5ae20253cc --- /dev/null +++ b/extern/bullet2/CMakeLists.txt @@ -0,0 +1,43 @@ +# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Jacques Beaurai, Erwin Coumans +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC . src) + +FILE(GLOB SRC + src/LinearMath/*.cpp + src/BulletCollision/BroadphaseCollision/*.cpp + src/BulletCollision/CollisionShapes/*.cpp + src/BulletCollision/NarrowPhaseCollision/*.cpp + src/BulletCollision//CollisionDispatch/*.cpp + src/BulletDynamics/ConstraintSolver/*.cpp + src/BulletDynamics/Vehicle/*.cpp + src/BulletDynamics/Dynamics/*.cpp +) + +ADD_DEFINITIONS(-D_LIB) + +BLENDERLIB(extern_bullet "${SRC}" "${INC}") +#, libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) diff --git a/extern/bullet2/Makefile b/extern/bullet2/Makefile new file mode 100644 index 00000000000..2da1a5bcf85 --- /dev/null +++ b/extern/bullet2/Makefile @@ -0,0 +1,61 @@ +# +# $Id: Makefile 14444 2008-04-16 22:40:48Z hos $ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2002 by Hans Lambermont +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): +# +# ***** END GPL LICENSE BLOCK ***** +LIBNAME = bullet2 +include nan_definitions.mk +SOURCEDIR = extern/$(LIBNAME) +DIR = $(OCGDIR)/extern/$(LIBNAME) +DIRS = src +DISTDIR = src + +BULLETDIRS = \ +LinearMath \ +BulletCollision/BroadphaseCollision \ +BulletCollision/CollisionShapes \ +BulletCollision/NarrowPhaseCollision \ +BulletCollision//CollisionDispatch \ +BulletDynamics/ConstraintSolver \ +BulletDynamics/Vehicle \ +BulletDynamics/Dynamics + +include nan_subdirs.mk + +CP = $(NANBLENDERHOME)/intern/tools/cpifdiff.sh + +install: all debug + @[ -d $(NAN_BULLET2) ] || mkdir -p $(NAN_BULLET2) + @[ -d $(NAN_BULLET2)/include ] || mkdir -p $(NAN_BULLET2)/include + @for i in $(BULLETDIRS); do \ + [ -d $(NAN_BULLET2)/include/$$i ] || mkdir -p $(NAN_BULLET2)/include/$$i; \ + $(CP) $(DISTDIR)/$$i/*.h $(NAN_BULLET2)/include/$$i; \ + done + @[ -d $(NAN_BULLET2)/lib ] || mkdir -p $(NAN_BULLET2)/lib + @$(CP) $(DISTDIR)/*.h $(NAN_BULLET2)/include + @$(CP) $(OCGDIR)/extern/bullet2/libbullet2.a $(NAN_BULLET2)/lib +ifeq ($(OS),darwin) + ranlib $(NAN_BULLET2)/lib/libbullet2.a +endif diff --git a/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj b/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj new file mode 100644 index 00000000000..6de2fd3a2bd --- /dev/null +++ b/extern/bullet2/make/msvc_7_0/Bullet_vc7.vcproj @@ -0,0 +1,927 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/bullet2/readme.txt b/extern/bullet2/readme.txt new file mode 100644 index 00000000000..4d1a4c11706 --- /dev/null +++ b/extern/bullet2/readme.txt @@ -0,0 +1,12 @@ + +*** These files in extern/bullet2 are NOT part of the Blender build yet *** + +This is the new refactored version of Bullet physics library version 2.x + +Soon this will replace the old Bullet version in extern/bullet. +First the integration in Blender Game Engine needs to be updated. +Once that is done all build systems can be updated to use/build extern/bullet2 files. + +Questions? mail blender at erwincoumans.com, or check the bf-blender mailing list. +Thanks, +Erwin diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h new file mode 100644 index 00000000000..078dcae63bb --- /dev/null +++ b/extern/bullet2/src/Bullet-C-Api.h @@ -0,0 +1,37 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. + Work in progress, functionality will be added on demand. + + If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h" +*/ + +#ifndef BULLET_C_API_H +#define BULLET_C_API_H + +#ifdef __cplusplus +extern "C" { +#endif + +double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]); + +#ifdef __cplusplus +} +#endif + +#endif //BULLET_C_API_H + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp new file mode 100644 index 00000000000..be4a11506df --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp @@ -0,0 +1,660 @@ + +//Bullet Continuous Collision Detection and Physics Library +//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + + +// +// btAxisSweep3 +// +// Copyright (c) 2006 Simon Hobbs +// +// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. +#include "btAxisSweep3.h" + +#include + +#ifdef DEBUG_BROADPHASE +#include +void btAxisSweep3::debugPrintAxis(int axis, bool checkCardinality) +{ + int numEdges = m_pHandles[0].m_maxEdges[axis]; + printf("SAP Axis %d, numEdges=%d\n",axis,numEdges); + + int i; + for (i=0;im_handle); + int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis]; + char beginOrEnd; + beginOrEnd=pEdge->IsMax()?'E':'B'; + printf(" [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex); + } + + if (checkCardinality) + assert(numEdges == m_numHandles*2+1); +} +#endif //DEBUG_BROADPHASE + + +btBroadphaseProxy* btAxisSweep3::createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask) +{ + (void)shapeType; + BP_FP_INT_TYPE handleId = addHandle(min,max, userPtr,collisionFilterGroup,collisionFilterMask); + + Handle* handle = getHandle(handleId); + + return handle; +} + +void btAxisSweep3::destroyProxy(btBroadphaseProxy* proxy) +{ + Handle* handle = static_cast(proxy); + removeHandle(handle->m_handleId); +} + +void btAxisSweep3::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax) +{ + Handle* handle = static_cast(proxy); + updateHandle(handle->m_handleId,aabbMin,aabbMax); + +} + + + + + + +btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles) +:btOverlappingPairCache() +{ + m_invalidPair = 0; + //assert(bounds.HasVolume()); + + // 1 handle is reserved as sentinel + btAssert(maxHandles > 1 && maxHandles < BP_MAX_HANDLES); + + // init bounds + m_worldAabbMin = worldAabbMin; + m_worldAabbMax = worldAabbMax; + + btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin; + + BP_FP_INT_TYPE maxInt = BP_HANDLE_SENTINEL; + + m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize; + + // allocate handles buffer and put all handles on free list + m_pHandles = new Handle[maxHandles]; + m_maxHandles = maxHandles; + m_numHandles = 0; + + // handle 0 is reserved as the null index, and is also used as the sentinel + m_firstFreeHandle = 1; + { + for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++) + m_pHandles[i].SetNextFree(i + 1); + m_pHandles[maxHandles - 1].SetNextFree(0); + } + + { + // allocate edge buffers + for (int i = 0; i < 3; i++) + m_pEdges[i] = new Edge[maxHandles * 2]; + } + //removed overlap management + + // make boundary sentinels + + m_pHandles[0].m_clientObject = 0; + + for (int axis = 0; axis < 3; axis++) + { + m_pHandles[0].m_minEdges[axis] = 0; + m_pHandles[0].m_maxEdges[axis] = 1; + + m_pEdges[axis][0].m_pos = 0; + m_pEdges[axis][0].m_handle = 0; + m_pEdges[axis][1].m_pos = BP_HANDLE_SENTINEL; + m_pEdges[axis][1].m_handle = 0; +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + + } + +} + +btAxisSweep3::~btAxisSweep3() +{ + + for (int i = 2; i >= 0; i--) + delete[] m_pEdges[i]; + delete[] m_pHandles; +} + +void btAxisSweep3::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const +{ + btPoint3 clampedPoint(point); + + + + clampedPoint.setMax(m_worldAabbMin); + clampedPoint.setMin(m_worldAabbMax); + + btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize; + out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & BP_HANDLE_MASK) | isMax); + out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & BP_HANDLE_MASK) | isMax); + out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & BP_HANDLE_MASK) | isMax); + +} + + + +BP_FP_INT_TYPE btAxisSweep3::allocHandle() +{ + assert(m_firstFreeHandle); + + BP_FP_INT_TYPE handle = m_firstFreeHandle; + m_firstFreeHandle = getHandle(handle)->GetNextFree(); + m_numHandles++; + + return handle; +} + +void btAxisSweep3::freeHandle(BP_FP_INT_TYPE handle) +{ + assert(handle > 0 && handle < m_maxHandles); + + getHandle(handle)->SetNextFree(m_firstFreeHandle); + m_firstFreeHandle = handle; + + m_numHandles--; +} + + + +BP_FP_INT_TYPE btAxisSweep3::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask) +{ + // quantize the bounds + BP_FP_INT_TYPE min[3], max[3]; + quantize(min, aabbMin, 0); + quantize(max, aabbMax, 1); + + // allocate a handle + BP_FP_INT_TYPE handle = allocHandle(); + assert(handle!= 0xcdcd); + + Handle* pHandle = getHandle(handle); + + pHandle->m_handleId = handle; + //pHandle->m_pOverlaps = 0; + pHandle->m_clientObject = pOwner; + pHandle->m_collisionFilterGroup = collisionFilterGroup; + pHandle->m_collisionFilterMask = collisionFilterMask; + + // compute current limit of edge arrays + BP_FP_INT_TYPE limit = m_numHandles * 2; + + + // insert new edges just inside the max boundary edge + for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++) + { + + m_pHandles[0].m_maxEdges[axis] += 2; + + m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1]; + + m_pEdges[axis][limit - 1].m_pos = min[axis]; + m_pEdges[axis][limit - 1].m_handle = handle; + + m_pEdges[axis][limit].m_pos = max[axis]; + m_pEdges[axis][limit].m_handle = handle; + + pHandle->m_minEdges[axis] = limit - 1; + pHandle->m_maxEdges[axis] = limit; + } + + // now sort the new edges to their correct position + sortMinDown(0, pHandle->m_minEdges[0], false); + sortMaxDown(0, pHandle->m_maxEdges[0], false); + sortMinDown(1, pHandle->m_minEdges[1], false); + sortMaxDown(1, pHandle->m_maxEdges[1], false); + sortMinDown(2, pHandle->m_minEdges[2], true); + sortMaxDown(2, pHandle->m_maxEdges[2], true); + + + return handle; +} + + +void btAxisSweep3::removeHandle(BP_FP_INT_TYPE handle) +{ + + Handle* pHandle = getHandle(handle); + + //explicitly remove the pairs containing the proxy + //we could do it also in the sortMinUp (passing true) + //todo: compare performance + removeOverlappingPairsContainingProxy(pHandle); + + + // compute current limit of edge arrays + int limit = m_numHandles * 2; + + int axis; + + for (axis = 0;axis<3;axis++) + { + m_pHandles[0].m_maxEdges[axis] -= 2; + } + + // remove the edges by sorting them up to the end of the list + for ( axis = 0; axis < 3; axis++) + { + Edge* pEdges = m_pEdges[axis]; + BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis]; + pEdges[max].m_pos = BP_HANDLE_SENTINEL; + + sortMaxUp(axis,max,false); + + + BP_FP_INT_TYPE i = pHandle->m_minEdges[axis]; + pEdges[i].m_pos = BP_HANDLE_SENTINEL; + + + sortMinUp(axis,i,false); + + pEdges[limit-1].m_handle = 0; + pEdges[limit-1].m_pos = BP_HANDLE_SENTINEL; + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis,false); +#endif //DEBUG_BROADPHASE + + + } + + + // free the handle + freeHandle(handle); + + +} + +extern int gOverlappingPairs; + + +void btAxisSweep3::refreshOverlappingPairs() +{ + +} +void btAxisSweep3::processAllOverlappingPairs(btOverlapCallback* callback) +{ + + //perform a sort, to find duplicates and to sort 'invalid' pairs to the end + m_overlappingPairArray.heapSort(btBroadphasePairSortPredicate()); + + //remove the 'invalid' ones +#ifdef USE_POPBACK_REMOVAL + while (m_invalidPair>0) + { + m_invalidPair--; + m_overlappingPairArray.pop_back(); + } +#else + m_overlappingPairArray.resize(m_overlappingPairArray.size() - m_invalidPair); + m_invalidPair = 0; +#endif + + + int i; + + btBroadphasePair previousPair; + previousPair.m_pProxy0 = 0; + previousPair.m_pProxy1 = 0; + previousPair.m_algorithm = 0; + + + for (i=0;iprocessOverlap(pair); + } else + { + needsRemoval = true; + } + } else + { + //remove duplicate + needsRemoval = true; + //should have no algorithm + btAssert(!pair.m_algorithm); + } + + if (needsRemoval) + { + cleanOverlappingPair(pair); + + // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + // m_overlappingPairArray.pop_back(); + pair.m_pProxy0 = 0; + pair.m_pProxy1 = 0; + m_invalidPair++; + gOverlappingPairs--; + } + + } +} + + +bool btAxisSweep3::testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) +{ + const Handle* pHandleA = static_cast(proxy0); + const Handle* pHandleB = static_cast(proxy1); + + //optimization 1: check the array index (memory address), instead of the m_pos + + for (int axis = 0; axis < 3; axis++) + { + if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || + pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) + { + return false; + } + } + return true; +} + +bool btAxisSweep3::testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB) +{ + //optimization 1: check the array index (memory address), instead of the m_pos + + for (int axis = 0; axis < 3; axis++) + { + if (axis != ignoreAxis) + { + if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] || + pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis]) + { + return false; + } + } + } + + //optimization 2: only 2 axis need to be tested (conflicts with 'delayed removal' optimization) + + /*for (int axis = 0; axis < 3; axis++) + { + if (m_pEdges[axis][pHandleA->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleB->m_minEdges[axis]].m_pos || + m_pEdges[axis][pHandleB->m_maxEdges[axis]].m_pos < m_pEdges[axis][pHandleA->m_minEdges[axis]].m_pos) + { + return false; + } + } + */ + + return true; +} + +void btAxisSweep3::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax) +{ +// assert(bounds.IsFinite()); + //assert(bounds.HasVolume()); + + Handle* pHandle = getHandle(handle); + + // quantize the new bounds + BP_FP_INT_TYPE min[3], max[3]; + quantize(min, aabbMin, 0); + quantize(max, aabbMax, 1); + + // update changed edges + for (int axis = 0; axis < 3; axis++) + { + BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis]; + BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis]; + + int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos; + int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos; + + m_pEdges[axis][emin].m_pos = min[axis]; + m_pEdges[axis][emax].m_pos = max[axis]; + + // expand (only adds overlaps) + if (dmin < 0) + sortMinDown(axis, emin); + + if (dmax > 0) + sortMaxUp(axis, emax); + + // shrink (only removes overlaps) + if (dmin > 0) + sortMinUp(axis, emin); + + if (dmax < 0) + sortMaxDown(axis, emax); + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + } + + +} + + + + +// sorting a min edge downwards can only ever *add* overlaps +void btAxisSweep3::sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) +{ + + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pPrev = pEdge - 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pEdge->m_pos < pPrev->m_pos) + { + Handle* pHandlePrev = getHandle(pPrev->m_handle); + + if (pPrev->IsMax()) + { + // if previous edge is a maximum check the bounds and add an overlap if necessary + if (updateOverlaps && testOverlap(axis,pHandleEdge, pHandlePrev)) + { + addOverlappingPair(pHandleEdge,pHandlePrev); + + //AddOverlap(pEdge->m_handle, pPrev->m_handle); + + } + + // update edge reference in other handle + pHandlePrev->m_maxEdges[axis]++; + } + else + pHandlePrev->m_minEdges[axis]++; + + pHandleEdge->m_minEdges[axis]--; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pPrev; + *pPrev = swap; + + // decrement + pEdge--; + pPrev--; + } + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + +} + +// sorting a min edge upwards can only ever *remove* overlaps +void btAxisSweep3::sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) +{ + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pNext = pEdge + 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) + { + Handle* pHandleNext = getHandle(pNext->m_handle); + + if (pNext->IsMax()) + { + // if next edge is maximum remove any overlap between the two handles + if (updateOverlaps) + { + /* + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pNext->m_handle); + btBroadphasePair tmpPair(*handle0,*handle1); + removeOverlappingPair(tmpPair); + */ + + } + + // update edge reference in other handle + pHandleNext->m_maxEdges[axis]--; + } + else + pHandleNext->m_minEdges[axis]--; + + pHandleEdge->m_minEdges[axis]++; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pNext; + *pNext = swap; + + // increment + pEdge++; + pNext++; + } + + +} + +// sorting a max edge downwards can only ever *remove* overlaps +void btAxisSweep3::sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) +{ + + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pPrev = pEdge - 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pEdge->m_pos < pPrev->m_pos) + { + Handle* pHandlePrev = getHandle(pPrev->m_handle); + + if (!pPrev->IsMax()) + { + // if previous edge was a minimum remove any overlap between the two handles + if (updateOverlaps) + { + //this is done during the overlappingpairarray iteration/narrowphase collision + /* + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pPrev->m_handle); + btBroadphasePair* pair = findPair(handle0,handle1); + //assert(pair); + + if (pair) + { + removeOverlappingPair(*pair); + } + */ + + } + + // update edge reference in other handle + pHandlePrev->m_minEdges[axis]++;; + } + else + pHandlePrev->m_maxEdges[axis]++; + + pHandleEdge->m_maxEdges[axis]--; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pPrev; + *pPrev = swap; + + // decrement + pEdge--; + pPrev--; + } + + +#ifdef DEBUG_BROADPHASE + debugPrintAxis(axis); +#endif //DEBUG_BROADPHASE + +} + +// sorting a max edge upwards can only ever *add* overlaps +void btAxisSweep3::sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps) +{ + Edge* pEdge = m_pEdges[axis] + edge; + Edge* pNext = pEdge + 1; + Handle* pHandleEdge = getHandle(pEdge->m_handle); + + while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos)) + { + Handle* pHandleNext = getHandle(pNext->m_handle); + + if (!pNext->IsMax()) + { + // if next edge is a minimum check the bounds and add an overlap if necessary + if (updateOverlaps && testOverlap(axis, pHandleEdge, pHandleNext)) + { + Handle* handle0 = getHandle(pEdge->m_handle); + Handle* handle1 = getHandle(pNext->m_handle); + addOverlappingPair(handle0,handle1); + } + + // update edge reference in other handle + pHandleNext->m_minEdges[axis]--; + } + else + pHandleNext->m_maxEdges[axis]--; + + pHandleEdge->m_maxEdges[axis]++; + + // swap the edges + Edge swap = *pEdge; + *pEdge = *pNext; + *pNext = swap; + + // increment + pEdge++; + pNext++; + } + +} diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h new file mode 100644 index 00000000000..57bbb368672 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h @@ -0,0 +1,138 @@ +//Bullet Continuous Collision Detection and Physics Library +//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +// +// btAxisSweep3.h +// +// Copyright (c) 2006 Simon Hobbs +// +// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +// +// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +// +// 3. This notice may not be removed or altered from any source distribution. + +#ifndef AXIS_SWEEP_3_H +#define AXIS_SWEEP_3_H + +#include "../../LinearMath/btPoint3.h" +#include "../../LinearMath/btVector3.h" +#include "btOverlappingPairCache.h" +#include "btBroadphaseProxy.h" + + +//Enable BP_USE_FIXEDPOINT_INT_32 if you need more then 32767 objects +//#define BP_USE_FIXEDPOINT_INT_32 1 + +#ifdef BP_USE_FIXEDPOINT_INT_32 + #define BP_FP_INT_TYPE unsigned int + #define BP_MAX_HANDLES 1500000 //arbitrary maximum number of handles + #define BP_HANDLE_SENTINEL 0x7fffffff + #define BP_HANDLE_MASK 0xfffffffe +#else + #define BP_FP_INT_TYPE unsigned short int + #define BP_MAX_HANDLES 32767 + #define BP_HANDLE_SENTINEL 0xffff + #define BP_HANDLE_MASK 0xfffe +#endif //BP_USE_FIXEDPOINT_INT_32 + +//#define DEBUG_BROADPHASE 1 + +/// btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase. +/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using integer coordinates instead of floats. +/// The testOverlap check is optimized to check the array index, rather then the actual AABB coordinates/pos +class btAxisSweep3 : public btOverlappingPairCache +{ + +public: + + + class Edge + { + public: + BP_FP_INT_TYPE m_pos; // low bit is min/max + BP_FP_INT_TYPE m_handle; + + BP_FP_INT_TYPE IsMax() const {return m_pos & 1;} + }; + +public: + class Handle : public btBroadphaseProxy + { + public: + + // indexes into the edge arrays + BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12 + BP_FP_INT_TYPE m_handleId; + BP_FP_INT_TYPE m_pad; + + //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject + + inline void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;} + inline BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];} + }; // 24 bytes + 24 for Edge structures = 44 bytes total per entry + + +private: + btPoint3 m_worldAabbMin; // overall system bounds + btPoint3 m_worldAabbMax; // overall system bounds + + btVector3 m_quantize; // scaling factor for quantization + + BP_FP_INT_TYPE m_numHandles; // number of active handles + int m_maxHandles; // max number of handles + Handle* m_pHandles; // handles pool + BP_FP_INT_TYPE m_firstFreeHandle; // free handles list + + Edge* m_pEdges[3]; // edge arrays for the 3 axes (each array has m_maxHandles * 2 + 2 sentinel entries) + + int m_invalidPair; + + // allocation/deallocation + BP_FP_INT_TYPE allocHandle(); + void freeHandle(BP_FP_INT_TYPE handle); + + + bool testOverlap(int ignoreAxis,const Handle* pHandleA, const Handle* pHandleB); + +#ifdef DEBUG_BROADPHASE + void debugPrintAxis(int axis,bool checkCardinality=true); +#endif //DEBUG_BROADPHASE + + //Overlap* AddOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); + //void RemoveOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB); + + void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const; + + void sortMinDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); + void sortMinUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); + void sortMaxDown(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); + void sortMaxUp(int axis, BP_FP_INT_TYPE edge, bool updateOverlaps = true); + +public: + btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, int maxHandles = 16384); + virtual ~btAxisSweep3(); + + virtual void refreshOverlappingPairs(); + + BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask); + void removeHandle(BP_FP_INT_TYPE handle); + void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax); + inline Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;} + + void processAllOverlappingPairs(btOverlapCallback* callback); + + //Broadphase Interface + virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask); + virtual void destroyProxy(btBroadphaseProxy* proxy); + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax); + bool testOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + +}; + +#endif + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h new file mode 100644 index 00000000000..b6ace03c07a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h @@ -0,0 +1,40 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BROADPHASE_INTERFACE_H +#define BROADPHASE_INTERFACE_H + + + +struct btDispatcherInfo; +class btDispatcher; +struct btBroadphaseProxy; +#include "../../LinearMath/btVector3.h" + +///BroadphaseInterface for aabb-overlapping object pairs +class btBroadphaseInterface +{ +public: + virtual ~btBroadphaseInterface() {} + + virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask) =0; + virtual void destroyProxy(btBroadphaseProxy* proxy)=0; + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax)=0; + virtual void cleanProxyFromPairs(btBroadphaseProxy* proxy)=0; + + +}; + +#endif //BROADPHASE_INTERFACE_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp new file mode 100644 index 00000000000..f4d7341f8dd --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp @@ -0,0 +1,17 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btBroadphaseProxy.h" + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h new file mode 100644 index 00000000000..40d9748ffa9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h @@ -0,0 +1,204 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BROADPHASE_PROXY_H +#define BROADPHASE_PROXY_H + +#include "../../LinearMath/btScalar.h" //for SIMD_FORCE_INLINE + + +/// btDispatcher uses these types +/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave +/// to facilitate type checking +enum BroadphaseNativeTypes +{ +// polyhedral convex shapes + BOX_SHAPE_PROXYTYPE, + TRIANGLE_SHAPE_PROXYTYPE, + TETRAHEDRAL_SHAPE_PROXYTYPE, + CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE, + CONVEX_HULL_SHAPE_PROXYTYPE, +//implicit convex shapes +IMPLICIT_CONVEX_SHAPES_START_HERE, + SPHERE_SHAPE_PROXYTYPE, + MULTI_SPHERE_SHAPE_PROXYTYPE, + CAPSULE_SHAPE_PROXYTYPE, + CONE_SHAPE_PROXYTYPE, + CONVEX_SHAPE_PROXYTYPE, + CYLINDER_SHAPE_PROXYTYPE, + MINKOWSKI_SUM_SHAPE_PROXYTYPE, + MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE, +//concave shapes +CONCAVE_SHAPES_START_HERE, + //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy! + TRIANGLE_MESH_SHAPE_PROXYTYPE, + ///used for demo integration FAST/Swift collision library and Bullet + FAST_CONCAVE_MESH_PROXYTYPE, + //terrain + TERRAIN_SHAPE_PROXYTYPE, +///Used for GIMPACT Trimesh integration + GIMPACT_SHAPE_PROXYTYPE, + + EMPTY_SHAPE_PROXYTYPE, + STATIC_PLANE_PROXYTYPE, +CONCAVE_SHAPES_END_HERE, + + COMPOUND_SHAPE_PROXYTYPE, + + MAX_BROADPHASE_COLLISION_TYPES +}; + + +///btBroadphaseProxy +struct btBroadphaseProxy +{ + + ///optional filtering to cull potential collisions + enum CollisionFilterGroups + { + DefaultFilter = 1, + StaticFilter = 2, + KinematicFilter = 4, + DebrisFilter = 8, + SensorTrigger = 16, + AllFilter = DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger + }; + + //Usually the client btCollisionObject or Rigidbody class + void* m_clientObject; + short int m_collisionFilterGroup; + short int m_collisionFilterMask; + + //used for memory pools + btBroadphaseProxy() :m_clientObject(0){} + + btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) + :m_clientObject(userPtr), + m_collisionFilterGroup(collisionFilterGroup), + m_collisionFilterMask(collisionFilterMask) + { + } + + static inline bool isPolyhedral(int proxyType) + { + return (proxyType < IMPLICIT_CONVEX_SHAPES_START_HERE); + } + + static inline bool isConvex(int proxyType) + { + return (proxyType < CONCAVE_SHAPES_START_HERE); + } + + static inline bool isConcave(int proxyType) + { + return ((proxyType > CONCAVE_SHAPES_START_HERE) && + (proxyType < CONCAVE_SHAPES_END_HERE)); + } + static inline bool isCompound(int proxyType) + { + return (proxyType == COMPOUND_SHAPE_PROXYTYPE); + } + static inline bool isInfinite(int proxyType) + { + return (proxyType == STATIC_PLANE_PROXYTYPE); + } + +} +; + +class btCollisionAlgorithm; + +struct btBroadphaseProxy; + + + +/// contains a pair of aabb-overlapping objects +struct btBroadphasePair +{ + btBroadphasePair () + : + m_pProxy0(0), + m_pProxy1(0), + m_algorithm(0), + m_userInfo(0) + { + } + + btBroadphasePair(const btBroadphasePair& other) + : m_pProxy0(other.m_pProxy0), + m_pProxy1(other.m_pProxy1), + m_algorithm(other.m_algorithm), + m_userInfo(other.m_userInfo) + { + } + btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1) + { + + //keep them sorted, so the std::set operations work + if (&proxy0 < &proxy1) + { + m_pProxy0 = &proxy0; + m_pProxy1 = &proxy1; + } + else + { + m_pProxy0 = &proxy1; + m_pProxy1 = &proxy0; + } + + m_algorithm = 0; + m_userInfo = 0; + + } + + btBroadphaseProxy* m_pProxy0; + btBroadphaseProxy* m_pProxy1; + + mutable btCollisionAlgorithm* m_algorithm; + mutable void* m_userInfo; + +}; + +/* +//comparison for set operation, see Solid DT_Encounter +SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePair& b) +{ + return a.m_pProxy0 < b.m_pProxy0 || + (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 < b.m_pProxy1); +} +*/ + + +class btBroadphasePairSortPredicate +{ + public: + + bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b ) + { + return a.m_pProxy0 > b.m_pProxy0 || + (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 > b.m_pProxy1) || + (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm); + } +}; + + +SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadphasePair& b) +{ + return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1); +} + + +#endif //BROADPHASE_PROXY_H + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp new file mode 100644 index 00000000000..2ad0c86d8a2 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp @@ -0,0 +1,23 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btCollisionAlgorithm.h" +#include "btDispatcher.h" + +btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) +{ + m_dispatcher = ci.m_dispatcher; +} + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h new file mode 100644 index 00000000000..55cec386a7b --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h @@ -0,0 +1,77 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_ALGORITHM_H +#define COLLISION_ALGORITHM_H + +#include "../../LinearMath/btScalar.h" + +struct btBroadphaseProxy; +class btDispatcher; +class btManifoldResult; +class btCollisionObject; +struct btDispatcherInfo; +class btPersistentManifold; + + +struct btCollisionAlgorithmConstructionInfo +{ + btCollisionAlgorithmConstructionInfo() + :m_dispatcher(0), + m_manifold(0) + { + } + btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp) + :m_dispatcher(dispatcher) + { + (void)temp; + } + + btDispatcher* m_dispatcher; + btPersistentManifold* m_manifold; + + int getDispatcherId(); + +}; + + +///btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatcher. +///It is persistent over frames +class btCollisionAlgorithm +{ + +protected: + + btDispatcher* m_dispatcher; + +protected: + int getDispatcherId(); + +public: + + btCollisionAlgorithm() {}; + + btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci); + + virtual ~btCollisionAlgorithm() {}; + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0; + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0; + +}; + + +#endif //COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp new file mode 100644 index 00000000000..20768225b3a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp @@ -0,0 +1,22 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btDispatcher.h" + +btDispatcher::~btDispatcher() +{ + +} + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h new file mode 100644 index 00000000000..3d958cc8fef --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btDispatcher.h @@ -0,0 +1,93 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef _DISPATCHER_H +#define _DISPATCHER_H + +#include "../../LinearMath/btScalar.h" + +class btCollisionAlgorithm; +struct btBroadphaseProxy; +class btRigidBody; +class btCollisionObject; +class btOverlappingPairCache; + + +class btPersistentManifold; +class btStackAlloc; + +struct btDispatcherInfo +{ + enum DispatchFunc + { + DISPATCH_DISCRETE = 1, + DISPATCH_CONTINUOUS + }; + btDispatcherInfo() + :m_timeStep(btScalar(0.)), + m_stepCount(0), + m_dispatchFunc(DISPATCH_DISCRETE), + m_timeOfImpact(btScalar(1.)), + m_useContinuous(false), + m_debugDraw(0), + m_enableSatConvex(false), + m_enableSPU(false), + m_stackAllocator(0) + { + + } + btScalar m_timeStep; + int m_stepCount; + int m_dispatchFunc; + btScalar m_timeOfImpact; + bool m_useContinuous; + class btIDebugDraw* m_debugDraw; + bool m_enableSatConvex; + bool m_enableSPU; + btStackAlloc* m_stackAllocator; + +}; + +/// btDispatcher can be used in combination with broadphase to dispatch overlapping pairs. +/// For example for pairwise collision detection or user callbacks (game logic). +class btDispatcher +{ + + +public: + virtual ~btDispatcher() ; + + virtual btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold=0) = 0; + + virtual btPersistentManifold* getNewManifold(void* body0,void* body1)=0; + + virtual void releaseManifold(btPersistentManifold* manifold)=0; + + virtual void clearManifold(btPersistentManifold* manifold)=0; + + virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1) = 0; + + virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1)=0; + + virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo)=0; + + virtual int getNumManifolds() const = 0; + + virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0; + +}; + + +#endif //_DISPATCHER_H diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp new file mode 100644 index 00000000000..60f0a41a9d7 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp @@ -0,0 +1,196 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#include "btOverlappingPairCache.h" + +#include "btDispatcher.h" +#include "btCollisionAlgorithm.h" + +int gOverlappingPairs = 0; + +btOverlappingPairCache::btOverlappingPairCache(): +m_blockedForChanges(false), +m_overlapFilterCallback(0) +//m_NumOverlapBroadphasePair(0) +{ +} + + +btOverlappingPairCache::~btOverlappingPairCache() +{ + //todo/test: show we erase/delete data, or is it automatic +} + + +void btOverlappingPairCache::removeOverlappingPair(btBroadphasePair& findPair) +{ + + int findIndex = m_overlappingPairArray.findLinearSearch(findPair); + if (findIndex < m_overlappingPairArray.size()) + { + gOverlappingPairs--; + btBroadphasePair& pair = m_overlappingPairArray[findIndex]; + cleanOverlappingPair(pair); + + m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.size()-1); + m_overlappingPairArray.pop_back(); + } +} + + +void btOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair) +{ + if (pair.m_algorithm) + { + { + delete pair.m_algorithm;; + pair.m_algorithm=0; + } + } +} + + + + + +void btOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) +{ + //don't add overlap with own + assert(proxy0 != proxy1); + + if (!needsBroadphaseCollision(proxy0,proxy1)) + return; + + + btBroadphasePair pair(*proxy0,*proxy1); + + m_overlappingPairArray.push_back(pair); + gOverlappingPairs++; + +} + +///this findPair becomes really slow. Either sort the list to speedup the query, or +///use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed. +///we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address) +///Also we can use a 2D bitmap, which can be useful for a future GPU implementation + btBroadphasePair* btOverlappingPairCache::findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) +{ + if (!needsBroadphaseCollision(proxy0,proxy1)) + return 0; + + btBroadphasePair tmpPair(*proxy0,*proxy1); + int findIndex = m_overlappingPairArray.findLinearSearch(tmpPair); + + if (findIndex < m_overlappingPairArray.size()) + { + //assert(it != m_overlappingPairSet.end()); + btBroadphasePair* pair = &m_overlappingPairArray[findIndex]; + return pair; + } + return 0; +} + + + + + +void btOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy) +{ + + class CleanPairCallback : public btOverlapCallback + { + btBroadphaseProxy* m_cleanProxy; + btOverlappingPairCache* m_pairCache; + + public: + CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache) + :m_cleanProxy(cleanProxy), + m_pairCache(pairCache) + { + } + virtual bool processOverlap(btBroadphasePair& pair) + { + if ((pair.m_pProxy0 == m_cleanProxy) || + (pair.m_pProxy1 == m_cleanProxy)) + { + m_pairCache->cleanOverlappingPair(pair); + } + return false; + } + + }; + + CleanPairCallback cleanPairs(proxy,this); + + processAllOverlappingPairs(&cleanPairs); + +} + + + +void btOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy) +{ + + class RemovePairCallback : public btOverlapCallback + { + btBroadphaseProxy* m_obsoleteProxy; + + public: + RemovePairCallback(btBroadphaseProxy* obsoleteProxy) + :m_obsoleteProxy(obsoleteProxy) + { + } + virtual bool processOverlap(btBroadphasePair& pair) + { + return ((pair.m_pProxy0 == m_obsoleteProxy) || + (pair.m_pProxy1 == m_obsoleteProxy)); + } + + }; + + + RemovePairCallback removeCallback(proxy); + + processAllOverlappingPairs(&removeCallback); +} + + + +void btOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback) +{ + + int i; + + for (i=0;iprocessOverlap(*pair)) + { + cleanOverlappingPair(*pair); + + m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1); + m_overlappingPairArray.pop_back(); + gOverlappingPairs--; + } else + { + i++; + } + } +} + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h new file mode 100644 index 00000000000..a81fe3264df --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h @@ -0,0 +1,120 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef OVERLAPPING_PAIR_CACHE_H +#define OVERLAPPING_PAIR_CACHE_H + + +#include "btBroadphaseInterface.h" +#include "btBroadphaseProxy.h" +#include "../../LinearMath/btPoint3.h" +#include "../../LinearMath/btAlignedObjectArray.h" + + +struct btOverlapCallback +{ + virtual ~btOverlapCallback() + {} + //return true for deletion of the pair + virtual bool processOverlap(btBroadphasePair& pair) = 0; +}; + +struct btOverlapFilterCallback +{ + virtual ~btOverlapFilterCallback() + {} + // return true when pairs need collision + virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0; +}; + +///btOverlappingPairCache maintains the objects with overlapping AABB +///Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase +class btOverlappingPairCache : public btBroadphaseInterface +{ + protected: + //avoid brute-force finding all the time + btAlignedObjectArray m_overlappingPairArray; + + //during the dispatch, check that user doesn't destroy/create proxy + bool m_blockedForChanges; + + //if set, use the callback instead of the built in filter in needBroadphaseCollision + btOverlapFilterCallback* m_overlapFilterCallback; + public: + + btOverlappingPairCache(); + virtual ~btOverlappingPairCache(); + + virtual void processAllOverlappingPairs(btOverlapCallback*); + + void removeOverlappingPair(btBroadphasePair& pair); + + void cleanOverlappingPair(btBroadphasePair& pair); + + void addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + + btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1); + + + void cleanProxyFromPairs(btBroadphaseProxy* proxy); + + void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy); + + + inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const + { + if (m_overlapFilterCallback) + return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1); + + bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0; + collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask); + + return collides; + } + + + + virtual void refreshOverlappingPairs() =0; + + btBroadphasePair* getOverlappingPairArrayPtr() + { + return &m_overlappingPairArray[0]; + } + + const btBroadphasePair* getOverlappingPairArrayPtr() const + { + return &m_overlappingPairArray[0]; + } + + int getNumOverlappingPairs() const + { + return m_overlappingPairArray.size(); + } + + btOverlapFilterCallback* getOverlapFilterCallback() + { + return m_overlapFilterCallback; + } + + void setOverlapFilterCallback(btOverlapFilterCallback* callback) + { + m_overlapFilterCallback = callback; + } + +}; +#endif //OVERLAPPING_PAIR_CACHE_H + + diff --git a/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp new file mode 100644 index 00000000000..30bcbe0c5f1 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp @@ -0,0 +1,222 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btSimpleBroadphase.h" +#include +#include + +#include "LinearMath/btVector3.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btMatrix3x3.h" +#include + + +void btSimpleBroadphase::validate() +{ + for (int i=0;i=0;i--) + { + BP_Proxy* proxy = m_pProxies[i]; + destroyProxy(proxy); + } + */ +} + + +btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask) +{ + if (m_numProxies >= m_maxProxies) + { + assert(0); + return 0; //should never happen, but don't let the game crash ;-) + } + assert(min[0]<= max[0] && min[1]<= max[1] && min[2]<= max[2]); + + int freeIndex= m_freeProxies[m_firstFreeProxy]; + btSimpleBroadphaseProxy* proxy = new (&m_proxies[freeIndex])btSimpleBroadphaseProxy(min,max,shapeType,userPtr,collisionFilterGroup,collisionFilterMask); + m_firstFreeProxy++; + + btSimpleBroadphaseProxy* proxy1 = &m_proxies[0]; + + int index = int(proxy - proxy1); + btAssert(index == freeIndex); + + m_pProxies[m_numProxies] = proxy; + m_numProxies++; + //validate(); + + return proxy; +} + +class RemovingOverlapCallback : public btOverlapCallback +{ +protected: + virtual bool processOverlap(btBroadphasePair& pair) + { + (void)pair; + btAssert(0); + return false; + } +}; + +class RemovePairContainingProxy +{ + + btBroadphaseProxy* m_targetProxy; + public: + virtual ~RemovePairContainingProxy() + { + } +protected: + virtual bool processOverlap(btBroadphasePair& pair) + { + btSimpleBroadphaseProxy* proxy0 = static_cast(pair.m_pProxy0); + btSimpleBroadphaseProxy* proxy1 = static_cast(pair.m_pProxy1); + + return ((m_targetProxy == proxy0 || m_targetProxy == proxy1)); + }; +}; + +void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg) +{ + + int i; + + btSimpleBroadphaseProxy* proxy0 = static_cast(proxyOrg); + btSimpleBroadphaseProxy* proxy1 = &m_proxies[0]; + + int index = int(proxy0 - proxy1); + btAssert (index < m_maxProxies); + m_freeProxies[--m_firstFreeProxy] = index; + + removeOverlappingPairsContainingProxy(proxyOrg); + + for (i=0;im_min = aabbMin; + sbp->m_max = aabbMax; +} + + + + + + + + + +bool btSimpleBroadphase::aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1) +{ + return proxy0->m_min[0] <= proxy1->m_max[0] && proxy1->m_min[0] <= proxy0->m_max[0] && + proxy0->m_min[1] <= proxy1->m_max[1] && proxy1->m_min[1] <= proxy0->m_max[1] && + proxy0->m_min[2] <= proxy1->m_max[2] && proxy1->m_min[2] <= proxy0->m_max[2]; + +} + + + +//then remove non-overlapping ones +class CheckOverlapCallback : public btOverlapCallback +{ +public: + virtual bool processOverlap(btBroadphasePair& pair) + { + return (!btSimpleBroadphase::aabbOverlap(static_cast(pair.m_pProxy0),static_cast(pair.m_pProxy1))); + } +}; + +void btSimpleBroadphase::refreshOverlappingPairs() +{ + //first check for new overlapping pairs + int i,j; + + for (i=0;i(proxy); + return proxy0; + } + + + void validate(); + +protected: + + + virtual void refreshOverlappingPairs(); +public: + btSimpleBroadphase(int maxProxies=16384); + virtual ~btSimpleBroadphase(); + + + static bool aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1); + + + virtual btBroadphaseProxy* createProxy( const btVector3& min, const btVector3& max,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask); + + + virtual void destroyProxy(btBroadphaseProxy* proxy); + virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax); + + + + + + +}; + + + +#endif //SIMPLE_BROADPHASE_H + diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt new file mode 100644 index 00000000000..e565bf7edea --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CMakeLists.txt @@ -0,0 +1,60 @@ + +INCLUDE_DIRECTORIES( +${BULLET_PHYSICS_SOURCE_DIR}/src } +) + +ADD_LIBRARY(LibBulletCollision + BroadphaseCollision/btAxisSweep3.cpp + BroadphaseCollision/btBroadphaseProxy.cpp + BroadphaseCollision/btCollisionAlgorithm.cpp + BroadphaseCollision/btDispatcher.cpp + BroadphaseCollision/btOverlappingPairCache.cpp + BroadphaseCollision/btSimpleBroadphase.cpp + CollisionDispatch/btCollisionDispatcher.cpp + CollisionDispatch/btCollisionObject.cpp + CollisionDispatch/btCollisionWorld.cpp + CollisionDispatch/btCompoundCollisionAlgorithm.cpp + CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp + CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp + CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp + CollisionDispatch/btConvexConvexAlgorithm.cpp + CollisionDispatch/btEmptyCollisionAlgorithm.cpp + CollisionDispatch/btManifoldResult.cpp + CollisionDispatch/btSimulationIslandManager.cpp + CollisionDispatch/btUnionFind.cpp + CollisionShapes/btBoxShape.cpp + CollisionShapes/btBvhTriangleMeshShape.cpp + CollisionShapes/btCollisionShape.cpp + CollisionShapes/btCompoundShape.cpp + CollisionShapes/btConcaveShape.cpp + CollisionShapes/btConeShape.cpp + CollisionShapes/btConvexHullShape.cpp + CollisionShapes/btConvexShape.cpp + CollisionShapes/btConvexTriangleMeshShape.cpp + CollisionShapes/btCylinderShape.cpp + CollisionShapes/btEmptyShape.cpp + CollisionShapes/btMinkowskiSumShape.cpp + CollisionShapes/btMultiSphereShape.cpp + CollisionShapes/btOptimizedBvh.cpp + CollisionShapes/btPolyhedralConvexShape.cpp + CollisionShapes/btTetrahedronShape.cpp + CollisionShapes/btSphereShape.cpp + CollisionShapes/btStaticPlaneShape.cpp + CollisionShapes/btStridingMeshInterface.cpp + CollisionShapes/btTriangleCallback.cpp + CollisionShapes/btTriangleBuffer.cpp + CollisionShapes/btTriangleIndexVertexArray.cpp + CollisionShapes/btTriangleMesh.cpp + CollisionShapes/btTriangleMeshShape.cpp + NarrowPhaseCollision/btContinuousConvexCollision.cpp + NarrowPhaseCollision/btGjkEpa.cpp + NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp + NarrowPhaseCollision/btConvexCast.cpp + NarrowPhaseCollision/btGjkConvexCast.cpp + NarrowPhaseCollision/btGjkPairDetector.cpp + NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp + NarrowPhaseCollision/btPersistentManifold.cpp + NarrowPhaseCollision/btRaycastCallback.cpp + NarrowPhaseCollision/btSubSimplexConvexCast.cpp + NarrowPhaseCollision/btVoronoiSimplexSolver.cpp +) diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp new file mode 100644 index 00000000000..81133670f0c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp @@ -0,0 +1,200 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "LinearMath/btScalar.h" +#include "SphereTriangleDetector.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" + + +SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle) +:m_sphere(sphere), +m_triangle(triangle) +{ + +} + +void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) +{ + + (void)debugDraw; + const btTransform& transformA = input.m_transformA; + const btTransform& transformB = input.m_transformB; + + btVector3 point,normal; + btScalar timeOfImpact = btScalar(1.); + btScalar depth = btScalar(0.); +// output.m_distance = btScalar(1e30); + //move sphere into triangle space + btTransform sphereInTr = transformB.inverseTimes(transformA); + + if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact)) + { + output.addContactPoint(transformB.getBasis()*normal,transformB*point,depth); + } + +} + +#define MAX_OVERLAP btScalar(0.) + + + +// See also geometrictools.com +// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv +btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest) { + btVector3 diff = p - from; + btVector3 v = to - from; + btScalar t = v.dot(diff); + + if (t > 0) { + btScalar dotVV = v.dot(v); + if (t < dotVV) { + t /= dotVV; + diff -= t*v; + } else { + t = 1; + diff -= v; + } + } else + t = 0; + + nearest = from + t*v; + return diff.dot(diff); +} + +bool SphereTriangleDetector::facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal) { + btVector3 lp(p); + btVector3 lnormal(normal); + + return pointInTriangle(vertices, lnormal, &lp); +} + +///combined discrete/continuous sphere-triangle +bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact) +{ + + const btVector3* vertices = &m_triangle->getVertexPtr(0); + const btVector3& c = sphereCenter; + btScalar r = m_sphere->getRadius(); + + btVector3 delta (0,0,0); + + btVector3 normal = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]); + normal.normalize(); + btVector3 p1ToCentre = c - vertices[0]; + btScalar distanceFromPlane = p1ToCentre.dot(normal); + + if (distanceFromPlane < btScalar(0.)) + { + //triangle facing the other way + + distanceFromPlane *= btScalar(-1.); + normal *= btScalar(-1.); + } + + ///todo: move this gContactBreakingThreshold into a proper structure + extern btScalar gContactBreakingThreshold; + + btScalar contactMargin = gContactBreakingThreshold; + bool isInsideContactPlane = distanceFromPlane < r + contactMargin; + bool isInsideShellPlane = distanceFromPlane < r; + + btScalar deltaDotNormal = delta.dot(normal); + if (!isInsideShellPlane && deltaDotNormal >= btScalar(0.0)) + return false; + + // Check for contact / intersection + bool hasContact = false; + btVector3 contactPoint; + if (isInsideContactPlane) { + if (facecontains(c,vertices,normal)) { + // Inside the contact wedge - touches a point on the shell plane + hasContact = true; + contactPoint = c - normal*distanceFromPlane; + } else { + // Could be inside one of the contact capsules + btScalar contactCapsuleRadiusSqr = (r + contactMargin) * (r + contactMargin); + btVector3 nearestOnEdge; + for (int i = 0; i < m_triangle->getNumEdges(); i++) { + + btPoint3 pa; + btPoint3 pb; + + m_triangle->getEdge(i,pa,pb); + + btScalar distanceSqr = SegmentSqrDistance(pa,pb,c, nearestOnEdge); + if (distanceSqr < contactCapsuleRadiusSqr) { + // Yep, we're inside a capsule + hasContact = true; + contactPoint = nearestOnEdge; + } + + } + } + } + + if (hasContact) { + btVector3 contactToCentre = c - contactPoint; + btScalar distanceSqr = contactToCentre.length2(); + if (distanceSqr < (r - MAX_OVERLAP)*(r - MAX_OVERLAP)) { + btScalar distance = btSqrt(distanceSqr); + resultNormal = contactToCentre; + resultNormal.normalize(); + point = contactPoint; + depth = -(r-distance); + return true; + } + + if (delta.dot(contactToCentre) >= btScalar(0.0)) + return false; + + // Moving towards the contact point -> collision + point = contactPoint; + timeOfImpact = btScalar(0.0); + return true; + } + + return false; +} + + +bool SphereTriangleDetector::pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p ) +{ + const btVector3* p1 = &vertices[0]; + const btVector3* p2 = &vertices[1]; + const btVector3* p3 = &vertices[2]; + + btVector3 edge1( *p2 - *p1 ); + btVector3 edge2( *p3 - *p2 ); + btVector3 edge3( *p1 - *p3 ); + + btVector3 p1_to_p( *p - *p1 ); + btVector3 p2_to_p( *p - *p2 ); + btVector3 p3_to_p( *p - *p3 ); + + btVector3 edge1_normal( edge1.cross(normal)); + btVector3 edge2_normal( edge2.cross(normal)); + btVector3 edge3_normal( edge3.cross(normal)); + + btScalar r1, r2, r3; + r1 = edge1_normal.dot( p1_to_p ); + r2 = edge2_normal.dot( p2_to_p ); + r3 = edge3_normal.dot( p3_to_p ); + if ( ( r1 > 0 && r2 > 0 && r3 > 0 ) || + ( r1 <= 0 && r2 <= 0 && r3 <= 0 ) ) + return true; + return false; + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h new file mode 100644 index 00000000000..b32806a6846 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h @@ -0,0 +1,49 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SPHERE_TRIANGLE_DETECTOR_H +#define SPHERE_TRIANGLE_DETECTOR_H + +#include "../NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "../../LinearMath/btPoint3.h" + + +class btSphereShape; +class btTriangleShape; + + + +/// sphere-triangle to match the btDiscreteCollisionDetectorInterface +struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface +{ + virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw); + + SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle); + + virtual ~SphereTriangleDetector() {}; + +private: + + bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact); + bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p ); + bool facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal); + + btSphereShape* m_sphere; + btTriangleShape* m_triangle; + + +}; +#endif //SPHERE_TRIANGLE_DETECTOR_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h new file mode 100644 index 00000000000..d51a59af7f0 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h @@ -0,0 +1,46 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_CREATE_FUNC +#define COLLISION_CREATE_FUNC + +#include "../../LinearMath/btAlignedObjectArray.h" +typedef btAlignedObjectArray btCollisionObjectArray; +class btCollisionAlgorithm; +class btCollisionObject; + +struct btCollisionAlgorithmConstructionInfo; + +///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm +struct btCollisionAlgorithmCreateFunc +{ + bool m_swapped; + + btCollisionAlgorithmCreateFunc() + :m_swapped(false) + { + } + virtual ~btCollisionAlgorithmCreateFunc(){}; + + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , btCollisionObject* body0,btCollisionObject* body1) + { + + (void)body0; + (void)body1; + return 0; + } +}; +#endif //COLLISION_CREATE_FUNC + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp new file mode 100644 index 00000000000..b535fac6563 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp @@ -0,0 +1,367 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#include "btCollisionDispatcher.h" + + +#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h" + +int gNumManifold = 0; + +#include + + +btCollisionDispatcher::btCollisionDispatcher(bool noDefaultAlgorithms): +m_count(0), +m_useIslands(true), +m_convexConvexCreateFunc(0), +m_convexConcaveCreateFunc(0), +m_swappedConvexConcaveCreateFunc(0), +m_compoundCreateFunc(0), +m_swappedCompoundCreateFunc(0), +m_emptyCreateFunc(0) +{ + (void)noDefaultAlgorithms; + int i; + + setNearCallback(defaultNearCallback); + + m_emptyCreateFunc = new btEmptyAlgorithm::CreateFunc; + for (i=0;iclearManifold(); +} + + +void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold) +{ + + gNumManifold--; + + //printf("releaseManifold: gNumManifold %d\n",gNumManifold); + clearManifold(manifold); + + ///todo: this can be improved a lot, linear search might be slow part! + int findIndex = m_manifoldsPtr.findLinearSearch(manifold); + if (findIndex < m_manifoldsPtr.size()) + { + m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1); + m_manifoldsPtr.pop_back(); + delete manifold; + } + +} + + + +btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold) +{ + +#ifdef USE_DISPATCH_REGISTRY_ARRAY + + btCollisionAlgorithmConstructionInfo ci; + ci.m_dispatcher = this; + ci.m_manifold = sharedManifold; + btCollisionAlgorithm* algo = m_doubleDispatch[body0->getCollisionShape()->getShapeType()][body1->getCollisionShape()->getShapeType()] + ->CreateCollisionAlgorithm(ci,body0,body1); +#else + btCollisionAlgorithm* algo = internalFindAlgorithm(body0,body1); +#endif //USE_DISPATCH_REGISTRY_ARRAY + return algo; +} + + +#ifndef BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION + +btCollisionAlgorithmCreateFunc* btCollisionDispatcher::internalFindCreateFunc(int proxyType0,int proxyType1) +{ + + if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConvex(proxyType1)) + { + return m_convexConvexCreateFunc; + } + + if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConcave(proxyType1)) + { + return m_convexConcaveCreateFunc; + } + + if (btBroadphaseProxy::isConvex(proxyType1) && btBroadphaseProxy::isConcave(proxyType0)) + { + return m_swappedConvexConcaveCreateFunc; + } + + if (btBroadphaseProxy::isCompound(proxyType0)) + { + return m_compoundCreateFunc; + } else + { + if (btBroadphaseProxy::isCompound(proxyType1)) + { + return m_swappedCompoundCreateFunc; + } + } + + //failed to find an algorithm + return m_emptyCreateFunc; +} + +#endif //BT_EXCLUDE_DEFAULT_COLLISIONALGORITHM_REGISTRATION + + +#ifndef USE_DISPATCH_REGISTRY_ARRAY + +btCollisionAlgorithm* btCollisionDispatcher::internalFindAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold) +{ + m_count++; + + btCollisionAlgorithmConstructionInfo ci; + ci.m_dispatcher = this; + + if (body0->getCollisionShape()->isConvex() && body1->getCollisionShape()->isConvex() ) + { + return new btConvexConvexAlgorithm(sharedManifold,ci,body0,body1); + } + + if (body0->getCollisionShape()->isConvex() && body1->getCollisionShape()->isConcave()) + { + return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); + } + + if (body1->getCollisionShape()->isConvex() && body0->getCollisionShape()->isConcave()) + { + return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); + } + + if (body0->getCollisionShape()->isCompound()) + { + return new btCompoundCollisionAlgorithm(ci,body0,body1,false); + } else + { + if (body1->getCollisionShape()->isCompound()) + { + return new btCompoundCollisionAlgorithm(ci,body0,body1,true); + } + } + + //failed to find an algorithm + return new btEmptyAlgorithm(ci); + +} +#endif //USE_DISPATCH_REGISTRY_ARRAY + +bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionObject* body1) +{ + //here you can do filtering + bool hasResponse = + (body0->hasContactResponse() && body1->hasContactResponse()); + //no response between two static/kinematic bodies: + hasResponse = hasResponse && + ((!body0->isStaticOrKinematicObject()) ||(! body1->isStaticOrKinematicObject())); + return hasResponse; +} + +bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionObject* body1) +{ + assert(body0); + assert(body1); + + bool needsCollision = true; + + //broadphase filtering already deals with this + if ((body0->isStaticObject() || body0->isKinematicObject()) && + (body1->isStaticObject() || body1->isKinematicObject())) + { + printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n"); + } + + if ((!body0->isActive()) && (!body1->isActive())) + needsCollision = false; + else if (!body0->checkCollideWith(body1)) + needsCollision = false; + + return needsCollision ; + +} + + + +///interface for iterating all overlapping collision pairs, no matter how those pairs are stored (array, set, map etc) +///this is useful for the collision dispatcher. +class btCollisionPairCallback : public btOverlapCallback +{ + btDispatcherInfo& m_dispatchInfo; + btCollisionDispatcher* m_dispatcher; + +public: + + btCollisionPairCallback(btDispatcherInfo& dispatchInfo,btCollisionDispatcher* dispatcher) + :m_dispatchInfo(dispatchInfo), + m_dispatcher(dispatcher) + { + } + + btCollisionPairCallback& operator=(btCollisionPairCallback& other) + { + m_dispatchInfo = other.m_dispatchInfo; + m_dispatcher = other.m_dispatcher; + return *this; + } + + virtual ~btCollisionPairCallback() {} + + + virtual bool processOverlap(btBroadphasePair& pair) + { + (*m_dispatcher->getNearCallback())(pair,*m_dispatcher,m_dispatchInfo); + + return false; + } +}; + + +void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo) +{ + //m_blockedForChanges = true; + + btCollisionPairCallback collisionCallback(dispatchInfo,this); + + pairCache->processAllOverlappingPairs(&collisionCallback); + + //m_blockedForChanges = false; + +} + + + + +//by default, Bullet will use this near callback +void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo) +{ + btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject; + btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject; + + if (dispatcher.needsCollision(colObj0,colObj1)) + { + //dispatcher will keep algorithms persistent in the collision pair + if (!collisionPair.m_algorithm) + { + collisionPair.m_algorithm = dispatcher.findAlgorithm(colObj0,colObj1); + } + + if (collisionPair.m_algorithm) + { + btManifoldResult contactPointResult(colObj0,colObj1); + + if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE) + { + //discrete collision detection query + collisionPair.m_algorithm->processCollision(colObj0,colObj1,dispatchInfo,&contactPointResult); + } else + { + //continuous collision detection query, time of impact (toi) + btScalar toi = collisionPair.m_algorithm->calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&contactPointResult); + if (dispatchInfo.m_timeOfImpact > toi) + dispatchInfo.m_timeOfImpact = toi; + + } + } + } + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h new file mode 100644 index 00000000000..ca5aba8f01c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h @@ -0,0 +1,135 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION__DISPATCHER_H +#define COLLISION__DISPATCHER_H + +#include "../BroadphaseCollision/btDispatcher.h" +#include "../NarrowPhaseCollision/btPersistentManifold.h" + +#include "../CollisionDispatch/btManifoldResult.h" + +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +class btIDebugDraw; +class btOverlappingPairCache; + + +#include "btCollisionCreateFunc.h" + +#define USE_DISPATCH_REGISTRY_ARRAY 1 + +class btCollisionDispatcher; +///user can override this nearcallback for collision filtering and more finegrained control over collision detection +typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo); + + +///btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs. +///Time of Impact, Closest Points and Penetration Depth. +class btCollisionDispatcher : public btDispatcher +{ + int m_count; + + btAlignedObjectArray m_manifoldsPtr; + + bool m_useIslands; + + btManifoldResult m_defaultManifoldResult; + + btNearCallback m_nearCallback; + + btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES]; + + btCollisionAlgorithmCreateFunc* internalFindCreateFunc(int proxyType0,int proxyType1); + + //default CreationFunctions, filling the m_doubleDispatch table + btCollisionAlgorithmCreateFunc* m_convexConvexCreateFunc; + btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc; + btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc; + btCollisionAlgorithmCreateFunc* m_compoundCreateFunc; + btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc; + btCollisionAlgorithmCreateFunc* m_emptyCreateFunc; + +#ifndef USE_DISPATCH_REGISTRY_ARRAY + btCollisionAlgorithm* internalFindAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold = 0); +#endif //USE_DISPATCH_REGISTRY_ARRAY + +public: + + ///registerCollisionCreateFunc allows registration of custom/alternative collision create functions + void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc); + + int getNumManifolds() const + { + return int( m_manifoldsPtr.size()); + } + + btPersistentManifold** getInternalManifoldPointer() + { + return &m_manifoldsPtr[0]; + } + + btPersistentManifold* getManifoldByIndexInternal(int index) + { + return m_manifoldsPtr[index]; + } + + const btPersistentManifold* getManifoldByIndexInternal(int index) const + { + return m_manifoldsPtr[index]; + } + + ///the default constructor creates/register default collision algorithms, for convex, compound and concave shape support + btCollisionDispatcher (); + + ///a special constructor that doesn't create/register the default collision algorithms + btCollisionDispatcher(bool noDefaultAlgorithms); + + virtual ~btCollisionDispatcher(); + + virtual btPersistentManifold* getNewManifold(void* b0,void* b1); + + virtual void releaseManifold(btPersistentManifold* manifold); + + + virtual void clearManifold(btPersistentManifold* manifold); + + + btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold = 0); + + virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1); + + virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1); + + virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,btDispatcherInfo& dispatchInfo); + + void setNearCallback(btNearCallback nearCallback) + { + m_nearCallback = nearCallback; + } + + btNearCallback getNearCallback() const + { + return m_nearCallback; + } + + //by default, Bullet will use this near callback + static void defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, btDispatcherInfo& dispatchInfo); + +}; + +#endif //COLLISION__DISPATCHER_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp new file mode 100644 index 00000000000..d4c0a4e8cb3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp @@ -0,0 +1,57 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btCollisionObject.h" + +btCollisionObject::btCollisionObject() + : m_broadphaseHandle(0), + m_collisionShape(0), + m_collisionFlags(0), + m_activationState1(1), + m_deactivationTime(btScalar(0.)), + m_userObjectPointer(0), + m_hitFraction(btScalar(1.)), + m_ccdSweptSphereRadius(btScalar(0.)), + m_ccdSquareMotionThreshold(btScalar(0.)), + m_checkCollideWith(false) +{ + +} + +btCollisionObject::~btCollisionObject() +{ +} + +void btCollisionObject::setActivationState(int newState) +{ + if ( (m_activationState1 != DISABLE_DEACTIVATION) && (m_activationState1 != DISABLE_SIMULATION)) + m_activationState1 = newState; +} + +void btCollisionObject::forceActivationState(int newState) +{ + m_activationState1 = newState; +} + +void btCollisionObject::activate(bool forceActivation) +{ + if (forceActivation || !(m_collisionFlags & (CF_STATIC_OBJECT|CF_KINEMATIC_OBJECT))) + { + setActivationState(ACTIVE_TAG); + m_deactivationTime = btScalar(0.); + } +} + + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h new file mode 100644 index 00000000000..9fb6a67c4a3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionObject.h @@ -0,0 +1,346 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_OBJECT_H +#define COLLISION_OBJECT_H + +#include "../../LinearMath/btTransform.h" + +//island management, m_activationState1 +#define ACTIVE_TAG 1 +#define ISLAND_SLEEPING 2 +#define WANTS_DEACTIVATION 3 +#define DISABLE_DEACTIVATION 4 +#define DISABLE_SIMULATION 5 + +struct btBroadphaseProxy; +class btCollisionShape; +#include "../../LinearMath/btMotionState.h" + + + +/// btCollisionObject can be used to manage collision detection objects. +/// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy. +/// They can be added to the btCollisionWorld. +ATTRIBUTE_ALIGNED16(class) btCollisionObject +{ + +protected: + + btTransform m_worldTransform; + + ///m_interpolationWorldTransform is used for CCD and interpolation + ///it can be either previous or future (predicted) transform + btTransform m_interpolationWorldTransform; + //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities) + //without destroying the continuous interpolated motion (which uses this interpolation velocities) + btVector3 m_interpolationLinearVelocity; + btVector3 m_interpolationAngularVelocity; + btBroadphaseProxy* m_broadphaseHandle; + btCollisionShape* m_collisionShape; + + int m_collisionFlags; + + int m_islandTag1; + int m_companionId; + + int m_activationState1; + btScalar m_deactivationTime; + + btScalar m_friction; + btScalar m_restitution; + + ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer + void* m_userObjectPointer; + + ///m_internalOwner is reserved to point to Bullet's btRigidBody. Don't use this, use m_userObjectPointer instead. + void* m_internalOwner; + + ///time of impact calculation + btScalar m_hitFraction; + + ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: + btScalar m_ccdSweptSphereRadius; + + /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold + btScalar m_ccdSquareMotionThreshold; + + /// If some object should have elaborate collision filtering by sub-classes + bool m_checkCollideWith; + + char m_pad[7]; + + virtual bool checkCollideWithOverride(btCollisionObject* co) + { + return true; + } + +public: + + enum CollisionFlags + { + CF_STATIC_OBJECT= 1, + CF_KINEMATIC_OBJECT= 2, + CF_NO_CONTACT_RESPONSE = 4, + CF_CUSTOM_MATERIAL_CALLBACK = 8//this allows per-triangle material (friction/restitution) + }; + + + inline bool mergesSimulationIslands() const + { + ///static objects, kinematic and object without contact response don't merge islands + return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0); + } + + + inline bool isStaticObject() const { + return (m_collisionFlags & CF_STATIC_OBJECT) != 0; + } + + inline bool isKinematicObject() const + { + return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0; + } + + inline bool isStaticOrKinematicObject() const + { + return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ; + } + + inline bool hasContactResponse() const { + return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0; + } + + + btCollisionObject(); + + virtual ~btCollisionObject(); + + void setCollisionShape(btCollisionShape* collisionShape) + { + m_collisionShape = collisionShape; + } + + const btCollisionShape* getCollisionShape() const + { + return m_collisionShape; + } + + btCollisionShape* getCollisionShape() + { + return m_collisionShape; + } + + + + + int getActivationState() const { return m_activationState1;} + + void setActivationState(int newState); + + void setDeactivationTime(btScalar time) + { + m_deactivationTime = time; + } + btScalar getDeactivationTime() const + { + return m_deactivationTime; + } + + void forceActivationState(int newState); + + void activate(bool forceActivation = false); + + inline bool isActive() const + { + return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION)); + } + + void setRestitution(btScalar rest) + { + m_restitution = rest; + } + btScalar getRestitution() const + { + return m_restitution; + } + void setFriction(btScalar frict) + { + m_friction = frict; + } + btScalar getFriction() const + { + return m_friction; + } + + ///reserved for Bullet internal usage + void* getInternalOwner() + { + return m_internalOwner; + } + + const void* getInternalOwner() const + { + return m_internalOwner; + } + + btTransform& getWorldTransform() + { + return m_worldTransform; + } + + const btTransform& getWorldTransform() const + { + return m_worldTransform; + } + + void setWorldTransform(const btTransform& worldTrans) + { + m_worldTransform = worldTrans; + } + + + btBroadphaseProxy* getBroadphaseHandle() + { + return m_broadphaseHandle; + } + + const btBroadphaseProxy* getBroadphaseHandle() const + { + return m_broadphaseHandle; + } + + void setBroadphaseHandle(btBroadphaseProxy* handle) + { + m_broadphaseHandle = handle; + } + + + const btTransform& getInterpolationWorldTransform() const + { + return m_interpolationWorldTransform; + } + + btTransform& getInterpolationWorldTransform() + { + return m_interpolationWorldTransform; + } + + void setInterpolationWorldTransform(const btTransform& trans) + { + m_interpolationWorldTransform = trans; + } + + + const btVector3& getInterpolationLinearVelocity() const + { + return m_interpolationLinearVelocity; + } + + const btVector3& getInterpolationAngularVelocity() const + { + return m_interpolationAngularVelocity; + } + + const int getIslandTag() const + { + return m_islandTag1; + } + + void setIslandTag(int tag) + { + m_islandTag1 = tag; + } + + const int getCompanionId() const + { + return m_companionId; + } + + void setCompanionId(int id) + { + m_companionId = id; + } + + const btScalar getHitFraction() const + { + return m_hitFraction; + } + + void setHitFraction(btScalar hitFraction) + { + m_hitFraction = hitFraction; + } + + + const int getCollisionFlags() const + { + return m_collisionFlags; + } + + void setCollisionFlags(int flags) + { + m_collisionFlags = flags; + } + + ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: + btScalar getCcdSweptSphereRadius() const + { + return m_ccdSweptSphereRadius; + } + + ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm:: + void setCcdSweptSphereRadius(btScalar radius) + { + m_ccdSweptSphereRadius = radius; + } + + btScalar getCcdSquareMotionThreshold() const + { + return m_ccdSquareMotionThreshold; + } + + + /// Don't do continuous collision detection if square motion (in one step) is less then m_ccdSquareMotionThreshold + void setCcdSquareMotionThreshold(btScalar ccdSquareMotionThreshold) + { + m_ccdSquareMotionThreshold = ccdSquareMotionThreshold; + } + + ///users can point to their objects, userPointer is not used by Bullet + void* getUserPointer() const + { + return m_userObjectPointer; + } + + ///users can point to their objects, userPointer is not used by Bullet + void setUserPointer(void* userPointer) + { + m_userObjectPointer = userPointer; + } + + inline bool checkCollideWith(btCollisionObject* co) + { + if (m_checkCollideWith) + return checkCollideWithOverride(co); + + return true; + } + + +} +; + +#endif //COLLISION_OBJECT_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp new file mode 100644 index 00000000000..b49036a5b50 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp @@ -0,0 +1,362 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btCollisionWorld.h" +#include "btCollisionDispatcher.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" + +#include "BulletCollision/CollisionShapes/btSphereShape.h" //for raycasting +#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" //for raycasting +#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" +#include "LinearMath/btAabbUtil2.h" +#include "LinearMath/btQuickprof.h" +#include "LinearMath/btStackAlloc.h" + +//When the user doesn't provide dispatcher or broadphase, create basic versions (and delete them in destructor) +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" + + +btCollisionWorld::btCollisionWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache, int stackSize) +:m_dispatcher1(dispatcher), +m_broadphasePairCache(pairCache), +m_ownsDispatcher(false), +m_ownsBroadphasePairCache(false) +{ + m_stackAlloc = new btStackAlloc(stackSize); + m_dispatchInfo.m_stackAllocator = m_stackAlloc; +} + + +btCollisionWorld::~btCollisionWorld() +{ + m_stackAlloc->destroy(); + delete m_stackAlloc; + + //clean up remaining objects + int i; + for (i=0;igetBroadphaseHandle(); + if (bp) + { + // + // only clear the cached algorithms + // + getBroadphase()->cleanProxyFromPairs(bp); + getBroadphase()->destroyProxy(bp); + } + } + + if (m_ownsDispatcher) + delete m_dispatcher1; + if (m_ownsBroadphasePairCache) + delete m_broadphasePairCache; + +} + + + + + + + + + + +void btCollisionWorld::addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup,short int collisionFilterMask) +{ + + //check that the object isn't already added + btAssert( m_collisionObjects.findLinearSearch(collisionObject) == m_collisionObjects.size()); + + m_collisionObjects.push_back(collisionObject); + + //calculate new AABB + btTransform trans = collisionObject->getWorldTransform(); + + btVector3 minAabb; + btVector3 maxAabb; + collisionObject->getCollisionShape()->getAabb(trans,minAabb,maxAabb); + + int type = collisionObject->getCollisionShape()->getShapeType(); + collisionObject->setBroadphaseHandle( getBroadphase()->createProxy( + minAabb, + maxAabb, + type, + collisionObject, + collisionFilterGroup, + collisionFilterMask + )) ; + + + + + +} + + + + +void btCollisionWorld::performDiscreteCollisionDetection() +{ + btDispatcherInfo& dispatchInfo = getDispatchInfo(); + + BEGIN_PROFILE("perform Broadphase Collision Detection"); + + + //update aabb (of all moved objects) + + btVector3 aabbMin,aabbMax; + for (int i=0;igetCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),aabbMin,aabbMax); + m_broadphasePairCache->setAabb(m_collisionObjects[i]->getBroadphaseHandle(),aabbMin,aabbMax); + } + + m_broadphasePairCache->refreshOverlappingPairs(); + + + END_PROFILE("perform Broadphase Collision Detection"); + + BEGIN_PROFILE("performDiscreteCollisionDetection"); + + btDispatcher* dispatcher = getDispatcher(); + if (dispatcher) + dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache,dispatchInfo); + + END_PROFILE("performDiscreteCollisionDetection"); + +} + + +void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject) +{ + + + //bool removeFromBroadphase = false; + + { + + btBroadphaseProxy* bp = collisionObject->getBroadphaseHandle(); + if (bp) + { + // + // only clear the cached algorithms + // + getBroadphase()->cleanProxyFromPairs(bp); + getBroadphase()->destroyProxy(bp); + collisionObject->setBroadphaseHandle(0); + } + } + + + //swapremove + m_collisionObjects.remove(collisionObject); + +} + + + +void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, + btCollisionObject* collisionObject, + const btCollisionShape* collisionShape, + const btTransform& colObjWorldTransform, + RayResultCallback& resultCallback,short int collisionFilterMask) +{ + + btSphereShape pointShape(btScalar(0.0)); + pointShape.setMargin(0.f); + + objectQuerySingle(&pointShape,rayFromTrans,rayToTrans, + collisionObject, + collisionShape, + colObjWorldTransform, + resultCallback,collisionFilterMask); +} + +void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const btTransform& rayFromTrans,const btTransform& rayToTrans, + btCollisionObject* collisionObject, + const btCollisionShape* collisionShape, + const btTransform& colObjWorldTransform, + RayResultCallback& resultCallback,short int collisionFilterMask) +{ + + + if (collisionShape->isConvex()) + { + btConvexCast::CastResult castResult; + castResult.m_fraction = btScalar(1.);//?? + + btConvexShape* convexShape = (btConvexShape*) collisionShape; + btVoronoiSimplexSolver simplexSolver; + btSubsimplexConvexCast convexCaster(castShape,convexShape,&simplexSolver); + //GjkConvexCast convexCaster(castShape,convexShape,&simplexSolver); + //ContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0); + + if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult)) + { + //add hit + if (castResult.m_normal.length2() > btScalar(0.0001)) + { + castResult.m_normal.normalize(); + if (castResult.m_fraction < resultCallback.m_closestHitFraction) + { + + btCollisionWorld::LocalRayResult localRayResult + ( + collisionObject, + 0, + castResult.m_normal, + castResult.m_fraction + ); + + resultCallback.AddSingleResult(localRayResult); + + } + } + } + } + else + { + + if (collisionShape->isConcave()) + { + + btTriangleMeshShape* triangleMesh = (btTriangleMeshShape*)collisionShape; + + btTransform worldTocollisionObject = colObjWorldTransform.inverse(); + + btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin(); + btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin(); + + //ConvexCast::CastResult + + struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback + { + btCollisionWorld::RayResultCallback* m_resultCallback; + btCollisionObject* m_collisionObject; + btTriangleMeshShape* m_triangleMesh; + + BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to, + btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh): + btTriangleRaycastCallback(from,to), + m_resultCallback(resultCallback), + m_collisionObject(collisionObject), + m_triangleMesh(triangleMesh) + { + } + + + virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex ) + { + btCollisionWorld::LocalShapeInfo shapeInfo; + shapeInfo.m_shapePart = partId; + shapeInfo.m_triangleIndex = triangleIndex; + + btCollisionWorld::LocalRayResult rayResult + (m_collisionObject, + &shapeInfo, + hitNormalLocal, + hitFraction); + + return m_resultCallback->AddSingleResult(rayResult); + + + } + + }; + + + BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,triangleMesh); + rcb.m_hitFraction = resultCallback.m_closestHitFraction; + + btVector3 rayAabbMinLocal = rayFromLocal; + rayAabbMinLocal.setMin(rayToLocal); + btVector3 rayAabbMaxLocal = rayFromLocal; + rayAabbMaxLocal.setMax(rayToLocal); + + triangleMesh->processAllTriangles(&rcb,rayAabbMinLocal,rayAabbMaxLocal); + + } else + { + //todo: use AABB tree or other BVH acceleration structure! + if (collisionShape->isCompound()) + { + const btCompoundShape* compoundShape = static_cast(collisionShape); + int i=0; + for (i=0;igetNumChildShapes();i++) + { + btTransform childTrans = compoundShape->getChildTransform(i); + const btCollisionShape* childCollisionShape = compoundShape->getChildShape(i); + btTransform childWorldTrans = colObjWorldTransform * childTrans; + objectQuerySingle(castShape, rayFromTrans,rayToTrans, + collisionObject, + childCollisionShape, + childWorldTrans, + resultCallback, collisionFilterMask); + + } + + + } + } + } +} + +void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback,short int collisionFilterMask) +{ + + + btTransform rayFromTrans,rayToTrans; + rayFromTrans.setIdentity(); + rayFromTrans.setOrigin(rayFromWorld); + rayToTrans.setIdentity(); + + rayToTrans.setOrigin(rayToWorld); + + /// go over all objects, and if the ray intersects their aabb, do a ray-shape query using convexCaster (CCD) + + int i; + for (i=0;igetBroadphaseHandle()->m_collisionFilterGroup & collisionFilterMask) { + //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject(); + btVector3 collisionObjectAabbMin,collisionObjectAabbMax; + collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax); + + btScalar hitLambda = btScalar(1.); //could use resultCallback.m_closestHitFraction, but needs testing + btVector3 hitNormal; + if (btRayAabb(rayFromWorld,rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal)) + { + rayTestSingle(rayFromTrans,rayToTrans, + collisionObject, + collisionObject->getCollisionShape(), + collisionObject->getWorldTransform(), + resultCallback); + } + } + } + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h new file mode 100644 index 00000000000..b6d80233ab7 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h @@ -0,0 +1,255 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +/** + * @mainpage Bullet Documentation + * + * @section intro_sec Introduction + * Bullet Collision Detection & Physics SDK + * + * Bullet is a Collision Detection and Rigid Body Dynamics Library. The Library is Open Source and free for commercial use, under the ZLib license ( http://opensource.org/licenses/zlib-license.php ). + * + * There is the Physics Forum for Feedback and bteral Collision Detection and Physics discussions. + * Please visit http://www.continuousphysics.com/Bullet/phpBB2/index.php + * + * @section install_sec Installation + * + * @subsection step1 Step 1: Download + * You can download the Bullet Physics Library from our website: http://www.continuousphysics.com/Bullet/ + * @subsection step2 Step 2: Building + * Bullet comes with autogenerated Project Files for Microsoft Visual Studio 6, 7, 7.1 and 8. + * The main Workspace/Solution is located in Bullet/msvc/8/wksbullet.sln (replace 8 with your version). + * + * Under other platforms, like Linux or Mac OS-X, Bullet can be build using either using cmake, http://www.cmake.org, or jam, http://www.perforce.com/jam/jam.html . cmake can autogenerate Xcode, KDevelop, MSVC and other build systems. just run cmake . in the root of Bullet. + * Jam is a build system that can build the library, demos and also autogenerate the MSVC Project Files. + * So if you are not using MSVC, you can run configure and jam . + * If you don't have jam installed, you can make jam from the included jam-2.5 sources, or download jam from ftp://ftp.perforce.com/pub/jam/ + * + * @subsection step3 Step 3: Testing demos + * Try to run and experiment with CcdPhysicsDemo executable as a starting point. + * Bullet can be used in several ways, as Full Rigid Body simulation, as Collision Detector Library or Low Level / Snippets like the GJK Closest Point calculation. + * The Dependencies can be seen in this documentation under Directories + * + * @subsection step4 Step 4: Integrating in your application, Full Rigid Body Simulation + * Check out CcdPhysicsDemo how to create a btDynamicsWorld, btRigidBody and btCollisionShape, Stepping the simulation and synchronizing your graphics object transform. + * PLEASE NOTE THE CcdPhysicsEnvironment and CcdPhysicsController is obsolete and will be removed. It has been replaced by classes derived frmo btDynamicsWorld and btRididBody + * @subsection step5 Step 5 : Integrate the Collision Detection Library (without Dynamics and other Extras) + * Bullet Collision Detection can also be used without the Dynamics/Extras. + * Check out btCollisionWorld and btCollisionObject, and the CollisionInterfaceDemo. Also in Extras/test_BulletOde.cpp there is a sample Collision Detection integration with Open Dynamics Engine, ODE, http://www.ode.org + * @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calculation. + * Bullet has been designed in a modular way keeping dependencies to a minimum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetector. + * + * @section copyright Copyright + * Copyright (C) 2005-2007 Erwin Coumans, some contributions Copyright Gino van den Bergen, Christer Ericson, Simon Hobbs, Ricardo Padrela, F Richter(res), Stephane Redon + * Special thanks to all visitors of the Bullet Physics forum, and in particular above contributors, Dave Eberle, Dirk Gregorius, Erin Catto, Dave Eberle, Adam Moravanszky, + * Pierre Terdiman, Kenny Erleben, Russell Smith, Oliver Strunk, Jan Paul van Waveren, Marten Svanfeldt. + * + */ + + + +#ifndef COLLISION_WORLD_H +#define COLLISION_WORLD_H + +class btStackAlloc; +class btCollisionShape; +class btConvexShape; +class btBroadphaseInterface; +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransform.h" +#include "btCollisionObject.h" +#include "btCollisionDispatcher.h" //for definition of btCollisionObjectArray +#include "../BroadphaseCollision/btOverlappingPairCache.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +///CollisionWorld is interface and container for the collision detection +class btCollisionWorld +{ + + +protected: + + btAlignedObjectArray m_collisionObjects; + + btDispatcher* m_dispatcher1; + + btDispatcherInfo m_dispatchInfo; + + btStackAlloc* m_stackAlloc; + + btOverlappingPairCache* m_broadphasePairCache; + + bool m_ownsDispatcher; + bool m_ownsBroadphasePairCache; + +public: + + //this constructor doesn't own the dispatcher and paircache/broadphase + btCollisionWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache, int stackSize = 2*1024*1024); + + virtual ~btCollisionWorld(); + + + btBroadphaseInterface* getBroadphase() + { + return m_broadphasePairCache; + } + + btOverlappingPairCache* getPairCache() + { + return m_broadphasePairCache; + } + + + btDispatcher* getDispatcher() + { + return m_dispatcher1; + } + + ///LocalShapeInfo gives extra information for complex shapes + ///Currently, only btTriangleMeshShape is available, so it just contains triangleIndex and subpart + struct LocalShapeInfo + { + int m_shapePart; + int m_triangleIndex; + + //const btCollisionShape* m_shapeTemp; + //const btTransform* m_shapeLocalTransform; + }; + + struct LocalRayResult + { + LocalRayResult(btCollisionObject* collisionObject, + LocalShapeInfo* localShapeInfo, + const btVector3& hitNormalLocal, + btScalar hitFraction) + :m_collisionObject(collisionObject), + m_localShapeInfo(localShapeInfo), + m_hitNormalLocal(hitNormalLocal), + m_hitFraction(hitFraction) + { + } + + btCollisionObject* m_collisionObject; + LocalShapeInfo* m_localShapeInfo; + btVector3 m_hitNormalLocal; + btScalar m_hitFraction; + + }; + + ///RayResultCallback is used to report new raycast results + struct RayResultCallback + { + virtual ~RayResultCallback() + { + } + btScalar m_closestHitFraction; + bool HasHit() + { + return (m_closestHitFraction < btScalar(1.)); + } + + RayResultCallback() + :m_closestHitFraction(btScalar(1.)) + { + } + virtual btScalar AddSingleResult(LocalRayResult& rayResult) = 0; + }; + + struct ClosestRayResultCallback : public RayResultCallback + { + ClosestRayResultCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld) + :m_rayFromWorld(rayFromWorld), + m_rayToWorld(rayToWorld), + m_collisionObject(0) + { + } + + btVector3 m_rayFromWorld;//used to calculate hitPointWorld from hitFraction + btVector3 m_rayToWorld; + + btVector3 m_hitNormalWorld; + btVector3 m_hitPointWorld; + btCollisionObject* m_collisionObject; + + virtual btScalar AddSingleResult(LocalRayResult& rayResult) + { + +//caller already does the filter on the m_closestHitFraction + assert(rayResult.m_hitFraction <= m_closestHitFraction); + + m_closestHitFraction = rayResult.m_hitFraction; + m_collisionObject = rayResult.m_collisionObject; + m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal; + m_hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction); + return rayResult.m_hitFraction; + } + }; + + + + + int getNumCollisionObjects() const + { + return int(m_collisionObjects.size()); + } + + /// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback + /// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback. + void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback, short int collisionFilterMask=-1); + + /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest. + /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape. + /// This allows more customization. + static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans, + btCollisionObject* collisionObject, + const btCollisionShape* collisionShape, + const btTransform& colObjWorldTransform, + RayResultCallback& resultCallback, short int collisionFilterMask=-1); + + /// objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest. + static void objectQuerySingle(const btConvexShape* castShape, const btTransform& rayFromTrans,const btTransform& rayToTrans, + btCollisionObject* collisionObject, + const btCollisionShape* collisionShape, + const btTransform& colObjWorldTransform, + RayResultCallback& resultCallback, short int collisionFilterMask=-1); + + void addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup=1,short int collisionFilterMask=1); + + btCollisionObjectArray& getCollisionObjectArray() + { + return m_collisionObjects; + } + + const btCollisionObjectArray& getCollisionObjectArray() const + { + return m_collisionObjects; + } + + + void removeCollisionObject(btCollisionObject* collisionObject); + + virtual void performDiscreteCollisionDetection(); + + btDispatcherInfo& getDispatchInfo() + { + return m_dispatchInfo; + } + +}; + + +#endif //COLLISION_WORLD_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp new file mode 100644 index 00000000000..92f4c8b28a6 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp @@ -0,0 +1,140 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" + + +btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) +:m_isSwapped(isSwapped) +{ + btCollisionObject* colObj = m_isSwapped? body1 : body0; + btCollisionObject* otherObj = m_isSwapped? body0 : body1; + assert (colObj->getCollisionShape()->isCompound()); + + btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + int numChildren = compoundShape->getNumChildShapes(); + int i; + + m_childCollisionAlgorithms.resize(numChildren); + for (i=0;igetChildShape(i); + btCollisionShape* orgShape = colObj->getCollisionShape(); + colObj->setCollisionShape( childShape ); + m_childCollisionAlgorithms[i] = ci.m_dispatcher->findAlgorithm(colObj,otherObj); + colObj->setCollisionShape( orgShape ); + } +} + + +btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm() +{ + int numChildren = m_childCollisionAlgorithms.size(); + int i; + for (i=0;igetCollisionShape()->isCompound()); + btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + + //We will use the OptimizedBVH, AABB tree to cull potential child-overlaps + //If both proxies are Compound, we will deal with that directly, by performing sequential/parallel tree traversals + //given Proxy0 and Proxy1, if both have a tree, Tree0 and Tree1, this means: + //determine overlapping nodes of Proxy1 using Proxy0 AABB against Tree1 + //then use each overlapping node AABB against Tree0 + //and vise versa. + + int numChildren = m_childCollisionAlgorithms.size(); + int i; + for (i=0;igetChildShape(i); + + //backup + btTransform orgTrans = colObj->getWorldTransform(); + btCollisionShape* orgShape = colObj->getCollisionShape(); + + const btTransform& childTrans = compoundShape->getChildTransform(i); + //btTransform newChildWorldTrans = orgTrans*childTrans ; + colObj->setWorldTransform( orgTrans*childTrans ); + //the contactpoint is still projected back using the original inverted worldtrans + colObj->setCollisionShape( childShape ); + m_childCollisionAlgorithms[i]->processCollision(colObj,otherObj,dispatchInfo,resultOut); + //revert back + colObj->setCollisionShape( orgShape); + colObj->setWorldTransform( orgTrans ); + } +} + +btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + + btCollisionObject* colObj = m_isSwapped? body1 : body0; + btCollisionObject* otherObj = m_isSwapped? body0 : body1; + + assert (colObj->getCollisionShape()->isCompound()); + + btCompoundShape* compoundShape = static_cast(colObj->getCollisionShape()); + + //We will use the OptimizedBVH, AABB tree to cull potential child-overlaps + //If both proxies are Compound, we will deal with that directly, by performing sequential/parallel tree traversals + //given Proxy0 and Proxy1, if both have a tree, Tree0 and Tree1, this means: + //determine overlapping nodes of Proxy1 using Proxy0 AABB against Tree1 + //then use each overlapping node AABB against Tree0 + //and vise versa. + + btScalar hitFraction = btScalar(1.); + + int numChildren = m_childCollisionAlgorithms.size(); + int i; + for (i=0;igetChildShape(i); + + //backup + btTransform orgTrans = colObj->getWorldTransform(); + btCollisionShape* orgShape = colObj->getCollisionShape(); + + const btTransform& childTrans = compoundShape->getChildTransform(i); + //btTransform newChildWorldTrans = orgTrans*childTrans ; + colObj->setWorldTransform( orgTrans*childTrans ); + + colObj->setCollisionShape( childShape ); + btScalar frac = m_childCollisionAlgorithms[i]->calculateTimeOfImpact(colObj,otherObj,dispatchInfo,resultOut); + if (fracsetCollisionShape( orgShape); + colObj->setWorldTransform( orgTrans); + } + return hitFraction; + +} + + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h new file mode 100644 index 00000000000..7091b233b46 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h @@ -0,0 +1,64 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COMPOUND_COLLISION_ALGORITHM_H +#define COMPOUND_COLLISION_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../BroadphaseCollision/btDispatcher.h" +#include "../BroadphaseCollision/btBroadphaseInterface.h" + +#include "../NarrowPhaseCollision/btPersistentManifold.h" +class btDispatcher; +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "btCollisionCreateFunc.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +/// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes +/// Place holder, not fully implemented yet +class btCompoundCollisionAlgorithm : public btCollisionAlgorithm +{ + btAlignedObjectArray m_childCollisionAlgorithms; + bool m_isSwapped; + +public: + + btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); + + virtual ~btCompoundCollisionAlgorithm(); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btCompoundCollisionAlgorithm(ci,body0,body1,false); + } + }; + + struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btCompoundCollisionAlgorithm(ci,body0,body1,true); + } + }; + +}; + +#endif //COMPOUND_COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp new file mode 100644 index 00000000000..24ceacfd40d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp @@ -0,0 +1,312 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btConvexConcaveCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionShapes/btConcaveShape.h" +#include "BulletCollision/CollisionDispatch/btManifoldResult.h" +#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "LinearMath/btIDebugDraw.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" + +btConvexConcaveCollisionAlgorithm::btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped) +: btCollisionAlgorithm(ci), +m_isSwapped(isSwapped), +m_btConvexTriangleCallback(ci.m_dispatcher,body0,body1,isSwapped) +{ +} + +btConvexConcaveCollisionAlgorithm::~btConvexConcaveCollisionAlgorithm() +{ +} + + + +btConvexTriangleCallback::btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped): + m_dispatcher(dispatcher), + m_dispatchInfoPtr(0) +{ + m_convexBody = isSwapped? body1:body0; + m_triBody = isSwapped? body0:body1; + + // + // create the manifold from the dispatcher 'manifold pool' + // + m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody); + + clearCache(); +} + +btConvexTriangleCallback::~btConvexTriangleCallback() +{ + clearCache(); + m_dispatcher->releaseManifold( m_manifoldPtr ); + +} + + +void btConvexTriangleCallback::clearCache() +{ + m_dispatcher->clearManifold(m_manifoldPtr); +}; + + + +void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex) +{ + + //just for debugging purposes + //printf("triangle %d",m_triangleCount++); + + + //aabb filter is already applied! + + btCollisionAlgorithmConstructionInfo ci; + ci.m_dispatcher = m_dispatcher; + + btCollisionObject* ob = static_cast(m_triBody); + + + + ///debug drawing of the overlapping triangles + if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() > 0) + { + btVector3 color(255,255,0); + btTransform& tr = ob->getWorldTransform(); + m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(triangle[1]),color); + m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(triangle[2]),color); + m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(triangle[0]),color); + + //btVector3 center = triangle[0] + triangle[1]+triangle[2]; + //center *= btScalar(0.333333); + //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(center),color); + //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(center),color); + //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(center),color); + + } + + + //btCollisionObject* colObj = static_cast(m_convexProxy->m_clientObject); + + if (m_convexBody->getCollisionShape()->isConvex()) + { + btTriangleShape tm(triangle[0],triangle[1],triangle[2]); + tm.setMargin(m_collisionMarginTriangle); + + + btCollisionShape* tmpShape = ob->getCollisionShape(); + ob->setCollisionShape( &tm ); + + + btCollisionAlgorithm* colAlgo = ci.m_dispatcher->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr); + ///this should use the btDispatcher, so the actual registered algorithm is used + // btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody); + + m_resultOut->setShapeIdentifiers(-1,-1,partId,triangleIndex); + // cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex); +// cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); + colAlgo->processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut); + delete colAlgo; + ob->setCollisionShape( tmpShape ); + + } + + + +} + + + +void btConvexTriangleCallback::setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + m_dispatchInfoPtr = &dispatchInfo; + m_collisionMarginTriangle = collisionMarginTriangle; + m_resultOut = resultOut; + + //recalc aabbs + btTransform convexInTriangleSpace; + convexInTriangleSpace = m_triBody->getWorldTransform().inverse() * m_convexBody->getWorldTransform(); + btCollisionShape* convexShape = static_cast(m_convexBody->getCollisionShape()); + //CollisionShape* triangleShape = static_cast(triBody->m_collisionShape); + convexShape->getAabb(convexInTriangleSpace,m_aabbMin,m_aabbMax); + btScalar extraMargin = collisionMarginTriangle; + btVector3 extra(extraMargin,extraMargin,extraMargin); + + m_aabbMax += extra; + m_aabbMin -= extra; + +} + +void btConvexConcaveCollisionAlgorithm::clearCache() +{ + m_btConvexTriangleCallback.clearCache(); + +} + +void btConvexConcaveCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + + + btCollisionObject* convexBody = m_isSwapped ? body1 : body0; + btCollisionObject* triBody = m_isSwapped ? body0 : body1; + + if (triBody->getCollisionShape()->isConcave()) + { + + + btCollisionObject* triOb = triBody; + btConcaveShape* concaveShape = static_cast( triOb->getCollisionShape()); + + if (convexBody->getCollisionShape()->isConvex()) + { + btScalar collisionMarginTriangle = concaveShape->getMargin(); + + resultOut->setPersistentManifold(m_btConvexTriangleCallback.m_manifoldPtr); + m_btConvexTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,dispatchInfo,resultOut); + + //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here. + //m_dispatcher->clearManifold(m_btConvexTriangleCallback.m_manifoldPtr); + + m_btConvexTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody); + + concaveShape->processAllTriangles( &m_btConvexTriangleCallback,m_btConvexTriangleCallback.getAabbMin(),m_btConvexTriangleCallback.getAabbMax()); + + + } + + } + +} + + +btScalar btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)resultOut; + (void)dispatchInfo; + btCollisionObject* convexbody = m_isSwapped ? body1 : body0; + btCollisionObject* triBody = m_isSwapped ? body0 : body1; + + + //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast) + + //only perform CCD above a certain threshold, this prevents blocking on the long run + //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame... + btScalar squareMot0 = (convexbody->getInterpolationWorldTransform().getOrigin() - convexbody->getWorldTransform().getOrigin()).length2(); + if (squareMot0 < convexbody->getCcdSquareMotionThreshold()) + { + return btScalar(1.); + } + + //const btVector3& from = convexbody->m_worldTransform.getOrigin(); + //btVector3 to = convexbody->m_interpolationWorldTransform.getOrigin(); + //todo: only do if the motion exceeds the 'radius' + + btTransform triInv = triBody->getWorldTransform().inverse(); + btTransform convexFromLocal = triInv * convexbody->getWorldTransform(); + btTransform convexToLocal = triInv * convexbody->getInterpolationWorldTransform(); + + struct LocalTriangleSphereCastCallback : public btTriangleCallback + { + btTransform m_ccdSphereFromTrans; + btTransform m_ccdSphereToTrans; + btTransform m_meshTransform; + + btScalar m_ccdSphereRadius; + btScalar m_hitFraction; + + + LocalTriangleSphereCastCallback(const btTransform& from,const btTransform& to,btScalar ccdSphereRadius,btScalar hitFraction) + :m_ccdSphereFromTrans(from), + m_ccdSphereToTrans(to), + m_ccdSphereRadius(ccdSphereRadius), + m_hitFraction(hitFraction) + { + } + + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) + { + (void)partId; + (void)triangleIndex; + //do a swept sphere for now + btTransform ident; + ident.setIdentity(); + btConvexCast::CastResult castResult; + castResult.m_fraction = m_hitFraction; + btSphereShape pointShape(m_ccdSphereRadius); + btTriangleShape triShape(triangle[0],triangle[1],triangle[2]); + btVoronoiSimplexSolver simplexSolver; + btSubsimplexConvexCast convexCaster(&pointShape,&triShape,&simplexSolver); + //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver); + //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0); + //local space? + + if (convexCaster.calcTimeOfImpact(m_ccdSphereFromTrans,m_ccdSphereToTrans, + ident,ident,castResult)) + { + if (m_hitFraction > castResult.m_fraction) + m_hitFraction = castResult.m_fraction; + } + + } + + }; + + + + + + if (triBody->getCollisionShape()->isConcave()) + { + btVector3 rayAabbMin = convexFromLocal.getOrigin(); + rayAabbMin.setMin(convexToLocal.getOrigin()); + btVector3 rayAabbMax = convexFromLocal.getOrigin(); + rayAabbMax.setMax(convexToLocal.getOrigin()); + btScalar ccdRadius0 = convexbody->getCcdSweptSphereRadius(); + rayAabbMin -= btVector3(ccdRadius0,ccdRadius0,ccdRadius0); + rayAabbMax += btVector3(ccdRadius0,ccdRadius0,ccdRadius0); + + btScalar curHitFraction = btScalar(1.); //is this available? + LocalTriangleSphereCastCallback raycastCallback(convexFromLocal,convexToLocal, + convexbody->getCcdSweptSphereRadius(),curHitFraction); + + raycastCallback.m_hitFraction = convexbody->getHitFraction(); + + btCollisionObject* concavebody = triBody; + + btConcaveShape* triangleMesh = (btConcaveShape*) concavebody->getCollisionShape(); + + if (triangleMesh) + { + triangleMesh->processAllTriangles(&raycastCallback,rayAabbMin,rayAabbMax); + } + + + + if (raycastCallback.m_hitFraction < convexbody->getHitFraction()) + { + convexbody->setHitFraction( raycastCallback.m_hitFraction); + return raycastCallback.m_hitFraction; + } + } + + return btScalar(1.); + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h new file mode 100644 index 00000000000..4915b6c20c8 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h @@ -0,0 +1,111 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONVEX_CONCAVE_COLLISION_ALGORITHM_H +#define CONVEX_CONCAVE_COLLISION_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../BroadphaseCollision/btDispatcher.h" +#include "../BroadphaseCollision/btBroadphaseInterface.h" +#include "../CollisionShapes/btTriangleCallback.h" +#include "../NarrowPhaseCollision/btPersistentManifold.h" +class btDispatcher; +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "btCollisionCreateFunc.h" + +///For each triangle in the concave mesh that overlaps with the AABB of a convex (m_convexProxy), processTriangle is called. +class btConvexTriangleCallback : public btTriangleCallback +{ + btCollisionObject* m_convexBody; + btCollisionObject* m_triBody; + + btVector3 m_aabbMin; + btVector3 m_aabbMax ; + + btManifoldResult* m_resultOut; + + btDispatcher* m_dispatcher; + const btDispatcherInfo* m_dispatchInfoPtr; + btScalar m_collisionMarginTriangle; + +public: +int m_triangleCount; + + btPersistentManifold* m_manifoldPtr; + + btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); + + void setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual ~btConvexTriangleCallback(); + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); + + void clearCache(); + + inline const btVector3& getAabbMin() const + { + return m_aabbMin; + } + inline const btVector3& getAabbMax() const + { + return m_aabbMax; + } + +}; + + + + +/// btConvexConcaveCollisionAlgorithm supports collision between convex shapes and (concave) trianges meshes. +class btConvexConcaveCollisionAlgorithm : public btCollisionAlgorithm +{ + + bool m_isSwapped; + + btConvexTriangleCallback m_btConvexTriangleCallback; + + +public: + + btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped); + + virtual ~btConvexConcaveCollisionAlgorithm(); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + void clearCache(); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,false); + } + }; + + struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btConvexConcaveCollisionAlgorithm(ci,body0,body1,true); + } + }; + +}; + +#endif //CONVEX_CONCAVE_COLLISION_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp new file mode 100644 index 00000000000..9105fe20b49 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp @@ -0,0 +1,254 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btConvexConvexAlgorithm.h" + +#include +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/CollisionShapes/btBoxShape.h" +#include "BulletCollision/CollisionDispatch/btManifoldResult.h" + +#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" + + + +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" + +#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" + +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" + + + + + + + +btConvexConvexAlgorithm::CreateFunc::CreateFunc() +{ + m_ownsSolvers = true; + m_simplexSolver = new btVoronoiSimplexSolver(); + m_pdSolver = new btGjkEpaPenetrationDepthSolver; +} + +btConvexConvexAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) +{ + m_ownsSolvers = false; + m_simplexSolver = simplexSolver; + m_pdSolver = pdSolver; +} + +btConvexConvexAlgorithm::CreateFunc::~CreateFunc() +{ + if (m_ownsSolvers){ + delete m_simplexSolver; + delete m_pdSolver; + } +} + +btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver) +: btCollisionAlgorithm(ci), +m_gjkPairDetector(0,0,simplexSolver,pdSolver), +m_ownManifold (false), +m_manifoldPtr(mf), +m_lowLevelOfDetail(false) +{ + (void)body0; + (void)body1; + + +} + + + + +btConvexConvexAlgorithm::~btConvexConvexAlgorithm() +{ + if (m_ownManifold) + { + if (m_manifoldPtr) + m_dispatcher->releaseManifold(m_manifoldPtr); + } +} + +void btConvexConvexAlgorithm ::setLowLevelOfDetail(bool useLowLevel) +{ + m_lowLevelOfDetail = useLowLevel; +} + + + + + +// +// Convex-Convex collision algorithm +// +void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + + if (!m_manifoldPtr) + { + //swapped? + m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1); + m_ownManifold = true; + } + resultOut->setPersistentManifold(m_manifoldPtr); + +#ifdef USE_BT_GJKEPA + btConvexShape* shape0(static_cast(body0->getCollisionShape())); + btConvexShape* shape1(static_cast(body1->getCollisionShape())); + const btScalar radialmargin(0/*shape0->getMargin()+shape1->getMargin()*/); + btGjkEpaSolver::sResults results; + if(btGjkEpaSolver::Collide( shape0,body0->getWorldTransform(), + shape1,body1->getWorldTransform(), + radialmargin,results)) + { + dispatchInfo.m_debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); + resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); + } +#else + + btConvexShape* min0 = static_cast(body0->getCollisionShape()); + btConvexShape* min1 = static_cast(body1->getCollisionShape()); + + btGjkPairDetector::ClosestPointInput input; + + //TODO: if (dispatchInfo.m_useContinuous) + m_gjkPairDetector.setMinkowskiA(min0); + m_gjkPairDetector.setMinkowskiB(min1); + input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold(); + input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared; + input.m_stackAlloc = dispatchInfo.m_stackAllocator; + +// input.m_maximumDistanceSquared = btScalar(1e30); + + input.m_transformA = body0->getWorldTransform(); + input.m_transformB = body1->getWorldTransform(); + + m_gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); +#endif + +} + + + +bool disableCcd = false; +btScalar btConvexConvexAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)resultOut; + (void)dispatchInfo; + ///Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold + + ///Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold + ///col0->m_worldTransform, + btScalar resultFraction = btScalar(1.); + + + btScalar squareMot0 = (col0->getInterpolationWorldTransform().getOrigin() - col0->getWorldTransform().getOrigin()).length2(); + btScalar squareMot1 = (col1->getInterpolationWorldTransform().getOrigin() - col1->getWorldTransform().getOrigin()).length2(); + + if (squareMot0 < col0->getCcdSquareMotionThreshold() && + squareMot1 < col1->getCcdSquareMotionThreshold()) + return resultFraction; + + if (disableCcd) + return btScalar(1.); + + + //An adhoc way of testing the Continuous Collision Detection algorithms + //One object is approximated as a sphere, to simplify things + //Starting in penetration should report no time of impact + //For proper CCD, better accuracy and handling of 'allowed' penetration should be added + //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies) + + + /// Convex0 against sphere for Convex1 + { + btConvexShape* convex0 = static_cast(col0->getCollisionShape()); + + btSphereShape sphere1(col1->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation + btConvexCast::CastResult result; + btVoronoiSimplexSolver voronoiSimplex; + //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); + ///Simplification, one object is simplified as a sphere + btGjkConvexCast ccd1( convex0 ,&sphere1,&voronoiSimplex); + //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); + if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(), + col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result)) + { + + //store result.m_fraction in both bodies + + if (col0->getHitFraction()> result.m_fraction) + col0->setHitFraction( result.m_fraction ); + + if (col1->getHitFraction() > result.m_fraction) + col1->setHitFraction( result.m_fraction); + + if (resultFraction > result.m_fraction) + resultFraction = result.m_fraction; + + } + + + + + } + + /// Sphere (for convex0) against Convex1 + { + btConvexShape* convex1 = static_cast(col1->getCollisionShape()); + + btSphereShape sphere0(col0->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation + btConvexCast::CastResult result; + btVoronoiSimplexSolver voronoiSimplex; + //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex); + ///Simplification, one object is simplified as a sphere + btGjkConvexCast ccd1(&sphere0,convex1,&voronoiSimplex); + //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0); + if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(), + col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result)) + { + + //store result.m_fraction in both bodies + + if (col0->getHitFraction() > result.m_fraction) + col0->setHitFraction( result.m_fraction); + + if (col1->getHitFraction() > result.m_fraction) + col1->setHitFraction( result.m_fraction); + + if (resultFraction > result.m_fraction) + resultFraction = result.m_fraction; + + } + } + + return resultFraction; + +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h new file mode 100644 index 00000000000..cbea9a92b75 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h @@ -0,0 +1,76 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONVEX_CONVEX_ALGORITHM_H +#define CONVEX_CONVEX_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../NarrowPhaseCollision/btGjkPairDetector.h" +#include "../NarrowPhaseCollision/btPersistentManifold.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "btCollisionCreateFunc.h" + +class btConvexPenetrationDepthSolver; + +///ConvexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations. +class btConvexConvexAlgorithm : public btCollisionAlgorithm +{ + btGjkPairDetector m_gjkPairDetector; +public: + + bool m_ownManifold; + btPersistentManifold* m_manifoldPtr; + bool m_lowLevelOfDetail; + + +public: + + btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); + + virtual ~btConvexConvexAlgorithm(); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + void setLowLevelOfDetail(bool useLowLevel); + + + const btPersistentManifold* getManifold() + { + return m_manifoldPtr; + } + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + btConvexPenetrationDepthSolver* m_pdSolver; + btSimplexSolverInterface* m_simplexSolver; + bool m_ownsSolvers; + + CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver); + CreateFunc(); + virtual ~CreateFunc(); + + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver); + } + }; + + +}; + +#endif //CONVEX_CONVEX_ALGORITHM_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp new file mode 100644 index 00000000000..936054387c4 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp @@ -0,0 +1,34 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btEmptyCollisionAlgorithm.h" + + + +btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) + : btCollisionAlgorithm(ci) +{ +} + +void btEmptyAlgorithm::processCollision (btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) +{ +} + +btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* ) +{ + return btScalar(1.); +} + + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h new file mode 100644 index 00000000000..b1a193d2cfd --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h @@ -0,0 +1,48 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef EMPTY_ALGORITH +#define EMPTY_ALGORITH +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "btCollisionCreateFunc.h" + +#define ATTRIBUTE_ALIGNED(a) + +///EmptyAlgorithm is a stub for unsupported collision pairs. +///The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a search every frame. +class btEmptyAlgorithm : public btCollisionAlgorithm +{ + +public: + + btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + (void)body0; + (void)body1; + return new btEmptyAlgorithm(ci); + } + }; + +} ATTRIBUTE_ALIGNED(16); + +#endif //EMPTY_ALGORITH diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp new file mode 100644 index 00000000000..490acc0b611 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp @@ -0,0 +1,109 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btManifoldResult.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" + + +///This is to allow MaterialCombiner/Custom Friction/Restitution values +ContactAddedCallback gContactAddedCallback=0; + +///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback; +inline btScalar calculateCombinedFriction(const btCollisionObject* body0,const btCollisionObject* body1) +{ + btScalar friction = body0->getFriction() * body1->getFriction(); + + const btScalar MAX_FRICTION = btScalar(10.); + if (friction < -MAX_FRICTION) + friction = -MAX_FRICTION; + if (friction > MAX_FRICTION) + friction = MAX_FRICTION; + return friction; + +} + +inline btScalar calculateCombinedRestitution(const btCollisionObject* body0,const btCollisionObject* body1) +{ + return body0->getRestitution() * body1->getRestitution(); +} + + + +btManifoldResult::btManifoldResult(btCollisionObject* body0,btCollisionObject* body1) + :m_manifoldPtr(0), + m_body0(body0), + m_body1(body1) +{ + m_rootTransA = body0->getWorldTransform(); + m_rootTransB = body1->getWorldTransform(); +} + + +void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) +{ + assert(m_manifoldPtr); + //order in manifold needs to match + + if (depth > m_manifoldPtr->getContactBreakingThreshold()) + return; + + bool isSwapped = m_manifoldPtr->getBody0() != m_body0; + + btVector3 pointA = pointInWorld + normalOnBInWorld * depth; + + btVector3 localA; + btVector3 localB; + + if (isSwapped) + { + localA = m_rootTransB.invXform(pointA ); + localB = m_rootTransA.invXform(pointInWorld); + } else + { + localA = m_rootTransA.invXform(pointA ); + localB = m_rootTransB.invXform(pointInWorld); + } + + btManifoldPoint newPt(localA,localB,normalOnBInWorld,depth); + + int insertIndex = m_manifoldPtr->getCacheEntry(newPt); + + newPt.m_combinedFriction = calculateCombinedFriction(m_body0,m_body1); + newPt.m_combinedRestitution = calculateCombinedRestitution(m_body0,m_body1); + + //User can override friction and/or restitution + if (gContactAddedCallback && + //and if either of the two bodies requires custom material + ((m_body0->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK) || + (m_body1->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK))) + { + //experimental feature info, for per-triangle material etc. + btCollisionObject* obj0 = isSwapped? m_body1 : m_body0; + btCollisionObject* obj1 = isSwapped? m_body0 : m_body1; + (*gContactAddedCallback)(newPt,obj0,m_partId0,m_index0,obj1,m_partId1,m_index1); + } + + if (insertIndex >= 0) + { + //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex); + m_manifoldPtr->replaceContactPoint(newPt,insertIndex); + } else + { + m_manifoldPtr->AddManifoldPoint(newPt); + } +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h new file mode 100644 index 00000000000..77192625513 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btManifoldResult.h @@ -0,0 +1,77 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef MANIFOLD_RESULT_H +#define MANIFOLD_RESULT_H + +class btCollisionObject; +class btPersistentManifold; +class btManifoldPoint; + +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" + +#include "../../LinearMath/btTransform.h" + +typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1); +extern ContactAddedCallback gContactAddedCallback; + + + +///btManifoldResult is a helper class to manage contact results. +class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result +{ + btPersistentManifold* m_manifoldPtr; + + //we need this for compounds + btTransform m_rootTransA; + btTransform m_rootTransB; + + btCollisionObject* m_body0; + btCollisionObject* m_body1; + int m_partId0; + int m_partId1; + int m_index0; + int m_index1; +public: + + btManifoldResult() + { + } + + btManifoldResult(btCollisionObject* body0,btCollisionObject* body1); + + virtual ~btManifoldResult() {}; + + void setPersistentManifold(btPersistentManifold* manifoldPtr) + { + m_manifoldPtr = manifoldPtr; + } + + virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) + { + m_partId0=partId0; + m_partId1=partId1; + m_index0=index0; + m_index1=index1; + } + + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth); + + + +}; + +#endif //MANIFOLD_RESULT_H diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp new file mode 100644 index 00000000000..ac2e8554c3a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp @@ -0,0 +1,357 @@ + + +#include "LinearMath/btScalar.h" +#include "btSimulationIslandManager.h" +#include "BulletCollision/BroadphaseCollision/btDispatcher.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" + +#include +#include "LinearMath/btQuickprof.h" + +btSimulationIslandManager::btSimulationIslandManager() +{ +} + +btSimulationIslandManager::~btSimulationIslandManager() +{ +} + + +void btSimulationIslandManager::initUnionFind(int n) +{ + m_unionFind.reset(n); +} + + +void btSimulationIslandManager::findUnions(btDispatcher* dispatcher) +{ + + { + for (int i=0;igetNumManifolds();i++) + { + const btPersistentManifold* manifold = dispatcher->getManifoldByIndexInternal(i); + //static objects (invmass btScalar(0.)) don't merge ! + + const btCollisionObject* colObj0 = static_cast(manifold->getBody0()); + const btCollisionObject* colObj1 = static_cast(manifold->getBody1()); + + if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && + ((colObj1) && ((colObj1)->mergesSimulationIslands()))) + { + + m_unionFind.unite((colObj0)->getIslandTag(), + (colObj1)->getIslandTag()); + } + } + } +} + + +void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher) +{ + + initUnionFind( int (colWorld->getCollisionObjectArray().size())); + + // put the index into m_controllers into m_tag + { + + int index = 0; + int i; + for (i=0;igetCollisionObjectArray().size(); i++) + { + btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; + collisionObject->setIslandTag(index); + collisionObject->setCompanionId(-1); + collisionObject->setHitFraction(btScalar(1.)); + index++; + + } + } + // do the union find + + findUnions(dispatcher); + + + +} + + + + +void btSimulationIslandManager::storeIslandActivationState(btCollisionWorld* colWorld) +{ + // put the islandId ('find' value) into m_tag + { + + + int index = 0; + int i; + for (i=0;igetCollisionObjectArray().size();i++) + { + btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; + if (collisionObject->mergesSimulationIslands()) + { + collisionObject->setIslandTag( m_unionFind.find(index) ); + collisionObject->setCompanionId(-1); + } else + { + collisionObject->setIslandTag(-1); + collisionObject->setCompanionId(-2); + } + index++; + } + } +} + +inline int getIslandId(const btPersistentManifold* lhs) +{ + int islandId; + const btCollisionObject* rcolObj0 = static_cast(lhs->getBody0()); + const btCollisionObject* rcolObj1 = static_cast(lhs->getBody1()); + islandId= rcolObj0->getIslandTag()>=0?rcolObj0->getIslandTag():rcolObj1->getIslandTag(); + return islandId; + +} + + + +/// function object that routes calls to operator< +class btPersistentManifoldSortPredicate +{ + public: + + SIMD_FORCE_INLINE bool operator() ( const btPersistentManifold* lhs, const btPersistentManifold* rhs ) + { + return getIslandId(lhs) < getIslandId(rhs); + } +}; + + + + + +// +// todo: this is random access, it can be walked 'cache friendly'! +// +void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback) +{ + + + + /*if (0) + { + int maxNumManifolds = dispatcher->getNumManifolds(); + btCollisionDispatcher* colDis = (btCollisionDispatcher*)dispatcher; + btPersistentManifold** manifold = colDis->getInternalManifoldPointer(); + callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, 0); + return; + } + */ + + + BEGIN_PROFILE("islandUnionFindAndHeapSort"); + + //we are going to sort the unionfind array, and store the element id in the size + //afterwards, we clean unionfind, to make sure no-one uses it anymore + + getUnionFind().sortIslands(); + int numElem = getUnionFind().getNumElements(); + + int endIslandIndex=1; + int startIslandIndex; + + + //update the sleeping state for bodies, if all are sleeping + for ( startIslandIndex=0;startIslandIndexgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) + { + printf("error in island management\n"); + } + + assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + if (colObj0->getIslandTag() == islandId) + { + if (colObj0->getActivationState()== ACTIVE_TAG) + { + allSleeping = false; + } + if (colObj0->getActivationState()== DISABLE_DEACTIVATION) + { + allSleeping = false; + } + } + } + + + if (allSleeping) + { + int idx; + for (idx=startIslandIndex;idxgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) + { + printf("error in island management\n"); + } + + assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + + if (colObj0->getIslandTag() == islandId) + { + colObj0->setActivationState( ISLAND_SLEEPING ); + } + } + } else + { + + int idx; + for (idx=startIslandIndex;idxgetIslandTag() != islandId) && (colObj0->getIslandTag() != -1)) + { + printf("error in island management\n"); + } + + assert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1)); + + if (colObj0->getIslandTag() == islandId) + { + if ( colObj0->getActivationState() == ISLAND_SLEEPING) + { + colObj0->setActivationState( WANTS_DEACTIVATION); + } + } + } + } + } + + btAlignedObjectArray islandmanifold; + int i; + int maxNumManifolds = dispatcher->getNumManifolds(); + islandmanifold.reserve(maxNumManifolds); + + for (i=0;igetManifoldByIndexInternal(i); + + btCollisionObject* colObj0 = static_cast(manifold->getBody0()); + btCollisionObject* colObj1 = static_cast(manifold->getBody1()); + + //todo: check sleeping conditions! + if (((colObj0) && colObj0->getActivationState() != ISLAND_SLEEPING) || + ((colObj1) && colObj1->getActivationState() != ISLAND_SLEEPING)) + { + + //kinematic objects don't merge islands, but wake up all connected objects + if (colObj0->isStaticOrKinematicObject() && colObj0->getActivationState() != ISLAND_SLEEPING) + { + colObj1->activate(); + } + if (colObj1->isStaticOrKinematicObject() && colObj1->getActivationState() != ISLAND_SLEEPING) + { + colObj0->activate(); + } + + //filtering for response + if (dispatcher->needsResponse(colObj0,colObj1)) + islandmanifold.push_back(manifold); + } + } + + int numManifolds = int (islandmanifold.size()); + + // Sort manifolds, based on islands + // Sort the vector using predicate and std::sort + //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate); + + //we should do radix sort, it it much faster (O(n) instead of O (n log2(n)) + islandmanifold.heapSort(btPersistentManifoldSortPredicate()); + + //now process all active islands (sets of manifolds for now) + + int startManifoldIndex = 0; + int endManifoldIndex = 1; + + //int islandId; + + END_PROFILE("islandUnionFindAndHeapSort"); + + btAlignedObjectArray islandBodies; + + + //traverse the simulation islands, and call the solver, unless all objects are sleeping/deactivated + for ( startIslandIndex=0;startIslandIndexisActive()) + islandSleeping = true; + } + + + //find the accompanying contact manifold for this islandId + int numIslandManifolds = 0; + btPersistentManifold** startManifold = 0; + + if (startManifoldIndexProcessIsland(&islandBodies[0],islandBodies.size(),startManifold,numIslandManifolds, islandId); + } + + if (numIslandManifolds) + { + startManifoldIndex = endManifoldIndex; + } + + islandBodies.resize(0); + } + + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h new file mode 100644 index 00000000000..d91ed1c20eb --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h @@ -0,0 +1,61 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SIMULATION_ISLAND_MANAGER_H +#define SIMULATION_ISLAND_MANAGER_H + +#include "../CollisionDispatch/btUnionFind.h" +#include "btCollisionCreateFunc.h" + +class btCollisionObject; +class btCollisionWorld; +class btDispatcher; + +///SimulationIslandManager creates and handles simulation islands, using btUnionFind +class btSimulationIslandManager +{ + btUnionFind m_unionFind; + +public: + btSimulationIslandManager(); + virtual ~btSimulationIslandManager(); + + + void initUnionFind(int n); + + + btUnionFind& getUnionFind() { return m_unionFind;} + + virtual void updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher); + virtual void storeIslandActivationState(btCollisionWorld* world); + + + void findUnions(btDispatcher* dispatcher); + + + + struct IslandCallback + { + virtual ~IslandCallback() {}; + + virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,class btPersistentManifold** manifolds,int numManifolds, int islandId) = 0; + }; + + void buildAndProcessIslands(btDispatcher* dispatcher,btCollisionObjectArray& collisionObjects, IslandCallback* callback); + +}; + +#endif //SIMULATION_ISLAND_MANAGER_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp new file mode 100644 index 00000000000..05556bd34e2 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp @@ -0,0 +1,249 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btSphereBoxCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionShapes/btBoxShape.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +//#include + +btSphereBoxCollisionAlgorithm::btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped) +: btCollisionAlgorithm(ci), +m_ownManifold(false), +m_manifoldPtr(mf), +m_isSwapped(isSwapped) +{ + btCollisionObject* sphereObj = m_isSwapped? col1 : col0; + btCollisionObject* boxObj = m_isSwapped? col0 : col1; + + if (!m_manifoldPtr && m_dispatcher->needsCollision(sphereObj,boxObj)) + { + m_manifoldPtr = m_dispatcher->getNewManifold(sphereObj,boxObj); + m_ownManifold = true; + } +} + + +btSphereBoxCollisionAlgorithm::~btSphereBoxCollisionAlgorithm() +{ + if (m_ownManifold) + { + if (m_manifoldPtr) + m_dispatcher->releaseManifold(m_manifoldPtr); + } +} + + + +void btSphereBoxCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)dispatchInfo; + (void)resultOut; + if (!m_manifoldPtr) + return; + + btCollisionObject* sphereObj = m_isSwapped? body1 : body0; + btCollisionObject* boxObj = m_isSwapped? body0 : body1; + + + btSphereShape* sphere0 = (btSphereShape*)sphereObj->getCollisionShape(); + + btVector3 normalOnSurfaceB; + btVector3 pOnBox,pOnSphere; + btVector3 sphereCenter = sphereObj->getWorldTransform().getOrigin(); + btScalar radius = sphere0->getRadius(); + + btScalar dist = getSphereDistance(boxObj,pOnBox,pOnSphere,sphereCenter,radius); + + if (dist < SIMD_EPSILON) + { + btVector3 normalOnSurfaceB = (pOnBox- pOnSphere).normalize(); + + /// report a contact. internally this will be kept persistent, and contact reduction is done + + resultOut->setPersistentManifold(m_manifoldPtr); + resultOut->addContactPoint(normalOnSurfaceB,pOnBox,dist); + + } + + + +} + +btScalar btSphereBoxCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)resultOut; + (void)dispatchInfo; + (void)col0; + (void)col1; + + //not yet + return btScalar(1.); +} + + +btScalar btSphereBoxCollisionAlgorithm::getSphereDistance(btCollisionObject* boxObj, btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius ) +{ + + btScalar margins; + btVector3 bounds[2]; + btBoxShape* boxShape= (btBoxShape*)boxObj->getCollisionShape(); + + bounds[0] = -boxShape->getHalfExtents(); + bounds[1] = boxShape->getHalfExtents(); + + margins = boxShape->getMargin();//also add sphereShape margin? + + const btTransform& m44T = boxObj->getWorldTransform(); + + btVector3 boundsVec[2]; + btScalar fPenetration; + + boundsVec[0] = bounds[0]; + boundsVec[1] = bounds[1]; + + btVector3 marginsVec( margins, margins, margins ); + + // add margins + bounds[0] += marginsVec; + bounds[1] -= marginsVec; + + ///////////////////////////////////////////////// + + btVector3 tmp, prel, n[6], normal, v3P; + btScalar fSep = btScalar(10000000.0), fSepThis; + + n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) ); + n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) ); + n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) ); + n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) ); + n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) ); + n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) ); + + // convert point in local space + prel = m44T.invXform( sphereCenter); + + bool bFound = false; + + v3P = prel; + + for (int i=0;i<6;i++) + { + int j = i<3? 0:1; + if ( (fSepThis = ((v3P-bounds[j]) .dot(n[i]))) > btScalar(0.0) ) + { + v3P = v3P - n[i]*fSepThis; + bFound = true; + } + } + + // + + if ( bFound ) + { + bounds[0] = boundsVec[0]; + bounds[1] = boundsVec[1]; + + normal = (prel - v3P).normalize(); + pointOnBox = v3P + normal*margins; + v3PointOnSphere = prel - normal*fRadius; + + if ( ((v3PointOnSphere - pointOnBox) .dot (normal)) > btScalar(0.0) ) + { + return btScalar(1.0); + } + + // transform back in world space + tmp = m44T( pointOnBox); + pointOnBox = tmp; + tmp = m44T( v3PointOnSphere); + v3PointOnSphere = tmp; + btScalar fSeps2 = (pointOnBox-v3PointOnSphere).length2(); + + //if this fails, fallback into deeper penetration case, below + if (fSeps2 > SIMD_EPSILON) + { + fSep = - btSqrt(fSeps2); + normal = (pointOnBox-v3PointOnSphere); + normal *= btScalar(1.)/fSep; + } + + return fSep; + } + + ////////////////////////////////////////////////// + // Deep penetration case + + fPenetration = getSpherePenetration( boxObj,pointOnBox, v3PointOnSphere, sphereCenter, fRadius,bounds[0],bounds[1] ); + + bounds[0] = boundsVec[0]; + bounds[1] = boundsVec[1]; + + if ( fPenetration <= btScalar(0.0) ) + return (fPenetration-margins); + else + return btScalar(1.0); +} + +btScalar btSphereBoxCollisionAlgorithm::getSpherePenetration( btCollisionObject* boxObj,btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax) +{ + + btVector3 bounds[2]; + + bounds[0] = aabbMin; + bounds[1] = aabbMax; + + btVector3 p0, tmp, prel, n[6], normal; + btScalar fSep = btScalar(-10000000.0), fSepThis; + + n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) ); + n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) ); + n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) ); + n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) ); + n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) ); + n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) ); + + const btTransform& m44T = boxObj->getWorldTransform(); + + // convert point in local space + prel = m44T.invXform( sphereCenter); + + /////////// + + for (int i=0;i<6;i++) + { + int j = i<3 ? 0:1; + if ( (fSepThis = ((prel-bounds[j]) .dot( n[i]))-fRadius) > btScalar(0.0) ) return btScalar(1.0); + if ( fSepThis > fSep ) + { + p0 = bounds[j]; normal = (btVector3&)n[i]; + fSep = fSepThis; + } + } + + pointOnBox = prel - normal*(normal.dot((prel-p0))); + v3PointOnSphere = pointOnBox + normal*fSep; + + // transform back in world space + tmp = m44T( pointOnBox); + pointOnBox = tmp; + tmp = m44T( v3PointOnSphere); v3PointOnSphere = tmp; + normal = (pointOnBox-v3PointOnSphere).normalize(); + + return fSep; + +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h new file mode 100644 index 00000000000..07592909200 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h @@ -0,0 +1,64 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SPHERE_BOX_COLLISION_ALGORITHM_H +#define SPHERE_BOX_COLLISION_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../CollisionDispatch/btCollisionCreateFunc.h" +class btPersistentManifold; +#include "../../LinearMath/btVector3.h" + +/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection. +/// Other features are frame-coherency (persistent data) and collision response. +class btSphereBoxCollisionAlgorithm : public btCollisionAlgorithm +{ + bool m_ownManifold; + btPersistentManifold* m_manifoldPtr; + bool m_isSwapped; + +public: + + btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped); + + virtual ~btSphereBoxCollisionAlgorithm(); + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + btScalar getSphereDistance( btCollisionObject* boxObj,btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius ); + + btScalar getSpherePenetration( btCollisionObject* boxObj, btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + if (!m_swapped) + { + return new btSphereBoxCollisionAlgorithm(0,ci,body0,body1,false); + } else + { + return new btSphereBoxCollisionAlgorithm(0,ci,body0,body1,true); + } + } + }; + +}; + +#endif //SPHERE_BOX_COLLISION_ALGORITHM_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp new file mode 100644 index 00000000000..424ff432f84 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp @@ -0,0 +1,85 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btSphereSphereCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" + +btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1) +: btCollisionAlgorithm(ci), +m_ownManifold(false), +m_manifoldPtr(mf) +{ + if (!m_manifoldPtr) + { + m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1); + m_ownManifold = true; + } +} + +btSphereSphereCollisionAlgorithm::~btSphereSphereCollisionAlgorithm() +{ + if (m_ownManifold) + { + if (m_manifoldPtr) + m_dispatcher->releaseManifold(m_manifoldPtr); + } +} + +void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)dispatchInfo; + + if (!m_manifoldPtr) + return; + + btSphereShape* sphere0 = (btSphereShape*)col0->getCollisionShape(); + btSphereShape* sphere1 = (btSphereShape*)col1->getCollisionShape(); + + btVector3 diff = col0->getWorldTransform().getOrigin()- col1->getWorldTransform().getOrigin(); + btScalar len = diff.length(); + btScalar radius0 = sphere0->getRadius(); + btScalar radius1 = sphere1->getRadius(); + + ///iff distance positive, don't generate a new contact + if ( len > (radius0+radius1)) + return; + + ///distance (negative means penetration) + btScalar dist = len - (radius0+radius1); + + btVector3 normalOnSurfaceB = diff / len; + ///point on A (worldspace) + btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB; + ///point on B (worldspace) + btVector3 pos1 = col1->getWorldTransform().getOrigin() + radius1* normalOnSurfaceB; + + /// report a contact. internally this will be kept persistent, and contact reduction is done + resultOut->setPersistentManifold(m_manifoldPtr); + resultOut->addContactPoint(normalOnSurfaceB,pos1,dist); + +} + +btScalar btSphereSphereCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)col0; + (void)col1; + (void)dispatchInfo; + (void)resultOut; + + //not yet + return btScalar(1.); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h new file mode 100644 index 00000000000..7a19ff31edf --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h @@ -0,0 +1,56 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SPHERE_SPHERE_COLLISION_ALGORITHM_H +#define SPHERE_SPHERE_COLLISION_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../CollisionDispatch/btCollisionCreateFunc.h" +class btPersistentManifold; + +/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. +/// Other features are frame-coherency (persistent data) and collision response. +/// Also provides the most basic sample for custom/user btCollisionAlgorithm +class btSphereSphereCollisionAlgorithm : public btCollisionAlgorithm +{ + bool m_ownManifold; + btPersistentManifold* m_manifoldPtr; + +public: + btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1); + + btSphereSphereCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) + : btCollisionAlgorithm(ci) {} + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + + virtual ~btSphereSphereCollisionAlgorithm(); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + return new btSphereSphereCollisionAlgorithm(0,ci,body0,body1); + } + }; + +}; + +#endif //SPHERE_SPHERE_COLLISION_ALGORITHM_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp new file mode 100644 index 00000000000..b011b707e3f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp @@ -0,0 +1,76 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btSphereTriangleCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" +#include "SphereTriangleDetector.h" + + +btSphereTriangleCollisionAlgorithm::btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1,bool swapped) +: btCollisionAlgorithm(ci), +m_ownManifold(false), +m_manifoldPtr(mf), +m_swapped(swapped) +{ + if (!m_manifoldPtr) + { + m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1); + m_ownManifold = true; + } +} + +btSphereTriangleCollisionAlgorithm::~btSphereTriangleCollisionAlgorithm() +{ + if (m_ownManifold) + { + if (m_manifoldPtr) + m_dispatcher->releaseManifold(m_manifoldPtr); + } +} + +void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + if (!m_manifoldPtr) + return; + + btSphereShape* sphere = (btSphereShape*)col0->getCollisionShape(); + btTriangleShape* triangle = (btTriangleShape*)col1->getCollisionShape(); + + /// report a contact. internally this will be kept persistent, and contact reduction is done + resultOut->setPersistentManifold(m_manifoldPtr); + SphereTriangleDetector detector(sphere,triangle); + + btDiscreteCollisionDetectorInterface::ClosestPointInput input; + input.m_maximumDistanceSquared = btScalar(1e30);//todo: tighter bounds + input.m_transformA = col0->getWorldTransform(); + input.m_transformB = col1->getWorldTransform(); + + detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw); + +} + +btScalar btSphereTriangleCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) +{ + (void)resultOut; + (void)dispatchInfo; + (void)col0; + (void)col1; + + //not yet + return btScalar(1.); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h new file mode 100644 index 00000000000..57c6e6af619 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h @@ -0,0 +1,59 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SPHERE_TRIANGLE_COLLISION_ALGORITHM_H +#define SPHERE_TRIANGLE_COLLISION_ALGORITHM_H + +#include "../BroadphaseCollision/btCollisionAlgorithm.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../CollisionDispatch/btCollisionCreateFunc.h" +class btPersistentManifold; + +/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection. +/// Other features are frame-coherency (persistent data) and collision response. +/// Also provides the most basic sample for custom/user btCollisionAlgorithm +class btSphereTriangleCollisionAlgorithm : public btCollisionAlgorithm +{ + bool m_ownManifold; + btPersistentManifold* m_manifoldPtr; + bool m_swapped; + +public: + btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool swapped); + + btSphereTriangleCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) + : btCollisionAlgorithm(ci) {} + + virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut); + + + virtual ~btSphereTriangleCollisionAlgorithm(); + + struct CreateFunc :public btCollisionAlgorithmCreateFunc + { + + virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1) + { + + return new btSphereTriangleCollisionAlgorithm(ci.m_manifold,ci,body0,body1,m_swapped); + } + }; + +}; + +#endif //SPHERE_TRIANGLE_COLLISION_ALGORITHM_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp new file mode 100644 index 00000000000..62254335796 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionDispatch/btUnionFind.cpp @@ -0,0 +1,83 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btUnionFind.h" +#include + + + +btUnionFind::~btUnionFind() +{ + Free(); + +} + +btUnionFind::btUnionFind() +{ + +} + +void btUnionFind::allocate(int N) +{ + m_elements.resize(N); +} +void btUnionFind::Free() +{ + m_elements.clear(); +} + + +void btUnionFind::reset(int N) +{ + allocate(N); + + for (int i = 0; i < N; i++) + { + m_elements[i].m_id = i; m_elements[i].m_sz = 1; + } +} + + +class btUnionFindElementSortPredicate +{ + public: + + bool operator() ( const btElement& lhs, const btElement& rhs ) + { + return lhs.m_id < rhs.m_id; + } +}; + +///this is a special operation, destroying the content of btUnionFind. +///it sorts the elements, based on island id, in order to make it easy to iterate over islands +void btUnionFind::sortIslands() +{ + + //first store the original body index, and islandId + int numElements = m_elements.size(); + + for (int i=0;i m_elements; + + public: + + btUnionFind(); + ~btUnionFind(); + + + //this is a special operation, destroying the content of btUnionFind. + //it sorts the elements, based on island id, in order to make it easy to iterate over islands + void sortIslands(); + + void reset(int N); + + inline int getNumElements() const + { + return int(m_elements.size()); + } + inline bool isRoot(int x) const + { + return (x == m_elements[x].m_id); + } + + btElement& getElement(int index) + { + return m_elements[index]; + } + const btElement& getElement(int index) const + { + return m_elements[index]; + } + + void allocate(int N); + void Free(); + + + + + int find(int p, int q) + { + return (find(p) == find(q)); + } + + void unite(int p, int q) + { + int i = find(p), j = find(q); + if (i == j) + return; + +#ifndef USE_PATH_COMPRESSION + //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) ) + if (m_elements[i].m_sz < m_elements[j].m_sz) + { + m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz; + } + else + { + m_elements[j].m_id = i; m_elements[i].m_sz += m_elements[j].m_sz; + } +#else + m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz; +#endif //USE_PATH_COMPRESSION + } + + int find(int x) + { + //assert(x < m_N); + //assert(x >= 0); + + while (x != m_elements[x].m_id) + { + //not really a reason not to use path compression, and it flattens the trees/improves find performance dramatically + + #ifdef USE_PATH_COMPRESSION + // + m_elements[x].m_id = m_elements[m_elements[x].m_id].m_id; + #endif // + x = m_elements[x].m_id; + //assert(x < m_N); + //assert(x >= 0); + + } + return x; + } + + + }; + + +#endif //UNION_FIND_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp new file mode 100644 index 00000000000..636b0046c13 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp @@ -0,0 +1,57 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btBoxShape.h" + +btVector3 btBoxShape::getHalfExtents() const +{ + return m_implicitShapeDimensions * m_localScaling; +} +//{ + + +void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const +{ + btVector3 halfExtents = getHalfExtents(); + + btMatrix3x3 abs_b = t.getBasis().absolute(); + btPoint3 center = t.getOrigin(); + btVector3 extent = btVector3(abs_b[0].dot(halfExtents), + abs_b[1].dot(halfExtents), + abs_b[2].dot(halfExtents)); + extent += btVector3(getMargin(),getMargin(),getMargin()); + + aabbMin = center - extent; + aabbMax = center + extent; + + +} + + +void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + //btScalar margin = btScalar(0.); + btVector3 halfExtents = getHalfExtents(); + + btScalar lx=btScalar(2.)*(halfExtents.x()); + btScalar ly=btScalar(2.)*(halfExtents.y()); + btScalar lz=btScalar(2.)*(halfExtents.z()); + + inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz), + mass/(btScalar(12.0)) * (lx*lx + lz*lz), + mass/(btScalar(12.0)) * (lx*lx + ly*ly)); + +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h new file mode 100644 index 00000000000..bc42f146c7c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.h @@ -0,0 +1,293 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef OBB_BOX_MINKOWSKI_H +#define OBB_BOX_MINKOWSKI_H + +#include "btPolyhedralConvexShape.h" +#include "btCollisionMargin.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" +#include "../../LinearMath/btPoint3.h" +#include "../../LinearMath/btSimdMinMax.h" + +///btBoxShape implements both a feature based (vertex/edge/plane) and implicit (getSupportingVertex) Box +class btBoxShape: public btPolyhedralConvexShape +{ + + //btVector3 m_boxHalfExtents1; //use m_implicitShapeDimensions instead + + +public: + + btVector3 getHalfExtents() const; + + virtual int getShapeType() const { return BOX_SHAPE_PROXYTYPE;} + + virtual btVector3 localGetSupportingVertex(const btVector3& vec) const + { + + btVector3 halfExtents = getHalfExtents(); + + btVector3 supVertex; + supVertex = btPoint3(vec.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), + vec.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), + vec.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); + + return supVertex; + } + + virtual inline btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const + { + btVector3 halfExtents = getHalfExtents(); + btVector3 margin(getMargin(),getMargin(),getMargin()); + halfExtents -= margin; + + return btVector3(vec.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), + vec.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), + vec.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); + } + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const + { + btVector3 halfExtents = getHalfExtents(); + btVector3 margin(getMargin(),getMargin(),getMargin()); + halfExtents -= margin; + + + for (int i=0;i>1)) - halfExtents.y() * ((i&2)>>1), + halfExtents.z() * (1-((i&4)>>2)) - halfExtents.z() * ((i&4)>>2)); + } + + + virtual void getPlaneEquation(btVector4& plane,int i) const + { + btVector3 halfExtents = getHalfExtents(); + + switch (i) + { + case 0: + plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.)); + plane[3] = -halfExtents.x(); + break; + case 1: + plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.)); + plane[3] = -halfExtents.x(); + break; + case 2: + plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.)); + plane[3] = -halfExtents.y(); + break; + case 3: + plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.)); + plane[3] = -halfExtents.y(); + break; + case 4: + plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.)); + plane[3] = -halfExtents.z(); + break; + case 5: + plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); + plane[3] = -halfExtents.z(); + break; + default: + assert(0); + } + } + + + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const + //virtual void getEdge(int i,Edge& edge) const + { + int edgeVert0 = 0; + int edgeVert1 = 0; + + switch (i) + { + case 0: + edgeVert0 = 0; + edgeVert1 = 1; + break; + case 1: + edgeVert0 = 0; + edgeVert1 = 2; + break; + case 2: + edgeVert0 = 1; + edgeVert1 = 3; + + break; + case 3: + edgeVert0 = 2; + edgeVert1 = 3; + break; + case 4: + edgeVert0 = 0; + edgeVert1 = 4; + break; + case 5: + edgeVert0 = 1; + edgeVert1 = 5; + + break; + case 6: + edgeVert0 = 2; + edgeVert1 = 6; + break; + case 7: + edgeVert0 = 3; + edgeVert1 = 7; + break; + case 8: + edgeVert0 = 4; + edgeVert1 = 5; + break; + case 9: + edgeVert0 = 4; + edgeVert1 = 6; + break; + case 10: + edgeVert0 = 5; + edgeVert1 = 7; + break; + case 11: + edgeVert0 = 6; + edgeVert1 = 7; + break; + default: + btAssert(0); + + } + + getVertex(edgeVert0,pa ); + getVertex(edgeVert1,pb ); + } + + + + + + virtual bool isInside(const btPoint3& pt,btScalar tolerance) const + { + btVector3 halfExtents = getHalfExtents(); + + //btScalar minDist = 2*tolerance; + + bool result = (pt.x() <= (halfExtents.x()+tolerance)) && + (pt.x() >= (-halfExtents.x()-tolerance)) && + (pt.y() <= (halfExtents.y()+tolerance)) && + (pt.y() >= (-halfExtents.y()-tolerance)) && + (pt.z() <= (halfExtents.z()+tolerance)) && + (pt.z() >= (-halfExtents.z()-tolerance)); + + return result; + } + + + //debugging + virtual char* getName()const + { + return "Box"; + } + + virtual int getNumPreferredPenetrationDirections() const + { + return 6; + } + + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const + { + switch (index) + { + case 0: + penetrationVector.setValue(btScalar(1.),btScalar(0.),btScalar(0.)); + break; + case 1: + penetrationVector.setValue(btScalar(-1.),btScalar(0.),btScalar(0.)); + break; + case 2: + penetrationVector.setValue(btScalar(0.),btScalar(1.),btScalar(0.)); + break; + case 3: + penetrationVector.setValue(btScalar(0.),btScalar(-1.),btScalar(0.)); + break; + case 4: + penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(1.)); + break; + case 5: + penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(-1.)); + break; + default: + assert(0); + } + } + +}; + +#endif //OBB_BOX_MINKOWSKI_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp new file mode 100644 index 00000000000..8da554ef14d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp @@ -0,0 +1,173 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +//#define DISABLE_BVH + +#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btOptimizedBvh.h" + + +///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. +///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. +btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression) +:btTriangleMeshShape(meshInterface),m_useQuantizedAabbCompression(useQuantizedAabbCompression) +{ + //construct bvh from meshInterface +#ifndef DISABLE_BVH + + m_bvh = new btOptimizedBvh(); + btVector3 bvhAabbMin,bvhAabbMax; + meshInterface->calculateAabbBruteForce(bvhAabbMin,bvhAabbMax); + m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + +#endif //DISABLE_BVH + +} + +btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax) +:btTriangleMeshShape(meshInterface),m_useQuantizedAabbCompression(useQuantizedAabbCompression) +{ + //construct bvh from meshInterface +#ifndef DISABLE_BVH + + m_bvh = new btOptimizedBvh(); + m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax); + +#endif //DISABLE_BVH + +} + +void btBvhTriangleMeshShape::partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax) +{ + m_bvh->refitPartial( m_meshInterface,aabbMin,aabbMax ); + + m_localAabbMin.setMin(aabbMin); + m_localAabbMax.setMax(aabbMax); +} + + +void btBvhTriangleMeshShape::refitTree() +{ + m_bvh->refit( m_meshInterface ); + + recalcLocalAabb(); +} + +btBvhTriangleMeshShape::~btBvhTriangleMeshShape() +{ + delete m_bvh; +} + +//perform bvh tree traversal and report overlapping triangles to 'callback' +void btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + +#ifdef DISABLE_BVH + //brute force traverse all triangles + btTriangleMeshShape::processAllTriangles(callback,aabbMin,aabbMax); +#else + + //first get all the nodes + + + struct MyNodeOverlapCallback : public btNodeOverlapCallback + { + btStridingMeshInterface* m_meshInterface; + btTriangleCallback* m_callback; + btVector3 m_triangle[3]; + + + MyNodeOverlapCallback(btTriangleCallback* callback,btStridingMeshInterface* meshInterface) + :m_meshInterface(meshInterface), + m_callback(callback) + { + } + + virtual void processNode(int nodeSubPart, int nodeTriangleIndex) + { + const unsigned char *vertexbase; + int numverts; + PHY_ScalarType type; + int stride; + const unsigned char *indexbase; + int indexstride; + int numfaces; + PHY_ScalarType indicestype; + + + m_meshInterface->getLockedReadOnlyVertexIndexBase( + &vertexbase, + numverts, + type, + stride, + &indexbase, + indexstride, + numfaces, + indicestype, + nodeSubPart); + + int* gfxbase = (int*)(indexbase+nodeTriangleIndex*indexstride); + + const btVector3& meshScaling = m_meshInterface->getScaling(); + for (int j=2;j>=0;j--) + { + + int graphicsindex = gfxbase[j]; + + +#ifdef DEBUG_TRIANGLE_MESH + printf("%d ,",graphicsindex); +#endif //DEBUG_TRIANGLE_MESH + btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); + + m_triangle[j] = btVector3( + graphicsbase[0]*meshScaling.getX(), + graphicsbase[1]*meshScaling.getY(), + graphicsbase[2]*meshScaling.getZ()); +#ifdef DEBUG_TRIANGLE_MESH + printf("triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z()); +#endif //DEBUG_TRIANGLE_MESH + } + + m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex); + m_meshInterface->unLockReadOnlyVertexBase(nodeSubPart); + } + + }; + + MyNodeOverlapCallback myNodeCallback(callback,m_meshInterface); + + m_bvh->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax); + + +#endif//DISABLE_BVH + + +} + + +void btBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling) +{ + if ((getLocalScaling() -scaling).length2() > SIMD_EPSILON) + { + btTriangleMeshShape::setLocalScaling(scaling); + delete m_bvh; + ///m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work + m_bvh = new btOptimizedBvh(); + //rebuild the bvh... + m_bvh->build(m_meshInterface,m_useQuantizedAabbCompression,m_localAabbMin,m_localAabbMax); + + } +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h new file mode 100644 index 00000000000..4914d9f959c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h @@ -0,0 +1,75 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BVH_TRIANGLE_MESH_SHAPE_H +#define BVH_TRIANGLE_MESH_SHAPE_H + +#include "btTriangleMeshShape.h" +#include "btOptimizedBvh.h" + +///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. +///Uses an interface to access the triangles to allow for sharing graphics/physics triangles. +ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape +{ + + btOptimizedBvh* m_bvh; + bool m_useQuantizedAabbCompression; + bool m_pad[12];////need padding due to alignment + +public: + + btBvhTriangleMeshShape() :btTriangleMeshShape(0) {}; + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression); + + ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb + btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax); + + virtual ~btBvhTriangleMeshShape(); + + + /* + virtual int getShapeType() const + { + return TRIANGLE_MESH_SHAPE_PROXYTYPE; + } + */ + + + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + void refitTree(); + + ///for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks + void partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax); + + //debugging + virtual char* getName()const {return "BVHTRIANGLEMESH";} + + + virtual void setLocalScaling(const btVector3& scaling); + + btOptimizedBvh* getOptimizedBvh() + { + return m_bvh; + } + bool usesQuantizedAabbCompression() const + { + return m_useQuantizedAabbCompression; + } +} +; + +#endif //BVH_TRIANGLE_MESH_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp new file mode 100644 index 00000000000..b7e15172da2 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp @@ -0,0 +1,146 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btCapsuleShape.h" + +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" +#include "LinearMath/btQuaternion.h" + +btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) +{ + m_implicitShapeDimensions.setValue(radius,0.5f*height,radius); +} + + + btVector3 btCapsuleShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const +{ + + btVector3 supVec(0,0,0); + + btScalar maxDot(btScalar(-1e30)); + + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + + btVector3 vtx; + btScalar newDot; + + btScalar radius = getRadius(); + + + { + btVector3 pos(0,getHalfHeight(),0); + vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); + newDot = vec.dot(vtx); + if (newDot > maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + { + btVector3 pos(0,-getHalfHeight(),0); + vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); + newDot = vec.dot(vtx); + if (newDot > maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + + return supVec; + +} + + void btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + + + btScalar radius = getRadius(); + + for (int j=0;j maxDot) + { + maxDot = newDot; + supportVerticesOut[j] = vtx; + } + } + { + btVector3 pos(0,-getHalfHeight(),0); + vtx = pos +vec*m_localScaling*(radius) - vec * getMargin(); + newDot = vec.dot(vtx); + if (newDot > maxDot) + { + maxDot = newDot; + supportVerticesOut[j] = vtx; + } + } + + } +} + + +void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + //as an approximation, take the inertia of the box that bounds the spheres + + btTransform ident; + ident.setIdentity(); + + + btScalar radius = getRadius(); + + btVector3 halfExtents(radius,radius+getHalfHeight(),radius); + + btScalar margin = CONVEX_DISTANCE_MARGIN; + + btScalar lx=btScalar(2.)*(halfExtents[0]+margin); + btScalar ly=btScalar(2.)*(halfExtents[1]+margin); + btScalar lz=btScalar(2.)*(halfExtents[2]+margin); + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(.08333333); + + inertia[0] = scaledmass * (y2+z2); + inertia[1] = scaledmass * (x2+z2); + inertia[2] = scaledmass * (x2+y2); + +} + + + + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h new file mode 100644 index 00000000000..27da8adefa5 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h @@ -0,0 +1,60 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_CAPSULE_SHAPE_H +#define BT_CAPSULE_SHAPE_H + +#include "btConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types + + +///btCapsuleShape represents a capsule around the Y axis +///A more general solution that can represent capsules is the btMultiSphereShape +class btCapsuleShape : public btConvexShape +{ + +public: + btCapsuleShape(btScalar radius,btScalar height); + + ///CollisionShape Interface + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + /// btConvexShape Interface + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + virtual int getShapeType() const { return CAPSULE_SHAPE_PROXYTYPE; } + + virtual char* getName()const + { + return "CapsuleShape"; + } + + btScalar getRadius() const + { + return m_implicitShapeDimensions.getX(); + } + + btScalar getHalfHeight() const + { + return m_implicitShapeDimensions.getY(); + } + +}; + + + +#endif //BT_CAPSULE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h new file mode 100644 index 00000000000..4730264d3df --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionMargin.h @@ -0,0 +1,26 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_MARGIN_H +#define COLLISION_MARGIN_H + +//used by Gjk and some other algorithms + +#define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar(0.01) + + + +#endif //COLLISION_MARGIN_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp new file mode 100644 index 00000000000..81d82428f4c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.cpp @@ -0,0 +1,85 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "BulletCollision/CollisionShapes/btCollisionShape.h" + + +/* + Make sure this dummy function never changes so that it + can be used by probes that are checking whether the + library is actually installed. +*/ +extern "C" void btBulletCollisionProbe () {} + + + +void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) const +{ + btTransform tr; + tr.setIdentity(); + btVector3 aabbMin,aabbMax; + + getAabb(tr,aabbMin,aabbMax); + + radius = (aabbMax-aabbMin).length()*btScalar(0.5); + center = (aabbMin+aabbMax)*btScalar(0.5); +} + +btScalar btCollisionShape::getAngularMotionDisc() const +{ + btVector3 center; + btScalar disc; + getBoundingSphere(center,disc); + disc += (center).length(); + return disc; +} + +void btCollisionShape::calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) +{ + //start with static aabb + getAabb(curTrans,temporalAabbMin,temporalAabbMax); + + btScalar temporalAabbMaxx = temporalAabbMax.getX(); + btScalar temporalAabbMaxy = temporalAabbMax.getY(); + btScalar temporalAabbMaxz = temporalAabbMax.getZ(); + btScalar temporalAabbMinx = temporalAabbMin.getX(); + btScalar temporalAabbMiny = temporalAabbMin.getY(); + btScalar temporalAabbMinz = temporalAabbMin.getZ(); + + // add linear motion + btVector3 linMotion = linvel*timeStep; + //todo: simd would have a vector max/min operation, instead of per-element access + if (linMotion.x() > btScalar(0.)) + temporalAabbMaxx += linMotion.x(); + else + temporalAabbMinx += linMotion.x(); + if (linMotion.y() > btScalar(0.)) + temporalAabbMaxy += linMotion.y(); + else + temporalAabbMiny += linMotion.y(); + if (linMotion.z() > btScalar(0.)) + temporalAabbMaxz += linMotion.z(); + else + temporalAabbMinz += linMotion.z(); + + //add conservative angular motion + btScalar angularMotion = angvel.length() * getAngularMotionDisc() * timeStep; + btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion); + temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz); + temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz); + + temporalAabbMin -= angularMotion3d; + temporalAabbMax += angularMotion3d; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h new file mode 100644 index 00000000000..96268734a83 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCollisionShape.h @@ -0,0 +1,94 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COLLISION_SHAPE_H +#define COLLISION_SHAPE_H + +#include "../../LinearMath/btTransform.h" +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btMatrix3x3.h" +#include "../../LinearMath/btPoint3.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" //for the shape types + +///btCollisionShape provides interface for collision shapes that can be shared among btCollisionObjects. +class btCollisionShape +{ +public: + + btCollisionShape() + { + } + virtual ~btCollisionShape() + { + } + + ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t. + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0; + + virtual void getBoundingSphere(btVector3& center,btScalar& radius) const; + + ///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations. + virtual btScalar getAngularMotionDisc() const; + + + ///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep) + ///result is conservative + void calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax); + +#ifndef __SPU__ + + inline bool isPolyhedral() const + { + return btBroadphaseProxy::isPolyhedral(getShapeType()); + } + + inline bool isConvex() const + { + return btBroadphaseProxy::isConvex(getShapeType()); + } + inline bool isConcave() const + { + return btBroadphaseProxy::isConcave(getShapeType()); + } + inline bool isCompound() const + { + return btBroadphaseProxy::isCompound(getShapeType()); + } + + ///isInfinite is used to catch simulation error (aabb check) + inline bool isInfinite() const + { + return btBroadphaseProxy::isInfinite(getShapeType()); + } + + virtual int getShapeType() const=0; + virtual void setLocalScaling(const btVector3& scaling) =0; + virtual const btVector3& getLocalScaling() const =0; + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) = 0; + + +//debugging support + virtual char* getName()const =0 ; +#endif //__SPU__ + + + + virtual void setMargin(btScalar margin) = 0; + virtual btScalar getMargin() const = 0; + +}; + +#endif //COLLISION_SHAPE_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp new file mode 100644 index 00000000000..a4712b3e925 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.cpp @@ -0,0 +1,100 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btCompoundShape.h" + + +#include "btCollisionShape.h" + + +btCompoundShape::btCompoundShape() +:m_localAabbMin(btScalar(1e30),btScalar(1e30),btScalar(1e30)), +m_localAabbMax(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)), +m_aabbTree(0), +m_collisionMargin(btScalar(0.)), +m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)) +{ +} + + +btCompoundShape::~btCompoundShape() +{ +} + +void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisionShape* shape) +{ + m_childTransforms.push_back(localTransform); + m_childShapes.push_back(shape); + + //extend the local aabbMin/aabbMax + btVector3 localAabbMin,localAabbMax; + shape->getAabb(localTransform,localAabbMin,localAabbMax); + for (int i=0;i<3;i++) + { + if (m_localAabbMin[i] > localAabbMin[i]) + { + m_localAabbMin[i] = localAabbMin[i]; + } + if (m_localAabbMax[i] < localAabbMax[i]) + { + m_localAabbMax[i] = localAabbMax[i]; + } + + } +} + + + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version +void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const +{ + btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); + btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); + + btMatrix3x3 abs_b = trans.getBasis().absolute(); + + btPoint3 center = trans(localCenter); + + btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), + abs_b[1].dot(localHalfExtents), + abs_b[2].dot(localHalfExtents)); + extent += btVector3(getMargin(),getMargin(),getMargin()); + + aabbMin = center - extent; + aabbMax = center + extent; +} + +void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + //approximation: take the inertia from the aabb for now + btTransform ident; + ident.setIdentity(); + btVector3 aabbMin,aabbMax; + getAabb(ident,aabbMin,aabbMax); + + btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5); + + btScalar lx=btScalar(2.)*(halfExtents.x()); + btScalar ly=btScalar(2.)*(halfExtents.y()); + btScalar lz=btScalar(2.)*(halfExtents.z()); + + inertia[0] = mass/(btScalar(12.0)) * (ly*ly + lz*lz); + inertia[1] = mass/(btScalar(12.0)) * (lx*lx + lz*lz); + inertia[2] = mass/(btScalar(12.0)) * (lx*lx + ly*ly); + +} + + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h new file mode 100644 index 00000000000..86dc1f80947 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCompoundShape.h @@ -0,0 +1,117 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef COMPOUND_SHAPE_H +#define COMPOUND_SHAPE_H + +#include "btCollisionShape.h" + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransform.h" +#include "../../LinearMath/btMatrix3x3.h" +#include "btCollisionMargin.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +class btOptimizedBvh; + +/// btCompoundShape allows to store multiple other btCollisionShapes +/// This allows for concave collision objects. This is more general then the Static Concave btTriangleMeshShape. +class btCompoundShape : public btCollisionShape +{ + btAlignedObjectArray m_childTransforms; + btAlignedObjectArray m_childShapes; + btVector3 m_localAabbMin; + btVector3 m_localAabbMax; + + btOptimizedBvh* m_aabbTree; + +public: + btCompoundShape(); + + virtual ~btCompoundShape(); + + void addChildShape(const btTransform& localTransform,btCollisionShape* shape); + + int getNumChildShapes() const + { + return int (m_childShapes.size()); + } + + btCollisionShape* getChildShape(int index) + { + return m_childShapes[index]; + } + const btCollisionShape* getChildShape(int index) const + { + return m_childShapes[index]; + } + + btTransform& getChildTransform(int index) + { + return m_childTransforms[index]; + } + const btTransform& getChildTransform(int index) const + { + return m_childTransforms[index]; + } + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + + virtual void setLocalScaling(const btVector3& scaling) + { + m_localScaling = scaling; + } + virtual const btVector3& getLocalScaling() const + { + return m_localScaling; + } + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + virtual int getShapeType() const { return COMPOUND_SHAPE_PROXYTYPE;} + + virtual void setMargin(btScalar margin) + { + m_collisionMargin = margin; + } + virtual btScalar getMargin() const + { + return m_collisionMargin; + } + virtual char* getName()const + { + return "Compound"; + } + + //this is optional, but should make collision queries faster, by culling non-overlapping nodes + void createAabbTreeFromChildren(); + + const btOptimizedBvh* getAabbTree() const + { + return m_aabbTree; + } + +private: + btScalar m_collisionMargin; +protected: + btVector3 m_localScaling; + +}; + + + +#endif //COMPOUND_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp new file mode 100644 index 00000000000..5103500a012 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.cpp @@ -0,0 +1,28 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btConcaveShape.h" + +btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.)) +{ + +} + +btConcaveShape::~btConcaveShape() +{ + +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h new file mode 100644 index 00000000000..73f974e4ee9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConcaveShape.h @@ -0,0 +1,50 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONCAVE_SHAPE_H +#define CONCAVE_SHAPE_H + +#include "btCollisionShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "btTriangleCallback.h" + + +///Concave shape proves an interface concave shapes that can produce triangles that overlapping a given AABB. +///Static triangle mesh, infinite plane, height field/landscapes are example that implement this interface. +class btConcaveShape : public btCollisionShape +{ +protected: + btScalar m_collisionMargin; + +public: + btConcaveShape(); + + virtual ~btConcaveShape(); + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const = 0; + + virtual btScalar getMargin() const { + return m_collisionMargin; + } + virtual void setMargin(btScalar collisionMargin) + { + m_collisionMargin = collisionMargin; + } + + + +}; + +#endif //CONCAVE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp new file mode 100644 index 00000000000..207b3024bc3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConeShape.cpp @@ -0,0 +1,133 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btConeShape.h" +#include "LinearMath/btPoint3.h" + + + +btConeShape::btConeShape (btScalar radius,btScalar height): +m_radius (radius), +m_height(height) +{ + setConeUpIndex(1); + btVector3 halfExtents; + m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height)); +} + +btConeShapeZ::btConeShapeZ (btScalar radius,btScalar height): +btConeShape(radius,height) +{ + setConeUpIndex(2); +} + +btConeShapeX::btConeShapeX (btScalar radius,btScalar height): +btConeShape(radius,height) +{ + setConeUpIndex(0); +} + +///choose upAxis index +void btConeShape::setConeUpIndex(int upIndex) +{ + switch (upIndex) + { + case 0: + m_coneIndices[0] = 1; + m_coneIndices[1] = 0; + m_coneIndices[2] = 2; + break; + case 1: + m_coneIndices[0] = 0; + m_coneIndices[1] = 1; + m_coneIndices[2] = 2; + break; + case 2: + m_coneIndices[0] = 0; + m_coneIndices[1] = 2; + m_coneIndices[2] = 1; + break; + default: + assert(0); + }; +} + +btVector3 btConeShape::coneLocalSupport(const btVector3& v) const +{ + + btScalar halfHeight = m_height * btScalar(0.5); + + if (v[m_coneIndices[1]] > v.length() * m_sinAngle) + { + btVector3 tmp; + + tmp[m_coneIndices[0]] = btScalar(0.); + tmp[m_coneIndices[1]] = halfHeight; + tmp[m_coneIndices[2]] = btScalar(0.); + return tmp; + } + else { + btScalar s = btSqrt(v[m_coneIndices[0]] * v[m_coneIndices[0]] + v[m_coneIndices[2]] * v[m_coneIndices[2]]); + if (s > SIMD_EPSILON) { + btScalar d = m_radius / s; + btVector3 tmp; + tmp[m_coneIndices[0]] = v[m_coneIndices[0]] * d; + tmp[m_coneIndices[1]] = -halfHeight; + tmp[m_coneIndices[2]] = v[m_coneIndices[2]] * d; + return tmp; + } + else { + btVector3 tmp; + tmp[m_coneIndices[0]] = btScalar(0.); + tmp[m_coneIndices[1]] = -halfHeight; + tmp[m_coneIndices[2]] = btScalar(0.); + return tmp; + } + } + +} + +btVector3 btConeShape::localGetSupportingVertexWithoutMargin(const btVector3& vec) const +{ + return coneLocalSupport(vec); +} + +void btConeShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + for (int i=0;i maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + return supVec; +} + +void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + btScalar newDot; + //use 'w' component of supportVerticesOut? + { + for (int i=0;i supportVerticesOut[j][3]) + { + //WARNING: don't swap next lines, the w component would get overwritten! + supportVerticesOut[j] = vtx; + supportVerticesOut[j][3] = newDot; + } + } + } + + + +} + + + +btVector3 btConvexHullShape::localGetSupportingVertex(const btVector3& vec)const +{ + btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); + + if ( getMargin()!=btScalar(0.) ) + { + btVector3 vecnorm = vec; + if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + vecnorm.normalize(); + supVertex+= getMargin() * vecnorm; + } + return supVertex; +} + + + + + + + + + +//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection +//Please note that you can debug-draw btConvexHullShape with the Raytracer Demo +int btConvexHullShape::getNumVertices() const +{ + return m_points.size(); +} + +int btConvexHullShape::getNumEdges() const +{ + return m_points.size(); +} + +void btConvexHullShape::getEdge(int i,btPoint3& pa,btPoint3& pb) const +{ + + int index0 = i%m_points.size(); + int index1 = (i+1)%m_points.size(); + pa = m_points[index0]*m_localScaling; + pb = m_points[index1]*m_localScaling; +} + +void btConvexHullShape::getVertex(int i,btPoint3& vtx) const +{ + vtx = m_points[i]*m_localScaling; +} + +int btConvexHullShape::getNumPlanes() const +{ + return 0; +} + +void btConvexHullShape::getPlane(btVector3& ,btPoint3& ,int ) const +{ + + btAssert(0); +} + +//not yet +bool btConvexHullShape::isInside(const btPoint3& ,btScalar ) const +{ + assert(0); + return false; +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h new file mode 100644 index 00000000000..3fd5e382525 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexHullShape.h @@ -0,0 +1,76 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONVEX_HULL_SHAPE_H +#define CONVEX_HULL_SHAPE_H + +#include "btPolyhedralConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types +#include "../../LinearMath/btAlignedObjectArray.h" + +///ConvexHullShape implements an implicit (getSupportingVertex) Convex Hull of a Point Cloud (vertices) +///No connectivity is needed. localGetSupportingVertex iterates linearly though all vertices. +///on modern hardware, due to cache coherency this isn't that bad. Complex algorithms tend to trash the cash. +///(memory is much slower then the cpu) +ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexShape +{ + btAlignedObjectArray m_points; + +public: + + + ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. + ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. + ///btConvexHullShape make an internal copy of the points. + btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btPoint3)); + + void addPoint(const btPoint3& point); + + btPoint3* getPoints() + { + return &m_points[0]; + } + + int getNumPoints() + { + return m_points.size(); + } + + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + + virtual int getShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; } + + //debugging + virtual char* getName()const {return "Convex";} + + + virtual int getNumVertices() const; + virtual int getNumEdges() const; + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; + virtual void getVertex(int i,btPoint3& vtx) const; + virtual int getNumPlanes() const; + virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const; + virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; + + + +}; + + +#endif //CONVEX_HULL_SHAPE_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp new file mode 100644 index 00000000000..7edf1ea6db8 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.cpp @@ -0,0 +1,77 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btConvexShape.h" + + +btConvexShape::btConvexShape() +: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)), +m_collisionMargin(CONVEX_DISTANCE_MARGIN) +{ +} + + +void btConvexShape::setLocalScaling(const btVector3& scaling) +{ + m_localScaling = scaling; +} + + + +void btConvexShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVector3&maxAabb) const +{ + + btScalar margin = getMargin(); + for (int i=0;i<3;i++) + { + btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); + vec[i] = btScalar(1.); + + btVector3 sv = localGetSupportingVertex(vec*trans.getBasis()); + + btVector3 tmp = trans(sv); + maxAabb[i] = tmp[i]+margin; + vec[i] = btScalar(-1.); + tmp = trans(localGetSupportingVertex(vec*trans.getBasis())); + minAabb[i] = tmp[i]-margin; + } +}; + + +btVector3 btConvexShape::localGetSupportingVertex(const btVector3& vec)const +{ +#ifndef __SPU__ + + btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); + + if ( getMargin()!=btScalar(0.) ) + { + btVector3 vecnorm = vec; + if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + vecnorm.normalize(); + supVertex+= getMargin() * vecnorm; + } + return supVertex; + +#else + return btVector3(0,0,0); +#endif //__SPU__ + + } + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h new file mode 100644 index 00000000000..746f383dfc7 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexShape.h @@ -0,0 +1,127 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONVEX_SHAPE_INTERFACE1 +#define CONVEX_SHAPE_INTERFACE1 + +#include "btCollisionShape.h" + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransform.h" +#include "../../LinearMath/btMatrix3x3.h" +#include "btCollisionMargin.h" + +//todo: get rid of this btConvexCastResult thing! +struct btConvexCastResult; +#define MAX_PREFERRED_PENETRATION_DIRECTIONS 10 + +/// btConvexShape is an abstract shape interface. +/// The explicit part provides plane-equations, the implicit part provides GetClosestPoint interface. +/// used in combination with GJK or btConvexCast +ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape +{ + +protected: + + //local scaling. collisionMargin is not scaled ! + btVector3 m_localScaling; + + btVector3 m_implicitShapeDimensions; + + btScalar m_collisionMargin; + + btScalar m_padding[2]; + + + + +public: + btConvexShape(); + + virtual ~btConvexShape() + { + + } + + + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; +#ifndef __SPU__ + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0; + + //notice that the vectors should be unit length + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0; +#endif //#ifndef __SPU__ + + const btVector3& getImplicitShapeDimensions() const + { + return m_implicitShapeDimensions; + } + + ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version + void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const + { + getAabbSlow(t,aabbMin,aabbMax); + } + + + + virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + + virtual void setLocalScaling(const btVector3& scaling); + virtual const btVector3& getLocalScaling() const + { + return m_localScaling; + } + + const btVector3& getLocalScalingNV() const + { + return m_localScaling; + } + + virtual void setMargin(btScalar margin) + { + m_collisionMargin = margin; + } + virtual btScalar getMargin() const + { + return m_collisionMargin; + } + + btScalar getMarginNV() const + { + return m_collisionMargin; + } + + virtual int getNumPreferredPenetrationDirections() const + { + return 0; + } + + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const + { + (void)penetrationVector; + (void)index; + btAssert(0); + } + + + +} +; + + + +#endif //CONVEX_SHAPE_INTERFACE1 diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp new file mode 100644 index 00000000000..6941030b15f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp @@ -0,0 +1,205 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#include "btConvexTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" + +#include "LinearMath/btQuaternion.h" +#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h" + + +btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface) +:m_stridingMesh(meshInterface) +{ + recalcLocalAabb(); +} + + + + +///It's not nice to have all this virtual function overhead, so perhaps we can also gather the points once +///but then we are duplicating +class LocalSupportVertexCallback: public btInternalTriangleIndexCallback +{ + + btVector3 m_supportVertexLocal; +public: + + btScalar m_maxDot; + btVector3 m_supportVecLocal; + + LocalSupportVertexCallback(const btVector3& supportVecLocal) + : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), + m_maxDot(btScalar(-1e30)), + m_supportVecLocal(supportVecLocal) + { + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + (void)triangleIndex; + (void)partId; + + for (int i=0;i<3;i++) + { + btScalar dot = m_supportVecLocal.dot(triangle[i]); + if (dot > m_maxDot) + { + m_maxDot = dot; + m_supportVertexLocal = triangle[i]; + } + } + } + + btVector3 GetSupportVertexLocal() + { + return m_supportVertexLocal; + } + +}; + + + + + +btVector3 btConvexTriangleMeshShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const +{ + btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.)); + + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + + LocalSupportVertexCallback supportCallback(vec); + btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); + supVec = supportCallback.GetSupportVertexLocal(); + + return supVec; +} + +void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + //use 'w' component of supportVerticesOut? + { + for (int i=0;iInternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax); + supportVerticesOut[j] = supportCallback.GetSupportVertexLocal(); + } + +} + + + +btVector3 btConvexTriangleMeshShape::localGetSupportingVertex(const btVector3& vec)const +{ + btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec); + + if ( getMargin()!=btScalar(0.) ) + { + btVector3 vecnorm = vec; + if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON)) + { + vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.)); + } + vecnorm.normalize(); + supVertex+= getMargin() * vecnorm; + } + return supVertex; +} + + + + + + + + + +//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection +//Please note that you can debug-draw btConvexTriangleMeshShape with the Raytracer Demo +int btConvexTriangleMeshShape::getNumVertices() const +{ + //cache this? + return 0; + +} + +int btConvexTriangleMeshShape::getNumEdges() const +{ + return 0; +} + +void btConvexTriangleMeshShape::getEdge(int ,btPoint3& ,btPoint3& ) const +{ + btAssert(0); +} + +void btConvexTriangleMeshShape::getVertex(int ,btPoint3& ) const +{ + btAssert(0); +} + +int btConvexTriangleMeshShape::getNumPlanes() const +{ + return 0; +} + +void btConvexTriangleMeshShape::getPlane(btVector3& ,btPoint3& ,int ) const +{ + btAssert(0); +} + +//not yet +bool btConvexTriangleMeshShape::isInside(const btPoint3& ,btScalar ) const +{ + btAssert(0); + return false; +} + + + +void btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling) +{ + m_stridingMesh->setScaling(scaling); + + recalcLocalAabb(); + +} + + +const btVector3& btConvexTriangleMeshShape::getLocalScaling() const +{ + return m_stridingMesh->getScaling(); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h new file mode 100644 index 00000000000..34ee7af744c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h @@ -0,0 +1,51 @@ +#ifndef CONVEX_TRIANGLEMESH_SHAPE_H +#define CONVEX_TRIANGLEMESH_SHAPE_H + + +#include "btPolyhedralConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types + + +/// btConvexTriangleMeshShape is a convex hull of a triangle mesh. If you just have a point cloud, you can use btConvexHullShape instead. +/// It uses the btStridingMeshInterface instead of a point cloud. This can avoid the duplication of the triangle mesh data. +class btConvexTriangleMeshShape : public btPolyhedralConvexShape +{ + + class btStridingMeshInterface* m_stridingMesh; + +public: + btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface); + + class btStridingMeshInterface* getStridingMesh() + { + return m_stridingMesh; + } + + virtual btVector3 localGetSupportingVertex(const btVector3& vec)const; + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + virtual int getShapeType()const { return CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; } + + //debugging + virtual char* getName()const {return "ConvexTrimesh";} + + virtual int getNumVertices() const; + virtual int getNumEdges() const; + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; + virtual void getVertex(int i,btPoint3& vtx) const; + virtual int getNumPlanes() const; + virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const; + virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; + + + virtual void setLocalScaling(const btVector3& scaling); + virtual const btVector3& getLocalScaling() const; + +}; + + + +#endif //CONVEX_TRIANGLEMESH_SHAPE_H + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp new file mode 100644 index 00000000000..1666afb3b88 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btCylinderShape.cpp @@ -0,0 +1,206 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#include "btCylinderShape.h" +#include "LinearMath/btPoint3.h" + +btCylinderShape::btCylinderShape (const btVector3& halfExtents) +:btBoxShape(halfExtents), +m_upAxis(1) +{ + recalcLocalAabb(); +} + + +btCylinderShapeX::btCylinderShapeX (const btVector3& halfExtents) +:btCylinderShape(halfExtents) +{ + m_upAxis = 0; + recalcLocalAabb(); +} + + +btCylinderShapeZ::btCylinderShapeZ (const btVector3& halfExtents) +:btCylinderShape(halfExtents) +{ + m_upAxis = 2; + recalcLocalAabb(); +} + +void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const +{ + //skip the box 'getAabb' + btPolyhedralConvexShape::getAabb(t,aabbMin,aabbMax); +} + + +inline btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v) +{ +const int cylinderUpAxis = 0; +const int XX = 1; +const int YY = 0; +const int ZZ = 2; + + //mapping depends on how cylinder local orientation is + // extents of the cylinder is: X,Y is for radius, and Z for height + + + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; + + + btVector3 tmp; + btScalar d ; + + btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); + if (s != btScalar(0.0)) + { + d = radius / s; + tmp[XX] = v[XX] * d; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = v[ZZ] * d; + return tmp; + } + else + { + tmp[XX] = radius; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = btScalar(0.0); + return tmp; + } + + +} + + + + + + +inline btVector3 CylinderLocalSupportY(const btVector3& halfExtents,const btVector3& v) +{ + +const int cylinderUpAxis = 1; +const int XX = 0; +const int YY = 1; +const int ZZ = 2; + + + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; + + + btVector3 tmp; + btScalar d ; + + btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); + if (s != btScalar(0.0)) + { + d = radius / s; + tmp[XX] = v[XX] * d; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = v[ZZ] * d; + return tmp; + } + else + { + tmp[XX] = radius; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = btScalar(0.0); + return tmp; + } + +} + +inline btVector3 CylinderLocalSupportZ(const btVector3& halfExtents,const btVector3& v) +{ +const int cylinderUpAxis = 2; +const int XX = 0; +const int YY = 2; +const int ZZ = 1; + + //mapping depends on how cylinder local orientation is + // extents of the cylinder is: X,Y is for radius, and Z for height + + + btScalar radius = halfExtents[XX]; + btScalar halfHeight = halfExtents[cylinderUpAxis]; + + + btVector3 tmp; + btScalar d ; + + btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]); + if (s != btScalar(0.0)) + { + d = radius / s; + tmp[XX] = v[XX] * d; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = v[ZZ] * d; + return tmp; + } + else + { + tmp[XX] = radius; + tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight; + tmp[ZZ] = btScalar(0.0); + return tmp; + } + + +} + +btVector3 btCylinderShapeX::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + return CylinderLocalSupportX(getHalfExtents(),vec); +} + + +btVector3 btCylinderShapeZ::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + return CylinderLocalSupportZ(getHalfExtents(),vec); +} +btVector3 btCylinderShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + return CylinderLocalSupportY(getHalfExtents(),vec); +} + +void btCylinderShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + for (int i=0;i=0); + btAssert(y>=0); + btAssert(xstartX) + startX = quantizedAabbMin[1]; + if (quantizedAabbMax[1]startJ) + startJ = quantizedAabbMin[2]; + if (quantizedAabbMax[2]startX) + startX = quantizedAabbMin[0]; + if (quantizedAabbMax[0]startJ) + startJ = quantizedAabbMin[2]; + if (quantizedAabbMax[2]startX) + startX = quantizedAabbMin[0]; + if (quantizedAabbMax[0]startJ) + startJ = quantizedAabbMin[1]; + if (quantizedAabbMax[1]processTriangle(vertices,x,j); + //second triangle + getVertex(x,j,vertices[0]); + getVertex(x+1,j+1,vertices[1]); + getVertex(x,j+1,vertices[2]); + callback->processTriangle(vertices,x,j); + } else + { + //first triangle + getVertex(x,j,vertices[0]); + getVertex(x,j+1,vertices[1]); + getVertex(x+1,j,vertices[2]); + callback->processTriangle(vertices,x,j); + //second triangle + getVertex(x+1,j,vertices[0]); + getVertex(x,j+1,vertices[1]); + getVertex(x+1,j+1,vertices[2]); + callback->processTriangle(vertices,x,j); + } + } + } + + + +} + +void btHeightfieldTerrainShape::calculateLocalInertia(btScalar ,btVector3& inertia) +{ + //moving concave objects not supported + + inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); +} + +void btHeightfieldTerrainShape::setLocalScaling(const btVector3& scaling) +{ + m_localScaling = scaling; +} +const btVector3& btHeightfieldTerrainShape::getLocalScaling() const +{ + return m_localScaling; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h new file mode 100644 index 00000000000..49f3e106733 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h @@ -0,0 +1,88 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef HEIGHTFIELD_TERRAIN_SHAPE_H +#define HEIGHTFIELD_TERRAIN_SHAPE_H + +#include "btConcaveShape.h" + +///btHeightfieldTerrainShape simulates a 2D heightfield terrain +class btHeightfieldTerrainShape : public btConcaveShape +{ +protected: + btVector3 m_localAabbMin; + btVector3 m_localAabbMax; + + ///terrain data + int m_width; + int m_length; + btScalar m_maxHeight; + union + { + unsigned char* m_heightfieldDataUnsignedChar; + btScalar* m_heightfieldDataFloat; + void* m_heightfieldDataUnknown; + }; + + bool m_useFloatData; + bool m_flipQuadEdges; + bool m_useDiamondSubdivision; + + int m_upAxis; + + btVector3 m_localScaling; + + virtual btScalar getHeightFieldValue(int x,int y) const; + void quantizeWithClamp(int* out, const btVector3& point) const; + void getVertex(int x,int y,btVector3& vertex) const; + + inline bool testQuantizedAabbAgainstQuantizedAabb(int* aabbMin1, int* aabbMax1,const int* aabbMin2,const int* aabbMax2) const + { + bool overlap = true; + overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; + overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; + overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; + return overlap; + } + +public: + btHeightfieldTerrainShape(int width,int height,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges); + + virtual ~btHeightfieldTerrainShape(); + + + void setUseDiamondSubdivision(bool useDiamondSubdivision=true) { m_useDiamondSubdivision = useDiamondSubdivision;} + + virtual int getShapeType() const + { + return TERRAIN_SHAPE_PROXYTYPE; + } + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + virtual void setLocalScaling(const btVector3& scaling); + + virtual const btVector3& getLocalScaling() const; + + //debugging + virtual char* getName()const {return "HEIGHTFIELD";} + +}; + +#endif //HEIGHTFIELD_TERRAIN_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp new file mode 100644 index 00000000000..015314bc09f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp @@ -0,0 +1,57 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btMinkowskiSumShape.h" + + +btMinkowskiSumShape::btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB) +:m_shapeA(shapeA), +m_shapeB(shapeB) +{ + m_transA.setIdentity(); + m_transB.setIdentity(); +} + +btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + btVector3 supVertexA = m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(vec*m_transA.getBasis())); + btVector3 supVertexB = m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(vec*m_transB.getBasis())); + return supVertexA + supVertexB; +} + +void btMinkowskiSumShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + //todo: could make recursive use of batching. probably this shape is not used frequently. + for (int i=0;igetMargin() + m_shapeB->getMargin(); +} + + +void btMinkowskiSumShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + (void)mass; + btAssert(0); + inertia.setValue(0,0,0); +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h new file mode 100644 index 00000000000..198faaff9f9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h @@ -0,0 +1,62 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef MINKOWSKI_SUM_SHAPE_H +#define MINKOWSKI_SUM_SHAPE_H + +#include "btConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types + +/// btMinkowskiSumShape represents implicit (getSupportingVertex) based minkowski sum of two convex implicit shapes. +class btMinkowskiSumShape : public btConvexShape +{ + + btTransform m_transA; + btTransform m_transB; + const btConvexShape* m_shapeA; + const btConvexShape* m_shapeB; + +public: + + btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB); + + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + void setTransformA(const btTransform& transA) { m_transA = transA;} + void setTransformB(const btTransform& transB) { m_transB = transB;} + + const btTransform& getTransformA()const { return m_transA;} + const btTransform& GetTransformB()const { return m_transB;} + + + virtual int getShapeType() const { return MINKOWSKI_SUM_SHAPE_PROXYTYPE; } + + virtual btScalar getMargin() const; + + const btConvexShape* getShapeA() const { return m_shapeA;} + const btConvexShape* getShapeB() const { return m_shapeB;} + + virtual char* getName()const + { + return "MinkowskiSum"; + } +}; + +#endif //MINKOWSKI_SUM_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp new file mode 100644 index 00000000000..6015a618082 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp @@ -0,0 +1,148 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btMultiSphereShape.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" +#include "LinearMath/btQuaternion.h" + +btMultiSphereShape::btMultiSphereShape (const btVector3& inertiaHalfExtents,const btVector3* positions,const btScalar* radi,int numSpheres) +:m_inertiaHalfExtents(inertiaHalfExtents) +{ + btScalar startMargin = btScalar(1e30); + + m_numSpheres = numSpheres; + for (int i=0;i maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + + return supVec; + +} + + void btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + + for (int j=0;j maxDot) + { + maxDot = newDot; + supportVerticesOut[j] = vtx; + } + } + } +} + + + + + + + + +void btMultiSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + //as an approximation, take the inertia of the box that bounds the spheres + + btTransform ident; + ident.setIdentity(); +// btVector3 aabbMin,aabbMax; + +// getAabb(ident,aabbMin,aabbMax); + + btVector3 halfExtents = m_inertiaHalfExtents;//(aabbMax - aabbMin)* btScalar(0.5); + + btScalar margin = CONVEX_DISTANCE_MARGIN; + + btScalar lx=btScalar(2.)*(halfExtents[0]+margin); + btScalar ly=btScalar(2.)*(halfExtents[1]+margin); + btScalar lz=btScalar(2.)*(halfExtents[2]+margin); + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(.08333333); + + inertia[0] = scaledmass * (y2+z2); + inertia[1] = scaledmass * (x2+z2); + inertia[2] = scaledmass * (x2+y2); + +} + + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h new file mode 100644 index 00000000000..1897b474057 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btMultiSphereShape.h @@ -0,0 +1,74 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef MULTI_SPHERE_MINKOWSKI_H +#define MULTI_SPHERE_MINKOWSKI_H + +#include "btConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types + +#define MAX_NUM_SPHERES 5 + +///btMultiSphereShape represents implicit convex hull of a collection of spheres (using getSupportingVertex) +class btMultiSphereShape : public btConvexShape + +{ + + btVector3 m_localPositions[MAX_NUM_SPHERES]; + btScalar m_radi[MAX_NUM_SPHERES]; + btVector3 m_inertiaHalfExtents; + + int m_numSpheres; + + + + +public: + btMultiSphereShape (const btVector3& inertiaHalfExtents,const btVector3* positions,const btScalar* radi,int numSpheres); + + ///CollisionShape Interface + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + /// btConvexShape Interface + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + int getSphereCount() const + { + return m_numSpheres; + } + + const btVector3& getSpherePosition(int index) const + { + return m_localPositions[index]; + } + + btScalar getSphereRadius(int index) const + { + return m_radi[index]; + } + + virtual int getShapeType() const { return MULTI_SPHERE_SHAPE_PROXYTYPE; } + + virtual char* getName()const + { + return "MultiSphere"; + } + +}; + + +#endif //MULTI_SPHERE_MINKOWSKI_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp new file mode 100644 index 00000000000..44438a24455 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp @@ -0,0 +1,845 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btOptimizedBvh.h" +#include "btStridingMeshInterface.h" +#include "LinearMath/btAabbUtil2.h" +#include "LinearMath/btIDebugDraw.h" + + + +btOptimizedBvh::btOptimizedBvh() : m_useQuantization(false), + m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY) + //m_traversalMode(TRAVERSAL_STACKLESS) + //m_traversalMode(TRAVERSAL_RECURSIVE) +{ + +} + + +void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax) +{ + m_useQuantization = useQuantizedAabbCompression; + + + // NodeArray triangleNodes; + + struct NodeTriangleCallback : public btInternalTriangleIndexCallback + { + + NodeArray& m_triangleNodes; + + NodeTriangleCallback& operator=(NodeTriangleCallback& other) + { + m_triangleNodes = other.m_triangleNodes; + return *this; + } + + NodeTriangleCallback(NodeArray& triangleNodes) + :m_triangleNodes(triangleNodes) + { + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + btOptimizedBvhNode node; + btVector3 aabbMin,aabbMax; + aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + aabbMin.setMin(triangle[0]); + aabbMax.setMax(triangle[0]); + aabbMin.setMin(triangle[1]); + aabbMax.setMax(triangle[1]); + aabbMin.setMin(triangle[2]); + aabbMax.setMax(triangle[2]); + + //with quantization? + node.m_aabbMinOrg = aabbMin; + node.m_aabbMaxOrg = aabbMax; + + node.m_escapeIndex = -1; + + //for child nodes + node.m_subPart = partId; + node.m_triangleIndex = triangleIndex; + m_triangleNodes.push_back(node); + } + }; + struct QuantizedNodeTriangleCallback : public btInternalTriangleIndexCallback + { + QuantizedNodeArray& m_triangleNodes; + const btOptimizedBvh* m_optimizedTree; // for quantization + + QuantizedNodeTriangleCallback& operator=(QuantizedNodeTriangleCallback& other) + { + m_triangleNodes = other.m_triangleNodes; + m_optimizedTree = other.m_optimizedTree; + return *this; + } + + QuantizedNodeTriangleCallback(QuantizedNodeArray& triangleNodes,const btOptimizedBvh* tree) + :m_triangleNodes(triangleNodes),m_optimizedTree(tree) + { + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + btAssert(partId==0); + //negative indices are reserved for escapeIndex + btAssert(triangleIndex>=0); + + btQuantizedBvhNode node; + btVector3 aabbMin,aabbMax; + aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + aabbMin.setMin(triangle[0]); + aabbMax.setMax(triangle[0]); + aabbMin.setMin(triangle[1]); + aabbMax.setMax(triangle[1]); + aabbMin.setMin(triangle[2]); + aabbMax.setMax(triangle[2]); + + m_optimizedTree->quantizeWithClamp(&node.m_quantizedAabbMin[0],aabbMin); + m_optimizedTree->quantizeWithClamp(&node.m_quantizedAabbMax[0],aabbMax); + + node.m_escapeIndexOrTriangleIndex = triangleIndex; + + m_triangleNodes.push_back(node); + } + }; + + + + int numLeafNodes = 0; + + + if (m_useQuantization) + { + + //initialize quantization values + setQuantizationValues(bvhAabbMin,bvhAabbMax); + + QuantizedNodeTriangleCallback callback(m_quantizedLeafNodes,this); + + + triangles->InternalProcessAllTriangles(&callback,m_bvhAabbMin,m_bvhAabbMax); + + //now we have an array of leafnodes in m_leafNodes + numLeafNodes = m_quantizedLeafNodes.size(); + + + m_quantizedContiguousNodes.resize(2*numLeafNodes); + + + } else + { + NodeTriangleCallback callback(m_leafNodes); + + btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + + triangles->InternalProcessAllTriangles(&callback,aabbMin,aabbMax); + + //now we have an array of leafnodes in m_leafNodes + numLeafNodes = m_leafNodes.size(); + + m_contiguousNodes.resize(2*numLeafNodes); + } + + m_curNodeIndex = 0; + + buildTree(0,numLeafNodes); + + ///if the entire tree is small then subtree size, we need to create a header info for the tree + if(m_useQuantization && !m_SubtreeHeaders.size()) + { + btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); + subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[0]); + subtree.m_rootNodeIndex = 0; + subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex(); + } +} + + + +void btOptimizedBvh::refitPartial(btStridingMeshInterface* meshInterface,const btVector3& aabbMin,const btVector3& aabbMax) +{ + //incrementally initialize quantization values + btAssert(m_useQuantization); + + btAssert(aabbMin.getX() > m_bvhAabbMin.getX()); + btAssert(aabbMin.getY() > m_bvhAabbMin.getY()); + btAssert(aabbMin.getZ() > m_bvhAabbMin.getZ()); + + btAssert(aabbMax.getX() < m_bvhAabbMax.getX()); + btAssert(aabbMax.getY() < m_bvhAabbMax.getY()); + btAssert(aabbMax.getZ() < m_bvhAabbMax.getZ()); + + ///we should update all quantization values, using updateBvhNodes(meshInterface); + ///but we only update chunks that overlap the given aabb + + unsigned short quantizedQueryAabbMin[3]; + unsigned short quantizedQueryAabbMax[3]; + + quantizeWithClamp(&quantizedQueryAabbMin[0],aabbMin); + quantizeWithClamp(&quantizedQueryAabbMax[0],aabbMax); + + int i; + for (i=0;im_SubtreeHeaders.size();i++) + { + btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; + + bool overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); + if (overlap) + { + updateBvhNodes(meshInterface,subtree.m_rootNodeIndex,subtree.m_rootNodeIndex+subtree.m_subtreeSize,i); + + subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]); + } + } + +} + +///just for debugging, to visualize the individual patches/subtrees +#ifdef DEBUG_PATCH_COLORS +btVector3 color[4]= +{ + btVector3(255,0,0), + btVector3(0,255,0), + btVector3(0,0,255), + btVector3(0,255,255) +}; +#endif //DEBUG_PATCH_COLORS + + +void btOptimizedBvh::updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index) +{ + (void)index; + + btAssert(m_useQuantization); + + int nodeSubPart=0; + + //get access info to trianglemesh data + const unsigned char *vertexbase; + int numverts; + PHY_ScalarType type; + int stride; + const unsigned char *indexbase; + int indexstride; + int numfaces; + PHY_ScalarType indicestype; + meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,nodeSubPart); + + btVector3 triangleVerts[3]; + btVector3 aabbMin,aabbMax; + const btVector3& meshScaling = meshInterface->getScaling(); + + int i; + for (i=endNode-1;i>=firstNode;i--) + { + + + btQuantizedBvhNode& curNode = m_quantizedContiguousNodes[i]; + if (curNode.isLeafNode()) + { + //recalc aabb from triangle data + int nodeTriangleIndex = curNode.getTriangleIndex(); + //triangles->getLockedReadOnlyVertexIndexBase(vertexBase,numVerts, + + int* gfxbase = (int*)(indexbase+nodeTriangleIndex*indexstride); + + + for (int j=2;j>=0;j--) + { + + int graphicsindex = gfxbase[j]; + btScalar* graphicsbase = (btScalar*)(vertexbase+graphicsindex*stride); +#ifdef DEBUG_PATCH_COLORS + btVector3 mycolor = color[index&3]; + graphicsbase[8] = mycolor.getX(); + graphicsbase[9] = mycolor.getY(); + graphicsbase[10] = mycolor.getZ(); +#endif //DEBUG_PATCH_COLORS + + + triangleVerts[j] = btVector3( + graphicsbase[0]*meshScaling.getX(), + graphicsbase[1]*meshScaling.getY(), + graphicsbase[2]*meshScaling.getZ()); + } + + + + aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + aabbMin.setMin(triangleVerts[0]); + aabbMax.setMax(triangleVerts[0]); + aabbMin.setMin(triangleVerts[1]); + aabbMax.setMax(triangleVerts[1]); + aabbMin.setMin(triangleVerts[2]); + aabbMax.setMax(triangleVerts[2]); + + quantizeWithClamp(&curNode.m_quantizedAabbMin[0],aabbMin); + quantizeWithClamp(&curNode.m_quantizedAabbMax[0],aabbMax); + + } else + { + //combine aabb from both children + + btQuantizedBvhNode* leftChildNode = &m_quantizedContiguousNodes[i+1]; + + btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? &m_quantizedContiguousNodes[i+2] : + &m_quantizedContiguousNodes[i+1+leftChildNode->getEscapeIndex()]; + + + { + for (int i=0;i<3;i++) + { + curNode.m_quantizedAabbMin[i] = leftChildNode->m_quantizedAabbMin[i]; + if (curNode.m_quantizedAabbMin[i]>rightChildNode->m_quantizedAabbMin[i]) + curNode.m_quantizedAabbMin[i]=rightChildNode->m_quantizedAabbMin[i]; + + curNode.m_quantizedAabbMax[i] = leftChildNode->m_quantizedAabbMax[i]; + if (curNode.m_quantizedAabbMax[i] < rightChildNode->m_quantizedAabbMax[i]) + curNode.m_quantizedAabbMax[i] = rightChildNode->m_quantizedAabbMax[i]; + } + } + } + + } + + meshInterface->unLockReadOnlyVertexBase(nodeSubPart); + + +} + +void btOptimizedBvh::setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin) +{ + //enlarge the AABB to avoid division by zero when initializing the quantization values + btVector3 clampValue(quantizationMargin,quantizationMargin,quantizationMargin); + m_bvhAabbMin = bvhAabbMin - clampValue; + m_bvhAabbMax = bvhAabbMax + clampValue; + btVector3 aabbSize = m_bvhAabbMax - m_bvhAabbMin; + m_bvhQuantization = btVector3(btScalar(65535.0),btScalar(65535.0),btScalar(65535.0)) / aabbSize; +} + + +void btOptimizedBvh::refit(btStridingMeshInterface* meshInterface) +{ + if (m_useQuantization) + { + //calculate new aabb + btVector3 aabbMin,aabbMax; + meshInterface->calculateAabbBruteForce(aabbMin,aabbMax); + + setQuantizationValues(aabbMin,aabbMax); + + updateBvhNodes(meshInterface,0,m_curNodeIndex,0); + + ///now update all subtree headers + + int i; + for (i=0;i gMaxStackDepth) + gMaxStackDepth = gStackDepth; +#endif //DEBUG_TREE_BUILDING + + + int splitAxis, splitIndex, i; + int numIndices =endIndex-startIndex; + int curIndex = m_curNodeIndex; + + assert(numIndices>0); + + if (numIndices==1) + { +#ifdef DEBUG_TREE_BUILDING + gStackDepth--; +#endif //DEBUG_TREE_BUILDING + + assignInternalNodeFromLeafNode(m_curNodeIndex,startIndex); + + m_curNodeIndex++; + return; + } + //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'. + + splitAxis = calcSplittingAxis(startIndex,endIndex); + + splitIndex = sortAndCalcSplittingIndex(startIndex,endIndex,splitAxis); + + int internalNodeIndex = m_curNodeIndex; + + setInternalNodeAabbMax(m_curNodeIndex,btVector3(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30))); + setInternalNodeAabbMin(m_curNodeIndex,btVector3(btScalar(1e30),btScalar(1e30),btScalar(1e30))); + + for (i=startIndex;im_escapeIndex; + + int leftChildNodexIndex = m_curNodeIndex; + + //build left child tree + buildTree(startIndex,splitIndex); + + int rightChildNodexIndex = m_curNodeIndex; + //build right child tree + buildTree(splitIndex,endIndex); + +#ifdef DEBUG_TREE_BUILDING + gStackDepth--; +#endif //DEBUG_TREE_BUILDING + + int escapeIndex = m_curNodeIndex - curIndex; + + if (m_useQuantization) + { + //escapeIndex is the number of nodes of this subtree + const int sizeQuantizedNode =sizeof(btQuantizedBvhNode); + const int treeSizeInBytes = escapeIndex * sizeQuantizedNode; + if (treeSizeInBytes > MAX_SUBTREE_SIZE_IN_BYTES) + { + updateSubtreeHeaders(leftChildNodexIndex,rightChildNodexIndex); + } + } + + setInternalNodeEscapeIndex(internalNodeIndex,escapeIndex); + +} + +void btOptimizedBvh::updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex) +{ + btAssert(m_useQuantization); + + btQuantizedBvhNode& leftChildNode = m_quantizedContiguousNodes[leftChildNodexIndex]; + int leftSubTreeSize = leftChildNode.isLeafNode() ? 1 : leftChildNode.getEscapeIndex(); + int leftSubTreeSizeInBytes = leftSubTreeSize * sizeof(btQuantizedBvhNode); + + btQuantizedBvhNode& rightChildNode = m_quantizedContiguousNodes[rightChildNodexIndex]; + int rightSubTreeSize = rightChildNode.isLeafNode() ? 1 : rightChildNode.getEscapeIndex(); + int rightSubTreeSizeInBytes = rightSubTreeSize * sizeof(btQuantizedBvhNode); + + if(leftSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES) + { + btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); + subtree.setAabbFromQuantizeNode(leftChildNode); + subtree.m_rootNodeIndex = leftChildNodexIndex; + subtree.m_subtreeSize = leftSubTreeSize; + } + + if(rightSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES) + { + btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand(); + subtree.setAabbFromQuantizeNode(rightChildNode); + subtree.m_rootNodeIndex = rightChildNodexIndex; + subtree.m_subtreeSize = rightSubTreeSize; + } +} + + +int btOptimizedBvh::sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis) +{ + int i; + int splitIndex =startIndex; + int numIndices = endIndex - startIndex; + btScalar splitValue; + + btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.)); + for (i=startIndex;i splitValue) + { + //swap + swapLeafNodes(i,splitIndex); + splitIndex++; + } + } + + //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex + //otherwise the tree-building might fail due to stack-overflows in certain cases. + //unbalanced1 is unsafe: it can cause stack overflows + //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1))); + + //unbalanced2 should work too: always use center (perfect balanced trees) + //bool unbalanced2 = true; + + //this should be safe too: + int rangeBalancedIndices = numIndices/3; + bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices))); + + if (unbalanced) + { + splitIndex = startIndex+ (numIndices>>1); + } + + bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex)); + btAssert(!unbal); + + return splitIndex; +} + + +int btOptimizedBvh::calcSplittingAxis(int startIndex,int endIndex) +{ + int i; + + btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.)); + btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.)); + int numIndices = endIndex-startIndex; + + for (i=startIndex;im_aabbMinOrg,rootNode->m_aabbMaxOrg); + isLeafNode = rootNode->m_escapeIndex == -1; + + if (isLeafNode && aabbOverlap) + { + nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex); + } + + if (aabbOverlap || isLeafNode) + { + rootNode++; + curIndex++; + } else + { + escapeIndex = rootNode->m_escapeIndex; + rootNode += escapeIndex; + curIndex += escapeIndex; + } + } + if (maxIterations < walkIterations) + maxIterations = walkIterations; + +} + +/* +///this was the original recursive traversal, before we optimized towards stackless traversal +void btOptimizedBvh::walkTree(btOptimizedBvhNode* rootNode,btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + bool isLeafNode, aabbOverlap = TestAabbAgainstAabb2(aabbMin,aabbMax,rootNode->m_aabbMin,rootNode->m_aabbMax); + if (aabbOverlap) + { + isLeafNode = (!rootNode->m_leftChild && !rootNode->m_rightChild); + if (isLeafNode) + { + nodeCallback->processNode(rootNode); + } else + { + walkTree(rootNode->m_leftChild,nodeCallback,aabbMin,aabbMax); + walkTree(rootNode->m_rightChild,nodeCallback,aabbMin,aabbMax); + } + } + +} +*/ + +void btOptimizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const +{ + btAssert(m_useQuantization); + + bool aabbOverlap, isLeafNode; + + aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,currentNode->m_quantizedAabbMin,currentNode->m_quantizedAabbMax); + isLeafNode = currentNode->isLeafNode(); + + if (aabbOverlap) + { + if (isLeafNode) + { + nodeCallback->processNode(0,currentNode->getTriangleIndex()); + } else + { + //process left and right children + const btQuantizedBvhNode* leftChildNode = currentNode+1; + walkRecursiveQuantizedTreeAgainstQueryAabb(leftChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax); + + const btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? leftChildNode+1:leftChildNode+leftChildNode->getEscapeIndex(); + walkRecursiveQuantizedTreeAgainstQueryAabb(rightChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax); + } + } +} + + + + + + + +void btOptimizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const +{ + btAssert(m_useQuantization); + + int curIndex = startNodeIndex; + int walkIterations = 0; + int subTreeSize = endNodeIndex - startNodeIndex; + + const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex]; + int escapeIndex; + + bool aabbOverlap, isLeafNode; + + while (curIndex < endNodeIndex) + { + +//#define VISUALLY_ANALYZE_BVH 1 +#ifdef VISUALLY_ANALYZE_BVH + //some code snippet to debugDraw aabb, to visually analyze bvh structure + static int drawPatch = 0; + //need some global access to a debugDrawer + extern btIDebugDraw* debugDrawerPtr; + if (curIndex==drawPatch) + { + btVector3 aabbMin,aabbMax; + aabbMin = unQuantize(rootNode->m_quantizedAabbMin); + aabbMax = unQuantize(rootNode->m_quantizedAabbMax); + btVector3 color(1,0,0); + debugDrawerPtr->drawAabb(aabbMin,aabbMax,color); + } +#endif//VISUALLY_ANALYZE_BVH + + //catch bugs in tree data + assert (walkIterations < subTreeSize); + + walkIterations++; + aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax); + isLeafNode = rootNode->isLeafNode(); + + if (isLeafNode && aabbOverlap) + { + nodeCallback->processNode(0,rootNode->getTriangleIndex()); + } + + if (aabbOverlap || isLeafNode) + { + rootNode++; + curIndex++; + } else + { + escapeIndex = rootNode->getEscapeIndex(); + rootNode += escapeIndex; + curIndex += escapeIndex; + } + } + if (maxIterations < walkIterations) + maxIterations = walkIterations; + +} + +//This traversal can be called from Playstation 3 SPU +void btOptimizedBvh::walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const +{ + btAssert(m_useQuantization); + + int i; + + + for (i=0;im_SubtreeHeaders.size();i++) + { + const btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i]; + + bool overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax); + if (overlap) + { + walkStacklessQuantizedTree(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax, + subtree.m_rootNodeIndex, + subtree.m_rootNodeIndex+subtree.m_subtreeSize); + } + } +} + + + + +void btOptimizedBvh::reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + (void)nodeCallback; + (void)aabbMin; + (void)aabbMax; + //not yet, please use aabb + btAssert(0); +} + + +void btOptimizedBvh::quantizeWithClamp(unsigned short* out, const btVector3& point) const +{ + + btAssert(m_useQuantization); + + btVector3 clampedPoint(point); + clampedPoint.setMax(m_bvhAabbMin); + clampedPoint.setMin(m_bvhAabbMax); + + btVector3 v = (clampedPoint - m_bvhAabbMin) * m_bvhQuantization; + out[0] = (unsigned short)(v.getX()+0.5f); + out[1] = (unsigned short)(v.getY()+0.5f); + out[2] = (unsigned short)(v.getZ()+0.5f); +} + +btVector3 btOptimizedBvh::unQuantize(const unsigned short* vecIn) const +{ + btVector3 vecOut; + vecOut.setValue( + (btScalar)(vecIn[0]) / (m_bvhQuantization.getX()), + (btScalar)(vecIn[1]) / (m_bvhQuantization.getY()), + (btScalar)(vecIn[2]) / (m_bvhQuantization.getZ())); + vecOut += m_bvhAabbMin; + return vecOut; +} + + +void btOptimizedBvh::swapLeafNodes(int i,int splitIndex) +{ + if (m_useQuantization) + { + btQuantizedBvhNode tmp = m_quantizedLeafNodes[i]; + m_quantizedLeafNodes[i] = m_quantizedLeafNodes[splitIndex]; + m_quantizedLeafNodes[splitIndex] = tmp; + } else + { + btOptimizedBvhNode tmp = m_leafNodes[i]; + m_leafNodes[i] = m_leafNodes[splitIndex]; + m_leafNodes[splitIndex] = tmp; + } +} + +void btOptimizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex) +{ + if (m_useQuantization) + { + m_quantizedContiguousNodes[internalNode] = m_quantizedLeafNodes[leafNodeIndex]; + } else + { + m_contiguousNodes[internalNode] = m_leafNodes[leafNodeIndex]; + } +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h new file mode 100644 index 00000000000..d5159586344 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.h @@ -0,0 +1,330 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef OPTIMIZED_BVH_H +#define OPTIMIZED_BVH_H + + +#include "../../LinearMath/btVector3.h" + + +//http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrf__m128.asp + + + +class btStridingMeshInterface; + +//Note: currently we have 16 bytes per quantized node +#define MAX_SUBTREE_SIZE_IN_BYTES 2048 + + +///btQuantizedBvhNode is a compressed aabb node, 16 bytes. +///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range). +ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode +{ + + //12 bytes + unsigned short int m_quantizedAabbMin[3]; + unsigned short int m_quantizedAabbMax[3]; + //4 bytes + int m_escapeIndexOrTriangleIndex; + + bool isLeafNode() const + { + //skipindex is negative (internal node), triangleindex >=0 (leafnode) + return (m_escapeIndexOrTriangleIndex >= 0); + } + int getEscapeIndex() const + { + btAssert(!isLeafNode()); + return -m_escapeIndexOrTriangleIndex; + } + int getTriangleIndex() const + { + btAssert(isLeafNode()); + return m_escapeIndexOrTriangleIndex; + } +} +; + +/// btOptimizedBvhNode contains both internal and leaf node information. +/// Total node size is 44 bytes / node. You can use the compressed version of 16 bytes. +ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode +{ + //32 bytes + btVector3 m_aabbMinOrg; + btVector3 m_aabbMaxOrg; + + //4 + int m_escapeIndex; + + //8 + //for child nodes + int m_subPart; + int m_triangleIndex; + int m_padding[5];//bad, due to alignment + + +}; + + +///btBvhSubtreeInfo provides info to gather a subtree of limited size +ATTRIBUTE_ALIGNED16(class) btBvhSubtreeInfo +{ +public: + //12 bytes + unsigned short int m_quantizedAabbMin[3]; + unsigned short int m_quantizedAabbMax[3]; + //4 bytes, points to the root of the subtree + int m_rootNodeIndex; + //4 bytes + int m_subtreeSize; + int m_padding[3]; + + + void setAabbFromQuantizeNode(const btQuantizedBvhNode& quantizedNode) + { + m_quantizedAabbMin[0] = quantizedNode.m_quantizedAabbMin[0]; + m_quantizedAabbMin[1] = quantizedNode.m_quantizedAabbMin[1]; + m_quantizedAabbMin[2] = quantizedNode.m_quantizedAabbMin[2]; + m_quantizedAabbMax[0] = quantizedNode.m_quantizedAabbMax[0]; + m_quantizedAabbMax[1] = quantizedNode.m_quantizedAabbMax[1]; + m_quantizedAabbMax[2] = quantizedNode.m_quantizedAabbMax[2]; + } +} +; + + +class btNodeOverlapCallback +{ +public: + virtual ~btNodeOverlapCallback() {}; + + virtual void processNode(int subPart, int triangleIndex) = 0; +}; + +#include "../../LinearMath/btAlignedAllocator.h" +#include "../../LinearMath/btAlignedObjectArray.h" + + + +///for code readability: +typedef btAlignedObjectArray NodeArray; +typedef btAlignedObjectArray QuantizedNodeArray; +typedef btAlignedObjectArray BvhSubtreeInfoArray; + + +///OptimizedBvh store an AABB tree that can be quickly traversed on CPU (and SPU,GPU in future) +ATTRIBUTE_ALIGNED16(class) btOptimizedBvh +{ + NodeArray m_leafNodes; + NodeArray m_contiguousNodes; + + QuantizedNodeArray m_quantizedLeafNodes; + + QuantizedNodeArray m_quantizedContiguousNodes; + + int m_curNodeIndex; + + + //quantization data + bool m_useQuantization; + btVector3 m_bvhAabbMin; + btVector3 m_bvhAabbMax; + btVector3 m_bvhQuantization; + + enum btTraversalMode + { + TRAVERSAL_STACKLESS = 0, + TRAVERSAL_STACKLESS_CACHE_FRIENDLY, + TRAVERSAL_RECURSIVE + }; + + btTraversalMode m_traversalMode; + + + + + BvhSubtreeInfoArray m_SubtreeHeaders; + + + ///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!) + ///this might be refactored into a virtual, it is usually not calculated at run-time + void setInternalNodeAabbMin(int nodeIndex, const btVector3& aabbMin) + { + if (m_useQuantization) + { + quantizeWithClamp(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] ,aabbMin); + } else + { + m_contiguousNodes[nodeIndex].m_aabbMinOrg = aabbMin; + + } + } + void setInternalNodeAabbMax(int nodeIndex,const btVector3& aabbMax) + { + if (m_useQuantization) + { + quantizeWithClamp(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0],aabbMax); + } else + { + m_contiguousNodes[nodeIndex].m_aabbMaxOrg = aabbMax; + } + } + + btVector3 getAabbMin(int nodeIndex) const + { + if (m_useQuantization) + { + return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMin[0]); + } + //non-quantized + return m_leafNodes[nodeIndex].m_aabbMinOrg; + + } + btVector3 getAabbMax(int nodeIndex) const + { + if (m_useQuantization) + { + return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMax[0]); + } + //non-quantized + return m_leafNodes[nodeIndex].m_aabbMaxOrg; + + } + + void setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin=btScalar(1.0)); + + void setInternalNodeEscapeIndex(int nodeIndex, int escapeIndex) + { + if (m_useQuantization) + { + m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = -escapeIndex; + } + else + { + m_contiguousNodes[nodeIndex].m_escapeIndex = escapeIndex; + } + + } + + void mergeInternalNodeAabb(int nodeIndex,const btVector3& newAabbMin,const btVector3& newAabbMax) + { + if (m_useQuantization) + { + unsigned short int quantizedAabbMin[3]; + unsigned short int quantizedAabbMax[3]; + quantizeWithClamp(quantizedAabbMin,newAabbMin); + quantizeWithClamp(quantizedAabbMax,newAabbMax); + for (int i=0;i<3;i++) + { + if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] > quantizedAabbMin[i]) + m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] = quantizedAabbMin[i]; + + if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] < quantizedAabbMax[i]) + m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] = quantizedAabbMax[i]; + + } + } else + { + //non-quantized + m_contiguousNodes[nodeIndex].m_aabbMinOrg.setMin(newAabbMin); + m_contiguousNodes[nodeIndex].m_aabbMaxOrg.setMax(newAabbMax); + } + } + + void swapLeafNodes(int firstIndex,int secondIndex); + + void assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex); + +protected: + + + + void buildTree (int startIndex,int endIndex); + + int calcSplittingAxis(int startIndex,int endIndex); + + int sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis); + + void walkStacklessTree(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + void walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const; + + ///tree traversal designed for small-memory processors like PS3 SPU + void walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const; + + ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal + void walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const; + + ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal + void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const; + + + inline bool testQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2) const + { + bool overlap = true; + overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; + overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; + overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; + return overlap; + } + + void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex); + +public: + btOptimizedBvh(); + + virtual ~btOptimizedBvh(); + + void build(btStridingMeshInterface* triangles,bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax); + + void reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + void reportSphereOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + void quantizeWithClamp(unsigned short* out, const btVector3& point) const; + + btVector3 unQuantize(const unsigned short* vecIn) const; + + ///setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees. + void setTraversalMode(btTraversalMode traversalMode) + { + m_traversalMode = traversalMode; + } + + void refit(btStridingMeshInterface* triangles); + + void refitPartial(btStridingMeshInterface* triangles,const btVector3& aabbMin, const btVector3& aabbMax); + + void updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index); + + + QuantizedNodeArray& getQuantizedNodeArray() + { + return m_quantizedContiguousNodes; + } + + BvhSubtreeInfoArray& getSubtreeInfoArray() + { + return m_SubtreeHeaders; + } + +} +; + + +#endif //OPTIMIZED_BVH_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp new file mode 100644 index 00000000000..bbc4ba62af6 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp @@ -0,0 +1,148 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include + +btPolyhedralConvexShape::btPolyhedralConvexShape() +:m_localAabbMin(1,1,1), +m_localAabbMax(-1,-1,-1), +m_isLocalAabbValid(false), +m_optionalHull(0) +{ + +} + + + +btVector3 btPolyhedralConvexShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const +{ + int i; + btVector3 supVec(0,0,0); + + btScalar maxDot(btScalar(-1e30)); + + btVector3 vec = vec0; + btScalar lenSqr = vec.length2(); + if (lenSqr < btScalar(0.0001)) + { + vec.setValue(1,0,0); + } else + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + vec *= rlen; + } + + btVector3 vtx; + btScalar newDot; + + for (i=0;i maxDot) + { + maxDot = newDot; + supVec = vtx; + } + } + + return supVec; + +} + +void btPolyhedralConvexShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + int i; + + btVector3 vtx; + btScalar newDot; + + for (i=0;i supportVerticesOut[j][3]) + { + //WARNING: don't swap next lines, the w component would get overwritten! + supportVerticesOut[j] = vtx; + supportVerticesOut[j][3] = newDot; + } + } + } +} + + + +void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + //not yet, return box inertia + + btScalar margin = getMargin(); + + btTransform ident; + ident.setIdentity(); + btVector3 aabbMin,aabbMax; + getAabb(ident,aabbMin,aabbMax); + btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5); + + btScalar lx=btScalar(2.)*(halfExtents.x()+margin); + btScalar ly=btScalar(2.)*(halfExtents.y()+margin); + btScalar lz=btScalar(2.)*(halfExtents.z()+margin); + const btScalar x2 = lx*lx; + const btScalar y2 = ly*ly; + const btScalar z2 = lz*lz; + const btScalar scaledmass = mass * btScalar(0.08333333); + + inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2)); + +} + + + +void btPolyhedralConvexShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const +{ + getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin()); +} + + + + +void btPolyhedralConvexShape::recalcLocalAabb() +{ + m_isLocalAabbValid = true; + + for (int i=0;i<3;i++) + { + btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); + vec[i] = btScalar(1.); + btVector3 tmp = localGetSupportingVertex(vec); + m_localAabbMax[i] = tmp[i]+m_collisionMargin; + vec[i] = btScalar(-1.); + tmp = localGetSupportingVertex(vec); + m_localAabbMin[i] = tmp[i]-m_collisionMargin; + } +} + + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h new file mode 100644 index 00000000000..c35f7512663 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h @@ -0,0 +1,93 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BU_SHAPE +#define BU_SHAPE + +#include "../../LinearMath/btPoint3.h" +#include "../../LinearMath/btMatrix3x3.h" +#include "btConvexShape.h" + + +///PolyhedralConvexShape is an interface class for feature based (vertex/edge/face) convex shapes. +class btPolyhedralConvexShape : public btConvexShape +{ + +protected: + btVector3 m_localAabbMin; + btVector3 m_localAabbMax; + bool m_isLocalAabbValid; + +public: + + btPolyhedralConvexShape(); + + //brute force implementations + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const; + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const; + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + + inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const + { + + //lazy evaluation of local aabb + btAssert(m_isLocalAabbValid); + + btAssert(m_localAabbMin.getX() <= m_localAabbMax.getX()); + btAssert(m_localAabbMin.getY() <= m_localAabbMax.getY()); + btAssert(m_localAabbMin.getZ() <= m_localAabbMax.getZ()); + + + btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); + btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); + + btMatrix3x3 abs_b = trans.getBasis().absolute(); + + btPoint3 center = trans(localCenter); + + btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), + abs_b[1].dot(localHalfExtents), + abs_b[2].dot(localHalfExtents)); + extent += btVector3(margin,margin,margin); + + aabbMin = center - extent; + aabbMax = center + extent; + + + } + + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + void recalcLocalAabb(); + + virtual int getNumVertices() const = 0 ; + virtual int getNumEdges() const = 0; + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const = 0; + virtual void getVertex(int i,btPoint3& vtx) const = 0; + virtual int getNumPlanes() const = 0; + virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const = 0; +// virtual int getIndex(int i) const = 0 ; + + virtual bool isInside(const btPoint3& pt,btScalar tolerance) const = 0; + + /// optional Hull is for optional Separating Axis Test Hull collision detection, see Hull.cpp + class Hull* m_optionalHull; + +}; + +#endif //BU_SHAPE diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp new file mode 100644 index 00000000000..ca65dd03f3e --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btSphereShape.cpp @@ -0,0 +1,77 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btSphereShape.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" + +#include "LinearMath/btQuaternion.h" + + +btSphereShape ::btSphereShape (btScalar radius) +{ + m_implicitShapeDimensions.setX(radius); +} + +btVector3 btSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const +{ + (void)vec; + return btVector3(btScalar(0.),btScalar(0.),btScalar(0.)); +} + +void btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const +{ + (void)vectors; + + for (int i=0;iprocessTriangle(triangle,0,0); + + triangle[0] = projectedCenter - tangentDir0*radius - tangentDir1*radius; + triangle[1] = projectedCenter - tangentDir0*radius + tangentDir1*radius; + triangle[2] = projectedCenter + tangentDir0*radius + tangentDir1*radius; + + callback->processTriangle(triangle,0,1); + +} + +void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + (void)mass; + + //moving concave objects not supported + + inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); +} + +void btStaticPlaneShape::setLocalScaling(const btVector3& scaling) +{ + m_localScaling = scaling; +} +const btVector3& btStaticPlaneShape::getLocalScaling() const +{ + return m_localScaling; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h new file mode 100644 index 00000000000..f59cc0c3347 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h @@ -0,0 +1,61 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef STATIC_PLANE_SHAPE_H +#define STATIC_PLANE_SHAPE_H + +#include "btConcaveShape.h" + + +///StaticPlaneShape simulates an 'infinite' plane by dynamically reporting triangles approximated by intersection of the plane with the AABB. +///Assumed is that the other objects is not also infinite, so a reasonable sized AABB. +class btStaticPlaneShape : public btConcaveShape +{ +protected: + btVector3 m_localAabbMin; + btVector3 m_localAabbMax; + + btVector3 m_planeNormal; + btScalar m_planeConstant; + btVector3 m_localScaling; + +public: + btStaticPlaneShape(const btVector3& planeNormal,btScalar planeConstant); + + virtual ~btStaticPlaneShape(); + + + virtual int getShapeType() const + { + return STATIC_PLANE_PROXYTYPE; + } + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + virtual void setLocalScaling(const btVector3& scaling); + virtual const btVector3& getLocalScaling() const; + + + //debugging + virtual char* getName()const {return "STATICPLANE";} + + +}; + +#endif //STATIC_PLANE_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp new file mode 100644 index 00000000000..03ca1ae7736 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp @@ -0,0 +1,124 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btStridingMeshInterface.h" + +btStridingMeshInterface::~btStridingMeshInterface() +{ + +} + + +void btStridingMeshInterface::InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + (void)aabbMin; + (void)aabbMax; + int numtotalphysicsverts = 0; + int part,graphicssubparts = getNumSubParts(); + const unsigned char * vertexbase; + const unsigned char * indexbase; + int indexstride; + PHY_ScalarType type; + PHY_ScalarType gfxindextype; + int stride,numverts,numtriangles; + int gfxindex; + btVector3 triangle[3]; + btScalar* graphicsbase; + + btVector3 meshScaling = getScaling(); + + ///if the number of parts is big, the performance might drop due to the innerloop switch on indextype + for (part=0;partinternalProcessTriangleIndex(triangle,part,gfxindex); + } + break; + } + case PHY_SHORT: + { + for (gfxindex=0;gfxindexinternalProcessTriangleIndex(triangle,part,gfxindex); + } + break; + } + default: + btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT)); + } + + unLockReadOnlyVertexBase(part); + } +} + +void btStridingMeshInterface::calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax) +{ + + struct AabbCalculationCallback : public btInternalTriangleIndexCallback + { + btVector3 m_aabbMin; + btVector3 m_aabbMax; + + AabbCalculationCallback() + { + m_aabbMin.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + m_aabbMax.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + (void)partId; + (void)triangleIndex; + + m_aabbMin.setMin(triangle[0]); + m_aabbMax.setMax(triangle[0]); + m_aabbMin.setMin(triangle[1]); + m_aabbMax.setMax(triangle[1]); + m_aabbMin.setMin(triangle[2]); + m_aabbMax.setMax(triangle[2]); + } + }; + + //first calculate the total aabb for all triangles + AabbCalculationCallback aabbCallback; + aabbMin.setValue(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + aabbMax.setValue(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + InternalProcessAllTriangles(&aabbCallback,aabbMin,aabbMax); + + aabbMin = aabbCallback.m_aabbMin; + aabbMax = aabbCallback.m_aabbMax; +} \ No newline at end of file diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h new file mode 100644 index 00000000000..d7b354b7855 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h @@ -0,0 +1,89 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef STRIDING_MESHINTERFACE_H +#define STRIDING_MESHINTERFACE_H + +#include "../../LinearMath/btVector3.h" +#include "btTriangleCallback.h" + +/// PHY_ScalarType enumerates possible scalar types. +/// See the btStridingMeshInterface for its use +typedef enum PHY_ScalarType { + PHY_FLOAT, + PHY_DOUBLE, + PHY_INTEGER, + PHY_SHORT, + PHY_FIXEDPOINT88 +} PHY_ScalarType; + +/// btStridingMeshInterface is the interface class for high performance access to triangle meshes +/// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory. +class btStridingMeshInterface +{ + protected: + + btVector3 m_scaling; + + public: + btStridingMeshInterface() :m_scaling(btScalar(1.),btScalar(1.),btScalar(1.)) + { + + } + + virtual ~btStridingMeshInterface(); + + + + void InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + ///brute force method to calculate aabb + void calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax); + + /// get read and write access to a subpart of a triangle mesh + /// this subpart has a continuous array of vertices and indices + /// in this way the mesh can be handled as chunks of memory with striding + /// very similar to OpenGL vertexarray support + /// make a call to unLockVertexBase when the read and write access is finished + virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0)=0; + + virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const=0; + + /// unLockVertexBase finishes the access to a subpart of the triangle mesh + /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished + virtual void unLockVertexBase(int subpart)=0; + + virtual void unLockReadOnlyVertexBase(int subpart) const=0; + + + /// getNumSubParts returns the number of seperate subparts + /// each subpart has a continuous array of vertices and indices + virtual int getNumSubParts() const=0; + + virtual void preallocateVertices(int numverts)=0; + virtual void preallocateIndices(int numindices)=0; + + const btVector3& getScaling() const { + return m_scaling; + } + void setScaling(const btVector3& scaling) + { + m_scaling = scaling; + } + + +}; + +#endif //STRIDING_MESHINTERFACE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp new file mode 100644 index 00000000000..3aa1eda9964 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp @@ -0,0 +1,195 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#include "btTetrahedronShape.h" +#include "LinearMath/btMatrix3x3.h" + +btBU_Simplex1to4::btBU_Simplex1to4() +:m_numVertices(0) +{ +} + +btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0) +:m_numVertices(0) +{ + addVertex(pt0); +} + +btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1) +:m_numVertices(0) +{ + addVertex(pt0); + addVertex(pt1); +} + +btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2) +:m_numVertices(0) +{ + addVertex(pt0); + addVertex(pt1); + addVertex(pt2); +} + +btBU_Simplex1to4::btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2,const btPoint3& pt3) +:m_numVertices(0) +{ + addVertex(pt0); + addVertex(pt1); + addVertex(pt2); + addVertex(pt3); +} + + + + + +void btBU_Simplex1to4::addVertex(const btPoint3& pt) +{ + m_vertices[m_numVertices++] = pt; + + recalcLocalAabb(); +} + + +int btBU_Simplex1to4::getNumVertices() const +{ + return m_numVertices; +} + +int btBU_Simplex1to4::getNumEdges() const +{ + //euler formula, F-E+V = 2, so E = F+V-2 + + switch (m_numVertices) + { + case 0: + return 0; + case 1: return 0; + case 2: return 1; + case 3: return 3; + case 4: return 6; + + + } + + return 0; +} + +void btBU_Simplex1to4::getEdge(int i,btPoint3& pa,btPoint3& pb) const +{ + + switch (m_numVertices) + { + + case 2: + pa = m_vertices[0]; + pb = m_vertices[1]; + break; + case 3: + switch (i) + { + case 0: + pa = m_vertices[0]; + pb = m_vertices[1]; + break; + case 1: + pa = m_vertices[1]; + pb = m_vertices[2]; + break; + case 2: + pa = m_vertices[2]; + pb = m_vertices[0]; + break; + + } + break; + case 4: + switch (i) + { + case 0: + pa = m_vertices[0]; + pb = m_vertices[1]; + break; + case 1: + pa = m_vertices[1]; + pb = m_vertices[2]; + break; + case 2: + pa = m_vertices[2]; + pb = m_vertices[0]; + break; + case 3: + pa = m_vertices[0]; + pb = m_vertices[3]; + break; + case 4: + pa = m_vertices[1]; + pb = m_vertices[3]; + break; + case 5: + pa = m_vertices[2]; + pb = m_vertices[3]; + break; + } + + } + + + + +} + +void btBU_Simplex1to4::getVertex(int i,btPoint3& vtx) const +{ + vtx = m_vertices[i]; +} + +int btBU_Simplex1to4::getNumPlanes() const +{ + switch (m_numVertices) + { + case 0: + return 0; + case 1: + return 0; + case 2: + return 0; + case 3: + return 2; + case 4: + return 4; + default: + { + } + } + return 0; +} + + +void btBU_Simplex1to4::getPlane(btVector3&, btPoint3& ,int ) const +{ + +} + +int btBU_Simplex1to4::getIndex(int ) const +{ + return 0; +} + +bool btBU_Simplex1to4::isInside(const btPoint3& ,btScalar ) const +{ + return false; +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h new file mode 100644 index 00000000000..94bc4ec0fa5 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTetrahedronShape.h @@ -0,0 +1,75 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BU_SIMPLEX_1TO4_SHAPE +#define BU_SIMPLEX_1TO4_SHAPE + + +#include "btPolyhedralConvexShape.h" +#include "../BroadphaseCollision/btBroadphaseProxy.h" + + +///BU_Simplex1to4 implements feature based and implicit simplex of up to 4 vertices (tetrahedron, triangle, line, vertex). +class btBU_Simplex1to4 : public btPolyhedralConvexShape +{ +protected: + + int m_numVertices; + btPoint3 m_vertices[4]; + +public: + btBU_Simplex1to4(); + + btBU_Simplex1to4(const btPoint3& pt0); + btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1); + btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2); + btBU_Simplex1to4(const btPoint3& pt0,const btPoint3& pt1,const btPoint3& pt2,const btPoint3& pt3); + + + void reset() + { + m_numVertices = 0; + } + + + virtual int getShapeType() const{ return TETRAHEDRAL_SHAPE_PROXYTYPE; } + + void addVertex(const btPoint3& pt); + + //PolyhedralConvexShape interface + + virtual int getNumVertices() const; + + virtual int getNumEdges() const; + + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const; + + virtual void getVertex(int i,btPoint3& vtx) const; + + virtual int getNumPlanes() const; + + virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i) const; + + virtual int getIndex(int i) const; + + virtual bool isInside(const btPoint3& pt,btScalar tolerance) const; + + + ///getName is for debugging + virtual char* getName()const { return "btBU_Simplex1to4";} + +}; + +#endif //BU_SIMPLEX_1TO4_SHAPE diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp new file mode 100644 index 00000000000..54864c32f3a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp @@ -0,0 +1,42 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btTriangleBuffer.h" + + +///example usage of this class: +// btTriangleBuffer triBuf; +// concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax); +// for (int i=0;i m_triangleBuffer; + +public: + + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); + + int getNumTriangles() const + { + return int(m_triangleBuffer.size()); + } + + const btTriangle& getTriangle(int index) const + { + return m_triangleBuffer[index]; + } + + void clearBuffer() + { + m_triangleBuffer.clear(); + } + +}; + + +#endif //BT_TRIANGLE_BUFFER_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp new file mode 100644 index 00000000000..a020746db5f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp @@ -0,0 +1,28 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btTriangleCallback.h" + +btTriangleCallback::~btTriangleCallback() +{ + +} + + +btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback() +{ + +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h new file mode 100644 index 00000000000..fbb87bc4fd8 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleCallback.h @@ -0,0 +1,40 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef TRIANGLE_CALLBACK_H +#define TRIANGLE_CALLBACK_H + +#include "../../LinearMath/btVector3.h" + + +class btTriangleCallback +{ +public: + + virtual ~btTriangleCallback(); + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0; +}; + +class btInternalTriangleIndexCallback +{ +public: + + virtual ~btInternalTriangleIndexCallback(); + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) = 0; +}; + + + +#endif //TRIANGLE_CALLBACK_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp new file mode 100644 index 00000000000..00847861cf1 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp @@ -0,0 +1,65 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btTriangleIndexVertexArray.h" + +btTriangleIndexVertexArray::btTriangleIndexVertexArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride) +{ + btIndexedMesh mesh; + + mesh.m_numTriangles = numTriangles; + mesh.m_triangleIndexBase = (const unsigned char *)triangleIndexBase; + mesh.m_triangleIndexStride = triangleIndexStride; + mesh.m_numVertices = numVertices; + mesh.m_vertexBase = (const unsigned char *)vertexBase; + mesh.m_vertexStride = vertexStride; + + addIndexedMesh(mesh); + +} + +void btTriangleIndexVertexArray::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) +{ + btAssert(subpart< getNumSubParts() ); + + btIndexedMesh& mesh = m_indexedMeshes[subpart]; + + numverts = mesh.m_numVertices; + (*vertexbase) = (unsigned char *) mesh.m_vertexBase; + type = PHY_FLOAT; + vertexStride = mesh.m_vertexStride; + + numfaces = mesh.m_numTriangles; + + (*indexbase) = (unsigned char *)mesh.m_triangleIndexBase; + indexstride = mesh.m_triangleIndexStride; + indicestype = PHY_INTEGER; +} + +void btTriangleIndexVertexArray::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const +{ + const btIndexedMesh& mesh = m_indexedMeshes[subpart]; + + numverts = mesh.m_numVertices; + (*vertexbase) = (const unsigned char *)mesh.m_vertexBase; + type = PHY_FLOAT; + vertexStride = mesh.m_vertexStride; + + numfaces = mesh.m_numTriangles; + (*indexbase) = (const unsigned char *)mesh.m_triangleIndexBase; + indexstride = mesh.m_triangleIndexStride; + indicestype = PHY_INTEGER; +} + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h new file mode 100644 index 00000000000..6ab6a762b39 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h @@ -0,0 +1,97 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_TRIANGLE_INDEX_VERTEX_ARRAY_H +#define BT_TRIANGLE_INDEX_VERTEX_ARRAY_H + +#include "btStridingMeshInterface.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +///IndexedMesh indexes into existing vertex and index arrays, in a similar way OpenGL glDrawElements +///instead of the number of indices, we pass the number of triangles +///todo: explain with pictures +ATTRIBUTE_ALIGNED16( struct) btIndexedMesh +{ + int m_numTriangles; + const unsigned char * m_triangleIndexBase; + int m_triangleIndexStride; + int m_numVertices; + const unsigned char * m_vertexBase; + int m_vertexStride; + int pad[2]; +} +; + + +typedef btAlignedObjectArray IndexedMeshArray; + +///TriangleIndexVertexArray allows to use multiple meshes, by indexing into existing triangle/index arrays. +///Additional meshes can be added using addIndexedMesh +///No duplcate is made of the vertex/index data, it only indexes into external vertex/index arrays. +///So keep those arrays around during the lifetime of this btTriangleIndexVertexArray. +ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshInterface +{ + IndexedMeshArray m_indexedMeshes; + int m_pad[3]; + + +public: + + btTriangleIndexVertexArray() + { + } + + //just to be backwards compatible + btTriangleIndexVertexArray(int numTriangleIndices,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride); + + void addIndexedMesh(const btIndexedMesh& mesh) + { + m_indexedMeshes.push_back(mesh); + } + + + virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0); + + virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const; + + /// unLockVertexBase finishes the access to a subpart of the triangle mesh + /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished + virtual void unLockVertexBase(int subpart) {(void)subpart;} + + virtual void unLockReadOnlyVertexBase(int subpart) const {(void)subpart;} + + /// getNumSubParts returns the number of seperate subparts + /// each subpart has a continuous array of vertices and indices + virtual int getNumSubParts() const { + return (int)m_indexedMeshes.size(); + } + + IndexedMeshArray& getIndexedMeshArray() + { + return m_indexedMeshes; + } + + const IndexedMeshArray& getIndexedMeshArray() const + { + return m_indexedMeshes; + } + + virtual void preallocateVertices(int numverts){(void) numverts;} + virtual void preallocateIndices(int numindices){(void) numindices;} + +} +; + +#endif //BT_TRIANGLE_INDEX_VERTEX_ARRAY_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp new file mode 100644 index 00000000000..98c54ef45f8 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp @@ -0,0 +1,60 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btTriangleMesh.h" +#include + + +btTriangleMesh::btTriangleMesh () +{ + +} + +void btTriangleMesh::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) +{ + (void)subpart; + numverts = m_vertices.size(); + *vertexbase = (unsigned char*)&m_vertices[0]; + type = PHY_FLOAT; + stride = sizeof(btVector3); + + numfaces = m_indices.size()/3; + *indexbase = (unsigned char*) &m_indices[0]; + indicestype = PHY_INTEGER; + indexstride = 3*sizeof(int); + +} + +void btTriangleMesh::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const +{ + (void)subpart; + numverts = m_vertices.size(); + *vertexbase = (unsigned char*)&m_vertices[0]; + type = PHY_FLOAT; + stride = sizeof(btVector3); + + numfaces = m_indices.size()/3; + *indexbase = (unsigned char*) &m_indices[0]; + indicestype = PHY_INTEGER; + indexstride = 3*sizeof(int); + +} + + + +int btTriangleMesh::getNumSubParts() const +{ + return 1; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h new file mode 100644 index 00000000000..525f5336b48 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMesh.h @@ -0,0 +1,75 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef TRIANGLE_MESH_H +#define TRIANGLE_MESH_H + +#include "btStridingMeshInterface.h" +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btAlignedObjectArray.h" + +///TriangleMesh provides storage for a concave triangle mesh. It can be used as data for the btTriangleMeshShape. +class btTriangleMesh : public btStridingMeshInterface +{ + btAlignedObjectArray m_vertices; + btAlignedObjectArray m_indices; + + public: + btTriangleMesh (); + + void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2) + { + int curIndex = m_indices.size(); + m_vertices.push_back(vertex0); + m_vertices.push_back(vertex1); + m_vertices.push_back(vertex2); + + m_indices.push_back(curIndex++); + m_indices.push_back(curIndex++); + m_indices.push_back(curIndex++); + } + + int getNumTriangles() const + { + return m_indices.size() / 3; + } + + + +//StridingMeshInterface interface implementation + + virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0); + + virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const; + + /// unLockVertexBase finishes the access to a subpart of the triangle mesh + /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished + virtual void unLockVertexBase(int subpart) {(void) subpart;} + + virtual void unLockReadOnlyVertexBase(int subpart) const { (void) subpart;} + + /// getNumSubParts returns the number of seperate subparts + /// each subpart has a continuous array of vertices and indices + virtual int getNumSubParts() const; + + virtual void preallocateVertices(int numverts){(void) numverts;} + virtual void preallocateIndices(int numindices){(void) numindices;} + + +}; + +#endif //TRIANGLE_MESH_H + diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp new file mode 100644 index 00000000000..ed81897b515 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp @@ -0,0 +1,203 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btTriangleMeshShape.h" +#include "LinearMath/btVector3.h" +#include "LinearMath/btQuaternion.h" +#include "btStridingMeshInterface.h" +#include "LinearMath/btAabbUtil2.h" +#include "BulletCollision/CollisionShapes/btCollisionMargin.h" + +#include "stdio.h" + +btTriangleMeshShape::btTriangleMeshShape(btStridingMeshInterface* meshInterface) +: m_meshInterface(meshInterface) +{ + recalcLocalAabb(); +} + + +btTriangleMeshShape::~btTriangleMeshShape() +{ + +} + + + + +void btTriangleMeshShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const +{ + + btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin); + btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin); + + btMatrix3x3 abs_b = trans.getBasis().absolute(); + + btPoint3 center = trans(localCenter); + + btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents), + abs_b[1].dot(localHalfExtents), + abs_b[2].dot(localHalfExtents)); + extent += btVector3(getMargin(),getMargin(),getMargin()); + + aabbMin = center - extent; + aabbMax = center + extent; + + +} + +void btTriangleMeshShape::recalcLocalAabb() +{ + for (int i=0;i<3;i++) + { + btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.)); + vec[i] = btScalar(1.); + btVector3 tmp = localGetSupportingVertex(vec); + m_localAabbMax[i] = tmp[i]+m_collisionMargin; + vec[i] = btScalar(-1.); + tmp = localGetSupportingVertex(vec); + m_localAabbMin[i] = tmp[i]-m_collisionMargin; + } +} + + + +class SupportVertexCallback : public btTriangleCallback +{ + + btVector3 m_supportVertexLocal; +public: + + btTransform m_worldTrans; + btScalar m_maxDot; + btVector3 m_supportVecLocal; + + SupportVertexCallback(const btVector3& supportVecWorld,const btTransform& trans) + : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), m_worldTrans(trans) ,m_maxDot(btScalar(-1e30)) + + { + m_supportVecLocal = supportVecWorld * m_worldTrans.getBasis(); + } + + virtual void processTriangle( btVector3* triangle,int partId, int triangleIndex) + { + (void)partId; + (void)triangleIndex; + for (int i=0;i<3;i++) + { + btScalar dot = m_supportVecLocal.dot(triangle[i]); + if (dot > m_maxDot) + { + m_maxDot = dot; + m_supportVertexLocal = triangle[i]; + } + } + } + + btVector3 GetSupportVertexWorldSpace() + { + return m_worldTrans(m_supportVertexLocal); + } + + btVector3 GetSupportVertexLocal() + { + return m_supportVertexLocal; + } + +}; + + +void btTriangleMeshShape::setLocalScaling(const btVector3& scaling) +{ + m_meshInterface->setScaling(scaling); + recalcLocalAabb(); +} + +const btVector3& btTriangleMeshShape::getLocalScaling() const +{ + return m_meshInterface->getScaling(); +} + + + + + + +//#define DEBUG_TRIANGLE_MESH + + +void btTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const +{ + struct FilteredCallback : public btInternalTriangleIndexCallback + { + btTriangleCallback* m_callback; + btVector3 m_aabbMin; + btVector3 m_aabbMax; + + FilteredCallback(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) + :m_callback(callback), + m_aabbMin(aabbMin), + m_aabbMax(aabbMax) + { + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + if (TestTriangleAgainstAabb2(&triangle[0],m_aabbMin,m_aabbMax)) + { + //check aabb in triangle-space, before doing this + m_callback->processTriangle(triangle,partId,triangleIndex); + } + + } + + }; + + FilteredCallback filterCallback(callback,aabbMin,aabbMax); + + m_meshInterface->InternalProcessAllTriangles(&filterCallback,aabbMin,aabbMax); +} + + + + + + +void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) +{ + (void)mass; + //moving concave objects not supported + btAssert(0); + inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); +} + + +btVector3 btTriangleMeshShape::localGetSupportingVertex(const btVector3& vec) const +{ + btVector3 supportVertex; + + btTransform ident; + ident.setIdentity(); + + SupportVertexCallback supportCallback(vec,ident); + + btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + + processAllTriangles(&supportCallback,-aabbMax,aabbMax); + + supportVertex = supportCallback.GetSupportVertexLocal(); + + return supportVertex; +} diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h new file mode 100644 index 00000000000..e6173e47640 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h @@ -0,0 +1,78 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef TRIANGLE_MESH_SHAPE_H +#define TRIANGLE_MESH_SHAPE_H + +#include "btConcaveShape.h" +#include "btStridingMeshInterface.h" + + +///Concave triangle mesh. Uses an interface to access the triangles to allow for sharing graphics/physics triangles. +class btTriangleMeshShape : public btConcaveShape +{ +protected: + btVector3 m_localAabbMin; + btVector3 m_localAabbMax; + btStridingMeshInterface* m_meshInterface; + + +public: + btTriangleMeshShape(btStridingMeshInterface* meshInterface); + + virtual ~btTriangleMeshShape(); + + virtual btVector3 localGetSupportingVertex(const btVector3& vec) const; + + virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const + { + assert(0); + return localGetSupportingVertex(vec); + } + + void recalcLocalAabb(); + + virtual int getShapeType() const + { + return TRIANGLE_MESH_SHAPE_PROXYTYPE; + } + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; + + virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; + + virtual void calculateLocalInertia(btScalar mass,btVector3& inertia); + + virtual void setLocalScaling(const btVector3& scaling); + virtual const btVector3& getLocalScaling() const; + + btStridingMeshInterface* getMeshInterface() + { + return m_meshInterface; + } + + const btStridingMeshInterface* getMeshInterface() const + { + return m_meshInterface; + } + + + //debugging + virtual char* getName()const {return "TRIANGLEMESH";} + + +}; + +#endif //TRIANGLE_MESH_SHAPE_H diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h new file mode 100644 index 00000000000..c2e240c051c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleShape.h @@ -0,0 +1,179 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef OBB_TRIANGLE_MINKOWSKI_H +#define OBB_TRIANGLE_MINKOWSKI_H + +#include "btConvexShape.h" +#include "btBoxShape.h" + +class btTriangleShape : public btPolyhedralConvexShape +{ + + +public: + + btVector3 m_vertices1[3]; + + + virtual int getNumVertices() const + { + return 3; + } + + const btVector3& getVertexPtr(int index) const + { + return m_vertices1[index]; + } + virtual void getVertex(int index,btVector3& vert) const + { + vert = m_vertices1[index]; + } + virtual int getShapeType() const + { + return TRIANGLE_SHAPE_PROXYTYPE; + } + + virtual int getNumEdges() const + { + return 3; + } + + virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const + { + getVertex(i,pa); + getVertex((i+1)%3,pb); + } + + + virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax)const + { +// btAssert(0); + getAabbSlow(t,aabbMin,aabbMax); + } + + btVector3 localGetSupportingVertexWithoutMargin(const btVector3& dir)const + { + btVector3 dots(dir.dot(m_vertices1[0]), dir.dot(m_vertices1[1]), dir.dot(m_vertices1[2])); + return m_vertices1[dots.maxAxis()]; + + } + + virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const + { + for (int i=0;i= -tolerance && dist <= tolerance) + { + //inside check on edge-planes + int i; + for (i=0;i<3;i++) + { + btPoint3 pa,pb; + getEdge(i,pa,pb); + btVector3 edge = pb-pa; + btVector3 edgeNormal = edge.cross(normal); + edgeNormal.normalize(); + btScalar dist = pt.dot( edgeNormal); + btScalar edgeConst = pa.dot(edgeNormal); + dist -= edgeConst; + if (dist < -tolerance) + return false; + } + + return true; + } + + return false; + } + //debugging + virtual char* getName()const + { + return "Triangle"; + } + + virtual int getNumPreferredPenetrationDirections() const + { + return 2; + } + + virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const + { + calcNormal(penetrationVector); + if (index) + penetrationVector *= btScalar(-1.); + } + + +}; + +#endif //OBB_TRIANGLE_MINKOWSKI_H + diff --git a/extern/bullet2/src/BulletCollision/Doxyfile b/extern/bullet2/src/BulletCollision/Doxyfile new file mode 100644 index 00000000000..4ecb6acb62f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/Doxyfile @@ -0,0 +1,746 @@ +# Doxyfile 1.2.4 + +# This file describes the settings to be used by doxygen for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. +PROJECT_NAME = "Bullet Continuous Collision Detection Library" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, +# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, +# Polish, Portuguese and Slovene. + +OUTPUT_LANGUAGE = English + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these class will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. It is allowed to use relative paths in the argument list. + +STRIP_FROM_PATH = + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a class diagram (in Html and LaTeX) for classes with base or +# super classes. Setting the tag to NO turns the diagrams off. + +CLASS_DIAGRAMS = YES + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower case letters. If set to YES upper case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# users are adviced to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explict @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# reimplements. + +INHERIT_DOCS = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# The ENABLE_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = . + + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +FILE_PATTERNS = *.h *.cpp *.c + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. + +INPUT_FILTER = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse. + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript and frames is required (for instance Netscape 4.0+ +# or Internet explorer 4.0+). + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimised for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using a WORD or other. +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assigments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. Warning: This feature +# is still experimental and very incomplete. + +GENERATE_XML = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_PREDEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = ../../generic/extern + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES tag can be used to specify one or more tagfiles. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to +# YES then doxygen will generate a graph for each documented file showing +# the direct and indirect include dependencies of the file with other +# documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to +# YES then doxygen will generate a graph for each documented header file showing +# the documented files that directly or indirectly include this file + +INCLUDED_BY_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found on the path. + +DOT_PATH = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO + +# The CGI_NAME tag should be the name of the CGI script that +# starts the search engine (doxysearch) with the correct parameters. +# A script with this name will be generated by doxygen. + +CGI_NAME = search.cgi + +# The CGI_URL tag should be the absolute URL to the directory where the +# cgi binaries are located. See the documentation of your http daemon for +# details. + +CGI_URL = + +# The DOC_URL tag should be the absolute URL to the directory where the +# documentation is located. If left blank the absolute path to the +# documentation, with file:// prepended to it, will be used. + +DOC_URL = + +# The DOC_ABSPATH tag should be the absolute path to the directory where the +# documentation is located. If left blank the directory on the local machine +# will be used. + +DOC_ABSPATH = + +# The BIN_ABSPATH tag must point to the directory where the doxysearch binary +# is installed. + +BIN_ABSPATH = c:\program files\doxygen\bin + +# The EXT_DOC_PATHS tag can be used to specify one or more paths to +# documentation generated for other projects. This allows doxysearch to search +# the documentation for these projects as well. + +EXT_DOC_PATHS = diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp new file mode 100644 index 00000000000..2c565734e97 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp @@ -0,0 +1,200 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btContinuousConvexCollision.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" +#include "LinearMath/btTransformUtil.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" + +#include "btGjkPairDetector.h" +#include "btPointCollector.h" + + + +btContinuousConvexCollision::btContinuousConvexCollision ( btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver) +:m_simplexSolver(simplexSolver), +m_penetrationDepthSolver(penetrationDepthSolver), +m_convexA(convexA),m_convexB(convexB) +{ +} + +/// This maximum should not be necessary. It allows for untested/degenerate cases in production code. +/// You don't want your game ever to lock-up. +#define MAX_ITERATIONS 1000 + +bool btContinuousConvexCollision::calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result) +{ + + m_simplexSolver->reset(); + + /// compute linear and angular velocity for this interval, to interpolate + btVector3 linVelA,angVelA,linVelB,angVelB; + btTransformUtil::calculateVelocity(fromA,toA,btScalar(1.),linVelA,angVelA); + btTransformUtil::calculateVelocity(fromB,toB,btScalar(1.),linVelB,angVelB); + + btScalar boundingRadiusA = m_convexA->getAngularMotionDisc(); + btScalar boundingRadiusB = m_convexB->getAngularMotionDisc(); + + btScalar maxAngularProjectedVelocity = angVelA.length() * boundingRadiusA + angVelB.length() * boundingRadiusB; + + btScalar radius = btScalar(0.001); + + btScalar lambda = btScalar(0.); + btVector3 v(1,0,0); + + int maxIter = MAX_ITERATIONS; + + btVector3 n; + n.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); + bool hasResult = false; + btVector3 c; + + btScalar lastLambda = lambda; + //btScalar epsilon = btScalar(0.001); + + int numIter = 0; + //first solution, using GJK + + + btTransform identityTrans; + identityTrans.setIdentity(); + + btSphereShape raySphere(btScalar(0.0)); + raySphere.setMargin(btScalar(0.)); + + +// result.drawCoordSystem(sphereTr); + + btPointCollector pointCollector1; + + { + + btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,m_penetrationDepthSolver); + btGjkPairDetector::ClosestPointInput input; + + //we don't use margins during CCD + gjk.setIgnoreMargin(true); + + input.m_transformA = fromA; + input.m_transformB = fromB; + gjk.getClosestPoints(input,pointCollector1,0); + + hasResult = pointCollector1.m_hasResult; + c = pointCollector1.m_pointInWorld; + } + + if (hasResult) + { + btScalar dist; + dist = pointCollector1.m_distance; + n = pointCollector1.m_normalOnBInWorld; + + //not close enough + while (dist > radius) + { + numIter++; + if (numIter > maxIter) + return false; //todo: report a failure + + btScalar dLambda = btScalar(0.); + + //calculate safe moving fraction from distance / (linear+rotational velocity) + + //btScalar clippedDist = GEN_min(angularConservativeRadius,dist); + //btScalar clippedDist = dist; + + btScalar projectedLinearVelocity = (linVelB-linVelA).dot(n); + + dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity); + + lambda = lambda + dLambda; + + if (lambda > btScalar(1.)) + return false; + + if (lambda < btScalar(0.)) + return false; + + //todo: next check with relative epsilon + if (lambda <= lastLambda) + break; + lastLambda = lambda; + + + + //interpolate to next lambda + btTransform interpolatedTransA,interpolatedTransB,relativeTrans; + + btTransformUtil::integrateTransform(fromA,linVelA,angVelA,lambda,interpolatedTransA); + btTransformUtil::integrateTransform(fromB,linVelB,angVelB,lambda,interpolatedTransB); + relativeTrans = interpolatedTransB.inverseTimes(interpolatedTransA); + + result.DebugDraw( lambda ); + + btPointCollector pointCollector; + btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,m_penetrationDepthSolver); + btGjkPairDetector::ClosestPointInput input; + input.m_transformA = interpolatedTransA; + input.m_transformB = interpolatedTransB; + gjk.getClosestPoints(input,pointCollector,0); + if (pointCollector.m_hasResult) + { + if (pointCollector.m_distance < btScalar(0.)) + { + //degenerate ?! + result.m_fraction = lastLambda; + result.m_normal = n; + return true; + } + c = pointCollector.m_pointInWorld; + + dist = pointCollector.m_distance; + } else + { + //?? + return false; + } + + } + + result.m_fraction = lambda; + result.m_normal = n; + return true; + } + + return false; + +/* +//todo: + //if movement away from normal, discard result + btVector3 move = transBLocalTo.getOrigin() - transBLocalFrom.getOrigin(); + if (result.m_fraction < btScalar(1.)) + { + if (move.dot(result.m_normal) <= btScalar(0.)) + { + } + } +*/ + +} + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h new file mode 100644 index 00000000000..9901bab4b45 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h @@ -0,0 +1,52 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef CONTINUOUS_COLLISION_CONVEX_CAST_H +#define CONTINUOUS_COLLISION_CONVEX_CAST_H + +#include "btConvexCast.h" +#include "btSimplexSolverInterface.h" +class btConvexPenetrationDepthSolver; +class btConvexShape; + +/// btContinuousConvexCollision implements angular and linear time of impact for convex objects. +/// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis). +/// Algorithm operates in worldspace, in order to keep inbetween motion globally consistent. +/// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops +class btContinuousConvexCollision : public btConvexCast +{ + btSimplexSolverInterface* m_simplexSolver; + btConvexPenetrationDepthSolver* m_penetrationDepthSolver; + btConvexShape* m_convexA; + btConvexShape* m_convexB; + + +public: + + btContinuousConvexCollision (btConvexShape* shapeA,btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); + + virtual bool calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result); + + +}; + +#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp new file mode 100644 index 00000000000..d2a1310b232 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp @@ -0,0 +1,20 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btConvexCast.h" + +btConvexCast::~btConvexCast() +{ +} diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h new file mode 100644 index 00000000000..3101b59993d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h @@ -0,0 +1,71 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef CONVEX_CAST_H +#define CONVEX_CAST_H + +#include "../../LinearMath/btTransform.h" +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btScalar.h" +class btMinkowskiSumShape; +#include "../../LinearMath/btIDebugDraw.h" + +/// btConvexCast is an interface for Casting +class btConvexCast +{ +public: + + + virtual ~btConvexCast(); + + ///RayResult stores the closest result + /// alternatively, add a callback method to decide about closest/all results + struct CastResult + { + //virtual bool addRayResult(const btVector3& normal,btScalar fraction) = 0; + + virtual void DebugDraw(btScalar fraction) {(void)fraction;} + virtual void drawCoordSystem(const btTransform& trans) {(void)trans;} + + CastResult() + :m_fraction(btScalar(1e30)), + m_debugDrawer(0) + { + } + + + virtual ~CastResult() {}; + + btVector3 m_normal; + btScalar m_fraction; + btTransform m_hitTransformA; + btTransform m_hitTransformB; + + btIDebugDraw* m_debugDrawer; + + }; + + + /// cast a convex against another convex object + virtual bool calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result) = 0; +}; + +#endif //CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h new file mode 100644 index 00000000000..7caeba4be45 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h @@ -0,0 +1,43 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef CONVEX_PENETRATION_DEPTH_H +#define CONVEX_PENETRATION_DEPTH_H + +class btStackAlloc; +class btVector3; +#include "btSimplexSolverInterface.h" +class btConvexShape; +#include "../../LinearMath/btPoint3.h" +class btTransform; + +///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation. +class btConvexPenetrationDepthSolver +{ +public: + + virtual ~btConvexPenetrationDepthSolver() {}; + virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, + btConvexShape* convexA,btConvexShape* convexB, + const btTransform& transA,const btTransform& transB, + btVector3& v, btPoint3& pa, btPoint3& pb, + class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc + ) = 0; + + +}; +#endif //CONVEX_PENETRATION_DEPTH_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h new file mode 100644 index 00000000000..15000c1ab61 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h @@ -0,0 +1,88 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef DISCRETE_COLLISION_DETECTOR1_INTERFACE_H +#define DISCRETE_COLLISION_DETECTOR1_INTERFACE_H +#include "../../LinearMath/btTransform.h" +#include "../../LinearMath/btVector3.h" +class btStackAlloc; + +/// This interface is made to be used by an iterative approach to do TimeOfImpact calculations +/// This interface allows to query for closest points and penetration depth between two (convex) objects +/// the closest point is on the second object (B), and the normal points from the surface on B towards A. +/// distance is between closest points on B and closest point on A. So you can calculate closest point on A +/// by taking closestPointInA = closestPointInB + m_distance * m_normalOnSurfaceB +struct btDiscreteCollisionDetectorInterface +{ + + struct Result + { + + virtual ~Result(){} + + ///setShapeIdentifiers provides experimental support for per-triangle material / custom material combiner + virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1)=0; + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)=0; + }; + + struct ClosestPointInput + { + ClosestPointInput() + :m_maximumDistanceSquared(btScalar(1e30)), + m_stackAlloc(0) + { + } + + btTransform m_transformA; + btTransform m_transformB; + btScalar m_maximumDistanceSquared; + btStackAlloc* m_stackAlloc; + }; + + virtual ~btDiscreteCollisionDetectorInterface() {}; + + // + // give either closest points (distance > 0) or penetration (distance) + // the normal always points from B towards A + // + virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) = 0; + +}; + +struct btStorageResult : public btDiscreteCollisionDetectorInterface::Result +{ + btVector3 m_normalOnSurfaceB; + btVector3 m_closestPointInB; + btScalar m_distance; //negative means penetration ! + + btStorageResult() : m_distance(btScalar(1e30)) + { + + } + virtual ~btStorageResult() {}; + + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) + { + if (depth < m_distance) + { + m_normalOnSurfaceB = normalOnBInWorld; + m_closestPointInB = pointInWorld; + m_distance = depth; + } + } +}; + +#endif //DISCRETE_COLLISION_DETECTOR_INTERFACE1_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp new file mode 100644 index 00000000000..93edffeafd6 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp @@ -0,0 +1,174 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#include "btGjkConvexCast.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "btGjkPairDetector.h" +#include "btPointCollector.h" + + +btGjkConvexCast::btGjkConvexCast(btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) +:m_simplexSolver(simplexSolver), +m_convexA(convexA), +m_convexB(convexB) +{ +} + +bool btGjkConvexCast::calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result) +{ + + + btMinkowskiSumShape combi(m_convexA,m_convexB); + btMinkowskiSumShape* convex = &combi; + + btTransform rayFromLocalA; + btTransform rayToLocalA; + + rayFromLocalA = fromA.inverse()* fromB; + rayToLocalA = toA.inverse()* toB; + + + btTransform trA,trB; + trA = btTransform(fromA); + trB = btTransform(fromB); + trA.setOrigin(btPoint3(0,0,0)); + trB.setOrigin(btPoint3(0,0,0)); + + convex->setTransformA(trA); + convex->setTransformB(trB); + + + + + btScalar radius = btScalar(0.01); + + btScalar lambda = btScalar(0.); + btVector3 s = rayFromLocalA.getOrigin(); + btVector3 r = rayToLocalA.getOrigin()-rayFromLocalA.getOrigin(); + btVector3 x = s; + btVector3 n; + n.setValue(0,0,0); + bool hasResult = false; + btVector3 c; + + btScalar lastLambda = lambda; + + //first solution, using GJK + + //no penetration support for now, perhaps pass a pointer when we really want it + btConvexPenetrationDepthSolver* penSolverPtr = 0; + + btTransform identityTrans; + identityTrans.setIdentity(); + + btSphereShape raySphere(btScalar(0.0)); + raySphere.setMargin(btScalar(0.)); + + btTransform sphereTr; + sphereTr.setIdentity(); + sphereTr.setOrigin( rayFromLocalA.getOrigin()); + + result.drawCoordSystem(sphereTr); + { + btPointCollector pointCollector1; + btGjkPairDetector gjk(&raySphere,convex,m_simplexSolver,penSolverPtr); + + btGjkPairDetector::ClosestPointInput input; + input.m_transformA = sphereTr; + input.m_transformB = identityTrans; + gjk.getClosestPoints(input,pointCollector1,0); + + hasResult = pointCollector1.m_hasResult; + c = pointCollector1.m_pointInWorld; + n = pointCollector1.m_normalOnBInWorld; + } + + + + if (hasResult) + { + btScalar dist; + dist = (c-x).length(); + if (dist < radius) + { + //penetration + lastLambda = btScalar(1.); + } + + //not close enough + while (dist > radius) + { + + n = x - c; + btScalar nDotr = n.dot(r); + + if (nDotr >= -(SIMD_EPSILON*SIMD_EPSILON)) + return false; + + lambda = lambda - n.dot(n) / nDotr; + if (lambda <= lastLambda) + break; + + lastLambda = lambda; + + x = s + lambda * r; + + sphereTr.setOrigin( x ); + result.drawCoordSystem(sphereTr); + btPointCollector pointCollector; + btGjkPairDetector gjk(&raySphere,convex,m_simplexSolver,penSolverPtr); + btGjkPairDetector::ClosestPointInput input; + input.m_transformA = sphereTr; + input.m_transformB = identityTrans; + gjk.getClosestPoints(input,pointCollector,0); + if (pointCollector.m_hasResult) + { + if (pointCollector.m_distance < btScalar(0.)) + { + //degeneracy, report a hit + result.m_fraction = lastLambda; + result.m_normal = n; + return true; + } + c = pointCollector.m_pointInWorld; + dist = (c-x).length(); + } else + { + //?? + return false; + } + + } + + if (lastLambda < btScalar(1.)) + { + + result.m_fraction = lastLambda; + result.m_normal = n; + return true; + } + } + + return false; +} + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h new file mode 100644 index 00000000000..3905c45e6d6 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h @@ -0,0 +1,50 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef GJK_CONVEX_CAST_H +#define GJK_CONVEX_CAST_H + +#include "../CollisionShapes/btCollisionMargin.h" + +#include "../../LinearMath/btVector3.h" +#include "btConvexCast.h" +class btConvexShape; +class btMinkowskiSumShape; +#include "btSimplexSolverInterface.h" + +///GjkConvexCast performs a raycast on a convex object using support mapping. +class btGjkConvexCast : public btConvexCast +{ + btSimplexSolverInterface* m_simplexSolver; + btConvexShape* m_convexA; + btConvexShape* m_convexB; + +public: + + btGjkConvexCast(btConvexShape* convexA,btConvexShape* convexB,btSimplexSolverInterface* simplexSolver); + + /// cast a convex against another convex object + virtual bool calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result); + +}; + +#endif //GJK_CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp new file mode 100644 index 00000000000..8abdfdbb7e5 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp @@ -0,0 +1,628 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the +use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software in a +product, an acknowledgment in the product documentation would be appreciated +but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* +GJK-EPA collision solver by Nathanael Presson +Nov.2006 +*/ + +#include "btGjkEpa.h" +#include //for memset +#include + +#if defined(DEBUG) || defined (_DEBUG) +#include //for debug printf +#ifdef __SPU__ +#include +#define printf spu_printf +#endif //__SPU__ +#endif + +namespace gjkepa_impl +{ + +// +// Port. typedefs +// + +typedef btScalar F; +typedef bool Z; +typedef int I; +typedef unsigned int U; +typedef unsigned char U1; +typedef unsigned short U2; + +typedef btVector3 Vector3; +typedef btMatrix3x3 Rotation; + +// +// Config +// + +#if 0 +#define BTLOCALSUPPORT localGetSupportingVertexWithoutMargin +#else +#define BTLOCALSUPPORT localGetSupportingVertex +#endif + +// +// Const +// + + +#define cstInf SIMD_INFINITY +#define cstPi SIMD_PI +#define cst2Pi SIMD_2_PI +#define GJK_maxiterations (128) +#define GJK_hashsize (1<<6) +#define GJK_hashmask (GJK_hashsize-1) +#define GJK_insimplex_eps F(0.0001) +#define GJK_sqinsimplex_eps (GJK_insimplex_eps*GJK_insimplex_eps) +#define EPA_maxiterations 256 +#define EPA_inface_eps F(0.01) +#define EPA_accuracy F(0.001) + +// +// Utils +// + +static inline F Abs(F v) { return(v<0?-v:v); } +static inline F Sign(F v) { return(F(v<0?-1:1)); } +template static inline void Swap(T& a,T& b) { T +t(a);a=b;b=t; } +template static inline T Min(const T& a,const T& b) { +return(a static inline T Max(const T& a,const T& b) { +return(a>b?a:b); } +static inline void ClearMemory(void* p,U sz) { memset(p,0,(size_t)sz); +} +#if 0 +template static inline void Raise(const T& object) { +throw(object); } +#else +template static inline void Raise(const T&) {} +#endif + + + +// +// GJK +// +struct GJK + { + struct Mkv + { + Vector3 w; /* Minkowski vertice */ + Vector3 r; /* Ray */ + }; + struct He + { + Vector3 v; + He* n; + }; + btStackAlloc* sa; + btBlock* sablock; + He* table[GJK_hashsize]; + Rotation wrotations[2]; + Vector3 positions[2]; + const btConvexShape* shapes[2]; + Mkv simplex[5]; + Vector3 ray; + U order; + U iterations; + F margin; + Z failed; + // + GJK(btStackAlloc* psa, + const Rotation& wrot0,const Vector3& pos0,const btConvexShape* shape0, + const Rotation& wrot1,const Vector3& pos1,const btConvexShape* shape1, + F pmargin=0) + { + wrotations[0]=wrot0;positions[0]=pos0;shapes[0]=shape0; + wrotations[1]=wrot1;positions[1]=pos1;shapes[1]=shape1; + sa =psa; + sablock =sa->beginBlock(); + margin =pmargin; + failed =false; + } + // + ~GJK() + { + sa->endBlock(sablock); + } + // vdh : very dumm hash + static inline U Hash(const Vector3& v) + { + //this doesn't compile under GCC 3.3.5, so add the ()... + //const U h(U(v[0]*15461)^U(v[1]*83003)^U(v[2]*15473)); + //return(((*((const U*)&h))*169639)&GJK_hashmask); + const U h((U)(v[0]*15461)^(U)(v[1]*83003)^(U)(v[2]*15473)); + return(((*((const U*)&h))*169639)&GJK_hashmask); + } + // + inline Vector3 LocalSupport(const Vector3& d,U i) const + { + return(wrotations[i]*shapes[i]->BTLOCALSUPPORT(d*wrotations[i])+positions[i]); + } + // + inline void Support(const Vector3& d,Mkv& v) const + { + v.r = d; + v.w = LocalSupport(d,0)-LocalSupport(-d,1)+d*margin; + } + #define SPX(_i_) simplex[_i_] + #define SPXW(_i_) simplex[_i_].w + // + inline Z FetchSupport() + { + const U h(Hash(ray)); + He* e = (He*)(table[h]); + while(e) { if(e->v==ray) { --order;return(false); } else e=e->n; } + e=(He*)sa->allocate(sizeof(He));e->v=ray;e->n=table[h];table[h]=e; + Support(ray,simplex[++order]); + return(ray.dot(SPXW(order))>0); + } + // + inline Z SolveSimplex2(const Vector3& ao,const Vector3& ab) + { + if(ab.dot(ao)>=0) + { + const Vector3 cabo(cross(ab,ao)); + if(cabo.length2()>GJK_sqinsimplex_eps) + { ray=cross(cabo,ab); } + else + { return(true); } + } + else + { order=0;SPX(0)=SPX(1);ray=ao; } + return(false); + } + // + inline Z SolveSimplex3(const Vector3& ao,const Vector3& ab,const Vector3& +ac) + { + return(SolveSimplex3a(ao,ab,ac,cross(ab,ac))); + } + // + inline Z SolveSimplex3a(const Vector3& ao,const Vector3& ab,const Vector3& +ac,const Vector3& cabc) + { + if((cross(cabc,ab)).dot(ao)<-GJK_insimplex_eps) + { order=1;SPX(0)=SPX(1);SPX(1)=SPX(2);return(SolveSimplex2(ao,ab)); } + else if((cross(cabc,ac)).dot(ao)>+GJK_insimplex_eps) + { order=1;SPX(1)=SPX(2);return(SolveSimplex2(ao,ac)); } + else + { + const F d(cabc.dot(ao)); + if(Abs(d)>GJK_insimplex_eps) + { + if(d>0) + { ray=cabc; } + else + { ray=-cabc;Swap(SPX(0),SPX(1)); } + return(false); + } else return(true); + } + } + // + inline Z SolveSimplex4(const Vector3& ao,const Vector3& ab,const Vector3& +ac,const Vector3& ad) + { + Vector3 crs; + if((crs=cross(ab,ac)).dot(ao)>GJK_insimplex_eps) + { +order=2;SPX(0)=SPX(1);SPX(1)=SPX(2);SPX(2)=SPX(3);return(SolveSimplex3a(ao,ab,ac,crs)); +} + else if((crs=cross(ac,ad)).dot(ao)>GJK_insimplex_eps) + { order=2;SPX(2)=SPX(3);return(SolveSimplex3a(ao,ac,ad,crs)); } + else if((crs=cross(ad,ab)).dot(ao)>GJK_insimplex_eps) + { +order=2;SPX(1)=SPX(0);SPX(0)=SPX(2);SPX(2)=SPX(3);return(SolveSimplex3a(ao,ad,ab,crs)); +} + else return(true); + } + // + inline Z SearchOrigin(const Vector3& initray=Vector3(1,0,0)) + { + iterations = 0; + order = (U)-1; + failed = false; + ray = initray.normalized(); + ClearMemory(table,sizeof(void*)*GJK_hashsize); + FetchSupport(); + ray = -SPXW(0); + for(;iterations0?rl:1; + if(FetchSupport()) + { + Z found(false); + switch(order) + { + case 1: found=SolveSimplex2(-SPXW(1),SPXW(0)-SPXW(1));break; + case 2: found=SolveSimplex3(-SPXW(2),SPXW(1)-SPXW(2),SPXW(0)-SPXW(2));break; + case 3: found=SolveSimplex4(-SPXW(3),SPXW(2)-SPXW(3),SPXW(1)-SPXW(3),SPXW(0)-SPXW(3));break; + } + if(found) return(true); + } else return(false); + } + failed=true; + return(false); + } + // + inline Z EncloseOrigin() + { + switch(order) + { + /* Point */ + case 0: break; + /* Line */ + case 1: + { + const Vector3 ab(SPXW(1)-SPXW(0)); + const Vector3 b[]={ cross(ab,Vector3(1,0,0)), + cross(ab,Vector3(0,1,0)), + cross(ab,Vector3(0,0,1))}; + const F m[]={b[0].length2(),b[1].length2(),b[2].length2()}; + const Rotation r(btQuaternion(ab.normalized(),cst2Pi/3)); + Vector3 w(b[m[0]>m[1]?m[0]>m[2]?0:2:m[1]>m[2]?1:2]); + Support(w.normalized(),simplex[4]);w=r*w; + Support(w.normalized(),simplex[2]);w=r*w; + Support(w.normalized(),simplex[3]);w=r*w; + order=4; + return(true); + } + break; + /* Triangle */ + case 2: + { + const +Vector3 n(cross((SPXW(1)-SPXW(0)),(SPXW(2)-SPXW(0))).normalized()); + Support( n,simplex[3]); + Support(-n,simplex[4]); + order=4; + return(true); + } + break; + /* Tetrahedron */ + case 3: return(true); + /* Hexahedron */ + case 4: return(true); + } + return(false); + } + #undef SPX + #undef SPXW + }; + +// +// EPA +// +struct EPA + { + // + struct Face + { + const GJK::Mkv* v[3]; + Face* f[3]; + U e[3]; + Vector3 n; + F d; + U mark; + Face* prev; + Face* next; + Face() {} + }; + // + GJK* gjk; + btStackAlloc* sa; + Face* root; + U nfaces; + U iterations; + Vector3 features[2][3]; + Vector3 nearest[2]; + Vector3 normal; + F depth; + Z failed; + // + EPA(GJK* pgjk) + { + gjk = pgjk; + sa = pgjk->sa; + } + // + ~EPA() + { + } + // + inline Vector3 GetCoordinates(const Face* face) const + { + const Vector3 o(face->n*-face->d); + const F a[]={ cross(face->v[0]->w-o,face->v[1]->w-o).length(), + cross(face->v[1]->w-o,face->v[2]->w-o).length(), + cross(face->v[2]->w-o,face->v[0]->w-o).length()}; + const F sm(a[0]+a[1]+a[2]); + return(Vector3(a[1],a[2],a[0])/(sm>0?sm:1)); + } + // + inline Face* FindBest() const + { + Face* bf = 0; + if(root) + { + Face* cf = root; + F bd(cstInf); + do { + if(cf->dd;bf=cf; } + } while(0!=(cf=cf->next)); + } + return(bf); + } + // + inline Z Set(Face* f,const GJK::Mkv* a,const GJK::Mkv* b,const GJK::Mkv* +c) const + { + const Vector3 nrm(cross(b->w-a->w,c->w-a->w)); + const F len(nrm.length()); + const Z valid( (cross(a->w,b->w).dot(nrm)>=-EPA_inface_eps)&& + (cross(b->w,c->w).dot(nrm)>=-EPA_inface_eps)&& + (cross(c->w,a->w).dot(nrm)>=-EPA_inface_eps)); + f->v[0] = a; + f->v[1] = b; + f->v[2] = c; + f->mark = 0; + f->n = nrm/(len>0?len:cstInf); + f->d = Max(0,-f->n.dot(a->w)); + return(valid); + } + // + inline Face* NewFace(const GJK::Mkv* a,const GJK::Mkv* b,const GJK::Mkv* c) + { + Face* pf = (Face*)sa->allocate(sizeof(Face)); + if(Set(pf,a,b,c)) + { + if(root) root->prev=pf; + pf->prev=0; + pf->next=root; + root =pf; + ++nfaces; + } + else + { + pf->prev=pf->next=0; + } + return(pf); + } + // + inline void Detach(Face* face) + { + if(face->prev||face->next) + { + --nfaces; + if(face==root) + { root=face->next;root->prev=0; } + else + { + if(face->next==0) + { face->prev->next=0; } + else + { face->prev->next=face->next;face->next->prev=face->prev; } + } + face->prev=face->next=0; + } + } + // + inline void Link(Face* f0,U e0,Face* f1,U e1) const + { + f0->f[e0]=f1;f1->e[e1]=e0; + f1->f[e1]=f0;f0->e[e0]=e1; + } + // + GJK::Mkv* Support(const Vector3& w) const + { + GJK::Mkv* v =(GJK::Mkv*)sa->allocate(sizeof(GJK::Mkv)); + gjk->Support(w,*v); + return(v); + } + // + U BuildHorizon(U markid,const GJK::Mkv* w,Face& f,U e,Face*& cf,Face*& +ff) + { + static const U mod3[]={0,1,2,0,1}; + U ne(0); + if(f.mark!=markid) + { + const U e1(mod3[e+1]); + if((f.n.dot(w->w)+f.d)>0) + { + Face* nf = NewFace(f.v[e1],f.v[e],w); + Link(nf,0,&f,e); + if(cf) Link(cf,1,nf,2); else ff=nf; + cf=nf;ne=1; + } + else + { + const U e2(mod3[e+2]); + Detach(&f); + f.mark = markid; + ne += BuildHorizon(markid,w,*f.f[e1],f.e[e1],cf,ff); + ne += BuildHorizon(markid,w,*f.f[e2],f.e[e2],cf,ff); + } + } + return(ne); + } + // + inline F EvaluatePD(F accuracy=EPA_accuracy) + { + btBlock* sablock = sa->beginBlock(); + Face* bestface = 0; + U markid(1); + depth = -cstInf; + normal = Vector3(0,0,0); + root = 0; + nfaces = 0; + iterations = 0; + failed = false; + /* Prepare hull */ + if(gjk->EncloseOrigin()) + { + const U* pfidx = 0; + U nfidx= 0; + const U* peidx = 0; + U neidx = 0; + GJK::Mkv* basemkv[5]; + Face* basefaces[6]; + switch(gjk->order) + { + /* Tetrahedron */ + case 3: { + static const U fidx[4][3]={{2,1,0},{3,0,1},{3,1,2},{3,2,0}}; + static const +U eidx[6][4]={{0,0,2,1},{0,1,1,1},{0,2,3,1},{1,0,3,2},{2,0,1,2},{3,0,2,2}}; + pfidx=(const U*)fidx;nfidx=4;peidx=(const U*)eidx;neidx=6; + } break; + /* Hexahedron */ + case 4: { + static const +U fidx[6][3]={{2,0,4},{4,1,2},{1,4,0},{0,3,1},{0,2,3},{1,3,2}}; + static const +U eidx[9][4]={{0,0,4,0},{0,1,2,1},{0,2,1,2},{1,1,5,2},{1,0,2,0},{2,2,3,2},{3,1,5,0},{3,0,4,2},{5,1,4,1}}; + pfidx=(const U*)fidx;nfidx=6;peidx=(const U*)eidx;neidx=9; + } break; + } + U i; + + for( i=0;i<=gjk->order;++i) { +basemkv[i]=(GJK::Mkv*)sa->allocate(sizeof(GJK::Mkv));*basemkv[i]=gjk->simplex[i]; +} + for( i=0;iendBlock(sablock); + return(depth); + } + /* Expand hull */ + for(;iterationsn); + const F d(bf->n.dot(w->w)+bf->d); + bestface = bf; + if(d<-accuracy) + { + Face* cf =0; + Face* ff =0; + U nf = 0; + Detach(bf); + bf->mark=++markid; + for(U i=0;i<3;++i) { +nf+=BuildHorizon(markid,w,*bf->f[i],bf->e[i],cf,ff); } + if(nf<=2) { break; } + Link(cf,1,ff,2); + } else break; + } else break; + } + /* Extract contact */ + if(bestface) + { + const Vector3 b(GetCoordinates(bestface)); + normal = bestface->n; + depth = Max(0,bestface->d); + for(U i=0;i<2;++i) + { + const F s(F(i?-1:1)); + for(U j=0;j<3;++j) + { + features[i][j]=gjk->LocalSupport(s*bestface->v[j]->r,i); + } + } + nearest[0] = features[0][0]*b.x()+features[0][1]*b.y()+features[0][2]*b.z(); + nearest[1] = features[1][0]*b.x()+features[1][1]*b.y()+features[1][2]*b.z(); + } else failed=true; + sa->endBlock(sablock); + return(depth); + } + }; +} + +// +// Api +// + +using namespace gjkepa_impl; + + + +// +bool btGjkEpaSolver::Collide(btConvexShape *shape0,const btTransform &wtrs0, + btConvexShape *shape1,const btTransform &wtrs1, + btScalar radialmargin, + btStackAlloc* stackAlloc, + sResults& results) +{ + + +/* Initialize */ +results.witnesses[0] = +results.witnesses[1] = +results.normal = Vector3(0,0,0); +results.depth = 0; +results.status = sResults::Separated; +results.epa_iterations = 0; +results.gjk_iterations = 0; +/* Use GJK to locate origin */ +GJK gjk(stackAlloc, + wtrs0.getBasis(),wtrs0.getOrigin(),shape0, + wtrs1.getBasis(),wtrs1.getOrigin(),shape1, + radialmargin+EPA_accuracy); +const Z collide(gjk.SearchOrigin()); +results.gjk_iterations = gjk.iterations+1; +if(collide) + { + /* Then EPA for penetration depth */ + EPA epa(&gjk); + const F pd(epa.EvaluatePD()); + results.epa_iterations = epa.iterations+1; + if(pd>0) + { + results.status = sResults::Penetrating; + results.normal = epa.normal; + results.depth = pd; + results.witnesses[0] = epa.nearest[0]; + results.witnesses[1] = epa.nearest[1]; + return(true); + } else { if(epa.failed) results.status=sResults::EPA_Failed; } + } else { if(gjk.failed) results.status=sResults::GJK_Failed; } +return(false); +} + + + + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h new file mode 100644 index 00000000000..759b30bb17f --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpa.h @@ -0,0 +1,53 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* +GJK-EPA collision solver by Nathanael Presson +Nov.2006 +*/ + + +#ifndef _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ +#define _05E48D53_04E0_49ad_BB0A_D74FE62E7366_ +#include "../CollisionShapes/btConvexShape.h" + +class btStackAlloc; + +///btGjkEpaSolver contributed under zlib by Nathanael Presson +struct btGjkEpaSolver +{ +struct sResults + { + enum eStatus + { + Separated, /* Shapes doesnt penetrate */ + Penetrating, /* Shapes are penetrating */ + GJK_Failed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */ + EPA_Failed, /* EPA phase fail, bigger problem, need to save parameters, and debug */ + } status; + btVector3 witnesses[2]; + btVector3 normal; + btScalar depth; + int epa_iterations; + int gjk_iterations; + }; +static bool Collide(btConvexShape* shape0,const btTransform& wtrs0, + btConvexShape* shape1,const btTransform& wtrs1, + btScalar radialmargin, + btStackAlloc* stackAlloc, + sResults& results); +}; + +#endif diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp new file mode 100644 index 00000000000..87330493b60 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp @@ -0,0 +1,50 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +EPA Copyright (c) Ricardo Padrela 2006 + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "btGjkEpaPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" + +bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver, + btConvexShape* pConvexA, btConvexShape* pConvexB, + const btTransform& transformA, const btTransform& transformB, + btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, + class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc ) +{ + + (void)debugDraw; + (void)v; + (void)simplexSolver; + + const btScalar radialmargin(btScalar(0.)); + + btGjkEpaSolver::sResults results; + if(btGjkEpaSolver::Collide( pConvexA,transformA, + pConvexB,transformB, + radialmargin,stackAlloc,results)) + { + // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0)); + //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth); + wWitnessOnA = results.witnesses[0]; + wWitnessOnB = results.witnesses[1]; + return true; + } + + return false; +} + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h new file mode 100644 index 00000000000..3916ba0776c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h @@ -0,0 +1,39 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +EPA Copyright (c) Ricardo Padrela 2006 + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ +#ifndef BT_GJP_EPA_PENETRATION_DEPTH_H +#define BT_GJP_EPA_PENETRATION_DEPTH_H + +#include "btConvexPenetrationDepthSolver.h" + +///EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to +///calculate the penetration depth between two convex shapes. +class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver +{ + public : + + bool calcPenDepth( btSimplexSolverInterface& simplexSolver, + btConvexShape* pConvexA, btConvexShape* pConvexB, + const btTransform& transformA, const btTransform& transformB, + btVector3& v, btPoint3& wWitnessOnA, btPoint3& wWitnessOnB, + class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc ); + + private : + +}; + +#endif // BT_GJP_EPA_PENETRATION_DEPTH_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp new file mode 100644 index 00000000000..f1f3f7f7f6c --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp @@ -0,0 +1,299 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btGjkPairDetector.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h" + +#if defined(DEBUG) || defined (_DEBUG) +#include //for debug printf +#ifdef __SPU__ +#include +#define printf spu_printf +#endif //__SPU__ +#endif + +//must be above the machine epsilon +#define REL_ERROR2 btScalar(1.0e-6) + +//temp globals, to improve GJK/EPA/penetration calculations +int gNumDeepPenetrationChecks = 0; +int gNumGjkChecks = 0; + + + +btGjkPairDetector::btGjkPairDetector(btConvexShape* objectA,btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver) +:m_cachedSeparatingAxis(btScalar(0.),btScalar(0.),btScalar(1.)), +m_penetrationDepthSolver(penetrationDepthSolver), +m_simplexSolver(simplexSolver), +m_minkowskiA(objectA), +m_minkowskiB(objectB), +m_ignoreMargin(false), +m_lastUsedMethod(-1), +m_catchDegeneracies(1) +{ +} + +void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw) +{ + btScalar distance=btScalar(0.); + btVector3 normalInB(btScalar(0.),btScalar(0.),btScalar(0.)); + btVector3 pointOnA,pointOnB; + btTransform localTransA = input.m_transformA; + btTransform localTransB = input.m_transformB; + btVector3 positionOffset = (localTransA.getOrigin() + localTransB.getOrigin()) * btScalar(0.5); + localTransA.getOrigin() -= positionOffset; + localTransB.getOrigin() -= positionOffset; + + btScalar marginA = m_minkowskiA->getMargin(); + btScalar marginB = m_minkowskiB->getMargin(); + + gNumGjkChecks++; + + //for CCD we don't use margins + if (m_ignoreMargin) + { + marginA = btScalar(0.); + marginB = btScalar(0.); + } + + m_curIter = 0; + int gGjkMaxIter = 1000;//this is to catch invalid input, perhaps check for #NaN? + m_cachedSeparatingAxis.setValue(0,1,0); + + bool isValid = false; + bool checkSimplex = false; + bool checkPenetration = true; + m_degenerateSimplex = 0; + + m_lastUsedMethod = -1; + + { + btScalar squaredDistance = SIMD_INFINITY; + btScalar delta = btScalar(0.); + + btScalar margin = marginA + marginB; + + + + m_simplexSolver->reset(); + + for ( ; ; ) + //while (true) + { + + btVector3 seperatingAxisInA = (-m_cachedSeparatingAxis)* input.m_transformA.getBasis(); + btVector3 seperatingAxisInB = m_cachedSeparatingAxis* input.m_transformB.getBasis(); + + btVector3 pInA = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA); + btVector3 qInB = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); + btPoint3 pWorld = localTransA(pInA); + btPoint3 qWorld = localTransB(qInB); + + btVector3 w = pWorld - qWorld; + delta = m_cachedSeparatingAxis.dot(w); + + // potential exit, they don't overlap + if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared)) + { + checkPenetration = false; + break; + } + + //exit 0: the new point is already in the simplex, or we didn't come any closer + if (m_simplexSolver->inSimplex(w)) + { + m_degenerateSimplex = 1; + checkSimplex = true; + break; + } + // are we getting any closer ? + btScalar f0 = squaredDistance - delta; + btScalar f1 = squaredDistance * REL_ERROR2; + + if (f0 <= f1) + { + if (f0 <= btScalar(0.)) + { + m_degenerateSimplex = 2; + } + checkSimplex = true; + break; + } + //add current vertex to simplex + m_simplexSolver->addVertex(w, pWorld, qWorld); + + //calculate the closest point to the origin (update vector v) + if (!m_simplexSolver->closest(m_cachedSeparatingAxis)) + { + m_degenerateSimplex = 3; + checkSimplex = true; + break; + } + + btScalar previousSquaredDistance = squaredDistance; + squaredDistance = m_cachedSeparatingAxis.length2(); + + //redundant m_simplexSolver->compute_points(pointOnA, pointOnB); + + //are we getting any closer ? + if (previousSquaredDistance - squaredDistance <= SIMD_EPSILON * previousSquaredDistance) + { + m_simplexSolver->backup_closest(m_cachedSeparatingAxis); + checkSimplex = true; + break; + } + + //degeneracy, this is typically due to invalid/uninitialized worldtransforms for a btCollisionObject + if (m_curIter++ > gGjkMaxIter) + { + #if defined(DEBUG) || defined (_DEBUG) + + printf("btGjkPairDetector maxIter exceeded:%i\n",m_curIter); + printf("sepAxis=(%f,%f,%f), squaredDistance = %f, shapeTypeA=%i,shapeTypeB=%i\n", + m_cachedSeparatingAxis.getX(), + m_cachedSeparatingAxis.getY(), + m_cachedSeparatingAxis.getZ(), + squaredDistance, + m_minkowskiA->getShapeType(), + m_minkowskiB->getShapeType()); + + #endif + break; + + } + + + bool check = (!m_simplexSolver->fullSimplex()); + //bool check = (!m_simplexSolver->fullSimplex() && squaredDistance > SIMD_EPSILON * m_simplexSolver->maxVertex()); + + if (!check) + { + //do we need this backup_closest here ? + m_simplexSolver->backup_closest(m_cachedSeparatingAxis); + break; + } + } + + if (checkSimplex) + { + m_simplexSolver->compute_points(pointOnA, pointOnB); + normalInB = pointOnA-pointOnB; + btScalar lenSqr = m_cachedSeparatingAxis.length2(); + //valid normal + if (lenSqr < 0.0001) + { + m_degenerateSimplex = 5; + } + if (lenSqr > SIMD_EPSILON*SIMD_EPSILON) + { + btScalar rlen = btScalar(1.) / btSqrt(lenSqr ); + normalInB *= rlen; //normalize + btScalar s = btSqrt(squaredDistance); + + btAssert(s > btScalar(0.0)); + pointOnA -= m_cachedSeparatingAxis * (marginA / s); + pointOnB += m_cachedSeparatingAxis * (marginB / s); + distance = ((btScalar(1.)/rlen) - margin); + isValid = true; + + m_lastUsedMethod = 1; + } else + { + m_lastUsedMethod = 2; + } + } + + bool catchDegeneratePenetrationCase = + (m_catchDegeneracies && m_penetrationDepthSolver && m_degenerateSimplex && ((distance+margin) < 0.01)); + + //if (checkPenetration && !isValid) + if (checkPenetration && (!isValid || catchDegeneratePenetrationCase )) + { + //penetration case + + //if there is no way to handle penetrations, bail out + if (m_penetrationDepthSolver) + { + // Penetration depth case. + btVector3 tmpPointOnA,tmpPointOnB; + + gNumDeepPenetrationChecks++; + + bool isValid2 = m_penetrationDepthSolver->calcPenDepth( + *m_simplexSolver, + m_minkowskiA,m_minkowskiB, + localTransA,localTransB, + m_cachedSeparatingAxis, tmpPointOnA, tmpPointOnB, + debugDraw,input.m_stackAlloc + ); + + if (isValid2) + { + btVector3 tmpNormalInB = tmpPointOnB-tmpPointOnA; + btScalar lenSqr = tmpNormalInB.length2(); + if (lenSqr > (SIMD_EPSILON*SIMD_EPSILON)) + { + tmpNormalInB /= btSqrt(lenSqr); + btScalar distance2 = -(tmpPointOnA-tmpPointOnB).length(); + //only replace valid penetrations when the result is deeper (check) + if (!isValid || (distance2 < distance)) + { + distance = distance2; + pointOnA = tmpPointOnA; + pointOnB = tmpPointOnB; + normalInB = tmpNormalInB; + isValid = true; + m_lastUsedMethod = 3; + } else + { + + } + } else + { + //isValid = false; + m_lastUsedMethod = 4; + } + } else + { + m_lastUsedMethod = 5; + } + + } + } + } + + if (isValid) + { +#ifdef __SPU__ + //spu_printf("distance\n"); +#endif //__CELLOS_LV2__ + + + output.addContactPoint( + normalInB, + pointOnB+positionOffset, + distance); + //printf("gjk add:%f",distance); + } + + +} + + + + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h new file mode 100644 index 00000000000..af0fe32f6c7 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h @@ -0,0 +1,85 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + + +#ifndef GJK_PAIR_DETECTOR_H +#define GJK_PAIR_DETECTOR_H + +#include "btDiscreteCollisionDetectorInterface.h" +#include "../../LinearMath/btPoint3.h" +#include "../CollisionShapes/btCollisionMargin.h" + +class btConvexShape; +#include "btSimplexSolverInterface.h" +class btConvexPenetrationDepthSolver; + +/// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface +class btGjkPairDetector : public btDiscreteCollisionDetectorInterface +{ + + + btVector3 m_cachedSeparatingAxis; + btConvexPenetrationDepthSolver* m_penetrationDepthSolver; + btSimplexSolverInterface* m_simplexSolver; + btConvexShape* m_minkowskiA; + btConvexShape* m_minkowskiB; + bool m_ignoreMargin; + + +public: + + //some debugging to fix degeneracy problems + int m_lastUsedMethod; + int m_curIter; + int m_degenerateSimplex; + int m_catchDegeneracies; + + + btGjkPairDetector(btConvexShape* objectA,btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver); + virtual ~btGjkPairDetector() {}; + + virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw); + + void setMinkowskiA(btConvexShape* minkA) + { + m_minkowskiA = minkA; + } + + void setMinkowskiB(btConvexShape* minkB) + { + m_minkowskiB = minkB; + } + void setCachedSeperatingAxis(const btVector3& seperatingAxis) + { + m_cachedSeparatingAxis = seperatingAxis; + } + + void setPenetrationDepthSolver(btConvexPenetrationDepthSolver* penetrationDepthSolver) + { + m_penetrationDepthSolver = penetrationDepthSolver; + } + + ///don't use setIgnoreMargin, it's for Bullet's internal use + void setIgnoreMargin(bool ignoreMargin) + { + m_ignoreMargin = ignoreMargin; + } + + +}; + +#endif //GJK_PAIR_DETECTOR_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h new file mode 100644 index 00000000000..f6a893151da --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h @@ -0,0 +1,99 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef MANIFOLD_CONTACT_POINT_H +#define MANIFOLD_CONTACT_POINT_H + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransformUtil.h" + + + + + +/// ManifoldContactPoint collects and maintains persistent contactpoints. +/// used to improve stability and performance of rigidbody dynamics response. +class btManifoldPoint + { + public: + btManifoldPoint() + :m_userPersistentData(0), + m_lifeTime(0) + { + } + + btManifoldPoint( const btVector3 &pointA, const btVector3 &pointB, + const btVector3 &normal, + btScalar distance ) : + m_localPointA( pointA ), + m_localPointB( pointB ), + m_normalWorldOnB( normal ), + m_distance1( distance ), + m_combinedFriction(btScalar(0.)), + m_combinedRestitution(btScalar(0.)), + m_userPersistentData(0), + m_lifeTime(0) + { + + + } + + + + btVector3 m_localPointA; + btVector3 m_localPointB; + btVector3 m_positionWorldOnB; + ///m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity + btVector3 m_positionWorldOnA; + btVector3 m_normalWorldOnB; + + btScalar m_distance1; + btScalar m_combinedFriction; + btScalar m_combinedRestitution; + + + mutable void* m_userPersistentData; + + int m_lifeTime;//lifetime of the contactpoint in frames + + btScalar getDistance() const + { + return m_distance1; + } + int getLifeTime() const + { + return m_lifeTime; + } + + const btVector3& getPositionWorldOnA() const { + return m_positionWorldOnA; +// return m_positionWorldOnB + m_normalWorldOnB * m_distance1; + } + + const btVector3& getPositionWorldOnB() const + { + return m_positionWorldOnB; + } + + void setDistance(btScalar dist) + { + m_distance1 = dist; + } + + + + }; + +#endif //MANIFOLD_CONTACT_POINT_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp new file mode 100644 index 00000000000..c4bab3a134a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp @@ -0,0 +1,334 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btMinkowskiPenetrationDepthSolver.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" + + + + +#define NUM_UNITSPHERE_POINTS 42 +static btVector3 sPenetrationDirections[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] = +{ +btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)), +btVector3(btScalar(0.723608) , btScalar(-0.525725),btScalar(-0.447219)), +btVector3(btScalar(-0.276388) , btScalar(-0.850649),btScalar(-0.447219)), +btVector3(btScalar(-0.894426) , btScalar(-0.000000),btScalar(-0.447216)), +btVector3(btScalar(-0.276388) , btScalar(0.850649),btScalar(-0.447220)), +btVector3(btScalar(0.723608) , btScalar(0.525725),btScalar(-0.447219)), +btVector3(btScalar(0.276388) , btScalar(-0.850649),btScalar(0.447220)), +btVector3(btScalar(-0.723608) , btScalar(-0.525725),btScalar(0.447219)), +btVector3(btScalar(-0.723608) , btScalar(0.525725),btScalar(0.447219)), +btVector3(btScalar(0.276388) , btScalar(0.850649),btScalar(0.447219)), +btVector3(btScalar(0.894426) , btScalar(0.000000),btScalar(0.447216)), +btVector3(btScalar(-0.000000) , btScalar(0.000000),btScalar(1.000000)), +btVector3(btScalar(0.425323) , btScalar(-0.309011),btScalar(-0.850654)), +btVector3(btScalar(-0.162456) , btScalar(-0.499995),btScalar(-0.850654)), +btVector3(btScalar(0.262869) , btScalar(-0.809012),btScalar(-0.525738)), +btVector3(btScalar(0.425323) , btScalar(0.309011),btScalar(-0.850654)), +btVector3(btScalar(0.850648) , btScalar(-0.000000),btScalar(-0.525736)), +btVector3(btScalar(-0.525730) , btScalar(-0.000000),btScalar(-0.850652)), +btVector3(btScalar(-0.688190) , btScalar(-0.499997),btScalar(-0.525736)), +btVector3(btScalar(-0.162456) , btScalar(0.499995),btScalar(-0.850654)), +btVector3(btScalar(-0.688190) , btScalar(0.499997),btScalar(-0.525736)), +btVector3(btScalar(0.262869) , btScalar(0.809012),btScalar(-0.525738)), +btVector3(btScalar(0.951058) , btScalar(0.309013),btScalar(0.000000)), +btVector3(btScalar(0.951058) , btScalar(-0.309013),btScalar(0.000000)), +btVector3(btScalar(0.587786) , btScalar(-0.809017),btScalar(0.000000)), +btVector3(btScalar(0.000000) , btScalar(-1.000000),btScalar(0.000000)), +btVector3(btScalar(-0.587786) , btScalar(-0.809017),btScalar(0.000000)), +btVector3(btScalar(-0.951058) , btScalar(-0.309013),btScalar(-0.000000)), +btVector3(btScalar(-0.951058) , btScalar(0.309013),btScalar(-0.000000)), +btVector3(btScalar(-0.587786) , btScalar(0.809017),btScalar(-0.000000)), +btVector3(btScalar(-0.000000) , btScalar(1.000000),btScalar(-0.000000)), +btVector3(btScalar(0.587786) , btScalar(0.809017),btScalar(-0.000000)), +btVector3(btScalar(0.688190) , btScalar(-0.499997),btScalar(0.525736)), +btVector3(btScalar(-0.262869) , btScalar(-0.809012),btScalar(0.525738)), +btVector3(btScalar(-0.850648) , btScalar(0.000000),btScalar(0.525736)), +btVector3(btScalar(-0.262869) , btScalar(0.809012),btScalar(0.525738)), +btVector3(btScalar(0.688190) , btScalar(0.499997),btScalar(0.525736)), +btVector3(btScalar(0.525730) , btScalar(0.000000),btScalar(0.850652)), +btVector3(btScalar(0.162456) , btScalar(-0.499995),btScalar(0.850654)), +btVector3(btScalar(-0.425323) , btScalar(-0.309011),btScalar(0.850654)), +btVector3(btScalar(-0.425323) , btScalar(0.309011),btScalar(0.850654)), +btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654)) +}; + + +bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver, + btConvexShape* convexA,btConvexShape* convexB, + const btTransform& transA,const btTransform& transB, + btVector3& v, btPoint3& pa, btPoint3& pb, + class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc + ) +{ + + (void)stackAlloc; + (void)v; + + + struct btIntermediateResult : public btDiscreteCollisionDetectorInterface::Result + { + + btIntermediateResult():m_hasResult(false) + { + } + + btVector3 m_normalOnBInWorld; + btVector3 m_pointInWorld; + btScalar m_depth; + bool m_hasResult; + + virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) + { + (void)partId0; + (void)index0; + (void)partId1; + (void)index1; + } + void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) + { + m_normalOnBInWorld = normalOnBInWorld; + m_pointInWorld = pointInWorld; + m_depth = depth; + m_hasResult = true; + } + }; + + //just take fixed number of orientation, and sample the penetration depth in that direction + btScalar minProj = btScalar(1e30); + btVector3 minNorm; + btVector3 minVertex; + btVector3 minA,minB; + btVector3 seperatingAxisInA,seperatingAxisInB; + btVector3 pInA,qInB,pWorld,qWorld,w; + +#define USE_BATCHED_SUPPORT 1 +#ifdef USE_BATCHED_SUPPORT + + btVector3 supportVerticesABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; + btVector3 supportVerticesBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; + btVector3 seperatingAxisInABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; + btVector3 seperatingAxisInBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2]; + int i; + + int numSampleDirections = NUM_UNITSPHERE_POINTS; + + for (i=0;igetNumPreferredPenetrationDirections(); + if (numPDA) + { + for (int i=0;igetPreferredPenetrationDirection(i,norm); + norm = transA.getBasis() * norm; + sPenetrationDirections[numSampleDirections] = norm; + seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis(); + seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis(); + numSampleDirections++; + } + } + } + + { + int numPDB = convexB->getNumPreferredPenetrationDirections(); + if (numPDB) + { + for (int i=0;igetPreferredPenetrationDirection(i,norm); + norm = transB.getBasis() * norm; + sPenetrationDirections[numSampleDirections] = norm; + seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis(); + seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis(); + numSampleDirections++; + } + } + } + + + + convexA->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch,supportVerticesABatch,numSampleDirections); + convexB->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch,supportVerticesBBatch,numSampleDirections); + + for (i=0;igetNumPreferredPenetrationDirections(); + if (numPDA) + { + for (int i=0;igetPreferredPenetrationDirection(i,norm); + norm = transA.getBasis() * norm; + sPenetrationDirections[numSampleDirections] = norm; + numSampleDirections++; + } + } + } + + { + int numPDB = convexB->getNumPreferredPenetrationDirections(); + if (numPDB) + { + for (int i=0;igetPreferredPenetrationDirection(i,norm); + norm = transB.getBasis() * norm; + sPenetrationDirections[numSampleDirections] = norm; + numSampleDirections++; + } + } + } + + for (int i=0;ilocalGetSupportingVertexWithoutMargin(seperatingAxisInA); + qInB = convexB->localGetSupportingVertexWithoutMargin(seperatingAxisInB); + pWorld = transA(pInA); + qWorld = transB(qInB); + w = qWorld - pWorld; + btScalar delta = norm.dot(w); + //find smallest delta + if (delta < minProj) + { + minProj = delta; + minNorm = norm; + minA = pWorld; + minB = qWorld; + } + } +#endif //USE_BATCHED_SUPPORT + + //add the margins + + minA += minNorm*convexA->getMargin(); + minB -= minNorm*convexB->getMargin(); + //no penetration + if (minProj < btScalar(0.)) + return false; + + minProj += (convexA->getMargin() + convexB->getMargin()); + + + + + +//#define DEBUG_DRAW 1 +#ifdef DEBUG_DRAW + if (debugDraw) + { + btVector3 color(0,1,0); + debugDraw->drawLine(minA,minB,color); + color = btVector3 (1,1,1); + btVector3 vec = minB-minA; + btScalar prj2 = minNorm.dot(vec); + debugDraw->drawLine(minA,minA+(minNorm*minProj),color); + + } +#endif //DEBUG_DRAW + + + + btGjkPairDetector gjkdet(convexA,convexB,&simplexSolver,0); + + btScalar offsetDist = minProj; + btVector3 offset = minNorm * offsetDist; + + + + btGjkPairDetector::ClosestPointInput input; + + btVector3 newOrg = transA.getOrigin() + offset; + + btTransform displacedTrans = transA; + displacedTrans.setOrigin(newOrg); + + input.m_transformA = displacedTrans; + input.m_transformB = transB; + input.m_maximumDistanceSquared = btScalar(1e30);//minProj; + + btIntermediateResult res; + gjkdet.getClosestPoints(input,res,debugDraw); + + btScalar correctedMinNorm = minProj - res.m_depth; + + + //the penetration depth is over-estimated, relax it + btScalar penetration_relaxation= btScalar(1.); + minNorm*=penetration_relaxation; + + if (res.m_hasResult) + { + + pa = res.m_pointInWorld - minNorm * correctedMinNorm; + pb = res.m_pointInWorld; + +#ifdef DEBUG_DRAW + if (debugDraw) + { + btVector3 color(1,0,0); + debugDraw->drawLine(pa,pb,color); + } +#endif//DEBUG_DRAW + + + } + return res.m_hasResult; +} + + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h new file mode 100644 index 00000000000..b348b21b52a --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h @@ -0,0 +1,37 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H +#define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H + +#include "btConvexPenetrationDepthSolver.h" + +///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation. +///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points. +class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver +{ +public: + + virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver, + btConvexShape* convexA,btConvexShape* convexB, + const btTransform& transA,const btTransform& transB, + btVector3& v, btPoint3& pa, btPoint3& pb, + class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc + ); + +}; + +#endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp new file mode 100644 index 00000000000..08cb3ed334d --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp @@ -0,0 +1,246 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btPersistentManifold.h" +#include "LinearMath/btTransform.h" +#include + +btScalar gContactBreakingThreshold = btScalar(0.02); +ContactDestroyedCallback gContactDestroyedCallback = 0; + + + +btPersistentManifold::btPersistentManifold() +:m_body0(0), +m_body1(0), +m_cachedPoints (0), +m_index1(0) +{ +} + + +void btPersistentManifold::clearManifold() +{ + int i; + for (i=0;i +void btPersistentManifold::DebugPersistency() +{ + int i; + printf("DebugPersistency : numPoints %d\n",m_cachedPoints); + for (i=0;i1) + printf("error in clearUserCache\n"); + } + } + assert(occurance<=0); +#endif //DEBUG_PERSISTENCY + + if (pt.m_userPersistentData && gContactDestroyedCallback) + { + (*gContactDestroyedCallback)(pt.m_userPersistentData); + pt.m_userPersistentData = 0; + } + +#ifdef DEBUG_PERSISTENCY + DebugPersistency(); +#endif + } + + +} + + +int btPersistentManifold::sortCachedPoints(const btManifoldPoint& pt) +{ + + //calculate 4 possible cases areas, and take biggest area + //also need to keep 'deepest' + + int maxPenetrationIndex = -1; +#define KEEP_DEEPEST_POINT 1 +#ifdef KEEP_DEEPEST_POINT + btScalar maxPenetration = pt.getDistance(); + for (int i=0;i<4;i++) + { + if (m_pointCache[i].getDistance() < maxPenetration) + { + maxPenetrationIndex = i; + maxPenetration = m_pointCache[i].getDistance(); + } + } +#endif //KEEP_DEEPEST_POINT + + btScalar res0(btScalar(0.)),res1(btScalar(0.)),res2(btScalar(0.)),res3(btScalar(0.)); + if (maxPenetrationIndex != 0) + { + btVector3 a0 = pt.m_localPointA-m_pointCache[1].m_localPointA; + btVector3 b0 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA; + btVector3 cross = a0.cross(b0); + res0 = cross.length2(); + } + if (maxPenetrationIndex != 1) + { + btVector3 a1 = pt.m_localPointA-m_pointCache[0].m_localPointA; + btVector3 b1 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA; + btVector3 cross = a1.cross(b1); + res1 = cross.length2(); + } + + if (maxPenetrationIndex != 2) + { + btVector3 a2 = pt.m_localPointA-m_pointCache[0].m_localPointA; + btVector3 b2 = m_pointCache[3].m_localPointA-m_pointCache[1].m_localPointA; + btVector3 cross = a2.cross(b2); + res2 = cross.length2(); + } + + if (maxPenetrationIndex != 3) + { + btVector3 a3 = pt.m_localPointA-m_pointCache[0].m_localPointA; + btVector3 b3 = m_pointCache[2].m_localPointA-m_pointCache[1].m_localPointA; + btVector3 cross = a3.cross(b3); + res3 = cross.length2(); + } + + btVector4 maxvec(res0,res1,res2,res3); + int biggestarea = maxvec.closestAxis4(); + return biggestarea; +} + + +int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const +{ + btScalar shortestDist = getContactBreakingThreshold() * getContactBreakingThreshold(); + int size = getNumContacts(); + int nearestPoint = -1; + for( int i = 0; i < size; i++ ) + { + const btManifoldPoint &mp = m_pointCache[i]; + + btVector3 diffA = mp.m_localPointA- newPoint.m_localPointA; + const btScalar distToManiPoint = diffA.dot(diffA); + if( distToManiPoint < shortestDist ) + { + shortestDist = distToManiPoint; + nearestPoint = i; + } + } + return nearestPoint; +} + +void btPersistentManifold::AddManifoldPoint(const btManifoldPoint& newPoint) +{ + assert(validContactDistance(newPoint)); + + int insertIndex = getNumContacts(); + if (insertIndex == MANIFOLD_CACHE_SIZE) + { +#if MANIFOLD_CACHE_SIZE >= 4 + //sort cache so best points come first, based on area + insertIndex = sortCachedPoints(newPoint); +#else + insertIndex = 0; +#endif + + + } else + { + m_cachedPoints++; + + + } + replaceContactPoint(newPoint,insertIndex); +} + +btScalar btPersistentManifold::getContactBreakingThreshold() const +{ + return gContactBreakingThreshold; +} + +void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btTransform& trB) +{ + int i; + + /// first refresh worldspace positions and distance + for (i=getNumContacts()-1;i>=0;i--) + { + btManifoldPoint &manifoldPoint = m_pointCache[i]; + manifoldPoint.m_positionWorldOnA = trA( manifoldPoint.m_localPointA ); + manifoldPoint.m_positionWorldOnB = trB( manifoldPoint.m_localPointB ); + manifoldPoint.m_distance1 = (manifoldPoint.m_positionWorldOnA - manifoldPoint.m_positionWorldOnB).dot(manifoldPoint.m_normalWorldOnB); + manifoldPoint.m_lifeTime++; + } + + /// then + btScalar distance2d; + btVector3 projectedDifference,projectedPoint; + for (i=getNumContacts()-1;i>=0;i--) + { + + btManifoldPoint &manifoldPoint = m_pointCache[i]; + //contact becomes invalid when signed distance exceeds margin (projected on contactnormal direction) + if (!validContactDistance(manifoldPoint)) + { + removeContactPoint(i); + } else + { + //contact also becomes invalid when relative movement orthogonal to normal exceeds margin + projectedPoint = manifoldPoint.m_positionWorldOnA - manifoldPoint.m_normalWorldOnB * manifoldPoint.m_distance1; + projectedDifference = manifoldPoint.m_positionWorldOnB - projectedPoint; + distance2d = projectedDifference.dot(projectedDifference); + if (distance2d > getContactBreakingThreshold()*getContactBreakingThreshold() ) + { + removeContactPoint(i); + } + } + } +#ifdef DEBUG_PERSISTENCY + DebugPersistency(); +#endif // +} + + + + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h new file mode 100644 index 00000000000..a5918b84db3 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h @@ -0,0 +1,161 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef PERSISTENT_MANIFOLD_H +#define PERSISTENT_MANIFOLD_H + + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransform.h" +#include "btManifoldPoint.h" + +struct btCollisionResult; + +///contact breaking and merging threshold +extern btScalar gContactBreakingThreshold; + +typedef bool (*ContactDestroyedCallback)(void* userPersistentData); +extern ContactDestroyedCallback gContactDestroyedCallback; + + + + +#define MANIFOLD_CACHE_SIZE 4 + +///btPersistentManifold maintains contact points, and reduces them to 4. +///It does contact filtering/contact reduction. +ATTRIBUTE_ALIGNED16( class) btPersistentManifold +{ + + btManifoldPoint m_pointCache[MANIFOLD_CACHE_SIZE]; + + /// this two body pointers can point to the physics rigidbody class. + /// void* will allow any rigidbody class + void* m_body0; + void* m_body1; + int m_cachedPoints; + + + /// sort cached points so most isolated points come first + int sortCachedPoints(const btManifoldPoint& pt); + + int findContactPoint(const btManifoldPoint* unUsed, int numUnused,const btManifoldPoint& pt); + +public: + + int m_index1; + + btPersistentManifold(); + + btPersistentManifold(void* body0,void* body1) + : m_body0(body0),m_body1(body1),m_cachedPoints(0) + { + } + + inline void* getBody0() { return m_body0;} + inline void* getBody1() { return m_body1;} + + inline const void* getBody0() const { return m_body0;} + inline const void* getBody1() const { return m_body1;} + + void setBodies(void* body0,void* body1) + { + m_body0 = body0; + m_body1 = body1; + } + + void clearUserCache(btManifoldPoint& pt); + +#ifdef DEBUG_PERSISTENCY + void DebugPersistency(); +#endif // + + inline int getNumContacts() const { return m_cachedPoints;} + + inline const btManifoldPoint& getContactPoint(int index) const + { + btAssert(index < m_cachedPoints); + return m_pointCache[index]; + } + + inline btManifoldPoint& getContactPoint(int index) + { + btAssert(index < m_cachedPoints); + return m_pointCache[index]; + } + + /// todo: get this margin from the current physics / collision environment + btScalar getContactBreakingThreshold() const; + + int getCacheEntry(const btManifoldPoint& newPoint) const; + + void AddManifoldPoint( const btManifoldPoint& newPoint); + + void removeContactPoint (int index) + { + clearUserCache(m_pointCache[index]); + + int lastUsedIndex = getNumContacts() - 1; +// m_pointCache[index] = m_pointCache[lastUsedIndex]; + if(index != lastUsedIndex) + { + m_pointCache[index] = m_pointCache[lastUsedIndex]; + //get rid of duplicated userPersistentData pointer + m_pointCache[lastUsedIndex].m_userPersistentData = 0; + } + + btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0); + m_cachedPoints--; + } + void replaceContactPoint(const btManifoldPoint& newPoint,int insertIndex) + { + btAssert(validContactDistance(newPoint)); + +#define MAINTAIN_PERSISTENCY 1 +#ifdef MAINTAIN_PERSISTENCY + int lifeTime = m_pointCache[insertIndex].getLifeTime(); + btAssert(lifeTime>=0); + void* cache = m_pointCache[insertIndex].m_userPersistentData; + + m_pointCache[insertIndex] = newPoint; + + m_pointCache[insertIndex].m_userPersistentData = cache; + m_pointCache[insertIndex].m_lifeTime = lifeTime; +#else + clearUserCache(m_pointCache[insertIndex]); + m_pointCache[insertIndex] = newPoint; + +#endif + } + + bool validContactDistance(const btManifoldPoint& pt) const + { + return pt.m_distance1 <= getContactBreakingThreshold(); + } + /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin + void refreshContactPoints( const btTransform& trA,const btTransform& trB); + + void clearManifold(); + + + +} +; + + + + + +#endif //PERSISTENT_MANIFOLD_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h new file mode 100644 index 00000000000..6262f44b9f1 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h @@ -0,0 +1,61 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef POINT_COLLECTOR_H +#define POINT_COLLECTOR_H + +#include "btDiscreteCollisionDetectorInterface.h" + + + +struct btPointCollector : public btDiscreteCollisionDetectorInterface::Result +{ + + + btVector3 m_normalOnBInWorld; + btVector3 m_pointInWorld; + btScalar m_distance;//negative means penetration + + bool m_hasResult; + + btPointCollector () + : m_distance(btScalar(1e30)),m_hasResult(false) + { + } + + virtual void setShapeIdentifiers(int partId0,int index0, int partId1,int index1) + { + (void)partId0; + (void)index0; + (void)partId1; + (void)index1; + //?? + } + + virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth) + { + if (depth< m_distance) + { + m_hasResult = true; + m_normalOnBInWorld = normalOnBInWorld; + m_pointInWorld = pointInWorld; + //negative means penetration + m_distance = depth; + } + } +}; + +#endif //POINT_COLLECTOR_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp new file mode 100644 index 00000000000..31b91467777 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp @@ -0,0 +1,101 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btRaycastCallback.h" + +btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to) + : + m_from(from), + m_to(to), + m_hitFraction(btScalar(1.)) +{ + +} + + + +void btTriangleRaycastCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex) +{ + + + const btVector3 &vert0=triangle[0]; + const btVector3 &vert1=triangle[1]; + const btVector3 &vert2=triangle[2]; + + btVector3 v10; v10 = vert1 - vert0 ; + btVector3 v20; v20 = vert2 - vert0 ; + + btVector3 triangleNormal; triangleNormal = v10.cross( v20 ); + + const btScalar dist = vert0.dot(triangleNormal); + btScalar dist_a = triangleNormal.dot(m_from) ; + dist_a-= dist; + btScalar dist_b = triangleNormal.dot(m_to); + dist_b -= dist; + + if ( dist_a * dist_b >= btScalar(0.0) ) + { + return ; // same sign + } + + const btScalar proj_length=dist_a-dist_b; + const btScalar distance = (dist_a)/(proj_length); + // Now we have the intersection point on the plane, we'll see if it's inside the triangle + // Add an epsilon as a tolerance for the raycast, + // in case the ray hits exacly on the edge of the triangle. + // It must be scaled for the triangle size. + + if(distance < m_hitFraction) + { + + + btScalar edge_tolerance =triangleNormal.length2(); + edge_tolerance *= btScalar(-0.0001); + btVector3 point; point.setInterpolate3( m_from, m_to, distance); + { + btVector3 v0p; v0p = vert0 - point; + btVector3 v1p; v1p = vert1 - point; + btVector3 cp0; cp0 = v0p.cross( v1p ); + + if ( (btScalar)(cp0.dot(triangleNormal)) >=edge_tolerance) + { + + + btVector3 v2p; v2p = vert2 - point; + btVector3 cp1; + cp1 = v1p.cross( v2p); + if ( (btScalar)(cp1.dot(triangleNormal)) >=edge_tolerance) + { + btVector3 cp2; + cp2 = v2p.cross(v0p); + + if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance) + { + + if ( dist_a > 0 ) + { + m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex); + } + else + { + m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex); + } + } + } + } + } + } +} diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h new file mode 100644 index 00000000000..a0bbc9f8fe9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h @@ -0,0 +1,42 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef RAYCAST_TRI_CALLBACK_H +#define RAYCAST_TRI_CALLBACK_H + +#include "../CollisionShapes/btTriangleCallback.h" +struct btBroadphaseProxy; + + +class btTriangleRaycastCallback: public btTriangleCallback +{ +public: + + //input + btVector3 m_from; + btVector3 m_to; + + btScalar m_hitFraction; + + btTriangleRaycastCallback(const btVector3& from,const btVector3& to); + + virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex); + + virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex ) = 0; + +}; + +#endif //RAYCAST_TRI_CALLBACK_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h new file mode 100644 index 00000000000..58393b2eab9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h @@ -0,0 +1,64 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef SIMPLEX_SOLVER_INTERFACE_H +#define SIMPLEX_SOLVER_INTERFACE_H + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btPoint3.h" + +#define NO_VIRTUAL_INTERFACE 1 +#ifdef NO_VIRTUAL_INTERFACE +#include "btVoronoiSimplexSolver.h" +#define btSimplexSolverInterface btVoronoiSimplexSolver +#else + +/// btSimplexSolverInterface can incrementally calculate distance between origin and up to 4 vertices +/// Used by GJK or Linear Casting. Can be implemented by the Johnson-algorithm or alternative approaches based on +/// voronoi regions or barycentric coordinates +class btSimplexSolverInterface +{ + public: + virtual ~btSimplexSolverInterface() {}; + + virtual void reset() = 0; + + virtual void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) = 0; + + virtual bool closest(btVector3& v) = 0; + + virtual btScalar maxVertex() = 0; + + virtual bool fullSimplex() const = 0; + + virtual int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const = 0; + + virtual bool inSimplex(const btVector3& w) = 0; + + virtual void backup_closest(btVector3& v) = 0; + + virtual bool emptySimplex() const = 0; + + virtual void compute_points(btPoint3& p1, btPoint3& p2) = 0; + + virtual int numVertices() const =0; + + +}; +#endif +#endif //SIMPLEX_SOLVER_INTERFACE_H + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp new file mode 100644 index 00000000000..687738b7fa9 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp @@ -0,0 +1,139 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btSubSimplexConvexCast.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" + + +btSubsimplexConvexCast::btSubsimplexConvexCast (const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver) +:m_simplexSolver(simplexSolver), +m_convexA(convexA),m_convexB(convexB) +{ +} + +///Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases. +///See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565 +#ifdef BT_USE_DOUBLE_PRECISION +#define MAX_ITERATIONS 64 +#else +#define MAX_ITERATIONS 32 +#endif +bool btSubsimplexConvexCast::calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result) +{ + + btMinkowskiSumShape combi(m_convexA,m_convexB); + btMinkowskiSumShape* convex = &combi; + + btTransform rayFromLocalA; + btTransform rayToLocalA; + + rayFromLocalA = fromA.inverse()* fromB; + rayToLocalA = toA.inverse()* toB; + + + m_simplexSolver->reset(); + + convex->setTransformB(btTransform(rayFromLocalA.getBasis())); + + //btScalar radius = btScalar(0.01); + + btScalar lambda = btScalar(0.); + //todo: need to verify this: + //because of minkowski difference, we need the inverse direction + + btVector3 s = -rayFromLocalA.getOrigin(); + btVector3 r = -(rayToLocalA.getOrigin()-rayFromLocalA.getOrigin()); + btVector3 x = s; + btVector3 v; + btVector3 arbitraryPoint = convex->localGetSupportingVertex(r); + + v = x - arbitraryPoint; + + int maxIter = MAX_ITERATIONS; + + btVector3 n; + n.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); + bool hasResult = false; + btVector3 c; + + btScalar lastLambda = lambda; + + + btScalar dist2 = v.length2(); +#ifdef BT_USE_DOUBLE_PRECISION + btScalar epsilon = btScalar(0.0001); +#else + btScalar epsilon = btScalar(0.0001); +#endif //BT_USE_DOUBLE_PRECISION + btVector3 w,p; + btScalar VdotR; + + while ( (dist2 > epsilon) && maxIter--) + { + p = convex->localGetSupportingVertex( v); + w = x - p; + + btScalar VdotW = v.dot(w); + + if ( VdotW > btScalar(0.)) + { + VdotR = v.dot(r); + + if (VdotR >= -(SIMD_EPSILON*SIMD_EPSILON)) + return false; + else + { + lambda = lambda - VdotW / VdotR; + x = s + lambda * r; + m_simplexSolver->reset(); + //check next line + w = x-p; + lastLambda = lambda; + n = v; + hasResult = true; + } + } + m_simplexSolver->addVertex( w, x , p); + if (m_simplexSolver->closest(v)) + { + dist2 = v.length2(); + hasResult = true; + //printf("V=%f , %f, %f\n",v[0],v[1],v[2]); + //printf("DIST2=%f\n",dist2); + //printf("numverts = %i\n",m_simplexSolver->numVertices()); + } else + { + dist2 = btScalar(0.); + } + } + + //int numiter = MAX_ITERATIONS - maxIter; +// printf("number of iterations: %d", numiter); + result.m_fraction = lambda; + result.m_normal = n; + + return true; +} + + + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h new file mode 100644 index 00000000000..05662db5d23 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h @@ -0,0 +1,50 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef SUBSIMPLEX_CONVEX_CAST_H +#define SUBSIMPLEX_CONVEX_CAST_H + +#include "btConvexCast.h" +#include "btSimplexSolverInterface.h" +class btConvexShape; + +/// btSubsimplexConvexCast implements Gino van den Bergens' paper +///"Ray Casting against bteral Convex Objects with Application to Continuous Collision Detection" +/// GJK based Ray Cast, optimized version +/// Objects should not start in overlap, otherwise results are not defined. +class btSubsimplexConvexCast : public btConvexCast +{ + btSimplexSolverInterface* m_simplexSolver; + const btConvexShape* m_convexA; + const btConvexShape* m_convexB; + +public: + + btSubsimplexConvexCast (const btConvexShape* shapeA,const btConvexShape* shapeB,btSimplexSolverInterface* simplexSolver); + + //virtual ~btSubsimplexConvexCast(); + ///SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (sweep) between two moving objects. + ///Precondition is that objects should not penetration/overlap at the start from the interval. Overlap can be tested using btGjkPairDetector. + virtual bool calcTimeOfImpact( + const btTransform& fromA, + const btTransform& toA, + const btTransform& fromB, + const btTransform& toB, + CastResult& result); + +}; + +#endif //SUBSIMPLEX_CONVEX_CAST_H diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp new file mode 100644 index 00000000000..105b7eccefa --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp @@ -0,0 +1,607 @@ + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + Elsevier CDROM license agreements grants nonexclusive license to use the software + for any purpose, commercial or non-commercial as long as the following credit is included + identifying the original source of the software: + + Parts of the source are "from the book Real-Time Collision Detection by + Christer Ericson, published by Morgan Kaufmann Publishers, + (c) 2005 Elsevier Inc." + +*/ + + +#include "btVoronoiSimplexSolver.h" +#include +#include + +#define VERTA 0 +#define VERTB 1 +#define VERTC 2 +#define VERTD 3 + +#define CATCH_DEGENERATE_TETRAHEDRON 1 +void btVoronoiSimplexSolver::removeVertex(int index) +{ + + assert(m_numVertices>0); + m_numVertices--; + m_simplexVectorW[index] = m_simplexVectorW[m_numVertices]; + m_simplexPointsP[index] = m_simplexPointsP[m_numVertices]; + m_simplexPointsQ[index] = m_simplexPointsQ[m_numVertices]; +} + +void btVoronoiSimplexSolver::reduceVertices (const btUsageBitfield& usedVerts) +{ + if ((numVertices() >= 4) && (!usedVerts.usedVertexD)) + removeVertex(3); + + if ((numVertices() >= 3) && (!usedVerts.usedVertexC)) + removeVertex(2); + + if ((numVertices() >= 2) && (!usedVerts.usedVertexB)) + removeVertex(1); + + if ((numVertices() >= 1) && (!usedVerts.usedVertexA)) + removeVertex(0); + +} + + + + + +//clear the simplex, remove all the vertices +void btVoronoiSimplexSolver::reset() +{ + m_cachedValidClosest = false; + m_numVertices = 0; + m_needsUpdate = true; + m_lastW = btVector3(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + m_cachedBC.reset(); +} + + + + //add a vertex +void btVoronoiSimplexSolver::addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q) +{ + m_lastW = w; + m_needsUpdate = true; + + m_simplexVectorW[m_numVertices] = w; + m_simplexPointsP[m_numVertices] = p; + m_simplexPointsQ[m_numVertices] = q; + + m_numVertices++; +} + +bool btVoronoiSimplexSolver::updateClosestVectorAndPoints() +{ + + if (m_needsUpdate) + { + m_cachedBC.reset(); + + m_needsUpdate = false; + + switch (numVertices()) + { + case 0: + m_cachedValidClosest = false; + break; + case 1: + { + m_cachedP1 = m_simplexPointsP[0]; + m_cachedP2 = m_simplexPointsQ[0]; + m_cachedV = m_cachedP1-m_cachedP2; //== m_simplexVectorW[0] + m_cachedBC.reset(); + m_cachedBC.setBarycentricCoordinates(btScalar(1.),btScalar(0.),btScalar(0.),btScalar(0.)); + m_cachedValidClosest = m_cachedBC.isValid(); + break; + }; + case 2: + { + //closest point origin from line segment + const btVector3& from = m_simplexVectorW[0]; + const btVector3& to = m_simplexVectorW[1]; + btVector3 nearest; + + btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); + btVector3 diff = p - from; + btVector3 v = to - from; + btScalar t = v.dot(diff); + + if (t > 0) { + btScalar dotVV = v.dot(v); + if (t < dotVV) { + t /= dotVV; + diff -= t*v; + m_cachedBC.m_usedVertices.usedVertexA = true; + m_cachedBC.m_usedVertices.usedVertexB = true; + } else { + t = 1; + diff -= v; + //reduce to 1 point + m_cachedBC.m_usedVertices.usedVertexB = true; + } + } else + { + t = 0; + //reduce to 1 point + m_cachedBC.m_usedVertices.usedVertexA = true; + } + m_cachedBC.setBarycentricCoordinates(1-t,t); + nearest = from + t*v; + + m_cachedP1 = m_simplexPointsP[0] + t * (m_simplexPointsP[1] - m_simplexPointsP[0]); + m_cachedP2 = m_simplexPointsQ[0] + t * (m_simplexPointsQ[1] - m_simplexPointsQ[0]); + m_cachedV = m_cachedP1 - m_cachedP2; + + reduceVertices(m_cachedBC.m_usedVertices); + + m_cachedValidClosest = m_cachedBC.isValid(); + break; + } + case 3: + { + //closest point origin from triangle + btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); + + const btVector3& a = m_simplexVectorW[0]; + const btVector3& b = m_simplexVectorW[1]; + const btVector3& c = m_simplexVectorW[2]; + + closestPtPointTriangle(p,a,b,c,m_cachedBC); + m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] + + m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] + + m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2]; + + m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] + + m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] + + m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2]; + + m_cachedV = m_cachedP1-m_cachedP2; + + reduceVertices (m_cachedBC.m_usedVertices); + m_cachedValidClosest = m_cachedBC.isValid(); + + break; + } + case 4: + { + + + btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.)); + + const btVector3& a = m_simplexVectorW[0]; + const btVector3& b = m_simplexVectorW[1]; + const btVector3& c = m_simplexVectorW[2]; + const btVector3& d = m_simplexVectorW[3]; + + bool hasSeperation = closestPtPointTetrahedron(p,a,b,c,d,m_cachedBC); + + if (hasSeperation) + { + + m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] + + m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] + + m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2] + + m_simplexPointsP[3] * m_cachedBC.m_barycentricCoords[3]; + + m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] + + m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] + + m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2] + + m_simplexPointsQ[3] * m_cachedBC.m_barycentricCoords[3]; + + m_cachedV = m_cachedP1-m_cachedP2; + reduceVertices (m_cachedBC.m_usedVertices); + } else + { +// printf("sub distance got penetration\n"); + + if (m_cachedBC.m_degenerate) + { + m_cachedValidClosest = false; + } else + { + m_cachedValidClosest = true; + //degenerate case == false, penetration = true + zero + m_cachedV.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); + } + break; + } + + m_cachedValidClosest = m_cachedBC.isValid(); + + //closest point origin from tetrahedron + break; + } + default: + { + m_cachedValidClosest = false; + } + }; + } + + return m_cachedValidClosest; + +} + +//return/calculate the closest vertex +bool btVoronoiSimplexSolver::closest(btVector3& v) +{ + bool succes = updateClosestVectorAndPoints(); + v = m_cachedV; + return succes; +} + + + +btScalar btVoronoiSimplexSolver::maxVertex() +{ + int i, numverts = numVertices(); + btScalar maxV = btScalar(0.); + for (i=0;i= btScalar(0.0) && d4 <= d3) + { + result.m_closestPointOnSimplex = b; + result.m_usedVertices.usedVertexB = true; + result.setBarycentricCoordinates(0,1,0); + + return true; // b; // barycentric coordinates (0,1,0) + } + // Check if P in edge region of AB, if so return projection of P onto AB + btScalar vc = d1*d4 - d3*d2; + if (vc <= btScalar(0.0) && d1 >= btScalar(0.0) && d3 <= btScalar(0.0)) { + btScalar v = d1 / (d1 - d3); + result.m_closestPointOnSimplex = a + v * ab; + result.m_usedVertices.usedVertexA = true; + result.m_usedVertices.usedVertexB = true; + result.setBarycentricCoordinates(1-v,v,0); + return true; + //return a + v * ab; // barycentric coordinates (1-v,v,0) + } + + // Check if P in vertex region outside C + btVector3 cp = p - c; + btScalar d5 = ab.dot(cp); + btScalar d6 = ac.dot(cp); + if (d6 >= btScalar(0.0) && d5 <= d6) + { + result.m_closestPointOnSimplex = c; + result.m_usedVertices.usedVertexC = true; + result.setBarycentricCoordinates(0,0,1); + return true;//c; // barycentric coordinates (0,0,1) + } + + // Check if P in edge region of AC, if so return projection of P onto AC + btScalar vb = d5*d2 - d1*d6; + if (vb <= btScalar(0.0) && d2 >= btScalar(0.0) && d6 <= btScalar(0.0)) { + btScalar w = d2 / (d2 - d6); + result.m_closestPointOnSimplex = a + w * ac; + result.m_usedVertices.usedVertexA = true; + result.m_usedVertices.usedVertexC = true; + result.setBarycentricCoordinates(1-w,0,w); + return true; + //return a + w * ac; // barycentric coordinates (1-w,0,w) + } + + // Check if P in edge region of BC, if so return projection of P onto BC + btScalar va = d3*d6 - d5*d4; + if (va <= btScalar(0.0) && (d4 - d3) >= btScalar(0.0) && (d5 - d6) >= btScalar(0.0)) { + btScalar w = (d4 - d3) / ((d4 - d3) + (d5 - d6)); + + result.m_closestPointOnSimplex = b + w * (c - b); + result.m_usedVertices.usedVertexB = true; + result.m_usedVertices.usedVertexC = true; + result.setBarycentricCoordinates(0,1-w,w); + return true; + // return b + w * (c - b); // barycentric coordinates (0,1-w,w) + } + + // P inside face region. Compute Q through its barycentric coordinates (u,v,w) + btScalar denom = btScalar(1.0) / (va + vb + vc); + btScalar v = vb * denom; + btScalar w = vc * denom; + + result.m_closestPointOnSimplex = a + ab * v + ac * w; + result.m_usedVertices.usedVertexA = true; + result.m_usedVertices.usedVertexB = true; + result.m_usedVertices.usedVertexC = true; + result.setBarycentricCoordinates(1-v-w,v,w); + + return true; +// return a + ab * v + ac * w; // = u*a + v*b + w*c, u = va * denom = btScalar(1.0) - v - w + +} + + + + + +/// Test if point p and d lie on opposite sides of plane through abc +int btVoronoiSimplexSolver::pointOutsideOfPlane(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d) +{ + btVector3 normal = (b-a).cross(c-a); + + btScalar signp = (p - a).dot(normal); // [AP AB AC] + btScalar signd = (d - a).dot( normal); // [AD AB AC] + +#ifdef CATCH_DEGENERATE_TETRAHEDRON +#ifdef BT_USE_DOUBLE_PRECISION +if (signd * signd < (btScalar(1e-8) * btScalar(1e-8))) + { + return -1; + } +#else + if (signd * signd < (btScalar(1e-4) * btScalar(1e-4))) + { +// printf("affine dependent/degenerate\n");// + return -1; + } +#endif + +#endif + // Points on opposite sides if expression signs are opposite + return signp * signd < btScalar(0.); +} + + +bool btVoronoiSimplexSolver::closestPtPointTetrahedron(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d, btSubSimplexClosestResult& finalResult) +{ + btSubSimplexClosestResult tempResult; + + // Start out assuming point inside all halfspaces, so closest to itself + finalResult.m_closestPointOnSimplex = p; + finalResult.m_usedVertices.reset(); + finalResult.m_usedVertices.usedVertexA = true; + finalResult.m_usedVertices.usedVertexB = true; + finalResult.m_usedVertices.usedVertexC = true; + finalResult.m_usedVertices.usedVertexD = true; + + int pointOutsideABC = pointOutsideOfPlane(p, a, b, c, d); + int pointOutsideACD = pointOutsideOfPlane(p, a, c, d, b); + int pointOutsideADB = pointOutsideOfPlane(p, a, d, b, c); + int pointOutsideBDC = pointOutsideOfPlane(p, b, d, c, a); + + if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0) + { + finalResult.m_degenerate = true; + return false; + } + + if (!pointOutsideABC && !pointOutsideACD && !pointOutsideADB && !pointOutsideBDC) + { + return false; + } + + + btScalar bestSqDist = FLT_MAX; + // If point outside face abc then compute closest point on abc + if (pointOutsideABC) + { + closestPtPointTriangle(p, a, b, c,tempResult); + btPoint3 q = tempResult.m_closestPointOnSimplex; + + btScalar sqDist = (q - p).dot( q - p); + // Update best closest point if (squared) distance is less than current best + if (sqDist < bestSqDist) { + bestSqDist = sqDist; + finalResult.m_closestPointOnSimplex = q; + //convert result bitmask! + finalResult.m_usedVertices.reset(); + finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; + finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexB; + finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC; + finalResult.setBarycentricCoordinates( + tempResult.m_barycentricCoords[VERTA], + tempResult.m_barycentricCoords[VERTB], + tempResult.m_barycentricCoords[VERTC], + 0 + ); + + } + } + + + // Repeat test for face acd + if (pointOutsideACD) + { + closestPtPointTriangle(p, a, c, d,tempResult); + btPoint3 q = tempResult.m_closestPointOnSimplex; + //convert result bitmask! + + btScalar sqDist = (q - p).dot( q - p); + if (sqDist < bestSqDist) + { + bestSqDist = sqDist; + finalResult.m_closestPointOnSimplex = q; + finalResult.m_usedVertices.reset(); + finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; + + finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexB; + finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexC; + finalResult.setBarycentricCoordinates( + tempResult.m_barycentricCoords[VERTA], + 0, + tempResult.m_barycentricCoords[VERTB], + tempResult.m_barycentricCoords[VERTC] + ); + + } + } + // Repeat test for face adb + + + if (pointOutsideADB) + { + closestPtPointTriangle(p, a, d, b,tempResult); + btPoint3 q = tempResult.m_closestPointOnSimplex; + //convert result bitmask! + + btScalar sqDist = (q - p).dot( q - p); + if (sqDist < bestSqDist) + { + bestSqDist = sqDist; + finalResult.m_closestPointOnSimplex = q; + finalResult.m_usedVertices.reset(); + finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA; + finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexC; + + finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB; + finalResult.setBarycentricCoordinates( + tempResult.m_barycentricCoords[VERTA], + tempResult.m_barycentricCoords[VERTC], + 0, + tempResult.m_barycentricCoords[VERTB] + ); + + } + } + // Repeat test for face bdc + + + if (pointOutsideBDC) + { + closestPtPointTriangle(p, b, d, c,tempResult); + btPoint3 q = tempResult.m_closestPointOnSimplex; + //convert result bitmask! + btScalar sqDist = (q - p).dot( q - p); + if (sqDist < bestSqDist) + { + bestSqDist = sqDist; + finalResult.m_closestPointOnSimplex = q; + finalResult.m_usedVertices.reset(); + // + finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexA; + finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC; + finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB; + + finalResult.setBarycentricCoordinates( + 0, + tempResult.m_barycentricCoords[VERTA], + tempResult.m_barycentricCoords[VERTC], + tempResult.m_barycentricCoords[VERTB] + ); + + } + } + + //help! we ended up full ! + + if (finalResult.m_usedVertices.usedVertexA && + finalResult.m_usedVertices.usedVertexB && + finalResult.m_usedVertices.usedVertexC && + finalResult.m_usedVertices.usedVertexD) + { + return true; + } + + return true; +} + diff --git a/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h new file mode 100644 index 00000000000..356d335bc93 --- /dev/null +++ b/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h @@ -0,0 +1,157 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef btVoronoiSimplexSolver_H +#define btVoronoiSimplexSolver_H + +#include "btSimplexSolverInterface.h" + + + +#define VORONOI_SIMPLEX_MAX_VERTS 5 + +struct btUsageBitfield{ + btUsageBitfield() + { + reset(); + } + + void reset() + { + usedVertexA = false; + usedVertexB = false; + usedVertexC = false; + usedVertexD = false; + } + unsigned short usedVertexA : 1; + unsigned short usedVertexB : 1; + unsigned short usedVertexC : 1; + unsigned short usedVertexD : 1; + unsigned short unused1 : 1; + unsigned short unused2 : 1; + unsigned short unused3 : 1; + unsigned short unused4 : 1; +}; + + +struct btSubSimplexClosestResult +{ + btPoint3 m_closestPointOnSimplex; + //MASK for m_usedVertices + //stores the simplex vertex-usage, using the MASK, + // if m_usedVertices & MASK then the related vertex is used + btUsageBitfield m_usedVertices; + btScalar m_barycentricCoords[4]; + bool m_degenerate; + + void reset() + { + m_degenerate = false; + setBarycentricCoordinates(); + m_usedVertices.reset(); + } + bool isValid() + { + bool valid = (m_barycentricCoords[0] >= btScalar(0.)) && + (m_barycentricCoords[1] >= btScalar(0.)) && + (m_barycentricCoords[2] >= btScalar(0.)) && + (m_barycentricCoords[3] >= btScalar(0.)); + + + return valid; + } + void setBarycentricCoordinates(btScalar a=btScalar(0.),btScalar b=btScalar(0.),btScalar c=btScalar(0.),btScalar d=btScalar(0.)) + { + m_barycentricCoords[0] = a; + m_barycentricCoords[1] = b; + m_barycentricCoords[2] = c; + m_barycentricCoords[3] = d; + } + +}; + +/// btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points simplex to the origin. +/// Can be used with GJK, as an alternative to Johnson distance algorithm. +#ifdef NO_VIRTUAL_INTERFACE +class btVoronoiSimplexSolver +#else +class btVoronoiSimplexSolver : public btSimplexSolverInterface +#endif +{ +public: + + int m_numVertices; + + btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS]; + btPoint3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS]; + btPoint3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS]; + + + + btPoint3 m_cachedP1; + btPoint3 m_cachedP2; + btVector3 m_cachedV; + btVector3 m_lastW; + bool m_cachedValidClosest; + + btSubSimplexClosestResult m_cachedBC; + + bool m_needsUpdate; + + void removeVertex(int index); + void reduceVertices (const btUsageBitfield& usedVerts); + bool updateClosestVectorAndPoints(); + + bool closestPtPointTetrahedron(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d, btSubSimplexClosestResult& finalResult); + int pointOutsideOfPlane(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c, const btPoint3& d); + bool closestPtPointTriangle(const btPoint3& p, const btPoint3& a, const btPoint3& b, const btPoint3& c,btSubSimplexClosestResult& result); + +public: + + void reset(); + + void addVertex(const btVector3& w, const btPoint3& p, const btPoint3& q); + + + bool closest(btVector3& v); + + btScalar maxVertex(); + + bool fullSimplex() const + { + return (m_numVertices == 4); + } + + int getSimplex(btPoint3 *pBuf, btPoint3 *qBuf, btVector3 *yBuf) const; + + bool inSimplex(const btVector3& w); + + void backup_closest(btVector3& v) ; + + bool emptySimplex() const ; + + void compute_points(btPoint3& p1, btPoint3& p2) ; + + int numVertices() const + { + return m_numVertices; + } + + +}; + +#endif //VoronoiSimplexSolver diff --git a/extern/bullet2/src/BulletDynamics/CMakeLists.txt b/extern/bullet2/src/BulletDynamics/CMakeLists.txt new file mode 100644 index 00000000000..8598575799a --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/CMakeLists.txt @@ -0,0 +1,20 @@ +INCLUDE_DIRECTORIES( +${BULLET_PHYSICS_SOURCE_DIR}/src } +) + +ADD_LIBRARY(LibBulletDynamics + + ConstraintSolver/btContactConstraint.cpp + ConstraintSolver/btGeneric6DofConstraint.cpp + ConstraintSolver/btHingeConstraint.cpp + ConstraintSolver/btPoint2PointConstraint.cpp + ConstraintSolver/btSequentialImpulseConstraintSolver.cpp + ConstraintSolver/btSolve2LinearConstraint.cpp + ConstraintSolver/btTypedConstraint.cpp + Dynamics/btDiscreteDynamicsWorld.cpp + Dynamics/btSimpleDynamicsWorld.cpp + Dynamics/Bullet-C-API.cpp + Dynamics/btRigidBody.cpp + Vehicle/btRaycastVehicle.cpp + Vehicle/btWheelInfo.cpp +) diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp new file mode 100644 index 00000000000..2289621e8e3 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp @@ -0,0 +1,285 @@ +/* +Bullet Continuous Collision Detection and Physics Library +btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Written by: Marcus Hennix +*/ + + +#include "btConeTwistConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btTransformUtil.h" +#include "LinearMath/btSimdMinMax.h" +#include + +btConeTwistConstraint::btConeTwistConstraint() +{ +} + + +btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB, + const btTransform& rbAFrame,const btTransform& rbBFrame) + :btTypedConstraint(rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame), + m_angularOnly(false) +{ + // flip axis for correct angles + m_rbBFrame.getBasis()[1][0] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][1] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); + + m_swingSpan1 = btScalar(1e30); + m_swingSpan2 = btScalar(1e30); + m_twistSpan = btScalar(1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + + m_solveTwistLimit = false; + m_solveSwingLimit = false; + +} + +btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame) + :btTypedConstraint(rbA),m_rbAFrame(rbAFrame), + m_angularOnly(false) +{ + m_rbBFrame = m_rbAFrame; + + // flip axis for correct angles + m_rbBFrame.getBasis()[1][0] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][1] *= btScalar(-1.); + m_rbBFrame.getBasis()[1][2] *= btScalar(-1.); + + m_rbBFrame.getBasis()[2][0] *= btScalar(-1.); + m_rbBFrame.getBasis()[2][1] *= btScalar(-1.); + m_rbBFrame.getBasis()[2][2] *= btScalar(-1.); + + m_swingSpan1 = btScalar(1e30); + m_swingSpan2 = btScalar(1e30); + m_twistSpan = btScalar(1e30); + m_biasFactor = 0.3f; + m_relaxationFactor = 1.0f; + + m_solveTwistLimit = false; + m_solveSwingLimit = false; + +} + +void btConeTwistConstraint::buildJacobian() +{ + m_appliedImpulse = btScalar(0.); + + //set bias, sign, clear accumulator + m_swingCorrection = btScalar(0.); + m_twistLimitSign = btScalar(0.); + m_solveTwistLimit = false; + m_solveSwingLimit = false; + m_accTwistLimitImpulse = btScalar(0.); + m_accSwingLimitImpulse = btScalar(0.); + + if (!m_angularOnly) + { + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + btVector3 relPos = pivotBInW - pivotAInW; + + btVector3 normal[3]; + if (relPos.length2() > SIMD_EPSILON) + { + normal[0] = relPos.normalized(); + } + else + { + normal[0].setValue(btScalar(1.0),0,0); + } + + btPlaneSpace1(normal[0], normal[1], normal[2]); + + for (int i=0;i<3;i++) + { + new (&m_jac[i]) btJacobianEntry( + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + pivotAInW - m_rbA.getCenterOfMassPosition(), + pivotBInW - m_rbB.getCenterOfMassPosition(), + normal[i], + m_rbA.getInvInertiaDiagLocal(), + m_rbA.getInvMass(), + m_rbB.getInvInertiaDiagLocal(), + m_rbB.getInvMass()); + } + } + + btVector3 b1Axis1,b1Axis2,b1Axis3; + btVector3 b2Axis1,b2Axis2; + + b1Axis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(0); + b2Axis1 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(0); + + btScalar swing1=btScalar(0.),swing2 = btScalar(0.); + + // Get Frame into world space + if (m_swingSpan1 >= btScalar(0.05f)) + { + b1Axis2 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(1); + swing1 = btAtan2Fast( b2Axis1.dot(b1Axis2),b2Axis1.dot(b1Axis1) ); + } + + if (m_swingSpan2 >= btScalar(0.05f)) + { + b1Axis3 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(2); + swing2 = btAtan2Fast( b2Axis1.dot(b1Axis3),b2Axis1.dot(b1Axis1) ); + } + + btScalar RMaxAngle1Sq = 1.0f / (m_swingSpan1*m_swingSpan1); + btScalar RMaxAngle2Sq = 1.0f / (m_swingSpan2*m_swingSpan2); + btScalar EllipseAngle = btFabs(swing1)* RMaxAngle1Sq + btFabs(swing2) * RMaxAngle2Sq; + + if (EllipseAngle > 1.0f) + { + m_swingCorrection = EllipseAngle-1.0f; + m_solveSwingLimit = true; + + // Calculate necessary axis & factors + m_swingAxis = b2Axis1.cross(b1Axis2* b2Axis1.dot(b1Axis2) + b1Axis3* b2Axis1.dot(b1Axis3)); + m_swingAxis.normalize(); + + btScalar swingAxisSign = (b2Axis1.dot(b1Axis1) >= 0.0f) ? 1.0f : -1.0f; + m_swingAxis *= swingAxisSign; + + m_kSwing = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_swingAxis) + + getRigidBodyB().computeAngularImpulseDenominator(m_swingAxis)); + + } + + // Twist limits + if (m_twistSpan >= btScalar(0.)) + { + btVector3 b2Axis2 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(1); + btQuaternion rotationArc = shortestArcQuat(b2Axis1,b1Axis1); + btVector3 TwistRef = quatRotate(rotationArc,b2Axis2); + btScalar twist = btAtan2Fast( TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2) ); + + btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? m_limitSoftness : btScalar(0.); + if (twist <= -m_twistSpan*lockedFreeFactor) + { + m_twistCorrection = -(twist + m_twistSpan); + m_solveTwistLimit = true; + + m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; + m_twistAxis.normalize(); + m_twistAxis *= -1.0f; + + m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + + getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); + + } else + if (twist > m_twistSpan*lockedFreeFactor) + { + m_twistCorrection = (twist - m_twistSpan); + m_solveTwistLimit = true; + + m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f; + m_twistAxis.normalize(); + + m_kTwist = btScalar(1.) / (getRigidBodyA().computeAngularImpulseDenominator(m_twistAxis) + + getRigidBodyB().computeAngularImpulseDenominator(m_twistAxis)); + + } + } +} + +void btConeTwistConstraint::solveConstraint(btScalar timeStep) +{ + + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin(); + + btScalar tau = btScalar(0.3); + + //linear part + if (!m_angularOnly) + { + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + for (int i=0;i<3;i++) + { + const btVector3& normal = m_jac[i].m_linearJointAxis; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + + btScalar rel_vel; + rel_vel = normal.dot(vel); + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv; + m_appliedImpulse += impulse; + btVector3 impulse_vector = normal * impulse; + m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); + m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); + } + } + + { + ///solve angular part + const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); + const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); + + // solve swing limit + if (m_solveSwingLimit) + { + btScalar amplitude = ((angVelB - angVelA).dot( m_swingAxis )*m_relaxationFactor*m_relaxationFactor + m_swingCorrection*(btScalar(1.)/timeStep)*m_biasFactor); + btScalar impulseMag = amplitude * m_kSwing; + + // Clamp the accumulated impulse + btScalar temp = m_accSwingLimitImpulse; + m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, 0.0f ); + impulseMag = m_accSwingLimitImpulse - temp; + + btVector3 impulse = m_swingAxis * impulseMag; + + m_rbA.applyTorqueImpulse(impulse); + m_rbB.applyTorqueImpulse(-impulse); + + } + + // solve twist limit + if (m_solveTwistLimit) + { + btScalar amplitude = ((angVelB - angVelA).dot( m_twistAxis )*m_relaxationFactor*m_relaxationFactor + m_twistCorrection*(btScalar(1.)/timeStep)*m_biasFactor ); + btScalar impulseMag = amplitude * m_kTwist; + + // Clamp the accumulated impulse + btScalar temp = m_accTwistLimitImpulse; + m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, 0.0f ); + impulseMag = m_accTwistLimitImpulse - temp; + + btVector3 impulse = m_twistAxis * impulseMag; + + m_rbA.applyTorqueImpulse(impulse); + m_rbB.applyTorqueImpulse(-impulse); + + } + + } + +} + +void btConeTwistConstraint::updateRHS(btScalar timeStep) +{ + (void)timeStep; + +} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h new file mode 100644 index 00000000000..874669c80b3 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h @@ -0,0 +1,123 @@ +/* +Bullet Continuous Collision Detection and Physics Library +btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Written by: Marcus Hennix +*/ + + + +#ifndef CONETWISTCONSTRAINT_H +#define CONETWISTCONSTRAINT_H + +#include "../../LinearMath/btVector3.h" +#include "btJacobianEntry.h" +#include "btTypedConstraint.h" + +class btRigidBody; + + +///btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc) +class btConeTwistConstraint : public btTypedConstraint +{ + btJacobianEntry m_jac[3]; //3 orthogonal linear constraints + + btTransform m_rbAFrame; + btTransform m_rbBFrame; + + btScalar m_limitSoftness; + btScalar m_biasFactor; + btScalar m_relaxationFactor; + + btScalar m_swingSpan1; + btScalar m_swingSpan2; + btScalar m_twistSpan; + + btVector3 m_swingAxis; + btVector3 m_twistAxis; + + btScalar m_kSwing; + btScalar m_kTwist; + + btScalar m_twistLimitSign; + btScalar m_swingCorrection; + btScalar m_twistCorrection; + + btScalar m_accSwingLimitImpulse; + btScalar m_accTwistLimitImpulse; + + bool m_angularOnly; + bool m_solveTwistLimit; + bool m_solveSwingLimit; + + +public: + + btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,const btTransform& rbAFrame, const btTransform& rbBFrame); + + btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame); + + btConeTwistConstraint(); + + virtual void buildJacobian(); + + virtual void solveConstraint(btScalar timeStep); + + void updateRHS(btScalar timeStep); + + const btRigidBody& getRigidBodyA() const + { + return m_rbA; + } + const btRigidBody& getRigidBodyB() const + { + return m_rbB; + } + + void setAngularOnly(bool angularOnly) + { + m_angularOnly = angularOnly; + } + + void setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 0.8f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f) + { + m_swingSpan1 = _swingSpan1; + m_swingSpan2 = _swingSpan2; + m_twistSpan = _twistSpan; + + m_limitSoftness = _softness; + m_biasFactor = _biasFactor; + m_relaxationFactor = _relaxationFactor; + } + + const btTransform& getAFrame() { return m_rbAFrame; }; + const btTransform& getBFrame() { return m_rbBFrame; }; + + inline int getSolveTwistLimit() + { + return m_solveTwistLimit; + } + + inline int getSolveSwingLimit() + { + return m_solveTwistLimit; + } + + inline btScalar getTwistLimitSign() + { + return m_twistLimitSign; + } + +}; + +#endif //CONETWISTCONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h new file mode 100644 index 00000000000..7e8458c2c7b --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h @@ -0,0 +1,45 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONSTRAINT_SOLVER_H +#define CONSTRAINT_SOLVER_H + +#include "../../LinearMath/btScalar.h" + +class btPersistentManifold; +class btRigidBody; +class btCollisionObject; +class btTypedConstraint; +struct btContactSolverInfo; +struct btBroadphaseProxy; +class btIDebugDraw; +class btStackAlloc; + +/// btConstraintSolver provides solver interface +class btConstraintSolver +{ + +public: + + virtual ~btConstraintSolver() {} + + virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc) = 0; + +}; + + + + +#endif //CONSTRAINT_SOLVER_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp new file mode 100644 index 00000000000..bb3fe832592 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp @@ -0,0 +1,417 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btContactConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btVector3.h" +#include "btJacobianEntry.h" +#include "btContactSolverInfo.h" +#include "LinearMath/btMinMax.h" +#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h" + +#define ASSERT2 assert + +#define USE_INTERNAL_APPLY_IMPULSE 1 + + +//bilateral constraint between two dynamic objects +void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, + btRigidBody& body2, const btVector3& pos2, + btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep) +{ + (void)timeStep; + (void)distance; + + + btScalar normalLenSqr = normal.length2(); + ASSERT2(btFabs(normalLenSqr) < btScalar(1.1)); + if (normalLenSqr > btScalar(1.1)) + { + impulse = btScalar(0.); + return; + } + btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); + //this jacobian entry could be re-used for all iterations + + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + + btJacobianEntry jac(body1.getCenterOfMassTransform().getBasis().transpose(), + body2.getCenterOfMassTransform().getBasis().transpose(), + rel_pos1,rel_pos2,normal,body1.getInvInertiaDiagLocal(),body1.getInvMass(), + body2.getInvInertiaDiagLocal(),body2.getInvMass()); + + btScalar jacDiagAB = jac.getDiagonal(); + btScalar jacDiagABInv = btScalar(1.) / jacDiagAB; + + btScalar rel_vel = jac.getRelativeVelocity( + body1.getLinearVelocity(), + body1.getCenterOfMassTransform().getBasis().transpose() * body1.getAngularVelocity(), + body2.getLinearVelocity(), + body2.getCenterOfMassTransform().getBasis().transpose() * body2.getAngularVelocity()); + btScalar a; + a=jacDiagABInv; + + + rel_vel = normal.dot(vel); + + //todo: move this into proper structure + btScalar contactDamping = btScalar(0.2); + +#ifdef ONLY_USE_LINEAR_MASS + btScalar massTerm = btScalar(1.) / (body1.getInvMass() + body2.getInvMass()); + impulse = - contactDamping * rel_vel * massTerm; +#else + btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv; + impulse = velocityImpulse; +#endif +} + + + +//response between two dynamic objects with friction +btScalar resolveSingleCollision( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo) +{ + + const btVector3& pos1_ = contactPoint.getPositionWorldOnA(); + const btVector3& pos2_ = contactPoint.getPositionWorldOnB(); + const btVector3& normal = contactPoint.m_normalWorldOnB; + + //constant over all iterations + btVector3 rel_pos1 = pos1_ - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2_ - body2.getCenterOfMassPosition(); + + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = normal.dot(vel); + + btScalar Kfps = btScalar(1.) / solverInfo.m_timeStep ; + + // btScalar damping = solverInfo.m_damping ; + btScalar Kerp = solverInfo.m_erp; + btScalar Kcor = Kerp *Kfps; + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; + assert(cpd); + btScalar distance = cpd->m_penetration; + btScalar positionalError = Kcor *-distance; + btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; + + btScalar penetrationImpulse = positionalError * cpd->m_jacDiagABInv; + + btScalar velocityImpulse = velocityError * cpd->m_jacDiagABInv; + + btScalar normalImpulse = penetrationImpulse+velocityImpulse; + + // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse + btScalar oldNormalImpulse = cpd->m_appliedImpulse; + btScalar sum = oldNormalImpulse + normalImpulse; + cpd->m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; + + normalImpulse = cpd->m_appliedImpulse - oldNormalImpulse; + +#ifdef USE_INTERNAL_APPLY_IMPULSE + if (body1.getInvMass()) + { + body1.internalApplyImpulse(contactPoint.m_normalWorldOnB*body1.getInvMass(),cpd->m_angularComponentA,normalImpulse); + } + if (body2.getInvMass()) + { + body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse); + } +#else //USE_INTERNAL_APPLY_IMPULSE + body1.applyImpulse(normal*(normalImpulse), rel_pos1); + body2.applyImpulse(-normal*(normalImpulse), rel_pos2); +#endif //USE_INTERNAL_APPLY_IMPULSE + + return normalImpulse; +} + + +btScalar resolveSingleFriction( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo) +{ + + (void)solverInfo; + + const btVector3& pos1 = contactPoint.getPositionWorldOnA(); + const btVector3& pos2 = contactPoint.getPositionWorldOnB(); + + btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; + assert(cpd); + + btScalar combinedFriction = cpd->m_friction; + + btScalar limit = cpd->m_appliedImpulse * combinedFriction; + + if (cpd->m_appliedImpulse>btScalar(0.)) + //friction + { + //apply friction in the 2 tangential directions + + // 1st tangent + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar j1,j2; + + { + + btScalar vrel = cpd->m_frictionWorldTangential0.dot(vel); + + // calculate j that moves us to zero relative velocity + j1 = -vrel * cpd->m_jacDiagABInvTangent0; + btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse0; + cpd->m_accumulatedTangentImpulse0 = oldTangentImpulse + j1; + GEN_set_min(cpd->m_accumulatedTangentImpulse0, limit); + GEN_set_max(cpd->m_accumulatedTangentImpulse0, -limit); + j1 = cpd->m_accumulatedTangentImpulse0 - oldTangentImpulse; + + } + { + // 2nd tangent + + btScalar vrel = cpd->m_frictionWorldTangential1.dot(vel); + + // calculate j that moves us to zero relative velocity + j2 = -vrel * cpd->m_jacDiagABInvTangent1; + btScalar oldTangentImpulse = cpd->m_accumulatedTangentImpulse1; + cpd->m_accumulatedTangentImpulse1 = oldTangentImpulse + j2; + GEN_set_min(cpd->m_accumulatedTangentImpulse1, limit); + GEN_set_max(cpd->m_accumulatedTangentImpulse1, -limit); + j2 = cpd->m_accumulatedTangentImpulse1 - oldTangentImpulse; + } + +#ifdef USE_INTERNAL_APPLY_IMPULSE + if (body1.getInvMass()) + { + body1.internalApplyImpulse(cpd->m_frictionWorldTangential0*body1.getInvMass(),cpd->m_frictionAngularComponent0A,j1); + body1.internalApplyImpulse(cpd->m_frictionWorldTangential1*body1.getInvMass(),cpd->m_frictionAngularComponent1A,j2); + } + if (body2.getInvMass()) + { + body2.internalApplyImpulse(cpd->m_frictionWorldTangential0*body2.getInvMass(),cpd->m_frictionAngularComponent0B,-j1); + body2.internalApplyImpulse(cpd->m_frictionWorldTangential1*body2.getInvMass(),cpd->m_frictionAngularComponent1B,-j2); + } +#else //USE_INTERNAL_APPLY_IMPULSE + body1.applyImpulse((j1 * cpd->m_frictionWorldTangential0)+(j2 * cpd->m_frictionWorldTangential1), rel_pos1); + body2.applyImpulse((j1 * -cpd->m_frictionWorldTangential0)+(j2 * -cpd->m_frictionWorldTangential1), rel_pos2); +#endif //USE_INTERNAL_APPLY_IMPULSE + + + } + return cpd->m_appliedImpulse; +} + + +btScalar resolveSingleFrictionOriginal( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo) +{ + + (void)solverInfo; + + const btVector3& pos1 = contactPoint.getPositionWorldOnA(); + const btVector3& pos2 = contactPoint.getPositionWorldOnB(); + + btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; + assert(cpd); + + btScalar combinedFriction = cpd->m_friction; + + btScalar limit = cpd->m_appliedImpulse * combinedFriction; + //if (contactPoint.m_appliedImpulse>btScalar(0.)) + //friction + { + //apply friction in the 2 tangential directions + + { + // 1st tangent + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar vrel = cpd->m_frictionWorldTangential0.dot(vel); + + // calculate j that moves us to zero relative velocity + btScalar j = -vrel * cpd->m_jacDiagABInvTangent0; + btScalar total = cpd->m_accumulatedTangentImpulse0 + j; + GEN_set_min(total, limit); + GEN_set_max(total, -limit); + j = total - cpd->m_accumulatedTangentImpulse0; + cpd->m_accumulatedTangentImpulse0 = total; + body1.applyImpulse(j * cpd->m_frictionWorldTangential0, rel_pos1); + body2.applyImpulse(j * -cpd->m_frictionWorldTangential0, rel_pos2); + } + + + { + // 2nd tangent + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar vrel = cpd->m_frictionWorldTangential1.dot(vel); + + // calculate j that moves us to zero relative velocity + btScalar j = -vrel * cpd->m_jacDiagABInvTangent1; + btScalar total = cpd->m_accumulatedTangentImpulse1 + j; + GEN_set_min(total, limit); + GEN_set_max(total, -limit); + j = total - cpd->m_accumulatedTangentImpulse1; + cpd->m_accumulatedTangentImpulse1 = total; + body1.applyImpulse(j * cpd->m_frictionWorldTangential1, rel_pos1); + body2.applyImpulse(j * -cpd->m_frictionWorldTangential1, rel_pos2); + } + } + return cpd->m_appliedImpulse; +} + + +//velocity + friction +//response between two dynamic objects with friction +btScalar resolveSingleCollisionCombined( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo) +{ + + const btVector3& pos1 = contactPoint.getPositionWorldOnA(); + const btVector3& pos2 = contactPoint.getPositionWorldOnB(); + const btVector3& normal = contactPoint.m_normalWorldOnB; + + btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition(); + + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = normal.dot(vel); + + btScalar Kfps = btScalar(1.) / solverInfo.m_timeStep ; + + //btScalar damping = solverInfo.m_damping ; + btScalar Kerp = solverInfo.m_erp; + btScalar Kcor = Kerp *Kfps; + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) contactPoint.m_userPersistentData; + assert(cpd); + btScalar distance = cpd->m_penetration; + btScalar positionalError = Kcor *-distance; + btScalar velocityError = cpd->m_restitution - rel_vel;// * damping; + + btScalar penetrationImpulse = positionalError * cpd->m_jacDiagABInv; + + btScalar velocityImpulse = velocityError * cpd->m_jacDiagABInv; + + btScalar normalImpulse = penetrationImpulse+velocityImpulse; + + // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse + btScalar oldNormalImpulse = cpd->m_appliedImpulse; + btScalar sum = oldNormalImpulse + normalImpulse; + cpd->m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; + + normalImpulse = cpd->m_appliedImpulse - oldNormalImpulse; + + +#ifdef USE_INTERNAL_APPLY_IMPULSE + if (body1.getInvMass()) + { + body1.internalApplyImpulse(contactPoint.m_normalWorldOnB*body1.getInvMass(),cpd->m_angularComponentA,normalImpulse); + } + if (body2.getInvMass()) + { + body2.internalApplyImpulse(contactPoint.m_normalWorldOnB*body2.getInvMass(),cpd->m_angularComponentB,-normalImpulse); + } +#else //USE_INTERNAL_APPLY_IMPULSE + body1.applyImpulse(normal*(normalImpulse), rel_pos1); + body2.applyImpulse(-normal*(normalImpulse), rel_pos2); +#endif //USE_INTERNAL_APPLY_IMPULSE + + { + //friction + btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + rel_vel = normal.dot(vel); + + + btVector3 lat_vel = vel - normal * rel_vel; + btScalar lat_rel_vel = lat_vel.length(); + + btScalar combinedFriction = cpd->m_friction; + + if (cpd->m_appliedImpulse > 0) + if (lat_rel_vel > SIMD_EPSILON) + { + lat_vel /= lat_rel_vel; + btVector3 temp1 = body1.getInvInertiaTensorWorld() * rel_pos1.cross(lat_vel); + btVector3 temp2 = body2.getInvInertiaTensorWorld() * rel_pos2.cross(lat_vel); + btScalar friction_impulse = lat_rel_vel / + (body1.getInvMass() + body2.getInvMass() + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); + btScalar normal_impulse = cpd->m_appliedImpulse * combinedFriction; + + GEN_set_min(friction_impulse, normal_impulse); + GEN_set_max(friction_impulse, -normal_impulse); + body1.applyImpulse(lat_vel * -friction_impulse, rel_pos1); + body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); + } + } + + + + return normalImpulse; +} + +btScalar resolveSingleFrictionEmpty( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo) +{ + (void)contactPoint; + (void)body1; + (void)body2; + (void)solverInfo; + + + return btScalar(0.); +}; + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h new file mode 100644 index 00000000000..0834deddeac --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactConstraint.h @@ -0,0 +1,122 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONTACT_CONSTRAINT_H +#define CONTACT_CONSTRAINT_H + +//todo: make into a proper class working with the iterative constraint solver + +class btRigidBody; +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btScalar.h" +struct btContactSolverInfo; +class btManifoldPoint; + +enum { + DEFAULT_CONTACT_SOLVER_TYPE=0, + CONTACT_SOLVER_TYPE1, + CONTACT_SOLVER_TYPE2, + USER_CONTACT_SOLVER_TYPE1, + MAX_CONTACT_SOLVER_TYPES +}; + + +typedef btScalar (*ContactSolverFunc)(btRigidBody& body1, + btRigidBody& body2, + class btManifoldPoint& contactPoint, + const btContactSolverInfo& info); + +///stores some extra information to each contact point. It is not in the contact point, because that want to keep the collision detection independent from the constraint solver. +struct btConstraintPersistentData +{ + inline btConstraintPersistentData() + :m_appliedImpulse(btScalar(0.)), + m_prevAppliedImpulse(btScalar(0.)), + m_accumulatedTangentImpulse0(btScalar(0.)), + m_accumulatedTangentImpulse1(btScalar(0.)), + m_jacDiagABInv(btScalar(0.)), + m_persistentLifeTime(0), + m_restitution(btScalar(0.)), + m_friction(btScalar(0.)), + m_penetration(btScalar(0.)), + m_contactSolverFunc(0), + m_frictionSolverFunc(0) + { + } + + + /// total applied impulse during most recent frame + btScalar m_appliedImpulse; + btScalar m_prevAppliedImpulse; + btScalar m_accumulatedTangentImpulse0; + btScalar m_accumulatedTangentImpulse1; + + btScalar m_jacDiagABInv; + btScalar m_jacDiagABInvTangent0; + btScalar m_jacDiagABInvTangent1; + int m_persistentLifeTime; + btScalar m_restitution; + btScalar m_friction; + btScalar m_penetration; + btVector3 m_frictionWorldTangential0; + btVector3 m_frictionWorldTangential1; + + btVector3 m_frictionAngularComponent0A; + btVector3 m_frictionAngularComponent0B; + btVector3 m_frictionAngularComponent1A; + btVector3 m_frictionAngularComponent1B; + + //some data doesn't need to be persistent over frames: todo: clean/reuse this + btVector3 m_angularComponentA; + btVector3 m_angularComponentB; + + ContactSolverFunc m_contactSolverFunc; + ContactSolverFunc m_frictionSolverFunc; + +}; + +///bilateral constraint between two dynamic objects +///positive distance = separation, negative distance = penetration +void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1, + btRigidBody& body2, const btVector3& pos2, + btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep); + + +///contact constraint resolution: +///calculate and apply impulse to satisfy non-penetration and non-negative relative velocity constraint +///positive distance = separation, negative distance = penetration +btScalar resolveSingleCollision( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& info); + +btScalar resolveSingleFriction( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo + ); + + + +btScalar resolveSingleCollisionCombined( + btRigidBody& body1, + btRigidBody& body2, + btManifoldPoint& contactPoint, + const btContactSolverInfo& solverInfo + ); + +#endif //CONTACT_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h new file mode 100644 index 00000000000..c3c73e300f4 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h @@ -0,0 +1,47 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef CONTACT_SOLVER_INFO +#define CONTACT_SOLVER_INFO + + +struct btContactSolverInfo +{ + + inline btContactSolverInfo() + { + m_tau = btScalar(0.6); + m_damping = btScalar(1.0); + m_friction = btScalar(0.3); + m_restitution = btScalar(0.); + m_maxErrorReduction = btScalar(20.); + m_numIterations = 10; + m_erp = btScalar(0.4); + m_sor = btScalar(1.3); + } + + btScalar m_tau; + btScalar m_damping; + btScalar m_friction; + btScalar m_timeStep; + btScalar m_restitution; + int m_numIterations; + btScalar m_maxErrorReduction; + btScalar m_sor; + btScalar m_erp; + +}; + +#endif //CONTACT_SOLVER_INFO diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp new file mode 100644 index 00000000000..747d10d1f8b --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp @@ -0,0 +1,389 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btGeneric6DofConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btTransformUtil.h" +#include + +static const btScalar kSign[] = { btScalar(1.0), btScalar(-1.0), btScalar(1.0) }; +static const int kAxisA[] = { 1, 0, 0 }; +static const int kAxisB[] = { 2, 2, 1 }; +#define GENERIC_D6_DISABLE_WARMSTARTING 1 + +btGeneric6DofConstraint::btGeneric6DofConstraint() +{ +} + +btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB) +: btTypedConstraint(rbA, rbB) +, m_frameInA(frameInA) +, m_frameInB(frameInB) +{ + //free means upper < lower, + //locked means upper == lower + //limited means upper > lower + //so start all locked + for (int i=0; i<6;++i) + { + m_lowerLimit[i] = btScalar(0.0); + m_upperLimit[i] = btScalar(0.0); + m_accumulatedImpulse[i] = btScalar(0.0); + } + +} + + +void btGeneric6DofConstraint::buildJacobian() +{ + btVector3 localNormalInA(0,0,0); + + const btVector3& pivotInA = m_frameInA.getOrigin(); + const btVector3& pivotInB = m_frameInB.getOrigin(); + + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform() * m_frameInA.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform() * m_frameInB.getOrigin(); + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + int i; + //linear part + for (i=0;i<3;i++) + { + if (isLimited(i)) + { + localNormalInA[i] = 1; + btVector3 normalWorld = m_rbA.getCenterOfMassTransform().getBasis() * localNormalInA; + + + // Create linear atom + new (&m_jacLinear[i]) btJacobianEntry( + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getCenterOfMassTransform()*pivotInA - m_rbA.getCenterOfMassPosition(), + m_rbB.getCenterOfMassTransform()*pivotInB - m_rbB.getCenterOfMassPosition(), + normalWorld, + m_rbA.getInvInertiaDiagLocal(), + m_rbA.getInvMass(), + m_rbB.getInvInertiaDiagLocal(), + m_rbB.getInvMass()); + + //optionally disable warmstarting +#ifdef GENERIC_D6_DISABLE_WARMSTARTING + m_accumulatedImpulse[i] = btScalar(0.); +#endif //GENERIC_D6_DISABLE_WARMSTARTING + + // Apply accumulated impulse + btVector3 impulse_vector = m_accumulatedImpulse[i] * normalWorld; + + m_rbA.applyImpulse( impulse_vector, rel_pos1); + m_rbB.applyImpulse(-impulse_vector, rel_pos2); + + localNormalInA[i] = 0; + } + } + + // angular part + for (i=0;i<3;i++) + { + if (isLimited(i+3)) + { + btVector3 axisA = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn( kAxisA[i] ); + btVector3 axisB = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn( kAxisB[i] ); + + // Dirk: This is IMO mathematically the correct way, but we should consider axisA and axisB being near parallel maybe + btVector3 axis = kSign[i] * axisA.cross(axisB); + + // Create angular atom + new (&m_jacAng[i]) btJacobianEntry(axis, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + +#ifdef GENERIC_D6_DISABLE_WARMSTARTING + m_accumulatedImpulse[i + 3] = btScalar(0.); +#endif //GENERIC_D6_DISABLE_WARMSTARTING + + // Apply accumulated impulse + btVector3 impulse_vector = m_accumulatedImpulse[i + 3] * axis; + + m_rbA.applyTorqueImpulse( impulse_vector); + m_rbB.applyTorqueImpulse(-impulse_vector); + } + } +} + +btScalar getMatrixElem(const btMatrix3x3& mat,int index) +{ + int row = index%3; + int col = index / 3; + return mat[row][col]; +} + +///MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html +bool MatrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz) +{ + // rot = cy*cz -cy*sz sy + // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx + // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy + +/// 0..8 + + if (getMatrixElem(mat,2) < btScalar(1.0)) + { + if (getMatrixElem(mat,2) > btScalar(-1.0)) + { + xyz[0] = btAtan2(-getMatrixElem(mat,5),getMatrixElem(mat,8)); + xyz[1] = btAsin(getMatrixElem(mat,2)); + xyz[2] = btAtan2(-getMatrixElem(mat,1),getMatrixElem(mat,0)); + return true; + } + else + { + // WARNING. Not unique. XA - ZA = -atan2(r10,r11) + xyz[0] = -btAtan2(getMatrixElem(mat,3),getMatrixElem(mat,4)); + xyz[1] = -SIMD_HALF_PI; + xyz[2] = btScalar(0.0); + return false; + } + } + else + { + // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11) + xyz[0] = btAtan2(getMatrixElem(mat,3),getMatrixElem(mat,4)); + xyz[1] = SIMD_HALF_PI; + xyz[2] = 0.0; + + } + + return false; +} + + +void btGeneric6DofConstraint::solveConstraint(btScalar timeStep) +{ + btScalar tau = btScalar(0.1); + btScalar damping = btScalar(1.0); + + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform() * m_frameInA.getOrigin(); + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform() * m_frameInB.getOrigin(); + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 localNormalInA(0,0,0); + int i; + + // linear + for (i=0;i<3;i++) + { + if (isLimited(i)) + { + btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); + btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); + + localNormalInA.setValue(0,0,0); + localNormalInA[i] = 1; + btVector3 normalWorld = m_rbA.getCenterOfMassTransform().getBasis() * localNormalInA; + + btScalar jacDiagABInv = btScalar(1.) / m_jacLinear[i].getDiagonal(); + + //velocity error (first order error) + btScalar rel_vel = m_jacLinear[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, + m_rbB.getLinearVelocity(),angvelB); + + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normalWorld); + btScalar lo = btScalar(-1e30); + btScalar hi = btScalar(1e30); + + //handle the limits + if (m_lowerLimit[i] < m_upperLimit[i]) + { + { + if (depth > m_upperLimit[i]) + { + depth -= m_upperLimit[i]; + lo = btScalar(0.); + + } else + { + if (depth < m_lowerLimit[i]) + { + depth -= m_lowerLimit[i]; + hi = btScalar(0.); + } else + { + continue; + } + } + } + } + + btScalar normalImpulse= (tau*depth/timeStep - damping*rel_vel) * jacDiagABInv; + btScalar oldNormalImpulse = m_accumulatedImpulse[i]; + btScalar sum = oldNormalImpulse + normalImpulse; + m_accumulatedImpulse[i] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + normalImpulse = m_accumulatedImpulse[i] - oldNormalImpulse; + + btVector3 impulse_vector = normalWorld * normalImpulse; + m_rbA.applyImpulse( impulse_vector, rel_pos1); + m_rbB.applyImpulse(-impulse_vector, rel_pos2); + + localNormalInA[i] = 0; + } + } + + btVector3 axis; + btScalar angle; + btTransform frameAWorld = m_rbA.getCenterOfMassTransform() * m_frameInA; + btTransform frameBWorld = m_rbB.getCenterOfMassTransform() * m_frameInB; + + btTransformUtil::calculateDiffAxisAngle(frameAWorld,frameBWorld,axis,angle); + btQuaternion diff(axis,angle); + btMatrix3x3 diffMat (diff); + btVector3 xyz; + ///this is not perfect, we can first check which axis are limited, and choose a more appropriate order + MatrixToEulerXYZ(diffMat,xyz); + + // angular + for (i=0;i<3;i++) + { + if (isLimited(i+3)) + { + btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); + btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); + + btScalar jacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal(); + + //velocity error (first order error) + btScalar rel_vel = m_jacAng[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, + m_rbB.getLinearVelocity(),angvelB); + + //positional error (zeroth order error) + btVector3 axisA = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn( kAxisA[i] ); + btVector3 axisB = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn( kAxisB[i] ); + + btScalar rel_pos = kSign[i] * axisA.dot(axisB); + + btScalar lo = btScalar(-1e30); + btScalar hi = btScalar(1e30); + + //handle the twist limit + if (m_lowerLimit[i+3] < m_upperLimit[i+3]) + { + //clamp the values + btScalar loLimit = m_lowerLimit[i+3] > -3.1415 ? m_lowerLimit[i+3] : btScalar(-1e30); + btScalar hiLimit = m_upperLimit[i+3] < 3.1415 ? m_upperLimit[i+3] : btScalar(1e30); + + btScalar projAngle = btScalar(-1.)*xyz[i]; + + if (projAngle < loLimit) + { + hi = btScalar(0.); + rel_pos = (loLimit - projAngle); + } else + { + if (projAngle > hiLimit) + { + lo = btScalar(0.); + rel_pos = (hiLimit - projAngle); + } else + { + continue; + } + } + } + + //impulse + + btScalar normalImpulse= -(tau*rel_pos/timeStep + damping*rel_vel) * jacDiagABInv; + btScalar oldNormalImpulse = m_accumulatedImpulse[i+3]; + btScalar sum = oldNormalImpulse + normalImpulse; + m_accumulatedImpulse[i+3] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum; + normalImpulse = m_accumulatedImpulse[i+3] - oldNormalImpulse; + + // Dirk: Not needed - we could actually project onto Jacobian entry here (same as above) + btVector3 axis = kSign[i] * axisA.cross(axisB); + btVector3 impulse_vector = axis * normalImpulse; + + m_rbA.applyTorqueImpulse( impulse_vector); + m_rbB.applyTorqueImpulse(-impulse_vector); + } + } +} + +void btGeneric6DofConstraint::updateRHS(btScalar timeStep) +{ + (void)timeStep; + +} + +btScalar btGeneric6DofConstraint::computeAngle(int axis) const + { + btScalar angle = btScalar(0.f); + + switch (axis) + { + case 0: + { + btVector3 v1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(1); + btVector3 v2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(1); + btVector3 w2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(2); + + btScalar s = v1.dot(w2); + btScalar c = v1.dot(v2); + + angle = btAtan2( s, c ); + } + break; + + case 1: + { + btVector3 w1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(2); + btVector3 w2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(2); + btVector3 u2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(0); + + btScalar s = w1.dot(u2); + btScalar c = w1.dot(w2); + + angle = btAtan2( s, c ); + } + break; + + case 2: + { + btVector3 u1 = m_rbA.getCenterOfMassTransform().getBasis() * m_frameInA.getBasis().getColumn(0); + btVector3 u2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(0); + btVector3 v2 = m_rbB.getCenterOfMassTransform().getBasis() * m_frameInB.getBasis().getColumn(1); + + btScalar s = u1.dot(v2); + btScalar c = u1.dot(u2); + + angle = btAtan2( s, c ); + } + break; + default: + btAssert ( 0 ) ; + + break ; + } + + return angle; + } + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h new file mode 100644 index 00000000000..b114e54fa69 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h @@ -0,0 +1,120 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef GENERIC_6DOF_CONSTRAINT_H +#define GENERIC_6DOF_CONSTRAINT_H + +#include "../../LinearMath/btVector3.h" +#include "btJacobianEntry.h" +#include "btTypedConstraint.h" + +class btRigidBody; + + + +/// btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space +/// btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked' +/// Work in progress (is still a Hinge actually) +class btGeneric6DofConstraint : public btTypedConstraint +{ + btJacobianEntry m_jacLinear[3]; // 3 orthogonal linear constraints + btJacobianEntry m_jacAng[3]; // 3 orthogonal angular constraints + + btTransform m_frameInA; // the constraint space w.r.t body A + btTransform m_frameInB; // the constraint space w.r.t body B + + btScalar m_lowerLimit[6]; // the constraint lower limits + btScalar m_upperLimit[6]; // the constraint upper limits + + btScalar m_accumulatedImpulse[6]; + + btGeneric6DofConstraint& operator=(btGeneric6DofConstraint& other) + { + btAssert(0); + (void) other; + return *this; + } + +public: + btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ); + + btGeneric6DofConstraint(); + + + virtual void buildJacobian(); + + virtual void solveConstraint(btScalar timeStep); + + void updateRHS(btScalar timeStep); + + btScalar computeAngle(int axis) const; + + void setLinearLowerLimit(const btVector3& linearLower) + { + m_lowerLimit[0] = linearLower.getX(); + m_lowerLimit[1] = linearLower.getY(); + m_lowerLimit[2] = linearLower.getZ(); + } + + void setLinearUpperLimit(const btVector3& linearUpper) + { + m_upperLimit[0] = linearUpper.getX(); + m_upperLimit[1] = linearUpper.getY(); + m_upperLimit[2] = linearUpper.getZ(); + } + + void setAngularLowerLimit(const btVector3& angularLower) + { + m_lowerLimit[3] = angularLower.getX(); + m_lowerLimit[4] = angularLower.getY(); + m_lowerLimit[5] = angularLower.getZ(); + } + + void setAngularUpperLimit(const btVector3& angularUpper) + { + m_upperLimit[3] = angularUpper.getX(); + m_upperLimit[4] = angularUpper.getY(); + m_upperLimit[5] = angularUpper.getZ(); + } + + //first 3 are linear, next 3 are angular + void SetLimit(int axis, btScalar lo, btScalar hi) + { + m_lowerLimit[axis] = lo; + m_upperLimit[axis] = hi; + } + + //free means upper < lower, + //locked means upper == lower + //limited means upper > lower + //limitIndex: first 3 are linear, next 3 are angular + bool isLimited(int limitIndex) + { + return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]); + } + + const btRigidBody& getRigidBodyA() const + { + return m_rbA; + } + const btRigidBody& getRigidBodyB() const + { + return m_rbB; + } + + +}; + +#endif //GENERIC_6DOF_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp new file mode 100644 index 00000000000..27e30987549 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp @@ -0,0 +1,229 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btHingeConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btTransformUtil.h" +#include + +btHingeConstraint::btHingeConstraint(): +m_enableAngularMotor(false) +{ +} + +btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, + btVector3& axisInA,btVector3& axisInB) +:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB), +m_axisInA(axisInA), +m_axisInB(-axisInB), +m_angularOnly(false), +m_enableAngularMotor(false) +{ + +} + + +btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA) +:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)), +m_axisInA(axisInA), +//fixed axis in worldspace +m_axisInB(rbA.getCenterOfMassTransform().getBasis() * -axisInA), +m_angularOnly(false), +m_enableAngularMotor(false) +{ + +} + +void btHingeConstraint::buildJacobian() +{ + m_appliedImpulse = btScalar(0.); + + btVector3 normal(0,0,0); + + if (!m_angularOnly) + { + for (int i=0;i<3;i++) + { + normal[i] = 1; + new (&m_jac[i]) btJacobianEntry( + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(), + m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(), + normal, + m_rbA.getInvInertiaDiagLocal(), + m_rbA.getInvMass(), + m_rbB.getInvInertiaDiagLocal(), + m_rbB.getInvMass()); + normal[i] = 0; + } + } + + //calculate two perpendicular jointAxis, orthogonal to hingeAxis + //these two jointAxis require equal angular velocities for both bodies + + //this is unused for now, it's a todo + btVector3 jointAxis0local; + btVector3 jointAxis1local; + + btPlaneSpace1(m_axisInA,jointAxis0local,jointAxis1local); + + getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; + btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local; + btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local; + btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; + + new (&m_jacAng[0]) btJacobianEntry(jointAxis0, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + + new (&m_jacAng[1]) btJacobianEntry(jointAxis1, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + + new (&m_jacAng[2]) btJacobianEntry(hingeAxisWorld, + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getInvInertiaDiagLocal(), + m_rbB.getInvInertiaDiagLocal()); + + + +} + +void btHingeConstraint::solveConstraint(btScalar timeStep) +{ + + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; + + btVector3 normal(0,0,0); + btScalar tau = btScalar(0.3); + btScalar damping = btScalar(1.); + +//linear part + if (!m_angularOnly) + { + for (int i=0;i<3;i++) + { + normal[i] = 1; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + + btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = normal.dot(vel); + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + btScalar impulse = depth*tau/timeStep * jacDiagABInv - damping * rel_vel * jacDiagABInv * damping; + m_appliedImpulse += impulse; + btVector3 impulse_vector = normal * impulse; + m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); + m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); + + normal[i] = 0; + } + } + + + { + ///solve angular part + + // get axes in world space + btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA; + btVector3 axisB = getRigidBodyB().getCenterOfMassTransform().getBasis() * m_axisInB; + + const btVector3& angVelA = getRigidBodyA().getAngularVelocity(); + const btVector3& angVelB = getRigidBodyB().getAngularVelocity(); + + btVector3 angVelAroundHingeAxisA = axisA * axisA.dot(angVelA); + btVector3 angVelAroundHingeAxisB = axisB * axisB.dot(angVelB); + + btVector3 angAorthog = angVelA - angVelAroundHingeAxisA; + btVector3 angBorthog = angVelB - angVelAroundHingeAxisB; + btVector3 velrelOrthog = angAorthog-angBorthog; + { + //solve orthogonal angular velocity correction + btScalar relaxation = btScalar(1.); + btScalar len = velrelOrthog.length(); + if (len > btScalar(0.00001)) + { + btVector3 normal = velrelOrthog.normalized(); + btScalar denom = getRigidBodyA().computeAngularImpulseDenominator(normal) + + getRigidBodyB().computeAngularImpulseDenominator(normal); + // scale for mass and relaxation + //todo: expose this 0.9 factor to developer + velrelOrthog *= (btScalar(1.)/denom) * btScalar(0.9); + } + + //solve angular positional correction + btVector3 angularError = -axisA.cross(axisB) *(btScalar(1.)/timeStep); + btScalar len2 = angularError.length(); + if (len2>btScalar(0.00001)) + { + btVector3 normal2 = angularError.normalized(); + btScalar denom2 = getRigidBodyA().computeAngularImpulseDenominator(normal2) + + getRigidBodyB().computeAngularImpulseDenominator(normal2); + angularError *= (btScalar(1.)/denom2) * relaxation; + } + + m_rbA.applyTorqueImpulse(-velrelOrthog+angularError); + m_rbB.applyTorqueImpulse(velrelOrthog-angularError); + } + + //apply motor + if (m_enableAngularMotor) + { + //todo: add limits too + btVector3 angularLimit(0,0,0); + + btVector3 velrel = angVelAroundHingeAxisA - angVelAroundHingeAxisB; + btScalar projRelVel = velrel.dot(axisA); + + btScalar desiredMotorVel = m_motorTargetVelocity; + btScalar motor_relvel = desiredMotorVel - projRelVel; + + btScalar denom3 = getRigidBodyA().computeAngularImpulseDenominator(axisA) + + getRigidBodyB().computeAngularImpulseDenominator(axisA); + + btScalar unclippedMotorImpulse = (btScalar(1.)/denom3) * motor_relvel;; + //todo: should clip against accumulated impulse + btScalar clippedMotorImpulse = unclippedMotorImpulse > m_maxMotorImpulse ? m_maxMotorImpulse : unclippedMotorImpulse; + clippedMotorImpulse = clippedMotorImpulse < -m_maxMotorImpulse ? -m_maxMotorImpulse : clippedMotorImpulse; + btVector3 motorImp = clippedMotorImpulse * axisA; + + m_rbA.applyTorqueImpulse(motorImp+angularLimit); + m_rbB.applyTorqueImpulse(-motorImp-angularLimit); + + } + } + +} + +void btHingeConstraint::updateRHS(btScalar timeStep) +{ + (void)timeStep; + +} + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h new file mode 100644 index 00000000000..5c1ceafbc5b --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h @@ -0,0 +1,81 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef HINGECONSTRAINT_H +#define HINGECONSTRAINT_H + +#include "../../LinearMath/btVector3.h" +#include "btJacobianEntry.h" +#include "btTypedConstraint.h" + +class btRigidBody; + + +/// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space +/// axis defines the orientation of the hinge axis +class btHingeConstraint : public btTypedConstraint +{ + btJacobianEntry m_jac[3]; //3 orthogonal linear constraints + btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 for limit/motor + + btVector3 m_pivotInA; + btVector3 m_pivotInB; + btVector3 m_axisInA; + btVector3 m_axisInB; + + bool m_angularOnly; + + btScalar m_motorTargetVelocity; + btScalar m_maxMotorImpulse; + bool m_enableAngularMotor; + +public: + + btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB,btVector3& axisInA,btVector3& axisInB); + + btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA); + + btHingeConstraint(); + + virtual void buildJacobian(); + + virtual void solveConstraint(btScalar timeStep); + + void updateRHS(btScalar timeStep); + + const btRigidBody& getRigidBodyA() const + { + return m_rbA; + } + const btRigidBody& getRigidBodyB() const + { + return m_rbB; + } + + void setAngularOnly(bool angularOnly) + { + m_angularOnly = angularOnly; + } + + void enableAngularMotor(bool enableMotor,btScalar targetVelocity,btScalar maxMotorImpulse) + { + m_enableAngularMotor = enableMotor; + m_motorTargetVelocity = targetVelocity; + m_maxMotorImpulse = maxMotorImpulse; + } + +}; + +#endif //HINGECONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h new file mode 100644 index 00000000000..aae3ed0373f --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h @@ -0,0 +1,156 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef JACOBIAN_ENTRY_H +#define JACOBIAN_ENTRY_H + +#include "../../LinearMath/btVector3.h" +#include "../Dynamics/btRigidBody.h" + + +//notes: +// Another memory optimization would be to store m_1MinvJt in the remaining 3 w components +// which makes the btJacobianEntry memory layout 16 bytes +// if you only are interested in angular part, just feed massInvA and massInvB zero + +/// Jacobian entry is an abstraction that allows to describe constraints +/// it can be used in combination with a constraint solver +/// Can be used to relate the effect of an impulse to the constraint error +class btJacobianEntry +{ +public: + btJacobianEntry() {}; + //constraint between two different rigidbodies + btJacobianEntry( + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + const btVector3& rel_pos1,const btVector3& rel_pos2, + const btVector3& jointAxis, + const btVector3& inertiaInvA, + const btScalar massInvA, + const btVector3& inertiaInvB, + const btScalar massInvB) + :m_linearJointAxis(jointAxis) + { + m_aJ = world2A*(rel_pos1.cross(m_linearJointAxis)); + m_bJ = world2B*(rel_pos2.cross(-m_linearJointAxis)); + m_0MinvJt = inertiaInvA * m_aJ; + m_1MinvJt = inertiaInvB * m_bJ; + m_Adiag = massInvA + m_0MinvJt.dot(m_aJ) + massInvB + m_1MinvJt.dot(m_bJ); + + btAssert(m_Adiag > btScalar(0.0)); + } + + //angular constraint between two different rigidbodies + btJacobianEntry(const btVector3& jointAxis, + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + const btVector3& inertiaInvA, + const btVector3& inertiaInvB) + :m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.))) + { + m_aJ= world2A*jointAxis; + m_bJ = world2B*-jointAxis; + m_0MinvJt = inertiaInvA * m_aJ; + m_1MinvJt = inertiaInvB * m_bJ; + m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ); + + btAssert(m_Adiag > btScalar(0.0)); + } + + //angular constraint between two different rigidbodies + btJacobianEntry(const btVector3& axisInA, + const btVector3& axisInB, + const btVector3& inertiaInvA, + const btVector3& inertiaInvB) + : m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.))) + , m_aJ(axisInA) + , m_bJ(-axisInB) + { + m_0MinvJt = inertiaInvA * m_aJ; + m_1MinvJt = inertiaInvB * m_bJ; + m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ); + + btAssert(m_Adiag > btScalar(0.0)); + } + + //constraint on one rigidbody + btJacobianEntry( + const btMatrix3x3& world2A, + const btVector3& rel_pos1,const btVector3& rel_pos2, + const btVector3& jointAxis, + const btVector3& inertiaInvA, + const btScalar massInvA) + :m_linearJointAxis(jointAxis) + { + m_aJ= world2A*(rel_pos1.cross(jointAxis)); + m_bJ = world2A*(rel_pos2.cross(-jointAxis)); + m_0MinvJt = inertiaInvA * m_aJ; + m_1MinvJt = btVector3(btScalar(0.),btScalar(0.),btScalar(0.)); + m_Adiag = massInvA + m_0MinvJt.dot(m_aJ); + + btAssert(m_Adiag > btScalar(0.0)); + } + + btScalar getDiagonal() const { return m_Adiag; } + + // for two constraints on the same rigidbody (for example vehicle friction) + btScalar getNonDiagonal(const btJacobianEntry& jacB, const btScalar massInvA) const + { + const btJacobianEntry& jacA = *this; + btScalar lin = massInvA * jacA.m_linearJointAxis.dot(jacB.m_linearJointAxis); + btScalar ang = jacA.m_0MinvJt.dot(jacB.m_aJ); + return lin + ang; + } + + + + // for two constraints on sharing two same rigidbodies (for example two contact points between two rigidbodies) + btScalar getNonDiagonal(const btJacobianEntry& jacB,const btScalar massInvA,const btScalar massInvB) const + { + const btJacobianEntry& jacA = *this; + btVector3 lin = jacA.m_linearJointAxis * jacB.m_linearJointAxis; + btVector3 ang0 = jacA.m_0MinvJt * jacB.m_aJ; + btVector3 ang1 = jacA.m_1MinvJt * jacB.m_bJ; + btVector3 lin0 = massInvA * lin ; + btVector3 lin1 = massInvB * lin; + btVector3 sum = ang0+ang1+lin0+lin1; + return sum[0]+sum[1]+sum[2]; + } + + btScalar getRelativeVelocity(const btVector3& linvelA,const btVector3& angvelA,const btVector3& linvelB,const btVector3& angvelB) + { + btVector3 linrel = linvelA - linvelB; + btVector3 angvela = angvelA * m_aJ; + btVector3 angvelb = angvelB * m_bJ; + linrel *= m_linearJointAxis; + angvela += angvelb; + angvela += linrel; + btScalar rel_vel2 = angvela[0]+angvela[1]+angvela[2]; + return rel_vel2 + SIMD_EPSILON; + } +//private: + + btVector3 m_linearJointAxis; + btVector3 m_aJ; + btVector3 m_bJ; + btVector3 m_0MinvJt; + btVector3 m_1MinvJt; + //Optimization: can be stored in the w/last component of one of the vectors + btScalar m_Adiag; + +}; + +#endif //JACOBIAN_ENTRY_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp new file mode 100644 index 00000000000..aacb0a3ea66 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp @@ -0,0 +1,116 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btPoint2PointConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include + + + +btPoint2PointConstraint::btPoint2PointConstraint() +{ +} + +btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB) +:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB) +{ + +} + + +btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA) +:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)) +{ + +} + +void btPoint2PointConstraint::buildJacobian() +{ + m_appliedImpulse = btScalar(0.); + + btVector3 normal(0,0,0); + + for (int i=0;i<3;i++) + { + normal[i] = 1; + new (&m_jac[i]) btJacobianEntry( + m_rbA.getCenterOfMassTransform().getBasis().transpose(), + m_rbB.getCenterOfMassTransform().getBasis().transpose(), + m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(), + m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(), + normal, + m_rbA.getInvInertiaDiagLocal(), + m_rbA.getInvMass(), + m_rbB.getInvInertiaDiagLocal(), + m_rbB.getInvMass()); + normal[i] = 0; + } + +} + +void btPoint2PointConstraint::solveConstraint(btScalar timeStep) +{ + btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_pivotInA; + btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_pivotInB; + + + btVector3 normal(0,0,0); + + +// btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity(); +// btVector3 angvelB = m_rbB.getCenterOfMassTransform().getBasis().transpose() * m_rbB.getAngularVelocity(); + + for (int i=0;i<3;i++) + { + normal[i] = 1; + btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal(); + + btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition(); + btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition(); + //this jacobian entry could be re-used for all iterations + + btVector3 vel1 = m_rbA.getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = m_rbB.getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar rel_vel; + rel_vel = normal.dot(vel); + + /* + //velocity error (first order error) + btScalar rel_vel = m_jac[i].getRelativeVelocity(m_rbA.getLinearVelocity(),angvelA, + m_rbB.getLinearVelocity(),angvelB); + */ + + //positional error (zeroth order error) + btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal + + btScalar impulse = depth*m_setting.m_tau/timeStep * jacDiagABInv - m_setting.m_damping * rel_vel * jacDiagABInv; + m_appliedImpulse+=impulse; + btVector3 impulse_vector = normal * impulse; + m_rbA.applyImpulse(impulse_vector, pivotAInW - m_rbA.getCenterOfMassPosition()); + m_rbB.applyImpulse(-impulse_vector, pivotBInW - m_rbB.getCenterOfMassPosition()); + + normal[i] = 0; + } +} + +void btPoint2PointConstraint::updateRHS(btScalar timeStep) +{ + (void)timeStep; + +} + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h new file mode 100644 index 00000000000..71da8ac0347 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h @@ -0,0 +1,77 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef POINT2POINTCONSTRAINT_H +#define POINT2POINTCONSTRAINT_H + +#include "../../LinearMath/btVector3.h" +#include "btJacobianEntry.h" +#include "btTypedConstraint.h" + +class btRigidBody; + +struct btConstraintSetting +{ + btConstraintSetting() : + m_tau(btScalar(0.3)), + m_damping(btScalar(1.)) + { + } + btScalar m_tau; + btScalar m_damping; +}; + +/// point to point constraint between two rigidbodies each with a pivotpoint that descibes the 'ballsocket' location in local space +class btPoint2PointConstraint : public btTypedConstraint +{ + btJacobianEntry m_jac[3]; //3 orthogonal linear constraints + + btVector3 m_pivotInA; + btVector3 m_pivotInB; + + + +public: + + btConstraintSetting m_setting; + + btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB); + + btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA); + + btPoint2PointConstraint(); + + virtual void buildJacobian(); + + + virtual void solveConstraint(btScalar timeStep); + + void updateRHS(btScalar timeStep); + + void setPivotA(const btVector3& pivotA) + { + m_pivotInA = pivotA; + } + + void setPivotB(const btVector3& pivotB) + { + m_pivotInB = pivotB; + } + + + +}; + +#endif //POINT2POINTCONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp new file mode 100644 index 00000000000..14b36ad44fd --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp @@ -0,0 +1,1158 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btSequentialImpulseConstraintSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "btContactConstraint.h" +#include "btSolve2LinearConstraint.h" +#include "btContactSolverInfo.h" +#include "LinearMath/btIDebugDraw.h" +#include "btJacobianEntry.h" +#include "LinearMath/btMinMax.h" +#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" +#include +#include "LinearMath/btStackAlloc.h" +#include "LinearMath/btQuickprof.h" +#include "btSolverBody.h" +#include "btSolverConstraint.h" + +#include "LinearMath/btAlignedObjectArray.h" + +#ifdef USE_PROFILE +#include "LinearMath/btQuickprof.h" +#endif //USE_PROFILE + +int totalCpd = 0; + +int gTotalContactPoints = 0; + +struct btOrderIndex +{ + int m_manifoldIndex; + int m_pointIndex; +}; + + + +#define SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS 16384 +static btOrderIndex gOrder[SEQUENTIAL_IMPULSE_MAX_SOLVER_POINTS]; + + +unsigned long btSequentialImpulseConstraintSolver::btRand2() +{ + m_btSeed2 = (1664525L*m_btSeed2 + 1013904223L) & 0xffffffff; + return m_btSeed2; +} + + + +//See ODE: adam's all-int straightforward(?) dRandInt (0..n-1) +int btSequentialImpulseConstraintSolver::btRandInt2 (int n) +{ + // seems good; xor-fold and modulus + const unsigned long un = n; + unsigned long r = btRand2(); + + // note: probably more aggressive than it needs to be -- might be + // able to get away without one or two of the innermost branches. + if (un <= 0x00010000UL) { + r ^= (r >> 16); + if (un <= 0x00000100UL) { + r ^= (r >> 8); + if (un <= 0x00000010UL) { + r ^= (r >> 4); + if (un <= 0x00000004UL) { + r ^= (r >> 2); + if (un <= 0x00000002UL) { + r ^= (r >> 1); + } + } + } + } + } + + return (int) (r % un); +} + + + + + +bool MyContactDestroyedCallback(void* userPersistentData) +{ + assert (userPersistentData); + btConstraintPersistentData* cpd = (btConstraintPersistentData*)userPersistentData; + delete cpd; + totalCpd--; + //printf("totalCpd = %i. DELETED Ptr %x\n",totalCpd,userPersistentData); + return true; +} + + + +btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver() +:m_solverMode(SOLVER_RANDMIZE_ORDER | SOLVER_CACHE_FRIENDLY), //not using SOLVER_USE_WARMSTARTING, +m_btSeed2(0) +{ + gContactDestroyedCallback = &MyContactDestroyedCallback; + + //initialize default friction/contact funcs + int i,j; + for (i=0;im_angularVelocity = rigidbody->getAngularVelocity(); + solverBody->m_centerOfMassPosition = rigidbody->getCenterOfMassPosition(); + solverBody->m_friction = rigidbody->getFriction(); +// solverBody->m_invInertiaWorld = rigidbody->getInvInertiaTensorWorld(); + solverBody->m_invMass = rigidbody->getInvMass(); + solverBody->m_linearVelocity = rigidbody->getLinearVelocity(); + solverBody->m_originalBody = rigidbody; + solverBody->m_angularFactor = rigidbody->getAngularFactor(); +} + +btScalar penetrationResolveFactor = btScalar(0.9); +btScalar restitutionCurve(btScalar rel_vel, btScalar restitution) +{ + btScalar rest = restitution * -rel_vel; + return rest; +} + + + + + + +//velocity + friction +//response between two dynamic objects with friction +SIMD_FORCE_INLINE btScalar resolveSingleCollisionCombinedCacheFriendly( + btSolverBody& body1, + btSolverBody& body2, + btSolverConstraint& contactConstraint, + const btContactSolverInfo& solverInfo) +{ + (void)solverInfo; + + btScalar normalImpulse(0.f); + { + if (contactConstraint.m_penetration < 0.f) + return 0.f; + + // Optimized version of projected relative velocity, use precomputed cross products with normal + // body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); + // body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); + // btVector3 vel = vel1 - vel2; + // btScalar rel_vel = contactConstraint.m_contactNormal.dot(vel); + + btScalar rel_vel; + btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) + + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); + btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) + + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); + + rel_vel = vel1Dotn-vel2Dotn; + + + btScalar positionalError = contactConstraint.m_penetration; + btScalar velocityError = contactConstraint.m_restitution - rel_vel;// * damping; + + btScalar penetrationImpulse = positionalError * contactConstraint.m_jacDiagABInv; + btScalar velocityImpulse = velocityError * contactConstraint.m_jacDiagABInv; + btScalar normalImpulse = penetrationImpulse+velocityImpulse; + + // See Erin Catto's GDC 2006 paper: Clamp the accumulated impulse + btScalar oldNormalImpulse = contactConstraint.m_appliedImpulse; + btScalar sum = oldNormalImpulse + normalImpulse; + contactConstraint.m_appliedImpulse = btScalar(0.) > sum ? btScalar(0.): sum; + + btScalar oldVelocityImpulse = contactConstraint.m_appliedVelocityImpulse; + btScalar velocitySum = oldVelocityImpulse + velocityImpulse; + contactConstraint.m_appliedVelocityImpulse = btScalar(0.) > velocitySum ? btScalar(0.): velocitySum; + + normalImpulse = contactConstraint.m_appliedImpulse - oldNormalImpulse; + + if (body1.m_invMass) + { + body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass, + contactConstraint.m_angularComponentA,normalImpulse); + } + if (body2.m_invMass) + { + body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass, + contactConstraint.m_angularComponentB,-normalImpulse); + } + + } + + + + return normalImpulse; +} + + +#ifndef NO_FRICTION_TANGENTIALS + +SIMD_FORCE_INLINE btScalar resolveSingleFrictionCacheFriendly( + btSolverBody& body1, + btSolverBody& body2, + btSolverConstraint& contactConstraint, + const btContactSolverInfo& solverInfo, + btScalar appliedNormalImpulse) +{ + (void)solverInfo; + + + const btScalar combinedFriction = contactConstraint.m_friction; + + const btScalar limit = appliedNormalImpulse * combinedFriction; + + if (appliedNormalImpulse>btScalar(0.)) + //friction + { + + btScalar j1; + { + + btScalar rel_vel; + const btScalar vel1Dotn = contactConstraint.m_contactNormal.dot(body1.m_linearVelocity) + + contactConstraint.m_relpos1CrossNormal.dot(body1.m_angularVelocity); + const btScalar vel2Dotn = contactConstraint.m_contactNormal.dot(body2.m_linearVelocity) + + contactConstraint.m_relpos2CrossNormal.dot(body2.m_angularVelocity); + rel_vel = vel1Dotn-vel2Dotn; + + // calculate j that moves us to zero relative velocity + j1 = -rel_vel * contactConstraint.m_jacDiagABInv; + btScalar oldTangentImpulse = contactConstraint.m_appliedImpulse; + contactConstraint.m_appliedImpulse = oldTangentImpulse + j1; + GEN_set_min(contactConstraint.m_appliedImpulse, limit); + GEN_set_max(contactConstraint.m_appliedImpulse, -limit); + j1 = contactConstraint.m_appliedImpulse - oldTangentImpulse; + + } + + if (body1.m_invMass) + { + body1.internalApplyImpulse(contactConstraint.m_contactNormal*body1.m_invMass,contactConstraint.m_angularComponentA,j1); + } + if (body2.m_invMass) + { + body2.internalApplyImpulse(contactConstraint.m_contactNormal*body2.m_invMass,contactConstraint.m_angularComponentB,-j1); + } + + } + return 0.f; +} + + +#else + +//velocity + friction +//response between two dynamic objects with friction +btScalar resolveSingleFrictionCacheFriendly( + btSolverBody& body1, + btSolverBody& body2, + btSolverConstraint& contactConstraint, + const btContactSolverInfo& solverInfo) +{ + + btVector3 vel1; + btVector3 vel2; + btScalar normalImpulse(0.f); + + { + const btVector3& normal = contactConstraint.m_contactNormal; + if (contactConstraint.m_penetration < 0.f) + return 0.f; + + + body1.getVelocityInLocalPoint(contactConstraint.m_rel_posA,vel1); + body2.getVelocityInLocalPoint(contactConstraint.m_rel_posB,vel2); + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = normal.dot(vel); + + btVector3 lat_vel = vel - normal * rel_vel; + btScalar lat_rel_vel = lat_vel.length2(); + + btScalar combinedFriction = contactConstraint.m_friction; + const btVector3& rel_pos1 = contactConstraint.m_rel_posA; + const btVector3& rel_pos2 = contactConstraint.m_rel_posB; + + + //if (contactConstraint.m_appliedVelocityImpulse > 0.f) + if (lat_rel_vel > SIMD_EPSILON*SIMD_EPSILON) + { + lat_rel_vel = btSqrt(lat_rel_vel); + + lat_vel /= lat_rel_vel; + btVector3 temp1 = body1.m_invInertiaWorld * rel_pos1.cross(lat_vel); + btVector3 temp2 = body2.m_invInertiaWorld * rel_pos2.cross(lat_vel); + btScalar friction_impulse = lat_rel_vel / + (body1.m_invMass + body2.m_invMass + lat_vel.dot(temp1.cross(rel_pos1) + temp2.cross(rel_pos2))); + btScalar normal_impulse = contactConstraint.m_appliedVelocityImpulse * combinedFriction; + + GEN_set_min(friction_impulse, normal_impulse); + GEN_set_max(friction_impulse, -normal_impulse); + body1.applyImpulse(lat_vel * -friction_impulse, rel_pos1); + body2.applyImpulse(lat_vel * friction_impulse, rel_pos2); + } + } + + return normalImpulse; +} + +#endif //NO_FRICTION_TANGENTIALS + +btAlignedObjectArray tmpSolverBodyPool; +btAlignedObjectArray tmpSolverConstraintPool; +btAlignedObjectArray tmpSolverFrictionConstraintPool; + + +btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc) +{ + (void)stackAlloc; + (void)debugDrawer; + + if (!(numConstraints + numManifolds)) + { +// printf("empty\n"); + return 0.f; + } + + BEGIN_PROFILE("refreshManifolds"); + + int i; + for (i=0;igetBody0(); + btRigidBody* rb1 = (btRigidBody*)manifold->getBody1(); + + manifold->refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); + + } + + END_PROFILE("refreshManifolds"); + + + BEGIN_PROFILE("gatherSolverData"); + + //int sizeofSB = sizeof(btSolverBody); + //int sizeofSC = sizeof(btSolverConstraint); + + + //if (1) + { + //if m_stackAlloc, try to pack bodies/constraints to speed up solving +// btBlock* sablock; +// sablock = stackAlloc->beginBlock(); + + // int memsize = 16; +// unsigned char* stackMemory = stackAlloc->allocate(memsize); + + + //todo: use stack allocator for this temp memory + int minReservation = numManifolds*2; + + tmpSolverBodyPool.reserve(minReservation); + + { + for (int i=0;igetIslandTag() >= 0)) + { + btAssert(rb->getCompanionId() < 0); + int solverBodyId = tmpSolverBodyPool.size(); + btSolverBody& solverBody = tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,rb); + rb->setCompanionId(solverBodyId); + } + } + } + + + tmpSolverConstraintPool.reserve(minReservation); + tmpSolverFrictionConstraintPool.reserve(minReservation); + { + int i; + + for (i=0;igetBody0(); + btRigidBody* rb1 = (btRigidBody*)manifold->getBody1(); + + + int solverBodyIdA=-1; + int solverBodyIdB=-1; + + if (manifold->getNumContacts()) + { + + + + if (rb0->getIslandTag() >= 0) + { + solverBodyIdA = rb0->getCompanionId(); + } else + { + //create a static body + solverBodyIdA = tmpSolverBodyPool.size(); + btSolverBody& solverBody = tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,rb0); + } + + if (rb1->getIslandTag() >= 0) + { + solverBodyIdB = rb1->getCompanionId(); + } else + { + //create a static body + solverBodyIdB = tmpSolverBodyPool.size(); + btSolverBody& solverBody = tmpSolverBodyPool.expand(); + initSolverBody(&solverBody,rb1); + } + } + + for (int j=0;jgetNumContacts();j++) + { + + btManifoldPoint& cp = manifold->getContactPoint(j); + + int frictionIndex = tmpSolverConstraintPool.size(); + + if (cp.getDistance() <= btScalar(0.)) + { + + const btVector3& pos1 = cp.getPositionWorldOnA(); + const btVector3& pos2 = cp.getPositionWorldOnB(); + + btVector3 rel_pos1 = pos1 - rb0->getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - rb1->getCenterOfMassPosition(); + + + btScalar relaxation = 1.f; + + { + btSolverConstraint& solverConstraint = tmpSolverConstraintPool.expand(); + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_CONTACT_1D; + + + + { + //can be optimized, the cross products are already calculated + btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB); + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + } + + solverConstraint.m_contactNormal = cp.m_normalWorldOnB; + solverConstraint.m_relpos1CrossNormal = rel_pos1.cross(cp.m_normalWorldOnB); + solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(cp.m_normalWorldOnB); + + + btVector3 vel1 = rb0->getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = rb1->getVelocityInLocalPoint(rel_pos2); + + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = cp.m_normalWorldOnB.dot(vel); + + + solverConstraint.m_penetration = cp.getDistance();///btScalar(infoGlobal.m_numIterations); + solverConstraint.m_friction = cp.m_combinedFriction; + btScalar rest = restitutionCurve(rel_vel, cp.m_combinedRestitution); + if (rest <= btScalar(0.)) + { + rest = 0.f; + }; + + btScalar penVel = -solverConstraint.m_penetration/infoGlobal.m_timeStep; + if (rest > penVel) + { + rest = btScalar(0.); + } + solverConstraint.m_restitution = rest; + + solverConstraint.m_penetration *= -(infoGlobal.m_erp/infoGlobal.m_timeStep); + + solverConstraint.m_appliedImpulse = 0.f; + solverConstraint.m_appliedVelocityImpulse = 0.f; + + + btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*torqueAxis0; + btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); + solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*torqueAxis1; + } + + //create 2 '1d axis' constraints for 2 tangential friction directions + + //re-calculate friction direction every frame, todo: check if this is really needed + btVector3 frictionTangential0a, frictionTangential1b; + + btPlaneSpace1(cp.m_normalWorldOnB,frictionTangential0a,frictionTangential1b); + + { + btSolverConstraint& solverConstraint = tmpSolverFrictionConstraintPool.expand(); + solverConstraint.m_contactNormal = frictionTangential0a; + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; + solverConstraint.m_frictionIndex = frictionIndex; + + solverConstraint.m_friction = cp.m_combinedFriction; + + solverConstraint.m_appliedImpulse = btScalar(0.); + solverConstraint.m_appliedVelocityImpulse = 0.f; + + btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + + { + btVector3 ftorqueAxis0 = rel_pos1.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos1CrossNormal = ftorqueAxis0; + solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis0; + } + { + btVector3 ftorqueAxis0 = rel_pos2.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos2CrossNormal = ftorqueAxis0; + solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis0; + } + + } + + + { + + btSolverConstraint& solverConstraint = tmpSolverFrictionConstraintPool.expand(); + solverConstraint.m_contactNormal = frictionTangential1b; + + solverConstraint.m_solverBodyIdA = solverBodyIdA; + solverConstraint.m_solverBodyIdB = solverBodyIdB; + solverConstraint.m_constraintType = btSolverConstraint::BT_SOLVER_FRICTION_1D; + solverConstraint.m_frictionIndex = frictionIndex; + + solverConstraint.m_friction = cp.m_combinedFriction; + + solverConstraint.m_appliedImpulse = btScalar(0.); + solverConstraint.m_appliedVelocityImpulse = 0.f; + + btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal); + btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal); + btScalar denom = relaxation/(denom0+denom1); + solverConstraint.m_jacDiagABInv = denom; + { + btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos1CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentA = rb0->getInvInertiaTensorWorld()*ftorqueAxis1; + } + { + btVector3 ftorqueAxis1 = rel_pos2.cross(solverConstraint.m_contactNormal); + solverConstraint.m_relpos2CrossNormal = ftorqueAxis1; + solverConstraint.m_angularComponentB = rb1->getInvInertiaTensorWorld()*ftorqueAxis1; + } + } + + } + } + } + } + } + END_PROFILE("gatherSolverData"); + + BEGIN_PROFILE("prepareConstraints"); + + btContactSolverInfo info = infoGlobal; + + { + int j; + for (j=0;jbuildJacobian(); + } + } + + btAlignedObjectArray gOrderTmpConstraintPool; + btAlignedObjectArray gOrderFrictionConstraintPool; + + int numConstraintPool = tmpSolverConstraintPool.size(); + int numFrictionPool = tmpSolverFrictionConstraintPool.size(); + + ///todo: use stack allocator for such temporarily memory, same for solver bodies/constraints + gOrderTmpConstraintPool.resize(numConstraintPool); + gOrderFrictionConstraintPool.resize(numFrictionPool); + { + int i; + for (i=0;igetRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) + { + tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].writebackVelocity(); + } + if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) + { + tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].writebackVelocity(); + } + + constraint->solveConstraint(info.m_timeStep); + + if ((constraint->getRigidBodyA().getIslandTag() >= 0) && (constraint->getRigidBodyA().getCompanionId() >= 0)) + { + tmpSolverBodyPool[constraint->getRigidBodyA().getCompanionId()].readVelocity(); + } + if ((constraint->getRigidBodyB().getIslandTag() >= 0) && (constraint->getRigidBodyB().getCompanionId() >= 0)) + { + tmpSolverBodyPool[constraint->getRigidBodyB().getCompanionId()].readVelocity(); + } + + } + + { + int numPoolConstraints = tmpSolverConstraintPool.size(); + for (j=0;jgetNumContacts();p++) + { + gOrder[totalPoints].m_manifoldIndex = j; + gOrder[totalPoints].m_pointIndex = p; + totalPoints++; + } + } + } + + { + int j; + for (j=0;jbuildJacobian(); + } + } + + END_PROFILE("prepareConstraints"); + + + BEGIN_PROFILE("solveConstraints"); + + //should traverse the contacts random order... + int iteration; + + { + for ( iteration = 0;iterationsolveConstraint(info.m_timeStep); + } + + for (j=0;jgetBody0(), + (btRigidBody*)manifold->getBody1() + ,manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); + } + + for (j=0;jgetBody0(), + (btRigidBody*)manifold->getBody1(),manifold->getContactPoint(gOrder[j].m_pointIndex),info,iteration,debugDrawer); + } + } + } + + END_PROFILE("solveConstraints"); + + +#ifdef USE_PROFILE + btProfiler::endBlock("solve"); +#endif //USE_PROFILE + + + + + return btScalar(0.); +} + + + + + + + +void btSequentialImpulseConstraintSolver::prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer) +{ + + (void)debugDrawer; + + btRigidBody* body0 = (btRigidBody*)manifoldPtr->getBody0(); + btRigidBody* body1 = (btRigidBody*)manifoldPtr->getBody1(); + + + //only necessary to refresh the manifold once (first iteration). The integration is done outside the loop + { + manifoldPtr->refreshContactPoints(body0->getCenterOfMassTransform(),body1->getCenterOfMassTransform()); + + int numpoints = manifoldPtr->getNumContacts(); + + gTotalContactPoints += numpoints; + + btVector3 color(0,1,0); + for (int i=0;igetContactPoint(i); + if (cp.getDistance() <= btScalar(0.)) + { + const btVector3& pos1 = cp.getPositionWorldOnA(); + const btVector3& pos2 = cp.getPositionWorldOnB(); + + btVector3 rel_pos1 = pos1 - body0->getCenterOfMassPosition(); + btVector3 rel_pos2 = pos2 - body1->getCenterOfMassPosition(); + + + //this jacobian entry is re-used for all iterations + btJacobianEntry jac(body0->getCenterOfMassTransform().getBasis().transpose(), + body1->getCenterOfMassTransform().getBasis().transpose(), + rel_pos1,rel_pos2,cp.m_normalWorldOnB,body0->getInvInertiaDiagLocal(),body0->getInvMass(), + body1->getInvInertiaDiagLocal(),body1->getInvMass()); + + + btScalar jacDiagAB = jac.getDiagonal(); + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; + if (cpd) + { + //might be invalid + cpd->m_persistentLifeTime++; + if (cpd->m_persistentLifeTime != cp.getLifeTime()) + { + //printf("Invalid: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); + new (cpd) btConstraintPersistentData; + cpd->m_persistentLifeTime = cp.getLifeTime(); + + } else + { + //printf("Persistent: cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd->m_persistentLifeTime,cp.getLifeTime()); + + } + } else + { + + cpd = new btConstraintPersistentData; + assert(cpd); + + totalCpd ++; + //printf("totalCpd = %i Created Ptr %x\n",totalCpd,cpd); + cp.m_userPersistentData = cpd; + cpd->m_persistentLifeTime = cp.getLifeTime(); + //printf("CREATED: %x . cpd->m_persistentLifeTime = %i cp.getLifeTime() = %i\n",cpd,cpd->m_persistentLifeTime,cp.getLifeTime()); + + } + assert(cpd); + + cpd->m_jacDiagABInv = btScalar(1.) / jacDiagAB; + + //Dependent on Rigidbody A and B types, fetch the contact/friction response func + //perhaps do a similar thing for friction/restutution combiner funcs... + + cpd->m_frictionSolverFunc = m_frictionDispatch[body0->m_frictionSolverType][body1->m_frictionSolverType]; + cpd->m_contactSolverFunc = m_contactDispatch[body0->m_contactSolverType][body1->m_contactSolverType]; + + btVector3 vel1 = body0->getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = body1->getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + btScalar rel_vel; + rel_vel = cp.m_normalWorldOnB.dot(vel); + + btScalar combinedRestitution = cp.m_combinedRestitution; + + cpd->m_penetration = cp.getDistance();///btScalar(info.m_numIterations); + cpd->m_friction = cp.m_combinedFriction; + cpd->m_restitution = restitutionCurve(rel_vel, combinedRestitution); + if (cpd->m_restitution <= btScalar(0.)) + { + cpd->m_restitution = btScalar(0.0); + + }; + + //restitution and penetration work in same direction so + //rel_vel + + btScalar penVel = -cpd->m_penetration/info.m_timeStep; + + if (cpd->m_restitution > penVel) + { + cpd->m_penetration = btScalar(0.); + } + + + + btScalar relaxation = info.m_damping; + if (m_solverMode & SOLVER_USE_WARMSTARTING) + { + cpd->m_appliedImpulse *= relaxation; + } else + { + cpd->m_appliedImpulse =btScalar(0.); + } + + //for friction + cpd->m_prevAppliedImpulse = cpd->m_appliedImpulse; + + //re-calculate friction direction every frame, todo: check if this is really needed + btPlaneSpace1(cp.m_normalWorldOnB,cpd->m_frictionWorldTangential0,cpd->m_frictionWorldTangential1); + + +#define NO_FRICTION_WARMSTART 1 + + #ifdef NO_FRICTION_WARMSTART + cpd->m_accumulatedTangentImpulse0 = btScalar(0.); + cpd->m_accumulatedTangentImpulse1 = btScalar(0.); + #endif //NO_FRICTION_WARMSTART + btScalar denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential0); + btScalar denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential0); + btScalar denom = relaxation/(denom0+denom1); + cpd->m_jacDiagABInvTangent0 = denom; + + + denom0 = body0->computeImpulseDenominator(pos1,cpd->m_frictionWorldTangential1); + denom1 = body1->computeImpulseDenominator(pos2,cpd->m_frictionWorldTangential1); + denom = relaxation/(denom0+denom1); + cpd->m_jacDiagABInvTangent1 = denom; + + btVector3 totalImpulse = + #ifndef NO_FRICTION_WARMSTART + cpd->m_frictionWorldTangential0*cpd->m_accumulatedTangentImpulse0+ + cpd->m_frictionWorldTangential1*cpd->m_accumulatedTangentImpulse1+ + #endif //NO_FRICTION_WARMSTART + cp.m_normalWorldOnB*cpd->m_appliedImpulse; + + + + /// + { + btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB); + cpd->m_angularComponentA = body0->getInvInertiaTensorWorld()*torqueAxis0; + btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB); + cpd->m_angularComponentB = body1->getInvInertiaTensorWorld()*torqueAxis1; + } + { + btVector3 ftorqueAxis0 = rel_pos1.cross(cpd->m_frictionWorldTangential0); + cpd->m_frictionAngularComponent0A = body0->getInvInertiaTensorWorld()*ftorqueAxis0; + } + { + btVector3 ftorqueAxis1 = rel_pos1.cross(cpd->m_frictionWorldTangential1); + cpd->m_frictionAngularComponent1A = body0->getInvInertiaTensorWorld()*ftorqueAxis1; + } + { + btVector3 ftorqueAxis0 = rel_pos2.cross(cpd->m_frictionWorldTangential0); + cpd->m_frictionAngularComponent0B = body1->getInvInertiaTensorWorld()*ftorqueAxis0; + } + { + btVector3 ftorqueAxis1 = rel_pos2.cross(cpd->m_frictionWorldTangential1); + cpd->m_frictionAngularComponent1B = body1->getInvInertiaTensorWorld()*ftorqueAxis1; + } + + /// + + + + //apply previous frames impulse on both bodies + body0->applyImpulse(totalImpulse, rel_pos1); + body1->applyImpulse(-totalImpulse, rel_pos2); + } + + } + } +} + + +btScalar btSequentialImpulseConstraintSolver::solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) +{ + btScalar maxImpulse = btScalar(0.); + + { + + btVector3 color(0,1,0); + { + if (cp.getDistance() <= btScalar(0.)) + { + + if (iter == 0) + { + if (debugDrawer) + debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); + } + + { + + //btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; + btScalar impulse = resolveSingleCollisionCombined( + *body0,*body1, + cp, + info); + + if (maxImpulse < impulse) + maxImpulse = impulse; + + } + } + } + } + return maxImpulse; +} + + + +btScalar btSequentialImpulseConstraintSolver::solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) +{ + + btScalar maxImpulse = btScalar(0.); + + { + + btVector3 color(0,1,0); + { + if (cp.getDistance() <= btScalar(0.)) + { + + if (iter == 0) + { + if (debugDrawer) + debugDrawer->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color); + } + + { + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; + btScalar impulse = cpd->m_contactSolverFunc( + *body0,*body1, + cp, + info); + + if (maxImpulse < impulse) + maxImpulse = impulse; + + } + } + } + } + return maxImpulse; +} + +btScalar btSequentialImpulseConstraintSolver::solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer) +{ + + (void)debugDrawer; + (void)iter; + + + { + + btVector3 color(0,1,0); + { + + if (cp.getDistance() <= btScalar(0.)) + { + + btConstraintPersistentData* cpd = (btConstraintPersistentData*) cp.m_userPersistentData; + cpd->m_frictionSolverFunc( + *body0,*body1, + cp, + info); + + + } + } + + + } + return btScalar(0.); +} diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h new file mode 100644 index 00000000000..13e70c41be4 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h @@ -0,0 +1,109 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H +#define SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H + +#include "btConstraintSolver.h" +class btIDebugDraw; +#include "btContactConstraint.h" + + + +/// btSequentialImpulseConstraintSolver uses a Propagation Method and Sequentially applies impulses +/// The approach is the 3D version of Erin Catto's GDC 2006 tutorial. See http://www.gphysics.com +/// Although Sequential Impulse is more intuitive, it is mathematically equivalent to Projected Successive Overrelaxation (iterative LCP) +/// Applies impulses for combined restitution and penetration recovery and to simulate friction +class btSequentialImpulseConstraintSolver : public btConstraintSolver +{ + +protected: + btScalar solve(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); + btScalar solveFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); + void prepareConstraints(btPersistentManifold* manifoldPtr, const btContactSolverInfo& info,btIDebugDraw* debugDrawer); + + ContactSolverFunc m_contactDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; + ContactSolverFunc m_frictionDispatch[MAX_CONTACT_SOLVER_TYPES][MAX_CONTACT_SOLVER_TYPES]; + + //choose between several modes, different friction model etc. + int m_solverMode; + ///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction + unsigned long m_btSeed2; + +public: + + enum eSolverMode + { + SOLVER_RANDMIZE_ORDER = 1, + SOLVER_FRICTION_SEPARATE = 2, + SOLVER_USE_WARMSTARTING = 4, + SOLVER_CACHE_FRIENDLY = 8 + }; + + btSequentialImpulseConstraintSolver(); + + ///Advanced: Override the default contact solving function for contacts, for certain types of rigidbody + ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType + void setContactSolverFunc(ContactSolverFunc func,int type0,int type1) + { + m_contactDispatch[type0][type1] = func; + } + + ///Advanced: Override the default friction solving function for contacts, for certain types of rigidbody + ///See btRigidBody::m_contactSolverType and btRigidBody::m_frictionSolverType + void SetFrictionSolverFunc(ContactSolverFunc func,int type0,int type1) + { + m_frictionDispatch[type0][type1] = func; + } + + virtual ~btSequentialImpulseConstraintSolver() {} + + virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc); + + virtual btScalar solveGroupCacheFriendly(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc); + + btScalar solveCombinedContactFriction(btRigidBody* body0,btRigidBody* body1, btManifoldPoint& cp, const btContactSolverInfo& info,int iter,btIDebugDraw* debugDrawer); + + + void setSolverMode(int mode) + { + m_solverMode = mode; + } + + int getSolverMode() const + { + return m_solverMode; + } + + unsigned long btRand2(); + + int btRandInt2 (int n); + + void setRandSeed(unsigned long seed) + { + m_btSeed2 = seed; + } + unsigned long getRandSeed() const + { + return m_btSeed2; + } + +}; + + + + +#endif //SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp new file mode 100644 index 00000000000..0c7dbd668bb --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp @@ -0,0 +1,255 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#include "btSolve2LinearConstraint.h" + +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "LinearMath/btVector3.h" +#include "btJacobianEntry.h" + + +void btSolve2LinearConstraint::resolveUnilateralPairConstraint( + btRigidBody* body1, + btRigidBody* body2, + + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + + const btVector3& invInertiaADiag, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btVector3& invInertiaBDiag, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1) +{ + (void)linvelA; + (void)linvelB; + (void)angvelB; + (void)angvelA; + + + + imp0 = btScalar(0.); + imp1 = btScalar(0.); + + btScalar len = btFabs(normalA.length()) - btScalar(1.); + if (btFabs(len) >= SIMD_EPSILON) + return; + + btAssert(len < SIMD_EPSILON); + + + //this jacobian entry could be re-used for all iterations + btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA, + invInertiaBDiag,invMassB); + btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA, + invInertiaBDiag,invMassB); + + //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); + //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); + + const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1)); + const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1)); + +// btScalar penetrationImpulse = (depth*contactTau*timeCorrection) * massTerm;//jacDiagABInv + btScalar massTerm = btScalar(1.) / (invMassA + invMassB); + + + // calculate rhs (or error) terms + const btScalar dv0 = depthA * m_tau * massTerm - vel0 * m_damping; + const btScalar dv1 = depthB * m_tau * massTerm - vel1 * m_damping; + + + // dC/dv * dv = -C + + // jacobian * impulse = -error + // + + //impulse = jacobianInverse * -error + + // inverting 2x2 symmetric system (offdiagonal are equal!) + // + + + btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB); + btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag ); + + //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; + //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; + + imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; + imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; + + //[a b] [d -c] + //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc) + + //[jA nD] * [imp0] = [dv0] + //[nD jB] [imp1] [dv1] + +} + + + +void btSolve2LinearConstraint::resolveBilateralPairConstraint( + btRigidBody* body1, + btRigidBody* body2, + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + + const btVector3& invInertiaADiag, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btVector3& invInertiaBDiag, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1) +{ + + (void)linvelA; + (void)linvelB; + (void)angvelA; + (void)angvelB; + + + + imp0 = btScalar(0.); + imp1 = btScalar(0.); + + btScalar len = btFabs(normalA.length()) - btScalar(1.); + if (btFabs(len) >= SIMD_EPSILON) + return; + + btAssert(len < SIMD_EPSILON); + + + //this jacobian entry could be re-used for all iterations + btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA, + invInertiaBDiag,invMassB); + btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA, + invInertiaBDiag,invMassB); + + //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); + //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB); + + const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1)); + const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1)); + + // calculate rhs (or error) terms + const btScalar dv0 = depthA * m_tau - vel0 * m_damping; + const btScalar dv1 = depthB * m_tau - vel1 * m_damping; + + // dC/dv * dv = -C + + // jacobian * impulse = -error + // + + //impulse = jacobianInverse * -error + + // inverting 2x2 symmetric system (offdiagonal are equal!) + // + + + btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB); + btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag ); + + //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; + //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; + + imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet; + imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet; + + //[a b] [d -c] + //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc) + + //[jA nD] * [imp0] = [dv0] + //[nD jB] [imp1] [dv1] + + if ( imp0 > btScalar(0.0)) + { + if ( imp1 > btScalar(0.0) ) + { + //both positive + } + else + { + imp1 = btScalar(0.); + + // now imp0>0 imp1<0 + imp0 = dv0 / jacA.getDiagonal(); + if ( imp0 > btScalar(0.0) ) + { + } else + { + imp0 = btScalar(0.); + } + } + } + else + { + imp0 = btScalar(0.); + + imp1 = dv1 / jacB.getDiagonal(); + if ( imp1 <= btScalar(0.0) ) + { + imp1 = btScalar(0.); + // now imp0>0 imp1<0 + imp0 = dv0 / jacA.getDiagonal(); + if ( imp0 > btScalar(0.0) ) + { + } else + { + imp0 = btScalar(0.); + } + } else + { + } + } +} + + +/* +void btSolve2LinearConstraint::resolveAngularConstraint( const btMatrix3x3& invInertiaAWS, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btMatrix3x3& invInertiaBWS, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1) +{ + +} +*/ + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h new file mode 100644 index 00000000000..e7d26645c6a --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h @@ -0,0 +1,107 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef SOLVE_2LINEAR_CONSTRAINT_H +#define SOLVE_2LINEAR_CONSTRAINT_H + +#include "../../LinearMath/btMatrix3x3.h" +#include "../../LinearMath/btVector3.h" + + +class btRigidBody; + + + +/// constraint class used for lateral tyre friction. +class btSolve2LinearConstraint +{ + btScalar m_tau; + btScalar m_damping; + +public: + + btSolve2LinearConstraint(btScalar tau,btScalar damping) + { + m_tau = tau; + m_damping = damping; + } + // + // solve unilateral constraint (equality, direct method) + // + void resolveUnilateralPairConstraint( + btRigidBody* body0, + btRigidBody* body1, + + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + + const btVector3& invInertiaADiag, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btVector3& invInertiaBDiag, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1); + + + // + // solving 2x2 lcp problem (inequality, direct solution ) + // + void resolveBilateralPairConstraint( + btRigidBody* body0, + btRigidBody* body1, + const btMatrix3x3& world2A, + const btMatrix3x3& world2B, + + const btVector3& invInertiaADiag, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btVector3& invInertiaBDiag, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1); + +/* + void resolveAngularConstraint( const btMatrix3x3& invInertiaAWS, + const btScalar invMassA, + const btVector3& linvelA,const btVector3& angvelA, + const btVector3& rel_posA1, + const btMatrix3x3& invInertiaBWS, + const btScalar invMassB, + const btVector3& linvelB,const btVector3& angvelB, + const btVector3& rel_posA2, + + btScalar depthA, const btVector3& normalA, + const btVector3& rel_posB1,const btVector3& rel_posB2, + btScalar depthB, const btVector3& normalB, + btScalar& imp0,btScalar& imp1); + +*/ + +}; + +#endif //SOLVE_2LINEAR_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h new file mode 100644 index 00000000000..0ab536f42b3 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h @@ -0,0 +1,71 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_SOLVER_BODY_H +#define BT_SOLVER_BODY_H + +class btRigidBody; +#include "LinearMath/btVector3.h" +#include "LinearMath/btMatrix3x3.h" + + + + +ATTRIBUTE_ALIGNED16 (struct) btSolverBody +{ + btVector3 m_centerOfMassPosition; + btVector3 m_linearVelocity; + btVector3 m_angularVelocity; + btRigidBody* m_originalBody; + float m_invMass; + float m_friction; + float m_angularFactor; + + inline void getVelocityInLocalPoint(const btVector3& rel_pos, btVector3& velocity ) const + { + velocity = m_linearVelocity + m_angularVelocity.cross(rel_pos); + } + + //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position + inline void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) + { + m_linearVelocity += linearComponent*impulseMagnitude; + m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor; + } + + void writebackVelocity() + { + if (m_invMass) + { + m_originalBody->setLinearVelocity(m_linearVelocity); + m_originalBody->setAngularVelocity(m_angularVelocity); + } + } + + void readVelocity() + { + if (m_invMass) + { + m_linearVelocity = m_originalBody->getLinearVelocity(); + m_angularVelocity = m_originalBody->getAngularVelocity(); + } + } + + + + +}; + +#endif //BT_SOLVER_BODY_H diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h new file mode 100644 index 00000000000..f1f40ffdf19 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h @@ -0,0 +1,63 @@ + + +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_SOLVER_CONSTRAINT_H +#define BT_SOLVER_CONSTRAINT_H + +class btRigidBody; +#include "LinearMath/btVector3.h" +#include "LinearMath/btMatrix3x3.h" + +//#define NO_FRICTION_TANGENTIALS 1 + +///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints. +ATTRIBUTE_ALIGNED16 (struct) btSolverConstraint +{ + btVector3 m_relpos1CrossNormal; + btVector3 m_relpos2CrossNormal; + btVector3 m_contactNormal; + btVector3 m_angularComponentA; + btVector3 m_angularComponentB; + + btScalar m_appliedVelocityImpulse; + int m_solverBodyIdA; + int m_solverBodyIdB; + btScalar m_friction; + btScalar m_restitution; + btScalar m_jacDiagABInv; + btScalar m_penetration; + btScalar m_appliedImpulse; + + int m_constraintType; + int m_frictionIndex; + int m_unusedPadding[2]; + + enum btSolverConstraintType + { + BT_SOLVER_CONTACT_1D = 0, + BT_SOLVER_FRICTION_1D + }; +}; + + + + + + +#endif //BT_SOLVER_CONSTRAINT_H + + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp new file mode 100644 index 00000000000..a15b3e026cd --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp @@ -0,0 +1,53 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btTypedConstraint.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" + +static btRigidBody s_fixed(0, 0,0); + +btTypedConstraint::btTypedConstraint() +: m_userConstraintType(-1), +m_userConstraintId(-1), +m_rbA(s_fixed), +m_rbB(s_fixed), +m_appliedImpulse(btScalar(0.)) +{ + s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); +} +btTypedConstraint::btTypedConstraint(btRigidBody& rbA) +: m_userConstraintType(-1), +m_userConstraintId(-1), +m_rbA(rbA), +m_rbB(s_fixed), +m_appliedImpulse(btScalar(0.)) +{ + s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); + +} + + +btTypedConstraint::btTypedConstraint(btRigidBody& rbA,btRigidBody& rbB) +: m_userConstraintType(-1), +m_userConstraintId(-1), +m_rbA(rbA), +m_rbB(rbB), +m_appliedImpulse(btScalar(0.)) +{ + s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.))); + +} + diff --git a/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h new file mode 100644 index 00000000000..dfee6e80d0e --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -0,0 +1,96 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef TYPED_CONSTRAINT_H +#define TYPED_CONSTRAINT_H + +class btRigidBody; +#include "../../LinearMath/btScalar.h" + +///TypedConstraint is the baseclass for Bullet constraints and vehicles +class btTypedConstraint +{ + int m_userConstraintType; + int m_userConstraintId; + + btTypedConstraint& operator=(btTypedConstraint& other) + { + btAssert(0); + (void) other; + return *this; + } + +protected: + btRigidBody& m_rbA; + btRigidBody& m_rbB; + btScalar m_appliedImpulse; + + +public: + + btTypedConstraint(); + virtual ~btTypedConstraint() {}; + btTypedConstraint(btRigidBody& rbA); + + btTypedConstraint(btRigidBody& rbA,btRigidBody& rbB); + + virtual void buildJacobian() = 0; + + virtual void solveConstraint(btScalar timeStep) = 0; + + const btRigidBody& getRigidBodyA() const + { + return m_rbA; + } + const btRigidBody& getRigidBodyB() const + { + return m_rbB; + } + + btRigidBody& getRigidBodyA() + { + return m_rbA; + } + btRigidBody& getRigidBodyB() + { + return m_rbB; + } + + int getUserConstraintType() const + { + return m_userConstraintType ; + } + + void setUserConstraintType(int userConstraintType) + { + m_userConstraintType = userConstraintType; + }; + + void setUserConstraintId(int uid) + { + m_userConstraintId = uid; + } + + int getUserConstraintId() + { + return m_userConstraintId; + } + btScalar getAppliedImpulse() + { + return m_appliedImpulse; + } +}; + +#endif //TYPED_CONSTRAINT_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp new file mode 100644 index 00000000000..248c582dcd8 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp @@ -0,0 +1,120 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* + Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's. + Work in progress, functionality will be added on demand. + + If possible, use the richer Bullet C++ API, by including +*/ + +#include "Bullet-C-Api.h" +#include "btBulletDynamicsCommon.h" +#include "LinearMath/btAlignedAllocator.h" + + +#include "LinearMath/btVector3.h" +#include "LinearMath/btScalar.h" +#include "LinearMath/btMatrix3x3.h" +#include "LinearMath/btTransform.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/CollisionShapes/btTriangleShape.h" + +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpa.h" +#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h" +#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" +#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" + +#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h" +#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h" +#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h" +#include "LinearMath/btStackAlloc.h" + +extern "C" +double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]) +{ + btVector3 vp(p1[0], p1[1], p1[2]); + btTriangleShape trishapeA(vp, + btVector3(p2[0], p2[1], p2[2]), + btVector3(p3[0], p3[1], p3[2])); + trishapeA.setMargin(0.000001f); + btVector3 vq(q1[0], q1[1], q1[2]); + btTriangleShape trishapeB(vq, + btVector3(q2[0], q2[1], q2[2]), + btVector3(q3[0], q3[1], q3[2])); + trishapeB.setMargin(0.000001f); + + // btVoronoiSimplexSolver sGjkSimplexSolver; + // btGjkEpaPenetrationDepthSolver penSolverPtr; + + static btSimplexSolverInterface sGjkSimplexSolver; + sGjkSimplexSolver.reset(); + + static btGjkEpaPenetrationDepthSolver Solver0; + static btMinkowskiPenetrationDepthSolver Solver1; + + btConvexPenetrationDepthSolver* Solver = NULL; + + Solver = &Solver1; + + btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver); + + convexConvex.m_catchDegeneracies = 1; + + // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0); + + btPointCollector gjkOutput; + btGjkPairDetector::ClosestPointInput input; + + btStackAlloc gStackAlloc(1024*1024*2); + + input.m_stackAlloc = &gStackAlloc; + + btTransform tr; + tr.setIdentity(); + + input.m_transformA = tr; + input.m_transformB = tr; + + convexConvex.getClosestPoints(input, gjkOutput, 0); + + + if (gjkOutput.m_hasResult) + { + + pb[0] = pa[0] = gjkOutput.m_pointInWorld[0]; + pb[1] = pa[1] = gjkOutput.m_pointInWorld[1]; + pb[2] = pa[2] = gjkOutput.m_pointInWorld[2]; + + pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance; + pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance; + pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance; + + normal[0] = gjkOutput.m_normalOnBInWorld[0]; + normal[1] = gjkOutput.m_normalOnBInWorld[1]; + normal[2] = gjkOutput.m_normalOnBInWorld[2]; + + return gjkOutput.m_distance; + } + return -1.0f; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp new file mode 100644 index 00000000000..29719ec9a3e --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp @@ -0,0 +1,954 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#include "btDiscreteDynamicsWorld.h" + +//collision detection +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" +#include + +//rigidbody & constraints +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" +#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" +#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" + +//for debug rendering +#include "BulletCollision/CollisionShapes/btBoxShape.h" +#include "BulletCollision/CollisionShapes/btCapsuleShape.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" +#include "BulletCollision/CollisionShapes/btConeShape.h" +#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btCylinderShape.h" +#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" +#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionShapes/btTriangleCallback.h" +#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" +#include "LinearMath/btIDebugDraw.h" + + + +//vehicle +#include "BulletDynamics/Vehicle/btRaycastVehicle.h" +#include "BulletDynamics/Vehicle/btVehicleRaycaster.h" +#include "BulletDynamics/Vehicle/btWheelInfo.h" +#include "LinearMath/btIDebugDraw.h" +#include "LinearMath/btQuickprof.h" +#include "LinearMath/btMotionState.h" + + + + + +btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver) +:btDynamicsWorld(dispatcher,pairCache), +m_constraintSolver(constraintSolver? constraintSolver: new btSequentialImpulseConstraintSolver), +m_debugDrawer(0), +m_gravity(0,-10,0), +m_localTime(btScalar(1.)/btScalar(60.)), +m_profileTimings(0) +{ + m_islandManager = new btSimulationIslandManager(); + m_ownsIslandManager = true; + m_ownsConstraintSolver = (constraintSolver==0); +} + + +btDiscreteDynamicsWorld::~btDiscreteDynamicsWorld() +{ + //only delete it when we created it + if (m_ownsIslandManager) + delete m_islandManager; + if (m_ownsConstraintSolver) + delete m_constraintSolver; +} + +void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep) +{ + + for (int i=0;igetActivationState() != ISLAND_SLEEPING) + { + if (body->isKinematicObject()) + { + //to calculate velocities next frame + body->saveKinematicState(timeStep); + } + } + } + } +} + +void btDiscreteDynamicsWorld::synchronizeMotionStates() +{ + //debug vehicle wheels + + + { + //todo: iterate over awake simulation islands! + for ( int i=0;igetDebugMode() & btIDebugDraw::DBG_DrawWireframe) + { + btVector3 color(btScalar(255.),btScalar(255.),btScalar(255.)); + switch(colObj->getActivationState()) + { + case ACTIVE_TAG: + color = btVector3(btScalar(255.),btScalar(255.),btScalar(255.)); break; + case ISLAND_SLEEPING: + color = btVector3(btScalar(0.),btScalar(255.),btScalar(0.));break; + case WANTS_DEACTIVATION: + color = btVector3(btScalar(0.),btScalar(255.),btScalar(255.));break; + case DISABLE_DEACTIVATION: + color = btVector3(btScalar(255.),btScalar(0.),btScalar(0.));break; + case DISABLE_SIMULATION: + color = btVector3(btScalar(255.),btScalar(255.),btScalar(0.));break; + default: + { + color = btVector3(btScalar(255.),btScalar(0.),btScalar(0.)); + } + }; + + debugDrawObject(colObj->getWorldTransform(),colObj->getCollisionShape(),color); + } + btRigidBody* body = btRigidBody::upcast(colObj); + if (body && body->getMotionState() && !body->isStaticOrKinematicObject()) + { + //we need to call the update at least once, even for sleeping objects + //otherwise the 'graphics' transform never updates properly + //so todo: add 'dirty' flag + //if (body->getActivationState() != ISLAND_SLEEPING) + { + btTransform interpolatedTransform; + btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(), + body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime,interpolatedTransform); + body->getMotionState()->setWorldTransform(interpolatedTransform); + } + } + } + } + + if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawWireframe) + { + for ( int i=0;im_vehicles.size();i++) + { + for (int v=0;vgetNumWheels();v++) + { + btVector3 wheelColor(0,255,255); + if (m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_isInContact) + { + wheelColor.setValue(0,0,255); + } else + { + wheelColor.setValue(255,0,255); + } + + //synchronize the wheels with the (interpolated) chassis worldtransform + m_vehicles[i]->updateWheelTransform(v,true); + + btVector3 wheelPosWS = m_vehicles[i]->getWheelInfo(v).m_worldTransform.getOrigin(); + + btVector3 axle = btVector3( + m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[0][m_vehicles[i]->getRightAxis()], + m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[1][m_vehicles[i]->getRightAxis()], + m_vehicles[i]->getWheelInfo(v).m_worldTransform.getBasis()[2][m_vehicles[i]->getRightAxis()]); + + + //m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_wheelAxleWS + //debug wheels (cylinders) + m_debugDrawer->drawLine(wheelPosWS,wheelPosWS+axle,wheelColor); + m_debugDrawer->drawLine(wheelPosWS,m_vehicles[i]->getWheelInfo(v).m_raycastInfo.m_contactPointWS,wheelColor); + + } + } + } + +} + + +int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep) +{ + int numSimulationSubSteps = 0; + + if (maxSubSteps) + { + //fixed timestep with interpolation + m_localTime += timeStep; + if (m_localTime >= fixedTimeStep) + { + numSimulationSubSteps = int( m_localTime / fixedTimeStep); + m_localTime -= numSimulationSubSteps * fixedTimeStep; + } + } else + { + //variable timestep + fixedTimeStep = timeStep; + m_localTime = timeStep; + if (btFuzzyZero(timeStep)) + { + numSimulationSubSteps = 0; + maxSubSteps = 0; + } else + { + numSimulationSubSteps = 1; + maxSubSteps = 1; + } + } + + //process some debugging flags + if (getDebugDrawer()) + { + gDisableDeactivation = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_NoDeactivation) != 0; + } + if (numSimulationSubSteps) + { + + saveKinematicState(fixedTimeStep); + + //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt + int clampedSimulationSteps = (numSimulationSubSteps > maxSubSteps)? maxSubSteps : numSimulationSubSteps; + + for (int i=0;isetGravity(gravity); + } + } +} + + +void btDiscreteDynamicsWorld::removeRigidBody(btRigidBody* body) +{ + removeCollisionObject(body); +} + +void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body) +{ + if (!body->isStaticOrKinematicObject()) + { + body->setGravity(m_gravity); + } + + if (body->getCollisionShape()) + { + bool isDynamic = !(body->isStaticObject() || body->isKinematicObject()); + short collisionFilterGroup = isDynamic? short(btBroadphaseProxy::DefaultFilter) : short(btBroadphaseProxy::StaticFilter); + short collisionFilterMask = isDynamic? short(btBroadphaseProxy::AllFilter) : short(btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter); + + addCollisionObject(body,collisionFilterGroup,collisionFilterMask); + } +} + +void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body, short group, short mask) +{ + if (!body->isStaticOrKinematicObject()) + { + body->setGravity(m_gravity); + } + + if (body->getCollisionShape()) + { + addCollisionObject(body,group,mask); + } +} + + +void btDiscreteDynamicsWorld::updateVehicles(btScalar timeStep) +{ + BEGIN_PROFILE("updateVehicles"); + + for ( int i=0;iupdateVehicle( timeStep); + } + END_PROFILE("updateVehicles"); +} + +void btDiscreteDynamicsWorld::updateActivationState(btScalar timeStep) +{ + BEGIN_PROFILE("updateActivationState"); + + for ( int i=0;iupdateDeactivation(timeStep); + + if (body->wantsSleeping()) + { + if (body->isStaticOrKinematicObject()) + { + body->setActivationState(ISLAND_SLEEPING); + } else + { + if (body->getActivationState() == ACTIVE_TAG) + body->setActivationState( WANTS_DEACTIVATION ); + } + } else + { + if (body->getActivationState() != DISABLE_DEACTIVATION) + body->setActivationState( ACTIVE_TAG ); + } + } + } + END_PROFILE("updateActivationState"); +} + +void btDiscreteDynamicsWorld::addConstraint(btTypedConstraint* constraint,bool disableCollisionsBetweenLinkedBodies) +{ + m_constraints.push_back(constraint); + if (disableCollisionsBetweenLinkedBodies) + { + constraint->getRigidBodyA().addConstraintRef(constraint); + constraint->getRigidBodyB().addConstraintRef(constraint); + } +} + +void btDiscreteDynamicsWorld::removeConstraint(btTypedConstraint* constraint) +{ + m_constraints.remove(constraint); + constraint->getRigidBodyA().removeConstraintRef(constraint); + constraint->getRigidBodyB().removeConstraintRef(constraint); +} + +void btDiscreteDynamicsWorld::addVehicle(btRaycastVehicle* vehicle) +{ + m_vehicles.push_back(vehicle); +} + +void btDiscreteDynamicsWorld::removeVehicle(btRaycastVehicle* vehicle) +{ + m_vehicles.remove(vehicle); +} + +inline int btGetConstraintIslandId(const btTypedConstraint* lhs) +{ + int islandId; + + const btCollisionObject& rcolObj0 = lhs->getRigidBodyA(); + const btCollisionObject& rcolObj1 = lhs->getRigidBodyB(); + islandId= rcolObj0.getIslandTag()>=0?rcolObj0.getIslandTag():rcolObj1.getIslandTag(); + return islandId; + +} + + +class btSortConstraintOnIslandPredicate +{ + public: + + bool operator() ( const btTypedConstraint* lhs, const btTypedConstraint* rhs ) + { + int rIslandId0,lIslandId0; + rIslandId0 = btGetConstraintIslandId(rhs); + lIslandId0 = btGetConstraintIslandId(lhs); + return lIslandId0 < rIslandId0; + } +}; + + + + +void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo) +{ + + struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCallback + { + + btContactSolverInfo& m_solverInfo; + btConstraintSolver* m_solver; + btTypedConstraint** m_sortedConstraints; + int m_numConstraints; + btIDebugDraw* m_debugDrawer; + btStackAlloc* m_stackAlloc; + + + InplaceSolverIslandCallback( + btContactSolverInfo& solverInfo, + btConstraintSolver* solver, + btTypedConstraint** sortedConstraints, + int numConstraints, + btIDebugDraw* debugDrawer, + btStackAlloc* stackAlloc) + :m_solverInfo(solverInfo), + m_solver(solver), + m_sortedConstraints(sortedConstraints), + m_numConstraints(numConstraints), + m_debugDrawer(debugDrawer), + m_stackAlloc(stackAlloc) + { + + } + + InplaceSolverIslandCallback& operator=(InplaceSolverIslandCallback& other) + { + btAssert(0); + (void)other; + return *this; + } + virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifolds,int numManifolds, int islandId) + { + //also add all non-contact constraints/joints for this island + btTypedConstraint** startConstraint = 0; + int numCurConstraints = 0; + int i; + + //find the first constraint for this island + for (i=0;isolveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc); + } + + }; + + //sorted version of all btTypedConstraint, based on islandId + btAlignedObjectArray sortedConstraints; + sortedConstraints.resize( m_constraints.size()); + int i; + for (i=0;ibuildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld()->getCollisionObjectArray(),&solverCallback); + + +} + + + + +void btDiscreteDynamicsWorld::calculateSimulationIslands() +{ + BEGIN_PROFILE("calculateSimulationIslands"); + + getSimulationIslandManager()->updateActivationState(getCollisionWorld(),getCollisionWorld()->getDispatcher()); + + { + int i; + int numConstraints = int(m_constraints.size()); + for (i=0;i< numConstraints ; i++ ) + { + btTypedConstraint* constraint = m_constraints[i]; + + const btRigidBody* colObj0 = &constraint->getRigidBodyA(); + const btRigidBody* colObj1 = &constraint->getRigidBodyB(); + + if (((colObj0) && ((colObj0)->mergesSimulationIslands())) && + ((colObj1) && ((colObj1)->mergesSimulationIslands()))) + { + if (colObj0->isActive() || colObj1->isActive()) + { + + getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(), + (colObj1)->getIslandTag()); + } + } + } + } + + //Store the island id in each body + getSimulationIslandManager()->storeIslandActivationState(getCollisionWorld()); + + END_PROFILE("calculateSimulationIslands"); + +} + + +void btDiscreteDynamicsWorld::updateAabbs() +{ + BEGIN_PROFILE("updateAabbs"); + + btVector3 colorvec(1,0,0); + btTransform predictedTrans; + for ( int i=0;iIsActive() && (!body->IsStatic())) + { + btPoint3 minAabb,maxAabb; + colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); + btBroadphaseInterface* bp = (btBroadphaseInterface*)m_broadphasePairCache; + + //moving objects should be moderately sized, probably something wrong if not + if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12))) + { + bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb); + } else + { + //something went wrong, investigate + //this assert is unwanted in 3D modelers (danger of loosing work) + body->setActivationState(DISABLE_SIMULATION); + + static bool reportMe = true; + if (reportMe && m_debugDrawer) + { + reportMe = false; + m_debugDrawer->reportErrorWarning("Overflow in AABB, object removed from simulation"); + m_debugDrawer->reportErrorWarning("If you can reproduce this, please email bugs@continuousphysics.com\n"); + m_debugDrawer->reportErrorWarning("Please include above information, your Platform, version of OS.\n"); + m_debugDrawer->reportErrorWarning("Thanks.\n"); + } + + + } + if (m_debugDrawer && (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawAabb)) + { + m_debugDrawer->drawAabb(minAabb,maxAabb,colorvec); + } + } + } + } + + END_PROFILE("updateAabbs"); +} + +void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep) +{ + BEGIN_PROFILE("integrateTransforms"); + btTransform predictedTrans; + for ( int i=0;iisActive() && (!body->isStaticOrKinematicObject())) + { + body->predictIntegratedTransform(timeStep, predictedTrans); + body->proceedToTransform( predictedTrans); + } + } + } + END_PROFILE("integrateTransforms"); +} + + + +void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) +{ + BEGIN_PROFILE("predictUnconstraintMotion"); + for ( int i=0;iisStaticOrKinematicObject()) + { + if (body->isActive()) + { + body->applyForces( timeStep); + body->integrateVelocities( timeStep); + body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); + } + } + } + } + END_PROFILE("predictUnconstraintMotion"); +} + + +void btDiscreteDynamicsWorld::startProfiling(btScalar timeStep) +{ + (void)timeStep; + #ifdef USE_QUICKPROF + + + //toggle btProfiler + if ( m_debugDrawer && m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_ProfileTimings) + { + if (!m_profileTimings) + { + m_profileTimings = 1; + // To disable profiling, simply comment out the following line. + static int counter = 0; + + char filename[128]; + sprintf(filename,"quickprof_bullet_timings%i.csv",counter++); + btProfiler::init(filename, btProfiler::BLOCK_CYCLE_SECONDS);//BLOCK_TOTAL_MICROSECONDS + } else + { + btProfiler::endProfilingCycle(); + } + + } else + { + if (m_profileTimings) + { + btProfiler::endProfilingCycle(); + + m_profileTimings = 0; + btProfiler::destroy(); + } + } +#endif //USE_QUICKPROF +} + + + + + + +class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIndexCallback +{ + btIDebugDraw* m_debugDrawer; + btVector3 m_color; + btTransform m_worldTrans; + +public: + + DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color) : + m_debugDrawer(debugDrawer), + m_color(color), + m_worldTrans(worldTrans) + { + } + + virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) + { + processTriangle(triangle,partId,triangleIndex); + } + + virtual void processTriangle(btVector3* triangle,int partId, int triangleIndex) + { + (void)partId; + (void)triangleIndex; + + btVector3 wv0,wv1,wv2; + wv0 = m_worldTrans*triangle[0]; + wv1 = m_worldTrans*triangle[1]; + wv2 = m_worldTrans*triangle[2]; + m_debugDrawer->drawLine(wv0,wv1,m_color); + m_debugDrawer->drawLine(wv1,wv2,m_color); + m_debugDrawer->drawLine(wv2,wv0,m_color); + } +}; + +void btDiscreteDynamicsWorld::debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color) +{ + btVector3 start = transform.getOrigin(); + + const btVector3 xoffs = transform.getBasis() * btVector3(radius,0,0); + const btVector3 yoffs = transform.getBasis() * btVector3(0,radius,0); + const btVector3 zoffs = transform.getBasis() * btVector3(0,0,radius); + + // XY + getDebugDrawer()->drawLine(start-xoffs, start+yoffs, color); + getDebugDrawer()->drawLine(start+yoffs, start+xoffs, color); + getDebugDrawer()->drawLine(start+xoffs, start-yoffs, color); + getDebugDrawer()->drawLine(start-yoffs, start-xoffs, color); + + // XZ + getDebugDrawer()->drawLine(start-xoffs, start+zoffs, color); + getDebugDrawer()->drawLine(start+zoffs, start+xoffs, color); + getDebugDrawer()->drawLine(start+xoffs, start-zoffs, color); + getDebugDrawer()->drawLine(start-zoffs, start-xoffs, color); + + // YZ + getDebugDrawer()->drawLine(start-yoffs, start+zoffs, color); + getDebugDrawer()->drawLine(start+zoffs, start+yoffs, color); + getDebugDrawer()->drawLine(start+yoffs, start-zoffs, color); + getDebugDrawer()->drawLine(start-zoffs, start-yoffs, color); +} + +void btDiscreteDynamicsWorld::debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color) +{ + // Draw a small simplex at the center of the object + { + btVector3 start = worldTransform.getOrigin(); + getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(1,0,0), btVector3(1,0,0)); + getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(0,1,0), btVector3(0,1,0)); + getDebugDrawer()->drawLine(start, start+worldTransform.getBasis() * btVector3(0,0,1), btVector3(0,0,1)); + } + + if (shape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) + { + const btCompoundShape* compoundShape = static_cast(shape); + for (int i=compoundShape->getNumChildShapes()-1;i>=0;i--) + { + btTransform childTrans = compoundShape->getChildTransform(i); + const btCollisionShape* colShape = compoundShape->getChildShape(i); + debugDrawObject(worldTransform*childTrans,colShape,color); + } + + } else + { + switch (shape->getShapeType()) + { + + case SPHERE_SHAPE_PROXYTYPE: + { + const btSphereShape* sphereShape = static_cast(shape); + btScalar radius = sphereShape->getMargin();//radius doesn't include the margin, so draw with margin + + debugDrawSphere(radius, worldTransform, color); + break; + } + case MULTI_SPHERE_SHAPE_PROXYTYPE: + { + const btMultiSphereShape* multiSphereShape = static_cast(shape); + + for (int i = multiSphereShape->getSphereCount()-1; i>=0;i--) + { + btTransform childTransform = worldTransform; + childTransform.getOrigin() += multiSphereShape->getSpherePosition(i); + debugDrawSphere(multiSphereShape->getSphereRadius(i), childTransform, color); + } + + break; + } + case CAPSULE_SHAPE_PROXYTYPE: + { + const btCapsuleShape* capsuleShape = static_cast(shape); + + btScalar radius = capsuleShape->getRadius(); + btScalar halfHeight = capsuleShape->getHalfHeight(); + + // Draw the ends + { + btTransform childTransform = worldTransform; + childTransform.getOrigin() = worldTransform * btVector3(0,halfHeight,0); + debugDrawSphere(radius, childTransform, color); + } + + { + btTransform childTransform = worldTransform; + childTransform.getOrigin() = worldTransform * btVector3(0,-halfHeight,0); + debugDrawSphere(radius, childTransform, color); + } + + // Draw some additional lines + btVector3 start = worldTransform.getOrigin(); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(-radius,halfHeight,0),start+worldTransform.getBasis() * btVector3(-radius,-halfHeight,0), color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(radius,halfHeight,0),start+worldTransform.getBasis() * btVector3(radius,-halfHeight,0), color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(0,halfHeight,-radius),start+worldTransform.getBasis() * btVector3(0,-halfHeight,-radius), color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(0,halfHeight,radius),start+worldTransform.getBasis() * btVector3(0,-halfHeight,radius), color); + + break; + } + case CONE_SHAPE_PROXYTYPE: + { + const btConeShape* coneShape = static_cast(shape); + btScalar radius = coneShape->getRadius();//+coneShape->getMargin(); + btScalar height = coneShape->getHeight();//+coneShape->getMargin(); + btVector3 start = worldTransform.getOrigin(); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(radius,btScalar(0.),btScalar(-0.5)*height),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(-radius,btScalar(0.),btScalar(-0.5)*height),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),radius,btScalar(-0.5)*height),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * btVector3(btScalar(0.),btScalar(0.),btScalar(0.5)*height),start+worldTransform.getBasis() * btVector3(btScalar(0.),-radius,btScalar(-0.5)*height),color); + break; + + } + case CYLINDER_SHAPE_PROXYTYPE: + { + const btCylinderShape* cylinder = static_cast(shape); + int upAxis = cylinder->getUpAxis(); + btScalar radius = cylinder->getRadius(); + btScalar halfHeight = cylinder->getHalfExtents()[upAxis]; + btVector3 start = worldTransform.getOrigin(); + btVector3 offsetHeight(0,0,0); + offsetHeight[upAxis] = halfHeight; + btVector3 offsetRadius(0,0,0); + offsetRadius[(upAxis+1)%3] = radius; + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight+offsetRadius),start+worldTransform.getBasis() * (-offsetHeight+offsetRadius),color); + getDebugDrawer()->drawLine(start+worldTransform.getBasis() * (offsetHeight-offsetRadius),start+worldTransform.getBasis() * (-offsetHeight-offsetRadius),color); + break; + } + default: + { + + if (shape->isConcave()) + { + btConcaveShape* concaveMesh = (btConcaveShape*) shape; + + //todo pass camera, for some culling + btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + + DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color); + concaveMesh->processAllTriangles(&drawCallback,aabbMin,aabbMax); + + } + + if (shape->getShapeType() == CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE) + { + btConvexTriangleMeshShape* convexMesh = (btConvexTriangleMeshShape*) shape; + //todo: pass camera for some culling + btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); + btVector3 aabbMin(btScalar(-1e30),btScalar(-1e30),btScalar(-1e30)); + //DebugDrawcallback drawCallback; + DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color); + convexMesh->getStridingMesh()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax); + } + + + /// for polyhedral shapes + if (shape->isPolyhedral()) + { + btPolyhedralConvexShape* polyshape = (btPolyhedralConvexShape*) shape; + + int i; + for (i=0;igetNumEdges();i++) + { + btPoint3 a,b; + polyshape->getEdge(i,a,b); + btVector3 wa = worldTransform * a; + btVector3 wb = worldTransform * b; + getDebugDrawer()->drawLine(wa,wb,color); + + } + + + } + } + } + } +} + + +void btDiscreteDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) +{ + if (m_ownsConstraintSolver) + { + delete m_constraintSolver; + } + m_ownsConstraintSolver = false; + m_constraintSolver = solver; +} + +int btDiscreteDynamicsWorld::getNumConstraints() const +{ + return int(m_constraints.size()); +} +btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) +{ + return m_constraints[index]; +} +const btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) const +{ + return m_constraints[index]; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h new file mode 100644 index 00000000000..83b90bfeebc --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h @@ -0,0 +1,157 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_DISCRETE_DYNAMICS_WORLD_H +#define BT_DISCRETE_DYNAMICS_WORLD_H + +#include "btDynamicsWorld.h" + +class btDispatcher; +class btOverlappingPairCache; +class btConstraintSolver; +class btSimulationIslandManager; +class btTypedConstraint; +#include "../ConstraintSolver/btContactSolverInfo.h" + +class btRaycastVehicle; +class btIDebugDraw; +#include "../../LinearMath/btAlignedObjectArray.h" + + +///btDiscreteDynamicsWorld provides discrete rigid body simulation +///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController +class btDiscreteDynamicsWorld : public btDynamicsWorld +{ +protected: + + btConstraintSolver* m_constraintSolver; + + btSimulationIslandManager* m_islandManager; + + btAlignedObjectArray m_constraints; + + btIDebugDraw* m_debugDrawer; + + btVector3 m_gravity; + + //for variable timesteps + btScalar m_localTime; + //for variable timesteps + + bool m_ownsIslandManager; + bool m_ownsConstraintSolver; + + btContactSolverInfo m_solverInfo; + + + btAlignedObjectArray m_vehicles; + + int m_profileTimings; + + void predictUnconstraintMotion(btScalar timeStep); + + void integrateTransforms(btScalar timeStep); + + void calculateSimulationIslands(); + + void solveConstraints(btContactSolverInfo& solverInfo); + + void updateActivationState(btScalar timeStep); + + void updateVehicles(btScalar timeStep); + + void startProfiling(btScalar timeStep); + + virtual void internalSingleStepSimulation( btScalar timeStep); + + void synchronizeMotionStates(); + + void saveKinematicState(btScalar timeStep); + + void debugDrawSphere(btScalar radius, const btTransform& transform, const btVector3& color); + +public: + + + ///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those + btDiscreteDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver); + + virtual ~btDiscreteDynamicsWorld(); + + ///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's + virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); + + virtual void updateAabbs(); + + void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false); + + void removeConstraint(btTypedConstraint* constraint); + + void addVehicle(btRaycastVehicle* vehicle); + + void removeVehicle(btRaycastVehicle* vehicle); + + btSimulationIslandManager* getSimulationIslandManager() + { + return m_islandManager; + } + + const btSimulationIslandManager* getSimulationIslandManager() const + { + return m_islandManager; + } + + btCollisionWorld* getCollisionWorld() + { + return this; + } + + virtual void setDebugDrawer(btIDebugDraw* debugDrawer) + { + m_debugDrawer = debugDrawer; + } + + virtual btIDebugDraw* getDebugDrawer() + { + return m_debugDrawer; + } + + virtual void setGravity(const btVector3& gravity); + + virtual void addRigidBody(btRigidBody* body); + + virtual void addRigidBody(btRigidBody* body, short group, short mask); + + virtual void removeRigidBody(btRigidBody* body); + + void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color); + + virtual void setConstraintSolver(btConstraintSolver* solver); + + virtual int getNumConstraints() const; + + virtual btTypedConstraint* getConstraint(int index) ; + + virtual const btTypedConstraint* getConstraint(int index) const; + + btContactSolverInfo& getSolverInfo() + { + return m_solverInfo; + } + + +}; + +#endif //BT_DISCRETE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h new file mode 100644 index 00000000000..65b63fad4b5 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btDynamicsWorld.h @@ -0,0 +1,78 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_DYNAMICS_WORLD_H +#define BT_DYNAMICS_WORLD_H + +#include "../../BulletCollision/CollisionDispatch/btCollisionWorld.h" +class btTypedConstraint; +class btRaycastVehicle; +class btConstraintSolver; + + +///btDynamicsWorld is the baseclass for several dynamics implementation, basic, discrete, parallel, and continuous +class btDynamicsWorld : public btCollisionWorld +{ + public: + + + btDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache) + :btCollisionWorld(dispatcher,pairCache) + { + } + + virtual ~btDynamicsWorld() + { + } + + ///stepSimulation proceeds the simulation over timeStep units + ///if maxSubSteps > 0, it will interpolate time steps + virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0; + + virtual void updateAabbs() = 0; + + virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false) { (void)constraint;}; + + virtual void removeConstraint(btTypedConstraint* constraint) {(void)constraint;}; + + virtual void addVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}; + + virtual void removeVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}; + + + virtual void setDebugDrawer(btIDebugDraw* debugDrawer) = 0; + + virtual btIDebugDraw* getDebugDrawer() = 0; + + //once a rigidbody is added to the dynamics world, it will get this gravity assigned + //existing rigidbodies in the world get gravity assigned too, during this method + virtual void setGravity(const btVector3& gravity) = 0; + + virtual void addRigidBody(btRigidBody* body) = 0; + + virtual void removeRigidBody(btRigidBody* body) = 0; + + virtual void setConstraintSolver(btConstraintSolver* solver) = 0; + + virtual int getNumConstraints() const { return 0; } + + virtual btTypedConstraint* getConstraint(int index) { (void)index; return 0; } + + virtual const btTypedConstraint* getConstraint(int index) const { (void)index; return 0; } + +}; + +#endif //BT_DYNAMICS_WORLD_H + diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp new file mode 100644 index 00000000000..9ed3579d89c --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.cpp @@ -0,0 +1,345 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btRigidBody.h" +#include "BulletCollision/CollisionShapes/btConvexShape.h" +#include "LinearMath/btMinMax.h" +#include "LinearMath/btTransformUtil.h" +#include "LinearMath/btMotionState.h" +#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h" + +btScalar gLinearAirDamping = btScalar(1.); +//'temporarily' global variables +btScalar gDeactivationTime = btScalar(2.); +bool gDisableDeactivation = false; + +btScalar gLinearSleepingThreshold = btScalar(0.8); +btScalar gAngularSleepingThreshold = btScalar(1.0); +static int uniqueId = 0; + +btRigidBody::btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution) +: + m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), + m_angularFactor(btScalar(1.)), + m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_linearDamping(btScalar(0.)), + m_angularDamping(btScalar(0.5)), + m_optionalMotionState(motionState), + m_contactSolverType(0), + m_frictionSolverType(0) +{ + + if (motionState) + { + motionState->getWorldTransform(m_worldTransform); + } else + { + m_worldTransform = btTransform::getIdentity(); + } + + m_interpolationWorldTransform = m_worldTransform; + m_interpolationLinearVelocity.setValue(0,0,0); + m_interpolationAngularVelocity.setValue(0,0,0); + + //moved to btCollisionObject + m_friction = friction; + m_restitution = restitution; + + m_collisionShape = collisionShape; + m_debugBodyId = uniqueId++; + + //m_internalOwner is to allow upcasting from collision object to rigid body + m_internalOwner = this; + + setMassProps(mass, localInertia); + setDamping(linearDamping, angularDamping); + updateInertiaTensor(); + +} + +#ifdef OBSOLETE_MOTIONSTATE_LESS +btRigidBody::btRigidBody( btScalar mass,const btTransform& worldTransform,btCollisionShape* collisionShape,const btVector3& localInertia,btScalar linearDamping,btScalar angularDamping,btScalar friction,btScalar restitution) +: + m_gravity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_totalForce(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_totalTorque(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_linearVelocity(btScalar(0.0), btScalar(0.0), btScalar(0.0)), + m_angularVelocity(btScalar(0.),btScalar(0.),btScalar(0.)), + m_linearDamping(btScalar(0.)), + m_angularDamping(btScalar(0.5)), + m_optionalMotionState(0), + m_contactSolverType(0), + m_frictionSolverType(0) +{ + + m_worldTransform = worldTransform; + m_interpolationWorldTransform = m_worldTransform; + m_interpolationLinearVelocity.setValue(0,0,0); + m_interpolationAngularVelocity.setValue(0,0,0); + + //moved to btCollisionObject + m_friction = friction; + m_restitution = restitution; + + m_collisionShape = collisionShape; + m_debugBodyId = uniqueId++; + + //m_internalOwner is to allow upcasting from collision object to rigid body + m_internalOwner = this; + + setMassProps(mass, localInertia); + setDamping(linearDamping, angularDamping); + updateInertiaTensor(); + +} + +#endif //OBSOLETE_MOTIONSTATE_LESS + + + + +//#define EXPERIMENTAL_JITTER_REMOVAL 1 +#ifdef EXPERIMENTAL_JITTER_REMOVAL +//Bullet 2.20b has experimental damping code to reduce jitter just before objects fall asleep/deactivate +//doesn't work very well yet (value 0 disabled this damping) +//note there this influences deactivation thresholds! +btScalar gClippedAngvelThresholdSqr = btScalar(0.01); +btScalar gClippedLinearThresholdSqr = btScalar(0.01); +#endif //EXPERIMENTAL_JITTER_REMOVAL + +btScalar gJitterVelocityDampingFactor = btScalar(0.7); + +void btRigidBody::predictIntegratedTransform(btScalar timeStep,btTransform& predictedTransform) +{ + +#ifdef EXPERIMENTAL_JITTER_REMOVAL + //if (wantsSleeping()) + { + //clip to avoid jitter + if ((m_angularVelocity.length2() < gClippedAngvelThresholdSqr) && + (m_linearVelocity.length2() < gClippedLinearThresholdSqr)) + { + m_angularVelocity *= gJitterVelocityDampingFactor; + m_linearVelocity *= gJitterVelocityDampingFactor; + } + } + +#endif //EXPERIMENTAL_JITTER_REMOVAL + + btTransformUtil::integrateTransform(m_worldTransform,m_linearVelocity,m_angularVelocity,timeStep,predictedTransform); +} + +void btRigidBody::saveKinematicState(btScalar timeStep) +{ + //todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities + if (timeStep != btScalar(0.)) + { + //if we use motionstate to synchronize world transforms, get the new kinematic/animated world transform + if (getMotionState()) + getMotionState()->getWorldTransform(m_worldTransform); + btVector3 linVel,angVel; + + btTransformUtil::calculateVelocity(m_interpolationWorldTransform,m_worldTransform,timeStep,m_linearVelocity,m_angularVelocity); + m_interpolationLinearVelocity = m_linearVelocity; + m_interpolationAngularVelocity = m_angularVelocity; + m_interpolationWorldTransform = m_worldTransform; + //printf("angular = %f %f %f\n",m_angularVelocity.getX(),m_angularVelocity.getY(),m_angularVelocity.getZ()); + } +} + +void btRigidBody::getAabb(btVector3& aabbMin,btVector3& aabbMax) const +{ + getCollisionShape()->getAabb(m_worldTransform,aabbMin,aabbMax); +} + + + + +void btRigidBody::setGravity(const btVector3& acceleration) +{ + if (m_inverseMass != btScalar(0.0)) + { + m_gravity = acceleration * (btScalar(1.0) / m_inverseMass); + } +} + + + + + + +void btRigidBody::setDamping(btScalar lin_damping, btScalar ang_damping) +{ + m_linearDamping = GEN_clamped(lin_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); + m_angularDamping = GEN_clamped(ang_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); +} + + + +#include + + +void btRigidBody::applyForces(btScalar step) +{ + if (isStaticOrKinematicObject()) + return; + + applyCentralForce(m_gravity); + + m_linearVelocity *= GEN_clamped((btScalar(1.) - step * gLinearAirDamping * m_linearDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); + m_angularVelocity *= GEN_clamped((btScalar(1.) - step * m_angularDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0)); + +#define FORCE_VELOCITY_DAMPING 1 +#ifdef FORCE_VELOCITY_DAMPING + btScalar speed = m_linearVelocity.length(); + if (speed < m_linearDamping) + { + btScalar dampVel = btScalar(0.005); + if (speed > dampVel) + { + btVector3 dir = m_linearVelocity.normalized(); + m_linearVelocity -= dir * dampVel; + } else + { + m_linearVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); + } + } + + btScalar angSpeed = m_angularVelocity.length(); + if (angSpeed < m_angularDamping) + { + btScalar angDampVel = btScalar(0.005); + if (angSpeed > angDampVel) + { + btVector3 dir = m_angularVelocity.normalized(); + m_angularVelocity -= dir * angDampVel; + } else + { + m_angularVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.)); + } + } +#endif //FORCE_VELOCITY_DAMPING + +} + +void btRigidBody::proceedToTransform(const btTransform& newTrans) +{ + setCenterOfMassTransform( newTrans ); +} + + +void btRigidBody::setMassProps(btScalar mass, const btVector3& inertia) +{ + if (mass == btScalar(0.)) + { + m_collisionFlags |= btCollisionObject::CF_STATIC_OBJECT; + m_inverseMass = btScalar(0.); + } else + { + m_collisionFlags &= (~btCollisionObject::CF_STATIC_OBJECT); + m_inverseMass = btScalar(1.0) / mass; + } + + m_invInertiaLocal.setValue(inertia.x() != btScalar(0.0) ? btScalar(1.0) / inertia.x(): btScalar(0.0), + inertia.y() != btScalar(0.0) ? btScalar(1.0) / inertia.y(): btScalar(0.0), + inertia.z() != btScalar(0.0) ? btScalar(1.0) / inertia.z(): btScalar(0.0)); + +} + + + +void btRigidBody::updateInertiaTensor() +{ + m_invInertiaTensorWorld = m_worldTransform.getBasis().scaled(m_invInertiaLocal) * m_worldTransform.getBasis().transpose(); +} + + +void btRigidBody::integrateVelocities(btScalar step) +{ + if (isStaticOrKinematicObject()) + return; + + m_linearVelocity += m_totalForce * (m_inverseMass * step); + m_angularVelocity += m_invInertiaTensorWorld * m_totalTorque * step; + +#define MAX_ANGVEL SIMD_HALF_PI + /// clamp angular velocity. collision calculations will fail on higher angular velocities + btScalar angvel = m_angularVelocity.length(); + if (angvel*step > MAX_ANGVEL) + { + m_angularVelocity *= (MAX_ANGVEL/step) /angvel; + } + + clearForces(); +} + +btQuaternion btRigidBody::getOrientation() const +{ + btQuaternion orn; + m_worldTransform.getBasis().getRotation(orn); + return orn; +} + + +void btRigidBody::setCenterOfMassTransform(const btTransform& xform) +{ + + if (isStaticOrKinematicObject()) + { + m_interpolationWorldTransform = m_worldTransform; + } else + { + m_interpolationWorldTransform = xform; + } + m_interpolationLinearVelocity = getLinearVelocity(); + m_interpolationAngularVelocity = getAngularVelocity(); + m_worldTransform = xform; + updateInertiaTensor(); +} + + +bool btRigidBody::checkCollideWithOverride(btCollisionObject* co) +{ + btRigidBody* otherRb = btRigidBody::upcast(co); + if (!otherRb) + return true; + + for (int i = 0; i < m_constraintRefs.size(); ++i) + { + btTypedConstraint* c = m_constraintRefs[i]; + if (&c->getRigidBodyA() == otherRb || &c->getRigidBodyB() == otherRb) + return false; + } + + return true; +} + +void btRigidBody::addConstraintRef(btTypedConstraint* c) +{ + int index = m_constraintRefs.findLinearSearch(c); + if (index == m_constraintRefs.size()) + m_constraintRefs.push_back(c); + + m_checkCollideWith = true; +} + +void btRigidBody::removeConstraintRef(btTypedConstraint* c) +{ + m_constraintRefs.remove(c); + m_checkCollideWith = m_constraintRefs.size() > 0; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h new file mode 100644 index 00000000000..0707595d48e --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btRigidBody.h @@ -0,0 +1,357 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef RIGIDBODY_H +#define RIGIDBODY_H + +#include "../../LinearMath/btAlignedObjectArray.h" +#include "../../LinearMath/btPoint3.h" +#include "../../LinearMath/btTransform.h" +#include "../../BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" +#include "../../BulletCollision/CollisionDispatch/btCollisionObject.h" + +class btCollisionShape; +class btMotionState; +class btTypedConstraint; + + +extern btScalar gLinearAirDamping; + +extern btScalar gDeactivationTime; +extern bool gDisableDeactivation; +extern btScalar gLinearSleepingThreshold; +extern btScalar gAngularSleepingThreshold; + + +/// btRigidBody class for btRigidBody Dynamics +/// +class btRigidBody : public btCollisionObject +{ + + btMatrix3x3 m_invInertiaTensorWorld; + btVector3 m_linearVelocity; + btVector3 m_angularVelocity; + btScalar m_inverseMass; + btScalar m_angularFactor; + + btVector3 m_gravity; + btVector3 m_invInertiaLocal; + btVector3 m_totalForce; + btVector3 m_totalTorque; + + btScalar m_linearDamping; + btScalar m_angularDamping; + + + //m_optionalMotionState allows to automatic synchronize the world transform for active objects + btMotionState* m_optionalMotionState; + + //keep track of typed constraints referencing this rigid body + btAlignedObjectArray m_constraintRefs; + +public: + +#ifdef OBSOLETE_MOTIONSTATE_LESS + //not supported, please use btMotionState + btRigidBody(btScalar mass, const btTransform& worldTransform, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=btScalar(0.),btScalar angularDamping=btScalar(0.),btScalar friction=btScalar(0.5),btScalar restitution=btScalar(0.)); +#endif //OBSOLETE_MOTIONSTATE_LESS + + btRigidBody(btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0),btScalar linearDamping=btScalar(0.),btScalar angularDamping=btScalar(0.),btScalar friction=btScalar(0.5),btScalar restitution=btScalar(0.)); + + void proceedToTransform(const btTransform& newTrans); + + ///to keep collision detection and dynamics separate we don't store a rigidbody pointer + ///but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast + static const btRigidBody* upcast(const btCollisionObject* colObj) + { + return (const btRigidBody*)colObj->getInternalOwner(); + } + static btRigidBody* upcast(btCollisionObject* colObj) + { + return (btRigidBody*)colObj->getInternalOwner(); + } + + /// continuous collision detection needs prediction + void predictIntegratedTransform(btScalar step, btTransform& predictedTransform) ; + + void saveKinematicState(btScalar step); + + + void applyForces(btScalar step); + + void setGravity(const btVector3& acceleration); + + const btVector3& getGravity() const + { + return m_gravity; + } + + void setDamping(btScalar lin_damping, btScalar ang_damping); + + inline const btCollisionShape* getCollisionShape() const { + return m_collisionShape; + } + + inline btCollisionShape* getCollisionShape() { + return m_collisionShape; + } + + void setMassProps(btScalar mass, const btVector3& inertia); + + btScalar getInvMass() const { return m_inverseMass; } + const btMatrix3x3& getInvInertiaTensorWorld() const { + return m_invInertiaTensorWorld; + } + + void integrateVelocities(btScalar step); + + void setCenterOfMassTransform(const btTransform& xform); + + void applyCentralForce(const btVector3& force) + { + m_totalForce += force; + } + + const btVector3& getInvInertiaDiagLocal() + { + return m_invInertiaLocal; + }; + + void setInvInertiaDiagLocal(const btVector3& diagInvInertia) + { + m_invInertiaLocal = diagInvInertia; + } + + void applyTorque(const btVector3& torque) + { + m_totalTorque += torque; + } + + void applyForce(const btVector3& force, const btVector3& rel_pos) + { + applyCentralForce(force); + applyTorque(rel_pos.cross(force)); + } + + void applyCentralImpulse(const btVector3& impulse) + { + m_linearVelocity += impulse * m_inverseMass; + } + + void applyTorqueImpulse(const btVector3& torque) + { + m_angularVelocity += m_invInertiaTensorWorld * torque; + } + + void applyImpulse(const btVector3& impulse, const btVector3& rel_pos) + { + if (m_inverseMass != btScalar(0.)) + { + applyCentralImpulse(impulse); + if (m_angularFactor) + { + applyTorqueImpulse(rel_pos.cross(impulse)*m_angularFactor); + } + } + } + + //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position + inline void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude) + { + if (m_inverseMass != btScalar(0.)) + { + m_linearVelocity += linearComponent*impulseMagnitude; + if (m_angularFactor) + { + m_angularVelocity += angularComponent*impulseMagnitude*m_angularFactor; + } + } + } + + void clearForces() + { + m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); + m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); + } + + void updateInertiaTensor(); + + const btPoint3& getCenterOfMassPosition() const { + return m_worldTransform.getOrigin(); + } + btQuaternion getOrientation() const; + + const btTransform& getCenterOfMassTransform() const { + return m_worldTransform; + } + const btVector3& getLinearVelocity() const { + return m_linearVelocity; + } + const btVector3& getAngularVelocity() const { + return m_angularVelocity; + } + + + inline void setLinearVelocity(const btVector3& lin_vel) + { + assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); + m_linearVelocity = lin_vel; + } + + inline void setAngularVelocity(const btVector3& ang_vel) { + assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); + { + m_angularVelocity = ang_vel; + } + } + + btVector3 getVelocityInLocalPoint(const btVector3& rel_pos) const + { + //we also calculate lin/ang velocity for kinematic objects + return m_linearVelocity + m_angularVelocity.cross(rel_pos); + + //for kinematic objects, we could also use use: + // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep; + } + + void translate(const btVector3& v) + { + m_worldTransform.getOrigin() += v; + } + + + void getAabb(btVector3& aabbMin,btVector3& aabbMax) const; + + + + + + inline btScalar computeImpulseDenominator(const btPoint3& pos, const btVector3& normal) const + { + btVector3 r0 = pos - getCenterOfMassPosition(); + + btVector3 c0 = (r0).cross(normal); + + btVector3 vec = (c0 * getInvInertiaTensorWorld()).cross(r0); + + return m_inverseMass + normal.dot(vec); + + } + + inline btScalar computeAngularImpulseDenominator(const btVector3& axis) const + { + btVector3 vec = axis * getInvInertiaTensorWorld(); + return axis.dot(vec); + } + + inline void updateDeactivation(btScalar timeStep) + { + if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION)) + return; + + if ((getLinearVelocity().length2() < gLinearSleepingThreshold*gLinearSleepingThreshold) && + (getAngularVelocity().length2() < gAngularSleepingThreshold*gAngularSleepingThreshold)) + { + m_deactivationTime += timeStep; + } else + { + m_deactivationTime=btScalar(0.); + setActivationState(0); + } + + } + + inline bool wantsSleeping() + { + + if (getActivationState() == DISABLE_DEACTIVATION) + return false; + + //disable deactivation + if (gDisableDeactivation || (gDeactivationTime == btScalar(0.))) + return false; + + if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION)) + return true; + + if (m_deactivationTime> gDeactivationTime) + { + return true; + } + return false; + } + + + + const btBroadphaseProxy* getBroadphaseProxy() const + { + return m_broadphaseHandle; + } + btBroadphaseProxy* getBroadphaseProxy() + { + return m_broadphaseHandle; + } + void setNewBroadphaseProxy(btBroadphaseProxy* broadphaseProxy) + { + m_broadphaseHandle = broadphaseProxy; + } + + //btMotionState allows to automatic synchronize the world transform for active objects + btMotionState* getMotionState() + { + return m_optionalMotionState; + } + const btMotionState* getMotionState() const + { + return m_optionalMotionState; + } + void setMotionState(btMotionState* motionState) + { + m_optionalMotionState = motionState; + if (m_optionalMotionState) + motionState->getWorldTransform(m_worldTransform); + } + + //for experimental overriding of friction/contact solver func + int m_contactSolverType; + int m_frictionSolverType; + + void setAngularFactor(btScalar angFac) + { + m_angularFactor = angFac; + } + btScalar getAngularFactor() const + { + return m_angularFactor; + } + + //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase? + bool isInWorld() const + { + return (getBroadphaseProxy() != 0); + } + + virtual bool checkCollideWithOverride(btCollisionObject* co); + + void addConstraintRef(btTypedConstraint* c); + void removeConstraintRef(btTypedConstraint* c); + + int m_debugBodyId; +}; + + + +#endif + diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp new file mode 100644 index 00000000000..4ebcb8e7517 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp @@ -0,0 +1,211 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btSimpleDynamicsWorld.h" +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" +#include "BulletCollision/CollisionShapes/btCollisionShape.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" +#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" +#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h" + + +/* + Make sure this dummy function never changes so that it + can be used by probes that are checking whether the + library is actually installed. +*/ +extern "C" void btBulletDynamicsProbe () {} + + + + +btSimpleDynamicsWorld::btSimpleDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver) +:btDynamicsWorld(dispatcher,pairCache), +m_constraintSolver(constraintSolver), +m_ownsConstraintSolver(false), +m_debugDrawer(0), +m_gravity(0,0,-10) +{ + +} + + +btSimpleDynamicsWorld::~btSimpleDynamicsWorld() +{ + if (m_ownsConstraintSolver) + delete m_constraintSolver; +} + +int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep) +{ + (void)fixedTimeStep; + (void)maxSubSteps; + + + ///apply gravity, predict motion + predictUnconstraintMotion(timeStep); + + btDispatcherInfo& dispatchInfo = getDispatchInfo(); + dispatchInfo.m_timeStep = timeStep; + dispatchInfo.m_stepCount = 0; + dispatchInfo.m_debugDraw = getDebugDrawer(); + + ///perform collision detection + performDiscreteCollisionDetection(); + + ///solve contact constraints + int numManifolds = m_dispatcher1->getNumManifolds(); + if (numManifolds) + { + btPersistentManifold** manifoldPtr = ((btCollisionDispatcher*)m_dispatcher1)->getInternalManifoldPointer(); + + btContactSolverInfo infoGlobal; + infoGlobal.m_timeStep = timeStep; + + m_constraintSolver->solveGroup(0,0,manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc); + } + + ///integrate transforms + integrateTransforms(timeStep); + + updateAabbs(); + + synchronizeMotionStates(); + + return 1; + +} + + +void btSimpleDynamicsWorld::setGravity(const btVector3& gravity) +{ + m_gravity = gravity; + for ( int i=0;isetGravity(gravity); + } + } +} + +void btSimpleDynamicsWorld::removeRigidBody(btRigidBody* body) +{ + removeCollisionObject(body); +} + +void btSimpleDynamicsWorld::addRigidBody(btRigidBody* body) +{ + body->setGravity(m_gravity); + + if (body->getCollisionShape()) + { + addCollisionObject(body); + } +} + +void btSimpleDynamicsWorld::updateAabbs() +{ + btTransform predictedTrans; + for ( int i=0;iisActive() && (!body->isStaticObject())) + { + btPoint3 minAabb,maxAabb; + colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb); + btBroadphaseInterface* bp = getBroadphase(); + bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb); + } + } + } +} + +void btSimpleDynamicsWorld::integrateTransforms(btScalar timeStep) +{ + btTransform predictedTrans; + for ( int i=0;iisActive() && (!body->isStaticObject())) + { + body->predictIntegratedTransform(timeStep, predictedTrans); + body->proceedToTransform( predictedTrans); + } + } + } +} + + + +void btSimpleDynamicsWorld::predictUnconstraintMotion(btScalar timeStep) +{ + for ( int i=0;iisStaticObject()) + { + if (body->isActive()) + { + body->applyForces( timeStep); + body->integrateVelocities( timeStep); + body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform()); + } + } + } + } +} + + +void btSimpleDynamicsWorld::synchronizeMotionStates() +{ + //todo: iterate over awake simulation islands! + for ( int i=0;igetMotionState()) + { + if (body->getActivationState() != ISLAND_SLEEPING) + { + body->getMotionState()->setWorldTransform(body->getWorldTransform()); + } + } + } + +} + + +void btSimpleDynamicsWorld::setConstraintSolver(btConstraintSolver* solver) +{ + if (m_ownsConstraintSolver) + { + delete m_constraintSolver; + } + m_ownsConstraintSolver = false; + m_constraintSolver = solver; +} diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h new file mode 100644 index 00000000000..25f4ccd8e68 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h @@ -0,0 +1,82 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_SIMPLE_DYNAMICS_WORLD_H +#define BT_SIMPLE_DYNAMICS_WORLD_H + +#include "btDynamicsWorld.h" + +class btDispatcher; +class btOverlappingPairCache; +class btConstraintSolver; + +///btSimpleDynamicsWorld demonstrates very basic usage of Bullet rigid body dynamics +///It can be used for basic simulations, and as a starting point for porting Bullet +///btSimpleDynamicsWorld lacks object deactivation, island management and other concepts. +///For more complicated simulations, btDiscreteDynamicsWorld and btContinuousDynamicsWorld are recommended +///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController +class btSimpleDynamicsWorld : public btDynamicsWorld +{ +protected: + + btConstraintSolver* m_constraintSolver; + + bool m_ownsConstraintSolver; + + btIDebugDraw* m_debugDrawer; + + void predictUnconstraintMotion(btScalar timeStep); + + void integrateTransforms(btScalar timeStep); + + btVector3 m_gravity; + +public: + + + + ///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver + btSimpleDynamicsWorld(btDispatcher* dispatcher,btOverlappingPairCache* pairCache,btConstraintSolver* constraintSolver); + + virtual ~btSimpleDynamicsWorld(); + + ///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead + virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.)); + + virtual void setDebugDrawer(btIDebugDraw* debugDrawer) + { + m_debugDrawer = debugDrawer; + }; + + virtual btIDebugDraw* getDebugDrawer() + { + return m_debugDrawer; + } + + virtual void setGravity(const btVector3& gravity); + + virtual void addRigidBody(btRigidBody* body); + + virtual void removeRigidBody(btRigidBody* body); + + virtual void updateAabbs(); + + void synchronizeMotionStates(); + + virtual void setConstraintSolver(btConstraintSolver* solver); + +}; + +#endif //BT_SIMPLE_DYNAMICS_WORLD_H diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp new file mode 100644 index 00000000000..d53de7f3687 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp @@ -0,0 +1,733 @@ +/* + * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies. + * Erwin Coumans makes no representations about the suitability + * of this software for any purpose. + * It is provided "as is" without express or implied warranty. +*/ + +#include "LinearMath/btVector3.h" +#include "btRaycastVehicle.h" + +#include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h" +#include "BulletDynamics/ConstraintSolver/btJacobianEntry.h" +#include "LinearMath/btQuaternion.h" +#include "BulletDynamics/Dynamics/btDynamicsWorld.h" +#include "btVehicleRaycaster.h" +#include "btWheelInfo.h" +#include "LinearMath/btMinMax.h" + + +#include "BulletDynamics/ConstraintSolver/btContactConstraint.h" + + + +static btRigidBody s_fixedObject( 0,0,0); + +btRaycastVehicle::btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster ) +:m_vehicleRaycaster(raycaster), +m_pitchControl(btScalar(0.)) +{ + m_chassisBody = chassis; + m_indexRightAxis = 0; + m_indexUpAxis = 2; + m_indexForwardAxis = 1; + defaultInit(tuning); +} + + +void btRaycastVehicle::defaultInit(const btVehicleTuning& tuning) +{ + (void)tuning; + m_currentVehicleSpeedKmHour = btScalar(0.); + m_steeringValue = btScalar(0.); + +} + + + +btRaycastVehicle::~btRaycastVehicle() +{ +} + + +// +// basically most of the code is general for 2 or 4 wheel vehicles, but some of it needs to be reviewed +// +btWheelInfo& btRaycastVehicle::addWheel( const btVector3& connectionPointCS, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel) +{ + + btWheelInfoConstructionInfo ci; + + ci.m_chassisConnectionCS = connectionPointCS; + ci.m_wheelDirectionCS = wheelDirectionCS0; + ci.m_wheelAxleCS = wheelAxleCS; + ci.m_suspensionRestLength = suspensionRestLength; + ci.m_wheelRadius = wheelRadius; + ci.m_suspensionStiffness = tuning.m_suspensionStiffness; + ci.m_wheelsDampingCompression = tuning.m_suspensionCompression; + ci.m_wheelsDampingRelaxation = tuning.m_suspensionDamping; + ci.m_frictionSlip = tuning.m_frictionSlip; + ci.m_bIsFrontWheel = isFrontWheel; + ci.m_maxSuspensionTravelCm = tuning.m_maxSuspensionTravelCm; + + m_wheelInfo.push_back( btWheelInfo(ci)); + + btWheelInfo& wheel = m_wheelInfo[getNumWheels()-1]; + + updateWheelTransformsWS( wheel , false ); + updateWheelTransform(getNumWheels()-1,false); + return wheel; +} + + + + +const btTransform& btRaycastVehicle::getWheelTransformWS( int wheelIndex ) const +{ + assert(wheelIndex < getNumWheels()); + const btWheelInfo& wheel = m_wheelInfo[wheelIndex]; + return wheel.m_worldTransform; + +} + +void btRaycastVehicle::updateWheelTransform( int wheelIndex , bool interpolatedTransform) +{ + + btWheelInfo& wheel = m_wheelInfo[ wheelIndex ]; + updateWheelTransformsWS(wheel,interpolatedTransform); + btVector3 up = -wheel.m_raycastInfo.m_wheelDirectionWS; + const btVector3& right = wheel.m_raycastInfo.m_wheelAxleWS; + btVector3 fwd = up.cross(right); + fwd = fwd.normalize(); +// up = right.cross(fwd); +// up.normalize(); + + //rotate around steering over de wheelAxleWS + btScalar steering = wheel.m_steering; + + btQuaternion steeringOrn(up,steering);//wheel.m_steering); + btMatrix3x3 steeringMat(steeringOrn); + + btQuaternion rotatingOrn(right,-wheel.m_rotation); + btMatrix3x3 rotatingMat(rotatingOrn); + + btMatrix3x3 basis2( + right[0],fwd[0],up[0], + right[1],fwd[1],up[1], + right[2],fwd[2],up[2] + ); + + wheel.m_worldTransform.setBasis(steeringMat * rotatingMat * basis2); + wheel.m_worldTransform.setOrigin( + wheel.m_raycastInfo.m_hardPointWS + wheel.m_raycastInfo.m_wheelDirectionWS * wheel.m_raycastInfo.m_suspensionLength + ); +} + +void btRaycastVehicle::resetSuspension() +{ + + int i; + for (i=0;igetMotionState())) + { + getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); + } + + wheel.m_raycastInfo.m_hardPointWS = chassisTrans( wheel.m_chassisConnectionPointCS ); + wheel.m_raycastInfo.m_wheelDirectionWS = chassisTrans.getBasis() * wheel.m_wheelDirectionCS ; + wheel.m_raycastInfo.m_wheelAxleWS = chassisTrans.getBasis() * wheel.m_wheelAxleCS; +} + +btScalar btRaycastVehicle::rayCast(btWheelInfo& wheel) +{ + updateWheelTransformsWS( wheel,false); + + + btScalar depth = -1; + + btScalar raylen = wheel.getSuspensionRestLength()+wheel.m_wheelsRadius; + + btVector3 rayvector = wheel.m_raycastInfo.m_wheelDirectionWS * (raylen); + const btVector3& source = wheel.m_raycastInfo.m_hardPointWS; + wheel.m_raycastInfo.m_contactPointWS = source + rayvector; + const btVector3& target = wheel.m_raycastInfo.m_contactPointWS; + + btScalar param = btScalar(0.); + + btVehicleRaycaster::btVehicleRaycasterResult rayResults; + + assert(m_vehicleRaycaster); + + void* object = m_vehicleRaycaster->castRay(source,target,rayResults); + + wheel.m_raycastInfo.m_groundObject = 0; + + if (object) + { + param = rayResults.m_distFraction; + depth = raylen * rayResults.m_distFraction; + wheel.m_raycastInfo.m_contactNormalWS = rayResults.m_hitNormalInWorld; + wheel.m_raycastInfo.m_isInContact = true; + + wheel.m_raycastInfo.m_groundObject = &s_fixedObject;//todo for driving on dynamic/movable objects!; + //wheel.m_raycastInfo.m_groundObject = object; + + + btScalar hitDistance = param*raylen; + wheel.m_raycastInfo.m_suspensionLength = hitDistance - wheel.m_wheelsRadius; + //clamp on max suspension travel + + btScalar minSuspensionLength = wheel.getSuspensionRestLength() - wheel.m_maxSuspensionTravelCm*btScalar(0.01); + btScalar maxSuspensionLength = wheel.getSuspensionRestLength()+ wheel.m_maxSuspensionTravelCm*btScalar(0.01); + if (wheel.m_raycastInfo.m_suspensionLength < minSuspensionLength) + { + wheel.m_raycastInfo.m_suspensionLength = minSuspensionLength; + } + if (wheel.m_raycastInfo.m_suspensionLength > maxSuspensionLength) + { + wheel.m_raycastInfo.m_suspensionLength = maxSuspensionLength; + } + + wheel.m_raycastInfo.m_contactPointWS = rayResults.m_hitPointInWorld; + + btScalar denominator= wheel.m_raycastInfo.m_contactNormalWS.dot( wheel.m_raycastInfo.m_wheelDirectionWS ); + + btVector3 chassis_velocity_at_contactPoint; + btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS-getRigidBody()->getCenterOfMassPosition(); + + chassis_velocity_at_contactPoint = getRigidBody()->getVelocityInLocalPoint(relpos); + + btScalar projVel = wheel.m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); + + if ( denominator >= btScalar(-0.1)) + { + wheel.m_suspensionRelativeVelocity = btScalar(0.0); + wheel.m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1); + } + else + { + btScalar inv = btScalar(-1.) / denominator; + wheel.m_suspensionRelativeVelocity = projVel * inv; + wheel.m_clippedInvContactDotSuspension = inv; + } + + } else + { + //put wheel info as in rest position + wheel.m_raycastInfo.m_suspensionLength = wheel.getSuspensionRestLength(); + wheel.m_suspensionRelativeVelocity = btScalar(0.0); + wheel.m_raycastInfo.m_contactNormalWS = - wheel.m_raycastInfo.m_wheelDirectionWS; + wheel.m_clippedInvContactDotSuspension = btScalar(1.0); + } + + return depth; +} + + +const btTransform& btRaycastVehicle::getChassisWorldTransform() const +{ + /*if (getRigidBody()->getMotionState()) + { + btTransform chassisWorldTrans; + getRigidBody()->getMotionState()->getWorldTransform(chassisWorldTrans); + return chassisWorldTrans; + } + */ + + + return getRigidBody()->getCenterOfMassTransform(); +} + + +void btRaycastVehicle::updateVehicle( btScalar step ) +{ + { + for (int i=0;igetLinearVelocity().length(); + + const btTransform& chassisTrans = getChassisWorldTransform(); + + btVector3 forwardW ( + chassisTrans.getBasis()[0][m_indexForwardAxis], + chassisTrans.getBasis()[1][m_indexForwardAxis], + chassisTrans.getBasis()[2][m_indexForwardAxis]); + + if (forwardW.dot(getRigidBody()->getLinearVelocity()) < btScalar(0.)) + { + m_currentVehicleSpeedKmHour *= btScalar(-1.); + } + + // + // simulate suspension + // + + int i=0; + for (i=0;i gMaxSuspensionForce) + { + suspensionForce = gMaxSuspensionForce; + } + btVector3 impulse = wheel.m_raycastInfo.m_contactNormalWS * suspensionForce * step; + btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS - getRigidBody()->getCenterOfMassPosition(); + + getRigidBody()->applyImpulse(impulse, relpos); + + } + + + + updateFriction( step); + + + for (i=0;igetCenterOfMassPosition(); + btVector3 vel = getRigidBody()->getVelocityInLocalPoint( relpos ); + + if (wheel.m_raycastInfo.m_isInContact) + { + const btTransform& chassisWorldTransform = getChassisWorldTransform(); + + btVector3 fwd ( + chassisWorldTransform.getBasis()[0][m_indexForwardAxis], + chassisWorldTransform.getBasis()[1][m_indexForwardAxis], + chassisWorldTransform.getBasis()[2][m_indexForwardAxis]); + + btScalar proj = fwd.dot(wheel.m_raycastInfo.m_contactNormalWS); + fwd -= wheel.m_raycastInfo.m_contactNormalWS * proj; + + btScalar proj2 = fwd.dot(vel); + + wheel.m_deltaRotation = (proj2 * step) / (wheel.m_wheelsRadius); + wheel.m_rotation += wheel.m_deltaRotation; + + } else + { + wheel.m_rotation += wheel.m_deltaRotation; + } + + wheel.m_deltaRotation *= btScalar(0.99);//damping of rotation when not in contact + + } + + + +} + + +void btRaycastVehicle::setSteeringValue(btScalar steering,int wheel) +{ + assert(wheel>=0 && wheel < getNumWheels()); + + btWheelInfo& wheelInfo = getWheelInfo(wheel); + wheelInfo.m_steering = steering; +} + + + +btScalar btRaycastVehicle::getSteeringValue(int wheel) const +{ + return getWheelInfo(wheel).m_steering; +} + + +void btRaycastVehicle::applyEngineForce(btScalar force, int wheel) +{ + assert(wheel>=0 && wheel < getNumWheels()); + btWheelInfo& wheelInfo = getWheelInfo(wheel); + wheelInfo.m_engineForce = force; +} + + +const btWheelInfo& btRaycastVehicle::getWheelInfo(int index) const +{ + btAssert((index >= 0) && (index < getNumWheels())); + + return m_wheelInfo[index]; +} + +btWheelInfo& btRaycastVehicle::getWheelInfo(int index) +{ + btAssert((index >= 0) && (index < getNumWheels())); + + return m_wheelInfo[index]; +} + +void btRaycastVehicle::setBrake(btScalar brake,int wheelIndex) +{ + btAssert((wheelIndex >= 0) && (wheelIndex < getNumWheels())); + getWheelInfo(wheelIndex).m_brake = brake; +} + + +void btRaycastVehicle::updateSuspension(btScalar deltaTime) +{ + (void)deltaTime; + + btScalar chassisMass = btScalar(1.) / m_chassisBody->getInvMass(); + + for (int w_it=0; w_itcomputeImpulseDenominator(frictionPosWorld,frictionDirectionWorld); + btScalar denom1 = body1->computeImpulseDenominator(frictionPosWorld,frictionDirectionWorld); + btScalar relaxation = 1.f; + m_jacDiagABInv = relaxation/(denom0+denom1); + } + + + +}; + +btScalar calcRollingFriction(btWheelContactPoint& contactPoint) +{ + + btScalar j1=0.f; + + const btVector3& contactPosWorld = contactPoint.m_frictionPositionWorld; + + btVector3 rel_pos1 = contactPosWorld - contactPoint.m_body0->getCenterOfMassPosition(); + btVector3 rel_pos2 = contactPosWorld - contactPoint.m_body1->getCenterOfMassPosition(); + + btScalar maxImpulse = contactPoint.m_maxImpulse; + + btVector3 vel1 = contactPoint.m_body0->getVelocityInLocalPoint(rel_pos1); + btVector3 vel2 = contactPoint.m_body1->getVelocityInLocalPoint(rel_pos2); + btVector3 vel = vel1 - vel2; + + btScalar vrel = contactPoint.m_frictionDirectionWorld.dot(vel); + + // calculate j that moves us to zero relative velocity + j1 = -vrel * contactPoint.m_jacDiagABInv; + GEN_set_min(j1, maxImpulse); + GEN_set_max(j1, -maxImpulse); + + return j1; +} + + + + +btScalar sideFrictionStiffness2 = btScalar(1.0); +void btRaycastVehicle::updateFriction(btScalar timeStep) +{ + + //calculate the impulse, so that the wheels don't move sidewards + int numWheel = getNumWheels(); + if (!numWheel) + return; + + + btVector3* forwardWS = new btVector3[numWheel]; + btVector3* axle = new btVector3[numWheel]; + btScalar* forwardImpulse = new btScalar[numWheel]; + btScalar* sideImpulse = new btScalar[numWheel]; + + int numWheelsOnGround = 0; + + + //collapse all those loops into one! + for (int i=0;i maximpSquared) + { + sliding = true; + + btScalar factor = maximp / btSqrt(impulseSquared); + + m_wheelInfo[wheel].m_skidInfo *= factor; + } + } + + } + } + + + + + if (sliding) + { + for (int wheel = 0;wheel < getNumWheels(); wheel++) + { + if (sideImpulse[wheel] != btScalar(0.)) + { + if (m_wheelInfo[wheel].m_skidInfo< btScalar(1.)) + { + forwardImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo; + sideImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo; + } + } + } + } + + // apply the impulses + { + for (int wheel = 0;wheelgetCenterOfMassPosition(); + + if (forwardImpulse[wheel] != btScalar(0.)) + { + m_chassisBody->applyImpulse(forwardWS[wheel]*(forwardImpulse[wheel]),rel_pos); + } + if (sideImpulse[wheel] != btScalar(0.)) + { + class btRigidBody* groundObject = (class btRigidBody*) m_wheelInfo[wheel].m_raycastInfo.m_groundObject; + + btVector3 rel_pos2 = wheelInfo.m_raycastInfo.m_contactPointWS - + groundObject->getCenterOfMassPosition(); + + + btVector3 sideImp = axle[wheel] * sideImpulse[wheel]; + + rel_pos[2] *= wheelInfo.m_rollInfluence; + m_chassisBody->applyImpulse(sideImp,rel_pos); + + //apply friction impulse on the ground + groundObject->applyImpulse(-sideImp,rel_pos2); + } + } + } + + delete []forwardWS; + delete [] axle; + delete[]forwardImpulse; + delete[] sideImpulse; +} + + +void* btDefaultVehicleRaycaster::castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) +{ +// RayResultCallback& resultCallback; + + btCollisionWorld::ClosestRayResultCallback rayCallback(from,to); + + m_dynamicsWorld->rayTest(from, to, rayCallback); + + if (rayCallback.HasHit()) + { + + btRigidBody* body = btRigidBody::upcast(rayCallback.m_collisionObject); + if (body) + { + result.m_hitPointInWorld = rayCallback.m_hitPointWorld; + result.m_hitNormalInWorld = rayCallback.m_hitNormalWorld; + result.m_hitNormalInWorld.normalize(); + result.m_distFraction = rayCallback.m_closestHitFraction; + return body; + } + } + return 0; +} diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h new file mode 100644 index 00000000000..f4249599615 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btRaycastVehicle.h @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies. + * Erwin Coumans makes no representations about the suitability + * of this software for any purpose. + * It is provided "as is" without express or implied warranty. +*/ +#ifndef RAYCASTVEHICLE_H +#define RAYCASTVEHICLE_H + +#include "../Dynamics/btRigidBody.h" +#include "../ConstraintSolver/btTypedConstraint.h" +#include "btVehicleRaycaster.h" +class btDynamicsWorld; +#include "../../LinearMath/btAlignedObjectArray.h" +#include "btWheelInfo.h" + +class btVehicleTuning; + +///rayCast vehicle, very special constraint that turn a rigidbody into a vehicle. +class btRaycastVehicle : public btTypedConstraint +{ +public: + class btVehicleTuning + { + public: + + btVehicleTuning() + :m_suspensionStiffness(btScalar(5.88)), + m_suspensionCompression(btScalar(0.83)), + m_suspensionDamping(btScalar(0.88)), + m_maxSuspensionTravelCm(btScalar(500.)), + m_frictionSlip(btScalar(10.5)) + { + } + btScalar m_suspensionStiffness; + btScalar m_suspensionCompression; + btScalar m_suspensionDamping; + btScalar m_maxSuspensionTravelCm; + btScalar m_frictionSlip; + + }; +private: + + btScalar m_tau; + btScalar m_damping; + btVehicleRaycaster* m_vehicleRaycaster; + btScalar m_pitchControl; + btScalar m_steeringValue; + btScalar m_currentVehicleSpeedKmHour; + + btRigidBody* m_chassisBody; + + int m_indexRightAxis; + int m_indexUpAxis; + int m_indexForwardAxis; + + void defaultInit(const btVehicleTuning& tuning); + +public: + + //constructor to create a car from an existing rigidbody + btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster ); + + virtual ~btRaycastVehicle() ; + + + const btTransform& getChassisWorldTransform() const; + + btScalar rayCast(btWheelInfo& wheel); + + virtual void updateVehicle(btScalar step); + + void resetSuspension(); + + btScalar getSteeringValue(int wheel) const; + + void setSteeringValue(btScalar steering,int wheel); + + + void applyEngineForce(btScalar force, int wheel); + + const btTransform& getWheelTransformWS( int wheelIndex ) const; + + void updateWheelTransform( int wheelIndex, bool interpolatedTransform = true ); + + void setRaycastWheelInfo( int wheelIndex , bool isInContact, const btVector3& hitPoint, const btVector3& hitNormal,btScalar depth); + + btWheelInfo& addWheel( const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspensionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel); + + inline int getNumWheels() const { + return int (m_wheelInfo.size()); + } + + btAlignedObjectArray m_wheelInfo; + + + const btWheelInfo& getWheelInfo(int index) const; + + btWheelInfo& getWheelInfo(int index); + + void updateWheelTransformsWS(btWheelInfo& wheel , bool interpolatedTransform = true); + + + void setBrake(btScalar brake,int wheelIndex); + + void setPitchControl(btScalar pitch) + { + m_pitchControl = pitch; + } + + void updateSuspension(btScalar deltaTime); + + void updateFriction(btScalar timeStep); + + + + inline btRigidBody* getRigidBody() + { + return m_chassisBody; + } + + const btRigidBody* getRigidBody() const + { + return m_chassisBody; + } + + inline int getRightAxis() const + { + return m_indexRightAxis; + } + inline int getUpAxis() const + { + return m_indexUpAxis; + } + + inline int getForwardAxis() const + { + return m_indexForwardAxis; + } + + + ///Worldspace forward vector + btVector3 getForwardVector() const + { + const btTransform& chassisTrans = getChassisWorldTransform(); + + btVector3 forwardW ( + chassisTrans.getBasis()[0][m_indexForwardAxis], + chassisTrans.getBasis()[1][m_indexForwardAxis], + chassisTrans.getBasis()[2][m_indexForwardAxis]); + + return forwardW; + } + + ///Velocity of vehicle (positive if velocity vector has same direction as foward vector) + btScalar getCurrentSpeedKmHour() const + { + return m_currentVehicleSpeedKmHour; + } + + virtual void setCoordinateSystem(int rightIndex,int upIndex,int forwardIndex) + { + m_indexRightAxis = rightIndex; + m_indexUpAxis = upIndex; + m_indexForwardAxis = forwardIndex; + } + + virtual void buildJacobian() + { + //not yet + } + + virtual void solveConstraint(btScalar timeStep) + { + (void)timeStep; + //not yet + } + + +}; + +class btDefaultVehicleRaycaster : public btVehicleRaycaster +{ + btDynamicsWorld* m_dynamicsWorld; +public: + btDefaultVehicleRaycaster(btDynamicsWorld* world) + :m_dynamicsWorld(world) + { + } + + virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result); + +}; + + +#endif //RAYCASTVEHICLE_H + diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h b/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h new file mode 100644 index 00000000000..64a47fcaada --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btVehicleRaycaster.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies. + * Erwin Coumans makes no representations about the suitability + * of this software for any purpose. + * It is provided "as is" without express or implied warranty. +*/ +#ifndef VEHICLE_RAYCASTER_H +#define VEHICLE_RAYCASTER_H + +#include "../../LinearMath/btVector3.h" + +/// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting +struct btVehicleRaycaster +{ +virtual ~btVehicleRaycaster() +{ +} + struct btVehicleRaycasterResult + { + btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; + btVector3 m_hitPointInWorld; + btVector3 m_hitNormalInWorld; + btScalar m_distFraction; + }; + + virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0; + +}; + +#endif //VEHICLE_RAYCASTER_H + diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp new file mode 100644 index 00000000000..ef93c16fffc --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.cpp @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies. + * Erwin Coumans makes no representations about the suitability + * of this software for any purpose. + * It is provided "as is" without express or implied warranty. +*/ +#include "btWheelInfo.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" // for pointvelocity + + +btScalar btWheelInfo::getSuspensionRestLength() const +{ + + return m_suspensionRestLength1; + +} + +void btWheelInfo::updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo) +{ + (void)raycastInfo; + + + if (m_raycastInfo.m_isInContact) + + { + btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS ); + btVector3 chassis_velocity_at_contactPoint; + btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition(); + chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos ); + btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint ); + if ( project >= btScalar(-0.1)) + { + m_suspensionRelativeVelocity = btScalar(0.0); + m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1); + } + else + { + btScalar inv = btScalar(-1.) / project; + m_suspensionRelativeVelocity = projVel * inv; + m_clippedInvContactDotSuspension = inv; + } + + } + + else // Not in contact : position wheel in a nice (rest length) position + { + m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength(); + m_suspensionRelativeVelocity = btScalar(0.0); + m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS; + m_clippedInvContactDotSuspension = btScalar(1.0); + } +} diff --git a/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h new file mode 100644 index 00000000000..2e349b3fde4 --- /dev/null +++ b/extern/bullet2/src/BulletDynamics/Vehicle/btWheelInfo.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/ + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies. + * Erwin Coumans makes no representations about the suitability + * of this software for any purpose. + * It is provided "as is" without express or implied warranty. +*/ +#ifndef WHEEL_INFO_H +#define WHEEL_INFO_H + +#include "../../LinearMath/btVector3.h" +#include "../../LinearMath/btTransform.h" + +class btRigidBody; + +struct btWheelInfoConstructionInfo +{ + btVector3 m_chassisConnectionCS; + btVector3 m_wheelDirectionCS; + btVector3 m_wheelAxleCS; + btScalar m_suspensionRestLength; + btScalar m_maxSuspensionTravelCm; + btScalar m_wheelRadius; + + btScalar m_suspensionStiffness; + btScalar m_wheelsDampingCompression; + btScalar m_wheelsDampingRelaxation; + btScalar m_frictionSlip; + bool m_bIsFrontWheel; + +}; + +/// btWheelInfo contains information per wheel about friction and suspension. +struct btWheelInfo +{ + struct RaycastInfo + { + //set by raycaster + btVector3 m_contactNormalWS;//contactnormal + btVector3 m_contactPointWS;//raycast hitpoint + btScalar m_suspensionLength; + btVector3 m_hardPointWS;//raycast starting point + btVector3 m_wheelDirectionWS; //direction in worldspace + btVector3 m_wheelAxleWS; // axle in worldspace + bool m_isInContact; + void* m_groundObject; //could be general void* ptr + }; + + RaycastInfo m_raycastInfo; + + btTransform m_worldTransform; + + btVector3 m_chassisConnectionPointCS; //const + btVector3 m_wheelDirectionCS;//const + btVector3 m_wheelAxleCS; // const or modified by steering + btScalar m_suspensionRestLength1;//const + btScalar m_maxSuspensionTravelCm; + btScalar getSuspensionRestLength() const; + btScalar m_wheelsRadius;//const + btScalar m_suspensionStiffness;//const + btScalar m_wheelsDampingCompression;//const + btScalar m_wheelsDampingRelaxation;//const + btScalar m_frictionSlip; + btScalar m_steering; + btScalar m_rotation; + btScalar m_deltaRotation; + btScalar m_rollInfluence; + + btScalar m_engineForce; + + btScalar m_brake; + + bool m_bIsFrontWheel; + + void* m_clientInfo;//can be used to store pointer to sync transforms... + + btWheelInfo(btWheelInfoConstructionInfo& ci) + + { + + m_suspensionRestLength1 = ci.m_suspensionRestLength; + m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm; + + m_wheelsRadius = ci.m_wheelRadius; + m_suspensionStiffness = ci.m_suspensionStiffness; + m_wheelsDampingCompression = ci.m_wheelsDampingCompression; + m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation; + m_chassisConnectionPointCS = ci.m_chassisConnectionCS; + m_wheelDirectionCS = ci.m_wheelDirectionCS; + m_wheelAxleCS = ci.m_wheelAxleCS; + m_frictionSlip = ci.m_frictionSlip; + m_steering = btScalar(0.); + m_engineForce = btScalar(0.); + m_rotation = btScalar(0.); + m_deltaRotation = btScalar(0.); + m_brake = btScalar(0.); + m_rollInfluence = btScalar(0.1); + m_bIsFrontWheel = ci.m_bIsFrontWheel; + + } + + void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo); + + btScalar m_clippedInvContactDotSuspension; + btScalar m_suspensionRelativeVelocity; + //calculated by suspension + btScalar m_wheelsSuspensionForce; + btScalar m_skidInfo; + +}; + +#endif //WHEEL_INFO_H + diff --git a/extern/bullet2/src/CMakeLists.txt b/extern/bullet2/src/CMakeLists.txt new file mode 100644 index 00000000000..0ae1a7ab6ab --- /dev/null +++ b/extern/bullet2/src/CMakeLists.txt @@ -0,0 +1 @@ +SUBDIRS( BulletCollision BulletDynamics LinearMath ) diff --git a/extern/bullet2/src/LinearMath/CMakeLists.txt b/extern/bullet2/src/LinearMath/CMakeLists.txt new file mode 100644 index 00000000000..207eed94a3e --- /dev/null +++ b/extern/bullet2/src/LinearMath/CMakeLists.txt @@ -0,0 +1,10 @@ + +INCLUDE_DIRECTORIES( +${BULLET_PHYSICS_SOURCE_DIR}/src } +) + +ADD_LIBRARY(LibLinearMath +btQuickprof.cpp +btGeometryUtil.cpp +) + diff --git a/extern/bullet2/src/LinearMath/btAabbUtil2.h b/extern/bullet2/src/LinearMath/btAabbUtil2.h new file mode 100644 index 00000000000..429163c8138 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btAabbUtil2.h @@ -0,0 +1,127 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef AABB_UTIL2 +#define AABB_UTIL2 + +#include "btVector3.h" +#include "btSimdMinMax.h" + + +#define btMin(a,b) ((a < b ? a : b)) +#define btMax(a,b) ((a > b ? a : b)) + + +/// conservative test for overlap between two aabbs +SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1, + const btVector3 &aabbMin2, const btVector3 &aabbMax2) +{ + bool overlap = true; + overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap; + overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap; + overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap; + return overlap; +} + +/// conservative test for overlap between triangle and aabb +SIMD_FORCE_INLINE bool TestTriangleAgainstAabb2(const btVector3 *vertices, + const btVector3 &aabbMin, const btVector3 &aabbMax) +{ + const btVector3 &p1 = vertices[0]; + const btVector3 &p2 = vertices[1]; + const btVector3 &p3 = vertices[2]; + + if (btMin(btMin(p1[0], p2[0]), p3[0]) > aabbMax[0]) return false; + if (btMax(btMax(p1[0], p2[0]), p3[0]) < aabbMin[0]) return false; + + if (btMin(btMin(p1[2], p2[2]), p3[2]) > aabbMax[2]) return false; + if (btMax(btMax(p1[2], p2[2]), p3[2]) < aabbMin[2]) return false; + + if (btMin(btMin(p1[1], p2[1]), p3[1]) > aabbMax[1]) return false; + if (btMax(btMax(p1[1], p2[1]), p3[1]) < aabbMin[1]) return false; + return true; +} + + +SIMD_FORCE_INLINE int btOutcode(const btVector3& p,const btVector3& halfExtent) +{ + return (p.getX() < -halfExtent.getX() ? 0x01 : 0x0) | + (p.getX() > halfExtent.getX() ? 0x08 : 0x0) | + (p.getY() < -halfExtent.getY() ? 0x02 : 0x0) | + (p.getY() > halfExtent.getY() ? 0x10 : 0x0) | + (p.getZ() < -halfExtent.getZ() ? 0x4 : 0x0) | + (p.getZ() > halfExtent.getZ() ? 0x20 : 0x0); +} + + +SIMD_FORCE_INLINE bool btRayAabb(const btVector3& rayFrom, + const btVector3& rayTo, + const btVector3& aabbMin, + const btVector3& aabbMax, + btScalar& param, btVector3& normal) +{ + btVector3 aabbHalfExtent = (aabbMax-aabbMin)* btScalar(0.5); + btVector3 aabbCenter = (aabbMax+aabbMin)* btScalar(0.5); + btVector3 source = rayFrom - aabbCenter; + btVector3 target = rayTo - aabbCenter; + int sourceOutcode = btOutcode(source,aabbHalfExtent); + int targetOutcode = btOutcode(target,aabbHalfExtent); + if ((sourceOutcode & targetOutcode) == 0x0) + { + btScalar lambda_enter = btScalar(0.0); + btScalar lambda_exit = param; + btVector3 r = target - source; + int i; + btScalar normSign = 1; + btVector3 hitNormal(0,0,0); + int bit=1; + + for (int j=0;j<2;j++) + { + for (i = 0; i != 3; ++i) + { + if (sourceOutcode & bit) + { + btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i]; + if (lambda_enter <= lambda) + { + lambda_enter = lambda; + hitNormal.setValue(0,0,0); + hitNormal[i] = normSign; + } + } + else if (targetOutcode & bit) + { + btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i]; + btSetMin(lambda_exit, lambda); + } + bit<<=1; + } + normSign = btScalar(-1.); + } + if (lambda_enter <= lambda_exit) + { + param = lambda_enter; + normal = hitNormal; + return true; + } + } + return false; +} + + +#endif + diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp new file mode 100644 index 00000000000..1f5877fa37e --- /dev/null +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.cpp @@ -0,0 +1,70 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#include "btAlignedAllocator.h" + + +#if defined (BT_HAS_ALIGNED_ALOCATOR) + +#include +void* btAlignedAlloc (int size, int alignment) +{ + return _aligned_malloc(size,alignment); +} + +void btAlignedFree (void* ptr) +{ + _aligned_free(ptr); +} + +#else + +#ifdef __CELLOS_LV2__ + +#include + +int numAllocs = 0; +int numFree = 0; + +void* btAlignedAlloc (int size, int alignment) +{ + numAllocs++; + return memalign(alignment, size); +} + +void btAlignedFree (void* ptr) +{ + numFree++; + free(ptr); +} + +#else +///todo +///will add some multi-platform version that works without _aligned_malloc/_aligned_free + +void* btAlignedAlloc (int size, int alignment) +{ + return new char[size]; +} + +void btAlignedFree (void* ptr) +{ + delete [] (char*) ptr; +} +#endif // + +#endif + + diff --git a/extern/bullet2/src/LinearMath/btAlignedAllocator.h b/extern/bullet2/src/LinearMath/btAlignedAllocator.h new file mode 100644 index 00000000000..07585717f45 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btAlignedAllocator.h @@ -0,0 +1,80 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_ALIGNED_ALLOCATOR +#define BT_ALIGNED_ALLOCATOR + +///we probably replace this with our own aligned memory allocator +///so we replace _aligned_malloc and _aligned_free with our own +///that is better portable and more predictable + +#include "btScalar.h" + +void* btAlignedAlloc (int size, int alignment); + +void btAlignedFree (void* ptr); + + +typedef int size_type; + + +template < typename T , unsigned Alignment > +class btAlignedAllocator { + + typedef btAlignedAllocator< T , Alignment > self_type; + +public: + + //just going down a list: + btAlignedAllocator() {} + /* + btAlignedAllocator( const self_type & ) {} + */ + + template < typename Other > + btAlignedAllocator( const btAlignedAllocator< Other , Alignment > & ) {} + + typedef const T* const_pointer; + typedef const T& const_reference; + typedef T* pointer; + typedef T& reference; + typedef T value_type; + + pointer address ( reference ref ) const { return &ref; } + const_pointer address ( const_reference ref ) const { return &ref; } + pointer allocate ( size_type n , const_pointer * hint = 0 ) { + (void)hint; + return reinterpret_cast< pointer >(btAlignedAlloc( sizeof(value_type) * n , Alignment )); + } + void construct ( pointer ptr , const value_type & value ) { new (ptr) value_type( value ); } + void deallocate( pointer ptr ) { + btAlignedFree( reinterpret_cast< void * >( ptr ) ); + } + void destroy ( pointer ptr ) { ptr->~value_type(); } + + + template < typename O > struct rebind { + typedef btAlignedAllocator< O , Alignment > other; + }; + template < typename O > + self_type & operator=( const btAlignedAllocator< O , Alignment > & ) { return *this; } + + friend bool operator==( const self_type & , const self_type & ) { return true; } +}; + + + +#endif //BT_ALIGNED_ALLOCATOR + diff --git a/extern/bullet2/src/LinearMath/btAlignedObjectArray.h b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h new file mode 100644 index 00000000000..8bef5eb5d06 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btAlignedObjectArray.h @@ -0,0 +1,367 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef BT_OBJECT_ARRAY__ +#define BT_OBJECT_ARRAY__ + +#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE +#include "btAlignedAllocator.h" + +///If the platform doesn't support placement new, you can disable BT_USE_PLACEMENT_NEW +///then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors +///You can enable BT_USE_MEMCPY, then swapping elements in the array will use memcpy instead of operator= +///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231 and +///http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1240 + +#define BT_USE_PLACEMENT_NEW 1 +//#define BT_USE_MEMCPY 1 //disable, because it is cumbersome to find out for each platform where memcpy is defined. It can be in or or otherwise... + +#ifdef BT_USE_MEMCPY +#include +#include +#endif //BT_USE_MEMCPY + +#ifdef BT_USE_PLACEMENT_NEW +#include //for placement new +#endif //BT_USE_PLACEMENT_NEW + + +///btAlignedObjectArray uses a subset of the stl::vector interface for its methods +///It is developed to replace stl::vector to avoid STL alignment issues to add SIMD/SSE data +template +//template +class btAlignedObjectArray +{ + btAlignedAllocator m_allocator; + + int m_size; + int m_capacity; + T* m_data; + + protected: + SIMD_FORCE_INLINE int allocSize(int size) + { + return (size ? size*2 : 1); + } + SIMD_FORCE_INLINE void copy(int start,int end, T* dest) + { + int i; + for (i=start;i size()) + { + reserve(newsize); + } +#ifdef BT_USE_PLACEMENT_NEW + for (int i=curSize;i + void downHeap(T *pArr, int k, int n,L CompareFunc) + { + /* PRE: a[k+1..N] is a heap */ + /* POST: a[k..N] is a heap */ + + T temp = pArr[k - 1]; + /* k has child(s) */ + while (k <= n/2) + { + int child = 2*k; + + if ((child < n) && CompareFunc(pArr[child - 1] , pArr[child])) + { + child++; + } + /* pick larger child */ + if (CompareFunc(temp , pArr[child - 1])) + { + /* move child up */ + pArr[k - 1] = pArr[child - 1]; + k = child; + } + else + { + break; + } + } + pArr[k - 1] = temp; + } /*downHeap*/ + + void swap(int index0,int index1) + { +#ifdef BT_USE_MEMCPY + char temp[sizeof(T)]; + memcpy(temp,&m_data[index0],sizeof(T)); + memcpy(&m_data[index0],&m_data[index1],sizeof(T)); + memcpy(&m_data[index1],temp,sizeof(T)); +#else + T temp = m_data[index0]; + m_data[index0] = m_data[index1]; + m_data[index1] = temp; +#endif //BT_USE_PLACEMENT_NEW + + } + + template + void heapSort(L CompareFunc) + { + /* sort a[0..N-1], N.B. 0 to N-1 */ + int k; + int n = m_size; + for (k = n/2; k > 0; k--) + { + downHeap(m_data, k, n, CompareFunc); + } + + /* a[1..N] is now a heap */ + while ( n>=1 ) + { + swap(0,n-1); /* largest of a[0..n-1] */ + + + n = n - 1; + /* restore a[1..i-1] heap */ + downHeap(m_data, 1, n, CompareFunc); + } + } + + ///non-recursive binary search, assumes sorted array + int findBinarySearch(const T& key) const + { + int first = 0; + int last = size(); + + //assume sorted array + while (first <= last) { + int mid = (first + last) / 2; // compute mid point. + if (key > m_data[mid]) + first = mid + 1; // repeat search in top half. + else if (key < m_data[mid]) + last = mid - 1; // repeat search in bottom half. + else + return mid; // found it. return position ///// + } + return size(); // failed to find key + } + + + int findLinearSearch(const T& key) const + { + int index=size(); + int i; + + for (i=0;i& planeEquations, const btVector3& point, btScalar margin) +{ + int numbrushes = planeEquations.size(); + for (int i=0;ibtScalar(0.)) + { + return false; + } + } + return true; + +} + + +bool btGeometryUtil::areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin) +{ + int numvertices = vertices.size(); + for (int i=0;ibtScalar(0.)) + { + return false; + } + } + return true; +} + +bool notExist(const btVector3& planeEquation,const btAlignedObjectArray& planeEquations) +{ + int numbrushes = planeEquations.size(); + for (int i=0;i btScalar(0.999)) + { + return false; + } + } + return true; +} + +void btGeometryUtil::getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ) +{ + const int numvertices = vertices.size(); + // brute force: + for (int i=0;i btScalar(0.0001)) + { + planeEquation.normalize(); + if (notExist(planeEquation,planeEquationsOut)) + { + planeEquation[3] = -planeEquation.dot(N1); + + //check if inside, and replace supportingVertexOut if needed + if (areVerticesBehindPlane(planeEquation,vertices,btScalar(0.01))) + { + planeEquationsOut.push_back(planeEquation); + } + } + } + normalSign = btScalar(-1.); + } + + } + } + } + +} + +void btGeometryUtil::getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ) +{ + const int numbrushes = planeEquations.size(); + // brute force: + for (int i=0;i btScalar(0.0001) ) && + ( n3n1.length2() > btScalar(0.0001) ) && + ( n1n2.length2() > btScalar(0.0001) ) ) + { + //point P out of 3 plane equations: + + // d1 ( N2 * N3 ) + d2 ( N3 * N1 ) + d3 ( N1 * N2 ) + //P = ------------------------------------------------------------------------- + // N1 . ( N2 * N3 ) + + + btScalar quotient = (N1.dot(n2n3)); + if (btFabs(quotient) > btScalar(0.000001)) + { + quotient = btScalar(-1.) / quotient; + n2n3 *= N1[3]; + n3n1 *= N2[3]; + n1n2 *= N3[3]; + btVector3 potentialVertex = n2n3; + potentialVertex += n3n1; + potentialVertex += n1n2; + potentialVertex *= quotient; + + //check if inside, and replace supportingVertexOut if needed + if (isPointInsidePlanes(planeEquations,potentialVertex,btScalar(0.01))) + { + verticesOut.push_back(potentialVertex); + } + } + } + } + } + } +} + diff --git a/extern/bullet2/src/LinearMath/btGeometryUtil.h b/extern/bullet2/src/LinearMath/btGeometryUtil.h new file mode 100644 index 00000000000..766cd75c383 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btGeometryUtil.h @@ -0,0 +1,41 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef BT_GEOMETRY_UTIL_H +#define BT_GEOMETRY_UTIL_H + +#include "btVector3.h" +#include "btAlignedObjectArray.h" + +class btGeometryUtil +{ + public: + + + static void getPlaneEquationsFromVertices(btAlignedObjectArray& vertices, btAlignedObjectArray& planeEquationsOut ); + + static void getVerticesFromPlaneEquations(const btAlignedObjectArray& planeEquations , btAlignedObjectArray& verticesOut ); + + static bool isInside(const btAlignedObjectArray& vertices, const btVector3& planeNormal, btScalar margin); + + static bool isPointInsidePlanes(const btAlignedObjectArray& planeEquations, const btVector3& point, btScalar margin); + + static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray& vertices, btScalar margin); + +}; + + +#endif //BT_GEOMETRY_UTIL_H + diff --git a/extern/bullet2/src/LinearMath/btIDebugDraw.h b/extern/bullet2/src/LinearMath/btIDebugDraw.h new file mode 100644 index 00000000000..5f40ca39157 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btIDebugDraw.h @@ -0,0 +1,100 @@ +/* +Copyright (c) 2005 Gino van den Bergen / Erwin Coumans http://continuousphysics.com + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +*/ + + +#ifndef IDEBUG_DRAW__H +#define IDEBUG_DRAW__H + +#include "btVector3.h" + + +class btIDebugDraw +{ + public: + + enum DebugDrawModes + { + DBG_NoDebug=0, + DBG_DrawWireframe = 1, + DBG_DrawAabb=2, + DBG_DrawFeaturesText=4, + DBG_DrawContactPoints=8, + DBG_NoDeactivation=16, + DBG_NoHelpText = 32, + DBG_DrawText=64, + DBG_ProfileTimings = 128, + DBG_EnableSatComparison = 256, + DBG_DisableBulletLCP = 512, + DBG_EnableCCD = 1024, + DBG_MAX_DEBUG_DRAW_MODE + }; + + virtual ~btIDebugDraw() {}; + + virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)=0; + + virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)=0; + + virtual void reportErrorWarning(const char* warningString) = 0; + + virtual void setDebugMode(int debugMode) =0; + + virtual int getDebugMode() const = 0; + + inline void drawAabb(const btVector3& from,const btVector3& to,const btVector3& color) + { + + btVector3 halfExtents = (to-from)* 0.5f; + btVector3 center = (to+from) *0.5f; + int i,j; + + btVector3 edgecoord(1.f,1.f,1.f),pa,pb; + for (i=0;i<4;i++) + { + for (j=0;j<3;j++) + { + pa = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], + edgecoord[2]*halfExtents[2]); + pa+=center; + + int othercoord = j%3; + edgecoord[othercoord]*=-1.f; + pb = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1], + edgecoord[2]*halfExtents[2]); + pb+=center; + + drawLine(pa,pb,color); + } + edgecoord = btVector3(-1.f,-1.f,-1.f); + if (i<3) + edgecoord[i]*=-1.f; + } + } +}; + + +#endif //IDEBUG_DRAW__H + diff --git a/extern/bullet2/src/LinearMath/btList.h b/extern/bullet2/src/LinearMath/btList.h new file mode 100644 index 00000000000..c87b47faf2b --- /dev/null +++ b/extern/bullet2/src/LinearMath/btList.h @@ -0,0 +1,73 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef GEN_LIST_H +#define GEN_LIST_H + +class btGEN_Link { +public: + btGEN_Link() : m_next(0), m_prev(0) {} + btGEN_Link(btGEN_Link *next, btGEN_Link *prev) : m_next(next), m_prev(prev) {} + + btGEN_Link *getNext() const { return m_next; } + btGEN_Link *getPrev() const { return m_prev; } + + bool isHead() const { return m_prev == 0; } + bool isTail() const { return m_next == 0; } + + void insertBefore(btGEN_Link *link) { + m_next = link; + m_prev = link->m_prev; + m_next->m_prev = this; + m_prev->m_next = this; + } + + void insertAfter(btGEN_Link *link) { + m_next = link->m_next; + m_prev = link; + m_next->m_prev = this; + m_prev->m_next = this; + } + + void remove() { + m_next->m_prev = m_prev; + m_prev->m_next = m_next; + } + +private: + btGEN_Link *m_next; + btGEN_Link *m_prev; +}; + +class btGEN_List { +public: + btGEN_List() : m_head(&m_tail, 0), m_tail(0, &m_head) {} + + btGEN_Link *getHead() const { return m_head.getNext(); } + btGEN_Link *getTail() const { return m_tail.getPrev(); } + + void addHead(btGEN_Link *link) { link->insertAfter(&m_head); } + void addTail(btGEN_Link *link) { link->insertBefore(&m_tail); } + +private: + btGEN_Link m_head; + btGEN_Link m_tail; +}; + +#endif + + + diff --git a/extern/bullet2/src/LinearMath/btMatrix3x3.h b/extern/bullet2/src/LinearMath/btMatrix3x3.h new file mode 100644 index 00000000000..94f53c3c0a5 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btMatrix3x3.h @@ -0,0 +1,410 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef btMatrix3x3_H +#define btMatrix3x3_H + +#include "btScalar.h" + +#include "btVector3.h" +#include "btQuaternion.h" + + +class btMatrix3x3 { + public: + btMatrix3x3 () {} + +// explicit btMatrix3x3(const btScalar *m) { setFromOpenGLSubMatrix(m); } + + explicit btMatrix3x3(const btQuaternion& q) { setRotation(q); } + /* + template + Matrix3x3(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) + { + setEulerYPR(yaw, pitch, roll); + } + */ + btMatrix3x3(const btScalar& xx, const btScalar& xy, const btScalar& xz, + const btScalar& yx, const btScalar& yy, const btScalar& yz, + const btScalar& zx, const btScalar& zy, const btScalar& zz) + { + setValue(xx, xy, xz, + yx, yy, yz, + zx, zy, zz); + } + + SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other) + { + m_el[0] = other.m_el[0]; + m_el[1] = other.m_el[1]; + m_el[2] = other.m_el[2]; + } + + SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other) + { + m_el[0] = other.m_el[0]; + m_el[1] = other.m_el[1]; + m_el[2] = other.m_el[2]; + return *this; + } + + SIMD_FORCE_INLINE btVector3 getColumn(int i) const + { + return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]); + } + + + + SIMD_FORCE_INLINE const btVector3& getRow(int i) const + { + return m_el[i]; + } + + + SIMD_FORCE_INLINE btVector3& operator[](int i) + { + btFullAssert(0 <= i && i < 3); + return m_el[i]; + } + + SIMD_FORCE_INLINE const btVector3& operator[](int i) const + { + btFullAssert(0 <= i && i < 3); + return m_el[i]; + } + + btMatrix3x3& operator*=(const btMatrix3x3& m); + + + void setFromOpenGLSubMatrix(const btScalar *m) + { + m_el[0].setValue(m[0],m[4],m[8]); + m_el[1].setValue(m[1],m[5],m[9]); + m_el[2].setValue(m[2],m[6],m[10]); + + } + + void setValue(const btScalar& xx, const btScalar& xy, const btScalar& xz, + const btScalar& yx, const btScalar& yy, const btScalar& yz, + const btScalar& zx, const btScalar& zy, const btScalar& zz) + { + m_el[0].setValue(xx,xy,xz); + m_el[1].setValue(yx,yy,yz); + m_el[2].setValue(zx,zy,zz); + } + + void setRotation(const btQuaternion& q) + { + btScalar d = q.length2(); + btFullAssert(d != btScalar(0.0)); + btScalar s = btScalar(2.0) / d; + btScalar xs = q.x() * s, ys = q.y() * s, zs = q.z() * s; + btScalar wx = q.w() * xs, wy = q.w() * ys, wz = q.w() * zs; + btScalar xx = q.x() * xs, xy = q.x() * ys, xz = q.x() * zs; + btScalar yy = q.y() * ys, yz = q.y() * zs, zz = q.z() * zs; + setValue(btScalar(1.0) - (yy + zz), xy - wz, xz + wy, + xy + wz, btScalar(1.0) - (xx + zz), yz - wx, + xz - wy, yz + wx, btScalar(1.0) - (xx + yy)); + } + + + + void setEulerYPR(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) + { + + btScalar cy(btCos(yaw)); + btScalar sy(btSin(yaw)); + btScalar cp(btCos(pitch)); + btScalar sp(btSin(pitch)); + btScalar cr(btCos(roll)); + btScalar sr(btSin(roll)); + btScalar cc = cy * cr; + btScalar cs = cy * sr; + btScalar sc = sy * cr; + btScalar ss = sy * sr; + setValue(cc - sp * ss, -cs - sp * sc, -sy * cp, + cp * sr, cp * cr, -sp, + sc + sp * cs, -ss + sp * cc, cy * cp); + + } + + /** + * setEulerZYX + * @param euler a const reference to a btVector3 of euler angles + * These angles are used to produce a rotation matrix. The euler + * angles are applied in ZYX order. I.e a vector is first rotated + * about X then Y and then Z + **/ + + void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) { + btScalar ci ( btCos(eulerX)); + btScalar cj ( btCos(eulerY)); + btScalar ch ( btCos(eulerZ)); + btScalar si ( btSin(eulerX)); + btScalar sj ( btSin(eulerY)); + btScalar sh ( btSin(eulerZ)); + btScalar cc = ci * ch; + btScalar cs = ci * sh; + btScalar sc = si * ch; + btScalar ss = si * sh; + + setValue(cj * ch, sj * sc - cs, sj * cc + ss, + cj * sh, sj * ss + cc, sj * cs - sc, + -sj, cj * si, cj * ci); + } + + void setIdentity() + { + setValue(btScalar(1.0), btScalar(0.0), btScalar(0.0), + btScalar(0.0), btScalar(1.0), btScalar(0.0), + btScalar(0.0), btScalar(0.0), btScalar(1.0)); + } + + void getOpenGLSubMatrix(btScalar *m) const + { + m[0] = btScalar(m_el[0].x()); + m[1] = btScalar(m_el[1].x()); + m[2] = btScalar(m_el[2].x()); + m[3] = btScalar(0.0); + m[4] = btScalar(m_el[0].y()); + m[5] = btScalar(m_el[1].y()); + m[6] = btScalar(m_el[2].y()); + m[7] = btScalar(0.0); + m[8] = btScalar(m_el[0].z()); + m[9] = btScalar(m_el[1].z()); + m[10] = btScalar(m_el[2].z()); + m[11] = btScalar(0.0); + } + + void getRotation(btQuaternion& q) const + { + btScalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z(); + btScalar temp[4]; + + if (trace > btScalar(0.0)) + { + btScalar s = btSqrt(trace + btScalar(1.0)); + temp[3]=(s * btScalar(0.5)); + s = btScalar(0.5) / s; + + temp[0]=((m_el[2].y() - m_el[1].z()) * s); + temp[1]=((m_el[0].z() - m_el[2].x()) * s); + temp[2]=((m_el[1].x() - m_el[0].y()) * s); + } + else + { + int i = m_el[0].x() < m_el[1].y() ? + (m_el[1].y() < m_el[2].z() ? 2 : 1) : + (m_el[0].x() < m_el[2].z() ? 2 : 0); + int j = (i + 1) % 3; + int k = (i + 2) % 3; + + btScalar s = btSqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + btScalar(1.0)); + temp[i] = s * btScalar(0.5); + s = btScalar(0.5) / s; + + temp[3] = (m_el[k][j] - m_el[j][k]) * s; + temp[j] = (m_el[j][i] + m_el[i][j]) * s; + temp[k] = (m_el[k][i] + m_el[i][k]) * s; + } + q.setValue(temp[0],temp[1],temp[2],temp[3]); + } + + void getEuler(btScalar& yaw, btScalar& pitch, btScalar& roll) const + { + + if (btScalar(m_el[1].z()) < btScalar(1)) + { + if (btScalar(m_el[1].z()) > -btScalar(1)) + { + yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x())); + pitch = btScalar(btAsin(-m_el[1].y())); + roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z())); + } + else + { + yaw = btScalar(-btAtan2(-m_el[0].y(), m_el[0].z())); + pitch = SIMD_HALF_PI; + roll = btScalar(0.0); + } + } + else + { + yaw = btScalar(btAtan2(-m_el[0].y(), m_el[0].z())); + pitch = -SIMD_HALF_PI; + roll = btScalar(0.0); + } + } + + + + + btMatrix3x3 scaled(const btVector3& s) const + { + return btMatrix3x3(m_el[0].x() * s.x(), m_el[0].y() * s.y(), m_el[0].z() * s.z(), + m_el[1].x() * s.x(), m_el[1].y() * s.y(), m_el[1].z() * s.z(), + m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z()); + } + + btScalar determinant() const; + btMatrix3x3 adjoint() const; + btMatrix3x3 absolute() const; + btMatrix3x3 transpose() const; + btMatrix3x3 inverse() const; + + btMatrix3x3 transposeTimes(const btMatrix3x3& m) const; + btMatrix3x3 timesTranspose(const btMatrix3x3& m) const; + + SIMD_FORCE_INLINE btScalar tdotx(const btVector3& v) const + { + return m_el[0].x() * v.x() + m_el[1].x() * v.y() + m_el[2].x() * v.z(); + } + SIMD_FORCE_INLINE btScalar tdoty(const btVector3& v) const + { + return m_el[0].y() * v.x() + m_el[1].y() * v.y() + m_el[2].y() * v.z(); + } + SIMD_FORCE_INLINE btScalar tdotz(const btVector3& v) const + { + return m_el[0].z() * v.x() + m_el[1].z() * v.y() + m_el[2].z() * v.z(); + } + + + + protected: + btScalar cofac(int r1, int c1, int r2, int c2) const + { + return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1]; + } + + btVector3 m_el[3]; + }; + + SIMD_FORCE_INLINE btMatrix3x3& + btMatrix3x3::operator*=(const btMatrix3x3& m) + { + setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]), + m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]), + m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2])); + return *this; + } + + SIMD_FORCE_INLINE btScalar + btMatrix3x3::determinant() const + { + return triple((*this)[0], (*this)[1], (*this)[2]); + } + + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::absolute() const + { + return btMatrix3x3( + btFabs(m_el[0].x()), btFabs(m_el[0].y()), btFabs(m_el[0].z()), + btFabs(m_el[1].x()), btFabs(m_el[1].y()), btFabs(m_el[1].z()), + btFabs(m_el[2].x()), btFabs(m_el[2].y()), btFabs(m_el[2].z())); + } + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::transpose() const + { + return btMatrix3x3(m_el[0].x(), m_el[1].x(), m_el[2].x(), + m_el[0].y(), m_el[1].y(), m_el[2].y(), + m_el[0].z(), m_el[1].z(), m_el[2].z()); + } + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::adjoint() const + { + return btMatrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2), + cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0), + cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1)); + } + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::inverse() const + { + btVector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1)); + btScalar det = (*this)[0].dot(co); + btFullAssert(det != btScalar(0.0)); + btScalar s = btScalar(1.0) / det; + return btMatrix3x3(co.x() * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s, + co.y() * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s, + co.z() * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s); + } + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::transposeTimes(const btMatrix3x3& m) const + { + return btMatrix3x3( + m_el[0].x() * m[0].x() + m_el[1].x() * m[1].x() + m_el[2].x() * m[2].x(), + m_el[0].x() * m[0].y() + m_el[1].x() * m[1].y() + m_el[2].x() * m[2].y(), + m_el[0].x() * m[0].z() + m_el[1].x() * m[1].z() + m_el[2].x() * m[2].z(), + m_el[0].y() * m[0].x() + m_el[1].y() * m[1].x() + m_el[2].y() * m[2].x(), + m_el[0].y() * m[0].y() + m_el[1].y() * m[1].y() + m_el[2].y() * m[2].y(), + m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(), + m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(), + m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(), + m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].x()); + } + + SIMD_FORCE_INLINE btMatrix3x3 + btMatrix3x3::timesTranspose(const btMatrix3x3& m) const + { + return btMatrix3x3( + m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]), + m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]), + m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2])); + + } + + SIMD_FORCE_INLINE btVector3 + operator*(const btMatrix3x3& m, const btVector3& v) + { + return btVector3(m[0].dot(v), m[1].dot(v), m[2].dot(v)); + } + + + SIMD_FORCE_INLINE btVector3 + operator*(const btVector3& v, const btMatrix3x3& m) + { + return btVector3(m.tdotx(v), m.tdoty(v), m.tdotz(v)); + } + + SIMD_FORCE_INLINE btMatrix3x3 + operator*(const btMatrix3x3& m1, const btMatrix3x3& m2) + { + return btMatrix3x3( + m2.tdotx( m1[0]), m2.tdoty( m1[0]), m2.tdotz( m1[0]), + m2.tdotx( m1[1]), m2.tdoty( m1[1]), m2.tdotz( m1[1]), + m2.tdotx( m1[2]), m2.tdoty( m1[2]), m2.tdotz( m1[2])); + } + +/* + SIMD_FORCE_INLINE btMatrix3x3 btMultTransposeLeft(const btMatrix3x3& m1, const btMatrix3x3& m2) { + return btMatrix3x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[1][0] + m1[2][0] * m2[2][0], + m1[0][0] * m2[0][1] + m1[1][0] * m2[1][1] + m1[2][0] * m2[2][1], + m1[0][0] * m2[0][2] + m1[1][0] * m2[1][2] + m1[2][0] * m2[2][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[1][0] + m1[2][1] * m2[2][0], + m1[0][1] * m2[0][1] + m1[1][1] * m2[1][1] + m1[2][1] * m2[2][1], + m1[0][1] * m2[0][2] + m1[1][1] * m2[1][2] + m1[2][1] * m2[2][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[1][0] + m1[2][2] * m2[2][0], + m1[0][2] * m2[0][1] + m1[1][2] * m2[1][1] + m1[2][2] * m2[2][1], + m1[0][2] * m2[0][2] + m1[1][2] * m2[1][2] + m1[2][2] * m2[2][2]); +} +*/ + + +#endif diff --git a/extern/bullet2/src/LinearMath/btMinMax.h b/extern/bullet2/src/LinearMath/btMinMax.h new file mode 100644 index 00000000000..1b8a3633f38 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btMinMax.h @@ -0,0 +1,69 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef GEN_MINMAX_H +#define GEN_MINMAX_H + +template +SIMD_FORCE_INLINE const T& GEN_min(const T& a, const T& b) +{ + return b < a ? b : a; +} + +template +SIMD_FORCE_INLINE const T& GEN_max(const T& a, const T& b) +{ + return a < b ? b : a; +} + +template +SIMD_FORCE_INLINE const T& GEN_clamped(const T& a, const T& lb, const T& ub) +{ + return a < lb ? lb : (ub < a ? ub : a); +} + +template +SIMD_FORCE_INLINE void GEN_set_min(T& a, const T& b) +{ + if (b < a) + { + a = b; + } +} + +template +SIMD_FORCE_INLINE void GEN_set_max(T& a, const T& b) +{ + if (a < b) + { + a = b; + } +} + +template +SIMD_FORCE_INLINE void GEN_clamp(T& a, const T& lb, const T& ub) +{ + if (a < lb) + { + a = lb; + } + else if (ub < a) + { + a = ub; + } +} + +#endif diff --git a/extern/bullet2/src/LinearMath/btMotionState.h b/extern/bullet2/src/LinearMath/btMotionState.h new file mode 100644 index 00000000000..1975e5ff900 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btMotionState.h @@ -0,0 +1,40 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BT_MOTIONSTATE_H +#define BT_MOTIONSTATE_H + +#include "btTransform.h" + +///btMotionState allows the dynamics world to synchronize the updated world transforms with graphics +///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) +class btMotionState +{ + public: + + virtual ~btMotionState() + { + + } + + virtual void getWorldTransform(btTransform& worldTrans ) const =0; + + //Bullet only calls the update of worldtransform for active objects + virtual void setWorldTransform(const btTransform& worldTrans)=0; + + +}; + +#endif //BT_MOTIONSTATE_H diff --git a/extern/bullet2/src/LinearMath/btPoint3.h b/extern/bullet2/src/LinearMath/btPoint3.h new file mode 100644 index 00000000000..a2020e26d12 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btPoint3.h @@ -0,0 +1,24 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef btPoint3_H +#define btPoint3_H + +#include "btVector3.h" + +typedef btVector3 btPoint3; + +#endif diff --git a/extern/bullet2/src/LinearMath/btQuadWord.h b/extern/bullet2/src/LinearMath/btQuadWord.h new file mode 100644 index 00000000000..961ac484d20 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btQuadWord.h @@ -0,0 +1,139 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef SIMD_QUADWORD_H +#define SIMD_QUADWORD_H + +#include "btScalar.h" + + + + +///btQuadWord is base-class for vectors, points +class btQuadWord +{ + protected: + btScalar m_x; + btScalar m_y; + btScalar m_z; + btScalar m_unusedW; + + public: + +// SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_x)[i]; } +// SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_x)[i]; } + + SIMD_FORCE_INLINE const btScalar& getX() const { return m_x; } + + SIMD_FORCE_INLINE const btScalar& getY() const { return m_y; } + + SIMD_FORCE_INLINE const btScalar& getZ() const { return m_z; } + + SIMD_FORCE_INLINE void setX(btScalar x) { m_x = x;}; + + SIMD_FORCE_INLINE void setY(btScalar y) { m_y = y;}; + + SIMD_FORCE_INLINE void setZ(btScalar z) { m_z = z;}; + + SIMD_FORCE_INLINE void setW(btScalar w) { m_unusedW = w;}; + + SIMD_FORCE_INLINE const btScalar& x() const { return m_x; } + + SIMD_FORCE_INLINE const btScalar& y() const { return m_y; } + + SIMD_FORCE_INLINE const btScalar& z() const { return m_z; } + + SIMD_FORCE_INLINE const btScalar& w() const { return m_unusedW; } + + + SIMD_FORCE_INLINE operator btScalar *() { return &m_x; } + SIMD_FORCE_INLINE operator const btScalar *() const { return &m_x; } + + SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z) + { + m_x=x; + m_y=y; + m_z=z; + m_unusedW = 0.f; + } + +/* void getValue(btScalar *m) const + { + m[0] = m_x; + m[1] = m_y; + m[2] = m_z; + } +*/ + SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) + { + m_x=x; + m_y=y; + m_z=z; + m_unusedW=w; + } + + SIMD_FORCE_INLINE btQuadWord() + // :m_x(btScalar(0.)),m_y(btScalar(0.)),m_z(btScalar(0.)),m_unusedW(btScalar(0.)) + { + } + + SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z) + :m_x(x),m_y(y),m_z(z) + //todo, remove this in release/simd ? + ,m_unusedW(btScalar(0.)) + { + } + + SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) + :m_x(x),m_y(y),m_z(z),m_unusedW(w) + { + } + + + SIMD_FORCE_INLINE void setMax(const btQuadWord& other) + { + if (other.m_x > m_x) + m_x = other.m_x; + + if (other.m_y > m_y) + m_y = other.m_y; + + if (other.m_z > m_z) + m_z = other.m_z; + + if (other.m_unusedW > m_unusedW) + m_unusedW = other.m_unusedW; + } + + SIMD_FORCE_INLINE void setMin(const btQuadWord& other) + { + if (other.m_x < m_x) + m_x = other.m_x; + + if (other.m_y < m_y) + m_y = other.m_y; + + if (other.m_z < m_z) + m_z = other.m_z; + + if (other.m_unusedW < m_unusedW) + m_unusedW = other.m_unusedW; + } + + + +}; + +#endif //SIMD_QUADWORD_H diff --git a/extern/bullet2/src/LinearMath/btQuaternion.h b/extern/bullet2/src/LinearMath/btQuaternion.h new file mode 100644 index 00000000000..50334970ba6 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btQuaternion.h @@ -0,0 +1,321 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef SIMD__QUATERNION_H_ +#define SIMD__QUATERNION_H_ + +#include "btVector3.h" + +class btQuaternion : public btQuadWord { +public: + btQuaternion() {} + + // template + // explicit Quaternion(const btScalar *v) : Tuple4(v) {} + + btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w) + : btQuadWord(x, y, z, w) + {} + + btQuaternion(const btVector3& axis, const btScalar& angle) + { + setRotation(axis, angle); + } + + btQuaternion(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) + { + setEuler(yaw, pitch, roll); + } + + void setRotation(const btVector3& axis, const btScalar& angle) + { + btScalar d = axis.length(); + assert(d != btScalar(0.0)); + btScalar s = btSin(angle * btScalar(0.5)) / d; + setValue(axis.x() * s, axis.y() * s, axis.z() * s, + btCos(angle * btScalar(0.5))); + } + + void setEuler(const btScalar& yaw, const btScalar& pitch, const btScalar& roll) + { + btScalar halfYaw = btScalar(yaw) * btScalar(0.5); + btScalar halfPitch = btScalar(pitch) * btScalar(0.5); + btScalar halfRoll = btScalar(roll) * btScalar(0.5); + btScalar cosYaw = btCos(halfYaw); + btScalar sinYaw = btSin(halfYaw); + btScalar cosPitch = btCos(halfPitch); + btScalar sinPitch = btSin(halfPitch); + btScalar cosRoll = btCos(halfRoll); + btScalar sinRoll = btSin(halfRoll); + setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, + cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, + sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, + cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); + } + + btQuaternion& operator+=(const btQuaternion& q) + { + m_x += q.x(); m_y += q.y(); m_z += q.z(); m_unusedW += q.m_unusedW; + return *this; + } + + btQuaternion& operator-=(const btQuaternion& q) + { + m_x -= q.x(); m_y -= q.y(); m_z -= q.z(); m_unusedW -= q.m_unusedW; + return *this; + } + + btQuaternion& operator*=(const btScalar& s) + { + m_x *= s; m_y *= s; m_z *= s; m_unusedW *= s; + return *this; + } + + + btQuaternion& operator*=(const btQuaternion& q) + { + setValue(m_unusedW * q.x() + m_x * q.m_unusedW + m_y * q.z() - m_z * q.y(), + m_unusedW * q.y() + m_y * q.m_unusedW + m_z * q.x() - m_x * q.z(), + m_unusedW * q.z() + m_z * q.m_unusedW + m_x * q.y() - m_y * q.x(), + m_unusedW * q.m_unusedW - m_x * q.x() - m_y * q.y() - m_z * q.z()); + return *this; + } + + btScalar dot(const btQuaternion& q) const + { + return m_x * q.x() + m_y * q.y() + m_z * q.z() + m_unusedW * q.m_unusedW; + } + + btScalar length2() const + { + return dot(*this); + } + + btScalar length() const + { + return btSqrt(length2()); + } + + btQuaternion& normalize() + { + return *this /= length(); + } + + SIMD_FORCE_INLINE btQuaternion + operator*(const btScalar& s) const + { + return btQuaternion(x() * s, y() * s, z() * s, m_unusedW * s); + } + + + + btQuaternion operator/(const btScalar& s) const + { + assert(s != btScalar(0.0)); + return *this * (btScalar(1.0) / s); + } + + + btQuaternion& operator/=(const btScalar& s) + { + assert(s != btScalar(0.0)); + return *this *= btScalar(1.0) / s; + } + + + btQuaternion normalized() const + { + return *this / length(); + } + + btScalar angle(const btQuaternion& q) const + { + btScalar s = btSqrt(length2() * q.length2()); + assert(s != btScalar(0.0)); + return btAcos(dot(q) / s); + } + + btScalar getAngle() const + { + btScalar s = btScalar(2.) * btAcos(m_unusedW); + return s; + } + + + + btQuaternion inverse() const + { + return btQuaternion(m_x, m_y, m_z, -m_unusedW); + } + + SIMD_FORCE_INLINE btQuaternion + operator+(const btQuaternion& q2) const + { + const btQuaternion& q1 = *this; + return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_unusedW + q2.m_unusedW); + } + + SIMD_FORCE_INLINE btQuaternion + operator-(const btQuaternion& q2) const + { + const btQuaternion& q1 = *this; + return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_unusedW - q2.m_unusedW); + } + + SIMD_FORCE_INLINE btQuaternion operator-() const + { + const btQuaternion& q2 = *this; + return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_unusedW); + } + + SIMD_FORCE_INLINE btQuaternion farthest( const btQuaternion& qd) const + { + btQuaternion diff,sum; + diff = *this - qd; + sum = *this + qd; + if( diff.dot(diff) > sum.dot(sum) ) + return qd; + return (-qd); + } + + btQuaternion slerp(const btQuaternion& q, const btScalar& t) const + { + btScalar theta = angle(q); + if (theta != btScalar(0.0)) + { + btScalar d = btScalar(1.0) / btSin(theta); + btScalar s0 = btSin((btScalar(1.0) - t) * theta); + btScalar s1 = btSin(t * theta); + return btQuaternion((m_x * s0 + q.x() * s1) * d, + (m_y * s0 + q.y() * s1) * d, + (m_z * s0 + q.z() * s1) * d, + (m_unusedW * s0 + q.m_unusedW * s1) * d); + } + else + { + return *this; + } + } + + SIMD_FORCE_INLINE const btScalar& getW() const { return m_unusedW; } + + +}; + + + +SIMD_FORCE_INLINE btQuaternion +operator-(const btQuaternion& q) +{ + return btQuaternion(-q.x(), -q.y(), -q.z(), -q.w()); +} + + + + +SIMD_FORCE_INLINE btQuaternion +operator*(const btQuaternion& q1, const btQuaternion& q2) { + return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(), + q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(), + q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(), + q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z()); +} + +SIMD_FORCE_INLINE btQuaternion +operator*(const btQuaternion& q, const btVector3& w) +{ + return btQuaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(), + q.w() * w.y() + q.z() * w.x() - q.x() * w.z(), + q.w() * w.z() + q.x() * w.y() - q.y() * w.x(), + -q.x() * w.x() - q.y() * w.y() - q.z() * w.z()); +} + +SIMD_FORCE_INLINE btQuaternion +operator*(const btVector3& w, const btQuaternion& q) +{ + return btQuaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(), + w.y() * q.w() + w.z() * q.x() - w.x() * q.z(), + w.z() * q.w() + w.x() * q.y() - w.y() * q.x(), + -w.x() * q.x() - w.y() * q.y() - w.z() * q.z()); +} + +SIMD_FORCE_INLINE btScalar +dot(const btQuaternion& q1, const btQuaternion& q2) +{ + return q1.dot(q2); +} + + +SIMD_FORCE_INLINE btScalar +length(const btQuaternion& q) +{ + return q.length(); +} + +SIMD_FORCE_INLINE btScalar +angle(const btQuaternion& q1, const btQuaternion& q2) +{ + return q1.angle(q2); +} + + +SIMD_FORCE_INLINE btQuaternion +inverse(const btQuaternion& q) +{ + return q.inverse(); +} + +SIMD_FORCE_INLINE btQuaternion +slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t) +{ + return q1.slerp(q2, t); +} + +SIMD_FORCE_INLINE btVector3 +quatRotate(btQuaternion& rotation, btVector3& v) +{ + btQuaternion q = rotation * v; + q *= rotation.inverse(); + return btVector3(q.getX(),q.getY(),q.getZ()); +} + +SIMD_FORCE_INLINE btQuaternion +shortestArcQuat(btVector3& v0,btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized +{ + btVector3 c = v0.cross(v1); + btScalar d = v0.dot(v1); + + if (d < -1.0 + SIMD_EPSILON) + return btQuaternion(0.0f,1.0f,0.0f,0.0f); // just pick any vector + + btScalar s = btSqrt((1.0f + d) * 2.0f); + btScalar rs = 1.0f / s; + + return btQuaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f); +} + +SIMD_FORCE_INLINE btQuaternion +shortestArcQuatNormalize(btVector3& v0,btVector3& v1) +{ + v0.normalize(); + v1.normalize(); + return shortestArcQuat(v0,v1); +} + +#endif + + + diff --git a/extern/bullet2/src/LinearMath/btQuickprof.cpp b/extern/bullet2/src/LinearMath/btQuickprof.cpp new file mode 100644 index 00000000000..37a0c8c3be5 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btQuickprof.cpp @@ -0,0 +1,38 @@ +/* +Copyright (c) 2006 Tyler Streeter + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +*/ + + +// Please visit the project website (http://quickprof.sourceforge.net) +// for usage instructions. + +// Credits: The Clock class was inspired by the Timer classes in +// Ogre (www.ogre3d.org). + +#include "LinearMath/btQuickprof.h" + +#ifdef USE_QUICKPROF + +// Note: We must declare these private static variables again here to +// avoid link errors. +bool btProfiler::mEnabled = false; +btClock btProfiler::mClock; +unsigned long int btProfiler::mCurrentCycleStartMicroseconds = 0; +unsigned long int btProfiler::mLastCycleDurationMicroseconds = 0; +std::map btProfiler::mProfileBlocks; +std::ofstream btProfiler::mOutputFile; +bool btProfiler::mFirstFileOutput = true; +btProfiler::BlockTimingMethod btProfiler::mFileOutputMethod; +unsigned long int btProfiler::mCycleNumber = 0; +#endif //USE_QUICKPROF diff --git a/extern/bullet2/src/LinearMath/btQuickprof.h b/extern/bullet2/src/LinearMath/btQuickprof.h new file mode 100644 index 00000000000..a885967c5fa --- /dev/null +++ b/extern/bullet2/src/LinearMath/btQuickprof.h @@ -0,0 +1,712 @@ +/* +Copyright (c) 2006 Tyler Streeter + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +*/ + +// Please visit the project website (http://quickprof.sourceforge.net) +// for usage instructions. + +// Credits: The Clock class was inspired by the Timer classes in +// Ogre (www.ogre3d.org). + +#ifndef QUICK_PROF_H +#define QUICK_PROF_H + +#include "btScalar.h" + +//#define USE_QUICKPROF 1 +//Don't use quickprof for now, because it contains STL. TODO: replace STL by Bullet container classes. + + +//if you don't need btClock, you can comment next line +#define USE_BT_CLOCK 1 + +#ifdef USE_BT_CLOCK +#ifdef __CELLOS_LV2__ +#include +#include +typedef uint64_t __int64; +#endif + +#if defined (SUNOS) || defined (__SUNOS__) + #include +#endif + +#if defined(WIN32) || defined(_WIN32) + + #define USE_WINDOWS_TIMERS + #define WIN32_LEAN_AND_MEAN + #define NOWINRES + #define NOMCX + #define NOIME +#ifdef _XBOX + #include +#else + #include +#endif + #include + +#else + #include +#endif + +#define mymin(a,b) (a > b ? a : b) + +/// basic clock +class btClock + { + public: + btClock() + { +#ifdef USE_WINDOWS_TIMERS + QueryPerformanceFrequency(&mClockFrequency); +#endif + reset(); + } + + ~btClock() + { + } + + /// Resets the initial reference time. + void reset() + { +#ifdef USE_WINDOWS_TIMERS + QueryPerformanceCounter(&mStartTime); + mStartTick = GetTickCount(); + mPrevElapsedTime = 0; +#else +#ifdef __CELLOS_LV2__ + + typedef uint64_t __int64; + typedef __int64 ClockSize; + ClockSize newTime; + __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); + mStartTime = newTime; +#else + gettimeofday(&mStartTime, 0); +#endif + +#endif + } + + /// Returns the time in ms since the last call to reset or since + /// the btClock was created. + unsigned long int getTimeMilliseconds() + { +#ifdef USE_WINDOWS_TIMERS + LARGE_INTEGER currentTime; + QueryPerformanceCounter(¤tTime); + LONGLONG elapsedTime = currentTime.QuadPart - + mStartTime.QuadPart; + + // Compute the number of millisecond ticks elapsed. + unsigned long msecTicks = (unsigned long)(1000 * elapsedTime / + mClockFrequency.QuadPart); + + // Check for unexpected leaps in the Win32 performance counter. + // (This is caused by unexpected data across the PCI to ISA + // bridge, aka south bridge. See Microsoft KB274323.) + unsigned long elapsedTicks = GetTickCount() - mStartTick; + signed long msecOff = (signed long)(msecTicks - elapsedTicks); + if (msecOff < -100 || msecOff > 100) + { + // Adjust the starting time forwards. + LONGLONG msecAdjustment = mymin(msecOff * + mClockFrequency.QuadPart / 1000, elapsedTime - + mPrevElapsedTime); + mStartTime.QuadPart += msecAdjustment; + elapsedTime -= msecAdjustment; + + // Recompute the number of millisecond ticks elapsed. + msecTicks = (unsigned long)(1000 * elapsedTime / + mClockFrequency.QuadPart); + } + + // Store the current elapsed time for adjustments next time. + mPrevElapsedTime = elapsedTime; + + return msecTicks; +#else + +#ifdef __CELLOS_LV2__ + __int64 freq=sys_time_get_timebase_frequency(); + double dFreq=((double) freq) / 1000.0; + typedef uint64_t __int64; + typedef __int64 ClockSize; + ClockSize newTime; + __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); + + return (newTime-mStartTime) / dFreq; +#else + + struct timeval currentTime; + gettimeofday(¤tTime, 0); + return (currentTime.tv_sec - mStartTime.tv_sec) * 1000 + + (currentTime.tv_usec - mStartTime.tv_usec) / 1000; +#endif //__CELLOS_LV2__ +#endif + } + + /// Returns the time in us since the last call to reset or since + /// the Clock was created. + unsigned long int getTimeMicroseconds() + { +#ifdef USE_WINDOWS_TIMERS + LARGE_INTEGER currentTime; + QueryPerformanceCounter(¤tTime); + LONGLONG elapsedTime = currentTime.QuadPart - + mStartTime.QuadPart; + + // Compute the number of millisecond ticks elapsed. + unsigned long msecTicks = (unsigned long)(1000 * elapsedTime / + mClockFrequency.QuadPart); + + // Check for unexpected leaps in the Win32 performance counter. + // (This is caused by unexpected data across the PCI to ISA + // bridge, aka south bridge. See Microsoft KB274323.) + unsigned long elapsedTicks = GetTickCount() - mStartTick; + signed long msecOff = (signed long)(msecTicks - elapsedTicks); + if (msecOff < -100 || msecOff > 100) + { + // Adjust the starting time forwards. + LONGLONG msecAdjustment = mymin(msecOff * + mClockFrequency.QuadPart / 1000, elapsedTime - + mPrevElapsedTime); + mStartTime.QuadPart += msecAdjustment; + elapsedTime -= msecAdjustment; + } + + // Store the current elapsed time for adjustments next time. + mPrevElapsedTime = elapsedTime; + + // Convert to microseconds. + unsigned long usecTicks = (unsigned long)(1000000 * elapsedTime / + mClockFrequency.QuadPart); + + return usecTicks; +#else + +#ifdef __CELLOS_LV2__ + __int64 freq=sys_time_get_timebase_frequency(); + double dFreq=((double) freq)/ 1000000.0; + typedef uint64_t __int64; + typedef __int64 ClockSize; + ClockSize newTime; + __asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory"); + + return (newTime-mStartTime) / dFreq; +#else + + struct timeval currentTime; + gettimeofday(¤tTime, 0); + return (currentTime.tv_sec - mStartTime.tv_sec) * 1000000 + + (currentTime.tv_usec - mStartTime.tv_usec); +#endif//__CELLOS_LV2__ +#endif + } + + private: +#ifdef USE_WINDOWS_TIMERS + LARGE_INTEGER mClockFrequency; + DWORD mStartTick; + LONGLONG mPrevElapsedTime; + LARGE_INTEGER mStartTime; +#else +#ifdef __CELLOS_LV2__ + uint64_t mStartTime; +#else + struct timeval mStartTime; +#endif +#endif //__CELLOS_LV2__ + + }; + +#endif //USE_BT_CLOCK + + +#ifdef USE_QUICKPROF + + +#include +#include +#include +#include + + + + +namespace hidden +{ + /// A simple data structure representing a single timed block + /// of code. + struct ProfileBlock + { + ProfileBlock() + { + currentBlockStartMicroseconds = 0; + currentCycleTotalMicroseconds = 0; + lastCycleTotalMicroseconds = 0; + totalMicroseconds = 0; + } + + /// The starting time (in us) of the current block update. + unsigned long int currentBlockStartMicroseconds; + + /// The accumulated time (in us) spent in this block during the + /// current profiling cycle. + unsigned long int currentCycleTotalMicroseconds; + + /// The accumulated time (in us) spent in this block during the + /// past profiling cycle. + unsigned long int lastCycleTotalMicroseconds; + + /// The total accumulated time (in us) spent in this block. + unsigned long int totalMicroseconds; + }; + +}; + +/// A static class that manages timing for a set of profiling blocks. +class btProfiler +{ +public: + /// A set of ways to retrieve block timing data. + enum BlockTimingMethod + { + /// The total time spent in the block (in seconds) since the + /// profiler was initialized. + BLOCK_TOTAL_SECONDS, + + /// The total time spent in the block (in ms) since the + /// profiler was initialized. + BLOCK_TOTAL_MILLISECONDS, + + /// The total time spent in the block (in us) since the + /// profiler was initialized. + BLOCK_TOTAL_MICROSECONDS, + + /// The total time spent in the block, as a % of the total + /// elapsed time since the profiler was initialized. + BLOCK_TOTAL_PERCENT, + + /// The time spent in the block (in seconds) in the most recent + /// profiling cycle. + BLOCK_CYCLE_SECONDS, + + /// The time spent in the block (in ms) in the most recent + /// profiling cycle. + BLOCK_CYCLE_MILLISECONDS, + + /// The time spent in the block (in us) in the most recent + /// profiling cycle. + BLOCK_CYCLE_MICROSECONDS, + + /// The time spent in the block (in seconds) in the most recent + /// profiling cycle, as a % of the total cycle time. + BLOCK_CYCLE_PERCENT + }; + + /// Initializes the profiler. This must be called first. If this is + /// never called, the profiler is effectively disabled; all other + /// functions will return immediately. The first parameter + /// is the name of an output data file; if this string is not empty, + /// data will be saved on every profiling cycle; if this string is + /// empty, no data will be saved to a file. The second parameter + /// determines which timing method is used when printing data to the + /// output file. + inline static void init(const std::string outputFilename="", + BlockTimingMethod outputMethod=BLOCK_CYCLE_MILLISECONDS); + + /// Cleans up allocated memory. + inline static void destroy(); + + /// Begins timing the named block of code. + inline static void beginBlock(const std::string& name); + + /// Updates the accumulated time spent in the named block by adding + /// the elapsed time since the last call to startBlock for this block + /// name. + inline static void endBlock(const std::string& name); + + /// Returns the time spent in the named block according to the + /// given timing method. See comments on BlockTimingMethod for details. + inline static double getBlockTime(const std::string& name, + BlockTimingMethod method=BLOCK_CYCLE_MILLISECONDS); + + /// Defines the end of a profiling cycle. Use this regularly if you + /// want to generate detailed timing information. This must not be + /// called within a timing block. + inline static void endProfilingCycle(); + + /// A helper function that creates a string of statistics for + /// each timing block. This is mainly for printing an overall + /// summary to the command line. + inline static std::string createStatsString( + BlockTimingMethod method=BLOCK_TOTAL_PERCENT); + +//private: + inline btProfiler(); + + inline ~btProfiler(); + + /// Prints an error message to standard output. + inline static void printError(const std::string& msg) + { + //btAssert(0); + std::cout << "[QuickProf error] " << msg << std::endl; + } + + /// Determines whether the profiler is enabled. + static bool mEnabled; + + /// The clock used to time profile blocks. + static btClock mClock; + + /// The starting time (in us) of the current profiling cycle. + static unsigned long int mCurrentCycleStartMicroseconds; + + /// The duration (in us) of the most recent profiling cycle. + static unsigned long int mLastCycleDurationMicroseconds; + + /// Internal map of named profile blocks. + static std::map mProfileBlocks; + + /// The data file used if this feature is enabled in 'init.' + static std::ofstream mOutputFile; + + /// Tracks whether we have begun print data to the output file. + static bool mFirstFileOutput; + + /// The method used when printing timing data to an output file. + static BlockTimingMethod mFileOutputMethod; + + /// The number of the current profiling cycle. + static unsigned long int mCycleNumber; +}; + + +btProfiler::btProfiler() +{ + // This never gets called because a btProfiler instance is never + // created. +} + +btProfiler::~btProfiler() +{ + // This never gets called because a btProfiler instance is never + // created. +} + +void btProfiler::init(const std::string outputFilename, + BlockTimingMethod outputMethod) +{ + mEnabled = true; + + if (!outputFilename.empty()) + { + mOutputFile.open(outputFilename.c_str()); + } + + mFileOutputMethod = outputMethod; + + mClock.reset(); + + // Set the start time for the first cycle. + mCurrentCycleStartMicroseconds = mClock.getTimeMicroseconds(); +} + +void btProfiler::destroy() +{ + if (!mEnabled) + { + return; + } + + if (mOutputFile.is_open()) + { + mOutputFile.close(); + } + + // Destroy all ProfileBlocks. + while (!mProfileBlocks.empty()) + { + delete (*mProfileBlocks.begin()).second; + mProfileBlocks.erase(mProfileBlocks.begin()); + } +} + +void btProfiler::beginBlock(const std::string& name) +{ + if (!mEnabled) + { + return; + } + + if (name.empty()) + { + printError("Cannot allow unnamed profile blocks."); + return; + } + + hidden::ProfileBlock* block = mProfileBlocks[name]; + + if (!block) + { + // Create a new ProfileBlock. + mProfileBlocks[name] = new hidden::ProfileBlock(); + block = mProfileBlocks[name]; + } + + // We do this at the end to get more accurate results. + block->currentBlockStartMicroseconds = mClock.getTimeMicroseconds(); +} + +void btProfiler::endBlock(const std::string& name) +{ + if (!mEnabled) + { + return; + } + + // We do this at the beginning to get more accurate results. + unsigned long int endTick = mClock.getTimeMicroseconds(); + + hidden::ProfileBlock* block = mProfileBlocks[name]; + + if (!block) + { + // The named block does not exist. Print an error. + printError("The profile block named '" + name + + "' does not exist."); + return; + } + + unsigned long int blockDuration = endTick - + block->currentBlockStartMicroseconds; + block->currentCycleTotalMicroseconds += blockDuration; + block->totalMicroseconds += blockDuration; +} + +double btProfiler::getBlockTime(const std::string& name, + BlockTimingMethod method) +{ + if (!mEnabled) + { + return 0; + } + + hidden::ProfileBlock* block = mProfileBlocks[name]; + + if (!block) + { + // The named block does not exist. Print an error. + printError("The profile block named '" + name + + "' does not exist."); + return 0; + } + + double result = 0; + + switch(method) + { + case BLOCK_TOTAL_SECONDS: + result = (double)block->totalMicroseconds * (double)0.000001; + break; + case BLOCK_TOTAL_MILLISECONDS: + result = (double)block->totalMicroseconds * (double)0.001; + break; + case BLOCK_TOTAL_MICROSECONDS: + result = (double)block->totalMicroseconds; + break; + case BLOCK_TOTAL_PERCENT: + { + double timeSinceInit = (double)mClock.getTimeMicroseconds(); + if (timeSinceInit <= 0) + { + result = 0; + } + else + { + result = 100.0 * (double)block->totalMicroseconds / + timeSinceInit; + } + break; + } + case BLOCK_CYCLE_SECONDS: + result = (double)block->lastCycleTotalMicroseconds * + (double)0.000001; + break; + case BLOCK_CYCLE_MILLISECONDS: + result = (double)block->lastCycleTotalMicroseconds * + (double)0.001; + break; + case BLOCK_CYCLE_MICROSECONDS: + result = (double)block->lastCycleTotalMicroseconds; + break; + case BLOCK_CYCLE_PERCENT: + { + if (0 == mLastCycleDurationMicroseconds) + { + // We have not yet finished a cycle, so just return zero + // percent to avoid a divide by zero error. + result = 0; + } + else + { + result = 100.0 * (double)block->lastCycleTotalMicroseconds / + mLastCycleDurationMicroseconds; + } + break; + } + default: + break; + } + + return result; +} + +void btProfiler::endProfilingCycle() +{ + if (!mEnabled) + { + return; + } + + // Store the duration of the cycle that just finished. + mLastCycleDurationMicroseconds = mClock.getTimeMicroseconds() - + mCurrentCycleStartMicroseconds; + + // For each block, update data for the cycle that just finished. + std::map::iterator iter; + for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); ++iter) + { + hidden::ProfileBlock* block = (*iter).second; + block->lastCycleTotalMicroseconds = + block->currentCycleTotalMicroseconds; + block->currentCycleTotalMicroseconds = 0; + } + + if (mOutputFile.is_open()) + { + // Print data to the output file. + if (mFirstFileOutput) + { + // On the first iteration, print a header line that shows the + // names of each profiling block. + mOutputFile << "#cycle, "; + + for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); + ++iter) + { + mOutputFile << (*iter).first << ", "; + } + + mOutputFile << std::endl; + mFirstFileOutput = false; + } + + mOutputFile << mCycleNumber << ", "; + + for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); + ++iter) + { + mOutputFile << getBlockTime((*iter).first, mFileOutputMethod) + << ", "; + } + + mOutputFile << std::endl; + } + + ++mCycleNumber; + mCurrentCycleStartMicroseconds = mClock.getTimeMicroseconds(); +} + +std::string btProfiler::createStatsString(BlockTimingMethod method) +{ + if (!mEnabled) + { + return ""; + } + + std::string s; + std::string suffix; + + switch(method) + { + case BLOCK_TOTAL_SECONDS: + suffix = "s"; + break; + case BLOCK_TOTAL_MILLISECONDS: + suffix = "ms"; + break; + case BLOCK_TOTAL_MICROSECONDS: + suffix = "us"; + break; + case BLOCK_TOTAL_PERCENT: + { + suffix = "%"; + break; + } + case BLOCK_CYCLE_SECONDS: + suffix = "s"; + break; + case BLOCK_CYCLE_MILLISECONDS: + suffix = "ms"; + break; + case BLOCK_CYCLE_MICROSECONDS: + suffix = "us"; + break; + case BLOCK_CYCLE_PERCENT: + { + suffix = "%"; + break; + } + default: + break; + } + + std::map::iterator iter; + for (iter = mProfileBlocks.begin(); iter != mProfileBlocks.end(); ++iter) + { + if (iter != mProfileBlocks.begin()) + { + s += "\n"; + } + + char blockTime[64]; + sprintf(blockTime, "%lf", getBlockTime((*iter).first, method)); + + s += (*iter).first; + s += ": "; + s += blockTime; + s += " "; + s += suffix; + } + + return s; +} + + +#define BEGIN_PROFILE(a) btProfiler::beginBlock(a) +#define END_PROFILE(a) btProfiler::endBlock(a) + +#else //USE_QUICKPROF +#define BEGIN_PROFILE(a) +#define END_PROFILE(a) + +#endif //USE_QUICKPROF + +#endif //QUICK_PROF_H + + diff --git a/extern/bullet2/src/LinearMath/btRandom.h b/extern/bullet2/src/LinearMath/btRandom.h new file mode 100644 index 00000000000..fdf65e01caf --- /dev/null +++ b/extern/bullet2/src/LinearMath/btRandom.h @@ -0,0 +1,42 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef GEN_RANDOM_H +#define GEN_RANDOM_H + +#ifdef MT19937 + +#include +#include + +#define GEN_RAND_MAX UINT_MAX + +SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); } +SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); } + +#else + +#include + +#define GEN_RAND_MAX RAND_MAX + +SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); } +SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); } + +#endif + +#endif + diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h new file mode 100644 index 00000000000..01ad93e786a --- /dev/null +++ b/extern/bullet2/src/LinearMath/btScalar.h @@ -0,0 +1,181 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef SIMD___SCALAR_H +#define SIMD___SCALAR_H + +#include + +#include +#include +#include + +#ifdef WIN32 + + #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) + #define SIMD_FORCE_INLINE inline + #define ATTRIBUTE_ALIGNED16(a) a + #else + #define BT_HAS_ALIGNED_ALOCATOR + #pragma warning(disable:4530) + #pragma warning(disable:4996) + #pragma warning(disable:4786) + #define SIMD_FORCE_INLINE __forceinline + #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a + #ifdef _XBOX + #define BT_USE_VMX128 + #else + #define BT_USE_SSE + #endif + #endif //__MINGW32__ + + #include + #define btAssert assert + //btFullAssert is optional, slows down a lot + #define btFullAssert(x) +#else + +#if defined (__CELLOS_LV2__) + #define SIMD_FORCE_INLINE inline + #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16))) + #ifndef assert + #include + #endif + #define btAssert assert + //btFullAssert is optional, slows down a lot + #define btFullAssert(x) +#else + + //non-windows systems + + #define SIMD_FORCE_INLINE inline + #define ATTRIBUTE_ALIGNED16(a) a + #ifndef assert + #include + #endif + #define btAssert assert + //btFullAssert is optional, slows down a lot + #define btFullAssert(x) +#endif //__CELLOS_LV2__ +#endif + +/// older compilers (gcc 3.x) and Sun needs double version of sqrt etc. +/// exclude Apple Intel (i's assumed to be a Macbook or new Intel Dual Core Processor) +#if defined (__sun) || defined (__sun__) || defined (__sparc) || (defined (__APPLE__) && ! defined (__i386__)) +//use slow double float precision operation on those platforms +#ifndef BT_USE_DOUBLE_PRECISION +#define BT_FORCE_DOUBLE_FUNCTIONS +#endif +#endif + +#if defined(BT_USE_DOUBLE_PRECISION) +typedef double btScalar; +#else +typedef float btScalar; +#endif + + +#if defined(BT_USE_DOUBLE_PRECISION) || defined(BT_FORCE_DOUBLE_FUNCTIONS) + +SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrt(x); } +SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabs(x); } +SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cos(x); } +SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sin(x); } +SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tan(x); } +SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acos(x); } +SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asin(x); } +SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atan(x); } +SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2(x, y); } +SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return exp(x); } +SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return log(x); } +SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return pow(x,y); } + +#else + +SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrtf(x); } +SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabsf(x); } +SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); } +SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); } +SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); } +SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acosf(x); } +SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asinf(x); } +SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); } +SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); } +SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return expf(x); } +SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return logf(x); } +SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return powf(x,y); } + +#endif + +#define SIMD_2_PI btScalar(6.283185307179586232) +#define SIMD_PI (SIMD_2_PI * btScalar(0.5)) +#define SIMD_HALF_PI (SIMD_2_PI * btScalar(0.25)) +#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0)) +#define SIMD_DEGS_PER_RAD (btScalar(360.0) / SIMD_2_PI) + +#ifdef BT_USE_DOUBLE_PRECISION +#define SIMD_EPSILON DBL_EPSILON +#define SIMD_INFINITY DBL_MAX +#else +#define SIMD_EPSILON FLT_EPSILON +#define SIMD_INFINITY FLT_MAX +#endif + +SIMD_FORCE_INLINE btScalar btAtan2Fast(btScalar y, btScalar x) +{ + btScalar coeff_1 = SIMD_PI / 4.0f; + btScalar coeff_2 = 3.0f * coeff_1; + btScalar abs_y = btFabs(y); + btScalar angle; + if (x >= 0.0f) { + btScalar r = (x - abs_y) / (x + abs_y); + angle = coeff_1 - coeff_1 * r; + } else { + btScalar r = (x + abs_y) / (abs_y - x); + angle = coeff_2 - coeff_1 * r; + } + return (y < 0.0f) ? -angle : angle; +} + +SIMD_FORCE_INLINE bool btFuzzyZero(btScalar x) { return btFabs(x) < SIMD_EPSILON; } + +SIMD_FORCE_INLINE bool btEqual(btScalar a, btScalar eps) { + return (((a) <= eps) && !((a) < -eps)); +} +SIMD_FORCE_INLINE bool btGreaterEqual (btScalar a, btScalar eps) { + return (!((a) <= eps)); +} + +/*SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); } +SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); } +SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); } +SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { return acosf(x); } +SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { return asinf(x); } +SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); } +SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); } +*/ + +SIMD_FORCE_INLINE int btIsNegative(btScalar x) { + return x < btScalar(0.0) ? 1 : 0; +} + +SIMD_FORCE_INLINE btScalar btRadians(btScalar x) { return x * SIMD_RADS_PER_DEG; } +SIMD_FORCE_INLINE btScalar btDegrees(btScalar x) { return x * SIMD_DEGS_PER_RAD; } + +#define BT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name + + +#endif //SIMD___SCALAR_H diff --git a/extern/bullet2/src/LinearMath/btSimdMinMax.h b/extern/bullet2/src/LinearMath/btSimdMinMax.h new file mode 100644 index 00000000000..75e83f3c53f --- /dev/null +++ b/extern/bullet2/src/LinearMath/btSimdMinMax.h @@ -0,0 +1,41 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef SIMD_MINMAX_H +#define SIMD_MINMAX_H +#include "btScalar.h" + +template +SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b) { + return b < a ? b : a; +} + +template +SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b) { + return a < b ? b : a; +} + +template +SIMD_FORCE_INLINE void btSetMin(T& a, const T& b) { + if (a > b) a = b; +} + +template +SIMD_FORCE_INLINE void btSetMax(T& a, const T& b) { + if (a < b) a = b; +} + +#endif diff --git a/extern/bullet2/src/LinearMath/btStackAlloc.h b/extern/bullet2/src/LinearMath/btStackAlloc.h new file mode 100644 index 00000000000..d219b453537 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btStackAlloc.h @@ -0,0 +1,106 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +/* +StackAlloc extracted from GJK-EPA collision solver by Nathanael Presson +Nov.2006 +*/ + +#ifndef BT_STACK_ALLOC +#define BT_STACK_ALLOC + +#include "btScalar.h" //for btAssert + +struct btBlock +{ + btBlock* previous; + unsigned char* address; +}; + +///StackAlloc provides some fast stack-based memory allocator (LIFO last-in first-out) +class btStackAlloc +{ +public: + + btStackAlloc(unsigned int size) { ctor();create(size); } + ~btStackAlloc() { destroy(); } + + inline void create(unsigned int size) + { + destroy(); + data = new unsigned char[size]; + totalsize = size; + } + inline void destroy() + { + btAssert(usedsize==0); + //Raise(L"StackAlloc is still in use"); + + if(usedsize==0) + { + if(!ischild) delete[] data; + data = 0; + usedsize = 0; + } + + } + unsigned char* allocate(unsigned int size) + { + const unsigned int nus(usedsize+size); + if(nusprevious = current; + pb->address = data+usedsize; + current = pb; + return(pb); + } + inline void endBlock(btBlock* block) + { + btAssert(block==current); + //Raise(L"Unmatched blocks"); + if(block==current) + { + current = block->previous; + usedsize = (unsigned int)((block->address-data)-sizeof(btBlock)); + } + } + +private: + void ctor() + { + data = 0; + totalsize = 0; + usedsize = 0; + current = 0; + ischild = false; + } + unsigned char* data; + unsigned int totalsize; + unsigned int usedsize; + btBlock* current; + bool ischild; +}; + +#endif //BT_STACK_ALLOC diff --git a/extern/bullet2/src/LinearMath/btTransform.h b/extern/bullet2/src/LinearMath/btTransform.h new file mode 100644 index 00000000000..2d55fec83a4 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btTransform.h @@ -0,0 +1,206 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef btTransform_H +#define btTransform_H + +#include "btVector3.h" +#include "btMatrix3x3.h" + + +///btTransform supports rigid transforms (only translation and rotation, no scaling/shear) +class btTransform { + + +public: + + + btTransform() {} + + explicit SIMD_FORCE_INLINE btTransform(const btQuaternion& q, + const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) + : m_basis(q), + m_origin(c) + {} + + explicit SIMD_FORCE_INLINE btTransform(const btMatrix3x3& b, + const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0))) + : m_basis(b), + m_origin(c) + {} + + SIMD_FORCE_INLINE btTransform (const btTransform& other) + : m_basis(other.m_basis), + m_origin(other.m_origin) + { + } + + SIMD_FORCE_INLINE btTransform& operator=(const btTransform& other) + { + m_basis = other.m_basis; + m_origin = other.m_origin; + return *this; + } + + + SIMD_FORCE_INLINE void mult(const btTransform& t1, const btTransform& t2) { + m_basis = t1.m_basis * t2.m_basis; + m_origin = t1(t2.m_origin); + } + +/* void multInverseLeft(const btTransform& t1, const btTransform& t2) { + btVector3 v = t2.m_origin - t1.m_origin; + m_basis = btMultTransposeLeft(t1.m_basis, t2.m_basis); + m_origin = v * t1.m_basis; + } + */ + + + SIMD_FORCE_INLINE btVector3 operator()(const btVector3& x) const + { + return btVector3(m_basis[0].dot(x) + m_origin.x(), + m_basis[1].dot(x) + m_origin.y(), + m_basis[2].dot(x) + m_origin.z()); + } + + SIMD_FORCE_INLINE btVector3 operator*(const btVector3& x) const + { + return (*this)(x); + } + + SIMD_FORCE_INLINE btMatrix3x3& getBasis() { return m_basis; } + SIMD_FORCE_INLINE const btMatrix3x3& getBasis() const { return m_basis; } + + SIMD_FORCE_INLINE btVector3& getOrigin() { return m_origin; } + SIMD_FORCE_INLINE const btVector3& getOrigin() const { return m_origin; } + + btQuaternion getRotation() const { + btQuaternion q; + m_basis.getRotation(q); + return q; + } + template + void setValue(const Scalar2 *m) + { + m_basis.setValue(m); + m_origin.setValue(&m[12]); + } + + + void setFromOpenGLMatrix(const btScalar *m) + { + m_basis.setFromOpenGLSubMatrix(m); + m_origin.setValue(m[12],m[13],m[14]); + } + + void getOpenGLMatrix(btScalar *m) const + { + m_basis.getOpenGLSubMatrix(m); + m[12] = m_origin.x(); + m[13] = m_origin.y(); + m[14] = m_origin.z(); + m[15] = btScalar(1.0); + } + + SIMD_FORCE_INLINE void setOrigin(const btVector3& origin) + { + m_origin = origin; + } + + SIMD_FORCE_INLINE btVector3 invXform(const btVector3& inVec) const; + + + + SIMD_FORCE_INLINE void setBasis(const btMatrix3x3& basis) + { + m_basis = basis; + } + + SIMD_FORCE_INLINE void setRotation(const btQuaternion& q) + { + m_basis.setRotation(q); + } + + + + void setIdentity() + { + m_basis.setIdentity(); + m_origin.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)); + } + + + btTransform& operator*=(const btTransform& t) + { + m_origin += m_basis * t.m_origin; + m_basis *= t.m_basis; + return *this; + } + + btTransform inverse() const + { + btMatrix3x3 inv = m_basis.transpose(); + return btTransform(inv, inv * -m_origin); + } + + btTransform inverseTimes(const btTransform& t) const; + + btTransform operator*(const btTransform& t) const; + + static btTransform getIdentity() + { + btTransform tr; + tr.setIdentity(); + return tr; + } + +private: + + btMatrix3x3 m_basis; + btVector3 m_origin; +}; + + +SIMD_FORCE_INLINE btVector3 +btTransform::invXform(const btVector3& inVec) const +{ + btVector3 v = inVec - m_origin; + return (m_basis.transpose() * v); +} + +SIMD_FORCE_INLINE btTransform +btTransform::inverseTimes(const btTransform& t) const +{ + btVector3 v = t.getOrigin() - m_origin; + return btTransform(m_basis.transposeTimes(t.m_basis), + v * m_basis); +} + +SIMD_FORCE_INLINE btTransform +btTransform::operator*(const btTransform& t) const +{ + return btTransform(m_basis * t.m_basis, + (*this)(t.m_origin)); +} + + + +#endif + + + + + diff --git a/extern/bullet2/src/LinearMath/btTransformUtil.h b/extern/bullet2/src/LinearMath/btTransformUtil.h new file mode 100644 index 00000000000..bc42fd166b6 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btTransformUtil.h @@ -0,0 +1,138 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + +#ifndef SIMD_TRANSFORM_UTIL_H +#define SIMD_TRANSFORM_UTIL_H + +#include "btTransform.h" +#define ANGULAR_MOTION_THRESHOLD btScalar(0.5)*SIMD_HALF_PI + + + +#define SIMDSQRT12 btScalar(0.7071067811865475244008443621048490) + +#define btRecipSqrt(x) ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */ + +inline btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& supportDir) +{ + return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(), + supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(), + supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z()); +} + + +inline void btPlaneSpace1 (const btVector3& n, btVector3& p, btVector3& q) +{ + if (btFabs(n.z()) > SIMDSQRT12) { + // choose p in y-z plane + btScalar a = n[1]*n[1] + n[2]*n[2]; + btScalar k = btRecipSqrt (a); + p.setValue(0,-n[2]*k,n[1]*k); + // set q = n x p + q.setValue(a*k,-n[0]*p[2],n[0]*p[1]); + } + else { + // choose p in x-y plane + btScalar a = n.x()*n.x() + n.y()*n.y(); + btScalar k = btRecipSqrt (a); + p.setValue(-n.y()*k,n.x()*k,0); + // set q = n x p + q.setValue(-n.z()*p.y(),n.z()*p.x(),a*k); + } +} + + + +/// Utils related to temporal transforms +class btTransformUtil +{ + +public: + + static void integrateTransform(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep,btTransform& predictedTransform) + { + predictedTransform.setOrigin(curTrans.getOrigin() + linvel * timeStep); +// #define QUATERNION_DERIVATIVE + #ifdef QUATERNION_DERIVATIVE + btQuaternion predictedOrn = curTrans.getRotation(); + predictedOrn += (angvel * predictedOrn) * (timeStep * btScalar(0.5)); + predictedOrn.normalize(); + #else + //exponential map + btVector3 axis; + btScalar fAngle = angvel.length(); + //limit the angular motion + if (fAngle*timeStep > ANGULAR_MOTION_THRESHOLD) + { + fAngle = ANGULAR_MOTION_THRESHOLD / timeStep; + } + + if ( fAngle < btScalar(0.001) ) + { + // use Taylor's expansions of sync function + axis = angvel*( btScalar(0.5)*timeStep-(timeStep*timeStep*timeStep)*(btScalar(0.020833333333))*fAngle*fAngle ); + } + else + { + // sync(fAngle) = sin(c*fAngle)/t + axis = angvel*( btSin(btScalar(0.5)*fAngle*timeStep)/fAngle ); + } + btQuaternion dorn (axis.x(),axis.y(),axis.z(),btCos( fAngle*timeStep*btScalar(0.5) )); + btQuaternion orn0 = curTrans.getRotation(); + + btQuaternion predictedOrn = dorn * orn0; + predictedOrn.normalize(); + #endif + predictedTransform.setRotation(predictedOrn); + } + + static void calculateVelocity(const btTransform& transform0,const btTransform& transform1,btScalar timeStep,btVector3& linVel,btVector3& angVel) + { + linVel = (transform1.getOrigin() - transform0.getOrigin()) / timeStep; + btVector3 axis; + btScalar angle; + calculateDiffAxisAngle(transform0,transform1,axis,angle); + angVel = axis * angle / timeStep; + } + + static void calculateDiffAxisAngle(const btTransform& transform0,const btTransform& transform1,btVector3& axis,btScalar& angle) + { + + #ifdef USE_QUATERNION_DIFF + btQuaternion orn0 = transform0.getRotation(); + btQuaternion orn1a = transform1.getRotation(); + btQuaternion orn1 = orn0.farthest(orn1a); + btQuaternion dorn = orn1 * orn0.inverse(); +#else + btMatrix3x3 dmat = transform1.getBasis() * transform0.getBasis().inverse(); + btQuaternion dorn; + dmat.getRotation(dorn); +#endif//USE_QUATERNION_DIFF + + angle = dorn.getAngle(); + axis = btVector3(dorn.x(),dorn.y(),dorn.z()); + axis[3] = btScalar(0.); + //check for axis length + btScalar len = axis.length2(); + if (len < SIMD_EPSILON*SIMD_EPSILON) + axis = btVector3(btScalar(1.),btScalar(0.),btScalar(0.)); + else + axis /= btSqrt(len); + } + +}; + +#endif //SIMD_TRANSFORM_UTIL_H + diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h new file mode 100644 index 00000000000..74d41ad2a19 --- /dev/null +++ b/extern/bullet2/src/LinearMath/btVector3.h @@ -0,0 +1,402 @@ +/* +Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + + + +#ifndef SIMD__VECTOR3_H +#define SIMD__VECTOR3_H + +#include "btQuadWord.h" + +///btVector3 can be used to represent 3D points and vectors. +///It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user +///Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers +class btVector3 : public btQuadWord { + +public: + SIMD_FORCE_INLINE btVector3() {} + + + + SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z) + :btQuadWord(x,y,z,btScalar(0.)) + { + } + +// SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) +// : btQuadWord(x,y,z,w) +// { +// } + + + + SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v) + { + m_x += v.x(); m_y += v.y(); m_z += v.z(); + return *this; + } + + + + SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v) + { + m_x -= v.x(); m_y -= v.y(); m_z -= v.z(); + return *this; + } + + SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s) + { + m_x *= s; m_y *= s; m_z *= s; + return *this; + } + + SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s) + { + btFullAssert(s != btScalar(0.0)); + return *this *= btScalar(1.0) / s; + } + + SIMD_FORCE_INLINE btScalar dot(const btVector3& v) const + { + return m_x * v.x() + m_y * v.y() + m_z * v.z(); + } + + SIMD_FORCE_INLINE btScalar length2() const + { + return dot(*this); + } + + SIMD_FORCE_INLINE btScalar length() const + { + return btSqrt(length2()); + } + + SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const; + + SIMD_FORCE_INLINE btScalar distance(const btVector3& v) const; + + SIMD_FORCE_INLINE btVector3& normalize() + { + return *this /= length(); + } + + SIMD_FORCE_INLINE btVector3 normalized() const; + + SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ); + + SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const + { + btScalar s = btSqrt(length2() * v.length2()); + btFullAssert(s != btScalar(0.0)); + return btAcos(dot(v) / s); + } + + SIMD_FORCE_INLINE btVector3 absolute() const + { + return btVector3( + btFabs(m_x), + btFabs(m_y), + btFabs(m_z)); + } + + SIMD_FORCE_INLINE btVector3 cross(const btVector3& v) const + { + return btVector3( + m_y * v.z() - m_z * v.y(), + m_z * v.x() - m_x * v.z(), + m_x * v.y() - m_y * v.x()); + } + + SIMD_FORCE_INLINE btScalar triple(const btVector3& v1, const btVector3& v2) const + { + return m_x * (v1.y() * v2.z() - v1.z() * v2.y()) + + m_y * (v1.z() * v2.x() - v1.x() * v2.z()) + + m_z * (v1.x() * v2.y() - v1.y() * v2.x()); + } + + SIMD_FORCE_INLINE int minAxis() const + { + return m_x < m_y ? (m_x < m_z ? 0 : 2) : (m_y < m_z ? 1 : 2); + } + + SIMD_FORCE_INLINE int maxAxis() const + { + return m_x < m_y ? (m_y < m_z ? 2 : 1) : (m_x < m_z ? 2 : 0); + } + + SIMD_FORCE_INLINE int furthestAxis() const + { + return absolute().minAxis(); + } + + SIMD_FORCE_INLINE int closestAxis() const + { + return absolute().maxAxis(); + } + + SIMD_FORCE_INLINE void setInterpolate3(const btVector3& v0, const btVector3& v1, btScalar rt) + { + btScalar s = btScalar(1.0) - rt; + m_x = s * v0.x() + rt * v1.x(); + m_y = s * v0.y() + rt * v1.y(); + m_z = s * v0.z() + rt * v1.z(); + //don't do the unused w component + // m_co[3] = s * v0[3] + rt * v1[3]; + } + + SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v, const btScalar& t) const + { + return btVector3(m_x + (v.x() - m_x) * t, + m_y + (v.y() - m_y) * t, + m_z + (v.z() - m_z) * t); + } + + + SIMD_FORCE_INLINE btVector3& operator*=(const btVector3& v) + { + m_x *= v.x(); m_y *= v.y(); m_z *= v.z(); + return *this; + } + + + +}; + +SIMD_FORCE_INLINE btVector3 +operator+(const btVector3& v1, const btVector3& v2) +{ + return btVector3(v1.x() + v2.x(), v1.y() + v2.y(), v1.z() + v2.z()); +} + +SIMD_FORCE_INLINE btVector3 +operator*(const btVector3& v1, const btVector3& v2) +{ + return btVector3(v1.x() * v2.x(), v1.y() * v2.y(), v1.z() * v2.z()); +} + +SIMD_FORCE_INLINE btVector3 +operator-(const btVector3& v1, const btVector3& v2) +{ + return btVector3(v1.x() - v2.x(), v1.y() - v2.y(), v1.z() - v2.z()); +} + +SIMD_FORCE_INLINE btVector3 +operator-(const btVector3& v) +{ + return btVector3(-v.x(), -v.y(), -v.z()); +} + +SIMD_FORCE_INLINE btVector3 +operator*(const btVector3& v, const btScalar& s) +{ + return btVector3(v.x() * s, v.y() * s, v.z() * s); +} + +SIMD_FORCE_INLINE btVector3 +operator*(const btScalar& s, const btVector3& v) +{ + return v * s; +} + +SIMD_FORCE_INLINE btVector3 +operator/(const btVector3& v, const btScalar& s) +{ + btFullAssert(s != btScalar(0.0)); + return v * (btScalar(1.0) / s); +} + +SIMD_FORCE_INLINE btVector3 +operator/(const btVector3& v1, const btVector3& v2) +{ + return btVector3(v1.x() / v2.x(),v1.y() / v2.y(),v1.z() / v2.z()); +} + +SIMD_FORCE_INLINE btScalar +dot(const btVector3& v1, const btVector3& v2) +{ + return v1.dot(v2); +} + + + +SIMD_FORCE_INLINE btScalar +distance2(const btVector3& v1, const btVector3& v2) +{ + return v1.distance2(v2); +} + + +SIMD_FORCE_INLINE btScalar +distance(const btVector3& v1, const btVector3& v2) +{ + return v1.distance(v2); +} + +SIMD_FORCE_INLINE btScalar +angle(const btVector3& v1, const btVector3& v2) +{ + return v1.angle(v2); +} + +SIMD_FORCE_INLINE btVector3 +cross(const btVector3& v1, const btVector3& v2) +{ + return v1.cross(v2); +} + +SIMD_FORCE_INLINE btScalar +triple(const btVector3& v1, const btVector3& v2, const btVector3& v3) +{ + return v1.triple(v2, v3); +} + +SIMD_FORCE_INLINE btVector3 +lerp(const btVector3& v1, const btVector3& v2, const btScalar& t) +{ + return v1.lerp(v2, t); +} + + +SIMD_FORCE_INLINE bool operator==(const btVector3& p1, const btVector3& p2) +{ + return p1.x() == p2.x() && p1.y() == p2.y() && p1.z() == p2.z(); +} + +SIMD_FORCE_INLINE btScalar btVector3::distance2(const btVector3& v) const +{ + return (v - *this).length2(); +} + +SIMD_FORCE_INLINE btScalar btVector3::distance(const btVector3& v) const +{ + return (v - *this).length(); +} + +SIMD_FORCE_INLINE btVector3 btVector3::normalized() const +{ + return *this / length(); +} + +SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) +{ + // wAxis must be a unit lenght vector + + btVector3 o = wAxis * wAxis.dot( *this ); + btVector3 x = *this - o; + btVector3 y; + + y = wAxis.cross( *this ); + + return ( o + x * btCos( angle ) + y * btSin( angle ) ); +} + +class btVector4 : public btVector3 +{ +public: + + SIMD_FORCE_INLINE btVector4() {} + + + SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w) + : btVector3(x,y,z) + { + m_unusedW = w; + } + + + SIMD_FORCE_INLINE btVector4 absolute4() const + { + return btVector4( + btFabs(m_x), + btFabs(m_y), + btFabs(m_z), + btFabs(m_unusedW)); + } + + + + btScalar getW() const { return m_unusedW;} + + + SIMD_FORCE_INLINE int maxAxis4() const + { + int maxIndex = -1; + btScalar maxVal = btScalar(-1e30); + if (m_x > maxVal) + { + maxIndex = 0; + maxVal = m_x; + } + if (m_y > maxVal) + { + maxIndex = 1; + maxVal = m_y; + } + if (m_z > maxVal) + { + maxIndex = 2; + maxVal = m_z; + } + if (m_unusedW > maxVal) + { + maxIndex = 3; + maxVal = m_unusedW; + } + + + + + return maxIndex; + + } + + + SIMD_FORCE_INLINE int minAxis4() const + { + int minIndex = -1; + btScalar minVal = btScalar(1e30); + if (m_x < minVal) + { + minIndex = 0; + minVal = m_x; + } + if (m_y < minVal) + { + minIndex = 1; + minVal = m_y; + } + if (m_z < minVal) + { + minIndex = 2; + minVal = m_z; + } + if (m_unusedW < minVal) + { + minIndex = 3; + minVal = m_unusedW; + } + + return minIndex; + + } + + + SIMD_FORCE_INLINE int closestAxis4() const + { + return absolute4().maxAxis4(); + } + +}; + +#endif //SIMD__VECTOR3_H diff --git a/extern/bullet2/src/Makefile b/extern/bullet2/src/Makefile new file mode 100644 index 00000000000..d7bb6a5e427 --- /dev/null +++ b/extern/bullet2/src/Makefile @@ -0,0 +1,68 @@ +# +# $Id: Makefile 14444 2008-04-16 22:40:48Z hos $ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# + +LIBNAME = bullet2 +DIR = $(OCGDIR)/extern/$(LIBNAME) + +BULLETDIRS = \ +LinearMath \ +BulletCollision/BroadphaseCollision \ +BulletCollision/CollisionShapes \ +BulletCollision/NarrowPhaseCollision \ +BulletCollision/CollisionDispatch \ +BulletDynamics/ConstraintSolver \ +BulletDynamics/Vehicle \ +BulletDynamics/Dynamics + +CCSRCS = $(wildcard \ +LinearMath/*.cpp \ +BulletCollision/BroadphaseCollision/*.cpp \ +BulletCollision/CollisionShapes/*.cpp \ +BulletCollision/NarrowPhaseCollision/*.cpp \ +BulletCollision/CollisionDispatch/*.cpp \ +BulletDynamics/ConstraintSolver/*.cpp \ +BulletDynamics/Vehicle/*.cpp \ +BulletDynamics/Dynamics/*.cpp) + +CPPFLAGS += -D_LIB -I. -IBulletCollision -IBulletDynamics -ILinearMath + +all debug:: objdirs + +include nan_compile.mk + +.PHONY: objdirs clean +objdirs: + @for i in $(BULLETDIRS); do \ + [ -d $(DIR)/$(DEBUG_DIR)$$i ] || mkdir -p $(DIR)/$(DEBUG_DIR)$$i; \ + done + +clean:: + rm -rf $(DIR) + rm -rf $(NAN_BULLET2)/lib/libbullet2.a + rm -rf $(NAN_BULLET2)/include diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript new file mode 100644 index 00000000000..19702782b0d --- /dev/null +++ b/extern/bullet2/src/SConscript @@ -0,0 +1,98 @@ +#!/usr/bin/python +import sys +import os + +Import('env') + +defs = 'USE_DOUBLES QHULL _LIB' +cflags = [] + +if env['OURPLATFORM']=='win32-vc': + defs += ' WIN32 NDEBUG _WINDOWS _LIB' + #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op'] + cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] +elif env['OURPLATFORM']=='win32-mingw': + defs += ' NDEBUG' + cflags += ['-O2'] +elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5': + defs += ' NDEBUG' + cflags += ['-O2'] +elif sys.platform=='darwin': + defs += ' NDEBUG' + cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math'] + +linearmath_src = env.Glob("LinearMath/*.cpp") +bulletdyn_src = ["BulletDynamics/ConstraintSolver/btContactConstraint.cpp", + "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp", + "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp", + "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp", + "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp", + "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp", + "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp", + "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp", + "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp", + "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp", + "BulletDynamics/Dynamics/btRigidBody.cpp", + "BulletDynamics/Vehicle/btRaycastVehicle.cpp", + "BulletDynamics/Dynamics/Bullet-C-API.cpp", + "BulletDynamics/Vehicle/btWheelInfo.cpp"] +collision_src = ["BulletCollision/BroadphaseCollision/btAxisSweep3.cpp", + "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp", + "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp", + "BulletCollision/BroadphaseCollision/btDispatcher.cpp", + "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp", + "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp", + "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp", + "BulletCollision/CollisionDispatch/btCollisionObject.cpp", + "BulletCollision/CollisionDispatch/btCollisionWorld.cpp", + "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp", + "BulletCollision/CollisionDispatch/btManifoldResult.cpp", + "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp", + "BulletCollision/CollisionDispatch/btUnionFind.cpp", + "BulletCollision/CollisionShapes/btBoxShape.cpp", + "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp", + "BulletCollision/CollisionShapes/btCollisionShape.cpp", + "BulletCollision/CollisionShapes/btCompoundShape.cpp", + "BulletCollision/CollisionShapes/btConcaveShape.cpp", + "BulletCollision/CollisionShapes/btConeShape.cpp", + "BulletCollision/CollisionShapes/btConvexHullShape.cpp", + "BulletCollision/CollisionShapes/btConvexShape.cpp", + "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp", + "BulletCollision/CollisionShapes/btCylinderShape.cpp", + "BulletCollision/CollisionShapes/btEmptyShape.cpp", + "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp", + "BulletCollision/CollisionShapes/btMultiSphereShape.cpp", + "BulletCollision/CollisionShapes/btOptimizedBvh.cpp", + "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp", + "BulletCollision/CollisionShapes/btTetrahedronShape.cpp", + "BulletCollision/CollisionShapes/btSphereShape.cpp", + "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp", + "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp", + "BulletCollision/CollisionShapes/btTriangleCallback.cpp", + "BulletCollision/CollisionShapes/btTriangleBuffer.cpp", + "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp", + "BulletCollision/CollisionShapes/btTriangleMesh.cpp", + "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp", + "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp", + "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp", + "BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp", + "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp", + "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp", + "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp", + "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp", + "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp", + "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp", + "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp", + "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp", + "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"] + +incs = '. BulletCollision BulletDynamics LinearMath' + +env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[19, 169], compileflags=cflags ) +env.BlenderLib ( libname = 'extern_bullet2collision', sources=collision_src, includes=Split(incs), defines=Split(defs), libtype=['game2', 'player'], priority=[20, 170], compileflags=cflags ) diff --git a/extern/bullet2/src/btBulletCollisionCommon.h b/extern/bullet2/src/btBulletCollisionCommon.h new file mode 100644 index 00000000000..8417ccc671f --- /dev/null +++ b/extern/bullet2/src/btBulletCollisionCommon.h @@ -0,0 +1,61 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BULLET_COLLISION_COMMON_H +#define BULLET_COLLISION_COMMON_H + +///Common headerfile includes for Bullet Collision Detection + +///Bullet's btCollisionWorld and btCollisionObject definitions +#include "BulletCollision/CollisionDispatch/btCollisionWorld.h" +#include "BulletCollision/CollisionDispatch/btCollisionObject.h" + +///Collision Shapes +#include "BulletCollision/CollisionShapes/btBoxShape.h" +#include "BulletCollision/CollisionShapes/btSphereShape.h" +#include "BulletCollision/CollisionShapes/btCapsuleShape.h" +#include "BulletCollision/CollisionShapes/btCylinderShape.h" +#include "BulletCollision/CollisionShapes/btConeShape.h" +#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" +#include "BulletCollision/CollisionShapes/btConvexHullShape.h" +#include "BulletCollision/CollisionShapes/btTriangleMesh.h" +#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h" +#include "BulletCollision/CollisionShapes/btCompoundShape.h" +#include "BulletCollision/CollisionShapes/btTetrahedronShape.h" +#include "BulletCollision/CollisionShapes/btEmptyShape.h" +#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" +#include "BulletCollision/CollisionShapes/btMultiSphereShape.h" + +///Narrowphase Collision Detector +#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h" +#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h" + +///Dispatching and generation of collision pairs (broadphase) +#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" +#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" +#include "BulletCollision/BroadphaseCollision/btAxisSweep3.h" + + +///Math library & Utils +#include "LinearMath/btQuaternion.h" +#include "LinearMath/btTransform.h" +#include "LinearMath/btDefaultMotionState.h" +#include "LinearMath/btQuickprof.h" +#include "LinearMath/btIDebugDraw.h" + +#endif //BULLET_COLLISION_COMMON_H + diff --git a/extern/bullet2/src/btBulletDynamicsCommon.h b/extern/bullet2/src/btBulletDynamicsCommon.h new file mode 100644 index 00000000000..25f016cba8a --- /dev/null +++ b/extern/bullet2/src/btBulletDynamicsCommon.h @@ -0,0 +1,42 @@ +/* +Bullet Continuous Collision Detection and Physics Library +Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ + +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it freely, +subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. +*/ + +#ifndef BULLET_DYNAMICS_COMMON_H +#define BULLET_DYNAMICS_COMMON_H + +///Common headerfile includes for Bullet Dynamics, including Collision Detection +#include "btBulletCollisionCommon.h" + +#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h" +#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h" +#include "BulletDynamics/Dynamics/btRigidBody.h" + +#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h" +#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h" +#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h" +#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h" + + +#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h" +///Vehicle simulation, with wheel contact simulated by raycasts +#include "BulletDynamics/Vehicle/btRaycastVehicle.h" + + + + + + +#endif //BULLET_DYNAMICS_COMMON_H + From a68c03e409e01285bee622b12313117012e486a8 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 7 May 2008 20:42:16 +0000 Subject: [PATCH 094/430] Reason of all this work: Commiting my work-in-progress on reviewed collision system (better + general access to kdop, uses less memory, put it into BLI_* namespace and usage defined like existing BLI_kdtree_*). Deleted old kdop.c --- intern/sph/SConscript | 11 + intern/sph/extern/sph_extern.h | 51 ++ intern/sph/intern/sph.cpp | 51 ++ source/blender/blenkernel/BKE_cloth.h | 20 +- source/blender/blenkernel/BKE_collision.h | 36 +- source/blender/blenkernel/BKE_effect.h | 1 + source/blender/blenkernel/BKE_sph.h | 69 ++ source/blender/blenkernel/CCGSubSurf.h | 152 ++++ source/blender/blenkernel/SConscript | 1 + source/blender/blenkernel/bmesh_private.h | 71 ++ source/blender/blenkernel/intern/cloth.c | 126 +-- source/blender/blenkernel/intern/collision.c | 684 ++++++++------- source/blender/blenkernel/intern/kdop.c | 860 ------------------- source/blender/blenkernel/intern/modifier.c | 125 ++- source/blender/blenkernel/intern/sph.c | 490 +++++++++++ source/blender/blenlib/BLI_kdopbvh.h | 63 ++ source/blender/blenlib/intern/BLI_kdopbvh.c | 786 +++++++++++++++++ source/blender/blenloader/intern/readfile.c | 20 +- source/blender/include/butspace.h | 4 + source/blender/makesdna/DNA_modifier_types.h | 11 +- source/blender/makesdna/DNA_sph_types.h | 102 +++ source/blender/src/buttons_editing.c | 8 +- source/blender/src/buttons_object.c | 136 +++ source/blender/src/drawobject.c | 22 +- 24 files changed, 2614 insertions(+), 1286 deletions(-) create mode 100644 intern/sph/SConscript create mode 100644 intern/sph/extern/sph_extern.h create mode 100644 intern/sph/intern/sph.cpp create mode 100644 source/blender/blenkernel/BKE_sph.h create mode 100644 source/blender/blenkernel/CCGSubSurf.h create mode 100644 source/blender/blenkernel/bmesh_private.h delete mode 100644 source/blender/blenkernel/intern/kdop.c create mode 100644 source/blender/blenkernel/intern/sph.c create mode 100644 source/blender/blenlib/BLI_kdopbvh.h create mode 100644 source/blender/blenlib/intern/BLI_kdopbvh.c create mode 100644 source/blender/makesdna/DNA_sph_types.h diff --git a/intern/sph/SConscript b/intern/sph/SConscript new file mode 100644 index 00000000000..52243f767c3 --- /dev/null +++ b/intern/sph/SConscript @@ -0,0 +1,11 @@ +#!/usr/bin/python +import sys +import os +Import('env') + +sources = env.Glob('intern/*.cpp') + +incs = ' . extern intern' +defs = '' + +env.BlenderLib ('bf_sph', sources, Split(incs), Split(defs), libtype='blender', priority=0 ) diff --git a/intern/sph/extern/sph_extern.h b/intern/sph/extern/sph_extern.h new file mode 100644 index 00000000000..b4964739212 --- /dev/null +++ b/intern/sph/extern/sph_extern.h @@ -0,0 +1,51 @@ +/** + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Daniel Genrich. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ + +#ifndef PW_EXTERN_H +#define PW_EXTERN_H + + + +#ifdef __cplusplus +extern "C" { +#endif +/* +void sph_init_cpp(struct SphModifierData *sphmd); +void sph_free_cpp(struct SphModifierData *sphmd); +int sph_simulate_cpp(struct Object *ob, struct SphModifierData *sphmd, float frame, struct ListBase *effectors); +*/ +#ifdef __cplusplus +} +#endif + + +#endif //PW_EXTERN_H + + diff --git a/intern/sph/intern/sph.cpp b/intern/sph/intern/sph.cpp new file mode 100644 index 00000000000..f7afa3c34eb --- /dev/null +++ b/intern/sph/intern/sph.cpp @@ -0,0 +1,51 @@ +/* pw.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* Contributor(s): Daniel Genrich +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include + +#include "sph_extern.h" +/* +extern "C" void sph_init_cpp(struct SphModifierData *sphmd) +{ + +} +/* +extern "C" void sph_free_cpp(struct SphModifierData *sphmd) +{ + + +} + +extern "C" int sph_simulate_cpp(struct Object *ob, struct SphModifierData *sphmd, float frame, struct ListBase *effectors) +{ + + return 1; +} +*/ diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index af920e9762d..f01ed6bbea4 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -24,14 +24,14 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): Daniel Genrich. * * ***** END GPL LICENSE BLOCK ***** */ #ifndef BKE_CLOTH_H #define BKE_CLOTH_H -#include "float.h" +#include #include "BLI_linklist.h" #include "BKE_customdata.h" @@ -49,6 +49,9 @@ #include "BKE_collision.h" +#include "RE_raytrace.h" + + struct Object; struct MFace; @@ -102,7 +105,8 @@ typedef struct Cloth unsigned char old_solver_type; /* unused, only 1 solver here */ unsigned char pad2; short pad3; - struct BVH *tree; /* collision tree for this cloth object */ + struct BVHTree *bvhtree; /* collision tree for this cloth object */ + struct RayTree *selftree; /* collision tree for this cloth object */ struct MFace *mfaces; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ struct Implicit_Data *implicitEM; /* our implicit solver connects to this pointer */ @@ -171,17 +175,10 @@ ClothSpring; /* These are the bits used in SimSettings.flags. */ typedef enum { - //CLOTH_SIMSETTINGS_FLAG_RESET = ( 1 << 1 ), // The CM object requires a reinitializaiton. CLOTH_SIMSETTINGS_FLAG_COLLOBJ = ( 1 << 2 ),// object is only collision object, no cloth simulation is done CLOTH_SIMSETTINGS_FLAG_GOAL = ( 1 << 3 ), // we have goals enabled CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled - //CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT = ( 1 << 5 ), // true if tearing is enabled - //CLOTH_SIMSETTINGS_FLAG_EDITMODE = ( 1 << 6 ), // are we in editmode? -several things disabled - //CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE = ( 1 << 7 ), /* force cache freeing */ CLOTH_SIMSETTINGS_FLAG_SCALING = ( 1 << 8 ), /* is advanced scaling active? */ - //CLOTH_SIMSETTINGS_FLAG_LOADED = ( 1 << 9 ), /* did we just got load? */ - //CLOTH_SIMSETTINGS_FLAG_AUTOPROTECT = ( 1 << 10 ), /* is autoprotect enabled? */ - //CLOTH_SIMSETTINGS_FLAG_CCACHE_OUTDATED = (1 << 11), /* while protected, did cache get outdated? */ CLOTH_SIMSETTINGS_FLAG_CCACHE_EDIT = (1 << 12) /* edit cache in editmode */ } CLOTH_SIMSETTINGS_FLAGS; @@ -208,6 +205,7 @@ typedef enum CLOTH_SPRING_FLAG_NEEDED = ( 1 << 2 ), // springs has values to be applied } CLOTH_SPRINGS_FLAGS; + ///////////////////////////////////////////////// // collision.c //////////////////////////////////////////////// @@ -246,7 +244,7 @@ DerivedMesh *clothModifier_do ( ClothModifierData *clmd,Object *ob, DerivedMesh void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int totface ); // needed for collision.c -void bvh_update_from_cloth ( ClothModifierData *clmd, int moving ); +void bvhtree_update_from_cloth ( ClothModifierData *clmd, int moving ); // needed for editmesh.c void cloth_write_cache ( Object *ob, ClothModifierData *clmd, float framenr ); diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 7328f9108e3..f0298950f8b 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -32,7 +32,7 @@ #define BKE_COLLISIONS_H #include -#include "float.h" +#include #include #include @@ -47,6 +47,8 @@ #include "DNA_modifier_types.h" #include "DNA_object_types.h" +#include "BLI_kdopbvh.h" + struct Object; struct Cloth; struct MFace; @@ -102,10 +104,16 @@ BVH; typedef void ( *CM_COLLISION_RESPONSE ) ( ModifierData *md1, ModifierData *md2, CollisionTree *tree1, CollisionTree *tree2 ); // needed for collision.c -int bvh_traverse ( ModifierData * md1, ModifierData * md2, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response, int selfcollision); +int bvh_traverse ( ModifierData * md1, ModifierData * md2, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response, int selfcollision ); //////////////////////////////////////// +/* COLLISION FLAGS */ +typedef enum +{ + COLLISION_IN_FUTURE = ( 1 << 1 ), +} COLLISION_FLAGS; + //////////////////////////////////////// // used for collisions in kdop.c and also collision.c @@ -119,10 +127,10 @@ typedef struct CollPair float normal[3]; float vector[3]; // unnormalized collision vector: p2-p1 float pa[3], pb[3]; // collision point p1 on face1, p2 on face2 - int lastsign; // indicates if the distance sign has changed, unused itm + int flag; float time; // collision time, from 0 up to 1 - unsigned int ap1, ap2, ap3, bp1, bp2, bp3; - unsigned int pointsb[4]; + int ap1, ap2, ap3, bp1, bp2, bp3; + int pointsb[4]; } CollPair; @@ -160,8 +168,9 @@ FaceCollPair; // NOTICE: mvert-routines for building + update the BVH are the most native ones // builds bounding volume hierarchy -void bvh_build (BVH *bvh); -BVH *bvh_build_from_mvert (MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon); +void bvh_build ( BVH *bvh ); +BVH *bvh_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon ); +BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon ); // frees the same void bvh_free ( BVH * bvh ); @@ -169,20 +178,21 @@ void bvh_free ( BVH * bvh ); // checks two bounding volume hierarchies for potential collisions and returns some list with those -// update bounding volumes, needs updated positions in bvh->current_xold (static) +// update bounding volumes, needs updated positions in bvh->current_xold (static) // and also bvh->current_x if moving==1 -void bvh_update_from_mvert(BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving); -void bvh_update(BVH * bvh, int moving); +void bvh_update_from_mvert ( BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving ); +void bvh_update ( BVH * bvh, int moving ); +void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int numverts, int moving ); LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); // move Collision modifier object inter-frame with step = [0,1] // defined in collisions.c -void collision_move_object(CollisionModifierData *collmd, float step, float prevstep); +void collision_move_object ( CollisionModifierData *collmd, float step, float prevstep ); // interface for collision functions -void collisions_compute_barycentric (float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3); -void interpolateOnTriangle(float to[3], float v1[3], float v2[3], float v3[3], double w1, double w2, double w3); +void collisions_compute_barycentric ( float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3 ); +void interpolateOnTriangle ( float to[3], float v1[3], float v2[3], float v3[3], double w1, double w2, double w3 ); ///////////////////////////////////////////////// diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 3763a659f2f..15816699285 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -31,6 +31,7 @@ #ifndef BKE_EFFECT_H #define BKE_EFFECT_H +#include "DNA_effect_types.h" #include "DNA_object_types.h" struct Effect; diff --git a/source/blender/blenkernel/BKE_sph.h b/source/blender/blenkernel/BKE_sph.h new file mode 100644 index 00000000000..9fa42f5acb2 --- /dev/null +++ b/source/blender/blenkernel/BKE_sph.h @@ -0,0 +1,69 @@ +/** + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Daniel Genrich. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ +#ifndef BKE_SPH_H +#define BKE_SPH_H + + +#include "BKE_DerivedMesh.h" +#include "BKE_utildefines.h" + +#include "BLI_linklist.h" + +#include "DNA_modifier_types.h" +#include "DNA_object_types.h" + +void sph_init(SphModifierData *sphmd); +void sph_free_modifier (SphModifierData *sphmd); +DerivedMesh *sphModifier_do(SphModifierData *sphmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc); +int sph_init_all (SphModifierData *sphmd, DerivedMesh *dm, Object *ob); + + +/* SIMULATION FLAGS: goal flags,.. */ +/* These are the bits used in SimSettings.flags. */ +// first 16 (short) flags are used for fluid type identification +typedef enum +{ + SPH_SIMSETTINGS_FLAG_FLUID = ( 1 << 0 ), // Fluid object? + SPH_SIMSETTINGS_FLAG_OBSTACLE = ( 1 << 1 ), // Obstacle? + SPH_SIMSETTINGS_FLAG_DOMAIN = ( 1 << 2 ), // Fluid domain + + SPH_SIMSETTINGS_FLAG_GHOSTS = ( 1 << 16 ), // use ghost particles? + SPH_SIMSETTINGS_FLAG_OFFLINE = ( 1 << 17 ), // do offline simulation? + SPH_SIMSETTINGS_FLAG_MULTIRES = ( 1 << 18 ), // use multires? + SPH_SIMSETTINGS_FLAG_VORTICITY = ( 1 << 19 ), // use vorticity enhancement? + SPH_SIMSETTINGS_FLAG_BAKING = ( 1 << 20 ), // is domain baking? + SPH_SIMSETTINGS_FLAG_INIT = ( 1 << 21 ), // inited? +} SPH_SIMSETTINGS_FLAGS; + + +#endif //BKE_SPH_H + + + diff --git a/source/blender/blenkernel/CCGSubSurf.h b/source/blender/blenkernel/CCGSubSurf.h new file mode 100644 index 00000000000..a8269b7ada0 --- /dev/null +++ b/source/blender/blenkernel/CCGSubSurf.h @@ -0,0 +1,152 @@ +/* $Id: CCGSubSurf.h 12931 2007-12-17 18:20:48Z theeth $ */ + +typedef void* CCGMeshHDL; +typedef void* CCGVertHDL; +typedef void* CCGEdgeHDL; +typedef void* CCGFaceHDL; + +typedef struct _CCGVert CCGVert; +typedef struct _CCGEdge CCGEdge; +typedef struct _CCGFace CCGFace; + +typedef struct _CCGMeshIFC CCGMeshIFC; +struct _CCGMeshIFC { + int vertUserSize, edgeUserSize, faceUserSize; + + int vertDataSize; +}; + +/***/ + +typedef void* CCGAllocatorHDL; + +typedef struct _CCGAllocatorIFC CCGAllocatorIFC; +struct _CCGAllocatorIFC { + void* (*alloc) (CCGAllocatorHDL a, int numBytes); + void* (*realloc) (CCGAllocatorHDL a, void *ptr, int newSize, int oldSize); + void (*free) (CCGAllocatorHDL a, void *ptr); + void (*release) (CCGAllocatorHDL a); +}; + +/***/ + +typedef enum { + eCCGError_None = 0, + + eCCGError_InvalidSyncState, + eCCGError_InvalidValue, +} CCGError; + +/***/ + +typedef struct _CCGSubSurf CCGSubSurf; + +CCGSubSurf* ccgSubSurf_new (CCGMeshIFC *ifc, int subdivisionLevels, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator); +void ccgSubSurf_free (CCGSubSurf *ss); + +CCGError ccgSubSurf_sync (CCGSubSurf *ss); + +CCGError ccgSubSurf_initFullSync (CCGSubSurf *ss); +CCGError ccgSubSurf_initPartialSync (CCGSubSurf *ss); + +CCGError ccgSubSurf_syncVert (CCGSubSurf *ss, CCGVertHDL vHDL, void *vertData, int seam, CCGVert **v_r); +CCGError ccgSubSurf_syncEdge (CCGSubSurf *ss, CCGEdgeHDL eHDL, CCGVertHDL e_vHDL0, CCGVertHDL e_vHDL1, float crease, CCGEdge **e_r); +CCGError ccgSubSurf_syncFace (CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGVertHDL *vHDLs, CCGFace **f_r); + +CCGError ccgSubSurf_syncVertDel (CCGSubSurf *ss, CCGVertHDL vHDL); +CCGError ccgSubSurf_syncEdgeDel (CCGSubSurf *ss, CCGEdgeHDL eHDL); +CCGError ccgSubSurf_syncFaceDel (CCGSubSurf *ss, CCGFaceHDL fHDL); + +CCGError ccgSubSurf_processSync (CCGSubSurf *ss); + +CCGError ccgSubSurf_setSubdivisionLevels (CCGSubSurf *ss, int subdivisionLevels); + +CCGError ccgSubSurf_setAllowEdgeCreation (CCGSubSurf *ss, int allowEdgeCreation, float defaultCreaseValue, void *defaultUserData); +void ccgSubSurf_getAllowEdgeCreation (CCGSubSurf *ss, int *allowEdgeCreation_r, float *defaultCreaseValue_r, void *defaultUserData_r); + +void ccgSubSurf_getUseAgeCounts (CCGSubSurf *ss, int *useAgeCounts_r, int *vertUserOffset_r, int *edgeUserOffset_r, int *faceUserOffset_r); +CCGError ccgSubSurf_setUseAgeCounts (CCGSubSurf *ss, int useAgeCounts, int vertUserOffset, int edgeUserOffset, int faceUserOffset); + +CCGError ccgSubSurf_setCalcVertexNormals (CCGSubSurf *ss, int useVertNormals, int normalDataOffset); + +/***/ + +int ccgSubSurf_getNumVerts (CCGSubSurf *ss); +int ccgSubSurf_getNumEdges (CCGSubSurf *ss); +int ccgSubSurf_getNumFaces (CCGSubSurf *ss); + +int ccgSubSurf_getSubdivisionLevels (CCGSubSurf *ss); +int ccgSubSurf_getEdgeSize (CCGSubSurf *ss); +int ccgSubSurf_getEdgeLevelSize (CCGSubSurf *ss, int level); +int ccgSubSurf_getGridSize (CCGSubSurf *ss); +int ccgSubSurf_getGridLevelSize (CCGSubSurf *ss, int level); + +CCGVert* ccgSubSurf_getVert (CCGSubSurf *ss, CCGVertHDL v); +CCGVertHDL ccgSubSurf_getVertVertHandle (CCGSubSurf *ss, CCGVert *v); +int ccgSubSurf_getVertNumFaces (CCGSubSurf *ss, CCGVert *v); +CCGFace* ccgSubSurf_getVertFace (CCGSubSurf *ss, CCGVert *v, int index); +int ccgSubSurf_getVertNumEdges (CCGSubSurf *ss, CCGVert *v); +CCGEdge* ccgSubSurf_getVertEdge (CCGSubSurf *ss, CCGVert *v, int index); + +int ccgSubSurf_getVertAge (CCGSubSurf *ss, CCGVert *v); +void* ccgSubSurf_getVertUserData (CCGSubSurf *ss, CCGVert *v); +void* ccgSubSurf_getVertData (CCGSubSurf *ss, CCGVert *v); +void* ccgSubSurf_getVertLevelData (CCGSubSurf *ss, CCGVert *v, int level); + +CCGEdge* ccgSubSurf_getEdge (CCGSubSurf *ss, CCGEdgeHDL e); +CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle (CCGSubSurf *ss, CCGEdge *e); +int ccgSubSurf_getEdgeNumFaces (CCGSubSurf *ss, CCGEdge *e); +CCGFace* ccgSubSurf_getEdgeFace (CCGSubSurf *ss, CCGEdge *e, int index); +CCGVert* ccgSubSurf_getEdgeVert0 (CCGSubSurf *ss, CCGEdge *e); +CCGVert* ccgSubSurf_getEdgeVert1 (CCGSubSurf *ss, CCGEdge *e); +float ccgSubSurf_getEdgeCrease (CCGSubSurf *ss, CCGEdge *e); + +int ccgSubSurf_getEdgeAge (CCGSubSurf *ss, CCGEdge *e); +void* ccgSubSurf_getEdgeUserData (CCGSubSurf *ss, CCGEdge *e); +void* ccgSubSurf_getEdgeDataArray (CCGSubSurf *ss, CCGEdge *e); +void* ccgSubSurf_getEdgeData (CCGSubSurf *ss, CCGEdge *e, int x); +void* ccgSubSurf_getEdgeLevelData (CCGSubSurf *ss, CCGEdge *e, int x, int level); + +CCGFace* ccgSubSurf_getFace (CCGSubSurf *ss, CCGFaceHDL f); +CCGFaceHDL ccgSubSurf_getFaceFaceHandle (CCGSubSurf *ss, CCGFace *f); +int ccgSubSurf_getFaceNumVerts (CCGSubSurf *ss, CCGFace *f); +CCGVert* ccgSubSurf_getFaceVert (CCGSubSurf *ss, CCGFace *f, int index); +CCGEdge* ccgSubSurf_getFaceEdge (CCGSubSurf *ss, CCGFace *f, int index); +int ccgSubSurf_getFaceEdgeIndex (CCGSubSurf *ss, CCGFace *f, CCGEdge *e); + +int ccgSubSurf_getFaceAge (CCGSubSurf *ss, CCGFace *f); +void* ccgSubSurf_getFaceUserData (CCGSubSurf *ss, CCGFace *f); +void* ccgSubSurf_getFaceCenterData (CCGSubSurf *ss, CCGFace *f); +void* ccgSubSurf_getFaceGridEdgeDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex); +void* ccgSubSurf_getFaceGridEdgeData (CCGSubSurf *ss, CCGFace *f, int gridIndex, int x); +void* ccgSubSurf_getFaceGridDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex); +void* ccgSubSurf_getFaceGridData (CCGSubSurf *ss, CCGFace *f, int gridIndex, int x, int y); + +int ccgSubSurf_getNumFinalVerts (CCGSubSurf *ss); +int ccgSubSurf_getNumFinalEdges (CCGSubSurf *ss); +int ccgSubSurf_getNumFinalFaces (CCGSubSurf *ss); + +/***/ + +typedef struct _CCGVertIterator CCGVertIterator; +typedef struct _CCGEdgeIterator CCGEdgeIterator; +typedef struct _CCGFaceIterator CCGFaceIterator; + +CCGVertIterator* ccgSubSurf_getVertIterator (CCGSubSurf *ss); +CCGEdgeIterator* ccgSubSurf_getEdgeIterator (CCGSubSurf *ss); +CCGFaceIterator* ccgSubSurf_getFaceIterator (CCGSubSurf *ss); + +CCGVert* ccgVertIterator_getCurrent (CCGVertIterator *vi); +int ccgVertIterator_isStopped (CCGVertIterator *vi); +void ccgVertIterator_next (CCGVertIterator *vi); +void ccgVertIterator_free (CCGVertIterator *vi); + +CCGEdge* ccgEdgeIterator_getCurrent (CCGEdgeIterator *ei); +int ccgEdgeIterator_isStopped (CCGEdgeIterator *ei); +void ccgEdgeIterator_next (CCGEdgeIterator *ei); +void ccgEdgeIterator_free (CCGEdgeIterator *ei); + +CCGFace* ccgFaceIterator_getCurrent (CCGFaceIterator *fi); +int ccgFaceIterator_isStopped (CCGFaceIterator *fi); +void ccgFaceIterator_next (CCGFaceIterator *fi); +void ccgFaceIterator_free (CCGFaceIterator *fi); diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 1bb98239a68..4f77e4f42a7 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -10,6 +10,7 @@ incs += ' #/intern/iksolver/extern ../blenloader ../quicktime' incs += ' #/extern/bullet2/src' incs += ' #/intern/bmfont' incs += ' #/intern/opennl/extern' +incs += ' #/intern/sph/extern' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_OPENGL_INC'] diff --git a/source/blender/blenkernel/bmesh_private.h b/source/blender/blenkernel/bmesh_private.h new file mode 100644 index 00000000000..ad90398bf66 --- /dev/null +++ b/source/blender/blenkernel/bmesh_private.h @@ -0,0 +1,71 @@ +/** + * BME_private.h jan 2007 + * + * low level, 'private' function prototypes for bmesh kernel. + * + * $Id: BKE_bmesh.h,v 1.00 2007/01/17 17:42:01 Briggs Exp $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Geoffrey Bantle. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BMESH_PRIVATE +#define BMESH_PRIVATE + +#include "BKE_bmesh.h" + +/*ALLOCATION/DEALLOCATION*/ +struct BME_Vert *BME_addvertlist(struct BME_Mesh *bm, struct BME_Vert *example); +struct BME_Edge *BME_addedgelist(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *example); +struct BME_Poly *BME_addpolylist(struct BME_Mesh *bm, struct BME_Poly *example); +struct BME_Loop *BME_create_loop(struct BME_Mesh *bm, struct BME_Vert *v, struct BME_Edge *e, struct BME_Poly *f, struct BME_Loop *example); + +void BME_free_vert(struct BME_Mesh *bm, struct BME_Vert *v); +void BME_free_edge(struct BME_Mesh *bm, struct BME_Edge *e); +void BME_free_poly(struct BME_Mesh *bm, struct BME_Poly *f); +void BME_free_loop(struct BME_Mesh *bm, struct BME_Loop *l); +void BME_delete_loop(struct BME_Mesh *bm, struct BME_Loop *l); + +/*DOUBLE CIRCULAR LINKED LIST FUNCTIONS*/ +void BME_cycle_append(void *h, void *nt); +int BME_cycle_remove(void *h, void *remn); +int BME_cycle_validate(int len, void *h); +/*DISK CYCLE MANAGMENT*/ +int BME_disk_append_edge(struct BME_Edge *e, struct BME_Vert *v); +void BME_disk_remove_edge(struct BME_Edge *e, struct BME_Vert *v); +/*RADIAL CYCLE MANAGMENT*/ +void BME_radial_append(struct BME_Edge *e, struct BME_Loop *l); +void BME_radial_remove_loop(struct BME_Loop *l, struct BME_Edge *e); + +/*MISC FUNCTIONS*/ +int BME_edge_swapverts(struct BME_Edge *e, struct BME_Vert *orig, struct BME_Vert *new); /*relink edge*/ +int BME_disk_hasedge(struct BME_Vert *v, struct BME_Edge *e); + +/*Error reporting. Shouldnt be called by tools ever.*/ +void BME_error(void); +#endif diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4be4434dfda..192ebd90faa 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -45,6 +45,8 @@ #include "BKE_pointcache.h" +#include "BLI_kdopbvh.h" + #ifdef _WIN32 void tstart ( void ) {} @@ -151,13 +153,14 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->goalfrict = 0.0f; } - -BVH *bvh_build_from_cloth (ClothModifierData *clmd, float epsilon) +BVHTree *bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon) { - unsigned int i = 0; - BVH *bvh=NULL; + int i; + BVHTree *bvhtree; Cloth *cloth = clmd->clothObject; - ClothVertex *verts = NULL; + ClothVertex *verts; + MFace *mfaces; + float co[12]; if(!clmd) return NULL; @@ -168,69 +171,86 @@ BVH *bvh_build_from_cloth (ClothModifierData *clmd, float epsilon) return NULL; verts = cloth->verts; + mfaces = cloth->mfaces; // in the moment, return zero if no faces there if(!cloth->numfaces) return NULL; - bvh = MEM_callocN(sizeof(BVH), "BVH"); - if (bvh == NULL) + // create quadtree with k=26 + bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 26); + + // fill tree + for(i = 0; i < cloth->numfaces; i++, mfaces++) { - printf("bvh: Out of memory.\n"); - return NULL; + VECCOPY(&co[0*3], verts[mfaces->v1].xold); + VECCOPY(&co[1*3], verts[mfaces->v2].xold); + VECCOPY(&co[2*3], verts[mfaces->v3].xold); + + if(mfaces->v4) + VECCOPY(&co[3*3], verts[mfaces->v4].xold); + + BLI_bvhtree_insert(bvhtree, i, co, (mfaces->v4 ? 4 : 3)); } - // springs = cloth->springs; - // numsprings = cloth->numsprings; - - bvh->epsilon = epsilon; - bvh->numfaces = cloth->numfaces; - bvh->mfaces = cloth->mfaces; - - bvh->numverts = cloth->numverts; + // balance tree + BLI_bvhtree_balance(bvhtree); - bvh->current_x = MEM_callocN ( sizeof ( MVert ) * bvh->numverts, "bvh->current_x" ); - - if (bvh->current_x == NULL) - { - printf("bvh: Out of memory.\n"); - MEM_freeN(bvh); - return NULL; - } - - for(i = 0; i < bvh->numverts; i++) - { - VECCOPY(bvh->current_x[i].co, verts[i].tx); - } - - bvh_build (bvh); - - return bvh; + return bvhtree; } -void bvh_update_from_cloth(ClothModifierData *clmd, int moving) -{ +void bvhtree_update_from_cloth(ClothModifierData *clmd, int moving) +{ unsigned int i = 0; Cloth *cloth = clmd->clothObject; - BVH *bvh = cloth->tree; + BVHTree *bvhtree = cloth->bvhtree; ClothVertex *verts = cloth->verts; + MFace *mfaces; + float co[12], co_moving[12]; + int ret = 0; - if(!bvh) + if(!bvhtree) return; - if(cloth->numverts!=bvh->numverts) - return; + mfaces = cloth->mfaces; - if(cloth->verts) + // update vertex position in bvh tree + if(verts && mfaces) { - for(i = 0; i < bvh->numverts; i++) + for(i = 0; i < cloth->numfaces; i++, mfaces++) { - VECCOPY(bvh->current_x[i].co, verts[i].tx); - VECCOPY(bvh->current_xold[i].co, verts[i].txold); + VECCOPY(&co[0*3], verts[mfaces->v1].txold); + VECCOPY(&co[1*3], verts[mfaces->v2].txold); + VECCOPY(&co[2*3], verts[mfaces->v3].txold); + + if(mfaces->v4) + VECCOPY(&co[3*3], verts[mfaces->v4].txold); + + // copy new locations into array + if(moving) + { + // update moving positions + VECCOPY(&co_moving[0*3], verts[mfaces->v1].tx); + VECCOPY(&co_moving[1*3], verts[mfaces->v2].tx); + VECCOPY(&co_moving[2*3], verts[mfaces->v3].tx); + + if(mfaces->v4) + VECCOPY(&co_moving[3*3], verts[mfaces->v4].tx); + + ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, (mfaces->v4 ? 4 : 3)); + } + else + { + ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, (mfaces->v4 ? 4 : 3)); + } + + // check if tree is already full + if(!ret) + break; } + + BLI_bvhtree_update_tree(bvhtree); } - - bvh_update(bvh, moving); } int modifiers_indexInObject(Object *ob, ModifierData *md_seek); @@ -541,8 +561,8 @@ void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) cloth->numsprings = 0; // free BVH collision tree - if ( cloth->tree ) - bvh_free ( ( BVH * ) cloth->tree ); + if ( cloth->bvhtree ) + BLI_bvhtree_free ( cloth->bvhtree ); // we save our faces for collision objects if ( cloth->mfaces ) @@ -611,8 +631,8 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) cloth->numsprings = 0; // free BVH collision tree - if ( cloth->tree ) - bvh_free ( ( BVH * ) cloth->tree ); + if ( cloth->bvhtree ) + BLI_bvhtree_free ( cloth->bvhtree ); // we save our faces for collision objects if ( cloth->mfaces ) @@ -810,6 +830,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d VECCOPY ( verts->xold, verts->x ); VECCOPY ( verts->xconst, verts->x ); VECCOPY ( verts->txold, verts->x ); + VECCOPY ( verts->tx, verts->x ); VecMulf ( verts->v, 0.0f ); verts->impulse_count = 0; @@ -845,12 +866,11 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if(!first) implicit_set_positions(clmd); - clmd->clothObject->tree = bvh_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); - + clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); + return 1; } - static void cloth_from_mesh ( Object *ob, ClothModifierData *clmd, DerivedMesh *dm ) { unsigned int numverts = dm->getNumVerts ( dm ); diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index e244ccca306..f3637b4dda2 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -41,7 +41,6 @@ #include "BKE_global.h" #include "BKE_mesh.h" #include "BKE_object.h" -#include "BKE_cloth.h" #include "BKE_modifier.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" @@ -49,6 +48,38 @@ #include "Bullet-C-Api.h" +#include "BLI_kdopbvh.h" +#include "BKE_collision.h" + +#ifdef _WIN32 +static void start ( void ) +{} +static void end ( void ) +{ +} +static double val() +{ + return 0; +} +#else +#include +static void mystart ( struct timeval *start, struct timezone *z ) +{ + gettimeofday ( start, z ); +} +static void myend ( struct timeval *end, struct timezone *z ) +{ + gettimeofday ( end,z ); +} +static double myval ( struct timeval *start, struct timeval *end ) +{ + double t1, t2; + t1 = ( double ) start->tv_sec + ( double ) start->tv_usec/ ( 1000*1000 ); + t2 = ( double ) end->tv_sec + ( double ) end->tv_usec/ ( 1000*1000 ); + return t2-t1; +} +#endif + /*********************************** Collision modifier code start ***********************************/ @@ -66,58 +97,80 @@ void collision_move_object ( CollisionModifierData *collmd, float step, float pr VECADDS ( collmd->current_xnew[i].co, collmd->x[i].co, tv, step ); VECSUB ( collmd->current_v[i].co, collmd->current_xnew[i].co, collmd->current_x[i].co ); } - bvh_update_from_mvert ( collmd->bvh, collmd->current_x, collmd->numverts, collmd->current_xnew, 1 ); + bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1 ); } -/* build bounding volume hierarchy from mverts (see kdop.c for whole BVH code) */ -BVH *bvh_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon ) +BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon ) { - BVH *bvh=NULL; + BVHTree *tree; + float co[12]; + int i; + MFace *tface = mfaces; - bvh = MEM_callocN ( sizeof ( BVH ), "BVH" ); - if ( bvh == NULL ) + tree = BLI_bvhtree_new ( numfaces*2, epsilon, 4, 26 ); + + // fill tree + for ( i = 0; i < numfaces; i++, tface++ ) { - printf ( "bvh: Out of memory.\n" ); - return NULL; + VECCOPY ( &co[0*3], x[tface->v1].co ); + VECCOPY ( &co[1*3], x[tface->v2].co ); + VECCOPY ( &co[2*3], x[tface->v3].co ); + if ( tface->v4 ) + VECCOPY ( &co[3*3], x[tface->v4].co ); + + BLI_bvhtree_insert ( tree, i, co, ( mfaces->v4 ? 4 : 3 ) ); } - // in the moment, return zero if no faces there - if ( !numfaces ) - return NULL; + // balance tree + BLI_bvhtree_balance ( tree ); - bvh->epsilon = epsilon; - bvh->numfaces = numfaces; - bvh->mfaces = mfaces; - - // we have no faces, we save seperate points - if ( !mfaces ) - { - bvh->numfaces = numverts; - } - - bvh->numverts = numverts; - bvh->current_x = MEM_dupallocN ( x ); - - bvh_build ( bvh ); - - return bvh; + return tree; } -void bvh_update_from_mvert ( BVH * bvh, MVert *x, unsigned int numverts, MVert *xnew, int moving ) +void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int numverts, int moving ) { - if ( !bvh ) - return; + int i; + MFace *mfaces = faces; + float co[12], co_moving[12]; + int ret = 0; - if ( numverts!=bvh->numverts ) + if ( !bvhtree ) return; if ( x ) - memcpy ( bvh->current_xold, x, sizeof ( MVert ) * numverts ); + { + for ( i = 0; i < numfaces; i++, mfaces++ ) + { + VECCOPY ( &co[0*3], x[mfaces->v1].co ); + VECCOPY ( &co[1*3], x[mfaces->v2].co ); + VECCOPY ( &co[2*3], x[mfaces->v3].co ); + if ( mfaces->v4 ) + VECCOPY ( &co[3*3], x[mfaces->v4].co ); - if ( xnew ) - memcpy ( bvh->current_x, xnew, sizeof ( MVert ) * numverts ); + // copy new locations into array + if ( moving && xnew ) + { + // update moving positions + VECCOPY ( &co_moving[0*3], xnew[mfaces->v1].co ); + VECCOPY ( &co_moving[1*3], xnew[mfaces->v2].co ); + VECCOPY ( &co_moving[2*3], xnew[mfaces->v3].co ); + if ( mfaces->v4 ) + VECCOPY ( &co_moving[3*3], xnew[mfaces->v4].co ); - bvh_update ( bvh, moving ); + ret = BLI_bvhtree_update_node ( bvhtree, i, co, co_moving, ( mfaces->v4 ? 4 : 3 ) ); + } + else + { + ret = BLI_bvhtree_update_node ( bvhtree, i, co, NULL, ( mfaces->v4 ? 4 : 3 ) ); + } + + // check if tree is already full + if ( !ret ) + break; + } + + BLI_bvhtree_update_tree ( bvhtree ); + } } /*********************************** @@ -157,11 +210,11 @@ int gsl_poly_solve_cubic ( float a, float b, float c, float *x0, float *x1, floa else if ( CR2 == CQ3 ) { /* this test is actually R2 == Q3, written in a form suitable - for exact computation with integers */ + for exact computation with integers */ /* Due to finite precision some float roots may be missed, and - considered to be a pair of complex roots z = x +/- epsilon i - close to the real axis. */ + considered to be a pair of complex roots z = x +/- epsilon i + close to the real axis. */ float sqrtQ = sqrt ( Q ); @@ -419,24 +472,22 @@ DO_INLINE void collision_interpolateOnTriangle ( float to[3], float v1[3], float VECADDMUL ( to, v3, w3 ); } -int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd ) +int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; - LinkNode *search = NULL; - CollPair *collpair = NULL; Cloth *cloth1; float w1, w2, w3, u1, u2, u3; float v1[3], v2[3], relativeVelocity[3]; float magrelVel; - float epsilon2 = collmd->bvh->epsilon; + float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); cloth1 = clmd->clothObject; - search = clmd->coll_parms->collision_list; - - while ( search ) + for ( ; collpair != collision_end; collpair++ ) { - collpair = search->link; + // only handle static collisions here + if ( collpair->flag & COLLISION_IN_FUTURE ) + continue; // compute barycentric coordinates for both collision points collision_compute_barycentric ( collpair->pa, @@ -530,8 +581,6 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier result = 1; } - - search = search->next; } @@ -549,51 +598,46 @@ int cloth_collision_response_moving_edges ( ClothModifierData *clmd, ClothModifi return 1; } -void cloth_collision_static ( ModifierData *md1, ModifierData *md2, CollisionTree *tree1, CollisionTree *tree2 ) +//Determines collisions on overlap, collisions are writen to collpair[i] and collision+number_collision_found is returned +CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair ) { ClothModifierData *clmd = ( ClothModifierData * ) md1; CollisionModifierData *collmd = ( CollisionModifierData * ) md2; - CollPair *collpair = NULL; - Cloth *cloth1=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL; + MFace *face1=NULL, *face2 = NULL; + ClothVertex *verts1 = clmd->clothObject->verts; double distance = 0; - float epsilon = clmd->coll_parms->epsilon; - float epsilon2 = ( ( CollisionModifierData * ) md2 )->bvh->epsilon; - unsigned int i = 0; + float epsilon1 = clmd->coll_parms->epsilon; + float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); + int i; + face1 = & ( clmd->clothObject->mfaces[overlap->indexA] ); + face2 = & ( collmd->mfaces[overlap->indexB] ); + + // check all 4 possible collisions for ( i = 0; i < 4; i++ ) { - collpair = ( CollPair * ) MEM_callocN ( sizeof ( CollPair ), "cloth coll pair" ); - - cloth1 = clmd->clothObject; - - verts1 = cloth1->verts; - - face1 = & ( cloth1->mfaces[tree1->tri_index] ); - face2 = & ( collmd->mfaces[tree2->tri_index] ); - - // check all possible pairs of triangles if ( i == 0 ) { + // fill faceA collpair->ap1 = face1->v1; collpair->ap2 = face1->v2; collpair->ap3 = face1->v3; + // fill faceB collpair->bp1 = face2->v1; collpair->bp2 = face2->v2; collpair->bp3 = face2->v3; - } - - if ( i == 1 ) + else if ( i == 1 ) { if ( face1->v4 ) { - collpair->ap1 = face1->v3; + // fill faceA + collpair->ap1 = face1->v1; collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; + collpair->ap3 = face1->v3; + // fill faceB collpair->bp1 = face2->v1; collpair->bp2 = face2->v2; collpair->bp3 = face2->v3; @@ -601,235 +645,215 @@ void cloth_collision_static ( ModifierData *md1, ModifierData *md2, CollisionTre else i++; } - if ( i == 2 ) { if ( face2->v4 ) { + // fill faceA collpair->ap1 = face1->v1; collpair->ap2 = face1->v2; collpair->ap3 = face1->v3; - collpair->bp1 = face2->v3; + // fill faceB + collpair->bp1 = face2->v1; collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; + collpair->bp3 = face2->v3; } else - i+=2; + break; } - - if ( i == 3 ) + else if ( i == 3 ) { - if ( ( face1->v4 ) && ( face2->v4 ) ) + if ( face1->v4 && face2->v4 ) { - collpair->ap1 = face1->v3; + // fill faceA + collpair->ap1 = face1->v1; collpair->ap2 = face1->v4; - collpair->ap3 = face1->v1; + collpair->ap3 = face1->v3; - collpair->bp1 = face2->v3; + // fill faceB + collpair->bp1 = face2->v1; collpair->bp2 = face2->v4; - collpair->bp3 = face2->v1; + collpair->bp3 = face2->v3; } else - i++; + break; } - // calc SIPcode (?) - - if ( i < 4 ) - { - // calc distance + normal #ifdef WITH_BULLET - distance = plNearestPoints ( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector ); + // calc distance + normal + distance = plNearestPoints ( + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector ); #else - // just be sure that we don't add anything - distance = 2.0 * ( epsilon + epsilon2 + ALMOST_ZERO ); + // just be sure that we don't add anything + distance = 2.0 * ( epsilon1 + epsilon2 + ALMOST_ZERO ); #endif - if ( distance <= ( epsilon + epsilon2 + ALMOST_ZERO ) ) - { - // printf("dist: %f\n", (float)distance); - // collpair->face1 = tree1->tri_index; - // collpair->face2 = tree2->tri_index; + if ( distance <= ( epsilon1 + epsilon2 + ALMOST_ZERO ) ) + { + VECCOPY ( collpair->normal, collpair->vector ); + Normalize ( collpair->normal ); - VECCOPY ( collpair->normal, collpair->vector ); - Normalize ( collpair->normal ); - - collpair->distance = distance; - BLI_linklist_prepend ( &clmd->coll_parms->collision_list, collpair ); - - } - else - { - MEM_freeN ( collpair ); - } + collpair->distance = distance; + collpair->flag = 0; } else { - MEM_freeN ( collpair ); + // check for collision in the future + collpair->flag |= COLLISION_IN_FUTURE; } + collpair++; } + return collpair; } -int cloth_are_edges_adjacent ( ClothModifierData *clmd, ClothModifierData *coll_clmd, EdgeCollPair *edgecollpair ) +int cloth_are_edges_adjacent ( ClothModifierData *clmd, CollisionModifierData *collmd, EdgeCollPair *edgecollpair ) { - Cloth *cloth1 = NULL, *cloth2 = NULL; - ClothVertex *verts1 = NULL, *verts2 = NULL; + Cloth *cloth1 = NULL; + ClothVertex *verts1 = NULL; float temp[3]; + MVert *verts2 = collmd->current_x; // old x cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - verts1 = cloth1->verts; - verts2 = cloth2->verts; - VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].xold ); + VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].xold ); + VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].xold ); + VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].xold ); + VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; return 0; } -void cloth_collision_moving_edges ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2 ) +void cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) { EdgeCollPair edgecollpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; + Cloth *cloth1=NULL; + ClothVertex *verts1=NULL; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; float a[3], b[3], c[3], d[3], e[3], f[3], solution[3]; + MVert *verts2 = collmd->current_x; // old x + MVert *velocity2 = collmd->current_v; // velocity + float mintime = 0; cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; - verts1 = cloth1->verts; - verts2 = cloth2->verts; - face1 = & ( cloth1->mfaces[tree1->tri_index] ); - face2 = & ( cloth2->mfaces[tree2->tri_index] ); - - for ( i = 0; i < 5; i++ ) + for(i = 0; i < 9; i++) { - if ( i == 0 ) + // 9 edge - edge possibilities + + if(i == 0) // cloth edge: 1-2; coll edge: 1-2 { - edgecollpair.p11 = face1->v1; - edgecollpair.p12 = face1->v2; + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap2; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp2; } - else if ( i == 1 ) + else if(i == 1) // cloth edge: 1-2; coll edge: 2-3 { - edgecollpair.p11 = face1->v2; - edgecollpair.p12 = face1->v3; + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap2; + + edgecollpair.p21 = collpair->bp2; + edgecollpair.p22 = collpair->bp3; } - else if ( i == 2 ) + else if(i == 2) // cloth edge: 1-2; coll edge: 1-3 { - if ( face1->v4 ) - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v4; - } - else - { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; - i+=5; // get out of here after this edge pair is handled - } + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap2; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp3; } - else if ( i == 3 ) + else if(i == 3) // cloth edge: 2-3; coll edge: 1-2 { - if ( face1->v4 ) - { - edgecollpair.p11 = face1->v4; - edgecollpair.p12 = face1->v1; - } - else - continue; + edgecollpair.p11 = collpair->ap2; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp2; } - else + else if(i == 4) // cloth edge: 2-3; coll edge: 2-3 { - edgecollpair.p11 = face1->v3; - edgecollpair.p12 = face1->v1; + edgecollpair.p11 = collpair->ap2; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp2; + edgecollpair.p22 = collpair->bp3; } - - - for ( j = 0; j < 5; j++ ) + else if(i == 5) // cloth edge: 2-3; coll edge: 1-3 { - if ( j == 0 ) + edgecollpair.p11 = collpair->ap2; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp3; + } + else if(i ==6) // cloth edge: 1-3; coll edge: 1-2 + { + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp2; + } + else if(i ==7) // cloth edge: 1-3; coll edge: 2-3 + { + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp2; + edgecollpair.p22 = collpair->bp3; + } + else if(i == 8) // cloth edge: 1-3; coll edge: 1-3 + { + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap3; + + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp3; + } + + if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) ) + { + // always put coll points in p21/p22 + VECSUB ( a, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold ); + VECSUB ( b, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv ); + VECSUB ( c, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold ); + VECSUB ( d, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv ); + VECSUB ( e, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold ); + VECSUB ( f, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].v ); + + numsolutions = cloth_get_collision_time ( a, b, c, d, e, f, solution ); + + for ( k = 0; k < numsolutions; k++ ) { - edgecollpair.p21 = face2->v1; - edgecollpair.p22 = face2->v2; - } - else if ( j == 1 ) - { - edgecollpair.p21 = face2->v2; - edgecollpair.p22 = face2->v3; - } - else if ( j == 2 ) - { - if ( face2->v4 ) + if ( ( solution[k] >= 0.0 ) && ( solution[k] <= 1.0 ) ) { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v4; - } - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; - } - } - else if ( j == 3 ) - { - if ( face2->v4 ) - { - edgecollpair.p21 = face2->v4; - edgecollpair.p22 = face2->v1; - } - else - continue; - } - else - { - edgecollpair.p21 = face2->v3; - edgecollpair.p22 = face2->v1; - } - - - if ( !cloth_are_edges_adjacent ( clmd, coll_clmd, &edgecollpair ) ) - { - VECSUB ( a, verts1[edgecollpair.p12].xold, verts1[edgecollpair.p11].xold ); - VECSUB ( b, verts1[edgecollpair.p12].v, verts1[edgecollpair.p11].v ); - VECSUB ( c, verts1[edgecollpair.p21].xold, verts1[edgecollpair.p11].xold ); - VECSUB ( d, verts1[edgecollpair.p21].v, verts1[edgecollpair.p11].v ); - VECSUB ( e, verts2[edgecollpair.p22].xold, verts1[edgecollpair.p11].xold ); - VECSUB ( f, verts2[edgecollpair.p22].v, verts1[edgecollpair.p11].v ); - - numsolutions = cloth_get_collision_time ( a, b, c, d, e, f, solution ); - - for ( k = 0; k < numsolutions; k++ ) - { - if ( ( solution[k] >= 0.0 ) && ( solution[k] <= 1.0 ) ) - { - //float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (edge) collision list - - // printf("Moving edge found!\n"); - } + //float out_collisionTime = solution[k]; + + // TODO: check for collisions + + // TODO: put into (edge) collision list + + mintime = MIN2(mintime, solution[k]); + + printf("Moving edge found!, mintime: %f\n", mintime); + break; } } } @@ -928,6 +952,7 @@ void cloth_collision_moving_tris ( ClothModifierData *clmd, ClothModifierData *c } } +/* void cloth_collision_moving ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2 ) { // TODO: check for adjacent @@ -936,51 +961,68 @@ void cloth_collision_moving ( ClothModifierData *clmd, ClothModifierData *coll_c cloth_collision_moving_tris ( clmd, coll_clmd, tree1, tree2 ); cloth_collision_moving_tris ( coll_clmd, clmd, tree2, tree1 ); } +*/ -void cloth_free_collision_list ( ClothModifierData *clmd ) +int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { - // free collision list - if ( clmd->coll_parms->collision_list ) + int result = 0; + Cloth *cloth1; + float w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); + + cloth1 = clmd->clothObject; + + for ( ; collpair != collision_end; collpair++ ) { - LinkNode *search = clmd->coll_parms->collision_list; - while ( search ) - { - CollPair *coll_pair = search->link; - - MEM_freeN ( coll_pair ); - search = search->next; - } - BLI_linklist_free ( clmd->coll_parms->collision_list,NULL ); - - clmd->coll_parms->collision_list = NULL; + // only handle moving collisions here + if (!( collpair->flag & COLLISION_IN_FUTURE )) + continue; + + cloth_collision_moving_edges ( clmd, collmd, collpair); } } int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData *collmd, float step, float dt ) { Cloth *cloth = clmd->clothObject; - BVH *cloth_bvh= ( BVH * ) cloth->tree; + BVHTree *cloth_bvh= ( BVHTree * ) cloth->bvhtree; long i=0, j = 0, numfaces = 0, numverts = 0; ClothVertex *verts = NULL; + CollPair *collisions = NULL, *collisions_index = NULL; int ret = 0; - unsigned int result = 0; + int result = 0; float tnull[3] = {0,0,0}; + BVHTreeOverlap *overlap = NULL; + numfaces = clmd->clothObject->numfaces; numverts = clmd->clothObject->numverts; verts = cloth->verts; - if ( collmd->bvh ) + if ( collmd->bvhtree ) { /* get pointer to bounding volume hierarchy */ - BVH *coll_bvh = collmd->bvh; + BVHTree *coll_bvh = collmd->bvhtree; /* move object to position (step) in time */ collision_move_object ( collmd, step + dt, step ); /* search for overlapping collision pairs */ - bvh_traverse ( ( ModifierData * ) clmd, ( ModifierData * ) collmd, cloth_bvh->root, coll_bvh->root, step, cloth_collision_static, 0 ); + overlap = BLI_bvhtree_overlap ( cloth_bvh, coll_bvh, &result ); + + collisions = ( CollPair* ) MEM_mallocN ( sizeof ( CollPair ) * result*4, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision + collisions_index = collisions; + + for ( i = 0; i < result; i++ ) + { + collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd, overlap+i, collisions_index ); + } + + if ( overlap ) + MEM_freeN ( overlap ); } else { @@ -994,11 +1036,15 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData { result = 0; - if ( collmd->bvh ) - result += cloth_collision_response_static ( clmd, collmd ); + if ( collmd->bvhtree ) + { + result += cloth_collision_response_static ( clmd, collmd, collisions, collisions_index ); + result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); + } // apply impulses in parallel if ( result ) + { for ( i = 0; i < numverts; i++ ) { // calculate "velocities" (just xnew = xold + v; no dt in v) @@ -1011,12 +1057,10 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData ret++; } } - - if ( !result ) - break; + } } - cloth_free_collision_list ( clmd ); + if ( collisions ) MEM_freeN ( collisions ); return ret; } @@ -1028,7 +1072,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) CollisionModifierData *collmd=NULL; Cloth *cloth=NULL; Object *coll_ob=NULL; - BVH *cloth_bvh=NULL; + BVHTree *cloth_bvh=NULL; long i=0, j = 0, numfaces = 0, numverts = 0; unsigned int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; @@ -1036,14 +1080,14 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) ClothModifierData *tclmd; int collisions = 0, count = 0; - if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) || ! ( ( ( Cloth * ) clmd->clothObject )->tree ) ) + if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) || ! ( ( ( Cloth * ) clmd->clothObject )->bvhtree ) ) { return 0; } cloth = clmd->clothObject; verts = cloth->verts; - cloth_bvh = ( BVH * ) cloth->tree; + cloth_bvh = ( BVHTree * ) cloth->bvhtree; numfaces = clmd->clothObject->numfaces; numverts = clmd->clothObject->numverts; @@ -1052,12 +1096,11 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// // update cloth bvh - bvh_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) + bvhtree_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) do { result = 0; - clmd->coll_parms->collision_list = NULL; // check all collision objects for ( base = G.scene->base.first; base; base = base->next ) @@ -1126,80 +1169,87 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) { + + MFace *mface = clmd->clothObject->mfaces; + collisions = 1; verts = cloth->verts; // needed for openMP + + + /* for ( count = 0; count < clmd->coll_parms->self_loop_count; count++ ) { - if ( collisions ) - { - collisions = 0; -#pragma omp parallel for private(i,j, collisions) shared(verts, ret) - for ( i = 0; i < cloth->numverts; i++ ) - { - for ( j = i + 1; j < cloth->numverts; j++ ) - { - float temp[3]; - float length = 0; - float mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); + if ( collisions ) + { + collisions = 0; + #pragma omp parallel for private(i,j, collisions) shared(verts, ret) + for ( i = 0; i < cloth->numverts; i++ ) + { + for ( j = i + 1; j < cloth->numverts; j++ ) + { + float temp[3]; + float length = 0; + float mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - { - if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) - { - continue; - } - } + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + { + continue; + } + } - VECSUB ( temp, verts[i].tx, verts[j].tx ); + VECSUB ( temp, verts[i].tx, verts[j].tx ); - if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; + if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; // check for adjacent points (i must be smaller j) - if ( BLI_edgehash_haskey ( cloth->edgehash, i, j ) ) - { - continue; - } - - length = Normalize ( temp ); - - if ( length < mindistance ) - { - float correction = mindistance - length; - - if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, -correction ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - } - else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, correction ); - VECADD ( verts[i].tx, verts[i].tx, temp ); - } - else - { - VecMulf ( temp, -correction*0.5 ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - - VECSUB ( verts[i].tx, verts[i].tx, temp ); - } - - collisions = 1; - - if ( !ret ) - { -#pragma omp critical - { - ret = 1; - } - } - } - } - } - } + if ( BLI_edgehash_haskey ( cloth->edgehash, i, j ) ) + { + continue; } + + length = Normalize ( temp ); + + if ( length < mindistance ) + { + float correction = mindistance - length; + + if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, -correction ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + } + else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, correction ); + VECADD ( verts[i].tx, verts[i].tx, temp ); + } + else + { + VecMulf ( temp, -correction*0.5 ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + + VECSUB ( verts[i].tx, verts[i].tx, temp ); + } + + collisions = 1; + + if ( !ret ) + { + #pragma omp critical + { + ret = 1; + } + } + } + } + } + } + } + */ //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/kdop.c b/source/blender/blenkernel/intern/kdop.c deleted file mode 100644 index 3189fe960ad..00000000000 --- a/source/blender/blenkernel/intern/kdop.c +++ /dev/null @@ -1,860 +0,0 @@ -/* kdop.c -* -* -* ***** BEGIN GPL LICENSE BLOCK ***** -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* -* The Original Code is Copyright (C) Blender Foundation -* All rights reserved. -* -* The Original Code is: all of this file. -* -* Contributor(s): none yet. -* -* ***** END GPL LICENSE BLOCK ***** -*/ - -#include "MEM_guardedalloc.h" - -#include "BKE_cloth.h" - -#include "DNA_cloth_types.h" -#include "DNA_mesh_types.h" -#include "DNA_scene_types.h" - -#include "BKE_deform.h" -#include "BKE_DerivedMesh.h" -#include "BKE_cdderivedmesh.h" -#include "BKE_effect.h" -#include "BKE_global.h" -#include "BKE_object.h" -#include "BKE_modifier.h" -#include "BKE_utildefines.h" - -#ifdef _OPENMP -#include -#endif - - -//////////////////////////////////////////////////////////////////////// -// Additional fastened appending function -// It uses the link to the last inserted node as start value -// for searching the end of the list -// NEW: in compare to the original function, this one returns -// the reference to the last inserted node -//////////////////////////////////////////////////////////////////////// -LinkNode *BLI_linklist_append_fast(LinkNode **listp, void *ptr) { - LinkNode *nlink= MEM_mallocN(sizeof(*nlink), "nlink"); - LinkNode *node = *listp; - - nlink->link = ptr; - nlink->next = NULL; - - if(node == NULL){ - *listp = nlink; - } else { - while(node->next != NULL){ - node = node->next; - } - node->next = nlink; - } - return nlink; -} - - - -//////////////////////////////////////////////////////////////////////// -// Bounding Volume Hierarchy Definition -// -// Notes: From OBB until 26-DOP --> all bounding volumes possible, just choose type below -// Notes: You have to choose the type at compile time ITM -// Notes: You can choose the tree type --> binary, quad, octree, choose below -//////////////////////////////////////////////////////////////////////// - -static float KDOP_AXES[13][3] = -{ {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}, {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0}, {1.0, 1.0, -1.0}, -{1.0, -1.0, -1.0}, {1.0, 1.0, 0}, {1.0, 0, 1.0}, {0, 1.0, 1.0}, {1.0, -1.0, 0}, {1.0, 0, -1.0}, -{0, 1.0, -1.0} -}; - -///////////// choose bounding volume here! ///////////// - -#define KDOP_26 - - - -#ifdef KDOP_26 -#define KDOP_END 13 -#define KDOP_START 0 -#endif - -#ifdef KDOP_18 -#define KDOP_END 13 -#define KDOP_START 7 -#endif - -#ifdef KDOP_14 -#define KDOP_END 7 -#define KDOP_START 0 -#endif - -// this is basicly some AABB -#ifdef KDOP_8 -#define KDOP_END 4 -#define KDOP_START 0 -#endif - -// this is basicly some OBB -#ifdef KDOP_6 -#define KDOP_END 3 -#define KDOP_START 0 -#endif - -////////////////////////////////////////////////////////////////////////////////////////////////////// -// Introsort -// with permission deriven from the following Java code: -// http://ralphunden.net/content/tutorials/a-guide-to-introsort/ -// and he derived it from the SUN STL -////////////////////////////////////////////////////////////////////////////////////////////////////// -static int size_threshold = 16; -/* -* Common methods for all algorithms -*/ -DO_INLINE void bvh_exchange(CollisionTree **a, int i, int j) -{ - CollisionTree *t=a[i]; - a[i]=a[j]; - a[j]=t; -} -DO_INLINE int floor_lg(int a) -{ - return (int)(floor(log(a)/log(2))); -} - -/* -* Insertion sort algorithm -*/ -void bvh_insertionsort(CollisionTree **a, int lo, int hi, int axis) -{ - int i,j; - CollisionTree *t; - for (i=lo; i < hi; i++) - { - j=i; - t = a[i]; - while((j!=lo) && (t->bv[axis] < (a[j-1])->bv[axis])) - { - a[j] = a[j-1]; - j--; - } - a[j] = t; - } -} - -static int bvh_partition(CollisionTree **a, int lo, int hi, CollisionTree * x, int axis) -{ - int i=lo, j=hi; - while (1) - { - while ((a[i])->bv[axis] < x->bv[axis]) i++; - j=j-1; - while (x->bv[axis] < (a[j])->bv[axis]) j=j-1; - if(!(i < j)) - return i; - bvh_exchange(a, i,j); - i++; - } -} - -/* -* Heapsort algorithm -*/ -static void bvh_downheap(CollisionTree **a, int i, int n, int lo, int axis) -{ - CollisionTree * d = a[lo+i-1]; - int child; - while (i<=n/2) - { - child = 2*i; - if ((child < n) && ((a[lo+child-1])->bv[axis] < (a[lo+child])->bv[axis])) - { - child++; - } - if (!(d->bv[axis] < (a[lo+child-1])->bv[axis])) break; - a[lo+i-1] = a[lo+child-1]; - i = child; - } - a[lo+i-1] = d; -} - -static void bvh_heapsort(CollisionTree **a, int lo, int hi, int axis) -{ - int n = hi-lo, i; - for (i=n/2; i>=1; i=i-1) - { - bvh_downheap(a, i,n,lo, axis); - } - for (i=n; i>1; i=i-1) - { - bvh_exchange(a, lo,lo+i-1); - bvh_downheap(a, 1,i-1,lo, axis); - } -} - -static CollisionTree *bvh_medianof3(CollisionTree **a, int lo, int mid, int hi, int axis) // returns Sortable -{ - if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) - { - if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) - return a[mid]; - else - { - if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) - return a[hi]; - else - return a[lo]; - } - } - else - { - if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) - { - if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) - return a[lo]; - else - return a[hi]; - } - else - return a[mid]; - } -} -/* -* Quicksort algorithm modified for Introsort -*/ -void bvh_introsort_loop (CollisionTree **a, int lo, int hi, int depth_limit, int axis) -{ - int p; - - while (hi-lo > size_threshold) - { - if (depth_limit == 0) - { - bvh_heapsort(a, lo, hi, axis); - return; - } - depth_limit=depth_limit-1; - p=bvh_partition(a, lo, hi, bvh_medianof3(a, lo, lo+((hi-lo)/2)+1, hi-1, axis), axis); - bvh_introsort_loop(a, p, hi, depth_limit, axis); - hi=p; - } -} - -DO_INLINE void bvh_sort(CollisionTree **a0, int begin, int end, int axis) -{ - if (begin < end) - { - CollisionTree **a=a0; - bvh_introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); - bvh_insertionsort(a, begin, end, axis); - } -} -DO_INLINE void bvh_sort_along_axis(CollisionTree **face_list, int start, int end, int axis) -{ - bvh_sort(face_list, start, end, axis); -} -//////////////////////////////////////////////////////////////////////////////////////////////// -void bvh_free(BVH * bvh) -{ - LinkNode *search = NULL; - CollisionTree *tree = NULL; - - if (bvh) - { - - search = bvh->tree; - - while(search) - { - LinkNode *next= search->next; - tree = search->link; - - MEM_freeN(tree); - - search = next; - } - - BLI_linklist_free(bvh->tree,NULL); - bvh->tree = NULL; - - if(bvh->current_x) - MEM_freeN(bvh->current_x); - if(bvh->current_xold) - MEM_freeN(bvh->current_xold); - - MEM_freeN(bvh); - bvh = NULL; - } -} - -// only supports x,y,z axis in the moment -// but we should use a plain and simple function here for speed sake -DO_INLINE int bvh_largest_axis(float *bv) -{ - float middle_point[3]; - - middle_point[0] = (bv[1]) - (bv[0]); // x axis - middle_point[1] = (bv[3]) - (bv[2]); // y axis - middle_point[2] = (bv[5]) - (bv[4]); // z axis - if (middle_point[0] > middle_point[1]) - { - if (middle_point[0] > middle_point[2]) - return 1; // max x axis - else - return 5; // max z axis - } - else - { - if (middle_point[1] > middle_point[2]) - return 3; // max y axis - else - return 5; // max z axis - } -} - -// depends on the fact that the BVH's for each face is already build -DO_INLINE void bvh_calc_DOP_hull_from_faces(BVH * bvh, CollisionTree **tri, int numfaces, float *bv) -{ - float newmin,newmax; - int i, j; - - if(numfaces >0) - { - // for all Axes. - for (i = KDOP_START; i < KDOP_END; i++) - { - bv[(2 * i)] = (tri [0])->bv[(2 * i)]; - bv[(2 * i) + 1] = (tri [0])->bv[(2 * i) + 1]; - } - } - - for (j = 0; j < numfaces; j++) - { - // for all Axes. - for (i = KDOP_START; i < KDOP_END; i++) - { - newmin = (tri [j])->bv[(2 * i)]; - if ((newmin < bv[(2 * i)])) - { - bv[(2 * i)] = newmin; - } - - newmax = (tri [j])->bv[(2 * i) + 1]; - if ((newmax > bv[(2 * i) + 1])) - { - bv[(2 * i) + 1] = newmax; - } - } - } -} - -DO_INLINE void bvh_calc_DOP_hull_static(BVH * bvh, CollisionTree **tri, int numfaces, float *bv, CollisionTree *tree) -{ - MFace *tempMFace = bvh->mfaces; - float *tempBV = bv; - float newminmax; - int i, j, k; - - for (j = 0; j < numfaces; j++) - { - tempMFace = bvh->mfaces + (tri [j])->tri_index; - // 3 or 4 vertices per face. - for (k = 0; k < 4; k++) - { - int temp = 0; - // If this is a triangle. - if (k == 3 && !tempMFace->v4) - continue; - // TODO: other name for "temp" this gets all vertices of a face - if (k == 0) - temp = tempMFace->v1; - else if (k == 1) - temp = tempMFace->v2; - else if (k == 2) - temp = tempMFace->v3; - else if (k == 3) - temp = tempMFace->v4; - // for all Axes. - for (i = KDOP_START; i < KDOP_END; i++) - { - newminmax = INPR(bvh->current_xold[temp].co, KDOP_AXES[i]); - if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) - tempBV[(2 * i)] = newminmax; - if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) - tempBV[(2 * i) + 1] = newminmax; - } - } - - /* calculate normal of this face */ - /* (code copied from cdderivedmesh.c) */ - /* - if(tempMFace->v4) - CalcNormFloat4(bvh->current_xold[tempMFace->v1].co, bvh->current_xold[tempMFace->v2].co, - bvh->current_xold[tempMFace->v3].co, bvh->current_xold[tempMFace->v4].co, tree->normal); - else - CalcNormFloat(bvh->current_xold[tempMFace->v1].co, bvh->current_xold[tempMFace->v2].co, - bvh->current_xold[tempMFace->v3].co, tree->normal); - - tree->alpha = 0; - */ - } -} - -DO_INLINE void bvh_calc_DOP_hull_moving(BVH * bvh, CollisionTree **tri, int numfaces, float *bv, CollisionTree *tree) -{ - MFace *tempMFace = bvh->mfaces; - float *tempBV = bv; - float newminmax; - int i, j, k; - - /* TODO: calculate normals */ - - for (j = 0; j < numfaces; j++) - { - tempMFace = bvh->mfaces + (tri [j])->tri_index; - // 3 or 4 vertices per face. - for (k = 0; k < 4; k++) - { - int temp = 0; - // If this is a triangle. - if (k == 3 && !tempMFace->v4) - continue; - // TODO: other name for "temp" this gets all vertices of a face - if (k == 0) - temp = tempMFace->v1; - else if (k == 1) - temp = tempMFace->v2; - else if (k == 2) - temp = tempMFace->v3; - else if (k == 3) - temp = tempMFace->v4; - // for all Axes. - for (i = KDOP_START; i < KDOP_END; i++) - { - newminmax = INPR(bvh->current_xold[temp].co, KDOP_AXES[i]); - if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) - tempBV[(2 * i)] = newminmax; - if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) - tempBV[(2 * i) + 1] = newminmax; - - newminmax = INPR(bvh->current_x[temp].co, KDOP_AXES[i]); - if ((newminmax < tempBV[(2 * i)]) || (k == 0 && j == 0)) - tempBV[(2 * i)] = newminmax; - if ((newminmax > tempBV[(2 * i) + 1])|| (k == 0 && j == 0)) - tempBV[(2 * i) + 1] = newminmax; - } - } - } -} - -static void bvh_div_env_node(BVH *bvh, CollisionTree *tree, CollisionTree **face_list, unsigned int start, unsigned int end, int lastaxis, LinkNode *nlink) -{ - int i = 0; - CollisionTree *newtree = NULL; - int laxis = 0, max_nodes=4; - unsigned int tstart, tend; - LinkNode *nlink1 = nlink; - LinkNode *tnlink; - tree->traversed = 0; - // Determine which axis to split along - laxis = bvh_largest_axis(tree->bv); - - // Sort along longest axis - if(laxis!=lastaxis) - bvh_sort_along_axis(face_list, start, end, laxis); - - // maximum is 4 since we have a quad tree - max_nodes = MIN2((end-start + 1 ),4); - - for (i = 0; i < max_nodes; i++) - { - tree->count_nodes++; - - if(end-start+1 > 4) - { - int quarter = ((float)((float)(end - start + 1) / 4.0f)); - tstart = start + i * quarter; - tend = tstart + quarter - 1; - - // be sure that we get all faces - if(i==3) - { - tend = end; - } - } - else - { - tend = tstart = start + i; - } - - // Build tree until 4 node left. - if ((tend-tstart + 1 ) > 1) - { - newtree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - tnlink = BLI_linklist_append_fast(&nlink1->next, newtree); - - newtree->nodes[0] = newtree->nodes[1] = newtree->nodes[2] = newtree->nodes[3] = NULL; - newtree->count_nodes = 0; - newtree->parent = tree; - newtree->isleaf = 0; - - tree->nodes[i] = newtree; - - nlink1 = tnlink; - - bvh_calc_DOP_hull_from_faces(bvh, &face_list[tstart], tend-tstart + 1, tree->nodes[i]->bv); - - bvh_div_env_node(bvh, tree->nodes[i], face_list, tstart, tend, laxis, nlink1); - } - else // ok, we have 1 left for this node - { - CollisionTree *tnode = face_list[tstart]; - tree->nodes[i] = tnode; - tree->nodes[i]->parent = tree; - } - } - return; -} - -/* function cannot be directly called - needs alloced bvh */ -void bvh_build (BVH *bvh) -{ - unsigned int i = 0, j = 0, k = 0; - CollisionTree **face_list=NULL; - CollisionTree *tree=NULL; - LinkNode *nlink = NULL; - - bvh->flags = 0; - bvh->leaf_tree = NULL; - bvh->leaf_root = NULL; - bvh->tree = NULL; - - if(!bvh->current_x) - { - bvh_free(bvh); - return; - } - - bvh->current_xold = MEM_dupallocN(bvh->current_x); - - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - - if (tree == NULL) - { - printf("bvh_build: Out of memory for nodes.\n"); - bvh_free(bvh); - return; - } - - BLI_linklist_append(&bvh->tree, tree); - - nlink = bvh->tree; - - bvh->root = bvh->tree->link; - bvh->root->isleaf = 0; - bvh->root->parent = NULL; - bvh->root->nodes[0] = bvh->root->nodes[1] = bvh->root->nodes[1] = bvh->root->nodes[3] = NULL; - - if(bvh->numfaces<=1) - { - bvh->root->tri_index = 0; // Why that? --> only one face there - bvh->root->isleaf = 1; - bvh->root->traversed = 0; - bvh->root->count_nodes = 0; - bvh->leaf_root = bvh->root; - bvh->leaf_tree = bvh->root; - bvh->root->nextLeaf = NULL; - bvh->root->prevLeaf = NULL; - } - else - { - // create face boxes - face_list = MEM_callocN (bvh->numfaces * sizeof (CollisionTree *), "CollisionTree"); - if (face_list == NULL) - { - printf("bvh_build: Out of memory for face_list.\n"); - bvh_free(bvh); - return; - } - - // create face boxes - for(i = 0, k = 0; i < bvh->numfaces; i++) - { - LinkNode *tnlink; - - tree = (CollisionTree *)MEM_callocN(sizeof(CollisionTree), "CollisionTree"); - // TODO: check succesfull alloc - - tnlink = BLI_linklist_append_fast(&nlink->next, tree); - - face_list[i] = tree; - tree->tri_index = i; - tree->isleaf = 1; - tree->nextLeaf = NULL; - tree->prevLeaf = bvh->leaf_tree; - tree->parent = NULL; - tree->count_nodes = 0; - - if(i==0) - { - bvh->leaf_tree = bvh->leaf_root = tree; - } - else - { - bvh->leaf_tree->nextLeaf = tree; - bvh->leaf_tree = bvh->leaf_tree->nextLeaf; - } - - tree->nodes[0] = tree->nodes[1] = tree->nodes[2] = tree->nodes[3] = NULL; - - bvh_calc_DOP_hull_static(bvh, &face_list[i], 1, tree->bv, tree); - - // inflate the bv with some epsilon - for (j = KDOP_START; j < KDOP_END; j++) - { - tree->bv[(2 * j)] -= bvh->epsilon; // minimum - tree->bv[(2 * j) + 1] += bvh->epsilon; // maximum - } - - nlink = tnlink; - } - - // build root bvh - bvh_calc_DOP_hull_from_faces(bvh, face_list, bvh->numfaces, bvh->root->bv); - - // This is the traversal function. - bvh_div_env_node(bvh, bvh->root, face_list, 0, bvh->numfaces-1, 0, nlink); - if (face_list) - MEM_freeN(face_list); - - } - -} - -// bvh_overlap - is it possbile for 2 bv's to collide ? -DO_INLINE int bvh_overlap(float *bv1, float *bv2) -{ - int i = 0; - for (i = KDOP_START; i < KDOP_END; i++) - { - // Minimum test. - if (bv1[(2 * i)] > bv2[(2 * i) + 1]) - { - return 0; - } - // Maxiumum test. - if (bv2[(2 * i)] > bv1[(2 * i) + 1]) - { - return 0; - } - } - - return 1; -} - -// bvh_overlap_self - is it possbile for 2 bv's to selfcollide ? -DO_INLINE int bvh_overlap_self(CollisionTree * tree1, CollisionTree * tree2) -{ - // printf("overlap: %f, q: %f\n", (saacos(INPR(tree1->normal, tree2->normal)) / 2.0)+MAX2(tree1->alpha, tree2->alpha), saacos(INPR(tree1->normal, tree2->normal))); - - if((saacos(INPR(tree1->normal, tree2->normal)) / 2.0)+MAX2(tree1->alpha, tree2->alpha) > M_PI) - { - return 1; - } - else - return 0; -} - -/** - * bvh_traverse - traverse two bvh trees looking for potential collisions. - * - * max collisions are n*n collisions --> every triangle collide with - * every other triangle that doesn't require any realloc, but uses - * much memory - */ -int bvh_traverse ( ModifierData * md1, ModifierData * md2, CollisionTree * tree1, CollisionTree * tree2, float step, CM_COLLISION_RESPONSE collision_response, int selfcollision) -{ - int i = 0, ret=0, overlap = 0; - - /* - // Shouldn't be possible - if(!tree1 || !tree2) - { - printf("Error: no tree there\n"); - return 0; -} - */ - - if(selfcollision) - overlap = bvh_overlap_self(tree1, tree2); - else - overlap = bvh_overlap(tree1->bv, tree2->bv); - - if (overlap) - { - // Check if this node in the first tree is a leaf - if (tree1->isleaf) - { - // Check if this node in the second tree a leaf - if (tree2->isleaf) - { - // Provide the collision response. - - if(collision_response) - collision_response (md1, md2, tree1, tree2); - return 1; - } - else - { - // Process the quad tree. - for (i = 0; i < 4; i++) - { - // Only traverse nodes that exist. - if (tree2->nodes[i] && bvh_traverse (md1, md2, tree1, tree2->nodes[i], step, collision_response, selfcollision)) - ret = 1; - } - } - } - else - { - // Process the quad tree. - for (i = 0; i < 4; i++) - { - // Only traverse nodes that exist. - if (tree1->nodes [i] && bvh_traverse (md1, md2, tree1->nodes[i], tree2, step, collision_response, selfcollision)) - ret = 1; - } - } - } - - return ret; -} -// bottom up update of bvh tree: -// join the 4 children here -void bvh_join(CollisionTree *tree) -{ - int i = 0, j = 0; - float max = 0; - - if (!tree) - return; - - for (i = 0; i < 4; i++) - { - if (tree->nodes[i]) - { - for (j = KDOP_START; j < KDOP_END; j++) - { - // update minimum - if ((tree->nodes[i]->bv[(2 * j)] < tree->bv[(2 * j)]) || (i == 0)) - { - tree->bv[(2 * j)] = tree->nodes[i]->bv[(2 * j)]; - } - // update maximum - if ((tree->nodes[i]->bv[(2 * j) + 1] > tree->bv[(2 * j) + 1])|| (i == 0)) - { - tree->bv[(2 * j) + 1] = tree->nodes[i]->bv[(2 * j) + 1]; - } - } - - /* for selfcollisions */ - /* - if(!i) - { - tree->alpha = tree->nodes[i]->alpha; - VECCOPY(tree->normal, tree->nodes[i]->normal); - } - else - { - tree->alpha += saacos(INPR(tree->normal, tree->nodes[i]->normal)) / 2.0; - VECADD(tree->normal, tree->normal, tree->nodes[i]->normal); - VecMulf(tree->normal, 0.5); - max = MAX2(max, tree->nodes[i]->alpha); - } - */ - - } - else - break; - } - - tree->alpha += max; -} - -// update static bvh -/* you have to update the bvh position before calling this function */ -void bvh_update(BVH * bvh, int moving) -{ - CollisionTree *leaf, *parent; - int traversecheck = 1; // if this is zero we don't go further - unsigned int j = 0; - - for (leaf = bvh->leaf_root; leaf; leaf = leaf->nextLeaf) - { - traversecheck = 1; - if ((leaf->parent) && (leaf->parent->traversed == leaf->parent->count_nodes)) - { - leaf->parent->traversed = 0; - } - if(!moving) - bvh_calc_DOP_hull_static(bvh, &leaf, 1, leaf->bv, leaf); - else - bvh_calc_DOP_hull_moving(bvh, &leaf, 1, leaf->bv, leaf); - - // inflate the bv with some epsilon - for (j = KDOP_START; j < KDOP_END; j++) - { - leaf->bv[(2 * j)] -= bvh->epsilon; // minimum - leaf->bv[(2 * j) + 1] += bvh->epsilon; // maximum - } - - for (parent = leaf->parent; parent; parent = parent->parent) - { - if (traversecheck) - { - parent->traversed++; // we tried to go up in hierarchy - if (parent->traversed < parent->count_nodes) - { - traversecheck = 0; - - if (parent->parent) - { - if (parent->parent->traversed == parent->parent->count_nodes) - { - parent->parent->traversed = 0; - } - } - break; // we do not need to check further - } - else - { - bvh_join(parent); - } - } - - } - } -} - diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 2a8ba878c41..472fd951168 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -58,6 +58,7 @@ #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "DNA_sph_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_object_force.h" @@ -90,6 +91,7 @@ #include "BKE_object.h" #include "BKE_mesh.h" #include "BKE_softbody.h" +#include "BKE_sph.h" #include "BKE_cloth.h" #include "BKE_material.h" #include "BKE_particle.h" @@ -5178,6 +5180,89 @@ static void clothModifier_freeData(ModifierData *md) } } +/* Smooth Particly Hydrodynamics */ + +static void sphModifier_initData(ModifierData *md) +{ + SphModifierData *sphmd = (SphModifierData*) md; + + sphmd->sim_parms = MEM_callocN(sizeof(SphSimSettings), "SPH sim parms"); + sphmd->coll_parms = MEM_callocN(sizeof(SphCollSettings), "SPH coll parms"); + + /* check for alloc failing */ + if(!sphmd->sim_parms || !sphmd->coll_parms) + return; + + sph_init(sphmd); +} + +static DerivedMesh *sphModifier_applyModifier(ModifierData *md, Object *ob, + DerivedMesh *derivedData, int useRenderParams, int isFinalCalc) +{ + SphModifierData *sphmd = (SphModifierData*) md; + DerivedMesh *result=NULL; + + /* check for alloc failing */ + if(!sphmd->sim_parms || !sphmd->coll_parms) + return derivedData; + + result = sphModifier_do(sphmd, ob, derivedData, useRenderParams, isFinalCalc); + + if(result) + { + CDDM_calc_normals(result); + return result; + } + + return derivedData; +} + +static void sphModifier_updateDepgraph( + ModifierData *md, DagForest *forest, Object *ob, + DagNode *obNode) +{ + SphModifierData *sphmd = (SphModifierData*) md; + + Base *base; + +} + +CustomDataMask sphModifier_requiredDataMask(ModifierData *md) +{ + CustomDataMask dataMask = 0; + + /* ask for vertexgroups if we need them */ + dataMask |= (1 << CD_MDEFORMVERT); + + return dataMask; +} + +static void sphModifier_copyData(ModifierData *md, ModifierData *target) +{ + +} + + +static int sphModifier_dependsOnTime(ModifierData *md) +{ + return 1; +} + +static void sphModifier_freeData(ModifierData *md) +{ + SphModifierData *sphmd = (SphModifierData*) md; + + if (sphmd) + { + sph_free_modifier(sphmd); + + if(sphmd->sim_parms) + MEM_freeN(sphmd->sim_parms); + if(sphmd->coll_parms) + MEM_freeN(sphmd->coll_parms); + } +} + /* Collision */ static void collisionModifier_initData(ModifierData *md) @@ -5191,7 +5276,7 @@ static void collisionModifier_initData(ModifierData *md) collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; - collmd->bvh = NULL; + collmd->bvhtree = NULL; } static void collisionModifier_freeData(ModifierData *md) @@ -5200,8 +5285,8 @@ static void collisionModifier_freeData(ModifierData *md) if (collmd) { - if(collmd->bvh) - bvh_free(collmd->bvh); + if(collmd->bvhtree) + BLI_bvhtree_free(collmd->bvhtree); if(collmd->x) MEM_freeN(collmd->x); if(collmd->xnew) @@ -5212,7 +5297,6 @@ static void collisionModifier_freeData(ModifierData *md) MEM_freeN(collmd->current_xnew); if(collmd->current_v) MEM_freeN(collmd->current_v); - if(collmd->mfaces) MEM_freeN(collmd->mfaces); @@ -5223,7 +5307,7 @@ static void collisionModifier_freeData(ModifierData *md) collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; - collmd->bvh = NULL; + collmd->bvhtree = NULL; collmd->mfaces = NULL; } } @@ -5291,9 +5375,8 @@ static void collisionModifier_deformVerts( collmd->mfaces = dm->dupFaceArray(dm); collmd->numfaces = dm->getNumFaces(dm); - // TODO: epsilon // create bounding box hierarchy - collmd->bvh = bvh_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->x, numverts, ob->pd->pdef_sboft); + collmd->bvhtree = bvhtree_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->x, numverts, ob->pd->pdef_sboft); collmd->time = current_time; } @@ -5316,25 +5399,25 @@ static void collisionModifier_deformVerts( memcpy(collmd->current_x, collmd->x, numverts*sizeof(MVert)); /* check if GUI setting has changed for bvh */ - if(collmd->bvh) + if(collmd->bvhtree) { - if(ob->pd->pdef_sboft != collmd->bvh->epsilon) + if(ob->pd->pdef_sboft != BLI_bvhtree_getepsilon(collmd->bvhtree)) { - bvh_free(collmd->bvh); - collmd->bvh = bvh_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->current_x, numverts, ob->pd->pdef_sboft); + BLI_bvhtree_free(collmd->bvhtree); + collmd->bvhtree = bvhtree_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->current_x, numverts, ob->pd->pdef_sboft); } } - /* happens on file load (ONLY when i decomment changes in readfile.c */ - if(!collmd->bvh) + /* happens on file load (ONLY when i decomment changes in readfile.c) */ + if(!collmd->bvhtree) { - collmd->bvh = bvh_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->current_x, numverts, ob->pd->pdef_sboft); + collmd->bvhtree = bvhtree_build_from_mvert(collmd->mfaces, collmd->numfaces, collmd->current_x, numverts, ob->pd->pdef_sboft); } else { // recalc static bounding boxes - bvh_update_from_mvert(collmd->bvh, collmd->current_x, numverts, NULL, 0); + bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, NULL, collmd->numverts, 0 ); } collmd->time = current_time; @@ -7106,6 +7189,18 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type) mti->requiredDataMask = bevelModifier_requiredDataMask; mti->applyModifier = bevelModifier_applyModifier; mti->applyModifierEM = bevelModifier_applyModifierEM; + + mti = INIT_TYPE(Sph); + mti->type = eModifierTypeType_Nonconstructive; + mti->flags = eModifierTypeFlag_AcceptsMesh + | eModifierTypeFlag_UsesPointCache; + mti->initData = sphModifier_initData; + mti->copyData = sphModifier_copyData; + mti->requiredDataMask = sphModifier_requiredDataMask; + mti->applyModifier = sphModifier_applyModifier; + mti->dependsOnTime = sphModifier_dependsOnTime; + mti->freeData = sphModifier_freeData; + mti->updateDepgraph = sphModifier_updateDepgraph; mti = INIT_TYPE(Displace); mti->type = eModifierTypeType_OnlyDeform; diff --git a/source/blender/blenkernel/intern/sph.c b/source/blender/blenkernel/intern/sph.c new file mode 100644 index 00000000000..3db1a361d5c --- /dev/null +++ b/source/blender/blenkernel/intern/sph.c @@ -0,0 +1,490 @@ +/* pw.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* Contributor(s): Daniel Genrich +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include + +#include "MEM_guardedalloc.h" + +#include "BKE_sph.h" + +#include "DNA_sph_types.h" + +#include "sph_extern.h" + +#include "DNA_effect_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "DNA_particle_types.h" +#include "DNA_scene_types.h" + +#include "BKE_cdderivedmesh.h" +#include "BKE_effect.h" +#include "BKE_global.h" +#include "BKE_mesh.h" +#include "BKE_modifier.h" +#include "BKE_particle.h" + + +// necessary +#include "float.h" +#include "math.h" +#include "BLI_kdtree.h" +#include "BLI_arithb.h" + +// #include "omp.h" + +#ifdef _WIN32 +void ststart ( void ) +{} +void stend ( void ) +{ +} +double stval() +{ + return 0; +} +#else +#include + +static struct timeval _ststart, _stend; +static struct timezone stz; + +void ststart(void) +{ + gettimeofday(&_ststart, &stz); +} +void stend(void) +{ + gettimeofday(&_stend,&stz); +} +double stval() +{ + double t1, t2; + t1 = (double)_ststart.tv_sec + (double)_ststart.tv_usec/(1000*1000); + t2 = (double)_stend.tv_sec + (double)_stend.tv_usec/(1000*1000); + return t2-t1; +} +#endif + +void sph_init (SphModifierData *sphmd) +{ + /* fill modifier with standard settings */ + sphmd->sim_parms->timestep = 0.001; // 0.001 + sphmd->sim_parms->viscosity = 80000.0; + sphmd->sim_parms->incompressibility = 8000000.0; + sphmd->sim_parms->surfacetension = 8000.0; + sphmd->sim_parms->density = 1000.0; + sphmd->sim_parms->gravity[2] = -9.81; + sphmd->sim_parms->gravity[1] = 0.0; + sphmd->sim_parms->gravity[0] = 0.0; + sphmd->sim_parms->samplingdistance = 0.02; // length of one cell? 0.01 + sphmd->sim_parms->smoothinglength = 2.5; + sphmd->sim_parms->flags = SPH_SIMSETTINGS_FLAG_GHOSTS | SPH_SIMSETTINGS_FLAG_OFFLINE | SPH_SIMSETTINGS_FLAG_MULTIRES | SPH_SIMSETTINGS_FLAG_DOMAIN; + sphmd->sim_parms->computesurfaceevery = 5; // 30000000 + sphmd->sim_parms->fastmarchingevery = 5; + sphmd->sim_parms->dumppovrayevery = 300000; + sphmd->sim_parms->dumpimageevery = 30; + sphmd->sim_parms->totaltime = 0.01; // 40.0 + sphmd->sim_parms->tangentialfriction = 0.1; + sphmd->sim_parms->normalfriction = 0.95; + sphmd->sim_parms->initiallevel = 1; + sphmd->sim_parms->rotation_angle = 0.0; + + sphmd->sim_parms->rotation_axis[0] = 1.0; + sphmd->sim_parms->rotation_axis[1] = 1.0; + sphmd->sim_parms->rotation_axis[2] = 1.0; + + sphmd->sim_parms->rotation_center[0] = 0.0; + sphmd->sim_parms->rotation_center[1] = 0.0; + sphmd->sim_parms->rotation_center[2] = 0.0; + + sphmd->sim_parms->scenelowerbound[0] = -1.0; + sphmd->sim_parms->scenelowerbound[1] = -1.0; + sphmd->sim_parms->scenelowerbound[2] = -1.0; + + sphmd->sim_parms->sceneupperbound[0] = 1.0; + sphmd->sim_parms->sceneupperbound[1] = 1.0; + sphmd->sim_parms->sceneupperbound[2] = 1.0; + + sphmd->sim_parms->alpha = 2.0; + sphmd->sim_parms->beta = 3.0; + sphmd->sim_parms->gamma = 1.5; + + sphmd->sim_parms->numverts = 0; + sphmd->sim_parms->numtris = 0; + sphmd->sim_parms->verts = NULL; + sphmd->sim_parms->tris = NULL; + sphmd->sim_parms->normals = NULL; + + sphmd->sim_parms->resolution = 70; + + sphmd->sim_parms->co = NULL; + sphmd->sim_parms->r = NULL; + sphmd->sim_parms->numpart = 0; +} + +void sph_free_modifier (SphModifierData *sphmd) +{ + + // sph_free_cpp(sphmd); + + if(sphmd->sim_parms->verts) + free(sphmd->sim_parms->verts); + if(sphmd->sim_parms->tris) + free(sphmd->sim_parms->tris); + if(sphmd->sim_parms->normals) + free(sphmd->sim_parms->normals); + if(sphmd->sim_parms->co) + MEM_freeN(sphmd->sim_parms->co); + if(sphmd->sim_parms->r) + free(sphmd->sim_parms->r); + +} + + +DerivedMesh *sphModifier_do(SphModifierData *sphmd,Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) +{ + SphSimSettings *sim_parms = sphmd->sim_parms; + DerivedMesh *result = NULL; + MVert *mvert = NULL; + MFace *mface = NULL; + int a = 0; + float mat[4][4], imat[4][4]; + Mat4CpyMat4(mat, ob->obmat); + Mat4Invert(imat, mat); + + // only domain is simulated + if(!(sim_parms->flags & SPH_SIMSETTINGS_FLAG_DOMAIN) && !(sim_parms->flags & SPH_SIMSETTINGS_FLAG_BAKING)) + { + return dm; + } + + ststart(); + + if(!(sim_parms->flags & SPH_SIMSETTINGS_FLAG_INIT)) + { + if(!sph_init_all (sphmd, dm, ob)) + { + sphmd->sim_parms->flags &= ~SPH_SIMSETTINGS_FLAG_INIT; + return dm; + } + } + + + + // sph_simulate_cpp(ob, sphmd, 1.0, NULL); + + stend(); + + printf ( "SPH simulation time: %f\n", ( float ) stval() ); + + if(sim_parms->numverts && sim_parms->numtris) + { + + + result = CDDM_new ( sim_parms->numverts, 0, sim_parms->numtris); + + // copy verts + mvert = CDDM_get_verts(result); + for(a=0; anumverts; a++) { + MVert *mv = &mvert[a]; + float *vbCo = &sim_parms->verts[a*3]; + VECCOPY(mv->co, vbCo); + Mat4MulVecfl(imat, mv->co); + } + + mface = CDDM_get_faces(result); + for(a=0; anumtris; a++) { + MFace *mf = &mface[a]; + int *tri = &sim_parms->tris[a*3]; + mf->v1 = tri[0]; + mf->v2 = tri[1]; + mf->v3 = tri[2]; + test_index_face(mf, NULL, 0, 3); + } + + CDDM_calc_edges ( result ); + CDDM_calc_normals ( result ); + + return result; + } + else + return dm; +} + +static void set_min_max(float *min, float *max, float *co) +{ + // also calc min + max of bounding box for 3d grid + min[0] = MIN2(min[0], co[0]); + min[1] = MIN2(min[1], co[1]); + min[2] = MIN2(min[2], co[2]); + + max[0] = MAX2(max[0], co[0]); + max[1] = MAX2(max[1], co[1]); + max[2] = MAX2(max[2], co[2]); +} + +long calc_distance_field(Object *ob, DerivedMesh *dm, SphModifierData *sphmd, float mat[4][4]) +{ + int numverts = dm->getNumVerts(dm); + int numfaces = dm->getNumFaces(dm); + MVert *mvert = dm->getVertArray(dm); + MFace *mface = dm->getFaceArray(dm); + int i, j, k; + KDTree *tree; + float co[3], co1[3], co2[3], co3[3], co4[3]; + int index; + float min[3] = {FLT_MAX, FLT_MAX, FLT_MAX}, max[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX}, slice, maxdir; + int resx, resy, resz; + int maxres = 20; + float *dist; + float *normals; + int totpart = 0; + float *cos = NULL; + int maxpart = 0; + + printf("calc_distance_field\n"); + + dist = MEM_callocN(maxres*maxres*maxres*sizeof(float), "distance_field"); + normals = MEM_callocN(numfaces*3*sizeof(float), "triangle_normals"); + + ///////////////////////////////////////////////// + // create + fill + balance kdtree + ///////////////////////////////////////////////// + tree = BLI_kdtree_new(numverts); + for(i = 0; i < numfaces; i++) + { + VECCOPY(co1, mvert[mface[i].v1].co); + Mat4MulVecfl(mat, co1); + set_min_max(min, max, co1); + VECCOPY(co2, mvert[mface[i].v2].co); + Mat4MulVecfl(mat, co2); + set_min_max(min, max, co2); + VECCOPY(co3, mvert[mface[i].v3].co); + Mat4MulVecfl(mat, co3); + set_min_max(min, max, co3); + + // calc triangle center + VECCOPY(co, co1); + VECADD(co, co, co2); + VECADD(co, co, co3); + if(mface[i].v4) + { + VECCOPY(co4, mvert[mface[i].v4].co); + Mat4MulVecfl(mat, co4); + set_min_max(min, max, co4); + VECADD(co, co, co4); + VecMulf(co, 0.25); + } + else + VecMulf(co, 1.0 / 3.0); + + if(mface[i].v4) + CalcNormFloat4(mvert[mface[i].v1].co, mvert[mface[i].v2].co, mvert[mface[i].v3].co, mvert[mface[i].v4].co, &normals[i*3]); + else + CalcNormFloat(mvert[mface[i].v1].co, mvert[mface[i].v2].co, mvert[mface[i].v3].co, &normals[i*3]); + + BLI_kdtree_insert(tree, i, co, NULL); + } + BLI_kdtree_balance(tree); + ///////////////////////////////////////////////// + + // calculate slice height + width + maxdir = max[0] - min[0]; + maxdir = MAX2(max[1]-min[1], maxdir); + maxdir = MAX2(max[2]-min[2], maxdir); + slice = maxdir / (float)maxres; + resx = MIN2(maxres, ceil((max[0] - min[0]) / slice)); + resy = MIN2(maxres, ceil((max[1] - min[1]) / slice)); + resz = MIN2(maxres, ceil((max[2] - min[2]) / slice)); + + // adjust max + max[0] = min[0] + slice * resx; + max[1] = min[1] + slice * resy; + max[2] = min[2] + slice * resz; + + if(sphmd->sim_parms->co) + MEM_freeN(sphmd->sim_parms->co); + + cos = sphmd->sim_parms->co = MEM_callocN(sizeof(float)*3*resx*resy*resz, "sph_cos"); + // r = calloc(1, sizeof(float)*resx*resy*resz); + maxpart = sizeof(float)*3*resx*resy*resz; + +// #pragma omp parallel for private(i,j,k) schedule(static) + for(i = 0; i < resx; i ++) + { + for(j = 0; j < resy; j++) + { + for(k = 0; k < resz; k++) + { + KDTreeNearest nearest; + float tco[3]; + tco[0] = min[0] + slice * i + slice * 0.5; + tco[1] = min[1] + slice * j + slice * 0.5; + tco[2] = min[2] + slice * k + slice * 0.5; + + index = BLI_kdtree_find_nearest(tree, tco, NULL, &nearest); + + if(index != -1) + { + float t[3]; + float sgn; + + VECSUB(t, tco, nearest.co); + sgn = INPR(t, &normals[nearest.index*3]); + + if(sgn < 0.0) + sgn = -1.0; + else + sgn = 1.0; + + dist[(i*resy*resz)+(j*resz)+k] = sgn * nearest.dist; + + if((int)sgn < 0) + { + // create particle if inside object + VECCOPY(&cos[totpart*3], tco); + + totpart++; + } + + } + else + { + printf("Error: no nearest point!\n"); + } + } + } + } + printf("maxpart: %d, totpart: %d\n", maxpart, totpart); + + sphmd->sim_parms->numpart = totpart; + MEM_freeN(dist); + MEM_freeN(normals); + BLI_kdtree_free(tree); + return totpart; +} + +/* add constraints, inflows, fluid, ... */ +int sph_init_all (SphModifierData *sphmd, DerivedMesh *dm, Object *ob) +{ + Base *base=NULL; + Object *fobject = NULL; + SphModifierData *fsphmd = NULL; + int fluids = 0; // only one fluid object possible + DerivedMesh *fdm = NULL; + + sphmd->sim_parms->flags |= SPH_SIMSETTINGS_FLAG_INIT; + CDDM_calc_normals ( dm ); + + /* create C++ object */ + // sph_init_cpp(sphmd); + sphmd->sim_parms->numpart = calc_distance_field(ob, dm, sphmd, ob->obmat); + return 1; + + /* create fluid domain */ + // sph_set_domain(sphmd, dm, ob->obmat); + + // check for constraints, fluid, etc. but ignore domains + for ( base = G.scene->base.first; base; base = base->next ) + { + fobject = base->object; + fsphmd = ( SphModifierData * ) modifiers_findByType ( fobject, eModifierType_Sph ); + + // TODO I could check for linked groups, too + if ( !fsphmd ) + { + // TODO + } + else + { + if(fsphmd == sphmd) + continue; + + if(fsphmd->sim_parms) + { + // check for fluid + if(((short)fsphmd->sim_parms->flags == SPH_SIMSETTINGS_FLAG_FLUID) && (!fluids)) + { + // create fluids + // particles have to be created AFTER constraints + // TODO: no particles = crash + + // get derivedmesh from object + fdm = mesh_get_derived_final(fobject, CD_MASK_BAREMESH); + + // create fluid object + /* + if(!sph_add_particles(sphmd, fdm, fobject->obmat, fsphmd->sim_parms->resolution)) + { + fluids--; + } + */ + if(fdm) + fdm->release(fdm); + + fluids++; + } + else if((short)fsphmd->sim_parms->flags & SPH_SIMSETTINGS_FLAG_OBSTACLE) + { + + } + } + } + } + + if(!fluids) + return 0; + + return 1; +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h new file mode 100644 index 00000000000..51f87b26aaf --- /dev/null +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -0,0 +1,63 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2006 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Daniel (Genscher) + * + * ***** END GPL LICENSE BLOCK ***** + */ + + +#ifndef BLI_KDOPBVH_H +#define BLI_KDOPBVH_H + +#include + +struct BVHTree; +typedef struct BVHTree BVHTree; + +typedef struct BVHTreeOverlap { + int indexA; + int indexB; +} BVHTreeOverlap; + +BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis); +void BLI_bvhtree_free(BVHTree *tree); + +/* construct: first insert points, then call balance */ +int BLI_bvhtree_insert(BVHTree *tree, int index, float *co, int numpoints); +void BLI_bvhtree_balance(BVHTree *tree); + +/* update: first update points/nodes, then call update_tree to refit the bounding volumes */ +int BLI_bvhtree_update_node(BVHTree *tree, int index, float *co, float *co_moving, int numpoints); +void BLI_bvhtree_update_tree(BVHTree *tree); + +/* collision/overlap: check two trees if they overlap, alloc's *overlap with length of the int return value */ +BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result); + +float BLI_bvhtree_getepsilon(BVHTree *tree); + +#endif // BLI_KDOPBVH_H + + + + diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c new file mode 100644 index 00000000000..8be52854a7b --- /dev/null +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -0,0 +1,786 @@ +/* kdop.c +* +* +* ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. The Blender +* Foundation also sells licenses for use in proprietary software under +* the Blender License. See http://www.blender.org/BL/ for information +* about this. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* +* The Original Code is Copyright (C) Blender Foundation +* All rights reserved. +* +* The Original Code is: all of this file. +* +* Contributor(s): Daniel Genrich +* +* ***** END GPL/BL DUAL LICENSE BLOCK ***** +*/ + +#include "math.h" +#include +#include +#include + +#include "MEM_guardedalloc.h" + +#include "BKE_utildefines.h" + +#include "BLI_kdopbvh.h" + +#ifdef _OPENMP +#include +#endif + +typedef struct BVHNode +{ + struct BVHNode *children[8]; // max 8 children + struct BVHNode *parent; // needed for bottom - top update + float bv[26]; // Bounding volume of all nodes, max 13 axis + int index; /* face, edge, vertex index */ + char totnode; // how many nodes are used, used for speedup + char traversed; // how many nodes already traversed until this level? + char main_axis; +} BVHNode; + +struct BVHTree +{ + BVHNode **nodes; + BVHNode *nodearray; /* pre-alloc branch nodes */ + int *orig_index; /* mapping for orig_index to node_index */ + float epsilon; /* epslion is used for inflation of the k-dop */ + int totleaf; // leafs + int totbranch; + char tree_type; // type of tree (4 => quadtree) + char axis; // kdop type (6 => OBB, 7 => AABB, ...) + char start_axis, stop_axis; // KDOP_AXES array indices according to axis +}; + +typedef struct BVHOverlapData +{ + BVHTree *tree1, *tree2; + BVHTreeOverlap *overlap; + int i, max_overlap; /* i is number of overlaps */ +} BVHOverlapData; +//////////////////////////////////////// + + +//////////////////////////////////////////////////////////////////////// +// Bounding Volume Hierarchy Definition +// +// Notes: From OBB until 26-DOP --> all bounding volumes possible, just choose type below +// Notes: You have to choose the type at compile time ITM +// Notes: You can choose the tree type --> binary, quad, octree, choose below +//////////////////////////////////////////////////////////////////////// + +static float KDOP_AXES[13][3] = +{ {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}, {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0}, {1.0, 1.0, -1.0}, +{1.0, -1.0, -1.0}, {1.0, 1.0, 0}, {1.0, 0, 1.0}, {0, 1.0, 1.0}, {1.0, -1.0, 0}, {1.0, 0, -1.0}, +{0, 1.0, -1.0} +}; + +////////////////////////////////////////////////////////////////////////////////////////////////////// +// Introsort +// with permission deriven from the following Java code: +// http://ralphunden.net/content/tutorials/a-guide-to-introsort/ +// and he derived it from the SUN STL +////////////////////////////////////////////////////////////////////////////////////////////////////// +static int size_threshold = 16; +/* +* Common methods for all algorithms +*/ +static void bvh_exchange(BVHNode **a, int i, int j) +{ + BVHNode *t=a[i]; + a[i]=a[j]; + a[j]=t; +} +static int floor_lg(int a) +{ + return (int)(floor(log(a)/log(2))); +} + +/* +* Insertion sort algorithm +*/ +static void bvh_insertionsort(BVHNode **a, int lo, int hi, int axis) +{ + int i,j; + BVHNode *t; + for (i=lo; i < hi; i++) + { + j=i; + t = a[i]; + while((j!=lo) && (t->bv[axis] < (a[j-1])->bv[axis])) + { + a[j] = a[j-1]; + j--; + } + a[j] = t; + } +} + +static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis) +{ + int i=lo, j=hi; + while (1) + { + while ((a[i])->bv[axis] < x->bv[axis]) i++; + j=j-1; + while (x->bv[axis] < (a[j])->bv[axis]) j=j-1; + if(!(i < j)) + return i; + bvh_exchange(a, i,j); + i++; + } +} + +/* +* Heapsort algorithm +*/ +static void bvh_downheap(BVHNode **a, int i, int n, int lo, int axis) +{ + BVHNode * d = a[lo+i-1]; + int child; + while (i<=n/2) + { + child = 2*i; + if ((child < n) && ((a[lo+child-1])->bv[axis] < (a[lo+child])->bv[axis])) + { + child++; + } + if (!(d->bv[axis] < (a[lo+child-1])->bv[axis])) break; + a[lo+i-1] = a[lo+child-1]; + i = child; + } + a[lo+i-1] = d; +} + +static void bvh_heapsort(BVHNode **a, int lo, int hi, int axis) +{ + int n = hi-lo, i; + for (i=n/2; i>=1; i=i-1) + { + bvh_downheap(a, i,n,lo, axis); + } + for (i=n; i>1; i=i-1) + { + bvh_exchange(a, lo,lo+i-1); + bvh_downheap(a, 1,i-1,lo, axis); + } +} + +static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // returns Sortable +{ + if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) + { + if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) + return a[mid]; + else + { + if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) + return a[hi]; + else + return a[lo]; + } + } + else + { + if ((a[hi])->bv[axis] < (a[mid])->bv[axis]) + { + if ((a[hi])->bv[axis] < (a[lo])->bv[axis]) + return a[lo]; + else + return a[hi]; + } + else + return a[mid]; + } +} +/* +* Quicksort algorithm modified for Introsort +*/ +static void bvh_introsort_loop (BVHNode **a, int lo, int hi, int depth_limit, int axis) +{ + int p; + + while (hi-lo > size_threshold) + { + if (depth_limit == 0) + { + bvh_heapsort(a, lo, hi, axis); + return; + } + depth_limit=depth_limit-1; + p=bvh_partition(a, lo, hi, bvh_medianof3(a, lo, lo+((hi-lo)/2)+1, hi-1, axis), axis); + bvh_introsort_loop(a, p, hi, depth_limit, axis); + hi=p; + } +} + +static void sort(BVHNode **a0, int begin, int end, int axis) +{ + if (begin < end) + { + BVHNode **a=a0; + bvh_introsort_loop(a, begin, end, 2*floor_lg(end-begin), axis); + bvh_insertionsort(a, begin, end, axis); + } +} +void sort_along_axis(BVHTree *tree, int start, int end, int axis) +{ + sort(tree->nodes, start, end, axis); +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// + +void BLI_bvhtree_free(BVHTree *tree) +{ + if(tree) + { + MEM_freeN(tree->nodes); + MEM_freeN(tree->nodearray); + MEM_freeN(tree->orig_index); + MEM_freeN(tree); + } +} + +BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis) +{ + BVHTree *tree; + int numbranches=0, i; + + // only support up to octree + if(tree_type > 8) + return NULL; + + tree = (BVHTree *)MEM_callocN(sizeof(BVHTree), "BVHTree"); + + if(tree) + { + // calculate max number of branches, our bvh kdop is "almost perfect" + for(i = 1; i <= (int)ceil((float)((float)log(maxsize)/(float)log(tree_type))); i++) + numbranches += (pow(tree_type, i) / tree_type); + + tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *)*(numbranches+maxsize + tree_type), "BVHNodes"); + + if(!tree->nodes) + { + MEM_freeN(tree); + return NULL; + } + + tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode)*(numbranches+maxsize + tree_type), "BVHNodeArray"); + + if(!tree->nodearray) + { + MEM_freeN(tree); + MEM_freeN(tree->nodes); + return NULL; + } + + tree->orig_index = (int *)MEM_callocN(sizeof(int)*(numbranches+maxsize + tree_type), "BVHIndexArray"); + + if(!tree->orig_index) + { + MEM_freeN(tree); + MEM_freeN(tree->nodes); + MEM_freeN(tree->nodearray); + return NULL; + } + + tree->epsilon = epsilon; + tree->tree_type = tree_type; + tree->axis = axis; + + if(axis == 26) + { + tree->start_axis = 0; + tree->stop_axis = 13; + } + else if(axis == 18) + { + tree->start_axis = 7; + tree->stop_axis = 13; + } + else if(axis == 14) + { + tree->start_axis = 0; + tree->stop_axis = 7; + } + else if(axis == 8) // AABB + { + tree->start_axis = 0; + tree->stop_axis = 4; + } + else if(axis == 6) // OBB + { + tree->start_axis = 0; + tree->stop_axis = 3; + } + else + { + BLI_bvhtree_free(tree); + return NULL; + } + } + + return tree; +} + +static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoints, int moving) +{ + float newminmax; + int i, k; + + // don't init boudings for the moving case + if(!moving) + { + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + node->bv[2*i] = FLT_MAX; + node->bv[2*i + 1] = -FLT_MAX; + } + } + + for(k = 0; k < numpoints; k++) + { + // for all Axes. + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + newminmax = INPR(&co[k * 3], KDOP_AXES[i]); + if (newminmax < node->bv[2 * i]) + node->bv[2 * i] = newminmax; + if (newminmax > node->bv[(2 * i) + 1]) + node->bv[(2 * i) + 1] = newminmax; + } + } +} + +// depends on the fact that the BVH's for each face is already build +static void refit_kdop_hull(BVHTree *tree, int start, int end, float *bv) +{ + float newmin,newmax; + int i, j; + + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + bv[2*i] = FLT_MAX; + bv[2*i + 1] = -FLT_MAX; + } + + for (j = start; j < end; j++) + { + // for all Axes. + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + newmin = tree->nodes[j]->bv[(2 * i)]; + if ((newmin < bv[(2 * i)])) + bv[(2 * i)] = newmin; + + newmax = tree->nodes[j]->bv[(2 * i) + 1]; + if ((newmax > bv[(2 * i) + 1])) + bv[(2 * i) + 1] = newmax; + } + } +} + +int BLI_bvhtree_insert(BVHTree *tree, int index, float *co, int numpoints) +{ + BVHNode *node= NULL; + int i; + + // insert should only possible as long as tree->totbranch is 0 + if(tree->totbranch > 0) + return 0; + + if(tree->totleaf+1 >= MEM_allocN_len(tree->nodes)) + return 0; + + // TODO check if have enough nodes in array + + node = tree->nodes[tree->totleaf] = &(tree->nodearray[tree->totleaf]); + tree->totleaf++; + + create_kdop_hull(tree, node, co, numpoints, 0); + + // inflate the bv with some epsilon + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + node->bv[(2 * i)] -= tree->epsilon; // minimum + node->bv[(2 * i) + 1] += tree->epsilon; // maximum + } + + node->index= index; + + return 1; +} + +// only supports x,y,z axis in the moment +// but we should use a plain and simple function here for speed sake +static char get_largest_axis(float *bv) +{ + float middle_point[3]; + + middle_point[0] = (bv[1]) - (bv[0]); // x axis + middle_point[1] = (bv[3]) - (bv[2]); // y axis + middle_point[2] = (bv[5]) - (bv[4]); // z axis + if (middle_point[0] > middle_point[1]) + { + if (middle_point[0] > middle_point[2]) + return 1; // max x axis + else + return 5; // max z axis + } + else + { + if (middle_point[1] > middle_point[2]) + return 3; // max y axis + else + return 5; // max z axis + } +} + +static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char lastaxis) +{ + char laxis; + int i, tend; + BVHNode *tnode; + int slice = (end-start+tree->tree_type-1)/tree->tree_type; //division rounded up + + // Determine which axis to split along + laxis = get_largest_axis(node->bv); + + // Sort along longest axis + if(laxis!=lastaxis) + sort_along_axis(tree, start, end, laxis); + + // split nodes along longest axis + for (i=0; start < end; start += slice, i++) //i counts the current child + { + tend = start + slice; + + if(tend > end) tend = end; + + if(tend-start == 1) // ok, we have 1 left for this node + { + node->children[i] = tree->nodes[start]; + node->children[i]->parent = node; + } + else + { + tnode = node->children[i] = tree->nodes[tree->totleaf + tree->totbranch] = &(tree->nodearray[tree->totbranch + tree->totleaf]); + tree->totbranch++; + tnode->parent = node; + + refit_kdop_hull(tree, start, tend, tnode->bv); + bvh_div_nodes(tree, tnode, start, tend, laxis); + } + node->totnode++; + } + + return; +} + +static void verify_tree(BVHTree *tree) +{ + int i, j, check = 0; + + // check the pointer list + for(i = 0; i < tree->totleaf; i++) + { + if(tree->nodes[i]->parent == NULL) + printf("Leaf has no parent: %d\n", i); + else + { + for(j = 0; j < tree->tree_type; j++) + { + if(tree->nodes[i]->parent->children[j] == tree->nodes[i]) + check = 1; + } + if(!check) + { + printf("Parent child relationship doesn't match: %d\n", i); + } + check = 0; + } + } + + // check the leaf list + for(i = 0; i < tree->totleaf; i++) + { + if(tree->nodearray[i].parent == NULL) + printf("Leaf has no parent: %d\n", i); + else + { + for(j = 0; j < tree->tree_type; j++) + { + if(tree->nodearray[i].parent->children[j] == &tree->nodearray[i]) + check = 1; + } + if(!check) + { + printf("Parent child relationship doesn't match: %d\n", i); + } + check = 0; + } + } + + printf("branches: %d, leafs: %d, total: %d\n", tree->totbranch, tree->totleaf, tree->totbranch + tree->totleaf); +} + +void BLI_bvhtree_balance(BVHTree *tree) +{ + BVHNode *node; + int i; + + if(tree->totleaf == 0) + return; + + // create root node + node = tree->nodes[tree->totleaf] = &(tree->nodearray[tree->totleaf]); + tree->totbranch++; + + // refit root bvh node + refit_kdop_hull(tree, 0, tree->totleaf, tree->nodes[tree->totleaf]->bv); + // create + balance tree + bvh_div_nodes(tree, tree->nodes[tree->totleaf], 0, tree->totleaf, 0); + + // put indices into array for O(1) access + for(i = 0; i < tree->totleaf; i++) + { + tree->orig_index[tree->nodes[i]->index] = i; + } + + verify_tree(tree); +} + +// overlap - is it possbile for 2 bv's to collide ? +static int tree_overlap(float *bv1, float *bv2, int start_axis, int stop_axis) +{ + float *bv1_end = bv1 + (stop_axis<<1); + + bv1 += start_axis<<1; + bv2 += start_axis<<1; + + // test all axis if min + max overlap + for (; bv1 != bv1_end; bv1+=2, bv2+=2) + { + if ((*(bv1) > *(bv2 + 1)) || (*(bv2) > *(bv1 + 1))) + return 0; + } + + return 1; +} + +static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2) +{ + int j; + + if(tree_overlap(node1->bv, node2->bv, MIN2(data->tree1->start_axis, data->tree2->start_axis), MIN2(data->tree1->stop_axis, data->tree2->stop_axis))) + { + // check if node1 is a leaf + if(node1->index) + { + // check if node2 is a leaf + if(node2->index) + { + + if(node1 == node2) + { + return; + } + + if(data->i >= data->max_overlap) + { + // try to make alloc'ed memory bigger + data->overlap = realloc(data->overlap, sizeof(BVHTreeOverlap)*data->max_overlap*2); + + if(!data->overlap) + { + printf("Out of Memory in traverse\n"); + return; + } + data->max_overlap *= 2; + } + + // both leafs, insert overlap! + data->overlap[data->i].indexA = node1->index; + data->overlap[data->i].indexB = node2->index; + + data->i++; + } + else + { + for(j = 0; j < data->tree2->tree_type; j++) + { + if(node2->children[j]) + traverse(data, node1, node2->children[j]); + } + } + } + else + { + + for(j = 0; j < data->tree2->tree_type; j++) + { + if(node1->children[j]) + traverse(data, node1->children[j], node2); + } + } + } + return; +} + +BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) +{ + int j, total = 0; + BVHTreeOverlap *overlap = NULL, *to = NULL; + BVHOverlapData *data[tree1->tree_type]; + + // check for compatibility of both trees (can't compare 14-DOP with 18-DOP) + if((tree1->axis != tree2->axis) && ((tree1->axis == 14) || tree2->axis == 14)) + return 0; + + // fast check root nodes for collision before doing big splitting + traversal + if(!tree_overlap(tree1->nodes[tree1->totleaf]->bv, tree2->nodes[tree2->totleaf]->bv, MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis))) + return 0; + + for(j = 0; j < tree1->tree_type; j++) + { + data[j] = (BVHOverlapData *)MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData"); + + // init BVHOverlapData + data[j]->overlap = (BVHTreeOverlap *)malloc(sizeof(BVHTreeOverlap)*MAX2(tree1->totleaf, tree2->totleaf)); + data[j]->tree1 = tree1; + data[j]->tree2 = tree2; + data[j]->max_overlap = MAX2(tree1->totleaf, tree2->totleaf); + data[j]->i = 0; + } + +#pragma omp parallel for private(j) schedule(static) + for(j = 0; j < tree1->tree_type; j++) + { + traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]); + } + + for(j = 0; j < tree1->tree_type; j++) + total += data[j]->i; + + to = overlap = (BVHTreeOverlap *)MEM_callocN(sizeof(BVHTreeOverlap)*total, "BVHTreeOverlap"); + + for(j = 0; j < tree1->tree_type; j++) + { + memcpy(to, data[j]->overlap, data[j]->i*sizeof(BVHTreeOverlap)); + to+=data[j]->i; + } + + for(j = 0; j < tree1->tree_type; j++) + { + free(data[j]->overlap); + MEM_freeN(data[j]); + } + + (*result) = total; + return overlap; +} + + +// bottom up update of bvh tree: +// join the 4 children here +static void node_join(BVHTree *tree, BVHNode *node) +{ + int i, j; + + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + node->bv[2*i] = FLT_MAX; + node->bv[2*i + 1] = -FLT_MAX; + } + + for (i = 0; i < tree->tree_type; i++) + { + if (node->children[i]) + { + for (j = tree->start_axis; j < tree->stop_axis; j++) + { + // update minimum + if (node->children[i]->bv[(2 * j)] < node->bv[(2 * j)]) + node->bv[(2 * j)] = node->children[i]->bv[(2 * j)]; + + // update maximum + if (node->children[i]->bv[(2 * j) + 1] > node->bv[(2 * j) + 1]) + node->bv[(2 * j) + 1] = node->children[i]->bv[(2 * j) + 1]; + } + } + else + break; + } +} + +// call before BLI_bvhtree_update_tree() +int BLI_bvhtree_update_node(BVHTree *tree, int index, float *co, float *co_moving, int numpoints) +{ + BVHNode *node= NULL; + int i = 0; + + // check if index exists + if(index > tree->totleaf) + return 0; + + node = tree->nodes[tree->orig_index[index]]; + + create_kdop_hull(tree, node, co, numpoints, 0); + + if(co_moving) + create_kdop_hull(tree, node, co_moving, numpoints, 1); + + // inflate the bv with some epsilon + for (i = tree->start_axis; i < tree->stop_axis; i++) + { + node->bv[(2 * i)] -= tree->epsilon; // minimum + node->bv[(2 * i) + 1] += tree->epsilon; // maximum + } + + return 1; +} + +// call BLI_bvhtree_update_node() first for every node/point/triangle +void BLI_bvhtree_update_tree(BVHTree *tree) +{ + BVHNode *leaf, *parent; + + // reset tree traversing flag + for (leaf = tree->nodearray + tree->totleaf; leaf != tree->nodearray + tree->totleaf + tree->totbranch; leaf++) + leaf->traversed = 0; + + for (leaf = tree->nodearray; leaf != tree->nodearray + tree->totleaf; leaf++) + { + for (parent = leaf->parent; parent; parent = parent->parent) + { + parent->traversed++; // we tried to go up in hierarchy + if (parent->traversed < parent->totnode) + break; // we do not need to check further + else + node_join(tree, parent); + } + } +} + +float BLI_bvhtree_getepsilon(BVHTree *tree) +{ + return tree->epsilon; +} diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 24606bd822f..e3649a0cc43 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3073,6 +3073,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) clmd->sim_parms= newdataadr(fd, clmd->sim_parms); clmd->coll_parms= newdataadr(fd, clmd->coll_parms); + clmd->point_cache= newdataadr(fd, clmd->point_cache); if(clmd->point_cache) @@ -3082,22 +3083,16 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) if(clmd->sim_parms->presets > 10) clmd->sim_parms->presets = 0; } + else + { + /* Collision modifier without parameters?? */ + + } } else if (md->type==eModifierType_Collision) { CollisionModifierData *collmd = (CollisionModifierData*) md; - /* - // TODO: CollisionModifier should use pointcache - // + have proper reset events before enabling this - collmd->x = newdataadr(fd, collmd->x); - collmd->xnew = newdataadr(fd, collmd->xnew); - collmd->mfaces = newdataadr(fd, collmd->mfaces); - - collmd->current_x = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_x"); - collmd->current_xnew = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_xnew"); - collmd->current_v = MEM_callocN(sizeof(MVert)*collmd->numverts,"current_v"); - */ collmd->x = NULL; collmd->xnew = NULL; @@ -3106,9 +3101,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb) collmd->current_v = NULL; collmd->time = -1; collmd->numverts = 0; - collmd->bvh = NULL; + collmd->bvhtree = NULL; collmd->mfaces = NULL; - } else if (md->type==eModifierType_Hook) { HookModifierData *hmd = (HookModifierData*) md; diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index 242965a820c..c6482290c86 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -297,6 +297,10 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la /* Cloth sim button defines */ #define B_CLOTH_CHANGEPREROLL 1480 +/* SPH sim button defines */ +#define B_SPH_BAKE 1490 + + /* *********************** */ #define B_WORLDBUTS 1600 diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index b7b43817474..b2d6e8e5756 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -35,6 +35,7 @@ typedef enum ModifierType { eModifierType_Cloth, eModifierType_Collision, eModifierType_Bevel, + eModifierType_Sph, NUM_MODIFIER_TYPES } ModifierType; @@ -374,6 +375,14 @@ typedef struct ClothModifierData { struct PointCache *point_cache; /* definition is in DNA_object_force.h */ } ClothModifierData; +typedef struct SphModifierData { + ModifierData modifier; + + struct SPH *sph; /* pointer to cpp sph sim */ + struct SphSimSettings *sim_parms; /* definition is in DNA_sph_types.h */ + struct SphCollSettings *coll_parms; /* definition is in DNA_sph_types.h */ +} SphModifierData; + typedef struct CollisionModifierData { ModifierData modifier; @@ -390,7 +399,7 @@ typedef struct CollisionModifierData { unsigned int numfaces; int pad; float time; /* cfra time of modifier */ - struct BVH *bvh; /* bounding volume hierarchy for this cloth object */ + struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */ } CollisionModifierData; typedef enum { diff --git a/source/blender/makesdna/DNA_sph_types.h b/source/blender/makesdna/DNA_sph_types.h new file mode 100644 index 00000000000..add3053f612 --- /dev/null +++ b/source/blender/makesdna/DNA_sph_types.h @@ -0,0 +1,102 @@ +/** + * $Id: DNA_cloth_types.h,v 1.1 2007/08/01 02:28:34 daniel Exp $ + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2006 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Daniel (Genscher) + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ +#ifndef DNA_SPH_TYPES_H +#define DNA_SPH_TYPES_H + +// string scene, constraint, backup: missing +// string _file; +// string pov; +// string rendered; +typedef struct SphSimSettings +{ + int flags; // see pw_extern.h + float timestep; + float viscosity; + float incompressibility; /* how incompressible is the fluid? */ + float surfacetension; + float density; + float gravity[3]; /* gravity on the domain */ + float samplingdistance; + float smoothinglength; + + float controlviscosity; + int dumpimageevery; + int computesurfaceevery; + int fastmarchingevery; + int dumppovrayevery; + + float totaltime; + + float tangentialfriction; /* constraint tangential friction */ + float normalfriction; /* constraint normal friction */ + + float rotation_angle; + float rotation_axis[3]; + float rotation_center[3]; + float scenelowerbound[3]; + float sceneupperbound[3]; + + int initiallevel; + + float alpha; + float beta; + float gamma; + + /* needed for better direct resolution input for constraints, fluids,... */ + int resolution; /* can also be calculated by (Max-Min) / samplingdistance */ + int pad; + float *verts; + float *normals; + int *tris; + unsigned int numverts; + unsigned int numtris; + float *co; /* particle positions */ + float *r; /* particle radius */ + long numpart; + int pad2; +} +SphSimSettings; + +typedef struct SphCollSettings +{ + float epsilon; /* min distance for collisions. */ + float self_friction; /* Fiction/damping with self contact. */ + float friction; /* Friction/damping applied on contact with other object.*/ + short self_loop_count; /* How many iterations for the selfcollision loop */ + short loop_count; /* How many iterations for the collision loop. */ + struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ + int flags; /* collision flags defined in BKE_cloth.h */ + float selfepsilon; /* for selfcollision */ +} +SphCollSettings; + +#endif // DNA_SPH_TYPES_H diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index b02e89233e5..815a9c3869e 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -985,7 +985,7 @@ static uiBlock *modifiers_add_menu(void *ob_v) /* Only allow adding through appropriate other interfaces */ if(ELEM3(i, eModifierType_Softbody, eModifierType_Hook, eModifierType_ParticleSystem)) continue; - if(ELEM(i, eModifierType_Cloth, eModifierType_Collision)) continue; + if(ELEM3(i, eModifierType_Cloth, eModifierType_Collision, eModifierType_Sph)) continue; if((mti->flags&eModifierTypeFlag_AcceptsCVs) || (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) { @@ -1807,6 +1807,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco height = 31; } else if (md->type==eModifierType_Collision) { height = 31; + } else if (md->type==eModifierType_Sph) { + height = 31; } else if (md->type==eModifierType_Boolean) { height = 48; } else if (md->type==eModifierType_Array) { @@ -1837,7 +1839,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiButSetFunc(but, modifiers_applyModifier, ob, md); } - if (md->type!=eModifierType_Softbody && md->type!=eModifierType_ParticleSystem && (md->type!=eModifierType_Cloth)) { + if (md->type!=eModifierType_Softbody && md->type!=eModifierType_ParticleSystem && (md->type!=eModifierType_Cloth) && (md->type!=eModifierType_Sph)) { but = uiDefBut(block, BUT, B_MODIFIER_RECALC, "Copy", lx,(cy-=19),60,19, 0, 0, 0, 0, 0, "Duplicate the current modifier at the same position in the stack"); uiButSetFunc(but, modifiers_copyModifier, ob, md); } @@ -2229,6 +2231,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefBut(block, LABEL, 1, "See Soft Body panel.", lx, (cy-=19), buttonWidth,19, NULL, 0.0, 0.0, 0, 0, ""); } else if (md->type==eModifierType_Cloth) { uiDefBut(block, LABEL, 1, "See Cloth panel.", lx, (cy-=19), buttonWidth,19, NULL, 0.0, 0.0, 0, 0, ""); + } else if (md->type==eModifierType_Sph) { + uiDefBut(block, LABEL, 1, "See Sph panel.", lx, (cy-=19), buttonWidth,19, NULL, 0.0, 0.0, 0, 0, ""); } else if (md->type==eModifierType_Collision) { uiDefBut(block, LABEL, 1, "See Collision panel.", lx, (cy-=19), buttonWidth,19, NULL, 0.0, 0.0, 0, 0, ""); } else if (md->type==eModifierType_Boolean) { diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 9a749b6fbd9..4dcc51e03e3 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -52,6 +52,8 @@ #include "BKE_utildefines.h" #include "BKE_particle.h" #include "BKE_pointcache.h" +#include "BKE_sph.h" + #include "BLI_blenlib.h" #include "BLI_arithb.h" @@ -107,6 +109,7 @@ #include "DNA_particle_types.h" #include "DNA_radio_types.h" #include "DNA_screen_types.h" +#include "DNA_sph_types.h" #include "DNA_sound_types.h" #include "DNA_texture_types.h" #include "DNA_userdef_types.h" @@ -135,6 +138,7 @@ #include "BKE_object.h" #include "BKE_particle.h" #include "BKE_sound.h" +#include "BKE_sph.h" #include "BKE_texture.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" @@ -2476,6 +2480,27 @@ void do_object_panels(unsigned short event) allqueue(REDRAWVIEW3D, 0); } break; + case B_SPH_BAKE: + { + SphModifierData *sphmd = (SphModifierData *)modifiers_findByType(ob, eModifierType_Sph); + int i = 0; + + if(sphmd && sphmd->sim_parms) + { + sphmd->sim_parms->flags |= SPH_SIMSETTINGS_FLAG_BAKING; + + // call baking function + for(i = 0; i < 1; i++) + { + CFRA++; + update_for_newframe(); + } + + sphmd->sim_parms->flags &= ~SPH_SIMSETTINGS_FLAG_BAKING; + + } + } + break; } } @@ -5650,6 +5675,116 @@ static void object_panel_cloth_III(Object *ob) } +static void object_sph__enabletoggle(void *ob_v, void *arg2) +{ + Object *ob = ob_v; + ModifierData *md = modifiers_findByType(ob, eModifierType_Sph); + + if (!md) { + // create particle modifier + ParticleSettings *part = psys_new_settings("PSys", G.main); + ParticleSystem *psys = MEM_callocN(sizeof(ParticleSystem), "particle_system"); + ParticleSystemModifierData *psmd; + + md = modifier_new(eModifierType_Sph); + BLI_addtail(&ob->modifiers, md); + + part->type = PART_FLUID; + psys->part = part; + psys->pointcache = BKE_ptcache_add(); + psys->flag |= PSYS_ENABLED; + BLI_addtail(&ob->particlesystem,psys); + md= modifier_new(eModifierType_ParticleSystem); + sprintf(md->name, "SphParticleSystem" ); + psmd= (ParticleSystemModifierData*) md; + psmd->psys=psys; + BLI_addtail(&ob->modifiers, md); + + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + allqueue(REDRAWBUTSEDIT, 0); + allqueue(REDRAWVIEW3D, 0); + } + else { + Object *ob = ob_v; + ModifierData *md = modifiers_findByType(ob, eModifierType_Sph); + + if (!md) + return; + + BLI_remlink(&ob->modifiers, md); + + modifier_free(md); + + BIF_undo_push("Del modifier"); + + // ob->softflag |= OB_SB_RESET; + allqueue(REDRAWBUTSEDIT, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWIMAGE, 0); + allqueue(REDRAWOOPS, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); + object_handle_update(ob); + countall(); + } +} + +static void object_panel_sph(Object *ob) +{ + uiBlock *block=NULL; + uiBut *but=NULL; + static int val; + SphModifierData *sphmd = (SphModifierData *)modifiers_findByType(ob, eModifierType_Sph); + + block= uiNewBlock(&curarea->uiblocks, "object_sph", UI_EMBOSS, UI_HELV, curarea->win); + if(uiNewPanel(curarea, block, "Sph ", "Physics", 640, 0, 318, 204)==0) return; + uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); + + val = (sphmd ? 1:0); + + + but = uiDefButI(block, TOG, REDRAWBUTSOBJECT, "Sph", 10,200,130,20, &val, 0, 0, 0, 0, "Sets object to become Sph"); + uiButSetFunc(but, object_sph__enabletoggle, ob, NULL); + + + uiDefBut(block, LABEL, 0, "",10,10,300,0, NULL, 0.0, 0, 0, 0, ""); /* tell UI we go to 10,10*/ + + if(sphmd) + { + if(sphmd->sim_parms && (sphmd->sim_parms->flags & SPH_SIMSETTINGS_FLAG_DOMAIN)) + { + uiDefBut(block, BUT, B_SPH_BAKE, "BAKE",10, 180,300,20, NULL, 0.0, 0.0, 10, 0, "Perform simulation and output and surface&preview meshes for each frame."); + } + + uiDefButS(block, ROW, REDRAWBUTSOBJECT ,"Domain", 10, 160, 100, 20, (short *)&sphmd->sim_parms->flags, 15.0, SPH_SIMSETTINGS_FLAG_DOMAIN, 0.0, 0.0, " "); + uiDefButS(block, ROW, REDRAWBUTSOBJECT ,"Fluid", 110, 160, 100, 20, (short *)&sphmd->sim_parms->flags, 15.0, SPH_SIMSETTINGS_FLAG_FLUID, 0.0, 0.0, " "); + uiDefButS(block, ROW, REDRAWBUTSOBJECT ,"Obstacle", 210, 160, 100, 20, (short *)&sphmd->sim_parms->flags, 15.0, SPH_SIMSETTINGS_FLAG_OBSTACLE, 0.0, 0.0, " "); + + if(sphmd->sim_parms && (sphmd->sim_parms->flags & SPH_SIMSETTINGS_FLAG_DOMAIN)) + { + uiDefButBitI(block, TOG, SPH_SIMSETTINGS_FLAG_GHOSTS, REDRAWBUTSOBJECT, "Ghosts",10,140,100,20, &sphmd->sim_parms->flags, 0, 0, 0, 0, " "); + uiDefButBitI(block, TOG, SPH_SIMSETTINGS_FLAG_MULTIRES, REDRAWBUTSOBJECT, "Multires",110,140,100,20, &sphmd->sim_parms->flags, 0, 0, 0, 0, " "); + uiDefButBitI(block, TOG, SPH_SIMSETTINGS_FLAG_VORTICITY, REDRAWBUTSOBJECT, "Vorticity",210,140,100,20, &sphmd->sim_parms->flags, 0, 0, 0, 0, " "); + + // timestep + uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Timestep:",10,120,100,20, &sphmd->sim_parms->timestep, 0.0, 1.0, 0.0001f, 0, " "); + // totaltime + uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Totaltime:",110,120,100,20, &sphmd->sim_parms->totaltime, 0.0, 10000.0, 0.001f, 0, " "); + uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Sampling distance:",210,120,100,20, &sphmd->sim_parms->samplingdistance, 0.0, 1.0, 0.0001f, 0, " "); + uiDefButF(block, NUM, REDRAWBUTSOBJECT, "Smoothing Length:",10,100,100,20, &sphmd->sim_parms->smoothinglength, 0.0, 10.0, 0.1f, 0, " "); + + uiDefButI(block, NUM, REDRAWBUTSOBJECT, "Surface:",110,100,100,20, &sphmd->sim_parms->computesurfaceevery, 0.0, 1000.0, 1.0, 0, " "); + uiDefButI(block, NUM, REDRAWBUTSOBJECT, "Fast Marching:",210,100,100,20, &sphmd->sim_parms->fastmarchingevery, 0.0, 1000.0, 1.0, 0, " "); + } + else if(sphmd->sim_parms && (sphmd->sim_parms->flags & SPH_SIMSETTINGS_FLAG_FLUID)) + { + uiDefButI(block, NUM, REDRAWBUTSOBJECT, "Resolution:",10,120,100,20, &sphmd->sim_parms->resolution, 1.0, 1000.0, 1.0f, 0, " "); + } + } + + + uiBlockEndAlign(block); +} + void object_panels() { Object *ob; @@ -5682,6 +5817,7 @@ void physics_panels() object_panel_cloth(ob); object_panel_cloth_II(ob); object_panel_cloth_III(ob); + object_panel_sph(ob); object_panel_fluidsim(ob); } } diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 561024fb74b..84289be0928 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -1883,11 +1883,13 @@ static void draw_em_measure_stats(Object *ob, EditMesh *em) { EditEdge *eed; EditFace *efa; + EditVert *eve; float v1[3], v2[3], v3[3], v4[3]; float fvec[3]; char val[32]; /* Stores the measurement display text here */ char conv_float[5]; /* Use a float conversion matching the grid size */ float area, col[3]; /* area of the face, color of the text to draw */ + int i = 0; /* make the precission of the pronted value proportionate to the gridsize */ if ((G.vd->grid) < 0.01) @@ -1941,7 +1943,7 @@ static void draw_em_measure_stats(Object *ob, EditMesh *em) if(col[1]> 0.5) {col[0]*=0.7; col[2]*= 0.7;} else col[1]= col[1]*0.7 + 0.3; glColor3fv(col); - + /* for(efa= em->faces.first; efa; efa= efa->next) { if((efa->f & SELECT) || (G.moving && faceselectedOR(efa, SELECT)) ) { VECCOPY(v1, efa->v1->co); @@ -1966,6 +1968,24 @@ static void draw_em_measure_stats(Object *ob, EditMesh *em) glRasterPos3fv(efa->cent); BMF_DrawString( G.fonts, val); } + }*/ + + /* draw IDs of mesh vertexes */ + for(eve = em->verts.first; eve; eve = eve->next) { + char val[32]; + float fvec[3]; + VecLerpf(fvec, ob->loc, eve->co, 1.1); + glRasterPos3f(fvec[0], fvec[1], fvec[2]); + + sprintf(val, "%d", eve->keyindex); + BMF_DrawString(G.fonts, val); + } + for(efa= em->faces.first; efa; efa= efa->next) { + char val[32]; + sprintf(val, "%d", i); + glRasterPos3fv(efa->cent); + BMF_DrawString( G.fonts, val); + i++; } } From fd9ad582983939741a4c4fa5f2707f29365d6c09 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 9 May 2008 23:06:28 +0000 Subject: [PATCH 095/430] soc-2008-mxcurioni: towards Freestyle compilation, removing Qt's QString and QImage dependencies. Up to this commit, the following directories compile well (and without any warning): system, image, geometry, graph, winged_edge, view_map, stroke. Modified code is commented by //soc and unused variables by //soc unused --- config/darwin-config.py | 2 +- config/linux2-config.py | 2 +- config/linuxcross-config.py | 2 +- config/openbsd3-config.py | 2 +- config/sunos5-config.py | 2 +- config/win32-mingw-config.py | 2 +- config/win32-vc-config.py | 2 +- source/blender/freestyle/SConscript | 62 ++++++++++++-- .../freestyle/intern/geometry/Grid.cpp | 10 +-- .../blender/freestyle/intern/geometry/Grid.h | 24 +++--- .../freestyle/intern/image/GaussianFilter.h | 4 +- .../freestyle/intern/image/ImagePyramid.cpp | 8 +- .../intern/scene_graph/MaxFileLoader.h | 4 + .../intern/stroke/AdvancedFunctions1D.cpp | 4 +- .../intern/stroke/BasicStrokeShaders.cpp | 56 ++++++++----- .../freestyle/intern/stroke/Canvas.cpp | 81 +++++++++++++------ .../intern/stroke/ChainingIterators.cpp | 2 +- .../freestyle/intern/stroke/Operators.cpp | 12 +-- .../freestyle/intern/stroke/Stroke.cpp | 2 +- .../freestyle/intern/stroke/StrokeRep.cpp | 20 ++--- .../freestyle/intern/system/Interpreter.h | 2 + .../freestyle/intern/system/PseudoNoise.cpp | 2 +- .../freestyle/intern/system/StringUtils.cpp | 20 +++-- .../intern/view_map/FEdgeXDetector.cpp | 3 +- .../intern/view_map/FEdgeXDetector.h | 2 +- .../freestyle/intern/view_map/Interface0D.h | 2 + .../freestyle/intern/view_map/Interface1D.h | 1 + .../freestyle/intern/view_map/Silhouette.h | 2 +- .../intern/view_map/SteerableViewMap.cpp | 41 +++++++--- .../intern/view_map/ViewEdgeXBuilder.cpp | 4 +- .../intern/view_map/ViewEdgeXBuilder.h | 15 ++-- .../freestyle/intern/view_map/ViewMapIO.cpp | 2 +- .../freestyle/intern/winged_edge/WEdge.h | 3 + .../intern/winged_edge/WSFillGrid.cpp | 2 +- .../freestyle/intern/winged_edge/WSFillGrid.h | 4 +- .../freestyle/intern/winged_edge/WXEdge.h | 2 +- .../intern/winged_edge/WingedEdgeBuilder.cpp | 2 +- 37 files changed, 279 insertions(+), 133 deletions(-) diff --git a/config/darwin-config.py b/config/darwin-config.py index 9ceb1d1644b..115123f9984 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -168,7 +168,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' # WITH_BF_OPENEXR = 'true' # BF_OPENEXR = '${LCGDIR}/openexr' diff --git a/config/linux2-config.py b/config/linux2-config.py index 3c8a48d12bc..f59dcf266ee 100644 --- a/config/linux2-config.py +++ b/config/linux2-config.py @@ -94,7 +94,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py index 886b9f93f3f..603f6a1a880 100644 --- a/config/linuxcross-config.py +++ b/config/linuxcross-config.py @@ -14,7 +14,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' ########################### diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py index ad4891a0098..9a4c0d6f34e 100644 --- a/config/openbsd3-config.py +++ b/config/openbsd3-config.py @@ -88,7 +88,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr diff --git a/config/sunos5-config.py b/config/sunos5-config.py index 6581ad2b692..cccc380f60c 100644 --- a/config/sunos5-config.py +++ b/config/sunos5-config.py @@ -90,7 +90,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index b0a3c3ae18d..9757c0264b5 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -105,7 +105,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 849b153378f..8e7d6c56c13 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -116,7 +116,7 @@ BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' -BF_LIB3DS_INC = '${BF_LIB3DS}/lib3ds' +BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' #BF_NSPR = $(LIBDIR)/nspr diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 7e859e58c58..2bc08822a6e 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -4,13 +4,61 @@ Import ('env') sources = [] defs = [] +incs = '' -incs = '#/extern/freestyle/lib3ds #/extern/freestyle/swig' +incs += '../blenkernel ../blenlib ../imbuf ../makesdna' +# incs += ' #/extern/freestyle/lib3ds #/extern/freestyle/swig' +incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] +incs += ' ' + env['BF_PNG_INC'] -# env.BlenderLib (libname="bf_freestyle", -# sources=sources, -# includes=Split(incs), -# defines=defs, -# libtype=['blender'], -# priority = [15] ) \ No newline at end of file +######################################################## +# folders sources +######################################################## + +# system +prefix = 'intern/system' +system_sources = env.Glob(prefix + '/*.cpp') + +# image +prefix = 'intern/image' +image_sources = env.Glob(prefix + '/*.cpp') + +# geometry +prefix = 'intern/geometry' +geometry_sources = env.Glob(prefix + '/*.cpp') + +# scene_graph +prefix = 'intern/scene_graph' +scene_graph_sources = env.Glob(prefix + '/*.cpp') + +# winged_edge +prefix = 'intern/winged_edge' +winged_edge_sources = env.Glob(prefix + '/*.cpp') + +# view_map +prefix = 'intern/view_map' +view_map_sources = env.Glob(prefix + '/*.cpp') + +# stroke +prefix = 'intern/stroke' +stroke_sources = env.Glob(prefix + '/*.cpp') + +# rendering +# app + +sources = system_sources + image_sources + geometry_sources + scene_graph_sources + \ + winged_edge_sources + view_map_sources + stroke_sources +#print sources + +env.BlenderLib (libname="bf_freestyle", + sources=sources, + includes=Split(incs), + defines=defs, + libtype=['blender'], + priority = [15] ) + +######################################################## +# SWIG +######################################################## +# swig \ No newline at end of file diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp index 59b730358bc..2477227c410 100755 --- a/source/blender/freestyle/intern/geometry/Grid.cpp +++ b/source/blender/freestyle/intern/geometry/Grid.cpp @@ -46,7 +46,7 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ){ //first let us compute the plane equation. Vec3r v1(((occ)->getVertices())[0]); Vec3d normal((occ)->getNormal()); - double d = -(v1 * normal); + //soc unused - double d = -(v1 * normal); double tmp_u, tmp_v, tmp_t; if((occ)->rayIntersect(ray_org_, ray_dir_, tmp_t, tmp_u, tmp_v)){ @@ -106,7 +106,7 @@ void Grid::configure(const Vec3r& orig, if(grid_vol == 0){ double min=DBL_MAX; - int index; + int index=0; int nzeros=0; for(int i=0;i<3;++i){ if(size[i] == 0){ @@ -336,7 +336,7 @@ void Grid::initRay (const Vec3r &orig, for(unsigned i = 0; i < 3; i++) { _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]); - unsigned u = _current_cell[i]; + //soc unused - unsigned u = _current_cell[i]; _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } //_ray_occluders.clear(); @@ -359,7 +359,7 @@ bool Grid::initInfiniteRay (const Vec3r &orig, if(box.inside(orig)){ for(unsigned i = 0; i < 3; i++) { _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]); - unsigned u = _current_cell[i]; + //soc unused - unsigned u = _current_cell[i]; _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } }else{ @@ -372,7 +372,7 @@ bool Grid::initInfiniteRay (const Vec3r &orig, _current_cell[i] = (unsigned)floor((newOrig[i] - _orig[i]) / _cell_size[i]); if(_current_cell[i] == _cells_nb[i]) _current_cell[i] = _cells_nb[i] - 1; - unsigned u = _current_cell[i]; + //soc unused - unsigned u = _current_cell[i]; _pt[i] = newOrig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 6197721bb45..fdca13d4ca4 100755 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -81,6 +81,7 @@ class LIB_GEOMETRY_EXPORT Cell class GridVisitor{ public: + virtual ~GridVisitor() {}; //soc virtual void discoverCell(Cell *cell) {} virtual void examineOccluder(Polygon3r *occ) {} virtual void finishCell(Cell *cell) {} @@ -106,10 +107,21 @@ private: * the intersection information are stored and accessible. */ class firstIntersectionGridVisitor : public GridVisitor { + +//soc - changed order to remove warnings +public: + double u_, v_, t_; +private: + Polygon3r *occluder_; + Vec3r ray_org_, ray_dir_, cell_size_; + Cell * current_cell_; + public: firstIntersectionGridVisitor(const Vec3r& ray_org, const Vec3r& ray_dir, const Vec3r& cell_size) : - GridVisitor(), ray_org_(ray_org), cell_size_(cell_size),ray_dir_(ray_dir),occluder_(0), - u_(0),v_(0),t_(DBL_MAX),current_cell_(0){} + GridVisitor(), u_(0),v_(0),t_(DBL_MAX), + occluder_(0), + ray_org_(ray_org), ray_dir_(ray_dir), cell_size_(cell_size), + current_cell_(0) {} virtual ~firstIntersectionGridVisitor() {} virtual void discoverCell(Cell *cell) {current_cell_=cell;} @@ -117,14 +129,6 @@ public: virtual bool stop(); Polygon3r * occluder() {return occluder_;} - -public: - double u_, v_, t_; -private: - Polygon3r *occluder_; - Vec3r ray_org_, ray_dir_; - Vec3r cell_size_; - Cell * current_cell_; }; // diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index c75177541d3..c9ad04d4b80 100755 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -116,8 +116,8 @@ float GaussianFilter::getSmoothedPixel(Map * map, int x, int y) { float sum = 0.f; float L=0.f; - unsigned w=map->width(); - unsigned h=map->height(); + int w = (int)map->width(); //soc + int h = (int)map->height(); //soc // Current pixel is x,y // Sum surrounding pixels L value: diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index 45c02004d1c..e3f84983055 100755 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -58,9 +58,9 @@ float ImagePyramid::pixel(int x, int y, int level){ if(0 == level){ return img->pixel(x,y); } - int i = 1<>level; - int sy = y>>level; + uint i = 1<>level; + uint sy = y>>level; if(sx >= img->width()) sx = img->width()-1; if(sy >= img->height()) @@ -135,7 +135,7 @@ void GaussianPyramid::BuildPyramid(GrayImage* level0, unsigned nbLevels){ unsigned h = pLevel->height(); if(nbLevels!=0) { - for(unsigned i=0; iwidth()>>1; h = pLevel->height()>>1; GrayImage *img = new GrayImage(w,h); diff --git a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h index ab31e656d46..179f9a016df 100755 --- a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h +++ b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h @@ -32,6 +32,9 @@ # include # include + +//soc - modified to adapt Blender's in +// lib3ds includes # include # include # include @@ -40,6 +43,7 @@ # include # include # include + # include "../system/FreestyleConfig.h" # include "NodeGroup.h" # include "NodeTransform.h" diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp index cf2982606e0..ca0e97e68c1 100755 --- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp @@ -89,13 +89,13 @@ namespace Functions1D { } double GetDirectionalViewMapDensityF1D::operator()(Interface1D& inter) { - unsigned size; + //soc unsigned size; double res = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); return res; } double GetCompleteViewMapDensityF1D::operator()(Interface1D& inter) { - unsigned size; + //soc unsigned size; Id id = inter.getId(); double res = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration); return res; diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index c3827ae3e36..40a0bbbc738 100755 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -20,7 +20,6 @@ /////////////////////////////////////////////////////////////////////////////// #include -#include #include "BasicStrokeShaders.h" #include "../system/PseudoNoise.h" #include "../system/RandGen.h" @@ -32,16 +31,32 @@ #include "../system/StringUtils.h" #include "StrokeRenderer.h" #include "StrokeIO.h" -#include + +//soc #include +//soc #include +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" // Internal function -void convert(const QImage& iImage, float **oArray, unsigned &oSize) { - oSize = iImage.width(); - *oArray = new float[oSize]; - for(unsigned i=0; ix; + *oArray = new float[oSize]; + + char *pix; + for(unsigned i=0; i < oSize; ++i) { + pix = (char*) imBuf->rect + i*4; + (*oArray)[i] = ((float) pix[2] )/255.f; + } } namespace StrokeShaders { @@ -137,7 +152,7 @@ namespace StrokeShaders { { float step = (_maxThickness-_minThickness)/3.f; float l = stroke.getLength2D(); - float thickness; + float thickness = 0.0; if(l>300.f) thickness = _minThickness+3.f*step; else if((l< 300.f) && (l>100.f)) @@ -172,7 +187,7 @@ namespace StrokeShaders { _stretch = stretch; _minThickness = iMinThickness; _maxThickness = iMaxThickness; - QImage image; + ImBuf *image = 0; //soc vector pathnames; StringUtils::getPathName(TextureManager::Options::getPatternsPath(), pattern_name, @@ -180,11 +195,12 @@ namespace StrokeShaders { for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) { ifstream ifs(j->c_str()); if (ifs.is_open()) { - image.load(j->c_str()); - break; + //soc image.load(j->c_str()); + image = IMB_loadiffname(j->c_str(), 0); + break; } } - if (image.isNull()) + if (image == 0) //soc cerr << "Error: cannot find pattern \"" << pattern_name << "\" - check the path in the Options" << endl; else @@ -315,7 +331,7 @@ namespace StrokeShaders { bool stretch) : StrokeShader() { _stretch = stretch; - QImage image; + ImBuf *image = 0; //soc vector pathnames; StringUtils::getPathName(TextureManager::Options::getPatternsPath(), pattern_name, @@ -323,11 +339,11 @@ namespace StrokeShaders { for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) { ifstream ifs(j->c_str()); if (ifs.is_open()) { - image.load(j->c_str()); - break; + image = IMB_loadiffname(j->c_str(), 0); //soc + break; } } - if (image.isNull()) + if (image == 0) //soc cerr << "Error: cannot find pattern \"" << pattern_name << "\" - check the path in the Options" << endl; else @@ -558,7 +574,7 @@ namespace StrokeShaders { void ExternalContourStretcherShader::shade(Stroke& stroke) const { - float l=stroke.getLength2D(); + //float l=stroke.getLength2D(); Interface0DIterator it=stroke.verticesBegin(); Functions0D::Normal2DF0D fun; StrokeVertex* sv; @@ -1074,7 +1090,7 @@ namespace StrokeShaders { // number of vertices than before stroke.Resample(originalSize); - if(stroke.strokeVerticesSize() != originalSize) + if((int)stroke.strokeVerticesSize() != originalSize) //soc cerr << "Warning: resampling problem" << endl; // assign old attributes to new stroke vertices: diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp index ecb76c4a015..7e63d964cb5 100755 --- a/source/blender/freestyle/intern/stroke/Canvas.cpp +++ b/source/blender/freestyle/intern/stroke/Canvas.cpp @@ -25,14 +25,19 @@ #include "../system/TimeStamp.h" #include "../system/PseudoNoise.h" #include "Canvas.h" -#include -#include #include "../image/Image.h" #include "../image/GaussianFilter.h" #include "../image/ImagePyramid.h" #include "../view_map/SteerableViewMap.h" #include "StyleModule.h" +//soc #include +//soc #include +#include +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" +#include "intern/IMB_bmp.h" + using namespace std; LIB_STROKE_EXPORT @@ -326,21 +331,35 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i }else{ filePath = iFileName; } - QImage * qimg; - QImage newMap(filePath.c_str()); - if(newMap.isNull()){ - cout << "Could not load image file " << filePath << endl; - return; - } - qimg = &newMap; - + + //soc + // QImage *qimg; + // QImage newMap(filePath.c_str()); + // if(newMap.isNull()){ + // cout << "Could not load image file " << filePath << endl; + // return; + // } + // qimg = &newMap; + ImBuf *qimg = IMB_loadiffname(filePath.c_str(), 0);; + if( qimg == 0 ){ + cout << "Could not load image file " << filePath << endl; + return; + } + + // soc //resize - QImage scaledImg; - if((newMap.width()!=width()) || (newMap.height()!=height())){ - scaledImg = newMap.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - qimg = &scaledImg; + // QImage scaledImg; + // if((newMap.width()!=width()) || (newMap.height()!=height())){ + // scaledImg = newMap.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + // qimg = &scaledImg; + // } + ImBuf *scaledImg; + if( ( qimg->x != width() ) || ( qimg->y != height() ) ){ + scaledImg = IMB_dupImBuf(qimg); + IMB_scaleImBuf(scaledImg, width(), height()); } + // deal with color image // if(newMap->depth() != 8){ // int w = newMap->width(); @@ -356,13 +375,17 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i // newMap = tmp; // } - unsigned x,y; - int w = qimg->width(); - int h = qimg->height(); + int x,y; + int w = qimg->x; + int h = qimg->y; +int rowbytes = w*4; GrayImage tmp(w,h); + char *pix; + for(y=0; ypixel(x,y));// /255.f; + pix = (char*)qimg->rect + y*rowbytes + x*4; + float c = (pix[0]*11 + pix[1]*16 + pix[2]*5)/32; tmp.setPixel(x,y,c); } } @@ -380,20 +403,30 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, unsigned int i GaussianPyramid *pyramid = new GaussianPyramid(tmp, iNbLevels, iSigma); int ow = pyramid->width(0); int oh = pyramid->height(0); - QString base(iMapName); - for(unsigned i=0; igetNumberOfLevels(); ++i){ + string base(iMapName); //soc + for(int i=0; igetNumberOfLevels(); ++i){ // save each image: // w = pyramid.width(i); // h = pyramid.height(i); - QImage qtmp(ow, oh, QImage::Format_RGB32); - //int k = (1<pixel(x,y,i);//255*pyramid->pixel(x,y,i); - qtmp.setPixel(x,y,qRgb(c,c,c)); + //soc qtmp.setPixel(x,y,qRgb(c,c,c)); + pix = (char*)qtmp->rect + y*rowbytes + x*4; + pix[0] = pix [1] = pix[2] = c; } } - qtmp.save(base+QString::number(i)+".bmp", "BMP"); + //soc qtmp.save(base+QString::number(i)+".bmp", "BMP"); + stringstream filename; + filename << base; + filename << i << ".bmp"; + imb_savebmp(qtmp, const_cast(filename.str().c_str()), 0); + } // QImage *qtmp = new QImage(w, h, 32); // for(y=0;ygetNature() & Nature::NON_T_VERTEX){ - NonTVertex * nontvertex = (NonTVertex*)nextVertex; + //soc NonTVertex * nontvertex = (NonTVertex*)nextVertex; ViewEdge * newEdge(0); // we'll try to chain the edges by keeping the same nature... // the preseance order is : SILHOUETTE, BORDER, CREASE, SUGGESTIVE, VALLEY, RIDGE diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index 121dee3ba26..8e34d9c5197 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -71,7 +71,7 @@ void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, unsigned id = 0; ViewEdge* edge; - Chain* new_chain; + //soc unused - Chain* new_chain; for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); it_edge != _current_view_edges_set.end(); @@ -108,7 +108,7 @@ void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); ViewEdge* edge; - Chain* new_chain; + //soc Chain* new_chain; for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); it_edge != _current_view_edges_set.end(); @@ -232,7 +232,7 @@ void Operators::bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred) Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); ViewEdge* edge; - Chain* new_chain; + //soc unused - Chain* new_chain; for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); it_edge != _current_view_edges_set.end(); @@ -279,7 +279,7 @@ void Operators::bidirectionalChain(ChainingIterator& it) { Predicates1D::EqualToChainingTimeStampUP1D pred_ts(TimeStamp::instance()->getTimeStamp()+1); ViewEdge* edge; - Chain* new_chain; + //soc unused - Chain* new_chain; for (I1DContainer::iterator it_edge = _current_view_edges_set.begin(); it_edge != _current_view_edges_set.end(); @@ -604,7 +604,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica //real _min = func(it0d);++it; real _min = FLT_MAX;++it; real mean = 0.f; - real variance = 0.f; + //soc unused - real variance = 0.f; unsigned count = 0; CurveInternal::CurvePointIterator next = it;++next; real tmp; @@ -767,7 +767,7 @@ Stroke* createStroke(Interface1D& inter) { Vec3r previous = current; SVertex* sv; CurvePoint* cp; - StrokeVertex* stroke_vertex; + StrokeVertex* stroke_vertex = NULL; do { cp = dynamic_cast(&(*it)); diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index d6ff4d255c4..7e7eb5ff3f0 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -463,7 +463,7 @@ void Stroke::SetLength(float iLength) float Stroke::ComputeSampling(int iNVertices) { - if(iNVertices <= _Vertices.size()) + if(iNVertices <= (int)_Vertices.size()) //soc return _sampling; float sampling = _Length/(float)(iNVertices-_Vertices.size()+1); diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index 055e1fb1be4..51a1c8cfd4d 100755 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -303,7 +303,7 @@ Strip::createStrip (const vector& iStrokeVertices) real dp1 = userDir*orthDir; real dp2 = userDir*t; real h = (thicknessLast[1]+thicknessLast[0])/dp1; - real x = fabs(h*dp2/2.0); + //soc unused - real x = fabs(h*dp2/2.0); if(dp1>0){ //i'm in the upper part of the unit circle if(dp2>0){ @@ -367,7 +367,7 @@ Strip::createStrip (const vector& iStrokeVertices) if (iStrokeVertices.size()<3) _averageThickness=0.5*(thicknessLast[1]+thicknessLast[0]+thickness[0]+thickness[1]); - if (i!=2*iStrokeVertices.size()) + if (i != 2*(int)iStrokeVertices.size()) cerr << "Warning: problem with stripe size\n"; cleanUpSingularities (iStrokeVertices); @@ -380,7 +380,7 @@ void Strip::cleanUpSingularities (const vector& iStrokeVertices) { int k; - unsigned sizeStrip = _vertices.size(); + int sizeStrip = _vertices.size(); for (k=0; kpoint2d())) @@ -393,7 +393,7 @@ Strip::cleanUpSingularities (const vector& iStrokeVertices) if (iStrokeVertices.size()<2) return; int i=0, j; vector::const_iterator v ,vend, v2, vPrev; - StrokeVertex *sv, *sv2, *svPrev; +StrokeVertex *sv, *sv2; //soc unused - *svPrev; bool singu1=false, singu2=false; int timeSinceSingu1=0, timeSinceSingu2=0; @@ -469,7 +469,7 @@ Strip::cleanUpSingularities (const vector& iStrokeVertices) { //traverse all the vertices of the singularity and average them Vec2r avP(0.0,0.0); - for (int j=i-timeSinceSingu1; jpoint2d()); avP=Vec2r(1.0/float(timeSinceSingu1)*avP); for (j=i-timeSinceSingu1; j& iStrokeVertices) void Strip::computeTexCoordWithTips (const vector& iStrokeVertices, bool tipBegin, bool tipEnd) { - unsigned int sizeStrip = _vertices.size()+8; //for the transition between the tip and the body + //soc unused - unsigned int sizeStrip = _vertices.size()+8; //for the transition between the tip and the body vector::const_iterator v ,vend; - StrokeVertex *sv; + StrokeVertex *sv = 0; v=iStrokeVertices.begin(); vend=iStrokeVertices.end(); float l=(*v)->strokeLength()/_averageThickness; int tiles=int(l); float fact=(float(tiles)+0.5)/l; - float uTip2=float(tiles)+0.25; + //soc unused - float uTip2=float(tiles)+0.25; float u=0; - float uPrev; + float uPrev=0; int i=0; float t; StrokeVertexRep *tvRep1, *tvRep2; @@ -757,7 +757,7 @@ StrokeRep::StrokeRep(Stroke *iStroke) StrokeRep::StrokeRep(const StrokeRep& iBrother) { - int i=0; + //soc unused - int i=0; _stroke = iBrother._stroke; _strokeType=iBrother._strokeType; _textureId = iBrother._textureId; diff --git a/source/blender/freestyle/intern/system/Interpreter.h b/source/blender/freestyle/intern/system/Interpreter.h index ce603b17238..45cb7793cfd 100755 --- a/source/blender/freestyle/intern/system/Interpreter.h +++ b/source/blender/freestyle/intern/system/Interpreter.h @@ -40,6 +40,8 @@ class LIB_SYSTEM_EXPORT Interpreter Interpreter() { _language = "Unknown"; } + virtual ~Interpreter() {}; //soc + virtual int interpretCmd(const string& cmd) = 0; virtual int interpretFile(const string& filename) = 0; diff --git a/source/blender/freestyle/intern/system/PseudoNoise.cpp b/source/blender/freestyle/intern/system/PseudoNoise.cpp index 59332229ae2..4d62f967cde 100755 --- a/source/blender/freestyle/intern/system/PseudoNoise.cpp +++ b/source/blender/freestyle/intern/system/PseudoNoise.cpp @@ -36,7 +36,7 @@ PseudoNoise::init (long seed) { _values = new real[NB_VALUE_NOISE]; RandGen::srand48(seed); - for (int i=0; i +//soc #include #include "FreestyleConfig.h" #include "StringUtils.h" +//soc +#include "BKE_utildefines.h" +#include "BLI_blenlib.h" + namespace StringUtils { void getPathName(const string& path, const string& base, vector& pathnames) { @@ -33,12 +37,18 @@ namespace StringUtils { pos < size; pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) { if (sep == (unsigned)string::npos) - sep = size; + sep = size; dir = path.substr(pos, sep - pos); - QFileInfo fi(dir.c_str()); - string res = (const char*)fi.absoluteFilePath().toAscii(); + +//soc QFileInfo fi(dir.c_str()); +//soc string res = (const char*)fi.absoluteFilePath().toAscii(); + char cleaned[FILE_MAX]; + BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); + BLI_cleanup_file(NULL, cleaned); + string res(cleaned); + if (!base.empty()) - res += Config::DIR_SEP + base; + res += Config::DIR_SEP + base; pathnames.push_back(res); } } diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index 628b3ad77aa..d9caee85e18 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -143,7 +143,8 @@ void FEdgeXDetector::computeCurvatures(WXVertex *vertex){ // CURVATURE LAYER // store all the curvature datas for each vertex - real K1, K2, cos2theta, sin2theta; + //soc unused - real K1, K2 + real cos2theta, sin2theta; Vec3r e1, n, v; // one vertex curvature info : CurvatureInfo *C; diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h index 38d0f34e21f..a6235dd53b5 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h @@ -126,7 +126,7 @@ protected: Vec3r _Viewpoint; real _bbox_diagonal; // diagonal of the current processed shape bbox - //tmp values + //oldtmp values bool _computeViewIndependant; real _meanK1; real _meanKr; diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h index eec39d2f7bc..fd2e882e9b6 100755 --- a/source/blender/freestyle/intern/view_map/Interface0D.h +++ b/source/blender/freestyle/intern/view_map/Interface0D.h @@ -52,6 +52,8 @@ class TVertex; class Interface0D { public: + + virtual ~Interface0D() {}; //soc /*! Returns the string "Interface0D".*/ virtual string getExactTypeName() const { diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 812187e5ec1..96dd94c36f9 100755 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -127,6 +127,7 @@ public: /*! Default constructor */ Interface1D() {_timeStamp=0;} + virtual ~Interface1D() {}; //soc /*! Returns the string "Interface1D" .*/ virtual string getExactTypeName() const { diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index e88bf23b210..958c0545d6d 100755 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -1248,7 +1248,7 @@ public: */ inline FEdge* SplitEdgeIn2(FEdge* ioEdge, SVertex * ioNewVertex) { - SVertex *A = ioEdge->vertexA(); + //soc unused - SVertex *A = ioEdge->vertexA(); SVertex *B = ioEdge->vertexB(); diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index b2604606aa7..3870edc2b75 100755 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -26,8 +26,12 @@ #include "../geometry/Geom.h" using namespace Geometry; -#include -#include +//soc #include +//soc #include +#include +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" +#include "intern/IMB_png.h" SteerableViewMap::SteerableViewMap(unsigned int nbOrientations){ _nbOrientations = nbOrientations; @@ -121,7 +125,7 @@ double * SteerableViewMap::AddFEdge(FEdge *iFEdge){ unsigned SteerableViewMap::getSVMNumber(const Vec2f& orient){ Vec2f dir(orient); - unsigned res = 0; + //soc unsigned res = 0; real norm = dir.norm(); if(norm < 1e-6){ return _nbOrientations+1; @@ -205,20 +209,37 @@ void SteerableViewMap::saveSteerableViewMap() const { } int ow = _imagesPyramids[i]->width(0); int oh = _imagesPyramids[i]->height(0); - QString base("SteerableViewMap"); - for(unsigned j=0; j<_imagesPyramids[i]->getNumberOfLevels(); ++j){ + + //soc QString base("SteerableViewMap"); + string base("SteerableViewMap"); + stringstream filename; + + for(int j=0; j<_imagesPyramids[i]->getNumberOfLevels(); ++j){ //soc float coeff = 1;//1/255.f; //100*255;//*pow(2,j); - QImage qtmp(ow, oh, QImage::Format_RGB32); - for(unsigned y=0;ypixel(x,y,j)); if(c>255) c=255; //int c = (int)(_imagesPyramids[i]->pixel(x,y,j)); - qtmp.setPixel(x,y,qRgb(c,c,c)); + + //soc qtmp.setPixel(x,y,qRgb(c,c,c)); + pix = (char*)ibuf->rect + y*rowbytes + x*4; + pix[0] = pix [1] = pix[2] = c; } } - qtmp.save(base+QString::number(i)+"-"+QString::number(j)+".png", "PNG"); + + //soc qtmp.save(base+QString::number(i)+"-"+QString::number(j)+".png", "PNG"); + filename << base; + filename << i << "-" << j << ".png"; + + imb_savepng(ibuf, const_cast(filename.str().c_str()), 0); + } // QString base("SteerableViewMap"); // for(unsigned j=0; j<_imagesPyramids[i]->getNumberOfLevels(); ++j){ diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index 20b3aeb144d..bf4369bcf41 100755 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -169,7 +169,7 @@ ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer) // build FEdges FEdge * feprevious = 0; FEdge * fefirst = 0; - FEdge * fe; + FEdge * fe = 0; for(list::iterator fl = facesChain.begin(), flend=facesChain.end(); fl!=flend; ++fl){ @@ -243,7 +243,7 @@ ViewEdge * ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) { // build FEdges FEdge * feprevious = 0; FEdge * fefirst = 0; - FEdge * fe; + FEdge * fe = 0; for(list::iterator we = edgesChain.begin(), weend=edgesChain.end(); we!=weend; ++we){ diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h index 9e2837b49a7..da63fa2f515 100755 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h @@ -35,12 +35,13 @@ # include # include -# if defined(__GNUC__) && (__GNUC__ >= 3) -//hash_map is not part of the C++ standard anymore; hash_map.h has been kept though for backward compatibility -# include -# else -# include -# endif +// soc +// # if defined(__GNUC__) && (__GNUC__ >= 3) +// //hash_map is not part of the C++ standard anymore; hash_map.h has been kept though for backward compatibility +// # include +// # else +// # include +// # endif # include "../system/FreestyleConfig.h" # include "../geometry/Geom.h" @@ -202,7 +203,7 @@ protected: /*! instanciate a ViewVertex from a SVertex, if it doesn't exist yet */ ViewVertex * MakeViewVertex(SVertex *iSVertex); - //tmp values + //oldtmp values // IdHashTable _hashtable; // VVIdHashTable _multivertexHashTable; SVertexMap _SVertexMap; diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index d68164973a1..4e2796113c8 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -937,7 +937,7 @@ namespace ViewMapIO { if (!vm) return 1; - unsigned tmp; + //soc unused - unsigned tmp; int err = 0; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 2369caf4566..1ab37246469 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -117,6 +117,7 @@ public: # else inline incoming_edge_iterator() : iterator() {} # endif + virtual ~incoming_edge_iterator() {}; //soc protected: friend class WVertex; @@ -197,6 +198,7 @@ public: # else inline face_iterator() : iterator() {} # endif + virtual ~face_iterator() {}; //soc protected: friend class WVertex; @@ -308,6 +310,7 @@ public: _pOwner = NULL; userdata = NULL; } + virtual ~WOEdge() {}; //soc /*! copy constructor */ WOEdge(WOEdge& iBrother); diff --git a/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp b/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp index cf3734b488e..55fa418d4f5 100755 --- a/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp +++ b/source/blender/freestyle/intern/winged_edge/WSFillGrid.cpp @@ -19,7 +19,7 @@ // /////////////////////////////////////////////////////////////////////////////// -#include "WSEdge.h" +#include "WEdge.h" #include "WSFillGrid.h" void WSFillGrid::fillGrid() { diff --git a/source/blender/freestyle/intern/winged_edge/WSFillGrid.h b/source/blender/freestyle/intern/winged_edge/WSFillGrid.h index 976fdca8e46..2ea5bc6c621 100755 --- a/source/blender/freestyle/intern/winged_edge/WSFillGrid.h +++ b/source/blender/freestyle/intern/winged_edge/WSFillGrid.h @@ -31,8 +31,8 @@ #ifndef WS_FILL_GRID_H # define WS_FILL_GRID_H -# include "Grid.h" -# include "Polygon.h" +# include "../geometry/Grid.h" +# include "../geometry/Polygon.h" # include "WEdge.h" class LIB_WINGED_EDGE_EXPORT WSFillGrid diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index beacb1a9ca9..66204ba5e99 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -208,7 +208,7 @@ public: WXSmoothEdge * _pSmoothEdge; WXNature _Nature; - //tmp values + //oldtmp values unsigned _nPosDotP; // count the number of positive dot products for vertices. // if this number is != 0 and !=_DotP.size() -> it is a silhouette fac diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp index 98e7c269248..e611c1106f2 100755 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp @@ -64,7 +64,7 @@ void WingedEdgeBuilder::visitNodeTransformAfter(NodeTransform&) { void WingedEdgeBuilder::buildWShape(WShape& shape, IndexedFaceSet& ifs) { unsigned vsize = ifs.vsize(); unsigned nsize = ifs.nsize(); - unsigned tsize = ifs.tsize(); + //soc unused - unsigned tsize = ifs.tsize(); const real* vertices = ifs.vertices(); const real* normals = ifs.normals(); From 6069124ac9ae87802503b1370868b3d8b239fc13 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 11 May 2008 21:13:54 +0000 Subject: [PATCH 096/430] soc-2008-mxcurioni: lib3ds SConscript updated to compile under Win32 configs --- source/blender/freestyle/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index b56c0c66c6e..de97e261bfb 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -7,7 +7,7 @@ defs = [] incs = '' incs += '../blenkernel ../blenlib ../imbuf ../makesdna' -# incs += ' #/extern/freestyle/lib3ds #/extern/freestyle/swig' +incs += ' #/extern/freestyle/lib3ds' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] incs += ' ' + env['BF_PNG_INC'] From 29b2db85181414b2581dd303a654b8d61ac80fbd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 11 May 2008 21:49:04 +0000 Subject: [PATCH 097/430] soc-2008-mxcurioni: swig SConscript updated to compile under all configs except Win32 (where binary is copied to build directory) --- source/blender/freestyle/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index de97e261bfb..6e13af06ee2 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -7,7 +7,7 @@ defs = [] incs = '' incs += '../blenkernel ../blenlib ../imbuf ../makesdna' -incs += ' #/extern/freestyle/lib3ds' +incs += ' #/extern/freestyle/lib3ds' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] incs += ' ' + env['BF_PNG_INC'] From e02bca73d78c7a86d383d38052c29f91b8b3d623 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 13 May 2008 00:42:51 +0000 Subject: [PATCH 098/430] New speed imrovements by Mr. Pinto/jaguarandi --- source/blender/blenlib/BLI_kdopbvh.h | 2 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 52 +++++++++++++-------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h index 3261984da76..c1240da6c3a 100644 --- a/source/blender/blenlib/BLI_kdopbvh.h +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -21,7 +21,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): Daniel Genrich, Jose Pinto + * Contributor(s): Daniel Genrich, Andre Pinto * * ***** END GPL LICENSE BLOCK ***** */ diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 6a1abb5d8ad..75ff1d8f257 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -25,7 +25,7 @@ * * The Original Code is: all of this file. * -* Contributor(s): Daniel Genrich, Jose Pinto +* Contributor(s): Daniel Genrich, Andre Pinto * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ @@ -40,6 +40,7 @@ #include "BKE_utildefines.h" #include "BLI_kdopbvh.h" +#include "BLI_arithb.h" #ifdef _OPENMP #include @@ -101,12 +102,6 @@ static int size_threshold = 16; /* * Common methods for all algorithms */ -static void bvh_exchange(BVHNode **a, int i, int j) -{ - BVHNode *t=a[i]; - a[i]=a[j]; - a[j]=t; -} static int floor_lg(int a) { return (int)(floor(log(a)/log(2))); @@ -138,11 +133,11 @@ static int bvh_partition(BVHNode **a, int lo, int hi, BVHNode * x, int axis) while (1) { while ((a[i])->bv[axis] < x->bv[axis]) i++; - j=j-1; - while (x->bv[axis] < (a[j])->bv[axis]) j=j-1; + j--; + while (x->bv[axis] < (a[j])->bv[axis]) j--; if(!(i < j)) return i; - bvh_exchange(a, i,j); + SWAP( BVHNode* , a[i], a[j]); i++; } } @@ -177,7 +172,7 @@ static void bvh_heapsort(BVHNode **a, int lo, int hi, int axis) } for (i=n; i>1; i=i-1) { - bvh_exchange(a, lo,lo+i-1); + SWAP(BVHNode*, a[lo],a[lo+i-1]); bvh_downheap(a, 1,i-1,lo, axis); } } @@ -244,6 +239,25 @@ void sort_along_axis(BVHTree *tree, int start, int end, int axis) sort(tree->nodes, start, end, axis); } +//after a call to this function you can expect one of: +// every node to left of a[n] are smaller than it +// every node to the right of a[n-1] are greater than it +void partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis) +{ + int begin = _begin, end = _end; + while(begin < n && end >= n) + { + int mid = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end-1)/2, end-1, axis), axis ); + + if(mid >= n) + end = n-1; + else + begin = n+1; + } + +} + + ////////////////////////////////////////////////////////////////////////////////////////////////////// void BLI_bvhtree_free(BVHTree *tree) @@ -359,10 +373,11 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoi } // depends on the fact that the BVH's for each face is already build -static void refit_kdop_hull(BVHTree *tree, int start, int end, float *bv) +static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end) { float newmin,newmax; int i, j; + float *bv = node->bv; for (i = tree->start_axis; i < tree->stop_axis; i++) { @@ -451,16 +466,14 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char // Determine which axis to split along laxis = get_largest_axis(node->bv); - - // Sort along longest axis - if(laxis!=lastaxis) - sort_along_axis(tree, start, end, laxis); // split nodes along longest axis for (i=0; start < end; start += slice, i++) //i counts the current child { tend = start + slice; + partition_nth_element(tree->nodes, start, end, tend, laxis); + if(tend > end) tend = end; if(tend-start == 1) // ok, we have 1 left for this node @@ -474,7 +487,7 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char tree->totbranch++; tnode->parent = node; - refit_kdop_hull(tree, start, tend, tnode->bv); + partition_nth_element(tree->nodes, start, end, tend, laxis); bvh_div_nodes(tree, tnode, start, tend, laxis); } node->totnode++; @@ -533,7 +546,6 @@ static void verify_tree(BVHTree *tree) void BLI_bvhtree_balance(BVHTree *tree) { BVHNode *node; - int i; if(tree->totleaf == 0) return; @@ -543,11 +555,11 @@ void BLI_bvhtree_balance(BVHTree *tree) tree->totbranch++; // refit root bvh node - refit_kdop_hull(tree, 0, tree->totleaf, tree->nodes[tree->totleaf]->bv); + refit_kdop_hull(tree, tree->nodes[tree->totleaf], 0, tree->totleaf); // create + balance tree bvh_div_nodes(tree, tree->nodes[tree->totleaf], 0, tree->totleaf, 0); - verify_tree(tree); + // verify_tree(tree); } // overlap - is it possbile for 2 bv's to collide ? From 3bb43aaaafdda6fcbd1b7fab1e1ea473afc5e527 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 13 May 2008 22:29:50 +0000 Subject: [PATCH 099/430] bug in bvhkdop (bad diff merged, pointed out by jaguarandi) --- source/blender/blenlib/intern/BLI_kdopbvh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 75ff1d8f257..b80fe2103ed 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -488,6 +488,7 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char tnode->parent = node; partition_nth_element(tree->nodes, start, end, tend, laxis); + refit_kdop_hull(tree, tnode, start, tend); bvh_div_nodes(tree, tnode, start, tend, laxis); } node->totnode++; From 83c2acccfbf311780b7fc3ea7aa8b5e0f4e03242 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 13 May 2008 22:30:59 +0000 Subject: [PATCH 100/430] stupid me - i left the wrong line in. --- source/blender/blenlib/intern/BLI_kdopbvh.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index b80fe2103ed..0d130cd37da 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -487,7 +487,6 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char tree->totbranch++; tnode->parent = node; - partition_nth_element(tree->nodes, start, end, tend, laxis); refit_kdop_hull(tree, tnode, start, tend); bvh_div_nodes(tree, tnode, start, tend, laxis); } From 4d8b5587b867e53c22b4f3f3c56ba8714e9b7bfb Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 14 May 2008 16:09:56 +0000 Subject: [PATCH 101/430] Pre merge commit (includes commented moving stuff) --- source/blender/blenkernel/intern/cloth.c | 40 ++- source/blender/blenkernel/intern/collision.c | 276 ++++++++++++------- source/blender/blenkernel/intern/modifier.c | 2 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 37 ++- 4 files changed, 251 insertions(+), 104 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 192ebd90faa..6eb9f731056 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -47,6 +47,8 @@ #include "BLI_kdopbvh.h" +#include + #ifdef _WIN32 void tstart ( void ) {} @@ -78,6 +80,40 @@ double tval() } #endif + +/* Util macros */ +#define TO_STR(a) #a +#define JOIN(a,b) a##b + +/* Benchmark macros */ +#if 1 + +#define BENCH(a) \ + do { \ + clock_t _clock_init = clock(); \ + (a); \ + printf("%s: %fms\n", #a, (float)(clock()-_clock_init)*1000/CLOCKS_PER_SEC); \ +} while(0) + +#define BENCH_VAR(name) clock_t JOIN(_bench_step,name) = 0, JOIN(_bench_total,name) = 0 +#define BENCH_BEGIN(name) JOIN(_bench_step, name) = clock() +#define BENCH_END(name) JOIN(_bench_total,name) += clock() - JOIN(_bench_step,name) +#define BENCH_RESET(name) JOIN(_bench_total, name) = 0 +#define BENCH_REPORT(name) printf("%s: %fms\n", TO_STR(name), JOIN(_bench_total,name)*1000.0f/CLOCKS_PER_SEC) + +#else + +#define BENCH(a) (a) +#define BENCH_VAR(name) +#define BENCH_BEGIN(name) +#define BENCH_END(name) +#define BENCH_RESET(name) +#define BENCH_REPORT(name) + +#endif + + + /* Our available solvers. */ // 255 is the magic reserved number, so NEVER try to put 255 solvers in here! // 254 = MAX! @@ -178,7 +214,7 @@ BVHTree *bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon) return NULL; // create quadtree with k=26 - bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 26); + bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 8, 6); // fill tree for(i = 0; i < cloth->numfaces; i++, mfaces++) @@ -866,7 +902,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if(!first) implicit_set_positions(clmd); - clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); + BENCH(clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon )); return 1; } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 9ba47874d3c..1e8b8706658 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -608,22 +608,9 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier result = 1; } } - - return result; } -int cloth_collision_response_moving_tris ( ClothModifierData *clmd, ClothModifierData *coll_clmd ) -{ - return 1; -} - - -int cloth_collision_response_moving_edges ( ClothModifierData *clmd, ClothModifierData *coll_clmd ) -{ - return 1; -} - //Determines collisions on overlap, collisions are writen to collpair[i] and collision+number_collision_found is returned CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair ) { @@ -743,25 +730,148 @@ int cloth_are_edges_adjacent ( ClothModifierData *clmd, CollisionModifierData *c cloth1 = clmd->clothObject; verts1 = cloth1->verts; - VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p21].co ); + VECSUB ( temp, verts1[edgecollpair->p11].txold, verts2[edgecollpair->p21].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p11].xold, verts2[edgecollpair->p22].co ); + VECSUB ( temp, verts1[edgecollpair->p11].txold, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p21].co ); + VECSUB ( temp, verts1[edgecollpair->p12].txold, verts2[edgecollpair->p21].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - VECSUB ( temp, verts1[edgecollpair->p12].xold, verts2[edgecollpair->p22].co ); + VECSUB ( temp, verts1[edgecollpair->p12].txold, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; + + VECSUB ( temp, verts1[edgecollpair->p11].txold, verts1[edgecollpair->p12].txold ); + if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) + return 1; + + VECSUB ( temp, verts2[edgecollpair->p21].co, verts2[edgecollpair->p22].co ); + if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) + return 1; + return 0; } +int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) +{ + int result = 0; + Cloth *cloth1; + float w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + float magrelVel; + float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); + + cloth1 = clmd->clothObject; + + for ( ; collpair != collision_end; collpair++ ) + { + // only handle static collisions here + if ( collpair->flag & COLLISION_IN_FUTURE ) + continue; + + // compute barycentric coordinates for both collision points + collision_compute_barycentric ( collpair->pa, + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3 ); + + // was: txold + collision_compute_barycentric ( collpair->pb, + collmd->current_x[collpair->bp1].co, + collmd->current_x[collpair->bp2].co, + collmd->current_x[collpair->bp3].co, + &u1, &u2, &u3 ); + + // Calculate relative "velocity". + collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 ); + + collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 ); + + VECSUB ( relativeVelocity, v2, v1 ); + + // Calculate the normal component of the relative velocity (actually only the magnitude - the direction is stored in 'normal'). + magrelVel = INPR ( relativeVelocity, collpair->normal ); + + // printf("magrelVel: %f\n", magrelVel); + + // Calculate masses of points. + // TODO + + // If v_n_mag < 0 the edges are approaching each other. + if ( magrelVel > ALMOST_ZERO ) + { + // Calculate Impulse magnitude to stop all motion in normal direction. + float magtangent = 0, repulse = 0, d = 0; + double impulse = 0.0; + float vrel_t_pre[3]; + float temp[3]; + + // calculate tangential velocity + VECCOPY ( temp, collpair->normal ); + VecMulf ( temp, magrelVel ); + VECSUB ( vrel_t_pre, relativeVelocity, temp ); + + // Decrease in magnitude of relative tangential velocity due to coulomb friction + // in original formula "magrelVel" should be the "change of relative velocity in normal direction" + magtangent = MIN2 ( clmd->coll_parms->friction * 0.01 * magrelVel,sqrt ( INPR ( vrel_t_pre,vrel_t_pre ) ) ); + + // Apply friction impulse. + if ( magtangent > ALMOST_ZERO ) + { + Normalize ( vrel_t_pre ); + + impulse = 2.0 * magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); + VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse ); + VECADDMUL ( cloth1->verts[collpair->ap2].impulse, vrel_t_pre, w2 * impulse ); + VECADDMUL ( cloth1->verts[collpair->ap3].impulse, vrel_t_pre, w3 * impulse ); + } + + // Apply velocity stopping impulse + // I_c = m * v_N / 2.0 + // no 2.0 * magrelVel normally, but looks nicer DG + impulse = magrelVel / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); + + VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, w1 * impulse ); + cloth1->verts[collpair->ap1].impulse_count++; + + VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, w2 * impulse ); + cloth1->verts[collpair->ap2].impulse_count++; + + VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, w3 * impulse ); + cloth1->verts[collpair->ap3].impulse_count++; + + // Apply repulse impulse if distance too short + // I_r = -min(dt*kd, m(0,1d/dt - v_n)) + /* + d = clmd->coll_parms->epsilon*8.0/9.0 + epsilon2*8.0/9.0 - collpair->distance; + if ( ( magrelVel < 0.1*d*clmd->sim_parms->stepsPerFrame ) && ( d > ALMOST_ZERO ) ) + { + repulse = MIN2 ( d*1.0/clmd->sim_parms->stepsPerFrame, 0.1*d*clmd->sim_parms->stepsPerFrame - magrelVel ); + + // stay on the safe side and clamp repulse + if ( impulse > ALMOST_ZERO ) + repulse = MIN2 ( repulse, 5.0*impulse ); + repulse = MAX2 ( impulse, repulse ); + + impulse = repulse / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25 + VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, impulse ); + VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, impulse ); + VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, impulse ); + } +*/ + result = 1; + } + } + return result; +} + int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) { EdgeCollPair edgecollpair; @@ -781,53 +891,6 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat cloth1 = clmd->clothObject; verts1 = cloth1->verts; - /* - double p[4][3] = {{0,0,0},{0,2,0},{1,1,-1},{1,1,1}}; - double v[4][3] = {{0,0,0},{1,0,0},{-2,0,0},{-2,0,0}}; - - double pp[2][3] = {{-1,-1,-1}, {2,2,2}}; - - - VECSUB ( x1, p[1], p[0] ); - VECSUB ( v1, v[1], v[0] ); - - VECSUB ( x2, p[2], p[0] ); - VECSUB ( v2, v[2], v[0] ); - - VECSUB ( x3, p[3], p[0] ); - VECSUB ( v3, v[3], v[0] ); - - printf("x1 x: %f, y: %f, z: %f\n", x1[0], x1[1], x1[2]); - printf("x2 x: %f, y: %f, z: %f\n", x2[0], x2[1], x2[2]); - printf("x3 x: %f, y: %f, z: %f\n", x3[0], x3[1], x3[2]); - - printf("v1 x: %f, y: %f, z: %f\n", v1[0], v1[1], v1[2]); - printf("v2 x: %f, y: %f, z: %f\n", v2[0], v2[1], v2[2]); - printf("v3 x: %f, y: %f, z: %f\n", v3[0], v3[1], v3[2]); - - numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution ); - - for ( k = 0; k < numsolutions; k++ ) - printf("mintime: %f\n", solution[k]); - - mintime = solution[0]; - - // move triangles to collision point in time - VECADDS(triA[0], pp[0], v[0], solution[0]); - VECADDS(triA[1], p[0], v[0], solution[0]); - VECADDS(triA[2], p[1], v[1], solution[0]); - - VECADDS(triB[0], pp[1], v[0], solution[0]); - VECADDS(triB[1], p[2], v[2], solution[0]); - VECADDS(triB[2], p[3], v[3], solution[0]); - - // check distance there - distance = plNearestPoints (triA[0], triA[1], triA[2], triB[0], triB[1], triB[2], collpair->pa,collpair->pb,collpair->vector ); - - printf("mintime: %f, dist: %f\n", mintime, distance); - - exit(0); - */ for(i = 0; i < 9; i++) { // 9 edge - edge possibilities @@ -916,19 +979,12 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat VECSUB ( x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold ); VECSUB ( v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv ); - /* - printf("A x: %f, y: %f, z: %f\n", a[0], a[1], a[2]); - printf("B x: %f, y: %f, z: %f\n", b[0], b[1], b[2]); - printf("C x: %f, y: %f, z: %f\n", c[0], c[1], c[2]); - printf("D x: %f, y: %f, z: %f\n", d[0], d[1], d[2]); - printf("E x: %f, y: %f, z: %f\n", e[0], e[1], e[2]); - printf("F x: %f, y: %f, z: %f\n", f[0], f[1], f[2]); - exit(0); - */ + numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution ); for ( k = 0; k < numsolutions; k++ ) { + // printf("sol %d: %lf\n", k, solution[k]); if ( ( solution[k] >= DBL_EPSILON ) && ( solution[k] <= 1.0 ) ) { //float out_collisionTime = solution[k]; @@ -939,8 +995,6 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat mintime = MIN2(mintime, (float)solution[k]); -// printf("mt: %f, %lf, %f\n", mintime, solution[k], (float)solution[k]); - result = 1; break; } @@ -962,12 +1016,25 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat // check distance there distance = plNearestPoints (triA[0], triA[1], triA[2], triB[0], triB[1], triB[2], collpair->pa,collpair->pb,collpair->vector ); - printf("mintime: %f, dist: %f\n", mintime, distance); + if(distance <= (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree ) + ALMOST_ZERO)) + { + CollPair *next = collpair; + next++; + + collpair->distance = clmd->coll_parms->epsilon; + collpair->time = mintime; + + VECCOPY ( collpair->normal, collpair->vector ); + Normalize ( collpair->normal ); + + cloth_collision_response_moving ( clmd, collmd, collpair, next ); + } } return result; } +/* void cloth_collision_moving_tris ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2 ) { CollPair collpair; @@ -1060,16 +1127,6 @@ void cloth_collision_moving_tris ( ClothModifierData *clmd, ClothModifierData *c } } } - -/* -void cloth_collision_moving ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2 ) -{ - // TODO: check for adjacent - cloth_collision_moving_edges ( clmd, coll_clmd, tree1, tree2 ); - - cloth_collision_moving_tris ( clmd, coll_clmd, tree1, tree2 ); - cloth_collision_moving_tris ( coll_clmd, clmd, tree2, tree1 ); -} */ int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) @@ -1150,24 +1207,43 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData if ( collmd->bvhtree ) { result += cloth_collision_response_static ( clmd, collmd, collisions, collisions_index ); - result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); - } - // apply impulses in parallel - if ( result ) - { - for ( i = 0; i < numverts; i++ ) + // apply impulses in parallel + if ( result ) { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if ( verts[i].impulse_count ) + for ( i = 0; i < numverts; i++ ) { - VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); - VECCOPY ( verts[i].impulse, tnull ); - verts[i].impulse_count = 0; - - ret++; + // calculate "velocities" (just xnew = xold + v; no dt in v) + if ( verts[i].impulse_count ) + { + VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); + VECCOPY ( verts[i].impulse, tnull ); + verts[i].impulse_count = 0; + + ret++; + } } } + /* + result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); + + // apply impulses in parallel + if ( result ) + { + for ( i = 0; i < numverts; i++ ) + { + // calculate "velocities" (just xnew = xold + v; no dt in v) + if ( verts[i].impulse_count ) + { + VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); + VECCOPY ( verts[i].impulse, tnull ); + verts[i].impulse_count = 0; + + ret++; + } + } + } + */ } } @@ -1207,7 +1283,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// // update cloth bvh - bvhtree_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) + bvhtree_update_from_cloth ( clmd, 1 ); // 0 means STATIC, 1 means MOVING (see later in this function) do { diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index a29c10a95ac..b481055ff16 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5417,7 +5417,7 @@ static void collisionModifier_deformVerts( else { // recalc static bounding boxes - bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, NULL, collmd->numverts, 0 ); + bvhtree_update_from_mvert ( collmd->bvhtree, collmd->mfaces, collmd->numfaces, collmd->current_x, collmd->current_xnew, collmd->numverts, 1 ); } collmd->time = current_time; diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 0d130cd37da..b3f11039ce1 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -46,6 +46,41 @@ #include #endif +#include + +/* Util macros */ +#define TO_STR(a) #a +#define JOIN(a,b) a##b + +/* Benchmark macros */ +#if 1 + +#define BENCH(a) \ + do { \ + clock_t _clock_init = clock(); \ + (a); \ + printf("%s: %fms\n", #a, (float)(clock()-_clock_init)*1000/CLOCKS_PER_SEC); \ +} while(0) + +#define BENCH_VAR(name) clock_t JOIN(_bench_step,name) = 0, JOIN(_bench_total,name) = 0 +#define BENCH_BEGIN(name) JOIN(_bench_step, name) = clock() +#define BENCH_END(name) JOIN(_bench_total,name) += clock() - JOIN(_bench_step,name) +#define BENCH_RESET(name) JOIN(_bench_total, name) = 0 +#define BENCH_REPORT(name) printf("%s: %fms\n", TO_STR(name), JOIN(_bench_total,name)*1000.0f/CLOCKS_PER_SEC) + +#else + +#define BENCH(a) (a) +#define BENCH_VAR(name) +#define BENCH_BEGIN(name) +#define BENCH_END(name) +#define BENCH_RESET(name) +#define BENCH_REPORT(name) + +#endif + + + typedef struct BVHNode { struct BVHNode *children[8]; // max 8 children @@ -61,7 +96,7 @@ struct BVHTree { BVHNode **nodes; BVHNode *nodearray; /* pre-alloc branch nodes */ - float epsilon; /* epslion is used for inflation of the k-dop */ + float epsilon; /* epsilon is used for inflation of the k-dop */ int totleaf; // leafs int totbranch; char tree_type; // type of tree (4 => quadtree) From 55655a065943d67dbdb584e8426a60793e65d6f1 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 18 May 2008 13:01:52 +0000 Subject: [PATCH 102/430] soc-2008-mxcurioni: towards Freestyle's first render: controller, config, appglwidget corrected. Freestyle is called but cannot be linked (ImBuf issues). This is an unstable commit. --- source/blender/freestyle/SConscript | 18 +- source/blender/freestyle/intern/CHANGELOG.TXT | 47 - .../intern/app_blender/AppCanvas.cpp | 404 +++++++ .../freestyle/intern/app_blender/AppCanvas.h | 55 + .../intern/app_blender/AppGLWidget.cpp | 611 ++++++++++ .../intern/app_blender/AppGLWidget.h | 593 ++++++++++ .../intern/app_blender/Controller.cpp | 1050 +++++++++++++++++ .../freestyle/intern/app_blender/Controller.h | 213 ++++ .../intern/rendering/GLDebugRenderer.cpp | 2 +- .../intern/view_map/SteerableViewMap.cpp | 1 + .../freestyle/{intern => misc}/AUTHORS.TXT | 0 .../freestyle/{intern => misc}/BUGS.TXT | 0 .../freestyle/{intern => misc}/COPYRIGHT.TXT | 0 .../freestyle/{intern => misc}/Config.pri | 0 .../{intern => misc}/Freestyle-vc7-debug.sln | 0 .../Freestyle-vc7-release.sln | 0 .../{intern => misc}/Freestyle-vc8-debug.sln | 0 .../Freestyle-vc8-release.sln | 0 .../freestyle/{intern => misc}/INSTALL.TXT | 0 .../freestyle/{intern => misc}/LICENSE.TXT | 0 .../freestyle/{intern => misc}/Makefile.pro | 0 .../freestyle/{intern => misc}/README.TXT | 0 .../freestyle/{intern => misc}/THANKS.TXT | 0 .../freestyle/{intern => misc}/TODO.TXT | 0 .../{intern => misc}/build_bundle.macosx.py | 0 .../freestyle/{intern => misc}/libconfig.pri | 0 .../{intern => misc}/makedsp.vcnet.debug.bat | 0 .../makedsp.vcnet.release.bat | 0 source/blender/imbuf/SConscript | 2 +- source/blender/makesdna/DNA_scene_types.h | 1 + source/blender/python/api2_2x/sceneRender.c | 3 + source/blender/render/SConscript | 1 + .../blender/render/intern/source/pipeline.c | 17 +- source/blender/src/buttons_scene.c | 4 +- source/blender/src/renderwin.c | 2 + 35 files changed, 2963 insertions(+), 61 deletions(-) delete mode 100755 source/blender/freestyle/intern/CHANGELOG.TXT create mode 100755 source/blender/freestyle/intern/app_blender/AppCanvas.cpp create mode 100755 source/blender/freestyle/intern/app_blender/AppCanvas.h create mode 100755 source/blender/freestyle/intern/app_blender/AppGLWidget.cpp create mode 100755 source/blender/freestyle/intern/app_blender/AppGLWidget.h create mode 100755 source/blender/freestyle/intern/app_blender/Controller.cpp create mode 100755 source/blender/freestyle/intern/app_blender/Controller.h rename source/blender/freestyle/{intern => misc}/AUTHORS.TXT (100%) rename source/blender/freestyle/{intern => misc}/BUGS.TXT (100%) rename source/blender/freestyle/{intern => misc}/COPYRIGHT.TXT (100%) rename source/blender/freestyle/{intern => misc}/Config.pri (100%) rename source/blender/freestyle/{intern => misc}/Freestyle-vc7-debug.sln (100%) rename source/blender/freestyle/{intern => misc}/Freestyle-vc7-release.sln (100%) rename source/blender/freestyle/{intern => misc}/Freestyle-vc8-debug.sln (100%) rename source/blender/freestyle/{intern => misc}/Freestyle-vc8-release.sln (100%) rename source/blender/freestyle/{intern => misc}/INSTALL.TXT (100%) rename source/blender/freestyle/{intern => misc}/LICENSE.TXT (100%) rename source/blender/freestyle/{intern => misc}/Makefile.pro (100%) rename source/blender/freestyle/{intern => misc}/README.TXT (100%) rename source/blender/freestyle/{intern => misc}/THANKS.TXT (100%) rename source/blender/freestyle/{intern => misc}/TODO.TXT (100%) rename source/blender/freestyle/{intern => misc}/build_bundle.macosx.py (100%) rename source/blender/freestyle/{intern => misc}/libconfig.pri (100%) rename source/blender/freestyle/{intern => misc}/makedsp.vcnet.debug.bat (100%) rename source/blender/freestyle/{intern => misc}/makedsp.vcnet.release.bat (100%) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 6e13af06ee2..1f5359c5d39 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -46,23 +46,25 @@ stroke_sources = env.Glob(prefix + '/*.cpp') # rendering prefix = 'intern/rendering' -stroke_sources = env.Glob(prefix + '/GL*.cpp') +rendering_sources = env.Glob(prefix + '/GL*.cpp') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): - stroke_sources = env.Glob(prefix + '/extgl.cpp') + rendering_sources = env.Glob(prefix + '/extgl.cpp') -# app +# app / app_blender +prefix = 'intern/app_blender' +app_sources = env.Glob(prefix + '/*.cpp') -sources = system_sources + image_sources + geometry_sources + scene_graph_sources + \ - winged_edge_sources + view_map_sources + stroke_sources -#print sources +sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ + + winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \ + + app_sources env.BlenderLib (libname="bf_freestyle", sources=sources, includes=Split(incs), defines=defs, - libtype=['blender'], - priority = [15] ) + libtype=['blender'], + priority = [20] ) ######################################################## # SWIG diff --git a/source/blender/freestyle/intern/CHANGELOG.TXT b/source/blender/freestyle/intern/CHANGELOG.TXT deleted file mode 100755 index cb9f088bc1f..00000000000 --- a/source/blender/freestyle/intern/CHANGELOG.TXT +++ /dev/null @@ -1,47 +0,0 @@ -2008-03-06 - freestyle-2.2.0 - * Fixed a bug related to the ViewShape IDs that caused the ray casting to crash. - * Fixed a bug in the style module insertion. - -2008-03-02 - freestyle-2.1.1 - * Added the management of texture coordinates in the scene graph and the rendering. - * The reps in the scene graph are now assigned ids based on the lib3ds nodes ids. These ids are transmitted to the WingedEdge Shapes. -2007-10-05 - freestyle-2.0.1 - - * Enforced node construction from lib3ds (thanks to Thomas Netter) - * Reverted to not using bundles by default on MacOSX. Activating bundles can be made by uncommenting the lib_bundle line of the CONFIG variable in Config.pri - * Added a NodeCamera to the scene graph. - * Made sure the display lists were compiled AND executed (GL_COMPILE -> GL_COMPILE_AND_EXECUTE) for IndexedFaceSet. - * Added a visitor to deallocate memory on the graphics card (display lists right now). - * Modified the grid to use a visitor pattern for ray casting and grid traversal. - - - -2007-05-06 - freestyle-2.0.0 - - * Switched to Qt 4.2.3, swig 1.3.31, visual c++ 2005, gcc 4.0.1, qglviewer 2.2.5-1 - * Added texture coordinates to scene graph - * Made the grid more robust - * Now compiles on MacOSX - * Fixed the brush texture problem: the full path to the texture was used instead of the base name and that was breaking the search path algorithm - - -2006-06-18 - freestyle-1.0.2 - - * Fixed a bug related to the loading of OpenGL extensions. - - -2005-07-25 - freestyle-1.0.1 - - * Upgrade to QGLViewer 2.0.4 - * Added the FREESTYLE_DIR environment variable. - It must be set to the freestyle directory for - all releases except the pre-compiled windows version. - * Fixed the unix path separator. - * Added the "Help>Control bindings" menu action. - * Fixed the style modules according to Python 2.4 standards. - - -2005-04-05 - freestyle-1.0.0 - - * Initial release - diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp new file mode 100755 index 00000000000..c9ea2d1391d --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -0,0 +1,404 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppGLWidget.h" +#include "../image/Image.h" +#include "../system/TimeStamp.h" +#include "Controller.h" +#include "../stroke/StrokeRenderer.h" +#include "AppCanvas.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLStrokeRenderer.h" +#include "../rendering/GLUtils.h" +#include "AppConfig.h" +#include "../system/StringUtils.h" + +#ifdef WIN32 +# include +# include "../rendering/extgl.h" +#endif +#ifdef __MACH__ +# include +#else +# include +#endif + +AppCanvas::AppCanvas() +:Canvas() +{ + _pViewer = 0; + _blendEquation = true; + _MapsPath = StringUtils::toAscii( Config::Path::getInstance()->getMapsDir() ).c_str(); +} + +AppCanvas::AppCanvas(AppGLWidget* iViewer) +:Canvas() +{ + _pViewer = iViewer; + _blendEquation = true; +} + +AppCanvas::AppCanvas(const AppCanvas& iBrother) +:Canvas(iBrother) +{ + _pViewer = iBrother._pViewer; + _blendEquation = iBrother._blendEquation; +} + +AppCanvas::~AppCanvas() +{ + _pViewer = 0; +} + +void AppCanvas::SetViewer(AppGLWidget *iViewer) +{ + _pViewer = iViewer; +} + +int AppCanvas::width() const +{ + return _pViewer->width(); +} + +int AppCanvas::height() const +{ + return _pViewer->height(); +} + +BBox AppCanvas::scene3DBBox() const +{ + return _pViewer->scene3DBBox(); +} + +void AppCanvas::preDraw() +{ + Canvas::preDraw(); + + _pViewer->prepareCanvas(); + glClearColor(0,0,0,0); + glClear(GL_COLOR_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + glDisable(GL_DEPTH_TEST); + glEnable(GL_TEXTURE_2D); + glEnable(GL_BLEND); +} + +void AppCanvas::init() +{ +#ifdef WIN32 + static bool firsttime = true; + if (firsttime) + { + if (extgl_Initialize() != 0) + cerr << "Error: problem occurred while initializing GL extensions" << endl; + else + cout << "GL extensions initialized" << endl; + + if(!glutils_extgl_GetProcAddress("glBlendEquation")){ + _blendEquation = false; + cout << "glBlendEquation unavailable on this hardware -> switching to strokes basic rendering mode" << endl; + } + firsttime=false; + } +#endif + + _Renderer = new GLStrokeRenderer; + if(!StrokeRenderer::loadTextures()) + { + cerr << "unable to load stroke textures" << endl; + return; + } +} + +void AppCanvas::postDraw() +{ + //inverse frame buffer + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); + _pViewer->releaseCanvas(); + + Canvas::postDraw(); +} + +void AppCanvas::Erase() +{ + Canvas::Erase(); + //_pViewer->clear(); +} + +#include "../image/GaussianFilter.h" +void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const +{ + //static unsigned number = 0; + float *rgb = new float[3*w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::RGB,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); + // FIXME + // QImage qtmp(w, h, 32); + // for(unsigned py=0;pyreadPixels(0,0,width(),height(),AppGLWidget::RGB,rgbtmp); + // img.setArray(rgbtmp, width(), height(), width(), height(), 0, 0, false); + // QImage qtmp(width(), height(), 32); + // for(unsigned py=0;pywidth()) + // || (py2-bound < 0) || (py2+bound>height())) + // continue; + // int g = 255*filter.getSmoothedPixel(&img, px2,py2); + // qtmp2.setPixel(px2,height()-1-py2,qRgb(g,g,g)); + // } + // } + // qtmp2.save("blurredCausalDensity"+QString::number(number)+".png", "PNG"); + // } + // cout << number << endl; + // ++number; +} + +void AppCanvas::readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const +{ + float *rgb = new float[w*h]; + _pViewer->readPixels(x,y,w,h,AppGLWidget::DEPTH,rgb); + oImage.setArray(rgb, width(), height(), w,h, x, y, false); +} + +void AppCanvas::update() +{ +// static int counter = 0; +// char fileName[100] = "framebuffer"; +// char number[10]; +// + _pViewer->updateGL(); + _pViewer->swapBuffers(); + //QImage fb = _pViewer->grabFrameBuffer(); + // sprintf(number, "%3d", counter); + // strcat(fileName, number); + // strcat(fileName, ".bmp"); + // fb.save(fileName, "BMP"); + //counter++; +} + +void AppCanvas::Render(const StrokeRenderer *iRenderer) +{ + if(!_blendEquation){ + RenderBasic(iRenderer); + return; + } + + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor4f(1,1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendEquation(GL_ADD); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::Render(iRenderer); + // + glPushAttrib(GL_COLOR_BUFFER_BIT); + glBlendEquation(GL_FUNC_SUBTRACT); + glBlendFunc(GL_ONE, GL_ONE); + + glDisable(GL_TEXTURE_2D); + glEnable(GL_BLEND); + glColor3f(1,1,1); + glBegin(GL_TRIANGLE_STRIP); + { + glVertex2f(0, 0); + glVertex2f(2048, 0); + glVertex2f(0, 2048); + glVertex2f(2048, 2048); + } + glEnd(); + glPopAttrib(); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + +void AppCanvas::RenderBasic(const StrokeRenderer *iRenderer) +{ + glClearColor(1,1,1,1); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glDisable(GL_LIGHTING); + glPolygonMode(GL_FRONT, GL_FILL); + glShadeModel(GL_SMOOTH); + + if(_pViewer->draw3DsceneEnabled()) + { + glClearColor(1,1,1,0); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + glEnable(GL_LIGHTING); + glEnable(GL_DEPTH_TEST); + _pViewer->Set3DContext(); + _pViewer->DrawScene(_pViewer->glRenderer()); + glDisable(GL_DEPTH_TEST); + glDisable(GL_LIGHTING); + glMatrixMode(GL_PROJECTION); + glPopMatrix(); + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); + } + + glBlendFunc(GL_DST_COLOR, GL_ZERO); + if(_drawPaper) + { + glEnable(GL_BLEND); + glEnable(GL_TEXTURE_2D); + float zfar = _pViewer->zfar(); + zfar = zfar+0.1*zfar; + //draw background paper // FIXME + //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glBindTexture(GL_TEXTURE_2D, StrokeRenderer::_textureManager->getPaperTextureIndex(_paperTextureIndex)); + glColor4f(1,1,1,0.0); + glBegin(GL_TRIANGLE_STRIP); + { + glTexCoord2f(0,0); glVertex3f(0, 0, -1); + glTexCoord2f(4,0); glVertex3f(2048, 0, -1); + glTexCoord2f(0,4); glVertex3f(0, 2048, -1); + glTexCoord2f(4,4); glVertex3f(2048, 2048, -1); + } + glEnd(); + } + + glDisable(GL_DEPTH_TEST); + glPushAttrib(GL_COLOR_BUFFER_BIT); + glEnable(GL_BLEND); + glPopAttrib(); + + glDisable(GL_DEPTH_TEST); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + + glEnable(GL_TEXTURE_2D); + Canvas::RenderBasic(iRenderer); + + glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); +} + + +void AppCanvas::RenderStroke(Stroke *iStroke) { + iStroke->Render(_Renderer); + if(_pViewer->getRecordFlag()){ + //Sleep(1000); + _pViewer->saveSnapshot(true); + } +} diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.h b/source/blender/freestyle/intern/app_blender/AppCanvas.h new file mode 100755 index 00000000000..773bfc7f539 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.h @@ -0,0 +1,55 @@ +#ifndef ARTCANVAS_H +#define ARTCANVAS_H + +#include "../stroke/Canvas.h" + +//class AppGLWidget; +class AppCanvas : public Canvas +{ +private: + mutable AppGLWidget *_pViewer; + bool _blendEquation; +public: + AppCanvas(); + AppCanvas(AppGLWidget *iViewer); + AppCanvas(const AppCanvas& iBrother); + virtual ~AppCanvas(); + + /*! operations that need to be done before a draw */ + virtual void preDraw(); + + /*! operations that need to be done after a draw */ + virtual void postDraw(); + + /*! Erases the layers and clears the canvas */ + virtual void Erase(); + + /* init the canvas */ + virtual void init(); + + /*! Reads a pixel area from the canvas */ + virtual void readColorPixels(int x,int y,int w, int h, RGBImage& oImage) const; + /*! Reads a depth pixel area from the canvas */ + virtual void readDepthPixels(int x,int y,int w, int h, GrayImage& oImage) const; + + virtual BBox scene3DBBox() const ; + + /*! update the canvas (display) */ + virtual void update() ; + + /*! Renders the created strokes */ + virtual void Render(const StrokeRenderer *iRenderer); + virtual void RenderBasic(const StrokeRenderer *iRenderer); + virtual void RenderStroke(Stroke *iStroke) ; + + /*! accessors */ + virtual int width() const ; + virtual int height() const ; + inline const AppGLWidget * viewer() const {return _pViewer;} + + /*! modifiers */ + void SetViewer(AppGLWidget *iViewer) ; +}; + + +#endif diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp new file mode 100755 index 00000000000..44e25ee1321 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -0,0 +1,611 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include +#include "../stroke/Canvas.h" +#include "AppGLWidget.h" +#include "../scene_graph/NodeLight.h" +#include "../rendering/GLRenderer.h" +#include "../rendering/GLSelectRenderer.h" +#include "../rendering/GLBBoxRenderer.h" +#include "../rendering/GLMonoColorRenderer.h" +#include "Controller.h" +#include "../view_map/Silhouette.h" +#include "../view_map/ViewMap.h" +#include "../scene_graph/LineRep.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/VertexRep.h" +#include "AppConfig.h" + +#include "../system/StringUtils.h" +#include "BLI_blenlib.h" +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" + +// glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005 +#ifdef __MACH__ +# include +#else +# include +#endif + +GLuint texture = 0; + +bool AppGLWidget::_frontBufferFlag = false; +bool AppGLWidget::_backBufferFlag = true; + +AppGLWidget::AppGLWidget(const char *iName) +{ + _Fovy = 30.f; + //_SceneDepth = 2.f; + _RenderStyle = LINE; + //_ModelRootNode->SetBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); + _ModelRootNode = new NodeDrawingStyle; + _SilhouetteRootNode = new NodeDrawingStyle; + _DebugRootNode = new NodeDrawingStyle; + + _RootNode.AddChild(_ModelRootNode); + _SilhouetteRootNode->SetStyle(DrawingStyle::LINES); + _SilhouetteRootNode->SetLightingEnabled(false); + _SilhouetteRootNode->SetLineWidth(2.f); + _SilhouetteRootNode->SetPointSize(3.f); + + _RootNode.AddChild(_SilhouetteRootNode); + + _DebugRootNode->SetStyle(DrawingStyle::LINES); + _DebugRootNode->SetLightingEnabled(false); + _DebugRootNode->SetLineWidth(1.f); + + _RootNode.AddChild(_DebugRootNode); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + _camera->setZNearCoefficient(0.1); + + // 2D Scene + // _pFENode = new NodeDrawingStyle; + // _pFENode->SetStyle(DrawingStyle::LINES); + // _pFENode->SetLightingEnabled(false); + // _pFENode->SetLineWidth(1.f); + // + // _p2DNode.AddChild(_pFENode); + // + // _pVisibleSilhouetteNode = new NodeDrawingStyle; + // _pVisibleSilhouetteNode->SetStyle(DrawingStyle::LINES); + // _pVisibleSilhouetteNode->SetLightingEnabled(false); + // _pVisibleSilhouetteNode->SetLineWidth(3.f); + // + // _p2DNode.AddChild(_pVisibleSilhouetteNode); + // + _p2DSelectionNode = new NodeDrawingStyle; + _p2DSelectionNode->SetLightingEnabled(false); + _p2DSelectionNode->SetStyle(DrawingStyle::LINES); + _p2DSelectionNode->SetLineWidth(5.f); + + _p2DNode.AddChild(_p2DSelectionNode); + + _pGLRenderer = new GLRenderer; + _pSelectRenderer = new GLSelectRenderer; + _pBBoxRenderer = new GLBBoxRenderer; + _pMonoColorRenderer = new GLMonoColorRenderer; + _pDebugRenderer = new GLDebugRenderer; + + _pMainWindow = NULL; + _cameraStateSaved = false; + _drawBBox = false; + _silhouette = false; + _fedges = false; + _debug = false; + _selection_mode = false; + _Draw2DScene = true; + _Draw3DScene = true; + _drawEnvMap = false; + _currentEnvMap = 1; + _maxId = 0; + _blendFunc = 0; + + const string sep(Config::DIR_SEP); + const string filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_QGLVIEWER_FILE; + setStateFileName(filename); + + //get camera frame: + //qglviewer::Camera * cam = camera(); + //qglviewer::ManipulatedFrame * fr = cam->frame() ; + + //soc _enableupdateSilhouettes = false; + + _captureMovie = false; + // _frontBufferFlag = false; + // _backBufferFlag = true; + _record = false; + +_camera = new Camera; + +} + +AppGLWidget::~AppGLWidget() +{ + int ref = _RootNode.destroy(); + + _Light.destroy(); + ref = _p2DNode.destroy(); + + if(NULL != _pGLRenderer) + { + delete _pGLRenderer; + _pGLRenderer = NULL; + } + + if(NULL != _pSelectRenderer) + { + delete _pSelectRenderer; + _pSelectRenderer = NULL; + } + + if(NULL != _pBBoxRenderer) + { + delete _pBBoxRenderer; + _pBBoxRenderer = NULL; + } + + if(NULL != _pMonoColorRenderer) + { + delete _pMonoColorRenderer; + _pMonoColorRenderer = NULL; + } + + if(NULL != _pDebugRenderer) + { + delete _pDebugRenderer; + _pDebugRenderer = NULL; + } + + makeCurrent(); + //saveToFile(filename); +} + + + +void AppGLWidget::LoadEnvMap(const char *filename) +{ + GLuint textureId; + //sgiImage img; + //cout << filename << endl; + ImBuf *image = IMB_loadiffname(filename, 0); + + //data = img.read(filename); // tres beau bleu gris mauve!! + // allocate a texture name + glGenTextures( 1, &textureId ); + if(textureId > (GLuint) _maxId) + _maxId = textureId; + + // select our current texture + glBindTexture( GL_TEXTURE_2D, textureId ); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, + GL_NEAREST); + + glTexImage2D(GL_TEXTURE_2D, 0,GL_RGBA, image->x, image->y, 0, + GL_RGBA, GL_UNSIGNED_BYTE, image->rect ); +} + +void AppGLWidget::init() +{ + //setShortcut(QGLViewer::EXIT_VIEWER, 0); +// setShortcut(QGLViewer::DISPLAY_Z_BUFFER, 0); + //setShortcut(QGLViewer::STEREO, 0); + //setShortcut(QGLViewer::ANIMATION, 0); + //setShortcut(QGLViewer::EDIT_CAMERA, 0); + + //restoreStateFromFile(); + + //trackball().fitBBox(_ModelRootNode->bbox().getMin(), _ModelRootNode->bbox().getMax(), _Fovy); + + glClearColor(1,1,1,0); + glShadeModel(GL_SMOOTH); + + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + glEnable(GL_DEPTH_TEST); + + // open and read texture data + Config::Path * cpath = Config::Path::getInstance(); + string envmapDir = cpath->getEnvMapDir(); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray00.png")).c_str() ); + //LoadEnvMap(Config::ENV_MAP_DIR + "gray01.bmp"); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray02.png")).c_str() ); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("gray03.png")).c_str() ); + LoadEnvMap( StringUtils::toAscii(envmapDir + string("brown00.png")).c_str() ); + glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP) ; + + // gl settings for Environmental Texturing: + glColor3f(1, 1, 1); + + // Use GL auto-computed enviroment texture coordinates + //glEnable(GL_TEXTURE_GEN_S); + //glEnable(GL_TEXTURE_GEN_T); + + // Bind the texture to use + //glBindTexture(GL_TEXTURE_2D,texture); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + // parametres de melange + //glBlendFunc(GL_ONE, GL_ONE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + //glBlendEquatio(GL_FUNC_ADD); + + //glEnable(GL_BLEND); + NodeLight *light = new NodeLight; + _Light.AddChild(light); + + // Change QGLViewer's default shortcut for snapshots + //setShortcut(QGLViewer::SAVE_SCREENSHOT, Qt::CTRL + Qt::Key_W); + // setShortcutKey (QGLViewer::SAVE_SCREENSHOT, Key_W); + // setShortcutStateKey(QGLViewer::SAVE_SCREENSHOT, ControlButton); + + cout << "Renderer (GL) : " << glGetString(GL_RENDERER) << endl + << "Vendor (GL) : " << glGetString(GL_VENDOR) << endl << endl; +} + +void AppGLWidget::draw() +{ + if (true == _Draw3DScene) + { + if (true == _selection_mode) { + _pSelectRenderer->setSelectRendering(false); + _pSelectRenderer->resetColor(); + DrawScene(_pSelectRenderer); + } else + DrawScene(_pGLRenderer); + + if (true == _silhouette) + DrawSilhouette(); + + if (true == _drawBBox) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _ModelRootNode->accept(*_pBBoxRenderer); + glPopAttrib(); + } + + if (true == _debug) { + glPushAttrib(GL_ALL_ATTRIB_BITS); + _DebugRootNode->accept(*_pDebugRenderer); + glPopAttrib(); + } + } + + if (true == _Draw2DScene) { + Draw2DScene(_pGLRenderer); + Set3DContext(); + } + if(_record){ + saveSnapshot(true); + } +} + +void AppGLWidget::DrawScene(SceneVisitor *iRenderer) +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_drawEnvMap) + { + _ModelRootNode->SetLightingEnabled(false); + glEnable(GL_COLOR_MATERIAL); + + glEnable(GL_TEXTURE_2D); + // Bind the texture to use + glBindTexture(GL_TEXTURE_2D,_currentEnvMap); + switch(_blendFunc) + { + case 0: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + break; + case 1: + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE) ; + glDisable(GL_BLEND); + break; + // case 2: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + // glEnable(GL_BLEND); + // break; + // case 3: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR); + // glEnable(GL_BLEND); + // break; + // case 4: + // glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) ; + // glBlendFunc(GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA); + // glEnable(GL_BLEND); + // break; + default: + break; + } + + glEnable(GL_TEXTURE_GEN_S); + glEnable(GL_TEXTURE_GEN_T); + } + + // FIXME + // //_ModelRootNode->SetLightingEnabled(true); + // if(_ModelRootNode->style() == DrawingStyle::LINES){ + // glPushAttrib(GL_ALL_ATTRIB_BITS); + // //glDisable(GL_COLOR_MATERIAL); + // _ModelRootNode->SetStyle(DrawingStyle::FILLED); + // _ModelRootNode->SetLightingEnabled(true); + // _ModelRootNode->accept(*iRenderer); + // _ModelRootNode->SetStyle(DrawingStyle::LINES); + // _ModelRootNode->SetLightingEnabled(false); + // _ModelRootNode->accept(*iRenderer); + // glPopAttrib(); + // } + // else + _ModelRootNode->accept(*iRenderer); + + glDisable(GL_TEXTURE_GEN_S); + glDisable(GL_TEXTURE_GEN_T); + glDisable(GL_TEXTURE_2D); + glDisable(GL_COLOR_MATERIAL); + _ModelRootNode->SetLightingEnabled(true); + + if(_fedges == true) + _SilhouetteRootNode->accept(*iRenderer); + + // FIXME: deprecated +// if(_debug == true) +// _DebugRootNode->accept(*iRenderer); + + glPopAttrib(); +} + +void AppGLWidget::prepareCanvas() +{ + makeCurrent(); + glPushAttrib(GL_ALL_ATTRIB_BITS); + + if(_frontBufferFlag){ + if(_backBufferFlag) + glDrawBuffer(GL_FRONT_AND_BACK); + else + glDrawBuffer(GL_FRONT); + } + else if(_backBufferFlag) + glDrawBuffer(GL_BACK); + + // Projection Matrix + //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0,width(), 0, height(), -1.0, 1.0); + + //Modelview Matrix + //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); +} + +void AppGLWidget::releaseCanvas() +{ + makeCurrent(); + glDrawBuffer(GL_BACK); + glPopAttrib(); +} + +void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer) +{ + static bool first = 1; + glPushAttrib(GL_ALL_ATTRIB_BITS); + +// // Projection Matrix +// //================== + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0,width(), 0, height(), -1.0, 1.0); + +// //Modelview Matrix +// //================ + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // glBegin(GL_LINE_LOOP); + // glVertex2f(0,0); + // glVertex2f(100,0); + // glVertex2f(100,100); + // glVertex2f(0,100); + // glEnd(); + + //glDrawBuffer(GL_FRONT_AND_BACK); + // Draw visible silhouette + //_pVisibleSilhouetteNode->Render(iRenderer); + Canvas * canvas = Canvas::getInstance(); + if((canvas) && (!canvas->isEmpty())) + { + if (first) + { + canvas->init(); + first = false; + } + canvas->Render(canvas->renderer()); + } + + glLoadIdentity(); + // glColor3f(0.f,1.f,0.f); + // glLineWidth(5.f); + //glPolygonOffset(0.5f, 0.5f); + glPushAttrib(GL_DEPTH_BUFFER_BIT); + glDisable(GL_DEPTH_TEST); + _p2DSelectionNode->accept(*iRenderer); + glPopAttrib(); + // Draw Feature edges + // if(_fedges == true) + // { + // _pFENode->Render(iRenderer); + // } + + glPopAttrib(); +} + +void AppGLWidget::DrawSilhouette() +{ + glPushAttrib(GL_ALL_ATTRIB_BITS); + + glDepthFunc(GL_LESS); + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + DrawScene(_pMonoColorRenderer); + + glCullFace(GL_FRONT); + glDepthFunc(GL_LEQUAL); + glEnable(GL_POLYGON_OFFSET_FILL); + glLineWidth(3.0); + //glPolygonOffset(10.f, 10.f); + glPolygonOffset(0.5f, 0.5f); + + glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + _pMonoColorRenderer->setColor(0.f, 0.f, 0.f); + DrawScene(_pMonoColorRenderer); + + //Restore old context + glPopAttrib(); + +} + +void AppGLWidget::ReInitRenderers() +{ + // Debug Renderer + if(NULL != _pDebugRenderer) + _pDebugRenderer->ReInit(rabs(_ModelRootNode->bbox().getMax()[1] - + _ModelRootNode->bbox().getMin()[1])); +} + +void AppGLWidget::setFrontBufferFlag(bool iBool){ + _frontBufferFlag = iBool; +} +bool AppGLWidget::getFrontBufferFlag() { + return _frontBufferFlag; +} +void AppGLWidget::setBackBufferFlag(bool iBool){ + _backBufferFlag = iBool; +} +bool AppGLWidget::getBackBufferFlag() { + return _backBufferFlag; +} + +//void AppGLWidget::DrawLines() +//{ +// //Antialiasing: +// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +// glEnable(GL_BLEND); +// glEnable(GL_LINE_SMOOTH); +// glPolygonMode(GL_FRONT, GL_LINE); +// +// glColor3f(0.f, 0.f, 0.f); +// glLineWidth(2.f); +// +// DrawScene(); +//} +// +//void AppGLWidget::DrawSurfacic() +//{ +// glPolygonMode(GL_FRONT, GL_FILL); +// glShadeModel(GL_SMOOTH); +// +// glEnable(GL_LIGHTING); +// glEnable(GL_LIGHT0); +// +// +// GLreal diffuseV[] = {0.5, 0.7, 0.5, 1.0}; +// glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseV); +// +// //glColor3f(0.f, 0.f, 0.f); +// +// DrawScene(); +// +// glDisable(GL_LIGHTING); +//} +// +//void AppGLWidget::DrawDepthBuffer() +//{ +// GLint w = width(); +// GLint h = height(); +// +// glPolygonMode(GL_FRONT, GL_FILL); +// +// //Disable the writing in the frame buffer +// glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); +// +// //This rendering will only fills the depth buffer +// DrawScene(); +// +// //Re-enable the frame buffer writing +// glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); +// +// +// GLreal *zPixels = new real[w*h]; +// GLreal *colorPixels = new real[4*w*h]; +// +// // glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK +// glReadPixels(0,0,w, h, GL_DEPTH_COMPONENT, GL_real, (GLreal*)zPixels); +// +// real *tmpZ = zPixels; +// real *tmpColor = colorPixels; +// +// for(int i=0; i +using namespace std; +# define __min(x,y) (min(x,y)) +# define __max(x,y) (max(x,y)) +# endif // WIN32 + + +//# include +# include "../geometry/Geom.h" +# include "../geometry/BBox.h" +# include "../scene_graph/NodeDrawingStyle.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "AppConfig.h" +# include "../rendering/GLDebugRenderer.h" +//# include + +using namespace Geometry; + +typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; + +class FEdge; +class QMainWindow; +class GLRenderer; +class GLSelectRenderer; +class GLBBoxRenderer; +class GLMonoColorRenderer; +class GLDebugRenderer; + +class Vec{ +public: + Vec() {}; + Vec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {}; + ~Vec() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + } + return 0.0; + } + + + float x,y,z; +}; + +class Quaternion{ +public: + Quaternion( float _x, float _y, float _z, float _s): x(_x), y(_y), z(_z), s(_s){}; + ~Quaternion() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + case 3: return s; break; + } + return 0.0; + } + + float x,y,z,s; +}; + +class Camera { + private: + float _position[3]; + float _orientation[3]; + + public: + Camera(){}; + ~Camera() {}; + + void setZNearCoefficient(float f) {} + void playPath(int i) {} + + void loadProjectionMatrix() {} + void loadModelViewMatrix() {} + real distanceToSceneCenter() { return 0;} + void showEntireScene() {} + real zFar() {return 0;} + real zNear() {return 0;} + void setPosition(Vec v) {} + void setOrientation(Quaternion q) {} + float* position() { return _position; } + float* orientation() { return _orientation; } + void getWorldCoordinatesOf(float *src, float *vp_tmp) {} + +}; + + +//class AppGLWidget : public QGLViewer +class AppGLWidget +{ + //Q_OBJECT + + +public: + + AppGLWidget(const char *iName = 0); + virtual ~AppGLWidget(); + +public: + + inline void swapBuffers() {} + inline void updateGL() {} + inline void makeCurrent() {} + inline void setSceneBoundingBox(Vec &min_, Vec &max_) {} + inline void saveSnapshot(bool b) {} + inline real width() { return _width; } + inline real height() { return _height; } + void setStateFileName(const string& name) { stateFileName_ = name; }; + + +Camera * _camera; + + // captures a frame animation that was previously registered + void captureMovie(); + + /*! Sets the rendering style. + iStyle + The style used to render. Can be: + SURFACIC : usual rendering + LINES : line rendering + DEPTHBUFFER : grey-levels rendering of the depth buffer + */ + inline void SetRenderStyle(RenderStyle iStyle) + { + _RenderStyle = iStyle; + } + + /*! Sets the model to draw in the viewer + * iModel + * The Root Node of the model + */ + inline void SetModel(NodeGroup *iModel) + { + if(0 != _ModelRootNode->numberOfChildren()) + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + } + + AddModel(iModel); + } + + /*! Adds a model for displaying in the viewer */ + inline void AddModel(NodeGroup *iModel) + { + _ModelRootNode->AddChild(iModel); + + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + // DEBUG: + ReInitRenderers(); + + } + + inline void AddSilhouette(NodeGroup* iSilhouette) + { + _SilhouetteRootNode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DSilhouette(NodeGroup *iSilhouette) + { + //_pFENode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) + { + //_pVisibleSilhouetteNode->AddChild(iVSilhouette); + updateGL(); + } + + inline void SetDebug(NodeGroup* iDebug) + { + if(0 != _DebugRootNode->numberOfChildren()) + { + _DebugRootNode->DetachChildren(); + _DebugRootNode->clearBBox(); + } + + AddDebug(iDebug); + } + + inline void AddDebug(NodeGroup* iDebug) + { + _DebugRootNode->AddChild(iDebug); + updateGL(); + } + + inline void DetachModel(Node *iModel) + { + _ModelRootNode->DetachChild(iModel); + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + } + + inline void DetachModel() + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + + // 2D Scene + //_p2DNode.DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + updateGL(); + } + + inline void DetachSilhouette() + { + _SilhouetteRootNode->DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + //updateGL(); //FIXME + } + + inline void DetachVisibleSilhouette() + { + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + updateGL(); + } + + inline void DetachDebug() + { + _DebugRootNode->DetachChildren(); + updateGL(); + } + + void SetMainWindow(QMainWindow *iMainWindow) ; + + inline void Set3DContext() + { + // GL_PROJECTION matrix + _camera->loadProjectionMatrix(); + // GL_MODELVIEW matrix + _camera->loadModelViewMatrix(); + } + + inline void RetriveModelViewMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_MODELVIEW_MATRIX, p); + } + inline void RetriveModelViewMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_MODELVIEW_MATRIX, p); + } + + inline void RetrieveProjectionMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_PROJECTION_MATRIX, p); + + } + inline void RetrieveProjectionMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_PROJECTION_MATRIX, p); + + } + + inline void RetrieveViewport(int *p) + { + makeCurrent(); + glGetIntegerv(GL_VIEWPORT,(GLint *)p); + } + + inline real GetFocalLength() const + { + real Near = __max(0.1,(real)(-2.f*_maxAbs+_camera->distanceToSceneCenter())); + return Near; + } + + inline real GetAspect() const + { + return ((real) _width/(real) _height); + } + + inline real GetFovyRadian() const + { + return _Fovy/180.0 * M_PI; + } + + inline real GetFovyDegrees() const + { + return _Fovy; + } + + inline void FitBBox() + { + Vec min_(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1], + _ModelRootNode->bbox().getMin()[2]); + Vec max_(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1], + _ModelRootNode->bbox().getMax()[2]); + setSceneBoundingBox(min_, max_); + _camera->showEntireScene(); + } + + inline void ToggleSilhouette(bool enabled) + { + _fedges = enabled; + updateGL(); + } + + // Reinit the renderers which need to be informed + // when a model is added to the scene. + void ReInitRenderers(); + + inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + + inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } + inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} + + /*! glReadPixels */ + typedef enum{ + RGB, + DEPTH + } PixelFormat; + void readPixels(int x, + int y, + int width, + int height, + PixelFormat format, + float *pixels) + { + makeCurrent(); + //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK + glReadBuffer(GL_BACK); + GLenum glformat; + switch(format) + { + case RGB: + glformat = GL_RGB; + break; + case DEPTH: + glformat = GL_DEPTH_COMPONENT; + break; + default: + break; + } + glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); + } + + void clear() { makeCurrent(); glClear(GL_COLOR_BUFFER_BIT ); } + + void prepareCanvas(); + void releaseCanvas(); + + typedef enum { + FRONT, + BACK + } GLBuffer; + + void setReadPixelsBuffer(int iBuffer) + { + makeCurrent(); + switch(iBuffer) + { + case FRONT: + glReadBuffer(GL_FRONT); + break; + case BACK: + glReadBuffer(GL_BACK); + break; + default: + break; + } + } + + BBox scene3DBBox() const { return _ModelRootNode->bbox(); } + + inline real znear() const { + return _camera->zNear(); + } + + inline real zfar() const { + return _camera->zFar(); + } + + inline bool draw3DsceneEnabled() const { return _Draw3DScene; } + + inline bool getRecordFlag() const {return _record;} + + void setCameraState(const float* position, const float* orientation) { + _camera->setPosition(Vec(position[0], position[1], position[2])); + _camera->setOrientation(Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); + } + + void getCameraState(float* position, float* orientation) const { + float* pos = _camera->position(); + float* orient = _camera->orientation(); + int i; + for(i=0;i<3;++i){ + position[i] = pos[i]; + } + for(i=0;i<4;++i){ + orientation[i] = orient[i]; + } + } + + void saveCameraState() { + getCameraState(_cameraPosition, _cameraOrientation); + _cameraStateSaved = true; + } + + void setUpdateMode(bool b) { + _enableUpdateSilhouettes = b; + } + + bool getUpdateMode() const { + return _enableUpdateSilhouettes; + } + static void setFrontBufferFlag(bool iBool); + static bool getFrontBufferFlag(); + static void setBackBufferFlag(bool iBool); + static bool getBackBufferFlag(); + +protected: + virtual void init(); + virtual void draw(); + + /*! Loads an envmap */ + void LoadEnvMap(const char *filename); + +public: + /*! Core scene drawing */ + void DrawScene(SceneVisitor *iRenderer); + + /*! 2D Scene Drawing */ + void Draw2DScene(SceneVisitor *iRenderer); + + /*! Draws scene silhouettes in real time */ + void DrawSilhouette(); + + /*! Draws the Scene in lines style */ + // void DrawLines(); + // /*! Draws the scene in surfacic style */ + // void DrawSurfacic(); + // /*! Draws the scene as a depth buffer image */ + // void DrawDepthBuffer(); + + GLRenderer* glRenderer() {return _pGLRenderer;} + +protected: + + + //QString shortcutBindingsString() const; + + /*! fabs or abs */ + inline int rabs(int x) {return abs(x);} + inline real rabs(real x) {return fabs(x);} + + +protected: + float _Fovy; + //float _SceneDepth; + //BBox _BBox; + + RenderStyle _RenderStyle; + + //The root node container + NodeGroup _RootNode; + NodeDrawingStyle *_ModelRootNode; + NodeDrawingStyle *_SilhouetteRootNode; + NodeDrawingStyle *_DebugRootNode; + + bool _silhouette; + bool _fedges; + bool _debug; + bool _selection_mode; + + //a Universal light: + NodeGroup _Light; + + real _minBBox; + real _maxBBox; + real _maxAbs; + + real _minAbs; + bool _drawBBox; + + // OpenGL Renderer + GLRenderer *_pGLRenderer; + GLSelectRenderer *_pSelectRenderer; + GLBBoxRenderer *_pBBoxRenderer; + GLMonoColorRenderer *_pMonoColorRenderer; + GLDebugRenderer *_pDebugRenderer; + + QMainWindow *_pMainWindow; + + Chronometer _Chrono; + + // 2D Scene + bool _Draw2DScene; + bool _Draw3DScene; NodeGroup _p2DNode; + //NodeDrawingStyle *_pFENode; // Feature edges node + //NodeDrawingStyle *_pVisibleSilhouetteNode; + NodeDrawingStyle *_p2DSelectionNode; + + // EnvMap + bool _drawEnvMap; + int _currentEnvMap; + int _maxId; + int _blendFunc; + + // Each time we compute the view map, the camera state is + // saved in order to be able to restore it later + bool _cameraStateSaved; + float _cameraPosition[3]; + float _cameraOrientation[4]; + + // interactive silhouette update + bool _enableUpdateSilhouettes; + //capture movie + bool _captureMovie; + // 2D drawing buffers + static bool _frontBufferFlag; + static bool _backBufferFlag; + + bool _record; + + +real _width, _height; +Vec _min,_max; +string stateFileName_; +}; + +#endif // ARTGLWIDGET_H diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp new file mode 100755 index 00000000000..edc1b7f663a --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -0,0 +1,1050 @@ + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +// Must be included before any QT header, because of moc +#include "../system/PythonInterpreter.h" + +#include +#include +#include + +#include "AppGLWidget.h" +#include "AppCanvas.h" +#include "AppConfig.h" + + +#include "../system/StringUtils.h" +#include "../scene_graph/MaxFileLoader.h" +#include "../scene_graph/NodeShape.h" +#include "../scene_graph/NodeTransform.h" +#include "../scene_graph/NodeDrawingStyle.h" +#include "../winged_edge/WingedEdgeBuilder.h" +#include "../winged_edge/WEdge.h" +#include "../scene_graph/VertexRep.h" +#include "../winged_edge/WXEdgeBuilder.h" +#include "../scene_graph/ScenePrettyPrinter.h" +#include "../winged_edge/WFillGrid.h" + +#include "../view_map/ViewMapTesselator.h" +#include "../stroke/StrokeTesselator.h" +#include "../view_map/ViewMapIO.h" +#include "Controller.h" +#include "../view_map/ViewMap.h" +#include "../winged_edge/Curvature.h" +//#include "QGLBasicWidget.h" +//#include +#include "../image/Image.h" +#include "../view_map/SteerableViewMap.h" +#include "../stroke/PSStrokeRenderer.h" +#include "../stroke/TextStrokeRenderer.h" +#include "../stroke/StyleModule.h" + +#ifndef WIN32 +//# include "GLXOffscreenBuffer.h" +//# include "GLXOffscreenBuffer.h" +#endif + +#include "../system/StringUtils.h" + + +Controller::Controller() +{ + const string sep(Config::DIR_SEP.c_str()); + const string filename = Config::Path::getInstance()->getHomeDir() + sep + + Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; + //_current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true); + + _RootNode = new NodeGroup; + _RootNode->addRef(); + + _SilhouetteNode = NULL; + //_ProjectedSilhouette = NULL; + //_VisibleProjectedSilhouette = NULL; + + _DebugNode = new NodeGroup; + _DebugNode->addRef(); + + _winged_edge = NULL; + + _pView = NULL; + + _edgeTesselationNature = (Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE); + + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + _bboxDiag = 0; + + _ViewMap = 0; + + _Canvas = 0; + + _VisibilityAlgo = ViewMapBuilder::ray_casting; + //_VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + + _Canvas = new AppCanvas; + + _inter = new PythonInterpreter; + _EnableQI = true; + _ComputeRidges = true; + _ComputeSteerableViewMap = false; + _ComputeSuggestive = true; + _sphereRadius = 1.0; +} + +Controller::~Controller() +{ + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + delete _RootNode; + } + + if(NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + delete _DebugNode; + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + if(0 != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + if(0 != _Canvas) + { + delete _Canvas; + _Canvas = 0; + } + + if (_inter) { + delete _inter; + _inter = NULL; + } + + //delete _current_dirs; +} + +void Controller::SetView(AppGLWidget *iView) +{ + if(NULL == iView) + return; + + _pView = iView; + _Canvas->SetViewer(_pView); +} + + +int Controller::Load3DSFile(const char *iFileName) +{ + if (_pView) + _pView->setUpdateMode(false); + + MaxFileLoader loader3DS(iFileName); + //_RootNode->AddChild(BuildSceneTest()); + + _Chrono.start(); + + NodeGroup *maxScene = loader3DS.Load(); + + if (maxScene == NULL) { + return 1; + } + + printf("Mesh cleaning : %lf\n", _Chrono.stop()); + _SceneNumFaces += loader3DS.numFacesRead(); + + if(loader3DS.minEdgeSize() < _minEdgeSize) + { + _minEdgeSize = loader3DS.minEdgeSize(); + _EPSILON = _minEdgeSize*1e-6; + if(_EPSILON < DBL_MIN) + _EPSILON = 0.0; + } + + cout << "Epsilon computed : " << _EPSILON << endl; + + // DEBUG +// ScenePrettyPrinter spp; +// maxScene->accept(spp); + + _RootNode->AddChild(maxScene); + _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox + + _pView->SetModel(_RootNode); + _pView->FitBBox(); + + _Chrono.start(); + + + WXEdgeBuilder wx_builder; + maxScene->accept(wx_builder); + _winged_edge = wx_builder.getWingedEdge(); + + printf("WEdge building : %lf\n", _Chrono.stop()); + + _Chrono.start(); + + _Grid.clear(); + Vec3r size; + for(unsigned int i=0; i<3; i++) + { + size[i] = fabs(_RootNode->bbox().getMax()[i] - _RootNode->bbox().getMin()[i]); + size[i] += size[i]/10.0; // let make the grid 1/10 bigger to avoid numerical errors while computing triangles/cells intersections + if(size[i]==0){ + cout << "Warning: the bbox size is 0 in dimension "<bbox().getMin() - size / 20.0), size, + _SceneNumFaces); + + // Fill in the grid: + WFillGrid fillGridRenderer(&_Grid, _winged_edge); + fillGridRenderer.fillGrid(); + + printf("Grid building : %lf\n", _Chrono.stop()); + + // DEBUG +// _Grid.displayDebug(); + + _pView->SetDebug(_DebugNode); + + //delete stuff + // if(0 != ws_builder) + // { + // delete ws_builder; + // ws_builder = 0; + // } + _pView->updateGL(); + + + //soc QFileInfo qfi(iFileName); + //soc string basename((const char*)qfi.fileName().toAscii().data()); + char cleaned[FILE_MAX]; + BLI_strncpy(cleaned, iFileName, FILE_MAX); + BLI_cleanup_file(NULL, cleaned); + string basename = StringUtils::toAscii( string(cleaned) ); + + _ListOfModels.push_back(basename); + + cout << "Triangles nb : " << _SceneNumFaces << endl; + _bboxDiag = (_RootNode->bbox().getMax()-_RootNode->bbox().getMin()).norm(); + cout << "Bounding Box : " << _bboxDiag << endl; + return 0; +} + +void Controller::CloseFile() +{ + WShape::SetCurrentId(0); + _pView->DetachModel(); + _ListOfModels.clear(); + if(NULL != _RootNode) + { + int ref = _RootNode->destroy(); + if(0 == ref) + _RootNode->addRef(); + + _RootNode->clearBBox(); + } + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + { + delete _SilhouetteNode; + _SilhouetteNode = NULL; + } + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _ProjectedSilhouette; + // _ProjectedSilhouette = NULL; + // } + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = NULL; + // } + // } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + if(_winged_edge) { + delete _winged_edge; + _winged_edge = NULL; + } + + // We deallocate the memory: + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + // clears the canvas + _Canvas->Erase(); + + // clears the grid + _Grid.clear(); + _SceneNumFaces = 0; + _minEdgeSize = DBL_MAX; + // _pView2D->DetachScene(); + // if(NULL != _SRoot) + // { + // int ref = _SRoot->destroy(); + // if(0 == ref) + // { + // //_SRoot->addRef(); + // delete _SRoot; + // _SRoot = NULL; + // } + // } +} + +// static const streamsize buffer_size = 512 * 1024; + +void Controller::SaveViewMapFile(const char *oFileName) +{ + if (!_ViewMap) + return; + + ofstream ofs(oFileName, ios::binary); + if (!ofs.is_open()) { + cerr << "Error: Cannot save this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ofs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ofs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + _Chrono.start(); + + ofs << Config::VIEWMAP_MAGIC << endl << Config::VIEWMAP_VERSION << endl; + + // Write the models filenames + ofs << _ListOfModels.size() << endl; + for (vector::const_iterator i = _ListOfModels.begin(); i != _ListOfModels.end(); i++) + ofs << *i << "\n"; + + // Save the camera position + float position[3]; + float orientation[4]; + _pView->getCameraState(position, orientation); + ofs.write((char*)position, 3 * sizeof(*position)); + ofs.write((char*)orientation, 4 * sizeof(*orientation)); + + // Write ViewMap + if (ViewMapIO::save(ofs, _ViewMap, 0)) { + _Chrono.stop(); + cerr << "Error: Cannot save this file" << endl; + return; + } + + real d = _Chrono.stop(); + cout << "ViewMap saving : " << d << endl; +} + +void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) +{ + ifstream ifs(iFileName, ios::binary); + if (!ifs.is_open()) { + cerr << "Error: Cannot load this file" << endl; + return; + } +// char buffer[buffer_size]; +// #if defined(__GNUC__) && (__GNUC__ < 3) +// ifs.rdbuf()->setbuf(buffer, buffer_size); +// # else +// ifs.rdbuf()->pubsetbuf(buffer, buffer_size); +// #endif + + // Test File Magic and version + char tmp_buffer[256]; + string test; + + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_MAGIC) { + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; + return; + } + ifs.getline(tmp_buffer, 255); + test = tmp_buffer; + if (test != Config::VIEWMAP_VERSION && !only_camera) { + cerr << "Error: This version of the ." << Config::VIEWMAP_EXTENSION << " file format is no longer supported" << endl; + return; + } + + // Read the models filenames and open them (if not already done) + string tmp; + vector tmp_vec; + unsigned models_nb, i; + + ifs.getline(tmp_buffer, 255); + models_nb = atoi(tmp_buffer); + for (i = 0; i < models_nb; i++) { + ifs.getline(tmp_buffer, 255); + tmp = tmp_buffer; + tmp_vec.push_back(tmp); + } + if (_ListOfModels != tmp_vec && !only_camera) { + CloseFile(); + vector pathnames; + int err = 0; + for (vector::const_iterator i = tmp_vec.begin(); i != tmp_vec.end(); i++) + { + pathnames.clear(); + StringUtils::getPathName(ViewMapIO::Options::getModelsPath(), *i, pathnames); + for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) + if (!(err = Load3DSFile(j->c_str()))) + break; + if (err) { + cerr << "Error: cannot find model \"" << *i << "\" - check the path in the Options" << endl; + return; + } + } + } + + // Set the camera position + float position[3]; + float orientation[4]; + ifs.read((char*)position, 3 * sizeof(*position)); + ifs.read((char*)orientation, 4 * sizeof(*orientation)); + _pView->setCameraState(position, orientation); + _pView->saveCameraState(); + + if (only_camera) { + return; + } + + // Reset ViewMap + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + _ViewMap = new ViewMap(); + + // Read ViewMap + _Chrono.start(); + if (ViewMapIO::load(ifs, _ViewMap, 0)) { + _Chrono.stop(); + + cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; + return; + } + + // Update display + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + // Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + // + _pView->AddSilhouette(_SilhouetteNode); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + + // Update options window + //_pOptionsWindow->updateViewMapFormat(); + + real d = _Chrono.stop(); + cout << "ViewMap loading : " << d << endl; + + // Compute the Directional ViewMap: + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeViewMap() +{ + + if (!_ListOfModels.size()) + return; + + if(NULL != _ViewMap) + { + delete _ViewMap; + _ViewMap = 0; + } + + _pView->DetachDebug(); + if(NULL != _DebugNode) + { + int ref = _DebugNode->destroy(); + if(0 == ref) + _DebugNode->addRef(); + } + + + _pView->DetachSilhouette(); + if (NULL != _SilhouetteNode) + { + int ref = _SilhouetteNode->destroy(); + if(0 == ref) + delete _SilhouetteNode; + } + // if(NULL != _ProjectedSilhouette) + // { + // int ref = _ProjectedSilhouette->destroy(); + // if(0 == ref) + // delete _ProjectedSilhouette; + // } + // if(NULL != _VisibleProjectedSilhouette) + // { + // int ref = _VisibleProjectedSilhouette->destroy(); + // if(0 == ref) + // { + // delete _VisibleProjectedSilhouette; + // _VisibleProjectedSilhouette = 0; + // } + // } + + // retrieve the 3D viewpoint and transformations information + //---------------------------------------------------------- + // Save the viewpoint context at the view level in order + // to be able to restore it later: + _pView->saveCameraState(); + + // Restore the context of view: + // we need to perform all these operations while the + // 3D context is on. + _pView->Set3DContext(); + float src[3] = { 0, 0, 0 }; + float vp_tmp[3] = { 0, 0, 0 }; + _pView->_camera->getWorldCoordinatesOf(src, vp_tmp); + Vec3r vp(vp_tmp[0], vp_tmp[1], vp_tmp[2]); + + real mv[4][4]; + _pView->RetriveModelViewMatrix((real *)mv); + // retrieve the projection matrix: + real proj[4][4]; + _pView->RetrieveProjectionMatrix((real *)proj); + int viewport[4]; + _pView->RetrieveViewport(viewport); + real focalLength = _pView->GetFocalLength(); + + // Flag the WXEdge structure for silhouette edge detection: + //---------------------------------------------------------- + + _Chrono.start(); + + edgeDetector.SetViewpoint(Vec3r(vp)); + edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); + edgeDetector.enableSuggestiveContours(_ComputeSuggestive); + edgeDetector.setSphereRadius(_sphereRadius); + edgeDetector.setSuggestiveContourKrDerivativeEpsilon(_suggestiveContourKrDerivativeEpsilon); + edgeDetector.processShapes(*_winged_edge); + + real duration = _Chrono.stop(); + printf("Feature lines : %lf\n", duration); + + // Builds the view map structure from the flagged WSEdge structure: + //---------------------------------------------------------- + ViewMapBuilder vmBuilder; + vmBuilder.SetEnableQI(_EnableQI); + vmBuilder.SetViewpoint(Vec3r(vp)); + + vmBuilder.SetTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.SetFrustum(_pView->znear(), _pView->zfar()); + + vmBuilder.SetGrid(&_Grid); + + // Builds a tesselated form of the silhouette for display purpose: + //--------------------------------------------------------------- + ViewMapTesselator3D sTesselator3d; + //ViewMapTesselator2D sTesselator2d; + //sTesselator2d.SetNature(_edgeTesselationNature); + sTesselator3d.SetNature(_edgeTesselationNature); + + _Chrono.start(); + // Build View Map + _ViewMap = vmBuilder.BuildViewMap(*_winged_edge, _VisibilityAlgo, _EPSILON); + _ViewMap->setScene3dBBox(_RootNode->bbox()); + + //Tesselate the 3D edges: + _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); + _SilhouetteNode->addRef(); + + // Tesselate 2D edges + // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); + // _ProjectedSilhouette->addRef(); + + duration = _Chrono.stop(); + printf("ViewMap building : %lf\n", duration); + + + _pView->AddSilhouette(_SilhouetteNode); + //_pView->AddSilhouette(_WRoot); + //_pView->Add2DSilhouette(_ProjectedSilhouette); + //_pView->Add2DVisibleSilhouette(_VisibleProjectedSilhouette); + _pView->AddDebug(_DebugNode); + + // Draw the steerable density map: + //-------------------------------- + if(_ComputeSteerableViewMap){ + ComputeSteerableViewMap(); + } + // Reset Style modules modification flags + resetModified(true); +} + +void Controller::ComputeSteerableViewMap(){ +//soc + // if((!_Canvas) || (!_ViewMap)) + // return; + // + // // Build 4 nodes containing the edges in the 4 directions + // NodeGroup *ng[Canvas::NB_STEERABLE_VIEWMAP]; + // unsigned i; + // real c = 32.f/255.f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32. + // for(i=0; imaterial().SetDiffuse(c,c,c,1); + // ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); + // SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + // svm->Reset(); + // + // ViewMap::fedges_container& fedges = _ViewMap->FEdges(); + // LineRep * fRep; + // NodeShape *ns; + // for(ViewMap::fedges_container::iterator f=fedges.begin(), fend=fedges.end(); + // f!=fend; + // ++f){ + // if((*f)->viewedge()->qi() != 0) + // continue; + // fRep = new LineRep((*f)->vertexA()->point2d(),(*f)->vertexB()->point2d()) ; + // completeNS->AddRep(fRep); // add to the complete map anyway + // double *oweights = svm->AddFEdge(*f); + // for(i=0; imaterial().SetDiffuse(wc, wc, wc, 1); + // ns->AddRep(fRep); + // ng[i]->AddChild(ns); + // } + // } + // + // GrayImage *img[Canvas::NB_STEERABLE_VIEWMAP]; + // //#ifdef WIN32 + // QGLBasicWidget offscreenBuffer(_pView, "SteerableViewMap", _pView->width(), _pView->height()); + // QPixmap pm; + // QImage qimg; + // for(i=0; iwidth(), _pView->height()); + // //offscreenBuffer.readPixels(0,0,_pView->width(), _pView->height(), img[i]->getArray()); + // pm = offscreenBuffer.renderPixmap(_pView->width(), _pView->height()); + // + // if(pm.isNull()) + // cout << "BuildViewMap Warning: couldn't render the steerable ViewMap" << endl; + // //pm.save(QString("steerable")+QString::number(i)+QString(".bmp"), "BMP"); + // // FIXME!! Lost of time ! + // qimg = pm.toImage(); + // // FIXME !! again! + // img[i] = new GrayImage(_pView->width(), _pView->height()); + // for(unsigned y=0;yheight();++y){ + // for(unsigned x=0;xwidth();++x){ + // //img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))/255.f); + // img[i]->setPixel(x,y,(float)qGray(qimg.pixel(x,y))); + // // float c = qGray(qimg.pixel(x,y)); + // // img[i]->setPixel(x,y,qGray(qimg.pixel(x,y))); + // } + // } + // offscreenBuffer.DetachNode(ng[i]); + // ng[i]->destroy(); + // delete ng[i]; + // // check + // // qimg = QImage(_pView->width(), _pView->height(), 32); + // // for(y=0;yheight();++y){ + // // for(unsigned x=0;xwidth();++x){ + // // float v = img[i]->pixel(x,y); + // // qimg.setPixel(x,y,qRgb(v,v,v)); + // // } + // // } + // // qimg.save(QString("newsteerable")+QString::number(i)+QString(".bmp"), "BMP"); + // } + // + // + // svm->buildImagesPyramids(img,false,0,1.f); +} + +void Controller::saveSteerableViewMapImages(){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm){ + cerr << "the Steerable ViewMap has not been computed yet" << endl; + return; + } + svm->saveSteerableViewMap(); +} + +void Controller::toggleVisibilityAlgo() +{ + if(_VisibilityAlgo == ViewMapBuilder::ray_casting) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_fast; + } + else if (_VisibilityAlgo == ViewMapBuilder::ray_casting_fast) { + _VisibilityAlgo = ViewMapBuilder::ray_casting_very_fast; + } + else { + _VisibilityAlgo = ViewMapBuilder::ray_casting; + } +} + +void Controller::setQuantitativeInvisibility(bool iBool) +{ + _EnableQI = iBool; +} + +bool Controller::getQuantitativeInvisibility() const +{ + return _EnableQI; +} + +void Controller::setComputeRidgesAndValleysFlag(bool iBool){ + _ComputeRidges = iBool; +} + +bool Controller::getComputeRidgesAndValleysFlag() const { + return _ComputeRidges; +} +void Controller::setComputeSuggestiveContoursFlag(bool b){ + _ComputeSuggestive = b; +} + +bool Controller::getComputeSuggestiveContoursFlag() const { + return _ComputeSuggestive; +} +void Controller::setComputeSteerableViewMapFlag(bool iBool){ + _ComputeSteerableViewMap = iBool; +} + +bool Controller::getComputeSteerableViewMapFlag() const { + return _ComputeSteerableViewMap; +} +void Controller::setFrontBufferFlag(bool iBool) +{ + AppGLWidget::setFrontBufferFlag(iBool); +} + +bool Controller::getFrontBufferFlag() const +{ + return AppGLWidget::getFrontBufferFlag(); +} + +void Controller::setBackBufferFlag(bool iBool) +{ + AppGLWidget::setBackBufferFlag(iBool); +} + +bool Controller::getBackBufferFlag() const +{ + return AppGLWidget::getBackBufferFlag(); +} + +void Controller::DrawStrokes() +{ + if(_ViewMap == 0) + return; + + _Chrono.start(); + _Canvas->Draw(); + real d = _Chrono.stop(); + cout << "Strokes drawing : " << d << endl; + resetModified(); +} + +void Controller::InsertStyleModule(unsigned index, const char *iFileName) +{ + // QFileInfo fi(iFileName); + // string ext = fi.suffix(); + // if (ext != "py") { + // cerr << "Error: Cannot load \"" << fi.fileName().toAscii().data() + // << "\", unknown extension" << endl; + // return; + // } + + if( !BLI_testextensie(iFileName, ".py") ) { + cerr << "Error: Cannot load \"" << StringUtils::toAscii( string(iFileName) ) + << "\", unknown extension" << endl; + return; + } + + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->InsertStyleModule(index, sm); + +} + +void Controller::AddStyleModule(const char *iFileName) +{ + //_pStyleWindow->Add(iFileName); +} + +void Controller::RemoveStyleModule(unsigned index) +{ + _Canvas->RemoveStyleModule(index); +} + +void Controller::Clear() +{ + _Canvas->Clear(); +} + +void Controller::ReloadStyleModule(unsigned index, const char * iFileName) +{ + StyleModule* sm = new StyleModule(iFileName, _inter); + _Canvas->ReplaceStyleModule(index, sm); +} + +void Controller::SwapStyleModules(unsigned i1, unsigned i2) +{ + _Canvas->SwapStyleModules(i1, i2); +} + + +void Controller::toggleLayer(unsigned index, bool iDisplay) +{ + _Canvas->SetVisible(index, iDisplay); + _pView->updateGL(); +} + +void Controller::setModified(unsigned index, bool iMod) +{ + //_pStyleWindow->setModified(index, iMod); + _Canvas->setModified(index, iMod); + updateCausalStyleModules(index + 1); +} + +void Controller::updateCausalStyleModules(unsigned index) { + vector vec; + _Canvas->causalStyleModules(vec, index); + for (vector::const_iterator it = vec.begin(); it != vec.end(); it++) { + //_pStyleWindow->setModified(*it, true); + _Canvas->setModified(*it, true); + } +} + +void Controller::saveSnapshot(bool b) { + _pView->saveSnapshot(b); +} + +void Controller::resetModified(bool iMod) +{ + //_pStyleWindow->resetModified(iMod); + _Canvas->resetModified(iMod); +} + +FEdge* Controller::SelectFEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + //ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return fedge; +} + +ViewEdge* Controller::SelectViewEdge(real x, real y) +{ + if (!_ViewMap) + return NULL; + + FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + ViewEdge *selection = fedge->viewedge(); + _pView->SetSelectedFEdge(fedge); + _Canvas->SetSelectedFEdge(fedge); + return selection; +} + +NodeGroup * Controller::BuildRep(vector::iterator vedges_begin, + vector::iterator vedges_end) +{ + ViewMapTesselator2D tesselator2D; + Material mat; + mat.SetDiffuse(1,1,0.3,1); + tesselator2D.SetMaterial(mat); + + return (tesselator2D.Tesselate(vedges_begin, vedges_end)); +} + +void Controller::toggleEdgeTesselationNature(Nature::EdgeNature iNature) +{ + _edgeTesselationNature ^= (iNature); + ComputeViewMap(); +} + +void Controller::setModelsDir(const string& dir) { + //_current_dirs->setValue("models/dir", dir); +} + +string Controller::getModelsDir() const { + string dir = "."; + //_current_dirs->getValue("models/dir", dir); + return dir; +} + +void Controller::setModulesDir(const string& dir) { + //_current_dirs->setValue("modules/dir", dir); +} + +string Controller::getModulesDir() const { + string dir = "."; + //_current_dirs->getValue("modules/dir", dir); + return dir; +} + +void Controller::setPapersDir(const string& dir) { + //_current_dirs->setValue("papers/dir", dir); +} + +string Controller::getPapersDir() const { + string dir = Config::Path::getInstance()->getPapersDir(); + //_current_dirs->getValue("papers/dir", dir); + return dir; +} + +void Controller::setHelpIndex(const string& index) { + _help_index = index; +} + +string Controller::getHelpIndex() const { + return _help_index; +} + +void Controller::setBrowserCmd(const string& cmd) { + _browser_cmd = cmd; +} + +string Controller::getBrowserCmd() const { + return _browser_cmd; +} + +void Controller::resetInterpreter() { + if (_inter) + _inter->reset(); +} + + +void Controller::displayDensityCurves(int x, int y){ + SteerableViewMap * svm = _Canvas->getSteerableViewMap(); + if(!svm) + return; + + unsigned i,j; + typedef vector densityCurve; + vector curves(svm->getNumberOfOrientations()+1); + vector curvesDirection(svm->getNumberOfPyramidLevels()); + + // collect the curves values + unsigned nbCurves = svm->getNumberOfOrientations()+1; + unsigned nbPoints = svm->getNumberOfPyramidLevels(); + if(!nbPoints) + return; + + // build the density/nbLevels curves for each orientation + for(i=0;ireadSteerableViewMapPixel(i, j, x, y), 0)); + } + } + // build the density/nbOrientations curves for each level + for(i=0;ireadSteerableViewMapPixel(j, i, x, y), 0)); + } + } + + // display the curves + // for(i=0; iSetOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + // for(i=1; i<=8; ++i) + // _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); + // _pDensityCurvesWindow->show(); +} diff --git a/source/blender/freestyle/intern/app_blender/Controller.h b/source/blender/freestyle/intern/app_blender/Controller.h new file mode 100755 index 00000000000..55ef1968129 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/Controller.h @@ -0,0 +1,213 @@ +// +// Filename : Controller.h +// Author : Stephane Grabli +// Purpose : The spinal tap of the system +// Date of creation : 01/07/2002 +// +/////////////////////////////////////////////////////////////////////////////// + + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef CONTROLLER_H +# define CONTROLLER_H + +# include +//# include "ConfigIO.h" +# include "../geometry/FastGrid.h" +# include "../geometry/HashGrid.h" +# include "../view_map/ViewMapBuilder.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "../system/Interpreter.h" +# include "../view_map/FEdgeXDetector.h" + +class AppGLWidget; +class NodeGroup; +class WShape; +class SShape; +class ViewMap; +class ViewEdge; +class AppCanvas; +class InteractiveShader; +class Shader; + +class Controller +{ +public: + Controller() ; + ~Controller() ; + + void SetView(AppGLWidget *iView); + + int Load3DSFile(const char *iFileName); + void CloseFile(); + void LoadViewMapFile(const char *iFileName, bool only_camera = false); + void SaveViewMapFile(const char *iFileName); + void ComputeViewMap(); + void ComputeSteerableViewMap(); + void saveSteerableViewMapImages(); + void toggleEdgeTesselationNature(Nature::EdgeNature iNature); + void DrawStrokes(); + void SwapStyleModules(unsigned i1, unsigned i2); + void InsertStyleModule(unsigned index, const char *iFileName); + void AddStyleModule(const char *iFileName); + void RemoveStyleModule(unsigned index); + void ReloadStyleModule(unsigned index, const char * iFileName); + void Clear(); + void toggleLayer(unsigned index, bool iDisplay); + void setModified(unsigned index, bool iMod); + void resetModified(bool iMod=false); + void updateCausalStyleModules(unsigned index); + void saveSnapshot(bool b = false); + void displayDensityCurves(int x, int y); + + + ViewEdge * SelectViewEdge(real x, real y); + FEdge * SelectFEdge(real x, real y); + NodeGroup* BuildRep(vector::iterator vedges_begin, + vector::iterator vedges_end) ; + + NodeGroup* debugNode() {return _DebugNode;} + AppGLWidget * view() {return _pView;} + NodeGroup* debugScene() {return _DebugNode;} + Grid& grid() {return _Grid;} + + void toggleVisibilityAlgo(); + + void setQuantitativeInvisibility(bool iBool); // if true, we compute quantitativeInvisibility + bool getQuantitativeInvisibility() const; + + void setFrontBufferFlag(bool b); + bool getFrontBufferFlag() const; + void setBackBufferFlag(bool b); + bool getBackBufferFlag() const; + + void setComputeRidgesAndValleysFlag(bool b); + bool getComputeRidgesAndValleysFlag() const ; + void setComputeSuggestiveContoursFlag(bool b); + bool getComputeSuggestiveContoursFlag() const ; + + void setComputeSteerableViewMapFlag(bool iBool); + bool getComputeSteerableViewMapFlag() const; + void setSphereRadius(real s){_sphereRadius=s;} + real getSphereRadius() const {return _sphereRadius;} + void setSuggestiveContourKrDerivativeEpsilon(real dkr){_suggestiveContourKrDerivativeEpsilon=dkr;} + real getSuggestiveContourKrDerivativeEpsilon() const {return _suggestiveContourKrDerivativeEpsilon;} + + void setModelsDir(const string& dir); + string getModelsDir() const; + void setModulesDir(const string& dir); + string getModulesDir() const; + void setPapersDir(const string& dir); + string getPapersDir() const; + void setHelpIndex(const string& dir); + string getHelpIndex() const; + void setBrowserCmd(const string& cmd); + string getBrowserCmd() const; + + void resetInterpreter(); + +private: + + // Main Window: + //AppMainWindow *_pMainWindow; + + // List of models currently loaded + vector _ListOfModels; + + // Current directories + //ConfigIO* _current_dirs; + + //View + // 3D + AppGLWidget *_pView; + + // 2D + //Viewer2DWindow *_pView2DWindow; + //Viewer2D *_pView2D; + + //Model + // Drawing Structure + NodeGroup *_RootNode; + + // Winged-Edge structure + WingedEdge* _winged_edge; + + ViewMap * _ViewMap; + + // Silhouette structure: + //std::vector _SShapes; + //NodeGroup *_SRoot; + + // Silhouette + NodeGroup *_SilhouetteNode; + NodeGroup *_ProjectedSilhouette; + NodeGroup *_VisibleProjectedSilhouette; + + // more Debug info + NodeGroup *_DebugNode; + + // debug + // NodeUser *_ViewMapNode; // FIXME + + // Chronometer: + Chronometer _Chrono; + + // edges tesselation nature + int _edgeTesselationNature; + + FastGrid _Grid; + //HashGrid _Grid; + + unsigned int _SceneNumFaces; + real _minEdgeSize; + real _EPSILON; + real _bboxDiag; + + AppCanvas *_Canvas; + + //AppStyleWindow *_pStyleWindow; + //AppOptionsWindow *_pOptionsWindow; + //AppDensityCurvesWindow *_pDensityCurvesWindow; + + ViewMapBuilder::visibility_algo _VisibilityAlgo; + + // Script Interpreter + Interpreter* _inter; + + string _help_index; + string _browser_cmd; + + bool _EnableQI; + bool _ComputeRidges; + bool _ComputeSuggestive; + real _sphereRadius; + real _suggestiveContourKrDerivativeEpsilon; + + bool _ComputeSteerableViewMap; + + FEdgeXDetector edgeDetector; +}; + +extern Controller *g_pController; + +#endif // CONTROLLER_H diff --git a/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp b/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp index b396a0ce6d3..716db397e94 100755 --- a/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLDebugRenderer.cpp @@ -124,7 +124,7 @@ void GLDebugRenderer::renderBitmapString(real x, glScalef(textSize/200.0, textSize/200.0, textSize/200.0); for (c=string; *c != '\0'; c++) { - glutStrokeCharacter(font, *c); + //soc glutStrokeCharacter(font, *c); } glPopMatrix(); } diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index 3870edc2b75..d7f2e5683c5 100755 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -201,6 +201,7 @@ unsigned int SteerableViewMap::getNumberOfPyramidLevels() const{ return _imagesPyramids[0]->getNumberOfLevels(); return 0; } + void SteerableViewMap::saveSteerableViewMap() const { for(unsigned i=0; i<=_nbOrientations; ++i){ if(_imagesPyramids[i] == 0){ diff --git a/source/blender/freestyle/intern/AUTHORS.TXT b/source/blender/freestyle/misc/AUTHORS.TXT similarity index 100% rename from source/blender/freestyle/intern/AUTHORS.TXT rename to source/blender/freestyle/misc/AUTHORS.TXT diff --git a/source/blender/freestyle/intern/BUGS.TXT b/source/blender/freestyle/misc/BUGS.TXT similarity index 100% rename from source/blender/freestyle/intern/BUGS.TXT rename to source/blender/freestyle/misc/BUGS.TXT diff --git a/source/blender/freestyle/intern/COPYRIGHT.TXT b/source/blender/freestyle/misc/COPYRIGHT.TXT similarity index 100% rename from source/blender/freestyle/intern/COPYRIGHT.TXT rename to source/blender/freestyle/misc/COPYRIGHT.TXT diff --git a/source/blender/freestyle/intern/Config.pri b/source/blender/freestyle/misc/Config.pri similarity index 100% rename from source/blender/freestyle/intern/Config.pri rename to source/blender/freestyle/misc/Config.pri diff --git a/source/blender/freestyle/intern/Freestyle-vc7-debug.sln b/source/blender/freestyle/misc/Freestyle-vc7-debug.sln similarity index 100% rename from source/blender/freestyle/intern/Freestyle-vc7-debug.sln rename to source/blender/freestyle/misc/Freestyle-vc7-debug.sln diff --git a/source/blender/freestyle/intern/Freestyle-vc7-release.sln b/source/blender/freestyle/misc/Freestyle-vc7-release.sln similarity index 100% rename from source/blender/freestyle/intern/Freestyle-vc7-release.sln rename to source/blender/freestyle/misc/Freestyle-vc7-release.sln diff --git a/source/blender/freestyle/intern/Freestyle-vc8-debug.sln b/source/blender/freestyle/misc/Freestyle-vc8-debug.sln similarity index 100% rename from source/blender/freestyle/intern/Freestyle-vc8-debug.sln rename to source/blender/freestyle/misc/Freestyle-vc8-debug.sln diff --git a/source/blender/freestyle/intern/Freestyle-vc8-release.sln b/source/blender/freestyle/misc/Freestyle-vc8-release.sln similarity index 100% rename from source/blender/freestyle/intern/Freestyle-vc8-release.sln rename to source/blender/freestyle/misc/Freestyle-vc8-release.sln diff --git a/source/blender/freestyle/intern/INSTALL.TXT b/source/blender/freestyle/misc/INSTALL.TXT similarity index 100% rename from source/blender/freestyle/intern/INSTALL.TXT rename to source/blender/freestyle/misc/INSTALL.TXT diff --git a/source/blender/freestyle/intern/LICENSE.TXT b/source/blender/freestyle/misc/LICENSE.TXT similarity index 100% rename from source/blender/freestyle/intern/LICENSE.TXT rename to source/blender/freestyle/misc/LICENSE.TXT diff --git a/source/blender/freestyle/intern/Makefile.pro b/source/blender/freestyle/misc/Makefile.pro similarity index 100% rename from source/blender/freestyle/intern/Makefile.pro rename to source/blender/freestyle/misc/Makefile.pro diff --git a/source/blender/freestyle/intern/README.TXT b/source/blender/freestyle/misc/README.TXT similarity index 100% rename from source/blender/freestyle/intern/README.TXT rename to source/blender/freestyle/misc/README.TXT diff --git a/source/blender/freestyle/intern/THANKS.TXT b/source/blender/freestyle/misc/THANKS.TXT similarity index 100% rename from source/blender/freestyle/intern/THANKS.TXT rename to source/blender/freestyle/misc/THANKS.TXT diff --git a/source/blender/freestyle/intern/TODO.TXT b/source/blender/freestyle/misc/TODO.TXT similarity index 100% rename from source/blender/freestyle/intern/TODO.TXT rename to source/blender/freestyle/misc/TODO.TXT diff --git a/source/blender/freestyle/intern/build_bundle.macosx.py b/source/blender/freestyle/misc/build_bundle.macosx.py similarity index 100% rename from source/blender/freestyle/intern/build_bundle.macosx.py rename to source/blender/freestyle/misc/build_bundle.macosx.py diff --git a/source/blender/freestyle/intern/libconfig.pri b/source/blender/freestyle/misc/libconfig.pri similarity index 100% rename from source/blender/freestyle/intern/libconfig.pri rename to source/blender/freestyle/misc/libconfig.pri diff --git a/source/blender/freestyle/intern/makedsp.vcnet.debug.bat b/source/blender/freestyle/misc/makedsp.vcnet.debug.bat similarity index 100% rename from source/blender/freestyle/intern/makedsp.vcnet.debug.bat rename to source/blender/freestyle/misc/makedsp.vcnet.debug.bat diff --git a/source/blender/freestyle/intern/makedsp.vcnet.release.bat b/source/blender/freestyle/misc/makedsp.vcnet.release.bat similarity index 100% rename from source/blender/freestyle/intern/makedsp.vcnet.release.bat rename to source/blender/freestyle/misc/makedsp.vcnet.release.bat diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index f9e46b20d9a..7d44f82a1d0 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -31,4 +31,4 @@ if env['WITH_BF_QUICKTIME']==1: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') -env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [80, 40] ) +env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player','blender'], priority = [80, 40, -1] ) diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 45833695ffe..3d1641a2110 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -610,6 +610,7 @@ typedef struct Scene { /* yafray: renderer flag (not only exclusive to yafray) */ #define R_INTERN 0 #define R_YAFRAY 1 +#define R_FREESTYLE 2 /* scemode (int now) */ #define R_DOSEQ 0x0001 diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index db5ad669255..fdc65608146 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -970,6 +970,8 @@ static int RenderData_setRenderer( BPy_RenderData * self, PyObject * value ) self->renderContext->renderer = R_INTERN; else if( type == R_YAFRAY ) self->renderContext->renderer = R_YAFRAY; + else if( type == R_FREESTYLE ) + self->renderContext->renderer = R_FREESTYLE; else return EXPP_ReturnIntError( PyExc_ValueError, "expected constant INTERNAL or YAFRAY" ); @@ -3835,6 +3837,7 @@ PyObject *Render_Init( void ) PyModule_AddIntConstant( submodule, "INTERNAL", R_INTERN ); PyModule_AddIntConstant( submodule, "YAFRAY", R_YAFRAY ); + PyModule_AddIntConstant( submodule, "FREESTYLE", R_FREESTYLE ); PyModule_AddIntConstant( submodule, "AVIRAW", R_AVIRAW ); PyModule_AddIntConstant( submodule, "AVIJPEG", R_AVIJPEG ); PyModule_AddIntConstant( submodule, "AVICODEC", R_AVICODEC ); diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index b1bc9673f23..ce00af8af43 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -7,6 +7,7 @@ sources = env.Glob('intern/source/*.c') incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna' incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf' incs += ' ../quicktime ../include ../../kernel/gen_messaging' +incs += ' ../freestyle' defs = [] diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 93282e641d3..feccec6461f 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -70,6 +70,9 @@ #endif /* disable yafray */ +#include "FST_freestyle.h" + + /* internal */ #include "render_types.h" #include "renderpipeline.h" @@ -2192,6 +2195,11 @@ static void do_render_composite_fields_blur_3d(Render *re) re->display_draw(re->result, NULL); } +static void freestyleRender(Render *re) +{ + FRS_execute(); +} + #ifndef DISABLE_YAFRAY /* yafray: main yafray render/export call */ static void yafrayRender(Render *re) @@ -2286,10 +2294,15 @@ static void do_render_all_options(Render *re) #ifndef DISABLE_YAFRAY if(re->r.renderer==R_YAFRAY) yafrayRender(re); + else if(re->r.renderer==R_FREESTYLE) + freestyleRender(re); else do_render_composite_fields_blur_3d(re); #else - do_render_composite_fields_blur_3d(re); + if(re->r.renderer==R_FREESTYLE) + freestyleRender(re); + else + do_render_composite_fields_blur_3d(re); #endif } @@ -2402,7 +2415,7 @@ static int is_rendering_allowed(Render *re) } /* renderer */ - if(!ELEM(re->r.renderer, R_INTERN, R_YAFRAY)) { + if(!ELEM3(re->r.renderer, R_INTERN, R_YAFRAY, R_FREESTYLE)) { re->error("Unknown render engine set"); return 0; } diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index b295cdd8481..e24101786a3 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -2180,10 +2180,10 @@ static void render_panel_render(void) uiDefBut(block, BUT,B_DORENDER,"RENDER", 369, 164, 191,37, 0, 0, 0, 0, 0, "Render the current frame (F12)"); #ifndef DISABLE_YAFRAY /* yafray: on request, render engine menu is back again, and moved to Render panel */ - uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0|YafRay %x1", + uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0|YafRay %x1|Freestyle %x2", 369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine"); #else - uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0", + uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0|Freestyle %x1", 369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine"); #endif /* disable yafray */ diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 7699de41381..4576e149ed2 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -645,10 +645,12 @@ static char *renderwin_get_title() if(BIF_show_render_spare()) { if (G.scene->r.renderer==R_YAFRAY) title = "YafRay:Render (previous)"; + else if (G.scene->r.renderer==R_FREESTYLE) title = "Freestyle:Render (previous)"; else title = "Blender:Render (previous)"; } else { if (G.scene->r.renderer==R_YAFRAY) title = "YafRay:Render"; + else if (G.scene->r.renderer==R_FREESTYLE) title = "Freestyle:Render"; else title = "Blender:Render"; } From 32918e4523aa1c251d352d83270c9b94294753fc Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 18 May 2008 14:10:44 +0000 Subject: [PATCH 103/430] corrected swig Sconscript to compile on unix-like machines --- source/blender/freestyle/SConscript | 4 ++-- source/blender/imbuf/SConscript | 2 +- source/blender/yafray/SConscript | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 1f5359c5d39..3d9c1d2fd7c 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -63,8 +63,8 @@ env.BlenderLib (libname="bf_freestyle", sources=sources, includes=Split(incs), defines=defs, - libtype=['blender'], - priority = [20] ) + libtype=['player'], + priority = [280] ) ######################################################## # SWIG diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index 7d44f82a1d0..f9e46b20d9a 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -31,4 +31,4 @@ if env['WITH_BF_QUICKTIME']==1: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') -env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player','blender'], priority = [80, 40, -1] ) +env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [80, 40] ) diff --git a/source/blender/yafray/SConscript b/source/blender/yafray/SConscript index dd744f92d39..d269661ab50 100644 --- a/source/blender/yafray/SConscript +++ b/source/blender/yafray/SConscript @@ -6,4 +6,4 @@ sources = env.Glob('intern/*.cpp') incs = '#/intern/guardedalloc ../blenlib ../makesdna ../blenkernel' incs += ' ../imbuf ../include ../render/extern/include ../render/intern/include' -env.BlenderLib ( 'bf_yafray', sources, Split(incs), [], libtype=['blender','player'], priority=[5, 190] ) +env.BlenderLib ( 'bf_yafray', sources, Split(incs), [], libtype=['blender','player'], priority=[10, 190] ) From 09b36970bb584c1c72dd6166f2dde068b09e22bf Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 19 May 2008 05:34:31 +0000 Subject: [PATCH 104/430] soc-2008-mxcurioni: uploaded missing files. Still NOT linking so do not use this version yet :( --- source/blender/freestyle/FST_freestyle.h | 14 ++ source/blender/freestyle/SConscript | 5 +- .../intern/app_blender/AppConfig.cpp | 124 ++++++++++++++++++ .../freestyle/intern/app_blender/AppConfig.h | 111 ++++++++++++++++ .../freestyle/intern/app_blender/api.cpp | 21 +++ 5 files changed, 273 insertions(+), 2 deletions(-) create mode 100644 source/blender/freestyle/FST_freestyle.h create mode 100755 source/blender/freestyle/intern/app_blender/AppConfig.cpp create mode 100755 source/blender/freestyle/intern/app_blender/AppConfig.h create mode 100644 source/blender/freestyle/intern/app_blender/api.cpp diff --git a/source/blender/freestyle/FST_freestyle.h b/source/blender/freestyle/FST_freestyle.h new file mode 100644 index 00000000000..52940815fe4 --- /dev/null +++ b/source/blender/freestyle/FST_freestyle.h @@ -0,0 +1,14 @@ +#ifndef FRS_FREESTYLE_H +#define FRS_FREESTYLE_H + +#ifdef __cplusplus +extern "C" { +#endif + + void FRS_execute(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 3d9c1d2fd7c..31a43bac58c 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -63,8 +63,9 @@ env.BlenderLib (libname="bf_freestyle", sources=sources, includes=Split(incs), defines=defs, - libtype=['player'], - priority = [280] ) + libtype=['blender'], + priority = [25] + ) ######################################################## # SWIG diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.cpp b/source/blender/freestyle/intern/app_blender/AppConfig.cpp new file mode 100755 index 00000000000..baa847322d6 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppConfig.cpp @@ -0,0 +1,124 @@ +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#include "AppConfig.h" +#include + +#include "../system/StringUtils.h" + +using namespace std; + +namespace Config{ + Path* Path::_pInstance = 0; + Path::Path(){ + // get the home directory + _HomeDir = getEnvVar("HOME"); + // get the root directory + setRootDir(getEnvVar("FREESTYLE_DIR")); + //setRootDir(QString(".")); + _pInstance = this; + } + void Path::setRootDir(const string& iRootDir){ + _ProjectDir = iRootDir; + _ModelsPath = ""; + _PatternsPath = _ProjectDir + + string(DIR_SEP.c_str()) + + "data" + + string(DIR_SEP.c_str()) + + "textures" + + string(DIR_SEP.c_str()) + + "variation_patterns" + + string(DIR_SEP.c_str()); + _BrushesPath = _ProjectDir + + string(DIR_SEP.c_str()) + + "data" + + string(DIR_SEP.c_str()) + + "textures" + + string(DIR_SEP.c_str()) + + "brushes" + + string(DIR_SEP.c_str()); + _PythonPath = _ProjectDir + + string(DIR_SEP.c_str()) + + "python" + + string(PATH_SEP.c_str()) + + _ProjectDir + + string(DIR_SEP.c_str()) + + "style_modules" + + string(DIR_SEP.c_str()) ; + if (getenv("PYTHONPATH")) { + _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH")); + } +#ifdef WIN32 + _BrowserCmd = "C:\\Program Files\\Internet Explorer\\iexplore.exe %s"; +#else + _BrowserCmd = "mozilla %s"; +#endif + _HelpIndexPath = _ProjectDir + + string(DIR_SEP.c_str()) + + "doc" + + string(DIR_SEP.c_str()) + + "html" + + string(DIR_SEP.c_str()) + + "index.html"; + _PapersDir = _ProjectDir + + string(DIR_SEP.c_str()) + + "data" + + string(DIR_SEP.c_str()) + + "textures" + + string(DIR_SEP.c_str()) + + "papers" + + string(DIR_SEP.c_str()); + _EnvMapDir = _ProjectDir + + string(DIR_SEP.c_str()) + + "data" + + string(DIR_SEP.c_str()) + + "env_map" + + string(DIR_SEP.c_str()); + _MapsDir = _ProjectDir + + string(DIR_SEP.c_str()) + + "data" + + string(DIR_SEP.c_str()) + + "maps" + + string(DIR_SEP.c_str()); + } + void Path::setHomeDir(const string& iHomeDir){ + _HomeDir = iHomeDir; + } + Path::~Path(){ + _pInstance = 0; + } + Path* Path::getInstance() { + return _pInstance; + } + string Path::getEnvVar(const string& iEnvVarName){ + string value; + if (!getenv( StringUtils::toAscii(iEnvVarName).c_str() ) ) { + cerr << "Warning: You may want to set the $"<< StringUtils::toAscii(iEnvVarName) + << " environment variable to use " << string(Config::APPLICATION_NAME) << "." << endl + << " Otherwise, the current directory will be used instead." << endl; + value = "."; + }else{ + value = getenv( StringUtils::toAscii(iEnvVarName).c_str() ); + } + return value; + } + +} // End of namepace Config + diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.h b/source/blender/freestyle/intern/app_blender/AppConfig.h new file mode 100755 index 00000000000..8a6fef746dc --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/AppConfig.h @@ -0,0 +1,111 @@ +// +// Filename : AppConfig.h +// Author : Emmanuel Turquin +// Purpose : Configuration file +// Date of creation : 26/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef APP_CONFIG_H +# define APP_CONFIG_H + +# include +# include "../system/FreestyleConfig.h" +# include "../system/Precision.h" + +using namespace std; + +namespace Config { + + class Path{ + protected: + static Path * _pInstance; + string _ProjectDir; + string _ModelsPath; + string _PatternsPath; + string _BrushesPath; + string _PythonPath; + string _BrowserCmd; + string _HelpIndexPath; + string _PapersDir; + string _EnvMapDir; + string _MapsDir; + string _HomeDir; + public: + Path(); + virtual ~Path(); + static Path* getInstance(); + + void setRootDir(const string& iRootDir) ; + void setHomeDir(const string& iHomeDir) ; + + const string& getProjectDir() const {return _ProjectDir;} + const string& getModelsPath() const {return _ModelsPath;} + const string& getPatternsPath() const {return _PatternsPath;} + const string& getBrushesPath() const {return _BrushesPath;} + const string& getPythonPath() const {return _PythonPath;} + const string& getBrowserCmd() const {return _BrowserCmd;} + const string& getHelpIndexpath() const {return _HelpIndexPath;} + const string& getPapersDir() const {return _PapersDir;} + const string& getEnvMapDir() const {return _EnvMapDir;} + const string& getMapsDir() const {return _MapsDir;} + const string& getHomeDir() const {return _HomeDir;} + + static string getEnvVar(const string& iEnvVarName); + + }; + + // + // Configuration, default values + // + ////////////////////////////////////////////////////////////// + + // Application + static const string APPLICATION_NAME("APPNAME"); + static const string APPLICATION_VERSION("APPVERSION"); + + // ViewMap + static const string VIEWMAP_EXTENSION("vm"); + static const string VIEWMAP_MAGIC("ViewMap File"); + static const string VIEWMAP_VERSION("1.9"); + + // Style modules + static const string STYLE_MODULE_EXTENSION("py"); + static const string STYLE_MODULES_LIST_EXTENSION("sml"); + + // Options + static const string OPTIONS_DIR("." + APPLICATION_NAME); + static const string OPTIONS_FILE("options.xml"); + static const string OPTIONS_CURRENT_DIRS_FILE("current_dirs.xml"); + static const string OPTIONS_QGLVIEWER_FILE("qglviewer.xml"); + + // Default options + static const real DEFAULT_SPHERE_RADIUS = 1.0; + static const real DEFAULT_DKR_EPSILON = 0.0; + + // Papers + static const string DEFAULT_PAPER_TEXTURE("whitepaper.jpg"); + + +} // End of namepace Config + +#endif // APP_CONFIG_H diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp new file mode 100644 index 00000000000..78ab50a7c4d --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -0,0 +1,21 @@ +#include "Controller.h" +#include + +using namespace std; + +#ifdef __cplusplus +extern "C" { +#endif + + void FRS_execute() { + cout << "Freestyle" << endl; + + Controller *c = new Controller; + + //c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" ); + + } + +#ifdef __cplusplus +} +#endif From 8ef2f1d524d81bce565d08f647805e6084de54de Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 19 May 2008 13:15:07 +0000 Subject: [PATCH 105/430] soc-2008-mxcurioni: resolved uint issues (replaced with unsigned int). Still NOT linking --- SConstruct | 2 +- source/blender/freestyle/intern/image/ImagePyramid.cpp | 6 +++--- source/blender/freestyle/intern/system/PseudoNoise.cpp | 2 +- source/blender/freestyle/intern/system/StringUtils.cpp | 2 +- source/blender/imbuf/SConscript | 2 +- source/blender/render/SConscript | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SConstruct b/SConstruct index 341638c0e0c..69908045173 100644 --- a/SConstruct +++ b/SConstruct @@ -492,7 +492,7 @@ if env['WITH_BF_PLAYER']: Depends(blenderplayer,installtarget) if not env['WITH_BF_GAMEENGINE']: - blendernogame = env.Alias('blendernogame', B.program_list) + blendernogame = env.Alias('blendernogame', B.game) Depends(blendernogame,installtarget) Depends(nsiscmd, allinstall) diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index e3f84983055..542ab7917e3 100755 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -58,9 +58,9 @@ float ImagePyramid::pixel(int x, int y, int level){ if(0 == level){ return img->pixel(x,y); } - uint i = 1<>level; - uint sy = y>>level; + unsigned int i = 1<>level; + unsigned int sy = y>>level; if(sx >= img->width()) sx = img->width()-1; if(sy >= img->height()) diff --git a/source/blender/freestyle/intern/system/PseudoNoise.cpp b/source/blender/freestyle/intern/system/PseudoNoise.cpp index 4d62f967cde..87ee45e69b2 100755 --- a/source/blender/freestyle/intern/system/PseudoNoise.cpp +++ b/source/blender/freestyle/intern/system/PseudoNoise.cpp @@ -36,7 +36,7 @@ PseudoNoise::init (long seed) { _values = new real[NB_VALUE_NOISE]; RandGen::srand48(seed); - for (uint i=0; i Date: Fri, 23 May 2008 20:20:14 +0000 Subject: [PATCH 106/430] Commit of selfcollisions using new kdop design. Should result in nice speedup. --- source/blender/blenkernel/BKE_cloth.h | 3 +- source/blender/blenkernel/intern/cloth.c | 103 ++++++++++++++++++- source/blender/blenkernel/intern/collision.c | 75 +++++++++++++- source/blender/blenlib/intern/BLI_kdopbvh.c | 87 ++++++++++------ 4 files changed, 234 insertions(+), 34 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index f01ed6bbea4..6575b8b873b 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -106,7 +106,7 @@ typedef struct Cloth unsigned char pad2; short pad3; struct BVHTree *bvhtree; /* collision tree for this cloth object */ - struct RayTree *selftree; /* collision tree for this cloth object */ + struct BVHTree *bvhselftree; /* collision tree for this cloth object */ struct MFace *mfaces; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ struct Implicit_Data *implicitEM; /* our implicit solver connects to this pointer */ @@ -245,6 +245,7 @@ void cloth_update_normals ( ClothVertex *verts, int nVerts, MFace *face, int tot // needed for collision.c void bvhtree_update_from_cloth ( ClothModifierData *clmd, int moving ); +void bvhselftree_update_from_cloth ( ClothModifierData *clmd, int moving ); // needed for editmesh.c void cloth_write_cache ( Object *ob, ClothModifierData *clmd, float framenr ); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 6eb9f731056..916e3d6d3e8 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -189,6 +189,47 @@ void cloth_init ( ClothModifierData *clmd ) clmd->sim_parms->goalfrict = 0.0f; } +BVHTree *bvhselftree_build_from_cloth (ClothModifierData *clmd, float epsilon) +{ + int i; + BVHTree *bvhtree; + Cloth *cloth = clmd->clothObject; + ClothVertex *verts; + MFace *mfaces; + float co[12]; + + if(!clmd) + return NULL; + + cloth = clmd->clothObject; + + if(!cloth) + return NULL; + + verts = cloth->verts; + mfaces = cloth->mfaces; + + // in the moment, return zero if no faces there + if(!cloth->numfaces) + return NULL; + + // create quadtree with k=26 + bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 6); + + // fill tree + for(i = 0; i < cloth->numverts; i++, verts++) + { + VECCOPY(&co[0*3], verts->xold); + + BLI_bvhtree_insert(bvhtree, i, co, 1); + } + + // balance tree + BLI_bvhtree_balance(bvhtree); + + return bvhtree; +} + BVHTree *bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon) { int i; @@ -214,7 +255,7 @@ BVHTree *bvhtree_build_from_cloth (ClothModifierData *clmd, float epsilon) return NULL; // create quadtree with k=26 - bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 8, 6); + bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 26); // fill tree for(i = 0; i < cloth->numfaces; i++, mfaces++) @@ -289,6 +330,50 @@ void bvhtree_update_from_cloth(ClothModifierData *clmd, int moving) } } +void bvhselftree_update_from_cloth(ClothModifierData *clmd, int moving) +{ + unsigned int i = 0; + Cloth *cloth = clmd->clothObject; + BVHTree *bvhtree = cloth->bvhselftree; + ClothVertex *verts = cloth->verts; + MFace *mfaces; + float co[12], co_moving[12]; + int ret = 0; + + if(!bvhtree) + return; + + mfaces = cloth->mfaces; + + // update vertex position in bvh tree + if(verts && mfaces) + { + for(i = 0; i < cloth->numverts; i++, verts++) + { + VECCOPY(&co[0*3], verts->txold); + + // copy new locations into array + if(moving) + { + // update moving positions + VECCOPY(&co_moving[0*3], verts->tx); + + ret = BLI_bvhtree_update_node(bvhtree, i, co, co_moving, 1); + } + else + { + ret = BLI_bvhtree_update_node(bvhtree, i, co, NULL, 1); + } + + // check if tree is already full + if(!ret) + break; + } + + BLI_bvhtree_update_tree(bvhtree); + } +} + int modifiers_indexInObject(Object *ob, ModifierData *md_seek); int cloth_read_cache(Object *ob, ClothModifierData *clmd, float framenr) @@ -599,6 +684,9 @@ void cloth_free_modifier ( Object *ob, ClothModifierData *clmd ) // free BVH collision tree if ( cloth->bvhtree ) BLI_bvhtree_free ( cloth->bvhtree ); + + if ( cloth->bvhselftree ) + BLI_bvhtree_free ( cloth->bvhselftree ); // we save our faces for collision objects if ( cloth->mfaces ) @@ -669,6 +757,9 @@ void cloth_free_modifier_extern ( ClothModifierData *clmd ) // free BVH collision tree if ( cloth->bvhtree ) BLI_bvhtree_free ( cloth->bvhtree ); + + if ( cloth->bvhselftree ) + BLI_bvhtree_free ( cloth->bvhselftree ); // we save our faces for collision objects if ( cloth->mfaces ) @@ -807,6 +898,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d ClothVertex *verts = NULL; float tnull[3] = {0,0,0}; Cloth *cloth = NULL; + float maxdist = 0; // If we have a clothObject, free it. if ( clmd->clothObject != NULL ) @@ -876,7 +968,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // apply / set vertex groups // has to be happen before springs are build! cloth_apply_vgroup (clmd, dm); - + if ( !cloth_build_springs ( clmd, dm ) ) { @@ -904,6 +996,13 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d BENCH(clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon )); + for(i = 0; i < dm->getNumVerts(dm); i++) + { + maxdist = MAX2(maxdist, clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len*2.0)); + } + + clmd->clothObject->bvhselftree = bvhselftree_build_from_cloth ( clmd, maxdist ); + return 1; } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 1e8b8706658..4d49ccc9eb3 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1260,7 +1260,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) Cloth *cloth=NULL; Object *coll_ob=NULL; BVHTree *cloth_bvh=NULL; - long i=0, j = 0, numfaces = 0, numverts = 0; + long i=0, j = 0, k = 0, numfaces = 0, numverts = 0; unsigned int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; int ret = 0; @@ -1284,6 +1284,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) // update cloth bvh bvhtree_update_from_cloth ( clmd, 1 ); // 0 means STATIC, 1 means MOVING (see later in this function) + bvhselftree_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) do { @@ -1357,12 +1358,82 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) { - MFace *mface = clmd->clothObject->mfaces; + MFace *mface = cloth->mfaces; + BVHTreeOverlap *overlap = NULL; collisions = 1; verts = cloth->verts; // needed for openMP + numfaces = clmd->clothObject->numfaces; + numverts = clmd->clothObject->numverts; + verts = cloth->verts; + + if ( cloth->bvhselftree ) + { + /* search for overlapping collision pairs */ + overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); + + for ( k = 0; k < result; k++ ) + { + float temp[3]; + float length = 0; + float mindistance; + + i = overlap[k].indexA; + j = overlap[k].indexB; + + mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); + + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + { + continue; + } + } + + VECSUB ( temp, verts[i].tx, verts[j].tx ); + + if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; + + // check for adjacent points (i must be smaller j) + if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) + { + continue; + } + + length = Normalize ( temp ); + + if ( length < mindistance ) + { + float correction = mindistance - length; + + if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, -correction ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + } + else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, correction ); + VECADD ( verts[i].tx, verts[i].tx, temp ); + } + else + { + VecMulf ( temp, -correction*0.5 ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + + VECSUB ( verts[i].tx, verts[i].tx, temp ); + } + } + } + + if ( overlap ) + MEM_freeN ( overlap ); + + } /* for ( count = 0; count < clmd->coll_parms->self_loop_count; count++ ) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index b3f11039ce1..83afe258aad 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -80,12 +80,11 @@ #endif - typedef struct BVHNode { - struct BVHNode *children[8]; // max 8 children + struct BVHNode **children; // max 8 children struct BVHNode *parent; // needed for bottom - top update - float bv[26]; // Bounding volume of all nodes, max 13 axis + float *bv; // Bounding volume of all nodes, max 13 axis int index; /* face, edge, vertex index */ char totnode; // how many nodes are used, used for speedup char traversed; // how many nodes already traversed until this level? @@ -96,7 +95,9 @@ struct BVHTree { BVHNode **nodes; BVHNode *nodearray; /* pre-alloc branch nodes */ - float epsilon; /* epsilon is used for inflation of the k-dop */ + BVHNode **nodechild; // pre-alloc childs for nodes + float *nodebv; // pre-alloc bounding-volumes for nodes + float epsilon; /* epslion is used for inflation of the k-dop */ int totleaf; // leafs int totbranch; char tree_type; // type of tree (4 => quadtree) @@ -301,6 +302,8 @@ void BLI_bvhtree_free(BVHTree *tree) { MEM_freeN(tree->nodes); MEM_freeN(tree->nodearray); + MEM_freeN(tree->nodebv); + MEM_freeN(tree->nodechild); MEM_freeN(tree); } } @@ -318,27 +321,6 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis) if(tree) { - // calculate max number of branches, our bvh kdop is "almost perfect" - for(i = 1; i <= (int)ceil((float)((float)log(maxsize)/(float)log(tree_type))); i++) - numbranches += (pow(tree_type, i) / tree_type); - - tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *)*(numbranches+maxsize + tree_type), "BVHNodes"); - - if(!tree->nodes) - { - MEM_freeN(tree); - return NULL; - } - - tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode)*(numbranches+maxsize + tree_type), "BVHNodeArray"); - - if(!tree->nodearray) - { - MEM_freeN(tree); - MEM_freeN(tree->nodes); - return NULL; - } - tree->epsilon = epsilon; tree->tree_type = tree_type; tree->axis = axis; @@ -370,14 +352,62 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis) } else { - BLI_bvhtree_free(tree); + MEM_freeN(tree); return NULL; } + + + // calculate max number of branches, our bvh kdop is "almost perfect" + for(i = 1; i <= (int)ceil((float)((float)log(maxsize)/(float)log(tree_type))); i++) + numbranches += (pow(tree_type, i) / tree_type); + + tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *)*(numbranches+maxsize + tree_type), "BVHNodes"); + + if(!tree->nodes) + { + MEM_freeN(tree); + return NULL; + } + + tree->nodebv = (float*)MEM_callocN(sizeof(float)* axis * (numbranches+maxsize + tree_type), "BVHNodeBV"); + if(!tree->nodebv) + { + MEM_freeN(tree->nodes); + MEM_freeN(tree); + } + + tree->nodechild = (BVHNode**)MEM_callocN(sizeof(BVHNode*) * tree_type * (numbranches+maxsize + tree_type), "BVHNodeBV"); + if(!tree->nodechild) + { + MEM_freeN(tree->nodebv); + MEM_freeN(tree->nodes); + MEM_freeN(tree); + } + + tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode)*(numbranches+maxsize + tree_type), "BVHNodeArray"); + + if(!tree->nodearray) + { + MEM_freeN(tree->nodechild); + MEM_freeN(tree->nodebv); + MEM_freeN(tree->nodes); + MEM_freeN(tree); + return NULL; + } + + //link the dynamic bv and child links + for(i=0; i< numbranches+maxsize + tree_type; i++) + { + tree->nodearray[i].bv = tree->nodebv + i * axis; + tree->nodearray[i].children = tree->nodechild + i * tree_type; + } + } return tree; } + static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoints, int moving) { float newminmax; @@ -507,8 +537,6 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char { tend = start + slice; - partition_nth_element(tree->nodes, start, end, tend, laxis); - if(tend > end) tend = end; if(tend-start == 1) // ok, we have 1 left for this node @@ -521,7 +549,8 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char tnode = node->children[i] = tree->nodes[tree->totleaf + tree->totbranch] = &(tree->nodearray[tree->totbranch + tree->totleaf]); tree->totbranch++; tnode->parent = node; - + + partition_nth_element(tree->nodes, start, end, tend, laxis); refit_kdop_hull(tree, tnode, start, tend); bvh_div_nodes(tree, tnode, start, tend, laxis); } From fcea4573dde1ba64dffed2301447154647924b6a Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 25 May 2008 13:15:54 +0000 Subject: [PATCH 107/430] =?UTF-8?q?-=3D=3D=20Cloth=20/=20kdop=20=3D=3D-=20?= =?UTF-8?q?1.=20Bugfix=20for=20crash=20on=20enabling=20cloth=20on=20object?= =?UTF-8?q?=202.=20Correcting=20kdop=20nth=20element=20sorting=20function?= =?UTF-8?q?=20(fix=20provided=20by=20Andr=C3=A9=20Pinto)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/blenkernel/intern/cloth.c | 4 +-- source/blender/blenlib/intern/BLI_kdopbvh.c | 37 ++++++++++++--------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 916e3d6d3e8..55d89e5f0dd 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -210,11 +210,11 @@ BVHTree *bvhselftree_build_from_cloth (ClothModifierData *clmd, float epsilon) mfaces = cloth->mfaces; // in the moment, return zero if no faces there - if(!cloth->numfaces) + if(!cloth->numverts) return NULL; // create quadtree with k=26 - bvhtree = BLI_bvhtree_new(cloth->numfaces, epsilon, 4, 6); + bvhtree = BLI_bvhtree_new(cloth->numverts, epsilon, 4, 6); // fill tree for(i = 0; i < cloth->numverts; i++, verts++) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 83afe258aad..5c3849d1210 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -276,21 +276,22 @@ void sort_along_axis(BVHTree *tree, int start, int end, int axis) } //after a call to this function you can expect one of: -// every node to left of a[n] are smaller than it -// every node to the right of a[n-1] are greater than it -void partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis) -{ - int begin = _begin, end = _end; - while(begin < n && end >= n) - { - int mid = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end-1)/2, end-1, axis), axis ); - - if(mid >= n) - end = n-1; - else - begin = n+1; - } +// every node to left of a[n] are smaller or equal to it +// every node to the right of a[n] are greater or equal to it +int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis){ + int begin = _begin, end = _end, cut; + int i; + while(end-begin > 3) + { + cut = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end)/2, end-1, axis), axis ); + if(cut <= n) + begin = cut; + else + end = cut; + } + bvh_insertionsort(a, begin, end, axis); + return n; } @@ -550,7 +551,8 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char tree->totbranch++; tnode->parent = node; - partition_nth_element(tree->nodes, start, end, tend, laxis); + if(tend != end) + partition_nth_element(tree->nodes, start, end, tend, laxis); refit_kdop_hull(tree, tnode, start, tend); bvh_div_nodes(tree, tnode, start, tend, laxis); } @@ -707,7 +709,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) { int j, total = 0; BVHTreeOverlap *overlap = NULL, *to = NULL; - BVHOverlapData *data[tree1->tree_type]; + BVHOverlapData **data; // check for compatibility of both trees (can't compare 14-DOP with 18-DOP) if((tree1->axis != tree2->axis) && ((tree1->axis == 14) || tree2->axis == 14)) @@ -716,6 +718,8 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) // fast check root nodes for collision before doing big splitting + traversal if(!tree_overlap(tree1->nodes[tree1->totleaf]->bv, tree2->nodes[tree2->totleaf]->bv, MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis))) return 0; + + *data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star"); for(j = 0; j < tree1->tree_type; j++) { @@ -751,6 +755,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) free(data[j]->overlap); MEM_freeN(data[j]); } + MEM_freeN(*data); (*result) = total; return overlap; From 2666ff7075bfd9b5be349b55243697afbfc1967b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 25 May 2008 14:34:03 +0000 Subject: [PATCH 108/430] -== kdop ==- 1. fix crash on collision --- source/blender/blenlib/intern/BLI_kdopbvh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 5c3849d1210..cf326f3f460 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -719,7 +719,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) if(!tree_overlap(tree1->nodes[tree1->totleaf]->bv, tree2->nodes[tree2->totleaf]->bv, MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis))) return 0; - *data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star"); + data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star"); for(j = 0; j < tree1->tree_type; j++) { @@ -755,7 +755,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) free(data[j]->overlap); MEM_freeN(data[j]); } - MEM_freeN(*data); + MEM_freeN(data); (*result) = total; return overlap; From 8518e500d185e68f2c23015b835328e7c6564b13 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 25 May 2008 17:34:21 +0000 Subject: [PATCH 109/430] =?UTF-8?q?soc-2008-mxcurioni:=20Big=20update.=20F?= =?UTF-8?q?inally=20works=20(links=20and=20compiles).=20So=20far,=20the=20?= =?UTF-8?q?following=20steps=20work:=201.=20instantiates=20the=20config=20?= =?UTF-8?q?path,=20the=20controller=20and=20the=20view=202.=20sets=20the?= =?UTF-8?q?=20controller=E2=80=99s=20view=203.=20loads=20a=203ds=20file=20?= =?UTF-8?q?(right=20now=20a=20fixed=20file)=204.=20inserts=20a=20style=20m?= =?UTF-8?q?odule=20(right=20now,=20also=20fixed)=205.=20computes=20the=20v?= =?UTF-8?q?iew=20map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The next and final step is running the Python script. A lot of information are fixed and should be changed to test the following code: see source/blender/freestyle/app_blender/*.cpp and search for fixed paths (starting in /Users/). I am currently evaluating whether it's worth making Python run on its own environment (right now, the program crashes because of PyImport_AddModule) or whether it should use Blender's Python capabilities. Also, I need to figure out how to integrate the SWIG wrapper dynamic library into the current scheme. --- source/blender/freestyle/SConscript | 26 +- .../intern/app_blender/AppCanvas.cpp | 1 + .../intern/app_blender/AppConfig.cpp | 10 +- .../intern/app_blender/AppGLWidget.cpp | 32 +- .../intern/app_blender/AppGLWidget.h | 109 +- .../intern/app_blender/Controller.cpp | 11 +- .../freestyle/intern/app_blender/Controller.h | 4 + .../freestyle/intern/app_blender/api.cpp | 20 +- .../freestyle/intern/app_blender/camera.cpp | 1799 ++++++ .../freestyle/intern/app_blender/camera.h | 565 ++ .../freestyle/intern/app_blender/config.h | 50 + .../freestyle/intern/app_blender/constraint.h | 341 ++ .../freestyle/intern/app_blender/frame.cpp | 1070 ++++ .../freestyle/intern/app_blender/frame.h | 408 ++ .../app_blender/manipulatedCameraFrame.cpp | 86 + .../app_blender/manipulatedCameraFrame.h | 169 + .../intern/app_blender/manipulatedFrame.cpp | 116 + .../intern/app_blender/manipulatedFrame.h | 256 + .../app_blender/old_camera_vec_quaternion.txt | 593 ++ .../freestyle/intern/app_blender/point.h | 159 + .../intern/app_blender/quaternion.cpp | 502 ++ .../freestyle/intern/app_blender/quaternion.h | 304 + .../freestyle/intern/app_blender/vec.cpp | 75 + .../freestyle/intern/app_blender/vec.h | 366 ++ .../intern/rendering/GLStrokeRenderer.cpp | 4 + .../intern/stroke/BasicStrokeShaders.cpp | 2 + .../freestyle/intern/stroke/Canvas.cpp | 3 + .../freestyle/intern/system/StringUtils.h | 2 + .../intern/view_map/SteerableViewMap.cpp | 3 + source/blender/freestyle/python/Freestyle.py | 4961 +++++++++++++++++ 30 files changed, 11954 insertions(+), 93 deletions(-) create mode 100644 source/blender/freestyle/intern/app_blender/camera.cpp create mode 100644 source/blender/freestyle/intern/app_blender/camera.h create mode 100644 source/blender/freestyle/intern/app_blender/config.h create mode 100644 source/blender/freestyle/intern/app_blender/constraint.h create mode 100644 source/blender/freestyle/intern/app_blender/frame.cpp create mode 100644 source/blender/freestyle/intern/app_blender/frame.h create mode 100644 source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp create mode 100644 source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h create mode 100644 source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp create mode 100644 source/blender/freestyle/intern/app_blender/manipulatedFrame.h create mode 100644 source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt create mode 100644 source/blender/freestyle/intern/app_blender/point.h create mode 100644 source/blender/freestyle/intern/app_blender/quaternion.cpp create mode 100644 source/blender/freestyle/intern/app_blender/quaternion.h create mode 100644 source/blender/freestyle/intern/app_blender/vec.cpp create mode 100644 source/blender/freestyle/intern/app_blender/vec.h create mode 100755 source/blender/freestyle/python/Freestyle.py diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 31a43bac58c..97b7d4cf9f2 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -55,9 +55,14 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): prefix = 'intern/app_blender' app_sources = env.Glob(prefix + '/*.cpp') +# swig wrapper +#prefix = 'intern/swig' +#swig_sources = env.Glob(prefix + '/*.cpp') +swig_sources = [] + sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ + winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \ - + app_sources + + app_sources + swig_sources env.BlenderLib (libname="bf_freestyle", sources=sources, @@ -70,4 +75,21 @@ env.BlenderLib (libname="bf_freestyle", ######################################################## # SWIG ######################################################## -# swig \ No newline at end of file +# swig + +# swig -c++ -python -o ModuleWrapper.cpp Freestyle.i +# +# g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -c ModuleWrapper.cpp -o ModuleWrapper.o +# +# install -d ../../build/macosx/release/lib/python +# +# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../build/macosx/release/lib/python/_Freestyle.so ModuleWrapper.o +# +# install Freestyle.py ../../build/macosx/release/lib/python + + +#================ MINE + +# g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o +# +# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../python/_Freestyle.so ModuleWrapper.o \ No newline at end of file diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp index c9ea2d1391d..5125bf5f70b 100755 --- a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -29,6 +29,7 @@ #include "../rendering/GLStrokeRenderer.h" #include "../rendering/GLUtils.h" #include "AppConfig.h" + #include "../system/StringUtils.h" #ifdef WIN32 diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.cpp b/source/blender/freestyle/intern/app_blender/AppConfig.cpp index baa847322d6..de4b71c5241 100755 --- a/source/blender/freestyle/intern/app_blender/AppConfig.cpp +++ b/source/blender/freestyle/intern/app_blender/AppConfig.cpp @@ -31,8 +31,12 @@ namespace Config{ // get the home directory _HomeDir = getEnvVar("HOME"); // get the root directory - setRootDir(getEnvVar("FREESTYLE_DIR")); - //setRootDir(QString(".")); + //soc + //setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR")); + setRootDir("/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle"); + cout << _PythonPath << endl; + +//setRootDir(QString(".")); _pInstance = this; } void Path::setRootDir(const string& iRootDir){ @@ -59,7 +63,7 @@ namespace Config{ "python" + string(PATH_SEP.c_str()) + _ProjectDir + - string(DIR_SEP.c_str()) + + string(DIR_SEP.c_str()) + "style_modules" + string(DIR_SEP.c_str()) ; if (getenv("PYTHONPATH")) { diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 44e25ee1321..18e9639342d 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -36,9 +36,12 @@ #include "AppConfig.h" #include "../system/StringUtils.h" + +extern "C" { #include "BLI_blenlib.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +} // glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005 #ifdef __MACH__ @@ -54,6 +57,9 @@ bool AppGLWidget::_backBufferFlag = true; AppGLWidget::AppGLWidget(const char *iName) { + //soc + _camera = new Camera; + _Fovy = 30.f; //_SceneDepth = 2.f; _RenderStyle = LINE; @@ -146,8 +152,6 @@ AppGLWidget::AppGLWidget(const char *iName) // _backBufferFlag = true; _record = false; -_camera = new Camera; - } AppGLWidget::~AppGLWidget() @@ -609,3 +613,27 @@ bool AppGLWidget::getBackBufferFlag() { // delete [] colorPixels; //} + +//******************************* +// COPIED FROM LIBQGLVIEWER +//******************************* + + // inherited + void AppGLWidget::swapBuffers() {} + + //Updates the display. Do not call draw() directly, use this method instead. + void AppGLWidget::updateGL() {} + + //Makes this widget's rendering context the current OpenGL rendering context. Useful with several viewers + void AppGLWidget::makeCurrent() {} + + + // not-inherited + + // Convenient way to call setSceneCenter() and setSceneRadius() from a (world axis aligned) bounding box of the scene. + void AppGLWidget::setSceneBoundingBox(const Vec& min, const Vec& max) { _camera->setSceneBoundingBox(min,max); } + + void AppGLWidget::saveSnapshot(bool b) {} + + void AppGLWidget::setStateFileName(const string& name) { stateFileName_ = name; }; + diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 0d10049ee15..492fafc883a 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -47,6 +47,11 @@ using namespace std; # include "../rendering/GLDebugRenderer.h" //# include +//soc +#include "camera.h" +#include "vec.h" +#include "quaternion.h" + using namespace Geometry; typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; @@ -58,75 +63,9 @@ class GLSelectRenderer; class GLBBoxRenderer; class GLMonoColorRenderer; class GLDebugRenderer; - -class Vec{ -public: - Vec() {}; - Vec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {}; - ~Vec() {} - - float operator[] (unsigned i) { - switch(i){ - case 0: return x; break; - case 1: return y; break; - case 2: return z; break; - } - return 0.0; - } - - - float x,y,z; -}; - -class Quaternion{ -public: - Quaternion( float _x, float _y, float _z, float _s): x(_x), y(_y), z(_z), s(_s){}; - ~Quaternion() {} - - float operator[] (unsigned i) { - switch(i){ - case 0: return x; break; - case 1: return y; break; - case 2: return z; break; - case 3: return s; break; - } - return 0.0; - } - - float x,y,z,s; -}; - -class Camera { - private: - float _position[3]; - float _orientation[3]; - - public: - Camera(){}; - ~Camera() {}; - - void setZNearCoefficient(float f) {} - void playPath(int i) {} - - void loadProjectionMatrix() {} - void loadModelViewMatrix() {} - real distanceToSceneCenter() { return 0;} - void showEntireScene() {} - real zFar() {return 0;} - real zNear() {return 0;} - void setPosition(Vec v) {} - void setOrientation(Quaternion q) {} - float* position() { return _position; } - float* orientation() { return _orientation; } - void getWorldCoordinatesOf(float *src, float *vp_tmp) {} - -}; - - -//class AppGLWidget : public QGLViewer + class AppGLWidget { - //Q_OBJECT public: @@ -136,17 +75,27 @@ public: public: - inline void swapBuffers() {} - inline void updateGL() {} - inline void makeCurrent() {} - inline void setSceneBoundingBox(Vec &min_, Vec &max_) {} - inline void saveSnapshot(bool b) {} - inline real width() { return _width; } - inline real height() { return _height; } - void setStateFileName(const string& name) { stateFileName_ = name; }; + //inherited + inline real width() { return _width; } + inline real height() { return _height; } + void swapBuffers(); + void updateGL(); + void makeCurrent(); + // not-inherited + void setSceneBoundingBox(const Vec& min, const Vec& max); + void saveSnapshot(bool b); + void setStateFileName(const string& name); -Camera * _camera; + + Camera * _camera; + +protected: + real _width, _height; + Vec _min,_max; + string stateFileName_; + +public: // captures a frame animation that was previously registered void captureMovie(); @@ -452,8 +401,8 @@ Camera * _camera; } void getCameraState(float* position, float* orientation) const { - float* pos = _camera->position(); - float* orient = _camera->orientation(); + Vec pos = _camera->position(); + Quaternion orient = _camera->orientation(); int i; for(i=0;i<3;++i){ position[i] = pos[i]; @@ -585,9 +534,7 @@ protected: bool _record; -real _width, _height; -Vec _min,_max; -string stateFileName_; + }; #endif // ARTGLWIDGET_H diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index edc1b7f663a..9401f1ae281 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -67,9 +67,9 @@ Controller::Controller() { + const string sep(Config::DIR_SEP.c_str()); - const string filename = Config::Path::getInstance()->getHomeDir() + sep + - Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; + //const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + sep + Config::OPTIONS_CURRENT_DIRS_FILE; //_current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true); _RootNode = new NodeGroup; @@ -88,6 +88,7 @@ Controller::Controller() _edgeTesselationNature = (Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE); + _ProgressBar = new ProgressBar; _SceneNumFaces = 0; _minEdgeSize = DBL_MAX; _bboxDiag = 0; @@ -180,9 +181,12 @@ int Controller::Load3DSFile(const char *iFileName) NodeGroup *maxScene = loader3DS.Load(); if (maxScene == NULL) { + cout << "Cannot load scene" << endl; return 1; } + cout << "Scene loaded\n" << endl; + printf("Mesh cleaning : %lf\n", _Chrono.stop()); _SceneNumFaces += loader3DS.numFacesRead(); @@ -199,13 +203,14 @@ int Controller::Load3DSFile(const char *iFileName) // DEBUG // ScenePrettyPrinter spp; // maxScene->accept(spp); - + _RootNode->AddChild(maxScene); _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox _pView->SetModel(_RootNode); _pView->FitBBox(); + _Chrono.start(); diff --git a/source/blender/freestyle/intern/app_blender/Controller.h b/source/blender/freestyle/intern/app_blender/Controller.h index 55ef1968129..5727db5705a 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.h +++ b/source/blender/freestyle/intern/app_blender/Controller.h @@ -36,6 +36,7 @@ # include "../geometry/HashGrid.h" # include "../view_map/ViewMapBuilder.h" # include "../system/TimeUtils.h" +# include "../system/ProgressBar.h" # include "../system/Precision.h" # include "../system/Interpreter.h" # include "../view_map/FEdgeXDetector.h" @@ -172,6 +173,9 @@ private: // Chronometer: Chronometer _Chrono; + // Progress Bar + ProgressBar *_ProgressBar; + // edges tesselation nature int _edgeTesselationNature; diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 78ab50a7c4d..0601ce191f9 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -1,4 +1,8 @@ + +#include "AppGLWidget.h" #include "Controller.h" +#include "AppConfig.h" + #include using namespace std; @@ -8,11 +12,23 @@ extern "C" { #endif void FRS_execute() { - cout << "Freestyle" << endl; + cout << "Freestyle start" << endl; + Config::Path pathconfig; Controller *c = new Controller; + AppGLWidget *view = new AppGLWidget; + + c->SetView(view); - //c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" ); + c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" ); + + c->InsertStyleModule( 0, "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" ); + c->toggleLayer(0, true); + c->ComputeViewMap(); + + //c->DrawStrokes(); + + cout << "Freestyle end" << endl; } diff --git a/source/blender/freestyle/intern/app_blender/camera.cpp b/source/blender/freestyle/intern/app_blender/camera.cpp new file mode 100644 index 00000000000..25af0550e6c --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/camera.cpp @@ -0,0 +1,1799 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "camera.h" +//#include "qglviewer.h" + +using namespace std; +//using namespace qglviewer; + +/*! Default constructor. + + sceneCenter() is set to (0,0,0) and sceneRadius() is set to 1.0. type() is Camera::PERSPECTIVE, + with a \c M_PI/4 fieldOfView(). + + See IODistance(), physicalDistanceToScreen(), physicalScreenWidth() and focusDistance() + documentations for default stereo parameter values. */ +Camera::Camera() + : fieldOfView_(M_PI/4.0f) +{ + // #CONNECTION# Camera copy constructor + //interpolationKfi_ = new KeyFrameInterpolator; + // Requires the interpolationKfi_ + setFrame(new ManipulatedCameraFrame()); + + // #CONNECTION# All these default values identical in initFromDOMElement. + + // Requires fieldOfView() to define focusDistance() + setSceneRadius(1.0); + + // Initial value (only scaled after this) + orthoCoef_ = tan(fieldOfView()/2.0); + + // Also defines the revolveAroundPoint(), which changes orthoCoef_. Requires a frame(). + setSceneCenter(Vec(0.0, 0.0, 0.0)); + + // Requires fieldOfView() when called with ORTHOGRAPHIC. Attention to projectionMatrix_ below. + setType(PERSPECTIVE); + + // #CONNECTION# initFromDOMElement default values + setZNearCoefficient(0.005f); + setZClippingCoefficient(sqrt(3.0)); + + // Dummy values + setScreenWidthAndHeight(600, 400); + + // Stereo parameters + setIODistance(0.062f); + setPhysicalDistanceToScreen(0.5f); + setPhysicalScreenWidth(0.4f); + // focusDistance is set from setFieldOfView() + + // #CONNECTION# Camera copy constructor + for (unsigned short j=0; j<16; ++j) + { + modelViewMatrix_[j] = ((j%5 == 0) ? 1.0 : 0.0); + // #CONNECTION# computeProjectionMatrix() is lazy and assumes 0.0 almost everywhere. + projectionMatrix_[j] = 0.0; + } + computeProjectionMatrix(); +} + +/*! Virtual destructor. + + The frame() is deleted, but the different keyFrameInterpolator() are \e not deleted (in case they + are shared). */ +Camera::~Camera() +{ + delete frame_; + //delete interpolationKfi_; +} + + +/*! Copy constructor. Performs a deep copy using operator=(). */ +Camera::Camera(const Camera& camera) +{ + // #CONNECTION# Camera constructor + //interpolationKfi_ = new KeyFrameInterpolator; + // Requires the interpolationKfi_ + setFrame(new ManipulatedCameraFrame()); + + for (unsigned short j=0; j<16; ++j) + { + modelViewMatrix_[j] = ((j%5 == 0) ? 1.0 : 0.0); + // #CONNECTION# computeProjectionMatrix() is lazy and assumes 0.0 almost everywhere. + projectionMatrix_[j] = 0.0; + } + + (*this)=camera; +} + +/*! Equal operator. + + All the parameters of \p camera are copied. The frame() pointer is not modified, but its + Frame::position() and Frame::orientation() are set to those of \p camera. + + \attention The Camera screenWidth() and screenHeight() are set to those of \p camera. If your + Camera is associated with a QGLViewer, you should update these value after the call to this method: + \code + *(camera()) = otherCamera; + camera()->setScreenWidthAndHeight(width(), height()); + \endcode + The same applies to sceneCenter() and sceneRadius(), if needed. */ +Camera& Camera::operator=(const Camera& camera) +{ + setScreenWidthAndHeight(camera.screenWidth(), camera.screenHeight()); + setFieldOfView(camera.fieldOfView()); + setSceneRadius(camera.sceneRadius()); + setSceneCenter(camera.sceneCenter()); + setZNearCoefficient(camera.zNearCoefficient()); + setZClippingCoefficient(camera.zClippingCoefficient()); + setType(camera.type()); + + // Stereo parameters + setIODistance(camera.IODistance()); + setFocusDistance(camera.focusDistance()); + setPhysicalScreenWidth(camera.physicalScreenWidth()); + setPhysicalDistanceToScreen(camera.physicalDistanceToScreen()); + + orthoCoef_ = camera.orthoCoef_; + + // frame_ and interpolationKfi_ pointers are not shared. + frame_->setReferenceFrame(NULL); + frame_->setPosition(camera.position()); + frame_->setOrientation(camera.orientation()); + + //interpolationKfi_->resetInterpolation(); + + //kfi_ = camera.kfi_; + + computeProjectionMatrix(); + computeModelViewMatrix(); + + return *this; +} + +/*! Sets Camera screenWidth() and screenHeight() (expressed in pixels). + +You should not call this method when the Camera is associated with a QGLViewer, since the +latter automatically updates these values when it is resized (hence overwritting your values). + +Non-positive dimension are silently replaced by a 1 pixel value to ensure frustrum coherence. + +If your Camera is used without a QGLViewer (offscreen rendering, shadow maps), use setAspectRatio() +instead to define the projection matrix. */ +void Camera::setScreenWidthAndHeight(int width, int height) +{ + // Prevent negative and zero dimensions that would cause divisions by zero. + screenWidth_ = width > 0 ? width : 1; + screenHeight_ = height > 0 ? height : 1; +} + +/*! Returns the near clipping plane distance used by the Camera projection matrix. + + The clipping planes' positions depend on the sceneRadius() and sceneCenter() rather than being fixed + small-enough and large-enough values. A good scene dimension approximation will hence result in an + optimal precision of the z-buffer. + + The near clipping plane is positioned at a distance equal to zClippingCoefficient() * sceneRadius() + in front of the sceneCenter(): + \code + zNear = distanceToSceneCenter() - zClippingCoefficient()*sceneRadius(); + \endcode + + In order to prevent negative or too small zNear() values (which would degrade the z precision), + zNearCoefficient() is used when the Camera is inside the sceneRadius() sphere: + \code + const float zMin = zNearCoefficient() * zClippingCoefficient() * sceneRadius(); + if (zNear < zMin) + zNear = zMin; + // With an ORTHOGRAPHIC type, the value is simply clamped to 0.0 + \endcode + + See also the zFar(), zClippingCoefficient() and zNearCoefficient() documentations. + + If you need a completely different zNear computation, overload the zNear() and zFar() methods in a + new class that publicly inherits from Camera and use QGLViewer::setCamera(): + \code + class myCamera :: public qglviewer::Camera + { + virtual float Camera::zNear() const { return 0.001; }; + virtual float Camera::zFar() const { return 100.0; }; + } + \endcode + + See the standardCamera example for an application. + + \attention The value is always positive although the clipping plane is positioned at a negative z + value in the Camera coordinate system. This follows the \c gluPerspective standard. */ +float Camera::zNear() const +{ + float z = distanceToSceneCenter() - zClippingCoefficient()*sceneRadius(); + + // Prevents negative or null zNear values. + const float zMin = zNearCoefficient() * zClippingCoefficient() * sceneRadius(); + if (z < zMin) + switch (type()) + { + case Camera::PERSPECTIVE : z = zMin; break; + case Camera::ORTHOGRAPHIC : z = 0.0; break; + } + return z; +} + +/*! Returns the far clipping plane distance used by the Camera projection matrix. + +The far clipping plane is positioned at a distance equal to zClippingCoefficient() * sceneRadius() +behind the sceneCenter(): +\code +zFar = distanceToSceneCenter() + zClippingCoefficient()*sceneRadius(); +\endcode + +See the zNear() documentation for details. */ +float Camera::zFar() const +{ + return distanceToSceneCenter() + zClippingCoefficient()*sceneRadius(); +} + +/*! Defines the Camera type(). + +Prefix the type with Camera, as in: \code camera()->setType(Camera::ORTHOGRAPHIC); // or even +qglviewer::Camera::ORTHOGRAPHIC if you do not use namespace \endcode */ +void Camera::setType(Type type) +{ + // make ORTHOGRAPHIC frustum fit PERSPECTIVE (at least in plane normal to viewDirection(), passing + // through RAP) Done only when CHANGING type since orthoCoef_ may have been changed with a + // setRevolveAroundPoint() in the meantime. + if ( (type == Camera::ORTHOGRAPHIC) && (type_ == Camera::PERSPECTIVE) ) + orthoCoef_ = tan(fieldOfView()/2.0); + type_ = type; +} + +/*! Sets the Camera frame(). + +If you want to move the Camera, use setPosition() and setOrientation() or one of the Camera +positioning methods (lookAt(), fitSphere(), showEntireScene()...) instead. + +If you want to save the Camera position(), there's no need to call this method either. Use +addKeyFrameToPath() and playPath() instead. + +This method is actually mainly useful if you derive the ManipulatedCameraFrame class and want to +use an instance of your new class to move the Camera. + +A \c NULL \p mcf pointer will silently be ignored. The calling method is responsible for +deleting the previous frame() pointer if needed in order to prevent memory leaks. */ +void Camera::setFrame(ManipulatedCameraFrame* const mcf) +{ + if (!mcf) + return; + + frame_ = mcf; + //interpolationKfi_->setFrame(frame()); +} + +/*! Returns the distance from the Camera center to sceneCenter(), projected along the Camera Z axis. + Used by zNear() and zFar() to optimize the Z range. */ +float Camera::distanceToSceneCenter() const +{ + return fabs((frame()->coordinatesOf(sceneCenter())).z); +} + + +/*! Returns the \p halfWidth and \p halfHeight of the Camera orthographic frustum. + + These values are only valid and used when the Camera is of type() Camera::ORTHOGRAPHIC. They are + expressed in OpenGL units and are used by loadProjectionMatrix() to define the projection matrix + using: + \code + glOrtho( -halfWidth, halfWidth, -halfHeight, halfHeight, zNear(), zFar() ) + \endcode + + These values are proportional to the Camera (z projected) distance to the revolveAroundPoint(). + When zooming on the object, the Camera is translated forward \e and its frustum is narrowed, making + the object appear bigger on screen, as intuitively expected. + + Overload this method to change this behavior if desired, as is done in the + standardCamera example. */ +void Camera::getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight) const +{ + const float dist = orthoCoef_ * fabs(cameraCoordinatesOf(revolveAroundPoint()).z); + //#CONNECTION# fitScreenRegion + halfWidth = dist * ((aspectRatio() < 1.0) ? 1.0 : aspectRatio()); + halfHeight = dist * ((aspectRatio() < 1.0) ? 1.0/aspectRatio() : 1.0); +} + + +/*! Computes the projection matrix associated with the Camera. + + If type() is Camera::PERSPECTIVE, defines a \c GL_PROJECTION matrix similar to what would \c + gluPerspective() do using the fieldOfView(), window aspectRatio(), zNear() and zFar() parameters. + + If type() is Camera::ORTHOGRAPHIC, the projection matrix is as what \c glOrtho() would do. + Frustum's width and height are set using getOrthoWidthHeight(). + + Both types use zNear() and zFar() to place clipping planes. These values are determined from + sceneRadius() and sceneCenter() so that they best fit the scene size. + + Use getProjectionMatrix() to retrieve this matrix. Overload loadProjectionMatrix() if you want your + Camera to use an exotic projection matrix. + + \note You must call this method if your Camera is not associated with a QGLViewer and is used for + offscreen computations (using (un)projectedCoordinatesOf() for instance). loadProjectionMatrix() + does it otherwise. */ +void Camera::computeProjectionMatrix() const +{ + const float ZNear = zNear(); + const float ZFar = zFar(); + + switch (type()) + { + case Camera::PERSPECTIVE: + { + // #CONNECTION# all non null coefficients were set to 0.0 in constructor. + const float f = 1.0/tan(fieldOfView()/2.0); + projectionMatrix_[0] = f/aspectRatio(); + projectionMatrix_[5] = f; + projectionMatrix_[10] = (ZNear + ZFar) / (ZNear - ZFar); + projectionMatrix_[11] = -1.0; + projectionMatrix_[14] = 2.0 * ZNear * ZFar / (ZNear - ZFar); + projectionMatrix_[15] = 0.0; + // same as gluPerspective( 180.0*fieldOfView()/M_PI, aspectRatio(), zNear(), zFar() ); + break; + } + case Camera::ORTHOGRAPHIC: + { + GLdouble w, h; + getOrthoWidthHeight(w,h); + projectionMatrix_[0] = 1.0/w; + projectionMatrix_[5] = 1.0/h; + projectionMatrix_[10] = -2.0/(ZFar - ZNear); + projectionMatrix_[11] = 0.0; + projectionMatrix_[14] = -(ZFar + ZNear)/(ZFar - ZNear); + projectionMatrix_[15] = 1.0; + // same as glOrtho( -w, w, -h, h, zNear(), zFar() ); + break; + } + } +} + +/*! Computes the modelView matrix associated with the Camera's position() and orientation(). + + This matrix converts from the world coordinates system to the Camera coordinates system, so that + coordinates can then be projected on screen using the projection matrix (see computeProjectionMatrix()). + + Use getModelViewMatrix() to retrieve this matrix. + + \note You must call this method if your Camera is not associated with a QGLViewer and is used for + offscreen computations (using (un)projectedCoordinatesOf() for instance). loadModelViewMatrix() + does it otherwise. */ +void Camera::computeModelViewMatrix() const +{ + const Quaternion q = frame()->orientation(); + + const double q00 = 2.0l * q[0] * q[0]; + const double q11 = 2.0l * q[1] * q[1]; + const double q22 = 2.0l * q[2] * q[2]; + + const double q01 = 2.0l * q[0] * q[1]; + const double q02 = 2.0l * q[0] * q[2]; + const double q03 = 2.0l * q[0] * q[3]; + + const double q12 = 2.0l * q[1] * q[2]; + const double q13 = 2.0l * q[1] * q[3]; + + const double q23 = 2.0l * q[2] * q[3]; + + modelViewMatrix_[0] = 1.0l - q11 - q22; + modelViewMatrix_[1] = q01 - q23; + modelViewMatrix_[2] = q02 + q13; + modelViewMatrix_[3] = 0.0l; + + modelViewMatrix_[4] = q01 + q23; + modelViewMatrix_[5] = 1.0l - q22 - q00; + modelViewMatrix_[6] = q12 - q03; + modelViewMatrix_[7] = 0.0l; + + modelViewMatrix_[8] = q02 - q13; + modelViewMatrix_[9] = q12 + q03; + modelViewMatrix_[10] = 1.0l - q11 - q00; + modelViewMatrix_[11] = 0.0l; + + const Vec t = q.inverseRotate(frame()->position()); + + modelViewMatrix_[12] = -t.x; + modelViewMatrix_[13] = -t.y; + modelViewMatrix_[14] = -t.z; + modelViewMatrix_[15] = 1.0l; +} + + +/*! Loads the OpenGL \c GL_PROJECTION matrix with the Camera projection matrix. + + The Camera projection matrix is computed using computeProjectionMatrix(). + + When \p reset is \c true (default), the method clears the previous projection matrix by calling \c + glLoadIdentity before setting the matrix. Setting \p reset to \c false is useful for \c GL_SELECT + mode, to combine the pushed matrix with a picking matrix. See QGLViewer::beginSelection() for details. + + This method is used by QGLViewer::preDraw() (called before user's QGLViewer::draw() method) to + set the \c GL_PROJECTION matrix according to the viewer's QGLViewer::camera() settings. + + Use getProjectionMatrix() to retrieve this matrix. Overload this method if you want your Camera to + use an exotic projection matrix. See also loadModelViewMatrix(). + + \attention \c glMatrixMode is set to \c GL_PROJECTION. + + \attention If you use several OpenGL contexts and bypass the Qt main refresh loop, you should call + QGLWidget::makeCurrent() before this method in order to activate the right OpenGL context. */ +void Camera::loadProjectionMatrix(bool reset) const +{ + // WARNING: makeCurrent must be called by every calling method + glMatrixMode(GL_PROJECTION); + + if (reset) + glLoadIdentity(); + + computeProjectionMatrix(); + + glMultMatrixd(projectionMatrix_); +} + +/*! Loads the OpenGL \c GL_MODELVIEW matrix with the modelView matrix corresponding to the Camera. + + Calls computeModelViewMatrix() to compute the Camera's modelView matrix. + + This method is used by QGLViewer::preDraw() (called before user's QGLViewer::draw() method) to + set the \c GL_MODELVIEW matrix according to the viewer's QGLViewer::camera() position() and + orientation(). + + As a result, the vertices used in QGLViewer::draw() can be defined in the so called world + coordinate system. They are multiplied by this matrix to get converted to the Camera coordinate + system, before getting projected using the \c GL_PROJECTION matrix (see loadProjectionMatrix()). + + When \p reset is \c true (default), the method loads (overwrites) the \c GL_MODELVIEW matrix. Setting + \p reset to \c false simply calls \c glMultMatrixd (might be useful for some applications). + + Overload this method or simply call glLoadMatrixd() at the beginning of QGLViewer::draw() if you + want your Camera to use an exotic modelView matrix. See also loadProjectionMatrix(). + + getModelViewMatrix() returns the 4x4 modelView matrix. + + \attention glMatrixMode is set to \c GL_MODELVIEW + + \attention If you use several OpenGL contexts and bypass the Qt main refresh loop, you should call + QGLWidget::makeCurrent() before this method in order to activate the right OpenGL context. */ +void Camera::loadModelViewMatrix(bool reset) const +{ + // WARNING: makeCurrent must be called by every calling method + glMatrixMode(GL_MODELVIEW); + computeModelViewMatrix(); + if (reset) + glLoadMatrixd(modelViewMatrix_); + else + glMultMatrixd(modelViewMatrix_); +} + +/*! Same as loadProjectionMatrix() but for a stereo setup. + + Only the Camera::PERSPECTIVE type() is supported for stereo mode. See + QGLViewer::setStereoDisplay(). + + Uses focusDistance(), IODistance(), and physicalScreenWidth() to compute cameras + offset and asymmetric frustums. + + When \p leftBuffer is \c true, computes the projection matrix associated to the left eye (right eye + otherwise). See also loadModelViewMatrixStereo(). + + See the stereoViewer and the anaglyph examples for an illustration. + + To retrieve this matrix, use a code like: + \code + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + loadProjectionMatrixStereo(left_or_right); + glGetFloatv(GL_PROJECTION_MATRIX, m); + glPopMatrix(); + \endcode + Note that getProjectionMatrix() always returns the mono-vision matrix. + + \attention glMatrixMode is set to \c GL_PROJECTION. */ +void Camera::loadProjectionMatrixStereo(bool leftBuffer) const +{ + float left, right, bottom, top; + float screenHalfWidth, halfWidth, side, shift, delta; + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + switch (type()) + { + case Camera::PERSPECTIVE: + // compute half width of screen, + // corresponding to zero parallax plane to deduce decay of cameras + screenHalfWidth = focusDistance() * tan(horizontalFieldOfView() / 2.0); + shift = screenHalfWidth * IODistance() / physicalScreenWidth(); + // should be * current y / y total + // to take into account that the window doesn't cover the entire screen + + // compute half width of "view" at znear and the delta corresponding to + // the shifted camera to deduce what to set for asymmetric frustums + halfWidth = zNear() * tan(horizontalFieldOfView() / 2.0); + delta = shift * zNear() / focusDistance(); + side = leftBuffer ? -1.0 : 1.0; + + left = -halfWidth + side * delta; + right = halfWidth + side * delta; + top = halfWidth / aspectRatio(); + bottom = -top; + glFrustum(left, right, bottom, top, zNear(), zFar() ); + break; + + case Camera::ORTHOGRAPHIC: + cout << "Camera::setProjectionMatrixStereo: Stereo not available with Ortho mode"; + break; + } +} + +/*! Same as loadModelViewMatrix() but for a stereo setup. + + Only the Camera::PERSPECTIVE type() is supported for stereo mode. See + QGLViewer::setStereoDisplay(). + + The modelView matrix is almost identical to the mono-vision one. It is simply translated along its + horizontal axis by a value that depends on stereo parameters (see focusDistance(), + IODistance(), and physicalScreenWidth()). + + When \p leftBuffer is \c true, computes the modelView matrix associated to the left eye (right eye + otherwise). + + loadProjectionMatrixStereo() explains how to retrieve to resulting matrix. + + See the stereoViewer and the anaglyph examples for an illustration. + + \attention glMatrixMode is set to \c GL_MODELVIEW. */ +void Camera::loadModelViewMatrixStereo(bool leftBuffer) const +{ + // WARNING: makeCurrent must be called by every calling method + glMatrixMode(GL_MODELVIEW); + + float halfWidth = focusDistance() * tan(horizontalFieldOfView() / 2.0); + float shift = halfWidth * IODistance() / physicalScreenWidth(); // * current window width / full screen width + + computeModelViewMatrix(); + if (leftBuffer) + modelViewMatrix_[12] -= shift; + else + modelViewMatrix_[12] += shift; + glLoadMatrixd(modelViewMatrix_); +} + +/*! Fills \p m with the Camera projection matrix values. + + Calls computeProjectionMatrix() to define the Camera projection matrix. + + This matrix only reflects the Camera's internal parameters and it may differ from the \c + GL_PROJECTION matrix retrieved using \c glGetDoublev(GL_PROJECTION_MATRIX, m). It actually + represents the state of the \c GL_PROJECTION after QGLViewer::preDraw(), at the beginning of + QGLViewer::draw(). If you modified the \c GL_PROJECTION matrix (for instance using + QGLViewer::startScreenCoordinatesSystem()), the two results differ. + + The result is an OpenGL 4x4 matrix, which is given in \e column-major order (see \c glMultMatrix + man page for details). + + See also getModelViewMatrix() and setFromProjectionMatrix(). */ +void Camera::getProjectionMatrix(GLdouble m[16]) const +{ + // May not be needed, but easier and more robust like this. + computeProjectionMatrix(); + for (unsigned short i=0; i<16; ++i) + m[i] = projectionMatrix_[i]; +} + +/*! Fills \p m with the Camera modelView matrix values. + + First calls computeModelViewMatrix() to define the Camera modelView matrix. + + Note that this matrix is usually \e not the one you would get from a \c + glGetDoublev(GL_MODELVIEW_MATRIX, m). It actually represents the state of the \c + GL_MODELVIEW after QGLViewer::preDraw(), at the beginning of QGLViewer::draw(). It converts from + the world to the Camera coordinate system. As soon as you modify the \c GL_MODELVIEW in your + QGLViewer::draw() method, the two matrices differ. + + The result is an OpenGL 4x4 matrix, which is given in \e column-major order (see \c glMultMatrix + man page for details). + + See also getProjectionMatrix() and setFromModelViewMatrix(). */ +void Camera::getModelViewMatrix(GLdouble m[16]) const +{ + // May not be needed, but easier like this. + // Prevents from retrieving matrix in stereo mode -> overwrites shifted value. + computeModelViewMatrix(); + for (unsigned short i=0; i<16; ++i) + m[i] = modelViewMatrix_[i]; +} + +/*! Fills \p m with the product of the ModelView and Projection matrices. + + Calls getModelViewMatrix() and getProjectionMatrix() and then fills \p m with the product of these two matrices. */ +void Camera::getModelViewProjectionMatrix(GLdouble m[16]) const +{ + GLdouble mv[16]; + GLdouble proj[16]; + getModelViewMatrix(mv); + getProjectionMatrix(proj); + + for (unsigned short i=0; i<4; ++i) + { + for (unsigned short j=0; j<4; ++j) + { + double sum = 0.0; + for (unsigned short k=0; k<4; ++k) + sum += proj[i+4*k]*mv[k+4*j]; + m[i+4*j] = sum; + } + } +} + +#ifndef DOXYGEN +void Camera::getProjectionMatrix(GLfloat m[16]) const +{ + cout << "Warning : Camera::getProjectionMatrix requires a GLdouble matrix array"; + static GLdouble mat[16]; + getProjectionMatrix(mat); + for (int i=0; i<16; ++i) + m[i] = float(mat[i]); +} + +void Camera::getModelViewMatrix(GLfloat m[16]) const +{ + cout << "Warning : Camera::getModelViewMatrix requires a GLdouble matrix array"; + static GLdouble mat[16]; + getModelViewMatrix(mat); + for (int i=0; i<16; ++i) + m[i] = float(mat[i]); +} +#endif + +/*! Sets the sceneRadius() value. Negative values are ignored. + +\attention This methods also sets focusDistance() to sceneRadius() / tan(fieldOfView()/2) and +flySpeed() to 1% of sceneRadius(). */ +void Camera::setSceneRadius(float radius) +{ + if (radius <= 0.0) + { + cout << "Scene radius must be positive - Ignoring value"; + return; + } + + sceneRadius_ = radius; + + setFocusDistance(sceneRadius() / tan(fieldOfView()/2.0)); + + frame()->setFlySpeed(0.01*sceneRadius()); +} + +/*! Similar to setSceneRadius() and setSceneCenter(), but the scene limits are defined by a (world + axis aligned) bounding box. */ +void Camera::setSceneBoundingBox(const Vec& min, const Vec& max) +{ + setSceneCenter((min+max)/2.0); + setSceneRadius(0.5*(max-min).norm()); +} + + +/*! Sets the sceneCenter(). + + \attention This method also sets the revolveAroundPoint() to sceneCenter(). */ +void Camera::setSceneCenter(const Vec& center) +{ + sceneCenter_ = center; + setRevolveAroundPoint(sceneCenter()); +} + +/*! setSceneCenter() to the result of pointUnderPixel(\p pixel). + + Returns \c true if a pointUnderPixel() was found and sceneCenter() was actually changed. + + See also setRevolveAroundPointFromPixel(). See the pointUnderPixel() documentation. */ +bool Camera::setSceneCenterFromPixel(const Point& pixel) +{ + bool found; + Vec point = pointUnderPixel(pixel, found); + if (found) + setSceneCenter(point); + return found; +} + +/*! Changes the revolveAroundPoint() to \p rap (defined in the world coordinate system). */ +void Camera::setRevolveAroundPoint(const Vec& rap) +{ + const float prevDist = fabs(cameraCoordinatesOf(revolveAroundPoint()).z); + + frame()->setRevolveAroundPoint(rap); + + // orthoCoef_ is used to compensate for changes of the revolveAroundPoint, so that the image does + // not change when the revolveAroundPoint is changed in ORTHOGRAPHIC mode. + const float newDist = fabs(cameraCoordinatesOf(revolveAroundPoint()).z); + // Prevents division by zero when rap is set to camera position + if ((prevDist > 1E-9) && (newDist > 1E-9)) + orthoCoef_ *= prevDist / newDist; +} + +/*! The revolveAroundPoint() is set to the point located under \p pixel on screen. + +Returns \c true if a pointUnderPixel() was found. If no point was found under \p pixel, the +revolveAroundPoint() is left unchanged. + +\p pixel is expressed in Qt format (origin in the upper left corner of the window). See +pointUnderPixel(). + +See also setSceneCenterFromPixel(). */ +bool Camera::setRevolveAroundPointFromPixel(const Point& pixel) +{ + bool found; + Vec point = pointUnderPixel(pixel, found); + if (found) + setRevolveAroundPoint(point); + return found; +} + +/*! Returns the ratio between pixel and OpenGL units at \p position. + + A line of \c n * pixelGLRatio() OpenGL units, located at \p position in the world coordinates + system, will be projected with a length of \c n pixels on screen. + + Use this method to scale objects so that they have a constant pixel size on screen. The following + code will draw a 20 pixel line, starting at sceneCenter() and always directed along the screen + vertical direction: + \code + glBegin(GL_LINES); + glVertex3fv(sceneCenter()); + glVertex3fv(sceneCenter() + 20 * pixelGLRatio(sceneCenter()) * camera()->upVector()); + glEnd(); + \endcode */ +float Camera::pixelGLRatio(const Vec& position) const +{ + switch (type()) + { + case Camera::PERSPECTIVE : + return 2.0 * fabs((frame()->coordinatesOf(position)).z) * tan(fieldOfView()/2.0) / screenHeight(); + case Camera::ORTHOGRAPHIC : + { + GLdouble w, h; + getOrthoWidthHeight(w,h); + return 2.0 * h / screenHeight(); + } + } + // Bad compilers complain + return 1.0; +} + +/*! Changes the Camera fieldOfView() so that the entire scene (defined by QGLViewer::sceneCenter() + and QGLViewer::sceneRadius()) is visible from the Camera position(). + + The position() and orientation() of the Camera are not modified and you first have to orientate the + Camera in order to actually see the scene (see lookAt(), showEntireScene() or fitSphere()). + + This method is especially useful for \e shadow \e maps computation. Use the Camera positioning + tools (setPosition(), lookAt()) to position a Camera at the light position. Then use this method to + define the fieldOfView() so that the shadow map resolution is optimally used: + \code + // The light camera needs size hints in order to optimize its fieldOfView + lightCamera->setSceneRadius(sceneRadius()); + lightCamera->setSceneCenter(sceneCenter()); + + // Place the light camera. + lightCamera->setPosition(lightFrame->position()); + lightCamera->lookAt(sceneCenter()); + lightCamera->setFOVToFitScene(); + \endcode + + See the (soon available) shadowMap contribution example for a practical implementation. + + \attention The fieldOfView() is clamped to M_PI/2.0. This happens when the Camera is at a distance + lower than sqrt(2.0) * sceneRadius() from the sceneCenter(). It optimizes the shadow map + resolution, although it may miss some parts of the scene. */ +void Camera::setFOVToFitScene() +{ + if (distanceToSceneCenter() > sqrt(2.0)*sceneRadius()) + setFieldOfView(2.0 * asin(sceneRadius() / distanceToSceneCenter())); + else + setFieldOfView(M_PI / 2.0f); +} + +/*! Makes the Camera smoothly zoom on the pointUnderPixel() \p pixel. + + Nothing happens if no pointUnderPixel() is found. Otherwise a KeyFrameInterpolator is created that + animates the Camera on a one second path that brings the Camera closer to the point under \p pixel. + + See also interpolateToFitScene(). */ +// void Camera::interpolateToZoomOnPixel(const Point& pixel) +// { +// const float coef = 0.1f; +// +// bool found; +// Vec target = pointUnderPixel(pixel, found); +// +// if (!found) +// return; +// +// if (interpolationKfi_->interpolationIsStarted()) +// interpolationKfi_->stopInterpolation(); +// +// interpolationKfi_->deletePath(); +// interpolationKfi_->addKeyFrame(*(frame())); +// +// interpolationKfi_->addKeyFrame(Frame(0.3f*frame()->position() + 0.7f*target, frame()->orientation()), 0.4f); +// +// // Small hack: attach a temporary frame to take advantage of lookAt without modifying frame +// static ManipulatedCameraFrame* tempFrame = new ManipulatedCameraFrame(); +// ManipulatedCameraFrame* const originalFrame = frame(); +// tempFrame->setPosition(coef*frame()->position() + (1.0-coef)*target); +// tempFrame->setOrientation(frame()->orientation()); +// setFrame(tempFrame); +// lookAt(target); +// setFrame(originalFrame); +// +// interpolationKfi_->addKeyFrame(*(tempFrame), 1.0); +// +// interpolationKfi_->startInterpolation(); +// } + +/*! Interpolates the Camera on a one second KeyFrameInterpolator path so that the entire scene fits + the screen at the end. + + The scene is defined by its sceneCenter() and its sceneRadius(). See showEntireScene(). + + The orientation() of the Camera is not modified. See also interpolateToZoomOnPixel(). */ +// void Camera::interpolateToFitScene() +// { +// if (interpolationKfi_->interpolationIsStarted()) +// interpolationKfi_->stopInterpolation(); +// +// interpolationKfi_->deletePath(); +// interpolationKfi_->addKeyFrame(*(frame())); +// +// // Small hack: attach a temporary frame to take advantage of lookAt without modifying frame +// static ManipulatedCameraFrame* tempFrame = new ManipulatedCameraFrame(); +// ManipulatedCameraFrame* const originalFrame = frame(); +// tempFrame->setPosition(frame()->position()); +// tempFrame->setOrientation(frame()->orientation()); +// setFrame(tempFrame); +// showEntireScene(); +// setFrame(originalFrame); +// +// //interpolationKfi_->addKeyFrame(*(tempFrame)); +// +// //interpolationKfi_->startInterpolation(); +// } + + +/*! Smoothly interpolates the Camera on a KeyFrameInterpolator path so that it goes to \p fr. + + \p fr is expressed in world coordinates. \p duration tunes the interpolation speed (default is + 1 second). + + See also interpolateToFitScene() and interpolateToZoomOnPixel(). */ +// void Camera::interpolateTo(const Frame& fr, float duration) +// { +// if (interpolationKfi_->interpolationIsStarted()) +// interpolationKfi_->stopInterpolation(); +// +// interpolationKfi_->deletePath(); +// interpolationKfi_->addKeyFrame(*(frame())); +// interpolationKfi_->addKeyFrame(fr, duration); +// +// interpolationKfi_->startInterpolation(); +// } + + +/*! Returns the coordinates of the 3D point located at pixel (x,y) on screen. + + Calls a \c glReadPixel to get the pixel depth and applies an unprojectedCoordinatesOf() to the + result. \p found indicates whether a point was found or not (i.e. background pixel, result's depth + is zFar() in that case). + + \p x and \p y are expressed in pixel units with an origin in the upper left corner. Use + screenHeight() - y to convert to OpenGL standard. + + \attention This method assumes that a GL context is available, and that its content was drawn using + the Camera (i.e. using its projection and modelview matrices). This method hence cannot be used for + offscreen Camera computations. Use cameraCoordinatesOf() and worldCoordinatesOf() to perform + similar operations in that case. + + \note The precision of the z-Buffer highly depends on how the zNear() and zFar() values are fitted + to your scene. Loose boundaries will result in imprecision along the viewing direction. */ +Vec Camera::pointUnderPixel(const Point& pixel, bool& found) const +{ + float depth; + // Qt uses upper corner for its origin while GL uses the lower corner. + glReadPixels(pixel.x(), screenHeight()-1-pixel.y(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + found = depth < 1.0; + Vec point(pixel.x(), pixel.y(), depth); + point = unprojectedCoordinatesOf(point); + return point; +} + +/*! Moves the Camera so that the entire scene is visible. + + Simply calls fitSphere() on a sphere defined by sceneCenter() and sceneRadius(). + + You will typically use this method in QGLViewer::init() after you defined a new sceneRadius(). */ +void Camera::showEntireScene() +{ + fitSphere(sceneCenter(), sceneRadius()); +} + +/*! Moves the Camera so that its sceneCenter() is projected on the center of the window. The + orientation() and fieldOfView() are unchanged. + + Simply projects the current position on a line passing through sceneCenter(). See also + showEntireScene().*/ +void Camera::centerScene() +{ + frame()->projectOnLine(sceneCenter(), viewDirection()); +} + +/*! Sets the Camera orientation(), so that it looks at point \p target (defined in the world + coordinate system). + + The Camera position() is not modified. Simply setViewDirection(). + + See also setUpVector(), setOrientation(), showEntireScene(), fitSphere() and fitBoundingBox(). */ +void Camera::lookAt(const Vec& target) +{ + setViewDirection(target - position()); +} + +/*! Moves the Camera so that the sphere defined by (\p center, \p radius) is visible and fits the window. + + The Camera is simply translated along its viewDirection() so that the sphere fits the screen. Its + orientation() and its fieldOfView() are unchanged. + + You should therefore orientate the Camera before you call this method. See lookAt(), + setOrientation() and setUpVector(). */ +void Camera::fitSphere(const Vec& center, float radius) +{ + float distance = 0.0f; + switch (type()) + { + case Camera::PERSPECTIVE : + { + const float yview = radius / sin(fieldOfView()/2.0); + const float xview = radius / sin(horizontalFieldOfView()/2.0); + distance = qMax(xview,yview); + break; + } + case Camera::ORTHOGRAPHIC : + { + distance = ((center-revolveAroundPoint()) * viewDirection()) + (radius / orthoCoef_); + break; + } + } + Vec newPos(center - distance * viewDirection()); + frame()->setPositionWithConstraint(newPos); +} + +/*! Moves the Camera so that the (world axis aligned) bounding box (\p min, \p max) is entirely + visible, using fitSphere(). */ +void Camera::fitBoundingBox(const Vec& min, const Vec& max) +{ + float diameter = qMax(fabs(max[1]-min[1]), fabs(max[0]-min[0])); + diameter = qMax(fabsf(max[2]-min[2]), diameter); + fitSphere(0.5*(min+max), 0.5*diameter); +} + +/*! Rotates the Camera so that its upVector() becomes \p up (defined in the world coordinate + system). + + The Camera is rotated around an axis orthogonal to \p up and to the current upVector() direction. + Use this method in order to define the Camera horizontal plane. + + When \p noMove is set to \c false, the orientation modification is compensated by a translation, so + that the revolveAroundPoint() stays projected at the same position on screen. This is especially + useful when the Camera is an observer of the scene (default mouse binding). + + When \p noMove is \c true (default), the Camera position() is left unchanged, which is an intuitive + behavior when the Camera is in a walkthrough fly mode (see the QGLViewer::MOVE_FORWARD and + QGLViewer::MOVE_BACKWARD QGLViewer::MouseAction). */ +void Camera::setUpVector(const Vec& up, bool noMove) +{ + Quaternion q(Vec(0.0, 1.0, 0.0), frame()->transformOf(up)); + + if (!noMove) + frame()->setPosition(revolveAroundPoint() - (frame()->orientation()*q).rotate(frame()->coordinatesOf(revolveAroundPoint()))); + + frame()->rotate(q); + + // Useful in fly mode to keep the horizontal direction. + //frame()->updateFlyUpVector(); +} + +/*! Sets the orientation() of the Camera using polar coordinates. + + \p theta rotates the Camera around its Y axis, and \e then \p phi rotates it around its X axis. + The polar coordinates are defined in the world coordinates system: \p theta = \p phi = 0 means + that the Camera is directed towards the world Z axis. Both angles are expressed in radians. + + See also setUpVector(). The position() of the Camera is unchanged, you may want to call showEntireScene() + after this method to move the Camera. + + This method can be useful to create Quicktime VR panoramic sequences, see the + QGLViewer::saveSnapshot() documentation for details. */ +void Camera::setOrientation(float theta, float phi) +{ + Vec axis(0.0, 1.0, 0.0); + const Quaternion rot1(axis, theta); + axis = Vec(-cos(theta), 0., sin(theta)); + const Quaternion rot2(axis, phi); + setOrientation(rot1 * rot2); +} + +/*! Sets the Camera orientation(), defined in the world coordinate system. */ +void Camera::setOrientation(const Quaternion& q) +{ + frame()->setOrientation(q); + //frame()->updateFlyUpVector(); +} + +/*! Rotates the Camera so that its viewDirection() is \p direction (defined in the world coordinate + system). + + The Camera position() is not modified. The Camera is rotated so that the horizon (defined by its + upVector()) is preserved. See also lookAt() and setUpVector(). */ +void Camera::setViewDirection(const Vec& direction) +{ + if (direction.squaredNorm() < 1E-10) + return; + + Vec xAxis = direction ^ upVector(); + if (xAxis.squaredNorm() < 1E-10) + { + // target is aligned with upVector, this means a rotation around X axis + // X axis is then unchanged, let's keep it ! + xAxis = frame()->inverseTransformOf(Vec(1.0, 0.0, 0.0)); + } + + Quaternion q; + q.setFromRotatedBasis(xAxis, xAxis^direction, -direction); + frame()->setOrientationWithConstraint(q); +} + +// Compute a 3 by 3 determinant. +static float det(float m00,float m01,float m02, + float m10,float m11,float m12, + float m20,float m21,float m22) +{ + return m00*m11*m22 + m01*m12*m20 + m02*m10*m21 - m20*m11*m02 - m10*m01*m22 - m00*m21*m12; +} + +// Computes the index of element [i][j] in a \c float matrix[3][4]. +static inline unsigned int ind(unsigned int i, unsigned int j) +{ + return (i*4+j); +} + + +/*! Sets the Camera's position() and orientation() from an OpenGL ModelView matrix. + +This enables a Camera initialisation from an other OpenGL application. \p modelView is a 16 GLdouble +vector representing a valid OpenGL ModelView matrix, such as one can get using: +\code +GLdouble mvm[16]; +glGetDoublev(GL_MODELVIEW_MATRIX, mvm); +myCamera->setFromModelViewMatrix(mvm); +\endcode + +After this method has been called, getModelViewMatrix() returns a matrix equivalent to \p +modelView. + +Only the orientation() and position() of the Camera are modified. + +\note If you defined your matrix as \c GLdouble \c mvm[4][4], pass \c &(mvm[0][0]) as a +parameter. */ +void Camera::setFromModelViewMatrix(const GLdouble* const modelViewMatrix) +{ + // Get upper left (rotation) matrix + double upperLeft[3][3]; + for (int i=0; i<3; ++i) + for (int j=0; j<3; ++j) + upperLeft[i][j] = modelViewMatrix[i*4+j]; + + // Transform upperLeft into the associated Quaternion + Quaternion q; + q.setFromRotationMatrix(upperLeft); + + setOrientation(q); + setPosition(-q.rotate(Vec(modelViewMatrix[12], modelViewMatrix[13], modelViewMatrix[14]))); +} + +/*! Defines the Camera position(), orientation() and fieldOfView() from a projection matrix. + + \p matrix has to be given in the format used by vision algorithm. It has 3 lines and 4 columns. It + transforms a point from the world homogeneous coordinate system (4 coordinates: \c sx, \c sy, \c sz + and \c s) into a point in the screen homogeneous coordinate system (3 coordinates: \c sx, \c sy, + and \c s, where \c x and \c y are the pixel coordinates on the screen). + + Its three lines correspond to the homogeneous coordinates of the normals to the planes x=0, y=0 and + z=0, defined in the Camera coordinate system. + + The elements of the matrix are ordered in line major order: you can call \c + setFromProjectionMatrix(&(matrix[0][0])) if you defined your matrix as a \c float \c matrix[3][4]. + + \attention Passing the result of getProjectionMatrix() or getModelViewMatrix() to this method is + not possible (purposefully incompatible matrix dimensions). \p matrix is more likely to be the + product of these two matrices, without the last line. + + Use setFromModelViewMatrix() to set position() and orientation() from a \c GL_MODELVIEW matrix. + fieldOfView() can also be retrieved from a \e perspective \c GL_PROJECTION matrix using 2.0 * + atan(1.0/projectionMatrix[5]). + + This code was written by Sylvain Paris. */ +void Camera::setFromProjectionMatrix(const float matrix[12]) +{ + // The 3 lines of the matrix are the normals to the planes x=0, y=0, z=0 + // in the camera CS. As we normalize them, we do not need the 4th coordinate. + Vec line_0(matrix[ind(0,0)],matrix[ind(0,1)],matrix[ind(0,2)]); + Vec line_1(matrix[ind(1,0)],matrix[ind(1,1)],matrix[ind(1,2)]); + Vec line_2(matrix[ind(2,0)],matrix[ind(2,1)],matrix[ind(2,2)]); + + line_0.normalize(); + line_1.normalize(); + line_2.normalize(); + + // The camera position is at (0,0,0) in the camera CS so it is the + // intersection of the 3 planes. It can be seen as the kernel + // of the 3x4 projection matrix. We calculate it through 4 dimensional + // vectorial product. We go directly into 3D that is to say we directly + // divide the first 3 coordinates by the 4th one. + + // We derive the 4 dimensional vectorial product formula from the + // computation of a 4x4 determinant that is developped according to + // its 4th column. This implies some 3x3 determinants. + const Vec cam_pos = Vec(det(matrix[ind(0,1)],matrix[ind(0,2)],matrix[ind(0,3)], + matrix[ind(1,1)],matrix[ind(1,2)],matrix[ind(1,3)], + matrix[ind(2,1)],matrix[ind(2,2)],matrix[ind(2,3)]), + + -det(matrix[ind(0,0)],matrix[ind(0,2)],matrix[ind(0,3)], + matrix[ind(1,0)],matrix[ind(1,2)],matrix[ind(1,3)], + matrix[ind(2,0)],matrix[ind(2,2)],matrix[ind(2,3)]), + + det(matrix[ind(0,0)],matrix[ind(0,1)],matrix[ind(0,3)], + matrix[ind(1,0)],matrix[ind(1,1)],matrix[ind(1,3)], + matrix[ind(2,0)],matrix[ind(2,1)],matrix[ind(2,3)])) / + + (-det(matrix[ind(0,0)],matrix[ind(0,1)],matrix[ind(0,2)], + matrix[ind(1,0)],matrix[ind(1,1)],matrix[ind(1,2)], + matrix[ind(2,0)],matrix[ind(2,1)],matrix[ind(2,2)])); + + // We compute the rotation matrix column by column. + + // GL Z axis is front facing. + Vec column_2 = -line_2; + + // X-axis is almost like line_0 but should be orthogonal to the Z axis. + Vec column_0 = ((column_2^line_0)^column_2); + column_0.normalize(); + + // Y-axis is almost like line_1 but should be orthogonal to the Z axis. + // Moreover line_1 is downward oriented as the screen CS. + Vec column_1 = -((column_2^line_1)^column_2); + column_1.normalize(); + + double rot[3][3]; + rot[0][0] = column_0[0]; + rot[1][0] = column_0[1]; + rot[2][0] = column_0[2]; + + rot[0][1] = column_1[0]; + rot[1][1] = column_1[1]; + rot[2][1] = column_1[2]; + + rot[0][2] = column_2[0]; + rot[1][2] = column_2[1]; + rot[2][2] = column_2[2]; + + // We compute the field of view + + // line_1^column_0 -> vector of intersection line between + // y_screen=0 and x_camera=0 plane. + // column_2*(...) -> cos of the angle between Z vector et y_screen=0 plane + // * 2 -> field of view = 2 * half angle + + // We need some intermediate values. + Vec dummy = line_1^column_0; + dummy.normalize(); + float fov = acos(column_2*dummy) * 2.0; + + // We set the camera. + Quaternion q; + q.setFromRotationMatrix(rot); + setOrientation(q); + setPosition(cam_pos); + setFieldOfView(fov); +} + + +/* + // persp : projectionMatrix_[0] = f/aspectRatio(); +void Camera::setFromProjectionMatrix(const GLdouble* projectionMatrix) +{ + QString message; + if ((fabs(projectionMatrix[1]) > 1E-3) || + (fabs(projectionMatrix[2]) > 1E-3) || + (fabs(projectionMatrix[3]) > 1E-3) || + (fabs(projectionMatrix[4]) > 1E-3) || + (fabs(projectionMatrix[6]) > 1E-3) || + (fabs(projectionMatrix[7]) > 1E-3) || + (fabs(projectionMatrix[8]) > 1E-3) || + (fabs(projectionMatrix[9]) > 1E-3)) + message = "Non null coefficient in projection matrix - Aborting"; + else + if ((fabs(projectionMatrix[11]+1.0) < 1E-5) && (fabs(projectionMatrix[15]) < 1E-5)) + { + if (projectionMatrix[5] < 1E-4) + message="Negative field of view in Camera::setFromProjectionMatrix"; + else + setType(Camera::PERSPECTIVE); + } + else + if ((fabs(projectionMatrix[11]) < 1E-5) && (fabs(projectionMatrix[15]-1.0) < 1E-5)) + setType(Camera::ORTHOGRAPHIC); + else + message = "Unable to determine camera type in setFromProjectionMatrix - Aborting"; + + if (!message.isEmpty()) + { + qWarning(message); + return; + } + + switch (type()) + { + case Camera::PERSPECTIVE: + { + setFieldOfView(2.0 * atan(1.0/projectionMatrix[5])); + const float far = projectionMatrix[14] / (2.0 * (1.0 + projectionMatrix[10])); + const float near = (projectionMatrix[10]+1.0) / (projectionMatrix[10]-1.0) * far; + setSceneRadius((far-near)/2.0); + setSceneCenter(position() + (near + sceneRadius())*viewDirection()); + break; + } + case Camera::ORTHOGRAPHIC: + { + GLdouble w, h; + getOrthoWidthHeight(w,h); + projectionMatrix_[0] = 1.0/w; + projectionMatrix_[5] = 1.0/h; + projectionMatrix_[10] = -2.0/(ZFar - ZNear); + projectionMatrix_[11] = 0.0; + projectionMatrix_[14] = -(ZFar + ZNear)/(ZFar - ZNear); + projectionMatrix_[15] = 1.0; + // same as glOrtho( -w, w, -h, h, zNear(), zFar() ); + break; + } + } +} +*/ + +///////////////////////// Camera to world transform /////////////////////// + +/*! Same as cameraCoordinatesOf(), but with \c float[3] parameters (\p src and \p res may be identical pointers). */ +void Camera::getCameraCoordinatesOf(const float src[3], float res[3]) const +{ + Vec r = cameraCoordinatesOf(Vec(src)); + for (int i=0; i<3; ++i) + res[i] = r[i]; +} + +/*! Same as worldCoordinatesOf(), but with \c float[3] parameters (\p src and \p res may be identical pointers). */ +void Camera::getWorldCoordinatesOf(const float src[3], float res[3]) const +{ + Vec r = worldCoordinatesOf(Vec(src)); + for (int i=0; i<3; ++i) + res[i] = r[i]; +} + +/*! Fills \p viewport with the Camera OpenGL viewport. + +This method is mainly used in conjunction with \c gluProject, which requires such a viewport. +Returned values are (0, screenHeight(), screenWidth(), - screenHeight()), so that the origin is +located in the \e upper left corner of the window (Qt style coordinate system). */ +void Camera::getViewport(GLint viewport[4]) const +{ + viewport[0] = 0; + viewport[1] = screenHeight(); + viewport[2] = screenWidth(); + viewport[3] = -screenHeight(); +} + +/*! Returns the screen projected coordinates of a point \p src defined in the \p frame coordinate + system. + + When \p frame in \c NULL (default), \p src is expressed in the world coordinate system. + + The x and y coordinates of the returned Vec are expressed in pixel, (0,0) being the \e upper left + corner of the window. The z coordinate ranges between 0.0 (near plane) and 1.0 (excluded, far + plane). See the \c gluProject man page for details. + + unprojectedCoordinatesOf() performs the inverse transformation. + + See the screenCoordSystem example. + + This method only uses the intrinsic Camera parameters (see getModelViewMatrix(), + getProjectionMatrix() and getViewport()) and is completely independent of the OpenGL \c + GL_MODELVIEW, \c GL_PROJECTION and viewport matrices. You can hence define a virtual Camera and use + this method to compute projections out of a classical rendering context. + + \attention However, if your Camera is not attached to a QGLViewer (used for offscreen computations + for instance), make sure the Camera matrices are updated before calling this method. Call + computeModelViewMatrix() and computeProjectionMatrix() to do so. + + If you call this method several times with no change in the matrices, consider precomputing the + projection times modelview matrix to save computation time if required (\c P x \c M in the \c + gluProject man page). */ +Vec Camera::projectedCoordinatesOf(const Vec& src, const Frame* frame) const +{ + GLdouble x,y,z; + static GLint viewport[4]; + getViewport(viewport); + + if (frame) + { + const Vec tmp = frame->inverseCoordinatesOf(src); + gluProject(tmp.x,tmp.y,tmp.z, modelViewMatrix_, projectionMatrix_, viewport, &x,&y,&z); + } + else + gluProject(src.x,src.y,src.z, modelViewMatrix_, projectionMatrix_, viewport, &x,&y,&z); + + return Vec(x,y,z); +} + +/*! Returns the world unprojected coordinates of a point \p src defined in the screen coordinate + system. + + The \p src.x and \p src.y input values are expressed in pixels, (0,0) being the \e upper left corner + of the window. \p src.z is a depth value ranging in [0..1[ (near and far plane respectively). See + the \c gluUnProject man page for details. + + The result is expressed in the \p frame coordinate system. When \p frame is \c NULL (default), the + result is expressed in the world coordinates system. The possible \p frame Frame::referenceFrame() + are taken into account. + + projectedCoordinatesOf() performs the inverse transformation. + + This method only uses the intrinsic Camera parameters (see getModelViewMatrix(), + getProjectionMatrix() and getViewport()) and is completely independent of the OpenGL \c + GL_MODELVIEW, \c GL_PROJECTION and viewport matrices. You can hence define a virtual Camera and use + this method to compute un-projections out of a classical rendering context. + + \attention However, if your Camera is not attached to a QGLViewer (used for offscreen computations + for instance), make sure the Camera matrices are updated before calling this method (use + computeModelViewMatrix(), computeProjectionMatrix()). See also setScreenWidthAndHeight(). + + This method is not computationally optimized. If you call it several times with no change in the + matrices, you should buffer the entire inverse projection matrix (modelview, projection and then + viewport) to speed-up the queries. See the \c gluUnProject man page for details. */ +Vec Camera::unprojectedCoordinatesOf(const Vec& src, const Frame* frame) const +{ + GLdouble x,y,z; + static GLint viewport[4]; + getViewport(viewport); + gluUnProject(src.x,src.y,src.z, modelViewMatrix_, projectionMatrix_, viewport, &x,&y,&z); + if (frame) + return frame->coordinatesOf(Vec(x,y,z)); + else + return Vec(x,y,z); +} + +/*! Same as projectedCoordinatesOf(), but with \c float parameters (\p src and \p res can be identical pointers). */ +void Camera::getProjectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const +{ + Vec r = projectedCoordinatesOf(Vec(src), frame); + for (int i=0; i<3; ++i) + res[i] = r[i]; +} + +/*! Same as unprojectedCoordinatesOf(), but with \c float parameters (\p src and \p res can be identical pointers). */ +void Camera::getUnprojectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const +{ + Vec r = unprojectedCoordinatesOf(Vec(src), frame); + for (int i=0; i<3; ++i) + res[i] = r[i]; +} + +///////////////////////////////////// KFI ///////////////////////////////////////// + +/*! Returns the KeyFrameInterpolator that defines the Camera path number \p i. + +If path \p i is not defined for this index, the method returns a \c NULL pointer. */ +// KeyFrameInterpolator* Camera::keyFrameInterpolator(int i) +// { +// if ( kfi_.find(i) != kfi_.end()) +// return kfi_[i]; +// else +// return NULL; +// } + +/*! Sets the KeyFrameInterpolator that defines the Camera path of index \p i. + + The previous keyFrameInterpolator() is lost and should be deleted by the calling method if + needed. + + The KeyFrameInterpolator::interpolated() signal of \p kfi probably needs to be connected to the + Camera's associated QGLViewer::updateGL() slot, so that when the Camera position is interpolated + using \p kfi, every interpolation step updates the display: + \code + myViewer.camera()->deletePath(3); + myViewer.camera()->setKeyFrameInterpolator(3, myKeyFrameInterpolator); + connect(myKeyFrameInterpolator, SIGNAL(interpolated()), myViewer, SLOT(updateGL()); + \endcode + + \note These connections are done automatically when a Camera is attached to a QGLViewer, or when a + new KeyFrameInterpolator is defined using the QGLViewer::addKeyFrameKeyboardModifiers() and + QGLViewer::pathKey() (default is Alt+F[1-12]). See the keyboard page + for details. */ +// void Camera::setKeyFrameInterpolator(int i, KeyFrameInterpolator* const kfi) +// { +// if (kfi) +// kfi_[i] = kfi; +// else +// kfi_.erase(i); +// } + +/*! Adds the current Camera position() and orientation() as a keyFrame to the path number \p i. + +This method can also be used if you simply want to save a Camera point of view (a path made of a +single keyFrame). Use playPath() to make the Camera play the keyFrame path (resp. restore +the point of view). Use deletePath() to clear the path. + +The default keyboard shortcut for this method is Alt+F[1-12]. Set QGLViewer::pathKey() and +QGLViewer::addKeyFrameKeyboardModifiers(). + +If you use directly this method and the keyFrameInterpolator(i) does not exist, a new one is +created. Its KeyFrameInterpolator::interpolated() signal should then be connected to the +QGLViewer::updateGL() slot (see setKeyFrameInterpolator()). */ +// void Camera::addKeyFrameToPath(int i) +// { +// if (kfi_.find(i) != kfi_.end()) +// setKeyFrameInterpolator(i, new KeyFrameInterpolator(frame())); +// +// kfi_[i]->addKeyFrame(*(frame())); +// } + +/*! Makes the Camera follow the path of keyFrameInterpolator() number \p i. + + If the interpolation is started, it stops it instead. + + This method silently ignores undefined (empty) paths (see keyFrameInterpolator()). + + The default keyboard shortcut for this method is F[1-12]. Set QGLViewer::pathKey() and + QGLViewer::playPathKeyboardModifiers(). */ +// void Camera::playPath(int i) +// { +// if (kfi_.find(i) != kfi_.end()) +// if (kfi_[i]->interpolationIsStarted()) +// kfi_[i]->stopInterpolation(); +// else +// kfi_[i]->startInterpolation(); +// } + +/*! Resets the path of the keyFrameInterpolator() number \p i. + +If this path is \e not being played (see playPath() and +KeyFrameInterpolator::interpolationIsStarted()), resets it to is its starting position (see +KeyFrameInterpolator::resetInterpolation()). If the path is played, simply stops interpolation. */ +// void Camera::resetPath(int i) +// { +// // if (kfi_.contains(i)) +// if (kfi_.find(i) != kfi_.end()) +// if ((kfi_[i]->interpolationIsStarted())) +// kfi_[i]->stopInterpolation(); +// else +// { +// kfi_[i]->resetInterpolation(); +// kfi_[i]->interpolateAtTime(kfi_[i]->interpolationTime()); +// } +// } + +/*! Deletes the keyFrameInterpolator() of index \p i. + +Disconnect the keyFrameInterpolator() KeyFrameInterpolator::interpolated() signal before deleting the +keyFrameInterpolator() if needed: +\code +disconnect(camera()->keyFrameInterpolator(i), SIGNAL(interpolated()), this, SLOT(updateGL())); +camera()->deletePath(i); +\endcode */ +// void Camera::deletePath(int i) +// { +// if (kfi_.find(i) != kfi_.end()) +// { +// kfi_[i]->stopInterpolation(); +// delete kfi_[i]; +// kfi_.erase(i); +// } +// } + + + +/*! Gives the coefficients of a 3D half-line passing through the Camera eye and pixel (x,y). + + The origin of the half line (eye position) is stored in \p orig, while \p dir contains the properly + oriented and normalized direction of the half line. + + \p x and \p y are expressed in Qt format (origin in the upper left corner). Use screenHeight() - y + to convert to OpenGL units. + + This method is useful for analytical intersection in a selection method. + + See the select example for an illustration. */ +void Camera::convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const +{ + switch (type()) + { + case Camera::PERSPECTIVE: + orig = position(); + dir = Vec( ((2.0 * pixel.x() / screenWidth()) - 1.0) * tan(fieldOfView()/2.0) * aspectRatio(), + ((2.0 * (screenHeight()-pixel.y()) / screenHeight()) - 1.0) * tan(fieldOfView()/2.0), + -1.0 ); + dir = worldCoordinatesOf(dir) - orig; + dir.normalize(); + break; + + case Camera::ORTHOGRAPHIC: + { + GLdouble w,h; + getOrthoWidthHeight(w,h); + orig = Vec((2.0 * pixel.x() / screenWidth() - 1.0)*w, -(2.0 * pixel.y() / screenHeight() - 1.0)*h, 0.0); + orig = worldCoordinatesOf(orig); + dir = viewDirection(); + break; + } + } +} + +#ifndef DOXYGEN +/*! This method has been deprecated in libQGLViewer version 2.2.0 */ +void Camera::drawCamera(float, float, float) +{ + cout << "drawCamera is deprecated. Use Camera::draw() instead."; +} +#endif + +/*! Draws a representation of the Camera in the 3D world. + +The near and far planes are drawn as quads, the frustum is drawn using lines and the camera up +vector is represented by an arrow to disambiguate the drawing. See the +standardCamera example for an illustration. + +Note that the current \c glColor and \c glPolygonMode are used to draw the near and far planes. See +the frustumCulling example for an example of +semi-transparent plane drawing. Similarly, the current \c glLineWidth and \c glColor is used to draw +the frustum outline. + +When \p drawFarPlane is \c false, only the near plane is drawn. \p scale can be used to scale the +drawing: a value of 1.0 (default) will draw the Camera's frustum at its actual size. + +This method assumes that the \c glMatrixMode is \c GL_MODELVIEW and that the current ModelView +matrix corresponds to the world coordinate system (as it is at the beginning of QGLViewer::draw()). +The Camera is then correctly positioned and orientated. + +\note The drawing of a QGLViewer's own QGLViewer::camera() should not be visible, but may create +artefacts due to numerical imprecisions. */ +void Camera::draw(bool drawFarPlane, float scale) const +{ + glPushMatrix(); + glMultMatrixd(frame()->worldMatrix()); + + // 0 is the upper left coordinates of the near corner, 1 for the far one + Vec points[2]; + + points[0].z = scale * zNear(); + points[1].z = scale * zFar(); + + switch (type()) + { + case Camera::PERSPECTIVE: + { + points[0].y = points[0].z * tan(fieldOfView()/2.0); + points[0].x = points[0].y * aspectRatio(); + + const float ratio = points[1].z / points[0].z; + + points[1].y = ratio * points[0].y; + points[1].x = ratio * points[0].x; + break; + } + case Camera::ORTHOGRAPHIC: + { + GLdouble hw, hh; + getOrthoWidthHeight(hw, hh); + points[0].x = points[1].x = scale * float(hw); + points[0].y = points[1].y = scale * float(hh); + break; + } + } + + const int farIndex = drawFarPlane?1:0; + + // Near and (optionally) far plane(s) + glBegin(GL_QUADS); + for (int i=farIndex; i>=0; --i) + { + glNormal3f(0.0, 0.0, (i==0)?1.0:-1.0); + glVertex3f( points[i].x, points[i].y, -points[i].z); + glVertex3f(-points[i].x, points[i].y, -points[i].z); + glVertex3f(-points[i].x, -points[i].y, -points[i].z); + glVertex3f( points[i].x, -points[i].y, -points[i].z); + } + glEnd(); + + // Up arrow + const float arrowHeight = 1.5f * points[0].y; + const float baseHeight = 1.2f * points[0].y; + const float arrowHalfWidth = 0.5f * points[0].x; + const float baseHalfWidth = 0.3f * points[0].x; + + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + // Base + glBegin(GL_QUADS); + glVertex3f(-baseHalfWidth, points[0].y, -points[0].z); + glVertex3f( baseHalfWidth, points[0].y, -points[0].z); + glVertex3f( baseHalfWidth, baseHeight, -points[0].z); + glVertex3f(-baseHalfWidth, baseHeight, -points[0].z); + glEnd(); + + // Arrow + glBegin(GL_TRIANGLES); + glVertex3f( 0.0f, arrowHeight, -points[0].z); + glVertex3f(-arrowHalfWidth, baseHeight, -points[0].z); + glVertex3f( arrowHalfWidth, baseHeight, -points[0].z); + glEnd(); + + // Frustum lines + switch (type()) + { + case Camera::PERSPECTIVE : + glBegin(GL_LINES); + glVertex3f(0.0f, 0.0f, 0.0f); + glVertex3f( points[farIndex].x, points[farIndex].y, -points[farIndex].z); + glVertex3f(0.0f, 0.0f, 0.0f); + glVertex3f(-points[farIndex].x, points[farIndex].y, -points[farIndex].z); + glVertex3f(0.0f, 0.0f, 0.0f); + glVertex3f(-points[farIndex].x, -points[farIndex].y, -points[farIndex].z); + glVertex3f(0.0f, 0.0f, 0.0f); + glVertex3f( points[farIndex].x, -points[farIndex].y, -points[farIndex].z); + glEnd(); + break; + case Camera::ORTHOGRAPHIC : + if (drawFarPlane) + { + glBegin(GL_LINES); + glVertex3f( points[0].x, points[0].y, -points[0].z); + glVertex3f( points[1].x, points[1].y, -points[1].z); + glVertex3f(-points[0].x, points[0].y, -points[0].z); + glVertex3f(-points[1].x, points[1].y, -points[1].z); + glVertex3f(-points[0].x, -points[0].y, -points[0].z); + glVertex3f(-points[1].x, -points[1].y, -points[1].z); + glVertex3f( points[0].x, -points[0].y, -points[0].z); + glVertex3f( points[1].x, -points[1].y, -points[1].z); + glEnd(); + } + } + + glPopMatrix(); +} + + +/*! Returns the 6 plane equations of the Camera frustum. + +The six 4-component vectors of \p coef respectively correspond to the left, right, near, far, top +and bottom Camera frustum planes. Each vector holds a plane equation of the form: +\code +a*x + b*y + c*z + d = 0 +\endcode +where \c a, \c b, \c c and \c d are the 4 components of each vector, in that order. + +See the frustumCulling example for an application. + +This format is compatible with the \c glClipPlane() function. One camera frustum plane can hence be +applied in an other viewer to visualize the culling results: +\code + // Retrieve plance equations + GLdouble coef[6][4]; + mainViewer->camera()->getFrustumPlanesCoefficients(coef); + + // These two additional clipping planes (which must have been enabled) + // will reproduce the mainViewer's near and far clipping. + glClipPlane(GL_CLIP_PLANE0, coef[2]); + glClipPlane(GL_CLIP_PLANE1, coef[3]); +\endcode */ +void Camera::getFrustumPlanesCoefficients(GLdouble coef[6][4]) const +{ + // Computed once and for all + const Vec pos = position(); + const Vec viewDir = viewDirection(); + const Vec up = upVector(); + const Vec right = rightVector(); + const float posViewDir = pos * viewDir; + + static Vec normal[6]; + static GLdouble dist[6]; + + switch (type()) + { + case Camera::PERSPECTIVE : + { + const float hhfov = horizontalFieldOfView() / 2.0; + const float chhfov = cos(hhfov); + const float shhfov = sin(hhfov); + normal[0] = - shhfov * viewDir; + normal[1] = normal[0] + chhfov * right; + normal[0] = normal[0] - chhfov * right; + + normal[2] = -viewDir; + normal[3] = viewDir; + + const float hfov = fieldOfView() / 2.0; + const float chfov = cos(hfov); + const float shfov = sin(hfov); + normal[4] = - shfov * viewDir; + normal[5] = normal[4] - chfov * up; + normal[4] = normal[4] + chfov * up; + + for (int i=0; i<2; ++i) + dist[i] = pos * normal[i]; + for (int j=4; j<6; ++j) + dist[j] = pos * normal[j]; + + // Natural equations are: + // dist[0,1,4,5] = pos * normal[0,1,4,5]; + // dist[2] = (pos + zNear() * viewDir) * normal[2]; + // dist[3] = (pos + zFar() * viewDir) * normal[3]; + + // 2 times less computations using expanded/merged equations. Dir vectors are normalized. + const float posRightCosHH = chhfov * pos * right; + dist[0] = -shhfov * posViewDir; + dist[1] = dist[0] + posRightCosHH; + dist[0] = dist[0] - posRightCosHH; + const float posUpCosH = chfov * pos * up; + dist[4] = - shfov * posViewDir; + dist[5] = dist[4] - posUpCosH; + dist[4] = dist[4] + posUpCosH; + + break; + } + case Camera::ORTHOGRAPHIC : + normal[0] = -right; + normal[1] = right; + normal[4] = up; + normal[5] = -up; + + GLdouble hw, hh; + getOrthoWidthHeight(hw, hh); + dist[0] = (pos - hw * right) * normal[0]; + dist[1] = (pos + hw * right) * normal[1]; + dist[4] = (pos + hh * up) * normal[4]; + dist[5] = (pos - hh * up) * normal[5]; + break; + } + + // Front and far planes are identical for both camera types. + normal[2] = -viewDir; + normal[3] = viewDir; + dist[2] = -posViewDir - zNear(); + dist[3] = posViewDir + zFar(); + + for (int i=0; i<6; ++i) + { + coef[i][0] = GLdouble(normal[i].x); + coef[i][1] = GLdouble(normal[i].y); + coef[i][2] = GLdouble(normal[i].z); + coef[i][3] = dist[i]; + } +} diff --git a/source/blender/freestyle/intern/app_blender/camera.h b/source/blender/freestyle/intern/app_blender/camera.h new file mode 100644 index 00000000000..d6dad1dd895 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/camera.h @@ -0,0 +1,565 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_CAMERA_H +#define QGLVIEWER_CAMERA_H + +#include "manipulatedCameraFrame.h" + + /*! \brief A perspective or orthographic camera. + \class Camera camera.h QGLViewer/camera.h + + A Camera defines some intrinsic parameters (fieldOfView(), position(), viewDirection(), + upVector()...) and useful positioning tools that ease its placement (showEntireScene(), + fitSphere(), lookAt()...). It exports its associated OpenGL projection and modelview matrices and + can interactively be modified using the mouse. + +

Mouse manipulation

+ + The position() and orientation() of the Camera are defined by a ManipulatedCameraFrame (retrieved + using frame()). These methods are just convenient wrappers to the equivalent Frame methods. This + also means that the Camera frame() can be attached to a Frame::referenceFrame() which enables + complex Camera setups. + + Different displacements can be performed using the mouse. The list of possible actions is defined + by the QGLViewer::MouseAction enum. Use QGLViewer::setMouseBinding() to attach a specific action + to an arbitrary mouse button-state key binding. These actions are detailed in the mouse page. + + The default button binding are: QGLViewer::ROTATE (left), QGLViewer::ZOOM (middle) and + QGLViewer::TRANSLATE (right). With this configuration, the Camera \e observes a scene and rotates + around its revolveAroundPoint(). You can switch between this mode and a fly mode using the + QGLViewer::CAMERA_MODE (see QGLViewer::toggleCameraMode()) keyboard shortcut (default is 'Space'). + +

Other functionalities

+ + The type() of the Camera can be Camera::ORTHOGRAPHIC or Camera::PERSPECTIVE (see Type()). + fieldOfView() is meaningless with Camera::ORTHOGRAPHIC. + + The near and far planes of the Camera are fitted to the scene and determined from + QGLViewer::sceneRadius(), QGLViewer::sceneCenter() and zClippingCoefficient() by the zNear() and + zFar() methods. Reasonable values on the scene extends hence have to be provided to the QGLViewer + in order for the Camera to correctly display the scene. High level positioning methods also use + this information (showEntireScene(), centerScene()...). + + A Camera holds KeyFrameInterpolator that can be used to save Camera positions and paths. You can + interactively addKeyFrameToPath() to a given path using the default \c Alt+F[1-12] shortcuts. Use + playPath() to make the Camera follow the path (default shortcut is F[1-12]). See the keyboard page for details on key customization. + + Use cameraCoordinatesOf() and worldCoordinatesOf() to convert to and from the Camera frame() + coordinate system. projectedCoordinatesOf() and unprojectedCoordinatesOf() will convert from + screen to 3D coordinates. convertClickToLine() is very useful for analytical object selection. + + Stereo display is possible on machines with quad buffer capabilities (with Camera::PERSPECTIVE + type() only). Test the stereoViewer example to check. + + A Camera can also be used outside of a QGLViewer or even without OpenGL for its coordinate system + conversion capabilities. Note however that some of them explicitly rely on the presence of a + Z-buffer. \nosubgrouping */ + class Camera + { + + public: + Camera(); + virtual ~Camera(); + + Camera(const Camera& camera); + Camera& operator=(const Camera& camera); + + + /*! Enumerates the two possible types of Camera. + + See type() and setType(). This type mainly defines different Camera projection matrix (see + loadProjectionMatrix()). Many other methods (pointUnderPixel(), convertClickToLine(), + projectedCoordinatesOf(), pixelGLRatio()...) take this Type into account. */ + enum Type { PERSPECTIVE, ORTHOGRAPHIC }; + + /*! @name Position and orientation */ + //@{ + public: + /*! Returns the Camera position (the eye), defined in the world coordinate system. + + Use setPosition() to set the Camera position. Other convenient methods are showEntireScene() or + fitSphere(). Actually returns \c frame()->position(). + + This position corresponds to the projection center of a Camera::PERSPECTIVE Camera. It is not + located in the image plane, which is at a zNear() distance ahead. */ + Vec position() const { return frame()->position(); }; + + /*! Returns the normalized up vector of the Camera, defined in the world coordinate system. + + Set using setUpVector() or setOrientation(). It is orthogonal to viewDirection() and to + rightVector(). + + It corresponds to the Y axis of the associated frame() (actually returns + frame()->inverseTransformOf(Vec(0.0, 1.0, 0.0)) ). */ + Vec upVector() const + { + return frame()->inverseTransformOf(Vec(0.0, 1.0, 0.0)); + } + /*! Returns the normalized view direction of the Camera, defined in the world coordinate system. + + Change this value using setViewDirection(), lookAt() or setOrientation(). It is orthogonal to + upVector() and to rightVector(). + + This corresponds to the negative Z axis of the frame() ( frame()->inverseTransformOf(Vec(0.0, + 0.0, -1.0)) ). */ + Vec viewDirection() const { return frame()->inverseTransformOf(Vec(0.0, 0.0, -1.0)); }; + + /*! Returns the normalized right vector of the Camera, defined in the world coordinate system. + + This vector lies in the Camera horizontal plane, directed along the X axis (orthogonal to + upVector() and to viewDirection()). Set using setUpVector(), lookAt() or setOrientation(). + + Simply returns frame()->inverseTransformOf(Vec(1.0, 0.0, 0.0)). */ + Vec rightVector() const + { + return frame()->inverseTransformOf(Vec(1.0, 0.0, 0.0)); + } + + /*! Returns the Camera orientation, defined in the world coordinate system. + + Actually returns \c frame()->orientation(). Use setOrientation(), setUpVector() or lookAt() to + set the Camera orientation. */ + Quaternion orientation() const { return frame()->orientation(); }; + + void setFromModelViewMatrix(const GLdouble* const modelViewMatrix); + void setFromProjectionMatrix(const float matrix[12]); + + public: + /*! Sets the Camera position() (the eye), defined in the world coordinate system. */ + void setPosition(const Vec& pos) { frame()->setPosition(pos); }; + void setOrientation(const Quaternion& q); + void setOrientation(float theta, float phi); + void setUpVector(const Vec& up, bool noMove=true); + void setViewDirection(const Vec& direction); + //@} + + + /*! @name Positioning tools */ + //@{ + public: + void lookAt(const Vec& target); + void showEntireScene(); + void fitSphere(const Vec& center, float radius); + void fitBoundingBox(const Vec& min, const Vec& max); + void centerScene(); + void interpolateToZoomOnPixel(const Point& pixel); + void interpolateToFitScene(); + void interpolateTo(const Frame& fr, float duration); + //@} + + + /*! @name Frustum */ + //@{ + public: + /*! Returns the Camera::Type of the Camera. + + Set by setType(). Mainly used by loadProjectionMatrix(). + + A Camera::PERSPECTIVE Camera uses a classical projection mainly defined by its fieldOfView(). + + With a Camera::ORTHOGRAPHIC type(), the fieldOfView() is meaningless and the width and height of + the Camera frustum are inferred from the distance to the revolveAroundPoint() using + getOrthoWidthHeight(). + + Both types use zNear() and zFar() (to define their clipping planes) and aspectRatio() (for + frustum shape). */ + Type type() const { return type_; }; + + /*! Returns the vertical field of view of the Camera (in radians). + + Value is set using setFieldOfView(). Default value is pi/4 radians. This value is meaningless if + the Camera type() is Camera::ORTHOGRAPHIC. + + The field of view corresponds the one used in \c gluPerspective (see manual). It sets the Y + (vertical) aperture of the Camera. The X (horizontal) angle is inferred from the window aspect + ratio (see aspectRatio() and horizontalFieldOfView()). + + Use setFOVToFitScene() to adapt the fieldOfView() to a given scene. */ + float fieldOfView() const { return fieldOfView_; }; + + /*! Returns the horizontal field of view of the Camera (in radians). + + Value is set using setHorizontalFieldOfView() or setFieldOfView(). These values + are always linked by: + \code + horizontalFieldOfView() = 2.0 * atan ( tan(fieldOfView()/2.0) * aspectRatio() ). + \endcode */ + float horizontalFieldOfView() const { return 2.0 * atan ( tan(fieldOfView()/2.0) * aspectRatio() ); }; + + /*! Returns the Camera aspect ratio defined by screenWidth() / screenHeight(). + + When the Camera is attached to a QGLViewer, these values and hence the aspectRatio() are + automatically fitted to the viewer's window aspect ratio using setScreenWidthAndHeight(). */ + float aspectRatio() const { return static_cast(screenWidth_)/static_cast(screenHeight_); }; + /*! Returns the width (in pixels) of the Camera screen. + + Set using setScreenWidthAndHeight(). This value is automatically fitted to the QGLViewer's + window dimensions when the Camera is attached to a QGLViewer. See also QGLWidget::width() */ + int screenWidth() const { return screenWidth_; }; + /*! Returns the height (in pixels) of the Camera screen. + + Set using setScreenWidthAndHeight(). This value is automatically fitted to the QGLViewer's + window dimensions when the Camera is attached to a QGLViewer. See also QGLWidget::height() */ + int screenHeight() const { return screenHeight_; }; + void getViewport(GLint viewport[4]) const; + float pixelGLRatio(const Vec& position) const; + + /*! Returns the coefficient which is used to set zNear() when the Camera is inside the sphere + defined by sceneCenter() and zClippingCoefficient() * sceneRadius(). + + In that case, the zNear() value is set to zNearCoefficient() * zClippingCoefficient() * + sceneRadius(). See the zNear() documentation for details. + + Default value is 0.005, which is appropriate for most applications. In case you need a high + dynamic ZBuffer precision, you can increase this value (~0.1). A lower value will prevent + clipping of very close objects at the expense of a worst Z precision. + + Only meaningful when Camera type is Camera::PERSPECTIVE. */ + float zNearCoefficient() const { return zNearCoef_; }; + /*! Returns the coefficient used to position the near and far clipping planes. + + The near (resp. far) clipping plane is positioned at a distance equal to zClippingCoefficient() * + sceneRadius() in front of (resp. behind) the sceneCenter(). This garantees an optimal use of + the z-buffer range and minimizes aliasing. See the zNear() and zFar() documentations. + + Default value is square root of 3.0 (so that a cube of size sceneRadius() is not clipped). + + However, since the sceneRadius() is used for other purposes (see showEntireScene(), flySpeed(), + ...) and you may want to change this value to define more precisely the location of the clipping + planes. See also zNearCoefficient(). + + For a total control on clipping planes' positions, an other option is to overload the zNear() + and zFar() methods. See the standardCamera example. + + \attention When QGLViewer::cameraPathAreEdited(), this value is set to 5.0 so that the Camera + paths are not clipped. The previous zClippingCoefficient() value is restored back when you leave + this mode. */ + float zClippingCoefficient() const { return zClippingCoef_; } + + virtual float zNear() const; + virtual float zFar() const; + virtual void getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight) const; + void getFrustumPlanesCoefficients(GLdouble coef[6][4]) const; + + public: + void setType(Type type); + + /*! Sets the vertical fieldOfView() of the Camera (in radians). + + Note that focusDistance() is set to sceneRadius() / tan(fieldOfView()/2) by this method. */ + void setFieldOfView(float fov) { fieldOfView_ = fov; setFocusDistance(sceneRadius() / tan(fov/2.0)); }; + + /*! Sets the horizontalFieldOfView() of the Camera (in radians). + + horizontalFieldOfView() and fieldOfView() are linked by the aspectRatio(). This method actually + calls setFieldOfView(( 2.0 * atan (tan(hfov / 2.0) / aspectRatio()) )) so that a call to + horizontalFieldOfView() returns the expected value. */ + void setHorizontalFieldOfView(float hfov) { setFieldOfView( 2.0 * atan (tan(hfov / 2.0) / aspectRatio()) ); }; + + void setFOVToFitScene(); + + /*! Defines the Camera aspectRatio(). + + This value is actually inferred from the screenWidth() / screenHeight() ratio. You should use + setScreenWidthAndHeight() instead. + + This method might however be convenient when the Camera is not associated with a QGLViewer. It + actually sets the screenHeight() to 100 and the screenWidth() accordingly. See also + setFOVToFitScene(). + + \note If you absolutely need an aspectRatio() that does not correspond to your viewer's window + dimensions, overload loadProjectionMatrix() or multiply the created GL_PROJECTION matrix by a + scaled diagonal matrix in your QGLViewer::draw() method. */ + void setAspectRatio(float aspect) { setScreenWidthAndHeight(int(100.0*aspect), 100); }; + + void setScreenWidthAndHeight(int width, int height); + /*! Sets the zNearCoefficient() value. */ + void setZNearCoefficient(float coef) { zNearCoef_ = coef; }; + /*! Sets the zClippingCoefficient() value. */ + void setZClippingCoefficient(float coef) { zClippingCoef_ = coef; } + //@} + + + /*! @name Scene radius and center */ + //@{ + public: + /*! Returns the radius of the scene observed by the Camera. + + You need to provide such an approximation of the scene dimensions so that the Camera can adapt + its zNear() and zFar() values. See the sceneCenter() documentation. + + See also setSceneBoundingBox(). + + Note that QGLViewer::sceneRadius() (resp. QGLViewer::setSceneRadius()) simply call this method + (resp. setSceneRadius()) on its associated QGLViewer::camera(). */ + float sceneRadius() const { return sceneRadius_; }; + + /*! Returns the position of the scene center, defined in the world coordinate system. + + The scene observed by the Camera should be roughly centered on this position, and included in a + sceneRadius() sphere. This approximate description of the scene permits a zNear() and zFar() + clipping planes definition, and allows convenient positioning methods such as showEntireScene(). + + Default value is (0,0,0) (world origin). Use setSceneCenter() to change it. See also + setSceneBoundingBox(). + + Note that QGLViewer::sceneCenter() (resp. QGLViewer::setSceneCenter()) simply call this method + (resp. setSceneCenter()) on its associated QGLViewer::camera(). */ + Vec sceneCenter() const { return sceneCenter_; }; + float distanceToSceneCenter() const; + + public: + void setSceneRadius(float radius); + void setSceneCenter(const Vec& center); + bool setSceneCenterFromPixel(const Point& pixel); + void setSceneBoundingBox(const Vec& min, const Vec& max); + //@} + + + /*! @name Revolve Around Point */ + //@{ + public: + void setRevolveAroundPoint(const Vec& rap); + bool setRevolveAroundPointFromPixel(const Point& pixel); + + public: + /*! The point the Camera revolves around with the QGLViewer::ROTATE mouse binding. Defined in world coordinate system. + + Default value is the sceneCenter(). + + \attention setSceneCenter() changes this value. */ + Vec revolveAroundPoint() const { return frame()->revolveAroundPoint(); }; + //@} + + + /*! @name Associated frame */ + //@{ + public: + /*! Returns the ManipulatedCameraFrame attached to the Camera. + + This ManipulatedCameraFrame defines its position() and orientation() and can translate mouse + events into Camera displacement. Set using setFrame(). */ + ManipulatedCameraFrame* frame() const { return frame_; }; + public: + void setFrame(ManipulatedCameraFrame* const mcf); + //@} + + + /*! @name KeyFramed paths */ + //@{ + public: + //KeyFrameInterpolator* keyFrameInterpolator(int i); + +public: + //void setKeyFrameInterpolator(int i, KeyFrameInterpolator* const kfi); + + //virtual void addKeyFrameToPath(int i); + //virtual void playPath(int i); + //virtual void deletePath(int i); + //virtual void resetPath(int i); + //@} + + + /*! @name OpenGL matrices */ + //@{ + public: + virtual void loadProjectionMatrix(bool reset=true) const; + virtual void loadModelViewMatrix(bool reset=true) const; + void computeProjectionMatrix() const; + void computeModelViewMatrix() const; + + virtual void loadProjectionMatrixStereo(bool leftBuffer=true) const; + virtual void loadModelViewMatrixStereo(bool leftBuffer=true) const; + + void getProjectionMatrix(GLdouble m[16]) const; + void getModelViewMatrix(GLdouble m[16]) const; + void getModelViewProjectionMatrix(GLdouble m[16]) const; + +#ifndef DOXYGEN + // Required for windows which otherwise silently fills + void getProjectionMatrix(GLfloat m[16]) const; + void getModelViewMatrix(GLfloat m[16]) const; +#endif + //@} + + + /*! @name Drawing */ + //@{ +#ifndef DOXYGEN + static void drawCamera(float scale=1.0, float aspectRatio=1.33, float fieldOfView=M_PI/4.0); +#endif + virtual void draw(bool drawFarPlane=true, float scale=1.0) const; + //@} + + + /*! @name World to Camera coordinate systems conversions */ + //@{ + public: + /*! Returns the Camera frame coordinates of a point \p src defined in world coordinates. + + worldCoordinatesOf() performs the inverse transformation. + + Note that the point coordinates are simply converted in a different coordinate system. They are + not projected on screen. Use projectedCoordinatesOf() for that. */ + Vec cameraCoordinatesOf(const Vec& src) const { return frame()->coordinatesOf(src); }; + /*! Returns the world coordinates of the point whose position \p src is defined in the Camera + coordinate system. + + cameraCoordinatesOf() performs the inverse transformation. */ + Vec worldCoordinatesOf(const Vec& src) const { return frame()->inverseCoordinatesOf(src); }; + void getCameraCoordinatesOf(const float src[3], float res[3]) const; + void getWorldCoordinatesOf(const float src[3], float res[3]) const; + //@} + + + /*! @name 2D screen to 3D world coordinate systems conversions */ + //@{ + public: + Vec projectedCoordinatesOf(const Vec& src, const Frame* frame=NULL) const; + Vec unprojectedCoordinatesOf(const Vec& src, const Frame* frame=NULL) const; + void getProjectedCoordinatesOf(const float src[3], float res[3], const Frame* frame=NULL) const; + void getUnprojectedCoordinatesOf(const float src[3], float res[3], const Frame* frame=NULL) const; + void convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const; + Vec pointUnderPixel(const Point& pixel, bool& found) const; + //@} + + + /*! @name Fly speed */ + //@{ + public: + /*! Returns the fly speed of the Camera. + + Simply returns frame()->flySpeed(). See the ManipulatedCameraFrame::flySpeed() documentation. + This value is only meaningful when the MouseAction bindings is QGLViewer::MOVE_FORWARD or + QGLViewer::MOVE_BACKWARD. + + Set to 0.5% of the sceneRadius() by setSceneRadius(). See also setFlySpeed(). */ + float flySpeed() const { return frame()->flySpeed(); }; + public: + /*! Sets the Camera flySpeed(). + + \attention This value is modified by setSceneRadius(). */ + void setFlySpeed(float speed) { frame()->setFlySpeed(speed); }; + //@} + + + /*! @name Stereo parameters */ + //@{ + public: + /*! Returns the user's inter-ocular distance (in meters). Default value is 0.062m, which fits most people. + + loadProjectionMatrixStereo() uses this value to define the Camera offset and frustum. See + setIODistance(). */ + float IODistance() const { return IODistance_; }; + + /*! Returns the physical distance between the user's eyes and the screen (in meters). + + Default value is 0.5m. + + Used by loadModelViewMatrixStereo() and loadProjectionMatrixStereo() for stereo display. Value + is set using setPhysicalDistanceToScreen(). + + physicalDistanceToScreen() and focusDistance() represent the same distance. The first one is + expressed in physical real world units, while the latter is expressed in OpenGL virtual world + units. Use their ratio to convert distances between these worlds. + + Use the following code to detect a reality center configuration (using its screen aspect ratio) + and to automatically set physical distances accordingly: + \code + QDesktopWidget screen; + if (fabs((float)screen.width() / (float)screen.height()) > 2.0) + { + camera()->setPhysicalDistanceToScreen(4.0); + camera()->setPhysicalScreenWidth(10.0); + } + \endcode */ + float physicalDistanceToScreen() const { return physicalDistanceToScreen_; }; + + /*! Returns the physical screen width, in meters. Default value is 0.4m (average monitor). + + Used for stereo display only (see loadModelViewMatrixStereo() and loadProjectionMatrixStereo()). + Set using setPhysicalScreenWidth(). + + See physicalDistanceToScreen() for reality center automatic configuration. */ + float physicalScreenWidth() const { return physicalScreenWidth_; }; + + /*! Returns the focus distance used by stereo display, expressed in OpenGL units. + + This is the distance in the virtual world between the Camera and the plane where the horizontal + stereo parallax is null (the stereo left and right images are superimposed). + + This distance is the virtual world equivalent of the real-world physicalDistanceToScreen(). + + \attention This value is modified by QGLViewer::setSceneRadius(), setSceneRadius() and + setFieldOfView(). When one of these values is modified, focusDistance() is set to sceneRadius() + / tan(fieldOfView()/2), which provides good results. */ + float focusDistance() const { return focusDistance_; }; + public: + /*! Sets the IODistance(). */ + void setIODistance(float distance) { IODistance_ = distance; }; + + /*! Sets the physicalDistanceToScreen(). */ + void setPhysicalDistanceToScreen(float distance) { physicalDistanceToScreen_ = distance; }; + + /*! Sets the physical screen (monitor or projected wall) width (in meters). */ + void setPhysicalScreenWidth(float width) { physicalScreenWidth_ = width; }; + + /*! Sets the focusDistance(), in OpenGL scene units. */ + void setFocusDistance(float distance) { focusDistance_ = distance; }; + //@} + + + private: + // F r a m e + ManipulatedCameraFrame* frame_; + + // C a m e r a p a r a m e t e r s + int screenWidth_, screenHeight_; // size of the window, in pixels + float fieldOfView_; // in radians + Vec sceneCenter_; + float sceneRadius_; // OpenGL units + float zNearCoef_; + float zClippingCoef_; + float orthoCoef_; + Type type_; // PERSPECTIVE or ORTHOGRAPHIC + mutable GLdouble modelViewMatrix_[16]; // Buffered model view matrix. + mutable GLdouble projectionMatrix_[16]; // Buffered projection matrix. + + // S t e r e o p a r a m e t e r s + float IODistance_; // inter-ocular distance, in meters + float focusDistance_; // in scene units + float physicalDistanceToScreen_; // in meters + float physicalScreenWidth_; // in meters + + // P o i n t s o f V i e w s a n d K e y F r a m e s + //map kfi_; + //KeyFrameInterpolator* interpolationKfi_; + }; + + +#endif // QGLVIEWER_CAMERA_H diff --git a/source/blender/freestyle/intern/app_blender/config.h b/source/blender/freestyle/intern/app_blender/config.h new file mode 100644 index 00000000000..c1b65aad560 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/config.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////// +// libQGLViewer configuration file // +// Modify these settings according to your local configuration // +/////////////////////////////////////////////////////////////////// + +#ifndef QGLVIEWER_CONFIG_H +#define QGLVIEWER_CONFIG_H + + + + + +#include +#include + +#include +#include + +using namespace std; + +#include "point.h" + +# ifdef WIN32 +# include +# endif +# ifdef __MACH__ +# include +# else +# include +# endif + +#ifdef __APPLE_CC__ + #include +#else + #include +#endif + +#ifndef Q_UNUSED + # define Q_UNUSED(x) (void)x; +#endif + +template +inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; } +template +inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; } +template +inline const T &qBound(const T &min, const T &val, const T &max) +{ return qMax(min, qMin(max, val)); } + +#endif // QGLVIEWER_CONFIG_H diff --git a/source/blender/freestyle/intern/app_blender/constraint.h b/source/blender/freestyle/intern/app_blender/constraint.h new file mode 100644 index 00000000000..871cb2be098 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/constraint.h @@ -0,0 +1,341 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_CONSTRAINT_H +#define QGLVIEWER_CONSTRAINT_H + +#include "vec.h" +#include "quaternion.h" + +//namespace qglviewer { + class Frame; + class Camera; + + /*! \brief An interface class for Frame constraints. + \class Constraint constraint.h QGLViewer/constraint.h + + This class defines the interface for the Constraints that can be applied to a Frame to limit its + motion. Use Frame::setConstraint() to associate a Constraint to a Frame (default is a \c NULL + Frame::constraint()). + +

How does it work ?

+ + The Constraint acts as a filter on the translation and rotation Frame increments. + constrainTranslation() and constrainRotation() should be overloaded to specify the constraint + behavior: the desired displacement is given as a parameter that can optionally be modified. + + Here is how the Frame::translate() and Frame::rotate() methods use the Constraint: + \code + Frame::translate(Vec& T) + { + if (constraint()) + constraint()->constrainTranslation(T, this); + t += T; + } + + Frame::rotate(Quaternion& Q) + { + if (constraint()) + constraint()->constrainRotation(Q, this); + q *= Q; + } + \endcode + + The default behavior of constrainTranslation() and constrainRotation() is empty (meaning no + filtering). + + The Frame which uses the Constraint is passed as a parameter to the constrainTranslation() and + constrainRotation() methods, so that they can have access to its current state (mainly + Frame::position() and Frame::orientation()). It is not \c const for versatility reasons, but + directly modifying it should be avoided. + + \attention Frame::setTranslation(), Frame::setRotation() and similar methods will actually indeed + set the frame position and orientation, without taking the constraint into account. Use the \e + WithConstraint versions of these methods to enforce the Constraint. + +

Implemented Constraints

+ + Classical axial and plane Constraints are provided for convenience: see the LocalConstraint, + WorldConstraint and CameraConstraint classes' documentations. + + Try the constrainedFrame and constrainedCamera examples for an illustration. + +

Creating new Constraints

+ + The implementation of a new Constraint class simply consists in overloading the filtering methods: + \code + // This Constraint enforces that the Frame cannot have a negative z world coordinate. + class myConstraint : public Constraint + { + public: + virtual void constrainTranslation(Vec& t, Frame * const fr) + { + // Express t in the world coordinate system. + const Vec tWorld = fr->inverseTransformOf(t); + if (fr->position().z + tWorld.z < 0.0) // check the new fr z coordinate + t.z = fr->transformOf(-fr->position().z); // t.z is clamped so that next z position is 0.0 + } + }; + \endcode + + Note that the translation (resp. rotation) parameter passed to constrainTranslation() (resp. + constrainRotation()) is expressed in the \e local Frame coordinate system. Here, we use the + Frame::transformOf() and Frame::inverseTransformOf() method to convert it to and from the world + coordinate system. + + Combined constraints can easily be achieved by creating a new class that applies the different + constraint filters: + \code + myConstraint::constrainTranslation(Vec& v, Frame* const fr) + { + constraint1->constrainTranslation(v, fr); + constraint2->constrainTranslation(v, fr); + // and so on, with possible branches, tests, loops... + } + \endcode + */ + class Constraint + { + public: + /*! Virtual destructor. Empty. */ + virtual ~Constraint() {}; + + /*! Filters the translation applied to the \p frame. This default implementation is empty (no + filtering). + + Overload this method in your own Constraint class to define a new translation constraint. \p + frame is the Frame to which is applied the translation. It is not defined \c const, but you + should refrain from directly changing its value in the constraint. Use its Frame::position() and + update the \p translation accordingly instead. + + \p translation is expressed in local frame coordinate system. Use Frame::inverseTransformOf() to + express it in the world coordinate system if needed. */ + virtual void constrainTranslation(Vec& translation, Frame* const frame) { Q_UNUSED(translation); Q_UNUSED(frame); }; + /*! Filters the rotation applied to the \p frame. This default implementation is empty (no + filtering). + + Overload this method in your own Constraint class to define a new rotation constraint. See + constrainTranslation() for details. + + Use Frame::inverseTransformOf() on the \p rotation Quaternion::axis() to express \p rotation in + the world coordinate system if needed. */ + virtual void constrainRotation(Quaternion& rotation, Frame* const frame) { Q_UNUSED(rotation); Q_UNUSED(frame); }; + }; + + /*! + \brief An abstract class for Frame Constraints defined by an axis or a plane. + \class AxisPlaneConstraint constraint.h QGLViewer/constraint.h + + AxisPlaneConstraint is an interface for (translation and/or rotation) Constraint that are defined + by a direction. translationConstraintType() and rotationConstraintType() define how this + direction should be interpreted: as an axis (AxisPlaneConstraint::AXIS) or as a plane normal + (AxisPlaneConstraint::PLANE). See the Type() documentation for details. + + The three implementations of this class: LocalConstraint, WorldConstraint and CameraConstraint + differ by the coordinate system in which this direction is expressed. + + Different implementations of this class are illustrated in the + contrainedCamera and + constrainedFrame examples. + + \attention When applied, the rotational Constraint may not intuitively follow the mouseQU + displacement. A solution would be to directly measure the rotation angle in screen coordinates, + but that would imply to know the QGLViewer::camera(), so that we can compute the projected + coordinates of the rotation center (as is done with the QGLViewer::SCREEN_ROTATE binding). + However, adding an extra pointer to the QGLViewer::camera() in all the AxisPlaneConstraint + derived classes (which the user would have to update in a multi-viewer application) was judged as + an overkill. */ + class AxisPlaneConstraint : public Constraint + { + public: + AxisPlaneConstraint(); + /*! Virtual destructor. Empty. */ + virtual ~AxisPlaneConstraint() {}; + + /*! Type lists the different types of translation and rotation constraints that are available. + + It specifies the meaning of the constraint direction (see translationConstraintDirection() and + rotationConstraintDirection()): as an axis direction (AxisPlaneConstraint::AXIS) or a plane + normal (AxisPlaneConstraint::PLANE). AxisPlaneConstraint::FREE means no constraint while + AxisPlaneConstraint::FORBIDDEN completely forbids the translation and/or the rotation. + + See translationConstraintType() and rotationConstraintType(). + + \attention The AxisPlaneConstraint::PLANE Type is not valid for rotational constraint. + + New derived classes can use their own extended enum for specific constraints: + \code + class MyAxisPlaneConstraint : public AxisPlaneConstraint + { + public: + enum MyType { FREE, AXIS, PLANE, FORBIDDEN, CUSTOM }; + virtual void constrainTranslation(Vec &translation, Frame *const frame) + { + // translationConstraintType() is simply an int. CUSTOM Type is handled seamlessly. + switch (translationConstraintType()) + { + case MyAxisPlaneConstraint::FREE: ... break; + case MyAxisPlaneConstraint::CUSTOM: ... break; + } + }; + + MyAxisPlaneConstraint* c = new MyAxisPlaneConstraint(); + // Note the Type conversion + c->setTranslationConstraintType(AxisPlaneConstraint::Type(MyAxisPlaneConstraint::CUSTOM)); + }; + \endcode */ + enum Type { FREE, AXIS, PLANE, FORBIDDEN }; + + /*! @name Translation constraint */ + //@{ + /*! Overloading of Constraint::constrainTranslation(). Empty */ + virtual void constrainTranslation(Vec& translation, Frame* const frame) { Q_UNUSED(translation); Q_UNUSED(frame); }; + + void setTranslationConstraint(Type type, const Vec& direction); + /*! Sets the Type() of the translationConstraintType(). Default is AxisPlaneConstraint::FREE. */ + void setTranslationConstraintType(Type type) { translationConstraintType_ = type; }; + void setTranslationConstraintDirection(const Vec& direction); + + /*! Returns the translation constraint Type(). + + Depending on this value, the Frame will freely translate (AxisPlaneConstraint::FREE), will only + be able to translate along an axis direction (AxisPlaneConstraint::AXIS), will be forced to stay + into a plane (AxisPlaneConstraint::PLANE) or will not able to translate at all + (AxisPlaneConstraint::FORBIDDEN). + + Use Frame::setPosition() to define the position of the constrained Frame before it gets + constrained. */ + Type translationConstraintType() const { return translationConstraintType_; }; + /*! Returns the direction used by the translation constraint. + + It represents the axis direction (AxisPlaneConstraint::AXIS) or the plane normal + (AxisPlaneConstraint::PLANE) depending on the translationConstraintType(). It is undefined for + AxisPlaneConstraint::FREE or AxisPlaneConstraint::FORBIDDEN. + + The AxisPlaneConstraint derived classes express this direction in different coordinate system + (camera for CameraConstraint, local for LocalConstraint, and world for WorldConstraint). This + value can be modified with setTranslationConstraintDirection(). */ + Vec translationConstraintDirection() const { return translationConstraintDir_; }; + //@} + + /*! @name Rotation constraint */ + //@{ + /*! Overloading of Constraint::constrainRotation(). Empty. */ + virtual void constrainRotation(Quaternion& rotation, Frame* const frame) { Q_UNUSED(rotation); Q_UNUSED(frame); }; + + void setRotationConstraint(Type type, const Vec& direction); + void setRotationConstraintType(Type type); + void setRotationConstraintDirection(const Vec& direction); + + /*! Returns the rotation constraint Type(). */ + Type rotationConstraintType() const { return rotationConstraintType_; }; + /*! Returns the axis direction used by the rotation constraint. + + This direction is defined only when rotationConstraintType() is AxisPlaneConstraint::AXIS. + + The AxisPlaneConstraint derived classes express this direction in different coordinate system + (camera for CameraConstraint, local for LocalConstraint, and world for WorldConstraint). This + value can be modified with setRotationConstraintDirection(). */ + Vec rotationConstraintDirection() const { return rotationConstraintDir_; }; + //@} + + private: + // int and not Type to allow for overloading and new types definition. + Type translationConstraintType_; + Type rotationConstraintType_; + + Vec translationConstraintDir_; + Vec rotationConstraintDir_; + }; + + + /*! \brief An AxisPlaneConstraint defined in the Frame local coordinate system. + \class LocalConstraint constraint.h QGLViewer/constraint.h + + The translationConstraintDirection() and rotationConstraintDirection() are expressed in the Frame + local coordinate system (see Frame::referenceFrame()). + + See the constrainedFrame example for an illustration. */ + class LocalConstraint : public AxisPlaneConstraint + { + public: + /*! Virtual destructor. Empty. */ + virtual ~LocalConstraint() {}; + + virtual void constrainTranslation(Vec& translation, Frame* const frame); + virtual void constrainRotation (Quaternion& rotation, Frame* const frame); + }; + + + + /*! \brief An AxisPlaneConstraint defined in the world coordinate system. + \class WorldConstraint constraint.h QGLViewer/constraint.h + + The translationConstraintDirection() and rotationConstraintDirection() are expressed in world + coordinate system. + + See the constrainedFrame and multiView examples for an illustration. */ + class WorldConstraint : public AxisPlaneConstraint + { + public: + /*! Virtual destructor. Empty. */ + virtual ~WorldConstraint() {}; + + virtual void constrainTranslation(Vec& translation, Frame* const frame); + virtual void constrainRotation (Quaternion& rotation, Frame* const frame); + }; + + + + /*! \brief An AxisPlaneConstraint defined in the camera coordinate system. + \class CameraConstraint constraint.h QGLViewer/constraint.h + + The translationConstraintDirection() and rotationConstraintDirection() are expressed in the + associated camera() coordinate system. + + See the constrainedFrame and constrainedCamera examples for an illustration. */ + class CameraConstraint : public AxisPlaneConstraint + { + public: + explicit CameraConstraint(const Camera* const camera); + /*! Virtual destructor. Empty. */ + virtual ~CameraConstraint() {}; + + virtual void constrainTranslation(Vec& translation, Frame* const frame); + virtual void constrainRotation (Quaternion& rotation, Frame* const frame); + + /*! Returns the associated Camera. Set using the CameraConstraint constructor. */ + const Camera* camera() const { return camera_; }; + + private: + const Camera* const camera_; + }; + +//} // namespace qglviewer + +#endif // QGLVIEWER_CONSTRAINT_H diff --git a/source/blender/freestyle/intern/app_blender/frame.cpp b/source/blender/freestyle/intern/app_blender/frame.cpp new file mode 100644 index 00000000000..26c2ee5d2b4 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/frame.cpp @@ -0,0 +1,1070 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "frame.h" +#include + +//using namespace qglviewer; +using namespace std; + + +/*! Creates a default Frame. + + Its position() is (0,0,0) and it has an identity orientation() Quaternion. The referenceFrame() + and the constraint() are \c NULL. */ +Frame::Frame() + : constraint_(NULL), referenceFrame_(NULL) +{} + +/*! Creates a Frame with a position() and an orientation(). + + See the Vec and Quaternion documentations for convenient constructors and methods. + + The Frame is defined in the world coordinate system (its referenceFrame() is \c NULL). It + has a \c NULL associated constraint(). */ +Frame::Frame(const Vec& position, const Quaternion& orientation) + : t_(position), q_(orientation), constraint_(NULL), referenceFrame_(NULL) +{} + +/*! Equal operator. + + The referenceFrame() and constraint() pointers are copied. + + \attention Signal and slot connections are not copied. */ +Frame& Frame::operator=(const Frame& frame) +{ + // Automatic compiler generated version would not emit the modified signals as is done in + // setTranslationAndRotation. + setTranslationAndRotation(frame.translation(), frame.rotation()); + setConstraint(frame.constraint()); + setReferenceFrame(frame.referenceFrame()); + return *this; +} + +/*! Copy constructor. + + The translation() and rotation() as well as constraint() and referenceFrame() pointers are + copied. */ +Frame::Frame(const Frame& frame) +{ + (*this) = frame; +} + +/////////////////////////////// MATRICES ////////////////////////////////////// + +/*! Returns the 4x4 OpenGL transformation matrix represented by the Frame. + + This method should be used in conjunction with \c glMultMatrixd() to modify the OpenGL modelview + matrix from a Frame hierarchy. With this Frame hierarchy: + \code + Frame* body = new Frame(); + Frame* leftArm = new Frame(); + Frame* rightArm = new Frame(); + leftArm->setReferenceFrame(body); + rightArm->setReferenceFrame(body); + \endcode + + The associated OpenGL drawing code should look like: + \code + void Viewer::draw() + { + glPushMatrix(); + glMultMatrixd(body->matrix()); + drawBody(); + + glPushMatrix(); + glMultMatrixd(leftArm->matrix()); + drawArm(); + glPopMatrix(); + + glPushMatrix(); + glMultMatrixd(rightArm->matrix()); + drawArm(); + glPopMatrix(); + + glPopMatrix(); + } + \endcode + Note the use of nested \c glPushMatrix() and \c glPopMatrix() blocks to represent the frame hierarchy: \c + leftArm and \c rightArm are both correctly drawn with respect to the \c body coordinate system. + + This matrix only represents the local Frame transformation (i.e. with respect to the + referenceFrame()). Use worldMatrix() to get the full Frame transformation matrix (i.e. from the + world to the Frame coordinate system). These two match when the referenceFrame() is \c NULL. + + The result is only valid until the next call to matrix(), getMatrix(), worldMatrix() or + getWorldMatrix(). Use it immediately (as above) or use getMatrix() instead. + + \attention The OpenGL format of the result is the transpose of the actual mathematical European + representation (translation is on the last \e line instead of the last \e column). + + \note The scaling factor of the 4x4 matrix is 1.0. */ +const GLdouble* Frame::matrix() const +{ + static GLdouble m[4][4]; + getMatrix(m); + return (const GLdouble*)(m); +} + +/*! \c GLdouble[4][4] version of matrix(). See also getWorldMatrix() and matrix(). */ +void Frame::getMatrix(GLdouble m[4][4]) const +{ + q_.getMatrix(m); + + m[3][0] = t_[0]; + m[3][1] = t_[1]; + m[3][2] = t_[2]; +} + +/*! \c GLdouble[16] version of matrix(). See also getWorldMatrix() and matrix(). */ +void Frame::getMatrix(GLdouble m[16]) const +{ + q_.getMatrix(m); + + m[12] = t_[0]; + m[13] = t_[1]; + m[14] = t_[2]; +} + +/*! Returns a Frame representing the inverse of the Frame space transformation. + + The rotation() of the new Frame is the Quaternion::inverse() of the original rotation. + Its translation() is the negated inverse rotated image of the original translation. + + If a Frame is considered as a space rigid transformation (translation and rotation), the inverse() + Frame performs the inverse transformation. + + Only the local Frame transformation (i.e. defined with respect to the referenceFrame()) is inverted. + Use worldInverse() for a global inverse. + + The resulting Frame has the same referenceFrame() as the Frame and a \c NULL constraint(). + + \note The scaling factor of the 4x4 matrix is 1.0. */ +Frame Frame::inverse() const +{ + Frame fr(-(q_.inverseRotate(t_)), q_.inverse()); + fr.setReferenceFrame(referenceFrame()); + return fr; +} + +/*! Returns the 4x4 OpenGL transformation matrix represented by the Frame. + + This method should be used in conjunction with \c glMultMatrixd() to modify + the OpenGL modelview matrix from a Frame: + \code + // The modelview here corresponds to the world coordinate system. + Frame fr(pos, Quaternion(from, to)); + glPushMatrix(); + glMultMatrixd(fr.worldMatrix()); + // draw object in the fr coordinate system. + glPopMatrix(); + \endcode + + This matrix represents the global Frame transformation: the entire referenceFrame() hierarchy is + taken into account to define the Frame transformation from the world coordinate system. Use + matrix() to get the local Frame transformation matrix (i.e. defined with respect to the + referenceFrame()). These two match when the referenceFrame() is \c NULL. + + The OpenGL format of the result is the transpose of the actual mathematical European + representation (translation is on the last \e line instead of the last \e column). + + \attention The result is only valid until the next call to matrix(), getMatrix(), worldMatrix() or + getWorldMatrix(). Use it immediately (as above) or use getWorldMatrix() instead. + + \note The scaling factor of the 4x4 matrix is 1.0. */ +const GLdouble* Frame::worldMatrix() const +{ + // This test is done for efficiency reasons (creates lots of temp objects otherwise). + if (referenceFrame()) + { + static Frame fr; + fr.setTranslation(position()); + fr.setRotation(orientation()); + return fr.matrix(); + } + else + return matrix(); +} + +/*! float[4][4] parameter version of worldMatrix(). See also getMatrix() and matrix(). */ +void Frame::getWorldMatrix(GLdouble m[4][4]) const +{ + const GLdouble* mat = worldMatrix(); + for (int i=0; i<4; ++i) + for (int j=0; j<4; ++j) + m[i][j] = mat[i*4+j]; +} + +/*! float[16] parameter version of worldMatrix(). See also getMatrix() and matrix(). */ +void Frame::getWorldMatrix(GLdouble m[16]) const +{ + const GLdouble* mat = worldMatrix(); + for (int i=0; i<16; ++i) + m[i] = mat[i]; +} + +/*! This is an overloaded method provided for convenience. Same as setFromMatrix(). */ +void Frame::setFromMatrix(const GLdouble m[4][4]) +{ + if (fabs(m[3][3]) < 1E-8) + { + cout << "Frame::setFromMatrix: Null homogeneous coefficient" << endl; + return; + } + + double rot[3][3]; + for (int i=0; i<3; ++i) + { + t_[i] = m[3][i] / m[3][3]; + for (int j=0; j<3; ++j) + // Beware of the transposition (OpenGL to European math) + rot[i][j] = m[j][i] / m[3][3]; + } + q_.setFromRotationMatrix(rot); +} + +/*! Sets the Frame from an OpenGL matrix representation (rotation in the upper left 3x3 matrix and + translation on the last line). + + Hence, if a code fragment looks like: + \code + GLdouble m[16]={...}; + glMultMatrixd(m); + \endcode + It is equivalent to write: + \code + Frame fr; + fr.setFromMatrix(m); + glMultMatrixd(fr.matrix()); + \endcode + + Using this conversion, you can benefit from the powerful Frame transformation methods to translate + points and vectors to and from the Frame coordinate system to any other Frame coordinate system + (including the world coordinate system). See coordinatesOf() and transformOf(). + + Emits the modified() signal. See also matrix(), getMatrix() and + Quaternion::setFromRotationMatrix(). + + \attention A Frame does not contain a scale factor. The possible scaling in \p m will not be + converted into the Frame by this method. */ +void Frame::setFromMatrix(const GLdouble m[16]) +{ + GLdouble mat[4][4]; + for (int i=0; i<4; ++i) + for (int j=0; j<4; ++j) + mat[i][j] = m[i*4+j]; + setFromMatrix(mat); +} + +//////////////////// SET AND GET LOCAL TRANSLATION AND ROTATION /////////////////////////////// + + +/*! Same as setTranslation(), but with \p float parameters. */ +void Frame::setTranslation(float x, float y, float z) +{ + setTranslation(Vec(x, y, z)); +} + +/*! Fill \c x, \c y and \c z with the translation() of the Frame. */ +void Frame::getTranslation(float& x, float& y, float& z) const +{ + const Vec t = translation(); + x = t[0]; + y = t[1]; + z = t[2]; +} + +/*! Same as setRotation() but with \c float Quaternion parameters. */ +void Frame::setRotation(double q0, double q1, double q2, double q3) +{ + setRotation(Quaternion(q0, q1, q2, q3)); +} + +/*! The \p q are set to the rotation() of the Frame. + +See Quaternion::Quaternion(double, double, double, double) for details on \c q. */ +void Frame::getRotation(double& q0, double& q1, double& q2, double& q3) const +{ + const Quaternion q = rotation(); + q0 = q[0]; + q1 = q[1]; + q2 = q[2]; + q3 = q[3]; +} + +//////////////////////////////////////////////////////////////////////////////// + +/*! Translates the Frame of \p t (defined in the Frame coordinate system). + + The translation actually applied to the Frame may differ from \p t since it can be filtered by the + constraint(). Use translate(Vec&) or setTranslationWithConstraint() to retrieve the filtered + translation value. Use setTranslation() to directly translate the Frame without taking the + constraint() into account. + + See also rotate(const Quaternion&). Emits the modified() signal. */ +void Frame::translate(const Vec& t) +{ + Vec tbis = t; + translate(tbis); +} + +/*! Same as translate(const Vec&) but \p t may be modified to satisfy the translation constraint(). + Its new value corresponds to the translation that has actually been applied to the Frame. */ +void Frame::translate(Vec& t) +{ + if (constraint()) + constraint()->constrainTranslation(t, this); + t_ += t; +} + +/*! Same as translate(const Vec&) but with \c float parameters. */ +void Frame::translate(float x, float y, float z) +{ + Vec t(x,y,z); + translate(t); +} + +/*! Same as translate(Vec&) but with \c float parameters. */ +void Frame::translate(float& x, float& y, float& z) +{ + Vec t(x,y,z); + translate(t); + x = t[0]; + y = t[1]; + z = t[2]; +} + +/*! Rotates the Frame by \p q (defined in the Frame coordinate system): R = R*q. + + The rotation actually applied to the Frame may differ from \p q since it can be filtered by the + constraint(). Use rotate(Quaternion&) or setRotationWithConstraint() to retrieve the filtered + rotation value. Use setRotation() to directly rotate the Frame without taking the constraint() + into account. + + See also translate(const Vec&). Emits the modified() signal. */ +void Frame::rotate(const Quaternion& q) +{ + Quaternion qbis = q; + rotate(qbis); +} + +/*! Same as rotate(const Quaternion&) but \p q may be modified to satisfy the rotation constraint(). + Its new value corresponds to the rotation that has actually been applied to the Frame. */ +void Frame::rotate(Quaternion& q) +{ + if (constraint()) + constraint()->constrainRotation(q, this); + q_ *= q; + q_.normalize(); // Prevents numerical drift +} + +/*! Same as rotate(Quaternion&) but with \c float Quaternion parameters. */ +void Frame::rotate(double& q0, double& q1, double& q2, double& q3) +{ + Quaternion q(q0,q1,q2,q3); + rotate(q); + q0 = q[0]; + q1 = q[1]; + q2 = q[2]; + q3 = q[3]; +} + +/*! Same as rotate(const Quaternion&) but with \c float Quaternion parameters. */ +void Frame::rotate(double q0, double q1, double q2, double q3) +{ + Quaternion q(q0,q1,q2,q3); + rotate(q); +} + +/*! Makes the Frame rotate() by \p rotation around \p point. + + \p point is defined in the world coordinate system, while the \p rotation axis is defined in the + Frame coordinate system. + + If the Frame has a constraint(), \p rotation is first constrained using + Constraint::constrainRotation(). The translation which results from the filtered rotation around + \p point is then computed and filtered using Constraint::constrainTranslation(). The new \p + rotation value corresponds to the rotation that has actually been applied to the Frame. + + Emits the modified() signal. */ +void Frame::rotateAroundPoint(Quaternion& rotation, const Vec& point) +{ + if (constraint()) + constraint()->constrainRotation(rotation, this); + q_ *= rotation; + q_.normalize(); // Prevents numerical drift + Vec trans = point + Quaternion(inverseTransformOf(rotation.axis()), rotation.angle()).rotate(position()-point) - t_; + if (constraint()) + constraint()->constrainTranslation(trans, this); + t_ += trans; +} + +/*! Same as rotateAroundPoint(), but with a \c const \p rotation Quaternion. Note that the actual + rotation may differ since it can be filtered by the constraint(). */ +void Frame::rotateAroundPoint(const Quaternion& rotation, const Vec& point) +{ + Quaternion rot = rotation; + rotateAroundPoint(rot, point); +} + +//////////////////// SET AND GET WORLD POSITION AND ORIENTATION /////////////////////////////// + +/*! Sets the position() of the Frame, defined in the world coordinate system. Emits the modified() + signal. + +Use setTranslation() to define the \e local frame translation (with respect to the +referenceFrame()). The potential constraint() of the Frame is not taken into account, use +setPositionWithConstraint() instead. */ +void Frame::setPosition(const Vec& position) +{ + if (referenceFrame()) + setTranslation(referenceFrame()->coordinatesOf(position)); + else + setTranslation(position); +} + +/*! Same as setPosition(), but with \c float parameters. */ +void Frame::setPosition(float x, float y, float z) +{ + setPosition(Vec(x, y, z)); +} + +/*! Same as successive calls to setPosition() and then setOrientation(). + +Only one modified() signal is emitted, which is convenient if this signal is connected to a +QGLViewer::updateGL() slot. See also setTranslationAndRotation() and +setPositionAndOrientationWithConstraint(). */ +void Frame::setPositionAndOrientation(const Vec& position, const Quaternion& orientation) +{ + if (referenceFrame()) + { + t_ = referenceFrame()->coordinatesOf(position); + q_ = referenceFrame()->orientation().inverse() * orientation; + } + else + { + t_ = position; + q_ = orientation; + } +} + + +/*! Same as successive calls to setTranslation() and then setRotation(). + +Only one modified() signal is emitted, which is convenient if this signal is connected to a +QGLViewer::updateGL() slot. See also setPositionAndOrientation() and +setTranslationAndRotationWithConstraint(). */ +void Frame::setTranslationAndRotation(const Vec& translation, const Quaternion& rotation) +{ + t_ = translation; + q_ = rotation; +} + + +/*! \p x, \p y and \p z are set to the position() of the Frame. */ +void Frame::getPosition(float& x, float& y, float& z) const +{ + Vec p = position(); + x = p.x; + y = p.y; + z = p.z; +} + +/*! Sets the orientation() of the Frame, defined in the world coordinate system. Emits the modified() signal. + +Use setRotation() to define the \e local frame rotation (with respect to the referenceFrame()). The +potential constraint() of the Frame is not taken into account, use setOrientationWithConstraint() +instead. */ +void Frame::setOrientation(const Quaternion& orientation) +{ + if (referenceFrame()) + setRotation(referenceFrame()->orientation().inverse() * orientation); + else + setRotation(orientation); +} + +/*! Same as setOrientation(), but with \c float parameters. */ +void Frame::setOrientation(double q0, double q1, double q2, double q3) +{ + setOrientation(Quaternion(q0, q1, q2, q3)); +} + +/*! Get the current orientation of the frame (same as orientation()). + Parameters are the orientation Quaternion values. + See also setOrientation(). */ + +/*! The \p q are set to the orientation() of the Frame. + +See Quaternion::Quaternion(double, double, double, double) for details on \c q. */ +void Frame::getOrientation(double& q0, double& q1, double& q2, double& q3) const +{ + Quaternion o = orientation(); + q0 = o[0]; + q1 = o[1]; + q2 = o[2]; + q3 = o[3]; +} + +/*! Returns the orientation of the Frame, defined in the world coordinate system. See also + position(), setOrientation() and rotation(). */ +Quaternion Frame::orientation() const +{ + Quaternion res = rotation(); + const Frame* fr = referenceFrame(); + while (fr != NULL) + { + res = fr->rotation() * res; + fr = fr->referenceFrame(); + } + return res; +} + + +////////////////////// C o n s t r a i n t V e r s i o n s ////////////////////////// + +/*! Same as setTranslation(), but \p translation is modified so that the potential constraint() of the + Frame is satisfied. + + Emits the modified() signal. See also setRotationWithConstraint() and setPositionWithConstraint(). */ +void Frame::setTranslationWithConstraint(Vec& translation) +{ + Vec deltaT = translation - this->translation(); + if (constraint()) + constraint()->constrainTranslation(deltaT, this); + + setTranslation(this->translation() + deltaT); + translation = this->translation(); +} + +/*! Same as setRotation(), but \p rotation is modified so that the potential constraint() of the + Frame is satisfied. + + Emits the modified() signal. See also setTranslationWithConstraint() and setOrientationWithConstraint(). */ +void Frame::setRotationWithConstraint(Quaternion& rotation) +{ + Quaternion deltaQ = this->rotation().inverse() * rotation; + if (constraint()) + constraint()->constrainRotation(deltaQ, this); + + // Prevent numerical drift + deltaQ.normalize(); + + setRotation(this->rotation() * deltaQ); + q_.normalize(); + rotation = this->rotation(); +} + +/*! Same as setTranslationAndRotation(), but \p translation and \p orientation are modified to + satisfy the constraint(). Emits the modified() signal. */ +void Frame::setTranslationAndRotationWithConstraint(Vec& translation, Quaternion& rotation) +{ + Vec deltaT = translation - this->translation(); + Quaternion deltaQ = this->rotation().inverse() * rotation; + + if (constraint()) + { + constraint()->constrainTranslation(deltaT, this); + constraint()->constrainRotation(deltaQ, this); + } + + // Prevent numerical drift + deltaQ.normalize(); + + t_ += deltaT; + q_ *= deltaQ; + q_.normalize(); + + translation = this->translation(); + rotation = this->rotation(); + +} + +/*! Same as setPosition(), but \p position is modified so that the potential constraint() of the + Frame is satisfied. See also setOrientationWithConstraint() and setTranslationWithConstraint(). */ +void Frame::setPositionWithConstraint(Vec& position) +{ + if (referenceFrame()) + position = referenceFrame()->coordinatesOf(position); + + setTranslationWithConstraint(position); +} + +/*! Same as setOrientation(), but \p orientation is modified so that the potential constraint() of the Frame + is satisfied. See also setPositionWithConstraint() and setRotationWithConstraint(). */ +void Frame::setOrientationWithConstraint(Quaternion& orientation) +{ + if (referenceFrame()) + orientation = referenceFrame()->orientation().inverse() * orientation; + + setRotationWithConstraint(orientation); +} + +/*! Same as setPositionAndOrientation() but \p position and \p orientation are modified to satisfy +the constraint. Emits the modified() signal. */ +void Frame::setPositionAndOrientationWithConstraint(Vec& position, Quaternion& orientation) +{ + if (referenceFrame()) + { + position = referenceFrame()->coordinatesOf(position); + orientation = referenceFrame()->orientation().inverse() * orientation; + } + setTranslationAndRotationWithConstraint(position, orientation); +} + + +///////////////////////////// REFERENCE FRAMES /////////////////////////////////////// + +/*! Sets the referenceFrame() of the Frame. + +The Frame translation() and rotation() are then defined in the referenceFrame() coordinate system. +Use position() and orientation() to express these in the world coordinate system. + +Emits the modified() signal if \p refFrame differs from the current referenceFrame(). + +Using this method, you can create a hierarchy of Frames. This hierarchy needs to be a tree, which +root is the world coordinate system (i.e. a \c NULL referenceFrame()). A warning is printed and no +action is performed if setting \p refFrame as the referenceFrame() would create a loop in the Frame +hierarchy (see settingAsReferenceFrameWillCreateALoop()). */ +void Frame::setReferenceFrame(const Frame* const refFrame) +{ + if (settingAsReferenceFrameWillCreateALoop(refFrame)) + cout << "Frame::setReferenceFrame would create a loop in Frame hierarchy" << endl; + else + { + bool identical = (referenceFrame_ == refFrame); + referenceFrame_ = refFrame; + } +} + +/*! Returns \c true if setting \p frame as the Frame's referenceFrame() would create a loop in the + Frame hierarchy. */ +bool Frame::settingAsReferenceFrameWillCreateALoop(const Frame* const frame) +{ + const Frame* f = frame; + while (f != NULL) + { + if (f == this) + return true; + f = f->referenceFrame(); + } + return false; +} + +///////////////////////// FRAME TRANSFORMATIONS OF 3D POINTS ////////////////////////////// + +/*! Returns the Frame coordinates of a point \p src defined in the world coordinate system (converts + from world to Frame). + + inverseCoordinatesOf() performs the inverse convertion. transformOf() converts 3D vectors instead + of 3D coordinates. + + See the frameTransform example for an + illustration. */ +Vec Frame::coordinatesOf(const Vec& src) const +{ + if (referenceFrame()) + return localCoordinatesOf(referenceFrame()->coordinatesOf(src)); + else + return localCoordinatesOf(src); +} + +/*! Returns the world coordinates of the point whose position in the Frame coordinate system is \p + src (converts from Frame to world). + + coordinatesOf() performs the inverse convertion. Use inverseTransformOf() to transform 3D vectors + instead of 3D coordinates. */ +Vec Frame::inverseCoordinatesOf(const Vec& src) const +{ + const Frame* fr = this; + Vec res = src; + while (fr != NULL) + { + res = fr->localInverseCoordinatesOf(res); + fr = fr->referenceFrame(); + } + return res; +} + +/*! Returns the Frame coordinates of a point \p src defined in the referenceFrame() coordinate + system (converts from referenceFrame() to Frame). + + localInverseCoordinatesOf() performs the inverse convertion. See also localTransformOf(). */ +Vec Frame::localCoordinatesOf(const Vec& src) const +{ + return rotation().inverseRotate(src - translation()); +} + +/*! Returns the referenceFrame() coordinates of a point \p src defined in the Frame coordinate + system (converts from Frame to referenceFrame()). + + localCoordinatesOf() performs the inverse convertion. See also localInverseTransformOf(). */ +Vec Frame::localInverseCoordinatesOf(const Vec& src) const +{ + return rotation().rotate(src) + translation(); +} + +/*! Returns the Frame coordinates of the point whose position in the \p from coordinate system is \p + src (converts from \p from to Frame). + + coordinatesOfIn() performs the inverse transformation. */ +Vec Frame::coordinatesOfFrom(const Vec& src, const Frame* const from) const +{ + if (this == from) + return src; + else + if (referenceFrame()) + return localCoordinatesOf(referenceFrame()->coordinatesOfFrom(src, from)); + else + return localCoordinatesOf(from->inverseCoordinatesOf(src)); +} + +/*! Returns the \p in coordinates of the point whose position in the Frame coordinate system is \p + src (converts from Frame to \p in). + + coordinatesOfFrom() performs the inverse transformation. */ +Vec Frame::coordinatesOfIn(const Vec& src, const Frame* const in) const +{ + const Frame* fr = this; + Vec res = src; + while ((fr != NULL) && (fr != in)) + { + res = fr->localInverseCoordinatesOf(res); + fr = fr->referenceFrame(); + } + + if (fr != in) + // in was not found in the branch of this, res is now expressed in the world + // coordinate system. Simply convert to in coordinate system. + res = in->coordinatesOf(res); + + return res; +} + +////// float[3] versions + +/*! Same as coordinatesOf(), but with \c float parameters. */ +void Frame::getCoordinatesOf(const float src[3], float res[3]) const +{ + const Vec r = coordinatesOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as inverseCoordinatesOf(), but with \c float parameters. */ +void Frame::getInverseCoordinatesOf(const float src[3], float res[3]) const +{ + const Vec r = inverseCoordinatesOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as localCoordinatesOf(), but with \c float parameters. */ +void Frame::getLocalCoordinatesOf(const float src[3], float res[3]) const +{ + const Vec r = localCoordinatesOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + + /*! Same as localInverseCoordinatesOf(), but with \c float parameters. */ +void Frame::getLocalInverseCoordinatesOf(const float src[3], float res[3]) const +{ + const Vec r = localInverseCoordinatesOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as coordinatesOfIn(), but with \c float parameters. */ +void Frame::getCoordinatesOfIn(const float src[3], float res[3], const Frame* const in) const +{ + const Vec r = coordinatesOfIn(Vec(src), in); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as coordinatesOfFrom(), but with \c float parameters. */ +void Frame::getCoordinatesOfFrom(const float src[3], float res[3], const Frame* const from) const +{ + const Vec r = coordinatesOfFrom(Vec(src), from); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + + +///////////////////////// FRAME TRANSFORMATIONS OF VECTORS ////////////////////////////// + +/*! Returns the Frame transform of a vector \p src defined in the world coordinate system (converts + vectors from world to Frame). + + inverseTransformOf() performs the inverse transformation. coordinatesOf() converts 3D coordinates + instead of 3D vectors (here only the rotational part of the transformation is taken into account). + + See the frameTransform example for an + illustration. */ +Vec Frame::transformOf(const Vec& src) const +{ + if (referenceFrame()) + return localTransformOf(referenceFrame()->transformOf(src)); + else + return localTransformOf(src); +} + +/*! Returns the world transform of the vector whose coordinates in the Frame coordinate + system is \p src (converts vectors from Frame to world). + + transformOf() performs the inverse transformation. Use inverseCoordinatesOf() to transform 3D + coordinates instead of 3D vectors. */ +Vec Frame::inverseTransformOf(const Vec& src) const +{ + const Frame* fr = this; + Vec res = src; + while (fr != NULL) + { + res = fr->localInverseTransformOf(res); + fr = fr->referenceFrame(); + } + return res; +} + +/*! Returns the Frame transform of a vector \p src defined in the referenceFrame() coordinate system + (converts vectors from referenceFrame() to Frame). + + localInverseTransformOf() performs the inverse transformation. See also localCoordinatesOf(). */ +Vec Frame::localTransformOf(const Vec& src) const +{ + return rotation().inverseRotate(src); +} + +/*! Returns the referenceFrame() transform of a vector \p src defined in the Frame coordinate + system (converts vectors from Frame to referenceFrame()). + + localTransformOf() performs the inverse transformation. See also localInverseCoordinatesOf(). */ +Vec Frame::localInverseTransformOf(const Vec& src) const +{ + return rotation().rotate(src); +} + +/*! Returns the Frame transform of the vector whose coordinates in the \p from coordinate system is \p + src (converts vectors from \p from to Frame). + + transformOfIn() performs the inverse transformation. */ +Vec Frame::transformOfFrom(const Vec& src, const Frame* const from) const +{ + if (this == from) + return src; + else + if (referenceFrame()) + return localTransformOf(referenceFrame()->transformOfFrom(src, from)); + else + return localTransformOf(from->inverseTransformOf(src)); +} + +/*! Returns the \p in transform of the vector whose coordinates in the Frame coordinate system is \p + src (converts vectors from Frame to \p in). + + transformOfFrom() performs the inverse transformation. */ +Vec Frame::transformOfIn(const Vec& src, const Frame* const in) const +{ + const Frame* fr = this; + Vec res = src; + while ((fr != NULL) && (fr != in)) + { + res = fr->localInverseTransformOf(res); + fr = fr->referenceFrame(); + } + + if (fr != in) + // in was not found in the branch of this, res is now expressed in the world + // coordinate system. Simply convert to in coordinate system. + res = in->transformOf(res); + + return res; +} + +///////////////// float[3] versions ////////////////////// + +/*! Same as transformOf(), but with \c float parameters. */ +void Frame::getTransformOf(const float src[3], float res[3]) const +{ + Vec r = transformOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as inverseTransformOf(), but with \c float parameters. */ +void Frame::getInverseTransformOf(const float src[3], float res[3]) const +{ + Vec r = inverseTransformOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as localTransformOf(), but with \c float parameters. */ +void Frame::getLocalTransformOf(const float src[3], float res[3]) const +{ + Vec r = localTransformOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as localInverseTransformOf(), but with \c float parameters. */ +void Frame::getLocalInverseTransformOf(const float src[3], float res[3]) const +{ + Vec r = localInverseTransformOf(Vec(src)); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as transformOfIn(), but with \c float parameters. */ +void Frame::getTransformOfIn(const float src[3], float res[3], const Frame* const in) const +{ + Vec r = transformOfIn(Vec(src), in); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +/*! Same as transformOfFrom(), but with \c float parameters. */ +void Frame::getTransformOfFrom(const float src[3], float res[3], const Frame* const from) const +{ + Vec r = transformOfFrom(Vec(src), from); + for (int i=0; i<3 ; ++i) + res[i] = r[i]; +} + +///////////////////////////////// ALIGN ///////////////////////////////// + +/*! Aligns the Frame with \p frame, so that two of their axis are parallel. + +If one of the X, Y and Z axis of the Frame is almost parallel to any of the X, Y, or Z axis of \p +frame, the Frame is rotated so that these two axis actually become parallel. + +If, after this first rotation, two other axis are also almost parallel, a second alignment is +performed. The two frames then have identical orientations, up to 90 degrees rotations. + +\p threshold measures how close two axis must be to be considered parallel. It is compared with the +absolute values of the dot product of the normalized axis. + +When \p move is set to \c true, the Frame position() is also affected by the alignment. The new +Frame position() is such that the \p frame position (computed with coordinatesOf(), in the Frame +coordinates system) does not change. + +\p frame may be \c NULL and then represents the world coordinate system (same convention than for +the referenceFrame()). + +The rotation (and translation when \p move is \c true) applied to the Frame are filtered by the +possible constraint(). */ +void Frame::alignWithFrame(const Frame* const frame, bool move, float threshold) +{ + Vec directions[2][3]; + for (int d=0; d<3; ++d) + { + Vec dir((d==0)? 1.0 : 0.0, (d==1)? 1.0 : 0.0, (d==2)? 1.0 : 0.0); + if (frame) + directions[0][d] = frame->inverseTransformOf(dir); + else + directions[0][d] = dir; + directions[1][d] = inverseTransformOf(dir); + } + + float maxProj = 0.0f; + float proj; + unsigned short index[2]; + index[0] = index[1] = 0; + for (int i=0; i<3; ++i) + for (int j=0; j<3; ++j) + if ( (proj=fabs(directions[0][i]*directions[1][j])) >= maxProj ) + { + index[0] = i; + index[1] = j; + maxProj = proj; + } + + Frame old; + old=*this; + + float coef = directions[0][index[0]] * directions[1][index[1]]; + if (fabs(coef) >= threshold) + { + const Vec axis = cross(directions[0][index[0]], directions[1][index[1]]); + float angle = asin(axis.norm()); + if (coef >= 0.0) + angle = -angle; + // setOrientation(Quaternion(axis, angle) * orientation()); + rotate(rotation().inverse() * Quaternion(axis, angle) * orientation()); + + // Try to align an other axis direction + unsigned short d = (index[1]+1) % 3; + Vec dir((d==0)? 1.0 : 0.0, (d==1)? 1.0 : 0.0, (d==2)? 1.0 : 0.0); + dir = inverseTransformOf(dir); + + float max = 0.0f; + for (int i=0; i<3; ++i) + { + float proj = fabs(directions[0][i]*dir); + if (proj > max) + { + index[0] = i; + max = proj; + } + } + + if (max >= threshold) + { + const Vec axis = cross(directions[0][index[0]], dir); + float angle = asin(axis.norm()); + if (directions[0][index[0]] * dir >= 0.0) + angle = -angle; + // setOrientation(Quaternion(axis, angle) * orientation()); + rotate(rotation().inverse() * Quaternion(axis, angle) * orientation()); + } + } + + if (move) + { + Vec center; + if (frame) + center = frame->position(); + + // setPosition(center - orientation().rotate(old.coordinatesOf(center))); + translate(center - orientation().rotate(old.coordinatesOf(center)) - translation()); + } +} + +/*! Translates the Frame so that its position() lies on the line defined by \p origin and \p + direction (defined in the world coordinate system). + +Simply uses an orthogonal projection. \p direction does not need to be normalized. */ +void Frame::projectOnLine(const Vec& origin, const Vec& direction) +{ + // If you are trying to find a bug here, because of memory problems, you waste your time. + // This is a bug in the gcc 3.3 compiler. Compile the library in debug mode and test. + // Uncommenting this line also seems to solve the problem. Horrible. + // cout << "position = " << position() << endl; + // If you found a problem or are using a different compiler, please let me know. + const Vec shift = origin - position(); + Vec proj = shift; + proj.projectOnAxis(direction); + translate(shift-proj); +} diff --git a/source/blender/freestyle/intern/app_blender/frame.h b/source/blender/freestyle/intern/app_blender/frame.h new file mode 100644 index 00000000000..1ff3d91f75c --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/frame.h @@ -0,0 +1,408 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_FRAME_H +#define QGLVIEWER_FRAME_H + +#include "constraint.h" +// #include "GL/gl.h" is now included in config.h for ease of configuration + +//namespace qglviewer { + /*! \brief The Frame class represents a coordinate system, defined by a position and an + orientation. \class Frame frame.h QGLViewer/frame.h + + A Frame is a 3D coordinate system, represented by a position() and an orientation(). The order of + these transformations is important: the Frame is first translated \e and \e then rotated around + the new translated origin. + + A Frame is useful to define the position and orientation of a 3D rigid object, using its matrix() + method, as shown below: + \code + // Builds a Frame at position (0.5,0,0) and oriented such that its Y axis is along the (1,1,1) + // direction. One could also have used setPosition() and setOrientation(). + Frame fr(Vec(0.5,0,0), Quaternion(Vec(0,1,0), Vec(1,1,1))); + glPushMatrix(); + glMultMatrixd(fr.matrix()); + // Draw your object here, in the local fr coordinate system. + glPopMatrix(); + \endcode + + Many functions are provided to transform a 3D point from one coordinate system (Frame) to an + other: see coordinatesOf(), inverseCoordinatesOf(), coordinatesOfIn(), coordinatesOfFrom()... + + You may also want to transform a 3D vector (such as a normal), which corresponds to applying only + the rotational part of the frame transformation: see transformOf() and inverseTransformOf(). See + the frameTransform example for an illustration. + + The translation() and the rotation() that are encapsulated in a Frame can also be used to + represent a \e rigid \e transformation of space. Such a transformation can also be interpreted as + a change of coordinate system, and the coordinate system conversion functions actually allow you + to use a Frame as a rigid transformation. Use inverseCoordinatesOf() (resp. coordinatesOf()) to + apply the transformation (resp. its inverse). Note the inversion. + +

Hierarchy of Frames

+ + The position and the orientation of a Frame are actually defined with respect to a + referenceFrame(). The default referenceFrame() is the world coordinate system (represented by a \c + NULL referenceFrame()). If you setReferenceFrame() to a different Frame, you must then + differentiate: + + \arg the \e local translation() and rotation(), defined with respect to the referenceFrame(), + + \arg the \e global position() and orientation(), always defined with respect to the world + coordinate system. + + A Frame is actually defined by its translation() with respect to its referenceFrame(), and then by + a rotation() of the coordinate system around the new translated origin. + + This terminology for \e local (translation() and rotation()) and \e global (position() and + orientation()) definitions is used in all the methods' names and should be sufficient to prevent + ambiguities. These notions are obviously identical when the referenceFrame() is \c NULL, i.e. when + the Frame is defined in the world coordinate system (the one you are in at the beginning of the + QGLViewer::draw() method, see the introduction page). + + Frames can hence easily be organized in a tree hierarchy, which root is the world coordinate + system. A loop in the hierarchy would result in an inconsistent (multiple) Frame definition. + settingAsReferenceFrameWillCreateALoop() checks this and prevents setReferenceFrame() from + creating such a loop. + + This frame hierarchy is used in methods like coordinatesOfIn(), coordinatesOfFrom()... which allow + coordinates (or vector) conversions from a Frame to any other one (including the world coordinate + system). + + However, one must note that this hierarchical representation is internal to the Frame classes. + When the Frames represent OpenGL coordinates system, one should map this hierarchical + representation to the OpenGL GL_MODELVIEW matrix stack. See the matrix() documentation for + details. + +

Constraints

+ + An interesting feature of Frames is that their displacements can be constrained. When a Constraint + is attached to a Frame, it filters the input of translate() and rotate(), and only the resulting + filtered motion is applied to the Frame. The default constraint() is \c NULL resulting in no + filtering. Use setConstraint() to attach a Constraint to a frame. + + Constraints are especially usefull for the ManipulatedFrame instances, in order to forbid some + mouse motions. See the constrainedFrame, constrainedCamera and luxo examples for an illustration. + + Classical constraints are provided for convenience (see LocalConstraint, WorldConstraint and + CameraConstraint) and new constraints can very easily be implemented. + +

Derived classes

+ + The ManipulatedFrame class inherits Frame and implements a mouse motion convertion, so that a + Frame (and hence an object) can be manipulated in the scene with the mouse. + + \nosubgrouping */ + class Frame + { + + public: + Frame(); + + /*! Virtual destructor. Empty. */ + virtual ~Frame() {}; + + Frame(const Frame& frame); + Frame& operator=(const Frame& frame); + + /*! This signal is emitted whenever the position() or the orientation() of the Frame is modified. + + Connect this signal to any object that must be notified: + \code + QObject::connect(myFrame, SIGNAL(modified()), myObject, SLOT(update())); + \endcode + Use the QGLViewer::QGLViewerPool() to connect the signal to all the viewers. + + \note If your Frame is part of a Frame hierarchy (see referenceFrame()), a modification of one + of the parents of this Frame will \e not emit this signal. Use code like this to change this + behavior (you can do this recursively for all the referenceFrame() until the \c NULL world root + frame is encountered): + \code + // Emits the Frame modified() signal when its referenceFrame() is modified(). + connect(myFrame->referenceFrame(), SIGNAL(modified()), myFrame, SIGNAL(modified())); + \endcode + + \attention Connecting this signal to a QGLWidget::updateGL() slot (or a method that calls it) + will prevent you from modifying the Frame \e inside your QGLViewer::draw() method as it would + result in an infinite loop. However, QGLViewer::draw() should not modify the scene. + + \note For efficiency reasons, this signal is emitted even if the Frame is not actually modified, for + instance with translate(Vec(0,0,0)) or setPosition(position()). */ + void modified(); + + /*! This signal is emitted when the Frame is interpolated by a KeyFrameInterpolator. + + See the KeyFrameInterpolator documentation for details. + + If a KeyFrameInterpolator is used to successively interpolate several Frames in your scene, + connect the KeyFrameInterpolator::interpolated() signal instead (identical, but independent of + the interpolated Frame). */ + void interpolated(); + + public: + /*! @name World coordinates position and orientation */ + //@{ + Frame(const Vec& position, const Quaternion& orientation); + + void setPosition(const Vec& position); + void setPosition(float x, float y, float z); + void setPositionWithConstraint(Vec& position); + + void setOrientation(const Quaternion& orientation); + void setOrientation(double q0, double q1, double q2, double q3); + void setOrientationWithConstraint(Quaternion& orientation); + + void setPositionAndOrientation(const Vec& position, const Quaternion& orientation); + void setPositionAndOrientationWithConstraint(Vec& position, Quaternion& orientation); + + /*! Returns the position of the Frame, defined in the world coordinate system. See also + orientation(), setPosition() and translation(). */ + Vec position() const { return inverseCoordinatesOf(Vec(0.0,0.0,0.0)); }; + Quaternion orientation() const; + + void getPosition(float& x, float& y, float& z) const; + void getOrientation(double& q0, double& q1, double& q2, double& q3) const; + //@} + + + public: + /*! @name Local translation and rotation w/r reference Frame */ + //@{ + /*! Sets the translation() of the frame, locally defined with respect to the referenceFrame(). + Emits the modified() signal. + + Use setPosition() to define the world coordinates position(). Use + setTranslationWithConstraint() to take into account the potential constraint() of the Frame. */ + void setTranslation(const Vec& translation) { t_ = translation; }; + void setTranslation(float x, float y, float z); + void setTranslationWithConstraint(Vec& translation); + + /*! Set the current rotation Quaternion. See rotation() and the different Quaternion + constructors. Emits the modified() signal. See also setTranslation() and + setRotationWithConstraint(). */ + + /*! Sets the rotation() of the Frame, locally defined with respect to the referenceFrame(). + Emits the modified() signal. + + Use setOrientation() to define the world coordinates orientation(). The potential + constraint() of the Frame is not taken into account, use setRotationWithConstraint() + instead. */ + void setRotation(const Quaternion& rotation) { q_ = rotation; }; + void setRotation(double q0, double q1, double q2, double q3); + void setRotationWithConstraint(Quaternion& rotation); + + void setTranslationAndRotation(const Vec& translation, const Quaternion& rotation); + void setTranslationAndRotationWithConstraint(Vec& translation, Quaternion& rotation); + + /*! Returns the Frame translation, defined with respect to the referenceFrame(). + + Use position() to get the result in the world coordinates. These two values are identical + when the referenceFrame() is \c NULL (default). + + See also setTranslation() and setTranslationWithConstraint(). */ + Vec translation() const { return t_; }; + /*! Returns the Frame rotation, defined with respect to the referenceFrame(). + + Use orientation() to get the result in the world coordinates. These two values are identical + when the referenceFrame() is \c NULL (default). + + See also setRotation() and setRotationWithConstraint(). */ + + /*! Returns the current Quaternion orientation. See setRotation(). */ + Quaternion rotation() const { return q_; }; + + void getTranslation(float& x, float& y, float& z) const; + void getRotation(double& q0, double& q1, double& q2, double& q3) const; + //@} + + public: + /*! @name Frame hierarchy */ + //@{ + /*! Returns the reference Frame, in which coordinates system the Frame is defined. + + The translation() and rotation() of the Frame are defined with respect to the referenceFrame() + coordinate system. A \c NULL referenceFrame() (default value) means that the Frame is defined in + the world coordinate system. + + Use position() and orientation() to recursively convert values along the referenceFrame() chain + and to get values expressed in the world coordinate system. The values match when the + referenceFrame() is \c NULL. + + Use setReferenceFrame() to set this value and create a Frame hierarchy. Convenient functions + allow you to convert 3D coordinates from one Frame to an other: see coordinatesOf(), + localCoordinatesOf(), coordinatesOfIn() and their inverse functions. + + Vectors can also be converted using transformOf(), transformOfIn, localTransformOf() and their + inverse functions. */ + const Frame* referenceFrame() const { return referenceFrame_; }; + void setReferenceFrame(const Frame* const refFrame); + bool settingAsReferenceFrameWillCreateALoop(const Frame* const frame); + //@} + + + /*! @name Frame modification */ + //@{ + void translate(Vec& t); + void translate(const Vec& t); + // Some compilers complain about "overloading cannot distinguish from previous declaration" + // Simply comment out the following method and its associated implementation + void translate(float x, float y, float z); + void translate(float& x, float& y, float& z); + + void rotate(Quaternion& q); + void rotate(const Quaternion& q); + // Some compilers complain about "overloading cannot distinguish from previous declaration" + // Simply comment out the following method and its associated implementation + void rotate(double q0, double q1, double q2, double q3); + void rotate(double& q0, double& q1, double& q2, double& q3); + + void rotateAroundPoint(Quaternion& rotation, const Vec& point); + void rotateAroundPoint(const Quaternion& rotation, const Vec& point); + + void alignWithFrame(const Frame* const frame, bool move=false, float threshold=0.85f); + void projectOnLine(const Vec& origin, const Vec& direction); + //@} + + + /*! @name Coordinate system transformation of 3D coordinates */ + //@{ + Vec coordinatesOf(const Vec& src) const; + Vec inverseCoordinatesOf(const Vec& src) const; + Vec localCoordinatesOf(const Vec& src) const; + Vec localInverseCoordinatesOf(const Vec& src) const; + Vec coordinatesOfIn(const Vec& src, const Frame* const in) const; + Vec coordinatesOfFrom(const Vec& src, const Frame* const from) const; + + void getCoordinatesOf(const float src[3], float res[3]) const; + void getInverseCoordinatesOf(const float src[3], float res[3]) const; + void getLocalCoordinatesOf(const float src[3], float res[3]) const; + void getLocalInverseCoordinatesOf(const float src[3], float res[3]) const; + void getCoordinatesOfIn(const float src[3], float res[3], const Frame* const in) const; + void getCoordinatesOfFrom(const float src[3], float res[3], const Frame* const from) const; + //@} + + /*! @name Coordinate system transformation of vectors */ + // A frame is as a new coordinate system, defined with respect to a reference frame (the world + // coordinate system by default, see the "Composition of frame" section). + + // The transformOf() (resp. inverseTransformOf()) functions transform a 3D vector from (resp. + // to) the world coordinates system. This section defines the 3D vector transformation + // functions. See the Coordinate system transformation of 3D points above for the transformation + // of 3D points. The difference between the two sets of functions is simple: for vectors, only + // the rotational part of the transformations is taken into account, while translation is also + // considered for 3D points. + + // The length of the resulting transformed vector is identical to the one of the source vector + // for all the described functions. + + // When local is prepended to the names of the functions, the functions simply transform from + // (and to) the reference frame. + + // When In (resp. From) is appended to the names, the functions transform from (resp. To) the + // frame that is given as an argument. The frame does not need to be in the same branch or the + // hierarchical tree, and can be \c NULL (the world coordinates system). + + // Combining any of these functions with its inverse (in any order) leads to the identity. + //@{ + Vec transformOf(const Vec& src) const; + Vec inverseTransformOf(const Vec& src) const; + Vec localTransformOf(const Vec& src) const; + Vec localInverseTransformOf(const Vec& src) const; + Vec transformOfIn(const Vec& src, const Frame* const in) const; + Vec transformOfFrom(const Vec& src, const Frame* const from) const; + + void getTransformOf(const float src[3], float res[3]) const; + void getInverseTransformOf(const float src[3], float res[3]) const; + void getLocalTransformOf(const float src[3], float res[3]) const; + void getLocalInverseTransformOf(const float src[3], float res[3]) const; + void getTransformOfIn(const float src[3], float res[3], const Frame* const in) const; + void getTransformOfFrom(const float src[3], float res[3], const Frame* const from) const; + //@} + + + /*! @name Constraint on the displacement */ + //@{ + /*! Returns the current constraint applied to the Frame. + + A \c NULL value (default) means that no Constraint is used to filter Frame translation and + rotation. See the Constraint class documentation for details. + + You may have to use a \c dynamic_cast to convert the result to a Constraint derived class. */ + Constraint* constraint() const { return constraint_; } + /*! Sets the constraint() attached to the Frame. + + A \c NULL value means no constraint. The previous constraint() should be deleted by the calling + method if needed. */ + void setConstraint(Constraint* const constraint) { constraint_ = constraint; } + //@} + + /*! @name Associated matrices */ + //@{ + public: + const GLdouble* matrix() const; + void getMatrix(GLdouble m[4][4]) const; + void getMatrix(GLdouble m[16]) const; + + const GLdouble* worldMatrix() const; + void getWorldMatrix(GLdouble m[4][4]) const; + void getWorldMatrix(GLdouble m[16]) const; + + void setFromMatrix(const GLdouble m[4][4]); + void setFromMatrix(const GLdouble m[16]); + //@} + + /*! @name Inversion of the transformation */ + //@{ + Frame inverse() const; + /*! Returns the inverse() of the Frame world transformation. + + The orientation() of the new Frame is the Quaternion::inverse() of the original orientation. + Its position() is the negated and inverse rotated image of the original position. + + The result Frame has a \c NULL referenceFrame() and a \c NULL constraint(). + + Use inverse() for a local (i.e. with respect to referenceFrame()) transformation inverse. */ + Frame worldInverse() const { return Frame(-(orientation().inverseRotate(position())), orientation().inverse()); } + //@} + + + private: + // P o s i t i o n a n d o r i e n t a t i o n + Vec t_; + Quaternion q_; + + // C o n s t r a i n t s + Constraint* constraint_; + + // F r a m e c o m p o s i t i o n + const Frame* referenceFrame_; + }; + +//} // namespace qglviewer + +#endif // QGLVIEWER_FRAME_H diff --git a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp b/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp new file mode 100644 index 00000000000..c4e2e67b26a --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp @@ -0,0 +1,86 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "manipulatedCameraFrame.h" +#include "camera.h" +//#include "qglviewer.h" + +// #if QT_VERSION >= 0x040000 +// # include +// #endif +// +// using namespace qglviewer; +using namespace std; + +/*! Default constructor. + + flySpeed() is set to 0.0 and flyUpVector() is (0,1,0). The revolveAroundPoint() is set to (0,0,0). + + \attention Created object is removeFromMouseGrabberPool(). */ +ManipulatedCameraFrame::ManipulatedCameraFrame() + : driveSpeed_(0.0), flyUpVector_(0.0, 1.0, 0.0) +{ + setFlySpeed(0.0); + //removeFromMouseGrabberPool(); + + //connect(&flyTimer_, SIGNAL(timeout()), SLOT(flyUpdate())); +} + +/*! Equal operator. Calls ManipulatedFrame::operator=() and then copy attributes. */ +ManipulatedCameraFrame& ManipulatedCameraFrame::operator=(const ManipulatedCameraFrame& mcf) +{ + ManipulatedFrame::operator=(mcf); + + setFlySpeed(mcf.flySpeed()); + setFlyUpVector(mcf.flyUpVector()); + + return *this; +} + +/*! Copy constructor. Performs a deep copy of all members using operator=(). */ +ManipulatedCameraFrame::ManipulatedCameraFrame(const ManipulatedCameraFrame& mcf) + : ManipulatedFrame(mcf) +{ + //removeFromMouseGrabberPool(); + (*this)=(mcf); +} + + +//////////////////////////////////////////////////////////////////////////////// + +/*! Returns a Quaternion that is a rotation around current camera Y, proportionnal to the horizontal mouse position. */ +Quaternion ManipulatedCameraFrame::turnQuaternion(int x, const Camera* const camera) +{ + return Quaternion(Vec(0.0, 1.0, 0.0), rotationSensitivity()*(prevPos_.x()-x)/camera->screenWidth()); +} + +/*! Returns a Quaternion that is the composition of two rotations, inferred from the + mouse pitch (X axis) and yaw (flyUpVector() axis). */ +Quaternion ManipulatedCameraFrame::pitchYawQuaternion(int x, int y, const Camera* const camera) +{ + const Quaternion rotX(Vec(1.0, 0.0, 0.0), rotationSensitivity()*(prevPos_.y()-y)/camera->screenHeight()); + const Quaternion rotY(transformOf(flyUpVector()), rotationSensitivity()*(prevPos_.x()-x)/camera->screenWidth()); + return rotY * rotX; +} diff --git a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h b/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h new file mode 100644 index 00000000000..3c28edab622 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h @@ -0,0 +1,169 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_MANIPULATED_CAMERA_FRAME_H +#define QGLVIEWER_MANIPULATED_CAMERA_FRAME_H + +#include "manipulatedFrame.h" + +//namespace qglviewer { + /*! \brief The ManipulatedCameraFrame class represents a ManipulatedFrame with Camera specific mouse bindings. + \class ManipulatedCameraFrame manipulatedCameraFrame.h QGLViewer/manipulatedCameraFrame.h + + A ManipulatedCameraFrame is a specialization of a ManipulatedFrame, designed to be set as the + Camera::frame(). Mouse motions are basically interpreted in a negated way: when the mouse goes to + the right, the ManipulatedFrame translation goes to the right, while the ManipulatedCameraFrame + has to go to the \e left, so that the \e scene seems to move to the right. + + A ManipulatedCameraFrame rotates around its revolveAroundPoint(), which corresponds to the + associated Camera::revolveAroundPoint(). + + A ManipulatedCameraFrame can also "fly" in the scene. It basically moves forward, and turns + according to the mouse motion. See flySpeed(), flyUpVector() and the QGLViewer::MOVE_FORWARD and + QGLViewer::MOVE_BACKWARD QGLViewer::MouseAction. + + See the mouse page for a description of the possible actions that can + be performed using the mouse and their bindings. + \nosubgrouping */ + class ManipulatedCameraFrame : public ManipulatedFrame + { +#ifndef DOXYGEN + friend class Camera; + //friend class ::QGLViewer; +#endif + + //Q_OBJECT + + public: + ManipulatedCameraFrame(); + /*! Virtual destructor. Empty. */ + virtual ~ManipulatedCameraFrame() {}; + + ManipulatedCameraFrame(const ManipulatedCameraFrame& mcf); + ManipulatedCameraFrame& operator=(const ManipulatedCameraFrame& mcf); + + /*! @name Revolve around point */ + //@{ + public: + /*! Returns the point the ManipulatedCameraFrame revolves around when rotated. + + It is defined in the world coordinate system. Default value is (0,0,0). + + When the ManipulatedCameraFrame is associated to a Camera, Camera::revolveAroundPoint() also + returns this value. This point can interactively be changed using the mouse (see + QGLViewer::RAP_FROM_PIXEL and QGLViewer::RAP_IS_CENTER in the mouse + page). */ + Vec revolveAroundPoint() const { return revolveAroundPoint_; } + /*! Sets the revolveAroundPoint(), defined in the world coordinate system. */ + void setRevolveAroundPoint(const Vec& revolveAroundPoint) { revolveAroundPoint_ = revolveAroundPoint; } + //@} + + /*! @name Fly parameters */ + //@{ + public: //slots: + /*! Sets the flySpeed(), defined in OpenGL units. + + Default value is 0.0, but it is modified according to the QGLViewer::sceneRadius() when the + ManipulatedCameraFrame is set as the Camera::frame(). */ + void setFlySpeed(float speed) { flySpeed_ = speed; }; + + /*! Sets the flyUpVector(), defined in the world coordinate system. + + Default value is (0,1,0), but it is updated by the Camera when set as its Camera::frame(). Use + Camera::setUpVector() instead in that case. */ + void setFlyUpVector(const Vec& up) { flyUpVector_ = up; }; + + public: + /*! Returns the fly speed, expressed in OpenGL units. + + It corresponds to the incremental displacement that is periodically applied to the + ManipulatedCameraFrame position when a QGLViewer::MOVE_FORWARD or QGLViewer::MOVE_BACKWARD + QGLViewer::MouseAction is proceeded. + + \attention When the ManipulatedCameraFrame is set as the Camera::frame(), this value is set + according to the QGLViewer::sceneRadius() by QGLViewer::setSceneRadius(). */ + float flySpeed() const { return flySpeed_; }; + + /*! Returns the up vector used in fly mode, expressed in the world coordinate system. + + Fly mode corresponds to the QGLViewer::MOVE_FORWARD and QGLViewer::MOVE_BACKWARD + QGLViewer::MouseAction bindings. In these modes, horizontal displacements of the mouse rotate + the ManipulatedCameraFrame around this vector. Vertical displacements rotate always around the + Camera \c X axis. + + Default value is (0,1,0), but it is updated by the Camera when set as its Camera::frame(). + Camera::setOrientation() and Camera::setUpVector()) modify this value and should be used + instead. */ + Vec flyUpVector() const { return flyUpVector_; }; + //@} + + /*! @name Mouse event handlers */ + //@{ + // protected: + // virtual void mouseReleaseEvent(QMouseEvent* const event, Camera* const camera); + // virtual void mouseMoveEvent (QMouseEvent* const event, Camera* const camera); + // virtual void wheelEvent (QWheelEvent* const event, Camera* const camera); + // //@} + + /*! @name Spinning */ + //@{ + // protected slots: + // virtual void spin(); + //@} + + /*! @name XML representation */ + //@{ + // public: + // virtual QDomElement domElement(const QString& name, QDomDocument& document) const; + // public slots: + // virtual void initFromDOMElement(const QDomElement& element); + // //@} + +// #ifndef DOXYGEN +// protected: +// virtual void startAction(int ma, bool withConstraint=true); // int is really a QGLViewer::MouseAction +// #endif + + private: //slots: + //virtual void flyUpdate(); + + private: + void updateFlyUpVector(); + Quaternion turnQuaternion(int x, const Camera* const camera); + Quaternion pitchYawQuaternion(int x, int y, const Camera* const camera); + + private: + // Fly mode data + float flySpeed_; + float driveSpeed_; + Vec flyUpVector_; + //QTimer flyTimer_; + + Vec revolveAroundPoint_; + }; + +//} // namespace qglviewer + +#endif // QGLVIEWER_MANIPULATED_CAMERA_FRAME_H diff --git a/source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp b/source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp new file mode 100644 index 00000000000..6721204383d --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp @@ -0,0 +1,116 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "manipulatedFrame.h" +//#include "qglviewer.h" +#include "camera.h" + +//using namespace qglviewer; +using namespace std; + +/*! Default constructor. + + The translation is set to (0,0,0), with an identity rotation (0,0,0,1) (see Frame constructor + for details). + + The different sensitivities are set to their default values (see rotationSensitivity(), + translationSensitivity(), spinningSensitivity() and wheelSensitivity()). */ +ManipulatedFrame::ManipulatedFrame() +{ + // #CONNECTION# initFromDOMElement and accessor docs + setRotationSensitivity(1.0f); + setTranslationSensitivity(1.0f); + setSpinningSensitivity(0.3f); + setWheelSensitivity(1.0f); + + isSpinning_ = false; + previousConstraint_ = false; + + //connect(&spinningTimer_, SIGNAL(timeout()), SLOT(spinUpdate())); +} + +/*! Equal operator. Calls Frame::operator=() and then copy attributes. */ +ManipulatedFrame& ManipulatedFrame::operator=(const ManipulatedFrame& mf) +{ + Frame::operator=(mf); + + setRotationSensitivity(mf.rotationSensitivity()); + setTranslationSensitivity(mf.translationSensitivity()); + setSpinningSensitivity(mf.spinningSensitivity()); + setWheelSensitivity(mf.wheelSensitivity()); + + mouseSpeed_ = 0.0; + dirIsFixed_ = false; + keepsGrabbingMouse_ = false; + + return *this; +} + +/*! Copy constructor. Performs a deep copy of all attributes using operator=(). */ +ManipulatedFrame::ManipulatedFrame(const ManipulatedFrame& mf) + : Frame(mf) +{ + (*this)=mf; +} + + + +//////////////////////////////////////////////////////////////////////////////// + +/*! Returns "pseudo-distance" from (x,y) to ball of radius size. +\arg for a point inside the ball, it is proportional to the euclidean distance to the ball +\arg for a point outside the ball, it is proportional to the inverse of this distance (tends to +zero) on the ball, the function is continuous. */ +static float projectOnBall(float x, float y) +{ + // If you change the size value, change angle computation in deformedBallQuaternion(). + const float size = 1.0f; + const float size2 = size*size; + const float size_limit = size2*0.5; + + const float d = x*x + y*y; + return d < size_limit ? sqrt(size2 - d) : size_limit/sqrt(d); +} + +#ifndef DOXYGEN +/*! Returns a quaternion computed according to the mouse motion. Mouse positions are projected on a +deformed ball, centered on (\p cx,\p cy). */ +Quaternion ManipulatedFrame::deformedBallQuaternion(int x, int y, float cx, float cy, const Camera* const camera) +{ + // Points on the deformed ball + float px = rotationSensitivity() * (prevPos_.x() - cx) / camera->screenWidth(); + float py = rotationSensitivity() * (cy - prevPos_.y()) / camera->screenHeight(); + float dx = rotationSensitivity() * (x - cx) / camera->screenWidth(); + float dy = rotationSensitivity() * (cy - y) / camera->screenHeight(); + + const Vec p1(px, py, projectOnBall(px, py)); + const Vec p2(dx, dy, projectOnBall(dx, dy)); + // Approximation of rotation angle + // Should be divided by the projectOnBall size, but it is 1.0 + const Vec axis = cross(p2,p1); + const float angle = 2.0 * asin(sqrt(axis.squaredNorm() / p1.squaredNorm() / p2.squaredNorm())); + return Quaternion(axis, angle); +} +#endif // DOXYGEN diff --git a/source/blender/freestyle/intern/app_blender/manipulatedFrame.h b/source/blender/freestyle/intern/app_blender/manipulatedFrame.h new file mode 100644 index 00000000000..8ad815f0a63 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/manipulatedFrame.h @@ -0,0 +1,256 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_MANIPULATED_FRAME_H +#define QGLVIEWER_MANIPULATED_FRAME_H + +#include "frame.h" + +//namespace qglviewer { + /*! \brief A ManipulatedFrame is a Frame that can be rotated and translated using the mouse. + \class ManipulatedFrame manipulatedFrame.h QGLViewer/manipulatedFrame.h + + It converts the mouse motion into a translation and an orientation updates. A ManipulatedFrame is + used to move an object in the scene. Combined with object selection, its MouseGrabber properties + and a dynamic update of the scene, the ManipulatedFrame introduces a great reactivity in your + applications. + + A ManipulatedFrame is attached to a QGLViewer using QGLViewer::setManipulatedFrame(): + \code + init() { setManipulatedFrame( new ManipulatedFrame() ); } + + draw() + { + glPushMatrix(); + glMultMatrixd(manipulatedFrame()->matrix()); + // draw the manipulated object here + glPopMatrix(); + } + \endcode + See the manipulatedFrame example for a complete + application. + + Mouse events are normally sent to the QGLViewer::camera(). You have to press the QGLViewer::FRAME + state key (default is \c Control) to move the QGLViewer::manipulatedFrame() instead. See the mouse page for a description of mouse button bindings. + +

Inherited functionalities

+ + A ManipulatedFrame is an overloaded instance of a Frame. The powerful coordinate system + transformation functions (Frame::coordinatesOf(), Frame::transformOf(), ...) can hence be applied + to a ManipulatedFrame. + + A ManipulatedFrame is also a MouseGrabber. If the mouse cursor gets within a distance of 10 pixels + from the projected position of the ManipulatedFrame, the ManipulatedFrame becomes the new + QGLViewer::mouseGrabber(). It can then be manipulated directly, without any specific state key, + object selection or GUI intervention. This is very convenient to directly move some objects in the + scene (typically a light). See the mouseGrabber + example as an illustration. Note that QWidget::setMouseTracking() needs to be enabled in order + to use this feature (see the MouseGrabber documentation). + +

Advanced functionalities

+ + A QGLViewer can handle at most one ManipulatedFrame at a time. If you want to move several objects + in the scene, you simply have to keep a list of the different ManipulatedFrames, and to activate + the right one (using QGLViewer::setManipulatedFrame()) when needed. This can for instance be done + according to an object selection: see the luxo example for an + illustration. + + When the ManipulatedFrame is being manipulated using the mouse (mouse pressed and not yet + released), isManipulated() returns \c true. This might be used to trigger a specific action or + display (as is done with QGLViewer::fastDraw()). + + The ManipulatedFrame also emits a manipulated() signal each time its state is modified by the + mouse. This signal is automatically connected to the QGLViewer::updateGL() slot when the + ManipulatedFrame is attached to a viewer using QGLViewer::setManipulatedFrame(). + + You can make the ManipulatedFrame spin() if you release the rotation mouse button while moving the + mouse fast enough (see spinningSensitivity()). See also translationSensitivity() and + rotationSensitivity() for sensitivity tuning. \nosubgrouping */ + class ManipulatedFrame : public Frame + { + + public: + ManipulatedFrame(); + /*! Virtual destructor. Empty. */ + virtual ~ManipulatedFrame() {}; + + ManipulatedFrame(const ManipulatedFrame& mf); + ManipulatedFrame& operator=(const ManipulatedFrame& mf); + + /*! This signal is emitted when ever the ManipulatedFrame is manipulated (i.e. rotated or + translated) using the mouse. Connect this signal to any object that should be notified. + + Note that this signal is automatically connected to the QGLViewer::updateGL() slot, when the + ManipulatedFrame is attached to a viewer using QGLViewer::setManipulatedFrame(), which is + probably all you need. + + Use the QGLViewer::QGLViewerPool() if you need to connect this signal to all the viewers. + + See also the spun(), modified(), interpolated() and KeyFrameInterpolator::interpolated() + signals' documentations. */ + void manipulated(); + + /*! This signal is emitted when the ManipulatedFrame isSpinning(). + + Note that for the QGLViewer::manipulatedFrame(), this signal is automatically connected to the + QGLViewer::updateGL() slot. + + Connect this signal to any object that should be notified. Use the QGLViewer::QGLViewerPool() if + you need to connect this signal to all the viewers. + + See also the manipulated(), modified(), interpolated() and KeyFrameInterpolator::interpolated() + signals' documentations. */ + void spun(); + + /*! @name Manipulation sensitivity */ + //@{ + public: + /*! Defines the rotationSensitivity(). */ + void setRotationSensitivity(float sensitivity) { rotSensitivity_ = sensitivity; }; + /*! Defines the translationSensitivity(). */ + void setTranslationSensitivity(float sensitivity) { transSensitivity_ = sensitivity; }; + /*! Defines the spinningSensitivity(), in pixels per milliseconds. */ + void setSpinningSensitivity(float sensitivity) { spinningSensitivity_ = sensitivity; }; + /*! Defines the wheelSensitivity(). */ + void setWheelSensitivity(float sensitivity) { wheelSensitivity_ = sensitivity; }; + public: + /*! Returns the influence of a mouse displacement on the ManipulatedFrame rotation. + + Default value is 1.0. With an identical mouse displacement, a higher value will generate a + larger rotation (and inversely for lower values). A 0.0 value will forbid ManipulatedFrame mouse + rotation (see also constraint()). + + See also setRotationSensitivity(), translationSensitivity(), spinningSensitivity() and + wheelSensitivity(). */ + float rotationSensitivity() const { return rotSensitivity_; }; + /*! Returns the influence of a mouse displacement on the ManipulatedFrame translation. + + Default value is 1.0. You should not have to modify this value, since with 1.0 the + ManipulatedFrame precisely stays under the mouse cursor. + + With an identical mouse displacement, a higher value will generate a larger translation (and + inversely for lower values). A 0.0 value will forbid ManipulatedFrame mouse translation (see + also constraint()). + + \note When the ManipulatedFrame is used to move a \e Camera (see the ManipulatedCameraFrame + class documentation), after zooming on a small region of your scene, the camera may translate + too fast. For a camera, it is the Camera::revolveAroundPoint() that exactly matches the mouse + displacement. Hence, instead of changing the translationSensitivity(), solve the problem by + (temporarily) setting the Camera::revolveAroundPoint() to a point on the zoomed region (see the + QGLViewer::RAP_FROM_PIXEL mouse binding in the mouse page). + + See also setTranslationSensitivity(), rotationSensitivity(), spinningSensitivity() and + wheelSensitivity(). */ + float translationSensitivity() const { return transSensitivity_; }; + /*! Returns the minimum mouse speed required (at button release) to make the ManipulatedFrame + spin(). + + See spin(), spinningQuaternion() and startSpinning() for details. + + Mouse speed is expressed in pixels per milliseconds. Default value is 0.3 (300 pixels per + second). Use setSpinningSensitivity() to tune this value. A higher value will make spinning more + difficult (a value of 100.0 forbids spinning in practice). + + See also setSpinningSensitivity(), translationSensitivity(), rotationSensitivity() and + wheelSensitivity(). */ + float spinningSensitivity() const { return spinningSensitivity_; }; + /*! Returns the mouse wheel sensitivity. + + Default value is 1.0. A higher value will make the wheel action more efficient (usually meaning + a faster zoom). Use a negative value to invert the zoom in and out directions. + + See also setWheelSensitivity(), translationSensitivity(), rotationSensitivity() and + spinningSensitivity(). */ + float wheelSensitivity() const { return wheelSensitivity_; }; + //@} + + + /*! @name Spinning */ + //@{ + public: + /*! Returns \c true when the ManipulatedFrame is spinning. + + During spinning, spin() rotates the ManipulatedFrame by its spinningQuaternion() at a frequency + defined when the ManipulatedFrame startSpinning(). + + Use startSpinning() and stopSpinning() to change this state. Default value is \c false. */ + bool isSpinning() const { return isSpinning_; }; + /*! Returns the incremental rotation that is applied by spin() to the ManipulatedFrame + orientation when it isSpinning(). + + Default value is a null rotation (identity Quaternion). Use setSpinningQuaternion() to change + this value. + + The spinningQuaternion() axis is defined in the ManipulatedFrame coordinate system. You can use + Frame::transformOfFrom() to convert this axis from an other Frame coordinate system. */ + Quaternion spinningQuaternion() const { return spinningQuaternion_; } + public: + /*! Defines the spinningQuaternion(). Its axis is defined in the ManipulatedFrame coordinate + system. */ + void setSpinningQuaternion(const Quaternion& spinningQuaternion) { spinningQuaternion_ = spinningQuaternion; } + protected: + //virtual void spin(); + private: + void spinUpdate(); + //@} + + +#ifndef DOXYGEN + protected: + Quaternion deformedBallQuaternion(int x, int y, float cx, float cy, const Camera* const camera); + + int action_; // Should be a QGLViewer::MouseAction, but include loop + Constraint* previousConstraint_; // When manipulation is without Contraint. + + //virtual void startAction(int ma, bool withConstraint=true); // int is really a QGLViewer::MouseAction + + // Previous mouse position (used for incremental updates) and mouse press position. + Point prevPos_, pressPos_; +#endif // DOXYGEN + + private: + // Sensitivity + float rotSensitivity_; + float transSensitivity_; + float spinningSensitivity_; + float wheelSensitivity_; + + // Mouse speed and spinning + float mouseSpeed_; + int delay_; + bool isSpinning_; + Quaternion spinningQuaternion_; + + // Whether the SCREEN_TRANS direction (horizontal or vertical) is fixed or not. + bool dirIsFixed_; + + // MouseGrabber + bool keepsGrabbingMouse_; + }; + +//} // namespace qglviewer + +#endif // QGLVIEWER_MANIPULATED_FRAME_H diff --git a/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt b/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt new file mode 100644 index 00000000000..0d10049ee15 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt @@ -0,0 +1,593 @@ +// +// Filename : AppConfig.h +// Author : Stephane Grabli +// Purpose : Configuration file +// Date of creation : 26/02/2003 +// +/////////////////////////////////////////////////////////////////////////////// + +// +// Copyright (C) : Please refer to the COPYRIGHT file distributed +// with this source distribution. +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef ARTGLWIDGET_H +# define ARTGLWIDGET_H + +# ifndef WIN32 +# include +using namespace std; +# define __min(x,y) (min(x,y)) +# define __max(x,y) (max(x,y)) +# endif // WIN32 + + +//# include +# include "../geometry/Geom.h" +# include "../geometry/BBox.h" +# include "../scene_graph/NodeDrawingStyle.h" +# include "../system/TimeUtils.h" +# include "../system/Precision.h" +# include "AppConfig.h" +# include "../rendering/GLDebugRenderer.h" +//# include + +using namespace Geometry; + +typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; + +class FEdge; +class QMainWindow; +class GLRenderer; +class GLSelectRenderer; +class GLBBoxRenderer; +class GLMonoColorRenderer; +class GLDebugRenderer; + +class Vec{ +public: + Vec() {}; + Vec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {}; + ~Vec() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + } + return 0.0; + } + + + float x,y,z; +}; + +class Quaternion{ +public: + Quaternion( float _x, float _y, float _z, float _s): x(_x), y(_y), z(_z), s(_s){}; + ~Quaternion() {} + + float operator[] (unsigned i) { + switch(i){ + case 0: return x; break; + case 1: return y; break; + case 2: return z; break; + case 3: return s; break; + } + return 0.0; + } + + float x,y,z,s; +}; + +class Camera { + private: + float _position[3]; + float _orientation[3]; + + public: + Camera(){}; + ~Camera() {}; + + void setZNearCoefficient(float f) {} + void playPath(int i) {} + + void loadProjectionMatrix() {} + void loadModelViewMatrix() {} + real distanceToSceneCenter() { return 0;} + void showEntireScene() {} + real zFar() {return 0;} + real zNear() {return 0;} + void setPosition(Vec v) {} + void setOrientation(Quaternion q) {} + float* position() { return _position; } + float* orientation() { return _orientation; } + void getWorldCoordinatesOf(float *src, float *vp_tmp) {} + +}; + + +//class AppGLWidget : public QGLViewer +class AppGLWidget +{ + //Q_OBJECT + + +public: + + AppGLWidget(const char *iName = 0); + virtual ~AppGLWidget(); + +public: + + inline void swapBuffers() {} + inline void updateGL() {} + inline void makeCurrent() {} + inline void setSceneBoundingBox(Vec &min_, Vec &max_) {} + inline void saveSnapshot(bool b) {} + inline real width() { return _width; } + inline real height() { return _height; } + void setStateFileName(const string& name) { stateFileName_ = name; }; + + +Camera * _camera; + + // captures a frame animation that was previously registered + void captureMovie(); + + /*! Sets the rendering style. + iStyle + The style used to render. Can be: + SURFACIC : usual rendering + LINES : line rendering + DEPTHBUFFER : grey-levels rendering of the depth buffer + */ + inline void SetRenderStyle(RenderStyle iStyle) + { + _RenderStyle = iStyle; + } + + /*! Sets the model to draw in the viewer + * iModel + * The Root Node of the model + */ + inline void SetModel(NodeGroup *iModel) + { + if(0 != _ModelRootNode->numberOfChildren()) + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + } + + AddModel(iModel); + } + + /*! Adds a model for displaying in the viewer */ + inline void AddModel(NodeGroup *iModel) + { + _ModelRootNode->AddChild(iModel); + + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + + // DEBUG: + ReInitRenderers(); + + } + + inline void AddSilhouette(NodeGroup* iSilhouette) + { + _SilhouetteRootNode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DSilhouette(NodeGroup *iSilhouette) + { + //_pFENode->AddChild(iSilhouette); + //ToggleSilhouette(true); + updateGL(); + } + + inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) + { + //_pVisibleSilhouetteNode->AddChild(iVSilhouette); + updateGL(); + } + + inline void SetDebug(NodeGroup* iDebug) + { + if(0 != _DebugRootNode->numberOfChildren()) + { + _DebugRootNode->DetachChildren(); + _DebugRootNode->clearBBox(); + } + + AddDebug(iDebug); + } + + inline void AddDebug(NodeGroup* iDebug) + { + _DebugRootNode->AddChild(iDebug); + updateGL(); + } + + inline void DetachModel(Node *iModel) + { + _ModelRootNode->DetachChild(iModel); + _ModelRootNode->UpdateBBox(); + + _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1]), + _ModelRootNode->bbox().getMin()[2]); + _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1]), + _ModelRootNode->bbox().getMax()[2]); + + _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); + _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); + } + + inline void DetachModel() + { + _ModelRootNode->DetachChildren(); + _ModelRootNode->clearBBox(); + + // 2D Scene + //_p2DNode.DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + updateGL(); + } + + inline void DetachSilhouette() + { + _SilhouetteRootNode->DetachChildren(); + //_pFENode->DetachChildren(); + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + //updateGL(); //FIXME + } + + inline void DetachVisibleSilhouette() + { + //_pVisibleSilhouetteNode->DetachChildren(); + _p2DSelectionNode->destroy(); + updateGL(); + } + + inline void DetachDebug() + { + _DebugRootNode->DetachChildren(); + updateGL(); + } + + void SetMainWindow(QMainWindow *iMainWindow) ; + + inline void Set3DContext() + { + // GL_PROJECTION matrix + _camera->loadProjectionMatrix(); + // GL_MODELVIEW matrix + _camera->loadModelViewMatrix(); + } + + inline void RetriveModelViewMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_MODELVIEW_MATRIX, p); + } + inline void RetriveModelViewMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_MODELVIEW_MATRIX, p); + } + + inline void RetrieveProjectionMatrix(float *p) + { + makeCurrent(); + glGetFloatv(GL_PROJECTION_MATRIX, p); + + } + inline void RetrieveProjectionMatrix(real *p) + { + makeCurrent(); + glGetDoublev(GL_PROJECTION_MATRIX, p); + + } + + inline void RetrieveViewport(int *p) + { + makeCurrent(); + glGetIntegerv(GL_VIEWPORT,(GLint *)p); + } + + inline real GetFocalLength() const + { + real Near = __max(0.1,(real)(-2.f*_maxAbs+_camera->distanceToSceneCenter())); + return Near; + } + + inline real GetAspect() const + { + return ((real) _width/(real) _height); + } + + inline real GetFovyRadian() const + { + return _Fovy/180.0 * M_PI; + } + + inline real GetFovyDegrees() const + { + return _Fovy; + } + + inline void FitBBox() + { + Vec min_(_ModelRootNode->bbox().getMin()[0], + _ModelRootNode->bbox().getMin()[1], + _ModelRootNode->bbox().getMin()[2]); + Vec max_(_ModelRootNode->bbox().getMax()[0], + _ModelRootNode->bbox().getMax()[1], + _ModelRootNode->bbox().getMax()[2]); + setSceneBoundingBox(min_, max_); + _camera->showEntireScene(); + } + + inline void ToggleSilhouette(bool enabled) + { + _fedges = enabled; + updateGL(); + } + + // Reinit the renderers which need to be informed + // when a model is added to the scene. + void ReInitRenderers(); + + inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + + inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } + inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} + + /*! glReadPixels */ + typedef enum{ + RGB, + DEPTH + } PixelFormat; + void readPixels(int x, + int y, + int width, + int height, + PixelFormat format, + float *pixels) + { + makeCurrent(); + //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK + glReadBuffer(GL_BACK); + GLenum glformat; + switch(format) + { + case RGB: + glformat = GL_RGB; + break; + case DEPTH: + glformat = GL_DEPTH_COMPONENT; + break; + default: + break; + } + glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); + } + + void clear() { makeCurrent(); glClear(GL_COLOR_BUFFER_BIT ); } + + void prepareCanvas(); + void releaseCanvas(); + + typedef enum { + FRONT, + BACK + } GLBuffer; + + void setReadPixelsBuffer(int iBuffer) + { + makeCurrent(); + switch(iBuffer) + { + case FRONT: + glReadBuffer(GL_FRONT); + break; + case BACK: + glReadBuffer(GL_BACK); + break; + default: + break; + } + } + + BBox scene3DBBox() const { return _ModelRootNode->bbox(); } + + inline real znear() const { + return _camera->zNear(); + } + + inline real zfar() const { + return _camera->zFar(); + } + + inline bool draw3DsceneEnabled() const { return _Draw3DScene; } + + inline bool getRecordFlag() const {return _record;} + + void setCameraState(const float* position, const float* orientation) { + _camera->setPosition(Vec(position[0], position[1], position[2])); + _camera->setOrientation(Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); + } + + void getCameraState(float* position, float* orientation) const { + float* pos = _camera->position(); + float* orient = _camera->orientation(); + int i; + for(i=0;i<3;++i){ + position[i] = pos[i]; + } + for(i=0;i<4;++i){ + orientation[i] = orient[i]; + } + } + + void saveCameraState() { + getCameraState(_cameraPosition, _cameraOrientation); + _cameraStateSaved = true; + } + + void setUpdateMode(bool b) { + _enableUpdateSilhouettes = b; + } + + bool getUpdateMode() const { + return _enableUpdateSilhouettes; + } + static void setFrontBufferFlag(bool iBool); + static bool getFrontBufferFlag(); + static void setBackBufferFlag(bool iBool); + static bool getBackBufferFlag(); + +protected: + virtual void init(); + virtual void draw(); + + /*! Loads an envmap */ + void LoadEnvMap(const char *filename); + +public: + /*! Core scene drawing */ + void DrawScene(SceneVisitor *iRenderer); + + /*! 2D Scene Drawing */ + void Draw2DScene(SceneVisitor *iRenderer); + + /*! Draws scene silhouettes in real time */ + void DrawSilhouette(); + + /*! Draws the Scene in lines style */ + // void DrawLines(); + // /*! Draws the scene in surfacic style */ + // void DrawSurfacic(); + // /*! Draws the scene as a depth buffer image */ + // void DrawDepthBuffer(); + + GLRenderer* glRenderer() {return _pGLRenderer;} + +protected: + + + //QString shortcutBindingsString() const; + + /*! fabs or abs */ + inline int rabs(int x) {return abs(x);} + inline real rabs(real x) {return fabs(x);} + + +protected: + float _Fovy; + //float _SceneDepth; + //BBox _BBox; + + RenderStyle _RenderStyle; + + //The root node container + NodeGroup _RootNode; + NodeDrawingStyle *_ModelRootNode; + NodeDrawingStyle *_SilhouetteRootNode; + NodeDrawingStyle *_DebugRootNode; + + bool _silhouette; + bool _fedges; + bool _debug; + bool _selection_mode; + + //a Universal light: + NodeGroup _Light; + + real _minBBox; + real _maxBBox; + real _maxAbs; + + real _minAbs; + bool _drawBBox; + + // OpenGL Renderer + GLRenderer *_pGLRenderer; + GLSelectRenderer *_pSelectRenderer; + GLBBoxRenderer *_pBBoxRenderer; + GLMonoColorRenderer *_pMonoColorRenderer; + GLDebugRenderer *_pDebugRenderer; + + QMainWindow *_pMainWindow; + + Chronometer _Chrono; + + // 2D Scene + bool _Draw2DScene; + bool _Draw3DScene; NodeGroup _p2DNode; + //NodeDrawingStyle *_pFENode; // Feature edges node + //NodeDrawingStyle *_pVisibleSilhouetteNode; + NodeDrawingStyle *_p2DSelectionNode; + + // EnvMap + bool _drawEnvMap; + int _currentEnvMap; + int _maxId; + int _blendFunc; + + // Each time we compute the view map, the camera state is + // saved in order to be able to restore it later + bool _cameraStateSaved; + float _cameraPosition[3]; + float _cameraOrientation[4]; + + // interactive silhouette update + bool _enableUpdateSilhouettes; + //capture movie + bool _captureMovie; + // 2D drawing buffers + static bool _frontBufferFlag; + static bool _backBufferFlag; + + bool _record; + + +real _width, _height; +Vec _min,_max; +string stateFileName_; +}; + +#endif // ARTGLWIDGET_H diff --git a/source/blender/freestyle/intern/app_blender/point.h b/source/blender/freestyle/intern/app_blender/point.h new file mode 100644 index 00000000000..81903f174a8 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/point.h @@ -0,0 +1,159 @@ +#ifndef POINT_H +#define POINT_H + +typedef int QCOORD; + +class Point +{ +public: + Point(); + Point( int xpos, int ypos ); + + bool isNull() const; + + int x() const; + int y() const; + void setX( int x ); + void setY( int y ); + + int manhattanLength() const; + + QCOORD &rx(); + QCOORD &ry(); + + Point &operator+=( const Point &p ); + Point &operator-=( const Point &p ); + Point &operator*=( int c ); + Point &operator*=( double c ); + Point &operator/=( int c ); + Point &operator/=( double c ); + + friend inline bool operator==( const Point &, const Point & ); + friend inline bool operator!=( const Point &, const Point & ); + friend inline const Point operator+( const Point &, const Point & ); + friend inline const Point operator-( const Point &, const Point & ); + friend inline const Point operator*( const Point &, int ); + friend inline const Point operator*( int, const Point & ); + friend inline const Point operator*( const Point &, double ); + friend inline const Point operator*( double, const Point & ); + friend inline const Point operator-( const Point & ); + friend inline const Point operator/( const Point &, int ); + friend inline const Point operator/( const Point &, double ); + +private: + QCOORD xp; + QCOORD yp; +}; + +static void warningDivByZero() { + // cout << "warning: dividing by zero" +} + + +/***************************************************************************** + Point inline functions + *****************************************************************************/ + +inline Point::Point() +{ xp=0; yp=0; } + +inline Point::Point( int xpos, int ypos ) +{ xp=(QCOORD)xpos; yp=(QCOORD)ypos; } + +inline bool Point::isNull() const +{ return xp == 0 && yp == 0; } + +inline int Point::x() const +{ return xp; } + +inline int Point::y() const +{ return yp; } + +inline void Point::setX( int x ) +{ xp = (QCOORD)x; } + +inline void Point::setY( int y ) +{ yp = (QCOORD)y; } + +inline QCOORD &Point::rx() +{ return xp; } + +inline QCOORD &Point::ry() +{ return yp; } + +inline Point &Point::operator+=( const Point &p ) +{ xp+=p.xp; yp+=p.yp; return *this; } + +inline Point &Point::operator-=( const Point &p ) +{ xp-=p.xp; yp-=p.yp; return *this; } + +inline Point &Point::operator*=( int c ) +{ xp*=(QCOORD)c; yp*=(QCOORD)c; return *this; } + +inline Point &Point::operator*=( double c ) +{ xp=(QCOORD)(xp*c); yp=(QCOORD)(yp*c); return *this; } + +inline bool operator==( const Point &p1, const Point &p2 ) +{ return p1.xp == p2.xp && p1.yp == p2.yp; } + +inline bool operator!=( const Point &p1, const Point &p2 ) +{ return p1.xp != p2.xp || p1.yp != p2.yp; } + +inline const Point operator+( const Point &p1, const Point &p2 ) +{ return Point(p1.xp+p2.xp, p1.yp+p2.yp); } + +inline const Point operator-( const Point &p1, const Point &p2 ) +{ return Point(p1.xp-p2.xp, p1.yp-p2.yp); } + +inline const Point operator*( const Point &p, int c ) +{ return Point(p.xp*c, p.yp*c); } + +inline const Point operator*( int c, const Point &p ) +{ return Point(p.xp*c, p.yp*c); } + +inline const Point operator*( const Point &p, double c ) +{ return Point((QCOORD)(p.xp*c), (QCOORD)(p.yp*c)); } + +inline const Point operator*( double c, const Point &p ) +{ return Point((QCOORD)(p.xp*c), (QCOORD)(p.yp*c)); } + +inline const Point operator-( const Point &p ) +{ return Point(-p.xp, -p.yp); } + +inline Point &Point::operator/=( int c ) +{ + if ( c == 0 ) + warningDivByZero(); + + xp/=(QCOORD)c; + yp/=(QCOORD)c; + return *this; +} + +inline Point &Point::operator/=( double c ) +{ + if ( c == 0.0 ) + warningDivByZero(); + + xp=(QCOORD)(xp/c); + yp=(QCOORD)(yp/c); + return *this; +} + +inline const Point operator/( const Point &p, int c ) +{ + if ( c == 0 ) + warningDivByZero(); + + return Point(p.xp/c, p.yp/c); +} + +inline const Point operator/( const Point &p, double c ) +{ + if ( c == 0.0 ) + warningDivByZero(); + + return Point((QCOORD)(p.xp/c), (QCOORD)(p.yp/c)); +} + +#endif // POINT_H \ No newline at end of file diff --git a/source/blender/freestyle/intern/app_blender/quaternion.cpp b/source/blender/freestyle/intern/app_blender/quaternion.cpp new file mode 100644 index 00000000000..3dd42ed6ed3 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/quaternion.cpp @@ -0,0 +1,502 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "quaternion.h" +#include // RAND_MAX + +// All the methods are declared inline in Quaternion.h +using namespace std; + +/*! Constructs a Quaternion that will rotate from the \p from direction to the \p to direction. + +Note that this rotation is not uniquely defined. The selected axis is usually orthogonal to \p from +and \p to. However, this method is robust and can handle small or almost identical vectors. */ +Quaternion::Quaternion(const Vec& from, const Vec& to) +{ + const float epsilon = 1E-10f; + + const float fromSqNorm = from.squaredNorm(); + const float toSqNorm = to.squaredNorm(); + // Identity Quaternion when one vector is null + if ((fromSqNorm < epsilon) || (toSqNorm < epsilon)) + { + q[0]=q[1]=q[2]=0.0; + q[3]=1.0; + } + else + { + Vec axis = cross(from, to); + const float axisSqNorm = axis.squaredNorm(); + + // Aligned vectors, pick any axis, not aligned with from or to + if (axisSqNorm < epsilon) + axis = from.orthogonalVec(); + + double angle = asin(sqrt(axisSqNorm / (fromSqNorm * toSqNorm))); + + if (from*to < 0.0) + angle = M_PI-angle; + + setAxisAngle(axis, angle); + } +} + +/*! Returns the image of \p v by the Quaternion inverse() rotation. + +rotate() performs an inverse transformation. Same as inverse().rotate(v). */ +Vec Quaternion::inverseRotate(const Vec& v) const +{ + return inverse().rotate(v); +} + +/*! Returns the image of \p v by the Quaternion rotation. + +See also inverseRotate() and operator*(const Quaternion&, const Vec&). */ +Vec Quaternion::rotate(const Vec& v) const +{ + const double q00 = 2.0l * q[0] * q[0]; + const double q11 = 2.0l * q[1] * q[1]; + const double q22 = 2.0l * q[2] * q[2]; + + const double q01 = 2.0l * q[0] * q[1]; + const double q02 = 2.0l * q[0] * q[2]; + const double q03 = 2.0l * q[0] * q[3]; + + const double q12 = 2.0l * q[1] * q[2]; + const double q13 = 2.0l * q[1] * q[3]; + + const double q23 = 2.0l * q[2] * q[3]; + + return Vec((1.0 - q11 - q22)*v[0] + ( q01 - q23)*v[1] + ( q02 + q13)*v[2], + ( q01 + q23)*v[0] + (1.0 - q22 - q00)*v[1] + ( q12 - q03)*v[2], + ( q02 - q13)*v[0] + ( q12 + q03)*v[1] + (1.0 - q11 - q00)*v[2] ); +} + +/*! Set the Quaternion from a (supposedly correct) 3x3 rotation matrix. + + The matrix is expressed in European format: its three \e columns are the images by the rotation of + the three vectors of an orthogonal basis. Note that OpenGL uses a symmetric representation for its + matrices. + + setFromRotatedBasis() sets a Quaternion from the three axis of a rotated frame. It actually fills + the three columns of a matrix with these rotated basis vectors and calls this method. */ +void Quaternion::setFromRotationMatrix(const double m[3][3]) +{ + // Compute one plus the trace of the matrix + const double onePlusTrace = 1.0 + m[0][0] + m[1][1] + m[2][2]; + + if (onePlusTrace > 1E-5) + { + // Direct computation + const double s = sqrt(onePlusTrace) * 2.0; + q[0] = (m[2][1] - m[1][2]) / s; + q[1] = (m[0][2] - m[2][0]) / s; + q[2] = (m[1][0] - m[0][1]) / s; + q[3] = 0.25 * s; + } + else + { + // Computation depends on major diagonal term + if ((m[0][0] > m[1][1])&(m[0][0] > m[2][2])) + { + const double s = sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]) * 2.0; + q[0] = 0.25 * s; + q[1] = (m[0][1] + m[1][0]) / s; + q[2] = (m[0][2] + m[2][0]) / s; + q[3] = (m[1][2] - m[2][1]) / s; + } + else + if (m[1][1] > m[2][2]) + { + const double s = sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]) * 2.0; + q[0] = (m[0][1] + m[1][0]) / s; + q[1] = 0.25 * s; + q[2] = (m[1][2] + m[2][1]) / s; + q[3] = (m[0][2] - m[2][0]) / s; + } + else + { + const double s = sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]) * 2.0; + q[0] = (m[0][2] + m[2][0]) / s; + q[1] = (m[1][2] + m[2][1]) / s; + q[2] = 0.25 * s; + q[3] = (m[0][1] - m[1][0]) / s; + } + } + normalize(); +} + +#ifndef DOXYGEN +void Quaternion::setFromRotationMatrix(const float m[3][3]) +{ + cout << "setFromRotationMatrix now waits for a double[3][3] parameter" << endl; + + double mat[3][3]; + for (int i=0; i<3; ++i) + for (int j=0; j<3; ++j) + mat[i][j] = double(m[i][j]); + + setFromRotationMatrix(mat); +} + +void Quaternion::setFromRotatedBase(const Vec& X, const Vec& Y, const Vec& Z) +{ + cout << "setFromRotatedBase is deprecated, use setFromRotatedBasis instead" << endl; + setFromRotatedBasis(X,Y,Z); +} +#endif + +/*! Sets the Quaternion from the three rotated vectors of an orthogonal basis. + + The three vectors do not have to be normalized but must be orthogonal and direct (X^Y=k*Z, with k>0). + + \code + Quaternion q; + q.setFromRotatedBasis(X, Y, Z); + // Now q.rotate(Vec(1,0,0)) == X and q.inverseRotate(X) == Vec(1,0,0) + // Same goes for Y and Z with Vec(0,1,0) and Vec(0,0,1). + \endcode + + See also setFromRotationMatrix() and Quaternion(const Vec&, const Vec&). */ +void Quaternion::setFromRotatedBasis(const Vec& X, const Vec& Y, const Vec& Z) +{ + double m[3][3]; + double normX = X.norm(); + double normY = Y.norm(); + double normZ = Z.norm(); + + for (int i=0; i<3; ++i) + { + m[i][0] = X[i] / normX; + m[i][1] = Y[i] / normY; + m[i][2] = Z[i] / normZ; + } + + setFromRotationMatrix(m); +} + +/*! Returns the axis vector and the angle (in radians) of the rotation represented by the Quaternion. + See the axis() and angle() documentations. */ +void Quaternion::getAxisAngle(Vec& axis, float& angle) const +{ + angle = 2.0*acos(q[3]); + axis = Vec(q[0], q[1], q[2]); + const float sinus = axis.norm(); + if (sinus > 1E-8) + axis /= sinus; + + if (angle > M_PI) + { + angle = 2.0*M_PI - angle; + axis = -axis; + } +} + +/*! Returns the normalized axis direction of the rotation represented by the Quaternion. + +It is null for an identity Quaternion. See also angle() and getAxisAngle(). */ +Vec Quaternion::axis() const +{ + Vec res = Vec(q[0], q[1], q[2]); + const float sinus = res.norm(); + if (sinus > 1E-8) + res /= sinus; + return (acos(q[3]) <= M_PI/2.0) ? res : -res; +} + +/*! Returns the angle (in radians) of the rotation represented by the Quaternion. + + This value is always in the range [0-pi]. Larger rotational angles are obtained by inverting the + axis() direction. + + See also axis() and getAxisAngle(). */ +float Quaternion::angle() const +{ + const float angle = 2.0 * acos(q[3]); + return (angle <= M_PI) ? angle : 2.0*M_PI - angle; +} + + + + +/*! Returns the Quaternion associated 4x4 OpenGL rotation matrix. + + Use \c glMultMatrixd(q.matrix()) to apply the rotation represented by Quaternion \c q to the + current OpenGL matrix. + + See also getMatrix(), getRotationMatrix() and inverseMatrix(). + + \attention The result is only valid until the next call to matrix(). Use it immediately (as shown + above) or consider using getMatrix() instead. + + \attention The matrix is given in OpenGL format (row-major order) and is the transpose of the + actual mathematical European representation. Consider using getRotationMatrix() instead. */ +const GLdouble* Quaternion::matrix() const +{ + static GLdouble m[4][4]; + getMatrix(m); + return (const GLdouble*)(m); +} + +/*! Fills \p m with the OpenGL representation of the Quaternion rotation. + +Use matrix() if you do not need to store this matrix and simply want to alter the current OpenGL +matrix. See also getInverseMatrix() and Frame::getMatrix(). */ +void Quaternion::getMatrix(GLdouble m[4][4]) const +{ + const double q00 = 2.0l * q[0] * q[0]; + const double q11 = 2.0l * q[1] * q[1]; + const double q22 = 2.0l * q[2] * q[2]; + + const double q01 = 2.0l * q[0] * q[1]; + const double q02 = 2.0l * q[0] * q[2]; + const double q03 = 2.0l * q[0] * q[3]; + + const double q12 = 2.0l * q[1] * q[2]; + const double q13 = 2.0l * q[1] * q[3]; + + const double q23 = 2.0l * q[2] * q[3]; + + m[0][0] = 1.0l - q11 - q22; + m[1][0] = q01 - q23; + m[2][0] = q02 + q13; + + m[0][1] = q01 + q23; + m[1][1] = 1.0l - q22 - q00; + m[2][1] = q12 - q03; + + m[0][2] = q02 - q13; + m[1][2] = q12 + q03; + m[2][2] = 1.0l - q11 - q00; + + m[0][3] = 0.0l; + m[1][3] = 0.0l; + m[2][3] = 0.0l; + + m[3][0] = 0.0l; + m[3][1] = 0.0l; + m[3][2] = 0.0l; + m[3][3] = 1.0l; +} + +/*! Same as getMatrix(), but with a \c GLdouble[16] parameter. See also getInverseMatrix() and Frame::getMatrix(). */ +void Quaternion::getMatrix(GLdouble m[16]) const +{ + static GLdouble mat[4][4]; + getMatrix(mat); + int count = 0; + for (int i=0; i<4; ++i) + for (int j=0; j<4; ++j) + m[count++] = mat[i][j]; +} + +/*! Fills \p m with the 3x3 rotation matrix associated with the Quaternion. + + See also getInverseRotationMatrix(). + + \attention \p m uses the European mathematical representation of the rotation matrix. Use matrix() + and getMatrix() to retrieve the OpenGL transposed version. */ +void Quaternion::getRotationMatrix(float m[3][3]) const +{ + static GLdouble mat[4][4]; + getMatrix(mat); + for (int i=0; i<3; ++i) + for (int j=0; j<3; ++j) + // Beware of transposition + m[i][j] = mat[j][i]; +} + +/*! Returns the associated 4x4 OpenGL \e inverse rotation matrix. This is simply the matrix() of the + inverse(). + + \attention The result is only valid until the next call to inverseMatrix(). Use it immediately (as + in \c glMultMatrixd(q.inverseMatrix())) or use getInverseMatrix() instead. + + \attention The matrix is given in OpenGL format (row-major order) and is the transpose of the + actual mathematical European representation. Consider using getInverseRotationMatrix() instead. */ +const GLdouble* Quaternion::inverseMatrix() const +{ + static GLdouble m[4][4]; + getInverseMatrix(m); + return (const GLdouble*)(m); +} + +/*! Fills \p m with the OpenGL matrix corresponding to the inverse() rotation. + +Use inverseMatrix() if you do not need to store this matrix and simply want to alter the current +OpenGL matrix. See also getMatrix(). */ +void Quaternion::getInverseMatrix(GLdouble m[4][4]) const +{ + inverse().getMatrix(m); +} + +/*! Same as getInverseMatrix(), but with a \c GLdouble[16] parameter. See also getMatrix(). */ +void Quaternion::getInverseMatrix(GLdouble m[16]) const +{ + inverse().getMatrix(m); +} + +/*! \p m is set to the 3x3 \e inverse rotation matrix associated with the Quaternion. + + \attention This is the classical mathematical rotation matrix. The OpenGL format uses its + transposed version. See inverseMatrix() and getInverseMatrix(). */ +void Quaternion::getInverseRotationMatrix(float m[3][3]) const +{ + static GLdouble mat[4][4]; + getInverseMatrix(mat); + for (int i=0; i<3; ++i) + for (int j=0; j<3; ++j) + // Beware of transposition + m[i][j] = mat[j][i]; +} + + +/*! Returns the slerp interpolation of Quaternions \p a and \p b, at time \p t. + + \p t should range in [0,1]. Result is \p a when \p t=0 and \p b when \p t=1. + + When \p allowFlip is \c true (default) the slerp interpolation will always use the "shortest path" + between the Quaternions' orientations, by "flipping" the source Quaternion if needed (see + negate()). */ +Quaternion Quaternion::slerp(const Quaternion& a, const Quaternion& b, float t, bool allowFlip) +{ + float cosAngle = Quaternion::dot(a, b); + + float c1, c2; + // Linear interpolation for close orientations + if ((1.0 - fabs(cosAngle)) < 0.01) + { + c1 = 1.0 - t; + c2 = t; + } + else + { + // Spherical interpolation + float angle = acos(fabs(cosAngle)); + float sinAngle = sin(angle); + c1 = sin(angle * (1.0 - t)) / sinAngle; + c2 = sin(angle * t) / sinAngle; + } + + // Use the shortest path + if (allowFlip && (cosAngle < 0.0)) + c1 = -c1; + + return Quaternion(c1*a[0] + c2*b[0], c1*a[1] + c2*b[1], c1*a[2] + c2*b[2], c1*a[3] + c2*b[3]); +} + +/*! Returns the slerp interpolation of the two Quaternions \p a and \p b, at time \p t, using + tangents \p tgA and \p tgB. + + The resulting Quaternion is "between" \p a and \p b (result is \p a when \p t=0 and \p b for \p + t=1). + + Use squadTangent() to define the Quaternion tangents \p tgA and \p tgB. */ +Quaternion Quaternion::squad(const Quaternion& a, const Quaternion& tgA, const Quaternion& tgB, const Quaternion& b, float t) +{ + Quaternion ab = Quaternion::slerp(a, b, t); + Quaternion tg = Quaternion::slerp(tgA, tgB, t, false); + return Quaternion::slerp(ab, tg, 2.0*t*(1.0-t), false); +} + +/*! Returns the logarithm of the Quaternion. See also exp(). */ +Quaternion Quaternion::log() +{ + float len = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2]); + + if (len < 1E-6) + return Quaternion(q[0], q[1], q[2], 0.0); + else + { + float coef = acos(q[3]) / len; + return Quaternion(q[0]*coef, q[1]*coef, q[2]*coef, 0.0); + } +} + +/*! Returns the exponential of the Quaternion. See also log(). */ +Quaternion Quaternion::exp() +{ + float theta = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2]); + + if (theta < 1E-6) + return Quaternion(q[0], q[1], q[2], cos(theta)); + else + { + float coef = sin(theta) / theta; + return Quaternion(q[0]*coef, q[1]*coef, q[2]*coef, cos(theta)); + } +} + +/*! Returns log(a. inverse() * b). Useful for squadTangent(). */ +Quaternion Quaternion::lnDif(const Quaternion& a, const Quaternion& b) +{ + Quaternion dif = a.inverse()*b; + dif.normalize(); + return dif.log(); +} + +/*! Returns a tangent Quaternion for \p center, defined by \p before and \p after Quaternions. + + Useful for smooth spline interpolation of Quaternion with squad() and slerp(). */ +Quaternion Quaternion::squadTangent(const Quaternion& before, const Quaternion& center, const Quaternion& after) +{ + Quaternion l1 = Quaternion::lnDif(center,before); + Quaternion l2 = Quaternion::lnDif(center,after); + Quaternion e; + for (int i=0; i<4; ++i) + e.q[i] = -0.25 * (l1.q[i] + l2.q[i]); + e = center*(e.exp()); + + // if (Quaternion::dot(e,b) < 0.0) + // e.negate(); + + return e; +} + +ostream& operator<<(ostream& o, const Quaternion& Q) +{ + return o << Q[0] << '\t' << Q[1] << '\t' << Q[2] << '\t' << Q[3]; +} + +/*! Returns a random unit Quaternion. + +You can create a randomly directed unit vector using: +\code +Vec randomDir = Quaternion::randomQuaternion() * Vec(1.0, 0.0, 0.0); // or any other Vec +\endcode + +\note This function uses rand() to create pseudo-random numbers and the random number generator can +be initialized using srand().*/ +Quaternion Quaternion::randomQuaternion() +{ + // The rand() function is not very portable and may not be available on your system. + // Add the appropriate include or replace by an other random function in case of problem. + double seed = rand()/(float)RAND_MAX; + double r1 = sqrt(1.0 - seed); + double r2 = sqrt(seed); + double t1 = 2.0 * M_PI * (rand()/(float)RAND_MAX); + double t2 = 2.0 * M_PI * (rand()/(float)RAND_MAX); + return Quaternion(sin(t1)*r1, cos(t1)*r1, sin(t2)*r2, cos(t2)*r2); +} diff --git a/source/blender/freestyle/intern/app_blender/quaternion.h b/source/blender/freestyle/intern/app_blender/quaternion.h new file mode 100644 index 00000000000..e3bc876aa4c --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/quaternion.h @@ -0,0 +1,304 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_QUATERNION_H +#define QGLVIEWER_QUATERNION_H + +#include "config.h" +#include "vec.h" + + /*! \brief The Quaternion class represents 3D rotations and orientations. + \class Quaternion quaternion.h QGLViewer/quaternion.h + + The Quaternion is an appropriate (although not very intuitive) representation for 3D rotations and + orientations. Many tools are provided to ease the definition of a Quaternion: see constructors, + setAxisAngle(), setFromRotationMatrix(), setFromRotatedBasis(). + + You can apply the rotation represented by the Quaternion to 3D points using rotate() and + inverseRotate(). See also the Frame class that represents a coordinate system and provides other + conversion functions like Frame::coordinatesOf() and Frame::transformOf(). + + You can apply the Quaternion \c q rotation to the OpenGL matrices using: + \code + glMultMatrixd(q.matrix()); + // equvalent to glRotate(q.angle()*180.0/M_PI, q.axis().x, q.axis().y, q.axis().z); + \endcode + + Quaternion is part of the \c qglviewer namespace, specify \c qglviewer::Quaternion or use the qglviewer + namespace: \code using namespace qglviewer; \endcode + +

Internal representation

+ + The internal representation of a Quaternion corresponding to a rotation around axis \c axis, with an angle + \c alpha is made of four doubles q[i]: + \code + {q[0],q[1],q[2]} = sin(alpha/2) * {axis[0],axis[1],axis[2]} + q[3] = cos(alpha/2) + \endcode + + Note that certain implementations place the cosine term in first position (instead of last here). + + The Quaternion is always normalized, so that its inverse() is actually its conjugate. + + See also the Vec and Frame classes' documentations. + \nosubgrouping */ +class Quaternion +{ +public: + /*! @name Defining a Quaternion */ + //@{ + /*! Default constructor, builds an identity rotation. */ + Quaternion() + { q[0]=q[1]=q[2]=0.0; q[3]=1.0; } + + /*! Constructor from rotation axis (non null) and angle (in radians). See also setAxisAngle(). */ + Quaternion(const Vec& axis, double angle) + { + setAxisAngle(axis, angle); + } + + Quaternion(const Vec& from, const Vec& to); + + /*! Constructor from the four values of a Quaternion. First three values are axis*sin(angle/2) and + last one is cos(angle/2). + + \attention The identity Quaternion is Quaternion(0,0,0,1) and \e not Quaternion(0,0,0,0) (which is + not unitary). The default Quaternion() creates such identity Quaternion. */ + Quaternion(double q0, double q1, double q2, double q3) + { q[0]=q0; q[1]=q1; q[2]=q2; q[3]=q3; } + + /*! Copy constructor. */ + Quaternion(const Quaternion& Q) + { for (int i=0; i<4; ++i) q[i] = Q.q[i]; } + + /*! Equal operator. */ + Quaternion& operator=(const Quaternion& Q) + { + for (int i=0; i<4; ++i) + q[i] = Q.q[i]; + return (*this); + } + + /*! Sets the Quaternion as a rotation of axis \p axis and angle \p angle (in radians). + + \p axis does not need to be normalized. A null \p axis will result in an identity Quaternion. */ + void setAxisAngle(const Vec& axis, double angle) + { + const double norm = axis.norm(); + if (norm < 1E-8) + { + // Null rotation + q[0] = 0.0; q[1] = 0.0; q[2] = 0.0; q[3] = 1.0; + } + else + { + const double sin_half_angle = sin(angle / 2.0); + q[0] = sin_half_angle*axis[0]/norm; + q[1] = sin_half_angle*axis[1]/norm; + q[2] = sin_half_angle*axis[2]/norm; + q[3] = cos(angle / 2.0); + } + } + + /*! Sets the Quaternion value. See the Quaternion(double, double, double, double) constructor documentation. */ + void setValue(double q0, double q1, double q2, double q3) + { q[0]=q0; q[1]=q1; q[2]=q2; q[3]=q3; } + +#ifndef DOXYGEN + void setFromRotationMatrix(const float m[3][3]); + void setFromRotatedBase(const Vec& X, const Vec& Y, const Vec& Z); +#endif + void setFromRotationMatrix(const double m[3][3]); + void setFromRotatedBasis(const Vec& X, const Vec& Y, const Vec& Z); + //@} + + + /*! @name Accessing values */ + //@{ + Vec axis() const; + float angle() const; + void getAxisAngle(Vec& axis, float& angle) const; + + /*! Bracket operator, with a constant return value. \p i must range in [0..3]. See the Quaternion(double, double, double, double) documentation. */ + double operator[](int i) const { return q[i]; } + + /*! Bracket operator returning an l-value. \p i must range in [0..3]. See the Quaternion(double, double, double, double) documentation. */ + double& operator[](int i) { return q[i]; } + //@} + + + /*! @name Rotation computations */ + //@{ + /*! Returns the composition of the \p a and \p b rotations. + + The order is important. When applied to a Vec \c v (see operator*(const Quaternion&, const Vec&) + and rotate()) the resulting Quaternion acts as if \p b was applied first and then \p a was + applied. This is obvious since the image \c v' of \p v by the composited rotation satisfies: \code + v'= (a*b) * v = a * (b*v) \endcode + + Note that a*b usually differs from b*a. + + \attention For efficiency reasons, the resulting Quaternion is not normalized. Use normalize() in + case of numerical drift with small rotation composition. */ + friend Quaternion operator*(const Quaternion& a, const Quaternion& b) + { + return Quaternion(a.q[3]*b.q[0] + b.q[3]*a.q[0] + a.q[1]*b.q[2] - a.q[2]*b.q[1], + a.q[3]*b.q[1] + b.q[3]*a.q[1] + a.q[2]*b.q[0] - a.q[0]*b.q[2], + a.q[3]*b.q[2] + b.q[3]*a.q[2] + a.q[0]*b.q[1] - a.q[1]*b.q[0], + a.q[3]*b.q[3] - b.q[0]*a.q[0] - a.q[1]*b.q[1] - a.q[2]*b.q[2]); + } + + /*! Quaternion rotation is composed with \p q. + + See operator*(), since this is equivalent to \c this = \c this * \p q. + + \note For efficiency reasons, the resulting Quaternion is not normalized. + You may normalize() it after each application in case of numerical drift. */ + Quaternion& operator*=(const Quaternion &q) + { + *this = (*this)*q; + return *this; + } + + /*! Returns the image of \p v by the rotation \p q. + + Same as q.rotate(v). See rotate() and inverseRotate(). */ + friend Vec operator*(const Quaternion& q, const Vec& v) + { + return q.rotate(v); + } + + Vec rotate(const Vec& v) const; + Vec inverseRotate(const Vec& v) const; + //@} + + + /*! @name Inversion */ + //@{ + /*! Returns the inverse Quaternion (inverse rotation). + + Result has a negated axis() direction and the same angle(). A composition (see operator*()) of a + Quaternion and its inverse() results in an identity function. + + Use invert() to actually modify the Quaternion. */ + Quaternion inverse() const { return Quaternion(-q[0], -q[1], -q[2], q[3]); } + + /*! Inverses the Quaternion (same rotation angle(), but negated axis()). + + See also inverse(). */ + void invert() { q[0] = -q[0]; q[1] = -q[1]; q[2] = -q[2]; } + + /*! Negates all the coefficients of the Quaternion. + + This results in an other representation of the \e same rotation (opposite rotation angle, but with + a negated axis direction: the two cancel out). However, note that the results of axis() and + angle() are unchanged after a call to this method since angle() always returns a value in [0,pi]. + + This method is mainly useful for Quaternion interpolation, so that the spherical + interpolation takes the shortest path on the unit sphere. See slerp() for details. */ + void negate() { invert(); q[3] = -q[3]; } + + /*! Normalizes the Quaternion coefficients. + + This method should not need to be called since we only deal with unit Quaternions. This is however + useful to prevent numerical drifts, especially with small rotational increments. See also + normalized(). */ + double normalize() + { + const double norm = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]); + for (int i=0; i<4; ++i) + q[i] /= norm; + return norm; + } + + /*! Returns a normalized version of the Quaternion. + + See also normalize(). */ + Quaternion normalized() const + { + double Q[4]; + const double norm = sqrt(q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3]); + for (int i=0; i<4; ++i) + Q[i] = q[i] / norm; + return Quaternion(Q[0], Q[1], Q[2], Q[3]); + } +//@} + + + /*! @name Associated matrix */ + //@{ + const GLdouble* matrix() const; + void getMatrix(GLdouble m[4][4]) const; + void getMatrix(GLdouble m[16]) const; + + void getRotationMatrix(float m[3][3]) const; + + const GLdouble* inverseMatrix() const; + void getInverseMatrix(GLdouble m[4][4]) const; + void getInverseMatrix(GLdouble m[16]) const; + + void getInverseRotationMatrix(float m[3][3]) const; + //@} + + + /*! @name Slerp interpolation */ + //@{ + static Quaternion slerp(const Quaternion& a, const Quaternion& b, float t, bool allowFlip=true); + static Quaternion squad(const Quaternion& a, const Quaternion& tgA, const Quaternion& tgB, const Quaternion& b, float t); + /*! Returns the "dot" product of \p a and \p b: a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]. */ + static double dot(const Quaternion& a, const Quaternion& b) { return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; } + + Quaternion log(); + Quaternion exp(); + static Quaternion lnDif(const Quaternion& a, const Quaternion& b); + static Quaternion squadTangent(const Quaternion& before, const Quaternion& center, const Quaternion& after); + //@} + + /*! @name Random Quaternion */ + //@{ + static Quaternion randomQuaternion(); + //@} + +#ifdef DOXYGEN + /*! @name Output stream */ + //@{ + /*! Output stream operator. Enables debugging code like: + \code + Quaternion rot(...); + cout << "Rotation=" << rot << endl; + \endcode */ + std::ostream& operator<<(std::ostream& o, const Vec&); + //@} +#endif + +private: + /*! The internal data representation is private, use operator[] to access values. */ + double q[4]; +}; + + +std::ostream& operator<<(std::ostream& o, const Quaternion&); + +#endif // QGLVIEWER_QUATERNION_H diff --git a/source/blender/freestyle/intern/app_blender/vec.cpp b/source/blender/freestyle/intern/app_blender/vec.cpp new file mode 100644 index 00000000000..a44dd1ed6ed --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/vec.cpp @@ -0,0 +1,75 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#include "vec.h" + +// Most of the methods are declared inline in vec.h +using namespace std; + +/*! Projects the Vec on the axis of direction \p direction that passes through the origin. + +\p direction does not need to be normalized (but must be non null). */ +void Vec::projectOnAxis(const Vec& direction) +{ +#ifndef QT_NO_DEBUG + if (direction.squaredNorm() < 1.0E-10) + cout << "Vec::projectOnAxis: axis direction is not normalized (norm=" << direction.norm() << ")." << endl; +#endif + + *this = (((*this)*direction) / direction.squaredNorm()) * direction; +} + +/*! Projects the Vec on the plane whose normal is \p normal that passes through the origin. + +\p normal does not need to be normalized (but must be non null). */ +void Vec::projectOnPlane(const Vec& normal) +{ +#ifndef QT_NO_DEBUG + if (normal.squaredNorm() < 1.0E-10) + cout << "Vec::projectOnPlane: plane normal is not normalized (norm=" << normal.norm() << ")." << endl; +#endif + + *this -= (((*this)*normal) / normal.squaredNorm()) * normal; +} + +/*! Returns a Vec orthogonal to the Vec. Its norm() depends on the Vec, but is zero only for a + null Vec. Note that the function that associates an orthogonalVec() to a Vec is not continous. */ +Vec Vec::orthogonalVec() const +{ + // Find smallest component. Keep equal case for null values. + if ((fabs(y) >= 0.9*fabs(x)) && (fabs(z) >= 0.9*fabs(x))) + return Vec(0.0, -z, y); + else + if ((fabs(x) >= 0.9*fabs(y)) && (fabs(z) >= 0.9*fabs(y))) + return Vec(-z, 0.0, x); + else + return Vec(-y, x, 0.0); +} + +ostream& operator<<(ostream& o, const Vec& v) +{ + return o << v.x << '\t' << v.y << '\t' << v.z; +} + diff --git a/source/blender/freestyle/intern/app_blender/vec.h b/source/blender/freestyle/intern/app_blender/vec.h new file mode 100644 index 00000000000..ff17917fac8 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/vec.h @@ -0,0 +1,366 @@ +/**************************************************************************** + + Copyright (C) 2002-2007 Gilles Debunne (Gilles.Debunne@imag.fr) + + This file is part of the QGLViewer library. + Version 2.2.6-3, released on August 28, 2007. + + http://artis.imag.fr/Members/Gilles.Debunne/QGLViewer + + libQGLViewer is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libQGLViewer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libQGLViewer; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*****************************************************************************/ + +#ifndef QGLVIEWER_VEC_H +#define QGLVIEWER_VEC_H + +#include "config.h" + +// #include + +// Included by all files as vec.h is at the end of the include hierarchy +//soc #include "config.h" // Specific configuration options. + +/*! \brief The Vec class represents 3D positions and 3D vectors. + \class Vec vec.h QGLViewer/vec.h + + Vec is used as a parameter and return type by many methods of the library. It provides classical + algebraic computational methods and is compatible with OpenGL: + + \code + // Draws a point located at 3.0 OpenGL units in front of the camera + Vec pos = camera()->position() + 3.0 * camera()->viewDirection(); + glBegin(GL_POINTS); + glVertex3fv(pos); + glEnd(); + \endcode + + This makes of Vec a good candidate for representing positions and vectors in your programs. Since + it is part of the \c qglviewer namespace, specify \c qglviewer::Vec or use the qglviewer + namespace: + \code + using namespace qglviewer; + \endcode + +

Interface with other vector classes

+ + Vec implements a universal explicit converter, based on the \c [] \c operator. + Everywhere a \c const \c Vec& argument is expected, you can use your own vector type + instead, as long as it implements this operator (see the Vec(const C& c) documentation). + + See also the Quaternion and the Frame documentations. + \nosubgrouping */ +class Vec +{ + + // If your compiler complains the "The class "qglviewer::Vec" has no member "x"." + // Add your architecture Q_OS_XXXX flag (see qglobal.h) in this list. +#if defined (Q_OS_IRIX) || defined (Q_OS_AIX) || defined (Q_OS_HPUX) +# define QGLVIEWER_UNION_NOT_SUPPORTED +#endif + +public: + /*! The internal data representation is public. One can use v.x, v.y, v.z. See also operator[](). */ +#if defined (DOXYGEN) || defined (QGLVIEWER_UNION_NOT_SUPPORTED) + float x, y, z; +#else + union + { + struct { float x, y, z; }; + float v_[3]; + }; +#endif + + /*! @name Setting the value */ + //@{ + /*! Default constructor. Value is set to (0,0,0). */ + Vec() : x(0.0), y(0.0), z(0.0) {} + + /*! Standard constructor with the x, y and z values. */ + Vec(float X, float Y, float Z) : x(X), y(Y), z(Z) {} + + /*! Universal explicit converter from any class to Vec. You can use your own vector class everywhere + a \c const \c Vec& parameter is required, as long as it implements the \c operator[ ]: + + \code + class MyVec + { + // ... + float operator[](int i) const { returns x, y or z when i=0, 1 or 2; } + } + + MyVec v(...); + camera()->setPosition(v); + \endcode + + Note that standard vector types (stl, \c float[3], ...) implement this operator and can hence + be used in place of Vec. See also operator const float*() .*/ + template + explicit Vec(const C& c) : x(c[0]), y(c[1]), z(c[2]) {} + // Should NOT be explicit to prevent conflicts with operator<<. + + // ! Copy constructor + // Vec(const Vec& v) : x(v.x), y(v.y), z(v.z) {} + + /*! Equal operator. */ + Vec& operator=(const Vec& v) + { + x = v.x; y = v.y; z = v.z; + return *this; + } + + /*! Set the current value. Maybe faster than using operator=() with a temporary Vec(x,y,z). */ + void setValue(float X, float Y, float Z) + { x=X; y=Y; z=Z; } + + // Universal equal operator which allows the use of any type in place of Vec, + // as long as the [] operator is implemented (v[0]=v.x, v[1]=v.y, v[2]=v.z). + // template + // Vec& operator=(const C& c) + // { + // x=c[0]; y=c[1]; z=c[2]; + // return *this; + // } + //@} + + /*! @name Accessing the value */ + //@{ + /*! Bracket operator, with a constant return value. \p i must range in [0..2]. */ + float operator[](int i) const { +#ifdef QGLVIEWER_UNION_NOT_SUPPORTED + return (&x)[i]; +#else + return v_[i]; +#endif + } + + /*! Bracket operator returning an l-value. \p i must range in [0..2]. */ + float& operator[](int i) { +#ifdef QGLVIEWER_UNION_NOT_SUPPORTED + return (&x)[i]; +#else + return v_[i]; +#endif + } + +#ifndef DOXYGEN + /*! This method is deprecated since version 2.0. Use operator const float* instead. */ + const float* address() const { cout << "Vec::address() is deprecated, use operator const float* instead." << endl; return operator const float*(); }; +#endif + + /*! Conversion operator returning the memory address of the vector. + + Very convenient to pass a Vec pointer as a parameter to OpenGL functions: + \code + Vec pos, normal; + glNormal3fv(normal); + glVertex3fv(pos); + \endcode */ + operator const float*() const { +#ifdef QGLVIEWER_UNION_NOT_SUPPORTED + return &x; +#else + return v_; +#endif + } + + /*! Non const conversion operator returning the memory address of the vector. + + Useful to pass a Vec to a method that requires and fills a \c float*, as provided by certain libraries. */ + operator float*() { +#ifdef QGLVIEWER_UNION_NOT_SUPPORTED + return &x; +#else + return v_; +#endif + } + //@} + + /*! @name Algebraic computations */ + //@{ + /*! Returns the sum of the two vectors. */ + friend Vec operator+(const Vec &a, const Vec &b) + { + return Vec(a.x+b.x, a.y+b.y, a.z+b.z); + } + + /*! Returns the difference of the two vectors. */ + friend Vec operator-(const Vec &a, const Vec &b) + { + return Vec(a.x-b.x, a.y-b.y, a.z-b.z); + } + + /*! Unary minus operator. */ + friend Vec operator-(const Vec &a) + { + return Vec(-a.x, -a.y, -a.z); + } + + /*! Returns the product of the vector with a scalar. */ + friend Vec operator*(const Vec &a, float k) + { + return Vec(a.x*k, a.y*k, a.z*k); + } + + /*! Returns the product of the vector with a scalar. */ + friend Vec operator*(float k, const Vec &a) + { + return a*k; + } + + /*! Returns the division of the vector with a scalar. + + Too small \p k values are \e not tested (unless the library was compiled with the "debug" Qt \c + CONFIG flag) and may result in \c NaN values. */ + friend Vec operator/(const Vec &a, float k) + { +#ifndef QT_NO_DEBUG + if (fabs(k) < 1.0E-10) + cout << "Vec::operator / : dividing by a null value" << endl; +#endif + return Vec(a.x/k, a.y/k, a.z/k); + } + + /*! Returns \c true only when the two vector are not equal (see operator==()). */ + friend bool operator!=(const Vec &a, const Vec &b) + { + return !(a==b); + } + + /*! Returns \c true when the squaredNorm() of the difference vector is lower than 1E-10. */ + friend bool operator==(const Vec &a, const Vec &b) + { + const float epsilon = 1.0E-10f; + return (a-b).squaredNorm() < epsilon; + } + + /*! Adds \p a to the vector. */ + Vec& operator+=(const Vec &a) + { + x += a.x; y += a.y; z += a.z; + return *this; + } + + /*! Subtracts \p a to the vector. */ + Vec& operator-=(const Vec &a) + { + x -= a.x; y -= a.y; z -= a.z; + return *this; + } + + /*! Multiply the vector by a scalar \p k. */ + Vec& operator*=(float k) + { + x *= k; y *= k; z *= k; + return *this; + } + + /*! Divides the vector by a scalar \p k. + + An absolute \p k value lower than 1E-10 will print a warning if the library was compiled with the + "debug" Qt \c CONFIG flag. Otherwise, no test is performed for efficiency reasons. */ + Vec& operator/=(float k) + { +#ifndef QT_NO_DEBUG + if (fabs(k)<1.0E-10) + cout << "Vec::operator /= : dividing by a null value" << endl; +#endif + x /= k; y /= k; z /= k; + return *this; + } + + /*! Dot product of the two Vec. */ + friend float operator*(const Vec &a, const Vec &b) + { + return a.x*b.x + a.y*b.y + a.z*b.z; + } + + /*! Cross product of the two vectors. Same as cross(). */ + friend Vec operator^(const Vec &a, const Vec &b) + { + return cross(a,b); + } + + /*! Cross product of the two Vec. Mind the order ! */ + friend Vec cross(const Vec &a, const Vec &b) + { + return Vec(a.y*b.z - a.z*b.y, + a.z*b.x - a.x*b.z, + a.x*b.y - a.y*b.x); + } + + Vec orthogonalVec() const; + //@} + + /*! @name Norm of the vector */ + //@{ +#ifndef DOXYGEN + /*! This method is deprecated since version 2.0. Use squaredNorm() instead. */ + float sqNorm() const { return x*x + y*y + z*z; } +#endif + + /*! Returns the \e squared norm of the Vec. */ + float squaredNorm() const { return x*x + y*y + z*z; } + + /*! Returns the norm of the vector. */ + float norm() const { return sqrt(x*x + y*y + z*z); } + + /*! Normalizes the Vec and returns its original norm. + + Normalizing a null vector will result in \c NaN values. */ + float normalize() + { + const float n = norm(); +#ifndef QT_NO_DEBUG + if (n < 1.0E-10) + cout << "Vec::normalize: normalizing a null vector" << endl; +#endif + *this /= n; + return n; + } + + /*! Returns a unitary (normalized) \e representation of the vector. The original Vec is not modified. */ + Vec unit() const + { + Vec v = *this; + v.normalize(); + return v; + } + //@} + + /*! @name Projection */ + //@{ + void projectOnAxis(const Vec& direction); + void projectOnPlane(const Vec& normal); + //@} + + +#ifdef DOXYGEN + /*! @name Output stream */ + //@{ + /*! Output stream operator. Enables debugging code like: + \code + Vec pos(...); + cout << "Position=" << pos << endl; + \endcode */ + std::ostream& operator<<(std::ostream& o, const qglviewer::Vec&); + //@} +#endif +}; + + +std::ostream& operator<<(std::ostream& o, const Vec&); + +#endif // QGLVIEWER_VEC_H diff --git a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp index 8177f3b02db..50055e10f3d 100755 --- a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp @@ -26,9 +26,13 @@ // #include // #include // #include + +extern "C" { #include "BLI_blenlib.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +} + #include "../system/StringUtils.h" #ifdef WIN32 diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index 40a0bbbc738..0022a36aee2 100755 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -34,8 +34,10 @@ //soc #include //soc #include +extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +} // Internal function diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp index 7e63d964cb5..b185bba92a0 100755 --- a/source/blender/freestyle/intern/stroke/Canvas.cpp +++ b/source/blender/freestyle/intern/stroke/Canvas.cpp @@ -34,9 +34,12 @@ //soc #include //soc #include #include + +extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "intern/IMB_bmp.h" +} using namespace std; diff --git a/source/blender/freestyle/intern/system/StringUtils.h b/source/blender/freestyle/intern/system/StringUtils.h index efc16953e48..b30eaae2247 100755 --- a/source/blender/freestyle/intern/system/StringUtils.h +++ b/source/blender/freestyle/intern/system/StringUtils.h @@ -34,8 +34,10 @@ # include "FreestyleConfig.h" //soc +extern "C" { #include "BKE_utildefines.h" #include "BLI_blenlib.h" +} using namespace std; diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp index d7f2e5683c5..13c6bd65312 100755 --- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp @@ -29,9 +29,12 @@ using namespace Geometry; //soc #include //soc #include #include + +extern "C" { #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" #include "intern/IMB_png.h" +} SteerableViewMap::SteerableViewMap(unsigned int nbOrientations){ _nbOrientations = nbOrientations; diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py new file mode 100755 index 00000000000..5eb9119cb80 --- /dev/null +++ b/source/blender/freestyle/python/Freestyle.py @@ -0,0 +1,4961 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 1.3.33 +# +# Don't modify this file, modify the SWIG interface instead. +# This file is compatible with both classic and new-style classes. + +import _Freestyle +import new +new_instancemethod = new.instancemethod +try: + _swig_property = property +except NameError: + pass # Python < 2.2 doesn't have 'property'. +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'PySwigObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static) or hasattr(self,name): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 +del types + + +try: + import weakref + weakref_proxy = weakref.proxy +except: + weakref_proxy = lambda x: x + + +class PySwigIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_PySwigIterator + __del__ = lambda self : None; + def value(*args): return _Freestyle.PySwigIterator_value(*args) + def incr(*args): return _Freestyle.PySwigIterator_incr(*args) + def decr(*args): return _Freestyle.PySwigIterator_decr(*args) + def distance(*args): return _Freestyle.PySwigIterator_distance(*args) + def equal(*args): return _Freestyle.PySwigIterator_equal(*args) + def copy(*args): return _Freestyle.PySwigIterator_copy(*args) + def next(*args): return _Freestyle.PySwigIterator_next(*args) + def previous(*args): return _Freestyle.PySwigIterator_previous(*args) + def advance(*args): return _Freestyle.PySwigIterator_advance(*args) + def __eq__(*args): return _Freestyle.PySwigIterator___eq__(*args) + def __ne__(*args): return _Freestyle.PySwigIterator___ne__(*args) + def __iadd__(*args): return _Freestyle.PySwigIterator___iadd__(*args) + def __isub__(*args): return _Freestyle.PySwigIterator___isub__(*args) + def __add__(*args): return _Freestyle.PySwigIterator___add__(*args) + def __sub__(*args): return _Freestyle.PySwigIterator___sub__(*args) + def __iter__(self): return self +PySwigIterator_swigregister = _Freestyle.PySwigIterator_swigregister +PySwigIterator_swigregister(PySwigIterator) + +class vectorInt(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, vectorInt, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, vectorInt, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.vectorInt_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.vectorInt___nonzero__(*args) + def __len__(*args): return _Freestyle.vectorInt___len__(*args) + def pop(*args): return _Freestyle.vectorInt_pop(*args) + def __getslice__(*args): return _Freestyle.vectorInt___getslice__(*args) + def __setslice__(*args): return _Freestyle.vectorInt___setslice__(*args) + def __delslice__(*args): return _Freestyle.vectorInt___delslice__(*args) + def __delitem__(*args): return _Freestyle.vectorInt___delitem__(*args) + def __getitem__(*args): return _Freestyle.vectorInt___getitem__(*args) + def __setitem__(*args): return _Freestyle.vectorInt___setitem__(*args) + def append(*args): return _Freestyle.vectorInt_append(*args) + def empty(*args): return _Freestyle.vectorInt_empty(*args) + def size(*args): return _Freestyle.vectorInt_size(*args) + def clear(*args): return _Freestyle.vectorInt_clear(*args) + def swap(*args): return _Freestyle.vectorInt_swap(*args) + def get_allocator(*args): return _Freestyle.vectorInt_get_allocator(*args) + def begin(*args): return _Freestyle.vectorInt_begin(*args) + def end(*args): return _Freestyle.vectorInt_end(*args) + def rbegin(*args): return _Freestyle.vectorInt_rbegin(*args) + def rend(*args): return _Freestyle.vectorInt_rend(*args) + def pop_back(*args): return _Freestyle.vectorInt_pop_back(*args) + def erase(*args): return _Freestyle.vectorInt_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_vectorInt(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.vectorInt_push_back(*args) + def front(*args): return _Freestyle.vectorInt_front(*args) + def back(*args): return _Freestyle.vectorInt_back(*args) + def assign(*args): return _Freestyle.vectorInt_assign(*args) + def resize(*args): return _Freestyle.vectorInt_resize(*args) + def insert(*args): return _Freestyle.vectorInt_insert(*args) + def reserve(*args): return _Freestyle.vectorInt_reserve(*args) + def capacity(*args): return _Freestyle.vectorInt_capacity(*args) + __swig_destroy__ = _Freestyle.delete_vectorInt + __del__ = lambda self : None; +vectorInt_swigregister = _Freestyle.vectorInt_swigregister +vectorInt_swigregister(vectorInt) + +class Id(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Id, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Id, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Id(*args) + try: self.this.append(this) + except: self.this = this + def getFirst(*args): return _Freestyle.Id_getFirst(*args) + def getSecond(*args): return _Freestyle.Id_getSecond(*args) + def setFirst(*args): return _Freestyle.Id_setFirst(*args) + def setSecond(*args): return _Freestyle.Id_setSecond(*args) + def __eq__(*args): return _Freestyle.Id___eq__(*args) + def __ne__(*args): return _Freestyle.Id___ne__(*args) + def __lt__(*args): return _Freestyle.Id___lt__(*args) + __swig_destroy__ = _Freestyle.delete_Id + __del__ = lambda self : None; +Id_swigregister = _Freestyle.Id_swigregister +Id_swigregister(Id) + +class Vec_2u(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2u, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_2u, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_2u(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_2u + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2u_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_2u_dim) + def norm(*args): return _Freestyle.Vec_2u_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_2u_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_2u_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_2u_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_2u___add__(*args) + def __sub__(*args): return _Freestyle.Vec_2u___sub__(*args) + def __div__(*args): return _Freestyle.Vec_2u___div__(*args) + def __mul__(*args): return _Freestyle.Vec_2u___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_2u___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_2u___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_2u___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_2u___gt__(*args) +Vec_2u_swigregister = _Freestyle.Vec_2u_swigregister +Vec_2u_swigregister(Vec_2u) +Vec_2u_dim = _Freestyle.Vec_2u_dim + +class Vec_2i(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2i, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_2i, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_2i(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_2i + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2i_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_2i_dim) + def norm(*args): return _Freestyle.Vec_2i_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_2i_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_2i_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_2i_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_2i___add__(*args) + def __sub__(*args): return _Freestyle.Vec_2i___sub__(*args) + def __div__(*args): return _Freestyle.Vec_2i___div__(*args) + def __mul__(*args): return _Freestyle.Vec_2i___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_2i___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_2i___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_2i___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_2i___gt__(*args) +Vec_2i_swigregister = _Freestyle.Vec_2i_swigregister +Vec_2i_swigregister(Vec_2i) +Vec_2i_dim = _Freestyle.Vec_2i_dim + +class Vec_2d(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2d, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_2d, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_2d(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_2d + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2d_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_2d_dim) + def norm(*args): return _Freestyle.Vec_2d_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_2d_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_2d_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_2d_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_2d___add__(*args) + def __sub__(*args): return _Freestyle.Vec_2d___sub__(*args) + def __div__(*args): return _Freestyle.Vec_2d___div__(*args) + def __mul__(*args): return _Freestyle.Vec_2d___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_2d___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_2d___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_2d___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_2d___gt__(*args) +Vec_2d_swigregister = _Freestyle.Vec_2d_swigregister +Vec_2d_swigregister(Vec_2d) +Vec_2d_dim = _Freestyle.Vec_2d_dim + +class Vec_2f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_2f, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_2f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_2f + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2f_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_2f_dim) + def norm(*args): return _Freestyle.Vec_2f_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_2f_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_2f_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_2f_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_2f___add__(*args) + def __sub__(*args): return _Freestyle.Vec_2f___sub__(*args) + def __div__(*args): return _Freestyle.Vec_2f___div__(*args) + def __mul__(*args): return _Freestyle.Vec_2f___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_2f___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_2f___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_2f___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_2f___gt__(*args) +Vec_2f_swigregister = _Freestyle.Vec_2f_swigregister +Vec_2f_swigregister(Vec_2f) +Vec_2f_dim = _Freestyle.Vec_2f_dim + +class Vec2u(Vec_2u): + __swig_setmethods__ = {} + for _s in [Vec_2u]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2u, name, value) + __swig_getmethods__ = {} + for _s in [Vec_2u]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec2u, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec2u(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec2u_x(*args) + def y(*args): return _Freestyle.Vec2u_y(*args) + def setX(*args): return _Freestyle.Vec2u_setX(*args) + def setY(*args): return _Freestyle.Vec2u_setY(*args) + def __add__(*args): return _Freestyle.Vec2u___add__(*args) + def __sub__(*args): return _Freestyle.Vec2u___sub__(*args) + def __div__(*args): return _Freestyle.Vec2u___div__(*args) + def __mul__(*args): return _Freestyle.Vec2u___mul__(*args) + __swig_destroy__ = _Freestyle.delete_Vec2u + __del__ = lambda self : None; +Vec2u_swigregister = _Freestyle.Vec2u_swigregister +Vec2u_swigregister(Vec2u) + +class Vec2i(Vec_2i): + __swig_setmethods__ = {} + for _s in [Vec_2i]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2i, name, value) + __swig_getmethods__ = {} + for _s in [Vec_2i]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec2i, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec2i(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec2i_x(*args) + def y(*args): return _Freestyle.Vec2i_y(*args) + def setX(*args): return _Freestyle.Vec2i_setX(*args) + def setY(*args): return _Freestyle.Vec2i_setY(*args) + def __add__(*args): return _Freestyle.Vec2i___add__(*args) + def __sub__(*args): return _Freestyle.Vec2i___sub__(*args) + def __div__(*args): return _Freestyle.Vec2i___div__(*args) + def __mul__(*args): return _Freestyle.Vec2i___mul__(*args) + __swig_destroy__ = _Freestyle.delete_Vec2i + __del__ = lambda self : None; +Vec2i_swigregister = _Freestyle.Vec2i_swigregister +Vec2i_swigregister(Vec2i) + +class Vec2f(Vec_2f): + __swig_setmethods__ = {} + for _s in [Vec_2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2f, name, value) + __swig_getmethods__ = {} + for _s in [Vec_2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec2f, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec2f(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec2f_x(*args) + def y(*args): return _Freestyle.Vec2f_y(*args) + def setX(*args): return _Freestyle.Vec2f_setX(*args) + def setY(*args): return _Freestyle.Vec2f_setY(*args) + def __add__(*args): return _Freestyle.Vec2f___add__(*args) + def __sub__(*args): return _Freestyle.Vec2f___sub__(*args) + def __div__(*args): return _Freestyle.Vec2f___div__(*args) + def __mul__(*args): return _Freestyle.Vec2f___mul__(*args) + __swig_destroy__ = _Freestyle.delete_Vec2f + __del__ = lambda self : None; +Vec2f_swigregister = _Freestyle.Vec2f_swigregister +Vec2f_swigregister(Vec2f) + +class Vec2d(Vec_2d): + __swig_setmethods__ = {} + for _s in [Vec_2d]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2d, name, value) + __swig_getmethods__ = {} + for _s in [Vec_2d]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec2d, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec2d(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec2d_x(*args) + def y(*args): return _Freestyle.Vec2d_y(*args) + def setX(*args): return _Freestyle.Vec2d_setX(*args) + def setY(*args): return _Freestyle.Vec2d_setY(*args) + def __add__(*args): return _Freestyle.Vec2d___add__(*args) + def __sub__(*args): return _Freestyle.Vec2d___sub__(*args) + def __div__(*args): return _Freestyle.Vec2d___div__(*args) + def __mul__(*args): return _Freestyle.Vec2d___mul__(*args) + __swig_destroy__ = _Freestyle.delete_Vec2d + __del__ = lambda self : None; +Vec2d_swigregister = _Freestyle.Vec2d_swigregister +Vec2d_swigregister(Vec2d) + +class Vec_3u(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3u, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_3u, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_3u(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_3u + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3u_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_3u_dim) + def norm(*args): return _Freestyle.Vec_3u_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_3u_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_3u_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_3u_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_3u___add__(*args) + def __sub__(*args): return _Freestyle.Vec_3u___sub__(*args) + def __div__(*args): return _Freestyle.Vec_3u___div__(*args) + def __mul__(*args): return _Freestyle.Vec_3u___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_3u___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_3u___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_3u___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_3u___gt__(*args) +Vec_3u_swigregister = _Freestyle.Vec_3u_swigregister +Vec_3u_swigregister(Vec_3u) +Vec_3u_dim = _Freestyle.Vec_3u_dim + +class Vec_3i(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3i, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_3i, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_3i(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_3i + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3i_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_3i_dim) + def norm(*args): return _Freestyle.Vec_3i_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_3i_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_3i_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_3i_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_3i___add__(*args) + def __sub__(*args): return _Freestyle.Vec_3i___sub__(*args) + def __div__(*args): return _Freestyle.Vec_3i___div__(*args) + def __mul__(*args): return _Freestyle.Vec_3i___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_3i___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_3i___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_3i___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_3i___gt__(*args) +Vec_3i_swigregister = _Freestyle.Vec_3i_swigregister +Vec_3i_swigregister(Vec_3i) +Vec_3i_dim = _Freestyle.Vec_3i_dim + +class Vec_3d(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3d, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_3d, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_3d(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_3d + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3d_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_3d_dim) + def norm(*args): return _Freestyle.Vec_3d_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_3d_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_3d_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_3d_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_3d___add__(*args) + def __sub__(*args): return _Freestyle.Vec_3d___sub__(*args) + def __div__(*args): return _Freestyle.Vec_3d___div__(*args) + def __mul__(*args): return _Freestyle.Vec_3d___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_3d___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_3d___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_3d___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_3d___gt__(*args) +Vec_3d_swigregister = _Freestyle.Vec_3d_swigregister +Vec_3d_swigregister(Vec_3d) +Vec_3d_dim = _Freestyle.Vec_3d_dim + +class Vec_3f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Vec_3f, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec_3f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Vec_3f + __del__ = lambda self : None; + __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3f_dim + if _newclass:dim = staticmethod(_Freestyle.Vec_3f_dim) + def norm(*args): return _Freestyle.Vec_3f_norm(*args) + def squareNorm(*args): return _Freestyle.Vec_3f_squareNorm(*args) + def normalize(*args): return _Freestyle.Vec_3f_normalize(*args) + def normalizeSafe(*args): return _Freestyle.Vec_3f_normalizeSafe(*args) + def __add__(*args): return _Freestyle.Vec_3f___add__(*args) + def __sub__(*args): return _Freestyle.Vec_3f___sub__(*args) + def __div__(*args): return _Freestyle.Vec_3f___div__(*args) + def __mul__(*args): return _Freestyle.Vec_3f___mul__(*args) + def __eq__(*args): return _Freestyle.Vec_3f___eq__(*args) + def __ne__(*args): return _Freestyle.Vec_3f___ne__(*args) + def __lt__(*args): return _Freestyle.Vec_3f___lt__(*args) + def __gt__(*args): return _Freestyle.Vec_3f___gt__(*args) +Vec_3f_swigregister = _Freestyle.Vec_3f_swigregister +Vec_3f_swigregister(Vec_3f) +Vec_3f_dim = _Freestyle.Vec_3f_dim + +class Vec3u(Vec_3u): + __swig_setmethods__ = {} + for _s in [Vec_3u]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3u, name, value) + __swig_getmethods__ = {} + for _s in [Vec_3u]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec3u, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec3u(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec3u_x(*args) + def y(*args): return _Freestyle.Vec3u_y(*args) + def z(*args): return _Freestyle.Vec3u_z(*args) + def setX(*args): return _Freestyle.Vec3u_setX(*args) + def setY(*args): return _Freestyle.Vec3u_setY(*args) + def setZ(*args): return _Freestyle.Vec3u_setZ(*args) + def __add__(*args): return _Freestyle.Vec3u___add__(*args) + def __sub__(*args): return _Freestyle.Vec3u___sub__(*args) + def __div__(*args): return _Freestyle.Vec3u___div__(*args) + def __mul__(*args): return _Freestyle.Vec3u___mul__(*args) + def __xor__(*args): return _Freestyle.Vec3u___xor__(*args) + __swig_destroy__ = _Freestyle.delete_Vec3u + __del__ = lambda self : None; +Vec3u_swigregister = _Freestyle.Vec3u_swigregister +Vec3u_swigregister(Vec3u) + +class Vec3i(Vec_3i): + __swig_setmethods__ = {} + for _s in [Vec_3i]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3i, name, value) + __swig_getmethods__ = {} + for _s in [Vec_3i]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec3i, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec3i(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec3i_x(*args) + def y(*args): return _Freestyle.Vec3i_y(*args) + def z(*args): return _Freestyle.Vec3i_z(*args) + def setX(*args): return _Freestyle.Vec3i_setX(*args) + def setY(*args): return _Freestyle.Vec3i_setY(*args) + def setZ(*args): return _Freestyle.Vec3i_setZ(*args) + def __add__(*args): return _Freestyle.Vec3i___add__(*args) + def __sub__(*args): return _Freestyle.Vec3i___sub__(*args) + def __div__(*args): return _Freestyle.Vec3i___div__(*args) + def __mul__(*args): return _Freestyle.Vec3i___mul__(*args) + def __xor__(*args): return _Freestyle.Vec3i___xor__(*args) + __swig_destroy__ = _Freestyle.delete_Vec3i + __del__ = lambda self : None; +Vec3i_swigregister = _Freestyle.Vec3i_swigregister +Vec3i_swigregister(Vec3i) + +class Vec3f(Vec_3f): + __swig_setmethods__ = {} + for _s in [Vec_3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3f, name, value) + __swig_getmethods__ = {} + for _s in [Vec_3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec3f, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec3f(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec3f_x(*args) + def y(*args): return _Freestyle.Vec3f_y(*args) + def z(*args): return _Freestyle.Vec3f_z(*args) + def setX(*args): return _Freestyle.Vec3f_setX(*args) + def setY(*args): return _Freestyle.Vec3f_setY(*args) + def setZ(*args): return _Freestyle.Vec3f_setZ(*args) + def __add__(*args): return _Freestyle.Vec3f___add__(*args) + def __sub__(*args): return _Freestyle.Vec3f___sub__(*args) + def __div__(*args): return _Freestyle.Vec3f___div__(*args) + def __mul__(*args): return _Freestyle.Vec3f___mul__(*args) + def __xor__(*args): return _Freestyle.Vec3f___xor__(*args) + __swig_destroy__ = _Freestyle.delete_Vec3f + __del__ = lambda self : None; +Vec3f_swigregister = _Freestyle.Vec3f_swigregister +Vec3f_swigregister(Vec3f) + +class Vec3d(Vec_3d): + __swig_setmethods__ = {} + for _s in [Vec_3d]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3d, name, value) + __swig_getmethods__ = {} + for _s in [Vec_3d]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Vec3d, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Vec3d(*args) + try: self.this.append(this) + except: self.this = this + def x(*args): return _Freestyle.Vec3d_x(*args) + def y(*args): return _Freestyle.Vec3d_y(*args) + def z(*args): return _Freestyle.Vec3d_z(*args) + def setX(*args): return _Freestyle.Vec3d_setX(*args) + def setY(*args): return _Freestyle.Vec3d_setY(*args) + def setZ(*args): return _Freestyle.Vec3d_setZ(*args) + def __add__(*args): return _Freestyle.Vec3d___add__(*args) + def __sub__(*args): return _Freestyle.Vec3d___sub__(*args) + def __div__(*args): return _Freestyle.Vec3d___div__(*args) + def __mul__(*args): return _Freestyle.Vec3d___mul__(*args) + def __xor__(*args): return _Freestyle.Vec3d___xor__(*args) + __swig_destroy__ = _Freestyle.delete_Vec3d + __del__ = lambda self : None; +Vec3d_swigregister = _Freestyle.Vec3d_swigregister +Vec3d_swigregister(Vec3d) + +_Noise_B_ = _Freestyle._Noise_B_ +class Noise(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Noise, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Noise, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Noise(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Noise + __del__ = lambda self : None; + def turbulence1(*args): return _Freestyle.Noise_turbulence1(*args) + def turbulence2(*args): return _Freestyle.Noise_turbulence2(*args) + def turbulence3(*args): return _Freestyle.Noise_turbulence3(*args) + def smoothNoise1(*args): return _Freestyle.Noise_smoothNoise1(*args) + def smoothNoise2(*args): return _Freestyle.Noise_smoothNoise2(*args) + def smoothNoise3(*args): return _Freestyle.Noise_smoothNoise3(*args) +Noise_swigregister = _Freestyle.Noise_swigregister +Noise_swigregister(Noise) + +class Material(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Material, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Material, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Material(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Material + __del__ = lambda self : None; + def diffuse(*args): return _Freestyle.Material_diffuse(*args) + def diffuseR(*args): return _Freestyle.Material_diffuseR(*args) + def diffuseG(*args): return _Freestyle.Material_diffuseG(*args) + def diffuseB(*args): return _Freestyle.Material_diffuseB(*args) + def diffuseA(*args): return _Freestyle.Material_diffuseA(*args) + def specular(*args): return _Freestyle.Material_specular(*args) + def specularR(*args): return _Freestyle.Material_specularR(*args) + def specularG(*args): return _Freestyle.Material_specularG(*args) + def specularB(*args): return _Freestyle.Material_specularB(*args) + def specularA(*args): return _Freestyle.Material_specularA(*args) + def ambient(*args): return _Freestyle.Material_ambient(*args) + def ambientR(*args): return _Freestyle.Material_ambientR(*args) + def ambientG(*args): return _Freestyle.Material_ambientG(*args) + def ambientB(*args): return _Freestyle.Material_ambientB(*args) + def ambientA(*args): return _Freestyle.Material_ambientA(*args) + def emission(*args): return _Freestyle.Material_emission(*args) + def emissionR(*args): return _Freestyle.Material_emissionR(*args) + def emissionG(*args): return _Freestyle.Material_emissionG(*args) + def emissionB(*args): return _Freestyle.Material_emissionB(*args) + def emissionA(*args): return _Freestyle.Material_emissionA(*args) + def shininess(*args): return _Freestyle.Material_shininess(*args) + def SetDiffuse(*args): return _Freestyle.Material_SetDiffuse(*args) + def SetSpecular(*args): return _Freestyle.Material_SetSpecular(*args) + def SetAmbient(*args): return _Freestyle.Material_SetAmbient(*args) + def SetEmission(*args): return _Freestyle.Material_SetEmission(*args) + def SetShininess(*args): return _Freestyle.Material_SetShininess(*args) + def __ne__(*args): return _Freestyle.Material___ne__(*args) + def __eq__(*args): return _Freestyle.Material___eq__(*args) +Material_swigregister = _Freestyle.Material_swigregister +Material_swigregister(Material) + +class Interface0D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Interface0D, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.Interface0D_getExactTypeName(*args) + def getX(*args): return _Freestyle.Interface0D_getX(*args) + def getY(*args): return _Freestyle.Interface0D_getY(*args) + def getZ(*args): return _Freestyle.Interface0D_getZ(*args) + def getPoint3D(*args): return _Freestyle.Interface0D_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.Interface0D_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.Interface0D_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.Interface0D_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.Interface0D_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.Interface0D_getFEdge(*args) + def getId(*args): return _Freestyle.Interface0D_getId(*args) + def getNature(*args): return _Freestyle.Interface0D_getNature(*args) + def castToSVertex(*args): return _Freestyle.Interface0D_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.Interface0D_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.Interface0D_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.Interface0D_castToTVertex(*args) + def __init__(self, *args): + this = _Freestyle.new_Interface0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Interface0D + __del__ = lambda self : None; +Interface0D_swigregister = _Freestyle.Interface0D_swigregister +Interface0D_swigregister(Interface0D) +cvar = _Freestyle.cvar +POINT = cvar.POINT +S_VERTEX = cvar.S_VERTEX +VIEW_VERTEX = cvar.VIEW_VERTEX +NON_T_VERTEX = cvar.NON_T_VERTEX +T_VERTEX = cvar.T_VERTEX +CUSP = cvar.CUSP +NO_FEATURE = cvar.NO_FEATURE +SILHOUETTE = cvar.SILHOUETTE +BORDER = cvar.BORDER +CREASE = cvar.CREASE +RIDGE = cvar.RIDGE +VALLEY = cvar.VALLEY +SUGGESTIVE_CONTOUR = cvar.SUGGESTIVE_CONTOUR + +class Interface0DIteratorNested(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIteratorNested, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIteratorNested, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_Interface0DIteratorNested + __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.Interface0DIteratorNested_getExactTypeName(*args) + def getObject(*args): return _Freestyle.Interface0DIteratorNested_getObject(*args) + def __deref__(*args): return _Freestyle.Interface0DIteratorNested___deref__(*args) + def increment(*args): return _Freestyle.Interface0DIteratorNested_increment(*args) + def decrement(*args): return _Freestyle.Interface0DIteratorNested_decrement(*args) + def isBegin(*args): return _Freestyle.Interface0DIteratorNested_isBegin(*args) + def isEnd(*args): return _Freestyle.Interface0DIteratorNested_isEnd(*args) + def __eq__(*args): return _Freestyle.Interface0DIteratorNested___eq__(*args) + def __ne__(*args): return _Freestyle.Interface0DIteratorNested___ne__(*args) + def t(*args): return _Freestyle.Interface0DIteratorNested_t(*args) + def u(*args): return _Freestyle.Interface0DIteratorNested_u(*args) + def copy(*args): return _Freestyle.Interface0DIteratorNested_copy(*args) + def getX(*args): return _Freestyle.Interface0DIteratorNested_getX(*args) + def getY(*args): return _Freestyle.Interface0DIteratorNested_getY(*args) + def getZ(*args): return _Freestyle.Interface0DIteratorNested_getZ(*args) + def getPoint3D(*args): return _Freestyle.Interface0DIteratorNested_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.Interface0DIteratorNested_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.Interface0DIteratorNested_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.Interface0DIteratorNested_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.Interface0DIteratorNested_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.Interface0DIteratorNested_getFEdge(*args) + def getId(*args): return _Freestyle.Interface0DIteratorNested_getId(*args) + def getNature(*args): return _Freestyle.Interface0DIteratorNested_getNature(*args) + def castToSVertex(*args): return _Freestyle.Interface0DIteratorNested_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.Interface0DIteratorNested_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.Interface0DIteratorNested_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.Interface0DIteratorNested_castToTVertex(*args) +Interface0DIteratorNested_swigregister = _Freestyle.Interface0DIteratorNested_swigregister +Interface0DIteratorNested_swigregister(Interface0DIteratorNested) + +class Interface0DIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Interface0DIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Interface0DIterator + __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.Interface0DIterator_getExactTypeName(*args) + def getObject(*args): return _Freestyle.Interface0DIterator_getObject(*args) + def __deref__(*args): return _Freestyle.Interface0DIterator___deref__(*args) + def increment(*args): return _Freestyle.Interface0DIterator_increment(*args) + def decrement(*args): return _Freestyle.Interface0DIterator_decrement(*args) + def isBegin(*args): return _Freestyle.Interface0DIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.Interface0DIterator_isEnd(*args) + def __eq__(*args): return _Freestyle.Interface0DIterator___eq__(*args) + def __ne__(*args): return _Freestyle.Interface0DIterator___ne__(*args) + def t(*args): return _Freestyle.Interface0DIterator_t(*args) + def u(*args): return _Freestyle.Interface0DIterator_u(*args) + def getX(*args): return _Freestyle.Interface0DIterator_getX(*args) + def getY(*args): return _Freestyle.Interface0DIterator_getY(*args) + def getZ(*args): return _Freestyle.Interface0DIterator_getZ(*args) + def getPoint3D(*args): return _Freestyle.Interface0DIterator_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.Interface0DIterator_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.Interface0DIterator_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.Interface0DIterator_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.Interface0DIterator_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.Interface0DIterator_getFEdge(*args) + def getId(*args): return _Freestyle.Interface0DIterator_getId(*args) + def getNature(*args): return _Freestyle.Interface0DIterator_getNature(*args) + def castToSVertex(*args): return _Freestyle.Interface0DIterator_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.Interface0DIterator_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.Interface0DIterator_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.Interface0DIterator_castToTVertex(*args) +Interface0DIterator_swigregister = _Freestyle.Interface0DIterator_swigregister +Interface0DIterator_swigregister(Interface0DIterator) + +MEAN = _Freestyle.MEAN +MIN = _Freestyle.MIN +MAX = _Freestyle.MAX +FIRST = _Freestyle.FIRST +LAST = _Freestyle.LAST +class Interface1D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Interface1D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Interface1D, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.Interface1D_getExactTypeName(*args) + def verticesBegin(*args): return _Freestyle.Interface1D_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.Interface1D_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.Interface1D_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.Interface1D_pointsEnd(*args) + def getLength2D(*args): return _Freestyle.Interface1D_getLength2D(*args) + def getId(*args): return _Freestyle.Interface1D_getId(*args) + def getNature(*args): return _Freestyle.Interface1D_getNature(*args) + def getTimeStamp(*args): return _Freestyle.Interface1D_getTimeStamp(*args) + def setTimeStamp(*args): return _Freestyle.Interface1D_setTimeStamp(*args) + __swig_destroy__ = _Freestyle.delete_Interface1D + __del__ = lambda self : None; +Interface1D_swigregister = _Freestyle.Interface1D_swigregister +Interface1D_swigregister(Interface1D) + +class SVertex(Interface0D): + __swig_setmethods__ = {} + for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, SVertex, name, value) + __swig_getmethods__ = {} + for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, SVertex, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.SVertex_getExactTypeName(*args) + def getX(*args): return _Freestyle.SVertex_getX(*args) + def getY(*args): return _Freestyle.SVertex_getY(*args) + def getZ(*args): return _Freestyle.SVertex_getZ(*args) + def getPoint3D(*args): return _Freestyle.SVertex_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.SVertex_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.SVertex_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.SVertex_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.SVertex_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.SVertex_getFEdge(*args) + def getId(*args): return _Freestyle.SVertex_getId(*args) + def getNature(*args): return _Freestyle.SVertex_getNature(*args) + def castToSVertex(*args): return _Freestyle.SVertex_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.SVertex_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.SVertex_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.SVertex_castToTVertex(*args) + __swig_setmethods__["userdata"] = _Freestyle.SVertex_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.SVertex_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.SVertex_userdata_get, _Freestyle.SVertex_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_SVertex(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_SVertex + __del__ = lambda self : None; + def dupplicate(*args): return _Freestyle.SVertex_dupplicate(*args) + def __eq__(*args): return _Freestyle.SVertex___eq__(*args) + def point3D(*args): return _Freestyle.SVertex_point3D(*args) + def point2D(*args): return _Freestyle.SVertex_point2D(*args) + def normals(*args): return _Freestyle.SVertex_normals(*args) + def normalsSize(*args): return _Freestyle.SVertex_normalsSize(*args) + def fedges(*args): return _Freestyle.SVertex_fedges(*args) + def fedges_begin(*args): return _Freestyle.SVertex_fedges_begin(*args) + def fedges_end(*args): return _Freestyle.SVertex_fedges_end(*args) + def z(*args): return _Freestyle.SVertex_z(*args) + def viewvertex(*args): return _Freestyle.SVertex_viewvertex(*args) + def SetPoint3D(*args): return _Freestyle.SVertex_SetPoint3D(*args) + def SetPoint2D(*args): return _Freestyle.SVertex_SetPoint2D(*args) + def AddNormal(*args): return _Freestyle.SVertex_AddNormal(*args) + def setCurvatureInfo(*args): return _Freestyle.SVertex_setCurvatureInfo(*args) + def getCurvatureInfo(*args): return _Freestyle.SVertex_getCurvatureInfo(*args) + def setCurvatureFredo(*args): return _Freestyle.SVertex_setCurvatureFredo(*args) + def setDirectionFredo(*args): return _Freestyle.SVertex_setDirectionFredo(*args) + def curvatureFredo(*args): return _Freestyle.SVertex_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.SVertex_directionFredo(*args) + def SetId(*args): return _Freestyle.SVertex_SetId(*args) + def SetFEdges(*args): return _Freestyle.SVertex_SetFEdges(*args) + def SetShape(*args): return _Freestyle.SVertex_SetShape(*args) + def SetViewVertex(*args): return _Freestyle.SVertex_SetViewVertex(*args) + def AddFEdge(*args): return _Freestyle.SVertex_AddFEdge(*args) + def Replace(*args): return _Freestyle.SVertex_Replace(*args) + def fedge(*args): return _Freestyle.SVertex_fedge(*args) + def point2d(*args): return _Freestyle.SVertex_point2d(*args) + def point3d(*args): return _Freestyle.SVertex_point3d(*args) + def normal(*args): return _Freestyle.SVertex_normal(*args) + def shape_id(*args): return _Freestyle.SVertex_shape_id(*args) + def shape(*args): return _Freestyle.SVertex_shape(*args) + def shape_importance(*args): return _Freestyle.SVertex_shape_importance(*args) + def qi(*args): return _Freestyle.SVertex_qi(*args) + def occluders_begin(*args): return _Freestyle.SVertex_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.SVertex_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.SVertex_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.SVertex_occluders_size(*args) + def occludee(*args): return _Freestyle.SVertex_occludee(*args) + def occluded_shape(*args): return _Freestyle.SVertex_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.SVertex_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.SVertex_z_discontinuity(*args) +SVertex_swigregister = _Freestyle.SVertex_swigregister +SVertex_swigregister(SVertex) +integrateUnsigned = _Freestyle.integrateUnsigned +integrateFloat = _Freestyle.integrateFloat +integrateDouble = _Freestyle.integrateDouble + +class FEdge(Interface1D): + __swig_setmethods__ = {} + for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FEdge, name, value) + __swig_getmethods__ = {} + for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FEdge, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.FEdge_getExactTypeName(*args) + def getLength2D(*args): return _Freestyle.FEdge_getLength2D(*args) + def getId(*args): return _Freestyle.FEdge_getId(*args) + __swig_setmethods__["userdata"] = _Freestyle.FEdge_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.FEdge_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.FEdge_userdata_get, _Freestyle.FEdge_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_FEdge(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_FEdge + __del__ = lambda self : None; + def dupplicate(*args): return _Freestyle.FEdge_dupplicate(*args) + def vertexA(*args): return _Freestyle.FEdge_vertexA(*args) + def vertexB(*args): return _Freestyle.FEdge_vertexB(*args) + def getNature(*args): return _Freestyle.FEdge_getNature(*args) + def nextEdge(*args): return _Freestyle.FEdge_nextEdge(*args) + def previousEdge(*args): return _Freestyle.FEdge_previousEdge(*args) + def invisibility(*args): return _Freestyle.FEdge_invisibility(*args) + def viewedge(*args): return _Freestyle.FEdge_viewedge(*args) + def center3d(*args): return _Freestyle.FEdge_center3d(*args) + def center2d(*args): return _Freestyle.FEdge_center2d(*args) + def aFace(*args): return _Freestyle.FEdge_aFace(*args) + def getOccludeeIntersection(*args): return _Freestyle.FEdge_getOccludeeIntersection(*args) + def getOccludeeEmpty(*args): return _Freestyle.FEdge_getOccludeeEmpty(*args) + def isSmooth(*args): return _Freestyle.FEdge_isSmooth(*args) + def SetVertexA(*args): return _Freestyle.FEdge_SetVertexA(*args) + def SetVertexB(*args): return _Freestyle.FEdge_SetVertexB(*args) + def SetId(*args): return _Freestyle.FEdge_SetId(*args) + def SetNextEdge(*args): return _Freestyle.FEdge_SetNextEdge(*args) + def SetPreviousEdge(*args): return _Freestyle.FEdge_SetPreviousEdge(*args) + def SetNature(*args): return _Freestyle.FEdge_SetNature(*args) + def SetViewEdge(*args): return _Freestyle.FEdge_SetViewEdge(*args) + def SetaFace(*args): return _Freestyle.FEdge_SetaFace(*args) + def SetOccludeeIntersection(*args): return _Freestyle.FEdge_SetOccludeeIntersection(*args) + def SetOccludeeEmpty(*args): return _Freestyle.FEdge_SetOccludeeEmpty(*args) + def SetSmooth(*args): return _Freestyle.FEdge_SetSmooth(*args) + __swig_getmethods__["CommonVertex"] = lambda x: _Freestyle.FEdge_CommonVertex + if _newclass:CommonVertex = staticmethod(_Freestyle.FEdge_CommonVertex) + def min2d(*args): return _Freestyle.FEdge_min2d(*args) + def max2d(*args): return _Freestyle.FEdge_max2d(*args) + def shape_id(*args): return _Freestyle.FEdge_shape_id(*args) + def shape(*args): return _Freestyle.FEdge_shape(*args) + def shape_importance(*args): return _Freestyle.FEdge_shape_importance(*args) + def qi(*args): return _Freestyle.FEdge_qi(*args) + def occluders_begin(*args): return _Freestyle.FEdge_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.FEdge_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.FEdge_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.FEdge_occluders_size(*args) + def occludee(*args): return _Freestyle.FEdge_occludee(*args) + def occluded_shape(*args): return _Freestyle.FEdge_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.FEdge_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.FEdge_z_discontinuity(*args) + def viewedge_nature(*args): return _Freestyle.FEdge_viewedge_nature(*args) + def orientation2d(*args): return _Freestyle.FEdge_orientation2d(*args) + def orientation3d(*args): return _Freestyle.FEdge_orientation3d(*args) + def verticesBegin(*args): return _Freestyle.FEdge_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.FEdge_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.FEdge_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.FEdge_pointsEnd(*args) +FEdge_swigregister = _Freestyle.FEdge_swigregister +FEdge_swigregister(FEdge) +FEdge_CommonVertex = _Freestyle.FEdge_CommonVertex + +class FEdgeSVertexIterator(Interface0DIteratorNested): + __swig_setmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSVertexIterator, name, value) + __swig_getmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSVertexIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_FEdgeSVertexIterator(*args) + try: self.this.append(this) + except: self.this = this + def getExactTypeName(*args): return _Freestyle.FEdgeSVertexIterator_getExactTypeName(*args) + def getObject(*args): return _Freestyle.FEdgeSVertexIterator_getObject(*args) + def __deref__(*args): return _Freestyle.FEdgeSVertexIterator___deref__(*args) + def increment(*args): return _Freestyle.FEdgeSVertexIterator_increment(*args) + def decrement(*args): return _Freestyle.FEdgeSVertexIterator_decrement(*args) + def isBegin(*args): return _Freestyle.FEdgeSVertexIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.FEdgeSVertexIterator_isEnd(*args) + def __eq__(*args): return _Freestyle.FEdgeSVertexIterator___eq__(*args) + def t(*args): return _Freestyle.FEdgeSVertexIterator_t(*args) + def u(*args): return _Freestyle.FEdgeSVertexIterator_u(*args) + def copy(*args): return _Freestyle.FEdgeSVertexIterator_copy(*args) + __swig_destroy__ = _Freestyle.delete_FEdgeSVertexIterator + __del__ = lambda self : None; + def getX(*args): return _Freestyle.FEdgeSVertexIterator_getX(*args) + def getY(*args): return _Freestyle.FEdgeSVertexIterator_getY(*args) + def getZ(*args): return _Freestyle.FEdgeSVertexIterator_getZ(*args) + def getPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.FEdgeSVertexIterator_getFEdge(*args) + def getId(*args): return _Freestyle.FEdgeSVertexIterator_getId(*args) + def getNature(*args): return _Freestyle.FEdgeSVertexIterator_getNature(*args) + def castToSVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToTVertex(*args) + __swig_setmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.FEdgeSVertexIterator_userdata_get, _Freestyle.FEdgeSVertexIterator_userdata_set) + def dupplicate(*args): return _Freestyle.FEdgeSVertexIterator_dupplicate(*args) + def point3D(*args): return _Freestyle.FEdgeSVertexIterator_point3D(*args) + def point2D(*args): return _Freestyle.FEdgeSVertexIterator_point2D(*args) + def normals(*args): return _Freestyle.FEdgeSVertexIterator_normals(*args) + def normalsSize(*args): return _Freestyle.FEdgeSVertexIterator_normalsSize(*args) + def fedges(*args): return _Freestyle.FEdgeSVertexIterator_fedges(*args) + def fedges_begin(*args): return _Freestyle.FEdgeSVertexIterator_fedges_begin(*args) + def fedges_end(*args): return _Freestyle.FEdgeSVertexIterator_fedges_end(*args) + def shape(*args): return _Freestyle.FEdgeSVertexIterator_shape(*args) + def z(*args): return _Freestyle.FEdgeSVertexIterator_z(*args) + def viewvertex(*args): return _Freestyle.FEdgeSVertexIterator_viewvertex(*args) + def SetPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_SetPoint3D(*args) + def SetPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_SetPoint2D(*args) + def AddNormal(*args): return _Freestyle.FEdgeSVertexIterator_AddNormal(*args) + def setCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_setCurvatureInfo(*args) + def getCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_getCurvatureInfo(*args) + def setCurvatureFredo(*args): return _Freestyle.FEdgeSVertexIterator_setCurvatureFredo(*args) + def setDirectionFredo(*args): return _Freestyle.FEdgeSVertexIterator_setDirectionFredo(*args) + def curvatureFredo(*args): return _Freestyle.FEdgeSVertexIterator_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.FEdgeSVertexIterator_directionFredo(*args) + def SetId(*args): return _Freestyle.FEdgeSVertexIterator_SetId(*args) + def SetFEdges(*args): return _Freestyle.FEdgeSVertexIterator_SetFEdges(*args) + def SetShape(*args): return _Freestyle.FEdgeSVertexIterator_SetShape(*args) + def SetViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_SetViewVertex(*args) + def AddFEdge(*args): return _Freestyle.FEdgeSVertexIterator_AddFEdge(*args) + def Replace(*args): return _Freestyle.FEdgeSVertexIterator_Replace(*args) + def fedge(*args): return _Freestyle.FEdgeSVertexIterator_fedge(*args) + def point2d(*args): return _Freestyle.FEdgeSVertexIterator_point2d(*args) + def point3d(*args): return _Freestyle.FEdgeSVertexIterator_point3d(*args) + def normal(*args): return _Freestyle.FEdgeSVertexIterator_normal(*args) + def shape_id(*args): return _Freestyle.FEdgeSVertexIterator_shape_id(*args) + def shape_importance(*args): return _Freestyle.FEdgeSVertexIterator_shape_importance(*args) + def qi(*args): return _Freestyle.FEdgeSVertexIterator_qi(*args) + def occluders_begin(*args): return _Freestyle.FEdgeSVertexIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.FEdgeSVertexIterator_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.FEdgeSVertexIterator_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.FEdgeSVertexIterator_occluders_size(*args) + def occludee(*args): return _Freestyle.FEdgeSVertexIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.FEdgeSVertexIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.FEdgeSVertexIterator_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.FEdgeSVertexIterator_z_discontinuity(*args) +FEdgeSVertexIterator_swigregister = _Freestyle.FEdgeSVertexIterator_swigregister +FEdgeSVertexIterator_swigregister(FEdgeSVertexIterator) + +class FEdgeSharp(FEdge): + __swig_setmethods__ = {} + for _s in [FEdge]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSharp, name, value) + __swig_getmethods__ = {} + for _s in [FEdge]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSharp, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_FEdgeSharp(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_FEdgeSharp + __del__ = lambda self : None; + def dupplicate(*args): return _Freestyle.FEdgeSharp_dupplicate(*args) + def normalA(*args): return _Freestyle.FEdgeSharp_normalA(*args) + def normalB(*args): return _Freestyle.FEdgeSharp_normalB(*args) + def aMaterialIndex(*args): return _Freestyle.FEdgeSharp_aMaterialIndex(*args) + def aMaterial(*args): return _Freestyle.FEdgeSharp_aMaterial(*args) + def bMaterialIndex(*args): return _Freestyle.FEdgeSharp_bMaterialIndex(*args) + def bMaterial(*args): return _Freestyle.FEdgeSharp_bMaterial(*args) + def SetNormalA(*args): return _Freestyle.FEdgeSharp_SetNormalA(*args) + def SetNormalB(*args): return _Freestyle.FEdgeSharp_SetNormalB(*args) + def SetaMaterialIndex(*args): return _Freestyle.FEdgeSharp_SetaMaterialIndex(*args) + def SetbMaterialIndex(*args): return _Freestyle.FEdgeSharp_SetbMaterialIndex(*args) +FEdgeSharp_swigregister = _Freestyle.FEdgeSharp_swigregister +FEdgeSharp_swigregister(FEdgeSharp) + +class FEdgeSmooth(FEdge): + __swig_setmethods__ = {} + for _s in [FEdge]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSmooth, name, value) + __swig_getmethods__ = {} + for _s in [FEdge]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSmooth, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_FEdgeSmooth(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_FEdgeSmooth + __del__ = lambda self : None; + def dupplicate(*args): return _Freestyle.FEdgeSmooth_dupplicate(*args) + def face(*args): return _Freestyle.FEdgeSmooth_face(*args) + def normal(*args): return _Freestyle.FEdgeSmooth_normal(*args) + def materialIndex(*args): return _Freestyle.FEdgeSmooth_materialIndex(*args) + def material(*args): return _Freestyle.FEdgeSmooth_material(*args) + def SetFace(*args): return _Freestyle.FEdgeSmooth_SetFace(*args) + def SetNormal(*args): return _Freestyle.FEdgeSmooth_SetNormal(*args) + def SetMaterialIndex(*args): return _Freestyle.FEdgeSmooth_SetMaterialIndex(*args) +FEdgeSmooth_swigregister = _Freestyle.FEdgeSmooth_swigregister +FEdgeSmooth_swigregister(FEdgeSmooth) + +class SShape(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, SShape, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, SShape, name) + __repr__ = _swig_repr + __swig_setmethods__["userdata"] = _Freestyle.SShape_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.SShape_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.SShape_userdata_get, _Freestyle.SShape_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_SShape(*args) + try: self.this.append(this) + except: self.this = this + def dupplicate(*args): return _Freestyle.SShape_dupplicate(*args) + __swig_destroy__ = _Freestyle.delete_SShape + __del__ = lambda self : None; + def AddEdge(*args): return _Freestyle.SShape_AddEdge(*args) + def AddNewVertex(*args): return _Freestyle.SShape_AddNewVertex(*args) + def AddChain(*args): return _Freestyle.SShape_AddChain(*args) + def CreateSVertex(*args): return _Freestyle.SShape_CreateSVertex(*args) + def SplitEdge(*args): return _Freestyle.SShape_SplitEdge(*args) + def SplitEdgeIn2(*args): return _Freestyle.SShape_SplitEdgeIn2(*args) + def SetBBox(*args): return _Freestyle.SShape_SetBBox(*args) + def ComputeBBox(*args): return _Freestyle.SShape_ComputeBBox(*args) + def RemoveEdgeFromChain(*args): return _Freestyle.SShape_RemoveEdgeFromChain(*args) + def RemoveEdge(*args): return _Freestyle.SShape_RemoveEdge(*args) + def GetVertexList(*args): return _Freestyle.SShape_GetVertexList(*args) + def GetEdgeList(*args): return _Freestyle.SShape_GetEdgeList(*args) + def GetChains(*args): return _Freestyle.SShape_GetChains(*args) + def bbox(*args): return _Freestyle.SShape_bbox(*args) + def material(*args): return _Freestyle.SShape_material(*args) + def materials(*args): return _Freestyle.SShape_materials(*args) + def viewShape(*args): return _Freestyle.SShape_viewShape(*args) + def importance(*args): return _Freestyle.SShape_importance(*args) + def getId(*args): return _Freestyle.SShape_getId(*args) + def SetId(*args): return _Freestyle.SShape_SetId(*args) + def SetMaterials(*args): return _Freestyle.SShape_SetMaterials(*args) + def SetViewShape(*args): return _Freestyle.SShape_SetViewShape(*args) + def SetImportance(*args): return _Freestyle.SShape_SetImportance(*args) +SShape_swigregister = _Freestyle.SShape_swigregister +SShape_swigregister(SShape) + +class ViewShapesContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewShapesContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewShapesContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.ViewShapesContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.ViewShapesContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.ViewShapesContainer___len__(*args) + def pop(*args): return _Freestyle.ViewShapesContainer_pop(*args) + def __getslice__(*args): return _Freestyle.ViewShapesContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.ViewShapesContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.ViewShapesContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.ViewShapesContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.ViewShapesContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.ViewShapesContainer___setitem__(*args) + def append(*args): return _Freestyle.ViewShapesContainer_append(*args) + def empty(*args): return _Freestyle.ViewShapesContainer_empty(*args) + def size(*args): return _Freestyle.ViewShapesContainer_size(*args) + def clear(*args): return _Freestyle.ViewShapesContainer_clear(*args) + def swap(*args): return _Freestyle.ViewShapesContainer_swap(*args) + def get_allocator(*args): return _Freestyle.ViewShapesContainer_get_allocator(*args) + def begin(*args): return _Freestyle.ViewShapesContainer_begin(*args) + def end(*args): return _Freestyle.ViewShapesContainer_end(*args) + def rbegin(*args): return _Freestyle.ViewShapesContainer_rbegin(*args) + def rend(*args): return _Freestyle.ViewShapesContainer_rend(*args) + def pop_back(*args): return _Freestyle.ViewShapesContainer_pop_back(*args) + def erase(*args): return _Freestyle.ViewShapesContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_ViewShapesContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.ViewShapesContainer_push_back(*args) + def front(*args): return _Freestyle.ViewShapesContainer_front(*args) + def back(*args): return _Freestyle.ViewShapesContainer_back(*args) + def assign(*args): return _Freestyle.ViewShapesContainer_assign(*args) + def resize(*args): return _Freestyle.ViewShapesContainer_resize(*args) + def insert(*args): return _Freestyle.ViewShapesContainer_insert(*args) + def reserve(*args): return _Freestyle.ViewShapesContainer_reserve(*args) + def capacity(*args): return _Freestyle.ViewShapesContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_ViewShapesContainer + __del__ = lambda self : None; +ViewShapesContainer_swigregister = _Freestyle.ViewShapesContainer_swigregister +ViewShapesContainer_swigregister(ViewShapesContainer) + +class ViewEdgesContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgesContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgesContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.ViewEdgesContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.ViewEdgesContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.ViewEdgesContainer___len__(*args) + def pop(*args): return _Freestyle.ViewEdgesContainer_pop(*args) + def __getslice__(*args): return _Freestyle.ViewEdgesContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.ViewEdgesContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.ViewEdgesContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.ViewEdgesContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.ViewEdgesContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.ViewEdgesContainer___setitem__(*args) + def append(*args): return _Freestyle.ViewEdgesContainer_append(*args) + def empty(*args): return _Freestyle.ViewEdgesContainer_empty(*args) + def size(*args): return _Freestyle.ViewEdgesContainer_size(*args) + def clear(*args): return _Freestyle.ViewEdgesContainer_clear(*args) + def swap(*args): return _Freestyle.ViewEdgesContainer_swap(*args) + def get_allocator(*args): return _Freestyle.ViewEdgesContainer_get_allocator(*args) + def begin(*args): return _Freestyle.ViewEdgesContainer_begin(*args) + def end(*args): return _Freestyle.ViewEdgesContainer_end(*args) + def rbegin(*args): return _Freestyle.ViewEdgesContainer_rbegin(*args) + def rend(*args): return _Freestyle.ViewEdgesContainer_rend(*args) + def pop_back(*args): return _Freestyle.ViewEdgesContainer_pop_back(*args) + def erase(*args): return _Freestyle.ViewEdgesContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_ViewEdgesContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.ViewEdgesContainer_push_back(*args) + def front(*args): return _Freestyle.ViewEdgesContainer_front(*args) + def back(*args): return _Freestyle.ViewEdgesContainer_back(*args) + def assign(*args): return _Freestyle.ViewEdgesContainer_assign(*args) + def resize(*args): return _Freestyle.ViewEdgesContainer_resize(*args) + def insert(*args): return _Freestyle.ViewEdgesContainer_insert(*args) + def reserve(*args): return _Freestyle.ViewEdgesContainer_reserve(*args) + def capacity(*args): return _Freestyle.ViewEdgesContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_ViewEdgesContainer + __del__ = lambda self : None; +ViewEdgesContainer_swigregister = _Freestyle.ViewEdgesContainer_swigregister +ViewEdgesContainer_swigregister(ViewEdgesContainer) + +class FEdgesContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgesContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, FEdgesContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.FEdgesContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.FEdgesContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.FEdgesContainer___len__(*args) + def pop(*args): return _Freestyle.FEdgesContainer_pop(*args) + def __getslice__(*args): return _Freestyle.FEdgesContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.FEdgesContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.FEdgesContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.FEdgesContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.FEdgesContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.FEdgesContainer___setitem__(*args) + def append(*args): return _Freestyle.FEdgesContainer_append(*args) + def empty(*args): return _Freestyle.FEdgesContainer_empty(*args) + def size(*args): return _Freestyle.FEdgesContainer_size(*args) + def clear(*args): return _Freestyle.FEdgesContainer_clear(*args) + def swap(*args): return _Freestyle.FEdgesContainer_swap(*args) + def get_allocator(*args): return _Freestyle.FEdgesContainer_get_allocator(*args) + def begin(*args): return _Freestyle.FEdgesContainer_begin(*args) + def end(*args): return _Freestyle.FEdgesContainer_end(*args) + def rbegin(*args): return _Freestyle.FEdgesContainer_rbegin(*args) + def rend(*args): return _Freestyle.FEdgesContainer_rend(*args) + def pop_back(*args): return _Freestyle.FEdgesContainer_pop_back(*args) + def erase(*args): return _Freestyle.FEdgesContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_FEdgesContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.FEdgesContainer_push_back(*args) + def front(*args): return _Freestyle.FEdgesContainer_front(*args) + def back(*args): return _Freestyle.FEdgesContainer_back(*args) + def assign(*args): return _Freestyle.FEdgesContainer_assign(*args) + def resize(*args): return _Freestyle.FEdgesContainer_resize(*args) + def insert(*args): return _Freestyle.FEdgesContainer_insert(*args) + def reserve(*args): return _Freestyle.FEdgesContainer_reserve(*args) + def capacity(*args): return _Freestyle.FEdgesContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_FEdgesContainer + __del__ = lambda self : None; +FEdgesContainer_swigregister = _Freestyle.FEdgesContainer_swigregister +FEdgesContainer_swigregister(FEdgesContainer) + +class ViewVerticesContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVerticesContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewVerticesContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.ViewVerticesContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.ViewVerticesContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.ViewVerticesContainer___len__(*args) + def pop(*args): return _Freestyle.ViewVerticesContainer_pop(*args) + def __getslice__(*args): return _Freestyle.ViewVerticesContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.ViewVerticesContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.ViewVerticesContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.ViewVerticesContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.ViewVerticesContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.ViewVerticesContainer___setitem__(*args) + def append(*args): return _Freestyle.ViewVerticesContainer_append(*args) + def empty(*args): return _Freestyle.ViewVerticesContainer_empty(*args) + def size(*args): return _Freestyle.ViewVerticesContainer_size(*args) + def clear(*args): return _Freestyle.ViewVerticesContainer_clear(*args) + def swap(*args): return _Freestyle.ViewVerticesContainer_swap(*args) + def get_allocator(*args): return _Freestyle.ViewVerticesContainer_get_allocator(*args) + def begin(*args): return _Freestyle.ViewVerticesContainer_begin(*args) + def end(*args): return _Freestyle.ViewVerticesContainer_end(*args) + def rbegin(*args): return _Freestyle.ViewVerticesContainer_rbegin(*args) + def rend(*args): return _Freestyle.ViewVerticesContainer_rend(*args) + def pop_back(*args): return _Freestyle.ViewVerticesContainer_pop_back(*args) + def erase(*args): return _Freestyle.ViewVerticesContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_ViewVerticesContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.ViewVerticesContainer_push_back(*args) + def front(*args): return _Freestyle.ViewVerticesContainer_front(*args) + def back(*args): return _Freestyle.ViewVerticesContainer_back(*args) + def assign(*args): return _Freestyle.ViewVerticesContainer_assign(*args) + def resize(*args): return _Freestyle.ViewVerticesContainer_resize(*args) + def insert(*args): return _Freestyle.ViewVerticesContainer_insert(*args) + def reserve(*args): return _Freestyle.ViewVerticesContainer_reserve(*args) + def capacity(*args): return _Freestyle.ViewVerticesContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_ViewVerticesContainer + __del__ = lambda self : None; +ViewVerticesContainer_swigregister = _Freestyle.ViewVerticesContainer_swigregister +ViewVerticesContainer_swigregister(ViewVerticesContainer) + +class SVerticesContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, SVerticesContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, SVerticesContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.SVerticesContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.SVerticesContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.SVerticesContainer___len__(*args) + def pop(*args): return _Freestyle.SVerticesContainer_pop(*args) + def __getslice__(*args): return _Freestyle.SVerticesContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.SVerticesContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.SVerticesContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.SVerticesContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.SVerticesContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.SVerticesContainer___setitem__(*args) + def append(*args): return _Freestyle.SVerticesContainer_append(*args) + def empty(*args): return _Freestyle.SVerticesContainer_empty(*args) + def size(*args): return _Freestyle.SVerticesContainer_size(*args) + def clear(*args): return _Freestyle.SVerticesContainer_clear(*args) + def swap(*args): return _Freestyle.SVerticesContainer_swap(*args) + def get_allocator(*args): return _Freestyle.SVerticesContainer_get_allocator(*args) + def begin(*args): return _Freestyle.SVerticesContainer_begin(*args) + def end(*args): return _Freestyle.SVerticesContainer_end(*args) + def rbegin(*args): return _Freestyle.SVerticesContainer_rbegin(*args) + def rend(*args): return _Freestyle.SVerticesContainer_rend(*args) + def pop_back(*args): return _Freestyle.SVerticesContainer_pop_back(*args) + def erase(*args): return _Freestyle.SVerticesContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_SVerticesContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.SVerticesContainer_push_back(*args) + def front(*args): return _Freestyle.SVerticesContainer_front(*args) + def back(*args): return _Freestyle.SVerticesContainer_back(*args) + def assign(*args): return _Freestyle.SVerticesContainer_assign(*args) + def resize(*args): return _Freestyle.SVerticesContainer_resize(*args) + def insert(*args): return _Freestyle.SVerticesContainer_insert(*args) + def reserve(*args): return _Freestyle.SVerticesContainer_reserve(*args) + def capacity(*args): return _Freestyle.SVerticesContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_SVerticesContainer + __del__ = lambda self : None; +SVerticesContainer_swigregister = _Freestyle.SVerticesContainer_swigregister +SVerticesContainer_swigregister(SVerticesContainer) + +class ViewMap(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewMap, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewMap, name) + __repr__ = _swig_repr + __swig_setmethods__["userdata"] = _Freestyle.ViewMap_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewMap_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewMap_userdata_get, _Freestyle.ViewMap_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_ViewMap(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ViewMap + __del__ = lambda self : None; + def GetClosestViewEdge(*args): return _Freestyle.ViewMap_GetClosestViewEdge(*args) + def GetClosestFEdge(*args): return _Freestyle.ViewMap_GetClosestFEdge(*args) + __swig_getmethods__["getInstance"] = lambda x: _Freestyle.ViewMap_getInstance + if _newclass:getInstance = staticmethod(_Freestyle.ViewMap_getInstance) + def ViewShapes(*args): return _Freestyle.ViewMap_ViewShapes(*args) + def ViewEdges(*args): return _Freestyle.ViewMap_ViewEdges(*args) + def ViewVertices(*args): return _Freestyle.ViewMap_ViewVertices(*args) + def FEdges(*args): return _Freestyle.ViewMap_FEdges(*args) + def SVertices(*args): return _Freestyle.ViewMap_SVertices(*args) + def viewedges_begin(*args): return _Freestyle.ViewMap_viewedges_begin(*args) + def viewedges_end(*args): return _Freestyle.ViewMap_viewedges_end(*args) + def viewedges_size(*args): return _Freestyle.ViewMap_viewedges_size(*args) + def viewShape(*args): return _Freestyle.ViewMap_viewShape(*args) + def shapeIdToIndexMap(*args): return _Freestyle.ViewMap_shapeIdToIndexMap(*args) + def getScene3dBBox(*args): return _Freestyle.ViewMap_getScene3dBBox(*args) + def AddViewShape(*args): return _Freestyle.ViewMap_AddViewShape(*args) + def AddViewEdge(*args): return _Freestyle.ViewMap_AddViewEdge(*args) + def AddViewVertex(*args): return _Freestyle.ViewMap_AddViewVertex(*args) + def AddFEdge(*args): return _Freestyle.ViewMap_AddFEdge(*args) + def AddSVertex(*args): return _Freestyle.ViewMap_AddSVertex(*args) + def setScene3dBBox(*args): return _Freestyle.ViewMap_setScene3dBBox(*args) + def CreateTVertex(*args): return _Freestyle.ViewMap_CreateTVertex(*args) + def InsertViewVertex(*args): return _Freestyle.ViewMap_InsertViewVertex(*args) +ViewMap_swigregister = _Freestyle.ViewMap_swigregister +ViewMap_swigregister(ViewMap) +ViewMap_getInstance = _Freestyle.ViewMap_getInstance + +class ViewVertex(Interface0D): + __swig_setmethods__ = {} + for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVertex, name, value) + __swig_getmethods__ = {} + for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ViewVertex, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.ViewVertex_getExactTypeName(*args) + __swig_setmethods__["userdata"] = _Freestyle.ViewVertex_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewVertex_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewVertex_userdata_get, _Freestyle.ViewVertex_userdata_set) + __swig_destroy__ = _Freestyle.delete_ViewVertex + __del__ = lambda self : None; + def getNature(*args): return _Freestyle.ViewVertex_getNature(*args) + def setNature(*args): return _Freestyle.ViewVertex_setNature(*args) + def Replace(*args): return _Freestyle.ViewVertex_Replace(*args) + def edges_begin(*args): return _Freestyle.ViewVertex_edges_begin(*args) + def edges_end(*args): return _Freestyle.ViewVertex_edges_end(*args) + def edges_iterator(*args): return _Freestyle.ViewVertex_edges_iterator(*args) + def edgesBegin(*args): return _Freestyle.ViewVertex_edgesBegin(*args) + def edgesEnd(*args): return _Freestyle.ViewVertex_edgesEnd(*args) + def edgesIterator(*args): return _Freestyle.ViewVertex_edgesIterator(*args) +ViewVertex_swigregister = _Freestyle.ViewVertex_swigregister +ViewVertex_swigregister(ViewVertex) + +class TVertex(ViewVertex): + __swig_setmethods__ = {} + for _s in [ViewVertex]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TVertex, name, value) + __swig_getmethods__ = {} + for _s in [ViewVertex]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TVertex, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.TVertex_getExactTypeName(*args) + def getX(*args): return _Freestyle.TVertex_getX(*args) + def getY(*args): return _Freestyle.TVertex_getY(*args) + def getZ(*args): return _Freestyle.TVertex_getZ(*args) + def getPoint3D(*args): return _Freestyle.TVertex_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.TVertex_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.TVertex_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.TVertex_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.TVertex_getPoint2D(*args) + def getId(*args): return _Freestyle.TVertex_getId(*args) + def castToViewVertex(*args): return _Freestyle.TVertex_castToViewVertex(*args) + def castToTVertex(*args): return _Freestyle.TVertex_castToTVertex(*args) + def __init__(self, *args): + this = _Freestyle.new_TVertex(*args) + try: self.this.append(this) + except: self.this = this + def frontSVertex(*args): return _Freestyle.TVertex_frontSVertex(*args) + def backSVertex(*args): return _Freestyle.TVertex_backSVertex(*args) + def frontEdgeA(*args): return _Freestyle.TVertex_frontEdgeA(*args) + def frontEdgeB(*args): return _Freestyle.TVertex_frontEdgeB(*args) + def backEdgeA(*args): return _Freestyle.TVertex_backEdgeA(*args) + def backEdgeB(*args): return _Freestyle.TVertex_backEdgeB(*args) + def SetFrontVertex(*args): return _Freestyle.TVertex_SetFrontVertex(*args) + def SetBackSVertex(*args): return _Freestyle.TVertex_SetBackSVertex(*args) + def SetFrontEdgeA(*args): return _Freestyle.TVertex_SetFrontEdgeA(*args) + def SetFrontEdgeB(*args): return _Freestyle.TVertex_SetFrontEdgeB(*args) + def SetBackEdgeA(*args): return _Freestyle.TVertex_SetBackEdgeA(*args) + def SetBackEdgeB(*args): return _Freestyle.TVertex_SetBackEdgeB(*args) + def SetId(*args): return _Freestyle.TVertex_SetId(*args) + def GetSVertex(*args): return _Freestyle.TVertex_GetSVertex(*args) + def Replace(*args): return _Freestyle.TVertex_Replace(*args) + def mate(*args): return _Freestyle.TVertex_mate(*args) + def edges_end(*args): return _Freestyle.TVertex_edges_end(*args) + def edgesBegin(*args): return _Freestyle.TVertex_edgesBegin(*args) + def edgesEnd(*args): return _Freestyle.TVertex_edgesEnd(*args) + def edgesIterator(*args): return _Freestyle.TVertex_edgesIterator(*args) + __swig_destroy__ = _Freestyle.delete_TVertex + __del__ = lambda self : None; +TVertex_swigregister = _Freestyle.TVertex_swigregister +TVertex_swigregister(TVertex) + +class NonTVertex(ViewVertex): + __swig_setmethods__ = {} + for _s in [ViewVertex]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, NonTVertex, name, value) + __swig_getmethods__ = {} + for _s in [ViewVertex]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, NonTVertex, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.NonTVertex_getExactTypeName(*args) + def getX(*args): return _Freestyle.NonTVertex_getX(*args) + def getY(*args): return _Freestyle.NonTVertex_getY(*args) + def getZ(*args): return _Freestyle.NonTVertex_getZ(*args) + def getPoint3D(*args): return _Freestyle.NonTVertex_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.NonTVertex_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.NonTVertex_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.NonTVertex_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.NonTVertex_getPoint2D(*args) + def getId(*args): return _Freestyle.NonTVertex_getId(*args) + def castToSVertex(*args): return _Freestyle.NonTVertex_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.NonTVertex_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.NonTVertex_castToNonTVertex(*args) + def __init__(self, *args): + this = _Freestyle.new_NonTVertex(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_NonTVertex + __del__ = lambda self : None; + def svertex(*args): return _Freestyle.NonTVertex_svertex(*args) + def viewedges(*args): return _Freestyle.NonTVertex_viewedges(*args) + def SetSVertex(*args): return _Freestyle.NonTVertex_SetSVertex(*args) + def SetViewEdges(*args): return _Freestyle.NonTVertex_SetViewEdges(*args) + def AddIncomingViewEdge(*args): return _Freestyle.NonTVertex_AddIncomingViewEdge(*args) + def AddOutgoingViewEdge(*args): return _Freestyle.NonTVertex_AddOutgoingViewEdge(*args) + def AddViewEdge(*args): return _Freestyle.NonTVertex_AddViewEdge(*args) + def Replace(*args): return _Freestyle.NonTVertex_Replace(*args) + def edges_end(*args): return _Freestyle.NonTVertex_edges_end(*args) + def edgesBegin(*args): return _Freestyle.NonTVertex_edgesBegin(*args) + def edgesEnd(*args): return _Freestyle.NonTVertex_edgesEnd(*args) + def edgesIterator(*args): return _Freestyle.NonTVertex_edgesIterator(*args) +NonTVertex_swigregister = _Freestyle.NonTVertex_swigregister +NonTVertex_swigregister(NonTVertex) + +class ViewEdge(Interface1D): + __swig_setmethods__ = {} + for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdge, name, value) + __swig_getmethods__ = {} + for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ViewEdge, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.ViewEdge_getExactTypeName(*args) + def getId(*args): return _Freestyle.ViewEdge_getId(*args) + def getNature(*args): return _Freestyle.ViewEdge_getNature(*args) + __swig_setmethods__["userdata"] = _Freestyle.ViewEdge_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewEdge_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewEdge_userdata_get, _Freestyle.ViewEdge_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_ViewEdge(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ViewEdge + __del__ = lambda self : None; + def A(*args): return _Freestyle.ViewEdge_A(*args) + def B(*args): return _Freestyle.ViewEdge_B(*args) + def fedgeA(*args): return _Freestyle.ViewEdge_fedgeA(*args) + def fedgeB(*args): return _Freestyle.ViewEdge_fedgeB(*args) + def viewShape(*args): return _Freestyle.ViewEdge_viewShape(*args) + def isClosed(*args): return _Freestyle.ViewEdge_isClosed(*args) + def getChainingTimeStamp(*args): return _Freestyle.ViewEdge_getChainingTimeStamp(*args) + def aShape(*args): return _Freestyle.ViewEdge_aShape(*args) + def bShape(*args): return _Freestyle.ViewEdge_bShape(*args) + def occluders(*args): return _Freestyle.ViewEdge_occluders(*args) + def splittingId(*args): return _Freestyle.ViewEdge_splittingId(*args) + def SetA(*args): return _Freestyle.ViewEdge_SetA(*args) + def SetB(*args): return _Freestyle.ViewEdge_SetB(*args) + def SetNature(*args): return _Freestyle.ViewEdge_SetNature(*args) + def SetFEdgeA(*args): return _Freestyle.ViewEdge_SetFEdgeA(*args) + def SetFEdgeB(*args): return _Freestyle.ViewEdge_SetFEdgeB(*args) + def SetShape(*args): return _Freestyle.ViewEdge_SetShape(*args) + def SetId(*args): return _Freestyle.ViewEdge_SetId(*args) + def UpdateFEdges(*args): return _Freestyle.ViewEdge_UpdateFEdges(*args) + def SetaShape(*args): return _Freestyle.ViewEdge_SetaShape(*args) + def SetQI(*args): return _Freestyle.ViewEdge_SetQI(*args) + def setChainingTimeStamp(*args): return _Freestyle.ViewEdge_setChainingTimeStamp(*args) + def AddOccluder(*args): return _Freestyle.ViewEdge_AddOccluder(*args) + def setSplittingId(*args): return _Freestyle.ViewEdge_setSplittingId(*args) + def intersect_2d_area(*args): return _Freestyle.ViewEdge_intersect_2d_area(*args) + def include_in_2d_area(*args): return _Freestyle.ViewEdge_include_in_2d_area(*args) + def getLength2D(*args): return _Freestyle.ViewEdge_getLength2D(*args) + def qi(*args): return _Freestyle.ViewEdge_qi(*args) + def occluders_begin(*args): return _Freestyle.ViewEdge_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.ViewEdge_occluders_end(*args) + def occluders_size(*args): return _Freestyle.ViewEdge_occluders_size(*args) + def occluders_empty(*args): return _Freestyle.ViewEdge_occluders_empty(*args) + def occludee(*args): return _Freestyle.ViewEdge_occludee(*args) + def occluded_shape(*args): return _Freestyle.ViewEdge_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.ViewEdge_occludee_empty(*args) + def shape_id(*args): return _Freestyle.ViewEdge_shape_id(*args) + def shape(*args): return _Freestyle.ViewEdge_shape(*args) + def shape_importance(*args): return _Freestyle.ViewEdge_shape_importance(*args) + def verticesBegin(*args): return _Freestyle.ViewEdge_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.ViewEdge_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.ViewEdge_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.ViewEdge_pointsEnd(*args) +ViewEdge_swigregister = _Freestyle.ViewEdge_swigregister +ViewEdge_swigregister(ViewEdge) + +class ViewShape(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewShape, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewShape, name) + __repr__ = _swig_repr + __swig_setmethods__["userdata"] = _Freestyle.ViewShape_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewShape_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewShape_userdata_get, _Freestyle.ViewShape_userdata_set) + def __init__(self, *args): + this = _Freestyle.new_ViewShape(*args) + try: self.this.append(this) + except: self.this = this + def dupplicate(*args): return _Freestyle.ViewShape_dupplicate(*args) + __swig_destroy__ = _Freestyle.delete_ViewShape + __del__ = lambda self : None; + def SplitEdge(*args): return _Freestyle.ViewShape_SplitEdge(*args) + def sshape(*args): return _Freestyle.ViewShape_sshape(*args) + def vertices(*args): return _Freestyle.ViewShape_vertices(*args) + def edges(*args): return _Freestyle.ViewShape_edges(*args) + def getId(*args): return _Freestyle.ViewShape_getId(*args) + def SetSShape(*args): return _Freestyle.ViewShape_SetSShape(*args) + def SetVertices(*args): return _Freestyle.ViewShape_SetVertices(*args) + def SetEdges(*args): return _Freestyle.ViewShape_SetEdges(*args) + def AddVertex(*args): return _Freestyle.ViewShape_AddVertex(*args) + def AddEdge(*args): return _Freestyle.ViewShape_AddEdge(*args) + def RemoveEdge(*args): return _Freestyle.ViewShape_RemoveEdge(*args) + def RemoveVertex(*args): return _Freestyle.ViewShape_RemoveVertex(*args) +ViewShape_swigregister = _Freestyle.ViewShape_swigregister +ViewShape_swigregister(ViewShape) + +class ViewVertexOrientedViewEdgeIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVertexOrientedViewEdgeIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewVertexOrientedViewEdgeIterator, name) + __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_ViewVertexOrientedViewEdgeIterator + __del__ = lambda self : None; + def __init__(self, *args): + this = _Freestyle.new_ViewVertexOrientedViewEdgeIterator(*args) + try: self.this.append(this) + except: self.this = this + def isBegin(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_isEnd(*args) + def __ne__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___ne__(*args) + def __eq__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___eq__(*args) + def getObject(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_getObject(*args) + def __deref__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___deref__(*args) + def increment(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_increment(*args) +ViewVertexOrientedViewEdgeIterator_swigregister = _Freestyle.ViewVertexOrientedViewEdgeIterator_swigregister +ViewVertexOrientedViewEdgeIterator_swigregister(ViewVertexOrientedViewEdgeIterator) + +class ViewEdgeSVertexIterator(Interface0DIteratorNested): + __swig_setmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgeSVertexIterator, name, value) + __swig_getmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgeSVertexIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ViewEdgeSVertexIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ViewEdgeSVertexIterator + __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.ViewEdgeSVertexIterator_getExactTypeName(*args) + def getObject(*args): return _Freestyle.ViewEdgeSVertexIterator_getObject(*args) + def __deref__(*args): return _Freestyle.ViewEdgeSVertexIterator___deref__(*args) + def increment(*args): return _Freestyle.ViewEdgeSVertexIterator_increment(*args) + def decrement(*args): return _Freestyle.ViewEdgeSVertexIterator_decrement(*args) + def isBegin(*args): return _Freestyle.ViewEdgeSVertexIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.ViewEdgeSVertexIterator_isEnd(*args) + def t(*args): return _Freestyle.ViewEdgeSVertexIterator_t(*args) + def u(*args): return _Freestyle.ViewEdgeSVertexIterator_u(*args) + def __eq__(*args): return _Freestyle.ViewEdgeSVertexIterator___eq__(*args) + def copy(*args): return _Freestyle.ViewEdgeSVertexIterator_copy(*args) + def getX(*args): return _Freestyle.ViewEdgeSVertexIterator_getX(*args) + def getY(*args): return _Freestyle.ViewEdgeSVertexIterator_getY(*args) + def getZ(*args): return _Freestyle.ViewEdgeSVertexIterator_getZ(*args) + def getPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.ViewEdgeSVertexIterator_getFEdge(*args) + def getId(*args): return _Freestyle.ViewEdgeSVertexIterator_getId(*args) + def getNature(*args): return _Freestyle.ViewEdgeSVertexIterator_getNature(*args) + def castToSVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToTVertex(*args) + __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeSVertexIterator_userdata_get, _Freestyle.ViewEdgeSVertexIterator_userdata_set) + def dupplicate(*args): return _Freestyle.ViewEdgeSVertexIterator_dupplicate(*args) + def point3D(*args): return _Freestyle.ViewEdgeSVertexIterator_point3D(*args) + def point2D(*args): return _Freestyle.ViewEdgeSVertexIterator_point2D(*args) + def normals(*args): return _Freestyle.ViewEdgeSVertexIterator_normals(*args) + def normalsSize(*args): return _Freestyle.ViewEdgeSVertexIterator_normalsSize(*args) + def fedges(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges(*args) + def fedges_begin(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges_begin(*args) + def fedges_end(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges_end(*args) + def shape(*args): return _Freestyle.ViewEdgeSVertexIterator_shape(*args) + def z(*args): return _Freestyle.ViewEdgeSVertexIterator_z(*args) + def viewvertex(*args): return _Freestyle.ViewEdgeSVertexIterator_viewvertex(*args) + def SetPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_SetPoint3D(*args) + def SetPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_SetPoint2D(*args) + def AddNormal(*args): return _Freestyle.ViewEdgeSVertexIterator_AddNormal(*args) + def setCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_setCurvatureInfo(*args) + def getCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_getCurvatureInfo(*args) + def setCurvatureFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_setCurvatureFredo(*args) + def setDirectionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_setDirectionFredo(*args) + def curvatureFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_directionFredo(*args) + def SetId(*args): return _Freestyle.ViewEdgeSVertexIterator_SetId(*args) + def SetFEdges(*args): return _Freestyle.ViewEdgeSVertexIterator_SetFEdges(*args) + def SetShape(*args): return _Freestyle.ViewEdgeSVertexIterator_SetShape(*args) + def SetViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_SetViewVertex(*args) + def AddFEdge(*args): return _Freestyle.ViewEdgeSVertexIterator_AddFEdge(*args) + def Replace(*args): return _Freestyle.ViewEdgeSVertexIterator_Replace(*args) + def fedge(*args): return _Freestyle.ViewEdgeSVertexIterator_fedge(*args) + def point2d(*args): return _Freestyle.ViewEdgeSVertexIterator_point2d(*args) + def point3d(*args): return _Freestyle.ViewEdgeSVertexIterator_point3d(*args) + def normal(*args): return _Freestyle.ViewEdgeSVertexIterator_normal(*args) + def shape_id(*args): return _Freestyle.ViewEdgeSVertexIterator_shape_id(*args) + def shape_importance(*args): return _Freestyle.ViewEdgeSVertexIterator_shape_importance(*args) + def qi(*args): return _Freestyle.ViewEdgeSVertexIterator_qi(*args) + def occluders_begin(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_size(*args) + def occludee(*args): return _Freestyle.ViewEdgeSVertexIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.ViewEdgeSVertexIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.ViewEdgeSVertexIterator_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.ViewEdgeSVertexIterator_z_discontinuity(*args) +ViewEdgeSVertexIterator_swigregister = _Freestyle.ViewEdgeSVertexIterator_swigregister +ViewEdgeSVertexIterator_swigregister(ViewEdgeSVertexIterator) + +class ViewEdgeViewEdgeIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgeViewEdgeIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgeViewEdgeIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == ViewEdgeViewEdgeIterator: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_ViewEdgeViewEdgeIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ViewEdgeViewEdgeIterator + __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getExactTypeName(*args) + def getCurrentEdge(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getCurrentEdge(*args) + def setCurrentEdge(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setCurrentEdge(*args) + def getBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getBegin(*args) + def setBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setBegin(*args) + def getOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getOrientation(*args) + def setOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setOrientation(*args) + def changeOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_changeOrientation(*args) + def getObject(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getObject(*args) + def __deref__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___deref__(*args) + def increment(*args): return _Freestyle.ViewEdgeViewEdgeIterator_increment(*args) + def decrement(*args): return _Freestyle.ViewEdgeViewEdgeIterator_decrement(*args) + def isBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isEnd(*args) + def __eq__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___eq__(*args) + def __ne__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___ne__(*args) + def getId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getId(*args) + def getNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getNature(*args) + __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeViewEdgeIterator_userdata_get, _Freestyle.ViewEdgeViewEdgeIterator_userdata_set) + def A(*args): return _Freestyle.ViewEdgeViewEdgeIterator_A(*args) + def B(*args): return _Freestyle.ViewEdgeViewEdgeIterator_B(*args) + def fedgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeA(*args) + def fedgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeB(*args) + def viewShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_viewShape(*args) + def aShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_aShape(*args) + def isClosed(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isClosed(*args) + def getChainingTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getChainingTimeStamp(*args) + def bShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_bShape(*args) + def occluders(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders(*args) + def splittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_splittingId(*args) + def SetA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetA(*args) + def SetB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetB(*args) + def SetNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetNature(*args) + def SetFEdgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetFEdgeA(*args) + def SetFEdgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetFEdgeB(*args) + def SetShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetShape(*args) + def SetId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetId(*args) + def UpdateFEdges(*args): return _Freestyle.ViewEdgeViewEdgeIterator_UpdateFEdges(*args) + def SetaShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetaShape(*args) + def SetQI(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetQI(*args) + def setChainingTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setChainingTimeStamp(*args) + def AddOccluder(*args): return _Freestyle.ViewEdgeViewEdgeIterator_AddOccluder(*args) + def setSplittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setSplittingId(*args) + def intersect_2d_area(*args): return _Freestyle.ViewEdgeViewEdgeIterator_intersect_2d_area(*args) + def include_in_2d_area(*args): return _Freestyle.ViewEdgeViewEdgeIterator_include_in_2d_area(*args) + def getLength2D(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getLength2D(*args) + def qi(*args): return _Freestyle.ViewEdgeViewEdgeIterator_qi(*args) + def occluders_begin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_end(*args) + def occluders_size(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_size(*args) + def occluders_empty(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_empty(*args) + def occludee(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occludee_empty(*args) + def shape_id(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape_id(*args) + def shape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape(*args) + def shape_importance(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape_importance(*args) + def verticesBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_pointsEnd(*args) + def getTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getTimeStamp(*args) + def setTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setTimeStamp(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_ViewEdgeViewEdgeIterator(self) + return weakref_proxy(self) +ViewEdgeViewEdgeIterator_swigregister = _Freestyle.ViewEdgeViewEdgeIterator_swigregister +ViewEdgeViewEdgeIterator_swigregister(ViewEdgeViewEdgeIterator) + +class UnaryFunction0DVoid(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVoid, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVoid, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DVoid: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DVoid(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVoid + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DVoid_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DVoid___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DVoid(self) + return weakref_proxy(self) +UnaryFunction0DVoid_swigregister = _Freestyle.UnaryFunction0DVoid_swigregister +UnaryFunction0DVoid_swigregister(UnaryFunction0DVoid) + +class UnaryFunction0DUnsigned(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DUnsigned, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DUnsigned, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DUnsigned: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DUnsigned(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DUnsigned + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DUnsigned_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DUnsigned___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DUnsigned(self) + return weakref_proxy(self) +UnaryFunction0DUnsigned_swigregister = _Freestyle.UnaryFunction0DUnsigned_swigregister +UnaryFunction0DUnsigned_swigregister(UnaryFunction0DUnsigned) + +class UnaryFunction0DFloat(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DFloat, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DFloat, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DFloat: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DFloat(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DFloat + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DFloat_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DFloat___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DFloat(self) + return weakref_proxy(self) +UnaryFunction0DFloat_swigregister = _Freestyle.UnaryFunction0DFloat_swigregister +UnaryFunction0DFloat_swigregister(UnaryFunction0DFloat) + +class UnaryFunction0DDouble(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DDouble, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DDouble, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DDouble: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DDouble(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DDouble + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DDouble_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DDouble___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DDouble(self) + return weakref_proxy(self) +UnaryFunction0DDouble_swigregister = _Freestyle.UnaryFunction0DDouble_swigregister +UnaryFunction0DDouble_swigregister(UnaryFunction0DDouble) + +class UnaryFunction0DVec2f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVec2f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVec2f, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DVec2f: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DVec2f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVec2f + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DVec2f_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DVec2f___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DVec2f(self) + return weakref_proxy(self) +UnaryFunction0DVec2f_swigregister = _Freestyle.UnaryFunction0DVec2f_swigregister +UnaryFunction0DVec2f_swigregister(UnaryFunction0DVec2f) + +class UnaryFunction0DVec3f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVec3f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVec3f, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DVec3f: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DVec3f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVec3f + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DVec3f_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DVec3f___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DVec3f(self) + return weakref_proxy(self) +UnaryFunction0DVec3f_swigregister = _Freestyle.UnaryFunction0DVec3f_swigregister +UnaryFunction0DVec3f_swigregister(UnaryFunction0DVec3f) + +class UnaryFunction0DId(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DId, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DId, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction0DId: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction0DId(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DId + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DId_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DId___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction0DId(self) + return weakref_proxy(self) +UnaryFunction0DId_swigregister = _Freestyle.UnaryFunction0DId_swigregister +UnaryFunction0DId_swigregister(UnaryFunction0DId) + +class UnaryFunction0DViewShape(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DViewShape, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DViewShape, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_UnaryFunction0DViewShape(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DViewShape + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DViewShape_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DViewShape___call__(*args) +UnaryFunction0DViewShape_swigregister = _Freestyle.UnaryFunction0DViewShape_swigregister +UnaryFunction0DViewShape_swigregister(UnaryFunction0DViewShape) + +class UnaryFunction0DVectorViewShape(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVectorViewShape, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVectorViewShape, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_UnaryFunction0DVectorViewShape(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVectorViewShape + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction0DVectorViewShape_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction0DVectorViewShape___call__(*args) +UnaryFunction0DVectorViewShape_swigregister = _Freestyle.UnaryFunction0DVectorViewShape_swigregister +UnaryFunction0DVectorViewShape_swigregister(UnaryFunction0DVectorViewShape) + +class GetXF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetXF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetXF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetXF0D_getName(*args) + def __call__(*args): return _Freestyle.GetXF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetXF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetXF0D + __del__ = lambda self : None; +GetXF0D_swigregister = _Freestyle.GetXF0D_swigregister +GetXF0D_swigregister(GetXF0D) + +class GetYF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetYF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetYF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetYF0D_getName(*args) + def __call__(*args): return _Freestyle.GetYF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetYF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetYF0D + __del__ = lambda self : None; +GetYF0D_swigregister = _Freestyle.GetYF0D_swigregister +GetYF0D_swigregister(GetYF0D) + +class GetZF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetZF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetZF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetZF0D_getName(*args) + def __call__(*args): return _Freestyle.GetZF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetZF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetZF0D + __del__ = lambda self : None; +GetZF0D_swigregister = _Freestyle.GetZF0D_swigregister +GetZF0D_swigregister(GetZF0D) + +class GetProjectedXF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedXF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedXF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetProjectedXF0D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedXF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetProjectedXF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetProjectedXF0D + __del__ = lambda self : None; +GetProjectedXF0D_swigregister = _Freestyle.GetProjectedXF0D_swigregister +GetProjectedXF0D_swigregister(GetProjectedXF0D) + +class GetProjectedYF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedYF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedYF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetProjectedYF0D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedYF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetProjectedYF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetProjectedYF0D + __del__ = lambda self : None; +GetProjectedYF0D_swigregister = _Freestyle.GetProjectedYF0D_swigregister +GetProjectedYF0D_swigregister(GetProjectedYF0D) + +class GetProjectedZF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedZF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedZF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetProjectedZF0D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedZF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetProjectedZF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetProjectedZF0D + __del__ = lambda self : None; +GetProjectedZF0D_swigregister = _Freestyle.GetProjectedZF0D_swigregister +GetProjectedZF0D_swigregister(GetProjectedZF0D) + +class GetCurvilinearAbscissaF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetCurvilinearAbscissaF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetCurvilinearAbscissaF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetCurvilinearAbscissaF0D_getName(*args) + def __call__(*args): return _Freestyle.GetCurvilinearAbscissaF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetCurvilinearAbscissaF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetCurvilinearAbscissaF0D + __del__ = lambda self : None; +GetCurvilinearAbscissaF0D_swigregister = _Freestyle.GetCurvilinearAbscissaF0D_swigregister +GetCurvilinearAbscissaF0D_swigregister(GetCurvilinearAbscissaF0D) + +class GetParameterF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetParameterF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetParameterF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetParameterF0D_getName(*args) + def __call__(*args): return _Freestyle.GetParameterF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetParameterF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetParameterF0D + __del__ = lambda self : None; +GetParameterF0D_swigregister = _Freestyle.GetParameterF0D_swigregister +GetParameterF0D_swigregister(GetParameterF0D) + +class VertexOrientation2DF0D(UnaryFunction0DVec2f): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, VertexOrientation2DF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, VertexOrientation2DF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.VertexOrientation2DF0D_getName(*args) + def __call__(*args): return _Freestyle.VertexOrientation2DF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_VertexOrientation2DF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_VertexOrientation2DF0D + __del__ = lambda self : None; +VertexOrientation2DF0D_swigregister = _Freestyle.VertexOrientation2DF0D_swigregister +VertexOrientation2DF0D_swigregister(VertexOrientation2DF0D) + +class VertexOrientation3DF0D(UnaryFunction0DVec3f): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DVec3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, VertexOrientation3DF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DVec3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, VertexOrientation3DF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.VertexOrientation3DF0D_getName(*args) + def __call__(*args): return _Freestyle.VertexOrientation3DF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_VertexOrientation3DF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_VertexOrientation3DF0D + __del__ = lambda self : None; +VertexOrientation3DF0D_swigregister = _Freestyle.VertexOrientation3DF0D_swigregister +VertexOrientation3DF0D_swigregister(VertexOrientation3DF0D) + +class Curvature2DAngleF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Curvature2DAngleF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Curvature2DAngleF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.Curvature2DAngleF0D_getName(*args) + def __call__(*args): return _Freestyle.Curvature2DAngleF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_Curvature2DAngleF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Curvature2DAngleF0D + __del__ = lambda self : None; +Curvature2DAngleF0D_swigregister = _Freestyle.Curvature2DAngleF0D_swigregister +Curvature2DAngleF0D_swigregister(Curvature2DAngleF0D) + +class ZDiscontinuityF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ZDiscontinuityF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ZDiscontinuityF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.ZDiscontinuityF0D_getName(*args) + def __call__(*args): return _Freestyle.ZDiscontinuityF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ZDiscontinuityF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ZDiscontinuityF0D + __del__ = lambda self : None; +ZDiscontinuityF0D_swigregister = _Freestyle.ZDiscontinuityF0D_swigregister +ZDiscontinuityF0D_swigregister(ZDiscontinuityF0D) + +class Normal2DF0D(UnaryFunction0DVec2f): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Normal2DF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Normal2DF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.Normal2DF0D_getName(*args) + def __call__(*args): return _Freestyle.Normal2DF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_Normal2DF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Normal2DF0D + __del__ = lambda self : None; +Normal2DF0D_swigregister = _Freestyle.Normal2DF0D_swigregister +Normal2DF0D_swigregister(Normal2DF0D) + +class MaterialF0D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, MaterialF0D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, MaterialF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.MaterialF0D_getName(*args) + def __call__(*args): return _Freestyle.MaterialF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_MaterialF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_MaterialF0D + __del__ = lambda self : None; +MaterialF0D_swigregister = _Freestyle.MaterialF0D_swigregister +MaterialF0D_swigregister(MaterialF0D) + +class ShapeIdF0D(UnaryFunction0DId): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DId]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ShapeIdF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DId]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ShapeIdF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.ShapeIdF0D_getName(*args) + def __call__(*args): return _Freestyle.ShapeIdF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ShapeIdF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ShapeIdF0D + __del__ = lambda self : None; +ShapeIdF0D_swigregister = _Freestyle.ShapeIdF0D_swigregister +ShapeIdF0D_swigregister(ShapeIdF0D) + +class QuantitativeInvisibilityF0D(UnaryFunction0DUnsigned): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DUnsigned]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DUnsigned]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.QuantitativeInvisibilityF0D_getName(*args) + def __call__(*args): return _Freestyle.QuantitativeInvisibilityF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_QuantitativeInvisibilityF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityF0D + __del__ = lambda self : None; +QuantitativeInvisibilityF0D_swigregister = _Freestyle.QuantitativeInvisibilityF0D_swigregister +QuantitativeInvisibilityF0D_swigregister(QuantitativeInvisibilityF0D) + +class CurveNatureF0D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, CurveNatureF0D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, CurveNatureF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.CurveNatureF0D_getName(*args) + def __call__(*args): return _Freestyle.CurveNatureF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_CurveNatureF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_CurveNatureF0D + __del__ = lambda self : None; +CurveNatureF0D_swigregister = _Freestyle.CurveNatureF0D_swigregister +CurveNatureF0D_swigregister(CurveNatureF0D) + +class GetShapeF0D(UnaryFunction0DViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetShapeF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetShapeF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetShapeF0D_getName(*args) + def __call__(*args): return _Freestyle.GetShapeF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetShapeF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetShapeF0D + __del__ = lambda self : None; +GetShapeF0D_swigregister = _Freestyle.GetShapeF0D_swigregister +GetShapeF0D_swigregister(GetShapeF0D) + +class GetOccludersF0D(UnaryFunction0DVectorViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludersF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetOccludersF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetOccludersF0D_getName(*args) + def __call__(*args): return _Freestyle.GetOccludersF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetOccludersF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetOccludersF0D + __del__ = lambda self : None; +GetOccludersF0D_swigregister = _Freestyle.GetOccludersF0D_swigregister +GetOccludersF0D_swigregister(GetOccludersF0D) + +class GetOccludeeF0D(UnaryFunction0DViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludeeF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetOccludeeF0D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.GetOccludeeF0D_getName(*args) + def __call__(*args): return _Freestyle.GetOccludeeF0D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_GetOccludeeF0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetOccludeeF0D + __del__ = lambda self : None; +GetOccludeeF0D_swigregister = _Freestyle.GetOccludeeF0D_swigregister +GetOccludeeF0D_swigregister(GetOccludeeF0D) + +getFEdge = _Freestyle.getFEdge +class UnaryFunction1DVoid(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVoid, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVoid, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DVoid: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DVoid(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVoid + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DVoid_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DVoid___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVoid_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVoid_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DVoid(self) + return weakref_proxy(self) +UnaryFunction1DVoid_swigregister = _Freestyle.UnaryFunction1DVoid_swigregister +UnaryFunction1DVoid_swigregister(UnaryFunction1DVoid) + +class UnaryFunction1DUnsigned(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DUnsigned, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DUnsigned, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DUnsigned: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DUnsigned(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DUnsigned + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DUnsigned_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DUnsigned___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DUnsigned_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DUnsigned_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DUnsigned(self) + return weakref_proxy(self) +UnaryFunction1DUnsigned_swigregister = _Freestyle.UnaryFunction1DUnsigned_swigregister +UnaryFunction1DUnsigned_swigregister(UnaryFunction1DUnsigned) + +class UnaryFunction1DFloat(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DFloat, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DFloat, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DFloat: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DFloat(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DFloat + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DFloat_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DFloat___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DFloat_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DFloat_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DFloat(self) + return weakref_proxy(self) +UnaryFunction1DFloat_swigregister = _Freestyle.UnaryFunction1DFloat_swigregister +UnaryFunction1DFloat_swigregister(UnaryFunction1DFloat) + +class UnaryFunction1DDouble(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DDouble, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DDouble, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DDouble: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DDouble(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DDouble + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DDouble_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DDouble___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DDouble_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DDouble_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DDouble(self) + return weakref_proxy(self) +UnaryFunction1DDouble_swigregister = _Freestyle.UnaryFunction1DDouble_swigregister +UnaryFunction1DDouble_swigregister(UnaryFunction1DDouble) + +class UnaryFunction1DVec2f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVec2f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVec2f, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DVec2f: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DVec2f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVec2f + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DVec2f_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DVec2f___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVec2f_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVec2f_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DVec2f(self) + return weakref_proxy(self) +UnaryFunction1DVec2f_swigregister = _Freestyle.UnaryFunction1DVec2f_swigregister +UnaryFunction1DVec2f_swigregister(UnaryFunction1DVec2f) + +class UnaryFunction1DVec3f(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVec3f, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVec3f, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryFunction1DVec3f: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryFunction1DVec3f(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVec3f + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DVec3f_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DVec3f___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVec3f_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVec3f_getIntegrationType(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryFunction1DVec3f(self) + return weakref_proxy(self) +UnaryFunction1DVec3f_swigregister = _Freestyle.UnaryFunction1DVec3f_swigregister +UnaryFunction1DVec3f_swigregister(UnaryFunction1DVec3f) + +class UnaryFunction1DVectorViewShape(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVectorViewShape, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVectorViewShape, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_UnaryFunction1DVectorViewShape(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVectorViewShape + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryFunction1DVectorViewShape_getName(*args) + def __call__(*args): return _Freestyle.UnaryFunction1DVectorViewShape___call__(*args) + def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVectorViewShape_setIntegrationType(*args) + def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVectorViewShape_getIntegrationType(*args) +UnaryFunction1DVectorViewShape_swigregister = _Freestyle.UnaryFunction1DVectorViewShape_swigregister +UnaryFunction1DVectorViewShape_swigregister(UnaryFunction1DVectorViewShape) + +class GetXF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetXF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetXF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetXF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetXF1D_getName(*args) + def __call__(*args): return _Freestyle.GetXF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetXF1D + __del__ = lambda self : None; +GetXF1D_swigregister = _Freestyle.GetXF1D_swigregister +GetXF1D_swigregister(GetXF1D) + +class GetYF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetYF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetYF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetYF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetYF1D_getName(*args) + def __call__(*args): return _Freestyle.GetYF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetYF1D + __del__ = lambda self : None; +GetYF1D_swigregister = _Freestyle.GetYF1D_swigregister +GetYF1D_swigregister(GetYF1D) + +class GetZF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetZF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetZF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetZF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetZF1D_getName(*args) + def __call__(*args): return _Freestyle.GetZF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetZF1D + __del__ = lambda self : None; +GetZF1D_swigregister = _Freestyle.GetZF1D_swigregister +GetZF1D_swigregister(GetZF1D) + +class GetProjectedXF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedXF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedXF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetProjectedXF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetProjectedXF1D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedXF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetProjectedXF1D + __del__ = lambda self : None; +GetProjectedXF1D_swigregister = _Freestyle.GetProjectedXF1D_swigregister +GetProjectedXF1D_swigregister(GetProjectedXF1D) + +class GetProjectedYF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedYF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedYF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetProjectedYF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetProjectedYF1D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedYF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetProjectedYF1D + __del__ = lambda self : None; +GetProjectedYF1D_swigregister = _Freestyle.GetProjectedYF1D_swigregister +GetProjectedYF1D_swigregister(GetProjectedYF1D) + +class GetProjectedZF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedZF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedZF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetProjectedZF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetProjectedZF1D_getName(*args) + def __call__(*args): return _Freestyle.GetProjectedZF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetProjectedZF1D + __del__ = lambda self : None; +GetProjectedZF1D_swigregister = _Freestyle.GetProjectedZF1D_swigregister +GetProjectedZF1D_swigregister(GetProjectedZF1D) + +class Orientation2DF1D(UnaryFunction1DVec2f): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Orientation2DF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Orientation2DF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Orientation2DF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.Orientation2DF1D_getName(*args) + def __call__(*args): return _Freestyle.Orientation2DF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_Orientation2DF1D + __del__ = lambda self : None; +Orientation2DF1D_swigregister = _Freestyle.Orientation2DF1D_swigregister +Orientation2DF1D_swigregister(Orientation2DF1D) + +class Orientation3DF1D(UnaryFunction1DVec3f): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVec3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Orientation3DF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVec3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Orientation3DF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Orientation3DF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.Orientation3DF1D_getName(*args) + def __call__(*args): return _Freestyle.Orientation3DF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_Orientation3DF1D + __del__ = lambda self : None; +Orientation3DF1D_swigregister = _Freestyle.Orientation3DF1D_swigregister +Orientation3DF1D_swigregister(Orientation3DF1D) + +class ZDiscontinuityF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ZDiscontinuityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ZDiscontinuityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ZDiscontinuityF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ZDiscontinuityF1D_getName(*args) + def __call__(*args): return _Freestyle.ZDiscontinuityF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ZDiscontinuityF1D + __del__ = lambda self : None; +ZDiscontinuityF1D_swigregister = _Freestyle.ZDiscontinuityF1D_swigregister +ZDiscontinuityF1D_swigregister(ZDiscontinuityF1D) + +class QuantitativeInvisibilityF1D(UnaryFunction1DUnsigned): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DUnsigned]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DUnsigned]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_QuantitativeInvisibilityF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.QuantitativeInvisibilityF1D_getName(*args) + def __call__(*args): return _Freestyle.QuantitativeInvisibilityF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityF1D + __del__ = lambda self : None; +QuantitativeInvisibilityF1D_swigregister = _Freestyle.QuantitativeInvisibilityF1D_swigregister +QuantitativeInvisibilityF1D_swigregister(QuantitativeInvisibilityF1D) + +class CurveNatureF1D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, CurveNatureF1D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, CurveNatureF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_CurveNatureF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.CurveNatureF1D_getName(*args) + def __call__(*args): return _Freestyle.CurveNatureF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_CurveNatureF1D + __del__ = lambda self : None; +CurveNatureF1D_swigregister = _Freestyle.CurveNatureF1D_swigregister +CurveNatureF1D_swigregister(CurveNatureF1D) + +class TimeStampF1D(UnaryFunction1DVoid): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TimeStampF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TimeStampF1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.TimeStampF1D_getName(*args) + def __call__(*args): return _Freestyle.TimeStampF1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_TimeStampF1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_TimeStampF1D + __del__ = lambda self : None; +TimeStampF1D_swigregister = _Freestyle.TimeStampF1D_swigregister +TimeStampF1D_swigregister(TimeStampF1D) + +class IncrementChainingTimeStampF1D(UnaryFunction1DVoid): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, IncrementChainingTimeStampF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, IncrementChainingTimeStampF1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.IncrementChainingTimeStampF1D_getName(*args) + def __call__(*args): return _Freestyle.IncrementChainingTimeStampF1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_IncrementChainingTimeStampF1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_IncrementChainingTimeStampF1D + __del__ = lambda self : None; +IncrementChainingTimeStampF1D_swigregister = _Freestyle.IncrementChainingTimeStampF1D_swigregister +IncrementChainingTimeStampF1D_swigregister(IncrementChainingTimeStampF1D) + +class ChainingTimeStampF1D(UnaryFunction1DVoid): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ChainingTimeStampF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ChainingTimeStampF1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.ChainingTimeStampF1D_getName(*args) + def __call__(*args): return _Freestyle.ChainingTimeStampF1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ChainingTimeStampF1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ChainingTimeStampF1D + __del__ = lambda self : None; +ChainingTimeStampF1D_swigregister = _Freestyle.ChainingTimeStampF1D_swigregister +ChainingTimeStampF1D_swigregister(ChainingTimeStampF1D) + +class Curvature2DAngleF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Curvature2DAngleF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Curvature2DAngleF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Curvature2DAngleF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.Curvature2DAngleF1D_getName(*args) + def __call__(*args): return _Freestyle.Curvature2DAngleF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_Curvature2DAngleF1D + __del__ = lambda self : None; +Curvature2DAngleF1D_swigregister = _Freestyle.Curvature2DAngleF1D_swigregister +Curvature2DAngleF1D_swigregister(Curvature2DAngleF1D) + +class Normal2DF1D(UnaryFunction1DVec2f): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Normal2DF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Normal2DF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Normal2DF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.Normal2DF1D_getName(*args) + def __call__(*args): return _Freestyle.Normal2DF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_Normal2DF1D + __del__ = lambda self : None; +Normal2DF1D_swigregister = _Freestyle.Normal2DF1D_swigregister +Normal2DF1D_swigregister(Normal2DF1D) + +class GetShapeF1D(UnaryFunction1DVectorViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetShapeF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetShapeF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetShapeF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetShapeF1D_getName(*args) + def __call__(*args): return _Freestyle.GetShapeF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetShapeF1D + __del__ = lambda self : None; +GetShapeF1D_swigregister = _Freestyle.GetShapeF1D_swigregister +GetShapeF1D_swigregister(GetShapeF1D) + +class GetOccludersF1D(UnaryFunction1DVectorViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludersF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetOccludersF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetOccludersF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetOccludersF1D_getName(*args) + def __call__(*args): return _Freestyle.GetOccludersF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetOccludersF1D + __del__ = lambda self : None; +GetOccludersF1D_swigregister = _Freestyle.GetOccludersF1D_swigregister +GetOccludersF1D_swigregister(GetOccludersF1D) + +class GetOccludeeF1D(UnaryFunction1DVectorViewShape): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludeeF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetOccludeeF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetOccludeeF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetOccludeeF1D_getName(*args) + def __call__(*args): return _Freestyle.GetOccludeeF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetOccludeeF1D + __del__ = lambda self : None; +GetOccludeeF1D_swigregister = _Freestyle.GetOccludeeF1D_swigregister +GetOccludeeF1D_swigregister(GetOccludeeF1D) + +class Module(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Module, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Module, name) + __repr__ = _swig_repr + __swig_getmethods__["setAlwaysRefresh"] = lambda x: _Freestyle.Module_setAlwaysRefresh + if _newclass:setAlwaysRefresh = staticmethod(_Freestyle.Module_setAlwaysRefresh) + __swig_getmethods__["setCausal"] = lambda x: _Freestyle.Module_setCausal + if _newclass:setCausal = staticmethod(_Freestyle.Module_setCausal) + __swig_getmethods__["setDrawable"] = lambda x: _Freestyle.Module_setDrawable + if _newclass:setDrawable = staticmethod(_Freestyle.Module_setDrawable) + __swig_getmethods__["getAlwaysRefresh"] = lambda x: _Freestyle.Module_getAlwaysRefresh + if _newclass:getAlwaysRefresh = staticmethod(_Freestyle.Module_getAlwaysRefresh) + __swig_getmethods__["getCausal"] = lambda x: _Freestyle.Module_getCausal + if _newclass:getCausal = staticmethod(_Freestyle.Module_getCausal) + __swig_getmethods__["getDrawable"] = lambda x: _Freestyle.Module_getDrawable + if _newclass:getDrawable = staticmethod(_Freestyle.Module_getDrawable) + def __init__(self, *args): + this = _Freestyle.new_Module(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Module + __del__ = lambda self : None; +Module_swigregister = _Freestyle.Module_swigregister +Module_swigregister(Module) +Module_setAlwaysRefresh = _Freestyle.Module_setAlwaysRefresh +Module_setCausal = _Freestyle.Module_setCausal +Module_setDrawable = _Freestyle.Module_setDrawable +Module_getAlwaysRefresh = _Freestyle.Module_getAlwaysRefresh +Module_getCausal = _Freestyle.Module_getCausal +Module_getDrawable = _Freestyle.Module_getDrawable + +class DensityF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, DensityF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, DensityF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_DensityF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.DensityF0D_getName(*args) + def __call__(*args): return _Freestyle.DensityF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_DensityF0D + __del__ = lambda self : None; +DensityF0D_swigregister = _Freestyle.DensityF0D_swigregister +DensityF0D_swigregister(DensityF0D) + +class LocalAverageDepthF0D(UnaryFunction0DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, LocalAverageDepthF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, LocalAverageDepthF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_LocalAverageDepthF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.LocalAverageDepthF0D_getName(*args) + def __call__(*args): return _Freestyle.LocalAverageDepthF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_LocalAverageDepthF0D + __del__ = lambda self : None; +LocalAverageDepthF0D_swigregister = _Freestyle.LocalAverageDepthF0D_swigregister +LocalAverageDepthF0D_swigregister(LocalAverageDepthF0D) + +class ReadMapPixelF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ReadMapPixelF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ReadMapPixelF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ReadMapPixelF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ReadMapPixelF0D_getName(*args) + def __call__(*args): return _Freestyle.ReadMapPixelF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ReadMapPixelF0D + __del__ = lambda self : None; +ReadMapPixelF0D_swigregister = _Freestyle.ReadMapPixelF0D_swigregister +ReadMapPixelF0D_swigregister(ReadMapPixelF0D) + +class ReadSteerableViewMapPixelF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ReadSteerableViewMapPixelF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ReadSteerableViewMapPixelF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ReadSteerableViewMapPixelF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ReadSteerableViewMapPixelF0D_getName(*args) + def __call__(*args): return _Freestyle.ReadSteerableViewMapPixelF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ReadSteerableViewMapPixelF0D + __del__ = lambda self : None; +ReadSteerableViewMapPixelF0D_swigregister = _Freestyle.ReadSteerableViewMapPixelF0D_swigregister +ReadSteerableViewMapPixelF0D_swigregister(ReadSteerableViewMapPixelF0D) + +class ReadCompleteViewMapPixelF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ReadCompleteViewMapPixelF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ReadCompleteViewMapPixelF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ReadCompleteViewMapPixelF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ReadCompleteViewMapPixelF0D_getName(*args) + def __call__(*args): return _Freestyle.ReadCompleteViewMapPixelF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ReadCompleteViewMapPixelF0D + __del__ = lambda self : None; +ReadCompleteViewMapPixelF0D_swigregister = _Freestyle.ReadCompleteViewMapPixelF0D_swigregister +ReadCompleteViewMapPixelF0D_swigregister(ReadCompleteViewMapPixelF0D) + +class GetViewMapGradientNormF0D(UnaryFunction0DFloat): + __swig_setmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetViewMapGradientNormF0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetViewMapGradientNormF0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetViewMapGradientNormF0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetViewMapGradientNormF0D_getName(*args) + def __call__(*args): return _Freestyle.GetViewMapGradientNormF0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetViewMapGradientNormF0D + __del__ = lambda self : None; +GetViewMapGradientNormF0D_swigregister = _Freestyle.GetViewMapGradientNormF0D_swigregister +GetViewMapGradientNormF0D_swigregister(GetViewMapGradientNormF0D) + +class DensityF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, DensityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, DensityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_DensityF1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_DensityF1D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.DensityF1D_getName(*args) + def __call__(*args): return _Freestyle.DensityF1D___call__(*args) +DensityF1D_swigregister = _Freestyle.DensityF1D_swigregister +DensityF1D_swigregister(DensityF1D) + +class LocalAverageDepthF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, LocalAverageDepthF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, LocalAverageDepthF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_LocalAverageDepthF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.LocalAverageDepthF1D_getName(*args) + def __call__(*args): return _Freestyle.LocalAverageDepthF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_LocalAverageDepthF1D + __del__ = lambda self : None; +LocalAverageDepthF1D_swigregister = _Freestyle.LocalAverageDepthF1D_swigregister +LocalAverageDepthF1D_swigregister(LocalAverageDepthF1D) + +class GetCompleteViewMapDensityF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetCompleteViewMapDensityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetCompleteViewMapDensityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetCompleteViewMapDensityF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetCompleteViewMapDensityF1D_getName(*args) + def __call__(*args): return _Freestyle.GetCompleteViewMapDensityF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetCompleteViewMapDensityF1D + __del__ = lambda self : None; +GetCompleteViewMapDensityF1D_swigregister = _Freestyle.GetCompleteViewMapDensityF1D_swigregister +GetCompleteViewMapDensityF1D_swigregister(GetCompleteViewMapDensityF1D) + +class GetDirectionalViewMapDensityF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetDirectionalViewMapDensityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetDirectionalViewMapDensityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetDirectionalViewMapDensityF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetDirectionalViewMapDensityF1D_getName(*args) + def __call__(*args): return _Freestyle.GetDirectionalViewMapDensityF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetDirectionalViewMapDensityF1D + __del__ = lambda self : None; +GetDirectionalViewMapDensityF1D_swigregister = _Freestyle.GetDirectionalViewMapDensityF1D_swigregister +GetDirectionalViewMapDensityF1D_swigregister(GetDirectionalViewMapDensityF1D) + +class GetSteerableViewMapDensityF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetSteerableViewMapDensityF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetSteerableViewMapDensityF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetSteerableViewMapDensityF1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_GetSteerableViewMapDensityF1D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.GetSteerableViewMapDensityF1D_getName(*args) + def __call__(*args): return _Freestyle.GetSteerableViewMapDensityF1D___call__(*args) +GetSteerableViewMapDensityF1D_swigregister = _Freestyle.GetSteerableViewMapDensityF1D_swigregister +GetSteerableViewMapDensityF1D_swigregister(GetSteerableViewMapDensityF1D) + +class GetViewMapGradientNormF1D(UnaryFunction1DDouble): + __swig_setmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GetViewMapGradientNormF1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GetViewMapGradientNormF1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GetViewMapGradientNormF1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.GetViewMapGradientNormF1D_getName(*args) + def __call__(*args): return _Freestyle.GetViewMapGradientNormF1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_GetViewMapGradientNormF1D + __del__ = lambda self : None; +GetViewMapGradientNormF1D_swigregister = _Freestyle.GetViewMapGradientNormF1D_swigregister +GetViewMapGradientNormF1D_swigregister(GetViewMapGradientNormF1D) + +GetTimeStampCF = _Freestyle.GetTimeStampCF +GetCanvasWidthCF = _Freestyle.GetCanvasWidthCF +GetCanvasHeightCF = _Freestyle.GetCanvasHeightCF +ReadMapPixelCF = _Freestyle.ReadMapPixelCF +ReadCompleteViewMapPixelCF = _Freestyle.ReadCompleteViewMapPixelCF +ReadDirectionalViewMapPixelCF = _Freestyle.ReadDirectionalViewMapPixelCF +GetSelectedFEdgeCF = _Freestyle.GetSelectedFEdgeCF +class AdjacencyIterator(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, AdjacencyIterator, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, AdjacencyIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_AdjacencyIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_AdjacencyIterator + __del__ = lambda self : None; + def isEnd(*args): return _Freestyle.AdjacencyIterator_isEnd(*args) + def isBegin(*args): return _Freestyle.AdjacencyIterator_isBegin(*args) + def isIncoming(*args): return _Freestyle.AdjacencyIterator_isIncoming(*args) + def getObject(*args): return _Freestyle.AdjacencyIterator_getObject(*args) + def __deref__(*args): return _Freestyle.AdjacencyIterator___deref__(*args) + def increment(*args): return _Freestyle.AdjacencyIterator_increment(*args) + def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args) + def getId(*args): return _Freestyle.AdjacencyIterator_getId(*args) + def getNature(*args): return _Freestyle.AdjacencyIterator_getNature(*args) + __swig_setmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_set + __swig_getmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_get + if _newclass:userdata = _swig_property(_Freestyle.AdjacencyIterator_userdata_get, _Freestyle.AdjacencyIterator_userdata_set) + def A(*args): return _Freestyle.AdjacencyIterator_A(*args) + def B(*args): return _Freestyle.AdjacencyIterator_B(*args) + def fedgeA(*args): return _Freestyle.AdjacencyIterator_fedgeA(*args) + def fedgeB(*args): return _Freestyle.AdjacencyIterator_fedgeB(*args) + def viewShape(*args): return _Freestyle.AdjacencyIterator_viewShape(*args) + def aShape(*args): return _Freestyle.AdjacencyIterator_aShape(*args) + def isClosed(*args): return _Freestyle.AdjacencyIterator_isClosed(*args) + def getChainingTimeStamp(*args): return _Freestyle.AdjacencyIterator_getChainingTimeStamp(*args) + def bShape(*args): return _Freestyle.AdjacencyIterator_bShape(*args) + def occluders(*args): return _Freestyle.AdjacencyIterator_occluders(*args) + def splittingId(*args): return _Freestyle.AdjacencyIterator_splittingId(*args) + def SetA(*args): return _Freestyle.AdjacencyIterator_SetA(*args) + def SetB(*args): return _Freestyle.AdjacencyIterator_SetB(*args) + def SetNature(*args): return _Freestyle.AdjacencyIterator_SetNature(*args) + def SetFEdgeA(*args): return _Freestyle.AdjacencyIterator_SetFEdgeA(*args) + def SetFEdgeB(*args): return _Freestyle.AdjacencyIterator_SetFEdgeB(*args) + def SetShape(*args): return _Freestyle.AdjacencyIterator_SetShape(*args) + def SetId(*args): return _Freestyle.AdjacencyIterator_SetId(*args) + def UpdateFEdges(*args): return _Freestyle.AdjacencyIterator_UpdateFEdges(*args) + def SetaShape(*args): return _Freestyle.AdjacencyIterator_SetaShape(*args) + def SetQI(*args): return _Freestyle.AdjacencyIterator_SetQI(*args) + def setChainingTimeStamp(*args): return _Freestyle.AdjacencyIterator_setChainingTimeStamp(*args) + def AddOccluder(*args): return _Freestyle.AdjacencyIterator_AddOccluder(*args) + def setSplittingId(*args): return _Freestyle.AdjacencyIterator_setSplittingId(*args) + def intersect_2d_area(*args): return _Freestyle.AdjacencyIterator_intersect_2d_area(*args) + def include_in_2d_area(*args): return _Freestyle.AdjacencyIterator_include_in_2d_area(*args) + def getLength2D(*args): return _Freestyle.AdjacencyIterator_getLength2D(*args) + def qi(*args): return _Freestyle.AdjacencyIterator_qi(*args) + def occluders_begin(*args): return _Freestyle.AdjacencyIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.AdjacencyIterator_occluders_end(*args) + def occluders_size(*args): return _Freestyle.AdjacencyIterator_occluders_size(*args) + def occluders_empty(*args): return _Freestyle.AdjacencyIterator_occluders_empty(*args) + def occludee(*args): return _Freestyle.AdjacencyIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.AdjacencyIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.AdjacencyIterator_occludee_empty(*args) + def shape_id(*args): return _Freestyle.AdjacencyIterator_shape_id(*args) + def shape(*args): return _Freestyle.AdjacencyIterator_shape(*args) + def shape_importance(*args): return _Freestyle.AdjacencyIterator_shape_importance(*args) + def verticesBegin(*args): return _Freestyle.AdjacencyIterator_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.AdjacencyIterator_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.AdjacencyIterator_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.AdjacencyIterator_pointsEnd(*args) + def getTimeStamp(*args): return _Freestyle.AdjacencyIterator_getTimeStamp(*args) + def setTimeStamp(*args): return _Freestyle.AdjacencyIterator_setTimeStamp(*args) +AdjacencyIterator_swigregister = _Freestyle.AdjacencyIterator_swigregister +AdjacencyIterator_swigregister(AdjacencyIterator) +LoadMapCF = _Freestyle.LoadMapCF + +class ChainingIterator(ViewEdgeViewEdgeIterator): + __swig_setmethods__ = {} + for _s in [ViewEdgeViewEdgeIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ChainingIterator, name, value) + __swig_getmethods__ = {} + for _s in [ViewEdgeViewEdgeIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ChainingIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == ChainingIterator: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_ChainingIterator(*args) + try: self.this.append(this) + except: self.this = this + def getExactTypeName(*args): return _Freestyle.ChainingIterator_getExactTypeName(*args) + def init(*args): return _Freestyle.ChainingIterator_init(*args) + def traverse(*args): return _Freestyle.ChainingIterator_traverse(*args) + def getVertex(*args): return _Freestyle.ChainingIterator_getVertex(*args) + def isIncrementing(*args): return _Freestyle.ChainingIterator_isIncrementing(*args) + def increment(*args): return _Freestyle.ChainingIterator_increment(*args) + def decrement(*args): return _Freestyle.ChainingIterator_decrement(*args) + __swig_destroy__ = _Freestyle.delete_ChainingIterator + __del__ = lambda self : None; + def __disown__(self): + self.this.disown() + _Freestyle.disown_ChainingIterator(self) + return weakref_proxy(self) +ChainingIterator_swigregister = _Freestyle.ChainingIterator_swigregister +ChainingIterator_swigregister(ChainingIterator) + +class ChainSilhouetteIterator(ChainingIterator): + __swig_setmethods__ = {} + for _s in [ChainingIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ChainSilhouetteIterator, name, value) + __swig_getmethods__ = {} + for _s in [ChainingIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ChainSilhouetteIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == ChainSilhouetteIterator: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_ChainSilhouetteIterator(*args) + try: self.this.append(this) + except: self.this = this + def getExactTypeName(*args): return _Freestyle.ChainSilhouetteIterator_getExactTypeName(*args) + def traverse(*args): return _Freestyle.ChainSilhouetteIterator_traverse(*args) + __swig_destroy__ = _Freestyle.delete_ChainSilhouetteIterator + __del__ = lambda self : None; + def __disown__(self): + self.this.disown() + _Freestyle.disown_ChainSilhouetteIterator(self) + return weakref_proxy(self) +ChainSilhouetteIterator_swigregister = _Freestyle.ChainSilhouetteIterator_swigregister +ChainSilhouetteIterator_swigregister(ChainSilhouetteIterator) + +class ChainPredicateIterator(ChainingIterator): + __swig_setmethods__ = {} + for _s in [ChainingIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ChainPredicateIterator, name, value) + __swig_getmethods__ = {} + for _s in [ChainingIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ChainPredicateIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == ChainPredicateIterator: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_ChainPredicateIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ChainPredicateIterator + __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.ChainPredicateIterator_getExactTypeName(*args) + def traverse(*args): return _Freestyle.ChainPredicateIterator_traverse(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_ChainPredicateIterator(self) + return weakref_proxy(self) +ChainPredicateIterator_swigregister = _Freestyle.ChainPredicateIterator_swigregister +ChainPredicateIterator_swigregister(ChainPredicateIterator) + +class UnaryPredicate0D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryPredicate0D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryPredicate0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryPredicate0D: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryPredicate0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryPredicate0D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryPredicate0D_getName(*args) + def __call__(*args): return _Freestyle.UnaryPredicate0D___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryPredicate0D(self) + return weakref_proxy(self) +UnaryPredicate0D_swigregister = _Freestyle.UnaryPredicate0D_swigregister +UnaryPredicate0D_swigregister(UnaryPredicate0D) + +class BinaryPredicate0D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, BinaryPredicate0D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, BinaryPredicate0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_BinaryPredicate0D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_BinaryPredicate0D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.BinaryPredicate0D_getName(*args) + def __call__(*args): return _Freestyle.BinaryPredicate0D___call__(*args) +BinaryPredicate0D_swigregister = _Freestyle.BinaryPredicate0D_swigregister +BinaryPredicate0D_swigregister(BinaryPredicate0D) + +class TrueUP0D(UnaryPredicate0D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TrueUP0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TrueUP0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_TrueUP0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.TrueUP0D_getName(*args) + def __call__(*args): return _Freestyle.TrueUP0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_TrueUP0D + __del__ = lambda self : None; +TrueUP0D_swigregister = _Freestyle.TrueUP0D_swigregister +TrueUP0D_swigregister(TrueUP0D) + +class FalseUP0D(UnaryPredicate0D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FalseUP0D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FalseUP0D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_FalseUP0D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.FalseUP0D_getName(*args) + def __call__(*args): return _Freestyle.FalseUP0D___call__(*args) + __swig_destroy__ = _Freestyle.delete_FalseUP0D + __del__ = lambda self : None; +FalseUP0D_swigregister = _Freestyle.FalseUP0D_swigregister +FalseUP0D_swigregister(FalseUP0D) + +class UnaryPredicate1D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryPredicate1D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, UnaryPredicate1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == UnaryPredicate1D: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_UnaryPredicate1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_UnaryPredicate1D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.UnaryPredicate1D_getName(*args) + def __call__(*args): return _Freestyle.UnaryPredicate1D___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_UnaryPredicate1D(self) + return weakref_proxy(self) +UnaryPredicate1D_swigregister = _Freestyle.UnaryPredicate1D_swigregister +UnaryPredicate1D_swigregister(UnaryPredicate1D) + +class BinaryPredicate1D(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, BinaryPredicate1D, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, BinaryPredicate1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == BinaryPredicate1D: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_BinaryPredicate1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_BinaryPredicate1D + __del__ = lambda self : None; + def getName(*args): return _Freestyle.BinaryPredicate1D_getName(*args) + def __call__(*args): return _Freestyle.BinaryPredicate1D___call__(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_BinaryPredicate1D(self) + return weakref_proxy(self) +BinaryPredicate1D_swigregister = _Freestyle.BinaryPredicate1D_swigregister +BinaryPredicate1D_swigregister(BinaryPredicate1D) + +class TrueUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TrueUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TrueUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_TrueUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.TrueUP1D_getName(*args) + def __call__(*args): return _Freestyle.TrueUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_TrueUP1D + __del__ = lambda self : None; +TrueUP1D_swigregister = _Freestyle.TrueUP1D_swigregister +TrueUP1D_swigregister(TrueUP1D) + +class FalseUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FalseUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FalseUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_FalseUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.FalseUP1D_getName(*args) + def __call__(*args): return _Freestyle.FalseUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_FalseUP1D + __del__ = lambda self : None; +FalseUP1D_swigregister = _Freestyle.FalseUP1D_swigregister +FalseUP1D_swigregister(FalseUP1D) + +class QuantitativeInvisibilityUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_QuantitativeInvisibilityUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.QuantitativeInvisibilityUP1D_getName(*args) + def __call__(*args): return _Freestyle.QuantitativeInvisibilityUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityUP1D + __del__ = lambda self : None; +QuantitativeInvisibilityUP1D_swigregister = _Freestyle.QuantitativeInvisibilityUP1D_swigregister +QuantitativeInvisibilityUP1D_swigregister(QuantitativeInvisibilityUP1D) + +class ContourUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ContourUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ContourUP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.ContourUP1D_getName(*args) + def __call__(*args): return _Freestyle.ContourUP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ContourUP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ContourUP1D + __del__ = lambda self : None; +ContourUP1D_swigregister = _Freestyle.ContourUP1D_swigregister +ContourUP1D_swigregister(ContourUP1D) + +class ExternalContourUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ExternalContourUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ExternalContourUP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.ExternalContourUP1D_getName(*args) + def __call__(*args): return _Freestyle.ExternalContourUP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ExternalContourUP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ExternalContourUP1D + __del__ = lambda self : None; +ExternalContourUP1D_swigregister = _Freestyle.ExternalContourUP1D_swigregister +ExternalContourUP1D_swigregister(ExternalContourUP1D) + +class EqualToTimeStampUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, EqualToTimeStampUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, EqualToTimeStampUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_EqualToTimeStampUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.EqualToTimeStampUP1D_getName(*args) + def __call__(*args): return _Freestyle.EqualToTimeStampUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_EqualToTimeStampUP1D + __del__ = lambda self : None; +EqualToTimeStampUP1D_swigregister = _Freestyle.EqualToTimeStampUP1D_swigregister +EqualToTimeStampUP1D_swigregister(EqualToTimeStampUP1D) + +class EqualToChainingTimeStampUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, EqualToChainingTimeStampUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, EqualToChainingTimeStampUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_EqualToChainingTimeStampUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.EqualToChainingTimeStampUP1D_getName(*args) + def __call__(*args): return _Freestyle.EqualToChainingTimeStampUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_EqualToChainingTimeStampUP1D + __del__ = lambda self : None; +EqualToChainingTimeStampUP1D_swigregister = _Freestyle.EqualToChainingTimeStampUP1D_swigregister +EqualToChainingTimeStampUP1D_swigregister(EqualToChainingTimeStampUP1D) + +class ShapeUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ShapeUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ShapeUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ShapeUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ShapeUP1D_getName(*args) + def __call__(*args): return _Freestyle.ShapeUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ShapeUP1D + __del__ = lambda self : None; +ShapeUP1D_swigregister = _Freestyle.ShapeUP1D_swigregister +ShapeUP1D_swigregister(ShapeUP1D) + +class TrueBP1D(BinaryPredicate1D): + __swig_setmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TrueBP1D, name, value) + __swig_getmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TrueBP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.TrueBP1D_getName(*args) + def __call__(*args): return _Freestyle.TrueBP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_TrueBP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_TrueBP1D + __del__ = lambda self : None; +TrueBP1D_swigregister = _Freestyle.TrueBP1D_swigregister +TrueBP1D_swigregister(TrueBP1D) + +class FalseBP1D(BinaryPredicate1D): + __swig_setmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, FalseBP1D, name, value) + __swig_getmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, FalseBP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.FalseBP1D_getName(*args) + def __call__(*args): return _Freestyle.FalseBP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_FalseBP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_FalseBP1D + __del__ = lambda self : None; +FalseBP1D_swigregister = _Freestyle.FalseBP1D_swigregister +FalseBP1D_swigregister(FalseBP1D) + +class Length2DBP1D(BinaryPredicate1D): + __swig_setmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Length2DBP1D, name, value) + __swig_getmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Length2DBP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.Length2DBP1D_getName(*args) + def __call__(*args): return _Freestyle.Length2DBP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_Length2DBP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Length2DBP1D + __del__ = lambda self : None; +Length2DBP1D_swigregister = _Freestyle.Length2DBP1D_swigregister +Length2DBP1D_swigregister(Length2DBP1D) + +class SameShapeIdBP1D(BinaryPredicate1D): + __swig_setmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, SameShapeIdBP1D, name, value) + __swig_getmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, SameShapeIdBP1D, name) + __repr__ = _swig_repr + def getName(*args): return _Freestyle.SameShapeIdBP1D_getName(*args) + def __call__(*args): return _Freestyle.SameShapeIdBP1D___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_SameShapeIdBP1D(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_SameShapeIdBP1D + __del__ = lambda self : None; +SameShapeIdBP1D_swigregister = _Freestyle.SameShapeIdBP1D_swigregister +SameShapeIdBP1D_swigregister(SameShapeIdBP1D) + +class ViewMapGradientNormBP1D(BinaryPredicate1D): + __swig_setmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ViewMapGradientNormBP1D, name, value) + __swig_getmethods__ = {} + for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ViewMapGradientNormBP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ViewMapGradientNormBP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ViewMapGradientNormBP1D_getName(*args) + def __call__(*args): return _Freestyle.ViewMapGradientNormBP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_ViewMapGradientNormBP1D + __del__ = lambda self : None; +ViewMapGradientNormBP1D_swigregister = _Freestyle.ViewMapGradientNormBP1D_swigregister +ViewMapGradientNormBP1D_swigregister(ViewMapGradientNormBP1D) + +class DensityLowerThanUP1D(UnaryPredicate1D): + __swig_setmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, DensityLowerThanUP1D, name, value) + __swig_getmethods__ = {} + for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, DensityLowerThanUP1D, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_DensityLowerThanUP1D(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.DensityLowerThanUP1D_getName(*args) + def __call__(*args): return _Freestyle.DensityLowerThanUP1D___call__(*args) + __swig_destroy__ = _Freestyle.delete_DensityLowerThanUP1D + __del__ = lambda self : None; +DensityLowerThanUP1D_swigregister = _Freestyle.DensityLowerThanUP1D_swigregister +DensityLowerThanUP1D_swigregister(DensityLowerThanUP1D) + +class CurvePointIterator(Interface0DIteratorNested): + __swig_setmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, CurvePointIterator, name, value) + __swig_getmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, CurvePointIterator, name) + __repr__ = _swig_repr + __swig_setmethods__["_CurvilinearLength"] = _Freestyle.CurvePointIterator__CurvilinearLength_set + __swig_getmethods__["_CurvilinearLength"] = _Freestyle.CurvePointIterator__CurvilinearLength_get + if _newclass:_CurvilinearLength = _swig_property(_Freestyle.CurvePointIterator__CurvilinearLength_get, _Freestyle.CurvePointIterator__CurvilinearLength_set) + __swig_setmethods__["_step"] = _Freestyle.CurvePointIterator__step_set + __swig_getmethods__["_step"] = _Freestyle.CurvePointIterator__step_get + if _newclass:_step = _swig_property(_Freestyle.CurvePointIterator__step_get, _Freestyle.CurvePointIterator__step_set) + __swig_setmethods__["__A"] = _Freestyle.CurvePointIterator___A_set + __swig_getmethods__["__A"] = _Freestyle.CurvePointIterator___A_get + if _newclass:__A = _swig_property(_Freestyle.CurvePointIterator___A_get, _Freestyle.CurvePointIterator___A_set) + __swig_setmethods__["__B"] = _Freestyle.CurvePointIterator___B_set + __swig_getmethods__["__B"] = _Freestyle.CurvePointIterator___B_get + if _newclass:__B = _swig_property(_Freestyle.CurvePointIterator___B_get, _Freestyle.CurvePointIterator___B_set) + __swig_setmethods__["_begin"] = _Freestyle.CurvePointIterator__begin_set + __swig_getmethods__["_begin"] = _Freestyle.CurvePointIterator__begin_get + if _newclass:_begin = _swig_property(_Freestyle.CurvePointIterator__begin_get, _Freestyle.CurvePointIterator__begin_set) + __swig_setmethods__["_end"] = _Freestyle.CurvePointIterator__end_set + __swig_getmethods__["_end"] = _Freestyle.CurvePointIterator__end_get + if _newclass:_end = _swig_property(_Freestyle.CurvePointIterator__end_get, _Freestyle.CurvePointIterator__end_set) + __swig_setmethods__["_n"] = _Freestyle.CurvePointIterator__n_set + __swig_getmethods__["_n"] = _Freestyle.CurvePointIterator__n_get + if _newclass:_n = _swig_property(_Freestyle.CurvePointIterator__n_get, _Freestyle.CurvePointIterator__n_set) + __swig_setmethods__["_currentn"] = _Freestyle.CurvePointIterator__currentn_set + __swig_getmethods__["_currentn"] = _Freestyle.CurvePointIterator__currentn_get + if _newclass:_currentn = _swig_property(_Freestyle.CurvePointIterator__currentn_get, _Freestyle.CurvePointIterator__currentn_set) + __swig_setmethods__["_t"] = _Freestyle.CurvePointIterator__t_set + __swig_getmethods__["_t"] = _Freestyle.CurvePointIterator__t_get + if _newclass:_t = _swig_property(_Freestyle.CurvePointIterator__t_get, _Freestyle.CurvePointIterator__t_set) + __swig_setmethods__["_Point"] = _Freestyle.CurvePointIterator__Point_set + __swig_getmethods__["_Point"] = _Freestyle.CurvePointIterator__Point_get + if _newclass:_Point = _swig_property(_Freestyle.CurvePointIterator__Point_get, _Freestyle.CurvePointIterator__Point_set) + __swig_setmethods__["_CurveLength"] = _Freestyle.CurvePointIterator__CurveLength_set + __swig_getmethods__["_CurveLength"] = _Freestyle.CurvePointIterator__CurveLength_get + if _newclass:_CurveLength = _swig_property(_Freestyle.CurvePointIterator__CurveLength_get, _Freestyle.CurvePointIterator__CurveLength_set) + def __init__(self, *args): + this = _Freestyle.new_CurvePointIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_CurvePointIterator + __del__ = lambda self : None; + def copy(*args): return _Freestyle.CurvePointIterator_copy(*args) + def CastToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_CastToInterface0DIterator(*args) + def getExactTypeName(*args): return _Freestyle.CurvePointIterator_getExactTypeName(*args) + def __eq__(*args): return _Freestyle.CurvePointIterator___eq__(*args) + def getObject(*args): return _Freestyle.CurvePointIterator_getObject(*args) + def __deref__(*args): return _Freestyle.CurvePointIterator___deref__(*args) + def isBegin(*args): return _Freestyle.CurvePointIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.CurvePointIterator_isEnd(*args) + def getX(*args): return _Freestyle.CurvePointIterator_getX(*args) + def getY(*args): return _Freestyle.CurvePointIterator_getY(*args) + def getZ(*args): return _Freestyle.CurvePointIterator_getZ(*args) + def getPoint3D(*args): return _Freestyle.CurvePointIterator_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.CurvePointIterator_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.CurvePointIterator_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.CurvePointIterator_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.CurvePointIterator_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.CurvePointIterator_getFEdge(*args) + def getId(*args): return _Freestyle.CurvePointIterator_getId(*args) + def getNature(*args): return _Freestyle.CurvePointIterator_getNature(*args) + def castToSVertex(*args): return _Freestyle.CurvePointIterator_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.CurvePointIterator_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.CurvePointIterator_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.CurvePointIterator_castToTVertex(*args) + def A(*args): return _Freestyle.CurvePointIterator_A(*args) + def B(*args): return _Freestyle.CurvePointIterator_B(*args) + def t2d(*args): return _Freestyle.CurvePointIterator_t2d(*args) + def SetA(*args): return _Freestyle.CurvePointIterator_SetA(*args) + def SetB(*args): return _Freestyle.CurvePointIterator_SetB(*args) + def SetT2d(*args): return _Freestyle.CurvePointIterator_SetT2d(*args) + def fedge(*args): return _Freestyle.CurvePointIterator_fedge(*args) + def point2d(*args): return _Freestyle.CurvePointIterator_point2d(*args) + def point3d(*args): return _Freestyle.CurvePointIterator_point3d(*args) + def normal(*args): return _Freestyle.CurvePointIterator_normal(*args) + def shape(*args): return _Freestyle.CurvePointIterator_shape(*args) + def occluders_begin(*args): return _Freestyle.CurvePointIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.CurvePointIterator_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.CurvePointIterator_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.CurvePointIterator_occluders_size(*args) + def occludee(*args): return _Freestyle.CurvePointIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.CurvePointIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.CurvePointIterator_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.CurvePointIterator_z_discontinuity(*args) + def curvatureFredo(*args): return _Freestyle.CurvePointIterator_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.CurvePointIterator_directionFredo(*args) +CurvePointIterator_swigregister = _Freestyle.CurvePointIterator_swigregister +CurvePointIterator_swigregister(CurvePointIterator) + +class CurvePoint(Interface0D): + __swig_setmethods__ = {} + for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, CurvePoint, name, value) + __swig_getmethods__ = {} + for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, CurvePoint, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.CurvePoint_getExactTypeName(*args) + def getX(*args): return _Freestyle.CurvePoint_getX(*args) + def getY(*args): return _Freestyle.CurvePoint_getY(*args) + def getZ(*args): return _Freestyle.CurvePoint_getZ(*args) + def getPoint3D(*args): return _Freestyle.CurvePoint_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.CurvePoint_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.CurvePoint_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.CurvePoint_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.CurvePoint_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.CurvePoint_getFEdge(*args) + def getId(*args): return _Freestyle.CurvePoint_getId(*args) + def getNature(*args): return _Freestyle.CurvePoint_getNature(*args) + def castToSVertex(*args): return _Freestyle.CurvePoint_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.CurvePoint_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.CurvePoint_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.CurvePoint_castToTVertex(*args) + def __init__(self, *args): + this = _Freestyle.new_CurvePoint(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_CurvePoint + __del__ = lambda self : None; + def __eq__(*args): return _Freestyle.CurvePoint___eq__(*args) + def A(*args): return _Freestyle.CurvePoint_A(*args) + def B(*args): return _Freestyle.CurvePoint_B(*args) + def t2d(*args): return _Freestyle.CurvePoint_t2d(*args) + def SetA(*args): return _Freestyle.CurvePoint_SetA(*args) + def SetB(*args): return _Freestyle.CurvePoint_SetB(*args) + def SetT2d(*args): return _Freestyle.CurvePoint_SetT2d(*args) + def fedge(*args): return _Freestyle.CurvePoint_fedge(*args) + def point2d(*args): return _Freestyle.CurvePoint_point2d(*args) + def point3d(*args): return _Freestyle.CurvePoint_point3d(*args) + def normal(*args): return _Freestyle.CurvePoint_normal(*args) + def shape(*args): return _Freestyle.CurvePoint_shape(*args) + def occluders_begin(*args): return _Freestyle.CurvePoint_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.CurvePoint_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.CurvePoint_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.CurvePoint_occluders_size(*args) + def occludee(*args): return _Freestyle.CurvePoint_occludee(*args) + def occluded_shape(*args): return _Freestyle.CurvePoint_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.CurvePoint_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.CurvePoint_z_discontinuity(*args) + def curvatureFredo(*args): return _Freestyle.CurvePoint_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.CurvePoint_directionFredo(*args) +CurvePoint_swigregister = _Freestyle.CurvePoint_swigregister +CurvePoint_swigregister(CurvePoint) + +class Curve(Interface1D): + __swig_setmethods__ = {} + for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Curve, name, value) + __swig_getmethods__ = {} + for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Curve, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Curve(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Curve + __del__ = lambda self : None; + def computeCurvatureAndOrientation(*args): return _Freestyle.Curve_computeCurvatureAndOrientation(*args) + def push_vertex_back(*args): return _Freestyle.Curve_push_vertex_back(*args) + def push_vertex_front(*args): return _Freestyle.Curve_push_vertex_front(*args) + def empty(*args): return _Freestyle.Curve_empty(*args) + def getLength2D(*args): return _Freestyle.Curve_getLength2D(*args) + def getId(*args): return _Freestyle.Curve_getId(*args) + def nSegments(*args): return _Freestyle.Curve_nSegments(*args) + def setId(*args): return _Freestyle.Curve_setId(*args) + def curvePointsBegin(*args): return _Freestyle.Curve_curvePointsBegin(*args) + def curvePointsEnd(*args): return _Freestyle.Curve_curvePointsEnd(*args) + def curveVerticesBegin(*args): return _Freestyle.Curve_curveVerticesBegin(*args) + def curveVerticesEnd(*args): return _Freestyle.Curve_curveVerticesEnd(*args) + def verticesBegin(*args): return _Freestyle.Curve_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.Curve_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.Curve_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.Curve_pointsEnd(*args) +Curve_swigregister = _Freestyle.Curve_swigregister +Curve_swigregister(Curve) + +class StrokeVertexIterator(Interface0DIteratorNested): + __swig_setmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeVertexIterator, name, value) + __swig_getmethods__ = {} + for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, StrokeVertexIterator, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_StrokeVertexIterator(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_StrokeVertexIterator + __del__ = lambda self : None; + def castToInterface0DIterator(*args): return _Freestyle.StrokeVertexIterator_castToInterface0DIterator(*args) + def getExactTypeName(*args): return _Freestyle.StrokeVertexIterator_getExactTypeName(*args) + def getObject(*args): return _Freestyle.StrokeVertexIterator_getObject(*args) + def __deref__(*args): return _Freestyle.StrokeVertexIterator___deref__(*args) + def increment(*args): return _Freestyle.StrokeVertexIterator_increment(*args) + def decrement(*args): return _Freestyle.StrokeVertexIterator_decrement(*args) + def isBegin(*args): return _Freestyle.StrokeVertexIterator_isBegin(*args) + def isEnd(*args): return _Freestyle.StrokeVertexIterator_isEnd(*args) + def __eq__(*args): return _Freestyle.StrokeVertexIterator___eq__(*args) + def t(*args): return _Freestyle.StrokeVertexIterator_t(*args) + def u(*args): return _Freestyle.StrokeVertexIterator_u(*args) + def copy(*args): return _Freestyle.StrokeVertexIterator_copy(*args) + def getIt(*args): return _Freestyle.StrokeVertexIterator_getIt(*args) + def x(*args): return _Freestyle.StrokeVertexIterator_x(*args) + def y(*args): return _Freestyle.StrokeVertexIterator_y(*args) + def getPoint(*args): return _Freestyle.StrokeVertexIterator_getPoint(*args) + def attribute(*args): return _Freestyle.StrokeVertexIterator_attribute(*args) + def curvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_curvilinearAbscissa(*args) + def strokeLength(*args): return _Freestyle.StrokeVertexIterator_strokeLength(*args) + def SetX(*args): return _Freestyle.StrokeVertexIterator_SetX(*args) + def SetY(*args): return _Freestyle.StrokeVertexIterator_SetY(*args) + def SetPoint(*args): return _Freestyle.StrokeVertexIterator_SetPoint(*args) + def SetAttribute(*args): return _Freestyle.StrokeVertexIterator_SetAttribute(*args) + def SetCurvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_SetCurvilinearAbscissa(*args) + def SetStrokeLength(*args): return _Freestyle.StrokeVertexIterator_SetStrokeLength(*args) + def getX(*args): return _Freestyle.StrokeVertexIterator_getX(*args) + def getY(*args): return _Freestyle.StrokeVertexIterator_getY(*args) + def getZ(*args): return _Freestyle.StrokeVertexIterator_getZ(*args) + def getPoint3D(*args): return _Freestyle.StrokeVertexIterator_getPoint3D(*args) + def getProjectedX(*args): return _Freestyle.StrokeVertexIterator_getProjectedX(*args) + def getProjectedY(*args): return _Freestyle.StrokeVertexIterator_getProjectedY(*args) + def getProjectedZ(*args): return _Freestyle.StrokeVertexIterator_getProjectedZ(*args) + def getPoint2D(*args): return _Freestyle.StrokeVertexIterator_getPoint2D(*args) + def getFEdge(*args): return _Freestyle.StrokeVertexIterator_getFEdge(*args) + def getId(*args): return _Freestyle.StrokeVertexIterator_getId(*args) + def getNature(*args): return _Freestyle.StrokeVertexIterator_getNature(*args) + def castToSVertex(*args): return _Freestyle.StrokeVertexIterator_castToSVertex(*args) + def castToViewVertex(*args): return _Freestyle.StrokeVertexIterator_castToViewVertex(*args) + def castToNonTVertex(*args): return _Freestyle.StrokeVertexIterator_castToNonTVertex(*args) + def castToTVertex(*args): return _Freestyle.StrokeVertexIterator_castToTVertex(*args) + def A(*args): return _Freestyle.StrokeVertexIterator_A(*args) + def B(*args): return _Freestyle.StrokeVertexIterator_B(*args) + def t2d(*args): return _Freestyle.StrokeVertexIterator_t2d(*args) + def SetA(*args): return _Freestyle.StrokeVertexIterator_SetA(*args) + def SetB(*args): return _Freestyle.StrokeVertexIterator_SetB(*args) + def SetT2d(*args): return _Freestyle.StrokeVertexIterator_SetT2d(*args) + def fedge(*args): return _Freestyle.StrokeVertexIterator_fedge(*args) + def point2d(*args): return _Freestyle.StrokeVertexIterator_point2d(*args) + def point3d(*args): return _Freestyle.StrokeVertexIterator_point3d(*args) + def normal(*args): return _Freestyle.StrokeVertexIterator_normal(*args) + def shape(*args): return _Freestyle.StrokeVertexIterator_shape(*args) + def occluders_begin(*args): return _Freestyle.StrokeVertexIterator_occluders_begin(*args) + def occluders_end(*args): return _Freestyle.StrokeVertexIterator_occluders_end(*args) + def occluders_empty(*args): return _Freestyle.StrokeVertexIterator_occluders_empty(*args) + def occluders_size(*args): return _Freestyle.StrokeVertexIterator_occluders_size(*args) + def occludee(*args): return _Freestyle.StrokeVertexIterator_occludee(*args) + def occluded_shape(*args): return _Freestyle.StrokeVertexIterator_occluded_shape(*args) + def occludee_empty(*args): return _Freestyle.StrokeVertexIterator_occludee_empty(*args) + def z_discontinuity(*args): return _Freestyle.StrokeVertexIterator_z_discontinuity(*args) + def curvatureFredo(*args): return _Freestyle.StrokeVertexIterator_curvatureFredo(*args) + def directionFredo(*args): return _Freestyle.StrokeVertexIterator_directionFredo(*args) +StrokeVertexIterator_swigregister = _Freestyle.StrokeVertexIterator_swigregister +StrokeVertexIterator_swigregister(StrokeVertexIterator) + +class StrokeAttribute(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeAttribute, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, StrokeAttribute, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_StrokeAttribute(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_StrokeAttribute + __del__ = lambda self : None; + def getColor(*args): return _Freestyle.StrokeAttribute_getColor(*args) + def getColorR(*args): return _Freestyle.StrokeAttribute_getColorR(*args) + def getColorG(*args): return _Freestyle.StrokeAttribute_getColorG(*args) + def getColorB(*args): return _Freestyle.StrokeAttribute_getColorB(*args) + def getColorRGB(*args): return _Freestyle.StrokeAttribute_getColorRGB(*args) + def getAlpha(*args): return _Freestyle.StrokeAttribute_getAlpha(*args) + def getThickness(*args): return _Freestyle.StrokeAttribute_getThickness(*args) + def getThicknessR(*args): return _Freestyle.StrokeAttribute_getThicknessR(*args) + def getThicknessL(*args): return _Freestyle.StrokeAttribute_getThicknessL(*args) + def getThicknessRL(*args): return _Freestyle.StrokeAttribute_getThicknessRL(*args) + def isVisible(*args): return _Freestyle.StrokeAttribute_isVisible(*args) + def getAttributeReal(*args): return _Freestyle.StrokeAttribute_getAttributeReal(*args) + def getAttributeVec2f(*args): return _Freestyle.StrokeAttribute_getAttributeVec2f(*args) + def getAttributeVec3f(*args): return _Freestyle.StrokeAttribute_getAttributeVec3f(*args) + def isAttributeAvailableReal(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableReal(*args) + def isAttributeAvailableVec2f(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableVec2f(*args) + def isAttributeAvailableVec3f(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableVec3f(*args) + def setColor(*args): return _Freestyle.StrokeAttribute_setColor(*args) + def setAlpha(*args): return _Freestyle.StrokeAttribute_setAlpha(*args) + def setThickness(*args): return _Freestyle.StrokeAttribute_setThickness(*args) + def SetVisible(*args): return _Freestyle.StrokeAttribute_SetVisible(*args) + def setAttributeReal(*args): return _Freestyle.StrokeAttribute_setAttributeReal(*args) + def setAttributeVec2f(*args): return _Freestyle.StrokeAttribute_setAttributeVec2f(*args) + def setAttributeVec3f(*args): return _Freestyle.StrokeAttribute_setAttributeVec3f(*args) +StrokeAttribute_swigregister = _Freestyle.StrokeAttribute_swigregister +StrokeAttribute_swigregister(StrokeAttribute) + +class StrokeVertex(CurvePoint): + __swig_setmethods__ = {} + for _s in [CurvePoint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeVertex, name, value) + __swig_getmethods__ = {} + for _s in [CurvePoint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, StrokeVertex, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.StrokeVertex_getExactTypeName(*args) + def __init__(self, *args): + this = _Freestyle.new_StrokeVertex(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_StrokeVertex + __del__ = lambda self : None; + def x(*args): return _Freestyle.StrokeVertex_x(*args) + def y(*args): return _Freestyle.StrokeVertex_y(*args) + def getPoint(*args): return _Freestyle.StrokeVertex_getPoint(*args) + def attribute(*args): return _Freestyle.StrokeVertex_attribute(*args) + def curvilinearAbscissa(*args): return _Freestyle.StrokeVertex_curvilinearAbscissa(*args) + def strokeLength(*args): return _Freestyle.StrokeVertex_strokeLength(*args) + def u(*args): return _Freestyle.StrokeVertex_u(*args) + def SetX(*args): return _Freestyle.StrokeVertex_SetX(*args) + def SetY(*args): return _Freestyle.StrokeVertex_SetY(*args) + def SetPoint(*args): return _Freestyle.StrokeVertex_SetPoint(*args) + def SetAttribute(*args): return _Freestyle.StrokeVertex_SetAttribute(*args) + def SetCurvilinearAbscissa(*args): return _Freestyle.StrokeVertex_SetCurvilinearAbscissa(*args) + def SetStrokeLength(*args): return _Freestyle.StrokeVertex_SetStrokeLength(*args) +StrokeVertex_swigregister = _Freestyle.StrokeVertex_swigregister +StrokeVertex_swigregister(StrokeVertex) + +class Stroke(Interface1D): + __swig_setmethods__ = {} + for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Stroke, name, value) + __swig_getmethods__ = {} + for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Stroke, name) + __repr__ = _swig_repr + def getExactTypeName(*args): return _Freestyle.Stroke_getExactTypeName(*args) + def getId(*args): return _Freestyle.Stroke_getId(*args) + DRY_MEDIUM = _Freestyle.Stroke_DRY_MEDIUM + HUMID_MEDIUM = _Freestyle.Stroke_HUMID_MEDIUM + OPAQUE_MEDIUM = _Freestyle.Stroke_OPAQUE_MEDIUM + def __init__(self, *args): + this = _Freestyle.new_Stroke(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Stroke + __del__ = lambda self : None; + def ComputeSampling(*args): return _Freestyle.Stroke_ComputeSampling(*args) + def Resample(*args): return _Freestyle.Stroke_Resample(*args) + def RemoveVertex(*args): return _Freestyle.Stroke_RemoveVertex(*args) + def InsertVertex(*args): return _Freestyle.Stroke_InsertVertex(*args) + def Render(*args): return _Freestyle.Stroke_Render(*args) + def RenderBasic(*args): return _Freestyle.Stroke_RenderBasic(*args) + def getLength2D(*args): return _Freestyle.Stroke_getLength2D(*args) + def getMediumType(*args): return _Freestyle.Stroke_getMediumType(*args) + def getTextureId(*args): return _Freestyle.Stroke_getTextureId(*args) + def hasTips(*args): return _Freestyle.Stroke_hasTips(*args) + def vertices_size(*args): return _Freestyle.Stroke_vertices_size(*args) + def viewedges_begin(*args): return _Freestyle.Stroke_viewedges_begin(*args) + def viewedges_end(*args): return _Freestyle.Stroke_viewedges_end(*args) + def viewedges_size(*args): return _Freestyle.Stroke_viewedges_size(*args) + def getBeginningOrientation(*args): return _Freestyle.Stroke_getBeginningOrientation(*args) + def getBeginningOrientationX(*args): return _Freestyle.Stroke_getBeginningOrientationX(*args) + def getBeginningOrientationY(*args): return _Freestyle.Stroke_getBeginningOrientationY(*args) + def getEndingOrientation(*args): return _Freestyle.Stroke_getEndingOrientation(*args) + def getEndingOrientationX(*args): return _Freestyle.Stroke_getEndingOrientationX(*args) + def getEndingOrientationY(*args): return _Freestyle.Stroke_getEndingOrientationY(*args) + def SetId(*args): return _Freestyle.Stroke_SetId(*args) + def SetLength(*args): return _Freestyle.Stroke_SetLength(*args) + def SetMediumType(*args): return _Freestyle.Stroke_SetMediumType(*args) + def SetTextureId(*args): return _Freestyle.Stroke_SetTextureId(*args) + def SetTips(*args): return _Freestyle.Stroke_SetTips(*args) + def push_back(*args): return _Freestyle.Stroke_push_back(*args) + def push_front(*args): return _Freestyle.Stroke_push_front(*args) + def AddViewEdge(*args): return _Freestyle.Stroke_AddViewEdge(*args) + def SetBeginningOrientation(*args): return _Freestyle.Stroke_SetBeginningOrientation(*args) + def SetEndingOrientation(*args): return _Freestyle.Stroke_SetEndingOrientation(*args) + def strokeVerticesBegin(*args): return _Freestyle.Stroke_strokeVerticesBegin(*args) + def strokeVerticesEnd(*args): return _Freestyle.Stroke_strokeVerticesEnd(*args) + def strokeVerticesSize(*args): return _Freestyle.Stroke_strokeVerticesSize(*args) + def verticesBegin(*args): return _Freestyle.Stroke_verticesBegin(*args) + def verticesEnd(*args): return _Freestyle.Stroke_verticesEnd(*args) + def pointsBegin(*args): return _Freestyle.Stroke_pointsBegin(*args) + def pointsEnd(*args): return _Freestyle.Stroke_pointsEnd(*args) +Stroke_swigregister = _Freestyle.Stroke_swigregister +Stroke_swigregister(Stroke) + +class ShadersContainer(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ShadersContainer, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ShadersContainer, name) + __repr__ = _swig_repr + def iterator(*args): return _Freestyle.ShadersContainer_iterator(*args) + def __iter__(self): return self.iterator() + def __nonzero__(*args): return _Freestyle.ShadersContainer___nonzero__(*args) + def __len__(*args): return _Freestyle.ShadersContainer___len__(*args) + def pop(*args): return _Freestyle.ShadersContainer_pop(*args) + def __getslice__(*args): return _Freestyle.ShadersContainer___getslice__(*args) + def __setslice__(*args): return _Freestyle.ShadersContainer___setslice__(*args) + def __delslice__(*args): return _Freestyle.ShadersContainer___delslice__(*args) + def __delitem__(*args): return _Freestyle.ShadersContainer___delitem__(*args) + def __getitem__(*args): return _Freestyle.ShadersContainer___getitem__(*args) + def __setitem__(*args): return _Freestyle.ShadersContainer___setitem__(*args) + def append(*args): return _Freestyle.ShadersContainer_append(*args) + def empty(*args): return _Freestyle.ShadersContainer_empty(*args) + def size(*args): return _Freestyle.ShadersContainer_size(*args) + def clear(*args): return _Freestyle.ShadersContainer_clear(*args) + def swap(*args): return _Freestyle.ShadersContainer_swap(*args) + def get_allocator(*args): return _Freestyle.ShadersContainer_get_allocator(*args) + def begin(*args): return _Freestyle.ShadersContainer_begin(*args) + def end(*args): return _Freestyle.ShadersContainer_end(*args) + def rbegin(*args): return _Freestyle.ShadersContainer_rbegin(*args) + def rend(*args): return _Freestyle.ShadersContainer_rend(*args) + def pop_back(*args): return _Freestyle.ShadersContainer_pop_back(*args) + def erase(*args): return _Freestyle.ShadersContainer_erase(*args) + def __init__(self, *args): + this = _Freestyle.new_ShadersContainer(*args) + try: self.this.append(this) + except: self.this = this + def push_back(*args): return _Freestyle.ShadersContainer_push_back(*args) + def front(*args): return _Freestyle.ShadersContainer_front(*args) + def back(*args): return _Freestyle.ShadersContainer_back(*args) + def assign(*args): return _Freestyle.ShadersContainer_assign(*args) + def resize(*args): return _Freestyle.ShadersContainer_resize(*args) + def insert(*args): return _Freestyle.ShadersContainer_insert(*args) + def reserve(*args): return _Freestyle.ShadersContainer_reserve(*args) + def capacity(*args): return _Freestyle.ShadersContainer_capacity(*args) + __swig_destroy__ = _Freestyle.delete_ShadersContainer + __del__ = lambda self : None; +ShadersContainer_swigregister = _Freestyle.ShadersContainer_swigregister +ShadersContainer_swigregister(ShadersContainer) + +class StrokeShader(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeShader, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, StrokeShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + if self.__class__ == StrokeShader: + args = (None,) + args + else: + args = (self,) + args + this = _Freestyle.new_StrokeShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_StrokeShader + __del__ = lambda self : None; + def getName(*args): return _Freestyle.StrokeShader_getName(*args) + def shade(*args): return _Freestyle.StrokeShader_shade(*args) + def __disown__(self): + self.this.disown() + _Freestyle.disown_StrokeShader(self) + return weakref_proxy(self) +StrokeShader_swigregister = _Freestyle.StrokeShader_swigregister +StrokeShader_swigregister(StrokeShader) + +class ConstantThicknessShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantThicknessShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ConstantThicknessShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ConstantThicknessShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ConstantThicknessShader + __del__ = lambda self : None; + def getName(*args): return _Freestyle.ConstantThicknessShader_getName(*args) + def shade(*args): return _Freestyle.ConstantThicknessShader_shade(*args) +ConstantThicknessShader_swigregister = _Freestyle.ConstantThicknessShader_swigregister +ConstantThicknessShader_swigregister(ConstantThicknessShader) + +class ConstantExternThicknessShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantExternThicknessShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ConstantExternThicknessShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ConstantExternThicknessShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ConstantExternThicknessShader + __del__ = lambda self : None; + def getName(*args): return _Freestyle.ConstantExternThicknessShader_getName(*args) + def shade(*args): return _Freestyle.ConstantExternThicknessShader_shade(*args) +ConstantExternThicknessShader_swigregister = _Freestyle.ConstantExternThicknessShader_swigregister +ConstantExternThicknessShader_swigregister(ConstantExternThicknessShader) + +class IncreasingThicknessShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, IncreasingThicknessShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, IncreasingThicknessShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_IncreasingThicknessShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_IncreasingThicknessShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.IncreasingThicknessShader_shade(*args) +IncreasingThicknessShader_swigregister = _Freestyle.IncreasingThicknessShader_swigregister +IncreasingThicknessShader_swigregister(IncreasingThicknessShader) + +class ConstrainedIncreasingThicknessShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ConstrainedIncreasingThicknessShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ConstrainedIncreasingThicknessShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ConstrainedIncreasingThicknessShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ConstrainedIncreasingThicknessShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.ConstrainedIncreasingThicknessShader_shade(*args) +ConstrainedIncreasingThicknessShader_swigregister = _Freestyle.ConstrainedIncreasingThicknessShader_swigregister +ConstrainedIncreasingThicknessShader_swigregister(ConstrainedIncreasingThicknessShader) + +class LengthDependingThicknessShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, LengthDependingThicknessShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, LengthDependingThicknessShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_LengthDependingThicknessShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_LengthDependingThicknessShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.LengthDependingThicknessShader_shade(*args) +LengthDependingThicknessShader_swigregister = _Freestyle.LengthDependingThicknessShader_swigregister +LengthDependingThicknessShader_swigregister(LengthDependingThicknessShader) + +class ThicknessVariationPatternShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ThicknessVariationPatternShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ThicknessVariationPatternShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ThicknessVariationPatternShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ThicknessVariationPatternShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.ThicknessVariationPatternShader_shade(*args) +ThicknessVariationPatternShader_swigregister = _Freestyle.ThicknessVariationPatternShader_swigregister +ThicknessVariationPatternShader_swigregister(ThicknessVariationPatternShader) + +class ThicknessNoiseShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ThicknessNoiseShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ThicknessNoiseShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ThicknessNoiseShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.ThicknessNoiseShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_ThicknessNoiseShader + __del__ = lambda self : None; +ThicknessNoiseShader_swigregister = _Freestyle.ThicknessNoiseShader_swigregister +ThicknessNoiseShader_swigregister(ThicknessNoiseShader) + +class ConstantColorShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantColorShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ConstantColorShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ConstantColorShader(*args) + try: self.this.append(this) + except: self.this = this + def getName(*args): return _Freestyle.ConstantColorShader_getName(*args) + def shade(*args): return _Freestyle.ConstantColorShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_ConstantColorShader + __del__ = lambda self : None; +ConstantColorShader_swigregister = _Freestyle.ConstantColorShader_swigregister +ConstantColorShader_swigregister(ConstantColorShader) + +class IncreasingColorShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, IncreasingColorShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, IncreasingColorShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_IncreasingColorShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.IncreasingColorShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_IncreasingColorShader + __del__ = lambda self : None; +IncreasingColorShader_swigregister = _Freestyle.IncreasingColorShader_swigregister +IncreasingColorShader_swigregister(IncreasingColorShader) + +class ColorVariationPatternShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ColorVariationPatternShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ColorVariationPatternShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ColorVariationPatternShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ColorVariationPatternShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.ColorVariationPatternShader_shade(*args) +ColorVariationPatternShader_swigregister = _Freestyle.ColorVariationPatternShader_swigregister +ColorVariationPatternShader_swigregister(ColorVariationPatternShader) + +class MaterialColorShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, MaterialColorShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, MaterialColorShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_MaterialColorShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.MaterialColorShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_MaterialColorShader + __del__ = lambda self : None; +MaterialColorShader_swigregister = _Freestyle.MaterialColorShader_swigregister +MaterialColorShader_swigregister(MaterialColorShader) + +class CalligraphicColorShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, CalligraphicColorShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, CalligraphicColorShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_CalligraphicColorShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.CalligraphicColorShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_CalligraphicColorShader + __del__ = lambda self : None; +CalligraphicColorShader_swigregister = _Freestyle.CalligraphicColorShader_swigregister +CalligraphicColorShader_swigregister(CalligraphicColorShader) + +class ColorNoiseShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ColorNoiseShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ColorNoiseShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ColorNoiseShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.ColorNoiseShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_ColorNoiseShader + __del__ = lambda self : None; +ColorNoiseShader_swigregister = _Freestyle.ColorNoiseShader_swigregister +ColorNoiseShader_swigregister(ColorNoiseShader) + +class TextureAssignerShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TextureAssignerShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TextureAssignerShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_TextureAssignerShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.TextureAssignerShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_TextureAssignerShader + __del__ = lambda self : None; +TextureAssignerShader_swigregister = _Freestyle.TextureAssignerShader_swigregister +TextureAssignerShader_swigregister(TextureAssignerShader) + +class StrokeTextureShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeTextureShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, StrokeTextureShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_StrokeTextureShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.StrokeTextureShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_StrokeTextureShader + __del__ = lambda self : None; +StrokeTextureShader_swigregister = _Freestyle.StrokeTextureShader_swigregister +StrokeTextureShader_swigregister(StrokeTextureShader) + +class BackboneStretcherShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, BackboneStretcherShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, BackboneStretcherShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_BackboneStretcherShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.BackboneStretcherShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_BackboneStretcherShader + __del__ = lambda self : None; +BackboneStretcherShader_swigregister = _Freestyle.BackboneStretcherShader_swigregister +BackboneStretcherShader_swigregister(BackboneStretcherShader) + +class SamplingShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, SamplingShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, SamplingShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_SamplingShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.SamplingShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_SamplingShader + __del__ = lambda self : None; +SamplingShader_swigregister = _Freestyle.SamplingShader_swigregister +SamplingShader_swigregister(SamplingShader) + +class ExternalContourStretcherShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, ExternalContourStretcherShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, ExternalContourStretcherShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_ExternalContourStretcherShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.ExternalContourStretcherShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_ExternalContourStretcherShader + __del__ = lambda self : None; +ExternalContourStretcherShader_swigregister = _Freestyle.ExternalContourStretcherShader_swigregister +ExternalContourStretcherShader_swigregister(ExternalContourStretcherShader) + +class BSplineShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, BSplineShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, BSplineShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_BSplineShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.BSplineShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_BSplineShader + __del__ = lambda self : None; +BSplineShader_swigregister = _Freestyle.BSplineShader_swigregister +BSplineShader_swigregister(BSplineShader) + +class BezierCurveShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, BezierCurveShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, BezierCurveShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_BezierCurveShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.BezierCurveShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_BezierCurveShader + __del__ = lambda self : None; +BezierCurveShader_swigregister = _Freestyle.BezierCurveShader_swigregister +BezierCurveShader_swigregister(BezierCurveShader) + +class InflateShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, InflateShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, InflateShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_InflateShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.InflateShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_InflateShader + __del__ = lambda self : None; +InflateShader_swigregister = _Freestyle.InflateShader_swigregister +InflateShader_swigregister(InflateShader) + +class PolygonalizationShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, PolygonalizationShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, PolygonalizationShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_PolygonalizationShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.PolygonalizationShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_PolygonalizationShader + __del__ = lambda self : None; +PolygonalizationShader_swigregister = _Freestyle.PolygonalizationShader_swigregister +PolygonalizationShader_swigregister(PolygonalizationShader) + +class GuidingLinesShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, GuidingLinesShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, GuidingLinesShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_GuidingLinesShader(*args) + try: self.this.append(this) + except: self.this = this + def shade(*args): return _Freestyle.GuidingLinesShader_shade(*args) + __swig_destroy__ = _Freestyle.delete_GuidingLinesShader + __del__ = lambda self : None; +GuidingLinesShader_swigregister = _Freestyle.GuidingLinesShader_swigregister +GuidingLinesShader_swigregister(GuidingLinesShader) + +class TipRemoverShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, TipRemoverShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, TipRemoverShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_TipRemoverShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_TipRemoverShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.TipRemoverShader_shade(*args) +TipRemoverShader_swigregister = _Freestyle.TipRemoverShader_swigregister +TipRemoverShader_swigregister(TipRemoverShader) + +class streamShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, streamShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, streamShader, name) + __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_streamShader + __del__ = lambda self : None; + def getName(*args): return _Freestyle.streamShader_getName(*args) + def shade(*args): return _Freestyle.streamShader_shade(*args) + def __init__(self, *args): + this = _Freestyle.new_streamShader(*args) + try: self.this.append(this) + except: self.this = this +streamShader_swigregister = _Freestyle.streamShader_swigregister +streamShader_swigregister(streamShader) + +class fstreamShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, fstreamShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, fstreamShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_fstreamShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_fstreamShader + __del__ = lambda self : None; + def getName(*args): return _Freestyle.fstreamShader_getName(*args) + def shade(*args): return _Freestyle.fstreamShader_shade(*args) +fstreamShader_swigregister = _Freestyle.fstreamShader_swigregister +fstreamShader_swigregister(fstreamShader) + +class CalligraphicShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, CalligraphicShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, CalligraphicShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_CalligraphicShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_CalligraphicShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.CalligraphicShader_shade(*args) +CalligraphicShader_swigregister = _Freestyle.CalligraphicShader_swigregister +CalligraphicShader_swigregister(CalligraphicShader) + +class SpatialNoiseShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, SpatialNoiseShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, SpatialNoiseShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_SpatialNoiseShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_SpatialNoiseShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.SpatialNoiseShader_shade(*args) +SpatialNoiseShader_swigregister = _Freestyle.SpatialNoiseShader_swigregister +SpatialNoiseShader_swigregister(SpatialNoiseShader) + +class SmoothingShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, SmoothingShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, SmoothingShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_SmoothingShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_SmoothingShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.SmoothingShader_shade(*args) +SmoothingShader_swigregister = _Freestyle.SmoothingShader_swigregister +SmoothingShader_swigregister(SmoothingShader) + +class Smoother(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Smoother, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Smoother, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Smoother(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Smoother + __del__ = lambda self : None; + def smooth(*args): return _Freestyle.Smoother_smooth(*args) + def computeCurvature(*args): return _Freestyle.Smoother_computeCurvature(*args) +Smoother_swigregister = _Freestyle.Smoother_swigregister +Smoother_swigregister(Smoother) + +class Omitter(Smoother): + __swig_setmethods__ = {} + for _s in [Smoother]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, Omitter, name, value) + __swig_getmethods__ = {} + for _s in [Smoother]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, Omitter, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Omitter(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_Omitter + __del__ = lambda self : None; + def omit(*args): return _Freestyle.Omitter_omit(*args) +Omitter_swigregister = _Freestyle.Omitter_swigregister +Omitter_swigregister(Omitter) + +class OmissionShader(StrokeShader): + __swig_setmethods__ = {} + for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) + __setattr__ = lambda self, name, value: _swig_setattr(self, OmissionShader, name, value) + __swig_getmethods__ = {} + for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) + __getattr__ = lambda self, name: _swig_getattr(self, OmissionShader, name) + __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_OmissionShader(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_OmissionShader + __del__ = lambda self : None; + def shade(*args): return _Freestyle.OmissionShader_shade(*args) +OmissionShader_swigregister = _Freestyle.OmissionShader_swigregister +OmissionShader_swigregister(OmissionShader) + +class Operators(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Operators, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Operators, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_getmethods__["select"] = lambda x: _Freestyle.Operators_select + if _newclass:select = staticmethod(_Freestyle.Operators_select) + __swig_getmethods__["chain"] = lambda x: _Freestyle.Operators_chain + if _newclass:chain = staticmethod(_Freestyle.Operators_chain) + __swig_getmethods__["bidirectionalChain"] = lambda x: _Freestyle.Operators_bidirectionalChain + if _newclass:bidirectionalChain = staticmethod(_Freestyle.Operators_bidirectionalChain) + __swig_getmethods__["sequentialSplit"] = lambda x: _Freestyle.Operators_sequentialSplit + if _newclass:sequentialSplit = staticmethod(_Freestyle.Operators_sequentialSplit) + __swig_getmethods__["recursiveSplit"] = lambda x: _Freestyle.Operators_recursiveSplit + if _newclass:recursiveSplit = staticmethod(_Freestyle.Operators_recursiveSplit) + __swig_getmethods__["sort"] = lambda x: _Freestyle.Operators_sort + if _newclass:sort = staticmethod(_Freestyle.Operators_sort) + __swig_getmethods__["create"] = lambda x: _Freestyle.Operators_create + if _newclass:create = staticmethod(_Freestyle.Operators_create) + __swig_getmethods__["getViewEdgeFromIndex"] = lambda x: _Freestyle.Operators_getViewEdgeFromIndex + if _newclass:getViewEdgeFromIndex = staticmethod(_Freestyle.Operators_getViewEdgeFromIndex) + __swig_getmethods__["getChainFromIndex"] = lambda x: _Freestyle.Operators_getChainFromIndex + if _newclass:getChainFromIndex = staticmethod(_Freestyle.Operators_getChainFromIndex) + __swig_getmethods__["getStrokeFromIndex"] = lambda x: _Freestyle.Operators_getStrokeFromIndex + if _newclass:getStrokeFromIndex = staticmethod(_Freestyle.Operators_getStrokeFromIndex) + __swig_getmethods__["getViewEdgesSize"] = lambda x: _Freestyle.Operators_getViewEdgesSize + if _newclass:getViewEdgesSize = staticmethod(_Freestyle.Operators_getViewEdgesSize) + __swig_getmethods__["getChainsSize"] = lambda x: _Freestyle.Operators_getChainsSize + if _newclass:getChainsSize = staticmethod(_Freestyle.Operators_getChainsSize) + __swig_getmethods__["getStrokesSize"] = lambda x: _Freestyle.Operators_getStrokesSize + if _newclass:getStrokesSize = staticmethod(_Freestyle.Operators_getStrokesSize) + __swig_destroy__ = _Freestyle.delete_Operators + __del__ = lambda self : None; +Operators_swigregister = _Freestyle.Operators_swigregister +Operators_swigregister(Operators) +Operators_select = _Freestyle.Operators_select +Operators_chain = _Freestyle.Operators_chain +Operators_bidirectionalChain = _Freestyle.Operators_bidirectionalChain +Operators_sequentialSplit = _Freestyle.Operators_sequentialSplit +Operators_recursiveSplit = _Freestyle.Operators_recursiveSplit +Operators_sort = _Freestyle.Operators_sort +Operators_create = _Freestyle.Operators_create +Operators_getViewEdgeFromIndex = _Freestyle.Operators_getViewEdgeFromIndex +Operators_getChainFromIndex = _Freestyle.Operators_getChainFromIndex +Operators_getStrokeFromIndex = _Freestyle.Operators_getStrokeFromIndex +Operators_getViewEdgesSize = _Freestyle.Operators_getViewEdgesSize +Operators_getChainsSize = _Freestyle.Operators_getChainsSize +Operators_getStrokesSize = _Freestyle.Operators_getStrokesSize + +class ltstr(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, ltstr, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, ltstr, name) + __repr__ = _swig_repr + def __call__(*args): return _Freestyle.ltstr___call__(*args) + def __init__(self, *args): + this = _Freestyle.new_ltstr(*args) + try: self.this.append(this) + except: self.this = this + __swig_destroy__ = _Freestyle.delete_ltstr + __del__ = lambda self : None; +ltstr_swigregister = _Freestyle.ltstr_swigregister +ltstr_swigregister(ltstr) + +class Canvas(_object): + __swig_setmethods__ = {} + __setattr__ = lambda self, name, value: _swig_setattr(self, Canvas, name, value) + __swig_getmethods__ = {} + __getattr__ = lambda self, name: _swig_getattr(self, Canvas, name) + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_getmethods__["getInstance"] = lambda x: _Freestyle.Canvas_getInstance + if _newclass:getInstance = staticmethod(_Freestyle.Canvas_getInstance) + NB_STEERABLE_VIEWMAP = _Freestyle.Canvas_NB_STEERABLE_VIEWMAP + __swig_destroy__ = _Freestyle.delete_Canvas + __del__ = lambda self : None; + def preDraw(*args): return _Freestyle.Canvas_preDraw(*args) + def Draw(*args): return _Freestyle.Canvas_Draw(*args) + def postDraw(*args): return _Freestyle.Canvas_postDraw(*args) + def Render(*args): return _Freestyle.Canvas_Render(*args) + def RenderBasic(*args): return _Freestyle.Canvas_RenderBasic(*args) + def RenderStroke(*args): return _Freestyle.Canvas_RenderStroke(*args) + def init(*args): return _Freestyle.Canvas_init(*args) + def Clear(*args): return _Freestyle.Canvas_Clear(*args) + def Erase(*args): return _Freestyle.Canvas_Erase(*args) + def readColorPixels(*args): return _Freestyle.Canvas_readColorPixels(*args) + def readDepthPixels(*args): return _Freestyle.Canvas_readDepthPixels(*args) + def update(*args): return _Freestyle.Canvas_update(*args) + def isEmpty(*args): return _Freestyle.Canvas_isEmpty(*args) + def loadMap(*args): return _Freestyle.Canvas_loadMap(*args) + def readMapPixel(*args): return _Freestyle.Canvas_readMapPixel(*args) + def loadSteerableViewMap(*args): return _Freestyle.Canvas_loadSteerableViewMap(*args) + def getSteerableViewMap(*args): return _Freestyle.Canvas_getSteerableViewMap(*args) + def selectedFEdge(*args): return _Freestyle.Canvas_selectedFEdge(*args) + def width(*args): return _Freestyle.Canvas_width(*args) + def height(*args): return _Freestyle.Canvas_height(*args) + def currentPaperTextureIndex(*args): return _Freestyle.Canvas_currentPaperTextureIndex(*args) + def scene3DBBox(*args): return _Freestyle.Canvas_scene3DBBox(*args) + def renderer(*args): return _Freestyle.Canvas_renderer(*args) + def getCurrentStyleModule(*args): return _Freestyle.Canvas_getCurrentStyleModule(*args) + def getRecordFlag(*args): return _Freestyle.Canvas_getRecordFlag(*args) + def SetSelectedFEdge(*args): return _Freestyle.Canvas_SetSelectedFEdge(*args) + def InsertStyleModule(*args): return _Freestyle.Canvas_InsertStyleModule(*args) + def RemoveStyleModule(*args): return _Freestyle.Canvas_RemoveStyleModule(*args) + def SwapStyleModules(*args): return _Freestyle.Canvas_SwapStyleModules(*args) + def ReplaceStyleModule(*args): return _Freestyle.Canvas_ReplaceStyleModule(*args) + def SetVisible(*args): return _Freestyle.Canvas_SetVisible(*args) + def AddLayer(*args): return _Freestyle.Canvas_AddLayer(*args) + def SetCurrentPaperTextureIndex(*args): return _Freestyle.Canvas_SetCurrentPaperTextureIndex(*args) + def changePaperTexture(*args): return _Freestyle.Canvas_changePaperTexture(*args) + def togglePaperTexture(*args): return _Freestyle.Canvas_togglePaperTexture(*args) + def resetModified(*args): return _Freestyle.Canvas_resetModified(*args) + def causalStyleModules(*args): return _Freestyle.Canvas_causalStyleModules(*args) + def setModified(*args): return _Freestyle.Canvas_setModified(*args) +Canvas_swigregister = _Freestyle.Canvas_swigregister +Canvas_swigregister(Canvas) +Canvas_getInstance = _Freestyle.Canvas_getInstance + +castToSVertex = _Freestyle.castToSVertex +castToViewVertex = _Freestyle.castToViewVertex +castToTVertex = _Freestyle.castToTVertex +castToCurvePoint = _Freestyle.castToCurvePoint +castToStrokeVertex = _Freestyle.castToStrokeVertex +castToNonTVertex = _Freestyle.castToNonTVertex +castToFEdge = _Freestyle.castToFEdge +castToViewEdge = _Freestyle.castToViewEdge +castToStroke = _Freestyle.castToStroke +castToChain = _Freestyle.castToChain + + From 7f6fc12d8c348689774b4f681728174db62d3abb Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 25 May 2008 21:05:13 +0000 Subject: [PATCH 110/430] Bug fix in X-Mirror for armatures When a bone in a mirrored chain wasn't named properly, it would leave the head or tail in an invalid state. Now it applies the mirror to connected joints that are mirrored. --- source/blender/src/editarmature.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 172e06f5add..c166a9df762 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -4097,16 +4097,34 @@ void transform_armature_mirror_update(void) if (eboflip) { /* we assume X-axis flipping for now */ if (ebo->flag & BONE_TIPSEL) { + EditBone *children; + eboflip->tail[0]= -ebo->tail[0]; eboflip->tail[1]= ebo->tail[1]; eboflip->tail[2]= ebo->tail[2]; eboflip->rad_tail= ebo->rad_tail; + + /* Also move connected children, in case children's name aren't mirrored properly */ + for (children=G.edbo.first; children; children=children->next) { + if (children->parent == eboflip && children->flag & BONE_CONNECTED) { + VECCOPY(children->head, eboflip->tail); + children->rad_head = ebo->rad_tail; + } + } } if (ebo->flag & BONE_ROOTSEL) { eboflip->head[0]= -ebo->head[0]; eboflip->head[1]= ebo->head[1]; eboflip->head[2]= ebo->head[2]; eboflip->rad_head= ebo->rad_head; + + /* Also move connected parent, in case parent's name isn't mirrored properly */ + if (eboflip->parent && eboflip->flag & BONE_CONNECTED) + { + EditBone *parent = eboflip->parent; + VECCOPY(parent->tail, eboflip->head); + parent->rad_tail = ebo->rad_head; + } } if (ebo->flag & BONE_SELECTED) { eboflip->dist= ebo->dist; From 5263021aa8608252a6db44208f2bee89bdc7e4de Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Sun, 25 May 2008 21:11:34 +0000 Subject: [PATCH 111/430] Commit patch #9059 by gsrb3d Unnecesary include path in Makefile. --- source/blender/nodes/intern/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/blender/nodes/intern/Makefile b/source/blender/nodes/intern/Makefile index 12b3616df25..7cf2411ed84 100644 --- a/source/blender/nodes/intern/Makefile +++ b/source/blender/nodes/intern/Makefile @@ -35,8 +35,6 @@ include nan_compile.mk CFLAGS += $(LEVEL_1_C_WARNINGS) -CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) -CPPFLAGS += -I../../python CPPFLAGS += -I../../blenkernel CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include CPPFLAGS += -I../../makesdna From b7c6da39aedecb59b01ba8f833a8dc61afa89903 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 May 2008 23:05:13 +0000 Subject: [PATCH 112/430] the last selected nurbs curve lastnu could become an invalid pointer in places, access this via functions now and store an index rather then a pointer so if it becomes invalid it will just return a NULL pointer. --- source/blender/include/BDR_editcurve.h | 3 ++ source/blender/src/buttons_editing.c | 11 +++-- source/blender/src/editcurve.c | 66 +++++++++++++++----------- 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/source/blender/include/BDR_editcurve.h b/source/blender/include/BDR_editcurve.h index 9e25550ce04..4604359fcc9 100644 --- a/source/blender/include/BDR_editcurve.h +++ b/source/blender/include/BDR_editcurve.h @@ -37,6 +37,9 @@ struct BezTriple; struct BPoint; struct BezTripleNurb; +void set_actNurb(struct Nurb *nu); +struct Nurb * get_actNurb( void ); + short isNurbsel(struct Nurb *nu); int isNurbsel_count(struct Nurb *nu); void printknots(void); diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 592a8c1b7aa..8a37f713164 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -3071,7 +3071,6 @@ static void editing_panel_font_type(Object *ob, Curve *cu) void do_curvebuts(unsigned short event) { - extern Nurb *lastnu; extern ListBase editNurb; /* from editcurve */ Object *ob; Curve *cu; @@ -3147,7 +3146,7 @@ void do_curvebuts(unsigned short event) break; case B_SETORDER: if(G.obedit) { - nu= lastnu; + nu= get_actNurb(); if(nu && (nu->type & 7)==CU_NURBS ) { if(nu->orderu>nu->pntsu) { nu->orderu= nu->pntsu; @@ -3273,7 +3272,6 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu) { Nurb *nu; extern ListBase editNurb; /* from editcurve */ - extern Nurb *lastnu; uiBlock *block; short *sp; @@ -3309,8 +3307,11 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu) uiBlockEndAlign(block); if(ob==G.obedit) { - nu= lastnu; - if(nu==NULL) nu= lastnu= editNurb.first; + nu= get_actNurb(); + if(nu==NULL && editNurb.first) { + nu= editNurb.first; + set_actNurb(nu); + } if(nu) { if (ob->type==OB_CURVE) { uiDefBut(block, LABEL, 0, "Tilt", diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index 7572391b383..7f9ba2cb8d2 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -99,7 +99,7 @@ ListBase editNurb; BPoint *lastselbp; -Nurb *lastnu; /* for selected */ +int actnu; /* for selected */ /* void freeNurblist(ListBase *lb); already declared in the kernel */ @@ -109,6 +109,23 @@ float nurbcircle[8][2]= { {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0} }; + +/* this replaces the active flag used in uv/face mode */ +void set_actNurb(Nurb *nu) +{ + if (nu==NULL) { + actnu = -1; + } else { + actnu = BLI_findindex(&editNurb, nu); + } +} + +Nurb * get_actNurb( void ) +{ + return BLI_findlink(&editNurb, actnu); +} + + /* ******************* SELECTION FUNCTIONS ********************* */ /* returns 1 in case (de)selection was successful */ @@ -325,7 +342,7 @@ void load_editNurb() } - lastnu= NULL; /* for selected */ + set_actNurb(NULL); } void make_editNurb() @@ -361,8 +378,7 @@ void make_editNurb() else G.obedit= NULL; countall(); - - lastnu= NULL; /* for selected */ + set_actNurb(NULL); } void remake_editNurb() @@ -457,8 +473,7 @@ void separate_nurb() countall(); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); - - lastnu= NULL; /* for selected */ + set_actNurb(NULL); } /* ******************* FLAGS ********************* */ @@ -640,7 +655,7 @@ void deleteflagNurb(short flag) } if(a==0) { BLI_remlink(&editNurb, nu); - freeNurb(nu); + freeNurb(nu); nu=NULL; } else { /* is nurb in U direction selected */ @@ -878,7 +893,7 @@ void adduplicateflagNurb(short flag) newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN"); memcpy(newnu, nu, sizeof(Nurb)); BLI_addtail(&editNurb, newnu); - lastnu= newnu; + set_actNurb(newnu); newnu->pntsu= enda-starta+1; newnu->bezt= (BezTriple*)MEM_mallocN((enda - starta + 1) * sizeof(BezTriple), "adduplicateN"); @@ -913,7 +928,7 @@ void adduplicateflagNurb(short flag) if(enda>=starta) { newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN3"); memcpy(newnu, nu, sizeof(Nurb)); - lastnu= newnu; + set_actNurb(newnu); BLI_addtail(&editNurb, newnu); newnu->pntsu= enda-starta+1; newnu->bp = (BPoint*)MEM_mallocN((enda-starta+1) * sizeof(BPoint), "adduplicateN4"); @@ -971,7 +986,7 @@ void adduplicateflagNurb(short flag) newnu = (Nurb*)MEM_mallocN(sizeof(Nurb), "adduplicateN5"); memcpy(newnu, nu, sizeof(Nurb)); BLI_addtail(&editNurb, newnu); - lastnu= newnu; + set_actNurb(newnu); newnu->pntsu= newu; newnu->pntsv= newv; newnu->bp = @@ -1015,7 +1030,7 @@ void adduplicateflagNurb(short flag) nu= nu->prev; } - /* lastnu changed */ + /* actnu changed */ allqueue(REDRAWBUTSEDIT, 0); } @@ -2481,7 +2496,7 @@ void merge_nurb() BLI_freelistN(&nsortbase); countall(); - lastnu= NULL; + set_actNurb(NULL); DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); @@ -2594,7 +2609,7 @@ void addsegment_nurb() nu1->bezt= bezt; nu1->pntsu+= nu2->pntsu; BLI_remlink(&editNurb, nu2); - freeNurb(nu2); + freeNurb(nu2); nu2= NULL; calchandlesNurb(nu1); } else { @@ -2632,11 +2647,11 @@ void addsegment_nurb() } } } - freeNurb(nu2); + freeNurb(nu2); nu2= NULL; } } - lastnu= NULL; /* for selected */ + set_actNurb(NULL); /* for selected */ DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); @@ -2704,8 +2719,8 @@ void mouse_nurb() rightmouse_transform(); - if(nu!=lastnu) { - lastnu= nu; + if(nu!=get_actNurb()) { + set_actNurb(nu); allqueue(REDRAWBUTSEDIT, 0); } @@ -3638,7 +3653,7 @@ void delNurb() } if(a==0) { BLI_remlink(&editNurb, nu); - freeNurb(nu); + freeNurb(nu); nu= NULL; } } } @@ -3654,13 +3669,13 @@ void delNurb() } if(a==0) { BLI_remlink(&editNurb, nu); - freeNurb(nu); + freeNurb(nu); nu= NULL; } } } /* Never allow the order to exceed the number of points */ - if ((nu->type & 7)==CU_NURBS && (nu->pntsu < nu->orderu)) { + if ((nu!= NULL) && ((nu->type & 7)==CU_NURBS) && (nu->pntsu < nu->orderu)) { nu->orderu = nu->pntsu; } nu= next; @@ -3790,7 +3805,7 @@ void delNurb() if(bezt1) { if(nu1->pntsu==2) { /* remove completely */ BLI_remlink(&editNurb, nu); - freeNurb(nu); + freeNurb(nu); nu = NULL; } else if(nu1->flagu & 1) { /* cyclic */ bezt = @@ -3832,7 +3847,7 @@ void delNurb() else if(bp1) { if(nu1->pntsu==2) { /* remove completely */ BLI_remlink(&editNurb, nu); - freeNurb(nu); + freeNurb(nu); nu= NULL; } else if(nu1->flagu & 1) { /* cyclic */ bp = @@ -4592,10 +4607,6 @@ static void undoCurve_to_editCurve(void *lbv) { ListBase *lb= lbv; Nurb *nu, *newnu; - int nr, lastnunr= 0; - - /* we try to restore lastnu too, for buttons */ - for(nu= editNurb.first; nu; nu = nu->next, lastnunr++) if(nu==lastnu) break; freeNurblist(&editNurb); @@ -4604,9 +4615,6 @@ static void undoCurve_to_editCurve(void *lbv) newnu= duplicateNurb(nu); BLI_addtail(&editNurb, newnu); } - /* restore */ - for(nr=0, lastnu= editNurb.first; lastnu; lastnu = lastnu->next, nr++) if(nr==lastnunr) break; - } static void *editCurve_to_undoCurve(void) From cb378cbceb22ca95b4e60e46208bd1922641f00b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 26 May 2008 09:39:32 +0000 Subject: [PATCH 113/430] -= Cloth =- 1. Fix selfcollisions (reported by nudelZ) --- source/blender/blenkernel/intern/cloth.c | 11 +- source/blender/blenkernel/intern/collision.c | 697 +++++++++++-------- 2 files changed, 424 insertions(+), 284 deletions(-) diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 55d89e5f0dd..4fb8eeda78d 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -499,15 +499,15 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul Mat4MulVecfl(ob->obmat, verts->xconst); } - tstart(); + // tstart(); /* call the solver. */ if(solvers [clmd->sim_parms->solver_type].solver) - ret = solvers[clmd->sim_parms->solver_type].solver(ob, framenr, clmd, effectors); + BENCH(ret = solvers[clmd->sim_parms->solver_type].solver(ob, framenr, clmd, effectors)); - tend(); + // tend(); - printf ( "Cloth simulation time: %f\n", ( float ) tval() ); + // printf ( "Cloth simulation time: %f\n", ( float ) tval() ); return ret; } @@ -969,7 +969,6 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d // has to be happen before springs are build! cloth_apply_vgroup (clmd, dm); - if ( !cloth_build_springs ( clmd, dm ) ) { cloth_free_modifier ( ob, clmd ); @@ -994,7 +993,7 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d if(!first) implicit_set_positions(clmd); - BENCH(clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon )); + clmd->clothObject->bvhtree = bvhtree_build_from_cloth ( clmd, clmd->coll_parms->epsilon ); for(i = 0; i < dm->getNumVerts(dm); i++) { diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 4d49ccc9eb3..edf8fec9ae1 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -178,16 +178,16 @@ Collision modifier code end ***********************************/ /** - * gsl_poly_solve_cubic - - * - * copied from SOLVE_CUBIC.C --> GSL - */ +* gsl_poly_solve_cubic - +* +* copied from SOLVE_CUBIC.C --> GSL +*/ #define mySWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while(0) int - gsl_poly_solve_cubic (double a, double b, double c, - double *x0, double *x1, double *x2) +gsl_poly_solve_cubic (double a, double b, double c, + double *x0, double *x1, double *x2) { double q = (a * a - 3 * b); double r = (2 * a * a * a - 9 * a * b + 27 * c); @@ -210,10 +210,10 @@ int } else if (CR2 == CQ3) { - /* this test is actually R2 == Q3, written in a form suitable + /* this test is actually R2 == Q3, written in a form suitable for exact computation with integers */ - /* Due to finite precision some double roots may be missed, and + /* Due to finite precision some double roots may be missed, and considered to be a pair of complex roots z = x +/- epsilon i close to the real axis. */ @@ -242,20 +242,20 @@ int *x0 = norm * cos (theta / 3) - a / 3; *x1 = norm * cos ((theta + 2.0 * M_PI) / 3) - a / 3; *x2 = norm * cos ((theta - 2.0 * M_PI) / 3) - a / 3; - + /* Sort *x0, *x1, *x2 into increasing order */ if (*x0 > *x1) mySWAP(*x0, *x1) ; - + if (*x1 > *x2) { mySWAP(*x1, *x2) ; - + if (*x0 > *x1) mySWAP(*x0, *x1) ; } - + return 3; } else @@ -271,13 +271,13 @@ int /** - * gsl_poly_solve_quadratic - * - * copied from GSL - */ +* gsl_poly_solve_quadratic +* +* copied from GSL +*/ int - gsl_poly_solve_quadratic (double a, double b, double c, - double *x0, double *x1) +gsl_poly_solve_quadratic (double a, double b, double c, + double *x0, double *x1) { double disc = b * b - 4 * a * c; @@ -338,55 +338,55 @@ int /* - * See Bridson et al. "Robust Treatment of Collision, Contact and Friction for Cloth Animation" - * page 4, left column - */ +* See Bridson et al. "Robust Treatment of Collision, Contact and Friction for Cloth Animation" +* page 4, left column +*/ int cloth_get_collision_time ( double a[3], double b[3], double c[3], double d[3], double e[3], double f[3], double solution[3] ) { int num_sols = 0; // x^0 - checked double g = a[0] * c[1] * e[2] - a[0] * c[2] * e[1] + - a[1] * c[2] * e[0] - a[1] * c[0] * e[2] + - a[2] * c[0] * e[1] - a[2] * c[1] * e[0]; - + a[1] * c[2] * e[0] - a[1] * c[0] * e[2] + + a[2] * c[0] * e[1] - a[2] * c[1] * e[0]; + // x^1 double h = -b[2] * c[1] * e[0] + b[1] * c[2] * e[0] - a[2] * d[1] * e[0] + - a[1] * d[2] * e[0] + b[2] * c[0] * e[1] - b[0] * c[2] * e[1] + - a[2] * d[0] * e[1] - a[0] * d[2] * e[1] - b[1] * c[0] * e[2] + - b[0] * c[1] * e[2] - a[1] * d[0] * e[2] + a[0] * d[1] * e[2] - - a[2] * c[1] * f[0] + a[1] * c[2] * f[0] + a[2] * c[0] * f[1] - - a[0] * c[2] * f[1] - a[1] * c[0] * f[2] + a[0] * c[1] * f[2]; + a[1] * d[2] * e[0] + b[2] * c[0] * e[1] - b[0] * c[2] * e[1] + + a[2] * d[0] * e[1] - a[0] * d[2] * e[1] - b[1] * c[0] * e[2] + + b[0] * c[1] * e[2] - a[1] * d[0] * e[2] + a[0] * d[1] * e[2] - + a[2] * c[1] * f[0] + a[1] * c[2] * f[0] + a[2] * c[0] * f[1] - + a[0] * c[2] * f[1] - a[1] * c[0] * f[2] + a[0] * c[1] * f[2]; // x^2 double i = -b[2] * d[1] * e[0] + b[1] * d[2] * e[0] + - b[2] * d[0] * e[1] - b[0] * d[2] * e[1] - - b[1] * d[0] * e[2] + b[0] * d[1] * e[2] - - b[2] * c[1] * f[0] + b[1] * c[2] * f[0] - - a[2] * d[1] * f[0] + a[1] * d[2] * f[0] + - b[2] * c[0] * f[1] - b[0] * c[2] * f[1] + - a[2] * d[0] * f[1] - a[0] * d[2] * f[1] - - b[1] * c[0] * f[2] + b[0] * c[1] * f[2] - - a[1] * d[0] * f[2] + a[0] * d[1] * f[2]; - + b[2] * d[0] * e[1] - b[0] * d[2] * e[1] - + b[1] * d[0] * e[2] + b[0] * d[1] * e[2] - + b[2] * c[1] * f[0] + b[1] * c[2] * f[0] - + a[2] * d[1] * f[0] + a[1] * d[2] * f[0] + + b[2] * c[0] * f[1] - b[0] * c[2] * f[1] + + a[2] * d[0] * f[1] - a[0] * d[2] * f[1] - + b[1] * c[0] * f[2] + b[0] * c[1] * f[2] - + a[1] * d[0] * f[2] + a[0] * d[1] * f[2]; + // x^3 - checked double j = -b[2] * d[1] * f[0] + b[1] * d[2] * f[0] + - b[2] * d[0] * f[1] - b[0] * d[2] * f[1] - - b[1] * d[0] * f[2] + b[0] * d[1] * f[2]; - + b[2] * d[0] * f[1] - b[0] * d[2] * f[1] - + b[1] * d[0] * f[2] + b[0] * d[1] * f[2]; + /* printf("r1: %lf\n", a[0] * c[1] * e[2] - a[0] * c[2] * e[1]); printf("r2: %lf\n", a[1] * c[2] * e[0] - a[1] * c[0] * e[2]); printf("r3: %lf\n", a[2] * c[0] * e[1] - a[2] * c[1] * e[0]); - + printf("x1 x: %f, y: %f, z: %f\n", a[0], a[1], a[2]); printf("x2 x: %f, y: %f, z: %f\n", c[0], c[1], c[2]); printf("x3 x: %f, y: %f, z: %f\n", e[0], e[1], e[2]); - + printf("v1 x: %f, y: %f, z: %f\n", b[0], b[1], b[2]); printf("v2 x: %f, y: %f, z: %f\n", d[0], d[1], d[2]); printf("v3 x: %f, y: %f, z: %f\n", f[0], f[1], f[2]); - + printf("t^3: %lf, t^2: %lf, t^1: %lf, t^0: %lf\n", j, i, h, g); */ @@ -517,17 +517,17 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier // compute barycentric coordinates for both collision points collision_compute_barycentric ( collpair->pa, - cloth1->verts[collpair->ap1].txold, - cloth1->verts[collpair->ap2].txold, - cloth1->verts[collpair->ap3].txold, - &w1, &w2, &w3 ); + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3 ); // was: txold collision_compute_barycentric ( collpair->pb, - collmd->current_x[collpair->bp1].co, - collmd->current_x[collpair->bp2].co, - collmd->current_x[collpair->bp3].co, - &u1, &u2, &u3 ); + collmd->current_x[collpair->bp1].co, + collmd->current_x[collpair->bp2].co, + collmd->current_x[collpair->bp3].co, + &u1, &u2, &u3 ); // Calculate relative "velocity". collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 ); @@ -696,7 +696,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap #ifdef WITH_BULLET // calc distance + normal distance = plNearestPoints ( - verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector ); + verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector ); #else // just be sure that we don't add anything distance = 2.0 * ( epsilon1 + epsilon2 + ALMOST_ZERO ); @@ -745,15 +745,15 @@ int cloth_are_edges_adjacent ( ClothModifierData *clmd, CollisionModifierData *c VECSUB ( temp, verts1[edgecollpair->p12].txold, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - + VECSUB ( temp, verts1[edgecollpair->p11].txold, verts1[edgecollpair->p12].txold ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - + VECSUB ( temp, verts2[edgecollpair->p21].co, verts2[edgecollpair->p22].co ); if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) return 1; - + return 0; } @@ -771,23 +771,19 @@ int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierD for ( ; collpair != collision_end; collpair++ ) { - // only handle static collisions here - if ( collpair->flag & COLLISION_IN_FUTURE ) - continue; - // compute barycentric coordinates for both collision points collision_compute_barycentric ( collpair->pa, - cloth1->verts[collpair->ap1].txold, - cloth1->verts[collpair->ap2].txold, - cloth1->verts[collpair->ap3].txold, - &w1, &w2, &w3 ); + cloth1->verts[collpair->ap1].txold, + cloth1->verts[collpair->ap2].txold, + cloth1->verts[collpair->ap3].txold, + &w1, &w2, &w3 ); // was: txold collision_compute_barycentric ( collpair->pb, - collmd->current_x[collpair->bp1].co, - collmd->current_x[collpair->bp2].co, - collmd->current_x[collpair->bp3].co, - &u1, &u2, &u3 ); + collmd->current_x[collpair->bp1].co, + collmd->current_x[collpair->bp2].co, + collmd->current_x[collpair->bp3].co, + &u1, &u2, &u3 ); // Calculate relative "velocity". collision_interpolateOnTriangle ( v1, cloth1->verts[collpair->ap1].tv, cloth1->verts[collpair->ap2].tv, cloth1->verts[collpair->ap3].tv, w1, w2, w3 ); @@ -853,25 +849,250 @@ int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierD d = clmd->coll_parms->epsilon*8.0/9.0 + epsilon2*8.0/9.0 - collpair->distance; if ( ( magrelVel < 0.1*d*clmd->sim_parms->stepsPerFrame ) && ( d > ALMOST_ZERO ) ) { - repulse = MIN2 ( d*1.0/clmd->sim_parms->stepsPerFrame, 0.1*d*clmd->sim_parms->stepsPerFrame - magrelVel ); + repulse = MIN2 ( d*1.0/clmd->sim_parms->stepsPerFrame, 0.1*d*clmd->sim_parms->stepsPerFrame - magrelVel ); - // stay on the safe side and clamp repulse - if ( impulse > ALMOST_ZERO ) - repulse = MIN2 ( repulse, 5.0*impulse ); - repulse = MAX2 ( impulse, repulse ); + // stay on the safe side and clamp repulse + if ( impulse > ALMOST_ZERO ) + repulse = MIN2 ( repulse, 5.0*impulse ); + repulse = MAX2 ( impulse, repulse ); - impulse = repulse / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25 - VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, impulse ); - VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, impulse ); - VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, impulse ); + impulse = repulse / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); // original 2.0 / 0.25 + VECADDMUL ( cloth1->verts[collpair->ap1].impulse, collpair->normal, impulse ); + VECADDMUL ( cloth1->verts[collpair->ap2].impulse, collpair->normal, impulse ); + VECADDMUL ( cloth1->verts[collpair->ap3].impulse, collpair->normal, impulse ); } -*/ + */ result = 1; } } return result; } +static float projectPointOntoLine(float *p, float *a, float *b) +{ + float ba[3], pa[3]; + VECSUB(ba, b, a); + VECSUB(pa, p, a); + return INPR(pa, ba) / INPR(ba, ba); +} + +static void calculateEENormal(float *np1, float *np2, float *np3, float *np4,float *out_normal) +{ + float line1[33], line2[3]; + float length; + + VECSUB(line1, np2, np1); + VECSUB(line2, np3, np1); + + Crossf(out_normal, line1, line2); + length = Normalize(out_normal); + if (length <= FLT_EPSILON) + { // lines are collinear + VECSUB(out_normal, np2, np1); + Normalize(out_normal); + } +} + +static void findClosestPointsEE(float *x1, float *x2, float *x3, float *x4, float *w1, float *w2) +{ + float temp[3], temp2[3]; + + double a, b, c, e, f; + + VECSUB(temp, x2, x1); + a = INPR(temp, temp); + + VECSUB(temp2, x4, x3); + b = -INPR(temp, temp2); + + c = INPR(temp2, temp2); + + VECSUB(temp2, x3, x1); + e = INPR(temp, temp2); + + VECSUB(temp, x4, x3); + f = -INPR(temp, temp2); + + *w1 = (e * c - b * f) / (a * c - b * b); + *w2 = (f - b * *w1) / c; + +} + +// calculates the distance of 2 edges +float edgedge_distance(float np11[3], float np12[3], float np21[3], float np22[3], float *out_a1, float *out_a2, float *out_normal) +{ + float line1[3], line2[3], cross[3]; + float length; + float temp[3], temp2[3]; + float dist_a1, dist_a2; + + VECSUB(line1, np12, np11); + VECSUB(line2, np22, np21); + + Crossf(cross, line1, line2); + length = INPR(cross, cross); + + if (length < FLT_EPSILON) + { + *out_a2 = projectPointOntoLine(np11, np21, np22); + if ((*out_a2 >= -FLT_EPSILON) && (*out_a2 <= 1.0 + FLT_EPSILON)) + { + *out_a1 = 0; + calculateEENormal(np11, np12, np21, np22, out_normal); + VECSUB(temp, np22, np21); + VecMulf(temp, *out_a2); + VECADD(temp2, temp, np21); + VECADD(temp2, temp2, np11); + return INPR(temp2, temp2); + } + + CLAMP(*out_a2, 0.0, 1.0); + if (*out_a2 > .5) + { // == 1.0 + *out_a1 = projectPointOntoLine(np22, np11, np12); + if ((*out_a1 >= -FLT_EPSILON) && (*out_a1 <= 1.0 + FLT_EPSILON)) + { + calculateEENormal(np11, np12, np21, np22, out_normal); + + // return (np22 - (np11 + (np12 - np11) * out_a1)).lengthSquared(); + VECSUB(temp, np12, np11); + VecMulf(temp, *out_a1); + VECADD(temp2, temp, np11); + VECSUB(temp2, np22, temp2); + return INPR(temp2, temp2); + } + } + else + { // == 0.0 + *out_a1 = projectPointOntoLine(np21, np11, np12); + if ((*out_a1 >= -FLT_EPSILON) && (*out_a1 <= 1.0 + FLT_EPSILON)) + { + calculateEENormal(np11, np11, np21, np22, out_normal); + + // return (np21 - (np11 + (np12 - np11) * out_a1)).lengthSquared(); + VECSUB(temp, np12, np11); + VecMulf(temp, *out_a1); + VECADD(temp2, temp, np11); + VECSUB(temp2, np21, temp2); + return INPR(temp2, temp2); + } + } + + CLAMP(*out_a1, 0.0, 1.0); + calculateEENormal(np11, np12, np21, np22, out_normal); + if(*out_a1 > .5) + { + if(*out_a2 > .5) + { + VECSUB(temp, np12, np22); + } + else + { + VECSUB(temp, np12, np21); + } + } + else + { + if(*out_a2 > .5) + { + VECSUB(temp, np11, np22); + } + else + { + VECSUB(temp, np11, np21); + } + } + + return INPR(temp, temp); + } + else + { + + // If the lines aren't parallel (but coplanar) they have to intersect + + findClosestPointsEE(np11, np12, np21, np22, out_a1, out_a2); + + // If both points are on the finite edges, we're done. + if (*out_a1 >= 0.0 && *out_a1 <= 1.0 && *out_a2 >= 0.0 && *out_a2 <= 1.0) + { + float p1[3], p2[3]; + + // p1= np11 + (np12 - np11) * out_a1; + VECSUB(temp, np12, np11); + VecMulf(temp, *out_a1); + VECADD(p1, np11, temp); + + // p2 = np21 + (np22 - np21) * out_a2; + VECSUB(temp, np22, np21); + VecMulf(temp, *out_a2); + VECADD(p2, np21, temp); + + calculateEENormal(np11, np12, np21, np22, out_normal); + VECSUB(temp, p1, p2); + return INPR(temp, temp); + } + + + /* + * Clamp both points to the finite edges. + * The one that moves most during clamping is one part of the solution. + */ + dist_a1 = *out_a1; + CLAMP(dist_a1, 0.0, 1.0); + dist_a2 = *out_a2; + CLAMP(dist_a2, 0.0, 1.0); + + // Now project the "most clamped" point on the other line. + if (dist_a1 > dist_a2) + { + /* keep out_a1 */ + float p1[3]; + + // p1 = np11 + (np12 - np11) * out_a1; + VECSUB(temp, np12, np11); + VecMulf(temp, *out_a1); + VECADD(p1, np11, temp); + + *out_a2 = projectPointOntoLine(p1, np21, np22); + CLAMP(*out_a2, 0.0, 1.0); + + calculateEENormal(np11, np12, np21, np22, out_normal); + + // return (p1 - (np21 + (np22 - np21) * out_a2)).lengthSquared(); + VECSUB(temp, np22, np21); + VecMulf(temp, *out_a2); + VECADD(temp, temp, np21); + VECSUB(temp, p1, temp); + return INPR(temp, temp); + } + else + { + /* keep out_a2 */ + float p2[3]; + + // p2 = np21 + (np22 - np21) * out_a2; + VECSUB(temp, np22, np21); + VecMulf(temp, *out_a2); + VECADD(p2, np21, temp); + + *out_a1 = projectPointOntoLine(p2, np11, np12); + CLAMP(*out_a1, 0.0, 1.0); + + calculateEENormal(np11, np12, np21, np22, out_normal); + + // return ((np11 + (np12 - np11) * out_a1) - p2).lengthSquared(); + VECSUB(temp, np12, np11); + VecMulf(temp, *out_a1); + VECADD(temp, temp, np11); + VECSUB(temp, temp, p2); + return INPR(temp, temp); + } + } + + printf("Error in edgedge_distance: end of function\n"); + return 0; +} + int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) { EdgeCollPair edgecollpair; @@ -890,16 +1111,16 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat cloth1 = clmd->clothObject; verts1 = cloth1->verts; - + for(i = 0; i < 9; i++) { // 9 edge - edge possibilities - + if(i == 0) // cloth edge: 1-2; coll edge: 1-2 { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap2; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp2; } @@ -907,7 +1128,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap2; - + edgecollpair.p21 = collpair->bp2; edgecollpair.p22 = collpair->bp3; } @@ -915,7 +1136,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap2; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp3; } @@ -923,7 +1144,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap2; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp2; } @@ -931,7 +1152,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap2; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp2; edgecollpair.p22 = collpair->bp3; } @@ -939,7 +1160,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap2; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp3; } @@ -947,7 +1168,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp2; } @@ -955,7 +1176,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp2; edgecollpair.p22 = collpair->bp3; } @@ -963,171 +1184,144 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { edgecollpair.p11 = collpair->ap1; edgecollpair.p12 = collpair->ap3; - + edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp3; } - + if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) ) { // always put coll points in p21/p22 VECSUB ( x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold ); VECSUB ( v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv ); - + VECSUB ( x2, verts2[edgecollpair.p21].co, verts1[edgecollpair.p11].txold ); VECSUB ( v2, velocity2[edgecollpair.p21].co, verts1[edgecollpair.p11].tv ); - + VECSUB ( x3, verts2[edgecollpair.p22].co, verts1[edgecollpair.p11].txold ); VECSUB ( v3, velocity2[edgecollpair.p22].co, verts1[edgecollpair.p11].tv ); - + numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution ); - + for ( k = 0; k < numsolutions; k++ ) { // printf("sol %d: %lf\n", k, solution[k]); if ( ( solution[k] >= DBL_EPSILON ) && ( solution[k] <= 1.0 ) ) { - //float out_collisionTime = solution[k]; - + float a,b; + float out_normal[3]; + float distance; + + // move verts + VECADDS(triA[0], verts1[edgecollpair.p11].txold, verts1[edgecollpair.p11].tv, mintime); + VECADDS(triA[1], verts1[edgecollpair.p12].txold, verts1[edgecollpair.p12].tv, mintime); + + VECADDS(triB[0], collmd->current_x[edgecollpair.p21].co, collmd->current_v[edgecollpair.p21].co, mintime); + VECADDS(triB[1], collmd->current_x[edgecollpair.p22].co, collmd->current_v[edgecollpair.p22].co, mintime); + // TODO: check for collisions - - // TODO: put into (edge) collision list + distance = edgedge_distance(triA[0], triA[1], triB[0], triB[1], &a, &b, out_normal); + if ((distance <= clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree ) + ALMOST_ZERO) && (INPR(out_normal, out_normal) > 0)) + { + // printf("found edge, dist: %f\n", distance); + + /* Inelastic repulsion impulse. */ +/* + // Calculate which normal velocity we need. + float desiredVn = (normalVelocity * (float)solution[k] - (.1 * (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree )) - sqrt(squaredDistance)) - ALMOST_ZERO); + + // Now calculate what impulse we need to reach that velocity. + float m1 = interpolateOnEdge(cloth1.getVertexWeight(v11idx), cloth1.getVertexWeight(v12idx), a1); + float m2 = interpolateOnEdge(cloth2.getVertexWeight(v21idx), cloth2.getVertexWeight(v22idx), a2); + float I_mag = (normalVelocity - desiredVn) / (1/m1 + 1/m2); + + // Finally apply that impulse. + applyInterpolatedImpulsesEdge(out_impulses1[v11idx], out_impulses1[v12idx], out_impulses2[v21idx], out_impulses2[v22idx], + a1, a2, -I_mag, normal); + ++out_impulseCounter1[v11idx]; ++out_impulseCounter1[v12idx]; + ++out_impulseCounter2[v21idx]; ++out_impulseCounter2[v22idx]; + + */ // return true; + result = 1; + } + mintime = MIN2(mintime, (float)solution[k]); - - result = 1; + break; } } } } - +/* if(result) { // move triangles to collision point in time VECADDS(triA[0], verts1[collpair->ap1].txold, verts1[collpair->ap1].tv, mintime); VECADDS(triA[1], verts1[collpair->ap2].txold, verts1[collpair->ap2].tv, mintime); VECADDS(triA[2], verts1[collpair->ap3].txold, verts1[collpair->ap3].tv, mintime); - + VECADDS(triB[0], collmd->current_x[collpair->bp1].co, collmd->current_v[collpair->bp1].co, mintime); VECADDS(triB[1], collmd->current_x[collpair->bp2].co, collmd->current_v[collpair->bp2].co, mintime); VECADDS(triB[2], collmd->current_x[collpair->bp3].co, collmd->current_v[collpair->bp3].co, mintime); - + // check distance there distance = plNearestPoints (triA[0], triA[1], triA[2], triB[0], triB[1], triB[2], collpair->pa,collpair->pb,collpair->vector ); - + if(distance <= (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree ) + ALMOST_ZERO)) { CollPair *next = collpair; next++; - + collpair->distance = clmd->coll_parms->epsilon; collpair->time = mintime; - + VECCOPY ( collpair->normal, collpair->vector ); Normalize ( collpair->normal ); - - cloth_collision_response_moving ( clmd, collmd, collpair, next ); + + // cloth_collision_response_moving ( clmd, collmd, collpair, next ); + } } - +*/ return result; } -/* -void cloth_collision_moving_tris ( ClothModifierData *clmd, ClothModifierData *coll_clmd, CollisionTree *tree1, CollisionTree *tree2 ) +int cloth_collision_moving_tris ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) { - CollPair collpair; - Cloth *cloth1=NULL, *cloth2=NULL; - MFace *face1=NULL, *face2=NULL; - ClothVertex *verts1=NULL, *verts2=NULL; + EdgeCollPair edgecollpair; + Cloth *cloth1=NULL; + ClothVertex *verts1=NULL; unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; - float a[3], b[3], c[3], d[3], e[3], f[3]; + double x1[3], v1[3], x2[3], v2[3], x3[3], v3[3]; double solution[3]; + MVert *verts2 = collmd->current_x; // old x + MVert *velocity2 = collmd->current_v; // velocity + float mintime = FLT_MAX; + float distance; + float triA[3][3], triB[3][3]; + int result = 0; - for ( i = 0; i < 2; i++ ) + cloth1 = clmd->clothObject; + verts1 = cloth1->verts; + + for(i = 0; i < 9; i++) { - cloth1 = clmd->clothObject; - cloth2 = coll_clmd->clothObject; + // 9 edge - edge possibilities - verts1 = cloth1->verts; - verts2 = cloth2->verts; - - face1 = & ( cloth1->mfaces[tree1->tri_index] ); - face2 = & ( cloth2->mfaces[tree2->tri_index] ); - - // check all possible pairs of triangles - if ( i == 0 ) + if(i == 0) { - collpair.ap1 = face1->v1; - collpair.ap2 = face1->v2; - collpair.ap3 = face1->v3; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; - } - - if ( i == 1 ) - { - if ( face1->v4 ) - { - collpair.ap1 = face1->v3; - collpair.ap2 = face1->v4; - collpair.ap3 = face1->v1; - - collpair.pointsb[0] = face2->v1; - collpair.pointsb[1] = face2->v2; - collpair.pointsb[2] = face2->v3; - collpair.pointsb[3] = face2->v4; - } - else - i++; - } - - // calc SIPcode (?) - - if ( i < 2 ) - { - VECSUB ( a, verts1[collpair.ap2].xold, verts1[collpair.ap1].xold ); - VECSUB ( b, verts1[collpair.ap2].v, verts1[collpair.ap1].v ); - VECSUB ( c, verts1[collpair.ap3].xold, verts1[collpair.ap1].xold ); - VECSUB ( d, verts1[collpair.ap3].v, verts1[collpair.ap1].v ); - - for ( j = 0; j < 4; j++ ) - { - if ( ( j==3 ) && ! ( face2->v4 ) ) - break; - - VECSUB ( e, verts2[collpair.pointsb[j]].xold, verts1[collpair.ap1].xold ); - VECSUB ( f, verts2[collpair.pointsb[j]].v, verts1[collpair.ap1].v ); - - numsolutions = cloth_get_collision_time ( a, b, c, d, e, f, solution ); - - for ( k = 0; k < numsolutions; k++ ) - { - if ( ( solution[k] >= ALMOST_ZERO ) && ( solution[k] <= 1.0 ) ) - { - //float out_collisionTime = solution[k]; - - // TODO: check for collisions - - // TODO: put into (point-face) collision list - - // printf("Moving found!\n"); - - } - } - - // TODO: check borders for collisions - } + edgecollpair.p11 = collpair->ap1; + edgecollpair.p12 = collpair->ap2; + edgecollpair.p21 = collpair->bp1; + edgecollpair.p22 = collpair->bp2; } } + + return result; } -*/ int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { @@ -1145,10 +1339,11 @@ int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *col // only handle moving collisions here if (!( collpair->flag & COLLISION_IN_FUTURE )) continue; - + cloth_collision_moving_edges ( clmd, collmd, collpair); + // cloth_collision_moving_tris ( clmd, collmd, collpair); } - + return 1; } @@ -1219,14 +1414,14 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); VECCOPY ( verts[i].impulse, tnull ); verts[i].impulse_count = 0; - + ret++; } } } - /* +/* result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); - + // apply impulses in parallel if ( result ) { @@ -1238,12 +1433,12 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); VECCOPY ( verts[i].impulse, tnull ); verts[i].impulse_count = 0; - + ret++; } } } - */ +*/ } } @@ -1371,24 +1566,25 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) if ( cloth->bvhselftree ) { - /* search for overlapping collision pairs */ + // search for overlapping collision pairs overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); +// #pragma omp parallel for private(k, i, j) schedule(static) for ( k = 0; k < result; k++ ) { float temp[3]; float length = 0; float mindistance; - + i = overlap[k].indexA; j = overlap[k].indexB; - + mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) { if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) { continue; } @@ -1427,87 +1623,18 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) VECSUB ( verts[i].tx, verts[i].tx, temp ); } + ret = 1; + } + else + { + // check for approximated time collisions } } - + if ( overlap ) MEM_freeN ( overlap ); - - } - /* - for ( count = 0; count < clmd->coll_parms->self_loop_count; count++ ) - { - if ( collisions ) - { - collisions = 0; - #pragma omp parallel for private(i,j, collisions) shared(verts, ret) - for ( i = 0; i < cloth->numverts; i++ ) - { - for ( j = i + 1; j < cloth->numverts; j++ ) - { - float temp[3]; - float length = 0; - float mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - { - if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) - { - continue; } - } - - VECSUB ( temp, verts[i].tx, verts[j].tx ); - - if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; - - // check for adjacent points (i must be smaller j) - if ( BLI_edgehash_haskey ( cloth->edgehash, i, j ) ) - { - continue; - } - - length = Normalize ( temp ); - - if ( length < mindistance ) - { - float correction = mindistance - length; - - if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, -correction ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - } - else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, correction ); - VECADD ( verts[i].tx, verts[i].tx, temp ); - } - else - { - VecMulf ( temp, -correction*0.5 ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - - VECSUB ( verts[i].tx, verts[i].tx, temp ); - } - - collisions = 1; - - if ( !ret ) - { - #pragma omp critical - { - ret = 1; - } - } - } - } - } - } - } - */ //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// @@ -1517,8 +1644,10 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) { for ( i = 0; i < cloth->numverts; i++ ) { - if ( ! ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) + if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) + { VECSUB ( verts[i].tv, verts[i].tx, verts[i].txold ); + } } } //////////////////////////////////////////////////////////// @@ -1528,3 +1657,15 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) return MIN2 ( ret, 1 ); } + + +/* +if ( verts[i].impulse_count ) +{ + VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); + VECCOPY ( verts[i].impulse, tnull ); + verts[i].impulse_count = 0; + + ret++; +} +*/ \ No newline at end of file From 0a90a52442071b8c346b8efade465eff714c37d8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 May 2008 09:50:46 +0000 Subject: [PATCH 114/430] * The displist would be uninitialized when nurbs bezieru/v was set and the order wasnt 3 or 4. add a function that checks nurbs can produce a valid line. check_valid_nurb_u/v * when check_valid_nurb_u/v fails, no curve is allocated or drawn. * knotsu/v could be NULL but some functions didn't check for this, make sure this is checked for everywhere. * The interface didnt change check the order when the bezier u/v flag was set, added functions clamp_nurb_order_u/v that takes into accound the number of points and the bezier u/v flag. --- source/blender/blenkernel/BKE_curve.h | 7 + source/blender/blenkernel/intern/curve.c | 80 ++++++++++-- source/blender/blenkernel/intern/displist.c | 2 +- source/blender/blenkernel/intern/font.c | 4 +- source/blender/src/buttons_editing.c | 8 +- source/blender/src/editcurve.c | 138 +++++++++++--------- 6 files changed, 162 insertions(+), 77 deletions(-) diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 60444675047..edb4721de4e 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -84,5 +84,12 @@ void switchdirectionNurb( struct Nurb *nu); float (*curve_getVertexCos(struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3]; void curve_applyVertexCos(struct Curve *cu, struct ListBase *lb, float (*vertexCos)[3]); +/* nurb checks if they can be drawn, also clamp order func */ +int check_valid_nurb_u( struct Nurb *nu); +int check_valid_nurb_v( struct Nurb *nu); + +int clamp_nurb_order_u( struct Nurb *nu); +int clamp_nurb_order_v( struct Nurb *nu); + #endif diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index d02a7c0ab9e..d2028e653c5 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -348,9 +348,9 @@ void freeNurb(Nurb *nu) if(nu->bp) MEM_freeN(nu->bp); nu->bp= 0; if(nu->knotsu) MEM_freeN(nu->knotsu); - nu->knotsu= 0; + nu->knotsu= NULL; if(nu->knotsv) MEM_freeN(nu->knotsv); - nu->knotsv= 0; + nu->knotsv= NULL; /* if(nu->trim.first) freeNurblist(&(nu->trim)); */ MEM_freeN(nu); @@ -393,7 +393,7 @@ Nurb *duplicateNurb(Nurb *nu) (BPoint*)MEM_mallocN((len)* sizeof(BPoint),"duplicateNurb3"); memcpy(newnu->bp, nu->bp, len*sizeof(BPoint)); - newnu->knotsu=newnu->knotsv= 0; + newnu->knotsu= newnu->knotsv= NULL; if(nu->knotsu) { len= KNOTSU(nu); @@ -506,6 +506,7 @@ static void calcknots(float *knots, short aantal, short order, short type) } } else if(type==2) { + /* Warning, the order MUST be 2 or 4, if this is not enforced, the displist will be corrupt */ if(order==4) { k= 0.34; for(a=0;atype & 7)==CU_NURBS ) { if(uv & 1) { if(nu->knotsu) MEM_freeN(nu->knotsu); - if(nu->pntsu>1) { + if(check_valid_nurb_u(nu)) { nu->knotsu= MEM_callocN(4+sizeof(float)*KNOTSU(nu), "makeknots"); calcknots(nu->knotsu, nu->pntsu, nu->orderu, type); if(nu->flagu & 1) makecyclicknots(nu->knotsu, nu->pntsu, nu->orderu); @@ -563,7 +567,7 @@ void makeknots(Nurb *nu, short uv, short type) /* 0: uniform, 1: endpoints, 2: b } if(uv & 2) { if(nu->knotsv) MEM_freeN(nu->knotsv); - if(nu->pntsv>1) { + if(check_valid_nurb_v(nu)) { nu->knotsv= MEM_callocN(4+sizeof(float)*KNOTSV(nu), "makeknots"); calcknots(nu->knotsv, nu->pntsv, nu->orderv, type); if(nu->flagv & 1) makecyclicknots(nu->knotsv, nu->pntsv, nu->orderv); @@ -645,7 +649,7 @@ void makeNurbfaces(Nurb *nu, float *data, int rowstride) int i, j, iofs, jofs, cycl, len, resolu, resolv; int istart, iend, jsta, jen, *jstart, *jend, ratcomp; - if(nu->knotsu==0 || nu->knotsv==0) return; + if(nu->knotsu==NULL || nu->knotsv==NULL) return; if(nu->orderu>nu->pntsu) return; if(nu->orderv>nu->pntsv) return; if(data==0) return; @@ -803,7 +807,7 @@ void makeNurbcurve(Nurb *nu, float *data, int resolu, int dim) float *basisu, *sum, *fp, *in; int i, len, istart, iend, cycl; - if(nu->knotsu==0) return; + if(nu->knotsu==NULL) return; if(nu->orderu>nu->pntsu) return; if(data==0) return; @@ -1478,7 +1482,7 @@ void makeBevelList(Object *ob) while(nu) { /* check we are a single point? also check we are not a surface and that the orderu is sane, * enforced in the UI but can go wrong possibly */ - if(nu->pntsu<2 || ((nu->type & 7)==CU_NURBS && nu->pntsu < nu->orderu)) { + if(!check_valid_nurb_u(nu)) { bl= MEM_callocN(sizeof(BevList)+1*sizeof(BevPoint), "makeBevelList"); BLI_addtail(&(cu->bev), bl); bl->nr= 0; @@ -2608,3 +2612,63 @@ void curve_applyVertexCos(Curve *cu, ListBase *lb, float (*vertexCos)[3]) } } } + +int check_valid_nurb_u( struct Nurb *nu ) +{ + if (nu==NULL) return 0; + if (nu->pntsu <= 1) return 0; + if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */ + + if (nu->pntsu < nu->orderu) return 0; + if ((nu->flagu>>1) & 2) { /* Bezier U Endpoints */ + if (nu->orderu==4) { + if (nu->pntsu < 5) return 0; /* bezier with 4 orderu needs 5 points */ + } else if (nu->orderu != 3) return 0; /* order must be 3 or 4 */ + } + return 1; +} +int check_valid_nurb_v( struct Nurb *nu) +{ + if (nu==NULL) return 0; + if (nu->pntsv <= 1) return 0; + if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */ + + if (nu->pntsv < nu->orderv) return 0; + if ((nu->flagv>>1) & 2) { /* Bezier V Endpoints */ + if (nu->orderv==4) { + if (nu->pntsv < 5) return 0; /* bezier with 4 orderu needs 5 points */ + } else if (nu->orderv != 3) return 0; /* order must be 3 or 4 */ + } + return 1; +} + +int clamp_nurb_order_u( struct Nurb *nu ) +{ + int change = 0; + if(nu->pntsuorderu) { + nu->orderu= nu->pntsu; + change= 1; + } + if((nu->flagu>>1)&2) { + CLAMP(nu->orderu, 3,4); + change= 1; + } + return change; +} + +int clamp_nurb_order_v( struct Nurb *nu) +{ + int change = 0; + if(nu->pntsvorderv) { + nu->orderv= nu->pntsv; + change= 1; + } + if((nu->flagv>>1)&2) { + CLAMP(nu->orderv, 3,4); + change= 1; + } + return change; +} + + + diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index aa436441056..a8f300f4315 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -783,7 +783,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase) else resolu= nu->resolu; - if(nu->pntsu<2 || ((nu->type & 7)==CU_NURBS && nu->pntsu < nu->orderu)); + if(!check_valid_nurb_u(nu)); else if((nu->type & 7)==CU_BEZIER) { /* count */ diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 09c93962990..52275e507dd 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -440,7 +440,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i if (nu2 == NULL) return; nu2->resolu= cu->resolu; nu2->bezt = NULL; - nu2->knotsu = nu2->knotsv = 0; + nu2->knotsu = nu2->knotsv = NULL; nu2->flag= 0; nu2->charidx = charidx+1000; if (mat_nr > 0) nu2->mat_nr= mat_nr-1; @@ -529,7 +529,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float memcpy(nu2, nu1, sizeof(struct Nurb)); nu2->resolu= cu->resolu; nu2->bp = 0; - nu2->knotsu = nu2->knotsv = 0; + nu2->knotsu = nu2->knotsv = NULL; nu2->flag= CU_SMOOTH; nu2->charidx = charidx; if (info->mat_nr) { diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 8a37f713164..6e57736845e 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -3106,11 +3106,13 @@ void do_curvebuts(unsigned short event) if(eventflagu &= 1; nu->flagu += ((event-B_UNIFU)<<1); + clamp_nurb_order_u(nu); makeknots(nu, 1, nu->flagu>>1); } else if(nu->pntsv>1) { nu->flagv &= 1; nu->flagv += ((event-B_UNIFV)<<1); + clamp_nurb_order_v(nu); makeknots(nu, 2, nu->flagv>>1); } } @@ -3148,13 +3150,11 @@ void do_curvebuts(unsigned short event) if(G.obedit) { nu= get_actNurb(); if(nu && (nu->type & 7)==CU_NURBS ) { - if(nu->orderu>nu->pntsu) { - nu->orderu= nu->pntsu; + if(clamp_nurb_order_u(nu)) { scrarea_queue_winredraw(curarea); } makeknots(nu, 1, nu->flagu>>1); - if(nu->orderv>nu->pntsv) { - nu->orderv= nu->pntsv; + if(clamp_nurb_order_v(nu)) { scrarea_queue_winredraw(curarea); } makeknots(nu, 2, nu->flagv>>1); diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index 7f9ba2cb8d2..3cb951c319b 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -335,7 +335,7 @@ void load_editNurb() BLI_addtail(&(cu->nurb), newnu); if((nu->type & 7)==CU_NURBS) { - if(nu->pntsu < nu->orderu) nu->orderu= nu->pntsu; + clamp_nurb_order_u(nu); } } } @@ -689,7 +689,7 @@ void deleteflagNurb(short flag) nu->pntsv= newv; MEM_freeN(nu->bp); nu->bp= newbp; - if(nu->orderv>nu->pntsv) nu->orderv= nu->pntsv; + clamp_nurb_order_v(nu); makeknots(nu, 2, nu->flagv>>1); } @@ -729,13 +729,13 @@ void deleteflagNurb(short flag) nu->pntsu= nu->pntsv; nu->pntsv= 1; SWAP(short, nu->orderu, nu->orderv); - if(nu->orderu>nu->pntsu) nu->orderu= nu->pntsu; + clamp_nurb_order_u(nu); if(nu->knotsv) MEM_freeN(nu->knotsv); - nu->knotsv= 0; + nu->knotsv= NULL; } else { nu->pntsu= newu; - if(nu->orderu>nu->pntsu) nu->orderu= nu->pntsu; + clamp_nurb_order_u(nu); } makeknots(nu, 1, nu->flagu>>1); } @@ -946,7 +946,7 @@ void adduplicateflagNurb(short flag) } /* knots */ - newnu->knotsu= 0; + newnu->knotsu= NULL; makeknots(newnu, 1, newnu->flagu>>1); } bp++; @@ -991,9 +991,11 @@ void adduplicateflagNurb(short flag) newnu->pntsv= newv; newnu->bp = (BPoint*)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6"); - newnu->orderu= MIN2(nu->orderu, newu); - newnu->orderv= MIN2(nu->orderv, newv); - + clamp_nurb_order_u(newnu); + clamp_nurb_order_v(newnu); + + newnu->knotsu= newnu->knotsv= NULL; + bp= newnu->bp; bp1= nu->bp; for(a=0; apntsv; a++) { @@ -1005,23 +1007,20 @@ void adduplicateflagNurb(short flag) } } } - if(nu->pntsu==newnu->pntsu) { - newnu->knotsu= MEM_mallocN(sizeof(float)*KNOTSU(nu), "adduplicateN6"); - memcpy(newnu->knotsu, nu->knotsu, sizeof(float)*KNOTSU(nu)); + if (check_valid_nurb_u(newnu)) { + if(nu->pntsu==newnu->pntsu && nu->knotsu) { + newnu->knotsu= MEM_dupallocN( nu->knotsu ); + } else { + makeknots(newnu, 1, newnu->flagu>>1); + } } - else { - newnu->knotsu= 0; - makeknots(newnu, 1, newnu->flagu>>1); + if (check_valid_nurb_v(newnu)) { + if(nu->pntsv==newnu->pntsv && nu->knotsv) { + newnu->knotsv= MEM_dupallocN( nu->knotsv ); + } else { + makeknots(newnu, 2, newnu->flagv>>1); + } } - if(nu->pntsv==newnu->pntsv) { - newnu->knotsv= MEM_mallocN(sizeof(float)*KNOTSV(nu), "adduplicateN7"); - memcpy(newnu->knotsv, nu->knotsv, sizeof(float)*KNOTSV(nu)); - } - else { - newnu->knotsv= 0; - makeknots(newnu, 2, newnu->flagv>>1); - } - } MEM_freeN(usel); } @@ -2154,9 +2153,9 @@ int convertspline(short type, Nurb *nu) if(type==0) { /* to Poly */ nu->type &= ~7; if(nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */ - nu->knotsu= 0; + nu->knotsu= NULL; if(nu->knotsv) MEM_freeN(nu->knotsv); - nu->knotsv= 0; + nu->knotsv= NULL; } else if(type==CU_BEZIER) { /* to Bezier */ nr= nu->pntsu/3; @@ -2185,7 +2184,7 @@ int convertspline(short type, Nurb *nu) MEM_freeN(nu->bp); nu->bp= 0; MEM_freeN(nu->knotsu); - nu->knotsu= 0; + nu->knotsu= NULL; nu->pntsu= nr; nu->type &= ~7; nu->type+= 1; @@ -3042,26 +3041,28 @@ void makecyclicNurb() calchandlesNurb(nu); } else if(nu->pntsv==1 && (nu->type & 7)==CU_NURBS) { - a= nu->pntsu; - bp= nu->bp; - while(a--) { - if( bp->f1 & SELECT ) { - if(nu->flagu & CU_CYCLIC) nu->flagu--; - else { - nu->flagu++; - nu->flagu &= ~2; /* endpoint flag, fixme */ - fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); - b= (nu->orderu+nu->pntsu); - memcpy(fp, nu->knotsu, sizeof(float)*b); - MEM_freeN(nu->knotsu); - nu->knotsu= fp; + if (nu->knotsu) { /* if check_valid_nurb_u fails the knotsu can be NULL */ + a= nu->pntsu; + bp= nu->bp; + while(a--) { + if( bp->f1 & SELECT ) { + if(nu->flagu & CU_CYCLIC) nu->flagu--; + else { + nu->flagu++; + nu->flagu &= ~2; /* endpoint flag, fixme */ + fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); + b= (nu->orderu+nu->pntsu); + memcpy(fp, nu->knotsu, sizeof(float)*b); + MEM_freeN(nu->knotsu); + nu->knotsu= fp; - makeknots(nu, 1, 0); /* 1==u 0==uniform */ + makeknots(nu, 1, 0); /* 1==u 0==uniform */ + } + break; } - break; + bp++; } - bp++; } } else if(nu->type==CU_NURBS) { @@ -3078,26 +3079,34 @@ void makecyclicNurb() if(nu->flagu & CU_CYCLIC) nu->flagu--; else { nu->flagu++; - fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); - b= (nu->orderu+nu->pntsu); - memcpy(fp, nu->knotsu, sizeof(float)*b); - MEM_freeN(nu->knotsu); - nu->knotsu= fp; + if (check_valid_nurb_u(nu)) { + fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); + b= (nu->orderu+nu->pntsu); + if (nu->knotsu) { /* null if check_valid_nurb_u failed before but is valid now */ + memcpy(fp, nu->knotsu, sizeof(float)*b); + MEM_freeN(nu->knotsu); + } + nu->knotsu= fp; - makeknots(nu, 1, 0); /* 1==u 0==uniform */ + makeknots(nu, 1, 0); /* 1==u 0==uniform */ + } } } if(cyclmode==2 && nu->pntsv>1) { if(nu->flagv & 1) nu->flagv--; else { nu->flagv++; - fp= MEM_mallocN(sizeof(float)*KNOTSV(nu), "makecyclicN"); - b= (nu->orderv+nu->pntsv); - memcpy(fp, nu->knotsv, sizeof(float)*b); - MEM_freeN(nu->knotsv); - nu->knotsv= fp; + if (check_valid_nurb_v(nu)) { + fp= MEM_mallocN(sizeof(float)*KNOTSV(nu), "makecyclicN"); + b= (nu->orderv+nu->pntsv); + if (nu->knotsv) { /* null if check_valid_nurb_v failed before but is valid now */ + memcpy(fp, nu->knotsv, sizeof(float)*b); + MEM_freeN(nu->knotsv); + } + nu->knotsv= fp; - makeknots(nu, 2, 0); /* 2==v 0==uniform */ + makeknots(nu, 2, 0); /* 2==v 0==uniform */ + } } } break; @@ -3674,10 +3683,13 @@ void delNurb() } } - /* Never allow the order to exceed the number of points */ - if ((nu!= NULL) && ((nu->type & 7)==CU_NURBS) && (nu->pntsu < nu->orderu)) { - nu->orderu = nu->pntsu; + /* Never allow the order to exceed the number of points + - note, this is ok but changes unselected nurbs, disable for now */ + /* + if ((nu!= NULL) && ((nu->type & 7)==CU_NURBS)) { + clamp_nurb_order_u(nu); } + */ nu= next; } /* 2nd loop, delete small pieces: just for curves */ @@ -3725,10 +3737,12 @@ void delNurb() MEM_freeN(nu->bp); nu->bp= bp1; - /* Never allow the order to exceed the number of points */ - if ((nu->type & 7)==CU_NURBS && (nu->pntsu < nu->orderu)) { - nu->orderu = nu->pntsu; - } + /* Never allow the order to exceed the number of points\ + - note, this is ok but changes unselected nurbs, disable for now */ + /* + if ((nu->type & 7)==CU_NURBS) { + clamp_nurb_order_u(nu); + }*/ } makeknots(nu, 1, nu->flagu>>1); } From 391c7615d19561555ab29c090fcfd56447942548 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 26 May 2008 10:36:14 +0000 Subject: [PATCH 115/430] -= Collisions =- 1. fix for collisions (were working better with selfcolls enabled, now generally better) --- source/blender/blenkernel/intern/collision.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index edf8fec9ae1..0b291aaa695 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1458,7 +1458,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) long i=0, j = 0, k = 0, numfaces = 0, numverts = 0; unsigned int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; - int ret = 0; + int ret = 0, ret2 = 0; ClothModifierData *tclmd; int collisions = 0, count = 0; @@ -1484,6 +1484,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) do { result = 0; + ret2 = 0; // check all collision objects for ( base = G.scene->base.first; base; base = base->next ) @@ -1512,6 +1513,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) continue; ret += cloth_bvh_objcollisions_do ( clmd, collmd, step, dt ); + ret2 += ret; } } } @@ -1522,6 +1524,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) continue; ret += cloth_bvh_objcollisions_do ( clmd, collmd, step, dt ); + ret2 += ret; } } rounds++; @@ -1624,6 +1627,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) VECSUB ( verts[i].tx, verts[i].tx, temp ); } ret = 1; + ret2 += ret; } else { @@ -1640,7 +1644,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// // SELFCOLLISIONS: update velocities //////////////////////////////////////////////////////////// - if ( ret ) + if ( ret2 ) { for ( i = 0; i < cloth->numverts; i++ ) { @@ -1653,7 +1657,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// } } - while ( result && ( clmd->coll_parms->loop_count>rounds ) ); + while ( ret2 && ( clmd->coll_parms->loop_count>rounds ) ); return MIN2 ( ret, 1 ); } From 3b4873250eb72aff424fc001b125b52195410e8d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 May 2008 12:50:00 +0000 Subject: [PATCH 116/430] when cyclic is enabled the knots would always be generated with uniform nurbs but after, cyclic nurbs would be incorrect if the bezier or endpoint u/v was set. also replaced some numbers with constants. --- source/blender/blenkernel/BKE_curve.h | 4 +- source/blender/blenkernel/intern/curve.c | 78 +++++++++++--------- source/blender/blenkernel/intern/displist.c | 8 +- source/blender/blenlib/intern/freetypefont.c | 2 +- source/blender/blenlib/intern/psfont.c | 2 +- source/blender/src/buttons_editing.c | 8 +- source/blender/src/editcurve.c | 74 ++++++++++--------- 7 files changed, 95 insertions(+), 81 deletions(-) diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index edb4721de4e..45d8193b16f 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -39,8 +39,8 @@ struct ListBase; struct BezTriple; struct BevList; -#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (nu->orderu-1)*((nu)->flagu & 1) ) -#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (nu->orderv-1)*((nu)->flagv & 1) ) +#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (nu->orderu-1)*((nu)->flagu & CU_CYCLIC) ) +#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (nu->orderv-1)*((nu)->flagv & CU_CYCLIC) ) void unlink_curve( struct Curve *cu); diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index d2028e653c5..396bdda9c10 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -533,7 +533,8 @@ static void makecyclicknots(float *knots, short pnts, short order) int a, b, order2, c; if(knots==0) return; - order2=order-1; + + order2=order-1; /* do first long rows (order -1), remove identical knots at endpoints */ if(order>2) { @@ -553,26 +554,35 @@ static void makecyclicknots(float *knots, short pnts, short order) } -void makeknots(Nurb *nu, short uv, short type) /* 0: uniform, 1: endpoints, 2: bezier */ +/* type - 0: uniform, 1: endpoints, 2: bezier, note, cyclic nurbs are always uniform */ +void makeknots(Nurb *nu, short uv, short type) { if( (nu->type & 7)==CU_NURBS ) { - if(uv & 1) { + if(uv == 1) { if(nu->knotsu) MEM_freeN(nu->knotsu); if(check_valid_nurb_u(nu)) { nu->knotsu= MEM_callocN(4+sizeof(float)*KNOTSU(nu), "makeknots"); - calcknots(nu->knotsu, nu->pntsu, nu->orderu, type); - if(nu->flagu & 1) makecyclicknots(nu->knotsu, nu->pntsu, nu->orderu); + if(nu->flagu & CU_CYCLIC) { + calcknots(nu->knotsu, nu->pntsu, nu->orderu, 0); /* cyclic should be uniform */ + makecyclicknots(nu->knotsu, nu->pntsu, nu->orderu); + } else { + calcknots(nu->knotsu, nu->pntsu, nu->orderu, type); + } } - else nu->knotsu= 0; - } - if(uv & 2) { + else nu->knotsu= NULL; + + } else if(uv == 2) { if(nu->knotsv) MEM_freeN(nu->knotsv); if(check_valid_nurb_v(nu)) { nu->knotsv= MEM_callocN(4+sizeof(float)*KNOTSV(nu), "makeknots"); - calcknots(nu->knotsv, nu->pntsv, nu->orderv, type); - if(nu->flagv & 1) makecyclicknots(nu->knotsv, nu->pntsv, nu->orderv); + if(nu->flagv & CU_CYCLIC) { + calcknots(nu->knotsv, nu->pntsv, nu->orderv, 0); /* cyclic should be uniform */ + makecyclicknots(nu->knotsv, nu->pntsv, nu->orderv); + } else { + calcknots(nu->knotsv, nu->pntsv, nu->orderv, type); + } } - else nu->knotsv= 0; + else nu->knotsv= NULL; } } } @@ -683,24 +693,24 @@ void makeNurbfaces(Nurb *nu, float *data, int rowstride) fp= nu->knotsu; ustart= fp[nu->orderu-1]; - if(nu->flagu & 1) uend= fp[nu->pntsu+nu->orderu-1]; + if(nu->flagu & CU_CYCLIC) uend= fp[nu->pntsu+nu->orderu-1]; else uend= fp[nu->pntsu]; - ustep= (uend-ustart)/(resolu-1+(nu->flagu & 1)); + ustep= (uend-ustart)/(resolu-1+(nu->flagu & CU_CYCLIC)); basisu= (float *)MEM_mallocN(sizeof(float)*KNOTSU(nu), "makeNurbfaces3"); fp= nu->knotsv; vstart= fp[nu->orderv-1]; - if(nu->flagv & 1) vend= fp[nu->pntsv+nu->orderv-1]; + if(nu->flagv & CU_CYCLIC) vend= fp[nu->pntsv+nu->orderv-1]; else vend= fp[nu->pntsv]; - vstep= (vend-vstart)/(resolv-1+(nu->flagv & 1)); + vstep= (vend-vstart)/(resolv-1+(nu->flagv & CU_CYCLIC)); len= KNOTSV(nu); basisv= (float *)MEM_mallocN(sizeof(float)*len*resolv, "makeNurbfaces3"); jstart= (int *)MEM_mallocN(sizeof(float)*resolv, "makeNurbfaces4"); jend= (int *)MEM_mallocN(sizeof(float)*resolv, "makeNurbfaces5"); /* precalculation of basisv and jstart,jend */ - if(nu->flagv & 1) cycl= nu->orderv-1; + if(nu->flagv & CU_CYCLIC) cycl= nu->orderv-1; else cycl= 0; v= vstart; basis= basisv; @@ -710,7 +720,7 @@ void makeNurbfaces(Nurb *nu, float *data, int rowstride) v+= vstep; } - if(nu->flagu & 1) cycl= nu->orderu-1; + if(nu->flagu & CU_CYCLIC) cycl= nu->orderu-1; else cycl= 0; in= data; u= ustart; @@ -824,12 +834,12 @@ void makeNurbcurve(Nurb *nu, float *data, int resolu, int dim) fp= nu->knotsu; ustart= fp[nu->orderu-1]; - if(nu->flagu & 1) uend= fp[nu->pntsu+nu->orderu-1]; + if(nu->flagu & CU_CYCLIC) uend= fp[nu->pntsu+nu->orderu-1]; else uend= fp[nu->pntsu]; - ustep= (uend-ustart)/(resolu-1+(nu->flagu & 1)); + ustep= (uend-ustart)/(resolu-1+(nu->flagu & CU_CYCLIC)); basisu= (float *)MEM_mallocN(sizeof(float)*KNOTSU(nu), "makeNurbcurve3"); - if(nu->flagu & 1) cycl= nu->orderu-1; + if(nu->flagu & CU_CYCLIC) cycl= nu->orderu-1; else cycl= 0; in= data; @@ -1429,14 +1439,14 @@ static void alfa_bezpart(BezTriple *prevbezt, BezTriple *bezt, Nurb *nu, float * /* returns a point */ if(prevbezt==nu->bezt) { - if(nu->flagu & 1) pprev= last; + if(nu->flagu & CU_CYCLIC) pprev= last; else pprev= prevbezt; } else pprev= prevbezt-1; /* next point */ if(bezt==last) { - if(nu->flagu & 1) next= nu->bezt; + if(nu->flagu & CU_CYCLIC) next= nu->bezt; else next= bezt; } else next= bezt+1; @@ -1497,7 +1507,7 @@ void makeBevelList(Object *ob) bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList"); BLI_addtail(&(cu->bev), bl); - if(nu->flagu & 1) bl->poly= 0; + if(nu->flagu & CU_CYCLIC) bl->poly= 0; else bl->poly= -1; bl->nr= len; bl->flag= 0; @@ -1516,17 +1526,17 @@ void makeBevelList(Object *ob) } else if((nu->type & 7)==CU_BEZIER) { - len= resolu*(nu->pntsu+ (nu->flagu & 1) -1)+1; /* in case last point is not cyclic */ + len= resolu*(nu->pntsu+ (nu->flagu & CU_CYCLIC) -1)+1; /* in case last point is not cyclic */ bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList"); BLI_addtail(&(cu->bev), bl); - if(nu->flagu & 1) bl->poly= 0; + if(nu->flagu & CU_CYCLIC) bl->poly= 0; else bl->poly= -1; bevp= (BevPoint *)(bl+1); a= nu->pntsu-1; bezt= nu->bezt; - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { a++; prevbezt= nu->bezt+(nu->pntsu-1); } @@ -1599,7 +1609,7 @@ void makeBevelList(Object *ob) MEM_freeN(data); MEM_freeN(data_a); - if((nu->flagu & 1)==0) { /* not cyclic: endpoint */ + if((nu->flagu & CU_CYCLIC)==0) { /* not cyclic: endpoint */ bevp->x= prevbezt->vec[1][0]; bevp->y= prevbezt->vec[1][1]; bevp->z= prevbezt->vec[1][2]; @@ -1615,7 +1625,7 @@ void makeBevelList(Object *ob) BLI_addtail(&(cu->bev), bl); bl->nr= len; bl->flag= 0; - if(nu->flagu & 1) bl->poly= 0; + if(nu->flagu & CU_CYCLIC) bl->poly= 0; else bl->poly= -1; bevp= (BevPoint *)(bl+1); @@ -2213,7 +2223,7 @@ void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */ a= nu->pntsu; bezt= nu->bezt; - if(nu->flagu & 1) prev= bezt+(a-1); + if(nu->flagu & CU_CYCLIC) prev= bezt+(a-1); else prev= 0; next= bezt+1; @@ -2221,7 +2231,7 @@ void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */ calchandleNurb(bezt, prev, next, 0); prev= bezt; if(a==1) { - if(nu->flagu & 1) next= nu->bezt; + if(nu->flagu & CU_CYCLIC) next= nu->bezt; else next= 0; } else next++; @@ -2620,7 +2630,7 @@ int check_valid_nurb_u( struct Nurb *nu ) if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */ if (nu->pntsu < nu->orderu) return 0; - if ((nu->flagu>>1) & 2) { /* Bezier U Endpoints */ + if (((nu->flag & CU_CYCLIC)==0) && ((nu->flagu>>1) & 2)) { /* Bezier U Endpoints */ if (nu->orderu==4) { if (nu->pntsu < 5) return 0; /* bezier with 4 orderu needs 5 points */ } else if (nu->orderu != 3) return 0; /* order must be 3 or 4 */ @@ -2634,7 +2644,7 @@ int check_valid_nurb_v( struct Nurb *nu) if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */ if (nu->pntsv < nu->orderv) return 0; - if ((nu->flagv>>1) & 2) { /* Bezier V Endpoints */ + if (((nu->flag & CU_CYCLIC)==0) && ((nu->flagv>>1) & 2)) { /* Bezier V Endpoints */ if (nu->orderv==4) { if (nu->pntsv < 5) return 0; /* bezier with 4 orderu needs 5 points */ } else if (nu->orderv != 3) return 0; /* order must be 3 or 4 */ @@ -2649,7 +2659,7 @@ int clamp_nurb_order_u( struct Nurb *nu ) nu->orderu= nu->pntsu; change= 1; } - if((nu->flagu>>1)&2) { + if(((nu->flag & CU_CYCLIC)==0) && (nu->flagu>>1)&2) { CLAMP(nu->orderu, 3,4); change= 1; } @@ -2663,7 +2673,7 @@ int clamp_nurb_order_v( struct Nurb *nu) nu->orderv= nu->pntsv; change= 1; } - if((nu->flagv>>1)&2) { + if(((nu->flag & CU_CYCLIC)==0) && (nu->flagv>>1)&2) { CLAMP(nu->orderv, 3,4); change= 1; } diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index a8f300f4315..298e4b81d5b 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -816,7 +816,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase) data= dl->verts; - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { dl->type= DL_POLY; a= nu->pntsu; } @@ -863,7 +863,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase) dl->charidx = nu->charidx; data= dl->verts; - if(nu->flagu & 1) dl->type= DL_POLY; + if(nu->flagu & CU_CYCLIC) dl->type= DL_POLY; else dl->type= DL_SEGM; makeNurbcurve(nu, data, resolu, 3); } @@ -878,7 +878,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase) dl->charidx = nu->charidx; data= dl->verts; - if(nu->flagu & 1) dl->type= DL_POLY; + if(nu->flagu & CU_CYCLIC) dl->type= DL_POLY; else dl->type= DL_SEGM; a= len; @@ -1330,7 +1330,7 @@ void makeDispListSurf(Object *ob, ListBase *dispbase, int forRender) dl->rt= nu->flag; data= dl->verts; - if(nu->flagu & 1) dl->type= DL_POLY; + if(nu->flagu & CU_CYCLIC) dl->type= DL_POLY; else dl->type= DL_SEGM; makeNurbcurve(nu, data, nu->resolu, 3); diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 464f97d294d..8b979f9ed23 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -150,7 +150,7 @@ void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vfd) nu->type= CU_BEZIER+CU_2D; nu->pntsu = onpoints[j]; nu->resolu= 8; - nu->flagu= 1; + nu->flagu= CU_CYCLIC; nu->bezt = bezt; //individual curve loop, start-end diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c index 8cdc0601c7e..498c87cdef9 100644 --- a/source/blender/blenlib/intern/psfont.c +++ b/source/blender/blenlib/intern/psfont.c @@ -2017,7 +2017,7 @@ static VFontData *objfnt_to_vfontdata(objfnt *fnt) nu->type= CU_BEZIER+CU_2D; nu->pntsu = count; nu->resolu= 8; - nu->flagu= 1; + nu->flagu= CU_CYCLIC; nu->bezt = bezt; stop = 0; diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 6e57736845e..1365baf075a 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -3104,14 +3104,14 @@ void do_curvebuts(unsigned short event) if(isNurbsel(nu)) { if((nu->type & 7)==CU_NURBS) { if(eventflagu &= 1; - nu->flagu += ((event-B_UNIFU)<<1); + nu->flagu &= CU_CYCLIC; /* disable all flags except for CU_CYCLIC */ + nu->flagu |= ((event-B_UNIFU)<<1); clamp_nurb_order_u(nu); makeknots(nu, 1, nu->flagu>>1); } else if(nu->pntsv>1) { - nu->flagv &= 1; - nu->flagv += ((event-B_UNIFV)<<1); + nu->flagv &= CU_CYCLIC; /* disable all flags except for CU_CYCLIC */ + nu->flagv |= ((event-B_UNIFV)<<1); clamp_nurb_order_v(nu); makeknots(nu, 2, nu->flagv>>1); } diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index 3cb951c319b..bd0abe83ee4 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -906,8 +906,10 @@ void adduplicateflagNurb(short flag) bezt1++; } - if(nu->flagu & 1) { - if(starta!=0 || enda!=nu->pntsu-1) newnu->flagu--; + if(nu->flagu & CU_CYCLIC) { + if(starta!=0 || enda!=nu->pntsu-1) { + newnu->flagu &= ~CU_CYCLIC; + } } } bezt++; @@ -941,8 +943,10 @@ void adduplicateflagNurb(short flag) bp1++; } - if(nu->flagu & 1) { - if(starta!=0 || enda!=nu->pntsu-1) newnu->flagu--; + if(nu->flagu & CU_CYCLIC) { + if(starta!=0 || enda!=nu->pntsu-1) { + newnu->flagu &= ~CU_CYCLIC; + } } /* knots */ @@ -1583,7 +1587,7 @@ void subdivideNurb() newly created. Old points are discarded. */ /* count */ - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { a= nu->pntsu; bezt= nu->bezt; prevbezt= bezt+(a-1); @@ -1604,7 +1608,7 @@ void subdivideNurb() beztnew = (BezTriple*)MEM_mallocN((amount + nu->pntsu) * sizeof(BezTriple), "subdivNurb"); beztn= beztnew; - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { a= nu->pntsu; bezt= nu->bezt; prevbezt= bezt+(a-1); @@ -1636,7 +1640,7 @@ void subdivideNurb() VecMidf(beztn->vec[1], vec+9, vec+12); VECCOPY(beztn->vec[2], vec+12); /* handle of next bezt */ - if(a==0 && (nu->flagu & 1)) {VECCOPY(beztnew->vec[0], vec+6);} + if(a==0 && (nu->flagu & CU_CYCLIC)) {VECCOPY(beztnew->vec[0], vec+6);} else {VECCOPY(bezt->vec[0], vec+6);} beztn->radius = (prevbezt->radius + bezt->radius)/2.0f; @@ -1649,7 +1653,7 @@ void subdivideNurb() bezt++; } /* last point */ - if((nu->flagu & 1)==0) memcpy(beztn, prevbezt, sizeof(BezTriple)); + if((nu->flagu & CU_CYCLIC)==0) memcpy(beztn, prevbezt, sizeof(BezTriple)); MEM_freeN(nu->bezt); nu->bezt= beztnew; @@ -1666,7 +1670,7 @@ void subdivideNurb() stable... nzc 30-5-'00 */ /* count */ - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { a= nu->pntsu*nu->pntsv; bp= nu->bp; prevbp= bp+(a-1); @@ -1688,7 +1692,7 @@ void subdivideNurb() (BPoint*)MEM_mallocN((amount + nu->pntsu) * sizeof(BPoint), "subdivNurb2"); bpn= bpnew; - if(nu->flagu & 1) { + if(nu->flagu & CU_CYCLIC) { a= nu->pntsu; bp= nu->bp; prevbp= bp+(a-1); @@ -1715,7 +1719,7 @@ void subdivideNurb() prevbp= bp; bp++; } - if((nu->flagu & 1)==0) memcpy(bpn, prevbp, sizeof(BPoint)); /* last point */ + if((nu->flagu & CU_CYCLIC)==0) memcpy(bpn, prevbp, sizeof(BPoint)); /* last point */ MEM_freeN(nu->bp); nu->bp= bpnew; @@ -2089,7 +2093,7 @@ int convertspline(short type, Nurb *nu) nu->type &= ~7; nu->type+= 4; nu->orderu= 4; - nu->flagu &= 1; + nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */ nu->flagu += 4; makeknots(nu, 1, nu->flagu>>1); a= nu->pntsu*nu->pntsv; @@ -2140,10 +2144,10 @@ int convertspline(short type, Nurb *nu) nu->orderv= 1; nu->type &= ~7; nu->type+= type; - if(nu->flagu & 1) c= nu->orderu-1; + if(nu->flagu & CU_CYCLIC) c= nu->orderu-1; else c= 0; if(type== 4) { - nu->flagu &= 1; + nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */ nu->flagu += 4; makeknots(nu, 1, nu->flagu>>1); } @@ -2541,7 +2545,7 @@ void addsegment_nurb() /* find both nurbs and points, nu1 will be put behind nu2 */ for(nu= editNurb.first; nu; nu= nu->next) { - if((nu->flagu & 1)==0) { /* not cyclic */ + if((nu->flagu & CU_CYCLIC)==0) { /* not cyclic */ if( (nu->type & 7)==CU_BEZIER ) { bezt= nu->bezt; if(nu1==0) { @@ -2822,7 +2826,7 @@ static void spin_nurb(float *dvec, short mode) for(nu= editNurb.first; nu; nu= nu->next) { if(isNurbsel(nu)) { nu->orderv= 4; - nu->flagv |= 1; + nu->flagv |= CU_CYCLIC; makeknots(nu, 2, nu->flagv>>1); } } @@ -3020,8 +3024,8 @@ void makecyclicNurb() bp= nu->bp; while(a--) { if( bp->f1 & SELECT ) { - if(nu->flagu & CU_CYCLIC) nu->flagu--; - else nu->flagu++; + if(nu->flagu & CU_CYCLIC) nu->flagu &= ~CU_CYCLIC; + else nu->flagu |= CU_CYCLIC; break; } bp++; @@ -3032,8 +3036,8 @@ void makecyclicNurb() bezt= nu->bezt; while(a--) { if( BEZSELECTED_HIDDENHANDLES(bezt) ) { - if(nu->flagu & CU_CYCLIC) nu->flagu--; - else nu->flagu++; + if(nu->flagu & CU_CYCLIC) nu->flagu &= ~CU_CYCLIC; + else nu->flagu |= CU_CYCLIC; break; } bezt++; @@ -3046,9 +3050,9 @@ void makecyclicNurb() bp= nu->bp; while(a--) { if( bp->f1 & SELECT ) { - if(nu->flagu & CU_CYCLIC) nu->flagu--; + if(nu->flagu & CU_CYCLIC) nu->flagu &= ~CU_CYCLIC; else { - nu->flagu++; + nu->flagu |= CU_CYCLIC; nu->flagu &= ~2; /* endpoint flag, fixme */ fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); b= (nu->orderu+nu->pntsu); @@ -3076,9 +3080,9 @@ void makecyclicNurb() if( bp->f1 & SELECT) { if(cyclmode==1 && nu->pntsu>1) { - if(nu->flagu & CU_CYCLIC) nu->flagu--; + if(nu->flagu & CU_CYCLIC) nu->flagu &= ~CU_CYCLIC; else { - nu->flagu++; + nu->flagu |= CU_CYCLIC; if (check_valid_nurb_u(nu)) { fp= MEM_mallocN(sizeof(float)*KNOTSU(nu), "makecyclicN"); b= (nu->orderu+nu->pntsu); @@ -3765,10 +3769,10 @@ void delNurb() bezt2= bezt+1; if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) ; else { /* maybe do not make cyclic */ - if(a==0 && (nu->flagu & 1) ) { + if(a==0 && (nu->flagu & CU_CYCLIC) ) { bezt2= bezt+(nu->pntsu-1); if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) { - nu->flagu--; + nu->flagu &= ~CU_CYCLIC; DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); @@ -3792,10 +3796,10 @@ void delNurb() bp2= bp+1; if( bp2->f1 & 1 ) ; else { /* maybe do not make cyclic */ - if(a==0 && (nu->flagu & 1) ) { + if(a==0 && (nu->flagu & CU_CYCLIC) ) { bp2= bp+(nu->pntsu-1); - if( bp2->f1 & 1 ) { - nu->flagu--; + if( bp2->f1 & SELECT ) { + nu->flagu &= ~CU_CYCLIC; DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); @@ -3821,14 +3825,14 @@ void delNurb() BLI_remlink(&editNurb, nu); freeNurb(nu); nu = NULL; } - else if(nu1->flagu & 1) { /* cyclic */ + else if(nu1->flagu & CU_CYCLIC) { /* cyclic */ bezt = (BezTriple*)MEM_mallocN((cut+1) * sizeof(BezTriple), "delNurb1"); memcpy(bezt, nu1->bezt,(cut+1)*sizeof(BezTriple)); a= nu1->pntsu-cut-1; memcpy(nu1->bezt, bezt2, a*sizeof(BezTriple)); memcpy(nu1->bezt+a, bezt, (cut+1)*sizeof(BezTriple)); - nu1->flagu--; + nu1->flagu &= ~CU_CYCLIC; MEM_freeN(bezt); calchandlesNurb(nu); } @@ -3863,14 +3867,14 @@ void delNurb() BLI_remlink(&editNurb, nu); freeNurb(nu); nu= NULL; } - else if(nu1->flagu & 1) { /* cyclic */ + else if(nu1->flagu & CU_CYCLIC) { /* cyclic */ bp = (BPoint*)MEM_mallocN((cut+1) * sizeof(BPoint), "delNurb5"); memcpy(bp, nu1->bp,(cut+1)*sizeof(BPoint)); a= nu1->pntsu-cut-1; memcpy(nu1->bp, bp2, a*sizeof(BPoint)); memcpy(nu1->bp+a, bp, (cut+1)*sizeof(BPoint)); - nu1->flagu--; + nu1->flagu &= ~CU_CYCLIC; MEM_freeN(bp); } else { /* add new curve */ @@ -4180,7 +4184,7 @@ Nurb *addNurbprim(int type, int stype, int newname) if((type & 7)==CU_BEZIER) { nu->pntsu= 4; nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1"); - nu->flagu= 1; + nu->flagu= CU_CYCLIC; bezt= nu->bezt; for(a=0;a<3;a++) { @@ -4229,7 +4233,7 @@ Nurb *addNurbprim(int type, int stype, int newname) nu->pntsv= 1; nu->orderu= 4; nu->bp= callocstructN(BPoint, 8, "addNurbprim6"); - nu->flagu= 1; + nu->flagu= CU_CYCLIC; bp= nu->bp; for(a=0; a<8; a++) { From ae2a0bb2739ee0f45e882789aaa26bdc8cabc0a9 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 26 May 2008 12:52:28 +0000 Subject: [PATCH 117/430] Bug fix Force proportional editing flag off in object mode. While it didn't have any effect on objects themselves, it could display the falloff mode (Smooth) in the header. The bug was purely cosmetic. --- source/blender/src/transform_conversions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index f69218664ea..4be525f4945 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -4054,6 +4054,7 @@ void createTransData(TransInfo *t) t->flag |= T_POINTS; } else { + t->flag &= ~T_PROP_EDIT; /* no proportional edit in object mode */ createTransObject(t); t->flag |= T_OBJECT; } From a2298cb980cc9f5294375cf9b14d68054d5e4ad5 Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Mon, 26 May 2008 15:12:20 +0000 Subject: [PATCH 118/430] bugfix for crasher from Cedric Paille via bf-committers. --- source/blender/python/api2_2x/Particle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Particle.c b/source/blender/python/api2_2x/Particle.c index 15307cc2be5..f0a32db0623 100644 --- a/source/blender/python/api2_2x/Particle.c +++ b/source/blender/python/api2_2x/Particle.c @@ -828,7 +828,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ /* little hack to calculate hair steps in render mode */ psys->renderdata = (void*)(int)1; - psys_cache_paths(ob, psys, cfra, 0); + psys_cache_paths(ob, psys, cfra, 1); psys->renderdata = NULL; From fc8cd192a3a22322f6127345dc14f8463b35ee1f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 26 May 2008 16:19:30 +0000 Subject: [PATCH 119/430] soc-2008-mxcurioni: Freestyle compiles but crashes at runtime because of the Python environment. I analyzed the crash with gdb and PyImport_AddModule ("__main__") in Python/import.c:320 seems responsible for the crash: apparently, "__main__" is not found and causes the error "No such file or directory". I have to figure out what's wrong with the current configuration, especially whether Freestyle's PythonInterpreter can be used as is. I am going to see whether it's just quicker to use Blender's functions. --- .../intern/app_blender/AppConfig.cpp | 5 +- .../intern/app_blender/AppGLWidget.h | 6 +- .../{camera.cpp => AppGLWidget_camera.cpp} | 2 +- .../{camera.h => AppGLWidget_camera.h} | 2 +- .../{config.h => AppGLWidget_config.h} | 2 +- ...{constraint.h => AppGLWidget_constraint.h} | 4 +- .../{frame.cpp => AppGLWidget_frame.cpp} | 4 +- .../{frame.h => AppGLWidget_frame.h} | 2 +- ...=> AppGLWidget_manipulatedCameraFrame.cpp} | 4 +- ...h => AppGLWidget_manipulatedCameraFrame.h} | 2 +- ...e.cpp => AppGLWidget_manipulatedFrame.cpp} | 4 +- ...Frame.h => AppGLWidget_manipulatedFrame.h} | 2 +- .../{point.h => AppGLWidget_point.h} | 0 ...ternion.cpp => AppGLWidget_quaternion.cpp} | 2 +- ...{quaternion.h => AppGLWidget_quaternion.h} | 4 +- .../{vec.cpp => AppGLWidget_vec.cpp} | 2 +- .../app_blender/{vec.h => AppGLWidget_vec.h} | 2 +- .../intern/app_blender/Controller.cpp | 65 ++ .../freestyle/intern/app_blender/Controller.h | 3 + .../freestyle/intern/app_blender/api.cpp | 7 +- .../app_blender/old_camera_vec_quaternion.txt | 593 ------------------ .../intern/app_blender/test_config.h | 6 + .../intern/system/PythonInterpreter.h | 32 +- 23 files changed, 122 insertions(+), 633 deletions(-) rename source/blender/freestyle/intern/app_blender/{camera.cpp => AppGLWidget_camera.cpp} (99%) rename source/blender/freestyle/intern/app_blender/{camera.h => AppGLWidget_camera.h} (99%) rename source/blender/freestyle/intern/app_blender/{config.h => AppGLWidget_config.h} (97%) rename source/blender/freestyle/intern/app_blender/{constraint.h => AppGLWidget_constraint.h} (99%) rename source/blender/freestyle/intern/app_blender/{frame.cpp => AppGLWidget_frame.cpp} (99%) rename source/blender/freestyle/intern/app_blender/{frame.h => AppGLWidget_frame.h} (99%) rename source/blender/freestyle/intern/app_blender/{manipulatedCameraFrame.cpp => AppGLWidget_manipulatedCameraFrame.cpp} (97%) rename source/blender/freestyle/intern/app_blender/{manipulatedCameraFrame.h => AppGLWidget_manipulatedCameraFrame.h} (99%) rename source/blender/freestyle/intern/app_blender/{manipulatedFrame.cpp => AppGLWidget_manipulatedFrame.cpp} (98%) rename source/blender/freestyle/intern/app_blender/{manipulatedFrame.h => AppGLWidget_manipulatedFrame.h} (99%) rename source/blender/freestyle/intern/app_blender/{point.h => AppGLWidget_point.h} (100%) rename source/blender/freestyle/intern/app_blender/{quaternion.cpp => AppGLWidget_quaternion.cpp} (99%) rename source/blender/freestyle/intern/app_blender/{quaternion.h => AppGLWidget_quaternion.h} (99%) rename source/blender/freestyle/intern/app_blender/{vec.cpp => AppGLWidget_vec.cpp} (98%) rename source/blender/freestyle/intern/app_blender/{vec.h => AppGLWidget_vec.h} (99%) delete mode 100644 source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt create mode 100644 source/blender/freestyle/intern/app_blender/test_config.h diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.cpp b/source/blender/freestyle/intern/app_blender/AppConfig.cpp index de4b71c5241..a2fa8787fa9 100755 --- a/source/blender/freestyle/intern/app_blender/AppConfig.cpp +++ b/source/blender/freestyle/intern/app_blender/AppConfig.cpp @@ -18,6 +18,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#include "test_config.h" + #include "AppConfig.h" #include @@ -33,8 +35,7 @@ namespace Config{ // get the root directory //soc //setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR")); - setRootDir("/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle"); - cout << _PythonPath << endl; + setRootDir( TEST_ROOT_DIR ); //setRootDir(QString(".")); _pInstance = this; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 492fafc883a..3cf7844876d 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -48,9 +48,9 @@ using namespace std; //# include //soc -#include "camera.h" -#include "vec.h" -#include "quaternion.h" +#include "AppGLWidget_camera.h" +#include "AppGLWidget_vec.h" +#include "AppGLWidget_quaternion.h" using namespace Geometry; diff --git a/source/blender/freestyle/intern/app_blender/camera.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp similarity index 99% rename from source/blender/freestyle/intern/app_blender/camera.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp index 25af0550e6c..23c3b2f09a4 100644 --- a/source/blender/freestyle/intern/app_blender/camera.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp @@ -23,7 +23,7 @@ *****************************************************************************/ -#include "camera.h" +#include "AppGLWidget_camera.h" //#include "qglviewer.h" using namespace std; diff --git a/source/blender/freestyle/intern/app_blender/camera.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/camera.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h index d6dad1dd895..cd349803712 100644 --- a/source/blender/freestyle/intern/app_blender/camera.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h @@ -26,7 +26,7 @@ #ifndef QGLVIEWER_CAMERA_H #define QGLVIEWER_CAMERA_H -#include "manipulatedCameraFrame.h" +#include "AppGLWidget_manipulatedCameraFrame.h" /*! \brief A perspective or orthographic camera. \class Camera camera.h QGLViewer/camera.h diff --git a/source/blender/freestyle/intern/app_blender/config.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h similarity index 97% rename from source/blender/freestyle/intern/app_blender/config.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_config.h index c1b65aad560..c2fc1b092e1 100644 --- a/source/blender/freestyle/intern/app_blender/config.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_config.h @@ -18,7 +18,7 @@ using namespace std; -#include "point.h" +#include "AppGLWidget_point.h" # ifdef WIN32 # include diff --git a/source/blender/freestyle/intern/app_blender/constraint.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/constraint.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h index 871cb2be098..64e8d333d74 100644 --- a/source/blender/freestyle/intern/app_blender/constraint.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h @@ -26,8 +26,8 @@ #ifndef QGLVIEWER_CONSTRAINT_H #define QGLVIEWER_CONSTRAINT_H -#include "vec.h" -#include "quaternion.h" +#include "AppGLWidget_vec.h" +#include "AppGLWidget_quaternion.h" //namespace qglviewer { class Frame; diff --git a/source/blender/freestyle/intern/app_blender/frame.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.cpp similarity index 99% rename from source/blender/freestyle/intern/app_blender/frame.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_frame.cpp index 26c2ee5d2b4..8fb17a7c1c6 100644 --- a/source/blender/freestyle/intern/app_blender/frame.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.cpp @@ -23,7 +23,7 @@ *****************************************************************************/ -#include "frame.h" +#include "AppGLWidget_frame.h" #include //using namespace qglviewer; @@ -653,7 +653,7 @@ void Frame::setReferenceFrame(const Frame* const refFrame) cout << "Frame::setReferenceFrame would create a loop in Frame hierarchy" << endl; else { - bool identical = (referenceFrame_ == refFrame); + //bool identical = (referenceFrame_ == refFrame); referenceFrame_ = refFrame; } } diff --git a/source/blender/freestyle/intern/app_blender/frame.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/frame.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_frame.h index 1ff3d91f75c..30297499285 100644 --- a/source/blender/freestyle/intern/app_blender/frame.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_frame.h @@ -26,7 +26,7 @@ #ifndef QGLVIEWER_FRAME_H #define QGLVIEWER_FRAME_H -#include "constraint.h" +#include "AppGLWidget_constraint.h" // #include "GL/gl.h" is now included in config.h for ease of configuration //namespace qglviewer { diff --git a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp similarity index 97% rename from source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp index c4e2e67b26a..7b52b90eedc 100644 --- a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp @@ -23,8 +23,8 @@ *****************************************************************************/ -#include "manipulatedCameraFrame.h" -#include "camera.h" +#include "AppGLWidget_manipulatedCameraFrame.h" +#include "AppGLWidget_camera.h" //#include "qglviewer.h" // #if QT_VERSION >= 0x040000 diff --git a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h index 3c28edab622..df9d8f8e7e3 100644 --- a/source/blender/freestyle/intern/app_blender/manipulatedCameraFrame.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h @@ -26,7 +26,7 @@ #ifndef QGLVIEWER_MANIPULATED_CAMERA_FRAME_H #define QGLVIEWER_MANIPULATED_CAMERA_FRAME_H -#include "manipulatedFrame.h" +#include "AppGLWidget_manipulatedFrame.h" //namespace qglviewer { /*! \brief The ManipulatedCameraFrame class represents a ManipulatedFrame with Camera specific mouse bindings. diff --git a/source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp similarity index 98% rename from source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp index 6721204383d..31243308472 100644 --- a/source/blender/freestyle/intern/app_blender/manipulatedFrame.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp @@ -23,9 +23,9 @@ *****************************************************************************/ -#include "manipulatedFrame.h" +#include "AppGLWidget_manipulatedFrame.h" //#include "qglviewer.h" -#include "camera.h" +#include "AppGLWidget_camera.h" //using namespace qglviewer; using namespace std; diff --git a/source/blender/freestyle/intern/app_blender/manipulatedFrame.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/manipulatedFrame.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h index 8ad815f0a63..4dfc82c672a 100644 --- a/source/blender/freestyle/intern/app_blender/manipulatedFrame.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h @@ -26,7 +26,7 @@ #ifndef QGLVIEWER_MANIPULATED_FRAME_H #define QGLVIEWER_MANIPULATED_FRAME_H -#include "frame.h" +#include "AppGLWidget_frame.h" //namespace qglviewer { /*! \brief A ManipulatedFrame is a Frame that can be rotated and translated using the mouse. diff --git a/source/blender/freestyle/intern/app_blender/point.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h similarity index 100% rename from source/blender/freestyle/intern/app_blender/point.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_point.h diff --git a/source/blender/freestyle/intern/app_blender/quaternion.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.cpp similarity index 99% rename from source/blender/freestyle/intern/app_blender/quaternion.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.cpp index 3dd42ed6ed3..77219cdce1a 100644 --- a/source/blender/freestyle/intern/app_blender/quaternion.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.cpp @@ -23,7 +23,7 @@ *****************************************************************************/ -#include "quaternion.h" +#include "AppGLWidget_quaternion.h" #include // RAND_MAX // All the methods are declared inline in Quaternion.h diff --git a/source/blender/freestyle/intern/app_blender/quaternion.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/quaternion.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.h index e3bc876aa4c..e6242e908b1 100644 --- a/source/blender/freestyle/intern/app_blender/quaternion.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_quaternion.h @@ -26,8 +26,8 @@ #ifndef QGLVIEWER_QUATERNION_H #define QGLVIEWER_QUATERNION_H -#include "config.h" -#include "vec.h" +#include "AppGLWidget_config.h" +#include "AppGLWidget_vec.h" /*! \brief The Quaternion class represents 3D rotations and orientations. \class Quaternion quaternion.h QGLViewer/quaternion.h diff --git a/source/blender/freestyle/intern/app_blender/vec.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.cpp similarity index 98% rename from source/blender/freestyle/intern/app_blender/vec.cpp rename to source/blender/freestyle/intern/app_blender/AppGLWidget_vec.cpp index a44dd1ed6ed..2fad849238d 100644 --- a/source/blender/freestyle/intern/app_blender/vec.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.cpp @@ -23,7 +23,7 @@ *****************************************************************************/ -#include "vec.h" +#include "AppGLWidget_vec.h" // Most of the methods are declared inline in vec.h using namespace std; diff --git a/source/blender/freestyle/intern/app_blender/vec.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.h similarity index 99% rename from source/blender/freestyle/intern/app_blender/vec.h rename to source/blender/freestyle/intern/app_blender/AppGLWidget_vec.h index ff17917fac8..47643a19e8e 100644 --- a/source/blender/freestyle/intern/app_blender/vec.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_vec.h @@ -26,7 +26,7 @@ #ifndef QGLVIEWER_VEC_H #define QGLVIEWER_VEC_H -#include "config.h" +#include "AppGLWidget_config.h" // #include diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 9401f1ae281..25d9653b8f4 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -108,6 +108,8 @@ Controller::Controller() _ComputeSteerableViewMap = false; _ComputeSuggestive = true; _sphereRadius = 1.0; + + init_options(); } Controller::~Controller() @@ -1053,3 +1055,66 @@ void Controller::displayDensityCurves(int x, int y){ // _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); // _pDensityCurvesWindow->show(); } + +void Controller::init_options(){ +// //from AppOptionsWindow.cpp +// +// // Directories +// ViewMapIO::Options::setModelsPath((const char*)modelsPathLineEdit->text().toAscii().data()); +// PythonInterpreter::Options::setPythonPath((const char*)pythonPathLineEdit->text().toAscii().data()); +// TextureManager::Options::setPatternsPath((const char*)patternsPathLineEdit->text().toAscii().data()); +// TextureManager::Options::setBrushesPath((const char*)brushesPathLineEdit->text().toAscii().data()); +// //g_pController->setBrowserCmd(browserCmdLineEdit->text()); +// //g_pController->setHelpIndex(helpIndexPathLineEdit->text()); +// +// // ViewMap Format +// if (asFloatCheckBox->isChecked()) +// ViewMapIO::Options::addFlags(ViewMapIO::Options::FLOAT_VECTORS); +// else +// ViewMapIO::Options::rmFlags(ViewMapIO::Options::FLOAT_VECTORS); +// if (noOccluderListCheckBox->isChecked()) +// ViewMapIO::Options::addFlags(ViewMapIO::Options::NO_OCCLUDERS); +// else +// ViewMapIO::Options::rmFlags(ViewMapIO::Options::NO_OCCLUDERS); +// g_pController->setComputeSteerableViewMapFlag(steerableViewMapCheckBox->isChecked()); +// +// // Visibility +// if (qiCheckBox->isChecked()) +// g_pController->setQuantitativeInvisibility(true); +// else +// g_pController->setQuantitativeInvisibility(false); +// +// // Papers Textures +// vector sl; +// for (unsigned i = 0; i < paperTexturesList->count(); i++) { +// sl.push_back(paperTexturesList->item(i)->text().toAscii().constData()); +// } +// TextureManager::Options::setPaperTextures(sl); +// +// // Drawing Buffers +// if (frontBufferCheckBox->isChecked()) +// g_pController->setFrontBufferFlag(true); +// else +// g_pController->setFrontBufferFlag(false); +// if (backBufferCheckBox->isChecked()) +// g_pController->setBackBufferFlag(true); +// else +// g_pController->setBackBufferFlag(false); +// +// // Ridges and Valleys +// g_pController->setComputeRidgesAndValleysFlag(ridgeValleyCheckBox->isChecked()); +// // Suggestive Contours +// g_pController->setComputeSuggestiveContoursFlag(suggestiveContoursCheckBox->isChecked()); +// bool ok; +// real r = sphereRadiusLineEdit->text().toFloat(&ok); +// if(ok) +// g_pController->setSphereRadius(r); +// else +// sphereRadiusLineEdit->setText(QString(QString::number(g_pController->getSphereRadius()))); +// r = krEpsilonLineEdit->text().toFloat(&ok); +// if(ok) +// g_pController->setSuggestiveContourKrDerivativeEpsilon(r); +// else +// krEpsilonLineEdit->setText(QString(QString::number(g_pController->getSuggestiveContourKrDerivativeEpsilon()))); +// } +} diff --git a/source/blender/freestyle/intern/app_blender/Controller.h b/source/blender/freestyle/intern/app_blender/Controller.h index 5727db5705a..77f28071791 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.h +++ b/source/blender/freestyle/intern/app_blender/Controller.h @@ -59,6 +59,9 @@ public: void SetView(AppGLWidget *iView); + //soc + void init_options(); + int Load3DSFile(const char *iFileName); void CloseFile(); void LoadViewMapFile(const char *iFileName, bool only_camera = false); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 0601ce191f9..5f3d8224ec5 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -2,6 +2,7 @@ #include "AppGLWidget.h" #include "Controller.h" #include "AppConfig.h" +#include "test_config.h" #include @@ -20,13 +21,13 @@ extern "C" { c->SetView(view); - c->Load3DSFile( "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" ); + c->Load3DSFile( TEST_3DS_FILE ); - c->InsertStyleModule( 0, "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" ); + c->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); c->toggleLayer(0, true); c->ComputeViewMap(); - //c->DrawStrokes(); + c->DrawStrokes(); cout << "Freestyle end" << endl; diff --git a/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt b/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt deleted file mode 100644 index 0d10049ee15..00000000000 --- a/source/blender/freestyle/intern/app_blender/old_camera_vec_quaternion.txt +++ /dev/null @@ -1,593 +0,0 @@ -// -// Filename : AppConfig.h -// Author : Stephane Grabli -// Purpose : Configuration file -// Date of creation : 26/02/2003 -// -/////////////////////////////////////////////////////////////////////////////// - -// -// Copyright (C) : Please refer to the COPYRIGHT file distributed -// with this source distribution. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef ARTGLWIDGET_H -# define ARTGLWIDGET_H - -# ifndef WIN32 -# include -using namespace std; -# define __min(x,y) (min(x,y)) -# define __max(x,y) (max(x,y)) -# endif // WIN32 - - -//# include -# include "../geometry/Geom.h" -# include "../geometry/BBox.h" -# include "../scene_graph/NodeDrawingStyle.h" -# include "../system/TimeUtils.h" -# include "../system/Precision.h" -# include "AppConfig.h" -# include "../rendering/GLDebugRenderer.h" -//# include - -using namespace Geometry; - -typedef enum {SURFACIC, LINE, DEPTHBUFFER} RenderStyle; - -class FEdge; -class QMainWindow; -class GLRenderer; -class GLSelectRenderer; -class GLBBoxRenderer; -class GLMonoColorRenderer; -class GLDebugRenderer; - -class Vec{ -public: - Vec() {}; - Vec(float _x, float _y, float _z): x(_x), y(_y), z(_z) {}; - ~Vec() {} - - float operator[] (unsigned i) { - switch(i){ - case 0: return x; break; - case 1: return y; break; - case 2: return z; break; - } - return 0.0; - } - - - float x,y,z; -}; - -class Quaternion{ -public: - Quaternion( float _x, float _y, float _z, float _s): x(_x), y(_y), z(_z), s(_s){}; - ~Quaternion() {} - - float operator[] (unsigned i) { - switch(i){ - case 0: return x; break; - case 1: return y; break; - case 2: return z; break; - case 3: return s; break; - } - return 0.0; - } - - float x,y,z,s; -}; - -class Camera { - private: - float _position[3]; - float _orientation[3]; - - public: - Camera(){}; - ~Camera() {}; - - void setZNearCoefficient(float f) {} - void playPath(int i) {} - - void loadProjectionMatrix() {} - void loadModelViewMatrix() {} - real distanceToSceneCenter() { return 0;} - void showEntireScene() {} - real zFar() {return 0;} - real zNear() {return 0;} - void setPosition(Vec v) {} - void setOrientation(Quaternion q) {} - float* position() { return _position; } - float* orientation() { return _orientation; } - void getWorldCoordinatesOf(float *src, float *vp_tmp) {} - -}; - - -//class AppGLWidget : public QGLViewer -class AppGLWidget -{ - //Q_OBJECT - - -public: - - AppGLWidget(const char *iName = 0); - virtual ~AppGLWidget(); - -public: - - inline void swapBuffers() {} - inline void updateGL() {} - inline void makeCurrent() {} - inline void setSceneBoundingBox(Vec &min_, Vec &max_) {} - inline void saveSnapshot(bool b) {} - inline real width() { return _width; } - inline real height() { return _height; } - void setStateFileName(const string& name) { stateFileName_ = name; }; - - -Camera * _camera; - - // captures a frame animation that was previously registered - void captureMovie(); - - /*! Sets the rendering style. - iStyle - The style used to render. Can be: - SURFACIC : usual rendering - LINES : line rendering - DEPTHBUFFER : grey-levels rendering of the depth buffer - */ - inline void SetRenderStyle(RenderStyle iStyle) - { - _RenderStyle = iStyle; - } - - /*! Sets the model to draw in the viewer - * iModel - * The Root Node of the model - */ - inline void SetModel(NodeGroup *iModel) - { - if(0 != _ModelRootNode->numberOfChildren()) - { - _ModelRootNode->DetachChildren(); - _ModelRootNode->clearBBox(); - } - - AddModel(iModel); - } - - /*! Adds a model for displaying in the viewer */ - inline void AddModel(NodeGroup *iModel) - { - _ModelRootNode->AddChild(iModel); - - _ModelRootNode->UpdateBBox(); - - _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], - _ModelRootNode->bbox().getMin()[1]), - _ModelRootNode->bbox().getMin()[2]); - _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], - _ModelRootNode->bbox().getMax()[1]), - _ModelRootNode->bbox().getMax()[2]); - - _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); - - _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); - - // DEBUG: - ReInitRenderers(); - - } - - inline void AddSilhouette(NodeGroup* iSilhouette) - { - _SilhouetteRootNode->AddChild(iSilhouette); - //ToggleSilhouette(true); - updateGL(); - } - - inline void Add2DSilhouette(NodeGroup *iSilhouette) - { - //_pFENode->AddChild(iSilhouette); - //ToggleSilhouette(true); - updateGL(); - } - - inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) - { - //_pVisibleSilhouetteNode->AddChild(iVSilhouette); - updateGL(); - } - - inline void SetDebug(NodeGroup* iDebug) - { - if(0 != _DebugRootNode->numberOfChildren()) - { - _DebugRootNode->DetachChildren(); - _DebugRootNode->clearBBox(); - } - - AddDebug(iDebug); - } - - inline void AddDebug(NodeGroup* iDebug) - { - _DebugRootNode->AddChild(iDebug); - updateGL(); - } - - inline void DetachModel(Node *iModel) - { - _ModelRootNode->DetachChild(iModel); - _ModelRootNode->UpdateBBox(); - - _minBBox = __min(__min(_ModelRootNode->bbox().getMin()[0], - _ModelRootNode->bbox().getMin()[1]), - _ModelRootNode->bbox().getMin()[2]); - _maxBBox = __max(__max(_ModelRootNode->bbox().getMax()[0], - _ModelRootNode->bbox().getMax()[1]), - _ModelRootNode->bbox().getMax()[2]); - - _maxAbs = __max(rabs(_minBBox), rabs(_maxBBox)); - _minAbs = __min(rabs(_minBBox), rabs(_maxBBox)); - } - - inline void DetachModel() - { - _ModelRootNode->DetachChildren(); - _ModelRootNode->clearBBox(); - - // 2D Scene - //_p2DNode.DetachChildren(); - //_pFENode->DetachChildren(); - //_pVisibleSilhouetteNode->DetachChildren(); - updateGL(); - } - - inline void DetachSilhouette() - { - _SilhouetteRootNode->DetachChildren(); - //_pFENode->DetachChildren(); - //_pVisibleSilhouetteNode->DetachChildren(); - _p2DSelectionNode->destroy(); - //updateGL(); //FIXME - } - - inline void DetachVisibleSilhouette() - { - //_pVisibleSilhouetteNode->DetachChildren(); - _p2DSelectionNode->destroy(); - updateGL(); - } - - inline void DetachDebug() - { - _DebugRootNode->DetachChildren(); - updateGL(); - } - - void SetMainWindow(QMainWindow *iMainWindow) ; - - inline void Set3DContext() - { - // GL_PROJECTION matrix - _camera->loadProjectionMatrix(); - // GL_MODELVIEW matrix - _camera->loadModelViewMatrix(); - } - - inline void RetriveModelViewMatrix(float *p) - { - makeCurrent(); - glGetFloatv(GL_MODELVIEW_MATRIX, p); - } - inline void RetriveModelViewMatrix(real *p) - { - makeCurrent(); - glGetDoublev(GL_MODELVIEW_MATRIX, p); - } - - inline void RetrieveProjectionMatrix(float *p) - { - makeCurrent(); - glGetFloatv(GL_PROJECTION_MATRIX, p); - - } - inline void RetrieveProjectionMatrix(real *p) - { - makeCurrent(); - glGetDoublev(GL_PROJECTION_MATRIX, p); - - } - - inline void RetrieveViewport(int *p) - { - makeCurrent(); - glGetIntegerv(GL_VIEWPORT,(GLint *)p); - } - - inline real GetFocalLength() const - { - real Near = __max(0.1,(real)(-2.f*_maxAbs+_camera->distanceToSceneCenter())); - return Near; - } - - inline real GetAspect() const - { - return ((real) _width/(real) _height); - } - - inline real GetFovyRadian() const - { - return _Fovy/180.0 * M_PI; - } - - inline real GetFovyDegrees() const - { - return _Fovy; - } - - inline void FitBBox() - { - Vec min_(_ModelRootNode->bbox().getMin()[0], - _ModelRootNode->bbox().getMin()[1], - _ModelRootNode->bbox().getMin()[2]); - Vec max_(_ModelRootNode->bbox().getMax()[0], - _ModelRootNode->bbox().getMax()[1], - _ModelRootNode->bbox().getMax()[2]); - setSceneBoundingBox(min_, max_); - _camera->showEntireScene(); - } - - inline void ToggleSilhouette(bool enabled) - { - _fedges = enabled; - updateGL(); - } - - // Reinit the renderers which need to be informed - // when a model is added to the scene. - void ReInitRenderers(); - - inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } - - inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } - inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} - - /*! glReadPixels */ - typedef enum{ - RGB, - DEPTH - } PixelFormat; - void readPixels(int x, - int y, - int width, - int height, - PixelFormat format, - float *pixels) - { - makeCurrent(); - //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK - glReadBuffer(GL_BACK); - GLenum glformat; - switch(format) - { - case RGB: - glformat = GL_RGB; - break; - case DEPTH: - glformat = GL_DEPTH_COMPONENT; - break; - default: - break; - } - glReadPixels(x,y,width, height, glformat, GL_FLOAT, (GLfloat*)pixels); - } - - void clear() { makeCurrent(); glClear(GL_COLOR_BUFFER_BIT ); } - - void prepareCanvas(); - void releaseCanvas(); - - typedef enum { - FRONT, - BACK - } GLBuffer; - - void setReadPixelsBuffer(int iBuffer) - { - makeCurrent(); - switch(iBuffer) - { - case FRONT: - glReadBuffer(GL_FRONT); - break; - case BACK: - glReadBuffer(GL_BACK); - break; - default: - break; - } - } - - BBox scene3DBBox() const { return _ModelRootNode->bbox(); } - - inline real znear() const { - return _camera->zNear(); - } - - inline real zfar() const { - return _camera->zFar(); - } - - inline bool draw3DsceneEnabled() const { return _Draw3DScene; } - - inline bool getRecordFlag() const {return _record;} - - void setCameraState(const float* position, const float* orientation) { - _camera->setPosition(Vec(position[0], position[1], position[2])); - _camera->setOrientation(Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); - } - - void getCameraState(float* position, float* orientation) const { - float* pos = _camera->position(); - float* orient = _camera->orientation(); - int i; - for(i=0;i<3;++i){ - position[i] = pos[i]; - } - for(i=0;i<4;++i){ - orientation[i] = orient[i]; - } - } - - void saveCameraState() { - getCameraState(_cameraPosition, _cameraOrientation); - _cameraStateSaved = true; - } - - void setUpdateMode(bool b) { - _enableUpdateSilhouettes = b; - } - - bool getUpdateMode() const { - return _enableUpdateSilhouettes; - } - static void setFrontBufferFlag(bool iBool); - static bool getFrontBufferFlag(); - static void setBackBufferFlag(bool iBool); - static bool getBackBufferFlag(); - -protected: - virtual void init(); - virtual void draw(); - - /*! Loads an envmap */ - void LoadEnvMap(const char *filename); - -public: - /*! Core scene drawing */ - void DrawScene(SceneVisitor *iRenderer); - - /*! 2D Scene Drawing */ - void Draw2DScene(SceneVisitor *iRenderer); - - /*! Draws scene silhouettes in real time */ - void DrawSilhouette(); - - /*! Draws the Scene in lines style */ - // void DrawLines(); - // /*! Draws the scene in surfacic style */ - // void DrawSurfacic(); - // /*! Draws the scene as a depth buffer image */ - // void DrawDepthBuffer(); - - GLRenderer* glRenderer() {return _pGLRenderer;} - -protected: - - - //QString shortcutBindingsString() const; - - /*! fabs or abs */ - inline int rabs(int x) {return abs(x);} - inline real rabs(real x) {return fabs(x);} - - -protected: - float _Fovy; - //float _SceneDepth; - //BBox _BBox; - - RenderStyle _RenderStyle; - - //The root node container - NodeGroup _RootNode; - NodeDrawingStyle *_ModelRootNode; - NodeDrawingStyle *_SilhouetteRootNode; - NodeDrawingStyle *_DebugRootNode; - - bool _silhouette; - bool _fedges; - bool _debug; - bool _selection_mode; - - //a Universal light: - NodeGroup _Light; - - real _minBBox; - real _maxBBox; - real _maxAbs; - - real _minAbs; - bool _drawBBox; - - // OpenGL Renderer - GLRenderer *_pGLRenderer; - GLSelectRenderer *_pSelectRenderer; - GLBBoxRenderer *_pBBoxRenderer; - GLMonoColorRenderer *_pMonoColorRenderer; - GLDebugRenderer *_pDebugRenderer; - - QMainWindow *_pMainWindow; - - Chronometer _Chrono; - - // 2D Scene - bool _Draw2DScene; - bool _Draw3DScene; NodeGroup _p2DNode; - //NodeDrawingStyle *_pFENode; // Feature edges node - //NodeDrawingStyle *_pVisibleSilhouetteNode; - NodeDrawingStyle *_p2DSelectionNode; - - // EnvMap - bool _drawEnvMap; - int _currentEnvMap; - int _maxId; - int _blendFunc; - - // Each time we compute the view map, the camera state is - // saved in order to be able to restore it later - bool _cameraStateSaved; - float _cameraPosition[3]; - float _cameraOrientation[4]; - - // interactive silhouette update - bool _enableUpdateSilhouettes; - //capture movie - bool _captureMovie; - // 2D drawing buffers - static bool _frontBufferFlag; - static bool _backBufferFlag; - - bool _record; - - -real _width, _height; -Vec _min,_max; -string stateFileName_; -}; - -#endif // ARTGLWIDGET_H diff --git a/source/blender/freestyle/intern/app_blender/test_config.h b/source/blender/freestyle/intern/app_blender/test_config.h new file mode 100644 index 00000000000..773ca2f75f5 --- /dev/null +++ b/source/blender/freestyle/intern/app_blender/test_config.h @@ -0,0 +1,6 @@ + +#define TEST_3DS_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" + +#define TEST_STYLE_MODULE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" + +#define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" \ No newline at end of file diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index f9a573ffb86..b8eaa4a8a3c 100755 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -41,11 +41,17 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter PythonInterpreter() { _language = "Python"; - Py_Initialize(); + //Py_Initialize(); + + cout << "Freestyle Python Init: " << endl; + cout << "- is init : " << Py_IsInitialized() << endl; + cout << "- prog path : " << Py_GetProgramFullPath() << endl; + cout << "- mod path : " << Py_GetPath() << endl; + cout << "- version : " << Py_GetVersion() << endl; } virtual ~PythonInterpreter() { - Py_Finalize(); + //Py_Finalize(); } int interpretCmd(const string& cmd) { @@ -88,19 +94,19 @@ private: if (_initialized) return; PyRun_SimpleString("import sys"); - vector pathnames; - StringUtils::getPathName(_path, "", pathnames); - string cmd; - char* c_cmd; - for (vector::const_iterator it = pathnames.begin(); + vector pathnames; + StringUtils::getPathName(_path, "", pathnames); + string cmd; + char* c_cmd; + for (vector::const_iterator it = pathnames.begin(); it != pathnames.end(); ++it) { - cmd = "sys.path.append(\"" + *it + "\")"; - c_cmd = strdup(cmd.c_str()); - PyRun_SimpleString(c_cmd); - free(c_cmd); - } - // PyRun_SimpleString("from Freestyle import *"); + cmd = "sys.path.append(\"" + *it + "\")"; + c_cmd = strdup(cmd.c_str()); + PyRun_SimpleString(c_cmd); + free(c_cmd); + } + PyRun_SimpleString("from Freestyle import *"); _initialized = true; } From 373d42dbeaef014ce6d8c9d337242966d7ca8e5f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 26 May 2008 19:52:55 +0000 Subject: [PATCH 120/430] soc-2008-mxcurioni: PythonInterpreter works, using Blender's Python functions. The drawing still does not produce anything because the SWIG module wrapper is missing --- source/blender/freestyle/SConscript | 2 +- .../intern/app_blender/Controller.cpp | 110 ++++++++---------- .../intern/app_blender/test_config.h | 5 +- .../intern/system/PythonInterpreter.h | 63 +++++----- .../freestyle/intern/system/StringUtils.cpp | 38 +++--- .../freestyle/intern/system/StringUtils.h | 1 + 6 files changed, 113 insertions(+), 106 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 97b7d4cf9f2..623bf0308dd 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -6,7 +6,7 @@ sources = [] defs = [] incs = '' -incs += '../blenkernel ../blenlib ../imbuf ../makesdna' +incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python' incs += ' #/extern/freestyle/lib3ds' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 25d9653b8f4..38f0ff0b7f0 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -64,6 +64,7 @@ #include "../system/StringUtils.h" +#include "test_config.h" Controller::Controller() { @@ -1057,64 +1058,53 @@ void Controller::displayDensityCurves(int x, int y){ } void Controller::init_options(){ -// //from AppOptionsWindow.cpp -// -// // Directories -// ViewMapIO::Options::setModelsPath((const char*)modelsPathLineEdit->text().toAscii().data()); -// PythonInterpreter::Options::setPythonPath((const char*)pythonPathLineEdit->text().toAscii().data()); -// TextureManager::Options::setPatternsPath((const char*)patternsPathLineEdit->text().toAscii().data()); -// TextureManager::Options::setBrushesPath((const char*)brushesPathLineEdit->text().toAscii().data()); -// //g_pController->setBrowserCmd(browserCmdLineEdit->text()); -// //g_pController->setHelpIndex(helpIndexPathLineEdit->text()); -// -// // ViewMap Format -// if (asFloatCheckBox->isChecked()) -// ViewMapIO::Options::addFlags(ViewMapIO::Options::FLOAT_VECTORS); -// else -// ViewMapIO::Options::rmFlags(ViewMapIO::Options::FLOAT_VECTORS); -// if (noOccluderListCheckBox->isChecked()) -// ViewMapIO::Options::addFlags(ViewMapIO::Options::NO_OCCLUDERS); -// else -// ViewMapIO::Options::rmFlags(ViewMapIO::Options::NO_OCCLUDERS); -// g_pController->setComputeSteerableViewMapFlag(steerableViewMapCheckBox->isChecked()); -// -// // Visibility -// if (qiCheckBox->isChecked()) -// g_pController->setQuantitativeInvisibility(true); -// else -// g_pController->setQuantitativeInvisibility(false); -// -// // Papers Textures -// vector sl; -// for (unsigned i = 0; i < paperTexturesList->count(); i++) { -// sl.push_back(paperTexturesList->item(i)->text().toAscii().constData()); -// } -// TextureManager::Options::setPaperTextures(sl); -// -// // Drawing Buffers -// if (frontBufferCheckBox->isChecked()) -// g_pController->setFrontBufferFlag(true); -// else -// g_pController->setFrontBufferFlag(false); -// if (backBufferCheckBox->isChecked()) -// g_pController->setBackBufferFlag(true); -// else -// g_pController->setBackBufferFlag(false); -// -// // Ridges and Valleys -// g_pController->setComputeRidgesAndValleysFlag(ridgeValleyCheckBox->isChecked()); -// // Suggestive Contours -// g_pController->setComputeSuggestiveContoursFlag(suggestiveContoursCheckBox->isChecked()); -// bool ok; -// real r = sphereRadiusLineEdit->text().toFloat(&ok); -// if(ok) -// g_pController->setSphereRadius(r); -// else -// sphereRadiusLineEdit->setText(QString(QString::number(g_pController->getSphereRadius()))); -// r = krEpsilonLineEdit->text().toFloat(&ok); -// if(ok) -// g_pController->setSuggestiveContourKrDerivativeEpsilon(r); -// else -// krEpsilonLineEdit->setText(QString(QString::number(g_pController->getSuggestiveContourKrDerivativeEpsilon()))); -// } +// from AppOptionsWindow.cpp +// Default init options + + Config::Path * cpath = Config::Path::getInstance(); + + // const string& getProjectDir() const {return _ProjectDir;} + // const string& getModelsPath() const {return _ModelsPath;} + // const string& getPatternsPath() const {return _PatternsPath;} + // const string& getBrushesPath() const {return _BrushesPath;} + // const string& getPythonPath() const {return _PythonPath;} + // const string& getBrowserCmd() const {return _BrowserCmd;} + // const string& getHelpIndexpath() const {return _HelpIndexPath;} + // const string& getPapersDir() const {return _PapersDir;} + // const string& getEnvMapDir() const {return _EnvMapDir;} + // const string& getMapsDir() const {return _MapsDir;} + // const string& getHomeDir() const {return _HomeDir;} + + // Directories + ViewMapIO::Options::setModelsPath( StringUtils::toAscii( cpath->getModelsPath() ) ); + PythonInterpreter::Options::setPythonPath( StringUtils::toAscii( cpath->getPythonPath() ) ); + TextureManager::Options::setPatternsPath( StringUtils::toAscii( cpath->getPatternsPath() ) ); + TextureManager::Options::setBrushesPath( StringUtils::toAscii( cpath->getModelsPath() ) ); + + // ViewMap Format + ViewMapIO::Options::rmFlags(ViewMapIO::Options::FLOAT_VECTORS); + ViewMapIO::Options::rmFlags(ViewMapIO::Options::NO_OCCLUDERS); + setComputeSteerableViewMapFlag( false ); + + // Visibility + setQuantitativeInvisibility(true); + + // Papers Textures + vector sl; + sl.push_back( StringUtils::toAscii( TEST_TEXTURE_FILE ) ); + TextureManager::Options::setPaperTextures(sl); + + // Drawing Buffers + setFrontBufferFlag(false); + setBackBufferFlag(true); + + + // Ridges and Valleys + setComputeRidgesAndValleysFlag( false ); + + // Suggestive Contours + setComputeSuggestiveContoursFlag( false ); + setSphereRadius(1); + setSuggestiveContourKrDerivativeEpsilon(0); + } diff --git a/source/blender/freestyle/intern/app_blender/test_config.h b/source/blender/freestyle/intern/app_blender/test_config.h index 773ca2f75f5..98239f279f3 100644 --- a/source/blender/freestyle/intern/app_blender/test_config.h +++ b/source/blender/freestyle/intern/app_blender/test_config.h @@ -3,4 +3,7 @@ #define TEST_STYLE_MODULE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" -#define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" \ No newline at end of file +#define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" + + +#define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg" \ No newline at end of file diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index b8eaa4a8a3c..d9b563fabaa 100755 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -35,6 +35,12 @@ # include "StringUtils.h" # include "Interpreter.h" +//soc +extern "C" { +#include "BKE_text.h" +#include "BPY_extern.h" +} + class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter { public: @@ -42,12 +48,6 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter PythonInterpreter() { _language = "Python"; //Py_Initialize(); - - cout << "Freestyle Python Init: " << endl; - cout << "- is init : " << Py_IsInitialized() << endl; - cout << "- prog path : " << Py_GetProgramFullPath() << endl; - cout << "- mod path : " << Py_GetPath() << endl; - cout << "- version : " << Py_GetVersion() << endl; } virtual ~PythonInterpreter() { @@ -64,11 +64,22 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter int interpretFile(const string& filename) { initPath(); - string cmd("execfile(\"" + filename + "\")"); - char* c_cmd = strdup(cmd.c_str()); - int err = PyRun_SimpleString(c_cmd); - free(c_cmd); - return err; + + char *fn = const_cast(filename.c_str()); + struct Text *text = add_text( fn ); + + if (text == NULL) { + cout << "\nError in PythonInterpreter::interpretFile:" << endl; + cout << "couldn't create Blender text from" << fn << endl; + } + + if (BPY_txt_do_python_Text(text) != 1) { + cout << "\nError executing Python script from PythonInterpreter::interpretFile:" << endl; + cout << fn << " (at line " << BPY_Err_getLinenumber() << ")" << endl; + return BPY_Err_getLinenumber(); + } + + return 0; } struct Options @@ -91,22 +102,20 @@ class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter private: static void initPath() { - if (_initialized) - return; - PyRun_SimpleString("import sys"); - vector pathnames; - StringUtils::getPathName(_path, "", pathnames); - string cmd; - char* c_cmd; - for (vector::const_iterator it = pathnames.begin(); - it != pathnames.end(); - ++it) { - cmd = "sys.path.append(\"" + *it + "\")"; - c_cmd = strdup(cmd.c_str()); - PyRun_SimpleString(c_cmd); - free(c_cmd); - } - PyRun_SimpleString("from Freestyle import *"); + if (_initialized) + return; + + // vector pathnames; + // StringUtils::getPathName(_path, "", pathnames); + // + // for (vector::const_iterator it = pathnames.begin(); it != pathnames.end();++it) { + // if ( !it->empty() ) { + // cout << "Adding Python path: " << *it << endl; + // syspath_append( const_cast(it->c_str()) ); + // } + // } + + //PyRun_SimpleString("from Freestyle import *"); _initialized = true; } diff --git a/source/blender/freestyle/intern/system/StringUtils.cpp b/source/blender/freestyle/intern/system/StringUtils.cpp index bbdbef10a10..58798daf42a 100755 --- a/source/blender/freestyle/intern/system/StringUtils.cpp +++ b/source/blender/freestyle/intern/system/StringUtils.cpp @@ -27,25 +27,29 @@ namespace StringUtils { void getPathName(const string& path, const string& base, vector& pathnames) { string dir; - unsigned size = path.size(); - pathnames.push_back(base); - for (unsigned pos = 0, sep = path.find(Config::PATH_SEP, pos); - pos < size; - pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) { - if (sep == (unsigned)string::npos) - sep = size; - dir = path.substr(pos, sep - pos); - -//soc QFileInfo fi(dir.c_str()); -//soc string res = (const char*)fi.absoluteFilePath().toAscii(); + string res; char cleaned[FILE_MAX]; - BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); - BLI_cleanup_file(NULL, cleaned); - string res = toAscii( string(cleaned) ); + unsigned size = path.size(); + + pathnames.push_back(base); + + for ( unsigned pos = 0, sep = path.find(Config::PATH_SEP, pos); + pos < size; + pos = sep + 1, sep = path.find(Config::PATH_SEP, pos)) { + + if (sep == (unsigned)string::npos) + sep = size; + + dir = path.substr(pos, sep - pos); + + BLI_strncpy(cleaned, dir.c_str(), FILE_MAX); + BLI_cleanup_file(NULL, cleaned); + res = toAscii( string(cleaned) ); - if (!base.empty()) - res += Config::DIR_SEP + base; - pathnames.push_back(res); + if (!base.empty()) + res += Config::DIR_SEP + base; + + pathnames.push_back(res); } } diff --git a/source/blender/freestyle/intern/system/StringUtils.h b/source/blender/freestyle/intern/system/StringUtils.h index b30eaae2247..7b43886fa27 100755 --- a/source/blender/freestyle/intern/system/StringUtils.h +++ b/source/blender/freestyle/intern/system/StringUtils.h @@ -31,6 +31,7 @@ # include # include # include +# include # include "FreestyleConfig.h" //soc From c0a40125bb89791e54468219e30e986b0291d29d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 May 2008 20:43:35 +0000 Subject: [PATCH 121/430] bugfix, copy posebone constraints didnt update properly, canceling transform would not reset the bone back to its original state. need to set teh flag "ob->pose->flag |= POSE_RECALC", which is alredy done on adding a constraint. back to --- source/blender/src/poseobject.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c index 4c97a8fdbdf..dcceea971f7 100644 --- a/source/blender/src/poseobject.c +++ b/source/blender/src/poseobject.c @@ -659,6 +659,10 @@ void pose_copy_menu(void) free_constraints(&pchan->constraints); copy_constraints(&pchan->constraints, &pchanact->constraints); pchan->constflag = pchanact->constflag; + + if (ob->pose) { + ob->pose->flag |= POSE_RECALC; + } } break; case 6: /* Transform Locks */ @@ -741,6 +745,10 @@ void pose_copy_menu(void) } BLI_freelistN(&const_copy); update_pose_constraint_flags(ob->pose); /* we could work out the flags but its simpler to do this */ + + if (ob->pose) { + ob->pose->flag |= POSE_RECALC; + } } DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); // and all its relations From 4245f8160555f12139a44d4bb8c3eac7bfc5970b Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 27 May 2008 03:29:43 +0000 Subject: [PATCH 122/430] soc-2008-mxcurioni: PythonInterpreter now properly handles its initialization (in accordance with original Freestyle code). This is achieved by creating a temporary Text structure, adding the required import and appending the necessary Python path. The text is executed using the BPY_txt_do_python_Text command. When Freestyle is run within Blender, it should not crash; the Python interpreter should report an ImportError on _Freestyle (the SWIG wrapper). --- source/blender/freestyle/SConscript | 2 +- .../intern/system/PythonInterpreter.h | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 623bf0308dd..4f096d35c23 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -92,4 +92,4 @@ env.BlenderLib (libname="bf_freestyle", # g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o # -# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../python/_Freestyle.so ModuleWrapper.o \ No newline at end of file +# g++ -bundle -flat_namespace -undefined suppress -w -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -L/usr/lib/python2.5/config -lbf_freestyle -lbf_blenlib -lbf_blenkernel -lbf_guardedalloc -lbf_imbuf -lpython2.5 -o ../../python/_Freestyle.so ModuleWrapper.o diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index d9b563fabaa..540d0b3ddec 100755 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -105,15 +105,22 @@ private: if (_initialized) return; - // vector pathnames; - // StringUtils::getPathName(_path, "", pathnames); - // - // for (vector::const_iterator it = pathnames.begin(); it != pathnames.end();++it) { - // if ( !it->empty() ) { - // cout << "Adding Python path: " << *it << endl; - // syspath_append( const_cast(it->c_str()) ); - // } - // } + vector pathnames; + StringUtils::getPathName(_path, "", pathnames); + + struct Text *text = add_empty_text("initpath_test.txt"); + string cmd = "import sys\n"; + txt_insert_buf(text, const_cast(cmd.c_str())); + + for (vector::const_iterator it = pathnames.begin(); it != pathnames.end();++it) { + if ( !it->empty() ) { + cout << "Adding Python path: " << *it << endl; + cmd = "sys.path.append(\"" + *it + "\")\n"; + txt_insert_buf(text, const_cast(cmd.c_str())); + } + } + + BPY_txt_do_python_Text(text); //PyRun_SimpleString("from Freestyle import *"); _initialized = true; From 54572ccc228f2401b11fce7bcfea444b66c8cdce Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 May 2008 08:51:47 +0000 Subject: [PATCH 123/430] bugfix for view naming, pressing numpad5 would clear the V3D_OPP_DIRECTION_NAME flag even though it wont switch the view direction. --- source/blender/src/toets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 5b6af61949f..5f80f14d069 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -228,8 +228,8 @@ void persptoetsen(unsigned short event) } else { /* Indicate that this view is not inverted. - * Don't do this for PADMINUS/PADPLUSKEY, though. (jobbe)*/ - if (event != PADMINUS && event != PADPLUSKEY) + * Don't do this for PADMINUS/PADPLUSKEY/PAD5, though. (jobbe)*/ + if (! ELEM3(event, PADMINUS, PADPLUSKEY, PAD5) ) G.vd->flag2 &= ~V3D_OPP_DIRECTION_NAME; From eb26992c25ab626f1538e5cf7848582c96f1ee95 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 May 2008 09:41:43 +0000 Subject: [PATCH 124/430] Fix for bug #12806: compositor nodes with use nodes disabled didn't properly redraw the node window on changes. --- source/blender/src/editnode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/src/editnode.c b/source/blender/src/editnode.c index afafc4f2590..9057556b796 100644 --- a/source/blender/src/editnode.c +++ b/source/blender/src/editnode.c @@ -166,13 +166,14 @@ static void snode_handle_recalc(SpaceNode *snode) snode->nodetree->test_break= NULL; waitcursor(0); - allqueue(REDRAWNODE, 1); allqueue(REDRAWIMAGE, 1); if(G.scene->r.scemode & R_DOCOMP) { BIF_redraw_render_rect(); /* seems to screwup display? */ mywinset(curarea->win); } } + + allqueue(REDRAWNODE, 1); } } From be215f74f3b08655dc01abba9f60e68153c4396a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 May 2008 09:46:35 +0000 Subject: [PATCH 125/430] removing this script, should have been removed for 2.46 since the functionality is avalable in the UV snap menu. --- release/scripts/uv_from_adjacent.py | 129 ---------------------------- 1 file changed, 129 deletions(-) delete mode 100644 release/scripts/uv_from_adjacent.py diff --git a/release/scripts/uv_from_adjacent.py b/release/scripts/uv_from_adjacent.py deleted file mode 100644 index 285cca97d8b..00000000000 --- a/release/scripts/uv_from_adjacent.py +++ /dev/null @@ -1,129 +0,0 @@ -#!BPY -""" -Name: 'UVs from unselected adjacent' -Blender: 242 -Group: 'UVCalculation' -Tooltip: 'Assign UVs to selected faces from surrounding unselected faces.' -""" -__author__ = "Campbell Barton" -__url__ = ("blender", "blenderartists.org") -__version__ = "1.0 2006/02/07" - -__bpydoc__ = """\ -This script sets the UV mapping and image of selected faces from adjacent unselected faces. - -Use this script in face select mode for texturing between textured faces. -""" - -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# Script copyright (C) Campbell J Barton -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# ***** END GPL LICENCE BLOCK ***** -# -------------------------------------------------------------------------- - - -from Blender import * -import bpy - -def mostUsedImage(imageList): # Returns the image most used in the list. - if not imageList: - return None - elif len(imageList) < 3: - return imageList[0] - - # 3+ Images, Get the most used image for surrounding faces. - imageCount = {} - for image in imageList: - if image: - image_key= image.name - else: - image_key = None - - try: - imageCount[image_key]['imageCount'] +=1 # an extra user of this image - except: - imageCount[image_key] = {'imageCount':1, 'blenderImage':image} # start with 1 user. - - # Now a list of tuples, (imageName, {imageCount, image}) - imageCount = imageCount.items() - - try: imageCount.sort(key=lambda a: a[1]) - except: imageCount.sort(lambda a,b: cmp(a[1], b[1])) - - - return imageCount[-1][1]['blenderImage'] - - -def main(): - sce = bpy.data.scenes.active - ob = sce.objects.active - - if ob == None or ob.type != 'Mesh': - Draw.PupMenu('ERROR: No mesh object in face select mode.') - return - me = ob.getData(mesh=1) - - if not me.faceUV: - Draw.PupMenu('ERROR: No mesh object in face select mode.') - return - - selfaces = [f for f in me.faces if f.sel] - unselfaces = [f for f in me.faces if not f.sel] - - - # Gather per Vert UV and Image, store in vertUvAverage - vertUvAverage = [[[],[]] for i in xrange(len(me.verts))] - - for f in unselfaces: # Unselected faces only. - fuv = f.uv - for i,v in enumerate(f): - vertUvAverage[v.index][0].append(fuv[i]) - vertUvAverage[v.index][1].append(f.image) - - # Average per vectex UV coords - for vertUvData in vertUvAverage: - uvList = vertUvData[0] - if uvList: - # Convert from a list of vectors into 1 vector. - vertUvData[0] = reduce(lambda a,b: a+b, uvList, Mathutils.Vector(0,0)) * (1.0/len(uvList)) - else: - vertUvData[0] = None - - # Assign to selected faces - TEX_FLAG = Mesh.FaceModes['TEX'] - for f in selfaces: - uvlist = [] - imageList = [] - for i,v in enumerate(f): - uv, vImages = vertUvAverage[v.index] - uvlist.append( uv ) - imageList.extend(vImages) - - if None not in uvlist: - # all the faces images used by this faces vert. some faces will be added twice but thats ok. - # Get the most used image and assign to the face. - image = mostUsedImage(imageList) - f.uv = uvlist - - if image: - f.image = image - f.mode |= TEX_FLAG - Window.RedrawAll() - -if __name__ == '__main__': - main() \ No newline at end of file From 027b9a7e96de86be24df76dca1479d0f0a6ae565 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 May 2008 11:01:31 +0000 Subject: [PATCH 126/430] Fix for bug #12533: color picker didn't always redraw rgb/hsv/hex values. --- source/blender/src/interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index ab8e53c3cb3..6582866d9a1 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -3394,6 +3394,7 @@ static int ui_do_but_HSVCUBE(uiBut *but) /* we redraw the entire block */ for (bt= but->block->buttons.first; bt; bt= bt->next) { if(but->poin == bt->poin) VECCOPY(bt->hsv, but->hsv); + ui_check_but(bt); ui_draw_but(bt); } ui_block_flush_back(but->block); From 4fd54681fc852ac1b62fd63a858b75862f171467 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 May 2008 11:05:33 +0000 Subject: [PATCH 127/430] Fix for #12526: still didn't get dupli transform in envmaps correct. --- source/blender/render/intern/source/envmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 73db5c4b0be..aa4e40739da 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -241,7 +241,7 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode) /* append or set matrix depending on dupli */ if(obi->flag & R_DUPLI_TRANSFORMED) { Mat4CpyMat4(tmpmat, obi->mat); - Mat4MulMat4(obi->mat, tmat, tmpmat); + Mat4MulMat4(obi->mat, tmpmat, tmat); } else if(mode==1) Mat4CpyMat4(obi->mat, tmat); From c25b845abe39f82a35e1cdd83fa2f4533768769f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 May 2008 13:26:52 +0000 Subject: [PATCH 128/430] Fix for bug #12463: hair didn't draw z-buffered in wireframe mode. Instead of making it an exception compared to other objects which don't draw z-buffered either, it now draws without lighting in the wire color like it did before. --- source/blender/src/drawobject.c | 124 +++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 40 deletions(-) diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 045b98bb784..3ef14574bc8 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2885,7 +2885,7 @@ static int drawDispList(Base *base, int dt) /* 5. start filling the arrays */ /* 6. draw the arrays */ /* 7. clean up */ -static void draw_new_particle_system(Base *base, ParticleSystem *psys) +static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) { View3D *v3d= G.vd; Object *ob=base->object; @@ -3334,14 +3334,24 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) float *cd2=0,*cdata2=0; glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_NORMAL_ARRAY); - glEnable(GL_LIGHTING); - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); + if(dt > OB_WIRE) { + glEnableClientState(GL_NORMAL_ARRAY); - if(part->draw&PART_DRAW_MAT_COL) - glEnableClientState(GL_COLOR_ARRAY); + if(part->draw&PART_DRAW_MAT_COL) + glEnableClientState(GL_COLOR_ARRAY); + + glEnable(GL_LIGHTING); + glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); + glEnable(GL_COLOR_MATERIAL); + } + else { + glDisableClientState(GL_NORMAL_ARRAY); + + glDisable(GL_COLOR_MATERIAL); + glDisable(GL_LIGHTING); + BIF_ThemeColor(TH_WIRE); + } if(totchild && (part->draw&PART_DRAW_PARENT)==0) totpart=0; @@ -3350,9 +3360,13 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) for(a=0, pa=psys->particles; aco); - glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); - if(part->draw&PART_DRAW_MAT_COL) - glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); + + if(dt > OB_WIRE) { + glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); + if(part->draw&PART_DRAW_MAT_COL) + glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); + } + glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); } @@ -3360,15 +3374,21 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) for(a=0; aco); - glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); - if(part->draw&PART_DRAW_MAT_COL) - glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); + + if(dt > OB_WIRE) { + glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), path->vel); + if(part->draw&PART_DRAW_MAT_COL) + glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); + } + glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); } - if(part->draw&PART_DRAW_MAT_COL) - glDisable(GL_COLOR_ARRAY); - glDisable(GL_COLOR_MATERIAL); + if(dt > OB_WIRE) { + if(part->draw&PART_DRAW_MAT_COL) + glDisable(GL_COLOR_ARRAY); + glDisable(GL_COLOR_MATERIAL); + } if(cdata2) MEM_freeN(cdata2); @@ -3389,7 +3409,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) else glDisableClientState(GL_VERTEX_ARRAY); - if(ndata && MIN2(G.vd->drawtype, ob->dt)>OB_WIRE){ + if(ndata && dt>OB_WIRE){ glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, 0, ndata); glEnable(GL_LIGHTING); @@ -3412,7 +3432,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) glDrawArrays(GL_LINES, 0, 2*totpoint); break; case PART_DRAW_BB: - if(MIN2(G.vd->drawtype, ob->dt)<=OB_WIRE) + if(dt<=OB_WIRE) glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); glDrawArrays(GL_QUADS, 0, 4*totpoint); @@ -3466,7 +3486,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) mymultmatrix(ob->obmat); // bring back local matrix for dtx } -static void draw_particle_edit(Object *ob, ParticleSystem *psys) +static void draw_particle_edit(Object *ob, ParticleSystem *psys, int dt) { ParticleEdit *edit = psys->edit; ParticleData *pa; @@ -3479,6 +3499,7 @@ static void draw_particle_edit(Object *ob, ParticleSystem *psys) float nosel_col[3]; char val[32]; + /* create path and child path cache if it doesn't exist already */ if(psys->pathcache==0){ PE_hide_keys_time(psys,CFRA); psys_cache_paths(ob,psys,CFRA,0); @@ -3493,11 +3514,13 @@ static void draw_particle_edit(Object *ob, ParticleSystem *psys) else if(!(pset->flag & PE_SHOW_CHILD) && psys->childcache) free_child_path_cache(psys); + /* opengl setup */ if((G.vd->flag & V3D_ZBUF_SELECT)==0) glDisable(GL_DEPTH_TEST); myloadmatrix(G.vd->viewmat); + /* get selection theme colors */ BIF_GetThemeColor3ubv(TH_VERTEX_SELECT, sel); BIF_GetThemeColor3ubv(TH_VERTEX, nosel); sel_col[0]=(float)sel[0]/255.0f; @@ -3511,41 +3534,61 @@ static void draw_particle_edit(Object *ob, ParticleSystem *psys) totchild = psys->totchildcache; /* draw paths */ - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_NORMAL_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); if(timed) glEnable(GL_BLEND); - if(pset->brushtype == PE_BRUSH_WEIGHT){ - glLineWidth(2.0f); + glEnableClientState(GL_VERTEX_ARRAY); + + if(dt > OB_WIRE) { + /* solid shaded with lighting */ + glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_COLOR_ARRAY); + + glEnable(GL_COLOR_MATERIAL); + glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); + } + else { + /* flat wire color */ + glDisableClientState(GL_NORMAL_ARRAY); glDisable(GL_LIGHTING); + BIF_ThemeColor(TH_WIRE); } - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glEnable(GL_COLOR_MATERIAL); + /* only draw child paths with lighting */ + if(dt > OB_WIRE) + glEnable(GL_LIGHTING); - for(i=0, pa=psys->particles, path = psys->pathcache; ico); - glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel); - glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col); - - glDrawArrays(GL_LINE_STRIP, 0, (int)(*path)->steps + 1); - } - - glEnable(GL_LIGHTING); if(psys->part->draw_as == PART_DRAW_PATH) { for(i=0, path=psys->childcache; ico); - glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel); - glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col); + if(dt > OB_WIRE) { + glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel); + glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col); + } glDrawArrays(GL_LINE_STRIP, 0, (int)(*path)->steps + 1); } } - glDisable(GL_COLOR_MATERIAL); + if(dt > OB_WIRE) + glDisable(GL_LIGHTING); + + if(pset->brushtype == PE_BRUSH_WEIGHT) { + glLineWidth(2.0f); + glEnableClientState(GL_COLOR_ARRAY); + glDisable(GL_LIGHTING); + } + + /* draw parents last without lighting */ + for(i=0, pa=psys->particles, path = psys->pathcache; ico); + if(dt > OB_WIRE) + glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel); + if(dt > OB_WIRE || pset->brushtype == PE_BRUSH_WEIGHT) + glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col); + + glDrawArrays(GL_LINE_STRIP, 0, (int)(*path)->steps + 1); + } /* draw edit vertices */ if(G.scene->selectmode!=SCE_SELECT_PATH){ @@ -3619,6 +3662,7 @@ static void draw_particle_edit(Object *ob, ParticleSystem *psys) glDisable(GL_BLEND); glDisable(GL_LIGHTING); + glDisable(GL_COLOR_MATERIAL); glDisableClientState(GL_COLOR_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnable(GL_DEPTH_TEST); @@ -5011,12 +5055,12 @@ void draw_object(Base *base, int flag) glDepthMask(GL_FALSE); for(psys=ob->particlesystem.first; psys; psys=psys->next) - draw_new_particle_system(base, psys); + draw_new_particle_system(base, psys, dt); if(G.f & G_PARTICLEEDIT && ob==OBACT) { psys= PE_get_current(ob); if(psys && !G.obedit && psys_in_edit_mode(psys)) - draw_particle_edit(ob, psys); + draw_particle_edit(ob, psys, dt); } glDepthMask(GL_TRUE); if(col) cpack(col); From 0eb8ea7429ad09fd463211550b3ab089de2630fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 May 2008 13:32:10 +0000 Subject: [PATCH 129/430] bugfix, edges with no faces raised an error. --- release/scripts/uv_seams_from_islands.py | 30 ++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/release/scripts/uv_seams_from_islands.py b/release/scripts/uv_seams_from_islands.py index 241f38fc4aa..7f156efde7d 100644 --- a/release/scripts/uv_seams_from_islands.py +++ b/release/scripts/uv_seams_from_islands.py @@ -1,12 +1,31 @@ #!BPY """ Name: 'Seams from Islands' -Blender: 243 +Blender: 246 Group: 'UV' Tooltip: 'Add seams onto the mesh at the bounds of UV islands' """ -# Add a licence here if you wish to re-distribute, we recommend the GPL +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# Script copyright (C) Campbell Barton +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ***** END GPL LICENCE BLOCK ***** +# -------------------------------------------------------------------------- from Blender import Scene, Mesh, Window, sys import BPyMessages @@ -37,8 +56,11 @@ def seams_from_islands(me): # add seams SEAM = Mesh.EdgeFlags.SEAM for ed in me.edges: - if len(set(edge_uvs[ed.key])) > 1: - ed.flag |= SEAM + try: # the edge might not be in a face + if len(set(edge_uvs[ed.key])) > 1: + ed.flag |= SEAM + except: + pass def main(): From 21c479789619767e9c1edb5e8dc4e301d900f179 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 27 May 2008 14:13:16 +0000 Subject: [PATCH 130/430] soc-2008-mxcurioni: Freestyle execution now works flawlessly (Python runtime loads appropriate modules, using SWIG wrapper), but does not render anything yet (render window OpenGL context not used yet). Currently, the SWIG wrapper library needs to be manually compiled (see SWIG section in source/blender/freestyle/SConscript for details). I am missing some knowledge on scons to create it automatically from the SConscript. Once I find that information, I'll make it automatic and for different platforms. I also corrected a simple GLStrokeRenderer bug for texture loading (not in original Freestyle code). Apparently, IMB_loadiffname doesn't recognize the paper's texture depth so a work-around will have to be found. --- source/blender/freestyle/SConscript | 17 ++--------- .../intern/app_blender/Controller.cpp | 3 +- .../intern/rendering/GLStrokeRenderer.cpp | 29 ++++++++++--------- .../intern/system/PythonInterpreter.h | 2 +- 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 4f096d35c23..7fae14cd457 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -77,19 +77,6 @@ env.BlenderLib (libname="bf_freestyle", ######################################################## # swig -# swig -c++ -python -o ModuleWrapper.cpp Freestyle.i -# -# g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -c ModuleWrapper.cpp -o ModuleWrapper.o -# -# install -d ../../build/macosx/release/lib/python -# -# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -lpython2.5 -o ../../build/macosx/release/lib/python/_Freestyle.so ModuleWrapper.o -# -# install Freestyle.py ../../build/macosx/release/lib/python - - -#================ MINE - # g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o -# -# g++ -bundle -flat_namespace -undefined suppress -w -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -L/usr/lib/python2.5/config -lbf_freestyle -lbf_blenlib -lbf_blenkernel -lbf_guardedalloc -lbf_imbuf -lpython2.5 -o ../../python/_Freestyle.so ModuleWrapper.o + +# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o \ No newline at end of file diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 38f0ff0b7f0..bd234746e2b 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -1098,7 +1098,6 @@ void Controller::init_options(){ setFrontBufferFlag(false); setBackBufferFlag(true); - // Ridges and Valleys setComputeRidgesAndValleysFlag( false ); @@ -1107,4 +1106,6 @@ void Controller::init_options(){ setSphereRadius(1); setSuggestiveContourKrDerivativeEpsilon(0); + // soc: initialize canvas + _Canvas->init(); } diff --git a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp index 50055e10f3d..c29ba759139 100755 --- a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp @@ -291,8 +291,10 @@ GLTextureManager::loadPapers () // Papers textures cout << "Loading papers textures..." << endl; - for (unsigned i = 0; i < size; i++) - preparePaper(_papertextures[i].c_str(), _papertexname[i]); + for (unsigned i = 0; i < size; i++){ + cout << i << ": " << _papertextures[i] << endl; + preparePaper(_papertextures[i].c_str(), _papertexname[i]); + } cout << "Done." << endl << endl; } @@ -368,12 +370,12 @@ GLTextureManager::prepareTextureAlpha (string sname, GLuint itexname) //soc if (qim.isNull()) if( qim ) { - cerr << " Error: unable to read \"" << name << "\"" << endl; + cerr << " Error: unable to read \"" << filename << "\"" << endl; return false; } if( qim->depth > 8) //soc { - cerr<<" Error: \""<< name <<"\" has "<< qim->depth <<" bits/pixel"<depth <<" bits/pixel"<depth > 8) //soc { - cerr<<" Error: \""<depth <<" bits/pixel"<depth <<" bits/pixel"<depth > 8) //soc { - cerr<<" Error: \""<depth<<" bits/pixel"<depth <<" bits/pixel"<depth !=32) //soc { - cerr<<" Error: \""<depth<<" bits/pixel"<depth<<" bits/pixel"< pathnames; StringUtils::getPathName(_path, "", pathnames); - struct Text *text = add_empty_text("initpath_test.txt"); + struct Text *text = add_empty_text("tmp_initpath.txt"); string cmd = "import sys\n"; txt_insert_buf(text, const_cast(cmd.c_str())); From 58066fd0af30388a6bf29fa897fb0300b37c5c7b Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 27 May 2008 14:49:28 +0000 Subject: [PATCH 131/430] soc-2008-mxcurioni: updated SWIG module linking instruction --- source/blender/freestyle/SConscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 7fae14cd457..198eb2ed422 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -76,6 +76,11 @@ env.BlenderLib (libname="bf_freestyle", # SWIG ######################################################## # swig +# +# Run the following two commands in the source/blender/freestyle/intern/swig directory. +# +# Replace /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib to the path +# of your library directory (used to locate libbf_freestyle.a) # g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o From 056f0564c2ccf391d5a2c114c24e58f00a2a24a0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 May 2008 15:14:35 +0000 Subject: [PATCH 132/430] bugfix for zero area faces and adding uv layers was not checking if the UV layer existed alredy. --- release/scripts/uvcalc_lightmap.py | 34 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/release/scripts/uvcalc_lightmap.py b/release/scripts/uvcalc_lightmap.py index 5f9f88a241d..37423b7197e 100644 --- a/release/scripts/uvcalc_lightmap.py +++ b/release/scripts/uvcalc_lightmap.py @@ -41,6 +41,12 @@ import BPyMesh from math import sqrt +def AngleBetweenVecs(a1,a2): + try: + return Mathutils.AngleBetweenVecs(a1,a2) + except: + return 180.0 + class prettyface(object): __slots__ = 'uv', 'width', 'height', 'children', 'xoff', 'yoff', 'has_parent', 'rot' def __init__(self, data): @@ -148,9 +154,9 @@ class prettyface(object): if len(uv) == 2: # match the order of angle sizes of the 3d verts with the UV angles and rotate. def get_tri_angles(v1,v2,v3): - a1= Mathutils.AngleBetweenVecs(v2-v1,v3-v1) - a2= Mathutils.AngleBetweenVecs(v1-v2,v3-v2) - a3 = 180 - (a1+a2) #a3= Mathutils.AngleBetweenVecs(v2-v3,v1-v3) + a1= AngleBetweenVecs(v2-v1,v3-v1) + a2= AngleBetweenVecs(v1-v2,v3-v2) + a3 = 180 - (a1+a2) #a3= AngleBetweenVecs(v2-v3,v1-v3) return [(a1,0),(a2,1),(a3,2)] @@ -237,8 +243,17 @@ PREF_MARGIN_DIV= 512): face_groups.append(faces) if PREF_NEW_UVLAYER: - me.addUVLayer('lightmap') - me.activeUVLayer = 'lightmap' + uvname_org = uvname = 'lightmap' + uvnames = me.getUVLayerNames() + i = 1 + while uvname in uvnames: + uvname = '%s.%03d' % (uvname_org, i) + i+=1 + + me.addUVLayer(uvname) + me.activeUVLayer = uvname + + del uvnames, uvname_org, uvname for face_sel in face_groups: print "\nStarting unwrap" @@ -402,11 +417,14 @@ PREF_MARGIN_DIV= 512): # ...limiting this is needed or you end up with bug unused texture spaces # ...however if its too high, boxpacking is way too slow for high poly meshes. float_to_int_factor = lengths_to_ints[0][0] - max_int_dimension = int(((side_len / float_to_int_factor)) / PREF_BOX_DIV) - + if float_to_int_factor > 0: + max_int_dimension = int(((side_len / float_to_int_factor)) / PREF_BOX_DIV) + ok = True + else: + max_int_dimension = 0.0 # wont be used + ok = False # RECURSIVE prettyface grouping - ok = True while ok: ok = False From 83a7fbf499ee51051f66bfa5fe23caa96cb262b7 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 May 2008 15:36:36 +0000 Subject: [PATCH 133/430] Another fix for bug #11140: explode modifier was still using more memory than needed. --- source/blender/blenkernel/intern/modifier.c | 115 +++++++++++--------- 1 file changed, 62 insertions(+), 53 deletions(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index b867b8d22bb..f9f17e7762d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -6485,12 +6485,14 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd, MFace *mf=0; MVert *dupvert=0; ParticleSettings *part=psmd->psys->part; - ParticleData *pa, *pars=psmd->psys->particles; + ParticleData *pa=NULL, *pars=psmd->psys->particles; ParticleKey state; + EdgeHash *vertpahash; + EdgeHashIterator *ehi; float *vertco=0, imat[4][4]; float loc0[3], nor[3]; float timestep, cfra; - int *facepa=emd->facepa, *vertpa=0; + int *facepa=emd->facepa; int totdup=0,totvert=0,totface=0,totpart=0; int i, j, v, mindex=0; @@ -6505,34 +6507,36 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd, else cfra=bsystem_time(ob,(float)G.scene->r.cfra,0.0); - /* table for vertice <-> particle relations (row totpart+1 is for yet unexploded verts) */ - vertpa = MEM_callocN(sizeof(int)*(totpart+1)*totvert, "explode_vertpatab"); - for(i=0; i<(totpart+1)*totvert; i++) - vertpa[i] = -1; + /* hash table for vertice <-> particle relations */ + vertpahash= BLI_edgehash_new(); for (i=0; itime) - mindex = totpart*totvert; + mindex = totvert+totpart; else - mindex = facepa[i]*totvert; + mindex = totvert+facepa[i]; mf=CDDM_get_face(dm,i); - /*set face vertices to exist in particle group*/ - vertpa[mindex+mf->v1] = 1; - vertpa[mindex+mf->v2] = 1; - vertpa[mindex+mf->v3] = 1; + /* set face vertices to exist in particle group */ + BLI_edgehash_insert(vertpahash, mf->v1, mindex, NULL); + BLI_edgehash_insert(vertpahash, mf->v2, mindex, NULL); + BLI_edgehash_insert(vertpahash, mf->v3, mindex, NULL); if(mf->v4) - vertpa[mindex+mf->v4] = 1; + BLI_edgehash_insert(vertpahash, mf->v4, mindex, NULL); } - /*make new vertice indexes & count total vertices after duplication*/ - for(i=0; i<(totpart+1)*totvert; i++){ - if(vertpa[i] != -1) - vertpa[i] = totdup++; + /* make new vertice indexes & count total vertices after duplication */ + ehi= BLI_edgehashIterator_new(vertpahash); + for(; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) { + BLI_edgehashIterator_setValue(ehi, SET_INT_IN_POINTER(totdup)); + totdup++; } + BLI_edgehashIterator_free(ehi); - /*the final duplicated vertices*/ + /* the final duplicated vertices */ explode= CDDM_from_template(dm, totdup, 0,totface); dupvert= CDDM_get_verts(explode); @@ -6541,45 +6545,49 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd, psmd->psys->lattice = psys_get_lattice(ob, psmd->psys); - /*duplicate & displace vertices*/ - for(i=0, pa=pars; i<=totpart; i++, pa++){ - if(i!=totpart){ + /* duplicate & displace vertices */ + ehi= BLI_edgehashIterator_new(vertpahash); + for(; !BLI_edgehashIterator_isDone(ehi); BLI_edgehashIterator_step(ehi)) { + MVert source; + MVert *dest; + + /* get particle + vertex from hash */ + BLI_edgehashIterator_getKey(ehi, &j, &i); + i -= totvert; + v= GET_INT_FROM_POINTER(BLI_edgehashIterator_getValue(ehi)); + + dm->getVert(dm, j, &source); + dest = CDDM_get_vert(explode,v); + + DM_copy_vert_data(dm,explode,j,v,1); + *dest = source; + + if(i!=totpart) { + /* get particle */ + pa= pars+i; + + /* get particle state */ psys_particle_on_emitter(ob, psmd,part->from,pa->num,-1,pa->fuv,pa->foffset,loc0,nor,0,0,0,0); Mat4MulVecfl(ob->obmat,loc0); state.time=cfra; psys_get_particle_state(ob,psmd->psys,i,&state,1); - } - for(j=0; jco; + + Mat4MulVecfl(ob->obmat,vertco); - dm->getVert(dm, j, &source); - dest = CDDM_get_vert(explode,v); + VECSUB(vertco,vertco,loc0); - DM_copy_vert_data(dm,explode,j,v,1); - *dest = source; + /* apply rotation, size & location */ + QuatMulVecf(state.rot,vertco); + VecMulf(vertco,pa->size); + VECADD(vertco,vertco,state.co); - if(i!=totpart){ - vertco=CDDM_get_vert(explode,v)->co; - - Mat4MulVecfl(ob->obmat,vertco); - - VECSUB(vertco,vertco,loc0); - - /* apply rotation, size & location */ - QuatMulVecf(state.rot,vertco); - VecMulf(vertco,pa->size); - VECADD(vertco,vertco,state.co); - - Mat4MulVecfl(imat,vertco); - } - } + Mat4MulVecfl(imat,vertco); } } + BLI_edgehashIterator_free(ehi); /*map new vertices to faces*/ for (i=0; itime) - mindex = totpart*totvert; + mindex = totvert+totpart; else - mindex = facepa[i]*totvert; + mindex = totvert+facepa[i]; - source.v1 = vertpa[mindex+source.v1]; - source.v2 = vertpa[mindex+source.v2]; - source.v3 = vertpa[mindex+source.v3]; + source.v1 = edgesplit_get(vertpahash, source.v1, mindex); + source.v2 = edgesplit_get(vertpahash, source.v2, mindex); + source.v3 = edgesplit_get(vertpahash, source.v3, mindex); if(source.v4) - source.v4 = vertpa[mindex+source.v4]; + source.v4 = edgesplit_get(vertpahash, source.v4, mindex); DM_copy_face_data(dm,explode,i,i,1); @@ -6618,9 +6626,10 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd, test_index_face(mf, &explode->faceData, i, (mf->v4 ? 4 : 3)); } + MEM_printmemlist_stats(); /* cleanup */ - if(vertpa) MEM_freeN(vertpa); + BLI_edgehash_free(vertpahash, NULL); /* finalization */ CDDM_calc_edges(explode); From c1874b3cee1fdb2220f26f75e676942aee4be561 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Tue, 27 May 2008 20:02:38 +0000 Subject: [PATCH 134/430] [#10223] a new object function to add vertex group from an armature Patch from Jean-Michel Soler (with slight modifs) Small BPy feature to help script writers deal with armatures and vertex groups (calls the bone heat method to create and assign groups) --- source/blender/python/api2_2x/Object.c | 39 +++++++++++++++++++++ source/blender/python/api2_2x/doc/Object.py | 7 ++++ 2 files changed, 46 insertions(+) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 82f99adcdb1..1a806932bdb 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -341,6 +341,7 @@ static int setupPI(Object* ob); static PyObject *Object_getParticleSys( BPy_Object * self ); /* fixme Object_newParticleSys( self, default-partsys-name ) */ +static PyObject *Object_addVertexGroupsFromArmature( BPy_Object * self, PyObject * args); static PyObject *Object_newParticleSys( BPy_Object * self ); static PyObject *Object_buildParts( BPy_Object * self ); static PyObject *Object_clearIpo( BPy_Object * self ); @@ -475,6 +476,8 @@ static PyMethodDef BPy_Object_methods[] = { "Return a list of particle systems"}, {"newParticleSystem", ( PyCFunction ) Object_newParticleSys, METH_NOARGS, "Create and link a new particle system"}, + {"addVertexGroupsFromArmature" , ( PyCFunction ) Object_addVertexGroupsFromArmature, METH_VARARGS, + "Add vertex groups from armature using the bone heat method"}, {"buildParts", ( PyCFunction ) Object_buildParts, METH_NOARGS, "Recalcs particle system (if any), (depricated, will always return an empty list in version 2.46)"}, {"getIpo", ( PyCFunction ) Object_getIpo, METH_NOARGS, @@ -1109,6 +1112,42 @@ PyObject *Object_newParticleSys( BPy_Object * self ){ return ParticleSys_CreatePyObject(rpsys,ob); } +/*****************************************************************************/ +/* attribute: addVertexGroupsFromArmature */ +/* Description: evaluate and add vertex groups to the current object */ +/* for each bone of the selected armature */ +/* Data: self Object, Bpy armature */ +/* Return: nothing */ +/*****************************************************************************/ +static PyObject *Object_addVertexGroupsFromArmature( BPy_Object * self, PyObject * args) +{ + + Object *ob = self->object; + BPy_Object *arm; + + if( ob->type != OB_MESH ) + return EXPP_ReturnPyObjError( PyExc_TypeError, + "Only useable on Mesh type Objects" ); + + if( G.obedit != NULL) + return EXPP_ReturnPyObjError( PyExc_TypeError, + "Not useable when inside edit mode" ); + + /* Check if the arguments passed to makeParent are valid. */ + if( !PyArg_ParseTuple( args, "O!",&Object_Type, &arm ) ) + return EXPP_ReturnPyObjError( PyExc_TypeError, + "An armature object is expected." ); + + if( arm->object->type != OB_ARMATURE ) + return EXPP_ReturnPyObjError( PyExc_TypeError, + "An armature object is expected." ); + + add_verts_to_dgroups(ob, arm->object, 1, 0); + ob->recalc |= OB_RECALC_OB; + + Py_RETURN_NONE; +} + static PyObject *Object_buildParts( BPy_Object * self ) { /* This is now handles by modifiers */ diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py index 521be3b0cea..09167c0e117 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -651,6 +651,13 @@ class Object: Link a new particle system (see Blender.Particle). """ + def addVertexGroupsFromArmature(object): + """ + Add vertex groups from armature using the bone heat method + This method can be only used with an Object of the type Mesh when NOT in edit mode. + @type object: a bpy armature + """ + def buildParts(): """ Recomputes the particle system. This method only applies to an Object of From da36e8abca19b667d1c300a154e6e6798af119e9 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 27 May 2008 22:42:38 +0000 Subject: [PATCH 135/430] -= KDOP / Collisions =- 1. Fix for face with index=0 not handled --- source/blender/blenlib/intern/BLI_kdopbvh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index cf326f3f460..c884b97b182 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -653,10 +653,10 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2) if(tree_overlap(node1->bv, node2->bv, MIN2(data->tree1->start_axis, data->tree2->start_axis), MIN2(data->tree1->stop_axis, data->tree2->stop_axis))) { // check if node1 is a leaf - if(node1->index) + if(!node1->totnode) { // check if node2 is a leaf - if(node2->index) + if(!node2->totnode) { if(node1 == node2) From ed42c9a6768712c1eeba3b36af09620f668d663b Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 27 May 2008 22:46:57 +0000 Subject: [PATCH 136/430] -= Collisions -= 1. Test for fast moving edges --- source/blender/blenkernel/intern/collision.c | 102 ++++++++++--------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 0b291aaa695..37784b43cf9 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -498,6 +498,7 @@ DO_INLINE void collision_interpolateOnTriangle ( float to[3], float v1[3], float VECADDMUL ( to, v3, w3 ); } + int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; @@ -1189,8 +1190,16 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat edgecollpair.p22 = collpair->bp3; } + if((edgecollpair.p11 == 3) && (edgecollpair.p12 == 6)) + printf("Ahier!\n"); + if((edgecollpair.p11 == 6) && (edgecollpair.p12 == 3)) + printf("Ahier!\n"); + if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) ) { + // printf("Collision between:\n"); + // printf("p11: %d, p12: %d, p21: %d, p22: %d\n", edgecollpair.p11, edgecollpair.p12, edgecollpair.p21, edgecollpair.p22); + // always put coll points in p21/p22 VECSUB ( x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold ); VECSUB ( v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv ); @@ -1206,11 +1215,14 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat for ( k = 0; k < numsolutions; k++ ) { // printf("sol %d: %lf\n", k, solution[k]); - if ( ( solution[k] >= DBL_EPSILON ) && ( solution[k] <= 1.0 ) ) + if ( ( solution[k] >= ALMOST_ZERO ) && ( solution[k] <= 1.0 ) && ( solution[k] > ALMOST_ZERO)) { float a,b; float out_normal[3]; float distance; + float impulse = 0; + float I_mag; + float m1, m2; // move verts VECADDS(triA[0], verts1[edgecollpair.p11].txold, verts1[edgecollpair.p11].tv, mintime); @@ -1224,28 +1236,57 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat if ((distance <= clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree ) + ALMOST_ZERO) && (INPR(out_normal, out_normal) > 0)) { - // printf("found edge, dist: %f\n", distance); + float vrel_1_to_2[3], temp[3], temp2[3], out_normalVelocity; + float desiredVn; + + VECCOPY(vrel_1_to_2, verts1[edgecollpair.p11].tv); + VecMulf(vrel_1_to_2, 1.0 - a); + VECCOPY(temp, verts1[edgecollpair.p12].tv); + VecMulf(temp, a); + + VECADD(vrel_1_to_2, vrel_1_to_2, temp); + + VECCOPY(temp, verts1[edgecollpair.p21].tv); + VecMulf(temp, 1.0 - b); + VECCOPY(temp2, verts1[edgecollpair.p22].tv); + VecMulf(temp2, b); + VECADD(temp, temp, temp2); + + VECSUB(vrel_1_to_2, vrel_1_to_2, temp); + + out_normalVelocity = INPR(vrel_1_to_2, out_normal); + + if(out_normalVelocity < 0.0) + { + out_normalVelocity*= -1.0; + VecMulf(out_normal, -1.0); + } /* Inelastic repulsion impulse. */ -/* + // Calculate which normal velocity we need. - float desiredVn = (normalVelocity * (float)solution[k] - (.1 * (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree )) - sqrt(squaredDistance)) - ALMOST_ZERO); + desiredVn = (out_normalVelocity * (float)solution[k] - (.1 * (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree )) - sqrt(distance)) - ALMOST_ZERO); // Now calculate what impulse we need to reach that velocity. - float m1 = interpolateOnEdge(cloth1.getVertexWeight(v11idx), cloth1.getVertexWeight(v12idx), a1); - float m2 = interpolateOnEdge(cloth2.getVertexWeight(v21idx), cloth2.getVertexWeight(v22idx), a2); - float I_mag = (normalVelocity - desiredVn) / (1/m1 + 1/m2); + I_mag = (out_normalVelocity - desiredVn) / 2.0; // / (1/m1 + 1/m2); // Finally apply that impulse. - applyInterpolatedImpulsesEdge(out_impulses1[v11idx], out_impulses1[v12idx], out_impulses2[v21idx], out_impulses2[v22idx], - a1, a2, -I_mag, normal); - ++out_impulseCounter1[v11idx]; ++out_impulseCounter1[v12idx]; - ++out_impulseCounter2[v21idx]; ++out_impulseCounter2[v22idx]; + impulse = (2.0 * -I_mag) / (a*a + (1.0-a)*(1.0-a) + b*b + (1.0-b)*(1.0-b)); - */ // return true; + VECADDMUL ( verts1[edgecollpair.p11].impulse, out_normal, (1.0-a) * impulse ); + verts1[edgecollpair.p11].impulse_count++; + + VECADDMUL ( verts1[edgecollpair.p12].impulse, out_normal, a * impulse ); + verts1[edgecollpair.p12].impulse_count++; + + // return true; result = 1; + break; + } + else + { + // missing from collision.hpp } - mintime = MIN2(mintime, (float)solution[k]); break; @@ -1253,37 +1294,6 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat } } } -/* - if(result) - { - // move triangles to collision point in time - VECADDS(triA[0], verts1[collpair->ap1].txold, verts1[collpair->ap1].tv, mintime); - VECADDS(triA[1], verts1[collpair->ap2].txold, verts1[collpair->ap2].tv, mintime); - VECADDS(triA[2], verts1[collpair->ap3].txold, verts1[collpair->ap3].tv, mintime); - - VECADDS(triB[0], collmd->current_x[collpair->bp1].co, collmd->current_v[collpair->bp1].co, mintime); - VECADDS(triB[1], collmd->current_x[collpair->bp2].co, collmd->current_v[collpair->bp2].co, mintime); - VECADDS(triB[2], collmd->current_x[collpair->bp3].co, collmd->current_v[collpair->bp3].co, mintime); - - // check distance there - distance = plNearestPoints (triA[0], triA[1], triA[2], triB[0], triB[1], triB[2], collpair->pa,collpair->pb,collpair->vector ); - - if(distance <= (clmd->coll_parms->epsilon + BLI_bvhtree_getepsilon ( collmd->bvhtree ) + ALMOST_ZERO)) - { - CollPair *next = collpair; - next++; - - collpair->distance = clmd->coll_parms->epsilon; - collpair->time = mintime; - - VECCOPY ( collpair->normal, collpair->vector ); - Normalize ( collpair->normal ); - - // cloth_collision_response_moving ( clmd, collmd, collpair, next ); - - } - } -*/ return result; } @@ -1419,7 +1429,7 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData } } } -/* + result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); // apply impulses in parallel @@ -1438,7 +1448,7 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData } } } -*/ + } } From b36a358c1b785661c105a6ff59f6a1313053dd4f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 May 2008 00:44:41 +0000 Subject: [PATCH 137/430] bugfix * python api render() would clamp the endframe to a short. * python api's render() and renderAnim() would not render compositing because the name they gave to RE_NewRender was NOT G.scene->id.name, added comments to G.scene->id.name --- source/blender/python/api2_2x/sceneRender.c | 10 ++++++---- source/blender/render/intern/source/pipeline.c | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index f54c2cd4e3b..bfad069f943 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -478,9 +478,11 @@ PyObject *RenderData_Render( BPy_RenderData * self ) } else { /* background mode (blender -b file.blend -P script) */ - Render *re= RE_NewRender("Render"); + Render *re= RE_NewRender(G.scene->id.name); - int end_frame = G.scene->r.efra; /* is of type short currently */ + + + int end_frame = G.scene->r.efra; if (G.scene != self->scene) return EXPP_ReturnPyObjError (PyExc_RuntimeError, @@ -490,7 +492,7 @@ PyObject *RenderData_Render( BPy_RenderData * self ) RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra); - G.scene->r.efra = (short)end_frame; + G.scene->r.efra = end_frame; } Py_RETURN_NONE; @@ -571,7 +573,7 @@ PyObject *RenderData_RenderAnim( BPy_RenderData * self ) set_scene( oldsce ); } else { /* background mode (blender -b file.blend -P script) */ - Render *re= RE_NewRender("Render"); + Render *re= RE_NewRender(G.scene->id.name); if (G.scene != self->scene) return EXPP_ReturnPyObjError (PyExc_RuntimeError, diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index fb699f5b382..ebb52c49132 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -993,6 +993,7 @@ RenderStats *RE_GetStats(Render *re) return &re->i; } +/* Note, when rendering from a scene, ALWAYS use G.scene->id.name, else compositing wont work */ Render *RE_NewRender(const char *name) { Render *re; From c6668755ff865f79d9526301ca6edac48d982b06 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 May 2008 17:13:15 +0000 Subject: [PATCH 138/430] bugfix for baking AO with greater then 16 samples, since it was being clamped in sphere_sampler but not in ray_ao_spheresamp that calls it. giving uneven art deco results. --- source/blender/render/intern/source/rayshade.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 8fd07001bd1..cbba5d2bb2c 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -1473,8 +1473,6 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys) int tot; float *vec; - if(resol>16) resol= 16; - tot= 2*resol*resol; if (type & WO_AORNDSMP) { @@ -1663,7 +1661,7 @@ void ray_ao_spheresamp(ShadeInput *shi, float *shadfac) float *vec, *nrm, div, bias, sh=0.0f; float maxdist = R.wrld.aodist; float dxyview[3]; - int j= -1, tot, actual=0, skyadded=0, aocolor; + int j= -1, tot, actual=0, skyadded=0, aocolor, resol= R.wrld.aosamp; isec.faceorig= (RayFace*)shi->vlr; isec.oborig= RAY_OBJECT_SET(&R, shi->obi); @@ -1690,14 +1688,16 @@ void ray_ao_spheresamp(ShadeInput *shi, float *shadfac) if(shi->mat->mode & MA_ONLYSHADOW) aocolor= WO_AOPLAIN; - vec= sphere_sampler(R.wrld.aomode, R.wrld.aosamp, shi->thread, shi->xs, shi->ys); + if(resol>32) resol= 32; + + vec= sphere_sampler(R.wrld.aomode, resol, shi->thread, shi->xs, shi->ys); // warning: since we use full sphere now, and dotproduct is below, we do twice as much - tot= 2*R.wrld.aosamp*R.wrld.aosamp; + tot= 2*resol*resol; if(aocolor == WO_AOSKYTEX) { - dxyview[0]= 1.0f/(float)R.wrld.aosamp; - dxyview[1]= 1.0f/(float)R.wrld.aosamp; + dxyview[0]= 1.0f/(float)resol; + dxyview[1]= 1.0f/(float)resol; dxyview[2]= 0.0f; } From 9a3b25d8a098577a1889900353af536151683f91 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 28 May 2008 17:16:43 +0000 Subject: [PATCH 139/430] Fix for bug: [#11680] "Col" option for particle systems does not work correctly with Mat IPOs -the feature simply was not coded --- source/blender/src/drawobject.c | 83 +++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 15 deletions(-) diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 3ef14574bc8..d2555f355bb 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2902,7 +2902,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) float *vdata=0, *vedata=0, *cdata=0, *ndata=0, *vd=0, *ved=0, *cd=0, *nd=0, xvec[3], yvec[3], zvec[3]; int a, k, k_max=0, totpart, totpoint=0, draw_as, path_nbr=0; int path_possible=0, keys_possible=0, draw_keys=0, totchild=0; - int select=ob->flag&SELECT; + int select=ob->flag&SELECT, create_cdata=0; GLint polygonmode[2]; char val[32]; @@ -2956,8 +2956,10 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) if(select) cpack(0xFFFFFF); - else if((ma) && (part->draw&PART_DRAW_MAT_COL)) + else if((ma) && (part->draw&PART_DRAW_MAT_COL)) { glColor3f(ma->r,ma->g,ma->b); + create_cdata = 1; + } else cpack(0); @@ -3065,19 +3067,25 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) if(draw_as!=PART_DRAW_CIRC){ switch(draw_as){ case PART_DRAW_AXIS: - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_cdata"); - /* no break! */ case PART_DRAW_CROSS: + if(draw_as!=PART_DRAW_CROSS || create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_vdata"); break; case PART_DRAW_LINE: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_vdata"); break; case PART_DRAW_BB: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); ndata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); break; default: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_vdata"); } } @@ -3102,9 +3110,17 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=(cfra-pa->time)/pa->lifetime; - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100*pa_time); - execute_ipo((ID *)part, part->ipo); + if((part->flag&PART_ABS_TIME)==0){ + if(ma->ipo){ + /* correction for lifetime */ + calc_ipo(ma->ipo, 100.0f*pa_time); + execute_ipo((ID *)ma, ma->ipo); + } + if(part->ipo) { + /* correction for lifetime */ + calc_ipo(part->ipo, 100*pa_time); + execute_ipo((ID *)part, part->ipo); + } } pa_size=pa->size; @@ -3121,9 +3137,17 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=psys_get_child_time(psys,cpa,cfra); - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100*pa_time); - execute_ipo((ID *)part, part->ipo); + if((part->flag&PART_ABS_TIME)==0) { + if(ma->ipo){ + /* correction for lifetime */ + calc_ipo(ma->ipo, 100.0f*pa_time); + execute_ipo((ID *)ma, ma->ipo); + } + if(part->ipo) { + /* correction for lifetime */ + calc_ipo(part->ipo, 100*pa_time); + execute_ipo((ID *)part, part->ipo); + } } pa_size=psys_get_child_size(psys,cpa,cfra,0); @@ -3161,6 +3185,12 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) switch(draw_as){ case PART_DRAW_DOT: + if(cd) { + cd[0]=ma->r; + cd[1]=ma->g; + cd[2]=ma->b; + cd+=3; + } if(vd){ VECCOPY(vd,state.co) vd+=3; } @@ -3181,7 +3211,15 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) VECCOPY(vec2,state.co); } - else VECSUB(vec2,state.co,vec); + else { + if(cd) { + cd[0]=cd[3]=cd[6]=cd[9]=cd[12]=cd[15]=ma->r; + cd[1]=cd[4]=cd[7]=cd[10]=cd[13]=cd[16]=ma->g; + cd[2]=cd[5]=cd[8]=cd[11]=cd[14]=cd[17]=ma->b; + cd+=18; + } + VECSUB(vec2,state.co,vec); + } VECADD(vec,state.co,vec); VECCOPY(vd,vec); vd+=3; @@ -3219,11 +3257,25 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) VecMulf(vec,VecLength(state.vel)); VECADDFAC(vd,state.co,vec,-part->draw_line[0]); vd+=3; VECADDFAC(vd,state.co,vec,part->draw_line[1]); vd+=3; + if(cd) { + cd[0]=cd[3]=ma->r; + cd[1]=cd[4]=ma->g; + cd[2]=cd[5]=ma->b; + cd+=3; + } break; case PART_DRAW_CIRC: + if(create_cdata) + glColor3f(ma->r,ma->g,ma->b); drawcircball(GL_LINE_LOOP, state.co, pixsize, imat); break; case PART_DRAW_BB: + if(cd) { + cd[0]=cd[3]=cd[6]=cd[9]=ma->r; + cd[1]=cd[4]=cd[7]=cd[10]=ma->g; + cd[2]=cd[5]=cd[8]=cd[11]=ma->b; + cd+=12; + } if(part->draw&PART_DRAW_BB_LOCK && part->bb_align==PART_BB_VIEW){ VECCOPY(xvec,bb_ob->obmat[0]); Normalize(xvec); @@ -3419,13 +3471,14 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) glDisable(GL_LIGHTING); } + if(cdata){ + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(3, GL_FLOAT, 0, cdata); + } + switch(draw_as){ case PART_DRAW_AXIS: case PART_DRAW_CROSS: - if(cdata){ - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(3, GL_FLOAT, 0, cdata); - } glDrawArrays(GL_LINES, 0, 6*totpoint); break; case PART_DRAW_LINE: From d49d0e174eaa5391b058f500e8aaa286fd30969d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 May 2008 17:42:03 +0000 Subject: [PATCH 140/430] Small fix for last AO sphere sampling bugfix, didn't update random sampling code as well. --- source/blender/render/intern/source/rayshade.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index cbba5d2bb2c..1155d2ea817 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -1476,9 +1476,12 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys) tot= 2*resol*resol; if (type & WO_AORNDSMP) { - static float sphere[2*3*256]; + float *sphere; int a; + // always returns table + sphere= threadsafe_table_sphere(0, thread, xs, ys, tot); + /* total random sampling. NOT THREADSAFE! (should be removed, is not useful) */ vec= sphere; for (a=0; a Date: Wed, 28 May 2008 17:55:06 +0000 Subject: [PATCH 141/430] Fix for bug #13230: particle mirror could fail on some faces. --- source/blender/src/meshtools.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index e27e772edee..ac165d6aeb2 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -957,6 +957,12 @@ int *mesh_get_x_mirror_faces(Object *ob) mirrormf.v3= mirrorverts[mf->v1]; mirrormf.v4= (mf->v4)? mirrorverts[mf->v4]: 0; + /* make sure v4 is not 0 if a quad */ + if(mf->v4 && mirrormf.v4==0) { + SWAP(int, mirrormf.v1, mirrormf.v3); + SWAP(int, mirrormf.v2, mirrormf.v4); + } + hashmf= BLI_ghash_lookup(fhash, &mirrormf); if(hashmf) { mirrorfaces[a*2]= hashmf - mface; From 04067c183305c31b1f5f9e7ccfe1e6c8af89e5b8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 May 2008 18:11:45 +0000 Subject: [PATCH 142/430] Fix for bug #13224: vertex parenting didn't work correct with multiple unconnected curves. --- source/blender/blenkernel/intern/object.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ab1bc5a2265..4f901ba7216 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1614,7 +1614,7 @@ static void give_parvert(Object *par, int nr, float *vec) for(eve= em->verts.first; eve; eve= eve->next) { if(eve->keyindex==nr) { - memcpy(vec, eve->co, 12); + memcpy(vec, eve->co, sizeof(float)*3); break; } } @@ -1652,18 +1652,20 @@ static void give_parvert(Object *par, int nr, float *vec) Curve *cu; BPoint *bp; BezTriple *bezt; + int found= 0; cu= par->data; nu= cu->nurb.first; if(par==G.obedit) nu= editNurb.first; count= 0; - while(nu) { + while(nu && !found) { if((nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { if(count==nr) { + found= 1; VECCOPY(vec, bezt->vec[1]); break; } @@ -1676,7 +1678,8 @@ static void give_parvert(Object *par, int nr, float *vec) a= nu->pntsu*nu->pntsv; while(a--) { if(count==nr) { - memcpy(vec, bp->vec, 12); + found= 1; + memcpy(vec, bp->vec, sizeof(float)*3); break; } count++; From 1a5181c9c71802309b9947456e528cb5ee644d5e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 May 2008 21:15:40 +0000 Subject: [PATCH 143/430] bugfix for own bug. mousewheel while playing in the sequencer crashes blender. --- source/blender/src/drawview.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 52e0d3d6f05..e83ecb13960 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3732,18 +3732,22 @@ int play_anim(int mode) else viewmove(0); } } else if (event==WHEELDOWNMOUSE || (val && event==PADMINUS)) { /* copied from persptoetsen */ - /* this min and max is also in viewmove() */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom-= 10; - if(G.vd->camzoom<-30) G.vd->camzoom= -30; + if (G.vd) { /* when using the sequencer this can be NULL */ + /* this min and max is also in viewmove() */ + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom-= 10; + if(G.vd->camzoom<-30) G.vd->camzoom= -30; + } + else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } - else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } else if (event==WHEELUPMOUSE || (val && event==PADPLUSKEY)) { /* copied from persptoetsen */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom+= 10; - if(G.vd->camzoom>300) G.vd->camzoom= 300; + if (G.vd) { + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom+= 10; + if(G.vd->camzoom>300) G.vd->camzoom= 300; + } + else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } - else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } else if(event==MKEY) { if(val) add_marker(CFRA-1); } From 9986b5cd736a493026c9580a49bbf030cd1fa4be Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 28 May 2008 21:19:56 +0000 Subject: [PATCH 144/430] soc-2008-mxcurioni: corrected GLStrokeRender::preparePaper function for paper texture loading. The canvas view now has its frame properly initialized to fixed dimensions. When the Freestyle render is executed, the render is displayed for a fraction of a second and is then erased by a standard gray background. I have to analyze what command I need to call to keep the result on display. --- source/blender/freestyle/SConscript | 6 +--- .../intern/app_blender/AppCanvas.cpp | 2 +- .../intern/app_blender/AppGLWidget.cpp | 15 ++------- .../intern/app_blender/AppGLWidget.h | 14 ++++---- .../freestyle/intern/app_blender/api.cpp | 4 ++- .../intern/rendering/GLStrokeRenderer.cpp | 32 ++++++++++++------- 6 files changed, 37 insertions(+), 36 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 198eb2ed422..58d4e980e8b 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -55,14 +55,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): prefix = 'intern/app_blender' app_sources = env.Glob(prefix + '/*.cpp') -# swig wrapper -#prefix = 'intern/swig' -#swig_sources = env.Glob(prefix + '/*.cpp') -swig_sources = [] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ + winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \ - + app_sources + swig_sources + + app_sources env.BlenderLib (libname="bf_freestyle", sources=sources, diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp index 5125bf5f70b..98013cf18d4 100755 --- a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -214,7 +214,7 @@ void AppCanvas::update() // char number[10]; // _pViewer->updateGL(); - _pViewer->swapBuffers(); + //_pViewer->swapBuffers(); //QImage fb = _pViewer->grabFrameBuffer(); // sprintf(number, "%3d", counter); // strcat(fileName, number); diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 18e9639342d..a06e25d72be 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -618,22 +618,13 @@ bool AppGLWidget::getBackBufferFlag() { // COPIED FROM LIBQGLVIEWER //******************************* - // inherited - void AppGLWidget::swapBuffers() {} - + // inherited //Updates the display. Do not call draw() directly, use this method instead. void AppGLWidget::updateGL() {} //Makes this widget's rendering context the current OpenGL rendering context. Useful with several viewers - void AppGLWidget::makeCurrent() {} - + void AppGLWidget::makeCurrent() { } // not-inherited - - // Convenient way to call setSceneCenter() and setSceneRadius() from a (world axis aligned) bounding box of the scene. - void AppGLWidget::setSceneBoundingBox(const Vec& min, const Vec& max) { _camera->setSceneBoundingBox(min,max); } - - void AppGLWidget::saveSnapshot(bool b) {} - void AppGLWidget::setStateFileName(const string& name) { stateFileName_ = name; }; - + void AppGLWidget::saveSnapshot(bool b) {} diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 3cf7844876d..15238ba6269 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -47,6 +47,7 @@ using namespace std; # include "../rendering/GLDebugRenderer.h" //# include + //soc #include "AppGLWidget_camera.h" #include "AppGLWidget_vec.h" @@ -76,14 +77,15 @@ public: public: //inherited - inline real width() { return _width; } - inline real height() { return _height; } - void swapBuffers(); + inline unsigned int width() { return _width; } + inline unsigned int height() { return _height; } + inline void setWidth( unsigned int width ) { _width = width; } + inline void setHeight( unsigned int height ) { _height = height; } + void updateGL(); void makeCurrent(); // not-inherited - void setSceneBoundingBox(const Vec& min, const Vec& max); void saveSnapshot(bool b); void setStateFileName(const string& name); @@ -91,7 +93,7 @@ public: Camera * _camera; protected: - real _width, _height; + unsigned int _width, _height; Vec _min,_max; string stateFileName_; @@ -306,7 +308,7 @@ public: Vec max_(_ModelRootNode->bbox().getMax()[0], _ModelRootNode->bbox().getMax()[1], _ModelRootNode->bbox().getMax()[2]); - setSceneBoundingBox(min_, max_); + _camera->setSceneBoundingBox(min_, max_); _camera->showEntireScene(); } diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 5f3d8224ec5..eb29580f891 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -20,7 +20,9 @@ extern "C" { AppGLWidget *view = new AppGLWidget; c->SetView(view); - + view->setWidth(640); + view->setHeight(640); + c->Load3DSFile( TEST_3DS_FILE ); c->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); diff --git a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp index c29ba759139..94518cee58f 100755 --- a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp @@ -368,11 +368,13 @@ GLTextureManager::prepareTextureAlpha (string sname, GLuint itexname) BLI_splitdirstring(name, filename); //soc if (qim.isNull()) - if( qim ) + if (!qim) //soc { cerr << " Error: unable to read \"" << filename << "\"" << endl; + IMB_freeImBuf(qim); return false; } + if( qim->depth > 8) //soc { cerr<<" Error: \""<< filename <<"\" has "<< qim->depth <<" bits/pixel"<depth > 8) //soc @@ -463,11 +466,13 @@ GLTextureManager::prepareTextureLuminanceAndAlpha (string sname, GLuint itexname char filename[FILE_MAXFILE]; BLI_splitdirstring(name, filename); - if (!qim) //soc + if (!qim) //soc { cerr << " Error: unable to read \"" << filename << "\"" << endl; + IMB_freeImBuf(qim); return false; } + if (qim->depth > 8) //soc { cerr<<" Error: \""<depth <<" bits/pixel"<depth = 32; if (!qim) //soc { cerr << " Error: unable to read \"" << filename << "\"" << endl; + IMB_freeImBuf(qim); return false; } - if (qim->depth !=32) //soc - { - cerr<<" Error: \""<depth<<" bits/pixel"<depth != 32) + // { + // cerr<<" Error: \""<depth <<" bits/pixel"<x, qim->y, 0, - GL_RGBA, GL_UNSIGNED_BYTE, qim->rect); //soc: here qim->rect, not qim2->rect, used + GL_RGBA, GL_UNSIGNED_BYTE, qim->rect); // soc: was qim2 //cout << " \"" << filename.toAscii().data() << "\" loaded with "<< qim.depth() << " bits per pixel" << endl; - cout << " \"" << StringUtils::toAscii(filename) << "\" loaded with "<< qim->depth << " bits per pixel" << endl; + cout << " \"" << StringUtils::toAscii(filename) << "\" loaded with 32 bits per pixel" << endl; return true; } From a17f322dd0796cc76e1c8f40ce60ddddc990f93e Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 28 May 2008 23:38:40 +0000 Subject: [PATCH 145/430] Bug fix: [#13268] Crash when creating a new particle system -Ugh.. sorry about that.. damn default cube with it's default material! --- source/blender/src/drawobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index d2555f355bb..96ba8c71755 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3111,7 +3111,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=(cfra-pa->time)/pa->lifetime; if((part->flag&PART_ABS_TIME)==0){ - if(ma->ipo){ + if(ma && ma->ipo){ /* correction for lifetime */ calc_ipo(ma->ipo, 100.0f*pa_time); execute_ipo((ID *)ma, ma->ipo); @@ -3138,7 +3138,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=psys_get_child_time(psys,cpa,cfra); if((part->flag&PART_ABS_TIME)==0) { - if(ma->ipo){ + if(ma && ma->ipo){ /* correction for lifetime */ calc_ipo(ma->ipo, 100.0f*pa_time); execute_ipo((ID *)ma, ma->ipo); From 9a6302e10994e45a2ec8a419bda5e1735c8e0799 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 29 May 2008 00:27:09 +0000 Subject: [PATCH 146/430] soc-2008-mxcurioni: First render ! It should render the teapot upside down on a black background. The correction was made by following Yafray's rendering and display implementation, which is very clear. --- source/blender/freestyle/FST_freestyle.h | 2 +- source/blender/freestyle/SConscript | 3 +- .../freestyle/intern/app_blender/api.cpp | 44 +++++++++++++++++-- .../intern/rendering/GLStrokeRenderer.cpp | 1 - .../blender/render/intern/source/pipeline.c | 10 ++++- 5 files changed, 52 insertions(+), 8 deletions(-) diff --git a/source/blender/freestyle/FST_freestyle.h b/source/blender/freestyle/FST_freestyle.h index 52940815fe4..1f516078258 100644 --- a/source/blender/freestyle/FST_freestyle.h +++ b/source/blender/freestyle/FST_freestyle.h @@ -5,7 +5,7 @@ extern "C" { #endif - void FRS_execute(); + void FRS_execute(Render* re); #ifdef __cplusplus } diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 58d4e980e8b..33bc9682bbe 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -6,7 +6,8 @@ sources = [] defs = [] incs = '' -incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python' +incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python ' +incs += '../render/extern/include ../render/intern/include' incs += ' #/extern/freestyle/lib3ds' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index eb29580f891..d842e59d31b 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -6,13 +6,26 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + +#include "render_types.h" +//#include "renderdatabase.h" +/* display_draw() needs render layer info */ +#include "renderpipeline.h" + +#ifdef __cplusplus +} +#endif + using namespace std; #ifdef __cplusplus extern "C" { #endif - void FRS_execute() { + void FRS_execute(Render* re) { cout << "Freestyle start" << endl; Config::Path pathconfig; @@ -20,16 +33,39 @@ extern "C" { AppGLWidget *view = new AppGLWidget; c->SetView(view); - view->setWidth(640); - view->setHeight(640); + unsigned int width = re->winx; + unsigned int height = re->winy; + view->setWidth(width); + view->setHeight(height); c->Load3DSFile( TEST_3DS_FILE ); c->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); c->toggleLayer(0, true); c->ComputeViewMap(); - + c->DrawStrokes(); + + RenderResult rres; + RE_GetResultImage(re, &rres); + float *rgb = new float[3*width*height]; + view->readPixels(0,0,width,height,AppGLWidget::RGB, rgb); + + for (unsigned short y=0; yresult->renlay = render_get_active_layer(re, re->result); + re->display_draw(re->result, NULL); cout << "Freestyle end" << endl; diff --git a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp index 94518cee58f..5033cc5d895 100755 --- a/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLStrokeRenderer.cpp @@ -513,7 +513,6 @@ GLTextureManager::preparePaper (const char *name, GLuint itexname) ImBuf *qim = IMB_loadiffname(name, 0); char filename[FILE_MAXFILE]; BLI_splitdirstring((char *)name, filename); - qim->depth = 32; if (!qim) //soc { diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 27abbf96122..d45dd77fe1e 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2193,7 +2193,15 @@ static void do_render_composite_fields_blur_3d(Render *re) static void freestyleRender(Render *re) { - FRS_execute(); + RE_FreeRenderResult(re->result); + re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM); + + RE_SetCamera(re, re->scene->camera); + + FRS_execute(re); + + re->stats_draw(&re->i); + RE_Database_Free(re); } #ifndef DISABLE_YAFRAY From e015796b3667e40bba093d0d3b67cb8bcbcdd34a Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 29 May 2008 01:04:12 +0000 Subject: [PATCH 147/430] Fill Bone Between Joints: This tool now parents the newly created bone to whichever bone acted as it's 'head' point. It also sets the connected-to-parent flag. --- source/blender/src/editarmature.c | 46 +++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index c166a9df762..a68503b0d06 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2396,6 +2396,7 @@ void fill_bones_armature(void) else if (count == 2) { EditBonePoint *ebp, *ebp2; float head[3], tail[3]; + short headtail = 0; /* check that the points don't belong to the same bone */ ebp= (EditBonePoint *)points.first; @@ -2420,7 +2421,7 @@ void fill_bones_armature(void) float distA, distB; /* get cursor location */ - VECCOPY (curs, give_cursor()); + VECCOPY(curs, give_cursor()); Mat4Invert(G.obedit->imat, G.obedit->obmat); Mat4MulVecfl(G.obedit->imat, curs); @@ -2432,26 +2433,47 @@ void fill_bones_armature(void) distB= VecLength(vecB); /* compare distances - closer one therefore acts as direction for bone to go */ - if (distA < distB) { - VECCOPY(head, ebp2->vec); - VECCOPY(tail, ebp->vec); - } - else { - VECCOPY(head, ebp->vec); - VECCOPY(tail, ebp2->vec); - } + headtail= (distA < distB) ? 2 : 1; } else if (ebp->head_owner) { + headtail = 1; + } + else if (ebp2->head_owner) { + headtail = 2; + } + + /* assign head/tail combinations */ + if (headtail == 1) { VECCOPY(head, ebp->vec); VECCOPY(tail, ebp2->vec); } - else if (ebp2->head_owner) { + else if (headtail == 2) { VECCOPY(head, ebp2->vec); VECCOPY(tail, ebp->vec); } - /* add new bone */ - newbone= add_points_bone(head, tail); + /* add new bone and parent it to the appropriate end */ + if (headtail) { + newbone= add_points_bone(head, tail); + + /* do parenting (will need to set connected flag too) */ + if (headtail == 1) { + /* ebp tail or head - tail gets priority */ + if (ebp->tail_owner) + newbone->parent= ebp->tail_owner; + else + newbone->parent= ebp->head_owner; + } + else { + /* ebp2 tail or head - tail gets priority */ + if (ebp2->tail_owner) + newbone->parent= ebp2->tail_owner; + else + newbone->parent= ebp2->head_owner; + } + + newbone->flag |= BONE_CONNECTED; + } } else { // FIXME.. figure out a method for multiple bones From 4b7174a6dd18d83b4d359f3e86df8a6f7a6edd7a Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 29 May 2008 02:31:36 +0000 Subject: [PATCH 148/430] soc-2008-mxcurioni: updated SConscript file for SWIG module compilation and linking under Linux --- source/blender/freestyle/SConscript | 13 ++++++++++--- .../intern/app_blender/AppGLWidget_point.h | 2 +- .../freestyle/intern/app_blender/test_config.h | 3 +-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 33bc9682bbe..c9a77919f4f 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -74,11 +74,18 @@ env.BlenderLib (libname="bf_freestyle", ######################################################## # swig # -# Run the following two commands in the source/blender/freestyle/intern/swig directory. +# 1] Run the following two commands in the source/blender/freestyle/intern/swig directory. # -# Replace /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib to the path +# 2] Replace /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib to the path # of your library directory (used to locate libbf_freestyle.a) +# +# 3] Replace the python directories to suit your config # g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o -# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o \ No newline at end of file +########### Mac OS X ########### +# g++ -bundle -flat_namespace -undefined suppress -w -L/usr/lib/python2.5/config -L/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o + +########### Linux ########### +# g++ -shared -w -L/usr/lib/python2.5/config -L/home/joe/bf_blender_freestyle/build/linux2/lib -lpython2.5 -lbf_freestyle -o ../../python/_Freestyle.so ModuleWrapper.o + diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h index 81903f174a8..4250922239d 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_point.h @@ -156,4 +156,4 @@ inline const Point operator/( const Point &p, double c ) return Point((QCOORD)(p.xp/c), (QCOORD)(p.yp/c)); } -#endif // POINT_H \ No newline at end of file +#endif // POINT_H diff --git a/source/blender/freestyle/intern/app_blender/test_config.h b/source/blender/freestyle/intern/app_blender/test_config.h index 98239f279f3..6507050a4e4 100644 --- a/source/blender/freestyle/intern/app_blender/test_config.h +++ b/source/blender/freestyle/intern/app_blender/test_config.h @@ -5,5 +5,4 @@ #define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" - -#define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg" \ No newline at end of file +#define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg" From fe7b591280ed1dec135d1cb95c5351dba4ec9d12 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 29 May 2008 06:14:53 +0000 Subject: [PATCH 149/430] Another bugfix for Fill Bone Between Joints. Changed the order that bones are created between 'head'/'tail' points --- source/blender/src/editarmature.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index a68503b0d06..39f93510358 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2443,11 +2443,11 @@ void fill_bones_armature(void) } /* assign head/tail combinations */ - if (headtail == 1) { + if (headtail == 2) { VECCOPY(head, ebp->vec); VECCOPY(tail, ebp2->vec); } - else if (headtail == 2) { + else if (headtail == 1) { VECCOPY(head, ebp2->vec); VECCOPY(tail, ebp->vec); } @@ -2457,7 +2457,7 @@ void fill_bones_armature(void) newbone= add_points_bone(head, tail); /* do parenting (will need to set connected flag too) */ - if (headtail == 1) { + if (headtail == 2) { /* ebp tail or head - tail gets priority */ if (ebp->tail_owner) newbone->parent= ebp->tail_owner; From f3966dda4e0a03c16206cfbf176f222e13a784c1 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 29 May 2008 09:00:49 +0000 Subject: [PATCH 150/430] soc-2008-mxcurioni: made the image rendering faster by reading the frame buffer directly into the RenderResult's ImBuf structure, removing the need to copy it manually --- .../intern/app_blender/AppGLWidget.h | 4 +++ .../freestyle/intern/app_blender/api.cpp | 32 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 15238ba6269..eb233bfcb7d 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -329,6 +329,7 @@ public: /*! glReadPixels */ typedef enum{ + RGBA, RGB, DEPTH } PixelFormat; @@ -345,6 +346,9 @@ public: GLenum glformat; switch(format) { + case RGBA: + glformat = GL_RGBA; + break; case RGB: glformat = GL_RGB; break; diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index d842e59d31b..906522b059e 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -48,21 +48,25 @@ extern "C" { RenderResult rres; RE_GetResultImage(re, &rres); - float *rgb = new float[3*width*height]; - view->readPixels(0,0,width,height,AppGLWidget::RGB, rgb); + view->readPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); + + // float *rgb = new float[3*width*height]; + // view->readPixels(0,0,width,height,AppGLWidget::RGB, rgb); + // + // for (unsigned short y=0; yresult->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); From be2b832db7652afe9a6ce9a05da7420d12ac8916 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 29 May 2008 11:41:06 +0000 Subject: [PATCH 151/430] soc-mx-curioni: resolved the rendering issue. In the previous steps, I was only rendering the strokes, not the toatl scene (explaining why the render color was being inverted). i added a call to the view's draw() method. Now, the rendering steps are complete and display both the object and the silhouette. --- .../intern/app_blender/AppCanvas.cpp | 1 + .../intern/app_blender/AppGLWidget.h | 4 ++- .../intern/app_blender/Controller.cpp | 12 --------- .../freestyle/intern/app_blender/api.cpp | 26 +++---------------- .../blender/render/intern/source/pipeline.c | 2 +- 5 files changed, 9 insertions(+), 36 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp index 98013cf18d4..f82d136b525 100755 --- a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -306,6 +306,7 @@ void AppCanvas::Render(const StrokeRenderer *iRenderer) glBlendFunc(GL_SRC_ALPHA, GL_ONE); glEnable(GL_TEXTURE_2D); + Canvas::Render(iRenderer); // glPushAttrib(GL_COLOR_BUFFER_BIT); diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index eb233bfcb7d..319fc248494 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -435,9 +435,11 @@ public: static void setBackBufferFlag(bool iBool); static bool getBackBufferFlag(); +public: + virtual void draw(); + protected: virtual void init(); - virtual void draw(); /*! Loads an envmap */ void LoadEnvMap(const char *filename); diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index bd234746e2b..8b494ff5108 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -1063,18 +1063,6 @@ void Controller::init_options(){ Config::Path * cpath = Config::Path::getInstance(); - // const string& getProjectDir() const {return _ProjectDir;} - // const string& getModelsPath() const {return _ModelsPath;} - // const string& getPatternsPath() const {return _PatternsPath;} - // const string& getBrushesPath() const {return _BrushesPath;} - // const string& getPythonPath() const {return _PythonPath;} - // const string& getBrowserCmd() const {return _BrowserCmd;} - // const string& getHelpIndexpath() const {return _HelpIndexPath;} - // const string& getPapersDir() const {return _PapersDir;} - // const string& getEnvMapDir() const {return _EnvMapDir;} - // const string& getMapsDir() const {return _MapsDir;} - // const string& getHomeDir() const {return _HomeDir;} - // Directories ViewMapIO::Options::setModelsPath( StringUtils::toAscii( cpath->getModelsPath() ) ); PythonInterpreter::Options::setPythonPath( StringUtils::toAscii( cpath->getPythonPath() ) ); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 906522b059e..a021e30a6e5 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -44,30 +44,12 @@ extern "C" { c->toggleLayer(0, true); c->ComputeViewMap(); - c->DrawStrokes(); - + c->DrawStrokes(); // build strokes + view->draw(); // render final result + RenderResult rres; RE_GetResultImage(re, &rres); - view->readPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); - - // float *rgb = new float[3*width*height]; - // view->readPixels(0,0,width,height,AppGLWidget::RGB, rgb); - // - // for (unsigned short y=0; yreadPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); re->result->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index d45dd77fe1e..88998199452 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2194,7 +2194,7 @@ static void do_render_composite_fields_blur_3d(Render *re) static void freestyleRender(Render *re) { RE_FreeRenderResult(re->result); - re->result= new_render_result(re, &re->disprect, 0, RR_USEMEM); + re->result = new_render_result(re, &re->disprect, 0, RR_USEMEM); RE_SetCamera(re, re->scene->camera); From f1d54f892b7480b746b6423d4388455fe7ede2b9 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 29 May 2008 14:23:08 +0000 Subject: [PATCH 152/430] -= Collisions =- Getting some weird results on moving fast edges. This is a backup commit, will try another thing --- source/blender/blenkernel/intern/collision.c | 127 ++++++++++--------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 37784b43cf9..36cc37eab44 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -388,8 +388,8 @@ int cloth_get_collision_time ( double a[3], double b[3], double c[3], double d[3 printf("v3 x: %f, y: %f, z: %f\n", f[0], f[1], f[2]); printf("t^3: %lf, t^2: %lf, t^1: %lf, t^0: %lf\n", j, i, h, g); - */ - + +*/ // Solve cubic equation to determine times t1, t2, t3, when the collision will occur. if ( ABS ( j ) > DBL_EPSILON ) { @@ -453,6 +453,7 @@ int cloth_get_collision_time ( double a[3], double b[3], double c[3], double d[3 return num_sols; } + // w3 is not perfect void collision_compute_barycentric ( float pv[3], float p1[3], float p2[3], float p3[3], float *w1, float *w2, float *w3 ) { @@ -713,52 +714,43 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap } else { - // check for collision in the future - collpair->flag |= COLLISION_IN_FUTURE; + float w1, w2, w3, u1, u2, u3; + float v1[3], v2[3], relativeVelocity[3]; + + // calc relative velocity + + // compute barycentric coordinates for both collision points + collision_compute_barycentric ( collpair->pa, + verts1[collpair->ap1].txold, + verts1[collpair->ap2].txold, + verts1[collpair->ap3].txold, + &w1, &w2, &w3 ); + + // was: txold + collision_compute_barycentric ( collpair->pb, + collmd->current_x[collpair->bp1].co, + collmd->current_x[collpair->bp2].co, + collmd->current_x[collpair->bp3].co, + &u1, &u2, &u3 ); + + // Calculate relative "velocity". + collision_interpolateOnTriangle ( v1, verts1[collpair->ap1].tv, verts1[collpair->ap2].tv, verts1[collpair->ap3].tv, w1, w2, w3 ); + + collision_interpolateOnTriangle ( v2, collmd->current_v[collpair->bp1].co, collmd->current_v[collpair->bp2].co, collmd->current_v[collpair->bp3].co, u1, u2, u3 ); + + VECSUB ( relativeVelocity, v2, v1 ); + + if(sqrt(INPR(relativeVelocity, relativeVelocity)) >= distance) + { + // check for collision in the future + collpair->flag |= COLLISION_IN_FUTURE; + } } collpair++; } return collpair; } -int cloth_are_edges_adjacent ( ClothModifierData *clmd, CollisionModifierData *collmd, EdgeCollPair *edgecollpair ) -{ - Cloth *cloth1 = NULL; - ClothVertex *verts1 = NULL; - float temp[3]; - MVert *verts2 = collmd->current_x; // old x - - cloth1 = clmd->clothObject; - verts1 = cloth1->verts; - - VECSUB ( temp, verts1[edgecollpair->p11].txold, verts2[edgecollpair->p21].co ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - VECSUB ( temp, verts1[edgecollpair->p11].txold, verts2[edgecollpair->p22].co ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - VECSUB ( temp, verts1[edgecollpair->p12].txold, verts2[edgecollpair->p21].co ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - VECSUB ( temp, verts1[edgecollpair->p12].txold, verts2[edgecollpair->p22].co ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - VECSUB ( temp, verts1[edgecollpair->p11].txold, verts1[edgecollpair->p12].txold ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - VECSUB ( temp, verts2[edgecollpair->p21].co, verts2[edgecollpair->p22].co ); - if ( ABS ( INPR ( temp, temp ) ) < ALMOST_ZERO ) - return 1; - - - return 0; -} - int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; @@ -879,13 +871,18 @@ static float projectPointOntoLine(float *p, float *a, float *b) static void calculateEENormal(float *np1, float *np2, float *np3, float *np4,float *out_normal) { - float line1[33], line2[3]; + float line1[3], line2[3]; float length; VECSUB(line1, np2, np1); VECSUB(line2, np3, np1); + // printf("l1: %f, l1: %f, l2: %f, l2: %f\n", line1[0], line1[1], line2[0], line2[1]); + Crossf(out_normal, line1, line2); + + + length = Normalize(out_normal); if (length <= FLT_EPSILON) { // lines are collinear @@ -1102,10 +1099,9 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat unsigned int i = 0, j = 0, k = 0; int numsolutions = 0; double x1[3], v1[3], x2[3], v2[3], x3[3], v3[3]; - double solution[3]; + double solution[3], solution2[3]; MVert *verts2 = collmd->current_x; // old x MVert *velocity2 = collmd->current_v; // velocity - float mintime = FLT_MAX; float distance; float triA[3][3], triB[3][3]; int result = 0; @@ -1189,17 +1185,15 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat edgecollpair.p21 = collpair->bp1; edgecollpair.p22 = collpair->bp3; } - - if((edgecollpair.p11 == 3) && (edgecollpair.p12 == 6)) + /* + if((edgecollpair.p11 == 3) && (edgecollpair.p12 == 16)) printf("Ahier!\n"); - if((edgecollpair.p11 == 6) && (edgecollpair.p12 == 3)) + if((edgecollpair.p11 == 16) && (edgecollpair.p12 == 3)) printf("Ahier!\n"); + */ - if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) ) + // if ( !cloth_are_edges_adjacent ( clmd, collmd, &edgecollpair ) ) { - // printf("Collision between:\n"); - // printf("p11: %d, p12: %d, p21: %d, p22: %d\n", edgecollpair.p11, edgecollpair.p12, edgecollpair.p21, edgecollpair.p22); - // always put coll points in p21/p22 VECSUB ( x1, verts1[edgecollpair.p12].txold, verts1[edgecollpair.p11].txold ); VECSUB ( v1, verts1[edgecollpair.p12].tv, verts1[edgecollpair.p11].tv ); @@ -1212,6 +1206,16 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat numsolutions = cloth_get_collision_time ( x1, v1, x2, v2, x3, v3, solution ); + if((edgecollpair.p11 == 3 && edgecollpair.p12==16)|| (edgecollpair.p11==16 && edgecollpair.p12==3)) + { + if(edgecollpair.p21==6 || edgecollpair.p22 == 6) + { + printf("dist: %f, sol[k]: %lf, sol2[k]: %lf\n", distance, solution[k], solution2[k]); + printf("a1: %f, a2: %f, b1: %f, b2: %f\n", x1[0], x2[0], x3[0], v1[0]); + printf("b21: %d, b22: %d\n", edgecollpair.p21, edgecollpair.p22); + } + } + for ( k = 0; k < numsolutions; k++ ) { // printf("sol %d: %lf\n", k, solution[k]); @@ -1225,11 +1229,11 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat float m1, m2; // move verts - VECADDS(triA[0], verts1[edgecollpair.p11].txold, verts1[edgecollpair.p11].tv, mintime); - VECADDS(triA[1], verts1[edgecollpair.p12].txold, verts1[edgecollpair.p12].tv, mintime); + VECADDS(triA[0], verts1[edgecollpair.p11].txold, verts1[edgecollpair.p11].tv, solution[k]); + VECADDS(triA[1], verts1[edgecollpair.p12].txold, verts1[edgecollpair.p12].tv, solution[k]); - VECADDS(triB[0], collmd->current_x[edgecollpair.p21].co, collmd->current_v[edgecollpair.p21].co, mintime); - VECADDS(triB[1], collmd->current_x[edgecollpair.p22].co, collmd->current_v[edgecollpair.p22].co, mintime); + VECADDS(triB[0], collmd->current_x[edgecollpair.p21].co, collmd->current_v[edgecollpair.p21].co, solution[k]); + VECADDS(triB[1], collmd->current_x[edgecollpair.p22].co, collmd->current_v[edgecollpair.p22].co, solution[k]); // TODO: check for collisions distance = edgedge_distance(triA[0], triA[1], triB[0], triB[1], &a, &b, out_normal); @@ -1255,13 +1259,14 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat VECSUB(vrel_1_to_2, vrel_1_to_2, temp); out_normalVelocity = INPR(vrel_1_to_2, out_normal); - +/* + // this correction results in wrong normals sometimes? if(out_normalVelocity < 0.0) { out_normalVelocity*= -1.0; VecMulf(out_normal, -1.0); } - +*/ /* Inelastic repulsion impulse. */ // Calculate which normal velocity we need. @@ -1287,7 +1292,7 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat { // missing from collision.hpp } - mintime = MIN2(mintime, (float)solution[k]); + // mintime = MIN2(mintime, (float)solution[k]); break; } @@ -1429,7 +1434,7 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData } } } - +/* result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); // apply impulses in parallel @@ -1448,7 +1453,7 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData } } } - +*/ } } From 8e46d777f33ffb86b1ed4e43437f2f974be98a0d Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Thu, 29 May 2008 19:10:09 +0000 Subject: [PATCH 153/430] Transform Orientations Edit Bone and Pose Bone can now be used as transform orientations Also fix a bug with CTO comming from non-uniformally scaled meshes. --- source/blender/include/transform.h | 1 + source/blender/src/transform_manipulator.c | 49 ++------- source/blender/src/transform_orientations.c | 105 +++++++++++++++++++- 3 files changed, 111 insertions(+), 44 deletions(-) diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 982a2f25df7..82adb1ac12a 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -515,6 +515,7 @@ int handleNDofInput(NDofInput *n, unsigned short event, short val); int manageObjectSpace(int confirm, int set); int manageMeshSpace(int confirm, int set); +int manageBoneSpace(int confirm, int set); /* Those two fill in mat and return non-zero on success */ int createSpaceNormal(float mat[3][3], float normal[3]); diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c index 5c06aaea890..050360887b4 100644 --- a/source/blender/src/transform_manipulator.c +++ b/source/blender/src/transform_manipulator.c @@ -158,7 +158,7 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags) } /* for pose mode */ -static void stats_pose(View3D *v3d, bPoseChannel *pchan, float *normal, float *plane) +static void stats_pose(View3D *v3d, bPoseChannel *pchan) { Bone *bone= pchan->bone; @@ -166,9 +166,6 @@ static void stats_pose(View3D *v3d, bPoseChannel *pchan, float *normal, float *p if (bone->flag & BONE_TRANSFORM) { calc_tw_center(pchan->pose_head); protectflag_to_drawflags(pchan->protectflag, &v3d->twdrawflag); - - VecAddf(normal, normal, pchan->pose_mat[2]); - VecAddf(plane, plane, pchan->pose_mat[1]); } } } @@ -349,26 +346,24 @@ int calc_manipulator_stats(ScrArea *sa) } } else if(ob && (ob->flag & OB_POSEMODE)) { - bArmature *arm= ob->data; + bArmature *arm = ob->data; bPoseChannel *pchan; int mode; if((ob->lay & G.vd->lay)==0) return 0; - mode= Trans.mode; - Trans.mode= TFM_ROTATION; // mislead counting bones... bah + mode = Trans.mode; + Trans.mode = TFM_ROTATION; // mislead counting bones... bah /* count total, we use same method as transform will do */ Trans.total= 0; count_bone_select(&Trans, arm, &arm->bonebase, 1); - totsel= Trans.total; + totsel = Trans.total; if(totsel) { /* use channels to get stats */ for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - stats_pose(v3d, pchan, normal, plane); + stats_pose(v3d, pchan); } - //VecMulf(normal, -1.0); - VecMulf(plane, -1.0); VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid! Mat4MulVecfl(ob->obmat, G.scene->twcent); @@ -376,7 +371,7 @@ int calc_manipulator_stats(ScrArea *sa) Mat4MulVecfl(ob->obmat, G.scene->twmax); } /* restore, mode can be TFM_INIT */ - Trans.mode= mode; + Trans.mode = mode; } else if(G.f & (G_VERTEXPAINT + G_TEXTUREPAINT + G_WEIGHTPAINT + G_SCULPTMODE)) { ; @@ -433,7 +428,7 @@ int calc_manipulator_stats(ScrArea *sa) break; case V3D_MANIP_NORMAL: - if(G.obedit) { + if(G.obedit || ob->flag & OB_POSEMODE) { float mat[3][3]; int type; @@ -479,34 +474,6 @@ int calc_manipulator_stats(ScrArea *sa) } break; } - /* pose mode is a bit weird, so keep it separated */ - else if (ob->flag & OB_POSEMODE) - { - strcpy(t->spacename, "normal"); - if(normal[0]!=0.0 || normal[1]!=0.0 || normal[2]!=0.0) { - float imat[3][3], mat[3][3]; - - /* we need the transpose of the inverse for a normal... */ - Mat3CpyMat4(imat, ob->obmat); - - Mat3Inv(mat, imat); - Mat3Transp(mat); - Mat3MulVecfl(mat, normal); - Mat3MulVecfl(mat, plane); - - Normalize(normal); - if(0.0==Normalize(plane)) VECCOPY(plane, mat[1]); - - VECCOPY(mat[2], normal); - Crossf(mat[0], normal, plane); - Crossf(mat[1], mat[2], mat[0]); - - Mat4CpyMat3(v3d->twmat, mat); - Mat4Ortho(v3d->twmat); - - break; - } - } /* no break we define 'normal' as 'local' in Object mode */ case V3D_MANIP_LOCAL: strcpy(t->spacename, "local"); diff --git a/source/blender/src/transform_orientations.c b/source/blender/src/transform_orientations.c index 6696fcf95d6..9c7a2f67b89 100644 --- a/source/blender/src/transform_orientations.c +++ b/source/blender/src/transform_orientations.c @@ -27,6 +27,7 @@ #include "MEM_guardedalloc.h" #include "DNA_armature_types.h" +#include "DNA_action_types.h" #include "DNA_curve_types.h" #include "DNA_listBase.h" #include "DNA_object_types.h" @@ -68,11 +69,17 @@ void BIF_clearTransformOrientation(void) } void BIF_manageTransformOrientation(int confirm, int set) { + Object *ob = OBACT; int index = -1; if (G.obedit) { if (G.obedit->type == OB_MESH) index = manageMeshSpace(confirm, set); + else if (G.obedit->type == OB_ARMATURE) + index = manageBoneSpace(confirm, set); + } + else if (ob && (ob->flag & OB_POSEMODE)) { + index = manageBoneSpace(confirm, set); } else { index = manageObjectSpace(confirm, set); @@ -122,6 +129,31 @@ int confirmSpace(int set, char text[]) } } +int manageBoneSpace(int confirm, int set) { + float mat[3][3]; + float normal[3], plane[3]; + char name[36] = ""; + int index; + + getTransformOrientation(normal, plane, 0); + + if (confirm == 0 && confirmSpace(set, "Bone") == 0) { + return -1; + } + + if (createSpaceNormalTangent(mat, normal, plane) == 0) { + error("Cannot use zero-length bone"); + return -1; + } + + strcpy(name, "Bone"); + + /* Input name */ + sbutton(name, 1, 35, "name: "); + + index = addMatrixSpace(mat, name); + return index; +} int manageMeshSpace(int confirm, int set) { float mat[3][3]; @@ -363,6 +395,29 @@ void applyTransformOrientation() { } } +static int count_bone_select(bArmature *arm, ListBase *lb, int do_it) +{ + Bone *bone; + int do_next; + int total = 0; + + for(bone= lb->first; bone; bone= bone->next) { + bone->flag &= ~BONE_TRANSFORM; + do_next = do_it; + if(do_it) { + if(bone->layer & arm->layer) { + if (bone->flag & BONE_SELECTED) { + bone->flag |= BONE_TRANSFORM; + total++; + do_next= 0; // no transform on children if one parent bone is selected + } + } + } + total += count_bone_select(arm, &bone->childbase, do_next); + } + + return total; +} int getTransformOrientation(float normal[3], float plane[3], int activeOnly) { @@ -375,6 +430,14 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly) if(G.obedit) { + float imat[3][3], mat[3][3]; + + /* we need the transpose of the inverse for a normal... */ + Mat3CpyMat4(imat, ob->obmat); + + Mat3Inv(mat, imat); + Mat3Transp(mat); + ob= G.obedit; if(G.obedit->type==OB_MESH) @@ -639,12 +702,48 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly) } } - - Mat4Mul3Vecfl(G.obedit->obmat, plane); - Mat4Mul3Vecfl(G.obedit->obmat, normal); + + /* Vectors from edges don't need the special transpose inverse multiplication */ + if (result == ORIENTATION_EDGE) + { + Mat4Mul3Vecfl(ob->obmat, normal); + Mat4Mul3Vecfl(ob->obmat, plane); + } + else + { + Mat3MulVecfl(mat, normal); + Mat3MulVecfl(mat, plane); + } } else if(ob && (ob->flag & OB_POSEMODE)) { + bArmature *arm= ob->data; + bPoseChannel *pchan; + int totsel; + + totsel = count_bone_select(arm, &arm->bonebase, 1); + if(totsel) { + float imat[3][3], mat[3][3]; + + /* use channels to get stats */ + for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) { + VecAddf(normal, normal, pchan->pose_mat[2]); + VecAddf(plane, plane, pchan->pose_mat[1]); + } + } + VecMulf(plane, -1.0); + + /* we need the transpose of the inverse for a normal... */ + Mat3CpyMat4(imat, ob->obmat); + + Mat3Inv(mat, imat); + Mat3Transp(mat); + Mat3MulVecfl(mat, normal); + Mat3MulVecfl(mat, plane); + + result = ORIENTATION_EDGE; + } } else if(G.f & (G_VERTEXPAINT + G_TEXTUREPAINT + G_WEIGHTPAINT + G_SCULPTMODE)) { From 6af06ecdd2b748507e3dad41055fdf41253b7493 Mon Sep 17 00:00:00 2001 From: Simon Clitherow Date: Thu, 29 May 2008 21:12:11 +0000 Subject: [PATCH 154/430] Reverted win installer to give 'current user' option only for Application Data. Added shfolder.lib linking for win9x SHGetFolderPath() support. --- config/win32-vc-config.py | 2 +- release/windows/installer/00.sconsblender.nsi | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 32b6597b5d5..02e5dbb7f8f 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -157,7 +157,7 @@ REL_CCFLAGS = ['-O2', '-DNDEBUG'] C_WARN = [] CC_WARN = [] -LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid' +LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid' PLATFORM_LINKFLAGS = ''' /SUBSYSTEM:CONSOLE diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi index c4e504a5bff..338075c1b18 100644 --- a/release/windows/installer/00.sconsblender.nsi +++ b/release/windows/installer/00.sconsblender.nsi @@ -32,7 +32,7 @@ Name "Blender VERSION" !insertmacro MUI_PAGE_DIRECTORY Page custom DataLocation DataLocationOnLeave -Page custom AppDataChoice AppDataChoiceOnLeave +;Page custom AppDataChoice AppDataChoiceOnLeave Page custom PreMigrateUserSettings MigrateUserSettings !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH @@ -271,7 +271,9 @@ Function DataLocationOnLeave StrCpy $SETUSERCONTEXT "false" ${NSD_GetState} $HWND_APPDATA $R0 ${If} $R0 == "1" - StrCpy $SETUSERCONTEXT "true" + ; FIXME: disabled 'all users' until fully multi-user compatible + ;StrCpy $SETUSERCONTEXT "true" + Call SetWinXPPathCurrentUser ${Else} ${NSD_GetState} $HWND_INSTDIR $R0 ${If} $R0 == "1" From da2d4904af51507fc211a0101f8e33306135e76a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 May 2008 01:59:15 +0000 Subject: [PATCH 155/430] bugfix * scene.object.context and scene.object.selected had broken get_item funcs so scene.object.context[i] returned the wrong object. * aligning the view to an object (numpad*key), did not disable the ortho view grid. * long standing problem where opening a relative image would fail with no message. BLI_convertstringcode was returning a path with /../../'s that need to be cleaned before the path could be read, the path was also invalid from unix shell so its not a blender path reading problem. --- source/blender/blenlib/intern/util.c | 1 + source/blender/python/api2_2x/Scene.c | 27 ++++++++++++++++++++------- source/blender/src/view.c | 2 ++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index c85849b5ed4..3610813f2da 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1166,6 +1166,7 @@ int BLI_convertstringcode(char *path, const char *basepath) MEM_freeN(filepart); } + BLI_cleanup_file(NULL, tmp); strcpy(path, tmp); #ifdef WIN32 diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 7ef351b1127..eba951b8813 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -1355,16 +1355,29 @@ static PyObject *SceneObSeq_item( BPy_SceneObSeq * self, int i ) for (base= scene->base.first; base && i!=index; base= base->next, index++) {} /* selected */ else if (self->mode==EXPP_OBSEQ_SELECTED) { - for (base= scene->base.first; base && i!=index; base= base->next) - if (base->flag & SELECT) - index++; + for (base= scene->base.first; base; base= base->next) { + if (base->flag & SELECT) { + if (i==index) { + break; + } else { + index++; + } + } + } } /* context */ else if (self->mode==EXPP_OBSEQ_CONTEXT) { - if (G.vd) - for (base= scene->base.first; base && i!=index; base= base->next) - if TESTBASE(base) - index++; + if (G.vd) { + for (base= scene->base.first; base; base= base->next) { + if (TESTBASE(base)) { + if (i==index) { + break; + } else { + index++; + } + } + } + } } if (!(base)) diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 2904ca60a12..1e45f2bf3e0 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -1448,6 +1448,8 @@ void obmat_to_viewmat(Object *ob, short smooth) float bmat[4][4]; float tmat[3][3]; + G.vd->view= 0; /* dont show the grid */ + Mat4CpyMat4(bmat, ob->obmat); Mat4Ortho(bmat); Mat4Invert(G.vd->viewmat, bmat); From 2eb897e6db6099ef8a62969511eb72f0f75ff624 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Fri, 30 May 2008 09:05:09 +0000 Subject: [PATCH 156/430] Fix crash with hidden bezier handles See Cambo, that's why we have module owners. --- source/blender/src/transform_conversions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 4be525f4945..dcebf6b7557 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1365,7 +1365,7 @@ static void createTransCurveVerts(TransInfo *t) tail++; } if( propmode || - ((bezt->f1 & SELECT) && (G.f & G_HIDDENHANDLES)) || + ((bezt->f2 & SELECT) && (G.f & G_HIDDENHANDLES)) || ((bezt->f3 & SELECT) && (G.f & G_HIDDENHANDLES)==0) ) { VECCOPY(td->iloc, bezt->vec[2]); From 0caf1573d5b0893630788bd41809d56cc7dd187c Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Fri, 30 May 2008 19:46:48 +0000 Subject: [PATCH 157/430] This is patch [#9053] More concrete makesdna reporting Submitted by gsr It just makes the printf's all different so you can tell where the problem is. Kent --- source/blender/makesdna/intern/makesdna.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 9b837f9f988..83f4e633fa1 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -688,18 +688,18 @@ static int calculate_structlens(int firststruct) /* 4-8 aligned/ */ if(sizeof(void *) == 4) { if (len % 4) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len4): %s %s\n", types[structtype], cp); dna_error = 1; } } else { if (len % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len8): %s %s\n", types[structtype], cp); dna_error = 1; } } if (alphalen % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype],cp); + printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype],cp); dna_error = 1; } @@ -748,13 +748,13 @@ static int calculate_structlens(int firststruct) // has_pointer is set or alphalen != len if (has_pointer || alphalen != len) { if (alphalen % 8) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); + printf("Sizeerror 8 in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); dna_error = 1; } } if(len % 4) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], len%4); + printf("Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], len%4); dna_error = 1; } From 791510f690ccf441d0de041129402b4b796c90c8 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Fri, 30 May 2008 19:52:42 +0000 Subject: [PATCH 158/430] This is patch [#9057] Updated doc string to match current defines also submitted by gsr It just updates a comment to correct values. Kent --- source/blender/render/extern/include/RE_raytrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/render/extern/include/RE_raytrace.h b/source/blender/render/extern/include/RE_raytrace.h index aec1c69b3dc..8f429f7dd90 100644 --- a/source/blender/render/extern/include/RE_raytrace.h +++ b/source/blender/render/extern/include/RE_raytrace.h @@ -70,7 +70,7 @@ typedef struct Isect { int ob_last; short isect; /* which half of quad */ - short mode; /* RE_RAYSHADOW, RE_RAYMIRROR, RE_RAYSHADOW_TRA */ + short mode; /* RE_RAY_SHADOW, RE_RAY_MIRROR, RE_RAY_SHADOW_TRA */ int lay; /* -1 default, set for layer lamps */ /* only used externally */ From 5c1acc5ced3ef9a312c9120a75d6021eb9464907 Mon Sep 17 00:00:00 2001 From: Willian Padovani Germano Date: Fri, 30 May 2008 20:04:52 +0000 Subject: [PATCH 159/430] == PyNodes == Bug #13277, reported by Juho (bebraw) Vepsalainen (thanks!) - a typo made pynodes w/o input socket definitions fail with an out of range error when accessing the output sockets in the script. --- source/blender/python/api2_2x/Node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Node.c b/source/blender/python/api2_2x/Node.c index 92529023b7e..792b2331508 100644 --- a/source/blender/python/api2_2x/Node.c +++ b/source/blender/python/api2_2x/Node.c @@ -848,7 +848,7 @@ static int Sockoutmap_assign_subscript(BPy_SockMap *self, PyObject *pyidx, PyObj if (PyInt_Check(pyidx)) { idx = (int)PyInt_AsLong(pyidx); - if (idx < 0 || idx >= Sockinmap_len(self)) + if (idx < 0 || idx >= Sockoutmap_len(self)) return EXPP_ReturnIntError(PyExc_IndexError, "index out of range"); } else if (PyString_Check(pyidx)) { From 57270125d8ff4f525514c9202bba6089a4ec11a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 May 2008 12:12:03 +0000 Subject: [PATCH 160/430] bugfix for own error, introduced when running scripts were saved with the blend file. a script error with a script that has an interface would not stop the interface from running again immediately, causing an annoying error message loop. --- source/blender/python/api2_2x/Draw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index 3d4546613be..047a035fb8b 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -613,6 +613,8 @@ static void exit_pydraw( SpaceScript * sc, short err ) PyErr_Print( ); script->flags = 0; /* mark script struct for deletion */ SCRIPT_SET_NULL(script); + script->scriptname[0] = '\0'; + script->scriptarg[0] = '\0'; error_pyscript(); scrarea_queue_redraw( sc->area ); } From 32de0da6df27a0eebd76524d883f8fe80e3b4e56 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 May 2008 16:22:07 +0000 Subject: [PATCH 161/430] bugfix * [#13394] Sequencer: if internal strips have handles selected, dragging the metastrip changes the meta length * Extend did not work correctly on metastrips when the nested seq's are out of the meta's frame range, added an argument to seq_tx_get_final_left/right that returns the frame clipped by metastrip(s) if any. --- source/blender/include/BIF_editseq.h | 4 +- source/blender/src/drawseq.c | 2 +- source/blender/src/editseq.c | 93 ++++++++++++++++++---------- 3 files changed, 64 insertions(+), 35 deletions(-) diff --git a/source/blender/include/BIF_editseq.h b/source/blender/include/BIF_editseq.h index 0d1e792eb1c..b353e7bb45c 100644 --- a/source/blender/include/BIF_editseq.h +++ b/source/blender/include/BIF_editseq.h @@ -92,8 +92,8 @@ start and end are from the start and fixed length of the sequence. int seq_tx_get_start(struct Sequence *seq); int seq_tx_get_end(struct Sequence *seq); -int seq_tx_get_final_left(struct Sequence *seq); -int seq_tx_get_final_right(struct Sequence *seq); +int seq_tx_get_final_left(struct Sequence *seq, int metaclip); +int seq_tx_get_final_right(struct Sequence *seq, int metaclip); void seq_tx_set_final_left(struct Sequence *seq, int i); void seq_tx_set_final_right(struct Sequence *seq, int i); diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index e979f6e16fc..e554b91dd52 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -691,7 +691,7 @@ static void draw_seq_strip(Sequence *seq, ScrArea *sa, SpaceSeq *sseq, int outli /* draw the main strip body */ if (is_single_image) /* single image */ - draw_shadedstrip(seq, col, seq_tx_get_final_left(seq), y1, seq_tx_get_final_right(seq), y2); + draw_shadedstrip(seq, col, seq_tx_get_final_left(seq, 0), y1, seq_tx_get_final_right(seq, 0), y2); else /* normal operation */ draw_shadedstrip(seq, col, x1, y1, x2, y2); diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index bb706f1aa3f..fb0fac4489d 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -184,13 +184,24 @@ int seq_tx_get_end(Sequence *seq) return seq->start+seq->len; } -int seq_tx_get_final_left(Sequence *seq) +int seq_tx_get_final_left(Sequence *seq, int metaclip) { - return (seq->start - seq->startstill) + seq->startofs; + if (metaclip && seq->tmp) { + /* return the range clipped by the parents range */ + return MAX2( seq_tx_get_final_left(seq, 0), seq_tx_get_final_left((Sequence *)seq->tmp, 1) ); + } else { + return (seq->start - seq->startstill) + seq->startofs; + } + } -int seq_tx_get_final_right(Sequence *seq) +int seq_tx_get_final_right(Sequence *seq, int metaclip) { - return ((seq->start+seq->len) + seq->endstill) - seq->endofs; + if (metaclip && seq->tmp) { + /* return the range clipped by the parents range */ + return MIN2( seq_tx_get_final_right(seq, 0), seq_tx_get_final_right((Sequence *)seq->tmp, 1) ); + } else { + return ((seq->start+seq->len) + seq->endstill) - seq->endofs; + } } void seq_tx_set_final_left(Sequence *seq, int val) @@ -260,12 +271,12 @@ static void fix_single_image_seq(Sequence *seq) /* make sure the image is always at the start since there is only one, adjusting its start should be ok */ - left = seq_tx_get_final_left(seq); + left = seq_tx_get_final_left(seq, 0); start = seq->start; if (start != left) { offset = left - start; - seq_tx_set_final_left( seq, seq_tx_get_final_left(seq) - offset ); - seq_tx_set_final_right( seq, seq_tx_get_final_right(seq) - offset ); + seq_tx_set_final_left( seq, seq_tx_get_final_left(seq, 0) - offset ); + seq_tx_set_final_right( seq, seq_tx_get_final_right(seq, 0) - offset ); seq->start += offset; } } @@ -2927,34 +2938,34 @@ static int seq_get_snaplimit(void) static void transform_grab_xlimits(Sequence *seq, int leftflag, int rightflag) { if(leftflag) { - if (seq_tx_get_final_left(seq) >= seq_tx_get_final_right(seq)) { - seq_tx_set_final_left(seq, seq_tx_get_final_right(seq)-1); + if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_final_right(seq, 0)) { + seq_tx_set_final_left(seq, seq_tx_get_final_right(seq, 0)-1); } if (check_single_seq(seq)==0) { - if (seq_tx_get_final_left(seq) >= seq_tx_get_end(seq)) { + if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_end(seq)) { seq_tx_set_final_left(seq, seq_tx_get_end(seq)-1); } /* dosnt work now - TODO */ /* - if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq)) { + if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq, 0)) { int ofs; - ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq); + ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq, 0); seq->start -= ofs; - seq_tx_set_final_left(seq, seq_tx_get_final_left(seq) + ofs ); + seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) + ofs ); }*/ } } if(rightflag) { - if (seq_tx_get_final_right(seq) <= seq_tx_get_final_left(seq)) { - seq_tx_set_final_right(seq, seq_tx_get_final_left(seq)+1); + if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_final_left(seq, 0)) { + seq_tx_set_final_right(seq, seq_tx_get_final_left(seq, 0)+1); } if (check_single_seq(seq)==0) { - if (seq_tx_get_final_right(seq) <= seq_tx_get_start(seq)) { + if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_start(seq)) { seq_tx_set_final_right(seq, seq_tx_get_start(seq)+1); } } @@ -3033,9 +3044,24 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if((seq->flag & SELECT) && !(seq->depth==0 && seq->flag & SEQ_LOCK)) totstrip++; + /* only needed for extend but can set here anyway since were alredy looping */ + seq->tmp= NULL; } } + /* for extending we need the metastrip clipped left/right values, set the metastrips as parents in seq->tmp */ + if (mode=='e') { + Sequence *meta_seq; + for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { + if (seq->type == SEQ_META) { + for (meta_seq = seq->seqbase.first; meta_seq; meta_seq= meta_seq->next){ + meta_seq->tmp= (void *)seq; + } + } + } + } + + if (sseq->flag & SEQ_MARKER_TRANS) { for(marker= G.scene->markers.first; marker; marker= marker->next) { if(marker->flag & SELECT) totmark++; @@ -3064,8 +3090,8 @@ void transform_seq(int mode, int context) /* for extend only */ if (mode=='e') { - ts->final_left = seq_tx_get_final_left(seq); - ts->final_right = seq_tx_get_final_right(seq); + ts->final_left = seq_tx_get_final_left(seq, 1); + ts->final_right = seq_tx_get_final_right(seq, 1); } ts++; } @@ -3151,9 +3177,9 @@ void transform_seq(int mode, int context) snap_point_num=0; if (last_seq && (last_seq->flag & SELECT)) { /* active seq bounds */ if(seq_tx_check_left(last_seq)) - snap_points[snap_point_num++] = seq_tx_get_final_left(last_seq); + snap_points[snap_point_num++] = seq_tx_get_final_left(last_seq, 0); if(seq_tx_check_right(last_seq)) - snap_points[snap_point_num++] = seq_tx_get_final_right(last_seq); + snap_points[snap_point_num++] = seq_tx_get_final_right(last_seq, 0); } if (totstrip > 1) { /* selection bounds */ @@ -3163,9 +3189,9 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if(seq->flag & SELECT) { if(seq_tx_check_left(seq)) - bounds_left = MIN2(bounds_left, seq_tx_get_final_left(seq)); + bounds_left = MIN2(bounds_left, seq_tx_get_final_left(seq, 0)); if(seq_tx_check_right(seq)) - bounds_right = MAX2(bounds_right,seq_tx_get_final_right(seq)); + bounds_right = MAX2(bounds_right,seq_tx_get_final_right(seq, 0)); } } @@ -3214,13 +3240,13 @@ void transform_seq(int mode, int context) if (snap_dist && last_seq && seq_tx_check_left(last_seq)) { seq = find_next_prev_sequence(last_seq, 1, 0); /* left */ if(seq && !seq_tx_check_right(seq)) - TESTSNAP(seq_tx_get_final_right(seq)); + TESTSNAP(seq_tx_get_final_right(seq, 0)); } if (snap_dist && last_seq && seq_tx_check_right(last_seq)) { seq = find_next_prev_sequence(last_seq, 2, 0); /* right */ if(seq && !seq_tx_check_left(seq)) - TESTSNAP(seq_tx_get_final_left(seq)); + TESTSNAP(seq_tx_get_final_left(seq, 0)); } #undef TESTSNAP @@ -3242,20 +3268,23 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if(seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) { int myofs; + /* flag, ignores lefsel/rightsel for nested strips */ + int sel_flag = (seq->depth==0) ? seq->flag : seq->flag & ~(SEQ_LEFTSEL+SEQ_RIGHTSEL); + // SEQ_DEBUG_INFO(seq); /* X Transformation */ - if(seq->flag & SEQ_LEFTSEL) { + if((seq->depth==0) && (sel_flag & SEQ_LEFTSEL)) { myofs = (ts->startofs - ts->startstill); seq_tx_set_final_left(seq, ts->start + (myofs + ix)); } - if(seq->flag & SEQ_RIGHTSEL) { + if((seq->depth==0) && (sel_flag & SEQ_RIGHTSEL)) { myofs = (ts->endstill - ts->endofs); seq_tx_set_final_right(seq, ts->start + seq->len + (myofs + ix)); } - transform_grab_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); + transform_grab_xlimits(seq, sel_flag & SEQ_LEFTSEL, sel_flag & SEQ_RIGHTSEL); - if( (seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0 ) { + if( (sel_flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0 ) { if(sequence_is_free_transformable(seq)) seq->start= ts->start+ ix; /* Y Transformation */ @@ -3300,8 +3329,8 @@ void transform_seq(int mode, int context) //SEQ_DEBUG_INFO(seq); - final_left = seq_tx_get_final_left(seq); - final_right = seq_tx_get_final_right(seq); + final_left = seq_tx_get_final_left(seq, 1); + final_right = seq_tx_get_final_right(seq, 1); /* Only X Axis moving */ @@ -3591,8 +3620,8 @@ void seq_separate_images(void) BLI_remlink(ed->seqbasep, seq); if(seq->ipo) seq->ipo->id.us--; - start_ofs = cfra = seq_tx_get_final_left(seq); - frame_end = seq_tx_get_final_right(seq); + start_ofs = cfra = seq_tx_get_final_left(seq, 0); + frame_end = seq_tx_get_final_right(seq, 0); while (cfra < frame_end) { /* new seq */ From c6528b3cd4d3507c9ae5b9cfa70d832731d95aec Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 May 2008 19:01:14 +0000 Subject: [PATCH 162/430] bufgfix for [#13584] SIGSEV in fluid bake with large amount of small fluid objects the maximum number of objects (255) wasnt being checked, added a check before baking. also changed bakeing to use G.scene->base rather then G.main->objects since these can be in other scenes, from linked groups, or used only by python so they should not be used for baking. it also meant having a domain in 2 scenes would fail with an error. Nils, could be good to have a dynamic number of bakeable objects. --- source/blender/src/fluidsim.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c index a7361a9ffca..8b9c89656fb 100644 --- a/source/blender/src/fluidsim.c +++ b/source/blender/src/fluidsim.c @@ -481,6 +481,7 @@ void fluidsimBake(struct Object *ob) struct Object *fsDomain = NULL; FluidsimSettings *domainSettings; struct Object *obit = NULL; /* object iterator */ + Base *base; int origFrame = G.scene->r.cfra; char debugStrBuffer[256]; int dirExist = 0; @@ -522,7 +523,7 @@ void fluidsimBake(struct Object *ob) float *channelObjMove[256][3]; // object movments , 0=trans, 1=rot, 2=scale float *channelObjInivel[256]; // initial velocities float *channelObjActive[256]; // obj active channel - + if(getenv(strEnvName)) { int dlevel = atoi(getenv(strEnvName)); elbeemSetDebugLevel(dlevel); @@ -545,7 +546,6 @@ void fluidsimBake(struct Object *ob) /* no object pointer, find in selected ones.. */ if(!ob) { - Base *base; for(base=G.scene->base.first; base; base= base->next) { if ( ((base)->flag & SELECT) // ignore layer setting for now? && ((base)->lay & G.vd->lay) @@ -561,8 +561,26 @@ void fluidsimBake(struct Object *ob) if(!ob) return; } + channelObjCount = 0; + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; + //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG + if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && + (obit->type==OB_MESH) && + (obit->fluidsimSettings->type != OB_FLUIDSIM_DOMAIN) && // if has to match 3 places! // CHECKMATCH + (obit->fluidsimSettings->type != OB_FLUIDSIM_PARTICLE) ) { + channelObjCount++; + } + } + + if (channelObjCount>=255) { + pupmenu("Fluidsim Bake Error%t|Cannot bake with more then 256 objects"); + return; + } + /* check if there's another domain... */ - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; if((obit->fluidsimFlag & OB_FLUIDSIM_ENABLE)&&(obit->type==OB_MESH)) { if(obit->fluidsimSettings->type == OB_FLUIDSIM_DOMAIN) { if(obit != ob) { @@ -605,7 +623,8 @@ void fluidsimBake(struct Object *ob) // check if theres any fluid // abort baking if not... - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (obit->type==OB_MESH) && ( (obit->fluidsimSettings->type == OB_FLUIDSIM_FLUID) || @@ -749,7 +768,8 @@ void fluidsimBake(struct Object *ob) // init obj movement channels channelObjCount=0; - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (obit->type==OB_MESH) && @@ -952,7 +972,8 @@ void fluidsimBake(struct Object *ob) // init objects channelObjCount = 0; - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && // if has to match 3 places! // CHECKMATCH (obit->type==OB_MESH) && From 526d9cc5fc9bd423815bddd0191fbafb82209f1e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 May 2008 19:08:12 +0000 Subject: [PATCH 163/430] bugfix for own error glitch when typing in / would ask the user to make a new directory. the last shash was being removed, then the "" path didnt exist and asked to create it. --- source/blender/src/filesel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 9689ffdafeb..2ba5745b19b 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1591,7 +1591,7 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_del_slash(butname); if(sfile->type & FILE_UNIX) { - if (!BLI_exists(butname)) { + if (butname[0] != '\0' && !BLI_exists(butname)) { if (okee("Makedir")) { BLI_recurdir_fileops(butname); if (!BLI_exists(butname)) parent(sfile); From 74903b77f48c9c2ec9c226fc6ae34381d258e47e Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sat, 31 May 2008 21:23:57 +0000 Subject: [PATCH 164/430] Merging revisions 15020-15073 of https://svn.blender.org/svnroot/bf-blender/trunk/blender --- config/win32-vc-config.py | 2 +- release/windows/installer/00.sconsblender.nsi | 6 +- source/blender/blenkernel/intern/object.c | 9 +- source/blender/blenlib/intern/util.c | 1 + source/blender/include/BIF_editseq.h | 4 +- source/blender/include/transform.h | 1 + source/blender/makesdna/intern/makesdna.c | 10 +- source/blender/python/api2_2x/Draw.c | 2 + source/blender/python/api2_2x/Node.c | 2 +- source/blender/python/api2_2x/Scene.c | 27 +++-- source/blender/python/api2_2x/sceneRender.c | 10 +- .../render/extern/include/RE_raytrace.h | 2 +- .../blender/render/intern/source/pipeline.c | 1 + .../blender/render/intern/source/rayshade.c | 22 ++-- source/blender/src/drawobject.c | 83 +++++++++++--- source/blender/src/drawseq.c | 2 +- source/blender/src/drawview.c | 22 ++-- source/blender/src/editarmature.c | 46 ++++++-- source/blender/src/editseq.c | 93 ++++++++++------ source/blender/src/filesel.c | 2 +- source/blender/src/fluidsim.c | 33 +++++- source/blender/src/meshtools.c | 6 + source/blender/src/transform_conversions.c | 2 +- source/blender/src/transform_manipulator.c | 49 ++------ source/blender/src/transform_orientations.c | 105 +++++++++++++++++- source/blender/src/view.c | 2 + 26 files changed, 388 insertions(+), 156 deletions(-) diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 32b6597b5d5..02e5dbb7f8f 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -157,7 +157,7 @@ REL_CCFLAGS = ['-O2', '-DNDEBUG'] C_WARN = [] CC_WARN = [] -LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid' +LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid' PLATFORM_LINKFLAGS = ''' /SUBSYSTEM:CONSOLE diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi index c4e504a5bff..338075c1b18 100644 --- a/release/windows/installer/00.sconsblender.nsi +++ b/release/windows/installer/00.sconsblender.nsi @@ -32,7 +32,7 @@ Name "Blender VERSION" !insertmacro MUI_PAGE_DIRECTORY Page custom DataLocation DataLocationOnLeave -Page custom AppDataChoice AppDataChoiceOnLeave +;Page custom AppDataChoice AppDataChoiceOnLeave Page custom PreMigrateUserSettings MigrateUserSettings !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH @@ -271,7 +271,9 @@ Function DataLocationOnLeave StrCpy $SETUSERCONTEXT "false" ${NSD_GetState} $HWND_APPDATA $R0 ${If} $R0 == "1" - StrCpy $SETUSERCONTEXT "true" + ; FIXME: disabled 'all users' until fully multi-user compatible + ;StrCpy $SETUSERCONTEXT "true" + Call SetWinXPPathCurrentUser ${Else} ${NSD_GetState} $HWND_INSTDIR $R0 ${If} $R0 == "1" diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ab1bc5a2265..4f901ba7216 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1614,7 +1614,7 @@ static void give_parvert(Object *par, int nr, float *vec) for(eve= em->verts.first; eve; eve= eve->next) { if(eve->keyindex==nr) { - memcpy(vec, eve->co, 12); + memcpy(vec, eve->co, sizeof(float)*3); break; } } @@ -1652,18 +1652,20 @@ static void give_parvert(Object *par, int nr, float *vec) Curve *cu; BPoint *bp; BezTriple *bezt; + int found= 0; cu= par->data; nu= cu->nurb.first; if(par==G.obedit) nu= editNurb.first; count= 0; - while(nu) { + while(nu && !found) { if((nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { if(count==nr) { + found= 1; VECCOPY(vec, bezt->vec[1]); break; } @@ -1676,7 +1678,8 @@ static void give_parvert(Object *par, int nr, float *vec) a= nu->pntsu*nu->pntsv; while(a--) { if(count==nr) { - memcpy(vec, bp->vec, 12); + found= 1; + memcpy(vec, bp->vec, sizeof(float)*3); break; } count++; diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index c85849b5ed4..3610813f2da 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1166,6 +1166,7 @@ int BLI_convertstringcode(char *path, const char *basepath) MEM_freeN(filepart); } + BLI_cleanup_file(NULL, tmp); strcpy(path, tmp); #ifdef WIN32 diff --git a/source/blender/include/BIF_editseq.h b/source/blender/include/BIF_editseq.h index 0d1e792eb1c..b353e7bb45c 100644 --- a/source/blender/include/BIF_editseq.h +++ b/source/blender/include/BIF_editseq.h @@ -92,8 +92,8 @@ start and end are from the start and fixed length of the sequence. int seq_tx_get_start(struct Sequence *seq); int seq_tx_get_end(struct Sequence *seq); -int seq_tx_get_final_left(struct Sequence *seq); -int seq_tx_get_final_right(struct Sequence *seq); +int seq_tx_get_final_left(struct Sequence *seq, int metaclip); +int seq_tx_get_final_right(struct Sequence *seq, int metaclip); void seq_tx_set_final_left(struct Sequence *seq, int i); void seq_tx_set_final_right(struct Sequence *seq, int i); diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 982a2f25df7..82adb1ac12a 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -515,6 +515,7 @@ int handleNDofInput(NDofInput *n, unsigned short event, short val); int manageObjectSpace(int confirm, int set); int manageMeshSpace(int confirm, int set); +int manageBoneSpace(int confirm, int set); /* Those two fill in mat and return non-zero on success */ int createSpaceNormal(float mat[3][3], float normal[3]); diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 9b837f9f988..83f4e633fa1 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -688,18 +688,18 @@ static int calculate_structlens(int firststruct) /* 4-8 aligned/ */ if(sizeof(void *) == 4) { if (len % 4) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len4): %s %s\n", types[structtype], cp); dna_error = 1; } } else { if (len % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype], cp); + printf("Align pointer error in struct (len8): %s %s\n", types[structtype], cp); dna_error = 1; } } if (alphalen % 8) { - printf("Align pointer error in struct: %s %s\n", types[structtype],cp); + printf("Align pointer error in struct (alphalen8): %s %s\n", types[structtype],cp); dna_error = 1; } @@ -748,13 +748,13 @@ static int calculate_structlens(int firststruct) // has_pointer is set or alphalen != len if (has_pointer || alphalen != len) { if (alphalen % 8) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); + printf("Sizeerror 8 in struct: %s (add %d bytes)\n", types[structtype], alphalen%8); dna_error = 1; } } if(len % 4) { - printf("Sizeerror in struct: %s (add %d bytes)\n", types[structtype], len%4); + printf("Sizeerror 4 in struct: %s (add %d bytes)\n", types[structtype], len%4); dna_error = 1; } diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index 3d4546613be..047a035fb8b 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -613,6 +613,8 @@ static void exit_pydraw( SpaceScript * sc, short err ) PyErr_Print( ); script->flags = 0; /* mark script struct for deletion */ SCRIPT_SET_NULL(script); + script->scriptname[0] = '\0'; + script->scriptarg[0] = '\0'; error_pyscript(); scrarea_queue_redraw( sc->area ); } diff --git a/source/blender/python/api2_2x/Node.c b/source/blender/python/api2_2x/Node.c index 92529023b7e..792b2331508 100644 --- a/source/blender/python/api2_2x/Node.c +++ b/source/blender/python/api2_2x/Node.c @@ -848,7 +848,7 @@ static int Sockoutmap_assign_subscript(BPy_SockMap *self, PyObject *pyidx, PyObj if (PyInt_Check(pyidx)) { idx = (int)PyInt_AsLong(pyidx); - if (idx < 0 || idx >= Sockinmap_len(self)) + if (idx < 0 || idx >= Sockoutmap_len(self)) return EXPP_ReturnIntError(PyExc_IndexError, "index out of range"); } else if (PyString_Check(pyidx)) { diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 7ef351b1127..eba951b8813 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -1355,16 +1355,29 @@ static PyObject *SceneObSeq_item( BPy_SceneObSeq * self, int i ) for (base= scene->base.first; base && i!=index; base= base->next, index++) {} /* selected */ else if (self->mode==EXPP_OBSEQ_SELECTED) { - for (base= scene->base.first; base && i!=index; base= base->next) - if (base->flag & SELECT) - index++; + for (base= scene->base.first; base; base= base->next) { + if (base->flag & SELECT) { + if (i==index) { + break; + } else { + index++; + } + } + } } /* context */ else if (self->mode==EXPP_OBSEQ_CONTEXT) { - if (G.vd) - for (base= scene->base.first; base && i!=index; base= base->next) - if TESTBASE(base) - index++; + if (G.vd) { + for (base= scene->base.first; base; base= base->next) { + if (TESTBASE(base)) { + if (i==index) { + break; + } else { + index++; + } + } + } + } } if (!(base)) diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index f54c2cd4e3b..bfad069f943 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -478,9 +478,11 @@ PyObject *RenderData_Render( BPy_RenderData * self ) } else { /* background mode (blender -b file.blend -P script) */ - Render *re= RE_NewRender("Render"); + Render *re= RE_NewRender(G.scene->id.name); - int end_frame = G.scene->r.efra; /* is of type short currently */ + + + int end_frame = G.scene->r.efra; if (G.scene != self->scene) return EXPP_ReturnPyObjError (PyExc_RuntimeError, @@ -490,7 +492,7 @@ PyObject *RenderData_Render( BPy_RenderData * self ) RE_BlenderAnim(re, G.scene, G.scene->r.sfra, G.scene->r.efra); - G.scene->r.efra = (short)end_frame; + G.scene->r.efra = end_frame; } Py_RETURN_NONE; @@ -571,7 +573,7 @@ PyObject *RenderData_RenderAnim( BPy_RenderData * self ) set_scene( oldsce ); } else { /* background mode (blender -b file.blend -P script) */ - Render *re= RE_NewRender("Render"); + Render *re= RE_NewRender(G.scene->id.name); if (G.scene != self->scene) return EXPP_ReturnPyObjError (PyExc_RuntimeError, diff --git a/source/blender/render/extern/include/RE_raytrace.h b/source/blender/render/extern/include/RE_raytrace.h index aec1c69b3dc..8f429f7dd90 100644 --- a/source/blender/render/extern/include/RE_raytrace.h +++ b/source/blender/render/extern/include/RE_raytrace.h @@ -70,7 +70,7 @@ typedef struct Isect { int ob_last; short isect; /* which half of quad */ - short mode; /* RE_RAYSHADOW, RE_RAYMIRROR, RE_RAYSHADOW_TRA */ + short mode; /* RE_RAY_SHADOW, RE_RAY_MIRROR, RE_RAY_SHADOW_TRA */ int lay; /* -1 default, set for layer lamps */ /* only used externally */ diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index fb699f5b382..ebb52c49132 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -993,6 +993,7 @@ RenderStats *RE_GetStats(Render *re) return &re->i; } +/* Note, when rendering from a scene, ALWAYS use G.scene->id.name, else compositing wont work */ Render *RE_NewRender(const char *name) { Render *re; diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 8fd07001bd1..1155d2ea817 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -1473,14 +1473,15 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys) int tot; float *vec; - if(resol>16) resol= 16; - tot= 2*resol*resol; if (type & WO_AORNDSMP) { - static float sphere[2*3*256]; + float *sphere; int a; + // always returns table + sphere= threadsafe_table_sphere(0, thread, xs, ys, tot); + /* total random sampling. NOT THREADSAFE! (should be removed, is not useful) */ vec= sphere; for (a=0; avlr; isec.oborig= RAY_OBJECT_SET(&R, shi->obi); @@ -1690,14 +1692,16 @@ void ray_ao_spheresamp(ShadeInput *shi, float *shadfac) if(shi->mat->mode & MA_ONLYSHADOW) aocolor= WO_AOPLAIN; - vec= sphere_sampler(R.wrld.aomode, R.wrld.aosamp, shi->thread, shi->xs, shi->ys); + if(resol>32) resol= 32; + + vec= sphere_sampler(R.wrld.aomode, resol, shi->thread, shi->xs, shi->ys); // warning: since we use full sphere now, and dotproduct is below, we do twice as much - tot= 2*R.wrld.aosamp*R.wrld.aosamp; + tot= 2*resol*resol; if(aocolor == WO_AOSKYTEX) { - dxyview[0]= 1.0f/(float)R.wrld.aosamp; - dxyview[1]= 1.0f/(float)R.wrld.aosamp; + dxyview[0]= 1.0f/(float)resol; + dxyview[1]= 1.0f/(float)resol; dxyview[2]= 0.0f; } diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 0b042fc542f..0bb9e5f9e55 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2922,7 +2922,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) float *vdata=0, *vedata=0, *cdata=0, *ndata=0, *vd=0, *ved=0, *cd=0, *nd=0, xvec[3], yvec[3], zvec[3]; int a, k, k_max=0, totpart, totpoint=0, draw_as, path_nbr=0; int path_possible=0, keys_possible=0, draw_keys=0, totchild=0; - int select=ob->flag&SELECT; + int select=ob->flag&SELECT, create_cdata=0; GLint polygonmode[2]; char val[32]; @@ -2976,8 +2976,10 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) if(select) cpack(0xFFFFFF); - else if((ma) && (part->draw&PART_DRAW_MAT_COL)) + else if((ma) && (part->draw&PART_DRAW_MAT_COL)) { glColor3f(ma->r,ma->g,ma->b); + create_cdata = 1; + } else cpack(0); @@ -3085,19 +3087,25 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) if(draw_as!=PART_DRAW_CIRC){ switch(draw_as){ case PART_DRAW_AXIS: - cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_cdata"); - /* no break! */ case PART_DRAW_CROSS: + if(draw_as!=PART_DRAW_CROSS || create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*6*3*sizeof(float), "particle_vdata"); break; case PART_DRAW_LINE: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*2*3*sizeof(float), "particle_vdata"); break; case PART_DRAW_BB: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); ndata=MEM_callocN((totpart+totchild)*(path_nbr+1)*4*3*sizeof(float), "particle_vdata"); break; default: + if(create_cdata) + cdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_cdata"); vdata=MEM_callocN((totpart+totchild)*(path_nbr+1)*3*sizeof(float), "particle_vdata"); } } @@ -3122,9 +3130,17 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=(cfra-pa->time)/pa->lifetime; - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100*pa_time); - execute_ipo((ID *)part, part->ipo); + if((part->flag&PART_ABS_TIME)==0){ + if(ma && ma->ipo){ + /* correction for lifetime */ + calc_ipo(ma->ipo, 100.0f*pa_time); + execute_ipo((ID *)ma, ma->ipo); + } + if(part->ipo) { + /* correction for lifetime */ + calc_ipo(part->ipo, 100*pa_time); + execute_ipo((ID *)part, part->ipo); + } } pa_size=pa->size; @@ -3141,9 +3157,17 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) pa_time=psys_get_child_time(psys,cpa,cfra); - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100*pa_time); - execute_ipo((ID *)part, part->ipo); + if((part->flag&PART_ABS_TIME)==0) { + if(ma && ma->ipo){ + /* correction for lifetime */ + calc_ipo(ma->ipo, 100.0f*pa_time); + execute_ipo((ID *)ma, ma->ipo); + } + if(part->ipo) { + /* correction for lifetime */ + calc_ipo(part->ipo, 100*pa_time); + execute_ipo((ID *)part, part->ipo); + } } pa_size=psys_get_child_size(psys,cpa,cfra,0); @@ -3181,6 +3205,12 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) switch(draw_as){ case PART_DRAW_DOT: + if(cd) { + cd[0]=ma->r; + cd[1]=ma->g; + cd[2]=ma->b; + cd+=3; + } if(vd){ VECCOPY(vd,state.co) vd+=3; } @@ -3201,7 +3231,15 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) VECCOPY(vec2,state.co); } - else VECSUB(vec2,state.co,vec); + else { + if(cd) { + cd[0]=cd[3]=cd[6]=cd[9]=cd[12]=cd[15]=ma->r; + cd[1]=cd[4]=cd[7]=cd[10]=cd[13]=cd[16]=ma->g; + cd[2]=cd[5]=cd[8]=cd[11]=cd[14]=cd[17]=ma->b; + cd+=18; + } + VECSUB(vec2,state.co,vec); + } VECADD(vec,state.co,vec); VECCOPY(vd,vec); vd+=3; @@ -3239,11 +3277,25 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) VecMulf(vec,VecLength(state.vel)); VECADDFAC(vd,state.co,vec,-part->draw_line[0]); vd+=3; VECADDFAC(vd,state.co,vec,part->draw_line[1]); vd+=3; + if(cd) { + cd[0]=cd[3]=ma->r; + cd[1]=cd[4]=ma->g; + cd[2]=cd[5]=ma->b; + cd+=3; + } break; case PART_DRAW_CIRC: + if(create_cdata) + glColor3f(ma->r,ma->g,ma->b); drawcircball(GL_LINE_LOOP, state.co, pixsize, imat); break; case PART_DRAW_BB: + if(cd) { + cd[0]=cd[3]=cd[6]=cd[9]=ma->r; + cd[1]=cd[4]=cd[7]=cd[10]=ma->g; + cd[2]=cd[5]=cd[8]=cd[11]=ma->b; + cd+=12; + } if(part->draw&PART_DRAW_BB_LOCK && part->bb_align==PART_BB_VIEW){ VECCOPY(xvec,bb_ob->obmat[0]); Normalize(xvec); @@ -3439,13 +3491,14 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys, int dt) glDisable(GL_LIGHTING); } + if(cdata){ + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(3, GL_FLOAT, 0, cdata); + } + switch(draw_as){ case PART_DRAW_AXIS: case PART_DRAW_CROSS: - if(cdata){ - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(3, GL_FLOAT, 0, cdata); - } glDrawArrays(GL_LINES, 0, 6*totpoint); break; case PART_DRAW_LINE: diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c index e979f6e16fc..e554b91dd52 100644 --- a/source/blender/src/drawseq.c +++ b/source/blender/src/drawseq.c @@ -691,7 +691,7 @@ static void draw_seq_strip(Sequence *seq, ScrArea *sa, SpaceSeq *sseq, int outli /* draw the main strip body */ if (is_single_image) /* single image */ - draw_shadedstrip(seq, col, seq_tx_get_final_left(seq), y1, seq_tx_get_final_right(seq), y2); + draw_shadedstrip(seq, col, seq_tx_get_final_left(seq, 0), y1, seq_tx_get_final_right(seq, 0), y2); else /* normal operation */ draw_shadedstrip(seq, col, x1, y1, x2, y2); diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 52e0d3d6f05..e83ecb13960 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3732,18 +3732,22 @@ int play_anim(int mode) else viewmove(0); } } else if (event==WHEELDOWNMOUSE || (val && event==PADMINUS)) { /* copied from persptoetsen */ - /* this min and max is also in viewmove() */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom-= 10; - if(G.vd->camzoom<-30) G.vd->camzoom= -30; + if (G.vd) { /* when using the sequencer this can be NULL */ + /* this min and max is also in viewmove() */ + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom-= 10; + if(G.vd->camzoom<-30) G.vd->camzoom= -30; + } + else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } - else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } else if (event==WHEELUPMOUSE || (val && event==PADPLUSKEY)) { /* copied from persptoetsen */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom+= 10; - if(G.vd->camzoom>300) G.vd->camzoom= 300; + if (G.vd) { + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom+= 10; + if(G.vd->camzoom>300) G.vd->camzoom= 300; + } + else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } - else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } else if(event==MKEY) { if(val) add_marker(CFRA-1); } diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index c166a9df762..39f93510358 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2396,6 +2396,7 @@ void fill_bones_armature(void) else if (count == 2) { EditBonePoint *ebp, *ebp2; float head[3], tail[3]; + short headtail = 0; /* check that the points don't belong to the same bone */ ebp= (EditBonePoint *)points.first; @@ -2420,7 +2421,7 @@ void fill_bones_armature(void) float distA, distB; /* get cursor location */ - VECCOPY (curs, give_cursor()); + VECCOPY(curs, give_cursor()); Mat4Invert(G.obedit->imat, G.obedit->obmat); Mat4MulVecfl(G.obedit->imat, curs); @@ -2432,26 +2433,47 @@ void fill_bones_armature(void) distB= VecLength(vecB); /* compare distances - closer one therefore acts as direction for bone to go */ - if (distA < distB) { - VECCOPY(head, ebp2->vec); - VECCOPY(tail, ebp->vec); - } - else { - VECCOPY(head, ebp->vec); - VECCOPY(tail, ebp2->vec); - } + headtail= (distA < distB) ? 2 : 1; } else if (ebp->head_owner) { + headtail = 1; + } + else if (ebp2->head_owner) { + headtail = 2; + } + + /* assign head/tail combinations */ + if (headtail == 2) { VECCOPY(head, ebp->vec); VECCOPY(tail, ebp2->vec); } - else if (ebp2->head_owner) { + else if (headtail == 1) { VECCOPY(head, ebp2->vec); VECCOPY(tail, ebp->vec); } - /* add new bone */ - newbone= add_points_bone(head, tail); + /* add new bone and parent it to the appropriate end */ + if (headtail) { + newbone= add_points_bone(head, tail); + + /* do parenting (will need to set connected flag too) */ + if (headtail == 2) { + /* ebp tail or head - tail gets priority */ + if (ebp->tail_owner) + newbone->parent= ebp->tail_owner; + else + newbone->parent= ebp->head_owner; + } + else { + /* ebp2 tail or head - tail gets priority */ + if (ebp2->tail_owner) + newbone->parent= ebp2->tail_owner; + else + newbone->parent= ebp2->head_owner; + } + + newbone->flag |= BONE_CONNECTED; + } } else { // FIXME.. figure out a method for multiple bones diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index bb706f1aa3f..fb0fac4489d 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -184,13 +184,24 @@ int seq_tx_get_end(Sequence *seq) return seq->start+seq->len; } -int seq_tx_get_final_left(Sequence *seq) +int seq_tx_get_final_left(Sequence *seq, int metaclip) { - return (seq->start - seq->startstill) + seq->startofs; + if (metaclip && seq->tmp) { + /* return the range clipped by the parents range */ + return MAX2( seq_tx_get_final_left(seq, 0), seq_tx_get_final_left((Sequence *)seq->tmp, 1) ); + } else { + return (seq->start - seq->startstill) + seq->startofs; + } + } -int seq_tx_get_final_right(Sequence *seq) +int seq_tx_get_final_right(Sequence *seq, int metaclip) { - return ((seq->start+seq->len) + seq->endstill) - seq->endofs; + if (metaclip && seq->tmp) { + /* return the range clipped by the parents range */ + return MIN2( seq_tx_get_final_right(seq, 0), seq_tx_get_final_right((Sequence *)seq->tmp, 1) ); + } else { + return ((seq->start+seq->len) + seq->endstill) - seq->endofs; + } } void seq_tx_set_final_left(Sequence *seq, int val) @@ -260,12 +271,12 @@ static void fix_single_image_seq(Sequence *seq) /* make sure the image is always at the start since there is only one, adjusting its start should be ok */ - left = seq_tx_get_final_left(seq); + left = seq_tx_get_final_left(seq, 0); start = seq->start; if (start != left) { offset = left - start; - seq_tx_set_final_left( seq, seq_tx_get_final_left(seq) - offset ); - seq_tx_set_final_right( seq, seq_tx_get_final_right(seq) - offset ); + seq_tx_set_final_left( seq, seq_tx_get_final_left(seq, 0) - offset ); + seq_tx_set_final_right( seq, seq_tx_get_final_right(seq, 0) - offset ); seq->start += offset; } } @@ -2927,34 +2938,34 @@ static int seq_get_snaplimit(void) static void transform_grab_xlimits(Sequence *seq, int leftflag, int rightflag) { if(leftflag) { - if (seq_tx_get_final_left(seq) >= seq_tx_get_final_right(seq)) { - seq_tx_set_final_left(seq, seq_tx_get_final_right(seq)-1); + if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_final_right(seq, 0)) { + seq_tx_set_final_left(seq, seq_tx_get_final_right(seq, 0)-1); } if (check_single_seq(seq)==0) { - if (seq_tx_get_final_left(seq) >= seq_tx_get_end(seq)) { + if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_end(seq)) { seq_tx_set_final_left(seq, seq_tx_get_end(seq)-1); } /* dosnt work now - TODO */ /* - if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq)) { + if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq, 0)) { int ofs; - ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq); + ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq, 0); seq->start -= ofs; - seq_tx_set_final_left(seq, seq_tx_get_final_left(seq) + ofs ); + seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) + ofs ); }*/ } } if(rightflag) { - if (seq_tx_get_final_right(seq) <= seq_tx_get_final_left(seq)) { - seq_tx_set_final_right(seq, seq_tx_get_final_left(seq)+1); + if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_final_left(seq, 0)) { + seq_tx_set_final_right(seq, seq_tx_get_final_left(seq, 0)+1); } if (check_single_seq(seq)==0) { - if (seq_tx_get_final_right(seq) <= seq_tx_get_start(seq)) { + if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_start(seq)) { seq_tx_set_final_right(seq, seq_tx_get_start(seq)+1); } } @@ -3033,9 +3044,24 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if((seq->flag & SELECT) && !(seq->depth==0 && seq->flag & SEQ_LOCK)) totstrip++; + /* only needed for extend but can set here anyway since were alredy looping */ + seq->tmp= NULL; } } + /* for extending we need the metastrip clipped left/right values, set the metastrips as parents in seq->tmp */ + if (mode=='e') { + Sequence *meta_seq; + for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { + if (seq->type == SEQ_META) { + for (meta_seq = seq->seqbase.first; meta_seq; meta_seq= meta_seq->next){ + meta_seq->tmp= (void *)seq; + } + } + } + } + + if (sseq->flag & SEQ_MARKER_TRANS) { for(marker= G.scene->markers.first; marker; marker= marker->next) { if(marker->flag & SELECT) totmark++; @@ -3064,8 +3090,8 @@ void transform_seq(int mode, int context) /* for extend only */ if (mode=='e') { - ts->final_left = seq_tx_get_final_left(seq); - ts->final_right = seq_tx_get_final_right(seq); + ts->final_left = seq_tx_get_final_left(seq, 1); + ts->final_right = seq_tx_get_final_right(seq, 1); } ts++; } @@ -3151,9 +3177,9 @@ void transform_seq(int mode, int context) snap_point_num=0; if (last_seq && (last_seq->flag & SELECT)) { /* active seq bounds */ if(seq_tx_check_left(last_seq)) - snap_points[snap_point_num++] = seq_tx_get_final_left(last_seq); + snap_points[snap_point_num++] = seq_tx_get_final_left(last_seq, 0); if(seq_tx_check_right(last_seq)) - snap_points[snap_point_num++] = seq_tx_get_final_right(last_seq); + snap_points[snap_point_num++] = seq_tx_get_final_right(last_seq, 0); } if (totstrip > 1) { /* selection bounds */ @@ -3163,9 +3189,9 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if(seq->flag & SELECT) { if(seq_tx_check_left(seq)) - bounds_left = MIN2(bounds_left, seq_tx_get_final_left(seq)); + bounds_left = MIN2(bounds_left, seq_tx_get_final_left(seq, 0)); if(seq_tx_check_right(seq)) - bounds_right = MAX2(bounds_right,seq_tx_get_final_right(seq)); + bounds_right = MAX2(bounds_right,seq_tx_get_final_right(seq, 0)); } } @@ -3214,13 +3240,13 @@ void transform_seq(int mode, int context) if (snap_dist && last_seq && seq_tx_check_left(last_seq)) { seq = find_next_prev_sequence(last_seq, 1, 0); /* left */ if(seq && !seq_tx_check_right(seq)) - TESTSNAP(seq_tx_get_final_right(seq)); + TESTSNAP(seq_tx_get_final_right(seq, 0)); } if (snap_dist && last_seq && seq_tx_check_right(last_seq)) { seq = find_next_prev_sequence(last_seq, 2, 0); /* right */ if(seq && !seq_tx_check_left(seq)) - TESTSNAP(seq_tx_get_final_left(seq)); + TESTSNAP(seq_tx_get_final_left(seq, 0)); } #undef TESTSNAP @@ -3242,20 +3268,23 @@ void transform_seq(int mode, int context) for(seq_index=0, seq=seqar[0]; seq_index < totseq_index; seq=seqar[++seq_index]) { if(seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) { int myofs; + /* flag, ignores lefsel/rightsel for nested strips */ + int sel_flag = (seq->depth==0) ? seq->flag : seq->flag & ~(SEQ_LEFTSEL+SEQ_RIGHTSEL); + // SEQ_DEBUG_INFO(seq); /* X Transformation */ - if(seq->flag & SEQ_LEFTSEL) { + if((seq->depth==0) && (sel_flag & SEQ_LEFTSEL)) { myofs = (ts->startofs - ts->startstill); seq_tx_set_final_left(seq, ts->start + (myofs + ix)); } - if(seq->flag & SEQ_RIGHTSEL) { + if((seq->depth==0) && (sel_flag & SEQ_RIGHTSEL)) { myofs = (ts->endstill - ts->endofs); seq_tx_set_final_right(seq, ts->start + seq->len + (myofs + ix)); } - transform_grab_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); + transform_grab_xlimits(seq, sel_flag & SEQ_LEFTSEL, sel_flag & SEQ_RIGHTSEL); - if( (seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0 ) { + if( (sel_flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0 ) { if(sequence_is_free_transformable(seq)) seq->start= ts->start+ ix; /* Y Transformation */ @@ -3300,8 +3329,8 @@ void transform_seq(int mode, int context) //SEQ_DEBUG_INFO(seq); - final_left = seq_tx_get_final_left(seq); - final_right = seq_tx_get_final_right(seq); + final_left = seq_tx_get_final_left(seq, 1); + final_right = seq_tx_get_final_right(seq, 1); /* Only X Axis moving */ @@ -3591,8 +3620,8 @@ void seq_separate_images(void) BLI_remlink(ed->seqbasep, seq); if(seq->ipo) seq->ipo->id.us--; - start_ofs = cfra = seq_tx_get_final_left(seq); - frame_end = seq_tx_get_final_right(seq); + start_ofs = cfra = seq_tx_get_final_left(seq, 0); + frame_end = seq_tx_get_final_right(seq, 0); while (cfra < frame_end) { /* new seq */ diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 9689ffdafeb..2ba5745b19b 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1591,7 +1591,7 @@ static void do_filesel_buttons(short event, SpaceFile *sfile) BLI_del_slash(butname); if(sfile->type & FILE_UNIX) { - if (!BLI_exists(butname)) { + if (butname[0] != '\0' && !BLI_exists(butname)) { if (okee("Makedir")) { BLI_recurdir_fileops(butname); if (!BLI_exists(butname)) parent(sfile); diff --git a/source/blender/src/fluidsim.c b/source/blender/src/fluidsim.c index a7361a9ffca..8b9c89656fb 100644 --- a/source/blender/src/fluidsim.c +++ b/source/blender/src/fluidsim.c @@ -481,6 +481,7 @@ void fluidsimBake(struct Object *ob) struct Object *fsDomain = NULL; FluidsimSettings *domainSettings; struct Object *obit = NULL; /* object iterator */ + Base *base; int origFrame = G.scene->r.cfra; char debugStrBuffer[256]; int dirExist = 0; @@ -522,7 +523,7 @@ void fluidsimBake(struct Object *ob) float *channelObjMove[256][3]; // object movments , 0=trans, 1=rot, 2=scale float *channelObjInivel[256]; // initial velocities float *channelObjActive[256]; // obj active channel - + if(getenv(strEnvName)) { int dlevel = atoi(getenv(strEnvName)); elbeemSetDebugLevel(dlevel); @@ -545,7 +546,6 @@ void fluidsimBake(struct Object *ob) /* no object pointer, find in selected ones.. */ if(!ob) { - Base *base; for(base=G.scene->base.first; base; base= base->next) { if ( ((base)->flag & SELECT) // ignore layer setting for now? && ((base)->lay & G.vd->lay) @@ -561,8 +561,26 @@ void fluidsimBake(struct Object *ob) if(!ob) return; } + channelObjCount = 0; + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; + //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG + if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && + (obit->type==OB_MESH) && + (obit->fluidsimSettings->type != OB_FLUIDSIM_DOMAIN) && // if has to match 3 places! // CHECKMATCH + (obit->fluidsimSettings->type != OB_FLUIDSIM_PARTICLE) ) { + channelObjCount++; + } + } + + if (channelObjCount>=255) { + pupmenu("Fluidsim Bake Error%t|Cannot bake with more then 256 objects"); + return; + } + /* check if there's another domain... */ - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; if((obit->fluidsimFlag & OB_FLUIDSIM_ENABLE)&&(obit->type==OB_MESH)) { if(obit->fluidsimSettings->type == OB_FLUIDSIM_DOMAIN) { if(obit != ob) { @@ -605,7 +623,8 @@ void fluidsimBake(struct Object *ob) // check if theres any fluid // abort baking if not... - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (obit->type==OB_MESH) && ( (obit->fluidsimSettings->type == OB_FLUIDSIM_FLUID) || @@ -749,7 +768,8 @@ void fluidsimBake(struct Object *ob) // init obj movement channels channelObjCount=0; - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && (obit->type==OB_MESH) && @@ -952,7 +972,8 @@ void fluidsimBake(struct Object *ob) // init objects channelObjCount = 0; - for(obit= G.main->object.first; obit; obit= obit->id.next) { + for(base=G.scene->base.first; base; base= base->next) { + obit = base->object; //{ snprintf(debugStrBuffer,256,"DEBUG object name=%s, type=%d ...\n", obit->id.name, obit->type); elbeemDebugOut(debugStrBuffer); } // DEBUG if( (obit->fluidsimFlag & OB_FLUIDSIM_ENABLE) && // if has to match 3 places! // CHECKMATCH (obit->type==OB_MESH) && diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index e27e772edee..ac165d6aeb2 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -957,6 +957,12 @@ int *mesh_get_x_mirror_faces(Object *ob) mirrormf.v3= mirrorverts[mf->v1]; mirrormf.v4= (mf->v4)? mirrorverts[mf->v4]: 0; + /* make sure v4 is not 0 if a quad */ + if(mf->v4 && mirrormf.v4==0) { + SWAP(int, mirrormf.v1, mirrormf.v3); + SWAP(int, mirrormf.v2, mirrormf.v4); + } + hashmf= BLI_ghash_lookup(fhash, &mirrormf); if(hashmf) { mirrorfaces[a*2]= hashmf - mface; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 4be525f4945..dcebf6b7557 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1365,7 +1365,7 @@ static void createTransCurveVerts(TransInfo *t) tail++; } if( propmode || - ((bezt->f1 & SELECT) && (G.f & G_HIDDENHANDLES)) || + ((bezt->f2 & SELECT) && (G.f & G_HIDDENHANDLES)) || ((bezt->f3 & SELECT) && (G.f & G_HIDDENHANDLES)==0) ) { VECCOPY(td->iloc, bezt->vec[2]); diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c index 5c06aaea890..050360887b4 100644 --- a/source/blender/src/transform_manipulator.c +++ b/source/blender/src/transform_manipulator.c @@ -158,7 +158,7 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags) } /* for pose mode */ -static void stats_pose(View3D *v3d, bPoseChannel *pchan, float *normal, float *plane) +static void stats_pose(View3D *v3d, bPoseChannel *pchan) { Bone *bone= pchan->bone; @@ -166,9 +166,6 @@ static void stats_pose(View3D *v3d, bPoseChannel *pchan, float *normal, float *p if (bone->flag & BONE_TRANSFORM) { calc_tw_center(pchan->pose_head); protectflag_to_drawflags(pchan->protectflag, &v3d->twdrawflag); - - VecAddf(normal, normal, pchan->pose_mat[2]); - VecAddf(plane, plane, pchan->pose_mat[1]); } } } @@ -349,26 +346,24 @@ int calc_manipulator_stats(ScrArea *sa) } } else if(ob && (ob->flag & OB_POSEMODE)) { - bArmature *arm= ob->data; + bArmature *arm = ob->data; bPoseChannel *pchan; int mode; if((ob->lay & G.vd->lay)==0) return 0; - mode= Trans.mode; - Trans.mode= TFM_ROTATION; // mislead counting bones... bah + mode = Trans.mode; + Trans.mode = TFM_ROTATION; // mislead counting bones... bah /* count total, we use same method as transform will do */ Trans.total= 0; count_bone_select(&Trans, arm, &arm->bonebase, 1); - totsel= Trans.total; + totsel = Trans.total; if(totsel) { /* use channels to get stats */ for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - stats_pose(v3d, pchan, normal, plane); + stats_pose(v3d, pchan); } - //VecMulf(normal, -1.0); - VecMulf(plane, -1.0); VecMulf(G.scene->twcent, 1.0f/(float)totsel); // centroid! Mat4MulVecfl(ob->obmat, G.scene->twcent); @@ -376,7 +371,7 @@ int calc_manipulator_stats(ScrArea *sa) Mat4MulVecfl(ob->obmat, G.scene->twmax); } /* restore, mode can be TFM_INIT */ - Trans.mode= mode; + Trans.mode = mode; } else if(G.f & (G_VERTEXPAINT + G_TEXTUREPAINT + G_WEIGHTPAINT + G_SCULPTMODE)) { ; @@ -433,7 +428,7 @@ int calc_manipulator_stats(ScrArea *sa) break; case V3D_MANIP_NORMAL: - if(G.obedit) { + if(G.obedit || ob->flag & OB_POSEMODE) { float mat[3][3]; int type; @@ -479,34 +474,6 @@ int calc_manipulator_stats(ScrArea *sa) } break; } - /* pose mode is a bit weird, so keep it separated */ - else if (ob->flag & OB_POSEMODE) - { - strcpy(t->spacename, "normal"); - if(normal[0]!=0.0 || normal[1]!=0.0 || normal[2]!=0.0) { - float imat[3][3], mat[3][3]; - - /* we need the transpose of the inverse for a normal... */ - Mat3CpyMat4(imat, ob->obmat); - - Mat3Inv(mat, imat); - Mat3Transp(mat); - Mat3MulVecfl(mat, normal); - Mat3MulVecfl(mat, plane); - - Normalize(normal); - if(0.0==Normalize(plane)) VECCOPY(plane, mat[1]); - - VECCOPY(mat[2], normal); - Crossf(mat[0], normal, plane); - Crossf(mat[1], mat[2], mat[0]); - - Mat4CpyMat3(v3d->twmat, mat); - Mat4Ortho(v3d->twmat); - - break; - } - } /* no break we define 'normal' as 'local' in Object mode */ case V3D_MANIP_LOCAL: strcpy(t->spacename, "local"); diff --git a/source/blender/src/transform_orientations.c b/source/blender/src/transform_orientations.c index 6696fcf95d6..9c7a2f67b89 100644 --- a/source/blender/src/transform_orientations.c +++ b/source/blender/src/transform_orientations.c @@ -27,6 +27,7 @@ #include "MEM_guardedalloc.h" #include "DNA_armature_types.h" +#include "DNA_action_types.h" #include "DNA_curve_types.h" #include "DNA_listBase.h" #include "DNA_object_types.h" @@ -68,11 +69,17 @@ void BIF_clearTransformOrientation(void) } void BIF_manageTransformOrientation(int confirm, int set) { + Object *ob = OBACT; int index = -1; if (G.obedit) { if (G.obedit->type == OB_MESH) index = manageMeshSpace(confirm, set); + else if (G.obedit->type == OB_ARMATURE) + index = manageBoneSpace(confirm, set); + } + else if (ob && (ob->flag & OB_POSEMODE)) { + index = manageBoneSpace(confirm, set); } else { index = manageObjectSpace(confirm, set); @@ -122,6 +129,31 @@ int confirmSpace(int set, char text[]) } } +int manageBoneSpace(int confirm, int set) { + float mat[3][3]; + float normal[3], plane[3]; + char name[36] = ""; + int index; + + getTransformOrientation(normal, plane, 0); + + if (confirm == 0 && confirmSpace(set, "Bone") == 0) { + return -1; + } + + if (createSpaceNormalTangent(mat, normal, plane) == 0) { + error("Cannot use zero-length bone"); + return -1; + } + + strcpy(name, "Bone"); + + /* Input name */ + sbutton(name, 1, 35, "name: "); + + index = addMatrixSpace(mat, name); + return index; +} int manageMeshSpace(int confirm, int set) { float mat[3][3]; @@ -363,6 +395,29 @@ void applyTransformOrientation() { } } +static int count_bone_select(bArmature *arm, ListBase *lb, int do_it) +{ + Bone *bone; + int do_next; + int total = 0; + + for(bone= lb->first; bone; bone= bone->next) { + bone->flag &= ~BONE_TRANSFORM; + do_next = do_it; + if(do_it) { + if(bone->layer & arm->layer) { + if (bone->flag & BONE_SELECTED) { + bone->flag |= BONE_TRANSFORM; + total++; + do_next= 0; // no transform on children if one parent bone is selected + } + } + } + total += count_bone_select(arm, &bone->childbase, do_next); + } + + return total; +} int getTransformOrientation(float normal[3], float plane[3], int activeOnly) { @@ -375,6 +430,14 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly) if(G.obedit) { + float imat[3][3], mat[3][3]; + + /* we need the transpose of the inverse for a normal... */ + Mat3CpyMat4(imat, ob->obmat); + + Mat3Inv(mat, imat); + Mat3Transp(mat); + ob= G.obedit; if(G.obedit->type==OB_MESH) @@ -639,12 +702,48 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly) } } - - Mat4Mul3Vecfl(G.obedit->obmat, plane); - Mat4Mul3Vecfl(G.obedit->obmat, normal); + + /* Vectors from edges don't need the special transpose inverse multiplication */ + if (result == ORIENTATION_EDGE) + { + Mat4Mul3Vecfl(ob->obmat, normal); + Mat4Mul3Vecfl(ob->obmat, plane); + } + else + { + Mat3MulVecfl(mat, normal); + Mat3MulVecfl(mat, plane); + } } else if(ob && (ob->flag & OB_POSEMODE)) { + bArmature *arm= ob->data; + bPoseChannel *pchan; + int totsel; + + totsel = count_bone_select(arm, &arm->bonebase, 1); + if(totsel) { + float imat[3][3], mat[3][3]; + + /* use channels to get stats */ + for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) { + VecAddf(normal, normal, pchan->pose_mat[2]); + VecAddf(plane, plane, pchan->pose_mat[1]); + } + } + VecMulf(plane, -1.0); + + /* we need the transpose of the inverse for a normal... */ + Mat3CpyMat4(imat, ob->obmat); + + Mat3Inv(mat, imat); + Mat3Transp(mat); + Mat3MulVecfl(mat, normal); + Mat3MulVecfl(mat, plane); + + result = ORIENTATION_EDGE; + } } else if(G.f & (G_VERTEXPAINT + G_TEXTUREPAINT + G_WEIGHTPAINT + G_SCULPTMODE)) { diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 2904ca60a12..1e45f2bf3e0 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -1448,6 +1448,8 @@ void obmat_to_viewmat(Object *ob, short smooth) float bmat[4][4]; float tmat[3][3]; + G.vd->view= 0; /* dont show the grid */ + Mat4CpyMat4(bmat, ob->obmat); Mat4Ortho(bmat); Mat4Invert(G.vd->viewmat, bmat); From edd2b6ca7374c475cbd6fe0c8a15d6bcce6f1e8c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Jun 2008 01:49:11 +0000 Subject: [PATCH 165/430] bugfix for own error [#13588] Python API Material.sssRadiusBlue broken --- source/blender/python/api2_2x/Material.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index 818c58109f3..ddf161e5efa 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -1179,7 +1179,7 @@ static PyGetSetDef BPy_Material_getseters[] = { {"sssRadiusBlue", (getter)Material_getSssRadius, (setter)Material_setSssRadius, "Mean red scattering path length", - (void *) 0}, + (void *) 2}, {"sssIOR", (getter)Material_getSssIOR, (setter)Material_setSssIOR, "index of refraction", From 26cb5fa0db6f43a44358f8adc1529ebe58d41d3a Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Sun, 1 Jun 2008 01:56:35 +0000 Subject: [PATCH 166/430] -Fix for bug #13067 Bevel tool was hanging on certain geometry where the edge to be beveled was shared by two faces that had more than one edge in common and caller was not checking return status of Bmesh eulers. Fixed. --- source/blender/blenkernel/intern/BME_tools.c | 30 ++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index 90fa9793644..7ce967d1d22 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -811,7 +811,18 @@ static float BME_bevel_get_angle(BME_Mesh *bm, BME_Edge *e, BME_Vert *v) { return Inpf(vec3,vec4); } - +static int BME_face_sharededges(BME_Poly *f1, BME_Poly *f2){ + BME_Loop *l; + int count = 0; + + l = f1->loopbase; + do{ + if(BME_radial_find_face(l->e,f2)) count++; + l = l->next; + }while(l != f1->loopbase); + + return count; +} /** * BME_bevel_initialize * @@ -990,6 +1001,17 @@ static BME_Mesh *BME_bevel_initialize(BME_Mesh *bm, int options, int defgrp_inde /* face pass */ for (f=bm->polys.first; f; f=f->next) f->tflag1 = BME_BEVEL_ORIG; + /*clean up edges with 2 faces that share more than one edge*/ + for (e=bm->edges.first; e; e=e->next){ + if(e->tflag1 & BME_BEVEL_BEVEL){ + int count = 0; + count = BME_face_sharededges(e->loop->f, ((BME_Loop*)e->loop->radial.next->data)->f); + if(count > 1){ + e->tflag1 &= ~BME_BEVEL_BEVEL; + } + } + } + return bm; } @@ -1075,7 +1097,7 @@ static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, v = BME_bevel_wire(bm, v, value, res, options, td); } else if (res && ((v->tflag1 & BME_BEVEL_BEVEL) && (v->tflag1 & BME_BEVEL_ORIG))) { - + int count = 0; /* first, make sure we're not sitting on an edge to be removed */ oe = v->edge; e = BME_disk_nextedge(oe,v); @@ -1089,6 +1111,7 @@ static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, /* look for original edges, and remove them */ oe = e; while ( (e = BME_disk_next_edgeflag(oe, v, 0, BME_BEVEL_ORIG | BME_BEVEL_BEVEL)) ) { + count++; /* join the faces (we'll split them later) */ f = BME_JFKE_safe(bm,e->loop->f,((BME_Loop*)e->loop->radial.next->data)->f,e); if (!f){ @@ -1096,6 +1119,9 @@ static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, } } + /*need to do double check *before* you bevel to make sure that manifold edges are for two faces that share only *one* edge to make sure it doesnt hang here!*/ + + /* all original edges marked to be beveled have been removed; * now we need to link up the edges for this "corner" */ len = BME_cycle_length(BME_disk_getpointer(v->edge, v)); From c0199e192dca28b4d08207dea51c86c3add72cd8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Jun 2008 13:18:26 +0000 Subject: [PATCH 167/430] bugfix (typo) [#13587] Python API Material.sssFront broken --- source/blender/python/api2_2x/Material.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c index ddf161e5efa..c36213950b0 100644 --- a/source/blender/python/api2_2x/Material.c +++ b/source/blender/python/api2_2x/Material.c @@ -1196,7 +1196,7 @@ static PyGetSetDef BPy_Material_getseters[] = { (getter)Material_getSssTexScatter, (setter)Material_setSssTexScatter, "Texture scattering factor", NULL}, - {"sssFont", + {"sssFront", (getter)Material_getSssFront, (setter)Material_setSssFront, "Front scattering weight", NULL}, From 8937989a911fcc1bc634bbbb00be71fe62197fc4 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 1 Jun 2008 14:37:09 +0000 Subject: [PATCH 168/430] == FFMPEG == Shouldn't crash any more in the case that a) invalid video options were selected and b) audio multiplexing was active [#13311] video_stream NULL when writing ffmpeg (did'nt crash for me though, but added extra protection :) ) --- source/blender/blenkernel/intern/writeffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index c95e3d20442..64af8258f80 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -867,7 +867,7 @@ void end_ffmpeg(void) fprintf(stderr, "Closing ffmpeg...\n"); - if (audio_stream) { + if (audio_stream && video_stream) { write_audio_frames(); } From 652ee1e31baa52c8e504bfcf3759ea94c7f5ab66 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Jun 2008 16:13:04 +0000 Subject: [PATCH 169/430] functionality fix Originally the only way to run scripts automatically was with scriptlinks, which could be disabled for loading untrusted blend files. Since then PyDrivers and PyConstraints would run even when G.f&G_DOSCRIPTLINKS was disabled. Gensher, Theeth and Ianwill agree its acceptable to reuse the flag for other areas python runs automatically. PyNodes still have no way to be disabled, (todo before 2.46a) --- source/blender/blenkernel/intern/constraint.c | 4 +++- source/blender/python/BPY_interface.c | 4 ++-- source/creator/creator.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index f60e39769a2..068501780bc 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1882,7 +1882,7 @@ static void pycon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintT { bPythonConstraint *data= con->data; - if (VALID_CONS_TARGET(ct)) { + if ((G.f & G_DOSCRIPTLINKS) && VALID_CONS_TARGET(ct)) { /* special exception for curves - depsgraph issues */ if (ct->tar->type == OB_CURVE) { Curve *cu= ct->tar->data; @@ -1906,6 +1906,8 @@ static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targ { bPythonConstraint *data= con->data; + if ((G.f & G_DOSCRIPTLINKS)==0) return; + /* currently removed, until I this can be re-implemented for multiple targets */ #if 0 /* Firstly, run the 'driver' function which has direct access to the objects involved diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 257203908b1..279c3727442 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -1222,7 +1222,7 @@ static int bpy_pydriver_create_dict(void) { PyObject *d, *mod; - if (bpy_pydriver_Dict) return -1; + if (bpy_pydriver_Dict || (G.f&G_DOSCRIPTLINKS)==0) return -1; d = PyDict_New(); if (!d) return -1; @@ -1998,7 +1998,7 @@ float BPY_pydriver_eval(IpoDriver *driver) int setitem_retval; PyGILState_STATE gilstate; - if (!driver) return result; + if (!driver || (G.f&G_DOSCRIPTLINKS)==0) return result; expr = driver->name; /* the py expression to be evaluated */ if (!expr || expr[0]=='\0') return result; diff --git a/source/creator/creator.c b/source/creator/creator.c index a4588bb4597..2e6b5d7353e 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -219,7 +219,7 @@ static void print_help(void) printf (" -d\t\tTurn debugging on\n"); printf (" -noaudio\tDisable audio on systems that support audio\n"); printf (" -h\t\tPrint this help text\n"); - printf (" -y\t\tDisable script links, use -Y to find out why its -y\n"); + printf (" -y\t\tDisable automatic python script execution (scriptlinks, pydrivers, pyconstraints, pynodes)\n"); printf (" -P \tRun the given Python script (filename or Blender Text)\n"); #ifdef WIN32 printf (" -R\t\tRegister .blend extension\n"); From 07b1608fbe52f729eae39c307060f92948aabf37 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Sun, 1 Jun 2008 17:15:03 +0000 Subject: [PATCH 170/430] -> New memory allocator for Bmesh Added a new pooling allocator for Bmesh based upon the pool allocator availible in the Boost C++ library as described here: http://www.boost.org/doc/libs/1_34_0/libs/pool/doc/concepts.html Each pool allocates elements of a fixed size, so every element type in a mesh gets its own pool. For instance verts occupy a different pool than edges. Each pool is comprised of multiple arrays of a fixed size and allocating /freeing elements is simple as removing or adding a head to a linked list. Since the list of free elements is interleaved throughout the unused space in the arrays, the overhead for storing the free list is only 1 pointer total per pool. This makes building/destroying bmesh structures much faster and saves quite a bit of memory as well. --- source/blender/blenkernel/BKE_bmesh.h | 19 +- source/blender/blenkernel/intern/BME_mesh.c | 65 +++---- .../blender/blenkernel/intern/BME_structure.c | 164 +++++++++++++++--- .../blender/blenkernel/intern/bmesh_private.h | 11 +- source/blender/blenkernel/intern/modifier.c | 2 +- source/blender/src/editmesh_tools.c | 2 +- 6 files changed, 185 insertions(+), 78 deletions(-) diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 08ad8192688..87202ce047a 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -50,6 +50,9 @@ struct BME_Edge; struct BME_Poly; struct BME_Loop; +struct BME_mempool; +typedef struct BME_mempool BME_mempool; + typedef struct BME_CycleNode{ struct BME_CycleNode *next, *prev; void *data; @@ -57,16 +60,21 @@ typedef struct BME_CycleNode{ typedef struct BME_Mesh { - ListBase verts, edges, polys, loops; - int totvert, totedge, totpoly, totloop; /*record keeping*/ - int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/ - struct CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ + ListBase verts, edges, polys; + /*memory pools used for storing mesh elements*/ + struct BME_mempool *vpool; + struct BME_mempool *epool; + struct BME_mempool *ppool; + struct BME_mempool *lpool; /*some scratch arrays used by eulers*/ struct BME_Vert **vtar; struct BME_Edge **edar; struct BME_Loop **lpar; struct BME_Poly **plar; int vtarlen, edarlen, lparlen, plarlen; + int totvert, totedge, totpoly, totloop; /*record keeping*/ + int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/ + //struct CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ } BME_Mesh; typedef struct BME_Vert @@ -102,7 +110,6 @@ typedef struct BME_Loop struct BME_Loop *next, *prev; /*circularly linked list around face*/ int EID; struct BME_CycleNode radial; /*circularly linked list used to find faces around an edge*/ - struct BME_CycleNode *gref; /*pointer to loop ref. Nasty.*/ struct BME_Vert *v; /*vertex that this loop starts at.*/ struct BME_Edge *e; /*edge this loop belongs to*/ struct BME_Poly *f; /*face this loop belongs to*/ @@ -146,7 +153,7 @@ int BME_radial_find_face(struct BME_Edge *e,struct BME_Poly *f); struct BME_Loop *BME_loop_find_loop(struct BME_Poly *f, struct BME_Vert *v); /*MESH CREATION/DESTRUCTION*/ -struct BME_Mesh *BME_make_mesh(void); +struct BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc); void BME_free_mesh(struct BME_Mesh *bm); /*FULL MESH VALIDATION*/ int BME_validate_mesh(struct BME_Mesh *bm, int halt); diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c index d9d2354ef36..307047463cf 100644 --- a/source/blender/blenkernel/intern/BME_mesh.c +++ b/source/blender/blenkernel/intern/BME_mesh.c @@ -62,11 +62,21 @@ * Allocates a new BME_Mesh structure */ -BME_Mesh *BME_make_mesh(void){ + + +BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc){ + /*allocate the structure*/ BME_Mesh *bm = MEM_callocN(sizeof(BME_Mesh),"BMesh"); + /*allocate the memory pools for the mesh elements*/ + bm->vpool = BME_mempool_create(sizeof(BME_Vert), valloc, valloc); + bm->epool = BME_mempool_create(sizeof(BME_Edge), ealloc, ealloc); + bm->ppool = BME_mempool_create(sizeof(BME_Poly), palloc, palloc); + bm->lpool = BME_mempool_create(sizeof(BME_Loop), lalloc, lalloc); + /*allocate the customdata pools*/ return bm; } + /* * BME FREE MESH * @@ -75,45 +85,13 @@ BME_Mesh *BME_make_mesh(void){ void BME_free_mesh(BME_Mesh *bm) { - BME_Poly *bf, *nextf; - BME_Edge *be, *nexte; - BME_Vert *bv, *nextv; - BME_CycleNode *loopref; - - /*destroy polygon data*/ - bf = bm->polys.first; - while(bf){ - nextf = bf->next; - BLI_remlink(&(bm->polys), bf); - BME_free_poly(bm, bf); - - bf = nextf; - } - /*destroy edge data*/ - be = bm->edges.first; - while(be){ - nexte = be->next; - BLI_remlink(&(bm->edges), be); - BME_free_edge(bm, be); - be = nexte; - } - /*destroy vert data*/ - bv = bm->verts.first; - while(bv){ - nextv = bv->next; - BLI_remlink(&(bm->verts), bv); - BME_free_vert(bm, bv); - bv = nextv; - } - - for(loopref=bm->loops.first;loopref;loopref=loopref->next) BME_delete_loop(bm,loopref->data); - BLI_freelistN(&(bm->loops)); - - //CustomData_free(&bm->vdata, 0); - //CustomData_free(&bm->edata, 0); - //CustomData_free(&bm->ldata, 0); - //CustomData_free(&bm->pdata, 0); - + /*destroy element pools*/ + BME_mempool_destroy(bm->vpool); + BME_mempool_destroy(bm->epool); + BME_mempool_destroy(bm->ppool); + BME_mempool_destroy(bm->lpool); + /*destroy custom data pools*/ + MEM_freeN(bm); } @@ -156,8 +134,7 @@ void BME_model_end(BME_Mesh *bm){ totvert = BLI_countlist(&(bm->verts)); totedge = BLI_countlist(&(bm->edges)); totpoly = BLI_countlist(&(bm->polys)); - totloop = BLI_countlist(&(bm->loops)); - + if(bm->vtar) MEM_freeN(bm->vtar); if(bm->edar) MEM_freeN(bm->edar); if(bm->lpar) MEM_freeN(bm->lpar); @@ -167,10 +144,10 @@ void BME_model_end(BME_Mesh *bm){ bm->edar = NULL; bm->lpar = NULL; bm->plar = NULL; - bm->vtarlen = bm->edarlen = bm->lparlen = bm->plarlen = 1024; + bm->vtarlen = bm->edarlen = bm->lparlen = bm->plarlen = 0; - if(bm->totvert!=totvert || bm->totedge!=totedge || bm->totpoly!=totpoly || bm->totloop!=totloop) + if(bm->totvert!=totvert || bm->totedge!=totedge || bm->totpoly!=totpoly) BME_error(); meshok = BME_validate_mesh(bm, 1); diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index d283e1df5ca..d261238d128 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -43,6 +43,105 @@ #include "BLI_ghash.h" #include "BKE_customdata.h" + +/* + Simple, fast memory allocator for allocating many elements of the same size. +*/ +typedef struct BME_mempool_chunk{ + struct BME_mempool_chunk *next, *prev; + void *data; +}BME_mempool_chunk; + +/*this is just to make things prettier*/ +typedef struct BME_freenode{ + struct BME_freenode *next; +}BME_freenode; + +typedef struct BME_mempool{ + struct ListBase chunks; + int esize, csize, pchunk; /*size of elements and chunks in bytes and number of elements per chunk*/ + struct BME_freenode *free; /*free element list. Interleaved into chunk datas.*/ +}BME_mempool; + +BME_mempool *BME_mempool_create(int esize, int tote, int pchunk) +{ BME_mempool *pool = NULL; + BME_freenode *lasttail = NULL, *curnode = NULL; + int i,j, maxchunks; + char *addr; + + /*allocate the pool structure*/ + pool = MEM_mallocN(sizeof(BME_mempool),"memory pool"); + pool->esize = esize; + pool->pchunk = pchunk; + pool->csize = esize * pchunk; + pool->chunks.first = pool->chunks.last = NULL; + + maxchunks = tote / pchunk; + + /*allocate the actual chunks*/ + for(i=0; i < maxchunks; i++){ + BME_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BME_mempool_chunk), "BME_Mempool Chunk"); + mpchunk->next = mpchunk->prev = NULL; + mpchunk->data = MEM_mallocN(pool->csize, "BME Mempool Chunk Data"); + BLI_addtail(&(pool->chunks), mpchunk); + + if(i==0) pool->free = mpchunk->data; /*start of the list*/ + /*loop through the allocated data, building the pointer structures*/ + for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ + curnode = ((BME_freenode*)addr); + addr += pool->esize; + curnode->next = (BME_freenode*)addr; + } + /*final pointer in the previously allocated chunk is wrong.*/ + if(lasttail) lasttail->next = mpchunk->data; + /*set the end of this chunks memory to the new tail for next iteration*/ + lasttail = curnode; + } + /*terminate the list*/ + curnode->next = NULL; + return pool; +} + +void *BME_mempool_alloc(BME_mempool *pool){ + void *retval=NULL; + BME_freenode *curnode=NULL; + char *addr=NULL; + int j; + + if(!(pool->free)){ + /*need to allocate a new chunk*/ + BME_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BME_mempool_chunk), "BME_Mempool Chunk"); + mpchunk->next = mpchunk->prev = NULL; + mpchunk->data = MEM_mallocN(pool->csize, "BME_Mempool Chunk Data"); + BLI_addtail(&(pool->chunks), mpchunk); + + pool->free = mpchunk->data; /*start of the list*/ + for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ + curnode = ((BME_freenode*)addr); + addr += pool->esize; + curnode->next = (BME_freenode*)addr; + } + curnode->next = NULL; /*terminate the list*/ + } + + retval = pool->free; + pool->free = pool->free->next; + //memset(retval, 0, pool->esize); + return retval; +} + +void BME_mempool_free(BME_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid! + BME_freenode *newhead = addr; + newhead->next = pool->free; + pool->free = newhead; +} +void BME_mempool_destroy(BME_mempool *pool) +{ + BME_mempool_chunk *mpchunk=NULL; + for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data); + BLI_freelistN(&(pool->chunks)); + MEM_freeN(pool); +} /** * MISC utility functions. * @@ -86,9 +185,17 @@ int BME_edge_swapverts(BME_Edge *e, BME_Vert *orig, BME_Vert *new){ BME_Vert *BME_addvertlist(BME_Mesh *bm, BME_Vert *example){ BME_Vert *v=NULL; - v = MEM_callocN(sizeof(BME_Vert), "BME Vertex"); - BLI_addtail(&(bm->verts), v); + v = BME_mempool_alloc(bm->vpool); + v->next = v->prev = NULL; v->EID = bm->nextv; + v->co[0] = v->co[1] = v->co[2] = 0.0f; + v->no[0] = v->no[1] = v->no[2] = 0.0f; + v->edge = NULL; + v->data = NULL; + v->eflag1 = v->eflag2 = v->tflag1 = v->tflag2 = 0; + v->flag = v->h = 0; + v->bweight = 0.0f; + BLI_addtail(&(bm->verts), v); bm->nextv++; bm->totvert++; @@ -103,12 +210,19 @@ BME_Vert *BME_addvertlist(BME_Mesh *bm, BME_Vert *example){ } BME_Edge *BME_addedgelist(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge *example){ BME_Edge *e=NULL; - e = MEM_callocN(sizeof(BME_Edge), "BME_Edge"); + e = BME_mempool_alloc(bm->epool); + e->next = e->prev = NULL; + e->EID = bm->nexte; e->v1 = v1; e->v2 = v2; + e->d1.next = e->d1.prev = e->d2.next = e->d2.prev = NULL; e->d1.data = e; e->d2.data = e; - e->EID = bm->nexte; + e->loop = NULL; + e->data = NULL; + e->eflag1 = e->eflag2 = e->tflag1 = e->tflag2 = 0; + e->flag = e->h = 0; + e->crease = e->bweight = 0.0f; bm->nexte++; bm->totedge++; BLI_addtail(&(bm->edges), e); @@ -124,16 +238,17 @@ BME_Edge *BME_addedgelist(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge *ex BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, BME_Loop *example){ /*allocate a BME_Loop and add it to the loophash*/ BME_Loop *l=NULL; - BME_CycleNode *loopnode = MEM_callocN(sizeof(BME_CycleNode),"BME Loop Reference"); - l = MEM_callocN(sizeof(BME_Loop), "BME_Loop"); + l = BME_mempool_alloc(bm->lpool); + l->next = l->prev = NULL; + l->EID = bm->nextl; + l->radial.next = l->radial.prev = NULL; l->radial.data = l; l->v = v; l->e = e; l->f = f; - l->EID = bm->nextl; - l->gref = loopnode; - loopnode->data = l; - BLI_addtail(&(bm->loops),loopnode); + l->data = NULL; + l->eflag1 = l->eflag2 = l->tflag1 = l->tflag2 = 0; + l->flag = l->h = 0; //stupid waste! bm->nextl++; bm->totloop++; @@ -148,9 +263,15 @@ BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, B BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ BME_Poly *f = NULL; - f= MEM_callocN(sizeof(BME_Poly),"BME_Poly"); - BLI_addtail(&(bm->polys),f); + f = BME_mempool_alloc(bm->ppool); + f->next = f->prev = NULL; f->EID = bm->nextp; + f->loopbase = NULL; + f->len = 0; + f->data = NULL; + f->eflag1 = f->eflag2 = f->tflag1 = f->tflag2 = 0; + f->flag = f->h = f->mat_nr; + BLI_addtail(&(bm->polys),f); bm->nextp++; bm->totpoly++; @@ -169,30 +290,23 @@ BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ void BME_free_vert(BME_Mesh *bm, BME_Vert *v){ bm->totvert--; //CustomData_em_free_block(&bm->vdata, &v->data); - MEM_freeN(v); + BME_mempool_free(bm->vpool, v); } void BME_free_edge(BME_Mesh *bm, BME_Edge *e){ bm->totedge--; //CustomData_em_free_block(&bm->edata, &e->data); - MEM_freeN(e); + BME_mempool_free(bm->epool, e); } void BME_free_poly(BME_Mesh *bm, BME_Poly *f){ bm->totpoly--; //CustomData_em_free_block(&bm->pdata, &f->data); - MEM_freeN(f); -} -void BME_delete_loop(BME_Mesh *bm, BME_Loop *l){ - bm->totloop--; - //CustomData_em_free_block(&bm->ldata, &l->data); - MEM_freeN(l); + BME_mempool_free(bm->ppool, f); } void BME_free_loop(BME_Mesh *bm, BME_Loop *l){ - BME_CycleNode *loopref = l->gref; - BLI_freelinkN(&(bm->loops),loopref); - BME_delete_loop(bm,l); + bm->totloop--; + //CustomData_em_free_block(&bm->ldata, &l->data); + BME_mempool_free(bm->lpool, l); } - - /** * BMESH CYCLES * diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index ad90398bf66..ed58421ffb7 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -39,6 +39,15 @@ #include "BKE_bmesh.h" +/*MEMORY MANAGMENT*/ +struct BME_mempool; +typedef struct BME_mempool BME_mempool; + +struct BME_mempool *BME_mempool_create(int esize, int tote, int pchunk); +void BME_mempool_destroy(struct BME_mempool *pool); +void *BME_mempool_alloc(struct BME_mempool *pool); +void BME_mempool_free(struct BME_mempool *pool, void *address); + /*ALLOCATION/DEALLOCATION*/ struct BME_Vert *BME_addvertlist(struct BME_Mesh *bm, struct BME_Vert *example); struct BME_Edge *BME_addedgelist(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *example); @@ -49,7 +58,7 @@ void BME_free_vert(struct BME_Mesh *bm, struct BME_Vert *v); void BME_free_edge(struct BME_Mesh *bm, struct BME_Edge *e); void BME_free_poly(struct BME_Mesh *bm, struct BME_Poly *f); void BME_free_loop(struct BME_Mesh *bm, struct BME_Loop *l); -void BME_delete_loop(struct BME_Mesh *bm, struct BME_Loop *l); +//void BME_delete_loop(struct BME_Mesh *bm, struct BME_Loop *l); /*DOUBLE CIRCULAR LINKED LIST FUNCTIONS*/ void BME_cycle_append(void *h, void *nt); diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index f9f17e7762d..6185e249b5a 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -2754,7 +2754,7 @@ static DerivedMesh *bevelModifier_applyModifier( //~ } //~ } - bm = BME_make_mesh(); + bm = BME_make_mesh(512,512,2048,512); bm = BME_derivedmesh_to_bmesh(derivedData, bm); BME_bevel(bm,bmd->value,bmd->res,options,defgrp_index,bmd->bevel_angle,NULL); result = BME_bmesh_to_derivedmesh(bm,derivedData); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index d4ebe181218..d90a7eb7c16 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -4497,7 +4497,7 @@ void bevel_menu() { while(G.editBMesh->options & BME_BEVEL_RUNNING) { options = G.editBMesh->options; res = G.editBMesh->res; - bm = BME_make_mesh(); + bm = BME_make_mesh(512,512,2048,512); bm = BME_editmesh_to_bmesh(G.editMesh, bm); BIF_undo_push("Pre-Bevel"); free_editMesh(G.editMesh); From 33321d13d32a960be7e3aa7ee652ad4b23667d97 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Sun, 1 Jun 2008 18:02:29 +0000 Subject: [PATCH 171/430] -> Beginning of Custom Data support for BMesh Now that new allocator is in place, Custom Data can be effeciently added to BMesh. The plan is to make all data not directly related to topology Custom Data and allow callers to decide precisely what information a mesh should have in order to make the best tradeoff between memory usage/speed. Right now not much to look at, just some structure definitions and commented out code. More to come soon... --- source/blender/blenkernel/BKE_bmesh.h | 67 ++++++++++++++++++- source/blender/blenkernel/intern/BME_mesh.c | 30 +++++++-- .../blender/blenkernel/intern/bmesh_private.h | 4 -- 3 files changed, 87 insertions(+), 14 deletions(-) diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 87202ce047a..ab2fd34cd42 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -41,18 +41,79 @@ #include "BLI_ghash.h" #include "BLI_memarena.h" #include "DNA_customdata_types.h" +#include "DNA_image_types.h" #include "BLI_editVert.h" #include "BKE_DerivedMesh.h" #include "transform.h" +/*forward declerations*/ struct BME_Vert; struct BME_Edge; struct BME_Poly; struct BME_Loop; + struct BME_mempool; typedef struct BME_mempool BME_mempool; +/*Custom Data Types and defines + Eventual plan is to move almost everything to custom data and let caller + decide when making the mesh what layers they want to store in the mesh + + This stuff should probably go in a seperate file.... +*/ +typedef struct BME_CustomDataLayer { + int type; /* type of data in layer */ + int offset; /* offset of layer in block */ + int active; /* offset of active layer*/ + char name[32]; /* layer name */ +} BME_CustomDataLayer; + +typedef struct BME_CustomData { + BME_CustomDataLayer *layers; /*Custom Data Layers*/ + BME_mempool *pool; /*pool for alloc of blocks*/ + int totlayer, totsize; /*total layers and total size in bytes of each block*/ +} BME_CustomData; + +#define BME_CD_FACETEX 1 /*Image texture/texface*/ +#define BME_CD_LOOPTEX 2 /*UV coordinates*/ +#define BME_CD_LOOPCOL 3 /*Vcolors*/ +#define BME_CD_DEFORMVERT 4 /*Vertex Group/Weights*/ +#define BME_CD_NUMTYPES 5 + +typedef struct BME_DeformWeight { + int def_nr; + float weight; +} BME_DeformWeight; + +typedef struct BME_DeformVert { + struct BME_DeformWeight *dw; + int totweight; +} BME_DeformVert; + +typedef struct BME_facetex{ + struct Image *tpage; + char flag, transp; + short mode, tile, unwrap; +}BME_facetex; + +typedef struct BME_looptex{ + float u, v; +}BME_looptex; + +typedef struct BME_loopcol{ + char r, g, b, a; +}BME_loopcol; + +/*Notes on further structure Cleanup: + -Remove the tflags, they belong in custom data layers + -Remove the eflags completely, they are mostly not used + -Remove the selection/vis/bevel weight flag/values ect and move them to custom data + -Remove EID member and move to custom data + -Add a radial cycle length, disk cycle length and loop cycle lenght attributes to custom data and have eulers maintain/use them if present. + -Move data such as vertex coordinates/normals to custom data and leave pointers in structures to active layer data. + -Remove BME_CycleNode structure? +*/ typedef struct BME_CycleNode{ struct BME_CycleNode *next, *prev; void *data; @@ -72,9 +133,9 @@ typedef struct BME_Mesh struct BME_Loop **lpar; struct BME_Poly **plar; int vtarlen, edarlen, lparlen, plarlen; - int totvert, totedge, totpoly, totloop; /*record keeping*/ - int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/ - //struct CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ + int totvert, totedge, totpoly, totloop; /*record keeping*/ + int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/ + struct BME_CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ } BME_Mesh; typedef struct BME_Vert diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c index 307047463cf..e12ba2f8c65 100644 --- a/source/blender/blenkernel/intern/BME_mesh.c +++ b/source/blender/blenkernel/intern/BME_mesh.c @@ -62,8 +62,7 @@ * Allocates a new BME_Mesh structure */ - - +//BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc, int vdata[BME_CD_NUMTYPES], int edata[BME_CD_NUMTYPES], int ldata[BME_CD_NUMTYPES], int pdata[BME_CD_NUMTYPES]) BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc){ /*allocate the structure*/ BME_Mesh *bm = MEM_callocN(sizeof(BME_Mesh),"BMesh"); @@ -72,11 +71,17 @@ BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc){ bm->epool = BME_mempool_create(sizeof(BME_Edge), ealloc, ealloc); bm->ppool = BME_mempool_create(sizeof(BME_Poly), palloc, palloc); bm->lpool = BME_mempool_create(sizeof(BME_Loop), lalloc, lalloc); - /*allocate the customdata pools*/ + + /*Setup Custom data structs and layers*/ + /* + BME_CD_Create(bm, &bm->vdata, vdata); + BME_CD_Create(bm, &bm->edata, edata); + BME_CD_Create(bm, &bm->ldata, ldata); + BME_CD_Create(bm, &bm->pdata, pdata); + + */ return bm; } - - /* * BME FREE MESH * @@ -90,8 +95,12 @@ void BME_free_mesh(BME_Mesh *bm) BME_mempool_destroy(bm->epool); BME_mempool_destroy(bm->ppool); BME_mempool_destroy(bm->lpool); - /*destroy custom data pools*/ - + /* + BME_CD_Free(bm, &bm->vdata); + BME_CD_Free(bm, &bm->edata); + BME_CD_Free(bm, &bm->ldata); + BME_CD_Free(bm, &bm->pdata); + */ MEM_freeN(bm); } @@ -156,6 +165,13 @@ void BME_model_end(BME_Mesh *bm){ } } +/*note, this needs to be turned on for debugging only. + We need two levels of debugging, + 1: Mesh level + 2: Euler level + Both need to be turned off in production builds (they really slow things down) +*/ + /* * BME VALIDATE MESH * diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index ed58421ffb7..4aa2a85b8b1 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -39,10 +39,6 @@ #include "BKE_bmesh.h" -/*MEMORY MANAGMENT*/ -struct BME_mempool; -typedef struct BME_mempool BME_mempool; - struct BME_mempool *BME_mempool_create(int esize, int tote, int pchunk); void BME_mempool_destroy(struct BME_mempool *pool); void *BME_mempool_alloc(struct BME_mempool *pool); From 85e77e53ef29274d456ecfdb95ec2a60cb5253f1 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Sun, 1 Jun 2008 18:43:22 +0000 Subject: [PATCH 172/430] -> Fix for last few commits New memory allocator broke compilation on GCC/Linux. Fixed --- source/blender/blenkernel/BKE_bmesh.h | 8 ++++++-- source/blender/blenkernel/intern/BME_structure.c | 6 ------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index ab2fd34cd42..e44e9e02aaa 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -53,8 +53,12 @@ struct BME_Poly; struct BME_Loop; -struct BME_mempool; -typedef struct BME_mempool BME_mempool; +/*structure for fast memory allocation/frees*/ +typedef struct BME_mempool{ + struct ListBase chunks; + int esize, csize, pchunk; /*size of elements and chunks in bytes and number of elements per chunk*/ + struct BME_freenode *free; /*free element list. Interleaved into chunk datas.*/ +}BME_mempool; /*Custom Data Types and defines Eventual plan is to move almost everything to custom data and let caller diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index d261238d128..8f885d6c2cb 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -57,12 +57,6 @@ typedef struct BME_freenode{ struct BME_freenode *next; }BME_freenode; -typedef struct BME_mempool{ - struct ListBase chunks; - int esize, csize, pchunk; /*size of elements and chunks in bytes and number of elements per chunk*/ - struct BME_freenode *free; /*free element list. Interleaved into chunk datas.*/ -}BME_mempool; - BME_mempool *BME_mempool_create(int esize, int tote, int pchunk) { BME_mempool *pool = NULL; BME_freenode *lasttail = NULL, *curnode = NULL; From 86a0afb8295c2ba6560f8ceb9b35c873b614317e Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 2 Jun 2008 01:02:08 +0000 Subject: [PATCH 173/430] Compiler warning fixes (unused vars). Notes: - edgehash.c still has some weirdo code causing warnings on lines 80 and 117 i.e. if (v1verts)); totedge = BLI_countlist(&(bm->edges)); From 8a2a91ddfe635d2f2d26f1434512b0859811abcc Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 2 Jun 2008 02:54:33 +0000 Subject: [PATCH 174/430] Added missing newline for error print in Py-button expressions --- source/blender/python/BPY_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 279c3727442..c63fa28c46e 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -2103,7 +2103,7 @@ int BPY_button_eval(char *expr, double *value) if (!bpy_pydriver_Dict) { if (bpy_pydriver_create_dict() != 0) { fprintf(stderr, - "Button Python Eval error: couldn't create Python dictionary"); + "Button Python Eval error: couldn't create Python dictionary \n"); PyGILState_Release(gilstate); return -1; } From 1cc61f633fb16a4aca576bccef365f8e515c5a3d Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 2 Jun 2008 17:31:05 +0000 Subject: [PATCH 175/430] Patch #11000 approved: [new function] KX_GameObject::alignAxisToVect() Align an object's axis to a given vector --- source/gameengine/Ketsji/KX_GameObject.cpp | 81 +++++++++++++++++++++- source/gameengine/Ketsji/KX_GameObject.h | 10 +++ source/gameengine/PyDoc/KX_GameObject.py | 15 +++- 3 files changed, 104 insertions(+), 2 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index dada47e2fa4..c192cd01261 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -580,7 +580,68 @@ void KX_GameObject::SetObjectColor(const MT_Vector4& rgbavec) m_objectColor = rgbavec; } +void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) +{ + MT_Matrix3x3 orimat; + MT_Vector3 vect,ori,z,x,y; + MT_Scalar len; + vect = dir; + len = vect.length(); + if (MT_fuzzyZero(len)) + { + cout << "alignAxisToVect() Error: Null vector!\n"; + return; + } + // normalize + vect /= len; + orimat = GetSGNode()->GetWorldOrientation(); + switch (axis) + { + case 0: //x axis + ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); //pivot axis + if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) //is the vector paralell to the pivot? + ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); //change the pivot! + x = vect; + y = ori.cross(x); + z = x.cross(y); + break; + case 1: //y axis + ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); + if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) + ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); + y = vect; + z = ori.cross(y); + x = y.cross(z); + break; + case 2: //z axis + ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); + if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) + ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); + z = vect; + x = ori.cross(z); + y = z.cross(x); + break; + default: //wrong input? + cout << "alignAxisToVect(): Wrong axis '" << axis <<"'\n"; + return; + } + x.normalize(); //normalize the vectors + y.normalize(); + z.normalize(); + orimat = MT_Matrix3x3( x[0],y[0],z[0], + x[1],y[1],z[1], + x[2],y[2],z[2]); + if (GetSGNode()->GetSGParent() != NULL) + { + // the object is a child, adapt its local orientation so that + // the global orientation is aligned as we want. + MT_Matrix3x3 invori = GetSGNode()->GetSGParent()->GetWorldOrientation().inverse(); + NodeSetLocalOrientation(invori*orimat); + } + else + NodeSetLocalOrientation(orimat); +} MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) { @@ -723,6 +784,7 @@ void KX_GameObject::Suspend(void) PyMethodDef KX_GameObject::Methods[] = { {"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_VARARGS}, + {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS}, {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_VARARGS}, {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_VARARGS}, {"getOrientation", (PyCFunction) KX_GameObject::sPyGetOrientation, METH_VARARGS}, @@ -1255,7 +1317,24 @@ PyObject* KX_GameObject::PySetOrientation(PyObject* self, return NULL; } - +PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + PyObject* pyvect; + int axis = 2; //z axis is the default + + if (PyArg_ParseTuple(args,"O|i",&pyvect,&axis)) + { + MT_Vector3 vect; + if (PyVecTo(pyvect, vect)) + { + AlignAxisToVect(vect,axis); + Py_Return; + } + } + return NULL; +} PyObject* KX_GameObject::PySetPosition(PyObject* self, PyObject* args, diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 3758651f53d..56b9f3f6375 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -258,6 +258,15 @@ public: bool local=false ); + /** + * Align the object to a given normal. + */ + void + AlignAxisToVect( + const MT_Vector3& vect, + int axis = 2 + ); + /** * Quick'n'dirty obcolor ipo stuff */ @@ -662,6 +671,7 @@ public: KX_PYMETHOD(KX_GameObject,GetOrientation); KX_PYMETHOD(KX_GameObject,SetOrientation); KX_PYMETHOD(KX_GameObject,SetVisible); + KX_PYMETHOD(KX_GameObject,AlignAxisToVect); KX_PYMETHOD(KX_GameObject,SuspendDynamics); KX_PYMETHOD(KX_GameObject,RestoreDynamics); KX_PYMETHOD(KX_GameObject,EnableRigidBody); diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index fbd896a55d1..8d29a704380 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -51,6 +51,18 @@ class KX_GameObject: @type orn: 3x3 rotation matrix, or Quaternion. @param orn: a rotation matrix specifying the new rotation. """ + def alignAxisToVect(vect, axis): + """ + Aligns any of the game object's axis along the given vector. + + @type vect: 3d vector. + @param vect: a vector to align the axis. + @type axis: integer. + @param axis:The axis you want to align + - 0: X axis + - 1: Y axis + - 2: Z axis (default) + """ def getOrientation(): """ Gets the game object's orientation. @@ -213,4 +225,5 @@ class KX_GameObject: @rtype: 3-tuple (L{KX_GameObject}, 3-tuple (x,y,z), 3-tuple (nx,ny,nz)) @return: (object,hitpoint,hitnormal) or (None,None,None) """ - \ No newline at end of file + + From 8a5f36219214b4a5b8348b8e200ef5aac2297963 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Mon, 2 Jun 2008 20:52:40 +0000 Subject: [PATCH 176/430] -> More Bmesh Custom Data stuff Some more Bmesh custom data functions and structures. This still does not do anything yet because the various conversion functions don't bother making use of the new custom data functions. Hooking them up should be fairly simple though. Also note that the custom data code is mostly copy/pasted from the existing custom data functions for editmode with a few modifications. Duplicating code like this isn't nice, but I felt it was better to keep things for Bmesh 'standalone' for the moment and take only what is immediatly needed instead of creating a tangle of interdependant code. --- source/blender/blenkernel/BKE_bmesh.h | 59 +----- .../blender/blenkernel/BKE_bmeshCustomData.h | 108 ++++++++++ .../blenkernel/intern/BME_Customdata.c | 197 ++++++++++++++++++ .../blenkernel/intern/BME_conversions.c | 22 +- source/blender/blenkernel/intern/BME_mesh.c | 92 ++++---- .../blender/blenkernel/intern/BME_structure.c | 44 ++-- source/blender/blenkernel/intern/modifier.c | 4 +- source/blender/src/editmesh_tools.c | 8 +- 8 files changed, 406 insertions(+), 128 deletions(-) create mode 100644 source/blender/blenkernel/BKE_bmeshCustomData.h create mode 100644 source/blender/blenkernel/intern/BME_Customdata.c diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index e44e9e02aaa..51a5d29dbb7 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -40,11 +40,11 @@ #include "DNA_listBase.h" #include "BLI_ghash.h" #include "BLI_memarena.h" -#include "DNA_customdata_types.h" #include "DNA_image_types.h" #include "BLI_editVert.h" #include "BKE_DerivedMesh.h" #include "transform.h" +#include "BKE_bmeshCustomData.h" /*forward declerations*/ struct BME_Vert; @@ -60,55 +60,6 @@ typedef struct BME_mempool{ struct BME_freenode *free; /*free element list. Interleaved into chunk datas.*/ }BME_mempool; -/*Custom Data Types and defines - Eventual plan is to move almost everything to custom data and let caller - decide when making the mesh what layers they want to store in the mesh - - This stuff should probably go in a seperate file.... -*/ -typedef struct BME_CustomDataLayer { - int type; /* type of data in layer */ - int offset; /* offset of layer in block */ - int active; /* offset of active layer*/ - char name[32]; /* layer name */ -} BME_CustomDataLayer; - -typedef struct BME_CustomData { - BME_CustomDataLayer *layers; /*Custom Data Layers*/ - BME_mempool *pool; /*pool for alloc of blocks*/ - int totlayer, totsize; /*total layers and total size in bytes of each block*/ -} BME_CustomData; - -#define BME_CD_FACETEX 1 /*Image texture/texface*/ -#define BME_CD_LOOPTEX 2 /*UV coordinates*/ -#define BME_CD_LOOPCOL 3 /*Vcolors*/ -#define BME_CD_DEFORMVERT 4 /*Vertex Group/Weights*/ -#define BME_CD_NUMTYPES 5 - -typedef struct BME_DeformWeight { - int def_nr; - float weight; -} BME_DeformWeight; - -typedef struct BME_DeformVert { - struct BME_DeformWeight *dw; - int totweight; -} BME_DeformVert; - -typedef struct BME_facetex{ - struct Image *tpage; - char flag, transp; - short mode, tile, unwrap; -}BME_facetex; - -typedef struct BME_looptex{ - float u, v; -}BME_looptex; - -typedef struct BME_loopcol{ - char r, g, b, a; -}BME_loopcol; - /*Notes on further structure Cleanup: -Remove the tflags, they belong in custom data layers -Remove the eflags completely, they are mostly not used @@ -196,7 +147,7 @@ typedef struct BME_Poly unsigned short flag, h, mat_nr; } BME_Poly; -//*EDGE UTILITIES*/ +/*EDGE UTILITIES*/ int BME_verts_in_edge(struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *e); int BME_vert_in_edge(struct BME_Edge *e, BME_Vert *v); struct BME_Vert *BME_edge_getothervert(struct BME_Edge *e, struct BME_Vert *v); @@ -218,7 +169,7 @@ int BME_radial_find_face(struct BME_Edge *e,struct BME_Poly *f); struct BME_Loop *BME_loop_find_loop(struct BME_Poly *f, struct BME_Vert *v); /*MESH CREATION/DESTRUCTION*/ -struct BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc); +struct BME_Mesh *BME_make_mesh(int allocsize[4], struct BME_CustomDataInit init[4]); void BME_free_mesh(struct BME_Mesh *bm); /*FULL MESH VALIDATION*/ int BME_validate_mesh(struct BME_Mesh *bm, int halt); @@ -302,8 +253,8 @@ float *BME_bevel_calc_polynormal(struct BME_Poly *f, struct BME_TransData_Head * struct BME_Mesh *BME_bevel(struct BME_Mesh *bm, float value, int res, int options, int defgrp_index, float angle, BME_TransData_Head **rtd); /*CONVERSION FUNCTIONS*/ -struct BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em, struct BME_Mesh *bm); +struct BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em); struct EditMesh *BME_bmesh_to_editmesh(struct BME_Mesh *bm, BME_TransData_Head *td); -struct BME_Mesh *BME_derivedmesh_to_bmesh(struct DerivedMesh *dm, struct BME_Mesh *bm); +struct BME_Mesh *BME_derivedmesh_to_bmesh(struct DerivedMesh *dm); struct DerivedMesh *BME_bmesh_to_derivedmesh(struct BME_Mesh *bm, struct DerivedMesh *dm); #endif diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h new file mode 100644 index 00000000000..423f75e532d --- /dev/null +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -0,0 +1,108 @@ +/** + * BKE_bmesh.h jan 2007 + * + * BMesh modeler structure and functions. + * + * $Id: BKE_bmesh.h,v 1.00 2007/01/17 17:42:01 Briggs Exp $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Geoffrey Bantle. + * + * ***** END GPL LICENSE BLOCK ***** + */ + + +#ifndef BKE_BMESHCUSTOMDATA_H +#define BKE_BMESHCUSTOMDATA_H + +struct BME_mempool; + +/*Custom Data Types and defines + Eventual plan is to move almost everything to custom data and let caller + decide when making the mesh what layers they want to store in the mesh + + This stuff should probably go in a seperate file.... +*/ + +#define BME_CD_FACETEX 0 /*Image texture/texface*/ +#define BME_CD_LOOPTEX 1 /*UV coordinates*/ +#define BME_CD_LOOPCOL 2 /*Vcolors*/ +#define BME_CD_DEFORMVERT 3 /*Vertex Group/Weights*/ +#define BME_CD_NUMTYPES 4 + +typedef struct BME_CustomDataLayer { + int type; /* type of data in layer */ + int offset; /* offset of layer in block */ + int active; /* offset of active layer*/ + char name[32]; /* layer name */ +} BME_CustomDataLayer; + +typedef struct BME_CustomData { + struct BME_CustomDataLayer *layers; /*Custom Data Layers*/ + struct BME_mempool *pool; /*pool for alloc of blocks*/ + int totlayer, totsize; /*total layers and total size in bytes of each block*/ +} BME_CustomData; + +typedef struct BME_CustomDataInit{ + int layout[BME_CD_NUMTYPES]; + int active[BME_CD_NUMTYPES]; + int totlayers; + char *nametemplate; +} BME_CustomDataInit; + +/*Custom data types*/ +typedef struct BME_DeformWeight { + int def_nr; + float weight; +} BME_DeformWeight; + +typedef struct BME_DeformVert { + struct BME_DeformWeight *dw; + int totweight; +} BME_DeformVert; + +typedef struct BME_facetex{ + struct Image *tpage; + char flag, transp; + short mode, tile, unwrap; +}BME_facetex; + +typedef struct BME_looptex{ + float u, v; +}BME_looptex; + +typedef struct BME_loopcol{ + char r, g, b, a; +}BME_loopcol; + +/*CUSTOM DATA API*/ +void BME_CD_Create(struct BME_CustomData *data, struct BME_CustomDataInit *init, int initalloc); +void BME_CD_Free(struct BME_CustomData *data); +void BME_CD_free_block(struct BME_CustomData *data, void **block); +void BME_CD_copy_data(const struct BME_CustomData *source, struct BME_CustomData *dest, void *src_block, void **dest_block); +void BME_CD_set_default(struct BME_CustomData *data, void **block); + +#endif diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c new file mode 100644 index 00000000000..68bc75327d9 --- /dev/null +++ b/source/blender/blenkernel/intern/BME_Customdata.c @@ -0,0 +1,197 @@ +/** + * BME_customdata.c jan 2007 + * + * Custom Data functions for Bmesh + * + * $Id: BKE_bmesh.h,v 1.00 2007/01/17 17:42:01 Briggs Exp $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2004 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Geoffrey Bantle, Brecht Van Lommel, Ben Batt + * + * ***** END GPL LICENSE BLOCK ***** + */ + + +#include "BKE_bmesh.h" +#include "BKE_bmeshCustomData.h" +#include "bmesh_private.h" +#include + +/********************* Layer type information **********************/ +typedef struct BME_LayerTypeInfo { + int size; + char *defaultname; + void (*copy)(const void *source, void *dest, int count); + void (*free)(void *data, int count, int size); + void (*interp)(void **sources, float *weights, float *sub_weights, int count, void *dest); + void (*set_default)(void *data, int count); +} BME_LayerTypeInfo; +const BME_LayerTypeInfo BMELAYERTYPEINFO[BME_CD_NUMTYPES] = { + {sizeof(BME_facetex), "TexFace", NULL, NULL, NULL, NULL}, + {sizeof(BME_looptex), "UV", NULL, NULL, NULL, NULL}, + {sizeof(BME_loopcol), "VCol", NULL, NULL, NULL, NULL}, + {sizeof(BME_DeformVert), "Group", NULL, NULL, NULL, NULL} +}; +static const BME_LayerTypeInfo *BME_layerType_getInfo(int type) +{ + if(type < 0 || type >= CD_NUMTYPES) return NULL; + + return &BMELAYERTYPEINFO[type]; +} +void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc) +{ + int i, j, offset=0; + const BME_LayerTypeInfo *info; + + /*initialize data members*/ + data->layers = NULL; + data->pool = NULL; + data->totlayer = 0; + data->totsize = 0; + + /*first count how many layers to alloc*/ + for(i=0; i < BME_CD_NUMTYPES; i++){ + info = BME_layerType_getInfo(i); + data->totlayer += init->layout[i]; + data->totsize += (init->layout[i] * info->size); + } + /*alloc our layers*/ + if(data->totlayer){ + /*alloc memory*/ + data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers"); + data->pool = BME_mempool_create(data->totsize, initalloc, initalloc); + /*initialize layer data*/ + for(i=0; i < BME_CD_NUMTYPES; i++){ + if(init->layout[i]){ + info = BME_layerType_getInfo(i); + for(j=0; j < init->layout[i]; j++){ + if(j=0) data->layers[j+i].active = init->active[i]; + data->layers[j+i].type = i; + data->layers[j+i].offset = offset; + strcpy(data->layers[j+i].name, &(init->nametemplate[j+i])); + offset += info->size; + } + } + } + } +} + +void BME_CD_Free(BME_CustomData *data) +{ + if(data->pool) BME_mempool_destroy(data->pool); +} + +/*Block level ops*/ +void BME_CD_free_block(BME_CustomData *data, void **block) +{ + const BME_LayerTypeInfo *typeInfo; + int i; + + if(!*block) return; + for(i = 0; i < data->totlayer; ++i) { + typeInfo = BME_layerType_getInfo(data->layers[i].type); + if(typeInfo->free) { + int offset = data->layers[i].offset; + typeInfo->free((char*)*block + offset, 1, typeInfo->size); + } + } + BME_mempool_free(data->pool, *block); + *block = NULL; +} + + +static void BME_CD_alloc_block(BME_CustomData *data, void **block) +{ + + if (*block) BME_CD_free_block(data, block); //if we copy layers that have their own free functions like deformverts + + if (data->totsize > 0) + *block = BME_mempool_alloc(data->pool); + else + *block = NULL; +} + +void BME_CD_copy_data(const BME_CustomData *source, BME_CustomData *dest, + void *src_block, void **dest_block) +{ + const BME_LayerTypeInfo *typeInfo; + int dest_i, src_i; + + if (!*dest_block) /*for addXXXlist functions!*/ + BME_CD_alloc_block(dest, dest_block); + + /* copies a layer at a time */ + dest_i = 0; + for(src_i = 0; src_i < source->totlayer; ++src_i) { + + /* find the first dest layer with type >= the source type + * (this should work because layers are ordered by type) + */ + while(dest_i < dest->totlayer + && dest->layers[dest_i].type < source->layers[src_i].type) + ++dest_i; + + /* if there are no more dest layers, we're done */ + if(dest_i >= dest->totlayer) return; + + /* if we found a matching layer, copy the data */ + if(dest->layers[dest_i].type == source->layers[src_i].type && + strcmp(dest->layers[dest_i].name, source->layers[src_i].name) == 0) { + char *src_data = (char*)src_block + source->layers[src_i].offset; + char *dest_data = (char*)*dest_block + dest->layers[dest_i].offset; + + typeInfo = BME_layerType_getInfo(source->layers[src_i].type); + + if(typeInfo->copy) + typeInfo->copy(src_data, dest_data, 1); + else + memcpy(dest_data, src_data, typeInfo->size); + + /* if there are multiple source & dest layers of the same type, + * we don't want to copy all source layers to the same dest, so + * increment dest_i + */ + ++dest_i; + } + } +} +void BME_CD_set_default(BME_CustomData *data, void **block) +{ + const BME_LayerTypeInfo *typeInfo; + int i; + + if (!*block) + BME_CD_alloc_block(data, block); //for addXXXlist functions... + + for(i = 0; i < data->totlayer; ++i) { + int offset = data->layers[i].offset; + + typeInfo = BME_layerType_getInfo(data->layers[i].type); + + if(typeInfo->set_default) + typeInfo->set_default((char*)*block + offset, 1); + } +} diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 369c19b16c8..08483711c45 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -55,7 +55,10 @@ #include "BSE_edit.h" -BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em, BME_Mesh *bm) { +BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { + BME_Mesh *bm; + int allocsize[4] = {512,512,2048,512}; + BME_CustomDataInit *init = MEM_callocN(sizeof(BME_CustomDataInit) * 4, "Bmesh custom data init"); BME_Vert *v1, *v2; BME_Edge *e, *edar[4]; BME_Poly *f; @@ -65,7 +68,7 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em, BME_Mesh *bm) { EditFace *efa; int len; - + bm = BME_make_mesh(allocsize,init); BME_model_begin(bm); /*add verts*/ @@ -134,6 +137,7 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em, BME_Mesh *bm) { efa = efa->next; } BME_model_end(bm); + MEM_freeN(init); return bm; } @@ -224,21 +228,24 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { } /* Adds the geometry found in dm to bm - * NOTE: it does not allocate a new BME_Mesh! - */ -BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm, BME_Mesh *bm) + */ +BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) { + + BME_Mesh *bm; + int allocsize[4] = {512,512,2048,512}; + BME_CustomDataInit *init = MEM_callocN(sizeof(BME_CustomDataInit) * 4, "Bmesh custom data init"); MVert *mvert, *mv; MEdge *medge, *me; MFace *mface, *mf; int totface,totedge,totvert,i,len; - BME_Vert *v1=NULL,*v2=NULL, **vert_array; BME_Edge *e=NULL; BME_Poly *f=NULL; EdgeHash *edge_hash = BLI_edgehash_new(); - + + bm = BME_make_mesh(allocsize,init); totvert = dm->getNumVerts(dm); totedge = dm->getNumEdges(dm); totface = dm->getNumFaces(dm); @@ -293,6 +300,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm, BME_Mesh *bm) BME_model_end(bm); BLI_edgehash_free(edge_hash, NULL); MEM_freeN(vert_array); + MEM_freeN(init); return bm; } diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c index 0423d9a0ac6..184ef2b8a0e 100644 --- a/source/blender/blenkernel/intern/BME_mesh.c +++ b/source/blender/blenkernel/intern/BME_mesh.c @@ -59,27 +59,37 @@ /* * BME MAKE MESH * - * Allocates a new BME_Mesh structure + * Allocates a new BME_Mesh structure. + * The arguments are two arrays, one of type int + * and another of type BME_CustomDataInit. The first array + * contains the allocation size for each element pool in + * the mesh. For instance allocsize[0] contains the number + * of vertices to allocate at a time for the vertex pool. + * + * The second array contains structures describing the layout + * of custom data for each element type in the mesh. So init[0] + * contains the custom data layout information for vertices, init[1] + * the layout information for edges and so on. + * + * Returns - + * Pointer to a Bmesh + * */ -//BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc, int vdata[BME_CD_NUMTYPES], int edata[BME_CD_NUMTYPES], int ldata[BME_CD_NUMTYPES], int pdata[BME_CD_NUMTYPES]) -BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc){ +BME_Mesh *BME_make_mesh(int allocsize[4], BME_CustomDataInit init[4]) +{ /*allocate the structure*/ BME_Mesh *bm = MEM_callocN(sizeof(BME_Mesh),"BMesh"); /*allocate the memory pools for the mesh elements*/ - bm->vpool = BME_mempool_create(sizeof(BME_Vert), valloc, valloc); - bm->epool = BME_mempool_create(sizeof(BME_Edge), ealloc, ealloc); - bm->ppool = BME_mempool_create(sizeof(BME_Poly), palloc, palloc); - bm->lpool = BME_mempool_create(sizeof(BME_Loop), lalloc, lalloc); - - /*Setup Custom data structs and layers*/ - /* - BME_CD_Create(bm, &bm->vdata, vdata); - BME_CD_Create(bm, &bm->edata, edata); - BME_CD_Create(bm, &bm->ldata, ldata); - BME_CD_Create(bm, &bm->pdata, pdata); - - */ + bm->vpool = BME_mempool_create(sizeof(BME_Vert), allocsize[0], allocsize[0]); + bm->epool = BME_mempool_create(sizeof(BME_Edge), allocsize[1], allocsize[1]); + bm->lpool = BME_mempool_create(sizeof(BME_Loop), allocsize[2], allocsize[2]); + bm->ppool = BME_mempool_create(sizeof(BME_Poly), allocsize[3], allocsize[3]); + /*Setup custom data layers*/ + BME_CD_Create(&bm->vdata, &init[0], allocsize[0]); + BME_CD_Create(&bm->edata, &init[1], allocsize[1]); + BME_CD_Create(&bm->ldata, &init[2], allocsize[2]); + BME_CD_Create(&bm->pdata, &init[3], allocsize[3]); return bm; } /* @@ -90,17 +100,31 @@ BME_Mesh *BME_make_mesh(int valloc, int ealloc, int lalloc, int palloc){ void BME_free_mesh(BME_Mesh *bm) { + BME_Vert *v; + BME_Edge *e; + BME_Loop *l; + BME_Poly *f; + + for(v=bm->verts.first; v; v=v->next) BME_CD_free_block(&bm->vdata, &v->data); + for(e=bm->edges.first; e; e=e->next) BME_CD_free_block(&bm->edata, &e->data); + for(f=bm->polys.first; f; f=f->next){ + BME_CD_free_block(&bm->pdata, &f->data); + l = f->loopbase; + do{ + BME_CD_free_block(&bm->ldata, &l->data); + l = l->next; + }while(l!=f->loopbase); + } /*destroy element pools*/ BME_mempool_destroy(bm->vpool); BME_mempool_destroy(bm->epool); BME_mempool_destroy(bm->ppool); BME_mempool_destroy(bm->lpool); - /* - BME_CD_Free(bm, &bm->vdata); - BME_CD_Free(bm, &bm->edata); - BME_CD_Free(bm, &bm->ldata); - BME_CD_Free(bm, &bm->pdata); - */ + /*free custom data pools*/ + BME_CD_Free(&bm->vdata); + BME_CD_Free(&bm->edata); + BME_CD_Free(&bm->ldata); + BME_CD_Free(&bm->pdata); MEM_freeN(bm); } @@ -111,17 +135,12 @@ void BME_free_mesh(BME_Mesh *bm) * must begin with a call to BME_model_end() and finish with a call to BME_model_end(). * No modification of mesh data is allowed except in between these two calls. * - * TODO - * FOR BME_MODEL_BEGIN: - * -integrate euler undo system. - * -make full copy of structure to safely recover from errors. - * -accept a toolname string. - * -accept param to turn off full copy if just selection tool. (perhaps check for this in eulers...) + * The purpose of these calls is allow for housekeeping tasks to be performed, + * such as allocating/freeing scratch arrays or performing debug validation of + * the mesh structure. * - * BME_MODEL_END: - * -full mesh validation if debugging turned on - * -free structure copy or use it to restore. - * -do euler undo push. + * Returns - + * Nothing * */ @@ -165,13 +184,6 @@ void BME_model_end(BME_Mesh *bm){ } } -/*note, this needs to be turned on for debugging only. - We need two levels of debugging, - 1: Mesh level - 2: Euler level - Both need to be turned off in production builds (they really slow things down) -*/ - /* * BME VALIDATE MESH * @@ -187,7 +199,7 @@ void BME_model_end(BME_Mesh *bm){ * * TODO * - * -Write a full mesh validation function for debugging purposes. + * -Make this only part of debug builds */ #define VHALT(halt) {BME_error(); if(halt) return 0;} diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index 8f885d6c2cb..cbf780c6467 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -193,12 +193,12 @@ BME_Vert *BME_addvertlist(BME_Mesh *bm, BME_Vert *example){ bm->nextv++; bm->totvert++; - if(example) + if(example){ VECCOPY(v->co,example->co); - //if(example) - // CustomData_em_copy_data(&bm->vdata, &bm->vdata, example->data, &v->data); - //else - // CustomData_em_set_default(&bm->vdata, &v->data); + BME_CD_copy_data(&bm->vdata, &bm->vdata, example->data, &v->data); + } + else + BME_CD_set_default(&bm->vdata, &v->data); return v; } @@ -221,16 +221,15 @@ BME_Edge *BME_addedgelist(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge *ex bm->totedge++; BLI_addtail(&(bm->edges), e); - //if(example) - // CustomData_em_copy_data(&bm->edata, &bm->edata, example->data, &e->data); - //else - // CustomData_em_set_default(&bm->edata, &e->data); + if(example) + BME_CD_copy_data(&bm->edata, &bm->edata, example->data, &e->data); + else + BME_CD_set_default(&bm->edata, &e->data); return e; } BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, BME_Loop *example){ - /*allocate a BME_Loop and add it to the loophash*/ BME_Loop *l=NULL; l = BME_mempool_alloc(bm->lpool); l->next = l->prev = NULL; @@ -246,12 +245,11 @@ BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, B bm->nextl++; bm->totloop++; - -/* if(example) - BME_CustomData_copy_data(&bm->ldata, &bm->ldata, example->data, &l->data); + if(example) + BME_CD_copy_data(&bm->ldata, &bm->ldata, example->data, &l->data); else - BME_CustomData_set_default(&bm->ldata, &l->data); -*/ + BME_CD_set_default(&bm->ldata, &l->data); + return l; } @@ -269,10 +267,10 @@ BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ bm->nextp++; bm->totpoly++; - //if(example) - // CustomData_em_copy_data(&bm->pdata, &bm->pdata, example->data, &f->data); - //else - // CustomData_em_set_default(&bm->pdata, &f->data); + if(example) + BME_CD_copy_data(&bm->pdata, &bm->pdata, example->data, &f->data); + else + BME_CD_set_default(&bm->pdata, &f->data); return f; @@ -283,22 +281,22 @@ BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ */ void BME_free_vert(BME_Mesh *bm, BME_Vert *v){ bm->totvert--; - //CustomData_em_free_block(&bm->vdata, &v->data); + BME_CD_free_block(&bm->vdata, &v->data); BME_mempool_free(bm->vpool, v); } void BME_free_edge(BME_Mesh *bm, BME_Edge *e){ bm->totedge--; - //CustomData_em_free_block(&bm->edata, &e->data); + BME_CD_free_block(&bm->edata, &e->data); BME_mempool_free(bm->epool, e); } void BME_free_poly(BME_Mesh *bm, BME_Poly *f){ bm->totpoly--; - //CustomData_em_free_block(&bm->pdata, &f->data); + BME_CD_free_block(&bm->pdata, &f->data); BME_mempool_free(bm->ppool, f); } void BME_free_loop(BME_Mesh *bm, BME_Loop *l){ bm->totloop--; - //CustomData_em_free_block(&bm->ldata, &l->data); + BME_CD_free_block(&bm->ldata, &l->data); BME_mempool_free(bm->lpool, l); } /** diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 6185e249b5a..efc250fdc0d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -2736,6 +2736,7 @@ static DerivedMesh *bevelModifier_applyModifier( { DerivedMesh *result; BME_Mesh *bm; + /*bDeformGroup *def;*/ int /*i,*/ options, defgrp_index = -1; BevelModifierData *bmd = (BevelModifierData*) md; @@ -2754,8 +2755,7 @@ static DerivedMesh *bevelModifier_applyModifier( //~ } //~ } - bm = BME_make_mesh(512,512,2048,512); - bm = BME_derivedmesh_to_bmesh(derivedData, bm); + bm = BME_derivedmesh_to_bmesh(derivedData); BME_bevel(bm,bmd->value,bmd->res,options,defgrp_index,bmd->bevel_angle,NULL); result = BME_bmesh_to_derivedmesh(bm,derivedData); BME_free_mesh(bm); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index d90a7eb7c16..f85161c3e23 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -4480,6 +4480,11 @@ static void bevel_mesh_recurs(float bsize, short recurs, int allfaces) } void bevel_menu() { + int vlayers[BME_CD_NUMTYPES] = {0,0,0,0}; + int elayers[BME_CD_NUMTYPES] = {0,0,0,0}; + int llayers[BME_CD_NUMTYPES] = {0,0,0,0}; + int players[BME_CD_NUMTYPES] = {0,0,0,0}; + BME_Mesh *bm; BME_TransData_Head *td; TransInfo *t; @@ -4497,8 +4502,7 @@ void bevel_menu() { while(G.editBMesh->options & BME_BEVEL_RUNNING) { options = G.editBMesh->options; res = G.editBMesh->res; - bm = BME_make_mesh(512,512,2048,512); - bm = BME_editmesh_to_bmesh(G.editMesh, bm); + bm = BME_editmesh_to_bmesh(G.editMesh); BIF_undo_push("Pre-Bevel"); free_editMesh(G.editMesh); BME_bevel(bm,0.1f,res,options,0,0,&td); From ca8aa8c901934dc0e3eb1b65618d40bfb65f9111 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Mon, 2 Jun 2008 21:35:57 +0000 Subject: [PATCH 177/430] == RED one (redcode) == This adds redcode (the file format of RED one, R3D) support to blender. Seems to work fine with the footage I found on the web, but keep in mind, that because of the unoptimized nature of libopenjpeg, frame decoding isn't that fast. It is also a rather challenging task, to make 4k-float-footage realtime :) --- config/linux2-config.py | 18 + extern/SConscript | 6 + extern/libopenjpeg/SConscript | 20 + extern/libopenjpeg/bio.c | 187 ++ extern/libopenjpeg/bio.h | 125 ++ extern/libopenjpeg/cio.c | 191 ++ extern/libopenjpeg/cio.h | 86 + extern/libopenjpeg/dwt.c | 825 ++++++++ extern/libopenjpeg/dwt.h | 113 ++ extern/libopenjpeg/event.c | 121 ++ extern/libopenjpeg/event.h | 58 + extern/libopenjpeg/fix.h | 64 + extern/libopenjpeg/image.c | 89 + extern/libopenjpeg/image.h | 48 + extern/libopenjpeg/int.h | 119 ++ extern/libopenjpeg/j2k.c | 2498 ++++++++++++++++++++++++ extern/libopenjpeg/j2k.h | 446 +++++ extern/libopenjpeg/j2k_lib.c | 59 + extern/libopenjpeg/j2k_lib.h | 54 + extern/libopenjpeg/jp2.c | 710 +++++++ extern/libopenjpeg/jp2.h | 177 ++ extern/libopenjpeg/jpt.c | 155 ++ extern/libopenjpeg/jpt.h | 75 + extern/libopenjpeg/license.txt | 30 + extern/libopenjpeg/mct.c | 148 ++ extern/libopenjpeg/mct.h | 98 + extern/libopenjpeg/mqc.c | 538 +++++ extern/libopenjpeg/mqc.h | 197 ++ extern/libopenjpeg/openjpeg.c | 329 ++++ extern/libopenjpeg/openjpeg.h | 911 +++++++++ extern/libopenjpeg/opj_includes.h | 132 ++ extern/libopenjpeg/opj_malloc.h | 145 ++ extern/libopenjpeg/pi.c | 963 +++++++++ extern/libopenjpeg/pi.h | 154 ++ extern/libopenjpeg/raw.c | 87 + extern/libopenjpeg/raw.h | 100 + extern/libopenjpeg/t1.c | 1208 ++++++++++++ extern/libopenjpeg/t1.h | 147 ++ extern/libopenjpeg/t1_generate_luts.c | 275 +++ extern/libopenjpeg/t1_luts.h | 143 ++ extern/libopenjpeg/t2.c | 787 ++++++++ extern/libopenjpeg/t2.h | 103 + extern/libopenjpeg/tcd.c | 1506 ++++++++++++++ extern/libopenjpeg/tcd.h | 285 +++ extern/libopenjpeg/tgt.c | 213 ++ extern/libopenjpeg/tgt.h | 114 ++ extern/libredcode/AUTHOR | 1 + extern/libredcode/LICENSE | 340 ++++ extern/libredcode/NOTES | 23 + extern/libredcode/SConscript | 28 + extern/libredcode/codec.c | 141 ++ extern/libredcode/codec.h | 34 + extern/libredcode/debayer.c | 129 ++ extern/libredcode/debayer.h | 11 + extern/libredcode/format.c | 213 ++ extern/libredcode/format.h | 24 + intern/bsp/SConscript | 2 +- source/blender/imbuf/SConscript | 8 + source/blender/imbuf/intern/IMB_anim.h | 8 + source/blender/imbuf/intern/anim.c | 74 +- source/blender/imbuf/intern/util.c | 18 + tools/btools.py | 12 + 62 files changed, 15921 insertions(+), 2 deletions(-) create mode 100644 extern/libopenjpeg/SConscript create mode 100644 extern/libopenjpeg/bio.c create mode 100644 extern/libopenjpeg/bio.h create mode 100644 extern/libopenjpeg/cio.c create mode 100644 extern/libopenjpeg/cio.h create mode 100644 extern/libopenjpeg/dwt.c create mode 100644 extern/libopenjpeg/dwt.h create mode 100644 extern/libopenjpeg/event.c create mode 100644 extern/libopenjpeg/event.h create mode 100644 extern/libopenjpeg/fix.h create mode 100644 extern/libopenjpeg/image.c create mode 100644 extern/libopenjpeg/image.h create mode 100644 extern/libopenjpeg/int.h create mode 100644 extern/libopenjpeg/j2k.c create mode 100644 extern/libopenjpeg/j2k.h create mode 100644 extern/libopenjpeg/j2k_lib.c create mode 100644 extern/libopenjpeg/j2k_lib.h create mode 100644 extern/libopenjpeg/jp2.c create mode 100644 extern/libopenjpeg/jp2.h create mode 100644 extern/libopenjpeg/jpt.c create mode 100644 extern/libopenjpeg/jpt.h create mode 100644 extern/libopenjpeg/license.txt create mode 100644 extern/libopenjpeg/mct.c create mode 100644 extern/libopenjpeg/mct.h create mode 100644 extern/libopenjpeg/mqc.c create mode 100644 extern/libopenjpeg/mqc.h create mode 100644 extern/libopenjpeg/openjpeg.c create mode 100644 extern/libopenjpeg/openjpeg.h create mode 100644 extern/libopenjpeg/opj_includes.h create mode 100644 extern/libopenjpeg/opj_malloc.h create mode 100644 extern/libopenjpeg/pi.c create mode 100644 extern/libopenjpeg/pi.h create mode 100644 extern/libopenjpeg/raw.c create mode 100644 extern/libopenjpeg/raw.h create mode 100644 extern/libopenjpeg/t1.c create mode 100644 extern/libopenjpeg/t1.h create mode 100644 extern/libopenjpeg/t1_generate_luts.c create mode 100644 extern/libopenjpeg/t1_luts.h create mode 100644 extern/libopenjpeg/t2.c create mode 100644 extern/libopenjpeg/t2.h create mode 100644 extern/libopenjpeg/tcd.c create mode 100644 extern/libopenjpeg/tcd.h create mode 100644 extern/libopenjpeg/tgt.c create mode 100644 extern/libopenjpeg/tgt.h create mode 100644 extern/libredcode/AUTHOR create mode 100644 extern/libredcode/LICENSE create mode 100644 extern/libredcode/NOTES create mode 100644 extern/libredcode/SConscript create mode 100644 extern/libredcode/codec.c create mode 100644 extern/libredcode/codec.h create mode 100644 extern/libredcode/debayer.c create mode 100644 extern/libredcode/debayer.h create mode 100644 extern/libredcode/format.c create mode 100644 extern/libredcode/format.h diff --git a/config/linux2-config.py b/config/linux2-config.py index 4d8b5c97512..6bde0664fe5 100644 --- a/config/linux2-config.py +++ b/config/linux2-config.py @@ -130,6 +130,24 @@ BF_FFMPEG_LIB = '' BF_FFMPEG_INC = '${BF_FFMPEG}/include' BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' +WITH_BF_OPENJPEG = 'true' +BF_OPENJPEG = '#extern/libopenjpeg' +BF_OPENJPEG_LIB = '' +# Uncomment the following two lines to use system's ffmpeg +# BF_FFMPEG = '/usr' +# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil' +BF_OPENJPEG_INC = '${BF_OPENJPEG}/include' +BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' + +WITH_BF_REDCODE = 'true' +BF_REDCODE = '#extern/libredcode' +BF_REDCODE_LIB = '' +# Uncomment the following two lines to use system's ffmpeg +# BF_FFMPEG = '/usr' +# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil' +BF_REDCODE_INC = '${BF_REDCODE}/include' +BF_REDCODE_LIBPATH='${BF_REDCODE}/lib' + # Mesa Libs should go here if your using them as well.... WITH_BF_STATICOPENGL = 'false' BF_OPENGL = '/usr' diff --git a/extern/SConscript b/extern/SConscript index 09eaf080c28..c94b6573eb9 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -21,5 +21,11 @@ if env['WITH_BF_FFMPEG'] and env['BF_FFMPEG_LIB'] == '': SConscript(['xvidcore/SConscript']) SConscript(['ffmpeg/SConscript']) +if env['WITH_BF_OPENJPEG'] and env['BF_OPENJPEG_LIB'] == '': + SConscript(['libopenjpeg/SConscript']) + +if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '': + SConscript(['libredcode/SConscript']) + if env['OURPLATFORM'] == 'linux2': SConscript(['binreloc/SConscript']); diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript new file mode 100644 index 00000000000..f0a93f6e2d9 --- /dev/null +++ b/extern/libopenjpeg/SConscript @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import sys + +Import('env') + +sources = env.Glob('*.c') +incs = '.' + +flags = "-Wall -O3 -ffast-math -std=c99" + +oj_env = env.Copy(); +oj_env.Replace(CCFLAGS = '') +oj_env.Replace(BF_DEBUG_FLAGS = '') + +oj_env.BlenderLib ( libname='extern_openjpeg', + sources=sources, includes=Split(incs), + defines=[], + libtype=['core','intern','player'], + priority=[10, 10, 300], compileflags = Split(flags)) diff --git a/extern/libopenjpeg/bio.c b/extern/libopenjpeg/bio.c new file mode 100644 index 00000000000..4c02f464d8d --- /dev/null +++ b/extern/libopenjpeg/bio.c @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup BIO BIO - Individual bit input-output stream */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +/** +Write a bit +@param bio BIO handle +@param b Bit to write (0 or 1) +*/ +static void bio_putbit(opj_bio_t *bio, int b); +/** +Read a bit +@param bio BIO handle +@return Returns the read bit +*/ +static int bio_getbit(opj_bio_t *bio); +/** +Write a byte +@param bio BIO handle +@return Returns 0 if successful, returns 1 otherwise +*/ +static int bio_byteout(opj_bio_t *bio); +/** +Read a byte +@param bio BIO handle +@return Returns 0 if successful, returns 1 otherwise +*/ +static int bio_bytein(opj_bio_t *bio); + +/*@}*/ + +/*@}*/ + +/* +========================================================== + local functions +========================================================== +*/ + +static int bio_byteout(opj_bio_t *bio) { + bio->buf = (bio->buf << 8) & 0xffff; + bio->ct = bio->buf == 0xff00 ? 7 : 8; + if (bio->bp >= bio->end) { + return 1; + } + *bio->bp++ = bio->buf >> 8; + return 0; +} + +static int bio_bytein(opj_bio_t *bio) { + bio->buf = (bio->buf << 8) & 0xffff; + bio->ct = bio->buf == 0xff00 ? 7 : 8; + if (bio->bp >= bio->end) { + return 1; + } + bio->buf |= *bio->bp++; + return 0; +} + +static void bio_putbit(opj_bio_t *bio, int b) { + if (bio->ct == 0) { + bio_byteout(bio); + } + bio->ct--; + bio->buf |= b << bio->ct; +} + +static int bio_getbit(opj_bio_t *bio) { + if (bio->ct == 0) { + bio_bytein(bio); + } + bio->ct--; + return (bio->buf >> bio->ct) & 1; +} + +/* +========================================================== + Bit Input/Output interface +========================================================== +*/ + +opj_bio_t* bio_create(void) { + opj_bio_t *bio = (opj_bio_t*)opj_malloc(sizeof(opj_bio_t)); + return bio; +} + +void bio_destroy(opj_bio_t *bio) { + if(bio) { + opj_free(bio); + } +} + +int bio_numbytes(opj_bio_t *bio) { + return (bio->bp - bio->start); +} + +void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len) { + bio->start = bp; + bio->end = bp + len; + bio->bp = bp; + bio->buf = 0; + bio->ct = 8; +} + +void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len) { + bio->start = bp; + bio->end = bp + len; + bio->bp = bp; + bio->buf = 0; + bio->ct = 0; +} + +void bio_write(opj_bio_t *bio, int v, int n) { + int i; + for (i = n - 1; i >= 0; i--) { + bio_putbit(bio, (v >> i) & 1); + } +} + +int bio_read(opj_bio_t *bio, int n) { + int i, v; + v = 0; + for (i = n - 1; i >= 0; i--) { + v += bio_getbit(bio) << i; + } + return v; +} + +int bio_flush(opj_bio_t *bio) { + bio->ct = 0; + if (bio_byteout(bio)) { + return 1; + } + if (bio->ct == 7) { + bio->ct = 0; + if (bio_byteout(bio)) { + return 1; + } + } + return 0; +} + +int bio_inalign(opj_bio_t *bio) { + bio->ct = 0; + if ((bio->buf & 0xff) == 0xff) { + if (bio_bytein(bio)) { + return 1; + } + bio->ct = 0; + } + return 0; +} diff --git a/extern/libopenjpeg/bio.h b/extern/libopenjpeg/bio.h new file mode 100644 index 00000000000..764d7cb2e92 --- /dev/null +++ b/extern/libopenjpeg/bio.h @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __BIO_H +#define __BIO_H +/** +@file bio.h +@brief Implementation of an individual bit input-output (BIO) + +The functions in BIO.C have for goal to realize an individual bit input - output. +*/ + +/** @defgroup BIO BIO - Individual bit input-output stream */ +/*@{*/ + +/** +Individual bit input-output stream (BIO) +*/ +typedef struct opj_bio { + /** pointer to the start of the buffer */ + unsigned char *start; + /** pointer to the end of the buffer */ + unsigned char *end; + /** pointer to the present position in the buffer */ + unsigned char *bp; + /** temporary place where each byte is read or written */ + unsigned int buf; + /** coder : number of bits free to write. decoder : number of bits read */ + int ct; +} opj_bio_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new BIO handle +@return Returns a new BIO handle if successful, returns NULL otherwise +*/ +opj_bio_t* bio_create(void); +/** +Destroy a previously created BIO handle +@param bio BIO handle to destroy +*/ +void bio_destroy(opj_bio_t *bio); +/** +Number of bytes written. +@param bio BIO handle +@return Returns the number of bytes written +*/ +int bio_numbytes(opj_bio_t *bio); +/** +Init encoder +@param bio BIO handle +@param bp Output buffer +@param len Output buffer length +*/ +void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len); +/** +Init decoder +@param bio BIO handle +@param bp Input buffer +@param len Input buffer length +*/ +void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len); +/** +Write bits +@param bio BIO handle +@param v Value of bits +@param n Number of bits to write +*/ +void bio_write(opj_bio_t *bio, int v, int n); +/** +Read bits +@param bio BIO handle +@param n Number of bits to read +@return Returns the corresponding read number +*/ +int bio_read(opj_bio_t *bio, int n); +/** +Flush bits +@param bio BIO handle +@return Returns 1 if successful, returns 0 otherwise +*/ +int bio_flush(opj_bio_t *bio); +/** +Passes the ending bits (coming from flushing) +@param bio BIO handle +@return Returns 1 if successful, returns 0 otherwise +*/ +int bio_inalign(opj_bio_t *bio); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __BIO_H */ + diff --git a/extern/libopenjpeg/cio.c b/extern/libopenjpeg/cio.c new file mode 100644 index 00000000000..2ac262a1f6b --- /dev/null +++ b/extern/libopenjpeg/cio.c @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* ----------------------------------------------------------------------- */ + +opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length) { + opj_cp_t *cp = NULL; + opj_cio_t *cio = (opj_cio_t*)opj_malloc(sizeof(opj_cio_t)); + if(!cio) return NULL; + cio->cinfo = cinfo; + if(buffer && length) { + /* wrap a user buffer containing the encoded image */ + cio->openmode = OPJ_STREAM_READ; + cio->buffer = buffer; + cio->length = length; + } + else if(!buffer && !length && cinfo) { + /* allocate a buffer for the encoded image */ + cio->openmode = OPJ_STREAM_WRITE; + switch(cinfo->codec_format) { + case CODEC_J2K: + cp = ((opj_j2k_t*)cinfo->j2k_handle)->cp; + break; + case CODEC_JP2: + cp = ((opj_jp2_t*)cinfo->jp2_handle)->j2k->cp; + break; + default: + opj_free(cio); + return NULL; + } + cio->length = (unsigned int) (0.1625 * cp->img_size + 2000); /* 0.1625 = 1.3/8 and 2000 bytes as a minimum for headers */ + cio->buffer = (unsigned char *)opj_malloc(cio->length); + if(!cio->buffer) { + opj_event_msg(cio->cinfo, EVT_ERROR, "Error allocating memory for compressed bitstream\n"); + opj_free(cio); + return NULL; + } + } + else { + opj_free(cio); + return NULL; + } + + /* Initialize byte IO */ + cio->start = cio->buffer; + cio->end = cio->buffer + cio->length; + cio->bp = cio->buffer; + + return cio; +} + +void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio) { + if(cio) { + if(cio->openmode == OPJ_STREAM_WRITE) { + /* destroy the allocated buffer */ + opj_free(cio->buffer); + } + /* destroy the cio */ + opj_free(cio); + } +} + + +/* ----------------------------------------------------------------------- */ + +/* + * Get position in byte stream. + */ +int OPJ_CALLCONV cio_tell(opj_cio_t *cio) { + return cio->bp - cio->start; +} + +/* + * Set position in byte stream. + * + * pos : position, in number of bytes, from the beginning of the stream + */ +void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos) { + cio->bp = cio->start + pos; +} + +/* + * Number of bytes left before the end of the stream. + */ +int cio_numbytesleft(opj_cio_t *cio) { + return cio->end - cio->bp; +} + +/* + * Get pointer to the current position in the stream. + */ +unsigned char *cio_getbp(opj_cio_t *cio) { + return cio->bp; +} + +/* + * Write a byte. + */ +bool cio_byteout(opj_cio_t *cio, unsigned char v) { + if (cio->bp >= cio->end) { + opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n"); + return false; + } + *cio->bp++ = v; + return true; +} + +/* + * Read a byte. + */ +unsigned char cio_bytein(opj_cio_t *cio) { + if (cio->bp >= cio->end) { + opj_event_msg(cio->cinfo, EVT_ERROR, "read error: passed the end of the codestream (start = %d, current = %d, end = %d\n", cio->start, cio->bp, cio->end); + return 0; + } + return *cio->bp++; +} + +/* + * Write some bytes. + * + * v : value to write + * n : number of bytes to write + */ +unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n) { + int i; + for (i = n - 1; i >= 0; i--) { + if( !cio_byteout(cio, (unsigned char) ((v >> (i << 3)) & 0xff)) ) + return 0; + } + return n; +} + +/* + * Read some bytes. + * + * n : number of bytes to read + * + * return : value of the n bytes read + */ +unsigned int cio_read(opj_cio_t *cio, int n) { + int i; + unsigned int v; + v = 0; + for (i = n - 1; i >= 0; i--) { + v += cio_bytein(cio) << (i << 3); + } + return v; +} + +/* + * Skip some bytes. + * + * n : number of bytes to skip + */ +void cio_skip(opj_cio_t *cio, int n) { + cio->bp += n; +} + + + diff --git a/extern/libopenjpeg/cio.h b/extern/libopenjpeg/cio.h new file mode 100644 index 00000000000..580bf9c0d12 --- /dev/null +++ b/extern/libopenjpeg/cio.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __CIO_H +#define __CIO_H +/** +@file cio.h +@brief Implementation of a byte input-output process (CIO) + +The functions in CIO.C have for goal to realize a byte input / output process. +*/ + +/** @defgroup CIO CIO - byte input-output stream */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Number of bytes left before the end of the stream +@param cio CIO handle +@return Returns the number of bytes before the end of the stream +*/ +int cio_numbytesleft(opj_cio_t *cio); +/** +Get pointer to the current position in the stream +@param cio CIO handle +@return Returns a pointer to the current position +*/ +unsigned char *cio_getbp(opj_cio_t *cio); +/** +Write some bytes +@param cio CIO handle +@param v Value to write +@param n Number of bytes to write +@return Returns the number of bytes written or 0 if an error occured +*/ +unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n); +/** +Read some bytes +@param cio CIO handle +@param n Number of bytes to read +@return Returns the value of the n bytes read +*/ +unsigned int cio_read(opj_cio_t *cio, int n); +/** +Skip some bytes +@param cio CIO handle +@param n Number of bytes to skip +*/ +void cio_skip(opj_cio_t *cio, int n); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __CIO_H */ + diff --git a/extern/libopenjpeg/dwt.c b/extern/libopenjpeg/dwt.c new file mode 100644 index 00000000000..78d18d175f4 --- /dev/null +++ b/extern/libopenjpeg/dwt.c @@ -0,0 +1,825 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2007, Jonathan Ballard + * Copyright (c) 2007, Callum Lerwick + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __SSE__ +#include +#endif + +#include "opj_includes.h" + +/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */ +/*@{*/ + +#define WS(i) v->mem[(i)*2] +#define WD(i) v->mem[(1+(i)*2)] + +/** @name Local data structures */ +/*@{*/ + +typedef struct dwt_local { + int* mem; + int dn; + int sn; + int cas; +} dwt_t; + +typedef union { + float f[4]; +} v4; + +typedef struct v4dwt_local { + v4* wavelet ; + int dn ; + int sn ; + int cas ; +} v4dwt_t ; + +static const float dwt_alpha = 1.586134342f; // 12994 +static const float dwt_beta = 0.052980118f; // 434 +static const float dwt_gamma = -0.882911075f; // -7233 +static const float dwt_delta = -0.443506852f; // -3633 + +static const float K = 1.230174105f; // 10078 +/* FIXME: What is this constant? */ +static const float c13318 = 1.625732422f; + +/*@}*/ + +/** +Virtual function type for wavelet transform in 1-D +*/ +typedef void (*DWT1DFN)(dwt_t* v); + +/** @name Local static functions */ +/*@{*/ + +/** +Forward lazy transform (horizontal) +*/ +static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas); +/** +Forward lazy transform (vertical) +*/ +static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas); +/** +Inverse lazy transform (horizontal) +*/ +static void dwt_interleave_h(dwt_t* h, int *a); +/** +Inverse lazy transform (vertical) +*/ +static void dwt_interleave_v(dwt_t* v, int *a, int x); +/** +Forward 5-3 wavelet transform in 1-D +*/ +static void dwt_encode_1(int *a, int dn, int sn, int cas); +/** +Inverse 5-3 wavelet transform in 1-D +*/ +static void dwt_decode_1(dwt_t *v); +/** +Forward 9-7 wavelet transform in 1-D +*/ +static void dwt_encode_1_real(int *a, int dn, int sn, int cas); +/** +Explicit calculation of the Quantization Stepsizes +*/ +static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize); +/** +Inverse wavelet transform in 2-D. +*/ +static void dwt_decode_tile(opj_tcd_tilecomp_t* tilec, int i, DWT1DFN fn); + +/*@}*/ + +/*@}*/ + +#define S(i) a[(i)*2] +#define D(i) a[(1+(i)*2)] +#define S_(i) ((i)<0?S(0):((i)>=sn?S(sn-1):S(i))) +#define D_(i) ((i)<0?D(0):((i)>=dn?D(dn-1):D(i))) +/* new */ +#define SS_(i) ((i)<0?S(0):((i)>=dn?S(dn-1):S(i))) +#define DD_(i) ((i)<0?D(0):((i)>=sn?D(sn-1):D(i))) + +/* */ +/* This table contains the norms of the 5-3 wavelets for different bands. */ +/* */ +static const double dwt_norms[4][10] = { + {1.000, 1.500, 2.750, 5.375, 10.68, 21.34, 42.67, 85.33, 170.7, 341.3}, + {1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9}, + {1.038, 1.592, 2.919, 5.703, 11.33, 22.64, 45.25, 90.48, 180.9}, + {.7186, .9218, 1.586, 3.043, 6.019, 12.01, 24.00, 47.97, 95.93} +}; + +/* */ +/* This table contains the norms of the 9-7 wavelets for different bands. */ +/* */ +static const double dwt_norms_real[4][10] = { + {1.000, 1.965, 4.177, 8.403, 16.90, 33.84, 67.69, 135.3, 270.6, 540.9}, + {2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0}, + {2.022, 3.989, 8.355, 17.04, 34.27, 68.63, 137.3, 274.6, 549.0}, + {2.080, 3.865, 8.307, 17.18, 34.71, 69.59, 139.3, 278.6, 557.2} +}; + +/* +========================================================== + local functions +========================================================== +*/ + +/* */ +/* Forward lazy transform (horizontal). */ +/* */ +static void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas) { + int i; + for (i=0; i */ +/* Forward lazy transform (vertical). */ +/* */ +static void dwt_deinterleave_v(int *a, int *b, int dn, int sn, int x, int cas) { + int i; + for (i=0; i */ +/* Inverse lazy transform (horizontal). */ +/* */ +static void dwt_interleave_h(dwt_t* h, int *a) { + int *ai = a; + int *bi = h->mem + h->cas; + int i = h->sn; + while( i-- ) { + *bi = *(ai++); + bi += 2; + } + ai = a + h->sn; + bi = h->mem + 1 - h->cas; + i = h->dn ; + while( i-- ) { + *bi = *(ai++); + bi += 2; + } +} + +/* */ +/* Inverse lazy transform (vertical). */ +/* */ +static void dwt_interleave_v(dwt_t* v, int *a, int x) { + int *ai = a; + int *bi = v->mem + v->cas; + int i = v->sn; + while( i-- ) { + *bi = *ai; + bi += 2; + ai += x; + } + ai = a + (v->sn * x); + bi = v->mem + 1 - v->cas; + i = v->dn ; + while( i-- ) { + *bi = *ai; + bi += 2; + ai += x; + } +} + + +/* */ +/* Forward 5-3 wavelet transform in 1-D. */ +/* */ +static void dwt_encode_1(int *a, int dn, int sn, int cas) { + int i; + + if (!cas) { + if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ + for (i = 0; i < dn; i++) D(i) -= (S_(i) + S_(i + 1)) >> 1; + for (i = 0; i < sn; i++) S(i) += (D_(i - 1) + D_(i) + 2) >> 2; + } + } else { + if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ + S(0) *= 2; + else { + for (i = 0; i < dn; i++) S(i) -= (DD_(i) + DD_(i - 1)) >> 1; + for (i = 0; i < sn; i++) D(i) += (SS_(i) + SS_(i + 1) + 2) >> 2; + } + } +} + +/* */ +/* Inverse 5-3 wavelet transform in 1-D. */ +/* */ +static void dwt_decode_1_(int *a, int dn, int sn, int cas) { + int i; + + if (!cas) { + if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ + for (i = 0; i < sn; i++) S(i) -= (D_(i - 1) + D_(i) + 2) >> 2; + for (i = 0; i < dn; i++) D(i) += (S_(i) + S_(i + 1)) >> 1; + } + } else { + if (!sn && dn == 1) /* NEW : CASE ONE ELEMENT */ + S(0) /= 2; + else { + for (i = 0; i < sn; i++) D(i) -= (SS_(i) + SS_(i + 1) + 2) >> 2; + for (i = 0; i < dn; i++) S(i) += (DD_(i) + DD_(i - 1)) >> 1; + } + } +} + +/* */ +/* Inverse 5-3 wavelet transform in 1-D. */ +/* */ +static void dwt_decode_1(dwt_t *v) { + dwt_decode_1_(v->mem, v->dn, v->sn, v->cas); +} + +/* */ +/* Forward 9-7 wavelet transform in 1-D. */ +/* */ +static void dwt_encode_1_real(int *a, int dn, int sn, int cas) { + int i; + if (!cas) { + if ((dn > 0) || (sn > 1)) { /* NEW : CASE ONE ELEMENT */ + for (i = 0; i < dn; i++) + D(i) -= fix_mul(S_(i) + S_(i + 1), 12993); + for (i = 0; i < sn; i++) + S(i) -= fix_mul(D_(i - 1) + D_(i), 434); + for (i = 0; i < dn; i++) + D(i) += fix_mul(S_(i) + S_(i + 1), 7233); + for (i = 0; i < sn; i++) + S(i) += fix_mul(D_(i - 1) + D_(i), 3633); + for (i = 0; i < dn; i++) + D(i) = fix_mul(D(i), 5038); /*5038 */ + for (i = 0; i < sn; i++) + S(i) = fix_mul(S(i), 6659); /*6660 */ + } + } else { + if ((sn > 0) || (dn > 1)) { /* NEW : CASE ONE ELEMENT */ + for (i = 0; i < dn; i++) + S(i) -= fix_mul(DD_(i) + DD_(i - 1), 12993); + for (i = 0; i < sn; i++) + D(i) -= fix_mul(SS_(i) + SS_(i + 1), 434); + for (i = 0; i < dn; i++) + S(i) += fix_mul(DD_(i) + DD_(i - 1), 7233); + for (i = 0; i < sn; i++) + D(i) += fix_mul(SS_(i) + SS_(i + 1), 3633); + for (i = 0; i < dn; i++) + S(i) = fix_mul(S(i), 5038); /*5038 */ + for (i = 0; i < sn; i++) + D(i) = fix_mul(D(i), 6659); /*6660 */ + } + } +} + +static void dwt_encode_stepsize(int stepsize, int numbps, opj_stepsize_t *bandno_stepsize) { + int p, n; + p = int_floorlog2(stepsize) - 13; + n = 11 - int_floorlog2(stepsize); + bandno_stepsize->mant = (n < 0 ? stepsize >> -n : stepsize << n) & 0x7ff; + bandno_stepsize->expn = numbps - p; +} + +/* +========================================================== + DWT interface +========================================================== +*/ + +/* */ +/* Forward 5-3 wavelet transform in 2-D. */ +/* */ +void dwt_encode(opj_tcd_tilecomp_t * tilec) { + int i, j, k; + int *a = NULL; + int *aj = NULL; + int *bj = NULL; + int w, l; + + w = tilec->x1-tilec->x0; + l = tilec->numresolutions-1; + a = tilec->data; + + for (i = 0; i < l; i++) { + int rw; /* width of the resolution level computed */ + int rh; /* height of the resolution level computed */ + int rw1; /* width of the resolution level once lower than computed one */ + int rh1; /* height of the resolution level once lower than computed one */ + int cas_col; /* 0 = non inversion on horizontal filtering 1 = inversion between low-pass and high-pass filtering */ + int cas_row; /* 0 = non inversion on vertical filtering 1 = inversion between low-pass and high-pass filtering */ + int dn, sn; + + rw = tilec->resolutions[l - i].x1 - tilec->resolutions[l - i].x0; + rh = tilec->resolutions[l - i].y1 - tilec->resolutions[l - i].y0; + rw1= tilec->resolutions[l - i - 1].x1 - tilec->resolutions[l - i - 1].x0; + rh1= tilec->resolutions[l - i - 1].y1 - tilec->resolutions[l - i - 1].y0; + + cas_row = tilec->resolutions[l - i].x0 % 2; + cas_col = tilec->resolutions[l - i].y0 % 2; + + sn = rh1; + dn = rh - rh1; + bj = (int*)opj_malloc(rh * sizeof(int)); + for (j = 0; j < rw; j++) { + aj = a + j; + for (k = 0; k < rh; k++) bj[k] = aj[k*w]; + dwt_encode_1(bj, dn, sn, cas_col); + dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col); + } + opj_free(bj); + + sn = rw1; + dn = rw - rw1; + bj = (int*)opj_malloc(rw * sizeof(int)); + for (j = 0; j < rh; j++) { + aj = a + j * w; + for (k = 0; k < rw; k++) bj[k] = aj[k]; + dwt_encode_1(bj, dn, sn, cas_row); + dwt_deinterleave_h(bj, aj, dn, sn, cas_row); + } + opj_free(bj); + } +} + + +/* */ +/* Inverse 5-3 wavelet transform in 2-D. */ +/* */ +void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres) { + dwt_decode_tile(tilec, numres, &dwt_decode_1); +} + + +/* */ +/* Get gain of 5-3 wavelet transform. */ +/* */ +int dwt_getgain(int orient) { + if (orient == 0) + return 0; + if (orient == 1 || orient == 2) + return 1; + return 2; +} + +/* */ +/* Get norm of 5-3 wavelet. */ +/* */ +double dwt_getnorm(int level, int orient) { + return dwt_norms[orient][level]; +} + +/* */ +/* Forward 9-7 wavelet transform in 2-D. */ +/* */ + +void dwt_encode_real(opj_tcd_tilecomp_t * tilec) { + int i, j, k; + int *a = NULL; + int *aj = NULL; + int *bj = NULL; + int w, l; + + w = tilec->x1-tilec->x0; + l = tilec->numresolutions-1; + a = tilec->data; + + for (i = 0; i < l; i++) { + int rw; /* width of the resolution level computed */ + int rh; /* height of the resolution level computed */ + int rw1; /* width of the resolution level once lower than computed one */ + int rh1; /* height of the resolution level once lower than computed one */ + int cas_col; /* 0 = non inversion on horizontal filtering 1 = inversion between low-pass and high-pass filtering */ + int cas_row; /* 0 = non inversion on vertical filtering 1 = inversion between low-pass and high-pass filtering */ + int dn, sn; + + rw = tilec->resolutions[l - i].x1 - tilec->resolutions[l - i].x0; + rh = tilec->resolutions[l - i].y1 - tilec->resolutions[l - i].y0; + rw1= tilec->resolutions[l - i - 1].x1 - tilec->resolutions[l - i - 1].x0; + rh1= tilec->resolutions[l - i - 1].y1 - tilec->resolutions[l - i - 1].y0; + + cas_row = tilec->resolutions[l - i].x0 % 2; + cas_col = tilec->resolutions[l - i].y0 % 2; + + sn = rh1; + dn = rh - rh1; + bj = (int*)opj_malloc(rh * sizeof(int)); + for (j = 0; j < rw; j++) { + aj = a + j; + for (k = 0; k < rh; k++) bj[k] = aj[k*w]; + dwt_encode_1_real(bj, dn, sn, cas_col); + dwt_deinterleave_v(bj, aj, dn, sn, w, cas_col); + } + opj_free(bj); + + sn = rw1; + dn = rw - rw1; + bj = (int*)opj_malloc(rw * sizeof(int)); + for (j = 0; j < rh; j++) { + aj = a + j * w; + for (k = 0; k < rw; k++) bj[k] = aj[k]; + dwt_encode_1_real(bj, dn, sn, cas_row); + dwt_deinterleave_h(bj, aj, dn, sn, cas_row); + } + opj_free(bj); + } +} + + +/* */ +/* Get gain of 9-7 wavelet transform. */ +/* */ +int dwt_getgain_real(int orient) { + (void)orient; + return 0; +} + +/* */ +/* Get norm of 9-7 wavelet. */ +/* */ +double dwt_getnorm_real(int level, int orient) { + return dwt_norms_real[orient][level]; +} + +void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec) { + int numbands, bandno; + numbands = 3 * tccp->numresolutions - 2; + for (bandno = 0; bandno < numbands; bandno++) { + double stepsize; + int resno, level, orient, gain; + + resno = (bandno == 0) ? 0 : ((bandno - 1) / 3 + 1); + orient = (bandno == 0) ? 0 : ((bandno - 1) % 3 + 1); + level = tccp->numresolutions - 1 - resno; + gain = (tccp->qmfbid == 0) ? 0 : ((orient == 0) ? 0 : (((orient == 1) || (orient == 2)) ? 1 : 2)); + if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { + stepsize = 1.0; + } else { + double norm = dwt_norms_real[orient][level]; + stepsize = (1 << (gain)) / norm; + } + dwt_encode_stepsize((int) floor(stepsize * 8192.0), prec + gain, &tccp->stepsizes[bandno]); + } +} + + +/* */ +/* Determine maximum computed resolution level for inverse wavelet transform */ +/* */ +static int dwt_decode_max_resolution(opj_tcd_resolution_t* restrict r, int i) { + int mr = 1; + int w; + while( --i ) { + r++; + if( mr < ( w = r->x1 - r->x0 ) ) + mr = w ; + if( mr < ( w = r->y1 - r->y0 ) ) + mr = w ; + } + return mr ; +} + + +/* */ +/* Inverse wavelet transform in 2-D. */ +/* */ +static void dwt_decode_tile(opj_tcd_tilecomp_t* tilec, int numres, DWT1DFN dwt_1D) { + dwt_t h; + dwt_t v; + + opj_tcd_resolution_t* tr = tilec->resolutions; + + int rw = tr->x1 - tr->x0; /* width of the resolution level computed */ + int rh = tr->y1 - tr->y0; /* height of the resolution level computed */ + + int w = tilec->x1 - tilec->x0; + + h.mem = opj_aligned_malloc(dwt_decode_max_resolution(tr, numres) * sizeof(int)); + v.mem = h.mem; + + while( --numres) { + int * restrict tiledp = tilec->data; + int j; + + ++tr; + h.sn = rw; + v.sn = rh; + + rw = tr->x1 - tr->x0; + rh = tr->y1 - tr->y0; + + h.dn = rw - h.sn; + h.cas = tr->x0 % 2; + + for(j = 0; j < rh; ++j) { + dwt_interleave_h(&h, &tiledp[j*w]); + (dwt_1D)(&h); + memcpy(&tiledp[j*w], h.mem, rw * sizeof(int)); + } + + v.dn = rh - v.sn; + v.cas = tr->y0 % 2; + + for(j = 0; j < rw; ++j){ + int k; + dwt_interleave_v(&v, &tiledp[j], w); + (dwt_1D)(&v); + for(k = 0; k < rh; ++k) { + tiledp[k * w + j] = v.mem[k]; + } + } + } + opj_aligned_free(h.mem); +} + +static void v4dwt_interleave_h(v4dwt_t* restrict w, float* restrict a, int x, int size){ + float* restrict bi = (float*) (w->wavelet + w->cas); + int count = w->sn; + int i, k; + for(k = 0; k < 2; ++k){ + for(i = 0; i < count; ++i){ + int j = i; + bi[i*8 ] = a[j]; + j += x; + if(j > size) continue; + bi[i*8 + 1] = a[j]; + j += x; + if(j > size) continue; + bi[i*8 + 2] = a[j]; + j += x; + if(j > size) continue; + bi[i*8 + 3] = a[j]; + } + bi = (float*) (w->wavelet + 1 - w->cas); + a += w->sn; + size -= w->sn; + count = w->dn; + } +} + +static void v4dwt_interleave_v(v4dwt_t* restrict v , float* restrict a , int x){ + v4* restrict bi = v->wavelet + v->cas; + int i; + for(i = 0; i < v->sn; ++i){ + memcpy(&bi[i*2], &a[i*x], 4 * sizeof(float)); + } + a += v->sn * x; + bi = v->wavelet + 1 - v->cas; + for(i = 0; i < v->dn; ++i){ + memcpy(&bi[i*2], &a[i*x], 4 * sizeof(float)); + } +} + +#ifdef __SSE__ + +static void v4dwt_decode_step1_sse(v4* w, int count, const __m128 c){ + __m128* restrict vw = (__m128*) w; + int i; + for(i = 0; i < count; ++i){ + __m128 tmp = vw[i*2]; + vw[i*2] = tmp * c; + } +} + +static void v4dwt_decode_step2_sse(v4* l, v4* w, int k, int m, __m128 c){ + __m128* restrict vl = (__m128*) l; + __m128* restrict vw = (__m128*) w; + int i; + for(i = 0; i < m; ++i){ + __m128 tmp1 = vl[ 0]; + __m128 tmp2 = vw[-1]; + __m128 tmp3 = vw[ 0]; + vw[-1] = tmp2 + ((tmp1 + tmp3) * c); + vl = vw; + vw += 2; + } + if(m >= k){ + return; + } + c += c; + c *= vl[0]; + for(; m < k; ++m){ + __m128 tmp = vw[-1]; + vw[-1] = tmp + c; + vw += 2; + } +} + +#else + +static void v4dwt_decode_step1(v4* w, int count, const float c){ + float* restrict fw = (float*) w; + int i; + for(i = 0; i < count; ++i){ + float tmp1 = fw[i*8 ]; + float tmp2 = fw[i*8 + 1]; + float tmp3 = fw[i*8 + 2]; + float tmp4 = fw[i*8 + 3]; + fw[i*8 ] = tmp1 * c; + fw[i*8 + 1] = tmp2 * c; + fw[i*8 + 2] = tmp3 * c; + fw[i*8 + 3] = tmp4 * c; + } +} + +static void v4dwt_decode_step2(v4* l, v4* w, int k, int m, float c){ + float* restrict fl = (float*) l; + float* restrict fw = (float*) w; + int i; + for(i = 0; i < m; ++i){ + float tmp1_1 = fl[0]; + float tmp1_2 = fl[1]; + float tmp1_3 = fl[2]; + float tmp1_4 = fl[3]; + float tmp2_1 = fw[-4]; + float tmp2_2 = fw[-3]; + float tmp2_3 = fw[-2]; + float tmp2_4 = fw[-1]; + float tmp3_1 = fw[0]; + float tmp3_2 = fw[1]; + float tmp3_3 = fw[2]; + float tmp3_4 = fw[3]; + fw[-4] = tmp2_1 + ((tmp1_1 + tmp3_1) * c); + fw[-3] = tmp2_2 + ((tmp1_2 + tmp3_2) * c); + fw[-2] = tmp2_3 + ((tmp1_3 + tmp3_3) * c); + fw[-1] = tmp2_4 + ((tmp1_4 + tmp3_4) * c); + fl = fw; + fw += 8; + } + if(m < k){ + float c1; + float c2; + float c3; + float c4; + c += c; + c1 = fl[0] * c; + c2 = fl[1] * c; + c3 = fl[2] * c; + c4 = fl[3] * c; + for(; m < k; ++m){ + float tmp1 = fw[-4]; + float tmp2 = fw[-3]; + float tmp3 = fw[-2]; + float tmp4 = fw[-1]; + fw[-4] = tmp1 + c1; + fw[-3] = tmp2 + c2; + fw[-2] = tmp3 + c3; + fw[-1] = tmp4 + c4; + fw += 8; + } + } +} + +#endif + +/* */ +/* Inverse 9-7 wavelet transform in 1-D. */ +/* */ +static void v4dwt_decode(v4dwt_t* restrict dwt){ + int a, b; + if(dwt->cas == 0) { + if(!((dwt->dn > 0) || (dwt->sn > 1))){ + return; + } + a = 0; + b = 1; + }else{ + if(!((dwt->sn > 0) || (dwt->dn > 1))) { + return; + } + a = 1; + b = 0; + } +#ifdef __SSE__ + v4dwt_decode_step1_sse(dwt->wavelet+a, dwt->sn, _mm_set1_ps(K)); + v4dwt_decode_step1_sse(dwt->wavelet+b, dwt->dn, _mm_set1_ps(c13318)); + v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(dwt_delta)); + v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(dwt_gamma)); + v4dwt_decode_step2_sse(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), _mm_set1_ps(dwt_beta)); + v4dwt_decode_step2_sse(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), _mm_set1_ps(dwt_alpha)); +#else + v4dwt_decode_step1(dwt->wavelet+a, dwt->sn, K); + v4dwt_decode_step1(dwt->wavelet+b, dwt->dn, c13318); + v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), dwt_delta); + v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), dwt_gamma); + v4dwt_decode_step2(dwt->wavelet+b, dwt->wavelet+a+1, dwt->sn, int_min(dwt->sn, dwt->dn-a), dwt_beta); + v4dwt_decode_step2(dwt->wavelet+a, dwt->wavelet+b+1, dwt->dn, int_min(dwt->dn, dwt->sn-b), dwt_alpha); +#endif +} + +/* */ +/* Inverse 9-7 wavelet transform in 2-D. */ +/* */ +void dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, int numres){ + v4dwt_t h; + v4dwt_t v; + + opj_tcd_resolution_t* res = tilec->resolutions; + + int rw = res->x1 - res->x0; /* width of the resolution level computed */ + int rh = res->y1 - res->y0; /* height of the resolution level computed */ + + int w = tilec->x1 - tilec->x0; + + h.wavelet = (v4*) opj_aligned_malloc((dwt_decode_max_resolution(res, numres)+5) * sizeof(v4)); + v.wavelet = h.wavelet; + + while( --numres) { + float * restrict aj = (float*) tilec->data; + int bufsize = (tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0); + int j; + + h.sn = rw; + v.sn = rh; + + ++res; + + rw = res->x1 - res->x0; /* width of the resolution level computed */ + rh = res->y1 - res->y0; /* height of the resolution level computed */ + + h.dn = rw - h.sn; + h.cas = res->x0 % 2; + + for(j = rh; j > 0; j -= 4){ + v4dwt_interleave_h(&h, aj, w, bufsize); + v4dwt_decode(&h); + if(j >= 4){ + int k; + for(k = rw; --k >= 0;){ + aj[k ] = h.wavelet[k].f[0]; + aj[k+w ] = h.wavelet[k].f[1]; + aj[k+w*2] = h.wavelet[k].f[2]; + aj[k+w*3] = h.wavelet[k].f[3]; + } + }else{ + int k; + for(k = rw; --k >= 0;){ + switch(j) { + case 3: aj[k+w*2] = h.wavelet[k].f[2]; + case 2: aj[k+w ] = h.wavelet[k].f[1]; + case 1: aj[k ] = h.wavelet[k].f[0]; + } + } + } + aj += w*4; + bufsize -= w*4; + } + + v.dn = rh - v.sn; + v.cas = res->y0 % 2; + + aj = (float*) tilec->data; + for(j = rw; j > 0; j -= 4){ + v4dwt_interleave_v(&v, aj, w); + v4dwt_decode(&v); + if(j >= 4){ + int k; + for(k = 0; k < rh; ++k){ + memcpy(&aj[k*w], &v.wavelet[k], 4 * sizeof(float)); + } + }else{ + int k; + for(k = 0; k < rh; ++k){ + memcpy(&aj[k*w], &v.wavelet[k], j * sizeof(float)); + } + } + aj += 4; + } + } + + opj_aligned_free(h.wavelet); +} + diff --git a/extern/libopenjpeg/dwt.h b/extern/libopenjpeg/dwt.h new file mode 100644 index 00000000000..adf73e54400 --- /dev/null +++ b/extern/libopenjpeg/dwt.h @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __DWT_H +#define __DWT_H +/** +@file dwt.h +@brief Implementation of a discrete wavelet transform (DWT) + +The functions in DWT.C have for goal to realize forward and inverse discret wavelet +transform with filter 5-3 (reversible) and filter 9-7 (irreversible). The functions in +DWT.C are used by some function in TCD.C. +*/ + +/** @defgroup DWT DWT - Implementation of a discrete wavelet transform */ +/*@{*/ + + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Forward 5-3 wavelet tranform in 2-D. +Apply a reversible DWT transform to a component of an image. +@param tilec Tile component information (current tile) +*/ +void dwt_encode(opj_tcd_tilecomp_t * tilec); +/** +Inverse 5-3 wavelet tranform in 2-D. +Apply a reversible inverse DWT transform to a component of an image. +@param tilec Tile component information (current tile) +@param numres Number of resolution levels to decode +*/ +void dwt_decode(opj_tcd_tilecomp_t* tilec, int numres); +/** +Get the gain of a subband for the reversible 5-3 DWT. +@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) +@return Returns 0 if orient = 0, returns 1 if orient = 1 or 2, returns 2 otherwise +*/ +int dwt_getgain(int orient); +/** +Get the norm of a wavelet function of a subband at a specified level for the reversible 5-3 DWT. +@param level Level of the wavelet function +@param orient Band of the wavelet function +@return Returns the norm of the wavelet function +*/ +double dwt_getnorm(int level, int orient); +/** +Forward 9-7 wavelet transform in 2-D. +Apply an irreversible DWT transform to a component of an image. +@param tilec Tile component information (current tile) +*/ +void dwt_encode_real(opj_tcd_tilecomp_t * tilec); +/** +Inverse 9-7 wavelet transform in 2-D. +Apply an irreversible inverse DWT transform to a component of an image. +@param tilec Tile component information (current tile) +@param numres Number of resolution levels to decode +*/ +void dwt_decode_real(opj_tcd_tilecomp_t* tilec, int numres); +/** +Get the gain of a subband for the irreversible 9-7 DWT. +@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH) +@return Returns the gain of the 9-7 wavelet transform +*/ +int dwt_getgain_real(int orient); +/** +Get the norm of a wavelet function of a subband at a specified level for the irreversible 9-7 DWT +@param level Level of the wavelet function +@param orient Band of the wavelet function +@return Returns the norm of the 9-7 wavelet +*/ +double dwt_getnorm_real(int level, int orient); +/** +Explicit calculation of the Quantization Stepsizes +@param tccp Tile-component coding parameters +@param prec Precint analyzed +*/ +void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __DWT_H */ diff --git a/extern/libopenjpeg/event.c b/extern/libopenjpeg/event.c new file mode 100644 index 00000000000..291ff585811 --- /dev/null +++ b/extern/libopenjpeg/event.c @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* ========================================================== + Utility functions + ==========================================================*/ + +#if !defined(_MSC_VER) && !defined(__MINGW32__) +static char* +i2a(unsigned i, char *a, unsigned r) { + if (i/r > 0) a = i2a(i/r,a,r); + *a = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i%r]; + return a+1; +} + +/** + Transforms integer i into an ascii string and stores the result in a; + string is encoded in the base indicated by r. + @param i Number to be converted + @param a String result + @param r Base of value; must be in the range 2 - 36 + @return Returns a +*/ +static char * +_itoa(int i, char *a, int r) { + r = ((r < 2) || (r > 36)) ? 10 : r; + if(i < 0) { + *a = '-'; + *i2a(-i, a+1, r) = 0; + } + else *i2a(i, a, r) = 0; + return a; +} + +#endif /* !WIN32 */ + +/* ----------------------------------------------------------------------- */ + +opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context) { + if(cinfo) { + opj_event_mgr_t *previous = cinfo->event_mgr; + cinfo->event_mgr = event_mgr; + cinfo->client_data = context; + return previous; + } + + return NULL; +} + +bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) { +#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */ + opj_msg_callback msg_handler = NULL; + + opj_event_mgr_t *event_mgr = cinfo->event_mgr; + if(event_mgr != NULL) { + switch(event_type) { + case EVT_ERROR: + msg_handler = event_mgr->error_handler; + break; + case EVT_WARNING: + msg_handler = event_mgr->warning_handler; + break; + case EVT_INFO: + msg_handler = event_mgr->info_handler; + break; + default: + break; + } + if(msg_handler == NULL) { + return false; + } + } else { + return false; + } + + if ((fmt != NULL) && (event_mgr != NULL)) { + va_list arg; + int str_length/*, i, j*/; /* UniPG */ + char message[MSG_SIZE]; + memset(message, 0, MSG_SIZE); + /* initialize the optional parameter list */ + va_start(arg, fmt); + /* check the length of the format string */ + str_length = (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt); + /* parse the format string and put the result in 'message' */ + vsprintf(message, fmt, arg); /* UniPG */ + /* deinitialize the optional parameter list */ + va_end(arg); + + /* output the message to the user program */ + msg_handler(message, cinfo->client_data); + } + + return true; +} + diff --git a/extern/libopenjpeg/event.h b/extern/libopenjpeg/event.h new file mode 100644 index 00000000000..11910b0e4bc --- /dev/null +++ b/extern/libopenjpeg/event.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __EVENT_H +#define __EVENT_H +/** +@file event.h +@brief Implementation of a event callback system + +The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user. +*/ + +#define EVT_ERROR 1 /**< Error event type */ +#define EVT_WARNING 2 /**< Warning event type */ +#define EVT_INFO 4 /**< Debug event type */ + +/** @defgroup EVENT EVENT - Implementation of a event callback system */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Write formatted data to a string and send the string to a user callback. +@param cinfo Codec context info +@param event_type Event type or callback to use to send the message +@param fmt Format-control string (plus optionnal arguments) +@return Returns true if successful, returns false otherwise +*/ +bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __EVENT_H */ diff --git a/extern/libopenjpeg/fix.h b/extern/libopenjpeg/fix.h new file mode 100644 index 00000000000..bcb2acb54c8 --- /dev/null +++ b/extern/libopenjpeg/fix.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __FIX_H +#define __FIX_H + +#if defined(_MSC_VER) || defined(__BORLANDC__) +#define int64 __int64 +#else +#define int64 long long +#endif + +/** +@file fix.h +@brief Implementation of operations of specific multiplication (FIX) + +The functions in FIX.H have for goal to realize specific multiplication. +*/ + +/** @defgroup FIX FIX - Implementation of operations of specific multiplication */ +/*@{*/ + +/** +Multiply two fixed-precision rational numbers. +@param a +@param b +@return Returns a * b +*/ +static INLINE int fix_mul(int a, int b) { + int64 temp = (int64) a * (int64) b ; + temp += temp & 4096; + return (int) (temp >> 13) ; +} + +/*@}*/ + +#endif /* __FIX_H */ diff --git a/extern/libopenjpeg/image.c b/extern/libopenjpeg/image.c new file mode 100644 index 00000000000..ea8e59ea547 --- /dev/null +++ b/extern/libopenjpeg/image.c @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +opj_image_t* opj_image_create0(void) { + opj_image_t *image = (opj_image_t*)opj_malloc(sizeof(opj_image_t)); + return image; +} + +opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc) { + int compno; + opj_image_t *image = NULL; + + image = (opj_image_t*) opj_calloc(1, sizeof(opj_image_t)); + if(image) { + image->color_space = clrspc; + image->numcomps = numcmpts; + /* allocate memory for the per-component information */ + image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t)); + if(!image->comps) { + fprintf(stderr,"Unable to allocate memory for image.\n"); + opj_image_destroy(image); + return NULL; + } + /* create the individual image components */ + for(compno = 0; compno < numcmpts; compno++) { + opj_image_comp_t *comp = &image->comps[compno]; + comp->dx = cmptparms[compno].dx; + comp->dy = cmptparms[compno].dy; + comp->w = cmptparms[compno].w; + comp->h = cmptparms[compno].h; + comp->x0 = cmptparms[compno].x0; + comp->y0 = cmptparms[compno].y0; + comp->prec = cmptparms[compno].prec; + comp->bpp = cmptparms[compno].bpp; + comp->sgnd = cmptparms[compno].sgnd; + comp->data = (int*) opj_calloc(comp->w * comp->h, sizeof(int)); + if(!comp->data) { + fprintf(stderr,"Unable to allocate memory for image.\n"); + opj_image_destroy(image); + return NULL; + } + } + } + + return image; +} + +void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) { + int i; + if(image) { + if(image->comps) { + /* image components */ + for(i = 0; i < image->numcomps; i++) { + opj_image_comp_t *image_comp = &image->comps[i]; + if(image_comp->data) { + opj_free(image_comp->data); + } + } + opj_free(image->comps); + } + opj_free(image); + } +} + diff --git a/extern/libopenjpeg/image.h b/extern/libopenjpeg/image.h new file mode 100644 index 00000000000..04c362eb834 --- /dev/null +++ b/extern/libopenjpeg/image.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __IMAGE_H +#define __IMAGE_H +/** +@file image.h +@brief Implementation of operations on images (IMAGE) + +The functions in IMAGE.C have for goal to realize operations on images. +*/ + +/** @defgroup IMAGE IMAGE - Implementation of operations on images */ +/*@{*/ + +/** +Create an empty image +@todo this function should be removed +@return returns an empty image if successful, returns NULL otherwise +*/ +opj_image_t* opj_image_create0(void); + +/*@}*/ + +#endif /* __IMAGE_H */ + diff --git a/extern/libopenjpeg/int.h b/extern/libopenjpeg/int.h new file mode 100644 index 00000000000..4e5fe08eb76 --- /dev/null +++ b/extern/libopenjpeg/int.h @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __INT_H +#define __INT_H +/** +@file int.h +@brief Implementation of operations on integers (INT) + +The functions in INT.H have for goal to realize operations on integers. +*/ + +/** @defgroup INT INT - Implementation of operations on integers */ +/*@{*/ + +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Get the minimum of two integers +@return Returns a if a < b else b +*/ +static INLINE int int_min(int a, int b) { + return a < b ? a : b; +} +/** +Get the maximum of two integers +@return Returns a if a > b else b +*/ +static INLINE int int_max(int a, int b) { + return (a > b) ? a : b; +} +/** +Clamp an integer inside an interval +@return +
    +
  • Returns a if (min < a < max) +
  • Returns max if (a > max) +
  • Returns min if (a < min) +
+*/ +static INLINE int int_clamp(int a, int min, int max) { + if (a < min) + return min; + if (a > max) + return max; + return a; +} +/** +@return Get absolute value of integer +*/ +static INLINE int int_abs(int a) { + return a < 0 ? -a : a; +} +/** +Divide an integer and round upwards +@return Returns a divided by b +*/ +static INLINE int int_ceildiv(int a, int b) { + return (a + b - 1) / b; +} +/** +Divide an integer by a power of 2 and round upwards +@return Returns a divided by 2^b +*/ +static INLINE int int_ceildivpow2(int a, int b) { + return (a + (1 << b) - 1) >> b; +} +/** +Divide an integer by a power of 2 and round downwards +@return Returns a divided by 2^b +*/ +static INLINE int int_floordivpow2(int a, int b) { + return a >> b; +} +/** +Get logarithm of an integer and round downwards +@return Returns log2(a) +*/ +static INLINE int int_floorlog2(int a) { + int l; + for (l = 0; a > 1; l++) { + a >>= 1; + } + return l; +} +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif diff --git a/extern/libopenjpeg/j2k.c b/extern/libopenjpeg/j2k.c new file mode 100644 index 00000000000..8e7b1ce081f --- /dev/null +++ b/extern/libopenjpeg/j2k.c @@ -0,0 +1,2498 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +/** +Write the SOC marker (Start Of Codestream) +@param j2k J2K handle +*/ +static void j2k_write_soc(opj_j2k_t *j2k); +/** +Read the SOC marker (Start of Codestream) +@param j2k J2K handle +*/ +static void j2k_read_soc(opj_j2k_t *j2k); +/** +Write the SIZ marker (image and tile size) +@param j2k J2K handle +*/ +static void j2k_write_siz(opj_j2k_t *j2k); +/** +Read the SIZ marker (image and tile size) +@param j2k J2K handle +*/ +static void j2k_read_siz(opj_j2k_t *j2k); +/** +Write the COM marker (comment) +@param j2k J2K handle +*/ +static void j2k_write_com(opj_j2k_t *j2k); +/** +Read the COM marker (comment) +@param j2k J2K handle +*/ +static void j2k_read_com(opj_j2k_t *j2k); +/** +Write the value concerning the specified component in the marker COD and COC +@param j2k J2K handle +@param compno Number of the component concerned by the information written +*/ +static void j2k_write_cox(opj_j2k_t *j2k, int compno); +/** +Read the value concerning the specified component in the marker COD and COC +@param j2k J2K handle +@param compno Number of the component concerned by the information read +*/ +static void j2k_read_cox(opj_j2k_t *j2k, int compno); +/** +Write the COD marker (coding style default) +@param j2k J2K handle +*/ +static void j2k_write_cod(opj_j2k_t *j2k); +/** +Read the COD marker (coding style default) +@param j2k J2K handle +*/ +static void j2k_read_cod(opj_j2k_t *j2k); +/** +Write the COC marker (coding style component) +@param j2k J2K handle +@param compno Number of the component concerned by the information written +*/ +static void j2k_write_coc(opj_j2k_t *j2k, int compno); +/** +Read the COC marker (coding style component) +@param j2k J2K handle +*/ +static void j2k_read_coc(opj_j2k_t *j2k); +/** +Write the value concerning the specified component in the marker QCD and QCC +@param j2k J2K handle +@param compno Number of the component concerned by the information written +*/ +static void j2k_write_qcx(opj_j2k_t *j2k, int compno); +/** +Read the value concerning the specified component in the marker QCD and QCC +@param j2k J2K handle +@param compno Number of the component concern by the information read +@param len Length of the information in the QCX part of the marker QCD/QCC +*/ +static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len); +/** +Write the QCD marker (quantization default) +@param j2k J2K handle +*/ +static void j2k_write_qcd(opj_j2k_t *j2k); +/** +Read the QCD marker (quantization default) +@param j2k J2K handle +*/ +static void j2k_read_qcd(opj_j2k_t *j2k); +/** +Write the QCC marker (quantization component) +@param j2k J2K handle +@param compno Number of the component concerned by the information written +*/ +static void j2k_write_qcc(opj_j2k_t *j2k, int compno); +/** +Read the QCC marker (quantization component) +@param j2k J2K handle +*/ +static void j2k_read_qcc(opj_j2k_t *j2k); +/** +Write the POC marker (progression order change) +@param j2k J2K handle +*/ +static void j2k_write_poc(opj_j2k_t *j2k); +/** +Read the POC marker (progression order change) +@param j2k J2K handle +*/ +static void j2k_read_poc(opj_j2k_t *j2k); +/** +Read the CRG marker (component registration) +@param j2k J2K handle +*/ +static void j2k_read_crg(opj_j2k_t *j2k); +/** +Read the TLM marker (tile-part lengths) +@param j2k J2K handle +*/ +static void j2k_read_tlm(opj_j2k_t *j2k); +/** +Read the PLM marker (packet length, main header) +@param j2k J2K handle +*/ +static void j2k_read_plm(opj_j2k_t *j2k); +/** +Read the PLT marker (packet length, tile-part header) +@param j2k J2K handle +*/ +static void j2k_read_plt(opj_j2k_t *j2k); +/** +Read the PPM marker (packet packet headers, main header) +@param j2k J2K handle +*/ +static void j2k_read_ppm(opj_j2k_t *j2k); +/** +Read the PPT marker (packet packet headers, tile-part header) +@param j2k J2K handle +*/ +static void j2k_read_ppt(opj_j2k_t *j2k); +/** +Write the TLM marker (Mainheader) +@param j2k J2K handle +*/ +static void j2k_write_tlm(opj_j2k_t *j2k); +/** +Write the SOT marker (start of tile-part) +@param j2k J2K handle +*/ +static void j2k_write_sot(opj_j2k_t *j2k); +/** +Read the SOT marker (start of tile-part) +@param j2k J2K handle +*/ +static void j2k_read_sot(opj_j2k_t *j2k); +/** +Write the SOD marker (start of data) +@param j2k J2K handle +@param tile_coder Pointer to a TCD handle +*/ +static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder); +/** +Read the SOD marker (start of data) +@param j2k J2K handle +*/ +static void j2k_read_sod(opj_j2k_t *j2k); +/** +Write the RGN marker (region-of-interest) +@param j2k J2K handle +@param compno Number of the component concerned by the information written +@param tileno Number of the tile concerned by the information written +*/ +static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno); +/** +Read the RGN marker (region-of-interest) +@param j2k J2K handle +*/ +static void j2k_read_rgn(opj_j2k_t *j2k); +/** +Write the EOC marker (end of codestream) +@param j2k J2K handle +*/ +static void j2k_write_eoc(opj_j2k_t *j2k); +/** +Read the EOC marker (end of codestream) +@param j2k J2K handle +*/ +static void j2k_read_eoc(opj_j2k_t *j2k); +/** +Read an unknown marker +@param j2k J2K handle +*/ +static void j2k_read_unk(opj_j2k_t *j2k); + +/*@}*/ + +/*@}*/ + +/* ----------------------------------------------------------------------- */ +typedef struct j2k_prog_order{ + OPJ_PROG_ORDER enum_prog; + char str_prog[4]; +}j2k_prog_order_t; + +j2k_prog_order_t j2k_prog_order_list[] = { + {CPRL, "CPRL"}, + {LRCP, "LRCP"}, + {PCRL, "PCRL"}, + {RLCP, "RLCP"}, + {RPCL, "RPCL"}, + {-1, ""} +}; + +char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order){ + j2k_prog_order_t *po; + for(po = j2k_prog_order_list; po->enum_prog != -1; po++ ){ + if(po->enum_prog == prg_order){ + break; + } + } + return po->str_prog; +} + +void j2k_dump_image(FILE *fd, opj_image_t * img) { + int compno; + fprintf(fd, "image {\n"); + fprintf(fd, " x0=%d, y0=%d, x1=%d, y1=%d\n", img->x0, img->y0, img->x1, img->y1); + fprintf(fd, " numcomps=%d\n", img->numcomps); + for (compno = 0; compno < img->numcomps; compno++) { + opj_image_comp_t *comp = &img->comps[compno]; + fprintf(fd, " comp %d {\n", compno); + fprintf(fd, " dx=%d, dy=%d\n", comp->dx, comp->dy); + fprintf(fd, " prec=%d\n", comp->prec); + fprintf(fd, " sgnd=%d\n", comp->sgnd); + fprintf(fd, " }\n"); + } + fprintf(fd, "}\n"); +} + +void j2k_dump_cp(FILE *fd, opj_image_t * img, opj_cp_t * cp) { + int tileno, compno, layno, bandno, resno, numbands; + fprintf(fd, "coding parameters {\n"); + fprintf(fd, " tx0=%d, ty0=%d\n", cp->tx0, cp->ty0); + fprintf(fd, " tdx=%d, tdy=%d\n", cp->tdx, cp->tdy); + fprintf(fd, " tw=%d, th=%d\n", cp->tw, cp->th); + for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { + opj_tcp_t *tcp = &cp->tcps[tileno]; + fprintf(fd, " tile %d {\n", tileno); + fprintf(fd, " csty=%x\n", tcp->csty); + fprintf(fd, " prg=%d\n", tcp->prg); + fprintf(fd, " numlayers=%d\n", tcp->numlayers); + fprintf(fd, " mct=%d\n", tcp->mct); + fprintf(fd, " rates="); + for (layno = 0; layno < tcp->numlayers; layno++) { + fprintf(fd, "%.1f ", tcp->rates[layno]); + } + fprintf(fd, "\n"); + for (compno = 0; compno < img->numcomps; compno++) { + opj_tccp_t *tccp = &tcp->tccps[compno]; + fprintf(fd, " comp %d {\n", compno); + fprintf(fd, " csty=%x\n", tccp->csty); + fprintf(fd, " numresolutions=%d\n", tccp->numresolutions); + fprintf(fd, " cblkw=%d\n", tccp->cblkw); + fprintf(fd, " cblkh=%d\n", tccp->cblkh); + fprintf(fd, " cblksty=%x\n", tccp->cblksty); + fprintf(fd, " qmfbid=%d\n", tccp->qmfbid); + fprintf(fd, " qntsty=%d\n", tccp->qntsty); + fprintf(fd, " numgbits=%d\n", tccp->numgbits); + fprintf(fd, " roishift=%d\n", tccp->roishift); + fprintf(fd, " stepsizes="); + numbands = tccp->qntsty == J2K_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolutions * 3 - 2; + for (bandno = 0; bandno < numbands; bandno++) { + fprintf(fd, "(%d,%d) ", tccp->stepsizes[bandno].mant, + tccp->stepsizes[bandno].expn); + } + fprintf(fd, "\n"); + + if (tccp->csty & J2K_CCP_CSTY_PRT) { + fprintf(fd, " prcw="); + for (resno = 0; resno < tccp->numresolutions; resno++) { + fprintf(fd, "%d ", tccp->prcw[resno]); + } + fprintf(fd, "\n"); + fprintf(fd, " prch="); + for (resno = 0; resno < tccp->numresolutions; resno++) { + fprintf(fd, "%d ", tccp->prch[resno]); + } + fprintf(fd, "\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, "}\n"); +} + +/* ----------------------------------------------------------------------- */ +static int j2k_get_num_tp(opj_cp_t *cp,int pino,int tileno){ + char *prog; + int i; + int tpnum=1,tpend=0; + opj_tcp_t *tcp = &cp->tcps[tileno]; + prog = j2k_convert_progression_order(tcp->prg); + + if(cp->tp_on == 1){ + for(i=0;i<4;i++){ + if(tpend!=1){ + if( cp->tp_flag == prog[i] ){ + tpend=1;cp->tp_pos=i; + } + switch(prog[i]){ + case 'C': + tpnum= tpnum * tcp->pocs[pino].compE; + break; + case 'R': + tpnum= tpnum * tcp->pocs[pino].resE; + break; + case 'P': + tpnum= tpnum * tcp->pocs[pino].prcE; + break; + case 'L': + tpnum= tpnum * tcp->pocs[pino].layE; + break; + } + } + } + }else{ + tpnum=1; + } + return tpnum; +} + +/** mem allocation for TLM marker*/ +int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){ + int pino,tileno,totnum_tp=0; + j2k->cur_totnum_tp = (int *) opj_malloc(cp->tw * cp->th * sizeof(int)); + for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { + int cur_totnum_tp = 0; + opj_tcp_t *tcp = &cp->tcps[tileno]; + for(pino = 0; pino <= tcp->numpocs; pino++) { + int tp_num=0; + opj_pi_iterator_t *pi = pi_initialise_encode(image, cp, tileno,FINAL_PASS); + if(!pi) { return -1;} + tp_num = j2k_get_num_tp(cp,pino,tileno); + totnum_tp = totnum_tp + tp_num; + cur_totnum_tp = cur_totnum_tp + tp_num; + pi_destroy(pi, cp, tileno); + } + j2k->cur_totnum_tp[tileno] = cur_totnum_tp; + /* INDEX >> */ + if (j2k->cstr_info) { + j2k->cstr_info->tile[tileno].num_tps = cur_totnum_tp; + j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(cur_totnum_tp * sizeof(opj_tp_info_t)); + } + /* << INDEX */ + } + return totnum_tp; +} + +static void j2k_write_soc(opj_j2k_t *j2k) { + opj_cio_t *cio = j2k->cio; + cio_write(cio, J2K_MS_SOC, 2); + +/* UniPG>> */ +#ifdef USE_JPWL + + /* update markers struct */ + j2k_add_marker(j2k->cstr_info, J2K_MS_SOC, cio_tell(cio) - 2, 2); + +#endif /* USE_JPWL */ +/* <state = J2K_STATE_MHSIZ; + /* Index */ + if (j2k->cstr_info) { + j2k->cstr_info->main_head_start = cio_tell(j2k->cio) - 2; + j2k->cstr_info->codestream_size = cio_numbytesleft(j2k->cio) + 2 - j2k->cstr_info->main_head_start; + } +} + +static void j2k_write_siz(opj_j2k_t *j2k) { + int i; + int lenp, len; + + opj_cio_t *cio = j2k->cio; + opj_image_t *image = j2k->image; + opj_cp_t *cp = j2k->cp; + + cio_write(cio, J2K_MS_SIZ, 2); /* SIZ */ + lenp = cio_tell(cio); + cio_skip(cio, 2); + cio_write(cio, cp->rsiz, 2); /* Rsiz (capabilities) */ + cio_write(cio, image->x1, 4); /* Xsiz */ + cio_write(cio, image->y1, 4); /* Ysiz */ + cio_write(cio, image->x0, 4); /* X0siz */ + cio_write(cio, image->y0, 4); /* Y0siz */ + cio_write(cio, cp->tdx, 4); /* XTsiz */ + cio_write(cio, cp->tdy, 4); /* YTsiz */ + cio_write(cio, cp->tx0, 4); /* XT0siz */ + cio_write(cio, cp->ty0, 4); /* YT0siz */ + cio_write(cio, image->numcomps, 2); /* Csiz */ + for (i = 0; i < image->numcomps; i++) { + cio_write(cio, image->comps[i].prec - 1 + (image->comps[i].sgnd << 7), 1); /* Ssiz_i */ + cio_write(cio, image->comps[i].dx, 1); /* XRsiz_i */ + cio_write(cio, image->comps[i].dy, 1); /* YRsiz_i */ + } + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lsiz */ + cio_seek(cio, lenp + len); +} + +static void j2k_read_siz(opj_j2k_t *j2k) { + int len, i; + + opj_cio_t *cio = j2k->cio; + opj_image_t *image = j2k->image; + opj_cp_t *cp = j2k->cp; + + len = cio_read(cio, 2); /* Lsiz */ + cio_read(cio, 2); /* Rsiz (capabilities) */ + image->x1 = cio_read(cio, 4); /* Xsiz */ + image->y1 = cio_read(cio, 4); /* Ysiz */ + image->x0 = cio_read(cio, 4); /* X0siz */ + image->y0 = cio_read(cio, 4); /* Y0siz */ + cp->tdx = cio_read(cio, 4); /* XTsiz */ + cp->tdy = cio_read(cio, 4); /* YTsiz */ + cp->tx0 = cio_read(cio, 4); /* XT0siz */ + cp->ty0 = cio_read(cio, 4); /* YT0siz */ + + image->numcomps = cio_read(cio, 2); /* Csiz */ + +#ifdef USE_JPWL + if (j2k->cp->correct) { + /* if JPWL is on, we check whether TX errors have damaged + too much the SIZ parameters */ + if (!(image->x1 * image->y1)) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: bad image size (%d x %d)\n", + image->x1, image->y1); + if (!JPWL_ASSUME || JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + } + if (image->numcomps != ((len - 38) / 3)) { + opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, + "JPWL: Csiz is %d => space in SIZ only for %d comps.!!!\n", + image->numcomps, ((len - 38) / 3)); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n"); + if (image->numcomps < ((len - 38) / 3)) { + len = 38 + 3 * image->numcomps; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting Lsiz to %d => HYPOTHESIS!!!\n", + len); + } else { + image->numcomps = ((len - 38) / 3); + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting Csiz to %d => HYPOTHESIS!!!\n", + image->numcomps); + } + } + + /* update components number in the jpwl_exp_comps filed */ + cp->exp_comps = image->numcomps; + } +#endif /* USE_JPWL */ + + image->comps = (opj_image_comp_t*) opj_calloc(image->numcomps, sizeof(opj_image_comp_t)); + for (i = 0; i < image->numcomps; i++) { + int tmp, w, h; + tmp = cio_read(cio, 1); /* Ssiz_i */ + image->comps[i].prec = (tmp & 0x7f) + 1; + image->comps[i].sgnd = tmp >> 7; + image->comps[i].dx = cio_read(cio, 1); /* XRsiz_i */ + image->comps[i].dy = cio_read(cio, 1); /* YRsiz_i */ + +#ifdef USE_JPWL + if (j2k->cp->correct) { + /* if JPWL is on, we check whether TX errors have damaged + too much the SIZ parameters, again */ + if (!(image->comps[i].dx * image->comps[i].dy)) { + opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, + "JPWL: bad XRsiz_%d/YRsiz_%d (%d x %d)\n", + i, i, image->comps[i].dx, image->comps[i].dy); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n"); + if (!image->comps[i].dx) { + image->comps[i].dx = 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting XRsiz_%d to %d => HYPOTHESIS!!!\n", + i, image->comps[i].dx); + } + if (!image->comps[i].dy) { + image->comps[i].dy = 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting YRsiz_%d to %d => HYPOTHESIS!!!\n", + i, image->comps[i].dy); + } + } + + } +#endif /* USE_JPWL */ + + /* TODO: unused ? */ + w = int_ceildiv(image->x1 - image->x0, image->comps[i].dx); + h = int_ceildiv(image->y1 - image->y0, image->comps[i].dy); + + image->comps[i].resno_decoded = 0; /* number of resolution decoded */ + image->comps[i].factor = cp->reduce; /* reducing factor per component */ + } + + cp->tw = int_ceildiv(image->x1 - cp->tx0, cp->tdx); + cp->th = int_ceildiv(image->y1 - cp->ty0, cp->tdy); + +#ifdef USE_JPWL + if (j2k->cp->correct) { + /* if JPWL is on, we check whether TX errors have damaged + too much the SIZ parameters */ + if ((cp->tw < 1) || (cp->th < 1) || (cp->tw > cp->max_tiles) || (cp->th > cp->max_tiles)) { + opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, + "JPWL: bad number of tiles (%d x %d)\n", + cp->tw, cp->th); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n"); + if (cp->tw < 1) { + cp->tw= 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting %d tiles in x => HYPOTHESIS!!!\n", + cp->tw); + } + if (cp->tw > cp->max_tiles) { + cp->tw= 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- too large x, increase expectance of %d\n" + "- setting %d tiles in x => HYPOTHESIS!!!\n", + cp->max_tiles, cp->tw); + } + if (cp->th < 1) { + cp->th= 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- setting %d tiles in y => HYPOTHESIS!!!\n", + cp->th); + } + if (cp->th > cp->max_tiles) { + cp->th= 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- too large y, increase expectance of %d to continue\n", + "- setting %d tiles in y => HYPOTHESIS!!!\n", + cp->max_tiles, cp->th); + } + } + } +#endif /* USE_JPWL */ + + cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t)); + cp->tileno = (int*) opj_malloc(cp->tw * cp->th * sizeof(int)); + cp->tileno_size = 0; + +#ifdef USE_JPWL + if (j2k->cp->correct) { + if (!cp->tcps) { + opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, + "JPWL: could not alloc tcps field of cp\n"); + if (!JPWL_ASSUME || JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + } + } +#endif /* USE_JPWL */ + + for (i = 0; i < cp->tw * cp->th; i++) { + cp->tcps[i].POC = 0; + cp->tcps[i].numpocs = 0; + cp->tcps[i].first = 1; + } + + /* Initialization for PPM marker */ + cp->ppm = 0; + cp->ppm_data = NULL; + cp->ppm_data_first = NULL; + cp->ppm_previous = 0; + cp->ppm_store = 0; + + j2k->default_tcp->tccps = (opj_tccp_t*) opj_calloc(image->numcomps, sizeof(opj_tccp_t)); + for (i = 0; i < cp->tw * cp->th; i++) { + cp->tcps[i].tccps = (opj_tccp_t*) opj_malloc(image->numcomps * sizeof(opj_tccp_t)); + } + j2k->tile_data = (unsigned char**) opj_calloc(cp->tw * cp->th, sizeof(unsigned char*)); + j2k->tile_len = (int*) opj_calloc(cp->tw * cp->th, sizeof(int)); + j2k->state = J2K_STATE_MH; + + /* Index */ + if (j2k->cstr_info) { + opj_codestream_info_t *cstr_info = j2k->cstr_info; + cstr_info->image_w = image->x1 - image->x0; + cstr_info->image_h = image->y1 - image->y0; + cstr_info->numcomps = image->numcomps; + cstr_info->tw = cp->tw; + cstr_info->th = cp->th; + cstr_info->tile_x = cp->tdx; + cstr_info->tile_y = cp->tdy; + cstr_info->tile_Ox = cp->tx0; + cstr_info->tile_Oy = cp->ty0; + cstr_info->tile = (opj_tile_info_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tile_info_t)); + } +} + +static void j2k_write_com(opj_j2k_t *j2k) { + unsigned int i; + int lenp, len; + + if(j2k->cp->comment) { + opj_cio_t *cio = j2k->cio; + char *comment = j2k->cp->comment; + + cio_write(cio, J2K_MS_COM, 2); + lenp = cio_tell(cio); + cio_skip(cio, 2); + cio_write(cio, 1, 2); /* General use (IS 8859-15:1999 (Latin) values) */ + for (i = 0; i < strlen(comment); i++) { + cio_write(cio, comment[i], 1); + } + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); + cio_seek(cio, lenp + len); + } +} + +static void j2k_read_com(opj_j2k_t *j2k) { + int len; + + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); + cio_skip(cio, len - 2); +} + +static void j2k_write_cox(opj_j2k_t *j2k, int compno) { + int i; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_cio_t *cio = j2k->cio; + + cio_write(cio, tccp->numresolutions - 1, 1); /* SPcox (D) */ + cio_write(cio, tccp->cblkw - 2, 1); /* SPcox (E) */ + cio_write(cio, tccp->cblkh - 2, 1); /* SPcox (F) */ + cio_write(cio, tccp->cblksty, 1); /* SPcox (G) */ + cio_write(cio, tccp->qmfbid, 1); /* SPcox (H) */ + + if (tccp->csty & J2K_CCP_CSTY_PRT) { + for (i = 0; i < tccp->numresolutions; i++) { + cio_write(cio, tccp->prcw[i] + (tccp->prch[i] << 4), 1); /* SPcox (I_i) */ + } + } +} + +static void j2k_read_cox(opj_j2k_t *j2k, int compno) { + int i; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_cio_t *cio = j2k->cio; + + tccp->numresolutions = cio_read(cio, 1) + 1; /* SPcox (D) */ + + // If user wants to remove more resolutions than the codestream contains, return error + if (cp->reduce >= tccp->numresolutions) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "Error decoding component %d.\nThe number of resolutions to remove is higher than the number " + "of resolutions of this component\nModify the cp_reduce parameter.\n\n", compno); + j2k->state |= J2K_STATE_ERR; + } + + tccp->cblkw = cio_read(cio, 1) + 2; /* SPcox (E) */ + tccp->cblkh = cio_read(cio, 1) + 2; /* SPcox (F) */ + tccp->cblksty = cio_read(cio, 1); /* SPcox (G) */ + tccp->qmfbid = cio_read(cio, 1); /* SPcox (H) */ + if (tccp->csty & J2K_CP_CSTY_PRT) { + for (i = 0; i < tccp->numresolutions; i++) { + int tmp = cio_read(cio, 1); /* SPcox (I_i) */ + tccp->prcw[i] = tmp & 0xf; + tccp->prch[i] = tmp >> 4; + } + } + + /* INDEX >> */ + if(j2k->cstr_info && compno == 0) { + for (i = 0; i < tccp->numresolutions; i++) { + if (tccp->csty & J2K_CP_CSTY_PRT) { + j2k->cstr_info->tile[j2k->curtileno].pdx[i] = tccp->prcw[i]; + j2k->cstr_info->tile[j2k->curtileno].pdy[i] = tccp->prch[i]; + } + else { + j2k->cstr_info->tile[j2k->curtileno].pdx[i] = 15; + j2k->cstr_info->tile[j2k->curtileno].pdx[i] = 15; + } + } + } + /* << INDEX */ +} + +static void j2k_write_cod(opj_j2k_t *j2k) { + opj_cp_t *cp = NULL; + opj_tcp_t *tcp = NULL; + int lenp, len; + + opj_cio_t *cio = j2k->cio; + + cio_write(cio, J2K_MS_COD, 2); /* COD */ + + lenp = cio_tell(cio); + cio_skip(cio, 2); + + cp = j2k->cp; + tcp = &cp->tcps[j2k->curtileno]; + + cio_write(cio, tcp->csty, 1); /* Scod */ + cio_write(cio, tcp->prg, 1); /* SGcod (A) */ + cio_write(cio, tcp->numlayers, 2); /* SGcod (B) */ + cio_write(cio, tcp->mct, 1); /* SGcod (C) */ + + j2k_write_cox(j2k, 0); + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lcod */ + cio_seek(cio, lenp + len); +} + +static void j2k_read_cod(opj_j2k_t *j2k) { + int len, i, pos; + + opj_cio_t *cio = j2k->cio; + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_image_t *image = j2k->image; + + len = cio_read(cio, 2); /* Lcod */ + tcp->csty = cio_read(cio, 1); /* Scod */ + tcp->prg = (OPJ_PROG_ORDER)cio_read(cio, 1); /* SGcod (A) */ + tcp->numlayers = cio_read(cio, 2); /* SGcod (B) */ + tcp->mct = cio_read(cio, 1); /* SGcod (C) */ + + pos = cio_tell(cio); + for (i = 0; i < image->numcomps; i++) { + tcp->tccps[i].csty = tcp->csty & J2K_CP_CSTY_PRT; + cio_seek(cio, pos); + j2k_read_cox(j2k, i); + } + + /* Index */ + if (j2k->cstr_info) { + opj_codestream_info_t *cstr_info = j2k->cstr_info; + cstr_info->prog = tcp->prg; + cstr_info->numlayers = tcp->numlayers; + cstr_info->numdecompos = (int*) opj_malloc(image->numcomps * sizeof(int)); + for (i = 0; i < image->numcomps; i++) { + cstr_info->numdecompos[i] = tcp->tccps[i].numresolutions - 1; + } + } +} + +static void j2k_write_coc(opj_j2k_t *j2k, int compno) { + int lenp, len; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; + opj_image_t *image = j2k->image; + opj_cio_t *cio = j2k->cio; + + cio_write(cio, J2K_MS_COC, 2); /* COC */ + lenp = cio_tell(cio); + cio_skip(cio, 2); + cio_write(cio, compno, image->numcomps <= 256 ? 1 : 2); /* Ccoc */ + cio_write(cio, tcp->tccps[compno].csty, 1); /* Scoc */ + j2k_write_cox(j2k, compno); + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lcoc */ + cio_seek(cio, lenp + len); +} + +static void j2k_read_coc(opj_j2k_t *j2k) { + int len, compno; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_image_t *image = j2k->image; + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); /* Lcoc */ + compno = cio_read(cio, image->numcomps <= 256 ? 1 : 2); /* Ccoc */ + tcp->tccps[compno].csty = cio_read(cio, 1); /* Scoc */ + j2k_read_cox(j2k, compno); +} + +static void j2k_write_qcx(opj_j2k_t *j2k, int compno) { + int bandno, numbands; + int expn, mant; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_cio_t *cio = j2k->cio; + + cio_write(cio, tccp->qntsty + (tccp->numgbits << 5), 1); /* Sqcx */ + numbands = tccp->qntsty == J2K_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolutions * 3 - 2; + + for (bandno = 0; bandno < numbands; bandno++) { + expn = tccp->stepsizes[bandno].expn; + mant = tccp->stepsizes[bandno].mant; + + if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { + cio_write(cio, expn << 3, 1); /* SPqcx_i */ + } else { + cio_write(cio, (expn << 11) + mant, 2); /* SPqcx_i */ + } + } +} + +static void j2k_read_qcx(opj_j2k_t *j2k, int compno, int len) { + int tmp; + int bandno, numbands; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_cio_t *cio = j2k->cio; + + tmp = cio_read(cio, 1); /* Sqcx */ + tccp->qntsty = tmp & 0x1f; + tccp->numgbits = tmp >> 5; + numbands = (tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) ? + 1 : ((tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) ? len - 1 : (len - 1) / 2); + +#ifdef USE_JPWL + if (j2k->cp->correct) { + + /* if JPWL is on, we check whether there are too many subbands */ + if ((numbands < 0) || (numbands >= J2K_MAXBANDS)) { + opj_event_msg(j2k->cinfo, JPWL_ASSUME ? EVT_WARNING : EVT_ERROR, + "JPWL: bad number of subbands in Sqcx (%d)\n", + numbands); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + numbands = 1; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust them\n" + "- setting number of bands to %d => HYPOTHESIS!!!\n", + numbands); + }; + + }; +#endif /* USE_JPWL */ + + for (bandno = 0; bandno < numbands; bandno++) { + int expn, mant; + if (tccp->qntsty == J2K_CCP_QNTSTY_NOQNT) { + expn = cio_read(cio, 1) >> 3; /* SPqcx_i */ + mant = 0; + } else { + tmp = cio_read(cio, 2); /* SPqcx_i */ + expn = tmp >> 11; + mant = tmp & 0x7ff; + } + tccp->stepsizes[bandno].expn = expn; + tccp->stepsizes[bandno].mant = mant; + } + + /* Add Antonin : if scalar_derived -> compute other stepsizes */ + if (tccp->qntsty == J2K_CCP_QNTSTY_SIQNT) { + for (bandno = 1; bandno < J2K_MAXBANDS; bandno++) { + tccp->stepsizes[bandno].expn = + ((tccp->stepsizes[0].expn) - ((bandno - 1) / 3) > 0) ? + (tccp->stepsizes[0].expn) - ((bandno - 1) / 3) : 0; + tccp->stepsizes[bandno].mant = tccp->stepsizes[0].mant; + } + } + /* ddA */ +} + +static void j2k_write_qcd(opj_j2k_t *j2k) { + int lenp, len; + + opj_cio_t *cio = j2k->cio; + + cio_write(cio, J2K_MS_QCD, 2); /* QCD */ + lenp = cio_tell(cio); + cio_skip(cio, 2); + j2k_write_qcx(j2k, 0); + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lqcd */ + cio_seek(cio, lenp + len); +} + +static void j2k_read_qcd(opj_j2k_t *j2k) { + int len, i, pos; + + opj_cio_t *cio = j2k->cio; + opj_image_t *image = j2k->image; + + len = cio_read(cio, 2); /* Lqcd */ + pos = cio_tell(cio); + for (i = 0; i < image->numcomps; i++) { + cio_seek(cio, pos); + j2k_read_qcx(j2k, i, len - 2); + } +} + +static void j2k_write_qcc(opj_j2k_t *j2k, int compno) { + int lenp, len; + + opj_cio_t *cio = j2k->cio; + + cio_write(cio, J2K_MS_QCC, 2); /* QCC */ + lenp = cio_tell(cio); + cio_skip(cio, 2); + cio_write(cio, compno, j2k->image->numcomps <= 256 ? 1 : 2); /* Cqcc */ + j2k_write_qcx(j2k, compno); + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lqcc */ + cio_seek(cio, lenp + len); +} + +static void j2k_read_qcc(opj_j2k_t *j2k) { + int len, compno; + int numcomp = j2k->image->numcomps; + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); /* Lqcc */ + compno = cio_read(cio, numcomp <= 256 ? 1 : 2); /* Cqcc */ + +#ifdef USE_JPWL + if (j2k->cp->correct) { + + static int backup_compno = 0; + + /* compno is negative or larger than the number of components!!! */ + if ((compno < 0) || (compno >= numcomp)) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: bad component number in QCC (%d out of a maximum of %d)\n", + compno, numcomp); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + compno = backup_compno % numcomp; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" + "- setting component number to %d\n", + compno); + } + + /* keep your private count of tiles */ + backup_compno++; + }; +#endif /* USE_JPWL */ + + j2k_read_qcx(j2k, compno, len - 2 - (numcomp <= 256 ? 1 : 2)); +} + +static void j2k_write_poc(opj_j2k_t *j2k) { + int len, numpchgs, i; + + int numcomps = j2k->image->numcomps; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = &cp->tcps[j2k->curtileno]; + opj_tccp_t *tccp = &tcp->tccps[0]; + opj_cio_t *cio = j2k->cio; + + numpchgs = 1 + tcp->numpocs; + cio_write(cio, J2K_MS_POC, 2); /* POC */ + len = 2 + (5 + 2 * (numcomps <= 256 ? 1 : 2)) * numpchgs; + cio_write(cio, len, 2); /* Lpoc */ + for (i = 0; i < numpchgs; i++) { + opj_poc_t *poc = &tcp->pocs[i]; + cio_write(cio, poc->resno0, 1); /* RSpoc_i */ + cio_write(cio, poc->compno0, (numcomps <= 256 ? 1 : 2)); /* CSpoc_i */ + cio_write(cio, poc->layno1, 2); /* LYEpoc_i */ + poc->layno1 = int_min(poc->layno1, tcp->numlayers); + cio_write(cio, poc->resno1, 1); /* REpoc_i */ + poc->resno1 = int_min(poc->resno1, tccp->numresolutions); + cio_write(cio, poc->compno1, (numcomps <= 256 ? 1 : 2)); /* CEpoc_i */ + poc->compno1 = int_min(poc->compno1, numcomps); + cio_write(cio, poc->prg, 1); /* Ppoc_i */ + } +} + +static void j2k_read_poc(opj_j2k_t *j2k) { + int len, numpchgs, i, old_poc; + + int numcomps = j2k->image->numcomps; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_cio_t *cio = j2k->cio; + + old_poc = tcp->POC ? tcp->numpocs + 1 : 0; + tcp->POC = 1; + len = cio_read(cio, 2); /* Lpoc */ + numpchgs = (len - 2) / (5 + 2 * (numcomps <= 256 ? 1 : 2)); + + for (i = old_poc; i < numpchgs + old_poc; i++) { + opj_poc_t *poc; + poc = &tcp->pocs[i]; + poc->resno0 = cio_read(cio, 1); /* RSpoc_i */ + poc->compno0 = cio_read(cio, numcomps <= 256 ? 1 : 2); /* CSpoc_i */ + poc->layno1 = cio_read(cio, 2); /* LYEpoc_i */ + poc->resno1 = cio_read(cio, 1); /* REpoc_i */ + poc->compno1 = int_min( + cio_read(cio, numcomps <= 256 ? 1 : 2), (unsigned int) numcomps); /* CEpoc_i */ + poc->prg = (OPJ_PROG_ORDER)cio_read(cio, 1); /* Ppoc_i */ + } + + tcp->numpocs = numpchgs + old_poc - 1; +} + +static void j2k_read_crg(opj_j2k_t *j2k) { + int len, i, Xcrg_i, Ycrg_i; + + opj_cio_t *cio = j2k->cio; + int numcomps = j2k->image->numcomps; + + len = cio_read(cio, 2); /* Lcrg */ + for (i = 0; i < numcomps; i++) { + Xcrg_i = cio_read(cio, 2); /* Xcrg_i */ + Ycrg_i = cio_read(cio, 2); /* Ycrg_i */ + } +} + +static void j2k_read_tlm(opj_j2k_t *j2k) { + int len, Ztlm, Stlm, ST, SP, tile_tlm, i; + long int Ttlm_i, Ptlm_i; + + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); /* Ltlm */ + Ztlm = cio_read(cio, 1); /* Ztlm */ + Stlm = cio_read(cio, 1); /* Stlm */ + ST = ((Stlm >> 4) & 0x01) + ((Stlm >> 4) & 0x02); + SP = (Stlm >> 6) & 0x01; + tile_tlm = (len - 4) / ((SP + 1) * 2 + ST); + for (i = 0; i < tile_tlm; i++) { + Ttlm_i = cio_read(cio, ST); /* Ttlm_i */ + Ptlm_i = cio_read(cio, SP ? 4 : 2); /* Ptlm_i */ + } +} + +static void j2k_read_plm(opj_j2k_t *j2k) { + int len, i, Zplm, Nplm, add, packet_len = 0; + + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); /* Lplm */ + Zplm = cio_read(cio, 1); /* Zplm */ + len -= 3; + while (len > 0) { + Nplm = cio_read(cio, 4); /* Nplm */ + len -= 4; + for (i = Nplm; i > 0; i--) { + add = cio_read(cio, 1); + len--; + packet_len = (packet_len << 7) + add; /* Iplm_ij */ + if ((add & 0x80) == 0) { + /* New packet */ + packet_len = 0; + } + if (len <= 0) + break; + } + } +} + +static void j2k_read_plt(opj_j2k_t *j2k) { + int len, i, Zplt, packet_len = 0, add; + + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); /* Lplt */ + Zplt = cio_read(cio, 1); /* Zplt */ + for (i = len - 3; i > 0; i--) { + add = cio_read(cio, 1); + packet_len = (packet_len << 7) + add; /* Iplt_i */ + if ((add & 0x80) == 0) { + /* New packet */ + packet_len = 0; + } + } +} + +static void j2k_read_ppm(opj_j2k_t *j2k) { + int len, Z_ppm, i, j; + int N_ppm; + + opj_cp_t *cp = j2k->cp; + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); + cp->ppm = 1; + + Z_ppm = cio_read(cio, 1); /* Z_ppm */ + len -= 3; + while (len > 0) { + if (cp->ppm_previous == 0) { + N_ppm = cio_read(cio, 4); /* N_ppm */ + len -= 4; + } else { + N_ppm = cp->ppm_previous; + } + j = cp->ppm_store; + if (Z_ppm == 0) { /* First PPM marker */ + cp->ppm_data = (unsigned char *) opj_malloc(N_ppm * sizeof(unsigned char)); + cp->ppm_data_first = cp->ppm_data; + cp->ppm_len = N_ppm; + } else { /* NON-first PPM marker */ + cp->ppm_data = (unsigned char *) opj_realloc(cp->ppm_data, (N_ppm + cp->ppm_store) * sizeof(unsigned char)); + +#ifdef USE_JPWL + /* this memory allocation check could be done even in non-JPWL cases */ + if (cp->correct) { + if (!cp->ppm_data) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: failed memory allocation during PPM marker parsing (pos. %x)\n", + cio_tell(cio)); + if (!JPWL_ASSUME || JPWL_ASSUME) { + opj_free(cp->ppm_data); + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + } + } +#endif + + cp->ppm_data_first = cp->ppm_data; + cp->ppm_len = N_ppm + cp->ppm_store; + } + for (i = N_ppm; i > 0; i--) { /* Read packet header */ + cp->ppm_data[j] = cio_read(cio, 1); + j++; + len--; + if (len == 0) + break; /* Case of non-finished packet header in present marker but finished in next one */ + } + cp->ppm_previous = i - 1; + cp->ppm_store = j; + } +} + +static void j2k_read_ppt(opj_j2k_t *j2k) { + int len, Z_ppt, i, j = 0; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = cp->tcps + j2k->curtileno; + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); + Z_ppt = cio_read(cio, 1); + tcp->ppt = 1; + if (Z_ppt == 0) { /* First PPT marker */ + tcp->ppt_data = (unsigned char *) opj_malloc((len - 3) * sizeof(unsigned char)); + tcp->ppt_data_first = tcp->ppt_data; + tcp->ppt_store = 0; + tcp->ppt_len = len - 3; + } else { /* NON-first PPT marker */ + tcp->ppt_data = (unsigned char *) opj_realloc(tcp->ppt_data, (len - 3 + tcp->ppt_store) * sizeof(unsigned char)); + tcp->ppt_data_first = tcp->ppt_data; + tcp->ppt_len = len - 3 + tcp->ppt_store; + } + j = tcp->ppt_store; + for (i = len - 3; i > 0; i--) { + tcp->ppt_data[j] = cio_read(cio, 1); + j++; + } + tcp->ppt_store = j; +} + +static void j2k_write_tlm(opj_j2k_t *j2k){ + int lenp; + opj_cio_t *cio = j2k->cio; + j2k->tlm_start = cio_tell(cio); + cio_write(cio, J2K_MS_TLM, 2);/* TLM */ + lenp = 4 + (5*j2k->totnum_tp); + cio_write(cio,lenp,2); /* Ltlm */ + cio_write(cio, 0,1); /* Ztlm=0*/ + cio_write(cio,80,1); /* Stlm ST=1(8bits-255 tiles max),SP=1(Ptlm=32bits) */ + cio_skip(cio,5*j2k->totnum_tp); +} + +static void j2k_write_sot(opj_j2k_t *j2k) { + int lenp, len; + + opj_cio_t *cio = j2k->cio; + + j2k->sot_start = cio_tell(cio); + cio_write(cio, J2K_MS_SOT, 2); /* SOT */ + lenp = cio_tell(cio); + cio_skip(cio, 2); /* Lsot (further) */ + cio_write(cio, j2k->curtileno, 2); /* Isot */ + cio_skip(cio, 4); /* Psot (further in j2k_write_sod) */ + cio_write(cio, j2k->cur_tp_num , 1); /* TPsot */ + cio_write(cio, j2k->cur_totnum_tp[j2k->curtileno], 1); /* TNsot */ + len = cio_tell(cio) - lenp; + cio_seek(cio, lenp); + cio_write(cio, len, 2); /* Lsot */ + cio_seek(cio, lenp + len); + + /* UniPG>> */ +#ifdef USE_JPWL + /* update markers struct */ + j2k_add_marker(j2k->cstr_info, J2K_MS_SOT, j2k->sot_start, len + 2); +#endif /* USE_JPWL */ + /* <cp; + opj_cio_t *cio = j2k->cio; + + len = cio_read(cio, 2); + tileno = cio_read(cio, 2); + +#ifdef USE_JPWL + if (j2k->cp->correct) { + + static int backup_tileno = 0; + + /* tileno is negative or larger than the number of tiles!!! */ + if ((tileno < 0) || (tileno > (cp->tw * cp->th))) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: bad tile number (%d out of a maximum of %d)\n", + tileno, (cp->tw * cp->th)); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + tileno = backup_tileno; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" + "- setting tile number to %d\n", + tileno); + } + + /* keep your private count of tiles */ + backup_tileno++; + }; +#endif /* USE_JPWL */ + + if (cp->tileno_size == 0) { + cp->tileno[cp->tileno_size] = tileno; + cp->tileno_size++; + } else { + i = 0; + while (i < cp->tileno_size && status == 0) { + status = cp->tileno[i] == tileno ? 1 : 0; + i++; + } + if (status == 0) { + cp->tileno[cp->tileno_size] = tileno; + cp->tileno_size++; + } + } + + totlen = cio_read(cio, 4); + +#ifdef USE_JPWL + if (j2k->cp->correct) { + + /* totlen is negative or larger than the bytes left!!! */ + if ((totlen < 0) || (totlen > (cio_numbytesleft(cio) + 8))) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: bad tile byte size (%d bytes against %d bytes left)\n", + totlen, cio_numbytesleft(cio) + 8); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + /* we try to correct */ + totlen = 0; + opj_event_msg(j2k->cinfo, EVT_WARNING, "- trying to adjust this\n" + "- setting Psot to %d => assuming it is the last tile\n", + totlen); + } + + }; +#endif /* USE_JPWL */ + + if (!totlen) + totlen = cio_numbytesleft(cio) + 8; + + partno = cio_read(cio, 1); + numparts = cio_read(cio, 1); + + j2k->curtileno = tileno; + j2k->cur_tp_num = partno; + j2k->eot = cio_getbp(cio) - 12 + totlen; + j2k->state = J2K_STATE_TPH; + tcp = &cp->tcps[j2k->curtileno]; + + /* Index */ + if (j2k->cstr_info) { + if (tcp->first) { + if (tileno == 0) + j2k->cstr_info->main_head_end = cio_tell(cio) - 13; + j2k->cstr_info->tile[tileno].tileno = tileno; + j2k->cstr_info->tile[tileno].start_pos = cio_tell(cio) - 12; + j2k->cstr_info->tile[tileno].end_pos = j2k->cstr_info->tile[tileno].start_pos + totlen - 1; + j2k->cstr_info->tile[tileno].num_tps = numparts; + if (numparts) + j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(numparts * sizeof(opj_tp_info_t)); + else + j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(10 * sizeof(opj_tp_info_t)); // Fixme (10) + } + else { + j2k->cstr_info->tile[tileno].end_pos += totlen; + } + j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos = cio_tell(cio) - 12; + j2k->cstr_info->tile[tileno].tp[partno].tp_end_pos = + j2k->cstr_info->tile[tileno].tp[partno].tp_start_pos + totlen - 1; + } + + if (tcp->first == 1) { + /* Initialization PPT */ + opj_tccp_t *tmp = tcp->tccps; + memcpy(tcp, j2k->default_tcp, sizeof(opj_tcp_t)); + tcp->ppt = 0; + tcp->ppt_data = NULL; + tcp->ppt_data_first = NULL; + tcp->tccps = tmp; + + for (i = 0; i < j2k->image->numcomps; i++) { + tcp->tccps[i] = j2k->default_tcp->tccps[i]; + } + cp->tcps[j2k->curtileno].first = 0; + } +} + +static void j2k_write_sod(opj_j2k_t *j2k, void *tile_coder) { + int l, layno; + int totlen; + opj_tcp_t *tcp = NULL; + opj_codestream_info_t *cstr_info = NULL; + + opj_tcd_t *tcd = (opj_tcd_t*)tile_coder; /* cast is needed because of conflicts in header inclusions */ + opj_cp_t *cp = j2k->cp; + opj_cio_t *cio = j2k->cio; + + tcd->tp_num = j2k->tp_num ; + tcd->cur_tp_num = j2k->cur_tp_num; + + cio_write(cio, J2K_MS_SOD, 2); + if (j2k->curtileno == 0) { + j2k->sod_start = cio_tell(cio) + j2k->pos_correction; + } + + /* INDEX >> */ + cstr_info = j2k->cstr_info; + if (cstr_info) { + if (!j2k->cur_tp_num ) { + cstr_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1; + j2k->cstr_info->tile[j2k->curtileno].tileno = j2k->curtileno; + } + else{ + if(cstr_info->tile[j2k->curtileno].packet[cstr_info->packno - 1].end_pos < cio_tell(cio)) + cstr_info->tile[j2k->curtileno].packet[cstr_info->packno].start_pos = cio_tell(cio); + } + /* UniPG>> */ +#ifdef USE_JPWL + /* update markers struct */ + j2k_add_marker(j2k->cstr_info, J2K_MS_SOD, j2k->sod_start, 2); +#endif /* USE_JPWL */ + /* <tcps[j2k->curtileno]; + for (layno = 0; layno < tcp->numlayers; layno++) { + tcp->rates[layno] -= tcp->rates[layno] ? (j2k->sod_start / (cp->th * cp->tw)) : 0; + } + if(j2k->cur_tp_num == 0){ + tcd->tcd_image->tiles->packno = 0; + if(cstr_info) + cstr_info->packno = 0; + } + + l = tcd_encode_tile(tcd, j2k->curtileno, cio_getbp(cio), cio_numbytesleft(cio) - 2, cstr_info); + + /* Writing Psot in SOT marker */ + totlen = cio_tell(cio) + l - j2k->sot_start; + cio_seek(cio, j2k->sot_start + 6); + cio_write(cio, totlen, 4); + cio_seek(cio, j2k->sot_start + totlen); + /* Writing Ttlm and Ptlm in TLM marker */ + if(cp->cinema){ + cio_seek(cio, j2k->tlm_start + 6 + (5*j2k->cur_tp_num)); + cio_write(cio, j2k->curtileno, 1); + cio_write(cio, totlen, 4); + } + cio_seek(cio, j2k->sot_start + totlen); +} + +static void j2k_read_sod(opj_j2k_t *j2k) { + int len, truncate = 0, i; + unsigned char *data = NULL, *data_ptr = NULL; + + opj_cio_t *cio = j2k->cio; + int curtileno = j2k->curtileno; + + /* Index */ + if (j2k->cstr_info) { + j2k->cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_header = + cio_tell(cio) + j2k->pos_correction - 1; + if (j2k->cur_tp_num == 0) + j2k->cstr_info->tile[j2k->curtileno].end_header = cio_tell(cio) + j2k->pos_correction - 1; + j2k->cstr_info->packno = 0; + } + + len = int_min(j2k->eot - cio_getbp(cio), cio_numbytesleft(cio) + 1); + + if (len == cio_numbytesleft(cio) + 1) { + truncate = 1; /* Case of a truncate codestream */ + } + + data = j2k->tile_data[curtileno]; + data = (unsigned char*) opj_realloc(data, (j2k->tile_len[curtileno] + len) * sizeof(unsigned char)); + + data_ptr = data + j2k->tile_len[curtileno]; + for (i = 0; i < len; i++) { + data_ptr[i] = cio_read(cio, 1); + } + + j2k->tile_len[curtileno] += len; + j2k->tile_data[curtileno] = data; + + if (!truncate) { + j2k->state = J2K_STATE_TPHSOT; + } else { + j2k->state = J2K_STATE_NEOC; /* RAJOUTE !! */ + } + j2k->cur_tp_num++; +} + +static void j2k_write_rgn(opj_j2k_t *j2k, int compno, int tileno) { + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = &cp->tcps[tileno]; + opj_cio_t *cio = j2k->cio; + int numcomps = j2k->image->numcomps; + + cio_write(cio, J2K_MS_RGN, 2); /* RGN */ + cio_write(cio, numcomps <= 256 ? 5 : 6, 2); /* Lrgn */ + cio_write(cio, compno, numcomps <= 256 ? 1 : 2); /* Crgn */ + cio_write(cio, 0, 1); /* Srgn */ + cio_write(cio, tcp->tccps[compno].roishift, 1); /* SPrgn */ +} + +static void j2k_read_rgn(opj_j2k_t *j2k) { + int len, compno, roisty; + + opj_cp_t *cp = j2k->cp; + opj_tcp_t *tcp = j2k->state == J2K_STATE_TPH ? &cp->tcps[j2k->curtileno] : j2k->default_tcp; + opj_cio_t *cio = j2k->cio; + int numcomps = j2k->image->numcomps; + + len = cio_read(cio, 2); /* Lrgn */ + compno = cio_read(cio, numcomps <= 256 ? 1 : 2); /* Crgn */ + roisty = cio_read(cio, 1); /* Srgn */ + +#ifdef USE_JPWL + if (j2k->cp->correct) { + /* totlen is negative or larger than the bytes left!!! */ + if (compno >= numcomps) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: bad component number in RGN (%d when there are only %d)\n", + compno, numcomps); + if (!JPWL_ASSUME || JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return; + } + } + }; +#endif /* USE_JPWL */ + + tcp->tccps[compno].roishift = cio_read(cio, 1); /* SPrgn */ +} + +static void j2k_write_eoc(opj_j2k_t *j2k) { + opj_cio_t *cio = j2k->cio; + /* opj_event_msg(j2k->cinfo, "%.8x: EOC\n", cio_tell(cio) + j2k->pos_correction); */ + cio_write(cio, J2K_MS_EOC, 2); + +/* UniPG>> */ +#ifdef USE_JPWL + /* update markers struct */ + j2k_add_marker(j2k->cstr_info, J2K_MS_EOC, cio_tell(cio) - 2, 2); +#endif /* USE_JPWL */ +/* <cp->limit_decoding != DECODE_ALL_BUT_PACKETS) { + opj_tcd_t *tcd = tcd_create(j2k->cinfo); + tcd_malloc_decode(tcd, j2k->image, j2k->cp); + for (i = 0; i < j2k->cp->tileno_size; i++) { + tcd_malloc_decode_tile(tcd, j2k->image, j2k->cp, i, j2k->cstr_info); + tileno = j2k->cp->tileno[i]; + success = tcd_decode_tile(tcd, j2k->tile_data[tileno], j2k->tile_len[tileno], tileno, j2k->cstr_info); + opj_free(j2k->tile_data[tileno]); + j2k->tile_data[tileno] = NULL; + tcd_free_decode_tile(tcd, i); + if (success == false) { + j2k->state |= J2K_STATE_ERR; + break; + } + } + tcd_free_decode(tcd); + tcd_destroy(tcd); + } + /* if packets should not be decoded */ + else { + for (i = 0; i < j2k->cp->tileno_size; i++) { + tileno = j2k->cp->tileno[i]; + opj_free(j2k->tile_data[tileno]); + j2k->tile_data[tileno] = NULL; + } + } + if (j2k->state & J2K_STATE_ERR) + j2k->state = J2K_STATE_MT + J2K_STATE_ERR; + else + j2k->state = J2K_STATE_MT; +} + +typedef struct opj_dec_mstabent { + /** marker value */ + int id; + /** value of the state when the marker can appear */ + int states; + /** action linked to the marker */ + void (*handler) (opj_j2k_t *j2k); +} opj_dec_mstabent_t; + +opj_dec_mstabent_t j2k_dec_mstab[] = { + {J2K_MS_SOC, J2K_STATE_MHSOC, j2k_read_soc}, + {J2K_MS_SOT, J2K_STATE_MH | J2K_STATE_TPHSOT, j2k_read_sot}, + {J2K_MS_SOD, J2K_STATE_TPH, j2k_read_sod}, + {J2K_MS_EOC, J2K_STATE_TPHSOT, j2k_read_eoc}, + {J2K_MS_SIZ, J2K_STATE_MHSIZ, j2k_read_siz}, + {J2K_MS_COD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_cod}, + {J2K_MS_COC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_coc}, + {J2K_MS_RGN, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_rgn}, + {J2K_MS_QCD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_qcd}, + {J2K_MS_QCC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_qcc}, + {J2K_MS_POC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_poc}, + {J2K_MS_TLM, J2K_STATE_MH, j2k_read_tlm}, + {J2K_MS_PLM, J2K_STATE_MH, j2k_read_plm}, + {J2K_MS_PLT, J2K_STATE_TPH, j2k_read_plt}, + {J2K_MS_PPM, J2K_STATE_MH, j2k_read_ppm}, + {J2K_MS_PPT, J2K_STATE_TPH, j2k_read_ppt}, + {J2K_MS_SOP, 0, 0}, + {J2K_MS_CRG, J2K_STATE_MH, j2k_read_crg}, + {J2K_MS_COM, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_com}, + +#ifdef USE_JPWL + {J2K_MS_EPC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epc}, + {J2K_MS_EPB, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epb}, + {J2K_MS_ESD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_esd}, + {J2K_MS_RED, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_red}, +#endif /* USE_JPWL */ +#ifdef USE_JPSEC + {J2K_MS_SEC, J2K_STATE_MH, j2k_read_sec}, + {J2K_MS_INSEC, 0, j2k_read_insec}, +#endif /* USE_JPSEC */ + + {0, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_unk} +}; + +static void j2k_read_unk(opj_j2k_t *j2k) { + opj_event_msg(j2k->cinfo, EVT_WARNING, "Unknown marker\n"); + +#ifdef USE_JPWL + if (j2k->cp->correct) { + int m = 0, id, i; + int min_id = 0, min_dist = 17, cur_dist = 0, tmp_id; + cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); + id = cio_read(j2k->cio, 2); + opj_event_msg(j2k->cinfo, EVT_ERROR, + "JPWL: really don't know this marker %x\n", + id); + if (!JPWL_ASSUME) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "- possible synch loss due to uncorrectable codestream errors => giving up\n"); + return; + } + /* OK, activate this at your own risk!!! */ + /* we look for the marker at the minimum hamming distance from this */ + while (j2k_dec_mstab[m].id) { + + /* 1's where they differ */ + tmp_id = j2k_dec_mstab[m].id ^ id; + + /* compute the hamming distance between our id and the current */ + cur_dist = 0; + for (i = 0; i < 16; i++) { + if ((tmp_id >> i) & 0x0001) { + cur_dist++; + } + } + + /* if current distance is smaller, set the minimum */ + if (cur_dist < min_dist) { + min_dist = cur_dist; + min_id = j2k_dec_mstab[m].id; + } + + /* jump to the next marker */ + m++; + } + + /* do we substitute the marker? */ + if (min_dist < JPWL_MAXIMUM_HAMMING) { + opj_event_msg(j2k->cinfo, EVT_ERROR, + "- marker %x is at distance %d from the read %x\n", + min_id, min_dist, id); + opj_event_msg(j2k->cinfo, EVT_ERROR, + "- trying to substitute in place and crossing fingers!\n"); + cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); + cio_write(j2k->cio, min_id, 2); + + /* rewind */ + cio_seek(j2k->cio, cio_tell(j2k->cio) - 2); + + } + + }; +#endif /* USE_JPWL */ + +} + +/** +Read the lookup table containing all the marker, status and action +@param id Marker value +*/ +static opj_dec_mstabent_t *j2k_dec_mstab_lookup(int id) { + opj_dec_mstabent_t *e; + for (e = j2k_dec_mstab; e->id != 0; e++) { + if (e->id == id) { + break; + } + } + return e; +} + +/* ----------------------------------------------------------------------- */ +/* J2K / JPT decoder interface */ +/* ----------------------------------------------------------------------- */ + +opj_j2k_t* j2k_create_decompress(opj_common_ptr cinfo) { + opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); + if(!j2k) + return NULL; + + j2k->default_tcp = (opj_tcp_t*) opj_calloc(1, sizeof(opj_tcp_t)); + if(!j2k->default_tcp) { + opj_free(j2k); + return NULL; + } + + j2k->cinfo = cinfo; + j2k->tile_data = NULL; + + return j2k; +} + +void j2k_destroy_decompress(opj_j2k_t *j2k) { + int i = 0; + + if(j2k->tile_len != NULL) { + opj_free(j2k->tile_len); + } + if(j2k->tile_data != NULL) { + opj_free(j2k->tile_data); + } + if(j2k->default_tcp != NULL) { + opj_tcp_t *default_tcp = j2k->default_tcp; + if(default_tcp->ppt_data_first != NULL) { + opj_free(default_tcp->ppt_data_first); + } + if(j2k->default_tcp->tccps != NULL) { + opj_free(j2k->default_tcp->tccps); + } + opj_free(j2k->default_tcp); + } + if(j2k->cp != NULL) { + opj_cp_t *cp = j2k->cp; + if(cp->tcps != NULL) { + for(i = 0; i < cp->tw * cp->th; i++) { + if(cp->tcps[i].ppt_data_first != NULL) { + opj_free(cp->tcps[i].ppt_data_first); + } + if(cp->tcps[i].tccps != NULL) { + opj_free(cp->tcps[i].tccps); + } + } + opj_free(cp->tcps); + } + if(cp->ppm_data_first != NULL) { + opj_free(cp->ppm_data_first); + } + if(cp->tileno != NULL) { + opj_free(cp->tileno); + } + if(cp->comment != NULL) { + opj_free(cp->comment); + } + + opj_free(cp); + } + opj_free(j2k); +} + +void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters) { + if(j2k && parameters) { + /* create and initialize the coding parameters structure */ + opj_cp_t *cp = (opj_cp_t*) opj_calloc(1, sizeof(opj_cp_t)); + cp->reduce = parameters->cp_reduce; + cp->layer = parameters->cp_layer; + cp->limit_decoding = parameters->cp_limit_decoding; + +#ifdef USE_JPWL + cp->correct = parameters->jpwl_correct; + cp->exp_comps = parameters->jpwl_exp_comps; + cp->max_tiles = parameters->jpwl_max_tiles; +#endif /* USE_JPWL */ + + + /* keep a link to cp so that we can destroy it later in j2k_destroy_decompress */ + j2k->cp = cp; + } +} + +opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { + opj_image_t *image = NULL; + + opj_common_ptr cinfo = j2k->cinfo; + + j2k->cio = cio; + j2k->cstr_info = cstr_info; + if (cstr_info) + memset(cstr_info, 0, sizeof(opj_codestream_info_t)); + + /* create an empty image */ + image = opj_image_create0(); + j2k->image = image; + + j2k->state = J2K_STATE_MHSOC; + + for (;;) { + opj_dec_mstabent_t *e; + int id = cio_read(cio, 2); + +#ifdef USE_JPWL + /* we try to honor JPWL correction power */ + if (j2k->cp->correct) { + + int orig_pos = cio_tell(cio); + bool status; + + /* call the corrector */ + status = jpwl_correct(j2k); + + /* go back to where you were */ + cio_seek(cio, orig_pos - 2); + + /* re-read the marker */ + id = cio_read(cio, 2); + + /* check whether it begins with ff */ + if (id >> 8 != 0xff) { + opj_event_msg(cinfo, EVT_ERROR, + "JPWL: possible bad marker %x at %d\n", + id, cio_tell(cio) - 2); + if (!JPWL_ASSUME) { + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "JPWL: giving up\n"); + return 0; + } + /* we try to correct */ + id = id | 0xff00; + cio_seek(cio, cio_tell(cio) - 2); + cio_write(cio, id, 2); + opj_event_msg(cinfo, EVT_WARNING, "- trying to adjust this\n" + "- setting marker to %x\n", + id); + } + + } +#endif /* USE_JPWL */ + + if (id >> 8 != 0xff) { + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); + return 0; + } + e = j2k_dec_mstab_lookup(id); + // Check if the marker is known + if (!(j2k->state & e->states)) { + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id); + return 0; + } + // Check if the decoding is limited to the main header + if (e->id == J2K_MS_SOT && j2k->cp->limit_decoding == LIMIT_TO_MAIN_HEADER) { + opj_event_msg(cinfo, EVT_INFO, "Main Header decoded.\n"); + return image; + } + + if (e->handler) { + (*e->handler)(j2k); + } + if (j2k->state & J2K_STATE_ERR) + return NULL; + + if (j2k->state == J2K_STATE_MT) { + break; + } + if (j2k->state == J2K_STATE_NEOC) { + break; + } + } + if (j2k->state == J2K_STATE_NEOC) { + j2k_read_eoc(j2k); + } + + if (j2k->state != J2K_STATE_MT) { + opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n"); + } + + return image; +} + +/* +* Read a JPT-stream and decode file +* +*/ +opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { + opj_image_t *image = NULL; + opj_jpt_msg_header_t header; + int position; + + opj_common_ptr cinfo = j2k->cinfo; + + j2k->cio = cio; + + /* create an empty image */ + image = opj_image_create0(); + j2k->image = image; + + j2k->state = J2K_STATE_MHSOC; + + /* Initialize the header */ + jpt_init_msg_header(&header); + /* Read the first header of the message */ + jpt_read_msg_header(cinfo, cio, &header); + + position = cio_tell(cio); + if (header.Class_Id != 6) { /* 6 : Main header data-bin message */ + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Main header first [class_Id %d] !\n", header.Class_Id); + return 0; + } + + for (;;) { + opj_dec_mstabent_t *e = NULL; + int id; + + if (!cio_numbytesleft(cio)) { + j2k_read_eoc(j2k); + return image; + } + /* data-bin read -> need to read a new header */ + if ((unsigned int) (cio_tell(cio) - position) == header.Msg_length) { + jpt_read_msg_header(cinfo, cio, &header); + position = cio_tell(cio); + if (header.Class_Id != 4) { /* 4 : Tile data-bin message */ + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "[JPT-stream] : Expecting Tile info !\n"); + return 0; + } + } + + id = cio_read(cio, 2); + if (id >> 8 != 0xff) { + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead of %x\n", cio_tell(cio) - 2, id); + return 0; + } + e = j2k_dec_mstab_lookup(id); + if (!(j2k->state & e->states)) { + opj_image_destroy(image); + opj_event_msg(cinfo, EVT_ERROR, "%.8x: unexpected marker %x\n", cio_tell(cio) - 2, id); + return 0; + } + if (e->handler) { + (*e->handler)(j2k); + } + if (j2k->state == J2K_STATE_MT) { + break; + } + if (j2k->state == J2K_STATE_NEOC) { + break; + } + } + if (j2k->state == J2K_STATE_NEOC) { + j2k_read_eoc(j2k); + } + + if (j2k->state != J2K_STATE_MT) { + opj_event_msg(cinfo, EVT_WARNING, "Incomplete bitstream\n"); + } + + return image; +} + +/* ----------------------------------------------------------------------- */ +/* J2K encoder interface */ +/* ----------------------------------------------------------------------- */ + +opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo) { + opj_j2k_t *j2k = (opj_j2k_t*) opj_calloc(1, sizeof(opj_j2k_t)); + if(j2k) { + j2k->cinfo = cinfo; + } + return j2k; +} + +void j2k_destroy_compress(opj_j2k_t *j2k) { + int tileno; + + if(!j2k) return; + if(j2k->cp != NULL) { + opj_cp_t *cp = j2k->cp; + + if(cp->comment) { + opj_free(cp->comment); + } + if(cp->matrice) { + opj_free(cp->matrice); + } + for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { + opj_free(cp->tcps[tileno].tccps); + } + opj_free(cp->tcps); + opj_free(cp); + } + + opj_free(j2k); +} + +void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image) { + int i, j, tileno, numpocs_tile; + opj_cp_t *cp = NULL; + + if(!j2k || !parameters || ! image) { + return; + } + + /* create and initialize the coding parameters structure */ + cp = (opj_cp_t*) opj_calloc(1, sizeof(opj_cp_t)); + + /* keep a link to cp so that we can destroy it later in j2k_destroy_compress */ + j2k->cp = cp; + + /* set default values for cp */ + cp->tw = 1; + cp->th = 1; + + /* + copy user encoding parameters + */ + cp->cinema = parameters->cp_cinema; + cp->max_comp_size = parameters->max_comp_size; + cp->rsiz = parameters->cp_rsiz; + cp->disto_alloc = parameters->cp_disto_alloc; + cp->fixed_alloc = parameters->cp_fixed_alloc; + cp->fixed_quality = parameters->cp_fixed_quality; + + /* mod fixed_quality */ + if(parameters->cp_matrice) { + size_t array_size = parameters->tcp_numlayers * parameters->numresolution * 3 * sizeof(int); + cp->matrice = (int *) opj_malloc(array_size); + memcpy(cp->matrice, parameters->cp_matrice, array_size); + } + + /* tiles */ + cp->tdx = parameters->cp_tdx; + cp->tdy = parameters->cp_tdy; + + /* tile offset */ + cp->tx0 = parameters->cp_tx0; + cp->ty0 = parameters->cp_ty0; + + /* comment string */ + if(parameters->cp_comment) { + cp->comment = (char*)opj_malloc(strlen(parameters->cp_comment) + 1); + if(cp->comment) { + strcpy(cp->comment, parameters->cp_comment); + } + } + + /* + calculate other encoding parameters + */ + + if (parameters->tile_size_on) { + cp->tw = int_ceildiv(image->x1 - cp->tx0, cp->tdx); + cp->th = int_ceildiv(image->y1 - cp->ty0, cp->tdy); + } else { + cp->tdx = image->x1 - cp->tx0; + cp->tdy = image->y1 - cp->ty0; + } + + if(parameters->tp_on){ + cp->tp_flag = parameters->tp_flag; + cp->tp_on = 1; + } + + cp->img_size = 0; + for(i=0;inumcomps ;i++){ + cp->img_size += (image->comps[i].w *image->comps[i].h * image->comps[i].prec); + } + + +#ifdef USE_JPWL + /* + calculate JPWL encoding parameters + */ + + if (parameters->jpwl_epc_on) { + int i; + + /* set JPWL on */ + cp->epc_on = true; + cp->info_on = false; /* no informative technique */ + + /* set EPB on */ + if ((parameters->jpwl_hprot_MH > 0) || (parameters->jpwl_hprot_TPH[0] > 0)) { + cp->epb_on = true; + + cp->hprot_MH = parameters->jpwl_hprot_MH; + for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { + cp->hprot_TPH_tileno[i] = parameters->jpwl_hprot_TPH_tileno[i]; + cp->hprot_TPH[i] = parameters->jpwl_hprot_TPH[i]; + } + /* if tile specs are not specified, copy MH specs */ + if (cp->hprot_TPH[0] == -1) { + cp->hprot_TPH_tileno[0] = 0; + cp->hprot_TPH[0] = parameters->jpwl_hprot_MH; + } + for (i = 0; i < JPWL_MAX_NO_PACKSPECS; i++) { + cp->pprot_tileno[i] = parameters->jpwl_pprot_tileno[i]; + cp->pprot_packno[i] = parameters->jpwl_pprot_packno[i]; + cp->pprot[i] = parameters->jpwl_pprot[i]; + } + } + + /* set ESD writing */ + if ((parameters->jpwl_sens_size == 1) || (parameters->jpwl_sens_size == 2)) { + cp->esd_on = true; + + cp->sens_size = parameters->jpwl_sens_size; + cp->sens_addr = parameters->jpwl_sens_addr; + cp->sens_range = parameters->jpwl_sens_range; + + cp->sens_MH = parameters->jpwl_sens_MH; + for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { + cp->sens_TPH_tileno[i] = parameters->jpwl_sens_TPH_tileno[i]; + cp->sens_TPH[i] = parameters->jpwl_sens_TPH[i]; + } + } + + /* always set RED writing to false: we are at the encoder */ + cp->red_on = false; + + } else { + cp->epc_on = false; + } +#endif /* USE_JPWL */ + + + /* initialize the mutiple tiles */ + /* ---------------------------- */ + cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t)); + + for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { + opj_tcp_t *tcp = &cp->tcps[tileno]; + tcp->numlayers = parameters->tcp_numlayers; + for (j = 0; j < tcp->numlayers; j++) { + if(cp->cinema){ + if (cp->fixed_quality) { + tcp->distoratio[j] = parameters->tcp_distoratio[j]; + } + tcp->rates[j] = parameters->tcp_rates[j]; + }else{ + if (cp->fixed_quality) { /* add fixed_quality */ + tcp->distoratio[j] = parameters->tcp_distoratio[j]; + } else { + tcp->rates[j] = parameters->tcp_rates[j]; + } + } + } + tcp->csty = parameters->csty; + tcp->prg = parameters->prog_order; + tcp->mct = parameters->tcp_mct; + + numpocs_tile = 0; + tcp->POC = 0; + if (parameters->numpocs) { + /* initialisation of POC */ + tcp->POC = 1; + for (i = 0; i < parameters->numpocs; i++) { + if((tileno == parameters->POC[i].tile - 1) || (parameters->POC[i].tile == -1)) { + opj_poc_t *tcp_poc = &tcp->pocs[numpocs_tile]; + tcp_poc->resno0 = parameters->POC[numpocs_tile].resno0; + tcp_poc->compno0 = parameters->POC[numpocs_tile].compno0; + tcp_poc->layno1 = parameters->POC[numpocs_tile].layno1; + tcp_poc->resno1 = parameters->POC[numpocs_tile].resno1; + tcp_poc->compno1 = parameters->POC[numpocs_tile].compno1; + tcp_poc->prg1 = parameters->POC[numpocs_tile].prg1; + tcp_poc->tile = parameters->POC[numpocs_tile].tile; + numpocs_tile++; + } + } + tcp->numpocs = numpocs_tile -1 ; + }else{ + tcp->numpocs = 0; + } + + tcp->tccps = (opj_tccp_t*) opj_calloc(image->numcomps, sizeof(opj_tccp_t)); + + for (i = 0; i < image->numcomps; i++) { + opj_tccp_t *tccp = &tcp->tccps[i]; + tccp->csty = parameters->csty & 0x01; /* 0 => one precinct || 1 => custom precinct */ + tccp->numresolutions = parameters->numresolution; + tccp->cblkw = int_floorlog2(parameters->cblockw_init); + tccp->cblkh = int_floorlog2(parameters->cblockh_init); + tccp->cblksty = parameters->mode; + tccp->qmfbid = parameters->irreversible ? 0 : 1; + tccp->qntsty = parameters->irreversible ? J2K_CCP_QNTSTY_SEQNT : J2K_CCP_QNTSTY_NOQNT; + tccp->numgbits = 2; + if (i == parameters->roi_compno) { + tccp->roishift = parameters->roi_shift; + } else { + tccp->roishift = 0; + } + + if(parameters->cp_cinema) + { + //Precinct size for lowest frequency subband=128 + tccp->prcw[0] = 7; + tccp->prch[0] = 7; + //Precinct size at all other resolutions = 256 + for (j = 1; j < tccp->numresolutions; j++) { + tccp->prcw[j] = 8; + tccp->prch[j] = 8; + } + }else{ + if (parameters->csty & J2K_CCP_CSTY_PRT) { + int p = 0; + for (j = tccp->numresolutions - 1; j >= 0; j--) { + if (p < parameters->res_spec) { + + if (parameters->prcw_init[p] < 1) { + tccp->prcw[j] = 1; + } else { + tccp->prcw[j] = int_floorlog2(parameters->prcw_init[p]); + } + + if (parameters->prch_init[p] < 1) { + tccp->prch[j] = 1; + }else { + tccp->prch[j] = int_floorlog2(parameters->prch_init[p]); + } + + } else { + int res_spec = parameters->res_spec; + int size_prcw = parameters->prcw_init[res_spec - 1] >> (p - (res_spec - 1)); + int size_prch = parameters->prch_init[res_spec - 1] >> (p - (res_spec - 1)); + + if (size_prcw < 1) { + tccp->prcw[j] = 1; + } else { + tccp->prcw[j] = int_floorlog2(size_prcw); + } + + if (size_prch < 1) { + tccp->prch[j] = 1; + } else { + tccp->prch[j] = int_floorlog2(size_prch); + } + } + p++; + /*printf("\nsize precinct for level %d : %d,%d\n", j,tccp->prcw[j], tccp->prch[j]); */ + } //end for + } else { + for (j = 0; j < tccp->numresolutions; j++) { + tccp->prcw[j] = 15; + tccp->prch[j] = 15; + } + } + } + + dwt_calc_explicit_stepsizes(tccp, image->comps[i].prec); + } + } +} + +bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { + int tileno, compno; + opj_cp_t *cp = NULL; + + opj_tcd_t *tcd = NULL; /* TCD component */ + + j2k->cio = cio; + j2k->image = image; + + cp = j2k->cp; + + /* j2k_dump_cp(stdout, image, cp); */ + + /* INDEX >> */ + j2k->cstr_info = cstr_info; + if (cstr_info) { + int compno; + cstr_info->tile = (opj_tile_info_t *) opj_malloc(cp->tw * cp->th * sizeof(opj_tile_info_t)); + cstr_info->image_w = image->x1 - image->x0; + cstr_info->image_h = image->y1 - image->y0; + cstr_info->prog = (&cp->tcps[0])->prg; + cstr_info->tw = cp->tw; + cstr_info->th = cp->th; + cstr_info->tile_x = cp->tdx; /* new version parser */ + cstr_info->tile_y = cp->tdy; /* new version parser */ + cstr_info->tile_Ox = cp->tx0; /* new version parser */ + cstr_info->tile_Oy = cp->ty0; /* new version parser */ + cstr_info->numcomps = image->numcomps; + cstr_info->numlayers = (&cp->tcps[0])->numlayers; + cstr_info->numdecompos = (int*) opj_malloc(image->numcomps * sizeof(int)); + for (compno=0; compno < image->numcomps; compno++) { + cstr_info->numdecompos[compno] = (&cp->tcps[0])->tccps->numresolutions - 1; + } + cstr_info->D_max = 0.0; /* ADD Marcela */ + cstr_info->main_head_start = cio_tell(cio); /* position of SOC */ + cstr_info->maxmarknum = 100; + cstr_info->marker = (opj_marker_info_t *) opj_malloc(cstr_info->maxmarknum * sizeof(opj_marker_info_t)); + cstr_info->marknum = 0; + } + /* << INDEX */ + + j2k_write_soc(j2k); + j2k_write_siz(j2k); + j2k_write_cod(j2k); + j2k_write_qcd(j2k); + + if(cp->cinema){ + for (compno = 1; compno < image->numcomps; compno++) { + j2k_write_coc(j2k, compno); + j2k_write_qcc(j2k, compno); + } + } + + for (compno = 0; compno < image->numcomps; compno++) { + opj_tcp_t *tcp = &cp->tcps[0]; + if (tcp->tccps[compno].roishift) + j2k_write_rgn(j2k, compno, 0); + } + if (cp->comment != NULL) { + j2k_write_com(j2k); + } + + j2k->totnum_tp = j2k_calculate_tp(cp,image->numcomps,image,j2k); + /* TLM Marker*/ + if(cp->cinema){ + j2k_write_tlm(j2k); + if (cp->cinema == CINEMA4K_24) { + j2k_write_poc(j2k); + } + } + + /* uncomment only for testing JPSEC marker writing */ + /* j2k_write_sec(j2k); */ + + /* INDEX >> */ + if(cstr_info) { + cstr_info->main_head_end = cio_tell(cio) - 1; + } + /* << INDEX */ + /**** Main Header ENDS here ***/ + + /* create the tile encoder */ + tcd = tcd_create(j2k->cinfo); + + /* encode each tile */ + for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { + int pino; + int tilepartno=0; + /* UniPG>> */ + int acc_pack_num = 0; + /* <tcps[tileno]; + opj_event_msg(j2k->cinfo, EVT_INFO, "tile number %d / %d\n", tileno + 1, cp->tw * cp->th); + + j2k->curtileno = tileno; + j2k->cur_tp_num = 0; + tcd->cur_totnum_tp = j2k->cur_totnum_tp[j2k->curtileno]; + /* initialisation before tile encoding */ + if (tileno == 0) { + tcd_malloc_encode(tcd, image, cp, j2k->curtileno); + } else { + tcd_init_encode(tcd, image, cp, j2k->curtileno); + } + + /* INDEX >> */ + if(cstr_info) { + cstr_info->tile[j2k->curtileno].start_pos = cio_tell(cio) + j2k->pos_correction; + } + /* << INDEX */ + + for(pino = 0; pino <= tcp->numpocs; pino++) { + int tot_num_tp; + tcd->cur_pino=pino; + + /*Get number of tile parts*/ + tot_num_tp = j2k_get_num_tp(cp,pino,tileno); + tcd->tp_pos = cp->tp_pos; + + for(tilepartno = 0; tilepartno < tot_num_tp ; tilepartno++){ + j2k->tp_num = tilepartno; + /* INDEX >> */ + if(cstr_info) + cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_start_pos = + cio_tell(cio) + j2k->pos_correction; + /* << INDEX */ + j2k_write_sot(j2k); + + if(j2k->cur_tp_num == 0 && cp->cinema == 0){ + for (compno = 1; compno < image->numcomps; compno++) { + j2k_write_coc(j2k, compno); + j2k_write_qcc(j2k, compno); + } + if (cp->tcps[tileno].numpocs) { + j2k_write_poc(j2k); + } + } + + /* INDEX >> */ + if(cstr_info) + cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_header = + cio_tell(cio) + j2k->pos_correction + 1; + /* << INDEX */ + + j2k_write_sod(j2k, tcd); + + /* INDEX >> */ + if(cstr_info) { + cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_end_pos = + cio_tell(cio) + j2k->pos_correction - 1; + cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_start_pack = + acc_pack_num; + cstr_info->tile[j2k->curtileno].tp[j2k->cur_tp_num].tp_numpacks = + cstr_info->packno - acc_pack_num; + acc_pack_num = cstr_info->packno; + } + /* << INDEX */ + + j2k->cur_tp_num++; + } + } + if(cstr_info) { + cstr_info->tile[j2k->curtileno].end_pos = cio_tell(cio) + j2k->pos_correction - 1; + } + + + /* + if (tile->PPT) { // BAD PPT !!! + FILE *PPT_file; + int i; + PPT_file=fopen("PPT","rb"); + fprintf(stderr,"%c%c%c%c",255,97,tile->len_ppt/256,tile->len_ppt%256); + for (i=0;ilen_ppt;i++) { + unsigned char elmt; + fread(&elmt, 1, 1, PPT_file); + fwrite(&elmt,1,1,f); + } + fclose(PPT_file); + unlink("PPT"); + } + */ + + } + + /* destroy the tile encoder */ + tcd_free_encode(tcd); + tcd_destroy(tcd); + + opj_free(j2k->cur_totnum_tp); + + j2k_write_eoc(j2k); + + if(cstr_info) { + cstr_info->codestream_size = cio_tell(cio) + j2k->pos_correction; + /* UniPG>> */ + /* The following adjustment is done to adjust the codestream size */ + /* if SOD is not at 0 in the buffer. Useful in case of JP2, where */ + /* the first bunch of bytes is not in the codestream */ + cstr_info->codestream_size -= cstr_info->main_head_start; + /* <epc_on) { + + /* encode according to JPWL */ + jpwl_encode(j2k, cio, image); + + } +#endif /* USE_JPWL */ + + return true; +} + + + + + + diff --git a/extern/libopenjpeg/j2k.h b/extern/libopenjpeg/j2k.h new file mode 100644 index 00000000000..5599be47a8d --- /dev/null +++ b/extern/libopenjpeg/j2k.h @@ -0,0 +1,446 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __J2K_H +#define __J2K_H +/** +@file j2k.h +@brief The JPEG-2000 Codestream Reader/Writer (J2K) + +The functions in J2K.C have for goal to read/write the several parts of the codestream: markers and data. +*/ + +/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */ +/*@{*/ + +#define J2K_CP_CSTY_PRT 0x01 +#define J2K_CP_CSTY_SOP 0x02 +#define J2K_CP_CSTY_EPH 0x04 +#define J2K_CCP_CSTY_PRT 0x01 +#define J2K_CCP_CBLKSTY_LAZY 0x01 +#define J2K_CCP_CBLKSTY_RESET 0x02 +#define J2K_CCP_CBLKSTY_TERMALL 0x04 +#define J2K_CCP_CBLKSTY_VSC 0x08 +#define J2K_CCP_CBLKSTY_PTERM 0x10 +#define J2K_CCP_CBLKSTY_SEGSYM 0x20 +#define J2K_CCP_QNTSTY_NOQNT 0 +#define J2K_CCP_QNTSTY_SIQNT 1 +#define J2K_CCP_QNTSTY_SEQNT 2 + +/* ----------------------------------------------------------------------- */ + +#define J2K_MS_SOC 0xff4f /**< SOC marker value */ +#define J2K_MS_SOT 0xff90 /**< SOT marker value */ +#define J2K_MS_SOD 0xff93 /**< SOD marker value */ +#define J2K_MS_EOC 0xffd9 /**< EOC marker value */ +#define J2K_MS_SIZ 0xff51 /**< SIZ marker value */ +#define J2K_MS_COD 0xff52 /**< COD marker value */ +#define J2K_MS_COC 0xff53 /**< COC marker value */ +#define J2K_MS_RGN 0xff5e /**< RGN marker value */ +#define J2K_MS_QCD 0xff5c /**< QCD marker value */ +#define J2K_MS_QCC 0xff5d /**< QCC marker value */ +#define J2K_MS_POC 0xff5f /**< POC marker value */ +#define J2K_MS_TLM 0xff55 /**< TLM marker value */ +#define J2K_MS_PLM 0xff57 /**< PLM marker value */ +#define J2K_MS_PLT 0xff58 /**< PLT marker value */ +#define J2K_MS_PPM 0xff60 /**< PPM marker value */ +#define J2K_MS_PPT 0xff61 /**< PPT marker value */ +#define J2K_MS_SOP 0xff91 /**< SOP marker value */ +#define J2K_MS_EPH 0xff92 /**< EPH marker value */ +#define J2K_MS_CRG 0xff63 /**< CRG marker value */ +#define J2K_MS_COM 0xff64 /**< COM marker value */ +/* UniPG>> */ +#ifdef USE_JPWL +#define J2K_MS_EPC 0xff68 /**< EPC marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_EPB 0xff66 /**< EPB marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_ESD 0xff67 /**< ESD marker value (Part 11: JPEG 2000 for Wireless) */ +#define J2K_MS_RED 0xff69 /**< RED marker value (Part 11: JPEG 2000 for Wireless) */ +#endif /* USE_JPWL */ +#ifdef USE_JPSEC +#define J2K_MS_SEC 0xff65 /**< SEC marker value (Part 8: Secure JPEG 2000) */ +#define J2K_MS_INSEC 0xff94 /**< INSEC marker value (Part 8: Secure JPEG 2000) */ +#endif /* USE_JPSEC */ +/* < there was a PPT marker for the present tile */ + int ppt; + /** used in case of multiple marker PPT (number of info already stored) */ + int ppt_store; + /** ppmbug1 */ + int ppt_len; + /** add fixed_quality */ + float distoratio[100]; + /** tile-component coding parameters */ + opj_tccp_t *tccps; +} opj_tcp_t; + +/** +Coding parameters +*/ +typedef struct opj_cp { + /** Digital cinema profile*/ + OPJ_CINEMA_MODE cinema; + /** Maximum rate for each component. If == 0, component size limitation is not considered */ + int max_comp_size; + /** Size of the image in bits*/ + int img_size; + /** Rsiz*/ + OPJ_RSIZ_CAPABILITIES rsiz; + /** Enabling Tile part generation*/ + char tp_on; + /** Flag determining tile part generation*/ + char tp_flag; + /** Position of tile part flag in progression order*/ + int tp_pos; + /** allocation by rate/distortion */ + int disto_alloc; + /** allocation by fixed layer */ + int fixed_alloc; + /** add fixed_quality */ + int fixed_quality; + /** if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the full resolution */ + int reduce; + /** if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers are decoded */ + int layer; + /** if == NO_LIMITATION, decode entire codestream; if == LIMIT_TO_MAIN_HEADER then only decode the main header */ + OPJ_LIMIT_DECODING limit_decoding; + /** XTOsiz */ + int tx0; + /** YTOsiz */ + int ty0; + /** XTsiz */ + int tdx; + /** YTsiz */ + int tdy; + /** comment for coding */ + char *comment; + /** number of tiles in width */ + int tw; + /** number of tiles in heigth */ + int th; + /** ID number of the tiles present in the codestream */ + int *tileno; + /** size of the vector tileno */ + int tileno_size; + /** packet header store there for futur use in t2_decode_packet */ + unsigned char *ppm_data; + /** pointer remaining on the first byte of the first header if ppm is used */ + unsigned char *ppm_data_first; + /** if ppm == 1 --> there was a PPM marker for the present tile */ + int ppm; + /** use in case of multiple marker PPM (number of info already store) */ + int ppm_store; + /** use in case of multiple marker PPM (case on non-finished previous info) */ + int ppm_previous; + /** ppmbug1 */ + int ppm_len; + /** tile coding parameters */ + opj_tcp_t *tcps; + /** fixed layer */ + int *matrice; +/* UniPG>> */ +#ifdef USE_JPWL + /** enables writing of EPC in MH, thus activating JPWL */ + bool epc_on; + /** enables writing of EPB, in case of activated JPWL */ + bool epb_on; + /** enables writing of ESD, in case of activated JPWL */ + bool esd_on; + /** enables writing of informative techniques of ESD, in case of activated JPWL */ + bool info_on; + /** enables writing of RED, in case of activated JPWL */ + bool red_on; + /** error protection method for MH (0,1,16,32,37-128) */ + int hprot_MH; + /** tile number of header protection specification (>=0) */ + int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** error protection methods for TPHs (0,1,16,32,37-128) */ + int hprot_TPH[JPWL_MAX_NO_TILESPECS]; + /** tile number of packet protection specification (>=0) */ + int pprot_tileno[JPWL_MAX_NO_PACKSPECS]; + /** packet number of packet protection specification (>=0) */ + int pprot_packno[JPWL_MAX_NO_PACKSPECS]; + /** error protection methods for packets (0,1,16,32,37-128) */ + int pprot[JPWL_MAX_NO_PACKSPECS]; + /** enables writing of ESD, (0/2/4 bytes) */ + int sens_size; + /** sensitivity addressing size (0=auto/2/4 bytes) */ + int sens_addr; + /** sensitivity range (0-3) */ + int sens_range; + /** sensitivity method for MH (-1,0-7) */ + int sens_MH; + /** tile number of sensitivity specification (>=0) */ + int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** sensitivity methods for TPHs (-1,0-7) */ + int sens_TPH[JPWL_MAX_NO_TILESPECS]; + /** enables JPWL correction at the decoder */ + bool correct; + /** expected number of components at the decoder */ + int exp_comps; + /** maximum number of tiles at the decoder */ + int max_tiles; +#endif /* USE_JPWL */ +/* <cp. +@param j2k J2K decompressor handle +@param parameters decompression parameters +*/ +void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 codestream +@param j2k J2K decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Decode an image form a JPT-stream (JPEG 2000, JPIP) +@param j2k J2K decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a J2K compression structure +@param cinfo Codec context info +@return Returns a handle to a J2K compressor if successful, returns NULL otherwise +*/ +opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo); +/** +Destroy a J2K compressor handle +@param j2k J2K compressor handle to destroy +*/ +void j2k_destroy_compress(opj_j2k_t *j2k); +/** +Setup the encoder parameters using the current image and using user parameters. +Coding parameters are returned in j2k->cp. +@param j2k J2K compressor handle +@param parameters compression parameters +@param image input filled image +*/ +void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image); +/** +Converts an enum type progression order to string type +*/ +char *j2k_convert_progression_order(OPJ_PROG_ORDER prg_order); +/** +Encode an image into a JPEG-2000 codestream +@param j2k J2K compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __J2K_H */ diff --git a/extern/libopenjpeg/j2k_lib.c b/extern/libopenjpeg/j2k_lib.c new file mode 100644 index 00000000000..91aee007152 --- /dev/null +++ b/extern/libopenjpeg/j2k_lib.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef WIN32 +#include +#else +#include +#include +#include +#endif /* WIN32 */ +#include "opj_includes.h" + +double opj_clock(void) { +#ifdef WIN32 + /* WIN32: use QueryPerformance (very accurate) */ + LARGE_INTEGER freq , t ; + /* freq is the clock speed of the CPU */ + QueryPerformanceFrequency(&freq) ; + /* cout << "freq = " << ((double) freq.QuadPart) << endl; */ + /* t is the high resolution performance counter (see MSDN) */ + QueryPerformanceCounter ( & t ) ; + return ( t.QuadPart /(double) freq.QuadPart ) ; +#else + /* Unix or Linux: use resource usage */ + struct rusage t; + double procTime; + /* (1) Get the rusage data structure at this moment (man getrusage) */ + getrusage(0,&t); + /* (2) What is the elapsed time ? - CPU time = User time + System time */ + /* (2a) Get the seconds */ + procTime = t.ru_utime.tv_sec + t.ru_stime.tv_sec; + /* (2b) More precisely! Get the microseconds part ! */ + return ( procTime + (t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ; +#endif +} + diff --git a/extern/libopenjpeg/j2k_lib.h b/extern/libopenjpeg/j2k_lib.h new file mode 100644 index 00000000000..7df4d367757 --- /dev/null +++ b/extern/libopenjpeg/j2k_lib.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __J2K_LIB_H +#define __J2K_LIB_H +/** +@file j2k_lib.h +@brief Internal functions + +The functions in J2K_LIB.C are internal utilities mainly used for timing. +*/ + +/** @defgroup MISC MISC - Miscellaneous internal functions */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Difference in successive opj_clock() calls tells you the elapsed time +@return Returns time in seconds +*/ +double opj_clock(void); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __J2K_LIB_H */ + diff --git a/extern/libopenjpeg/jp2.c b/extern/libopenjpeg/jp2.c new file mode 100644 index 00000000000..14f9493c401 --- /dev/null +++ b/extern/libopenjpeg/jp2.c @@ -0,0 +1,710 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +/** +Read box headers +@param cinfo Codec context info +@param cio Input stream +@param box +@return Returns true if successful, returns false otherwise +*/ +static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box); +/*static void jp2_write_url(opj_cio_t *cio, char *Idx_file);*/ +/** +Read the IHDR box - Image Header box +@param jp2 JP2 handle +@param cio Input buffer stream +@return Returns true if successful, returns false otherwise +*/ +static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); +static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); +static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); +static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); +static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio); +static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Write the FTYP box - File type box +@param jp2 JP2 handle +@param cio Output buffer stream +*/ +static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Read the FTYP box - File type box +@param jp2 JP2 handle +@param cio Input buffer stream +@return Returns true if successful, returns false otherwise +*/ +static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); +static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +static bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset); +static void jp2_write_jp(opj_cio_t *cio); +/** +Read the JP box - JPEG 2000 signature +@param jp2 JP2 handle +@param cio Input buffer stream +@return Returns true if successful, returns false otherwise +*/ +static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Decode the structure of a JP2 file +@param jp2 JP2 handle +@param cio Input buffer stream +@return Returns true if successful, returns false otherwise +*/ +static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio); + +/*@}*/ + +/*@}*/ + +/* ----------------------------------------------------------------------- */ + +static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box) { + box->init_pos = cio_tell(cio); + box->length = cio_read(cio, 4); + box->type = cio_read(cio, 4); + if (box->length == 1) { + if (cio_read(cio, 4) != 0) { + opj_event_msg(cinfo, EVT_ERROR, "Cannot handle box sizes higher than 2^32\n"); + return false; + } + box->length = cio_read(cio, 4); + if (box->length == 0) + box->length = cio_numbytesleft(cio) + 12; + } + else if (box->length == 0) { + box->length = cio_numbytesleft(cio) + 8; + } + + return true; +} + +#if 0 +static void jp2_write_url(opj_cio_t *cio, char *Idx_file) { + unsigned int i; + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_URL, 4); /* DBTL */ + cio_write(cio, 0, 1); /* VERS */ + cio_write(cio, 0, 3); /* FLAG */ + + if(Idx_file) { + for (i = 0; i < strlen(Idx_file); i++) { + cio_write(cio, Idx_file[i], 1); + } + } + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} +#endif + +static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + if (JP2_IHDR != box.type) { + opj_event_msg(cinfo, EVT_ERROR, "Expected IHDR Marker\n"); + return false; + } + + jp2->h = cio_read(cio, 4); /* HEIGHT */ + jp2->w = cio_read(cio, 4); /* WIDTH */ + jp2->numcomps = cio_read(cio, 2); /* NC */ + jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t)); + + jp2->bpc = cio_read(cio, 1); /* BPC */ + + jp2->C = cio_read(cio, 1); /* C */ + jp2->UnkC = cio_read(cio, 1); /* UnkC */ + jp2->IPR = cio_read(cio, 1); /* IPR */ + + if (cio_tell(cio) - box.init_pos != box.length) { + opj_event_msg(cinfo, EVT_ERROR, "Error with IHDR Box\n"); + return false; + } + + return true; +} + +static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_IHDR, 4); /* IHDR */ + + cio_write(cio, jp2->h, 4); /* HEIGHT */ + cio_write(cio, jp2->w, 4); /* WIDTH */ + cio_write(cio, jp2->numcomps, 2); /* NC */ + + cio_write(cio, jp2->bpc, 1); /* BPC */ + + cio_write(cio, jp2->C, 1); /* C : Always 7 */ + cio_write(cio, jp2->UnkC, 1); /* UnkC, colorspace unknown */ + cio_write(cio, jp2->IPR, 1); /* IPR, no intellectual property */ + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + +static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) { + unsigned int i; + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_BPCC, 4); /* BPCC */ + + for (i = 0; i < jp2->numcomps; i++) { + cio_write(cio, jp2->comps[i].bpcc, 1); + } + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + + +static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio) { + unsigned int i; + opj_jp2_box_t box; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + if (JP2_BPCC != box.type) { + opj_event_msg(cinfo, EVT_ERROR, "Expected BPCC Marker\n"); + return false; + } + + for (i = 0; i < jp2->numcomps; i++) { + jp2->comps[i].bpcc = cio_read(cio, 1); + } + + if (cio_tell(cio) - box.init_pos != box.length) { + opj_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n"); + return false; + } + + return true; +} + +static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_COLR, 4); /* COLR */ + + cio_write(cio, jp2->meth, 1); /* METH */ + cio_write(cio, jp2->precedence, 1); /* PRECEDENCE */ + cio_write(cio, jp2->approx, 1); /* APPROX */ + + if (jp2->meth == 1) { + cio_write(cio, jp2->enumcs, 4); /* EnumCS */ + } else { + cio_write(cio, 0, 1); /* PROFILE (??) */ + } + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + +static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + int skip_len; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + do { + if (JP2_COLR != box.type) { + cio_skip(cio, box.length - 8); + jp2_read_boxhdr(cinfo, cio, &box); + } + } while(JP2_COLR != box.type); + + jp2->meth = cio_read(cio, 1); /* METH */ + jp2->precedence = cio_read(cio, 1); /* PRECEDENCE */ + jp2->approx = cio_read(cio, 1); /* APPROX */ + + if (jp2->meth == 1) { + jp2->enumcs = cio_read(cio, 4); /* EnumCS */ + } else { + /* skip PROFILE */ + skip_len = box.init_pos + box.length - cio_tell(cio); + if (skip_len < 0) { + opj_event_msg(cinfo, EVT_ERROR, "Error with JP2H box size\n"); + return false; + } + cio_skip(cio, box.init_pos + box.length - cio_tell(cio)); + } + + if (cio_tell(cio) - box.init_pos != box.length) { + opj_event_msg(cinfo, EVT_ERROR, "Error with BPCC Box\n"); + return false; + } + return true; +} + +void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_JP2H, 4); /* JP2H */ + + jp2_write_ihdr(jp2, cio); + + if (jp2->bpc == 255) { + jp2_write_bpcc(jp2, cio); + } + jp2_write_colr(jp2, cio); + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + +bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + int skip_len; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + do { + if (JP2_JP2H != box.type) { + if (box.type == JP2_JP2C) { + opj_event_msg(cinfo, EVT_ERROR, "Expected JP2H Marker\n"); + return false; + } + cio_skip(cio, box.length - 8); + jp2_read_boxhdr(cinfo, cio, &box); + } + } while(JP2_JP2H != box.type); + + if (!jp2_read_ihdr(jp2, cio)) + return false; + + if (jp2->bpc == 255) { + if (!jp2_read_bpcc(jp2, cio)) + return false; + } + if (!jp2_read_colr(jp2, cio)) + return false; + + skip_len = box.init_pos + box.length - cio_tell(cio); + if (skip_len < 0) { + opj_event_msg(cinfo, EVT_ERROR, "Error with JP2H Box\n"); + return false; + } + cio_skip(cio, box.init_pos + box.length - cio_tell(cio)); + + return true; +} + +static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) { + unsigned int i; + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_FTYP, 4); /* FTYP */ + + cio_write(cio, jp2->brand, 4); /* BR */ + cio_write(cio, jp2->minversion, 4); /* MinV */ + + for (i = 0; i < jp2->numcl; i++) { + cio_write(cio, jp2->cl[i], 4); /* CL */ + } + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + +static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio) { + int i; + opj_jp2_box_t box; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + + if (JP2_FTYP != box.type) { + opj_event_msg(cinfo, EVT_ERROR, "Expected FTYP Marker\n"); + return false; + } + + jp2->brand = cio_read(cio, 4); /* BR */ + jp2->minversion = cio_read(cio, 4); /* MinV */ + jp2->numcl = (box.length - 16) / 4; + jp2->cl = (unsigned int *) opj_malloc(jp2->numcl * sizeof(unsigned int)); + + for (i = 0; i < (int)jp2->numcl; i++) { + jp2->cl[i] = cio_read(cio, 4); /* CLi */ + } + + if (cio_tell(cio) - box.init_pos != box.length) { + opj_event_msg(cinfo, EVT_ERROR, "Error with FTYP Box\n"); + return false; + } + + return true; +} + +static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { + unsigned int j2k_codestream_offset, j2k_codestream_length; + opj_jp2_box_t box; + + opj_j2k_t *j2k = jp2->j2k; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_JP2C, 4); /* JP2C */ + + /* J2K encoding */ + j2k_codestream_offset = cio_tell(cio); + if(!j2k_encode(j2k, cio, image, cstr_info)) { + opj_event_msg(j2k->cinfo, EVT_ERROR, "Failed to encode image\n"); + return 0; + } + j2k_codestream_length = cio_tell(cio) - j2k_codestream_offset; + + jp2->j2k_codestream_offset = j2k_codestream_offset; + jp2->j2k_codestream_length = j2k_codestream_length; + + box.length = 8 + jp2->j2k_codestream_length; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); + + return box.length; +} + +static bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset) { + opj_jp2_box_t box; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + do { + if(JP2_JP2C != box.type) { + cio_skip(cio, box.length - 8); + jp2_read_boxhdr(cinfo, cio, &box); + } + } while(JP2_JP2C != box.type); + + *j2k_codestream_offset = cio_tell(cio); + *j2k_codestream_length = box.length - 8; + + return true; +} + +static void jp2_write_jp(opj_cio_t *cio) { + opj_jp2_box_t box; + + box.init_pos = cio_tell(cio); + cio_skip(cio, 4); + cio_write(cio, JP2_JP, 4); /* JP2 signature */ + cio_write(cio, 0x0d0a870a, 4); + + box.length = cio_tell(cio) - box.init_pos; + cio_seek(cio, box.init_pos); + cio_write(cio, box.length, 4); /* L */ + cio_seek(cio, box.init_pos + box.length); +} + +static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio) { + opj_jp2_box_t box; + + opj_common_ptr cinfo = jp2->cinfo; + + jp2_read_boxhdr(cinfo, cio, &box); + if (JP2_JP != box.type) { + opj_event_msg(cinfo, EVT_ERROR, "Expected JP Marker\n"); + return false; + } + if (0x0d0a870a != cio_read(cio, 4)) { + opj_event_msg(cinfo, EVT_ERROR, "Error with JP Marker\n"); + return false; + } + if (cio_tell(cio) - box.init_pos != box.length) { + opj_event_msg(cinfo, EVT_ERROR, "Error with JP Box size\n"); + return false; + } + + return true; +} + + +static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio) { + if (!jp2_read_jp(jp2, cio)) + return false; + if (!jp2_read_ftyp(jp2, cio)) + return false; + if (!jp2_read_jp2h(jp2, cio)) + return false; + if (!jp2_read_jp2c(jp2, cio, &jp2->j2k_codestream_length, &jp2->j2k_codestream_offset)) + return false; + + return true; +} + +/* ----------------------------------------------------------------------- */ +/* JP2 decoder interface */ +/* ----------------------------------------------------------------------- */ + +opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo) { + opj_jp2_t *jp2 = (opj_jp2_t*) opj_calloc(1, sizeof(opj_jp2_t)); + if(jp2) { + jp2->cinfo = cinfo; + /* create the J2K codec */ + jp2->j2k = j2k_create_decompress(cinfo); + if(jp2->j2k == NULL) { + jp2_destroy_decompress(jp2); + return NULL; + } + } + return jp2; +} + +void jp2_destroy_decompress(opj_jp2_t *jp2) { + if(jp2) { + /* destroy the J2K codec */ + j2k_destroy_decompress(jp2->j2k); + + if(jp2->comps) { + opj_free(jp2->comps); + } + if(jp2->cl) { + opj_free(jp2->cl); + } + opj_free(jp2); + } +} + +void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters) { + /* setup the J2K codec */ + j2k_setup_decoder(jp2->j2k, parameters); + /* further JP2 initializations go here */ +} + +opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { + opj_common_ptr cinfo; + opj_image_t *image = NULL; + + if(!jp2 || !cio) { + return NULL; + } + + cinfo = jp2->cinfo; + + /* JP2 decoding */ + if(!jp2_read_struct(jp2, cio)) { + opj_event_msg(cinfo, EVT_ERROR, "Failed to decode jp2 structure\n"); + return NULL; + } + + /* J2K decoding */ + image = j2k_decode(jp2->j2k, cio, cstr_info); + if(!image) { + opj_event_msg(cinfo, EVT_ERROR, "Failed to decode J2K image\n"); + } + + /* Set Image Color Space */ + if (jp2->enumcs == 16) + image->color_space = CLRSPC_SRGB; + else if (jp2->enumcs == 17) + image->color_space = CLRSPC_GRAY; + else if (jp2->enumcs == 18) + image->color_space = CLRSPC_SYCC; + else + image->color_space = CLRSPC_UNKNOWN; + + return image; +} + +/* ----------------------------------------------------------------------- */ +/* JP2 encoder interface */ +/* ----------------------------------------------------------------------- */ + +opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo) { + opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t)); + if(jp2) { + jp2->cinfo = cinfo; + /* create the J2K codec */ + jp2->j2k = j2k_create_compress(cinfo); + if(jp2->j2k == NULL) { + jp2_destroy_compress(jp2); + return NULL; + } + } + return jp2; +} + +void jp2_destroy_compress(opj_jp2_t *jp2) { + if(jp2) { + /* destroy the J2K codec */ + j2k_destroy_compress(jp2->j2k); + + if(jp2->comps) { + opj_free(jp2->comps); + } + if(jp2->cl) { + opj_free(jp2->cl); + } + opj_free(jp2); + } +} + +void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image) { + int i; + int depth_0, sign; + + if(!jp2 || !parameters || !image) + return; + + /* setup the J2K codec */ + /* ------------------- */ + + /* Check if number of components respects standard */ + if (image->numcomps < 1 || image->numcomps > 16384) { + opj_event_msg(jp2->cinfo, EVT_ERROR, "Invalid number of components specified while setting up JP2 encoder\n"); + return; + } + + j2k_setup_encoder(jp2->j2k, parameters, image); + + /* setup the JP2 codec */ + /* ------------------- */ + + /* Profile box */ + + jp2->brand = JP2_JP2; /* BR */ + jp2->minversion = 0; /* MinV */ + jp2->numcl = 1; + jp2->cl = (unsigned int*) opj_malloc(jp2->numcl * sizeof(unsigned int)); + jp2->cl[0] = JP2_JP2; /* CL0 : JP2 */ + + /* Image Header box */ + + jp2->numcomps = image->numcomps; /* NC */ + jp2->comps = (opj_jp2_comps_t*) opj_malloc(jp2->numcomps * sizeof(opj_jp2_comps_t)); + jp2->h = image->y1 - image->y0; /* HEIGHT */ + jp2->w = image->x1 - image->x0; /* WIDTH */ + /* BPC */ + depth_0 = image->comps[0].prec - 1; + sign = image->comps[0].sgnd; + jp2->bpc = depth_0 + (sign << 7); + for (i = 1; i < image->numcomps; i++) { + int depth = image->comps[i].prec - 1; + sign = image->comps[i].sgnd; + if (depth_0 != depth) + jp2->bpc = 255; + } + jp2->C = 7; /* C : Always 7 */ + jp2->UnkC = 0; /* UnkC, colorspace specified in colr box */ + jp2->IPR = 0; /* IPR, no intellectual property */ + + /* BitsPerComponent box */ + + for (i = 0; i < image->numcomps; i++) { + jp2->comps[i].bpcc = image->comps[i].prec - 1 + (image->comps[i].sgnd << 7); + } + + /* Colour Specification box */ + + if ((image->numcomps == 1 || image->numcomps == 3) && (jp2->bpc != 255)) { + jp2->meth = 1; /* METH: Enumerated colourspace */ + } else { + jp2->meth = 2; /* METH: Restricted ICC profile */ + } + if (jp2->meth == 1) { + if (image->color_space == 1) + jp2->enumcs = 16; /* sRGB as defined by IEC 61966–2–1 */ + else if (image->color_space == 2) + jp2->enumcs = 17; /* greyscale */ + else if (image->color_space == 3) + jp2->enumcs = 18; /* YUV */ + } else { + jp2->enumcs = 0; /* PROFILE (??) */ + } + jp2->precedence = 0; /* PRECEDENCE */ + jp2->approx = 0; /* APPROX */ + +} + +bool jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { + + /* JP2 encoding */ + + /* JPEG 2000 Signature box */ + jp2_write_jp(cio); + /* File Type box */ + jp2_write_ftyp(jp2, cio); + /* JP2 Header box */ + jp2_write_jp2h(jp2, cio); + + /* J2K encoding */ + + if(!jp2_write_jp2c(jp2, cio, image, cstr_info)) { + opj_event_msg(jp2->cinfo, EVT_ERROR, "Failed to encode image\n"); + return false; + } + + return true; +} + + diff --git a/extern/libopenjpeg/jp2.h b/extern/libopenjpeg/jp2.h new file mode 100644 index 00000000000..7e363be2eee --- /dev/null +++ b/extern/libopenjpeg/jp2.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __JP2_H +#define __JP2_H +/** +@file jp2.h +@brief The JPEG-2000 file format Reader/Writer (JP2) + +*/ + +/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */ +/*@{*/ + +#define JPIP_JPIP 0x6a706970 + +#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */ +#define JP2_FTYP 0x66747970 /**< File type box */ +#define JP2_JP2H 0x6a703268 /**< JP2 header box */ +#define JP2_IHDR 0x69686472 /**< Image header box */ +#define JP2_COLR 0x636f6c72 /**< Colour specification box */ +#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */ +#define JP2_URL 0x75726c20 /**< URL box */ +#define JP2_DBTL 0x6474626c /**< ??? */ +#define JP2_BPCC 0x62706363 /**< Bits per component box */ +#define JP2_JP2 0x6a703220 /**< File type fields */ + +/* ----------------------------------------------------------------------- */ + +/** +JP2 component +*/ +typedef struct opj_jp2_comps { + int depth; + int sgnd; + int bpcc; +} opj_jp2_comps_t; + +/** +JPEG-2000 file format reader/writer +*/ +typedef struct opj_jp2 { + /** codec context */ + opj_common_ptr cinfo; + /** handle to the J2K codec */ + opj_j2k_t *j2k; + unsigned int w; + unsigned int h; + unsigned int numcomps; + unsigned int bpc; + unsigned int C; + unsigned int UnkC; + unsigned int IPR; + unsigned int meth; + unsigned int approx; + unsigned int enumcs; + unsigned int precedence; + unsigned int brand; + unsigned int minversion; + unsigned int numcl; + unsigned int *cl; + opj_jp2_comps_t *comps; + unsigned int j2k_codestream_offset; + unsigned int j2k_codestream_length; +} opj_jp2_t; + +/** +JP2 Box +*/ +typedef struct opj_jp2_box { + int length; + int type; + int init_pos; +} opj_jp2_box_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Write the JP2H box - JP2 Header box (used in MJ2) +@param jp2 JP2 handle +@param cio Output buffer stream +*/ +void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Read the JP2H box - JP2 Header box (used in MJ2) +@param jp2 JP2 handle +@param cio Input buffer stream +@return Returns true if successful, returns false otherwise +*/ +bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); +/** +Creates a JP2 decompression structure +@param cinfo Codec context info +@return Returns a handle to a JP2 decompressor if successful, returns NULL otherwise +*/ +opj_jp2_t* jp2_create_decompress(opj_common_ptr cinfo); +/** +Destroy a JP2 decompressor handle +@param jp2 JP2 decompressor handle to destroy +*/ +void jp2_destroy_decompress(opj_jp2_t *jp2); +/** +Setup the decoder decoding parameters using user parameters. +Decoding parameters are returned in jp2->j2k->cp. +@param jp2 JP2 decompressor handle +@param parameters decompression parameters +*/ +void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 file stream +@param jp2 JP2 decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a JP2 compression structure +@param cinfo Codec context info +@return Returns a handle to a JP2 compressor if successful, returns NULL otherwise +*/ +opj_jp2_t* jp2_create_compress(opj_common_ptr cinfo); +/** +Destroy a JP2 compressor handle +@param jp2 JP2 compressor handle to destroy +*/ +void jp2_destroy_compress(opj_jp2_t *jp2); +/** +Setup the encoder parameters using the current image and using user parameters. +Coding parameters are returned in jp2->j2k->cp. +@param jp2 JP2 compressor handle +@param parameters compression parameters +@param image input filled image +*/ +void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image); +/** +Encode an image into a JPEG-2000 file stream +@param jp2 JP2 compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if required, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +bool jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __JP2_H */ + diff --git a/extern/libopenjpeg/jpt.c b/extern/libopenjpeg/jpt.c new file mode 100644 index 00000000000..a2566ea8872 --- /dev/null +++ b/extern/libopenjpeg/jpt.c @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* + * Read the information contains in VBAS [JPP/JPT stream message header] + * Store information (7 bits) in value + * + */ +unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) { + unsigned char elmt; + + elmt = cio_read(cio, 1); + while ((elmt >> 7) == 1) { + value = (value << 7); + value |= (elmt & 0x7f); + elmt = cio_read(cio, 1); + } + value = (value << 7); + value |= (elmt & 0x7f); + + return value; +} + +/* + * Initialize the value of the message header structure + * + */ +void jpt_init_msg_header(opj_jpt_msg_header_t * header) { + header->Id = 0; /* In-class Identifier */ + header->last_byte = 0; /* Last byte information */ + header->Class_Id = 0; /* Class Identifier */ + header->CSn_Id = 0; /* CSn : index identifier */ + header->Msg_offset = 0; /* Message offset */ + header->Msg_length = 0; /* Message length */ + header->Layer_nb = 0; /* Auxiliary for JPP case */ +} + +/* + * Re-initialize the value of the message header structure + * + * Only parameters always present in message header + * + */ +void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) { + header->Id = 0; /* In-class Identifier */ + header->last_byte = 0; /* Last byte information */ + header->Msg_offset = 0; /* Message offset */ + header->Msg_length = 0; /* Message length */ +} + +/* + * Read the message header for a JPP/JPT - stream + * + */ +void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header) { + unsigned char elmt, Class = 0, CSn = 0; + jpt_reinit_msg_header(header); + + /* ------------- */ + /* VBAS : Bin-ID */ + /* ------------- */ + elmt = cio_read(cio, 1); + + /* See for Class and CSn */ + switch ((elmt >> 5) & 0x03) { + case 0: + opj_event_msg(cinfo, EVT_ERROR, "Forbidden value encounter in message header !!\n"); + break; + case 1: + Class = 0; + CSn = 0; + break; + case 2: + Class = 1; + CSn = 0; + break; + case 3: + Class = 1; + CSn = 1; + break; + default: + break; + } + + /* see information on bits 'c' [p 10 : A.2.1 general, ISO/IEC FCD 15444-9] */ + if (((elmt >> 4) & 0x01) == 1) + header->last_byte = 1; + + /* In-class identifier */ + header->Id |= (elmt & 0x0f); + if ((elmt >> 7) == 1) + header->Id = jpt_read_VBAS_info(cio, header->Id); + + /* ------------ */ + /* VBAS : Class */ + /* ------------ */ + if (Class == 1) { + header->Class_Id = 0; + header->Class_Id = jpt_read_VBAS_info(cio, header->Class_Id); + } + + /* ---------- */ + /* VBAS : CSn */ + /* ---------- */ + if (CSn == 1) { + header->CSn_Id = 0; + header->CSn_Id = jpt_read_VBAS_info(cio, header->CSn_Id); + } + + /* ----------------- */ + /* VBAS : Msg_offset */ + /* ----------------- */ + header->Msg_offset = jpt_read_VBAS_info(cio, header->Msg_offset); + + /* ----------------- */ + /* VBAS : Msg_length */ + /* ----------------- */ + header->Msg_length = jpt_read_VBAS_info(cio, header->Msg_length); + + /* ---------- */ + /* VBAS : Aux */ + /* ---------- */ + if ((header->Class_Id & 0x01) == 1) { + header->Layer_nb = 0; + header->Layer_nb = jpt_read_VBAS_info(cio, header->Layer_nb); + } +} diff --git a/extern/libopenjpeg/jpt.h b/extern/libopenjpeg/jpt.h new file mode 100644 index 00000000000..eb01f98eb85 --- /dev/null +++ b/extern/libopenjpeg/jpt.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __JPT_H +#define __JPT_H +/** +@file jpt.h +@brief JPT-stream reader (JPEG 2000, JPIP) + +JPT-stream functions are implemented in J2K.C. +*/ + +/** +Message Header JPT stream structure +*/ +typedef struct opj_jpt_msg_header { + /** In-class Identifier */ + unsigned int Id; + /** Last byte information */ + unsigned int last_byte; + /** Class Identifier */ + unsigned int Class_Id; + /** CSn : index identifier */ + unsigned int CSn_Id; + /** Message offset */ + unsigned int Msg_offset; + /** Message length */ + unsigned int Msg_length; + /** Auxiliary for JPP case */ + unsigned int Layer_nb; +} opj_jpt_msg_header_t; + +/* ----------------------------------------------------------------------- */ + +/** +Initialize the value of the message header structure +@param header Message header structure +*/ +void jpt_init_msg_header(opj_jpt_msg_header_t * header); + +/** +Read the message header for a JPP/JPT - stream +@param cinfo Codec context info +@param cio CIO handle +@param header Message header structure +*/ +void jpt_read_msg_header(opj_common_ptr cinfo, opj_cio_t *cio, opj_jpt_msg_header_t *header); + +#endif diff --git a/extern/libopenjpeg/license.txt b/extern/libopenjpeg/license.txt new file mode 100644 index 00000000000..d1e5b6a5333 --- /dev/null +++ b/extern/libopenjpeg/license.txt @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/extern/libopenjpeg/mct.c b/extern/libopenjpeg/mct.c new file mode 100644 index 00000000000..ca21744f3e4 --- /dev/null +++ b/extern/libopenjpeg/mct.c @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* */ +/* This table contains the norms of the basis function of the reversible MCT. */ +/* */ +static const double mct_norms[3] = { 1.732, .8292, .8292 }; + +/* */ +/* This table contains the norms of the basis function of the irreversible MCT. */ +/* */ +static const double mct_norms_real[3] = { 1.732, 1.805, 1.573 }; + +/* */ +/* Foward reversible MCT. */ +/* */ +void mct_encode( + int* restrict c0, + int* restrict c1, + int* restrict c2, + int n) +{ + int i; + for(i = 0; i < n; ++i) { + int r = c0[i]; + int g = c1[i]; + int b = c2[i]; + int y = (r + (g * 2) + b) >> 2; + int u = b - g; + int v = r - g; + c0[i] = y; + c1[i] = u; + c2[i] = v; + } +} + +/* */ +/* Inverse reversible MCT. */ +/* */ +void mct_decode( + int* restrict c0, + int* restrict c1, + int* restrict c2, + int n) +{ + int i; + for (i = 0; i < n; ++i) { + int y = c0[i]; + int u = c1[i]; + int v = c2[i]; + int g = y - ((u + v) >> 2); + int r = v + g; + int b = u + g; + c0[i] = r; + c1[i] = g; + c2[i] = b; + } +} + +/* */ +/* Get norm of basis function of reversible MCT. */ +/* */ +double mct_getnorm(int compno) { + return mct_norms[compno]; +} + +/* */ +/* Foward irreversible MCT. */ +/* */ +void mct_encode_real( + int* restrict c0, + int* restrict c1, + int* restrict c2, + int n) +{ + int i; + for(i = 0; i < n; ++i) { + int r = c0[i]; + int g = c1[i]; + int b = c2[i]; + int y = fix_mul(r, 2449) + fix_mul(g, 4809) + fix_mul(b, 934); + int u = -fix_mul(r, 1382) - fix_mul(g, 2714) + fix_mul(b, 4096); + int v = fix_mul(r, 4096) - fix_mul(g, 3430) - fix_mul(b, 666); + c0[i] = y; + c1[i] = u; + c2[i] = v; + } +} + +/* */ +/* Inverse irreversible MCT. */ +/* */ +void mct_decode_real( + float* restrict c0, + float* restrict c1, + float* restrict c2, + int n) +{ + int i; + for(i = 0; i < n; ++i) { + float y = c0[i]; + float u = c1[i]; + float v = c2[i]; + float r = y + (v * 1.402f); + float g = y - (u * 0.34413f) - (v * (0.71414f)); + float b = y + (u * 1.772f); + c0[i] = r; + c1[i] = g; + c2[i] = b; + } +} + +/* */ +/* Get norm of basis function of irreversible MCT. */ +/* */ +double mct_getnorm_real(int compno) { + return mct_norms_real[compno]; +} diff --git a/extern/libopenjpeg/mct.h b/extern/libopenjpeg/mct.h new file mode 100644 index 00000000000..84e3f8add19 --- /dev/null +++ b/extern/libopenjpeg/mct.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __MCT_H +#define __MCT_H +/** +@file mct.h +@brief Implementation of a multi-component transforms (MCT) + +The functions in MCT.C have for goal to realize reversible and irreversible multicomponent +transform. The functions in MCT.C are used by some function in TCD.C. +*/ + +/** @defgroup MCT MCT - Implementation of a multi-component transform */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Apply a reversible multi-component transform to an image +@param c0 Samples for red component +@param c1 Samples for green component +@param c2 Samples blue component +@param n Number of samples for each component +*/ +void mct_encode(int *c0, int *c1, int *c2, int n); +/** +Apply a reversible multi-component inverse transform to an image +@param c0 Samples for luminance component +@param c1 Samples for red chrominance component +@param c2 Samples for blue chrominance component +@param n Number of samples for each component +*/ +void mct_decode(int *c0, int *c1, int *c2, int n); +/** +Get norm of the basis function used for the reversible multi-component transform +@param compno Number of the component (0->Y, 1->U, 2->V) +@return +*/ +double mct_getnorm(int compno); + +/** +Apply an irreversible multi-component transform to an image +@param c0 Samples for red component +@param c1 Samples for green component +@param c2 Samples blue component +@param n Number of samples for each component +*/ +void mct_encode_real(int *c0, int *c1, int *c2, int n); +/** +Apply an irreversible multi-component inverse transform to an image +@param c0 Samples for luminance component +@param c1 Samples for red chrominance component +@param c2 Samples for blue chrominance component +@param n Number of samples for each component +*/ +void mct_decode_real(float* c0, float* c1, float* c2, int n); +/** +Get norm of the basis function used for the irreversible multi-component transform +@param compno Number of the component (0->Y, 1->U, 2->V) +@return +*/ +double mct_getnorm_real(int compno); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __MCT_H */ diff --git a/extern/libopenjpeg/mqc.c b/extern/libopenjpeg/mqc.c new file mode 100644 index 00000000000..9aa9d2c2e5b --- /dev/null +++ b/extern/libopenjpeg/mqc.c @@ -0,0 +1,538 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup MQC MQC - Implementation of an MQ-Coder */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +/** +Output a byte, doing bit-stuffing if necessary. +After a 0xff byte, the next byte must be smaller than 0x90. +@param mqc MQC handle +*/ +static void mqc_byteout(opj_mqc_t *mqc); +/** +Renormalize mqc->a and mqc->c while encoding, so that mqc->a stays between 0x8000 and 0x10000 +@param mqc MQC handle +*/ +static void mqc_renorme(opj_mqc_t *mqc); +/** +Encode the most probable symbol +@param mqc MQC handle +*/ +static void mqc_codemps(opj_mqc_t *mqc); +/** +Encode the most least symbol +@param mqc MQC handle +*/ +static void mqc_codelps(opj_mqc_t *mqc); +/** +Fill mqc->c with 1's for flushing +@param mqc MQC handle +*/ +static void mqc_setbits(opj_mqc_t *mqc); +/** +FIXME: documentation ??? +@param mqc MQC handle +@return +*/ +static int mqc_mpsexchange(opj_mqc_t *mqc); +/** +FIXME: documentation ??? +@param mqc MQC handle +@return +*/ +static int mqc_lpsexchange(opj_mqc_t *mqc); +/** +Input a byte +@param mqc MQC handle +*/ +static void mqc_bytein(opj_mqc_t *mqc); +/** +Renormalize mqc->a and mqc->c while decoding +@param mqc MQC handle +*/ +static void mqc_renormd(opj_mqc_t *mqc); + +/*@}*/ + +/*@}*/ + +/* */ +/* This array defines all the possible states for a context. */ +/* */ +static opj_mqc_state_t mqc_states[47 * 2] = { + {0x5601, 0, &mqc_states[2], &mqc_states[3]}, + {0x5601, 1, &mqc_states[3], &mqc_states[2]}, + {0x3401, 0, &mqc_states[4], &mqc_states[12]}, + {0x3401, 1, &mqc_states[5], &mqc_states[13]}, + {0x1801, 0, &mqc_states[6], &mqc_states[18]}, + {0x1801, 1, &mqc_states[7], &mqc_states[19]}, + {0x0ac1, 0, &mqc_states[8], &mqc_states[24]}, + {0x0ac1, 1, &mqc_states[9], &mqc_states[25]}, + {0x0521, 0, &mqc_states[10], &mqc_states[58]}, + {0x0521, 1, &mqc_states[11], &mqc_states[59]}, + {0x0221, 0, &mqc_states[76], &mqc_states[66]}, + {0x0221, 1, &mqc_states[77], &mqc_states[67]}, + {0x5601, 0, &mqc_states[14], &mqc_states[13]}, + {0x5601, 1, &mqc_states[15], &mqc_states[12]}, + {0x5401, 0, &mqc_states[16], &mqc_states[28]}, + {0x5401, 1, &mqc_states[17], &mqc_states[29]}, + {0x4801, 0, &mqc_states[18], &mqc_states[28]}, + {0x4801, 1, &mqc_states[19], &mqc_states[29]}, + {0x3801, 0, &mqc_states[20], &mqc_states[28]}, + {0x3801, 1, &mqc_states[21], &mqc_states[29]}, + {0x3001, 0, &mqc_states[22], &mqc_states[34]}, + {0x3001, 1, &mqc_states[23], &mqc_states[35]}, + {0x2401, 0, &mqc_states[24], &mqc_states[36]}, + {0x2401, 1, &mqc_states[25], &mqc_states[37]}, + {0x1c01, 0, &mqc_states[26], &mqc_states[40]}, + {0x1c01, 1, &mqc_states[27], &mqc_states[41]}, + {0x1601, 0, &mqc_states[58], &mqc_states[42]}, + {0x1601, 1, &mqc_states[59], &mqc_states[43]}, + {0x5601, 0, &mqc_states[30], &mqc_states[29]}, + {0x5601, 1, &mqc_states[31], &mqc_states[28]}, + {0x5401, 0, &mqc_states[32], &mqc_states[28]}, + {0x5401, 1, &mqc_states[33], &mqc_states[29]}, + {0x5101, 0, &mqc_states[34], &mqc_states[30]}, + {0x5101, 1, &mqc_states[35], &mqc_states[31]}, + {0x4801, 0, &mqc_states[36], &mqc_states[32]}, + {0x4801, 1, &mqc_states[37], &mqc_states[33]}, + {0x3801, 0, &mqc_states[38], &mqc_states[34]}, + {0x3801, 1, &mqc_states[39], &mqc_states[35]}, + {0x3401, 0, &mqc_states[40], &mqc_states[36]}, + {0x3401, 1, &mqc_states[41], &mqc_states[37]}, + {0x3001, 0, &mqc_states[42], &mqc_states[38]}, + {0x3001, 1, &mqc_states[43], &mqc_states[39]}, + {0x2801, 0, &mqc_states[44], &mqc_states[38]}, + {0x2801, 1, &mqc_states[45], &mqc_states[39]}, + {0x2401, 0, &mqc_states[46], &mqc_states[40]}, + {0x2401, 1, &mqc_states[47], &mqc_states[41]}, + {0x2201, 0, &mqc_states[48], &mqc_states[42]}, + {0x2201, 1, &mqc_states[49], &mqc_states[43]}, + {0x1c01, 0, &mqc_states[50], &mqc_states[44]}, + {0x1c01, 1, &mqc_states[51], &mqc_states[45]}, + {0x1801, 0, &mqc_states[52], &mqc_states[46]}, + {0x1801, 1, &mqc_states[53], &mqc_states[47]}, + {0x1601, 0, &mqc_states[54], &mqc_states[48]}, + {0x1601, 1, &mqc_states[55], &mqc_states[49]}, + {0x1401, 0, &mqc_states[56], &mqc_states[50]}, + {0x1401, 1, &mqc_states[57], &mqc_states[51]}, + {0x1201, 0, &mqc_states[58], &mqc_states[52]}, + {0x1201, 1, &mqc_states[59], &mqc_states[53]}, + {0x1101, 0, &mqc_states[60], &mqc_states[54]}, + {0x1101, 1, &mqc_states[61], &mqc_states[55]}, + {0x0ac1, 0, &mqc_states[62], &mqc_states[56]}, + {0x0ac1, 1, &mqc_states[63], &mqc_states[57]}, + {0x09c1, 0, &mqc_states[64], &mqc_states[58]}, + {0x09c1, 1, &mqc_states[65], &mqc_states[59]}, + {0x08a1, 0, &mqc_states[66], &mqc_states[60]}, + {0x08a1, 1, &mqc_states[67], &mqc_states[61]}, + {0x0521, 0, &mqc_states[68], &mqc_states[62]}, + {0x0521, 1, &mqc_states[69], &mqc_states[63]}, + {0x0441, 0, &mqc_states[70], &mqc_states[64]}, + {0x0441, 1, &mqc_states[71], &mqc_states[65]}, + {0x02a1, 0, &mqc_states[72], &mqc_states[66]}, + {0x02a1, 1, &mqc_states[73], &mqc_states[67]}, + {0x0221, 0, &mqc_states[74], &mqc_states[68]}, + {0x0221, 1, &mqc_states[75], &mqc_states[69]}, + {0x0141, 0, &mqc_states[76], &mqc_states[70]}, + {0x0141, 1, &mqc_states[77], &mqc_states[71]}, + {0x0111, 0, &mqc_states[78], &mqc_states[72]}, + {0x0111, 1, &mqc_states[79], &mqc_states[73]}, + {0x0085, 0, &mqc_states[80], &mqc_states[74]}, + {0x0085, 1, &mqc_states[81], &mqc_states[75]}, + {0x0049, 0, &mqc_states[82], &mqc_states[76]}, + {0x0049, 1, &mqc_states[83], &mqc_states[77]}, + {0x0025, 0, &mqc_states[84], &mqc_states[78]}, + {0x0025, 1, &mqc_states[85], &mqc_states[79]}, + {0x0015, 0, &mqc_states[86], &mqc_states[80]}, + {0x0015, 1, &mqc_states[87], &mqc_states[81]}, + {0x0009, 0, &mqc_states[88], &mqc_states[82]}, + {0x0009, 1, &mqc_states[89], &mqc_states[83]}, + {0x0005, 0, &mqc_states[90], &mqc_states[84]}, + {0x0005, 1, &mqc_states[91], &mqc_states[85]}, + {0x0001, 0, &mqc_states[90], &mqc_states[86]}, + {0x0001, 1, &mqc_states[91], &mqc_states[87]}, + {0x5601, 0, &mqc_states[92], &mqc_states[92]}, + {0x5601, 1, &mqc_states[93], &mqc_states[93]}, +}; + +/* +========================================================== + local functions +========================================================== +*/ + +static void mqc_byteout(opj_mqc_t *mqc) { + if (*mqc->bp == 0xff) { + mqc->bp++; + *mqc->bp = mqc->c >> 20; + mqc->c &= 0xfffff; + mqc->ct = 7; + } else { + if ((mqc->c & 0x8000000) == 0) { /* ((mqc->c&0x8000000)==0) CHANGE */ + mqc->bp++; + *mqc->bp = mqc->c >> 19; + mqc->c &= 0x7ffff; + mqc->ct = 8; + } else { + (*mqc->bp)++; + if (*mqc->bp == 0xff) { + mqc->c &= 0x7ffffff; + mqc->bp++; + *mqc->bp = mqc->c >> 20; + mqc->c &= 0xfffff; + mqc->ct = 7; + } else { + mqc->bp++; + *mqc->bp = mqc->c >> 19; + mqc->c &= 0x7ffff; + mqc->ct = 8; + } + } + } +} + +static void mqc_renorme(opj_mqc_t *mqc) { + do { + mqc->a <<= 1; + mqc->c <<= 1; + mqc->ct--; + if (mqc->ct == 0) { + mqc_byteout(mqc); + } + } while ((mqc->a & 0x8000) == 0); +} + +static void mqc_codemps(opj_mqc_t *mqc) { + mqc->a -= (*mqc->curctx)->qeval; + if ((mqc->a & 0x8000) == 0) { + if (mqc->a < (*mqc->curctx)->qeval) { + mqc->a = (*mqc->curctx)->qeval; + } else { + mqc->c += (*mqc->curctx)->qeval; + } + *mqc->curctx = (*mqc->curctx)->nmps; + mqc_renorme(mqc); + } else { + mqc->c += (*mqc->curctx)->qeval; + } +} + +static void mqc_codelps(opj_mqc_t *mqc) { + mqc->a -= (*mqc->curctx)->qeval; + if (mqc->a < (*mqc->curctx)->qeval) { + mqc->c += (*mqc->curctx)->qeval; + } else { + mqc->a = (*mqc->curctx)->qeval; + } + *mqc->curctx = (*mqc->curctx)->nlps; + mqc_renorme(mqc); +} + +static void mqc_setbits(opj_mqc_t *mqc) { + unsigned int tempc = mqc->c + mqc->a; + mqc->c |= 0xffff; + if (mqc->c >= tempc) { + mqc->c -= 0x8000; + } +} + +static int mqc_mpsexchange(opj_mqc_t *mqc) { + int d; + if (mqc->a < (*mqc->curctx)->qeval) { + d = 1 - (*mqc->curctx)->mps; + *mqc->curctx = (*mqc->curctx)->nlps; + } else { + d = (*mqc->curctx)->mps; + *mqc->curctx = (*mqc->curctx)->nmps; + } + + return d; +} + +static int mqc_lpsexchange(opj_mqc_t *mqc) { + int d; + if (mqc->a < (*mqc->curctx)->qeval) { + mqc->a = (*mqc->curctx)->qeval; + d = (*mqc->curctx)->mps; + *mqc->curctx = (*mqc->curctx)->nmps; + } else { + mqc->a = (*mqc->curctx)->qeval; + d = 1 - (*mqc->curctx)->mps; + *mqc->curctx = (*mqc->curctx)->nlps; + } + + return d; +} + +static void mqc_bytein(opj_mqc_t *mqc) { + if (mqc->bp != mqc->end) { + unsigned int c; + if (mqc->bp + 1 != mqc->end) { + c = *(mqc->bp + 1); + } else { + c = 0xff; + } + if (*mqc->bp == 0xff) { + if (c > 0x8f) { + mqc->c += 0xff00; + mqc->ct = 8; + } else { + mqc->bp++; + mqc->c += c << 9; + mqc->ct = 7; + } + } else { + mqc->bp++; + mqc->c += c << 8; + mqc->ct = 8; + } + } else { + mqc->c += 0xff00; + mqc->ct = 8; + } +} + +static void mqc_renormd(opj_mqc_t *mqc) { + do { + if (mqc->ct == 0) { + mqc_bytein(mqc); + } + mqc->a <<= 1; + mqc->c <<= 1; + mqc->ct--; + } while (mqc->a < 0x8000); +} + +/* +========================================================== + MQ-Coder interface +========================================================== +*/ + +opj_mqc_t* mqc_create(void) { + opj_mqc_t *mqc = (opj_mqc_t*)opj_malloc(sizeof(opj_mqc_t)); + return mqc; +} + +void mqc_destroy(opj_mqc_t *mqc) { + if(mqc) { + opj_free(mqc); + } +} + +int mqc_numbytes(opj_mqc_t *mqc) { + return mqc->bp - mqc->start; +} + +void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp) { + mqc_setcurctx(mqc, 0); + mqc->a = 0x8000; + mqc->c = 0; + mqc->bp = bp - 1; + mqc->ct = 12; + if (*mqc->bp == 0xff) { + mqc->ct = 13; + } + mqc->start = bp; +} + +void mqc_encode(opj_mqc_t *mqc, int d) { + if ((*mqc->curctx)->mps == d) { + mqc_codemps(mqc); + } else { + mqc_codelps(mqc); + } +} + +void mqc_flush(opj_mqc_t *mqc) { + mqc_setbits(mqc); + mqc->c <<= mqc->ct; + mqc_byteout(mqc); + mqc->c <<= mqc->ct; + mqc_byteout(mqc); + + if (*mqc->bp != 0xff) { + mqc->bp++; + } +} + +void mqc_bypass_init_enc(opj_mqc_t *mqc) { + mqc->c = 0; + mqc->ct = 8; + /*if (*mqc->bp == 0xff) { + mqc->ct = 7; + } */ +} + +void mqc_bypass_enc(opj_mqc_t *mqc, int d) { + mqc->ct--; + mqc->c = mqc->c + (d << mqc->ct); + if (mqc->ct == 0) { + mqc->bp++; + *mqc->bp = mqc->c; + mqc->ct = 8; + if (*mqc->bp == 0xff) { + mqc->ct = 7; + } + mqc->c = 0; + } +} + +int mqc_bypass_flush_enc(opj_mqc_t *mqc) { + unsigned char bit_padding; + + bit_padding = 0; + + if (mqc->ct != 0) { + while (mqc->ct > 0) { + mqc->ct--; + mqc->c += bit_padding << mqc->ct; + bit_padding = (bit_padding + 1) & 0x01; + } + mqc->bp++; + *mqc->bp = mqc->c; + mqc->ct = 8; + mqc->c = 0; + } + + return 1; +} + +void mqc_reset_enc(opj_mqc_t *mqc) { + mqc_resetstates(mqc); + mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); + mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); + mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); +} + +int mqc_restart_enc(opj_mqc_t *mqc) { + int correction = 1; + + /* */ + int n = 27 - 15 - mqc->ct; + mqc->c <<= mqc->ct; + while (n > 0) { + mqc_byteout(mqc); + n -= mqc->ct; + mqc->c <<= mqc->ct; + } + mqc_byteout(mqc); + + return correction; +} + +void mqc_restart_init_enc(opj_mqc_t *mqc) { + /* */ + mqc_setcurctx(mqc, 0); + mqc->a = 0x8000; + mqc->c = 0; + mqc->ct = 12; + mqc->bp--; + if (*mqc->bp == 0xff) { + mqc->ct = 13; + } +} + +void mqc_erterm_enc(opj_mqc_t *mqc) { + int k = 11 - mqc->ct + 1; + + while (k > 0) { + mqc->c <<= mqc->ct; + mqc->ct = 0; + mqc_byteout(mqc); + k -= mqc->ct; + } + + if (*mqc->bp != 0xff) { + mqc_byteout(mqc); + } +} + +void mqc_segmark_enc(opj_mqc_t *mqc) { + int i; + mqc_setcurctx(mqc, 18); + + for (i = 1; i < 5; i++) { + mqc_encode(mqc, i % 2); + } +} + +void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len) { + mqc_setcurctx(mqc, 0); + mqc->start = bp; + mqc->end = bp + len; + mqc->bp = bp; + if (len==0) mqc->c = 0xff << 16; + else mqc->c = *mqc->bp << 16; + mqc_bytein(mqc); + mqc->c <<= 7; + mqc->ct -= 7; + mqc->a = 0x8000; +} + +int mqc_decode(opj_mqc_t *mqc) { + int d; + mqc->a -= (*mqc->curctx)->qeval; + if ((mqc->c >> 16) < (*mqc->curctx)->qeval) { + d = mqc_lpsexchange(mqc); + mqc_renormd(mqc); + } else { + mqc->c -= (*mqc->curctx)->qeval << 16; + if ((mqc->a & 0x8000) == 0) { + d = mqc_mpsexchange(mqc); + mqc_renormd(mqc); + } else { + d = (*mqc->curctx)->mps; + } + } + + return d; +} + +void mqc_resetstates(opj_mqc_t *mqc) { + int i; + for (i = 0; i < MQC_NUMCTXS; i++) { + mqc->ctxs[i] = mqc_states; + } +} + +void mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob) { + mqc->ctxs[ctxno] = &mqc_states[msb + (prob << 1)]; +} + + diff --git a/extern/libopenjpeg/mqc.h b/extern/libopenjpeg/mqc.h new file mode 100644 index 00000000000..8cc8c934598 --- /dev/null +++ b/extern/libopenjpeg/mqc.h @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __MQC_H +#define __MQC_H +/** +@file mqc.h +@brief Implementation of an MQ-Coder (MQC) + +The functions in MQC.C have for goal to realize the MQ-coder operations. The functions +in MQC.C are used by some function in T1.C. +*/ + +/** @defgroup MQC MQC - Implementation of an MQ-Coder */ +/*@{*/ + +/** +This struct defines the state of a context. +*/ +typedef struct opj_mqc_state { + /** the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) */ + unsigned int qeval; + /** the Most Probable Symbol (0 or 1) */ + int mps; + /** next state if the next encoded symbol is the MPS */ + struct opj_mqc_state *nmps; + /** next state if the next encoded symbol is the LPS */ + struct opj_mqc_state *nlps; +} opj_mqc_state_t; + +#define MQC_NUMCTXS 19 + +/** +MQ coder +*/ +typedef struct opj_mqc { + unsigned int c; + unsigned int a; + unsigned int ct; + unsigned char *bp; + unsigned char *start; + unsigned char *end; + opj_mqc_state_t *ctxs[MQC_NUMCTXS]; + opj_mqc_state_t **curctx; +} opj_mqc_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new MQC handle +@return Returns a new MQC handle if successful, returns NULL otherwise +*/ +opj_mqc_t* mqc_create(void); +/** +Destroy a previously created MQC handle +@param mqc MQC handle to destroy +*/ +void mqc_destroy(opj_mqc_t *mqc); +/** +Return the number of bytes written/read since initialisation +@param mqc MQC handle +@return Returns the number of bytes already encoded +*/ +int mqc_numbytes(opj_mqc_t *mqc); +/** +Reset the states of all the context of the coder/decoder +(each context is set to a state where 0 and 1 are more or less equiprobable) +@param mqc MQC handle +*/ +void mqc_resetstates(opj_mqc_t *mqc); +/** +Set the state of a particular context +@param mqc MQC handle +@param ctxno Number that identifies the context +@param msb The MSB of the new state of the context +@param prob Number that identifies the probability of the symbols for the new state of the context +*/ +void mqc_setstate(opj_mqc_t *mqc, int ctxno, int msb, int prob); +/** +Initialize the encoder +@param mqc MQC handle +@param bp Pointer to the start of the buffer where the bytes will be written +*/ +void mqc_init_enc(opj_mqc_t *mqc, unsigned char *bp); +/** +Set the current context used for coding/decoding +@param mqc MQC handle +@param ctxno Number that identifies the context +*/ +#define mqc_setcurctx(mqc, ctxno) (mqc)->curctx = &(mqc)->ctxs[(int)(ctxno)] +/** +Encode a symbol using the MQ-coder +@param mqc MQC handle +@param d The symbol to be encoded (0 or 1) +*/ +void mqc_encode(opj_mqc_t *mqc, int d); +/** +Flush the encoder, so that all remaining data is written +@param mqc MQC handle +*/ +void mqc_flush(opj_mqc_t *mqc); +/** +BYPASS mode switch, initialization operation. +JPEG 2000 p 505. +

Not fully implemented and tested !!

+@param mqc MQC handle +*/ +void mqc_bypass_init_enc(opj_mqc_t *mqc); +/** +BYPASS mode switch, coding operation. +JPEG 2000 p 505. +

Not fully implemented and tested !!

+@param mqc MQC handle +@param d The symbol to be encoded (0 or 1) +*/ +void mqc_bypass_enc(opj_mqc_t *mqc, int d); +/** +BYPASS mode switch, flush operation +

Not fully implemented and tested !!

+@param mqc MQC handle +@return Returns 1 (always) +*/ +int mqc_bypass_flush_enc(opj_mqc_t *mqc); +/** +RESET mode switch +@param mqc MQC handle +*/ +void mqc_reset_enc(opj_mqc_t *mqc); +/** +RESTART mode switch (TERMALL) +@param mqc MQC handle +@return Returns 1 (always) +*/ +int mqc_restart_enc(opj_mqc_t *mqc); +/** +RESTART mode switch (TERMALL) reinitialisation +@param mqc MQC handle +*/ +void mqc_restart_init_enc(opj_mqc_t *mqc); +/** +ERTERM mode switch (PTERM) +@param mqc MQC handle +*/ +void mqc_erterm_enc(opj_mqc_t *mqc); +/** +SEGMARK mode switch (SEGSYM) +@param mqc MQC handle +*/ +void mqc_segmark_enc(opj_mqc_t *mqc); +/** +Initialize the decoder +@param mqc MQC handle +@param bp Pointer to the start of the buffer from which the bytes will be read +@param len Length of the input buffer +*/ +void mqc_init_dec(opj_mqc_t *mqc, unsigned char *bp, int len); +/** +Decode a symbol +@param mqc MQC handle +@return Returns the decoded symbol (0 or 1) +*/ +int mqc_decode(opj_mqc_t *mqc); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __MQC_H */ diff --git a/extern/libopenjpeg/openjpeg.c b/extern/libopenjpeg/openjpeg.c new file mode 100644 index 00000000000..96fa0ad57e5 --- /dev/null +++ b/extern/libopenjpeg/openjpeg.c @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef WIN32 +#include +#endif /* WIN32 */ + +#include "opj_includes.h" + +/* ---------------------------------------------------------------------- */ +#ifdef WIN32 +#ifndef OPJ_STATIC +BOOL APIENTRY +DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { + switch (ul_reason_for_call) { + case DLL_PROCESS_ATTACH : + break; + case DLL_PROCESS_DETACH : + break; + case DLL_THREAD_ATTACH : + case DLL_THREAD_DETACH : + break; + } + + return TRUE; +} +#endif /* OPJ_STATIC */ +#endif /* WIN32 */ + +/* ---------------------------------------------------------------------- */ + + +const char* OPJ_CALLCONV opj_version(void) { + return OPENJPEG_VERSION; +} + +opj_dinfo_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format) { + opj_dinfo_t *dinfo = (opj_dinfo_t*)opj_malloc(sizeof(opj_dinfo_t)); + if(!dinfo) return NULL; + dinfo->is_decompressor = true; + switch(format) { + case CODEC_J2K: + case CODEC_JPT: + /* get a J2K decoder handle */ + dinfo->j2k_handle = (void*)j2k_create_decompress((opj_common_ptr)dinfo); + if(!dinfo->j2k_handle) { + opj_free(dinfo); + return NULL; + } + break; + case CODEC_JP2: + /* get a JP2 decoder handle */ + dinfo->jp2_handle = (void*)jp2_create_decompress((opj_common_ptr)dinfo); + if(!dinfo->jp2_handle) { + opj_free(dinfo); + return NULL; + } + break; + case CODEC_UNKNOWN: + default: + opj_free(dinfo); + return NULL; + } + + dinfo->codec_format = format; + + return dinfo; +} + +void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo) { + if(dinfo) { + /* destroy the codec */ + switch(dinfo->codec_format) { + case CODEC_J2K: + case CODEC_JPT: + j2k_destroy_decompress((opj_j2k_t*)dinfo->j2k_handle); + break; + case CODEC_JP2: + jp2_destroy_decompress((opj_jp2_t*)dinfo->jp2_handle); + break; + case CODEC_UNKNOWN: + default: + break; + } + /* destroy the decompressor */ + opj_free(dinfo); + } +} + +void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters) { + if(parameters) { + memset(parameters, 0, sizeof(opj_dparameters_t)); + /* default decoding parameters */ + parameters->cp_layer = 0; + parameters->cp_reduce = 0; + parameters->cp_limit_decoding = NO_LIMITATION; + + parameters->decod_format = -1; + parameters->cod_format = -1; +/* UniPG>> */ +#ifdef USE_JPWL + parameters->jpwl_correct = false; + parameters->jpwl_exp_comps = JPWL_EXPECTED_COMPONENTS; + parameters->jpwl_max_tiles = JPWL_MAXIMUM_TILES; +#endif /* USE_JPWL */ +/* <codec_format) { + case CODEC_J2K: + case CODEC_JPT: + j2k_setup_decoder((opj_j2k_t*)dinfo->j2k_handle, parameters); + break; + case CODEC_JP2: + jp2_setup_decoder((opj_jp2_t*)dinfo->jp2_handle, parameters); + break; + case CODEC_UNKNOWN: + default: + break; + } + } +} + +opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio) { + return opj_decode_with_info(dinfo, cio, NULL); +} + +opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { + if(dinfo && cio) { + switch(dinfo->codec_format) { + case CODEC_J2K: + return j2k_decode((opj_j2k_t*)dinfo->j2k_handle, cio, cstr_info); + case CODEC_JPT: + return j2k_decode_jpt_stream((opj_j2k_t*)dinfo->j2k_handle, cio, cstr_info); + case CODEC_JP2: + return jp2_decode((opj_jp2_t*)dinfo->jp2_handle, cio, cstr_info); + case CODEC_UNKNOWN: + default: + break; + } + } + return NULL; +} + +opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format) { + opj_cinfo_t *cinfo = (opj_cinfo_t*)opj_malloc(sizeof(opj_cinfo_t)); + if(!cinfo) return NULL; + cinfo->is_decompressor = false; + switch(format) { + case CODEC_J2K: + /* get a J2K coder handle */ + cinfo->j2k_handle = (void*)j2k_create_compress((opj_common_ptr)cinfo); + if(!cinfo->j2k_handle) { + opj_free(cinfo); + return NULL; + } + break; + case CODEC_JP2: + /* get a JP2 coder handle */ + cinfo->jp2_handle = (void*)jp2_create_compress((opj_common_ptr)cinfo); + if(!cinfo->jp2_handle) { + opj_free(cinfo); + return NULL; + } + break; + case CODEC_JPT: + case CODEC_UNKNOWN: + default: + opj_free(cinfo); + return NULL; + } + + cinfo->codec_format = format; + + return cinfo; +} + +void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo) { + if(cinfo) { + /* destroy the codec */ + switch(cinfo->codec_format) { + case CODEC_J2K: + j2k_destroy_compress((opj_j2k_t*)cinfo->j2k_handle); + break; + case CODEC_JP2: + jp2_destroy_compress((opj_jp2_t*)cinfo->jp2_handle); + break; + case CODEC_JPT: + case CODEC_UNKNOWN: + default: + break; + } + /* destroy the decompressor */ + opj_free(cinfo); + } +} + +void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters) { + if(parameters) { + memset(parameters, 0, sizeof(opj_cparameters_t)); + /* default coding parameters */ + parameters->cp_cinema = OFF; + parameters->max_comp_size = 0; + parameters->numresolution = 6; + parameters->cp_rsiz = STD_RSIZ; + parameters->cblockw_init = 64; + parameters->cblockh_init = 64; + parameters->prog_order = LRCP; + parameters->roi_compno = -1; /* no ROI */ + parameters->subsampling_dx = 1; + parameters->subsampling_dy = 1; + parameters->tp_on = 0; + parameters->decod_format = -1; + parameters->cod_format = -1; +/* UniPG>> */ +#ifdef USE_JPWL + parameters->jpwl_epc_on = false; + parameters->jpwl_hprot_MH = -1; /* -1 means unassigned */ + { + int i; + for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { + parameters->jpwl_hprot_TPH_tileno[i] = -1; /* unassigned */ + parameters->jpwl_hprot_TPH[i] = 0; /* absent */ + } + }; + { + int i; + for (i = 0; i < JPWL_MAX_NO_PACKSPECS; i++) { + parameters->jpwl_pprot_tileno[i] = -1; /* unassigned */ + parameters->jpwl_pprot_packno[i] = -1; /* unassigned */ + parameters->jpwl_pprot[i] = 0; /* absent */ + } + }; + parameters->jpwl_sens_size = 0; /* 0 means no ESD */ + parameters->jpwl_sens_addr = 0; /* 0 means auto */ + parameters->jpwl_sens_range = 0; /* 0 means packet */ + parameters->jpwl_sens_MH = -1; /* -1 means unassigned */ + { + int i; + for (i = 0; i < JPWL_MAX_NO_TILESPECS; i++) { + parameters->jpwl_sens_TPH_tileno[i] = -1; /* unassigned */ + parameters->jpwl_sens_TPH[i] = -1; /* absent */ + } + }; +#endif /* USE_JPWL */ +/* <codec_format) { + case CODEC_J2K: + j2k_setup_encoder((opj_j2k_t*)cinfo->j2k_handle, parameters, image); + break; + case CODEC_JP2: + jp2_setup_encoder((opj_jp2_t*)cinfo->jp2_handle, parameters, image); + break; + case CODEC_JPT: + case CODEC_UNKNOWN: + default: + break; + } + } +} + +bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index) { + if (index != NULL) + opj_event_msg((opj_common_ptr)cinfo, EVT_WARNING, "Set index to NULL when calling the opj_encode function.\n" + "To extract the index, use the opj_encode_with_info() function.\n" + "No index will be generated during this encoding\n"); + return opj_encode_with_info(cinfo, cio, image, NULL); +} + +bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { + if(cinfo && cio && image) { + switch(cinfo->codec_format) { + case CODEC_J2K: + return j2k_encode((opj_j2k_t*)cinfo->j2k_handle, cio, image, cstr_info); + case CODEC_JP2: + return jp2_encode((opj_jp2_t*)cinfo->jp2_handle, cio, image, cstr_info); + case CODEC_JPT: + case CODEC_UNKNOWN: + default: + break; + } + } + return false; +} + +void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info) { + if (cstr_info) { + int tileno; + for (tileno = 0; tileno < cstr_info->tw * cstr_info->th; tileno++) { + opj_tile_info_t *tile_info = &cstr_info->tile[tileno]; + opj_free(tile_info->thresh); + opj_free(tile_info->packet); + opj_free(tile_info->tp); + } + opj_free(cstr_info->tile); + opj_free(cstr_info->marker); + } +} diff --git a/extern/libopenjpeg/openjpeg.h b/extern/libopenjpeg/openjpeg.h new file mode 100644 index 00000000000..ffcaacaf6e5 --- /dev/null +++ b/extern/libopenjpeg/openjpeg.h @@ -0,0 +1,911 @@ + /* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef OPENJPEG_H +#define OPENJPEG_H + +#define OPENJPEG_VERSION "1.3.0" + +/* +========================================================== + Compiler directives +========================================================== +*/ + +#if defined(OPJ_STATIC) || !(defined(WIN32) || defined(__WIN32__)) +#define OPJ_API +#define OPJ_CALLCONV +#else +#define OPJ_CALLCONV __stdcall +/* +The following ifdef block is the standard way of creating macros which make exporting +from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS +symbol defined on the command line. this symbol should not be defined on any project +that uses this DLL. This way any other project whose source files include this file see +OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols +defined with this macro as being exported. +*/ +#ifdef OPJ_EXPORTS +#define OPJ_API __declspec(dllexport) +#else +#define OPJ_API __declspec(dllimport) +#endif /* OPJ_EXPORTS */ +#endif /* !OPJ_STATIC || !WIN32 */ + +#ifndef __cplusplus +#if defined(HAVE_STDBOOL_H) +/* +The C language implementation does correctly provide the standard header +file "stdbool.h". + */ +#include +#else +/* +The C language implementation does not provide the standard header file +"stdbool.h" as required by ISO/IEC 9899:1999. Try to compensate for this +braindamage below. +*/ +#if !defined(bool) +#define bool int +#endif +#if !defined(true) +#define true 1 +#endif +#if !defined(false) +#define false 0 +#endif +#endif +#endif /* __cplusplus */ + +/* +========================================================== + Useful constant definitions +========================================================== +*/ + +#define OPJ_PATH_LEN 4096 /**< Maximum allowed size for filenames */ + +#define J2K_MAXRLVLS 33 /**< Number of maximum resolution level authorized */ +#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2) /**< Number of maximum sub-band linked to number of resolution level */ + +/* UniPG>> */ +#define JPWL_MAX_NO_TILESPECS 16 /**< Maximum number of tile parts expected by JPWL: increase at your will */ +#define JPWL_MAX_NO_PACKSPECS 16 /**< Maximum number of packet parts expected by JPWL: increase at your will */ +#define JPWL_MAX_NO_MARKERS 512 /**< Maximum number of JPWL markers: increase at your will */ +#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename" /**< index file name used when JPWL is on */ +#define JPWL_EXPECTED_COMPONENTS 3 /**< Expect this number of components, so you'll find better the first EPB */ +#define JPWL_MAXIMUM_TILES 8192 /**< Expect this maximum number of tiles, to avoid some crashes */ +#define JPWL_MAXIMUM_HAMMING 2 /**< Expect this maximum number of bit errors in marker id's */ +#define JPWL_MAXIMUM_EPB_ROOM 65450 /**< Expect this maximum number of bytes for composition of EPBs */ +/* < +
  • Error messages +
  • Warning messages +
  • Debugging messages + +*/ +typedef struct opj_event_mgr { + /** Error message callback if available, NULL otherwise */ + opj_msg_callback error_handler; + /** Warning message callback if available, NULL otherwise */ + opj_msg_callback warning_handler; + /** Debug message callback if available, NULL otherwise */ + opj_msg_callback info_handler; +} opj_event_mgr_t; + + +/* +========================================================== + codec typedef definitions +========================================================== +*/ + +/** +Progression order changes +*/ +typedef struct opj_poc { + /** Resolution num start, Component num start, given by POC */ + int resno0, compno0; + /** Layer num end,Resolution num end, Component num end, given by POC */ + int layno1, resno1, compno1; + /** Layer num start,Precinct num start, Precinct num end */ + int layno0, precno0, precno1; + /** Progression order enum*/ + OPJ_PROG_ORDER prg1,prg; + /** Progression order string*/ + char progorder[5]; + /** Tile number */ + int tile; + /** Start and end values for Tile width and height*/ + int tx0,tx1,ty0,ty1; + /** Start value, initialised in pi_initialise_encode*/ + int layS, resS, compS, prcS; + /** End value, initialised in pi_initialise_encode */ + int layE, resE, compE, prcE; + /** Start and end values of Tile width and height, initialised in pi_initialise_encode*/ + int txS,txE,tyS,tyE,dx,dy; + /** Temporary values for Tile parts, initialised in pi_create_encode */ + int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t; +} opj_poc_t; + +/** +Compression parameters +*/ +typedef struct opj_cparameters { + /** size of tile: tile_size_on = false (not in argument) or = true (in argument) */ + bool tile_size_on; + /** XTOsiz */ + int cp_tx0; + /** YTOsiz */ + int cp_ty0; + /** XTsiz */ + int cp_tdx; + /** YTsiz */ + int cp_tdy; + /** allocation by rate/distortion */ + int cp_disto_alloc; + /** allocation by fixed layer */ + int cp_fixed_alloc; + /** add fixed_quality */ + int cp_fixed_quality; + /** fixed layer */ + int *cp_matrice; + /** comment for coding */ + char *cp_comment; + /** csty : coding style */ + int csty; + /** progression order (default LRCP) */ + OPJ_PROG_ORDER prog_order; + /** progression order changes */ + opj_poc_t POC[32]; + /** number of progression order changes (POC), default to 0 */ + int numpocs; + /** number of layers */ + int tcp_numlayers; + /** rates of layers */ + float tcp_rates[100]; + /** different psnr for successive layers */ + float tcp_distoratio[100]; + /** number of resolutions */ + int numresolution; + /** initial code block width, default to 64 */ + int cblockw_init; + /** initial code block height, default to 64 */ + int cblockh_init; + /** mode switch (cblk_style) */ + int mode; + /** 1 : use the irreversible DWT 9-7, 0 : use lossless compression (default) */ + int irreversible; + /** region of interest: affected component in [0..3], -1 means no ROI */ + int roi_compno; + /** region of interest: upshift value */ + int roi_shift; + /* number of precinct size specifications */ + int res_spec; + /** initial precinct width */ + int prcw_init[J2K_MAXRLVLS]; + /** initial precinct height */ + int prch_init[J2K_MAXRLVLS]; + + /**@name command line encoder parameters (not used inside the library) */ + /*@{*/ + /** input file name */ + char infile[OPJ_PATH_LEN]; + /** output file name */ + char outfile[OPJ_PATH_LEN]; + /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ + int index_on; + /** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */ + char index[OPJ_PATH_LEN]; + /** subimage encoding: origin image offset in x direction */ + int image_offset_x0; + /** subimage encoding: origin image offset in y direction */ + int image_offset_y0; + /** subsampling value for dx */ + int subsampling_dx; + /** subsampling value for dy */ + int subsampling_dy; + /** input file format 0: PGX, 1: PxM, 2: BMP 3:TIF*/ + int decod_format; + /** output file format 0: J2K, 1: JP2, 2: JPT */ + int cod_format; + /*@}*/ + +/* UniPG>> */ + /**@name JPWL encoding parameters */ + /*@{*/ + /** enables writing of EPC in MH, thus activating JPWL */ + bool jpwl_epc_on; + /** error protection method for MH (0,1,16,32,37-128) */ + int jpwl_hprot_MH; + /** tile number of header protection specification (>=0) */ + int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** error protection methods for TPHs (0,1,16,32,37-128) */ + int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]; + /** tile number of packet protection specification (>=0) */ + int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]; + /** packet number of packet protection specification (>=0) */ + int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]; + /** error protection methods for packets (0,1,16,32,37-128) */ + int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]; + /** enables writing of ESD, (0=no/1/2 bytes) */ + int jpwl_sens_size; + /** sensitivity addressing size (0=auto/2/4 bytes) */ + int jpwl_sens_addr; + /** sensitivity range (0-3) */ + int jpwl_sens_range; + /** sensitivity method for MH (-1=no,0-7) */ + int jpwl_sens_MH; + /** tile number of sensitivity specification (>=0) */ + int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; + /** sensitivity methods for TPHs (-1=no,0-7) */ + int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; + /*@}*/ +/* <> */ + /**@name JPWL decoding parameters */ + /*@{*/ + /** activates the JPWL correction capabilities */ + bool jpwl_correct; + /** expected number of components */ + int jpwl_exp_comps; + /** maximum number of tiles */ + int jpwl_max_tiles; + /*@}*/ +/* <> */ +/** +Marker structure +*/ +typedef struct opj_marker_info_t { + /** marker type */ + unsigned short int type; + /** position in codestream */ + int pos; + /** length, marker val included */ + int len; +} opj_marker_info_t; +/* <> */ + /** number of markers */ + int marknum; + /** list of markers */ + opj_marker_info_t *marker; + /** actual size of markers array */ + int maxmarknum; +/* <cp. +@param dinfo decompressor handle +@param parameters decompression parameters +*/ +OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters); +/** +Decode an image from a JPEG-2000 codestream +@param dinfo decompressor handle +@param cio Input buffer stream +@return Returns a decoded image if successful, returns NULL otherwise +*/ +OPJ_API opj_image_t* OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio); + +/** +Decode an image from a JPEG-2000 codestream and extract the codestream information +@param dinfo decompressor handle +@param cio Input buffer stream +@param cstr_info Codestream information structure if needed afterwards, NULL otherwise +@return Returns a decoded image if successful, returns NULL otherwise +*/ +OPJ_API opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +/** +Creates a J2K/JP2 compression structure +@param format Coder to select +@return Returns a handle to a compressor if successful, returns NULL otherwise +*/ +OPJ_API opj_cinfo_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format); +/** +Destroy a compressor handle +@param cinfo compressor handle to destroy +*/ +OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo); +/** +Set encoding parameters to default values, that means : +
      +
    • Lossless +
    • 1 tile +
    • Size of precinct : 2^15 x 2^15 (means 1 precinct) +
    • Size of code-block : 64 x 64 +
    • Number of resolutions: 6 +
    • No SOP marker in the codestream +
    • No EPH marker in the codestream +
    • No sub-sampling in x or y direction +
    • No mode switch activated +
    • Progression order: LRCP +
    • No index file +
    • No ROI upshifted +
    • No offset of the origin of the image +
    • No offset of the origin of the tiles +
    • Reversible DWT 5-3 +
    +@param parameters Compression parameters +*/ +OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters); +/** +Setup the encoder parameters using the current image and using user parameters. +@param cinfo Compressor handle +@param parameters Compression parameters +@param image Input filled image +*/ +OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image); +/** +Encode an image into a JPEG-2000 codestream +@param cinfo compressor handle +@param cio Output buffer stream +@param image Image to encode +@param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci() +@return Returns true if successful, returns false otherwise +*/ +OPJ_API bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index); +/** +Encode an image into a JPEG-2000 codestream and extract the codestream information +@param cinfo compressor handle +@param cio Output buffer stream +@param image Image to encode +@param cstr_info Codestream information structure if needed afterwards, NULL otherwise +@return Returns true if successful, returns false otherwise +*/ +OPJ_API bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +/** +Destroy Codestream information after compression or decompression +@param cstr_info Codestream information structure +*/ +OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info); + +#ifdef __cplusplus +} +#endif + +#endif /* OPENJPEG_H */ diff --git a/extern/libopenjpeg/opj_includes.h b/extern/libopenjpeg/opj_includes.h new file mode 100644 index 00000000000..80d43df990f --- /dev/null +++ b/extern/libopenjpeg/opj_includes.h @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef OPJ_INCLUDES_H +#define OPJ_INCLUDES_H + +/* + ========================================================== + Standard includes used by the library + ========================================================== +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + ========================================================== + OpenJPEG interface + ========================================================== + */ +#include "openjpeg.h" + +/* + ========================================================== + OpenJPEG modules + ========================================================== +*/ + +/* Ignore GCC attributes if this is not GCC */ +#ifndef __GNUC__ + #define __attribute__(x) /* __attribute__(x) */ +#endif + +/* +The inline keyword is supported by C99 but not by C90. +Most compilers implement their own version of this keyword ... +*/ +#ifndef INLINE + #if defined(_MSC_VER) + #define INLINE __inline + #elif defined(__GNUC__) + #define INLINE __inline__ + #elif defined(__MWERKS__) + #define INLINE inline + #else + /* add other compilers here ... */ + #define INLINE + #endif /* defined() */ +#endif /* INLINE */ + +/* Are restricted pointers available? (C99) */ +#if (__STDC_VERSION__ != 199901L) + /* Not a C99 compiler */ + #ifdef __GNUC__ + #define restrict __restrict__ + #else + #define restrict /* restrict */ + #endif +#endif + +/* MSVC does not have lrintf */ +#ifdef _MSC_VER +static INLINE long lrintf(float f){ + int i; + + _asm{ + fld f + fistp i + }; + + return i; +} +#endif + +#include "j2k_lib.h" +#include "opj_malloc.h" +#include "event.h" +#include "cio.h" + +#include "image.h" +#include "j2k.h" +#include "jp2.h" +#include "jpt.h" + +#include "mqc.h" +#include "raw.h" +#include "bio.h" +#include "tgt.h" +#include "pi.h" +#include "tcd.h" +#include "t1.h" +#include "dwt.h" +#include "t2.h" +#include "mct.h" +#include "int.h" +#include "fix.h" + +/* JPWL>> */ +#ifdef USE_JPWL +#include "../jpwl/jpwl.h" +#endif /* USE_JPWL */ +/* < + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __OPJ_MALLOC_H +#define __OPJ_MALLOC_H +/** +@file opj_malloc.h +@brief Internal functions + +The functions in opj_malloc.h are internal utilities used for memory management. +*/ + +/** @defgroup MISC MISC - Miscellaneous internal functions */ +/*@{*/ + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Allocate an uninitialized memory block +@param size Bytes to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +#define opj_malloc(size) malloc(size) + +/** +Allocate a memory block with elements initialized to 0 +@param num Blocks to allocate +@param size Bytes per block to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +#define opj_calloc(num, size) calloc(num, size) + +/** +Allocate memory aligned to a 16 byte boundry +@param size Bytes to allocate +@return Returns a void pointer to the allocated space, or NULL if there is insufficient memory available +*/ +/* FIXME: These should be set with cmake tests, but we're currently not requiring use of cmake */ +#ifdef WIN32 + /* Someone should tell the mingw people that their malloc.h ought to provide _mm_malloc() */ + #ifdef __GNUC__ + #include + #define HAVE_MM_MALLOC + #else /* MSVC, Intel C++ */ + #include + #ifdef _mm_malloc + #define HAVE_MM_MALLOC + #endif + #endif +#else /* Not WIN32 */ + #if defined(__sun) + #define HAVE_MEMALIGN + #elif defined(__GNUC__) + #define HAVE_MEMALIGN + #include + /* Linux x86_64 and OSX always align allocations to 16 bytes */ + #elif !defined(__amd64__) && !defined(__APPLE__) + /* FIXME: Yes, this is a big assumption */ + #define HAVE_POSIX_MEMALIGN + #endif +#endif + + + +#define opj_aligned_malloc(size) malloc(size) +#define opj_aligned_free(m) free(m) + +#ifdef HAVE_MM_MALLOC + #undef opj_aligned_malloc + #define opj_aligned_malloc(size) _mm_malloc(size, 16) + #undef opj_aligned_free + #define opj_aligned_free(m) _mm_free(m) +#endif + +#ifdef HAVE_MEMALIGN + extern void* memalign(size_t, size_t); + #undef opj_aligned_malloc + #define opj_aligned_malloc(size) memalign(16, (size)) + #undef opj_aligned_free + #define opj_aligned_free(m) free(m) +#endif + +#ifdef HAVE_POSIX_MEMALIGN + #undef opj_aligned_malloc + extern int posix_memalign(void**, size_t, size_t); + + static INLINE void* __attribute__ ((malloc)) opj_aligned_malloc(size_t size){ + void* mem = NULL; + posix_memalign(&mem, 16, size); + return mem; + } + #undef opj_aligned_free + #define opj_aligned_free(m) free(m) +#endif + +/** +Reallocate memory blocks. +@param memblock Pointer to previously allocated memory block +@param size New size in bytes +@return Returns a void pointer to the reallocated (and possibly moved) memory block +*/ +#define opj_realloc(m, s) realloc(m, s) + +/** +Deallocates or frees a memory block. +@param memblock Previously allocated memory block to be freed +*/ +#define opj_free(m) free(m) + +#ifdef __GNUC__ +#pragma GCC poison malloc calloc realloc free +#endif + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __OPJ_MALLOC_H */ + diff --git a/extern/libopenjpeg/pi.c b/extern/libopenjpeg/pi.c new file mode 100644 index 00000000000..ac7654c5f14 --- /dev/null +++ b/extern/libopenjpeg/pi.c @@ -0,0 +1,963 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup PI PI - Implementation of a packet iterator */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +/** +Get next packet in layer-resolution-component-precinct order. +@param pi packet iterator to modify +@return returns false if pi pointed to the last packet or else returns true +*/ +static bool pi_next_lrcp(opj_pi_iterator_t * pi); +/** +Get next packet in resolution-layer-component-precinct order. +@param pi packet iterator to modify +@return returns false if pi pointed to the last packet or else returns true +*/ +static bool pi_next_rlcp(opj_pi_iterator_t * pi); +/** +Get next packet in resolution-precinct-component-layer order. +@param pi packet iterator to modify +@return returns false if pi pointed to the last packet or else returns true +*/ +static bool pi_next_rpcl(opj_pi_iterator_t * pi); +/** +Get next packet in precinct-component-resolution-layer order. +@param pi packet iterator to modify +@return returns false if pi pointed to the last packet or else returns true +*/ +static bool pi_next_pcrl(opj_pi_iterator_t * pi); +/** +Get next packet in component-precinct-resolution-layer order. +@param pi packet iterator to modify +@return returns false if pi pointed to the last packet or else returns true +*/ +static bool pi_next_cprl(opj_pi_iterator_t * pi); + +/*@}*/ + +/*@}*/ + +/* +========================================================== + local functions +========================================================== +*/ + +static bool pi_next_lrcp(opj_pi_iterator_t * pi) { + opj_pi_comp_t *comp = NULL; + opj_pi_resolution_t *res = NULL; + long index = 0; + + if (!pi->first) { + comp = &pi->comps[pi->compno]; + res = &comp->resolutions[pi->resno]; + goto LABEL_SKIP; + } else { + pi->first = 0; + } + + for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { + for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; + pi->resno++) { + for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { + comp = &pi->comps[pi->compno]; + if (pi->resno >= comp->numresolutions) { + continue; + } + res = &comp->resolutions[pi->resno]; + if (!pi->tp_on){ + pi->poc.precno1 = res->pw * res->ph; + } + for (pi->precno = pi->poc.precno0; pi->precno < pi->poc.precno1; pi->precno++) { + index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; + if (!pi->include[index]) { + pi->include[index] = 1; + return true; + } +LABEL_SKIP:; + } + } + } + } + + return false; +} + +static bool pi_next_rlcp(opj_pi_iterator_t * pi) { + opj_pi_comp_t *comp = NULL; + opj_pi_resolution_t *res = NULL; + long index = 0; + + if (!pi->first) { + comp = &pi->comps[pi->compno]; + res = &comp->resolutions[pi->resno]; + goto LABEL_SKIP; + } else { + pi->first = 0; + } + + for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; pi->resno++) { + for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { + for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { + comp = &pi->comps[pi->compno]; + if (pi->resno >= comp->numresolutions) { + continue; + } + res = &comp->resolutions[pi->resno]; + if(!pi->tp_on){ + pi->poc.precno1 = res->pw * res->ph; + } + for (pi->precno = pi->poc.precno0; pi->precno < pi->poc.precno1; pi->precno++) { + index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; + if (!pi->include[index]) { + pi->include[index] = 1; + return true; + } +LABEL_SKIP:; + } + } + } + } + + return false; +} + +static bool pi_next_rpcl(opj_pi_iterator_t * pi) { + opj_pi_comp_t *comp = NULL; + opj_pi_resolution_t *res = NULL; + long index = 0; + + if (!pi->first) { + goto LABEL_SKIP; + } else { + int compno, resno; + pi->first = 0; + pi->dx = 0; + pi->dy = 0; + for (compno = 0; compno < pi->numcomps; compno++) { + comp = &pi->comps[compno]; + for (resno = 0; resno < comp->numresolutions; resno++) { + int dx, dy; + res = &comp->resolutions[resno]; + dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); + dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); + pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : int_min(pi->dy, dy); + } + } + } +if (!pi->tp_on){ + pi->poc.ty0 = pi->ty0; + pi->poc.tx0 = pi->tx0; + pi->poc.ty1 = pi->ty1; + pi->poc.tx1 = pi->tx1; + } + for (pi->resno = pi->poc.resno0; pi->resno < pi->poc.resno1; pi->resno++) { + for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += pi->dy - (pi->y % pi->dy)) { + for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) { + for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { + int levelno; + int trx0, try0; + int trx1, try1; + int rpx, rpy; + int prci, prcj; + comp = &pi->comps[pi->compno]; + if (pi->resno >= comp->numresolutions) { + continue; + } + res = &comp->resolutions[pi->resno]; + levelno = comp->numresolutions - 1 - pi->resno; + trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); + try0 = int_ceildiv(pi->ty0, comp->dy << levelno); + trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); + try1 = int_ceildiv(pi->ty1, comp->dy << levelno); + rpx = res->pdx + levelno; + rpy = res->pdy + levelno; + if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){ + continue; + } + if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ + continue; + } + + if ((res->pw==0)||(res->pw==0)) continue; + + if ((trx0==trx1)||(try0==try1)) continue; + + prci = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) + - int_floordivpow2(trx0, res->pdx); + prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) + - int_floordivpow2(try0, res->pdy); + pi->precno = prci + prcj * res->pw; + for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { + index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; + if (!pi->include[index]) { + pi->include[index] = 1; + return true; + } +LABEL_SKIP:; + } + } + } + } + } + + return false; +} + +static bool pi_next_pcrl(opj_pi_iterator_t * pi) { + opj_pi_comp_t *comp = NULL; + opj_pi_resolution_t *res = NULL; + long index = 0; + + if (!pi->first) { + comp = &pi->comps[pi->compno]; + goto LABEL_SKIP; + } else { + int compno, resno; + pi->first = 0; + pi->dx = 0; + pi->dy = 0; + for (compno = 0; compno < pi->numcomps; compno++) { + comp = &pi->comps[compno]; + for (resno = 0; resno < comp->numresolutions; resno++) { + int dx, dy; + res = &comp->resolutions[resno]; + dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); + dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); + pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : int_min(pi->dy, dy); + } + } + } + if (!pi->tp_on){ + pi->poc.ty0 = pi->ty0; + pi->poc.tx0 = pi->tx0; + pi->poc.ty1 = pi->ty1; + pi->poc.tx1 = pi->tx1; + } + for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += pi->dy - (pi->y % pi->dy)) { + for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) { + for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { + comp = &pi->comps[pi->compno]; + for (pi->resno = pi->poc.resno0; pi->resno < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { + int levelno; + int trx0, try0; + int trx1, try1; + int rpx, rpy; + int prci, prcj; + res = &comp->resolutions[pi->resno]; + levelno = comp->numresolutions - 1 - pi->resno; + trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); + try0 = int_ceildiv(pi->ty0, comp->dy << levelno); + trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); + try1 = int_ceildiv(pi->ty1, comp->dy << levelno); + rpx = res->pdx + levelno; + rpy = res->pdy + levelno; + if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){ + continue; + } + if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ + continue; + } + + if ((res->pw==0)||(res->pw==0)) continue; + + if ((trx0==trx1)||(try0==try1)) continue; + + prci = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) + - int_floordivpow2(trx0, res->pdx); + prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) + - int_floordivpow2(try0, res->pdy); + pi->precno = prci + prcj * res->pw; + for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { + index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; + if (!pi->include[index]) { + pi->include[index] = 1; + return true; + } +LABEL_SKIP:; + } + } + } + } + } + + return false; +} + +static bool pi_next_cprl(opj_pi_iterator_t * pi) { + opj_pi_comp_t *comp = NULL; + opj_pi_resolution_t *res = NULL; + long index = 0; + + if (!pi->first) { + comp = &pi->comps[pi->compno]; + goto LABEL_SKIP; + } else { + pi->first = 0; + } + + for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) { + int resno; + comp = &pi->comps[pi->compno]; + pi->dx = 0; + pi->dy = 0; + for (resno = 0; resno < comp->numresolutions; resno++) { + int dx, dy; + res = &comp->resolutions[resno]; + dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); + dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); + pi->dx = !pi->dx ? dx : int_min(pi->dx, dx); + pi->dy = !pi->dy ? dy : int_min(pi->dy, dy); + } + if (!pi->tp_on){ + pi->poc.ty0 = pi->ty0; + pi->poc.tx0 = pi->tx0; + pi->poc.ty1 = pi->ty1; + pi->poc.tx1 = pi->tx1; + } + for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += pi->dy - (pi->y % pi->dy)) { + for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) { + for (pi->resno = pi->poc.resno0; pi->resno < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) { + int levelno; + int trx0, try0; + int trx1, try1; + int rpx, rpy; + int prci, prcj; + res = &comp->resolutions[pi->resno]; + levelno = comp->numresolutions - 1 - pi->resno; + trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); + try0 = int_ceildiv(pi->ty0, comp->dy << levelno); + trx1 = int_ceildiv(pi->tx1, comp->dx << levelno); + try1 = int_ceildiv(pi->ty1, comp->dy << levelno); + rpx = res->pdx + levelno; + rpy = res->pdy + levelno; + if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){ + continue; + } + if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ + continue; + } + + if ((res->pw==0)||(res->pw==0)) continue; + + if ((trx0==trx1)||(try0==try1)) continue; + + prci = int_floordivpow2(int_ceildiv(pi->x, comp->dx << levelno), res->pdx) + - int_floordivpow2(trx0, res->pdx); + prcj = int_floordivpow2(int_ceildiv(pi->y, comp->dy << levelno), res->pdy) + - int_floordivpow2(try0, res->pdy); + pi->precno = prci + prcj * res->pw; + for (pi->layno = pi->poc.layno0; pi->layno < pi->poc.layno1; pi->layno++) { + index = pi->layno * pi->step_l + pi->resno * pi->step_r + pi->compno * pi->step_c + pi->precno * pi->step_p; + if (!pi->include[index]) { + pi->include[index] = 1; + return true; + } +LABEL_SKIP:; + } + } + } + } + } + + return false; +} + +/* +========================================================== + Packet iterator interface +========================================================== +*/ + +opj_pi_iterator_t *pi_create_decode(opj_image_t *image, opj_cp_t *cp, int tileno) { + int p, q; + int compno, resno, pino; + opj_pi_iterator_t *pi = NULL; + opj_tcp_t *tcp = NULL; + opj_tccp_t *tccp = NULL; + + tcp = &cp->tcps[tileno]; + + pi = (opj_pi_iterator_t*) opj_calloc((tcp->numpocs + 1), sizeof(opj_pi_iterator_t)); + if(!pi) { + /* TODO: throw an error */ + return NULL; + } + + for (pino = 0; pino < tcp->numpocs + 1; pino++) { /* change */ + int maxres = 0; + int maxprec = 0; + p = tileno % cp->tw; + q = tileno / cp->tw; + + pi[pino].tx0 = int_max(cp->tx0 + p * cp->tdx, image->x0); + pi[pino].ty0 = int_max(cp->ty0 + q * cp->tdy, image->y0); + pi[pino].tx1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); + pi[pino].ty1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); + pi[pino].numcomps = image->numcomps; + + pi[pino].comps = (opj_pi_comp_t*) opj_calloc(image->numcomps, sizeof(opj_pi_comp_t)); + if(!pi[pino].comps) { + /* TODO: throw an error */ + pi_destroy(pi, cp, tileno); + return NULL; + } + + for (compno = 0; compno < pi->numcomps; compno++) { + int tcx0, tcy0, tcx1, tcy1; + opj_pi_comp_t *comp = &pi[pino].comps[compno]; + tccp = &tcp->tccps[compno]; + comp->dx = image->comps[compno].dx; + comp->dy = image->comps[compno].dy; + comp->numresolutions = tccp->numresolutions; + + comp->resolutions = (opj_pi_resolution_t*) opj_calloc(comp->numresolutions, sizeof(opj_pi_resolution_t)); + if(!comp->resolutions) { + /* TODO: throw an error */ + pi_destroy(pi, cp, tileno); + return NULL; + } + + tcx0 = int_ceildiv(pi->tx0, comp->dx); + tcy0 = int_ceildiv(pi->ty0, comp->dy); + tcx1 = int_ceildiv(pi->tx1, comp->dx); + tcy1 = int_ceildiv(pi->ty1, comp->dy); + if (comp->numresolutions > maxres) { + maxres = comp->numresolutions; + } + + for (resno = 0; resno < comp->numresolutions; resno++) { + int levelno; + int rx0, ry0, rx1, ry1; + int px0, py0, px1, py1; + opj_pi_resolution_t *res = &comp->resolutions[resno]; + if (tccp->csty & J2K_CCP_CSTY_PRT) { + res->pdx = tccp->prcw[resno]; + res->pdy = tccp->prch[resno]; + } else { + res->pdx = 15; + res->pdy = 15; + } + levelno = comp->numresolutions - 1 - resno; + rx0 = int_ceildivpow2(tcx0, levelno); + ry0 = int_ceildivpow2(tcy0, levelno); + rx1 = int_ceildivpow2(tcx1, levelno); + ry1 = int_ceildivpow2(tcy1, levelno); + px0 = int_floordivpow2(rx0, res->pdx) << res->pdx; + py0 = int_floordivpow2(ry0, res->pdy) << res->pdy; + px1 = int_ceildivpow2(rx1, res->pdx) << res->pdx; + py1 = int_ceildivpow2(ry1, res->pdy) << res->pdy; + res->pw = (rx0==rx1)?0:((px1 - px0) >> res->pdx); + res->ph = (ry0==ry1)?0:((py1 - py0) >> res->pdy); + + if (res->pw*res->ph > maxprec) { + maxprec = res->pw*res->ph; + } + + } + } + + tccp = &tcp->tccps[0]; + pi[pino].step_p = 1; + pi[pino].step_c = maxprec * pi[pino].step_p; + pi[pino].step_r = image->numcomps * pi[pino].step_c; + pi[pino].step_l = maxres * pi[pino].step_r; + + if (pino == 0) { + pi[pino].include = (short int*) opj_calloc(image->numcomps * maxres * tcp->numlayers * maxprec, sizeof(short int)); + if(!pi[pino].include) { + /* TODO: throw an error */ + pi_destroy(pi, cp, tileno); + return NULL; + } + } + else { + pi[pino].include = pi[pino - 1].include; + } + + if (tcp->POC == 0) { + pi[pino].first = 1; + pi[pino].poc.resno0 = 0; + pi[pino].poc.compno0 = 0; + pi[pino].poc.layno1 = tcp->numlayers; + pi[pino].poc.resno1 = maxres; + pi[pino].poc.compno1 = image->numcomps; + pi[pino].poc.prg = tcp->prg; + } else { + pi[pino].first = 1; + pi[pino].poc.resno0 = tcp->pocs[pino].resno0; + pi[pino].poc.compno0 = tcp->pocs[pino].compno0; + pi[pino].poc.layno1 = tcp->pocs[pino].layno1; + pi[pino].poc.resno1 = tcp->pocs[pino].resno1; + pi[pino].poc.compno1 = tcp->pocs[pino].compno1; + pi[pino].poc.prg = tcp->pocs[pino].prg; + } + pi[pino].poc.layno0 = 0; + pi[pino].poc.precno0 = 0; + pi[pino].poc.precno1 = maxprec; + + } + + return pi; +} + + +opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno, J2K_T2_MODE t2_mode){ + int p, q, pino; + int compno, resno; + int maxres = 0; + int maxprec = 0; + opj_pi_iterator_t *pi = NULL; + opj_tcp_t *tcp = NULL; + opj_tccp_t *tccp = NULL; + + tcp = &cp->tcps[tileno]; + + pi = (opj_pi_iterator_t*) opj_calloc((tcp->numpocs + 1), sizeof(opj_pi_iterator_t)); + if(!pi) { return NULL;} + pi->tp_on = cp->tp_on; + + for(pino = 0;pino < tcp->numpocs+1 ; pino ++){ + p = tileno % cp->tw; + q = tileno / cp->tw; + + pi[pino].tx0 = int_max(cp->tx0 + p * cp->tdx, image->x0); + pi[pino].ty0 = int_max(cp->ty0 + q * cp->tdy, image->y0); + pi[pino].tx1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); + pi[pino].ty1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); + pi[pino].numcomps = image->numcomps; + + pi[pino].comps = (opj_pi_comp_t*) opj_calloc(image->numcomps, sizeof(opj_pi_comp_t)); + if(!pi[pino].comps) { + pi_destroy(pi, cp, tileno); + return NULL; + } + + for (compno = 0; compno < pi[pino].numcomps; compno++) { + int tcx0, tcy0, tcx1, tcy1; + opj_pi_comp_t *comp = &pi[pino].comps[compno]; + tccp = &tcp->tccps[compno]; + comp->dx = image->comps[compno].dx; + comp->dy = image->comps[compno].dy; + comp->numresolutions = tccp->numresolutions; + + comp->resolutions = (opj_pi_resolution_t*) opj_malloc(comp->numresolutions * sizeof(opj_pi_resolution_t)); + if(!comp->resolutions) { + pi_destroy(pi, cp, tileno); + return NULL; + } + + tcx0 = int_ceildiv(pi[pino].tx0, comp->dx); + tcy0 = int_ceildiv(pi[pino].ty0, comp->dy); + tcx1 = int_ceildiv(pi[pino].tx1, comp->dx); + tcy1 = int_ceildiv(pi[pino].ty1, comp->dy); + if (comp->numresolutions > maxres) { + maxres = comp->numresolutions; + } + + for (resno = 0; resno < comp->numresolutions; resno++) { + int levelno; + int rx0, ry0, rx1, ry1; + int px0, py0, px1, py1; + opj_pi_resolution_t *res = &comp->resolutions[resno]; + if (tccp->csty & J2K_CCP_CSTY_PRT) { + res->pdx = tccp->prcw[resno]; + res->pdy = tccp->prch[resno]; + } else { + res->pdx = 15; + res->pdy = 15; + } + levelno = comp->numresolutions - 1 - resno; + rx0 = int_ceildivpow2(tcx0, levelno); + ry0 = int_ceildivpow2(tcy0, levelno); + rx1 = int_ceildivpow2(tcx1, levelno); + ry1 = int_ceildivpow2(tcy1, levelno); + px0 = int_floordivpow2(rx0, res->pdx) << res->pdx; + py0 = int_floordivpow2(ry0, res->pdy) << res->pdy; + px1 = int_ceildivpow2(rx1, res->pdx) << res->pdx; + py1 = int_ceildivpow2(ry1, res->pdy) << res->pdy; + res->pw = (rx0==rx1)?0:((px1 - px0) >> res->pdx); + res->ph = (ry0==ry1)?0:((py1 - py0) >> res->pdy); + + if (res->pw*res->ph > maxprec) { + maxprec = res->pw * res->ph; + } + } + } + + tccp = &tcp->tccps[0]; + pi[pino].step_p = 1; + pi[pino].step_c = maxprec * pi[pino].step_p; + pi[pino].step_r = image->numcomps * pi[pino].step_c; + pi[pino].step_l = maxres * pi[pino].step_r; + + for (compno = 0; compno < pi->numcomps; compno++) { + opj_pi_comp_t *comp = &pi->comps[compno]; + for (resno = 0; resno < comp->numresolutions; resno++) { + int dx, dy; + opj_pi_resolution_t *res = &comp->resolutions[resno]; + dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); + dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno)); + pi[pino].dx = !pi->dx ? dx : int_min(pi->dx, dx); + pi[pino].dy = !pi->dy ? dy : int_min(pi->dy, dy); + } + } + + if (pino == 0) { + pi[pino].include = (short int*) opj_calloc(tcp->numlayers * pi[pino].step_l, sizeof(short int)); + if(!pi[pino].include) { + pi_destroy(pi, cp, tileno); + return NULL; + } + } + else { + pi[pino].include = pi[pino - 1].include; + } + + /* Generation of boundaries for each prog flag*/ + if(tcp->POC && ( cp->cinema || ((!cp->cinema) && (t2_mode == FINAL_PASS)))){ + tcp->pocs[pino].compS= tcp->pocs[pino].compno0; + tcp->pocs[pino].compE= tcp->pocs[pino].compno1; + tcp->pocs[pino].resS = tcp->pocs[pino].resno0; + tcp->pocs[pino].resE = tcp->pocs[pino].resno1; + tcp->pocs[pino].layE = tcp->pocs[pino].layno1; + tcp->pocs[pino].prg = tcp->pocs[pino].prg1; + if (pino > 0) + tcp->pocs[pino].layS = (tcp->pocs[pino].layE > tcp->pocs[pino - 1].layE) ? tcp->pocs[pino - 1].layE : 0; + }else { + tcp->pocs[pino].compS= 0; + tcp->pocs[pino].compE= image->numcomps; + tcp->pocs[pino].resS = 0; + tcp->pocs[pino].resE = maxres; + tcp->pocs[pino].layS = 0; + tcp->pocs[pino].layE = tcp->numlayers; + tcp->pocs[pino].prg = tcp->prg; + } + tcp->pocs[pino].prcS = 0; + tcp->pocs[pino].prcE = maxprec;; + tcp->pocs[pino].txS = pi[pino].tx0; + tcp->pocs[pino].txE = pi[pino].tx1; + tcp->pocs[pino].tyS = pi[pino].ty0; + tcp->pocs[pino].tyE = pi[pino].ty1; + tcp->pocs[pino].dx = pi[pino].dx; + tcp->pocs[pino].dy = pi[pino].dy; + } + return pi; + } + + + +void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno) { + int compno, pino; + opj_tcp_t *tcp = &cp->tcps[tileno]; + if(pi) { + for (pino = 0; pino < tcp->numpocs + 1; pino++) { + if(pi[pino].comps) { + for (compno = 0; compno < pi->numcomps; compno++) { + opj_pi_comp_t *comp = &pi[pino].comps[compno]; + if(comp->resolutions) { + opj_free(comp->resolutions); + } + } + opj_free(pi[pino].comps); + } + } + if(pi->include) { + opj_free(pi->include); + } + opj_free(pi); + } +} + +bool pi_next(opj_pi_iterator_t * pi) { + switch (pi->poc.prg) { + case LRCP: + return pi_next_lrcp(pi); + case RLCP: + return pi_next_rlcp(pi); + case RPCL: + return pi_next_rpcl(pi); + case PCRL: + return pi_next_pcrl(pi); + case CPRL: + return pi_next_cprl(pi); + case PROG_UNKNOWN: + return false; + } + + return false; +} + +bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){ + char prog[4]; + int i; + int incr_top=1,resetX=0; + opj_tcp_t *tcps =&cp->tcps[tileno]; + opj_poc_t *tcp= &tcps->pocs[pino]; + + pi[pino].first = 1; + pi[pino].poc.prg = tcp->prg; + + switch(tcp->prg){ + case CPRL: strncpy(prog, "CPRL",4); + break; + case LRCP: strncpy(prog, "LRCP",4); + break; + case PCRL: strncpy(prog, "PCRL",4); + break; + case RLCP: strncpy(prog, "RLCP",4); + break; + case RPCL: strncpy(prog, "RPCL",4); + break; + case PROG_UNKNOWN: + return true; + } + + if(!(cp->tp_on && ((!cp->cinema && (t2_mode == FINAL_PASS)) || cp->cinema))){ + pi[pino].poc.resno0 = tcp->resS; + pi[pino].poc.resno1 = tcp->resE; + pi[pino].poc.compno0 = tcp->compS; + pi[pino].poc.compno1 = tcp->compE; + pi[pino].poc.layno0 = tcp->layS; + pi[pino].poc.layno1 = tcp->layE; + pi[pino].poc.precno0 = tcp->prcS; + pi[pino].poc.precno1 = tcp->prcE; + pi[pino].poc.tx0 = tcp->txS; + pi[pino].poc.ty0 = tcp->tyS; + pi[pino].poc.tx1 = tcp->txE; + pi[pino].poc.ty1 = tcp->tyE; + }else { + if( tpnum < cur_totnum_tp){ + for(i=3;i>=0;i--){ + switch(prog[i]){ + case 'C': + if (i > tppos){ + pi[pino].poc.compno0 = tcp->compS; + pi[pino].poc.compno1 = tcp->compE; + }else{ + if (tpnum == 0){ + tcp->comp_t = tcp->compS; + pi[pino].poc.compno0 = tcp->comp_t; + pi[pino].poc.compno1 = tcp->comp_t+1; + tcp->comp_t+=1; + }else{ + if (incr_top == 1){ + if(tcp->comp_t ==tcp->compE){ + tcp->comp_t = tcp->compS; + pi[pino].poc.compno0 = tcp->comp_t; + pi[pino].poc.compno1 = tcp->comp_t+1; + tcp->comp_t+=1; + incr_top=1; + }else{ + pi[pino].poc.compno0 = tcp->comp_t; + pi[pino].poc.compno1 = tcp->comp_t+1; + tcp->comp_t+=1; + incr_top=0; + } + }else{ + pi[pino].poc.compno0 = tcp->comp_t-1; + pi[pino].poc.compno1 = tcp->comp_t; + } + } + } + break; + + case 'R': + if (i > tppos){ + pi[pino].poc.resno0 = tcp->resS; + pi[pino].poc.resno1 = tcp->resE; + }else{ + if (tpnum == 0){ + tcp->res_t = tcp->resS; + pi[pino].poc.resno0 = tcp->res_t; + pi[pino].poc.resno1 = tcp->res_t+1; + tcp->res_t+=1; + }else{ + if (incr_top == 1){ + if(tcp->res_t==tcp->resE){ + tcp->res_t = tcp->resS; + pi[pino].poc.resno0 = tcp->res_t; + pi[pino].poc.resno1 = tcp->res_t+1; + tcp->res_t+=1; + incr_top=1; + }else{ + pi[pino].poc.resno0 = tcp->res_t; + pi[pino].poc.resno1 = tcp->res_t+1; + tcp->res_t+=1; + incr_top=0; + } + }else{ + pi[pino].poc.resno0 = tcp->res_t - 1; + pi[pino].poc.resno1 = tcp->res_t; + } + } + } + break; + + case 'L': + if (i > tppos){ + pi[pino].poc.layno0 = tcp->layS; + pi[pino].poc.layno1 = tcp->layE; + }else{ + if (tpnum == 0){ + tcp->lay_t = tcp->layS; + pi[pino].poc.layno0 = tcp->lay_t; + pi[pino].poc.layno1 = tcp->lay_t+1; + tcp->lay_t+=1; + }else{ + if (incr_top == 1){ + if(tcp->lay_t == tcp->layE){ + tcp->lay_t = tcp->layS; + pi[pino].poc.layno0 = tcp->lay_t; + pi[pino].poc.layno1 = tcp->lay_t+1; + tcp->lay_t+=1; + incr_top=1; + }else{ + pi[pino].poc.layno0 = tcp->lay_t; + pi[pino].poc.layno1 = tcp->lay_t+1; + tcp->lay_t+=1; + incr_top=0; + } + }else{ + pi[pino].poc.layno0 = tcp->lay_t - 1; + pi[pino].poc.layno1 = tcp->lay_t; + } + } + } + break; + + case 'P': + switch(tcp->prg){ + case LRCP: + case RLCP: + if (i > tppos){ + pi[pino].poc.precno0 = tcp->prcS; + pi[pino].poc.precno1 = tcp->prcE; + }else{ + if (tpnum == 0){ + tcp->prc_t = tcp->prcS; + pi[pino].poc.precno0 = tcp->prc_t; + pi[pino].poc.precno1 = tcp->prc_t+1; + tcp->prc_t+=1; + }else{ + if (incr_top == 1){ + if(tcp->prc_t == tcp->prcE){ + tcp->prc_t = tcp->prcS; + pi[pino].poc.precno0 = tcp->prc_t; + pi[pino].poc.precno1 = tcp->prc_t+1; + tcp->prc_t+=1; + incr_top=1; + }else{ + pi[pino].poc.precno0 = tcp->prc_t; + pi[pino].poc.precno1 = tcp->prc_t+1; + tcp->prc_t+=1; + incr_top=0; + } + }else{ + pi[pino].poc.precno0 = tcp->prc_t - 1; + pi[pino].poc.precno1 = tcp->prc_t; + } + } + } + break; + default: + if (i > tppos){ + pi[pino].poc.tx0 = tcp->txS; + pi[pino].poc.ty0 = tcp->tyS; + pi[pino].poc.tx1 = tcp->txE; + pi[pino].poc.ty1 = tcp->tyE; + }else{ + if (tpnum == 0){ + tcp->tx0_t = tcp->txS; + tcp->ty0_t = tcp->tyS; + pi[pino].poc.tx0 = tcp->tx0_t; + pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx - (tcp->tx0_t % tcp->dx); + pi[pino].poc.ty0 = tcp->ty0_t; + pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); + tcp->tx0_t = pi[pino].poc.tx1; + tcp->ty0_t = pi[pino].poc.ty1; + }else{ + if (incr_top == 1){ + if(tcp->tx0_t >= tcp->txE){ + if(tcp->ty0_t >= tcp->tyE){ + tcp->ty0_t = tcp->tyS; + pi[pino].poc.ty0 = tcp->ty0_t; + pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); + tcp->ty0_t = pi[pino].poc.ty1; + incr_top=1;resetX=1; + }else{ + pi[pino].poc.ty0 = tcp->ty0_t; + pi[pino].poc.ty1 = tcp->ty0_t + tcp->dy - (tcp->ty0_t % tcp->dy); + tcp->ty0_t = pi[pino].poc.ty1; + incr_top=0;resetX=1; + } + if(resetX==1){ + tcp->tx0_t = tcp->txS; + pi[pino].poc.tx0 = tcp->tx0_t; + pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx); + tcp->tx0_t = pi[pino].poc.tx1; + } + }else{ + pi[pino].poc.tx0 = tcp->tx0_t; + pi[pino].poc.tx1 = tcp->tx0_t + tcp->dx- (tcp->tx0_t % tcp->dx); + tcp->tx0_t = pi[pino].poc.tx1; + pi[pino].poc.ty0 = tcp->ty0_t - tcp->dy - (tcp->ty0_t % tcp->dy); + pi[pino].poc.ty1 = tcp->ty0_t ; + incr_top=0; + } + }else{ + pi[pino].poc.tx0 = tcp->tx0_t - tcp->dx - (tcp->tx0_t % tcp->dx); + pi[pino].poc.tx1 = tcp->tx0_t ; + pi[pino].poc.ty0 = tcp->ty0_t - tcp->dy - (tcp->ty0_t % tcp->dy); + pi[pino].poc.ty1 = tcp->ty0_t ; + } + } + } + break; + } + break; + } + } + } + } + return false; +} + diff --git a/extern/libopenjpeg/pi.h b/extern/libopenjpeg/pi.h new file mode 100644 index 00000000000..b5e0f6a4df8 --- /dev/null +++ b/extern/libopenjpeg/pi.h @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __PI_H +#define __PI_H +/** +@file pi.h +@brief Implementation of a packet iterator (PI) + +The functions in PI.C have for goal to realize a packet iterator that permits to get the next +packet following the progression order and change of it. The functions in PI.C are used +by some function in T2.C. +*/ + +/** @defgroup PI PI - Implementation of a packet iterator */ +/*@{*/ + +/** +FIXME: documentation +*/ +typedef struct opj_pi_resolution { + int pdx, pdy; + int pw, ph; +} opj_pi_resolution_t; + +/** +FIXME: documentation +*/ +typedef struct opj_pi_comp { + int dx, dy; + /** number of resolution levels */ + int numresolutions; + opj_pi_resolution_t *resolutions; +} opj_pi_comp_t; + +/** +Packet iterator +*/ +typedef struct opj_pi_iterator { + /** Enabling Tile part generation*/ + char tp_on; + /** precise if the packet has been already used (usefull for progression order change) */ + short int *include; + /** layer step used to localize the packet in the include vector */ + int step_l; + /** resolution step used to localize the packet in the include vector */ + int step_r; + /** component step used to localize the packet in the include vector */ + int step_c; + /** precinct step used to localize the packet in the include vector */ + int step_p; + /** component that identify the packet */ + int compno; + /** resolution that identify the packet */ + int resno; + /** precinct that identify the packet */ + int precno; + /** layer that identify the packet */ + int layno; + /** 0 if the first packet */ + int first; + /** progression order change information */ + opj_poc_t poc; + /** number of components in the image */ + int numcomps; + /** Components*/ + opj_pi_comp_t *comps; + int tx0, ty0, tx1, ty1; + int x, y, dx, dy; +} opj_pi_iterator_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a packet iterator for Encoder +@param image Raw image for which the packets will be listed +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass +@return Returns a packet iterator that points to the first packet of the tile +@see pi_destroy +*/ +opj_pi_iterator_t *pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno,J2K_T2_MODE t2_mode); +/** +Modify the packet iterator for enabling tile part generation +@param pi Handle to the packet iterator generated in pi_initialise_encode +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@param tpnum Tile part number of the current tile +@param tppos The position of the tile part flag in the progression order +@param cur_totnum_tp The total number of tile parts in the current tile +@return Returns true if an error is detected +*/ +bool pi_create_encode(opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp); +/** +Create a packet iterator for Decoder +@param image Raw image for which the packets will be listed +@param cp Coding parameters +@param tileno Number that identifies the tile for which to list the packets +@return Returns a packet iterator that points to the first packet of the tile +@see pi_destroy +*/ +opj_pi_iterator_t *pi_create_decode(opj_image_t * image, opj_cp_t * cp, int tileno); + +/** +Destroy a packet iterator +@param pi Previously created packet iterator +@param cp Coding parameters +@param tileno Number that identifies the tile for which the packets were listed +@see pi_create +*/ +void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno); + +/** +Modify the packet iterator to point to the next packet +@param pi Packet iterator to modify +@return Returns false if pi pointed to the last packet or else returns true +*/ +bool pi_next(opj_pi_iterator_t * pi); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __PI_H */ diff --git a/extern/libopenjpeg/raw.c b/extern/libopenjpeg/raw.c new file mode 100644 index 00000000000..3d231bfdc6b --- /dev/null +++ b/extern/libopenjpeg/raw.c @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* +========================================================== + local functions +========================================================== +*/ + + +/* +========================================================== + RAW encoding interface +========================================================== +*/ + +opj_raw_t* raw_create(void) { + opj_raw_t *raw = (opj_raw_t*)opj_malloc(sizeof(opj_raw_t)); + return raw; +} + +void raw_destroy(opj_raw_t *raw) { + if(raw) { + opj_free(raw); + } +} + +int raw_numbytes(opj_raw_t *raw) { + return raw->bp - raw->start; +} + +void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len) { + raw->start = bp; + raw->lenmax = len; + raw->len = 0; + raw->c = 0; + raw->ct = 0; +} + +int raw_decode(opj_raw_t *raw) { + int d; + if (raw->ct == 0) { + raw->ct = 8; + if (raw->len == raw->lenmax) { + raw->c = 0xff; + } else { + if (raw->c == 0xff) { + raw->ct = 7; + } + raw->c = *(raw->start + raw->len); + raw->len++; + } + } + raw->ct--; + d = (raw->c >> raw->ct) & 0x01; + + return d; +} + diff --git a/extern/libopenjpeg/raw.h b/extern/libopenjpeg/raw.h new file mode 100644 index 00000000000..3c4b372f3f6 --- /dev/null +++ b/extern/libopenjpeg/raw.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __RAW_H +#define __RAW_H +/** +@file raw.h +@brief Implementation of operations for raw encoding (RAW) + +The functions in RAW.C have for goal to realize the operation of raw encoding linked +with the corresponding mode switch. +*/ + +/** @defgroup RAW RAW - Implementation of operations for raw encoding */ +/*@{*/ + +/** +RAW encoding operations +*/ +typedef struct opj_raw { + /** temporary buffer where bits are coded or decoded */ + unsigned char c; + /** number of bits already read or free to write */ + unsigned int ct; + /** maximum length to decode */ + unsigned int lenmax; + /** length decoded */ + unsigned int len; + /** pointer to the current position in the buffer */ + unsigned char *bp; + /** pointer to the start of the buffer */ + unsigned char *start; + /** pointer to the end of the buffer */ + unsigned char *end; +} opj_raw_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new RAW handle +@return Returns a new RAW handle if successful, returns NULL otherwise +*/ +opj_raw_t* raw_create(void); +/** +Destroy a previously created RAW handle +@param raw RAW handle to destroy +*/ +void raw_destroy(opj_raw_t *raw); +/** +Return the number of bytes written/read since initialisation +@param raw RAW handle to destroy +@return Returns the number of bytes already encoded +*/ +int raw_numbytes(opj_raw_t *raw); +/** +Initialize the decoder +@param raw RAW handle +@param bp Pointer to the start of the buffer from which the bytes will be read +@param len Length of the input buffer +*/ +void raw_init_dec(opj_raw_t *raw, unsigned char *bp, int len); +/** +Decode a symbol using raw-decoder. Cfr p.506 TAUBMAN +@param raw RAW handle +@return Returns the decoded symbol (0 or 1) +*/ +int raw_decode(opj_raw_t *raw); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __RAW_H */ diff --git a/extern/libopenjpeg/t1.c b/extern/libopenjpeg/t1.c new file mode 100644 index 00000000000..ad1c6a83ab6 --- /dev/null +++ b/extern/libopenjpeg/t1.c @@ -0,0 +1,1208 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2007, Callum Lerwick + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" +#include "t1_luts.h" + +/** @defgroup T1 T1 - Implementation of the tier-1 coding */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +static INLINE char t1_getctxno_zc(int f, int orient); +static char t1_getctxno_sc(int f); +static INLINE int t1_getctxno_mag(int f); +static char t1_getspb(int f); +static short t1_getnmsedec_sig(int x, int bitpos); +static short t1_getnmsedec_ref(int x, int bitpos); +static void t1_updateflags(flag_t *flagsp, int s, int stride); +/** +Encode significant pass +*/ +static void t1_enc_sigpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int bpno, + int one, + int *nmsedec, + char type, + int vsc); +/** +Decode significant pass +*/ +static void t1_dec_sigpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int oneplushalf, + char type, + int vsc); +/** +Encode significant pass +*/ +static void t1_enc_sigpass( + opj_t1_t *t1, + int bpno, + int orient, + int *nmsedec, + char type, + int cblksty); +/** +Decode significant pass +*/ +static void t1_dec_sigpass( + opj_t1_t *t1, + int bpno, + int orient, + char type, + int cblksty); +/** +Encode refinement pass +*/ +static void t1_enc_refpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int bpno, + int one, + int *nmsedec, + char type, + int vsc); +/** +Decode refinement pass +*/ +static void t1_dec_refpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int poshalf, + int neghalf, + char type, + int vsc); +/** +Encode refinement pass +*/ +static void t1_enc_refpass( + opj_t1_t *t1, + int bpno, + int *nmsedec, + char type, + int cblksty); +/** +Decode refinement pass +*/ +static void t1_dec_refpass( + opj_t1_t *t1, + int bpno, + char type, + int cblksty); +/** +Encode clean-up pass +*/ +static void t1_enc_clnpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int bpno, + int one, + int *nmsedec, + int partial, + int vsc); +/** +Decode clean-up pass +*/ +static void t1_dec_clnpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int oneplushalf, + int partial, + int vsc); +/** +Encode clean-up pass +*/ +static void t1_enc_clnpass( + opj_t1_t *t1, + int bpno, + int orient, + int *nmsedec, + int cblksty); +/** +Decode clean-up pass +*/ +static void t1_dec_clnpass( + opj_t1_t *t1, + int bpno, + int orient, + int cblksty); +static double t1_getwmsedec( + int nmsedec, + int compno, + int level, + int orient, + int bpno, + int qmfbid, + double stepsize, + int numcomps); +/** +Encode 1 code-block +@param t1 T1 handle +@param cblk Code-block coding parameters +@param orient +@param compno Component number +@param level +@param qmfbid +@param stepsize +@param cblksty Code-block style +@param numcomps +@param tile +*/ +static void t1_encode_cblk( + opj_t1_t *t1, + opj_tcd_cblk_enc_t* cblk, + int orient, + int compno, + int level, + int qmfbid, + double stepsize, + int cblksty, + int numcomps, + opj_tcd_tile_t * tile); +/** +Decode 1 code-block +@param t1 T1 handle +@param cblk Code-block coding parameters +@param orient +@param roishift Region of interest shifting value +@param cblksty Code-block style +*/ +static void t1_decode_cblk( + opj_t1_t *t1, + opj_tcd_cblk_dec_t* cblk, + int orient, + int roishift, + int cblksty); + +/*@}*/ + +/*@}*/ + +/* ----------------------------------------------------------------------- */ + +static char t1_getctxno_zc(int f, int orient) { + return lut_ctxno_zc[(orient << 8) | (f & T1_SIG_OTH)]; +} + +static char t1_getctxno_sc(int f) { + return lut_ctxno_sc[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; +} + +static int t1_getctxno_mag(int f) { + int tmp1 = (f & T1_SIG_OTH) ? T1_CTXNO_MAG + 1 : T1_CTXNO_MAG; + int tmp2 = (f & T1_REFINE) ? T1_CTXNO_MAG + 2 : tmp1; + return (tmp2); +} + +static char t1_getspb(int f) { + return lut_spb[(f & (T1_SIG_PRIM | T1_SGN)) >> 4]; +} + +static short t1_getnmsedec_sig(int x, int bitpos) { + if (bitpos > T1_NMSEDEC_FRACBITS) { + return lut_nmsedec_sig[(x >> (bitpos - T1_NMSEDEC_FRACBITS)) & ((1 << T1_NMSEDEC_BITS) - 1)]; + } + + return lut_nmsedec_sig0[x & ((1 << T1_NMSEDEC_BITS) - 1)]; +} + +static short t1_getnmsedec_ref(int x, int bitpos) { + if (bitpos > T1_NMSEDEC_FRACBITS) { + return lut_nmsedec_ref[(x >> (bitpos - T1_NMSEDEC_FRACBITS)) & ((1 << T1_NMSEDEC_BITS) - 1)]; + } + + return lut_nmsedec_ref0[x & ((1 << T1_NMSEDEC_BITS) - 1)]; +} + +static void t1_updateflags(flag_t *flagsp, int s, int stride) { + flag_t *np = flagsp - stride; + flag_t *sp = flagsp + stride; + + static const flag_t mod[] = { + T1_SIG_S, T1_SIG_S|T1_SGN_S, + T1_SIG_E, T1_SIG_E|T1_SGN_E, + T1_SIG_W, T1_SIG_W|T1_SGN_W, + T1_SIG_N, T1_SIG_N|T1_SGN_N + }; + + np[-1] |= T1_SIG_SE; + np[0] |= mod[s]; + np[1] |= T1_SIG_SW; + + flagsp[-1] |= mod[s+2]; + flagsp[0] |= T1_SIG; + flagsp[1] |= mod[s+4]; + + sp[-1] |= T1_SIG_NE; + sp[0] |= mod[s+6]; + sp[1] |= T1_SIG_NW; +} + +static void t1_enc_sigpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int bpno, + int one, + int *nmsedec, + char type, + int vsc) +{ + int v, flag; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { + v = int_abs(*datap) & one ? 1 : 0; + mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); /* ESSAI */ + if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ + mqc_bypass_enc(mqc, v); + } else { + mqc_encode(mqc, v); + } + if (v) { + v = *datap < 0 ? 1 : 0; + *nmsedec += t1_getnmsedec_sig(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); + mqc_setcurctx(mqc, t1_getctxno_sc(flag)); /* ESSAI */ + if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ + mqc_bypass_enc(mqc, v); + } else { + mqc_encode(mqc, v ^ t1_getspb(flag)); + } + t1_updateflags(flagsp, v, t1->flags_stride); + } + *flagsp |= T1_VISIT; + } +} + +static void t1_dec_sigpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int oneplushalf, + char type, + int vsc) +{ + int v, flag; + + opj_raw_t *raw = t1->raw; /* RAW component */ + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if ((flag & T1_SIG_OTH) && !(flag & (T1_SIG | T1_VISIT))) { + if (type == T1_TYPE_RAW) { + if (raw_decode(raw)) { + v = raw_decode(raw); /* ESSAI */ + *datap = v ? -oneplushalf : oneplushalf; + t1_updateflags(flagsp, v, t1->flags_stride); + } + } else { + mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); + if (mqc_decode(mqc)) { + mqc_setcurctx(mqc, t1_getctxno_sc(flag)); + v = mqc_decode(mqc) ^ t1_getspb(flag); + *datap = v ? -oneplushalf : oneplushalf; + t1_updateflags(flagsp, v, t1->flags_stride); + } + } + *flagsp |= T1_VISIT; + } +} /* VSC and BYPASS by Antonin */ + +static void t1_enc_sigpass( + opj_t1_t *t1, + int bpno, + int orient, + int *nmsedec, + char type, + int cblksty) +{ + int i, j, k, one, vsc; + *nmsedec = 0; + one = 1 << (bpno + T1_NMSEDEC_FRACBITS); + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + for (j = k; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_enc_sigpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + orient, + bpno, + one, + nmsedec, + type, + vsc); + } + } + } +} + +static void t1_dec_sigpass( + opj_t1_t *t1, + int bpno, + int orient, + char type, + int cblksty) +{ + int i, j, k, one, half, oneplushalf, vsc; + one = 1 << bpno; + half = one >> 1; + oneplushalf = one | half; + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + for (j = k; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_dec_sigpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + orient, + oneplushalf, + type, + vsc); + } + } + } +} /* VSC and BYPASS by Antonin */ + +static void t1_enc_refpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int bpno, + int one, + int *nmsedec, + char type, + int vsc) +{ + int v, flag; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { + *nmsedec += t1_getnmsedec_ref(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); + v = int_abs(*datap) & one ? 1 : 0; + mqc_setcurctx(mqc, t1_getctxno_mag(flag)); /* ESSAI */ + if (type == T1_TYPE_RAW) { /* BYPASS/LAZY MODE */ + mqc_bypass_enc(mqc, v); + } else { + mqc_encode(mqc, v); + } + *flagsp |= T1_REFINE; + } +} + +static void t1_dec_refpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int poshalf, + int neghalf, + char type, + int vsc) +{ + int v, t, flag; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + opj_raw_t *raw = t1->raw; /* RAW component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if ((flag & (T1_SIG | T1_VISIT)) == T1_SIG) { + mqc_setcurctx(mqc, t1_getctxno_mag(flag)); /* ESSAI */ + if (type == T1_TYPE_RAW) { + v = raw_decode(raw); + } else { + v = mqc_decode(mqc); + } + t = v ? poshalf : neghalf; + *datap += *datap < 0 ? -t : t; + *flagsp |= T1_REFINE; + } +} /* VSC and BYPASS by Antonin */ + +static void t1_enc_refpass( + opj_t1_t *t1, + int bpno, + int *nmsedec, + char type, + int cblksty) +{ + int i, j, k, one, vsc; + *nmsedec = 0; + one = 1 << (bpno + T1_NMSEDEC_FRACBITS); + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + for (j = k; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_enc_refpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + bpno, + one, + nmsedec, + type, + vsc); + } + } + } +} + +static void t1_dec_refpass( + opj_t1_t *t1, + int bpno, + char type, + int cblksty) +{ + int i, j, k, one, poshalf, neghalf; + int vsc; + one = 1 << bpno; + poshalf = one >> 1; + neghalf = bpno > 0 ? -poshalf : -1; + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + for (j = k; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_dec_refpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + poshalf, + neghalf, + type, + vsc); + } + } + } +} /* VSC and BYPASS by Antonin */ + +static void t1_enc_clnpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int bpno, + int one, + int *nmsedec, + int partial, + int vsc) +{ + int v, flag; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if (partial) { + goto LABEL_PARTIAL; + } + if (!(*flagsp & (T1_SIG | T1_VISIT))) { + mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); + v = int_abs(*datap) & one ? 1 : 0; + mqc_encode(mqc, v); + if (v) { +LABEL_PARTIAL: + *nmsedec += t1_getnmsedec_sig(int_abs(*datap), bpno + T1_NMSEDEC_FRACBITS); + mqc_setcurctx(mqc, t1_getctxno_sc(flag)); + v = *datap < 0 ? 1 : 0; + mqc_encode(mqc, v ^ t1_getspb(flag)); + t1_updateflags(flagsp, v, t1->flags_stride); + } + } + *flagsp &= ~T1_VISIT; +} + +static void t1_dec_clnpass_step( + opj_t1_t *t1, + flag_t *flagsp, + int *datap, + int orient, + int oneplushalf, + int partial, + int vsc) +{ + int v, flag; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + flag = vsc ? ((*flagsp) & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) : (*flagsp); + if (partial) { + goto LABEL_PARTIAL; + } + if (!(flag & (T1_SIG | T1_VISIT))) { + mqc_setcurctx(mqc, t1_getctxno_zc(flag, orient)); + if (mqc_decode(mqc)) { +LABEL_PARTIAL: + mqc_setcurctx(mqc, t1_getctxno_sc(flag)); + v = mqc_decode(mqc) ^ t1_getspb(flag); + *datap = v ? -oneplushalf : oneplushalf; + t1_updateflags(flagsp, v, t1->flags_stride); + } + } + *flagsp &= ~T1_VISIT; +} /* VSC and BYPASS by Antonin */ + +static void t1_enc_clnpass( + opj_t1_t *t1, + int bpno, + int orient, + int *nmsedec, + int cblksty) +{ + int i, j, k, one, agg, runlen, vsc; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + *nmsedec = 0; + one = 1 << (bpno + T1_NMSEDEC_FRACBITS); + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + if (k + 3 < t1->h) { + if (cblksty & J2K_CCP_CBLKSTY_VSC) { + agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || (MACRO_t1_flags(1 + k + 3,1 + i) + & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); + } else { + agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 3,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); + } + } else { + agg = 0; + } + if (agg) { + for (runlen = 0; runlen < 4; ++runlen) { + if (int_abs(t1->data[((k + runlen)*t1->w) + i]) & one) + break; + } + mqc_setcurctx(mqc, T1_CTXNO_AGG); + mqc_encode(mqc, runlen != 4); + if (runlen == 4) { + continue; + } + mqc_setcurctx(mqc, T1_CTXNO_UNI); + mqc_encode(mqc, runlen >> 1); + mqc_encode(mqc, runlen & 1); + } else { + runlen = 0; + } + for (j = k + runlen; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_enc_clnpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + orient, + bpno, + one, + nmsedec, + agg && (j == k + runlen), + vsc); + } + } + } +} + +static void t1_dec_clnpass( + opj_t1_t *t1, + int bpno, + int orient, + int cblksty) +{ + int i, j, k, one, half, oneplushalf, agg, runlen, vsc; + int segsym = cblksty & J2K_CCP_CBLKSTY_SEGSYM; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + one = 1 << bpno; + half = one >> 1; + oneplushalf = one | half; + for (k = 0; k < t1->h; k += 4) { + for (i = 0; i < t1->w; ++i) { + if (k + 3 < t1->h) { + if (cblksty & J2K_CCP_CBLKSTY_VSC) { + agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || (MACRO_t1_flags(1 + k + 3,1 + i) + & (~(T1_SIG_S | T1_SIG_SE | T1_SIG_SW | T1_SGN_S))) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); + } else { + agg = !(MACRO_t1_flags(1 + k,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 1,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 2,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH) + || MACRO_t1_flags(1 + k + 3,1 + i) & (T1_SIG | T1_VISIT | T1_SIG_OTH)); + } + } else { + agg = 0; + } + if (agg) { + mqc_setcurctx(mqc, T1_CTXNO_AGG); + if (!mqc_decode(mqc)) { + continue; + } + mqc_setcurctx(mqc, T1_CTXNO_UNI); + runlen = mqc_decode(mqc); + runlen = (runlen << 1) | mqc_decode(mqc); + } else { + runlen = 0; + } + for (j = k + runlen; j < k + 4 && j < t1->h; ++j) { + vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0; + t1_dec_clnpass_step( + t1, + &t1->flags[((j+1) * t1->flags_stride) + i + 1], + &t1->data[(j * t1->w) + i], + orient, + oneplushalf, + agg && (j == k + runlen), + vsc); + } + } + } + if (segsym) { + int v = 0; + mqc_setcurctx(mqc, T1_CTXNO_UNI); + v = mqc_decode(mqc); + v = (v << 1) | mqc_decode(mqc); + v = (v << 1) | mqc_decode(mqc); + v = (v << 1) | mqc_decode(mqc); + /* + if (v!=0xa) { + opj_event_msg(t1->cinfo, EVT_WARNING, "Bad segmentation symbol %x\n", v); + } + */ + } +} /* VSC and BYPASS by Antonin */ + + +/** mod fixed_quality */ +static double t1_getwmsedec( + int nmsedec, + int compno, + int level, + int orient, + int bpno, + int qmfbid, + double stepsize, + int numcomps) +{ + double w1, w2, wmsedec; + if (qmfbid == 1) { + w1 = (numcomps > 1) ? mct_getnorm(compno) : 1.0; + w2 = dwt_getnorm(level, orient); + } else { /* if (qmfbid == 0) */ + w1 = (numcomps > 1) ? mct_getnorm_real(compno) : 1.0; + w2 = dwt_getnorm_real(level, orient); + } + wmsedec = w1 * w2 * stepsize * (1 << bpno); + wmsedec *= wmsedec * nmsedec / 8192.0; + + return wmsedec; +} + +static bool allocate_buffers( + opj_t1_t *t1, + int w, + int h) +{ + int datasize=w * h; + int flagssize; + + if(datasize > t1->datasize){ + opj_aligned_free(t1->data); + t1->data = (int*) opj_aligned_malloc(datasize * sizeof(int)); + if(!t1->data){ + return false; + } + t1->datasize=datasize; + } + memset(t1->data,0,datasize * sizeof(int)); + + t1->flags_stride=w+2; + flagssize=t1->flags_stride * (h+2); + + if(flagssize > t1->flagssize){ + opj_aligned_free(t1->flags); + t1->flags = (flag_t*) opj_aligned_malloc(flagssize * sizeof(flag_t)); + if(!t1->flags){ + return false; + } + t1->flagssize=flagssize; + } + memset(t1->flags,0,flagssize * sizeof(flag_t)); + + t1->w=w; + t1->h=h; + + return true; +} + +/** mod fixed_quality */ +static void t1_encode_cblk( + opj_t1_t *t1, + opj_tcd_cblk_enc_t* cblk, + int orient, + int compno, + int level, + int qmfbid, + double stepsize, + int cblksty, + int numcomps, + opj_tcd_tile_t * tile) +{ + double cumwmsedec = 0.0; + + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + int passno, bpno, passtype; + int nmsedec = 0; + int i, max; + char type = T1_TYPE_MQ; + double tempwmsedec; + + max = 0; + for (i = 0; i < t1->w * t1->h; ++i) { + int tmp = abs(t1->data[i]); + max = int_max(max, tmp); + } + + cblk->numbps = max ? (int_floorlog2(max) + 1) - T1_NMSEDEC_FRACBITS : 0; + + bpno = cblk->numbps - 1; + passtype = 2; + + mqc_resetstates(mqc); + mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); + mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); + mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); + mqc_init_enc(mqc, cblk->data); + + for (passno = 0; bpno >= 0; ++passno) { + opj_tcd_pass_t *pass = &cblk->passes[passno]; + int correction = 3; + type = ((bpno < (cblk->numbps - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; + + switch (passtype) { + case 0: + t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty); + break; + case 1: + t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty); + break; + case 2: + t1_enc_clnpass(t1, bpno, orient, &nmsedec, cblksty); + /* code switch SEGMARK (i.e. SEGSYM) */ + if (cblksty & J2K_CCP_CBLKSTY_SEGSYM) + mqc_segmark_enc(mqc); + break; + } + + /* fixed_quality */ + tempwmsedec = t1_getwmsedec(nmsedec, compno, level, orient, bpno, qmfbid, stepsize, numcomps); + cumwmsedec += tempwmsedec; + tile->distotile += tempwmsedec; + + /* Code switch "RESTART" (i.e. TERMALL) */ + if ((cblksty & J2K_CCP_CBLKSTY_TERMALL) && !((passtype == 2) && (bpno - 1 < 0))) { + if (type == T1_TYPE_RAW) { + mqc_flush(mqc); + correction = 1; + /* correction = mqc_bypass_flush_enc(); */ + } else { /* correction = mqc_restart_enc(); */ + mqc_flush(mqc); + correction = 1; + } + pass->term = 1; + } else { + if (((bpno < (cblk->numbps - 4) && (passtype > 0)) + || ((bpno == (cblk->numbps - 4)) && (passtype == 2))) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) { + if (type == T1_TYPE_RAW) { + mqc_flush(mqc); + correction = 1; + /* correction = mqc_bypass_flush_enc(); */ + } else { /* correction = mqc_restart_enc(); */ + mqc_flush(mqc); + correction = 1; + } + pass->term = 1; + } else { + pass->term = 0; + } + } + + if (++passtype == 3) { + passtype = 0; + bpno--; + } + + if (pass->term && bpno > 0) { + type = ((bpno < (cblk->numbps - 4)) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; + if (type == T1_TYPE_RAW) + mqc_bypass_init_enc(mqc); + else + mqc_restart_init_enc(mqc); + } + + pass->distortiondec = cumwmsedec; + pass->rate = mqc_numbytes(mqc) + correction; /* FIXME */ + + /* Code-switch "RESET" */ + if (cblksty & J2K_CCP_CBLKSTY_RESET) + mqc_reset_enc(mqc); + } + + /* Code switch "ERTERM" (i.e. PTERM) */ + if (cblksty & J2K_CCP_CBLKSTY_PTERM) + mqc_erterm_enc(mqc); + else /* Default coding */ if (!(cblksty & J2K_CCP_CBLKSTY_LAZY)) + mqc_flush(mqc); + + cblk->totalpasses = passno; + + for (passno = 0; passnototalpasses; passno++) { + opj_tcd_pass_t *pass = &cblk->passes[passno]; + if (pass->rate > mqc_numbytes(mqc)) + pass->rate = mqc_numbytes(mqc); + /*Preventing generation of FF as last data byte of a pass*/ + if((pass->rate>1) && (cblk->data[pass->rate - 1] == 0xFF)){ + pass->rate--; + } + pass->len = pass->rate - (passno == 0 ? 0 : cblk->passes[passno - 1].rate); + } +} + +static void t1_decode_cblk( + opj_t1_t *t1, + opj_tcd_cblk_dec_t* cblk, + int orient, + int roishift, + int cblksty) +{ + opj_raw_t *raw = t1->raw; /* RAW component */ + opj_mqc_t *mqc = t1->mqc; /* MQC component */ + + int bpno, passtype; + int segno, passno; + char type = T1_TYPE_MQ; /* BYPASS mode */ + + if(!allocate_buffers( + t1, + cblk->x1 - cblk->x0, + cblk->y1 - cblk->y0)) + { + return; + } + + bpno = roishift + cblk->numbps - 1; + passtype = 2; + + mqc_resetstates(mqc); + mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); + mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); + mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); + + for (segno = 0; segno < cblk->numsegs; ++segno) { + opj_tcd_seg_t *seg = &cblk->segs[segno]; + + /* BYPASS mode */ + type = ((bpno <= (cblk->numbps - 1) - 4) && (passtype < 2) && (cblksty & J2K_CCP_CBLKSTY_LAZY)) ? T1_TYPE_RAW : T1_TYPE_MQ; + /* FIXME: slviewer gets here with a null pointer. Why? Partially downloaded and/or corrupt textures? */ + if(seg->data == NULL){ + continue; + } + if (type == T1_TYPE_RAW) { + raw_init_dec(raw, (*seg->data) + seg->dataindex, seg->len); + } else { + mqc_init_dec(mqc, (*seg->data) + seg->dataindex, seg->len); + } + + for (passno = 0; passno < seg->numpasses; ++passno) { + switch (passtype) { + case 0: + t1_dec_sigpass(t1, bpno+1, orient, type, cblksty); + break; + case 1: + t1_dec_refpass(t1, bpno+1, type, cblksty); + break; + case 2: + t1_dec_clnpass(t1, bpno+1, orient, cblksty); + break; + } + + if ((cblksty & J2K_CCP_CBLKSTY_RESET) && type == T1_TYPE_MQ) { + mqc_resetstates(mqc); + mqc_setstate(mqc, T1_CTXNO_UNI, 0, 46); + mqc_setstate(mqc, T1_CTXNO_AGG, 0, 3); + mqc_setstate(mqc, T1_CTXNO_ZC, 0, 4); + } + if (++passtype == 3) { + passtype = 0; + bpno--; + } + } + } +} + +/* ----------------------------------------------------------------------- */ + +opj_t1_t* t1_create(opj_common_ptr cinfo) { + opj_t1_t *t1 = (opj_t1_t*) opj_malloc(sizeof(opj_t1_t)); + if(!t1) + return NULL; + + t1->cinfo = cinfo; + /* create MQC and RAW handles */ + t1->mqc = mqc_create(); + t1->raw = raw_create(); + + t1->data=NULL; + t1->flags=NULL; + t1->datasize=0; + t1->flagssize=0; + + return t1; +} + +void t1_destroy(opj_t1_t *t1) { + if(t1) { + /* destroy MQC and RAW handles */ + mqc_destroy(t1->mqc); + raw_destroy(t1->raw); + opj_aligned_free(t1->data); + opj_aligned_free(t1->flags); + opj_free(t1); + } +} + +void t1_encode_cblks( + opj_t1_t *t1, + opj_tcd_tile_t *tile, + opj_tcp_t *tcp) +{ + int compno, resno, bandno, precno, cblkno; + + tile->distotile = 0; /* fixed_quality */ + + for (compno = 0; compno < tile->numcomps; ++compno) { + opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; + opj_tccp_t* tccp = &tcp->tccps[compno]; + int tile_w = tilec->x1 - tilec->x0; + + for (resno = 0; resno < tilec->numresolutions; ++resno) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + for (bandno = 0; bandno < res->numbands; ++bandno) { + opj_tcd_band_t* restrict band = &res->bands[bandno]; + + for (precno = 0; precno < res->pw * res->ph; ++precno) { + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + for (cblkno = 0; cblkno < prc->cw * prc->ch; ++cblkno) { + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + int* restrict datap; + int* restrict tiledp; + int cblk_w; + int cblk_h; + int i, j; + + int x = cblk->x0 - band->x0; + int y = cblk->y0 - band->y0; + if (band->bandno & 1) { + opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1]; + x += pres->x1 - pres->x0; + } + if (band->bandno & 2) { + opj_tcd_resolution_t *pres = &tilec->resolutions[resno - 1]; + y += pres->y1 - pres->y0; + } + + if(!allocate_buffers( + t1, + cblk->x1 - cblk->x0, + cblk->y1 - cblk->y0)) + { + return; + } + + datap=t1->data; + cblk_w = t1->w; + cblk_h = t1->h; + + tiledp=&tilec->data[(y * tile_w) + x]; + if (tccp->qmfbid == 1) { + for (j = 0; j < cblk_h; ++j) { + for (i = 0; i < cblk_w; ++i) { + int tmp = tiledp[(j * tile_w) + i]; + datap[(j * cblk_w) + i] = tmp << T1_NMSEDEC_FRACBITS; + } + } + } else { /* if (tccp->qmfbid == 0) */ + for (j = 0; j < cblk_h; ++j) { + for (i = 0; i < cblk_w; ++i) { + int tmp = tiledp[(j * tile_w) + i]; + datap[(j * cblk_w) + i] = + fix_mul( + tmp, + 8192 * 8192 / ((int) floor(band->stepsize * 8192))) >> (11 - T1_NMSEDEC_FRACBITS); + } + } + } + + t1_encode_cblk( + t1, + cblk, + band->bandno, + compno, + tilec->numresolutions - 1 - resno, + tccp->qmfbid, + band->stepsize, + tccp->cblksty, + tile->numcomps, + tile); + + } /* cblkno */ + } /* precno */ + } /* bandno */ + } /* resno */ + } /* compno */ +} + +void t1_decode_cblks( + opj_t1_t* t1, + opj_tcd_tilecomp_t* tilec, + opj_tccp_t* tccp) +{ + int resno, bandno, precno, cblkno; + + int tile_w = tilec->x1 - tilec->x0; + + for (resno = 0; resno < tilec->numresolutions; ++resno) { + opj_tcd_resolution_t* res = &tilec->resolutions[resno]; + + for (bandno = 0; bandno < res->numbands; ++bandno) { + opj_tcd_band_t* restrict band = &res->bands[bandno]; + + for (precno = 0; precno < res->pw * res->ph; ++precno) { + opj_tcd_precinct_t* precinct = &band->precincts[precno]; + + for (cblkno = 0; cblkno < precinct->cw * precinct->ch; ++cblkno) { + opj_tcd_cblk_dec_t* cblk = &precinct->cblks.dec[cblkno]; + int* restrict datap; + void* restrict tiledp; + int cblk_w, cblk_h; + int x, y; + int i, j; + + t1_decode_cblk( + t1, + cblk, + band->bandno, + tccp->roishift, + tccp->cblksty); + + x = cblk->x0 - band->x0; + y = cblk->y0 - band->y0; + if (band->bandno & 1) { + opj_tcd_resolution_t* pres = &tilec->resolutions[resno - 1]; + x += pres->x1 - pres->x0; + } + if (band->bandno & 2) { + opj_tcd_resolution_t* pres = &tilec->resolutions[resno - 1]; + y += pres->y1 - pres->y0; + } + + datap=t1->data; + cblk_w = t1->w; + cblk_h = t1->h; + + if (tccp->roishift) { + int thresh = 1 << tccp->roishift; + for (j = 0; j < cblk_h; ++j) { + for (i = 0; i < cblk_w; ++i) { + int val = datap[(j * cblk_w) + i]; + int mag = abs(val); + if (mag >= thresh) { + mag >>= tccp->roishift; + datap[(j * cblk_w) + i] = val < 0 ? -mag : mag; + } + } + } + } + + tiledp=(void*)&tilec->data[(y * tile_w) + x]; + if (tccp->qmfbid == 1) { + for (j = 0; j < cblk_h; ++j) { + for (i = 0; i < cblk_w; ++i) { + int tmp = datap[(j * cblk_w) + i]; + ((int*)tiledp)[(j * tile_w) + i] = tmp / 2; + } + } + } else { /* if (tccp->qmfbid == 0) */ + for (j = 0; j < cblk_h; ++j) { + for (i = 0; i < cblk_w; ++i) { + float tmp = datap[(j * cblk_w) + i] * band->stepsize; + ((float*)tiledp)[(j * tile_w) + i] = tmp; + } + } + } + opj_free(cblk->data); + opj_free(cblk->segs); + } /* cblkno */ + opj_free(precinct->cblks.dec); + } /* precno */ + } /* bandno */ + } /* resno */ +} + diff --git a/extern/libopenjpeg/t1.h b/extern/libopenjpeg/t1.h new file mode 100644 index 00000000000..0b4294e1d6b --- /dev/null +++ b/extern/libopenjpeg/t1.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __T1_H +#define __T1_H +/** +@file t1.h +@brief Implementation of the tier-1 coding (coding of code-block coefficients) (T1) + +The functions in T1.C have for goal to realize the tier-1 coding operation. The functions +in T1.C are used by some function in TCD.C. +*/ + +/** @defgroup T1 T1 - Implementation of the tier-1 coding */ +/*@{*/ + +/* ----------------------------------------------------------------------- */ +#define T1_NMSEDEC_BITS 7 + +#define T1_SIG_NE 0x0001 /**< Context orientation : North-East direction */ +#define T1_SIG_SE 0x0002 /**< Context orientation : South-East direction */ +#define T1_SIG_SW 0x0004 /**< Context orientation : South-West direction */ +#define T1_SIG_NW 0x0008 /**< Context orientation : North-West direction */ +#define T1_SIG_N 0x0010 /**< Context orientation : North direction */ +#define T1_SIG_E 0x0020 /**< Context orientation : East direction */ +#define T1_SIG_S 0x0040 /**< Context orientation : South direction */ +#define T1_SIG_W 0x0080 /**< Context orientation : West direction */ +#define T1_SIG_OTH (T1_SIG_N|T1_SIG_NE|T1_SIG_E|T1_SIG_SE|T1_SIG_S|T1_SIG_SW|T1_SIG_W|T1_SIG_NW) +#define T1_SIG_PRIM (T1_SIG_N|T1_SIG_E|T1_SIG_S|T1_SIG_W) + +#define T1_SGN_N 0x0100 +#define T1_SGN_E 0x0200 +#define T1_SGN_S 0x0400 +#define T1_SGN_W 0x0800 +#define T1_SGN (T1_SGN_N|T1_SGN_E|T1_SGN_S|T1_SGN_W) + +#define T1_SIG 0x1000 +#define T1_REFINE 0x2000 +#define T1_VISIT 0x4000 + +#define T1_NUMCTXS_ZC 9 +#define T1_NUMCTXS_SC 5 +#define T1_NUMCTXS_MAG 3 +#define T1_NUMCTXS_AGG 1 +#define T1_NUMCTXS_UNI 1 + +#define T1_CTXNO_ZC 0 +#define T1_CTXNO_SC (T1_CTXNO_ZC+T1_NUMCTXS_ZC) +#define T1_CTXNO_MAG (T1_CTXNO_SC+T1_NUMCTXS_SC) +#define T1_CTXNO_AGG (T1_CTXNO_MAG+T1_NUMCTXS_MAG) +#define T1_CTXNO_UNI (T1_CTXNO_AGG+T1_NUMCTXS_AGG) +#define T1_NUMCTXS (T1_CTXNO_UNI+T1_NUMCTXS_UNI) + +#define T1_NMSEDEC_FRACBITS (T1_NMSEDEC_BITS-1) + +#define T1_TYPE_MQ 0 /**< Normal coding using entropy coder */ +#define T1_TYPE_RAW 1 /**< No encoding the information is store under raw format in codestream (mode switch RAW)*/ + +/* ----------------------------------------------------------------------- */ + +typedef short flag_t; + +/** +Tier-1 coding (coding of code-block coefficients) +*/ +typedef struct opj_t1 { + /** codec context */ + opj_common_ptr cinfo; + + /** MQC component */ + opj_mqc_t *mqc; + /** RAW component */ + opj_raw_t *raw; + + int *data; + flag_t *flags; + int w; + int h; + int datasize; + int flagssize; + int flags_stride; +} opj_t1_t; + +#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)] + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a new T1 handle +and initialize the look-up tables of the Tier-1 coder/decoder +@return Returns a new T1 handle if successful, returns NULL otherwise +@see t1_init_luts +*/ +opj_t1_t* t1_create(opj_common_ptr cinfo); +/** +Destroy a previously created T1 handle +@param t1 T1 handle to destroy +*/ +void t1_destroy(opj_t1_t *t1); +/** +Encode the code-blocks of a tile +@param t1 T1 handle +@param tile The tile to encode +@param tcp Tile coding parameters +*/ +void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp); +/** +Decode the code-blocks of a tile +@param t1 T1 handle +@param tile The tile to decode +@param tcp Tile coding parameters +*/ +void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __T1_H */ diff --git a/extern/libopenjpeg/t1_generate_luts.c b/extern/libopenjpeg/t1_generate_luts.c new file mode 100644 index 00000000000..1925b951f1b --- /dev/null +++ b/extern/libopenjpeg/t1_generate_luts.c @@ -0,0 +1,275 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2007, Callum Lerwick + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" +#include + +static int t1_init_ctxno_zc(int f, int orient) { + int h, v, d, n, t, hv; + n = 0; + h = ((f & T1_SIG_W) != 0) + ((f & T1_SIG_E) != 0); + v = ((f & T1_SIG_N) != 0) + ((f & T1_SIG_S) != 0); + d = ((f & T1_SIG_NW) != 0) + ((f & T1_SIG_NE) != 0) + ((f & T1_SIG_SE) != 0) + ((f & T1_SIG_SW) != 0); + + switch (orient) { + case 2: + t = h; + h = v; + v = t; + case 0: + case 1: + if (!h) { + if (!v) { + if (!d) + n = 0; + else if (d == 1) + n = 1; + else + n = 2; + } else if (v == 1) { + n = 3; + } else { + n = 4; + } + } else if (h == 1) { + if (!v) { + if (!d) + n = 5; + else + n = 6; + } else { + n = 7; + } + } else + n = 8; + break; + case 3: + hv = h + v; + if (!d) { + if (!hv) { + n = 0; + } else if (hv == 1) { + n = 1; + } else { + n = 2; + } + } else if (d == 1) { + if (!hv) { + n = 3; + } else if (hv == 1) { + n = 4; + } else { + n = 5; + } + } else if (d == 2) { + if (!hv) { + n = 6; + } else { + n = 7; + } + } else { + n = 8; + } + break; + } + + return (T1_CTXNO_ZC + n); +} + +static int t1_init_ctxno_sc(int f) { + int hc, vc, n; + n = 0; + + hc = int_min(((f & (T1_SIG_E | T1_SGN_E)) == + T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), + 1) - int_min(((f & (T1_SIG_E | T1_SGN_E)) == + (T1_SIG_E | T1_SGN_E)) + + ((f & (T1_SIG_W | T1_SGN_W)) == + (T1_SIG_W | T1_SGN_W)), 1); + + vc = int_min(((f & (T1_SIG_N | T1_SGN_N)) == + T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), + 1) - int_min(((f & (T1_SIG_N | T1_SGN_N)) == + (T1_SIG_N | T1_SGN_N)) + + ((f & (T1_SIG_S | T1_SGN_S)) == + (T1_SIG_S | T1_SGN_S)), 1); + + if (hc < 0) { + hc = -hc; + vc = -vc; + } + if (!hc) { + if (vc == -1) + n = 1; + else if (!vc) + n = 0; + else + n = 1; + } else if (hc == 1) { + if (vc == -1) + n = 2; + else if (!vc) + n = 3; + else + n = 4; + } + + return (T1_CTXNO_SC + n); +} + +static int t1_init_spb(int f) { + int hc, vc, n; + + hc = int_min(((f & (T1_SIG_E | T1_SGN_E)) == + T1_SIG_E) + ((f & (T1_SIG_W | T1_SGN_W)) == T1_SIG_W), + 1) - int_min(((f & (T1_SIG_E | T1_SGN_E)) == + (T1_SIG_E | T1_SGN_E)) + + ((f & (T1_SIG_W | T1_SGN_W)) == + (T1_SIG_W | T1_SGN_W)), 1); + + vc = int_min(((f & (T1_SIG_N | T1_SGN_N)) == + T1_SIG_N) + ((f & (T1_SIG_S | T1_SGN_S)) == T1_SIG_S), + 1) - int_min(((f & (T1_SIG_N | T1_SGN_N)) == + (T1_SIG_N | T1_SGN_N)) + + ((f & (T1_SIG_S | T1_SGN_S)) == + (T1_SIG_S | T1_SGN_S)), 1); + + if (!hc && !vc) + n = 0; + else + n = (!(hc > 0 || (!hc && vc > 0))); + + return n; +} + +void dump_array16(int array[],int size){ + int i; + --size; + for (i = 0; i < size; ++i) { + printf("0x%04x, ", array[i]); + if(!((i+1)&0x7)) + printf("\n "); + } + printf("0x%04x\n};\n\n", array[size]); +} + +int main(){ + int i, j; + double u, v, t; + + int lut_ctxno_zc[1024]; + int lut_nmsedec_sig[1 << T1_NMSEDEC_BITS]; + int lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS]; + int lut_nmsedec_ref[1 << T1_NMSEDEC_BITS]; + int lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS]; + + printf("/* This file was automatically generated by t1_generate_luts.c */\n\n"); + + // lut_ctxno_zc + for (j = 0; j < 4; ++j) { + for (i = 0; i < 256; ++i) { + int orient = j; + if (orient == 2) { + orient = 1; + } else if (orient == 1) { + orient = 2; + } + lut_ctxno_zc[(orient << 8) | i] = t1_init_ctxno_zc(i, j); + } + } + + printf("static char lut_ctxno_zc[1024] = {\n "); + for (i = 0; i < 1023; ++i) { + printf("%i, ", lut_ctxno_zc[i]); + if(!((i+1)&0x1f)) + printf("\n "); + } + printf("%i\n};\n\n", lut_ctxno_zc[1023]); + + // lut_ctxno_sc + printf("static char lut_ctxno_sc[256] = {\n "); + for (i = 0; i < 255; ++i) { + printf("0x%x, ", t1_init_ctxno_sc(i << 4)); + if(!((i+1)&0xf)) + printf("\n "); + } + printf("0x%x\n};\n\n", t1_init_ctxno_sc(255 << 4)); + + // lut_spb + printf("static char lut_spb[256] = {\n "); + for (i = 0; i < 255; ++i) { + printf("%i, ", t1_init_spb(i << 4)); + if(!((i+1)&0x1f)) + printf("\n "); + } + printf("%i\n};\n\n", t1_init_spb(255 << 4)); + + /* FIXME FIXME FIXME */ + /* fprintf(stdout,"nmsedec luts:\n"); */ + for (i = 0; i < (1 << T1_NMSEDEC_BITS); ++i) { + t = i / pow(2, T1_NMSEDEC_FRACBITS); + u = t; + v = t - 1.5; + lut_nmsedec_sig[i] = + int_max(0, + (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); + lut_nmsedec_sig0[i] = + int_max(0, + (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); + u = t - 1.0; + if (i & (1 << (T1_NMSEDEC_BITS - 1))) { + v = t - 1.5; + } else { + v = t - 0.5; + } + lut_nmsedec_ref[i] = + int_max(0, + (int) (floor((u * u - v * v) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); + lut_nmsedec_ref0[i] = + int_max(0, + (int) (floor((u * u) * pow(2, T1_NMSEDEC_FRACBITS) + 0.5) / pow(2, T1_NMSEDEC_FRACBITS) * 8192.0)); + } + + printf("static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = {\n "); + dump_array16(&lut_nmsedec_sig, 1 << T1_NMSEDEC_BITS); + + printf("static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = {\n "); + dump_array16(&lut_nmsedec_sig0, 1 << T1_NMSEDEC_BITS); + + printf("static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = {\n "); + dump_array16(&lut_nmsedec_ref, 1 << T1_NMSEDEC_BITS); + + printf("static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = {\n "); + dump_array16(&lut_nmsedec_ref0, 1 << T1_NMSEDEC_BITS); + + return 0; +} diff --git a/extern/libopenjpeg/t1_luts.h b/extern/libopenjpeg/t1_luts.h new file mode 100644 index 00000000000..e5e33f6656a --- /dev/null +++ b/extern/libopenjpeg/t1_luts.h @@ -0,0 +1,143 @@ +/* This file was automatically generated by t1_generate_luts.c */ + +static char lut_ctxno_zc[1024] = { + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 3, 3, 6, 3, 6, 6, 8, 3, 6, 6, 8, 6, 8, 8, 8, 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 1, 4, 4, 7, 4, 7, 7, 8, 4, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, + 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8, 2, 5, 5, 7, 5, 7, 7, 8, 5, 7, 7, 8, 7, 8, 8, 8 +}; + +static char lut_ctxno_sc[256] = { + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xb, 0x9, 0xa, 0xb, 0xb, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xd, 0x9, 0xa, 0xb, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xb, 0xc, 0xb, 0xb, 0xb, 0xb, 0xb, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xd, 0xc, 0xd, 0xb, 0xc, 0xb, 0xc, + 0x9, 0xa, 0xc, 0xd, 0xa, 0x9, 0xb, 0xc, 0xc, 0xb, 0x9, 0xa, 0xd, 0xc, 0xa, 0x9, + 0x9, 0xa, 0xc, 0xb, 0xa, 0xa, 0xb, 0xb, 0xc, 0xd, 0x9, 0xa, 0xd, 0xd, 0xa, 0xa, + 0x9, 0xa, 0xc, 0xb, 0xa, 0x9, 0xd, 0xc, 0xc, 0xb, 0xc, 0xb, 0xd, 0xc, 0xd, 0xc, + 0x9, 0xa, 0xc, 0xd, 0xa, 0xa, 0xd, 0xd, 0xc, 0xd, 0xc, 0xd, 0xd, 0xd, 0xd, 0xd +}; + +static char lut_spb[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + +static short lut_nmsedec_sig[1 << T1_NMSEDEC_BITS] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0180, 0x0300, 0x0480, 0x0600, 0x0780, 0x0900, 0x0a80, + 0x0c00, 0x0d80, 0x0f00, 0x1080, 0x1200, 0x1380, 0x1500, 0x1680, + 0x1800, 0x1980, 0x1b00, 0x1c80, 0x1e00, 0x1f80, 0x2100, 0x2280, + 0x2400, 0x2580, 0x2700, 0x2880, 0x2a00, 0x2b80, 0x2d00, 0x2e80, + 0x3000, 0x3180, 0x3300, 0x3480, 0x3600, 0x3780, 0x3900, 0x3a80, + 0x3c00, 0x3d80, 0x3f00, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, + 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5100, 0x5280, + 0x5400, 0x5580, 0x5700, 0x5880, 0x5a00, 0x5b80, 0x5d00, 0x5e80, + 0x6000, 0x6180, 0x6300, 0x6480, 0x6600, 0x6780, 0x6900, 0x6a80, + 0x6c00, 0x6d80, 0x6f00, 0x7080, 0x7200, 0x7380, 0x7500, 0x7680 +}; + +static short lut_nmsedec_sig0[1 << T1_NMSEDEC_BITS] = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, + 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, + 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, + 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, + 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, + 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, + 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, + 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2680, 0x2780, + 0x2880, 0x2980, 0x2b00, 0x2c00, 0x2d00, 0x2e80, 0x2f80, 0x3100, + 0x3200, 0x3380, 0x3480, 0x3600, 0x3700, 0x3880, 0x3a00, 0x3b00, + 0x3c80, 0x3e00, 0x3f80, 0x4080, 0x4200, 0x4380, 0x4500, 0x4680, + 0x4800, 0x4980, 0x4b00, 0x4c80, 0x4e00, 0x4f80, 0x5180, 0x5300, + 0x5480, 0x5600, 0x5800, 0x5980, 0x5b00, 0x5d00, 0x5e80, 0x6080, + 0x6200, 0x6400, 0x6580, 0x6780, 0x6900, 0x6b00, 0x6d00, 0x6e80, + 0x7080, 0x7280, 0x7480, 0x7600, 0x7800, 0x7a00, 0x7c00, 0x7e00 +}; + +static short lut_nmsedec_ref[1 << T1_NMSEDEC_BITS] = { + 0x1800, 0x1780, 0x1700, 0x1680, 0x1600, 0x1580, 0x1500, 0x1480, + 0x1400, 0x1380, 0x1300, 0x1280, 0x1200, 0x1180, 0x1100, 0x1080, + 0x1000, 0x0f80, 0x0f00, 0x0e80, 0x0e00, 0x0d80, 0x0d00, 0x0c80, + 0x0c00, 0x0b80, 0x0b00, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, + 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0500, 0x0480, + 0x0400, 0x0380, 0x0300, 0x0280, 0x0200, 0x0180, 0x0100, 0x0080, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, + 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b00, 0x0b80, + 0x0c00, 0x0c80, 0x0d00, 0x0d80, 0x0e00, 0x0e80, 0x0f00, 0x0f80, + 0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380, + 0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780 +}; + +static short lut_nmsedec_ref0[1 << T1_NMSEDEC_BITS] = { + 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x1b00, 0x1a80, 0x1980, + 0x1880, 0x1780, 0x1700, 0x1600, 0x1500, 0x1480, 0x1380, 0x1300, + 0x1200, 0x1180, 0x1080, 0x1000, 0x0f00, 0x0e80, 0x0e00, 0x0d00, + 0x0c80, 0x0c00, 0x0b80, 0x0a80, 0x0a00, 0x0980, 0x0900, 0x0880, + 0x0800, 0x0780, 0x0700, 0x0680, 0x0600, 0x0580, 0x0580, 0x0500, + 0x0480, 0x0400, 0x0400, 0x0380, 0x0300, 0x0300, 0x0280, 0x0280, + 0x0200, 0x0200, 0x0180, 0x0180, 0x0100, 0x0100, 0x0100, 0x0080, + 0x0080, 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, + 0x0080, 0x0080, 0x0100, 0x0100, 0x0100, 0x0180, 0x0180, 0x0200, + 0x0200, 0x0280, 0x0280, 0x0300, 0x0300, 0x0380, 0x0400, 0x0400, + 0x0480, 0x0500, 0x0580, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780, + 0x0800, 0x0880, 0x0900, 0x0980, 0x0a00, 0x0a80, 0x0b80, 0x0c00, + 0x0c80, 0x0d00, 0x0e00, 0x0e80, 0x0f00, 0x1000, 0x1080, 0x1180, + 0x1200, 0x1300, 0x1380, 0x1480, 0x1500, 0x1600, 0x1700, 0x1780, + 0x1880, 0x1980, 0x1a80, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00 +}; + diff --git a/extern/libopenjpeg/t2.c b/extern/libopenjpeg/t2.c new file mode 100644 index 00000000000..be9b42a4132 --- /dev/null +++ b/extern/libopenjpeg/t2.c @@ -0,0 +1,787 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/** @defgroup T2 T2 - Implementation of a tier-2 coding */ +/*@{*/ + +/** @name Local static functions */ +/*@{*/ + +static void t2_putcommacode(opj_bio_t *bio, int n); +static int t2_getcommacode(opj_bio_t *bio); +/** +Variable length code for signalling delta Zil (truncation point) +@param bio Bit Input/Output component +@param n delta Zil +*/ +static void t2_putnumpasses(opj_bio_t *bio, int n); +static int t2_getnumpasses(opj_bio_t *bio); +/** +Encode a packet of a tile to a destination buffer +@param tile Tile for which to write the packets +@param tcp Tile coding parameters +@param pi Packet identity +@param dest Destination buffer +@param len Length of the destination buffer +@param cstr_info Codestream information structure +@param tileno Number of the tile encoded +@return +*/ +static int t2_encode_packet(opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tileno); +/** +@param seg +@param cblksty +@param first +*/ +static void t2_init_seg(opj_tcd_cblk_dec_t* cblk, int index, int cblksty, int first); +/** +Decode a packet of a tile from a source buffer +@param t2 T2 handle +@param src Source buffer +@param len Length of the source buffer +@param tile Tile for which to write the packets +@param tcp Tile coding parameters +@param pi Packet identity +@return +*/ +static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, + opj_tcp_t *tcp, opj_pi_iterator_t *pi, opj_packet_info_t *pack_info); + +/*@}*/ + +/*@}*/ + +/* ----------------------------------------------------------------------- */ + +/* #define RESTART 0x04 */ + +static void t2_putcommacode(opj_bio_t *bio, int n) { + while (--n >= 0) { + bio_write(bio, 1, 1); + } + bio_write(bio, 0, 1); +} + +static int t2_getcommacode(opj_bio_t *bio) { + int n; + for (n = 0; bio_read(bio, 1); n++) { + ; + } + return n; +} + +static void t2_putnumpasses(opj_bio_t *bio, int n) { + if (n == 1) { + bio_write(bio, 0, 1); + } else if (n == 2) { + bio_write(bio, 2, 2); + } else if (n <= 5) { + bio_write(bio, 0xc | (n - 3), 4); + } else if (n <= 36) { + bio_write(bio, 0x1e0 | (n - 6), 9); + } else if (n <= 164) { + bio_write(bio, 0xff80 | (n - 37), 16); + } +} + +static int t2_getnumpasses(opj_bio_t *bio) { + int n; + if (!bio_read(bio, 1)) + return 1; + if (!bio_read(bio, 1)) + return 2; + if ((n = bio_read(bio, 2)) != 3) + return (3 + n); + if ((n = bio_read(bio, 5)) != 31) + return (6 + n); + return (37 + bio_read(bio, 7)); +} + +static int t2_encode_packet(opj_tcd_tile_t * tile, opj_tcp_t * tcp, opj_pi_iterator_t *pi, unsigned char *dest, int length, opj_codestream_info_t *cstr_info, int tileno) { + int bandno, cblkno; + unsigned char *c = dest; + + int compno = pi->compno; /* component value */ + int resno = pi->resno; /* resolution level value */ + int precno = pi->precno; /* precinct value */ + int layno = pi->layno; /* quality layer value */ + + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + opj_bio_t *bio = NULL; /* BIO component */ + + /* */ + if (tcp->csty & J2K_CP_CSTY_SOP) { + c[0] = 255; + c[1] = 145; + c[2] = 0; + c[3] = 4; + c[4] = (tile->packno % 65536) / 256; + c[5] = (tile->packno % 65536) % 256; + c += 6; + } + /* */ + + if (!layno) { + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + tgt_reset(prc->incltree); + tgt_reset(prc->imsbtree); + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + cblk->numpasses = 0; + tgt_setvalue(prc->imsbtree, cblkno, band->numbps - cblk->numbps); + } + } + } + + bio = bio_create(); + bio_init_enc(bio, c, length); + bio_write(bio, 1, 1); /* Empty header bit */ + + /* Writing Packet header */ + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + opj_tcd_layer_t *layer = &cblk->layers[layno]; + if (!cblk->numpasses && layer->numpasses) { + tgt_setvalue(prc->incltree, cblkno, layno); + } + } + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + opj_tcd_layer_t *layer = &cblk->layers[layno]; + int increment = 0; + int nump = 0; + int len = 0, passno; + /* cblk inclusion bits */ + if (!cblk->numpasses) { + tgt_encode(bio, prc->incltree, cblkno, layno + 1); + } else { + bio_write(bio, layer->numpasses != 0, 1); + } + /* if cblk not included, go to the next cblk */ + if (!layer->numpasses) { + continue; + } + /* if first instance of cblk --> zero bit-planes information */ + if (!cblk->numpasses) { + cblk->numlenbits = 3; + tgt_encode(bio, prc->imsbtree, cblkno, 999); + } + /* number of coding passes included */ + t2_putnumpasses(bio, layer->numpasses); + + /* computation of the increase of the length indicator and insertion in the header */ + for (passno = cblk->numpasses; passno < cblk->numpasses + layer->numpasses; passno++) { + opj_tcd_pass_t *pass = &cblk->passes[passno]; + nump++; + len += pass->len; + if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { + increment = int_max(increment, int_floorlog2(len) + 1 - (cblk->numlenbits + int_floorlog2(nump))); + len = 0; + nump = 0; + } + } + t2_putcommacode(bio, increment); + + /* computation of the new Length indicator */ + cblk->numlenbits += increment; + + /* insertion of the codeword segment length */ + for (passno = cblk->numpasses; passno < cblk->numpasses + layer->numpasses; passno++) { + opj_tcd_pass_t *pass = &cblk->passes[passno]; + nump++; + len += pass->len; + if (pass->term || passno == (cblk->numpasses + layer->numpasses) - 1) { + bio_write(bio, len, cblk->numlenbits + int_floorlog2(nump)); + len = 0; + nump = 0; + } + } + } + } + + if (bio_flush(bio)) { + bio_destroy(bio); + return -999; /* modified to eliminate longjmp !! */ + } + + c += bio_numbytes(bio); + bio_destroy(bio); + + /* */ + if (tcp->csty & J2K_CP_CSTY_EPH) { + c[0] = 255; + c[1] = 146; + c += 2; + } + /* */ + + /* << INDEX */ + // End of packet header position. Currently only represents the distance to start of packet + // Will be updated later by incrementing with packet start value + if(cstr_info && cstr_info->index_write) { + opj_packet_info_t *info_PK = &cstr_info->tile[tileno].packet[cstr_info->packno]; + info_PK->end_ph_pos = (int)(c - dest); + } + /* INDEX >> */ + + /* Writing the packet body */ + + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + opj_tcd_layer_t *layer = &cblk->layers[layno]; + if (!layer->numpasses) { + continue; + } + if (c + layer->len > dest + length) { + return -999; + } + + memcpy(c, layer->data, layer->len); + cblk->numpasses += layer->numpasses; + c += layer->len; + /* << INDEX */ + if(cstr_info && cstr_info->index_write) { + opj_packet_info_t *info_PK = &cstr_info->tile[tileno].packet[cstr_info->packno]; + info_PK->disto += layer->disto; + if (cstr_info->D_max < info_PK->disto) { + cstr_info->D_max = info_PK->disto; + } + } + /* INDEX >> */ + } + } + + return (c - dest); +} + +static void t2_init_seg(opj_tcd_cblk_dec_t* cblk, int index, int cblksty, int first) { + opj_tcd_seg_t* seg; + cblk->segs = (opj_tcd_seg_t*) opj_realloc(cblk->segs, (index + 1) * sizeof(opj_tcd_seg_t)); + seg = &cblk->segs[index]; + seg->data = NULL; + seg->dataindex = 0; + seg->numpasses = 0; + seg->len = 0; + if (cblksty & J2K_CCP_CBLKSTY_TERMALL) { + seg->maxpasses = 1; + } + else if (cblksty & J2K_CCP_CBLKSTY_LAZY) { + if (first) { + seg->maxpasses = 10; + } else { + seg->maxpasses = (((seg - 1)->maxpasses == 1) || ((seg - 1)->maxpasses == 10)) ? 2 : 1; + } + } else { + seg->maxpasses = 109; + } +} + +static int t2_decode_packet(opj_t2_t* t2, unsigned char *src, int len, opj_tcd_tile_t *tile, + opj_tcp_t *tcp, opj_pi_iterator_t *pi, opj_packet_info_t *pack_info) { + int bandno, cblkno; + unsigned char *c = src; + + opj_cp_t *cp = t2->cp; + + int compno = pi->compno; /* component value */ + int resno = pi->resno; /* resolution level value */ + int precno = pi->precno; /* precinct value */ + int layno = pi->layno; /* quality layer value */ + + opj_tcd_resolution_t* res = &tile->comps[compno].resolutions[resno]; + + unsigned char *hd = NULL; + int present; + + opj_bio_t *bio = NULL; /* BIO component */ + + if (layno == 0) { + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; + + tgt_reset(prc->incltree); + tgt_reset(prc->imsbtree); + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; + cblk->numsegs = 0; + } + } + } + + /* SOP markers */ + + if (tcp->csty & J2K_CP_CSTY_SOP) { + if ((*c) != 0xff || (*(c + 1) != 0x91)) { + opj_event_msg(t2->cinfo, EVT_WARNING, "Expected SOP marker\n"); + } else { + c += 6; + } + + /** TODO : check the Nsop value */ + } + + /* + When the marker PPT/PPM is used the packet header are store in PPT/PPM marker + This part deal with this caracteristic + step 1: Read packet header in the saved structure + step 2: Return to codestream for decoding + */ + + bio = bio_create(); + + if (cp->ppm == 1) { /* PPM */ + hd = cp->ppm_data; + bio_init_dec(bio, hd, cp->ppm_len); + } else if (tcp->ppt == 1) { /* PPT */ + hd = tcp->ppt_data; + bio_init_dec(bio, hd, tcp->ppt_len); + } else { /* Normal Case */ + hd = c; + bio_init_dec(bio, hd, src+len-hd); + } + + present = bio_read(bio, 1); + + if (!present) { + bio_inalign(bio); + hd += bio_numbytes(bio); + bio_destroy(bio); + + /* EPH markers */ + + if (tcp->csty & J2K_CP_CSTY_EPH) { + if ((*hd) != 0xff || (*(hd + 1) != 0x92)) { + printf("Error : expected EPH marker\n"); + } else { + hd += 2; + } + } + + /* << INDEX */ + // End of packet header position. Currently only represents the distance to start of packet + // Will be updated later by incrementing with packet start value + if(pack_info) { + pack_info->end_ph_pos = (int)(c - src); + } + /* INDEX >> */ + + if (cp->ppm == 1) { /* PPM case */ + cp->ppm_len += cp->ppm_data-hd; + cp->ppm_data = hd; + return (c - src); + } + if (tcp->ppt == 1) { /* PPT case */ + tcp->ppt_len+=tcp->ppt_data-hd; + tcp->ppt_data = hd; + return (c - src); + } + + return (hd - src); + } + + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + int included, increment, n, segno; + opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; + /* if cblk not yet included before --> inclusion tagtree */ + if (!cblk->numsegs) { + included = tgt_decode(bio, prc->incltree, cblkno, layno + 1); + /* else one bit */ + } else { + included = bio_read(bio, 1); + } + /* if cblk not included */ + if (!included) { + cblk->numnewpasses = 0; + continue; + } + /* if cblk not yet included --> zero-bitplane tagtree */ + if (!cblk->numsegs) { + int i, numimsbs; + for (i = 0; !tgt_decode(bio, prc->imsbtree, cblkno, i); i++) { + ; + } + numimsbs = i - 1; + cblk->numbps = band->numbps - numimsbs; + cblk->numlenbits = 3; + } + /* number of coding passes */ + cblk->numnewpasses = t2_getnumpasses(bio); + increment = t2_getcommacode(bio); + /* length indicator increment */ + cblk->numlenbits += increment; + segno = 0; + if (!cblk->numsegs) { + t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 1); + } else { + segno = cblk->numsegs - 1; + if (cblk->segs[segno].numpasses == cblk->segs[segno].maxpasses) { + ++segno; + t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 0); + } + } + n = cblk->numnewpasses; + + do { + cblk->segs[segno].numnewpasses = int_min(cblk->segs[segno].maxpasses - cblk->segs[segno].numpasses, n); + cblk->segs[segno].newlen = bio_read(bio, cblk->numlenbits + int_floorlog2(cblk->segs[segno].numnewpasses)); + n -= cblk->segs[segno].numnewpasses; + if (n > 0) { + ++segno; + t2_init_seg(cblk, segno, tcp->tccps[compno].cblksty, 0); + } + } while (n > 0); + } + } + + if (bio_inalign(bio)) { + bio_destroy(bio); + return -999; + } + + hd += bio_numbytes(bio); + bio_destroy(bio); + + /* EPH markers */ + if (tcp->csty & J2K_CP_CSTY_EPH) { + if ((*hd) != 0xff || (*(hd + 1) != 0x92)) { + opj_event_msg(t2->cinfo, EVT_ERROR, "Expected EPH marker\n"); + } else { + hd += 2; + } + } + + /* << INDEX */ + // End of packet header position. Currently only represents the distance to start of packet + // Will be updated later by incrementing with packet start value + if(pack_info) { + pack_info->end_ph_pos = (int)(hd - src); + } + /* INDEX >> */ + + if (cp->ppm==1) { + cp->ppm_len+=cp->ppm_data-hd; + cp->ppm_data = hd; + } else if (tcp->ppt == 1) { + tcp->ppt_len+=tcp->ppt_data-hd; + tcp->ppt_data = hd; + } else { + c=hd; + } + + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + if ((band->x1-band->x0 == 0)||(band->y1-band->y0 == 0)) continue; + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; + opj_tcd_seg_t *seg = NULL; + if (!cblk->numnewpasses) + continue; + if (!cblk->numsegs) { + seg = &cblk->segs[0]; + cblk->numsegs++; + cblk->len = 0; + } else { + seg = &cblk->segs[cblk->numsegs - 1]; + if (seg->numpasses == seg->maxpasses) { + seg++; + cblk->numsegs++; + } + } + + do { + if (c + seg->newlen > src + len) { + return -999; + } + +#ifdef USE_JPWL + /* we need here a j2k handle to verify if making a check to + the validity of cblocks parameters is selected from user (-W) */ + + /* let's check that we are not exceeding */ + if ((cblk->len + seg->newlen) > 8192) { + opj_event_msg(t2->cinfo, EVT_WARNING, + "JPWL: segment too long (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", + seg->newlen, cblkno, precno, bandno, resno, compno); + if (!JPWL_ASSUME) { + opj_event_msg(t2->cinfo, EVT_ERROR, "JPWL: giving up\n"); + return -999; + } + seg->newlen = 8192 - cblk->len; + opj_event_msg(t2->cinfo, EVT_WARNING, " - truncating segment to %d\n", seg->newlen); + break; + }; + +#endif /* USE_JPWL */ + + cblk->data = (unsigned char*) opj_realloc(cblk->data, (cblk->len + seg->newlen) * sizeof(unsigned char*)); + memcpy(cblk->data + cblk->len, c, seg->newlen); + if (seg->numpasses == 0) { + seg->data = &cblk->data; + seg->dataindex = cblk->len; + } + c += seg->newlen; + cblk->len += seg->newlen; + seg->len += seg->newlen; + seg->numpasses += seg->numnewpasses; + cblk->numnewpasses -= seg->numnewpasses; + if (cblk->numnewpasses > 0) { + seg++; + cblk->numsegs++; + } + } while (cblk->numnewpasses > 0); + } + } + + return (c - src); +} + +/* ----------------------------------------------------------------------- */ + +int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino, J2K_T2_MODE t2_mode, int cur_totnum_tp){ + unsigned char *c = dest; + int e = 0; + int compno; + opj_pi_iterator_t *pi = NULL; + int poc; + opj_image_t *image = t2->image; + opj_cp_t *cp = t2->cp; + opj_tcp_t *tcp = &cp->tcps[tileno]; + int pocno = cp->cinema == CINEMA4K_24? 2: 1; + int maxcomp = cp->max_comp_size > 0 ? image->numcomps : 1; + + pi = pi_initialise_encode(image, cp, tileno, t2_mode); + if(!pi) { + /* TODO: throw an error */ + return -999; + } + + if(t2_mode == THRESH_CALC ){ /* Calculating threshold */ + for(compno = 0; compno < maxcomp; compno++ ){ + for(poc = 0; poc < pocno ; poc++){ + int comp_len = 0; + int tpnum = compno; + if (pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp)) { + opj_event_msg(t2->cinfo, EVT_ERROR, "Error initializing Packet Iterator\n"); + return -999; + } + while (pi_next(&pi[poc])) { + if (pi[poc].layno < maxlayers) { + e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[poc], c, dest + len - c, cstr_info, tileno); + comp_len = comp_len + e; + if (e == -999) { + break; + } else { + c += e; + } + } + } + if (e == -999) break; + if (cp->max_comp_size){ + if (comp_len > cp->max_comp_size){ + e = -999; + break; + } + } + } + if (e == -999) break; + } + }else{ /* t2_mode == FINAL_PASS */ + pi_create_encode(pi, cp,tileno,pino,tpnum,tppos,t2_mode,cur_totnum_tp); + while (pi_next(&pi[pino])) { + if (pi[pino].layno < maxlayers) { + e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[pino], c, dest + len - c, cstr_info, tileno); + if (e == -999) { + break; + } else { + c += e; + } + /* INDEX >> */ + if(cstr_info) { + if(cstr_info->index_write) { + opj_tile_info_t *info_TL = &cstr_info->tile[tileno]; + opj_packet_info_t *info_PK = &info_TL->packet[cstr_info->packno]; + if (!cstr_info->packno) { + info_PK->start_pos = info_TL->end_header + 1; + } else { + info_PK->start_pos = ((cp->tp_on | tcp->POC)&& info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[cstr_info->packno - 1].end_pos + 1; + } + info_PK->end_pos = info_PK->start_pos + e - 1; + info_PK->end_ph_pos += info_PK->start_pos - 1; // End of packet header which now only represents the distance + // to start of packet is incremented by value of start of packet + } + + cstr_info->packno++; + } + /* << INDEX */ + tile->packno++; + } + } + } + + pi_destroy(pi, cp, tileno); + + if (e == -999) { + return e; + } + + return (c - dest); +} + +int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info) { + unsigned char *c = src; + opj_pi_iterator_t *pi; + int pino, e = 0; + int n = 0, curtp = 0; + int tp_start_packno; + + opj_image_t *image = t2->image; + opj_cp_t *cp = t2->cp; + + /* create a packet iterator */ + pi = pi_create_decode(image, cp, tileno); + if(!pi) { + /* TODO: throw an error */ + return -999; + } + + tp_start_packno = 0; + + for (pino = 0; pino <= cp->tcps[tileno].numpocs; pino++) { + while (pi_next(&pi[pino])) { + if ((cp->layer==0) || (cp->layer>=((pi[pino].layno)+1))) { + opj_packet_info_t *pack_info; + if (cstr_info) + pack_info = &cstr_info->tile[tileno].packet[cstr_info->packno]; + else + pack_info = NULL; + e = t2_decode_packet(t2, c, src + len - c, tile, &cp->tcps[tileno], &pi[pino], pack_info); + } else { + e = 0; + } + + /* progression in resolution */ + image->comps[pi[pino].compno].resno_decoded = + (e > 0) ? + int_max(pi[pino].resno, image->comps[pi[pino].compno].resno_decoded) + : image->comps[pi[pino].compno].resno_decoded; + n++; + + /* INDEX >> */ + if(cstr_info) { + opj_tile_info_t *info_TL = &cstr_info->tile[tileno]; + opj_packet_info_t *info_PK = &info_TL->packet[cstr_info->packno]; + if (!cstr_info->packno) { + info_PK->start_pos = info_TL->end_header + 1; + } else if (info_TL->packet[cstr_info->packno-1].end_pos >= (int)cstr_info->tile[tileno].tp[curtp].tp_end_pos){ // New tile part + info_TL->tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; // Number of packets in previous tile-part + tp_start_packno = cstr_info->packno; + curtp++; + info_PK->start_pos = cstr_info->tile[tileno].tp[curtp].tp_end_header+1; + } else { + info_PK->start_pos = (cp->tp_on && info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[cstr_info->packno - 1].end_pos + 1; + } + info_PK->end_pos = info_PK->start_pos + e - 1; + info_PK->end_ph_pos += info_PK->start_pos - 1; // End of packet header which now only represents the distance + // to start of packet is incremented by value of start of packet + cstr_info->packno++; + } + /* << INDEX */ + + if (e == -999) { /* ADD */ + break; + } else { + c += e; + } + } + } + /* INDEX >> */ + if(cstr_info) { + cstr_info->tile[tileno].tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; // Number of packets in last tile-part + } + /* << INDEX */ + + /* don't forget to release pi */ + pi_destroy(pi, cp, tileno); + + if (e == -999) { + return e; + } + + return (c - src); +} + +/* ----------------------------------------------------------------------- */ + +opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp) { + /* create the tcd structure */ + opj_t2_t *t2 = (opj_t2_t*)opj_malloc(sizeof(opj_t2_t)); + if(!t2) return NULL; + t2->cinfo = cinfo; + t2->image = image; + t2->cp = cp; + + return t2; +} + +void t2_destroy(opj_t2_t *t2) { + if(t2) { + opj_free(t2); + } +} + + + + + diff --git a/extern/libopenjpeg/t2.h b/extern/libopenjpeg/t2.h new file mode 100644 index 00000000000..b15b7520019 --- /dev/null +++ b/extern/libopenjpeg/t2.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __T2_H +#define __T2_H +/** +@file t2.h +@brief Implementation of a tier-2 coding (packetization of code-block data) (T2) + +*/ + +/** @defgroup T2 T2 - Implementation of a tier-2 coding */ +/*@{*/ + +/** +Tier-2 coding +*/ +typedef struct opj_t2 { + /** codec context */ + opj_common_ptr cinfo; + + /** Encoding: pointer to the src image. Decoding: pointer to the dst image. */ + opj_image_t *image; + /** pointer to the image coding parameters */ + opj_cp_t *cp; +} opj_t2_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Encode the packets of a tile to a destination buffer +@param t2 T2 handle +@param tileno number of the tile encoded +@param tile the tile for which to write the packets +@param maxlayers maximum number of layers +@param dest the destination buffer +@param len the length of the destination buffer +@param cstr_info Codestream information structure +@param tpnum Tile part number of the current tile +@param tppos The position of the tile part flag in the progression order +@param t2_mode If == 0 In Threshold calculation ,If == 1 Final pass +@param cur_totnum_tp The total number of tile parts in the current tile +*/ +int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info,int tpnum, int tppos,int pino,J2K_T2_MODE t2_mode,int cur_totnum_tp); +/** +Decode the packets of a tile from a source buffer +@param t2 T2 handle +@param src the source buffer +@param len length of the source buffer +@param tileno number that identifies the tile for which to decode the packets +@param tile tile for which to decode the packets + */ +int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info); + +/** +Create a T2 handle +@param cinfo Codec context info +@param image Source or destination image +@param cp Image coding parameters +@return Returns a new T2 handle if successful, returns NULL otherwise +*/ +opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp); +/** +Destroy a T2 handle +@param t2 T2 handle to destroy +*/ +void t2_destroy(opj_t2_t *t2); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __T2_H */ diff --git a/extern/libopenjpeg/tcd.c b/extern/libopenjpeg/tcd.c new file mode 100644 index 00000000000..f4a54553e28 --- /dev/null +++ b/extern/libopenjpeg/tcd.c @@ -0,0 +1,1506 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * Copyright (c) 2006-2007, Parvatha Elangovan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) { + int tileno, compno, resno, bandno, precno;//, cblkno; + + fprintf(fd, "image {\n"); + fprintf(fd, " tw=%d, th=%d x0=%d x1=%d y0=%d y1=%d\n", + img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0, tcd->image->y1); + + for (tileno = 0; tileno < img->th * img->tw; tileno++) { + opj_tcd_tile_t *tile = &tcd->tcd_image->tiles[tileno]; + fprintf(fd, " tile {\n"); + fprintf(fd, " x0=%d, y0=%d, x1=%d, y1=%d, numcomps=%d\n", + tile->x0, tile->y0, tile->x1, tile->y1, tile->numcomps); + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + fprintf(fd, " tilec {\n"); + fprintf(fd, + " x0=%d, y0=%d, x1=%d, y1=%d, numresolutions=%d\n", + tilec->x0, tilec->y0, tilec->x1, tilec->y1, tilec->numresolutions); + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + fprintf(fd, "\n res {\n"); + fprintf(fd, + " x0=%d, y0=%d, x1=%d, y1=%d, pw=%d, ph=%d, numbands=%d\n", + res->x0, res->y0, res->x1, res->y1, res->pw, res->ph, res->numbands); + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + fprintf(fd, " band {\n"); + fprintf(fd, + " x0=%d, y0=%d, x1=%d, y1=%d, stepsize=%f, numbps=%d\n", + band->x0, band->y0, band->x1, band->y1, band->stepsize, band->numbps); + for (precno = 0; precno < res->pw * res->ph; precno++) { + opj_tcd_precinct_t *prec = &band->precincts[precno]; + fprintf(fd, " prec {\n"); + fprintf(fd, + " x0=%d, y0=%d, x1=%d, y1=%d, cw=%d, ch=%d\n", + prec->x0, prec->y0, prec->x1, prec->y1, prec->cw, prec->ch); + /* + for (cblkno = 0; cblkno < prec->cw * prec->ch; cblkno++) { + opj_tcd_cblk_t *cblk = &prec->cblks[cblkno]; + fprintf(fd, " cblk {\n"); + fprintf(fd, + " x0=%d, y0=%d, x1=%d, y1=%d\n", + cblk->x0, cblk->y0, cblk->x1, cblk->y1); + fprintf(fd, " }\n"); + } + */ + fprintf(fd, " }\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, " }\n"); + } + fprintf(fd, "}\n"); +} + +/* ----------------------------------------------------------------------- */ + +/** +Create a new TCD handle +*/ +opj_tcd_t* tcd_create(opj_common_ptr cinfo) { + /* create the tcd structure */ + opj_tcd_t *tcd = (opj_tcd_t*)opj_malloc(sizeof(opj_tcd_t)); + if(!tcd) return NULL; + tcd->cinfo = cinfo; + tcd->tcd_image = (opj_tcd_image_t*)opj_malloc(sizeof(opj_tcd_image_t)); + if(!tcd->tcd_image) { + opj_free(tcd); + return NULL; + } + + return tcd; +} + +/** +Destroy a previously created TCD handle +*/ +void tcd_destroy(opj_tcd_t *tcd) { + if(tcd) { + opj_free(tcd->tcd_image); + opj_free(tcd); + } +} + +/* ----------------------------------------------------------------------- */ + +void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno) { + int tileno, compno, resno, bandno, precno, cblkno; + + tcd->image = image; + tcd->cp = cp; + tcd->tcd_image->tw = cp->tw; + tcd->tcd_image->th = cp->th; + tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_malloc(sizeof(opj_tcd_tile_t)); + + for (tileno = 0; tileno < 1; tileno++) { + opj_tcp_t *tcp = &cp->tcps[curtileno]; + int j; + + /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + int p = curtileno % cp->tw; /* si numerotation matricielle .. */ + int q = curtileno / cp->tw; /* .. coordonnees de la tile (q,p) q pour ligne et p pour colonne */ + + /* opj_tcd_tile_t *tile=&tcd->tcd_image->tiles[tileno]; */ + opj_tcd_tile_t *tile = tcd->tcd_image->tiles; + + /* 4 borders of the tile rescale on the image if necessary */ + tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); + tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); + tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); + tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); + tile->numcomps = image->numcomps; + /* tile->PPT=image->PPT; */ + + /* Modification of the RATE >> */ + for (j = 0; j < tcp->numlayers; j++) { + tcp->rates[j] = tcp->rates[j] ? + cp->tp_on ? + (((float) (tile->numcomps + * (tile->x1 - tile->x0) + * (tile->y1 - tile->y0) + * image->comps[0].prec)) + /(tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy)) - (((tcd->cur_totnum_tp - 1) * 14 )/ tcp->numlayers) + : + ((float) (tile->numcomps + * (tile->x1 - tile->x0) + * (tile->y1 - tile->y0) + * image->comps[0].prec))/ + (tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy) + : 0; + + if (tcp->rates[j]) { + if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { + tcp->rates[j] = tcp->rates[j - 1] + 20; + } else { + if (!j && tcp->rates[j] < 30) + tcp->rates[j] = 30; + } + + if(j == (tcp->numlayers-1)){ + tcp->rates[j] = tcp->rates[j]- 2; + } + } + } + /* << Modification of the RATE */ + + tile->comps = (opj_tcd_tilecomp_t *) opj_malloc(image->numcomps * sizeof(opj_tcd_tilecomp_t)); + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tccp_t *tccp = &tcp->tccps[compno]; + + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + + /* border of each tile component (global) */ + tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); + tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); + tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); + tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); + + tilec->data = (int *) opj_aligned_malloc((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0) * sizeof(int)); + tilec->numresolutions = tccp->numresolutions; + + tilec->resolutions = (opj_tcd_resolution_t *) opj_malloc(tilec->numresolutions * sizeof(opj_tcd_resolution_t)); + + for (resno = 0; resno < tilec->numresolutions; resno++) { + int pdx, pdy; + int levelno = tilec->numresolutions - 1 - resno; + int tlprcxstart, tlprcystart, brprcxend, brprcyend; + int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; + int cbgwidthexpn, cbgheightexpn; + int cblkwidthexpn, cblkheightexpn; + + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + /* border for each resolution level (global) */ + res->x0 = int_ceildivpow2(tilec->x0, levelno); + res->y0 = int_ceildivpow2(tilec->y0, levelno); + res->x1 = int_ceildivpow2(tilec->x1, levelno); + res->y1 = int_ceildivpow2(tilec->y1, levelno); + + res->numbands = resno == 0 ? 1 : 3; + /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ + if (tccp->csty & J2K_CCP_CSTY_PRT) { + pdx = tccp->prcw[resno]; + pdy = tccp->prch[resno]; + } else { + pdx = 15; + pdy = 15; + } + /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; + tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; + + brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; + brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; + + res->pw = (brprcxend - tlprcxstart) >> pdx; + res->ph = (brprcyend - tlprcystart) >> pdy; + + if (resno == 0) { + tlcbgxstart = tlprcxstart; + tlcbgystart = tlprcystart; + brcbgxend = brprcxend; + brcbgyend = brprcyend; + cbgwidthexpn = pdx; + cbgheightexpn = pdy; + } else { + tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); + tlcbgystart = int_ceildivpow2(tlprcystart, 1); + brcbgxend = int_ceildivpow2(brprcxend, 1); + brcbgyend = int_ceildivpow2(brprcyend, 1); + cbgwidthexpn = pdx - 1; + cbgheightexpn = pdy - 1; + } + + cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); + cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); + + for (bandno = 0; bandno < res->numbands; bandno++) { + int x0b, y0b, i; + int gain, numbps; + opj_stepsize_t *ss = NULL; + + opj_tcd_band_t *band = &res->bands[bandno]; + + band->bandno = resno == 0 ? 0 : bandno + 1; + x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; + y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; + + if (band->bandno == 0) { + /* band border (global) */ + band->x0 = int_ceildivpow2(tilec->x0, levelno); + band->y0 = int_ceildivpow2(tilec->y0, levelno); + band->x1 = int_ceildivpow2(tilec->x1, levelno); + band->y1 = int_ceildivpow2(tilec->y1, levelno); + } else { + /* band border (global) */ + band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); + band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); + band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); + band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); + } + + ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; + gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); + numbps = image->comps[compno].prec + gain; + + band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); + band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ + + band->precincts = (opj_tcd_precinct_t *) opj_malloc(3 * res->pw * res->ph * sizeof(opj_tcd_precinct_t)); + + for (i = 0; i < res->pw * res->ph * 3; i++) { + band->precincts[i].imsbtree = NULL; + band->precincts[i].incltree = NULL; + } + + for (precno = 0; precno < res->pw * res->ph; precno++) { + int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; + + int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); + int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); + int cbgxend = cbgxstart + (1 << cbgwidthexpn); + int cbgyend = cbgystart + (1 << cbgheightexpn); + + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + /* precinct size (global) */ + prc->x0 = int_max(cbgxstart, band->x0); + prc->y0 = int_max(cbgystart, band->y0); + prc->x1 = int_min(cbgxend, band->x1); + prc->y1 = int_min(cbgyend, band->y1); + + tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; + tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; + brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; + brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; + prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; + prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; + + prc->cblks.enc = (opj_tcd_cblk_enc_t*) opj_calloc((prc->cw * prc->ch), sizeof(opj_tcd_cblk_enc_t)); + prc->incltree = tgt_create(prc->cw, prc->ch); + prc->imsbtree = tgt_create(prc->cw, prc->ch); + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); + int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); + int cblkxend = cblkxstart + (1 << cblkwidthexpn); + int cblkyend = cblkystart + (1 << cblkheightexpn); + + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + + /* code-block size (global) */ + cblk->x0 = int_max(cblkxstart, prc->x0); + cblk->y0 = int_max(cblkystart, prc->y0); + cblk->x1 = int_min(cblkxend, prc->x1); + cblk->y1 = int_min(cblkyend, prc->y1); + cblk->data = (unsigned char*) opj_calloc(8192+2, sizeof(unsigned char)); + /* FIXME: mqc_init_enc and mqc_byteout underrun the buffer if we don't do this. Why? */ + cblk->data += 2; + cblk->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); + cblk->passes = (opj_tcd_pass_t*) opj_calloc(100, sizeof(opj_tcd_pass_t)); + } + } + } + } + } + } + + /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ +} + +void tcd_free_encode(opj_tcd_t *tcd) { + int tileno, compno, resno, bandno, precno, cblkno; + + for (tileno = 0; tileno < 1; tileno++) { + opj_tcd_tile_t *tile = tcd->tcd_image->tiles; + + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + + for (precno = 0; precno < res->pw * res->ph; precno++) { + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + if (prc->incltree != NULL) { + tgt_destroy(prc->incltree); + prc->incltree = NULL; + } + if (prc->imsbtree != NULL) { + tgt_destroy(prc->imsbtree); + prc->imsbtree = NULL; + } + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_free(prc->cblks.enc[cblkno].data - 2); + opj_free(prc->cblks.enc[cblkno].layers); + opj_free(prc->cblks.enc[cblkno].passes); + } + opj_free(prc->cblks.enc); + } /* for (precno */ + opj_free(band->precincts); + band->precincts = NULL; + } /* for (bandno */ + } /* for (resno */ + opj_free(tilec->resolutions); + tilec->resolutions = NULL; + } /* for (compno */ + opj_free(tile->comps); + tile->comps = NULL; + } /* for (tileno */ + opj_free(tcd->tcd_image->tiles); + tcd->tcd_image->tiles = NULL; +} + +void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno) { + int tileno, compno, resno, bandno, precno, cblkno; + + for (tileno = 0; tileno < 1; tileno++) { + opj_tcp_t *tcp = &cp->tcps[curtileno]; + int j; + /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + int p = curtileno % cp->tw; + int q = curtileno / cp->tw; + + opj_tcd_tile_t *tile = tcd->tcd_image->tiles; + + /* 4 borders of the tile rescale on the image if necessary */ + tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); + tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); + tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); + tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); + + tile->numcomps = image->numcomps; + /* tile->PPT=image->PPT; */ + + /* Modification of the RATE >> */ + for (j = 0; j < tcp->numlayers; j++) { + tcp->rates[j] = tcp->rates[j] ? + ((float) (tile->numcomps + * (tile->x1 - tile->x0) + * (tile->y1 - tile->y0) + * image->comps[0].prec))/ + (tcp->rates[j] * 8 * image->comps[0].dx * image->comps[0].dy) + : 0; + + if (tcp->rates[j]) { + if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { + tcp->rates[j] = tcp->rates[j - 1] + 20; + } else { + if (!j && tcp->rates[j] < 30) + tcp->rates[j] = 30; + } + } + } + /* << Modification of the RATE */ + + /* tile->comps=(opj_tcd_tilecomp_t*)opj_realloc(tile->comps,image->numcomps*sizeof(opj_tcd_tilecomp_t)); */ + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tccp_t *tccp = &tcp->tccps[compno]; + + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + + /* border of each tile component (global) */ + tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); + tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); + tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); + tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); + + tilec->data = (int *) opj_aligned_malloc((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0) * sizeof(int)); + tilec->numresolutions = tccp->numresolutions; + /* tilec->resolutions=(opj_tcd_resolution_t*)opj_realloc(tilec->resolutions,tilec->numresolutions*sizeof(opj_tcd_resolution_t)); */ + for (resno = 0; resno < tilec->numresolutions; resno++) { + int pdx, pdy; + + int levelno = tilec->numresolutions - 1 - resno; + int tlprcxstart, tlprcystart, brprcxend, brprcyend; + int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; + int cbgwidthexpn, cbgheightexpn; + int cblkwidthexpn, cblkheightexpn; + + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + /* border for each resolution level (global) */ + res->x0 = int_ceildivpow2(tilec->x0, levelno); + res->y0 = int_ceildivpow2(tilec->y0, levelno); + res->x1 = int_ceildivpow2(tilec->x1, levelno); + res->y1 = int_ceildivpow2(tilec->y1, levelno); + res->numbands = resno == 0 ? 1 : 3; + + /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ + if (tccp->csty & J2K_CCP_CSTY_PRT) { + pdx = tccp->prcw[resno]; + pdy = tccp->prch[resno]; + } else { + pdx = 15; + pdy = 15; + } + /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; + tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; + brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; + brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; + + res->pw = (brprcxend - tlprcxstart) >> pdx; + res->ph = (brprcyend - tlprcystart) >> pdy; + + if (resno == 0) { + tlcbgxstart = tlprcxstart; + tlcbgystart = tlprcystart; + brcbgxend = brprcxend; + brcbgyend = brprcyend; + cbgwidthexpn = pdx; + cbgheightexpn = pdy; + } else { + tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); + tlcbgystart = int_ceildivpow2(tlprcystart, 1); + brcbgxend = int_ceildivpow2(brprcxend, 1); + brcbgyend = int_ceildivpow2(brprcyend, 1); + cbgwidthexpn = pdx - 1; + cbgheightexpn = pdy - 1; + } + + cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); + cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); + + for (bandno = 0; bandno < res->numbands; bandno++) { + int x0b, y0b; + int gain, numbps; + opj_stepsize_t *ss = NULL; + + opj_tcd_band_t *band = &res->bands[bandno]; + + band->bandno = resno == 0 ? 0 : bandno + 1; + x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; + y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; + + if (band->bandno == 0) { + /* band border */ + band->x0 = int_ceildivpow2(tilec->x0, levelno); + band->y0 = int_ceildivpow2(tilec->y0, levelno); + band->x1 = int_ceildivpow2(tilec->x1, levelno); + band->y1 = int_ceildivpow2(tilec->y1, levelno); + } else { + band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); + band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); + band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); + band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); + } + + ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; + gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); + numbps = image->comps[compno].prec + gain; + band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); + band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ + + for (precno = 0; precno < res->pw * res->ph; precno++) { + int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; + + int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); + int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); + int cbgxend = cbgxstart + (1 << cbgwidthexpn); + int cbgyend = cbgystart + (1 << cbgheightexpn); + + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + /* precinct size (global) */ + prc->x0 = int_max(cbgxstart, band->x0); + prc->y0 = int_max(cbgystart, band->y0); + prc->x1 = int_min(cbgxend, band->x1); + prc->y1 = int_min(cbgyend, band->y1); + + tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; + tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; + brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; + brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; + prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; + prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; + + opj_free(prc->cblks.enc); + prc->cblks.enc = (opj_tcd_cblk_enc_t*) opj_calloc(prc->cw * prc->ch, sizeof(opj_tcd_cblk_enc_t)); + + if (prc->incltree != NULL) { + tgt_destroy(prc->incltree); + } + if (prc->imsbtree != NULL) { + tgt_destroy(prc->imsbtree); + } + + prc->incltree = tgt_create(prc->cw, prc->ch); + prc->imsbtree = tgt_create(prc->cw, prc->ch); + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); + int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); + int cblkxend = cblkxstart + (1 << cblkwidthexpn); + int cblkyend = cblkystart + (1 << cblkheightexpn); + + opj_tcd_cblk_enc_t* cblk = &prc->cblks.enc[cblkno]; + + /* code-block size (global) */ + cblk->x0 = int_max(cblkxstart, prc->x0); + cblk->y0 = int_max(cblkystart, prc->y0); + cblk->x1 = int_min(cblkxend, prc->x1); + cblk->y1 = int_min(cblkyend, prc->y1); + cblk->data = (unsigned char*) opj_calloc(8192, sizeof(unsigned char)); + cblk->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); + cblk->passes = (opj_tcd_pass_t*) opj_calloc(100, sizeof(opj_tcd_pass_t)); + } + } /* precno */ + } /* bandno */ + } /* resno */ + } /* compno */ + } /* tileno */ + + /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ +} + +void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp) { + int i, j, tileno, p, q; + unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h; + + tcd->image = image; + tcd->tcd_image->tw = cp->tw; + tcd->tcd_image->th = cp->th; + tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_malloc(cp->tw * cp->th * sizeof(opj_tcd_tile_t)); + + /* + Allocate place to store the decoded data = final image + Place limited by the tile really present in the codestream + */ + + for (j = 0; j < cp->tileno_size; j++) { + opj_tcd_tile_t *tile; + + tileno = cp->tileno[j]; + tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); + tile->numcomps = image->numcomps; + tile->comps = (opj_tcd_tilecomp_t*) opj_calloc(image->numcomps, sizeof(opj_tcd_tilecomp_t)); + } + + for (i = 0; i < image->numcomps; i++) { + for (j = 0; j < cp->tileno_size; j++) { + opj_tcd_tile_t *tile; + opj_tcd_tilecomp_t *tilec; + + /* cfr p59 ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + + tileno = cp->tileno[j]; + + tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); + tilec = &tile->comps[i]; + + p = tileno % cp->tw; /* si numerotation matricielle .. */ + q = tileno / cp->tw; /* .. coordonnees de la tile (q,p) q pour ligne et p pour colonne */ + + /* 4 borders of the tile rescale on the image if necessary */ + tile->x0 = int_max(cp->tx0 + p * cp->tdx, image->x0); + tile->y0 = int_max(cp->ty0 + q * cp->tdy, image->y0); + tile->x1 = int_min(cp->tx0 + (p + 1) * cp->tdx, image->x1); + tile->y1 = int_min(cp->ty0 + (q + 1) * cp->tdy, image->y1); + + tilec->x0 = int_ceildiv(tile->x0, image->comps[i].dx); + tilec->y0 = int_ceildiv(tile->y0, image->comps[i].dy); + tilec->x1 = int_ceildiv(tile->x1, image->comps[i].dx); + tilec->y1 = int_ceildiv(tile->y1, image->comps[i].dy); + + x0 = j == 0 ? tilec->x0 : int_min(x0, (unsigned int) tilec->x0); + y0 = j == 0 ? tilec->y0 : int_min(y0, (unsigned int) tilec->x0); + x1 = j == 0 ? tilec->x1 : int_max(x1, (unsigned int) tilec->x1); + y1 = j == 0 ? tilec->y1 : int_max(y1, (unsigned int) tilec->y1); + } + + w = int_ceildivpow2(x1 - x0, image->comps[i].factor); + h = int_ceildivpow2(y1 - y0, image->comps[i].factor); + + image->comps[i].w = w; + image->comps[i].h = h; + image->comps[i].x0 = x0; + image->comps[i].y0 = y0; + } +} + +void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int tileno, opj_codestream_info_t *cstr_info) { + int compno, resno, bandno, precno, cblkno; + opj_tcp_t *tcp; + opj_tcd_tile_t *tile; + + tcd->cp = cp; + + tcp = &(cp->tcps[cp->tileno[tileno]]); + tile = &(tcd->tcd_image->tiles[cp->tileno[tileno]]); + + tileno = cp->tileno[tileno]; + + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + + /* border of each tile component (global) */ + tilec->x0 = int_ceildiv(tile->x0, image->comps[compno].dx); + tilec->y0 = int_ceildiv(tile->y0, image->comps[compno].dy); + tilec->x1 = int_ceildiv(tile->x1, image->comps[compno].dx); + tilec->y1 = int_ceildiv(tile->y1, image->comps[compno].dy); + + tilec->numresolutions = tccp->numresolutions; + tilec->resolutions = (opj_tcd_resolution_t *) opj_malloc(tilec->numresolutions * sizeof(opj_tcd_resolution_t)); + + for (resno = 0; resno < tilec->numresolutions; resno++) { + int pdx, pdy; + int levelno = tilec->numresolutions - 1 - resno; + int tlprcxstart, tlprcystart, brprcxend, brprcyend; + int tlcbgxstart, tlcbgystart, brcbgxend, brcbgyend; + int cbgwidthexpn, cbgheightexpn; + int cblkwidthexpn, cblkheightexpn; + + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + /* border for each resolution level (global) */ + res->x0 = int_ceildivpow2(tilec->x0, levelno); + res->y0 = int_ceildivpow2(tilec->y0, levelno); + res->x1 = int_ceildivpow2(tilec->x1, levelno); + res->y1 = int_ceildivpow2(tilec->y1, levelno); + res->numbands = resno == 0 ? 1 : 3; + + /* p. 35, table A-23, ISO/IEC FDIS154444-1 : 2000 (18 august 2000) */ + if (tccp->csty & J2K_CCP_CSTY_PRT) { + pdx = tccp->prcw[resno]; + pdy = tccp->prch[resno]; + } else { + pdx = 15; + pdy = 15; + } + + /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */ + tlprcxstart = int_floordivpow2(res->x0, pdx) << pdx; + tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; + brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; + brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; + + res->pw = (res->x0 == res->x1) ? 0 : ((brprcxend - tlprcxstart) >> pdx); + res->ph = (res->y0 == res->y1) ? 0 : ((brprcyend - tlprcystart) >> pdy); + + if (resno == 0) { + tlcbgxstart = tlprcxstart; + tlcbgystart = tlprcystart; + brcbgxend = brprcxend; + brcbgyend = brprcyend; + cbgwidthexpn = pdx; + cbgheightexpn = pdy; + } else { + tlcbgxstart = int_ceildivpow2(tlprcxstart, 1); + tlcbgystart = int_ceildivpow2(tlprcystart, 1); + brcbgxend = int_ceildivpow2(brprcxend, 1); + brcbgyend = int_ceildivpow2(brprcyend, 1); + cbgwidthexpn = pdx - 1; + cbgheightexpn = pdy - 1; + } + + cblkwidthexpn = int_min(tccp->cblkw, cbgwidthexpn); + cblkheightexpn = int_min(tccp->cblkh, cbgheightexpn); + + for (bandno = 0; bandno < res->numbands; bandno++) { + int x0b, y0b; + int gain, numbps; + opj_stepsize_t *ss = NULL; + + opj_tcd_band_t *band = &res->bands[bandno]; + band->bandno = resno == 0 ? 0 : bandno + 1; + x0b = (band->bandno == 1) || (band->bandno == 3) ? 1 : 0; + y0b = (band->bandno == 2) || (band->bandno == 3) ? 1 : 0; + + if (band->bandno == 0) { + /* band border (global) */ + band->x0 = int_ceildivpow2(tilec->x0, levelno); + band->y0 = int_ceildivpow2(tilec->y0, levelno); + band->x1 = int_ceildivpow2(tilec->x1, levelno); + band->y1 = int_ceildivpow2(tilec->y1, levelno); + } else { + /* band border (global) */ + band->x0 = int_ceildivpow2(tilec->x0 - (1 << levelno) * x0b, levelno + 1); + band->y0 = int_ceildivpow2(tilec->y0 - (1 << levelno) * y0b, levelno + 1); + band->x1 = int_ceildivpow2(tilec->x1 - (1 << levelno) * x0b, levelno + 1); + band->y1 = int_ceildivpow2(tilec->y1 - (1 << levelno) * y0b, levelno + 1); + } + + ss = &tccp->stepsizes[resno == 0 ? 0 : 3 * (resno - 1) + bandno + 1]; + gain = tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); + numbps = image->comps[compno].prec + gain; + band->stepsize = (float)(((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)) * 0.5); + band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ + + band->precincts = (opj_tcd_precinct_t *) opj_malloc(res->pw * res->ph * sizeof(opj_tcd_precinct_t)); + + for (precno = 0; precno < res->pw * res->ph; precno++) { + int tlcblkxstart, tlcblkystart, brcblkxend, brcblkyend; + int cbgxstart = tlcbgxstart + (precno % res->pw) * (1 << cbgwidthexpn); + int cbgystart = tlcbgystart + (precno / res->pw) * (1 << cbgheightexpn); + int cbgxend = cbgxstart + (1 << cbgwidthexpn); + int cbgyend = cbgystart + (1 << cbgheightexpn); + + opj_tcd_precinct_t *prc = &band->precincts[precno]; + /* precinct size (global) */ + prc->x0 = int_max(cbgxstart, band->x0); + prc->y0 = int_max(cbgystart, band->y0); + prc->x1 = int_min(cbgxend, band->x1); + prc->y1 = int_min(cbgyend, band->y1); + + tlcblkxstart = int_floordivpow2(prc->x0, cblkwidthexpn) << cblkwidthexpn; + tlcblkystart = int_floordivpow2(prc->y0, cblkheightexpn) << cblkheightexpn; + brcblkxend = int_ceildivpow2(prc->x1, cblkwidthexpn) << cblkwidthexpn; + brcblkyend = int_ceildivpow2(prc->y1, cblkheightexpn) << cblkheightexpn; + prc->cw = (brcblkxend - tlcblkxstart) >> cblkwidthexpn; + prc->ch = (brcblkyend - tlcblkystart) >> cblkheightexpn; + + prc->cblks.dec = (opj_tcd_cblk_dec_t*) opj_malloc(prc->cw * prc->ch * sizeof(opj_tcd_cblk_dec_t)); + + prc->incltree = tgt_create(prc->cw, prc->ch); + prc->imsbtree = tgt_create(prc->cw, prc->ch); + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + int cblkxstart = tlcblkxstart + (cblkno % prc->cw) * (1 << cblkwidthexpn); + int cblkystart = tlcblkystart + (cblkno / prc->cw) * (1 << cblkheightexpn); + int cblkxend = cblkxstart + (1 << cblkwidthexpn); + int cblkyend = cblkystart + (1 << cblkheightexpn); + + opj_tcd_cblk_dec_t* cblk = &prc->cblks.dec[cblkno]; + cblk->data = NULL; + cblk->segs = NULL; + /* code-block size (global) */ + cblk->x0 = int_max(cblkxstart, prc->x0); + cblk->y0 = int_max(cblkystart, prc->y0); + cblk->x1 = int_min(cblkxend, prc->x1); + cblk->y1 = int_min(cblkyend, prc->y1); + cblk->numsegs = 0; + } + } /* precno */ + } /* bandno */ + } /* resno */ + } /* compno */ + /* tcd_dump(stdout, tcd, &tcd->tcd_image); */ +} + +void tcd_makelayer_fixed(opj_tcd_t *tcd, int layno, int final) { + int compno, resno, bandno, precno, cblkno; + int value; /*, matrice[tcd_tcp->numlayers][tcd_tile->comps[0].numresolutions][3]; */ + int matrice[10][10][3]; + int i, j, k; + + opj_cp_t *cp = tcd->cp; + opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; + opj_tcp_t *tcd_tcp = tcd->tcp; + + /*matrice=(int*)opj_malloc(tcd_tcp->numlayers*tcd_tile->comps[0].numresolutions*3*sizeof(int)); */ + + for (compno = 0; compno < tcd_tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; + for (i = 0; i < tcd_tcp->numlayers; i++) { + for (j = 0; j < tilec->numresolutions; j++) { + for (k = 0; k < 3; k++) { + matrice[i][j][k] = + (int) (cp->matrice[i * tilec->numresolutions * 3 + j * 3 + k] + * (float) (tcd->image->comps[compno].prec / 16.0)); + } + } + } + + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + for (precno = 0; precno < res->pw * res->ph; precno++) { + opj_tcd_precinct_t *prc = &band->precincts[precno]; + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; + opj_tcd_layer_t *layer = &cblk->layers[layno]; + int n; + int imsb = tcd->image->comps[compno].prec - cblk->numbps; /* number of bit-plan equal to zero */ + /* Correction of the matrix of coefficient to include the IMSB information */ + if (layno == 0) { + value = matrice[layno][resno][bandno]; + if (imsb >= value) { + value = 0; + } else { + value -= imsb; + } + } else { + value = matrice[layno][resno][bandno] - matrice[layno - 1][resno][bandno]; + if (imsb >= matrice[layno - 1][resno][bandno]) { + value -= (imsb - matrice[layno - 1][resno][bandno]); + if (value < 0) { + value = 0; + } + } + } + + if (layno == 0) { + cblk->numpassesinlayers = 0; + } + + n = cblk->numpassesinlayers; + if (cblk->numpassesinlayers == 0) { + if (value != 0) { + n = 3 * value - 2 + cblk->numpassesinlayers; + } else { + n = cblk->numpassesinlayers; + } + } else { + n = 3 * value + cblk->numpassesinlayers; + } + + layer->numpasses = n - cblk->numpassesinlayers; + + if (!layer->numpasses) + continue; + + if (cblk->numpassesinlayers == 0) { + layer->len = cblk->passes[n - 1].rate; + layer->data = cblk->data; + } else { + layer->len = cblk->passes[n - 1].rate - cblk->passes[cblk->numpassesinlayers - 1].rate; + layer->data = cblk->data + cblk->passes[cblk->numpassesinlayers - 1].rate; + } + if (final) + cblk->numpassesinlayers = n; + } + } + } + } + } +} + +void tcd_rateallocate_fixed(opj_tcd_t *tcd) { + int layno; + for (layno = 0; layno < tcd->tcp->numlayers; layno++) { + tcd_makelayer_fixed(tcd, layno, 1); + } +} + +void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final) { + int compno, resno, bandno, precno, cblkno, passno; + + opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; + + tcd_tile->distolayer[layno] = 0; /* fixed_quality */ + + for (compno = 0; compno < tcd_tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + for (precno = 0; precno < res->pw * res->ph; precno++) { + opj_tcd_precinct_t *prc = &band->precincts[precno]; + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; + opj_tcd_layer_t *layer = &cblk->layers[layno]; + + int n; + if (layno == 0) { + cblk->numpassesinlayers = 0; + } + n = cblk->numpassesinlayers; + for (passno = cblk->numpassesinlayers; passno < cblk->totalpasses; passno++) { + int dr; + double dd; + opj_tcd_pass_t *pass = &cblk->passes[passno]; + if (n == 0) { + dr = pass->rate; + dd = pass->distortiondec; + } else { + dr = pass->rate - cblk->passes[n - 1].rate; + dd = pass->distortiondec - cblk->passes[n - 1].distortiondec; + } + if (!dr) { + if (dd != 0) + n = passno + 1; + continue; + } + if (dd / dr >= thresh) + n = passno + 1; + } + layer->numpasses = n - cblk->numpassesinlayers; + + if (!layer->numpasses) { + layer->disto = 0; + continue; + } + if (cblk->numpassesinlayers == 0) { + layer->len = cblk->passes[n - 1].rate; + layer->data = cblk->data; + layer->disto = cblk->passes[n - 1].distortiondec; + } else { + layer->len = cblk->passes[n - 1].rate - cblk->passes[cblk->numpassesinlayers - 1].rate; + layer->data = cblk->data + cblk->passes[cblk->numpassesinlayers - 1].rate; + layer->disto = cblk->passes[n - 1].distortiondec - cblk->passes[cblk->numpassesinlayers - 1].distortiondec; + } + + tcd_tile->distolayer[layno] += layer->disto; /* fixed_quality */ + + if (final) + cblk->numpassesinlayers = n; + } + } + } + } + } +} + +bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestream_info_t *cstr_info) { + int compno, resno, bandno, precno, cblkno, passno, layno; + double min, max; + double cumdisto[100]; /* fixed_quality */ + const double K = 1; /* 1.1; fixed_quality */ + double maxSE = 0; + + opj_cp_t *cp = tcd->cp; + opj_tcd_tile_t *tcd_tile = tcd->tcd_tile; + opj_tcp_t *tcd_tcp = tcd->tcp; + + min = DBL_MAX; + max = 0; + + tcd_tile->numpix = 0; /* fixed_quality */ + + for (compno = 0; compno < tcd_tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; + tilec->numpix = 0; + + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + + for (precno = 0; precno < res->pw * res->ph; precno++) { + opj_tcd_precinct_t *prc = &band->precincts[precno]; + + for (cblkno = 0; cblkno < prc->cw * prc->ch; cblkno++) { + opj_tcd_cblk_enc_t *cblk = &prc->cblks.enc[cblkno]; + + for (passno = 0; passno < cblk->totalpasses; passno++) { + opj_tcd_pass_t *pass = &cblk->passes[passno]; + int dr; + double dd, rdslope; + if (passno == 0) { + dr = pass->rate; + dd = pass->distortiondec; + } else { + dr = pass->rate - cblk->passes[passno - 1].rate; + dd = pass->distortiondec - cblk->passes[passno - 1].distortiondec; + } + if (dr == 0) { + continue; + } + rdslope = dd / dr; + if (rdslope < min) { + min = rdslope; + } + if (rdslope > max) { + max = rdslope; + } + } /* passno */ + + /* fixed_quality */ + tcd_tile->numpix += ((cblk->x1 - cblk->x0) * (cblk->y1 - cblk->y0)); + tilec->numpix += ((cblk->x1 - cblk->x0) * (cblk->y1 - cblk->y0)); + } /* cbklno */ + } /* precno */ + } /* bandno */ + } /* resno */ + + maxSE += (((double)(1 << tcd->image->comps[compno].prec) - 1.0) + * ((double)(1 << tcd->image->comps[compno].prec) -1.0)) + * ((double)(tilec->numpix)); + } /* compno */ + + /* index file */ + if(cstr_info) { + opj_tile_info_t *tile_info = &cstr_info->tile[tcd->tcd_tileno]; + tile_info->numpix = tcd_tile->numpix; + tile_info->distotile = tcd_tile->distotile; + tile_info->thresh = (double *) opj_malloc(tcd_tcp->numlayers * sizeof(double)); + } + + for (layno = 0; layno < tcd_tcp->numlayers; layno++) { + double lo = min; + double hi = max; + int success = 0; + int maxlen = tcd_tcp->rates[layno] ? int_min(((int) ceil(tcd_tcp->rates[layno])), len) : len; + double goodthresh = 0; + double stable_thresh = 0; + int i; + double distotarget; /* fixed_quality */ + + /* fixed_quality */ + distotarget = tcd_tile->distotile - ((K * maxSE) / pow((float)10, tcd_tcp->distoratio[layno] / 10)); + + /* Don't try to find an optimal threshold but rather take everything not included yet, if + -r xx,yy,zz,0 (disto_alloc == 1 and rates == 0) + -q xx,yy,zz,0 (fixed_quality == 1 and distoratio == 0) + ==> possible to have some lossy layers and the last layer for sure lossless */ + if ( ((cp->disto_alloc==1) && (tcd_tcp->rates[layno]>0)) || ((cp->fixed_quality==1) && (tcd_tcp->distoratio[layno]>0))) { + opj_t2_t *t2 = t2_create(tcd->cinfo, tcd->image, cp); + double thresh = 0; + + for (i = 0; i < 32; i++) { + int l = 0; + double distoachieved = 0; /* fixed_quality */ + thresh = (lo + hi) / 2; + + tcd_makelayer(tcd, layno, thresh, 0); + + if (cp->fixed_quality) { /* fixed_quality */ + if(cp->cinema){ + l = t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC, tcd->cur_totnum_tp); + if (l == -999) { + lo = thresh; + continue; + }else{ + distoachieved = layno == 0 ? + tcd_tile->distolayer[0] : cumdisto[layno - 1] + tcd_tile->distolayer[layno]; + if (distoachieved < distotarget) { + hi=thresh; + stable_thresh = thresh; + continue; + }else{ + lo=thresh; + } + } + }else{ + distoachieved = (layno == 0) ? + tcd_tile->distolayer[0] : (cumdisto[layno - 1] + tcd_tile->distolayer[layno]); + if (distoachieved < distotarget) { + hi = thresh; + stable_thresh = thresh; + continue; + } + lo = thresh; + } + } else { + l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, cstr_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC, tcd->cur_totnum_tp); + /* TODO: what to do with l ??? seek / tell ??? */ + /* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */ + if (l == -999) { + lo = thresh; + continue; + } + hi = thresh; + stable_thresh = thresh; + } + } + success = 1; + goodthresh = stable_thresh == 0? thresh : stable_thresh; + t2_destroy(t2); + } else { + success = 1; + goodthresh = min; + } + + if (!success) { + return false; + } + + if(cstr_info) { /* Threshold for Marcela Index */ + cstr_info->tile[tcd->tcd_tileno].thresh[layno] = goodthresh; + } + tcd_makelayer(tcd, layno, goodthresh, 1); + + /* fixed_quality */ + cumdisto[layno] = (layno == 0) ? tcd_tile->distolayer[0] : (cumdisto[layno - 1] + tcd_tile->distolayer[layno]); + } + + return true; +} + +int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, opj_codestream_info_t *cstr_info) { + int compno; + int l, i, numpacks = 0; + opj_tcd_tile_t *tile = NULL; + opj_tcp_t *tcd_tcp = NULL; + opj_cp_t *cp = NULL; + + opj_tcp_t *tcp = &tcd->cp->tcps[0]; + opj_tccp_t *tccp = &tcp->tccps[0]; + opj_image_t *image = tcd->image; + + opj_t1_t *t1 = NULL; /* T1 component */ + opj_t2_t *t2 = NULL; /* T2 component */ + + tcd->tcd_tileno = tileno; + tcd->tcd_tile = tcd->tcd_image->tiles; + tcd->tcp = &tcd->cp->tcps[tileno]; + + tile = tcd->tcd_tile; + tcd_tcp = tcd->tcp; + cp = tcd->cp; + + if(tcd->cur_tp_num == 0){ + tcd->encoding_time = opj_clock(); /* time needed to encode a tile */ + /* INDEX >> "Precinct_nb_X et Precinct_nb_Y" */ + if(cstr_info) { + opj_tcd_tilecomp_t *tilec_idx = &tile->comps[0]; /* based on component 0 */ + for (i = 0; i < tilec_idx->numresolutions; i++) { + opj_tcd_resolution_t *res_idx = &tilec_idx->resolutions[i]; + + cstr_info->tile[tileno].pw[i] = res_idx->pw; + cstr_info->tile[tileno].ph[i] = res_idx->ph; + + numpacks += res_idx->pw * res_idx->ph; + + cstr_info->tile[tileno].pdx[i] = tccp->prcw[i]; + cstr_info->tile[tileno].pdy[i] = tccp->prch[i]; + } + cstr_info->tile[tileno].packet = (opj_packet_info_t*) opj_calloc(cstr_info->numcomps * cstr_info->numlayers * numpacks, sizeof(opj_packet_info_t)); + } + /* << INDEX */ + + /*---------------TILE-------------------*/ + + for (compno = 0; compno < tile->numcomps; compno++) { + int x, y; + + int adjust = image->comps[compno].sgnd ? 0 : 1 << (image->comps[compno].prec - 1); + int offset_x = int_ceildiv(image->x0, image->comps[compno].dx); + int offset_y = int_ceildiv(image->y0, image->comps[compno].dy); + + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + int tw = tilec->x1 - tilec->x0; + int w = int_ceildiv(image->x1 - image->x0, image->comps[compno].dx); + + /* extract tile data */ + + if (tcd_tcp->tccps[compno].qmfbid == 1) { + for (y = tilec->y0; y < tilec->y1; y++) { + /* start of the src tile scanline */ + int *data = &image->comps[compno].data[(tilec->x0 - offset_x) + (y - offset_y) * w]; + /* start of the dst tile scanline */ + int *tile_data = &tilec->data[(y - tilec->y0) * tw]; + for (x = tilec->x0; x < tilec->x1; x++) { + *tile_data++ = *data++ - adjust; + } + } + } else if (tcd_tcp->tccps[compno].qmfbid == 0) { + for (y = tilec->y0; y < tilec->y1; y++) { + /* start of the src tile scanline */ + int *data = &image->comps[compno].data[(tilec->x0 - offset_x) + (y - offset_y) * w]; + /* start of the dst tile scanline */ + int *tile_data = &tilec->data[(y - tilec->y0) * tw]; + for (x = tilec->x0; x < tilec->x1; x++) { + *tile_data++ = (*data++ - adjust) << 11; + } + + } + } + } + + /*----------------MCT-------------------*/ + if (tcd_tcp->mct) { + int samples = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0); + if (tcd_tcp->tccps[0].qmfbid == 0) { + mct_encode_real(tile->comps[0].data, tile->comps[1].data, tile->comps[2].data, samples); + } else { + mct_encode(tile->comps[0].data, tile->comps[1].data, tile->comps[2].data, samples); + } + } + + /*----------------DWT---------------------*/ + + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + if (tcd_tcp->tccps[compno].qmfbid == 1) { + dwt_encode(tilec); + } else if (tcd_tcp->tccps[compno].qmfbid == 0) { + dwt_encode_real(tilec); + } + } + + /*------------------TIER1-----------------*/ + t1 = t1_create(tcd->cinfo); + t1_encode_cblks(t1, tile, tcd_tcp); + t1_destroy(t1); + + /*-----------RATE-ALLOCATE------------------*/ + + /* INDEX */ + if(cstr_info) { + cstr_info->index_write = 0; + } + if (cp->disto_alloc || cp->fixed_quality) { /* fixed_quality */ + /* Normal Rate/distortion allocation */ + tcd_rateallocate(tcd, dest, len, cstr_info); + } else { + /* Fixed layer allocation */ + tcd_rateallocate_fixed(tcd); + } + } + /*--------------TIER2------------------*/ + + /* INDEX */ + if(cstr_info) { + cstr_info->index_write = 1; + } + + t2 = t2_create(tcd->cinfo, image, cp); + l = t2_encode_packets(t2,tileno, tile, tcd_tcp->numlayers, dest, len, cstr_info,tcd->tp_num,tcd->tp_pos,tcd->cur_pino,FINAL_PASS,tcd->cur_totnum_tp); + t2_destroy(t2); + + /*---------------CLEAN-------------------*/ + + + if(tcd->cur_tp_num == tcd->cur_totnum_tp - 1){ + tcd->encoding_time = opj_clock() - tcd->encoding_time; + opj_event_msg(tcd->cinfo, EVT_INFO, "- tile encoded in %f s\n", tcd->encoding_time); + + /* cleaning memory */ + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + opj_aligned_free(tilec->data); + } + } + + return l; +} + +bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info) { + int l; + int compno; + int eof = 0; + double tile_time, t1_time, dwt_time; + opj_tcd_tile_t *tile = NULL; + + opj_t1_t *t1 = NULL; /* T1 component */ + opj_t2_t *t2 = NULL; /* T2 component */ + + tcd->tcd_tileno = tileno; + tcd->tcd_tile = &(tcd->tcd_image->tiles[tileno]); + tcd->tcp = &(tcd->cp->tcps[tileno]); + tile = tcd->tcd_tile; + + tile_time = opj_clock(); /* time needed to decode a tile */ + opj_event_msg(tcd->cinfo, EVT_INFO, "tile %d of %d\n", tileno + 1, tcd->cp->tw * tcd->cp->th); + + /* INDEX >> */ + if(cstr_info) { + int resno, compno, numprec = 0; + for (compno = 0; compno < cstr_info->numcomps; compno++) { + opj_tcp_t *tcp = &tcd->cp->tcps[0]; + opj_tccp_t *tccp = &tcp->tccps[compno]; + opj_tcd_tilecomp_t *tilec_idx = &tile->comps[compno]; + for (resno = 0; resno < tilec_idx->numresolutions; resno++) { + opj_tcd_resolution_t *res_idx = &tilec_idx->resolutions[resno]; + cstr_info->tile[tileno].pw[resno] = res_idx->pw; + cstr_info->tile[tileno].ph[resno] = res_idx->ph; + numprec += res_idx->pw * res_idx->ph; + if (tccp->csty & J2K_CP_CSTY_PRT) { + cstr_info->tile[tileno].pdx[resno] = tccp->prcw[resno]; + cstr_info->tile[tileno].pdy[resno] = tccp->prch[resno]; + } + else { + cstr_info->tile[tileno].pdx[resno] = 15; + cstr_info->tile[tileno].pdx[resno] = 15; + } + } + } + cstr_info->tile[tileno].packet = (opj_packet_info_t *) opj_malloc(cstr_info->numlayers * numprec * sizeof(opj_packet_info_t)); + cstr_info->packno = 0; + } + /* << INDEX */ + + /*--------------TIER2------------------*/ + + t2 = t2_create(tcd->cinfo, tcd->image, tcd->cp); + l = t2_decode_packets(t2, src, len, tileno, tile, cstr_info); + t2_destroy(t2); + + if (l == -999) { + eof = 1; + opj_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n"); + } + + /*------------------TIER1-----------------*/ + + t1_time = opj_clock(); /* time needed to decode a tile */ + t1 = t1_create(tcd->cinfo); + for (compno = 0; compno < tile->numcomps; ++compno) { + opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; + /* The +3 is headroom required by the vectorized DWT */ + tilec->data = (int*) opj_aligned_malloc((((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0))+3) * sizeof(int)); + t1_decode_cblks(t1, tilec, &tcd->tcp->tccps[compno]); + } + t1_destroy(t1); + t1_time = opj_clock() - t1_time; + opj_event_msg(tcd->cinfo, EVT_INFO, "- tiers-1 took %f s\n", t1_time); + + /*----------------DWT---------------------*/ + + dwt_time = opj_clock(); /* time needed to decode a tile */ + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + int numres2decode; + + if (tcd->cp->reduce != 0) { + tcd->image->comps[compno].resno_decoded = + tile->comps[compno].numresolutions - tcd->cp->reduce - 1; + if (tcd->image->comps[compno].resno_decoded < 0) { + opj_event_msg(tcd->cinfo, EVT_ERROR, "Error decoding tile. The number of resolutions to remove [%d+1] is higher than the number " + " of resolutions in the original codestream [%d]\nModify the cp_reduce parameter.\n", tcd->cp->reduce, tile->comps[compno].numresolutions); + return false; + } + } + + numres2decode = tcd->image->comps[compno].resno_decoded + 1; + if(numres2decode > 0){ + if (tcd->tcp->tccps[compno].qmfbid == 1) { + dwt_decode(tilec, numres2decode); + } else { + dwt_decode_real(tilec, numres2decode); + } + } + } + dwt_time = opj_clock() - dwt_time; + opj_event_msg(tcd->cinfo, EVT_INFO, "- dwt took %f s\n", dwt_time); + + /*----------------MCT-------------------*/ + + if (tcd->tcp->mct) { + int n = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0); + if (tcd->tcp->tccps[0].qmfbid == 1) { + mct_decode( + tile->comps[0].data, + tile->comps[1].data, + tile->comps[2].data, + n); + } else { + mct_decode_real( + (float*)tile->comps[0].data, + (float*)tile->comps[1].data, + (float*)tile->comps[2].data, + n); + } + } + + /*---------------TILE-------------------*/ + + for (compno = 0; compno < tile->numcomps; ++compno) { + opj_tcd_tilecomp_t* tilec = &tile->comps[compno]; + opj_image_comp_t* imagec = &tcd->image->comps[compno]; + opj_tcd_resolution_t* res = &tilec->resolutions[imagec->resno_decoded]; + int adjust = imagec->sgnd ? 0 : 1 << (imagec->prec - 1); + int min = imagec->sgnd ? -(1 << (imagec->prec - 1)) : 0; + int max = imagec->sgnd ? (1 << (imagec->prec - 1)) - 1 : (1 << imagec->prec) - 1; + + int tw = tilec->x1 - tilec->x0; + int w = imagec->w; + + int offset_x = int_ceildivpow2(imagec->x0, imagec->factor); + int offset_y = int_ceildivpow2(imagec->y0, imagec->factor); + + int i, j; + if(!imagec->data){ + imagec->data = (int*) opj_malloc(imagec->w * imagec->h * sizeof(int)); + } + if(tcd->tcp->tccps[compno].qmfbid == 1) { + for(j = res->y0; j < res->y1; ++j) { + for(i = res->x0; i < res->x1; ++i) { + int v = tilec->data[i - res->x0 + (j - res->y0) * tw]; + v += adjust; + imagec->data[(i - offset_x) + (j - offset_y) * w] = int_clamp(v, min, max); + } + } + }else{ + for(j = res->y0; j < res->y1; ++j) { + for(i = res->x0; i < res->x1; ++i) { + float tmp = ((float*)tilec->data)[i - res->x0 + (j - res->y0) * tw]; + int v = lrintf(tmp); + v += adjust; + imagec->data[(i - offset_x) + (j - offset_y) * w] = int_clamp(v, min, max); + } + } + } + opj_aligned_free(tilec->data); + } + + tile_time = opj_clock() - tile_time; /* time needed to decode a tile */ + opj_event_msg(tcd->cinfo, EVT_INFO, "- tile decoded in %f s\n", tile_time); + + if (eof) { + return false; + } + + return true; +} + +void tcd_free_decode(opj_tcd_t *tcd) { + opj_tcd_image_t *tcd_image = tcd->tcd_image; + opj_free(tcd_image->tiles); +} + +void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno) { + int compno,resno,bandno,precno; + + opj_tcd_image_t *tcd_image = tcd->tcd_image; + + opj_tcd_tile_t *tile = &tcd_image->tiles[tileno]; + for (compno = 0; compno < tile->numcomps; compno++) { + opj_tcd_tilecomp_t *tilec = &tile->comps[compno]; + for (resno = 0; resno < tilec->numresolutions; resno++) { + opj_tcd_resolution_t *res = &tilec->resolutions[resno]; + for (bandno = 0; bandno < res->numbands; bandno++) { + opj_tcd_band_t *band = &res->bands[bandno]; + for (precno = 0; precno < res->ph * res->pw; precno++) { + opj_tcd_precinct_t *prec = &band->precincts[precno]; + if (prec->imsbtree != NULL) tgt_destroy(prec->imsbtree); + if (prec->incltree != NULL) tgt_destroy(prec->incltree); + } + opj_free(band->precincts); + } + } + opj_free(tilec->resolutions); + } + opj_free(tile->comps); +} + + diff --git a/extern/libopenjpeg/tcd.h b/extern/libopenjpeg/tcd.h new file mode 100644 index 00000000000..f0ac5619f1e --- /dev/null +++ b/extern/libopenjpeg/tcd.h @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __TCD_H +#define __TCD_H +/** +@file tcd.h +@brief Implementation of a tile coder/decoder (TCD) + +The functions in TCD.C have for goal to encode or decode each tile independently from +each other. The functions in TCD.C are used by some function in J2K.C. +*/ + +/** @defgroup TCD TCD - Implementation of a tile coder/decoder */ +/*@{*/ + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_seg { + unsigned char** data; + int dataindex; + int numpasses; + int len; + int maxpasses; + int numnewpasses; + int newlen; +} opj_tcd_seg_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_pass { + int rate; + double distortiondec; + int term, len; +} opj_tcd_pass_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_layer { + int numpasses; /* Number of passes in the layer */ + int len; /* len of information */ + double disto; /* add for index (Cfr. Marcela) */ + unsigned char *data; /* data */ +} opj_tcd_layer_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_cblk_enc { + unsigned char* data; /* Data */ + opj_tcd_layer_t* layers; /* layer information */ + opj_tcd_pass_t* passes; /* information about the passes */ + int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ + int numbps; + int numlenbits; + int numpasses; /* number of pass already done for the code-blocks */ + int numpassesinlayers; /* number of passes in the layer */ + int totalpasses; /* total number of passes */ +} opj_tcd_cblk_enc_t; + +typedef struct opj_tcd_cblk_dec { + unsigned char* data; /* Data */ + opj_tcd_seg_t* segs; /* segments informations */ + int x0, y0, x1, y1; /* dimension of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */ + int numbps; + int numlenbits; + int len; /* length */ + int numnewpasses; /* number of pass added to the code-blocks */ + int numsegs; /* number of segments */ +} opj_tcd_cblk_dec_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_precinct { + int x0, y0, x1, y1; /* dimension of the precinct : left upper corner (x0, y0) right low corner (x1,y1) */ + int cw, ch; /* number of precinct in width and heigth */ + union{ /* code-blocks informations */ + opj_tcd_cblk_enc_t* enc; + opj_tcd_cblk_dec_t* dec; + } cblks; + opj_tgt_tree_t *incltree; /* inclusion tree */ + opj_tgt_tree_t *imsbtree; /* IMSB tree */ +} opj_tcd_precinct_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_band { + int x0, y0, x1, y1; /* dimension of the subband : left upper corner (x0, y0) right low corner (x1,y1) */ + int bandno; + opj_tcd_precinct_t *precincts; /* precinct information */ + int numbps; + float stepsize; +} opj_tcd_band_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_resolution { + int x0, y0, x1, y1; /* dimension of the resolution level : left upper corner (x0, y0) right low corner (x1,y1) */ + int pw, ph; + int numbands; /* number sub-band for the resolution level */ + opj_tcd_band_t bands[3]; /* subband information */ +} opj_tcd_resolution_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_tilecomp { + int x0, y0, x1, y1; /* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */ + int numresolutions; /* number of resolutions level */ + opj_tcd_resolution_t *resolutions; /* resolutions information */ + int *data; /* data of the component */ + int numpix; /* add fixed_quality */ +} opj_tcd_tilecomp_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_tile { + int x0, y0, x1, y1; /* dimension of the tile : left upper corner (x0, y0) right low corner (x1,y1) */ + int numcomps; /* number of components in tile */ + opj_tcd_tilecomp_t *comps; /* Components information */ + int numpix; /* add fixed_quality */ + double distotile; /* add fixed_quality */ + double distolayer[100]; /* add fixed_quality */ + /** packet number */ + int packno; +} opj_tcd_tile_t; + +/** +FIXME: documentation +*/ +typedef struct opj_tcd_image { + int tw, th; /* number of tiles in width and heigth */ + opj_tcd_tile_t *tiles; /* Tiles information */ +} opj_tcd_image_t; + +/** +Tile coder/decoder +*/ +typedef struct opj_tcd { + /** Position of the tilepart flag in Progression order*/ + int tp_pos; + /** Tile part number*/ + int tp_num; + /** Current tile part number*/ + int cur_tp_num; + /** Total number of tileparts of the current tile*/ + int cur_totnum_tp; + /** Current Packet iterator number */ + int cur_pino; + /** codec context */ + opj_common_ptr cinfo; + + /** info on each image tile */ + opj_tcd_image_t *tcd_image; + /** image */ + opj_image_t *image; + /** coding parameters */ + opj_cp_t *cp; + /** pointer to the current encoded/decoded tile */ + opj_tcd_tile_t *tcd_tile; + /** coding/decoding parameters common to all tiles */ + opj_tcp_t *tcp; + /** current encoded/decoded tile */ + int tcd_tileno; + /** Time taken to encode a tile*/ + double encoding_time; +} opj_tcd_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ + +/** +Dump the content of a tcd structure +*/ +void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img); +/** +Create a new TCD handle +@param cinfo Codec context info +@return Returns a new TCD handle if successful returns NULL otherwise +*/ +opj_tcd_t* tcd_create(opj_common_ptr cinfo); +/** +Destroy a previously created TCD handle +@param tcd TCD handle to destroy +*/ +void tcd_destroy(opj_tcd_t *tcd); +/** +Initialize the tile coder (allocate the memory) +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +@param curtileno Number that identifies the tile that will be encoded +*/ +void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); +/** +Free the memory allocated for encoding +@param tcd TCD handle +*/ +void tcd_free_encode(opj_tcd_t *tcd); +/** +Initialize the tile coder (reuses the memory allocated by tcd_malloc_encode) +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +@param curtileno Number that identifies the tile that will be encoded +*/ +void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int curtileno); +/** +Initialize the tile decoder +@param tcd TCD handle +@param image Raw image +@param cp Coding parameters +*/ +void tcd_malloc_decode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp); +void tcd_malloc_decode_tile(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int tileno, opj_codestream_info_t *cstr_info); +void tcd_makelayer_fixed(opj_tcd_t *tcd, int layno, int final); +void tcd_rateallocate_fixed(opj_tcd_t *tcd); +void tcd_makelayer(opj_tcd_t *tcd, int layno, double thresh, int final); +bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); +/** +Encode a tile from the raw image into a buffer +@param tcd TCD handle +@param tileno Number that identifies one of the tiles to be encoded +@param dest Destination buffer +@param len Length of destination buffer +@param cstr_info Codestream information structure +@return +*/ +int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, opj_codestream_info_t *cstr_info); +/** +Decode a tile from a buffer into a raw image +@param tcd TCD handle +@param src Source buffer +@param len Length of source buffer +@param tileno Number that identifies one of the tiles to be decoded +*/ +bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno, opj_codestream_info_t *cstr_info); +/** +Free the memory allocated for decoding +@param tcd TCD handle +*/ +void tcd_free_decode(opj_tcd_t *tcd); +void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno); + +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __TCD_H */ diff --git a/extern/libopenjpeg/tgt.c b/extern/libopenjpeg/tgt.c new file mode 100644 index 00000000000..a5dbcd3cef4 --- /dev/null +++ b/extern/libopenjpeg/tgt.c @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "opj_includes.h" + +/* +========================================================== + Tag-tree coder interface +========================================================== +*/ + +opj_tgt_tree_t *tgt_create(int numleafsh, int numleafsv) { + int nplh[32]; + int nplv[32]; + opj_tgt_node_t *node = NULL; + opj_tgt_node_t *parentnode = NULL; + opj_tgt_node_t *parentnode0 = NULL; + opj_tgt_tree_t *tree = NULL; + int i, j, k; + int numlvls; + int n; + + tree = (opj_tgt_tree_t *) opj_malloc(sizeof(opj_tgt_tree_t)); + if(!tree) return NULL; + tree->numleafsh = numleafsh; + tree->numleafsv = numleafsv; + + numlvls = 0; + nplh[0] = numleafsh; + nplv[0] = numleafsv; + tree->numnodes = 0; + do { + n = nplh[numlvls] * nplv[numlvls]; + nplh[numlvls + 1] = (nplh[numlvls] + 1) / 2; + nplv[numlvls + 1] = (nplv[numlvls] + 1) / 2; + tree->numnodes += n; + ++numlvls; + } while (n > 1); + + /* ADD */ + if (tree->numnodes == 0) { + opj_free(tree); + return NULL; + } + + tree->nodes = (opj_tgt_node_t*) opj_calloc(tree->numnodes, sizeof(opj_tgt_node_t)); + if(!tree->nodes) { + opj_free(tree); + return NULL; + } + + node = tree->nodes; + parentnode = &tree->nodes[tree->numleafsh * tree->numleafsv]; + parentnode0 = parentnode; + + for (i = 0; i < numlvls - 1; ++i) { + for (j = 0; j < nplv[i]; ++j) { + k = nplh[i]; + while (--k >= 0) { + node->parent = parentnode; + ++node; + if (--k >= 0) { + node->parent = parentnode; + ++node; + } + ++parentnode; + } + if ((j & 1) || j == nplv[i] - 1) { + parentnode0 = parentnode; + } else { + parentnode = parentnode0; + parentnode0 += nplh[i]; + } + } + } + node->parent = 0; + + tgt_reset(tree); + + return tree; +} + +void tgt_destroy(opj_tgt_tree_t *tree) { + opj_free(tree->nodes); + opj_free(tree); +} + +void tgt_reset(opj_tgt_tree_t *tree) { + int i; + + if (NULL == tree) + return; + + for (i = 0; i < tree->numnodes; i++) { + tree->nodes[i].value = 999; + tree->nodes[i].low = 0; + tree->nodes[i].known = 0; + } +} + +void tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int value) { + opj_tgt_node_t *node; + node = &tree->nodes[leafno]; + while (node && node->value > value) { + node->value = value; + node = node->parent; + } +} + +void tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold) { + opj_tgt_node_t *stk[31]; + opj_tgt_node_t **stkptr; + opj_tgt_node_t *node; + int low; + + stkptr = stk; + node = &tree->nodes[leafno]; + while (node->parent) { + *stkptr++ = node; + node = node->parent; + } + + low = 0; + for (;;) { + if (low > node->low) { + node->low = low; + } else { + low = node->low; + } + + while (low < threshold) { + if (low >= node->value) { + if (!node->known) { + bio_write(bio, 1, 1); + node->known = 1; + } + break; + } + bio_write(bio, 0, 1); + ++low; + } + + node->low = low; + if (stkptr == stk) + break; + node = *--stkptr; + } +} + +int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold) { + opj_tgt_node_t *stk[31]; + opj_tgt_node_t **stkptr; + opj_tgt_node_t *node; + int low; + + stkptr = stk; + node = &tree->nodes[leafno]; + while (node->parent) { + *stkptr++ = node; + node = node->parent; + } + + low = 0; + for (;;) { + if (low > node->low) { + node->low = low; + } else { + low = node->low; + } + while (low < threshold && low < node->value) { + if (bio_read(bio, 1)) { + node->value = low; + } else { + ++low; + } + } + node->low = low; + if (stkptr == stk) { + break; + } + node = *--stkptr; + } + + return (node->value < threshold) ? 1 : 0; +} diff --git a/extern/libopenjpeg/tgt.h b/extern/libopenjpeg/tgt.h new file mode 100644 index 00000000000..c08c8da0af4 --- /dev/null +++ b/extern/libopenjpeg/tgt.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2007, Professor Benoit Macq + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2005, Herve Drolon, FreeImage Team + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __TGT_H +#define __TGT_H +/** +@file tgt.h +@brief Implementation of a tag-tree coder (TGT) + +The functions in TGT.C have for goal to realize a tag-tree coder. The functions in TGT.C +are used by some function in T2.C. +*/ + +/** @defgroup TGT TGT - Implementation of a tag-tree coder */ +/*@{*/ + +/** +Tag node +*/ +typedef struct opj_tgt_node { + struct opj_tgt_node *parent; + int value; + int low; + int known; +} opj_tgt_node_t; + +/** +Tag tree +*/ +typedef struct opj_tgt_tree { + int numleafsh; + int numleafsv; + int numnodes; + opj_tgt_node_t *nodes; +} opj_tgt_tree_t; + +/** @name Exported functions */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Create a tag-tree +@param numleafsh Width of the array of leafs of the tree +@param numleafsv Height of the array of leafs of the tree +@return Returns a new tag-tree if successful, returns NULL otherwise +*/ +opj_tgt_tree_t *tgt_create(int numleafsh, int numleafsv); +/** +Destroy a tag-tree, liberating memory +@param tree Tag-tree to destroy +*/ +void tgt_destroy(opj_tgt_tree_t *tree); +/** +Reset a tag-tree (set all leaves to 0) +@param tree Tag-tree to reset +*/ +void tgt_reset(opj_tgt_tree_t *tree); +/** +Set the value of a leaf of a tag-tree +@param tree Tag-tree to modify +@param leafno Number that identifies the leaf to modify +@param value New value of the leaf +*/ +void tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int value); +/** +Encode the value of a leaf of the tag-tree up to a given threshold +@param bio Pointer to a BIO handle +@param tree Tag-tree to modify +@param leafno Number that identifies the leaf to encode +@param threshold Threshold to use when encoding value of the leaf +*/ +void tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold); +/** +Decode the value of a leaf of the tag-tree up to a given threshold +@param bio Pointer to a BIO handle +@param tree Tag-tree to decode +@param leafno Number that identifies the leaf to decode +@param threshold Threshold to use when decoding value of the leaf +@return Returns 1 if the node's value < threshold, returns 0 otherwise +*/ +int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold); +/* ----------------------------------------------------------------------- */ +/*@}*/ + +/*@}*/ + +#endif /* __TGT_H */ diff --git a/extern/libredcode/AUTHOR b/extern/libredcode/AUTHOR new file mode 100644 index 00000000000..b3d20a4eb7a --- /dev/null +++ b/extern/libredcode/AUTHOR @@ -0,0 +1 @@ +Peter Schlaile * peter at schlaile dot de diff --git a/extern/libredcode/LICENSE b/extern/libredcode/LICENSE new file mode 100644 index 00000000000..14db8fc79db --- /dev/null +++ b/extern/libredcode/LICENSE @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/extern/libredcode/NOTES b/extern/libredcode/NOTES new file mode 100644 index 00000000000..39101e0bd63 --- /dev/null +++ b/extern/libredcode/NOTES @@ -0,0 +1,23 @@ +This is a redcode decoder written solely by looking at some +R3D files that are floating around on the web. + +This decoder works with the files I tested, but I don't give +any guarantee (especially, if RED decides to change the +file format). + +That said: I found it a really nice idea of them, to make +such a clear and comprehensible file layout. + +Choosing JPEG2000 as an encoding format and the way, they +did YCbCr encoding of the sensor data is simply brilliant. + +My approach of decoding the sensor data is probably not +so brilliant, but seems to work rather nicely (and sharply!). + +If someone finds a better way and/or RED decides to release +specification, just go ahead and feel free to change it! + +Until that happens: simply enjoy opening RED footage within Blender! + +-- Peter Schlaile, June 2008 + diff --git a/extern/libredcode/SConscript b/extern/libredcode/SConscript new file mode 100644 index 00000000000..4e83ba5cbb4 --- /dev/null +++ b/extern/libredcode/SConscript @@ -0,0 +1,28 @@ +#!/usr/bin/python + +import sys +import os +import shutil + +Import('env') + +sources = env.Glob('*.c') +incs = '. ../libopenjpeg' + +root = "extern/libredcode" + +if not os.path.isdir(root + "/include"): + os.mkdir(root + "/include"); +if not os.path.isdir(root + "/include/redcode"): + os.mkdir(root + "/include/redcode"); + +for h in env.Glob('*.h'): + shutil.copyfile(root + "/" + h, + root + "/include/redcode/" + h) + + +env.BlenderLib ( libname='extern_redcode', + sources=sources, includes=Split(incs), + defines=[], + libtype=['core','intern','player'], + priority=[5, 5, 200], compileflags = []) diff --git a/extern/libredcode/codec.c b/extern/libredcode/codec.c new file mode 100644 index 00000000000..e0b79119e80 --- /dev/null +++ b/extern/libredcode/codec.c @@ -0,0 +1,141 @@ +#include "codec.h" +#include "format.h" +#include "debayer.h" + +#include +#include +#include +#include + +static void error_callback(const char *msg, void *client_data) { + FILE *stream = (FILE*)client_data; + fprintf(stream, "[R3D ERR] %s", msg); +} + +static void warning_callback(const char *msg, void *client_data) { + FILE *stream = (FILE*)client_data; + fprintf(stream, "[R3D WARN] %s", msg); +} + +static void info_callback(const char *msg, void *client_data) { + (void)client_data; + fprintf(stdout, "[R3D INFO] %s", msg); +} + +#define J2K_CFMT 0 +#define JP2_CFMT 1 +#define JPT_CFMT 2 + +struct redcode_frame_raw * redcode_decode_video_raw( + struct redcode_frame * frame, int scale) +{ + struct redcode_frame_raw * rv = NULL; + opj_dparameters_t parameters; /* decompression parameters */ + opj_event_mgr_t event_mgr; /* event manager */ + opj_image_t *image = NULL; + opj_dinfo_t* dinfo = NULL; /* handle to a decompressor */ + opj_cio_t *cio = NULL; + + memset(&event_mgr, 0, sizeof(opj_event_mgr_t)); + event_mgr.error_handler = error_callback; + event_mgr.warning_handler = warning_callback; + event_mgr.info_handler = info_callback; + + opj_set_default_decoder_parameters(¶meters); + + parameters.decod_format = JP2_CFMT; + + if (scale == 2) { + parameters.cp_reduce = 1; + } else if (scale == 4) { + parameters.cp_reduce = 2; + } else if (scale == 8) { + parameters.cp_reduce = 3; + } + + /* JPEG 2000 compressed image data */ + + /* get a decoder handle */ + dinfo = opj_create_decompress(CODEC_JP2); + + /* catch events using our callbacks and give a local context */ + opj_set_event_mgr((opj_common_ptr)dinfo, &event_mgr, stderr); + + /* setup the decoder decoding parameters using the current image + and user parameters */ + opj_setup_decoder(dinfo, ¶meters); + + /* open a byte stream */ + cio = opj_cio_open((opj_common_ptr)dinfo, + frame->data + frame->offset, frame->length); + + image = opj_decode(dinfo, cio); + + if(!image) { + fprintf(stderr, + "ERROR -> j2k_to_image: failed to decode image!\n"); + opj_destroy_decompress(dinfo); + opj_cio_close(cio); + return 0; + } + + /* close the byte stream */ + opj_cio_close(cio); + + /* free remaining structures */ + if(dinfo) { + opj_destroy_decompress(dinfo); + } + + if((image->numcomps * image->x1 * image->y1) == 0) { + opj_image_destroy(image); + return 0; + } + + rv = (struct redcode_frame_raw *) calloc( + 1, sizeof(struct redcode_frame_raw)); + + rv->data = image; + rv->width = image->comps[0].w; + rv->height = image->comps[0].h; + + return rv; +} + +int redcode_decode_video_float(struct redcode_frame_raw * frame, + float * out, int scale) +{ + int* planes[4]; + int i; + opj_image_t *image = (opj_image_t*) frame->data; + + if (image->numcomps != 4) { + fprintf(stderr, "R3D: need 4 planes, but got: %d\n", + image->numcomps); + return 0; + } + + for (i = 0; i < 4; i++) { + planes[i] = image->comps[i].data; + } + + if (scale == 1) { + redcode_ycbcr2rgb_fullscale( + planes, frame->width, frame->height, out); + } else if (scale == 2) { + redcode_ycbcr2rgb_halfscale( + planes, frame->width, frame->height, out); + } else if (scale == 4) { + redcode_ycbcr2rgb_quarterscale( + planes, frame->width, frame->height, out); + } + + opj_image_destroy(image); + + free(frame); + + return 1; +} + + + diff --git a/extern/libredcode/codec.h b/extern/libredcode/codec.h new file mode 100644 index 00000000000..928cab589ed --- /dev/null +++ b/extern/libredcode/codec.h @@ -0,0 +1,34 @@ +#ifndef __redcode_codec_h_included__ +#define __redcode_codec_h_included__ + +struct redcode_frame; + +struct redcode_frame_raw { + void * data; + int width; + int height; +}; + +/* do the JPEG2000 decompression into YCbCrY planes */ +struct redcode_frame_raw * redcode_decode_video_raw( + struct redcode_frame * frame, int scale); + +/* finally decode RAW frame into out-buffer (which has to be allocated + in advance) + + Keep in mind: frame_raw-width + height is half sized. + (one pixel contains 2x2 bayer-sensor data) + + output-buffer should have room for + + scale = 1 : width * height * 4 * 4 * sizeof(float) + scale = 2 : width * height * 4 * sizeof(float) + scale = 4 : width * height * sizeof(float) + +*/ + +int redcode_decode_video_float(struct redcode_frame_raw * frame, + float * out, int scale); + + +#endif diff --git a/extern/libredcode/debayer.c b/extern/libredcode/debayer.c new file mode 100644 index 00000000000..f7f22e1cc54 --- /dev/null +++ b/extern/libredcode/debayer.c @@ -0,0 +1,129 @@ +#include "debayer.h" + +/* pretty simple but astonishingly very effective "debayer" function + */ + +void redcode_ycbcr2rgb_fullscale( + int ** planes, int width, int height, float * out) +{ + int x,y; + int pix_max = 4096; + int mask = pix_max - 1; + float Kb = 0.0722; + float Kr = 0.2126; + float *o; + + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + int i = x + y*width; + int i_p = (y > 0) ? i-width : i; + int i_n = (y < (height-1)) ? i + width : i; + float y1n = planes[0][i_n] & mask; + float y1 = planes[0][i] & mask; + float cb = (planes[1][i] & mask) - pix_max/2; + float cr = (planes[2][i] & mask) - pix_max/2; + float y2 = (planes[3][i] & mask); + float y2p = (planes[3][i_p] & mask); + + float b_ = cb * (1.0 - Kb)/(pix_max/2); + float r_ = cr * (1.0 - Kr)/(pix_max/2); + float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + + float y_[4] = {y1 / pix_max, + (y2 + y2p)/2 / pix_max, + (y1 + y1n)/2 / pix_max, + y2 / pix_max}; + + int j; + int yc = 0; + + o = out + (2*height-1-2*y)*2*4*width + + x*2*4; + + for (j = 0; j < 8; j += 4) { + o[j+0] = r_ + y_[yc]; + o[j+1] = g_ + y_[yc]; + o[j+2] = b_ + y_[yc]; + o[j+3] = 1.0; + yc++; + } + + o = out + (2*height-1-2*y)*2*4*width + + x*2*4 - 2*4*width; + + for (j = 0; j < 8; j += 4) { + o[j+0] = r_ + y_[yc]; + o[j+1] = g_ + y_[yc]; + o[j+2] = b_ + y_[yc]; + o[j+3] = 1.0; + yc++; + } + } + } +} + +void redcode_ycbcr2rgb_halfscale( + int ** planes, int width, int height, float * out) +{ + int x,y; + int pix_max = 4096; + int mask = pix_max - 1; + float Kb = 0.0722; + float Kr = 0.2126; + + for (y = 0; y < height; y++) { + float *o = out + width * (height - y - 1); + for (x = 0; x < width; x++) { + int i = y*height + x; + float y1 = (planes[0][i] & mask); + float cb = (planes[1][i] & mask) - pix_max/2; + float cr = (planes[2][i] & mask) - pix_max/2; + float y2 = (planes[3][i] & mask); + + float b_ = cb * (1.0 - Kb)/(pix_max/2); + float r_ = cr * (1.0 - Kr)/(pix_max/2); + float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + + float y = (y1 + y2)/2 / pix_max; + + *o++ = r_ + y; + *o++ = g_ + y; + *o++ = b_ + y; + *o++ = 1.0; + } + } +} + + +void redcode_ycbcr2rgb_quarterscale( + int ** planes, int width, int height, float * out) +{ + int x,y; + int pix_max = 4096; + int mask = pix_max - 1; + float Kb = 0.0722; + float Kr = 0.2126; + + for (y = 0; y < height; y += 2) { + float *o = out + (width/2) * (height/2 - y/2 - 1); + for (x = 0; x < width; x += 2) { + int i = y * width + x; + float y1 = planes[0][i] & mask; + float cb = (planes[1][i] & mask) - pix_max/2; + float cr = (planes[2][i] & mask) - pix_max/2; + float y2 = planes[3][i] & mask; + + float b_ = cb * (1.0 - Kb)/(pix_max/2); + float r_ = cr * (1.0 - Kr)/(pix_max/2); + float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + + float y = (y1 + y2)/2 / pix_max; + + *o++ = r_ + y; + *o++ = g_ + y; + *o++ = b_ + y; + *o++ = 1.0; + } + } +} + diff --git a/extern/libredcode/debayer.h b/extern/libredcode/debayer.h new file mode 100644 index 00000000000..b58c7678671 --- /dev/null +++ b/extern/libredcode/debayer.h @@ -0,0 +1,11 @@ +#ifndef __redcode_debayer_h_included__ +#define __redcode_debayer_h_included__ 1 + +void redcode_ycbcr2rgb_fullscale( + int ** planes, int width, int height, float * out); +void redcode_ycbcr2rgb_halfscale( + int ** planes, int width, int height, float * out); +void redcode_ycbcr2rgb_quarterscale( + int ** planes, int width, int height, float * out); + +#endif diff --git a/extern/libredcode/format.c b/extern/libredcode/format.c new file mode 100644 index 00000000000..35410e9e269 --- /dev/null +++ b/extern/libredcode/format.c @@ -0,0 +1,213 @@ +#include +#include +#include +#include +#include "format.h" + +struct red_reob { + unsigned long len; + char head[4]; + + unsigned long rdvo; + unsigned long rdvs; + unsigned long rdao; + unsigned long rdas; + + unsigned long unknown1; + unsigned long unknown2; + unsigned long totlen; + + unsigned long avgv; + unsigned long avgs; + + unsigned long unknown3; + unsigned long unknown4; + unsigned long unknown5; +}; + +struct redcode_handle { + FILE * fp; + struct red_reob * reob; + unsigned long * rdvo; + unsigned long * rdvs; + unsigned long * rdao; + unsigned long * rdas; + long cfra; +}; + + +static unsigned char* read_packet(FILE * fp, char * expect) +{ + unsigned long len; + char head[5]; + unsigned char * rv; + + fread(&len, 4, 1, fp); + fread(&head, 4, 1, fp); + + head[4] = 0; + + len = ntohl(len); + + if (strcmp(expect, head) != 0) { + fprintf(stderr, "Read: %s, expect: %s\n", head, expect); + return NULL; + } + + rv = (unsigned char*) malloc(len + 8); + + memcpy(rv, &len, 4); + memcpy(rv + 4, &head, 4); + + fread(rv + 8, len, 1, fp); + + return rv; +} + +static unsigned long * read_index_packet(FILE * fp, char * expect) +{ + unsigned long * rv = (unsigned long*) read_packet(fp, expect); + int i; + + if (!rv) { + return NULL; + } + + for (i = 2; i < rv[0]/4; i++) { + rv[i] = ntohl(rv[i]); + } + return rv; +} + +static struct red_reob * read_reob(FILE * fp) +{ + fseek(fp, -0x38, SEEK_END); + + return (struct red_reob *) read_index_packet(fp, "REOB"); +} + +static unsigned long * read_index(FILE * fp, unsigned long i, char * expect) +{ + fseek(fp, i, SEEK_SET); + + return (unsigned long*) read_index_packet(fp, expect); +} + +static unsigned char * read_data(FILE * fp, unsigned long i, char * expect) +{ + fseek(fp, i, SEEK_SET); + + return read_packet(fp, expect); +} + +struct redcode_handle * redcode_open(const char * fname) +{ + struct redcode_handle * rv = NULL; + struct red_reob * reob = NULL; + + FILE * fp = fopen(fname, "rb"); + + if (!fp) { + return NULL; + } + + reob = read_reob(fp); + if (!reob) { + fclose(fp); + return NULL; + } + + rv = (struct redcode_handle*) calloc(1, sizeof(struct redcode_handle)); + + rv->fp = fp; + rv->reob = reob; + rv->rdvo = read_index(fp, reob->rdvo, "RDVO"); + rv->rdvs = read_index(fp, reob->rdvs, "RDVS"); + rv->rdao = read_index(fp, reob->rdao, "RDAO"); + rv->rdas = read_index(fp, reob->rdas, "RDAS"); + + if (!rv->rdvo || !rv->rdvs || !rv->rdao || !rv->rdas) { + redcode_close(rv); + return NULL; + } + + return rv; +} + +void redcode_close(struct redcode_handle * handle) +{ + if (handle->reob) { + free(handle->reob); + } + if (handle->rdvo) { + free(handle->rdvo); + } + if (handle->rdvs) { + free(handle->rdvs); + } + if (handle->rdao) { + free(handle->rdao); + } + if (handle->rdas) { + free(handle->rdas); + } + fclose(handle->fp); + free(handle); +} + +long redcode_get_length(struct redcode_handle * handle) +{ + return handle->rdvo[0]/4; +} + +struct redcode_frame * redcode_read_video_frame( + struct redcode_handle * handle, long frame) +{ + struct redcode_frame * rv; + unsigned char * data; + + if (frame > handle->rdvo[0]/4 || handle->rdvo[frame + 2] == 0) { + return NULL; + } + data = read_data(handle->fp, handle->rdvo[frame + 2], "REDV"); + if (!data) { + return NULL; + } + + rv = (struct redcode_frame*) calloc(1, sizeof(struct redcode_frame)); + + rv->offset = 12+8; + rv->length = *(unsigned long*)data - rv->offset; + rv->data = data; + + return rv; +} + +struct redcode_frame * redcode_read_audio_frame( + struct redcode_handle * handle, long frame) +{ + struct redcode_frame * rv; + unsigned char * data; + + if (frame > handle->rdao[0]/4 || handle->rdao[frame + 2] == 0) { + return NULL; + } + data = read_data(handle->fp, handle->rdao[frame+2], "REDA"); + if (!data) { + return NULL; + } + + rv = (struct redcode_frame*) calloc(1, sizeof(struct redcode_frame)); + + rv->offset = 24+8; + rv->length = *(unsigned long*)data - rv->offset; + rv->data = data; + + return rv; +} + +void redcode_free_frame(struct redcode_frame * frame) +{ + free(frame->data); + free(frame); +} diff --git a/extern/libredcode/format.h b/extern/libredcode/format.h new file mode 100644 index 00000000000..e09ea8a3b64 --- /dev/null +++ b/extern/libredcode/format.h @@ -0,0 +1,24 @@ +#ifndef __redcode_format_h_included__ +#define __redcode_format_h_included__ + +struct redcode_handle; +struct redcode_frame { + unsigned long length; + unsigned long offset; + unsigned char * data; +}; + +struct redcode_handle * redcode_open(const char * fname); +void redcode_close(struct redcode_handle * handle); + +long redcode_get_length(struct redcode_handle * handle); + +struct redcode_frame * redcode_read_video_frame( + struct redcode_handle * handle, long frame); +struct redcode_frame * redcode_read_audio_frame( + struct redcode_handle * handle, long frame); + +void redcode_free_frame(struct redcode_frame * frame); + + +#endif diff --git a/intern/bsp/SConscript b/intern/bsp/SConscript index e363fd1d4c3..88d2529ae59 100644 --- a/intern/bsp/SConscript +++ b/intern/bsp/SConscript @@ -8,5 +8,5 @@ incs = 'intern ../container ../moto/include ../memutil' if (env['OURPLATFORM'] == 'win32-mingw'): env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype=['common','intern'], priority=[26,26] ) else: - env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=15 ) + env.BlenderLib ('blender_BSP', sources, Split(incs), [], libtype='core', priority=26 ) diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index f9e46b20d9a..7349f481731 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -27,6 +27,14 @@ if env['WITH_BF_FFMPEG'] == 1: defs.append('WITH_FFMPEG') incs += ' ' + env['BF_FFMPEG_INC'] +if env['WITH_BF_OPENJPEG'] == 1: + defs.append('WITH_OPENJPEG') + incs += ' ' + env['BF_OPENJPEG_INC'] + +if env['WITH_BF_REDCODE'] == 1: + defs.append('WITH_REDCODE') + incs += ' ' + env['BF_REDCODE_INC'] + if env['WITH_BF_QUICKTIME']==1: incs += ' ' + env['BF_QUICKTIME_INC'] defs.append('WITH_QUICKTIME') diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 4948ff11b4a..71d35949833 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -81,6 +81,10 @@ #include #endif +#ifdef WITH_REDCODE +#include +#endif + #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -116,6 +120,7 @@ #define ANIM_AVI (1 << 6) #define ANIM_QTIME (1 << 7) #define ANIM_FFMPEG (1 << 8) +#define ANIM_REDCODE (1 << 9) #define ANIM5_MMAP 0 #define ANIM5_MALLOC 1 @@ -184,6 +189,9 @@ struct anim { int videoStream; #endif +#ifdef WITH_REDCODE + struct redcode_handle * redcodeCtx; +#endif }; #endif diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index d2743b680d8..f9c584fba39 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -96,6 +96,11 @@ #endif +#ifdef WITH_REDCODE +#include +#include +#endif + /****/ #ifdef __sgi @@ -830,6 +835,58 @@ static void free_anim_ffmpeg(struct anim * anim) { #endif +#ifdef WITH_REDCODE + +static int startredcode(struct anim * anim) { + anim->redcodeCtx = redcode_open(anim->name); + if (!anim->redcodeCtx) { + return -1; + } + anim->duration = redcode_get_length(anim->redcodeCtx); + + return 0; +} + +static ImBuf * redcode_fetchibuf(struct anim * anim, int position) { + struct ImBuf * ibuf; + struct redcode_frame * frame; + struct redcode_frame_raw * raw_frame; + + if (!anim->redcodeCtx) { + return NULL; + } + + frame = redcode_read_video_frame(anim->redcodeCtx, position); + + if (!frame) { + return NULL; + } + + raw_frame = redcode_decode_video_raw(frame, 1); + + redcode_free_frame(frame); + + if (!raw_frame) { + return NULL; + } + + ibuf = IMB_allocImBuf(raw_frame->width * 2, + raw_frame->height * 2, 32, IB_rectfloat, 0); + + redcode_decode_video_float(raw_frame, ibuf->rect_float, 1); + + return ibuf; +} + +static void free_anim_redcode(struct anim * anim) { + if (anim->redcodeCtx) { + redcode_close(anim->redcodeCtx); + anim->redcodeCtx = 0; + } + anim->duration = 0; +} + +#endif /* probeer volgende plaatje te lezen */ /* Geen plaatje, probeer dan volgende animatie te openen */ @@ -849,6 +906,10 @@ static struct ImBuf * anim_getnew(struct anim * anim) { #ifdef WITH_FFMPEG free_anim_ffmpeg(anim); #endif +#ifdef WITH_REDCODE + free_anim_redcode(anim); +#endif + if (anim->curtype != 0) return (0); anim->curtype = imb_get_anim_type(anim->name); @@ -888,8 +949,13 @@ static struct ImBuf * anim_getnew(struct anim * anim) { ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); break; #endif +#ifdef WITH_REDCODE + case ANIM_REDCODE: + if (startredcode(anim)) return (0); + ibuf = IMB_allocImBuf (8, 8, 32, 0, 0); + break; } - +#endif return(ibuf); } @@ -969,6 +1035,12 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) { ibuf = ffmpeg_fetchibuf(anim, position); if (ibuf) anim->curposition = position; break; +#endif +#ifdef WITH_REDCODE + case ANIM_REDCODE: + ibuf = redcode_fetchibuf(anim, position); + if (ibuf) anim->curposition = position; + break; #endif } diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 632a471ecd0..4f6730db1f1 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -321,6 +321,19 @@ static int isffmpeg (char *filename) { } #endif +#ifdef WITH_REDCODE +static int isredcode(char * filename) +{ + struct redcode_handle * h = redcode_open(filename); + if (!h) { + return 0; + } + redcode_close(h); + return 1; +} + +#endif + int imb_get_anim_type(char * name) { int type; struct stat st; @@ -354,6 +367,9 @@ int imb_get_anim_type(char * name) { # ifdef WITH_FFMPEG if (isffmpeg(name)) return (ANIM_FFMPEG); # endif +#endif +#ifdef WITH_REDCODE + if (isredcode(name)) return (ANIM_REDCODE); #endif type = IMB_ispic(name); if (type == ANIM) return (ANIM_ANIM5); @@ -369,6 +385,7 @@ int IMB_isanim(char *filename) { if( BLI_testextensie(filename, ".avi") || BLI_testextensie(filename, ".flc") || BLI_testextensie(filename, ".dv") + || BLI_testextensie(filename, ".r3d") || BLI_testextensie(filename, ".mov") || BLI_testextensie(filename, ".movie") || BLI_testextensie(filename, ".mv")) { @@ -379,6 +396,7 @@ int IMB_isanim(char *filename) { } else { // no quicktime if( BLI_testextensie(filename, ".avi") || BLI_testextensie(filename, ".dv") + || BLI_testextensie(filename, ".r3d") || BLI_testextensie(filename, ".mv")) { type = imb_get_anim_type(filename); } diff --git a/tools/btools.py b/tools/btools.py index 51367d6bd42..cd3d8cd83f6 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -192,6 +192,18 @@ def read_opts(cfg, args): ('BF_JPEG_LIB', 'JPEG library', ''), ('BF_JPEG_LIBPATH', 'JPEG library path', ''), + (BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', 'true')), + ('BF_OPENJPEG', 'OPENJPEG base path', ''), + ('BF_OPENJPEG_INC', 'OPENJPEG include path', ''), + ('BF_OPENJPEG_LIB', 'OPENJPEG library', ''), + ('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''), + + (BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', 'true')), + ('BF_REDCODE', 'REDCODE base path', ''), + ('BF_REDCODE_INC', 'REDCODE include path', ''), + ('BF_REDCODE_LIB', 'REDCODE library', ''), + ('BF_REDCODE_LIBPATH', 'REDCODE library path', ''), + (BoolOption('WITH_BF_PNG', 'Use PNG if true', 'true')), ('BF_PNG', 'PNG base path', ''), ('BF_PNG_INC', 'PNG include path', ''), From 6be7bb5e03a61600e3d231462eeb7391e299fc96 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Mon, 2 Jun 2008 21:39:45 +0000 Subject: [PATCH 178/430] == redcode == Disabled by default now on all platforms besides Linux. --- tools/btools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/btools.py b/tools/btools.py index cd3d8cd83f6..ad4cf71c3e8 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -192,13 +192,13 @@ def read_opts(cfg, args): ('BF_JPEG_LIB', 'JPEG library', ''), ('BF_JPEG_LIBPATH', 'JPEG library path', ''), - (BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', 'true')), + (BoolOption('WITH_BF_OPENJPEG', 'Use OPENJPEG if true', 'false')), ('BF_OPENJPEG', 'OPENJPEG base path', ''), ('BF_OPENJPEG_INC', 'OPENJPEG include path', ''), ('BF_OPENJPEG_LIB', 'OPENJPEG library', ''), ('BF_OPENJPEG_LIBPATH', 'OPENJPEG library path', ''), - (BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', 'true')), + (BoolOption('WITH_BF_REDCODE', 'Use REDCODE if true', 'false')), ('BF_REDCODE', 'REDCODE base path', ''), ('BF_REDCODE_INC', 'REDCODE include path', ''), ('BF_REDCODE_LIB', 'REDCODE library', ''), From cfd67321d2cf20b7504ec6a506364e313e114318 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Mon, 2 Jun 2008 22:02:26 +0000 Subject: [PATCH 179/430] == REDCODE == Forgot to free redcontext in IMB_free_anim... --- source/blender/imbuf/intern/anim.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index f9c584fba39..e14c433391a 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -312,6 +312,9 @@ void IMB_free_anim_ibuf(struct anim * anim) { #ifdef WITH_FFMPEG static void free_anim_ffmpeg(struct anim * anim); #endif +#ifdef WITH_REDCODE +static void free_anim_redcode(struct anim * anim); +#endif void IMB_free_anim(struct anim * anim) { if (anim == NULL) { @@ -330,6 +333,9 @@ void IMB_free_anim(struct anim * anim) { #ifdef WITH_FFMPEG free_anim_ffmpeg(anim); #endif +#ifdef WITH_REDCODE + free_anim_redcode(anim); +#endif free(anim); } From 510d4b22ec63e5b70c3647cf84aec387dc328a65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 3 Jun 2008 01:01:47 +0000 Subject: [PATCH 180/430] increase the level you can zoom out (andy's timelapse videos were a pain to edit) --- source/blender/src/space.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 47e3387755b..8cc7e6975b4 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -5121,7 +5121,7 @@ static void init_seqspace(ScrArea *sa) sseq->v2d.min[0]= 10.0; sseq->v2d.min[1]= 4.0; - sseq->v2d.max[0]= 32000.0; + sseq->v2d.max[0]= MAXFRAMEF; sseq->v2d.max[1]= MAXSEQ; sseq->v2d.minzoom= 0.1f; From 6eeef64370a2dfb752c220f9434407a68251e54f Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Tue, 3 Jun 2008 06:42:13 +0000 Subject: [PATCH 181/430] == REDCODE == got #endif position wrong, breaking compile without redcode, sorry. (Thanks to jms for pointing that out) --- source/blender/imbuf/intern/anim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index e14c433391a..87d67f5263b 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -960,8 +960,8 @@ static struct ImBuf * anim_getnew(struct anim * anim) { if (startredcode(anim)) return (0); ibuf = IMB_allocImBuf (8, 8, 32, 0, 0); break; - } #endif + } return(ibuf); } From 29f839b4a58ace4c4a42e361341e3768c019f9de Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 3 Jun 2008 10:00:09 +0000 Subject: [PATCH 182/430] Bugfix #13603: Action Editor Copy/Paste didn't trigger a depsgraph update for the active object (if the action was applied to it). --- source/blender/src/editaction.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 12b9cb8919f..40b6b7ba6fe 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -1485,7 +1485,7 @@ void insertkey_action(void) data= get_action_context(&datatype); if (data == NULL) return; cfra = frame_to_float(CFRA); - + if (datatype == ACTCONT_ACTION) { ListBase act_data = {NULL, NULL}; bActListElem *ale; @@ -1941,6 +1941,7 @@ void paste_actdata () int filter; void *data; short datatype; + Object *ob= OBACT; short no_name= 0; float offset = CFRA - actcopy_firstframe; @@ -2017,7 +2018,7 @@ void paste_actdata () /* loop over curves, pasting keyframes */ for (ico= ipo_src->curve.first; ico; ico= ico->next) { - icu= verify_ipocurve((ID*)OBACT, ico->blocktype, actname, conname, "", ico->adrcode); + icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, "", ico->adrcode); if (icu) { /* just start pasting, with the the first keyframe on the current frame, and so on */ @@ -2045,6 +2046,14 @@ void paste_actdata () /* free temp memory */ BLI_freelistN(&act_data); + /* do depsgraph updates (for 3d-view)? */ + if ((ob) && (G.saction->pin==0)) { + if (ob->type == OB_ARMATURE) + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB|OB_RECALC_DATA); + else + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + } + /* undo and redraw stuff */ allqueue(REDRAWVIEW3D, 0); allspace(REMAKEIPO, 0); From 62ca0e07dad7d79c79eda2c3eeef0afd7e939896 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 3 Jun 2008 10:04:42 +0000 Subject: [PATCH 183/430] A few compiler warning fixes. Those in BME_customdata.c were more serious. --- source/blender/blenkernel/intern/BME_Customdata.c | 3 ++- source/blender/src/editmesh_tools.c | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c index 68bc75327d9..8b48efbdbd2 100644 --- a/source/blender/blenkernel/intern/BME_Customdata.c +++ b/source/blender/blenkernel/intern/BME_Customdata.c @@ -39,6 +39,7 @@ #include "BKE_bmeshCustomData.h" #include "bmesh_private.h" #include +#include "MEM_guardedalloc.h" /********************* Layer type information **********************/ typedef struct BME_LayerTypeInfo { @@ -88,7 +89,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc if(init->layout[i]){ info = BME_layerType_getInfo(i); for(j=0; j < init->layout[i]; j++){ - if(j=0) data->layers[j+i].active = init->active[i]; + if(j==0) data->layers[j+i].active = init->active[i]; data->layers[j+i].type = i; data->layers[j+i].offset = offset; strcpy(data->layers[j+i].name, &(init->nametemplate[j+i])); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index f85161c3e23..f9bb14a08c6 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -4480,11 +4480,6 @@ static void bevel_mesh_recurs(float bsize, short recurs, int allfaces) } void bevel_menu() { - int vlayers[BME_CD_NUMTYPES] = {0,0,0,0}; - int elayers[BME_CD_NUMTYPES] = {0,0,0,0}; - int llayers[BME_CD_NUMTYPES] = {0,0,0,0}; - int players[BME_CD_NUMTYPES] = {0,0,0,0}; - BME_Mesh *bm; BME_TransData_Head *td; TransInfo *t; From 0c0c43f62001eb652b8a8c374cca390824ef2c5e Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Tue, 3 Jun 2008 19:06:54 +0000 Subject: [PATCH 184/430] Collision commit code cleanup for nicer compile --- source/blender/blenkernel/BKE_collision.h | 7 ++ source/blender/blenkernel/intern/collision.c | 97 ++------------------ source/blender/blenkernel/intern/modifier.c | 1 + 3 files changed, 14 insertions(+), 91 deletions(-) diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index b38bf8662d7..2966d932a49 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -116,6 +116,13 @@ FaceCollPair; // forward declarations ///////////////////////////////////////////////// +///////////////////////////////////////////////// +// used in modifier.c from collision.c +///////////////////////////////////////////////// +BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon ); +void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int numverts, int moving ); +///////////////////////////////////////////////// + LinkNode *BLI_linklist_append_fast ( LinkNode **listp, void *ptr ); // move Collision modifier object inter-frame with step = [0,1] diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 36cc37eab44..fc9a8132aaf 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -51,34 +51,6 @@ #include "BLI_kdopbvh.h" #include "BKE_collision.h" -#ifdef _WIN32 -static void start ( void ) -{} -static void end ( void ) -{ -} -static double val() -{ - return 0; -} -#else -#include -static void mystart ( struct timeval *start, struct timezone *z ) -{ - gettimeofday ( start, z ); -} -static void myend ( struct timeval *end, struct timezone *z ) -{ - gettimeofday ( end,z ); -} -static double myval ( struct timeval *start, struct timeval *end ) -{ - double t1, t2; - t1 = ( double ) start->tv_sec + ( double ) start->tv_usec/ ( 1000*1000 ); - t2 = ( double ) end->tv_sec + ( double ) end->tv_usec/ ( 1000*1000 ); - return t2-t1; -} -#endif /*********************************** Collision modifier code start @@ -758,7 +730,6 @@ int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierD float w1, w2, w3, u1, u2, u3; float v1[3], v2[3], relativeVelocity[3]; float magrelVel; - float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); cloth1 = clmd->clothObject; @@ -797,7 +768,7 @@ int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierD if ( magrelVel > ALMOST_ZERO ) { // Calculate Impulse magnitude to stop all motion in normal direction. - float magtangent = 0, repulse = 0, d = 0; + float magtangent = 0; double impulse = 0.0; float vrel_t_pre[3]; float temp[3]; @@ -1096,13 +1067,13 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat EdgeCollPair edgecollpair; Cloth *cloth1=NULL; ClothVertex *verts1=NULL; - unsigned int i = 0, j = 0, k = 0; + unsigned int i = 0, k = 0; int numsolutions = 0; double x1[3], v1[3], x2[3], v2[3], x3[3], v3[3]; double solution[3], solution2[3]; MVert *verts2 = collmd->current_x; // old x MVert *velocity2 = collmd->current_v; // velocity - float distance; + float distance = 0; float triA[3][3], triB[3][3]; int result = 0; @@ -1226,7 +1197,6 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat float distance; float impulse = 0; float I_mag; - float m1, m2; // move verts VECADDS(triA[0], verts1[edgecollpair.p11].txold, verts1[edgecollpair.p11].tv, solution[k]); @@ -1302,51 +1272,9 @@ int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierDat return result; } -int cloth_collision_moving_tris ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) -{ - EdgeCollPair edgecollpair; - Cloth *cloth1=NULL; - ClothVertex *verts1=NULL; - unsigned int i = 0, j = 0, k = 0; - int numsolutions = 0; - double x1[3], v1[3], x2[3], v2[3], x3[3], v3[3]; - double solution[3]; - MVert *verts2 = collmd->current_x; // old x - MVert *velocity2 = collmd->current_v; // velocity - float mintime = FLT_MAX; - float distance; - float triA[3][3], triB[3][3]; - int result = 0; - - cloth1 = clmd->clothObject; - verts1 = cloth1->verts; - - for(i = 0; i < 9; i++) - { - // 9 edge - edge possibilities - - if(i == 0) - { - edgecollpair.p11 = collpair->ap1; - edgecollpair.p12 = collpair->ap2; - - edgecollpair.p21 = collpair->bp1; - edgecollpair.p22 = collpair->bp2; - } - } - - return result; -} - int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { - int result = 0; Cloth *cloth1; - float w1, w2, w3, u1, u2, u3; - float v1[3], v2[3], relativeVelocity[3]; - float magrelVel; - float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree ); - cloth1 = clmd->clothObject; for ( ; collpair != collision_end; collpair++ ) @@ -1471,11 +1399,11 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) Object *coll_ob=NULL; BVHTree *cloth_bvh=NULL; long i=0, j = 0, k = 0, numfaces = 0, numverts = 0; - unsigned int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; + int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; int ret = 0, ret2 = 0; ClothModifierData *tclmd; - int collisions = 0, count = 0; + int collisions = 0; if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) || ! ( ( ( Cloth * ) clmd->clothObject )->bvhtree ) ) { @@ -1570,8 +1498,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) { - - MFace *mface = cloth->mfaces; + // TODO: add coll quality rounds again BVHTreeOverlap *overlap = NULL; collisions = 1; @@ -1676,15 +1603,3 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) return MIN2 ( ret, 1 ); } - - -/* -if ( verts[i].impulse_count ) -{ - VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); - VECCOPY ( verts[i].impulse, tnull ); - verts[i].impulse_count = 0; - - ret++; -} -*/ \ No newline at end of file diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 18912e32e3c..bd8a2ea219a 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -77,6 +77,7 @@ #include "BKE_anim.h" #include "BKE_bad_level_calls.h" #include "BKE_cloth.h" +#include "BKE_collision.h" #include "BKE_curve.h" #include "BKE_customdata.h" #include "BKE_global.h" From 772d241582a8d396425cd7f53438871858669a99 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 3 Jun 2008 22:54:24 +0000 Subject: [PATCH 185/430] Fix BGE bug #13605: GameEngine corrupts Pose data --- source/gameengine/Converter/BL_ArmatureObject.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index ff9c6a75aa9..08567dde840 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -153,9 +153,12 @@ void BL_ArmatureObject::GetPose(bPose **pose) int copy_constraint_channels_hack = 1; copy_pose(pose, m_pose, copy_constraint_channels_hack); } - else + else { + if (*pose == m_pose) + // no need to copy if the pointers are the same + return; extract_pose_from_pose(*pose, m_pose); - + } } void BL_ArmatureObject::GetMRDPose(bPose **pose) @@ -169,7 +172,11 @@ void BL_ArmatureObject::GetMRDPose(bPose **pose) //} if (!*pose) - copy_pose(pose, m_objArma->pose, 0); + // must duplicate the constraints too otherwise we have corruption in free_pose_channels() + // because it will free the blender constraints. + // Ideally, blender should rememeber that the constraints were not copied so that + // free_pose_channels() would not free them. + copy_pose(pose, m_objArma->pose, 1); else extract_pose_from_pose(*pose, m_objArma->pose); From d565e8a02f94e61fbebcfbcdcef1f547b4e6b65b Mon Sep 17 00:00:00 2001 From: Hamed Zaghaghi Date: Wed, 4 Jun 2008 02:54:42 +0000 Subject: [PATCH 186/430] bugfix #13618 - 2d filters + GLSL python scripts --- source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 9454edfacfe..e8562c54539 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -166,6 +166,9 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) GLint uniformLoc; bgl::blUseProgramObjectARB(shaderprogram); uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texname); + if (uniformLoc != -1) { bgl::blUniform1iARB(uniformLoc, 0); From e26323bcdd89f992ab772cb8860502e2bfe2e681 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 4 Jun 2008 16:19:15 +0000 Subject: [PATCH 187/430] Python API object.parentVertexIndex - access vertex parent indicies --- source/blender/python/api2_2x/Object.c | 92 +++++++++++++++++++++ source/blender/python/api2_2x/doc/Object.py | 2 + 2 files changed, 94 insertions(+) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 1a806932bdb..3db9664d47d 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -360,6 +360,8 @@ static PyObject *Object_getMatrix( BPy_Object * self, PyObject * args ); static PyObject *Object_getParent( BPy_Object * self ); static PyObject *Object_getParentBoneName( BPy_Object * self ); static int Object_setParentBoneName( BPy_Object * self, PyObject * value ); +static PyObject *Object_getParentVertexIndex( BPy_Object * self ); +static int Object_setParentVertexIndex( BPy_Object * self, PyObject * value ); static PyObject *Object_getSize( BPy_Object * self, PyObject * args ); static PyObject *Object_getTimeOffset( BPy_Object * self ); static PyObject *Object_getTracked( BPy_Object * self ); @@ -1491,6 +1493,92 @@ static int Object_setParentBoneName( BPy_Object * self, PyObject *value ) return 0; } +static PyObject *Object_getParentVertexIndex( BPy_Object * self ) +{ + PyObject *pyls = NULL; + + if( self->object->parent) { + if (self->object->partype==PARVERT1) { + pyls = PyList_New(1); + PyList_SET_ITEM( pyls, 0, PyInt_FromLong( self->object->par1 )); + return pyls; + } else if (self->object->partype==PARVERT3) { + pyls = PyList_New(3); + PyList_SET_ITEM( pyls, 0, PyInt_FromLong( self->object->par1 )); + PyList_SET_ITEM( pyls, 1, PyInt_FromLong( self->object->par2 )); + PyList_SET_ITEM( pyls, 2, PyInt_FromLong( self->object->par3 )); + return pyls; + } + } + return PyList_New(0); +} + +static int Object_setParentVertexIndex( BPy_Object * self, PyObject *value ) +{ + PyObject *item; + int val[3] = {0,0,0}; + if( !self->object->parent) { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "This object has no vertex parent, cant set the vertex parent indicies" ); + } + if (self->object->partype==PARVERT1) { + if (PySequence_Length(value) != 1) + return EXPP_ReturnIntError( PyExc_RuntimeError, + "Vertex parented to 1 vertex, can only assign a sequence with 1 vertex parent index" ); + item = PySequence_GetItem(value, 0); + if (item) { + val[0] = PyInt_AsLong(item); + Py_DECREF(item); + } + } else if (self->object->partype==PARVERT3) { + int i; + if (PySequence_Length(value) != 3) + return EXPP_ReturnIntError( PyExc_RuntimeError, + "Vertex parented to 3 verts, can only assign a sequence with 3 verts parent index" ); + + for (i=0; i<3; i++) { + item = PySequence_GetItem(value, i); + if (item) { + val[i] = PyInt_AsLong(item); + Py_DECREF(item); + } + } + } else { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "This object has no vertex parent, cant set the vertex parent indicies" ); + } + + if (PyErr_Occurred()) { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "This object has no vertex parent, cant set the vertex parent indicies" ); + } else { + if (self->object->partype==PARVERT1) { + if (val[0] < 0) { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "vertex index less then zero" ); + } + + self->object->par1 = val[0]; + } else if (self->object->partype==PARVERT3) { + if (val[0]==val[1] || val[0]==val[2] || val[1]==val[2]) { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "duplicate indicies in vertex parent assignment" ); + } + if (val[0] < 0 || val[1] < 0 || val[2] < 0) { + return EXPP_ReturnIntError( PyExc_RuntimeError, + "vertex index less then zero" ); + } + + self->object->par1 = val[0]; + self->object->par2 = val[1]; + self->object->par3 = val[2]; + } + } + + return 0; +} + + static PyObject *Object_getSize( BPy_Object * self, PyObject * args ) { char *space = "localspace"; /* default to local */ @@ -4916,6 +5004,10 @@ static PyGetSetDef BPy_Object_getseters[] = { (getter)Object_getParentBoneName, (setter)Object_setParentBoneName, "The object's parent object's sub name", NULL}, + {"parentVertexIndex", + (getter)Object_getParentVertexIndex, (setter)Object_setParentVertexIndex, + "Indicies used for vertex parents", + NULL}, {"track", (getter)Object_getTracked, (setter)Object_setTracked, "The object's tracked object", diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py index 09167c0e117..2e4850aeb14 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -389,6 +389,8 @@ class Object: @ivar parentbonename: The string name of the parent bone (if defined). This can be set to another bone in the armature if the object already has a bone parent. @type parentbonename: string or None + @ivar parentVertexIndex: A list of vertex parent indicies, with a length of 0, 1 or 3. When there are 1 or 3 vertex parents, the indicies can be assigned to a sequence of the same length. + @type parentVertexIndex: list @ivar protectFlags: The "transform locking" bitfield flags for the object. See L{ProtectFlags} const dict for values. @type protectFlags: int From 61193cf2302fde403d39085d67e300ec2e9ad0f0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 4 Jun 2008 16:38:55 +0000 Subject: [PATCH 188/430] svn merge -r15118:15119 https://svn.blender.org/svnroot/bf-blender/branches/soc-2008-quorn --- source/blender/blenkernel/intern/text.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 872f81ead63..876547042dc 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2075,13 +2075,13 @@ void txt_backspace_char (Text *text) return; } else if (text->curc==0) { /* Appending two lines */ - if (text->curl->prev) { - text->curl= text->curl->prev; - text->curc= text->curl->len; - - txt_combine_lines(text, text->curl, text->curl->next); - txt_pop_sel(text); - } + if (!text->curl->prev) return; + + text->curl= text->curl->prev; + text->curc= text->curl->len; + + txt_combine_lines(text, text->curl, text->curl->next); + txt_pop_sel(text); } else { /* Just backspacing a char */ int i= text->curc-1; From fbb56ee99731bb788e89ce7c54706654a998e7ea Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Wed, 4 Jun 2008 18:11:48 +0000 Subject: [PATCH 189/430] Issue jms was having with # else on msvc. Seems odd but easy to fix. Kent --- .../Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h index a18ed038f35..3e24ee204a1 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h @@ -53,9 +53,9 @@ #elif defined(__APPLE__) # include "mac_compat_glext.h" # include -# else +#else # include -# endif +#endif #endif #ifdef __sgi From c8e19a6b25f4b32ef64ba23479d80febc7c95db9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 4 Jun 2008 22:32:15 +0000 Subject: [PATCH 190/430] numbutton python expression evaluation used driver dictionary, when EnableScriptlinks was disabled number button input didnt work. narrow down this test to the part of the pydriver module init that uses a blender textblock as a module. This should should reload the pydriver dict whenever the "EnableScriptlinks" state changes. but for now working numbuttons is priority. --- source/blender/python/BPY_interface.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index c63fa28c46e..7c23c86d9ba 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -1222,7 +1222,7 @@ static int bpy_pydriver_create_dict(void) { PyObject *d, *mod; - if (bpy_pydriver_Dict || (G.f&G_DOSCRIPTLINKS)==0) return -1; + if (bpy_pydriver_Dict) return -1; d = PyDict_New(); if (!d) return -1; @@ -1259,15 +1259,16 @@ static int bpy_pydriver_create_dict(void) /* If there's a Blender text called pydrivers.py, import it. * Users can add their own functions to this module. */ - mod = importText("pydrivers"); /* can also use PyImport_Import() */ - if (mod) { - PyDict_SetItemString(d, "pydrivers", mod); - PyDict_SetItemString(d, "p", mod); - Py_DECREF(mod); + if (G.f&G_DOSCRIPTLINKS) { + mod = importText("pydrivers"); /* can also use PyImport_Import() */ + if (mod) { + PyDict_SetItemString(d, "pydrivers", mod); + PyDict_SetItemString(d, "p", mod); + Py_DECREF(mod); + } else { + PyErr_Clear(); + } } - else - PyErr_Clear(); - /* short aliases for some Get() functions: */ /* ob(obname) == Blender.Object.Get(obname) */ From ded6a1c2e7aaadcd982b22fdfeeedc436000182f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jun 2008 10:43:53 +0000 Subject: [PATCH 191/430] bugfix introduced in own commit 15055 - [#13621] Cloth cache files are in same directory as .blend --- source/blender/blenkernel/intern/pointcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 7b727528b3d..57ecffbb796 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -185,8 +185,8 @@ static int ptcache_path(PTCacheID *pid, char *filename) file[i-6] = '\0'; sprintf(filename, "//"PTCACHE_PATH"%s", file); /* add blend file name to pointcache dir */ - BLI_add_slash(filename); BLI_convertstringcode(filename, blendfilename); + BLI_add_slash(filename); return strlen(filename); } From 3d51c59034be1c3410ab5d2224cb0ef3b35f0ea1 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 5 Jun 2008 10:52:52 +0000 Subject: [PATCH 192/430] Bugfix for exploding cloth collisions --- source/blender/blenkernel/intern/collision.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index fc9a8132aaf..1809617fb3c 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -683,7 +683,8 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap collpair->distance = distance; collpair->flag = 0; - } + collpair++; + }/* else { float w1, w2, w3, u1, u2, u3; @@ -716,9 +717,9 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap { // check for collision in the future collpair->flag |= COLLISION_IN_FUTURE; + collpair++; } - } - collpair++; + }*/ } return collpair; } From fcdbd766257f09c04470f8d24ff5f9576a76f531 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 5 Jun 2008 11:08:51 +0000 Subject: [PATCH 193/430] Collisions: enabling self collision quality setting again (request by Nudel) --- source/blender/blenkernel/intern/collision.c | 143 ++++++++++--------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 1809617fb3c..7f41ca033d3 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1399,7 +1399,7 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) Cloth *cloth=NULL; Object *coll_ob=NULL; BVHTree *cloth_bvh=NULL; - long i=0, j = 0, k = 0, numfaces = 0, numverts = 0; + long i=0, j = 0, k = 0, l = 0, numfaces = 0, numverts = 0; int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; int ret = 0, ret2 = 0; @@ -1499,88 +1499,91 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) //////////////////////////////////////////////////////////// if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) { - // TODO: add coll quality rounds again - BVHTreeOverlap *overlap = NULL; - - collisions = 1; - verts = cloth->verts; // needed for openMP - - numfaces = clmd->clothObject->numfaces; - numverts = clmd->clothObject->numverts; - - verts = cloth->verts; - - if ( cloth->bvhselftree ) + for(l = 0; l < clmd->coll_parms->self_loop_count; l++) { - // search for overlapping collision pairs - overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); - -// #pragma omp parallel for private(k, i, j) schedule(static) - for ( k = 0; k < result; k++ ) + // TODO: add coll quality rounds again + BVHTreeOverlap *overlap = NULL; + + collisions = 1; + verts = cloth->verts; // needed for openMP + + numfaces = clmd->clothObject->numfaces; + numverts = clmd->clothObject->numverts; + + verts = cloth->verts; + + if ( cloth->bvhselftree ) { - float temp[3]; - float length = 0; - float mindistance; - - i = overlap[k].indexA; - j = overlap[k].indexB; - - mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + // search for overlapping collision pairs + overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); + + // #pragma omp parallel for private(k, i, j) schedule(static) + for ( k = 0; k < result; k++ ) { - if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + float temp[3]; + float length = 0; + float mindistance; + + i = overlap[k].indexA; + j = overlap[k].indexB; + + mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); + + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + { + continue; + } + } + + VECSUB ( temp, verts[i].tx, verts[j].tx ); + + if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; + + // check for adjacent points (i must be smaller j) + if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) { continue; } - } - - VECSUB ( temp, verts[i].tx, verts[j].tx ); - - if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; - - // check for adjacent points (i must be smaller j) - if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) - { - continue; - } - - length = Normalize ( temp ); - - if ( length < mindistance ) - { - float correction = mindistance - length; - - if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + + length = Normalize ( temp ); + + if ( length < mindistance ) { - VecMulf ( temp, -correction ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - } - else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, correction ); - VECADD ( verts[i].tx, verts[i].tx, temp ); + float correction = mindistance - length; + + if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, -correction ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + } + else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, correction ); + VECADD ( verts[i].tx, verts[i].tx, temp ); + } + else + { + VecMulf ( temp, -correction*0.5 ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + + VECSUB ( verts[i].tx, verts[i].tx, temp ); + } + ret = 1; + ret2 += ret; } else { - VecMulf ( temp, -correction*0.5 ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - - VECSUB ( verts[i].tx, verts[i].tx, temp ); + // check for approximated time collisions } - ret = 1; - ret2 += ret; - } - else - { - // check for approximated time collisions } + + if ( overlap ) + MEM_freeN ( overlap ); + } - - if ( overlap ) - MEM_freeN ( overlap ); - } //////////////////////////////////////////////////////////// From cc0d7309234e0c5444a101ce414e322f917628dc Mon Sep 17 00:00:00 2001 From: Remigiusz Fiedler Date: Thu, 5 Jun 2008 12:31:16 +0000 Subject: [PATCH 194/430] import_dxf.py script update: ver. 1.0.12b3-2008.06.05 bugfix: ob.name conflict with existing meshes (different ob.name/mesh.name) refactor/support for LWPOLYLINEs --- release/scripts/import_dxf.py | 1031 +++++++++++++++++++-------------- 1 file changed, 602 insertions(+), 429 deletions(-) diff --git a/release/scripts/import_dxf.py b/release/scripts/import_dxf.py index 88b42e3e564..ce7df610d98 100644 --- a/release/scripts/import_dxf.py +++ b/release/scripts/import_dxf.py @@ -1,5 +1,5 @@ #!BPY -# coding: utf-8 + """ Name: 'Autodesk DXF (.dxf)' Blender: 244 @@ -7,14 +7,15 @@ Group: 'Import' Tooltip: 'Import for DXF geometry data (Drawing eXchange Format).' """ __author__ = 'Kitsu(Ed Blake) & migius(Remigiusz Fiedler)' -__version__ = '1.0.12 - 2008.02.08 by migius' +__version__ = '1.0.12 - 2008.06.05 by migius' __url__ = ["http://blenderartists.org/forum/showthread.php?t=84319", "http://wiki.blender.org/index.php/Scripts/Manual/Import/DXF-3D"] __email__ = ["Kitsune_e(at)yahoo.com", "migius(at)4d-vectors.de"] __bpydoc__ = """\ This script imports objects from DXF (2d/3d) into Blender. -This script imports 2d and 3d geometery from DXFr12 format files. +This script imports 2d and 3d geometery from DXF files. +Supported DXF format versions: from (r2.5) r12 up to 2008. Enhanced features are: - configurable object filtering and geometry manipulation, - configurable material pre-processing, @@ -40,22 +41,23 @@ XREF (External Reference). Supported DXF>r12 objects: ELLIPSE, -(wip v1.0.12 partly supported) LWPOLYLINE (LightWeight), -(wip v1.0.12) MLINE, -(wip v1.0.12) MTEXT +LWPOLYLINE (LightWeight Polylines), +(wip v1.0.12) SPLINE, +(wip v1.0.13) MLINE, +(wip v1.0.13) MTEXT -Unsupported Objects: +Unsupported objects: DXF r12: DIMENSION. -DXF>r12: SPLINE, GROUP, RAY/XLINE, LEADER, 3DSOLID, BODY, REGION, dynamic BLOCK +DXF>r12: GROUP, RAY/XLINE, LEADER, 3DSOLID, BODY, REGION, dynamic BLOCK -Supported Geometry: 2d and 3d DXF-objects. -Curves imported as curves or meshes optionally. +Supported geometry: 2d and 3d DXF-objects. +Curves imported as Blender curves or meshes optionally. Supported layout modes: "model space" is default, "paper space" as option (= "layout views") -Scene definitions produced with AVE_RENDER: +Supported scene definition objescts produced with AVE_RENDER: scene: selection of lights assigned to the camera, lights: DIRECT, OVERHEAD, SH_SPOT, (wip v1.0.13 import of AVE_RENDER material definitions) @@ -77,14 +79,10 @@ It is recommended to use DXF-object properties for assign Blender materials. Notes: - Recommend that you run 'RemoveDoubles' on each imported mesh after using this script - Blocks are created on layer 19 then referenced at each insert point. -- Big DXF-files (over 1500 objects) decrease import performance. +- support for DXF-files up to 160MB on systems with 1GB RAM +- DXF-files with over 1500 objects decrease import performance. The problem is not the inefficiency of python-scripting but Blenders performance -in creating new objects in his database - probably a database management problem. - -TODO: -- the new style object visibility -- support for real 3d-solids (ACIS) -- (to see more, search for "--todo--" in script code) +in creating new objects in scene database - probably a database management problem. """ @@ -92,6 +90,7 @@ TODO: History: v1.0 - 2008.01. by migius planned tasks: + -- (to see more, search for "--todo--" in script code) -- command-line-mode/batch-mode -- in-place-editing for dupliGroups -- support for MLINE (is exported to r12 as BLOCK*Unnamed with LINEs) @@ -102,17 +101,23 @@ History: -- added f_layerFilter -- to-check: obj/mat/group/_mapping-idea from ideasman42: -- curves: added "fill/non-fill" option for closed curves: CIRCLEs,ELLIPSEs,POLYLINEs - -- bug:? object = Object.Get(obname) -> = SCENE.getChildren(obname) -- "normalize Z" option to correct non-planar figures -- LINEs need "width" in 3d-space incl vGroups -- support width_force for LINEs/ELLIPSEs = "solidify" -- add better support for color_index BYLAYER=256, BYBLOCK=0 - -- bug: "oneMesh" produces sometimes errors + -- bug: "oneMesh" produces irregularly errors -- bug: Registry recall from hd_cache ?? only win32 bug?? - - v1.0.12: 2008.02.08 by migius -- support DXF-definitions of scene, lights and cameras -- support ortho mode for VIEWs and VPORTs as cameras + -- add support for SPLINEs + + v1.0.12: 2008.06.05 by migius + b3 bugfix: ob.name conflict with existing meshes (different ob.name/mesh.name) + v1.0.12: 2008.05.24 by migius + b2 added support for LWPOLYLINEs + b2 added support for ProE in readerDXF.py + v1.0.12: 2008.02.08 by migius + b1 update: object = Object.Get(obname) -> f_getSceChild().getChildren() a9 bugfix by non-existing tables views, vports, layers (Kai reported) v1.0.12: 2008.01.17 by migius a8 lately used INI-dir/filename persistently stored in Registry @@ -279,9 +284,9 @@ History: # -------------------------------------------------------------------------- import Blender -#import bpy from Blender import * #from Blender.Mathutils import Vector, Matrix +import bpy #import BPyMessages from dxfReader import readDXF @@ -313,6 +318,8 @@ WORLDX = Mathutils.Vector((1,0,0)) WORLDY = Mathutils.Vector((1,1,0)) WORLDZ = Mathutils.Vector((0,0,1)) +oblist = [] #to be sure, it is an empty list + G_SCALE = 1.0 #(0.0001-1000) global scaling factor for all dxf data G_ORIGIN_X = 0.0 #global translation-vector (x,y,z) in DXF units G_ORIGIN_Y = 0.0 @@ -330,6 +337,10 @@ ELEVATION = 0.0 #standard elevation = coordinate Z TARGET_LAYER = 3 #target blender_layer GROUP_BYLAYER = 0 #(0/1) all entities from same layer import into one blender-group +cur_COUNTER = 0 #counter for progress_bar +M_OBJ = False +BYBLOCK = 0 +BYLAYER = 256 FILENAME_MAX = 180 #max length of path+file_name string (FILE_MAXDIR + FILE_MAXFILE) MAX_NAMELENGTH = 17 #max_effective_obnamelength in blender =21=17+(.001) @@ -342,75 +353,6 @@ AUTO = BezTriple.HandleTypes.AUTO FREE = BezTriple.HandleTypes.FREE VECT = BezTriple.HandleTypes.VECT ALIGN = BezTriple.HandleTypes.ALIGN -cur_COUNTER = 0 #counter for progress_bar - - -"""This module provides wrapper objects for dxf entities. - - The wrappers expect a "dxf object" as input. The dxf object is - an object with a type and a data attribute. Type is a lowercase - string matching the 0 code of a dxf entity. Data is a list containing - dxf objects or lists of [code, data] pairs. - - This module is not general, and is only for dxf import. -""" - -# from Stani's dxf writer v1.1 (c)www.stani.be (GPL) -#---color values -BYBLOCK = 0 -BYLAYER = 256 - -#---block-type flags (bit coded values, may be combined): -ANONYMOUS =1 # This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application -NON_CONSTANT_ATTRIBUTES =2 # This block has non-constant attribute definitions (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all) -XREF =4 # This block is an external reference (xref) -XREF_OVERLAY =8 # This block is an xref overlay -EXTERNAL =16 # This block is externally dependent -RESOLVED =32 # This is a resolved external reference, or dependent of an external reference (ignored on input) -REFERENCED =64 # This definition is a referenced external reference (ignored on input) - -#---polyline flags -CLOSED =1 # This is a closed polyline (or a polygon mesh closed in the M direction) -CURVE_FIT =2 # Curve-fit vertices have been added -SPLINE_FIT =4 # Spline-fit vertices have been added -POLYLINE_3D =8 # This is a 3D polyline -POLYGON_MESH =16 # This is a 3D polygon mesh -CLOSED_N =32 # The polygon mesh is closed in the N direction -POLYFACE_MESH =64 # The polyline is a polyface mesh -CONTINOUS_LINETYPE_PATTERN =128 # The linetype pattern is generated continuously around the vertices of this polyline - -#---text flags -#horizontal -LEFT = 0 -CENTER = 1 -RIGHT = 2 -ALIGNED = 3 #if vertical alignment = 0 -MIDDLE = 4 #if vertical alignment = 0 -FIT = 5 #if vertical alignment = 0 -#vertical -BASELINE = 0 -BOTTOM = 1 -MIDDLE = 2 -TOP = 3 - -#---mtext flags -#attachment point -TOP_LEFT = 1 -TOP_CENTER = 2 -TOP_RIGHT = 3 -MIDDLE_LEFT = 4 -MIDDLE_CENTER = 5 -MIDDLE_RIGHT = 6 -BOTTOM_LEFT = 7 -BOTTOM_CENTER = 8 -BOTTOM_RIGHT = 9 -#drawing direction -LEFT_RIGHT = 1 -TOP_BOTTOM = 3 -BY_STYLE = 5 #the flow direction is inherited from the associated text style -#line spacing style (optional): -AT_LEAST = 1 #taller characters will override -EXACT = 2 #taller characters will not override class View: #----------------------------------------------------------------- @@ -652,6 +594,14 @@ def get_extrusion(data): #------------------------------------------------- return vec +#------------------------------------------ +def getSceneChild(name): + dudu = [i for i in SCENE.objects if i.name==name] +# dudu = [i for i in SCENE.getChildren() if i.name==name] + #print 'deb:getSceneChild %s -result: %s:' %(name,dudu) #----------------- + if dudu!=[]: return dudu[0] + return None + class Solid: #----------------------------------------------------------------- """Class for objects representing dxf SOLID or TRACE. @@ -754,16 +704,16 @@ class Solid: #----------------------------------------------------------------- if l == 4: faces = [[0,1,3,2]] elif l == 3: faces = [[0,1,2]] elif l == 2: edges = [[0,1]] - - - - me = Mesh.New(obname) # create a new mesh + + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object me.verts.extend(points) # add vertices to mesh if faces: me.faces.extend(faces) # add faces to the mesh if edges: me.edges.extend(edges) # add faces to the mesh - ob = SCENE.objects.new(me) # create a new mesh_object - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # each MeshSide becomes vertexGroup for easier material assignment --------------------- replace = Blender.Mesh.AssignModes.ADD #or .AssignModes.ADD/REPLACE if vg_left: me.addVertGroup('side.left') ; me.assignVertsToGroup('side.left', vg_left, 1.0, replace) @@ -777,9 +727,6 @@ class Solid: #----------------------------------------------------------------- return ob - - - class Line: #----------------------------------------------------------------- """Class for objects representing dxf LINEs. """ @@ -838,7 +785,7 @@ class Line: #----------------------------------------------------------------- elif settings.var['lines_as'] == 3: # as thin cylinder cyl_rad = 0.5 * settings.var['width_min'] - if settings.var['lines_as'] == 5: # LINE curve representation------------------------- + elif settings.var['lines_as'] == 5: # LINE curve representation------------------------- obname = 'li_%s' %self.layer # create object name from layer name obname = obname[:MAX_NAMELENGTH] @@ -872,20 +819,23 @@ class Line: #----------------------------------------------------------------- global activObjectName #print 'deb:draw:line.ob IN activObjectName: ', activObjectName #--------------------- - if activObjectLayer == self.layer and settings.var['one_mesh_on']: - obname = activObjectName - #print 'deb:line.draw obname from activObjectName: ', obname #--------------------- - ob = Object.Get(obname) # open an existing mesh_object - #ob = SCENE.getChildren(obname) # open an existing mesh_object - me = Mesh.Get(ob.name) # open objects mesh data - else: - obname = 'li_%s' %self.layer # create object name from layer name - obname = obname[:MAX_NAMELENGTH] - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object - activObjectName = ob.name - activObjectLayer = self.layer - #print ('deb:line.draw new line.ob+mesh:"%s" created!' %ob.name) #--------------------- + if M_OBJ: obname, me, ob = makeNewObject() + else: + if activObjectLayer == self.layer and settings.var['one_mesh_on']: + obname = activObjectName + #print 'deb:line.draw obname from activObjectName: ', obname #--------------------- + ob = getSceneChild(obname) # open an existing mesh_object + #ob = SCENE.getChildren(obname) # open an existing mesh_object + #me = Mesh.Get(ob.name) # open objects mesh data + me = ob.getData(name_only=False, mesh=True) + else: + obname = 'li_%s' %self.layer # create object name from layer name + obname = obname[:MAX_NAMELENGTH] + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object + activObjectName = ob.name + activObjectLayer = self.layer + #print ('deb:line.draw new line.ob+mesh:"%s" created!' %ob.name) #--------------------- faces, edges = [], [] n = len(me.verts) @@ -904,7 +854,7 @@ class Line: #----------------------------------------------------------------- if faces: me.faces.extend(faces) # add faces to the mesh if edges: me.edges.extend(edges) # add faces to the mesh - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # entities with the same color build one vertexGroup for easier material assignment ---- ob.link(me) # link mesh to that object vG_name = 'color_%s' %self.color_index @@ -988,155 +938,23 @@ class Point: #----------------------------------------------------------------- global activObjectLayer global activObjectName #print 'deb:draw:point.ob IN activObjectName: ', activObjectName #--------------------- - if activObjectLayer == self.layer and settings.var['one_mesh_on']: - obname = activObjectName - #print 'deb:draw:point.ob obname from activObjectName: ', obname #--------------------- - ob = Object.Get(obname) # open an existing mesh_object - #ob = SCENE.getChildren(obname) # open an existing mesh_object - me = Mesh.Get(ob.name) # open objects mesh data - else: - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object - activObjectName = ob.name - activObjectLayer = self.layer - #print ('deb:draw:point new point.ob+mesh:"%s" created!' %ob.name) #--------------------- - me.verts.extend(points) # add vertices to mesh - - return ob - - - -class LWpolyline: #----------------------------------------------------------------- - """Class for objects representing dxf LWPOLYLINEs. - """ - def __init__(self, obj): - """Expects an entity object of type lwpolyline as input. - """ - #print 'deb:LWpolyline.START:----------------' #------------------------ - if not obj.type == 'lwpolyline': - raise TypeError, "Wrong type %s for polyline object!" %obj.type - self.type = obj.type - self.data = obj.data[:] - - # required data - self.num_points = obj.get_type(90)[0] - - # optional data (with defaults) - self.space = getit(obj, 67, 0) - - self.color_index = getit(obj, 62, BYLAYER) - - self.elevation = getit(obj, 30, 0) - self.thic = getit(obj, 39, 0) - self.flags = getit(obj, 70, 0) - - self.closed = self.flags&1 # byte coded, 1 = closed, 128 = plinegen - - self.layer = getit(obj.data, 8, None) - self.points = self.get_points(obj.data) - self.extrusion = get_extrusion(obj.data) - - #print 'deb:LWpolyline.obj.data:\n', obj.data #------------------------ - #print 'deb:LWpolyline.ENDinit:----------------' #------------------------ - - - def get_points(self, data): - """Gets points for a polyline type object. - - LW-Polylines have no fixed number of verts, and - each vert can have a number of properties. - Verts should be coded as - 10:xvalue - 20:yvalue - 40:startwidth or 0 - 41:endwidth or 0 - 42:bulge or 0 - for each vert - """ - num = self.num_points - point = None - points = [] - for item in data: - if item[0] == 10: # 10 = x - if point: - points.append(point) - point = Vertex() - point.x = item[1] - elif item[0] == 20: # 20 = y - point.y = item[1] - elif item[0] == 40: # 40 = start width - point.swidth = item[1] - elif item[0] == 41: # 41 = end width - point.ewidth = item[1] - elif item[0] == 42: # 42 = bulge - point.bulge = item[1] - points.append(point) - return points - - - - def __repr__(self): - return "%s: layer - %s, points - %s" %(self.__class__.__name__, self.layer, self.points) - - - def draw(self, settings): - """for LWPOLYLINE: generate Blender_geometry. - """ - #print 'deb:LWpolyline.draw.START:----------------' #------------------------ - points = [] - obname = 'lw_%s' %self.layer # create object name from layer name - obname = obname[:MAX_NAMELENGTH] - #settings.var['curves_on'] == True - #print 'deb:index_len: ', len(self.points) #------------------ - for i, point in enumerate(self.points): - #print 'deb:index: ', i #------------------ - if not point.bulge: - points.append(point.loc) - elif point.bulge and not self.closed and i == len(self.points)-1: - points.append(point.loc) - elif point.bulge: # - if i == len(self.points)-1: - point2 = self.points[0] + if M_OBJ: obname, me, ob = makeNewObject() + else: + if activObjectLayer == self.layer and settings.var['one_mesh_on']: + obname = activObjectName + #print 'deb:draw:point.ob obname from activObjectName: ', obname #--------------------- + ob = getSceneChild(obname) # open an existing mesh_object + #ob = SCENE.getChildren(obname) # open an existing mesh_object + me = ob.getData(name_only=False, mesh=True) + #me = Mesh.Get(ob.name) # open objects mesh data else: - point2 = self.points[i+1] - arc_res = settings.var['arc_res']/sqrt(settings.var['arc_rad']) - verts, center = calcBulge(point, point2, arc_res) -# if i == len(self.points)-1: -# if self.closed: -# verts.pop() #remove last(=first) vertex -# else: -# verts.pop() #remove last vertex, because this point will be writen as the next vertex - points.extend(verts) - - thic = self.thic - if settings.var['thick_force'] and thic == 0: thic = settings.var['thick_min'] - if settings.var['thick_on'] and thic != 0: - len1 = len(points) - points.extend([[point[0], point[1], point[2]+thic] for point in points]) - faces = [] - #print 'deb:len1:', len1 #----------------------- - faces = [[num, num+1, num+len1+1, num+len1] for num in xrange(len1 - 1)] - if self.closed: - faces.append([len1-1, 0, len1, 2*len1-1]) - #print 'deb:faces_list:\n', faces #----------------------- - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object + activObjectName = ob.name + activObjectLayer = self.layer + #print ('deb:draw:point new point.ob+mesh:"%s" created!' %ob.name) #--------------------- me.verts.extend(points) # add vertices to mesh - me.faces.extend(faces) # add faces to the mesh - else: - edges = [[num, num+1] for num in xrange(len(points)-1)] - if self.closed: - edges.append([len(points)-1, 0]) - #print 'deb:edges_list:\n', edges #----------------------- - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object - me.verts.extend(points) # add vertices to mesh - me.edges.extend(edges) # add edges to the mesh - ob.LocZ = self.elevation - transform(self.extrusion, 0, ob) - - #print 'deb:LWpolyline.draw.END:----------------' #------------------------ return ob @@ -1172,10 +990,10 @@ class Polyline: #-------------------------------------------------------------- self.plface = self.flags & 64 # 3D-polyface mesh self.contin = self.flags & 128 # the linetype pattern is generated continuously - if self.poly3d or self.plface or self.plmesh: - self.poly2d = False # its not a 2D-polyline - else: - self.poly2d = True # it is a 2D-polyline + self.pltype='poly2d' # default is a 2D-polyline + if self.poly3d: self.pltype='poly3d' + elif self.plface: self.pltype='plface' + elif self.plmesh: self.pltype='plmesh' self.swidth = getit(obj, 40, 0) # default start width self.ewidth = getit(obj, 41, 0) # default end width @@ -1213,19 +1031,19 @@ class Polyline: #-------------------------------------------------------------- """ ob = [] #---- 3dPolyFace - mesh with free topology - if self.plface and settings.drawTypes['plmesh']: + if self.pltype=='plface' and settings.drawTypes['plmesh']: ob = self.drawPlFace(settings) #---- 3dPolyMesh - mesh with ortogonal topology - elif self.plmesh and settings.drawTypes['plmesh']: + elif self.pltype=='plmesh' and settings.drawTypes['plmesh']: ob = self.drawPlMesh(settings) #---- 2dPolyline - plane polyline with arc/wide/thic segments - elif (self.poly2d and settings.drawTypes['polyline']): + elif self.pltype=='poly2d' and settings.drawTypes['polyline']: if settings.var['plines_as'] == 5: # and self.spline: ob = self.drawPolyCurve(settings) else: ob = self.drawPoly2d(settings) #---- 3dPolyline - non-plane polyline (thin segments = without arc/wide/thic) - elif (self.poly3d and settings.drawTypes['pline3']): + elif self.pltype=='poly3d' and settings.drawTypes['pline3']: if settings.var['plines3_as'] == 5: # and self.spline: ob = self.drawPolyCurve(settings) else: @@ -1355,21 +1173,7 @@ class Polyline: #-------------------------------------------------------------- pline = Curve.New(obname) # create new curve data #pline.setResolu(24) #--todo----- - if False: #self.spline: # NURBSplines-----FAKE(with Bezier)----- - #print 'deb:polyline2dCurve.draw self.spline!' #--------------- - curve = pline.appendNurb(BezTriple.New(d_points[0])) - for p in d_points[1:]: - curve.append(BezTriple.New(p)) - for point in curve: - point.handleTypes = [AUTO, AUTO] - if self.closed: - curve.flagU = 1 # Set curve cyclic=close - else: - curve.flagU = 0 # Set curve not cyclic=open - curve[0].handleTypes = [FREE, ALIGN] #remi--todo----- - curve[-1].handleTypes = [ALIGN, FREE] #remi--todo----- - - elif self.spline: # NURBSplines-----OK----- + if self.spline: # NURBSplines-----OK----- #print 'deb:polyline2dCurve.draw self.spline!' #--------------- weight1 = 0.5 weight2 = 1.0 @@ -1562,6 +1366,7 @@ class Polyline: #-------------------------------------------------------------- ewidths = [] swidth_default = self.swidth #default start width of POLYLINEs segments ewidth_default = self.ewidth #default end width of POLYLINEs segments + #print 'deb:drawPoly2d self.swidth=', self.swidth #------------------------ thic = set_thick(self.thic, settings) if self.spline: pline_typ = 'ps' elif self.curved: pline_typ = 'pc' @@ -1633,9 +1438,11 @@ class Polyline: #-------------------------------------------------------------- swidth = point1.swidth ewidth = point1.ewidth + #print 'deb:drawPoly2d point1.swidth=', swidth #------------------------ if swidth == None: swidth = swidth_default if ewidth == None: ewidth = ewidth_default if swidth != 0.0 or ewidth != 0.0: wide_segment_exist = True + #print 'deb:drawPoly2d vertex_swidth=', swidth #------------------------ if settings.var['width_force']: # force minimal width for thin segments width_min = settings.var['width_min'] @@ -1819,14 +1626,14 @@ class Polyline: #-------------------------------------------------------------- left_angle = False limit_dist = settings.var['dist_min'] if left_angle: # if left turning angle - print 'deb:drawPoly2d it is left turning angle' #------------- + #print 'deb:drawPoly2d it is left turning angle' #------------- # to avoid triangelface/doubleVertex delta1 = (cornerpointL - vecL1).normalize() * limit_dist delta4 = (cornerpointL - vecL4).normalize() * limit_dist pointsLc.extend((cornerpointL - delta1, cornerpointL - delta4)) pointsRc.extend((pointsRe[i],pointsRs[i+1])) else: # if right turning angle - print 'deb:drawPoly2d right turning angle' #------------- + #print 'deb:drawPoly2d right turning angle' #------------- delta1 = (cornerpointR - vecR1).normalize() * limit_dist delta4 = (cornerpointR - vecR4).normalize() * limit_dist pointsRc.extend((cornerpointR - delta1, cornerpointR - delta4)) @@ -1917,8 +1724,10 @@ class Polyline: #-------------------------------------------------------------- #faces = f_bottom + f_top #faces = f_left + f_right + f_start + f_end #print 'deb:faces_list:\n', faces #----------------------- - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object me.verts.extend(pointsW) # add vertices to mesh me.faces.extend(faces) # add faces to the mesh @@ -1926,7 +1735,7 @@ class Polyline: #-------------------------------------------------------------- # The mesh must first be linked to an object so the method knows which object to update. # This is because vertex groups in Blender are stored in the object -- not in the mesh, # which may be linked to more than one object. - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # each MeshSide becomes vertexGroup for easier material assignment --------------------- replace = Blender.Mesh.AssignModes.REPLACE #or .AssignModes.ADD vg_left, vg_right, vg_top, vg_bottom = [], [], [], [] @@ -1956,8 +1765,10 @@ class Polyline: #-------------------------------------------------------------- faces = [[num, len1+num, len1+num+1, num+1] for num in xrange(len1 - 1)] if self.closed: faces.append([len1, 0, len1-1, len1+len1-1]) - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object me.verts.extend(pointsW) # add vertices to mesh me.faces.extend(faces) # add faces to the mesh @@ -1976,8 +1787,10 @@ class Polyline: #-------------------------------------------------------------- faces = [[num, num+1, num+len1+1, num+len1] for num in xrange(len1 - 1)] if self.closed: faces.append([len1-1, 0, len1, 2*len1-1]) - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object me.verts.extend(points) # add vertices to mesh me.faces.extend(faces) # add faces to the mesh @@ -1993,8 +1806,10 @@ class Polyline: #-------------------------------------------------------------- edges = [[num, num+1] for num in xrange(len(points)-1)] if self.closed: edges.append([len(points)-1, 0]) - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object me.verts.extend(points) # add vertices to mesh me.edges.extend(edges) # add edges to the mesh @@ -2006,7 +1821,8 @@ class Polyline: #-------------------------------------------------------------- class Vertex(object): #----------------------------------------------------------------- - """Generic vertex object used by POLYLINEs (and maybe others). + """Generic vertex object used by POLYLINEs, (and maybe others). + also used by class_LWPOLYLINEs but without obj-parameter """ def __init__(self, obj=None): @@ -2017,8 +1833,8 @@ class Vertex(object): #-------------------------------------------------------- #print 'deb:Vertex.init.START:----------------' #----------------------- self.loc = [0,0,0] self.face = [] - self.swidth = 0 - self.ewidth = 0 + self.swidth = None #0 + self.ewidth = None #0 self.bulge = 0 if obj is not None: if not obj.type == 'vertex': @@ -2058,14 +1874,14 @@ class Vertex(object): #-------------------------------------------------------- self.curv_tangent = getit(data, 50, None) # curve_tangent if self.plface and not self.plmesh: - v1 = getit(data, 71, 0) # polyface:Face.vertex 1. - v2 = getit(data, 72, 0) # polyface:Face.vertex 2. - v3 = getit(data, 73, 0) # polyface:Face.vertex 3. - v4 = getit(data, 74, None) # polyface:Face.vertex 4. - self.face = [abs(v1)-1,abs(v2)-1,abs(v3)-1] - if v4 != None: - if abs(v4) != abs(v1): - self.face.append(abs(v4)-1) + v1 = getit(data, 71, 0) # polyface:Face.vertex 1. + v2 = getit(data, 72, 0) # polyface:Face.vertex 2. + v3 = getit(data, 73, 0) # polyface:Face.vertex 3. + v4 = getit(data, 74, None) # polyface:Face.vertex 4. + self.face = [abs(v1)-1,abs(v2)-1,abs(v3)-1] + if v4 != None: + if abs(v4) != abs(v1): + self.face.append(abs(v4)-1) else: #--parameter for polyline2d self.swidth = getit(data, 40, None) # start width self.ewidth = getit(data, 41, None) # end width @@ -2119,6 +1935,304 @@ class Vertex(object): #-------------------------------------------------------- +class Spline(Polyline): #----------------------------------------------------------------- + """Class for objects representing dxf SPLINEs. + """ + def __init__(self, obj): + """Expects an entity object of type spline as input. +100 - Subclass marker (AcDbSpline) +210,220, 230 - Normal vector (omitted if the spline is nonplanar) X,Y,Z values of normal vector +70 - Spline flag (bit coded): + 1 = Closed spline + 2 = Periodic spline + 4 = Rational spline + 8 = Planar + 16 = Linear (planar bit is also set) +71 - Degree of the spline curve +72 - Number of knots +73 - Number of control points +74 - Number of fit points (if any) +42 - Knot tolerance (default = 0.0000001) +43 - Control-point tolerance (default = 0.0000001) +44 - Fit tolerance (default = 0.0000000001) +12,22,32 - Start tangent--may be omitted (in WCS). X,Y,Z values of start tangent--may be omitted (in WCS). +13,23, 33 - End tangent--may be omitted (in WCS). X,Y,Z values of end tangent--may be omitted (in WCS) +40 - Knot value (one entry per knot) +41 - Weight (if not 1); with multiple group pairs, are present if all are not 1 +10,20, 30 - Control points (in WCS) one entry per control point. +DXF: X value; APP: 3D point, Y and Z values of control points (in WCS) (one entry per control point) +11,21, 31 - Fit points (in WCS) one entry per fit point. + X,Y,Z values of fit points (in WCS) (one entry per fit point) + """ + #print 'deb:Spline.START:----------------' #------------------------ + if not obj.type == 'spline': + raise TypeError, "Wrong type %s for spline object!" %obj.type + self.type = obj.type + self.data = obj.data[:] + + # required data + self.num_points = obj.get_type(73)[0] + + # optional data (with defaults) + self.space = getit(obj, 67, 0) + + self.color_index = getit(obj, 62, BYLAYER) + + #self.elevation = getit(obj, 30, 0) + self.thic = 0 # getit(obj, 39, 0) + + width = 0 + self.swidth = width # default start width + self.ewidth = width # default end width + + self.flags = getit(obj, 70, 0) + self.closed = self.flags & 1 # closed spline + self.period = self.flags & 2 # Periodic spline + self.ration = self.flags & 4 # Rational spline + self.planar = self.flags & 8 # Planar + self.linear = self.flags & 16 # Linear (and Planar) + + self.degree = getit(obj, 71, 0) # Degree of the spline curve + self.curvNormal = False + self.curvQBspline = False + self.curvCBspline = False + self.curvBezier = False + if self.degree == 0: self.curvNormal = True + elif self.degree == 1: self.curvQBspline = True + elif self.degree == 2: self.curvCBspline = True + #elif self.degree == 3: self.curvBezier = True + elif self.degree == 3: self.spline = True + + self.num_knots = getit(obj, 72, 0) # Number of knots + self.num_contr = getit(obj, 73, 0) # Number of control points + self.num_fitpk = getit(obj, 74, 0) # Number of fit points (if any) + + self.layer = getit(obj.data, 8, None) + self.extrusion = get_extrusion(obj.data) + + self.points = self.get_points(obj.data) + + if self.planar: self.pltype = 'poly2d' + else: self.pltype = 'poly3d' + self.curved = False + #self.curved = False + + #print 'deb:Spline obj.data:\n', obj.data #------------------------ + #print 'deb:Spline self.points:\n', self.points #------------------------ + #print 'deb:Spline.ENDinit:----------------' #------------------------ + + + def get_points(self, data): + """Gets points for a spline type object. + + Splines have fixed number of verts, and + each vert can have a number of properties. + Verts should be coded as + 10:xvalue + 20:yvalue + for each vert + """ + num = self.num_contr + point = None + points = [] + #point = Vertex() + for item in data: + #print 'deb:Spline item:', item #------------------------ + if item[0] == 10: # control point + if point: points.append(point) + point = Vertex() + point.curved = True + point.x = item[1] + elif item[0] == 20: # 20 = y + point.y = item[1] + elif item[0] == 30: # 30 = z + point.z = item[1] + + elif item[0] == 11: # fit point + if point: points.append(point) + point = Vertex() + point.curved = True + point.x = item[1] + elif item[0] == 21: # 20 = y + point.y = item[1] + elif item[0] == 31: # 30 = z + point.z = item[1] + + elif item[0] == 12: # start tangent + if point: points.append(point) + point = Vertex() + point.curved = True + point.x = item[1] + elif item[0] == 22: # = y + point.y = item[1] + elif item[0] == 32: # = z + point.z = item[1] + + elif item[0] == 13: # end tangent + if point: points.append(point) + point = Vertex() + point.curved = True + point.x = item[1] + elif item[0] == 23: # 20 = y + point.y = item[1] + elif item[0] == 33: # 30 = z + point.z = item[1] + points.append(point) + #print 'deb:Spline points:\n', points #------------------------ + return points + + + + def __repr__(self): + return "%s: layer - %s, points - %s" %(self.__class__.__name__, self.layer, self.points) + + + + +class LWpolyline(Polyline): #------------------------------------------------------------- + """Class for objects representing dxf LWPOLYLINEs. + """ + def __init__(self, obj): + """Expects an entity object of type lwpolyline as input. + """ + #print 'deb:LWpolyline.START:----------------' #------------------------ + if not obj.type == 'lwpolyline': + raise TypeError, "Wrong type %s for polyline object!" %obj.type + self.type = obj.type + self.data = obj.data[:] + + # required data + self.num_points = obj.get_type(90)[0] + + # optional data (with defaults) + self.space = getit(obj, 67, 0) + self.elevation = getit(obj, 38, 0) + self.thic = getit(obj, 39, 0) + self.color_index = getit(obj, 62, BYLAYER) + width = getit(obj, 43, 0) + self.swidth = width # default start width + self.ewidth = width # default end width + #print 'deb:LWpolyline width=', width #------------------------ + #print 'deb:LWpolyline elevation=', self.elevation #------------------------ + + self.flags = getit(obj, 70, 0) + self.closed = self.flags&1 # byte coded, 1 = closed, 128 = plinegen + + self.layer = getit(obj.data, 8, None) + self.extrusion = get_extrusion(obj.data) + + self.points = self.get_points(obj.data) + + self.pltype = 'poly2d' # LW-polyline is a 2D-polyline + self.spline = False + self.curved = False + + + #print 'deb:LWpolyline.obj.data:\n', obj.data #------------------------ + #print 'deb:LWpolyline.ENDinit:----------------' #------------------------ + + + def get_points(self, data): + """Gets points for a polyline type object. + + LW-Polylines have no fixed number of verts, and + each vert can have a number of properties. + Verts should be coded as + 10:xvalue + 20:yvalue + 40:startwidth or 0 + 41:endwidth or 0 + 42:bulge or 0 + for each vert + """ + num = self.num_points + point = None + points = [] + for item in data: + if item[0] == 10: # 10 = x + if point: + points.append(point) + point = Vertex() + point.x = item[1] + point.z = self.elevation + elif item[0] == 20: # 20 = y + point.y = item[1] + elif item[0] == 40: # 40 = start width + point.swidth = item[1] + elif item[0] == 41: # 41 = end width + point.ewidth = item[1] + elif item[0] == 42: # 42 = bulge + point.bulge = item[1] + points.append(point) + return points + + + + def __repr__(self): + return "%s: layer - %s, points - %s" %(self.__class__.__name__, self.layer, self.points) + + + def draw_old(self, settings): + """for LWPOLYLINE: generate Blender_geometry. + """ + #print 'deb:LWpolyline.draw.START:----------------' #------------------------ + points = [] + obname = 'lw_%s' %self.layer # create object name from layer name + obname = obname[:MAX_NAMELENGTH] + #settings.var['curves_on'] == True + #print 'deb:index_len: ', len(self.points) #------------------ + for i, point in enumerate(self.points): + #print 'deb:index: ', i #------------------ + if not point.bulge: + points.append(point.loc) + elif point.bulge and not self.closed and i == len(self.points)-1: + points.append(point.loc) + elif point.bulge: # + if i == len(self.points)-1: + point2 = self.points[0] + else: + point2 = self.points[i+1] + arc_res = settings.var['arc_res']/sqrt(settings.var['arc_rad']) + verts, center = calcBulge(point, point2, arc_res) +# if i == len(self.points)-1: +# if self.closed: +# verts.pop() #remove last(=first) vertex +# else: +# verts.pop() #remove last vertex, because this point will be writen as the next vertex + points.extend(verts) + + thic = self.thic + if settings.var['thick_force'] and thic == 0: thic = settings.var['thick_min'] + if settings.var['thick_on'] and thic != 0: + len1 = len(points) + points.extend([[point[0], point[1], point[2]+thic] for point in points]) + faces = [] + #print 'deb:len1:', len1 #----------------------- + faces = [[num, num+1, num+len1+1, num+len1] for num in xrange(len1 - 1)] + if self.closed: + faces.append([len1-1, 0, len1, 2*len1-1]) + #print 'deb:faces_list:\n', faces #----------------------- + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object + me.verts.extend(points) # add vertices to mesh + me.faces.extend(faces) # add faces to the mesh + else: + edges = [[num, num+1] for num in xrange(len(points)-1)] + if self.closed: + edges.append([len(points)-1, 0]) + #print 'deb:edges_list:\n', edges #----------------------- + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object + me.verts.extend(points) # add vertices to mesh + me.edges.extend(edges) # add edges to the mesh + + ob.LocZ = self.elevation + transform(self.extrusion, 0, ob) + + #print 'deb:LWpolyline.draw.END:----------------' #------------------------ + return ob + + class Text: #----------------------------------------------------------------- """Class for objects representing dxf TEXT. """ @@ -2363,8 +2477,6 @@ class Mtext: #----------------------------------------------------------------- return ob - - class Circle: #----------------------------------------------------------------- """Class for objects representing dxf CIRCLEs. """ @@ -2494,8 +2606,10 @@ class Circle: #---------------------------------------------------------------- return ob else: # draw CIRCLE as mesh ----------------------------------------------- - cir = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(cir) # create a new circle_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object # set a number of segments in entire circle arc_res = settings.var['arc_res'] * sqrt(radius) / sqrt(settings.var['arc_rad']) start, end = 0.0 , 360.0 @@ -2534,24 +2648,24 @@ class Circle: #---------------------------------------------------------------- #print 'deb:circleDraw:verts:', verts #--------------- faces = f_band + f_bottom + f_top #print 'deb:circleDraw:faces:', faces #--------------- - cir.verts.extend(verts) # add vertices to mesh - cir.faces.extend(faces) # add faces to the mesh + me.verts.extend(verts) # add vertices to mesh + me.faces.extend(faces) # add faces to the mesh if settings.var['meshSmooth_on']: # left and right side become smooth ---------------------- for i in xrange(smooth_len): - cir.faces[i].smooth = True + me.faces[i].smooth = True # each MeshSide becomes vertexGroup for easier material assignment --------------------- - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # each MeshSide becomes vertexGroup for easier material assignment --------------------- replace = Blender.Mesh.AssignModes.REPLACE #or .AssignModes.ADD vg_band, vg_top, vg_bottom = [], [], [] for v in f_band: vg_band.extend(v) - cir.addVertGroup('side.band') ; cir.assignVertsToGroup('side.band', list(set(vg_band)), 1.0, replace) + me.addVertGroup('side.band') ; me.assignVertsToGroup('side.band', list(set(vg_band)), 1.0, replace) if settings.var['fill_on']: for v in f_top: vg_top.extend(v) for v in f_bottom: vg_bottom.extend(v) - cir.addVertGroup('side.top') ; cir.assignVertsToGroup('side.top', list(set(vg_top)), 1.0, replace) - cir.addVertGroup('side.bottom'); cir.assignVertsToGroup('side.bottom',list(set(vg_bottom)), 1.0, replace) + me.addVertGroup('side.top') ; me.assignVertsToGroup('side.top', list(set(vg_top)), 1.0, replace) + me.addVertGroup('side.bottom'); me.assignVertsToGroup('side.bottom',list(set(vg_bottom)), 1.0, replace) else: # if thic == 0 if settings.var['fill_on']: @@ -2563,20 +2677,18 @@ class Circle: #---------------------------------------------------------------- faces.append([len1-1, 0, center1]) #print 'deb:circleDraw:verts:', verts #--------------- #print 'deb:circleDraw:faces:', faces #--------------- - cir.verts.extend(verts) # add vertices to mesh - cir.faces.extend(faces) # add faces to the mesh + me.verts.extend(verts) # add vertices to mesh + me.faces.extend(faces) # add faces to the mesh else: - cir.verts.extend(verts) # add vertices to mesh + me.verts.extend(verts) # add vertices to mesh edges = [[num, num+1] for num in xrange(len(verts))] edges[-1][1] = 0 # it points the "new" last edge to the first vertex - cir.edges.extend(edges) # add edges to the mesh + me.edges.extend(edges) # add edges to the mesh ob.loc = tuple(self.loc) transform(self.extrusion, 0, ob) return ob - - class Arc: #----------------------------------------------------------------- """Class for objects representing dxf ARCs. @@ -2670,8 +2782,10 @@ class Arc: #----------------------------------------------------------------- return ob else: # draw ARC as mesh -------------------- - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object # set a number of segments in entire circle arc_res = settings.var['arc_res'] * sqrt(radius) / sqrt(settings.var['arc_rad']) @@ -2719,7 +2833,7 @@ class Arc: #----------------------------------------------------------------- for i in xrange(smooth_len): me.faces[i].smooth = True # each MeshSide becomes vertexGroup for easier material assignment --------------------- - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # each MeshSide becomes vertexGroup for easier material assignment --------------------- replace = Blender.Mesh.AssignModes.REPLACE #or .AssignModes.ADD vg_left, vg_right, vg_top, vg_bottom = [], [], [], [] @@ -2792,8 +2906,8 @@ class BlockRecord: #----------------------------------------------------------- # optional data (with defaults) self.insertion_units = getit(obj, 70, None) self.insert_units = getit(obj, 1070, None) - """code 1070 Einfügeeinheiten: - 0 = Keine Einheiten; 1 = Zoll; 2 = Fuß; 3 = Meilen; 4 = Millimeter; + """code 1070 Einfuegeeinheiten: + 0 = Keine Einheiten; 1 = Zoll; 2 = Fuss; 3 = Meilen; 4 = Millimeter; 5 = Zentimeter; 6 = Meter; 7 = Kilometer; 8 = Mikrozoll; 9 = Mils; 10 = Yard; 11 = Angstrom; 12 = Nanometer; 13 = Mikrons; 14 = Dezimeter; 15 = Dekameter; @@ -3048,7 +3162,7 @@ class Insert: #---------------------------------------------------------------- return ob elif settings.drawTypes['insert']: #if insert_drawType activated - print 'deb:draw. settings.blocknamesmap:', settings.blocknamesmap #-------------------- + #print 'deb:draw. settings.blocknamesmap:', settings.blocknamesmap #-------------------- obname = settings.blocknamesmap[self.name] obname = 'in_%s' %obname # create object name from block name #obname = obname[:MAX_NAMELENGTH] @@ -3193,10 +3307,10 @@ class Ellipse: #--------------------------------------------------------------- if settings.var['lines_as'] == 4: # as thin_box thic = settings.var['thick_min'] width = settings.var['width_min'] - if settings.var['lines_as'] == 3: # as thin cylinder + elif settings.var['lines_as'] == 3: # as thin cylinder cyl_rad = 0.5 * settings.var['width_min'] - if settings.var['lines_as'] == 5: # draw ELLIPSE as curve ------------- + elif settings.var['lines_as'] == 5: # draw ELLIPSE as curve ------------- arc_res = settings.var['curve_arc'] triples = True VectorTriples = calcArc(None, radius, start, end, arc_res, triples) @@ -3236,12 +3350,13 @@ class Ellipse: #--------------------------------------------------------------- else: # draw ELLIPSE as mesh -------------------------------------- - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object + if M_OBJ: obname, me, ob = makeNewObject() + else: + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object # set a number of segments in entire circle arc_res = settings.var['arc_res'] * sqrt(radius) / sqrt(settings.var['arc_rad']) - verts = calcArc(None, radius, start, end, arc_res, False) #verts = [list(point) for point in verts] if False: #--todo--: if ellipse_closed: @@ -3287,8 +3402,7 @@ class Ellipse: #--------------------------------------------------------------- smooth_len = len(f_left) + len(f_right) for i in xrange(smooth_len): me.faces[i].smooth = True - - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # each MeshSide becomes vertexGroup for easier material assignment --------------------- replace = Blender.Mesh.AssignModes.REPLACE #or .AssignModes.ADD vg_left, vg_right, vg_top, vg_bottom = [], [], [], [] @@ -3408,21 +3522,24 @@ class Face: #----------------------------------------------------------------- global activObjectName #print 'deb:draw:face.ob IN activObjectName: ', activObjectName #--------------------- - if activObjectLayer == self.layer and settings.var['one_mesh_on']: - obname = activObjectName - #print 'deb:face.draw obname from activObjectName: ', obname #--------------------- - ob = Object.Get(obname) # open an existing mesh_object - #ob = SCENE.getChildren(obname) # open an existing mesh_object - else: - obname = 'fa_%s' %self.layer # create object name from layer name - obname = obname[:MAX_NAMELENGTH] - me = Mesh.New(obname) # create a new mesh - ob = SCENE.objects.new(me) # create a new mesh_object - activObjectName = ob.name - activObjectLayer = self.layer - #print ('deb:except. new face.ob+mesh:"%s" created!' %ob.name) #--------------------- - - me = Mesh.Get(ob.name) # open objects mesh data + if M_OBJ: obname, me, ob = makeNewObject() + else: + if activObjectLayer == self.layer and settings.var['one_mesh_on']: + obname = activObjectName + #print 'deb:face.draw obname from activObjectName: ', obname #--------------------- + ob = getSceneChild(obname) # open an existing mesh_object + #ob = SCENE.getChildren(obname) # open an existing mesh_object + me = ob.getData(name_only=False, mesh=True) + else: + obname = 'fa_%s' %self.layer # create object name from layer name + obname = obname[:MAX_NAMELENGTH] + me = Mesh.New(obname) # create a new mesh + ob = SCENE.objects.new(me) # create a new mesh_object + activObjectName = ob.name + activObjectLayer = self.layer + #print ('deb:except. new face.ob+mesh:"%s" created!' %ob.name) #--------------------- + + #me = Mesh.Get(ob.name) # open objects mesh data faces, edges = [], [] n = len(me.verts) if len(self.points) == 4: @@ -3435,7 +3552,7 @@ class Face: #----------------------------------------------------------------- me.verts.extend(points) # add vertices to mesh if faces: me.faces.extend(faces) # add faces to the mesh if edges: me.edges.extend(edges) # add faces to the mesh - if settings.var['vGroup_on']: + if settings.var['vGroup_on'] and not M_OBJ: # entities with the same color build one vertexGroup for easier material assignment --------------------- ob.link(me) # link mesh to that object vG_name = 'color_%s' %self.color_index @@ -3468,6 +3585,7 @@ type_map = { # 'mline':MLine, 'polyline':Polyline, 'lwpolyline':LWpolyline, + 'spline':Spline, # 'region':Region, 'trace':Solid, 'solid':Solid, @@ -3738,7 +3856,11 @@ class Blocks: #---------------------------------------------------------------- global oblist oblist.append((ob, insertFlag, blockFlag)) else: + if M_OBJ: + car_end() + car_start() drawEntities(block.entities, self.settings, block_def) + if M_OBJ: car_end() self.settings.write("Drawing block:\'%s\' done!" %name) self.blocks[name] = blender_group @@ -3809,7 +3931,8 @@ class Settings: #-------------------------------------------------------------- """Given the drawing, build dictionaries of Layers, Colors and Blocks. """ - #de: paßt die distance parameter an globalScale + global oblist + #adjust the distance parameter to globalScale if self.var['g_scale'] != 1.0: self.var['dist_min'] = self.var['dist_min'] / self.var['g_scale'] self.var['thick_min'] = self.var['thick_min'] / self.var['g_scale'] @@ -3859,7 +3982,6 @@ class Settings: #-------------------------------------------------------------- if views: #---------------------------------- if self.var['views_on']: - global oblist for item in views.data: if type(item) != list and item.type == 'view': #print 'deb:settings_valid views dir(item)=', dir(item) #------------- @@ -3876,7 +3998,6 @@ class Settings: #-------------------------------------------------------------- if vports: #---------------------------------- if self.var['views_on']: - global oblist for item in vports.data: if type(item) != list and item.type == 'vport': #print 'deb:settings_valid views dir(item)=', dir(item) #------------- @@ -3901,7 +4022,8 @@ class Settings: #-------------------------------------------------------------- # Read the block definitions and build our block object if self.drawTypes['insert']: #if support for entity type 'Insert' is activated #Build a dictionary of blockname:block_data pairs - blocksmap, self.obj_number = getBlocksmap(drawing, layersmap, self.var['layFrozen_on']) + blocksmap, obj_number = getBlocksmap(drawing, layersmap, self.var['layFrozen_on']) + self.obj_number += obj_number self.blocknamesmap = getBlocknamesmap(blocksmap) self.blocks = Blocks(blocksmap, self) # initiates container for blocks_data self.usedBlocks = blocksmap.keys() @@ -3916,9 +4038,7 @@ class Settings: #-------------------------------------------------------------- # The section:entities if 'entities' in sections.keys(): self.write("found section:entities") - self.obj_number += len(drawing.entities.data) - #print 'deb:settings_valid self.obj_number', self.obj_number #---------- self.obj_number = 1.0 / self.obj_number @@ -4152,6 +4272,7 @@ def analyzeDXF(dxfFile): #--------------------------------------- def main(dxfFile): #---------------#############################----------- #print 'deb:filename:', filename #-------------- global SCENE + global oblist editmode = Window.EditMode() # are we in edit mode? If so ... if editmode: Window.EditMode(0) # leave edit mode before @@ -4206,7 +4327,6 @@ def main(dxfFile): #---------------#############################----------- return None # Draw all the know entity types in the current scene - global oblist oblist = [] # a list of all created AND linked objects for final f_globalScale time2 = Blender.sys.time() #time marker2 @@ -4218,9 +4338,12 @@ def main(dxfFile): #---------------#############################----------- global activObjectLayer, activObjectName activObjectLayer, activObjectName = None, None + if M_OBJ: car_init() + drawEntities(drawing.entities, settings) #print 'deb:drawEntities after: oblist:', oblist #----------------------- + if M_OBJ: car_end() if oblist: # and settings.var['g_scale'] != 1: globalScale(oblist, settings.var['g_scale']) @@ -4357,7 +4480,7 @@ def getBlocksmap(drawing, layersmap, layFrozen_on=False): #-------------------- try: usedblocks[item.name] = [used, childList] except KeyError: print 'Cannot map "%s" - "%s" as Block!' %(item.name, item) #print 'deb:getBlocksmap: usedblocks=' , usedblocks #------------- - print 'deb:getBlocksmap: layersmap=' , layersmap #------------- + #print 'deb:getBlocksmap: layersmap=' , layersmap #------------- for item in drawing.entities.data: if type(item) != list and item.type == 'insert': @@ -4527,19 +4650,27 @@ def drawer(_type, entities, settings, block_def): #---------------------------- insertFlag = False alt_obname = activObjectName ob = entity.draw(settings) - if ob and ob.name != alt_obname: - if block_def: - blockFlag = True - bl_loc = block_def[1] - ob.loc = [ob.loc[0]-bl_loc[0],ob.loc[1]-bl_loc[1],ob.loc[2]-bl_loc[2]] - else: blockFlag = False - setObjectProperties(ob, group, entity, settings, block_def) - if settings.var['optimization'] <= settings.MIN: - #if settings.var['g_origin_on'] and not block_def: ob.loc = Mathutils.Vector(ob.loc) + settings.g_origin - if settings.var['g_scale_on']: globalScaleOne(ob, insertFlag, blockFlag, settings.var['g_scale']) - settings.redraw() - else: oblist.append((ob, insertFlag, blockFlag)) - + if ob: + if M_OBJ and ob.type=='Mesh': #'Curve', 'Text' + if block_def: + blockFlag = True + bl_loc = block_def[1] + ob.loc = [ob.loc[0]-bl_loc[0],ob.loc[1]-bl_loc[1],ob.loc[2]-bl_loc[2]] + car_nr() + + elif ob.name != alt_obname: + if block_def: + blockFlag = True + bl_loc = block_def[1] + ob.loc = [ob.loc[0]-bl_loc[0],ob.loc[1]-bl_loc[1],ob.loc[2]-bl_loc[2]] + else: blockFlag = False + setObjectProperties(ob, group, entity, settings, block_def) + if settings.var['optimization'] <= settings.MIN: + #if settings.var['g_origin_on'] and not block_def: ob.loc = Mathutils.Vector(ob.loc) + settings.g_origin + if settings.var['g_scale_on']: globalScaleOne(ob, insertFlag, blockFlag, settings.var['g_scale']) + settings.redraw() + else: oblist.append((ob, insertFlag, blockFlag)) + #print 'deb:Finished drawing:', entities[0].type #------------------------ message = "\nDrawing dxf\'%ss\' done!" % _type settings.write(message, True) @@ -4569,7 +4700,8 @@ def globalScaleOne(ob, insertFlag, blockFlag, SCALE): #------------------------ ob.loc = Mathutils.Vector(ob.loc) * SCALE_MAT else: # entire scaling for all other imported objects ------------ if ob.type == 'Mesh': - me = Mesh.Get(ob.name) + me = ob.getData(name_only=False, mesh=True) + #me = Mesh.Get(ob.name) # set centers of all objects in (0,0,0) #me.transform(ob.matrixWorld*SCALE_MAT) #ob.loc = Mathutils.Vector([0,0,0]) @@ -4990,6 +5122,7 @@ points_as_menu = "convert to: %t|empty %x1|mesh.vertex %x2|thin sphere %x3|thin lines_as_menu = "convert to: %t|*edge %x1|mesh %x2|*thin cylinder %x3|thin box %x4|curve %x5" mlines_as_menu = "convert to: %t|*edge %x1|*mesh %x2|*thin cylinder %x3|*thin box %x|*curve %x5" plines_as_menu = "convert to: %t|*edge %x1|mesh %x2|*thin cylinder %x3|*thin box %x4|curve %x5" +splines_as_menu = "convert to: %t|*edge %x1|mesh %x2|*thin cylinder %x3|*thin box %x4|curve %x5" plines3_as_menu = "convert to: %t|*edge %x1|mesh %x2|*thin cylinder %x3|*thin box %x4|curve %x5" plmesh_as_menu = "convert to: %t|*edge %x1|mesh %x2" solids_as_menu = "convert to: %t|*edge %x1|mesh %x2" @@ -5072,6 +5205,7 @@ keywords_org = { 'lines_as' : 2, 'mlines_as' : 2, 'plines_as' : 2, + 'splines_as' : 2, 'plines3_as': 2, 'plmesh_as' : 2, 'solids_as' : 2, @@ -5087,6 +5221,7 @@ drawTypes_org = { 'ellipse': 1, 'mline' : 0, 'polyline': 1, + 'spline': 0, 'plmesh': 1, 'pline3': 1, 'lwpolyline': 1, @@ -5272,12 +5407,14 @@ def presetConfig_curv(): #----------------------------------------------- GUI_A['lines_as'].val = 5 GUI_A['mlines_as'].val = 5 GUI_A['plines_as'].val = 5 + GUI_A['splines_as'].val = 5 GUI_A['plines3_as'].val = 5 else: GUI_A['points_as'].val = 2 GUI_A['lines_as'].val = 2 GUI_A['mlines_as'].val = 2 GUI_A['plines_as'].val = 2 + GUI_A['splines_as'].val = 2 GUI_A['plines3_as'].val = 2 @@ -5315,6 +5452,7 @@ def resetDefaultConfig_2D(): #----------------------------------------------- 'ellipse': 1, 'mline' : 0, 'polyline': 1, + 'spline': 0, 'plmesh': 0, 'pline3': 0, 'lwpolyline': 1, @@ -5361,6 +5499,7 @@ def resetDefaultConfig_3D(): #----------------------------------------------- 'ellipse': 1, 'mline' : 0, 'polyline': 1, + 'spline': 0, 'plmesh': 1, 'pline3': 1, 'lwpolyline': 1, @@ -5429,7 +5568,7 @@ def draw_UI(): #--------------------------------------------------------------- menu_w = (3 * butt_margin) + but_0c + but_1c + but_2c + but_3c #menu width simple_menu_h = 80 - extend_menu_h = 350 + extend_menu_h = 370 y = simple_menu_h # y is menu upper.y if config_UI.val: y += extend_menu_h x = 20 #menu left.x @@ -5450,8 +5589,9 @@ def draw_UI(): #--------------------------------------------------------------- if config_UI.val: b0, b0_ = but0c, but_0c + butt_margin b1, b1_ = but1c, but_1c - y -= 10 + y_top = y + y -= 10 y -= 20 Draw.BeginAlign() GUI_B['point'] = Draw.Toggle('POINT', EVENT_REDRAW, b0, y, b0_, 20, GUI_B['point'].val, "support dxf-POINT on/off") @@ -5476,7 +5616,14 @@ def draw_UI(): #--------------------------------------------------------------- y -= 20 Draw.BeginAlign() - GUI_B['polyline'] = Draw.Toggle('2D-PLINE', EVENT_REDRAW, b0, y, b0_, 20, GUI_B['polyline'].val, "support dxf-2D-POLYLINE on/off") + GUI_B['spline'] = Draw.Toggle('SPLINE', EVENT_REDRAW, b0, y, b0_, 20, GUI_B['spline'].val, "support dxf-SPLINE on/off") + if GUI_B['spline'].val: + GUI_A['splines_as'] = Draw.Menu(splines_as_menu, EVENT_NONE, but1c, y, but_1c, 20, GUI_A['splines_as'].val, "select target Blender-object") + Draw.EndAlign() + + y -= 20 + Draw.BeginAlign() + GUI_B['polyline'] = Draw.Toggle('2D/LWPLINE', EVENT_REDRAW, b0, y, b0_, 20, GUI_B['polyline'].val, "support dxf-2D-POLYLINE on/off") if GUI_B['polyline'].val: GUI_A['plines_as'] = Draw.Menu(plines_as_menu, EVENT_NONE, but1c, y, but_1c, 20, GUI_A['plines_as'].val, "select target Blender-object") Draw.EndAlign() @@ -5488,6 +5635,64 @@ def draw_UI(): #--------------------------------------------------------------- GUI_A['plines3_as'] = Draw.Menu(plines3_as_menu, EVENT_NONE, but1c, y, but_1c, 20, GUI_A['plines3_as'].val, "select target Blender-object") Draw.EndAlign() + y_down = y + # ----------------------------------------------- + + y = y_top + b0, b0_ = but2c, but_2c + butt_margin + b1, b1_ = but3c, but_3c + + y -= 10 + y -= 20 + Draw.BeginAlign() + GUI_B['plmesh'] = Draw.Toggle('POLY-MESH/FACE', EVENT_NONE, b0, y, b0_+b1_, 20, GUI_B['plmesh'].val, "support dxf-POLYMESH/POLYFACE on/off") +# GUI_A['plmesh_as'] = Draw.Menu(plmesh_as_menu, EVENT_NONE, but1c, y, but_1c, 20, GUI_A['plmesh_as'].val, "select target Blender-object") + Draw.EndAlign() + + y -= 20 + Draw.BeginAlign() + GUI_B['solid'] = Draw.Toggle('SOLID', EVENT_NONE, b0, y, b0_, 20, GUI_B['solid'].val, "support dxf-SOLID and TRACE on/off") + GUI_B['face'] = Draw.Toggle('3DFACE', EVENT_NONE, b1, y, b1_, 20, GUI_B['face'].val, "support dxf-3DFACE on/off") +# GUI_A['solids_as'] = Draw.Menu(solids_as_menu, EVENT_NONE, but3c, y, but_3c, 20, GUI_A['solids_as'].val, "select target Blender-object") + Draw.EndAlign() + #print 'deb:support solid, trace', GUI_B['trace'].val, GUI_B['solid'].val # ------------ + + + y -= 20 + Draw.BeginAlign() + GUI_B['text'] = Draw.Toggle('TEXT', EVENT_NONE, b0, y, b0_, 20, GUI_B['text'].val, "support dxf-TEXT on/off") + GUI_B['mtext'] = Draw.Toggle('*MTEXT', EVENT_NONE, b1, y, b1_, 20, GUI_B['mtext'].val, "(*wip)support dxf-MTEXT on/off") +# GUI_A['texts_as'] = Draw.Menu(texts_as_menu, EVENT_NONE, but3c, y, but_3c, 20, GUI_A['texts_as'].val, "select target Blender-object") + Draw.EndAlign() + + y -= 20 + Draw.BeginAlign() + GUI_B['block'] = Draw.Toggle('BLOCK', EVENT_REDRAW, b0, y, b0_-30, 20, GUI_B['block'].val, "support dxf-BLOCK and ARRAY on/off") + GUI_B['insert'].val = GUI_B['block'].val + if GUI_B['block'].val: + GUI_A['block_nn'] = Draw.Toggle('n', EVENT_NONE, b1-30, y, 15, 20, GUI_A['block_nn'].val, "support hatch/noname BLOCKs *X... on/off") + GUI_A['blockFilter_on'] = Draw.Toggle('F', EVENT_NONE, b1-15, y, 15, 20, GUI_A['blockFilter_on'].val, "(*wip) support name filtering of BLOCKs on/off") + GUI_A['xref_on'] = Draw.Toggle('Xref', EVENT_NONE, b1, y, 20, 20, GUI_A['xref_on'].val, "support place holder for XREF-BLOCKs on/off") + GUI_A['blocks_as'] = Draw.Menu(blocks_as_menu, EVENT_NONE, b1+20, y, b1_-20, 20, GUI_A['blocks_as'].val, "select target representation for imported BLOCKs") + Draw.EndAlign() + + + y -= 20 + Draw.BeginAlign() + GUI_A['views_on'] = Draw.Toggle('views', EVENT_NONE, b0, y, b0_-25, 20, GUI_A['views_on'].val, "imports VIEWs and VIEWPORTs as cameras on/off") + GUI_A['cams_on'] = Draw.Toggle('*cams', EVENT_NONE, b1-25, y, b1_-25, 20, GUI_A['cams_on'].val, "(*wip) support ASHADE cameras on/off") + GUI_A['lights_on'] = Draw.Toggle('*lights', EVENT_NONE, b1+25, y, b1_-25, 20, GUI_A['lights_on'].val, "(*wip) support AVE_RENDER lights on/off") + Draw.EndAlign() + + + if y < y_down: y_down = y + # -----end supported objects-------------------------------------- + + b0, b0_ = but0c, but_0c + butt_margin + b1, b1_ = but1c, but_1c + + y_top = y_down + y = y_top y -= 10 y -= 20 Draw.BeginAlign() @@ -5534,6 +5739,14 @@ def draw_UI(): #--------------------------------------------------------------- Draw.Label(scale_str, b1+45, y, 200, 20) Draw.EndAlign() + y_down = y + # -----end material,translate,scale------------------------------------------ + + b0, b0_ = but0c, but_0c + butt_margin + b1, b1_ = but1c, but_1c + + y_top = y_down + y = y_top y -= 10 y -= 20 Draw.BeginAlign() @@ -5571,56 +5784,11 @@ def draw_UI(): #--------------------------------------------------------------- y_down = y # ----------------------------------------------- - y = simple_menu_h + extend_menu_h +20 + b0, b0_ = but2c, but_2c + butt_margin b1, b1_ = but3c, but_3c - y -= 20 - Draw.BeginAlign() - GUI_B['plmesh'] = Draw.Toggle('POLY-MESH/FACE', EVENT_NONE, b0, y, b0_+b1_, 20, GUI_B['plmesh'].val, "support dxf-POLYMESH/POLYFACE on/off") -# GUI_A['plmesh_as'] = Draw.Menu(plmesh_as_menu, EVENT_NONE, but1c, y, but_1c, 20, GUI_A['plmesh_as'].val, "select target Blender-object") - Draw.EndAlign() - - y -= 20 - Draw.BeginAlign() - GUI_B['solid'] = Draw.Toggle('SOLID', EVENT_NONE, b0, y, b0_, 20, GUI_B['solid'].val, "support dxf-SOLID and TRACE on/off") - GUI_B['face'] = Draw.Toggle('3DFACE', EVENT_NONE, b1, y, b1_, 20, GUI_B['face'].val, "support dxf-3DFACE on/off") -# GUI_A['solids_as'] = Draw.Menu(solids_as_menu, EVENT_NONE, but3c, y, but_3c, 20, GUI_A['solids_as'].val, "select target Blender-object") - Draw.EndAlign() - #print 'deb:support solid, trace', GUI_B['trace'].val, GUI_B['solid'].val # ------------ - - - y -= 20 - Draw.BeginAlign() - GUI_B['text'] = Draw.Toggle('TEXT', EVENT_NONE, b0, y, b0_, 20, GUI_B['text'].val, "support dxf-TEXT on/off") - GUI_B['mtext'] = Draw.Toggle('*MTEXT', EVENT_NONE, b1, y, b1_, 20, GUI_B['mtext'].val, "(*wip)support dxf-MTEXT on/off") -# GUI_A['texts_as'] = Draw.Menu(texts_as_menu, EVENT_NONE, but3c, y, but_3c, 20, GUI_A['texts_as'].val, "select target Blender-object") - Draw.EndAlign() - - y -= 20 - Draw.BeginAlign() - GUI_B['block'] = Draw.Toggle('BLOCK', EVENT_REDRAW, b0, y, b0_-30, 20, GUI_B['block'].val, "support dxf-BLOCK and ARRAY on/off") - GUI_B['insert'].val = GUI_B['block'].val - if GUI_B['block'].val: - GUI_A['block_nn'] = Draw.Toggle('n', EVENT_NONE, b1-30, y, 15, 20, GUI_A['block_nn'].val, "support hatch/noname BLOCKs *X... on/off") - GUI_A['blockFilter_on'] = Draw.Toggle('F', EVENT_NONE, b1-15, y, 15, 20, GUI_A['blockFilter_on'].val, "(*wip) support name filtering of BLOCKs on/off") - GUI_A['xref_on'] = Draw.Toggle('Xref', EVENT_NONE, b1, y, 20, 20, GUI_A['xref_on'].val, "support place holder for XREF-BLOCKs on/off") - GUI_A['blocks_as'] = Draw.Menu(blocks_as_menu, EVENT_NONE, b1+20, y, b1_-20, 20, GUI_A['blocks_as'].val, "select target representation for imported BLOCKs") - Draw.EndAlign() - - - y -= 20 - Draw.BeginAlign() - GUI_A['views_on'] = Draw.Toggle('views', EVENT_NONE, b0, y, b0_-25, 20, GUI_A['views_on'].val, "imports VIEWs and VIEWPORTs as cameras on/off") - GUI_A['cams_on'] = Draw.Toggle('*cams', EVENT_NONE, b1-25, y, b1_-25, 20, GUI_A['cams_on'].val, "(*wip) support ASHADE cameras on/off") - GUI_A['lights_on'] = Draw.Toggle('*lights', EVENT_NONE, b1+25, y, b1_-25, 20, GUI_A['lights_on'].val, "(*wip) support AVE_RENDER lights on/off") - Draw.EndAlign() - - y -= 10 - y -= 20 - y -= 20 - y -= 20 - + y = y_top y -= 10 y -= 20 Draw.BeginAlign() @@ -5656,8 +5824,13 @@ def draw_UI(): #--------------------------------------------------------------- GUI_A['newScene_on'] = Draw.Toggle('newScene', EVENT_NONE, b0, y, b0_, 20, GUI_A['newScene_on'].val, "creates new Blender-Scene for each import on/off") GUI_A['target_layer'] = Draw.Number('layer', EVENT_NONE, b1, y, b1_, 20, GUI_A['target_layer'].val, 1, 18, "imports into this Blender-layer (<19> reserved for block_definitions)") + if y < y_down: y_down = y + # -----end options -------------------------------------- + + #-------------------------------------- - if y > y_down: y = y_down + y_top = y_down + y = y_top #GUI_A['dummy_on'] = Draw.Toggle(' - ', EVENT_NONE, but0c, y, but_0c, 20, GUI_A['dummy_on'].val, "reserved") y -= 30 Draw.BeginAlign() @@ -5891,6 +6064,7 @@ def multi_import(DIR): +UI_MODE = True if __name__ == "__main__": UI_MODE = True @@ -5942,5 +6116,4 @@ if 1: main(_dxf) print 'TOTAL TIME: %.6f' % (Blender.sys.time() - TIME) -""" - +""" \ No newline at end of file From 4f601b478c99ef9d74086e73a9eb38c9c598791d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jun 2008 13:02:00 +0000 Subject: [PATCH 195/430] * python sys.cleanpath() used strstr incorrectly, resulting in paths containing a slash, always returning a path that ends with a slash. * python Blender.GetPaths() - absolute=0 wasnt working * BLI_cleanup_file and BLI_cleanup_file were treating the // prefix as a duplicate path, now ignores // * BLI_convertstringcode was removing the trailing slash from a path (tested these path functions didnt mess up with some of the peach files and with pointcache) --- source/blender/blenlib/intern/util.c | 38 ++++++++++++++++--------- source/blender/python/api2_2x/Blender.c | 2 +- source/blender/python/api2_2x/Sys.c | 5 ++-- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 3610813f2da..ad34af05ac7 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -865,11 +865,8 @@ int BLI_strcaseeq(char *a, char *b) { void BLI_cleanup_dir(const char *relabase, char *dir) { BLI_cleanup_file(relabase, dir); -#ifdef WIN32 - strcat(dir, "\\"); -#else - strcat(dir, "/"); -#endif + BLI_add_slash(dir); + } void BLI_cleanup_file(const char *relabase, char *dir) @@ -878,6 +875,13 @@ void BLI_cleanup_file(const char *relabase, char *dir) char *start, *eind; if (relabase) { BLI_convertstringcode(dir, relabase); + } else { + if (dir[0]=='/' && dir[1]=='/') { + if (dir[2]== '\0') { + return; /* path is "//" - cant clean it */ + } + dir = dir+2; /* skip the first // */ + } } #ifdef WIN32 if(dir[0]=='.') { /* happens for example in FILE_MAIN */ @@ -1150,24 +1154,30 @@ int BLI_convertstringcode(char *path, const char *basepath) BLI_char_switch(tmp, '\\', '/'); BLI_char_switch(base, '\\', '/'); + /* Paths starting with // will get the blend file as their base, + * this isnt standard in any os but is uesed in blender all over the place */ if (tmp[0] == '/' && tmp[1] == '/') { - char *filepart= BLI_strdup(tmp+2); /* skip code */ char *lslash= BLI_last_slash(base); - if (lslash) { int baselen= (int) (lslash-base) + 1; - + /* use path for for temp storage here, we copy back over it right away */ + BLI_strncpy(path, tmp+2, FILE_MAX); + memcpy(tmp, base, baselen); - strcpy(tmp+baselen, filepart); + strcpy(tmp+baselen, path); + strcpy(path, tmp); } else { - strcpy(tmp, filepart); + strcpy(path, tmp+2); } - - MEM_freeN(filepart); + } else { + strcpy(path, tmp); } - BLI_cleanup_file(NULL, tmp); - strcpy(path, tmp); + if (path[strlen(path)-1]=='/') { + BLI_cleanup_dir(NULL, path); + } else { + BLI_cleanup_file(NULL, path); + } #ifdef WIN32 /* skip first two chars, which in case of diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index 6fce0864189..6b2e00f27de 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -952,7 +952,7 @@ static PyObject *Blender_GetPaths( PyObject * self, PyObject *args, PyObject *ke if (absolute) { BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); } else { - BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); + BLI_bpathIterator_getPath( &bpi, filepath_expanded ); } st = PyString_FromString(filepath_expanded); diff --git a/source/blender/python/api2_2x/Sys.c b/source/blender/python/api2_2x/Sys.c index 3863cc12227..b0d18f9f4aa 100644 --- a/source/blender/python/api2_2x/Sys.c +++ b/source/blender/python/api2_2x/Sys.c @@ -406,11 +406,12 @@ static PyObject *M_sys_cleanpath( PyObject * self, PyObject * value ) { char *path = PyString_AsString(value); char cleaned[FILE_MAXDIR + FILE_MAXFILE]; - int trailing_slash = 0; + int trailing_slash = 0, last; if (!path) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected string argument" ); - if (strstr(path, "/") || strstr(path, "\\")) { + last = strlen(path)-1; + if ((path[last]=='/') || (path[last]=='\\')) { trailing_slash = 1; } BLI_strncpy(cleaned, path, FILE_MAXDIR + FILE_MAXFILE); From f35289574ac8a6c96fb82652a99509406ac2368e Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 5 Jun 2008 13:02:17 +0000 Subject: [PATCH 196/430] BLI_kdopbvh: crashed when traversing with little faces --- source/blender/blenlib/intern/BLI_kdopbvh.c | 25 ++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 9c4238431dc..a85883f6572 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -240,17 +240,16 @@ void sort_along_axis(BVHTree *tree, int start, int end, int axis) //after a call to this function you can expect one of: // every node to left of a[n] are smaller or equal to it // every node to the right of a[n] are greater or equal to it -int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis){ - int begin = _begin, end = _end, cut; - int i; - while(end-begin > 3) - { - cut = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end)/2, end-1, axis), axis ); - if(cut <= n) - begin = cut; - else - end = cut; - } +int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis){ + int begin = _begin, end = _end, cut; + while(end-begin > 3) + { + cut = bvh_partition(a, begin, end, bvh_medianof3(a, begin, (begin+end)/2, end-1, axis), axis ); + if(cut <= n) + begin = cut; + else + end = cut; + } bvh_insertionsort(a, begin, end, axis); return n; @@ -415,7 +414,7 @@ static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end) for (j = start; j < end; j++) { - // for all Axes. +// for all Axes. for (i = tree->start_axis; i < tree->stop_axis; i++) { newmin = tree->nodes[j]->bv[(2 * i)]; @@ -696,7 +695,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result) } #pragma omp parallel for private(j) schedule(static) - for(j = 0; j < tree1->tree_type; j++) + for(j = 0; j < MIN2(tree1->tree_type, tree1->nodes[tree1->totleaf]->totnode); j++) { traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]); } From 6757b759ea29f8b59d92b2772efd2d0d1dac2c8a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jun 2008 13:12:17 +0000 Subject: [PATCH 197/430] added checks for zero length strings when checking for the last character --- source/blender/blenlib/intern/util.c | 10 ++++++---- source/blender/python/api2_2x/Sys.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index ad34af05ac7..848e45ccb1b 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1173,10 +1173,12 @@ int BLI_convertstringcode(char *path, const char *basepath) strcpy(path, tmp); } - if (path[strlen(path)-1]=='/') { - BLI_cleanup_dir(NULL, path); - } else { - BLI_cleanup_file(NULL, path); + if (path[0]!='\0') { + if ( path[strlen(path)-1]=='/') { + BLI_cleanup_dir(NULL, path); + } else { + BLI_cleanup_file(NULL, path); + } } #ifdef WIN32 diff --git a/source/blender/python/api2_2x/Sys.c b/source/blender/python/api2_2x/Sys.c index b0d18f9f4aa..baae2220143 100644 --- a/source/blender/python/api2_2x/Sys.c +++ b/source/blender/python/api2_2x/Sys.c @@ -411,7 +411,7 @@ static PyObject *M_sys_cleanpath( PyObject * self, PyObject * value ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected string argument" ); last = strlen(path)-1; - if ((path[last]=='/') || (path[last]=='\\')) { + if ((last >= 0) && ((path[last]=='/') || (path[last]=='\\'))) { trailing_slash = 1; } BLI_strncpy(cleaned, path, FILE_MAXDIR + FILE_MAXFILE); From 172fe6ed2f963b952833f39729e1bac52b479a2f Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Thu, 5 Jun 2008 14:49:12 +0000 Subject: [PATCH 198/430] Bugfix: [#13619] Transform Rotate and Scale Strange view: noclip version of int and float projection. Also project from behind the view's position and return coherent values for near clipping transform: use the above functions for 2d center and helpline drawing NOTE: the result for centers behind the camera (in perspective) isn't 100% perfect in the case of rotations because they always use the centered view vector as rotation axis and not the one aligned with the 2d center. Changing this would not be desirable anyway. At least it's predictible now. --- source/blender/include/BSE_view.h | 2 ++ source/blender/src/transform.c | 45 ++++++++++++++--------------- source/blender/src/view.c | 47 +++++++++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 24 deletions(-) diff --git a/source/blender/include/BSE_view.h b/source/blender/include/BSE_view.h index 236f35f17c6..4b334fdd959 100644 --- a/source/blender/include/BSE_view.h +++ b/source/blender/include/BSE_view.h @@ -63,7 +63,9 @@ void window_to_3d(float *vec, short mx, short my); void project_short(float *vec, short *adr); void project_short_noclip(float *vec, short *adr); void project_int(float *vec, int *adr); +void project_int_noclip(float *vec, int *adr); void project_float(float *vec, float *adr); +void project_float_noclip(float *vec, float *adr); int boundbox_clip(float obmat[][4], struct BoundBox *bb); void fdrawline(float x1, float y1, float x2, float y2); diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 10035c61651..4f6c33b0a64 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -135,24 +135,23 @@ static void helpline(TransInfo *t, float *vec) getmouseco_areawin(mval); projectFloatView(t, vecrot, cent); // no overflow in extreme cases - if(cent[0]!=IS_CLIPPED) { - persp(PERSP_WIN); - - glDrawBuffer(GL_FRONT); - - BIF_ThemeColor(TH_WIRE); - - setlinestyle(3); - glBegin(GL_LINE_STRIP); - glVertex2sv(mval); - glVertex2fv(cent); - glEnd(); - setlinestyle(0); - - persp(PERSP_VIEW); - bglFlush(); // flush display for frontbuffer - glDrawBuffer(GL_BACK); - } + + persp(PERSP_WIN); + + glDrawBuffer(GL_FRONT); + + BIF_ThemeColor(TH_WIRE); + + setlinestyle(3); + glBegin(GL_LINE_STRIP); + glVertex2sv(mval); + glVertex2fv(cent); + glEnd(); + setlinestyle(0); + + persp(PERSP_VIEW); + bglFlush(); // flush display for frontbuffer + glDrawBuffer(GL_BACK); } @@ -354,8 +353,9 @@ void convertViewVec(TransInfo *t, float *vec, short dx, short dy) void projectIntView(TransInfo *t, float *vec, int *adr) { - if (t->spacetype==SPACE_VIEW3D) - project_int(vec, adr); + if (t->spacetype==SPACE_VIEW3D) { + project_int_noclip(vec, adr); + } else if(t->spacetype==SPACE_IMAGE) { float aspx, aspy, v[2]; @@ -376,8 +376,9 @@ void projectIntView(TransInfo *t, float *vec, int *adr) void projectFloatView(TransInfo *t, float *vec, float *adr) { - if (t->spacetype==SPACE_VIEW3D) - project_float(vec, adr); + if (t->spacetype==SPACE_VIEW3D) { + project_float_noclip(vec, adr); + } else if(t->spacetype==SPACE_IMAGE) { int a[2]; diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 1e45f2bf3e0..f53bcb3a9f7 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -228,6 +228,29 @@ void project_int(float *vec, int *adr) } } +void project_int_noclip(float *vec, int *adr) +{ + float fx, fy, vec4[4]; + + VECCOPY(vec4, vec); + vec4[3]= 1.0; + + Mat4MulVec4fl(G.vd->persmat, vec4); + + if( fabs(vec4[3]) > BL_NEAR_CLIP ) { + fx = (curarea->winx/2)*(1 + vec4[0]/vec4[3]); + fy = (curarea->winy/2)*(1 + vec4[1]/vec4[3]); + + adr[0] = floor(fx); + adr[1] = floor(fy); + } + else + { + adr[0] = curarea->winx / 2; + adr[1] = curarea->winy / 2; + } +} + void project_short_noclip(float *vec, short *adr) { float fx, fy, vec4[4]; @@ -264,8 +287,28 @@ void project_float(float *vec, float *adr) Mat4MulVec4fl(G.vd->persmat, vec4); if( vec4[3]>BL_NEAR_CLIP ) { - adr[0]= (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3]; - adr[1]= (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3]; + adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3]; + adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3]; + } +} + +void project_float_noclip(float *vec, float *adr) +{ + float vec4[4]; + + VECCOPY(vec4, vec); + vec4[3]= 1.0; + + Mat4MulVec4fl(G.vd->persmat, vec4); + + if( fabs(vec4[3]) > BL_NEAR_CLIP ) { + adr[0] = (curarea->winx/2.0)+(curarea->winx/2.0)*vec4[0]/vec4[3]; + adr[1] = (curarea->winy/2.0)+(curarea->winy/2.0)*vec4[1]/vec4[3]; + } + else + { + adr[0] = curarea->winx / 2.0f; + adr[1] = curarea->winy / 2.0f; } } From f2407fec559fe5853db935499b37b52c67578290 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jun 2008 18:26:34 +0000 Subject: [PATCH 199/430] Apricot feature, thats fit for trunk. Baking would split non-planer quads in an unpredictable way, which is fine for rending but game engines often use a fixed order (0,1,2), (0,2,3) or (1,2,3) (1,3,0). Added an option to use a fixed order when baking. --- source/blender/makesdna/DNA_scene_types.h | 2 +- .../render/intern/include/render_types.h | 1 + .../render/intern/source/convertblender.c | 34 +++++++++++++------ source/blender/src/buttons_scene.c | 4 +++ 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 7b1b979b777..aae8a697cbe 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -274,7 +274,7 @@ typedef struct RenderData { /* Bake Render options */ short bake_osa, bake_filter, bake_mode, bake_flag; - short bake_normal_space, bpad; + short bake_normal_space, bake_quad_split; float bake_maxdist, bake_biasdist, bake_pad; /* yafray: global panel params. TODO: move elsewhere */ diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index d7e71b3e531..8414b6aefe3 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -499,6 +499,7 @@ typedef struct LampRen { #define R_NEED_TANGENT 32 #define R_SKIP_MULTIRES 64 #define R_BAKE_TRACE 128 +#define R_BAKING 256 /* vlakren->flag (vlak = face in dutch) char!!! */ #define R_SMOOTH 1 diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index dbade68ba1d..bef3690a43a 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3935,7 +3935,7 @@ static void set_fullsample_flag(Render *re, ObjectRen *obr) } } -static void check_non_flat_quads(ObjectRen *obr) +static void check_non_flat_quads(ObjectRen *obr, int quad_flip) { VlakRen *vlr, *vlr1; VertRen *v1, *v2, *v3, *v4; @@ -3997,20 +3997,27 @@ static void check_non_flat_quads(ObjectRen *obr) xn= nor[0]*vlr->n[0] + nor[1]*vlr->n[1] + nor[2]*vlr->n[2]; if(ABS(xn) < 0.999995 ) { // checked on noisy fractal grid + float d1, d2; vlr1= RE_vlakren_copy(obr, vlr); vlr1->flag |= R_FACE_SPLIT; - /* split direction based on vnorms */ - CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, nor); - d1= nor[0]*vlr->v1->n[0] + nor[1]*vlr->v1->n[1] + nor[2]*vlr->v1->n[2]; + if (quad_flip==0) { /* nonzero quad_flip is used to force dividing one way */ + /* split direction based on vnorms */ + CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, nor); + d1= nor[0]*vlr->v1->n[0] + nor[1]*vlr->v1->n[1] + nor[2]*vlr->v1->n[2]; - CalcNormFloat(vlr->v2->co, vlr->v3->co, vlr->v4->co, nor); - d2= nor[0]*vlr->v2->n[0] + nor[1]*vlr->v2->n[1] + nor[2]*vlr->v2->n[2]; + CalcNormFloat(vlr->v2->co, vlr->v3->co, vlr->v4->co, nor); + d2= nor[0]*vlr->v2->n[0] + nor[1]*vlr->v2->n[1] + nor[2]*vlr->v2->n[2]; - if( fabs(d1) < fabs(d2) ) vlr->flag |= R_DIVIDE_24; - else vlr->flag &= ~R_DIVIDE_24; + if( fabs(d1) < fabs(d2) ) vlr->flag |= R_DIVIDE_24; + else vlr->flag &= ~R_DIVIDE_24; + } else if (quad_flip==1) { + vlr->flag &= ~R_DIVIDE_24; + } else { /* quad_flip == 3 */ + vlr->flag |= R_DIVIDE_24; + } /* new vertex pointers */ if (vlr->flag & R_DIVIDE_24) { @@ -4064,8 +4071,14 @@ static void finalize_render_object(Render *re, ObjectRen *obr, int timeoffset) ob->smoothresh= 0.0; if((re->r.mode & R_RAYTRACE) && (re->r.mode & R_SHADOW)) set_phong_threshold(obr); - - check_non_flat_quads(obr); + + if (re->flag & R_BAKING) { + /* Baking lets us define a quad split order */ + check_non_flat_quads(obr, re->r.bake_quad_split); + } else { + check_non_flat_quads(obr, 0); + } + set_fullsample_flag(re, obr); /* compute bounding boxes for clipping */ @@ -5421,6 +5434,7 @@ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) RE_init_threadcount(re); re->flag |= R_GLOB_NOPUNOFLIP; + re->flag |= R_BAKING; re->excludeob= actob; if(type == RE_BAKE_LIGHT) re->flag |= R_SKIP_MULTIRES; diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index b98a8c58102..cc26f1fc2bf 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -2150,6 +2150,10 @@ static void render_panel_bake(void) "Normalized displacement value to fit the 'Dist' range" ); } + + uiDefButS(block, MENU, B_NOP, "Quad Split Order%t|Quad Split Auto%x0|Quad Split A (0,1,2) (0,2,3)%x1|Quad Split B (1,2,3) (1,3,0)%x2", + 10,30,190,20, &G.scene->r.bake_quad_split, 0, 0, 0, 0, "Method to divide quads (use A or B for external applications that use a fixed order)"); + #if 0 uiBlockBeginAlign(block); uiDefButBitS(block, TOG, R_BAKE_OSA, B_DIFF, "OSA", 10,120,190,20, &G.scene->r.bake_flag, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)"); From 49abcc980c389914e69ec2cbc79accf58adfefd9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Jun 2008 22:07:59 +0000 Subject: [PATCH 200/430] Added shadow baking --- source/blender/python/api2_2x/sceneRender.c | 3 ++- .../blender/render/extern/include/RE_pipeline.h | 2 ++ .../render/intern/source/convertblender.c | 7 ++++++- source/blender/render/intern/source/rendercore.c | 16 ++++++++++++++-- source/blender/src/buttons_scene.c | 13 +++++++------ source/blender/src/meshtools.c | 5 +++-- 6 files changed, 34 insertions(+), 12 deletions(-) diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index bfad069f943..b446af7efd4 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -2048,7 +2048,7 @@ static int RenderData_setIValueAttrClamp( BPy_RenderData *self, PyObject *value, break; case EXPP_RENDER_ATTR_BAKEMODE: min = RE_BAKE_LIGHT; - max = RE_BAKE_DISPLACEMENT; + max = RE_BAKE_SHADOW; size = 'h'; param = &self->renderContext->bake_mode; break; @@ -3781,6 +3781,7 @@ static PyObject *M_Render_BakeModesDict( void ) PyConstant_Insert( d, "NORMALS", PyInt_FromLong( RE_BAKE_NORMALS ) ); PyConstant_Insert( d, "TEXTURE", PyInt_FromLong( RE_BAKE_TEXTURE ) ); PyConstant_Insert( d, "DISPLACEMENT", PyInt_FromLong( RE_BAKE_DISPLACEMENT ) ); + PyConstant_Insert( d, "SHADOW", PyInt_FromLong( RE_BAKE_SHADOW ) ); } return M; } diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index 66dc1dd5fef..64cf7fcb37b 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -220,6 +220,8 @@ void RE_zbuf_accumulate_vecblur(struct NodeBlurData *nbd, int xsize, int ysize, #define RE_BAKE_NORMALS 3 #define RE_BAKE_TEXTURE 4 #define RE_BAKE_DISPLACEMENT 5 +#define RE_BAKE_SHADOW 6 + void RE_Database_Baking(struct Render *re, struct Scene *scene, int type, struct Object *actob); void RE_DataBase_GetView(struct Render *re, float mat[][4]); diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index bef3690a43a..afe4c47a9a4 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -5419,6 +5419,7 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce) RE_BAKE_AO: for baking, no lamps, but all objects RE_BAKE_TEXTURE:for baking, no lamps, only selected objects RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects + RE_BAKE_SHADOW: for baking, only shadows, but all objects */ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) { @@ -5449,6 +5450,10 @@ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) re->r.mode &= ~R_RAYTRACE; } + if(!actob && (type==RE_BAKE_SHADOW)) { + re->r.mode |= R_SHADOW; + } + /* setup render stuff */ re->memArena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE); @@ -5486,7 +5491,7 @@ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) set_node_shader_lamp_loop(shade_material_loop); /* MAKE RENDER DATA */ - nolamps= !ELEM(type, RE_BAKE_LIGHT, RE_BAKE_ALL); + nolamps= !ELEM3(type, RE_BAKE_LIGHT, RE_BAKE_ALL, RE_BAKE_SHADOW); onlyselected= ELEM3(type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT); database_init_objects(re, lay, nolamps, onlyselected, actob, 0); diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index ff31ba8a6ee..dae7b0dcd88 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2017,9 +2017,12 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int quad, int ambient_occlusion_to_diffuse(shi, shr.combined); } else { + if (bs->type==RE_BAKE_SHADOW) /* Why do shadows set the color anyhow?, ignore material color for baking */ + shi->r = shi->g = shi->b = 1.0f; + shade_input_set_shade_texco(shi); - if(!ELEM(bs->type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE)) + if(!ELEM3(bs->type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_SHADOW)) shade_samples_do_AO(ssamp); if(shi->mat->nodetree && shi->mat->use_nodes) { @@ -2070,6 +2073,10 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int quad, int shr.combined[2]= shi->b; shr.alpha = shi->alpha; } + else if(bs->type==RE_BAKE_SHADOW) { + VECCOPY(shr.combined, shr.shad); + shr.alpha = shi->alpha; + } } if(bs->rect_float) { @@ -2505,7 +2512,12 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob) memset(&handles[a], 0, sizeof(BakeShade)); handles[a].ssamp.shi[0].lay= re->scene->lay; - handles[a].ssamp.shi[0].passflag= SCE_PASS_COMBINED; + + if (type==RE_BAKE_SHADOW) { + handles[a].ssamp.shi[0].passflag= SCE_PASS_SHADOW; + } else { + handles[a].ssamp.shi[0].passflag= SCE_PASS_COMBINED; + } handles[a].ssamp.shi[0].combinedflag= ~(SCE_PASS_SPEC); handles[a].ssamp.shi[0].thread= a; handles[a].ssamp.tot= 1; diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index cc26f1fc2bf..3797a92f16f 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -2152,7 +2152,7 @@ static void render_panel_bake(void) } uiDefButS(block, MENU, B_NOP, "Quad Split Order%t|Quad Split Auto%x0|Quad Split A (0,1,2) (0,2,3)%x1|Quad Split B (1,2,3) (1,3,0)%x2", - 10,30,190,20, &G.scene->r.bake_quad_split, 0, 0, 0, 0, "Method to divide quads (use A or B for external applications that use a fixed order)"); + 10,10,190,20, &G.scene->r.bake_quad_split, 0, 0, 0, 0, "Method to divide quads (use A or B for external applications that use a fixed order)"); #if 0 uiBlockBeginAlign(block); @@ -2165,14 +2165,15 @@ static void render_panel_bake(void) uiBlockBeginAlign(block); uiDefButS(block, ROW,B_REDR,"Full Render", 210,170,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_ALL, 0, 0, ""); uiDefButS(block, ROW,B_REDR,"Ambient Occlusion",210,150,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_AO, 0, 0, ""); - uiDefButS(block, ROW,B_REDR,"Normals", 210,130,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_NORMALS, 0, 0, ""); - uiDefButS(block, ROW,B_REDR,"Textures", 210,110,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_TEXTURE, 0, 0, ""); - uiDefButS(block, ROW,B_REDR,"Displacement", 210,90,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_DISPLACEMENT, 0, 0, ""); + uiDefButS(block, ROW,B_REDR,"Shadow", 210,130,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_SHADOW, 0, 0, ""); + uiDefButS(block, ROW,B_REDR,"Normals", 210,110,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_NORMALS, 0, 0, ""); + uiDefButS(block, ROW,B_REDR,"Textures", 210,90,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_TEXTURE, 0, 0, ""); + uiDefButS(block, ROW,B_REDR,"Displacement", 210,70,120,20,&G.scene->r.bake_mode, 1.0, RE_BAKE_DISPLACEMENT, 0, 0, ""); uiBlockEndAlign(block); - uiDefButBitS(block, TOG, R_BAKE_CLEAR, B_DIFF, "Clear", 210,60,120,20,&G.scene->r.bake_flag, 0.0, 0, 0, 0, "Clear Images before baking"); + uiDefButBitS(block, TOG, R_BAKE_CLEAR, B_DIFF, "Clear", 210,40,120,20,&G.scene->r.bake_flag, 0.0, 0, 0, 0, "Clear Images before baking"); - uiDefButS(block, NUM, B_DIFF,"Margin:", 210,30,120,20,&G.scene->r.bake_filter, 0.0, 32.0, 0, 0, "Amount of pixels to extend the baked result with, as post process filter"); + uiDefButS(block, NUM, B_DIFF,"Margin:", 210,10,120,20,&G.scene->r.bake_filter, 0.0, 32.0, 0, 0, "Amount of pixels to extend the baked result with, as post process filter"); } static void render_panel_simplify(void) diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index ac165d6aeb2..0f30aef04df 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -1026,7 +1026,7 @@ void objects_bake_render_menu(void) { short event; - event= pupmenu("Bake Selected Meshes %t|Full Render %x1|Ambient Occlusion %x2|Normals %x3|Texture Only %x4|Displacement %x5"); + event= pupmenu("Bake Selected Meshes %t|Full Render %x1|Ambient Occlusion %x2|Normals %x3|Texture Only %x4|Displacement %x5|Shadow %x6"); if (event < 1) return; objects_bake_render_ui(event); } @@ -1062,7 +1062,8 @@ void objects_bake_render(short event, char **error_msg) else if(event==2) event= RE_BAKE_AO; else if(event==3) event= RE_BAKE_NORMALS; else if(event==4) event= RE_BAKE_TEXTURE; - else event= RE_BAKE_DISPLACEMENT; + else if(event==5) event= RE_BAKE_DISPLACEMENT; + else event= RE_BAKE_SHADOW; if(event==RE_BAKE_AO) { if(G.scene->world==NULL) { From 6ffadbfb103f498b7400ae6d7d960c98404a9bdc Mon Sep 17 00:00:00 2001 From: Hamed Zaghaghi Date: Fri, 6 Jun 2008 01:28:51 +0000 Subject: [PATCH 201/430] fix 2dfilter problem on AMD64, Patches item #13626 --- source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index e8562c54539..80d6d55df25 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -166,7 +166,8 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) GLint uniformLoc; bgl::blUseProgramObjectARB(shaderprogram); uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); - glActiveTexture(GL_TEXTURE0); + bgl::blActiveTextureARB(GL_TEXTURE0); + //glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texname); if (uniformLoc != -1) From 14393c9ffbe67eb41281fcc50f8a0ff44e4fe0fc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jun 2008 08:58:08 +0000 Subject: [PATCH 202/430] bugfix - Blender.GetPaths() was returning relative paths from libraries, but with no way to access the library path the the file is relative too. Check for these cases and make them absolute. bpath also assigned one var it didnt need to. --- source/blender/blenlib/intern/bpath.c | 3 --- source/blender/python/api2_2x/Blender.c | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 79d3e487712..898ad6ddd67 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -456,13 +456,10 @@ void checkMissingFiles( char *txtname ) { /* be sure there is low chance of the path being too short */ char filepath_expanded[FILE_MAXDIR*2]; - char *libpath; int files_missing = 0; BLI_bpathIterator_init(&bpi); while (!BLI_bpathIterator_isDone(&bpi)) { - libpath = BLI_bpathIterator_getLib(&bpi); - BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); if (!BLI_exists(filepath_expanded)) { diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index 6b2e00f27de..d8385c1d660 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -936,6 +936,7 @@ static PyObject *Blender_GetPaths( PyObject * self, PyObject *args, PyObject *ke PyObject *list = PyList_New(0), *st; /* stupidly big string to be safe */ /* be sure there is low chance of the path being too short */ char filepath_expanded[FILE_MAXDIR*2]; + char *lib; int absolute = 0; static char *kwlist[] = {"absolute", NULL}; @@ -952,7 +953,12 @@ static PyObject *Blender_GetPaths( PyObject * self, PyObject *args, PyObject *ke if (absolute) { BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); } else { - BLI_bpathIterator_getPath( &bpi, filepath_expanded ); + lib = BLI_bpathIterator_getLib( &bpi ); + if ( lib && ( strcmp(lib, G.sce) ) ) { /* relative path to the library is NOT the same as our blendfile path, return an absolute path */ + BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); + } else { + BLI_bpathIterator_getPath( &bpi, filepath_expanded ); + } } st = PyString_FromString(filepath_expanded); From b62955cf3ea9a5e0f47ee93291820e5b60870b4b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jun 2008 11:00:32 +0000 Subject: [PATCH 203/430] bugfix, memory leaks when getting particles and particle system loc/size/rot/life (Just remember PyList_Append adds a reference! :) ) --- source/blender/python/api2_2x/Object.c | 2 ++ source/blender/python/api2_2x/Particle.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 3db9664d47d..45cce46d389 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -1056,10 +1056,12 @@ PyObject *Object_getParticleSys( BPy_Object * self ){ /* fixme: for(;;) */ current = ParticleSys_CreatePyObject( blparticlesys, ob ); PyList_Append(partsyslist,current); + Py_DECREF(current); while((blparticlesys = blparticlesys->next)){ current = ParticleSys_CreatePyObject( blparticlesys, ob ); PyList_Append(partsyslist,current); + Py_DECREF(current); } return partsyslist; diff --git a/source/blender/python/api2_2x/Particle.c b/source/blender/python/api2_2x/Particle.c index f0a32db0623..95de9757b87 100644 --- a/source/blender/python/api2_2x/Particle.c +++ b/source/blender/python/api2_2x/Particle.c @@ -854,7 +854,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } - + Py_DECREF(loc); /* PyList_Append increfs */ path++; } @@ -864,6 +864,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } + Py_DECREF(seglist); /* PyList_Append increfs */ } cache=psys->childcache; @@ -885,7 +886,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } - + Py_DECREF(loc);/* PyList_Append increfs */ path++; } @@ -895,6 +896,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } + Py_DECREF(seglist); /* PyList_Append increfs */ } } else { @@ -933,6 +935,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } + Py_DECREF(loc);/* PyList_Append increfs */ } else { if ( all ){ @@ -941,6 +944,7 @@ static PyObject *Part_GetLoc( BPy_PartSys * self, PyObject * args ){ return EXPP_ReturnPyObjError( PyExc_RuntimeError, "Couldn't append item to PyList" ); } + Py_DECREF(Py_None); /* PyList_Append increfs */ } } } @@ -985,6 +989,7 @@ static PyObject *Part_GetRot( BPy_PartSys * self, PyObject * args ){ if(psys_get_particle_state(ob,psys,i,&state,0)==0){ if ( all ){ PyList_Append(partlist,Py_None); + Py_DECREF(Py_None); /* PyList_Append increfs */ continue; } else { continue; @@ -1001,6 +1006,7 @@ static PyObject *Part_GetRot( BPy_PartSys * self, PyObject * args ){ if (id) PyTuple_SetItem(loc,4,PyInt_FromLong(i)); PyList_Append(partlist,loc); + Py_DECREF(loc); /* PyList_Append increfs */ } } return partlist; @@ -1060,9 +1066,11 @@ static PyObject *Part_GetSize( BPy_PartSys * self, PyObject * args ){ PyTuple_SetItem(tuple,0,PyFloat_FromDouble((double)size)); PyTuple_SetItem(tuple,1,PyInt_FromLong(i)); PyList_Append(partlist,tuple); + Py_DECREF(tuple); } else { siz = PyFloat_FromDouble((double)size); PyList_Append(partlist,siz); + Py_DECREF(siz); } } } @@ -1125,9 +1133,11 @@ static PyObject *Part_GetAge( BPy_PartSys * self, PyObject * args ){ PyTuple_SetItem(tuple,0,PyFloat_FromDouble((double)life)); PyTuple_SetItem(tuple,1,PyInt_FromLong(i)); PyList_Append(partlist,tuple); + Py_DECREF(tuple); } else { lif = PyFloat_FromDouble((double)life); PyList_Append(partlist,lif); + Py_DECREF(lif); } } } From cdd461f4889da5abcfb6e1cfa1e28c4d77970cb1 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 7 Jun 2008 15:06:00 +0000 Subject: [PATCH 204/430] March 22 commit from Campbell to allow Lasso select in Compositor with CTRL+LMB disabled the recently before added option to make a Viewer connected to a node using same hotkey. Now both work! --- source/blender/src/editnode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/blender/src/editnode.c b/source/blender/src/editnode.c index 9057556b796..4c7334c55e0 100644 --- a/source/blender/src/editnode.c +++ b/source/blender/src/editnode.c @@ -2382,14 +2382,14 @@ void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt) } else { - if(G.qual & LR_CTRLKEY) { - gesture(); - } else { - if(node_add_link(snode)==0) - if(node_mouse_groupheader(snode)==0) - if(node_mouse_select(snode, event)==0) - node_border_link_delete(snode); - } + if(G.qual & LR_CTRLKEY) + if(gesture()) + break; + + if(node_add_link(snode)==0) + if(node_mouse_groupheader(snode)==0) + if(node_mouse_select(snode, event)==0) + node_border_link_delete(snode); } break; From 12461cde17dcd3803e2578b1b72edd1ce0951698 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 7 Jun 2008 18:16:23 +0000 Subject: [PATCH 205/430] error in customdata editmesh function, was using the active index when it should use the first index, not a big deal since CustomData_em_get_n isnt used in trunk yet. --- source/blender/blenkernel/intern/customdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 3644a50b799..77068d8ed66 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1278,7 +1278,7 @@ void *CustomData_em_get_n(const CustomData *data, void *block, int type, int n) int layer_index; /* get the layer index of the first layer of type */ - layer_index = CustomData_get_active_layer_index(data, type); + layer_index = CustomData_get_layer_index(data, type); if(layer_index < 0) return NULL; return (char *)block + data->layers[layer_index+n].offset; From a2192ffa0910b28054625bc062d85e44660491a1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 7 Jun 2008 22:44:18 +0000 Subject: [PATCH 206/430] made the quad split-direction options force splitting since planer quads with UV distortion would get very different results depending on the split direction. --- .../render/intern/source/convertblender.c | 83 ++++++++++++++----- 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index afe4c47a9a4..89a0a5ba7cb 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3935,7 +3935,58 @@ static void set_fullsample_flag(Render *re, ObjectRen *obr) } } -static void check_non_flat_quads(ObjectRen *obr, int quad_flip) +/* split quads for pradictable baking + * dir 1 == (0,1,2) (0,2,3), 2 == (1,3,0) (1,2,3) + */ +static void split_quads(ObjectRen *obr, int dir) +{ + VlakRen *vlr, *vlr1; + int a; + + for(a=obr->totvlak-1; a>=0; a--) { + vlr= RE_findOrAddVlak(obr, a); + + /* test if rendering as a quad or triangle, skip wire */ + if(vlr->v4 && (vlr->flag & R_STRAND)==0 && (vlr->mat->mode & MA_WIRE)==0) { + + if(vlr->v4) { + + vlr1= RE_vlakren_copy(obr, vlr); + vlr1->flag |= R_FACE_SPLIT; + + if( dir==2 ) vlr->flag |= R_DIVIDE_24; + else vlr->flag &= ~R_DIVIDE_24; + + /* new vertex pointers */ + if (vlr->flag & R_DIVIDE_24) { + vlr1->v1= vlr->v2; + vlr1->v2= vlr->v3; + vlr1->v3= vlr->v4; + + vlr->v3 = vlr->v4; + + vlr1->flag |= R_DIVIDE_24; + } + else { + vlr1->v1= vlr->v1; + vlr1->v2= vlr->v3; + vlr1->v3= vlr->v4; + + vlr1->flag &= ~R_DIVIDE_24; + } + vlr->v4 = vlr1->v4 = NULL; + + /* new normals */ + CalcNormFloat(vlr->v3->co, vlr->v2->co, vlr->v1->co, vlr->n); + CalcNormFloat(vlr1->v3->co, vlr1->v2->co, vlr1->v1->co, vlr1->n); + } + /* clear the flag when not divided */ + else vlr->flag &= ~R_DIVIDE_24; + } + } +} + +static void check_non_flat_quads(ObjectRen *obr) { VlakRen *vlr, *vlr1; VertRen *v1, *v2, *v3, *v4; @@ -4003,22 +4054,16 @@ static void check_non_flat_quads(ObjectRen *obr, int quad_flip) vlr1= RE_vlakren_copy(obr, vlr); vlr1->flag |= R_FACE_SPLIT; - if (quad_flip==0) { /* nonzero quad_flip is used to force dividing one way */ - /* split direction based on vnorms */ - CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, nor); - d1= nor[0]*vlr->v1->n[0] + nor[1]*vlr->v1->n[1] + nor[2]*vlr->v1->n[2]; + /* split direction based on vnorms */ + CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, nor); + d1= nor[0]*vlr->v1->n[0] + nor[1]*vlr->v1->n[1] + nor[2]*vlr->v1->n[2]; + + CalcNormFloat(vlr->v2->co, vlr->v3->co, vlr->v4->co, nor); + d2= nor[0]*vlr->v2->n[0] + nor[1]*vlr->v2->n[1] + nor[2]*vlr->v2->n[2]; + + if( fabs(d1) < fabs(d2) ) vlr->flag |= R_DIVIDE_24; + else vlr->flag &= ~R_DIVIDE_24; - CalcNormFloat(vlr->v2->co, vlr->v3->co, vlr->v4->co, nor); - d2= nor[0]*vlr->v2->n[0] + nor[1]*vlr->v2->n[1] + nor[2]*vlr->v2->n[2]; - - if( fabs(d1) < fabs(d2) ) vlr->flag |= R_DIVIDE_24; - else vlr->flag &= ~R_DIVIDE_24; - } else if (quad_flip==1) { - vlr->flag &= ~R_DIVIDE_24; - } else { /* quad_flip == 3 */ - vlr->flag |= R_DIVIDE_24; - } - /* new vertex pointers */ if (vlr->flag & R_DIVIDE_24) { vlr1->v1= vlr->v2; @@ -4072,11 +4117,11 @@ static void finalize_render_object(Render *re, ObjectRen *obr, int timeoffset) if((re->r.mode & R_RAYTRACE) && (re->r.mode & R_SHADOW)) set_phong_threshold(obr); - if (re->flag & R_BAKING) { + if (re->flag & R_BAKING && re->r.bake_quad_split != 0) { /* Baking lets us define a quad split order */ - check_non_flat_quads(obr, re->r.bake_quad_split); + split_quads(obr, re->r.bake_quad_split); } else { - check_non_flat_quads(obr, 0); + check_non_flat_quads(obr); } set_fullsample_flag(re, obr); From 96808303c0caea5e89aa85917a1e574e91fa7d7b Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 8 Jun 2008 02:59:14 +0000 Subject: [PATCH 207/430] Fix for incorrect tooltip (provided by JMS va bf-committers) --- source/blender/src/buttons_editing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 1365baf075a..6250b69345b 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -4369,7 +4369,7 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm) /* bone types */ uiDefButBitI(block, TOG, BONE_HINGE, B_ARM_RECALCDATA, "Hinge", -10,by-38,80,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit rotation or scale from parent Bone"); - uiDefButBitI(block, TOG, BONE_NO_SCALE, B_ARM_RECALCDATA, "S", 70,by-38,20,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit rotation or scale from parent Bone"); + uiDefButBitI(block, TOG, BONE_NO_SCALE, B_ARM_RECALCDATA, "S", 70,by-38,20,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit scale from parent Bone"); uiDefButBitI(block, TOGN, BONE_NO_DEFORM, B_ARM_RECALCDATA, "Deform", 90, by-38, 80, 18, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone deforms geometry"); uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Mult", 170,by-38,80,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Multiply Bone Envelope with VertexGroup"); uiDefButBitI(block, TOG, BONE_HIDDEN_A, REDRAWVIEW3D, "Hide", 250,by-38,80,18, &curBone->flag, 0, 0, 0, 0, "Toggles display of this bone in Edit Mode"); From 7e095fa695247996a678504bcace0c1d5ab00db2 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 8 Jun 2008 03:39:24 +0000 Subject: [PATCH 208/430] Another minor typo fix in button naming --- source/blender/src/buttons_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index fb36d103656..52261f7d3fb 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4044,7 +4044,7 @@ static void object_softbodies(Object *ob) uiDefButS(block, NUM, B_BAKE_CACHE_CHANGE, "Aero:", 30,10,60,20, &sb->aeroedge, 0.00, 30000.0, 10, 0, "Make edges 'sail'"); uiDefButS(block, NUM, B_BAKE_CACHE_CHANGE, "Plas:", 90,10,60,20, &sb->plastic, 0.0, 100.0, 10, 0, "Permanent deform"); if(ob->type==OB_MESH) { - uiDefButF(block, NUM, B_BAKE_CACHE_CHANGE, "Be:", 150,10,80,20, &sb->secondspring, 0.0, 10.0, 10, 0, "Bendig Stiffness"); + uiDefButF(block, NUM, B_BAKE_CACHE_CHANGE, "Be:", 150,10,80,20, &sb->secondspring, 0.0, 10.0, 10, 0, "Bending Stiffness"); if (*softflag & OB_SB_QUADS){ uiDefButF(block, NUM, B_BAKE_CACHE_CHANGE, "Sh:", 230,10,80,20, &sb->shearstiff, 0.0, 1.0, 10, 0, "Shear Stiffness"); } From 08f9bcf8ece2ded4cc95a3c5b982c316e72da865 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 8 Jun 2008 09:35:05 +0000 Subject: [PATCH 209/430] Bugfix #13649: Segmentation fault when deleting object When the IPO editor was pinned, and the active object was changed, deleting the active object would cause a crash. --- source/blender/src/drawipo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 552e87a57d1..0e7476bbe82 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -1712,7 +1712,7 @@ static void boundbox_ipo_curves(SpaceIpo *si) /* is used for both read and write... */ static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float max) { - Object *ob= OBACT; + Object *ob; EditIpo *ei; BezTriple *bezt; float median[3]; @@ -1721,6 +1721,12 @@ static void ipo_editvertex_buts(uiBlock *block, SpaceIpo *si, float min, float m median[0]= median[1]= median[2]= 0.0; tot= 0; + /* use G.sipo->from (which should be an object) so that pinning ipo's will still work ok */ + if((G.sipo->from) && (GS(G.sipo->from->name) == ID_OB)) + ob= (Object *)(G.sipo->from); + else + ob= OBACT; + ei= G.sipo->editipo; for(a=0; atotipo; a++, ei++) { From cee9c7a8faddb2b73b985e7d0911cc8a2aa679db Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 8 Jun 2008 10:46:30 +0000 Subject: [PATCH 210/430] Bugfix #13667: Outliner doesn't update when changing Parent in Transform Properties There was a missing refresh call for the Outliner. --- source/blender/src/drawview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index e83ecb13960..deb7ddc068d 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -2154,6 +2154,7 @@ void do_viewbuts(unsigned short event) } allqueue(REDRAWVIEW3D, 1); allqueue(REDRAWBUTSOBJECT, 0); + allqueue(REDRAWOOPS, 0); } break; From 71573cbd55a9088f4f3011da473ad6101fc2b531 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 8 Jun 2008 10:48:37 +0000 Subject: [PATCH 211/430] Bugfix #13666: Missing #include in source/gameengine/Ketsji/KX_RayCast.cpp --- source/gameengine/Ketsji/KX_RayCast.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp index ce7ed984985..b88741625b6 100644 --- a/source/gameengine/Ketsji/KX_RayCast.cpp +++ b/source/gameengine/Ketsji/KX_RayCast.cpp @@ -29,6 +29,7 @@ */ #include +#include #include "KX_RayCast.h" From 062fb01614be23623fc9ebedc1ca1307ceb9a1bf Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 8 Jun 2008 19:35:20 +0000 Subject: [PATCH 212/430] soc-2008-mxcurioni: now supports current scene drawing (instead of fixed scene object), still with fixed style and fixed camera. Initialization is properly handled, which limits memory problems and speed-ups subsequent rendering. The viewing ratio should be correct now too. I also removed linking references to former lib3ds library path (caused some linking problems). --- config/darwin-config.py | 1 - config/linux2-config.py | 1 - config/linuxcross-config.py | 1 - config/openbsd3-config.py | 1 - config/sunos5-config.py | 1 - config/win32-mingw-config.py | 1 - config/win32-vc-config.py | 1 - source/blender/freestyle/SConscript | 10 +- .../freestyle/intern/app_blender/api.cpp | 53 +- .../intern/app_blender/test_config.h | 8 +- .../freestyle/intern/swig/ModuleWrapper.cpp | 16629 ++++++++-------- .../freestyle/intern/swig/ModuleWrapper.h | 36 +- source/blender/freestyle/python/3ds_export.py | 1010 + source/blender/freestyle/python/Freestyle.py | 22 +- tools/Blender.py | 3 - tools/btools.py | 5 +- 16 files changed, 8874 insertions(+), 8909 deletions(-) create mode 100644 source/blender/freestyle/python/3ds_export.py diff --git a/config/darwin-config.py b/config/darwin-config.py index 115123f9984..4c3b5d19e36 100644 --- a/config/darwin-config.py +++ b/config/darwin-config.py @@ -167,7 +167,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' # WITH_BF_OPENEXR = 'true' diff --git a/config/linux2-config.py b/config/linux2-config.py index f59dcf266ee..965b5935886 100644 --- a/config/linux2-config.py +++ b/config/linux2-config.py @@ -93,7 +93,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py index 603f6a1a880..c695e0e04e3 100644 --- a/config/linuxcross-config.py +++ b/config/linuxcross-config.py @@ -13,7 +13,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' ########################### diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py index 9a4c0d6f34e..6b8d30f8bca 100644 --- a/config/openbsd3-config.py +++ b/config/openbsd3-config.py @@ -87,7 +87,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' diff --git a/config/sunos5-config.py b/config/sunos5-config.py index cccc380f60c..36ed610da3f 100644 --- a/config/sunos5-config.py +++ b/config/sunos5-config.py @@ -89,7 +89,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py index 9757c0264b5..a0e85a07548 100644 --- a/config/win32-mingw-config.py +++ b/config/win32-mingw-config.py @@ -104,7 +104,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py index 8e7d6c56c13..8eace13c807 100644 --- a/config/win32-vc-config.py +++ b/config/win32-vc-config.py @@ -115,7 +115,6 @@ BF_SWIG = '${BF_FREESTYLE}/swig' BF_SWIG_LIB = 'extern_swig' BF_LIB3DS = '${BF_FREESTYLE}/lib3ds' BF_LIB3DS_LIB = 'extern_lib3ds' -BF_LIB3DS_LIBPATH = '${BF_LIB3DS}/lib3ds/.libs' BF_LIB3DS_INC = '${BF_LIB3DS}' #WITH_BF_NSPR = 'true' diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index c9a77919f4f..656cecb4e75 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -74,13 +74,21 @@ env.BlenderLib (libname="bf_freestyle", ######################################################## # swig # -# 1] Run the following two commands in the source/blender/freestyle/intern/swig directory. +# 1] Run the following three commands in the source/blender/freestyle/intern/swig directory. # # 2] Replace /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/lib to the path # of your library directory (used to locate libbf_freestyle.a) # # 3] Replace the python directories to suit your config +# export SWIG_LIB=/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/extern/freestyle/swig/Lib + +# cd /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/intern/swig + +# /Users/mx/Documents/work/GSoC_2008/bf-blender/branches/build/darwin/bin/swig -c++ -python -o ModuleWrapper.cpp Freestyle.i + +# mv ./Freestyle.py ../../python/ + # g++ -w -I../geometry -I../image -I../scene_graph -I../stroke -I../system -I../view_map -I../winged_edge -I/usr/include/python2.5 -I../../../blenlib -I../../../blenkernel -I../../../imbuf -I../../../makesdna -c ModuleWrapper.cpp -o ModuleWrapper.o ########### Mac OS X ########### diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index a021e30a6e5..c097b64ef53 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -11,10 +11,11 @@ extern "C" { #endif #include "render_types.h" -//#include "renderdatabase.h" -/* display_draw() needs render layer info */ #include "renderpipeline.h" +#include "BLI_blenlib.h" +#include "BPY_extern.h" + #ifdef __cplusplus } #endif @@ -25,26 +26,50 @@ using namespace std; extern "C" { #endif - void FRS_execute(Render* re) { - cout << "Freestyle start" << endl; - + static Controller *controller = NULL; + static AppGLWidget *view = NULL; + + void FRS_initialize(){ Config::Path pathconfig; - Controller *c = new Controller; - AppGLWidget *view = new AppGLWidget; - c->SetView(view); + if( controller == NULL ) + controller = new Controller; + + if( view == NULL ) + view = new AppGLWidget; + } + + void FRS_execute(Render* re) { + + FRS_initialize(); + + controller->SetView(view); unsigned int width = re->winx; unsigned int height = re->winy; view->setWidth(width); view->setHeight(height); + view->_camera->setScreenWidthAndHeight(width, height); + //view->setCameraState(const float* position, const float* orientation) - c->Load3DSFile( TEST_3DS_FILE ); + BPY_run_python_script( TEST_3DS_EXPORT ); - c->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); - c->toggleLayer(0, true); - c->ComputeViewMap(); + char btempdir[255]; + BLI_where_is_temp(btempdir,1); + string exported_3ds_file = btempdir; + exported_3ds_file += "/tmp_scene_freestyle.3ds"; + if( BLI_exists( const_cast(exported_3ds_file.c_str()) ) ) { + controller->Load3DSFile( exported_3ds_file.c_str() ); + } + else { + cout << "Cannot find" << exported_3ds_file << endl; + return; + } - c->DrawStrokes(); // build strokes + controller->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); + controller->toggleLayer(0, true); + controller->ComputeViewMap(); + + controller->DrawStrokes(); // build strokes view->draw(); // render final result RenderResult rres; @@ -52,8 +77,6 @@ extern "C" { view->readPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); re->result->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); - - cout << "Freestyle end" << endl; } diff --git a/source/blender/freestyle/intern/app_blender/test_config.h b/source/blender/freestyle/intern/app_blender/test_config.h index 6507050a4e4..c2337c0ba4c 100644 --- a/source/blender/freestyle/intern/app_blender/test_config.h +++ b/source/blender/freestyle/intern/app_blender/test_config.h @@ -1,8 +1,10 @@ - -#define TEST_3DS_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/models/teapot.3DS" - #define TEST_STYLE_MODULE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" #define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" #define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg" + + + + +#define TEST_3DS_EXPORT "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/python/3ds_export.py" diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index 36bd39b2b15..94662595bd9 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.31 + * Version 1.3.35 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -13,7 +13,7 @@ #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus -template class SwigValueWrapper { +template class SwigValueWrapper { T *tt; public: SwigValueWrapper() : tt(0) { } @@ -26,6 +26,10 @@ public: private: SwigValueWrapper& operator=(const SwigValueWrapper& rhs); }; + +template T SwigValueInit() { + return T(); +} #endif /* ----------------------------------------------------------------------------- @@ -35,14 +39,14 @@ private: /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) -# if (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -125,6 +129,12 @@ private: # define _CRT_SECURE_NO_DEPRECATE #endif +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + /* Python.h has to appear first */ #include @@ -138,7 +148,7 @@ private: /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "3" +#define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE @@ -173,6 +183,7 @@ private: /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -313,10 +324,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { extern "C" { #endif -typedef void *(*swig_converter_func)(void *); +typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); -/* Structure to store inforomation on one type */ +/* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ @@ -361,7 +372,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } - return (l1 - f1) - (l2 - f2); + return (int)((l1 - f1) - (l2 - f2)); } /* @@ -443,8 +454,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* @@ -868,7 +879,7 @@ SWIG_Python_AddErrorMsg(const char* mesg) Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_SetString(PyExc_RuntimeError, mesg); } } @@ -1108,14 +1119,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { /* Unpack the argument tuple */ SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), min); + name, (min == max ? "" : "at least "), (int)min); return 0; } } @@ -1123,14 +1134,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyOb PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { - register int l = PyTuple_GET_SIZE(args); + register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), min, l); + name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), max, l); + name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; @@ -1428,7 +1439,7 @@ PySwigObject_dealloc(PyObject *v) { PySwigObject *sobj = (PySwigObject *) v; PyObject *next = sobj->next; - if (sobj->own) { + if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; @@ -1446,12 +1457,13 @@ PySwigObject_dealloc(PyObject *v) res = ((*meth)(mself, v)); } Py_XDECREF(res); - } else { - const char *name = SWIG_TypePrettyName(ty); + } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); -#endif + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } +#endif } Py_XDECREF(next); PyObject_DEL(v); @@ -1609,9 +1621,11 @@ _PySwigObject_type(void) { (unaryfunc)0, /*nb_float*/ (unaryfunc)PySwigObject_oct, /*nb_oct*/ (unaryfunc)PySwigObject_hex, /*nb_hex*/ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 +#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1954,7 +1968,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own) { + if (own == SWIG_POINTER_OWN) { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; @@ -1975,6 +1989,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int return SWIG_OK; } else { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { @@ -1988,7 +2004,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int if (!tc) { sobj = (PySwigObject *)sobj->next; } else { - if (ptr) *ptr = SWIG_TypeCast(tc,vptr); + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } break; } } @@ -1998,7 +2022,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } if (sobj) { - if (own) *own = sobj->own; + if (own) + *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } @@ -2063,8 +2088,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { } if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (!tc) return SWIG_ERROR; - *ptr = SWIG_TypeCast(tc,vptr); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } } else { *ptr = vptr; } @@ -2680,6 +2710,7 @@ namespace Swig { swig_msg += msg; } if (!PyErr_Occurred()) { + swig_msg.insert(0, ": "); PyErr_SetString(error, getMessage()); } else { SWIG_Python_AddErrorMsg(getMessage()); @@ -2774,7 +2805,7 @@ namespace Swig { class DirectorMethodException : public Swig::DirectorException { public: DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director method error", msg) + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) { } @@ -2807,33 +2838,21 @@ namespace Swig { # endif #endif -/* simple thread abstraction for pthreads on win32 */ #ifdef __THREAD__ -# define __PTHREAD__ -# if defined(_WIN32) || defined(__WIN32__) -# define pthread_mutex_lock EnterCriticalSection -# define pthread_mutex_unlock LeaveCriticalSection -# define pthread_mutex_t CRITICAL_SECTION -# define SWIG_MUTEX_INIT(var) var -# else -# include -# define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER -# endif -#endif - -#ifdef __PTHREAD__ - struct Guard +# include "pythread.h" + class Guard { - pthread_mutex_t *_mutex; + PyThread_type_lock & mutex_; - Guard(pthread_mutex_t &mutex) : _mutex(&mutex) + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) { - pthread_mutex_lock(_mutex); + PyThread_acquire_lock(mutex_, WAIT_LOCK); } ~Guard() { - pthread_mutex_unlock(_mutex); + PyThread_release_lock(mutex_); } }; # define SWIG_GUARD(mutex) Guard _guard(mutex) @@ -2904,8 +2923,8 @@ namespace Swig { private: typedef std::map ownership_map; mutable ownership_map owner; -#ifdef __PTHREAD__ - static pthread_mutex_t swig_mutex_own; +#ifdef __THREAD__ + static PyThread_type_lock swig_mutex_own; #endif public: @@ -2950,8 +2969,8 @@ namespace Swig { } }; -#ifdef __PTHREAD__ - pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_own); +#ifdef __THREAD__ + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); #endif } @@ -2963,7 +2982,7 @@ namespace Swig { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_AdjacencyIterator swig_types[0] -#define SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t swig_types[1] +#define SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t swig_types[1] #define SWIGTYPE_p_BinaryPredicate0D swig_types[2] #define SWIGTYPE_p_BinaryPredicate1D swig_types[3] #define SWIGTYPE_p_CalligraphicShader swig_types[4] @@ -3114,56 +3133,56 @@ namespace Swig { #define SWIGTYPE_p_StrokesContainer swig_types[149] #define SWIGTYPE_p_StyleModule swig_types[150] #define SWIGTYPE_p_TVertex swig_types[151] -#define SWIGTYPE_p_UnaryFunction0DTId_t swig_types[152] -#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t swig_types[153] -#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t swig_types[154] -#define SWIGTYPE_p_UnaryFunction0DTViewShape_p_t swig_types[155] -#define SWIGTYPE_p_UnaryFunction0DTdouble_t swig_types[156] -#define SWIGTYPE_p_UnaryFunction0DTfloat_t swig_types[157] -#define SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[158] -#define SWIGTYPE_p_UnaryFunction0DTunsigned_int_t swig_types[159] -#define SWIGTYPE_p_UnaryFunction0DTvoid_t swig_types[160] -#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t swig_types[161] -#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t swig_types[162] -#define SWIGTYPE_p_UnaryFunction1DTdouble_t swig_types[163] -#define SWIGTYPE_p_UnaryFunction1DTfloat_t swig_types[164] -#define SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[165] -#define SWIGTYPE_p_UnaryFunction1DTunsigned_int_t swig_types[166] -#define SWIGTYPE_p_UnaryFunction1DTvoid_t swig_types[167] +#define SWIGTYPE_p_UnaryFunction0DT_Id_t swig_types[152] +#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t swig_types[153] +#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t swig_types[154] +#define SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t swig_types[155] +#define SWIGTYPE_p_UnaryFunction0DT_double_t swig_types[156] +#define SWIGTYPE_p_UnaryFunction0DT_float_t swig_types[157] +#define SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[158] +#define SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t swig_types[159] +#define SWIGTYPE_p_UnaryFunction0DT_void_t swig_types[160] +#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t swig_types[161] +#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t swig_types[162] +#define SWIGTYPE_p_UnaryFunction1DT_double_t swig_types[163] +#define SWIGTYPE_p_UnaryFunction1DT_float_t swig_types[164] +#define SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[165] +#define SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t swig_types[166] +#define SWIGTYPE_p_UnaryFunction1DT_void_t swig_types[167] #define SWIGTYPE_p_UnaryPredicate0D swig_types[168] #define SWIGTYPE_p_UnaryPredicate1D swig_types[169] -#define SWIGTYPE_p_VecMat__HVec3Tdouble_t swig_types[170] -#define SWIGTYPE_p_VecMat__HVec3Tfloat_t swig_types[171] -#define SWIGTYPE_p_VecMat__HVec3Tint_t swig_types[172] -#define SWIGTYPE_p_VecMat__HVec3Tunsigned_int_t swig_types[173] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_2_t swig_types[174] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_3_t swig_types[175] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_4_t swig_types[176] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_2_t swig_types[177] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_3_t swig_types[178] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_4_t swig_types[179] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_2_t swig_types[180] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_3_t swig_types[181] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_4_t swig_types[182] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_2_t swig_types[183] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_3_t swig_types[184] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_4_t swig_types[185] -#define SWIGTYPE_p_VecMat__Vec2Tdouble_t swig_types[186] -#define SWIGTYPE_p_VecMat__Vec2Tfloat_t swig_types[187] -#define SWIGTYPE_p_VecMat__Vec2Tint_t swig_types[188] -#define SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t swig_types[189] -#define SWIGTYPE_p_VecMat__Vec3Tdouble_t swig_types[190] -#define SWIGTYPE_p_VecMat__Vec3Tfloat_t swig_types[191] -#define SWIGTYPE_p_VecMat__Vec3Tint_t swig_types[192] -#define SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t swig_types[193] -#define SWIGTYPE_p_VecMat__VecTdouble_2_t swig_types[194] -#define SWIGTYPE_p_VecMat__VecTdouble_3_t swig_types[195] -#define SWIGTYPE_p_VecMat__VecTfloat_2_t swig_types[196] -#define SWIGTYPE_p_VecMat__VecTfloat_3_t swig_types[197] -#define SWIGTYPE_p_VecMat__VecTint_2_t swig_types[198] -#define SWIGTYPE_p_VecMat__VecTint_3_t swig_types[199] -#define SWIGTYPE_p_VecMat__VecTunsigned_int_2_t swig_types[200] -#define SWIGTYPE_p_VecMat__VecTunsigned_int_3_t swig_types[201] +#define SWIGTYPE_p_VecMat__HVec3T_double_t swig_types[170] +#define SWIGTYPE_p_VecMat__HVec3T_float_t swig_types[171] +#define SWIGTYPE_p_VecMat__HVec3T_int_t swig_types[172] +#define SWIGTYPE_p_VecMat__HVec3T_unsigned_int_t swig_types[173] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_2_t swig_types[174] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_3_t swig_types[175] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_4_t swig_types[176] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_2_t swig_types[177] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_3_t swig_types[178] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_4_t swig_types[179] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_2_t swig_types[180] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_3_t swig_types[181] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_4_t swig_types[182] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_2_t swig_types[183] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_3_t swig_types[184] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_4_t swig_types[185] +#define SWIGTYPE_p_VecMat__Vec2T_double_t swig_types[186] +#define SWIGTYPE_p_VecMat__Vec2T_float_t swig_types[187] +#define SWIGTYPE_p_VecMat__Vec2T_int_t swig_types[188] +#define SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t swig_types[189] +#define SWIGTYPE_p_VecMat__Vec3T_double_t swig_types[190] +#define SWIGTYPE_p_VecMat__Vec3T_float_t swig_types[191] +#define SWIGTYPE_p_VecMat__Vec3T_int_t swig_types[192] +#define SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t swig_types[193] +#define SWIGTYPE_p_VecMat__VecT_double_2_t swig_types[194] +#define SWIGTYPE_p_VecMat__VecT_double_3_t swig_types[195] +#define SWIGTYPE_p_VecMat__VecT_float_2_t swig_types[196] +#define SWIGTYPE_p_VecMat__VecT_float_3_t swig_types[197] +#define SWIGTYPE_p_VecMat__VecT_int_2_t swig_types[198] +#define SWIGTYPE_p_VecMat__VecT_int_3_t swig_types[199] +#define SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t swig_types[200] +#define SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t swig_types[201] #define SWIGTYPE_p_Vertex swig_types[202] #define SWIGTYPE_p_ViewEdge swig_types[203] #define SWIGTYPE_p_ViewEdgeInternal__SVertexIterator swig_types[204] @@ -3171,8 +3190,8 @@ namespace Swig { #define SWIGTYPE_p_ViewMap swig_types[206] #define SWIGTYPE_p_ViewShape swig_types[207] #define SWIGTYPE_p_ViewVertex swig_types[208] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t swig_types[209] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t swig_types[210] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t swig_types[209] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t swig_types[210] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator swig_types[211] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator swig_types[212] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator swig_types[213] @@ -3192,59 +3211,61 @@ namespace Swig { #define SWIGTYPE_p_fedge_iterator swig_types[227] #define SWIGTYPE_p_fedges_container swig_types[228] #define SWIGTYPE_p_float swig_types[229] -#define SWIGTYPE_p_id_type swig_types[230] -#define SWIGTYPE_p_int swig_types[231] -#define SWIGTYPE_p_ltstr swig_types[232] -#define SWIGTYPE_p_mapsMap swig_types[233] -#define SWIGTYPE_p_occluder_container__const_iterator swig_types[234] -#define SWIGTYPE_p_p_PyObject swig_types[235] -#define SWIGTYPE_p_point_iterator swig_types[236] -#define SWIGTYPE_p_point_type swig_types[237] -#define SWIGTYPE_p_reference swig_types[238] -#define SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t swig_types[239] -#define SWIGTYPE_p_size_type swig_types[240] -#define SWIGTYPE_p_std__invalid_argument swig_types[241] -#define SWIGTYPE_p_std__pairTViewEdge_p_bool_t swig_types[242] -#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t swig_types[243] -#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type swig_types[244] -#define SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t swig_types[245] -#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t swig_types[246] -#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type swig_types[247] -#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t swig_types[248] -#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type swig_types[249] -#define SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t swig_types[250] -#define SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t swig_types[251] -#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t swig_types[252] -#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type swig_types[253] -#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t swig_types[254] -#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type swig_types[255] -#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t swig_types[256] -#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type swig_types[257] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[258] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[259] -#define SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t swig_types[260] -#define SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t swig_types[261] -#define SWIGTYPE_p_svertices_container swig_types[262] -#define SWIGTYPE_p_swig__PySwigIterator swig_types[263] -#define SWIGTYPE_p_unsigned_int swig_types[264] -#define SWIGTYPE_p_unsigned_short swig_types[265] -#define SWIGTYPE_p_value_type swig_types[266] -#define SWIGTYPE_p_vertex_container swig_types[267] -#define SWIGTYPE_p_vertex_iterator swig_types[268] -#define SWIGTYPE_p_vertex_type swig_types[269] -#define SWIGTYPE_p_viewedge_container swig_types[270] -#define SWIGTYPE_p_viewedges_container swig_types[271] -#define SWIGTYPE_p_viewshapes_container swig_types[272] -#define SWIGTYPE_p_viewvertices_container swig_types[273] -#define SWIGTYPE_p_void swig_types[274] -#define SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type swig_types[275] -#define SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type swig_types[276] -#define SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type swig_types[277] -#define SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type swig_types[278] -#define SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type swig_types[279] -#define SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type swig_types[280] -static swig_type_info *swig_types[282]; -static swig_module_info swig_module = {swig_types, 281, 0, 0, 0, 0}; +#define SWIGTYPE_p_id_to_index_map swig_types[230] +#define SWIGTYPE_p_id_type swig_types[231] +#define SWIGTYPE_p_int swig_types[232] +#define SWIGTYPE_p_ltstr swig_types[233] +#define SWIGTYPE_p_mapsMap swig_types[234] +#define SWIGTYPE_p_occluder_container__const_iterator swig_types[235] +#define SWIGTYPE_p_p_PyObject swig_types[236] +#define SWIGTYPE_p_point_iterator swig_types[237] +#define SWIGTYPE_p_point_type swig_types[238] +#define SWIGTYPE_p_reference swig_types[239] +#define SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t swig_types[240] +#define SWIGTYPE_p_size_type swig_types[241] +#define SWIGTYPE_p_std__invalid_argument swig_types[242] +#define SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t swig_types[243] +#define SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t swig_types[244] +#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t swig_types[245] +#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type swig_types[246] +#define SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t swig_types[247] +#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t swig_types[248] +#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type swig_types[249] +#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t swig_types[250] +#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type swig_types[251] +#define SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t swig_types[252] +#define SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t swig_types[253] +#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t swig_types[254] +#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type swig_types[255] +#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t swig_types[256] +#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type swig_types[257] +#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t swig_types[258] +#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type swig_types[259] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[260] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type swig_types[261] +#define SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t swig_types[262] +#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[263] +#define SWIGTYPE_p_svertices_container swig_types[264] +#define SWIGTYPE_p_swig__PySwigIterator swig_types[265] +#define SWIGTYPE_p_unsigned_int swig_types[266] +#define SWIGTYPE_p_unsigned_short swig_types[267] +#define SWIGTYPE_p_value_type swig_types[268] +#define SWIGTYPE_p_vertex_container swig_types[269] +#define SWIGTYPE_p_vertex_iterator swig_types[270] +#define SWIGTYPE_p_vertex_type swig_types[271] +#define SWIGTYPE_p_viewedge_container swig_types[272] +#define SWIGTYPE_p_viewedges_container swig_types[273] +#define SWIGTYPE_p_viewshapes_container swig_types[274] +#define SWIGTYPE_p_viewvertices_container swig_types[275] +#define SWIGTYPE_p_void swig_types[276] +#define SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type swig_types[277] +#define SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type swig_types[278] +#define SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type swig_types[279] +#define SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type swig_types[280] +#define SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type swig_types[281] +#define SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type swig_types[282] +static swig_type_info *swig_types[284]; +static swig_module_info swig_module = {swig_types, 283, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -3263,7 +3284,7 @@ static swig_module_info swig_module = {swig_types, 281, 0, 0, 0, 0}; #define SWIG_name "_Freestyle" -#define SWIGVERSION 0x010331 +#define SWIGVERSION 0x010335 #define SWIG_VERSION SWIGVERSION @@ -3291,7 +3312,9 @@ namespace swig { PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) { - if (initial_ref) Py_XINCREF(_obj); + if (initial_ref) { + Py_XINCREF(_obj); + } } PyObject_ptr & operator=(const PyObject_ptr& item) @@ -3439,17 +3462,22 @@ namespace swig { // C++ common/needed methods virtual PySwigIterator *copy() const = 0; - PyObject *next() + PyObject *next() { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); - incr(); - return obj; + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; } PyObject *previous() { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); - return value(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; } PySwigIterator *advance(ptrdiff_t n) @@ -4532,12 +4560,12 @@ namespace swig ~PySequence_Cont() { - if (_seq) Py_DECREF(_seq); + Py_XDECREF(_seq); } size_type size() const { - return PySequence_Size(_seq); + return static_cast(PySequence_Size(_seq)); } bool empty() const @@ -4600,14 +4628,12 @@ namespace swig #include -#ifndef LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -#endif -#ifndef LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif #endif @@ -4675,7 +4701,14 @@ namespace swig { typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { - if (PySequence_Check(obj)) { + if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { + sequence *p; + if (SWIG_ConvertPtr(obj,(void**)&p, + swig::type_info(),0) == SWIG_OK) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } else if (PySequence_Check(obj)) { try { PySequence_Cont pyseq(obj); if (seq) { @@ -4694,13 +4727,6 @@ namespace swig { } return SWIG_ERROR; } - } else { - sequence *p; - if (SWIG_ConvertPtr(obj,(void**)&p, - swig::type_info(),0) == SWIG_OK) { - if (seq) *seq = p; - return SWIG_OLDOBJ; - } } return SWIG_ERROR; } @@ -4756,21 +4782,21 @@ namespace swig { namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef pointer_category category; static const char* type_name() { - return "std::vector<" "int" "," "std::allocator" " >"; + return "std::vector<" "int" "," "std::allocator< int >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_int_Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ return self->size(); } @@ -4788,32 +4814,32 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } -SWIGINTERN std::vector::value_type std_vector_Sl_int_Sg__pop(std::vector *self){ +SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_int_Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector< int > *self,std::vector< int >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector const *self,std::vector::difference_type i){ +SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector< int > const *self,std::vector< int >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector *self,std::vector::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ self->push_back(x); } @@ -4933,18 +4959,11 @@ SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { - if (obj == Py_True) { - if (val) *val = true; - return SWIG_OK; - } else if (obj == Py_False) { - if (val) *val = false; - return SWIG_OK; - } else { - long v = 0; - int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0)); - if (SWIG_IsOK(res) && val) *val = v ? true : false; - return res; - } + int r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; } @@ -4957,49 +4976,49 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewShape" " *," "std::allocator" " >"; + return "std::vector<" "ViewShape" " *," "std::allocator< ViewShape * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector< ViewShape * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector< ViewShape * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewShape * >::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector< ViewShape * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector< ViewShape * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewShape *,std::allocator< ViewShape * > > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j,std::vector< ViewShape *,std::allocator< ViewShape * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector< ViewShape * > *self,std::vector< ViewShape * >::value_type x){ self->push_back(x); } @@ -5012,49 +5031,49 @@ SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewEdge" " *," "std::allocator" " >"; + return "std::vector<" "ViewEdge" " *," "std::allocator< ViewEdge * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector< ViewEdge * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector< ViewEdge * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewEdge * >::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector< ViewEdge * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector< ViewEdge * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewEdge *,std::allocator< ViewEdge * > > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j,std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::value_type x){ self->push_back(x); } @@ -5067,49 +5086,49 @@ SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector * namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "FEdge" " *," "std::allocator" " >"; + return "std::vector<" "FEdge" " *," "std::allocator< FEdge * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector< FEdge * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector< FEdge * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< FEdge * >::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector< FEdge * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector< FEdge * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< FEdge *,std::allocator< FEdge * > > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j,std::vector< FEdge *,std::allocator< FEdge * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector< FEdge * > *self,std::vector< FEdge * >::value_type x){ self->push_back(x); } @@ -5122,49 +5141,49 @@ SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,s namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewVertex" " *," "std::allocator" " >"; + return "std::vector<" "ViewVertex" " *," "std::allocator< ViewVertex * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector< ViewVertex * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector< ViewVertex * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewVertex * >::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector< ViewVertex * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector< ViewVertex * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewVertex *,std::allocator< ViewVertex * > > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j,std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::value_type x){ self->push_back(x); } @@ -5177,49 +5196,49 @@ SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "SVertex" " *," "std::allocator" " >"; + return "std::vector<" "SVertex" " *," "std::allocator< SVertex * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector< SVertex * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector< SVertex * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< SVertex * >::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector< SVertex * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector< SVertex * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< SVertex *,std::allocator< SVertex * > > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j,std::vector< SVertex *,std::allocator< SVertex * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector< SVertex * > *self,std::vector< SVertex * >::value_type x){ self->push_back(x); } @@ -5318,49 +5337,49 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "StrokeShader" " *," "std::allocator" " >"; + return "std::vector<" "StrokeShader" " *," "std::allocator< StrokeShader * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector< StrokeShader * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector< StrokeShader * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< StrokeShader * >::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector< StrokeShader * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector< StrokeShader * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< StrokeShader *,std::allocator< StrokeShader * > > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j,std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::value_type x){ self->push_back(x); } @@ -5446,7 +5465,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -5479,7 +5498,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -5666,8 +5685,8 @@ bool SwigDirector_ViewEdgeViewEdgeIterator::operator !=(ViewEdgeInternal::ViewEd } -SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D< void >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< void > *)this, this); } @@ -5729,8 +5748,8 @@ void SwigDirector_UnaryFunction0DVoid::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D< unsigned int >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< unsigned int > *)this, this); } @@ -5800,8 +5819,8 @@ unsigned int SwigDirector_UnaryFunction0DUnsigned::operator ()(Interface0DIterat } -SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D< float >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< float > *)this, this); } @@ -5871,8 +5890,8 @@ float SwigDirector_UnaryFunction0DFloat::operator ()(Interface0DIterator &iter) } -SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D< double >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< double > *)this, this); } @@ -5942,8 +5961,8 @@ double SwigDirector_UnaryFunction0DDouble::operator ()(Interface0DIterator &iter } -SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D< Geometry::Vec2f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec2f > *)this, this); } @@ -5982,11 +6001,11 @@ std::string SwigDirector_UnaryFunction0DVec2f::getName() const { } -VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { +VecMat::Vec2< float > SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2 c_result; + VecMat::Vec2< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6006,18 +6025,18 @@ VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DI Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); - return (VecMat::Vec2) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); + return (VecMat::Vec2< float >) c_result; } -SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D< Geometry::Vec3f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec3f > *)this, this); } @@ -6056,11 +6075,11 @@ std::string SwigDirector_UnaryFunction0DVec3f::getName() const { } -VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { +VecMat::Vec3< float > SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3 c_result; + VecMat::Vec3< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6080,18 +6099,18 @@ VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DI Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); - return (VecMat::Vec3) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); + return (VecMat::Vec3< float >) c_result; } -SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D< Id >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Id > *)this, this); } @@ -6164,15 +6183,15 @@ Id SwigDirector_UnaryFunction0DId::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D< void >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D< void >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); } @@ -6234,15 +6253,15 @@ void SwigDirector_UnaryFunction1DVoid::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D< unsigned int >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D< unsigned int >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); } @@ -6312,15 +6331,15 @@ unsigned int SwigDirector_UnaryFunction1DUnsigned::operator ()(Interface1D &inte } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D< float >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D< float >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); } @@ -6390,15 +6409,15 @@ float SwigDirector_UnaryFunction1DFloat::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D< double >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D< double >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); } @@ -6468,15 +6487,15 @@ double SwigDirector_UnaryFunction1DDouble::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D< Geometry::Vec2f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec2f >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); } @@ -6515,11 +6534,11 @@ std::string SwigDirector_UnaryFunction1DVec2f::getName() const { } -VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { +VecMat::Vec2< float > SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2 c_result; + VecMat::Vec2< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6539,25 +6558,25 @@ VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); - return (VecMat::Vec2) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); + return (VecMat::Vec2< float >) c_result; } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D< Geometry::Vec3f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec3f >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); } @@ -6596,11 +6615,11 @@ std::string SwigDirector_UnaryFunction1DVec3f::getName() const { } -VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { +VecMat::Vec3< float > SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3 c_result; + VecMat::Vec3< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6620,13 +6639,13 @@ VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); - return (VecMat::Vec3) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); + return (VecMat::Vec3< float >) c_result; } @@ -6705,7 +6724,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -6738,7 +6757,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -6976,7 +6995,7 @@ ViewEdge *SwigDirector_ChainingIterator::traverse(AdjacencyIterator const &it) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7056,7 +7075,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7089,7 +7108,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7327,7 +7346,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7414,7 +7433,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7447,7 +7466,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7685,7 +7704,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -8104,7 +8123,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8134,7 +8153,10 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n Possible C/C++ prototypes are:\n incr(size_t)\n incr()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n" + " Possible C/C++ prototypes are:\n" + " incr(swig::PySwigIterator *,size_t)\n" + " incr(swig::PySwigIterator *)\n"); return NULL; } @@ -8218,7 +8240,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8248,7 +8270,10 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n Possible C/C++ prototypes are:\n decr(size_t)\n decr()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n" + " Possible C/C++ prototypes are:\n" + " decr(swig::PySwigIterator *,size_t)\n" + " decr(swig::PySwigIterator *)\n"); return NULL; } @@ -8738,7 +8763,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator___sub__(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8779,14 +8804,14 @@ fail: SWIGINTERN PyObject *PySwigIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__PySwigIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -8795,11 +8820,11 @@ SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), Py arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (swig::PySwigIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -8810,19 +8835,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector const *)arg1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -8832,19 +8857,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = std_vector_Sl_int_Sg____len__((std::vector const *)arg1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -8854,20 +8879,20 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); try { - result = (std::vector::value_type)std_vector_Sl_int_Sg__pop(arg1); + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -8882,10 +8907,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8897,29 +8922,29 @@ SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); try { - result = (std::vector > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -8928,10 +8953,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8945,34 +8970,34 @@ SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } arg4 = ptr; } try { - std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -8992,9 +9017,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9006,21 +9031,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); try { std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); } @@ -9037,8 +9062,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9047,16 +9072,16 @@ SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); try { std_vector_Sl_int_Sg____delitem__(arg1,arg2); } @@ -9073,9 +9098,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9084,20 +9109,20 @@ SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); try { { - std::vector::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector const *)arg1,arg2); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector< int > const *)arg1,arg2); + result = (std::vector< int >::value_type *) &_result_ref; } } catch(std::out_of_range &_e) { @@ -9113,14 +9138,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -9128,21 +9153,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; try { std_vector_Sl_int_Sg____setitem__(arg1,arg2,(int const &)*arg3); @@ -9160,27 +9185,27 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); resultobj = SWIG_Py_Void(); @@ -9192,11 +9217,11 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_vectorInt")) SWIG_fail; - result = (std::vector *)new std::vector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9205,25 +9230,25 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< int > *arg1 = 0 ; + std::vector< int > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); } arg1 = ptr; } - result = (std::vector *)new std::vector((std::vector const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -9234,19 +9259,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (bool)((std::vector const *)arg1)->empty(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -9256,19 +9281,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->size(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -9278,17 +9303,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9299,8 +9324,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -9309,19 +9334,19 @@ SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< int > * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9332,42 +9357,42 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SwigValueWrapper< std::allocator< int > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9375,78 +9400,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9454,78 +9423,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9533,78 +9446,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9612,66 +9469,10 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< int >::size_type arg1 ; + std::vector< int > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -9679,11 +9480,11 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - result = (std::vector *)new std::vector(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9692,17 +9493,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9713,8 +9514,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -9723,16 +9524,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9743,9 +9544,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9754,24 +9555,24 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9781,10 +9582,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9796,35 +9597,35 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9838,18 +9639,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_0(self, args); } @@ -9857,16 +9658,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_1(self, args); } @@ -9875,19 +9676,22 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< int > *,std::vector< int >::iterator)\n" + " erase(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type *arg2 = 0 ; - std::vector *result = 0 ; + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + std::vector< int > *result = 0 ; size_t val1 ; int ecode1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -9896,17 +9700,17 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"OO:new_vectorInt",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< int >::size_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; - result = (std::vector *)new std::vector(arg1,(std::vector::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9919,7 +9723,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -9938,7 +9742,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_vectorInt__SWIG_1(self, args); @@ -9962,36 +9766,41 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n Possible C/C++ prototypes are:\n std::vector<(int)>()\n std::vector<(int)>(std::vector const &)\n std::vector<(int)>(std::vector::size_type)\n std::vector<(int)>(std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >()\n" + " std::vector< int >(std::vector< int > const &)\n" + " std::vector< int >(std::vector< int >::size_type)\n" + " std::vector< int >(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; - (arg1)->push_back((std::vector::value_type const &)*arg2); + (arg1)->push_back((std::vector< int >::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10001,21 +9810,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { - std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->front(); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->front(); + result = (std::vector< int >::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -10026,21 +9835,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { - std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->back(); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->back(); + result = (std::vector< int >::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -10051,14 +9860,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10066,23 +9875,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - (arg1)->assign(arg2,(std::vector::value_type const &)*arg3); + (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10092,14 +9901,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10107,23 +9916,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - (arg1)->resize(arg2,(std::vector::value_type const &)*arg3); + (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10137,13 +9946,13 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -10157,7 +9966,7 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -10177,22 +9986,25 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< int > *,std::vector< int >::size_type)\n" + " resize(std::vector< int > *,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type *arg3 = 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10200,30 +10012,30 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - result = (arg1)->insert(arg2,(std::vector::value_type const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -10233,17 +10045,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type *arg4 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; - std::vector::value_type temp4 ; + std::vector< int >::value_type temp4 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; @@ -10252,34 +10064,34 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); + arg3 = static_cast< std::vector< int >::size_type >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); } - temp4 = static_cast< std::vector::value_type >(val4); + temp4 = static_cast< std::vector< int >::value_type >(val4); arg4 = &temp4; - (arg1)->insert(arg2,arg3,(std::vector::value_type const &)*arg4); + (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10293,18 +10105,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); @@ -10318,12 +10130,12 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -10343,15 +10155,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type const &)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::value_type const &)\n" + " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -10360,16 +10175,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -10380,19 +10195,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->capacity(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -10402,17 +10217,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_vectorInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_vectorInt",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { try { delete arg1; @@ -10434,8 +10249,8 @@ fail: SWIGINTERN PyObject *vectorInt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -10576,7 +10391,7 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -10619,7 +10434,12 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n Possible C/C++ prototypes are:\n Id()\n Id(Id::id_type)\n Id(Id::id_type,Id::id_type)\n Id(Id const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n" + " Possible C/C++ prototypes are:\n" + " Id()\n" + " Id(Id::id_type)\n" + " Id(Id::id_type,Id::id_type)\n" + " Id(Id const &)\n"); return NULL; } @@ -10934,19 +10754,19 @@ fail: SWIGINTERN PyObject *Id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Id, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2u")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< unsigned int,2 > *)new VecMat::Vec< unsigned int,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10955,7 +10775,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -10964,17 +10784,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { delete arg1; @@ -11001,7 +10821,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< unsigned int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11019,21 +10839,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11051,21 +10871,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11083,23 +10903,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11109,7 +10929,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11118,23 +10938,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11144,7 +10964,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11153,9 +10973,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11164,22 +10984,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator +((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11188,7 +11008,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11197,9 +11017,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11208,22 +11028,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator -((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11232,7 +11052,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11241,9 +11061,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type arg2 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11252,19 +11072,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11273,7 +11093,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11282,9 +11102,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type arg2 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11293,19 +11113,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11314,7 +11134,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11323,9 +11143,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11334,22 +11154,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11371,17 +11191,17 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2u___mul____SWIG_1(self, args); @@ -11391,7 +11211,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -11412,8 +11232,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11423,22 +11243,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11456,8 +11276,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11467,22 +11287,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11500,8 +11320,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11511,22 +11331,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator <((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11544,8 +11364,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11555,22 +11375,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator >((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11588,19 +11408,19 @@ fail: SWIGINTERN PyObject *Vec_2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2i")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< int,2 > *)new VecMat::Vec< int,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11609,7 +11429,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -11618,17 +11438,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { delete arg1; @@ -11655,7 +11475,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11673,21 +11493,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11705,21 +11525,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11737,23 +11557,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11763,7 +11583,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11772,23 +11592,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11798,7 +11618,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11807,9 +11627,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11818,22 +11638,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator +((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11842,7 +11662,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11851,9 +11671,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11862,22 +11682,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator -((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11886,7 +11706,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11895,9 +11715,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type arg2 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11906,19 +11726,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11927,7 +11747,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11936,9 +11756,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type arg2 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11947,19 +11767,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11968,7 +11788,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11977,9 +11797,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11988,22 +11808,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->operator *((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12025,17 +11845,17 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2i___mul____SWIG_1(self, args); @@ -12045,7 +11865,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -12066,8 +11886,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12077,22 +11897,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator ==((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12110,8 +11930,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12121,22 +11941,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator !=((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12154,8 +11974,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12165,22 +11985,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator <((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12198,8 +12018,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12209,22 +12029,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator >((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12242,19 +12062,19 @@ fail: SWIGINTERN PyObject *Vec_2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2d")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< double,2 > *)new VecMat::Vec< double,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12263,7 +12083,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12272,17 +12092,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { delete arg1; @@ -12309,7 +12129,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< double,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12327,21 +12147,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12359,21 +12179,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12391,23 +12211,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< double,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12417,7 +12237,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12426,23 +12246,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< double,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12452,7 +12272,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12461,9 +12281,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12472,22 +12292,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator +((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12496,7 +12316,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12505,9 +12325,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12516,22 +12336,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator -((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12540,7 +12360,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12549,9 +12369,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type arg2 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12560,19 +12380,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12581,7 +12401,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12590,9 +12410,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type arg2 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12601,19 +12421,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12622,7 +12442,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12631,9 +12451,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12642,22 +12462,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->operator *((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12679,17 +12499,17 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2d___mul____SWIG_1(self, args); @@ -12699,7 +12519,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -12720,8 +12540,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12731,22 +12551,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator ==((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12764,8 +12584,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12775,22 +12595,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator !=((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12808,8 +12628,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12819,22 +12639,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator <((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12852,8 +12672,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12863,22 +12683,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator >((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12896,19 +12716,19 @@ fail: SWIGINTERN PyObject *Vec_2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2f")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< float,2 > *)new VecMat::Vec< float,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12917,7 +12737,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12926,17 +12746,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { delete arg1; @@ -12963,7 +12783,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< float,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12981,21 +12801,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13013,21 +12833,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13045,23 +12865,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< float,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13071,7 +12891,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -13080,23 +12900,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< float,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13106,7 +12926,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -13115,9 +12935,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13126,22 +12946,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator +((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13150,7 +12970,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13159,9 +12979,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13170,22 +12990,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator -((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13194,7 +13014,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13203,9 +13023,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type arg2 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13214,19 +13034,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13235,7 +13055,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13244,9 +13064,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type arg2 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13255,19 +13075,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13276,7 +13096,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13285,9 +13105,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13296,22 +13116,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->operator *((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13333,17 +13153,17 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2f___mul____SWIG_1(self, args); @@ -13353,7 +13173,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -13374,8 +13194,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13385,22 +13205,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator ==((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13418,8 +13238,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13429,22 +13249,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator !=((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13462,8 +13282,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13473,22 +13293,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator <((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13506,8 +13326,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13517,22 +13337,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator >((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13550,19 +13370,19 @@ fail: SWIGINTERN PyObject *Vec_2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2u")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13571,7 +13391,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13580,9 +13400,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int >::value_type arg1 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -13593,17 +13413,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13612,7 +13432,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13621,8 +13441,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int >::value_type arg1 ; + VecMat::Vec2< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -13630,12 +13450,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13644,7 +13464,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13657,7 +13477,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -13692,28 +13512,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(unsigned int)>()\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< unsigned int >()\n" + " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const,VecMat::Vec2< unsigned int >::value_type const)\n" + " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13731,23 +13555,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13770,14 +13594,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_0(self, args); @@ -13786,7 +13610,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_1(self, args); @@ -13794,28 +13618,31 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< unsigned int > const *)\n" + " x(VecMat::Vec2< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13833,23 +13660,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13872,14 +13699,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_0(self, args); @@ -13888,7 +13715,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_1(self, args); @@ -13896,15 +13723,18 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< unsigned int > const *)\n" + " y(VecMat::Vec2< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13913,16 +13743,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -13943,8 +13773,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13953,16 +13783,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -13983,9 +13813,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13994,22 +13824,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator +((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14018,7 +13848,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14027,9 +13857,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14038,22 +13868,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator -((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14062,7 +13892,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14071,9 +13901,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -14082,19 +13912,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14103,7 +13933,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14112,9 +13942,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -14123,19 +13953,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14144,7 +13974,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14153,9 +13983,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14164,22 +13994,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->operator *((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14201,17 +14031,17 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u___mul____SWIG_1(self, args); @@ -14221,7 +14051,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14242,17 +14072,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { delete arg1; @@ -14274,19 +14104,19 @@ fail: SWIGINTERN PyObject *Vec2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2i")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14295,7 +14125,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14304,9 +14134,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int >::value_type arg1 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -14317,17 +14147,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14336,7 +14166,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14345,8 +14175,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int >::value_type arg1 ; + VecMat::Vec2< int > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -14354,12 +14184,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14368,7 +14198,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14381,7 +14211,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -14416,28 +14246,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(int)>()\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< int >()\n" + " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const,VecMat::Vec2< int >::value_type const)\n" + " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14455,23 +14289,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14494,14 +14328,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_0(self, args); @@ -14510,7 +14344,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_1(self, args); @@ -14518,28 +14352,31 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< int > const *)\n" + " x(VecMat::Vec2< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14557,23 +14394,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14596,14 +14433,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_0(self, args); @@ -14612,7 +14449,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_1(self, args); @@ -14620,15 +14457,18 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< int > const *)\n" + " y(VecMat::Vec2< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14637,16 +14477,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -14667,8 +14507,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14677,16 +14517,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -14707,9 +14547,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14718,22 +14558,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator +((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14742,7 +14582,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14751,9 +14591,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14762,22 +14602,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator -((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14786,7 +14626,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14795,9 +14635,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14806,19 +14646,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14827,7 +14667,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14836,9 +14676,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14847,19 +14687,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14868,7 +14708,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14877,9 +14717,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14888,22 +14728,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->operator *((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14925,17 +14765,17 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i___mul____SWIG_1(self, args); @@ -14945,7 +14785,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14966,17 +14806,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { delete arg1; @@ -14998,19 +14838,19 @@ fail: SWIGINTERN PyObject *Vec2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2f")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15019,7 +14859,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15028,9 +14868,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float >::value_type arg1 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -15041,17 +14881,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15060,7 +14900,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15069,8 +14909,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float >::value_type arg1 ; + VecMat::Vec2< float > *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -15078,12 +14918,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15092,7 +14932,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15105,7 +14945,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -15140,28 +14980,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(float)>()\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< float >()\n" + " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const,VecMat::Vec2< float >::value_type const)\n" + " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15179,23 +15023,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< float >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15218,14 +15062,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_0(self, args); @@ -15234,7 +15078,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_1(self, args); @@ -15242,28 +15086,31 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< float > const *)\n" + " x(VecMat::Vec2< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15281,23 +15128,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< float >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15320,14 +15167,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_0(self, args); @@ -15336,7 +15183,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_1(self, args); @@ -15344,15 +15191,18 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< float > const *)\n" + " y(VecMat::Vec2< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15361,16 +15211,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -15391,8 +15241,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15401,16 +15251,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -15431,9 +15281,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15442,22 +15292,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator +((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15466,7 +15316,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15475,9 +15325,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15486,22 +15336,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator -((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15510,7 +15360,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15519,9 +15369,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15530,19 +15380,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15551,7 +15401,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15560,9 +15410,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15571,19 +15421,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15592,7 +15442,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15601,9 +15451,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15612,22 +15462,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->operator *((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15649,17 +15499,17 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f___mul____SWIG_1(self, args); @@ -15669,7 +15519,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -15690,17 +15540,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { delete arg1; @@ -15722,19 +15572,19 @@ fail: SWIGINTERN PyObject *Vec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2d")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15743,7 +15593,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15752,9 +15602,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double >::value_type arg1 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -15765,17 +15615,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15784,7 +15634,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15793,8 +15643,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double >::value_type arg1 ; + VecMat::Vec2< double > *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -15802,12 +15652,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15816,7 +15666,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15829,7 +15679,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -15864,28 +15714,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(double)>()\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< double >()\n" + " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const,VecMat::Vec2< double >::value_type const)\n" + " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15903,23 +15757,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< double >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15942,14 +15796,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_0(self, args); @@ -15958,7 +15812,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_1(self, args); @@ -15966,28 +15820,31 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< double > const *)\n" + " x(VecMat::Vec2< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16005,23 +15862,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< double >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16044,14 +15901,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_0(self, args); @@ -16060,7 +15917,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_1(self, args); @@ -16068,15 +15925,18 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< double > const *)\n" + " y(VecMat::Vec2< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16085,16 +15945,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -16115,8 +15975,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16125,16 +15985,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -16155,9 +16015,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16166,22 +16026,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator +((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16190,7 +16050,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16199,9 +16059,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16210,22 +16070,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator -((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16234,7 +16094,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16243,9 +16103,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16254,19 +16114,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16275,7 +16135,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16284,9 +16144,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16295,19 +16155,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16316,7 +16176,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16325,9 +16185,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16336,22 +16196,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->operator *((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16373,17 +16233,17 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d___mul____SWIG_1(self, args); @@ -16393,7 +16253,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16414,17 +16274,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { delete arg1; @@ -16446,19 +16306,19 @@ fail: SWIGINTERN PyObject *Vec2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3u")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< unsigned int,3 > *)new VecMat::Vec< unsigned int,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16467,7 +16327,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -16476,17 +16336,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { delete arg1; @@ -16513,7 +16373,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< unsigned int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16531,21 +16391,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16563,21 +16423,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16595,23 +16455,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16621,7 +16481,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16630,23 +16490,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16656,7 +16516,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16665,9 +16525,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16676,22 +16536,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator +((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16700,7 +16560,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16709,9 +16569,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16720,22 +16580,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator -((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16744,7 +16604,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16753,9 +16613,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type arg2 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16764,19 +16624,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16785,7 +16645,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16794,9 +16654,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type arg2 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16805,19 +16665,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16826,7 +16686,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16835,9 +16695,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16846,22 +16706,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16883,17 +16743,17 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3u___mul____SWIG_1(self, args); @@ -16903,7 +16763,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16924,8 +16784,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16935,22 +16795,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16968,8 +16828,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16979,22 +16839,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17012,8 +16872,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17023,22 +16883,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator <((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17056,8 +16916,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17067,22 +16927,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator >((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17100,19 +16960,19 @@ fail: SWIGINTERN PyObject *Vec_3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3i")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< int,3 > *)new VecMat::Vec< int,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17121,7 +16981,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -17130,17 +16990,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { delete arg1; @@ -17167,7 +17027,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17185,21 +17045,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17217,21 +17077,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17249,23 +17109,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17275,7 +17135,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17284,23 +17144,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17310,7 +17170,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17319,9 +17179,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17330,22 +17190,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator +((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17354,7 +17214,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17363,9 +17223,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17374,22 +17234,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator -((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17398,7 +17258,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17407,9 +17267,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type arg2 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17418,19 +17278,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17439,7 +17299,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17448,9 +17308,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type arg2 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17459,19 +17319,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17480,7 +17340,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17489,9 +17349,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17500,22 +17360,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->operator *((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17537,17 +17397,17 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3i___mul____SWIG_1(self, args); @@ -17557,7 +17417,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -17578,8 +17438,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17589,22 +17449,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator ==((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17622,8 +17482,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17633,22 +17493,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator !=((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17666,8 +17526,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17677,22 +17537,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator <((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17710,8 +17570,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17721,22 +17581,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator >((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17754,19 +17614,19 @@ fail: SWIGINTERN PyObject *Vec_3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3d")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< double,3 > *)new VecMat::Vec< double,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17775,7 +17635,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -17784,17 +17644,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { delete arg1; @@ -17821,7 +17681,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< double,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17839,21 +17699,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17871,21 +17731,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17903,23 +17763,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< double,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17929,7 +17789,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17938,23 +17798,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< double,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17964,7 +17824,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17973,9 +17833,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17984,22 +17844,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator +((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18008,7 +17868,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18017,9 +17877,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18028,22 +17888,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator -((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18052,7 +17912,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18061,9 +17921,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type arg2 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -18072,19 +17932,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18093,7 +17953,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18102,9 +17962,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type arg2 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -18113,19 +17973,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18134,7 +17994,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18143,9 +18003,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18154,22 +18014,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->operator *((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18191,17 +18051,17 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3d___mul____SWIG_1(self, args); @@ -18211,7 +18071,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18232,8 +18092,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18243,22 +18103,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator ==((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18276,8 +18136,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18287,22 +18147,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator !=((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18320,8 +18180,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18331,22 +18191,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator <((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18364,8 +18224,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18375,22 +18235,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator >((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18408,19 +18268,19 @@ fail: SWIGINTERN PyObject *Vec_3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3f")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< float,3 > *)new VecMat::Vec< float,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18429,7 +18289,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -18438,17 +18298,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { delete arg1; @@ -18475,7 +18335,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< float,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18493,21 +18353,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18525,21 +18385,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18557,23 +18417,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< float,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18583,7 +18443,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18592,23 +18452,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< float,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18618,7 +18478,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18627,9 +18487,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18638,22 +18498,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator +((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18662,7 +18522,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18671,9 +18531,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18682,22 +18542,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator -((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18706,7 +18566,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18715,9 +18575,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type arg2 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18726,19 +18586,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18747,7 +18607,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18756,9 +18616,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type arg2 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18767,19 +18627,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18788,7 +18648,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18797,9 +18657,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18808,22 +18668,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->operator *((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18845,17 +18705,17 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3f___mul____SWIG_1(self, args); @@ -18865,7 +18725,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18886,8 +18746,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18897,22 +18757,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator ==((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18930,8 +18790,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18941,22 +18801,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator !=((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18974,8 +18834,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18985,22 +18845,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator <((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19018,8 +18878,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -19029,22 +18889,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator >((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19062,19 +18922,19 @@ fail: SWIGINTERN PyObject *Vec_3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3u")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19083,7 +18943,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19092,10 +18952,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int >::value_type arg3 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -19109,22 +18969,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3u",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19133,7 +18993,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19142,9 +19002,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -19155,17 +19015,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19174,7 +19034,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19183,8 +19043,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -19192,12 +19052,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19206,7 +19066,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19219,7 +19079,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -19276,28 +19136,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(unsigned int)>()\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< unsigned int >()\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19315,23 +19180,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19354,14 +19219,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_0(self, args); @@ -19370,7 +19235,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_1(self, args); @@ -19378,28 +19243,31 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< unsigned int > const *)\n" + " x(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19417,23 +19285,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19456,14 +19324,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_0(self, args); @@ -19472,7 +19340,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_1(self, args); @@ -19480,28 +19348,31 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< unsigned int > const *)\n" + " y(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19519,23 +19390,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19558,14 +19429,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_0(self, args); @@ -19574,7 +19445,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_1(self, args); @@ -19582,15 +19453,18 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< unsigned int > const *)\n" + " z(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19599,16 +19473,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -19629,8 +19503,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19639,16 +19513,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -19669,8 +19543,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19679,16 +19553,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -19709,9 +19583,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19720,22 +19594,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator +((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19744,7 +19618,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19753,9 +19627,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19764,22 +19638,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator -((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19788,7 +19662,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19797,9 +19671,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19808,19 +19682,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19829,7 +19703,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19838,9 +19712,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19849,19 +19723,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19870,7 +19744,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19879,9 +19753,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19890,22 +19764,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->operator *((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19927,17 +19801,17 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u___mul____SWIG_1(self, args); @@ -19947,7 +19821,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -19968,9 +19842,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19979,22 +19853,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator ^((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20003,7 +19877,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20012,17 +19886,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { delete arg1; @@ -20044,19 +19918,19 @@ fail: SWIGINTERN PyObject *Vec3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3i")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20065,7 +19939,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20074,10 +19948,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int >::value_type arg3 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -20091,22 +19965,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3i",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< int >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20115,7 +19989,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20124,9 +19998,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -20137,17 +20011,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20156,7 +20030,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20165,8 +20039,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -20174,12 +20048,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20188,7 +20062,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20201,7 +20075,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -20258,28 +20132,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(int)>()\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< int >()\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20297,23 +20176,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20336,14 +20215,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_0(self, args); @@ -20352,7 +20231,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_1(self, args); @@ -20360,28 +20239,31 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< int > const *)\n" + " x(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20399,23 +20281,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20438,14 +20320,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_0(self, args); @@ -20454,7 +20336,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_1(self, args); @@ -20462,28 +20344,31 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< int > const *)\n" + " y(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20501,23 +20386,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20540,14 +20425,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_0(self, args); @@ -20556,7 +20441,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_1(self, args); @@ -20564,15 +20449,18 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< int > const *)\n" + " z(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20581,16 +20469,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -20611,8 +20499,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20621,16 +20509,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -20651,8 +20539,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20661,16 +20549,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -20691,9 +20579,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20702,22 +20590,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator +((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20726,7 +20614,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20735,9 +20623,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20746,22 +20634,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator -((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20770,7 +20658,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20779,9 +20667,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20790,19 +20678,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20811,7 +20699,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20820,9 +20708,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20831,19 +20719,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20852,7 +20740,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20861,9 +20749,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20872,22 +20760,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->operator *((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20909,17 +20797,17 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i___mul____SWIG_1(self, args); @@ -20929,7 +20817,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -20950,9 +20838,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20961,22 +20849,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator ^((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20985,7 +20873,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20994,17 +20882,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { delete arg1; @@ -21026,19 +20914,19 @@ fail: SWIGINTERN PyObject *Vec3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3f")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21047,7 +20935,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21056,10 +20944,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float >::value_type arg3 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -21073,22 +20961,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3f",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< float >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21097,7 +20985,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21106,9 +20994,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -21119,17 +21007,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21138,7 +21026,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21147,8 +21035,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -21156,12 +21044,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21170,7 +21058,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21183,7 +21071,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -21240,28 +21128,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(float)>()\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< float >()\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21279,23 +21172,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21318,14 +21211,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_0(self, args); @@ -21334,7 +21227,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_1(self, args); @@ -21342,28 +21235,31 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< float > const *)\n" + " x(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21381,23 +21277,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21420,14 +21316,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_0(self, args); @@ -21436,7 +21332,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_1(self, args); @@ -21444,28 +21340,31 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< float > const *)\n" + " y(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21483,23 +21382,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21522,14 +21421,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_0(self, args); @@ -21538,7 +21437,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_1(self, args); @@ -21546,15 +21445,18 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< float > const *)\n" + " z(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21563,16 +21465,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -21593,8 +21495,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21603,16 +21505,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -21633,8 +21535,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21643,16 +21545,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -21673,9 +21575,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21684,22 +21586,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator +((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21708,7 +21610,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21717,9 +21619,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21728,22 +21630,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator -((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21752,7 +21654,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21761,9 +21663,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21772,19 +21674,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21793,7 +21695,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21802,9 +21704,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21813,19 +21715,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21834,7 +21736,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21843,9 +21745,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21854,22 +21756,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->operator *((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21891,17 +21793,17 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f___mul____SWIG_1(self, args); @@ -21911,7 +21813,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -21932,9 +21834,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21943,22 +21845,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator ^((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21967,7 +21869,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21976,17 +21878,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { delete arg1; @@ -22008,19 +21910,19 @@ fail: SWIGINTERN PyObject *Vec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3d")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22029,7 +21931,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22038,10 +21940,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double >::value_type arg3 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -22055,22 +21957,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3d",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< double >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22079,7 +21981,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22088,9 +21990,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -22101,17 +22003,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22120,7 +22022,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22129,8 +22031,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -22138,12 +22040,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22152,7 +22054,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22165,7 +22067,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -22222,28 +22124,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(double)>()\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< double >()\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22261,23 +22168,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22300,14 +22207,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_0(self, args); @@ -22316,7 +22223,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_1(self, args); @@ -22324,28 +22231,31 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< double > const *)\n" + " x(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22363,23 +22273,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22402,14 +22312,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_0(self, args); @@ -22418,7 +22328,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_1(self, args); @@ -22426,28 +22336,31 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< double > const *)\n" + " y(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22465,23 +22378,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22504,14 +22417,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_0(self, args); @@ -22520,7 +22433,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_1(self, args); @@ -22528,15 +22441,18 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< double > const *)\n" + " z(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22545,16 +22461,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -22575,8 +22491,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22585,16 +22501,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -22615,8 +22531,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22625,16 +22541,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -22655,9 +22571,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22666,22 +22582,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator +((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22690,7 +22606,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22699,9 +22615,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22710,22 +22626,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator -((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22734,7 +22650,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22743,9 +22659,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22754,19 +22670,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22775,7 +22691,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22784,9 +22700,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22795,19 +22711,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22816,7 +22732,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22825,9 +22741,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22836,22 +22752,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->operator *((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22873,17 +22789,17 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d___mul____SWIG_1(self, args); @@ -22893,7 +22809,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -22914,9 +22830,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22925,22 +22841,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator ^((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22949,7 +22865,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22958,17 +22874,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { delete arg1; @@ -22990,8 +22906,8 @@ fail: SWIGINTERN PyObject *Vec3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23183,7 +23099,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23249,7 +23165,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n Possible C/C++ prototypes are:\n turbulence1(float,float,float,unsigned int)\n turbulence1(float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence1(Noise *,float,float,float,unsigned int)\n" + " turbulence1(Noise *,float,float,float)\n"); return NULL; } @@ -23284,7 +23203,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23351,7 +23270,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23393,7 +23312,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23404,7 +23323,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23430,7 +23349,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23457,7 +23376,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n Possible C/C++ prototypes are:\n turbulence2(Geometry::Vec2f &,float,float,unsigned int)\n turbulence2(Geometry::Vec2f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence2(Noise *,Geometry::Vec2f &,float,float,unsigned int)\n" + " turbulence2(Noise *,Geometry::Vec2f &,float,float)\n"); return NULL; } @@ -23492,7 +23414,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23559,7 +23481,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23601,7 +23523,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23612,7 +23534,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23638,7 +23560,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23665,7 +23587,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n Possible C/C++ prototypes are:\n turbulence3(Geometry::Vec3f &,float,float,unsigned int)\n turbulence3(Geometry::Vec3f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence3(Noise *,Geometry::Vec3f &,float,float,unsigned int)\n" + " turbulence3(Noise *,Geometry::Vec3f &,float,float)\n"); return NULL; } @@ -23729,7 +23654,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23773,7 +23698,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23801,7 +23726,7 @@ fail: SWIGINTERN PyObject *Noise_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Noise, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23938,7 +23863,7 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23985,7 +23910,11 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n Possible C/C++ prototypes are:\n Material()\n Material(float const *,float const *,float const *,float const *,float const)\n Material(Material const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n" + " Possible C/C++ prototypes are:\n" + " Material()\n" + " Material(float const *,float const *,float const *,float const *,float const)\n" + " Material(Material const &)\n"); return NULL; } @@ -25092,18 +25021,18 @@ fail: SWIGINTERN PyObject *Material_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Material, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN int POINT_set(PyObject *) { +SWIGINTERN int Swig_var_POINT_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable POINT is read-only."); return 1; } -SWIGINTERN PyObject *POINT_get(void) { +SWIGINTERN PyObject *Swig_var_POINT_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::POINT)); @@ -25111,13 +25040,13 @@ SWIGINTERN PyObject *POINT_get(void) { } -SWIGINTERN int S_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_S_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable S_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *S_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_S_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::S_VERTEX)); @@ -25125,13 +25054,13 @@ SWIGINTERN PyObject *S_VERTEX_get(void) { } -SWIGINTERN int VIEW_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_VIEW_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VIEW_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *VIEW_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_VIEW_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VIEW_VERTEX)); @@ -25139,13 +25068,13 @@ SWIGINTERN PyObject *VIEW_VERTEX_get(void) { } -SWIGINTERN int NON_T_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_NON_T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NON_T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *NON_T_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_NON_T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NON_T_VERTEX)); @@ -25153,13 +25082,13 @@ SWIGINTERN PyObject *NON_T_VERTEX_get(void) { } -SWIGINTERN int T_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *T_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::T_VERTEX)); @@ -25167,13 +25096,13 @@ SWIGINTERN PyObject *T_VERTEX_get(void) { } -SWIGINTERN int CUSP_set(PyObject *) { +SWIGINTERN int Swig_var_CUSP_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CUSP is read-only."); return 1; } -SWIGINTERN PyObject *CUSP_get(void) { +SWIGINTERN PyObject *Swig_var_CUSP_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CUSP)); @@ -25181,13 +25110,13 @@ SWIGINTERN PyObject *CUSP_get(void) { } -SWIGINTERN int NO_FEATURE_set(PyObject *) { +SWIGINTERN int Swig_var_NO_FEATURE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NO_FEATURE is read-only."); return 1; } -SWIGINTERN PyObject *NO_FEATURE_get(void) { +SWIGINTERN PyObject *Swig_var_NO_FEATURE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NO_FEATURE)); @@ -25195,13 +25124,13 @@ SWIGINTERN PyObject *NO_FEATURE_get(void) { } -SWIGINTERN int SILHOUETTE_set(PyObject *) { +SWIGINTERN int Swig_var_SILHOUETTE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SILHOUETTE is read-only."); return 1; } -SWIGINTERN PyObject *SILHOUETTE_get(void) { +SWIGINTERN PyObject *Swig_var_SILHOUETTE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SILHOUETTE)); @@ -25209,13 +25138,13 @@ SWIGINTERN PyObject *SILHOUETTE_get(void) { } -SWIGINTERN int BORDER_set(PyObject *) { +SWIGINTERN int Swig_var_BORDER_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable BORDER is read-only."); return 1; } -SWIGINTERN PyObject *BORDER_get(void) { +SWIGINTERN PyObject *Swig_var_BORDER_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::BORDER)); @@ -25223,13 +25152,13 @@ SWIGINTERN PyObject *BORDER_get(void) { } -SWIGINTERN int CREASE_set(PyObject *) { +SWIGINTERN int Swig_var_CREASE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CREASE is read-only."); return 1; } -SWIGINTERN PyObject *CREASE_get(void) { +SWIGINTERN PyObject *Swig_var_CREASE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CREASE)); @@ -25237,13 +25166,13 @@ SWIGINTERN PyObject *CREASE_get(void) { } -SWIGINTERN int RIDGE_set(PyObject *) { +SWIGINTERN int Swig_var_RIDGE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable RIDGE is read-only."); return 1; } -SWIGINTERN PyObject *RIDGE_get(void) { +SWIGINTERN PyObject *Swig_var_RIDGE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::RIDGE)); @@ -25251,13 +25180,13 @@ SWIGINTERN PyObject *RIDGE_get(void) { } -SWIGINTERN int VALLEY_set(PyObject *) { +SWIGINTERN int Swig_var_VALLEY_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VALLEY is read-only."); return 1; } -SWIGINTERN PyObject *VALLEY_get(void) { +SWIGINTERN PyObject *Swig_var_VALLEY_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VALLEY)); @@ -25265,13 +25194,13 @@ SWIGINTERN PyObject *VALLEY_get(void) { } -SWIGINTERN int SUGGESTIVE_CONTOUR_set(PyObject *) { +SWIGINTERN int Swig_var_SUGGESTIVE_CONTOUR_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SUGGESTIVE_CONTOUR is read-only."); return 1; } -SWIGINTERN PyObject *SUGGESTIVE_CONTOUR_get(void) { +SWIGINTERN PyObject *Swig_var_SUGGESTIVE_CONTOUR_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SUGGESTIVE_CONTOUR)); @@ -25279,6 +25208,38 @@ SWIGINTERN PyObject *SUGGESTIVE_CONTOUR_get(void) { } +SWIGINTERN PyObject *_wrap_delete_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface0D *arg1 = (Interface0D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface0D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface0D" "', argument " "1"" of type '" "Interface0D *""'"); + } + arg1 = reinterpret_cast< Interface0D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Interface0D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Interface0D *arg1 = (Interface0D *) 0 ; @@ -25432,7 +25393,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25560,7 +25521,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25826,41 +25787,9 @@ fail: } -SWIGINTERN PyObject *_wrap_delete_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Interface0D *arg1 = (Interface0D *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface0D",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface0D, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface0D" "', argument " "1"" of type '" "Interface0D *""'"); - } - arg1 = reinterpret_cast< Interface0D * >(argp1); - { - try { - delete arg1; - - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *Interface0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26427,7 +26356,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint3D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26555,7 +26484,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint2D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26800,7 +26729,7 @@ fail: SWIGINTERN PyObject *Interface0DIteratorNested_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIteratorNested, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26901,7 +26830,7 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -26927,7 +26856,11 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n Possible C/C++ prototypes are:\n Interface0DIterator(Interface0DIteratorNested *)\n Interface0DIterator()\n Interface0DIterator(Interface0DIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Interface0DIterator(Interface0DIteratorNested *)\n" + " Interface0DIterator()\n" + " Interface0DIterator(Interface0DIterator const &)\n"); return NULL; } @@ -27462,7 +27395,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27590,7 +27523,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27835,11 +27768,43 @@ fail: SWIGINTERN PyObject *Interface0DIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_delete_Interface1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *arg1 = (Interface1D *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface1D",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface1D" "', argument " "1"" of type '" "Interface1D *""'"); + } + arg1 = reinterpret_cast< Interface1D * >(argp1); + { + try { + delete arg1; + + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Interface1D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Interface1D *arg1 = (Interface1D *) 0 ; @@ -28015,7 +27980,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28045,7 +28010,10 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Interface1D *,float)\n" + " pointsBegin(Interface1D *)\n"); return NULL; } @@ -28129,7 +28097,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28159,7 +28127,10 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Interface1D *,float)\n" + " pointsEnd(Interface1D *)\n"); return NULL; } @@ -28332,48 +28303,16 @@ fail: } -SWIGINTERN PyObject *_wrap_delete_Interface1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - Interface1D *arg1 = (Interface1D *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_Interface1D",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Interface1D, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Interface1D" "', argument " "1"" of type '" "Interface1D *""'"); - } - arg1 = reinterpret_cast< Interface1D * >(argp1); - { - try { - delete arg1; - - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *Interface1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< unsigned int > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28392,14 +28331,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateUnsigned",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28433,7 +28372,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se arg4 = static_cast< IntegrationType >(val4); { try { - result = (unsigned int)integrate(*arg1,arg2,arg3,arg4); + result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28451,7 +28390,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< unsigned int > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; unsigned int result; @@ -28466,14 +28405,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateUnsigned",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28502,7 +28441,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se } { try { - result = (unsigned int)integrate(*arg1,arg2,arg3); + result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28524,14 +28463,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28548,7 +28487,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28570,14 +28509,17 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n Possible C/C++ prototypes are:\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< float > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28596,14 +28538,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateFloat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28637,7 +28579,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) arg4 = static_cast< IntegrationType >(val4); { try { - result = (float)integrate(*arg1,arg2,arg3,arg4); + result = (float)integrate< float >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28655,7 +28597,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< float > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; float result; @@ -28670,14 +28612,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateFloat",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28706,7 +28648,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) } { try { - result = (float)integrate(*arg1,arg2,arg3); + result = (float)integrate< float >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28728,14 +28670,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28752,7 +28694,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28774,14 +28716,17 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n Possible C/C++ prototypes are:\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28800,14 +28745,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28841,7 +28786,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self arg4 = static_cast< IntegrationType >(val4); { try { - result = (double)integrate(*arg1,arg2,arg3,arg4); + result = (double)integrate< double >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28859,7 +28804,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; double result; @@ -28874,14 +28819,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateDouble",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28910,7 +28855,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self } { try { - result = (double)integrate(*arg1,arg2,arg3); + result = (double)integrate< double >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28932,14 +28877,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28956,7 +28901,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28978,7 +28923,10 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n Possible C/C++ prototypes are:\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } @@ -29136,7 +29084,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29264,7 +29212,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29594,7 +29542,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_SVertex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVertex" "', argument " "1"" of type '" "Geometry::Vec3r const &""'"); } @@ -29669,7 +29617,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -29687,7 +29635,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } if (argc == 2) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Id, 0); @@ -29699,7 +29647,11 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n Possible C/C++ prototypes are:\n SVertex()\n SVertex(Geometry::Vec3r const &,Id const &)\n SVertex(SVertex &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n" + " Possible C/C++ prototypes are:\n" + " SVertex()\n" + " SVertex(Geometry::Vec3r const &,Id const &)\n" + " SVertex(SVertex &)\n"); return NULL; } @@ -29840,7 +29792,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29875,7 +29827,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29885,7 +29837,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29907,7 +29859,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29949,7 +29901,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29963,8 +29915,8 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje { try { { - std::vector const &_result_ref = (arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -29974,7 +29926,7 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30158,7 +30110,7 @@ SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint3D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30201,7 +30153,7 @@ SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint2D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30244,7 +30196,7 @@ SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_AddNormal" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30400,7 +30352,7 @@ SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(se } arg1 = reinterpret_cast< SVertex * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -30487,7 +30439,7 @@ SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30540,7 +30492,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -30554,17 +30506,17 @@ SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetFEdges" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { - (arg1)->SetFEdges((std::vector const &)*arg2); + (arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30809,7 +30761,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30844,7 +30796,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30876,7 +30828,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30953,7 +30905,7 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -30977,7 +30929,10 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(SVertex *)\n" + " shape(SVertex const *)\n"); return NULL; } @@ -31307,7 +31262,7 @@ fail: SWIGINTERN PyObject *SVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -31564,7 +31519,7 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -31596,7 +31551,11 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n Possible C/C++ prototypes are:\n FEdge()\n FEdge(SVertex *,SVertex *)\n FEdge(FEdge &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n" + " Possible C/C++ prototypes are:\n" + " FEdge()\n" + " FEdge(SVertex *,SVertex *)\n" + " FEdge(FEdge &)\n"); return NULL; } @@ -31946,7 +31905,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31978,7 +31937,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32048,7 +32007,7 @@ SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -32462,7 +32421,7 @@ SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -32743,7 +32702,7 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -32767,7 +32726,10 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(FEdge *)\n" + " shape(FEdge const *)\n"); return NULL; } @@ -33152,7 +33114,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33184,7 +33146,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33334,7 +33296,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33364,7 +33326,10 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(FEdge *,float)\n" + " pointsBegin(FEdge *)\n"); return NULL; } @@ -33448,7 +33413,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33478,14 +33443,17 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(FEdge *,float)\n" + " pointsEnd(FEdge *)\n"); return NULL; } SWIGINTERN PyObject *FEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -33595,7 +33563,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33626,7 +33594,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n FEdgeInternal::SVertexIterator()\n FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeInternal::SVertexIterator()\n" + " FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n" + " FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); return NULL; } @@ -34149,7 +34121,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34277,7 +34249,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34631,7 +34603,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34666,7 +34638,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34676,7 +34648,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34698,7 +34670,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34740,7 +34712,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34754,8 +34726,8 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( { try { { - std::vector const &_result_ref = (*arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -34765,7 +34737,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34906,7 +34878,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -34930,7 +34902,10 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(FEdgeInternal::SVertexIterator *)\n" + " shape(FEdgeInternal::SVertexIterator const *)\n"); return NULL; } @@ -35016,7 +34991,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDP SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35059,7 +35034,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDP SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35102,7 +35077,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35258,7 +35233,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setDirectionFredo(PyObject *SWIG } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -35345,7 +35320,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -35398,7 +35373,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -35412,17 +35387,17 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { - (*arg1)->SetFEdges((std::vector const &)*arg2); + (*arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35667,7 +35642,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35702,7 +35677,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35734,7 +35709,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -36098,7 +36073,7 @@ fail: SWIGINTERN PyObject *FEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36208,7 +36183,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36240,7 +36215,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n Possible C/C++ prototypes are:\n FEdgeSharp()\n FEdgeSharp(SVertex *,SVertex *)\n FEdgeSharp(FEdgeSharp &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeSharp()\n" + " FEdgeSharp(SVertex *,SVertex *)\n" + " FEdgeSharp(FEdgeSharp &)\n"); return NULL; } @@ -36337,7 +36316,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36372,7 +36351,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36530,7 +36509,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -36573,7 +36552,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -36681,7 +36660,7 @@ fail: SWIGINTERN PyObject *FEdgeSharp_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSharp, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36791,7 +36770,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36823,7 +36802,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n Possible C/C++ prototypes are:\n FEdgeSmooth()\n FEdgeSmooth(SVertex *,SVertex *)\n FEdgeSmooth(FEdgeSmooth &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeSmooth()\n" + " FEdgeSmooth(SVertex *,SVertex *)\n" + " FEdgeSmooth(FEdgeSmooth &)\n"); return NULL; } @@ -36952,7 +36935,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37081,7 +37064,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetNormal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_SetNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -37149,7 +37132,7 @@ fail: SWIGINTERN PyObject *FEdgeSmooth_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSmooth, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -37269,7 +37252,7 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -37287,7 +37270,10 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n Possible C/C++ prototypes are:\n SShape()\n SShape(SShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n" + " Possible C/C++ prototypes are:\n" + " SShape()\n" + " SShape(SShape &)\n"); return NULL; } @@ -37502,7 +37488,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_CreateSVertex" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -37510,7 +37496,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_CreateSVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -37548,8 +37534,8 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector *arg3 = 0 ; - std::vector *arg4 = 0 ; + std::vector< Geometry::Vec2r > *arg3 = 0 ; + std::vector< FEdge * > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37574,25 +37560,25 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector< Geometry::Vec2r > * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } - arg4 = reinterpret_cast< std::vector * >(argp4); + arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); { try { - (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4); + (arg1)->SplitEdge(arg2,(std::vector< Geometry::Vec2r > const &)*arg3,*arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37661,7 +37647,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox *arg2 = 0 ; + BBox< Geometry::Vec3r > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37675,17 +37661,17 @@ SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetBBox" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } - arg2 = reinterpret_cast< BBox * >(argp2); + arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); { try { - (arg1)->SetBBox((BBox const &)*arg2); + (arg1)->SetBBox((BBox< Geometry::Vec3r > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37815,7 +37801,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< SVertex * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37829,8 +37815,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), { try { { - std::vector &_result_ref = (arg1)->GetVertexList(); - result = (std::vector *) &_result_ref; + std::vector< SVertex * > &_result_ref = (arg1)->GetVertexList(); + result = (std::vector< SVertex * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37840,7 +37826,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37850,7 +37836,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37864,8 +37850,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->GetEdgeList(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > &_result_ref = (arg1)->GetEdgeList(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37875,7 +37861,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37885,7 +37871,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37899,8 +37885,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector &_result_ref = (arg1)->GetChains(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > &_result_ref = (arg1)->GetChains(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37910,7 +37896,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37920,7 +37906,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox *result = 0 ; + BBox< Geometry::Vec3r > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37934,8 +37920,8 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject { try { { - BBox const &_result_ref = (arg1)->bbox(); - result = (BBox *) &_result_ref; + BBox< Geometry::Vec3r > const &_result_ref = (arg1)->bbox(); + result = (BBox< Geometry::Vec3r > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37945,7 +37931,7 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37999,7 +37985,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< Material > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -38013,8 +37999,8 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector const &_result_ref = ((SShape const *)arg1)->materials(); - result = (std::vector *) &_result_ref; + std::vector< Material > const &_result_ref = ((SShape const *)arg1)->materials(); + result = (std::vector< Material > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -38024,7 +38010,7 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -38178,7 +38164,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< Material > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38192,17 +38178,17 @@ SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetMaterials" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< Material > * >(argp2); { try { - (arg1)->SetMaterials((std::vector const &)*arg2); + (arg1)->SetMaterials((std::vector< Material > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38300,14 +38286,14 @@ fail: SWIGINTERN PyObject *SShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -38316,11 +38302,11 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewShape_Sm__Sg__iterator(arg1,arg2); @@ -38341,21 +38327,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector< ViewShape * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38373,21 +38359,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector< ViewShape * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38405,22 +38391,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); + result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38434,7 +38420,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38443,10 +38429,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; + std::vector< ViewShape *,std::allocator< ViewShape * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38458,25 +38444,25 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewShape *,std::allocator< ViewShape * > > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38490,7 +38476,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -38499,10 +38485,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; + std::vector< ViewShape *,std::allocator< ViewShape * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38516,36 +38502,36 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewShape *,std::allocator< ViewShape * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38573,9 +38559,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38587,21 +38573,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { try { try { @@ -38628,8 +38614,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38638,16 +38624,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); { try { try { @@ -38674,9 +38660,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38685,20 +38671,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38712,7 +38698,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38721,9 +38707,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38735,21 +38721,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { try { @@ -38776,8 +38762,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38786,16 +38772,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { std_vector_Sl_ViewShape_Sm__Sg__append(arg1,arg2); @@ -38816,12 +38802,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewShapesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38830,7 +38816,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -38839,26 +38825,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *arg1 = 0 ; + std::vector< ViewShape * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >((std::vector< ViewShape * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38867,7 +38853,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -38878,21 +38864,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewShape * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38910,21 +38896,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewShape * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38942,17 +38928,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { (arg1)->clear(); @@ -38973,8 +38959,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38983,19 +38969,19 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -39016,21 +39002,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + SwigValueWrapper< std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewShape * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39039,30 +39025,30 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewShape * >::allocator_type(static_cast< const std::vector< ViewShape * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewShape * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39071,7 +39057,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39079,89 +39065,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewShape * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39170,7 +39090,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39178,89 +39098,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewShape * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39269,7 +39123,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39277,89 +39131,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewShape * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39368,7 +39156,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39376,76 +39164,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewShape * >::size_type arg1 ; + std::vector< ViewShape * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -39453,12 +39175,12 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39467,7 +39189,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39476,17 +39198,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { (arg1)->pop_back(); @@ -39507,8 +39229,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39517,16 +39239,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUS PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -39547,9 +39269,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39558,20 +39280,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } { @@ -39585,7 +39307,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39595,10 +39317,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::iterator arg3 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39610,31 +39332,31 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); } } { @@ -39648,7 +39370,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39662,18 +39384,18 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_0(self, args); } @@ -39681,16 +39403,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_1(self, args); } @@ -39699,16 +39421,19 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator)\n" + " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * >::size_type arg1 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector< ViewShape * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -39719,17 +39444,17 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewShapesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39738,7 +39463,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39751,7 +39476,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -39770,7 +39495,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_1(self, args); @@ -39784,7 +39509,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_3(self, args); @@ -39793,15 +39518,20 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewShape)>()\n std::vector<(p.ViewShape)>(std::vector const &)\n std::vector<(p.ViewShape)>(std::vector::size_type)\n std::vector<(p.ViewShape)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewShape * >()\n" + " std::vector< ViewShape * >(std::vector< ViewShape * > const &)\n" + " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type)\n" + " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -39810,16 +39540,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -39840,21 +39570,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39863,7 +39593,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39872,21 +39602,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39895,7 +39625,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39904,9 +39634,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39918,21 +39648,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(s PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -39953,9 +39683,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39967,21 +39697,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -40006,13 +39736,13 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -40026,7 +39756,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -40035,7 +39765,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_resize__SWIG_1(self, args); @@ -40045,17 +39775,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type)\n" + " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -40067,27 +39800,27 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -40099,7 +39832,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40109,10 +39842,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::size_type arg3 ; + std::vector< ViewShape * >::value_type arg4 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -40127,32 +39860,32 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewShape * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -40177,21 +39910,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_0(self, args); @@ -40201,12 +39934,12 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -40214,7 +39947,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_1(self, args); @@ -40225,15 +39958,18 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::value_type)\n" + " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -40242,16 +39978,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -40272,21 +40008,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewShape * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40304,17 +40040,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewShapesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewShapesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { delete arg1; @@ -40336,14 +40072,14 @@ fail: SWIGINTERN PyObject *ViewShapesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -40352,11 +40088,11 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewEdge_Sm__Sg__iterator(arg1,arg2); @@ -40377,21 +40113,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector< ViewEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40409,21 +40145,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector< ViewEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40441,22 +40177,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); + result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40470,7 +40206,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40479,10 +40215,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; + std::vector< ViewEdge *,std::allocator< ViewEdge * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40494,25 +40230,25 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewEdge *,std::allocator< ViewEdge * > > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40526,7 +40262,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -40535,10 +40271,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; + std::vector< ViewEdge *,std::allocator< ViewEdge * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40552,36 +40288,36 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40609,9 +40345,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40623,21 +40359,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { try { try { @@ -40664,8 +40400,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40674,16 +40410,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); { try { try { @@ -40710,9 +40446,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40721,20 +40457,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40748,7 +40484,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40757,9 +40493,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40771,21 +40507,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { try { @@ -40812,8 +40548,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -40822,16 +40558,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { std_vector_Sl_ViewEdge_Sm__Sg__append(arg1,arg2); @@ -40852,12 +40588,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewEdge * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewEdgesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40866,7 +40602,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -40875,26 +40611,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * > *arg1 = 0 ; + std::vector< ViewEdge * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >((std::vector< ViewEdge * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40903,7 +40639,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -40914,21 +40650,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewEdge * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40946,21 +40682,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewEdge * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40978,17 +40714,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { (arg1)->clear(); @@ -41009,8 +40745,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -41019,19 +40755,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -41052,21 +40788,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + SwigValueWrapper< std::allocator< ViewEdge * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewEdge * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41075,30 +40811,30 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewEdge * >::allocator_type(static_cast< const std::vector< ViewEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewEdge * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41107,7 +40843,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41115,89 +40851,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewEdge * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41206,7 +40876,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41214,89 +40884,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewEdge * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41305,7 +40909,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41313,89 +40917,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewEdge * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41404,7 +40942,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41412,76 +40950,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewEdge * >::size_type arg1 ; + std::vector< ViewEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -41489,12 +40961,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41503,7 +40975,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -41512,17 +40984,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { (arg1)->pop_back(); @@ -41543,8 +41015,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41553,16 +41025,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -41583,9 +41055,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41594,20 +41066,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } { @@ -41621,7 +41093,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41631,10 +41103,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::iterator arg3 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41646,31 +41118,31 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } { @@ -41684,7 +41156,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41698,18 +41170,18 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_0(self, args); } @@ -41717,16 +41189,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_1(self, args); } @@ -41735,16 +41207,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator)\n" + " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * >::size_type arg1 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector< ViewEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -41755,17 +41230,17 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41774,7 +41249,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -41787,7 +41262,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -41806,7 +41281,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_1(self, args); @@ -41820,7 +41295,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_3(self, args); @@ -41829,15 +41304,20 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewEdge)>()\n std::vector<(p.ViewEdge)>(std::vector const &)\n std::vector<(p.ViewEdge)>(std::vector::size_type)\n std::vector<(p.ViewEdge)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewEdge * >()\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * > const &)\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type)\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -41846,16 +41326,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -41876,21 +41356,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41899,7 +41379,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41908,21 +41388,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41931,7 +41411,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41940,9 +41420,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41954,21 +41434,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -41989,9 +41469,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -42003,21 +41483,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -42042,13 +41522,13 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -42062,7 +41542,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -42071,7 +41551,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_resize__SWIG_1(self, args); @@ -42081,17 +41561,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type)\n" + " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42103,27 +41586,27 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -42135,7 +41618,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42145,10 +41628,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::size_type arg3 ; + std::vector< ViewEdge * >::value_type arg4 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42163,32 +41646,32 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewEdge * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -42213,21 +41696,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_0(self, args); @@ -42237,12 +41720,12 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -42250,7 +41733,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_1(self, args); @@ -42261,15 +41744,18 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::value_type)\n" + " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -42278,16 +41764,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -42308,21 +41794,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewEdge * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42340,17 +41826,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { delete arg1; @@ -42372,14 +41858,14 @@ fail: SWIGINTERN PyObject *ViewEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -42388,11 +41874,11 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(sel arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_FEdge_Sm__Sg__iterator(arg1,arg2); @@ -42413,21 +41899,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector< FEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42445,21 +41931,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector< FEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42477,22 +41963,22 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); + result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42506,7 +41992,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42515,10 +42001,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; + std::vector< FEdge *,std::allocator< FEdge * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42530,25 +42016,25 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< FEdge *,std::allocator< FEdge * > > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42562,7 +42048,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -42571,10 +42057,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; + std::vector< FEdge *,std::allocator< FEdge * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42588,36 +42074,36 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< FEdge *,std::allocator< FEdge * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42645,9 +42131,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42659,21 +42145,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { try { try { @@ -42700,8 +42186,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42710,16 +42196,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); { try { try { @@ -42746,9 +42232,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42757,20 +42243,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42784,7 +42270,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42793,9 +42279,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42807,21 +42293,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { try { @@ -42848,8 +42334,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -42858,16 +42344,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { std_vector_Sl_FEdge_Sm__Sg__append(arg1,arg2); @@ -42888,12 +42374,12 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_FEdgesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42902,7 +42388,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -42911,26 +42397,26 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *arg1 = 0 ; + std::vector< FEdge * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >((std::vector< FEdge * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42939,7 +42425,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -42950,21 +42436,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< FEdge * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42982,21 +42468,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< FEdge * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43014,17 +42500,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { (arg1)->clear(); @@ -43045,8 +42531,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -43055,19 +42541,19 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -43088,21 +42574,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + SwigValueWrapper< std::allocator< FEdge * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< FEdge * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43111,30 +42597,30 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< FEdge * >::allocator_type(static_cast< const std::vector< FEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< FEdge * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43143,7 +42629,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43151,89 +42637,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< FEdge * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43242,7 +42662,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43250,89 +42670,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< FEdge * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43341,7 +42695,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43349,89 +42703,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< FEdge * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43440,7 +42728,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43448,76 +42736,10 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< FEdge * >::size_type arg1 ; + std::vector< FEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -43525,12 +42747,12 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43539,7 +42761,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -43548,17 +42770,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { (arg1)->pop_back(); @@ -43579,8 +42801,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43589,16 +42811,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -43619,9 +42841,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43630,20 +42852,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } { @@ -43657,7 +42879,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43667,10 +42889,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::iterator arg3 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43682,31 +42904,31 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); } } { @@ -43720,7 +42942,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43734,18 +42956,18 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_0(self, args); } @@ -43753,16 +42975,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_1(self, args); } @@ -43771,16 +42993,19 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator)\n" + " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * >::size_type arg1 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; + std::vector< FEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -43791,17 +43016,17 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43810,7 +43035,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -43823,7 +43048,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -43842,7 +43067,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_1(self, args); @@ -43856,7 +43081,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_3(self, args); @@ -43865,15 +43090,20 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.FEdge)>()\n std::vector<(p.FEdge)>(std::vector const &)\n std::vector<(p.FEdge)>(std::vector::size_type)\n std::vector<(p.FEdge)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< FEdge * >()\n" + " std::vector< FEdge * >(std::vector< FEdge * > const &)\n" + " std::vector< FEdge * >(std::vector< FEdge * >::size_type)\n" + " std::vector< FEdge * >(std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -43882,16 +43112,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -43912,21 +43142,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43935,7 +43165,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43944,21 +43174,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43967,7 +43197,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43976,9 +43206,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43990,21 +43220,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -44025,9 +43255,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44039,21 +43269,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -44078,13 +43308,13 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -44098,7 +43328,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -44107,7 +43337,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_resize__SWIG_1(self, args); @@ -44117,17 +43347,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type)\n" + " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44139,27 +43372,27 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -44171,7 +43404,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44181,10 +43414,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::size_type arg3 ; + std::vector< FEdge * >::value_type arg4 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44199,32 +43432,32 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< FEdge * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -44249,21 +43482,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_0(self, args); @@ -44273,12 +43506,12 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -44286,7 +43519,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_1(self, args); @@ -44297,15 +43530,18 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::value_type)\n" + " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44314,16 +43550,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -44344,21 +43580,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< FEdge * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44376,17 +43612,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_FEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { delete arg1; @@ -44408,14 +43644,14 @@ fail: SWIGINTERN PyObject *FEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -44424,11 +43660,11 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPA arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewVertex_Sm__Sg__iterator(arg1,arg2); @@ -44449,21 +43685,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector< ViewVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44481,21 +43717,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector< ViewVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44513,22 +43749,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); + result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44542,7 +43778,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44551,10 +43787,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; + std::vector< ViewVertex *,std::allocator< ViewVertex * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44566,25 +43802,25 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewVertex *,std::allocator< ViewVertex * > > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44598,7 +43834,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -44607,10 +43843,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; + std::vector< ViewVertex *,std::allocator< ViewVertex * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44624,36 +43860,36 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44681,9 +43917,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44695,21 +43931,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { try { try { @@ -44736,8 +43972,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44746,16 +43982,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); { try { try { @@ -44782,9 +44018,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44793,20 +44029,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44820,7 +44056,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44829,9 +44065,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44843,21 +44079,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { try { @@ -44884,8 +44120,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -44894,16 +44130,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { std_vector_Sl_ViewVertex_Sm__Sg__append(arg1,arg2); @@ -44924,12 +44160,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewVertex * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewVerticesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44938,7 +44174,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -44947,26 +44183,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * > *arg1 = 0 ; + std::vector< ViewVertex * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >((std::vector< ViewVertex * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44975,7 +44211,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -44986,21 +44222,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewVertex * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45018,21 +44254,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewVertex * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45050,17 +44286,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { (arg1)->clear(); @@ -45081,8 +44317,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -45091,19 +44327,19 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -45124,21 +44360,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + SwigValueWrapper< std::allocator< ViewVertex * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewVertex * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45147,30 +44383,30 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewVertex * >::allocator_type(static_cast< const std::vector< ViewVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewVertex * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45179,7 +44415,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45187,89 +44423,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewVertex * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45278,7 +44448,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45286,89 +44456,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewVertex * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45377,7 +44481,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45385,89 +44489,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewVertex * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45476,7 +44514,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45484,76 +44522,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewVertex * >::size_type arg1 ; + std::vector< ViewVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -45561,12 +44533,12 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45575,7 +44547,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -45584,17 +44556,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { (arg1)->pop_back(); @@ -45615,8 +44587,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -45625,16 +44597,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUN PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -45655,9 +44627,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45666,20 +44638,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } { @@ -45693,7 +44665,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45703,10 +44675,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::iterator arg3 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45718,31 +44690,31 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } { @@ -45756,7 +44728,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45770,18 +44742,18 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_0(self, args); } @@ -45789,16 +44761,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_1(self, args); } @@ -45807,16 +44779,19 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator)\n" + " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * >::size_type arg1 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector< ViewVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -45827,17 +44802,17 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45846,7 +44821,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -45859,7 +44834,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -45878,7 +44853,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_1(self, args); @@ -45892,7 +44867,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_3(self, args); @@ -45901,15 +44876,20 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewVertex)>()\n std::vector<(p.ViewVertex)>(std::vector const &)\n std::vector<(p.ViewVertex)>(std::vector::size_type)\n std::vector<(p.ViewVertex)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewVertex * >()\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * > const &)\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type)\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -45918,16 +44898,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -45948,21 +44928,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45971,7 +44951,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -45980,21 +44960,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46003,7 +44983,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46012,9 +44992,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46026,21 +45006,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -46061,9 +45041,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46075,21 +45055,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -46114,13 +45094,13 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46134,7 +45114,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46143,7 +45123,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_resize__SWIG_1(self, args); @@ -46153,17 +45133,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type)\n" + " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46175,27 +45158,27 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -46207,7 +45190,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46217,10 +45200,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::size_type arg3 ; + std::vector< ViewVertex * >::value_type arg4 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46235,32 +45218,32 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUN PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewVertex * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -46285,21 +45268,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_0(self, args); @@ -46309,12 +45292,12 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -46322,7 +45305,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_1(self, args); @@ -46333,15 +45316,18 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::value_type)\n" + " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46350,16 +45336,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -46380,21 +45366,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewVertex * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46412,17 +45398,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { delete arg1; @@ -46444,14 +45430,14 @@ fail: SWIGINTERN PyObject *ViewVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -46460,11 +45446,11 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_SVertex_Sm__Sg__iterator(arg1,arg2); @@ -46485,21 +45471,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector< SVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46517,21 +45503,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector< SVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46549,22 +45535,22 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); + result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46578,7 +45564,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46587,10 +45573,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; + std::vector< SVertex *,std::allocator< SVertex * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46602,25 +45588,25 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< SVertex *,std::allocator< SVertex * > > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46634,7 +45620,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -46643,10 +45629,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; + std::vector< SVertex *,std::allocator< SVertex * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46660,36 +45646,36 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< SVertex *,std::allocator< SVertex * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46717,9 +45703,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46731,21 +45717,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { try { try { @@ -46772,8 +45758,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46782,16 +45768,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); { try { try { @@ -46818,9 +45804,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46829,20 +45815,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46856,7 +45842,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46865,9 +45851,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46879,21 +45865,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { try { @@ -46920,8 +45906,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -46930,16 +45916,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { std_vector_Sl_SVertex_Sm__Sg__append(arg1,arg2); @@ -46960,12 +45946,12 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< SVertex * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_SVerticesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46974,7 +45960,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -46983,26 +45969,26 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< SVertex * > *arg1 = 0 ; + std::vector< SVertex * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >((std::vector< SVertex * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47011,7 +45997,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -47022,21 +46008,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< SVertex * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47054,21 +46040,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< SVertex * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47086,17 +46072,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { (arg1)->clear(); @@ -47117,8 +46103,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -47127,19 +46113,19 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -47160,21 +46146,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + SwigValueWrapper< std::allocator< SVertex * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< SVertex * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47183,30 +46169,30 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< SVertex * >::allocator_type(static_cast< const std::vector< SVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< SVertex * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47215,7 +46201,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47223,89 +46209,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< SVertex * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47314,7 +46234,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47322,89 +46242,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< SVertex * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47413,7 +46267,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47421,89 +46275,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< SVertex * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47512,7 +46300,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47520,76 +46308,10 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< SVertex * >::size_type arg1 ; + std::vector< SVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -47597,12 +46319,12 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47611,7 +46333,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -47620,17 +46342,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { (arg1)->pop_back(); @@ -47651,8 +46373,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -47661,16 +46383,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -47691,9 +46413,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -47702,20 +46424,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } { @@ -47729,7 +46451,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47739,10 +46461,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::iterator arg3 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -47754,31 +46476,31 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); } } { @@ -47792,7 +46514,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47806,18 +46528,18 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_0(self, args); } @@ -47825,16 +46547,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_1(self, args); } @@ -47843,16 +46565,19 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator)\n" + " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< SVertex * >::size_type arg1 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; + std::vector< SVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -47863,17 +46588,17 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_SVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47882,7 +46607,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -47895,7 +46620,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -47914,7 +46639,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_1(self, args); @@ -47928,7 +46653,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_3(self, args); @@ -47937,15 +46662,20 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.SVertex)>()\n std::vector<(p.SVertex)>(std::vector const &)\n std::vector<(p.SVertex)>(std::vector::size_type)\n std::vector<(p.SVertex)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< SVertex * >()\n" + " std::vector< SVertex * >(std::vector< SVertex * > const &)\n" + " std::vector< SVertex * >(std::vector< SVertex * >::size_type)\n" + " std::vector< SVertex * >(std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -47954,16 +46684,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -47984,21 +46714,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48007,7 +46737,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -48016,21 +46746,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48039,7 +46769,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -48048,9 +46778,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48062,21 +46792,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -48097,9 +46827,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48111,21 +46841,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -48150,13 +46880,13 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -48170,7 +46900,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -48179,7 +46909,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_resize__SWIG_1(self, args); @@ -48189,17 +46919,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type)\n" + " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -48211,27 +46944,27 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -48243,7 +46976,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -48253,10 +46986,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::size_type arg3 ; + std::vector< SVertex * >::value_type arg4 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -48271,32 +47004,32 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< SVertex * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -48321,21 +47054,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_0(self, args); @@ -48345,12 +47078,12 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -48358,7 +47091,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_1(self, args); @@ -48369,15 +47102,18 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::value_type)\n" + " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48386,16 +47122,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -48416,21 +47152,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< SVertex * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48448,17 +47184,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_SVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_SVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { delete arg1; @@ -48480,8 +47216,8 @@ fail: SWIGINTERN PyObject *SVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -48742,7 +47478,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48777,7 +47513,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48812,7 +47548,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48847,7 +47583,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48882,7 +47618,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49028,10 +47764,45 @@ fail: } +SWIGINTERN PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewMap *arg1 = (ViewMap *) 0 ; + ViewMap::id_to_index_map *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewMap_shapeIdToIndexMap",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_shapeIdToIndexMap" "', argument " "1"" of type '" "ViewMap *""'"); + } + arg1 = reinterpret_cast< ViewMap * >(argp1); + { + try { + { + ViewMap::id_to_index_map &_result_ref = (arg1)->shapeIdToIndexMap(); + result = (ViewMap::id_to_index_map *) &_result_ref; + } + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49053,7 +47824,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49263,7 +48034,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - BBox *arg2 = 0 ; + BBox< Geometry::Vec3r > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -49277,17 +48048,17 @@ SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_setScene3dBBox" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } - arg2 = reinterpret_cast< BBox * >(argp2); + arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); { try { - (arg1)->setScene3dBBox((BBox const &)*arg2); + (arg1)->setScene3dBBox((BBox< Geometry::Vec3r > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49345,7 +48116,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_CreateTVertex" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -49353,7 +48124,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_CreateTVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -49366,7 +48137,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewMap_CreateTVertex" "', argument " "4"" of type '" "FEdge *""'"); } arg4 = reinterpret_cast< FEdge * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } @@ -49374,7 +48145,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } arg5 = reinterpret_cast< Geometry::Vec3r * >(argp5); - res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ViewMap_CreateTVertex" "', argument " "6"" of type '" "Geometry::Vec3r const &""'"); } @@ -49417,7 +48188,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; SVertex *arg2 = (SVertex *) 0 ; - std::vector *arg3 = 0 ; + std::vector< ViewEdge * > *arg3 = 0 ; ViewVertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -49440,14 +48211,14 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_InsertViewVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * > * >(argp3); { try { result = (ViewVertex *)(arg1)->InsertViewVertex(arg2,*arg3); @@ -49468,7 +48239,7 @@ fail: SWIGINTERN PyObject *ViewMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewMap, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -49712,7 +48483,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49734,7 +48505,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49744,7 +48515,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49766,7 +48537,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49779,7 +48550,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49803,7 +48574,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n Possible C/C++ prototypes are:\n edges_begin()\n edges_begin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n" + " Possible C/C++ prototypes are:\n" + " edges_begin(ViewVertex *)\n" + " edges_begin(ViewVertex const *)\n"); return NULL; } @@ -49811,7 +48585,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49833,7 +48607,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49843,7 +48617,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49865,7 +48639,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49878,7 +48652,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49902,7 +48676,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(ViewVertex *)\n" + " edges_end(ViewVertex const *)\n"); return NULL; } @@ -49911,7 +48688,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -49941,7 +48718,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49952,7 +48729,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -49982,7 +48759,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49995,7 +48772,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50029,7 +48806,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n Possible C/C++ prototypes are:\n edges_iterator(ViewEdge *)\n edges_iterator(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n" + " Possible C/C++ prototypes are:\n" + " edges_iterator(ViewVertex *,ViewEdge *)\n" + " edges_iterator(ViewVertex const *,ViewEdge *)\n"); return NULL; } @@ -50141,7 +48921,7 @@ fail: SWIGINTERN PyObject *ViewVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -50299,7 +49079,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50427,7 +49207,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50600,7 +49380,7 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50623,7 +49403,10 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n Possible C/C++ prototypes are:\n TVertex()\n TVertex(SVertex *,SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n" + " Possible C/C++ prototypes are:\n" + " TVertex()\n" + " TVertex(SVertex *,SVertex *)\n"); return NULL; } @@ -50720,7 +49503,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50755,7 +49538,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50790,7 +49573,7 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50825,7 +49608,7 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -51007,7 +49790,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51047,7 +49830,10 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeA'.\n Possible C/C++ prototypes are:\n SetFrontEdgeA(ViewEdge *,bool)\n SetFrontEdgeA(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeA'.\n" + " Possible C/C++ prototypes are:\n" + " SetFrontEdgeA(TVertex *,ViewEdge *,bool)\n" + " SetFrontEdgeA(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51147,7 +49933,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51187,7 +49973,10 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeB'.\n Possible C/C++ prototypes are:\n SetFrontEdgeB(ViewEdge *,bool)\n SetFrontEdgeB(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeB'.\n" + " Possible C/C++ prototypes are:\n" + " SetFrontEdgeB(TVertex *,ViewEdge *,bool)\n" + " SetFrontEdgeB(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51287,7 +50076,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51327,7 +50116,10 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeA'.\n Possible C/C++ prototypes are:\n SetBackEdgeA(ViewEdge *,bool)\n SetBackEdgeA(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeA'.\n" + " Possible C/C++ prototypes are:\n" + " SetBackEdgeA(TVertex *,ViewEdge *,bool)\n" + " SetBackEdgeA(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51427,7 +50219,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51467,7 +50259,10 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeB'.\n Possible C/C++ prototypes are:\n SetBackEdgeB(ViewEdge *,bool)\n SetBackEdgeB(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeB'.\n" + " Possible C/C++ prototypes are:\n" + " SetBackEdgeB(TVertex *,ViewEdge *,bool)\n" + " SetBackEdgeB(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51649,7 +50444,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51671,7 +50466,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51681,7 +50476,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51703,7 +50498,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51716,7 +50511,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51740,7 +50535,10 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(TVertex *)\n" + " edges_end(TVertex const *)\n"); return NULL; } @@ -51884,7 +50682,7 @@ fail: SWIGINTERN PyObject *TVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_TVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -52042,7 +50840,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52170,7 +50968,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52366,7 +51164,7 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52384,7 +51182,10 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n Possible C/C++ prototypes are:\n NonTVertex()\n NonTVertex(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n" + " Possible C/C++ prototypes are:\n" + " NonTVertex()\n" + " NonTVertex(SVertex *)\n"); return NULL; } @@ -52481,7 +51282,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -52531,7 +51332,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex::directedViewEdge > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -52545,17 +51346,17 @@ SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_SetViewEdges" "', argument " "1"" of type '" "NonTVertex *""'"); } arg1 = reinterpret_cast< NonTVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex::directedViewEdge > * >(argp2); { try { - (arg1)->SetViewEdges((std::vector const &)*arg2); + (arg1)->SetViewEdges((std::vector< ViewVertex::directedViewEdge > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52746,7 +51547,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52786,7 +51587,10 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n Possible C/C++ prototypes are:\n AddViewEdge(ViewEdge *,bool)\n AddViewEdge(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n" + " Possible C/C++ prototypes are:\n" + " AddViewEdge(NonTVertex *,ViewEdge *,bool)\n" + " AddViewEdge(NonTVertex *,ViewEdge *)\n"); return NULL; } @@ -52843,7 +51647,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -52865,7 +51669,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52875,7 +51679,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -52897,7 +51701,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52910,7 +51714,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52934,7 +51738,10 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(NonTVertex *)\n" + " edges_end(NonTVertex const *)\n"); return NULL; } @@ -53046,7 +51853,7 @@ fail: SWIGINTERN PyObject *NonTVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_NonTVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -53386,7 +52193,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -53457,7 +52264,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n Possible C/C++ prototypes are:\n ViewEdge()\n ViewEdge(ViewVertex *,ViewVertex *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdge()\n" + " ViewEdge(ViewVertex *,ViewVertex *)\n" + " ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n" + " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); return NULL; } @@ -53788,7 +52600,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -53812,7 +52624,10 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(ViewEdge *)\n" + " aShape(ViewEdge const *)\n"); return NULL; } @@ -53852,7 +52667,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -53866,8 +52681,8 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -53877,7 +52692,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -54452,7 +53267,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_intersect_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -54460,7 +53275,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -54508,7 +53323,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_include_in_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -54516,7 +53331,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -55072,7 +53887,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55102,7 +53917,10 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(ViewEdge *,float)\n" + " pointsBegin(ViewEdge *)\n"); return NULL; } @@ -55186,7 +54004,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55216,14 +54034,17 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(ViewEdge *,float)\n" + " pointsEnd(ViewEdge *)\n"); return NULL; } SWIGINTERN PyObject *ViewEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -55375,7 +54196,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55402,7 +54223,11 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n Possible C/C++ prototypes are:\n ViewShape()\n ViewShape(SShape *)\n ViewShape(ViewShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n" + " Possible C/C++ prototypes are:\n" + " ViewShape()\n" + " ViewShape(SShape *)\n" + " ViewShape(ViewShape &)\n"); return NULL; } @@ -55475,9 +54300,9 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector *arg3 = 0 ; - std::vector *arg4 = 0 ; - std::vector *arg5 = 0 ; + std::vector< TVertex * > *arg3 = 0 ; + std::vector< FEdge * > *arg4 = 0 ; + std::vector< ViewEdge * > *arg5 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -55505,33 +54330,33 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector< TVertex * > * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } - arg4 = reinterpret_cast< std::vector * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); } - arg5 = reinterpret_cast< std::vector * >(argp5); + arg5 = reinterpret_cast< std::vector< ViewEdge * > * >(argp5); { try { - (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4,*arg5); + (arg1)->SplitEdge(arg2,(std::vector< TVertex * > const &)*arg3,*arg4,*arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -55617,7 +54442,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55641,7 +54466,10 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n Possible C/C++ prototypes are:\n sshape()\n sshape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n" + " Possible C/C++ prototypes are:\n" + " sshape(ViewShape *)\n" + " sshape(ViewShape const *)\n"); return NULL; } @@ -55649,7 +54477,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -55663,8 +54491,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->vertices(); - result = (std::vector *) &_result_ref; + std::vector< ViewVertex * > &_result_ref = (arg1)->vertices(); + result = (std::vector< ViewVertex * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -55674,7 +54502,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55684,7 +54512,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -55698,8 +54526,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj { try { { - std::vector &_result_ref = (arg1)->edges(); - result = (std::vector *) &_result_ref; + std::vector< ViewEdge * > &_result_ref = (arg1)->edges(); + result = (std::vector< ViewEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -55709,7 +54537,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55791,7 +54619,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -55805,19 +54633,19 @@ SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); } arg2 = ptr; } { try { - (arg1)->SetVertices((std::vector const &)*arg2); + (arg1)->SetVertices((std::vector< ViewVertex * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -55838,7 +54666,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -55852,19 +54680,19 @@ SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), Py } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); } arg2 = ptr; } { try { - (arg1)->SetEdges((std::vector const &)*arg2); + (arg1)->SetEdges((std::vector< ViewEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -56044,7 +54872,7 @@ fail: SWIGINTERN PyObject *ViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -56325,7 +55153,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -56384,7 +55212,13 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewVertexInternal::orientedViewEdgeIterator()\n ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewVertexInternal::orientedViewEdgeIterator()\n" + " ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); return NULL; } @@ -56544,7 +55378,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; - ViewVertex::directedViewEdge *result = 0 ; + ::ViewVertex::directedViewEdge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -56558,8 +55392,8 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject { try { { - ViewVertex::directedViewEdge &_result_ref = ((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator *(); - result = (ViewVertex::directedViewEdge *) &_result_ref; + ::ViewVertex::directedViewEdge &_result_ref = ((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator *(); + result = (::ViewVertex::directedViewEdge *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -56569,7 +55403,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56579,7 +55413,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertexInternal::orientedViewEdgeIterator *arg1 = (ViewVertexInternal::orientedViewEdgeIterator *) 0 ; - ViewVertex::directedViewEdge *result = 0 ; + ::ViewVertex::directedViewEdge *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -56592,7 +55426,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject arg1 = reinterpret_cast< ViewVertexInternal::orientedViewEdgeIterator * >(argp1); { try { - result = (ViewVertex::directedViewEdge *)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator ->(); + result = (::ViewVertex::directedViewEdge *)((ViewVertexInternal::orientedViewEdgeIterator const *)arg1)->operator ->(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -56601,7 +55435,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56641,7 +55475,7 @@ fail: SWIGINTERN PyObject *ViewVertexOrientedViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -56778,7 +55612,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -56825,7 +55659,11 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::SVertexIterator()\n ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdgeInternal::SVertexIterator()\n" + " ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n" + " ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); return NULL; } @@ -57348,7 +56186,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57476,7 +56314,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57830,7 +56668,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57865,7 +56703,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57875,7 +56713,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -57897,7 +56735,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57939,7 +56777,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -57953,8 +56791,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA { try { { - std::vector const &_result_ref = (*arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -57964,7 +56802,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(*result)); + resultobj = swig::from(static_cast< std::vector > >(*result)); return resultobj; fail: return NULL; @@ -58105,7 +56943,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -58129,7 +56967,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(ViewEdgeInternal::SVertexIterator *)\n" + " shape(ViewEdgeInternal::SVertexIterator const *)\n"); return NULL; } @@ -58215,7 +57056,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58258,7 +57099,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58301,7 +57142,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58457,7 +57298,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setDirectionFredo(PyObject *S } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -58544,7 +57385,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_directionFredo(PyObject *SWIG cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -58597,7 +57438,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -58611,19 +57452,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSE } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } arg2 = ptr; } { try { - (*arg1)->SetFEdges((std::vector const &)*arg2); + (*arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -58870,7 +57711,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -58905,7 +57746,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -58937,7 +57778,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -59301,7 +58142,7 @@ fail: SWIGINTERN PyObject *ViewEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -59479,7 +58320,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -59533,7 +58374,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); return NULL; } @@ -60586,7 +59432,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -60610,7 +59456,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(ViewEdgeInternal::ViewEdgeIterator *)\n" + " aShape(ViewEdgeInternal::ViewEdgeIterator const *)\n"); return NULL; } @@ -60714,7 +59563,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -60728,8 +59577,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS { try { { - std::vector &_result_ref = (*arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -60739,7 +59588,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -61314,7 +60163,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -61322,7 +60171,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -61370,7 +60219,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -61378,7 +60227,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -61934,7 +60783,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -61964,7 +60813,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *,float)\n" + " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *)\n"); return NULL; } @@ -62048,7 +60900,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -62078,7 +60930,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *,float)\n" + " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *)\n"); return NULL; } @@ -62182,7 +61037,7 @@ fail: SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -62190,7 +61045,7 @@ SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDP SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< void > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVoid",&obj0)) SWIG_fail; @@ -62199,9 +61054,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVoid(arg1); + result = (UnaryFunction0D< void > *)new SwigDirector_UnaryFunction0DVoid(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< void > *)new UnaryFunction0D< void >(); } } @@ -62212,7 +61067,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62221,17 +61076,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); { try { delete arg1; @@ -62253,7 +61108,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62262,20 +61117,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< void > const *)arg1)->UnaryFunction0D< void >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< void > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62297,7 +61152,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; Interface0DIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -62309,11 +61164,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVoid___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62328,7 +61183,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction0D::operator ()(*arg2); + (arg1)->UnaryFunction0D< void >::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -62352,17 +61207,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62377,15 +61232,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< unsigned int > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; @@ -62394,9 +61249,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DUnsigned(arg1); + result = (UnaryFunction0D< unsigned int > *)new SwigDirector_UnaryFunction0DUnsigned(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< unsigned int > *)new UnaryFunction0D< unsigned int >(); } } @@ -62407,7 +61262,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62416,17 +61271,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { try { delete arg1; @@ -62448,7 +61303,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62457,20 +61312,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< unsigned int > const *)arg1)->UnaryFunction0D< unsigned int >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< unsigned int > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62492,7 +61347,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; Interface0DIterator *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -62505,11 +61360,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62524,7 +61379,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction0D< unsigned int >::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -62548,17 +61403,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62573,15 +61428,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< float > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DFloat",&obj0)) SWIG_fail; @@ -62590,9 +61445,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DFloat(arg1); + result = (UnaryFunction0D< float > *)new SwigDirector_UnaryFunction0DFloat(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< float > *)new UnaryFunction0D< float >(); } } @@ -62603,7 +61458,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62612,17 +61467,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { try { delete arg1; @@ -62644,7 +61499,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62653,20 +61508,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< float > const *)arg1)->UnaryFunction0D< float >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< float > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62688,7 +61543,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; Interface0DIterator *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -62701,11 +61556,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DFloat___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62720,7 +61575,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction0D< float >::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -62744,17 +61599,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62769,15 +61624,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< double > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DDouble",&obj0)) SWIG_fail; @@ -62786,9 +61641,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DDouble(arg1); + result = (UnaryFunction0D< double > *)new SwigDirector_UnaryFunction0DDouble(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< double > *)new UnaryFunction0D< double >(); } } @@ -62799,7 +61654,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62808,17 +61663,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { try { delete arg1; @@ -62840,7 +61695,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62849,20 +61704,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< double > const *)arg1)->UnaryFunction0D< double >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< double > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62884,7 +61739,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; Interface0DIterator *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -62897,11 +61752,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DDouble___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62916,7 +61771,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction0D< double >::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -62940,17 +61795,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62965,15 +61820,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Geometry::Vec2f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec2f",&obj0)) SWIG_fail; @@ -62982,9 +61837,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec2f(arg1); + result = (UnaryFunction0D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction0DVec2f(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Geometry::Vec2f > *)new UnaryFunction0D< Geometry::Vec2f >(); } } @@ -62995,7 +61850,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63004,17 +61859,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); { try { delete arg1; @@ -63036,7 +61891,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63045,20 +61900,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->UnaryFunction0D< VecMat::Vec2< float > >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63080,9 +61935,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63093,11 +61948,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63112,7 +61967,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< VecMat::Vec2< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63127,7 +61982,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -63136,17 +61991,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63161,15 +62016,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Geometry::Vec3f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec3f",&obj0)) SWIG_fail; @@ -63178,9 +62033,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec3f(arg1); + result = (UnaryFunction0D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction0DVec3f(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Geometry::Vec3f > *)new UnaryFunction0D< Geometry::Vec3f >(); } } @@ -63191,7 +62046,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63200,17 +62055,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); { try { delete arg1; @@ -63232,7 +62087,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63241,20 +62096,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->UnaryFunction0D< VecMat::Vec3< float > >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63276,9 +62131,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63289,11 +62144,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63308,7 +62163,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< VecMat::Vec3< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63323,7 +62178,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -63332,17 +62187,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63357,15 +62212,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Id > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DId",&obj0)) SWIG_fail; @@ -63374,9 +62229,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DId(arg1); + result = (UnaryFunction0D< Id > *)new SwigDirector_UnaryFunction0DId(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Id > *)new UnaryFunction0D< Id >(); } } @@ -63387,7 +62242,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63396,17 +62251,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); { try { delete arg1; @@ -63428,7 +62283,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63437,20 +62292,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(se bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DId_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D< Id > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< Id > const *)arg1)->UnaryFunction0D< Id >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Id > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63472,7 +62327,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; Interface0DIterator *arg2 = 0 ; Id result; void *argp1 = 0 ; @@ -63485,11 +62340,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DId___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DId___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63504,7 +62359,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s { try { if (upcall) { - result = (arg1)->UnaryFunction0D::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< Id >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63528,17 +62383,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63553,19 +62408,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DId_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< ViewShape * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< ViewShape * > *)new UnaryFunction0D< ViewShape * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63574,7 +62429,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63583,17 +62438,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); { try { delete arg1; @@ -63615,21 +62470,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); { try { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< ViewShape * > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63647,7 +62502,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; Interface0DIterator *arg2 = 0 ; ViewShape *result = 0 ; void *argp1 = 0 ; @@ -63658,11 +62513,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63691,19 +62546,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *result = 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D > *)new UnaryFunction0D >(); + result = (UnaryFunction0D< std::vector< ViewShape * > > *)new UnaryFunction0D< std::vector< ViewShape * > >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63712,7 +62567,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63721,17 +62576,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); { try { delete arg1; @@ -63753,21 +62608,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); { try { - result = ((UnaryFunction0D > const *)arg1)->getName(); + result = ((UnaryFunction0D< std::vector< ViewShape * > > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63785,9 +62640,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63796,11 +62651,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63820,7 +62675,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -63829,8 +62684,8 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63967,7 +62822,7 @@ fail: SWIGINTERN PyObject *GetXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64105,7 +62960,7 @@ fail: SWIGINTERN PyObject *GetYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64243,7 +63098,7 @@ fail: SWIGINTERN PyObject *GetZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64381,7 +63236,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64519,7 +63374,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64657,7 +63512,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64795,7 +63650,7 @@ fail: SWIGINTERN PyObject *GetCurvilinearAbscissaF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64933,7 +63788,7 @@ fail: SWIGINTERN PyObject *GetParameterF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65007,7 +63862,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65071,7 +63926,7 @@ fail: SWIGINTERN PyObject *VertexOrientation2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65145,7 +64000,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65209,7 +64064,7 @@ fail: SWIGINTERN PyObject *VertexOrientation3DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65347,7 +64202,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65485,7 +64340,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65559,7 +64414,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65623,7 +64478,7 @@ fail: SWIGINTERN PyObject *Normal2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65761,7 +64616,7 @@ fail: SWIGINTERN PyObject *MaterialF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65899,7 +64754,7 @@ fail: SWIGINTERN PyObject *ShapeIdF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66037,7 +64892,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66175,7 +65030,7 @@ fail: SWIGINTERN PyObject *CurveNatureF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66313,7 +65168,7 @@ fail: SWIGINTERN PyObject *GetShapeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66354,7 +65209,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -66387,7 +65242,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -66451,7 +65306,7 @@ fail: SWIGINTERN PyObject *GetOccludersF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66589,7 +65444,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66644,7 +65499,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< void > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVoid",&obj0)) SWIG_fail; @@ -66653,9 +65508,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1); + result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(); } } @@ -66666,7 +65521,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66677,7 +65532,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< void > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -66694,9 +65549,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); + result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(arg2); } } @@ -66707,7 +65562,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66720,7 +65575,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -66746,24 +65601,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(void)>(PyObject *)\n UnaryFunction1D<(void)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< void >(PyObject *)\n" + " UnaryFunction1D< void >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { try { delete arg1; @@ -66785,7 +65643,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -66794,20 +65652,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< void > const *)arg1)->UnaryFunction1D< void >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< void > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -66829,7 +65687,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; Interface1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66841,11 +65699,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVoid___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -66860,7 +65718,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction1D::operator ()(*arg2); + (arg1)->UnaryFunction1D< void >::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -66884,7 +65742,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66894,11 +65752,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIG PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -66924,21 +65782,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< void > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -66956,17 +65814,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -66981,15 +65839,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< unsigned int > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; @@ -66998,9 +65856,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1); + result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(); } } @@ -67011,7 +65869,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67022,7 +65880,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< unsigned int > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67039,9 +65897,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); + result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(arg2); } } @@ -67052,7 +65910,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67065,7 +65923,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67091,24 +65949,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(unsigned int)>(PyObject *)\n UnaryFunction1D<(unsigned int)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< unsigned int >(PyObject *)\n" + " UnaryFunction1D< unsigned int >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { try { delete arg1; @@ -67130,7 +65991,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67139,20 +66000,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< unsigned int > const *)arg1)->UnaryFunction1D< unsigned int >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< unsigned int > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67174,7 +66035,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; Interface1D *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -67187,11 +66048,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67206,7 +66067,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction1D< unsigned int >::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -67230,7 +66091,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67240,11 +66101,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67270,21 +66131,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< unsigned int > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67302,17 +66163,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67327,15 +66188,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< float > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DFloat",&obj0)) SWIG_fail; @@ -67344,9 +66205,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1); + result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(); } } @@ -67357,7 +66218,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67368,7 +66229,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< float > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67385,9 +66246,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); + result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(arg2); } } @@ -67398,7 +66259,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67411,7 +66272,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67437,24 +66298,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(float)>(PyObject *)\n UnaryFunction1D<(float)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< float >(PyObject *)\n" + " UnaryFunction1D< float >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { try { delete arg1; @@ -67476,7 +66340,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67485,20 +66349,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< float > const *)arg1)->UnaryFunction1D< float >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< float > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67520,7 +66384,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; Interface1D *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -67533,11 +66397,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DFloat___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67552,7 +66416,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction1D< float >::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -67576,7 +66440,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67586,11 +66450,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67616,21 +66480,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< float > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67648,17 +66512,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67673,15 +66537,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< double > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DDouble",&obj0)) SWIG_fail; @@ -67690,9 +66554,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1); + result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(); } } @@ -67703,7 +66567,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67714,7 +66578,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< double > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67731,9 +66595,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); + result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(arg2); } } @@ -67744,7 +66608,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67757,7 +66621,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67783,24 +66647,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(double)>(PyObject *)\n UnaryFunction1D<(double)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< double >(PyObject *)\n" + " UnaryFunction1D< double >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { try { delete arg1; @@ -67822,7 +66689,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67831,20 +66698,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< double > const *)arg1)->UnaryFunction1D< double >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< double > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67866,7 +66733,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; Interface1D *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -67879,11 +66746,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DDouble___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67898,7 +66765,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction1D< double >::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -67922,7 +66789,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67932,11 +66799,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SW PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67962,21 +66829,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< double > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67994,17 +66861,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68019,15 +66886,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec2f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec2f",&obj0)) SWIG_fail; @@ -68036,9 +66903,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1); + result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(); } } @@ -68049,7 +66916,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68060,7 +66927,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec2f > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -68077,9 +66944,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); + result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(arg2); } } @@ -68090,7 +66957,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68103,7 +66970,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68129,24 +66996,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< Geometry::Vec2f >(PyObject *)\n" + " UnaryFunction1D< Geometry::Vec2f >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { try { delete arg1; @@ -68168,7 +67038,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -68177,20 +67047,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->UnaryFunction1D< VecMat::Vec2< float > >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -68212,9 +67082,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68225,11 +67095,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68244,7 +67114,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D< VecMat::Vec2< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -68259,7 +67129,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -68268,7 +67138,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68278,11 +67148,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68308,21 +67178,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68340,17 +67210,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68365,15 +67235,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec3f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec3f",&obj0)) SWIG_fail; @@ -68382,9 +67252,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1); + result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(); } } @@ -68395,7 +67265,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68406,7 +67276,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec3f > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -68423,9 +67293,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); + result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(arg2); } } @@ -68436,7 +67306,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68449,7 +67319,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68475,24 +67345,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< Geometry::Vec3f >(PyObject *)\n" + " UnaryFunction1D< Geometry::Vec3f >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { try { delete arg1; @@ -68514,7 +67387,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -68523,20 +67396,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->UnaryFunction1D< VecMat::Vec3< float > >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -68558,9 +67431,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68571,11 +67444,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68590,7 +67463,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D< VecMat::Vec3< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -68605,7 +67478,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -68614,7 +67487,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68624,11 +67497,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68654,21 +67527,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68686,17 +67559,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68711,19 +67584,19 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *result = 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction1DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction1D > *)new UnaryFunction1D >(); + result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68732,7 +67605,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68742,7 +67615,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IntegrationType arg1 ; - UnaryFunction1D > *result = 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -68755,7 +67628,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * arg1 = static_cast< IntegrationType >(val1); { try { - result = (UnaryFunction1D > *)new UnaryFunction1D >(arg1); + result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68764,7 +67637,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68777,7 +67650,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68796,24 +67669,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>()\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>(IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< std::vector< ViewShape * > >()\n" + " UnaryFunction1D< std::vector< ViewShape * > >(IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { delete arg1; @@ -68835,21 +67711,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { - result = ((UnaryFunction1D > const *)arg1)->getName(); + result = ((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68867,9 +67743,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68878,11 +67754,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68902,7 +67778,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -68911,7 +67787,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68921,11 +67797,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68951,21 +67827,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68983,8 +67859,8 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69130,7 +68006,7 @@ fail: SWIGINTERN PyObject *GetXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69196,7 +68072,7 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69215,7 +68091,10 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetYF1D(IntegrationType)\n Functions1D::GetYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetYF1D(IntegrationType)\n" + " Functions1D::GetYF1D()\n"); return NULL; } @@ -69330,7 +68209,7 @@ fail: SWIGINTERN PyObject *GetYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69396,7 +68275,7 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69415,7 +68294,10 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetZF1D(IntegrationType)\n Functions1D::GetZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetZF1D(IntegrationType)\n" + " Functions1D::GetZF1D()\n"); return NULL; } @@ -69530,7 +68412,7 @@ fail: SWIGINTERN PyObject *GetZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69596,7 +68478,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69615,7 +68497,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedXF1D(IntegrationType)\n Functions1D::GetProjectedXF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedXF1D(IntegrationType)\n" + " Functions1D::GetProjectedXF1D()\n"); return NULL; } @@ -69730,7 +68615,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69796,7 +68681,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69815,7 +68700,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedYF1D(IntegrationType)\n Functions1D::GetProjectedYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedYF1D(IntegrationType)\n" + " Functions1D::GetProjectedYF1D()\n"); return NULL; } @@ -69930,7 +68818,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69996,7 +68884,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70015,7 +68903,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedZF1D(IntegrationType)\n Functions1D::GetProjectedZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedZF1D(IntegrationType)\n" + " Functions1D::GetProjectedZF1D()\n"); return NULL; } @@ -70130,7 +69021,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70196,7 +69087,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70215,7 +69106,10 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation2DF1D(IntegrationType)\n Functions1D::Orientation2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Orientation2DF1D(IntegrationType)\n" + " Functions1D::Orientation2DF1D()\n"); return NULL; } @@ -70289,7 +69183,7 @@ SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -70330,7 +69224,7 @@ fail: SWIGINTERN PyObject *Orientation2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70396,7 +69290,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70415,7 +69309,10 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation3DF1D(IntegrationType)\n Functions1D::Orientation3DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Orientation3DF1D(IntegrationType)\n" + " Functions1D::Orientation3DF1D()\n"); return NULL; } @@ -70489,7 +69386,7 @@ SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -70530,7 +69427,7 @@ fail: SWIGINTERN PyObject *Orientation3DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70596,7 +69493,7 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70615,7 +69512,10 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::ZDiscontinuityF1D(IntegrationType)\n Functions1D::ZDiscontinuityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::ZDiscontinuityF1D(IntegrationType)\n" + " Functions1D::ZDiscontinuityF1D()\n"); return NULL; } @@ -70730,7 +69630,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70796,7 +69696,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70815,7 +69715,10 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n Functions1D::QuantitativeInvisibilityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n" + " Functions1D::QuantitativeInvisibilityF1D()\n"); return NULL; } @@ -70930,7 +69833,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70996,7 +69899,7 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71015,7 +69918,10 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n Possible C/C++ prototypes are:\n Functions1D::CurveNatureF1D(IntegrationType)\n Functions1D::CurveNatureF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::CurveNatureF1D(IntegrationType)\n" + " Functions1D::CurveNatureF1D()\n"); return NULL; } @@ -71130,7 +70036,7 @@ fail: SWIGINTERN PyObject *CurveNatureF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71267,7 +70173,7 @@ fail: SWIGINTERN PyObject *TimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71404,7 +70310,7 @@ fail: SWIGINTERN PyObject *IncrementChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71541,7 +70447,7 @@ fail: SWIGINTERN PyObject *ChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71607,7 +70513,7 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71626,7 +70532,10 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Curvature2DAngleF1D(IntegrationType)\n Functions1D::Curvature2DAngleF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Curvature2DAngleF1D(IntegrationType)\n" + " Functions1D::Curvature2DAngleF1D()\n"); return NULL; } @@ -71741,7 +70650,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71807,7 +70716,7 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71826,7 +70735,10 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Normal2DF1D(IntegrationType)\n Functions1D::Normal2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Normal2DF1D(IntegrationType)\n" + " Functions1D::Normal2DF1D()\n"); return NULL; } @@ -71900,7 +70812,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -71941,7 +70853,7 @@ fail: SWIGINTERN PyObject *Normal2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72005,7 +70917,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72038,7 +70950,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72079,7 +70991,7 @@ fail: SWIGINTERN PyObject *GetShapeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72143,7 +71055,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72176,7 +71088,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72217,7 +71129,7 @@ fail: SWIGINTERN PyObject *GetOccludersF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72281,7 +71193,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72314,7 +71226,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72355,7 +71267,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72419,7 +71331,7 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72438,7 +71350,10 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n Possible C/C++ prototypes are:\n setAlwaysRefresh(bool)\n Module::setAlwaysRefresh()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n" + " Possible C/C++ prototypes are:\n" + " setAlwaysRefresh(bool)\n" + " Module::setAlwaysRefresh()\n"); return NULL; } @@ -72502,7 +71417,7 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72521,7 +71436,10 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n Possible C/C++ prototypes are:\n setCausal(bool)\n Module::setCausal()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n" + " Possible C/C++ prototypes are:\n" + " setCausal(bool)\n" + " Module::setCausal()\n"); return NULL; } @@ -72585,7 +71503,7 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72604,7 +71522,10 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n Possible C/C++ prototypes are:\n setDrawable(bool)\n Module::setDrawable()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n" + " Possible C/C++ prototypes are:\n" + " setDrawable(bool)\n" + " Module::setDrawable()\n"); return NULL; } @@ -72735,7 +71656,7 @@ fail: SWIGINTERN PyObject *Module_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Module, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72801,7 +71722,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72820,7 +71741,10 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n Possible C/C++ prototypes are:\n Functions0D::DensityF0D(double)\n Functions0D::DensityF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions0D::DensityF0D(double)\n" + " Functions0D::DensityF0D()\n"); return NULL; } @@ -72935,7 +71859,7 @@ fail: SWIGINTERN PyObject *DensityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__DensityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73001,7 +71925,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73020,7 +71944,10 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n Possible C/C++ prototypes are:\n Functions0D::LocalAverageDepthF0D(real)\n Functions0D::LocalAverageDepthF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions0D::LocalAverageDepthF0D(real)\n" + " Functions0D::LocalAverageDepthF0D()\n"); return NULL; } @@ -73135,7 +72062,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73294,7 +72221,7 @@ fail: SWIGINTERN PyObject *ReadMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73450,7 +72377,7 @@ fail: SWIGINTERN PyObject *ReadSteerableViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73597,7 +72524,7 @@ fail: SWIGINTERN PyObject *ReadCompleteViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73744,7 +72671,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73901,7 +72828,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73958,7 +72885,12 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::DensityF1D(double,IntegrationType,float)\n Functions1D::DensityF1D(double,IntegrationType)\n Functions1D::DensityF1D(double)\n Functions1D::DensityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::DensityF1D(double,IntegrationType,float)\n" + " Functions1D::DensityF1D(double,IntegrationType)\n" + " Functions1D::DensityF1D(double)\n" + " Functions1D::DensityF1D()\n"); return NULL; } @@ -74073,7 +73005,7 @@ fail: SWIGINTERN PyObject *DensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__DensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74157,7 +73089,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74189,7 +73121,10 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n Possible C/C++ prototypes are:\n Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n Functions1D::LocalAverageDepthF1D(real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n" + " Functions1D::LocalAverageDepthF1D(real)\n"); return NULL; } @@ -74304,7 +73239,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74438,7 +73373,7 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74492,7 +73427,11 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); return NULL; } @@ -74607,7 +73546,7 @@ fail: SWIGINTERN PyObject *GetCompleteViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74768,7 +73707,7 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74840,7 +73779,11 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); return NULL; } @@ -74955,7 +73898,7 @@ fail: SWIGINTERN PyObject *GetDirectionalViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75089,7 +74032,7 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75143,7 +74086,11 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n Functions1D::GetSteerableViewMapDensityF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n" + " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n" + " Functions1D::GetSteerableViewMapDensityF1D(int)\n"); return NULL; } @@ -75258,7 +74205,7 @@ fail: SWIGINTERN PyObject *GetSteerableViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75392,7 +74339,7 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75446,7 +74393,11 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n Functions1D::GetViewMapGradientNormF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n" + " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n" + " Functions1D::GetViewMapGradientNormF1D(int)\n"); return NULL; } @@ -75561,7 +74512,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75806,7 +74757,7 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75866,7 +74817,11 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n Possible C/C++ prototypes are:\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n ContextFunctions::LoadMapCF(char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n" + " Possible C/C++ prototypes are:\n" + " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n" + " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n" + " ContextFunctions::LoadMapCF(char const *,char const *)\n"); return NULL; } @@ -76252,7 +75207,7 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -76314,7 +75269,13 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n Possible C/C++ prototypes are:\n AdjacencyIterator()\n AdjacencyIterator(ViewVertex *,bool,bool)\n AdjacencyIterator(ViewVertex *,bool)\n AdjacencyIterator(ViewVertex *)\n AdjacencyIterator(AdjacencyIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n" + " Possible C/C++ prototypes are:\n" + " AdjacencyIterator()\n" + " AdjacencyIterator(ViewVertex *,bool,bool)\n" + " AdjacencyIterator(ViewVertex *,bool)\n" + " AdjacencyIterator(ViewVertex *)\n" + " AdjacencyIterator(AdjacencyIterator const &)\n"); return NULL; } @@ -76919,7 +75880,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -76943,7 +75904,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(AdjacencyIterator *)\n" + " aShape(AdjacencyIterator const *)\n"); return NULL; } @@ -77047,7 +76011,7 @@ fail: SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -77061,8 +76025,8 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( { try { { - std::vector &_result_ref = (*arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -77072,7 +76036,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -77647,7 +76611,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -77655,7 +76619,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -77703,7 +76667,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -77711,7 +76675,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -78267,7 +77231,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78297,7 +77261,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(AdjacencyIterator *,float)\n" + " pointsBegin(AdjacencyIterator *)\n"); return NULL; } @@ -78381,7 +77348,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78411,7 +77378,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(AdjacencyIterator *,float)\n" + " pointsEnd(AdjacencyIterator *)\n"); return NULL; } @@ -78490,7 +77460,7 @@ fail: SWIGINTERN PyObject *AdjacencyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_AdjacencyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -78795,7 +77765,7 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78905,7 +77875,14 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n Possible C/C++ prototypes are:\n ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n ChainingIterator(PyObject *,bool,bool)\n ChainingIterator(PyObject *,bool)\n ChainingIterator(PyObject *)\n ChainingIterator(PyObject *,ChainingIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" + " ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n" + " ChainingIterator(PyObject *,bool,bool)\n" + " ChainingIterator(PyObject *,bool)\n" + " ChainingIterator(PyObject *)\n" + " ChainingIterator(PyObject *,ChainingIterator const &)\n"); return NULL; } @@ -79265,7 +78242,7 @@ fail: SWIGINTERN PyObject *ChainingIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainingIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -79502,7 +78479,7 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -79581,7 +78558,13 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n Possible C/C++ prototypes are:\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n ChainSilhouetteIterator(PyObject *,bool)\n ChainSilhouetteIterator(PyObject *)\n ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n" + " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n" + " ChainSilhouetteIterator(PyObject *,bool)\n" + " ChainSilhouetteIterator(PyObject *)\n" + " ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); return NULL; } @@ -79748,7 +78731,7 @@ fail: SWIGINTERN PyObject *ChainSilhouetteIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainSilhouetteIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80423,7 +79406,7 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 7); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -80676,7 +79659,19 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n Possible C/C++ prototypes are:\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,bool,bool)\n ChainPredicateIterator(PyObject *,bool)\n ChainPredicateIterator(PyObject *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" + " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n" + " ChainPredicateIterator(PyObject *,bool,bool)\n" + " ChainPredicateIterator(PyObject *,bool)\n" + " ChainPredicateIterator(PyObject *)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n" + " ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); return NULL; } @@ -80843,7 +79838,7 @@ fail: SWIGINTERN PyObject *ChainPredicateIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainPredicateIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81039,7 +80034,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81189,7 +80184,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81327,7 +80322,7 @@ fail: SWIGINTERN PyObject *TrueUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81465,7 +80460,7 @@ fail: SWIGINTERN PyObject *FalseUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81661,7 +80656,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81869,7 +80864,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82007,7 +81002,7 @@ fail: SWIGINTERN PyObject *TrueUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82145,7 +81140,7 @@ fail: SWIGINTERN PyObject *FalseUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82211,7 +81206,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -82230,7 +81225,10 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n Predicates1D::QuantitativeInvisibilityUP1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n" + " Predicates1D::QuantitativeInvisibilityUP1D()\n"); return NULL; } @@ -82345,7 +81343,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82483,7 +81481,7 @@ fail: SWIGINTERN PyObject *ContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82621,7 +81619,7 @@ fail: SWIGINTERN PyObject *ExternalContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82768,7 +81766,7 @@ fail: SWIGINTERN PyObject *EqualToTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82915,7 +81913,7 @@ fail: SWIGINTERN PyObject *EqualToChainingTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82999,7 +81997,7 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -83031,7 +82029,10 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n Predicates1D::ShapeUP1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n" + " Predicates1D::ShapeUP1D(unsigned int)\n"); return NULL; } @@ -83146,7 +82147,7 @@ fail: SWIGINTERN PyObject *ShapeUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83296,7 +82297,7 @@ fail: SWIGINTERN PyObject *TrueBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83446,7 +82447,7 @@ fail: SWIGINTERN PyObject *FalseBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83596,7 +82597,7 @@ fail: SWIGINTERN PyObject *Length2DBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83746,7 +82747,7 @@ fail: SWIGINTERN PyObject *SameShapeIdBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83880,7 +82881,7 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -83934,7 +82935,11 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n Predicates1D::ViewMapGradientNormBP1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n" + " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n" + " Predicates1D::ViewMapGradientNormBP1D(int)\n"); return NULL; } @@ -84061,7 +83066,7 @@ fail: SWIGINTERN PyObject *ViewMapGradientNormBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -84145,7 +83150,7 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -84177,7 +83182,10 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::DensityLowerThanUP1D(double,double)\n Predicates1D::DensityLowerThanUP1D(double)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::DensityLowerThanUP1D(double,double)\n" + " Predicates1D::DensityLowerThanUP1D(double)\n"); return NULL; } @@ -84292,7 +83300,7 @@ fail: SWIGINTERN PyObject *DensityLowerThanUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -84406,7 +83414,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator arg2 ; + ::Curve::vertex_container::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; @@ -84423,12 +83431,12 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(s { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___A_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } else { - Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + ::Curve::vertex_container::iterator * temp = reinterpret_cast< ::Curve::vertex_container::iterator * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } @@ -84445,7 +83453,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator result; + ::Curve::vertex_container::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -84457,7 +83465,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(s } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); result = ((arg1)->__A); - resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ::Curve::vertex_container::iterator(static_cast< const ::Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -84467,7 +83475,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator arg2 ; + ::Curve::vertex_container::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; @@ -84484,12 +83492,12 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(s { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator___B_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } else { - Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + ::Curve::vertex_container::iterator * temp = reinterpret_cast< ::Curve::vertex_container::iterator * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } @@ -84506,7 +83514,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator result; + ::Curve::vertex_container::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -84518,7 +83526,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(s } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); result = ((arg1)->__B); - resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ::Curve::vertex_container::iterator(static_cast< const ::Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -84528,7 +83536,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator arg2 ; + ::Curve::vertex_container::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; @@ -84545,12 +83553,12 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPAR { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__begin_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } else { - Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + ::Curve::vertex_container::iterator * temp = reinterpret_cast< ::Curve::vertex_container::iterator * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } @@ -84567,7 +83575,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator result; + ::Curve::vertex_container::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -84579,7 +83587,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPAR } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); result = ((arg1)->_begin); - resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ::Curve::vertex_container::iterator(static_cast< const ::Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -84589,7 +83597,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator arg2 ; + ::Curve::vertex_container::iterator arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; @@ -84606,12 +83614,12 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM( { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Curve__vertex_container__iterator, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "Curve::vertex_container::iterator""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CurvePointIterator__end_set" "', argument " "2"" of type '" "::Curve::vertex_container::iterator""'"); } else { - Curve::vertex_container::iterator * temp = reinterpret_cast< Curve::vertex_container::iterator * >(argp2); + ::Curve::vertex_container::iterator * temp = reinterpret_cast< ::Curve::vertex_container::iterator * >(argp2); arg2 = *temp; if (SWIG_IsNewObj(res2)) delete temp; } @@ -84628,7 +83636,7 @@ fail: SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; - Curve::vertex_container::iterator result; + ::Curve::vertex_container::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -84640,7 +83648,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM( } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); result = ((arg1)->_end); - resultobj = SWIG_NewPointerObj((new Curve::vertex_container::iterator(static_cast< const Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ::Curve::vertex_container::iterator(static_cast< const ::Curve::vertex_container::iterator& >(result))), SWIGTYPE_p_Curve__vertex_container__iterator, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85008,7 +84016,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -85035,7 +84043,11 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n Possible C/C++ prototypes are:\n CurveInternal::CurvePointIterator(float)\n CurveInternal::CurvePointIterator()\n CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n" + " Possible C/C++ prototypes are:\n" + " CurveInternal::CurvePointIterator(float)\n" + " CurveInternal::CurvePointIterator()\n" + " CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); return NULL; } @@ -85464,7 +84476,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85592,7 +84604,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86111,7 +85123,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86146,7 +85158,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86178,7 +85190,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86533,7 +85545,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86542,7 +85554,7 @@ fail: SWIGINTERN PyObject *CurvePointIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -86700,7 +85712,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86828,7 +85840,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -87235,7 +86247,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87292,7 +86304,12 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n Possible C/C++ prototypes are:\n CurvePoint()\n CurvePoint(SVertex *,SVertex *,float)\n CurvePoint(CurvePoint *,CurvePoint *,float)\n CurvePoint(CurvePoint const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n" + " Possible C/C++ prototypes are:\n" + " CurvePoint()\n" + " CurvePoint(SVertex *,SVertex *,float)\n" + " CurvePoint(CurvePoint *,CurvePoint *,float)\n" + " CurvePoint(CurvePoint const &)\n"); return NULL; } @@ -87649,7 +86666,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -87684,7 +86701,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -87716,7 +86733,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -88071,7 +87088,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -88080,7 +87097,7 @@ fail: SWIGINTERN PyObject *CurvePoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurvePoint, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -88184,7 +87201,7 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88209,7 +87226,11 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n Possible C/C++ prototypes are:\n Curve()\n Curve(Id const &)\n Curve(Curve const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n" + " Possible C/C++ prototypes are:\n" + " Curve()\n" + " Curve(Id const &)\n" + " Curve(Curve const &)\n"); return NULL; } @@ -88363,7 +87384,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88397,7 +87418,10 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n Possible C/C++ prototypes are:\n push_vertex_back(Curve::Vertex *)\n push_vertex_back(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n" + " Possible C/C++ prototypes are:\n" + " push_vertex_back(Curve *,Curve::Vertex *)\n" + " push_vertex_back(Curve *,SVertex *)\n"); return NULL; } @@ -88488,7 +87512,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88522,7 +87546,10 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n Possible C/C++ prototypes are:\n push_vertex_front(Curve::Vertex *)\n push_vertex_front(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n" + " Possible C/C++ prototypes are:\n" + " push_vertex_front(Curve *,Curve::Vertex *)\n" + " push_vertex_front(Curve *,SVertex *)\n"); return NULL; } @@ -88777,7 +87804,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88807,7 +87834,10 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n Possible C/C++ prototypes are:\n curvePointsBegin(float)\n curvePointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " curvePointsBegin(Curve *,float)\n" + " curvePointsBegin(Curve *)\n"); return NULL; } @@ -88891,7 +87921,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88921,7 +87951,10 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n Possible C/C++ prototypes are:\n curvePointsEnd(float)\n curvePointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " curvePointsEnd(Curve *,float)\n" + " curvePointsEnd(Curve *)\n"); return NULL; } @@ -89133,7 +88166,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89163,7 +88196,10 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Curve *,float)\n" + " pointsBegin(Curve *)\n"); return NULL; } @@ -89247,7 +88283,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89277,14 +88313,17 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Curve *,float)\n" + " pointsEnd(Curve *)\n"); return NULL; } SWIGINTERN PyObject *Curve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Curve, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -89412,7 +88451,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89445,7 +88484,11 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n Possible C/C++ prototypes are:\n StrokeInternal::StrokeVertexIterator()\n StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeInternal::StrokeVertexIterator()\n" + " StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n" + " StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); return NULL; } @@ -90003,7 +89046,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90086,7 +89129,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -90110,7 +89153,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n" + " Possible C/C++ prototypes are:\n" + " attribute(StrokeInternal::StrokeVertexIterator const *)\n" + " attribute(StrokeInternal::StrokeVertexIterator *)\n"); return NULL; } @@ -90325,7 +89371,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -90357,7 +89403,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -90367,7 +89413,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObjec int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeVertexIterator_SetPoint__SWIG_1(self, args); @@ -90397,7 +89443,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_SetPoint'.\n Possible C/C++ prototypes are:\n SetPoint(real,real)\n SetPoint(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_SetPoint'.\n" + " Possible C/C++ prototypes are:\n" + " SetPoint(StrokeInternal::StrokeVertexIterator *,real,real)\n" + " SetPoint(StrokeInternal::StrokeVertexIterator *,Geometry::Vec2f const &)\n"); return NULL; } @@ -90646,7 +89695,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90774,7 +89823,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91293,7 +90342,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -91328,7 +90377,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -91360,7 +90409,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91715,7 +90764,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91724,7 +90773,7 @@ fail: SWIGINTERN PyObject *StrokeVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -91926,7 +90975,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 6); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92001,7 +91050,12 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n Possible C/C++ prototypes are:\n StrokeAttribute()\n StrokeAttribute(StrokeAttribute const &)\n StrokeAttribute(float,float,float,float,float,float)\n StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeAttribute()\n" + " StrokeAttribute(StrokeAttribute const &)\n" + " StrokeAttribute(float,float,float,float,float,float)\n" + " StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); return NULL; } @@ -92191,7 +91245,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -92351,7 +91405,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -92469,7 +91523,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -92513,7 +91567,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -92729,7 +91783,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSED SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setColor" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "Geometry::Vec3f const &""'"); } @@ -92761,7 +91815,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92771,7 +91825,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setColor__SWIG_1(self, args); @@ -92807,7 +91861,10 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n Possible C/C++ prototypes are:\n setColor(float,float,float)\n setColor(Geometry::Vec3f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n" + " Possible C/C++ prototypes are:\n" + " setColor(StrokeAttribute *,float,float,float)\n" + " setColor(StrokeAttribute *,Geometry::Vec3f const &)\n"); return NULL; } @@ -92918,7 +91975,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setThickness" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -92950,7 +92007,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92960,7 +92017,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setThickness__SWIG_1(self, args); @@ -92990,7 +92047,10 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n Possible C/C++ prototypes are:\n setThickness(float,float)\n setThickness(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n" + " Possible C/C++ prototypes are:\n" + " setThickness(StrokeAttribute *,float,float)\n" + " setThickness(StrokeAttribute *,Geometry::Vec2f const &)\n"); return NULL; } @@ -93114,7 +92174,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -93169,7 +92229,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "3"" of type '" "Geometry::Vec3f const &""'"); } @@ -93199,7 +92259,7 @@ fail: SWIGINTERN PyObject *StrokeAttribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeAttribute, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -93458,7 +92518,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93526,7 +92586,14 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n Possible C/C++ prototypes are:\n StrokeVertex()\n StrokeVertex(StrokeVertex const &)\n StrokeVertex(SVertex *)\n StrokeVertex(CurvePoint *)\n StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n StrokeVertex(SVertex *,StrokeAttribute const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeVertex()\n" + " StrokeVertex(StrokeVertex const &)\n" + " StrokeVertex(SVertex *)\n" + " StrokeVertex(CurvePoint *)\n" + " StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n" + " StrokeVertex(SVertex *,StrokeAttribute const &)\n"); return NULL; } @@ -93652,7 +92719,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -93735,7 +92802,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93759,7 +92826,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n" + " Possible C/C++ prototypes are:\n" + " attribute(StrokeVertex const *)\n" + " attribute(StrokeVertex *)\n"); return NULL; } @@ -94006,7 +93076,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -94038,7 +93108,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94048,7 +93118,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeVertex_SetPoint__SWIG_1(self, args); @@ -94078,7 +93148,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_SetPoint'.\n Possible C/C++ prototypes are:\n SetPoint(real,real)\n SetPoint(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_SetPoint'.\n" + " Possible C/C++ prototypes are:\n" + " SetPoint(StrokeVertex *,real,real)\n" + " SetPoint(StrokeVertex *,Geometry::Vec2f const &)\n"); return NULL; } @@ -94208,7 +93281,7 @@ fail: SWIGINTERN PyObject *StrokeVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -94341,7 +93414,7 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94358,7 +93431,10 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n Possible C/C++ prototypes are:\n Stroke()\n Stroke(Stroke const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n" + " Possible C/C++ prototypes are:\n" + " Stroke()\n" + " Stroke(Stroke const &)\n"); return NULL; } @@ -94522,7 +93598,7 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94558,7 +93634,10 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n Possible C/C++ prototypes are:\n Resample(int)\n Resample(float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n" + " Possible C/C++ prototypes are:\n" + " Resample(Stroke *,int)\n" + " Resample(Stroke *,float)\n"); return NULL; } @@ -94970,7 +94049,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94994,7 +94073,10 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n Possible C/C++ prototypes are:\n viewedges_begin()\n viewedges_begin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n" + " Possible C/C++ prototypes are:\n" + " viewedges_begin(Stroke const *)\n" + " viewedges_begin(Stroke *)\n"); return NULL; } @@ -95069,7 +94151,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95093,7 +94175,10 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n Possible C/C++ prototypes are:\n viewedges_end()\n viewedges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n" + " Possible C/C++ prototypes are:\n" + " viewedges_end(Stroke const *)\n" + " viewedges_end(Stroke *)\n"); return NULL; } @@ -95155,7 +94240,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -95251,7 +94336,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -95662,7 +94747,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIG SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -95743,7 +94828,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObje int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95753,7 +94838,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObje int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Stroke_SetBeginningOrientation__SWIG_0(self, args); @@ -95783,7 +94868,10 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetBeginningOrientation'.\n Possible C/C++ prototypes are:\n SetBeginningOrientation(Geometry::Vec2r const &)\n SetBeginningOrientation(real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetBeginningOrientation'.\n" + " Possible C/C++ prototypes are:\n" + " SetBeginningOrientation(Stroke *,Geometry::Vec2r const &)\n" + " SetBeginningOrientation(Stroke *,real,real)\n"); return NULL; } @@ -95805,7 +94893,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -95886,7 +94974,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95896,7 +94984,7 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Stroke_SetEndingOrientation__SWIG_0(self, args); @@ -95926,7 +95014,10 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetEndingOrientation'.\n Possible C/C++ prototypes are:\n SetEndingOrientation(Geometry::Vec2r const &)\n SetEndingOrientation(real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetEndingOrientation'.\n" + " Possible C/C++ prototypes are:\n" + " SetEndingOrientation(Stroke *,Geometry::Vec2r const &)\n" + " SetEndingOrientation(Stroke *,real,real)\n"); return NULL; } @@ -96010,7 +95101,7 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96040,7 +95131,10 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n Possible C/C++ prototypes are:\n strokeVerticesBegin(float)\n strokeVerticesBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n" + " Possible C/C++ prototypes are:\n" + " strokeVerticesBegin(Stroke *,float)\n" + " strokeVerticesBegin(Stroke *)\n"); return NULL; } @@ -96252,7 +95346,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96282,7 +95376,10 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Stroke *,float)\n" + " pointsBegin(Stroke *)\n"); return NULL; } @@ -96366,7 +95463,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96396,21 +95493,24 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Stroke *,float)\n" + " pointsEnd(Stroke *)\n"); return NULL; } SWIGINTERN PyObject *Stroke_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Stroke, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -96419,11 +95519,11 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(se arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_StrokeShader_Sm__Sg__iterator(arg1,arg2); @@ -96444,21 +95544,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector< StrokeShader * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96476,21 +95576,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector< StrokeShader * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96508,22 +95608,22 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); + result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96537,7 +95637,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96546,10 +95646,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; + std::vector< StrokeShader *,std::allocator< StrokeShader * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96561,25 +95661,25 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< StrokeShader *,std::allocator< StrokeShader * > > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96593,7 +95693,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -96602,10 +95702,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; + std::vector< StrokeShader *,std::allocator< StrokeShader * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96619,36 +95719,36 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPAR PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96676,9 +95776,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96690,21 +95790,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { try { try { @@ -96731,8 +95831,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96741,16 +95841,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); { try { try { @@ -96777,9 +95877,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96788,20 +95888,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96815,7 +95915,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96824,9 +95924,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96838,21 +95938,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { try { @@ -96879,8 +95979,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -96889,16 +95989,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { std_vector_Sl_StrokeShader_Sm__Sg__append(arg1,arg2); @@ -96919,12 +96019,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< StrokeShader * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ShadersContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96933,7 +96033,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -96942,26 +96042,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< StrokeShader * > *arg1 = 0 ; + std::vector< StrokeShader * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >((std::vector< StrokeShader * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96970,7 +96070,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -96981,21 +96081,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< StrokeShader * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97013,21 +96113,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< StrokeShader * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97045,17 +96145,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { (arg1)->clear(); @@ -97076,8 +96176,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -97086,19 +96186,19 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -97119,21 +96219,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + SwigValueWrapper< std::allocator< StrokeShader * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< StrokeShader * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97142,30 +96242,30 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< StrokeShader * >::allocator_type(static_cast< const std::vector< StrokeShader * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< StrokeShader * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97174,7 +96274,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97182,89 +96282,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< StrokeShader * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97273,7 +96307,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97281,89 +96315,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< StrokeShader * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97372,7 +96340,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97380,89 +96348,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< StrokeShader * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97471,7 +96373,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97479,76 +96381,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< StrokeShader * >::size_type arg1 ; + std::vector< StrokeShader * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -97556,12 +96392,12 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97570,7 +96406,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -97579,17 +96415,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { (arg1)->pop_back(); @@ -97610,8 +96446,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -97620,16 +96456,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -97650,9 +96486,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97661,20 +96497,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } { @@ -97688,7 +96524,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97698,10 +96534,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::iterator arg3 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97713,31 +96549,31 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } { @@ -97751,7 +96587,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97765,18 +96601,18 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_0(self, args); } @@ -97784,16 +96620,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_1(self, args); } @@ -97802,16 +96638,19 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator)\n" + " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< StrokeShader * >::size_type arg1 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector< StrokeShader * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -97822,17 +96661,17 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"OO:new_ShadersContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97841,7 +96680,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -97854,7 +96693,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -97873,7 +96712,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_1(self, args); @@ -97887,7 +96726,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_3(self, args); @@ -97896,15 +96735,20 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.StrokeShader)>()\n std::vector<(p.StrokeShader)>(std::vector const &)\n std::vector<(p.StrokeShader)>(std::vector::size_type)\n std::vector<(p.StrokeShader)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< StrokeShader * >()\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * > const &)\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type)\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -97913,16 +96757,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -97943,21 +96787,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97966,7 +96810,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -97975,21 +96819,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97998,7 +96842,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -98007,9 +96851,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98021,21 +96865,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -98056,9 +96900,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98070,21 +96914,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -98109,13 +96953,13 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -98129,7 +96973,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -98138,7 +96982,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_resize__SWIG_1(self, args); @@ -98148,17 +96992,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type)\n" + " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -98170,27 +97017,27 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -98202,7 +97049,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -98212,10 +97059,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::size_type arg3 ; + std::vector< StrokeShader * >::value_type arg4 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -98230,32 +97077,32 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< StrokeShader * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -98280,21 +97127,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_0(self, args); @@ -98304,12 +97151,12 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -98317,7 +97164,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_1(self, args); @@ -98328,15 +97175,18 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::value_type)\n" + " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98345,16 +97195,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -98375,21 +97225,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< StrokeShader * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -98407,17 +97257,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ShadersContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ShadersContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { delete arg1; @@ -98439,8 +97289,8 @@ fail: SWIGINTERN PyObject *ShadersContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98634,7 +97484,7 @@ fail: SWIGINTERN PyObject *StrokeShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98780,7 +97630,7 @@ fail: SWIGINTERN PyObject *ConstantThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98926,7 +97776,7 @@ fail: SWIGINTERN PyObject *ConstantExternThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99049,7 +97899,7 @@ fail: SWIGINTERN PyObject *IncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99181,7 +98031,7 @@ fail: SWIGINTERN PyObject *ConstrainedIncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99304,7 +98154,7 @@ fail: SWIGINTERN PyObject *LengthDependingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99505,7 +98355,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99579,7 +98429,12 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); return NULL; } @@ -99661,7 +98516,7 @@ fail: SWIGINTERN PyObject *ThicknessVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99736,7 +98591,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99761,7 +98616,10 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessNoiseShader()\n StrokeShaders::ThicknessNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ThicknessNoiseShader()\n" + " StrokeShaders::ThicknessNoiseShader(float,float)\n"); return NULL; } @@ -99843,7 +98701,7 @@ fail: SWIGINTERN PyObject *ThicknessNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99963,7 +98821,7 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100019,7 +98877,10 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ConstantColorShader(float,float,float,float)\n StrokeShaders::ConstantColorShader(float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ConstantColorShader(float,float,float,float)\n" + " StrokeShaders::ConstantColorShader(float,float,float)\n"); return NULL; } @@ -100133,7 +98994,7 @@ fail: SWIGINTERN PyObject *ConstantColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100310,7 +99171,7 @@ fail: SWIGINTERN PyObject *IncreasingColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100398,7 +99259,7 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100426,7 +99287,10 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n StrokeShaders::ColorVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n" + " StrokeShaders::ColorVariationPatternShader(std::string const)\n"); return NULL; } @@ -100508,7 +99372,7 @@ fail: SWIGINTERN PyObject *ColorVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100574,7 +99438,7 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100593,7 +99457,10 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::MaterialColorShader(float)\n StrokeShaders::MaterialColorShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::MaterialColorShader(float)\n" + " StrokeShaders::MaterialColorShader()\n"); return NULL; } @@ -100675,7 +99542,7 @@ fail: SWIGINTERN PyObject *MaterialColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100689,7 +99556,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicColorShader(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_CalligraphicColorShader",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CalligraphicColorShader" "', argument " "1"" of type '" "Geometry::Vec2d const &""'"); } @@ -100792,7 +99659,7 @@ fail: SWIGINTERN PyObject *CalligraphicColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100867,7 +99734,7 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100892,7 +99759,10 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorNoiseShader()\n StrokeShaders::ColorNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ColorNoiseShader()\n" + " StrokeShaders::ColorNoiseShader(float,float)\n"); return NULL; } @@ -100974,7 +99844,7 @@ fail: SWIGINTERN PyObject *ColorNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101088,7 +99958,7 @@ fail: SWIGINTERN PyObject *TextureAssignerShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101228,7 +100098,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101276,7 +100146,11 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n StrokeShaders::StrokeTextureShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n" + " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n" + " StrokeShaders::StrokeTextureShader(std::string const)\n"); return NULL; } @@ -101358,7 +100232,7 @@ fail: SWIGINTERN PyObject *StrokeTextureShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101424,7 +100298,7 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101443,7 +100317,10 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BackboneStretcherShader(float)\n StrokeShaders::BackboneStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::BackboneStretcherShader(float)\n" + " StrokeShaders::BackboneStretcherShader()\n"); return NULL; } @@ -101525,7 +100402,7 @@ fail: SWIGINTERN PyObject *BackboneStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101639,7 +100516,7 @@ fail: SWIGINTERN PyObject *SamplingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101705,7 +100582,7 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101724,7 +100601,10 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ExternalContourStretcherShader(float)\n StrokeShaders::ExternalContourStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ExternalContourStretcherShader(float)\n" + " StrokeShaders::ExternalContourStretcherShader()\n"); return NULL; } @@ -101806,7 +100686,7 @@ fail: SWIGINTERN PyObject *ExternalContourStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101911,7 +100791,7 @@ fail: SWIGINTERN PyObject *BSplineShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101977,7 +100857,7 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101996,7 +100876,10 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BezierCurveShader(float)\n StrokeShaders::BezierCurveShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::BezierCurveShader(float)\n" + " StrokeShaders::BezierCurveShader()\n"); return NULL; } @@ -102078,7 +100961,7 @@ fail: SWIGINTERN PyObject *BezierCurveShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102201,7 +101084,7 @@ fail: SWIGINTERN PyObject *InflateShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102315,7 +101198,7 @@ fail: SWIGINTERN PyObject *PolygonalizationShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102429,7 +101312,7 @@ fail: SWIGINTERN PyObject *GuidingLinesShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102543,7 +101426,7 @@ fail: SWIGINTERN PyObject *TipRemoverShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102680,7 +101563,7 @@ fail: SWIGINTERN PyObject *streamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__streamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102829,7 +101712,7 @@ fail: SWIGINTERN PyObject *fstreamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102865,7 +101748,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicShader(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CalligraphicShader" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CalligraphicShader" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -102973,7 +101856,7 @@ fail: SWIGINTERN PyObject *CalligraphicShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CalligraphicShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103123,7 +102006,7 @@ fail: SWIGINTERN PyObject *SpatialNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SpatialNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103300,7 +102183,7 @@ fail: SWIGINTERN PyObject *SmoothingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SmoothingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103508,7 +102391,7 @@ fail: SWIGINTERN PyObject *Smoother_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Smoother, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103649,7 +102532,7 @@ fail: SWIGINTERN PyObject *Omitter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Omitter, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103790,7 +102673,7 @@ fail: SWIGINTERN PyObject *OmissionShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_OmissionShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103833,7 +102716,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; - UnaryFunction1D *arg3 = 0 ; + UnaryFunction1D< void > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -103861,14 +102744,14 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); } arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DT_void_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); } - arg3 = reinterpret_cast< UnaryFunction1D * >(argp3); + arg3 = reinterpret_cast< UnaryFunction1D< void > * >(argp3); { try { Operators::chain(*arg1,*arg2,*arg3); @@ -103939,7 +102822,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -103968,7 +102851,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DT_void_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Operators_chain__SWIG_0(self, args); @@ -103978,7 +102861,10 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n Possible C/C++ prototypes are:\n chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D &)\n Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n" + " Possible C/C++ prototypes are:\n" + " chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D< void > &)\n" + " Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); return NULL; } @@ -104069,7 +102955,7 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104098,7 +102984,10 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n Possible C/C++ prototypes are:\n bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n Operators::bidirectionalChain(ChainingIterator &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n" + " Possible C/C++ prototypes are:\n" + " bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n" + " Operators::bidirectionalChain(ChainingIterator &)\n"); return NULL; } @@ -104287,7 +103176,7 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104351,14 +103240,19 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n Possible C/C++ prototypes are:\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n sequentialSplit(UnaryPredicate0D &,float)\n Operators::sequentialSplit(UnaryPredicate0D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n" + " Possible C/C++ prototypes are:\n" + " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n" + " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n" + " sequentialSplit(UnaryPredicate0D &,float)\n" + " Operators::sequentialSplit(UnaryPredicate0D &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; float arg3 ; void *argp1 = 0 ; @@ -104372,14 +103266,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -104413,7 +103307,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -104423,14 +103317,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Operators_recursiveSplit",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -104459,7 +103353,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; float arg4 ; @@ -104477,14 +103371,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:Operators_recursiveSplit",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -104526,7 +103420,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; void *argp1 = 0 ; @@ -104540,14 +103434,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -104588,14 +103482,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104609,7 +103503,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104629,7 +103523,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104648,7 +103542,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104672,7 +103566,12 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n Possible C/C++ prototypes are:\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &,float)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n Operators::recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n" + " Possible C/C++ prototypes are:\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &,float)\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &)\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n" + " Operators::recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); return NULL; } @@ -104714,7 +103613,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; UnaryPredicate1D *arg1 = 0 ; - std::vector arg2 ; + std::vector< StrokeShader * > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -104730,10 +103629,10 @@ SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyOb } arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector< StrokeShader * >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -104955,7 +103854,7 @@ fail: SWIGINTERN PyObject *Operators_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Operators, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -105073,7 +103972,7 @@ fail: SWIGINTERN PyObject *ltstr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ltstr, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -105858,7 +104757,7 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -105933,7 +104832,11 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n Possible C/C++ prototypes are:\n loadMap(char const *,char const *,unsigned int,float)\n loadMap(char const *,char const *,unsigned int)\n loadMap(char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n" + " Possible C/C++ prototypes are:\n" + " loadMap(Canvas *,char const *,char const *,unsigned int,float)\n" + " loadMap(Canvas *,char const *,char const *,unsigned int)\n" + " loadMap(Canvas *,char const *,char const *)\n"); return NULL; } @@ -106151,7 +105054,7 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -106175,7 +105078,10 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n Possible C/C++ prototypes are:\n selectedFEdge()\n selectedFEdge()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n" + " Possible C/C++ prototypes are:\n" + " selectedFEdge(Canvas const *)\n" + " selectedFEdge(Canvas *)\n"); return NULL; } @@ -106279,7 +105185,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -106301,7 +105207,7 @@ SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -106837,7 +105743,7 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -106867,7 +105773,10 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n Possible C/C++ prototypes are:\n changePaperTexture(bool)\n changePaperTexture()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n" + " Possible C/C++ prototypes are:\n" + " changePaperTexture(Canvas *,bool)\n" + " changePaperTexture(Canvas *)\n"); return NULL; } @@ -106980,7 +105889,7 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -107010,7 +105919,10 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n Possible C/C++ prototypes are:\n resetModified(bool)\n resetModified()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n" + " Possible C/C++ prototypes are:\n" + " resetModified(Canvas *,bool)\n" + " resetModified(Canvas *)\n"); return NULL; } @@ -107018,7 +105930,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector > *arg2 = 0 ; + std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; @@ -107036,14 +105948,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } - arg2 = reinterpret_cast< std::vector > * >(argp2); + arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_causalStyleModules" "', argument " "3"" of type '" "unsigned int""'"); @@ -107070,7 +105982,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector > *arg2 = 0 ; + std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -107084,14 +105996,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } - arg2 = reinterpret_cast< std::vector > * >(argp2); + arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); { try { (arg1)->causalStyleModules(*arg2); @@ -107116,7 +106028,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -107127,7 +106039,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Canvas_causalStyleModules__SWIG_1(self, args); @@ -107141,7 +106053,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -107156,7 +106068,10 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n Possible C/C++ prototypes are:\n causalStyleModules(std::vector > &,unsigned int)\n causalStyleModules(std::vector > &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n" + " Possible C/C++ prototypes are:\n" + " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &,unsigned int)\n" + " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &)\n"); return NULL; } @@ -107212,7 +106127,7 @@ fail: SWIGINTERN PyObject *Canvas_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Canvas, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -107233,7 +106148,7 @@ SWIGINTERN PyObject *_wrap_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,SVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107265,7 +106180,7 @@ SWIGINTERN PyObject *_wrap_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,ViewVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107297,7 +106212,7 @@ SWIGINTERN PyObject *_wrap_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,TVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107329,7 +106244,7 @@ SWIGINTERN PyObject *_wrap_castToCurvePoint(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,CurvePoint >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107361,7 +106276,7 @@ SWIGINTERN PyObject *_wrap_castToStrokeVertex(PyObject *SWIGUNUSEDPARM(self), Py arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,StrokeVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107393,7 +106308,7 @@ SWIGINTERN PyObject *_wrap_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,NonTVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107425,7 +106340,7 @@ SWIGINTERN PyObject *_wrap_castToFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,FEdge >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107457,7 +106372,7 @@ SWIGINTERN PyObject *_wrap_castToViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObje arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,ViewEdge >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107489,7 +106404,7 @@ SWIGINTERN PyObject *_wrap_castToStroke(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Stroke >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107521,7 +106436,7 @@ SWIGINTERN PyObject *_wrap_castToChain(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Chain >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107866,6 +106781,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Material___ne__", _wrap_Material___ne__, METH_VARARGS, NULL}, { (char *)"Material___eq__", _wrap_Material___eq__, METH_VARARGS, NULL}, { (char *)"Material_swigregister", Material_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_Interface0D", _wrap_delete_Interface0D, METH_VARARGS, NULL}, { (char *)"Interface0D_getExactTypeName", _wrap_Interface0D_getExactTypeName, METH_VARARGS, NULL}, { (char *)"Interface0D_getX", _wrap_Interface0D_getX, METH_VARARGS, NULL}, { (char *)"Interface0D_getY", _wrap_Interface0D_getY, METH_VARARGS, NULL}, @@ -107883,7 +106799,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Interface0D_castToNonTVertex", _wrap_Interface0D_castToNonTVertex, METH_VARARGS, NULL}, { (char *)"Interface0D_castToTVertex", _wrap_Interface0D_castToTVertex, METH_VARARGS, NULL}, { (char *)"new_Interface0D", _wrap_new_Interface0D, METH_VARARGS, NULL}, - { (char *)"delete_Interface0D", _wrap_delete_Interface0D, METH_VARARGS, NULL}, { (char *)"Interface0D_swigregister", Interface0D_swigregister, METH_VARARGS, NULL}, { (char *)"delete_Interface0DIteratorNested", _wrap_delete_Interface0DIteratorNested, METH_VARARGS, NULL}, { (char *)"Interface0DIteratorNested_getExactTypeName", _wrap_Interface0DIteratorNested_getExactTypeName, METH_VARARGS, NULL}, @@ -107943,6 +106858,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Interface0DIterator_castToNonTVertex", _wrap_Interface0DIterator_castToNonTVertex, METH_VARARGS, NULL}, { (char *)"Interface0DIterator_castToTVertex", _wrap_Interface0DIterator_castToTVertex, METH_VARARGS, NULL}, { (char *)"Interface0DIterator_swigregister", Interface0DIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_Interface1D", _wrap_delete_Interface1D, METH_VARARGS, NULL}, { (char *)"Interface1D_getExactTypeName", _wrap_Interface1D_getExactTypeName, METH_VARARGS, NULL}, { (char *)"Interface1D_verticesBegin", _wrap_Interface1D_verticesBegin, METH_VARARGS, NULL}, { (char *)"Interface1D_verticesEnd", _wrap_Interface1D_verticesEnd, METH_VARARGS, NULL}, @@ -107953,7 +106869,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Interface1D_getNature", _wrap_Interface1D_getNature, METH_VARARGS, NULL}, { (char *)"Interface1D_getTimeStamp", _wrap_Interface1D_getTimeStamp, METH_VARARGS, NULL}, { (char *)"Interface1D_setTimeStamp", _wrap_Interface1D_setTimeStamp, METH_VARARGS, NULL}, - { (char *)"delete_Interface1D", _wrap_delete_Interface1D, METH_VARARGS, NULL}, { (char *)"Interface1D_swigregister", Interface1D_swigregister, METH_VARARGS, NULL}, { (char *)"integrateUnsigned", _wrap_integrateUnsigned, METH_VARARGS, NULL}, { (char *)"integrateFloat", _wrap_integrateFloat, METH_VARARGS, NULL}, @@ -108383,6 +107298,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewMap_viewedges_end", _wrap_ViewMap_viewedges_end, METH_VARARGS, NULL}, { (char *)"ViewMap_viewedges_size", _wrap_ViewMap_viewedges_size, METH_VARARGS, NULL}, { (char *)"ViewMap_viewShape", _wrap_ViewMap_viewShape, METH_VARARGS, NULL}, + { (char *)"ViewMap_shapeIdToIndexMap", _wrap_ViewMap_shapeIdToIndexMap, METH_VARARGS, NULL}, { (char *)"ViewMap_getScene3dBBox", _wrap_ViewMap_getScene3dBBox, METH_VARARGS, NULL}, { (char *)"ViewMap_AddViewShape", _wrap_ViewMap_AddViewShape, METH_VARARGS, NULL}, { (char *)"ViewMap_AddViewEdge", _wrap_ViewMap_AddViewEdge, METH_VARARGS, NULL}, @@ -109780,395 +108696,395 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction0D > > *) ((Functions0D::GetOccludersF0D *) x)); +static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions0D::GetOccludersF0D *) x)); } -static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludeeF1D *) x)); +static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludeeF1D *) x)); } -static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetShapeF1D *) x)); +static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetShapeF1D *) x)); } -static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludersF1D *) x)); +static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludersF1D *) x)); } -static void *_p_TVertexTo_p_Interface0D(void *x) { +static void *_p_TVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_Interface0D(void *x) { +static void *_p_NonTVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (ViewVertex *) ((NonTVertex *) x)); } -static void *_p_SVertexTo_p_Interface0D(void *x) { +static void *_p_SVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((SVertex *) x)); } -static void *_p_ViewVertexTo_p_Interface0D(void *x) { +static void *_p_ViewVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((ViewVertex *) x)); } -static void *_p_StrokeVertexTo_p_Interface0D(void *x) { +static void *_p_StrokeVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_CurvePointTo_p_Interface0D(void *x) { +static void *_p_CurvePointTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((CurvePoint *) x)); } -static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetShapeF0D *) x)); +static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetShapeF0D *) x)); } -static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetOccludeeF0D *) x)); +static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetOccludeeF0D *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x) { +static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x, int *newmemory) { return (void *)((ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x) { +static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x, int *newmemory) { return (void *)((ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) ((ChainingIterator *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ViewEdgeTo_p_Interface1D(void *x) { +static void *_p_ViewEdgeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((ViewEdge *) x)); } -static void *_p_StrokeTo_p_Interface1D(void *x) { +static void *_p_StrokeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((Stroke *) x)); } -static void *_p_CurveTo_p_Interface1D(void *x) { +static void *_p_CurveTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((Curve *) x)); } -static void *_p_FEdgeSharpTo_p_Interface1D(void *x) { +static void *_p_FEdgeSharpTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_Interface1D(void *x) { +static void *_p_FEdgeSmoothTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_FEdgeTo_p_Interface1D(void *x) { +static void *_p_FEdgeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((FEdge *) x)); } -static void *_p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< int,2 > *) ((VecMat::Vec2< int > *) x)); } -static void *_p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< unsigned int,2 > *) ((VecMat::Vec2< unsigned int > *) x)); } -static void *_p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< int,3 > *) ((VecMat::Vec3< int > *) x)); } -static void *_p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< unsigned int,3 > *) ((VecMat::Vec3< unsigned int > *) x)); } -static void *_p_StrokeVertexTo_p_CurvePoint(void *x) { +static void *_p_StrokeVertexTo_p_CurvePoint(void *x, int *newmemory) { return (void *)((CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x) { +static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { return (void *)((UnaryPredicate0D *) ((Predicates0D::TrueUP0D *) x)); } -static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x) { +static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { return (void *)((UnaryPredicate0D *) ((Predicates0D::FalseUP0D *) x)); } -static void *_p_FEdgeSharpTo_p_FEdge(void *x) { +static void *_p_FEdgeSharpTo_p_FEdge(void *x, int *newmemory) { return (void *)((FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_FEdge(void *x) { +static void *_p_FEdgeSmoothTo_p_FEdge(void *x, int *newmemory) { return (void *)((FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstrainedIncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ColorNoiseShader *) x)); } -static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessNoiseShader *) x)); } -static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::LengthDependingThicknessShader *) x)); } -static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantExternThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantThicknessShader *) x)); } -static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::StrokeTextureShader *) x)); } -static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::SamplingShader *) x)); } -static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BSplineShader *) x)); } -static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BezierCurveShader *) x)); } -static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::InflateShader *) x)); } -static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::GuidingLinesShader *) x)); } -static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::streamShader *) x)); } -static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::fstreamShader *) x)); } -static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x) { +static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((CalligraphicShader *) x)); } -static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((SpatialNoiseShader *) x)); } -static void *_p_SmoothingShaderTo_p_StrokeShader(void *x) { +static void *_p_SmoothingShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((SmoothingShader *) x)); } -static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::TextureAssignerShader *) x)); } -static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::CalligraphicColorShader *) x)); } -static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::MaterialColorShader *) x)); } -static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ColorVariationPatternShader *) x)); } -static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingColorShader *) x)); } -static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantColorShader *) x)); } -static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessVariationPatternShader *) x)); } -static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BackboneStretcherShader *) x)); } -static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ExternalContourStretcherShader *) x)); } -static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::PolygonalizationShader *) x)); } -static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::TipRemoverShader *) x)); } -static void *_p_OmissionShaderTo_p_StrokeShader(void *x) { +static void *_p_OmissionShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((OmissionShader *) x)); } -static void *_p_OmitterTo_p_Smoother(void *x) { +static void *_p_OmitterTo_p_Smoother(void *x, int *newmemory) { return (void *)((Smoother *) ((Omitter *) x)); } -static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::Length2DBP1D *) x)); } -static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::FalseBP1D *) x)); } -static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::ViewMapGradientNormBP1D *) x)); } -static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::TrueBP1D *) x)); } -static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::SameShapeIdBP1D *) x)); } -static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::FalseUP1D *) x)); } -static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ShapeUP1D *) x)); } -static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::DensityLowerThanUP1D *) x)); } -static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToTimeStampUP1D *) x)); } -static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToChainingTimeStampUP1D *) x)); } -static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::TrueUP1D *) x)); } -static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::QuantitativeInvisibilityUP1D *) x)); } -static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ContourUP1D *) x)); } -static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ExternalContourUP1D *) x)); } -static void *_p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< float,2 > *) ((VecMat::Vec2< float > *) x)); } -static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::TimeStampF1D *) x)); +static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::TimeStampF1D *) x)); } -static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); +static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); } -static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::ChainingTimeStampF1D *) x)); +static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::ChainingTimeStampF1D *) x)); } -static void *_p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< float,3 > *) ((VecMat::Vec3< float > *) x)); } -static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((FEdgeInternal::SVertexIterator *) x)); } -static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((ViewEdgeInternal::SVertexIterator *) x)); } -static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((CurveInternal::CurvePointIterator *) x)); } -static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((StrokeInternal::StrokeVertexIterator *) x)); } -static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation2DF0D *) x)); +static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::VertexOrientation2DF0D *) x)); } -static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::Normal2DF0D *) x)); +static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::Normal2DF0D *) x)); } -static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation3DF0D *) x)); +static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec3< float > > *) ((Functions0D::VertexOrientation3DF0D *) x)); } -static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation2DF1D *) x)); +static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Orientation2DF1D *) x)); } -static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Normal2DF1D *) x)); +static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Normal2DF1D *) x)); } -static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation3DF1D *) x)); +static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec3< float > > *) ((Functions1D::Orientation3DF1D *) x)); } -static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); +static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< unsigned int > *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); } -static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); +static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< unsigned int > *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); } -static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ShapeIdF0D *) x)); +static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< Id > *) ((Functions0D::ShapeIdF0D *) x)); } -static void *_p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< double,2 > *) ((VecMat::Vec2< double > *) x)); } -static void *_p_TVertexTo_p_ViewVertex(void *x) { +static void *_p_TVertexTo_p_ViewVertex(void *x, int *newmemory) { return (void *)((ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_ViewVertex(void *x) { +static void *_p_NonTVertexTo_p_ViewVertex(void *x, int *newmemory) { return (void *)((ViewVertex *) ((NonTVertex *) x)); } -static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ZDiscontinuityF0D *) x)); +static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::ZDiscontinuityF0D *) x)); } -static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::DensityF0D *) x)); +static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::DensityF0D *) x)); } -static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetXF0D *) x)); +static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetXF0D *) x)); } -static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedXF0D *) x)); +static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedXF0D *) x)); } -static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::Curvature2DAngleF0D *) x)); +static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::Curvature2DAngleF0D *) x)); } -static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetYF0D *) x)); +static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetYF0D *) x)); } -static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedYF0D *) x)); +static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedYF0D *) x)); } -static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetZF0D *) x)); +static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetZF0D *) x)); } -static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedZF0D *) x)); +static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedZF0D *) x)); } -static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::LocalAverageDepthF0D *) x)); +static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::LocalAverageDepthF0D *) x)); } -static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); } -static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::DensityF1D *) x)); +static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::DensityF1D *) x)); } -static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::ZDiscontinuityF1D *) x)); +static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::ZDiscontinuityF1D *) x)); } -static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetXF1D *) x)); +static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetXF1D *) x)); } -static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetZF1D *) x)); +static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetZF1D *) x)); } -static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetViewMapGradientNormF1D *) x)); +static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetViewMapGradientNormF1D *) x)); } -static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedYF1D *) x)); +static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedYF1D *) x)); } -static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::Curvature2DAngleF1D *) x)); +static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::Curvature2DAngleF1D *) x)); } -static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetYF1D *) x)); +static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetYF1D *) x)); } -static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedXF1D *) x)); +static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedXF1D *) x)); } -static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::LocalAverageDepthF1D *) x)); +static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::LocalAverageDepthF1D *) x)); } -static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedZF1D *) x)); +static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedZF1D *) x)); } -static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); +static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); } -static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadMapPixelF0D *) x)); +static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); } -static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetViewMapGradientNormF0D *) x)); +static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetViewMapGradientNormF0D *) x)); } -static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetParameterF0D *) x)); +static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetParameterF0D *) x)); } -static void *_p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< double,3 > *) ((VecMat::Vec3< double > *) x)); } static swig_type_info _swigt__p_AdjacencyIterator = {"_p_AdjacencyIterator", "AdjacencyIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BBoxTVecMat__Vec3Tdouble_t_t = {"_p_BBoxTVecMat__Vec3Tdouble_t_t", "BBox > *|BBox *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BBoxT_VecMat__Vec3T_double_t_t = {"_p_BBoxT_VecMat__Vec3T_double_t_t", "BBox< VecMat::Vec3< double > > *|BBox< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate0D = {"_p_BinaryPredicate0D", "BinaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate1D = {"_p_BinaryPredicate1D", "BinaryPredicate1D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CalligraphicShader = {"_p_CalligraphicShader", "CalligraphicShader *", 0, 0, (void*)0, 0}; @@ -110180,8 +109096,8 @@ static swig_type_info _swigt__p_ChainingIterator = {"_p_ChainingIterator", "Chai static swig_type_info _swigt__p_CurvatureInfo = {"_p_CurvatureInfo", "CurvatureInfo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Curve = {"_p_Curve", "Curve *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CurveInternal__CurvePointIterator = {"_p_CurveInternal__CurvePointIterator", "CurveInternal::CurvePointIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "CurvePoint *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_Curve__vertex_container__iterator = {"_p_Curve__vertex_container__iterator", "Curve::vertex_container::iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "Curve::Vertex *|CurvePoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Curve__vertex_container__iterator = {"_p_Curve__vertex_container__iterator", "::Curve::vertex_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdge = {"_p_FEdge", "FEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdgeInternal__SVertexIterator = {"_p_FEdgeInternal__SVertexIterator", "FEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdgeSharp = {"_p_FEdgeSharp", "FEdgeSharp *", 0, 0, (void*)0, 0}; @@ -110319,56 +109235,56 @@ static swig_type_info _swigt__p_Stroke__viewedge_container__iterator = {"_p_Stro static swig_type_info _swigt__p_StrokesContainer = {"_p_StrokesContainer", "StrokesContainer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_StyleModule = {"_p_StyleModule", "StyleModule *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TVertex = {"_p_TVertex", "TVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTId_t = {"_p_UnaryFunction0DTId_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTViewShape_p_t = {"_p_UnaryFunction0DTViewShape_p_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTdouble_t = {"_p_UnaryFunction0DTdouble_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTfloat_t = {"_p_UnaryFunction0DTfloat_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction0D > *|UnaryFunction0D > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTunsigned_int_t = {"_p_UnaryFunction0DTunsigned_int_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTvoid_t = {"_p_UnaryFunction0DTvoid_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTdouble_t = {"_p_UnaryFunction1DTdouble_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTfloat_t = {"_p_UnaryFunction1DTfloat_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction1D > *|UnaryFunction1D > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTunsigned_int_t = {"_p_UnaryFunction1DTunsigned_int_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTvoid_t = {"_p_UnaryFunction1DTvoid_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_Id_t = {"_p_UnaryFunction0DT_Id_t", "UnaryFunction0D< Id > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t", "UnaryFunction0D< Geometry::Vec2f > *|UnaryFunction0D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t", "UnaryFunction0D< VecMat::Vec3< float > > *|UnaryFunction0D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_ViewShape_p_t = {"_p_UnaryFunction0DT_ViewShape_p_t", "UnaryFunction0D< ViewShape * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_double_t = {"_p_UnaryFunction0DT_double_t", "UnaryFunction0D< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_float_t = {"_p_UnaryFunction0DT_float_t", "UnaryFunction0D< float > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction0D< std::vector< ViewShape * > > *|UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_unsigned_int_t = {"_p_UnaryFunction0DT_unsigned_int_t", "UnaryFunction0D< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_void_t = {"_p_UnaryFunction0DT_void_t", "UnaryFunction0D< void > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t", "UnaryFunction1D< Geometry::Vec2f > *|UnaryFunction1D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t", "UnaryFunction1D< VecMat::Vec3< float > > *|UnaryFunction1D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_double_t = {"_p_UnaryFunction1DT_double_t", "UnaryFunction1D< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_float_t = {"_p_UnaryFunction1DT_float_t", "UnaryFunction1D< float > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction1D< std::vector< ViewShape * > > *|UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_unsigned_int_t = {"_p_UnaryFunction1DT_unsigned_int_t", "UnaryFunction1D< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_void_t = {"_p_UnaryFunction1DT_void_t", "UnaryFunction1D< void > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate0D = {"_p_UnaryPredicate0D", "UnaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate1D = {"_p_UnaryPredicate1D", "UnaryPredicate1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tdouble_t = {"_p_VecMat__HVec3Tdouble_t", "VecMat::HVec3 *|Geometry::HVec3r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tfloat_t = {"_p_VecMat__HVec3Tfloat_t", "VecMat::HVec3 *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tint_t = {"_p_VecMat__HVec3Tint_t", "VecMat::HVec3 *|Geometry::HVec3i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tunsigned_int_t = {"_p_VecMat__HVec3Tunsigned_int_t", "VecMat::HVec3 *|Geometry::HVec3u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_2_t = {"_p_VecMat__SquareMatrixTdouble_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_3_t = {"_p_VecMat__SquareMatrixTdouble_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_4_t = {"_p_VecMat__SquareMatrixTdouble_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_2_t = {"_p_VecMat__SquareMatrixTfloat_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_3_t = {"_p_VecMat__SquareMatrixTfloat_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_4_t = {"_p_VecMat__SquareMatrixTfloat_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_2_t = {"_p_VecMat__SquareMatrixTint_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_3_t = {"_p_VecMat__SquareMatrixTint_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_4_t = {"_p_VecMat__SquareMatrixTint_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_2_t = {"_p_VecMat__SquareMatrixTunsigned_int_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_3_t = {"_p_VecMat__SquareMatrixTunsigned_int_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_4_t = {"_p_VecMat__SquareMatrixTunsigned_int_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tdouble_t = {"_p_VecMat__Vec2Tdouble_t", "VecMat::Vec2 *|Geometry::Vec2d *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tfloat_t = {"_p_VecMat__Vec2Tfloat_t", "VecMat::Vec2 *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tint_t = {"_p_VecMat__Vec2Tint_t", "VecMat::Vec2 *|Geometry::Vec2i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tunsigned_int_t = {"_p_VecMat__Vec2Tunsigned_int_t", "VecMat::Vec2 *|Geometry::Vec2u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tdouble_t = {"_p_VecMat__Vec3Tdouble_t", "VecMat::Vec3 *|Geometry::Vec3r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tfloat_t = {"_p_VecMat__Vec3Tfloat_t", "VecMat::Vec3 *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tint_t = {"_p_VecMat__Vec3Tint_t", "VecMat::Vec3 *|Geometry::Vec3i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tunsigned_int_t = {"_p_VecMat__Vec3Tunsigned_int_t", "VecMat::Vec3 *|Geometry::Vec3u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTdouble_2_t = {"_p_VecMat__VecTdouble_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTdouble_3_t = {"_p_VecMat__VecTdouble_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTfloat_2_t = {"_p_VecMat__VecTfloat_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTfloat_3_t = {"_p_VecMat__VecTfloat_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTint_2_t = {"_p_VecMat__VecTint_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTint_3_t = {"_p_VecMat__VecTint_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTunsigned_int_2_t = {"_p_VecMat__VecTunsigned_int_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTunsigned_int_3_t = {"_p_VecMat__VecTunsigned_int_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_double_t = {"_p_VecMat__HVec3T_double_t", "Geometry::HVec3d *|Geometry::HVec3r *|VecMat::HVec3< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_float_t = {"_p_VecMat__HVec3T_float_t", "VecMat::HVec3< float > *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_int_t = {"_p_VecMat__HVec3T_int_t", "Geometry::HVec3i *|VecMat::HVec3< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_unsigned_int_t = {"_p_VecMat__HVec3T_unsigned_int_t", "Geometry::HVec3u *|VecMat::HVec3< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_2_t = {"_p_VecMat__SquareMatrixT_double_2_t", "Geometry::Matrix22d *|Geometry::Matrix22r *|VecMat::SquareMatrix< double,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_3_t = {"_p_VecMat__SquareMatrixT_double_3_t", "VecMat::SquareMatrix< double,3 > *|Geometry::Matrix33d *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_4_t = {"_p_VecMat__SquareMatrixT_double_4_t", "VecMat::SquareMatrix< double,4 > *|Geometry::Matrix44d *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_2_t = {"_p_VecMat__SquareMatrixT_float_2_t", "Geometry::Matrix22f *|VecMat::SquareMatrix< float,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_3_t = {"_p_VecMat__SquareMatrixT_float_3_t", "VecMat::SquareMatrix< float,3 > *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_4_t = {"_p_VecMat__SquareMatrixT_float_4_t", "Geometry::Matrix44f *|VecMat::SquareMatrix< float,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_2_t = {"_p_VecMat__SquareMatrixT_int_2_t", "VecMat::SquareMatrix< int,2 > *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_3_t = {"_p_VecMat__SquareMatrixT_int_3_t", "VecMat::SquareMatrix< int,3 > *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_4_t = {"_p_VecMat__SquareMatrixT_int_4_t", "Geometry::Matrix44i *|VecMat::SquareMatrix< int,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t = {"_p_VecMat__SquareMatrixT_unsigned_int_2_t", "Geometry::Matrix22u *|VecMat::SquareMatrix< unsigned int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t = {"_p_VecMat__SquareMatrixT_unsigned_int_3_t", "Geometry::Matrix33u *|VecMat::SquareMatrix< unsigned int,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t = {"_p_VecMat__SquareMatrixT_unsigned_int_4_t", "Geometry::Matrix44u *|VecMat::SquareMatrix< unsigned int,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_double_t = {"_p_VecMat__Vec2T_double_t", "Geometry::Vec2d *|Geometry::Vec2r *|VecMat::Vec2< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_float_t = {"_p_VecMat__Vec2T_float_t", "VecMat::Vec2< float > *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_int_t = {"_p_VecMat__Vec2T_int_t", "Geometry::Vec2i *|VecMat::Vec2< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_unsigned_int_t = {"_p_VecMat__Vec2T_unsigned_int_t", "Geometry::Vec2u *|VecMat::Vec2< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_double_t = {"_p_VecMat__Vec3T_double_t", "Geometry::Vec3d *|Geometry::Vec3r *|VecMat::Vec3< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_float_t = {"_p_VecMat__Vec3T_float_t", "VecMat::Vec3< float > *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_int_t = {"_p_VecMat__Vec3T_int_t", "Geometry::Vec3i *|VecMat::Vec3< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_unsigned_int_t = {"_p_VecMat__Vec3T_unsigned_int_t", "Geometry::Vec3u *|VecMat::Vec3< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_double_2_t = {"_p_VecMat__VecT_double_2_t", "VecMat::Vec< double,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_double_3_t = {"_p_VecMat__VecT_double_3_t", "VecMat::Vec< double,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_float_2_t = {"_p_VecMat__VecT_float_2_t", "VecMat::Vec< float,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_float_3_t = {"_p_VecMat__VecT_float_3_t", "VecMat::Vec< float,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_int_2_t = {"_p_VecMat__VecT_int_2_t", "VecMat::Vec< int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_int_3_t = {"_p_VecMat__VecT_int_3_t", "VecMat::Vec< int,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_2_t = {"_p_VecMat__VecT_unsigned_int_2_t", "VecMat::Vec< unsigned int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_3_t = {"_p_VecMat__VecT_unsigned_int_3_t", "VecMat::Vec< unsigned int,3 > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Vertex = {"_p_Vertex", "Vertex *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdge = {"_p_ViewEdge", "ViewEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdgeInternal__SVertexIterator = {"_p_ViewEdgeInternal__SVertexIterator", "ViewEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; @@ -110376,8 +109292,8 @@ static swig_type_info _swigt__p_ViewEdgeInternal__ViewEdgeIterator = {"_p_ViewEd static swig_type_info _swigt__p_ViewMap = {"_p_ViewMap", "ViewMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewShape = {"_p_ViewShape", "ViewShape *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertex = {"_p_ViewVertex", "ViewVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator", "ViewVertexInternal::orientedViewEdgeIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator *", 0, 0, (void*)0, 0}; @@ -110390,15 +109306,16 @@ static swig_type_info _swigt__p_const_reference = {"_p_const_reference", "const_ static swig_type_info _swigt__p_const_vertex_iterator = {"_p_const_vertex_iterator", "const_vertex_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_directedViewEdge = {"_p_directedViewEdge", "directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "real *|VecMat::Vec2< double >::value_type *|VecMat::Vec3< double >::value_type *|double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_iterator = {"_p_edge_iterator", "edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_pointers_container = {"_p_edge_pointers_container", "edge_pointers_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edges_container = {"_p_edges_container", "edges_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedge_iterator = {"_p_fedge_iterator", "fedge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedges_container = {"_p_fedges_container", "fedges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "VecMat::Vec2< float >::value_type *|VecMat::Vec3< float >::value_type *|float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_id_to_index_map = {"_p_id_to_index_map", "id_to_index_map *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_id_type = {"_p_id_type", "id_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "VecMat::Vec2< int >::value_type *|VecMat::Vec3< int >::value_type *|int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ltstr = {"_p_ltstr", "ltstr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsMap = {"_p_mapsMap", "mapsMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_occluder_container__const_iterator = {"_p_occluder_container__const_iterator", "occluder_container::const_iterator *", 0, 0, (void*)0, 0}; @@ -110406,33 +109323,34 @@ static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, static swig_type_info _swigt__p_point_iterator = {"_p_point_iterator", "point_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_point_type = {"_p_point_type", "point_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_setTVecMat__Vec3Tdouble_t_t = {"_p_setTVecMat__Vec3Tdouble_t_t", "set > *|set *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_setT_VecMat__Vec3T_double_t_t = {"_p_setT_VecMat__Vec3T_double_t_t", "set< VecMat::Vec3< double > > *|set< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairTViewEdge_p_bool_t = {"_p_std__pairTViewEdge_p_bool_t", "std::pair *|ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t = {"_p_std__vectorTMaterial_std__allocatorTMaterial_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t", "std::vector *|ViewMap::svertices_container *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t = {"_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t = {"_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t = {"_p_std__vectorTint_std__allocatorTint_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type = {"_p_std__vectorTint_std__allocatorTint_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t = {"_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t = {"_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t", "std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t = {"_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t", "ViewMap::id_to_index_map *|std::map< int,int,std::less< int >,std::allocator< std::pair< int const,int > > > *|std::map< int,int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__pairT_ViewEdge_p_bool_t = {"_p_std__pairT_ViewEdge_p_bool_t", "std::pair< ViewEdge *,bool > *|ViewVertex::directedViewEdge *|::ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t", "std::vector< FEdge *,std::allocator< FEdge * > > *|std::vector< FEdge * > *|ViewMap::fedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type", "std::vector< FEdge * >::allocator_type *|std::allocator< FEdge * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t = {"_p_std__vectorT_Material_std__allocatorT_Material_t_t", "std::vector< Material,std::allocator< Material > > *|std::vector< Material > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t", "std::vector< SVertex * > *|ViewMap::svertices_container *|std::vector< SVertex *,std::allocator< SVertex * > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type", "std::vector< SVertex * >::allocator_type *|std::allocator< SVertex * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t", "std::vector< StrokeShader *,std::allocator< StrokeShader * > > *|std::vector< StrokeShader * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type", "std::vector< StrokeShader * >::allocator_type *|std::allocator< StrokeShader * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t = {"_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t", "std::vector< TVertex * > *|std::vector< TVertex *,std::allocator< TVertex * > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t = {"_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t", "std::vector< VecMat::Vec2< double > > *|std::vector< VecMat::Vec2< double >,std::allocator< VecMat::Vec2< double > > > *|std::vector< Geometry::Vec2r > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t", "std::vector< ViewEdge *,std::allocator< ViewEdge * > > *|std::vector< ViewEdge * > *|ViewMap::viewedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type", "std::vector< ViewEdge * >::allocator_type *|std::allocator< ViewEdge * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t", "std::vector< ViewShape *,std::allocator< ViewShape * > > *|std::vector< ViewShape * > *|occluder_container *|ViewMap::viewshapes_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type", "std::vector< ViewShape * >::allocator_type *|std::allocator< ViewShape * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t", "std::vector< ViewVertex *,std::allocator< ViewVertex * > > *|std::vector< ViewVertex * > *|ViewMap::viewvertices_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type", "std::vector< ViewVertex * >::allocator_type *|std::allocator< ViewVertex * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type = {"_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t = {"_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t", "std::vector< std::pair< ViewEdge *,bool > > *|std::vector< ViewVertex::directedViewEdge > *|std::vector< std::pair< ViewEdge *,bool >,std::allocator< std::pair< ViewEdge *,bool > > > *|NonTVertex::edges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t = {"_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t", "std::vector< unsigned int,std::allocator< unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svertices_container = {"_p_svertices_container", "svertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__PySwigIterator = {"_p_swig__PySwigIterator", "swig::PySwigIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|Nature::EdgeNature *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "VecMat::Vec2< unsigned int >::value_type *|VecMat::Vec3< unsigned int >::value_type *|unsigned int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "Nature::VertexNature *|Nature::EdgeNature *|unsigned short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_container = {"_p_vertex_container", "vertex_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_iterator = {"_p_vertex_iterator", "vertex_iterator *", 0, 0, (void*)0, 0}; @@ -110442,16 +109360,16 @@ static swig_type_info _swigt__p_viewedges_container = {"_p_viewedges_container", static swig_type_info _swigt__p_viewshapes_container = {"_p_viewshapes_container", "viewshapes_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_viewvertices_container = {"_p_viewvertices_container", "viewvertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type = {"_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type", "FEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type = {"_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type", "SVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type = {"_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type", "StrokeShader *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type = {"_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type", "ViewEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type = {"_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type", "ViewShape *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type = {"_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type", "ViewVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type = {"_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type", "std::vector< FEdge * >::value_type|FEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type = {"_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type", "std::vector< SVertex * >::value_type|SVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type = {"_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type", "std::vector< StrokeShader * >::value_type|StrokeShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type = {"_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type", "std::vector< ViewEdge * >::value_type|ViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type = {"_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type", "std::vector< ViewShape * >::value_type|ViewShape *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type = {"_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type", "std::vector< ViewVertex * >::value_type|ViewVertex *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_AdjacencyIterator, - &_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, + &_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, &_swigt__p_BinaryPredicate0D, &_swigt__p_BinaryPredicate1D, &_swigt__p_CalligraphicShader, @@ -110602,56 +109520,56 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_StrokesContainer, &_swigt__p_StyleModule, &_swigt__p_TVertex, - &_swigt__p_UnaryFunction0DTId_t, - &_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, - &_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, - &_swigt__p_UnaryFunction0DTViewShape_p_t, - &_swigt__p_UnaryFunction0DTdouble_t, - &_swigt__p_UnaryFunction0DTfloat_t, - &_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - &_swigt__p_UnaryFunction0DTunsigned_int_t, - &_swigt__p_UnaryFunction0DTvoid_t, - &_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, - &_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, - &_swigt__p_UnaryFunction1DTdouble_t, - &_swigt__p_UnaryFunction1DTfloat_t, - &_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - &_swigt__p_UnaryFunction1DTunsigned_int_t, - &_swigt__p_UnaryFunction1DTvoid_t, + &_swigt__p_UnaryFunction0DT_Id_t, + &_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, + &_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, + &_swigt__p_UnaryFunction0DT_ViewShape_p_t, + &_swigt__p_UnaryFunction0DT_double_t, + &_swigt__p_UnaryFunction0DT_float_t, + &_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + &_swigt__p_UnaryFunction0DT_unsigned_int_t, + &_swigt__p_UnaryFunction0DT_void_t, + &_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, + &_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, + &_swigt__p_UnaryFunction1DT_double_t, + &_swigt__p_UnaryFunction1DT_float_t, + &_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + &_swigt__p_UnaryFunction1DT_unsigned_int_t, + &_swigt__p_UnaryFunction1DT_void_t, &_swigt__p_UnaryPredicate0D, &_swigt__p_UnaryPredicate1D, - &_swigt__p_VecMat__HVec3Tdouble_t, - &_swigt__p_VecMat__HVec3Tfloat_t, - &_swigt__p_VecMat__HVec3Tint_t, - &_swigt__p_VecMat__HVec3Tunsigned_int_t, - &_swigt__p_VecMat__SquareMatrixTdouble_2_t, - &_swigt__p_VecMat__SquareMatrixTdouble_3_t, - &_swigt__p_VecMat__SquareMatrixTdouble_4_t, - &_swigt__p_VecMat__SquareMatrixTfloat_2_t, - &_swigt__p_VecMat__SquareMatrixTfloat_3_t, - &_swigt__p_VecMat__SquareMatrixTfloat_4_t, - &_swigt__p_VecMat__SquareMatrixTint_2_t, - &_swigt__p_VecMat__SquareMatrixTint_3_t, - &_swigt__p_VecMat__SquareMatrixTint_4_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, - &_swigt__p_VecMat__Vec2Tdouble_t, - &_swigt__p_VecMat__Vec2Tfloat_t, - &_swigt__p_VecMat__Vec2Tint_t, - &_swigt__p_VecMat__Vec2Tunsigned_int_t, - &_swigt__p_VecMat__Vec3Tdouble_t, - &_swigt__p_VecMat__Vec3Tfloat_t, - &_swigt__p_VecMat__Vec3Tint_t, - &_swigt__p_VecMat__Vec3Tunsigned_int_t, - &_swigt__p_VecMat__VecTdouble_2_t, - &_swigt__p_VecMat__VecTdouble_3_t, - &_swigt__p_VecMat__VecTfloat_2_t, - &_swigt__p_VecMat__VecTfloat_3_t, - &_swigt__p_VecMat__VecTint_2_t, - &_swigt__p_VecMat__VecTint_3_t, - &_swigt__p_VecMat__VecTunsigned_int_2_t, - &_swigt__p_VecMat__VecTunsigned_int_3_t, + &_swigt__p_VecMat__HVec3T_double_t, + &_swigt__p_VecMat__HVec3T_float_t, + &_swigt__p_VecMat__HVec3T_int_t, + &_swigt__p_VecMat__HVec3T_unsigned_int_t, + &_swigt__p_VecMat__SquareMatrixT_double_2_t, + &_swigt__p_VecMat__SquareMatrixT_double_3_t, + &_swigt__p_VecMat__SquareMatrixT_double_4_t, + &_swigt__p_VecMat__SquareMatrixT_float_2_t, + &_swigt__p_VecMat__SquareMatrixT_float_3_t, + &_swigt__p_VecMat__SquareMatrixT_float_4_t, + &_swigt__p_VecMat__SquareMatrixT_int_2_t, + &_swigt__p_VecMat__SquareMatrixT_int_3_t, + &_swigt__p_VecMat__SquareMatrixT_int_4_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, + &_swigt__p_VecMat__Vec2T_double_t, + &_swigt__p_VecMat__Vec2T_float_t, + &_swigt__p_VecMat__Vec2T_int_t, + &_swigt__p_VecMat__Vec2T_unsigned_int_t, + &_swigt__p_VecMat__Vec3T_double_t, + &_swigt__p_VecMat__Vec3T_float_t, + &_swigt__p_VecMat__Vec3T_int_t, + &_swigt__p_VecMat__Vec3T_unsigned_int_t, + &_swigt__p_VecMat__VecT_double_2_t, + &_swigt__p_VecMat__VecT_double_3_t, + &_swigt__p_VecMat__VecT_float_2_t, + &_swigt__p_VecMat__VecT_float_3_t, + &_swigt__p_VecMat__VecT_int_2_t, + &_swigt__p_VecMat__VecT_int_3_t, + &_swigt__p_VecMat__VecT_unsigned_int_2_t, + &_swigt__p_VecMat__VecT_unsigned_int_3_t, &_swigt__p_Vertex, &_swigt__p_ViewEdge, &_swigt__p_ViewEdgeInternal__SVertexIterator, @@ -110659,8 +109577,8 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_ViewMap, &_swigt__p_ViewShape, &_swigt__p_ViewVertex, - &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, - &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -110680,6 +109598,7 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_fedge_iterator, &_swigt__p_fedges_container, &_swigt__p_float, + &_swigt__p_id_to_index_map, &_swigt__p_id_type, &_swigt__p_int, &_swigt__p_ltstr, @@ -110689,29 +109608,30 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_point_iterator, &_swigt__p_point_type, &_swigt__p_reference, - &_swigt__p_setTVecMat__Vec3Tdouble_t_t, + &_swigt__p_setT_VecMat__Vec3T_double_t_t, &_swigt__p_size_type, &_swigt__p_std__invalid_argument, - &_swigt__p_std__pairTViewEdge_p_bool_t, - &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, - &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, - &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, - &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, - &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, - &_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, - &_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, - &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, - &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, - &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, - &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, - &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorTint_std__allocatorTint_t_t, - &_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, - &_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, - &_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + &_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, + &_swigt__p_std__pairT_ViewEdge_p_bool_t, + &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, + &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, + &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, + &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, + &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, + &_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, + &_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, + &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, + &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, + &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, + &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, + &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, + &_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, + &_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, &_swigt__p_svertices_container, &_swigt__p_swig__PySwigIterator, &_swigt__p_unsigned_int, @@ -110725,16 +109645,16 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_viewshapes_container, &_swigt__p_viewvertices_container, &_swigt__p_void, - &_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, - &_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, - &_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, - &_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, - &_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, - &_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, + &_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, + &_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, + &_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, + &_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, + &_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, + &_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, }; static swig_cast_info _swigc__p_AdjacencyIterator[] = { {&_swigt__p_AdjacencyIterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BBoxT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate0D[] = { {&_swigt__p_BinaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate1D[] = { {&_swigt__p_Predicates1D__Length2DBP1D, _p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__FalseBP1D, _p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_BinaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__ViewMapGradientNormBP1D, _p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueBP1D, _p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__SameShapeIdBP1D, _p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CalligraphicShader[] = { {&_swigt__p_CalligraphicShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110748,7 +109668,7 @@ static swig_cast_info _swigc__p_Curve[] = { {&_swigt__p_Curve, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_CurveInternal__CurvePointIterator[] = { {&_swigt__p_CurveInternal__CurvePointIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CurvePoint[] = { {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_CurvePoint, 0, 0}, {&_swigt__p_CurvePoint, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Curve__vertex_container__iterator[] = { {&_swigt__p_Curve__vertex_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeInternal__SVertexIterator[] = { {&_swigt__p_FEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSharp[] = { {&_swigt__p_FEdgeSharp, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSmooth[] = { {&_swigt__p_FEdgeSmooth, 0, 0, 0},{0, 0, 0, 0}}; @@ -110807,10 +109727,10 @@ static swig_cast_info _swigc__p_GrayImage[] = { {&_swigt__p_GrayImage, 0, 0, 0} static swig_cast_info _swigc__p_I1DContainer[] = { {&_swigt__p_I1DContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Id[] = { {&_swigt__p_Id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntegrationType[] = { {&_swigt__p_IntegrationType, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIterator[] = { {&_swigt__p_Interface0DIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIteratorNested[] = { {&_swigt__p_Interface0DIteratorNested, 0, 0, 0}, {&_swigt__p_FEdgeInternal__SVertexIterator, _p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_ViewEdgeInternal__SVertexIterator, _p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_CurveInternal__CurvePointIterator, _p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_StrokeInternal__StrokeVertexIterator, _p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Material[] = { {&_swigt__p_Material, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MediumType[] = { {&_swigt__p_MediumType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Module[] = { {&_swigt__p_Module, 0, 0, 0},{0, 0, 0, 0}}; @@ -110840,7 +109760,7 @@ static swig_cast_info _swigc__p_Predicates1D__ViewMapGradientNormBP1D[] = { {&_ static swig_cast_info _swigc__p_RGBImage[] = { {&_swigt__p_RGBImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ReturnedValueType[] = { {&_swigt__p_ReturnedValueType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SShape[] = { {&_swigt__p_SShape, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__p_SVertex, 0, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SVertex__fedges_container__iterator[] = { {&_swigt__p_SVertex__fedges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Smoother[] = { {&_swigt__p_Smoother, 0, 0, 0}, {&_swigt__p_Omitter, _p_OmitterTo_p_Smoother, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SmoothingShader[] = { {&_swigt__p_SmoothingShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110851,7 +109771,7 @@ static swig_cast_info _swigc__p_StrokeAttribute[] = { {&_swigt__p_StrokeAttribu static swig_cast_info _swigc__p_StrokeInternal__StrokeVertexIterator[] = { {&_swigt__p_StrokeInternal__StrokeVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeLayer[] = { {&_swigt__p_StrokeLayer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeRenderer[] = { {&_swigt__p_StrokeRenderer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BSplineShader[] = { {&_swigt__p_StrokeShaders__BSplineShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BackboneStretcherShader[] = { {&_swigt__p_StrokeShaders__BackboneStretcherShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BezierCurveShader[] = { {&_swigt__p_StrokeShaders__BezierCurveShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110885,65 +109805,65 @@ static swig_cast_info _swigc__p_Stroke__viewedge_container__iterator[] = { {&_s static swig_cast_info _swigc__p_StrokesContainer[] = { {&_swigt__p_StrokesContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StyleModule[] = { {&_swigt__p_StyleModule, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TVertex[] = { {&_swigt__p_TVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTId_t[] = { {&_swigt__p_UnaryFunction0DTId_t, 0, 0, 0}, {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DTViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTdouble_t[] = { {&_swigt__p_UnaryFunction0DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTfloat_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_UnaryFunction0DTfloat_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTunsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTvoid_t[] = { {&_swigt__p_UnaryFunction0DTvoid_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTdouble_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_UnaryFunction1DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTfloat_t[] = { {&_swigt__p_UnaryFunction1DTfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTunsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTvoid_t[] = { {&_swigt__p_UnaryFunction1DTvoid_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_Id_t[] = { {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_Id_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_ViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_ViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_double_t[] = { {&_swigt__p_UnaryFunction0DT_double_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_float_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_float_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_unsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_void_t[] = { {&_swigt__p_UnaryFunction0DT_void_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_double_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_double_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_float_t[] = { {&_swigt__p_UnaryFunction1DT_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_unsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_void_t[] = { {&_swigt__p_UnaryFunction1DT_void_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate0D[] = { {&_swigt__p_Predicates0D__TrueUP0D, _p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_Predicates0D__FalseUP0D, _p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_UnaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate1D[] = { {&_swigt__p_Predicates1D__FalseUP1D, _p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ShapeUP1D, _p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__DensityLowerThanUP1D, _p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_UnaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__EqualToTimeStampUP1D, _p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, _p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueUP1D, _p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, _p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ContourUP1D, _p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ExternalContourUP1D, _p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tdouble_t[] = { {&_swigt__p_VecMat__HVec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tfloat_t[] = { {&_swigt__p_VecMat__HVec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tint_t[] = { {&_swigt__p_VecMat__HVec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__HVec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tdouble_t[] = { {&_swigt__p_VecMat__Vec2Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tfloat_t[] = { {&_swigt__p_VecMat__Vec2Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tint_t[] = { {&_swigt__p_VecMat__Vec2Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec2Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tdouble_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tfloat_t[] = { {&_swigt__p_VecMat__Vec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tint_t[] = { {&_swigt__p_VecMat__Vec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTdouble_2_t[] = { {&_swigt__p_VecMat__VecTdouble_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tdouble_t, _p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTdouble_3_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, _p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t, 0, 0}, {&_swigt__p_VecMat__VecTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTfloat_2_t[] = { {&_swigt__p_VecMat__VecTfloat_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tfloat_t, _p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTfloat_3_t[] = { {&_swigt__p_VecMat__VecTfloat_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tfloat_t, _p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTint_2_t[] = { {&_swigt__p_VecMat__VecTint_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tint_t, _p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTint_3_t[] = { {&_swigt__p_VecMat__VecTint_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tint_t, _p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_2_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tunsigned_int_t, _p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_3_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tunsigned_int_t, _p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_double_t[] = { {&_swigt__p_VecMat__HVec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_float_t[] = { {&_swigt__p_VecMat__HVec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_int_t[] = { {&_swigt__p_VecMat__HVec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__HVec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_double_t[] = { {&_swigt__p_VecMat__Vec2T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_float_t[] = { {&_swigt__p_VecMat__Vec2T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_int_t[] = { {&_swigt__p_VecMat__Vec2T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec2T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_double_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_float_t[] = { {&_swigt__p_VecMat__Vec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_int_t[] = { {&_swigt__p_VecMat__Vec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_double_2_t[] = { {&_swigt__p_VecMat__VecT_double_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_double_t, _p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_double_3_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, _p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t, 0, 0}, {&_swigt__p_VecMat__VecT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_float_2_t[] = { {&_swigt__p_VecMat__VecT_float_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_float_t, _p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_float_3_t[] = { {&_swigt__p_VecMat__VecT_float_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_float_t, _p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_int_2_t[] = { {&_swigt__p_VecMat__VecT_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_int_t, _p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_int_3_t[] = { {&_swigt__p_VecMat__VecT_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_int_t, _p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_unsigned_int_t, _p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_unsigned_int_t, _p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Vertex[] = { {&_swigt__p_Vertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__p_ViewEdge, 0, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__SVertexIterator[] = { {&_swigt__p_ViewEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__ViewEdgeIterator[] = { {&_swigt__p_ViewEdgeInternal__ViewEdgeIterator, 0, 0, 0}, {&_swigt__p_ChainingIterator, _p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainSilhouetteIterator, _p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainPredicateIterator, _p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewMap[] = { {&_swigt__p_ViewMap, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; @@ -110963,6 +109883,7 @@ static swig_cast_info _swigc__p_edges_container[] = { {&_swigt__p_edges_contain static swig_cast_info _swigc__p_fedge_iterator[] = { {&_swigt__p_fedge_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_fedges_container[] = { {&_swigt__p_fedges_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_id_to_index_map[] = { {&_swigt__p_id_to_index_map, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_id_type[] = { {&_swigt__p_id_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ltstr[] = { {&_swigt__p_ltstr, 0, 0, 0},{0, 0, 0, 0}}; @@ -110972,29 +109893,30 @@ static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, static swig_cast_info _swigc__p_point_iterator[] = { {&_swigt__p_point_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_point_type[] = { {&_swigt__p_point_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_setTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_setTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_setT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_setT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairTViewEdge_p_bool_t[] = { {&_swigt__p_std__pairTViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t[] = { {&_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t[] = { {&_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t[] = { {&_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t[] = { {&_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t[] = { {&_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__pairT_ViewEdge_p_bool_t[] = { {&_swigt__p_std__pairT_ViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t[] = { {&_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t[] = { {&_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t[] = { {&_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t[] = { {&_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svertices_container[] = { {&_swigt__p_svertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__PySwigIterator[] = { {&_swigt__p_swig__PySwigIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; @@ -111008,16 +109930,16 @@ static swig_cast_info _swigc__p_viewedges_container[] = { {&_swigt__p_viewedges static swig_cast_info _swigc__p_viewshapes_container[] = { {&_swigt__p_viewshapes_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_viewvertices_container[] = { {&_swigt__p_viewvertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_AdjacencyIterator, - _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t, + _swigc__p_BBoxT_VecMat__Vec3T_double_t_t, _swigc__p_BinaryPredicate0D, _swigc__p_BinaryPredicate1D, _swigc__p_CalligraphicShader, @@ -111168,56 +110090,56 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_StrokesContainer, _swigc__p_StyleModule, _swigc__p_TVertex, - _swigc__p_UnaryFunction0DTId_t, - _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, - _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, - _swigc__p_UnaryFunction0DTViewShape_p_t, - _swigc__p_UnaryFunction0DTdouble_t, - _swigc__p_UnaryFunction0DTfloat_t, - _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - _swigc__p_UnaryFunction0DTunsigned_int_t, - _swigc__p_UnaryFunction0DTvoid_t, - _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, - _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, - _swigc__p_UnaryFunction1DTdouble_t, - _swigc__p_UnaryFunction1DTfloat_t, - _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - _swigc__p_UnaryFunction1DTunsigned_int_t, - _swigc__p_UnaryFunction1DTvoid_t, + _swigc__p_UnaryFunction0DT_Id_t, + _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, + _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, + _swigc__p_UnaryFunction0DT_ViewShape_p_t, + _swigc__p_UnaryFunction0DT_double_t, + _swigc__p_UnaryFunction0DT_float_t, + _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + _swigc__p_UnaryFunction0DT_unsigned_int_t, + _swigc__p_UnaryFunction0DT_void_t, + _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, + _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, + _swigc__p_UnaryFunction1DT_double_t, + _swigc__p_UnaryFunction1DT_float_t, + _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + _swigc__p_UnaryFunction1DT_unsigned_int_t, + _swigc__p_UnaryFunction1DT_void_t, _swigc__p_UnaryPredicate0D, _swigc__p_UnaryPredicate1D, - _swigc__p_VecMat__HVec3Tdouble_t, - _swigc__p_VecMat__HVec3Tfloat_t, - _swigc__p_VecMat__HVec3Tint_t, - _swigc__p_VecMat__HVec3Tunsigned_int_t, - _swigc__p_VecMat__SquareMatrixTdouble_2_t, - _swigc__p_VecMat__SquareMatrixTdouble_3_t, - _swigc__p_VecMat__SquareMatrixTdouble_4_t, - _swigc__p_VecMat__SquareMatrixTfloat_2_t, - _swigc__p_VecMat__SquareMatrixTfloat_3_t, - _swigc__p_VecMat__SquareMatrixTfloat_4_t, - _swigc__p_VecMat__SquareMatrixTint_2_t, - _swigc__p_VecMat__SquareMatrixTint_3_t, - _swigc__p_VecMat__SquareMatrixTint_4_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t, - _swigc__p_VecMat__Vec2Tdouble_t, - _swigc__p_VecMat__Vec2Tfloat_t, - _swigc__p_VecMat__Vec2Tint_t, - _swigc__p_VecMat__Vec2Tunsigned_int_t, - _swigc__p_VecMat__Vec3Tdouble_t, - _swigc__p_VecMat__Vec3Tfloat_t, - _swigc__p_VecMat__Vec3Tint_t, - _swigc__p_VecMat__Vec3Tunsigned_int_t, - _swigc__p_VecMat__VecTdouble_2_t, - _swigc__p_VecMat__VecTdouble_3_t, - _swigc__p_VecMat__VecTfloat_2_t, - _swigc__p_VecMat__VecTfloat_3_t, - _swigc__p_VecMat__VecTint_2_t, - _swigc__p_VecMat__VecTint_3_t, - _swigc__p_VecMat__VecTunsigned_int_2_t, - _swigc__p_VecMat__VecTunsigned_int_3_t, + _swigc__p_VecMat__HVec3T_double_t, + _swigc__p_VecMat__HVec3T_float_t, + _swigc__p_VecMat__HVec3T_int_t, + _swigc__p_VecMat__HVec3T_unsigned_int_t, + _swigc__p_VecMat__SquareMatrixT_double_2_t, + _swigc__p_VecMat__SquareMatrixT_double_3_t, + _swigc__p_VecMat__SquareMatrixT_double_4_t, + _swigc__p_VecMat__SquareMatrixT_float_2_t, + _swigc__p_VecMat__SquareMatrixT_float_3_t, + _swigc__p_VecMat__SquareMatrixT_float_4_t, + _swigc__p_VecMat__SquareMatrixT_int_2_t, + _swigc__p_VecMat__SquareMatrixT_int_3_t, + _swigc__p_VecMat__SquareMatrixT_int_4_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t, + _swigc__p_VecMat__Vec2T_double_t, + _swigc__p_VecMat__Vec2T_float_t, + _swigc__p_VecMat__Vec2T_int_t, + _swigc__p_VecMat__Vec2T_unsigned_int_t, + _swigc__p_VecMat__Vec3T_double_t, + _swigc__p_VecMat__Vec3T_float_t, + _swigc__p_VecMat__Vec3T_int_t, + _swigc__p_VecMat__Vec3T_unsigned_int_t, + _swigc__p_VecMat__VecT_double_2_t, + _swigc__p_VecMat__VecT_double_3_t, + _swigc__p_VecMat__VecT_float_2_t, + _swigc__p_VecMat__VecT_float_3_t, + _swigc__p_VecMat__VecT_int_2_t, + _swigc__p_VecMat__VecT_int_3_t, + _swigc__p_VecMat__VecT_unsigned_int_2_t, + _swigc__p_VecMat__VecT_unsigned_int_3_t, _swigc__p_Vertex, _swigc__p_ViewEdge, _swigc__p_ViewEdgeInternal__SVertexIterator, @@ -111225,8 +110147,8 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_ViewMap, _swigc__p_ViewShape, _swigc__p_ViewVertex, - _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, - _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -111246,6 +110168,7 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_fedge_iterator, _swigc__p_fedges_container, _swigc__p_float, + _swigc__p_id_to_index_map, _swigc__p_id_type, _swigc__p_int, _swigc__p_ltstr, @@ -111255,29 +110178,30 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_point_iterator, _swigc__p_point_type, _swigc__p_reference, - _swigc__p_setTVecMat__Vec3Tdouble_t_t, + _swigc__p_setT_VecMat__Vec3T_double_t_t, _swigc__p_size_type, _swigc__p_std__invalid_argument, - _swigc__p_std__pairTViewEdge_p_bool_t, - _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, - _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, - _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, - _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, - _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, - _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, - _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, - _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, - _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, - _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, - _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, - _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, - _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, - _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, - _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, - _swigc__p_std__vectorTint_std__allocatorTint_t_t, - _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, - _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, - _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, + _swigc__p_std__pairT_ViewEdge_p_bool_t, + _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, + _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, + _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t, + _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, + _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, + _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, + _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, + _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, + _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, + _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, + _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, + _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, + _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, + _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, + _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, + _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, + _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, _swigc__p_svertices_container, _swigc__p_swig__PySwigIterator, _swigc__p_unsigned_int, @@ -111291,12 +110215,12 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_viewshapes_container, _swigc__p_viewvertices_container, _swigc__p_void, - _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, - _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, - _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, - _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, - _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, - _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, + _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, + _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, + _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, + _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, + _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, + _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, }; @@ -111365,7 +110289,7 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; - int found; + int found, init; clientdata = clientdata; @@ -111375,6 +110299,9 @@ SWIG_InitializeModule(void *clientdata) { swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; + init = 1; + } else { + init = 0; } /* Try and load any already created modules */ @@ -111403,6 +110330,12 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); @@ -111819,19 +110752,19 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "_Noise_B_",SWIG_From_int(static_cast< int >(0x100))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); - SWIG_addvarlink(SWIG_globals(),(char*)"POINT",POINT_get, POINT_set); - SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",S_VERTEX_get, S_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",VIEW_VERTEX_get, VIEW_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",NON_T_VERTEX_get, NON_T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",T_VERTEX_get, T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",CUSP_get, CUSP_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",NO_FEATURE_get, NO_FEATURE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",SILHOUETTE_get, SILHOUETTE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",BORDER_get, BORDER_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",CREASE_get, CREASE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",RIDGE_get, RIDGE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",VALLEY_get, VALLEY_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",SUGGESTIVE_CONTOUR_get, SUGGESTIVE_CONTOUR_set); + SWIG_addvarlink(SWIG_globals(),(char*)"POINT",Swig_var_POINT_get, Swig_var_POINT_set); + SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",Swig_var_S_VERTEX_get, Swig_var_S_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",Swig_var_VIEW_VERTEX_get, Swig_var_VIEW_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",Swig_var_NON_T_VERTEX_get, Swig_var_NON_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",Swig_var_T_VERTEX_get, Swig_var_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",Swig_var_CUSP_get, Swig_var_CUSP_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",Swig_var_NO_FEATURE_get, Swig_var_NO_FEATURE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",Swig_var_SILHOUETTE_get, Swig_var_SILHOUETTE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",Swig_var_BORDER_get, Swig_var_BORDER_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",Swig_var_CREASE_get, Swig_var_CREASE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",Swig_var_RIDGE_get, Swig_var_RIDGE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",Swig_var_VALLEY_get, Swig_var_VALLEY_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",Swig_var_SUGGESTIVE_CONTOUR_get, Swig_var_SUGGESTIVE_CONTOUR_set); SWIG_Python_SetConstant(d, "MEAN",SWIG_From_int(static_cast< int >(MEAN))); SWIG_Python_SetConstant(d, "MIN",SWIG_From_int(static_cast< int >(MIN))); SWIG_Python_SetConstant(d, "MAX",SWIG_From_int(static_cast< int >(MAX))); diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.h b/source/blender/freestyle/intern/swig/ModuleWrapper.h index 06ca8c90f37..f24a77d53b2 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.h +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.31 + * Version 1.3.35 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -73,7 +73,7 @@ private: }; -class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D< void >, public Swig::Director { public: SwigDirector_UnaryFunction0DVoid(PyObject *self); @@ -119,7 +119,7 @@ private: }; -class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D< unsigned int >, public Swig::Director { public: SwigDirector_UnaryFunction0DUnsigned(PyObject *self); @@ -165,7 +165,7 @@ private: }; -class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D< float >, public Swig::Director { public: SwigDirector_UnaryFunction0DFloat(PyObject *self); @@ -211,7 +211,7 @@ private: }; -class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D< double >, public Swig::Director { public: SwigDirector_UnaryFunction0DDouble(PyObject *self); @@ -257,13 +257,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D< Geometry::Vec2f >, public Swig::Director { public: SwigDirector_UnaryFunction0DVec2f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2 operator ()(Interface0DIterator &iter); + virtual VecMat::Vec2< float > operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -303,13 +303,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D< Geometry::Vec3f >, public Swig::Director { public: SwigDirector_UnaryFunction0DVec3f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3 operator ()(Interface0DIterator &iter); + virtual VecMat::Vec3< float > operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -349,7 +349,7 @@ private: }; -class SwigDirector_UnaryFunction0DId : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DId : public UnaryFunction0D< Id >, public Swig::Director { public: SwigDirector_UnaryFunction0DId(PyObject *self); @@ -395,7 +395,7 @@ private: }; -class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D< void >, public Swig::Director { public: SwigDirector_UnaryFunction1DVoid(PyObject *self); @@ -442,7 +442,7 @@ private: }; -class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D< unsigned int >, public Swig::Director { public: SwigDirector_UnaryFunction1DUnsigned(PyObject *self); @@ -489,7 +489,7 @@ private: }; -class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D< float >, public Swig::Director { public: SwigDirector_UnaryFunction1DFloat(PyObject *self); @@ -536,7 +536,7 @@ private: }; -class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D< double >, public Swig::Director { public: SwigDirector_UnaryFunction1DDouble(PyObject *self); @@ -583,14 +583,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D< Geometry::Vec2f >, public Swig::Director { public: SwigDirector_UnaryFunction1DVec2f(PyObject *self); SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2 operator ()(Interface1D &inter); + virtual VecMat::Vec2< float > operator ()(Interface1D &inter); /* Internal Director utilities */ @@ -630,14 +630,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D< Geometry::Vec3f >, public Swig::Director { public: SwigDirector_UnaryFunction1DVec3f(PyObject *self); SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3 operator ()(Interface1D &inter); + virtual VecMat::Vec3< float > operator ()(Interface1D &inter); /* Internal Director utilities */ diff --git a/source/blender/freestyle/python/3ds_export.py b/source/blender/freestyle/python/3ds_export.py new file mode 100644 index 00000000000..eb7fd079cfd --- /dev/null +++ b/source/blender/freestyle/python/3ds_export.py @@ -0,0 +1,1010 @@ +#!BPY +# coding: utf-8 +""" +Name: '3D Studio (.3ds)...' +Blender: 243 +Group: 'Export' +Tooltip: 'Export to 3DS file format (.3ds).' +""" + +__author__ = ["Campbell Barton", "Bob Holcomb", "Richard Lärkäng", "Damien McGinnes", "Mark Stijnman"] +__url__ = ("blenderartists.org", "www.blender.org", "www.gametutorials.com", "lib3ds.sourceforge.net/") +__version__ = "0.90a" +__bpydoc__ = """\ + +3ds Exporter + +This script Exports a 3ds file. + +Exporting is based on 3ds loader from www.gametutorials.com(Thanks DigiBen) and using information +from the lib3ds project (http://lib3ds.sourceforge.net/) sourcecode. +""" + +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# Script copyright (C) Bob Holcomb +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ***** END GPL LICENCE BLOCK ***** +# -------------------------------------------------------------------------- + + +###################################################### +# Importing modules +###################################################### + +import Blender +import bpy +from BPyMesh import getMeshFromObject +from BPyObject import getDerivedObjects +import struct + +# So 3ds max can open files, limit names to 12 in length +# this is verry annoying for filenames! +name_unique = [] +name_mapping = {} +def sane_name(name): + name_fixed = name_mapping.get(name) + if name_fixed != None: + return name_fixed + + if len(name) > 12: + new_name = name[:12] + else: + new_name = name + + i = 0 + + while new_name in name_unique: + new_name = new_name[:-4] + '.%.3d' % i + i+=1 + + name_unique.append(new_name) + name_mapping[name] = new_name + return new_name + +###################################################### +# Data Structures +###################################################### + +#Some of the chunks that we will export +#----- Primary Chunk, at the beginning of each file +PRIMARY= long("0x4D4D",16) + +#------ Main Chunks +OBJECTINFO = long("0x3D3D",16); #This gives the version of the mesh and is found right before the material and object information +VERSION = long("0x0002",16); #This gives the version of the .3ds file +KFDATA = long("0xB000",16); #This is the header for all of the key frame info + +#------ sub defines of OBJECTINFO +MATERIAL=45055 #0xAFFF // This stored the texture info +OBJECT=16384 #0x4000 // This stores the faces, vertices, etc... + +#>------ sub defines of MATERIAL +MATNAME = long("0xA000",16); # This holds the material name +MATAMBIENT = long("0xA010",16); # Ambient color of the object/material +MATDIFFUSE = long("0xA020",16); # This holds the color of the object/material +MATSPECULAR = long("0xA030",16); # SPecular color of the object/material +MATSHINESS = long("0xA040",16); # ?? +MATMAP = long("0xA200",16); # This is a header for a new material +MATMAPFILE = long("0xA300",16); # This holds the file name of the texture + +RGB1= long("0x0011",16) +RGB2= long("0x0012",16) + +#>------ sub defines of OBJECT +OBJECT_MESH = long("0x4100",16); # This lets us know that we are reading a new object +OBJECT_LIGHT = long("0x4600",16); # This lets un know we are reading a light object +OBJECT_CAMERA= long("0x4700",16); # This lets un know we are reading a camera object + +#>------ sub defines of CAMERA +OBJECT_CAM_RANGES= long("0x4720",16); # The camera range values + +#>------ sub defines of OBJECT_MESH +OBJECT_VERTICES = long("0x4110",16); # The objects vertices +OBJECT_FACES = long("0x4120",16); # The objects faces +OBJECT_MATERIAL = long("0x4130",16); # This is found if the object has a material, either texture map or color +OBJECT_UV = long("0x4140",16); # The UV texture coordinates +OBJECT_TRANS_MATRIX = long("0x4160",16); # The Object Matrix + +#>------ sub defines of KFDATA +KFDATA_KFHDR = long("0xB00A",16); +KFDATA_KFSEG = long("0xB008",16); +KFDATA_KFCURTIME = long("0xB009",16); +KFDATA_OBJECT_NODE_TAG = long("0xB002",16); + +#>------ sub defines of OBJECT_NODE_TAG +OBJECT_NODE_ID = long("0xB030",16); +OBJECT_NODE_HDR = long("0xB010",16); +OBJECT_PIVOT = long("0xB013",16); +OBJECT_INSTANCE_NAME = long("0xB011",16); +POS_TRACK_TAG = long("0xB020",16); +ROT_TRACK_TAG = long("0xB021",16); +SCL_TRACK_TAG = long("0xB022",16); + +def uv_key(uv): + return round(uv.x, 6), round(uv.y, 6) + +# size defines: +SZ_SHORT = 2 +SZ_INT = 4 +SZ_FLOAT = 4 + +class _3ds_short(object): + '''Class representing a short (2-byte integer) for a 3ds file. + *** This looks like an unsigned short H is unsigned from the struct docs - Cam***''' + __slots__ = 'value' + def __init__(self, val=0): + self.value=val + + def get_size(self): + return SZ_SHORT + + def write(self,file): + file.write(struct.pack("= mat_ls_len: + mat_index = f.mat = 0 + mat = mat_ls[mat_index] + if mat: mat_name = mat.name + else: mat_name = None + # else there alredy set to none + + img = f.image + if img: img_name = img.name + else: img_name = None + + materialDict.setdefault((mat_name, img_name), (mat, img) ) + + + else: + for mat in mat_ls: + if mat: # material may be None so check its not. + materialDict.setdefault((mat.name, None), (mat, None) ) + + # Why 0 Why! + for f in data.faces: + if f.mat >= mat_ls_len: + f.mat = 0 + + # Make material chunks for all materials used in the meshes: + for mat_and_image in materialDict.itervalues(): + object_info.add_subchunk(make_material_chunk(mat_and_image[0], mat_and_image[1])) + + # Give all objects a unique ID and build a dictionary from object name to object id: + """ + name_to_id = {} + for ob, data in mesh_objects: + name_to_id[ob.name]= len(name_to_id) + #for ob in empty_objects: + # name_to_id[ob.name]= len(name_to_id) + """ + + # Create object chunks for all meshes: + i = 0 + for ob, blender_mesh in mesh_objects: + # create a new object chunk + object_chunk = _3ds_chunk(OBJECT) + + # set the object name + object_chunk.add_variable("name", _3ds_string(sane_name(ob.name))) + + # make a mesh chunk out of the mesh: + object_chunk.add_subchunk(make_mesh_chunk(blender_mesh, materialDict)) + object_info.add_subchunk(object_chunk) + + ''' # COMMENTED OUT FOR 2.42 RELEASE!! CRASHES 3DS MAX + # make a kf object node for the object: + kfdata.add_subchunk(make_kf_obj_node(ob, name_to_id)) + ''' + blender_mesh.verts = None + i+=i + + # Create chunks for all empties: + ''' # COMMENTED OUT FOR 2.42 RELEASE!! CRASHES 3DS MAX + for ob in empty_objects: + # Empties only require a kf object node: + kfdata.add_subchunk(make_kf_obj_node(ob, name_to_id)) + pass + ''' + + # Add main object info chunk to primary chunk: + primary.add_subchunk(object_info) + + ''' # COMMENTED OUT FOR 2.42 RELEASE!! CRASHES 3DS MAX + # Add main keyframe data chunk to primary chunk: + primary.add_subchunk(kfdata) + ''' + + # At this point, the chunk hierarchy is completely built. + + # Check the size: + primary.get_size() + # Open the file for writing: + file = open( filename, 'wb' ) + + # Recursively write the chunks to file: + primary.write(file) + + # Close the file: + file.close() + + # Debugging only: report the exporting time: + Blender.Window.WaitCursor(0) + print "3ds export time: %.2f" % (Blender.sys.time() - time1) + + # Debugging only: dump the chunk hierarchy: + #primary.dump() + +save_3ds( Blender.Get('tempdir') + '/tmp_scene_freestyle.3ds' ) diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index 5eb9119cb80..43ae6772f35 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.33 +# Version 1.3.35 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. @@ -60,7 +60,7 @@ class PySwigIterator(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_PySwigIterator __del__ = lambda self : None; @@ -674,6 +674,8 @@ class Interface0D(_object): __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface0D, name) __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_Interface0D + __del__ = lambda self : None; def getExactTypeName(*args): return _Freestyle.Interface0D_getExactTypeName(*args) def getX(*args): return _Freestyle.Interface0D_getX(*args) def getY(*args): return _Freestyle.Interface0D_getY(*args) @@ -694,8 +696,6 @@ class Interface0D(_object): this = _Freestyle.new_Interface0D(*args) try: self.this.append(this) except: self.this = this - __swig_destroy__ = _Freestyle.delete_Interface0D - __del__ = lambda self : None; Interface0D_swigregister = _Freestyle.Interface0D_swigregister Interface0D_swigregister(Interface0D) cvar = _Freestyle.cvar @@ -718,7 +718,7 @@ class Interface0DIteratorNested(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIteratorNested, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIteratorNested, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_Interface0DIteratorNested __del__ = lambda self : None; @@ -803,8 +803,10 @@ class Interface1D(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Interface1D, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface1D, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + __swig_destroy__ = _Freestyle.delete_Interface1D + __del__ = lambda self : None; def getExactTypeName(*args): return _Freestyle.Interface1D_getExactTypeName(*args) def verticesBegin(*args): return _Freestyle.Interface1D_verticesBegin(*args) def verticesEnd(*args): return _Freestyle.Interface1D_verticesEnd(*args) @@ -815,8 +817,6 @@ class Interface1D(_object): def getNature(*args): return _Freestyle.Interface1D_getNature(*args) def getTimeStamp(*args): return _Freestyle.Interface1D_getTimeStamp(*args) def setTimeStamp(*args): return _Freestyle.Interface1D_setTimeStamp(*args) - __swig_destroy__ = _Freestyle.delete_Interface1D - __del__ = lambda self : None; Interface1D_swigregister = _Freestyle.Interface1D_swigregister Interface1D_swigregister(Interface1D) @@ -1434,7 +1434,7 @@ class ViewVertex(Interface0D): __swig_getmethods__ = {} for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, ViewVertex, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def getExactTypeName(*args): return _Freestyle.ViewVertex_getExactTypeName(*args) __swig_setmethods__["userdata"] = _Freestyle.ViewVertex_userdata_set @@ -4831,7 +4831,7 @@ class Operators(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Operators, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Operators, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["select"] = lambda x: _Freestyle.Operators_select if _newclass:select = staticmethod(_Freestyle.Operators_select) @@ -4898,7 +4898,7 @@ class Canvas(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Canvas, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Canvas, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["getInstance"] = lambda x: _Freestyle.Canvas_getInstance if _newclass:getInstance = staticmethod(_Freestyle.Canvas_getInstance) diff --git a/tools/Blender.py b/tools/Blender.py index 92ee1e3e6ec..633a576efee 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -121,9 +121,6 @@ def setup_staticlibs(lenv): ] libincs += Split(lenv['BF_OPENEXR_LIBPATH']) libincs += Split(lenv['BF_FFMPEG_LIBPATH']) - - if lenv['WITH_BF_FREESTYLE']: - libincs += Split(lenv['BF_LIB3DS_LIBPATH']) if lenv['WITH_BF_INTERNATIONAL']: libincs += Split(lenv['BF_GETTEXT_LIBPATH']) diff --git a/tools/btools.py b/tools/btools.py index deab2e687b6..5bce1c15daa 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -66,7 +66,7 @@ def validate_arguments(args, bc): 'BF_FANCY', 'BF_QUIET', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', - 'BF_WITH_BF_FREESTYLE', 'BF_FREESTYLE', 'BF_FREESTYLE_SRC', 'BF_SWIG', 'BF_SWIG_LIB', 'BF_LIB3DS', 'BF_LIB3DS_LIB', 'BF_LIB3DS_LIBPATH', 'BF_LIB3DS_INC' + 'BF_WITH_BF_FREESTYLE', 'BF_FREESTYLE', 'BF_FREESTYLE_SRC', 'BF_SWIG', 'BF_SWIG_LIB', 'BF_LIB3DS', 'BF_LIB3DS_LIB', 'BF_LIB3DS_INC' ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', @@ -245,8 +245,7 @@ def read_opts(cfg, args): ('BF_SWIG_LIB', 'SWIG library', ''), ('BF_LIB3DS', 'lib3ds base path', ''), ('BF_LIB3DS_LIB', 'lib3ds library', ''), - ('BF_LIB3DS_LIBPATH', 'lib3ds library path', ''), - ('BF_LIB3DS_INC', 'lib3ds include path', ''), + ('BF_LIB3DS_INC', 'lib3ds include path', ''), ## ##WITH_BF_NSPR = 'true' From 57d83522a22fb90ea42bee1d80cb6e47710cad7b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Jun 2008 10:03:30 +0000 Subject: [PATCH 213/430] Fix for bug #13627: bFTGL sconscript missing opengl includes, didn't compile with non-standard paths. --- extern/bFTGL/SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/bFTGL/SConscript b/extern/bFTGL/SConscript index bd20db5a459..c03992631e6 100644 --- a/extern/bFTGL/SConscript +++ b/extern/bFTGL/SConscript @@ -22,7 +22,7 @@ Import('env') #ftgl_env.Append (CPPDEFINES = defines) -incs = 'include src ' + env['BF_FREETYPE_INC'] +incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC'] defs = '' sources = env.Glob('src/*.cpp') From 610b877f60083ef064058efc7011a5b35c5e96b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 Jun 2008 12:13:51 +0000 Subject: [PATCH 214/430] ctrl+LMB drag would add an ipo vert AND zoom in ipo view. checked revisions 7915 and 10663, it seems this functionality was accidental. --- source/blender/src/space.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 8cc7e6975b4..90a48565a8f 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2974,8 +2974,11 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt) do_ipo_selectbuttons(); doredraw= 1; } + else if(G.qual == LR_CTRLKEY) { + if (sipo->showkey==0) + add_vert_ipo(); + } else if(view2dmove(LEFTMOUSE)); /* only checks for sliders */ - else if((G.qual & LR_CTRLKEY) && (sipo->showkey==0)) add_vert_ipo(); else { do { getmouseco_areawin(mval); From f39758cddca1d6eeec299e8cd3eef9a2a1852e32 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 Jun 2008 15:45:46 +0000 Subject: [PATCH 215/430] adding clip alpha (binary alpha) to the 3D view and game engine. --- source/blender/makesdna/DNA_meshdata_types.h | 4 +++- source/blender/src/buttons_editing.c | 1 + source/blender/src/drawmesh.c | 12 ++++++++---- .../GamePlayer/common/GPC_PolygonMaterial.cpp | 11 +++++++++-- source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 9 ++++++++- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 79c1710a897..a717df640f1 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -229,14 +229,16 @@ typedef struct PartialVisibility { #define TF_SHADOW 8192 #define TF_BMFONT 16384 -/* mtface->transp */ +/* mtface->transp, values 1-4 are used as flags in the GL, WARNING, TF_SUB cant work with this */ #define TF_SOLID 0 #define TF_ADD 1 #define TF_ALPHA 2 +#define TF_CLIP 4 /* clipmap alpha/binary alpha all or nothing! */ /* sub is not available in the user interface anymore */ #define TF_SUB 3 + /* mtface->unwrap */ #define TF_DEPRECATED1 1 #define TF_DEPRECATED2 2 diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 6250b69345b..7e154d6c341 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -6235,6 +6235,7 @@ static void editing_panel_mesh_texface(void) uiDefButC(block, ROW, REDRAWVIEW3D, "Opaque", 600,80,60,19, &tf->transp, 2.0, (float)TF_SOLID,0, 0, "Render color of textured face as color"); uiDefButC(block, ROW, REDRAWVIEW3D, "Add", 660,80,60,19, &tf->transp, 2.0, (float)TF_ADD, 0, 0, "Render face transparent and add color of face"); uiDefButC(block, ROW, REDRAWVIEW3D, "Alpha", 720,80,60,19, &tf->transp, 2.0, (float)TF_ALPHA,0, 0, "Render polygon transparent, depending on alpha channel of the texture"); + uiDefButC(block, ROW, REDRAWVIEW3D, "Clip Alpha", 780,80,80,19, &tf->transp, 2.0, (float)TF_CLIP,0, 0, "Use the images alpha values clipped with no blending (binary alpha)"); } else uiDefBut(block,LABEL,B_NOP, "(No Active Face)", 10,200,150,19,0,0,0,0,0,""); diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index b72cd3f56f8..dd512595ebc 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -228,13 +228,14 @@ int set_tpage(MTFace *tface) alphamode= tface->transp; if(alphamode) { - glEnable(GL_BLEND); - if(alphamode==TF_ADD) { + glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); + glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } else if(alphamode==TF_ALPHA) { + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* added after 2.45 to clip alpha */ @@ -245,9 +246,12 @@ int set_tpage(MTFace *tface) glEnable ( GL_ALPHA_TEST ); glAlphaFunc ( GL_GREATER, U.glalphaclip ); } - - /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ + } else if (alphamode==TF_CLIP){ + glDisable(GL_BLEND); + glEnable ( GL_ALPHA_TEST ); + glAlphaFunc(GL_GREATER, 0.5f); } + /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ /* else { */ /* glBlendFunc(GL_ONE, GL_ONE); */ /* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */ diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index 46fe24d8b87..09dd14172c8 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -154,16 +154,23 @@ int set_tpage(MTFace *tface) fAlphamode= tface->transp; if(fAlphamode) { - glEnable(GL_BLEND); - if(fAlphamode==TF_ADD) { + glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); + glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } else if(fAlphamode==TF_ALPHA) { + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } + else if (alphamode==TF_CLIP){ + glDisable(GL_BLEND); + glEnable ( GL_ALPHA_TEST ); + glAlphaFunc(GL_GREATER, 0.5f); + } /* else { */ /* glBlendFunc(GL_ONE, GL_ONE); */ /* glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT); */ diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 44727588106..5efe1ad26ca 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -478,16 +478,23 @@ bool KX_BlenderMaterial::setDefaultBlending() if( mMaterial->transp &TF_ADD) { glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE); + glDisable ( GL_ALPHA_TEST ); return true; } if( mMaterial->transp & TF_ALPHA ) { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable ( GL_ALPHA_TEST ); return true; } - glDisable(GL_BLEND); + if( mMaterial->transp & TF_CLIP ) { + glDisable(GL_BLEND); + glEnable ( GL_ALPHA_TEST ); + glAlphaFunc(GL_GREATER, 0.5f); + return true; + } return false; } From 4e2bb896b0cb0adad94158fd53a0de505b9df642 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 9 Jun 2008 16:49:33 +0000 Subject: [PATCH 216/430] Added back a feature from the old particle system: negative start frame. At the moment this does mean it will compute all the frames before the point caching start frame on the first frame, which might be slow. --- .../blender/blenkernel/intern/particle_system.c | 17 ++++++++++++++--- source/blender/src/buttons_object.c | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5112fb08fe6..f06ef221795 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4814,9 +4814,20 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier pa->flag &= ~PARS_NO_DISP; } - /* ok now we're all set so let's go */ - if(psys->totpart) - dynamics_step(ob,psys,psmd,cfra,vg_vel,vg_tan,vg_rot,vg_size); + if(psys->totpart) { + int dframe, totframesback = 0; + + /* handle negative frame start at the first frame by doing + * all the steps before the first frame */ + if(framenr == startframe && part->sta < startframe) + totframesback = (startframe - (int)part->sta); + + for(dframe=-totframesback; dframe<=0; dframe++) { + /* ok now we're all set so let's go */ + dynamics_step(ob,psys,psmd,cfra+dframe,vg_vel,vg_tan,vg_rot,vg_size); + psys->cfra = cfra+dframe; + } + } cache->simframe= framenr; cache->flag |= PTCACHE_SIMULATION_VALID; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 52261f7d3fb..ba409723784 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4832,7 +4832,7 @@ static void object_panel_particle_system(Object *ob) uiDefButS(block, NUM, B_PART_RECALC, "Segments:", butx,(buty-=buth),butw,buth, &part->hair_step, 2.0, 50.0, 0, 0, "Amount of hair segments"); } else { - uiDefButF(block, NUM, B_PART_INIT, "Sta:", butx,(buty-=buth),butw,buth, &part->sta, 1.0, part->end, 100, 1, "Frame # to start emitting particles"); + uiDefButF(block, NUM, B_PART_INIT, "Sta:", butx,(buty-=buth),butw,buth, &part->sta, -MAXFRAMEF, part->end, 100, 1, "Frame # to start emitting particles"); uiDefButF(block, NUM, B_PART_INIT, "End:", butx,(buty-=buth),butw,buth, &part->end, part->sta, MAXFRAMEF, 100, 1, "Frame # to stop emitting particles"); } From 83af2c1757d7ce76842dd13d92395d4bf5f0c410 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 16:54:54 +0000 Subject: [PATCH 217/430] PATCH: [#13656] Bad rotation computing for manual rotation higher than 180 degrees By Fabrice Tiercelin This enables rotation angles of more than 180 degrees to result in the same rotation applied to the object (the result used to be clamps between -180 - 180 of the initial rotation). The patch had to be modified to deal with IPO keys properly --- source/blender/src/transform.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 4f6c33b0a64..64d244dc1a0 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2530,15 +2530,22 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { /* are there ipo keys? */ if(td->tdi) { TransDataIpokey *tdi= td->tdi; + float current_rot[3]; float rot[3]; + /* current IPO value for compatible euler */ + current_rot[0] = tdi->rotx[0]; + current_rot[1] = tdi->roty[0]; + current_rot[2] = tdi->rotz[0]; + VecMulf(current_rot, (float)(M_PI_2 / 9.0)); + /* calculate the total rotatation in eulers */ VecAddf(eul, td->ext->irot, td->ext->drot); EulToMat3(eul, obmat); /* mat = transform, obmat = object rotation */ Mat3MulMat3(fmat, mat, obmat); - Mat3ToCompatibleEul(fmat, eul, td->ext->irot); + Mat3ToCompatibleEul(fmat, eul, current_rot); /* correct back for delta rot */ if(tdi->flag & TOB_IPODROT) { @@ -2567,7 +2574,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { /* mat = transform, obmat = object rotation */ Mat3MulMat3(fmat, smat, obmat); - Mat3ToCompatibleEul(fmat, eul, td->ext->irot); + Mat3ToCompatibleEul(fmat, eul, td->ext->rot); /* correct back for delta rot */ VecSubf(eul, eul, td->ext->drot); From ac0a91920af0c9de9f6dfbbf493ecb9e2509c15e Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 17:16:20 +0000 Subject: [PATCH 218/430] Revision 14894 merged from apricot ---------------------------------- Arith: - axis angle to quat conversion function - short to float / float to short normals conversion function (eventually, we could go over the go and replace copy/pasted code everywhere) - ray triangle intersection (to complement the line triangle intersection function) View: - viewray / viewline (get near plane point under mouse and ray normal/far point) Particles: - extract viewline from brush_add function --- source/blender/blenlib/BLI_arithb.h | 4 ++ source/blender/blenlib/intern/arithb.c | 67 ++++++++++++++++++++++++++ source/blender/include/BSE_view.h | 2 + source/blender/src/editparticle.c | 36 ++------------ source/blender/src/view.c | 42 ++++++++++++++++ 5 files changed, 120 insertions(+), 31 deletions(-) diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 9ed23bc32b6..4d277cf98e1 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -258,6 +258,7 @@ void Vec2Addf(float *v, float *v1, float *v2); void Vec2Subf(float *v, float *v1, float *v2); void Vec2Copyf(float *v1, float *v2); +void AxisAngleToQuat(float *q, float *axis, float angle); void vectoquat(float *vec, short axis, short upflag, float *q); float VecAngle2(float *v1, float *v2); @@ -269,6 +270,8 @@ float NormalizedVecAngle2_2D(float *v1, float *v2); void euler_rot(float *beul, float ang, char axis); +void NormalShortToFloat(float *out, short *in); +void NormalFloatToShort(short *out, float *in); float DistVL2Dfl(float *v1, float *v2, float *v3); float PdistVL2Dfl(float *v1, float *v2, float *v3); @@ -372,6 +375,7 @@ void tubemap(float x, float y, float z, float *u, float *v); void spheremap(float x, float y, float z, float *u, float *v); int LineIntersectsTriangle(float p1[3], float p2[3], float v0[3], float v1[3], float v2[3], float *lambda, float *uv); +int RayIntersectsTriangle(float p1[3], float d[3], float v0[3], float v1[3], float v2[3], float *lambda, float *uv); int SweepingSphereIntersectsTriangleUV(float p1[3], float p2[3], float radius, float v0[3], float v1[3], float v2[3], float *lambda, float *ipoint); int AxialLineIntersectsTriangle(int axis, float co1[3], float co2[3], float v0[3], float v1[3], float v2[3], float *lambda); int AabbIntersectAabb(float min1[3], float max1[3], float min2[3], float max2[3]); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 48a149f4b3a..322a9e6fd02 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -1335,6 +1335,22 @@ void NormalQuat(float *q) } } +void AxisAngleToQuat(float *q, float *axis, float angle) +{ + float nor[3]; + float si; + + VecCopyf(nor, axis); + Normalize(nor); + + angle /= 2; + si = (float)sin(angle); + q[0] = (float)cos(angle); + q[1] = nor[0] * si; + q[2] = nor[1] * si; + q[3] = nor[2] * si; +} + void vectoquat(float *vec, short axis, short upflag, float *q) { float q2[4], nor[3], *fp, mat[3][3], angle, si, co, x2, y2, z2, len1; @@ -2258,6 +2274,20 @@ double Sqrt3d(double d) else return exp(log(d)/3); } +void NormalShortToFloat(float *out, short *in) +{ + out[0] = in[0] / 32767.0; + out[1] = in[1] / 32767.0; + out[2] = in[2] / 32767.0; +} + +void NormalFloatToShort(short *out, float *in) +{ + out[0] = (short)(in[0] * 32767.0); + out[1] = (short)(in[1] * 32767.0); + out[2] = (short)(in[2] * 32767.0); +} + /* distance v1 to line v2-v3 */ /* using Hesse formula, NO LINE PIECE! */ float DistVL2Dfl( float *v1, float *v2, float *v3) { @@ -3671,6 +3701,43 @@ int LineIntersectsTriangle(float p1[3], float p2[3], float v0[3], float v1[3], f return 1; } +/* moved from effect.c + test if the ray starting at p1 going in d direction intersects the triangle v0..v2 + return non zero if it does +*/ +int RayIntersectsTriangle(float p1[3], float d[3], float v0[3], float v1[3], float v2[3], float *lambda, float *uv) +{ + float p[3], s[3], e1[3], e2[3], q[3]; + float a, f, u, v; + + VecSubf(e1, v1, v0); + VecSubf(e2, v2, v0); + + Crossf(p, d, e2); + a = Inpf(e1, p); + if ((a > -0.000001) && (a < 0.000001)) return 0; + f = 1.0f/a; + + VecSubf(s, p1, v0); + + Crossf(q, s, e1); + *lambda = f * Inpf(e2, q); + if ((*lambda < 0.0)) return 0; + + u = f * Inpf(s, p); + if ((u < 0.0)||(u > 1.0)) return 0; + + v = f * Inpf(d, q); + if ((v < 0.0)||((u + v) > 1.0)) return 0; + + if(uv) { + uv[0]= u; + uv[1]= v; + } + + return 1; +} + /* Adapted from the paper by Kasper Fauerby */ /* "Improved Collision detection and Response" */ int SweepingSphereIntersectsTriangleUV(float p1[3], float p2[3], float radius, float v0[3], float v1[3], float v2[3], float *lambda, float *ipoint) diff --git a/source/blender/include/BSE_view.h b/source/blender/include/BSE_view.h index 4b334fdd959..f7afce958f5 100644 --- a/source/blender/include/BSE_view.h +++ b/source/blender/include/BSE_view.h @@ -66,6 +66,8 @@ void project_int(float *vec, int *adr); void project_int_noclip(float *vec, int *adr); void project_float(float *vec, float *adr); void project_float_noclip(float *vec, float *adr); +void viewray(short mval[2], float ray_start[3], float ray_normal[3]); +void viewline(short mval[2], float ray_start[3], float ray_end[3]); int boundbox_clip(float obmat[][4], struct BoundBox *bb); void fdrawline(float x1, float y1, float x2, float y2); diff --git a/source/blender/src/editparticle.c b/source/blender/src/editparticle.c index 95a4abe1f9d..f420d46c827 100644 --- a/source/blender/src/editparticle.c +++ b/source/blender/src/editparticle.c @@ -2273,9 +2273,9 @@ static void brush_add(Object *ob, ParticleSystem *psys, short *mval, short numbe ParticleEditSettings *pset= PE_settings(); ParticleEdit *edit = psys->edit; int i, k, n = 0, totpart = psys->totpart; + short mco[2]; short dmx = 0, dmy = 0; - short mx = mval[0] - curarea->winx / 2, my = mval[1] - curarea->winy / 2; - float co1[3], co2[3], vec[4], min_d, imat[4][4]; + float co1[3], co2[3], min_d, imat[4][4]; float framestep, timestep = psys_get_timestep(psys->part); short size = pset->brush[PE_BRUSH_ADD].size; short size2 = size*size; @@ -2302,35 +2302,9 @@ static void brush_add(Object *ob, ParticleSystem *psys, short *mval, short numbe } } - /* create intersection coordinates in view Z direction at mouse coordinates */ - /* Thanks to who ever wrote the "Mouse Location 3D Space" tutorial in "Blender 3D: Blending Into Python/Cookbook". */ - if(G.vd->persp != V3D_ORTHO){ - vec[0]= (2.0f*(mx+dmx)/curarea->winx); - vec[1]= (2.0f*(my+dmy)/curarea->winy); - vec[2]= -1.0f; - vec[3]= 1.0f; - - Mat4MulVec4fl(G.vd->persinv, vec); - VecMulf(vec, 1.0f/vec[3]); - - VECCOPY(co1, G.vd->viewinv[3]); - VECSUB(vec, vec, co1); - Normalize(vec); - - VECADDFAC(co1, G.vd->viewinv[3], vec, G.vd->near); - VECADDFAC(co2, G.vd->viewinv[3], vec, G.vd->far); - } - else { - vec[0] = 2.0f*(mx+dmx)/curarea->winx; - vec[1] = 2.0f*(my+dmy)/curarea->winy; - vec[2] = 0.0f; - vec[3] = 1.0f; - - Mat4MulVec4fl(G.vd->persinv,vec); - - VECADDFAC(co1,vec,G.vd->viewinv[2],1000.0f); - VECADDFAC(co2,vec,G.vd->viewinv[2],-1000.0f); - } + mco[0] = mval[0] + dmx; + mco[1] = mval[1] + dmy; + viewline(mco, co1, co2); Mat4MulVecfl(imat,co1); Mat4MulVecfl(imat,co2); diff --git a/source/blender/src/view.c b/source/blender/src/view.c index f53bcb3a9f7..835aeb9bb30 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -144,6 +144,48 @@ void persp(int a) } } +/* create intersection ray in view Z direction at mouse coordinates */ +void viewray(short mval[2], float ray_start[3], float ray_normal[3]) +{ + float ray_end[3]; + viewline(mval, ray_start, ray_end); + VecSubf(ray_normal, ray_end, ray_start); + Normalize(ray_normal); +} + +/* create intersection coordinates in view Z direction at mouse coordinates */ +void viewline(short mval[2], float ray_start[3], float ray_end[3]) +{ + float vec[3]; + + if(G.vd->persp != V3D_ORTHO){ + vec[0]= 2.0f * mval[0] / curarea->winx - 1; + vec[1]= 2.0f * mval[1] / curarea->winy - 1; + vec[2]= -1.0f; + vec[3]= 1.0f; + + Mat4MulVec4fl(G.vd->persinv, vec); + VecMulf(vec, 1.0f / vec[3]); + + VECCOPY(ray_start, G.vd->viewinv[3]); + VECSUB(vec, vec, ray_start); + Normalize(vec); + + VECADDFAC(ray_start, G.vd->viewinv[3], vec, G.vd->near); + VECADDFAC(ray_end, G.vd->viewinv[3], vec, G.vd->far); + } + else { + vec[0] = 2.0f * mval[0] / curarea->winx - 1; + vec[1] = 2.0f * mval[1] / curarea->winy - 1; + vec[2] = 0.0f; + vec[3] = 1.0f; + + Mat4MulVec4fl(G.vd->persinv, vec); + + VECADDFAC(ray_start, vec, G.vd->viewinv[2], 1000.0f); + VECADDFAC(ray_end, vec, G.vd->viewinv[2], -1000.0f); + } +} void initgrabz(float x, float y, float z) { From ccc78eebdee6b019e485d94f8524daf0567d50a0 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 17:22:38 +0000 Subject: [PATCH 219/430] Revision 15045 merged from apricot ---------------------------------- Small fix to derivedmesh for snapping: don't create origindex for editmesh derivedmesh since it's not being filled correct anyway. --- source/blender/blenkernel/intern/DerivedMesh.c | 4 ---- source/blender/blenkernel/intern/cdderivedmesh.c | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 654cf0991cc..30405660658 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -186,10 +186,6 @@ void DM_init_funcs(DerivedMesh *dm) void DM_init(DerivedMesh *dm, int numVerts, int numEdges, int numFaces) { - CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, numVerts); - CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges); - CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, numFaces); - dm->numVertData = numVerts; dm->numEdgeData = numEdges; dm->numFaceData = numFaces; diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index c2946bb666f..472df3d0f26 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -732,6 +732,10 @@ DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces) DM_init(dm, numVerts, numEdges, numFaces); + CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, numVerts); + CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges); + CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, numFaces); + CustomData_add_layer(&dm->vertData, CD_MVERT, CD_CALLOC, NULL, numVerts); CustomData_add_layer(&dm->edgeData, CD_MEDGE, CD_CALLOC, NULL, numEdges); CustomData_add_layer(&dm->faceData, CD_MFACE, CD_CALLOC, NULL, numFaces); @@ -753,6 +757,11 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh, Object *ob) * with an exception for fluidsim */ DM_init(dm, mesh->totvert, mesh->totedge, mesh->totface); + + CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totvert); + CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totedge); + CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totface); + dm->deformedOnly = 1; if(ob && ob->fluidsimSettings && ob->fluidsimSettings->meshSurface) From d5c80a3a1b05a184ab9dbf9e8b7be31f00c3461c Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 17:50:21 +0000 Subject: [PATCH 220/430] Revision 14929 partial merged from apricot (partial because I'll merge all snap code in one fell swoop after the libs are done) ---------------------------------- object: ray - boundbox intersection test --- source/blender/blenkernel/BKE_object.h | 1 + source/blender/blenkernel/intern/object.c | 28 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index a940ac62876..116a59fa97e 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -108,6 +108,7 @@ void object_boundbox_flag(struct Object *ob, int flag, int set); void minmax_object(struct Object *ob, float *min, float *max); void minmax_object_duplis(struct Object *ob, float *min, float *max); void solve_tracking (struct Object *ob, float targetmat[][4]); +int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3]); void object_handle_update(struct Object *ob); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 4f901ba7216..125243bc56f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2380,3 +2380,31 @@ int give_obdata_texspace(Object *ob, int **texflag, float **loc, float **size, f } return 1; } + +/* + * Test a bounding box for ray intersection + * assumes the ray is already local to the boundbox space + */ +int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3]) +{ + static int triangle_indexes[12][3] = {{0, 1, 2}, {0, 2, 3}, + {3, 2, 6}, {3, 6, 7}, + {1, 2, 6}, {1, 6, 5}, + {5, 6, 7}, {4, 5, 7}, + {0, 3, 7}, {0, 4, 7}, + {0, 1, 5}, {0, 4, 5}}; + int result = 0; + int i; + + for (i = 0; i < 12 && result == 0; i++) + { + float lambda; + int v1, v2, v3; + v1 = triangle_indexes[i][0]; + v2 = triangle_indexes[i][1]; + v3 = triangle_indexes[i][2]; + result = RayIntersectsTriangle(ray_start, ray_normal, bb->vec[v1], bb->vec[v2], bb->vec[v3], &lambda, NULL); + } + + return result; +} From 8c68895741c75960e879ffde7231c10ee5e0373c Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 18:07:12 +0000 Subject: [PATCH 221/430] Revision 14869 merged from apricot ---------------------------------- Centralize handling of individual center for rotations --- source/blender/src/transform.c | 71 ++++++++++------------------------ 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 64d244dc1a0..553b0993e5b 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2415,15 +2415,28 @@ void initRotation(TransInfo *t) static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { float vec[3], totmat[3][3], smat[3][3]; float eul[3], fmat[3][3], quat[4]; - + float *center = t->center; + + /* local constraint shouldn't alter center */ + if (t->around == V3D_LOCAL) { + if (t->flag & (T_OBJECT|T_POSE)) { + center = td->center; + } + else { + if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { + center = td->center; + } + } + } + if (t->flag & T_POINTS) { Mat3MulMat3(totmat, mat, td->mtx); Mat3MulMat3(smat, td->smtx, totmat); - VecSubf(vec, td->iloc, t->center); + VecSubf(vec, td->iloc, center); Mat3MulVecfl(smat, vec); - VecAddf(td->loc, vec, t->center); + VecAddf(td->loc, vec, center); VecSubf(vec,td->loc,td->iloc); protectedTransBits(td->protectflag, vec); @@ -2460,13 +2473,13 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { Mat3CpyMat4(pmtx, t->poseobj->obmat); Mat3Inv(imtx, pmtx); - VecSubf(vec, td->center, t->center); + VecSubf(vec, td->center, center); Mat3MulVecfl(pmtx, vec); // To Global space Mat3MulVecfl(mat, vec); // Applying rotation Mat3MulVecfl(imtx, vec); // To Local space - VecAddf(vec, vec, t->center); + VecAddf(vec, vec, center); /* vec now is the location where the object has to be */ VecSubf(vec, vec, td->center); // Translation needed from the initial location @@ -2495,9 +2508,9 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { } else { /* translation */ - VecSubf(vec, td->center, t->center); + VecSubf(vec, td->center, center); Mat3MulVecfl(mat, vec); - VecAddf(vec, vec, t->center); + VecAddf(vec, vec, center); /* vec now is the location where the object has to be */ VecSubf(vec, vec, td->center); Mat3MulVecfl(td->smtx, vec); @@ -2593,17 +2606,9 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { static void applyRotation(TransInfo *t, float angle, float axis[3]) { TransData *td = t->data; - float mat[3][3], center[3]; + float mat[3][3]; int i; - /* saving original center */ - if (t->around == V3D_LOCAL) { - VECCOPY(center, t->center); - } - else { - center[0] = center[1] = center[2] = 0.0f; - } - VecRotToMat3(axis, angle, mat); for(i = 0 ; i < t->total; i++, td++) { @@ -2614,18 +2619,6 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) if (td->flag & TD_SKIP) continue; - /* local constraint shouldn't alter center */ - if (t->around == V3D_LOCAL) { - if (t->flag & (T_OBJECT|T_POSE)) { - VECCOPY(t->center, td->center); - } - else { - if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { - VECCOPY(t->center, td->center); - } - } - } - if (t->con.applyRot) { t->con.applyRot(t, td, axis); VecRotToMat3(axis, angle * td->factor, mat); @@ -2636,11 +2629,6 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) ElementRotation(t, td, mat); } - - /* restoring original center */ - if (t->around == V3D_LOCAL) { - VECCOPY(t->center, center); - } } int Rotation(TransInfo *t, short mval[2]) @@ -2737,7 +2725,6 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a { TransData *td = t->data; float mat[3][3], smat[3][3], totmat[3][3]; - float center[3]; int i; VecRotToMat3(axis1, angles[0], smat); @@ -2752,20 +2739,6 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a if (td->flag & TD_SKIP) continue; - VECCOPY(center, t->center); - - if (t->around == V3D_LOCAL) { - /* local-mode shouldn't change center */ - if (t->flag & (T_OBJECT|T_POSE)) { - VECCOPY(t->center, td->center); - } - else { - if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { - VECCOPY(t->center, td->center); - } - } - } - if (t->flag & T_PROP_EDIT) { VecRotToMat3(axis1, td->factor * angles[0], smat); VecRotToMat3(axis2, td->factor * angles[1], totmat); @@ -2774,8 +2747,6 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a } ElementRotation(t, td, mat); - - VECCOPY(t->center, center); } } From fd1faa55425db3097e7bc6ae533dcca564a677cb Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 9 Jun 2008 18:41:16 +0000 Subject: [PATCH 222/430] Merge from Apricot Revisions 14897, 14913, 14914, 14915, 14929, 15009, 15046 --------------------------------------------------- Snappy stuff * Align rotation with snapping target: rotate the object, aligning it with the target (object mode only - temporarily) (New icon in the header when snap is turned on) * Snap to different mesh elements (face, edge, vertice): snapping target slide on faces and edge or use exact position of vertice. When using Align rotation with edge snapping, the normal is interpolated as you slide along. Snaps correctly to derived mesh (sculpt, modifiers, ...) and duplis. In object and edit mode. NOTE: The snapping code is now based on faces, so even if you're snapping to vertices or edges, it will not work on meshes without faces. This might change if needed. --- release/datafiles/blenderbuttons | Bin 69070 -> 69599 bytes source/blender/include/BIF_resources.h | 2 +- source/blender/include/transform.h | 5 + source/blender/makesdna/DNA_scene_types.h | 9 +- source/blender/src/blenderbuttons.c | 4338 +++++++++++---------- source/blender/src/header_view3d.c | 16 + source/blender/src/transform.c | 43 +- source/blender/src/transform_generics.c | 1 - source/blender/src/transform_snap.c | 516 ++- 9 files changed, 2633 insertions(+), 2297 deletions(-) diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons index ebd0ec82ebda124f306c90764fe75abfb055b279..a4834091692c0cc61b50ad4c1604350d12622b2e 100644 GIT binary patch literal 69599 zcmZ^~by!qg*f+X|mhMjJMv?AD8brE5X@-=BLApUwX_0Q}F6nNiyStmSpZELTbDe+A zzzpn}xi;)s>%P~oR=Apq90n>WDgXc&@8zX6000jB6#}3jfj@fUMlJt4a?y~J1jXX6-Sj5BERZ<(Z!hyMW1YFfev#l!0Wyzo2pjShz zHuJ@Me}C%Qyt46dL8O?DTO?4#L&TAYvo{I(HFX0>tM@PA9?6$Np;yC_Re(4 z+sW5}e-EhA1=0`!>SGkx|9RD+ffo3mxBd69062DI z@Gbt&1JeKdhO-o4<=SMq#q-a{pS8Ag%e=`QBRku+h^|NTwf;KyzpJaQ4GhSgcKWhX zP8J(oIEdN`3z-@&x<_ubw_WCeTOlcyBwjDr+wW1Xo37>h^_W4}>!Sj5=N{LG|KwFw zq5LWe3ipb_Ln7W|HS^eXDlyNBDJ0=9Dq(J|I1u>#Dx$mjdOc6#av+hawL#9Z{FYoDp{h+^BYZ3R2F5# zz;E6iV;yNepo2XFvs4Qzs#}5p&@nR7($M7eT$ZWosL~F-&bWWNHQu1;Cwldm)e0E) zsxaYCb8HD!FOIh0_G9?Di2K+S8Jf2vU-h8R|t+($mSa;^N|#;`g<@Ya#w2 z53P6}JJCd8DIF=hJ(9&0GjFf-=x;h1OI`@8Hx5aG|1P-t8Cs&IPxj5do;^UD&v<&J zuzP_SI>7z*?P^`fkrYEhJb1-=nwmjBf4)9ksITbu!kukN9|&TwVGKDVGwd6@nCa*Ylf=ki%eCQ_rraT|g<7YYmGBj{J?EnVH$4 zGdLy;@3`mZ9Fc&U4v+V5G4HcNs9?l0QQceh%#)Loo7UFW6hB*k=U0i$!^FCu z>iBrebQLKvB3IkvF8Mis`4e|D(nx>M?hD7UF>7+=*>f=B7Pvih5S$2ccY;9!@O(;+ z3n6jw@iZ&fCwy_|%Nm|$X0NRkA=Rj2fTneEfVjz7r+YS=rucnD47~;W$1pL$=sMXB zcr0NU_#p*_hPpRcGNzoO#Sq(WLKb-@ofgSKkN2rh9bn|>Hf-|quO-AIlIv) zR>NAlWX=%Va&4)zKF(`xgm=r*JIuk`xkip|Rb>V0O~c682j3wAwAiW4!SzQ*N0&Jz z$_-hQNF^C@dG5Pb!O2#MckHmbnaMIuI}1~(&QiZ2z1!luGRu@N;NDZ#C`x?C_xTTD zZEfvKZQIz`SjG9}rNy)jkEQoWe>|<2>$~Vgjpi;D6y5Pz%fb4cr<=VgwzXvS@3R*ae?b=;AiyqIVYxT6E4A9x#};8@vnX7o zx~2N{$1$FeQD`A#_3OX7yyPVl;zd$T8_Fs>9m^CU>kh$i2`^}Ef>%I|%vrvp@({Ut)AhQE=AGKt zu8iQ%XEzsb+#x6)m`=5!r|{xgk=jlhNA%{iEq+}zyEGzhO=z52y|W7{*O zDyH22cs|6t<*A|)!wK6%#-e=0>T~iU!`Zy>5LN|VqN1ah%wrkbxw1HMB6{Eg`V-dh zs0Q&o9fc{gXwmt*_|z#?$2P)LM!2nogW!*VPZY(!1-2P0hmu=kOO4X{9cf+B+{#2J|N4{d;1HLmPR$gY zJZjJ%T4a2+XxelRV}h<~1$R;r9gqKqe}R4;Z?fx=;NvXRbbcF;`q z@r9|z0s(-HW{0X2xO`t=nV%IsUtKlPhZ4r{GAN6zB}<0Kyz@fJT|T@!zyNzzWc!3w zkX~7cLeag{#UDGaynjfWrT%~G*hfCmf>m7BHO7Vh$Lx)8tMGi{Hn{GNCmUV2HAByY zP^8)Z2JJuqqeg9~w(NPkN_t_ejbQhHVw-|VZuesYn|T3uz+m2SjxhZ61>)j6 zu)qPZ8eBcr=h?$EseQsBwc(JaPW%xKt9kc}j!|fdVqEhP5e_2#8V4NUKW0^mH%o;^ z_2cv=6^gdKO-I=uXdP{p-ofFZ4GgPxCVzzU6J6DY_QXh> zfBycBYdcroGoB-Lw(NaEBPd9!S5{XP`kANbr1(^bWxV_ga*c(2Lsvq2`XcpX`E>O5 zpLPkmTc1j{13Pz^yOGf{!C7V&!bD$7gn{n&psf-OuIv#j<3AEx`u|xmW`IxiZsvc znN`c&Uj2P==zMUYNxfqRN7V1QfXl(3^7Nv!+%mz@caBH6!3?jXeP}3Rw_FOBApmR$ zDg}YyRB~|ONM_fcJ=~(CoJAS@SkSZZv10!Ej@NgYoua;{->O`{gCsL32;p0LdepC9 zbRZh+-0J_6V(j-`r_L#D_%~ZR1sXOPnK!+FfaflFrd}!$uW2C~nzf*hkL)ol;M{BV zdulQ{S#I@xdU{gr?d>Ie*Y{CdzfVT?QazedL~w7t$N1z!@y84%TZ_(){(X{Gql!5e z_43V2!H?EX0uLLM|Dh1Wn(#J-mS)RSZ*WLZU8$8Zlk7f!4=17G|7EDQ$%t#c>tS>;@0&g`@o57n zDJf6S&%f5E5Vf=jtK}AkBggp`NIkKy`AG0Y5iQH`IE&+IfBo}}jCeBEGfiMD#byFP zRvw)p-6V%ky0BSHC_}v#nAqB!4snmwG`$-Mq15SxJxlgu~jxA+{ z^O)bN+v@#3x6TrrEKVFlEQaD=s@ap(nDlS{?=+d+wkRaM=Xo$yV6YApO!{rPD23! ztJ63+)lB|3=5xm{>>_UK(gl%s?co)PgyT@LXQOXT`%e(vX7`HyrIMRiqnu1RGjnrg zN3Japbn$zhTTC~(9W2l6xqiI?8&RNP^Oq40cJ|ihu8CO=Sck1lVO7wx{Toq!V%D>? z4Wm%{KQ9Y=k*5b_L9bSXgQEKU;`Fi@#>RH$${4jO^>*#DhH@BvRnT zfv6uH!N=t<@7uSya}g10dU_FM`t99^|FAYzI|HYAamV%G=@JHl0G%SuL7p9m0Qbj< z{kxs*ZArrlYp#w&7W%|NL8hcDj?k{M<@QhX;wk6>AhF;Rj6uPYYk%IBaB4Sf3bIWO zlbbpq?@aaX6{o|OcpWd!Mkqyxo72*=XnIypwD0Z~4I>%iH9>|UYrJ5+JNg)x_>tdO z4Fh*IwuD}x`sT!fNPMasC@4U-sRb&s-+QdEU4qTZ*yjwfH}=KX;BO~mHw+cy{#c!w zr9n;+!{bXr8&qI?{BbDF=pe$ReinLCymL}a<5X}mXNFMYNht2&aXSk(Z=|fDA;k%s zTB*%*DcpFSKb9zgQlXfhSj1c=ADo@f{aIL9kGu}5Ek`!}79Td&a->4p-&Nitmv0;E z4iXSl0)@m;PL3yS)-*Jo-X1<{^)J4*jcW_hWNf}Z?B<*O@l*_SbN~RJB|a%>>taUR zm>m(8z^EES&hNO|CKe1axf(rr`J#AW6oU5wu51>1*)@SezE~u2X)pC+sr7i6xHWI& zqETjju+lEZVbCxxuVZ6tiw0cU91E3~w=T}Q@`}71@vZz<=g{$P6D|{QR4W;uwH(u5 znS~S8=uvPOwxG0$1G$|5mMWIrQWJqN<(Qy*+l;p%2xUc!G;QJrENH;f=puI%jcIt?55I`pzGmRf%Hlh5IU-0zWMnft zXX#IWPz6DPE>C#Jgoo$M%J{Viw@@dCyiHU{Vc`_ zXLG>VsFnVw>Z@DGg*d-$_p+;6diB)0UEfK~%muVu*)jM)Wx1jZXPj~iy4n$tRhU@Z zN^2GptI3=MDGi?q4GGZ-2@XzTO&YvNN=m}yL;b*@x(3*Zcx_5M9R95mlc&Qqh8x6@ z>~N}4DbecZ+#x7wTWaXc`LcXJ3|xrs=fhut3&nL7IC63S$u-G{{^ZQ1T2dV>k4MbA z_U{+KnsGYce6Oj+8-(Hw5qGN<_<8x)JoYK)`^+VYy24&=tVqO6$(+vpuhz~cfubWLhWA~*1<{)8~-p-YLw7i8*-{gePg4e?Qbmkd~Q$k zy&>;>jt^1)6Qe9FEvL%#>v{DG`v#8`JYymwX=P_oatHsG-z@9xuKa6-d}dn!{<1x~ zoRGE0Dr(e!@FJ4|km?+Kl6#YX;)`ECJnJ|&VSR;Y5*AK0yF-BvM#aZB*3w+B8McHj z7emMH;9`bTNkP#8dt*@`or*nAQKGY-6PtsRf zO}xe@B&^fdBiCJ?(@pnO4&dg(LZ`@L>wMnu#ok{FHdbAdG)C@OF}gb_99paE(}VNR ze>j4TwJQo;lr`yFw;wb^mWxoNyh$No*IXCVh0yt*LiM!^P0NsA&1bv(R<%Jk+jx#$ASkTWY_8aphmdwhyH)1$Fm!_4L^kc)ggI-|06+yI%GZM zf0avz1`Oc;N|TNooB^`c!1hSm&Uydz_I7ylogn23C_RFoC$HUKdmqcOOg91Fk+Ub= z^X`9^4SrAe&EMLtM`N46w_oRn3qCx~r;RPOHQfDJJ3tkOh@)iJ<>rl9!*@iti_TUU zpZKBpbKlaagu^w0l% zp|aeU-f0%tjl%)>p1raYdFS{4&Y*P6*V-N#af1Y@VR(30mNim2m5b)NBLJS`BdBa# ze!lzm?VBKiu^bXj&?O3njJl^lSy@@_@!0A#ZeU&SdJ#p5B1)&r?^aKe$pNXh9Q?tn zhx1JRcjj~usXNr97|g7@mMMMb&!0Z^=%%FCKDt{s{sSp5`;GmQRYBuP)8Ic!AN!@Z zf0L{RGO%Anys!HUR5I=@`9@10Dpw}TFWr|t0?u%6-+EQWP0iWdfr{e;s5mZs3hi7# zhh5{NXg8*B(FSo5vMMPuZwcz%&nucNbOV*V`*qgzLA%U(KkKAXQE2c1tunnCtG-G^ zG{XK@G}(!`mSpt6YTFIeHS>ECGpJd(HbLxE+r*^sgEbU3yk*93jc@>%GrUkiLR|a5 z`#b2Mm-=^jvI3xE;3#X`g}m#S1aI@AQ_&m?on+npsd0<;1r4a*fA_+;n(zYITn7gl zS@6N`2Zzi;^44ejo_3KaSaRD&u}&Sbv9t4AkmZv%FM*6o~1*zdES$ zy!b3=IZD26L5cS1t!{H^N~_1&dSg*hQMr~CRpd@Z8=jlT)Q{TXTvMENqHmN$A(vPi z7w=JWi%QIUPLO30N7*xzKB zKi0vYxF=4A8WQ}CfeSI!J0YWcQzNyd!7SgJ~yU;}wRnsAJNVJ!8Dz5E#4V21onI zpz@M$_NH*o_FIXf zZShtM4u>1X>ZV)oL7l)Q5mYLO*mPhY3REVt{O(_Y7Kc;vATcdq&y#x1P_cc35~ z1wStT-&Ii8Mtctj?u`&8u$b=XP+IGiK#rvh%{UjMY#e@TrtDv8{N)H@*5&j^n-%12QP!92V zegJ@E!0#+_ynW5=yeeH1?dVg1GH=M#$vQSV5$g3S_#=^X7-M%I+Q#dN9@Vc0jdJ0$ z;sakBV@cM*s`R5=X3G6&@wd`+MA$yt^8C(hptOL94e-lR`o5u}S+_9wWz zXql+RH3!u5p8N0!_B}VAQ{fih9YXc_GI-!h=l;gfR=Q`j9@Q@-fbwtL06u^pr|>k9 zZY30v9EGYVov*BprGK{4>Rq31O3Z~G2*Q-L-HF`j^C9(ArF>z^Sj$9(JfH7Mv$JPx z-}d+SPvGI!fEJ*G`wPEH2a9FSLnUI0)tRhK)&K#HFhtl?K&%oYB)DR$ zj1kD=ru>42gHHqF1K5%VERbB;qJTK~Y&;r^5_;7(Yn$;Ji)@R}p9k%`pV0`}toZAE z+ihlwJt9rVZKA=}n79zK_gxp&;Gg+&aQyqne2JRIlc&z%!Ni4y@d5!+Tl3!GZyJ_& zOnFWqiR(@ma5)7@*6Q$gZl{TfiGRu!IFUW)pzI-pTM~QVb4X;6iHBUl$pK5WUbnKu zLZhlO_{twp-YlH$a-jdO_a-9S2EHz^Bvqnn$X9^M;}9~X~lq;R9ekl8UkJoAN%>!2!T zs- z(9w~)b#v7E>!j$ikwDF)q#hXwskb0Me=y^gg9^y>Ie)JX>V%)Qw6qH76_YEWtyfyK zhMl3|2F1)EHdMFAIT zKcaTGx^2G4vy?BP!x((KO@StLg|e?NqBNU9nk*Q(iOGT+ow$;e)nQl203pO<8dvf? zlA02VXR^k9G~Vkc5bZGM*`mZwPkD&LkiAGvG=A48fAws1>47D%VNG(@y{CJ}c+u{r)9G zulDPo@70&qXmR4c?R$B=_4$Q4G|TK$lxucE;4?`nJoeK~q;J`?_kHq*-#S(A|cDYFy*RMRB=C zq(XxwNkdyIpW>CWh<~*QytVZapM0f=u)hMc&b50qrO+3)7)p`-Z@2m;_$UYrF&i;& z(9P{~aj?yNKNuRaW1*ubf*nGz$wfk z#pcdVE+{QCadP%GpS0O}Jsj010K#NsWDmNLQRD}*bdv6GXae>XTkulYYy#Acf5@w6MuV>c&sUC?cx&XO1@l8BQbxtGoX^dp^Hjbd?VWo!P9M>l@? zU?f^BCN6(nk&}NLumiU#h zz8~o2)J^U~QZKzk^!4<9kPs4nt|8L3Lu6S9+~2p+H8EKY1i@ZR%|n}DM)?@X*9%6| z_+l|Bg;N15Z2$kSF8wxE_#99`oa+0qW6uyG;u zuPrvDHs>J<10AkKlqhyBw6&JhX-mGhd$+y|mIDE;BfMX<9Tq*ZMHMb3B_(s4EGhAs&UB%Yl-kx=6V`I zQd{Wtk)fE$YW59=pt5f>@qhM`e4d8wx{$6>DErhQ>CbF{5L>dTL%0hE_)$B~{_`Ae z82+-HXU#goHu=DaI>=`ll?uWI-{CCeV+^k&jdC}ra&L#G%s;$AVP@f$n1#AHMyvbUi%{qLns}UE3LB>Ec zn>Ajyu<9cbkc&cd0eM6)aaY`fAHLYt-#w6>7ne7mKu}bEb9x#V*|Sb~*ENVy#Hm-Yo}dw8SBOdThD>_ZxA4@k>zP! z#Y0eWCj20D^edlVTAv;XJ21R6Sz!(NQ!jd_;v0s#c-f85FYWO2f*;53pK5B}&1 z>+?<>9@@pZR-5{)vO|>&es7VYh$zT zfZRR=SJ)5Q7h;#=Qr#fC2~AaEcpWd#W!i;sxYABV-beH1O?=z!dL$hSi-MSWZxkgD z4^O?TprK;K@Uz$6V7^3P=xwI3)B01j&vSOBh?n0U9+mHrsBR}M1=OG z0@bW;P-(Y)aF2ci)_biY0u1@WwOt1|fp{#x7S61@dbKTKrVV*qn51_sM)X74miUYe zc<{$%nga|!w}J_Xflj~+;I|LGsM%`5u36+8=xB+`ZO>a+rHORh(Qmk5@6!h!fr}`3 zL?Do&O*gq;N-Q$oB5m|7paHb&mOm|Ht|)SiIXM1e?S}6V1=5Z-`;>r}+D9?l1knI` z&MCkL)g*lD;&-y&DJYrz3&O?+S#lXSf`TZ306Leb9wE<>hM2F^`yyO|YTm&052Pu+gbRTV!&7LLE5T z(9pwgss!fzpQQ^|+98WnaDxy}MZ}uS3(4qNWYo9lQhi4e(6Yb!pB?RxD_h-TE8760 z*);xNI|QZ%g^kS#YQ-8=hu-xLOHEti-@T|{md{Y0*xAfwLQQq8zzBVo)4Q3>E7Sqe zA`A@q-Ndgk0x8PYv-->e7Y+L6S)ONqpB+|@Azj=(Mws`-_R=m+g6V>b-HH&dCW0DPHjA*Z&+gwUbH%Z(Ew@>lT4@e3gm@i<5H2v^fK9?>0%HJ; zJk3v^@|Fboyl0iJ`&z~P1YLJ4Gm*5!?rffu3L1ZYEda#PLokn*ZY<>G9eHCpeU93p z>=iFxat}lXM@Rrp{n8v}fCF-Bv+eE8M(K?Uizhs@;~jiOjoYDxi~+M5x@yt7T?Y)D z;!YyA?kUPnM-WfxU}#)pY7MhN`VME$S=AohWC4V72B&P44;#QwHua$G$)Xycwox+# zJGxGUy?Qc9h5k-s&4{>YG*lo%qLu&>-tW zIkx}Xx^t$wwxUq52M(ty#59^5zZNN3KJ1rD&o!p?KN>47wjXUTv?(X8Q`Nxy;M}*q z|7Ig5?epTzGk=^VWkS8WLx+1GdUj%+Vw;|T62k``Kw3_&-dcjXH61EyFrHt#BiLq+bA+9cDgNo8j9|-brQO>Qh%Y!eI$b&e zvUuhzC(i8-M{DyEzlGy5_Ua<8@FJWHYIJ~0@vnk{zBkqLmV3+B+Yj8?*_-*IzxC^* zFP4pOeqE(YblA;WH~4P#^st1YPTgPC>|Y}Neta+{JT~%O8QowU%zSmdmH!qZ>X!%? zq}H0bH7Jlhn7#9;FjNyF&p4S1hAE*76rhGgzM`IKENAfQbnNSUMNRih%1>`e7?Tu) zz!l^7?(XixLLfH}&y@)X1rxyPAj{wabQCx70WPoM-7O%QueEZIm`3i6!()Gz$#I1J zSFX!r?!u9q#dJuvOF(EH?(2!>yXW6N(IzUQZce4 z+b8Gd#uMC_R-)XnC6EEvF)>1w5L94vcY4<7nI$Ur@D~XDA&r1?D?u&2LBFPrxxbTe z!sae12?xq?E}pG-LiCyb$tdD|+?2yrIqecxsMY+#%eM)~Nb)~_{(PpCvRDEY`%_O? zXc%l`*xt2u*6?Y`aRa(Q*+3OQ=J4p-@dL=~Wx01abMKCB=O(_P{ol0l|BuRF5he>F zjQ>&jN495Y9b!)WSNtjYtmL7dJLRTlEM0=)~A){g`o?&xuK!+VVnJKf_H*M_;-~k`5o5Nvu>O~k397%(Bj@~Zn4Nx*ei0wp=c_p?T3#B$QaxI# zai}mq=D9I#TMQMi9ZI=TYfO_K4^r&+geBaSd+3%EK7xqXO`@W)?$>?Qx{b6kF?j0U z%nN!G;(jr|9rn!~V_6RmtS~yCMYaK`lT&;bMV5Mw8cMkI*RNmUTwk3@V6UJVHa&D2 zucN7&!F6+Gr@tb_p>nI=S9`PgY;fN6m1kOCBlHceSLaXyR!$Hk3zIzXol@fJx&Hk-JvB3y~c0Umi3?8r8`1#5O zi{wBzt}+2x*KZz=^))p$S>kMPJ8Mzk_zL_n7gv|(=U$HcnpmmYl?R2iLS+-5%gdxSil+PK=G-Mfpl%r^{j;1Nyn&3G z5mcHqzAI_1!ewQ(x4(P?V`$Lx>M>EWXHb1xY;s)ddXu4YQ?A6&yo%EI{Pb|P(N95K zeX~peM!zaNy}Zo8s8E6BXu80oDjvj2;?Xnn^>bKX@3r25da;n#-7I5DodQ;vw@Zl*p8`KX{zaMz4uicNU{j_9+>5_LI0A5kfJydQ+_Q2MhD? zC5^GMsL~sCqArMD0xH@TR!#-_AXrf(@Y5;qr?Q>Fir5HuG+!>MJh-_z-6xAeE}#8@o@@C_VVYpiGyK`t zsOfnWHg)WzUMCihUzoa!gqyycRkqw@H{6~+WAQ`r8Rz)jJQWmB>*y_Oy_9{lHp=9Y zZofloCHo|Xeq4OCzvCp^3Kd=cs&%JTZt(r7SFs{QDecXYV!_n<29}r!7!WB-6Z7{Y zhNT@D-drCoq*S`>j4E|B@*q3AxLB*J>L}=$N#H@#vMWyYBGgXxsGW$~Ge2v^NSpa^|n4j9Q@LJMMya z3Qhg>3iWUeY?cjHq}Umu72;$jsnB8N*O z1cnDIn8)3aEHwvrIZdM&tm-jidR%)%M~13 z&)C%@o4vBSe0u#YySxo|D``t@dg-gW-0Ip|!0M{baJpZB!^*$a%UXg$z+eQR6h zSFXlnm9UWtgTZ_x!(ucB!5s1p6B84PlA_{JrjWY>kv7_Iu6M3qx}kv6vv{+N&}>28 z#7?F+$Fh$48vahKfWRb}D&n9ZBS6fR4+3pJC+?GGC|usVA!h9u>{6edjF1gPXnXX> zleUHZDv@_QaLJsixnQuWe~{(Zt5+h(a7+em!paA~Zg(&#`N#Y8EQNb;6F+K+7Zu7} z_N!Bh`PI_c4t{tcM!DEVEDP{8-LrYl<)+${3kh}68aqAun8n+)yM#EFhS8p~-6tmM z_I2tG)KvL&`XMR?>8tp)j9IIX&8mU72%VZ9l=of6@y5Bmr>z8-zWy0XUoHvuTtp~e zc0Tx7r?qc%b$5TKAJXo4$e_Pn3#C$^^4g_IL7yND^6vue2rQjgkX|0gITvXbH-P&g z`lDrOy{`6yL9eHCZjJ~{KQ?$?Fq9iMhotdAC;tPB-rn9q>8ju?zxTaax;Yz6Vy(v{ z<2^JlsRD%&qTzIb1UhPq)-L63pY7v)D{XiHg2 z8yagzh=Ioq#RUw3OPC5&d=egy=Gwf{dPtNDJ??o)Hj(g|^hM3U;(Duk#Kj4Jl^>J5 zuhZhK1ZOrEE-g9|{5wiP7+zowLuwHI6%xhtV3XDq;b9(f7N>-X3ANYFarC%KE^bY99>HV>UX}G8KcjOKRK6MpZ|=2mOSs|IIDwxq=ouVe9!I>lnz$ zxr5?Nz@9@foF?R1lf#BKTdG^V1@my_1Hr&BO?~uJuh4mwukTf zji%4QDenTLvdYLPedvVhi5NECI6U?CS?0B>Fe>>9W=6a=e2ZY`ew4fLc$8UhD{*(` z)VdthjrWztLmg==9p&^%DjoMF5E&~u)cx4`B5O=^>gXzk$m}Y_jYv*b?#AF|PcSxx zuq|T5T-Fp!u*ZsksphnKrbj0bx!5_TvYB2HnJlv`abS}3Q)6Lb_Ews9>x7uzZtt=o z2Z)2+1aRG-el=Ha*c||myvc1j>RMP1N@|;S zPZ;Cpgi~o7vInP()L1N{^iE)$|P_;gww+@6&o(oPh?W-5O z4Vc*L_(?9@Dd4(S{->b6%P^?S^jZ=O&*#03v6y-Y< zkdzaYXjhEFVT;+FuJX!39s}&G6;N@4g8q~lwd!%8yb5<=z%{`Sryf73@_qOc6cl9A z`zL(X3UKR1Y4}hX(Wb;uZGY={d%9LRk()pzJ+vUZU>20s?k`5!y-M}|ePP*$pTF}- z;UH8#ZFlt8DAeCPvb8;KL$y^iL|42$q82Ill77DSX@2sr_k5g{?cByy$ybEq zOS8}Mn&o{|a>q+a$uK7r#!(w8#b&|JAG+DxW%pA!>SNt9@?(Xiu z*t4XP68hlKP<&dN;*lFNSP1_>jgOVeV-->X`oQ--k7s?7sqX9}2-p}GNS0KcEg26I zsqVt|NzfhE3Oma2b}`+ILdJ4s`&W@xsMArPNNhr11N;eQ^ zT>daE6MHQA2JJ`$ADn1H+xl^uQrU26(tQ)9j>U+a|ChZ@H?x)B*+A)lub=tjykQ(HJwFFZT2poo#YmCcu`re7faJY$y5pAnj+y16z9MPzDJ5B92s z6nlvbDjYbj&Dr*kh(vz-eNHG~ABn18AUn{gc>C#u#=_wiJG9P0{C(#~$7z(9IHWcA z{Otv_iv{?sF=UuN;BfcwkmBL(eL%#n=Zd=xF-IS^{j}3O*#3Fs$27Qi01%gUbPUT= zO`pq5>Snp0m50Hvy&wQOwKfFhiAkp5oUfFHKR-VQ0HICieNZX$c(8A|9~Ht_^F8oB zsJd#UUGr!C{TtQ#!&$w^=pf7EEDoiZ=u5j`Af+%RRyzS^~Uu*tAv%@I-L5dyr z<1I?_jYN;j4fV-EYzNl<;;H(72lB%mp(|cadu0FWBSS+A`WTH%Cwf-AD;%d&C(v;inYn^(B3<#i-&Tks0kQd88 zS*xb0i7+(#M+xKuZ@IbSQ&Ny?^)P}Z1HhP5PD2ARpTnYfETsteu4$H)7S9Vxe-L1; z#70J5fEDyBRyOypK>GCn(rJ+rgFairz&`MZ)qx@z7N=ojH?o&1=Ks7Q#->v#z)KfY ziAH1=)d@>z{xShB*ae^7{#yX!YPcP}pey{FZ3x^;f@W%JY9yOmrF)k3&KeiY6o5OU z!JWc#;I`Zqux7-|wD5u@C$h$NR4WPm8x3NRseG_05J%h~L2$b~z8*K0&4^y30qSU% z88Gh7DW{dkitMst#IZiI^H{3B28b9fHK&U(?3n#Y9GX>rOAif=Zq2E4#Uq8}Qu@Ro z_iCKDKbssoL}a8-I!m;QpLK98*kgxp@gl&)(UVgLpe2_C7B8bv;)sut znr0(`bBubk0~;2`KW(kdR52}HW|@Z3%k^j41i(IT&Lnozo1U45(FmX3;b;4th8_;FNXn4;Z*%T__MC5U}a7=Z-3xe%n*<#^$3fGgPn7|mZjVB0yn zE>;Z&ut_M5oQ~Ex?FZ+AHa~6FbMHBMyZbRiW94DorZ2Ll|Ln79_rp_YB8bf#Sc?ba zjLny&Ro;C@jZkJ2)}n$YNfl|{htru|#)M%Tvo=mNHvJ~8rp%ySapA(F;?z%Sa~UiD z)gLA=EPC-~GjpJG^k`wv6~0+MV#TR9R9u5P3*xcFr0M zqPO3J$Thlb>1D3Mr3|W+pY$MC%oa=xFD|xtXJ>^sQz*pDl1=wK_ z)0_8P_*C|e)kF&!L-|~`kRGUHi>WZ}iwSig#X>k8zWCGvN^P9+G5%#67x zDT&M2;qQ0N_6o5e{{06T4qE-_bS?|=?adxs+E9O%^RT$KOPk=|iQ9fVI;#>Z3pM7^ z{)89*kcDvGK+RpNU}tA1EnS9X$4P%NG6WUPA#|m2L5F|smzQFPA-LzbDT!9o%7)|jt{#j>4*W0_j zN89s_G|Bwl{#?sF49?hl4_bmD^hoN?_|n$)&onirXS=hBCOI*(G zMEPSbZtjYCfFW%WV|6uhC)$O*yv&^kO?{~y5NJ{&u%KSZ2aU6eyroh-pJ#M$B%hz! zLdOfk!EkI`d@NuugVexnv7_E;eF+GJCz?I^wc|xm78b{LrwLJwuHBk!IQ)?|D=n=# zd-6+Q1&!>t;29GDdg4ktxTiiOnv1vB(kV|*rjtLiBkq#zDCkDNaQJG5My34x0-fMF zCl!YRqp1xCvcn>jC-LL^XuDAL&r)_YLlhCt6LY%@Gja$y{clGWs!vp!^qAsN_>Yp= z$8GyNVOmRSu*?S&)t)p#s$O&3H_}ilib7&cc;~?|1U((cZrj8uetR72_te67obtE- z-LVim4+ZY#)>el4m}IuPWPU+#NeeZwp|1WgR81dEy#E>_%P1I^&KSznw3bNu6*8rJ zbeCj9!iz=1>&#YQgH!ir)RBT*$rvW_0wrKk0uz-9HCyCs-F#(aWfk?G?(VC|jmU4J zf)j8nxc@7Mi%aw1mcHeKHvV-jGK2xEW|07%(aBb6>#aJlGUzx(wSD7c>`KFsmUe|n zSXuphMfC_Kl{plG57+>>5$P zwcSNyocH9(u^Ah#?l4;G-*p#U5t_YufiIZ9C{POu3e@xq5xSYa;H#j8dQ<4BM)h4< zGi#*%_o>@?VV$HJ2~w9|x>?&5L>Z{QDC&9iEJ{d=pS)3%m(b|NG&E+^+{Ll$hDI3u z_IxG6u#?$*vnr}a{IJ6$G6tn|uwFJiwXUge6_3HRR{WxzZLW(^l*KZzH6y`nkx^0zA3K=)+~tA~bdB0fY#>@dXtI1;dkn zsP7g}8}5+wQm2UZTdv8ore`@<%`(r^{P9_yOe73ajQz4DtH{JLuz)y$m+x?8Mo_?M zlgN?x3V%!lC-S8?&LaEc4^LX5{!YSxprG&G;}6a~ZpPiL|FY)g@3$)L+$()=Re+WF zm5z>JxG|X%a4~Rx{HJ!jGfi5oTkR)9FA1h+E~7RGK&rq!+n@~IyBMf_$HB;Gd8TFP z{d8#KW9iuAtt?eAGNvqVfD>Gb#BEv zbiCEwWe(d9G-Zpx0Db?5Y@w##N2iJSUlgU_caKsuSP0+fvOp3E>~DjBjp#Pxrnp7E zln&4EMv_*cEo$xQ>SeVdK>schOy0HpmHV@BDX7rmjDZ2#|3xe^EC@63CbstNT=B9_U@@-a)Bc9%E|DlDP3S#{f8?@ zhU;}7?VVo#cR736h<2=$u^`7{)KwwuUw!O#KC|J4 zDE%Sj&4aXlZg63sU;o3KaZ&V`Ne0R_t3eJg2%~aWJ z?}~x(=q7f^2iWyeC&9fLgUI5|{n<#A14eD$Ey^JoiPqhc!hv4zOf^-6d{(!1jn{dU zEM%%G8rBwN&}=sMXXkH83Y)0tqn@y^!j{QuZ15lYsCxq(ECI`3FOu~e)%5hjU!$VR z*>l^=;y{p)$ML^hJ;k&uaX!BI1YuGLOEs0fOt+Xb`Q@Midq;Jjmcz}jH+rp(#8VZv zc}yI^ilwzZ0~#7eQF^<@xW!?^;v~;h?zAz|u^?f){aOB$6++TBO2*G-%E|*IdFVLJ zA8^zY}n8!GBJj{GeRMZ?AP4N865bG^wm~fi}FGB8!1>ors7? z4KF}};bqbj(0o&2(1E&r_VU>cso@F@<4A?MvR=bSOeg>Z64bfuP+XqvMS?vADCn=R zy*P1@r7)fWyD0G3dBo*wu*~x&_h-f`t)h`u_}Bp&a{~wtKHsZ~@TJJ0d6;&(21}_& z^jWDiNnh0EVGjGX#d79w8pGK@FJf&F6VUaQZ{ECNR?0pUiDZ_6jP`8iM4E=_dUxffHFwku zbj;6)zZTc&Wyss(@sE}}i9Cy65t@5JM~FUQ3b{~K8?BGo={5UcvUlvTV*co&pAqdm z@=$vofM2OOK?^BkkWpf57nOYqfQ;Lkzpw?0Y9Y`?M0TDY&caCt@wo!kR+fy*AWf{1 zB&6hCG%1XbuWdHS#|%cAhpnF)H9qr^;zpQj;|E{Omk{AkXrqOHzULn_=w25QAl*Ew&(id=mYR^90Y5f2=w8DqWJ1++#@w6B9k7Tb_b~5>kH)kXmFi)d6jipyRbN+rGhYSywn#T zEw&=BxEM8?C|3QO@PRO!#lu|+!mVOl{hn_Q(C?dyzuVxqv)?V%Ym}xBhY9vs34ciP zkkV}vo}IU(lBPSaw{y?P;ap_kpq?Qio31i>dI(H;yWr%Ui2EVKfGrrW8xFnx zD6K|xI$;Ga9e9Gxt+C7?yB%?Ve}5WIiU=AYoY`~#b=CD|4tb!&&}nZ% zab=zb@zD)`uf#3T23s`;yn)TWLa)g#Ysw@aA00I#P&?cxxj(CR(yrG3`r`X%7_IvY zcfG6XrK%OKr~KJEj@!0fc%#*tH)V~wvoz%Nb@E09xYg=84NX(u5dYx1z_cJGoB%VU|4h-r3AN<+SVXSaqHCe+3c{`pLpc<(?S~OL{vJeD{_c1oY zMr@prhDH?>WSK}RL3(NtH_q?f zg%c*el59bPsVBiVnVydl(A!22U26x5Sw{n}>v!hES~X*d3`=`a2j>nBlb~1_Q;bN? z@#Yeh$bw}5!Mu_g-_(npOUIFag|zrVNG~vMPmu12zI=Lk8ST0zLW^pu*2rgHX<=NZ z^AQ@&JU3!U6lDKf$cBvqWxIS2f=o8mP^eby2aqrj>r?$JBU*}UJ@#save+4>#vIv1 ze5|s?sCfl7KVVp_=CnivZ0=iM(Dpn}?L4E#l143=$|s89SO|5PT5y*HDlLqJjkOaS zyZgYVW72*gK1JMf?jcf`kzv8&rxa}nAOnLN9~-~}-r3!K3)G2&=^&kE5hP2Ut{Stk z&Q@7}naV)Pb7w+|&+6>VD!I9u-rX2g-usuyFrrWJDNE+6a_84$=D{$I7A9l_ov7#B zM>dx>gdBm)-CVP{DOtD6VQ!if$h`7wp5I@zeV;407c_EGUS3}EckGXIkr)#aBU;3x z=XOW%mI|8NjVeis#PO)#IgKBb08ySlj+wEKx?-i9|I zP`h_|+fBHj6n3}O(WB54RjSm|U_TSkxuYs3W_ve_d^z8EamD`gW|dR@_3PSVyEciV z?-;)?Pp9qgj&^G2yPq;J9JbT}!Zl*@KC=;YVe}xt2Y4tju(5^pb#%y`uFpS!>d6J> zQ1GTNR~~7f+uE|<*4SBdat_M7i?b4ip0)J(>=T=g;E=&R;+m`MdzV{&IWZwscbS`i zCsj#nv3gGS)sS3nM1{8QyBgE`J|aY;9bzsAnvpvEs*bn7-;-wOc70&UV{OgR%N=W9 znAva)8Tm0O_=P1Da(XPiSZZuS=XE^^ZQpz|57}`+bVb#2GSzrroZlO--W^VBV*n2a zeL#q=Jrk@9HiFjTYh0q>eToZ%!VFWTWu+Rc?agwI4_&k099pvDD?PsmSKG z93hm7WVm)a8&y9yYy;5@A*FdaoEG^&D2z^yY}IIwwUcq1O-;>rOfS>75MtMJf=W5N z*T%_CPHt&d>+31vc8%84udS{(`UnE72_nmvKW%sRR@UixY2ZQtjw^jX4J_w(W$^PN zloyHIs4Y2X)dU0XwaN_D9e4>g_7@0ou$j_8oT#X%+o?@dRd%C<5%~krU%#HqnwTtU z?WfMwKS<)YFY!74E3XJbe?SAxc6f9IvW6ZF6IDZ0W>;{mK&jZ|4Hl_laI{~xq&W2M;G~D~37L&U2u) zjpqlT>A#5-$(XD;!f|(#!g%*^6m!akRZi7yX74jTT$O_mKESHRWRTnTMuvy7mtBU&7v}b2q{I4x0ZPAJ@2NZv)BN_N?WK1V6 zzS!RE=1Y9RncS~Jzl_1A_H-}|dnow0!{vC=aPEcE0-oz zlyZjthY!8^uGLzJ93EXY%6`k)8x%Nx6e?GnUHe1q#My`y(=YmuJg5p zlU;byd)A7+2Yr~U&BagXRtA__(E*x>j7uN^A))LuB0aS7gOXrKhj_FI2!_D~Uc|ru z3BH5`62^aCy8j2(e_sNxJ50Y~jB+FJt`Dm~9{zJ+;LO9oz<^rRWt$9e6N;@qHx%rV9bf=nR5XC# zCU_9K;n0^u#n@#P1L;-c8^xw0EtWMl7jA6iC zQ6hfeF%O=LgZVp;KWetziU0N&JMJSriu4<6fYs9Zy_LQj(2iLA{@T7}P-@T|3hbo| zDu3S5wBe4ZqJ3n2h=f`+@it`dc~dTrkK3OIX=VkZ{5V;|xvGzOct!*<>Z{OcY{SOp zOT-aiHcJA5HnpgLW*6E3h7iiwc{1QX`U^~ay*WTM^H9fbs!DM*=Orajy*w03`TSB< zb-rkLBS%(7<~&w59N!O26YcdWU%!St5_WN$ISsm0LP%w#gPrQ<@84N^CJctXtrZpA zwVr3Y?2rU~G_8ODnYp=nUS6Jrwl>*)%Ha;c7sa`_${7)?sR1Wj<9LA24*A>?ePR#X zNX~zB>Ky1SdkgLrJV!^T!PkOC+U4Ifr2pum-qQ2%5HYHJLnu7)o3sNhjj$R>z5}^n zlZ=8|Tg1H{0Ln#$R>W`5mp}i_lsEJS)YUY|zy!weJbfxVtSty9(Q+Aya(%D8gIap|R62JUtXBc{sNcU|Xeo!3Ryz;Z=soM% zoo!^MTgh3zUFe~KYqSC%%+Ei6x>tI?Bxl{Y?9M2H&=hIr?4P~8uhv&q&a=|L0kQ;$ zD$I~LP0GK5uo6koY_M&lUN!ATb-kNs!Bzq$i6ZXY zgoK0`5Qx9w@8tz?%qp8@{}gm|5_wozmGw0>8BRt`T!TTtQw;cR0@Cn?K<|A50=T?l z3Wqm}2nYz4UMBOkFXHBb`||?aOuiHq{%7>`CTBZdEmRwgr{;lDl7deo7-BDn_%lFevvaJp3etiI5?ISE zdYQsohVgN6+3&;Gdr`;Gx|QbU5Mc2#S ze2yy$Y`Rq#%JFR0X)!U}C*?iV(m=rufsC);c9RvWB-!fL2O2n5;KG`kAW)~i^1Y)F zM}EqJ1snmJAQU)HgQesq8~lrnitmGkF~7&~-RHR|*NfDMptbTFO#G%%r8Y3&%v-4< zIL=o4>_skrtJqzdd3~uOK7;XTyai#OizJ z#^msk8ixrqx64G(vLQV8N87au75T=g4pu!@R$Yk>i)1Lz+Nw!Sbj zFpPcrRKM49wdsa-UUxIgG&`byx0D*T^%21cW@J-EAe?~iqX9r%D#&H~(|{+HfggZB zVaEr!7cXFS24SuSh0p3^;9!})UF~uXZKHWA@hkyQypoh#xK^PbhD^$h_7~cLu#}A3 z4CC0N*~vye^RE%`%9J@i{pnqKU2fJJ^8ozskb=h!d%YYiGb11xx?5GAc!|>wT-OAY zlwtq=S>XUrEpRZ(bVtL%6b=CVG_tr1C>3d672NzIhdC7J71Z*EC2kxxa)<6>CwBhW zA4-}(tDMwoQ8sJJ)YVX?p z(f@+DV1`$h6sF!E#_m8ROL1PyR?jbDZicAjBB|Ly8ptb8VSA8)Mn)#DIm+%)#Tm)NL88!ga7|m^=GCIK&CFID zfFrhWG!zKIq-gQm?D#qW?_{pC?rB%94H)P;*D2etZqm>00gW6L7k@NdM-Pd*<4N$%4{#NOpx~#O?M~O?0d9C3? zfyUi>Hx>$%I>13hK1vQF!jk349`gKj*~(pKgGf|1Y_P^!;GjfyU}QmhZt*)kjD)?R zm-rvvh4|%*;XlJ0Czr{7*8+uxz@vIE!;HJuFNSONfkkRf5g|9cVgMP6FoJ^017Tp| z;&$1VHlsx=tcaw3`-TIBgoLz#{F!q2-EA|N=dYzphO3+P*Y9TO`1op6vb%%E2$K6P ztg3ZK#>VK`*l@sy08m;$1m z;j+;@AJcs&pwjy+(R&UV1ke-H(a`~21<1a^z{L$z$?e!2Eo|p(=^_O&ixs9yO1~}u zGGq++fO}Uwls*f1;*!f@l?Q>anXg?DZ(3qn3mJ_-rgR1P2nvw?^WCpsN)dQBlSOJw z7LfLqB&LGH#SFOwd?FzWZ9(c9cab9z(*baB6*(9f$Ky(_kD?OTbcU=B*E!t=CAKFE zyBnJ6RI+LJ^wQ*JP3`R1LPJBNQc@zohh*HJ#OtH2ukp(pV5hc(hwDXmV4v2xG0l`? z)eblPpB5k@#@y0Uc)%J9l!&|wkF<|MvwLL&*p(pKstsHn60|j53SxklRVo2of&~V< z7WO@aZB?uAYPfyk8gSzHgMmgUUHBWw5Y#;D8&A!Ajh53dQ8_-;fW-CHV3Ac&zyP`xqzF0x!9leq5Ir;jR2Qz0!|0c%1M-;K6=sUBqr@Qv!9#S!{e1#$V_y|_ed$GIkjEPkBPQwt`%<}e%9Y{&rg0JhTpp!G+9JqsKD`nXH zFIOCPHnvW1i;O^q2MrDQ;|LHj_98`y80eydBxo0kA;1}bT=^+3E>2_LbbtnZOa)!Q zDkzIF-dCr*HaM#yND*{*6BF9MPAWm+0MMpHd{R=u?qnq+NMUux#5taR2(0UCu&M!?Z1LB*MGo*ow5u9 zlMfZ=Kzo&fCE?=22N1rkBCP$@+wmfuOf&@OK|4ARENbV6nyX zzI-DuFAvVOP#5z>oWvrmp)uiDgg-vE3=^@(8=`V>~$@k zQoaws7{kCGdYdz916r%V=io?_d&PZdD3+R%VBu_Tugm+}*4v8K%MUQG-uV;3d23~N z!KVw^2?qD_oBKxtOp16QvYxjL99Kz16A@$><9H5QhKL;6 zJK+z5Uxi&uw!s2>$uew=o1d)CAn!Ia2K(8~e96r_SppXR?^I0ZqK%c#m!HxKNXZ zbuDP3ma&Ba&J1k$&p?a_L}}>X#(Ta8hCR?wICnp^UsePC3Ofr+%&6-Dzhf^A0&VtY z42ZInp|8e~X-l_W>M*^BcOoYvum22yVbs8|vaU{GsMg-_66BMLHi7(?J;4fnU|REv zxLkMG74>eH;aq==B|@Uce}ibb>JxsNgHQDPVUSaCy9u2_7ibFTXzGe6GDV(4W0KG29G_PZ2DM9H=Is**%M&vjy$QpKh5;esdf| zqu6%u^s;oCIJo2C7NB+VsLje+5d>E!{;`->!=PiMStUjWvSi^3yw`<@tFLc2s@9W---1n<+jeKfW9;1>4=;E!uRc70B; z(H~IJf@^AhidEd2h`z}vmaT2v;pmy$16e3;)!)$`P?3>^ApaK)S+GZA z7)1FWNTLQHlm82nAYlK+P1@4%H6gona@anKaXRLIe{AXr!H-n9LC#<6<7cz7&Ym&r z?{3OV50fr0{{xon9{TuXPwe@c4>syM6s|ta03@w0#Y`VP)&Z7w%e<6Ml7Lv#*!i8_z2m{gUX8C&`n9 z75i+MXxxoH_3iWkhivwAt-V%mtI7QB`*{VhbNY`vO(uA%{lfn)=6v`BsHPe|ZunXB zCqL#grrKL?0MLLC$9oqS5bTKsxJsWh$`ZBLa&mIZm-;bd2fi>`3C*m#3X=rnzp4}B zq{V0t2JEk;Q@omYPt0qVPI#p-Mz>BXKn!y}$eW6KV)Mx*MK@E^UZ$))lmI)mGw;*u z@{=$eyU9v<(f2a~laB@iRj2K0PC*sgMj#<~0-935apfl~umL>;#62BjfE9E0Tn?;2 zpT9_x^~kn;Kvd`tMF1RkXIjX99G#N?QQYlN=KR+)s>5eOL}+{q*5}FfpS=3#_mru< z414Em-Y4_4ILq^X3Y9Z{i8|%_ub`%k@7uK*?yrWbc-#~>aSqvqGF?ee=k*$ta~IMu zZ}C@ID##wr=xZF-R3DsBl_-)^ey4E%)o`Tr9~sdI?Lt{84jRaag@s|}T&I5QDXMOf zyd9Ce%`Ai8`P{c9TdsT5Wnrfq&rx)A5oZ~%$b%5dOM~*nu36Algb+C2CTX1H zL^=?bt1bTz=2T*?>`g!Rtz&4ze`(Z&5}T6Ak5$THb&6LnzeJ`s-GYZLSk zFLe~JS4&jP2BP8#U8fzOox)wWH{6~VZaJy!8)9#5S=4Z2I5uSS+)sQELG8eAKgR}6 zcS=q&CTrS%_HA_Fe55@j~!+M`xaO7!!ITy(y6+dQckn64?lf7oh=A4*_hVJ!)RRIX?L zmA9&-ihKeI`<*>KwT9I;qtmZ*UbqjTqe_&)2gVJ>xCaMM9jc*W((#2kNt&fZ_t$|m zY(@WS_Wi4eGtpmaefQ=0SrV`-l#`pC{mS(!xq(&>s%=AFxQrUx(SG~)ret?9v^Ldj zJ>0E3!A9lD^XFe2trhFo6J;fQ?H`jaW;pd5DYTC@OOI zcwd?qJFN^5h(kzxxLYn3?91&mILSnwITWdY=!J@SO0Wb^#L|9i>1; zvtg*j%W}WZHV!V2t68jV)IE9knGt&q|L{5OCL)&YTfLW$ zjt0yNpWhC@?k-CaF<_Lx1)V7xXd+g=s3vWr0<=%%u(Xhf$x1G0-SukjB611d$OO&+`y#AQ55H-lw`Ke9VpT(&z^^a7~Pzi$lwSOZJ?L>QBfCYYXfQX zS^gEZ8k5h=l$o*@Q%Gf}u+K__vLtp*!w(9ZrhvQW?Gxs5$)F=!=>}wODQZJR`0%?q~sCpVHK^ zCRsD16EksC17WRR&O~I3Ud3*{kG=hk*&)BFsW&0v8g#6z*ezKHR1_mpvpHjEy-T@9 zjU|C6L(Ujo^a1!tQlFp<7#+PV;lBb_2lqWm=ZUNgDcy{`9l(OKS z^SSm%S!{g(d$%+ zBWk47DE$Vl6WS^OI$!~!4>{&V>P1*;FVvUb)L)Q0d#x0nuQcjdb$>*IL{98famXkl zs?*ktR`2FCSmiI*g`S|OiNJpg{+k6V*@;^FG%e8YkPpk)7;zv>^XjH>M1_#k;0DOm z6hM3%^0_7qy!QK+`}9u#X1X*bgz<15q;YA-JI5Rc;Zjn(q%D~~>7{|1qQxOIrnmr@ zI?M_Xt(4p6MSba|Ah(kMR&;H*`jU%-^?7W`EirSp#trbn3b}d#$XmPI1eKecds8#| zaa6;X1Y=cW*34KNkWbl*Rywe`B-?v^?LJi>RlM{n2aJywpCF)8Mr&Y25V7`}{+O{W~qv}51Ujtq#c@h&5dF@Zx zmY&=IBU-0LB{?88`;+;D4NBz!WAQyRv%Uc}wdhVw3PYJWqNvVoA(y|E?bEf10lL+R zNk|}$keq_UY6E#F{4JM}f}NEmM`{3wulmIdEAcMR7(klwa9A-k6f|nWrPpiT6MFxr zlU&SD!oq@~`pcaV%0gQ6_M0~uQ}4blZm`SSk5c9HDh`ssr9(G7z5DvIM5X{sd^U=i}u4170A;{ z8+X-NgS{JG<7d3kN|;vW#3M6egqPr_-)M6d^!XEzJ5FZ)?)}0Dj@L5=d;eD@#*!A%g$IoOiaI3C9c@gmeA2ltbcMnf|2lp)=@XpcDv5sa2)$b zvtbbpP6}@Ok{}M~N(8kGm}m0=*HfrjTreDbba*(Dnv(%yMx}m6-Ot+qFtP%&@4z}$ zu?rcnT9?^|^#E-FoLIyvps`;MA$Tn0`RWOoltMygeey4ry>D=z+rEvRTDD!pymDY( z5dq?e~3$>0$S}dP)Z1sM(?wkNImC<0F;5BB|zMEhx4?oQMVg zLcL&rJF?Gdg-2+2jR5oz=K9dOY4N<-4f6SA;;C~@aFYfKLGuG_>p&2g*X-2{#Zd6l z&tKA%G)Dz(O&NVGqYCcVM1h!YvuEFJl~KBS6{U)*=m4UsQ?@B|(VOwH*r5R5uA985 z3*nul8Q}Jh@8Ng%3+*bqdh~wX6Xa|noQ{1g85U-w(9q8x9%3T0&~!yPKjwL>8q@7> z(>*dw- z+lr@vQf-^f-QE2LzzToAzpZ^g(c;~hQBk1|+Q6N;2R+w4U?efcplgp+&!prE4-?7x zH^RX>cdn&W882F~?=<%Cd_5kP zy^gqNtNwvHr!Iy`M2kY)wZA$E7|6jAyvEjhVx&2N zx>u8c;=hS6E`KX&$K^L+(!^yD0?@kWhKb34%B@mT7iYwBYZsR$)xQZjP-*?qnmPU4 zxcj^jru#;Yz+@YFgN=?_ht2Ue+y2`F*bh$$kAHJiB3y=_Lz+Zs0~W53PvzSZK*2cP z)KM*m#4b<-oVs^0-Hu*ver$cM1W3+BZxol~SIPZo07bcf@PW;#3&1h}p0NgqByd3*0a^wR^S28=si?si{tlq&@n2{{HyU5(P624GqU~ z2q6Rx@Gvu&djC7`RiUkJrk0t;FHF#+ys7 z`%Eq`K+-A%w_TE9=4_CN1X0scviY)pWjAu*qXblo7oHmoE+u&&MVJ&+GF0ej+ST&-|Y2Cp5(oMkj_DNfXEKChU0@HuQ8bwv*q3PJj*uS}EcI^=8 z+@-n@-XI7jKp$NHUEt=h-?Dxm#U%4dQ1n?i>;!qA!5tc)+wIFRp zhq7^`L}Rjby*n_C6FhwQdVLR^PWa=keRH64!nvpUO#gTzJ$t_^Hrw;(uWP(69BTvm z$1hz!h|Uw`w!N!lYb83hkZPlNfnU7^>k{6h7385>OwwCF(799Srlh$>5A18{-n!{A zQj+1{o@*ipu*m!Q*5F~Hf77LD;n+4SMBL*WnKD2S0B`p{YfyW0Z0=_6EdB*#(<+t-p#G9w%c^8w-N}$$f;jmDb!r% z(h0ybu-2qyqBbVq+9LPn$dnO4p(tfyj$3k|h2AN?SE*pEDT*j}D=ShT~b{W5Qe(qYWRH>6s4la;;Nh#3{N>}FH& zUoi=^z{N@M+fcnWayl2LJz?}?&$6K0MmkRQY)k1Fl>687*b4>BzR7r zLw}h#S_!@}T5xpyuId@SQC&VXzmh1@U^&~5PCk8U@u-Ux%qBBgotK&D-nwyrN8A?j zPm|cOLXiuWA;hBhPU68WuRYfT>b)>LK9yj{t=BfIGCnA`onC_UkKdF8u~q2`GW9#w zu`pLu#JKe)UH{B9JNu(gRMvQF&h58F`XhZ@(Wr>f^oGK(-ibN1uYik9?7?uZ%Cb4} zv>o5NSF4hFtEScu4pvrhkXquvt~cP!$%E=YX*}nS?TmaPL7`*~B&wv5kiAx2p>3R1HF9&0FC`~`urzv^J_)OVl*r&h4zY&2=s6)PW{W~~$ zpaL9nvBB_^_GJbnF#_#t=q5RBq*qf4HQ`$+?zGLSv{o(5~HnA_pHbXCvWB*Ei+1 zkMq6radtDfx?XVzmSPnP%;-E;auO{YTPO^bPe~HGHhAr;E=|motw%^njr>q{lgID( z3IF9vZ>2=(t|mshJ<&y@iwj)e0BlGVMMb$I5=d3L#r0WPGIcyizkkeTa+c0Z<`Q>n zc>ik>5C{pbgV%Fs6y*6ZI+QOAFMq73Y56`6-MM=$PiZ+y9wqXk-Q<`ok zsAUL~l*O-2$l~qv*7Q=>h|Tt&txs!@JP#Y>KA&?KG+{t>j;o==&mB%S->kQ7;>9XG zT_i*rP3!1aW5G=Gf=bS>j|R3nVQhviGnRm1G(N`$>3FPN>wk+q@yawGhK!;aACXvz zxnU&XHlP>HVI{Yt*i<9&kzi~2Ao7QEL3&qRoTWZZ`q#Y~JIL zahU{6*DOii(gu`4F2~!GPJ^I_wQB*&h<8#_KcvBfT?)4RLvZvC^F3p5lCdKT3H9Jo zjtRZfr1+yRlI!iIIrUSzaXibgWb6SAw~+6*SEoirPTp(K;zfRRsb3;}+j1S$czQ^oMXs z$G?g>Cs|yMSZC>-m5*rZ7c;=x)F^S(-vvey{Ag1!Th93%6h&A%o){G+vD>iq%%gBl zys5=0*4*~&B)GPcQop!jp>`ihCC)^wlZxdl$@+}BUF1+1J7$IV7laucP!Qakyc zbT9%8$xfJ8YB>&j_X9~_+_@VZY5wMX-+58<*?qMG2Hs2bd-0a*vk6obN=r=GvYq2F*k|Lj*683==WO-~q{ zo8B9f@Zv(W_wQ%i`FWzaUmP#*+AW2wsAZPZB2#8CQ@@ILC+2>m?9t5KleAjL0k^%E zF>#SSb(D$;%{UQTJ+s{aomPW>JV3TRmpJp;jq1vvK(d!X+-q2pRQzKSiGJ_*MIvym zc;~&jM?0yWDm5nK&z%2G&(kT65H5aR5|#5Ob|P)UkyLn6Q~GLYToYxPBD!|oqVmT$ zS^A|CM8i6-EF2BUA;ZkroU_f*t-ixU$7Vn|j@o3izpeS`p#cK@!8x|WVJnhzd7$c* zY5FZbMr-t(7{G&5Fa8@8)w1NbNq?#H&M`q+}!cBO|9x?8M>Kanr z8ztZQ&abrNw30sZvR{N^AxG@BzwaFDukThIFYb7|PIwn@VsZr5HGjMxMgB~5b@KTs zuM%H}%TR!l5O0^c?t61e9^=2n5gbk@2Cbc;HE9WU$VCIGOg5`hmzCUk%&A%Z|!69(OH8m=1j1@ZH&7&M3* zL;)ihNbcpr`|G~M66}!TL&^_xSZD_&Ok{0o$iBhk|NWUCzQl9t6?=qeNMrsvLe^+< z-mv5`>VGJ-{c&jp1P2Vm?f)m&Bp|r!$cGIeC+pe6P;u?@-2LeO*WVwX>LV)s2UP8` z7Pc3(Ms4`MH}D_?aE@W@*cusk#lNFhQzGcC3WyvhMM)>#MiLn<<2b8m(l`(aCn9It~fYrl`RAVy-LV04IU@)6XV038>LI(TYr4C0ApI~2jS$pND?8Q z%gl$^0WK8lNGI(#M3BsgpYh`!qO{u`#@9M;-i7z8Vb|+XKS<|J55BFBzUhZ&i#E8v zHf+?K&I?e5(<^`wb^RlVXEPOibEASz1?~$^G&-UqskCLG_@xM!Q~Y>Bb^a>v(?e_- zg%@Ru5PnJNu^v*O4Z*IV3z`|z*zIHZTSE%ax zF$AlpYw3&rk11#A!UufU`!{C*sUoiR^lnnhZV(4LFv{AL*w|x)-m`fUH{Pb@TEjOZ zx}JJ`JMFtR@$B;E=$V%*&Y)jd%Y(QqBYdwsz@$Q*!gVD5Q=P$n5hSzSZ6%7U#C z#L@#mo6>7e&yQx@&Q}i?DM1(ZXMJ0joC}eInt&VS-#7!g#-bzIX{PaZX)KWfAt_%B zpvVM{b$;^L|;K~M=uKU@%cfr?nS7)WjA1>HQ* zGMrtn8ic03;Zev7jN;0y84FVK=G=Y6+m(Ad|Me!WO16yT?yC@)expd<`@i%!B!$Gl zyDdK*gUuxJHozaf>f?Dx@U=$?n5Rd~9a@Ib_k9`vU5IiuNf!`jb zfx}VZ%^uj?#?gnX5=)uzz3roumedBC#!V=9I^+dYNst-!g z@aii@_x0BC-^Ju(&%Q}&JUPns_JM2F#WV|Nw-ur^^}_SEsGkSLclc1asfcPJj+^<8ZZa6l}cC$GAXn6->Qk z{|+33xa0g3&Tkc$nrd+H1Dj*JW%e}@ZuA{c_lyA1YEvmYgOK{8(Hg8`-JtKL8o~hq zLFsjMM0}KCc@O$OT%YL`iM?TZ>EjjO(+;#VH^-wdN_cnSrMIrSLPs>$#Bst@>TL#Ip&ek={d{+|f(p>z?2>23TG&IQ zPiKjSvF%%L_`tdEuQQzv`c@sKFz)3($6rm;q;+*EoY(2Jn?0&ySs$#Ze0sw~RF$Do zQgTAY1e_*ABM}EuBMJP+s}$GA29-jcG;L|am!Fy9jdT|EN^SC+)hPbn zV~7fyQa?#WVLTfwkQ480&Z_3W?D8%wE#>rg2FP3psvz|mgk1qOtB6}Eyl+mCta5Uu zJwj^9b_N$0JF1`JqP?;p8r1P*elPt)iP3i4VFo*02Y1`{AL#TA|9L+Fy&u=#yfgnA zTxMK|<+VI<63Bys+}b{U`vx*Chy+pOBvasIrxn8zT2YsD*CBqVfs?KtT4_#c@s0os ziLHT^Pja{#O2*%fRXLnC!6BClyrvd9$!XKt4|uru%tUpX+YLOYmqAWRuOmf_XQHGv zy}$k7#ze`J@b#md@mXA_+bBtJJG(gj=DzyQ+`18Pa~y^?zDK5I3ASEU=9FlUVcd=JNKJK6S?l z3;L;Rcg|}W6r;J8bm9)lxqPRuaX&~nnlL#ko>}@(A-uDn_I`?Ng^|;9*ZTf=hZ7Ra40~hK?;=jqF--1p zewKOXUetVGp@O_+qNz+STr9S^;1V(+#nZ>EP1%ZsToL%pm82g&sQj$YrzLkLgY6mT zegN68TLk3AION64?>`h?_lo8B-M&8XQ+}Y%kR~uFM6o&Hk!8{8Y_i2U=FI!w_Oxlp zj`2Ant+tjC1k1JdI(~kB^}m17&;3I-0;kibWZ}8Eykn7kp+rVbS75HLE98bt<>ab= z%`Q&+(oS4A70^Yr%_pMH#b;}0U!?cLX38ky!K3SB{qyF|!c)@1R- zTx9i}9Q)pdb{pWe%-@p?={pCd*<83UI}}3~$p>?^d@G*5yrzw6Xg`W$Xkb9o3g)Lq zuibz=BPuOD9(&3b-~AnwauyY@1cf8+9YByHCx^>xlBY znUt2FGdxhJpJ@t`9y@8{mTYWnwfOhJ6f!Kl!+P`PSXBdLl^?+*feu_q6^ou=_Ob!9 z6#yP{t@U-0pdFKvZfu{7B1s)j>% zItxsm7}q^;UR-niyEVx~CB>wqh^PIFCcV(Ce_25Gcez94+qYymxVZDXv9@FiIHmzt z1r|m*a}fz%xC*z2r8KTlqXk6~Lhf4=iM2!mgT(Zx0++5B9#{TR(A{41ls#U_P*G7~ z^`XeBEIv*Cy8Y~H6iDdERkH`X`d|`6p_r8E9~~Vn22XrvPmlKhG~#bY6+#bQ0X|q| z8_ZTxD{~?(3<@*|ChHS<(|j?en>gEh#0Ajsu!m2se5h_lG~QyGd7aHi-1|@MT^QDn zlu9_T^`yDOPU~&--xPNNeu|(UC3+=v-Ts?1XRpO>3D%3*e8xS^2(7<$A+3G6+?5!NZV^C_~#APDNj+8MyzulUD(G#7~T@F-2 z)6fXA-y(Tl0y3Mgf<~22gJ%yw$~R*65qioRCMNZX9G-{|V0H(T`KC-3h{oZTjaIwz zK?}Bh;!Q6^Nne9x9qr}i<=iT>Vh}$zEIB>Ja4epWo$T&>$vHhcnAk9WcAw||SY`ku zud&);;Zhc{f9vEjwX&wC)itA3US9t3m0JMK!SOBP^(CrjRQ!54M1)*5}_t)xHL){2p~jp?JAnV1U%-(=8bC;6-%D3oa88 zi}6HhsuHp(<-d7xqW)LPqPN#Am;ieFo>k`z!IW;ES5fuA z^7}tNSHx)y&u2rh=@khG*i_Uua#hvThN^i8_D8Vl+b>;<`j~@#P0;>v79OeX+G`2{ zPaoC=#Kg^=Y{bMHYPk?V^NOvX5Vy#4zNq)&6j~V>M}B;~^%%iPPE3c>X@yqeyxkr5 zB2>xMNm8#U@7%%L@|RfWe9gQMh9;EihR5mRRlkSaVDqi9`cAIx5{Klvc5ONLm+gg$ zwZJkdvv6eHT$ElI*k6c7s9Zw9$N2R2)aWtdv91m3wb zXVHI^GXC*=2+Ko7U52o`EVP~-$7;)cTG(hj)(?d`H3UiftiHi)5A4%Z;tA39CUcQ{ zL$*Xj6>3xg5S5K*f_|FnOC3n|BQa~(X@eB&?`GmkWUbMbhbd=A{HZK>J70r?E;nH? z>JdvWi>S?8TQCCtZttyW`^SJAFWtyv+ADf4?x!zKaKud$;p-5}0jl5}FF1ND2O z2sEW0!|;B<$pHgK%nkqzT8#pv%^d;Tj>#8zMlMoIGevr|X$Ux@0ot4j`Q%rTAlR$_ZXY<2a+UsB~z|G!pZeUS!J{c#! zvanc(kd?k~t2Wx!n-P9IhzghHyJ>Bx3Fj3Wx&=)hX6A>DWC8y7+!#;Pk-?Idm|wq$ zf0tAHvuQHkW^%-)Y136KXe{;9y%C2U%YkXGD^bJ!R2u0(xZ zJOQjLCOYS?6dN0I&ya8TO|5=XG@J*DJDb1lzA8kU$6cR;f2E=$^<2cTGj8scDK*kK zRsPjtP|&5s+rvGWdwWaDH9X`^Y@(*0H%OmJRHXPd$P^AMvu?BL zQVC6=^s*L`z)cpDXgob#*h`9){D$?jn1Y(9f+mV#LGy~0CWFPN#r5MX zI$W7+AEBZ3dvA(>-|L^L(7pLT>VCr2T$0xhic%{q`ln4kZP$6P$DkJ$tlp=l78;d5 z|JXh$O-8)9=61)oIMsT3{)fJ8$$2BQfr&oJpcu!(E^Vv(7R6gl=d31u5^0qR{cj`% zR7mC2sa@~A*a`Ov^NrSy(~=3_BjzAR^!R;3n}}0iF9e20e)h-OHDX*`<(HRU%bv8o zy?^!Xy*3rPhYCF5UumT`NU-8uhaURX_h&^TDZYGeV%-YXF;D;S$40b7oXLd;Dc&Jb zaf-RAEKe)q?@hHe?A<+7r#z5hQkz0ol7Sr?^7kuEq1>a&B7L0(^b*_tcWs6B7WbMz zPFXz2TbF0x3bNU7$fFTRES%FQ1@6E6|NS)q(SJTfK*lPsfxx-=3I06*#L55taHaH5 zGpa^lA7S^-{M9j(9^JL>O9a(3t!uC+BJbr87R)Eg^;OP-mo`^7aYK;0 zSg-19xr!A$=43#e^hJjzFSG&@xA z^;q8sRl!muV02^nOfGCC^0B-sA!O1)7YnV&?+}+)onuE3>9EO;8Qzpef~BLL>}_o_ zUrO@_++3s9{nQC8L}N4$wzI_C+a+nvY_1vj3DFoh^bvu+MC0Ila#r*0u_ygcPDIWi z+J$t#O%Q>=6YxHXD^JwP&4l3tz!fgPf%B=lk`fL8#O$jWUz3S!0Fv!iCP~PjznOM| zk5ns&+%zauv)V+~z&mjT2I2W&r#2*}6-twokvZLyUxczD^1`W<0srpZeeH3pF6K_n(xZfileqY}nLyoNYh~LO`Z1Ac?z4RTkQ&xI6-qMCkne)r-fnyYr*75ZIlTisW^?!mWh>&foPw&*2A(Jc z%YE0GA2h`-ZCVBXL!++h`Ne-vQ#G?G(WPo!-BKMDEwfH%es?%$?Uk|R6LoqulXZN> z_}$jAS$_x!+|R=*ClCREvh!0I5{|Malp)NzH^$Sk(d<+VJDv0 zMihkQRcEr=L*WD#?k!B~)Ob0niYu?+kTW>5r;k1G$Cns~`bn-Y7YjquF{O_){Wo2BjP(?y4rVnHUgP&y9CshzSa{CVvq{Ivo_uj?EQb}xvdCnpj z5tVPe9nV}j4yRZoriN_A?4Q>&{@;fU#-@=ZZ}lUT&Mn$F@%3|+#%eD*8sG_RiMOX|t%6c)n z7K7nM>f~yVWh{HDPj4-=SuoOXrn~WGE6v46z~ic+)Xplx&WJEV)ftae`(8_(LSH`nCjf-M&p1h@4X$E&RhnB|xn)vCSfY~l z7i*_9opy1gcW#eL@aW0@0h0**ANyps_a1@^)9?oCN`lYHsER!1-@KO5e)fQ-lz=E@ zq3k{ntBa4AH_V+;ue0rQL9e9*U?lpJKv=lw6lFh4*w}Q zo0v>lLvIO2>K~VXeB{63-a@y)p)RK7kJ;f~}us9rUo?qaK^^!%wwDCg72hNCedKr(RLciN3B_+35#2p5P217_g=f}&-A9`Duyz+EE zaGy?d-=3NTga`8)cnt&)AZTp3r@46J;%4Krp`&Ed-dte_~cv@XSUM7@2c z(f3h+?4NPO`g;UWt7BW*Z{@5`vEhjjVuR{<^S2nI^b1-Y=}U2$fYWUn4dJp?qpq1g z*Wlv0Jwh^qxYFc1DR7%hV1Inq{o46Dzl`s7ScKpWRLd~&|I*n_k?Oa9IYo^w)c=O* z^P!x5yzIwB?^FUqLkR#kq>wdulPVkWy+J)!GB8ZpBFuDw6oE3`XF2u#g)&-bs4F1pi%MRRq2pV0 zolZ6JxqlR|Olp&|a;U5FK`4+NhgivmMuPHTUAczVkQ=U`m}2g)--sDVNf*O<>oU$= zXjt(Emu#*+zeEQP1OiV*>0>dB%jQR*{cOG4HHBFGs_dvSikyB6{hH`x3F!9KXkN*-1j_VGX#Rp&{OVpxTpc*_IV-k^<*QJ@#9W3yKIuB@ix_SV{)Y}5#)=bBxvpI# zX=`q+ZkB0oBOyb0vq4~AtpD9*263?M-_F+wfz+}_IxMt7{++XBuS;DK@R>td8wkJ7 zg#AB#3GfbCfn=8v8{-vGz?+Gwho~E*eGj964;RR%ya2xOeLL>6YGak8&R@<^UXsXpD zt_dPy{@5Gd2dgIn5fl_OdNwJs%Xf7|@1jw8{d$ks6r7;SKi!<)+`LKgXS}N0W-{}# z#?uAg?I%>RMPnQLE@e#OiA?c=CT}H{KYDqQ;y5;M2H_QOhqndzP1e{cQj!<(2ff1e z8?9hD_t|tUqLg&`$Nz@;hzjcGAQdGi$9NCQGmDUbZEXPgz zet*$hWFa?33uOKMCdWD0)q)?o?7sV)faWvNK_1#ROi)l(5`B)~(yJ*W5Pp;_?8!a* z%P*-0UlzEu6*>d=uy!W32WFiPGlecfdw>IB zo7d2ZoWPftv29)e6v-#*AZx|}`~TGf1O;7yZqT3DzZ4abA;6e|kdYK2ykahrcWk9K z7D0C-4%{MM{tfe+YfBYmQ(A9|9Qw@X4N-TdP4b<$TSq_!q>#`>Uf4eZI0YoM4}>G` zxM-y2%O6+Z`8ndXmhdZDY3glK5+iA`YL5#?X3hMorLe&={JIia*D*npB%N0+LOD;3 ziri|9JxxdW65<|tp~G zW<;fV=Q8I^yV;1H4Xm*i4>wIED|_-ZeD3#J?2&;WMO_@`=b6c?rk{yP)LJLhir9X_TU%q?#^yw>(bMR`kmOY!lHC5hxU8(VDZKj+I7XJM%vMCA1 zw(&mX3%V~dvJCxyC_H<6NGMIOm)+;I5MD+i(A_kGqU%-S)KX-W0ft#*9=ym135pO+ zqBtxPa9faJ`RuupFefLyjw{YLqF~*(EPQ@ND>&uA$jx_akgs)-a~)-RMM>@Bw8X;d z)`8m;%lh=-URUdjXT;}2?=3!XOoJ_Nr1hdVS2~%&F$8tf$FDttZWR+zF?%o_zK~An zF>ks(R~PGfh%()1uYGi{@}E7k?Mtszt3-Ie2Q--jd#vT2myT_25g{O7b3YSJXvlhO zc*(IC^{`ML8y9U(J472nCXC}&gUz2=RNBiqz|p|m{ zl8_RYn%soZ75ex%VJou_E~8{v@S^Wa<`zpcs@6+%=pU$G#m2L$6MttkPYTNwG>}O? zss#ga90;A&@3G(<3xStsnuvkvQ8Y?WhpmJn?d-CL^+!CY=DFlfxC)9!iu{f)kqMtJ z0=@^0Bn;ggAk4QgRO})fB~5O+GE5ZCzWY>3sg;$p{Q7fkDaNVet2wy> zxIp;d{V!VPuOKKzWYz*>6;AO1r14ZcxfpF?nSCp-wisk4oT-$%?*o` z&3h(SNg$?noqq^to`!$HeAb5_bwHS6h|79;xbX~gvW-Ll+vYK7nT$_XGNP*a@7!8o zVPL4S2Ny{?lz5*2+dNaXoRR^Kc3L%_Nr!L!%rOJ0rxi<|=v`0n6Ub=Qb`Ll`+=HF~ z?B#P>8am$Y9Nf70l?O12EQntgCIK=K;^!!*2d=yrVoCM8*eSI93O>MB4}W%V1?#P(%iPx-t#O-3MfTv9rU1Bs=$HG^u$X7mGo$;T zw|^g0eyi#$UA$S&`?qGh_Jsd+gMegIVZ+MOKytKKa!V73EGu=}@sl%e4nHmRs|Xyc zGj9eP*#5B)Q^RsIM$6OHu6BC-)G={!&9hEvPrBp2=H)3t2;Ta5tekngsdTum$w=A~ z)=uxIS)oxTy-I$DZNUdEpB4?-xN!V->?`Cj5!m3Oz%lBkCqP z`r1szzTA^7MU_v;J2-jW(ouzSKFluDU5(8lCv)HXna*q*pdj=Re8Q`79X}MuW83&M zrj}ItP9MJK-m|x_1b0d>$eEE`VOpyke+9OHM*??8c*ym>5{gCOxN)MTB8s$)+DKW3 z%$6bwDy)7|Q&SIkS+HI#?NYv$4~SWAC0%?cJtDOqFW)=>SBCWpXgFBkselB)AKX^I zxic4gj(pYgzmv8~lfhm8hDmPqI@?vaRfT~3q^I@AYq@N0(hXD(0KVWrk!6QW!WWwP zJB#fUb#(5!_1I@R^HQZ#W4VB_A}kqy!sO;Rix(6^tuo94aZC$6=vf@jsQTn2iCyBJ zvbnA<`{~bYwFTBPQ4DWSC)>;*$-LE8*0<3hLQv6l|cJgOplz#jFx@-#W@rP1msTB}*^4I}(o4JMYaVGDW?cNt&l65&|2Ph0}C2JwB-*T4H_L zmrCB|rCmekbmIPYing?M6K_Lj_f4KPpwqzDZ8R*`T~g41;YFktdJr~HZY${7JsmKu z)C=6TdwPW}I<0z*NQv10!z_*8Qr`K${#nUKFPYtPsYHq?@m|qQ+mf)}6KfLOUH-lO zF3Y6l7}Y?^ap~JOebn?DmR7i>ctd`Oq9Qx;@}#lLL!(H~`y2d{$layEi(>BZy&U4l zO1a)iOD|TV!6oeMpf|#4cb>oMNe}t)Jg{~_Mx6iVs|R6(HtfhEB&Ea0LJ+OLsG3;6 zS+7^)c73?Ocs#F(k(n9u0|foIIoR2Oh(pH26bV8@GR26dBvHw50PLh<^#;nL-ebK| z$6TDt-yfT-_u45#$cIg}9{;UnPamN9UFJt2R)C)PK012js039IV`TSs^So=CMxHB< zT|j_jVhw$~mkx`y9N)=ImHYHv`)70(90s$8VfR0j%3Oj4gp;gfseT#b>wYuf+DvaF zxN3e|!Pg>-*pCh^*Qn7~e)jr{);MioNT-u&q0+=isbDLynb1wARa+{eZ`0Y$ino0* zucR`r5Hb}uKY#b?#huHzlrL^@LvY9w1hV<|=1Q^?@`PmnHV6nE*QY1vbd}oW746Yy zQAfRO|IQdD^HJ{MsnTx$4$Vi(d~!Cb_>hR7)n!_A**Q6iN=kv-PBT$TDMkJB~G zzyj+RbB%}@?AFtskdUqgcbP9LA|mikMiVT!`#QP%O=cLD-nr$t?xRGq4@pUCFRO(` zX`zR}SiHx^%}j-t4|*%+T0kUcKoE~T$oxgL9_}^(U{AhR^xg!6Jz72N)vTi~U`FpCL^h)vYyr z4}tyrZpgepK67K?)7SkaE`50On{d4&5VvMP>4eGKcqM!!XTFr1YTg=p1;{LWIX1Yt z3X)eFQ_CIH*eGH`4euV;sv@!F;h`SZbk#o!|M!i^$$CIjl`Z-^8C_Eio;W9Yn7Af8 z;c<_1f#17Hg3-tVVvje6XU5@eRmXkIauKB+q#WYn)QgLY$SWwT=Z1QooOgHIevI7e z@b~?l_PxewHo&ezF0svr>FDJ4DWmlP>1BfxBtrjBK=|R!T{%vA}6N9&>5Z`M9Btn(6cE(wd`Lj|E;_nYqj01! zEruHB1chTsXeRW16|aesnYkW>r2@~tB%Ohxk%1`9rMp))Qat?TXTRE2j7iM##eDwttbh*6+9IuVs`vnU>pm&RDX3g2{Tjj|?}qe(2_0j5j| zACT1Sx$rXRrZ#{3oQC;mr ze7SVpdHn)AM2tu^&Jm@zr!MuD5&3jmO@;Dw;w*|o+g;+E>GNa4$}m-g;B7u(;YTVP z|DEDsVLBQK)c<#q^Z%Li@crL85Bq-kz+Vkqs=)7tRxY?9nj$oBG#f?wL} zm0GKdCVA6KI$g>!tcLR&z#Rs__CpA#ybH_6Pv-zo=nTGtVc+xK1IRhbflRy%>$Rcm ztq?IF)m_#joT0oR$QC@#GA+3{Po|z1e&27DcK4erl!<*n68jP2jL`s96IU%i>s&JatF ztd;hwzLXBi+dhstt@hV8-oQ<^0J8FkEMyNH2JAkUcmn7pyu$Zh0qQk=bAGX+ zUW!cWxW5Evj-Nn8P5b5zK!@m*l->(Y{NJopKgHG62lC1>jcb1I8?Jr$!nF%eoRzh; zrXz(7tMqNL5ygY6eLYksi9Y7I)EzP& z1Qq4y8Vla)IAcSp@>EWa`D_j>S7D+#^10hDUDY!if#0di=$M-b9Hg*oQ*H#;AteMlU{hdU`qu7{#jq)J~7% zIA1c;`o|8eYb@Z-^?y>H;TTLlMVi6<&T!3m_7Pm;3UK_8!|ZI)?wiM({#ZWUxnlgJ za`WL*A~go~woCIV%f1i6a|bUn4!oN8KnOWP<9^xniJ+`(GH%j%9&AP`L5*uYoabCr zh&Oq#0UAHKHkp476*l}t0moBw_Y?8gfH4mk5e?xe1m90r0U?O9y@x~-{5?RaJnFgy zl}#;GJFG?$;9=ztHvd3(!#WLswlIQytHMbZ-Ui>`7m)P>oKKVcpS(WK#6Sx95Sijz z5Xit5^Y%hY0F45WEmdJMu6%j@<$FW@b?phxEzAb=p&!GgHDE1z{|$b&f)gw!Oetap z(zq=J>;94h`_Xg%is|7}qGLOw)JyILSdhS9C@Lx%bHS}e^L-a#-8HTExkNc6bStF`0?0qNJ6lop$#fm#TPFI&7**K_6)%)CbnPg zXL$bcg;G^smj>z^?mc}JcdDGaOY2l&jj)-QObG-yj}swYeRk{wp7OJ0`2?qQ#dY>IqE$JI;P zx$F46Br+&1{5kyH%efLyV zKPB{8m=|KG0`u`0dy{qO-Z35f5_4(_^S_~%^hg&p(JyELonL6hlV4b;j}bDmNQ?mn z%6ZWbTMnkXYc1pod!n##z6S*xx_;wO!=|N3<4KHPNS zQoMcp3N>{w;3<{v+$jP4u^I$1Fr!YLM_l1F3(|=ogZwX%8#+{$Wd@Ice+t=tot-M3 zRwARDZW^kyPLgJ22Ii$>Ffl*v65OFGQB_xO+ayc)6HB%tD0!822D4w-KJKvg{o8SE zVxyI}!THu}E7tGmlwp+CYaY{GnlL3%c6KZ$uAwW4A&5qSMFqseL@V_-EmircEt>*x zC10+PVM0&#wg;zCP~*3Rkm94ABwMQPAb^H^I~TG=lr&V0yTnsn=lG^g!=Ak=tiU|Q zjE7#vf1VceX*$C1gTxDF!k3etX{u;jH?A|kCwD_Hdo^yIj_@P0X}Rl%v1$Y_J6ZYZ z3jj%x46gnAc@(2h9twT;Y9l-Y@$1vFaJB)Ep(3d00;r>x*#u_}kD*q}Ugm?-`=SnR zWj+DHH;RzS9wvbsHz=U5>iDxza`)lAdjJU~LYRS!T0JZb_-i84j3i)~fBg8dJY)<& z6byVb6Ou0+$$+mK(%h)S+hQq)IK!?409Lz!vRs-D7;g4EFFJtK8?%*q)S4t~iAjm` zb}9K+=j(p4Oo9;jYt;oUrFL21%_&`Q`u;_*{`Y5>fy4Cga|45)s(VR5mI1M+g2 zi%iQ9nUp{eagxob!}nO;WP_)Y9HEwatFF=nS>$uHc&r1Yd&e^Py)t0ewmjAU;$eTH zO-7dIUW$2I>lkQbaJgQ_tj(oQHsr~4gD>9_)s-w9nZqQeAxgp(87{_8fNIG9s`GZ=%-?8<)IZ>k8*c|7EN2!UEFcO$a+iN9=?xS_x{4pGTPnWtYPW`3#J>2#tF4+d4Jye3qpJ zTAbdV*V5F~EI+)FjOZOb|Hk${m|BjTTBZWwY-u=M5}*(G=gXo#2A4YX5cdf;NQmfg z=O`mi_T31ab`MHu7_`YGN%KBLEy|fSqStqkr_TMJ@7>5c$Fx$G@LtxM9334gM7vjT zVVr}WNJ=;ZF*(I!ju7$o#YkmpZt6GsmOntPmn-;XTgpU&560H#;)#4)j^c^N_lc`o z8=+pe_54foJ~>%^y$*5t*d7pG?u@V(*VbxFNaHu&;GbFd6m>Pp*BPYZ)3IUp-VpYI zR0*W4OW$I}#BwBqgzZ51uMcZ21I!R0DT~6$)SqKc?u?&+O71@%o|9AAXV1n&uiJ~Z zNAM^d|6E=_ixwdd8`5%`O;lL2vJ|uI?*MB2@EzsEZ$MPE=_{1BV^n=ry`MmK)X)rfp~k95wuu z-Nc=`D?VDP@^|jweUxxyz8rYUz=^1qb+7m=kE%mN@@~-x7&-CS_*}kxps~1r(BoK; zlbxLo$Ahhf^PDydg?sl1r65Xx>z-KTjl=AZ-(S?5BW?_(Ud)?Vy<`f&_pSvpo&n}UN>DICi;oF0~&CVfYahQjX z{bjV|QwEtaa;Db!KVC2BZvC9>@qf*nYZ*eVK|=Kcc|eQT(m&Dx@~8 z;QW9ae?tP+$wm(IcM|k22l(`OHa{j=RA?LPYV)ogiMkdP8(s~}O8|_10=(7ZpEY^- zsV{A~NrU$o0s%nG@pfr>pcHVZ_O`aXV^uEKdcJ>GfXBJA8sxo;Rc04)*Dsp`3Bes; zSNeTAdSN%2=;K4j38=SG$g<`fZfpu-hnn zj+YWOV#na)KyrivW?s`;>GQ1$!|EzsEMn>e&CcO`!{zw>!UvlMyMLa2>*>6S@4iL% zCsnQ5d#X-SE2j|-3~8F#tgHmg2!u_u!eUED=}zP~7a_6;6zyIMqHfoEpIw z)^HDMH~bX4d^07`E){m#v0}@R-GR*e^q}GjY4JbVs(Ba-r`4T3W`F}gK}{^tf=`)H z)qfLFe`~K;a=o;Lf&5LXvUR0+b8g@g$EK9G5ES%ZXmSHlg0;)7Fey4*3_ zGvhJiRxqrn_C_4x}%c9AhyzaO;DHQ+BVKU)VSSRUwdCyhU@{MPGN7ETl;B|EP7zC@ZshVED-MEcuG8+dVlpkz3l<ZDDm?W;u4*T6*9&IK_ zAW8c0;R9(@jyJMP3j#@SApXa|ymr#_qSb?;`Lo-NdzpSKQUdS&xT;B0Hzi_<_7Kk* z#qw3AKr;!%LGX{(h?wV;G4n*+s`Iq-dA&itTk<^L0qROb*#mvdI5HxXcjQ~CY5TL^ zbRlb>w674pV!eEM-jkd}})1Nj|rX1#1x z!hfk|k_5g1bqj=-@YxnKp$Y2a$G&owJ9pU<&^NulzrUK-F#)(z1IP=&`G)X?4_x-^ zThv7Lk*a6niBjV{iMlzt?P*&xDJ9M%8mG;UnfNTajh2BEP&< z3fC~?3Hme~$b47l84<-&b_5$!S)}269LT{Ae9YSh6fmRD*Wal$3K4T>LYzm@_$JWa zDt(SbMCsKt40&%5V*|Dfx^8BNJG0OXxKQ4BCSk$h3r2ZP8>7M>daN6WZagb9$W-AR z0NE+@UOwgJZDa%Ja-?fj!{wG7aQCk;BFZ${3cuM+?gmPo3qf0pn|E(1Lf@7>xDmV z`5vd`Z^*HmW6UJ+izOS9GvEE>eik-tlirR zvFVW9nXT#GyQ`kaRM$Z53A6c`1klvppbkfC2SVhhd#39mBWsX1U zD*9OrKA*BO-u`{fgzNdib`2%YEjGj!${Vx)7csFaq^rw)SC7Q5ONnHHg7D>rJlh&a zQ009ZmFw1eewD=cBWc-nuv{?9^wy`PygD1QjEz;xaDE8?`js1)X|M{ZWNL=CS;YT> z+U=31W&l)|psau}?k@{B8A%xB{1_or<~B&^7hc?iLojTtP#8nK=Z86Z3e_oQCih131cX|0?4Unp^EiDq;h9mg~8)5I2z^pp=f z2G*MCokh+@-<9Kd_&h-!3dm$a{mx5nwHbQC~N>=#;@pE=Yy*MccnR ze`&zY!m8v1NWZ|qzzgw$&959P3row3b2zm7!0=wBh!e>}nG%P3_AGk|^jRwtRX5rr z8A8Al2Zu%rsDUm>_IIsIKe}&P5vzL4qIvluQeWb&&w?{P zoc!tNl=h+Z3?a?fAAE?7cwSyD>mM->R_lbs#Bd(1FGj?qq)$PEMs$gY=mJp>=UP@a zwkAQ(ZI)ZF+(|LPW!v>HAM=a&I}gom# z>0}X${zs*6(c+|v@=Ta|Y4%C3a3NZ-u-SECSc7h7L`#8QdTW(x<`t~Jiy#aX1qxLp zvy0pa&6J zcL;oZq;Ge7+va0%6c%gr_lwAdBnUGCZ49sr6oF?5CrL18lZGi_Wk3GCU_zASj@H8B z&g2Go`pcK1bMx~TQDYFu0;*?dfv98-;PH{xs`E`GLfzj3o!Os|k|%RG^9szYpKRw^ z!*U?W3pUw{%s{0_kNV9JwR40pkg2(!YfCm+CP@B%Ic+)cXhqnZS?bmfci!XH@ALaU z>n<#!ApV=(($;=>`UCD$(aTj$2z2=y^VCG%k}Pbo>+1@0!tiGBvriUYXdw%qzhQVT zav0i+@Au;clp)FQuxqdAbT#g}p^#N48AN6`a3GH0%Hdu3j5?xNLcUu;4NY<9Pi*}D z$&=cHJ)S(z`Jl$9E%Mp z6bj&^j`fk7{!Z{E6Sg2^lgqh;ZBTXF(AiZK&}bc!@v-aQlb-p5J0mV8#-_5zm|mKi zpchs$P_n8+3sGA&Q*(T@_)b{voCt}Ln7N_~!9Qc`{_+OmwGCUg6L`U zDBH?NxLb)g#74-*0tdDVa9|ZQs`a=6Qz}JR8q)_?opxpvbor-sYg5SPcCnmxxic@e zBoMVnLjR_SA0Ry>VM=obR~tL9FTzn^69UT+;?JKyy#MtF5YvmQxWfOV=VB-^vJOYV zZVc4vW^_EiuX1H5`(V+&!+9O5_mWl=Nkh8y$z%%G^aXcj7le4KJ39+Q*9d*#xrIb+ zH|R*g>vZ)cR2Tn_J#Vmyh>-6Sz0TnI_`;Le!s4XaHd{e?(Oi$ex?eoeoE0qrmR({5 zcb(hi{asF{@xNbqz`HG&4HL!=03clyatJeUc(C<$celVQ(D83|@M)Hu@6orZ&^B+s zHbaz_iqvgfalcZ0Iu_qZ`%BAd_s6LC2TgCkd>Qc;$0MY1a&!B-X=XnoqHnam z5IVyFbvS|=wSMR8yo#OnV^hrc&*&GB9=zC1MwkxWn-})-xVShVYT8A2Bw$0e0j-os zlR{lj>A3gr2Ubd@HJ>O(#6#U?LvG;i zSlioQf8pX{+_eBjtmXdI!g^FDcv-9-eh_L>#sI1kyVP^fnme{D4Dl*9+A0DBE{n41*wl31row3oA{>+WnjbGgTMP{;bCSsspSe8)T@zU3q+G(=Y@Ah}O zpC6>|o~DdpmN%KbC98Ybuy#%O+XoMr|Jjm_Yf%K+$t3O-LKcl~^qkkoDE zClcDWFps!k2)55UL3c442EF$zg=is87axKKWjfv8to=;KrX7Ag*K+i={snzr3tn_R zW4zxn$*>gDwL%J(#o*g&Y7xOt^y9N!V1T#)Oy{rH?5X9GDgy4N6pgDFjT37GmIoVM zxs2vUjzS_P{X7>bq@phpaeLM+!yA4)_B6F0hGWNtsI&EPIOM7&Nxs{|Td8Awi!L`YHR2`gPn5I`N(Tqc8f$k*#a8`M&kTD9c?U6TgqtwWlG{(|e_Y50#1* zs$RJqp>|iEa*`dOV942B;>bVM$K>8HOyjdidPu>n!5jM<+~<0WCQ0q%#qv&Y3Yr0) zzQfGgfm>exwtEf!q@psxHFTtA(vW^JCJ)z?nY*cPIY+|+i?@d)>4t_;nFej1xVF|p z+x4DOgM1i&UECBeFjEz-C|g1*vq1BbN{w*y62T;d4ce9kkOjax{0Zi~@q(szw6&=q z{sRY$EYL(R)-#&^69k!R+F(U{!y@-)yWyM}5Zk|=!=rTo34(B<-f6@pO@lR_Ylq*8 zf`K8CoQ5f^>yzo9lir6;r!~JMkBspIFqL#7!HWx2C+|6^!^@nVopZngb%ExDz>0q8 zie}cZYitvm4Hue5rO0|8pW5r(zigY+r^rsI9KN!Z@UzJ6t%_o7pwO!-yXM@z^rH>B zh*gJ~n5FfdN%v`mbd5A%60ZzpQ>?Y%yCpw(3X!+ZAo}}*i0#nV>pmwACR6V4=e2~s zdleCOb~4l7&>Qq_^pS~9kmtjO;3xME(ongLu?vtDFjz6|XQ+YYK%v~o;E-5{aM;fY zkS7>5CH85_man7`bKkK3?o!d5Ix5Nl#oXjf-HC8LbxqB+ro_AHRi4PL6hvQx&lP6o z0!ZKcW($}4KQ)0>O^vaf*IyfLk3*L3-C8EQ0jZdv9IuLJVd=sm6D(Ji4R2!8Wxh4s zSRvyIexrG6T{QnPnQ7CYEp70OgCVv}|7=3D0TM>j9H;AluD<+QP;kf9Rjj$CMc8A< zOfO$YR~_9>kf_D=T$}-*3Mwk-?^cSi;exFmbjWXDvE=0BgcEknf|!nOqZUtic(|4; z=yObJE3*4*x@%K)yLTHbvU^mFKw*D=vP-DO3G7&r?d|el|Ec;| zQli!XJQnU4Ki~&8H=xiw;!JRGo1~sGH8ecq|G6~uc;*AD$`z89%A*K)AaM!&KY zc;<>Fa%nARr*<2oH}u6p9S}=mTL5eeTp4tYjU&Lx>NTJv2mY>kG7L~_wxF9UA#tC` zA2m-n87rGF?{c}g=;)e;96CMfa7l>oS|fPc$8-ZKpnSk+00j^sf_0wl@0eAvTMYrq z8)tW0e($=B3s_UJek(z&;by<~3(Z3yUR|QSA2TU_q}?-}^QMJPEwq$F$7`p@@`-2N zF`6lC-hE~UfDs?6?6Oy>74*jr-hW$wEpxafrM5pxjKCF^rA*4TqkLtH8KTP8H7kJG zdyj~lG|%NX*3Tx^CmDJW7$a~90w8HDz(o`)$2wd^nnqX6%Z)&+fgRYZ$AQ}sH_JRe zK}5&>$jbaKyQ`!2fuwVXE9y`v`D> ze0!Gn)1cn#nq|No8Fi^O3k3Cu*UXY308L)Lx8S{bS9v$wrUvu_3;{$=03Ly{+iDZ6 zm-4_V`6B>4DFNzt8*9hJ$r*LxQ9Ttm={&Q`Ro#HYlTRXKv#?D}Hw5#p?KGb?J0||9 zt=^R~5bo#3P5?;RDxgaTGmG8Ocehk=M1Zs`))Z*})EH6QVP`=Nl^ zhRtgSpIK37W`!3SsPOn`p6ysBj%$jUsV7;vM7$&Vu7hKkK_2N$TN+LO;n3!ZxD=En z?%j?GL9-D^127H4do|0jKGSs&wnPa!{a-!iWj<|I8;yCh>`tZd<|!H2gfWAyLyIs02E-%t*DNbOXrpAc$3eugJ8J zEaMCTP6H)C#fg&dTkWK1M0Dhr3zBh{k5a#v50)bx%IB7EpJZYw68K` zG}C*vCt$JeN}%_Mi;7D6axVrf!Y~+%y7V53i0N(j( zoYiXf1V#5fW}DLh1V_nZRwD}_d*G!HuwMHI*}0TfNh z)C)s7{V>wVqq$T`ZS^d#nG2?E>mIKY1j4_Svl58rWUhZ*SfO?BO@1F*R5i?cNcE)d zu_8r`XTmmDyWL;D55B(NYg~$>HSVr^z0^?yR&q{YYWLnr0IgPl)>Qm%*|7-)OOf5$ zVBVl}ONU1g_^^D9hq?s;0)0@xqmD1e4LkpKR;_3)a$8{zCWYBpYm@xI%DAnhIw$&>nUoA0N#SH2~tg6u+^ zm8}&rFLql_OaS@~fpv4Q^zw_u`3b$O;>q02;B;_v%IZ6nw6L&%B)%uV?^T&JOB1C5 zLO&_Sky}1ONa@_hr|8nOxcw01s(#YbX!Ge z4)~ZT7#O_c?#KZJ3~tT=1Pp7ZoB(e(hm{n|22^yV&H)O3rjW11zVrAqjx{jpf;o9sJZd>_w3nC5X3$RbJ?Yjj9XU*T==`z?>|Rt z;kiu|8*n`Ov99D)$8Gz@WA|4_dj05$#6v8Y962%ZdoG6PdWIdd_a=#S38_5;_(vnYp&?eJvjb-Zi zhGD$_LQ)c&{q23h)!xjLt5&amUuR}Q5D^bjlIS68a5|=x@VU2X(7ruHp#Q0xh=L{$ z-JU5;L-}TeMD*Y1_`}2JZxV_A{0(+tLaIopK$MA^<)X-3$B9;t#$tl@?3tUpZUcXg zCcXM-ul%Y0-WT_>w$vS3SGn{@c$Zd;qB=UTMLpgP+Sn-UgyYl6kf0oRF|_Yq$G%Ip zQ0%^Qry_;)a6^l+s15;S8j+L-Cj|fYGDt{zAE9l_*@F_tFf3xXYqA#q=K$vH%L8_c zwjj%e)m2QOAOz{j>ma&!0ZR^e;llJREqUVNCTeY@Ku}UDQ`fYxJ#PO|sCwah>8ZM)!pIlTkDb|{ei9zt%93chzrWwPjl<~7 z7l6a(PDyk~r1SFi{QOf^A1*DsA1j?7v{jp*qZl@+wkNqJZFr*@QhJJyNnk*|->H6I zIM>CPffL)LDxcsM;590Jt;iHoSy^d&0Ys)#b(PNnihFif0{IhE8qYUJHHm3yH3LDQ zJCqB+x(-rp$q-;4_^icFyH5inveRJ<_9#cA;o}aqAhG$M8pENk9~FCNte=Sl0NtGQvSri?|-r{ zODIzpalGX2&%?Wrb`KKep=y5lw8{4JGxg;Gl`O{}T#h*MwI!S|477rdknL#dyAN6{ z`K<>PGw5Eb;KNccq?zG6zIJ{A0d^NY6o(syib2vkrkwJgo_wLNUftF>!0K*kbrrBL zl!q#+eT}u}e6I#r5h)xzJgf;a*J3H>A7BjZ<^-~AgKd-X zfEyz`CR!c!rdUAaFTnfG~6Ob|-0s472>7`DG`VA+zV1xQ;2l z!3cCSgLBV>;GQ{pY#fC6fWb}>+!YXmK?yvn0I!j(wG~CG9XY=$3I{m)J2n;;9RP^@ zPEDl*BaP3lm5Dl;3$8p}|CGZ-Lqo&NGjVx5<-rWTyrZS1MILMpx;-ExH_27i2N)V6 zkY>CoF}qR70Q*J&1hyN>-j?KN1A1vZ`SEUPtowwQ+oGL^`k%;Jc*zwk^k3~z1S>2h zbwpQu(&m;`{lK#wc(|quu+vyFa&qNK{{cRc@po0VP8x@{4to0o?P(IqqZ8H51gF4$oo6H4t2qB-Iwq2GQEXr)xzVNI z!5xurGc!_c6%7B^wqAdP1TJ)nE;?$9c= z65OvwMgs@(dOPRJc-JND=g908T|uowSAF5b*I&m4k7#Mwd802cUtyeHG=vb%qZT$F z>umU1#!>!_sIau~yi(?|eA%GKK!QCeI*5CH{VjXYW5}6=)!2Yi6z}mLsOcCM-GR8C z;Xq(O36gk+g!v348+GLLv;>#x6}Ey5pqUTWWN~8<(%loj z*5DxH!oVv+eR1%AaXuSB@pM@&)zqBp{jZW$k4RwqWg_JWz{fuTe@yQVTI`DZZo;6E z%9m%kQNhy;WKIDW@$%(EvJ6B>tk=0usHxL2%7^7X6%183Tj&ZtFX|hc9vppj*?cU4=3TEP#JRY*ChtZ6R^0ES3l4bO2Eai9RX}oZ*j(-Mm^iCs!0+tum&Zbf6Uh_FJiyY=e zKe*wie`F3gTnhmyN}%^(#UFI(SDcYSgMiCPLx2vq-r&_5T{qhZi_X{4B@RtYoUQl! zm;WGutw+>t@{f45A{KD@?psgCSCUm>3Ra0kC`@lpp#7cWMT)^})7RL)Zq(?I(o)x$ zalE>aSega`S*+-MSEgWy^1(9}>{_oAaB1UBu1545cQVWFJ7S`*H+@*OpSRQ9{&61(}|fw z-w{^TLd0KB!@*wiLP>Ub^k02Y0XZl&EHJD`%kegNzTHPxJ0yg^42P+&qT#N>>2}UP z-Jro-WSB0{{&E<$~4(%4^Ww;pN?|^1!7ND}B0iv${;pUjO_>z7`tlaTv%B=i2B-jVPJ136Fnj5axc&?T;kf}Qu zmitx~k(U^nyf&CSlxtM3oYvO%=STd3kGD6vlJ0L}X62HsU1`F%>>B zVkR6yrH;x&b=X*Isnt1!uvQz{UdPzc(#?V~k|4{iAM0_YlRHo7 z;GgDF89Cy{KFo>28kY$BQ6N075xaseOXI&n zdnmf|T~hp_;I<^aZfO?bs868ys6h~#@(BT!jZDb^+|Cqk(1U)-u`)Cv1Fv`Qv(8EM zTMr2Z_TA{hsRG!ie***AP;W|6DH(^^Z3J0E>@1I*H)|&a5vb(LDLVq$7cUzA^z^7a zy*#CdkTDbzcHbjmYrhL|SxB$}m$MMmBbjEMP9FSkNk{28C28{x~PCh?8Gc93P$;y!;rO5i8we&A)AjtUn3d+g+ z*)jV05f-)EX9`r(=g*8Pi=;W07`fSTEwEQ?D}XElFc$z%A(JJwaM(=%urmv}1v_Ykdz`FQnm9o^Dq zE$N8Os~<8{B7Tx@`MdCugve)*nowcja%d!f@F&-Y`@^G0gGu{plpP}@!oeU&^iL{( zd}TdgvAh)HXkZoG@zB^OWz)z7Q%Y65{Ut<4tBo*`h9uAGVB?N31jGf_fBJw0fU^+N zNnYE|pTOt;|7$-O>ObEDl2vpFTmzrKy`q5r|1)NS45nEbJQc8y`>F*rS)a{s*TzYS zWQ^B*YH4n6R)wO0?Qz8T6u@LyG=~YQf6N7MJ9>y9HQinYX+bQ5?B%+0ZRxL398vgl zbj>X?O;SLAP5mGhEv3*P{;RJ{Ql^0>139x-0dDC*Pft%wFUb5A+wjNVE`QWw2Eq&S zKRX22=pWQn2aTDP0`$G@Yq6CGG2uyAq~ z7fjPzuC~0{@0%nvl0ly*#2m*>z4_f^_42wqLOZ=`6(Nh;Lp70^J1{-&z0jW0c6Pc* zm=hW#$WBf0bII}Yu2-`tL7kz34%r=cA}kCnM5tVaeL|SJ{wQ1FJ0t(J3zai@$jHs`s z8)IoAcYQY9I<=n5n|Klf2^Tixc?Ui+xyw{qF&*+Iy{O1zD{MTK>u|5Y^YWBYPrso3 z!^5|ehFHB;^?R&?hf8O;6s?D6Kj_=s>sruptr&!8rGme;r$}4b{mu@5O@$9Re+zwm zf2hWNKNMUxvzttYM3($NlR9@??1Hw64tU@c#9!<$y$p!OdEIW3q$(uGLL$XWhSP$8 zhnRzgj5TQK4QxCYe|+R;@oAV9IxT#ND9Si*6QReLsj|bgnVJJ_uBVNkfOGc4tutxD z9~}y0Lyfk+2q7k^#L^GBPsH{ZpPKNt%Fcsu=|<) z!tx)1S>nx`G?KFEGFwAqx?f}he2S6&tlzk`A9{XJ#dVO9dqtfXPLa2kAFnTzdw3r4 zVZ)KV-j}?ivWceA2e)g4MA)Bj5cN8pjnDydE__9vQcRZ%+k;MHB2grAVb|upJ+4w(hZa!kkYN`Mkca`4oL!*~SFk zdt^XE1oULpw);!n<&%6&Orgz3qvilw`#j#tl=S$G$vrv_@)!zmmK_5fHIJ|LH=e=oE zErQpB%?RYqiw1ds^XC)T#`6@2Lw|zh?4=5z;%<`XJ)tHtkeewA9XEv!W)oo{ZsiBU z<6_UAFjDn*5XxwXc+BE?9Xs}CMuBxh?`t+a^lnaE8*gAB+og^*-I^Dlj~fQ|g$X8M z;gJn~*T|l`XO%z`2Vhn=UH4KfRl4MdgJ1|{l=Q;sfμ9qM%fZ^TAnH2G&6r-1c{ zi&OhyI9=<%!BC##doNDa9ly+R_N$!XtY0J&@%EF^?Nj{qVa1O#ij*)!jCdnD+lGiO*1{yS9`FECo$ z)FdRKfLS2VLbC8yTRKDwn1{)|+FMMJx%F`q^IE|RlV5NW&vGwe%>b-px1H6pqgSq2 z#=I%&SC^MS6B$D=2%!E4yYIh^e?7Xu)6J0yp0#Zwrl#gvR$Bqx2xGuh2j>X|=L90L zr~5=NHnYyw{&W|PI2|3SEnWIiJ1sqPRy)~Q^0&=DYrR4_2inn@#O=KO%NRvTV5w@- zvp3;OGkTmzTf>oo+wK3QAgtW zHAeIpIP%|k`HKx&bU+L+X?$L+32!Gk%nlN`m7TnK|A2&u8#|*aSl`}F<5zMxdha(K z9nic~hX0xMHRVo>|e+SxUTo$C!c0 zcyYRc%g@jB>zI+}@o~`NzqYHsGhymIv-B08&BNj`Hx^SkL_)YLdcE7-_Moz{OkrT6 z*quUcAoYurw~7cbA?l~g_UL`F&$%i%#+7uc_+_eX?qSu@bg%M$?|XCNS@9LBsDuO+ zz?2FyG9rJc=HNvmkR1%#y`>`FK0b8jR#tN|LPBJ~mjEpEemf1Thgl8EuK-cLAU7BK zFDOG;s7IwS{Jabd`bUkYYgaXPKM0HzyvUR|>%;f(-KO@hJ`Q>Yfu1F3NooY`?Cuhp zV>bi#Bk;!c!447pbpLM#{uDTbnS|kQ3|TySevAQ{iDC4jHyU3a1>PAWC0!73zx%H3 z()PF3$|)HR#Or3FfMLAVr5{kIKtY1BoWBe~DTX}@fb0>Y-nn*h7#eV761@AM_IZ%* z(4twE)oiwv=gOgyA|9>F!IfQ4VyI31oSu;E_Ypf^p`pnbu=O{!=45g*uMya@tw~h$ zhAxrY1hxFI(u`$>xpp@KMnq_k+R4b>HVzb!M=Wh#YTqyoaq^-L%GAvdu!GO8;SD-OEziv zJ;y2Qy^r}EN-a@-H)KjSfbPU1Elme3yCPy@)a^kKM=0(YnrB5xiN9IF5SE3dCBIEO z0_1Gt0BjBXEub@r2CO|jmwpmof~dz^k?2eCQDe5P@L2%y23U%e;lpk@oMrvhJQ2`W z_nD1EMu?D*@CgVBZJ%~J{@TPNFKebJzf)!rMF`FB*-U3qMT{uOrz;%Wpn*f`7U!Df z3mP!gLk`^}9HF5_-@tJHdqAvCudM3ILVo`R#f?0%Q9^cD2(vQdsXOOr0D)5R4<5WX zs*!4iwj-^-A1dtq8U81BzG=GEe}(M1+Qekb8kiLU0^wvwIiPB1U3j zKWoT*_PxwIe7ZXM5k{CTi}nt_-?6gea473nyPNp%g2-P*IQ?wAwv!i`6s^)vB=nk%)?CW(`&@`^JXD8hEZaQBs4L>$f zf?3Q=TLrJbS99J^jFFGPx|U^aC|@vMNg`aQ~bKJekgm-8Mpbte~qS<6EsQApXgL$$Ngh9RsB3 z#v!uvE`6t<2j3fQ@A&vu%9h!FNb8M-(j!CB?an=7)G;+2xttYsqr>>v_rtHij#uXV zuK$iq{2QhF^Txr!^^h2IiauY}J*{GcH`!7WiyOiW_n62`&Zr+2F{Hz6U~BMJ>|UHGp3g0L<8%_}DEz?0Qrd>G(Ys_N;zc}FEEL=Fq5B@v|a*nA0v z9|Fs6&MQ77Wg5-y?vX(CbwPf95g?V?@=)8lP2{o4uZrK@J1jlg+hs$MV%ru`!w7wG z;3eIgm?0&wB4g4&+}In22q74Pe8obh@e`#XdDgDZ)K+E+SvQE>ZdKFcak_yb6(zA^>RTI z%8@v@6zG8PZoAda*GW+gkVXL}npiDh0#-34{oLNHZ0iCg(q6CNfHlZF%H_ZTM4S-4 zVnqP{)tK=BX8{#`GKV9W=aTDryfng^6K5W4ch1Ol{4*?AJ^S@Wi84bV&j#ULl~4aV zGGr=Mtzwv*oOEvd=+K;GqB}NyZT9Ag9k(qT4I=p$ZFNnSUf1S0*j%1g`K=B+_;EWE zw4x8*6gyQNSKo{5e3UBgCf2%Qy}L*#VxxG;&@A!z4$i0gZ`=z%$bX#It9c4pg&^Dd zmMsV|38OzhD~!1VJE4e%C=-}7m`^`0nlM+($|zWBU#27;bvvvX!)nOTUBh8_X-5Zo zdYHp!Wk`wnEQtuswIIY(1P*U=lbyOI{z@*J5LamtsZW|2yW;AuF)HR8`7 zA|h%(KN9pPL}Xl6G%#rT()e-fNI<}?V!Kok;htp`XrmOaPe5E_ZAJ4UglN)aD!$J<&+=|EV2H%+1JCkWvvtsqdKwN z>Hv0);J;L#GH-%9*QY1BoSjPUfg(Fo>?s_q=q^WDVPS~3ny_3VRPjiuG2uVZue58Q zw+cMElO1?$T4r8XF%e@0>~=~@N_0R1iHN;B)vo^%m$4} zgs=YWQjeliPA4((DDdFtjTDJD!RqmR@SM)*N9g7CgGn}G9Ti16xsZ{GC19tLRF*;} z?kjJ!dxiXp%++RR`E(-Z7$k{q|0W=mVRFR=S}a7aBx9s+-g6Kz6+ENShV11xG|~#O zka@U%l(=xTMnzCZsAB3*Q9T0c)tF|G$5|d zm#e+~@!j!HXspn6{X@CG@U1EQqW5GRaJ+a=`3Yfa(5RBLu(;dFMrw5IPi1<>^m$2t zN(svI=5OSc4z)a#BHzG3CBWZxgh%nZc=Km&5sQOe0N$x-S=~}Wf>M$H<~_)#JLLO3 z_QCzhcja0;*`cL%CFzmqp1x1Rn@TB(7ZjAtTUq(HFW1t`yc|bCVfOMs>X+g!IJG?K zMk`12JOh#xZ@|9U#d#%s1xDIXu-jRP8i3dqjnA|B<{%Eh-CKw581T#9HRt(mCnR$ts z@H#>8bp;8|uY)%0O&70CpGJ?3mx-3U7)LRO`=brzyTa z!ueqQOXpiBuZE95gMo2gdHW@x|Gr{kWP~}sLGUY9VtAGSVhbzR`;rJ9j(7Eq8!5JK zv&~e%d^1e1I83cj-p-C09F7gdvv?zjp1tks7Izj#y%IoJQ=(hX)?xk=TpRvDSox9F z?xeyhsbv|F*_rh(V4{V%Ec+VVxeB@OpRZ5%3hbM6t{<=mw6@Z5h#UX8d@+vX12wptPc*Ydk{1bV5+sz>(}oFvwkBy4Dn`K|iam zq5@+IYWE~I4+?;0eD^fXuNw1EW2lMm&_kL)^;j@b;z5&`vXd+*rGVwEN*Wm>D$usD zb7Y>rJ&-6oCA`(OBEfuRc3t`PYh;hqg1%JbRm2}O)C%{qULwI0l%H#a%r;E|q%4 zm+2qZ{Xh3YKUvUi<+m*4ZwM!ekTzr};%yi89Z26#$cKzBj&|fQ=ZgAkVat=_D2W03 zLBB=9w@fo|Q6saM^p%D70#w9U$XDp+RY8vJIYHCG80-Ncim7m=&*Rra z#=$AEM*5=40=dTw{7-RgZEefGs(`iaVIaxgbF^RXXuSQ9CQ^%p!4l&`w;Krz6RfhX za<CWs1UIiIU+mV2y=}`Y2apc`PF!&7XD>Omk|`&8 zN4}-t$?w&b%eGUKgT!O2ePm}K=r;jiF2JrpnIrlO3u5|@vv-y(!_R}0lU-AD^NYX# z7JoDWy3V^%=UV)ck&!x({t;LR)Sj%s2Ab25>wQM8**1?nmJ1BUf-Vq=Gyc2vx5ySQ zt^1Vj;`Q;QF6V0ksoA095-#+ggTILU#tExsYI!xlOFs_OKL5$v%RU?s198}^#+)S&JxFY_+M`ER4lE|Z0pNV0xY`cvZ-!dRcT~(RBBe&yu1cmG+~gEt|DltpV`Te1JD2%9^QML zj-ffs5N2{ArB*u9NFx7SNK@2VDE&%4FOdWb(GO)lNe|chL<;6sl~L(-#qfGR&C9wz zQP|%FN@CAK10|o`=}?zD!g~kKkFU2J3%TJhB?^LXu8q1I%eU~U1i~6kM^#5()}VE^ z&AB_=um3~{M?*7B3O4_y7f*KERG6cC3t9?9ho ze;Nt@Ai3Wx@W*I>DduO1BCupnKAs3!S%MY=90`6lm;ei^r@9;&UZ}Q_E=A>~ant9+Mu>29E?L;BcJ|wNZ2FkNpuEhTHej?=+qeVTntGrc zqmqFQ@lT-v&0pU{eQ}>HWh#^IVw}i0NjVSA;%8#A*co86U~g~F(Ywvlf7j_r`Nw|` zj@O29Ay4(fP@{>W`(-7t+_?*+x;sK)AM>!Gv!SdOKp={;>(!e;pBHKTCmVtYZf>~% z%O^RNEjOXP^-`37>uRO$a&l4aC&a|*zyuy@eVtyJvqpqHficu=N{(z8EUmBsc?&5v zHdP-n%sdSBE&tV0US7*y-pf197A>+a-a1LjojX>+(GyL(P68sHnFdTrCU@Y#*NaIr z>9r9Z@qM`8<@;OsnfxYWV|a@g%3L8#o$Txu^1!05^Q#o_io=EaD%rYo@*&)lR~l^036fuM1x(8nlw>Vj6%~Nz8h2t; zrmOpR_qBy7_5BsVWC892pBi z94S4)i^XliXMzr0Ou4V2TUHx@U?C(5B}?fpf|lEP^HEwfB03sJ34oKEs>pwjPLfqq zoz-4H(a5(@*a8MBMhV?LJ$6dhpo(;S7!0IAKY#v2=E+*Wq6_q2P<9Xw$`mEFEPBdu zW=jnJglVfS@m2=u*p7(=y49~7PE2Uw%kjrsJjDFNbStXCSLa9I$7Q$b^Tv;Q9->-E zb@YAbHa%A>NGoL7e0IbahysS4lTBZWR7LRB#=3gLlo{MXk(I<4)deEit%S8#W+&kMvX^@dw(dLMT=Y&Yle!f!A-QWiVHY?5u(r`Dg*!%kM#`OZ( zX$qKbWdXqr+I7JR`NL5ru`4(H8nd0KejxchFm-Km238+;_D0QejkV`TefULQ7I#hW z_NI6>9z@v*8q#PTa}PX%o$z5#pI?(^7)d5DqFoK%zqT~m{zq5Px+rHlSI5htEUsUTASmYJtZJDl%ico|Z z!QZ_GdbbzuJq<^SF|skS?S|UMX+E-Za44J^15Sj{7C8)@an3IkUk+>cU zYUsO1`-Ri&)U$H5^vJ=ed=6vC2I_~c0go(a$e?@qnRL07%5WYQh=$% z-_;dzJ8pjwk8J2hCQGV#!3%j%ekUvKSFSC=(D>EHGnVEXSdH!?1AN}6o-#mf2ZCyJ zadRJRqLpmUJ$Oqt#Sz0gopvm9&u>MXx8FSUJZA*Nz+3D@Vj+3{T7wzyFPzB-Q~AX; zFa4cX^qD#oCFsa|O4A(BRX6qOvHNISLB3hC5tfNLZDK}dOlmJ>?=&9E>c-qE+v>A; z_@83ug~i|KW`<~yNbB!ElWz4p8wG^YiGyL*{cpYIXF6%{y}buFYCL^6@Zx0chL4O4 z4QowkQQq>_-1|<}1z5m*h7I_x0&19j%syC^n53j=!5+WO2A_;RjRWryO!;bIoIUQt z#Vg^#h--GVdW1C}@-DPFSfl@`a0ek0{`-amj!Gp;m0F#6>HcI?2+h$iB#r22FTQm? z8kq1nj`g`M;*V6?CrxA)ud1tr?Y12gzf0E(v%xL-2zUj@WX-QJ=O?K0C2l&76L6rs z#Dm(YFF5U#pRCSg@CY&C6l6@j+f){Q9N4EPB-P8?cVJ+ZM4b{}5ef4muwNxxAF1Rl zT71Lr%@DdP>gAK)_@#^S4xEr10)jC$Pza^XVAo}>Aa|8#{o0&06)8O2hu`IfQHvE8G{qvUz`*IV(|Sp2a!qMwQVQuhQi^ZBSTjm+`5U7xqt+8|^5p=fw18elz{TCD=G zzv$f!vMi_-D=*OO=K8G1`NJhUo@=-NWX%%;aLcIxu@UeA%>o|*8Zj^yQwm55ek-a~ zyFA{;xD^TKOU1id+EvbOr{#bqabi~qAz%=d?C9XYnL5};^^~Cnz-^)2*i(}a#r>&r z^G-aXPpR@cmS1Y8Ooyy&nb*Izny0A40a(Vv6(&UA4Uy;=4?I&5nHwk|VO5GLANZ-7 z*CPQ7*p?~JY!&G))72PPVu(Ey0j-7{H<{O+3DU6*^p_L~Ehm~y8gveb$NF^8uSZXv zwTtHT$QT;Bt3}y@6?W&SF9WZtE@XMTj;V3SwA^!_z+pq7A32ERbD5FJY=h3VI!0r5 zKdNYnHos@G7gAT^sG9Q;=wGTQy@+kW_hLeFpV3UJtE)2uLa`#?i0xuuydeR_Y%a6k zbv!xzV{>poKBPII$byW3nvW?`FEJr`s1ef)q8vEaR#S7P^A#n-4By@UH}AIoleQLb zF!RKN`=4NHl`U-$VsGt2U-k=mNO~a*TSlvoCxf7QNzQefFkp4f4OI9sQo&g2o4HR z^L$7kt&9e0`$*%!fh2=igNfNK$CA5t)#)HF;t+sYtH-^T2Q8Y=QYi(dH7rga{FdOw zmw6a=%C4w`m#O9)`0Ri}GlpCWgfGj+oAVlR9> zWCADZt15;)LDz=?MMN+D3rVTX_429fCj7>UNkP&8&AZc`Ew~2Mcd!_VV!jvYiOm1p zm9e|3qhX+B@K*i%`L?96>A<*W_FW1SB}EK1{hS+|1vI2oNoeh--F3J;DtUJ@LjtwO zj|^&Q!$EOF@nF-V^-C=cxK&}^Rt?LrHN<@-=-G*&9JKe%DX`Q^zl0b51h6z2Q) z6L@)egjoch0ACQNT}Nz$S5ywc8boIhI>++FUx38KG|70NP0z6 za1gXDx!PCBn9|b;@bj4=fvj51?V-^m$mI-x-#p=n-lR5AON~3u@V_Oc5?n2 zs!4m(KD7GSJ$7QKVdp_R6;hQqrOllP9`Nf?#!zLTE?AY>mzI}rZNJfFe;+!D{u9)N z%r|?fyS1~}T%O)F{_FESQT9LF^GvNvic|HWsY8B;?gpH%2QcOExDV9S)J$V7Z3M7y zgq+a4{DQ~t(=|j`c*Nv19iZ$N0vgb?vmsKsplTE2nULwtgyV%Tw5NWlp$LoZF~Nmg zvc=4`XGXP>+?dD%qJ9l2{ul=gKW1<%nL5sK@bGHZ>(a4)Ezl~fP+o|@d?D}iuuC#@ z6#D4c$(JVy+~EK9HhxJ*p->fIFYc$!;M1& literal 69070 zcmagGWmFt(&@I}7ySux)1eX8-f?IG6!QCAuSa1mr!9uX$!IIz-+}+*XT~5E>J>U6z zVS0vXX3b*ysi$i1UAu@>Q;|bQAwdBE0R6qZj0OO}fImV2Bn0r`U&4qL_<-h1w~c zsX9X(cQt8O9X3L|cW`eT%q-KNN5tABEW^XG)8Y9leA?0p-AUV_m9zPO?hyXp z3(nJk)fdy9p^R?Lw`JNDe=XQP>*VMd^X7q19wrCUl9Hrxad09U#ZQcUidA!OexIWg zaRDn2X9JI{gKmq!orp9`${TMePe#nr@U~%#FFz7>w}D&E^!e5PWMW2!UeLF1-=5OE zQ=2?4XfS}6;oK5Uu!z-0t50Fs*`{nyb zVE}MExHk1b80^=_2dL=j;orZ1ubk?nJV8QYKyWy7%J`DAC)Fa4_0*}i*XR@?#Z8O? zxO^@2mUD$6@0KiV#X8;7SbkVOIywrCi9!4G{3kg%x%$^q2a!-DUs6t~-uk5{Mn`d~Y$%!W7x`Du6jt@7{`)JxN6_atn9cIB|IQ1GXJ0S5 z6$fz-?|N7DV5R*%Fa{~0XPzVUhj|MiFeCg~3M5ZVOr##|>-)`ml~NH?kq>(k_UPbH zZt^Eelmfpii244#vCJq_xGGJAcIj4k1RwA5Le{lFWu}q8r@+$K`mtexKrgz_pi>#7 zI^fasekZ6cZ0eS<9}EUn{fTz_ZcO0Af-MzZdfTa3NhK3iz{v^CuOi{@Tq9XO+O_;I z6jI=o0x#IZrKLgM(8*#|Ic;riSlB%Ng(${r=Z$XUui#GTjU)FPwDP+>`B$Wzbr7FL+UOj8 zz7n+$ElI~<`oL6keP4=1f6nx@dblV0hxgYKRS@aK!~_#iu2)<1&*6=&8%N#jff`G! z&CTE14STjdKiqw*RY&!J288{FqL`ToxTTXv2llOUmv(XKR@TM92j>I z?$NctipdhxD~G;k!#cZXX-UUM@gU=DPvcimVhFrP4@qa7I2=Z()ncKKjU}#;b8t8g zayUgrLHX$)5I`I&+cj^(>%KP@Z^%wtIK^CpE45R1m2r{n^Sb=kL%Q4q(8qzVW_)FF z;GcLsH-5HyU3!7Rf+!h(J&iXKu!kSse&F)R}=a_b!e1ot@GSxDRGgYa}mXI2_;BuFGY_P78PyWoo`{RD(wCn|sbhVoAA5*gg0R6JV2tc#Vp zeG*LVUtzG$48Km3fHANsNWjli6^q+c5B9kHv)y+6-kcXAuAr1aT&Bp=S+A{|;d(ttyr$Os=pY~W;&wWoRsz;Zbj>2>`k#4pmY$krl zfT@5%IWzgU=frMm-^bf(gxRLxKdh)+UKS8bc9Hnvl~;7lom|IrSY~Esmwv9_np-AX zT2pk~a&mHApZGq`jpehykQ=1?U+xSi3~pan?Vwc@^>J}?k0(AIqFd=DSfiEe8YvX^mp}J_=8$b(&h}WUEI@u3rDY*I+fH0 z<#bjYxpQ&p&J4D>+Kyu*k5U)#A+qi{Wcs6lCj4iYaz&x%aIFy?F*x|7M6RTiC6vRQ zoT*UI?}kk_o&r5mW&(N_5)zU>xt}+=ucogb)$7i=9=)cMnQSxoS>V>+K38aG(1`wI z##P&X)q^g`3PZ!~HY+9N9WO60m~lQI9oa8TJO&V}C4=E-=#y10F5viM}}ZVBF!Kai^Fm-b#~`Nl_#&ggwhe9a9j ziUEKzQuMLIYl^{!#0GXb3JMCx)8Wn!78`rW0{9B<@Aiq65u$gUxH_$E6%|tmuDd*OxZx8D7WY@3VY`9#3-aPpR?F zO_Pk_fV*v@o{Uc0=#JDY8YL@2;KQ_I3L`sv?7{>jr=9Qv0QESW`L6`){&i=LqYy(0 z>3~K>p=9Z32L)(p;kg6ezaNV0(ux*Z3It9|-;V3*w;TD~Bv!}7#1Jgk#y&yXHEF2? z1R7&go+evg9uD13n=eObNd+8b8XcDbAY0fYSfdn=UAKCz`{ntuZFqP%)=>)!(yk5@ zho3cUACbY|D3GCS6M|Mih#G;NdwwlYVQ-k0Xdym*^~ ziK%45n$OVO>;-%?6F!pIikZ}h+tXFsUw6aUx33d9&ms1Tm7CWqV%7GKo{haQbIn1d z`vPYgJ@KRStpOqcRh<)QBZ^5euXKe){zSFfOijs$T1N?JkL=5$-~G*LmEoV@g@px? zB0lXZp6ty`Q3*?4Q3+{@LUOJ_aZ>GSPJcCE8o4hVTKc>pjoW5k$ic*>y=2z z%slw&`nCTP9XEH)XY4hierJ#J;BnK?aZ_mjC%D1P!~RuMF3Ga#@0FDpw)Kw)&;XQn z1XZ!uVd5+Zik4nvxIPIsQXv5?6)kKjGqYncELpz^6_z9&&RaGDX*L2s_f_-<4_s!5 z6>|l1StC>>rehe}1?inAou&k=fi^N6Jk+EGSt7t6X6<~5MNv@`LXz{Y_(ySZ!LMI9 zAjXpdcfk3}<0&l%2ZnI=$hdTE#*|m`oe{mY>Lf&&7$>I>#6qQvfvOL(=36GJZ~Vn| zQ#}O8*K%`nU-ySHcrkB|7X<)d#qU%M4-XFj!Z9i1DhwJwZuKR$#*5wPnyIL$yovAi zJJNoK85$bytW$~iOXwn?smU{TIC38^Aa0klbPYQ{92>bVW=_sw>oO*ffr9bPeVJm} zbKHr97$2LUYni6`6vu9x!(u}*gKExGJ^N9WMk!Ig+T2FNl)hO|F*cBuCh=R5?J6Z@ zELm6Hxo%p-T>!;-yK%6w&++K@gZ&?aFem2wMO=wOJaS=o>$8mhPd|gEXJ(`d#`B7b zcH)>Z7e!yi{BHOn;O6?;Oxgm+4n3};;ugw@3GpWfMs+$r@#F_+;VD_V6>Ocx(bSMY z8olWoN~4G0@i=k=F-5)?5}sE?b;9IRw*1Ko^tN_(q~4wF2xzxCz0mzh!+w%bsTFxlD%tR>w5jI z?d|mtOmXWgS4v6)xb0tyTgRn34zK>?xn7#R?A$ygim1P78JU?QL4ZmnBt&f96LT)e zbH1Hsf|Ke{lBAa!)?^OZ*xckS{PE*z^|#CBp7a-tdq#SC^7_QKY4tF9y6>}nv?}}HnSxrc zkKSVJR4j91NSqtA!gJHr{Y%j6giIw{H1g&7LAq*Ix_DB$YI1$isrB=*u#WJ<#rEKM znH6Wc5`*DicjWT^h>5Qg+5trk=7*W^5pi*z@43PBTWzU0_u7|el0R;vR;>NDR7*e5?lmZ7-Hz^}u5E6@ zN=QiDJ>GYWjw13$Wy%0TjUrR4cq4e)UGAQcpNXhEfyDApL2BUAI9!5appc+9U~zaF?;p05iFy{UDBxpD_~MAu~eH0mko zto)oFhde77SN@dkLv;FAHAmZO9+edoXuwscX8&U%N865j(MZk4#`c;hN8!UJCf4$p z!E3cakAv*A(H$v6hx2(;kSFlz?kUYA@Q+EZc!1~Ap~TgqZlr56xbv$v+*e1Uk0zz8L-?|q+ ze$bJLc-prgOqUUYq1*9z+V;90M=ny7mYTYvw_$CALUm<}ZCjonb%=)|evc1Lr+RMZHE>%qf7;9wvu ztgPJNM-VZ7-=O|lrc>1eV%U5EqP)q&yhaSiiG6k(C_byU;0FefIdbUzg0rk8W>onW z3UxwW?CI&*uvN!aP*kk3ne<8*e^x(QY>Z!!gUQsC1bG({G)1A%(3~PcL=)d3C&<{C zg3n{Y7gniI`)#3yRN>D{K|IIHmkL&h?W*bs3tHfD)nh8;%5H@ zW8cO?<(YzIXg=$*h0D`P`S|=9+&X2OI^8FMXo~AbR{#_WuM%T1vu`!hHbG7%FVDr1 zR>HQ@mcgrdTy=;JNOx820%Q^PAl#bW9_T-*pkJET151 z+(eqImCL*|G@V}Ocb!hJk0T#98xLpn-Tal!K>|TZPfrg4z*R}i&L%&b)-hp+ftvTm zp&u_d-RAgp0@XgduXmp2m&W0wnlKJCPD@McNXLssIakNhuZ(F=2dUc&`feHy7Kih- zj3YT>i%?xK`ZH`28DqEH&T!nL9Z?c^7XAjM|NKE-iYCiSj2+{_T3XY)FbYlu< zQ|yjr!jLct1#a2Cn?XwU zUw!rzpI=%3?iH!Z1?$w-@|90;(e$Vprq$J$?U3 zfzLqeM(VZ@IXVPL*cC>7vm&!9CeHM#j{2`tVkA?EA%=t>1;D~*>)`x_q5II`;UB0m zTh8YfPg#u?TFdO&`_|<|CAyZfZBk>jjXQfSvV75}?M7D8uC8sR#V_cmcBvO8F`svd zej$q4a5*&(&o3SpmY;@&8rh}gp;Hprmc@XJ1PHvyPw>WLVSx;4Zt~S#L^@EiasX_iAS7%GY1l z$BTp@bC$NS2#Bag1+;VwXcSaM&%1N=_2Nb&G!!Uz%qKCV8P z8-6WH8Cax(8Ef*{tmSLPD+D%D5zN;k9gz^#^h(}>wGIO0a-j8uNOxjintoPnJ08($ z1Z5r{w?PV#Nr8&|OMR9@l_e*;k9QI4X@KEh`j6x!2Z_z<1z!mA$JO)I_ZBMRMZ&ep zR;=vUE;bV(&P~Yn;JYF(rY!~dLFR-f5~!uC?PfVzQm%vm@kZKy6D8i?IK09xsjT+Hs07G8X?Ed|{xYO9%}OB}f~bUwEnbocaT9XE^H% zt4?K|zMi4p%B;~hf9cOj)o5ts*)$!aa(}5OdNJE5+agamzP8ogcr|i-StPMTUQ)dE zBNTu2tYCAx&t`cfUqwIjd`F}|i9{q3*nCG}2i;PAaacs*FCPZZSmK)y*_DyqPnI&k z_(5X*?C6>gNO_2OBwQiHOQxyc5lkh|0_tM1OHcoJnOUr z{-2C#4BP&{(&U|DUI!Z#tUwK6 zDt(tl&BPS(*}|8>q*Ti_S>tk9OMJ2Qa(;fkj-MdYrXuC0`FFrvjk#QBcO&RG|qfiHS@soW=F^^$pL&OZp$jR&+&MJ>DTxr_(QHw;2gnt_mbe)my5* zl>2Cg<8UQcsU7aGm2&=Vp||q%^bB_B*E}J^LU6hxzHR7Av4KxvcXG+${oTCqC@Qj22$)xkd4xvxz4WpbT z2Qn5M_TOND-Uff|c9)31PBOafU#eo37OPCg>h+?(ybuD8EcLI9Ye|$4R}OaeipHkV z9v9|?R5k%S)t3r0IKFFg)&5`nTOb^zqNVLB^mAqWKJl%2CTeIdNut+9x7HHFpB?h~c>t7%O$W6`3IkEYIQSJMZxj6o1w#x7ys65gJg36;As62}2%5doy ze#NJq=&Q4Hnp*vBYrpSwW~A<@QOZZwZVL2T@aSzD?d-z=@-SS)?Qf*y-xO+1qqw#e zB#R#~cdW3R5*6vuhGFsGK@+fW-ZEEMAN<`x!;?Y^0JWp>8uMO*22`U~f1i&oE;Zk< zq>T7set>lG_B&?|na|-4&(dv&?rSu*YSTV{eUWIPM#kArmeYWyreR=e*6uj88BttX2L)HH53${EoTaq`tZ6woTRF8p4v*rk-KmXW$<;C;T0 zszL+g7aPo;E-q{>+o3&PGh{e50ynbBs%lRG>w}0GDA?r&UP8j6N*dSWta7P@Mx@ph zx2B8D!HNeP#kog3D>IHu`>;2pTXo&2V378{>_f3)R=(a_L18Wo^&c#I7Y zBGcC!+_YMj^MIHBb$_0+D4$3^DH#zD2S^Axwr+PeX7NTdqXV%huJ^l>>#p z0E#3!)EX#ub8{1c+>uE}wD<$LJ-xk6&AY*IljpG?5OQ5`84+1bQSgxNXi|)a2vI!P zINN7UlhfUwE=X;;Rkg|lNMkfg>-t|7H;@48AF$9@2owC-FD;gUI1S%t6`yJqd11VE zUqApLLpZ~NS|L-bYABQ$Fa?rOe+sYl-_J&?S!F;&bjFrMgQ9%2u+>4&1Xq{=u$Fvr z+Zjq+l!GnL?FVaI)*2gm0=WBuJcu6eBwqFHN-i05_hhcke<#=2{8tw)fVI9vTGtxg znC9kYghz5Nw2;Qtz^u9C<&kWW?f+I-AL0=AElINmcxDN^h>~dd2ye#p(BeP`#kRsU zR{ULK5lkkyP>!Q=gd;72LhpSXMjS3Lkzaja&v9;X=WV0KwgCU$nf(-NoR~Qy=_ZuB zMiK3JeKVd%{~ZDb*<49;HP`yH6g925|L-GA+0&Ma1hQnHLQ<+>Fb1iiu3vz2t4cAC%hpZ=;*%N+7}p)mVMuoOc>VM$ZA( z)_YUnBC|UN>L3mVavy+#t2odALhLHiUY8p(c#8O2BM>AY0F3ir4AgjL`4moxMYW51lOx(GcYhes_Kx4fvy(=1%|efwcG9 z&6H;xP@5sbdK0%}0h^E`7-zJ0#$=5!L>f%}!TKnT0c0;yS(cPP9Q~u z!V?!8j~dztuz?DW?2-`?3>BdysZ<|>UAF(G^%$Q;-X{x-{^PFyqM%fwA*jv&{z9hA zY|K7>bYS4?;+Opl8x+F@i}|ob;#Xxc8@E-&kc?D%uZDb8^9%cdm<)!(lYxR{1~PGf zuu(PC{vUErVpL`5{`YTN(3qAWdK=U{Jm|G^$8OG?ehbn<0!_ZbGfy&%HHd5bbo(OX zz&*rWBs2^=S!98!x9Hg}lY2skiOWcw0}bPr@q!1x2xAXQq5c+Y#yHflLK^Wi(%VqR z^w%RaeMUTdI?u>_BqUp{qVL+|Jnki{uJ|JMIYG{a@}qaII1&ZabZp7z$T*ky{1!AR zU&ADAsBRpJghFOAZ_`9*M?e}NW3>q(xqJdqs#grKXf>Qz^Xy~Qy~h;qh|&6C^#{w^ z&*q)ZXLf1_xdIqKO6r$E*pt=BH=FluE@Z|*&mR6y=e^fkZMM@ajTT_E6pVW-FyZ~G zz(Ov8Ko1TM*z@!ABlq|BT?JYP5uwGof%?f=Sy?IB*~^yeonc2Jr_Ga49cgLlnxNMg zIDipbMs}{B_ z$+Y8#ZKoC>gU^F4oRYm$M5dN2)Ud%TteYaoOvSngO(~avP`8O|+^S0wHdV z0E}S=*a!i+3%B)HUbji${X1hVExP#VTKm#L7qW@TNgE?0a*)~teeAx4)d@yDxl>n^UVc$o`@+r3DHIfkR#kanZ=APcY6(M6lPQ`< z3quDcXd^_E@c60Ecm5{xaF={4Uc zUxAMC%f*5IBRb%i`opGA%vaRv|Mdc74i6S5laO)v;IyBHCRikER4}dw0VaB{O%{M4 zPLUSNGb2=Q#_G>EtdC%~%k9vj^_ACt zj_c{H3)6cmQ4VLJ&W6^C2;p*flu_H_YqiZJ!=Db*c9274YPr)^t|X*k9wK9Xz4ZGb zRCBwJ^(ROAJ3TybmE}Yy$AtiY#%@M(uV5hktJCs4pxDKUSolD@he1QJ0(j=XDvUY z?mhzvJNCxXOk~B&x2h8 z2INKY<`W`h=j{hSd{ANTUO8<15`ff3Z;dYG;o;#5tX49MM0TN?iy62GmM&g2zuS4TDvdP zlFuX5`Xk^JWREn>wl3@P7$A&q-jyhpb%BcXv!|}}mPn3xpCv7zQR>bHMaM8c4g`3? zMsKU@zYzM+v-0)R_sZMb%!SjT30lA+GWBW`m+Cz?;Ky7zz_7)POzl@O8?es6EDliN zwc7((NYt2W3b%eZ5UNl*SY4Dn+(IpBBw~!UOf8lVnhLx|v4A{#Q7fxLbf3K=)Q$+U z##ES$6TRq;4h_ee=y)^Im5l@~=v~D*Z4+mcc*%NTlC(!{ewFBa3JP^9)VOU9O6r%1 zr2n?HW^jMHOlJcmj@#1VXf~otRy^Yvy`xfll<;o@ z`D6JWr7J#~ikl#YzFA6K5J(>07rc|%$YGz{YCn-pSuQ-BU5z*%gOp6PU;yyK_?}S; ztbWT9!p&*ilx;?urn~!DPn`pQ0f0&1Af$>^i8-vW&;T*?i-0Y#Bte~WjvaSAXdB3S zGRIq*b@4#3xxMJv^>6$HvAO zfvKTfiPv1P7>$teZ-WA*!tK%g<%f?SH+aQ-uOu}zaE3=lDmi;Wahe(@()oCSAJoRP z>g;CYV&mgqx1a7WV^Lya_qB^A_a`wZM1M2zv1#EGVX2|zkF}Ge3#VF@OkaNZ(28Jk z9vd~#{_N*jwLjf7s!?EUFw62^Ux{9$bV~c~&CD$1kgw^1i3utcn&4R-;|vFtWp`&S zZH5~JTFNk7$y}y=mlZ=3;N!S;Y5#K@`WhVd z4^$|PA88l7PdtqGjKVKrJ3Wt?&FN4qYUpWZl2t`CBQWGX4J0TOmI3~g$)aUL7Qhpz zq|TYKXA!0PY_vg$WRWt^*9ZZTEEY=B47pXAO3FBM*q#{T%_*Y)JU2AF$MMZA!${RF zjhMTBY)%UmnlMI*UJq9`?jWP7YJIQ`$kJ;I6dN8K>e*1W zoshp~mz8&aXmJtC#o|ZeHsWCJhl3U&KpLV?xCz_821|1iM$#5DDGdHQ9#o8rq(<7; zcONGEU=&C$l~48E>&K~iz3pTpP$_b02%!^Hd9~|=RlfS94DGpi4MMDQ|Cw|A2!>N# z;l&%rB}q3|S4kfB@beX~CvMMtk^;H-aFNLulK&!!23Yc14Oq~Y*JP5CmbL<_g^I&L zjGN67mxXLLiaej5wM1Qr|sjb~yE}lc|-|p@HQt4$HB!8Vg*qK|b+AqjC_Pei^mi%24 z=;shwBiwKLY4!NF=jrK5I}$iE%{U>%Tnhj=^&@*{TO~Sp)dd>QOktiZHwk>f3f|cG_{V_(S}<#3Xvo%Rba;dS`fc36zDD&6q4{%P zfE;JQGiT3(-RTdIHi^cNOgoqOxx2gnPuj{B@lx3mRB5#yr?JgKkVonO<-jaHmcP5( z>rG=3-9VF@m{ok3<-W%nC3YTJLYutgp`gUn9!wq;?0C>rT=!09iw8n40buagGwJ|i z?L$b0v}GW+>^uF5>`;yROpDbvpUWL(!i6afpcS6bmZD0mMyULIIRd`G^x9=vz#$%9 zJqvFv5+TC5kkSnC&?>t>zc|zPUCnxx2!>wbKXrm%vg_tABt)i_G4F0hV5mw_>ST;H zDIW9QhMbT{{|Kxuh<&=$D^D?a&{gbToq6-0S9jRfN&P52C#Q9S z1U}s|8=H$=OzhcDCpZc?0JPr8$=y;4xqjN;e|l;V&W`Kbex$~UZvP*}p0UOEdZOsZ z5418+*In2x0tNdQP_Q3;xTTz%?<45}1^X*D9j!YwAfjWe)u@RwIs$2Q{XER+={EbH z$7m0>|Mu!k_O{ZJ6U5Gs3ONe z)2Eg|JKl>4KootAjg1$tQn)YGpygFh+sT`JY%2maXWBdnrya1v%dc_$S)NCM}^E+x)g^< zu%}EEOHA_pa*pqG2)1VT;cU5@V4sbl5EHh#+8c)hD7@Dojmcw`X~r~=IFiC7lekas zRAGP?3z(0{19P&LCT=yvx`+RiqT3O@JwU5QS+u_<8$pvWX&B&rs&>Pi+jo;qv9pG2 zpkX+|yKiTcg(R`D%Su%q8S;Im4+lAsY1)1^qKG_Lw!icIIroqM>2VJHn1+wC57_AP zYPIXjeH171yJR=NnCXwbJE_J_p3pAU$wI50H$(?qTwK`ovHE0Rw6#D$xF8U!-Frj_ zT%9b7C{$>SlJZ!e;o7FKB=FZ3_4V~-sjI7}X|YUq4h#&y=nV3kEx{4AM}NVfASae^ z-GYmh!I7054#jdNtC+FDW98f-Obcjobcoi5bLRtwfR}l+&vTpU*A@+}Bq7A9*w>0P@OU20!I7>nepwUKL(yeON*o#*g0s{=WLsWbxHy5wOI_mX_S~y> z+?kkGT^u2XA3|tJUDPx-EcYzsuF#V%Qz@s9ZhLh&8NtW27jdmSx<8Y2q`}3(l3|ua z;wRFr{093o27#lbPRT09qaX%!Fh$<%L;v$rHf`T8$Ff3JSiPO|9~xE)lo&RDXxJFk z=o%6b65htoBxHbFgp-f&Y9GwD9*#snIln6kKqUV0?jsOQ&go7@yTu|KOYwlpR;r6A zlW*53&fdD)g9fx9x?1y6PEIs3;TlJw76QI`=Fv`KM246F)uV8SyB*D z|K}{JKx&#!PJZ%VQ3n?LF^T<~_@2b9*7%)z%E;!UDsg{)IvKwBQQEq4{h*qmzRENt zqMFdr%?w?YBb9r5p}@s4N+5 zka5r~TRuy@+54}42Jhd+%#?sOt!XxC8lnL@Fx>K!@(u$t`R~so^6@z)&#LCO22swF zKrI~|P2CAY_D<#1emnrf;VzU;>~cX)wP-u&X5*@>C58kCmuBtDXRM0cP?Py$ImypW zzmh=9o2+bj@8R$&$3?Ra4d9h~ZW@XHjQ&?AdD`rzSL`n-6)~4-`>J_FIVj*m#4*pX zv7NuYlbhXdUS37zd}(-Se?)3N+c<@tK`W_yGjaR1jnMchyW{^?@DF;&M+D2|wxbj; z=lG_f!PERA@aZK8IpDz~rO|;hrDVot3vtUQvVYRJ?_6sos;YqwZBIZcu(l4b701Mo zlUd3CB;!5BpxyDKn4hU-=b2gdHjW9!ohX8gl3I~(hBwRU)^H%QbU1n<;=?&0uIA>8 z?o#hxgW2Qj-K@&kFa5=r?R0Ovpm8Ajy4hcjb6LODZ27Mb+o}B94l%~l4$A|t z^9?j%Cu4=A+}9=f=N|E^yxn7q(b2|+T|_Y_&gj~oHh|9DnxXDd0mWe1->YTzZISC4 z{&@WT_IKHiLbvL=rM(x%6;YkJ`Bg6`7ohyxR+9~X`tQ+W5wJ#iP@d2Qvd#1u^VCF* zJg28A=Prgf;9xM;-%|I9IBUFI&*oBzGgFkyvYt+x^9f>HteUr~kO@{(a+tItSX3Yc z$PM+`D6C{UZ6o8sW&ia|RWvb(I8bd|%X$sKkc=_1QfTK&2)bAiVPg6nvA3s!_5SX+ zy2jYn28~Wbph}n&H60Ez3M%S22Mu86FHv_$6l(gO%0H4AtqbaEY5mTh$%#dsd+y%Q z)nZ-YfK&ZrcLK-R<+e1FS^F*|CL#Vr{k4E$peu!R^ta(UtLGu^_wV1af=vAWs5k+% zUjYWHHV%%r#nYy`-T%Hx3`QA(D!sCz;-kTERhz+j%$|XF3n!G?flmCDot^!d8Y{Z} z{>~p597y-@8sueq3h?Tjc0+WWx1(a-4rx;$rC%*K33^M1ryv-IdUbty>F2#6L#eA> z-DDu=x$u41P!axp;RLk3ySx$~L+V4gr=+e?bZO!O#+U3|NEjE5Bc*oUV<#UKN!>uqfU23|8baOhY$TrUZ zK|Pu&^fQ$>M9`;_$ZF&n*CgQ9?Rl3BQIzi^oSF_sJ7t*Fs5BNq=-qn2R{esdJwYcB z+5ru8vEF2rY2xCBk&?z@yO66+M})*9Ce6p_r*_r+#8siRz0U~aqr*ZvJAdn~%LD`C zFGk9Ngzfv*rRG~wa3!L8wN zLL-ym$mdccqU^^B!~N|Ae~rOY2#g;9Rig=4FGegL=MeHgYxlcV&0fHjtl_0b$Vuq@ z<&9!T4?ptr3(54m=TpirsE>_JALMjK$rHSelM;xQFR5>1HNCi@tVvxTsw)u9VGZGtmV~2MtOLkE<>6C!l%O(Rpbu-0_J)z6}=2QO!ndH$yac z=#$1GPJvB&egWIE&^pVYHlfn`{x5R-yK{HFq^v2T1KY8pLy79MSY}gM1rC_Vo$_nnc$Xz!NkuoPq%w0LS|vu%Su|qX9V4ZTU-Y3w71q-!@r)FVqTgT6bNNm-JM*F zk{H&Rjzkl5ouOXC;FkbW`LN44Iw_Cyz9DMO} z=mk3o6o&)1Q??$RU|V_{bPOB)b?+!qFTf%qidb0CU;6C=t5aqC4^&Y1zo`Eee)ixJ-a(W~S_}v^0>D5|t zgKjB+8V=OquB*WOi~0qV^5u^fi`Yg~b5q8X!!Frr$STtP7mPUM09VQ41maLENa0ks zp0RB0`zl->!=_e;Zl_Rq_x-=ebJM3+SwFsXPg+UJOAFsF5k!c`CI3r3QW^5nR-{WT+`i8JAV2eeeA2ycf%`|n1OR~82 z?z`1n^bb&DI9l^y**>{!8K6}X$+?wEG*~#6AnL-7Ni;D!bK|2k8DjW_s4bsK#Y2~K zpydwl$n_5o6EB0w{=UBSTQIMPffRTMORCd?XWpyY{$y)1xPeXgkLz|%mVgrtFE4IL zlh-ahIFqn}@m1W5Lmfa)*0_(tXWas*l$AZ^S-DAK%jEP$lGK>~^IBJ1yuPs6@wHnB zHQJRefSFj{^9J8{Bb5H5#qH}Y=(uZhUujO3)Daq-?RMN>Z1Mu)&CWVEdGjVotDgor z*J%?aL91ldWd3VAq(;JNj_a_4m{;7Bz{8Mh_ZYEwZUB zY`IYzsfBl#NNw6?N4ZRPbk(eh$`TQ8=V3`kgp1KJ$Wvn34W%SoC%8Wa8-1dG9hyjA zeb?_XoLYqmS!XK61^75BFAqkwADek@J?x3N(Lmq0|3*zOg~6)ShU#2{gF#EzC-ky5 zxIyiGl^U;8V;^sCK`>JLc+k2UWvqmd;9x*gOrCPqo8P|IEH@|1thvG-KNSPsv7{6! zrE{%!fh8eerp52}LnszT`z}BM=Zw`3qhNzgz2yO*8YVW{-yEIF75zvc7x9FS?n-l{ zZGuMUJ#a*8CFnH(?93yAYK`dYapS77C+F9og=WkbXLo|O`4a50IW{1C)clT3Zdw@E zF9eI`0{8p@9*J9b;_-z;-XCL+8^s}De~WR$d<6~pjJRNx&OtWAdF|Xj6c5M~gDGH; zw3;zbv1f0cPmipLJO_XZg0=H30{ZiP41g=^__l}{F#$20u`@|kEP887>#1&1>XUdY zw5YOt{)+`nRnC)gIWa;C@`66Qt+MQtb*viERLO_gx9a(_$`us+9?G2gfwHaXI8yDK z*jTb~wHd+F1k##*$c5VqQ%nbWT3PA^V+B8cknM7OldZVm3;&01>+0lA0mxQ-Ik`aB zdiA83{x_SaF(X-6-cj$y=q$L&y5(RTKQNeP_Qo|etj5QS0X;o6RkqwL$Q)!)qhY9o ztux?qDT7l!ZJ_8+2|=sV{@aVHf=o-h3$&k!2XKM8Im(=n<5RA%-m! zqxo7~h$I&Fda7X(|IjasK>`^WnYH2hT5iyWVxKa28YNmDdj%Rao>2h|GC?f(H8aA0 zXvioSCmrTQPrO3J^$Pe31CEkZYayeJ&0w2M28Yr;GVW#X;vAR5VF!#_q*cfJniq?% zra_7SIXLbim?yf~0I>WRH~K#F&i>;}9Ow2tvC|5^N8;;sZ;3Yt#;w(d?>bnN%}}iB zC=|36BZx_B7_5)V&L^W5|3AL5M?uSNFRQb6SA(Nf0j)<}UM7C$g0ZIuGVM#CHUfs6`H!47D21LBFe64A_#aZjPKO=O8r6j=; z>&oQ#4KH#tizONMUbO`+4i-wHo2vXKU-MQl;+=oG9&E|D)X$ffmy$|#J|A4lpeqsx z)U7QLIoxKC&iU_ZzCe0AZp7QrRI*I{!p;cn;aT!r-r!BaYBp4G;6yksY{EMDrxN@& zI=$95e~J3^cf+bM1Jq(0`|JE9XgK%>%(*Mbqk8+n2@B5Z7{sEtC z$srmO>xYe_Q=P;#FBE!I4S5NydZO_le7dn-O89Cp+fvOoYW_=PIEWr`ggp`!9rzd}KECKAWkb&cs|Ni~^9r!H#Uy~N(ik92M--Isv z!DfuRjg(aIDrl#Hsnb7hqr-WR0UiCsGw+|FR8&U-NFz~8DU>1)D>>zYFg;0PD5I8I zoF=&1ZTDm7c!ar#=NQ;{vjS^n6Hi7tPWxYQ{l_`$1ckFe5c7aaLn=%J+?d71 zS{$c4(sec@31d$jfw7Bm^YgsPTb&Q6#!!i^T+vANmcV!Nfiu>VdI+y;jGj ztAgy2jVww7{mkDXA8V>CE7|v%8o+i@I~ZcBnvya%CH449{IOC1K)Mf6Rq`cI=I1v> z!t@u1XQC9{@Yy)ssE_VB$^MIKg#0Lgl!OBlDFXut1G3_|@t_;j^nBwVChTu&yXCt<|WC`#<20SwO%H z^lYosBBBB3x4j$xqW_yC25W3O9ts=+!UmX?4}0N%^9YV{_nz7-NowjI^{kEHGODbB ze#Glpfs{?Hsi~{8%Uih=Dad^y?HaErkrIQohp;o5j)ZO^Kd~7fkzuJh24JoX>+Fec z;v^RDl@`PR2c6s7iz?dblj%y_g)#nyBmM07S)hV}2N zb}#BD58jmSn?&5$bm&K3)LeYI%#?hM(qI`J?!P_V5ml*%P6kGLu{QCe38xEbVXES~ zIe#2x}n1wct@u1~VR z&*ixw2QvXF{FkLlNAV5-SHGPyeUM+K0V5?oRBxNi6eDRZ$MsEp$uQ#fmqM81TZk!o z`}Q}dasKrVU&N75eBcPThwmUpJtlqkTO5*U`_GgIiq(f`VUlP_BH~Eq=lQ<9Z>jJ) z;KZKjQpw+Y9W8{e#_iCJ5Q&u7ICQ&Uk$7;uMG7~Aw7jdyP+}muf;qc`k;GIR`AV~g zM?U$3ts)0DUe5HR@))UL$yBPR^#)T60>&DwCh$rh+PUfz`I#|FJVu5xMV z%*Oj4+VX3|A;3}u-mOPXL`C&}_xFFZ6!~i&^PqP0RUjPv7XsAGrEbsHu@$fYP~H)t zZ;pQDD;5j`OHB}E%2S({+-d)&%bE`?*q_aZD`z;pK!h9_8`t0iw^aC@W@nLIBI=kH zre=J+-ny{EUTov5n*vIF;{flCJ6ij*UP?*CNNBaWKtg)pUfm7e&nq(jd$=Bx!1jNv zI@u?=#pbbsiC%b=oR3Ji^fBEcucu;9&5u_0y07T6F%%g~)c=R3vjB@KTD$O>p@!~| z7L_igJ4FPf8ze*!X#}KUNRf~ZX+#{DreH?j^k~y=_-rru| zTJQdL=S&*DCGmxrt`&uC5;zqMx)G!3%U1NAfjDlDy8(1|_Hzr1>J|ET`1$t`NXr{x zL(rDQOHwtxR;Ngv6@R%$%ZXhEYc%}v1AwSg!hZRiRwH}KAZI@lr}NKf#@z_4R%Di_>7dyWHsv2i%w||#BL@suAl;j6wR`vn_O4PW^QF!hY>^<};feGq!?(D#YM4Mr8U)^%;nCx;D%v zd_U)4D{6m1&1V*kASO1rx~0O*Q6gZaXZsGXwS8Tkun9urXHFC7#lZFS^ol>}$>xvC zgU3??oEU8^4@aIOah_-&Dba~7-SrNoN59>%aoTKih#;hM-Bkpbrl~NQN9Qi310M*q z-`_PqyW9ztG2uvk5~WmBTO|AJqTPj=d=e!_(&87aVD-J7lk2{h23F>CC@wQoE!)?d zmDju}qA61WaYWp4^zs)e1#NKRqu3uB?BSJ_d^1XQKMHq+{|wYE$Um)EZyf9D>}ukN679i5AJwMk ziwiVFmzI$@`@^D^#zk8!*rgwrhwKv9Ak)dlwDyh4R>v_>G~-*^G%Y(DR(xdD3*}IN2@TXIr?Aou5B8P*AF|~`CIcMPCBeH^@xYEmY$UW>N zOg=YibIs$pWA1{DZR={8crQ*jCB@jql9Zi-J*i;$qshri_5xEc;mgN~8D9{#*+Xn` zjYk6wAYPSy>ObT=Z$P_1{5F4!AqFp$|M!{s^U=k5FErXeG^@LGq};?@^5XB^t(jB8 zue%pH*Gmpmm{F3kZb`N6T{9K8M9Xi13MPL95z-E2%|jt(IN;ITi>T?Hs=DkSrq`<# z)}=E9kIPe9s#ct%d`5Qw8W+0IG*$!|DuY#@A*D6x^!M$TVu>kI?+&9&z=U`_X&t5 z#X5wCO7-Koo#P)Rn1xh5iaHQ=zD^Ews*z?7dovw_7#Q`H$QMuNN|=Mx@7hGL5nbx& zj2buJosR+Yomd6Rtl6jC_2<>`&Ro6MK8rdv<*laPCi43bWGgTK{qWPrp=%~Oy8iww ze5kW%kkY6^KW%{3_EYL|*SLMX_qMo`StHStb3$Ex-L{Xvrk7uUA#TWe_?oyPN6}zd`%9*W!jYkWfhlw3 zucr9r?cu}L4+Ew72orBigQC|8TZ6AiwD?0YNgm8o4!1V%!MzXjPxqIC&#S70Grws@ z-_p={6lWN{+cF0?bl|`BWXjwffvvzZs-trV3h`nb`MW?0OnFBqLKI2@w$|&ysVJ_> zy;yR)>Cg8*nKrlQ>9SKWr46i& z;DtTQ$2XFZvKuS@3A!hb06XI??rj33GsLaQPBGcsbJ=YfWo_&4{fjD~`CrMuz&qq? z&*l8j?miF@m$1AJk8QSN#d1n!BAW z9r3kdChtS(%nld7iEFL)8)-(~Qk_&UQ{Dm3ruXu93BPnhTaq^IpBx+N0}kDzKm!>ox>E7Z#)m z!(x}=Lvo!r{+6y^w(zXfArq!kW4#%vmta`);_$PJhJ zB~jyb>%~TyfFSLYY@F3!(`?kh-RjjIj5XEZ#^yfh9GKcz=M)3Xd>F_`jc2*x38;vf zFY$ihCg4=z2tV1l$MC=cIg?Qi^S>y@{Shs5yc|0RVPc%6-V>!^NyL@#^n?1m~@y#0}ls`8qY{V9`fFemdQ|6qG+lHKxhIVtC@!LBwQYZ~~6!UekV4nJL zj#VU5ME&}zcBQX@g%Wb#oS|G8KZJkTd7$Vcg0q~rkedIO)IzhIU^S2~=(Rch_ggVU z@p71yv^=4qUdND2nwXnSmH<#TRoK-0Fn@n__yJHndnX@6s!f`y;du~)goj#j=|Pjb z7zfAWEZ|aqy)(;kOT@`E%Mb}Rkc(jaD}~9AWNZ8e1xro4e`fGFg13M3RFK2Av%&=i}n|N%)xJ&>g z{0L9B6R-ZIG;C1cywim5qgoj9;LgCUHeTXL{;{n_}HYLKhK(d@%M8#YRXol=+d` zJRu>OOT+uiUO+#(qT0V3cs+rPg@j>zQhM}Aqs8Tq{1A|2DdAp{A|j`*lZi4HfA1WZ zRkm=B+X~JjzI!WxU=Xe3zmgX@Sc@jln0YtN{0TOHJrYmDId}WJP&VmgprK@Av-Tp9 z^~vXKX@6s{{iTQQ_R|kqt!&vVp-zc-oLt5R^P&EJx0rp=HBHPj8-lU0FV3f9CC!%y zcfNl&*0txdtTmQn*bO@I5i6}V)>Jt+M4zM{>;J@EHYDmHU^-xCRVL4T8x+ZBx>$+% zH!$9mm)G6+d|}nE1df~-xl@2)#a6OAzo+7C0I$Lec`*N7D5bMaD2!drE-K*nCk18X z8VlO4=1IEX+bx~ld@Hir=`}3o*RaK>UN!Hb_%Qi{L$x?V083wVXbPplu24^9F zq?LAj8ym|8=GweRfPq8%;5nk}9Roga>GD4P)&`_Mko`*1J^?aIwDR2pu{*h@yt{Oa zj4gf}VvM9Hnw(c>u0G{L-TY==weyy^y zua%cCPwoZKiE1{|Hvn-@($7Y8h zQDlfjhFoonL9nT_fhQjeTjf5>_-7dN&>|S{fe*UMh$EUR_gfbpK6`mmkfvhQ%G?lb z)6R6www$s3WM)CfvpN(9q=GBUK!rhxL>N|;lkoA;bZ;^a1~`8``rd$_jWEQ#)F#x} z>VN}`O0a&}c=($)cZ7vcQh{S03s5UC)(5j{_=v5HdV#Z9kLaFkrvh%($Gi6m-0Aq+ zPBeGt#UC*Vj(c=9T^l2 z(6N7KTtA97^c67=5c&8iDkjDw=IiTER>yLJRP;PHvf=D|7_$=!y*FZhUoO236bWM{ubA1M&Dj4d`Bn7s z^0mJ~cc+Za)v|WsL%;lNdj(j)>QL6_^?^7Fri)0~Q-iRFP%e!mYn0lpcip>0ON9 zS!QM3_S$)Ggu_TLy7-4@!SNw#=usT-L-|`{V5d_*w3rZC@H^afZaHV=1&%7uqzY zp~4xRJC&#dL9A5rY?$FQ&(k6Ey<&}+^3n?JM_*$c9MI38OHRNtf-(leL4zNNSW^zd zz^F|`6@`TtCa*U{o_nA#V6lgUH9*4@x6lxCB#98DNJ#JX=x0+vvyZiqQd@r%^`z0g z>c#E4O)qS}_m`duYvLMZFh6A+zm4kYnhOk)%)b5_nq%xLVY-WsE|uTiM-S_Q{Lh=+ zlGNsouV1gPMYN0z?l!h81OT4R@R@+Y9o%0mj8@&`|9W-SU5=OTQ$kz6kF!c0Q{6^k zKhR4xWc=2B6ldx4lS-gB&6_n#v|xUJejgSHpp6R{7NEkLYR2-moi4pctCMqwgX3R6 z0J~H!N;SJN2s+Q3f{cttJP=}ic4oyWsHi>^7P1y{*ug}VFVVfLue1UJP*BbERrsc9 zOU?mR?`j}v*y)*Fz<9%)04>+9Q-}%HqEo9m9OsN{pu5-wpnjJ&6;*N z)rqxRzl{0Lq;uiG=Sc#?>s_6s0(jHO#0>Ry5G+qv^xk(yp6t7C7UeE$E(aV zN_>fX_&toHorpNHBK|WwWWO64D(<*5(Zb*iYcGF%y>&N-P-ct|%d{KiL|U{X!cBA? zo;PwjYGRplAzqb?`J>ItEZ*l+S7h3nUw9AeKRf`!%X>0ibTx=1XJXQ5y7$Z;^JO6D zx3qf15ZZoh3hY@uIQ~=(J8dLu!+AcOD@Ost99BNsnkEM-b`Tw@ECj=J$wA`I21Ds^ z*a0y!5`rVx!3RlhK0_ia3q$p>ub==J#Pv@S* z{#D&PTd(PtizuuWtd;BPmGg4Q1tY9dUXqae2@fCAmwX<MLuhl1h}NeX)0 z`e9*VSt=?jK5%5Wb^-|P9Q87bdhO*>Na{$r^?>JA@bROv^@H~_lk4#y;jMECjPlACO)XVnnnGeTxo5U6>1qo{_D`$>D73QsGH>@1s4ZsFb0e9d;9tE=2r6SeM z)B5`I7q-BQ!BG7&Yrv|jv#p(Z34nFd)}(hr7eOQ5(+MD!EWxV9Sl67_LI%d-O9uz; z&own1scF3i2bHCzeY+$1kMJSDbwl9d%6WT>0fGuCBjdY+1K{%W+~HPJQQ5#+OlPwM zFY+T56}%7m&eqo^-`rnjxl!?&_85IGz4>LXnyzmL5^?F5+y0HK(GO|`+R2aJL^hCI z0m61Q$WBpEQ!m#}`jv_LHk-wlcQg8`L9!=5h-J3al$GmI9poBc^f;4A5SSHrSXeMy zdh8I?yrzh_4u2KYtaN29v||8pkj4oqDTPkunU|f(bFP0c>&iiaewC0nZU>kwSyale zUw1ksRkmETDD7?MB zOMy2lhaw4F#2a8OH^d4!4sYMSl>=2FHbe(tpKOH%1>1{vz;nP@N~4L&AZS5L1Nio;#x%f@`QVy3PA z>UT?_tcptHm}{1HAZ1XhnNRPz|M|h{tU=*?z&svoUC4VmMudclDjc)|?%ut7_7HV^ zA0(dJvJ3Vrha?XPd_b@4HF!abi;EXkcG8=h@Sn_G-vyl!UB`u%xvW#A2cXG7c^eb( zL<#GCclpnY_^uF8T=S7$ol4v82M7Qw8-0hr$4yN;%<0nHtjBk>>y`B+{39k^tsOJ$uqL?Bsy5B%-C zINrQ>b16Y1`0}nn*|_nYJ9k2ao#zSOh_nI2+k4>V-ZrjyZTkHAN_OM9pV+A9cK@q} z%vUP38j`xErnA1FqE8dDrz$Ni)zs30#VcdxX(GTQUO6-_j^w7>m)!RcXvVwqp(#m8 zV_HOFSja=nj;^kYQ6a@iTLG&(aBBCFfevx0X2zLJu?El)E@v-qX#5{ z>?@nsj#_Xr;W>1|;EHk^e?b5M%*&jV6yamA2UB|Xj0KWqCi&?w{drYCOx|)|m%#S= z;<%{^vbMHP6LzGP!6>kL1R!^1U>?cU>h~WbcAbdhSv= z3fxF#foFekzP$XU6vnEOIoJz=ObTXZ*#@39>O~nK405938I-4}# zKK=|u5Klnil!;GCS*w-y255w=v^2oo`uOezGWPdE%;=N3W4@h+dUYJH?|=u8+R@Pg zK>%@tufn08BfVXI$xMMKhX@+52{Ehe1|=QFd$qONjRdaqqK_Zz^~_9*5La4o5Fn24 zU;R=&k1V8NCRSI@h5If+d*M)zx4^?*jQ!u>W{eKz|OLwXzlZhi|oRVJ~7qfqLu| z!o=%OFo#LoMDW6vl#myJ-R}l)T3?V@=&-{;7Rf$|4N3QWvchEjX6UO<=KcUSC6bh%=<{K8*xsHc+i%;@~U;F~bXeeF|n8z@9#@&@W>kzjdqR zK>o8w&%6m}PO@h|dPiU47N8*a4D^TZfTf~bp9{Ram_f3j3?cxfVTyIuZguCgpx)<8 z^Diqcmk1lKz##p51Xq0YC?A+SMmdtFQFk29RPq$rS`_gGg$Ag7?xjjgWB7yglV|nAkX%1o!^l($UwhS z2AOU>0NU#WVQ4+b1q9^)$8X=CNCpD|tCHhQ)o?4q1Vsro!0ziw#E|C~%4f>8pjCcHav7=@;7($4|0>J?IkZ^w-(yMZe~#R=SO@S>h1@Jk(gW zvTJwUXzT=V**az88?2}Bvn8?jVs3?uvbKhXH1mFkPr&6|-ya*(g=C*UzYAcqp%^$s zTN%K(x;v^qdATi)-X#J9!-G>u_{%#`Lo4KuwAl)R9Rz)QdwZ2}1!#lW)PN%H$Fu4- zo0$L^Dqw-&kaCYSlv$S9h2_*5J4wCEbD+YXaa4dG*MTU8&L*CzLoFZ z@C?C9D_1uDY#?38f@Wa}|4|I>I0tZxe{b?WtOA}ONz~agH0%TbmXp^F8bo36*|g3W zy_SU5GByja!5J;lDJq5j^ImBwXD#vdG*R}no9kMy(oW0_=osC zt_uiTjTRyhN0Ta^3~_)DJ!*Tf&i{Omd26od`-Oj=dO_}@--6OpE3hboNd-){QQ!u( z+McNmFnp@}-M_!5$Cm71y&MfD-j~-_AP|_cwzeid^b!xejwNS4Il$cDTs4GW1I%n4 z=|c7p1X8I06Hm&9tc^ZPYGGE@-GAOy`PP#U>ozuP$W8Jn2+ z@a-Ed*rD;$5P%(j)wBZ?xBJ+}|CJ}TvT>juWX_(f^7z_bpEJ4TByqSffD!OW!xUNM zY;D=qvn6rC6i`*g-vp?`qArV&neVnx4h2#xU#V7ARkcyjaYoSZ`goH5+!Jz{OT0Jq z2-ooQ^T#@IGLW+90S@x!T9T2G6~|f?--7DYT|-QHE1B3`CsutqkXEo6&s#WD0lI8d zxzZ?pIpmWksCUPoV!qDS|3lsqusM5z(rB*2SHNC)HRpi3pmRXYp!|2GDfyM~+Ul&4 zuNvsVP=dDFk>J*B&z3q#s|5=c&^+34UMdpK;$7K0d_>(WTRY|G3tLV;s7M(MkCHmK z{QUfGYa5%LY{8dgV0MfFb;08G=|UZx1Y9kEDgN%NcB2tV9{vnhvTB z0f4EfML|jV_!pQPK$b5Upf`Dgf&zTuz`|t;k;Cp{*kbq+wB^iP6VDoBE%GAvK9$4I znuDQTp@YgwOu?>$(=W}QIej_QM=1^Dw2{*O7h_@pXM2`8EBDygBq))fasjp0gc0Rp z|8eEhMtv*@6q4?$*?@m;0RBw{wcb-Bym$SFf>4D6y!;=*jBz;Q30k-(wu0%^AX7a{ zM@}9BE<6C(;(u6W53+LNK|!E|c!_iWAY6?#M2)qqhI@FD12XuK+WUOt z!YZmvdpLAaD&UpswOPQqH7Hw@3$#Jmnh$!R>^wZH6%YWbq^EdC2qZmH zF;CM}0eUhSlp#)+(}>I|P)!xCM>{2;0kddFxo^0ur^$WV7fpn_KVbjwWxy0u&+`W_ zpFR8Fvpe7H4lbAnMbO2^4g(t{C8dyb!qlXW)DBrfj!Zzpp+0wuh>UzSxS1pAeZU6@ zLFhk{aL}sVy6B>FR>r;Ev@-Wr5<1?kX*_pkO45D`I#Nr(H`ruVYpi8t^e-9)A;D~t z3qZa}+JkndFF$8xpetLqDg!bh^8-)+!P6OSGj-e>j6!^B>YK-jtbag(-4Tq152}dU zR8h@R2J#%%F9y=X(4ZM<2uQ||`+RF4n(|HOj=_sp@4wnT0BU9X6Gq4b6zuNc%mB{7 z6iM-N)Jy0qEDfKTR~AM1<0%OVy8t(0W?oZYFFIOjE^`5}lv33|OxzXyJXd9j;TLnU?y}lP`9fuhHP{D`u?dek zj$8aM{Yv%z{MpmFNgvesl#eo z2=@zM)hSea`8RIZx{2T$-EyRSo&_L5ywi}mPJ$Mblh$_wPcsu=PE}c^NqRrn74}M` zZfh>W6jVexQG%z?E*n-4%^t%7`wdXHb_S%b=)SowcMXKiU2jkWkb!ccMoz#Z3gbWl z98`ASGpi9Wc3643evKWV2$ZI;KVo{-e!wQArJ#wx_^%qWsDaJuf)D?HX(Si=pIQRJ zu>M~yxg^nt92SK!7jeJ0@%;DeqPJmJy%N2E=yCO~-ko}U`*C*Nad%6f{l>|E#FFXN z>!XW@tvD&|OzxdoDV{4r=+({uuf`^TXoN$dByT&PwVxlZ>w#%rK93}o&%Eo`pSh~C zVnjHO1b|+vbCMurIrK1O0ePPxkkRzgR1WbEKX(9#pkF=z4hN0c3NC^Au!)I`>@!&# zW%ny>RxYmoH90f4H+8Zah&;&U-&vqR@1x|x3cg4&J_iBbPezASwGexOE`s?17uTlt zqJLxE>YNr&yz^Hc^P1N4#0Pb+1}4cYb?Y}~-`9-d1ZUjd+7%c(O-LEnls;%9OKpth zG5M+tVzzmGese9?+bFG@nyzyFvkW>e^tPhM#TW;`Ji7zgWFTGSk@k}4{E!FOLwlG3 zdX{NyEd}7&U+;*R<`tHgmvrfKHg0bJavN41ia!|5Ed4B2N8?wuF{(HhXwWDt5BMU>m zmZ{0x6NYak+~tHt(k4*{pDGG|us&HVK+tRTzT9P;O@S7+Y^u?ZB9C6m?lQJr-HW;7 z^hx%yRZU`p4r{uKlNAub)vMExO~3cVlC&-Ew#eznA?URWN~8NT39s1s`{hjDq9uoIvZaMF|vw?P=ovb&@iGm zhoUrl{x?BGrp%0B%xJ$3)>2ovw`@7!uq6D+(h-w8U^zZwhH;FF;} z9R6u2uS~dgA6re~`lnEJa$UffZI~cZyf_CcmcHV|UJ*wUq>DjrN-b^37ppB7Do9h_ zB2b9|nXvGawW>eMMAMywe<90ya>7)?nxVSkOEWQa_4+ztJM9A&oGl;3n>^mQixS_< z^(0;#6T?o5w7k>q#WE7yyG&3|sqpJe7dPhK%XepB^ArIVS*YzqhlPfRD*38X!CxEG zPiu*u!%Rvhwe#c$_&*8Poz1rvBwDtk$`UGCo3?emScwd|{kOu1Vi;ZO9HvQl|#BSLTZam@X@o`o95w*Q2zi zDuEAkt@mJE`$40bxl(xG%EI%Ar`V8T^|MYMEDL2;m!s9j(M?^YIab z#<4sYBA@{LT?r0EY39%=lw1#iGmBQ82BJ?_nEij>5rV6kn?}9C2@IxQdqNq|RQ37t zd+g+sSVqaGLD-|rjbz_8)3W2^<>t1XH-cSYvoK=hrh;*++f(aU93RD=1^;(h0tZ;; zrDE~_(YEfb{!iNyDf3ys-Fuc6P|BQ7d7G&fUN%p#->*u-csE?@Idafe7CfueKCpGr z8{OM;i4EB+ag#m4rb2=?f|68+#epb%Qg#O1LMPZVl7$=`+T9)())j6mL!>egJCUIU z|0V=kQSZnNjw(_@^9Muz?nErwer0#!9>nQ4KmFQ2a#4Au9h%^|y|P={t*YEHGUDog5X z;vIBoC?@E(4M|^?_nNshnC{#~e^Uv{w6XRMSWn}a5#Qi*z4}pDFBU7Re)ohA17}{k zdr)m$y!ilX`&^PH;+%bWcC({=)``b2^(SAWKPEHkd`0+eWs{;$J3~^3MP|V8n19m76vxb)f!yFKHB5 zr1)7lIq`rPfZhLDG!P{@QEn6hs_xNS=iWcT0ZX6Q_aecciDz`?H^XnjkWo#vWCjBgp$F& zM?jYF+aDC4+1hiudMw=5J6m}qN#wqx?2nEuSAan&JS@4GRd2e_=Gz%Qat{FMeHG~3 zLSc(4C=xu)SL4!W$z~!SR88*t6goW|On=PTvg1L@5gwN$C+qZG$>erDq1@CLE(;^V z=q~!HNYtMUw$w+f!saSXoL`%ABV&Cqa{MLm2hw;UfL4rYCm>KjxoG8WMZza5qPAI-= ztCU z(M!P!M^#1l`$_2~07{fLXQC|iH{f6+ph3BL;7b~zEkj9Cv}yIc&lh8NugqVLr5=jQ=Htu9#mN;Z-~Tix zsDRSo!X}C#++6BRi~}=@*u%D3KH(!Nqy+K1t4%JP=sLO3veT#C1MdZYtYZVESx4f$ z(lep;tQ&uL*C%(-wKApbS@T^}9SmV*#9=%+|Fu4RdFLA09?GmjiU$j2=C9VbRa5e- zevx7DzMpEk!q;G`PRuQA>BuPZT=i6lxEXD_QYS#yeAQEjOc?_`@NIk>4^7e!Fj2##2H`KcTtCd&mhWu2Qv-!;eoIrj|Xnt4OE#wh*;jPhy&!k*h*?y(=z$7Ms#OPs(_0Qc`#85 zdDXNE1W^Y%c}|LN6=vm>+QjONfi9J6yt9R3>+_CBS#5<`yJcPKYcdh#CUx&npi@*_ zOcRyDbNa!k43(P{Y)NAlq+C!S`?%NDi3LV7DW8uKPFSQ=8;<#BosF8tQ4gH;jJ0SPJ+3 z_Y0j0&p+POAZJTaXOpd{RnJSM_bjs0#y?ROq}X@a6!zP3EYeIQi`bze+mf z4ro@?^m&TV#AdC*qMiA?u zr8b65$6idF<%mi!Q9(-aE>ivDGr23f#uA*GYDnk*3$$j_xt{jn;Ja;|`oC29n7Ehq z$jiB3d+K3JN<8^WIkm9+{7+Q%ju}#W&euM?a!*8`Av#@}Z@dbOKS zJMf>zSHw*=!pn&o(l7TI!Jdr(v@t?S9xH@OeRHNRM;*9zsOP-%ocHd|ALVzRm*fUt z0hr#}mp;3PhlhHmRlrzS1bXwOKxcmiL^;q3EGa4309h8{vs0gD>1Q|RS4zC*j*N;@ z0F4fADtwyoplJss(Ass4YYd9D>VN(Ki(y)lAwS2Dy76G}&y^mm)Pn$1K39!8nA-d) z1@Yno^PTl2btvE$3^vQK$+R;onrW}Z5--aVzX+(?t^q0mO%a?5l*UAd{&RefcJlHB zm{I$1MQSctT)E-$Nb&AwGJ`ls7|(P<@52|B5V~<=-CHrk>4f!`4;D+cVjo!X2vU)M zDaW#z@D={4Mci;}&vXfHqv41h$*j51hm?4Fb}S)be%ku$pvkFY{?3ee$54DAzb|R~ z*25+#vxw1AZ2|N58ACO;S?^at_qgWILBoSgX)pLBukJj6m!t3-;l@wZN$vjP_j2FP zHsyX5@Id4V4(yKjL*jyH1AZeS!SpIjLlOl2r{Q8}<4Q{ZuE3+=&sw5LqGL{prTaQ&D zrTj$QuZ%QdAtJ345*2|hi0vsYJ4Y%!p4vYj)uWd6C`GmW$=OPUL`!}xmYYT4C6dYuOV3a=+3XpVXx)f4CQ3p57ro9J$+AYb( zKMU;CZ`v$ce63kn3H?mcD~*DW(GAv1f!FV_z&bFi&CYafnqJVelx*_soKAM*syc#Q zQ~qKIlb;+`YrJj11Wt{0Iyy_cFRO@2!azvCG)2F}48#1%Q@s>NQi<{42mfFL3S64o ztgMBDfbp@=3CMa;Tn1;p*0TeXjVyP5c;a(QNSJ&BRFJyRfyoO`SE&W6qBh4G?pBHu z8~L`4CnU9-c<11#G$C#{>4x9>zER-g&fiREI&c!ln>y_1_N1PjsTym1Afe2*1Zq6* z8L12myz%nicXq6wKr|63Ln@_7hs64uoIEMtqJP@;gBEnsy9@-%1^(F$@E zz2i!7W<;jM#^@QWY$50E+3yQw1J2~)?DLzOs|HG2Liy4V8rA?s} zN_dgrlUXfs2S^X_F*V#We=(`m1PB3bPgER4U-uO0-Fg!9D95>Sp0h}_SP}-&j0|Pp z+GRSVS{{BIaOU;Po&Bp+rMBAAqs5`Y)Z3gY|Ll6?^W%d?>EDzkfIUuFYWWIV4vX*W z?Ls8zpC^;eHc=2|=@Te;kO-IGOOr@ldge_S-ra3^G4`^l{8`4pTIQ|+=eDEAJ#gZ| ztEAM_%dL4}5=pX5`>ia*r7Cx&4F6b|H1QV8WgoHkI;`>A$>yV7U$@IigIDE3LL{}3 z!OUN7T}UNIdv@Pj@^G4-U%Xv)E1IO%AqwV7=Ds<`fWF{i0w$bP(4dU1O1{|0$Zv~LBaaZ4AZ^;XzTeH{Y~qqj!u9GT7YkRu@+)g* z^R4hVzD9!>RW5kx3VC0=eONzPJ+;7FoX5^Ne8sHXB z*cPN{R+mOvx(*oP8**1^;lUT{W>k{?mC13eCQJeN3HxXf>2v4$aW;)C44=~~dFW|= z&q8g@<>rCPjUv63jg?q8v$ zr9vXl?|tyR+*prrko_xKgW*)PXb`z#iARNN^>MVxpL0CzKJwi7g=r}P_GX%+W2JqR z!Ki&zQ7(15=SF8)4E?@&i{CBi2F_dbVi9x`2ZP3$KrsFLJ$R|in~VZY66tfuv>Ff< z#H%6DA2^-9sMMfA$#YXJ&vfGdozG`8EW_=v3#szP7i4-sF@PD#dSFxl%V_jKuoGT^6`HN3WOD~aUDN%*?kCo>mX#B7q`;K9yFJ(^tRFOD*oX+ zVPjS?5>1mH*YkCo;_xF~C2aF0x65i|cmf)e3^pf&CmS*mCbKdWPnb&H#&j>Y(J!19 z;?OD2Ly#({R`8otSa3w8{P|N~Ubd9lJ_z&dzjOjA@07O#Sy8Rk|9lt%C0+t=qzRDi zXh7?+6Xc^P4=>Cs6i_W!;f^?ZPs`2n{xhfTmmiN+!DYJ{GAlzY0r6|{f{NTCeQO?tsA>gZU5Q-~ z^5AqG^{D4caP<{qkGBXMUrpZk(knsn<$kNi%L1s#H)T6f~aL=LH zPV!typl(-Hf?7KmvpqE-N1d^UKl zw_@`Qez6|wy2i2IRW0=1mvrJ@RH(<}{l_+nQLSafW|)@mRmno;&2X62xOLumhH7vr zJ-x{3$#WGxZ{h^ao-po5+{nnwc|&j1C+^LWe4Lr)vk&f_J9DK8r!5a7i|?_}clr|e zaINur5e5&lZyA=g@l_zYgjk$g2W-MB@5>%1L(=*!sh5ht+3FUeoj%>@xr;6G;kS;UiYLAG=SZMJ({|uOD%$%H&+hZk(DZau$ zqXZ5|=1^u)(X`Z&ZVuez*2&XIY?mBwXeUW~QRF^r-Q|HGk0`^K<>F3m{m%=)&W;ErSv#fqjj_k%r~McMx+Q3?CL0rMqVibciC|&-;Pk8h9o?wUX0(y@E&xV@m&!+H`&a~ zOdQ=eM4AwZ7Jhgvt=s<3N}2S&vY7kA&7=?BbHiozWQm(w<1dc`?@IZ)8_d;PI_Q2c zxP$xhMB)9{z)P%h#4rDHW-;x}z!x49nZd;8i z`W9Zd`A(m~;SANd3tWU;yC)Z31=?b_+1Or4)B!K_L9rU^Z$>YnrsYZVq%k|m+gT@u z#FYK|xuqd;9vf$@W9c(iwp+zA+;0nj6%pi6aO4q{pPT*K?nS)}esu^F)P@}*RN|ZM z^g@O*RQHzCdE&}$FKVl{oo7Dfx`RFZW$`oYl}jq!V)g;Vf98ML9_mV^iD0IP;D076 zmoY&QDv#aH0`uwSulMSWw5%pDR(iXC-9iOHFrl_=yx(idSAjg7@^wU6d-ee^q70tl z`7svuda(-v#}rJ*{`S4Z;NVL^`;OogmujtO{23-shj2 z1M5?l*zOTh*)c!=$xrK8JQ}w6XGF*E8#?1vYr+@A$ReN4n_QF0Ze1SZ&>zogm%3sy zY)yP{JJ(fQ{^o|iqdBiP9}<#~$oNJ890`l;FsI}n9=bS5i@XIGD24^kx96p12nw1hj_{!@mSGUCH=i;Te8!TR@5dA0&*wBi<1gZ9{-{80ikbW%c-iCH0 z&l`8#^e`nkAsk}*uAVn<&`vQn{yjMx=_;cOTRPF2P=!*&Yez-fNmfK{Elb2h`Ki!$ zng>XW;Se~#;&Y844!q!q`#}*Q7ULNDe`D@O=|q~Z3m1uGE9r~64;Ro5dR{+$Ih>J*?+ zUU0$g_C0^F+C0?`L_QwCC|vfRL;tSVAC)O=D7E*!^W6k9#8Tdp-%u;>KC?zcaHI)A z`<`XK_wgOlPnHMy#HFBC2`QWWB6{#kYiweJgmIpJWaMc(LJ>%2`@e>8{w~T9qw~r$ zz@0Fz%GbOyn=RtZn8IiN$#}J$^XP5#jutUe;c-zzLxYQf;lI<+vg8WQ=Z`rYGs)WA z{reuzhcOAe*@xFgSq$HgY;ew5$f5l7d{>=gZv!Ukwa5<%8k36dJ*)0sCPtSPErej* z?x?i$Rq>#U2xW2K(Tqx`C4EP~O90H1Fj8ja=MP)6eU3IbAXo^q7Jo1%W;Jm-DP`}o zYqWRDT#>JdsiZ*w(BIoWbXF!3&tI}RGNGAS?xY_&RkmBi0c?_~2LRQGUxb4*OqXL1 z>x2Ph|D++ImF`R5&!6Rf;8?ZO*=>%<@E$ZcWVjT#YUdrJ-oDfJa4?C{=lL;QVkHq8 z9=5d9`C!U{Tl}@{JMz|5tAT&d9&ZTLND>tSK{Z!HeItbTsra82XKL4#9_M=38tf!^ zeEjX9WeQiY*_?^MYw59K4rCW699-)cAu51MGz6eu z#K6)FA%SsL+dK)}*s{tF2(q_(zxF3c5Mj2wqtnY!`h9jT`*%2()nL(Fz0bwo58a*G z@ltpa^6EG_)#Zs!RO*6HS^HOA{g=7Tt^>EDL|iA?0--kWBQ0vC?`lY&f1HG=m*~DL zF~3ONlSR%axU@8P)syi`D$6M@KNCihSchx4~Sg9d!-y%gt5x^;+un9~KBySwPHef98T(xwz|ID;OKdfxh&XWJ_NI^d3k_9YsC}}Z> zQOaf2PKaQF%FJ3k;+@a$-A#8{g$LL1oknN?CTny=-;87fZlnZRg^cH{uGtMpijvkS z?gg+^0S7q_pn|)IFtl~+bjHg-AknIfE{-^1x` zs};pEO~IMeJaC|jnaTYh&ge0Qbs2*S6JRRJo5+@(b!4C#!^A58r&bmZ0$0Oh{3{7|p)!BYA33ordek6A`UnWbz(ecMEQ5oZ= zG;EwGOMcz5Cuvm?`Qk9Pg?N%zpDI+dS`U{DbAPzT|lieRk$GulHBn z!=db1nrhXIVH%JAY<)=(yD~vyFFa}-yDT|uTuG~>`JbMCoHCB9GMlchZr(Q~;+P2} z6%Wp{ju7GxdyDGs{3cp@Ps2c+&Mc~ocp9@7`#@irybO! zT?VkKRG&5O8TM!fiLdH`s|2AyfJ@dcIV$4^Z`~7QL>Pc`-KKKIctIyQC#P}=zOeF2 zjE9|F^Z$rC3#h8QZtEYqL!<;mQc6nc1_>pkLnOsOknTPpAQDodNQZPwcY}(AN_UFV zAr0qzi}$_veq;DN1`G!LWAC-sn)5dydPySsaz25-JKY4|cY*E41<=>5{WbHVC)3r@ ziD4+~Qby>0Sl=14t!CW5C@)Cc*1r((c1>UZVVcdv>kguQ4?h>IXq( znc(}JZC_N&mm*}EDW0f&%JrK-j2PO1g_V$nqplN01@I5d22x3gk=c z8Adpka}x7*VH0;U-GA1zbQN-N7BABM9P)GuJ_TtB3S}AKSDW-q+zuCv`_Y8<2ML~- z>z|k@D`2}e;i;7vNRA5bFbNBf)VF43b(}~G3sbGEtaz+=f$^q*h=?c_o|?xG4ZaBw zi}kf;dg*F%HoGcKHiVc_F|Z*gIy$TyBGo?dWc)Ay!FaZUm0U;}MY9i$OMQjr=DgN}^I|=HSV1S8lO7mXh0(&b(%NyNkBh-W8Bcb75 zh~9un%8M1~xfJ3v5BzMqY`nuF1NlfrIsl*qyG?2@_^~H4rZ1PCPVyJ>ffuQXcb=2_ zqfR)uR2HCZ&%Jee!g&?&YF(>8@2Q(+;#s7VI(83Jd9Plm$A@En_ip9fB$6#Ga^?4< zl0~22LF*$tf{snCFzBo<#;TXs;{qT#XxX`btN>|Hf^89oD0xIMREgJ}z@s35i5Ux) z8m(aS=n!UZbucF&V>|7j+`#SAK~A2tpr6@EE_w5YY!%Zfu(a_+&|JBJC-N5#jd~xz zF}~@|p_%sGwp<+wrQ-bj@y=K&1iS|Xz}j?5(=|1Xf~MEYsTvYkMXk1!SEHa6{TqJn z%h8lcxsi!Uin&YO9dumo>`v>;q0csdNT{t}MP&?iSXX5=Oa|{Idz;i7M`-^nHG6vP zdx@4a3OB3KL;h$hRZH9HYU~w}e;e1{ij-tClM={3eaicmK{}-G>4^1M!JMBYQVU6e z$<>=v`f2UOjEoyL(X72p)|3I}8{_c16^_)sV|}Og zUPXP|^VyGe88S{#uCGBlo#|xaQzSG*xjyvmb`bH49XY-CcXJa4i8u@z5D0VMT^vfn zkTrX$DH#6<_kGqG*t;R}(kL6VPQq<7BrC|&`WH84X6B*2!|e$zQ>##ATe;P(i=CY? z?6Scp9l?2DwzkpH)Rbv$`LS4+gkq!b%EXNSm^wN-ohm+2J~iZa5r^1gM}nyN@V>YNsv;aa!P!6V>0N~2LfcE{crj^%g%&^AMQ~FL2`zK84?oIg2;m+ ziR;6y0>~}q+vK;t^!z^y6%QwkV?xVOFour>~v)_z?~fHDO4w z(y(g5hEYZ_udBwd+=)A@M=BD6BropV?_6sdjOY0JeL4Q)9hZT#iGfwA^YX`Vd|k^u zlt^bCLAs%uNqfUhi z$sA4Ez%FB;zSN| zN`s7Qdm6Egc^6x-R<^ovM4$P!ob!Gj{az7G!YV1u5`ehJh>p2<^;BU z&Cr1m%QFWt-A{0%g&OVD6PrzOulun&on~MzC$VbzV%Pm^*54TS%L+1o@EIeLD3-3DUDs*+3X3Z?j%<|Q) ze|7$W*4YG_LGV`yE7gpO2!=* z575TS5OGjt&kI1~*kuPXC4^`E`l#*PO#QB$HSJ=ZLFQ37(OW)@$LaFfe?xF09x06S z%H*8vccxMjpvjXsbPhwS9vKg|nI^N#vQ(HCEi_zoFQqBLoQ`#Y-)^NybaOu+aoos= z-YnhT9_b__q$3GIS`%JbprpVxVxl5qy7Gwp3ZESND0L#jR?RcAFn*+NS3b4%N6MGj&zc%dqiG7hMh7aG0F+-V1#4ufm5+`psDsz!I~6%J&No&7c1$M$Ur zw+0;ceyK*cN@ks6K!3f?^)CelGj)Yb-~0F9SbbZZ%;)Ug zMcYmtzLyOs-2>D03RG!P-0W{}$eP8zd-tj3>cyp%{<#-Sby`PORd|ic5gz-;&K%3o z*%<_5x#lSd#&cnD+HZXS&Bg4`7jag!zn!d^8BD$n5GKH#S-Et!$YFbuhQ#i)h=w z|H@HzF>DQwjq~O_{Dx=?eo=`)eBhfoIXu&R_^}CJs~aPnrL86O^rs;L@yejZLuE>% z#2`K;g@HDzM|le7)7)%q*v|Fmr75IJ+QUP54OQr%@t3DrJfdc-!5j0N8PDE5h=1|K z($exCByGBSdU_Utrs_RdD+5-FnqYg-2D8s}dRiLl7IG*r?V~Ii!ez1RjW{?$ESh3_ zOT9WM0@O~E*SX)Il75c8)9F~^+ee6H*F4~Gpg)SSQA}sVj|r0l2dlE<-tFSMtkR7MM`Kr7%ryjmTG;b*GK+i%IC{ z_6m#k{ydQFehjgiAJs!EjvQdBCl+ALwD?j9OKwW!P$%{GBwb>$0RlN-^I`1ick`hV z!+-}}WQdE<$c`%`WTcA@Yjsl-{)ioghu1KW6@h_YO3Dl?;1gQ6XI*|d?b=N_OK93z z`F z-Su<-?cXeu-?B^`dXxWN9;Xc{^OLC=5do-{W8V+w&3~pfaw#{uwFlMZ2pGi}rohX8 zNtFd0i$7EhRA8et+2&7$>&%acCcZBD5W?&k4~FmTzrq+tl#^{?k@S+Rdi%W$(B)3} zRDkMXTrFtjN>Fv4&-2B{Rv3S2V7=~|D1P9y*N%6iDy-ZzA^iO;4P)AZ{e(Gn3OB|m z{r5fX`*-xOPX)8cabtH1lnWxY3La1p}#br zg4~qe8tW$2CBt)kbQ3>`O*2C>cS|xVFA-Svdi7Lf?jZc?AraN0n4@S{WM@J4L0~RH6e*MI&Wi zPY;ghZxddhoVd$&eL5yUT|JVO0f7MP>b}~U6Ibae+_G!*v|+Voo{Wf{_g8lvfXStf zGSjo233w6Tw0}ooq$u@SXBV472YE`tbj0A?pqBc2^0$L)lmKdYd54yGyv`}x3FKZn z2zf*zD1nl|rq3fpOALvZh0r9RCUKqfJ4*EhKu+QN(a#=Il8;Z(e&?e+pAGU_LqXPb zy!xel{zHx7d1L!tQ_&Y$R#q&!e(Si8A2$xF0}dyi@4b)F@bhby0zHAgq2a1K8tnG5 z2?;rC6P0<7VaZENqvwVYzoJYl4o!Y;saqREe3Peecj==V&-{-`0qFY|*cK?GbQ!hxxc(ar{TH1B$VpBMVwZ?Z8iN4+sM$6 z$wQKAn$tKI6H4k+LS)bPehV&ymV-R<}AlzBmp+wWa{zi9M&*JDArp9%^J zS|%pMQOZ_^pM2TSHFjC#Y?SkFXy$sX?!30>{Yo({kkP%o9d4T=>bUkLI*gd8BED5? z{=*@?=m8pmuvCaOTqZ-Hjn2#=bUEPqa{43l=nuW>Roju2E)84!e62j_^*9y1L05lL z776@7d;|%`q>6Mn&8%@Tw|#9=JYA+i5ieq=o5uVP#=VKB@4(3U1%dBqW&ohZGs+LY z)(@N=YFx_CU&{zFnWdl17(7MKIt88n@^LC?A|12+XMw-Vbw!MwJ%o+pc^r7k&#Ge* zub!|KrH^74DnHaH!>&(hYE7N9UeSSw)L@V!XnV{&u#r3C{a`_);J!-eE2+RV%rs?rs zM3k8S2CbP{6FDXZNlyAN2f36X#q zK1vxYP_B*idrH~Kl-;8W$A0^l7sn)3c2`4?ZH^|@3G?u_GUrp%j0Aiobo1Z@XHyUTmPWC6gPnfZ?&OuzHOI?KLb~C-O-$HMvm- z9w`#nVbJP9NP4CoHx{V4EXXkA3iPrTd|u%^?ShXqZB;?YQv$zPlhMHsl^a*Wv-A*- zJM;3NLF&H;7R%!*A(!&t+2c9G^w=mn2MPumA1q0}AD(W{KmIkhNv)X;Lhmc(D&ILZ zFh=2%4R#hktZXui`uTAOfH9gCefM3up--^#^yzdYMdd^!fIT*Bx4bZzwuktPQ!euX zI5|1nT5hz&oAETam&0=oCxEvoci1jRc>g+V_os%%)0DC_*gncI8$6lp<0-PJFrx3V z;kiZ4Q)<@2X7^Rv?SOG-Hn@=}%0wFm!xujPv~a#CTF_$BW1V~MkfRPpr!4Rtx6Zv7 zWDn`RkGAjvksVm3k{QSORJY$oEWHU?35(#u38pMHt3@af`uUhBquw}^R~`MuOqn^` zlET8Z)6bqjq|I;4dgQ%Wb?~RjrYUht?%pCU8VN@t5ko?khVeh(JRh6-fbljmQc+(& z!H~$2R=ADnBQbw~FM0ME#s{K6bNa*P^IiG#=dqX~J-^+~QYH4Xm-h1mrJ0CxV~b>> zP|^}CZ1;lrKkvn4BqD9?pJ8~~v~K*ut|MiO$||>15oGCTu=tiunRjS4b5VZ~a0>{E z^>o%{I6#k=hioJ{dbyRdHYm~70{XErALro~NYv7W87Gt8?Dz6@W5517PRMiTAx=*d zE%w84tQf*hCiS0-W841hWb9JI!%Qp3WJ$U5_=2LGKa`Vl4}xPH$K&gK)6Ax_Rmcv& zSw{&I=R$DKH7>>{N2E#nWC4RuhIi29`D3%BqiFQYfB*#{jY#8jH<#FMn~GxLiSi(F zoy~~vU*r30Q_dmlsPxd_fxo|hb_~Hf&U{1Rr~YUAs+M&?lf8t9=cdtcA@MNqRURbj z=mI~bFe3v2PG4Fh6LsjPA`p;U6XwK9K~BNeJ~>$X9so)%697S=_L`b2b?~8SZ~lb8 z)#>2YHq!W0$$94NQWK1%zyP26Ng9A-(2eXmR4 z5rH*f2G@LlKr0D7*6`T6<5G{CqLR`pa$Ex*CMp7EawnH|;}V0DR~2J=C7m`H;h)!g zDCM-VvAk1tFPx=R7d9giqYVz+Y;E1A9wS-FEdCC~0c~jl!;lpKCh6CGF&gJYBqSmC z*g8PS%)H3Cz29`<>Ar|x{#zqFH%Ke%=~#+z%uVn2YP#GNJb%;sBU?kW`|FI2K6=?Z z?E69ap@o)q5ATaAd9OQ{V;X!&OlQHo>~GZ6)$~9*+wi6F4lcPe6*)N)9{KM{!hL!2 z@3Qj$Ksj%Jd^U%E(AxBeJy+BvP2?l*!87`kMp0+5jfW}Up^N887PK9`^=)jwK4E!# zV5Sui)2an}anNpek}ywwF!p70JF+{1#%lNRS(Xw30l`48S`zsfshs*N9a;hVwU(61 zXaB1OcxeU2O%6O47GGt>#jk1GO-UTpUUwwC;`rBrD?W5-^`|rT5s~u!EgU)S_F|=e!EU{W&yb*}`wG}nqhBA#1QqPe20WR!PRmA2%7jrO@85sqjPf8r$ zBRlG}#M>k#tW#pRa*N%@6POJQ%?+k*zS~ohZ3}GlI~Ic2uJvOy%WGR6wR80Ab0ag` z_O1IShrhKRJ&I^(kVsU&3AF@t)nA{PLn>6>FE1+0@zY&;t#s_F4~Phi<3XK}&WnI5 z^5f0ZXmZa9|H+?3_+%uCik?i2Ve4-eBd9pJ3l#Fgv=YC4b3#p@C|4uus^-W~mS_tT z152jvWJtsW{?k_zaQjNgP>Z0_UrCu96dy%@k9jS)-ahbUyn(DY+PtIiD$e+AZ_=H= zmhax_2^HcDQA*IVmw)836tTrXXm3hpsSKut8-J9h>1_KWpS;FgM3b>`N}?HTbM%Ea zN`Nj(2k{KiuAD8{<))fZHne`Q2WXRgU^TtDoYq1a4v{;3^_AL`!g?ℜ_lm1f)YP zEv|omx&zID2UWdue9W7t{+t)yw&(+cy7P_^4E-Vi`h;_sBN;Hg(QaaR*f@( zfG3#tzUf#cxudKTxw*MIU+*u$wm`&7T{Q9#1A(M+X!(7|a$hmv`2yeJ_8OJ-Cs?LQ zN*<75Xtdi@2Qp(D^rR_zZ`3M8G6;`u-DJhaG)77^Uo)uuS{eGH@@r#NYiT&~m_$`1 z^Q)kZnb0hFt~Bm7M*K!|?lTmVCc-7Z=WeK(0apK*ZGaItwf7_4|Qv zgcTMRHseBY_0`VHs!`!bVGMHwelRG6s?Xxv+-$q>Z(NZwZyd~|Myb)$8)5>av8Gl- zH$Mw^3E}W4X=ytka|izDp7|YbiKuT);4m{^!4G?hr&f&{BH5y>aX^*MxHvfLhhg*% zKXW89(L2LLD*|nTrXqjs_}&OX>Ndns(q-wlL?J^(}d*mexC? zab7w#ovDp~soJ0ZyA+=2zQFzQ9)5BZhLUy$CzH~N6uzZ}Z9ZOxD4kPoKJDX*=NvU7 zI#DPxGgn5X-RZ1|V|QJT*IOw=XPEvnqgNH=KN*g;N-m087a`g>*5^!B`sU905RNq{ zj58@TKrrAnzvMnVtITv;AI&c;R9GJ^p`T2Uv^1O+ix!lEQ+}INQG?a`wLII3(eG8+AK#T zHGT@tj9pvWL~_mhEcxl? z3r{Yv+8oAMcgp37Qq>X7dg0>*EQw(l#>Ut@i*hf$jkwEzcvzh%eCP13>m;Zyf65UL zU#{`)bBWghc$ghZLf;c|e#368bfy$s85}#H{e#2{7^}2{nTt0#Cj32&K3w+vc1e%p z&rM4LBr9g6{9@GjVcj5ENtYPU1+=>ck0;pEeQk-2JtO!DdN>cw99_3mEl;a zMJI-2qdN&8s(-J}{;TDDz3ERvHL;9@snN$Pp@gM@1_ZFU+}c-eZ%zNySZ#n zFALBYMOHGT98-o(X?kx+kv@4icKIZ&QLzYvv@w#u^_<}uePDNw+^tXAr9U#4ziSdg zFw&u1@LpQQ2Xr}V^Db4(4CV71OV*HHE7Wh{*m{SX9*-X>xjyGbec4blguUt1W1#SQ zvvrB#^3xlX!b5*u;m0OjhXk44##+KQ!y@y}A8{A>;WZo=I7B%4bxw@T6jy8t%jD&B z$$w6F3>F{E2?Eh7g1^H?fs zI)vKjWpxbgLCkxzuJ=z@$*1eyx-H;V@~(Y{1_^(v zY=Dda^s{b%BwkopfW-=-r0pF*N>|*S4jp@hk3xp%{Xo=BG&qCRA4mLB#(FktCM1k;u9D^yfC?(TA(C^=ZEEB9KA zj@wo8d3aQw+@nvC@WXL2%wZK4PS^`6o|qFy&pssGCa4qLnQ~|qengyqpG>ZkDT`0b zL6EPp@-58AqJZ@I`{jk?qw~*0_+eo<wwJQaC;^ib3DsLSOx8Ha`J_ z#_5{d2X3v34&2mSEb9J;9Vele9=^D*Pr3kU@^z05ZXc{L`&m-4Xe~p-Bh>z&YYiz+#4F(89t~h&H+V0g9wtizS-f-L(Bd!L?>Kh{_0mL;$}_CE5|b(S#LhYHZEWAuQnyw-osE%==r#8wnj^*UBGUY~qjtvo zR--L$gIKF?u4^Fwb%nCW=N~Ap%#tDbwV5Q!JB|GM+usK|g!^&y^h{MAYLjEvkV{Q^ z&{Dckdbn!st5nM>e1WsFvMy!yYId|t9Kgfs4a&x%ciDf>F`NtHXcZ9e6P+{~7x*iz zKy$-teQoVMoMmotb8*T0`AI`(2y6)vkjVQL@+6MavWxE^aNUW?dRU{Sg60MiGTc6x zMV(I76;vJ|WPU54Zlxt0b^mEH7g+D-7xX=Lgkws*e%1L1Q!&N7#v{?3m|fMbR93$S zIYgui?Zqi8l3W00b? z)}_M85PhN>A{J0c4zyKRBX-^#-({U@|IREP$MdZDfQs~n-kHWM%+48#E*`4)B!8Ks zUwkh3TrOj7k_?eQQYIFb&W?^aI0%OeDDWnGWScbF?W1z0S|`m7imCrJ0!C2a(oqpN zL`~H>u~q}ft9KRJeRGEoH1Wk1wTE{A!_r+{U0p=Le1bxe1*l{E;}D-=p}mYF?_1gH z=6&b#2cpuVG5`E*0Nqpf6JqN>4%LV%#DHr!z9+@u6Zrw!i=NOag>zo*D$lsqJ7Lk$ ztBNQ_60JgF1E3bM! zxd(59fM@;b4Yk4ndz8<;f<-6#1jK_-14xccAOD}x&G}ckeT}yNj&XJf5&s?Xw7)V$ zz?=7X$3HsGMi=3lG& z1e2E)3C>0sm0Mt7^eR2`oE8Ubd>@!Zhh3}@88vH^zsZpUmhwypvN|R=cRpQjttTivI&~55|X>^Eq^_-wY5e6ghQ)ALPCPI zk^ND#L+iz1Go;C5G!>_h24EDMaEsmS!;F;iVx*vF2 z>k~rgpp)o-b7I{c2x7M|F3E4Ll&b1>+LvweHL>bVR@=%cr^f|y`x<^aJ{Hhf?EP2!@Ws;p^rETPUVpHCAs)LH{P zdK#lE&qQ9{vpr;h{+kAZNud014hb~=F%V$DJNS!Akf%wzzPY-3|XPDd9Gb5=h{DboR@{Q%Dj z8$W+^IZ>q+We5ykSOf*N<+UlFi%(2UF{H=G-Sj!%A_(o|KmRd(cU0tbt3gAgYd=eM z!?|PNlAH*_HK$+A<5e%NE{xmn!TqC}{X~Z^a`HRyOrx-ydeKy>M(A@DIJ~KX$zRSk zePobu#Ro^v!SPh5#_*HrqH0A0n^?Bmv@WakJLOB>s6Mav+wIDxX3O)NJI zZRVq5^VYP(p2uj5LAroRaMEPe0$*Q{#2j z+)F8bnI6>vdOmJo0Y6SaAj02sQc@~0Lnk7b{M+B@CIh|vzjVD3eeRn0lNAHIi=Suc z_c(%)rm6kExb3#m?nf!_Kee|0qlfqhAQi~;y#);%@~%=e=`BHv#%v(q8TjkBH2nnez8}92Imb z(*y!gzI%Ip{Ml+B`25A^Kx%h2=Qi<`D?S&Kq+pY#Px$bm7BUw7hXL1-_3Uda`#4-@ zaMV?b##aw<4L!$!+*i!19EsE^cv45lTk7Wu90t$5D~)!EDA8;1 zEcftOng90H0F42yjIS8Hn)zK_inaWQw58w7zmd~- zrP#Lz5|1=zDM~tncJ?!tm9J?XSMI{1qvs#9pv4J72CA3zvzm_ZeQnhNcTKM zyJ(~(du;vrFCh(R{app#C%EUJI=@t*!ml@qF<+km?$cf^tKr)GGKfmFwJAeh{K~b2 z#YYdSpv$WTsVY%^{(9$HKcr4Xt8#*_ccpIoIXi#8e6C534dO%u1!Ij{{iPE=ek4!` zGk;exX68czy{443E1Jh!joZqA`DNq3c@tM6^({6oZX7J+n2u}@PZd#MM#F?N<_kKQ zd|>eWB8u)>qEuQa$V>Yy^78f|JgEkJAFNR4C*P0e0=9Q2Q}0^BV~Rytev%_wNSz1I z>K(=ei@$Y-V(BzAed&FIAkSoivGUt70Q6-v-X<5Im&17o!E4vVwx65(4%(@sxYXv{ z8qLQ|Uf<&5y9x5HFWH)H#=B?nKL}-ztCjZs$&z!eaEdpO3aM_R`jIC zpk1d&2L;ZD)ya{P?Z1*VJn2fh3kbf_0MS>^BjP_X2nKNAyw$guNDN53dUE!-q*9eu zO&Orw`X_X_7AtPsvllm=_i^BT?EHA=`90v}PS!eX8y%kf%u$1H=6E{*z5eS)q~|ag z5IY4fdx~#CsXPxmV+JQ-d>ksg??WB$d>yQeb|gpR_-Dk|a1lWH233pxg9oIX;fuvu z6D8>6F~N%0Sje(pM6o6PEq1e?A)oa!lrE}f!iKNI#u8CTTGI2-vFmBYI^dAfPQ+sZ zD!~dk74o>m|NZ$)52}f2{r4?-KBvc;dnQM71ylt<@7rRqy}5N*nHESLYabf0WYO@3 z$oKPkGTlqa)^q$-(LWt;00*mPjhj~si;A28QE(ai+W(A}7*~LJ$td9`(0!lWb|Mrk zKgujvy?o5R0pTB>EXD+a#t}DLXT+1cqqBsQeg*! zWC#ObIz(G{;_=jXk5^V!_KI|&G_kBn+Po?I_VTpTJ=N*>J+eP6dO>%L#l0RN&-0g z|B{cvGe@of(tP0YTUHpsADX`L?@)eD0X*I3#Z`gI7p*g)PM{GT6s_2`m-pmOsz1b2V z_z5vFOx@`WCdC2ByXjzJ*iJhJqdAlFw3Y(T-U*xN?xgddZg+ zn5)8MzT9uzr?atMi?41nOG^6OMqF;@pX4zF{4NfDi$K|GT?wBnbvSO7-TX1vll4e~ zQ)_(V$;IILJ+gLPV_(1VNJxEuyi$6!)m6u0k$`j}Dq#xM%Al6xWy;60=|iT5*u@^Y zg=DlpVghlm;NJ4~$8%|K1XRIv-506*7O!u~yE9}v*Z&gD*$A0r> z+V{S`bwANri_x{C4`=Dsr_FBYN}#b;F73CX4)`x4;}90OOwT}e1DM>U`xpX%=anxT z>wGDaot1@2@djHVb7%o0zpU)FS=sCVWG;0N7wAfJCll@Aipl* zy7MB^YiZ;PqM6AdHY%zHcqsi$F?@9*uM-`w`s zIJY9|E4N>SdhZe_jbM5f?KC?kU@aV?3;U%%%+j7uz7zpQcgN!ju|4O`Gt>xr5 zefn1Y`oBkqK5$~-&QW~xm+{snB&5ed66s^;X=~IR!C(mk0j@5_K@M^8cs7pcjz2%T zIr;e9lTFR^g$a?ks!x9{QLCYzRepqG>@YDvgcIAr47MOh1U~$_m-pgZX?f*xz;yVa z{xd||Ucy;3BkQ^%McOpI!IoPHqcn_%H7MqEwQ;htK4xN~C~K&1)9? zN6-$9?|V%8K9#^&>%IUlZ`6~fNm6-z8mG(}tcH8s$Tm*=^*(YPbDWH*POJGsp`D#} zta+)K!R`?ih(Kr;w)~b*b>X%+uy-ziPFEpX*ii7e$y}2byxwy2ahL&O4o(@1-7rIs zE-~PN0-iw}fq=A$z@#KPa)o&f&lixa5)Ns8`S8U+R-XE7eh;Q=`ZA-H36KwtX1KV99`Vb?ho4;@_X+6??{_s1l7JeUh9w%17Cq*s$JlSmv#PZyz=%s9V zPxg!;$&&U8!goI&hlqwx@!xn29|~i;&ESL{ibsrT%_EmW>@O!M_uTcsFP>7(@vp1M?@n;sD*({sZ69M$h*0(FNlT2oIMP@c^s27C#V{6O30_sYHC8 zOIY69ApEG}Fb%m7zVS{A;f7{jA&we*dfc5--*ma_yU|Z?tNc|{zz;MlQ+e^CU{DaP zoEBZXPUq)9a1sE9Ih6M^hykhf@F>Op!!MKey*gJ<1boVVs*B}d^0{>V;RwCi{V^?KrEs2mfF2Uso3 zwkW@HSAFwyV$WcX%<4YGARnlhS8z<#ygT1K`c$8TwC`zfYn>K}vOtBM3~w@CZDJ6` zv>fF6EXI}oR;*PaGsClQ?#^@wZa!GMS}ZXCPqN!Dit#_q93I4_aQCvAV}|j+irxR; z>RD=$%YKM}4Q@xAe%REK#*C3a`h&;WGBB}Q)^o|966iCie| zYg|kJGnXdF6d@!e9D+oLvt4R!cQdxVxd8Nac%*czZAJ)TdSR=5BahRVFE%t=e;ljO z+w_fsp~;HY`~TGfc<67H5QkbW!^!vz{MhAIy`*rKzV-04A|kK;Nal+!mAP27bfXLN z`+G3B%!&;rr<&8<)`eD6FqA9Nbc0alNx7@P&oF&6WqAB3t#v`~WAv|#?wqPyhF&D$ zauJ0QmHIfTXmr|kNbncU8z68lKY zL-u*-qQP0_5=9Il2}|AF*u^6b)y5#?gyFO!T#t>Z+QAa3X0vF3R6-643?XS*V)J9w zLoF@f)8H2rvI4YPMn?Fl4?GP2=#mUxi;^Y$as2%U4ArendZ>p-MwnSxI`Rnqz(3f! z%9!WS$lbIB^;z-H5z_&P|@L%G5U%N3Rc+Z>r=UJ&)N}@k*PqDTj}>?Yg}8j zy8lh(^Gs6Gw#5;2%VdDu_S>Xo=2hYGir6{QK)B z(tfR1m(kNMgTg+M%GvE;+|j7x#JKgacG$R;YA=Ns{oWY;fK45P2_BiH4nc;mNsr&8 zRv)JF20SlZI{hx@#U17%ZV8J+jiE9z*Ds+<0xg{mk9V^~!X0S9>q zk(MEQXz>6tt#`DLaPc?KKaA87jYn~mpc%)iFp7i|vBbScY!rdHFQE8`s|DBW_D9Eq zHT`_O!kZuTa$nFvNFkV*JIgIQ0dCI}dyiqy2nWtz@_D}&pnnX?1~aN>Iz=PSfpQse zT)PZJ_wqU+0#al_ylRg5iNd5!wReLY({ayzvmY=Q_5Yxn^UK0K^QW!aag^w+R*6wX z76S>-z$K>cf6{A`iW|4yoXaMQk}aJb;UN@Tk6E5zXb+8;$(I}k1(7FDKKclqEhXr( zT_z-b%zcp}=7b3+#>+MtD2IF9i@l#aWpB$rBbs~|WpuokeBCf$hrbEk&S9-NweuCP zXir&2IR5#VPt5tmX38ig!oC!}`S)xySk`c@k!HRayJ`rljp7y#(iheB!JgpcV~LAc zyxS|=bmu!3lIYn?CPxB{a`fiu)*43Lm}POnJ2FwK!f!Ytu0%Kz9xUYlsP2we^K{*0 zRhKmjxz7`fywaX{ln~B{7R6z8y+LX*1C7jd6-d0HB*gio!v%v2c(^;)MCqacxZe%u zANgNG)=A1PdoM-kAEZizz+%7x<3>2WVFn@$il_i74}JaPgE4csRgkH0y&jQP4i518 z2YI@tO`ccagMcyt)Tfybs1Av*-BzTfr9G|}Rc!;OSsILC=jy&hNP6yAOhdX-3n?*i zN{>G9XPiMy2 z)`3h^-ldf30$OC3c@MTYnDSwI+}-eXGjs|7yZP#HbINC7JEQ#Xxtp&~DfYx%00yW9 z7irR;ohsGl{-SPqLo)kq$w}qQoW8hQ9_6tV(fk8`hbb_Yh2)KG){HuYNCg;OXe{h= zw0ugNka%6k8sJEFMdy=MGpT6?-c`cP%b5*VP9);vAWwr2M*|Za9~I221h8wzEn8O z$uIzZPdEF=mwNXKsOsM(82TFennujqzq%rN$ZsvnNkDfsO4`fEX=A*COF4VD%;alp zO$~K#^bJEe!(4WHyFWkeGtOpCYk_0*A!4579u1jLnUL@Soh`GkXZbq} zGRG%uBECD5PMK|pNrTr%qrS=kE*XfND)LKM(%|PK0&8;u6e*vXlkKgIvHdr)ONXfU z9z0Zm&ua#l2g-7rFw>d{MPnaXJ#BlWi8C_nZdit(fz|gbOizlw4GuauC-1lXp7%Y6 z*gbtWH#g^1ztX9syI~cC;)apqUJy7%67rc4NgW!L%OZD;J)b|@@tpA0Rl~^q!paQI zI>l}!jF@|Db&d;|kXsf3v~fsrV!m~Y*t?k#o=}Le2{O86@6L-e3hq6OU~(9jg4~(` zF5P9)6re6)Pl2_Ki8_M5U&>Lmxcmk;H@6;~dF}#KUBG@?Og%+RTM))K-LMWqZ)E3} zrfgfe!EP|zV!x*&#=*UZcTE;e{w0+oq&dE;tg56TKjIsCrEEFe-FmeKs*jCo zZo05^vznLJpqU>C*v}NVej;l^%uGE->RDZ?8UK9lTUi{O#$lSWhL*F>)Bp2dcR1Ch z#K6#t@4YPG=p`XmEeHb(ruj_Z<=$?C#`FT5hoM=UC}7!fuXOKcKx;TzfONz`pLyxl zj@)XCcPj4Rxy|m~tF23IWIh?q+MxtjdpLr6O(Twvk8hR)JP=1frJ@HZaw+RaKG#rH z!|>9z1#F>jmT2WAHq@LECr81;UFVlu#I~nGG9!&0~p%DdRCu|`2cfbg`5Z>=KSbcS% zHeiJsv_>Q{*$FJ^)>>LG`@g8j<0NgifaD-R@+Sv+HS{i$kpV#LbMCY6ZbT$SUJ|6Gt z+VM7JzuhtwJ*?T)WCG$F(s|vNru|JFEX>OTWoOj7}4*J5NQDlV?UR6V8Um#)_azMYUDK z&dx6Ewf$C~K12A9n1Q9zizq5>S)w1JOHzF15+QQ|f}PxyZQl{fcLGBN!iZV>DQfor z$%=WZ!71?c)cb6nlad=7 zGjOsyp6&a^L@PPGNCpjc3=9l@2NPUnSVk{J%l?D`4CH~O|KU9`A4}eG9T+qc^TW)QmZtKy z;;ngBRPj6B)mQvCvny|FPvu{~4B|R&jM^Lu*qGP`1Wh&PyrzZ9=XCatgmVWdT5W4u zBi7SxJnN-v3Rb&+xwId6-B(rB@z|a56<2^JH0;~W(KZPnDjYNy5|!eJ;7 z%A9`IIs2IP_U))~4_=DZ?##N}>Uo>%ue^COYANoqWJy!pk!+oVP&%9HODvbXy!@Z( z`a58Zuxe}!k}KUCKe>P%9rqP1Nv<2?SKxM7Pu1|kVxql-PW)H8xGPk zlSX%qreN%Ci4QG&way%5-kZq!vhgc|u| zt*Gpa?qD-A_Tky?k+|;8PaYx*p>@aI4*gHL&n%`sF~@kkTymKkhY^}=>70CBD3-}p z32_TdQgi{M-lP=5+2T6t#iAPRS~4Eh+9wLV&|x)fZM4%swfKm- zl2I}xV%`d#kL-!;U)4B1b>#AI){4@>(t2985cGDw;f>t$8cwhux!a_{8Mxg-4j#21 z@Ydog@iV-_C2=MfQJd7bBBJ&OYGbIzU}gzWS&*n+u2N6~U%7e}D=8QH>rkIDwC)Cf z`EpMQHX+BgVJ-+RCW4J#YZKZXb8xO@Cdc3T!Wx|cjc{DYTTdW0@*^b`V|d}>+|F6r zpwrrGH?jS@+#42Aq7+n#IQr@{yp%nuVfjTC&+-%zDOXl zcu9#?-Y2r__X<-Cw5FQ9OGP`($fBK*lJ%#3L$F=gOUv(sLiuQ@LUmsQJmWW@tRE^e zpD#cqIC7TLKABt%&O5-G&`3(X`ztwOUT^!_VXH&wJwz;edo=wgCJ%+?U zuAo=w#P_TAk19tq*|dJ-+1X0bF}L5fd|Va(Glm?q;A{8;c?E0y_WP++N(Tm24p##c zUn>i7MO2?o6!^oEt^iVbFaT=l>b`=G9(YTwptT^7-2XNS0XMTq9i|n~QmLyGgFzE8 zZ!(&i7^tYIp!2L^V!{9=`du?!Hyo3M&-wYBN)X4$XVw%3at2^`ure_r;8H2V*Y^i2 zUqrhgHsmPRs#L#8xjt1xVX7n4~lQD@o#THzYnJxq>2}@mA0+$D%A)T2UBb)Yr_m{;g>)1h4V3q zH)hfEvhhY<<}mksM4a=?v*3YLiTQ%OILuj3Kjy-#N7g(Du=a=)x?PgHWyP5*-<>RZ%zZ;DH?JsfcUxHkMgbkBB+QVDR%^7k#qrO zL=B;NdZ|#h0J25i(XqS`a)fE2^@loYMZ=LHaKHXxiMLzSZ;y~4Mo|WqPK6osZ}Cb0 z2A?*>ZElyIQ{G8a?HUUpa-4c_3zBi8K?nm2{Qv9gD}bs9`+oP(-5t{1(%m2+2uQbp zfFRu=970MO6(poY1*DOVqad9k-ICJX@jbln{bugWow*D%azI3O_u2hFzl<*ffZvEi z2LO2@aMkTg>uvzHdNA4OE$Qe~>{fa#aeI1AbJSN}Mj$KTff1SE2upT7uDD-&Lm{`L zI(QP`Rmds-ze~HO+;MWr zD&KB}bbGSe8Ky~-|1P_(A-Y&-+ZFY{MIpzBHKD;phx&4gJUel8*b_3p7012`WT>KY zYfhjqAH)(+W(Xr-pRQFf^7@qD-tK|_{_`9%0qAA~At*n9%o3a~ZZb)X%gzkQ7+h=Xi1=Hld>c>X}+heC? za2wWU$tUpCZ*I^S)Lf?dc(kSw9BSZyPgGzgsvM=$hqOVbBIpdi54t~8|2$x)JF%s{ zVpnazP}1@V>jmi>c&-lyhGW!RV4qyPfLOwc z0u9JEj9P=lEkbU*EimhU0lA#(Z*0U1s>M>ooK#7!_|Jo1m#*p`O9}@Yccqg-zJPcj zQqbH&mf;WY13K5$n<=@`8j0XPM#YWu^!VR1^uqdnZP+y=EJm~AfP5mt9aAoaWmUgz zIxs1K%_G>Kd3P+MBEcTBrWSaWd#2xa`}iG?sOA|ok@KYX5YW-#gMRGlsqORZqd)TN zAUq;Nfuh4 zUz@&VC9p+;rijX%!XMr7gENE7dUTDBq}pE7!N5Y%JY*AeJKEx)Aw%@Myn`i&eS=_O z(zEz&#Xu%56y7FXM zdvCIJn=(Q4X6D1>)DSOk;4Q=7=w!9jG2C&k$gBM;KtX^Fo%q9R%1HP6ePetm^SG-F zgMykGJ2oGb^1jbpDK)M}0~&w?8)qQeU4?@kIcN?=ut?ro=#PWWMgqWzgFQUiF|7gN zS7c4>XHUAU^=MX;Sv1~jq+Ycz3uNJ{JK12V#pL*O0t z52_+saMe(DbmYVp^&Gwc`a&Md)>-%dt@1XlgB{<%RsT|`BD<+5{MCm;55B%5<+Zus z78iOn0wns}C4VbO?J|FxE9 z?z+GodNxCD->>fmn0gHOUY%5RglwMw7y>0{BAkt{UcNPOl6UxuA*#;H5ALHSyJNnS z^bmOqq2KYBCyx$ZGn&=gc8qPI(9Y;a$0z4Iy`({tI-E5hxtQZ1+BQM<4eJKInt8E_ z3$IVMPP9uxMHgn{!KGK6Ur+#~_c|sf#eTp&vxxutUbmuDGR6st3vgqU{=Si-f;weI z;9v?RM0#-^oY_)>XzM#YtjD(!;Zt^T!Rk!V1Uf=4+6OQT!g^^igZRVjtG=+qFIcx* zTMXVb-2R(2U*HDkBQTL8RW;Y)pHP(U6&4+=wtI&WPj@-7G?qN=~+Lr=d1znL|= z3RLe!t#|;Nr*;dBS@6H2cPlSNZlujJMu|TW@AqcXAE}~j!%p&-;i>d z*YM~EO;2A=Qw5bykDr+oVeRTUx)qs_*2Nm2&T?|CY6X+q*N=hv&NQ~fdLgKTWEu#|8CA!PPjQ)j&T5N${ zU$eJ(PoU<1yM_KZDZpi5PiV5RTv8P->Ss`4bih-Odn-IZF_76@ro|Y7eJToGhDlmrRdN){jNs0cB%PeBAwN-4S zwsf}0*Oef)cR6stOf=4#DcspqqfgN1hK*&FUPk8Yfo%BsIlVllAH>fRXcq!4`!HZ5 zj`QwPEiHe1K-LHk4-dpi*qHoe&YTa@gO(Um5j|=Vxh@tMSXie#VxCq_!pa97OG7af z@BDU9<({IOwc@?ihgRPqLh6t_$za%N$n8uJVNpj+dk*$^J|Tcdn1%-NLd*H~`vr;4 zFK_`hU$6?scs-DmAXtPfx$- zne&n9<-kcTL)B)1ozetA+N_lP;?Kqlar9YlVr091~;=j`J%+lm)9Ttja+rfQ~; z6fgTjoP#R%5wi4u?VqBZC!atyp9)n>_OEGHt?gD!FKM0Hbli5m`v3GCs{9s3|4@yx zO6t8qxDwybQ=B{8$|TL*!^PVe{bCun+;FNg5RA$^gTHga+Q6&Z%ts&Pszt{FX z~rzdwAqQP0o8X81o z=1~KC7KldH)BTW8YGnF3q4!}6=L88n3M-s@^5r9kF%)%VdfloY8}{~b%-)_~pr4$c zc_K3)Lfa>FN<_9BsYZtIcV-$EFXK5I_dPy5VkFE9%q73R37390nLoxITjs!T4QU(V zZ%?Ct#UnoV%_X3Kqz=S}xuV0AUQU_>If(7^6-MfZP&chiHQN;&P?euhpEWTF;+*F` zlQcZunK5*^{9wdwaI$M2`x+Z}^IsI5MaMg?JhJC6gs3v#w+WP)HCP{|gIyYUk9TCg z0+uO)r>M{VeAOxa?aTA*23hV*(pP`_G9X%sk)V=7NVDMMXZfv@;jI^5t^QB-r`lxq zoPfC;6&eGA6EGOApC`Q6MxuFsvCh0oFTq6hR0O6b9yuYdCLZ4#>SdaTXvQb#6o7rR zhPa=@_6P7PY~2qkJHBz?29c6DO*mhg*BV3=<|@b>etQ*lL5l^ojM!}>IY*!RqCsYS zMG+>Y$Pfy8K;A1!@+@9lmD$zk0;~z;> zOFT@)GT|8}ohPE~`1ovZ-#INV@5FXQSPcJrAtw2TfhfNK8}tWB^GJ-eG#C` zP@pqz%?}P|%pn9U4Shq|NBTS#LC8R^PyOEQ1Z5t^wRcV7>X5RGqK6EDtNb!J`HTL-Q)PPp%tD?mN zeurT>6cm(hAS%OwI6V)+;XnpD_02kOi8-dbZK_mRYGrsSk@lZ?!`+~@xL8&cXCQz4*?40CaSd?(^V2lFP0x<1m~n)%uVkzi#X__Z=KKi#dyaREe^L*lbzK zZKbs3LQ)vm<*%P&0sD+kY$UHxjiuVs>cgDiyjCNAU-t2vJ;VBLW(@oz)K6L{AO2Sh zpsb_vo>?CJy@<$DN$lL-6a*so!DQu`klkb0BLRM|hXj+TlS$5A!)9{j=sw%RGz%sb zYaEWHLI`jlEmBb6wb?O&hL>B;1{YU)O!S?dc|f%gNbHFN^4j}eAs`2;{($xfBY9M) zlqlvU+c|$Mx*@*?bboIJ$dAd%1*mq(qxf6*9mQ&k!p84pFR{sl=eStPp-{_>iO9i$ ziqwRsxKj$214H%;K;^)p5{f=+Y^%hv$rqilOC)mJo)jo?erc6(P1#2WCm@*YUEyPg z62+({?xy&VHx#cDXsTar8KQ^u`0feY!ey=Vkt(mgSZ|+??7OwTlcEvQ+}8-k1c?LX zoh;4!_|VCF6cwB+$?rC!)GN#7I7RRhS^iJA%JKZ4kbfmSZIpfngz9rPE+zag^P5(BM0`BFPc42MTrS{oimpL;=}j6jXx08qlkfJ>3q{fG4Tbb@AjB*o{Ksa90VA)RxK=K zz+(=CEtxe>l7*w4r~u;u02x<076c99A&aW%%3#cO{9CvWGI~B)t|N8EHm-hk+I7P*^~{1tja2PQc|1N^ z#K|4{U(AY66mIIsE7aUw!njH0U|rC@3Ld}g(OI{DvY4M*6aSER>GdAgAkBG@#%Zfu zo0hy{{3((c5!LjbgV|4PY}lWQx!qpjnh$6~!q--e`(b-`FR~Iq!F)qKe8QILyG$2Lp%-F7?`Zg2tmq z-QnS}rVqDnKQqe$5t$><{j5BTMkm*RI3lc;8^(hgZ zs3;MfQ&4b};qY{Kj#_QBrhNtT%(A2>6V1v7J12)2qQp^l65_Y5CP*i#B5`Gw)y^GED~ic}`XH^2%nwm3D*iR6nSeT!d|J z+uoV*RGnozxy$NrZg%k~`7s0sHlmcbZ*3?1PB-?Y|46vj*Voev3Z^o%vdVCusa_eE zvxQV&7LX3X&f8&!NOocnW5~fX;DzXd*I3ca!sin z_HOoZj!nW@=hAyBjM#i@Wkwy>s1Y6rT z(;>WIW$%9Gsh6T4|Ij3wn5FiCheGuCsDz`4C3b%^9wXKJvU(9V!bmd^VZOMve0B2XiH!e@i@)bu>tlz2?QL;S%Ny%=#{MVV9efg|&ZQ*#S6^$MPi z>90MHK@^OKXAe^?gveg+hdTm);Gz3+=js%b9yeLnBjywxqL`Hzl}6hvL@~2q08(~s zKIp^-$g>3U$MLO`11Q)<8>t5O$np(e`0iw7ct!S}wT+GV+$eYsGM@%n!k3q-UQ*`j zNj&}-a2wRrI;4lPQbWs6eMkpz-uwIuQ4{zw$FPZ<)TKwEc$-vVCOq``d~!dOrP*BN4o(u)E=on*T)AFb zs*2X^5yX`!n|SS*wu3U+5(77<-8!6~?avHJv3{Ye z7gh~E@ZY%spLW?JbbRUeq-lkN1gj{=va3P17*8Ad>a|IVa-Bk*u#0T^hYv*nYw7~K ze?2fWIf+DqbTnJgPyqnNI*C@I7~42KPFx_Z^8BP*v;`c$_m2}GyRC0(0$HI1E-o%9 z015PeAQNwNUAj+fKB#7Xc62)fiUE`5hL^mPWJuna- z7aLn8!C}^Ns$=`ejR0?Va7VX)g4Aw#iLAb7+;>9@VJ6QA6C zRO>$GiNT|IB><+p8|*#WV%Kv zG5!E`Y*;|R2-?}LKnVrF9w`1R&AV=}D9^Fdyyv^A*2PVa=&65#y|{<0tSl)*M={K6 zYn*2=@Hv0gMQ{$oCQy`_W{UzcX~nGP8u%NF!R!J~VfT&>idL4C5?Pxpwexhn(ABrk zD)HL`U))uSK6UzTKPqEmHu^Y&|BWAKEtGUaj1{jcI&}C9!+BHY%0;^Q{bL2!fh(H)Z?fi@1}ds~DUXVuejT4Id<K~g9Fc30)pbUoo&{`At>7(ouI;t4c_1eS3@WzB(&p<*4TDO0V4}d?4(}?3q zVA*0+cSVH-XVKfmRZ7L&3F2AKvA@&t9*BPuX3d*!)yG&$zp=6;4e{{#whm3O2IuGZ zq;Bfk#M_jSEwFXxTykViM4qIuK=eoZ!RvP)Z!(V#`vSZ^zW?i!cOED1FXC$p7PZ6H z(#7DheU7J$XDJTm5Oc%L)s1cIy4^^sebHRx-%|UJ$$&WoAp)zwbD>abAez8na{+ob zE2*B^+pjMHa<~PY9zY8wgA!nJ%b*ed4-*qMbB*5JLqlEv2bEDQH9#K~qP5Xn0|o80 z0kQxb3?KVVqpZVO#v5ca71X-0NHqu=&g4LP@YK-F&CQQAgoe60;6AL=7~R&6m4m8- zB~=n=5{6~6sb;W)TL6cI_w49%&Lhz5{x?7Y$qblJFV}MhdV457Jcc0(Pf8vw{GRi3 z+4I>5j8KqvC4>;qFBt31xe?UAbiG1?2XBJEHQZ&HNVa{gWXj04-2Is24t|W%G2P(R z?Naq8tL@#oHQXf7UQMf6bIJ%F{$+b?&)G2~kSGr#W4M@Pi()bttPTtbo<4z0t9W^M zoD~Lxx-)nv3KjFT2~1CNON~WvD9+kg{38fF)@QdiCKoSV|D>OwQ1NIl3>%a)(KEJh zSq`lT8Y9^)?ONm&>%0Nm+L*(@@9gF5UCGOJZp$K}HJUsUsD_H>f#`Er;{{HSXj?5) z69J~GDuXc9`lQXC|G7EqPhLkmwz33*#gRtIVkd|M>z7!e?nMEivE&bjxtZV1<=X6> ztb=|H?R1RzW~F6O_DUqoyB41hAs^Vw5n?vYT{)0w@wG^C68_B1Y3rGmK?%I_mLv8j z$jyBOrrBE81w3-{v~Hm0CnY~bUo^9@xD5h9tleW{qyP@N?{HpPSwVTN5DM0T^v5E93Tu7$uu@*u9r1o_Ea28>q2IPZ@)I@|8luWTRYk2n~`mj^wTl{yQe zNw_`a@>#!*_Jw^jY9-5S30!ViU)C;Z#im5}|6C!822Vv_)CmLa9W;dB2a^KV!usGw zv7g+{VMArz4v&nin@;x}C@iUokL_PxWQN7yR*>Ly+q3<|J(@N;#;7-BU5->2Z)fxaNCXMe_;DMW4>? z@}!@M!0F<mOn~?9%w@e-qQV#;I z^>q1D$-Wqrr~wzR`w0~R6(JILAa?ny22{Z?tpZDPhWUD)Usu#*)@sw_Vn=mR*z4M6U6BcDSY4@IOVx1Q(U z0t4SyppdZcqqgSS8K%nfG{^J19iTe*C0P34$06hmkCH?s9J4wJmwSr+#{tvv4~j4q zQU=7xB``5GR4Shn{A+*98$ZzJ-QRg>+@DeU`Q^UCi+bpqJn_G&QG|s_yd<#ZWk}?t z_l;_YZ*MMfkFhWi3@yorhyB&{X(>{2dD_PYobT4fW``KURpK5@4$4AZi6Widc`es> zZr%e(o`>I@U(W@0fJVrh8_DI_n7;TOrjHbfcN}S+GIeBf%MF4GvzgDh8Sz{J9WDv^y>Z8wn55nFWu zi9O7?eP)SNv4-jvaWX`He|0RRe9q5r#(QKMpMl&pVz+|m9MTvyC_qe6{*kp%n53Of$iMg4XwMXXyy&ia@p zx?H^bYNa5af@A`n?$|h?dU)nUXWZK~Q+oHO!O8FzkQ({;sDLtLN4IG^6 z%8`HYlr0l8KF;nZGaIWI0I$~|X+<%M>2X(#o-)6+5UrBo$O zy(VAiiS74?hzJ|LzdBki{HHag^d}3t2bat4K>E~i`mLrX|DQ0;<=@P)QK1~~Cm6zY zOv}T`Oya2K+IkLNu9{Cc9XyUQl*{?5__wW7?(z@eG2Tx6aK&Qhk%qqwX;@gtx4lfZ z+r5~to?>C>d=<hBaNzATrl1PG7RZXk%2YMWrcR3mZnwmq6 zAYXF(`X+VIVs2TrYDzTMn^-m_W1oM!{P!=_o=#_==<{9@Co%_Ncpu}8`E9YXLlsRtd5}#l zpCg=f_r_IfNaG{NyjO_lP)ae2jq6{#H_}Ny91w^C$8UC|vsrzpL{3Vo{DC3lXFVw~ zF|q$mf;$;B+BtS8iVMAzvoQte0Vjw-I8n5Fe7k0iRNq_u`gx{M1q+{uh=}X6UIQtC zKbS)B03KZXqP)yvM~ux)Os@d?yKfHyG7tv67B64EoR@TU{|sm|MZw*VvXlxHESEkI$#1AcN z9CQRl@9<@>bHPqI>NTT0&WIB%3jpr+$tnf^n91He2O289Z@`4{toJPk(5w$T2z>?K zq|D4rmGTLDVg;8I78Je1dQz1Da4tCU$SuKTXP%f&IDZwfIk3ZXq9N=6XVmu>% zHbuYC3!Sy=!u3$+DS+wANIw{9`qKIGAlnZWkm!-;Ag0=%9QFCvvHEqDT zwgG$Vl~?Jl83C_$xfxSoLb%8OI9g>Nv~B8?vki}0KmI87;ho3fJbFnHXxSso1~V4% zhBrJKiLnb=f0ZOyvNY0!NkQS-cHHGonGfklHtt@y1T07zre1g$t&kVpAk5%nh#1dy zfiXQ$y~zuoq@gn{EiI1K;e3ZK-YfZ4o85Y_P0~H>uB~cL0+%W@<0z_PiH^8<%dw%y z#BhB{qE~?DmN*;&G`I}s^S~eO@eA| zwrys1mpDxXuOvqhF86)$fs0E~3Zgve#ChRo--b7%H?MT{R&t0=+qaQwC`9JL-k!O` zSwoS1aZK7Ec804Een-VxAygB&>gxE4qN$Rn;gZ%r!EF4NR`XV+H^H5OUIkNE*iS;N zrXQ zsd-oUwdU&TKu$&9D&1b=>UE%i{h{dllU}a!j@F~0G~YorE%&SIWv|HVCz<}I-e$Hl zCK7)yn?Eq!f!tX_R$?n4S&qnOcZ!8)8kCfh#V9r0-ri<|o+t}(FllxH-g;CbyR0@p z|L-XyCD#9#xv$M006fnS+%_S&K*ngtNq*RdM zQ|#v#;M%)kp{GZDX>QI6xZ0`X;^O4o_1XMWR19eQPa9L!d?&l6l(w6rHiT5;1ApC7?fGn$eFKN9?JYOud%>_r_wL~nwa+rrO(ZnQ+1!dfF^Rz#CLBN&}b;f?&zhM%tUV7BShg_=@ehQ zr<$0baVBzI%n%<8Mb^Mjq~i{0Ub)~k)^R|<4-ODH{*XBA!0Ypa=$IIo<|xQbiXbp; zQ~l>9VW<%O@$&kSZ7^Oid>qSPSMLGGFmqd})mo1P1Iz;`d?w2TxXpw?t zQN1#9d%gj6LY-@AU4Q0$s`Q~D%6Y9a(7?V-@z&_M|6ROGJ|%oJX+VD6w(x?Luf7@| z zlEq&=-H?4I^}xp;Q0wtsp8&@$wE`pSg<+pnJAe3j#MQmbm{^U3Al#Xv>DZoMXOI6? zLlM(32My4UQcaU8@&gFjBhn!q%WB*)O!g7b8B2SBB^J*t29}dQfOh6{bY_G_AFK~i zKWqmtO-^RP9pVGOPUtpw;Z&f{dKodZq{fRAi}{AFh%q&K5!SFX%`_02_IEivqq(jS zWl}-kTYqJou8xskNE;PPEaWgN$mrZH;uvSi>kdeFzD{}L)5&CofkR~S7?xBe?FPW? ztk;<{+>xQ;M8b0p;XEUUQxsA03O~9v)zstz0vdaN&;RXrANLT}9IAX;#|yz{sBpbD zB@}J^S)lfLbTdaLid0#vuRMb+6Zc1s@cGxWu50vfZMW7Z;fCFhyTTcQTbGv}6{axU zO{Qbu<|aM2=kUKnE09Y!gx>mOe=*1m%gSO_Qnd$arHyIBY|f(N|ERZNqx2tGh-3JRP`v_KJSAvGdm3Fw)Y-#PCZ*&6AB~& zemdkepGr?~c3;%t{Io!~vT5KV!2(GuVZdyJB)1&m*)=uI@QqSx=I`SJUpIOCjRQgT zJ5Qu9Z+5K@e}6CaDagJ!;l4b@MAn2?+vAppUX{nsym)W!Y!*I81#;2YYnKIVI&mO} zYuESJ99R_|vf%!6*g@QstKA`{hZ!9o^Hoz_-2?SuQueR-$#|ZiK(+al6QHvD{8B+H zVF|Qn5>g~W7%5)_`ahT@+Q+^=pwur1y58N+Qp3 z-Zg<6kRB39Wf)z#IZt-xx7{7`lQ18(rSFQPY!7U%s;cS+PHI|_`GofqKb44HxEe12 zFORZF5`m@oD*zFlWCHjQ26g_Zz_iDJKjnXkg$hx>RbO>QIuT_H`8=S9>5vZrM`J3G zvq5rJR`hYAnXuuNmWCl7pu*4t0c<_f#8!tAt2^P8E&$yC4N6+;Pn$K*-Q+qXa~m)m)V1D1mk7tHCl4oySm3Sw$fRj@Qf z&$d8USAY?O!#j6m)d_yLl9LUZMB~4Il^ej=Un|<@RYkqmHpsoSH`kQ5uY+`dJO}H1 z8BSk`Mbv=!ziwcR1wnq-Q6`xG;Wm_&U*DVjfC9!R+aA2wynQ>cCC-P&kBm@*ERiX& z7uBE;QC(>FTJ0h$?42{BluDNaEurU;rPb*XE7tu1CZ(X5e017bwgN&hSobt#!45a& z7qRWzSfEqZ2il*}wRN2y&!8rSApqsiLnI4lU1e7Kr$xCo*x2i3v^ zy~Y=HFfG%SkA2y1-Bf#}-p?5rZ=~OJ;6r_O9nZ#gnf9@_qfHH6XKHR?@OX0g8|nqC zC9Zyx%l>JZiK~FA5S}xgMB_#GauneUK%Yl?nKEqcO%yu`SWml+4JRmS8$LyjsTO2T zxq7PY{*0m4&VIq~*;<^Ic{cKJh?n0VKJhjsJW8>M)UothPc&fij{5S^aazW%pCYz| z2$3Y)7#x@F+GbZrlmudO49d)6Kq89OSg}5+vK>_Xf7V8TKHa6Qt(nL2R?|RqWjxkU zM~c(^{AZSgw_{(CiwcU};O3JjPoe-U`BK@v*d2E)H4caoWyZVJW72JtVb z1XznSa4oFY`9yLJKv~>7?b(6Mg|f1>#r5Rzt4N`v}8yo)T?dI$FCO}8Je2a&V&ozY>AxvLEc_Fx1gaYzC z??YXIhNNCC5M(QWFr%c5jA=)8ISsc^~ZXz6-;#`nFifqznhoI=Czz1kp1^+Q!rkpcvP1DWK))luuL9RC4&jL5C4tDCw= z`}|_#1$~hQKpk zP(hN(p3pf3GpqW~9W*u#3o_<++p1ne?+&Z{TZqJb7nS{=_00M>ogN<>`{^8rKbl&H z!C=679(JvRg|lLFGqa4U&H2t>Wynw!`T~2b%lXc%_91EaLI#qR?najZLoREMspkh) zR@RIYB!1hy`wLV}O-I0~3XE3#A~?+LoTr#~jQR?wPRRk`Y8URkMIk>)3xTOOv}PQ!@G4 zBGK7l2V^-xHC*hiKHfe z7DFc|*q4JzFOy?r)kKC7dv6ZXSAO3wTX><`sO&52QZ3X(dCjH4FE6Ux$`jXwb4ul?zKf5%jc+b3$(Kcf zBQ3W*a`TClDUS$*u54yaB=Ox+p#1To?VwULjDzfs#ui~I2qY|zjpj$r9_O|+{`sj^ z`)^tNJm`v}`Cw%^{a_^I;7`;-jru-&0bJw{EO%R9YsdY>^azPr*y!~0itEdpnXtBU zSs%LYAN#!ROVgdWLYnl962l~@3K+*I!y_mF7T=7e+7_!t)@^y~sa^cSKyEXOkYdj= zF3x8AxsfhXeM(zpGmtS>y_|Xo9MK1@)|Pq^0D+aldEZt*3iBLqlLm2}_KZXb8)*I# z8|4lLr-0uk8$gc>ZUHn#Juw&m4taUv)M!75)kC!qW>R%~K_naAqcLGE2xm)+L+{B# zcihCv;%&t4oxy(HW=Qodq_SRrS6k!a_Vf?Ts=%#M9}gsWd_mPd(Y0OZ4dK00x?1~5 zqIp%@>We*SzQw;h8!~4i>C{0aPR%#sHpI?L$-O7H9}*+=>{Y;RC9{ z1)N3Y+s?!L_&5+Vf(o8yvn_$-Z^(Flwy&M~Mlf3ST&{y9#!f;DoeR&h-@urW*)QKv z{JVTlax1q9869GLGpbZ@DP{-4r{elvLDsOSypA$(F=X5tf*P<-3-x+CHgDl-8m&lE zDChm!jC(mxmJW__;i<&a-JeQ5S~|sV*DQ{{A?G5~J5rb?XD_=4n*2#h39);*RlEPo z-TCH*@jEmK{`COJZCUccnVLkT)IkR?)0u4Do@w=Bd>?YPKC?+aMG{MTip(-$Ma{~= z^`G@Rm#aOIjW7QO<8~i5x=Nn;4F7Qgb*y@f$_a-Mf+-Rw*tl?&*~yxiR@1(JIJJtbx;nwnOI z8i#ckXHnmH;H}9u`;zCmG^ijTLP%5m4*B@~>1=5l1`YlnG=En=wPP=;#lWwFIGK5Tfx3CZcq{1qOE(Tn%)bi^Q1N*uN{Q4wH}7RyRCrYC5+!OwMSQ zaOCp!I2S}bLZ$7?`zu{bd%%cN0KN&dOqIasozAN>&nfw!1(|B)Lt<9W44STY^|Y1D z;EAbT$WlmnCw}YUB^>ftO*bLdSqiZ@{6o*#*?DD}#fgyMIvoq*&AQQiAS&{JVTqx+ z%Latb-+PrZo}+?Xi5YKX@r-YGFGp_iVG$&!I$T$|9MA8`ly%g%fv2ngjRCT}c+gKjit*L~1g+fnJbGDWm|N)1wS~yCJBz4jS`SwV z4i3&sItq%7YyRWHmiP5MQwb(S6>7Uhv%5Nmh7-+2#GeIHMI$5eyu1CiK0H*WpOBTE zqV_au3GcB)YxihpDo2^z?gr5?@=iqm)i~Z-6JVPEKXS)KKKLDak0P4mibb6U1m4t? LwUo*ftit{Wv>>__ diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h index adddb0d1347..e6cbe7bb69a 100644 --- a/source/blender/include/BIF_resources.h +++ b/source/blender/include/BIF_resources.h @@ -293,7 +293,7 @@ typedef enum { ICON_ARMATURE_DEHLT, ICON_SNAP_GEAR, ICON_SNAP_GEO, - ICON_BLANK41, + ICON_SNAP_NORMAL, ICON_BLANK42, ICON_SMOOTHCURVE, diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 82adb1ac12a..7d497dc05ec 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -75,6 +75,8 @@ typedef struct TransSnap { int status; float snapPoint[3]; float snapTarget[3]; + float snapNormal[3]; + float snapTangent[3]; float dist; // Distance from snapPoint to snapTarget double last; void (*applySnap)(struct TransInfo *, float *); @@ -457,6 +459,8 @@ void applySnapping(TransInfo *t, float *vec); void resetSnapping(TransInfo *t); int handleSnapping(TransInfo *t, int event); void drawSnapping(TransInfo *t); +int usingSnappingNormal(TransInfo *t); +int validSnappingNormal(TransInfo *t); /*********************** Generics ********************************/ @@ -487,6 +491,7 @@ void calculateCenterCursor2D(TransInfo *t); void calculatePropRatio(TransInfo *t); void getViewVector(float coord[3], float vec[3]); +void getViewRay(short mval[2], float p[3], float d[3]); TransInfo * BIF_GetTransInfo(void); diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index aae8a697cbe..75affbfa7f5 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -543,8 +543,8 @@ typedef struct Scene { ListBase markers; ListBase transform_spaces; - short jumpframe, pad1; - short snap_flag, snap_target; + short jumpframe; + short snap_mode, snap_flag, snap_target; /* none of the dependancy graph vars is mean to be saved */ struct DagForest *theDag; @@ -707,11 +707,16 @@ typedef struct Scene { /* scene->snap_flag */ #define SCE_SNAP 1 +#define SCE_SNAP_ROTATE 2 /* scene->snap_target */ #define SCE_SNAP_TARGET_CLOSEST 0 #define SCE_SNAP_TARGET_CENTER 1 #define SCE_SNAP_TARGET_MEDIAN 2 #define SCE_SNAP_TARGET_ACTIVE 3 +/* scene->snap_mode */ +#define SCE_SNAP_MODE_VERTEX 0 +#define SCE_SNAP_MODE_EDGE 1 +#define SCE_SNAP_MODE_FACE 2 /* sce->selectmode */ #define SCE_SELECT_VERTEX 1 /* for mesh */ diff --git a/source/blender/src/blenderbuttons.c b/source/blender/src/blenderbuttons.c index 6c6afdef68c..e15ef3fd898 100644 --- a/source/blender/src/blenderbuttons.c +++ b/source/blender/src/blenderbuttons.c @@ -1,2165 +1,2181 @@ /* DataToC output of file */ -int datatoc_blenderbuttons_size= 69070; +int datatoc_blenderbuttons_size= 69599; char datatoc_blenderbuttons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, - 68, 82, 0, 0, 2, 0, 0, 0, 1, 0, 8, 6, 0, 0, 0,197,144,206,103, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0, -255,160,189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 0, 7,116, 73, - 77, 69, 7,216, 3, 21, 16, 3, 34,240,181, 88,200, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236,125,121, 92, 84, 85,255,255,251, -220,217,217,119, 84, 92, 64,197,125,197, 61,212,160, 7, 45,253,154,166, 2,102,182, 61,245,196,100,218,106,105, 86,207, 83,254, -242,145,220, 90, 53, 29,159, 74,179,212, 18,212,180, 92, 18,116, 80, 67,114, 87, 44, 23, 20, 69, 4, 65,182, 97,102,152,253,206, - 61,191, 63,102,134,134, 17,152, 5, 52,173,121,191,152, 23,115,239,220,249,204,185,247,156,243,121,127,150,179,144, 1, 3, 6, - 80,120,225,133, 23, 94,120,225,133, 23,127, 43, 48,222, 71,224,133, 23, 94,120,225,133, 23,127, 31,156, 60,149, 13, 0, 32,222, - 8,128, 23, 94,120,225,133, 23, 94,120, 35, 0, 94,120,225,133, 23, 94,120,225,133,215, 0,240,194, 11, 47,188,240,194, 11, 47, -188, 6,128, 23, 94,120,225,133, 23, 94,120,241,151, 0,223,254, 96,230,204,153,196, 83, 65,171, 86,173,186,101, 44,129, 87,158, - 87, 94, 51,160,171, 86,173,250,211,202,151,147,147, 67, 19, 18, 18,136,183, 62,238, 93,121,167, 79,159,246,184,241, 13, 24, 48, - 0,222,250,240,202,251, 43,203,115,219, 0,248, 59, 67, 42,149, 54,120,128, 50,153,140,220,205,229, 92,189,122, 53, 8, 33,196, - 91,115,158,213,241,244,233,211,145,153,153, 89,127,156,156,156,252,151,120,150,187,118,159,108, 86, 17,140, 31, 23,247,151,110, - 51,146,224,109, 16,235,187, 34, 6, 70,212, 97, 55, 10,116,239,220,181,109,241,110,213, 49, 94,252, 77, 35, 0,119,162,177,238, -218,181, 43, 97,251,246,237,114,219,241,164, 73,147, 18,199,143, 31,159,115, 55, 60, 12, 74, 45,186,243,110,229, 85,169, 84, 74, -139,138,138, 0, 0,209,209,209, 0,112, 79, 40, 17, 71,227,202,106, 96, 53,233,153,187, 42,119,211,166, 77, 46, 27,106, 82,169, -148,110,222,188,185,254,120,219,182,109, 24, 51,102, 76,253,113,102,102, 38,253,179,140,128, 65,131, 6, 81, 0, 56,113,226, 4, -105,141,235,182,255, 32,107,198, 0,144,181,184,254,162, 98, 58, 0, 0,110,234,245, 96,117, 6,203,201, 90, 21, 0, 32, 37, 37, - 5, 73, 73, 73, 77,150,111, 77,210, 26, 26, 91, 22,235,214,239, 39,254,158,232, 66,189, 72, 16,252,194, 89,232,183,111,131, 66, - 49, 25, 10, 0,113,146,165,120, 71,114, 2, 29,196, 64,165,190, 16,239,232, 82,221,250,221,236,236,236,132,140,140, 12,185,253, -185,148,148,148,196,164,164,164,156,187,169,111,181,150, 14,184, 23,238,247,118,224,189,183, 94, 34,126,130, 64, 98, 16, 11,169, -161, 86,199,212,233, 84,220,135,159,174,248, 91,204,142,115,106, 0,236,218,181, 43,193,246,191,165, 68,109, 83, 36, 11, 54, 47, -132, 95,135, 64,212, 93, 87,226,221,212,119,228,219,183,111,135,215, 26,118, 14,153, 76, 70,162,163,163,105, 81, 81, 17,138,138, -138,176,103,207,158,187,214,147,176,213,181, 76, 38, 35, 50,153, 76, 32,149, 74, 77, 75,150, 44, 57, 6, 0,115,231,206, 29,210, -220,119, 39, 79,158, 92,255,158,101,205, 48,154, 12, 48, 26,140, 48, 26, 45, 47,150,101, 49,119,238, 92,183,202, 98, 79,254,141, - 97,204,152, 49,127,170, 17,224,138,241, 51,104,208, 32,167, 50,198,143,139, 35,158,144,188,203, 8, 10, 64,254,149,239, 32, 65, -123,152,145,139,138, 47, 78,226, 76, 97, 53,166,124,176,214,165,175,199,150,197,186, 72,232, 22,200,123,203,157, 42, 98,201,248, -119, 16, 50,233, 89,148,190, 18, 7,232, 20,245,231, 79,234,222,192, 73, 0,208, 1,163, 37, 41,216, 23,124, 2, 65, 0, 6, 41, - 6,185,220,126, 29,145,145,145, 33,207,200,200,184, 43,244,149,173,140,173,161, 3,238,133,251,109,109,172, 95,185,138, 60, 30, - 21,195,127, 41,249, 73, 94, 68,207, 40,134, 79, 34,136, 86,169,228,196,136, 52, 51,237,218,155,245, 55,174,154, 93,124,118, 55, -220,208,225,237, 92,144, 55,199, 13,121,203,111,171, 1,176,125,251,118,249,230,127,191,133,212,247, 23,201,199,143, 31, 79, 90, -210,192,108,196, 15, 0, 85,218,106, 32, 20,152,191,239, 61,168,174, 40, 32,125,238,238, 34,178,166, 58,196,159, 93, 70,123, 35, -224,161,135, 30, 66, 81, 81, 17,162,163,163,239,186,103, 39,151, 91, 28,137,196,196, 68, 42,147,201, 24,153, 76, 22, 37,149, 74, - 75,151, 44, 89,114,194, 85, 57, 44,203,194,104, 52,213, 19,191, 61,249, 31, 63,126, 28,131, 7, 15,118,171, 92,169,169,127,120, -128,211,167, 79, 71, 86, 86, 86, 3, 3,160, 53,218,138, 39,245,112,226,196, 9,146,147,147, 67,199,142, 29,123,203,103,123,247, -238,197,166, 77,155,234,143,155, 27,183,112,139,241,222,138,233,128,168,152, 14, 40, 85, 40,177,245,249,169, 8, 37,241, 40,252, -223,235,232, 60,185, 51,178,220, 32,127, 27,210,210,210, 40, 0,172, 89,179,166,197,109, 54,106,115, 46,180,215,234, 80, 42,141, -105,246,186,179,226,108, 44,232,123, 19,233,103,223,110, 81,125,182, 6,233,182,166,140,214,136, 4,220,238,251,109, 45,228,230, -230,250, 0,184, 15,128,159,221,233, 90, 0,249,241,241,241, 53,174,202,209,113, 58,198, 88,101, 16,140,155, 56, 89,172,128, 73, - 44, 16,240,249, 42,189,152, 17, 10,117, 28, 47,192,151, 53, 74, 76, 38,126,249, 13,131,152, 39,210,235,205, 6,179, 84, 42, 37, -141,141, 25,177, 71,109,109,237,127,109,239, 11, 10, 10,170,124,125,125, 25,141, 70,195,217, 95, 51,116,232,208,143, 92, 45, 35, -165,212, 41,177, 19, 66,230,180,244,153,242,157,121,255,221,186,117, 67,172, 95, 0, 90, 18, 5,176, 39,255, 42,109, 53,210,255, -241, 94,253,103,255,220,254, 2, 16, 1, 76, 94,146,234, 86, 35,107,138,160, 91,139,164,175, 95,191, 14, 0,232,208,161, 67,131, -247,182,223,117,214, 32,110,103,136,207,222, 8, 48,153, 88,172, 94,189,250,182,121, 1,238,202,116, 32,127,251,239,223,144,201, -100,193, 82,169, 84,225, 50,249,155, 76, 48, 26, 13, 48, 24,141, 48, 57,144, 63,229,220,139,208,165,166,166,226,248,241,227,245, -199,203,151, 47, 71,114,114,114,253,113,102,102,102,139,141, 29, 59,131,167,197,237,207,158,248,167, 79,159,142,129, 3, 7,122, - 36,167,181,210, 1, 37, 87,138,161,217,246, 31,248, 61,243, 9,162, 98, 58, 32, 50, 84,130, 43,219,174, 88,200, 63, 40,192,146, - 2, 16,240, 92,146,213, 26,196, 15, 0,221,206, 93,198,245,119, 23, 66,151,177,174,249, 8,129, 68, 2,189, 94,143,194,194, 66, - 84,232, 47,162, 27,162,154,188, 54, 59, 59, 59,161,185,182, 47,147,201,136,173,159,100,103,103, 39,184, 19, 30,183,143,138,217, -250,171,253, 57,119, 29,129,166,136,219, 29, 93,208,216,253,102,101,101, 81, 66, 8,146,146,146, 72, 75,238,215,134,103,159,125, -150,126,249,229,151, 45,170,243,220,220,220, 64, 0,147,247,237,219,247, 31,142,227, 12,118, 36,200,231,241,120,190, 0,254, 21, - 31, 31,191,203,153,156,130, 43, 5,124,137, 80, 44, 22, 8, 68,190, 12,159, 4, 80,158,200,135,227,241,248, 28, 97,192, 17,190, -153,242,120, 6, 30, 71,244, 26,158, 89,235, 43, 20, 16, 94,151, 14,122,241,196, 8, 14,197,206,203,168, 80, 40, 84, 90,173,150, - 5, 0,141, 70,195,189,245,214, 91,245,132,191,104,209,162, 87, 91,218,222,199,140, 25,243,188,237,125, 86, 86,214,234,214,232, - 67,140, 51,239,127,225,180,100,232, 43, 43,241,122,239, 30,176,207,221,187,236,133, 88, 83, 8,246,228, 63,105,210,164, 68,153, - 76, 70, 38, 77,154,148,184,118,210,231,150,200, 98,247,176, 6,215,187,130,185, 43, 11, 48,119,101, 1,102, 45, 59,143,167,222, -255, 13, 83,230,159,110,241, 3, 41, 41, 41,113,201, 48,184, 83,228, 95, 84, 84,212, 36, 49, 71, 71, 71,195,100, 52, 98,216,208, -161, 45,254, 29, 91,152,124,243,230,205,144,203,229,245,175,230, 12,173,166,200, 48, 49, 49,209,145,252,235, 13,101, 87, 20, 19, -203,154, 45,158,191,193, 18,250,119, 36,127,179,217, 12,141, 78,227,214, 61,218, 34, 6,142, 81,131,204,204, 76,100,102,102, 54, - 48, 6,220,186,223,156,134,250, 80,158,147,227,214, 51,107,142,252,167, 79,159,142, 37, 75,150,212,147,191,128, 47,112, 75,206, -248,113,113,196,154,130,105,244,229,142, 44, 29,138, 81, 55,121, 24,104,198,235, 40,185, 82, 12, 58,185,231, 31,222, 74,198,235, -224,183, 13, 7,130,130,238,168, 71,168,169, 42,132, 46, 99, 29, 40,165, 56,123,246, 44, 70,143, 30, 13,137, 68,210,128,248,131, -131,131,161,211,233,160,211,233, 80, 90, 90,138,199,116, 47,225,139,224, 87,154,148,105,203,129, 55,247,124,108,159, 57,230,203, - 93, 37,238,214,114, 86,108,223,117, 36,127,103, 14, 82,115,247,155,149,149, 69, 51, 51, 51,145,145,145,129,236,236,108,218,210, -251,125,246,217,103, 41,159,207,199,179,207, 62,235,113,159,200,205,205, 21, 3,120, 46, 59, 59,251,173,247,223,127,255, 8, 33, - 36,218,246, 2,208, 62, 52, 52,212,103,255,254,253,171,114,115,115, 71, 55, 39,199, 76, 57, 30,143, 8, 68, 70,150, 6, 24, 12, -166, 8, 51,199,181, 55,115, 92,140,153,144,142,224,241, 66, 9, 33, 65, 32,188, 0,142, 34,132, 26,185, 32,149,206,228, 27, 17, -192,242,152,161,106,151,234, 72,171,213,178,142, 94,255,221, 14,198, 21,239, 95, 91, 94,134,113, 3,227,220, 38,104,155, 17,177, - 96,243, 66, 0,168, 39,127, 91, 20, 97,252,248,241, 57, 54, 35,160, 68,117, 3,113,115,135,187,101,100,104,116,102,104,116,102, -148, 85, 27, 80, 90,169,199,245,155,122,143,136,207,214, 89,156,145,255,159,133,166,140, 0, 0,208, 27, 13,208,235,245, 30,203, -182,145,182, 45, 71, 30, 30, 30,110,239,205,194, 85,101,226,232, 9, 55, 21, 74,116, 69,233, 25, 77, 6,139,231,111, 48,194,104, -106, 72,254, 38,147, 9, 26,141, 6,106,149,250, 79,173, 19,139,193,148, 97, 31,144,179,253, 97,243,230, 12,143,141, 0,123,242, -183, 17, 63,195, 48, 16,139,197,240,245,243,105, 81,153,119,237, 62, 73,155,122, 57,251,238,158,249,239, 33, 20,241, 96,147, 94, - 4, 0,248,229, 93,198,153,194,106,139,193,150,244, 34, 76,103, 23, 0, 85,213,110,149, 39, 45, 45,141,218,210, 1,158,192, 23, - 85, 0,128,117,235,214, 97,251,246,237, 88,186,116, 41,142, 30, 61, 10,131,193,128,138,138, 10,155, 87, 86,127,125, 84, 84, 20, -116, 0,120,184,250,167,180,151,166,218,189,163, 55,239,169, 65,209, 88, 90,192, 93,121,246,145,176,140,140,140, 22,221,179,141, -252, 1,192, 83, 35, 32, 55, 55,183,141,149,252,211,190,254,250,235,115,239,188,243,206, 35, 27, 55,110, 68,183,110,221, 0, 0, -157, 58,117,130, 82,169, 20, 45, 88,176,224,196,254,253,251,191,205,205,205,141,110, 84, 16, 1,192, 81, 2,142, 21,155,205,108, -136,153, 53,183, 55,153, 77, 93,121, 12,105, 39,228, 51, 2,177,128,167,227,251, 8,107,125,253,121, 42,158,152,178, 98, 30,207, -151,207, 26, 3,174,158, 60, 37,122, 34,252, 99,167,229, 46, 40, 40,168,210,104, 52, 92, 99, 97,254,254,253,251, 95, 52, 26,141, -173,214,150,250,247,239,223,106,178,248,205, 17,247,255,210,158,253,131,108, 75,174,227,245,222, 61,176,108,251,118,183,199, 2, -216,188,127, 27,233, 55,240, 82,198,143,207,217,190,125, 59, 0, 32,180,111, 27,183, 10, 95,167, 51, 67,173,101,161,210,176, 80, -214,177,168, 85,179,110, 63,128,198, 70,254,219,123,249,246,239,175, 92,185,130,218,218,218, 59,166, 52, 86,175, 94,141,232,232, -104,216, 6,253,217,231,250,165, 82, 41, 93,189,122, 53,244, 58,157,199, 6,128, 84, 42,165,107,215,174, 69, 73,105, 41, 4, 60, - 30, 34,219,180,105, 64,254,255,248,199, 63,144,154,154,234,146,114,146,201,100, 36, 49, 49,177,129, 17,224, 24,201,112,117,172, -130,209, 96,132,209, 96,128,201,100, 4,203,154,235,201,223, 96, 48, 64,171,213,162,174,174, 14,106,181,251, 6,128,125, 10,192, - 6, 79, 61,255,205, 25,155, 1, 10, 84, 89,137,134, 90, 26, 17, 8,165, 22, 35, 32, 35, 3,169, 41, 41,110,167, 3, 28,201, 95, - 32, 16, 64, 36, 18, 65, 44, 22, 67, 44, 22,123,116,223, 13,250,117, 19, 41, 1,103, 41,173, 41,171,183,128, 78,140,193,205, 17, -113, 8, 69, 60, 36, 83, 63, 3, 91, 86, 9, 4, 5,128, 95,189, 9, 63,125,124, 2,224,241,220, 42, 75, 75, 83, 1, 26,158, 69, -167,164,167,167,163,178,178, 18,171, 86,173, 66,255,254,253,241,254,251,239, 35, 46, 46, 14, 58,157,206,209, 67,179,153,212,119, -148,248, 93, 37,104, 79,211, 1, 77, 25, 18,158,200, 73, 73, 73,169, 39,126, 79,250, 70, 99,228, 95, 79, 54,124, 62, 88,150,117, - 55, 29,224,159,159,159,255,233,204,153, 51, 15,246,237,219, 55, 0, 0,222,123,239, 61, 20, 20, 20, 0, 0,134, 15, 31,142,173, - 91,183, 98,228,200,145,190,143, 61,246, 88, 97, 78, 78, 78, 54,143,199,123,236, 86, 69, 15,132,132,134,112, 87,174, 20,178, 57, -242,125,187,187,118,141,205,137,233, 20,125,142,231, 47,169,224, 17,161,134, 17, 9,180,140,216, 71,109,228,243,140,160, 38, 30, - 39, 54,249,171, 75,171,253,142,238, 63, 61, 52, 44, 56,114,171, 83, 99,212, 46,231,191,109,219,182,167, 38, 79,158,252,181, 45, -236,175, 82,169, 24,161, 80,216,226,182,212, 90, 97,127,167, 17, 0,155,151, 63,184, 75, 44,244,149,149,208,148, 88, 72,112,180, -213, 59,116, 55, 10,112,229,183,203,183,200,110,236,184,250,108,185, 91,133,111, 41,249,219, 19, 63,165, 20, 29, 58,116,104,240, -153,201,100,170,127,213,214,214, 66,163,209,160,166,166,230,142, 41, 15,219, 60,255, 61,123,246, 52,136, 4,216,200,191, 95,191, -126,208,235,117,245,138,142,218,172, 25, 23, 21,211,202,207, 87,194,100, 50,161,125, 84, 20, 76,102,115,163,228,239,142, 34,177, - 26, 1,183,120, 37,182,169,139,205, 69, 50,110, 49, 0,140,166,122,242, 63,118,244, 24,180, 58, 29,212,106, 53,148, 74, 37,106, -107,107, 27,120,118,238,194,150, 6,240, 52,239, 15, 0,213, 85,213,168,174,174, 66, 85,117, 13,170,170,171, 81, 93, 93,141,234, - 42,139, 71,218,163,103, 79,212, 88,223,187,235,253, 3,192,192,129, 3,255,240,250,125,125,225,231,231, 15,127, 63,127,168,213, -234,196,150,180,167,230, 82, 2,206,190, 91,184, 52, 13,130,169,159, 33, 20,241,224,231,125, 6,211,150, 23,129,160, 0,236,120, - 33, 25,215,118, 92,197,195, 75,214, 3,252, 59,188,172,136,254, 26, 36, 81, 18,104, 52, 26,232,245,122,104,181, 90,228,229,229, -225,131, 15, 62,104,244,114, 31, 31, 91, 4,229,178,219,228,237,169, 87,109,255,124, 29,159,119, 83,199, 45, 49, 50, 26, 75, 11, -184, 35, 39, 41, 41,137,164,164,164, 32, 57, 57, 25, 99,198,140,241, 56, 50,241,229,151, 95, 18,150,109,168,147, 89,150,133,187, - 99, 1,226,227,227, 47,165,164,164,244,223,184,113,227,232, 67,135, 14,249, 39, 37, 37, 29,181,145,191,213, 81,133, 72, 36,162, -215,174, 93, 19,236,222,189,187,123,112,112,240,177,248,248,248,194,198,100, 41,107,149, 92,108, 76, 55,245,240,225,195,147,207, -157,251,253, 1,149, 70,221,134,178, 38, 22, 12, 76,172,129, 49, 24, 12, 6,157, 10,229, 42,206,160, 87,151, 22,151,179, 63,237, -220,181, 56, 44, 52,188,194,104,212, 58,117,223, 27,243,254, 21, 10, 5, 31, 0, 2, 2, 2,238,218,180, 0,211,148,247,191,249, -223,111, 89,172,230,242,178, 6,159,185, 59, 22, 96,210,164, 73,137, 43,159,251, 4,128,101,192,223,246,237,219,229,246, 83, 11, -183,111,223, 46, 31,243,205, 35, 0,128,147, 75,126,197,164, 73,147, 18,239,212,205,219,119,146,146,146,146,122,111,223, 70,250, -118,149, 11,181, 90, 13,189, 94,111,167, 68,238, 92, 25,159,127,222, 50,246,195,196,178, 56,119,238, 28, 78,157, 60,137,254,253, -250, 67,175,215, 67,167,211, 67,175,211,225,219,111,190,129,237, 58, 87, 58,250,242,229,203,209,171,103, 47,152, 76, 38, 92,186, -116, 9,172,201,136,210,146,210, 86,125,166,182, 99,235,154, 5,136,142,142,118, 73, 49, 25, 77, 6,176,102, 75,216,255,200,145, - 95,161,209,105, 80,167, 86, 65,169, 84, 66, 81, 91, 11,133,162,166, 69,134,152, 45, 18,208, 18, 15,231,224,193,131, 80,171,213, - 80,171, 85,214,255,106,132,133,134,162, 71,207,158,184,112,254, 60, 14, 28, 60,232,182, 76,155,247,207,231, 11,224,227,227, 3, - 63, 63, 63,248,251,249,193,207,207, 7, 53,138,154, 68, 0, 57,183, 59,212,223, 20,206, 20, 86,195,116,118, 1,170,145, 11, 50, -126, 25, 72,252,127, 80,184, 52, 13, 19,151,124, 13,177,128, 1, 4,124,203,203, 3,120,154, 10, 40,157,240, 57, 66, 54, 77,128, - 86,171, 69, 72, 72, 8, 20, 10, 5, 20, 10, 5, 14, 31, 62,140,178,178,178,250, 48,113,253,245,165,165,120, 33, 88,130, 48,159, -202,230, 60,224, 68,123, 82,181, 31, 36,103,123,111,251,204,118,173, 39,222,185,171,233, 1, 87,201,223, 83,207,191,177,251, 77, - 74, 74, 34, 99,198,140, 33, 45,185, 95, 71, 35,192, 19,242,183, 33, 44, 44, 44,255,145, 71, 30,121, 44, 61, 61,189,251,153, 51, -103,226, 37, 18, 9,111,226,196,137, 68, 36, 18,129,227, 56, 50,126,252,248,252,151, 95,126,185, 95,159, 62,125,118,252,235, 95, -255,122,202,108, 54, 87, 55, 19,243,230,126, 63,127,233, 88,159,190,253, 30, 63,118,244,232,148, 29, 59,127, 92,116,252,232,209, - 54,231, 10, 46,136, 47,149, 22,210,111, 63,249, 94,146,190,124,105,175,236,157, 59,151,119,237,210,245, 39,191, 72,223,131,241, -241,241,102,184, 88,242,164,164, 36, 28, 59,118,108,192,234,213,171, 23,232,245,122,193,251,239,191,255,225,142, 29, 59,166,151, -150,150,222, 89,226,104,105, 10, 32,244,106, 17,106,172,161,127,123,140, 14, 15,199, 50, 92,112,221,235,176,134,248, 47,156, 56, -135,160,238, 97, 24,243,205, 35,216,254,196, 15,114, 91,216,223, 70,254, 54,239,223,157, 89, 6, 91,211, 91,103, 36, 62, 33, 4, -231,207,159,135,173,177, 58,134, 89, 5, 2, 1, 4, 2, 1, 42, 43, 43, 49,126,252,248, 59, 94, 73,182, 81,255,171, 87,175,198, -208,161, 67,161, 55, 24,160,211,235,160,183, 14,110,210,233, 45,105,128, 21, 43, 86, 56, 85, 38, 82,169,148, 46, 89,178, 4,102, -179, 25, 39, 78,156,132,128,111, 9,219,198,198,198,226,106, 81, 17, 74, 75, 75,177,105,211,119,152, 62,253, 81,236,219,183,143, -218, 71, 2,154, 83, 64, 50,153, 76, 8,128,149, 74,165, 92, 99, 30,144, 59, 83, 21,109,158,127, 94, 94, 30, 52,117,218,122, 3, - 76,165, 86, 65,165, 82, 66,165,170,243, 56, 20,110,243,254,173, 43, 1,122,100, 8, 76,159, 62,189,193,113, 76,116, 52,122,244, -180, 12,138,187,112,254, 60,174, 90, 35, 30,142,215,185,130, 17,247,141,128, 72, 40,130, 68, 34,129, 88, 44,134, 72, 36, 66,121, -121,185,203,228,239, 44,212,239,233, 26, 1, 83, 62, 88,139,173, 0, 30, 74,255, 63,208,140,215, 65, 82,151,227, 76, 97, 53, 72, - 72, 48, 46,151,168, 44,222,191,155, 41, 0,199, 84,128,219,211, 3,117, 58,128, 87,232, 16,222,183, 16,189,201,100,194, 23, 95, -124,129,209,163,255, 24, 23,182,239,233, 40,160, 66,139,238,187, 20, 24, 16,222,169, 41, 5,158,227,144,251,150, 3,245,234, 95, -238,120,173, 39,132,221, 92,222,222, 83,207,223, 83, 67,226,118,223,175,213, 8,104,241, 44,128,232,232,232, 77, 35, 71,142, 12, - 63,157,159,159,170,211,233,250,201,229,251, 37, 34,177,136,207, 16, 6,251,247,239,247,239,213,171,215,250,148,148,148,255, 84, - 86, 86, 58,245,214,167, 79,155,202,253,180,251,167, 3,253,251, 15,156,107,100, 13, 15, 93, 46,184,180,136, 43, 42,100, 1, 80, - 49, 24, 83,223,174,221, 51, 34, 34,194,119,241,248,194,111,255,251,206, 98,227,183,235,214, 90,115,124, 77, 99,232,208,161, 31, - 37, 37, 37, 1, 0, 42, 43, 43,145,157,157, 29,240,213, 87, 95, 45, 2,128, 99,199,142, 13,237,221,187,247,158,123,194, 0,176, -121,231,255,248,118, 99,243, 94,134, 27, 83, 2,109,214,111,220,220,225, 8,237,219,166,158,244,237, 67,255, 39,151,252,234,150, -229,218, 90,115, 82,109,101,235,217,179, 39,206,158, 61,219,128, 88,106,107,107, 11, 1,116,105,236, 59,158,174,189,220,210,114, - 58,158,255,246,155,111,161,215,235, 97, 48, 26, 96, 52, 26,177,100,201, 18, 56, 35,127, 27, 56,206, 12,177,196, 15, 58,157, 30, -231,207,157, 3, 95, 32,128,201,104,132,143,175, 15, 54,109,218, 4, 30,143,103,155, 59,223,236,189, 46, 89,178,100,143, 84, 42, - 53,202,100,178, 8, 91, 57, 29,214, 1,112, 43,180, 57,119,238, 92,228,230,230,162,174,174, 14,117, 26, 13,212, 42,149,149,252, - 85, 80,171,212,168, 83,215, 65, 99,167,240, 93,121,118,131, 7, 15,166,199,143, 31,175,247,254, 27,155, 6,232,234, 34, 64, 9, - 9, 9,183,212,133,141,244, 79,157, 58, 85,239,205,187,122,207,131, 6, 13,162,182, 69,126,252,124,252, 32,150,136,161, 86,171, - 19,237,114,216,110, 41,222,219,181, 24,144,205, 8,152,156,254, 21,232, 22, 32,236,105, 25,114, 94, 73,198,200,197, 27, 0,129, - 0,190,226,150,229, 57, 29, 13, 1, 0,144,231, 58, 11, 54,222, 68,223, 61, 62, 40,255, 81, 11,197,194, 63,206,154, 76, 38,140, - 26, 53, 10, 0, 16, 21, 44,193, 47,178, 14, 88,250,193,117,124,126, 82,215,172, 52,123,143, 31,176, 12,132,179, 41,118,199, 65, -113,238, 78,139,179, 31,191,211, 82,207,191, 49,157,224,137,172,219,121,191,246, 70, 64,107,180,191,222,189,123,127,170, 86,169, -119, 15, 25, 52,120,168, 90,165, 10, 97,205,172, 33, 50, 50,178, 50, 42, 42,170, 92,165, 82,157,169,172,172,116, 89, 41, 76, 24, - 55,129, 3,176,233,208,193,163,121,241, 35, 71,254, 32,145, 72, 2, 9, 40, 71, 8, 1,199, 81,165, 78,163,144, 95,204, 47, 86, -127,187,110,173, 75,122,222,246,204, 0,203, 64,106,199,129,122, 31,124,240,193,127,238, 9, 3, 96,252,248,241, 57, 45, 89,240, -199,149,198,106, 51, 4,108,196,223,154,132,222,146,178,245,237,219, 23,199,142, 29, 67,101,101,125,136,176, 11, 0, 84, 87, 91, - 34, 74, 79, 60,241,196,159, 90, 89,142,207,136, 82, 74, 31,127,226,113,172, 88,177,210,154, 51,103, 17, 24, 24, 72, 92,253,190, - 13, 18,137,216, 38,207,226, 77,105,180,246,223, 1,224,116,179,137,158, 75,150, 44,185, 36,149, 74, 43,100, 50, 25,207,126, 64, -160,117, 90,160,203,138,206, 54,247, 61, 62, 62,190,213,159,221,224,193,131, 29,247, 2,168,255,220,221, 21, 0,101, 50, 25,201, -201,201,161,155, 54,109,106,176, 80,143, 77,182, 39,237, 57, 33, 33,129,152, 88, 19, 76,106, 83,171,222,123,115,161,127,119,247, - 6,152,242,193, 90,192,110,225,159,251,223,250, 99, 92,146,166,149,202,219, 32, 2,208,187,121,227,179, 52,190, 20,165, 0,226, -150, 6, 99,225,137,110, 8, 7, 80, 89,168, 65,215,174, 93, 1, 0,159, 46, 12,198,131, 67,194, 17,243, 96,129, 75,191,237,206, - 84,183,140,140, 12,121,115,203, 30, 59,211, 55,173,161,243, 90, 42,235, 78,220,111,107, 98,248,136,225,151, 0, 92,186, 37, 98, - 29, 26,234,145,188, 81,163,135, 22,161,209, 81,161, 81,232,218,173,143, 59,134, 84,171,222,103,107, 44,242,227,145, 1,112,187, - 9,108,215,174, 93, 9,219,151,220,125,123, 1,216, 58,210,144, 33, 67,176,107,215, 46,189,149,244, 57, 0, 62,183, 35,242,208, - 74,141,132,200,100,178,122,207,190, 57,242,191,157,152, 59,119,174,125, 60,181, 94, 97,219,166, 17,186,227,237,220,206,231,107, - 47, 59, 39, 39,167,197,203,254, 38, 36, 36,144,132,132,132, 22,151,203,217,218,254,173,129,150,164, 4,230,205,155,135, 43, 87, -174,180, 90, 89, 92, 89,222,215, 93,156,124, 67,129,147,176, 12, 12, 29,157, 34,193,207, 71,186, 33,210,199, 15,191, 31,191,137, -238, 46,146,191,179,246,119,183, 46,135,219, 26,107, 9,220, 75,247,123, 23, 62,255,118,173, 44,111,249,157, 42,251, 29,223, 13, -240,118, 69, 24, 90,211, 8, 24, 63,126,188,248, 30,107,128,228, 79,254,109,219, 10, 53,172,205, 0,240, 42,143,187, 7, 45, 77, - 9,116,238,220,153,116,238,220,185, 85,244,141, 59,251, 0,120,138,131, 25, 58, 28,204, 40,240,246, 89, 47,188,112,230, 68, 14, - 24, 48,128,122, 31,131, 23, 94,120,225,133, 23, 94,252,189,192,120, 31,129, 23, 94,120,225,133, 23, 94,120, 13, 0, 47,188,240, -194, 11, 47,188,240,194,107, 0,120,225,133, 23, 94,120,225,133, 23, 94, 3,192, 11, 47,188,240,194, 11, 47,188,248, 75,160,193, - 44,128,153, 51,103,122, 60, 50,181,177,121,226, 94,121,119,159,188,180,180, 52,143,228, 13, 28, 56,240, 22,121,167, 78,157,242, -184,124,141,201,187, 87,234,195,221,103,184,102,205,154, 59, 82,190,214,174,143, 59, 89,191,206,166,137,186,251,252, 90, 91,158, - 87,191,120,229, 53, 34,175, 61, 0, 5, 0, 33,128,218,187,173,124,110, 27, 0, 94,252,245,177,102,205, 26,239, 67,248,155, 33, - 40, 40,136,129,101,122, 38, 95,169, 84,114,148, 82,243,221, 84, 62,219,190,243,217,217,217,180, 53, 22,154,105,173,149,246,188, -184,125,216,177, 99, 71,194,196,137, 19,115,238,241,219,176,173,125, 37,113,215, 0,184, 43, 35, 0, 94,252,245, 64, 41,109,176, -213,177,167, 17,128, 85,171, 86, 57,189,102,236,216,177, 9, 89, 89, 89, 13, 86, 22, 27, 51,102, 76,226,222,189,123, 61,234,232, -153,153,153,141,202, 75, 78, 78,190, 43,228,221,205, 32,132,144, 78,145,145, 40, 42, 47,167,181,181,181,182,253, 25,220, 90, 98, -208,222, 88, 60,190,117, 69, 9, 33,152, 37,219,157,191, 93, 58,174,223, 55,148, 66,181,102, 79,254,172,121, 83,134, 18, 48,148, -175, 80,235,233,224,169, 47,186,189, 37,103,118,118,118,130,109,201, 89,235,127,143,150,155,117, 36,127, 91,187,111,233, 70, 59, -141,125,215, 83,153,173, 33,175,165, 91, 6,123, 18, 45,185, 29,228,191,107,215, 46,249,196,137, 19,239,117,227,204,182, 15,251, -109, 77,165,191,247,214, 75,140,159, 32,144, 49,136,133,156,161, 86,199,175,211,169,216, 15, 63, 93,209, 42, 59, 12,222, 98, 0, -180, 38, 65,120, 42,203, 93,121,132, 16,198,106,133,233, 40,165,220,221, 86,190,214, 34,216,214, 48, 0,108, 74,221,190,172,132, - 16, 3,165, 84,212,146, 72, 1, 33,132, 2,192,242,229,203, 27,236, 24, 54,103,206, 28, 57, 33, 4,148, 82,226,174, 82, 2, 0, -238,251,224, 6,231,153,105, 89,242,172,172, 44,183, 21, 96,107,202,187, 23,162, 40,148, 82,154,216, 37,134, 38,118,137, 1, 0, -148, 27,217, 25,109,132,252, 13,182,207, 47,168,234, 68,101, 46,108,156, 2, 0,199,182,124, 86,192,113,136,186,111, 68, 88,192, -135,175,140,220,219,175, 95,208,181, 89,139,135,254, 23, 0,110, 42,181,255, 39,224,147, 31, 1,114, 46, 45, 45,173,183,187,207, -198,113, 41,218,150, 44, 55,107, 79,254,173, 97, 4, 52,245, 29, 79,201,178, 53,228,165,164,164, 32, 35, 35,195,165,123,114, 39, -162,210,156,188,214,138,204,216,147, 63,199,113, 88,179,102, 13, 54,108,216, 64,103,204,152, 65,220,172, 99,161, 76, 38,107,149, -245,178,231,207,159,159,150,158,158,238,105,135, 14,176,122,254,154,219,209,135,215,175, 92,197, 60, 30, 21, 35,126, 41,249, 73, - 97, 68,207, 40, 62,159, 68, 48, 90,165,146, 21, 35,210,200,180,107,111,212,223,184,106,108,233,111,240, 93, 81,110, 82,169, 52, - 28,192, 96, 0,199,101, 50, 89,229, 93,230,233, 4, 0, 72, 2, 48, 25,192, 54, 66, 72, 54,165, 84,213, 10,114,191,163,148, 62, -234, 41,193,222, 45, 96, 24,166, 89, 35,133, 16, 50, 20,128,144, 16, 18, 65, 41,173,104,234,186,230, 12, 20, 66, 8,125,249,229, -151,209,177, 99,199, 91,182, 11, 93,190,124,121, 98,113,113,177,156, 16, 66, 93, 53, 2,164, 82, 41, 93,247,162, 47,158, 28,121, -235,230, 50,220,247,193, 88,255,139, 17, 79,187,233, 53,181,166, 60,165, 82,153,240,230,155,111,202, 83, 83, 83,145,152,104, 89, -217,238,244,233,211, 9,171, 86,173,146,119,236,216, 17, 28,199, 65,167,211, 33, 33, 33, 1, 99,199,142,117, 42, 83,168,212, 36, -116,127,115,179, 60, 43,174,125, 98,155,231,198,228, 0, 0, 91,206, 38, 92,124,151,149,155, 59, 6, 64,197,249, 66,161, 11, 64, - 69,224,177,196,103,231, 69, 56,245,142,187,116,104,211,166,163, 80, 82,246,226,172, 39, 12,145, 18,161, 80, 85,163, 35, 75,190, -218,184,225,173,231, 31, 71,176, 68, 66,245, 38, 51,253,247,138,175, 12, 0, 72,219,182, 97,252,242,242,106,102,192,128,198,119, -214, 28, 18,177, 55,246, 70,148, 79, 80,252,125,225,203, 7, 14, 10, 17,172, 91,119, 57, 58, 60, 76, 82,245,209, 43, 71,150, 23, - 93, 27,104, 30,247, 96,219,188,130, 75,234,226,167,159,236, 50,222,214,110,220,233, 3,246, 27,228,180,196, 11,117, 36,127,199, -254,233,137,252,187, 49, 2, 96, 37, 98,106, 51, 2, 82, 82, 82,236,207, 55, 32,109,251,141,125, 60, 53, 42,108,114, 50, 50, 50, - 90, 28, 37,176, 39,255, 57,115,230,224,248,241,227,244,151, 95,126,193,140, 25, 51,220, 21,101,148, 74,165, 2,153, 76,198,182, -130,138, 44,159, 63,127,254,228,244,244,244,109, 30,124, 55, 10, 64, 13,128,104, 0,167,115,115,115, 59, 1,248, 28, 64,136,189, -124, 0,159,198,199,199,187,188,231,130,142,211,241,141, 85, 6,159,113, 19, 39, 7, 42, 96, 10, 20, 8,248, 34,149, 94,204, 23, - 10,117, 44, 47,192,215, 96,148,152,116,252,242, 27,106, 49, 79, 84,171, 55, 27,140, 82,169,180,201,254,219,226, 8, 0, 33,164, - 3,128,255, 1, 40, 5,240,178, 84, 42,125,142, 82,122,253, 78,121,176, 78, 72, 58, 20,192,122, 0, 55, 0, 28, 6,240, 16,128, -103, 9, 33, 79, 82, 74,171, 91, 40,126, 26, 33,100,134,179,124,233,157, 12,177,223, 38, 12, 7,112, 17, 64, 12,128, 10, 98,101, -106, 87, 13,154,177, 99,199, 38, 0,104, 64,254,115,230,204,145,219, 71, 3,172,159,201,199,142, 29,155,224, 44, 29,144,153,153, -153, 0,160, 1, 89, 51,211, 20,176,247,222,159, 28, 41,196,211,159,105,144,153,153,153,224, 44,124,223,218,242, 0,224,200,145, - 35,114,177, 88,140,188,188,188, 6,251, 29, 48, 12,131,183,223,126,155,216,148,221,206,157, 59,229, 99,199,142,117, 90, 1,109, -142,156,147, 83,177, 0,253, 42,133,242,138, 63,182, 98, 5, 97, 40,250,189,109, 36,128, 17,103, 15, 94, 75,184,177,101,130, 28, - 56,218,172, 18, 78,236, 18, 67, 59, 10, 37,120,237,133, 25,134, 72, 63,161,176,234,108, 46,241,101,248,120,105, 84, 44,218, 5, - 73,112, 45,239, 16,209, 25, 41,153,147,246,132, 49,177, 75, 12,237,225,227,143, 50, 90, 69, 6, 14, 28,216,168,188,176, 48,225, -253, 66, 33, 35, 62,124,184,236,101,214,172,255, 56,178,125,103, 83, 80,152,128,168, 84,151,125, 58,199,248,132,133,132,136, 42, - 57,170, 50,252,116,180, 66, 51,115,212,159,211,128, 29,195,254,246,125,211, 93, 35,192,118,141,253, 56, 2,103,215, 57,219,126, -187, 53,229,217, 27, 1, 50,153, 2,128, 2, 82,105, 48, 26, 35,109, 87,209,148, 81, 97,141,200,180, 40,234, 97, 79,254, 59,119, -238,148, 51, 12, 3,134, 97, 48,106,212, 40, 28, 58,116,168, 65,125,185, 10,179,217,156,207,227,241, 76, 82,169,148, 47,147,201, - 90, 58,158, 69, 82, 93, 93,253,125,104,104,232,212,244,244,244, 45,110,126, 87, 7,203,126, 49,234,220,220,220, 62, 0,182,236, -219,183,175, 27,199,113,246, 28, 5, 30,143,247, 8,128,156,248,248,248, 68,103, 2, 11,174, 20,136, 37, 66,113,160, 64, 32, 10, -103,248,164, 45,229,137,130, 56, 30, 79,196, 17, 6, 28,225,155, 40,143, 87,199,227,136, 90,195, 51,215,248, 10, 5,132,215,165, -131, 82, 60, 49,130, 69,241,237,139, 0,124, 12, 96,159,213,178,121, 1,192,199,107,214,172,153,234, 33, 97, 7, 3,120, 25,192, - 16, 0,227, 1,236, 2,112, 12,192, 39,148, 82,133, 7, 34, 15, 90,203,181,138, 82,202, 17, 66,124, 1, 60,101, 61,223,187, 5, -134, 69,160,245,173, 47, 0,149, 59, 30,118, 19, 17, 20, 33,128,183, 0, 44,146,201,100, 70,220, 93, 24, 2, 32, 23, 64, 27, 66, -200, 38,107,157,124,227,104,208, 52,101,160,100,101,101,201,237,195,254,115,230,204,169, 63,182,127,191,124,249,242, 68,171, 97, -208,108,143,207,202,202,146,219,135,233,153,105, 10, 92,218,101,217,133,145, 25,255, 77, 61,105,115,223, 7,131,153,150, 37,119, -182,161, 79, 99,242,108,202,140,153, 38,165,238,202,163,148, 38, 28, 62,124, 24, 51,102,204,192, 23, 95,124,129,147, 39, 79, 38, -196,197,197,229, 56, 94, 35, 22,139,229,109,219,182,117, 37, 86,159,208,246,240,111,184, 56, 35, 1,126, 95,156, 5, 41,211, 38, -208,182, 62, 86,121,196,122, 9, 18, 4,250,142,242,144,182,205,111,101,155,216, 37,134,166,253,107,154, 49,210, 87, 40, 48, 93, - 62, 46, 12, 14,247, 39,242, 50, 21,166, 14,232,128, 30, 81, 65, 16,214, 94,132, 92,173, 67, 7,129, 8, 65,132, 39,152,255,236, - 12, 90, 39, 20, 21, 36,118,137,161, 8, 8,106, 84,166,162, 86, 29, 50,116,168,223,114, 21, 59,108,158,127,112,165, 72,207,248, -114, 18, 63,163, 33, 36, 44,148,241, 9, 18,243, 21, 53,101, 34,149,146,133, 64,105, 32,246,109,166, 57,131,214,154,247,151, 59, - 35,206,148,148,148, 68,103,227, 1, 26,243,252, 29, 13, 1,119,140, 0,219,103,205,145,177,253,121,103,196,232, 40,143,110, 14, -190, 85,223,164, 42,224,170,188,230,194,253, 45, 33,109, 71,163, 2, 0, 66, 66,178, 91,133,252,103,206,156,105, 73,191,113, 28, - 94,127,253,117,124,252,241,199,245,228,191,106,213, 42,183,101, 51, 12, 3,163,209,120, 74, 40, 20,178,173, 16, 9,168, 1,128, -234,234,234, 45,161,161,161,137,233,233,233,114, 55,190,203, 7,128,167,159,126, 90,148,155,155,155,149,157,157,221,102,225,194, -133,236, 59,239,188,211,128, 87, 67, 67, 67,177,127,255,254, 4, 0, 25,241,241,241, 41,205, 9,228, 17, 65,128,145,165,237, 56, -206, 20, 35,228,241, 58, 81, 66, 34, 8,159, 79,248, 60,158,146, 16,162, 3,225,169, 56,138, 96,106,228,124, 84,102, 19,186, 4, -176, 58,102,168,154,107, 53, 3,192, 33, 55, 28, 5,160, 3,165,212, 70,248, 75, 9, 33, 71,165, 82,105, 20,165,180,212, 29, 15, -150, 16,242,132,149,172, 63, 4, 48, 15,192,227,214, 16, 74, 10,128, 98, 66,200, 11,148,210,111,220, 32,233,255, 0,184, 76, 41, - 93, 73, 8, 17, 89, 59, 60, 75, 41,253,156, 16,242, 32, 33,228, 63,148,210,255,231, 97,163, 24, 13,160, 18,192,253, 0,126,116, -231,139,141, 69, 0,164, 82,233, 51, 0,222, 5, 80,158,150,150,182,250, 46,139, 0,244,182,150,109, 12,128,113, 0,174, 57, 51, -104,154,130, 61,225,219,147,190,227,184, 0,151, 59,186, 29,249, 3,192,165, 93, 79, 52, 48, 2, 60,145,103,175,204,100, 50, 25, -177, 55, 2, 92,193,129, 3, 7, 96, 52, 26, 49,104,208,160,196, 95,126,249, 69, 94, 84, 84, 36,143,139,179,108,169,203,113, 28, -210,211,211,105, 93, 93, 29, 4, 2, 1,166, 76,153,226,244,190,245,121,199,192, 24, 89,212, 14,138, 78, 20,252,114, 67,126,121, -237, 1,116,121,107,156,133,180, 56,138,252,116, 33,173,169,243,135, 78,224,135, 49, 51, 47, 57,127,142, 12,175,174,242,108, 94, -160,222, 96,102, 2, 37, 34,154, 60,160, 35, 2, 36, 2, 82, 82, 93, 7, 95,134,143,212,129, 29,233,145,223, 43,240,235,143,123, -208,201,215,143,158, 81,171,174, 1,232,222,148,184,188, 83,237,102, 13, 31, 88,117,192,143, 31,195, 10,217,155, 93, 70,143, 72, -245,211, 27,125, 39,240,252,142, 49,170,218, 26,159,162,243,199, 98, 76,198,243,149, 87, 10, 53, 1,214, 62,227,148,168, 92,245, - 78,109,227, 3,154,202, 63, 55,229, 77, 59,243, 42,165, 82, 41,245, 52,100,122, 55,193,209,243,183,144, 55,144,145,209,122,131, - 4, 91,195,243,167,148,130,101,255,224,232,145, 35, 71,226,208,161, 67, 30,145,191, 21, 38,129, 64, 96,230, 56,238, 48,195, 48, -166, 22, 26, 1, 17,182, 55,213,213,213,242,208,208, 80,105,122,122,186,171, 59,103, 21,165,166,166, 6, 28, 56,112, 32, 61, 59, - 59,187,205,215, 95,127,205, 61,245,212, 83,252,141, 27, 55,226,189,247,222, 67, 65, 65, 1, 58,117,234,132,242,242,114, 44, 88, -176,192,252,238,187,239, 38, 3,120, 33, 62, 62,254,243, 38, 37,114,108,160, 25, 76, 39,194,161,183, 9, 92,172,143, 64, 36, 20, -242,153, 50,177,128,167,226, 73,132, 85, 34, 17,175,206, 96,230,124,248, 38,126,136,145, 53,152,175,158, 60,165,120, 34,252, 99, -237, 17,120,198, 31,206, 34, 0, 15, 2,200,117, 24, 56,150, 11,224,193, 53,107,214,124,229, 6, 89, 63, 6,224, 21, 0,209, 14, -161,121, 5,128,223, 8, 33,159, 2,216, 75, 8, 49, 83, 74, 55,186, 32,207, 7, 64,154,255, 11,176, 0, 0, 32, 0, 73, 68, 65, - 84,154,205,203,167,148, 26, 28, 46,121, 18,192,239,132,144,101,148, 82,173, 39,225,127, 0, 95, 89,255,187,101, 0, 56, 18,166, - 84, 42,253, 39,128, 89,214,103,185,156, 16, 98,144,201,100,107,239, 6, 5, 66, 8,233,106, 13, 97,253, 4, 96, 59, 0, 91, 61, -193,213, 8,192,223, 13,165,165,165,242, 97,195,134,129, 16,146, 51,108,216, 48,252,240,195, 15,120,228,145, 71, 18,218,180,105, - 35,103, 24, 6,243,231,207, 39, 86,101,146,176,105,211, 38,185,193, 96,192,144, 33, 67,154, 84,116, 35,174,222,144,151, 15,235, - 9, 16,146,243,123,164, 57,177,247,233, 16,185,158, 67,162, 37, 5, 0,244,155,111, 36, 64, 53, 52,213,202,132,253,155,186,202, - 53,254, 71, 19, 31,125, 42,160, 81,175,184,196,200, 46, 91,179,102,227,235,225, 97,146, 34,165,198, 24, 24, 29,236, 43, 72,233, -223,217,103, 96,180,136,232,181,102,104,117, 28, 46, 19,157,121,123, 81,169,182,176,188,206,220, 70, 40, 46, 43, 55,234,199, 94, - 55,152, 62,244, 7, 94,107, 76,102, 64,112, 84,123, 93,221,165,118,189,146, 30, 96,206, 29, 41, 27, 93,122,225,135,235, 93, 7, -167, 69,240,122, 14, 40, 57,117,232,123, 37,225, 5, 12,225, 56,174,230,230, 77,157, 83, 43,202,145,176,157, 29,219,188,217,140, -140,140, 38, 9,219, 62,188,238, 24, 9,112,229,250,123, 21, 73, 73, 73,196,222,235,183,135,125, 8,191, 37,104, 13, 57,117,117, -117,114, 0,224,243,249,120,245,213, 87,113,252,248,113,252,242,203, 47, 45, 21,107, 0, 96, 54, 24, 12,108,105,105,105, 86, 84, - 84,148,201, 89,100,177, 25,168,237, 15,170,171,171,101,161,161,161, 15,167,167,167,187,162,247, 3,245,122,125,183,185,115,231, - 78,156, 57,115, 38,237,219,183, 47, 1, 80, 79,254, 0, 48,124,248,112,108,221,186, 21, 35, 71,142,100, 30,123,236, 49,154,147, -147,179,146,199,227,233,124,124,124,160,213,222, 74, 77, 28, 71,245, 57,242,125,153, 93,187,198, 22,199,116,138,190,196,243,151, -148,241,136, 80,201,136, 4, 74, 70,236, 83, 97,228,243,180,160, 38, 1, 39, 54, 69,168, 75,171,195,142,238, 63,253,118, 88,112, -228, 59,158, 62,200,102, 35, 0, 82,169,116, 44,128, 13, 14, 94,237,126, 0, 51,210,210,210,190,114,197,131, 37,132,240,172,225, -239, 73, 77,229,229, 41,165,213,132,144, 84, 0,219, 9, 33,223,187, 48, 79,249, 49, 0,123, 41,165,202, 38,228, 41, 9, 33,123, -173,215,125,225, 38, 41, 62, 0, 32, 20,192,108, 0,155, 8, 33, 15, 80, 74,247,123, 18, 1, 32,132, 36, 3, 88, 10,160, 19,165, - 84, 67, 8, 25, 14,224,154, 84, 42, 85, 83, 74, 51, 93,141, 0, 72, 45,166,190, 43, 74,139,200,108,110,128,107, 24, 1,224, 40, -165,148, 18,139,219,116, 13,128,134, 16,210,193, 54,206,195,157, 8,128,163,199,223, 18,239,191, 62, 44, 63,254,155,250, 40, 64, -108, 11,188,255, 63,194,252,127,132,111,165, 82,247,188,127,147,201, 68,143, 31, 63, 14,127,127,127,228,231,231, 83,179,217, 12, -149, 74,133,243,231,207,203, 67, 67, 67,225, 16,246,203,233,213,171, 87,226,230,205,155,229, 67,134, 12,105, 60,220,103, 50,209, - 14,199,207, 66,232, 31, 5, 65,126, 53,141, 52,251, 67,173, 98, 96, 62, 95, 7,132, 54,220,145,218, 55,148,205,233, 56,248, 68, -226,158, 45,211,228,192,238, 70,149,221,165,235,215,223,136,237,208, 1,168,210,189, 14, 0, 5, 58, 21,118,138, 74, 43,123,221, - 63, 58,188,151, 49, 31,191, 93, 83, 96,231,233,155,252,194,202,186, 0, 0, 40, 55,234,131,175, 27, 76, 41,133,165,165, 91, 7, -132,135, 55,106, 0,220, 63, 33,149,241, 17,142,237,203,106,126, 43,238,216, 51,169,155,242,250, 22,227,229,223,178,106, 77,156, -223,205,138,226, 95, 43, 84, 53,190, 67,192, 48,164, 70,173, 15,148, 78,139,235, 32,251,254,228,245,166,218,140, 76, 38, 35,246, - 17, 0,123,239,210, 49,220,110, 35,233,148,148, 20, 36, 37, 37,145,198, 22, 58,105,201,104,124, 79, 23, 78,185,219, 96,235,238, - 82,105,240, 45, 17, 1, 79,163, 10, 25, 25, 25,173, 66,254, 27, 54,108,160, 7, 15, 30, 4,221, 28, 12,146,170,192, 71, 31,125, - 4, 74, 41, 24,134,193,234,213,171, 61,142, 44, 40, 20, 10, 67, 72, 72, 72,226,193,131, 7,119,143, 30, 61,122, 92, 99,237,199, - 13, 4, 89,251,107, 90,117,117,245,154,208,208,208, 39, 0,212,204,159, 63,255,159,233,233,233,206, 28, 53,229,142, 29, 59, 74, -247,236,217,243, 85, 98, 98,226, 51, 61,122,244, 64, 82, 82, 18,205,206,206,174, 47,199,246,237,219, 33, 18,137,112,237,218, 53, -236,222,189,155,180,107,215,142,141,143,143,255,229,252,249,243,141, 10,140,141,233, 86,166,211,233,211, 14, 30, 60,184, 38, 52, - 44, 84, 21, 24, 16, 80, 12,161,208,192, 26,152, 58,150,103,168,213,243, 85, 85,190, 6, 95,241,141,138,202,192,253,123,118,175, -233,213,187,207, 82,163, 94, 91,215, 42, 6,128, 84, 42, 37, 82,169,212, 86,248, 54,214,215, 1,235, 52,187,250, 40, 40,128, 57, -132,144,118,176,140,112, 4,128, 70, 45,116, 43,169,188, 4,203, 0,189,171, 14,114, 28,113,213,122,221, 75,132,144,143,155,145, - 71, 0, 76, 1,176,216,137,188,175, 1,204, 35,132,124,229,164,124,246,141, 38, 26,150,241, 14,131, 96,201,253,191, 13,224, 4, - 33,164, 11,128, 34,123, 27,195, 5,121,143, 2,120,214, 74,178, 58,107, 89,117,214,227,213,132, 16, 33,128,239,154,147,103,173, -139, 39, 0,204,116,213, 0,144, 74,165,171, 0,124,211,148, 60,171,204,101, 0,252, 1, 4, 2,216, 97, 45,155, 24,150,121,226, -191, 1, 24, 70, 8,153, 13,224, 23, 0, 59,155, 42, 31, 96,153, 71,223, 68,174, 31,142, 99, 3,198,140, 25,227,212, 24, 24, 51, -102, 76, 34, 51,237,143,188,189,205, 8,176,189,183, 15,231,123, 44,111,218,173, 83, 2, 93,145,119,250,244,105,116,236,216, 17, -175,190,250,106,125,155, 89,191,126, 61,205,203,203,195,132, 9, 19,110,185,222,199,199, 71, 46, 22,139,155,148, 23,125,250, 52, -106, 59,182,197,145, 87,159,169,151,119,241,141,173, 9, 49,121, 74, 57, 51, 65,124, 75, 89,138, 11,140, 16,137,155,159,253,116, -185,164,100, 46,218,183,255, 21,192,112, 10,202,195,213,202, 87,181, 44, 11, 86,111, 9,146,157,171,172,196, 85,189,113, 61,159, - 16, 53, 8, 49, 93, 46, 41,201, 4,128,166, 6, 1,182,139,238, 49, 23,192,146,130, 67, 47, 23,137, 35,167, 40, 74,203,197,237, -203, 75,142,137, 33, 8,233, 90,116,205, 28, 85, 93,126, 29, 66,161, 32,162,119,164,239, 99,181,106,211,183, 0,174, 59,243, 92, - 1, 36, 56, 78,255,107,194, 3, 77,244,100, 77,128,198,242,255,127, 7,180,116,170,158,237,251, 25, 25, 25,180,165,242, 54,110, -220, 64,115,114,114, 64, 50, 45,134,241,222,119,252, 49,118,161, 26,163, 71,143,134, 59,211,254, 26, 67, 72, 72, 72, 34, 0,220, -119,223,125,218, 86, 72, 83, 40, 66, 67, 67,103, 0,176, 57,167,134,244,244,244,157, 46,126,151, 5, 80,177,125,251,118,249, 35, -143, 60, 50, 56, 61, 61,189,159,217,108, 38, 18,137, 4, 99,198,140,193,207, 63,255, 12,142,227, 48,126,252,120,250,242,203, 47, -147, 1, 3, 6, 24,166, 76,153,210,169,166,166,230,166, 94,175,111,138,145,217,223,207, 95, 90,223,167,111,191,192, 99, 71,143, - 46, 61,197,231,247,233,220,169,243,151, 1,161,225, 37,130,112, 49, 61,176,123,127,112,141,162,122, 84, 84, 72,248,187,221,186, -117, 59,224, 23,233,187,170,103,251, 65,198,252,252,252, 86,137, 0,240, 96,153,238, 23, 15,224,125, 0, 47, 90,137,199,215,190, - 63,193, 50, 72,236, 50,128,127, 91, 83, 2,199,155,144,207,192, 50,200,108, 47, 0, 31, 23,202,115, 24,192, 88, 52,189,176, 2, - 3, 32, 28, 64, 39, 0, 39,156,200, 60, 97,189, 46, 2, 77,231, 38, 25, 88,150,113, 12,182,166, 13, 30,177, 18,119,129, 85,118, -129,245,120, 35,128, 31, 96,153,113,160, 0, 96,116, 34,111,154, 53,242,208,195,106, 36,217,151,179, 12,128, 20,192, 5,235,181, -223, 59,145,247, 10, 44,179, 27, 92, 73,101,248, 0,216, 3, 96,131,147,250,152, 10,224,191,214,255,167,236,202, 39,176,214,101, - 6,128,207, 0, 44,180,126, 94,214,212, 15,238,221,187, 55,135, 16,130,226,226, 98,185,109, 38,128,163,215, 95, 92, 92, 44,183, - 93,235,236, 6,146,147,147,115,178,178,178,176,254, 23, 99,253,200,125, 71, 47,125,253, 47,198,250,107,239,164,188,188,188, 60, -140, 26,213,112,168,123,116,116,116,226,230,205,155,229,157, 59,119, 78,228, 56, 78,190,104,209, 34,106,155, 6, 72, 8,193,224, -193,131,155, 52, 42,186,231,229,225,187,208,136,196, 0,187,115, 61,103,143,133,102,233,117,224, 31, 17,160, 28,144,191, 72, 64, -235, 56, 63,212,232, 2,160, 32, 3,209,127,212,142,196,230,154,189,117, 6,199, 22, 0, 91,186,118,138,234, 14,224, 85,131,153, - 67,102,126, 17, 70, 69, 90,210,157,132, 82,181,154,101,223,191,121,243,230, 77, 23,218,212, 82, 0,190, 5, 23,106, 30,175, 61, -177, 57,172,162,172, 6, 21, 55,213,224,243,171,125,235, 20, 20,181, 42, 51,141, 8, 23, 6,241, 57, 76,214, 25,204,223, 45,124, - 53, 62, 40,162,231, 83,181, 78,136, 38,199, 25,185,180, 56,135,157,180,217,242, 63, 59,213, 77, 15,248,246,206, 2, 32,169, 10, -180, 68, 94, 83, 30,251,160, 65,131,238, 26, 67,164,126,176,163,141,252,243, 89,172,149, 91,250, 88, 75,201,223,214, 54, 94,120, -225,133,112, 62,159, 95,113,248,240,225, 47,239,187,239,190,150, 76, 81,236,152,158,158,190,210, 26, 5,152,102,157, 17, 48, 45, - 61, 61,253,123, 87,130,138, 0,234, 0, 84, 69, 71, 71,247, 31, 57,114,100,233,233,252,252,182, 58,157,142,200,229,251, 33, 18, -139,192, 16, 6,251,247,239, 39,189,122,245,210,166,164,164, 12,171,172,172,116,218,231,166, 79,155,202,254,180,251,167,207,250, -247, 31,216,217,200, 26,198, 93, 46,184,244, 44, 87, 84,248, 12, 0,136,193,208,190, 93,187, 31,139,136, 8,207,225,241,133,111, -252,247,157,197,117,223,174,243, 60,163,220,152, 1,240,170,213, 26,154, 0,224, 60, 0,191, 70,190,183,203,234,177, 39, 3, 24, -106, 37,207, 70,163,156, 0, 98, 1,108,114,209, 0,168,182, 94,207,107, 70, 94, 2,128, 75, 46,202,187,100,189,126,107, 51,242, -210, 0, 60, 13,224, 44, 44, 51, 20,174, 58,200,150, 91,189,255, 89, 86,111,120, 29,208,228,136, 11,158,213, 99,127, 18,192, 0, -107, 20,161,177,114,170,172,159,175,182, 26, 1,235,154,145,247,181,213,232,114,229,126,169,245,250,230,158,223,135,214,200,198, - 94,171, 81, 3, 7,217, 63, 3,232,101,173,139, 2,171, 33,213,161,217, 31,181,100, 16, 40, 0,121, 99, 11, 1,217,174,113,167, -131, 63, 45,149,210,167, 63,211, 52,178,112,143,194,109,130,104, 45,121, 47,189,244,210, 45,215,140, 30, 61, 58,103,244,232,209, - 4, 0, 30,120,224, 1,183,148,208,174,151, 94, 34, 1,142, 26,165,147, 95,142,100, 69, 79, 2, 0,189,101, 2, 98, 9,202,216, - 70,102, 95,115,177, 25, 88,235,197, 76,139,192, 7,120,117,168, 39,127,171,139,124, 83, 44, 22,187, 58, 27,133, 0,120,239, 80, -246, 41,159,200,246,157, 30,230,224, 19, 91, 82, 92,206, 51,233,107,105,155, 8, 63,226,231, 43, 32,172,137,131,162,214,200, 18, - 9,145, 40,213,108,215,136,166, 29,130, 70,201,194,241,253,159,185,124,239,237,158, 5,208, 82,121, 77,121,236,157, 59,119,190, -107,200,159,251, 62, 24,123,243, 45, 99,242,214,201,141,248,238,176, 17,148,210, 86,169, 87,155, 12,179,217, 92, 13, 0,113,113, -113, 45, 90, 16,200, 70,254, 86, 84, 89,255,187,218, 55,132, 86,199,236, 36, 0,244,238,221, 59, 74,173, 82,207, 27, 50,104,240, - 19,106,149, 42,144, 53,179,166,200,200,200,155, 81, 81, 81,151, 84, 42,213,194,202,202,202, 2, 87,203, 53, 97,220, 4, 22,192, -139,135, 14, 30, 29, 25, 63,114,228, 4,137, 68, 18, 70, 64,205,132, 16,112, 28,173,214,105, 20, 43, 47,230, 23,151,125,187,110, -109,139, 86, 4,116, 52, 0,204, 0,254,217, 12,129,216,227,152,245,101,182,190, 26,131, 25,150, 17,245, 60, 23,203, 35, 7,144, -237, 68,222,118, 88, 6,173,185,130,199, 93, 40,223, 26, 0, 95, 58,145,243, 59, 44, 83, 32,225,130,188,111,172, 17, 3,103, 40, -178,122,246,174,148,143,231, 70,157,174,113, 34,239, 31, 46,200,179, 69, 27,214, 89,159,141,211,185,182,148, 82, 50,118,236,216, - 4, 27,225,219,135,224, 61, 89, 10, 88, 38,147,145,204,204,204, 4,102, 90,235, 44,221,219,218,242,238, 5, 20,150,220, 48,196, -118,232,176,110,230,210,213, 79,219,206, 25, 5,204, 6,189,150,219, 83, 94, 92,172,118,169, 49,173, 89, 67,171, 78,172, 37,139, -191,255,109,238,206, 21, 15,108, 59,114,180,236,249,240, 64,110, 34, 19, 18, 16, 68, 41, 64, 8, 53, 24, 88,174,156, 3,170,140, - 6, 46,168,180, 76,103,140,117,163,140, 41, 41, 41,137,246,233,128,148,148,148,196,187,229,249,221,141, 43, 1,222, 43,120,112, -161,250,182,222,163, 76, 38,227,164, 82,105, 91,177, 88, 92, 22, 23, 23,247,143,214,144,153,158,158,190, 47, 52, 52,244,233,244, -244,244,117,110, 24, 0,172, 53,114, 10, 0, 24, 62, 98,248, 98, 0,139, 29, 47,116, 28, 35,228, 42, 70,141, 30,250, 11, 44,169, - 88, 7, 68,161,107,183, 62, 45,190,231,198, 12, 0,189, 7,114,104, 51, 33, 18,131, 87,222, 95, 86, 94, 3, 88,137,190,213, 58, -122,114,114,114,142,179,121,249,127,166,188,123, 1, 53, 90,237, 51,128,143, 9, 64, 56, 7, 90,170,215, 27, 55,150,151, 87,158, -161,148,186, 60,109, 42,108,208, 63,233,246,143,198,145,155,190,143,230,181, 31,137,188,236,175, 62,124, 53, 36, 68, 52,143,207, - 35,180,172, 90,127,177,204,200,174,151, 8, 24,177,132,207,227,153, 88, 78,236, 78,249,108, 57,126,219,192, 51, 79,247, 1,184, -101,234,159, 93,232,223,147,197,102, 28, 61,115, 87,206,223,105,121,119,218,240,113, 21,204, 52, 5, 8, 33,152, 56,233,143, 1, -209,187,118,159,172,215, 33,227,199,197,181,214, 20,197,242,214,212, 55, 86, 35, 96,157, 27,151, 7, 91, 13, 0,205,189,170, 31, -248, 14, 15,148,186,170,236, 29,209,216, 40,118,175,188,191,182, 60, 47,238,126, 84, 87, 87, 83, 88,210, 92, 45,194, 77,223,201, - 20, 0, 14,109,248,132, 36, 61,243,218, 71, 79,166,229,127,246,226,244,195,189,140, 26, 18, 19, 34,224,135,129, 16,173,159,132, - 95,217,167, 71, 64,129,187,178,147,146,146, 72, 70, 70,134,199,235,205,223, 46,242,188, 87, 34, 0,119,159,241, 96,137, 13,253, - 13,186, 87,148,213, 97,246,199, 61,186, 27, 32, 25, 48, 96,192,223, 99,136,172, 23, 94,120, 1, 62, 15,240, 17, 17,112,156, 69, - 71,215,233,188,221,223, 11, 47,254,182,250,192,251, 8,188,240,226,239, 3,214, 12,168,180, 54,210,247,146,191, 23, 94,252,157, -193,120, 31,129, 23, 94,120,225,133, 23, 94,120, 13, 0, 47,188,240,194, 11, 47,188,240,194,107, 0,120,225,133, 23, 94,120,225, -133, 23,127, 69, 52, 24, 3, 48,115,230, 76,143, 71,110, 54,182,182,118, 99,242,126,252,254,127, 9,125,250,117,149,183,109, 31, -149,168,214,105,228, 7,228,121,137,201,211, 94,200,241, 84,222,138,175,182, 36, 12,232, 55, 76,126,179,180, 20,190, 18, 95, 92, - 47, 41, 76,124,238,153, 73, 30,203,107,237,251, 61,123, 96,102,194,240, 97,157,229, 18, 95, 30,248, 60, 6, 68, 76, 80,166,122, -153,120, 42,239,228,205,126, 9, 67,134, 13,145, 7,250,241, 0, 62, 80,115,122, 13,113,181,124,177, 15,198,122,124,191,151,126, -190,116,139,188,161, 67,135,122, 44,239,232,209,163,183,202,139,245,188,124, 71, 47,221, 90,190, 97,221,186,121, 44,239, 72, 65, -193, 61, 39,239,193,102,234,119,241,226, 12, 58,111, 94, 74,147,159,255,220, 72,253,198, 62,244,160,231,237,101,207,207,183,182, -231, 7, 61,111, 47,139,179,170,105, 0, 87,216,224, 92, 88,236,163, 30,203,171,186,244,221, 45,229, 59,245,214, 53,143, 21,233, -192, 69,157,110, 57,247, 81, 88,169,199,242, 94,173,138,194,159,161,175,254,238,242,164, 82, 41,191,177,157, 5,239,197,251,117, -219, 0,104, 10,250, 77,210, 88, 0,157, 97, 89, 39,160, 80, 60, 93,118,213,213, 31,216,242,205,226, 4, 2, 14,225, 65, 33,200, - 59,112, 82,254,245,215,159, 32, 62, 41, 30,172, 70, 43,239,213, 99, 52, 56, 14,242,223, 99,190, 78, 28, 56,176, 31, 46, 95,190, - 6,101,173, 6,125, 71,204,200,105, 74,222,154,111,229, 9, 20, 4,157,186,118,150, 75, 95, 91,136,234, 79,183,224,155,255,125, - 14, 64,140, 93,103, 74,192, 48,144,127,242,222, 59, 40, 40,184,136,232,232, 78, 16, 73,248,184, 81, 82,208,228,226, 34, 87,182, -126, 78,133, 66, 33, 36, 18, 9, 10, 11, 11,209, 46, 34, 0, 97,124, 63,180,235, 24,132, 96, 73, 32,124,137, 25, 12,195,128,114, -102,104, 69,124, 40,111, 42, 81, 49,216,249, 92,114,101,225, 74,234, 47, 81, 98,196,144, 46,240,243,229, 67, 40, 97,192,231, 1, -140,144,143,238, 81,255,163, 38,202,195,149, 27,207,184, 92,225, 43,118,235, 19,162,162,162, 16,127, 95,123,185, 78,111, 0, 35, -146, 0, 38, 32,191, 46, 46, 65,167,213, 96, 88,196,197,156, 63,203,138, 92,179,102, 13, 77, 75, 75,251, 91,205,175,191, 91,225, -140,232, 91,120,189, 47,128, 33,109, 36, 62,255, 45, 45, 45,237, 33, 16,139,192,249,248,124, 0,203,202,152,117,119,203, 51, 40, -252,125,119,194,213,115, 7,110,217,107, 32, 41,229,131,191, 74, 27, 37,223,172, 95,127, 65, 36, 20, 74, 56,142, 11,244,245,243, -243,123,120,226, 68, 31, 88, 86,176,187, 91, 71,118,218,162,205, 92, 75, 5, 73,165,210,128,192,192,192, 57,221,187,119,159, 34, - 18,137,218,151,148,148,148,148,150,150, 30, 53, 26,141,139,100, 50, 89,161, 7,242,130,130,131,131, 23, 62,240,192, 3,227, 94, -120,225,133,232, 47,190,248,226,230,217,179,103, 15,235,245,250, 5, 50,153,236,236,223, 38, 2,208, 4,249,243,124, 69,252, 33, - 79,140,236,178,140,163, 84,127,232,226,205, 79,207,111,146,238, 21, 79,151,157,115,246,221,148,137, 93,233,196, 7, 22,195, 84, - 87, 11,190,153,193,111,231, 46,226,169,167, 94,254,163, 69, 48,192,175,121,235, 16,214, 49, 74,206,213,169, 96,228, 8,246,239, -207, 75, 44,209, 53, 85, 81,139, 40,132,129, 32, 62, 1, 56,121,174, 24,103,206,253, 19, 95,125,247,115,253,231, 28, 7, 60, 52, - 98, 4, 80, 87, 14,192, 31,133,103,207, 67, 16, 22,132,248,225,125,228,181,218,102,108, 22,194, 0,132,193,128,126,113,104,227, - 43, 68,187, 48, 49, 2, 66, 67, 16, 44,242, 71,176,152, 7, 1,143, 7,147,217,140, 90,150,195,177,170, 19, 78, 31,106,249,153, -133, 52, 36, 16, 8,240,241, 65,120, 88, 40, 2, 2,124, 64, 25, 51, 88,174, 14,102,152,225,231,231,131,176, 54,237,209, 57,246, - 23,154,125, 96,100,179, 74,105,117,150,145, 6,250,251,162,115, 76, 4,194,195, 66,161,209,104, 32, 20,137, 33,208, 91, 22,231, -139,137,238, 36,175, 81,212,226,251,188,162,196,226,146, 27, 80,148, 95,195,162, 23,226,154, 53, 6, 50, 22,103,184,172, 36,146, -158, 78, 74, 12,142, 12,206,105,142,252,239,132, 17,240,214,210,165, 20, 0, 22,189,241, 70,171,252,198,252, 37, 75, 40, 0,164, -207,157,235,177,188,159,114,115,159, 50, 26,141,235, 0, 96, 74, 98, 34,227,137,242,149,109,222,108, 89, 35,222,110,218, 52,165, - 20,132,144,250,255,182,115,182,235,210, 82,154, 38,236,121,243, 82,136,171,164,238, 38,249,247,242, 53,177, 91,252,131, 2,123, - 0,128, 80, 34,134, 81,167, 7,167,209, 46, 57,124,240,192,123,247, 79,157,218, 19, 64,177, 51, 33, 6,158,144,194,178,120, 10, -107, 37, 5,206,170,135, 26,213, 69,253,239, 31,135, 11,251,183,187, 85, 71, 87,207, 29,144,119,237,147,144, 24,221,243, 33,247, -141,226,148, 26,183, 46, 79, 77, 77,197,230,148,236,102,175, 73,204,110,184, 21, 73,175, 32,203,173, 86,232, 57,232, 88, 75,189, -106,172,255,101,195,130,208,205, 95,208,172,188,101,203,150,229,188,245,202,235, 17,147,166, 76,246,211,235,117,248,228,163, 15, -153, 21, 43, 86,232,103,207,158, 29, 5,224, 70,107,247,189, 61,123,246, 36,109,219,182, 45, 11,112,111,205,129,188,188, 60, 90, - 84, 84,132,234,234,106,168,213,106,248,251,251, 35, 52, 52, 20,209,209,209, 24, 49, 98,132, 71,253, 78, 42,149,142,142,139,139, - 91,255,218,107,175, 93,238,222,189,251,186,129, 3, 7,158,191,121,243,102,251,188,188,188,184,103,158,121,102,167, 84, 42, 93, - 34,147,201,190,114, 67, 94,226,148, 41, 83, 50, 22, 47, 94, 28,106, 50,153, 32,145, 72,224,235,235,219, 86,163,209, 76,157, 52, -105,210,195, 82,169,116,182, 76, 38,251,223,189, 72,238,167, 79,159,110,112,220,216,134,110,252, 38, 72,191, 3,128, 46,176, 44, - 25,107,214, 24,216,235,121,151, 42, 62, 30, 17, 27,241,242, 3,189,218,190,215, 38, 80,210, 78,190, 73,186, 9,192, 69,241,116, - 89,147,155,212, 24,234,106,208,166,235, 63,176,240,141, 41, 88, 39,251,163, 47, 30, 56,188, 26, 26,173, 1,227,147, 94,198,125, -241, 79,227,209,212, 7, 32,145,136, 96, 52,179, 80,107,141,242,110,195,187, 54,209, 56,174, 1, 70, 96,202,140, 85,120,238,181, -231,235,207, 62,116, 95, 2,196, 98, 17,126,216,255, 51,118,229,230, 97,253,218,207,161,215, 25, 32,228,241,225,231, 35,132,166, -186, 36,177,182, 4,141,238, 62, 70, 41, 5, 40,103,121, 49, 28, 40,165, 48, 24, 69, 22,245, 36, 2,168,209, 12, 51, 15, 48,195, - 12,179,145, 3,107,110,222,128, 45, 60,154, 78,219,135, 83, 4,248,251, 34,170,125, 12,122,244,237, 10,127, 63, 9,148,117,149, - 40,175, 44,135, 66,121, 19, 38, 61,129,143,143, 15,194,195,227, 49,117,242, 89,186,101, 91,247,198,195,248, 27,174, 83,179,191, - 63,116,124, 64, 40, 22, 66,167, 21,194,168, 21, 66, 47, 22,129, 79, 88, 80,240,160,215,213, 65,167, 85,163,125,251,118,114, 33, -143,143, 26,168,240,241,199, 7, 33, 18, 53,223, 56,150,174, 95,234,180, 1,189,241,228, 27,205,126,174, 80, 40,168,195,241,160, -144,144,144, 2, 66,136,158, 82,202, 15, 14, 14,246, 41, 44, 44, 12,205,200,200,200, 73, 75, 75,107,231,105, 67, 22, 70, 70, 78, -175,255, 13, 32, 33, 24,104,181,104,199,154,140, 12, 58,107,214,172, 68, 83, 69,133, 91, 50,127,202,205,149, 14, 29, 58,116,209, -200, 1, 3, 96, 18,137,176,124,249,114,110,234, 3, 15,140,161,148,102,187,229,202, 17,130,101,239,189, 87,127, 60,231,221,119, -177,124,193,130,102,143,157,193,209, 8, 88,188, 56,131, 14, 26, 52, 8,217,217, 87,104, 82, 82,231,222, 0,174, 44, 94,156,161, -115,147,252,243,250,246,238, 29, 96,235, 51,190, 98, 9,202, 42, 43,160, 82,212, 34,110,232, 48,159,159,190, 90,155, 61,225,153, -127,246,134,101,243,130,230,192,190,180,104, 5,255,241,169, 15,243, 99,163,163, 57,155,103,248,238,242,207, 26, 92,180, 96,206, -139, 22,195,239,149,217,137, 79, 78, 28,227,118,189,122, 68,254,245, 22,114,136, 27, 23, 39,185, 37,218,151, 79,112,102,193,179, - 32, 1, 97, 48, 95, 57, 3,195,149,223, 81, 80,163,193,224,221, 21, 46,125,127,181, 76,118,232, 53,233,172, 78, 79,254,235,153, -160,140, 13,223,113,209,209,209,204,194,197, 75,224,255,222, 66,252,240,195, 15,165,143, 60,242,136, 71,134,104, 19,196, 63,102, -219,182,109,123,109,199,147, 39, 79, 30,235,202,247,212,106,117,194,222,189,123,229, 38,147, 9, 93,186,116,193,168, 81,163, 16, - 24, 24,136,218,218, 90,220,184,113, 3, 87,175, 94,197,141, 27, 55,232,216,177, 99, 19,253,253,253, 93,174, 39,169, 84, 58,249, -129, 7, 30,248,100,217,178,101,155, 6, 14, 28,248,137,205,216,105,215,174, 29,166, 78,157, 74,146,147,147,253, 0,228, 73,165, -210,188,166,118, 47,117,148, 55,123,246,236,204, 89,179,102, 49, 39, 78,156, 0, 33, 4,161,161,161,245,175,221,187,119, 11,135, - 15, 31,254,185, 84, 42, 61,226,138,188,187,153,252,109,231, 28,239,131,223, 8,249,135, 14,142, 9,125,114, 64,167,144, 25,132, - 16, 1,165,212,196, 89, 94, 70,179, 73,175, 19, 50, 92,187,190,109,196,111,132, 5,116,233,186,237,216,213,239,244,155,164,135, -196,211,101,101,205,168,111,244,234,217, 29, 12,147,131,130,218,106, 0,231,161, 44,189, 4,129, 88,132,237, 59, 63,133,182,202, -140, 25,255,124, 21, 28, 7, 76,124,120, 4,204,124, 63,167, 55, 87, 80,112, 30, 28, 7,140,239, 79, 0,180, 3,208, 9,122,131, - 17,201, 15,141,133, 56,136,193,250,141,123,192, 48, 64,230,119,235, 80,122,229,247,196, 71, 18, 98,115, 46,158,106, 92, 22, 71, - 1,142,227,192,113, 28,204,102, 51, 12, 2, 10, 19, 49,193,104, 52, 66,235,163, 7, 56, 49, 24,106,134, 89, 72, 81,103,212, 67, -163, 82, 54, 91,182,112, 63, 3,248,124, 9, 66, 67, 67,209,181,107, 87, 68,182, 25, 6,240, 24,152,205, 39,192,208, 90,232, 53, - 44,204,156, 6,229, 55,106, 16, 30, 90,133,208,160,120, 40,212,243, 19, 26,219,228, 69,162,103, 65, 13, 85,128, 94, 4, 35, 99, -130, 70,200, 71,157, 68, 0,190, 64, 8,112,190, 32, 60,130, 58,141, 22,138,242,107, 40, 60,145,139,154,226, 98,112, 28, 7,134, -242, 60,106, 52, 95,173,250,195,112,126,102,230, 51,206,245,164,117, 95,119, 91,211,201,200,200,152,247,218,107,175, 61, 95, 92, - 92,204, 16, 66,194,101, 50,217,119,176,108,238,228,211,130,182, 44, 88,185,114,229,198,155, 55,111, 34, 51, 51, 19,131,187,119, -231, 5,247,237,219,226, 14,146, 62,119, 46, 81, 0, 9,148, 82,249,138, 21, 43,228, 0, 32, 77, 77,117,217, 43, 49, 26,141,171, - 71, 90, 59,147, 80, 40, 68,183,110,221,176,101,255,254, 44,107, 52,192,101, 57,183,107,171,218,121,243, 82, 72,118,246, 21,122, -226,132, 37, 98,101,247,255,247,251,239,191,191,116,222,188,148, 64, 87, 57,203,215,196,110,233,219,187,119, 0,143, 97,240,194, -227, 51,160,211, 27,176,252,203, 47,225, 35,145, 64,175,215, 67,175,211,161,255,192, 1,177, 63,111,216, 48,235,193, 25, 51, 62, -118, 22,117, 92, 48,231, 69, 14, 0,115,169,168,136,113, 36,124,199,238,233,201,189,119,232, 49, 58, 49, 59,227, 77, 58,102,226, -179,137, 84, 20,235,145, 33, 96,191,107, 31,221, 28,236,244,188, 83, 11, 42,136,143,107,117,102, 28, 24, 19, 14,193,203, 50,168, -102,196,128, 31, 28,225, 22,249,239,219,183,175, 60,186,109,187, 27,255,122,225,249, 14,111,190, 58, 23, 43,214,174, 62, 55, 52, - 46,174,243,234,207, 86,251,188, 50,247,117,108, 24, 49, 12, 27, 55,110,124,226,177,199, 30, 91,223, 66,226, 79,216,182,109, 91, -189,195,100, 13,171,191, 4,203, 86,233, 78,177,119,239, 94,121,120,120, 56, 6, 14, 28,200, 50, 12,195,183, 68,103, 57, 8, 4, - 2,132,132,132,160, 77,155, 54,184,122,245, 42,246,238,221, 43,159, 58,117,170, 75,125, 69, 42,149,166, 76,152, 48,225,195,101, -203,150,125,214,189,123,247, 85,132, 16, 14,192,231, 0, 30, 4,112, 16,192, 2, 74,105, 17, 33,228,117, 0, 11, 92,145,183,108, -246,236,239, 71,166,164,144, 29, 59,118,128,207,231, 67, 46,151,227,204,153, 51,232,218,181, 43,222,127,255,125,244,233,211, 7, -207, 63,255, 60,255,237,183,223, 94,118, 47,146,127,218,188, 15,254,112,116, 22,191,217,168, 17,208,216, 44, 0,134,207, 99,248, - 44, 71,213, 58, 19,123,131, 16, 34,242, 19,241,250, 5, 8, 49, 88,210,251,254, 46, 72,124, 14,232, 49, 10,109,125,233,228, 39, -226, 99,222, 12, 9,240, 25,163,223, 36,109, 70,153,112,224,241,108,132, 20, 0,160, 61, 2,163, 38, 64,103,214, 99,149,108, 45, -190,217,152,137,177,137,241, 0, 0,173, 22,224,241,155, 22, 37,241,233, 14, 0, 48,155,237,247,166, 41, 7,144, 7,134, 39,194, -147, 79, 61,139,228,212, 84,252,180,211, 66,100, 62,190,128,166,174,172,217,135,101, 2,175,158,252, 77,172, 25, 6,149, 9,218, - 90, 45,106, 77, 70,212,104,141, 80, 24,212,168, 85,215, 65, 81,161, 70, 77,173, 30, 53,117, 77, 47,161,126, 70,190,152, 18, 66, -192,227, 17, 16, 70, 4,179,153,130,213, 22, 67, 83,123, 9,165,229, 74,212, 40,234,160, 84,155, 81,163,208,163,164,164, 28,231, - 46,156, 70,173,242, 52,134,197, 13,106,114,111,116, 30, 0, 70,173,135,238,242, 13, 84,255,118, 30,213,197,215,160, 82,214, 64, -165,172,193,181,115, 39,112, 56,227, 43,228,109, 94,143,202,203,151, 97, 54,114,150,133,177,121,119, 38, 13,152,150,150, 70,172, - 97,127, 99,114,114,114,207,133, 11, 23,190,214,182,109, 91, 77,102,102,102,191,140,140,140, 31, 1, 12,180, 86,186,199, 11, 78, - 9, 35, 35,231, 0,192,240, 62,125, 48,107,214,172,138, 99, 23, 46,100,159, 58,123, 54,161, 53,202, 31, 12,228, 72, 83, 83,201, -236,217,179, 19, 1, 64, 16, 17,225,150, 92,147, 53,204,178,101,203, 22, 68, 68, 68,224,205,217,179, 49,103,206, 28,108,149,203, -239,138, 60,172,141,244,101, 50, 89,253, 11, 0, 14, 28, 56, 16, 5,224, 97, 23,197, 12, 9, 10, 14,238,193, 99, 24,252, 51, 57, - 25,181, 74, 21, 74,202,110, 64, 32,224,131,207,183,188, 4, 2, 1, 68, 18, 31,116,137,142,254,232,242,241, 19, 46,109,230,115, -169,168, 8,223,110,249,177,254,101,195,187,203, 63,195,187,203, 63,195, 46,249, 1, 15,238, 88,157, 0, 0,221,251,142,207, 73, -154,248,108, 98,214,142, 47,229,217, 25,111,222, 21,117,145,255,245,199,168,120, 46, 14,247,103, 85,162, 87, 16, 31,188,128, 16, -176,138, 10, 12,222, 93, 1, 95,190,133, 3,121, 78,230,100, 93,189,124,185,122,141,236,127,221,191,254,223,215,248,244,203,207, -175,125,190,236,195,119, 95,123,241,165,135, 23, 46, 90, 8,137,191, 47, 70, 13,143,199,177,163,199,190, 62,148,123,200,227,123, -118, 36,255, 29, 59,118, 96,200,144, 33, 93, 0,204,112, 53,236,111, 50,153, 16, 23, 23,199,153,205,102,190, 82,169,132,193, 96, -128,193, 96,192,133, 11, 23, 32,151,203,145,155,155,139,182,109,219,194,100, 50, 33, 47, 47,207,105, 89,165, 82,233,244,212,212, -212,143,167, 76,153, 18,176,106,213,170, 0, 66,136, 16,192, 1, 0, 74, 0,113, 0,126, 4, 96, 51, 60,247, 1,232,227, 76,222, -182,215, 94,251,254,225,254,253,201,134,228,100,148,158, 58,133, 15, 63,252,144,251,233,167,159,254,223,245,235,215, 35,228,114, -249,115,243,230,205,131,201,100, 66,124,124, 60,124,125,125, 71,224, 30,135,189, 49,208,128,236, 29, 79,136,167,203, 42,127,189, - 92,185,122,221,193,203,175, 94, 40, 85,238,101, 64,249, 0, 5, 38,188,143, 95, 7,125,136,255, 42,146,177,191,247, 18,224,193, -249,240, 23,112, 3, 31, 26, 16, 61,195,154, 46,184, 5, 59,246,215, 16, 64,133, 73, 79,189, 12,142, 3,128, 26, 88,150, 77, 54, -161, 83,247, 56,136, 69,124,152, 89, 3,168,209, 66,170,254,254,254,168,174, 81, 52,121, 19, 31,127,244, 26, 1,128,115,191,126, - 9,134,105,232, 36,112,186,223,161, 55,152,192, 19,136, 65,132,150, 28,154, 90,165,194,136, 17,205,215, 29,159, 51,130,227, 56, -176, 44, 11,131,193,128, 58,142,133,210,104,130,170, 76, 5,229, 13, 37, 84,229, 53,168, 81,213,162, 92,175,133, 74, 83,139, 90, - 67,211, 99,157,252,253, 52, 96, 89, 14, 6,163, 25,181, 74, 21, 10, 46, 23,227,232,137,124,252,122, 52, 31,231, 47, 20,162,228, -122, 21,234, 52, 70,168,235, 12, 40, 43, 85,226,236,239, 87,145,151,119, 10, 37,101,229, 77,202,180, 55,117, 88,165, 6, 37,167, -207,227,183,221,251,145,181,246, 35,236,223,180, 22, 37,133,151,193, 81, 19, 56, 66,234,137,223,157,228,154,179, 48,191, 51,240, -249,124, 0,184, 9,224,102,112,112,112,137,191,191,191, 97,222,188,121,199, 96, 25, 48,198,192,178, 86,118,129,167,242, 87,174, - 92,153,158,156,156, 12, 0,136, 9, 15,143,176,230,196,121,173,217, 57,108,225,127, 91, 36,192,133,240,127, 18, 0, 44, 95,190, - 28,151,202,202, 48,101,236, 88,216,162, 1,249,249,249, 0, 96, 51, 2, 92,170,138, 57,239,190,139,215,223,123,175, 62,188,111, -123,111, 59,182,189,119, 37,252,111, 67,118,246, 21,219,214,186, 13,206,219,142,179,179,175,124,235,138,156, 32, 62,255,191,122, -163, 1, 60, 30, 15, 23,174, 20,226, 74,201,117, 28, 57,125, 6, 70,163, 9, 12, 8,248,124, 62, 8, 33,224,204,102,232, 52, 90, -228, 31,200,217,239,130, 88,198,158,244, 31,159,250,240, 45, 30,255,145,147,249,176,143, 16,184, 6,187,112,178, 40, 54,199, 54, -232, 47, 59,227, 77, 42, 96, 47, 37,252,169, 26,184,166, 12,194,142,221, 80, 49,235, 62,228,127,253, 49,248, 97,109,235, 63,170, -152,117, 31,194,196, 12, 2,248,205, 55,151,238,177,221,219,249,248,248,250,124,250,197, 74,125,226,253,247, 11,135,141, 24,190, -225,234,229,171,220,133,203, 5, 0, 71, 33, 22,137, 16, 63, 40, 30, 59,119,236,196,182,109,219,220, 50, 2,246,236,217,147, 32, -149, 74,169,141,252,247,238,221,139,213,171, 87, 27, 1,224,232,209,163, 70,169, 84,250,152, 43,169,133,162,162, 34, 88,183, 38, -102,138,138,138,144,149,149,133,252,252,124,104, 52, 26, 40, 20, 10, 28, 63,126, 28,197,197,197,184,126,253, 58, 58,117,234,132, -162,162,162,102,229,205,156, 57,243,201, 71, 31,125,116,105, 66, 66,130,223,177, 99,199, 2,180, 90,237,191, 36, 18, 73, 14,128, -207,100, 50,217,124,153, 76,166,180, 26, 0, 67, 8, 33, 66, 74,169, 9,205, 76,111,159, 61,123,246,147, 63,204,153,179, 33, 62, - 34,130,176,115,231, 98,132,209,136, 99, 59,118,208,210,210,210,103,101, 50,217,187, 50,153,172, 18,192,186,115,231,206,177, 44, -203,194,207,207, 15, 81, 81, 81,126, 38,147, 9,127, 69, 52,150, 2,136, 4,208,101,242,224,142, 47,116, 8,245,157, 1,147, 14, -232, 62, 6, 39,195, 39,227,129,217, 95, 65, 87, 85, 11, 94,128, 63,228,159, 60,137, 81,189,126, 69, 72,126,214,104, 0, 29,155, -250,129,174, 1,237,241, 91,254, 86, 59,123, 67, 3, 75,154,208, 4,152, 12,224,115, 60, 48,214,126,191,237, 7, 75,186, 41,126, - 92,106,211, 13,245, 44,197, 67, 3,237, 13, 60, 98,189, 13, 1, 32, 16,131, 37,102, 88,253, 96, 76,155,241, 18, 0,200,175, 29, - 94,211,100,207, 50,115, 20, 44,199,128, 97, 89, 48, 70, 3,180, 86,203, 66,199,227,193,151,213, 65,165,163, 32, 2, 2,179,217, - 12,173, 25,168,208, 24,209, 84, 50,155, 53,114,208, 11,120,224,180, 44, 88, 78, 9,117,157, 9, 60, 34,128,129, 53,193, 72,141, - 96, 77, 70, 64,200,129, 33, 0, 17,113, 80,234,204, 40,175,212, 66, 99, 96, 27,117,146, 25, 98,174, 55, 0, 8,249,131, 79, 76, -122, 29,148, 53, 53, 96, 8, 15,124, 62, 5, 40, 31, 60,226,121,226,239,226,181,139,198,238,157,186, 11, 93, 9,251, 55, 8,147, - 18, 2,137, 68, 2, 0, 58, 0, 70, 62,159,143, 43, 87,174, 96,241,226,197, 15, 3,184, 62,111,222,188,129,129,129,129, 65, 74, -165,242, 90,109,109,173,219,225,110, 97,100,228, 51, 0,208,166, 77, 27,251, 14, 92,251,217,103,159,101, 3, 72, 26,216,183,239, -190,214,234, 8,179,103,207, 78,116,197, 0,248, 41, 55, 55, 97,232,208,161, 81, 35, 7, 12, 0,241,247,199,226,197,139, 49,119, -238, 92, 8, 4, 2,152, 20, 10, 4, 6, 6,226,205,217,179,235,199, 5,184, 50, 56,208, 49,199,239,108, 76, 64, 83, 88,236,198, -224,206, 19, 39, 78,224,196,137, 19,245,215, 55,149,227, 84,212,212,244,240,243,247, 71,149, 66, 1,249,145, 35,224, 51, 60, 24, - 76, 38,104,117, 58,112, 28, 87, 63, 88,145, 53, 25, 97, 52, 24, 92,169, 99, 14, 0, 99, 77, 3,112,118, 13, 95,111, 61,143,119, -151,127, 38, 4,128,216,232,232,138,171,231,126,107, 81,189, 38,165,124, 64, 46,156,204, 76,216,189,237, 75,121,107,204, 2,112, - 39,236,223, 32, 44,187,249,127, 24,240,212,171, 16,197,244,179,232,138,170, 50, 20,212, 88, 54,145, 19,141,152,128, 98, 51, 11, -159, 21, 71,154,149,161, 82,169,130, 68, 18, 49,186,198,196,136,175,150, 92,111, 91, 93, 89,141,105,143,207,144,239,218,151,133, - 79, 62, 88,158,185,109,215,142,228,216,152, 88, 60, 57,245, 9,228,157,204,197,182, 45, 91,232,100, 23, 66,236,246, 94,255,222, -189,123, 49,102,204, 24,155,177, 40,188,113,227, 6,158,127,254,121,161,237,246,157,201,170,174,174,198,168, 81,163, 96, 54,155, - 81, 84, 84,132,220,220, 92,244,234,213, 11,129,129,129,232,208,161, 3, 6, 12, 24, 0,134, 97,192, 48, 12,218,182,109, 91, 31, -165,220, 29,174, 51, 0, 0, 32, 0, 73, 68, 65, 84,106,194, 83,239,213,175, 95,191,143, 71,140, 24,193,203,207,207, 15, 48,155, -205,229, 91,182,108, 81,233,116,186,197, 50,153,204,222,128,125, 97,220,184,113,197,187,118,237,138, 33,132,148,161,137, 29,109, -165, 82,233,192,217,137,137,235,134,241,249,164,114,209, 34, 80,147, 9,114, 30,143,203,211,106,159,150,201,100,223,216,219, 29, -239,188,243, 14,159, 97, 24,212,212,212,224,202,149, 43, 21,125,250,244,137,248,203, 27, 0,250, 77,210,216,200, 64,201,200,113, -253,163,158, 15,144, 8,134,178,102, 78,193,167,230, 0, 4,181,229,149,213,234,161,171, 82, 2, 66, 62,204,181,106,148, 40,140, - 64,104, 71, 48,156, 81,220, 92,136,247,178, 74,133,110, 65, 1, 96, 13,192,229,156,111,209, 53,225,193,122, 7,206,100, 52, 65, - 0, 6,117,122,203, 14,181, 15, 37,196, 65, 18, 26,213,108,129, 31,234, 75,176,235, 12,133, 64, 12, 8, 59, 62, 8, 99,241,161, -122,199, 65, 32, 20,193, 4, 61,252, 36,150, 29, 73,119,236,218,132,223,142,230, 36,206, 24, 59,168,105,109,196,113, 16, 26,117, - 48, 65, 8,134, 97, 1,189, 69,177,153, 76, 38, 24,244, 2,240,248, 2, 64, 15, 80,206,146, 34,232, 20, 29,211,164, 44,173,158, - 3,143, 71, 96, 98, 77,208, 27, 56,168,212,150,118,104,226, 40,140, 6, 14,224, 3, 60, 1, 15,124, 49, 64,116,102,112,132, 5, - 7, 29,212, 58,107, 64,218, 9,204, 0, 24, 14,160, 4, 96, 24, 14,132,240,192, 81, 2,134,177,142,165,226, 24,112, 12, 3,194, -185,230, 32,219,121,255, 66, 79, 27,144,143,143, 15,172,222,126,248,149, 43, 87, 42, 22, 47, 94,156, 8,224,145,121,243,230,141, -237,220,185,179, 70,173, 86, 87,179, 44, 91, 79, 20,238,240,255,202,149, 43,191, 76, 78, 78, 70,116, 88, 88,253,201,232,176,176, - 32,107, 20, 32,252,207,232, 48, 70,163, 81,110,243,246,169, 90,141,127,255,251,223, 48, 84, 87,215,143,124,235,106, 53, 86, 4, - 6, 3, 30,126,248,225,138,210,138,138,199,162,124,124, 54,220,137,178,217, 15,234,179,207,255, 55,134, 65,131, 6, 33, 41,169, -115,253,245,141,173, 3, 0, 0,172,193,136, 90, 99, 13,244,122, 61,130, 2, 3, 33, 22,138, 96, 50,179,160,148,194,108, 54,195, -104, 52,194,100, 50,129, 99,205,174,214, 47,119,169,168,136,137,141,142,182,121, 4,220,165,162, 34,230,219, 45, 63,138,237, 35, - 2,177,209,209,181,104,165,193,108, 61,226,146,115, 74, 10,143,183,202, 51,246,116, 12,192,253, 89,149,168,136,206,132,176, 99, - 55,144,152,126,232,180,246, 20,170,244, 28,124,249, 4,198, 95,126,192,197, 43, 87,157,238,159,167, 99,141, 56,145,119, 20, 31, - 47,251, 8,247, 37,140,196, 59,255,239, 61,252,188,251,103,108, 88,255, 13, 70,140, 30,153,220, 33,186, 35,248, 62, 2,236, 59, -180, 15, 27,191,254, 6, 91,127,216,130,157, 59,119,210,255,251,191,255, 35,205,144, 44,117, 36,126, 27,106,107,221,223,224, 78, -173, 86, 35, 48, 48,240, 8,128, 97,209,209,209, 24, 52,104, 16,120, 60, 75,154,181, 83,167, 78, 16,137, 68, 80, 42,149,136,142, -142,134,191,191,255, 53,181, 90,221,169, 41, 89, 50,153,236,156, 84, 42, 77,223,186,117,235,248,216,216,216, 30, 91,182,108,169, - 83, 40, 20, 11,100, 50,217, 70,187,242, 79,190,255,254,251, 95, 91,187,118,237,102, 0, 21, 0, 82, 0,252, 10,160,127, 35,242, - 78, 73,165,210,244,160,227,199,223,122,148,101,241, 17,192,125, 89, 87,247,132,131,188, 71, 94,122,233,165,143,210,210,210,112, -245,234, 85,236,220,185, 19, 44,203,238, 7,240,232,189, 66,234, 3, 6, 12,192,233,211,167,235,243,254,205,134,226, 28,142, 59, - 79, 30,220,113, 97,128, 68, 48,180, 82,165,255,249,240,165,202,197,224,137,128,139,135,240,143,104,138,249, 47, 62,140, 65,189, -163,241,146,116, 28, 38,118, 49, 2,103,247,130, 10, 36, 44,154, 29,172, 83,139,130,218, 98,240, 69,192, 67, 19, 95,197,198, 79, - 63, 0, 96, 4,180, 6,152,117,192, 15,242,211,200, 62,102,153, 81,216,190, 99, 12, 24,190,115,242, 26,223,159,192,164, 7,118, -236,220,131,193, 99, 95,180,120,255, 16,128, 39, 1, 82, 39,164, 96,252,232, 73, 0,128,146,107,133, 96,245,198,230, 45,122, 74, -193, 18, 11,193, 27,140,150,193,127, 6,189, 14, 90,173, 22,117,117,117, 80,171,148, 80,171,213, 80,169,235,160,175,171,131, 78, -167,107,186,241,215, 17,232,244,102,232,244,102,104,180, 38,168,235, 12, 80,168, 13,168, 85, 25,161, 84,155, 80, 91,107,249, 95, - 83,205,162, 70,193,162, 70,201,162,170,198,136,155, 85, 77,151,145,161, 20,102, 0,196, 76, 64, 24, 14,148, 80,128, 82, 80,202, -131,153,251,163,250, 56,171,246,112, 55, 54,222,115, 68, 79,228,238,202,197,207,251,127,174, 55, 10, 46, 94,187,232,210,119,121, - 60, 30,248,150,250,138, 2,208,101,201,146, 37,103, 0,172,120,243,205, 55, 95,233,220,185, 51,107, 9, 18, 88, 10,230, 38,249, - 19, 97,100,228, 54, 0,136,140,140,188,229,195, 89,179,102,177,199, 47, 94,220,212, 90, 99, 1,108,225,127, 87,247,141, 55,217, - 77,177,248,254,251,239,113,185,220,146,194,249, 41, 39,167,193,103, 23, 47, 94,140, 8, 15, 15, 87,252, 25, 74, 32, 41,169, 51, - 99, 85,104,142, 10,191,193,231, 78, 13,188, 0,255, 11,156,217, 12, 85,141, 2, 85, 85, 85,168,174, 85, 64,163,213, 66,163,213, - 66, 93, 87, 7,141, 82, 5,117,109, 45,244, 58, 45,140,122, 61, 56,214,236, 84,231,196, 70, 71,219,116, 6, 7,192,104,159, 14, - 0,128,111,183,252,136,119,151,127, 22, 4, 32,210,221,251, 62,127, 50, 51,193, 49,239, 95,248,251,238,132, 63, 91, 41,151, 77, -139, 70,167,181,167, 64, 98,250,193,112, 32, 19,215,254, 57, 16,190,124,130, 67, 99,194,193, 42, 43, 49,120, 79, 5,156,100, 0, -144,156,156, 76,158,123,121, 38, 46, 95,188,136,188,156, 67, 8,244, 15,196,244,105,211, 17, 20, 26,130,147, 71,143,195, 79, 40, -134,175,175, 47,218, 70,183,195,166,239, 54,225,205,183,223, 66, 93,173,231,187,212,198,197,197,185,253, 29,127,127,127, 40,149, -202, 97, 12,195, 24, 59,116,232,128,161, 67,135,162,119,239,222, 8, 11, 11,131, 88, 44, 70,116,116, 52,250,247,239,143,160,160, - 32,168,213,234, 78,254,254,254,205,202,147,201,100, 75, 15, 28, 56,144,181,126,253,122,129, 66,161,120,199,129,172, 83, 70,141, - 26,245,241,218,181,107,191,138,140,140, 92, 68, 8,241, 3,240, 38,128,119,155,145,247,246, 66,181,122,233,179, 44,107,254, 82, -167,123,204, 65, 94,242,163,210,255,108,125,241,149, 57,188,139, 23, 47,226,200,145, 35, 88,187,118,109, 29,128,249,247,154,103, -239, 24,209,107, 42,194,231,168, 4, 68, 60,134,248, 23, 87,107, 54,108,202,187, 58,255,244,181,154,163, 58, 51,185,140,170,171, - 16,111,125, 1,139,226,213, 56,190, 96, 40, 62, 73,172,131,239, 15,179,128,154, 18,212, 81,241, 89,171,229,213, 4,254, 24,213, -127, 38,255, 71,252,231, 63,235,209, 53,160, 47,126, 63,124, 6,123,229,231,241,255,217,251,242,248,166,170,244,253,231,220, 36, -109,218, 2, 93,216,119, 40, 82,118, 89,138,208,130,208, 4, 82,168, 32, 42,218, 2,194,136,157,130, 77,113, 28, 65,196, 65, 69, -197, 13,149,249, 89,192,113,161, 41, 35, 95,112, 6, 6,104,113, 97,147, 37,144, 84,150,150, 90,112, 97, 17, 40, 20, 40,148,165, -208,164, 91,246,228,158,223, 31,201, 13,105, 73,147,155,180, 8,104,158,207, 39,144,187,244,205,185,247,158,123,158,247,125,207, -123,222, 87, 26,223, 15,137,163,236, 29,141, 10,132, 48,219,248, 95,100,210,224,222,120,255,255,125,132,157,199,170,209,172, 91, - 95, 60,250,232, 36,236,218,247, 13,182,239,250,159,253,226,108, 22, 4,139, 60,143,115,148,181,193,198,218,173, 25, 56,172, 25, -179,217, 12,163,209, 8,131,193, 0,157,222, 0,131, 94, 7,131, 94, 7,189,201, 8,179,201,216,176,251,203,208, 28, 85,181, 54, - 84, 27, 88, 84, 27, 88,251,247, 26, 22,181, 58, 43,106,245, 86,104, 53, 54, 84,104, 44,168,208, 90, 80, 81, 97,193,205,155,102, - 92,191,105,241,168, 0,220,114,255,187,180,153,115,223, 8, 40, 4,132,128,214,139,250,167,196, 59,217,190, 50,243, 21,244,137, -239,227,220, 86,174, 81, 58, 61, 2, 7,119, 28,196,233,139,167,121, 37,123, 98, 89,251,111,229,230,230, 30,160,148,246, 79, 78, - 78,158,217,189,123,247,214, 0, 24,150,101,131, 45, 22, 75,164,213,106,109,225, 70, 1, 96, 61,184,254, 23,127,254,249,231, 19, -146,147,147,209,189,117,107, 94, 83, 87,141, 1, 23,252, 55,180,119,111,175, 1,108, 61,219,181,147,102,102,102,226,196,197,139, -213, 95,239,222,141, 83,167, 78, 57,173,254, 94,189,122,193,113,204,252,245,238,221,184,120,241, 34, 78, 23, 21, 25,188,201,188, - 19, 49, 0, 0,104, 66, 66,194,243,174,164,207,253, 31, 27, 27,203,203,157, 11, 0,197,167,206, 21, 89,173, 86,152,205, 38,104, -174,151,227,198,213,107,184,121,237, 58,110, 94,187, 14, 77,249, 13, 84, 86, 84,192,164,211,217,227,103, 42, 43, 49, 88, 38,243, -118, 15,173,139, 51, 63, 21, 46,206,252, 84, 8,160, 26, 0, 59,124,200,131,183,157,228, 18, 23,192, 27, 39,143,230, 74,202,206, - 21,169, 6, 14,187,213,134,243,103, 15, 73, 42,111,148,168, 26,211, 63,200, 20,109, 29,203,223, 31,156,209,232, 80, 58,251, 33, -208,243,191,162,205,170,163, 8, 91,121, 4, 87,167,118, 67,236,206,114, 16, 81, 48,132, 4, 16, 50,222, 21,208,191,189,240, 2, -121,243,163,247,241,226,130,249,176,176, 54,156,186, 80,140, 25, 79, 79, 71,144, 88,140,239,190,221, 2, 88,108, 48, 25, 77,216, - 95,116, 8, 6, 67, 45,210, 83, 83,243,138,138,138,168, 7, 66, 36,147, 39, 79,150,142, 27, 55, 14,132, 16,236,217,179,231, 54, -151,254, 43,175,240,143, 19,106,217,178, 37,174, 92,185, 2, 0,194,172,172, 44,220,184,113, 3, 3, 6, 12, 64, 68, 68, 4, 24, -134, 65, 97, 97, 33, 24,134, 1, 33, 4, 87,174, 92, 65,203,150, 45,189,202, 84, 40, 20, 31,152,205,230,209, 10,133, 98,163, 11, - 89, 63, 61,106,212,168,204,217,179,103, 71,102,101,101,137, 9, 33, 12,128,111, 0, 44, 80, 40, 20,215,189,200,251,199, 97,139, -101,104,125,121,211, 22,126,189,233,169,233,127, 35, 19,230,100, 65,125,248, 36, 50, 51, 51,217,234,234,234, 52,133, 66,113,225, -126,116,239, 15, 26, 52,200,249,225, 53, 5, 0,224,220,255, 14,157,127, 65,163, 51, 29,129, 61,112,171,125,126,241,141,236,209, -189,219, 46, 18,158, 63, 28,133,255,123, 6, 8, 14, 3, 76, 58,128, 82, 88, 4,226,235,251, 79, 92,253, 18, 64,131,217,151,214, -175,251, 66, 58,125,198, 76, 21, 0,232, 88, 11,206, 86,150, 2,176,225,129, 22,221, 33,149, 62,136,182,173,218,161,162,170,218, -238, 43, 48, 91,113,181, 82,135, 62, 30, 46,170, 83,151,120, 92, 46,205,119,188,153, 66, 36, 13,180,199, 0,236, 60,102,193,174, -109,185,184,126,243, 10, 90, 70,216, 87, 18, 68, 4,137,240,224, 80,207,235, 55,205, 16, 34,136,181,194, 6, 1, 88, 66,192,216, - 88,192, 98,133, 77, 36, 4, 8, 3,238,157,100, 41,236,185, 2, 60,224,137,105,175,146,111,255,179,128,134, 6, 81, 8, 69, 46, - 30, 6, 11, 96,165,128,209, 12,216, 76, 54, 16, 66, 64,130, 8,172, 54, 64,103, 2,102,165,254,147,184, 75,229,104,115,209,208, - 88,134, 5,113,184,255,237, 74, 1,129,141,101,192, 8, 28, 43, 5, 0, 80, 1, 5, 40, 63, 47,128, 43,249,187,219, 62,184,227, - 96,119,175, 83, 18, 54, 27, 76, 38, 19,146,147,147,251,229,230,230, 46, 7, 48, 40, 55, 55,119,103,110,110,238,254,228,228,228, - 23,122,244,232, 97, 33,132,180,252,228,147, 79,118,191,250,234,171, 51, 52, 26, 77,158, 7,229,211,217, 39, 23, 44, 88,176,120, -193,130, 5,216,185,115, 39,116,215,111,127,151,187,183,110,141,243,231,207, 3,128,138, 79, 98,160,134,146,254,136,218,180,145, -124,254,249,231, 42, 74, 41,134,246,234, 37, 29, 50, 96,128,218,155,172, 1,125,250,168, 9,195,140, 63,245,227,143,221, 0, 4, - 3,248,151, 37, 56, 24, 34,147, 9, 61,219,183,199,252,249,243,113,240,224,193,165, 49, 49, 49,121,253, 59,118,244, 26,163,224, - 46, 15,128,191, 49, 0,174,224,242, 0,196,197,165,252, 88, 80, 80,126, 80, 46,151, 7, 57,166, 9, 70, 0,200,231,155, 4,168, -219,192,190,175, 27,174, 94, 27,199, 90,109,189,117, 85, 85,168,186,121, 3,132, 48,160,148,133,209,104, 4,165, 20,148, 82,156, - 63,249, 27, 44,102, 19, 30, 24, 26,235,237, 30,186,142, 57, 17, 0,152, 9,210, 4,118,130, 52,161, 78,208,159, 99,138,128, 55, - 78,253,252,181,228,202,185, 34, 21, 0,116,235,218, 21,223,213,243, 2,180,238, 50, 68,122, 55, 7,227,161,223,151,163,232, 17, - 96, 80,172, 12,229,127, 27,129,118, 95, 28,194, 25,141, 14,145, 65, 4, 21, 26, 45,132,132,120,245, 0,112,152, 57,115,102,157, - 51,183,110,221, 74, 39, 76,124, 4,219,182,108,195,166, 77,155,240,246,162, 55,177, 91,189, 23, 2,161, 0, 29, 59,117, 76,168, -170,242,188,116, 57, 41, 41, 73,157,148,148, 68,118,238,220, 41, 25, 55,110, 92,157, 88,128, 61,123,246,224,236,217,179, 70,133, - 66,209,158, 79,219,186,117,235,134,146,146, 18,244,237,219,215, 58,111,222,188,160, 13, 27, 54, 32, 60, 60, 28,167, 78,157,186, -205,243, 90, 82, 82,130,110, 60,159,179, 66,113, 43,241,156, 92, 46,127,230,161,135, 30,122,247,233,167,159, 14, 47, 42, 42,106, -110, 52, 26,255, 26, 18, 18,242,168,193, 96,248, 88,161, 80,124,199, 83,222,207,174,242, 30,253,251,134,181, 15,143,157, 76,254, -169, 4, 72,135,199,240,193,138,215,169,166,248, 84,154, 66,161,200,193, 31, 24,117, 20, 0,241,211,138, 19,154,255,201,207,136, -159, 86,112, 83,154,165,199,255, 39,255,190,198,104,213, 13,127,160,213,132,168, 80,193, 67, 2,147, 49,204, 74,153,154,138, 26, -115, 65,254,217,107,187,202, 52,250, 60,241,211,138,171, 88,185,210,237, 15,212,234, 90,171, 51,254, 54, 71, 10, 64,197, 10,184, -105, 62, 1,206, 86, 95,197, 91, 47,164, 65,175, 55,161,218, 96,143, 1, 48, 51,193, 24,147,228, 57,205,238,155,139, 82,201,206, -237, 67,237, 47,183,141,179,156,173, 72, 26, 64, 48,237,249,101, 8, 13, 13, 70,139, 16,177, 20,128,170,248,248, 81,105,124,127, -207, 9, 65,132,212, 10, 51,177, 43, 1, 32, 4, 54, 74,237,138,128,213,177,220,143, 48, 16,178, 44,172,220,178, 3, 47, 74, 64, -165, 33, 2, 6, 83, 5,130,132,140, 51,205,153,149, 5, 44, 22, 10,139,149,162,214,192,130, 8, 8,108, 32,176,176,183, 92,247, -110, 9,150,101,192, 16, 27,136,141,128, 50,212,233,254, 39, 13, 24,207,156,164, 23, 95,146,146,149, 43, 79,121,180,240,126,203, -255,173,177,125,199, 76, 41,133,193, 96,192,128, 1, 3,174, 70, 71, 71, 79,190,112,225, 66,207, 77,155, 54, 21, 2,120, 60, 55, - 55,247,113,215,147, 63,250,232, 35,245,171,175,190, 42,213,104, 52,222, 8,194,121, 67, 50, 50, 50, 26, 60,233,169,103,159, 5, -224, 91, 98, 32, 46,235, 94,125, 12,235,211, 71, 58,152, 7,249,115,232,223,171,215,110, 87, 79, 70,102,102,230,103,147, 38, 77, -178,158, 62,125, 90,120,241,226, 69,116,107,217, 50,191, 99,104, 40,175, 0,197, 59,145, 7,160, 30,185, 95,207,203,203,115,141, -241, 56,230, 80, 4,248,102, 12,212,133,180,111,247,212,169,189,251,242, 35,194,194, 90, 84,107, 43, 97,181, 90, 65, 29,239,129, -246,122, 57,170,181, 90, 80, 74,249, 88,255,246,151,245, 86,204, 9,227, 88, 14,200, 12, 31,242, 32, 38, 72, 19,156,137,129,138, - 47, 92,224,175, 4,232,127,145, 92, 46, 46,116, 90,249,223,229,124,169, 2,128,214,209, 35,165, 3, 99, 39,169,239,222,240, 74, -111, 87, 2,176, 10,131, 50,222,194, 53,150,197,192, 53,133, 40, 76,106,139,126,219,174, 67, 72,128,230, 34,255,106,179, 77,154, - 52,137,236, 83,239,163, 99, 18,199, 98,203,230,111,241,222,210,143,176,176,170, 10,148,101,177,113,227,102,148,149,149, 61, 10, - 96,155, 87,143,170, 27, 69, 0, 0, 38, 79,158,252, 51,128, 26, 62,109,137,143,143, 39, 87,174, 92,161, 71,143, 30, 13, 26, 50, -100, 8,198,142, 29, 11,149, 74,133, 46, 93,186,192,100, 50, 33, 33, 33, 1,148, 82,246,232,209,163,140, 72, 36,242, 57, 35,160, - 92, 46,239, 27, 30, 30,190,124,234,212,169,162,147, 39, 79,182, 48,153, 76, 13, 5, 6,242,149, 55,184,227,160, 41,107, 7,141, -158, 74,190,204, 3,170, 13,128,249,252, 78, 86, 83,172,170, 31, 24,120,223,128,203, 3,224,106,249,187,219,231,214,149,234, 66, -254,220,246,111, 23,255, 39, 47,189,120,179, 54, 31, 64,123,199,203,107, 2, 80, 6,160, 68,252,180,194,171,139,115,200,192,199, -212, 39,126, 45,149,218,104, 51,149,235,203, 81,171,171,182,175,251,103, 66,241,143,143,249,167,152, 76,154,216,159,188, 63,231, - 81, 9, 24,189,202,149, 11,155, 53, 11,135,205,162, 5,168, 14, 23, 15,101,147,153,211,146,188,202,178, 64, 0, 80,106, 39,106, - 8, 16, 68, 29,138,128,131,252,237, 57, 0, 1,216,248,205, 77,164,166,191, 65,178, 63,125,155, 90, 45, 26, 8, 29, 11,123, 41, -165,176, 89, 41,140, 22,160,186,198, 10, 11, 40,172,148,129, 80, 68,176,228,221,207, 26,188,238,217,179,237, 65, 90,107,215,156, -165,196, 98,183,254, 41, 0, 74, 9, 64, 29, 22, 3, 21,128, 8, 88,176,172, 16, 47, 47, 24,199,235, 30,206,126,111,182,244,194, -185, 11,158, 8, 88, 4,251, 82, 13, 79,236,196, 2,128,201,100,130, 86,171,213,134,135,135, 35, 54, 54,246,151, 97,195,134, 5, -223,184,113, 3,231,206,157,179, 47, 15, 99, 89,201,230,205,155, 85, 14, 37, 64,197, 67, 9,176,164, 36, 37,165,116, 27, 48,192, -246, 80,239,222, 58, 71, 31, 53,161,238,138, 72,164, 36,217,159,109, 55, 30, 73,129, 94,121,229, 21, 41, 0, 12,237,213,235,182, - 99,177, 3, 7, 54,138, 32, 6,244,233,243, 5,195, 48,182, 83, 63,254, 24,214,182,109,219,155,253, 71,140, 88,123, 55, 95,126, - 55,164,174,139,141,141,117,141,182,118,174, 99,245, 65, 9, 56, 57,120,236,152,225, 91,254,253,229,230,232,238,221,250,154, 76, - 70,216, 44, 86,176, 44,139,230,145,145,168,210,104, 48, 88, 38,147,242,176,254, 1,160,242,157,151,255,222, 6,128,185,248,194, -133, 32,110,254,255,240,209, 95, 49, 65,154,192, 46,206,252,212, 91,114, 32, 39, 98,218,107,233,169,211,167,164,251,118,125, 87, -199,197, 63,102,252,227, 82,166, 69,124,163,158,107, 67, 1,126,238,247,243,231,176,161,223,151, 3,223,191,224,220,126,224,187, - 91, 75,128,171, 44, 54,191,219, 59, 70, 50,134,124, 85,250,213, 35,227, 38, 38,237,120,238,153, 89, 7, 30, 28, 56,224,225, 45, -223,109, 69,254,207, 71,144,158,158,190,125,101, 3, 6,154, 23, 69, 96,214, 55,223,124,243,239,111,190,249, 38, 46, 41, 41,137, -119,227,198,141, 27, 55,102,247,238,221,251,182,109,219,134,232,232,104, 36, 38, 38, 34, 60, 60,252, 76, 85, 85, 85,204,137, 19, - 39, 80, 82, 82,194,136, 68, 34,140, 27, 55, 78,230,235,117, 58, 2, 3,151,110,221,186,181,193,192, 64, 31,229,253, 36,151,203, - 63,252, 54,247,177,215, 13, 29,103,192,240,227, 27,236,149,253, 75,158,241, 87,222,189,168, 8,240,246, 0, 52, 4,241,211, 10, - 29,128, 95, 29, 31,191,240,204, 51, 47,168, 51, 50, 94,149,102, 41,222, 83,117,236,218, 19,128, 9,162, 96, 49, 46, 95,173, 70, -194,164,153,196,119,121,143,169, 31,232, 29,131, 53,171,191, 6,216,139, 0,132,176, 26, 13,232,216, 62, 92,218,165,133,149,255, -203,111, 99, 33,100, 88, 88,136, 16, 34,106,189,165, 8,192, 10, 80, 27,248, 6,134,185, 34,253,239,111, 19, 0, 88,252,218, 28, - 42, 18,218,173,125, 43,107,119,153, 87,214, 80,216,172,128, 64,200,226,139,207,249, 41, 61,207,166,218, 83, 35,175,254,242, 52, - 5,151, 19,158, 1, 88, 98,119,247,207, 95,240,168, 79,141,172,170,173, 82, 71,182,141,108,108,255, 98, 0,251, 42, 10,131,193, - 0,155,205,134,234,234,106, 8, 4, 2,216,108, 54,180,107,215, 14, 22,139, 5, 10,133, 66, 85,207, 19,160,242, 86, 51, 96,240, -128, 1,185, 0,208, 20, 25,255, 0, 32,138, 16, 53, 0, 68, 13, 28,120, 71,204,188,126,189,122,101, 53, 70,192,203,139, 23,215, - 89, 37,177,224,237,183,235,120, 6,124,153,251,119, 67,230, 58, 79,171, 1,124, 72, 7,124,234,177,217,179,250, 3, 16,156,202, -203,179, 24,245, 6,176, 54, 27,250,196,198, 74,219,199,244, 69,183,129,125,249,189,115,148, 76,221,245,253,118,231,230,136,190, -209,206,239,187,190,223,126,219,182,167,208,248, 51, 87, 35, 9,211, 34, 30, 99,199, 19,233,201, 83,231,112,245,226, 49, 21, 0, -236,219,245,157,170,109,151,115,210, 1,195,255,226,179, 18, 48,101,202, 20,248,154,222,215, 70, 60,231,221, 46,157,220, 14,223, - 95, 49,222,241, 1,127,230,204,153,223, 3, 96,138,138,138,216,189, 5,121,104,217,170, 37, 26, 83,159, 35, 41, 41,233,203,164, -164,164,175,224, 61,189,115, 29, 52,111,222, 92,245,212, 83, 79,145,252,252,124,122,238,220, 57, 20, 22, 22,162,166,166, 38,166, - 41,106, 1, 56, 72,251,255,201,229,114, 81,126,126,254, 0,179,217,252,134,235, 92,190,159,242, 22,201,229,127, 17,133,247,248, -106,126,213,185,221, 51, 26, 43,239,110,131, 91, 5,224,110,191, 95, 10,128,175, 83, 9, 13,186,170,158,124, 86,189,125,215, 89, -242,196,196, 80,218,166, 99,103,104,106,172, 72,152,248,140,223, 29, 33,254,161,222, 36,254,161,215, 33,151,191, 69,129,235,136, -108, 46, 68,151, 40,214,167,151,126,232, 95, 23,220,177, 2, 54,239,124,184,146, 0,192,220,121, 47, 80,179,193, 2, 22,246,101, -115,203, 63, 95,238,215,111,166,205,178,215, 12, 88,253,239, 83,148,165, 2,188,246,234,227,119,179,186, 89,144,171, 27,219,100, - 50,193,108, 54, 59,137,140, 35,176, 64,149, 64, 47, 46, 72, 31,210, 15,251, 9,243,194,133, 41,193, 14, 15,138,173,145,178, 40, - 0,107,239,132,132, 58,109,238,214,190, 29,111, 1,193,172, 73,253,236, 36,159, 13, 63,212, 47, 5, 92,199,254,110, 17,167,238, - 55, 44, 14,253,134,161,209,247,210, 91, 97,159,250, 58,176,149, 4,195,192,120, 94,145,122,174,198,138,152,230,124,134,200, 38, -233, 10,116,232,208,161, 77,217,167,252,206,128, 19, 31, 31, 79,188, 37, 98,107, 4,105,127, 32,151,203,191,117,141, 13,104,164, -188,127,200,229,242,245,174,177, 1,247,187, 18,192, 7,100,208,160, 65, 20, 1, 4,208, 72,244,236,217, 19,197,197,197,129, 27, - 17, 64, 0, 1, 4,112,159,128, 9,220,130, 0,154, 2, 1,242, 15, 32,128, 0, 2, 8, 40, 0, 1, 4, 16, 64, 0, 1, 4, 16, - 64, 64, 1, 8, 32,128, 0, 2, 8, 32,128, 0, 2, 10, 64, 0, 1, 4, 16, 64, 0, 1, 4,112,215, 81, 39, 52,117,206,156, 57, -126, 71,143,186,203,100, 23,144, 23,144, 23,144,119,111,200,147,203,229, 84,161,104,120,217,105,224,254, 5,228, 5,228,253,177, -228,249,172, 0,112, 3,133,175, 66, 60, 13, 44, 77, 45, 47,128,123, 19,222, 8, 38,128,123,243, 57,248,120,126, 24,128,135, 14, - 28, 56,176, 68, 32, 16,140, 8, 14, 14,134, 94,175, 63,244,240,195, 15, 47, 2, 80, 8, 64,127, 47,220, 3,165, 82, 41,201,201, -201, 81,253, 17,199,149,227,199,143,163,176,176,208,235,121, 5, 5, 5,244,248,241,227,200,206,206, 38,253,251,247,111,180, 60, - 14,195,134, 13,131, 39,121, 1,220,199, 30, 0, 14,190,164, 39,229,147, 40,199,157,188,134,202,195,250,147,120,231,143, 62,160, -243, 61,119,252,248,241,210, 39,159,124, 82,205, 87,102,199,142,183,151, 94, 46, 43, 43,171,179,157,146,146, 2,153, 76, 70,248, -200,187,147, 74,192,248,241,227, 41, 0,236,218,181,139,220, 11,242,116, 58,221,216,205,155, 55, 43,207,156, 57, 3, 0,136,142, -142,126, 44, 45, 45,109,171,191,207,215,181,223, 83, 74,157,239, 7,183,159,123, 87, 8, 33,200,202,202, 34,158,148,103,190,207, -193,199,231,213,247,248,241,227,155,171,171,171,123,119,237,218, 21, 55,111,222,132,209,104, 4,128, 17,155, 55,111, 86,133,133, -133,157, 74, 74, 74,122, 2,128,199, 82,146, 35, 71,142,244,201, 32, 56,120,240,160, 20, 60, 83, 61,115,200,201,201, 81,165,164, -164, 72,101, 50,153,218,215,231,145,158,158,238, 83,251,166, 76,153,194,251,253,224,208,181,171,189, 2,110, 77, 77, 13, 76, 38, - 19,215,159,120,189,111,133,133,133,248,207,127, 60,103,168, 53,153, 76,116,196,136, 17,232,211,167, 15,214,173, 91, 87,110, 50, -153,186, 52,180, 46,188,176,176, 16, 51,102,204,224,117,173,215,175, 95,199,146, 37, 75,160, 80, 40, 2, 3,243,125,128,250,201, -128,238,100, 34,160,128, 21,123, 7,241, 93,150,247,148,198, 79,204,217,233,147, 76,149,234,150,129,116,230,204, 25,132,133,133, - 57, 7, 33,151,251,193,199,218,162,245,183,235, 15, 96, 74,165,146,230,228,228,248,109,129,173, 95,191, 94, 50,126,252,248, 6, -229, 55, 6, 25, 25, 25,116,244,232,209,210,233,211,167,251, 68, 22,155, 55,111, 86,182,105,211, 6, 51,103,206,132, 86,171,101, - 51, 51, 51,183,104,181,218,105,145,145,145, 62,101, 17, 35,132,224,251,239,191,119,110, 39, 37, 37, 97,231,206,157, 30,183,189, -161,190, 18, 32,151,203,105,108,108, 44,178,179,179, 41,151,152,201, 87,242,175,170,170,202,239,209,163, 71, 11, 0, 16,139,197, - 8, 9, 9, 65,121,121, 57, 42, 43, 43, 17, 30, 30,142,242,242,242,222, 59,119,238, 44, 76, 74, 74,234, 5,224,154, 39, 97,253, -251,247, 71, 74, 74, 10,162,163,111,101,253, 91,186,116,105,157,115, 22, 46, 92,200, 89,178,170,233,211,167,251,252,188,253, 33, -127, 14, 43, 86,172,104,232,144,179, 86,129,191, 8, 11, 11,195,201,147, 39, 33, 18,137, 96, 54,155,177,115,231, 78, 20, 23, 23, -227,181,215,124,171, 56,123,189, 94,145,172,199, 30,123, 76, 0, 64,246,195, 15, 63,236, 76, 72, 72,184,254,196, 19, 79,180, 85, - 42,149, 16, 8, 4,173, 35, 34, 34, 4,190,200,106, 8, 23, 46, 92, 8,144,196,125, 74,254,220, 62,175,181, 0,238, 87,172, 94, -189, 90,146,150,150,166,110,172,156,251,197,149,221,113,232,251,183,172,246,162, 55,252,146,161,213,106,161,215,235,157, 22, 72, -118,118,182,171, 37,196,215,218,186,109, 91, 38,147, 97,207,158, 61,148, 16,114,219,113,127,240,195, 15, 63,168, 94,121,229, 21, -228,230,230, 34, 57, 57,185, 73,238,223,174, 93,187,200,222,189,123, 41,165, 20,121,121,121,170,188,188, 60,159, 20,148, 51,103, -206, 96,230,204,153, 44, 0, 38, 40, 40,136,137,137,137, 65,102,102,230, 6, 0, 27,162,163,163, 39,166,165,165,237,224, 35,231, - 78, 20, 3,226,148,128,236,236,108,202,165, 1,230,254,151,203,229, 52, 37, 37,197,151,107, 13,211,106,181,155,197, 98,113, 11, - 0,248,219,223,254, 6,163,209,136,172,172, 44,132,132,132, 56,203,102, 11, 4, 2, 84, 85, 85,181, 0,144, 9,224, 47,158, 4, -114,228, 94, 82, 82,114,219,190,166, 64, 74, 74,138,212,113,157, 82,127, 21,129,151, 94,122,201,249,125,249,242,229,220, 87,166, -222,126,222, 10, 1,231, 53,121,227,141, 55, 16, 22, 22,134,220,220, 92, 36, 36, 36,248, 69,254,245, 49,106,212, 40,192,158,165, -241,175,207, 60,243, 12,122,246,236,217,118,231,206,157,168,168,168,224, 74,238,154,189,188, 11, 77,221,253, 36, 19, 39, 78, 84, -109,223,190,221,157,247, 70, 50,102,204, 24, 21, 33, 4,123,247,238, 13,184,123,239, 48,249,167, 47,252, 8, 0,144,189,244, 85, -183, 74,192,239,162, 0,100,103,103,187,123,208,180,161,253,254,252,198,225,195,135, 85, 0,164,141, 85, 2,102,204,152,241,167, -153,207,214,235,245,183, 89,253,254, 16, 13, 71, 44,201,201,201, 72, 76, 76, 36, 0,144,155,155,219, 36,109, 92,191,126,189,196, - 97,209,145,242,242,114, 73, 78, 78,142,170,188,188, 92,226,171,197,238, 14, 99,199,142, 37, 99,199,142,197,250,245,235, 37,121, -121,121,170,245,235,215,251, 36, 87,171,213, 90, 35, 35, 35,131, 54,111,222, 12,135, 55,192,168,213,106,153,204,204,204,237, 90, -173,118, 92,100,100,228,158,187,249,124, 57,210,119,237,203,114,185,156,114, 74, 26, 79, 60, 84, 92, 92,220,123,192,128, 1,152, - 53,107, 22,170,170,170, 80, 81, 81, 1,145, 72, 4,161, 80, 8,161, 80, 8,145, 72,132,144,144, 16,104, 52, 26, 40,149,202,233, - 50,153,236,239,222,132,150,148,148,212, 81, 14, 57, 5,128,243, 4,196,198,198,250,210, 70,119,214,191, 52, 39, 39, 71,213, 24, -207,147, 11,172, 13,140,149,188,189, 1, 23, 46, 92, 64, 94, 94, 30, 38, 78,156,136,174, 93,187,162, 85,171, 86,200,203,203,195, -107,175,189,230,244,190, 9, 4, 2,159, 27, 54,106,212, 40, 44, 90,180, 8, 75,150, 44,105,159,150,150, 54,245,233,167,159, 70, - 98, 98, 34, 0, 64, 32, 16,204,108,217,178,229, 86,133, 66, 97,241, 84, 12,104,253,250,245,188,188, 0,101,101,101,152, 54,109, - 26, 63, 3,165, 99, 71,164,167,167,171, 74, 74, 74,160, 84, 42,185,251, 47, 73, 79, 79, 87,113, 10,116, 0,119, 22, 28,249,115, -223, 57, 37,224,119,247, 0, 52, 52,143,237, 79,128,224,157, 86, 2, 38, 76,152,208,104, 79,128, 47,215,229,203,111, 60,245,194, - 46,108,254,108,124,147,220, 43,238, 5,148,203,229,110,231,244, 14, 29, 58,212,104,197,160, 41,158,239, 15, 63,252,160,226,172, -254,233,211,167,171,127,248,225, 7,180,105,211, 70,133, 38, 74,156,206,201,205,203,203, 67, 94, 94,158, 87,119,179, 78,167,155, -176,121,243,230,237, 0,144,153,153, 25, 20, 29, 29,141,180,180, 52,238,176,248,215, 95,237,245,178, 50, 51, 51,119, 71, 71, 71, - 63,145,150,150,230,181, 62,121, 82, 82, 82,157,152,152, 71, 30,121,164,142,103,128,143,219,223,141,210, 77,221,245, 47,238,185, -184, 78, 7,120,194,206,157, 59,151,196,196,196, 0, 0,206,158, 61, 11, 74, 41, 78,159, 62,237,172,251, 32, 20, 10, 65, 8,129, -205,102,131, 94,175,199, 55,223,124, 3,153, 76,230,181,234,146, 43,249,167,164,164,184, 85, 94, 92,167, 8,252, 81, 2,100, 50, - 25,145,203,229,180,177,222,128,166, 24, 39, 45, 22, 11,134, 12, 25, 2,181, 90,141,161, 67,135, 66,167,211, 57,167,118,212,106, - 53,198,143, 31, 15, 43, 87,130,220, 55,203, 31, 75,150, 44,233,144,150,150,118,249,203, 47,191,116, 30,235,208,161, 3,150, 45, - 91,246, 31,190,132,221,196, 80, 31, 57,114, 4,177,177,177,136,142,142,198,144, 33, 67,232,209,163, 71,165, 28,249,151,148,148, - 64,173, 86,243,137, 81, 25, 6,224, 5, 0,127, 85, 40, 20, 54, 15,231, 77, 4,208, 17,192, 55, 10,133,226, 70,128,250,127,199, -142,205, 7,191,103, 16, 96, 83, 40, 1,221,186,117,107,148, 39,128, 27,100,215,173, 91,231,246,248,142, 29, 59,176,110,221, 58, -191, 44,147,130,243,125, 17,215,253,164,223,110,127, 14,174,115,254, 74,165, 18, 50,153,204,233,246, 63,116,232, 16, 58,119,238, -220, 36, 74, 95, 99,172, 47,206,250,191,121,243,166,179,206,188, 68, 34,145, 54,165, 23,128, 67, 66, 66,130, 52, 47, 47, 79,229, -237,188,205,155, 55,111,231,230,254,117, 58, 29,150, 46, 93,138,218,218, 90,136, 68, 34, 4, 7, 7,227,252,249,243,120,255,253, -247,161,213,106,145,153,153,249,173, 86,171, 29, 19, 25, 25,169,242, 66,178,117,200,222, 91, 76, 64, 83, 40,158, 71,142, 28,169, -115,126, 67, 65, 98, 81, 81, 81, 35, 76, 38, 19,172, 86, 43, 14, 29, 58, 4,129, 64, 0,179,217, 12,131,193, 0,150,101,157,239, -177,197, 98,129,201,100,226,222,105,175, 97,226, 13,185,252, 23, 46, 92,232,244, 2, 68, 71, 71,163,188,188,188,209,138, 40,183, - 42,192,135,216, 17, 13,128, 40,119, 7, 92,166, 3,124, 66,102,102, 38, 94,121,229, 21, 12, 30, 60,216,233, 1,225,210,103, 15, - 30, 60, 24,167, 79,159, 70,155, 54,109,124,146,185,127,255,126,140, 26, 53,170,107, 90, 90,218, 5,142,252, 29,227,103,199,141, - 27, 55, 94,169, 31,208,203, 87,161,104,232,183,124,244, 62,145, 35, 71,142, 72,210,211,211, 85, 67,135, 14,197,208,161, 67, 85, - 0,112,250,244,105,228,229,229,241,125, 14, 63, 3, 8, 1,176, 65, 46,151, 79,115,167, 4,200,229,242, 23, 0,124,234,216, 92, - 36,151,203,123, 43, 20,222, 75,212,255,145,193, 85, 3,204, 94,250,234,109, 83, 0,127,216, 24,128,123, 81, 9,152, 49, 99, 6, - 93,180,104,209,109,174, 64,127,200,255,169, 23,154,118,158, 78,167,211,221, 22,228,199, 89,253, 34,145, 8,215,174, 93,187,171, -228,239,106,253,187, 90,110,211,166, 77, 83,171,213,234, 38,247, 2,248,226, 57,153, 57,115,166, 30, 64,104, 88, 88, 24,222,124, -243, 77,136, 68, 34,231,241,212,212, 84, 0, 64,100,100, 36, 38, 77,154,132, 3, 7, 14,236,155, 52,105,210,239,210, 78,215,251, -237, 58,255,239, 14,177,177,177,117, 42, 53, 54,180,142,216,108, 54, 67,163,209,192,104, 52, 34, 60, 60, 28,193,193,193,176, 90, -173,160,148,194,102,179,193,108, 54,195, 98,177,192,102,179,185, 42,244, 55, 61,181,179,164,164,164,142,117, 95,127, 58,160,126, -128, 96, 99, 33,147,201,212, 62,198,162,136, 27, 58,208, 64,108,128, 87,188,255,254,251,152, 56,113, 34,186,117,235,134,208,208, - 80, 72, 36, 18,104, 52, 26,132,133,133, 65,171,213, 98,205,154, 53, 96, 24,223,226, 11, 71,141, 26,213, 41, 45, 45,237,194,188, -121,243,176,101,203, 22, 60,254,248,227, 0,208,110,255,254,253,215,253,185, 79, 14,133, 2,220,152,197,141, 85,190,146,191,171, - 39, 96,227,198,141,210,169, 83,167,170, 0, 96,227,198,141,210,170,170, 42,181, 15,253,217, 44,151,203,103, 0, 88,231, 65, 9, - 72,116,249,222, 5,192, 0,216,151,164, 6,224, 66,252, 13,225, 15,153, 9,112,248,240,225,210,166, 8, 8,244,215, 74,119, 29, -144,151, 44, 89,210,104,242,231, 48,100,240, 32,236,221,167,194,250,125,161, 78,165,160,224,124,223, 70, 93, 99,108,108, 44, 74, - 74, 74,144,155,155,139,206,157, 59, 99,237,218,181,126, 88, 93, 84,194,125,203,200,200,104, 18,242,231,172,255,242,242,114,105, -253, 99,163, 71,143,150,230,230,230, 58,207,105, 10,228,229,229,169,248,122,159,180, 90,237,111,176,207, 11,179, 27, 55,110,196, -154, 53,107, 0, 0, 27, 54,108,128, 86,171,229, 78,179,158, 62,125, 26,173, 91,183,190, 43,239,128,107,180,191, 59,229,140,111, -153,230,146,146,146, 67, 54,155, 13, 90,173, 22, 55,111,222,116, 6,142,234,245,122,212,214,214,162,186,186, 26, 85, 85, 85, 48, - 24, 12, 48,153, 76,176,217,108, 0,144,239, 73,102,125,114,119, 23, 72, 90,127, 85, 0, 95, 40,149, 74, 73,253,107, 86, 42,149, -190,246,147,208,166,126, 30,107,215,174,133, 68, 34, 65,104,104, 40, 78,158, 60, 9,181, 90,141,176,176, 48,188,245,214, 91, 56, -112,224, 0, 94,123,237, 53,159, 20,128, 81,163, 70,181, 75, 75, 75,187, 52,109,218, 52,124,253,245,215, 28,249,119, 0,112,221, -147, 37,207, 71, 9, 88,178,100, 73, 83,144, 63, 0, 72, 56,242, 7,128,169, 83,167,170, 18, 18, 18,168,143, 99,168, 25, 0,183, - 78,113,131, 92, 46,175, 31, 40,113,214,229,123, 41,128, 99, 1,218,119, 25, 7, 22,126, 84, 39, 22,160, 62,254, 48, 65,128, 77, - 77,254,142,245,174,141,182,220,184,233,128, 25, 51,102,248, 77,254, 79,189,176, 11, 67, 6,223,114,221,108,254,250, 27,108,254, -218,254,125,239, 62, 21, 48, 70, 10,192,183,101,128,114,185, 28,177,177,177, 0,236,193,128, 71,142, 28,193,158, 61,246,152,181, - 99,199,142, 33, 33, 33,193, 7,105, 68, 13,220, 10,252,107,108,164,254,250,245,235, 37,238,172,255,250,104, 42, 47, 0,167, 72, - 72, 36, 18,169,183,115,163,163,163,199,101,102,102,238,158, 52,105, 18, 78,159, 62,141, 51,103,206,224,253,247,223,183, 2, 16, -234,245,122,100,102,102,194,113, 76,120,241,226, 69, 60,243,204, 51, 94,101,222,137, 24, 0,206,146,206,201,201,113,122,177, 56, - 98,228,158, 59, 31,196,196,196, 20,233,245,250, 17,102,179, 25, 55,110,220, 64,112,112, 48,132, 66,161,211, 3,160,211,233,160, -215,235, 97, 50,153, 80, 85, 85,197,205,231, 95,246, 36,147, 35,119,110, 26, 32, 54, 54, 22,245,189, 21,238,226, 2,248,144, 63, -151, 3,160,254,190,198,244, 15,206,234,119, 99,241, 91,249,142,161,197,197,197, 56,125,250, 52,244,122, 61,226,227,227,161,215, -235,145,147,147,131,169, 83,167, 98,203,150, 45, 16, 20,150, 5, 38, 0, 0, 32, 0, 73, 68, 65, 84, 8, 4,188, 21,128,152,152, -152, 78, 28,249, 23, 22, 22,226,237,183,223, 6,128, 46, 51,102,204,184,186,110,221, 58,178,127,255,254, 70,141,161,156, 39,160, - 49,228, 31, 27, 27, 75,185,126,118,244,232, 81, 20, 21, 21, 73,211,211,211, 85,189,122,245,130, 72, 36,162, 46,129,129,126,123, - 2,228,114,249, 92, 0, 19, 1, 36, 3,104, 3,123, 12,192,159,218,253, 15,220, 90, 5,224, 46, 8,240,174,172, 2,248,189,130, - 0,239, 53,242,175,175, 4, 52,198,242,247,180,189,119,159,202,159, 23,244,150,185, 19, 26,138, 62,125,250,212, 57,126,248,240, - 97,159,228, 37, 39, 39, 59, 21,128,220,220, 92,228,230,230,214, 89, 21,224,203,245,175, 93,187, 86, 5, 0, 59,119,238,116, 75, -158,211,167, 79, 87,175, 93,187, 22, 0,191, 37, 76, 13, 37,253,225, 20, 13, 74, 41, 18, 18, 18,164,211,166, 77,243,218,119,210, -210,210,246,104, 52,154,177, 7, 15, 30,220, 27, 19, 19,131, 51,103,206, 64,171,213, 10, 35, 35, 35,145,150,150, 6,141, 70,115, -241,224,193,131, 93, 99, 98, 98, 48,115,230, 76,175,215,235, 46, 15,128,191, 49, 0,245,223, 45,133, 66, 65,100, 50, 25,148, 74, - 37,173, 63, 45,195,247,121,196,197,197,189,174, 86,171, 95,180,217,108,168,174,174,134,197, 98,113, 42, 43, 70,163, 17,148,210, - 58,129,129, 50,153,236,105, 7, 49,242,134, 76, 38,131, 76, 38,171,179, 44,208,215, 41, 0, 87,162,151,201,100,234,250, 99,139, -171, 82,208,132,224, 61,126,114, 75,253, 94,126,249,101,168,213,106, 72,165, 82, 20, 23, 23,163, 89,179,102, 40, 45, 45,229,173, - 0, 28, 62,124,152,164,165,165, 93,122,230,153,103,176,127,255,126,188,245,214, 91, 0,208,113,198,140, 25, 87,154,130,252, 93, -149,128,198, 88,254,220,248, 82, 82, 82,130,162,162, 34,226, 48, 4,165,233,233,233,170,232,232,104, 72, 36, 18,202, 39, 16,176, -158, 18, 48, 13,192, 6,135, 18,112, 8,128, 28,128, 68,161, 80, 92, 67, 0, 77,215,129,155, 58, 27,159,187,128,159,165, 75,151, - 54,184,255,110,146,255,140, 25, 51,238, 72,202,208,198,200,188,116,217,123,255, 14, 9,241,205,107,233,105,126,216, 31,200,100, - 50,105, 98, 98,162,122,239,222,189,116,211,166, 77,117, 20,129,250,164,196, 87,102, 70, 70, 70,131,154, 13,151,148,196,151,196, - 64, 13, 41,156, 82,169,148, 23,249,115,136,138,138,114,206,235,159, 60,121,242, 47,153,153,153,255,225, 60, 2, 23, 47, 94,236, -250,198, 27,111, 72, 9, 33,188,228,221,137, 60, 0,245,239,179,187,249,111, 31,148, 82, 93, 66, 66,194,226, 29, 59,118,188, 99, -181, 90, 81, 89, 89,233,140, 1, 0,128, 27, 55,110,160,178,178, 18,148, 82,206,106,247,105,178,157,155,255,175,191,236,175,126, -156, 0, 95,242,119,125,206,247,218, 82, 94, 78, 9,120,245,213, 87,145,151,151,135, 73,147, 38,225,195, 15, 63,196,130, 5, 11, - 32, 20, 10, 33, 22,139,189, 61, 87, 66, 41,101,103,205,154,133,255,252,231, 63, 88,189,122, 53, 0,116,222,191,127,255, 21,135, -197,238, 87,103,114,153,182,106, 50,148,149,149,193, 77, 30, 0,117,118,118,182,116,204,152, 49, 42,127,150, 60, 58,172,254,105, - 0,182, 1,152, 11, 32, 46, 64,254, 13,195, 93, 16, 32, 47, 5,192,151,164, 28,254, 18,118, 83,163, 41,200,255, 94, 28, 52,230, -206,157, 43, 61,117,234, 84,147,202,116, 88, 67,170,166,148,201, 17, 30,183,182, 30,128, 51, 25, 16,203,178,216,188,121, 51,111, - 37,224,149, 87, 94,225,218,121, 91, 12, 0,195, 48, 96, 89, 22,255,248,199, 63, 84,124,201,211,147,188,198,174, 36, 72, 75, 75, -251,175, 70,163,185,113,240,224,193,157,124,173,254, 59,237,109,171,127,127,221,185,216,125, 81, 2, 8, 33,239, 78,156, 56, 49, -119,221,186,117, 39,130,130,130,192,173, 10, 96, 89, 22, 17, 17, 17,208,106,181, 92, 10,219, 80, 0, 54,190, 6,129,107,240,223, -145, 35, 71, 32,147,201,234,140, 39,222,198,161,146,146, 18, 90, 82, 82, 34,173,239,226,111,228,146, 63, 0, 13,186,251,173,203, -151, 47, 23, 3, 48,195, 30, 63,197,125,124, 82, 2, 92, 19,255, 60,255,252,243,206,239,213,213,213, 94, 95,179,184,184, 56,210, -175, 95, 63,250,213, 87, 95, 61,177, 97,195,134,239, 56,178,221,176, 97, 3,124,141,250,231,112,229,202, 21,103, 74,226, 38,130, -122,251,246,237, 13,245, 41,245,190,125,251,124,170, 85,225,225,240, 85,119,217, 74,255,236, 53, 73,184, 85, 0,238,136,159,215, - 42,128,166, 38,245,134,228,221, 43,202,195,189,220,113,250,246,237,171,238,219,183,111,147,202,116, 12,142,119,252, 90, 93,221, -255,245, 95,234,134,150,157, 57,218,199,167,109,196,135,235,189,163,215, 26, 21, 21,181,171, 49,145,254, 77, 25, 3,224,174, 15, -123,242,246,248,208,231, 79,206,152, 49,163,217,238,221,187, 63, 40, 45, 45,125,209, 96, 48,192,102,179, 97,208,160, 65, 24, 58, -116,104,166, 76, 38, 91,200,135,252, 1,160,160,160,192,249,221, 53,214,164,160,160,224,182,109, 79,136,142,142, 38, 14, 47,129, - 20,128,138, 83, 38, 92,166, 2,124,126, 38, 83,166, 76,105,232,144,208,101,188, 12,186, 27,227,138, 66,161, 96,143, 31, 63,142, - 79, 63,253,148, 0,224,149,148,231,239,127,247,156,147,105,216,176, 97,152, 60,121, 50,239, 54,120,147, 23,192,189,167, 4, 52, - 68,254,110, 21,128,166, 38,193, 64,133,184, 0,220,245, 1,127,203, 87,254, 25,238,205, 61,252, 27,186,113,227,198,205,133,221, -253,234, 23, 14, 30, 60, 72,166, 79,159,126, 71, 20, 90,127, 51, 7,254,158,202, 98, 99,209,191,127,255, 38, 45,198,211,212,242, -254, 12, 70,217,253,164, 4,120,181,162, 6, 13, 26, 20, 24,136, 3, 8, 32,128, 0, 2, 8,224, 79, 6, 38,112, 11, 2, 8, 32, -128, 0, 2, 8, 32,160, 0, 4, 16, 64, 0, 1, 4, 16, 64, 0, 1, 5, 32,128, 0, 2, 8, 32,128,251, 16, 86, 0,108,224, 54, - 4,224, 9,194,192, 45, 8, 32,128, 0, 2, 8,140,237, 1,252,201, 59,201,156, 57,115,252,142,184,116, 23,213,237, 73,158,183, -245,199,190,202,107,234,246, 5,228, 5,228,253,217,229,253,244,250, 69,191, 7,150,193, 31,116,197,157,150,119,228, 53,255,229, -197,126,120,187,188,140,140, 12, 2, 0,132, 16,137,197, 98,193,249,243,231, 85,102,179, 25, 66,161, 16,151, 47, 95,198,211,225, -221,176,171,168, 8,134, 7, 59, 35, 46, 46, 78, 42, 16, 8, 64, 41, 85, 3, 64, 86, 86,214, 29,127, 30, 92,251, 92, 65, 8,233, - 11,160,205,137, 19, 39,182,119,232,208,129,209,104, 52,226, 14, 29, 58,188, 31, 18, 18,178, 18,192, 21,199,114, 82, 38, 43, 43, -203,230, 65, 94,115,135,183, 64, 79, 8,161, 0,112,233,248,127, 87,201, 71,149,166,173, 47,138, 57, 47,108, 51, 46,174, 89,243, - 22,181, 0, 40,165, 84, 8, 32, 50, 43, 43,235, 82,224,125,187,183,229,221, 81, 45,145,111,182, 45, 95,179,191,249,147, 50,183, -114,205,215, 18, 97, 84,184,234,220,153,179,210, 7,130,155, 33,236,239, 51,212,247,146,150,213, 80, 62,242,192, 18,151,187,143, - 45, 91,182, 72,118,236,216,161,202,124,221,190,253,237,254, 81,152, 49, 99, 6,175,231,178, 63,255,144,132, 33, 68,117,250,212, - 41,104,181, 90,116,237,218, 21,205,154, 55, 71, 82,226, 56,222,207,117,207,158, 61,117, 94,220,220,220, 92,143,181, 20,114,115, -115,253,238, 55, 92,161,166,172,172,172,198,245,187, 20,141,227, 11, 5, 64,128,156, 40,255,101,197, 46, 7,162,159,181,127, 47, - 89, 3, 28,153,223,248,135,154,124,179,110,251,114, 91,241,250, 51, 66, 8,213,233,116,210,221,187,119,171, 74, 74, 74,144, 34, -106,137,118,157, 91,195,168, 51, 32, 68,111,197,200, 5,207, 97,244,164,169,216,246,101, 22,182,238,221,171, 26, 55,110,156,244, - 30,232,194,103,108, 54, 91,251,146,146, 18,118,224,192,129, 65, 49, 49, 49, 56,122,244,232,235, 70,163,113, 98,207,158, 61,101, -132, 16, 13,165,212,219, 84, 64,141,235,134,213,106,101,126, 41,250,169,103,167, 89,131,241,143, 97,253, 90, 23,236,254,120,211, -230, 99,146,159,123,246, 31,243,161, 67,222,101,135,194,192, 6, 60, 13,127, 50, 55,145,175,249,251,125,201,131,239, 43,249,219, -214,111,151,196,183,238,164, 34, 29,163, 81, 92, 91,137,246, 29,186,169, 44,172, 13,167, 62, 91,139,242,174,173,165,195, 38, 77, -224,165, 8, 28, 81,201,105,239, 30,220,150, 0,223,236,102,177,255, 71,138,244,105, 64,239, 30,192,252, 37,141, 35,110,174, 64, - 73, 99,179,147,185, 83, 38,154, 74,110, 99,144,158,158, 78,177,152,128,188,219,240, 57,148, 82, 96, 49,193,148,223, 82,238,153, -181,214,183,200,159, 58,200,127, 52, 14, 28, 56,128, 25, 51,102,120,253,219, 7, 7,238,166,125,251, 14, 69, 78,206, 85, 28,206, -183, 39,172, 57,115,234, 52, 0, 96,246, 95,191,166,167,207, 38, 75,195,196,252,158, 75, 98, 98, 34,187,103,207, 30, 38, 55, 55, - 23,251,246,237,243, 88,136,201,159, 20,170,158,222,219, 12,185,156,102,249,161, 80,112,233,194, 27,157,202, 56,250,217,186,197, -118,154, 66, 1,112,185, 79,142,234,132,188,112,238,220, 57,168, 55,109, 82,189, 43,155,130, 65, 51,158, 71, 80,219, 72, 64,232, - 72,246,199, 82,128, 21,129, 53, 81, 76,120, 54, 29,165,255,250, 8,135, 14, 29, 82,141, 24, 49, 66,202,121, 1,238, 18,108, 12, -195,180,105,213,170, 21,212,106,181,112,224,192,129, 24, 54,108, 24,115,237,218,181,193,191,252,242,203,241, 7, 31,124,112, 8, - 33,228,154,131,172, 25,158,247,174,217,216, 49,137,209, 31, 46,219,194, 44, 76, 61,214, 34, 46,105,142, 52,110,184,114,212,130, - 79, 47, 63, 26,243,208,204, 88, 66, 72, 13,236, 49, 6, 76, 67,253,204, 53,177,149,183,126,212,104,133, 52,128, 58,168,159, 0, -168, 62,252, 42, 6,228, 58,128, 12,154, 57, 0,115, 70,190,192,128,103,229,190,250, 74,128, 92, 46,167,177,177,177,200,206,206, -166,174,101, 75,125, 34,214,188, 35,146,233,131,227, 85, 65, 54, 22, 54, 80,132, 84,134,226,218,141, 27,184, 86, 83,133,238,193, -205, 96, 42,190,162, 58,188,117,135,116, 56, 15, 37,160,119, 15,224,212, 57, 6,148,138, 97, 35,193,120, 34,209,130,201,227, 12, -184, 21, 67,211,248, 84, 9,141, 37,105,142,248, 23, 46, 92,136,162,162, 34, 0,192,246, 83, 34, 24, 45, 22,149,252,175, 67,125, - 82, 4,124, 81,226, 28, 41, 94, 61, 63,151,197,246,195,177,177,177, 13,231,111, 95,236,223, 59,190,237,139,171,146,173,191,188, -237, 84,120, 38, 14, 88, 44,125,236,133, 14,141, 30,112,183,108,217, 34,217,190,125,187,138, 97, 24,188,252, 1,156,213,207,248, -212,193,136,140,252, 65, 18, 55, 60, 3,192, 86,140, 26,245,175, 58,199,166, 79, 7, 38, 76, 0, 38, 32, 87,181,252, 95,224,165, - 4,112,228,175, 86,219, 79,157, 58,117,170,179,176,146, 47, 4,230,201,242,231, 82, 50,187, 94, 95, 70,134,127,228,223,100,136, - 93, 6, 0, 88,177, 98,197, 45, 5, 96, 72, 38,112,244,229,187,210,156,125,251,246, 97,229,228,116,116, 31,147, 8, 8, 76, 32, - 34, 6, 68,200,128, 8, 68,160,148,128,213, 89, 65,109, 54, 80,179, 13,207, 61,251, 60,158,127,107, 46,206,181,109,171,234,209, -163,199,221,244, 4,144,162,162,162,248,206,157, 59, 7,149,148,148, 32, 47, 47, 15,167, 78,157, 66, 98, 98, 34,226,227,227,219, -175, 94,189,250,189, 41, 83,166, 60,231,131, 2, 32, 56,176,247,127,255,247,228, 32,125,219, 35, 53, 2, 76, 95, 92,139,135, 7, -127,130, 23,230, 77, 21,126,188,176,178,251,194,143,215, 77,143, 30, 60, 93,129, 6,210, 32,187, 18,186,235,152,158,145,145, 65, -221,237,111,234,130,112, 1,220, 1, 15,128,235, 67, 90,191,115, 93,101,143, 7,122, 68,200,223,125,142,157, 51,242, 5, 95,170, - 57,145,236,236,108,202,165, 37,229,254,151,203,229, 52, 37, 37,197, 55,171,122,231, 33,201,248,152,126,170, 32,163, 21, 33, 31, -191, 2,171,222, 12,241,203, 75, 16, 30, 36,134, 81,100,128,206,104, 64, 8, 8, 76,151,202, 85, 85, 85, 85,210,240,240,112,143, -131,240,169,115, 64,246, 6, 22,128,222,241, 1, 70, 61,196, 96,242, 56, 2,215, 64,218,244,105, 64,246, 6, 63, 60,166, 41, 41, - 82,199,117,250,101,173,115,228,207, 17, 63, 0, 40, 14, 88, 96, 48,235, 0, 0, 99, 23,238, 65,206,210, 68, 21, 0,222,242,207, -125,116, 14, 34, 82,124,171, 35,144, 50,144, 86,189, 93,182,203,209,250,175,252, 82,132,146,119,237,228,239,169,198, 60,145,231, - 80,251, 57,252,172,255,163,219, 45,146,236, 45,127, 87, 81, 80,124, 56,239, 91, 12,151,196, 96,253, 23,251,241,239,221, 25,170, -237,114,138, 57,127,121, 91, 58,104, 84,123,191, 20,129,218,139,114, 58,102, 32,144,243,213, 9, 80, 74,209,188,205,131, 78,242, - 95,185,114,165,199,246,233,140, 74, 73,122, 74,123, 21,240, 57,128,111,113,248, 48, 48,124,248,173,227,239,189,119,235,251, 75, - 47,230,170,178,254,221, 75,202,176,157, 61,182,147, 35,255,132,132, 4,176, 44,139,207, 62,251,172,201, 94,112,185, 92,238, 36, -255,186, 74,129,156,102,101,121,126,231,152, 41,218, 58,234, 47,113,252,195,166,184, 57,143, 56, 78, 36,246, 47, 3, 7,222, 62, -199,206, 76,213, 58,189,242, 0,192,178,169,152, 55,111,158,243,248,188,121,243,176, 98,197, 10, 48, 61,103,221,250, 85,199,249, -238,228, 9,167,186,111,159,213,234,230, 60, 30,237, 51, 26,141,104,215,181, 27,192,154,193, 4, 3, 68, 40,128,181,166, 10,198, -146,243,184,113,185, 12,157, 70, 72, 64,130, 34, 64, 44,102, 64,192, 96,233,156, 5, 72,204,126, 27,243,231,207,111,210, 65,217, - 91,170,108, 23,178, 37,148,210, 8,131,193, 48, 34, 42, 42, 10,167, 79,159, 6,203,178, 56,127,254, 60,214,172, 89,131, 62,125, -250,160, 99,199,142, 51, 1, 60, 87,143,172,217,134,200,155, 82,218,170, 43,115, 88,210,190, 75, 82, 80,101,222, 49, 84,105,131, -241,159,109, 86,236, 40,248, 47, 94, 76, 9, 17, 10,245,108, 44, 48,189,193, 58, 8,119,162,184, 85, 0,190,161,161,190,227,206, - 51, 32,228, 75,252,148, 82, 72, 95, 79, 64,118,158, 34, 34, 29,114,252,252,213, 49, 96,164,243,181,226, 5,142,244,245,250,117, - 0, 8,140,198,213,136,138, 82, 34, 39, 39, 7,190,164,241, 28, 22,220, 66,213,198,104,131,120,241,243,176,221,212,192,122,229, - 38,132, 65, 34,132, 18, 1,194,136, 0, 97, 2, 33,162, 68, 98,104,107, 42,113,117,223, 33, 85,248,228, 71, 60, 14,116,238, 72, -125,255,143,172, 67, 1, 0,150, 45, 34,160, 4,176,135,199,248,222,193, 29,164, 44,205,201,201, 81,229,228,228,248, 53,133,224, - 74,254, 16, 10, 80,114,213, 62,248,149, 94, 55,162, 75, 91, 49,122,166,110, 69,206,154, 73, 42,190,238,117, 17, 41,134,144,148, - 65, 64,110,194, 70, 91, 33,184, 13, 65,216,180, 43, 96, 89, 13,140,198, 28,216,138,254,225,155, 39,151, 71,229, 54, 95, 74,188, - 42,182,188,160,138,143,122, 3,159,125, 59, 11,205,152, 46, 0,128,231,255,222, 11, 3,135, 69, 99,221,231,121, 88,249,223,119, - 84,138, 81,254,185, 14, 9, 1,228, 47, 29,119, 14,122, 15, 63,252, 48,246,239,223,239,149,252, 1, 96,198, 52,145, 10,216, 7, -224, 56, 42,175, 55, 67,207, 46,192,170, 85,181, 80,169,128,158, 61,129,232,104,187,136,202,235,205,236, 47,227,128,223, 84,191, -254,210,153,120, 34,255,125,251,246,129,101, 89, 39, 73,111,220,184,177,209, 4,226,186, 93,159,252, 1,192, 27,249, 3, 64,150, - 66, 65, 40, 32, 33,128, 58, 61, 61,189,193,142,207,186, 12,250,138,236,108, 41, 33,192,202, 47, 86,222, 22,243,178, 50, 75,225, -234, 95,145, 80, 74, 85,159,124,242,137,115,199, 39,159,124,130, 21, 43, 86, 32, 43, 43,171,110, 21, 57, 2,137, 59,121, 89,246, - 20,182, 82, 74,169,250,185,231,158,107,176,125, 86, 23, 47, 74,246,170, 85, 82, 66,128,172,149, 89, 42,119,228, 37,108,222, 28, - 16, 9, 96,211, 87,226,183, 29,123,177,110, 83, 46,190,184,114, 30, 0, 80,248, 78, 11,244, 28, 61, 1,166,210, 75, 56,241,203, - 17, 28, 59,127, 6, 85,215,174,225,248,241,227, 77, 86, 88,107,205,154, 53, 18,126,125,152,132, 83, 74,123, 23, 21, 21,125,252, -230,155,111,246,251,248,227,143,131,204,102, 51, 4, 2, 1,154, 55,111, 14,157, 78,135,194,194, 66, 68, 71, 71,115,117, 11, 60, - 89,255, 97,132, 16,150, 82, 26, 85,121,249,224,143,239,252, 95,105,212,151,243, 58, 64,163, 11, 66,144,144, 65,167, 72, 49,174, -221, 52, 67,254, 79, 43, 6, 14,141, 13,235,226,197,147,144,145,145, 65, 57, 69,192,181, 47, 54,244, 61,128, 59, 15,142,252,235, - 43, 7,140,183, 65,132,171,247, 93,199,205,153, 52,195,231, 6,100,103,103, 83, 59,249,175,119,146,191,248,199, 11,208,239,122, -160,206,113,175,150,171, 98,189, 36, 92, 83, 3, 54, 72, 8,243,145, 19, 48,253, 86, 2,227,238,253,128,193,132, 32, 74, 17, 10, - 1,132, 32, 48,177, 86,104, 76, 70,124,177,103,155, 87,153,203, 22,217,173,123, 87,216,183, 57,115,133,226,244, 89,138,249, 75, -252,239,179, 50,153, 76,237,234,246, 82, 42,149,188, 94,116,165, 82,233,172,173,205,225,233, 21,151,177,247,136, 22,165,215,141, - 78, 37,160,248,178, 1,144,109,130, 82,169,228,229,142, 20, 18,123,229, 48, 81,205, 49,132,133,157, 69,176,184, 6, 44,171,129, -197,114, 4, 2, 65, 52,204,186,138,187,214, 89,247,126,115, 92, 2,144, 58,228,127,245, 52,197,144, 73, 2,252,253,253, 68, 60, -156,216, 15, 0,117,156,231, 27,214,175, 95, 79, 95,254,128,160, 89,235, 1,160, 0,146, 38,207,193,129, 3, 7,120,253, 45,203, - 92,162,109,218,252,234, 36,255,154, 10,123, 9,230,129, 3,237,228,207, 21, 2,180, 31, 11, 65, 77, 69, 8,162, 66,175,122,148, -153,156,156, 12,169, 84,138, 49, 99,198, 96,234,212,169, 16, 8, 4,183,125, 92,247,243,133,187,247,214, 47,101,201,133,136, 9, - 33,206, 79, 67,251, 8,160, 6,133,186, 1, 89,183,222,175,244,116,149, 59,203,121,222,188,121, 72, 79, 79,175, 75,168, 13,200, -251, 86,161,192,241,227,199, 85,132, 16, 9,128, 58,247,204,233,207,174,183,207, 83,251,130, 40, 5, 19, 26, 12,203,181,139, 80, -188,241, 6,214,232, 42,161, 77,136,115, 30,255,242,191,107,240,246,130,217,136,153,255, 52,222, 61,182, 15,155,180,231,145,248, -216, 99,136,142,142,246,121, 10, 96,205,154, 53, 18,185, 92, 78, 87,175, 94, 93,167, 15, 23, 20, 20,168, 60, 77, 67, 17, 66, 68, -132,144,161,199,142, 29, 43,205,203,203, 83,191,252,242,203,113,159,125,246,153,184,182,182,214, 89,166,217,104, 52,162, 89,179, -102,197, 83,166, 76,233, 53,114,228,200, 46, 94, 20, 9,134, 16,210,245, 88,254,230,242, 51,187,230, 95,152,255, 90,102,251,173, -139, 59,224,183, 50, 33,170,106, 5, 96, 9, 80, 81,107, 6,109,217,195,248,210,235, 75,250, 61,250,196, 95,188, 78, 39,100,101, -101, 17,110,172, 83, 40, 20, 94,191, 7,112,119,200,223,173, 7,192,149,248,249,140, 51,190, 88, 34,183, 92,109,171,221,122, 7, -234,196, 25, 52,224,198,232,215,170,173, 74, 67, 45, 8,170,208, 64,252,237, 62, 16, 33, 3, 24,205,160, 53, 58, 16,171, 21, 34, - 0, 54,202,194,104,179,162,198,106, 6, 88,239,115,168, 92,144,223,178, 69, 13, 15,131,246, 32,193,198, 15,168, 10,133,130,112, - 46,125, 62,214,250,109,214, 63,128,255,189,208,190,206,246,208, 87, 75, 32,162, 55, 97, 33,173,144,147,147,179,143,175, 23, 64, - 92,171, 66,212,187,255,197,141,151, 51,112, 83, 19,130, 14,150, 19,176,217, 74, 0, 0, 23,127,110,119,215, 58,236,166,157,159, -170,102,143, 83,212, 33,127, 14,113,145,111, 96, 68,191,100,196, 71,157,192,166,157,239,171,198, 78,230, 63,136,172, 91,183,142, -254,240,195, 15,168,168, 24,139,150, 45,247,162, 89,171,254,160,148,130, 97, 24, 94,129, 72,165,165, 64, 73,201,113,110, 34, 1, - 16,215, 66,163, 3,134, 13,179,239, 41, 46, 6, 62,255, 28,168,169, 6,116,181, 64,173, 14, 8,139,172,230,213,182,134,230,250, -207,157, 59, 7, 0,248,224,131, 15, 0, 0, 49, 49, 49, 77,230,102,118,237,147,124,254,102,238,220,185,112,181,216,235, 19,183, - 15,144, 0,183,230,254, 93,193,121, 1, 28,231,168, 61, 9,153,213, 49, 6,103, 78,156, 68, 89,100,164,138, 97, 24,188,248,226, -139,248,215,191,254,229,119,251, 70,153, 34, 64,217, 90,204,254, 96, 17, 6, 36, 39, 67,241,193, 7, 96,152, 91, 60,167, 40, 62, -126,203, 67,184,127, 63,246,236,217,131,243,231,207,251, 28, 4,184,102,205, 26, 73,126,126,190, 10, 0, 10, 11, 11, 85, 12,195, - 72, 83, 83, 83,213,171, 87,175,150, 80, 74, 17, 31, 31, 47, 53, 24, 12,170, 6, 20, 59, 75, 65, 65,193,128, 25, 51,102,180,232, -222,189, 59,118,236,216,161,175,170,170, 18, 26, 12, 6,187,183,195, 49,255, 49,126,252,248, 24, 66, 72, 8,165,212,224, 70, 12, -227, 34,143, 41, 57,253,243,138,183,255,145,214,172,101,207, 28,252,148,243, 44,126,189, 68, 80,122, 93, 8, 80, 6, 38,179, 5, - 26,218,178,236,111,179,158,143, 35,132,148,209, 38,208, 42,249,196,217, 4,240,251,160,193, 41,128,188,188,188,219,246, 85,150, -105,125, 38, 59, 87, 15,128,125, 10,192,222,127,196, 63, 94, 64,240,241, 50,216, 34,236, 86, 84,253, 57,228,134,214, 53,158,188, - 92, 10,125,112, 8,162,173, 86,116, 10,105,134, 80, 81, 16,136,197, 2,176, 20, 86,155, 13, 53, 54, 51,244, 54, 43, 76,212, 6, - 27, 40,168, 15,157,109,254,146, 91, 74,128, 61, 46,224, 22,233, 47, 91, 36, 64,230, 34,130,151,151, 88, 27,125,211,101, 50,153, -154, 43, 93,202, 7, 11,115,236,247,125,105, 74,164,147,240,157,174,124,122, 19, 34, 0, 66,170,197, 87,179, 35,173, 79, 43,249, -197,117,136,174,255, 8, 27,236,110,234,143,133,225,120,250,250, 69, 20,253,179, 19,194,218,245, 65, 85, 89, 25,174, 93,184,114, - 87, 59,230,192, 97,209,208, 57,186,155, 62,228, 36, 66, 13,125,241,245, 59, 22,231,241,145,178,126,200,223,228,155,229, 63,121, -244, 15,248,246, 91, 25, 34,242,149, 88,190, 8,120,105, 9,197,232,209,163,121, 47,251,235,214,169, 51,233,209,163,174, 22,184, -109,155, 61,240,111,253,122,160,103, 79,138, 21, 43, 8,222,125,183,214,174, 32, 0,232,217, 43, 18, 47,191,196,175,141,156,149, -154,156,156,140,141, 27, 55,214,177,100,147,146,146, 26, 36, 55,127, 21, 81, 31, 61,120,210, 21, 43, 86,168, 26, 82, 0,150, 45, - 91,134,236,236,108, 94,150,240,115,207, 61,167,226, 34,255,221,225,165,151, 94,194,242,229,203, 85,217,217,217, 30,219,248,195, -201, 82,188,254,238, 2,204, 90,252, 15,188,102, 54,227,147, 79, 62,105,240, 30, 45, 91,182, 12, 74,165, 18,132, 16, 73, 67,132, - 61,186,111, 23,172,254,242,115,196, 78,159,142,119,222,121,199,163,210, 48,111,222, 60, 44, 91,182, 12,171, 86,173, 82,251,122, -239,243,243,243, 85, 92,176,156, 92, 46,167, 5, 5, 5,170,212,212, 84,114,248,240, 97, 21, 33, 4,169,169,169,234,149, 43, 87, - 54,248,247,122,189, 62, 98,219,182,109, 24, 59,118, 44,138,139,139, 67,117, 58, 29, 44, 22, 11, 24,134,129,217,108, 70, 74, 74, - 10,113,144,187,129,143, 99,203,100, 50, 5, 29,217, 60, 29,163,159,124, 23,187,242,206,225,252, 85, 1,170,117, 12, 4, 66,160, - 76, 23,130, 23, 95, 93, 20, 15,224, 50, 95,238,231,226, 78, 0,126,211, 1, 1,220, 29,235, 31,238,220, 56,156,107, 70, 34,145, - 64, 34,145,224,151, 95,126,113,126, 74,126,188,136, 42, 67, 21, 90, 14,243,125,221, 47, 71,238,161,161, 51, 32,254,241, 2, 68, - 23, 43, 64, 9, 65,208,172,138, 58,199,189, 18, 87,144, 0, 54, 10, 92,214, 85,162,180, 74,131, 27,213, 90, 84, 25,141,208,154, - 13,184, 97, 50,224,170, 81,143, 50, 99, 45, 52, 22, 19,180,172, 5,102,214,123, 54,204, 81, 15,185, 25,240, 92,226, 2,102, 79, -109, 6,138, 32, 80,223,202,128, 59, 93,248,245, 59, 59, 95,247,191,211,242,188,110,196,222, 35,218, 58,196,207,145,127, 48,123, - 17,193,236, 69,188, 61, 94,136,210,210, 82, 51, 95,153,155,207,179,104,157,153,229,220, 62,175,179,225,242,185, 50,156, 62,120, - 2,215, 46, 84,222,245,142,187,254, 11,187, 2, 90, 93, 78, 17,106,232, 11,201, 44, 33,158, 92, 44,114,126, 50, 55, 77, 7, 1, -225, 61, 32, 61,254,112, 30,158,157, 47, 67,100,193, 94, 16, 66,240,221, 65,251, 35,224, 75,254, 28, 98,122,247,170,167, 88, 0, -159,125, 6,156, 61,107,247, 4,188,243, 14,117,186,223, 41,165,136,140,140,244, 62, 2, 59,250,168,205,102,131,205,102,195, 7, - 31,124,128,115,231,206,225,204,153, 51, 56,115,230, 12,148, 74, 37, 22, 44, 88,128,210,210,210,187,249, 72,212, 13, 89,210,115, -231,206,229,172, 58, 94,100, 72, 8,113,107,253,115,240,116,204, 21,251,131, 43, 65,152,102,248,247,235, 75,208,108,155, 18,233, -233,233,112, 45, 53, 44,239,217, 31,115, 99, 71, 32, 52, 52, 20,163, 71,143,198,155,111,190, 9,165, 82,169,210,106,181,110,223, -191, 47,203,206,224,106,191,190,232,216,177,163,148,101,217, 6,189, 29,156,167,194, 95,207,139,107,164,124,124,124,188,148, 35, - 74, 0,136,139,139,147,122,185,119, 99, 70,143, 30,221,162,180,180, 20,251,247,239,199, 3, 15, 60, 0,161, 80,232, 84, 22, 59, -118,236,200,119, 58,130,117,200, 35, 61,122, 15, 94,152,189, 59, 2,191,238, 88,140, 81,241,125, 16, 38,102, 16, 22,106, 67, 72, -176, 9,143, 60, 62,133, 5,160,169,175,171,122, 83, 46,185,235,227, 51, 29, 16,192,221, 3,227,233, 33, 42, 20,138,230,115,231, -206,197,220,185,115, 1,192,252, 94,198,123,176,148, 91, 17, 18, 34,246, 43, 25, 73, 74,138, 61,124, 56,116,252, 89, 80, 1,131, - 55,191,214, 59,173,127,190, 8,237,216, 81,106,109, 22, 10, 45,181,225,164, 78,139,227, 85, 21, 56, 81,125, 19, 39,170, 53, 56, -169,211,224,172, 94,139, 10,147, 17,181, 86, 43,174,232,117,206,223,244,132,201,227, 8,150, 45, 18, 96,217, 34, 1, 40, 4,160, -132, 65,250, 52,130,231,166, 5, 97,214,212,214,232,209,163, 45, 88,136, 0,248,118,201,156,171, 63, 37, 37, 69, 90,127,159, 15, -247, 76, 90,124,217,174,200, 23,125,100, 15,162,219,245, 74,184,221,125, 67,181, 16, 80, 29, 76,140, 61,162, 89,163,209,132,166, -164,164,248, 84, 20, 61, 54, 54, 22, 74,165, 18,235,107,117, 48,152, 25, 60,187,225,223, 40, 23,135,192, 96,190,123,101, 34, 38, - 13,124, 91,154,175, 89,130,245,255,185,101,226,127,253,142, 5,113,145,111,220, 82, 40, 31,253, 92,154,165,200,226,149, 91, 98, -249, 27, 64,234,252,177,136, 40, 80, 66,250,207, 4, 48, 19, 1,181, 90,237, 87, 31,238,218,181,110,244,248,152, 49, 64, 68, 4, - 16, 29, 13, 12, 31,216, 28,226, 32, 1, 4,204, 45,177,226,144, 16,175, 3, 50,195, 48,206,185,254,115,231,206, 33, 38, 38,166, -206,231,221,119,223,197,187,239,190,139, 43, 87,248,123,101,220,205,215,187, 34, 35,195,119, 11, 44, 59, 59, 91,186,124,249,114, -183,132,205,215,250,119,113, 61,223, 22,167,192,109,179, 44,191, 20,246,102, 66,192,234, 77, 16,181,235, 10,249,251,239, 35, 53, - 44, 2, 17,234,124,231,241, 89,127, 73,197,219, 31,255, 27,197,203,254,135,183, 6,140,193,148,200,238,216,179,101, 11, 74, 74, - 74,220,190,127, 79,100,200,209,175,127,127, 41, 23,212,200, 41,100,174,211, 51,238,246,121,176,190,104, 70, 70, 6,229, 2,251, -184,249,126, 87,146, 79, 77, 77, 85,199,197,197, 73, 57,215,127,106,106,170,218,203,125,203, 19,137, 68, 15, 60,241,196, 19,231, -170,170,170,160,213,106, 17, 18, 18,130,214,173, 91, 35, 34, 34, 2, 17, 17, 17,222,110, 30, 91, 79,158, 45, 56, 56, 88,255, 84, -198,191,164,107,126, 28,138, 11,151,170,209, 54, 92,128,248, 94, 4, 15,118,167, 8,107,209,162, 18,128,205, 3,111, 4,234, 13, -220,167,214, 63,224,125, 25, 96,173, 66,161, 8, 6, 16, 38,151,203,157, 90, 96,167,132, 14,126,105,190, 10,133,130,200,100, 50, - 40,149, 74, 26, 52, 43,167,142, 43,146,111, 30,128,150,143,141, 85, 87,228,236,128,222,106, 66,181, 78,143,115, 22, 11, 68,172, -221, 81, 95,101, 49,130,165, 20, 20,192,142,235,231,161,179, 90, 0,128,199,192, 68, 48,127, 73,221, 62,110,159, 10, 96, 97,131, - 9,191,157,173,193,234,141,213, 62, 93,175, 43,209,203,100, 50,117,125, 47,128,171, 82,224, 9, 50,153, 76,157, 35,159, 2,209, -216, 47, 0, 68,163,162,226, 86,112, 94, 16,123, 21,102,166, 61,254, 54,224, 12,174, 94,181, 15,196, 10,133, 98, 47, 31,185, 25, - 95,103,215, 81,188,114,114,114,192, 77, 74,108, 56,118,200,167, 85, 25, 77,141, 71,159,111,175,222, 42,167, 56,168, 60, 1, 0, - 24,209,207,158, 25,239, 31,243, 22,227,208,137,126,248,120,211,116, 40,182, 61,175, 82, 76,226, 71,224,207,206,151, 33, 42, 74, -233,106,200, 66,163,145,129,210, 28,135,171,146, 34, 39, 39,133,151,172,228, 39,159, 34,123,118,237,166,128,221,245, 47,149, 18, -220,188, 20, 14,157, 86, 12, 67,117, 16, 54,172, 37,152, 59,151,226, 98,121, 13,134,199,199, 97,250,212,105,188,172, 98,155,205, -230,156,239, 87, 42,237,109,117, 37,252,242,242,114,148,151,151,251,236,222,151,203,229,148, 97,152,219, 72, 53, 43, 75, 65,252, - 72, 2,164,166,148,214,137, 5,112,241, 8,240,118,133,187,186,246,235, 71,239,123,115,251,215, 87,114,172, 53, 53, 16,181,138, -130, 32,180, 25,250, 61,149,140,119,199, 37,226,117,110,217,222,224, 33,176, 25,140, 16,181,108,139, 1,113, 18,116,235,212, 29, -255,250, 45, 31,253,251,247,151,254,248,227,143,183, 41, 1, 25,114, 57, 0,162, 2,128,231, 51, 50,156, 75, 7,173,245,200, 94, - 40, 20, 0,244,214, 66, 69, 2, 96,160,155, 65,118,208,160, 65,132, 82,234,116,241, 23, 22, 22, 58, 93,252,174,231, 57,182,189, -146,191,195, 96,127, 35, 34, 34,162, 95, 92, 92, 92,143, 83,167, 78,225,232,209,163,176,217,108, 8, 11, 11,131, 94,175, 47,143, -138,138,186,224,139,209, 71, 8, 97,218,182,109,187,231,241,199, 31,111, 91,112,160, 16, 43,114,246,160, 5, 9, 66,175,182, 38, -156,189, 25,134,135,123, 89,206, 3,176,112, 10,154, 67,161,180,121,122, 38,174, 99, 93, 96, 10,224,222, 6,159,249, 98, 51, 0, -179, 43, 81, 95,206,187, 2, 76,247,157,252, 93,201,198,221,160,197, 87, 9,168,214,104,165,150, 80,177,170,138, 97,113,205, 88, - 11, 88, 44,176, 81, 10, 2,224,183,218, 74,148,233,171, 65, 41,229,146,216,240, 24,152, 40,210,167, 17,100,111,184,213, 39, 79, -157, 3,122,247,176, 66, 0, 93,163,200,223,181,179,251,235,242, 74, 73, 73,145,230,228, 60,175, 2,138,160,209,104,204,165,165, -165,194,165,137, 96, 22,238, 25,141,121,253, 15, 57,173, 48,190, 74,133, 59,175, 75,253,109,142,132,248, 90,115, 88, 76, 48, 52, -187,132, 2,238,151,251, 57, 51, 1, 42, 65,249, 4, 41,102, 76,250, 66,170,216,250, 55, 85,254, 38,138,248,168, 19, 24, 41,235, -135, 3,123, 78,160, 64,251, 62, 8, 8,228,147, 62,231,125,173, 81, 81, 74, 16, 66, 48,121,242,100,172, 90, 85, 13,206, 40,182, -255, 79, 29,247, 56,167,206,128,228, 97, 10, 22, 9, 99,164,210,188,125, 42,213,152, 49,128,249, 90,103, 92,170, 12, 6,235,152, -109,109,175,107,139, 87,210,107,176,167,160, 23,154,119,234,197,171,141, 28,241, 95,190,124, 25, 0,112,237,218, 53,167,103,224, -250,245,235,206,129,213, 31, 40, 20, 10,194, 37, 2,170, 63,135,155,165, 80, 16, 62,249, 0, 92,177,106,213,170, 58,177, 0,203, -151, 47,247,217,250,175, 79, 24,254, 66, 44, 22,227,218,197, 11,232,222,163, 39, 88,171, 9,196,106,131,176,121, 11, 52, 31, 50, - 20,205, 6, 63, 4, 86,103,133, 77,111, 2,181,218, 0, 27,139,133, 43, 63,198,212,233, 83, 33, 22,139,221,202,179,110,136,228, -245,187,238,206,139,253,208,253,185,241,241,241,210,130,130, 2, 21, 55, 6,140, 28, 57,210,237,189,226, 65,254, 32,132,176, 0, -118,246,234,213,107,240,167,159,126,106,190,113,227,134, 49, 49, 49,241,241,162,162,162,183,244,122,125, 69,171, 86,173,228,125, -251,246,213,248,112,239, 69, 0,186,196, 13, 31,222, 58, 99, 86, 6,206, 95, 62,175,121,102, 86,198,168,195,123,214,102, 94,173, -209,140, 24,154,144,200,182,237, 20,243,164, 27,175, 1,235,105, 44,112,229,138,134,146,255, 4, 18, 1,221, 63, 10, 64,131,214, -133, 63,228,207,145, 13,151, 19,192, 31, 37,160,187,124,134, 26, 0, 41, 83,172,161, 8, 17, 67, 75,173, 48, 91,173, 96, 41,139, -150,225,225,184,172,171,226,151,193,206, 1,119,203,251,110,197, 0,248,150,137,205,157,139,191,177,233,122, 29,127, 59,105,232, -208,161, 91, 23, 46, 92, 24, 20, 21, 21,197, 94,189,122, 21,243,250, 95,173, 67,254,190,252,134,187,251,239, 55, 28, 89,254,234, - 39,121,114,119, 14, 95, 12,126, 84,160,206,122, 52,139,108,249,236,138,100,251,177,119, 84,249,155, 0, 2,130, 73, 3,223,150, - 62,250, 60,255, 4, 64, 92, 95,178, 19,124,181, 99,144, 2,220,241,206,154, 76,187,243, 36,172, 75, 22, 1, 26, 46,174, 49,125, -234, 52,245,244,169,211, 72,133,246, 83,137,173,166, 70, 69, 4,128,222, 24, 2, 82, 99,133,144, 17, 66,207,136,165,227,166,204, -134,144, 18,175,237, 76, 76, 76, 36, 15, 60,240, 0,189, 83,239,159,221,218,207, 34, 25, 25, 25,212, 53,162,221,213, 19,224,163, - 56, 53,103,249,187, 40, 20,234,187, 49,120,141, 25, 51, 6,127,219,148,141,119,107, 42, 49, 40,225, 97, 48,109, 35,237,109,178, - 80,123,234, 94,136, 64, 4, 66,144, 32, 1, 86,101, 45, 67,139,177, 67,209,163, 71,143,223, 53,117, 47,103,221,231,231,231,171, -134, 15, 31, 46,157, 57,115,102,163,126,251,220,185,115,178,189,123,247, 94, 20, 8, 4, 91, 70,141, 26,245, 30,195, 48, 55,226, -226,226,242,156,150,140,139, 71,137, 16, 2,119,207,220,197, 19,160, 60,122,244,232,176,175,214,172,101,130, 4,193,151,146,159, - 78, 30,200, 48,140,246,225, 9,179, 39, 2, 8,119, 16,127, 13, 0,106,181, 90,157,242,234, 41,109,129,146,242,247, 32,248,184, -255,253, 82, 0,154, 66, 97,240, 68, 62,190, 12,112, 82,121, 42, 81,238, 81, 74,216,211,197, 42,157,201, 12,171,205,134, 30,195, -134, 32,198, 58,220, 39, 50,108,202, 96, 20, 46,233, 15, 0, 21,231,233,112,153, 10, 32,141,144,187, 77, 38,147, 9,149, 74,229, -252,165, 75,151,254,211, 69,185, 24,163, 80, 40,124, 74, 68,226,240, 20, 52, 89,242,146, 41,191,165, 56,238, 99,195,215, 55, 69, -169,244, 75,211,127,236,133, 14,234,199,208,248,231, 99, 39,119,130,103,231,143,113,230, 41,231,198,177, 53,153,123, 17,214, 37, -139,132,117, 73,241, 73,102, 68,139,191,171, 15, 94, 4, 97,153, 75, 18,131,222, 94, 7, 32, 76, 44, 83,135,119,132, 79, 43, 70, - 93,250,159,200,161,113, 54,249,188, 42,167, 4, 52,133, 44, 71, 44,128,138,251,222, 88,121,254,174, 44,235,209,163, 7,218,189, -248,162,116,197,238,221,170,146,247,190, 69,138,168, 37, 34, 28,197,123, 12,122, 43,230, 46,120, 13,130,208, 40,236, 88,171,192, - 47,173, 8,198, 53, 34,111,191,205,102,133,175, 49, 64,245,149, 0, 62, 86,190,151,251, 68,206,156, 57,115,131, 82,154,217,187, -119,239,255,171,168,168,208, 9,133, 66, 88,173, 86,218,178,101, 75,167, 71, 69,167,211, 33, 40, 40,200,233, 69,242, 32,111,116, - 97, 97, 33, 88, 43,193,136,145, 3,223,190,124,249,178, 86,163,209, 32, 42, 42,138,237,212,169,147,150,123, 54, 85, 85, 85, 16, -139,197, 32,132, 32, 56, 56,152,151,209,199, 41, 9,245,191,215,247,138, 6,112,159,121, 0,238,148, 82,224, 55, 49, 38,202,212, - 72,148,221, 83,209,164, 14, 37,128,220,129,121,116,155, 76, 38,251,127, 50,153,236,255, 53, 69,251,154,240,122, 73, 83,156,115, - 39, 97,183,234, 1, 71,138,253,122,199, 82, 26, 37,155, 97, 59,171,195,196,157,155,162,153,150, 59,121, 15,154,176,232,138,218, -151,185,122, 47,202,132,223,114, 40,165, 36, 52, 52, 20,147, 39, 79,134,163,124, 47, 74, 93,202,247, 30,220,187,199, 89,190,119, -108,220, 88, 56,148,222, 6,127,111,149,246, 67,242, 92,228,107,183, 19, 19,207,106,130, 60,148,128, 70,227,161,135, 30, 50, 89, -173,214, 60, 0, 58,150,101,169,217,108, 95,248,115,227,198, 13, 0, 64,179,102,246,165,189,220,126,145, 72,228,241,254, 61,250, -232,163,156,140,221, 44,203, 34, 34, 34, 2, 44,203, 58, 87,156, 56, 86,177, 16,163,209, 72, 1, 32, 65,144,246, 25, 0, 0, 32, - 0, 73, 68, 65, 84, 40, 40, 8,132, 16,230,247, 24,219, 3,240, 31,124, 82, 73, 3, 0, 25, 52,104, 80, 64, 19, 11, 32,128, 0, - 2,184,127, 96, 5, 96, 4, 32,110, 98, 35,206, 91,193, 32,222, 21, 5, 3,184, 63, 16,120,152, 1, 4, 16, 64, 0,247, 23,132, - 0,154,241, 32,127, 61,236, 65,220, 77,197, 7, 44, 2,203,254,254,112, 29, 41,128, 0, 2, 8, 32,128, 63, 30, 66, 3,124, 17, - 64,192, 3, 16, 64, 0, 1, 4, 16, 64, 0, 1, 4, 20,128, 0, 2, 8, 32,128, 0, 2,248,179,163,142, 75,103,206,156, 57,126, - 71,112,186, 43,222,115,175,203,139, 30, 18,140,144,224,107, 16, 5, 85,130,101,237,203,194, 4, 2, 6, 12, 17,216,255,103, 8, - 8, 97, 64,137,208,190, 6, 22, 86,108,221, 46, 2,165, 20, 81, 76, 75,248,216,190, 96, 0,173, 96, 15,224,169,129,125,185,151, - 5,142, 57,181,251,241,254, 5,228, 5,228, 5,228, 5,228, 5,228,221,155,242,124, 86, 0,254,108,248,225,192, 89, 12, 27,106, - 65,100, 4,160,209, 18,252,244,139, 24, 66, 70,136, 9,227,109,216,163,106, 13, 66, 24, 16,134,129,184, 57, 48,102, 88, 37, 0, - 33, 30,142,167, 40, 44, 18,218,105,156, 7, 84,135, 14, 80, 0, 16, 81, 11,134,143, 26,115,241,204,175, 63,154,202,171,141, 49, - 54,189, 17, 50,153, 44, 2, 64, 85, 64, 15,189,191,145,251,245,127, 36, 61,123,116, 87,221,184, 97,108, 84,194,167,251, 8,146, -244,244,116,215, 60, 0,141,186,230,244,244,116,191,211, 1, 7, 16, 64, 0, 77,228, 1,224,176,246,171, 47,121,107, 19,207,206, -156,229,245,101,109,106,121, 77,137,194, 34, 17,146, 18,109,248,229,215, 16, 4,137,132, 16, 10,132, 16,137, 40,130, 5, 22, 64, -216, 28, 66, 24, 48,172,159, 21,226,160, 96, 80, 0,237,219, 2,143, 77, 96,177,119, 11, 63,242, 63,251,219, 25, 60,208,183, 7, - 58,116,140,192,229,139,167,186,134,183,235,142, 86, 29,108,248,254,187,239,160, 84, 42, 43,239,246,250,120,165, 82, 57, 33, 39, - 39,103, 59,183,157,146,146,242,168, 76, 38,219, 30,120, 53,188,227,215, 95,148,212,106, 60, 33,157,246, 88, 15, 21,203, 86,160, -170,131, 65,117,234,248, 38,212,154,218, 99,104,236,168, 63, 44,137,165,167,167,171,230,205,155, 7, 66, 8,175,178,189,124,192, - 37,139,105,130,114,243, 1, 52, 82, 1,243, 8, 74,145,189,106, 85,131,207,155, 75,240,227,154, 45,144,171, 33,224, 82, 75,192, -249,156, 93, 43, 35, 6,208,180,224,178, 1,114,112,151, 27,224,158,242, 0, 48,248,125,251,193,132,113, 22, 80, 8, 32, 20,136, - 48, 98, 56, 65,155,214, 12,132, 66, 6,193, 34, 1,122,199, 48,184,120,201,138, 97,177, 12, 90, 70,137,241,253,190, 22, 0, 0, - 1, 53,192,158, 10,219,230,149,252,127, 45, 42, 66,183, 14,157,240,107,126, 1, 14,155, 45,208,222,212, 34, 40,184, 57,250, 12, - 30,137,129, 35,199, 65,181, 53, 7, 0,191,220,248,119,128,248,199,228,228,228,236, 93,184,112, 33,138,138,138,184, 14, 83, 9, -224,197,217,179,103,111, 75, 73, 73,145,201,100,178,189,127,184,151,226, 39, 37, 13, 22,106, 32,100,204, 48, 26,109,168,210,133, -224,225,209, 83,124,186,255,155,114,191,146,180, 8,209,224, 47, 83,135,160, 91,215,199, 84, 45, 90,132,195, 98,181,226,198,141, -155,104, 91,122, 9,197,231, 74,112,232,160,134,142, 24,249,184, 95,207, 53, 59, 59,155,186, 12,206,247,218,224, 40, 1,110,149, -195,117, 84, 7,148,224, 46,165, 3,254, 29,223, 23,186,121,243,230,219,235, 41,220, 53,242,162, 18, 2, 2,218, 4,247,157,150, -126, 13,114,120,182, 43,199, 59,178,100, 58,170, 33,185, 96,118,150, 14,195,166,126,234, 81,145,251,254,251,239,157,219, 73, 73, - 73,216,185,115,167,199,237, 0,238, 60,249,187,238,115, 85, 4, 60, 42, 0, 7, 15, 28,198,200,135,135,255,110,141,102,125,200, -159,234,154, 74,210,223,236, 83,140, 80, 0,173, 70,136,118,109, 68,104,215, 38, 8,181,181, 34,136, 69, 66,216,132,193, 24, 50, -128, 96,208,131, 2, 48, 68,100, 79,129, 41, 10,130,136, 49,129,136,131, 96,213, 3, 86,232, 60,146,255,129,125,123,209,189,125, -107, 28,255,229, 56, 22,189,247,118,157,246, 45,121,231, 3,202, 8, 8,134,196, 14,193,247, 59,247,250, 84,121,143,101, 89, 73, - 81, 81,145,234,236,217,179, 8, 9, 9, 65, 72, 72,136, 52, 41, 41, 73,237,227, 96, 38,205,201,201,217,203, 17,191, 75,231,136, - 0, 48,238,223,255,254,247,205,217,179,103, 43, 1, 36,202,100, 50,229,189,216,193, 87,175, 94, 45, 73, 75, 75,227,125,221,255, -219,184, 86,210, 63,166,185,170,107,123, 35,194, 91, 4,131, 97, 66, 97, 48, 88, 81,161, 49, 32, 79,185,130,138, 91, 12,193,240, - 97,163,121,245, 35, 17,174, 97,242,163, 15,170,250,245,235,131,171,215,180, 56,242,211, 81,212,214,234, 16, 30,222, 28,209,209, - 93,193, 8, 68,176,217, 74,241,211,207, 7,232,224, 65, 15,255,161,172,155,244,244,116,213, 75, 47,189,228,220,158, 55,111, 30, -150, 47, 95,174, 90,229,193, 42,244,137,140,238, 81, 15,128, 67, 73,167,185,185,185,112, 87, 88,233,247,132,171,149,173, 80,100, - 73, 41,109,156, 18,192,116,125,202, 73,222,133, 31, 54,115,107,134,181,139, 96,208, 49,138,185,111,159,223,159, 21,174,100,239, - 78, 41,240,234, 1, 56,120,224, 48, 0, 52, 90, 17, 56,240, 98,177,199,227, 15,255,171,167,223,131, 5, 33,196,175,106,123, 74, -117, 27,136,132, 34,116,238, 80,139,154, 26, 17,142, 28,239, 12,129, 64, 0, 1, 17, 32, 72,100, 69,191,158,122,244,234, 41, 0, - 1,131, 32, 81, 48,130, 4, 4,177, 15,154, 17, 21,201, 98,253,255,121,150,221,167,123, 91, 92, 60, 87,126, 27,249, 3,192,162, -197,175,147, 15,222,251, 39,109, 31,255, 32, 34, 35,154,243,110,175,193, 96,144, 44, 95,190, 92,117,241,226,197, 58,250,134,201, -100,194,227,143,243,183, 54,115,114,114,246,185,146,191, 27,180,202,204,204,172,124,249,229,151,247,220,237, 41,138,134,200,255, -240,225,195,170,180,180, 52,222,109,139,137,142, 82,117,108, 91,141, 86, 45,195,208,169, 99, 59,132,134,133,226,226,197, 50,216, -108, 44, 58,118,104,142, 19,191,229, 99,205,233, 98, 73,234, 51,179, 60, 14,166,199,142, 29,160, 79, 78,234,131, 46, 93, 58,225, -228,111, 23,113,228,200,111,184,113,179, 6,148, 2,145,145, 33,208,235,107, 49,120,112, 63, 84, 86, 86,161,236,200, 79,248,234, -191,103, 36, 51,255,194, 95, 81,185,199, 33, 1,236,197,167, 56,124,242,201, 39,220,182, 79, 94,128,244,244,116,234,234, 18,118, -181, 32, 93, 93,210, 77, 49,189,240,222,123,239,209,206,157, 59, 55, 58, 23,191, 76, 38, 35,132, 16,186,105,211, 38,143, 57,246, - 57,100,100,100, 80,119, 30,130, 53,107,214, 72,184,226, 64,238,148, 88,185, 92, 78, 27, 74,229,234, 90,207,129, 82, 10,185, 60, - 67,213, 24, 47, 68,125,121,195, 94,171,197,143, 31, 54,171, 67,252, 1,220,159,214,127,253, 62,212,168, 41,128,198, 42, 2, 15, -255,171,103,131, 74,128, 63,228,207, 33, 47, 47, 15,101,101,101, 0,128,142, 29, 59, 82, 95,148, 0, 1, 53, 64, 72,108, 8, 18, -137,240,211,241,214, 16, 8,133,104, 46,210,217,227, 0,154, 49, 40, 43,107,142, 7,251,177, 32,132, 32,229, 49, 43, 40,203, 0, - 36,216,238,120, 67, 77,131,114,245,149,151,112, 77, 83,139,151,223,122,171,193,182, 84, 86,105,160,189,113,205, 33,139, 55,113, -215, 39,127, 0,192,142, 29, 59, 96,179,217, 36, 79, 62,249,164,215, 1, 78,169, 84,142,169, 95,250,151,235, 48, 85, 85,117,226, - 17, 35, 22, 47, 94, 12,165, 82, 57,246, 94,154, 10,224,200,223,151,191,249,223,198,181,146, 7, 99, 76, 8, 9,137,128, 56, 56, - 8,221,187,119, 67,231,110,221, 80, 93,173,134, 70, 83,139,160, 32, 1,162, 34,197, 16,134, 68,120,204, 21, 15, 0, 66, 90,134, -230,205, 90, 66,111,176,226,248,241, 98, 92,185, 86,133,171,215,106, 97, 48,137,209,165,163, 21,226, 96, 1,138,207,148,224,129, - 30, 61,112,229,106, 53, 12,214, 22, 94,101, 58,136,142,122,219,239,235,116, 64, 67, 50,253,145,197, 89,255,243,230,205,187,109, -255, 75, 47,189,228, 87, 44,128, 59, 18,173, 63,119,220, 84, 94,133,252,252,124, 21, 26, 89,144,103,239,222,189, 52, 39, 39, 7, - 41, 41, 41,112, 55, 29,192,199, 83,197,145, 63, 0, 20, 22, 22,170, 24,134,169,211,166, 53,107,214, 72,248, 24, 61,241,241,241, - 82, 78, 78, 83,120, 92, 54,189, 20,134, 41,203,117,110,137,191, 99, 20,227, 24,165,248, 61,222,164,164,164, 58, 94,146, 71, 30, -121,164,206,189, 10,184,253,239, 29,248, 28, 3,208, 84, 30,129,166, 68,113,177, 93,177, 40, 43, 43,243, 73, 9, 16, 10,133, 16, - 9, 68, 16,137, 8, 70,143, 4,244, 58, 19,206,159, 11,130, 72, 40,130,208, 38, 68,220,112,138, 32,145, 8, 2, 1, 3, 80, 2, -141, 22,248,241,168, 16, 44,203, 2,184,209,160,220,163, 63,157, 67,109,109,195, 25, 56, 63, 90,188,152, 6, 7,139, 97, 48, 84, -193,198, 90,121, 95,231,209,163, 71, 27, 86, 58,244,122, 94, 68, 83,223,245,239, 78, 51,220,186,117,171,235,249,202,187,225, 5, -112,231,226,119, 37,255,248,248,120,222, 85,232, 58,117,108,171, 98,152, 75,176,218, 88,152, 45, 86,220,184,169,129, 40, 72, 12, -147,201, 2,139,213, 6,171,149,133,213, 70, 81,169,189,233, 85, 86,144, 72, 7,113, 72, 39, 84, 84, 84,161,186, 70, 15,141,214, -128, 22, 45, 7, 98,196,131, 15,162,240,224, 78,116, 48, 91, 81, 85, 93,133, 94,189,122, 32, 56, 72, 8, 93,141,230,143, 50, 86, - 72, 40,165,206,185,127, 87,172, 88,177,194,175, 88,128,121,243,230,213,241, 38,212, 63,198, 87, 1,176,151,122,230, 44,218, 40, -140, 29, 59,182, 78,127,229, 12,132,210,210, 82,149, 82,169,244,171, 48,149, 82,169,116,146, 63, 55, 29,176,121,243,102,175,228, - 90,223, 83,149,159,159,175,226, 2,223,228,114, 57, 45, 40, 40, 80,165,166,166, 58,143, 23, 20, 20,168, 8,241,220,188,248,248, -120,169,107,153,225,140,140, 12,234,233, 94,121, 27, 15, 83, 82, 82,144, 28,175,196, 70, 0, 83,151,235,240,208,107,181, 30,239, -253,176,169,158,239, 85,253, 57,126,111, 49, 1, 1,220,121,111, 64, 67, 30,128,223,213,191,227,206,210,111,140,245, 95,207, 98, - 69,113,113, 49, 86,172, 88,193,187,212,164, 64, 32, 68,220, 48, 22, 2, 70,136, 31,139,196, 56, 93, 44,198,196,241,192,163,143, - 0,147,146, 8,218,183, 13,130, 56, 40, 24,226,160, 96,132,136,131,209,177,125, 48,196, 65, 98,136,131, 60,151,196,124,115,209, - 27,100,233,135,239,146,134, 6,146, 30,221,187, 34, 60, 34, 12, 98,214,140, 90,189,229,119,239, 20, 7, 14, 28,216,123,224,192, -129, 58,132,239,250, 1,128,138,138, 10, 76,154, 52,233,174, 89,249,133,133,133, 42, 87,107,136,219, 7, 0,195,135, 15,247,201, -146,179,217, 0,157,222, 2,157,206,140,234,106, 19,174, 95,215,226,202,149,155,168,169, 49,161,182,214,130,218, 90, 51,116, 58, - 11,170, 42,189,175,200, 52,153,172, 48, 26,109,176, 88,204,104,222, 60, 8,157, 59,182, 64,104, 88, 24, 0, 32,186, 71, 55,116, -234,208, 2,225, 45,196,160,212, 6,139,149,133,201,164,251, 67, 12, 36,233,233,233,170,249,243,231,123, 36,115,110,105, 32, 79, -239,132,212,161, 52,184,197,242,229,203,177,106,213, 42,159, 75, 13,219,221,226,114,234,250,225, 8,181,172,172, 12, 57, 57, 57, - 62,151,162,221,187,119, 47,205,205,205,117, 37,127,200,100, 50,146,156,156,236,241,239,230,204,153, 3, 66,136,211,170, 95,189, -122,181, 4, 0,226,226,226,164,174, 74,172,235,113, 74,169,243, 56,143,171,173, 99,197,187, 83, 28,188, 41, 19, 0,208,170, 85, - 43, 16, 23,235,161,177,242, 2,184,247,200,223,221,182, 95, 30,128,123,201,242,191, 53,192,219, 32, 16, 8,124,254,187,145,195, - 88,180,105, 29,140,234,106, 33,130,133, 86, 4, 7, 9,160, 62, 28,132,137, 82, 17,130, 68, 34, 84, 87,139,112,176, 40, 12, 45, -196, 4, 12,195, 32, 73,102,198,227, 19, 41, 24,134,226,253,159,125,111,167, 82,169,164,130, 80, 49, 52,162, 86, 8,181, 92,198, -217, 50,138, 49,146,209,188,255,126,240,224,193, 56,116,232,144,219, 99,161,161,161,188, 7, 75,173, 86, 59,214, 49,240, 32, 53, - 53,213,185,191,162,162,194,249, 61, 53, 53, 21,229,229,229,119,229,121,166,165,165,169, 11, 11, 11,145,159,159,175, 98, 89, 86, -202, 48, 12, 56,203,191,161,121, 83, 79, 40,189,116, 69,218,186,133, 94, 21, 28, 36,128,217,194,194,104,186,140, 75,151, 43,160, -209, 86, 67,163,209,163, 66, 99, 64,133,198,128,136,168,110, 94,101, 93,191, 73,113,237,250, 77,244,233,211, 3,149, 90, 45, 68, - 66, 6,213, 53,151,161,171,100,209,247, 1, 29,218,182,110,141,208,208, 80, 4, 7,135,224,234,181, 26, 16, 65, 36, 95,130, 37, - 46,228,216, 36,171, 0,154,122, 5, 65, 67,214, 58, 80, 39, 22,128, 47,212, 0, 48,119,238,220,219,188, 10, 46,211, 12,106,127, -218, 57,101,202,148, 58, 22,108, 78, 78,142,147,188,158,122,234, 41, 36, 38, 38, 18,190,137, 83,220, 88,254, 78,212,247, 52,212, -199,160, 65,131, 8,165,212,105,229, 23, 22, 22,170, 8, 33,206,210,192,169,169,169,234,252,252,124,228,231,231,171, 82, 83, 83, -201,225,195,135,157,199, 87,174, 92,217,160,220,252,252,124, 21,195, 16,105, 65,129,253,157,152, 51,103, 14,126,254,249, 39, 41, - 71,225, 5, 5, 5, 42,238,250,249, 40, 19, 43, 87,174,196,231,210, 72, 76, 93,161, 7, 96,159, 14,112,197,212, 21,122,231,253, - 76,147,138, 2,204,122,191, 40,237, 11, 63,170,171,116, 47,125, 21, 63,255,252, 51,255, 85, 0,119,130,248, 93, 99, 1, 26, 99, -253,215,181,228,235,146,127, 82, 82, 18,228,114,185,215,169,128, 86,173, 4, 96,136, 0,173, 91, 9,208,179, 7,197,149, 43, 66, - 48, 2, 2,145, 80, 8,145, 80,132, 95,143,133, 33, 42, 76, 4,129, 64,128,145,195,109, 8, 9, 9, 6,203, 82,128,218,252, 34, -255,102,109, 59,227,122, 45,133,238,172, 26, 66, 34,192, 43,139, 23, 17, 31, 7, 54,233,165, 75,151, 84,151, 46, 93,186,237,122, - 39, 79,158,204,107,176, 76, 73, 73, 73,172,168,168,216,195,145, 60, 0, 76,154, 52, 9,107,214,172,113,158, 83, 93, 93,141,242, -242,114,108,219,182, 13, 41, 41, 41, 99,238, 70,231,141,139,139,147,230,231,231,171, 10, 11, 11, 85, 92,176, 88, 92, 92,156, 95, -115,184, 51,255,146,166,222,240,191,108,208,178,106,232, 13, 22,104,131,141,160,208,194,104,180,162,186,218,132,242,155,122, 92, -185, 90,139, 81,210,174, 94,101, 25,204,173, 80,114,254, 6,162,187,119, 65,247,238,157, 80, 81,113, 19,145, 17, 54,244,236, 25, -142, 54,173,163, 33, 14, 9, 65,101,101, 45,142, 28, 61,133,203,101,213,104,215,169,223,125, 59,128, 80,128, 18, 2, 41,199,165, -174,164,234,105,221, 62,117, 4, 11,222,110, 62,162,206,170,178,236,236,108,233,138, 21, 43, 84,245, 21,128,101,203,150,113, 9, -134, 60,202,163,148, 82, 66, 8,145,203, 35, 93,218, 68,111, 35,230,156, 28,251, 20, 65,114,114, 50, 47,247,127,221, 41,133,189, -110,201,159, 47,226,227,227,165, 5, 5, 5, 42,206,235, 48,114,228, 72,169,187,227, 92, 48,158, 55,194,230,230,214, 15, 30, 60, -164, 34,132,128, 16,130, 65,131, 6, 74, 7, 13, 26,164,118, 81, 16, 28,231, 2,222,222, 23, 78, 30, 51, 69, 11, 78, 94,202,152, -110,117, 30,212,148,229, 39,157,242,248, 32, 16, 3,112,255,192,171, 2,112, 47, 90,252, 28,166, 77,155,214,168,191,103, 24, 6, - 2,129,253,211, 39,134,193,224, 1, 54, 4, 7,137,237, 10,128, 72,132, 17,195,129,224, 96, 64, 36, 8, 70,171, 86, 98, 8, 4, - 58,216,108, 44, 88,214,119,183,189, 94,115, 13,226, 78,189,113, 94,249, 95,180, 22, 50,120,102,209,235, 62, 15, 40, 33, 33, 33, -234,215, 95,127, 93,218,152,101,128, 50,153, 76, 41,151,203,241,194, 11, 47, 56,247,113,150,126,117,117, 53,244,122, 61,210,210, -210, 0, 0, 95,124,241, 5, 20, 10,133,234,110, 60,219,212,212, 84, 53,203,178, 82,206,242, 31, 54,108, 88,163, 2,184, 58,117, -237,133,162,130, 93,104,211, 42, 20,161,161,246,110,111, 50,217, 80, 93, 99,134, 70,107, 64,231,238,253,240,240,136, 4,175,207, -100,194,132,167,200,238,239,255,143, 22, 20,158,192,168,145, 3,209,181,107, 87, 88,204, 70, 12, 30,244, 32,194,194,195,113,177, -164, 20,101, 87, 42,113, 48,255, 55,104,107,194, 49, 57, 62,225,190,245,153,206,201,144, 3,128, 10, 32,152, 35,151, 59, 9,156, -173, 71,250, 12, 67,236,218,130,131,151, 9,128,129,110,230, 27, 51,228,114, 10, 10,151, 72, 21,130,244,244,244, 58, 94,128,185, -115,231,130, 16,130,140, 12,185,138, 99,127, 16, 96,224,192, 65,238,200,203,233,142,247, 70,114,124,201,191, 62,146,147,147, 49, -118,236, 88,105, 99,250, 49, 28,115,245,195,255, 63,123, 95, 30,222, 68,181,191,255,206,100,239, 74, 91, 74,203, 94, 40, 84,144, -173, 64, 69, 68,150, 4,202, 34, 75, 69,160, 40,139,124,145,235,109,192,237,178, 92, 69,209,251,243,222,171,160,184, 0, 94,185, - 66,203, 85, 81,161, 98, 91, 5, 11, 22, 10,133,132, 69,212, 74,169,236, 88,160,172, 45,116, 77,211,166,217, 51,231,247, 71, 58, - 49, 13,105, 51, 73,195,234,188,207,147, 39,201,204,228,147,153, 51,115,206,251,217,206,231, 60,252,176, 98,206,156, 57,234,166, -246, 59,197,246,155, 4,155, 59,192, 42, 95,246, 48, 2,165,118, 85, 42,184,158,159,171,188,140, 69, 65,246, 70,151, 70, 57,142, -201, 88,116,197,161, 16,228, 30,107,126,236,115, 87, 7,128,207, 1,184, 71, 21,128, 33,143, 14,186, 37, 49, 31,127, 89,254,206, - 15,146, 47,168,214, 80,104, 27, 69, 59, 74,254,238,222,107,143,239, 75, 36, 82, 72,196, 18, 76,122,140,130, 84, 34,134, 76, 74, -161,186, 74,128,252,130, 96,216, 24, 27, 58,118,240, 46,174,155,151,151, 71,106,244, 6,104,142,228,160,123, 71, 17, 78,150,248, - 30, 23,166,105, 90, 61,104,208, 32,106,208,160, 65, 62,203, 72, 78, 78, 86,172, 93,187, 86,197,186,249,171,170,170,158,124,248, -225,135,117,123,246,236,249,225,241,199, 31, 31, 83, 85, 85, 69, 61,253,244,211,185,201,201,201,138, 59,249,112, 54,184,250, 21, - 78,159,125,127,230,236,228, 78,138,206,158, 70,105,241,101,208, 52, 5,155,141, 64, 42, 11, 71, 92,207,222,120, 98,114, 50,231, - 7,189,180,130, 81, 84, 87,149,170,140, 70, 43,250,244,238,138,246,237, 90,227,202,213, 50,104, 78, 92,192,239, 69, 87,176,119, -223,113, 92, 46, 33,120,246,175, 47,250,212,121,238,150,226, 63,204, 55, 97, 62, 31,215,127, 5, 71,121, 23, 62,199,154, 53,107, - 28, 10,192,154, 53,107,128,226,141, 55, 29,235, 78, 94, 19, 94,129,155,198,172,150, 22,235,161, 40,170, 69,207, 30, 75,242, 77, -145,187,167,253,238,188, 10, 46,191,117, 39,143,251,125,190,252, 45,178,214,204,177,143, 13, 35, 59, 53, 34,127, 0, 72, 30,255, -144,253,131,230, 55,143, 10, 0, 95, 7,224,238, 65,218,202, 87,111, 10, 3,120,165, 0,220,205, 9, 31,190, 22,255,113,198,145, -163, 18, 72,197, 98, 76, 26, 79,129,166, 40, 12, 74,176,226,196, 73, 25,104,202, 30,243,175,169,161,209, 46, 90, 0,154, 18,227, -216, 9, 49,164, 18,192,108, 49,227,242, 21,153, 87,228,127,161,168, 16, 15,143,154, 8, 97,235,135,113,161, 40, 31,194, 27, 89, -120,229,229,215,200,123,239,191,115, 71, 26,184,161, 94,189, 34, 33, 33, 65,181,116,233, 82,244,238,221,187, 92,163,209, 32, 33, - 33, 65,161,209,104,240,210, 75, 47,169,146,147,147,239,138,186,246, 45, 37,126, 87, 37, 96,232,144, 17,216,248,213,167,242,182, -209,109, 85,129,129,129,156,172,254,155, 6,216, 57,127, 81, 3,160, 54,111, 74, 37,167,127,255, 5,109,163,130, 32,149,138,160, -211,153, 81,114,189, 22,148,176, 35,158,253,235, 28, 62, 91,138, 11,142, 46, 1, 98,159, 65,163,233,133, 5,139, 91, 66,214, 45, - 62,165,249,243,195,157, 20, 9,255, 16,154, 39, 82,246,134,180, 91, 90,207,192, 93,155, 37, 63, 34,177, 95,171,225,186,253,197, -227,158, 69,124,124,188, 35,225, 47,109,229,171, 55,237,243,168, 0,248,187, 30,255,237,174,239,239,213,195, 15, 10, 26, 13,133, -128,104, 10, 17,225, 20, 18, 6, 88, 32, 21, 11, 32, 17, 91, 16, 17, 46,109, 24, 4, 40, 12, 78,176, 33,255,168,200,238, 45,224, - 56,200,228,229,229,145, 94, 15,132, 96,201,223,254, 13,131,184, 3,190,203, 43, 65,108,156,221,114, 15,250,117, 7,150,252,253, - 53,242,225, 7,119, 78, 9, 72, 76, 76,164,242,242,242,228, 43, 87,174, 84, 57,123, 7,252,161, 92,221,205,104, 40,246,211,226, -107,156, 53, 91, 73, 29, 58,188,159, 84, 84, 85,192,112, 67, 15,169, 52, 2, 29,186,244,245, 73,169,184,215, 96, 47,135,237,167, -203, 44,222, 8,199,140,128,226, 47,238,248,181,121, 74,238,187,223, 48,102,226,147, 94, 89,238,158,124,143,124, 14,192,221,165, - 4, 52, 69,254, 30, 61, 0,127, 6, 16,216,179,250, 41,154,128,128, 32,188, 21,193,254, 67, 66, 72,197, 34, 72,196, 66, 36,141, - 39, 32,132, 65, 88,132, 21, 86, 27, 5,134,177, 53, 12,126,158,209, 55, 70,135, 9, 83,147,161, 19,118, 71,155,160, 64,204,124, - 34, 28,233, 91, 79, 56,148, 0,139,237,187, 59,126,253,172, 34,192,119, 25,223,189, 10,247,235,181,165,105,222,165, 82,194, 94, -189,153, 25, 50,195,125,149,135,148,176, 87,111,222, 81,176,184, 69, 86, 63,143,150, 97,218,243,107,253,246, 12,223,239,198,195, -189,166, 4,120, 52,128,227,227,227,249,160, 13, 15, 30, 60,120,240,224,241, 39, 3, 95,232,153, 7, 15, 30, 60,120,240,224, 21, - 0, 30, 60,120,240,224,193,131, 7,175, 0,240,224,193,131, 7, 15, 30, 60,120, 5,128, 7, 15, 30, 60,120,240,224,113,127,160, -209, 44,128, 5, 11, 22,248,156,193,233,174,182,182,191,229,205,154, 55,223,227,239,234,171,111, 56, 62, 7,134, 71, 59, 62,111, -254,108,253, 77,199, 70, 42,158,245, 40,111,207,234, 63, 42,230,141, 94,180,214,241,185, 66,245, 63,248,114,126, 77,193,215,243, -107, 10,238,206,111,242,211, 74,143,191, 59,162,250, 1, 49, 49, 49,184,116,233, 18, 18, 20, 19, 28,219,183,125,149,122,203,219, -239,217,235,215,155,125, 94, 76, 66,161,124, 73, 73,137, 99,202,226,218,168, 40,199,241,255,107,219,246,150, 63,127,174,242,178, -179,179,229, 57, 57, 57,141, 42, 37,142, 31, 63, 94,145,148,148,164,190, 19,253,163,176,176,208,103,121,253,251,247,191,213,231, - 71, 45, 88,176, 0,119,243,248,114, 39,228,165,167,167,207,232,211,167, 79,250,137, 19, 39,166,206,156, 57,243,187,150,202,115, - 94,232,200, 57, 35,255,126,109, 63, 94, 94,211,242,188, 86, 0, 92, 97,181, 90,229, 70,163, 17,148, 64, 4,138,162, 96,179, 90, - 32, 22, 9, 33,145, 72,212, 45,213, 60,172, 86,171, 28, 0,132, 66, 97,139,100,213, 87,223, 64, 96,120,180,131,248,163, 59,198, - 0, 0,110, 92,189,228,147,188, 61,171, 95,192,232, 69,107, 29,196,245,223,236,124, 0,192,243, 73,131,112, 63,226,136,234, 7, - 36, 40, 38,224,136,234, 7, 0,192,132,105,179, 0, 0,151, 46,221,249,246,251, 79, 89,153,188, 8, 80,197, 1,138, 34,192,190, -134,250,210, 87, 0, 0,131, 86,190,119, 71,219, 77,173, 86,147,156,156, 28, 24,141,198, 70,219,165, 82,169, 42, 36, 36, 4,114, -185,252,174,156, 14, 69, 81,212,208, 7,186,180,255,130,216,108,250,162, 43, 55, 94, 35,132,236,224,237,160,102,148, 78,147,105, -100, 97, 97, 97, 72,105,105,105,116,120,120,120,171,129, 3, 7,150, 4, 7, 7,127,229,171,188,244,244,244, 81, 51,103,206,220, -159,158,158,254, 44,128,208,167,158,153, 63, 15, 0,115,226,196,137, 57, 0,182, 1, 96,188,145,199,174,121,194, 18,127, 75,250, -155,235, 42,137,254,154,210,215,148, 82,194,227, 46,243, 0, 56,163,182, 78, 39,111, 27,247,144,106, 68,159, 30, 8,144,136, 64, - 8,129,205, 70,112,242,220,101, 92, 60,126, 80, 33,147,136, 32, 16, 8,124, 34,239, 32,233, 37,121,175,238,197,170,147, 69, 93, - 21,245,166, 24,159,137, 31, 0,100,161, 17,168,175,190,225, 32,254,230, 60, 2, 92, 44,213, 65,179, 94,197,158,213, 47, 56, 58, - 82, 83,199, 53, 55,199,210,245, 63,197, 98, 49, 0,123,153, 76,134,177,247,111,155,205,230, 56,127, 90, 32,226,108, 69, 3, 64, -219, 54,246, 82,157,230,218, 26,152,172, 86, 0,128,206,106,151,215,101,204, 95,208,173, 87,127, 78,196, 15, 0,253,134,140,194, - 17,213, 15, 14,226,111,234,184,219,217,126, 0,240, 66, 89, 25, 1,128,177,129,129,200,173,175, 87,177,196, 15, 0,191,239,222, -115,211,113,241,109,219,114, 58, 79,109, 96,165,188,160,242, 87,148, 92, 57,134,238,157, 7, 99,176, 84,238,245, 51,156,157,157, -253,248,206,157, 59, 89,242,183, 2, 48, 2, 8, 0,192, 24,141, 70,161, 76, 38, 67,109,109,173,220,157, 39,224, 14,147,127,212, - 67,241,125,118,230,126,189, 62,168,190,228, 12,134, 38, 47, 72,167, 40,106, 14, 33,100,219,221, 54, 48,229,229,229,145,150,212, -167,224,178, 24, 88,115,176, 88, 44,242,252,252,124,213,169, 83,167, 28,219, 42, 43, 43, 81, 84, 84,132,182,109,219,126, 41,151, -203, 21,193,193,193, 92,239, 47,157,158,158,254, 47, 0,143, 12, 29, 59, 89,150,158,158, 30,245,212, 51,243,131, 1,216, 0,176, - 15,238, 3, 13,199, 13,231,122,125,108,127, 83, 42,149,164,169,254,198, 30,231,169,191, 41,149, 74,114,224,167,124, 8, 4, 66, -216,108, 86,104,235,116,152, 57,245,113,242,193, 7, 31,180,136,176, 93,149,138,150,222, 23, 30,158,225,110,217, 95, 22,156, 42, - 1,214, 27,204,242, 81, 73, 51, 85, 29,219,132, 34, 64, 42, 4,195, 48,176, 49,128, 80, 64, 33, 60,180, 7,122,117,239,164,202, -203,253, 65, 97,179,212,203,189, 85, 2,204,102,179,188,103,175,139,170,126, 61, 46, 66, 64,219, 84,234, 35,237, 21, 98,145,200, - 43, 25,245,213, 55, 32, 11,141, 64,104, 72, 48, 0, 56,222,221, 29, 23,221, 49,198,163, 55, 96,207,234, 23, 48,104,214,171,248, -191, 39,167, 0,128,227,221,221,113,255,205,206,247, 74,187, 22, 8, 4,232,208,161, 3, 4, 2, 1,204,102, 51,234,235,235, 97, -179,217,160,209,104,124,186,185, 65, 66, 1, 62, 91,179, 21,146, 80,160,236, 18,240,171,174, 4, 21, 55,206,227,171,213,175,121, -101,245,247, 27, 50, 10, 29,218,217, 67, 36, 29,220,144,127, 76, 76,140, 35, 28, 0, 0,215,174, 93,243, 75,251,113, 41,174,250, - 66, 89, 25, 25, 27, 24,136,183, 94,120, 30, 0,240,150, 19,241,111, 42, 42,106, 76,254, 94, 84,107,221,127,105,147,188,243, 51, - 66,213,171,157,102,195,196, 36, 66,194, 16,156,169,220,139,207,223,207, 80, 76,235,155,202,245, 25, 20,230,228,228,108, 51, 24, - 12,216,184,113,163,113,238,220,185, 82, 0, 65, 0,152,141, 27, 55,154,231,206,157, 43, 52, 24, 12,144, 74,165,170,164,164,164, - 22, 13,116,223,125,247,157,124,247,238,221,170,150,214,178,119, 60, 59, 98,250,255,125,252,214, 43,178, 86,167,191,134,236,247, -125,248,231,200,176,224,151,182, 87,252,187,193,242,188,171,200, 63, 35, 35, 3, 26,205,104,146,153,153,236,245,181,127,246,217, -103,242,150,144, 77,125,125,189, 60, 59, 59, 91, 85, 87, 87,231,118,255,245,235,215,145,149,149,165,234,217,179,167, 98,240,224, -193,158,158, 27, 42, 61, 61,253,171,161, 99, 39, 79, 47, 42, 60, 44,236,208, 46,218,250,212, 51,243, 27,141,187,251,126,248, 14, -125,250,244,233,145,158,158,254, 88,159, 62,125,178, 1,224,208,161, 67,205,146, 42,151,254,166, 84, 42, 9, 40, 10,240, 80,229, -111,253,250,245,228, 70,121, 37, 10, 79,158,118,108, 51, 26, 77,120,239,227, 52,157,114,238, 12,158,176,239, 99,220,148, 4, 88, - 87, 87, 39, 31, 58,230, 9, 85,143, 78, 17,144,136,104, 48, 12,131, 27, 55,110,224,196,177, 66,152,173, 12, 24,134, 32, 34, 52, - 0, 99, 30,155,168, 50,152,172, 94,255,161, 68, 84,142,216, 78, 55, 0, 1,133, 7,187, 95,133, 68, 88,230,181,229,239, 76,254, - 55, 89,120,181,117,184,113,245, 18,100,161, 17, 77,122, 5,154, 35, 47, 87,124,241,205,119,120, 62,105, 16, 6,205,122,181, 73, -171,214, 29,196, 98, 49, 4, 2, 1, 66, 66, 66, 80, 92, 92, 12,141, 70, 99, 87,164,124, 36,255,182,109,162, 16, 36, 20,224,137, - 23,223,198, 99, 51,135, 96,199,201, 18,220, 48,160,197,228,239,138,107,165, 55,112,234,200,143,136, 12, 11,177,147,191, 80,224, -151,246, 27, 55,245,255, 0, 0, 97, 66,145, 87,228, 15, 0,255, 88,251, 95,252, 99,237,127, 29,228,159, 91, 95,143,151,199, 76, -180,239,140, 20,115,186,238, 47, 46,191, 43,255,235,146, 71, 84,207,116,126, 14, 34, 58, 8,129, 8, 0, 13, 1,218, 71, 61,138, - 23,222, 90,172, 42,110,183,154,147, 26,161, 86,171, 45, 0,240,197, 23, 95,232, 1, 72,217,101,148, 55,110,220,200, 0, 8,112, - 94, 86, 89,173, 86,251, 20,151,211,235,245,114,111,182,115,176,252,135, 62, 52, 32, 94,159,249,221, 86,101,255,222,113,130,250, -211,123,113,169,188, 14,215,107,244, 96, 8,241, 41, 17, 56, 37, 37,133, 36, 39,103,146,205,155, 55,251,181,144,152, 19,249, 35, - 60, 60,207, 39, 25,249,249,249,170,212,212, 84,138,162, 40,135, 50,224,229, 57,220, 68,254, 71,142, 28,193,204,153, 51,157, 61, - 4, 56,123,246,172, 74,175,215, 55,187, 96, 86,122,122,250, 11, 67,199, 78,158,184,124,217, 34, 97,102,102, 38,254,247,241, 7, -194, 6,143,145,131,252, 51, 51, 51,177,118,237, 90,244,233,211, 39,219, 83,127,115, 37,255,166,250,219, 99,143, 54,120, 1,131, - 3, 61,202,251,240,227,117, 14,242, 47,175,172, 66,121,101, 21,180,117, 58,136, 68,194,160,117, 27,191, 54,186, 90,241, 60,238, - 13,196,199,199,223,244,106, 86, 1,176,217,108, 36, 34,166, 47, 98,162, 91,193,104,177,129,162,128,220,220, 93,248,242,139,141, - 56,126,236, 24, 94, 94,188, 16, 2, 1, 13,198,198, 32, 36, 64,130,152,190, 67, 85, 6,131,129,115, 7,179, 88, 44,242, 94,221, - 47,171, 66,130,244,248,236,139,114,208, 20,193,160, 62,191,171, 44, 22,139, 87,157,212, 29,249,179,196,111,208, 86, 53, 82, 16, -180,181,117, 30,229,185,235, 76,108, 71,202,223,252,110, 35,130,251,226, 27,110,229,123, 99, 99, 99, 17, 17, 17,129,218,218, 90, -136,197, 98,208, 52, 13,131,193, 0,141, 70, 3,129, 64,192, 14,204,156,175,249,219,109, 91,177,112,205,110,108,253,248, 13,180, -109, 19,133,128,192,112, 92,181,149,224,171,213,175, 33,168, 97,208, 16,112,148,231,142,252, 89,226,215,150, 94, 64,143, 14,109, - 80,167, 55, 66, 18, 32, 1,108, 54,143,249, 0,158,218,239,181, 13, 59,112,234,232, 79,232,221,245, 65,104,109,158,149, 70,150, -252,127,223,189, 7,255, 88,251, 95,199,246,220,250,122,228,214,215,163, 88,249, 47,236, 62,125, 28,189, 6,117, 5,170, 60, 47, -205,156,126,110,165,124,193, 75,163, 84,145,129, 61, 97, 32,117,128,169, 28, 98, 83, 53, 76,182, 58, 24, 25, 3, 24,113, 16,218, - 15, 75, 64,214,111, 43, 60, 13,116,212,150, 45, 91, 96, 52, 26,161, 84, 42, 3,148, 74, 37, 96, 15, 1, 64,169, 84,162,225,123, -131, 5,101,196,150, 45, 91,188,238,180,103,207,158,149, 47, 94,188, 88,245,209, 71, 31, 17,138,162, 84, 0,112,240,224, 65,178, - 98,197, 10,242,198, 27,111,248,180, 52,115,176,132,222,248,223, 87,159,145,141,109,111, 18, 28, 62,123, 3, 59, 46,209,120,117, -103,153,233, 95,106,157,182,222,130,255,243, 69,166, 70, 51,250, 86, 90,254, 8, 15,207,195,172, 89,179,188, 94,141,210,153,240, -215,175, 95, 79,177,203, 73,115,197,225,195,135,229,101,101,220,140, 18,179,217,140, 19, 39, 78,236,107,238,121, 1, 32,239,208, - 46, 90,156,156,156, 12, 0, 40, 40, 40,192,190, 31,190,147, 94, 43,189,193,176,228, 15, 0,201,201,201,142,254,118,226,196,137, -213, 45,233,111,239,205,157,136,147, 23,174, 34,186,107, 91,160, 94,207,249,218,203, 43,171, 96,177, 88, 27,198,106, 43, 44, 22, - 43,174, 94,190, 36,109,201, 61,117,245, 30,240,222,132,187, 11,141, 92, 81, 38,147, 9,253,123,244, 80, 5,200, 68, 96, 24, 2, - 27, 3,252,120,240, 16,254,245,214,219, 96, 8,112,238,252,121, 28, 63,246, 27,122,247,238, 7,129,128,194, 3, 93, 59,160,248, -168, 21, 50,142,139,227,137,133,229,136,139, 41, 5,132, 20,174, 94,183, 0, 66, 10,125,123, 92, 70,254,137,114, 16,180,247,233, - 2,156,221,251,238, 60, 3, 6,109, 85,163,217, 0,158,224,236,222,119,167,105,231,111,126, 23,163, 23,173,117,155,197,238, 12, -171,213,138,128,128, 0,208, 52,141,176,176, 48,232,245,122,212,215,219,151, 1,142,140,140, 68, 85, 85,149, 87, 11,112, 24, 53, -192, 32,153, 12, 47,127,124, 16,163,251, 1,151, 11,129, 95, 27,246,189,252,241, 65,252,103,145, 2, 54,198,230,117,251,157, 58, -242,163,227,243,168,129, 61, 32, 12,166,145,171, 62,141,254, 61, 58, 34, 36, 72,130, 47,178,242,144,160,152,128,107,110,102, 1, -120,106,191,236,211, 4,184, 14, 36,141,162,176, 97, 71, 49, 34,194,186, 96,202,163, 20,167,246, 99,221,253,185,245,127, 44,157, - 76,254,185, 26,104,175, 5,245,215, 55, 65,254,245, 22, 64, 27, 64,229,175,192,218,168, 40,234,127,205, 4, 2, 98,167, 6,169, - 58,183, 26,136, 90,155, 14, 38,205,121,124,117, 37, 29,135,146, 52,120,240, 89, 5,198,188, 24, 4, 89,216, 3,144, 10,195, 32, - 76,210,226,215,239,126, 37, 15, 37, 60,212,212, 32,229,248, 15,154,166, 65, 8, 49, 55, 40,209, 70,154,166,245,132,144,112,216, -147,184,124,158, 94,219,163, 71, 15,245,152, 49, 99, 20, 85, 85, 85,170,220,220, 92,187,226,147,155,139,158, 61,123,162, 71,143, - 30, 62, 45,207, 92,103, 98, 94,154,247,143,255,108,127,127, 66, 52, 77,140, 90,252,117,115,145,197,106,177,172, 53,217,176,130, - 16, 82,237,139,204,201,147,205,183,156,252,135, 15, 31,174,246, 86, 78,126,126,126,163,144, 9,235, 5,224,186,170,164,205,102, -243, 74, 97,184,120,241, 34, 30,126,248,225,166,158, 23, 41,128, 7, 1, 8, 71, 78,152, 82, 83, 92, 92,220,170,160,160, 0,153, -153,153, 24, 88, 92, 76, 23, 20, 20, 0, 0, 6, 14, 28,136,113, 35, 18, 16, 18, 36,193,218,207,183,150,207,156, 57,115,217,186, -117,235, 22,121,219,223,174,111,123, 23,193,189,164, 8,234,190, 16, 25,239, 62,139,126,189,163,241,192,196,183,145,154,154, 74, - 53,151, 37,174,173,173,131, 84, 42, 1, 0,136, 68, 66,232,245, 70,191,222, 91,158,244,239, 12,188, 94, 12,136, 97, 24, 4, 72, -196, 48, 91, 9,104, 10,160, 41,224,205,127,191, 13, 27, 3,212,215,235,112,227,198,117, 68, 69, 69,131, 16, 6, 86, 43, 32, 21, - 9, 33, 16,113,115,193, 90,173, 86,249,131,177,215, 84,173,195,106, 1,138,178,235,198, 20, 64, 81, 4, 3,122,157, 83,253,114, - 60, 74,225,237,140, 0,214,186,111, 42, 36,192,197,250,119,213,162,155, 34,126,111,172,127,192,158, 48,212,166, 77, 27, 72, 36, - 18,135,203,144, 77,252, 11, 13, 13,133, 72, 36,194,213,171, 87, 33,226, 40,239,243,188,253,120,118,226, 8,176,230, 77,145,213, -238,254, 7, 0,121, 28, 16,242,182, 10,139,254, 62, 4, 97, 94, 92,239,181, 82,123,178, 98,167, 54,225,208,152, 76, 16,134, 8, - 96,172,208, 3, 52,141,182,157, 59, 96,247,190, 95,125,106,191,255, 91,178, 28, 23,127,220, 11,225, 13,160, 38, 10, 8,160,105, - 12,142,233,130,145, 35,162, 56,201,113,141,245,111,122,242, 89,124,107,250, 29,232,102, 4,126, 17, 2, 65, 66, 96,210, 64,116, -152,196,205,120,141,109, 31, 14,179,185, 26, 34,171, 5, 95, 93, 73,199, 79,115, 67, 49,252,137,199,209,163, 77, 79,197,201,221, -106, 85,255,228,122,136,204,245,176,246, 96, 80, 81,198, 45,105,180, 65,121, 51,206,157, 59, 55, 8,128,134, 16, 34, 2,128,185, -115,231,182,184,182,198,148, 41, 83,212,135, 14, 29, 82,156, 57,115, 70, 21, 16, 16,128,128,128, 0,204,154, 53,203,167, 65,148, -162,168,232,137, 19, 39,110,248,251,223,255, 78,191,188,232, 37,166, 55,115,158, 54,153, 45,245,102, 27,249,187, 55,114, 82, 82, - 82,136, 70, 51, 26,147, 39,155, 49,107,214, 44,202,215,243,185,149,228,239,206,221,191,126,253,122, 74,169, 84,146,121,243,230, -113, 58, 95,157, 78,215,200,237,239,140,197,139, 23, 99,241, 98,251,162, 69, 9, 9, 9,206,199, 75,154, 16,215, 14, 64, 76,131, - 82, 24, 48,110,234,190,156,179,102, 0, 0, 32, 0, 73, 68, 65, 84,108, 99,215,174, 93,165,153,153,153, 96,201, 63, 57, 57, 25, - 81,109,219, 58,247,183, 29,112, 10, 17,112,233,111, 41,147,134,227,231,210,114, 4,247, 11, 70, 73,238, 5, 64, 42,193,212, 23, -231, 32,188,195, 68,142, 99,179, 13, 37,215,203,172, 34,145, 80,200,122, 0, 0,224,234,229, 75, 45,186,175, 77,133, 14,120,133, -224,206, 41, 4,174, 74, 0,237,206,196, 33,132,128, 33,128,141,177, 43, 1, 20, 5,124,247,109, 22,158,152, 50, 13,173, 35,219, - 56, 6, 64,226,197, 90,217, 2,186, 28,189,186, 93,117,124,239,219, 59,192,225, 36, 27,240, 96, 49, 4,116,185,215, 23,228,234, -238,119,183,223, 27,235,223,213,221,239,110,191,243, 92,246,230, 80, 91, 91,139,186,186, 58,152, 76, 38, 48, 12,131,138,138, 10, -135,251, 95,175,215, 67,167,211,121, 21, 2,216,250,241, 27, 80,159, 4,180,151, 0,139, 1,248,207, 82,133,195,253,127,180, 16, -248,237,250,143, 16,120,217,126,218,210, 11, 8, 15, 13, 68, 68,120, 32, 30,136,235,137,226,139, 21, 40, 42,169, 66,167,136, 80, -152,202,202,113,254,220,249, 70,181, 0,184,180,223, 16,249,227, 24,170,152,129,173,219, 51,160, 58,144,129,244, 85, 75, 48,117, -201, 10, 28,183, 0, 21, 85,229,156,218,207, 57,214,255,204,144,135, 49,235,193,206,200,216,186, 15,199,143, 95,194,170, 19, 5, -216, 50,122, 14,240,233, 97,148,148, 84, 52,170, 5,208, 20, 58, 24, 37,176,153, 43, 97, 54,107, 1, 0, 81,237, 59,162, 71,207, -158,138, 90,153, 61, 23,195,192,232, 65,155,234, 33,171, 23,160,236,250, 13, 79,132,106,247,200, 24,141, 48, 26,141, 82, 0,102, - 0,193, 70,163, 49,196,117, 74,160,175,208,235,245,242, 3, 7, 14,168,122,246,236,137,217,179,103, 43, 42, 43, 43,145,155,155, -203,185,179, 81, 20, 53, 84, 34,145,232,130,131,131,173,163, 71,143,190,190,116,233,210,118,203,150, 45, 43,254,181,240,248,248, - 45,167, 76,103, 45, 12,188, 94,143,245, 86,184,252,253, 73,254,174,214, 63,155,163,224,236, 5,224, 34, 67, 36,250, 67, 37, 95, -181,106,149,227,229,238, 59,224,152,225,211,212,189, 17, 55,188,104, 0, 66,109,233, 5,183,238,116,182,191, 21, 30, 45,188, 56, -115,230,204, 20,111,250,219,176,135, 30, 64,226,163,113, 88,254,239, 15,240,225,154, 28,252,191, 77,251, 48,127,100, 2,110,124, -159, 3,173,166,214, 35,217,166,166,166, 82,201, 73,227, 96,177, 88, 11, 45, 22,171,213, 89, 1, 0,128, 21,111,190,230, 51, 97, -243, 68,127,103,225, 46,246,239,234, 21,104,164, 0,208, 52, 13,173, 78, 15, 1, 77,193,106,181,129, 33, 4, 86,198,158, 68,122, -236,183, 66,140, 28, 53,214,238, 38, 35, 4, 2, 90,128, 58,189, 25, 86,179,201,179,134,105,179,201,187,180,191,174,138, 12,215, - 58,180,140, 33,131,130,236,221,134,162, 64, 81, 4,253,123,158, 87, 89,109, 54, 57,215,139, 99,173,251,230,146, 1,125,178, 94, -155, 73,174,241, 6, 97, 97, 97,168,168,168,128, 68, 34, 65, 93, 93, 29, 34, 35, 35, 29, 73,129, 70,163, 17, 53, 53, 53, 94, 41, - 0, 41,203,183,224, 63, 75, 21, 8,141, 1,212, 39,129,151, 86,170, 16, 36, 20, 96,202,223,222,193, 53,230, 6, 54,175,122, 5, - 2,154,187, 60,214,250, 31, 56, 48, 14,145, 93, 99,208, 38,178, 53,196, 52, 5, 43, 69, 80, 81,111,128,166,206,232, 83,251,125, -248,238, 54, 76,238,217, 5, 33, 33, 17, 8,136,108, 7, 75,181, 6,133, 59,190, 70, 77,245, 21,159, 30,226,207,222,125, 1, 88, -148, 8,161,213,140,152,122,160, 92, 80,139,255, 92,255, 21, 16,135,112,150,113,116,251,207,138, 74,218,128, 43, 98, 61, 18,186, - 41,240,224,156, 32, 20,135,169, 85,145,145,133,170,142,131,139,161,165,235, 96, 34, 6,232, 55, 49,144, 6, 5,115,177,252,157, - 7,120,118, 22,128,216, 95, 29,119,215,174, 93, 0,128, 89,179,102, 41,122,244,232,161,126,226,137, 39, 28, 22, 35, 23,242,143, -140,140,220,185, 97,195,134,192,212,212, 84,193,162, 69,139,176,112,225, 66,114,248,240,225,193,132,144, 92,189,133,244, 36,132, -252,226,189, 53, 23,214,164,219,223,215,132, 64,127,146,191, 43,193, 59, 43, 44,235,215,175,167,242,243,243, 57,185,246,175, 93, -187,118,152,253,156,158,158,238,120,185,110, 99, 17, 30, 30, 14, 0, 77, 13,130,215, 0,212, 0,160,175,149,222,192, 79, 63,253, -228,136,249, 15, 28, 56, 16, 0,144,153,153,137,111,178,115,160,169, 51,234, 1,172,128,125,106, 32,231,254,246,253,214,127, 98, -236,210, 23, 49,126,252, 40,180,150, 8, 80, 71, 17,228, 22, 93,197, 79, 39, 75,188, 34,234, 5,115,103, 60, 84,124,254,188,240, -234,229, 75, 96, 95, 43,222,124,173, 89, 75,158,199,221, 77,252,174,219,220,161, 81, 8, 64, 34,145,224,220,233,227,138,152,118, -225, 42,153, 72, 8,155,141, 1, 69, 81,160, 40, 32, 69,249, 60, 8, 97, 96,107,168, 7,160, 55, 26,113,166,168, 24, 98,177,103, - 39,182,213, 82,141,254, 15, 94,116, 30, 69,241,220,162,139,248,118, 83,119,135,238,156,208,251, 2,126, 62,214, 19, 66, 65,164, - 87,214,191, 59,226, 55,104,171, 0,192, 39,235,223, 93, 71,203,223,252, 46, 0,112,182,254, 1,251, 60,255,232,232,104,152, 76, - 38,148,149,149,193,102,179,161,117,235,214,168,170,170, 66,235,214,173, 27,218,149, 59, 97, 87,220, 56,143, 55,222, 86, 65,123, - 9,120,127,201, 48,232,172, 54, 44, 94,153,137,143,150, 38, 99,201,170, 29, 16, 82, 20,188,224,127,104, 75, 47,160,109,235, 86, - 16, 65, 4, 27, 40, 92,191,120, 10,151,203,181,136,141, 12,199,247, 71, 15,227,204,105,120,109,253, 79,157,183, 24,162,112,128, - 22, 0, 27,115, 46,226,219, 79, 94,198,188,119, 83,177,120, 82, 63, 60, 63,170,179, 87,237,151, 91, 95,143, 15,147,166, 3, 53, - 82,128, 18, 1, 31,126,128,105,191, 30,196,238, 81, 11, 64,189,243, 34,168,159, 95,225,100,253, 3,192,111,215, 35,240,176, 65, - 11,157, 76, 0,189, 84,138,216,169, 34,152,136, 1, 90, 90, 4, 43,226, 64,108,122, 88, 42,175,227,199,143,181,152, 53, 51,246, -142,116,218,130,130, 2,210, 64, 12,212,148, 41, 83,212,118,223,152, 29,195,134, 13,163,134, 13, 27,198,133,252, 31,109,215,174, -221,174,119,222,121, 39,240,220,185,115, 16,137, 68, 8, 9, 9,193,241,227,199, 45,132,144,138,150,156, 95,115,115,242,125,241, - 14,248,147,252, 93,173,127, 59,177,222, 60,125,144, 75, 46, 64,114,114,242,185,111,190,249,102,136,213,202,109,134,147, 84, 42, -157,215,204,238, 58, 0, 23, 1, 12, 44, 42, 60, 12,231,152,255,115,243,166, 99, 87,215,174, 96,195, 1, 59,187,118, 13,152, 57, -115,230,231,222,244,183, 39, 19, 31, 70, 40, 19, 6, 61, 68,248,118,245,139,248,100,199,111,120,121,220, 80,204, 93,149,142,105, - 43,190,242,202, 2,119, 46, 38,228,110, 27, 63,127,255,254, 68, 35, 15,128, 64, 32,160,106,174,159,199,133,171, 85, 16,138, 4, -176,218, 24, 88,172, 54, 28, 61, 90,128, 47,191,252, 28,102, 27,129,197,198, 64, 44,164, 81,174,209,161,228,204, 79, 10,153, 76, -166,246, 64,132,242,158,177,151,255,176,254,237, 67, 21,190,221, 20,103, 31,227,104, 2,208, 4, 52,205, 96,112,191, 51, 42, 27, - 7, 47,128, 59,235,223,121, 22, 64, 96,120,180, 87,228,239,206,250,119,206,170, 29,189,104,173, 87,228,101, 31, 20, 53,208,233, -116, 16,137, 68, 14,235,159, 97, 24,199,187,183, 10,192, 87,171, 95,195,209,146,253, 8,138,182, 39,253, 5, 11, 5,168,184,113, - 30, 33, 18, 17,106,170,175, 65, 64, 83, 16,210,220,194,207,172,245,223, 49, 60, 24,167,139, 47,194,106, 54, 67, 34, 20, 67,167, - 51,226,123,213, 97, 36, 40, 38,120, 69,254,108,251, 61,254,194, 91,216,252,159,143,160,103,128,142,177, 29,112,242,212,207, 88, - 60,169,159, 79,237, 7, 0,139, 99, 19,176,253,220, 62, 64,107, 5,164,173,177, 39,255, 52,168,119, 94,196,218,168, 40,138, 43, -249, 3,192,204,238, 75,213, 63,238,201, 7,204,117,208, 81,117,208,208, 58,104,133, 22, 88,108,181,144, 24,245,144,150, 94,196, -150,101,231, 16, 19, 31,135,102, 18, 0, 27, 65,230,148,249, 42,149, 74, 33,149, 74,221,238,227,138, 13, 27, 54, 96,195,134, 13, - 45,234,204,193,193,193, 47,157, 63,127, 62, 48, 36, 36, 4, 50,153, 12,225,225,225,168,168,168, 0, 69, 81,122,127, 14, 26,172, -197,159,151,151, 71, 0,123, 66,160, 55, 73,129,254, 38,255,207, 62,251, 76, 78, 60,207,117,231, 52, 35, 32, 48, 48, 48, 69, 40, - 20, 94,112,221,190,106,213,170, 70,150, 63, 0,116,238,220, 25,137,137,137, 27, 61,217, 63,215, 74,111, 52,202,246,127,227, 31, -139, 32, 17,138, 17, 21, 21, 5,118,118, 64,195,254, 64,111,250,219,179,242,190, 88,248,193, 71,168, 43, 43, 71,100, 72, 27,156, - 58,125, 5,115, 87,165, 35, 53, 53,149,242,133,172,217,223, 57,255,222, 89, 14,239, 9,184, 55,240,219,111,191, 53, 91, 12,168, - 73, 15, 64,195, 32,162, 46, 80,111, 83, 16,146,164,138,105, 23,129,224, 0, 9, 30,236, 29,143, 7,123,245,131,144, 6,116, 6, - 27,174, 92,175, 70,190,250, 7, 69, 80, 96,128,199, 63,168,215,235, 17,215,249, 58,140, 38, 41, 8,107,212, 16, 64, 38, 53,130, - 16,160,186, 70, 2, 80, 64,112,160, 21,125,226, 46,225,224,145,254, 8, 14, 14,230,108,253, 59, 91,252,178,208, 8,136,136, 5, -176,254, 49,222,217,132,158,207,209,217,250,119,182,248,217,109,231, 79, 21, 58,142,229, 82,101,207, 89, 9, 0,128,232,104,187, - 50, 82, 93, 93,141,144,144, 16,135,251,223, 27, 5,128, 85, 2,128,119,176, 32,121, 4,240,159,131,248,228,245, 9,152,182,228, - 35,164,191,251, 60,132, 20, 5,177,132,219,140, 29,214,250, 63,125,165, 28,221, 58,182,198,167,255,219,130,152,152, 24,132,182, -139, 69,191,118,177,176,152,254,112,255,139, 56,200,100,173,255,183,231,141,194, 75,111,110, 68,199,174, 84,139,218,143,181,254, -199,108,253, 12,187,103,205, 0,213, 97, 48, 0,123, 85, 64,192, 94, 34,152, 61,246,165,168, 40, 78,196,209,215,244, 10,149,254, -193, 74,121,236,148, 58, 85, 76,247,222,168,149, 1, 23,113, 25,117,151, 42, 80,177,194, 6,157,166, 3, 22,205, 89,194,249,134, -172, 91,183,142,146,201,100,196, 96, 48,192,201,242, 36, 50,153, 12,235,214,173,243,162, 60,145,255, 80, 87, 87,247,254,243,207, - 63,159,180, 97,195, 6,105,104,104, 40, 84, 42, 21,214,172, 89, 83,107, 54,155,199,249,243,127, 88,139,159,157, 46,231,109, 66, - 96, 98, 98, 34,165,209,140, 38,254, 32,127, 0, 96,137,157, 11, 65,113,168, 48,104,158, 51,103,206,224,140,140,140,227,245,245, -245,109, 45, 22,251, 52, 83, 87,242,127,240,193, 7, 49,120,240,224,137, 28,238,179, 80, 91,122, 1,203,255,249, 6,190,219,190, - 19, 99,135, 14,192,222,188,159,237, 6, 76,187, 88,132,182,139,197,192,226, 98,140,155, 58,187,242, 74,149,126, 76,167,136,128, - 44,174,214,255,194,180,237, 88,246,151, 49,104, 23, 45,119, 40, 23,236, 53,114,241,220,248,226, 29,224, 61, 1,247,174, 82,192, - 73, 1, 0,128,144,224, 32,245, 81,245, 54,197,197, 14, 15,160,107,247,158,170,144, 64, 25, 24, 2, 24, 76,102, 20, 23, 23,163, -162,248, 55, 69,112, 80, 32,104,154,246,216,113,101, 82, 41, 50,118,141, 80,176, 25,240,205,186, 35,104, 26,129,129,220,173, 39, -118, 10, 96, 96,120, 52, 24,155,197, 78,254, 13,176, 80, 34,143, 37,118, 93,193, 78,169, 25,189,104,109, 35,210,242,133,252,157, -149, 0,231,194, 63,213,213,213,158,111,128, 7, 37,224, 43,167, 89,194, 27, 86, 60,247,199, 23,139, 14, 65, 28,229,116, 12, 15, - 70,198,145,223,112,242,236,239, 72, 80, 76,104, 68,250,222,144, 63,139,199, 95,120, 11,223, 14, 8,196, 11, 79,244,240, 75,251, - 45,142, 77,192,146,236, 12, 80,203,223,196,206,168,135,177, 70,119,178,209,254, 41,161,173,208, 65,234,221,154, 20, 51,187, 47, - 85,239,204,206,194, 53,205, 5, 84, 84, 93, 71, 89, 81, 16, 4,182, 16, 60,218,119, 24, 20,115, 20,119,116, 80,243, 71,181, 63, - 66,200, 17,138,162, 70, 83, 20,181,231,163,143, 62,146, 78,158, 60,185, 86,175,215,143,241, 37,230,223, 28,252, 49, 5, 80,169, - 12,243, 11,249,187, 90,169,126, 66,229,244,233,211, 99,235,234,234,150, 23, 20, 20, 44, 42, 41, 41, 65,125,125, 61,196, 98, 49, -218,182,109,139,200,200,200,201, 3, 6, 12,248,158,163,172, 51, 0, 6,118, 12, 15,198, 35,143, 60,130,223,206,149,160,117,151, - 94,141,250,219,184,169,179,245, 0, 62,230, 66,254, 44,158,149,247,197,232,188, 95, 48,235,205, 47, 49,124,248,112, 68, 69, 69, -185, 85,180,252,213, 32,172, 18,224, 77, 91, 55,165,144,241, 74,196,157, 35,125, 78,165,128, 1, 32, 36, 36, 68,109,170,190, 42, - 63,170, 46, 82, 0,246, 76, 90, 66, 8, 36, 18, 9, 66, 67, 56,215,192,134, 72, 36, 82,135,138, 68,126,191, 56,214,213, 47,176, -234, 1,171,222,145, 1,207, 18,191,183,115,177, 88, 87,255,249, 83,133, 56,127,170, 16,145,145,145,168,168,168,240,137,248, 67, - 35,219,193,204, 33, 57,146, 43,102,189,245, 21, 14, 31, 84,251, 77,222,165, 75,151, 28,171,253, 89, 76,198,155,200,223, 27,226, -103, 49,103, 64,160,223,218, 15, 0,168,213,175, 56,136,159, 37,255,139,245,245,138, 41,161,173, 48,137,163,213,239, 14,143,117, -153, 70,161, 75,195, 23, 31, 18,219,215,175, 95, 79,177,213,254,214,173, 91, 71, 57, 87,254,219,184,113, 35,181,110,221, 58,199, -231,245,235,215,223,246, 78, 79, 8, 57, 68, 81,212,240,172,172,172,197,181,181,181,171, 9, 33,249,254,254, 15,127, 76, 1,244, - 39, 57,221, 34, 24,130,131,131, 23,203,229,242,197, 45,148,115,232,196,137, 19,143, 2,232,210,186, 75, 47,189,197,100, 12,104, -232,111,181, 0,180, 0,206,116,138, 8,120, 18,246,100, 65,206, 24,253,198,134,219, 66,252, 45, 81,180,120,146,191, 51,136,143, -143,231, 68,254, 30, 13, 80,161, 80,168,246,228,142,191,221, 96, 99,251, 44,241,163,133,196,207,198,166,181,229,215,160, 45,191, -134,200,200,200, 22, 89,252, 0, 96,181, 49, 94,123, 31,154, 67,121,181,214,231,115,113, 5, 27,219,247, 23,241,251,187,253,216, -216,254,118,157,142, 56, 91,253,253,133,162, 22, 17,255,159, 9,132,144, 95, 1,204,224, 91,226,206, 99,230,204,153,169, 0,190, -188, 82,165,215, 91, 76, 70,231,120,100, 72,167,136,128, 48,120,185,250, 31, 75,170,206,110,254,123, 72,169,226,113, 27,149, 0, - 78,134, 86,124,124, 60,159,216,193,131, 7, 15, 30, 60,120,252,201, 64,243, 77,192,131, 7, 15, 30, 60,120,240, 10, 0, 15, 30, - 60,120,240,224,193,131, 87, 0,120,240,224,193,131, 7, 15, 30,188, 2,192,131, 7, 15, 30, 60,120,240,184, 47,208,104, 22,192, -130, 5, 11,124,206, 34,117,183,220,228,221, 46,175,176,176,208,103,121,253,251,247,191,229,242,252,125,189,173, 91,199,251, 44, -175,178,242,183, 59,125,127,169, 6,133,149,129,155,226, 43,247,226,243,119,187,228, 53, 20, 38,162, 27,218,144, 0, 32, 11, 22, - 44, 96,248,246,227,229,221, 75,242,210,210,210,132, 41, 41, 41, 86, 0,248,244,211, 79, 73,247,238,221, 49,124,248,112,138,111, - 63,247,242,188, 86, 0,238, 7,180,180,200,196,244,233,211,229, 0,156, 75,134, 42, 50, 50, 50,212,188,174,120,103,160,213,106, -159, 62,113,226, 68, 63,129, 64,176, 68, 34,145, 64,175,215,191, 50,116,232,208, 15,224,135, 74,123,132, 16,175,171, 49,222,139, - 88,176, 96, 1, 1,199, 69,102,120,220, 57,100,103,103,203,147,146,146,212, 62,254, 86,145,147,147,179,207, 31, 5,165, 26,228, - 61,153,147,147,179,101,253,250,245,225,176,175,105, 96,195, 29,168,110,233, 12,150,252, 15, 28, 56, 64,126,249,229, 23, 36, 36, - 36, 96,248,240,225,252,131,227, 47, 15,192,189,142,188,188, 60,121, 75,126, 63,125,250,116,121, 70, 70,134,106,250,244,233,206, -155, 85,211,167, 79,247, 89, 9, 96, 21,138,204,204, 76,182, 84,167, 87,178, 82, 82, 82,136,151,255,215,236,124,224, 61,123, 62, -247, 86,158, 66,163, 9,188, 19, 10, 16,117,242,228,201,247,107,107,107,255,210,185,115,231, 86,149,149,149,104, 88,110,247,189, -111,191,253,246,189,192,192,192,145,227,198,141, 83,181,232, 15,124, 32,127,165,114,129,215,131, 96,106,234, 58,234,246,201,107, -190, 28,110, 83,139,190,112,237, 95, 25, 25, 25, 42,188, 73,129,250,183,123,133, 10,111, 82,152,126, 38,217,235,118, 29, 59,118, - 44, 1,128,220,220, 92,191, 16, 24,187, 20,176, 82, 25,230,247,249,241,217,217,217,242,156,156, 28,149, 55,100,251,215,191,166, - 16, 66,236, 75,171,187,195,164, 73, 19, 21, 57, 57, 57,170,164,164, 36,202,135,231,120,228,206,157, 59,247,142, 24, 49, 2,243, -231,207, 39,233,233,233,163,107,107,107,243,188, 57, 55, 55, 74, 35,158, 26, 34,134,114,190,178,250,149, 77, 75,191,127,119,198, -187,143,179,251, 54,108, 72,107,246, 28,103,207,158, 77, 0, 32, 48,176,233,165, 13,234,235,235, 1, 0,115,231,206,245,233,254, -156, 61,162, 64, 94,218, 49, 36,166,164,145,148,148, 20,190,254, 1, 7,176,197,129,156,107, 4, 8, 61,116,120,183,117,179, 57, -212,211,190, 83,104, 17, 33, 56,147,127, 70, 70, 6, 53,125,250,116,226, 36,215,235,235,101, 21, 10,150,104, 26, 22,252,240, 94, -161,200, 12,247,226, 95, 19, 61, 30, 81, 63,233, 57,238,226,188, 92,215,166, 41, 2,242,210, 43, 67,105,181,218,111,122,247,238, - 61, 21, 0, 77, 8,129, 76, 38, 67,121,121, 57,106,106,106, 16, 26, 26,138,242,242,242,125,187,118,237, 82,140, 27, 55,206, 43, -229, 36, 47, 47,143,176, 11,179, 80, 20,133,169, 83,167, 34, 49, 49, 81, 65, 81, 20,103, 57,217,217,219, 28,159,147,146, 38,123, -252,238, 9,134,195, 47,252,209,220, 67,214, 54,250,238,186, 77, 54,196,243,162, 74,236,114,194,206, 56,112,224, 0, 86,172, 88, -113,211,189,216,180,105, 19,225,216,110,242,204,204, 76, 21,222,164, 26, 8, 54,249,230,129,251, 77,170,197, 22,226, 93, 60,182, - 52,178,180, 83, 83, 83, 21,132, 16,108,222,188,153, 28, 58,116, 8,125,251,246,245,248,219,195, 77,212,100,220,154,185, 4, 57, - 57, 57, 42,134, 97,144,150,150, 6, 79,203, 42, 83, 20, 37, 39,132, 56,158,215,239,191,255, 62,128,162, 40,204,152, 49,163, 12, - 64,212,204,153, 51,247,172, 95,191,158,246,198, 98,255, 96,207, 7,142,207, 55,114,175,131,162, 40,164,255, 45, 0, 0,133,247, -103,191,247,120,235,214,173, 1, 0, 95,127,145,142,249, 35,230,115,146, 57,112,224, 64,116,237,218,213, 47,237,158,150,150, 70, -167,164,164, 48,159,126,250, 41,249,229,151, 95, 80, 86, 20, 3, 84,134,241,172,238, 37,249,187,130,110,110, 32,207,204,204, 68, - 90, 90, 26,113, 55,128,250,178, 50, 84, 75, 45,116, 79,242,156,172,108,159,141,194,140,140, 12, 42, 35, 35,131, 98,149, 0, 0, -138,150, 40, 20, 20, 69, 33, 57, 57, 25,132, 16,202,233,220,188, 86, 84,168,233, 26,199,139,203,118, 79, 8,218,177,206,241,226, -178,221, 27,242, 39,132,128, 93,157,205,211, 42,109,238,158, 73,141, 70,243,101,104,104,232, 84, 0,244,188,121,243, 48,107,214, - 44,136,197, 98,200,100, 50, 72,165, 82, 80, 20, 5,129, 64, 0,173, 86,203,185, 29,179,178,178,228, 74,165,146,100,101,101,193, -233,158,224,219,111,191,197,252,249,243, 85, 89, 89, 89,242,187,177,227,186, 83, 8,238,132,103, 45, 51, 51, 83,149,154,154, 74, - 61,121,118,186, 91, 11, 95,169, 84,146,233,103,146, 21,238, 60, 3,158, 48,127,254,124,242,242,203, 47,163, 75,151, 46,126, 57, -223,249,243,231, 19,165, 50, 12, 17, 17,123,253,218, 14,219,182,109, 27,149,151,151,183,175, 95,191,126,212, 39,159,124,162,102, -201,191, 37,216,154,185, 4,171, 87,175, 6,195, 48, 88,178,100, 9,184,200,116, 38,127, 0,216,185,115,231,246, 6, 87,120,216, -140, 25, 51,172, 35, 70,140,128, 82,169,100,184, 26, 45,174,125,116,205,154, 53,120,242, 17,187,109,152,254, 55, 25,158, 26, 34, -198, 43, 99, 95,230,124, 77,129,129,129, 24, 62,124, 56, 82, 82, 82,168,196,196, 68,183, 47,246, 24,174,202, 94, 74, 74, 10, 3, -216,151, 89, 7,128,144,128, 74,158,213, 91, 72,254,205, 42, 0, 44, 89, 21, 20, 20, 56,202, 78, 58, 91, 79,222, 18,173,195,130, -240,243,160,228, 70, 25, 80,248,179,241, 50, 50, 50, 84,126,144,225, 80, 40,146,147,147, 21,108, 27,222, 79,112, 38,127, 0, 40, - 41, 41,113,236,187,118,237, 26,103,133, 81,171,213,190,163,215,235,103,211, 52, 77,207,156, 57, 19, 90,173, 22,165,165,165, 16, -137, 68, 16, 10,133, 16, 10,133, 16,137, 68,144,201,100, 48, 24, 12,110, 75,162,186, 25,224,228,123,246,236, 81, 81, 20,133,105, -211,166, 97,253,250,245, 84, 98, 98, 34,149,154,154, 74, 77,155, 54,141,125,126, 84,252, 80,209, 60,249, 55,180,165,130, 29,196, -157,239,125,114,114,178, 34, 49, 49, 81, 13,248, 86,146, 54, 49, 49,145, 90,191,126, 61,149,153,153, 9, 66,136, 95,148,177,215, - 94,123, 13,153,153,153,156,158, 17, 79,248,238,187,239, 70, 31, 57,114, 36, 47, 38, 38, 6, 58,157,142, 4, 6, 6,146,131, 7, - 15, 2,112, 36, 89,250, 68,254,171, 86,173, 2, 69, 81,160,105, 26, 71,142, 28, 1, 43,211, 11,143,196,227, 20, 69,225,169,167, -158,178, 54,108, 50,207,152, 49,163, 86, 46,151, 99,254,252,249,204,247,223,127,239,241,218,157, 67, 97, 55,114,175, 3, 20,176, -249,165, 63,170, 22,167,255, 45, 0, 51, 30,149, 96,233,184, 87, 56,159, 23, 23,203,159,203, 49, 7, 14, 28, 32,105,105,105,142, -215,145, 35, 71,160,187, 50, 16, 48, 27, 64, 5, 89,145,247,246, 25, 56,239,103, 95,124,207,109, 76,254, 41, 75,223,117,187, 95, -216, 92,135, 44, 46, 46, 38, 5, 5, 5,200,204,204, 4,251,153,117,237,120,211,201,111, 53,249, 59, 91,213,236, 32,116,183,194, - 57, 36,112,191,129, 16,130,146,146, 18,220,184,113,195,177,205,245,187, 7, 8,126,250,233,167,241,113,113,113, 16, 8, 4, 56, -127,254, 60, 8, 33,248,253,247,223, 97, 54,155, 65, 81, 20,132, 66, 33, 40,138,130,205,102,131, 94,175,199,214,173, 91,145,152, -216,124,216, 99,239,222,189, 42, 0,152, 54,109,218, 77,207,109,195,119,194, 18, 5,151,231,218,213,173,239,233, 59, 23, 43,159, - 69, 83,225, 0, 46,174,127, 55,131,103,139,147,164, 28, 49,127, 39, 5,142, 85, 96,217,152,127,158, 19,249,251, 98,173,179, 74, - 24, 75, 70,123,247,238, 85,249, 26, 6, 96,229,117,239,222,253, 38,114,243, 5,235,214,173,195,153, 51,103, 72,100,100, 36,218, -183,111,239, 88,246,249,210,165, 75, 16, 8, 4,248,239,127,255,235,211, 31,140,120,212,190,124, 25,195, 48,248,251,223,255,142, - 53,107,214,224,224,193,131,160, 40, 10,147,146,254,138,203,151,184, 45,224,184,115,231,206,109, 13,247,216, 8,251, 12, 25, 6, - 0,102,204,152, 81, 3,160, 85, 78, 78, 14, 40,138,226,172, 80,217,173,255,155,215, 49,177,135, 3,128,175,211, 11,145,173,205, -190,109,222,178,179,103,207,226,200,145, 35,141,182,217,106, 46,194,106, 97, 0,170, 14,173,198, 89,112,196,101,177,235,132,132, - 4,158,249, 57,144,127,179, 10, 64,131,219,133, 98,173,126,150,252,221,198,254,188, 32,235,230, 44, 65, 46,113, 98, 79,242, 92, -247,223,169, 21,169,166, 79,159,238, 28,107, 38,238,246,179,158,129, 22,145,110,134,127,227, 96,186,137, 11,124,178,252,155, 26, -108, 59,116,232,112,211,177,205,220,147, 86,225,225,225,189, 77, 38, 19,170,171,171,113,248,240, 97, 8, 4, 2,152,205,102, 24, - 12, 6, 48, 12,227, 88,149,210, 98,177,192,100, 50,113, 10, 49,176,247,161,169,231, 54, 49, 49,145,202,202,202, 34,153,153,153, - 30,149, 9,187,213,117,107,114, 0,100, 67,214,222, 68,244,236,119, 95, 20,129,225,195,135,183, 92, 9,112,137,249,231,229,229, -201, 29,100,255, 71,204,223,167, 28, 25, 23, 37, 12,128,125,181, 69,165, 82, 73,184,220, 7,174, 94,128,134,220, 7,175,115, 11, -216,149, 29,219,183,111,143,144,144, 16,202, 85,217,237,221,187,183,207,150, 63, 33, 4, 86,171,213,177,109,232,208,161, 56,120, -240, 32,246,255,104,195, 7, 43,185,197,216,179,179,179,199, 54,196,254, 79, 3,104, 13,192,121,177,161, 82, 0,173, 0, 32, 39, - 39, 71,213,175, 95, 63,143,242, 26,199,254,221,120, 10, 26,222,185,202,243, 7, 82, 82, 82,168,132,132, 4,162,250, 50, 18,214, -154,223, 64, 49, 53,128,205,190,210, 42, 45,176,162,246, 32, 13,145, 88, 8,147,173, 21,126,190,212, 15,111,172,210,224,200,145, - 35,148,187,105,213, 60,188, 84, 0, 92, 61, 1,222, 90,254,197,197,197,196,159,238,110, 79,242, 26,194, 18,126,243, 52,164,165, -165, 81, 41, 41, 41, 62,253,214,245, 60, 83, 83, 83,117, 74,165, 50,168,169,253,190,194, 57,246,239, 15,101,192, 57,246,207, 85, - 25,152, 53,107, 22, 2, 3, 3, 17, 20, 20,132,224,224, 96,132,134,134, 50, 97, 97, 97,116, 78, 78, 14,158,126,250,105,199,113, - 82,169, 20, 99,198,140,129, 82,169, 36, 77,172, 86, 21, 97, 54,155, 81, 93, 93, 13,163,209,136,208,208, 80, 72, 36, 18, 88,173, - 86, 16, 66, 96,179,217, 96, 54,155, 97,177, 88, 96,179,217,188,202, 47,240, 20,178,154, 54,109, 26,238,134,208,140,167,132, 64, -111,193, 42, 1, 62, 63, 95,255,110,186,237,166,159, 73,110,200,187,241, 77,182,171,245,239,172, 72,250,146, 12,232,106,253, 55, -167,152,114, 37,127,129, 64, 64, 66, 66, 66, 0,123, 66, 29, 5,128, 88, 44, 22,104,181, 90,180,105,211,198,167,235,102,141, 41, -161, 80,136, 69,139, 22,225,200,145, 35,248, 35,238,207,253,153,222,181,107,215,174, 97,195,134, 1, 64, 48,236,225, 92, 61, 0, -108,217,178,165,205,254,253,251, 67, 8, 33, 14,101,155,203, 60,241, 53, 31,173,193, 83,131,111,182,254,103,253, 71,143, 45,135, - 45, 32,132,160,255,204,254,152, 63, 98, 62,229,235,188,115, 95,149, 0,197,156, 52,178,107, 77,103, 8,117,181,128,213,254,215, - 12, 0,177, 16, 40,185,209, 10,251,174, 12,180,165,125, 93, 33, 56,114,228, 8,149,144,144, 32,197,159, 28, 92,172,127,128, 67, - 37,192,188,188, 60,135,235,223, 57, 31,128, 11,186,118,237, 74, 37, 39, 39,251, 45, 38,207, 65,158,207,241,245,233,211,167, 19, -215, 87, 94, 94, 30,195,206, 10,112,154, 17,224,235, 67, 28,116, 63, 63,112,105,105,105, 88,181,106, 85,163,231,138, 37,255,164, -164, 36, 36, 37, 37, 1, 0,246,239,223,223,156,152,240,226,226, 98,163,205,102,131, 70,163, 65,101,101, 37, 52, 26, 13,244,122, - 61,244,122, 61,116, 58, 29,106,107,107,161,213,106, 97, 48, 24, 96, 50,153, 28, 73, 65,205,146, 24, 69, 33, 43, 43,203, 43,133, -237, 94,198,129, 3, 7, 26,189,156,113,246,236, 89,185,243,119, 46, 49,103,215,152,191,171,229,222,146,172,125,119,191, 93,191, -126, 61,149,149,149,229,215, 92,128,172,172, 44,206, 99, 23, 75,254, 52, 77,147,134,231,203,225,250,103, 24, 6,101,101,101,232, -222,189, 59,181, 96,193, 2,175,207,229,245,165, 35,176,127,255,126, 48,223,180, 2, 33, 4,171, 87,175,118,220,163, 3,135, 57, -231,237, 33, 59, 59,123, 50, 0,204,152, 49,163,164, 65, 1, 48,125,253,245,230, 54, 11, 22, 44,104,179,127,255,126, 60,246,216, - 99,163,189,153,166,120, 35,247, 58, 40, 80,216,236,100,253,207,252, 72, 15,193, 83, 90,124,125,216,140,133, 11, 23, 98,229,174, -247,238,196,184, 34, 96,149,128,113, 11,173, 32,134, 80,160, 22, 64, 45, 32,168, 3,106,203,128,157,133,109,145,246,117,133,160, -193, 91, 32, 76, 73, 73, 49,242,228,239,153,252, 61,122, 0,210,210,210, 26,197,253,157,243, 1,184,206,189,108,112, 23, 42, 88, -183,124, 75, 93,242,238,228,177,110,255,196,196, 68,181,191,166, 16, 37, 38, 38,158,204,203,203,235,125, 55,222, 96,214,234,247, -151,251,159,181,250,189,117,255,179,216,188,121,179,227,243,191,254,245, 47,124,254,249,231, 0, 96, 6, 32,102,137, 31, 0,198, -140, 25,227, 73, 1, 48,196,197,197, 65,175,215,195,108, 54,163,162,162, 2, 18,137, 4, 66,161,208,225, 1,168,175,175,135, 94, -175,135,201,100,130, 86,171,197,212,169, 83, 61, 42,152,172,117,223,220,180, 86,246, 56, 46,184,149, 57, 0,190,236,119, 5, 59, -221,207, 29, 86,175, 94,173, 90,180,104,145,162, 71,143, 30,234, 59,249, 12, 55,101,253, 59,195,155, 92,128,166,172,127, 95, 45, -127,154,166, 9,195, 48, 20,128,127,178,143,182,205,102,123, 51, 48, 48, 16, 29, 58,116,240,105,140,121,227,213, 17, 80,171,213, -160,178, 34, 0, 0,187,223, 8,198,152,183,235, 48,124,248,112, 44, 95,185,223,171,194, 84, 59,119,238,220, 58, 98,196, 8, 0, -168,216,178, 37,189,253,254,253, 7, 91, 17,138, 96,252, 99,227,147,146,146,146,182,123, 51,156, 0,246,216,255, 83, 67, 68,141, - 45,126, 16, 44, 90,184, 8, 81, 99,162,239, 88,193,172,148,148,148, 70, 26, 62,169, 3, 36,102,128, 33, 20,172, 54, 2, 9, 1, -162,100,180,243,241, 86,240,176,243,247,202, 87,155, 84, 16, 88, 15,172,144,139,229, 63,112,224,192,155,242, 1,188,113,209,185, -146,182, 31,200,217, 85,158,234, 22, 60,120,189,243,242,242,252, 38,239,126, 77,252, 99, 11,203,176,110,226,204,204, 76, 60,243, -204, 51, 0, 32,102,143,113,222,215, 48,104, 53,133, 83,131, 7, 15,126, 90,173, 86,103,218,108, 54,212,214,214,194, 98,177, 56, -226,254, 70,163,209, 49,197,144, 77, 12, 28, 51,102,140,154,195,243, 66,101,102,102,146, 6, 47, 64,163,231, 54, 47, 47,143,221, -142,196,196, 68, 78,222,170,219,157, 3,224, 26, 22,240,116, 63,154,219,175, 84, 42,201,234,213,171, 85, 79, 62,249, 36,190,249, -230, 27,159,238,185,235,244, 91,246,123, 70, 70,134, 42,165, 68,137,233, 30, 44,237,177, 99,199,146,139, 23, 47, 98,215,174, 93, - 77,182,247,197,139, 23, 1, 0,185,185,185, 30,207, 39, 57, 57,147, 36, 39,143,194,232,209,197, 40, 46, 46,118,155, 93, 94, 85, - 53, 10,128, 6, 74,101,211,227, 22, 75,254,102,179,153,136,197, 98,246,152,127, 54, 40, 4,111, 94,190,124, 25,157, 59,119,246, -201,242,167,105,202,174,176,179,228,127,220,138,207, 85,102, 0,192,242,149,251,189, 30, 35,216, 62,177, 96,193,130,120, 66, 8, - 38, 76,156, 48,117,210,196, 73,223,249, 50, 52, 77,126,226,241,211, 20, 69, 61, 72, 8, 32,120, 74, 11, 66, 8, 22, 45, 94,132, -232, 49,109,255, 8,124,248, 14,150,157, 9, 90, 80, 73, 48, 45, 45,141,100,188,218, 14, 65, 85, 23,113,161,182, 3,186, 72, 42, -128,192, 40, 8,235,203, 16, 82, 95, 5,160,141,195, 99,224,170, 52,240,240,193, 3,224, 60,221,207,197,213, 71, 50, 51, 51,193, - 53, 97,202,149,180,253,117,226,206,242,252, 48,255,159, 71, 11,225,236, 66,119, 38, 33,182,158,132,235,190, 38, 98,136, 86, 0, -223,142, 24, 49,226,197,156,156,156,143,173, 86, 43,106,106,106, 28, 57, 0, 0, 80, 81, 81,129,154,154, 26, 16, 66,224, 77,120, -105,244,232,209,138, 61,123,246,168, 50, 51, 51,145,149,149, 69, 92, 99,254,163, 71,143,246,170, 24,208,173,128,225,240, 11, 94, - 19,190, 59,130,111, 78, 9, 72, 77, 77,165,230,207,159, 79,124, 33,255, 70, 9,128, 78,247,221, 41, 41,208, 91, 47, 64,147,138, -251,165, 75,151, 28, 10, 26, 87, 67,195, 57, 84,121,243,117,115, 27,171,180, 90, 45, 9, 13, 13,117, 38,255, 55, 77, 38, 19, 74, - 75, 75,209,165, 75, 23,159,200, 95,169, 84, 18,230,155, 48,236, 62,110, 55, 78, 55,170,204,216,114,216, 12, 66, 8, 14,254,228, -123,100,241,192,129, 3,120,236,177,199, 20,190,150, 15,102, 9,154, 97, 24, 17, 0,124,243,147, 5, 11, 23, 46, 68,244,216,182, - 46,254, 1,239,192, 86,249, 27, 62,124, 56, 1,220, 79,247,115,170, 4,200,249,254,118,166,235,129,200,120, 60,189, 65, 11, 32, -202,222, 6,207,183, 70, 39,225, 85,188,157, 88,142, 47, 84, 42,190, 42, 32, 26, 87,250,115,181,252, 93,247, 11,155, 27, 40,210, -210,210,136,187,105, 83,222,132, 0,220,144,182,223,224, 34,207,175,243,255, 93,202, 1,123,141,228,228,100,112, 72, 88,228,140, -166,220,253,190,134, 1,154,114,247,251, 18, 6,112, 46, 47,235, 74, 62,205,237,107,234, 82, 41,138, 90, 59, 97,194,132,245,155, - 55,111,182,136,197, 98,152, 76, 38, 88,173, 86, 48, 12,131, 86,173, 90, 65,163,209, 32,217,203,169,103,211,166, 77, 83, 79,155, - 54,141,218,179,103, 15,201,202,202, 66,102,102, 38,216,186, 0,119,115,229, 57,127, 99,223,190,125,100,194,132, 9,216,177, 99, - 71,139,201,223,149,228,242,236, 10,153, 71,111,220,203, 47,191,124,147,113,225,138, 87, 94,121,133,112, 77,242, 84, 42,195, 60, -202, 83, 42,185,197,255,101, 50, 71,233, 75, 66, 8,129, 94,175, 71,105,105,169,207, 49,255, 70,158,143,183,235, 26,125,111, 9, -249,127,242,201, 39,254,122,102,153,236,239,183,119,119,174, 4,232, 47, 52,167,144,109,220,184,209, 43,235, 95, 57, 45,182,244, -179, 34,180, 75,205,186, 0,103,238, 25,254,223, 52,178,111,254, 3, 56, 87, 38,195,185,115,231,160, 80, 40,192,195, 15, 30, 0, - 0,104,138,228,239, 70, 45,235,110,155,255,239,143, 41,126,127, 40, 34,137,126, 59,175,233,211,167, 43,188, 45,239,235,129, 24, -136,179, 66,227, 46,209,202,117, 31, 71,194,181,206,154, 53,139,218,189,123,183,252,202,149, 43, 42,131,193, 0,155,205,134, 7, - 31,124, 80,145,144,144,224,243,253, 30, 61,122, 52, 53,122,244,104,118,132,247, 41, 52,115,171,115, 0, 60,125,231, 98,113, 54, -100,135, 55, 38, 28, 47,139,204,176,109,132, 55, 41,146,135,228,155,236,193,148,148, 20,146, 82,162, 4,213,184, 16, 16, 5, 0, -231,206,157, 35,205,244, 85,143,141, 62,106,212, 40,202,139,190, 79,249,227, 24, 0,168,174,174,134, 76, 38, 35, 20, 69,161,115, -231,206,160, 40,138,234,222,189, 59, 90, 74,254,244,147, 26, 80, 20,133,164,199,237,179,138, 40,138,114, 76,247, 99,221,249,119, - 8,204,192,217, 3,252, 42,112,238,220,185,172,242, 31,212,224,213,179,194,238,254,103,156,142,241,234,130, 83,179, 46,180,115, -230, 30,214,213,159,146,146, 66, 41,247,170,200,185,115,231,120, 54,247,183, 2,112,175,192, 31,115,253,253, 69,216,183, 64,177, -241,235,121,249,123, 97,159, 91,109, 61, 55,196,248,221,254,135,217,108,134, 64, 32,128, 64, 32,184,141,207,218, 58,234,238,150, -215,116, 95,152, 61,123,182,247, 2,223,252, 99, 29,139,204,204,204, 70,131,118, 74,137,210,217,242, 86,223, 15, 99, 73,116,116, - 52,245, 71, 95,177, 39,219,182,148,252,237,247,164,185,165,128,110,198,186,117,191,220, 54,141, 96,254,136,249,212,237, 30, 19, -188, 28, 55, 2, 97,207, 41,178, 56, 41,159,142, 56,191, 66,161,160,120,203,223, 51,220,133, 6,168,248,248,120,190, 96, 2, 15, - 30, 60,120,240,224,241, 39, 3,205, 55, 1, 15, 30, 60,120,240,224,193, 43, 0, 60,120,240,224,193,131, 7, 15, 94, 1,224,193, -131, 7, 15, 30, 60,120,240, 10, 0, 15, 30, 60,120,240,224,193,227,190, 64,163, 89, 0, 11, 22, 44,240, 57, 27,212, 93, 97, 23, - 94, 30, 47,143,151,119,251,228, 45, 91,182,172,177,118, 79,211,142,105,142,206, 83,205,216,106,138,206, 83,207,220,149, 15, 14, - 10, 10,130, 84, 42,117,252,158,166,105,199,140, 11,103,121,236,194, 76, 12, 99,159,229,197, 46,150,195,223, 95,111,228, 81,114, -129, 80, 2,194, 88,193, 48, 86,181, 47,242, 8, 33,138, 99,199,142, 9,227,227,227,243,224, 82,117,207, 71,121,242, 99,199,142, - 33, 62, 62, 94,205,247,183,123, 79,158,215, 10,192,159, 17,175,191,158,223,168,225,150, 47, 31, 68,221, 85,242,242, 95, 39, 0, -176,124,208,114,202,249,179,175,242,216, 74,113, 74,165, 18,169,169,169,205, 29,215,236,126,103,121,112,154,166,199,254,198,249, -247, 74,165,210,177,143,171,220, 63, 35,104,115,189,188,226,228, 97, 12, 15,171, 80,181,183, 94, 69, 17,233,130, 35,245,225,138, -144,184,135, 33, 14, 12, 86,123,250,253,161, 67,135, 48,116,232, 80, 7,241,179,132, 77, 81,212, 77,132,205, 48,140,227,117,249, -242,101,183,242,142, 30, 61,138,129, 3, 7, 66, 38,147, 65, 40, 20, 66, 32, 16, 52,146,201,146,190,205,102,115,188, 76, 38, 19, - 10, 10, 10,208,173, 91,183,251,241, 22, 81,118, 94, 36,242,223,127,255, 29,231,206,157, 83,181,106,213, 10,195,134, 13,107, 81, - 31,167, 40, 90, 46,145,134,163, 85,216, 3,170,122, 93,137, 66, 87, 92,229, 80,150, 0, 0, 32, 0, 73, 68, 65, 84,119, 85,238, -173, 12,134, 97,228, 89, 89, 89,251,138,138,138,176, 99,199, 14,200,100, 50, 44, 89,178, 68, 0,167,185,247, 62,200, 83, 21, 95, - 56,143, 61,187,115, 33,150, 72,176,112,225,162,145,132, 16, 21,223, 83,239, 83, 15,192,189,132,172,172, 44,143, 26,207,180,105, -211, 60,118, 76,150,160, 93,137,219, 87,248, 91,158,191,225, 84,153,143,211,160,197,165,180, 44, 87,121, 13,138, 64,139,170,139, -179, 85, 5,157,255,255,158,239,133,132,200, 79, 31,218,141,144,139, 63,169,244,122, 19, 44, 15,211,144,117,160,208,253,202,113, - 60, 20, 76, 84,154,138, 95,241, 91,192, 28, 69, 37,213,190, 89, 37,224,244,233,211, 16, 8, 4, 24, 54,108, 24,132, 66,161,227, -197, 42, 4,172,213,111,181, 90, 97,179,217, 96,177, 88,112,249,242,101,236,219,183,207,173, 60,189, 94,143,194,194, 66, 12, 30, - 60, 24, 98,177, 24, 34,145,168,145, 76,134, 97, 96,181, 90, 97,181, 90, 97,177, 88, 96, 48, 24, 80, 88, 88, 8,157, 78,119, 87, -232, 83, 13,207, 25,141, 63, 10,209,248,204,209,203,150, 45, 99, 92,198, 22,212,213,213, 33, 34, 34,194,167, 9,232,203,150, 45, -107,116, 62, 95,165, 23, 64, 38,107, 3,129, 64,172,210,213, 93,245, 90,102,126,126, 62,116, 58, 29, 6, 15, 30,124, 57, 49, 49, -177,109, 85, 85, 21,118,239,222,109, 11, 15, 15, 71, 66, 66, 66,179,125,100,238,216, 81, 55,181,205,137,179,103,161, 14, 14,192, -226,213,255,190,218,127, 64,239,142,215,175,149, 99,119,142,122, 95, 76,239,254,137,181,181,218,189, 60,117,222,253, 96, 75,255, - 58,195,181, 22,128,176,185, 65,150, 29, 92, 61,125,191, 19,228,255,220,115,207, 53,123,140, 70,163,193,215, 95,127, 77,184, 40, - 1, 44, 89,183,212, 90,191, 21,242,156, 45,255,150, 90,255, 78, 36, 76, 1, 32, 74,165,210,227,194, 49, 28,201,154, 98,137,157, -181,246,157, 45,127,103,170,227,250,204, 56,121, 42,136,115, 57, 97, 0,168,174,182, 87, 70, 12, 15,207,187, 47, 58,234,165, 95, -242,208,237,170, 74,117, 85,207, 96, 74, 55, 1, 30,136,180,130, 9, 39, 16,133, 11, 80, 87, 37,134,172,206,128,158,199,214,170, - 10,226,230, 43,244, 1,157,213, 77, 91,146, 20,206,156, 57, 3,177, 88,140,145, 35, 71, 58, 72, 91, 36, 18,129,166,105, 16, 66, - 96,177, 88, 96,181, 90, 97, 50,153,112,245,234, 85,168, 84,170, 38,151, 84,166,105, 26, 22,139, 5,199,142, 29,195,176, 97,195, - 32,147,201, 32,145, 72, 28,242, 88, 5,192,100, 50, 65,167,211,225,196,137, 19, 48, 26,141, 94, 21,102, 82,171,213,114,129, 64, -160,170,171,171,131, 88, 44, 70,121,121,249, 11, 83,166, 76,169,147, 74,165, 95,249, 66,218,106,181,122,186, 64, 32,248,198, 73, - 94,209,148, 41, 83,126,151, 74,165,211, 96, 95,161,210,107, 75,248,141, 55,222, 80,173, 88,177,162, 28, 13, 43,206, 44, 91,182, - 12,167, 79,159, 70,155, 54,109,154,172,187,238,137,252, 63,155, 55, 15,227,251,247, 7, 0, 68,191,248, 34,100, 1, 81,208,213, - 94, 65,173,246,130,130, 16,155,218, 91,153,125,251,246, 69,121,121, 57, 14, 29, 58,212,153,166,105,156, 56,113, 2,225,225,225, - 56,112,224, 0,204,102,179,199,118,172,122,103,113,163,239, 65,102, 11,218, 89,141, 88,248,242,155, 29, 87,127,240, 47,188,255, -193, 39,104, 79,219,240,201, 7,171,242, 70, 62, 53,147,103,215,123,144,252,217,237,156,214, 2, 0,110,174,255,237,233,251,237, -132, 63, 87,234,187, 23,224,172, 4,180,208, 3,192, 18, 44, 5,128,124,254,196,151,110, 9,249,153,173,115, 56,147,117,131,107, -159,114, 51, 96, 59,255,222,161, 32,112, 9, 1,176,255,237,250,238,234, 1,184,215, 97,172,169,148, 15, 55, 21,170,202, 5, 54, -116, 11, 5, 58,119, 34, 16,244, 21, 67,216,181, 43,196, 38, 35, 76, 63, 94,133, 73, 43,132,128, 17,193,152,247,149,138, 30,255, - 55, 5, 35,116, 31, 14, 96,221,243,231,207,159, 71, 88, 88, 24, 20, 10, 5,164, 82, 41,196, 98, 49,132, 66,161,195,234, 55, 26, -141, 40, 45, 45,197,254,253,251, 65,211, 52,104,154, 70,115,242,108, 54, 27, 78,157, 58,133,161, 67,135, 34, 36, 36, 4, 82,169, - 20, 2,129, 0, 86,171, 21,102,179, 25,181,181,181,248,245,215, 95, 97, 50,153, 32, 20, 10, 29,185, 0,158,176,105,211, 38,185, - 78,167, 83, 93,188,120, 17,181,181,181, 16,139,197,136,142,142, 94,123,240,224, 65, 12, 25, 50, 68, 24, 24, 24,248,185, 55, 74, -192,166, 77,155,158,208,233,116,223,184,200,139, 59,120,240, 96,220,144, 33, 67,190, 14, 12, 12,156,198, 85, 30,195, 48,114,179, -217,140,234,234,106,149,147, 71, 1, 0,176, 98,197,138,146,101,203,150,181,159, 54,109,218, 72,169, 84,234,213,248, 71, 11,196, -114,215,109, 55, 62,254, 24,209,147, 59,224,253,247, 63, 82, 88, 44,245, 62,141,167,135, 14, 29, 82,253,242,203, 47,120,245,213, - 87,107, 5, 2, 65,136, 84, 42,197,144, 33, 67,160, 82,169,144,147,147,131,246,237,219,123,225,239,160,176,233,252,117,124,123, -174, 4,217,223,127, 1,129,128,194,226, 23,159,102,250, 69,183,166,211, 22,190,137, 13,222,202,227,113, 71,200,223, 85, 57,117, -167, 20,248, 60, 11,224, 78, 47,111,219,181,107, 87,133,167,215,237,182,214,111,133, 60,127, 88,253, 77,225,243, 39,190,164,158, -217, 58,135,184, 35,127,112, 15, 17, 52,178,244,171,171, 19, 29, 22, 58,254, 88, 2,212,107,183,127,115, 68, 31, 30,158,231,147, -245,111,181, 90,229,191,254,250, 43,105,106,155,235,190,166,224,124,188,213,106,149,187,238,115,221,214, 28,170, 79, 29, 85,149, -150,212,162, 77,176, 16, 93,131, 9,132,173, 25, 8, 31, 25,135,192,126, 95, 65, 54,224, 67, 72, 66,101, 16,235, 12,208,235,109, -232, 36,208,227,192,230,166,149, 39,154,166, 33, 20, 10, 33, 18,137,112,238,220, 57,156, 56,113, 2, 33, 33, 33,136,136,136, 64, - 68, 68, 4, 90,183,110,141, 86,173, 90, 65,171,213,226,192,129, 3, 16, 8, 4,142,216,190, 59,176,251,197, 98, 49,108, 54, 27, -138,138,138, 16, 16, 16,128,214,173, 91,163, 77,155, 54,136,140,140, 68, 80, 80, 16,138,138,138, 96,177, 88, 28, 33,130,166, 20, - 10, 87,203,191,172,172, 76,117,225,194, 5,116,233,210, 5, 99,199,142,197,160, 65,131,160,215,235,177,111,223, 62, 28, 59,118, -236, 83,163,209,200,185,118,177, 90,173, 86,148,149, 87,124, 87,124, 93,139,224,110,131, 17, 55,246, 47,104, 63, 40, 9, 26, 19, -141, 61,121,123,113,236,216,177, 41, 70,163,241,175, 92,201,191,182,182, 22,199,143, 31, 87, 29, 58,116, 8,125,251,246,197,178, -101,203, 90,163, 33,158,190,108,217,178,246, 0,224, 13,249,211, 2,177, 60, 48,168,157, 60, 60,162,183,106,243,150,227,152,247, -217,103,200, 41, 44, 68, 78, 97, 33,162, 95,124, 17, 0, 96,177,212,239,247,165, 31,231,228,228,144,236,236,108, 76,157, 58,245, -114,112,112, 48, 29, 16, 16, 80,144,159,159,143, 67,135, 14,161,178,178, 18,113,113,113, 94,201,251,168,240, 28, 62,248,249, 36, - 54,124,240,218,113,161,192, 0,218, 86,135,247,214,124, 70,127,115,160, 0,165,180, 16, 15, 60,240, 0,207,178,247, 9,104, 95, - 9,254, 14, 46, 94,113,107, 44,236,215,243,137, 63,227,246,254,150,119, 43, 21,129,103,182,206, 33,206,175,166,188, 2,158,188, - 10, 55,145, 91, 99,101,192, 91, 79, 5,213,212,118, 87,175, 0, 23,212,213,213,201,247,238,221,171,202,207,207,111,114,155,243, -190,230,224,124,252,222,189,123, 85,117,117,117,114,231,125,174,219,154, 67,136,177, 10, 57, 87,140,216,121,145,193, 85, 13,133, -178, 10,128, 22,134,130,166, 34, 64, 25, 37,168, 47,163,112,252, 10,131, 19, 87,140,168,170,179,160, 79,184, 68,197, 69, 1,144, - 72, 36,184,112,225, 2,206,158, 61,139,240,240,112,132,133,133, 33, 44, 44, 12,122,189, 30,135, 14, 29,130, 72, 36,130, 88, 44, -110,118, 45, 5,214, 59,192, 42, 1,132, 16, 20, 23, 23, 35, 60, 60, 28, 29, 58,116, 64,100,100, 36,138,139,139, 97,179,217, 32, -145, 72, 32, 22,139, 27,205, 60,112, 55,172,176, 31, 42, 42, 42, 84,215,174, 93, 67,175, 94,189, 48,110,220, 56, 76,156, 56, 81, - 49,113,226, 68,197,176, 97,195, 96,179,217,240,211, 79, 63,161,184,184,120, 48, 0, 78,241,132,138,138,138,125,101,213, 90,132, -199,246, 67, 92,226, 92,244,154,176, 0, 61, 39,204, 71,231, 71,158,128,153, 8, 88,121,156,238,111, 67,238,131,234,220,185,115, -236,181, 42, 26,136,159, 94,182,108, 25, 86,172, 88,129, 21, 43, 86,156,117,205, 11,104, 10, 2,161, 84, 30, 22,222, 83, 21,221, -126,168, 42, 44,162, 39, 40, 90,136, 79, 63, 87, 97,222,103,159, 97,222,103,159, 97,197,138, 21,168,168,168, 0, 87,121, 46,150, - 63,217,190,125, 59,134, 12, 25,130, 1, 3, 6,116, 6, 32,221,187,119,239,192, 75,151, 46,225,212,169, 83, 48, 24, 12,152, 48, - 97,194, 72,174,242,210,127,191,138, 15,127, 61,139,245,203, 95,174,238,240, 64,231,190,122,157, 6,233,223,237,197,241, 19,191, -227,192, 15,123,160,189, 81,134, 9, 19,198, 39,130,199, 93,139,248,248,248, 38,173,127, 78, 57, 0,169,169,169, 84, 94, 94,158, -156,235,247,123, 25,254,180,212,111,133, 60,192,127,238,255, 38,173, 80,167,152,186,183,228,207,122, 1,156,173,115,127,192, 83, -242,161, 55, 80,171,213,242,210,210, 82, 21,187,184, 75, 83,219,124,193,249,243,231, 81, 85, 85,165,106,215,174,157, 66, 46,151, -171,155,218,214, 36,113, 85, 94,197,225,235, 6, 76, 8, 8,192,193,171, 12,218, 13,144,160,139,169, 0,154,211,207, 97,235,123, -199,193, 92,210, 66,103, 38, 40,169,179, 65, 38,164, 97,213,222, 64,104, 51, 74,187,179, 18, 32,149, 74,113,249,242,101,156, 61, -123, 22,189,122,245,130, 70,163,193,207, 63,255,236,136,229,123,138,215, 83, 20,229,240, 2,176,242, 8, 33,184,122,245, 42,250, -244,233,131,188,188, 60, 48, 12, 3,169, 84, 10,145, 72,228,152, 37,192,197, 3,112,229,202, 21, 24,141, 70, 12, 28, 56, 16, 29, - 58,116, 80, 8, 4, 2,132,132,132,224,225,135, 31, 86,252,252,243,207,170, 43, 87,174,160,182,182,246, 4, 56,186,236,175, 92, -185, 2,134, 22,163,125,124, 34, 90,117,136, 3, 45, 16, 65, 22, 18,137, 78, 15, 79,192,229,159,179,209, 32,239,146, 39, 57,132, - 16,121, 77, 77,141,170,164,164, 4,157, 58,117,194,163,143, 62,170, 16, 8, 4,234,161, 67,135, 82,203,150, 45, 35,131, 7, 15, -182, 54,140,155,113,161,161,161,104, 80, 80,108,205,201,148, 74, 35, 16, 17,217, 15,102,147, 22,149, 85,133, 48,153, 52,163, 44, - 22,221, 32, 0,239, 12, 30, 60, 24, 0, 80,118,227, 6, 26,228,137,224,180,232, 77,115, 56,122,244,232,180,205,155, 55, 99,214, -172, 89, 24, 58,116, 40, 0, 48,187,119,239, 22,230,228,228, 96,222,188,121, 99,250,246,237,187,199,155,103,185,168, 86,143,165, -251,127,195,187,127, 87, 98,216,196,196,240,122, 93, 37, 50,190,219,143,212, 79,191,197,206,197,115,209,181,252, 26, 86,214,222, - 64,120,120, 4,159, 4,120,143,192,217,237,239, 46, 95,165,201, 28, 0,215,216,190,167,239,247, 35,252, 61, 5,207, 87,188,253, -208,219, 10,138,162,238,202,246,118,153,234,215, 40, 15,192, 85, 25,240,231,244, 63,174,202, 65,118,118,182,188,172,172, 76,101, - 54,155,155,221,214, 18,104, 52, 26,212,215,215,171,106,107,107, 21,238,182, 37, 37, 37, 53,121,239,142, 85, 27,160, 53, 51, 56, - 86, 97, 69,105,141, 21, 81, 63, 11,209, 55,227, 60, 46, 95, 58,133,223,127, 49,195, 42, 20,192,204, 0, 70, 51,129,134, 48,136, - 12, 35,205, 18,182,243,244, 63, 54, 99,191,172,172, 12,157, 59,119,198,165, 75,151, 28, 46,127,161, 80,232, 56,222,219,112,158, -115, 13, 1,246,253, 22,133, 4,107,208,178,236,253,155,140,113, 79, 7, 48, 12,131,250,250,122,251,224, 40, 20, 42, 4, 2,129, -218,197,147, 36,204,206,206, 70, 82, 82, 18,189,116,233,210,178,149, 43, 87, 90,151, 46, 93,218,236,197, 83,148, 93, 33, 50,232, -203,160,171,187,170,176,217,140,106, 0, 7, 0,188, 83, 87, 87,135,236,236,108,135, 50,217,173, 91, 55,179, 39,121, 13,207, 87, - 82, 86, 86, 86,230,132, 9, 19, 28,228,255,227,143, 63,210,219,182,109,131, 92, 46,159,232, 45,249, 95,215,155,240,116,206,207, - 88, 56,125, 2,166, 61, 61, 21,122, 99, 45,182,102,171,177,230,147,116,124, 57,230, 33,116, 45,191,198,179,233,125,160, 12,184, - 42, 1,183,165, 18,160, 82,169, 36,206, 49, 93, 79,223,121,220, 52,176,223, 82,242,247, 53,166,206, 18,191,107,182,191,139,235, -159,106,120,185, 61,182,169,231,197,211,115,193,245,121, 73, 74, 74, 82,119,239,222, 93, 17, 22, 22,214,236,182,150, 32, 44, 44, - 12,221,187,119,111, 68,244,238,182,185,131,193, 22, 2, 11, 5, 28,169, 52,161,220,102,195,222, 98, 35, 50, 50,141,216,119, 45, - 18,231,197,161,184,166,181,224,106, 29,131,122, 43,160,183, 18, 72, 34,162, 61, 18, 51, 59,191,223,102,179,193,106,181, 34, 34, - 34, 2, 65, 65, 65,232,220,185, 51, 44, 22,139, 99,187,187,130, 64,174,242,216,249,253, 86,171, 21, 6,131, 1,132, 16,116,236, -216, 17, 37, 37, 37,104,219,182, 45,132, 66, 33, 76, 38, 19,204,102,179,227,127,185,132, 7, 59,117,234, 4,169, 84,138,130,130, - 2, 92,187,118, 77,101,179,217, 80, 91, 91, 75,253,242,203, 47, 42,157, 78,135, 78,157, 58, 33, 36, 36,100, 28,215, 49,170, 83, -167, 78,160, 25, 51, 74, 10,243, 80,115,173, 8,140,205, 2, 67,109, 5,174,252,242, 3,204,245, 26, 86, 94, 12, 23,229,134, 69, - 68, 68,132,138, 97, 24,135,167,115,197,138, 21,212,169, 83,167,208, 64,218, 12,128, 40,119, 5,143, 92, 97,181, 26, 96,181,232, - 32, 11,140,134, 84, 22, 14,128,146, 3,176,174, 88,177, 34,194, 73, 30, 54,108,216,192, 22, 80,114,123,205, 85, 85, 85,228,203, - 47,191, 36,169,169,169,228,223,255,254,247,247, 73, 73, 73,152, 56,113, 34,235, 13,168,221,190,125, 59,166, 77,155,150, 52,125, -250,244, 31,184,180, 89, 85, 85, 21,249,234,171,175,200, 83,207,189,128,145, 89,251,241,247, 57, 83,240,210, 43, 11, 96, 52,235, -112,241,194, 85,164,166,102, 96,219,164, 33,144,119,108,227,115,223,216,182,109, 27, 63,174,223, 65,184,134, 3, 92, 19, 1,111, -107, 41, 96,215,176,129,167,239,183,205,210,111, 34, 86,239,106,237,115,181,254,155,146,151,255,250,235, 36,255,245, 63,220,249, -174,223, 61,121, 34,252, 37,207, 25,172,203,255,243, 39,190,164,124,113,255,167,166,166, 58, 44,251,166,226,253,236,118,231, 99, - 61,193, 83,254,128, 55,225, 1,185, 92,174,158, 52,105,146,194,185, 56,141,187,109,190,160, 91,183,110,152, 52,105, 82, 35, 87, -191,187,109, 77,254,190,123, 55,116, 15, 20, 32,152, 2, 44,132,224,140,198,140,205,231, 77,248,250,112, 41,126,189, 80,141, 82, - 3, 80,101,180,225,130,142,224,186,137, 64,103,182, 40,154, 35, 47,118,106,158,217,108,134,193, 96, 64,219,182,109,209,187,119, -239, 6, 69, 47, 28,131, 6, 13,114, 16, 54, 75,218, 77, 17, 54, 75,232, 22,139, 5,102,179, 25, 20, 69, 33, 54, 54, 22, 53, 53, - 53,184,122,245, 42,170,171,171, 17, 19, 19, 3,154,166, 97, 54,155, 97, 50,153, 28,191,241,132,200,200, 72, 69,135, 14, 29,112, -234,212, 41,236,218,181, 11, 59,118,236, 80,237,216,177, 99,223,193,131, 7, 33, 16, 8,240,200, 35,143,160,107,215,174, 6,112, - 44,100, 19, 25, 25,153, 20, 21, 30,138,170,226,223,240,251,158,207,113,234,135,117, 56,243, 67, 42, 46,255,180, 13, 18,154, 97, -229,149,120,146, 35, 20, 10,213, 81, 81, 81,138,144,144, 16, 28, 59,118, 12,215,174, 93, 83,233,245,122,185,179, 34,208,224, 9, -160, 55,111,222,140, 94,189,122,121, 60, 55,179, 73, 11,109,205,121,136, 68,129,104, 21,222, 67, 21, 24,212, 30, 34, 81,160,156, -162,232,193,236, 49,193, 53,121, 80,125,249, 18, 70,247,208,177, 74,243, 77,248,225,135, 31, 32,147,201,208,171, 87, 47,196,196, -196,160, 33,124, 96,213,104, 52,186,172,172,172, 86,241,241,241, 73, 35, 71,142,220,206,245,217,205,201,249, 1, 33, 33, 65, 24, - 62,226, 97,125,252,128,190,120,226,185,121,208, 83, 86, 84,148, 87, 99,254,139,111, 97,101, 66, 55, 12,104,227,187,146,188,109, -219, 54,242,222,123,239,241, 74,192, 93,162, 8,184,195, 93,179, 22,192,157,158, 85,224, 11, 1,123,139, 65,203,237, 10,132, 51, - 81,179,219,110,151, 60,103, 43,252,153,173,115,240,204,214, 57,141, 62, 59,111,227,106,177, 59,123, 18,220,121, 20, 90,154, 23, -224,236, 9,112,125,231,138,224,224, 96,245,168, 81,163, 20,131, 6, 13,106,114,155,243,190,102,219,221,233,248, 81,163, 70, 41, -130,131,255,152,150,231,110, 91,179,214,161, 36, 80,209,167,109,107, 60, 26, 33,193, 67, 97, 98,180,147,210,144, 16, 2,169,201, -138, 78, 65, 66,104, 8,193, 73,157, 21, 69,245, 86,180,111, 19,129,152,135, 70, 52, 41,139,181,250,217,169,126,157, 58,117, 66, -191,126,253,160,209,104, 80, 83, 83,131,154,154, 26, 4, 7, 7, 99,240,224,193, 48,155,205,142,154, 0, 77, 17, 54,171, 76, 88, - 44, 22, 80, 20,133,184,184, 56, 24, 12, 6, 84, 84, 84,160,188,188, 28, 21, 21, 21,168,175,175, 71, 92, 92, 28,132, 66,161, 67, - 94, 83,117, 5, 92,149,178,168,168, 40, 69,108,108, 44, 46, 94,188,136,220,220, 92,228,231,231, 35, 32, 32, 0, 35, 71,142, 68, -191,126,253,126,144, 74,165,139,193, 49, 4, 32,151,203,183, 71,181,137,156, 29,219,182, 21,116, 23,126, 65, 81,238,167, 40,201, -255, 30, 97, 18, 27, 18, 71,141, 68,191,126,253,230, 74,165,210,108, 46,178, 66, 66, 66, 48, 96,192, 0, 16, 66,112,248,240, 97, - 20, 20, 20,168, 74, 74, 74, 84,213,213,213,242,101,203,150, 41,216,202,137, 9, 9, 9, 56,112,224,128, 71,121, 12, 99, 81,107, - 53,231, 21,213, 21, 39, 32,145,134, 35,186,221, 35,170,200,232, 65,170,224,144,152, 31,222,255,224, 63,147, 88,121, 95,255, 45, - 0, 91,126, 52,161, 41,165,167,168,168, 8,173, 91,183,198,208,161, 67,153,135, 30,122, 8,122,189, 30,245,245,245, 88,187,118, -109, 80,143, 30, 61, 38, 63,245,212, 83,219,189,233, 19,191,255, 94,132,206,157, 58,224,169,167,146, 2,222,120,125, 33,170,234, -180,168,172,170, 68,202, 75,111,225,173, 39, 70, 97, 84,167,168, 22,145,255,154, 53,107,208,187,119,111,124,252,241,199,188, 18, -112, 27,241,219,111,191, 53, 89, 7,224, 38,133,247,110, 33,120,111,102, 21, 76,155, 54,141,242, 87, 37, 64, 79,112, 45,196,227, - 15, 37,192, 31,228,239,171,188,166, 74,245,186, 90,230,222,148,236,117, 81, 18, 28, 69,129, 90,114, 93,206, 74,131,179,181,239, -203, 12, 0,103,235,238,161,135, 30,162,154,218,230,186,175, 41, 52,119, 60, 87, 25, 44, 30,145,143, 84, 23, 11, 9,172,249, 57, -184,164, 5,130, 40, 17, 58, 7,209, 40,177, 81, 16, 72,132, 56, 80,110,131,145, 1, 34, 37, 2,196, 38, 12,135,180,123,130,186, - 57, 5,192, 98,177, 64, 32, 16,160, 75,151, 46, 24, 48, 96, 0,106,107,107, 97, 52, 26, 29,243,243,205,102, 51,194,195,195, 49, -116,232, 80,108,223,190,221, 17, 18,112, 7,155,205,230,200,234,239,217,179, 39, 26,220,244, 48, 26,141,142,254,204,122, 18,122, -246,236,137,234,234,106,232,116,186,230,250,114,163, 29,179,103,207, 86,171,213,234,145,189,122,245,218,231, 84,184,167,102,216, -176, 97,251,164, 82,233, 44, 0, 70,111,218,114,246,236,217,155,213,106,117,109,175, 94,189,178,157,228, 85, 14, 27, 54,108,173, - 84, 42,253,130,171, 28,154,166,213,237,218,181, 83,140, 29, 59, 22, 23, 47, 94, 84,157, 61,123, 22, 87,174, 92, 65,112,112,176, -170, 85,171, 86, 24, 61,122, 52,254,247,191,255, 33, 33, 33,129,243,185, 89,173,122,117,141,230,119,133,209, 88,141, 86, 97,113, -170,160,224,142, 8, 14,233,132,250,186,146,237,239,174,252, 20, 51,158, 74,196,215,127, 11,112,219, 78, 44,198,143, 31,143,156, -156, 28, 92,187,118,141,174,174,174,134,209,104,196,129, 3, 7,132, 13, 74,103,173,183,253, 97,194,132,241,216,186,117, 59,106, -107,170,112,173,244, 58,254,246,252, 28,243,203,175,174, 16, 63, 49,114, 8,134,154,106, 1,145,111,244,176,109,219, 54,242,207, -127,254,211, 81, 14, 58, 54, 54, 22,239,189,247, 30, 94,121,229, 21, 50,121,242,228,123,191,114,231, 61,170, 20,220, 49, 5,224, - 86,204, 42,240, 7,185,179,168,172,252, 20,175,231,127,223,108,181, 61,111,146,255, 42, 43, 63, 69,254,235,127,200,115, 38,102, - 87,151, 61, 23,210,174,252,180, 18,249,223,191,238, 55,121,254, 4, 23, 15, 1,187, 6,128, 55,207,203,159,169,115,198, 12, 81, - 40,142,155,172,170,138,125,123, 33,178, 26,112,188,142, 32,175,206, 10, 49, 69, 33,130, 16, 40,218,182, 66, 88,116,164,162,195, -195,114, 15,150,166,221, 3, 16, 19, 19,131, 65,131, 6,193, 96, 48,192, 98,177, 64, 44, 22, 59, 8,155,181,210, 35, 35, 35,241, -232,163,143, 34, 55, 55,183, 89, 15,128, 80, 40, 68,191,126,253, 64, 81, 20,244,122,189,195,187,192, 42,237,108,117, 65,134, 97, -208,167, 79, 31,252,252,243,207,240, 38,185, 82, 46,151,171,240, 71,158, 72, 16,236,213,246,174,128, 99, 38,188, 59, 79,128,147, -172,112, 0,213, 0,188,174, 77, 76,211,180,186, 85,171, 86,232,211,167,143, 66, 36, 18,177,211, 31, 85, 0, 80, 82, 82,130,199, - 30,123, 12,171, 86,173,242, 74,166,205,102, 82,215,235, 74,228,102,179, 86, 33,171,189,164, 10,105, 21,139,128,160,118, 8, 8, -106,135,221,123,203, 64,141,106,222,226, 30, 50,100, 8, 37, 22,139, 73,117,117, 53,198,143, 31,111,142,136,136, 16, 51, 12,131, - 43, 87,174, 0, 62, 36, 75, 62,242,200, 16, 74, 34,145,144,144,211, 5,120,254,249,191,160, 67, 92,119,241,123, 11,255,194,108, -252,228, 11,122,173,192,232,211,179,188,109,219, 54,178,116,233, 82,180,106,213, 10,165,165,165,144,201,100, 96, 24, 6,129,129, -129, 88,190,124, 57, 94,127,253,117, 94, 9,184,197,136,143,143,111,210, 11,192,105, 26,224,173,192,221, 60,171,160, 57,194,241, -197,250,111, 74,158,171,165,206,186,238, 61,145,182,191,229, 57,123, 2,124,221,223,156, 87,193,117,241, 31,111,229,253,217, 64, -211,180, 58,126,212, 88,170,186,222, 32, 15,181,154, 84,130,203,197,232,102,185,142,224,136, 40, 12,233,211, 3, 17,237, 91, 43, - 66,227, 71,120,236, 31,132, 16,116,233,210, 5, 67,135, 14,117,196,227, 5, 2, 1, 76, 38,147,163,116,175,115,152,160, 99,199, -142,120,244,209, 71,161, 86,187, 23, 45,147,201, 16, 31, 31, 15,161, 80, 8,179,217,236,248,157,243,212, 65,231,133,128,104,154, - 70,255,254,253, 81, 80, 80,224, 75, 51, 16, 0,117, 13, 47,127, 64,231, 11,241,187,243, 26,245,238,221,155,205,163,160, 24,134, -145,235,245,122,152, 76, 38,244,232,209, 3,171, 87,175,246,114,113, 28,162,182,152,235, 96, 49,235, 20, 6, 67, 5, 36,146, 48, -136,196,193, 42,154, 22, 98,211,230, 31, 20,179,103, 77,104, 86, 94, 67, 93,127,234,195, 15, 63,100, 12, 6, 3, 0, 32, 46, 46, -206,171,242,203,206, 24, 48, 96, 32, 37,120,232,161,199,230,253,243,195, 28,187, 60, 66,199,197, 61,128,184,201,147,103, 11,133, -194,205,190,200, 92,185,114, 37,223,169,239, 18, 37,160, 57,242,191,173, 10,192,189, 10,127, 78,251,115, 37,230,150, 90,235,254, -146,215, 18,139,219,153,216,217,207, 46, 46,123,254, 33,226,136,145, 73,147,213, 13,214, 43,134,251,240,251,228,228,100,132,133, -133, 57, 50,252, 25,134,113,184,240, 89, 15, 0,155,244,199,174, 8, 24, 27, 27, 11,138,162,176,101,203,150,155,228,173, 89,179, - 6,153,153,153,142, 99,109, 54,155,199,229,128,197, 98, 49, 18, 18, 18,192, 37, 59,254, 94, 85,214,130,130,130, 16, 20, 20,132, -136,136,136, 22,244, 29, 86, 17,168, 3, 77, 11, 97, 79,199, 98, 84, 28,229,145, 37, 75,150, 80, 13,247,147,208, 52,221,162,113, -196,102, 99,118, 46, 90,180,136, 2, 64, 51, 12, 99,163,105, 90, 6, 47,195, 47, 44,120,235,254,238, 82, 2, 60,129,138,143,143, -231,147, 51,120,240,224,193,131, 7,143, 63, 25,104,190, 9,120,240,224,193,131, 7, 15, 94, 1,224,193,131, 7, 15, 30, 60,120, -240, 10, 0, 15, 30, 60,120,240,224,193,131, 87, 0,120,240,224,193,131, 7, 15, 30,247, 5, 26,205, 2, 88,176, 96,129,207, 25, -156,235,214,173,187, 41,153,144,151,199,203,227,229,221,127,242,148, 74, 37,121,124,178, 18,223,111, 75, 69,106,106, 42, 13, 55, -115,208,249,246,227,229, 45, 95,190,220,113,204,235,175,191, 78,241,237,119,123,229,121,173, 0,176,157,187,169,131,125,153,242, -114, 47,203,243, 69,230,221,126,189,110, 32, 6, 16, 2, 32,160,225,121, 96, 0, 84,194, 15,115,168,253, 9,182, 29,252,113,205, -238,218,244, 78, 21, 31,170,171,171,147, 31, 62,124, 88,181,127,255,126, 0,192,136, 17, 35, 48,100,200, 16,206,165,132,239,196, -125,120,124,178, 18,227, 31, 27, 96, 5,148, 66,165, 82,201,252,217, 10, 55,241,240,140,229,203,151,147, 73,147, 98, 27,125,247, -164, 4,240,184,195, 30, 0, 22, 36,227,230, 5, 32,168,233,190,175,155,238,110,128,104,201,234,127,254,150,231,238,122, 91,114, -205,119,251,245,178,196,127,234,248,193,207, 79,157, 58, 54, 42,186,125,108,148, 86,107, 65,104,168, 8, 55, 74, 46, 48,189,122, -245,171,238,213,119,216, 32, 0, 23,189, 17,120,244,167, 79, 72,241,133, 34, 92,184,100,196,213,235, 4, 29,219, 82,136,141,145, -162,107,108, 28, 6, 60,242,220, 93,209,249,221, 41, 18,236, 90, 3,119,130,200, 78,156, 56,161,138,143,223,133,245,235,245, 80, -171,129, 55,223,220,141,171, 87,175,170,162,163,163, 33,149, 74, 81, 90, 90,170,120,226,137, 39,224, 15,133,224,224,193,131, 68, -171,213, 42, 70,143, 30, 13,137, 68,226,139, 60, 26, 0,198, 63, 54,128, 73, 73, 73, 17, 2,105,248,126,155,189,171,192,191,203, -246,242,184, 15, 96, 54, 47, 69,110,110, 10,198,142, 77,195,164, 73, 43, 29, 30, 1, 94, 17,184, 61,224, 11, 1,121, 1,103,178, -167, 40,128,249, 38,236,190,189, 86,139,185,254,233,220, 93,223, 44,235,214,173,123,143, 41,147, 71,160, 99,251, 16,180, 10,149, - 64, 83, 99, 68,201,245,142,244,185, 98, 77,235, 29,217,159,169,198,142,123,242, 67,145, 56,240, 99, 79,242, 78,159,216, 47,191, - 88,180, 67, 37, 64, 45,158,156, 0, 60, 58, 16,136,237, 12,156,191, 68,112,232,136, 1, 57,170, 99,248,225,219,151, 73,151,184, -137,138, 7,251,120,174,104,119,171,188, 29, 77,121, 17, 82, 83, 83,169, 59,165, 4, 84, 87, 87,227,165,151,244,136,140, 4,146, -147,129,119,223,213,161,176,176, 16, 86,171, 21, 82,169, 20,109,218,180, 81,237,216,177, 3,221,187,119, 87, 36, 36, 36,168,189, - 28, 0,228, 39, 79,158, 68, 84, 84,148,106,244,232,209,212,166, 77,155, 0, 64,149,151,151,135,153, 51,103, 98,208,160, 65,222, - 94,171, 24, 0,114,118, 30,165,129, 52,198,254,110,215,161,249, 17,132,135,179,181, 15, 0, 83,167,126,139,220, 92,251,123, 74, -202, 5,176, 30, 1,222, 27,112,123,137,223,121,251, 29, 43, 5,124,183,131,100,132, 57,148,128,251,153,252, 1, 8,247,228,102, -188,161, 24, 62, 32,238,161,254,109, 65, 81,246,170,110, 12, 67, 16, 18, 36, 65, 96,172, 24, 49,255,191,189, 43,143,107,226,218, -254,223, 73, 66, 8, 8,178,136,136,168, 84, 1, 23, 4, 21,113,215,170,196,162, 20, 4,220,138,246, 87,219, 87,237, 66,244,245, - 89, 95,139, 21, 43, 93,180, 45, 85,124,218,218,250,218, 26,124,173,218,214,247, 90,169, 10,238, 84,106,112,169, 90, 21,183,138, - 86, 5,220, 42, 42, 85,217, 73, 8,201,220,223, 31, 97, 48,132, 44, 51,147, 32,218,206,247,243,225, 67,114, 51, 57,153,185,119, -230,126,207, 57,247,156,115,187,120,160,147,159,219, 99,123,114, 54,190, 21, 27, 63, 51, 19,192, 45,107, 2, 47, 95,220,174, 26, - 57,160, 18,255,156, 9,136,197, 6, 5,170, 94, 7,180,113, 5, 66,130,129,161,225,192,118, 85, 37,142,156,222,174,234,221,103, - 52,175, 7,223, 81, 75, 0,150,190,207, 40, 1, 15,122, 48,188,189,189,177,125,187, 11,186,116, 81, 35, 47, 15, 40, 43,147, 32, - 56, 56, 24,193,193,193,168,174,174, 70,113,113, 49,242,242,242, 80, 89, 89,169,234,217,179, 39,235,165,129,205,155, 55, 71,170, -213,106,149, 84, 42, 69, 89, 89, 83, 79,150, 90,173,198,151, 95,126,137,226,226, 98,242,244,211, 79,115,233, 79, 26, 0,178,179, -148, 0, 20, 34,195,127,254, 56,118,236, 88, 99,127, 51,155, 40,153,107, 99,115, 95, 24,143, 45,219, 54,155, 70, 1, 33,145,184, -112, 1,131,171,171, 85,237,110,220,192,239,190,190, 56,209,182,173,220,169,119,111, 16,138,202,227,123,205, 92, 55,140, 98, 35, -131,109, 91, 75,203, 51,118,253, 39, 37,229, 32, 62, 62,168,241, 63,131,248,248, 32, 65, 9,120, 0, 48, 37,123,102,127, 0,227, -118, 33, 11,192,244,161,255,147, 95, 95,193,153, 3, 75,131,131,131,123, 12,142,232,216,164, 93, 36,162, 32,149,138,225, 34,147, -192,201, 73,132,160,110, 94, 8, 10, 10,246, 45, 56,115, 96,187, 53, 69,241,196,225,207,137, 24,149,120,237, 5, 64, 83, 7, 92, -190, 14,148, 85, 0,229,149,192,127,183, 2,115, 22, 1, 11,151, 3,195, 35, 0, 17,169,196,137,195,159, 11,214,162, 17,250,244, -233, 35,207,206, 14,129,175, 47,240,204, 51, 18,248,249, 13,194,232,209,163,229,241,241,241, 84, 92, 92,156, 60, 58, 58, 26, 29, - 58,116,192,137, 19, 39,240,253,247,223,171,126,252,241,199,200,186,186,186, 72,107, 50,191,253,246,219,200,186,186, 58,149,147, -147,147,213,223, 86,169, 84,216,184,113, 99, 36, 27,146,221,191,127, 63, 1,160, 85, 42,149,210,251, 74,192,125, 50,221,191,127, - 63,225,170, 64, 29, 61,122,180,241,207, 90, 27, 31,165,142,109,155, 53,242, 15,252,237, 55,213,164, 83,167, 84, 93, 46, 22, 66, - 90, 89,137,142, 23,127, 67,228,145,195,170,246,167, 79,171, 64, 72, 36,159,241, 62,122,244, 40,142, 29, 59, 70,206,158, 61, 27, -201,247,158, 97,100,176,105, 99, 43,207,148,232,217,180,217, 2, 67,250,204,127,109,124,176,240,192, 63, 32,226,103, 83, 6,248, -145,245, 0,180,164,165, 70, 90,240,252, 28,229, 98,102,228, 91,250, 29,107,191, 81,112,238,116,204,212,201,242, 70,210, 55, 7, -153,179, 4,229, 21,117,232, 17,228,141,204, 45,170,160,208,190, 35, 61, 44,201, 43, 46,186,136,105,227, 13,175,119,239, 7, 62, -251, 6, 24, 55, 18,136,141, 4,126, 43, 4, 78, 22, 16,184,200, 40,244, 15, 5,162, 71, 3,155,115, 46, 34, 98,152,227, 44,119, - 62,125,215, 66, 49, 21,188,224,238,238,158, 87, 93,109,136,183,124,230,153,103, 48, 98,196, 8,202,248,179,123,247,238,201, 67, - 66, 36,170,132, 4,128,162,142,163,180,180, 86,245,251,239, 65,214,220,127,145, 20, 69,169,216,110, 14, 83, 90, 90,170,178,165, -247, 78,159, 62, 29, 27, 54,108,192,134, 13, 27,200,244,233,211,155,140,197,254,253,251,201,134, 13, 27, 26,143,123, 88,230, 3, -182,109,150, 80,119,246, 44,186,229,231, 67, 43, 18,193,137, 2,116, 52, 1, 93,175, 7,173,211,161,253,129,253, 40, 36, 4,109, -251,247,231, 77,224,174,174,174,170,227,199,143,203,103,204,152,145,199, 87, 6,128, 38, 22,185,185, 54, 62,222, 5,123,201,223, - 18,209,231,152,120, 2, 4,180, 62,204, 42, 0,150,130,223,248, 16,142, 45, 66,228, 42,239, 65,175,209,242,137, 24,183, 22, 84, -200, 71,158,185,239,240, 12, 92,148,248,249, 7,245,246,247,115, 3, 33,192,129,195,215, 81,171, 54,236,186, 26,209,207, 15,237, -219,185,224,250,141, 42,186,240,114,153, 72, 34, 17,161,123,160, 23,252,253,131, 61, 97,216,162,213, 44,138,174,104, 48, 98, 0, - 80, 87, 15,236,218, 7,168, 14, 19,248,119,160, 16, 24, 0, 60,241, 56,208, 43,136,130, 68,108,216, 90,124,104, 56,240, 47,165, -134, 85,127, 27,187,228,217,188,102,163,241, 26,175,245, 27,247,187, 35, 51, 12,248,160, 97, 59, 87,244,237,219, 87,110,250,153, - 88, 44, 86,245,238, 93,138,133, 11, 13,234,233,135, 31, 94,196,149, 43,161, 22,101,105, 52, 26,155,150,191, 49,174, 92,185, 98, -243,152, 81,163, 70, 81,163, 70,141,106, 36,251, 13, 27, 54, 16, 83, 5, 97,212,168, 81,173,210,119, 45, 97,253, 3, 64,247, 59, -119, 85,218,250,122,136, 68, 34, 16,177, 24, 52, 77,163,158,166, 65,235,245,208,235,105,116,190,121, 83, 85,217,191, 63,239,107, -174,173,173, 5, 0,213,177, 99,199, 64, 81, 20,231,248,142,150, 80, 2, 28,101,249,231, 36,229, 32, 58, 35, 26, 83, 54, 1, 73, - 57,134,215, 57, 73, 57,141,202,129,116, 91,161,192,188, 15, 16,198, 49, 1,172, 98, 0, 44,101, 1,240,205, 14,176,100,113,241, -177,196,172, 41, 13,124, 21, 20,107,215,109,250, 93,182, 86,132,165,160, 66, 62,242,172,125,135,249, 29, 10, 0,189,209,102,236, - 2,109,136,246,119, 6, 0, 92, 47,169,132, 90,173, 3, 0, 4, 7,122,161,125, 59, 23,156, 46, 40, 21, 93,184,116, 15, 50,153, - 24, 65,221, 60, 81, 86,161, 5, 0,139,130,175,223, 36, 8,122,204,240,251, 79,142, 2,194,123, 83,112,150, 2, 58,157,193, 19, -224,233, 14, 20, 95, 3,162, 71, 1,143,117, 54, 28,223,154, 48, 38,125, 62,235,194, 15, 59, 74, 75, 75, 91,204,139,210, 64,242, -141, 22,127,107,147,191, 49,210,211,211, 73, 74, 74, 10,197,247,115, 83, 56, 21, 21,162,174, 94, 11, 74, 44,129,158, 16, 80, 0, -116,122, 26,245, 58, 26, 68,175, 7,117,233, 2,128, 88,187,207,251,236,217,179,240,241,241, 81, 85, 84, 84,200, 61, 60, 60,120, - 43, 1,182,218, 30, 20,249,167,166,166, 82,105,105,105,100,202,166,166, 10, 1, 0, 68,103, 68, 67,186,173, 16,219,182, 21, 53, -102, 2, 48, 1,131,222,222,222, 2, 83, 63, 96,242,183,168, 0, 60,236,176, 70,136,124, 8,214,158, 20, 71,171,114, 91, 56,155, -128,154, 90,198,245, 55, 40, 15, 15, 39,148,149,107,224,227,237,138,196,132, 94,208,233,105, 56, 59,139, 33, 22,137, 64, 8, 65, -220,184, 32,140, 31, 27, 4,138, 2,238,150,169,225,225,225, 4, 0,247, 44, 9,236,210,145, 66,209, 85,130, 94, 65,192,152, 97, -134, 89,231,183, 66,160,111, 47,192,171, 45, 16, 19, 9,208, 52, 32, 17, 3, 23, 47, 27,142,103, 59,182, 92, 94,243, 45,132, 97, - 75, 33,109,105,208, 52, 29,217,169, 83, 39, 20, 21, 21, 97,255,254,253,170,145, 35, 71,202,221,220,220, 32, 18,137,242, 0, 64, -175,215,203,207,157,243, 85, 45, 94,124, 3, 20, 69,161,180,180, 7,122,244,232,138,139, 23, 47, 90,146,103,182,125,227,198,141, -205,189, 72,132, 96,218,180,105,156,174,217, 88, 9,120,152,200,223, 17, 74,130, 49,238,117,238, 4,233,111, 23, 64,156, 0, 41, - 77, 12,129,173,122, 29,180, 68,143, 90,157, 14,234,224, 94, 14, 57,247,176,176, 48, 80, 20,197,139,252, 1, 96,240,224,193, 24, - 52,104, 16,117,244,232, 81, 98,173,205, 22, 26, 60, 6, 77, 8,223, 92, 27, 23, 36,229,220, 39,126, 0,205, 44,127, 38, 96,112, -219,182, 34,129,169, 91,129,252, 31, 89, 5,160,165, 21, 10, 71, 17, 2, 33,128,104, 90, 89,139, 41, 1, 76,230,130,104,106, 25, - 27,235, 31, 0, 36,183,110, 20,221,185,126,163,179,143,143,183, 43, 62,250,226, 24, 70, 13,239,130,136,190, 29, 64, 57, 81,141, - 25, 1, 13, 91,199,227,250,141, 42,220,186, 81,116, 25,128, 69,179, 50,168,171, 12, 63,231,171,209, 43, 8,240, 25, 0, 44,152, - 13,204,157, 1,120,184, 27,220,254,139, 63, 5, 22,205, 53, 28,251,115,190,225,120,190, 4,237, 40, 75,253, 97,170, 5,112,238, -220, 57,200,100,134, 62,217,177, 99, 7,174, 93,187,166,234,217,179,167,124,204,152, 49,168,170,170,138,244,246,246, 86, 29, 60, -168, 67, 94, 30, 48,104,208, 64, 4, 4, 4,200, 59,119,238, 12, 0, 42,115,242,218,180,105, 3,173, 86,203,234,183,117, 58,221, - 35,255,236, 26,147, 63, 27, 69,128,173, 18, 80,212,222, 87,238,124,230,140,138, 38, 4,109, 68, 18,136,197, 20,116, 68,143,218, -250,122, 84,105,181, 40,241,247,151,251,216,113,222,174,174,174,160, 40, 74, 62,104,208,160, 60,190, 50, 24,162,183,213,246,160, -149,128,212,212, 84, 42,169,193,178, 55, 37,127, 99,235, 95, 64,235,146,191,160, 0, 60, 8, 11,175,133, 83, 10, 27,149, 0,118, -138,134, 46, 52,180, 95, 73,225,229, 50,159,126,161,190, 88, 48,119, 40,214,253,239, 87,184,200, 36, 8, 15,243, 5,164, 78, 4, -153, 0, 0, 32, 0, 73, 68, 65, 84, 69, 81, 70,150, 36, 65,225,229, 50,132,134,246, 59, 11,160,202,146,192,192,160, 30,216,177, -247, 52,102, 76, 1, 72, 49, 48,116, 50, 16,216, 5,216,144,109,116,208, 92, 64,175, 7,118,236, 53, 28,223, 90,176,230, 41,106, -173, 52,192,123,247,238,169, 66, 66, 46, 99,237, 90, 0,208,227,189,247,206,224,228,201, 90, 85,109,109, 45,170,170,170, 80, 92, - 92,140,219,183,111, 35, 34, 34, 2,211,166, 77,179,153, 6, 72, 8,145,211, 52,173, 18,137,108, 39,248, 48,138, 7, 87, 48, 75, - 0, 27, 54,108,192,168, 81,163, 90,245,249, 74, 73, 73,161, 24,226,183,181, 4, 96,235, 24, 99,120,245,239,143,187, 90, 45,244, -170, 60,104,165, 78,112, 35, 18,104,104, 26, 21, 90, 45,170,198, 60, 1,159, 1, 3,120,122, 5, 41, 12, 26, 52,136,247,186,191, -177, 12, 99,162, 55,215,102,143, 18,112,236,216, 49,171,109,108, 96,142,252, 25,203, 31,128, 16, 16,216,202,228, 47, 40, 0,143, - 56, 26,215,255,217, 47, 3,232, 67,251,142, 28,179,125,235, 87, 7,127,201,119,239, 53,100,128, 63, 98,162, 2,177,251,167, 98, -236,248,209,240,112,190,149, 60, 28, 52, 77,240, 75,126, 9,138,138, 10,175,198, 37,188,240, 15, 0,245,150, 4, 70, 12,251, 59, -181, 99,211, 27,228,227,175, 12,169,128,171, 63, 48,164,254, 69,141, 48,164, 2,126,252,182,129,252, 63,254, 10,208,163, 45,239, -138,128,246, 90,230,182, 60, 8,173,149, 5, 80, 83, 83,131,254,253, 53, 24, 52,200,240,126,224, 64,130,221,187,139,113,241,226, - 69,166, 16, 16, 34, 35, 35,209,189,123,119, 86, 53, 0,198,141, 27,151,151,149,149,101,211, 11,160,211,233,224,233,233, 41,231, -122,190, 13,233,128,141,153, 1,251,247,239, 39,124,151, 1, 6, 15, 30,204,170,141,139, 18, 96,235, 56,214, 66, 69,162, 60,237, -144, 33,242,243, 78, 78,232,114,243,166,202,237,218, 53,104,186,117,195, 21, 95, 95,185,119, 68, 4,208,176, 68,195,131, 96, 29, - 65,210,205,100,152,107, 99,219,151,166,199, 49,132,111,171,141, 15, 76, 73,159,241, 8,216,187,132, 39,160, 57,216, 4, 70, 11, - 10, 64, 11, 90,230, 15,233,111,220,141,126,114,218,202,156,221,223,191,241,251,205,170,160,224,110, 94, 24, 63, 46, 8, 94,158, - 50,148,149,107,112,242,215,219, 40,188, 92,134,162,162,194, 67,209, 79, 78,219, 12,224,186, 45,129,221,122,196,201, 15,228,111, - 87, 29,202,175,196,248, 49,192,154, 37,134, 74,128, 69, 87,129, 47, 55, 26, 44,127, 61,218,162, 91,143, 56, 57,223,107,181,103, - 9,128, 45,249,183, 70, 12,192,205,155, 55,229, 94, 94, 62,170,227,199,255, 0, 0, 92,188,216, 22,131, 6,245, 70,187,118,237, - 32,147,201,112,243,230, 77,121, 92, 92, 28,167, 82,192, 93,187,118,149, 95,184,112, 65,101,236,209, 49, 37,255,224,224, 96, 12, - 30, 60,152, 19,137, 49, 89, 0, 70,107,255, 76, 64, 32, 47, 37,192, 28, 17,242, 37, 71, 91,228,206,137,252,141,148,128,118, 3, - 7,162, 22,160,106, 27,154,236, 13, 85,179,151,252,185,244, 27,219,223,114,180, 60,182,228,175,141, 15, 6,132,245,255, 7,226, - 9,176,164, 24,112, 74, 3,228, 27, 44,199, 53, 13,144,175, 60,190, 50, 29,125,126,214,250,201, 81,231,103, 79,224,162,147,180, -141, 50, 46,225,133,239, 10,206, 28,248,124, 75,246,190, 64,191, 78, 65, 67,141,246, 2, 56, 18, 26,218,239,104, 92,194, 11, 11, - 1,212,176,145,215,187,207,232,188,222,125, 70, 83, 39, 14,127, 78,190,223,113, 17, 31,126,246,240,237, 5,240, 48,146, 63, 0, - 60,253,244,211, 56,125,250, 52,102,206, 60,222,224, 1, 24,136,169, 83,251,201, 93, 93, 93,243,248,202, 12, 15, 15,207, 11, 15, - 15,167,182,110,221, 26, 89, 85, 85,165, 18,139,197, 16,137, 68,208,233,116,144, 74,165,112,115,115,147, 59,128,252, 29,162, 4, - 8,248,115, 34, 53, 53,149, 74, 75, 74, 35,254,115,252,229,232,106,254,152,146,164, 28,149, 16, 15,208,186,144,176,157, 40, 29, - 61,241,182,132, 60, 62,191,245, 40, 95,175,157,168, 8,237, 59,242,217,208,190, 35,153,138, 49,110, 0,124, 0,220, 4,160, 70, - 67,217, 87, 46,136, 24,246,119,138, 79,145,159,150,238,135,135,169,174,132, 41, 92, 93, 93,243,134, 13, 27, 70, 13, 27,230,248, -142, 75, 72, 72,200,131,131,138, 91, 50,235,254,166, 36, 63,106,212, 40,106,195,134, 13,228, 97,136, 7, 16,240,240, 41, 1,214, - 15,128, 64,254, 45, 0,182, 85, 0, 1,128, 10, 15, 15, 23,214, 94, 4, 8, 16, 32, 64,128,128,191, 24,132,189, 0, 4, 8, 16, - 32, 64,128, 0, 65, 1, 16, 32, 64,128, 0, 1, 2, 4, 8, 10,128, 0, 1, 2, 4, 8, 16, 32, 64, 80, 0, 4, 8, 16, 32, 64, -128, 0, 1,127, 14, 52,201, 2,152, 61,123, 54,239,168, 76,115,133, 28, 4,121, 45, 35,143,205, 38, 54,173, 41, 47, 55, 55, 55, - 18,128, 42, 51, 51,211, 33,242,246,238,221, 27, 73,211,180,195,228, 9,247, 95,171,201,155, 6, 96, 99, 11,159,159, 19, 0, 25, - 12, 69,107, 52, 48,100,179, 16,152, 20,177, 17,198, 67,144,247,103,151,199, 89, 1,176, 69, 14,150,192, 37,149,202,209,242, 30, - 36,146, 18, 43, 8,164, 82,100,108,112, 97,117,126,185,185,185,145,153,153,153, 42, 71, 93,175,177,188, 21, 43, 86,200,147,147, -147, 85,124,182, 23, 54, 39,239,236,103,109, 17,246, 74, 37,236,145,199, 96,226,160,157,170,211, 23,244, 0,128,140,140, 12,146, -148,148,100,215,120,246,232,240, 61,212, 58,111,184,184,184, 32, 51, 51,147, 36, 38, 38, 62, 44,247, 71,251, 89,175, 39,127,179, -250,163, 21,207, 1,248,195, 1,242, 2,102,191,250,218,154, 47, 62,253,248, 89, 11,242,156, 0,232, 96,189, 34,155, 19, 12,149, - 27,219,207,157,251,218, 55,159,124,242,241,115, 48,108,230, 68,195, 1,149,220, 76,159, 99,142,247,198,225,150, 26, 8,138,162, - 98, 69, 34, 81,111,145, 72, 20, 73, 81, 84, 15, 0,174, 90,173, 54, 71, 44, 22,123,210, 52, 93, 74, 8,121, 27,192, 93, 71,246, -129, 0, 1,230,240, 92, 81, 17,249, 38, 40,200, 97,115, 84,146, 66, 65, 50, 90,136, 19, 37,182, 30,114, 66,136,181,135,142,243, -132,225, 40,121, 92, 45, 88, 71, 98,207,158, 61, 54, 39, 17,134, 92, 83, 82, 82,224,235,235,107,182, 2, 94,114,114,178,138,237, -111, 50,242, 24,226, 63,114,228, 72,163, 34, 96,143, 60,250,220, 59, 16,245,126, 15, 95,239, 53,148,142,165,207,189,211,120,140, -168,247,123,156,250,165,109,229,235,132, 38,192,119,187, 13,178, 98, 70, 59, 33, 52,184, 0, 25, 25, 25, 4, 0,184, 42, 2, 21, -186,239, 34,203,175,220,133,154, 26,173,170,169,107,131,152,232,114,116,242,163,112,252,248, 33, 82, 89,169,193,152, 49, 99, 90, - 85, 17,152, 61,119,238,171,160,233,113,179,231,206,125,245,139, 79, 62,121,219,110,121,115,230,190, 76,104,122,236,236, 57,115, - 95,253, 98,149, 89,121,245, 44,196,212, 3,160,230,204,153,251, 42, 77,235,199,205,153, 51,247,213, 85,230,101,137,192,163,214, -131,157,208, 26,223,127, 63,252,240,131,106,242,228,201,242,113,227,198,229,217, 35, 84, 44, 22,199, 72, 36,146, 81, 18,137,228, -105,177, 88,236, 37, 18,137,220,210,211,211, 69,111,188,241,198, 11,122,189, 30, 58, 3,158,214,235,245,241, 0,126,110, 80, 2, -180, 13,243, 95,139, 47,131,238,216,177,131,176,157,239, 98, 99, 99, 57,221,211, 59,119,238, 36,246,124, 95,128,227,225,178,108, - 25,160, 84, 58, 76,158,122,254,124,187,190,207, 84, 4,228,180, 29, 48, 27,242, 31, 48, 96, 0,242,243,243, 57, 89,252,214, 72, -158,141, 60,115,242, 83, 82, 82, 80, 92, 92,140,204,204, 76,135,110,235,154, 20,159, 65,224,210, 3, 25, 27, 35, 41, 0,200,200, -244,160,184,144,255,138, 21, 43,228,165,165,165, 42, 75,228,159,146,146,130,244,244,116, 78,228, 15, 0,137,137,137, 24, 58,116, -168,124,232,208,161,118,201, 99,200,158,249,191,244,125, 52, 33,255,249, 83,100, 88,182, 73,195,170,175, 60,212,201, 36,172,135, - 24, 53,106,130,215,159,147,225, 72,129, 14,234, 26,130, 90, 45, 32, 15, 47, 64,193, 69, 61, 39,111, 64,241,245,143, 73,249,173, - 54,112,111, 43,133, 95, 71, 55,180,239, 16,140,171, 69, 90,116,237, 93, 15, 39, 89, 41,114,183,220,193,150, 45, 91,200,164, 73, -147, 90,101,194, 83, 40, 20,206, 62,157, 58,205,253,246,200, 81, 42,166,103,247, 87, 21, 10,197, 7, 74,165,178,206, 30,121,237, -253, 58,205,253,110,239, 17,106,108,120, 79,187,228, 41, 20, 10,169,159, 95,199,185, 63,170, 14, 80, 3,251,133, 90,146, 69,183, - 66,183, 53,110, 63,152,153,153,169,138,143,143,199,166, 77,155, 84,227,198,141,107, 54,134, 17, 17, 17,100,241,226,197,136,143, -143,183, 58,190, 18,137,100,140, 84, 42, 13,147, 74,165,115,164, 82,169,235,245,235,215,209,189,123,119,136,197, 98,184,187,187, -163,176,176, 16,110,110,110,146, 99,199,142,121, 30, 62,124,248,192, 43,175,188,210, 21,192, 85, 0, 82, 75,125,144,148,148,212, -204, 88, 49,158,183,152,118,138,162,144,145,145, 97,243,254,219,186,117,171, 69, 25,198,237,132, 16,196,198,198,114,234,208,236, -236,108,187,190,223,146, 56,117,234, 84,100,120,120,120,158, 35,100,221,190,125,155,208, 52, 13,136,202,161,173,211, 64,234, 44, - 3,104, 79,136, 68, 34,116,232,208,129,234,107,234,185,180, 82, 12,231,241,199, 31, 39,155, 54,109,130, 37,121, 83,166, 76,193, -193,131, 7, 41,190,231, 7, 0, 55,111,159, 39,198,231,103,207,181,243,241, 38, 88, 42, 3,204, 74, 1, 96, 75,254,108,145,146, -146, 98,243, 24, 54,196,101,137,252,151, 46, 93,138, 5, 11, 22, 52,105,231,171, 4, 36, 13,200, 32,104,215, 3, 25, 63, 70, 82, -198, 22,255,216,177, 99, 41, 0, 96,254, 23, 22, 22, 18, 54,100,109,141,252, 27, 60, 3, 54,173,118,198, 77,111,108,225,155, 46, - 45,240,145,103,205,194,159, 63,133,253, 78,113, 62,234,215, 73,247,199,196,112,113,166,240,152,191, 24,119,202,104,212,235,196, -184, 91, 78, 80, 81, 77, 80,248, 59, 13,136, 0, 31,215, 51,200,205,205,141,140,138,138,178, 58, 41, 92,189,246, 81,100, 72,112, - 16, 14,223,186,141,110, 1,237, 17,214, 55, 16, 98,103,111, 60,214,173, 12,101,106, 13, 74,111,233,241,251,109, 13, 92, 37,197, -200,205,117,183, 41,175,133, 48,253,185, 55,222,144, 22,119,244,135,243,128,129, 34,205,129,253,211, 1,124,197, 67, 14, 99,137, - 79,127,254,213,121,210,223,165,126,112,235, 17, 33,170, 60,123,144,175, 60, 0,152,254,202,220,215,164,112,118, 71,183,158,161, -162, 11,191,158,176, 71,150, 35, 65, 51,207, 8, 69, 81,144,201,100,114, 0, 42,211,123, 98,192,128, 1,172,200, 31, 0,156,156, -156, 60,101, 50,217,140, 59,119,238,184,246,232,209, 3,253,251,247,135, 68, 34,193,167,159,126, 10,189, 94,143, 62,125,250, 96, -243,230,205, 56,118,236, 24,206,156, 57, 3,177, 88,252,185, 94,175,159, 96, 77,230,132, 9, 19, 26,231, 57, 91,243, 32, 27,194, - 85, 42,149,114, 63, 63, 63, 21, 33,196,170, 1,116,235,214, 45,206,123,101, 48,178,249,126,159, 33,234,243,231,207, 91,157, 55, - 66, 66, 66,228, 92,201,252,252,249,243,170,138,138, 10,120,120,120,200,237, 81, 4, 78,156, 60, 68, 22,191, 63, 27,109,218,184, - 52,251,172,166, 70,141,236,205,167,113, 70,169,164,198,119,236, 72,174, 39, 36, 88,158,219, 15,172, 48, 12,230,129, 21,232, 56, - 38, 14,178,136,129,208,247, 8,109,234, 62,251,110, 61,188,150, 76, 66,111,163,165, 34,245,147, 47,225, 11, 27,231,183, 48,117, - 22,188,219,185, 26, 26,222, 89,137,228,121, 51, 1, 0,247,238,214,226,195,180,213, 36,162,255,112,222, 74,128,163,151, 20,172, - 42, 0,140,197,110,203, 82,127, 88, 80, 92, 92,140, 5, 11, 22,240, 82, 32,172,193, 96,233, 39, 81,123,246,236, 33,153, 25,131, - 1,169,154,176, 89,251, 55, 71,214,166,164,108,109, 89,192, 18,140, 21,138, 35, 71,142,168,134, 14, 29,218,196,245,207, 85,222, -127,223,112,179, 56,185, 77, 95, 94,195, 90, 14, 77,211,145,206,174, 20, 68, 34,192,213, 5, 40,175,164, 81, 71, 8,218,184, 80, -208,208,128,186,142,160,115,123, 17,104, 29,112,233,186, 30,197,197,197, 42, 88, 41, 79,123,174,224,135,200,176,176, 94, 42,169, -148,224,229, 25, 67,160,215, 19,220, 42,213,226,218,141,114,192,233, 58, 92,188,234,112,179,244, 10, 68,210, 10,156, 59, 87, 14, - 15, 47,235,242, 90, 10,206,222,222,239, 60,253,183,191, 57,191, 69, 3, 94, 11, 82,221,110,159, 62,245, 54, 79,146, 37, 0, 32, -243,240,126,231,255,158,253,155,243,242,203,122,116,158,150,226,118,161,248,140, 57,121, 54,119,100, 83, 40, 20,104,235,225,249, -206,244,103,159,115, 62,115,173, 12, 9,207, 36,185,253,251,253,100,190,231,102,209,147,103,169,221,134,226,173,103,158,145,184, -184, 56, 68, 69, 69,229,101,102,102, 66,173, 86, 55,142, 33, 99,249,199,197,197,177, 26, 83,103,103,231,225, 53, 53, 53,189, 66, - 66, 66, 32,151,203,145,156,156,140, 23, 95,124,209, 48,153,215,215, 99,221,186,117,200,207,207,199,137, 19, 39,240,253,247,223, - 67,173, 86, 7,211, 52, 29, 99, 77,230,248,241,227, 29,122, 63,237,216,177,131,213,210, 28, 69, 81, 42,174, 46,124, 99,217,124, -190,223,224, 26,206,171,168,168, 64, 73, 73,137,217,207,253,253,253,193,151,192, 75, 74, 74, 80, 82, 82, 98,151, 34,112,230,244, - 69,124,179,126, 59, 70,142, 28,142,208, 62,157, 26,219, 11,126,189,129, 3, 7, 14, 97,243,166,159, 72,230,155,111,226,122, 66, - 2, 92, 70,140,128,250,231,159,205,202,201, 24,153, 76, 1,192,165,245,171, 72,223,210,221,120,110,239,118,232,123,132, 66, 61, -111, 17, 0,192,101,249, 34,184, 93, 44,192, 27,197, 82,116,127,126,206,253,126,172,185,255,156, 90, 59,191,168,177, 35,154,157, - 95,238,158,159,113,230,244, 69, 68,244, 31,206,251,254,225,179,164, 96,236,238,183,230, 13,144,112,181,216, 29, 77,180,246, 34, - 51, 51,211,174,239, 39,101, 40, 8, 58, 2, 25,241,134,137, 43, 35, 63,169,137,155,223, 96,241, 87, 16, 83, 79, 0, 91,178, 46, - 45, 45,109, 66,206,124,200,154, 45, 24,165, 67,161, 80, 16, 91,245,160,173, 89, 54, 12, 24,247,191, 37,121,132, 16,114,231,220, -235,232,216,224,250,111,212,152,245, 4, 26, 45, 80,223,208, 86,175, 35, 32, 34,195,235, 95,207,228, 51, 89, 2,102,225,238, 94, -161,170, 81,139,224,227,237,137,242,123,181, 40,175, 40,199,145,227,183,112,227, 54,129,180, 77, 45, 58, 5, 87, 67, 93,123, 7, -221,251,214,163,107, 72, 29,190, 95,147,143,221,187,119, 71, 62,192, 91, 78,164, 80, 40,162,166,188,156,212,161,196,195, 11, 69, - 58,192, 37,106, 28, 68, 94,237,124, 20, 10,197, 56,165, 82,249,163, 17, 89, 59,193,104,221,219,210,188,175, 80, 40,198, 38,206, -120,185,195, 31, 34, 15, 92,173,174,135,103, 68, 20, 36,238, 94,166,242, 0,118, 1,108,209, 19, 39, 77,238, 64,196,206,168,168, -169, 67,216,128, 97,112,107,235, 97, 78, 86,171,128,177,254, 41,138,194,182,109,219, 72, 92, 92, 28,182,111,223, 14, 23, 23,151, -200,148,148, 20, 21, 23,242, 7,224, 92, 94, 94,254,124,125,125,189,200,213,213, 21,163, 70,141,194,242,229,203,225,228,228, 4, -133, 66,129,245,235,215, 35, 63, 63, 31, 71,142, 28,193, 79, 63,253,132, 95,127,253, 21, 62, 62, 62, 62, 58,157,238, 49,216, 88, - 2, 73, 74, 74, 34,182,150, 0,214,172, 89,195,234, 60, 91,114, 9, 96,235,214,173, 14, 89, 2,240,240,240,144,151,148,148,168, - 44,125,102,239,184,243, 81, 4,228, 69, 69,228,238,178,101,248, 8, 0, 14, 31,198,189, 41,177, 88,209,175, 71,163,203, 62,180, -119,111, 76,157, 54, 30, 93,203,238,224,122, 66, 2,218,205,159, 15, 85, 80, 16,213,247,231,159,173, 62, 39, 82,249,227,232, 17, - 19,137, 55,230,127,128,127,161, 0, 43,134,142, 65,216,160, 33, 8,190, 87,140,117,158,253, 81,236,113, 27,125,100, 50,162,209, -104, 88,141,175,124, 76, 63, 60,247,124, 28,142,254,242, 43,118,231,252,136,119, 1,172, 88,190, 22,161,189,123,227,185,231,227, - 80,171,190, 11, 25, 7,121,166,176, 55, 6,128,147, 7,224, 81,130, 82,169,164, 28, 17,181,206,144,123,230,130,203,128, 88,138, -164,113, 93, 1,207,174,200,104, 72, 88, 98,187,246,239,104, 24, 95, 27, 19,244,103,108,249,155,130,137, 13,176, 20, 12,200,103, - 39,194, 13,243,218, 88,244, 8,184, 87, 38,227,138,150,224,214, 29, 26,128, 8,110,174, 6, 23,103,189,142, 64, 83, 7,104,180, -128,166, 14,208,214, 3, 26, 53,160,173,187,239, 37, 49,167, 80,184,233, 94, 39, 55,174, 5,160, 75, 55, 55, 16, 39, 9,238,168, -213, 80,237,187,142,115,133, 55,112,239, 94, 53, 66, 7,232, 81,163,209, 65, 83,167,135,186,150,198,173,107,128,186, 6,216,178, -101,139,138,203, 6, 24,118,142, 9, 45,246,244,124,103,230,155,111,202,190, 55,162, 16,175, 55, 83,221,238, 45,152,247, 54,128, - 31,141,200, 90,203, 66, 36,145,184,121,190,243,226,107, 11,100,187,110,232, 27, 27, 59, 63,189,192,237,234,151,111, 26,203, 99, -229, 5,112,117,115,127,251,213,215,231,201,138, 74,238,239, 22, 25,255, 76,146,219,119, 25, 43,204,201,226,244,172,153,187,151, - 56, 62,107,132,177,254,101, 50,153, 60, 42, 42, 42,143, 73, 25, 85,171,213,170,252,252,124, 42, 46, 46,142,173, 44, 29,128, 96, - 0,116,120,120, 56, 45,147,201, 68,235,215,175,199, 11, 47,188,128, 37, 75,150,128, 16,130, 95,126,249, 5,251,246,237,195,153, - 51,103, 80, 81, 81,129,238,221,187,163,178,178,210, 85, 36, 18,249,218, 18, 62,113,226, 68,139, 74, 50,179, 52, 48,126,252,120, - 78,110,250,135,117, 9,192,154, 23,192, 30,235,223, 94, 69,160,172,188,188,241,181,111,234, 44,132,165,206,198, 72,147, 99, 46, - 63,249, 34, 58,239, 63,142,162,121, 47,227, 23,127,127,184, 0, 56,163, 84, 82, 48,147, 22,167, 86,171, 73,231,206,109,113,245, - 26, 16, 26, 17, 2, 44,123, 11,175,125,185, 5, 51,130, 78,163, 95, 93, 33,222,184, 45,197,251, 27, 22, 98, 73,218, 23, 56,243, -235, 65,116,233, 28, 74, 92, 92, 44,123,125,141,229,121,183,115,197,147,177, 67,240,100,236, 16, 44,166, 87, 66, 91,183, 0, 39, - 79, 2, 39, 79, 2, 7, 14,196,225,223,171, 46, 34, 54, 54,134, 4, 4, 60,134,160,160,111, 56,241, 83,238,227,111,161,232,160, -196,198,220,253,197, 95, 67, 1, 80, 40, 20, 36, 49, 49, 81,206,172, 25,154, 42, 1,198, 19, 18,179, 30,207, 55, 30,128, 33,253, -177, 99,199, 82,134,101, 0, 41, 50, 54, 60,216,235,101,162,254,163,162,162,168,220,220, 92, 98,203, 27, 98, 43,237,208, 26,161, -115, 93, 14,120,254,205, 26,248,119, 16,225,153,120, 41, 52,117,128,135, 59, 5, 17,213, 96,245,131, 64, 83, 11,212,104, 9,106, -212, 4, 53, 26, 2,154, 0, 34, 43, 49,215,207,207,173, 65,159,126,197,240,235,117, 15,123,118,149,226,222, 61, 13,194,135, 85, -162,175,119, 53,224, 84, 7, 77, 45,141,210, 27, 4, 53, 53, 20,116, 58, 10,222, 62, 20, 64, 61,240, 88,182,208,254,253,250, 13, -244, 10, 8,192, 33,189,145,242,242,204,179,184,151,146, 60, 64,161, 80,244, 86, 42,149,231, 56,220,207, 33,131, 70,140, 30,216, -206, 63, 0,199,143, 54,198,200,161,189,252,255,112,117,205, 2,115,242,172,109,133,221,123,196,136,145, 3,253,253, 59,227,220, -137,203,141,237, 35,158, 24,143,255, 41,151,115, 62,183, 22, 64,227,185, 51,207, 47,179, 12,192, 96,251,246,237,205,226,143,204, -196, 2, 48,131, 30, 12,224,212,252,249,243,135, 75, 36, 18,183,175,191,254, 26,107,215,174,197,204,153, 51,177,116,233, 82, 80, - 20,133, 43, 87,174, 64,173, 86, 35, 37, 37, 5, 58,157, 14,179,102,205,162, 41,138,178,249, 0, 56, 50,154,254, 97, 95, 2,176, -230, 5,112,132,245,207, 23,235,215,175,199,223,146,166,162,162,188, 14, 72, 91,141,154, 3,199,209,102,228,192,198,207, 75,211, - 86,163,192,217, 25,212, 63, 94, 66,216,180, 39,113,120,221, 46,244,237, 59,200,162,188, 75,151,206, 98,216,136, 24,156, 45,240, -194,234,207, 51, 49,114,228,112,188,255,217, 66, 44,142,154,142,111, 1,244,122,238, 5,172,254, 60, 19, 82,169, 23, 38, 76, 28, -136,175, 57,200,251,228,163,141, 24, 20,215, 7, 31,244, 89,142,179,227,221,224, 21,191,185,201,177, 62,174, 50, 28,205, 83, 33, -224,111, 51, 56,247,195,193,131, 18, 44, 91,230, 98, 67,129,251, 11,121, 0, 76,215,145, 45, 17,124,195,113,172,145,145,111,136, - 80, 55, 16,255, 37,100,126,122, 25,134, 44,128,166, 74, 1,155,101, 0, 71,187,245,115,115,115,137,177,245,207,120, 4,140,223, - 39, 38, 38,130, 41,150, 99,169, 48, 4, 23,242,103,178, 0, 44,201,211,233,129,154, 90,130, 58,173, 33,216,175, 78, 75, 32,113, -190,255,153,166, 22, 80,215, 19,220,189, 71,240, 71, 25,193,137,115, 58,208, 52,144,152,152, 40,191,116,233, 82,179,177,209,233, -128,146,235, 90, 92, 47, 42,195,193,195,101, 32,132,194,185,223,104,196, 61,163,131, 84, 66,240,199,109,224,224,143, 64,101, 37, - 1,161,129,199,199, 80,144,201,128,152,152, 9,184,122,245, 42,171,107,202, 90,167, 32, 19,103,240,207, 18, 17,185,181,125,243, -229,165,233, 78,217, 68,212,132,137,125,156,157,225,244,143,185, 78, 87, 86,173, 92, 8,224, 89,182,242,196, 46,110, 11,103,191, -189,212,233,199, 18,210, 68, 94,187, 54,206, 8,155,246,138,211,185,141,159,154,202,179,232, 1,144,185,180, 89,184,224,157, 69, - 78,151,111, 85, 52, 57,160,173,123, 27, 76,122,102,166, 83,246,127,191,226,116,110, 45,229,181, 51,215, 22, 17, 17, 65, 78,156, - 56,129,109,219,182, 53,251, 78,124,124,188,217,161, 0,112, 22,192,169, 21, 43, 86,244,243,244,244,116, 99,220,224, 95,125,245, - 21, 94,120,225, 5,172, 93,187,182,209,138, 95,177, 98, 5,202,203,203, 81, 89, 89, 89, 93, 91, 91, 91,220,224, 65,144, 90, 59, -215,151, 95,126,153,152,186,232, 25,235,159,173,251,255, 81, 89, 2, 48,231, 5,112,180,245,207,200,100,187, 4,112,110,216, 48, - 80, 47, 79,131, 39, 0, 50,102, 0,106, 79,156, 69, 77,218,234,251,253,150, 52, 21,221,159,155, 10,153,204,112,253, 5, 5,133, - 86, 9,187,160,160, 16, 0, 16, 19,107, 80, 34,242,143,159,193,183,223,124, 7,215, 33,131, 81, 91,175,131, 22, 90,140, 26,221, -191,201,241,108,229, 93,215,107,241, 76,135, 87, 64,159,168, 67,226,191,198, 64,250,212, 17,244, 14,237,141,208,176,224,198,243, - 75,121, 99, 21,130,130,196,172,239,155, 39,254,239,137,168,115, 56,183, 7,255,251,134,178, 21, 2,240,197, 23,104,153, 66, 64, - 15, 35,242,243,243,109, 70,147,231,230,230, 70,178, 78, 41,116,110,131,204,174,251, 1, 93, 62, 65,183, 54, 72, 74,235,134,140, -188, 56, 10,200, 32,247, 21,130,177,188,151, 1, 76, 83, 1, 45,165, 6, 90,154, 44, 21, 10, 69, 35,249,155, 6, 0, 50, 46,117, -166,205,154, 7,192, 88,158,163, 38,243,157, 59,119, 70,222,184,185, 75, 69,183,167, 33,146, 0, 78, 34,195,253, 93, 79, 19,232, -116, 64, 85, 21,129,182, 30,208,213, 27,148,130, 9, 19, 13,222,155, 75,151, 46, 89,148, 87,119,103,167, 42, 52,148,198,129,125, -122, 80, 34,224,143, 91, 20,100, 46,192,190,221,128, 86, 77,129, 34, 64,223, 8, 39,148, 92,163, 49,122,244,120,196,198,198, 82, -108, 42, 97,101,173, 83,144,101,175, 0,243, 63,227,175, 4, 16, 90, 31,173,111,231, 35,218, 69,223,103,161, 14, 0,252, 40, 64, - 61, 96,128,228,178, 78, 31,205, 73, 30,161,163,225,238, 45, 82,221,210, 55,202,107, 47, 3,124,100, 20, 92,251, 12,144, 20,124, - 71, 71, 91,178,162,205,201,106,227,238, 41,186,122,187,188,129, 88, 0,119, 23,103,184,187, 74, 17, 17,222, 95,178,229, 91, 18, -221,202,143,174,217, 62,103,162,254,227,226,226, 26,239, 81,198,123, 55,101,202, 20,107, 22,104, 53,128,203, 39, 79,158,172, 30, - 57,114,100,123, 24,229,244,127,245,213, 87,141, 36, 91, 95, 95, 15,189, 94,143, 75,151, 46,161,125,251,246,119,104,154,102,165, - 45, 78,156, 56,209,226, 18, 0, 23,162,125, 20,150, 0,204,121, 1, 28,105,253,115, 33,126, 6, 29,253, 61,177,102,205, 94, 36, -196, 15, 67,135, 1,161,192,128, 80, 80, 47, 79,107,170,244, 2,184,125, 75,141,173,219, 14,163,163,191, 39,123,121,126, 46, 24, - 48,176, 59, 6, 12,236,222,236, 56,174,242, 70, 77, 14, 65,234,232, 79, 65,159, 53,144,255,139,111, 60,207, 75,158, 41,222,116, -127,115,207,146,170, 37, 99,111,226,102,139, 61,144,118, 41, 0,249,249,249, 15,188,106, 31, 99,229, 50, 68, 23, 21, 21, 69,153, - 33,127,194,184, 21, 19, 19, 19,121,253,142,113, 22, 0,211,198,213,242, 55, 13, 0,108, 64, 99, 91,114,114,178, 42, 49, 49,145, -245, 67,102, 76,254,230, 98, 2,184,202,179,133,101,155, 52,176, 37, 47, 54, 54, 54,111, 97,202, 86, 60, 49,212, 9, 52,128,122, - 45, 13,103,169,161,155,170,106, 8,234,234, 9,116,122, 32,255,172, 30,122,154,192, 86,202, 94,108,108,108,222, 59,111,109,197, -232, 72, 49, 38, 77, 23,163,186,138,160,170, 2,168,169,162,208,173, 59,129,190,158,130, 68, 36, 67,249, 61, 26, 37,191,107, 49, -239, 53,118, 1, 99, 89,235, 20,100,229, 92,160, 71, 0,176,234,117, 96,206, 71,252,148, 0, 82, 91, 51,249, 31, 3,250,239,244, -203,222,233,230, 53,226,113,116, 0,208,129, 2,244,135, 14, 34,247,249,103,171,235,107,107, 38,113,145, 71,107,106, 39,189, 28, - 53,112, 87,200,226, 44, 55,223,190,195,225,227, 76,161,189,140,130,250,252,207,216,250,214,140,234,122,117, 45,107,121,117, 26, -245,164,216, 39, 70,238, 74, 78,251,220,173,119,191, 1,112,119,149,194,221,197, 25, 69,231, 78,225,157,148, 87,171,213, 28,100, -241,177,228,217, 92,174, 57,242, 95,180,104, 81, 51, 55,255, 15, 63,252,160,138,143,143,135,133, 34, 65, 12,209,107, 1,156,234, -217,179,103,145, 70,163,233, 36, 22,139,101,174,174,134, 84,172, 77,155, 54, 97,202,148, 41, 80,171,213,208,104, 52,168,171,171, -131,155,155,155, 70,175,215,103, 19, 66,110,177, 57, 89, 71,101, 3, 60, 42, 75, 0,198, 94, 0,230,117,107, 16, 63,131,110,221, -252,240,102,106, 18,118,239,250, 5, 89, 91, 78,192, 89,218, 22,191,151,220, 95,193,234,236,223, 27,117,218, 74, 68, 12,232,133, -143, 87, 38, 97, 73,218, 23,156,228,249,250,122,160,224, 92, 65,227,231,161,189, 67, 81, 90, 90,193, 73,222,248,185,147, 48, 69, -244, 44,234,206, 86, 99,232,156, 48,208,125,101, 88,179,230,251,198,243,171,168,168,192,240,199, 67, 88,201, 51, 69, 84, 70, 20, -245, 19,126,106, 81, 62,229,173, 0,180, 4,249,179,145, 25, 21, 21, 69,101,102,102,146, 6,107, 23,153,153,153,196, 56, 45,209, -212,234, 55,167, 32, 52,247,195, 82,128, 84, 4,184,136, 1, 55, 9, 80, 87,133,204, 37, 78,128,203, 81,146,244, 84, 55,192,197, - 27, 25,223,112,183,250,173, 69,251, 51,100,205, 54,135,221,148,252, 77, 99, 2,184,202, 99, 75,254,108,228,125,152,190,154,122, -125,238, 44, 34,147, 1, 52, 13,244,233, 41,190, 63, 30,191,234, 81,175, 39,208,211, 98, 76,158, 60,153,149,114,242,222, 7,171, -169,121,243,102, 17,157, 14,208,214, 19,232,117,128,136, 2, 34,199, 3, 85,229, 20,126, 59,173,134, 90, 35, 66, 66,252,100,214, -110,255, 69, 47, 2,193,157, 13,239,131, 58, 1,124, 61, 1, 74,165,242,136, 66,161,136,185, 53, 33,118, 87,192,214,157,110, 1, - 35, 30, 71,253,161,131,216, 28, 31, 91,173,173,170,138, 81, 42,149, 7, 57,202, 59,168, 80, 40, 98,206,191, 59,113,151,255,191, -178,221, 58, 13, 26,129,154,243,135,176,225, 31, 19,170,235,106,185,201, 99,100,173, 72,253,251,174,247, 63,249,210,109,232,176, -225, 40, 44, 56,133, 87,147,158,173,174,173,174,230,124,110, 45, 13, 75,197,126, 20, 10, 5,137,139,139, 99,147, 13, 32,246,244, -244, 60,165, 86,171,191, 45, 46, 46,238,218,175, 95,191, 64,157, 78, 39,113,114,114, 66,118,118, 54,198,142, 29, 11,141, 70,131, -218,218, 90, 92,186,116,169,210,203,203,107,175, 90,173,254,154,166,233, 26,176,172, 0,200, 20, 5, 98, 92,236, 92, 92,255,143, -218, 18,128,177, 23,192, 17,227,203,167,118,128, 57, 60, 25, 51, 4, 79,198, 12,105,120,103,191, 14,219, 84,222, 68,251,148, 59, -207, 31, 80,119,186, 26,207,127, 62, 30,239,239, 93,104,247,185,169,103,170,137,151,206, 11,154,111, 52, 15,196,176,230,165, 0, -180,134,229,111,106,125, 24,187,177, 45,185,250, 29,121,142, 92,214,254, 29, 77,254, 70,202,142,113, 33, 32, 70, 9, 82, 53,120, - 58, 56,201,179, 21, 11,192, 85,222, 71,159,172,166, 20, 10, 5, 17,137,128,131,249,134,181,126, 38,224,207,176,238, 63,153,147, -188,229,203, 87, 83,179,102, 55,212,164, 16, 25,100, 28,221, 15,212, 84,211, 32, 52,144,144, 48, 30,209,209,209, 54,199, 35,107, -157,130,164, 60, 11,120,186, 1, 37,119, 0, 23,103,128, 38, 64, 27, 25,144,166, 0, 82,149,188,148,128,131, 10,133, 34, 38, 63, - 33,118,151,199,162,247,220,242, 22,189, 83, 93,199,131,252, 77,229,229,205,159,176,203,229, 31,239,186,229,252,123, 49,103,242, - 55,150,245,202, 43,175,196,190,243,207,151,119,206, 73, 78,113,251,252,227,116,134,252, 79,155,121,246,117, 92,100,219, 90, 58, -226,250,188,153, 35,255, 89,179,102, 17, 38, 19, 96,219,182,109,132,162, 40,107,138,128,155, 86,171,173, 22,137, 68,185,254,254, -254,157,171,170,170, 94, 57,126,252,120,199,254,253,251,211, 58,157,174,182,162,162,226,246,233,211,167,175,116,235,214,173,168, - 93,187,118,197,106,181,122,147, 78,167,187, 77, 8, 97,173, 0, 48, 69,129,140,188, 2,124,198, 87,222,130,115,161,195,101, 59, -106,221,223, 94, 57, 26,181,216,161,199, 59, 90, 94,121,153, 8,233, 58, 5, 2, 15,251, 97,218,103,182, 21,147,242, 50, 17, 30, - 11,176,126,204,131, 36,127,139, 10,128,173, 92,127,174, 15, 58,219,218, 1, 92,228, 42,149, 74,202,210,102, 59, 92,200, 43, 35, - 73,105,112,243, 95, 4,112,209,244,211,138,134,191,203,224,113,189, 42, 71,145,171,113,191, 40, 20, 10,194,212, 25, 72, 78, 78, -230,149,225, 96, 42,111,195,188, 54,141, 74,129, 61, 74,147,233,152, 48, 1,127,124,189, 18,171,191,104, 42,175,186,210, 48, 1, - 39, 36, 36,112,187,255,190,117,232, 51, 83,111, 76,218,251, 22,189,187,190,174,170,234,121,123,173,107, 70,222,143,159, 47, 94, -175,169,173,154,161, 84, 42, 15,241,149,245,217,103,159, 29, 80, 40, 20, 49,159,175, 92,182,190,186,186,218,210,185,233,240,224, -209,100, 70, 53, 37,255,220,220,220, 72, 66, 8,182,111,223,110,124,140, 53,121,215,180, 90,173, 51, 33,164,138,166,105,165, 86, -171,253, 37, 32, 32,192,167,188,188,156,122,251,237,183, 43, 43, 42, 42,238,118,234,212,169,170,186,186,186, 70,171,213, 86,214, -215,215,215,233,245,122, 53,151, 19,118,208, 50, 64, 94, 11,246,105, 30,254,164,232,217,179, 47,245,238, 91, 25,100,234,211, 99, - 17, 26,214,205,226,113, 5,103, 47, 99,227,119,123,208,179,103, 95,234, 65,202,235,215,175, 31,149, 50, 79, 73,166, 62, 61,214, -186,193,124,188, 24, 27,191,219,131,126,253,250,217,188,151, 30, 36,249,155, 85, 0, 28,109,217,183,164,167, 32, 42, 42, 42,143, -149,139,223, 6, 28, 25,213,255, 32, 60, 35, 92, 54,253,113,132, 55,128,235,152, 24,167,117,217,187, 36, 97, 42,143, 43,249,219, - 19,241,207,134,180, 1, 4, 61,140,242, 28,125,110, 14,186,183, 41, 0,160, 40,138,136, 68, 34, 48,127,140, 11,123,252,248,241, -136,137,137, 1, 77,211,160,105, 26,132, 16, 91,191, 71,233,116, 58, 87, 66,136,158,166,233,186,250,250,250,253, 98,177,152, 18, -137, 68,206, 0,156,105,154,134, 94,175, 23,235,116, 58,169, 78,167,235,168,215,235,207, 27,125,183,197, 55, 1, 18,224, 24, 37, -224, 74,177,134,236,222,185, 5,215, 74, 43,225,231, 85,219,248,217,173, 50, 87, 4,248,182, 69,175, 94,189,108,146,117, 75,201, -235,215,175, 31,117,171,164,142,172, 90,185, 3,133,191,223,105, 38, 47,184,179, 15, 2, 3, 3, 89,145,127, 75,193, 90,141, 20, - 42, 60, 60, 92,216, 30, 83,128, 0, 1,143, 42,106,141, 8,157, 54, 50,108, 36, 70,237, 55, 1,120,192, 16, 52, 46, 16,191, 0, - 1,150, 60, 0, 2, 4, 8, 16,240, 8, 65,214,160, 4,208, 70,196, 47,194,253, 37, 14, 9,128,142, 13,175,105,161,187, 4, 8, - 16, 20, 0, 1, 2, 4,252, 57, 32, 2,224,102,244,158, 33,126,169, 17,233,211, 13,199, 9,214,191, 0, 1,130, 2, 32, 64,128, -128,191,200,156, 38,144,190, 0, 1, 86,180,103, 1, 2, 4, 8, 16, 32, 64,192, 95, 89, 91,158, 61,123,182,241, 70, 58,196, 56, -194, 94,161, 80, 16,147,141,118,174, 69, 69, 69, 53,102, 53,154, 43,197,106, 44,143, 43,254,140,242, 76,211, 22,141,251, 83,232, - 63, 97, 60, 30,118,121,105,105,105,141,199,164,166,166, 82, 60,228, 1, 22,202, 1, 11,247,179,109,153,194,243, 43,200,227, 34, -143,179, 2,192, 17,237,217, 28,196,236,222,231, 40,141,197,180, 24,137,185,221, 0,205, 29,211, 26,218, 21, 67, 48,137,137,137, -114,134,104,152, 10, 96,214,106,130, 63, 72,108,223,190, 61,114,219,182,109,141, 36, 56,126,252,120,121, 66, 66, 66,222,159, 81, -219, 53, 55, 30,231,207, 27, 50,195, 66, 66, 66, 90,245,220, 20, 10, 5,153, 48, 81,129,236, 44,165,217,123,118,231,174, 19, 36, - 59, 75,105,245, 94,222,185,235,132,213, 73, 32, 54, 38,130,247, 77,151,150,150, 70,226,227,131,154,188,183,165, 4,216, 66, 85, -117, 85,228,214, 31,183, 34, 48, 52, 80, 5, 10, 56,127,242,156,124, 88,248,112,132,244, 12,225,116,255, 29, 58,116,168,217,117, - 15, 31, 62,156,130, 0, 1, 2, 90, 76, 1,144,178, 61,112,232,208,161,156,133,155,219, 44,134,129, 57, 18, 53,221,104,131, 45, -209,242,217, 24,135,141, 66,193,200, 77, 73, 73, 65,122,122,186,202,210,222,226,204,113,214,114, 53, 77,207,177, 83,183, 46, 0, -128,219, 26, 13,116,234, 58, 67, 99,121, 37, 0,195,222, 7, 92,106, 35, 24,147, 63, 96,168, 45,206, 37,215, 94,161, 80, 16, 17, -101,168,174,199,252, 7,172,191,254, 98,245,131, 87,200, 76,199,131, 33,126,190,227,225, 72,165,146, 33,255,216,152, 8, 13,160, -144,101,103, 41,121,255, 6,163, 64,152, 87, 0,148,118,157,167, 86,155,130,156,156, 36, 68, 71,103, 32, 62, 62,189,209, 35,192, - 71, 17, 56, 88,112,144, 60,214,191, 11, 62, 86, 46,135,151,171, 23,104,157, 30, 26, 82,167,218,253,203,143,209,123,247,253, 68, -134, 7,142,144,203,100, 50,155,138,192,161, 67,135, 72,131,103,161,153, 69, 36, 40, 1, 2,254,202, 56,117,234, 84,147,247,230, -230, 52,123, 20, 0, 78,241, 3,230,118,177,115, 4, 8, 16,105,183, 12,194, 94, 7, 96, 99,185, 43, 20, 10,146,146,146,130,165, - 75,151, 2, 64,227,127,115,199,217,218, 33,172, 25, 60,219,226, 76,241,119,112, 65,103,232,241, 51, 74,255,115, 2,167,139,238, - 98,242,210,181,173,118,163,157,249,245, 44,250,246, 9, 3, 77,128,179,103, 13,175,129,251,175,141,219,105,150, 93,109, 92,131, -221, 26, 50, 50, 50, 40,182,227, 49, 99,198, 12, 0,104,252,111,150,252, 41, 10,176,114, 63, 40, 20, 10,242,196, 19,187,160, 80, -196, 56, 84, 9,136,141,137,168, 77, 74, 74,114, 5, 50,144,157,197,141,216,141, 45,124,123, 73,222,146,245, 15, 0, 83,166,108, - 66, 78,142,225,127, 82, 82, 17, 24,143, 0, 23,111, 0, 33, 36, 82,117, 97,175,234,149,127,204,198,192,246,253,225,226,225, 1, -162,213,129, 38,122,136, 37, 82, 4, 71, 5,231,252, 54,224, 2,150,102,164,171,134,248, 12,149,187,186,186,218, 84, 2,238,220, -185,211,228,253,248,145,109, 48,100,238,207,120, 58, 93,211,100, 32,199,140, 25,195,123,188,178,178,178,200,196,137, 19, 29, 54, -222,142,150,215,194, 68, 18,105,111, 89,223, 83,167, 78, 69, 54,144, 16, 95, 57,125, 95,127,253,245,155, 53, 53, 53, 1, 0,198, -193,176, 9,103, 8,128, 83, 48,108, 10, 5, 0, 27,148, 74,229,111, 2,245, 55, 39,127,166,205, 84, 9,104,162, 0, 20, 23, 23, -147,226,226, 98, 0, 64, 96, 96, 32,140, 55,155, 1,208,228,189,185,207, 45,161,180,180, 84,149,153,153,201,218, 19, 96,186,215, -189, 53, 18,166, 26, 74, 97,154,146, 40, 87, 23,123, 70, 70,134,205, 99,114,115,115, 89,145,127, 98, 98,162, 69,210, 95,176, 96, - 1,210,211,211, 97,172, 32,176, 65,241,156,149,240, 0, 0, 12,251, 73, 68, 65, 84,167,110, 93,112,163,172, 2,155,103, 77, 65, - 59,106, 4,138,214,204, 67,224,164, 64,236,105,101,242, 7,208, 72,248, 0, 16, 22, 22,214,164,157,241, 12, 24,183, 59,218,178, -183, 70,196,204,120, 88, 34,253,117,235,214, 33, 61, 61, 29, 49, 35,250, 99,215,207, 39, 1,247, 54, 64,101,245, 3,239,195,157, -187, 78,184, 2, 25,216,185,235,132, 67,228, 77,172, 92,104,245,217,204,106,251, 33,171, 7,196,216,245,159,148,148,131,248,248, -160,198,255, 12,226,227,131, 88, 43, 1,107,254,183, 6, 75, 62,251, 0, 35,187, 71, 66, 95, 87, 7,157, 94, 7, 74, 66, 1, 16, -131,128,198,237, 63, 74, 16,210,190, 23, 22,206, 90,136, 15,150,125,160,122, 34,204,182, 55,203,116,178, 27,239,191,206, 44,225, -239,221,187,151,240, 81, 2,178,178,178,200,206,183,119, 33,246,125, 56,132,180,179,178,178,200,178,101,203, 48,127,254,252,135, - 90, 9, 56,117,234, 84,100, 69, 69,133,170,164,164, 4,225,225,225,118,157,103, 69, 69,133,234,254,148,205,235, 57, 47, 6, 48, - 3,192, 73, 0, 95, 3, 24, 11,224, 73, 0,127, 55, 82, 0,238,252, 73,249,156,130,149,109,192,173, 26, 82, 41, 6,142,201, 72, - 95, 96,246,243, 38, 10, 64, 96, 96, 32, 21, 24, 24,216, 72,246,198,174,228,204,204,204, 38,239, 77, 63,191,116,233,146,197, 19, -100,148,138,228,228,100, 85, 74, 74, 10, 76, 55,202, 49,221, 60, 39, 51, 51,211,162, 11,214,220,100,111,218,214,154, 27, 21, 1, -192,198,141, 27, 45, 18, 63,128, 38,228,191, 96,193, 2, 86, 50,127, 47,190,134,154, 45,239,192,237,133, 79,208,169, 91, 23,116, -104,231,130,226, 45,197, 6,242,247,108,107, 88, 2,112, 18,115, 62,215,248,248,120,185,241, 50, 64,124,124, 60,103, 47, 13, 77, -128,128, 54,192,191,159, 5, 94, 90, 7,180,119, 5,206,151,155,111, 47, 40,227,120,231, 91, 80,228,184,120,109,222,123,239, 61, -139,196, 15, 0,203,102,196, 97,213,238, 35,240, 11,236,136, 91, 87,111,219,180,254, 1,128,141, 23,128,139, 27,223, 96,225, 43, -204, 90,250,204,218, 62,215,251,122,217,127, 45,247, 81,143, 89,224,113,175, 4, 53,249,175,141, 15,134,116, 91, 33,235,239,215, -170,107, 49, 98,218,112,213,208,142, 67, 80, 87, 83, 3,137,179, 51, 36,146,251, 83, 80,113, 97, 33,182,102,103,223,120, 97,230, -140, 78, 93,157, 3,208,127,116,120,212, 47, 57,191, 68, 14, 25, 56,132,147,213,152,182,115, 6,246,237,219,135,167,158,106,218, - 62,102,204, 24,138,171, 18,192,144, 63,186,126,140,157,111,191,102,183, 18,144,149,149, 69, 86,174, 92,137, 30, 61,122, 96,213, -170, 85,152, 51,103,206, 67,167, 4, 24, 19,191,163,228, 49,178,236,240, 38,200, 1,140, 6,176,142, 16, 82, 77, 81,148, 31,128, - 11, 0,174, 42,149, 74, 29,254,220, 32, 28,251,187, 9,249, 51,175, 51,210, 23, 52,243, 2, 60,144, 58, 0,153,153,153,204,218, - 43,138,139,139,225,235,235,219, 76, 65, 96,218, 74, 75, 75, 89,213,185,183, 21, 12,200,101,194,156, 58,117,106,203,169,110, 70, - 4,102,206,234, 79, 79, 79,135, 82,169,164,108, 69,113,170,113, 13,213,147,134,128,184,207, 3,162,222, 70, 53,254, 7,252,199, - 96, 45,146,204,121,112,250,219, 42,232,116,220, 11,157,197,197,197,229,177,216,118,213,186,135,231, 43, 96,241,106,160, 75,103, -224,246,118, 41,214,127,169,197,140,239, 44,183,115,186,243,137, 99, 43, 85, 27, 7,251,221,204, 90, 10,247, 80, 25,220,186,255, - 19, 27,151,190,132,126, 97,126,232, 25,247, 1,171,241, 96,115,127,178, 93, 42, 96,238, 93, 99,242, 87, 42,149, 20, 19,248,199, -139,104,218,126, 72,241, 33,121,115,208,198, 7,155,109,207, 49,241, 4,216,194,205,210,155, 24,151, 56, 14,238,109,189,160,167, -116, 56,176,111, 63,170,170,171, 17,159,144,128, 63, 74, 75,241,195,166,205,120,113,230,140, 78,206, 50,103,136,136, 19,162, 35, -162,115, 47,168, 86,241,178, 26,203,202,202,236,190,110, 99,242, 7, 96,183, 18,144,149,149, 69, 22, 45, 90,132,224, 96, 67,127, - 6, 5, 5,225, 97,242, 4, 56,154,248,205, 88,255,204,107, 62,215,218,187,129, 8,157, 40,138,114, 5, 16, 10,224, 28,128, 78, - 10,133,162, 18, 64,185, 82,169, 20,202,218,115,196, 3, 43, 4,228,235,235, 43, 79, 76, 76,108,182, 20,112,228,200, 17, 85,195, -102, 47,156, 99, 4, 44, 5, 3, 90,179, 28, 45, 41, 40, 45, 1,198,186,183,228,238,103,107,253, 3,192,238, 55, 23, 33,126,201, - 71,208, 69,141,128, 4,128,219,225, 66,236, 41,186, 11, 0,208, 69,205, 65,253,175, 62,160,218,255,157, 51, 73,177,245,178, 88, -195,221,137,255,195,156,153,215,113,113,214,124,212,252,164,133,159,143,245,118, 71,120, 0,248, 40, 7,235,214,173, 51,104,195, -241,163,112,164,164, 20,238,253,220,113, 35,167, 8,144, 57, 99,202,156,191,193,187,115, 92,171, 61,136,150,162,254, 29,229,213, -178,150, 33, 96, 43, 59, 32, 39, 41, 7,209, 25,209,152,178, 9, 72,202, 49,188,206, 73,202,225,236, 5,168,214, 84,193,199,165, - 29,116,154, 90, 16, 17,193,160,193,131,177,101,203, 22,205,202,143, 62,146,209,132, 96,250,179,211,225,221,206, 27,181,213,213, -208,233,117,112,119,106,139,122, 81, 61,175,235, 45, 47, 47,111,146, 29,192, 53, 32,176, 25,249, 51,224,169, 4,100,101,101,145, -148,148, 20, 12, 30, 60,184, 73,123, 88, 88, 24,210,210,210,144,154,154,218,106, 74, 64, 75, 17,191,169,245, 15, 0, 37, 37, 37, -124,189, 0,191,192,176,222, 95, 9,131,235,127, 28,128, 75, 0,250, 2,200, 6,176, 22, 13, 59,117, 90,155, 78,192,211,149,254, -151, 80, 0, 76, 9,129,217,115,158,205,231,214,162,166, 25, 48,203, 11, 76, 64, 32, 19, 27,192,120, 7, 2, 3, 3, 85,204,114, - 65,107, 77,188,142,132,173,181,126,198,250,103, 35,107,242,234, 77, 32, 9,221,112,123, 88, 4,218, 97, 4, 92,166,172,130,238, -230, 31,128,103, 91, 72,238,254, 15,219, 87,230, 3, 98, 49,231,107,231,147, 5, 97,138,211,175,255, 31, 6,134, 3,129,115,206, - 34,212,109, 38, 46, 60,150, 8,252,123,190,197,246,214,242, 0,164,167,167, 99,228,160,158,136, 26,209, 3,241,125,230, 99,197, -202, 47,112, 46,255, 6,102,141, 25,136, 91,217, 59, 81, 81, 86,233,144,251,193,220, 82,129,173,231,195,154,181,239,168,123,212, -146,124,107,129,131,169,169,169, 84, 90, 90, 26,153,178,169,169, 66, 0, 0,209, 25,209,144,110, 43,196,182,109, 69,141,153, 0, - 76,192,160,183,183,183,217,249,151,166,105,232,105,128,208, 58, 56,187,200,240,236,115,207,201, 22,191,251, 46, 58,116,232, 64, -119,242,243, 19,105,106,170,161, 39, 0,161,245,160,105,219, 30,173,225,195,135, 83, 63,252,240, 3,185,123,247, 46, 42, 43, 43, -155, 40,142,198,217, 1, 92,178, 2,178,178,178,200,138,151, 10, 0, 89, 48,112,235,179,230, 7,200,130,177,226,165, 2, 36,255, -135,157, 18,144,149,149, 69, 38, 76,152, 32, 15, 11, 11, 83,221,189,123,183,217,231, 1, 1, 1,152, 48, 97,130,252, 81, 10, 12, -228, 99,253,219,227, 5, 80, 42,149,121, 70,207, 87, 71, 0,167, 1, 76, 82, 42,149, 92,182, 50, 21,200,223,154, 2, 96, 82,232, -199, 86, 33,160, 38,159, 91,115,153, 38, 38, 38,154,245, 2, 48,100,239,235,235, 43, 79, 73, 73, 81, 49,107,178,137,137,137, 86, -211, 0,173, 89,135, 92,131,255, 90, 42, 13,144,177,238,173, 5, 3,114, 65,209,191,146,224, 52,101, 21,212, 37, 23, 33, 57,188, - 10,245,155,230,128,138, 93,142,173,127,127, 10, 87,183, 94, 70,252,178,175, 1, 73,235, 84,118,158,159, 9,228, 44,219,130,208, -171,209,192,157, 26,188, 49,118,190,213,118, 71,120, 0,248, 90,255,217, 91, 22, 65,220,169, 55,220,208, 3,215,246,101,160,138, - 34, 56,122,241, 58,162,206,222, 96, 57,238,215, 26,223, 79,157,170,108, 66,246, 0,240,211, 79, 49,102,143,179,246,124,216,114, -245, 59, 34,237,208, 17, 25, 2, 73, 57,247,137, 31, 64, 51,203,159, 9, 24,220,182,173,200,236,247,221, 93,220, 81, 82, 81,130, -193, 93,135, 64, 93,167, 1,212, 26,232,180,245, 88,152,146, 2, 74, 4, 81,109, 77, 53,104, 90, 15,157,158,192, 89,226,132, 63, -170,255,128,147,222,118,182,241, 83, 79, 61,213,216, 55,135, 14, 29, 34,204,124, 99,156, 29,112,243,230, 77,214,215, 57,113,226, - 68, 42,249, 63, 32, 43, 94, 42, 64, 72,183,230,191,127,254,178, 22,201,255, 9, 5, 91,178,158, 56,113, 34,149,149,149, 69, 6, - 15, 30,140,128,128,128,102,159,159, 61,123, 22,217,217,217,170,214, 34,255, 6,107,156,106,201,181,127, 99,216,225, 5, 96, 48, - 14,134,224,239, 58,129,194, 29,168, 0,180, 20, 24,203, 31, 0,134, 14, 29, 42,207,204,204, 84, 49,174,127, 11,202,129,252,210, -165, 75, 42,174, 36,204,119,146,116,116, 26,160,177,245,111,142,248, 25, 69,135,203,249,158, 46,186,139,250, 95, 23,227, 54,126, -134, 95,236,114,160,162, 18, 69, 25,243, 16, 52,251, 99,220, 90, 59, 15,112,146, 0,162,214,169,236,124,173, 6, 8,241,157,196, -186,189, 53, 60, 0,233,233,233,213,211,162,134,220,244,160,189,186,212,194, 73,182,233,227, 57,248,124,251, 41,188,241,228,227, -152,241,209,127,241,212,135,223,180, 74,240, 40,163,128, 54,212, 1,160,236, 85, 78,237,113,245, 91,243, 2, 36, 53, 88,246,166, -228,111,108,253,219,130,191,175, 63,118, 31,200,193,240, 46,195,225,218,198, 13, 52, 77, 32, 34, 58,208, 20, 5, 66, 8,244, 4, -208,209, 4, 58,157, 14,234,138, 26,236, 56,182, 3, 82,189,148,115, 80,170,105, 86, 64,234,156, 17, 24,239, 95,140,140, 99,236, -101, 88, 82, 2,184,146,191,177,188,212,212, 84,178,108,217, 50,116,236,216,241,190, 98, 95, 84,132,244,244,116, 60, 12,150,191, -163, 21, 1,115,214,191, 61, 94,128,134,103, 34, 18,192, 99, 0,222,250, 11, 4,255, 1,128, 24,128,254,145, 86, 0, 76,163,254, - 19, 19, 19, 27,215,221,141,149, 3,227,215,246, 88,240,124, 38,114, 71,165, 1, 90,178,254,249, 18, 63,131,201, 75,215, 98, 51, -128, 39,151,140, 7,201,156, 7,106,234, 10,156, 46,186, 11,202,219, 11,133,191, 87, 26,172,127,177,184, 85,238, 80, 75,249,254, -246,212, 1, 96,163,112,177, 85, 14,214,173, 91,167, 5, 80,245, 82,100,223,202,127, 46,255, 68,251,230,194, 20, 77,251,182,190, -119, 11,206, 93,235, 48,227,220,127,221, 90, 59,107,196, 18, 57, 27, 47,209,112,207, 40, 48,247, 27,246,121, 0,204,145, 63, 99, -249, 3,176, 25, 16, 40,147,201,168,115, 91,207, 39,168, 70,228,101, 39,246,121, 10,149,154, 74, 80, 34,192, 80, 82,132,134, 94, - 79, 64,235,116,104,227,236,142, 67, 21, 39,113,233,112, 33,198, 70,140,205,179,187,115,139, 94, 6,192, 61, 13,176,137, 18,208, -241, 26,206,223, 12,224, 69,254,198,242,230,207,159, 79, 86,173, 90, 5, 79, 79, 79,220,189,123, 23,139, 22, 45,194,195,230,246, -119,132, 34, 96,201,250,231,227, 5, 80, 40, 20, 29, 0,248, 53,220, 40,253, 1, 36, 3, 40,250,139, 24,233,250,150, 20,254, 64, -234, 0, 88,242, 8,172, 88,177, 66,110,170, 40, 36, 38, 38,170,184,202, 51, 38,130,135,161,196,174,177,245,111,154,254, 87, 92, - 92,220,164,223,184, 84,237, 99,148,128, 73, 75,190, 2,217, 4,248,204, 80, 34,239,159, 79,225,241,244, 13,128,147, 19,218,200, -164,173,114,189,198, 57,254,230, 94,243,172, 3,160, 3, 32,106, 24, 91,145,157,227,113,123, 90,212,144,146,127,102,108,235,182, -240,197,113,109,253,253, 34,181, 0,206, 36, 38, 38,122, 0,112,227, 59, 30,247, 73, 58,134, 60,241,196, 46, 35,247, 63,183,239, - 91,179,224,141,203, 3,179, 85, 36, 90,162, 24,144, 37,152,146, 62,227, 17,176,180,228,241,252,212,231,183,110,251,239, 54,232, -167,233,206,140,238, 50,186,111, 59,247,118,208,212,107, 64, 8,129, 84, 34, 69,185,186, 22, 71,126,255, 9,235,190, 93, 15,121, -111,185, 67, 10,135,165,237,156,129,245,235,215, 99,222, 60,238, 53, 0,238, 43, 1,176,139,252,141,229,205,153, 51,135,169, 3, -128,135,121,205,223, 88, 17,224,243, 93,123,107, 7, 24, 63, 6, 48,228,251,107, 0,188, 14,224,152, 82,169,212, 67,128,165,190, -199,169, 83,167,144,145,190,160, 89, 29, 0,171,133,128, 90,170, 14,128, 57,143,128, 37,162,231,227, 5,176, 23, 45,149, 6,200, - 40, 35, 74,165, 18,185,185,185,116,113,113,177, 49,145,201,163,162,162, 56, 91, 55,147,151,174, 5,140, 10,255,140, 94,184,186, -241,117, 77, 43,220,108, 45,101, 61, 83, 20,181, 18,192, 61, 24,210,127,158,181, 83,220,173,151, 34,251,214,141,205,253,165,237, -244,119,191,134, 82,169,148,230,230,230,118, 68,211,114,214,188,198,163,165, 61, 1,182,234,251,219, 66, 75, 44, 9, 88, 34,127, -109,124, 48,176,205,182, 97, 38,239, 59,134,218,247,195, 1,114, 56,224, 8, 70, 12, 25,129, 78,238,157, 0,154,224, 15,205, 93, - 28, 58,113, 8,183, 10,110, 97, 76,200, 24,185,179,179,115,171,143,135,177, 18,224, 40,178,102, 60, 1,143, 74,192,159,189, 85, - 0, 29, 48,199,100, 0,200,128, 0,206,176, 84, 0,200,172, 2,208, 82, 72, 78, 78, 54, 75,246,198, 59,177,153, 64,197, 38,171, -192, 81, 86,127, 75,164, 1, 54, 68,248,235,114,115,115, 37, 13, 75, 7, 12,249,143,137,138,138,226,228,229,104,216, 76, 73,229, -232,115,180,180,198,236,232, 90,247, 28,225, 12, 64,162, 84, 42,223, 54,114,129, 61,103,175,204,177,111,173,201, 87, 42,149,163, -114,115,115,145,155,155,171, 1, 32,107,248,179,155,248, 25, 47, 0,223, 62,179, 69,242, 19, 38, 42,154, 28,199,149,184, 29,177, - 36,144,154,154, 74,165, 37,165, 17,255, 57,254,114,116, 53,127, 76, 73, 82,142,138,109, 60,192,224,208,193, 84,109,109,109,228, -218, 37,107, 17, 16,252,152, 10, 0, 46,156,253, 77, 30, 55, 54, 30, 33,225, 33,188,199, 99,248,240,225,212,166, 77,155,154,101, - 5,212,215,215,219,117, 3, 57,154,172,255,108,209,254, 15, 1,132, 20, 63, 51, 94, 0,211, 54,214, 10,128, 45, 75,156,173,165, -206,119, 82,100, 91,136,197, 94,162,114, 52,209, 49,242,114,115,115, 73,110,110,174,196,184,191, 2, 3, 3,121,253, 86, 3, 65, - 57,124,194,120, 24,214,190,205,192, 29, 64,181,161, 32, 63, 69, 1,112,129,237,252, 94, 54,227,113, 37, 55, 55,151,201, 43,171, - 12, 12, 12,108, 31, 24, 24,232,252, 48,244,165,189,150,184, 45,217,142, 90, 18,176, 73,238,169,220,238, 81, 87, 87,215,188,169, - 19,166, 49,147, 55,134,134, 14,117,200,121, 78,153, 50, 69, 32,215, 63, 63,217, 27,115, 88,189,131,201, 95, 6,195,114,195, 35, -175, 4,216,236,200,240,240,112, 65,107, 18, 32, 64,128, 0, 1, 2,254, 98, 16, 9, 93, 32, 64,128, 0, 1, 2, 4, 8, 10,128, - 0, 1, 2, 4, 8, 16, 32,224, 47,128,255, 7,201, 67, 6,106,228, 94,183, 75, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, -}; +137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 0, 0, 0, 1, 0, 8, 6, 0, 0, 0,197,144, +206,103, 0, 0, 0, 1,115, 82, 71, 66, 0,174,206, 28,233, 0, 0, 0, 6, 98, 75, 71, 68, 0,255, 0,255, 0,255,160,189,167, +147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 11, 19, 0, 0, 11, 19, 1, 0,154,156, 24, 0, 0, 0, 7,116, 73, 77, 69, 7,216, + 5, 19, 11, 8, 1, 11,126, 22,156, 0, 0, 32, 0, 73, 68, 65, 84,120,218,236,125,121, 92, 84,229,254,255,251, 57,179,179,239, +168,184,128,138,251,130,224, 26,106, 80,168,201,215, 52, 21, 48,179,237,214,189, 78,150,173,150,102,117,111,245,203, 43,106,218, +170,233,216,162, 89,106, 9,106,120,115, 5, 29,212,144,220, 21, 75, 19, 5, 17, 65,144,109, 96,134,217,207,156,231,247,199,204, +208,128,192, 44,160, 81,205,251,197,188,152,115,230,204,123,158,115,158,229,253,249,124,158,141, 68, 69, 69, 81,184,225,134, 27, +110,184,225,134, 27,127, 43, 48,238, 71,224,134, 27,110,184,225,134, 27,127, 31,156, 57,155, 5, 0, 32,238, 8,128, 27,110,184, +225,134, 27,110,184, 35, 0,110,184,225,134, 27,110,184,225,134,219, 0,112,195, 13, 55,220,112,195, 13, 55,220, 6,128, 27,110, +184,225,134, 27,110,184,241,151, 0,223,246, 96,222,188,121,196, 85,162,181,107,215,222, 54,150,192,205,231,230,107, 5,116,237, +218,181,127, 88,250,178,179,179,105, 92, 92, 28,113,231,199,159,151,239,220,185,115, 46, 23,190,168,168, 40,184,243,195,205,247, + 87,230,115,218, 0,248, 59, 67, 42,149, 54,122,128, 50,153,140,116,228,116,174, 91,183, 14,132, 16,226,206, 57,215,242,120,246, +236,217, 72, 79, 79,111, 56, 78, 74, 74,250, 75, 60,203, 61,123,207,180,218, 16, 36, 78,142,254, 75,151, 25,137,255, 78,136,117, +189, 17, 1, 3,234,177, 23,249,218,183, 58,108, 89,236,168,109,140, 27,127,211, 8,192,221, 40,172,123,246,236,137,203,200,200, +144, 91,143,167, 77,155, 22,159,152,152,152,221, 17, 30, 6,165,230,182,179,163,234,170, 84, 42,165, 69, 69, 69, 0,128,240,240, +112, 0,248, 83, 52, 34, 77,141, 43,139,129,213,162,103,238, 40,239,214,173, 91, 29, 54,212,164, 82, 41,221,182,109, 91,195,241, +206,157, 59, 49, 97,194,132,134,227,244,244,116,250, 71, 25, 1, 49, 49, 49, 20, 0, 78,159, 62, 77,218,227,186,140, 31,100,173, + 24, 0,178, 54,231, 95, 88, 68, 55, 0,192, 45,157, 14,172, 86,111, 62, 89,171, 4, 0, 36, 39, 39, 35, 33, 33,161,197,244,173, + 79, 88, 79, 35,203, 34,157,250,253,248, 95,227, 29,200, 23, 9,252,159,189, 0, 93,198, 78, 40, 20,211,161, 0, 16, 45,121, 31, +111, 73, 78,163,155, 24,168,212, 21,224, 45,109,138, 83,191,155,149,149, 21,151,150,150, 38,183, 61,151,156,156, 28,159,144,144, +144,221,145,234, 86,123,181, 1,127,134,251,189, 19,120,231,141, 23,136,151,192,151,232,197, 66,170,175,213, 50,245, 90, 37,247, +193, 39,171,255, 22,179,227,236, 26, 0,123,246,236,137,179,254,111,171, 80, 91, 27,146,119,183, 45,129, 87, 55, 95,212,223,168, +195,219, 41,111,201, 51, 50, 50,224,182,134,237, 67, 38,147,145,240,240,112, 90, 84, 84,132,162,162, 34,236,219,183,175,195,122, + 18,214,188,150,201,100, 68, 38,147, 9,164, 82,169,113,197,138, 21, 39, 1, 96,225,194,133, 35, 90,251,238,244,233,211, 27,222, +179,172, 9, 6,163, 30, 6,189, 1, 6,131,249,197,178, 44, 22, 46, 92,232, 84, 90,108,197,191, 57, 76,152, 48,225, 15, 53, 2, + 28, 49,126, 98, 98, 98,236,114, 36, 78,142, 38,174,136,188,195,240,243, 65, 94,225,119,144,160, 43, 76,200, 65,197, 23,103,112, +190,160, 26, 51,150,109,112,232,235,145,101,145, 14, 10,186, 25,242,129,114,187, 13,177, 36,241, 45, 4, 76,123, 26,165, 47, 69, + 3, 90, 69,195,249, 51,218,215,112, 6, 0,180,192,120, 73, 50, 14,250,159,134, 31,128, 24, 69,140,195,229,183, 41,210,210,210, +228,105,105,105, 29,162,189,178,166,177, 61,218,128, 63,195,253,182, 55, 54,173, 89, 75, 30, 13,139,224,191,144,244, 56, 47,164, +127, 24,195, 39, 33, 68, 83, 87,199,137, 17,106, 98,186,116, 53,233,110, 94, 51, 57,248,236,110, 58,209,134,119,113,128,111,129, + 19,124,171,238,168, 1,144,145,145, 33,223,246,239, 55,144,242,222, 82,121, 98, 98, 34,105, 75, 1,179, 10, 63, 0, 84,105,170, +129, 64, 96,241,193,119,160, 44, 84, 64,250,175,142, 37,100, 45, 85,136, 63, 58,141,182, 70,192, 3, 15, 60,128,162,162, 34,132, +135,135,119,184,103, 39,151,155, 29,137,248,248,120, 42,147,201, 24,153, 76, 22, 38,149, 74, 75, 87,172, 88,113,218, 81, 30,150, +101, 97, 48, 24, 27,132,223, 86,252, 79,157, 58,133,225,195,135, 59,149,174,148,148,223, 61,192,217,179,103, 35, 51, 51,179,145, + 1,208, 30,101,197,149,124, 56,125,250, 52,201,206,206,166, 19, 39, 78,188,237,179, 3, 7, 14, 96,235,214,173, 13,199,173,141, + 91,184,205,120,111,199,238,128,176,136,110, 40, 85,212, 97,199, 51, 51, 17, 72, 98, 81,240,249,171,232, 57,189, 39, 50,157, 16, +127, 43,230,206,157, 75, 1, 96,253,250,245,109, 46,179, 97,219,114,160,185, 94,143, 82,105, 68,171,215, 93, 16,103,225,221,193, +183,144,122,225,205, 54,229,103,123,136,110,123,114,180, 71, 36,224, 78,223,111,123, 33, 39, 39,199, 3,192, 61, 0,188,108, 78, +215, 2,200,139,141,141,173,113,148, 71,203,105, 25, 67,149, 94, 48,121,234,116,177, 2, 70,177, 64,192,231, 43,117, 98, 70, 40, +212,114, 60, 31, 79,214, 32, 49, 26,249,229, 55,245, 98,158, 72,167, 51,233, 77, 82,169,148, 52, 55,102,196, 22,181,181,181,255, +181,190,207,207,207,175,242,244,244,100,212,106, 53,103,123,205,200,145, 35, 63,116, 52,141,148, 82,187,194, 78, 8, 89,208,214, +103,202,183,231,253,247,233,211, 7,145, 94, 62,104, 75, 20,192, 86,252,171, 52,213, 72,189,255,157,134,207,254,145,241, 44, 16, + 2, 76, 95,145,226, 84, 33,107, 73,160,219, 75,164,111,220,184, 1, 0,232,214,173, 91,163,247,214,223,181, 87, 32,238,100,136, +207,214, 8, 48, 26, 89,172, 91,183,238,142,121, 1,206,114, 54, 17,127,219,239,223,148,201,100,254, 82,169, 84,225,176,248, 27, +141, 48, 24,244,208, 27, 12, 48, 54, 17,127,202, 57, 23,161, 75, 73, 73,193,169, 83,167, 26,142, 87,173, 90,133,164,164,164,134, +227,244,244,244, 54, 27, 59, 54, 6, 79,155,203,159,173,240,207,158, 61, 27,195,134, 13,115,137,167,189,186, 3, 74, 10,139,161, +222,249, 31,120, 61,245, 49,194, 34,186, 33, 52, 80,130,194,157,133,102,241,247,243, 49,119, 1, 8,120, 14,113,181,135,240, 3, + 64,159,139, 87,113,227,237, 37,208,166,109,108, 61, 66, 32,145, 64,167,211,161,160,160, 0, 21,186,203,232,131,176, 22,175,205, +202,202,138,107,173,236,203,100, 50, 98,173, 39, 89, 89, 89,113,206,132,199,109,163, 98,214,250,106,123,206, 89, 71,160, 37,225, +118,166, 45,104,238,126, 51, 51, 51, 41, 33, 4, 9, 9, 9,164, 45,247,107,197,211, 79, 63, 77,191,252,242,203, 54,229,121, 78, + 78,142, 47,128,233, 7, 15, 30,252, 15,199,113,122, 27, 17,228,243,120, 60, 79, 0,255,140,141,141,221, 99,143, 39,191, 48,159, + 47, 17,138,197, 2,129,200,147,225, 19, 31,202, 19,121,112, 60, 30,159, 35, 12, 56,194, 55, 81, 30, 79,207,227,136, 78,205, 51, +105, 60,133, 2,194,235,213, 77, 39,158, 26,194,161,216,126, 26, 21, 10,133, 82,163,209,176, 0,160, 86,171,185, 55,222,120,163, + 65,240,151, 46, 93,250,114, 91,203,251,132, 9, 19,158,177,190,207,204,204, 92,215, 30,117,136,177,231,253, 47,153,149, 4, 93, +101, 37, 94, 29,216, 15,182,125,247, 14,123, 33,150, 46, 4, 91,241,159, 54,109, 90,188, 76, 38, 35,211,166, 77,139,223, 48,237, + 51,115,100,177,111, 80,163,235, 29,193,194, 53,249, 88,184, 38, 31,207,173,188,132, 39,222,251, 5, 51, 22,159,107,243, 3, 41, + 41, 41,113,200, 48,184, 91,226, 95, 84, 84,212,162, 48,135,135,135,195,104, 48, 96,212,200,145,109,254, 29,107,152,124,219,182, +109,144,203,229, 13,175,214, 12,173,150,196, 48, 62, 62,190,169,248, 55, 24,202,142, 52, 76, 44,107, 50,123,254,122,115,232,191, +169,248,155, 76, 38,168,181,106,167,238,209, 26, 49,104, 26, 53, 72, 79, 79, 71,122,122,122, 35, 99,192,169,251,205,110,220, 30, +202,179,179,157,122,102,173,137,255,236,217,179,177, 98,197,138, 6,241, 23,240, 5, 78,241, 36, 78,142, 38,150, 46,152,102, 95, +206,112,105, 81,140,250,233,163, 64,211, 94, 69, 73, 97, 49,232,244,254,191,123, 43,105,175,130,223, 57, 24,240,243,187,171, 30, +161,186,170, 0,218,180,141,160,148,226,194,133, 11, 24, 63,126, 60, 36, 18, 73, 35,225,247,247,247,135, 86,171,133, 86,171, 69, +105,105, 41, 30,209,190,128, 47,252, 95,106,145,211,218, 7,222,218,243,177,126,214,180,191,220, 81,225,110, 47,103,197,250,221, +166,226,111,207, 65,106,237,126, 51, 51, 51,105,122,122, 58,210,210,210,144,149,149, 69,219,122,191, 79, 63,253, 52,229,243,249, +120,250,233,167, 93,174, 19, 57, 57, 57, 98, 0,255,202,202,202,122,227,189,247,222, 59, 78, 8, 9,183,190, 0,116, 13, 12, 12, +244, 56,116,232,208,218,156,156,156,241,173,241,152, 40,199,227, 17,129,200,192, 82, 31,189,222, 24, 98,226,184,174, 38,142,139, + 48, 17,210, 29, 60, 94, 32, 33,196, 15,132,231,195, 81, 4, 80, 3,231,167,212, 26, 61, 67,124, 88, 30, 51, 82,229, 80, 30,105, + 52, 26,182,169,215,223,209,193, 56,226,253,107,202,203, 48,121, 88,180,211, 2,109, 53, 34,222,221,182, 4, 0, 26,196,223, 26, + 69, 72, 76, 76,204,182, 26, 1, 37,202,155,136, 94, 56,218, 41, 35, 67,173, 53, 65,173, 53,161,172, 90,143,210, 74, 29,110,220, +210,185, 36,124,214,202, 98, 79,252,255, 40,180,100, 4, 0,128,206,160,135, 78,167,115,153,219, 42,218,214, 62,242,224,224, 96, + 91,111, 22,142, 54, 38, 77, 61,225,150, 66,137,142, 52,122, 6,163,222,236,249,235, 13, 48, 24, 27,139,191,209,104,132, 90,173, +134, 74,169,250, 67,243,196,108, 48,165,217, 6,228,172,127,216,182, 45,205,101, 35,192, 86,252,173,194,207, 48, 12,196, 98, 49, + 60,189, 60,218,148,230, 61,123,207,208,150, 94,246,190,187,111,241, 59, 8, 68, 44,216,132,231, 1, 0, 94,185, 87,113,190,160, +218,108,176, 37, 60, 15,227,133,119,129,170,106,167,210, 51,119,238, 92,106,237, 14,112, 5,158,168, 2, 0,108,220,184, 17, 25, + 25, 25,120,255,253,247,113,226,196, 9,232,245,122, 84, 84, 84, 88,189,178,134,235,195,194,194,160, 5,192,195,181, 63,164,188, +180, 84,238,155,122,243,174, 26, 20,205,117, 11, 56,203,103, 27, 9, 75, 75, 75,107,211, 61, 91,197, 31, 0, 92, 53, 2,114,114, +114, 58, 89,196,127,238,215, 95,127,125,241,173,183,222,122,104,203,150, 45,232,211,167, 15, 0,160, 71,143, 30,168,171,171, 19, +189,251,238,187,167, 15, 29, 58,244,109, 78, 78, 78,120,179, 68, 4, 0, 71, 9, 56, 86,108, 50,177, 1, 38,214,212,213,104, 50, +246,230, 49,164,139,144,207, 8,196, 2,158,150,239, 33,172,245,244,230, 41,121, 98,202,138,121, 60, 79, 62,107,240,185,118,230, +172,232,177,224,143,236,166, 59, 63, 63,191, 74,173, 86,115,205,133,249,135, 14, 29,122,217, 96, 48,180, 91, 89, 26, 58,116,104, +187,113,241, 91, 19,238,207,231, 62,253,187,216,150,220,192,171, 3,251, 97,101, 70,134,211, 99, 1,172,222,191, 85,244, 27,121, + 41,137,137,217, 25, 25, 25, 0,128,192,193,157,156, 74,124,189,214, 4,149,134,133, 82,205,162,174,158, 69,173,138,117,250, 1, + 52, 55,242,223,214,203,183,125, 95, 88, 88,136,218,218,218,187,214,104,172, 91,183, 14,225,225,225,176, 14,250,179,237,235,151, + 74,165,116,221,186,117,208,105,181, 46, 27, 0, 82,169,148,110,216,176, 1, 37,165,165, 16,240,120, 8,237,212,169,145,248,223, +127,255,253, 72, 73, 73,113,168,113,146,201,100, 36, 62, 62,190,145, 17,208, 52,146,225,232, 88, 5,131,222, 0,131, 94, 15,163, +209, 0,150, 53, 53,136,191, 94,175,135, 70,163, 65,125,125, 61, 84, 42,231, 13, 0,219, 46, 0, 43, 92,245,252,183,165,109, 3, + 40, 80,101, 17, 26,106, 46, 68, 32,148,154,141,128,180, 52,164, 36, 39, 59,221, 29,208, 84,252, 5, 2, 1, 68, 34, 17,196, 98, + 49,196, 98,177, 75,247,221,168, 94,183,208, 37, 96,175, 75,107,198,186,237,160, 83, 35,112,107, 76, 52, 2, 17, 11,201,204, 79, +193,150, 85, 2,126, 62,224, 87,111,197,143, 31,157, 6,120, 60,167,210,210,214,174, 0, 53,207,220,166,164,166,166,162,178,178, + 18,107,215,174,197,208,161, 67,241,222,123,239, 33, 58, 58, 26, 90,173,182,169,135,102, 53,169,239,170,240, 59, 42,208,174,118, + 7,180,100, 72,184,194,147,156,156,220, 32,252,174,212,141,230,196,191, 65,108,248,124,176, 44,235,108,119,128,119, 94, 94,222, + 39,243,230,205, 59, 50,120,240, 96, 31, 0,120,231,157,119,144,159,159, 15, 0, 24, 61,122, 52,118,236,216,129,177, 99,199,122, + 62,242,200, 35, 5,217,217,217, 89, 60, 30,239,145,219, 27,122, 32, 32, 48,128, 43, 44, 44, 96,179,229, 7,247,246,238, 29,153, + 29,209, 35,252, 34,207, 91, 82,193, 35, 66, 53, 35, 18,104, 24,177,135,202,192,231, 25, 64,141, 60, 78,108,244, 86,149, 86,123, +157, 56,116,110,100,144,127,232, 14,187,198,168, 77,159,255,206,157, 59,159,152, 62,125,250,215,214,176,191, 82,169,100,132, 66, + 97,155,203, 82,123,133,253,237, 70, 0,172, 94,254,240, 94,145,208, 85, 86, 66, 93, 98, 22,193,241, 22,239,208,217, 40, 64,225, + 47, 87,111,227,110,238,184,250, 66,185, 83,137,111,171,248,219, 10, 63,165, 20,221,186,117,107,244,153,209,104,108,120,213,214, +214, 66,173, 86,163,166,166,230,174, 53, 30,214,121,254,251,246,237,107, 20, 9,176,138,255,144, 33, 67,160,211,105, 27, 26, 58, +106,181,102, 28,108,152,214,124,182, 6, 70,163, 17, 93,195,194, 96, 52,153,154, 21,127,103, 26, 18,139, 17,112,155, 87, 98,157, +186,216, 90, 36,227, 54, 3,192, 96,108, 16,255,147, 39, 78, 66,163,213, 66,165, 82,161,174,174, 14,181,181,181,141, 60, 59,103, + 97,237, 6,112,181,223, 31, 0,170,171,170, 81, 93, 93,133,170,234, 26, 84, 85, 87,163,186,186, 26,213, 85,102,143,180, 95,255, +254,168,177,188,119,214,251, 7,128, 97,195,134,253,238,245,123,122,194,203,203, 27,222, 94,222, 80,169, 84,241,109, 41, 79,173, +117, 9,216,251,110,193,251,115, 33,152,249, 41, 2, 17, 11,126,238,167, 48,110,127, 30,240,243,193,174,103,147,112,125,215, 53, + 60,184, 98, 19,192,191,203,203,138,232,174, 67, 18, 38,129, 90,173,134, 78,167,131, 70,163, 65,110,110, 46,150, 45, 91,214,236, +229, 30, 30,214, 8,202, 85,167,197,219, 85,175,218,246,249, 54,125,222, 45, 29,183,197,200,104,174, 91,192, 25,158,132,132, 4, +146,156,156,140,164,164, 36, 76,152, 48,193,229,200,196,151, 95,126, 73, 88,182,113,155,204,178, 44,156, 29, 11, 16, 27, 27,123, + 37, 57, 57,121,232,150, 45, 91,198, 31, 61,122,212, 59, 33, 33,225,132, 85,252, 45,142, 42, 68, 34, 17,189,126,253,186, 96,239, +222,189,125,253,253,253, 79,198,198,198, 22, 52,199, 85, 87, 91,199, 69, 70,244, 81,141, 30, 61, 58,233,226,197, 95,239, 83,170, + 85,157, 40,107,100,193,192,200,234, 25,189, 94,175,215, 42, 81,174,228,244, 58, 85,105,113, 57,251,227,238, 61,203,131, 2,131, + 43, 12, 6,141, 93,247,189, 57,239, 95,161, 80,240, 1,192,199,199,167,195,118, 11, 48, 45,121,255,219,254,253,134,217,106, 46, + 47,107,244,153,179, 99, 1,166, 77,155, 22,191,230, 95, 31, 3, 48, 15,248,203,200,200,144,219, 78, 45,204,200,200,144, 79,248, +230, 33, 0,192,153, 21, 63, 99,218,180,105,241,119,235,230,109, 43, 73, 73, 73, 73,131,183,111, 21,125,155,204,133, 74,165,130, + 78,167,179,105, 68,238, 94, 26,159,121,198, 60,246,195,200,178,184,120,241, 34,206,158, 57,131,161, 67,134, 66,167,211, 65,171, +213, 65,167,213,226,219,111,190,129,245, 58, 71, 42,250,170, 85,171, 48,160,255, 0, 24,141, 70, 92,185,114, 5,172,209,128,210, +146,210,118,125,166,214, 99,203,154, 5, 8, 15, 15,119,168, 97, 50, 24,245, 96, 77,230,176,255,241,227, 63, 67,173, 85,163, 94, +165, 68, 93, 93, 29, 20,181,181, 80, 40,106,218,100,136, 89, 35, 1,109,241,112,142, 28, 57, 2,149, 74, 5,149, 74,105,249,175, + 66, 80, 96, 32,250,245,239,143,223, 46, 93,194,225, 35, 71,156,230,180,122,255,124,190, 0, 30, 30, 30,240,242,242,130,183,151, + 23,188,188, 60, 80,163,168,137, 7,144,125,167, 67,253, 45,225,124, 65, 53,140, 23,222, 69, 53,114, 64, 18, 87,130,196,254, 7, + 5,239,207,197,212, 21, 95, 67, 44, 96, 0, 1,223,252,114, 1,174,118, 5,148, 78,249, 12, 1, 91,167, 64,163,209, 32, 32, 32, + 0, 10,133, 2, 10,133, 2,199,142, 29, 67, 89, 89, 89, 67,152,184,225,250,210, 82, 60,235, 47, 65,144, 71,101,107, 30,112,188, +173,168,218, 14,146,179,190,183,126,102,189,214, 21,239,220,209,238, 1, 71,197,223, 85,207,191,185,251, 77, 72, 72, 32, 19, 38, + 76, 32,109,185,223,166, 70,128, 43,226,111, 69, 80, 80, 80,222, 67, 15, 61,244, 72,106,106,106,223,243,231,207,199, 74, 36, 18, +222,212,169, 83,137, 72, 36, 2,199,113, 36, 49, 49, 49,239,197, 23, 95, 28, 50,104,208,160, 93,255,252,231, 63,159, 48,153, 76, +213,173,196,188,185, 95, 47, 93, 57, 57,104,240,144, 71, 79,158, 56, 49, 99,215,238,255, 45, 61,117,226, 68,167,139,249,191,137, +175,148, 22,208,111, 63,254, 94,146,186,234,253, 1, 89,187,119,175,234,221,171,247,143, 94,161,158, 71, 98, 99, 99, 77,112, 48, +229, 9, 9, 9, 56,121,242,100,212,186,117,235,222,213,233,116,130,247,222,123,239,131, 93,187,118,205, 46, 45, 45,189,187,194, +209,214, 46,128,192,107, 69,168,177,132,254,109, 49, 62, 56, 24, 43,241,155,227, 94,135, 37,196,255,219,233,139,240,235, 27,132, + 9,223, 60,132,140,199,126,144, 91,195,254, 86,241,183,122,255,206,204, 50,216,145,218, 62, 35,241, 9, 33,184,116,233, 18,172, +133,181,105,152, 85, 32, 16, 64, 32, 16,160,178,178, 18,137,137,137,119, 61,147,172,163,254,215,173, 91,135,145, 35, 71, 66,167, +215, 67,171,211, 66,103, 25,220,164,213,153,187, 1, 86,175, 94,109,183, 49,145, 74,165,116,197,138, 21, 48,153, 76, 56,125,250, + 12, 4,124,115,216, 54, 50, 50, 18,215,138,138, 80, 90, 90,138,173, 91,191,195,236,217, 15,227,224,193,131,212, 54, 18,208, 90, + 3, 36,147,201,132, 0, 88,169, 84,202, 53,231, 1, 57, 51, 85,209,234,249,231,230,230, 66, 93,175,105, 48,192,148, 42, 37,148, +202, 58, 40,149,245, 46,135,194,173,222,191,101, 37, 64,151, 12,129,217,179,103, 55, 58,142, 8, 15, 71,191,254,230, 65,113,191, + 93,186,132,107,150,136, 71,211,235, 28,193,152,123,198, 64, 36, 20, 65, 34,145, 64, 44, 22, 67, 36, 18,161,188,188,220, 97,241, +183, 23,234,119,117,141,128, 25,203, 54, 96, 7,128, 7, 82,255, 15, 52,237, 85,144,148, 85, 56, 95, 80, 13, 18,224,143,171, 37, + 74,179,247,239,100, 23, 64,211,174, 0,167,167, 7,106,181, 0,175,160, 73,120,223, 44,244, 70,163, 17, 95,124,241, 5,198,143, +255,125, 92,216,193, 39,195,128, 10, 13,250,238, 81, 32, 42,184, 71, 75, 13,120,118,147,190,111, 57,208,208,252,203,155, 94,235, +138, 96,183,214,111,239,170,231,239,170, 33,113,167,239,215, 98, 4,180,121, 22, 64,120,120,248,214,177, 99,199, 6,159,203,203, + 75,209,106,181, 67,228,242, 67, 18,145, 88,196,103, 8,131, 67,135, 14,121, 15, 24, 48, 96, 83,114,114,242,127, 42, 43, 43,237, +122,235,179,103,205,228,126,220,251,227,225,161, 67,135, 45, 52,176,250, 7,174,230, 95, 89,202, 21, 21,176, 0,168, 24,140,113, +112,239,190,105, 33, 33,193,123,120,124,225,183,255,125,107,185,225,219,141, 27, 44,125,124, 45, 99,228,200,145, 31, 38, 36, 36, + 0, 0, 42, 43, 43,145,149,149,229,243,213, 87, 95, 45, 5,128,147, 39, 79,142, 28, 56,112,224,190, 63,133, 1, 96,245,206,239, +255,118, 75,235, 94,134, 19, 83, 2,173,214,111,244,194,209, 8, 28,220,169, 65,244,109, 67,255,103, 86,252,236,148,229,218, 94, +115, 82,173,105,235,223,191, 63, 46, 92,184,208, 72, 88,106,107,107, 11, 0,244,106,238, 59,174,174,189,220,214,116, 54, 61,255, +237, 55,223, 66,167,211, 65,111,208,195, 96, 48, 96,197,138, 21,176, 39,254, 86,112,156, 9, 98,137, 23,180, 90, 29, 46, 93,188, + 8,190, 64, 0,163,193, 0, 15, 79, 15,108,221,186, 21, 60, 30,207, 58,119,190,213,123, 93,177, 98,197, 62,169, 84,106,144,201, +100, 33,214,116, 54, 89, 7,192,169,208,230,194,133, 11,145,147,147,131,250,250,122,212,171,213, 80, 41,149, 22,241, 87, 66,165, + 84,161, 94, 85, 15,181, 77,131,239,200,179, 27, 62,124, 56, 61,117,234, 84,131,247,223,220, 52, 64, 71, 23, 1,138,139,139,187, + 45, 47,172,162,127,246,236,217, 6,111,222,209,123,142,137,137,161,214, 69,126,188, 60,188, 32,150,136,161, 82,169,226,109,250, +176,157,106,120,239,212, 98, 64, 86, 35, 96,122,234, 87,160,219,129,160, 39,101,200,126, 41, 9, 99,151,111, 6, 4, 2,120,138, +219,214,207,217,212, 16, 0, 0,121,142,189, 96,227, 45, 12,222,231,129,242,255,105,160, 88,242,251, 89,163,209,136,113,227,198, + 1, 0,194,252, 37,248, 73,214, 13,239, 47,187,129,207,206,104, 91,101,179,245,248, 1,243, 64, 56,107,195,222,116, 80,156,179, +211,226,108,199,239,180,213,243,111,174, 77,112,133,235, 78,222,175,173, 17,208, 30,229,111,224,192,129,159,168,148,170,189, 35, + 98,134,143, 84, 41,149, 1,172,137,213,135,134,134, 86,134,133,133,149, 43,149,202,243,149,149,149, 14, 55, 10, 83, 38, 79,225, + 0,108, 61,122,228, 68,110,236,216,177, 63, 72, 36, 18, 95, 2,202, 17, 66,192,113,180, 78,171, 86,200, 47,231, 21,171,190,221, +184,193,161,118,222,250,204, 0,243, 64,234,166, 3,245,150, 45, 91,246,159, 63,133, 1,144,152,152,152,221,150, 5,127, 28, 41, +172, 86, 67,192, 42,252,237, 41,232,109, 73,219,224,193,131,113,242,228, 73, 84, 86, 54,132, 8,123, 1, 64,117,181, 57,162,244, +216, 99,143,253,161,153,213,244, 25, 81, 74,233,163,143, 61,138,213,171,215, 88,250,204, 89,248,250,250, 18, 71,191,111,133, 68, + 34,182,242,153,189, 41,181,198,246, 59, 0,236,110, 54,209,127,197,138, 21, 87,164, 82,105,133, 76, 38,227,217, 14, 8,180, 76, + 11,116,184,161,179,206,125,143,141,141,109,247,103, 55,124,248,240,166,123, 1, 52,124,238,236, 10,128, 50,153,140,100,103,103, +211,173, 91,183, 54, 90,168,199,202,237, 74,121,142,139,139, 35, 70,214, 8,163,202,216,174,247,222, 90,232,223,217,189, 1,102, + 44,219, 0,216, 44,252,115,239, 27,191,143, 75, 82,183, 83,122, 27, 69, 0, 6,182,110,124,150,198,150,162, 20, 64,244,251,254, + 88,114,186, 15,130, 1, 84, 22,168,209,187,119,111, 0,192, 39, 75,252, 49,105, 68, 48, 34, 38,229, 59,244,219,206, 76,117, 75, + 75, 75,147,183,182,236,177,189,246,166, 61,218,188,182,114,221,141,251,109, 79,140, 30, 51,250, 10,128, 43,183, 69,172, 3, 3, + 93,226, 27, 55,126,100, 17,154, 29, 21, 26,134,222,125, 6, 57, 99, 72,181,235,125,182,199, 34, 63, 46, 25, 0,119, 90,192,246, +236,217, 19,151,177,162,227,237, 5, 96,173, 72, 35, 70,140,192,158, 61,123,116, 22,209,231, 0,120,220,137,200, 67, 59, 21, 18, + 34,147,201, 26, 60,251,214,196,255, 78, 98,225,194,133,182,241,212,134, 6,219, 58,141,208, 25,111,231, 78, 62, 95, 91,238,236, +236,236, 54, 47,251, 27, 23, 23, 71,226,226,226,218,156, 46,123,107,251,183, 7,218,210, 37,176,104,209, 34, 20, 22, 22,182, 91, + 90, 28, 89,222,215, 89,156,121, 77,129, 51, 48, 15, 12, 29,159, 44,193,254,227,125, 16,234,225,133, 95, 79,221, 66, 95, 7,197, +223, 94,249,235,168,203,225,182,199, 90, 2,127,166,251,237,128,207,191, 75, 59,243,173,186, 91,105,191,235,187, 1,222,169, 8, + 67,123, 26, 1,137,137,137,226, 63, 89, 1, 36,127,240,111, 91, 87,168, 97,173, 6,128,187,241,232, 56,104,107,151, 64,207,158, + 61, 73,207,158, 61,219,165,189,113,102, 31, 0, 87,113, 36, 77,139, 35,105,249,238, 58,235,134, 27,246,156,200,168,168, 40,234, +126, 12,110,184,225,134, 27,110,184,241,247, 2,227,126, 4,110,184,225,134, 27,110,184,225, 54, 0,220,112,195, 13, 55,220,112, +195, 13,183, 1,224,134, 27,110,184,225,134, 27,110,184, 13, 0, 55,220,112,195, 13, 55,220,112,227, 47,129, 70,179, 0,230,205, +155,231,242,200,212,230,230,137,187,249, 58, 30,223,220,185,115, 93,226, 27, 54,108,216,109,124,103,207,158,117, 57,125,205,241, +253, 89,242,195,217,103,184,126,253,250,187,146,190,246,206,143,187,153,191,246,166,137, 58,251,252,218,155,207,221,190,184,249, +154,225,235, 10, 64, 1, 64, 8,160,182,163,165,207,105, 3,192,141,191, 62,214,175, 95,239,126, 8,127, 51,248,249,249, 49, 48, + 79,207,228,215,213,213,113,148, 82, 83, 71, 74,159,117,223,249,172,172, 44,218, 30, 11,205,180,215, 74,123,110,220, 57,236,218, +181, 43,110,234,212,169,217,127,242,219,176,174,125, 37,113,214, 0,232,144, 17, 0, 55,254,122,160,148, 54,218,234,216,213, 8, +192,218,181,107,237, 94, 51,113,226,196,184,204,204,204, 70, 43,139, 77,152, 48, 33,254,192,129, 3, 46, 85,244,244,244,244,102, +249,146,146,146, 58, 4, 95, 71, 6, 33,132,244, 8, 13, 69, 81,121, 57,173,173,173,181,238,207,224,212, 18,131,182,198,226,169, + 29,171, 75, 8,193,115,178,189,121, 25,210,201, 67,190,161, 20,202,245,251,242,158, 91, 52, 99, 36, 1, 67,249, 10,149,142, 14, +159,249,188,211, 91,114,102,101,101,197, 89,151,156,181,252,119,105,185,217,166,226,111, 45,247,109,221,104,167,185,239,186,202, +217, 30,124,109,221, 50,216,149,104,201,157, 16,255, 61,123,246,200,167, 78,157,250,103, 55,206,172,251,176,223,209,174,244,119, +222,120,129,241, 18,248, 50,122,177,144,211,215,106,249,245, 90, 37,251,193, 39,171,219,101,135,193,219, 12,128,246, 20, 8, 87, +185,156,229, 35,132, 48, 22, 43, 76, 75, 41,229, 58, 90,250,218, 75, 96,219,195, 0,176, 54,234,182,105, 37,132,232, 41,165,162, +182, 68, 10, 8, 33, 20, 0, 86,173, 90,213,104,199,176, 5, 11, 22,200, 9, 33,160,148, 18,103, 27, 37, 0,224,190,247,111,116, +158,153,149, 41,207,204,204,116,186, 1,108, 79,190, 63, 67, 20,133, 82, 74,227,123, 69,208,248, 94, 17, 0,128,114, 3, 59,167, +147,144,191,217,250,249,111,202,122, 81,153, 3, 27,167, 0,192,201,237,159,230,115, 28,194,238, 25, 19,228,243,193, 75, 99, 15, + 12, 25,226,119,253,185,229, 35,255, 11, 0,183,234, 52,255, 39,224,147,255, 1,228,226,220,185,115, 7, 58,251,108,154, 46, 69, +219,150,229,102,109,197,191, 61,140,128,150,190,227,170, 88,182, 7, 95,114,114, 50,210,210,210, 28,186, 39,103, 34, 42,173,241, +181, 87,100,198, 86,252, 57,142,195,250,245,235,177,121,243,102, 58,103,206, 28,226,100, 30, 11,101, 50, 89,187,172,151,189,120, +241,226,185,169,169,169,174, 86,104, 31,139,231,175,190, 19,117,120,211,154,181,204,163, 97, 17,226, 23,146, 30, 23,134,244, 15, +227,243, 73, 8,163,169,171, 99,197, 8, 53, 48, 93,186, 26,116, 55,175, 25,218,250, 27,124, 71, 26, 55,169, 84, 26, 12, 96, 56, +128, 83, 50,153,172,178,131,121, 58, 62, 0, 18, 0, 76, 7,176,147, 16,146, 69, 41, 85,182, 3,239,119,148,210,135, 93, 21,216, +142, 2,134, 97, 90, 53, 82, 8, 33, 35, 1, 8, 9, 33, 33,148,210,138,150,174,107,205, 64, 33,132,208, 23, 95,124, 17,221,187, +119,191,109,187,208, 85,171, 86,197, 23, 23, 23,203, 9, 33,212, 81, 35, 64, 42,149,210,141,207,123,226,241,177,183,111, 46,195, +125,239,143, 77, 63, 25,240,164,147, 94, 83,123,242,213,213,213,197,189,254,250,235,242,148,148, 20,196,199,155, 87,182, 59,119, +238, 92,220,218,181,107,229,221,187,119, 7,199,113,208,106,181,136,139,139,195,196,137, 19,237,114, 10,235,212,113,125, 95,223, + 38,207,140,238, 26,223,233, 95, 19,178, 1,128, 45,103,227, 46,191,205,202, 77,221,125,160,228, 60,161,208,250,160,194,247,100, +252,211,139, 66,236,122,199,189,186,117,234,212, 93, 40, 41,123,254,185,199,244,161, 18,161, 80, 89,163, 37, 43,190,218,178,249, +141,103, 30,133,191, 68, 66,117, 70, 19,253,247,234,175,244, 0, 72,231,206, 65,252,242,242,106, 38, 42,170,249,157, 53, 71,132, + 28,136,188, 25,230,225, 23,123, 79,240,170, 97, 49, 1,130,141, 27,175,134, 7, 7, 73,170, 62,124,233,248,170,162,235,195, 76, +147, 39,117,206,205,191,162, 42,126,242,241, 94,137,214,114,227, 76, 29,176,221, 32,167, 45, 94,104, 83,241,111, 90, 63, 93,225, +239,136, 17, 0,139, 16, 83,171, 17,144,156,156,108,123,190,145,104,219,110,236,227,170, 81, 97,229, 73, 75, 75,107,115,148,192, + 86,252, 23, 44, 88,128, 83,167, 78,209,159,126,250, 9,115,230,204,113,150,202, 32,149, 74, 5, 50,153,140,109,135, 38,178,124, +241,226,197,211, 83, 83, 83,119,186,240,221, 48, 0, 53, 0,194, 1,156,203,201,201,233, 1,224, 51, 0, 1,182,252, 0, 62,137, +141,141,117,120,207, 5, 45,167,229, 27,170,244, 30,147,167, 78,247, 85,192,232, 43, 16,240, 69, 74,157,152, 47, 20,106, 89,158, +143,167,222, 32, 49,106,249,229, 55, 85, 98,158,168, 86,103,210, 27,164, 82,105,139,245,183,205, 17, 0, 66, 72, 55, 0,159, 3, + 40, 5,240,162, 84, 42,253, 23,165,244,198,221,242, 96,237,136,116, 32,128, 77, 0,110, 2, 56, 6,224, 1, 0, 79, 19, 66, 30, +167,148, 86,183,145,126, 22, 33,100,142,189,254,210,187, 25, 98,191, 67, 24, 13,224, 50,128, 8, 0, 21,196,162,212,142, 26, 52, + 19, 39, 78,140, 3,208, 72,252, 23, 44, 88, 32,183,141, 6, 88, 62,147, 79,156, 56, 49,206, 94,119, 64,122,122,122, 28,128, 70, + 98,205,204, 82,192,214,123,127,124,172, 16, 79,126,170, 70,122,122,122,156,189,240,125,123,243, 1,192,241,227,199,229, 98,177, + 24,185,185,185,141,246, 59, 96, 24, 6,111,190,249, 38,177, 54,118,187,119,239,150, 79,156, 56,209,110, 6,116, 58,126, 81, 78, +197, 2, 12,169, 20,202, 43,126,223,138, 21,132,161, 24,242,166,129, 0, 6, 92, 56,114, 61,238,230,246, 41,114,224, 68,171,141, +112,124,175, 8,218, 93, 40,193, 43,207,206,209,135,122, 9,133, 85, 23,114,136, 39,195,199, 11,227, 34,209,197, 79,130,235,185, + 71,137,214, 64,201,130,185,143, 25,226,123, 69,208,126, 30,222, 40,163, 85,100,216,176, 97,205,242, 5, 5, 9,239, 21, 10, 25, +241,177, 99,101, 47,178, 38,221, 71,161, 93,123, 26,253,130, 4, 68,169,188,234,209, 51,194, 35, 40, 32, 64, 84,201, 81,165,254, +199, 19, 21,234,121,227,254,152, 2,220, 52,236,111, 91, 55,157, 53, 2,172,215,216,142, 35,176,119,157,189,237,183,219,147,207, +214, 8,144,201, 20, 0, 20,144, 74,253,209,156,104, 59,138,150,140, 10, 75, 68,166, 77, 81, 15, 91,241,223,189,123,183,156, 97, + 24, 48, 12,131,113,227,198,225,232,209,163,141,242,203, 81,152, 76,166, 60, 30,143,103,148, 74,165,124,153, 76,214,214,241, 44, +146,234,234,234,239, 3, 3, 3,103,166,166,166,110,119,242,187, 90,152,247,139, 81,229,228,228, 12, 2,176,253,224,193,131,125, + 56,142,179,213, 40,240,120,188,135, 0,100,199,198,198,198,219, 35,204, 47,204, 23, 75,132, 98, 95,129, 64, 20,204,240, 73,103, +202, 19,249,113, 60,158,136, 35, 12, 56,194, 55, 82, 30,175,158,199, 17,149,154,103,170,241, 20, 10, 8,175, 87,183, 58,241,212, + 16, 22,197,119, 46, 2,240, 17,128,131, 22,203,230, 89, 0, 31,173, 95,191,126,166,139,130,237, 15,224, 69, 0, 35, 0, 36, 2, +216, 3,224, 36,128,143, 41,165, 10, 23, 40,143, 88,210,181,150, 82,202, 17, 66, 60, 1, 60, 97, 57, 63,176, 13,134,133,175,229, +173, 39, 0,165, 51, 30,118, 11, 17, 20, 33,128, 55, 0, 44,149,201,100, 6,116, 44,140, 0,144, 3,160, 19, 33,100,171, 37, 79, +190,105,106,208,180,100,160,100,102,102,202,109,195,254, 11, 22, 44,104, 56,182,125,191,106,213,170,120,139, 97,208,106,141,207, +204,204,148,219,134,233,153, 89, 10, 92,217, 99,222,133,145, 73,252,166, 65,180,185,239,253,193,204,202,148,219,219,208,167, 57, + 62,107, 99,198,204,146, 82,103,249, 40,165,113,199,142, 29,195,156, 57,115,240,197, 23, 95,224,204,153, 51,113,209,209,209,217, + 77,175, 17,139,197,242,206,157, 59, 59, 18,171,143,235,124,236, 23, 92,158, 19, 7,175, 47, 46,128,148,105,226,104,103, 15, 11, + 31,177, 92,130, 56,129,174,187, 60,160,115,235, 91,217,198,247,138,160,115,255, 57,203, 16,234, 41, 20, 24,175,158, 18,250, 7, +123, 19,121,153, 18, 51,163,186,161, 95,152, 31,132,181,151, 33, 87,105,209, 77, 32,130, 31,225, 9, 22, 63, 61,135,214, 11, 69, +249,241,189, 34, 40,124,252,154,229, 84,212,170, 2, 70,142,244, 90,165,100, 71, 45,242,246,175, 20,233, 24, 79, 78,226,101,208, + 7, 4, 5, 50, 30,126, 98,190,162,166, 76,164,172, 99, 33,168,211, 19,219, 50,211,154, 65,107,233,247,151,219, 19,206,228,228, +228,120,123,227, 1,154,243,252,155, 26, 2,206, 24, 1,214,207, 90, 19, 99,219,243,246,132,177, 41, 31,221,230,127,123,123,147, +162,128,163,124,173,133,251,219, 34,218, 77,141, 10, 0, 8, 8,200,106, 23,241,159, 55,111,158,185,251,141,227,240,234,171,175, +226,163,143, 62,106, 16,255,181,107,215, 58,205,205, 48, 12, 12, 6,195, 89,161, 80,200,182, 67, 36,160, 6, 0,170,171,171,183, + 7, 6, 6,198,167,166,166,202,157,248, 46, 31, 0,158,124,242, 73, 81, 78, 78, 78,102, 86, 86, 86,167, 37, 75,150,176,111,189, +245, 86, 35, 93, 13, 12, 12,196,161, 67,135,226, 0,164,197,198,198, 38,183, 70,200, 35, 2, 31, 3, 75,187,112,156, 49, 66,200, +227,245,160,132,132, 16, 62,159,240,121,188, 58, 66,136, 22,132,167,228, 40,252,169,129,243, 80,154,140,232,229,195,106,153,145, + 42,174,221, 12,128, 38,125,195, 97, 0,186, 81, 74,173,130,255, 62, 33,228,132, 84, 42, 13,163,148,150, 58,227,193, 18, 66, 30, +179,136,245, 7, 0, 22, 1,120,212, 18, 66, 73, 6, 80, 76, 8,121,150, 82,250,141, 19, 34,253, 31, 0, 87, 41,165,107, 8, 33, + 34, 75,133,103, 41,165,159, 17, 66, 38, 17, 66,254, 67, 41,253,127, 46, 22,138,241, 0, 42, 1,220, 11,224,127,206,124,177,185, + 8,128, 84, 42,125, 10,192,219, 0,202,231,206,157,187,174,131, 69, 0, 6, 90,210, 54, 1,192,100, 0,215,237, 25, 52, 45,193, + 86,240,109, 69,191,233,184, 0,135, 43,186,141,248, 3,192,149, 61,143, 53, 50, 2, 92,225,179,109,204,100, 50, 25,177, 53, 2, + 28,193,225,195,135, 97, 48, 24, 16, 19, 19, 19,255,211, 79, 63,201,139,138,138,228,209,209,230, 45,117, 57,142, 67,106,106, 42, +173,175,175,135, 64, 32,192,140, 25, 51,236,222,183, 46,247, 36, 24, 3,139,218,152,240,120,193, 79, 55,229, 87, 55, 28, 70,175, + 55, 38,155, 69,139,163,200, 75, 21,210,154,122,111,104, 5, 94,152, 48,239,138,253,231,200,240,234, 43, 47,228,250,234,244, 38, +198, 87, 34,162, 73, 81,221,225, 35, 17,144,146,234,122,120, 50,124,164, 12,235, 78,143,255, 90,129,159,255,183, 15, 61, 60,189, +232,121,149,242, 58,128,190, 45,209,229,158,237,242,220,232, 97, 85,135,189,248, 17,172,144,189,213,107,252,152, 20, 47,157,193, +115, 10,207,235, 36,163,172,173,241, 40,186,116, 50,194,104,184, 84, 89, 88,160,246,177,212, 25,187, 66,229,168,119,106, 29, 31, +208, 82,255,115, 75,222,180, 61,175, 82, 42,149, 82, 87, 67,166, 29, 9, 77, 61,127,179,120, 3,105,105,237, 55, 72,176, 61, 60, +127, 74, 41, 88,246,119,141, 30, 59,118, 44,142, 30, 61,234,146,248, 91, 96, 20, 8, 4, 38,142,227,142, 49, 12, 99,108,163, 17, + 16, 98,125, 83, 93, 93, 45, 15, 12, 12,148,166,166,166, 58,186,115, 86, 81, 74, 74,138,207,225,195,135, 83,179,178,178, 58,125, +253,245,215,220, 19, 79, 60,193,223,178,101, 11,222,121,231, 29,228,231,231,163, 71,143, 30, 40, 47, 47,199,187,239,190,107,122, +251,237,183,147, 0, 60, 27, 27, 27,251, 89,139,140, 28,235,107, 2,211,131,112, 24,104, 4, 23,233, 33, 16, 9,133,124,166, 76, + 44,224, 41,121, 18, 97,149, 72,196,171,215,155, 56, 15,190,145, 31, 96, 96,245,166,107,103,206, 42, 30, 11,254, 72,115, 28,174, +233,135,189, 8,192, 36, 0, 57, 77, 6,142,229, 0,152,180,126,253,250,175,156, 16,235, 71, 0,188, 4, 32,188, 73,104, 94, 1, +224, 23, 66,200, 39, 0, 14, 16, 66, 76,148,210, 45, 14,240,121, 0, 19, 92,166, 19, 0, 0, 32, 0, 73, 68, 65, 84,152,107,245, +242, 41,165,250, 38,151, 60, 14,224, 87, 66,200, 74, 74,169,198,149,240, 63,128,175, 44,255,157, 50, 0,154, 10,166, 84, 42,253, + 7,128,231, 44,207,114, 21, 33, 68, 47,147,201, 54,116,132, 6,132, 16,210,219, 18,194,250, 17, 64, 6, 0,107, 62,193,209, 8, +192,223, 13,165,165,165,242, 81,163, 70,129, 16,146, 61,106,212, 40,252,240,195, 15,120,232,161,135,226, 58,117,234, 36,103, 24, + 6,139, 23, 47, 38,150,198, 36,110,235,214,173,114,189, 94,143, 17, 35, 70,180,216,208,141,185,118, 83, 94, 62,170, 63, 64, 72, +246,175,161,166,248,129,231, 2,228, 58, 14,241,230, 46, 0, 96,200, 98, 3, 1,170,161,174,174,139, 59,180,181,183, 92,237,125, + 34,254,225, 39,124,154,245,138, 75, 12,236,202,245,235,183,188, 26, 28, 36, 41,170, 83, 27,124,195,253, 61, 5,201, 67,123,122, + 12, 11, 23, 17,157,198, 4,141,150,195, 85,162, 53,101, 20,149,106, 10,202,235, 77,157,132,226,178,114,131,110,226, 13,189,241, + 3,111,224,149,230, 56,125,252,195,186,106,235,175,116, 25,144,112, 31,115,241,120,217,248,210,223,126,184,209,123,248,220, 16, + 94,255,168,146,179, 71,191,175, 35, 60,159, 17, 28,199,213,220,186,165,181,107, 69, 53, 21,108,123,199, 86,111, 54, 45, 45,173, + 69,193,182, 13,175, 55,141, 4, 56,114,253,159, 21, 9, 9, 9,196,214,235,183,133,109, 8,191, 45,104, 15,158,250,250,122, 57, + 0,240,249,124,188,252,242,203, 56,117,234, 20,126,250,233,167,182,210,234, 1,152,244,122, 61, 91, 90, 90,154, 25, 22, 22,102, +180, 23, 89,108, 5, 42,219,131,234,234,106, 89, 96, 96,224,131,169,169,169,142,180,251,190, 58,157,174,207,194,133, 11,167,206, +155, 55,143, 14, 30, 60,152, 0,104, 16,127, 0, 24, 61,122, 52,118,236,216,129,177, 99,199, 50,143, 60,242, 8,205,206,206, 94, +195,227,241,180, 30, 30, 30,208,104,110,151, 38,142,163,186,108,249,193,244,222,189, 35,139, 35,122,132, 95,225,121, 75,202,120, + 68, 88,199,136, 4,117,140,216,163,194,192,231,105, 64,141, 2, 78,108, 12, 81,149, 86, 7,157, 56,116,238,205, 32,255,208,183, + 92,125,144,173, 70, 0,164, 82,233, 68, 0,155,155,120,181,135, 0,204,153, 59,119,238, 87,142,120,176,132, 16,158, 37,252, 61, +173,165,126,121, 74,105, 53, 33, 36, 5, 64, 6, 33,228,123, 7,230, 41, 63, 2,224, 0,165,180,174, 5,190, 58, 66,200, 1,203, +117, 95, 56, 41,138,247, 1, 8, 4, 48, 31,192, 86, 66,200,125,148,210, 67,174, 68, 0, 8, 33, 73, 0,222, 7,208,131, 82,170, + 38,132,140, 6,112, 93, 42,149,170, 40,165,233,142, 70, 0,164,102, 83,223,145, 70,139,200,172,110,128, 99, 24, 3,224, 4,165, +148, 18,179,219,116, 29,128,154, 16,210,205, 58,206,195,153, 8, 64, 83,143,191, 45,222,127, 67, 88, 62,241,155,134, 40, 64,100, + 27,188,255,223,195,252,191,135,111,165, 82,231,188,127,163,209, 72, 79,157, 58, 5,111,111,111,228,229,229, 81,147,201, 4,165, + 82,137, 75,151, 46,201, 3, 3, 3,209, 36,236,151, 61, 96,192,128,248,109,219,182,201, 71,140, 24,209,124,184,207,104,164,221, + 78, 93,128,208, 59, 12,130,188,106, 26,106,242,134, 74,201,192,116,169, 30, 8,108,188, 35,181,103, 32,155,221,125,248,233,248, +125,219,103,201,129,189,205, 54,118, 87,110,220,120, 45,178, 91, 55,160, 74,251, 42, 0,228,107,149,216, 45, 42,173, 28,112,239, +248,224, 1,134, 60,252,114, 93,129,221,231,110,241, 11, 42,235,125, 0,160,220,160,243,191,161, 55, 38, 23,148,150,238,136, 10, + 14,110,214, 0,184,119, 74, 10,227, 33,156, 56,152, 85,255, 82,220,189,127, 66,159,186, 27,219, 13, 87,127,201,172, 53,114, 94, +183, 42,138,127,174, 80,214,120,142, 0,195,144, 26,149,206, 87, 58, 43,186,155,236,251, 51, 55, 90, 42, 51, 50,153,140,216, 70, + 0,108,189,203,166,225,118,171, 72, 39, 39, 39, 35, 33, 33,129, 52,183,208, 73, 91, 70,227,187,186,112, 74, 71,131,181,186, 75, +165,254,183, 69, 4, 92,141, 42,164,165,165,181,139,248,111,222,188,153, 30, 57,114, 4,116,155, 63, 72,138, 2, 31,126,248, 33, + 40,165, 96, 24, 6,235,214,173,115, 57,178,160, 80, 40,244, 1, 1, 1,241, 71,142, 28,217, 59,126,252,248,201,205,149, 31, 39, +224,103,169,175,115,171,171,171,215, 7, 6, 6, 62, 6,160,102,241,226,197,255, 72, 77, 77,181,231,168,213,237,218,181,171,116, +223,190,125, 95,197,199,199, 63,213,175, 95, 63, 36, 36, 36,208,172,172,172,134,116,100,100,100, 64, 36, 18,225,250,245,235,216, +187,119, 47,233,210,165, 11, 27, 27, 27,251,211,165, 75,151,154, 37,140,140,232, 83,166,213,234,230, 30, 57,114,100,125, 96, 80, +160,210,215,199,167, 24, 66,161,158,213, 51,245, 44, 79, 95,171,227, 43,171, 60,245,158,226,155, 21,149,190,135,246,237, 93, 63, + 96,224,160,247, 13, 58, 77,125,187, 24, 0, 82,169,148, 72,165, 82,107,226, 59, 89, 94,135, 45,211,236, 26,162,160, 0, 22, 16, + 66,186,192, 60,194, 17, 0,154,181,208, 45,162,242, 2,204, 3,244,174, 53,225,105,138,107,150,235, 94, 32,132,124,212, 10, 31, + 1, 48, 3,192,114, 59,124, 95, 3, 88, 68, 8,249,202, 78,250,108, 11, 77, 56,204,227, 29, 98, 96,238,251,127, 19,192,105, 66, + 72, 47, 0, 69,182, 54,134, 3,124, 15, 3,120,218, 34,178, 90, 75, 90,181,150,227,117,132, 16, 33,128,239, 90,227,179,228,197, + 99, 0,230, 57,106, 0, 72,165,210,181, 0,190,105,137,207,194,185, 18,128, 55, 0, 95, 0,187, 44,105, 19,195, 60, 79,252, 23, + 0,163, 8, 33,243, 1,252, 4, 96,119, 75,233, 3,204,243,232, 91,232,235, 71,211,177, 1, 19, 38, 76,176,107, 12, 76,152, 48, + 33,158,153,245,123,191,189,213, 8,176,190,183, 13,231,187,204, 55,235,246, 41,129,142,240,157, 59,119, 14,221,187,119,199,203, + 47,191,220, 80,102, 54,109,218, 68,115,115,115, 49,101,202,148,219,174,247,240,240,144,139,197,226, 22,249,194,207,157, 67,109, +247,206, 56,254,242, 83, 13,124,151, 95,219, 17, 23,145, 91, 39,103,166,136,111, 75, 75,113,190, 1, 34,113,235,179,159,174,150, +148, 44, 68,215,174, 63, 3, 24, 77, 65,121,184, 86,249,178,134,101,193,234,204, 65,178,139,149,149,184,166, 51,108,226, 19,162, + 2, 33,198,171, 37, 37,233, 0,208,210, 32,192, 46,225,253, 22, 2, 88,145,127,244,197, 34,113,232, 12, 69,105,185,184,107,121, +201, 73, 49, 4, 1,189,139,174,155,194,170,203,111, 64, 40, 20,132, 12, 12,245,124,164, 86,101,252, 22,192, 13,123,158, 43,128, +184,166,211,255, 90,240, 64,227, 93, 89, 19,160,185,254,255,191, 3,218, 58, 85,207,250,253,180,180, 52,218, 86,190, 45, 91, 54, +211,236,236,108,144,116,179, 97,124,224, 45,111, 76, 92,162,194,248,241,227,225,204,180,191,230, 16, 16, 16, 16, 15, 0,247,220, +115,143,166, 29,186, 41, 20,129,129,129,115, 0, 88,157, 83,125,106,106,234,110, 7,191,203, 2,168,200,200,200,144, 63,244,208, + 67,195, 83, 83, 83,135,152, 76, 38, 34,145, 72, 48, 97,194, 4,236,223,191, 31, 28,199, 33, 49, 49,145,190,248,226,139, 36, 42, + 42, 74, 63, 99,198,140, 30, 53, 53, 53,183,116, 58, 93, 75,138,204,254,122,233,202,166, 65,131,135,248,158, 60,113,226,253,179, +124,254,160,158, 61,122,126,233, 19, 24, 92, 34, 8, 22,211,195,123, 15,249,215, 40,170,199,133, 5, 4,191,221,167, 79,159,195, + 94,161,158,107,251,119,141, 49,228,229,229,181, 75, 4,128, 7,243,116,191, 88, 0,239, 1,120,222, 34, 60,158,182,245, 9,230, + 65, 98, 87, 1,252,219,210, 37,112,170, 5,126, 6,230, 65,102, 7, 0,120, 56,144,158, 99, 0, 38,162,229,133, 21, 24, 0,193, + 0,122, 0, 56,109,135,243,180,229,186, 16,180,220, 55,201,192,188,140,163,191,165,219,224, 33,139,112,231, 91,184,243, 45,199, + 91, 0,252, 0,243,140, 3, 5, 0,131, 29,190, 89,150,200, 67, 63,139,145,100,155,206, 50, 0, 82, 0,191, 89,174,253,222, 14, +223, 75, 48,207,110,112,164, 43,195, 3,192, 62, 0,155,237,228,199, 76, 0,255,181,252, 63,107,147, 62,129, 37, 47,211, 0,124, + 10, 96,137,229,243,178,150,126,240,192,129, 3,217,132, 16, 20, 23, 23,203,173, 51, 1,154,122,253,197,197,197,114,235,181,246, +110, 32, 41, 41, 41, 59, 51, 51, 19,155,126, 50, 52,140,220,111,234,165,111,250,201,208,112,237,221,228,203,205,205,197,184,113, +141,135,186,135,135,135,199,111,219,182, 77,222,179,103,207,120,142,227,228, 75,151, 46,165,214,105,128,132, 16, 12, 31, 62,188, + 69,163,162,111,110, 46,190, 11, 12,137,247,177, 57,215,127,254, 68,168,223,191, 1,220, 31, 2,202, 1,121, 75, 5,180,158,243, + 66,141,214, 7, 10, 50, 12, 67,199,237,138,111,173,216, 91,102,112,108, 7,176,189,119,143,176,190, 0, 94,214,155, 56,164,231, + 21, 97, 92,168,185,187,147, 80,170, 82,177,236,123,183,110,221,186,229, 64,153,122, 31,128,103,254,111, 53,143,214,158,222, 22, + 84, 81, 86,131,138, 91, 42,240,249,213,158,245, 10,138, 90,165,137,134, 4, 11,253,248, 28,166,107,245,166,239,150,188, 28,235, + 23,210,255,137, 90, 59, 66,147,109, 79, 92,218,220,135,157,176,205,252, 63, 43,197, 73, 15,248,206,206, 2, 32, 41, 10,180,133, +175, 37,143, 61, 38, 38,166,195, 24, 34, 13,131, 29,173,226,159,199, 98,131,220, 92,199,218, 42,254,214,178,241,236,179,207, 6, +243,249,252,138, 99,199,142,125,121,207, 61,247,180,101,138, 98,247,212,212,212, 53,150, 40,192, 44,203,140,128, 89,169,169,169, +223, 59, 18, 84, 4, 80, 15,160, 42, 60, 60,124,232,216,177, 99, 75,207,229,229,117,214,106,181, 68, 46, 63, 4,145, 88, 4,134, + 48, 56,116,232, 16, 25, 48, 96,128, 38, 57, 57,121, 84,101,101,165,221, 58, 55,123,214, 76,246,199,189, 63,126, 58,116,232,176, +158, 6, 86, 63,249,106,254,149,167,185,162,130,167, 0, 64, 12,134, 14,238,221,247,100, 72, 72,112, 54,143, 47,124,237,191,111, + 45,175,255,118,163,235, 61,202,205, 25, 0, 47, 91,172,161, 41, 0, 46, 1,240,106,230,123,123, 44, 30,123, 18,128,145, 22,241, +108, 54,202, 9, 32, 18,192, 86, 7, 13,128,106,203,245,188, 86,248,226, 0, 92,113,144,239,138,229,250, 29,173,240,205, 5,240, + 36,128, 11, 48,207, 80,184,214,132, 91,110,241,254,159,179,120,195, 27,129, 22, 71, 92,240, 44, 30,251,227, 0,162, 44, 81,132, +230,210,169,180,124,190,206, 98, 4,108,108,133,239,107,139,209,229,200,253, 82,203,245,173, 61,191, 15, 44,145,141, 3, 22,163, + 6, 77,184,247, 3, 24, 96,201,139,124,139, 33,213,173,213, 31, 53,247, 32, 80, 0,242,230, 22, 2,178, 94,227, 76, 5,127, 82, + 42,165, 79,126,170,110,102,225, 30,133,211, 2,209, 94,124, 47,188,240,194,109,215,140, 31, 63, 62,123,252,248,241, 4, 0,238, +187,239, 62,167, 26,161, 61, 47,188, 64,124,154,182, 40, 61,188,178, 37,171,251, 19, 0, 24, 40, 19, 16,115, 80,198, 58, 50,251, +186,131,197,192,146, 47, 38, 90, 4, 62,192,171, 71,131,248, 91, 92,228, 91, 98,177,216,209,217, 40, 4,192, 59, 71,179,206,122, +132,118,237,241, 32, 7,143,200,146,226,114,158, 81, 87, 75, 59,133,120, 17, 47, 79, 1, 97,141, 28, 20,181, 6,150, 72,136,164, + 78,197,246, 14,105,217, 33,104, 86, 44,154,190,255, 35,151,239,189,211,179, 0,218,202,215,146,199,222,179,103,207, 14, 35,254, +220,247,254, 56,144,103, 30,147,183, 81,110,192,119,199, 12,160,148,182, 75,190, 90, 57, 76, 38, 83, 53, 0, 68, 71, 71,183,105, + 65, 32,171,248, 91, 80,101,249,239,104,221, 16, 90, 28,179, 51, 0, 48,112,224,192, 48,149, 82,181,104, 68,204,240,199, 84, 74, +165, 47,107, 98,141,161,161,161,183,194,194,194,174, 40,149,202, 37,149,149,149,249,142,166,107,202,228, 41, 44,128,231,143, 30, + 57, 49, 54,118,236,216, 41, 18,137, 36,136,128,154, 8, 33,224, 56, 90,173, 85, 43,214, 92,206, 43, 46,251,118,227,134, 54,173, + 8,216,212, 0, 48, 1,248, 71, 43, 2, 98,139,147,150,151,201,242,106, 14, 38,152, 71,212,243, 28, 76,143, 28, 64,150, 29,190, + 12,152, 7,173, 57,130, 71, 29, 72,223,122, 0, 95,218,225,249, 21,230, 41,144,112,128,239, 27, 75,196,192, 30,138, 44,158,189, + 35,233,227, 57,145,167,235,237,240,221,239, 0,159, 53,218,176,209,242,108,236,206,181,165,148,146,137, 19, 39,198, 89, 5,223, + 54, 4,239,202, 82,192, 50,153,140,164,167,167,199, 49,179,218,103,233,222,246,230,251, 51,160,160,228,166, 62,178, 91,183,141, +243,222, 95,247,164,245,156, 65,192,108,214,105,184,125,229,197,197, 42,135, 10,211,250,245,180,234,244, 6,178,252,251, 95, 22, +238, 94,125,223,206,227, 39,202,158, 9,246,229,166, 50, 1, 62,126,148, 2,132, 80,189,158,229,202, 57,160,202,160,231,252, 74, +203,180,134, 72, 39,210,152,156,156, 28,111,219, 29,144,156,156, 28,223, 81,158, 95, 71, 92, 9,240,207,130, 73, 75, 84,119,244, + 30,101, 50, 25, 39,149, 74, 59,139,197,226,178,232,232,232,251,219,131, 51, 53, 53,245, 96, 96, 96,224,147,169,169,169, 27,157, + 48, 0, 88, 75,228, 20, 0, 48,122,204,232,229, 0,150, 55,189,176,233, 24, 33, 71, 49,110,252,200,159, 96,238,138,109,130, 48, +244,238, 51,168,205,247,220,156, 1,160,115,129,135,182, 18, 34,209,187,249,254,178,124,141, 96, 17,250,118,171,232, 73, 73, 73, +217,246,230,229,255,145,124,127, 6,212,104, 52, 79, 1, 30, 70, 0,193, 28,104,169, 78,103,216, 82, 94, 94,121,158, 82,234,240, +180,169,160,152,127,208,140, 15, 39,147, 91,158, 15,231,118, 29,139,220,172,175, 62,120, 57, 32, 64,180,136,207, 35,180,172, 90, +119,185,204,192,110,146, 8, 24,177,132,207,227, 25, 89, 78,236, 76,250,172,125,252,214,129,103,174,238, 3,112,219,212, 63,155, +208,191, 43,139,205, 52,245,204, 29, 57,127,183,249,238,182,225,227, 40,152, 89, 10, 16, 66, 48,117,218,239, 3,162,247,236, 61, +211,208,134, 36, 78,142,110,175, 41,138,229,237,217,222, 88,140,128,141, 78, 92,238,111, 49, 0,212,127,214,246,129,223,228,129, + 82, 71, 27,251,166,104,110, 20,187,155,239,175,205,231, 70,199, 71,117,117, 53,133,185,155,171, 77,184,229, 57,157, 2,192,209, +205, 31,147,132,167, 94,249,240,241,185,121,159, 62, 63,251,216, 0,131,154, 68, 4, 8,248, 65, 32, 68,227, 37,225, 87, 14,234, +231,147,239, 44,119, 66, 66, 2, 73, 75, 75,115,121,189,249, 59, 37,158,127,150, 8, 64,199, 51, 30,204,177,161,191, 65,245, 10, +179, 56,204,222,248,147,238, 6, 72,162,162,162,254, 30, 67,100,221,112,195, 13,240,121,128,135,136,128,227,204,109,116,189,214, + 93,253,221,112,227,111,219, 30,184, 31,129, 27,110,252,125,192,154, 0,165,198, 42,250,110,241,119,195,141,191, 51, 24,247, 35, +112,195, 13, 55,220,112,195, 13,183, 1,224,134, 27,110,184,225,134, 27,110,184, 13, 0, 55,220,112,195, 13, 55,220,112,227,175, +136, 70, 99, 0,230,205,155,231,242,200,205,230,214,214,110,142,239,127,223,127, 30, 55,104, 72,111,121,231,174, 97,241, 42,173, + 90,126, 88,158, 27,159, 52,235,217,108, 87,249, 86,127,181, 61, 46,106,200, 40,249,173,210, 82,120, 74, 60,113,163,164, 32,254, + 95, 79, 77,115,153,175,189,239,247,194,225,121,113,163, 71,245,148, 75, 60,121,224,243, 24, 16, 49, 65,153,242, 69,226, 42,223, +153, 91, 67,226, 70,140, 26, 33,247,245,226, 1,124,160,230,220,122,226,104,250, 34, 39, 69,186,124,191, 87,246, 95,185,141,111, +228,200,145, 46,243,157, 56,113,226,118,190, 72,215,211,119,226,202,237,233, 27,213,167,143,203,124,199,243,243,255,116,124,147, + 90,201,223,229,203,211,232,162, 69,201, 45,126,190,191,153,252,141,124, 96,146,235,229,101,223,254,219,203,243, 36,215,203,203, +242,204,106,234,195, 21, 52, 58, 23, 20,249,176,203,124, 85, 87,190,187, 45,125,103,223,184,238,114, 67, 58,108,105,143,219,206, +125, 24, 84,234, 50,223,203, 85, 97,248, 35,218,171,191, 59,159, 84, 42,229, 55,183,179,160, 35,124,251,247,239, 7, 0, 40, 20, +138, 8,157, 78,167,120,242,201, 39,107,255,200,251,117,218, 0,104, 9,186,173,210, 72, 0, 61, 97, 94, 39,160, 64, 60, 91,118, +205,209, 31,216,254,205,242, 56, 2, 14,193,126, 1,200, 61,124, 70,254,245,215, 31, 35, 54, 33, 22,172, 90, 35, 31,208,111, 60, + 56, 14,242, 95, 35,190,142, 31, 54,108, 8,174, 94,189,142,186, 90, 53, 6,143,153,147,221, 18,223,250,111,229,113, 20, 4, 61, +122,247,148, 75, 95, 89,130,234, 79,182,227,155,207, 63, 3, 32,198,158,243, 37, 96, 24,200, 63,126,231, 45,228,231, 95, 70,120, +120, 15,136, 36,124,220, 44,201,111,113,113,145,194, 29,159, 81,161, 80, 8,137, 68,130,130,130, 2,116, 9,241, 65, 16,223, 11, + 93,186,251,193, 95,226, 11, 79, 98, 2,195, 48,160,156, 9, 26, 17, 31,117,183,234, 80, 49,220,254, 92,242,186,130, 53,212, 91, + 82,135, 49, 35,122,193,203,147, 15,161,132, 1,159, 7, 48, 66, 62,250,134,125, 78,141,148,135,194,155, 79, 57,156,225,171,247, +234,226,194,194,194, 16,123, 79, 87,185, 86,167, 7, 35,146, 0, 70, 32,175, 62, 58, 78,171, 81, 99, 84,200,229,236, 63,202,138, + 92,191,126, 61,157, 59,119,238,223,106,126,125, 71,133, 61,161,111,227,245,158, 0, 70,116,146,120,252,183,180,180,180,159, 64, + 44, 2,231,225,177, 12,230,149, 49,235, 59,202, 51, 40,248,117,111,220,181,139,135,111,219,107, 32, 33,121,217, 95,165,140,146, +111, 54,109,250, 77, 36, 20, 74, 56,142,243,245,244,242,242,122,112,234, 84, 15,152, 87,176,235,168, 35, 59,173,209,102,174,173, + 68, 82,169,212,199,215,215,119, 65,223,190,125,103,136, 68,162,174, 37, 37, 37, 37,165,165,165, 39, 12, 6,195, 82,153, 76, 86, +224, 2,159,159,191,191,255,146,251,238,187,111,242,179,207, 62, 27,254,197, 23, 95,220,186,112,225,194, 49,157, 78,247,174, 76, + 38,187,224, 8,199,254,253,251,241,227,200, 29, 24,179,247,222, 21,225,225,225,175,121,122,122, 98,251,246,237,167,103,206,156, + 57,252, 79, 19, 1,104, 65,252,121,158, 34,254,136,199,198,246, 90,201, 81,170, 59,122,249,214, 39,151,182, 74, 15,136,103,203, + 46,218,251,110,242,212,222,116,234,125,203, 97,172,175, 5,223,196,224,151,139,151,241,196, 19, 47,254, 94, 34, 24,224,231,220, +141, 8,234, 30, 38,231,234,149, 48,112, 4,135, 14,229,198,151,104, 91,202,168,165, 20, 66, 95, 16, 15, 31,156,185, 88,140,243, + 23,255,129,175,190,219,223,240, 57,199, 1, 15,140, 25, 3,212,151, 3,240, 70,193,133, 75, 16, 4,249, 33,118,244, 32,121,173, +166, 21,155,133, 48, 0, 97, 16, 53, 36, 26,157, 60,133,232, 18, 36,134, 79, 96, 0,252, 69,222,240, 23,243, 32,224,241, 96, 52, +153, 80,203,114, 56, 89,117,218,238, 67, 45, 63,191,132, 6,248, 2, 62, 30, 30, 8, 14, 10,132,143,143, 7, 40, 99, 2,203,213, +195, 4, 19,188,188, 60, 16,212,169, 43,122, 70,254, 68,179, 14,143,109,181, 81, 90,151,105,160,190,222,158,232, 25, 17,130,224, +160, 64,168,213,106, 8, 69, 98, 8,116,230,197,249, 34,194,123,200,107, 20,181,248, 62,183, 40,190,184,228, 38, 20,229,215,177, +244,217,232, 86,141,129,180,229,105, 14, 55, 18, 9, 79, 38,196,251,135,250,103,183, 38,254,119,195, 8,120,227,253,247, 41, 0, + 44,125,237,181,118,249,141,197, 43, 86, 80, 0, 72, 93,184,208,101,190, 31,115,114,158, 48, 24, 12, 27, 1, 96, 70,124, 60,227, + 74,227, 43,219,182,205,188, 70,188,205,180,105, 74, 41, 8, 33, 13,255,173,231,172,215,205, 77,110, 89,176, 23, 45, 74, 38,142, +138,186,147,226, 63,192,211,200,110,247,246,243,237, 7, 0, 66,137, 24, 6,173, 14,156, 90,179,226,216,145,195,239,220, 59,115, +102,127, 0,197,246, 72,244, 60, 33,133,121,241, 20,214, 34, 10,156,165, 29,106,182, 45, 26,122,239,100,252,118, 40,195,169, 60, +186,118,241,176,188,247,160,184,248,240,254, 15, 56,111, 20, 39,215, 56,117,121, 74, 74, 10,182, 37,103,181,122, 77,124, 86,227, +173, 72, 6,248,153,111,181, 66,199, 65,203,154,243, 85,109,249, 47, 27,229,135, 62,222,130, 86,249, 86,174, 92,153,253,198, 75, +175,134, 76,155, 49,221, 75,167,211,226,227, 15, 63, 96, 86,175, 94,173,155, 63,127,126, 24,128,155,237, 93,247,246,237,219,151, +176,115,231,206, 76,192,185, 53, 7,114,115,115,105, 81, 81, 17,170,171,171,161, 82,169,224,237,237,141,192,192, 64,132,135,135, + 99,204,152, 49, 46,213, 59,169, 84, 58, 62, 58, 58,122,211, 43,175,188,114,181,111,223,190, 27,135, 13, 27,118,233,214,173, 91, + 93,115,115,115,163,159,122,234,169,221, 82,169,116,133, 76, 38,251,202, 9,190,248, 25, 51,102,164, 45, 95,190, 60,208,104, 52, + 66, 34,145,192,211,211,179,179, 90,173,158, 57,109,218,180, 7,165, 82,233,124,153, 76,246,121,107, 28,207, 43,164,192, 72, 96, +202,137, 25,240,236,238,217,101,209,162, 69, 56,117,234, 20, 85,169, 84,126, 54,191, 3, 0,188,153, 51,103,154, 38, 78,156,120, + 87,196,253,220,185,115,141,142,155,219,208,141,223,130,232,119, 3,208, 11,230, 37, 99, 77,106, 61,123, 35,247, 74,197, 71, 99, + 34, 67, 94,188,111, 64,231,119, 58,249, 74,186,200,183, 74,183, 2,184, 44,158, 45,107,113,147, 26,125,125, 13, 58,245,190, 31, + 75, 94,155,129,141,178,223,235,226,225, 99,235,160,214,232,145,152,240, 34,238,137,125, 18, 15,167,220, 7,137, 68, 4,131,137, +133, 74, 99,144,247, 25,221,187,133,194,113, 29, 48, 0, 51,230,172,197,191, 94,121,166,225,236, 3,247,196, 65, 44, 22,225,135, + 67,251,177, 39, 39, 23,155, 54,124, 6,157, 86, 15, 33,143, 15, 47, 15, 33,212,213, 37,241,181, 37,104,118,247, 49, 74, 41, 64, + 57,243,139,225, 64, 41,133,222, 32, 50, 55, 79, 34,128, 26, 76, 48,241, 0, 19, 76, 48, 25, 56,176,166,214, 13,216,130, 19,169, +180,107, 48,133,143,183, 39,194,186, 70,160,223,224,222,240,246,146,160,174,190, 18,229,149,229, 80,212,221,130, 81, 71,224,225, +225,129,224,224, 88,204,156,126,129,110,223,217,183,249, 48,254,230, 27,212,228,237, 13, 45, 31, 16,138,133,208,106,132, 48,104, +132,208,137, 69,224, 19, 22, 20, 60,232,180,245,208,106, 84,232,218,181,139, 92,200,227,163, 6, 74,124,244,209, 17,136, 68,173, + 23,142,247, 55,189,111,183, 0,189,246,248,107,173,126,174, 80, 40,104,147,227,152,128,128,128,124, 66,136,142, 82,202,247,247, +247,247, 40, 40, 40, 8, 76, 75, 75,203,158, 59,119,110, 23, 87, 11,178, 48, 52,116,118,195,111, 0,113,254, 64,187, 69, 59,214, +167,165,209,231,158,123, 46,222, 88, 81,225, 20,231,143, 57, 57,210,145, 35, 71, 46, 29, 27, 21, 5,163, 72,132, 85,171, 86,113, + 51,239,187,111, 2,165, 52,203, 41, 87,142, 16,172,124,231,157,134,227, 5,111,191,141, 85,239,190,219,234,177, 61, 52, 53, 2, +150, 47, 79,163, 49, 49, 49,200,202, 42,164, 9, 9, 61, 7, 2, 40, 92,190, 60, 77,235,164,248,231, 14, 30, 56,208,199, 90,103, + 60,197, 18,148, 85, 86, 64,169,168, 69,244,200, 81, 30, 63,126,181, 33,107,202, 83,255, 24, 8,243,230, 5,173,129,125, 97,233, +106,254,163, 51, 31,228, 71,134,135,115, 86,207,240,237, 85,159, 54,186,232,221, 5,207,155, 13,191,151,230,199, 63, 62,117,130, +211,249,234,146,248, 55, 88,200, 1, 78, 92,156,224, 20,181, 39,159,224,252,187, 79,131,248, 4,193, 84,120, 30,250,194, 95,145, + 95,163,198,240,189, 21, 14,125,127,157, 76,118,244, 21,233,115, 61, 30,255,231, 83,126,105,155,191,227,194,195,195,153, 37,203, + 87,192,251,157, 37,248,225,135, 31, 74, 31,122,232, 33,151, 12,209, 22,132,127,194,206,157, 59, 15, 88,143,167, 79,159,238,144, +114,169, 84,170,184, 3, 7, 14,200,141, 70, 35,122,245,234,133,113,227,198,193,215,215, 23,181,181,181,184,121,243, 38,174, 93, +187,134,155, 55,111,210,137, 19, 39,198,123,123,123, 59,156, 79, 82,169,116,250,125,247,221,247,241,202,149, 43,183, 14, 27, 54, +236, 99,171,177,211,165, 75, 23,204,156, 57,147, 36, 37, 37,121, 1,200,149, 74,165,185, 45,237, 94,218,148,111,254,252,249,233, +207, 61,247, 28,115,250,244,105, 16, 66, 16, 24, 24,216,240,218,187,119,175,112,244,232,209,159, 73,165,210,227, 45,241, 61,175, +144, 98,202,137, 25, 0, 64,182,167,236,160,247,126, 54,190,123,126,126, 62, 10, 11, 11, 73, 93, 93, 93, 47,169, 84,202,159, 54, +109,154, 9, 0,157, 54,109,154,137,101, 89,220, 13, 52, 21,127,235,185,166,247,193,111, 70,252, 3,135, 71, 4, 62, 30,213, 35, + 96, 14, 33, 68, 64, 41, 53,114,230,151,193,100,212,105,133, 12,215,101,112, 39,241,107, 65, 62,189,122,239, 60,121,237, 59,221, + 86,233, 81,241,108, 89, 89, 43,205, 55, 6,244,239, 11,134,201, 70,126,109, 53,128, 75,168, 43,189, 2,129, 88,132,140,221,159, + 64, 83,101,194,156,127,188, 12,142, 3,166, 62, 56, 6, 38,190,151,221,155,203,207,191, 4,142, 3, 18,135, 18, 0, 93, 0,244, +128, 78,111, 64,210, 3, 19, 33,246, 99,176,105,203, 62, 48, 12,144,254,221, 70,148, 22,254, 26,255, 80, 92,100,246,229,179,205, +115,113, 20,224, 56, 14, 28,199,193,100, 50, 65, 47,160, 48, 18, 35, 12, 6, 3, 52, 30, 58,128, 19,131,161, 38,152,132, 20,245, + 6, 29,212,202,186, 86,211, 22,236,165, 7,159, 47, 65, 96, 96, 32,122,247,238,141,208, 78,163, 0, 30, 3,147,233, 52, 24, 90, + 11,157,154,133,137, 83,163,252,102, 13,130, 3,171, 16,232, 23, 11,133,106,113, 92,115,155,188, 72,116, 44,168,190, 10,208,137, + 96, 96,140, 80, 11,249,168,151, 8,192, 23, 8, 1,206, 19,132, 71, 80,175,214, 64, 81,126, 29, 5,167,115, 80, 83, 92, 12,142, +227,192, 80,158, 75,133,230,171,181,191, 27,206, 79,205,123,202,126, 59,105,217,215,221, 90,116,210,210,210, 22,189,242,202, 43, +207, 20, 23, 23, 51,132,144, 96,153, 76,246, 29,204,155, 59,121,180,161, 44, 11,214,172, 89,179,229,214,173, 91, 72, 79, 79,199, +240,190,125,121,254,131, 7,183,185,130,164, 46, 92, 72, 20, 64, 28,165, 84,190,122,245,106, 57, 0, 72, 83, 82, 28,246, 74, 12, + 6,195,186,177,150,202, 36, 20, 10,209,167, 79, 31,108, 63,116, 40,211, 18, 13,112,152,231, 78,109, 85,187,104, 81, 50,201,202, + 42,164,167, 79,155, 35, 86, 54,255,127,189,247,222,123, 75, 23, 45, 74,246,117, 84,179, 60,141,236,246,193, 3, 7,250,240, 24, + 6,207, 62, 58, 7, 90,157, 30,171,190,252, 18, 30, 18, 9,116, 58, 29,116, 90, 45,134, 14,139,138,220,191,121,243,115,147,230, +204,249,200, 94,212,241,221, 5,207,115, 0,152, 43, 69, 69, 76, 83,193,111, 90, 61, 93,185,247,110,253,198,199,103,165,189, 78, + 39, 76,125, 58,158,138, 34, 93, 50, 4,108,119,237,163,219,252,237,158,183,107, 65,249,241,113,189,222,132,195, 19,130, 33,120, + 81, 6,229,156, 8,240,253, 67,156, 18,255,131, 7, 15,150,135,119,238,114,243,159,207, 62,211,237,245,151, 23, 98,245,134,117, + 23, 71, 70, 71,247, 92,247,233, 58,143,151, 22,190,138,205, 99, 70, 97,203,150, 45,143, 61,242,200, 35,155,218, 40,252,113, 59, +119,238,108,112,152, 44, 97,245, 23, 96,222, 42,221, 46, 14, 28, 56, 32, 15, 14, 14,198,176, 97,195, 88,134, 97,248,230,232, 44, + 7,129, 64,128,128,128, 0,116,234,212, 9,215,174, 93,195,129, 3, 7,228, 51,103,206,116,168,174, 72,165,210,228, 41, 83,166, +124,176,114,229,202, 79,251,246,237,187,150, 16,194, 1,248, 12,192, 36, 0, 71, 0,188, 75, 41, 45, 34,132,188, 10,224, 93, 71, +248, 86,206,159,255,253,216,228,100,178,107,215, 46,240,249,124,200,229,114,156, 63,127, 30,189,123,247,198,123,239,189,135, 65, +131, 6,225,153,103,158,225,191,249,230,155, 43, 91,244,252, 45,216,158,178,131, 2,128,135,135, 71,153,159,159, 31,196, 98, 49, +132, 66, 97,189,112, 25, 88,122,140,146,105,211,166, 97,217,178,101, 56,127,254, 60,182,110,221,122, 87,196,127,238,162,101,191, + 59, 58,203, 95,111,214, 8,104, 46, 2,192,240,121, 12,159,229,168,138,229, 76, 58,137,128,223,213, 75,200,244, 7,199, 2,145, +247, 2,157,122, 3,183,174,160,243,229,156,233,143,197, 70,132,103,156, 43, 19,215,108,149,102,152, 55,183,107,190, 14,243,120, + 86, 65,242, 1,208, 21,190, 97,125,113,253,114, 58,214,202, 54,128,209,123, 96, 98,124, 44,246, 29,204,129, 70, 3,120, 4,180, +220, 46, 73, 60,250, 66,171,185, 12,147,201,118,111,154,114, 0, 55,193,240,226,240,248, 19, 79,131, 19,169,241,227,238,175, 48, +245,193,167,224,225, 9,168,235,203, 44, 26,212, 60,140,224, 65, 96, 17,127, 35,107,130, 94,105,132,198,168, 65,173,132, 15,163, + 70, 0, 61,223, 8,158,145,128, 53,113, 80,106, 89,212,212,179, 45,170,217,121,249,114,218,179, 19, 1,143, 71, 64, 24, 17, 76, + 38, 10, 86, 83, 12,189,201,136,210,242, 58,212, 40,234, 81,167, 50,129,209,233,192,162, 28, 60,193, 57,116,233,174,196,168,232, + 24,249,119,223, 94,106,150,147, 7,128,170,116,208,170,110,194,116,171, 14,188, 94, 93,193, 48, 12, 76,172, 30,181,229, 69,184, +124, 34, 23,149,215,139, 45, 66,194, 7,195, 7,192,187, 59,221,128,214,144,255,250,245,235,245, 73, 73, 73,253,163,162,162, 88, +145, 72,164,254,224,131, 15, 70,194,188, 41, 81, 31,180,113,166,137, 48, 52,116, 1, 0,140, 30, 52, 8,161,161,161, 21,171, 87, +175,206, 2, 16, 63,108,240,224, 54, 71, 1,252,129,108,105, 74, 10, 17,132,132,196,173, 94,189, 90, 46, 8, 9,137,115, 38, 18, + 96, 20,137, 32,208,235,177,125,251,118,132,132,132, 96,198,196,137,214,104, 0,117,198, 8,184, 83,176,138,190, 76, 38,179,109, +248,112,248,240,225,176,209,163,147, 31, 68,203,219, 70,219, 98,132,159,191,127, 63, 30,195,224, 31, 73, 73,168,173, 83,162,178, +166, 26, 2, 1, 31,124,190,249, 37, 16, 8, 32,146,120,160, 87,120,248,135, 87, 79,157, 62,223,123,120,140,220, 30,233,149,162, + 34,124,187,253,127,183,121,252,214, 72,192,168,232, 33, 72,140,191,215,201, 59, 86,197, 1,222,217,125, 7, 39,102,247,237, 19, + 25,159,185,235, 75, 57,208, 49,250,254,243,190,254, 8,250,125, 27, 16,242,249, 25, 12,240,227,131,231, 19, 0, 86, 81,129,225, +123, 43,224,201, 39, 80,179, 20, 60, 59, 53,229,218,213,171,213,123,118,237,238,251,245,231, 95,227,147, 47, 63,187,190,238,131, +143,222, 14, 8, 12,168, 93,178,116,201,193, 77, 91, 54, 99,220,232, 88,124,155,182,245,235,110, 61,186,125, 61, 46,118,156, 75, +247,220, 84,252,119,237,218,133,174, 93,187,246, 58,121,242,228, 28,152,183, 26,183, 27,246, 55, 26,141,136,142,142,230, 88,150, +229,171, 84, 42,136,197, 98,112, 28,135,223,126,251, 13,249,249,249,240,242,242, 66, 76, 76, 12,202,203,203,145,155,155, 75,237, +117, 7, 72,165,210,217, 41, 41, 41, 43, 31,120,224, 1,175,181,107,215,250,124,252,241,199, 66,152,119, 45,205, 4, 16, 13,243, + 6,103, 31,193,188,157,251, 65,152,119, 60,109,149,111,231, 43,175,108, 30,208,191, 63, 89,157,148, 4,114,255,253,216,126,244, + 40, 87, 90, 90,186, 4,192,234, 27, 55,110, 76, 91,180,104,209,231, 63,252,240, 3, 98, 99, 99,225,233,233, 57,166, 37,174, 41, + 39,102, 96,199,142, 29, 88, 63,201, 92,199,252,252,228, 85,157, 58,117,130,151,151, 23,245,244,244,188, 97,120, 29, 32,211, 8, + 93,182,108, 25,172,134, 70, 99,253,186, 59,152,187,104, 89,131, 17,208, 72,236,155,158, 16,207,150, 85,254,124,181,114,221,198, + 35, 87, 95,254,173,180,238, 0, 3,202, 7, 40, 48,229, 61,252, 28,243, 1,254,171, 72,194,161,129, 43,128, 73,139,225, 45,224, +134, 61, 16, 21, 62,199,210, 93,112, 27,118, 29,170, 33,128, 18,211,158,120, 17, 28, 7, 0, 53, 48, 47,155,108, 68,143,190,209, + 16,139,248, 48,177,122, 80,131, 57, 44,226,237,237,141,234, 26, 69,139, 55,241,209,135,175, 16, 0,184,248,243,151, 96,152,198, + 78, 2,167,253, 21, 58,189, 17, 60,129, 24, 68,104,238, 67, 83, 41,149, 24, 51,102, 76,235,238, 8,103, 0,199,113, 96, 89, 22, +122,189, 30,245, 28,139, 58,131, 17,202, 50, 37,234,110,214, 65, 89, 94,131, 26,101, 45,202,117, 26, 40,213,181,168,213,183, 60, +214,201,219, 75, 13,150,229,160, 55,152, 80, 91,167, 68,254,213, 98,156, 56,157,135,159, 79,228,225,210,111, 5, 40,185, 81,133, +122,181, 1,170,122, 61,202, 74,235,112,225,215,107,200,205, 61,139,146,178,242, 22, 57,109,139, 10, 91,167, 70,201,185, 75,248, +101,239, 33,100,110,248, 16,135,182,110, 64, 73,193, 85,112,212, 8,142,144, 6,225,119,166,230,219, 11,243,219, 3,159,207, 7, +128, 91, 0,110,249,251,251,151,120,123,123,235, 23, 45, 90,116, 18,230, 1, 99, 12,204,107,101,231,187,202,191,102,205,154,212, +164,164, 36, 0, 64, 68,112,112,136,165, 79,156,215,158,149,195, 42,250,214, 72,128, 3,225,255, 4, 0, 88,181,106, 21,174,148, +149, 97,198,196,137,176, 70, 3,242,242,242, 0, 0, 59,228,114,234,104, 86, 44,120,251,109,188,250,206, 59, 13,225,125,235,123, +235,177,245,189, 35,225,127, 43,178,178, 10,105, 83,241,183, 61,206,202, 42,252,214, 17, 30, 63, 62,255,191, 58,131, 30, 60, 30, + 15,191, 21, 22,160,176,228, 6,142,159, 59, 15,131,193, 8, 6, 4,124, 62, 31,132, 16,112, 38, 19,180,106, 13,242, 14,103, 31, +114,128,150,177, 21,255, 71,103, 62,120,155,199,127,252, 76, 30,108, 35, 4,142,193, 38,156, 44,138,204,182, 10,127, 86,218,235, + 84,192, 94,137,251, 67, 45,128,154, 50, 8,187,247, 65,197,115,247, 32,239,235,143,192, 15,234,220,240, 81,197,115,247, 32, 72, +204,192,135,223,122,113,233, 27,217,183,139,135,135,167,199, 39, 95,172,209,197,223,123,175,112,212,152,209,155,175, 93,189,198, +253,118, 53, 31,224, 40,196, 34, 17, 98, 99, 98,177,123,215,110,236,220,185,211, 41, 47, 96,223,190,125,113, 82,169,148, 90,197, +255,192,129, 3, 88,183,110,157, 1, 0, 78,156, 56, 97,144, 74,165,143, 56,210,181, 80, 84, 84, 4,203,214,196, 76, 81, 81, 17, + 50, 51, 51,145,151,151, 7,181, 90, 13,133, 66,129, 83,167, 78,161,184,184, 24, 55,110,220, 64,143, 30, 61, 80, 84, 84,212, 42, +223,188,121,243, 30,127,248,225,135,223,143,139,139,243, 58,121,242,164,143, 70,163,249,167, 68, 34,201, 6,240,169, 76, 38, 91, + 44,147,201,234, 0,252, 15,192, 8, 66,136,144, 82,106,108,205,233,152, 63,127,254,227, 63, 44, 88,176, 57, 54, 36,132,176, 11, + 23, 98,140,193,128,147,187,118,209,210,210,210,167,101, 50,217,219, 50,153,172, 18,192,198,139, 23, 47,178, 44,203,194,203,203, + 11, 97, 97, 97, 94, 70,163,177, 89,241,159, 52,105, 18,100, 50, 25,164, 82, 41,164, 82,169, 71,105,105,105,223, 27, 55,110, 64, +173, 86, 19,133, 66,209,159,207,231, 79,176, 21,127,185, 92,142, 7, 31,124, 16, 29, 5,205,117, 1,132, 2,232, 53,125,120,247, +103,187, 5,122,206,129, 81, 11,244,157,128, 51,193,211,113,223,252,175,160,173,170, 5,207,199, 27,242,143, 31,199,184, 1, 63, + 35, 32, 47,115, 60,128,238, 45,253, 64,111,159,174,248, 37,111,135,141,189,161,182,116, 19, 26, 1,163, 30,124,142, 7,198, 82, +239,119,254, 96,238,110,138,157,156,210,114, 65,189, 64,241,192, 48,219,109, 16,137,229, 54, 4,128, 64, 12,150,152,192, 89,218, +221, 89,115, 94, 0, 0,249,245, 99,235, 91,172, 89, 38,142,130,229, 24, 48, 44, 11,198,160,135,198, 98, 89,104,121, 60,120,178, + 90, 40,181, 20, 68, 64, 96, 50,153,160, 49, 1, 21,106, 3, 90,234,204,102, 13, 28,116, 2, 30, 56, 13, 11,150,171,131,170,222, + 8, 30, 17, 64,207, 26, 97,160, 6,176, 70, 3, 32,228,192, 16,128,136, 56,212,105, 77, 40,175,212, 64,173,103,155, 13,198, 48, +196,212, 96, 0, 16,242,187,158, 24,117, 90,212,213,212,128, 33, 60,240,249, 20,160,124,240,136,235, 29,127,151,175, 95, 54,244, +237,209, 87,232, 72,216,191, 81,152,148, 16, 72, 36, 18, 0,208, 2, 48,240,249,124, 20, 22, 22, 98,249,242,229, 15, 2,184,177, +104,209,162, 97,190,190,190,126,117,117,117,215,107,107,107,157, 14,119, 11, 67, 67,159, 2,128, 78,157, 58,217, 86,224,218, 79, + 63,253, 52, 11, 64,194,176,193,131, 15,182, 87, 69,152, 63,127,126,188, 35, 6,192,143, 57, 57,113, 35, 71,142, 12,150, 42,201, +129, 0, 0, 32, 0, 73, 68, 65, 84, 27, 27, 21, 5,226,237,141,229,203,151, 99,225,194,133, 16, 8, 4, 48, 42, 20,240,245,245, +197,235,243,231, 55,140, 11,112,100,112, 96,211, 62,126,123, 99, 2, 90,194,114, 39, 6,119,158, 62,125, 26,167, 79,159,110,184, +190,165, 62, 78, 69, 77, 77, 63, 47,111,111, 84, 41, 20,144, 31, 63, 14, 62,195,131,222,104,132, 70,171, 5,199,113, 13,131, 21, + 89,163, 1, 6,189,222,145, 60,230, 0, 48,150,110, 0,206,166,224,235, 44,231,241,246,170, 79,133, 0, 16, 25, 30, 94,113,237, +226, 47,109,202,215,132,228,101,228,183, 51,233,113,123,119,126, 41,111,143, 72,128, 51, 97,255, 70, 97,217,109,159, 35,234,137, +151, 33,138, 24, 98,110, 43,170,202,144, 95, 99,222, 68, 78, 52,102, 10,138, 77, 44, 60, 86, 31,111,149, 67,169, 84,250,137, 36, + 98,244,142,136, 16, 95, 43,185,209,185,186,178, 26,179, 30,157, 35,223,115, 48, 19, 31, 47, 91,149,190,115,207,174,164,200,136, + 72, 60, 62,243, 49,228,158,201,193,206,237,219,233,116, 7, 66,236,182, 94,255,129, 3, 7, 48, 97,194, 4,171,177, 40,188,121, +243, 38,158,121,230, 25,161,245,246,237,113, 85, 87, 87, 99,220,184,113, 48,153, 76, 40, 42, 42, 66, 78, 78, 14, 6, 12, 24, 0, + 95, 95, 95,116,235,214, 13, 81, 81, 81, 96, 24, 6, 12,195,160,115,231,206, 13, 81,170, 22, 60,245, 1, 67,134, 12,249,104,204, +152, 49,188,188,188, 60, 31,147,201, 84,190,125,251,118,165, 86,171, 93, 46,147,201,108, 13,216,103, 39, 79,158, 92,188,103,207, +158, 8, 66, 72, 25, 90,216,209, 86, 42,149, 14,155, 31, 31,191,113, 20,159, 79, 42,151, 46, 5, 53, 26, 33,231,241,184, 92,141, +230, 73,153, 76,246,141,173,221,241,214, 91,111,241, 25,134, 65, 77, 77, 13, 10, 11, 11, 43, 6, 13, 26, 20,210,148,111,210,164, + 73,183,253, 70, 88, 88, 88,128,137, 82,104, 53, 26, 92,188,120, 17, 44,203,146,142, 42,254,183, 25, 0,186,173,210,200, 80, 95, +201,216,201, 67,195,158,241,145, 8, 70,178, 38, 78,193,167, 38, 31,248,117,230,149,213,234,160,173,170, 3,132,124,152,106, 85, + 40, 81, 24,128,192,238, 96, 56,131, 24,173,204, 38,184,170, 84,162,143,159, 15, 88, 61,112, 53,251, 91,244,142,155,212,224,192, + 25, 13, 70, 8,192,160, 94,103,222,161,246,129,184,104, 72, 2,195, 90, 77,240, 3,131, 9,246,156,167, 16,136, 1, 97,247, 73, + 48, 20, 31,109,112, 28, 4, 66, 17,140,208,193, 75, 98,222,145,116,215,158,173,248,229, 68,118,252,156,137, 49, 45,183, 70, 28, + 7,161, 65, 11, 35,132, 96, 24, 22,208,153, 27, 54,163,209, 8,189, 78, 0, 30, 95, 0,232, 0,202,153,187, 8,122,132, 71,180, +200,165,209,113,224,241, 8,140,172, 17, 58, 61, 7,165,202, 92, 14,141, 28,133, 65,207, 1,124,128, 39,224,129, 47, 6,136,214, + 4,142,176,224,160,133, 74,107, 9, 72,219,129, 9, 0,195, 1,148, 0, 12,195,129, 16, 30, 56, 74,192, 48,150,177, 84, 28, 3, +142, 97, 64, 56,199, 28,100, 27,239, 95,232,106, 1,242,240,240,128,197,219, 15, 46, 44, 44,172, 88,190,124,121, 60,128,135, 22, + 45, 90, 52,177,103,207,158,106,149, 74, 85,205,178,108,131, 80, 56,163,255,107,214,172,249, 50, 41, 41, 9,225, 65, 65, 13, 39, +195,131,130,252, 44, 81,128,224, 63,162,194, 24, 12, 6,185,213,219,167, 42, 21,254,253,239,127, 67, 95, 93,221, 48,242,173,183, +197, 88, 17,232,245,120,240,193, 7, 43, 74, 43, 42, 30, 9,243,240,216,124, 55,210,102, 59,168,207,182,255,191, 57,196,196,196, + 32, 33,161,103,195,245,205,173, 3, 0, 0,172,222,128, 90, 67, 13,116, 58, 29,252,124,125, 33, 22,138, 96, 52,177,160,148,194, +100, 50,193, 96, 48,192,104, 52,130, 99, 77,142,230, 47,119,165,168,136,137, 12, 15,183,122, 4,220,149,162, 34,230,219,237,255, + 19,219, 70, 4, 34,195,195,107,209, 78,131,217,250, 69, 39,101,151, 20,156,106,151,103,236,234, 24,128,123, 51, 43, 81, 17,158, + 14, 97,247, 62, 32, 17, 67,208, 99,195, 89, 84,233, 56,120,242, 9, 12, 63,253,128,203,133,215,236,238,159,167,101, 13, 56,157, +123, 2, 31,173,252, 16,247,196,141,197, 91,255,239, 29,236,223,187, 31,155, 55,125,131, 49,227,199, 38,117, 11,239, 14,190,135, + 0, 7,143, 30,196,150,175,191,193,142, 31,182, 99,247,238,221,244,255,254,239,255, 72, 43, 34, 75,155, 10,191, 21,181,181,206, +111,112,167, 82,169,224,235,235,123, 28,192,168,240,240,112,196,196,196,128,199,227,129,227, 56,244,232,209, 3, 34,145, 8,117, +117,117, 8, 15, 15,135,183,183,247,117,149, 74,213,163, 37, 46,153, 76,118, 81, 42,149,166,238,216,177, 35, 49, 50, 50,178,223, +246,237,219,235, 21, 10,197,187, 50,153,108,139, 77,250,167,223,123,239,189,175,108,216,176, 97, 27,128, 10, 0,201, 0,126, 6, + 48,180, 25,190,179, 82,169, 52,213,239,212,169, 55, 30,102, 89,124, 8,112, 95,214,215, 63,214,132,239,161, 23, 94,120,225,195, +185,115,231,226,218,181,107,216,189,123, 55, 88,150, 61, 4,224,225,214,238,219, 18, 5, 96,252,120,188,106, 47,131, 1,234,179, +103,105, 48,199,169,174, 2,170,187, 45,254, 81, 81, 81, 56,119,238, 92,179, 33,127,123, 93, 0, 61,167, 15,239,190,196, 71, 34, + 24, 89,169,212,237, 63,118,165,114, 57,120, 34,224,242, 81,220, 31, 78,177,248,249, 7, 17, 51, 48, 28, 47, 72, 39, 99,106, 47, + 3,112,225, 0,168, 64,194,162,213,193, 58,181,200,175, 45, 6, 95, 4, 60, 48,245,101,108,249,100, 25, 0, 3,160,209,195,164, + 5,126,144,159, 67,214, 73,243,140,194,174,221, 35,192,240,237,139, 87,226, 80, 2,163, 14,216,181,123, 31,134, 79,124,222,236, +253, 67, 0,158, 4, 72,153,146,140,196,241,211, 0, 0, 37,215, 11,192,234, 12,173, 91,244,148,130, 37,102,129,215, 27,204,131, +255,244, 58, 45, 52, 26, 13,234,235,235,161, 82,214, 65,165, 82, 65,169,170,135,174,190, 30, 90,173,182,229,194, 95, 79,160,213, +153,160,213,153,160,214, 24,161,170,215, 67,161,210,163, 86,105, 64,157,202,136,218, 90,243,255,154,106, 22, 53, 10, 22, 53,117, + 44,170,106, 12,184, 85,213,114, 26, 25, 74, 97, 2, 64, 76, 4,132,225, 64, 9, 5, 40, 5,165, 60,152,184,223,179,143,179,180, + 30,206,198,198,251,143,233,143,156, 61, 57,216,127,104,127,131, 81,112,249,250,101,135,190,203,227,241,192, 55,231, 87, 24,128, + 94, 43, 86,172, 56, 15, 96,245,235,175,191,254, 82,207,158, 61, 89,115,144,192,156, 48, 39,197,159, 8, 67, 67,119, 2, 64,104, +104,232,109, 31, 62,247,220,115,236,169,203,151,183,158,189,112,161,221,194,186,171, 87,175,150, 59,186,111,188,209,102,138,197, +247,223,127,143,171,229,230, 46,156, 31,179,179, 27,125,118,249,242,229,144,224,224, 96,197, 31, 97,168, 36, 36,244,100, 44, 13, + 90,211, 6,191,209,231,118, 13, 60, 31,239,223, 56,147, 9,202, 26, 5,170,170,170, 80, 93,171,128, 90,163,129, 90,163,129,170, +190, 30,234, 58, 37, 84,181,255,159,189, 43,143,111,162,218,254,223, 59, 89,154,182, 64, 23,118,202, 90,164,236,178, 20,161, 5, +129, 4, 82,168, 34, 42, 74, 1,225,137,125, 5,155,226, 6, 34, 62, 84, 84,220, 80,121, 63, 11,184,210,212, 39,130,239,129, 64, +139, 11,155, 44,129,164,178,180,212,130, 11,139, 64,161,208, 66, 89, 10, 77,186, 37,105,182,185,191, 63,146, 9,105, 73,147, 73, + 90, 4, 53,223,207,167,144, 89,114, 50,115,231,206,253,158,115,238,185,231, 84,160,214,104,128,185,182, 22,172,213,235,252, 38, +211,163,107, 87,110,204, 96, 1,152, 93,167, 3, 0,224,127,155,182, 96,113,250,199,225, 0,218,250,122,223,191, 31,201,150,170, +178, 94,170,211,217,206, 30,255,225,246,186,255, 1, 92,158,218, 21, 93,190,252, 25,164,219,221, 48,229,100,163,248,159,131, 16, + 42, 36,216,151,208, 26,214,202,107, 24,178,163, 12, 94,102, 0, 48,121,242,100,242,228,220, 57, 56,115,234, 20,114, 53,251, 16, +214, 60, 12,143, 77,125, 12,225, 45, 35,113, 36,191, 0,205,196, 18,132,134,134,162,125,215, 14,248,122,253,215,120,105,209, 43, +168,169,240,191, 74,237,224,193,131,125,254, 78,243,230,205, 81, 89, 89, 57,140, 97, 24,115,167, 78,157, 48,116,232, 80,244,237, +219, 23,173, 90,181,130, 68, 34, 65,215,174, 93, 49, 96,192, 0,132,135,135,163,186,186,186, 75,243,230,205,225,133, 88,255, 47, + 39, 39,103,247, 87, 95,125, 37,210,233,116,175,214, 35,235,164,145, 35, 71,174,248,242,203, 47, 87,181,109,219,246, 93, 66, 72, + 51, 0, 47, 1, 88,236, 65,222,162,119,170,171,255,111,150,213,106,251,194,104,156, 94, 79,222,228,105,138,215,191,121,118,222, + 11,130, 83,167, 78,225,208,161, 67,248,242,203, 47,107, 0,188,204,243,246,153, 16,147, 73, 66,127,255, 29,157, 84, 42, 18, 85, + 90, 42, 0, 64,151, 45, 91,134,173, 91,183,254,161,253,173,190, 71,175, 33, 15, 95,253, 65, 32, 72,192,144,230, 37,229,250,181, + 95,231,158,123,249,151, 98,109,190,209, 70,206,224,250, 57, 72,190,121, 10,239,142,168, 70,193,155, 67,241,161,172, 6,161,223, + 61, 13,104, 47,162,134, 74,142, 58, 52,175, 6,112, 35,170,255,215,223,182,224,245,215,191,194, 93, 45,250,227,248,193, 95,177, + 75,253, 59,100,241,125,145, 48,210,222,209,168, 64, 8,179, 15,241, 17,137,131,122,225,157,255,123, 31, 59,142, 86,161, 89,215, + 62,120,224,129,137,216,185,247, 91,108,219,105,143,178,100,108, 22, 4,137, 60,143,115,148,181,193,198,218,173, 25, 56,172, 25, +179,217,140,218,218, 90, 24,141, 70,232, 13, 70, 24, 13,122, 24, 13,122, 24, 76,181, 48,155,106, 27,118,127, 25,155,163,178,198, +134, 42, 35,139, 42, 35,107,255, 92,205,162, 70,111, 69,141,193, 10,157,214,134,114,173, 5,229, 58, 11,202,203, 45,184,126,221, +140,171,215, 45, 30, 21,128, 27,238,127,151,107,230,220, 55, 2, 10, 1, 33,160,245,162,254, 41,241, 78,182, 47,206,124, 17,189, +227,123, 59,183, 85,171, 85, 78,143,192,129,237, 7,112,170,248, 20,175,100, 79, 44,107,255,173,236,236,236,253,148,210,126,147, + 39, 79,158,217,173, 91,183,214, 0, 24,150,101,131, 44, 22, 75,132,213,106,109,225, 70, 1, 96, 61,184,254, 23,127,250,233,167, +247, 79,158, 60, 25,221, 90,183,230, 53,117,213, 24,136,218,180,145, 2,192,144, 94,189,100,222,206,237,209,174,157, 44, 61, 61, + 29,199,139,139,171,190,217,181, 11, 39, 79,158,116, 90,253, 61,123,246,132,227,152,249,155, 93,187, 80, 92, 92,140, 83, 5, 5, + 70,111, 50,111, 69, 12, 0, 0, 58,122,244,232,167, 92, 73,159,251, 63, 54, 54,150,151, 59, 23, 0, 10, 79,158, 45,176, 90,173, + 48,155, 77,208, 94, 45,195,181,203, 87,112,253,202, 85, 92,191,114, 21,218,178,107,168, 40, 47,135, 73,175,183,199,207, 84, 84, + 96,144, 92,238,173, 13,173,139,211, 63, 22, 46, 78,255, 88, 8,160, 10, 0, 59,108,240,221, 55,157,228, 18, 23,192, 27, 39,142, +100, 75, 75,207, 22,168, 7, 12,189,113, 13,231,206, 28,148, 86, 92, 43, 82, 55,166,127,144, 41,186, 58,150,191, 63, 56,173,213, +163,100,246, 61,160,231,126, 67,155,207,143, 32,116,229, 97, 92,158,218, 21,177, 59,202, 64, 68, 65, 16, 18, 64,200,120, 87, 64, +159,126,230, 25,242,218,251,239,224,185, 5,243, 97, 97,109, 56,121,190, 16, 51, 30,155, 14,177, 68,130,239,191,219, 12, 88,108, + 48,213,154,176,175,224, 32,140,198, 26,164, 38, 39,231, 20, 20, 20, 80, 15,132, 72, 38, 77,154, 36, 27, 55,110, 28, 8, 33,216, +189,123,247, 77, 46,253, 23, 95,228, 31, 39,212,178,101, 75, 92,186,116, 9, 0,132, 25, 25, 25,184,118,237, 26,250,247,239,143, +240,240,112, 48, 12,131,252,252,124, 48, 12, 3, 66, 8, 46, 93,186,132,150, 45, 91,122,149,169, 84, 42,223, 53,155,205,163,148, + 74,229, 6, 23,178,126,108,228,200,145,233,179,103,207,142,200,200,200,144, 16, 66, 24, 0,223, 2, 88,160, 84, 42,175,122,145, +247,175, 67, 22,203,144,250,242,166, 45,252,102,227,163,211,159, 38,247,207,201,128,230,208, 9,164,167,167,179, 85, 85, 85, 41, + 74,165,242, 60,143, 41, 68, 0, 96,239,106,222, 60,188,211,149, 43,184,215, 96, 64,123,145, 40, 52, 84, 32, 96, 74, 75, 75,111, +138,197,249,163,148, 0,238,143,215, 20, 0,128,179, 95, 31, 60,247,140, 86,111, 58, 12,123,224, 86,251,220,194,107,153,163,122, +181, 93, 36, 60,119, 40, 18, 95, 62, 14, 4,133, 2, 38, 61, 64, 41, 44, 2,201,213,125,199, 47,127, 1,160,193,236, 75,235,214, +126, 38,155, 62, 99,166, 26, 0,244,172, 5,103, 42, 74, 0,216,112, 87,139,110,144,201,238, 70,219, 86,237, 80, 94, 89,101,247, + 21,152,173,184, 92,161, 71,111, 15, 55,213,177,115, 60, 46,150,228, 58,222, 76, 33, 18, 7,216, 99, 0,118, 28,181, 96,231,214, +108, 92,189,126, 9, 45,195,237, 43, 9,194,197, 34,220, 61,196,243,122, 80, 51,132, 16,179, 86,216, 32, 0, 75, 8, 24, 27, 11, + 88,172,176,137,132, 0, 97,192,189,147, 44,133, 61, 87,128, 7, 60, 60,237, 37,242,221,127, 23,208, 16, 49,133, 80,228,226, 97, +176, 0, 86, 10,212,154, 1,155,201, 6, 66, 8,136,152,192,106, 3,244, 38, 96, 86,242,191,137,187, 84,142, 54, 23, 13,141,101, + 88, 16,135,251,223,174, 20, 16,216, 88, 6,140,192,110,245, 51, 0,168,128, 2,148,159, 23,192,149,252,221,109, 31,216,126,160, +155,215, 41, 9,155, 13, 38,147, 9,147, 39, 79,238,155,157,157,189, 28,192,192,236,236,236, 29,217,217,217,251, 38, 79,158,252, + 76,247,238,221, 45,132,144,150, 31,126,248,225,174,151, 94,122,105,134, 86,171,205,241,160,124, 58,251,228,130, 5, 11, 22, 47, + 88,176, 0, 59,118,236,128,254,234,205,239,114,183,214,173,113,238,220, 57, 0, 80,243, 73, 12,212, 80,210, 31, 81,155, 54,210, + 79, 63,253, 84, 77, 41,197,144,158, 61,101,131,121,172, 44,232,223,187,183,134, 48,204,248,147, 63,253,212, 21, 64, 16,128,143, +184,213, 0, 61,218,183,199,252,249,243,113,224,192,129,165, 49, 49, 49, 57,253,162,162,188,198, 40,184,203, 3,224,111, 12,128, + 43,184, 60, 0,113,113, 73, 63,229,229,149, 29, 80, 40, 20, 98,199, 52,193,112, 0,185,124,147, 0,117, 29,208,231, 21,227,229, + 43,227, 88,171,173,151,190,178, 18,149,215,175,129, 16, 6,148,178,168,173,173, 5,165, 20,148, 82,156, 59,241, 59, 44,102, 19, +238, 26, 18,235,173, 13, 93,199,156,112, 0,204,253,178,209,236,253,178,209,117,130,254, 28, 83, 4,188,113,242,151,111,164,151, +206, 22,168, 1,160,107,151, 46,248,190,158, 23,160,117,231,193, 50,220, 70, 12,249,161, 12, 5,247, 1, 3, 99,229, 40,123,122, + 56,218,125,118, 16,167,181,122, 68,136, 9,202,181, 58, 8, 9,241,234, 1,224, 48,115,230,204, 58,103,110,217,178,133,222, 63, +225, 62,108,221,188, 21, 27, 55,110,196, 27,139, 94,195, 46,205, 30, 8,132, 2, 68,117,140, 26, 93, 89,233,121,233,114, 98, 98, +162, 38, 49, 49,145,236,216,177, 67, 58,110,220,184, 58,177, 0,187,119,239,198,153, 51,103,106,149, 74,101,123, 62,215,214,181, +107, 87, 20, 21, 21,161, 79,159, 62,214,121,243,230,137,215,175, 95,143,176,176, 48,156, 60,121,242, 38,207,107, 81, 81, 17,186, +242,124,206, 74,229,141,196,115, 10,133,226,241,123,238,185,231,173,199, 30,123, 44,172,160,160,160,121,109,109,237, 63,131,131, +131, 31, 48, 26,141, 31, 40,149,202,239,121,202,251,197, 85,222, 3,207,174, 95,115,239,216, 73,228,223, 42,128,116,120, 16,239, +174,120,133,106, 11, 79,166, 40,149,202, 44,111,178, 92,188,108,164,218, 98,169, 16, 7, 5,161,133, 88,140, 96,155,205,164,183, +217,108,183,131,252,249,162,142, 2, 32,121, 76,121, 92,251,181,226,180,228, 49, 37, 55,165, 89,114,236,107,197, 15,213,181, 86, +253,176,187, 90,221, 31, 25, 34,184, 71, 96,170, 13,181, 82,166,186,188,218,156,151,123,230,202,206, 82,173, 33, 71,242,152,242, + 50, 86,174,116,251, 3, 53,250,214,154,180,167,231,200, 0,168, 89, 1, 55,205, 39,192,153,170,203,120,253,153, 20, 24, 12, 38, + 84, 25,237, 49, 0,102, 38, 8, 99, 18, 61,167,217,125,109, 81, 50,217,177,109,136,253,229,182,113,150,179, 21,137,253, 9,166, + 61,181, 12, 33, 33, 65,104, 17, 44,145, 1, 80, 23, 30, 59, 34,139,239,231, 57, 33,136,144, 90, 97, 38,118, 37, 0,132,192, 70, +169, 93, 17,224, 18, 54, 16, 6, 66,150,133,149, 91,118,224, 69, 9,168, 48,134,195,104, 42,135, 88,200, 56,211,156, 89, 89,192, + 98,161,176, 88, 41,106,140, 44,136,128,192, 6, 2, 11,123,195,117,239,150, 96, 89, 6, 12,177,129,216, 8, 40, 67,157,238,127, +210,128,241,204, 73,122,238,121, 25, 89,185,242,164, 71, 11,239,247,220,223, 27,219,119,204,148, 82, 24,141, 70,244,239,223,255, +114,116,116,244,164,243,231,207,247,216,184,113, 99, 62,128,135,178,179,179, 31,114, 61,249,253,247,223,215,188,244,210, 75, 50, +173, 86,235,141, 32,156, 13,146,150,150,214,224, 73,143, 62,241, 4, 0,223, 18, 3,113, 89,247,234, 99,104,239,222, 62, 45, 43, +236,215,179,231, 46, 87, 79, 70,122,122,250, 39, 19, 39, 78,180,158, 58,117, 74, 88, 92, 92,140,174, 45, 91,230, 70,133,132,240, + 10, 80,188, 21,121, 0,234,145,251,213,156,156, 28,215, 24,143,163, 14, 69,128,111,198, 64,125,112,251,118,143,158,220,179, 55, + 55, 60, 52,180, 69,149,174, 2, 86,171, 21,212,241, 30,232,174,150,161, 74,167, 3,165,148,143,245,111,127, 89,111,196,156, 48, +142,229,128,140, 99,217,159, 51, 49, 80,225,249,243,252,149, 0,195,175,210,139,133,249, 78, 43,255,251, 44,251,242,191,214,209, + 35,100, 3, 98, 39,106,110,223,240, 74,111, 86, 2,240, 57, 6,166,189,142, 43, 44,139, 1,171,243,145,159,216, 22,125,183, 94, +133,144, 0,205, 69,254,173,152,157, 56,113, 34,217,171,217, 75,199, 36,140,197,230, 77,223,225,237,165,239, 99, 97,101, 37, 40, +203, 98,195,134, 77, 40, 45, 45,125, 0,128, 87, 31,180, 59, 69, 0, 0, 38, 77,154,244, 11,128,106, 62,215, 18, 31, 31, 79, 46, + 93,186, 68,143, 28, 57, 34, 30, 60,120, 48,198,142, 29, 11,181, 90,141,206,157, 59,195,100, 50, 97,244,232,209,160,148,178, 71, +142, 28, 97, 68, 34,145,207, 25, 1, 21, 10, 69,159,176,176,176,229, 83,167, 78, 21,157, 56,113,162,133,201,100,106, 40, 48,144, +175,188, 65, 81, 3,167,172, 25, 56,106, 42,249, 34, 7,168, 50, 2,230,115, 59, 88,109,161,186,126, 96,160, 39,101,130, 83, 2, +132,218,202, 74,171,216, 98,129, 65, 44,134,208,158,245,135,253,163,123, 29,151, 7,192,213,242,119,183,207,173, 43,213,133,252, +185,237,223,139,191, 86,148, 20, 95,175,201, 5,208,222,241,242,154, 0,148, 2, 40,146, 60,166,244,234,226, 28, 60,224, 65,205, +241,223, 74,100, 54,218, 76,237,250,114,212,232,171, 32, 16,134, 1, 76, 8,254,245, 1,255, 20,147,137, 19,250,145,119,230, 60, + 32, 5, 99, 80,187, 54,111,179,102, 97,176, 89,116, 0,213,163,248, 96, 38,153, 57, 45,209,171, 44, 11, 4, 0,165,118,162,134, + 0, 98,234, 80, 4, 28,228,111,207, 1, 8,128,231,218,205,228,212, 87, 73,230,199,111, 80,171, 69, 11,161, 99, 97, 47,165, 20, + 54, 43, 69,173, 5,168,170,182,194, 2, 10, 43,101, 32, 20, 17, 44,121,235,147, 6,239,123,246,108,123,144,214,154,213,103, 40, +177,216,173,127, 10,128, 82, 2, 80,135,197, 64, 5, 32, 2, 22, 44, 43,196, 11, 11,198,241,106,195,217,111,207,150,157, 63,123, +222, 19, 1,139, 96, 95,170,225,137,157, 88, 0, 48,153, 76,208,233,116,186,176,176, 48,196,198,198,254, 58,116,232,208,160,107, +215,174,225,236,217,179,246,229, 97, 44, 43,221,180,105,147,218,161, 4,168,121, 40, 1,150,164,196,196,164,174,253,251,219,238, +233,213, 75,239,232,163, 38,212, 93, 17,137,164, 68,251,179,237,202, 35, 41,208,139, 47,190, 40, 3,128, 33, 61,123,222,116, 44, +118,192,128, 70, 17, 68,255,222,189, 63, 99, 24,198,118,242,167,159, 66,219,182,109,123,189,223,240,225,107,110,167, 70,239,134, +212,245,177,177,177,174,209,214,206,117,172, 62, 40, 1, 39, 6,141, 29, 51,108,243,127,190,216, 20,221,173,107, 31,147,169, 22, + 54,139, 21, 44,203,162,121, 68, 4, 42,181, 90, 12,146,203,101, 60,172,127, 0,168,120,243,133,103,219, 0, 48, 23,158, 63, 47, +230,230,255, 15, 29,249, 13,247,203, 70,179,139,211, 63,246,150, 28,200,137,152,246, 58,122,242,212, 73,217,222,157,223,215,113, +241,143, 25,255,144,140,105, 17,223,168,231,218, 80,128,159,251,253,252, 57,108,200, 15,101,192, 15,207, 56,183,239,250,254,198, + 18,224, 74,139,255,235,195,199, 72,199,144,175, 74,190,186,111,220,132,196,237, 79, 62, 62,107,255,221, 3,250,223,187,249,251, + 45,200,253,229, 48, 82, 83, 83,183,173,108,192, 64,243,162, 8,204,250,246,219,111,255,243,237,183,223,198, 37, 38, 38,242,190, +184,113,227,198,141,217,181,107,215,222,173, 91,183, 34, 58, 58, 26, 9, 9, 9, 8, 11, 11, 59, 93, 89, 89, 25,115,252,248,113, + 20, 21, 21, 49, 34,145, 8,227,198,141,147,251,122,159,142,192,192,165, 91,182,108,105, 48, 48,208, 71,121, 63, 43, 20,138,247, +190,203,126,240, 21, 99,212, 12, 24,127,122,149,189,180,111,201,227,190,202,115, 40, 1,181,197,101,101,162, 23, 78,159,190,104, + 51, 24,152, 95, 25, 70,212, 78, 32,184,162, 80, 40,110,203, 20,128,187,108,128,222,166, 0,220, 66,242,152, 82, 15,224, 55,199, +159, 95,120,252,241,103, 52,105,105, 47,201, 50,148,111,171,163,186,244, 0, 96,130, 40, 72,130,139,151,171, 48,122,226, 76,226, +187,188, 7, 53,119,245,138,193,234, 85,223, 0,108, 49, 0, 33,172,181, 70, 68,181, 15,147,117,110, 97,229,255,242,219, 88, 8, + 25, 22, 22, 34,132,136, 90,111, 40, 2,176, 2,212, 6,190,129, 97,174, 72,125,246, 13, 2, 0,139, 95,158, 67, 69, 66,187,181, +111,101,237, 46,243,138,106, 10,155, 21, 16, 8, 89,124,246, 41, 63,165,231,137,100,123,106,228, 85, 95,156,162,224,114,194, 51, + 0, 75,236,238,254,249, 11, 30,240,233, 34, 43,107, 42, 53, 17,109, 35, 26,219,191, 24,192,190,138,194,104, 52,194,102,179,161, +170,170, 10, 2,129, 0, 54,155, 13,237,218,181,131,197, 98,129, 82,169, 84,215,243, 4,168,189,213, 12, 24,212,191,127, 54, 0, + 52, 69,198, 63, 0,136, 36, 68, 3, 0,145, 3, 6,220, 18, 51,175,111,207,158, 25,141, 17,240,194,226,197,117, 86, 73, 44,120, +227,141, 58,158, 1, 95,230,254,221,144,185,222,211,106, 0, 31,210, 1,159,124,112,246,172,126, 0, 4, 39,115,114, 44,181, 6, + 35, 88,155, 13,189, 99, 99,101,237, 99,250,160,235,128, 62,252,222, 57, 74,166,238,252, 97,155,115,115,120,159,104,231,231,157, + 63,108,187,105,219, 83,104,252,233,203, 17,132,105, 17,143,177,227,137,236,196,201,179,184, 92,124, 84, 13, 0,123,119,126,175, +110,219,249,172,172,255,176,127,248,172, 4, 76,153, 50, 5,190,166,247,181, 17,207,121,183, 75, 38,181,195, 15,151,106,111,249, +128, 63,115,230,204, 31, 0, 48, 5, 5, 5,236,158,188, 28,180,108,213, 18,141,169,207,145,152,152,248, 69, 98, 98,226, 87,240, +158,222,185, 14,154, 55,111,174,126,244,209, 71, 73,110,110, 46, 61,123,246, 44,242,243,243, 81, 93, 93, 29,211, 20,181, 0, 28, +100,251,127, 10,133, 66,148,155,155,219,223,108, 54,191,234, 58,151,239,167,188, 69, 10,197, 63, 68, 97,221,191,154, 95,121,118, +215,140, 70,200,179,174, 63,116,232, 1, 0, 9, 0,126, 6,203, 86, 3,184, 58,109,225, 55, 72, 13,123, 4,153,149,127,140, 18, +192,173, 2,112,183,223, 47, 5,192,215,169,132, 6, 93, 85,143, 60,161,217,182,243, 12,121,120, 66, 8,109, 19,213, 9,218,106, + 43, 70, 79,120,220,239,142, 16,127, 79, 47, 18,127,207, 43, 80, 40, 94,167,192, 85, 68, 52, 23,162,115, 36,235,211, 75, 63,228, +159, 11,110, 89,150,176, 55,223, 91, 73, 0, 96,238,188,103,168,217,104, 1, 11,251,178,185,229,159, 46,247,235, 55, 83,102,217, +107, 6,172,250,207, 73,202, 82, 1, 94,126,233,161,219,153,225, 76,236,234,198, 54,153, 76, 48,155,205, 78, 34,227, 8, 44, 80, + 37,208,139, 11,210,135,244,195,126,194,188,112, 97, 82,144,195,131,210,216, 20,100, 20,128,181,215,232,209,117,174,185,107,251, +118,188, 5, 4,177, 38,205, 19, 19,125, 54,252, 80,191, 20,112, 29,251,187, 69,156,166,239,208, 56,244, 29,138, 70,183,165,183, +194, 62,245,117, 96, 43, 9,130,145,241,188, 34,245,108,181, 21, 49,205,249, 12,145, 77,210, 21,232,144, 33, 67,154,178, 79, 89, +252,253, 98,124,124, 60,241,150,136,173, 17,164,253,174, 66,161,248,206, 53, 54,160,145,242,254,165, 80, 40,214,185,198, 6,248, + 33,195, 2,160, 2, 64,189,184,129,107,127, 24,249,123, 34,123,183, 61,110,224,192,129,119,106,249,200, 0,254, 68,232,209,163, + 7, 10, 11, 11, 3, 13, 17, 64, 0, 1, 4,240, 39, 1, 19,104,130, 0,154, 2, 1,242, 15, 32,128, 0, 2, 8, 40, 0, 1, 4, + 16, 64, 0, 1, 4, 16, 64, 64, 1, 8, 32,128, 0, 2, 8, 32,128, 0, 2, 10, 64, 0, 1, 4, 16, 64, 0, 1, 4,112,219, 81, + 39, 52,117,206,156, 57,126, 71,143,186,203,100, 23,144, 23,144, 23,144,119,103,200, 83, 40, 20, 84,169,108,120,217,105,160,253, + 2,242, 2,242,254, 90,242,124, 86, 0,184,129,194, 87, 33,158, 6,150,166,150, 23,192,157, 9,111, 4, 19,192,157,249, 28,124, + 60, 63, 20,192, 61,251,247,239, 95, 34, 16, 8,134, 7, 5, 5,193, 96, 48, 28,188,247,222,123, 23, 1,200, 7, 96,184, 19,218, + 64,165, 82, 73,179,178,178,212,127,197,113,229,216,177, 99,200,207,207,247,122, 94, 94, 94, 30, 61,118,236, 24, 50, 51, 51, 73, +191,126,253, 26, 45,143,195,208,161, 67,225, 73, 94, 0,127, 98, 15, 0, 7, 95,210,147,242, 73,148,227, 78, 94, 67,229, 97,253, + 73,188,243, 87, 31,208,249,158, 59,126,252,120,217, 35,143, 60,162,225, 43, 51, 42,234,230,210,203,165,165,165,117,182,147,146, +146, 32,151,203, 9, 31,121,183, 82, 9, 24, 63,126, 60, 5,128,157, 59,119,146, 59, 65,158, 94,175, 31,187,105,211, 38,213,233, +211,167, 1, 0,209,209,209, 15,166,164,164,108,241,247,249,186,246,123, 74,169,243,253,224,246,115,239, 10, 33, 4, 25, 25, 25, +196,147,242,204,247, 57,248,248,188,250, 28, 59,118,108, 83, 85, 85, 85,175, 46, 93,186,224,250,245,235,168,173,173, 5,128,225, +155, 54,109, 82,135,134,134,158, 76, 76, 76,124, 24,128,199, 82,146, 35, 70,140,240,201, 32, 56,112,224,128, 12, 60, 83, 61,115, +200,202,202, 82, 39, 37, 37,201,228,114,185,198,215,231,145,154,154,234,211,245, 77,153, 50,133,247,251,193,161, 75, 23,123, 5, +220,234,234,106,152, 76, 38,174, 63,241,122,223,242,243,243,241,223,255,122,206, 80,107, 50,153,232,240,225,195,209,187,119,111, +172, 93,187,182,204,100, 50,117,110,104, 93,120,126,126, 62,102,204,152,193,235, 94,175, 94,189,138, 37, 75,150,224, 78,206,109, + 31,192, 13,212, 79, 6,116, 43, 19, 1, 5,172,216, 91,136,239, 51,188,167, 52,126,120,206, 14,159,100,170,213, 55, 12,164,211, +167, 79, 35, 52, 52,212, 57, 8,185,180, 7, 31,107,139,214,223,174, 63,128,169, 84, 42,154,149,149,229,183, 5,182,110,221, 58, +233,248,241,227, 27,148,223, 24,164,165,165,209, 81,163, 70,201,166, 79,159,238, 19, 89,108,218,180, 73,213,166, 77, 27,204,156, + 57, 19, 58,157,142, 77, 79, 79,223,172,211,233,166, 69, 68, 68,248,148, 69,140, 16,130, 31,126,248,193,185,157,152,152,136, 29, + 59,118,120,220,246,134,250, 74,128, 66,161,160,177,177,177,200,204,204,164, 92, 98, 38, 95,201,191,178,178, 50,183,123,247,238, + 45, 0, 64, 34,145, 32, 56, 56, 24,101,101,101,168,168,168, 64, 88, 88, 24,202,202,202,122,237,216,177, 35, 63, 49, 49,177, 39, +128, 43,158,132,245,235,215, 15, 73, 73, 73,136,142,190,145,245,111,233,210,165,117,206, 89,184,112, 33,103,201,170,167, 79,159, +238,243,243,246,135,252, 57,172, 88,177,162,161, 67,206, 90, 5,254, 34, 52, 52, 20, 39, 78,156,128, 72, 36,130,217,108,198,142, + 29, 59, 80, 88, 88,136,151, 95,126,217, 39, 57, 87,235, 21,201,122,240,193, 7, 5, 0,228, 63,254,248,227,142,209,163, 71, 95, +125,248,225,135,219,170, 84, 42, 8, 4,130,214,225,225,225, 2, 95,100, 53,132,243,231,207, 7, 72,226, 79, 74,254,220, 62,175, +181, 0,254,172, 88,181,106,149, 52, 37, 37, 69,211, 88, 57,127, 22, 87,118,212,144,119,110, 88,237, 5,175,250, 37, 67,167,211, +193, 96, 48, 56, 45,144,204,204, 76, 87, 75,136,175,181,117,211,182, 92, 46,199,238,221,187, 41, 33,228,166,227,254,224,199, 31, +127, 84,191,248,226,139,200,206,206,198,228,201,147,155,164,253,118,238,220, 73,246,236,217, 67, 41,165,200,201,201, 81,231,228, +228,248,164,160,156, 62,125, 26, 51,103,206,100, 1, 48, 98,177,152,137,137,137, 65,122,122,250,122, 0,235,163,163,163, 39,164, +164,164,108,231, 35,231, 86, 20, 3,226,148,128,204,204, 76,202,165, 1,230,254, 87, 40, 20, 52, 41, 41,201,151,123, 13,213,233, +116,155, 36, 18, 73, 11, 0,120,250,233,167, 81, 91, 91,139,140,140, 12, 4, 7, 7, 59,203,102, 11, 4, 2, 84, 86, 86,182, 0, +144, 14,224, 31,158, 4,114,228, 94, 84, 84,116,211,190,166, 64, 82, 82,146,204,113,159, 50,127, 21,129,231,159,127,222,249,121, +249,242,229,220, 71,166,222,126,222, 10, 1,231, 53,121,245,213, 87, 17, 26, 26,138,236,236,108,140, 30, 61,218, 47,242,175,143, +145, 35, 71, 2,246, 44,141,255,124,252,241,199,209,163, 71,143,182, 59,118,236, 64,121,121, 57, 87,114,215,236,229, 93,104,234, +238, 39,157, 48, 97,130,122,219,182,109,238,188, 55,210, 49, 99,198,168, 9, 33,216,179,103, 79,192,221,123,139,201, 63,117,225, +251, 0,128,204,165, 47,185, 85, 2,254, 16, 5, 32, 51, 51,211,221,131,166, 13,237,247,231, 55, 14, 29, 58,164, 6, 32,107,172, + 18, 48, 99,198,140,191,205,124,182,193, 96,184,201,234,247,135,104, 56, 98,153, 60,121, 50, 18, 18, 18, 8, 0,100,103,103, 55, +201, 53,174, 91,183, 78,234,176,232, 72, 89, 89,153, 52, 43, 43, 75, 93, 86, 86, 38,245,213, 98,119,135,177, 99,199,146,177, 99, +199, 98,221,186,117,210,156,156, 28,245,186,117,235,124,146,171,211,233,172, 17, 17, 17,226, 77,155, 54,193,225, 13,168,213,233, +116, 76,122,122,250, 54,157, 78, 55, 46, 34, 34, 98,247,237,124,190, 28,233,187,246,101,133, 66, 65, 57, 37,141, 39,238, 41, 44, + 44,236,213,191,127,127,204,154, 53, 11,149,149,149, 40, 47, 47,135, 72, 36,130, 80, 40,132, 80, 40,132, 72, 36, 66,112,112, 48, +180, 90, 45, 84, 42,213,116,185, 92,254,172, 55,161, 69, 69, 69,117,148, 67, 78, 1,224, 60, 1,177,177,177,190, 92,163, 59,235, + 95,150,149,149,165,110,140,231,201, 5,214, 6,198, 74,222,222,128,243,231,207, 35, 39, 39, 7, 19, 38, 76, 64,151, 46, 93,208, +170, 85, 43,228,228,228,224,229,151, 95,118,122,223, 4, 2,129,207, 23, 54,114,228, 72, 44, 90,180, 8, 75,150, 44,105,159,146, +146, 50,245,177,199, 30, 67, 66, 66, 2, 0, 64, 32, 16,204,108,217,178,229, 22,165, 82,105,241, 84, 12,104,221,186,117,188,188, + 0,165,165,165,152, 54,109, 26, 63, 3, 37, 42, 10,169,169,169,234,162,162, 34,168, 84, 42,174,253,165,169,169,169,106, 78,129, + 14,224,214,130, 35,127,238, 51,167, 4,252,225, 30,128,134,230,177,253, 9, 16,188,213, 74,192,253,247,223,223,104, 79,128, 47, +247,229,203,111, 60,250,204, 78,108,250,100,124,147,180, 21,247, 2, 54, 84,169,234,224,193,131,141, 86, 12,154,226,249,254,248, +227,143,106,206,234,159, 62,125,186,230,199, 31,127, 68,155, 54,109,212,104,162,196,233,156,220,156,156, 28,228,228,228,120,117, + 55,235,245,250,251, 55,109,218,180, 13, 0,210,211,211,197,209,209,209, 72, 73, 73,225, 14, 75,126,251,205, 94, 47, 43, 61, 61, +125, 87,116,116,244,195, 41, 41, 41, 94,235,147, 39, 38, 38,214,137,137,185,239,190,251,234,120, 6,248,184,253,221, 40,221,212, + 93,255,226,158,139,235,116,128, 39,236,216,177, 99, 73, 76, 76, 12, 0,224,204,153, 51,160,148,226,212,169, 83,206,186, 15, 66, +161, 16,132, 16,216,108, 54, 24, 12, 6,124,251,237,183,144,203,229, 94,171, 46,185,146,127, 82, 82,146, 91,229,197,117,138,192, + 31, 37, 64, 46,151, 19,133, 66, 65, 27,235, 13,104,138,113,210, 98,177, 96,240,224,193,208,104, 52, 24, 50,100, 8,244,122,189, +115,106, 71,163,209, 96,252,248,241,176,114, 37,200,125,179,252,177,100,201,146, 14, 41, 41, 41, 23,191,248,226, 11,231,177, 14, + 29, 58, 96,217,178,101,255,229, 75,216, 77, 12,205,225,195,135, 17, 27, 27,139,232,232,104, 12, 30, 60,152, 30, 57,114, 68,198, +145,127, 81, 81, 17, 52, 26, 13,159, 24,149,161, 0,158, 1,240, 79,165, 82,105,243,112,222, 4, 0, 81, 0,190, 85, 42,149,215, + 2,212,255, 7,118,108, 62,248, 35,131, 0,155, 66, 9,232,218,181,107,163, 60, 1,220, 32,187,118,237, 90,183,199,183,111,223, +142,181,107,215,250,101,153,228,157,235,131,184,110, 39,252,118,251,115,112,157,243, 87,169, 84,144,203,229, 78,183,255,193,131, + 7,209,169, 83,167, 38, 81,250, 26, 99,125,113,214,255,245,235,215,157,117,230,165, 82,169,172, 41,189, 0, 28, 70,143, 30, 45, +203,201,201, 81,123, 59,111,211,166, 77,219,184,185,127,189, 94,143,165, 75,151,162,166,166, 6, 34,145, 8, 65, 65, 65, 56,119, +238, 28,222,121,231, 29,232,116, 58,164,167,167,127,167,211,233,198, 68, 68, 68,168,189,144,108, 29,178,247, 22, 19,208, 20,138, +231,225,195,135,235,156,223, 80,144, 88,100,100,228,112,147,201, 4,171,213,138,131, 7, 15, 66, 32, 16,192,108, 54,195,104, 52, +130,101, 89,231,123,108,177, 88, 96, 50,153,184,119,218,107,152,120, 67, 46,255,133, 11, 23, 58,189, 0,209,209,209, 40, 43, 43, +107,180, 34,202,173, 10,240, 33,118, 68, 11, 32,210,221, 1,151,233, 0,159,144,158,158,142, 23, 95,124, 17,131, 6, 13,114,122, + 64,184,244,217,131, 6, 13,194,169, 83,167,208,166, 77, 27,159,100,238,219,183, 15, 35, 71,142,236,146,146,146,114,158, 35,127, +199,248, 25,181, 97,195,134, 75,245, 3,122,249, 42, 20, 13,253,150,143,222, 39,114,248,240, 97,105,106,106,170,122,200,144, 33, + 24, 50,100,136, 26, 0, 78,157, 58,133,156,156, 28,190,207,225, 23, 0,193, 0,214, 43, 20,138,105,238,148, 0,133, 66,241, 12, +128,143, 29,155,139, 20, 10, 69, 47,165,210,123,137,250,191, 50,184,106,128,153, 75, 95,186,105, 10,224, 47, 27, 3,112, 39, 42, + 1, 51,102,204,160,139, 22, 45,186,201, 21,232, 15,249, 63,250, 76,211,206,211,233,245,250,155,130,252, 56,171, 95, 36, 18,225, +202,149, 43,183,149,252, 93,173,127, 87,203,109,218,180,105, 26,141, 70,211,228, 94, 0, 95, 60, 39, 51,103,206, 52, 0, 8, 9, + 13, 13,197,107,175,189, 6,145, 72,228, 60,158,156,156, 12, 0,136,136,136,192,196,137, 19,177,127,255,254,189, 19, 39, 78,252, + 67,174,211,181,189, 93,231,255,221, 33, 54, 54,182, 78,165,198,134,214, 17,155,205,102,104,181, 90,212,214,214, 34, 44, 44, 12, + 65, 65, 65,176, 90,173,160,148,194,102,179,193,108, 54,195, 98,177,192,102,179,185, 42,244,215, 61, 93,103, 81, 81, 81, 29,235, +190,254,116, 64,253, 0,193,198, 66, 46,151,107,124,140, 69,145, 52,116,160,129,216, 0,175,120,231,157,119, 48, 97,194, 4,116, +237,218, 21, 33, 33, 33,144, 74,165,208,106,181, 8, 13, 13,133, 78,167,195,234,213,171,193, 48,190,197, 23,142, 28, 57,178, 99, + 74, 74,202,249,121,243,230, 97,243,230,205,120,232,161,135, 0,160,221,190,125,251,174,250,211, 78, 14,133, 2,220,152,197,141, + 85,190,146,191,171, 39, 96,195,134, 13,178,169, 83,167,170, 1, 96,195,134, 13,178,202,202, 74,141, 15,253,217,172, 80, 40,102, + 0, 88,235, 65, 9, 72,112,249,220, 25, 64,127,216,151,164, 6,224, 66,252, 13,225, 47,153, 9,112,216,176, 97,178,166, 8, 8, +244,215, 74,119, 29,144,151, 44, 89,210,104,242,231, 48,120,208, 64,236,217,171,198,186,189, 33, 78,165, 32,239, 92,159, 70,221, + 99,108,108, 44,138,138,138,144,157,157,141, 78,157, 58, 97,205,154, 53,126, 88, 93, 84,202,125, 74, 75, 75,107, 18,242,231,172, +255,178,178, 50, 89,253, 99,163, 70, 43, 88,140, 99, 0, 0, 32, 0, 73, 68, 65, 84,141,146,101,103,103, 59,207,105, 10,228,228, +228,168,249,122,159,116, 58,221,239,176,207, 11,179, 27, 54,108,192,234,213,171, 1, 0,235,215,175,135, 78,167,227, 78,179,158, + 58,117, 10,173, 91,183,190, 45,239,128,107,180,191, 59,229,140,111,153,230,162,162,162,131, 54,155, 13, 58,157, 14,215,175, 95, +119, 6,142, 26, 12, 6,212,212,212,160,170,170, 10,149,149,149, 48, 26,141, 48,153, 76,176,217,108, 0,144,235, 73,102,125,114, +119, 23, 72, 90,127, 85, 0, 95,168, 84, 42,105,253,123, 86,169, 84,190,246,147,144,166,126, 30,107,214,172,129, 84, 42, 69, 72, + 72, 8, 78,156, 56, 1,141, 70,131,208,208, 80,188,254,250,235,216,191,127, 63, 94,126,249,101,159, 20,128,145, 35, 71,182, 75, + 73, 73,185, 48,109,218, 52,124,243,205, 55, 28,249,119, 0,112,213,147, 37,207, 71, 9, 88,178,100, 73, 83,144, 63, 0, 72, 57, +242, 7,128,169, 83,167,170, 71,143, 30, 77,125, 28, 67,205, 0,184,117,138,235, 21, 10, 69,253, 64,137, 51, 46,159, 75, 0, 28, + 13,208,190,203, 56,176,240,253, 58,177, 0,245,241,151, 9, 2,108,106,242,119,172,119,109,180,229,198, 77, 7,204,152, 49,195, +111,242,127,244,153,157, 24, 60,232,134,235,102,211, 55,223, 98,211, 55,246,207,123,246,170,129, 49, 50, 0,190, 45, 3, 84, 40, + 20,136,141,141, 5, 96, 15, 6, 60,124,248, 48,118,239,182,199,172, 29, 61,122, 20,163, 71,143,246, 65, 26,209, 0, 55, 2,255, + 26, 27,169,191,110,221, 58,169, 59,235,191, 62,154,202, 11,192, 41, 18, 82,169, 84,230,237,220,232,232,232,113,233,233,233,187, + 38, 78,156,136, 83,167, 78,225,244,233,211,120,231,157,119,172, 0,132, 6,131, 1,233,233,233,112, 28, 19, 22, 23, 23,227,241, +199, 31,247, 42,243, 86,196, 0,112,150,116, 86, 86,150,211,139,197, 17, 35,247,220,249, 32, 38, 38,166,192, 96, 48, 12, 55,155, +205,184,118,237, 26,130,130,130, 32, 20, 10,157, 30, 0,189, 94, 15,131,193, 0,147,201,132,202,202, 74,110, 62,255,162, 39,153, + 28,185,115,211, 0,177,177,177,168,239,173,112, 23, 23,192,135,252,185, 28, 0,245,247, 53,166,127,112, 86,191, 27,139,223,202, +119, 12, 45, 44, 44,196,169, 83,167, 96, 48, 24, 16, 31, 31, 15,131,193,128,172,172, 44, 76,157, 58, 21,155, 55,111,134, 64, 32, +224,173, 0,196,196,196,116,228,200, 63, 63, 63, 31,111,188,241, 6, 0,116,158, 49, 99,198,229,181,107,215,146,125,251,246, 53, +106, 12,229, 60, 1,141, 33,255,216,216, 88,202,245,179, 35, 71,142,160,160,160, 64,150,154,154,170,238,217,179, 39, 68, 34, 17, +117, 9, 12,244,219, 19,160, 80, 40,230, 2,152, 0, 96, 50,128, 54,176,199, 0,252,173,221,255,192,141, 85, 0,238,130, 0,111, +203, 42,128, 63, 42, 8,240, 78, 35,255,250, 74, 64, 99, 44,127, 79,219,123,246,170,253,121, 65,111,152, 59, 33, 33,232,221,187, +119,157,227,135, 14, 29,242, 73,222,228,201,147,157, 10, 64,118,118, 54,178,179,179,235,172, 10,240,229,254,215,172, 89,163, 6, +128, 29, 59,118,184, 37,207,233,211,167,107,214,172, 89, 3,128,223, 18,166,134,146,254,112,138, 6,165, 20,163, 71,143,150, 77, +155, 54,205,107,223, 73, 73, 73,217,173,213,106,199, 30, 56,112, 96, 79, 76, 76, 12, 78,159, 62, 13,157, 78, 39,140,136,136, 64, + 74, 74, 10,180, 90,109,241,129, 3, 7,186,196,196,196, 96,230,204,153, 94,239,215, 93, 30, 0,127, 99, 0,234,191, 91, 74,165, +146,200,229,114,168, 84, 42, 90,127, 90,134,239,243,136,139,139,123, 69,163,209, 60,103,179,217, 80, 85, 85, 5,139,197,226, 84, + 86,106,107,107, 65, 41,173, 19, 24, 40,151,203, 31,115, 16, 35,111,200,229,114,200,229,242, 58,203, 2,125,157, 2,112, 37,122, +185, 92,174,169, 63,182,184, 42, 5, 77, 8,222,227, 39,183,212,239,133, 23, 94,128, 70,163,129, 76, 38, 67, 97, 97, 33,154, 53, +107,134,146,146, 18,222, 10,192,161, 67,135, 72, 74, 74,202,133,199, 31,127, 28,251,246,237,195,235,175,191, 14, 0, 81, 51,102, +204,184,212, 20,228,239,170, 4, 52,198,242,231,198,151,162,162, 34, 20, 20, 20, 16,135, 33, 40, 75, 77, 77, 85, 71, 71, 71, 67, + 42,149, 82, 62,129,128,245,148,128,105, 0,214, 59,148,128,131, 0, 20, 0,164, 74,165,242, 10, 2,104,186, 14,220,212,217,248, +220, 5,252, 44, 93,186,180,193,253,183,147,252,103,204,152,113, 75, 82,134, 54, 70,230,133,139,222,251,119,112,176,111, 94, 75, + 79,243,195,254, 64, 46,151,203, 18, 18, 18, 52,123,246,236,161, 27, 55,110,172,163, 8,212, 39, 37,190, 50,211,210,210, 26,212, +108,184,164, 36,190, 36, 6,106, 72,225,148,201,100,188,200,159, 67,100,100,164,115, 94,255,196,137, 19,255, 72, 79, 79,255, 47, +231, 17, 40, 46, 46,238,242,234,171,175,202, 8, 33,188,228,221,138, 60, 0,245,219,217,221,252,183, 15, 74,169,126,244,232,209, +139,183,111,223,254,166,213,106, 69, 69, 69,133, 51, 6, 0, 0,174, 93,187,134,138,138, 10, 80, 74, 57,171,221,167,201,118,110, +254,191,254,178,191,250,113, 2,124,201,223,245, 57,223,105, 75,121, 57, 37,224,165,151, 94, 66, 78, 78, 14, 38, 78,156,136,247, +222,123, 15, 11, 22, 44,128, 80, 40,132, 68, 34,241,246, 92, 9,165,148,157, 53,107, 22,254,251,223,255, 98,213,170, 85, 0,208, +105,223,190,125,151, 28, 22,187, 95,157,201,101,218,170,201, 80, 90, 90, 10, 55,121, 0, 52,153,153,153,178, 49, 99,198,168,253, + 89,242,232,176,250,167, 1,216, 10, 96, 46,128,184, 0,249, 55, 12,119, 65,128,188, 20, 0, 95,146,114,248, 75,216, 77,141,166, + 32,255, 59,113,208,152, 59,119,174,236,228,201,147, 77, 42,211, 97, 13,169,155, 82, 38, 71,120,220,218,122, 0,206,100, 64, 44, +203, 98,211,166, 77,188,149,128, 23, 95,124,145,187,206,155, 98, 0, 24,134, 1,203,178,248,215,191,254,165,230, 75,158,158,228, + 53,118, 37, 65, 74, 74,202,255,180, 90,237,181, 3, 7, 14,236,224,107,245,223,106,111, 91,253,246,117,231, 98,247, 69, 9, 32, +132,188, 53, 97,194,132,236,181,107,215, 30, 23,139,197,224, 86, 5,176, 44,139,240,240,112,232,116, 58, 46,133,109, 8, 0, 27, + 95,131,192, 53,248,239,240,225,195,144,203,229,117,198, 19,111,227, 80, 81, 81, 17, 45, 42, 42,146,213,119,241, 55,114,201, 31, +128, 6,221,253,214,229,203,151, 75, 0,152, 97,143,159,226,254,124, 82, 2, 92, 19,255, 60,245,212, 83,206,207, 85, 85, 85, 94, + 95,179,184,184, 56,210,183,111, 95,250,213, 87, 95, 61,188,126,253,250,239, 57,178, 93,191,126, 61,124,141,250,231,112,233,210, + 37,103, 74,226, 38,130,102,219,182,109, 13,245, 41,205,222,189,123,125,170, 85,225,225,240,101,119,217, 74,255,238, 53, 73,184, + 85, 0,238,136,159,215, 42,128,166, 38,245,134,228,221, 41,202,195,157,220,113,250,244,233,163,233,211,167, 79,147,202,116, 12, +142,183,252, 94, 93,221,255,245, 95,234,134,150,157, 57,174,143,207,181, 17, 31,238,247,150,222,107,100,100,228,206,198, 68,250, + 55,101, 12,128,187, 62,236,201,219,227, 67,159, 63, 49, 99,198,140,102,187,118,237,122,183,164,164,228, 57,163,209, 8,155,205, +134,129, 3, 7, 98,200,144, 33,233,114,185,124, 33, 31,242, 7,128,188,188, 60,231,103,215, 88,147,188,188,188,155,182, 61, 33, + 58, 58,154, 56,188, 4, 50, 0,106, 78,153,112,153, 10,240,249,153, 76,153, 50,165,161, 67, 66,151,241, 82,124, 59,198, 21,165, + 82,201, 30, 59,118, 12, 31,127,252, 49, 1,192, 43, 41,207,179,207,122,206,201, 52,116,232, 80, 76,154, 52,137,247, 53,120,147, + 23,192,157,167, 4, 52, 68,254,110, 21,128,166, 38,193, 64,133,184, 0,220,245, 1,127,203, 87,254, 29,218,230, 14,254, 13,253, +184,113,227,230,194,238,126,245, 11, 7, 14, 28, 32,211,167, 79,191, 37, 10,173,191,153, 3,255, 72,101,177,177,232,215,175, 95, +147, 22,227,105,106,121,127, 7,163,236,207,164, 4,120,181,162, 6, 14, 28, 24, 24,136, 3, 8, 32,128, 0, 2, 8,224,111, 6, + 38,208, 4, 1, 4, 16, 64, 0, 1, 4, 16, 80, 0, 2, 8, 32,128, 0, 2, 8, 32,128,128, 2, 16, 64, 0, 1, 4, 16,192,159, + 16, 86, 0,108,160, 25, 2,240, 4, 97,160, 9, 2, 8, 32,128, 0, 2, 99,123, 0,127,243, 78, 50,103,206, 28,191, 35, 46,221, + 69,117,123,146,231,109,253,177,175,242,154,250,250, 2,242, 2,242,254,238,242,126,126,165,216,239,129,101,208,187, 93,112,171, +229, 29,126,217,127,121,177,239,221, 44, 47, 45, 45,141, 0, 0, 33, 68,106,177, 88,112,238,220, 57,181,217,108,134, 80, 40,196, +197,139, 23,241, 88, 88, 87,236, 44, 40,128,241,238, 78,136,139,139,147, 9, 4, 2, 80, 74, 53, 0,144,145,145,113,203,159, 7, +119,125,174, 32,132,244, 1,208,230,248,241,227,219, 58,116,232,192,104,181, 90, 73,135, 14, 29,222, 9, 14, 14, 94, 9,224,146, + 99, 57, 41,147,145,145, 97,243, 32,175,185,195, 91, 96, 32,132, 80, 0,184,112,236,127,159, 43, 70,150,164,172, 43,136, 57, 39, +108, 51, 46,174, 89,243, 22, 53, 0, 40,165, 84, 8, 32, 34, 35, 35,227, 66,224,125,187,179,229,221, 82, 45,145,111,182, 45, 95, +179,191,249,147, 50,183, 98,245, 55, 82, 97,100,152,250,236,233, 51,178,187,130,154, 33,244,217, 25,154, 59, 73,203,106, 40, 31, +121, 96,137,203,237,199,230,205,155,165,219,183,111, 87,167,191, 98,223,254,110,223, 72,204,152, 49,131,215,115,217,151,123, 80, +202, 16,162, 62,117,242, 36,116, 58, 29,186,116,233,130,102,205,155, 35, 49, 97, 28,239,231,186,123,247,238, 58, 47,110,118,118, +182,199, 90, 10,217,217,217,126,247, 27,174, 80, 83, 70, 70, 70,227,250, 93,146,214,241,129, 2, 32, 64, 86,164,255,178, 98,151, + 3,209, 79,216, 63, 23,173, 6, 14,207,111,252, 67,157,124,189,238,245,101,183,226,245, 53, 66, 8,213,235,245,178, 93,187,118, +169,139,138,138,144, 36,106,137,118,157, 90,163, 86,111, 68,176,193,138, 17, 11,158,196,168,137, 83,177,245,139, 12,108,217,179, + 71, 61,110,220, 56,217, 29,208,133, 79,219,108,182,246, 69, 69, 69,236,128, 1, 3,196, 49, 49, 49, 56,114,228,200, 43,181,181, +181, 19,122,244,232, 33, 39,132,104, 41,165,222,166, 2,170, 93, 55,172, 86, 43,243,107,193,207, 61, 58,206, 26,132,127, 13,237, +219, 58,111,215, 7, 27, 55, 29,149,254,210,163,223,152,247, 28,242, 46, 58, 20, 6, 54,224,105,248,155,185,137,124,205,223,239, + 75, 30,124, 95,201,223,182,110,155, 52,190,117, 71, 53,137,138, 70, 97, 77, 5,218,119,232,170,182,176, 54,156,252,100, 13,202, +186,180,150, 13,157,120, 63, 47, 69,224,176, 90, 65,123,117,231,182, 4,248,118, 23,139,125, 63, 81,164, 78, 3,122,117, 7,230, + 47,105, 28,113,115, 5, 74, 26,155,157,204,157, 50,209, 84,114, 27,131,212,212, 84,138,197, 4,228,173,134,207,161,148, 2,139, + 9,166,252,158,116,199,172,181,190, 65,254,212, 65,254,163,176,127,255,126,204,152, 49,195,235,119,239, 30,176,139,246,233, 51, + 4, 89, 89,151,113, 40,215,158,176,230,244,201, 83, 0,128,217,255,252,134,158, 58, 51, 89, 22, 42,225,247, 92, 18, 18, 18,216, +221,187,119, 51,217,217,217,216,187,119,175,199, 66, 76,254,164, 80,245,244,222,166, 41, 20, 52,195, 15,133,130, 75, 23,222,232, + 84,198,209, 79,212, 45,182,211, 20, 10,128, 75, 59, 57,170, 19,242,194,217,179,103,161,217,184, 81,253,150,124, 10, 6,206,120, + 10,226,182, 17,128,208,145,236,143,165, 0, 43, 2,107,162,184,255,137, 84,148,124,244, 62, 14, 30, 60,168, 30, 62,124,184,140, +243, 2,220, 38,216, 24,134,105,211,170, 85, 43,104, 52, 26,225,128, 1, 3, 48,116,232, 80,230,202,149, 43,131,126,253,245,215, + 99,119,223,125,247, 96, 66,200, 21, 7, 89, 51, 60,219,174,217,216, 49, 9,209,239, 45,219,204, 44, 76, 62,218, 34, 46,113,142, + 44,110,152,106,228,130,143, 47, 62, 16,115,207,204, 88, 66, 72, 53,236, 49, 6, 76, 67,253,204, 53,177,149,183,126,212,104,133, + 52,128, 58,168,159, 0,168, 62,252, 42, 6,228, 58,128, 12,156,217, 31,115, 70, 60,195,128,103,229,190,250, 74,128, 66,161,160, +177,177,177,200,204,204,164,174,101, 75,125, 34,214,156,195,210,233,131,226,213, 98, 27, 11, 27, 40,130, 43, 66,112,229,218, 53, + 92,169,174, 68,183,160,102, 48, 21, 94, 82, 31,218,178, 93, 54,140,135, 18,208,171, 59,112,242, 44, 3, 74, 37,176,145, 32, 60, +156, 96,193,164,113, 70,220,136,161,105,124,170,132,198,146, 52, 71,252, 11, 23, 46, 68, 65, 65, 1, 0, 96,219, 73, 17,106, 45, + 22,181,226,159, 67,124, 82, 4,124, 81,226, 28, 41, 94, 61, 63,151,197,246,195,177,177,177, 13,231,111, 95,236,223, 59,190,245, +179,203,210, 45,191,190,225, 84,120, 38,244, 95, 44,123,240,153, 14,141, 30,112, 55,111,222, 44,221,182,109,155,154, 97, 24,188, +240, 46,156,213,207,248,212,193,136,136,248, 81, 26, 55, 44, 13,192, 22,140, 28,249, 81,157, 99,211,167, 3,247,223, 15,220,143, +108,245,242,143,192, 75, 9,224,200, 95,163,177,159, 58,117,234, 84,103, 97, 37, 95, 8,204,147,229,207,165,100,118,189,191,180, + 52,255,200,191,201, 16,187, 12, 0,176, 98,197,138, 27, 10,192,224,116,224,200, 11,183,229,114,246,238,221,139,149,147, 82,209, +109, 76, 2, 32, 48,129,136, 24, 16, 33, 3, 34, 16,129, 82, 2, 86,111, 5,181,217, 64,205, 54, 60,249,196, 83,120,234,245,185, + 56,219,182,173,186,123,247,238,183,211, 19, 64, 10, 10, 10,226, 59,117,234, 36, 46, 42, 42, 66, 78, 78, 14, 78,158, 60,137,132, +132, 4,196,199,199,183, 95,181,106,213,219, 83,166, 76,121,210, 7, 5, 64,176,127,207,215, 95, 62, 50,208,208,246,112,181, 0, +211, 23,215,224,222, 65, 31,226,153,121, 83,133, 31, 44,172,232,182,240,131,181,211,163, 7, 77, 87,162,129, 52,200,174,132,238, + 58,166,167,165,165, 81,119,251,155,186, 32, 92, 0,183,192, 3,224,250,144,214,237, 88, 91,209,253,174,238,225,138,183,158,100, +231,140,120,198,151,106, 78, 36, 51, 51,147,114,105, 73,185,255, 21, 10, 5, 77, 74, 74,242,205,170,222,113, 80, 58, 62,166,175, + 90, 92,107, 69,240, 7, 47,194,106, 48, 67,242,194, 18,132,137, 37,168, 21, 25,161,175, 53, 34, 24, 4,166, 11,101,234,202,202, + 74, 89, 88, 88,152,199, 65,248,228, 89, 32,115, 61, 11,192,224,248, 3, 70,222,195, 96,210, 56, 2,215, 64,218,212,105, 64,230, +122, 63, 60,166, 73, 73, 50,199,125,250,101,173,115,228,207, 17, 63, 0, 40,247, 91, 96, 52,235, 1, 0, 99, 23,238, 70,214,210, + 4, 53, 0,222,242,207,190,127, 22, 34, 82,120,163, 35,144, 82,144, 86,189, 92,182,203,208,250,159,252, 82,132,146,183,236,228, +239,169,198, 60, 81,100, 81,251, 57,252,172,255, 35,219, 44,210,204,205,207,170, 41, 40,222,155,247, 29,134, 73, 99,176,238,179, +125,248,207,174, 52,245, 54, 5,197,156,127,188, 33, 27, 56,178,189, 95,138, 64, 77,177,130,142, 25, 0,100,125,117, 28,148, 82, + 52,111,115,183,147,252, 87,174, 92,233,241,250,244,181, 42,105,106, 82,123, 53,240, 41,128,239,112,232, 16, 48,108,216,141,227, +111,191,125,227,243,243,207,101,171, 51,254,211, 83,198,176,157, 60, 94, 39, 71,254,163, 71,143, 6,203,178,248,228,147, 79,154, +236, 5, 87, 40, 20, 78,242,175,171, 20, 40,104, 70,134,231,119,142,153,162,171,163,254, 18,199, 63,108,146,155,243,136,227, 68, + 98,255, 48, 96,192,205,115,236,204, 84,157,211, 43, 15, 0, 44,155,140,121,243,230, 57,143,207,155, 55, 15, 43, 86,172, 0,211, + 99,214,141, 95,117,156,239, 78,158,112,170,251,235,179, 90,221,156,199,227,250,106,107,107,209,174, 75, 87,128, 53,131, 9, 2, +136, 80, 0,107,117, 37,106,139,206,225,218,197, 82,116, 28, 46, 5, 17,135,131, 88,204,128,128,193,210, 57, 11,144,144,249, 6, +230,207,159,223,164,131,178,183, 84,217, 46,100, 75, 40,165,225, 70,163,113,120,100,100, 36, 78,157, 58, 5,150,101,113,238,220, + 57,172, 94,189, 26,189,123,247, 70, 84, 84,212, 76, 0, 79,214, 35,107,182, 33,242,166,148,182,234,194, 28,146,182,239,156, 40, +174,200, 57,138, 74, 93, 16,254,187,213,138,237,121,255,195,115, 73,193, 66,161,129,141, 5,166, 55, 88, 7,225, 86, 20,183, 10, +192, 55, 52,212,119,220,121, 6,132,124,137,159, 82, 10,217, 43,163,145,153,163, 12, 79,133, 2,191,124,117, 20, 24,225,124,173, +120,129, 35,125,131, 97, 45, 0,130,218,218, 85,136,140, 84, 33, 43, 43, 11,190,164,241, 28, 26,212, 66,221,166,214, 6,201,226, +167, 96,187,174,133,245,210,117, 8,197, 34,132, 16, 1, 66,137, 0,161, 2, 33, 34, 69, 18,232,170, 43,112,121,239, 65,117,216, +164,251, 60, 14,116,238, 72,125,223, 79,172, 67, 1, 0,150, 45, 34,160, 4,176,135,199,248,222,193, 29,164, 44,203,202,202, 82, +103,101,101,249, 53,133,224, 74,254, 16, 10, 80,116,217, 62,248,149, 92,173, 69,231,182, 18,244, 72,222,130,172,213, 19,213,124, +221,235, 34, 82, 8, 33, 41,133,128, 92,135,141,182, 66, 80, 27,130,208,105,151,192,178, 90,212,214,102,193, 86,240, 47,223, 60, +185, 60, 42,183,249, 82,226, 85,185,249, 25,117,124,228,171,248,228,187, 89,104,198,116, 6, 0, 60,245,108, 79, 12, 24, 26,141, +181,159,230, 96,229,255,222, 84, 43, 71,250,231, 58, 36, 4, 80, 60,127,204, 57,232,221,123,239,189,216,183,111,159, 87,242, 7, +128, 25,211, 68,106, 96, 47,128, 99,168,184,218, 12, 61, 58, 3,159,127, 94, 3,181, 26,232,209, 3,136,142,182,139,168,184,218, +204,254, 50,246,255, 93,253,219,175,157,136, 39,242,223,187,119, 47, 88,150,117,146,244,134, 13, 27, 26, 77, 32,174,219,245,201, + 31, 0,188,145, 63, 0,100, 40,149,132, 2, 82, 2,104, 82, 83, 83, 27,236,248,172,203,160,175,204,204,148, 17, 2,172,252,108, +229, 77, 49, 47, 43, 51,148,174,254, 21, 41,165, 84,253,225,135, 31, 58,119,124,248,225,135, 88,177, 98, 5, 50, 50, 50,234, 86, +145, 35,144,186,147,151, 97, 79, 97, 43,163,148,106,158,124,242,201, 6,175,207,234,226, 69,201,252,252,115, 25, 33, 64,198,202, + 12,181, 59,242, 18, 54,111, 14,136, 4,176, 25, 42,240,251,246, 61, 88,187, 49, 27,159, 93, 58, 7, 0,200,127,179, 5,122,140, +186, 31,166,146, 11, 56,254,235, 97, 28, 61,119, 26,149, 87,174,224,216,177, 99, 77, 86, 88,107,245,234,213, 82,126,125,152,132, + 81, 74,123, 21, 20, 20,124,240,218,107,175,245,253,224,131, 15,196,102,179, 25, 2,129, 0,205,155, 55,135, 94,175, 71,126,126, + 62,162,163,163,185,186, 5,158,172,255, 80, 66, 8, 75, 41,141,172,184,120,224,167, 55,191, 44,137,252, 98, 94, 7,104,245, 98, +136,133, 12, 58, 70, 72,112,229,186, 25,138,127, 91, 49, 96, 72,108,104,103, 47,158,132,180,180, 52,202, 41, 2,174,125,177,161, +207, 1,220,122,112,228, 95, 95, 57, 96,188, 13, 34, 92,189,239, 58,110,206,196, 25, 62, 95, 64,102,102, 38,181,147,255, 58, 39, +249, 75,126, 58, 15,195,206,187,234, 28,247,106,185, 42,215, 73,195,180,213, 96,197, 66,152, 15, 31,135,233,247, 34,212,238,218, + 7, 24, 77, 16, 83,138, 16, 8, 32, 4,129,137,181, 66,107,170,197,103,187,183,122,149,185,108,145,221,186,119,133,125,155, 51, + 87, 40, 78,157,161,152,191,196,255, 62, 43,151,203, 53,174,110, 47,149, 74,197,235, 69, 87,169, 84,206,218,218, 28, 30, 91,113, + 17,123, 14,235, 80,114,181,214,169, 4, 20, 94, 52, 2,242,141, 80,169, 84,188,220,145, 66, 98,175, 28, 38,170, 62,138,208,208, + 51, 8,146, 84,131,101,181,176, 88, 14, 67, 32,136,134, 89, 95,126,219, 58,235,158,111,143, 73, 1, 82,135,252, 47,159,162, 24, + 60, 81,128,103,223, 73,192,189, 9,125, 1, 80,199,121,190, 97,221,186,117,244,133,119, 9,154,181,238, 15, 10, 32,113,210, 28, +236,223,191,159,215,119, 89,230, 2,109,211,230, 55, 39,249, 87,151,219, 75, 48, 15, 24, 96, 39,127,174, 16,160,253, 88, 48,170, +203,131, 17, 25,114,217,163,204,201,147, 39, 67, 38,147, 97,204,152, 49,152, 58,117, 42, 4, 2,193, 77,127,174,251,249,194,221, +123,235,151,178,228, 66,196,132, 16,231, 95, 67,251, 8,160, 1,133,166, 1, 89, 55,222,175,212, 84,181, 59,203,121,222,188,121, + 72, 77, 77,173, 75,168, 13,200,251, 78,169,196,177, 99,199,212,132, 16, 41,128, 58,109,230,244,103,215,219,231,233,250,196,148, +130, 9, 9,130,229, 74, 49,148,175,190,138,213,250, 10,232, 70,199, 57,143,127,241,191,213,120, 99,193,108,196,204,127, 12,111, + 29,221,139,141,186,115, 72,120,240, 65, 68, 71, 71,251, 60, 5,176,122,245,106,169, 66,161,160,171, 86,173,170,211,135,243,242, +242,212,158,166,161, 8, 33, 34, 66,200,144,163, 71,143,150,228,228,228,104, 94,120,225,133,184, 79, 62,249, 68, 82, 83, 83,227, + 44,211, 92, 91, 91,139,102,205,154, 21, 78,153, 50,165,231,136, 17, 35, 58,123, 81, 36, 24, 66, 72,151,163,185,155,202, 78,239, +156,127,126,254,203,233,237,183, 44,238,128,223, 75,133,168,172, 17,128, 37, 64,121,141, 25,180,101,247,218,231, 95, 89,210,247, +129,135,255,225,117, 58, 33, 35, 35,131,112, 99,157, 82,169,244,250, 57,128,219, 67,254,110, 61, 0,174,196,207,103,156,241,197, + 18,185,225,106, 91,229,214, 59, 80, 39,206,160, 1, 55, 70,223, 86,109,213, 90,106,129,184, 92, 11,201,119,123, 65,132, 12, 80, +107, 6,173,214,131, 88,173, 16, 1,176, 81, 22,181, 54, 43,170,173,102,128,245, 62,135,202, 5,249, 45, 91,212,240, 48,104, 15, + 18,108,252,128,170, 84, 42, 9,231,210,231, 99,173,223,100,253, 3,248,250,153,246,117,182,135,188, 84, 4, 17,189, 14, 11,105, +133,172,172,172,189,124,189, 0,146, 26, 53, 34,223,250, 31,174,189,144,134,235,218, 96,116,176, 28,135,205, 86, 4, 0, 40,254, +165,221,109,235,176, 27,119,124,172,158, 61, 78, 89,135,252, 57,196, 69,188,138,225,125, 39, 35, 62,242, 56, 54,238,120, 71, 61, +118, 18,255, 65,100,237,218,181,244,199, 31,127, 68,121,249, 88,180,108,185, 7,205, 90,245, 3,165, 20, 12,195,240, 10, 68, 42, + 41, 1,138,138,142,113, 19, 9,128,164, 6, 90, 61, 48,116,168,125, 79, 97, 33,240,233,167, 64,117, 21,160,175, 1,106,244, 64, +104, 68, 21,175,107,107,104,174,255,236,217,179, 0,128,119,223,125, 23, 0, 16, 19, 19,211,100,110,102,215, 62,201,231, 59,115, +231,206,133,171,197, 94,159,184,125,128, 20,184, 49,247,239, 10,206, 11,224, 56, 71,227, 73,200,172,168, 24,156, 62,126, 2,165, + 17, 17,106,134, 97,240,220,115,207,225,163,143, 62,242,251,250, 70,154,194, 65,217, 26,204,126,119, 17,250, 79,158, 12,229,187, +239,130, 97,110,240,156,178,240,216, 13, 15,225,190,125,216,189,123, 55,206,157, 59,231,115, 16,224,234,213,171,165,185,185,185, +106, 0,200,207,207, 87, 51, 12, 35, 75, 78, 78,214,172, 90,181, 74, 74, 41, 69,124,124,188,204,104, 52,170, 27, 80,236, 44,121, +121,121,253,103,204,152,209,162, 91,183,110,216,190,125,187,161,178,178, 82,104, 52, 26,237,222, 14,199,252,199,248,241,227, 99, + 8, 33,193,148, 82,163, 27, 49,140,139, 60,166,232,212, 47, 43,222,248, 87, 74,179,150, 61,178,240,115,214, 19,248,237, 2, 65, +201, 85, 33, 64, 25,152,204, 22,104,105,203,210,167,103, 61, 21, 71, 8, 41,165, 77,160, 85,242,137,179, 9,224,143, 65,131, 83, + 0, 57, 57, 57, 55,237,171, 40,213,249, 76,118,174, 30, 0,251, 20,128,189,255, 72,126, 58,143,160, 99,165,176,133,219,173,168, +250,115,200, 13,173,107, 60,113,177, 4,134,160, 96, 68, 91,173,232, 24,220, 12, 33, 34, 49,136,197, 2,176, 20, 86,155, 13,213, + 54, 51, 12, 54, 43, 76,212, 6, 27, 40,168, 15,157,109,254,146, 27, 74,128, 61, 46,224, 6,233, 47, 91, 36, 64,250, 34,130, 23, +150, 88, 27,221,232,114,185, 92,195,149, 46,229,131,133, 89,246,118, 95,154, 20,225, 36,124,167, 43,159, 94,135, 8,128,144,234, +240,213,236, 8,235, 99, 42,126,113, 29,162,171, 63,193, 6,187,155,250, 3, 97, 24, 30,187, 90,140,130,127,119, 68,104,187,222, +168, 44, 45,197,149,243,151,110,107,199, 28, 48, 52, 26,122, 71,119, 51, 4,159, 64,136,177, 15,190,121,211,226, 60, 62, 66,222, + 23,185, 27,125,179,252, 39,141,250, 17,223,125, 39, 71,120,174, 10,203, 23, 1,207, 47,161, 24, 53,106, 20,239,101,127, 93, 59, +118, 34,221,187,215,213, 2,183,110,181, 7,254,173, 91, 7,244,232, 65,177, 98, 5,193, 91,111,213,216, 21, 4, 0, 61,122, 70, +224,133,231,249, 93, 35,103,165, 78,158, 60, 25, 27, 54,108,168, 99,201, 38, 38, 38, 54, 72,110,254, 42,162, 62,122,240,100, 43, + 86,172, 80, 55,164, 0, 44, 91,182, 12,153,153,153,188, 44,225, 39,159,124, 82,205, 69,254,187,195,243,207, 63,143,229,203,151, +171, 51, 51, 51, 61, 94,227,143, 39, 74,240,202, 91, 11, 48,107,241,191,240,178,217,140, 15, 63,252,176,193, 54, 90,182,108, 25, + 84, 42, 21, 8, 33,210,134, 8,123, 84,159,206, 88,245,197,167,136,157, 62, 29,111,190,249,166, 71,165, 97,222,188,121, 88,182, +108, 25, 62,255,252,115,141,175,109,159,155,155,171,230,130,229, 20, 10, 5,205,203,203, 83, 39, 39, 39,147, 67,135, 14,169, 9, + 33, 72, 78, 78,214,172, 92,185,178,193,239, 27, 12,134,240,173, 91,183, 98,236,216,177, 40, 44, 44, 12,209,235,245,176, 88, 44, + 96, 24, 6,102,179, 25, 73, 73, 73,196, 65,238, 70, 62,142, 45,147,201, 36, 62,188,105, 58, 70, 61,242, 22,118,230,156,197,185, +203, 2, 84,233, 25, 8,132, 64,169, 62, 24,207,189,180, 40, 30,192, 69,190,220,207,197,157, 0,252,166, 3, 2,184, 61,214, 63, +220,185,113, 56,215,140, 84, 42,133, 84, 42,197,175,191,254,234,252, 43,250,169, 24,149,198, 74,180, 28,234,251,186, 95,142,220, + 67, 66,102, 64,242,211,121,136,138,203, 65, 9,129,120, 86,121,157,227, 94,137, 75, 44,128,141, 2, 23,245, 21, 40,169,212,226, + 90,149, 14,149,181,181,208,153,141,184,102, 50,226,114,173, 1,165,181, 53,208, 90, 76,208,177, 22,152, 89,239,217, 48, 71,222, +227,102,192,115,137, 11,152, 61,181, 25, 40,196,160,190,149, 1,119,186,240,235,119,118,190,238,127,167,229,121,181, 22,123, 14, +235,234, 16, 63, 71,254, 65,108, 49,130,216, 98,188, 49, 94,136,146,146, 18, 51, 95,153,155,206,177,104,157,158,225,220, 62,167, +183,225,226,217, 82,156, 58,112, 28, 87,206, 87,220,246,142,187,238, 51,187, 2, 90, 85, 70, 17, 98,236, 3,233, 44, 33, 30, 89, + 44,114,254,165,111,156, 14, 2,194,123, 64,122,232,222, 28, 60, 49, 95,142,136,188, 61, 32,132,224,251, 3,246, 71,192,151,252, + 57,196,244,234, 89, 79,177, 0, 62,249, 4, 56,115,198,238, 9,120,243, 77,234,116,191, 83, 74, 17, 17, 17,225,125, 4,118,244, + 81,155,205, 6,155,205,134,119,223,125, 23,103,207,158,197,233,211,167,113,250,244,105,168, 84, 42, 44, 88,176, 0, 37, 37, 37, +183,243,145,104, 26,178,164,231,206,157,203, 89,117,188,200,144, 16,226,214,250,231,224,233,152, 43,246, 5, 85,128, 48,205,240, +159, 87,150,160,217, 86, 21, 82, 83, 83,225, 90,106, 88,209,163, 31,230,198, 14, 71, 72, 72, 8, 70,141, 26,133,215, 94,123, 13, + 42,149, 74,173,211,233,220,190,127, 95,148,158,198,229,190,125, 16, 21, 21, 37, 99, 89,182, 65,111, 7,231,169,240,215,243,226, + 26, 41, 31, 31, 31, 47,227,136, 18, 0,226,226,226,100, 94,218,110,204,168, 81,163, 90,148,148,148, 96,223,190,125,184,235,174, +187, 32, 20, 10,157,202, 98, 84, 84, 20,223,233, 8,214, 33,143,116,239, 53,104, 97,230,174,112,252,182,125, 49, 70,198,247, 70, +168,132, 65,104,136, 13,193, 65, 38,220,247,208, 20, 22,128,182,190,174,234, 77,185,228,238,143,207,116, 64, 0,183, 15,140,167, +135,168, 84, 42,155,207,157, 59, 23,115,231,206, 5, 0,243,219,105,111,195, 82,102, 69,112,176,196,175,100, 36, 73, 73,246,240, +225,144,241,103, 64, 5, 12, 94,251,198,224,180,254,249, 34, 36, 42, 74,102,109, 22, 2, 29,181,225,132, 94,135, 99,149,229, 56, + 94,117, 29,199,171,180, 56,161,215,226,140, 65,135,114, 83, 45,106,172, 86, 92, 50,232,157,191,233, 9,147,198, 17, 44, 91, 36, +192,178, 69, 2, 80, 8, 64, 9,131,212,105, 4, 79, 78, 19, 99,214,212,214,232,222,189, 45, 88,136, 0,248,118,203,156,171, 63, + 41, 41, 73, 86,127,159, 15,109, 38, 43,188,104, 87,228, 11,222,183, 7,209,237,124, 49,204,238,190,161, 58, 8,168, 30, 38,198, + 30,209,172,213,106, 67,146,146,146,124, 42,138, 30, 27, 27, 11,149, 74,133,117, 53,122, 24,205, 12,158, 88,255, 31,148, 73,130, + 97, 52,223,190, 50, 17, 19, 7,188, 33,203,213, 46,193,186,255,222, 48,241,191,121,211,130,184,136, 87,111, 40,148, 15,124, 42, +203, 80,102,240,202, 45,177,252, 85, 32,121,254, 88,132,231,169, 32,251,247,104, 48, 19, 0,141, 70,227, 87, 31,238,210,165,110, +244,248,152, 49, 64,120, 56, 16, 29, 13, 12, 27,208, 28, 18,177, 0, 2,230,134, 88, 73,112,176,215, 1,153, 97, 24,231, 92,255, +217,179,103, 17, 19, 19, 83,231,239,173,183,222,194, 91,111,189,133, 75,151,248,123,101,220,205,215,187, 34, 45,205,119, 11, 44, + 51, 51, 83,182,124,249,114,183,132,205,215,250,119,113, 61,223, 20,167,192,109,179, 44,191, 20,246,102, 66,192, 26, 76, 16,181, +235, 2,197, 59,239, 32, 57, 52, 28,225,154, 92,231,241, 89,255, 72,198, 27, 31,252, 7,133,203,190,198,235,253,199, 96, 74, 68, + 55,236,222,188, 25, 69, 69, 69,110,223,191,135,211, 20,232,219,175,159,140, 11,106,228, 20, 50,215,233, 25,119,251, 60, 88, 95, + 52, 45, 45,141,114,129,125,220,124,191, 43,201, 39, 39, 39,107,226,226,226,100,156,235, 63, 57, 57, 89,227,165,221,114, 68, 34, +209, 93, 15, 63,252,240,217,202,202, 74,232,116, 58, 4, 7, 7,163,117,235,214, 8, 15, 15, 71,120,120,184,183,198, 99,235,201, +179, 5, 5, 5, 25, 30, 77,251, 72,182,250,167, 33, 56,127,161, 10,109,195, 4,136,239, 73,112,119, 55,138,208, 22, 45, 42, 0, +216, 60,240, 70,160,222,192,159,212,250, 7,188, 47, 3,172, 81, 42,149, 65, 0, 66, 21, 10,133, 83, 11,236, 56,186,131, 95,154, +175, 82,169, 36,114,185, 28, 42,149,138,138,103,101,213,113, 69,242,205, 3,208,242,193,177,154,242,172,237, 48, 88, 77,168,210, + 27,112,214, 98,129,136,181, 59,234, 43, 45,181, 96, 41, 5, 5,176,253,234, 57,232,173, 22, 0,224, 49, 48, 17,204, 95, 82,183, +143,219,167, 2, 88,216, 96,194,239,103,170,177,106, 67,149, 79,247,235, 74,244,114,185, 92, 83,223, 11,224,170, 20,120,130, 92, + 46,215,100, 41,166, 64, 52,246, 51, 0,209, 40, 47,191, 17,156, 39,102, 47,195,204,180,199,211,253, 79,227,242,101,251, 64,172, + 84, 42,247,240,145,155,246, 77,102, 29,197, 43, 43, 43, 11,220,164,196,250,163, 7,125, 90,149,209,212,120,224,169,246,154, 45, + 10,138, 3,170,227, 0,128,225,125,237,153,241,254, 53,111, 49, 14, 30,239,139, 15, 54, 78,135,114,235, 83,106,229, 68,126, 4, +254,196,124, 57, 34, 35, 85,174,134, 44,180, 90, 57, 40,205,114,184, 42, 41,178,178,146,120,201,154,252,200,163,100,247,206, 93, + 20,176,187,254,101, 50,130,235, 23,194,160,215, 73, 96,172, 18, 99,253, 26,130,185,115, 41,138,203,170, 49, 44, 62, 14,211,167, + 78,227,101, 21,219,108, 54,231,124,191, 74,101,191, 86, 87,194, 47, 43, 43, 67, 89, 89,153,207,238,125,133, 66, 65, 25,134,185, +137, 84, 51, 50,148,196,143, 36, 64, 26, 74,105,157, 88, 0, 23,143, 0,111, 87,184,171,107,191,126,244,190, 55,183,127,125, 37, +199, 90, 93, 13, 81,171, 72, 8, 66,154,161,239,163,147,241,214,184, 4,188,194, 45,219, 27, 52, 24, 54, 99, 45, 68, 45,219,162, +127,156, 20, 93, 59,118,195, 71,191,231,162, 95,191,126,178,159,126,250,233, 38, 37, 32, 77,161, 0, 64,212, 0,240, 84, 90,154, +115,233,160,181, 30,217, 11,133, 2,128,222, 88,168, 72, 0, 12,112, 51,200, 14, 28, 56,144, 80, 74,157, 46,254,252,252,124,167, +139,223,245, 60,199,182, 87,242,119, 24,236,175,134,135,135,247,141,139,139,235,126,242,228, 73, 28, 57,114, 4, 54,155, 13,161, +161,161, 48, 24, 12,101,145,145,145,231,125, 49,250, 8, 33, 76,219,182,109,119, 63,244,208, 67,109,243,246,231, 99, 69,214,110, +180, 32, 98,244,108,107,194,153,235,161,184,183,167,229, 28, 0, 11,167,160, 57, 20, 74,155,167,103,226, 58,214, 5,166, 0,238, +108,240,153, 47, 54, 3, 48,187, 18,245,197,156, 75,192,116,223,201,223,149,108,220, 13, 90,124,149,128, 42,173, 78,102, 9,145, +168, 43, 25, 22, 87,106,107, 0,139, 5, 54, 74, 65, 0,252, 94, 83,129, 82, 67, 21, 40,165, 92, 18, 27, 30, 3, 19, 69,234, 52, +130,204,245, 55,250,228,201,179, 64,175,238, 86, 8,160,111, 20,249,187,118,118,127, 93, 94, 73, 73, 73,178,172,172,167,212, 64, + 1,180, 90,173,185,164,164, 68,184, 52, 1,204,194,221,163, 48,175,223, 65,167, 21,198, 87,169,112,231,117,169,191,205,145, 16, + 95,107, 14,139, 9,134,100, 22, 81,192,253,114, 63,103, 38, 64, 21, 40,159, 32,197,180,137,159,201,148, 91,158, 86,231,110,164, +136,143, 60,142, 17,242,190,216,191,251, 56,242,116,239,128,128, 64, 49,241, 83,222,247, 26, 25,169, 2, 33, 4,147, 38, 77,194, +231,159, 87,129, 51,138,237,255, 83, 71, 27,103,213, 25,144, 60, 76,193, 98,244, 24,153, 44,103,175, 90, 61,102, 12, 96,190,210, + 9, 23, 42,130,192, 58,102, 91,219,235,219,226,197,212,106,236,206,235,137,230, 29,123,242,186, 70,142,248, 47, 94,188, 8, 0, +184,114,229,138,211, 51,112,245,234, 85,231,192,234, 15,148, 74, 37,225, 18, 1,213,159,195,205, 80, 42, 9,159,124, 0,174,248, +252,243,207,235,196, 2, 44, 95,190,220,103,235,191, 62, 97,248, 11,137, 68,130, 43,197,231,209,173,123, 15,176, 86, 19,136,213, + 6, 97,243, 22,104, 62,120, 8,154, 13,186, 7,172,222, 10,155,193, 4,106,181, 1, 54, 22, 11, 87,126,128,169,211,167, 66, 34, +145,184,149,103, 93, 31,193,235,119,221,157, 23,251,158,251,115,227,227,227,101,121,121,121,106,110, 12, 24, 49, 98,132,219,182, +226, 65,254, 32,132,176, 0,118,244,236,217,115,208,199, 31,127,108,190,118,237, 90,109, 66, 66,194, 67, 5, 5, 5,175, 27, 12, +134,242, 86,173, 90, 41,250,244,233,163,245,161,237, 69, 0, 58,199, 13, 27,214, 58,109, 86, 26,206, 93, 60,167,125,124, 86,218, +200, 67,187,215,164, 95,174,214, 14, 31, 50, 58,129,109,219, 49,230, 17, 55, 94, 3,214,211, 88,224,202, 21, 13, 37,255, 9, 36, + 2,250,243, 40, 0, 13, 90, 23,254,144, 63, 71, 54, 92, 78, 0,127,148,128,110,138, 25, 26, 0,164, 84,185,154, 34, 88, 2, 29, +181,194,108,181,130,165, 44, 90,134,133,225,162,190,146, 95, 6, 59, 7,220, 45,239,187, 17, 3,224, 91, 38, 54,119, 46,254,198, +166,235,117,124,119,226,144, 33, 67,182, 44, 92,184, 80, 28, 25, 25,201, 94,190,124, 25,243,250, 93,174, 67,254,190,252,134,187, +246,247, 27,142, 44,127,245,147, 60,185, 59,135, 47, 6, 61, 32,208,100, 60,144, 65, 54,127,114, 73,186,237,232,155,234,220,141, + 0, 1,193,196, 1,111,200, 30,120,138,127, 2, 32,174, 47,217, 9,190,202, 49, 72, 1,238,120,103,117,186,221,121, 18,218, 57, +131, 0, 13, 23,215,152, 62,117,154,102,250,212,105,164, 92,247,177,212, 86, 93,173, 38, 2,192, 80, 27, 12, 82,109,133,144, 17, +194,192, 72,100,227,166,204,134,144, 18,175,215,153,144,144, 64,238,186,235, 46,122,171,222, 63,187,181,159, 65,210,210,210,168, +107, 68,187,171, 39,192, 71,113, 26,206,242,119, 81, 40, 52,183, 99,240, 26, 51,102, 12,158,222,152,137,183,170, 43, 48,112,244, +189, 96,218, 70,216,175,201, 66,237,169,123, 33, 2, 17, 8, 65,196, 2,124,158,177, 12, 45,198, 14, 65,247,238,221,255,208,212, +189,156,117,159,155,155,171, 30, 54,108,152,108,230,204,153,141,250,237,179,103,207,202,247,236,217, 83, 44, 16, 8, 54,143, 28, + 57,242,109,134, 97,174,197,197,197,229, 56, 45, 25, 23,143, 18, 33, 4,238,158,185,139, 39, 64,117,228,200,145,161, 95,173, 94, +195,136, 5, 65, 23, 38, 63, 54,121, 0,195, 48,186,123,239,159, 61, 1, 64,152,131,248,171, 1, 80,171,213,234,148, 87, 79,105, + 11,148,148,191, 3,193,199,253,239,151, 2,208, 20, 10,131, 39,242,241,101,128,147, 10,122,251,182, 0, 0, 32, 0, 73, 68, 65, + 84, 41,146,137,106,183, 74,202,158, 42, 84,235, 77,102, 88,109, 54,116, 31, 58, 24, 49,214, 97, 62,145, 97, 83, 6,163,112, 73, +127, 0,168, 57, 79,135,203, 84, 0,105,132,220,173,114,185, 92,168, 82,169,230, 47, 93,186,244,223, 46,202,197, 24,165, 82,233, + 83, 34, 18,135,167,160,201,146,151, 76,249, 61,201,209,142, 13,223,223, 20,149,202, 47, 77,255,193,103, 58,104, 30, 68,227,159, +143,157,220, 9,158,152, 63,198,153,167,156, 27,199, 86,167,239, 65,104,231, 12, 18,218, 57,201, 39,153,225, 45,158,213, 28, 40, + 6, 97,153, 11, 82,163,193, 94, 7, 32, 84, 34,215,132, 69,193,167, 21,163, 46,253, 79,228,208, 56,155,124, 94,149, 83, 2,154, + 66,150, 35, 22, 64,205,125,110,172, 60,127, 87,150,117,239,222, 29,237,158,123, 78,182, 98,215, 46,117,209,219,223, 33, 73,212, + 18,225,142,226, 61, 70,131, 21,115, 23,188, 12, 65, 72, 36,182,175, 81,226,215, 86, 4,227, 26,145,183,223,102,179,194,215, 24, +160,250, 74, 0, 31, 43,223, 75, 59,145,211,167, 79, 95,163,148,166,247,234,213,235,203,242,242,114,189, 80, 40,132,213,106,165, + 45, 91,182,116,122, 84,244,122, 61,196, 98,177,211,139,228, 65,222,168,252,252,124,176, 86,130,225, 35, 6,188,113,241,226, 69, +157, 86,171, 69,100,100, 36,219,177, 99, 71, 29,247,108, 42, 43, 43, 33,145, 72, 64, 8, 65, 80, 80, 16, 47,163,143, 83, 18,234, +127,174,239, 21, 13,224, 79,230, 1,184, 85, 74,129,223,196,152, 32,215, 32, 65,126, 71, 69,147, 58,148, 0,114, 11,230,209,109, +114,185,252,255,228,114,249,255, 53,197,245, 53,225,253,146,166, 56,231, 86,194,110,213, 3,142, 20,251,245,142, 37, 53, 74, 54, +195,118,210,132, 74, 58, 53,197,101, 90,110,101, 27, 52, 97,209, 21,141, 47,115,245, 94,148, 9,191,229, 80, 74, 73, 72, 72, 8, + 38, 77,154, 4, 71,249, 94,148,184,148,239, 61,176,103,183,179,124,239,216,184,177,112, 40,189, 13,254,222,231,186,247,200,147, + 17, 47,223, 76, 76, 60,171, 9,242, 80, 2, 26,141,123,238,185,199,100,181, 90,115, 0,232, 89,150,165,102,179,125,225,207,181, +107,215, 0, 0,205,154,217,151,246,114,251, 69, 34,145,199,246,123,224,129, 7, 56, 25,187, 88,150, 69,120,120, 56, 88,150,117, +174, 56,113,172, 98, 33,181,181,181, 20, 0,196, 98, 49, 8, 33,204, 31, 49,182, 7,224, 63,248,164,146, 6, 0, 50,112,224,192, +128, 38, 22, 64, 0, 1, 4,240,231,129, 21, 64, 45, 0, 73, 19, 27,113,222, 10, 6,241,174, 40, 24,192,159, 3,129,135, 25, 64, + 0, 1, 4,240,231,130, 16, 64, 51, 30,228,111,128, 61,136,187,169,248,128, 69, 96,217,223, 95,174, 35, 5, 16, 64, 0, 1, 4, +240,215, 67, 72,128, 47, 2, 8,120, 0, 2, 8, 32,128, 0, 2, 8, 32,128,128, 2, 16, 64, 0, 1, 4, 16, 64, 0,127,119,212, +113,233,204,153, 51,199,239, 8, 78,119,197,123,238,116,121,209,131,131, 16, 28,116, 5, 34,113, 5, 88,214,190, 44, 76, 32, 96, +192, 16,129,253,127,134,128, 16, 6,148, 8,237,107, 96, 97,197,150,109, 34, 80, 74, 17,201,180,132,143,215, 23, 4,160, 21,236, + 1, 60,213,176, 47,247,178,192, 49,167,246,103,108,191,128,188,128,188,128,188,128,188,128,188, 59, 83,158,207, 10,192,223, 13, + 63,238, 63,131,161, 67, 44,136, 8, 7,180, 58,130,159,127,149, 64,200, 8,113,255,120, 27,118,171, 91,131, 16, 6,132, 97, 32, +105, 14,140, 25, 90, 1, 64,136,123,227, 41,242, 11,132,118, 26,231, 1,245,193,253, 20, 0, 68,212,130, 97, 35,199, 20,159,254, +237, 39, 83, 89, 85,109,140,205, 80, 11,185, 92, 30, 14,160, 50,160,135,254,185,145,253,205,127,165, 61,186,119, 83, 95,187, 86, +219,168,132, 79,127, 34, 72, 83, 83, 83, 93,243, 0, 52,234,158, 83, 83, 83,253, 78, 7, 28, 64, 0, 1, 52,145, 7,128,195,154, +175,190,224,173, 77, 60, 49,115,150,215,151,181,169,229, 53, 37,242, 11, 68, 72, 76,176,225,215,223,130, 33, 22, 9, 33, 20, 8, + 33, 18, 81, 4, 9, 44,128,176, 57,132, 48, 98,104, 95, 43, 36,226, 32, 80, 0,237,219, 2, 15,222,207, 98,207,102,126,228,127, +230,247,211,184,171, 79,119,116,136, 10,199,197,226,147, 93,194,218,117, 67,171, 14, 54,252,240,253,247, 80,169, 84, 21,183,123, +125,188, 74,165,186, 63, 43, 43,107, 27,183,157,148,148,244,128, 92, 46,223, 22,120, 53,188,227,183, 95, 85,212, 90,123, 92, 54, +237,193,238,106,150, 45, 71,101, 7,163,250,228,177,141,168, 49,181,199,144,216,145,127, 89, 18, 75, 77, 77, 85,207,155, 55, 15, +132, 16, 94,101,123,249,128, 75, 22,211, 4,229,230, 3,104,164, 2,230, 17,148, 34,243,243,207, 27,124,222, 92,130, 31,215,108, +129, 92, 13, 1,151, 90, 2,206,231,236, 90, 25, 49,128,166, 5,151, 13,144,131,187,220, 0,119,148, 7,128,193, 31,219, 15,238, + 31,103, 1,133, 0, 66,129, 8,195,135, 17,180,105,205, 64, 40,100, 16, 36, 18,160, 87, 12,131,226, 11, 86, 12,141,101,208, 50, + 82,130, 31,246,182, 0, 0, 8,168, 17,246, 84,216, 54,175,228,255, 91, 65, 1,186,118,232,136,223,114,243,112,200,108,129,238, +186, 14,226,160,230,232, 61,104, 4, 6,140, 24, 7,245,150, 44, 0,252,114,227,223, 2,226, 31,147,149,149,181,103,225,194,133, + 40, 40, 40,224, 58, 76, 5,128,231,102,207,158,189, 53, 41, 41, 73, 46,151,203,247,252,229, 94,138,159, 85, 52, 72,168,133,144, + 49,163,182,214,134, 74,125, 48,238, 29, 53,197,167,246,223,152,253,149,180, 69,176, 22,255,152, 58, 24, 93,187, 60,168,110,209, + 34, 12, 22,171, 21,215,174, 93, 71,219,146, 11, 40, 60, 91,132,131, 7,180,116,248,136,135,252,122,174,153,153,153,212,101,112, +190,211, 6, 71, 41,112,163, 28,174,163, 58,160, 20,183, 41, 29,240, 31,248,190,208, 77,155, 54,221, 92, 79,225,182,145, 23,149, + 18, 16,208, 38,104,119, 90,242, 13,200,161,217,174, 28,239,200,146,233,168,134,228,130,217, 25,122, 12,157,250,177, 71, 69,238, +135, 31,126,112,110, 39, 38, 38, 98,199,142, 29, 30,183, 3,184,245,228,239,186,207, 85, 17,240,168, 0, 28,216,127, 8, 35,238, + 29,246,135, 93, 52,235, 67,254, 84,215, 84,146,254,102,159, 98,132, 2,232,180, 66,180,107, 35, 66,187, 54, 98,212,212,136, 32, + 17, 9, 97, 19, 6, 97,112,127,130,129,119, 11,192, 16,145, 61, 5,166, 72, 12, 17, 99, 2,145,136, 97, 53, 0, 86,232, 61,146, +255,254,189,123,208,173,125,107, 28,251,245, 24, 22,189,253, 70,157,235, 91,242,230,187,148, 17, 16, 12,142, 29,140, 31,118,236, +241,169,242, 30,203,178,210,130,130, 2,245,153, 51,103, 16, 28, 28,140,224,224, 96, 89, 98, 98,162,198,199,193, 76,150,149,149, +181,135, 35,126,151,206, 17, 14, 96,220,127,254,243,159,235,179,103,207, 86, 1, 72,144,203,229,170, 59,177,131,175, 90,181, 74, +154,146,146,194,251,190,191,222,176, 70,218, 47,166,185,186, 75,251, 90,132,181, 8, 2,195,132,192,104,180,162, 92,107, 68,142, +106, 5,149,180, 24,140, 97, 67, 71,241,234, 71, 34, 92,193,164, 7,238, 86,247,237,219, 27,151,175,232,112,248,231, 35,168,169, +209, 35, 44,172, 57,162,163,187,128, 17,136, 96,179,149,224,231, 95,246,211, 65, 3,239,253, 75, 89, 55,169,169,169,234,231,159, +127,222,185, 61,111,222, 60, 44, 95,190, 92,253,185, 7,171,208, 39, 50,186, 67, 61, 0, 14, 37,157,102,103,103,195, 93, 97,165, + 63, 18,174, 86,182, 82,153, 33,163,180,113, 74, 0,211,229, 81, 39,121,231,191,215,204,173, 25,214, 46,156, 65, 84, 36,243,167, +125,126,127, 87,184,146,189, 59,165,192,171, 7,224,192,254, 67, 0,208,104, 69, 96,255,115,133, 30,143,223,251, 81, 15,191, 7, + 11, 66,136, 95,213,246, 84,154, 54, 16, 9, 69,232,212,161, 6,213,213, 34, 28, 62,214, 9, 2,129, 0, 2, 34,128, 88,100, 69, +223, 30, 6,244,236, 33, 0, 1, 3,177, 40, 8, 98, 1, 65,236,221,102, 68, 70,176, 88,247,165,103,217,189,187,181, 69,241,217, +178,155,200, 31, 0, 22, 45,126,133,188,251,246,191,105,251,248,187, 17, 17,222,156,247,245, 26,141, 70,233,242,229,203,213,197, +197,197,117,244, 13,147,201,132,135, 30,226,111,109,102,101,101,237,117, 37,127, 55,104,149,158,158, 94,241,194, 11, 47,236,190, +221, 83, 20, 13,145,255,161, 67,135,212, 41, 41, 41,188,175, 45, 38, 58, 82, 29,213,182, 10,173, 90,134,162, 99, 84, 59,132,132, +134,160,184,184, 20, 54, 27,139,168, 14,205,113,252,247, 92,172, 62, 85, 40, 77,126,124,150,199,193,244,232,209,253,244,145,137, +189,209,185,115, 71,156,248,189, 24,135, 15,255,142,107,215,171, 65, 41, 16, 17, 17, 12,131,161, 6,131, 6,245, 69, 69, 69, 37, + 74, 15,255,140,175,254,119, 90, 58,243, 31,252, 21,149, 59, 28, 82,192, 94,124,138,195,135, 31,126,200,109,251,228, 5, 72, 77, + 77,165,174, 46, 97, 87, 11,210,213, 37,221, 20,211, 11,111,191,253, 54,237,212,169, 83,163,115,241,203,229,114, 66, 8,161, 27, + 55,110,244,152, 99,159, 67, 90, 90, 26,117,231, 33, 88,189,122,181,148, 43, 14,228, 78,137, 85, 40, 20,180,161, 84,174,174,245, + 28, 40,165, 80, 40,210,212,141,241, 66,212,151, 55,244,229, 26,252,244, 94,179, 58,196, 31,192,159,211,250,175,223,135, 26, 53, + 5,208, 88, 69,224,222,143,122, 52,168, 4,248, 67,254, 28,114,114,114, 80, 90, 90, 10, 0,136,138,138,162,190, 40, 1, 2,106, +132,144,216, 32, 22,137,240,243,177,214, 16, 8,133,104, 46,210,219,227, 0,154, 49, 40, 45,109,142,187,251,178, 32,132, 32,233, + 65, 43, 40,203, 0, 36,200,238,120, 67,117,131,114, 13, 21, 23,112, 69, 91,131, 23, 94,127,189,193,107,169,168,212, 66,119,237, +138, 67, 22,111,226,174, 79,254, 0,128,237,219,183,195,102,179, 73, 31,121,228, 17,175, 3,156, 74,165, 26, 83,191,244, 47,215, + 97, 42, 43,235,196, 35,134, 47, 94,188, 24, 42,149,106,236,157, 52, 21,192,145,191, 47,223,249,122,195, 26,233,221, 49, 38, 4, + 7,135, 67, 18, 36, 70,183,110, 93,209,169,107, 87, 84, 85,105,160,213,214, 64, 44, 22, 32, 50, 66, 2, 97,112,184,199, 92,241, + 0, 32,164,165,104,222,172, 37, 12, 70, 43,142, 29, 43,196,165, 43,149,184,124,165, 6, 70,147, 4,157,163,172,144, 4, 9, 80, +120,186, 8,119,117,239,142, 75,151,171, 96,180,182,240, 42,211, 65,116,212,219,126, 95,167, 3, 26,146,233,143, 44,206,250,159, + 55,111,222, 77,251,159,127,254,121,191, 98, 1,220,145,104,253,185,227,166,242, 42,228,230,230,170,209,200,130, 60,123,246,236, +161, 89, 89, 89, 72, 74, 74,130,187,233, 0, 62,158, 42,142,252, 1, 32, 63, 63, 95,205, 48, 76,157,107, 90,189,122,181,148,143, +209, 19, 31, 31, 47,227,228, 52,133,199,101,227,243,161,152,178, 92,239,150,248,163, 34, 25,199, 40,197,239,241, 38, 38, 38,214, +241,146,220,119,223,125,117,218, 42,224,246,191,115,224,115, 12, 64, 83,121, 4,154, 18,133,133,118,197,162,180,180,212, 39, 37, + 64, 40, 20, 66, 36, 16, 65, 36, 34, 24, 53, 2, 48,232, 77, 56,119, 86, 12,145, 80, 4,161, 77,136,184, 97, 20, 98,145, 8, 2, + 1, 3, 80, 2,173, 14,248,233,136, 16, 44,203, 2,184,214,160,220, 35, 63,159, 69, 77, 77,195, 25, 56,223, 95,188,152, 6, 5, + 73, 96, 52, 86,194,198, 90,121,223,231,145, 35, 71, 26, 86, 58, 12, 6, 94, 68, 83,223,245,239, 78, 51,220,178,101,139,235,249, +170,219,225, 5,112,231,226,119, 37,255,248,248,120,222, 85,232, 58, 70,181, 85, 51,204, 5, 88,109, 44,204, 22, 43,174, 93,215, + 66, 36,150,192,100,178,192, 98,181,193,106,101, 97,181, 81, 84,232,174,123,149, 37, 22,233, 33, 9,238,136,242,242, 74, 84, 85, + 27,160,213, 25,209,162,229, 0, 12,191,251,110,228, 31,216,129, 14,102, 43, 42,171, 42,209,179,103,119, 4,137,133,208, 87,107, +255, 42, 99,133,148, 82,234,156,251,119,197,138, 21, 43,252,138, 5,152, 55,111, 94, 29,111, 66,253, 99,124, 21, 0,123,169,103, +206,162,141,196,216,177, 99,235,244, 87,206, 64, 40, 41, 41, 81,171, 84, 42,191, 10, 83,169, 84, 42, 39,249,115,211, 1,155, 54, +109,242, 74,174,245, 61, 85,185,185,185,106, 46,240, 77,161, 80,208,188,188, 60,117,114,114,178,243,120, 94, 94,158,154, 16,207, +151, 23, 31, 31, 47,115, 45, 51,156,150,150, 70, 61,181,149,183,241, 48, 41, 41, 9,147,227, 85,216, 0, 96,234,114, 61,238,121, +185,198, 99,219, 15,157,234,185,173,234,207,241,123,139, 9, 8,224,214,123, 3, 26,242, 0,252,161,254, 29,119,150,126, 99,172, +255,122, 22, 43, 10, 11, 11,177, 98,197, 10,222,165, 38, 5, 2, 33,226,134,178, 16, 48, 66,252, 84, 32,193,169, 66, 9, 38,140, + 7, 30,184, 15,152,152, 72,208,190,173, 24, 18,113, 16, 36,226, 32, 4, 75,130, 16,213, 62, 8, 18,177, 4, 18,177,231,146,152, +175, 45,122,149, 44,125,239, 45,210,208, 64,210,189, 91, 23,132,133,135, 66,194,154, 81, 99,176,252,225,157, 98,255,254,253,123, +246,239,223, 95,135,240, 93,255, 0,160,188,188, 28, 19, 39, 78,188,109, 86,126,126,126,190,218,213, 26,226,246, 1,192,176, 97, +195,124,178,228,108, 54, 64,111,176, 64,175, 55,163,170,202,132,171, 87,117,184,116,233, 58,170,171, 77,168,169,177,160,166,198, + 12,189,222,130,202, 10,239, 43, 50, 77, 38, 43,106,107,109,176, 88,204,104,222, 92,140, 78, 81, 45, 16, 18, 26, 10, 0,136,238, +222, 21, 29, 59,180, 64, 88, 11, 9, 40,181,193, 98,101, 97, 50,233,255, 18, 3, 73,106,106,170,122,254,252,249, 30,201,156, 91, + 26,200,211, 59, 33,115, 40, 13,110,177,124,249,114,124,254,249,231, 62,151, 26,182,187,197, 21,212,245,143, 35,212,210,210, 82, +100,101,101,249, 92,138,118,207,158, 61, 52, 59, 59,219,149,252, 33,151,203,201,228,201,147, 61,126,111,206,156, 57, 32,132, 56, +173,250, 85,171, 86, 73, 1, 32, 46, 46, 78,230,170,196,186, 30,167,148, 58,143,243,184,219, 58, 86,188, 59,197,193,155, 50, 1, + 0,173, 90,181, 2,113,177, 30, 26, 43, 47,128, 59,143,252,221,109,251,229, 1,184,147, 44,255, 27, 3,188, 13, 2,129,192,231, +239,141, 24,202,162, 77,235, 32, 84, 85, 9, 17, 36,180, 34, 72, 44,128,230,144, 24, 19,100, 34,136, 69, 34, 84, 85,137,112,160, + 32, 20, 45, 36, 4, 12,195, 32, 81,110,198, 67, 19, 40, 24,134,226,157, 95,124,191, 78,149, 74, 69, 5, 33, 18,104, 69,173, 16, + 98,185,136, 51,165, 20, 99,164,163,120,127,127,208,160, 65, 56,120,240,160,219, 99, 33, 33, 33,188, 7, 75,157, 78, 55,214, 49, +240, 32, 57, 57,217,185,191,188,188,220,249, 57, 57, 57, 25,101,101,101,183,229,121,166,164,164,104,242,243,243,145,155,155,171, +102, 89, 86,198, 48, 12, 56,203,191,161,121, 83, 79, 40,185,112, 73,214,186,133, 65, 29, 36, 22,192,108, 97, 81,107,186,136, 11, + 23,203,161,213, 85, 65,171, 53,160, 92,107, 68,185,214,136,240,200,174, 94,101, 93,189, 78,113,229,234,117,244,238,221, 29, 21, + 58, 29, 68, 66, 6, 85,213, 23,161,175, 96,209,231, 46, 61,218,182,110,141,144,144, 16, 4, 5, 5,227,242,149,106, 16, 65, 4, + 95,130, 37, 46,228,216, 36,171, 0,154,122, 5, 65, 67,214, 58, 80, 39, 22,128, 47, 52, 0, 48,119,238,220,155,188, 10, 46,211, + 12, 26,127,174,115,202,148, 41,117, 44,216,172,172, 44, 39,121, 61,250,232,163, 72, 72, 72, 32,124, 19,167,184,177,252,157,168, +239,105,168,143,129, 3, 7, 18, 74,169,211,202,207,207,207, 87, 19, 66,156,165,129,147,147,147, 53,185,185,185,200,205,205, 85, + 39, 39, 39,147, 67,135, 14, 57,143,175, 92,185,178, 65,185,185,185,185,106,134, 33,178,188, 60,251, 59, 49,103,206, 28,252,242, +203,207, 50,142,194,243,242,242,212,220,253,243, 81, 38, 86,174, 92,137, 79,101, 17,152,186,194, 0,192, 62, 29,224,138,169, 43, + 12,206,246, 76,145,137, 2,204,250,103, 81,218, 23,190, 95, 87,233, 94,250, 18,126,249,229, 23,254,171, 0,110, 5,241,187,198, + 2, 52,198,250,175,107,201,215, 37,255,196,196, 68, 40, 20, 10,175, 83, 1,173, 90, 9,192, 16, 1, 90,183, 18,160, 71,119,138, + 75,151,132, 96, 4, 4, 34,161, 16, 34,161, 8,191, 29, 13, 69,100,168, 8, 2,129, 0, 35,134,217, 16, 28, 28, 4,150,165, 0, +181,249, 69,254,205,218,118,194,213, 26, 10,253, 25, 13,132, 68,128, 23, 23, 47, 34, 62, 14,108,178, 11, 23, 46,168, 47, 92,184, +112,211,253, 78,154, 52,137,215, 96,153,148,148,148, 80, 94, 94,190,155, 35,121, 0,152, 56,113, 34, 86,175, 94,237, 60,167,170, +170, 10,101,101,101,216,186,117, 43,146,146,146,198,220,142,206, 27, 23, 23, 39,203,205,205, 85,231,231,231,171,185, 96,177,184, +184, 56,191,230,112,103,254, 35,229,255,217,251,242,240,166,170,252,253,247,220,236, 93,105, 75, 41, 75,217,165,130,108, 5, 42, + 32,107, 2, 5, 20,176, 34,180,200, 38, 95,100,102, 26, 24, 87, 96, 20, 69,231,231,204,168, 40, 46,128, 35, 35,180,140,138, 11, + 21,105, 21, 44, 88, 4, 10, 9,139,136,149,138,128, 44,178,148,181,133,174,105,211, 52,123,238,249,253,145,222,152,134,180,185, + 73,195, 58,247,125,158, 60, 77,238,189,249, 52,247,220,115,206,251,217,206,231,104, 55,124,153, 9, 90,172,135,209,100,131, 78, +102, 6,133, 14,102,179, 29,122,189, 5,101, 21, 70,148, 92, 53, 96,184,170,163, 79, 89, 38,107, 75, 20,157, 47, 71,151,206, 29, +208,185,115, 60, 42, 43, 43, 16,213,194,129,110,221, 34,209, 42,182, 11,228, 10, 5,170,171, 13, 40,252,229, 20,174, 20,235,209, + 58,190,231, 29, 59,129, 80,128, 18, 2, 21,199,165,238,164,218,212,186,125, 90,159, 44,120,189,249,136, 6,171,202, 50, 51, 51, + 85, 43, 87,174,212,120, 42, 0,203,151, 47,231, 10, 12, 53, 41,143, 82, 74, 9, 33, 68,173,142,114,251, 77,244, 58, 98,206,206, +118,134, 8, 82, 83, 83,121,185,255, 27,134, 20,118,121, 37,127,190,120,224,129, 7, 84, 7, 15, 30,212,112, 94,135,161, 67,135, +170,188,157,231,146,241,124, 17, 54, 23, 91,255,225,135, 3, 26, 66, 8, 8, 33, 72, 76,236,171, 74, 76, 76,212,186, 41, 8,245, +215, 2,190,198, 11, 39,143,153,170, 3, 39, 47,109, 84,167, 6, 15,106,234,138, 19, 46,121,124, 32,228, 0,220, 57,240,169, 0, +220,142, 22, 63,135,105,211,166, 53,235,251, 12,195, 64, 36,114,190,122, 36, 48,232,215,219, 1,153, 84,238, 84, 0, 36, 18, 12, + 25, 4,200,100,128, 68, 36, 67,203,150,114,136, 68,117,112, 56, 88,176,172,255,110,123, 99,213, 53,200,227,187,227,124,254, 23, +136, 21, 51,120,252,229, 37,126, 79, 40, 10,133, 66,187,100,201, 18, 85,115,150, 1, 38, 39, 39,231,171,213,106, 60,245,212, 83, +174, 99,156,165,175,215,235, 97, 52, 26, 49,119,238, 92, 0,192,135, 31,126,136,140,140, 12,205,173,120,182,115,230,204,209,178, + 44,171,226, 44,255,129, 3, 7, 54, 43,129, 43,190,227,189, 56,116,112, 59, 90,181, 12, 65, 72,136,179,219, 91, 44, 14,232,107, +173,168,210,153,208,190,115, 79, 12, 27, 50,210,231, 51, 25, 63,126, 10,217,177,237, 19,122,176,224, 56,134, 15,237,139,142, 29, + 59,194,102, 53,163, 95, 98, 31,132, 70, 70,226, 98,209, 37, 20,151, 84,227,135, 31, 79, 66, 87, 27,137, 71, 31, 24,121,199,250, + 76,231,207, 83, 3,128, 6, 32,152,175, 86,187, 8,156,245, 32,125,134, 33, 78,109,161,158,151, 9,128,190, 94,226,141,243,212, +106, 10, 10,183, 76, 21,130,244,244,244, 6, 94,128,103,159,125, 22,132, 16,204,155,167,214,112,236, 15, 2,244,237,155,232,141, +188, 92,238,120, 95, 36,199,151,252, 61,145,154,154,138,209,163, 71,171,154,211,143, 81, 31,171, 31, 52,104,144,106,246,236,217, +218,198,206,187,197,246, 27, 5,151, 59,192, 41, 95,206, 48, 2,209,122, 42, 21,124,127,159,167,188,141, 11,194,156,141, 46,143, +115, 93,179,113,193, 37,151, 66,176,253, 72,211,115,159,183, 58, 0, 66, 14,192, 29,170, 0, 12, 25, 58,240,134,196,124,130,101, +249,187,119,164, 64, 80,165, 35,104, 19,199,184, 74,254,238,216,229,140,239,203,100,114,200,164, 50, 60,252, 16,129, 92, 38,133, + 66, 78, 80, 85, 41, 66, 65, 97, 56, 28,172, 3,237,227,253,139,235,230,231,231,211,106,163, 9,186, 67,121,232,214, 94,130,223, +138, 3,143, 11, 51, 12,163, 29, 56,112, 32, 25, 56,112, 96,192, 50,210,210,210, 84,171, 86,173,210,112,110,254,202,202,202,199, + 6, 13, 26,100,216,185,115,231,119,143, 60,242,200,216,202,202, 74,242,248,227,143,111, 79, 75, 75, 83,221,202,206, 89,239,234, + 87,185,189, 15,188,207, 57,201,157,158, 62,117, 2, 37, 69, 23,193, 48, 4, 14, 7,133, 92, 17,141,132, 30,189,240,232,164, 52, +222, 29,189,164,156, 85, 85, 85,150,104,204,102, 59,122,247,234,130,118,109, 91,226,210,229, 82,232,142,157,195,239,167, 47, 97, +215,238,163,184, 88, 76,241,231,191, 60, 29,208,224,185, 93,138,255,176, 95, 69, 5,124, 93,191,165, 60,229,157,251, 4, 43, 87, +174,116, 41, 0, 43, 87,174, 4,138,214, 93,119,173, 55,121,141,120, 5,174,155,179,154, 91,172,135, 16,210,172,190,199,145,124, + 99,228,238,235,188, 55,175,130,199,119,189,201,227,255,156, 47,126,141,156,149,179,157,115,195,168, 14, 13,200, 31, 0,210,198, +223,239,124,163,251,213,167, 2, 32,212, 1,184,125,144,185,236,197,235,194, 0,126, 41, 0,183,115,194, 71,160,197,127,220,113, +232, 23, 25,228, 82, 41, 30, 30, 79,192, 16,130,129, 73,118, 28,251, 77, 1,134, 56, 99,254,213,213, 12,218,182, 22,129, 33, 82, + 28, 57, 38,133, 92, 6, 88,109, 86, 92,188,164,240,139,252,207,157, 62,140, 65,163, 39, 66,220,114, 16,206,157, 46,128,248, 90, + 14, 94,120,254, 37,250,246, 59,111,222,146, 6,174,175, 87,175, 74, 74, 74,210, 44, 94,188, 24,189,122,245, 42,211,233,116, 72, + 74, 74, 82,233,116, 58, 60,243,204, 51,154,180,180,180,219,162,174,125,115,137,223, 83, 9, 24, 54,100, 36,214,125,254,145,178, + 77,235, 54,154,208,208, 80, 94, 86,255,117, 19,236,236, 63,105, 1,144,245, 95,100,208, 19,191,255,132, 54,113, 97,144,203, 37, + 48, 24,172, 40,190,170, 7, 17,183,199,159,255, 50, 91,200,150,226,131, 95, 22, 1, 93,159, 64,131,229,133,133, 11,155, 67,214, +205,254, 73,243,230, 69,187, 41, 18,193, 33, 52, 95,164,236, 15,105, 55,183,158,129,183, 54, 75,123, 64,230,188, 87,211, 85,231, + 75,192, 29,139,196,196, 68, 87,194, 95,230,178, 23,175, 59,231, 83, 1, 8,118, 61,254,155, 93,223,223,175,206, 15, 2,157,142, + 32,164, 53, 65, 76, 52, 65, 82,127, 27,228, 82, 17,100, 82, 27, 98,162,229,245,147, 0,193,224, 36, 7, 10,126,145, 56,189, 5, + 60, 39,153,252,252,124,218,243,222, 8, 44,122,246, 95, 48, 73,227,241, 77,126, 49,186, 38, 56, 45,247,176,159,183, 98,209,223, + 94,162,239,189,123,235,148,128,228,228,100,146,159,159,175, 92,182,108,153,198,221, 59, 16, 12,229,234,118, 70,125,177,159,102, +223,227,204, 89,106,178,255,192, 30, 90, 94, 89, 14,211, 53, 35,228,242, 24,196,119,238, 19,144, 82,113,167,193, 89, 14, 59, 72, +183, 89,180, 14,174, 21, 1, 69,159,222,242,123,243,149,220,119,183, 97,236,196,199,252,178,220,125,249, 30,133, 28,128,219, 75, + 9,104,140,252,125,122, 0,254, 23, 64,225,204,234, 39, 12, 5, 5, 69,116, 11,138, 61,251,197,144, 75, 37,144, 73,197, 72, 25, + 79, 65, 41,139,168, 24, 59,236, 14, 2,150,117,212, 79,126,190,209,167,147, 1, 19,166,164,193, 32,238,134, 86, 97,161,152,241, +104, 52,178, 54, 29,115, 41, 1, 54,199, 55,183,252,254, 57, 69, 64, 24, 50,129,123, 21,238,214,123,203,212,189, 69,210,163, 94, +188,158, 25,178,163, 3,149,135,244,168, 23,175, 63, 81,184,176, 89, 86,191,128,230, 33,245,201, 85, 65,235,195,119,187,241,112, +167, 41, 1, 62, 13,224,196,196, 68, 33,104, 35, 64,128, 0, 1, 2, 4,252,143, 65, 40,244, 44, 64,128, 0, 1, 2, 4, 8, 10, +128, 0, 1, 2, 4, 8, 16, 32, 64, 80, 0, 4, 8, 16, 32, 64,128, 0, 1,130, 2, 32, 64,128, 0, 1, 2, 4, 8,184, 59,208, + 96, 21,192,252,249,243, 3,206,224,244, 86, 91, 59,216,242,102,206,157,231,243,123,117, 85,215, 92,239, 67,163, 91,187,222,175, +255,120,205,117,215,198,170,254,236, 83,222,206, 21,127, 84,204, 27,179, 96,149,235,125,185,230,191, 8,228,247, 53,134, 64,127, + 95, 99,240,246,251, 38, 61,174,246,249,189, 67,154,239,208,169, 83, 39, 92,184,112, 1, 73,170, 9,174,227,155, 63,207,184,225, +237,247,231,171, 87,155,236, 47, 22,177, 88,185,168,184,216,181,100,113, 85, 92,156,235,250,255,182,105,115,195,251,159,167,188, +220,220, 92,101, 94, 94, 94,131, 74,137,227,199,143, 87,165,164,164,104,111,197,248, 56,124,248,112,192,242,250,245,235,119,163, +127, 31,153, 63,127, 62,110,231,249,229, 86,200,203,202,202,154,222,187,119,239,172, 99,199,142, 77,153, 49, 99,198, 55,205,149, +231,190,209,145,123, 70,254,221,218,126,130,188,198,229,249,173, 0,120,194,110,183, 43,205,102, 51,136, 72, 2, 66, 8, 28,118, + 27,164, 18, 49,100, 50,153,182,185,154,135,221,110, 87, 2,128, 88, 44,110,150,172,186,170,107, 8,141,110,237, 34,254,214,237, + 59, 1, 0,174, 93,190, 16,144,188,157, 43,158,194,152, 5,171, 92,196,245,159,220, 2, 0,192,147, 41, 3,113, 55,226,144,230, + 59, 36,169, 38,224,144,230, 59, 0,192,132,212,153, 0,128, 11, 23,110,125,251,253,187,180, 84,121, 26,208, 36, 0,170,211,128, +115, 15,245,197, 47, 0, 0, 6, 46,123,251,150,182,155, 86,171,165,121,121,121, 48,155,205, 13,142,203,229,114, 77, 68, 68, 4, +148, 74,229,109,185, 28,138, 16, 50,236,222,206,237, 62,165, 14,135,241,244,165,107, 47, 81, 74,183, 10,118, 80, 19, 74,167,197, + 50,234,240,225,195, 17, 37, 37, 37,173,163,163,163, 91, 12, 24, 48,160, 56, 60, 60,252,243, 64,229,101,101,101,141,158, 49, 99, +198,158,172,172,172, 63, 3,136,156,246,196,188,185, 0,216, 99,199,142,205, 6,176, 25, 0,235,143, 60,110,207, 19,142,248,155, + 51,222, 60,119, 73, 12,214,146,190,198,148, 18, 1,183,153, 7,192, 29,250, 90,131,178, 77,194,253,154,145,189,187, 35, 68, 38, + 1,165, 20, 14, 7,197,111,103, 46,226,252,209,125, 42,133, 76, 2,145, 72, 20, 16,121,135,201, 47, 40,123,118, 43,210,252,118, +186,139,170,206,210, 41, 96,226, 7, 0, 69,100, 12,234,170,174,185,136,191, 41,143, 0, 31, 75,117,224,204, 23,177,115,197, 83, +174,129,212,216,117, 77,173,177,244,252,159, 82,169, 20,128,179, 76, 38,203, 58,199,183,195,225,112,253,126, 70, 36,225,109, 69, + 3, 64,155, 86,206, 82,157, 86,125, 53, 44,118, 59, 0,192, 96,119,202,235, 60,246, 79,184,167,103, 63, 94,196, 15, 0,125,135, +140,198, 33,205,119, 46,226,111,236,186,155,217,126, 0,240, 84,105, 41, 5,128,113,161,161,216, 94, 87,167,225,136, 31, 0,126, +223,177,243,186,235, 18,219,180,225,245, 59,107, 66, 43,148,133, 21, 63,163,248,210, 17,116,235, 56, 24,131,229, 74,191,251,112, +110,110,238, 35,219,182,109,227,200,223, 14,192, 12, 32, 4, 0,107, 54,155,197, 10,133, 2,122,189, 94,233,205, 19,112,139,201, + 63,238,254,196,222,219,182,127,185, 38,172,174,248, 36,134,165,205,207, 34,132,204,166,148,110,190,221, 38,166,252,252,124,218, +156,250, 20,124, 54, 3,107, 10, 54,155, 77, 89, 80, 80,160, 57,126,252,184,235, 88, 69, 69, 5, 78,159, 62,141, 54,109,218,124, +166, 84, 42, 85,225,225,225,124,159, 47,147,149,149,245, 79, 0, 15, 12, 27, 55, 73,145,149,149, 21, 55,237,137,121,225, 0, 28, + 0,184,142,123,111,253,117, 35,248,222, 31, 55,222,212,106, 53,109,108,188,113,215,249, 26,111,106,181,154,238,253,177, 0, 34, +145, 24, 14,135, 29, 53,181, 6,204,152,242, 8,125,247,221,119,155, 69,216,158, 74, 69,115,159,139, 0,223,240,182,237, 47, 7, + 94,149, 0,235, 76, 86,229,232,148, 25,154,246,173, 34, 17, 34, 23,131,101, 89, 56, 88, 64, 44, 34,136,142,236,142,158,221, 58, +104,242,183,127,167,114,216,234,148,254, 42, 1, 86,171, 85,217,163,231,121, 77,223,238,231, 33, 98, 28, 26,237,161,118, 42,169, + 68,226,151,140,186,170,107, 80, 68,198, 32, 50, 34, 28, 0, 92,127,189, 93,215,186,125, 39,159,222,128,157, 43,158,194,192,153, + 47,226,255, 30,155, 12, 0,174,191,222,174,251, 79,110,129, 95,218,181, 72, 36, 66,124,124, 60, 68, 34, 17,172, 86, 43,234,234, +234,224,112, 56,160,211,233, 2,122,184, 97, 98, 17, 62, 94,185, 9,178, 72,160,244, 2,240,179,161, 24,229,215,206,226,243, 21, + 47,249,101,245,247, 29, 50, 26,241,109,157, 33,146,120, 47,228,223,169, 83, 39, 87, 56, 0, 0,174, 92,185, 18,148,246,227, 83, + 92,245,169,210, 82, 58, 46, 52, 20,175, 61,245, 36, 0,224, 53, 55,226,255,226,244,233,134,228,239, 71,181,214, 61, 23,190, 80, +118,124, 66,172,121,177,195, 44, 88,216,100,200, 88,138,147, 21,187,240,201, 59, 27, 85,169,125, 50,248,246, 65,113, 94, 94,222, +102,147,201,132,117,235,214,153,231,204,153, 35, 7, 16, 6,128, 93,183,110,157,117,206,156, 57, 98,147,201, 4,185, 92,174, 73, + 73, 73,105,214, 68,247,205, 55,223, 40,119,236,216,161,105,110, 45,123, 87,223,145, 50,255,239,131,215, 94, 80,180, 56,241, 37, + 20,191,239,198, 63, 70, 69,133, 63,179,165,252, 95,245,150,231,109, 69,254, 27, 55,110,132, 78, 55,134,102,103,167,249,125,239, + 31,127,252,177,178, 57,100, 83, 87, 87,167,204,205,205,213,212,214,214,122, 61,127,245,234, 85,228,228,228,104,122,244,232,161, + 26, 60,120,176,175,126, 67,178,178,178, 62, 31, 54,110,210,212,211,135, 15,136,227,219,182,182, 79,123, 98, 94,131,121,119,247, +119,223,160,119,239,222,221,179,178,178, 30,234,221,187,119, 46, 0,236,223,191,191, 73, 82,229, 51,222,212,106, 53, 5, 33,128, +143, 42,127,107,214,172,161,215,202, 42,112,248,183, 19,174, 99,102,179, 5,111,127,144,105, 80,207,153, 46, 16,246, 93,140,235, +146, 0,107,107,107,149,195,198, 62,170,233,222, 33, 6, 50, 9, 3,150,101,113,237,218, 53, 28, 59,114, 24, 86, 59, 11,150,165, +136,137, 12,193,216,135, 38,106, 76, 22,187,223,255, 80, 38, 41, 67,215, 14,215, 0, 17,193,125,221, 46, 67, 38, 46,245,219,242, +119, 39,255,235, 44, 60,125, 45,174, 93,190, 0, 69,100, 76,163, 94,129,166,200,203, 19,159,126,245, 13,158, 76, 25,136,129, 51, + 95,108,212,170,245, 6,169, 84, 10,145, 72,132,136,136, 8, 20, 21, 21, 65,167,211, 57, 21,169, 0,201,191, 77,171, 56,132,137, + 69,120,244,233,215,241,208,140, 33,216,250, 91, 49,174,153,208,108,242,247,196,149,146,107, 56,126,232, 7,196, 70, 69, 56,201, + 95, 44, 10, 74,251, 61, 56,229,255, 0, 0, 81, 98,137, 95,228, 15, 0,127, 95,245, 31,252,125,213,127, 92,228,191,189,174, 14, +207,143,157,232, 60, 25, 43,229,117,223,159, 94,124, 75,249,151, 69, 15,104,158,232,248, 87, 72,152, 48,132, 34, 4, 12, 68,104, + 23, 55, 20, 79,189,182, 80, 83,212,118, 5, 47, 53, 66,171,213,218, 0,224,211, 79, 63, 53, 2,144,115,219, 40,175, 91,183,142, + 5, 16,226,190,173,178, 86,171, 13, 40, 46,103, 52, 26,149,254, 28,231, 97,249, 15,187,191,127,162, 49,251,155, 77,234,126,189, + 18, 68,117, 39,118,225, 66, 89, 45,174, 86, 27,193, 82, 26, 80, 34,112,122,122, 58, 77, 75,203,166,235,215,175, 15,106, 33, 49, + 55,242, 71,116,116,126, 64, 50, 10, 10, 10, 52, 25, 25, 25,132, 16,226, 82, 6,252,252, 13,215,145,255,161, 67,135, 48, 99,198, + 12,119, 15, 1, 78,157, 58,165, 49, 26,141, 77,110,152,149,149,149,245,212,176,113,147, 38,190,177,100,129, 56, 59, 59, 27,255, +253,224, 93,113,189,199,200, 69,254,217,217,217, 88,181,106, 21,122,247,238,157,235,107,188,121,146,127, 99,227,237,161,161,245, + 94,192,240, 80,159,242,222,251, 96,181,139,252,203, 42, 42, 81, 86, 81,137,154, 90, 3, 36, 18,113,216,234,117, 95,154, 61,173, +120, 1,119, 6, 18, 19, 19,175,123, 53,169, 0, 56, 28, 14, 26,211,169, 15, 58,181,110, 1,179,205, 1, 66,128,237,219,191,199, +103,159,174,195,209, 35, 71,240,252,194,231, 32, 18, 49, 96, 29, 44, 34, 66,100,232,212,103,152,198,100, 50,241, 30, 96, 54,155, + 77,217,179,219, 69, 77, 68,152, 17, 31,127, 90, 6,134, 80, 12,236,253,187,198,102,179,249, 53, 72,189,145, 63, 71,252,166,154, +202, 6, 10, 66,141,190,214,167, 60,111,131,137, 27, 72, 5,235,223,106, 64,112,159,126,197,175,124,111,215,174, 93, 17, 19, 19, + 3,189, 94, 15,169, 84, 10,134, 97, 96, 50,153,160,211,233, 32, 18,137,184,137,153,247, 61,127,189,121, 19,158, 91,185, 3,155, + 62,120, 5,109, 90,197, 33, 36, 52, 26,151, 29,197,248,124,197, 75, 8,171,159, 52, 68, 60,229,121, 35,127,142,248,107, 74,206, +161,123,124, 43,212, 26,205,144,133,200, 0,135,195,103, 62,128,175,246,123,105,237, 86, 28,255,229, 71,244,234,114, 31,106, 28, +190,149, 70,142,252,127,223,177, 19,127, 95,245, 31,215,241,237,117,117,216, 94, 87,135, 34,245, 63,177,227,196, 81,244, 28,216, + 5,168,244,189, 53,115,214,153,101,202,249,207,140,214,196,134,246,128,137,214, 2,150, 50, 72, 45, 85,176, 56,106, 97,102, 77, + 96,165, 97,104, 55, 60, 9, 57,191, 46,245, 53,209,145, 13, 27, 54,192,108, 54, 67,173, 86,135,168,213,106,192, 25, 2,128, 90, +173, 70,253,231,122, 11,202,140, 13, 27, 54,248, 61,104, 79,157, 58,165, 92,184,112,161,230,253,247,223,167,132, 16, 13, 0,236, +219,183,143, 46, 93,186,148,190,242,202, 43, 1,109,205, 28, 46, 99,214,253,231,197, 39, 20,227,218, 89, 68, 7, 78, 93,195,214, + 11, 12, 94,220, 86,106,249,167,214, 80, 83,103,195,255, 5, 34, 83,167, 27,115, 35, 45,127, 68, 71,231, 99,230,204,153,126,239, + 70,233, 78,248,107,214,172, 33,220,118,210,124,113,224,192, 1,101,105, 41, 63,163,196,106,181,226,216,177, 99,187,155,234, 47, + 0,148,241,109, 91, 75,211,210,210, 0, 0,133,133,133,216,253,221, 55,242, 43, 37,215, 88,142,252, 1, 32, 45, 45,205, 53,222, +142, 29, 59,182,162, 57,227,237,237, 57, 19,241,219,185,203,104,221,165, 13, 80,103,228,125,239,101, 21,149,176,217,236,245,115, +181, 29, 54,155, 29,151, 47, 94,144, 55,231,153,122,122, 15, 4,111,194,237,133, 6,174, 40,139,197,130,126,221,187,107, 66, 20, + 18,176, 44,133,131, 5,126,216,183, 31,255,124,237,117,176, 20, 56,115,246, 44,142, 30,249, 21,189,122,245,133, 72, 68,112,111, +151,120, 20,253, 98,135,130,231,230,120, 82,113, 25, 18, 58,149, 0, 98,130,203, 87,109,128,152,160, 79,247,139, 40, 56, 86, 6, +138,118, 1,221,128,187,123,223,155,103,192, 84, 83,217, 96, 53,128, 47,184,187,247,189,105,218, 5,235,223,194,152, 5,171,188, +102,177,187,195,110,183, 35, 36, 36, 4, 12,195, 32, 42, 42, 10, 70,163, 17,117,117,206,109,128, 99, 99, 99, 81, 89, 89,233,215, + 6, 28,102, 29, 48, 80,161,192,243, 31,236,195,152,190,192,197,195,192,207,245,231,158,255, 96, 31,254,189, 64, 5, 7,235,240, +187,253,142, 31,250,193,245,126,244,128,238, 16,135, 51,216,174, 61,129,126,221,219, 35, 34, 76,134, 79,115,242,145,164,154,128, + 43, 94, 86, 1,248,106,191,220, 19, 20,184, 10,164,140, 38, 88,187,181, 8, 49, 81,157, 49,121, 40,225,213,126,156,187,127,123, +221, 31, 91, 39,211,127,172, 0,218,213,128,252,229, 85,208,127,190, 6, 48, 38,144,130,165, 88, 21, 23, 71,254,219, 68, 32,160, +235,148, 48, 77,199, 22, 3,160,119, 24, 96,209,157,197,231,151,178,176, 63, 69,135,251,254,172,194,216,167,195,160,136,186, 23, +114,113, 20,196, 41, 53,248,249,155,159,233,253, 73,247, 55, 54, 73,185,254, 7,195, 48,160,148, 90,235,149,104, 51,195, 48, 70, + 74,105, 52,156, 73, 92, 1, 47,175,237,222,189,187,118,236,216,177,170,202,202, 74,205,246,237,219,157,138,207,246,237,232,209, +163, 7,186,119,239, 30,208,246,204,181, 22,246,153,185,127,255,247,150,119, 38,180,102,168,185, 6,127, 89,127,218,102,183,217, + 86, 89, 28, 88, 74, 41,173, 10, 68,230,164, 73,214, 27, 78,254, 35, 70,140,208,250, 43,167,160,160,160, 65,200,132,243, 2,240, +221, 85,210,225,112,248,165, 48,156, 63,127, 30,131, 6, 13,106,172,191,200, 1,220, 7, 64, 60,106,194,228,234,162,162,162, 22, +133,102, 28,210,109, 0, 0, 32, 0, 73, 68, 65, 84,133,133,200,206,206,198,128,162, 34,166,176,176, 16, 0, 48, 96,192, 0, 60, + 56, 50, 9, 17, 97, 50,172,250,100, 83,217,140, 25, 51,150,172, 94,189,122,129,191,227,237,234,230,183, 16,222, 83,142,176,110, +207, 97,227, 91,127, 70,223, 94,173,113,239,196,215,145,145,145, 65,154,202, 18,175,209,215, 66, 46,151, 1, 0, 36, 18, 49,140, + 70,115, 80,159,173, 64,250,183, 6,126,111, 6,196,178, 44, 66,100, 82, 88,237, 20, 12, 1, 24, 2,188,250,175,215,225, 96,129, +186, 58, 3,174, 93,187,138,184,184,214,160,148,133,221, 14,200, 37, 98,136, 36,252, 92,176,118,187, 93,121, 95,215, 43,154,150, + 81,122,128, 16,167,110, 76, 0, 66, 40,250,247, 60,163,249,233,104,156,202,223, 21, 1,156,117,223, 88, 72,128,143,245,239,169, + 69, 55, 70,252,254, 88,255,128, 51, 97,168, 85,171, 86,144,201,100, 46,151, 33,151,248, 23, 25, 25, 9,137, 68,130,203,151, 47, + 67,194, 83,222, 39,249,123,240,231,137, 35,193,153, 55,167,237, 78,247, 63, 0, 40, 19,128,136,215, 53, 88,240,183, 33,136,242, +227,126,175,148, 56,147, 21, 59,180,138,134,206, 98,129, 56, 66, 4,115,185, 17, 96, 24,180,233, 24,143, 29,187,127, 14,168,253, +254,111,209, 27, 56,255,195, 46,136,175, 1,213,113, 64, 8,195, 96,112,167,206, 24, 53, 50,142,151, 28,207, 88,255, 23,143,253, + 25, 95, 91,126, 7,238, 49, 3, 63,137,129, 48, 49,240,240, 0,196, 63,204,207,120,237,218, 46, 26, 86,107, 21, 36,118, 27, 62, +191,148,133, 31,231, 68, 98,196,163,143,160,123,171, 30,170,223,118,104, 53,253,210,234, 32,177,214,193,222,157, 69,121, 41,191, +164,209,122,229,205, 60,103,206,156, 48, 0, 58, 74,169, 4, 0,230,204,153,211,236,218, 26,147, 39, 79,214,238,223,191, 95,117, +242,228, 73, 77, 72, 72, 8, 66, 66, 66, 48,115,230,204,128, 38, 81, 66, 72,235,137, 19, 39,174,253,219,223,254,198, 60,191,224, + 25,182, 23,123,150,177, 88,109,117, 86, 7,253,155, 63,114,210,211,211,169, 78, 55, 6,147, 38, 89, 49,115,230, 76, 18,232,239, +185,145,228,239,205,221,191,102,205, 26,162, 86,171,233,220,185,115,121,253, 94,131,193,208,192,237,239,142,133, 11, 23, 98,225, + 66,231,166, 69, 73, 73, 73,238,215,203, 26, 17,215, 22, 64,167,122,165, 48,228,193, 41,179,204, 93,186,116,145,103,103,103,131, + 35,255,180,180, 52,196,181,105,227, 62,222,182,194, 45, 68,192,103,188,165, 63, 60, 2, 7, 75,202, 16,222, 55, 28,197,219,207, + 1,114, 25,166, 60, 61, 27,209,241, 19,121,206,205, 14, 20, 95, 45,181, 75, 36, 98, 49,231, 1, 0,128,203, 23, 47, 52,235,185, + 54, 22, 58, 16, 20,130, 91,167, 16,120, 42, 1,140, 55, 19,135, 82, 10,150, 2, 14,214,169, 4, 16, 2,124,243,117, 14, 30,157, +156,138,150,177,173, 92, 19, 32,245, 99,175,108, 17, 83,134,158,247, 92,118,125,238,211, 43,196,229, 36,235,127, 95, 17, 68, 76, +153,223, 55,228,233,238,247,118,222, 31,235,223,211,221,239,237,188,251, 90,246,166,160,215,235, 81, 91, 91, 11,139,197, 2,150, +101, 81, 94, 94,238,114,255, 27,141, 70, 24, 12, 6,191, 66, 0,155, 62,120, 5,218,223,128,154, 11,128,205, 4,252,123,177,202, +229,254,255,229, 48,240,235,213, 31, 32,242,179,253,106, 74,206, 33, 58, 50, 20, 49,209,161,184, 55,161, 7,138,206,151,227,116, +113, 37, 58,196, 68,194, 82, 90,134,179,103,206, 54,168, 5,192,167,253,134, 40, 31,193, 48,213,116,108,218,178, 17,154,189, 27, +145,181,124, 17,166, 44, 90,138,163, 54,160,188,178,140, 87,251,185,199,250,159, 24, 50, 8, 51,239,235,136,141,155,118,227,232, +209, 11, 88,126,172, 16, 27,198,204, 6, 62, 58,128,226,226,242, 6,181, 0, 26, 67,188, 89, 6,135,181, 2, 86,107, 13, 0, 32, +174, 93,123,116,239,209, 67,165, 87, 56,115, 49, 76,172, 17,140,165, 14,138, 58, 17, 74,175, 94,243, 69,168, 78,143,140,217, 12, +179,217, 44, 7, 96, 5, 16,110, 54,155, 35, 60,151, 4, 6, 10,163,209,168,220,187,119,175,166, 71,143, 30,152, 53,107,150,170, +162,162, 2,219,183,111,231, 61,216, 8, 33,195,100, 50,153, 33, 60, 60,220, 62,102,204,152,171,139, 23, 47,110,187,100,201,146, +162,159, 15, 31, 29,191,225,184,229,148,141,133,223,251,177,222, 8,151,127, 48,201,223,211,250,231,114, 20,220,189, 0,124,100, + 72, 36,127,168,228,203,151, 47,119,189,188,125, 6, 92, 43,124, 26,123, 54,210,250, 23, 3, 64, 92, 83,114,206,171, 59,157, 27, +111,135,127, 57,124,126,198,140, 25,233,254,140,183,225,247,223,139,228,161, 9,120,227, 95,239,226,189,149,121,248,127, 95,236, +198,188, 81, 73,184,246,109, 30,106,116,122,159,100,155,145,145, 65,210, 82, 30,132,205,102, 63,108,179,217,237,238, 10, 0, 0, + 44,125,245,165,128, 9, 91, 32,250, 91, 11,111,177,127, 79,175, 64, 3, 5,128, 97, 24,212, 24,140, 16, 49, 4,118,187, 3, 44, +165,176,179,206, 36,210, 35,191, 30,198,168,209,227,156,110, 50, 74, 33, 98, 68,168, 53, 90, 97,183, 90,124,107,152, 14,135,178, +115,187,171,154,216,232, 26,151,150, 49,100, 96,152,115,216, 16, 2, 66, 40,250,245, 56,171,177, 59, 28, 74,190, 55,199, 89,247, + 77, 37, 3, 6,100,189, 54,145, 92,227, 15,162,162,162, 80, 94, 94, 14,153, 76,134,218,218, 90,196,198,198,186,146, 2,205,102, + 51,170,171,171,253, 82, 0,210,223,216,128,127, 47, 86, 33,178, 19,160,253, 13,120,102,153, 6, 97, 98, 17, 38, 63,251, 38,174, +176,215,176,126,249, 11, 16, 49,252,229,113,214,255,128, 1, 9,136,237,210, 9,173, 98, 91, 66,202, 16,216, 9, 69,121,157, 9, +186, 90,115, 64,237,247,222, 91,155, 49,169, 71,103, 68, 68,196, 32, 36,182, 45,108, 85, 58, 28,222,250, 37,170,171, 46, 5,212, +137, 63,126,235, 41, 96, 65, 50,196,118, 43, 58,213, 1,101, 34, 61,254,125,245,103, 64, 26,193, 91,198, 47, 91, 14,170, 42, 24, + 19, 46, 73,141, 72,186, 71,133,251,102,135,161, 40, 74,171,137,141, 61,172,105, 63,184, 8, 53, 76, 45, 44,212, 4,227, 23, 44, +228, 97,225,124, 44,127,247, 9,158, 91, 5, 32, 13,214,192,253,254,251,239, 1, 0, 51,103,206, 84,117,239,222, 93,251,232,163, +143,186, 44, 70, 62,228, 31, 27, 27,187,109,237,218,181,161, 25, 25, 25,162, 5, 11, 22,224,185,231,158,163, 7, 14, 28, 24, 76, + 41,221,110,180,209, 30,148,210,159,252,183,230,162, 26,117,251, 7,154, 16, 24, 76,242,247, 36,120,119,133,101,205,154, 53,164, +160,160,128,151,107,255,202,149, 43, 7,184,247, 89, 89, 89,174,151,231, 49, 14,209,209,209, 0,208,216, 36,120, 5, 64, 53, 0, +230, 74,201, 53,252,248,227,143,174,152,255,128, 1, 3, 0, 0,217,217,217,248, 42, 55, 15,186, 90,179, 17,192, 82, 56,151, 6, +242, 30,111,223,110,250, 7,198, 45,126, 26,227,199,143, 70, 75,153, 8,181,132, 98,251,233,203,248,241,183, 98,191,136,122,254, +156,233,247, 23,157, 61, 43,190,124,241, 2,184,215,210, 87, 95,106,210,146, 23,112,123, 19,191,231, 49,111,104, 16, 2,144,201, +100, 56,115,226,168,170, 83,219,104,141, 66, 34,134,195,193,130, 16, 2, 66,128,116,245,147,160,148,133,163,190, 30,128,209,108, +198,201,211, 69,144, 74,125, 59,177,237,182, 42,244,187,239,188,251, 44,138,191, 46, 56,143,175,191,232,230,210,157,147,122,157, +195,193, 35, 61, 32, 22,197,250,101,253,123, 35,126, 83, 77, 37, 0, 4,100,253,123, 27,104, 5,235,223, 2, 0,222,214, 63,224, + 92,231,223,186,117,107, 88, 44, 22,148,150,150,194,225,112,160,101,203,150,168,172,172, 68,203,150, 45,235,219,149, 63, 97,151, + 95, 59,139, 87, 94,215,160,230, 2,240,206,162,225, 48,216, 29, 88,184, 44, 27,239, 47, 78,195,162,229, 91, 33, 38, 4,126,240, + 63,106, 74,206,161, 77,203, 22,144, 64, 2, 7, 8,174,158, 63,142,139,101, 53,232, 26, 27,141,111,127, 57,128,147, 39,224,183, +245, 63,101,238, 66, 72,162, 1, 70, 4,172,203, 59,143,175, 63,124, 30,115,223,202,192,194,135,251,226,201,209, 29,253,106,191, +237,117,117,120, 47,101, 42, 80, 45, 7,136, 4,120,239, 93,164,254,188, 15, 59, 70,207, 7,121,243,105,144,131, 47,240,178,254, + 1,224,215,171, 49, 24,100,170,129, 65, 33,130, 81, 46, 71,215, 41, 18, 88,168, 9, 53,140, 4,118, 36,128, 58,140,176, 85, 92, +197, 15, 31,212, 96,230,140,174,183,100,208, 22, 22, 22,210,122, 98, 32,147, 39, 79,214, 58,125, 99, 78, 12, 31, 62,156, 12, 31, + 62,156, 15,249, 15,109,219,182,237,247,111,190,249,102,232,153, 51,103, 32,145, 72, 16, 17, 17,129,163, 71,143,218, 40,165,229, +205,249,125, 77,173,201, 15,196, 59, 16, 76,242,247,180,254,157,196,122,253,242, 65, 62,185, 0,105,105,105,103,190,250,234,171, + 33,118, 59,191, 21, 78,114,185,124,110, 19,167,107, 1,156, 7, 48,224,244,225, 3,112,143,249,255,117,238, 84,124,223,165, 11, +184,112,192,182, 46, 93, 66,102,204,152,241,137, 63,227,237,177,228, 65,136,100,163, 96,132, 4, 95,175,120, 26, 31,110,253, 21, +207, 63, 56, 12,115,150,103, 33,117,233,231,126, 89,224,238,197,132,188, 29, 19,214,239,223,157,104,224, 1, 16,137, 68,164,250, +234, 89,156,187, 92, 9,177, 68, 4,187,131,133,205,238,192, 47,191, 20,226,179,207, 62,129,213, 65, 97,115,176,144,138, 25,148, +233, 12, 40, 62,249,163, 74,161, 80,104,125, 16,161,178, 71,215,139,127, 88,255,206,169, 10, 95,127,145,224,156,227, 24, 10, 48, + 20, 12,195, 98,112,223,147, 26, 7, 15, 47,128, 55,235,223,125, 21, 64,104,116,107,191,200,223,155,245,239,158, 85, 59,102,193, + 42,191,200,203, 57, 41,234, 96, 48, 24, 32,145, 72, 92,214, 63,203,178,174,191,254, 42, 0,159,175,120, 9,191, 20,239, 65, 88, +107,103,210, 95,184, 88,132,242,107,103, 17, 33,147,160,186,234, 10, 68, 12,129,152,225, 23,126,230,172,255,246,209,225, 56, 81, +116, 30,118,171, 21, 50,177, 20, 6,131, 25,223,106, 14, 32, 73, 53,193, 47,242,231,218,239,145,167, 94,195,250,127,191, 15, 35, + 11,180,239, 26,143,223,142, 31,196,194,135,251, 6,212,126, 0,176,176,107, 18,182,156,217, 13,212,216, 1,121, 75,236, 44, 56, + 1,242,230,211, 88, 21, 23, 71,248,146, 63, 0,204,232,182, 88,251,195,206, 2,192, 90, 11, 3,169,133,142, 49,160, 70,108,131, +205,161,135,204,108,132,188,228, 60, 54, 44, 57,131, 78,137, 9,104, 34, 1,176, 1, 20,110,153,175,114,185, 28,114,185,220,235, + 57,190, 88,187,118, 45,214,174, 93,219,172,193, 28, 30, 30,254,204,217,179,103, 67, 35, 34, 34,160, 80, 40, 16, 29, 29,141,242, +242,114, 16, 66,140,193,156, 52, 56,139, 63, 63, 63,159, 2,206,132, 64,127,146, 2,131, 77,254, 31,127,252,177,146,250, 94,235, +206,107, 69, 64,104,104,104,186, 88, 44, 62,231,121,124,249,242,229, 13, 44,127, 0,232,216,177, 35,146,147,147,215,249,178,127, +174,148, 92,107,144,237,255,202,223, 23, 64, 38,150, 34, 46, 46, 14,220,234,128,250,243,161,254,140,183, 63, 43,251,224,185,119, +223, 71,109,105, 25, 98, 35, 90,225,248,137, 75,152,179, 60, 11, 25, 25, 25, 36, 16,178,230,190,231,254,125,119, 57,130, 39,224, +206,192,175,191,254,218,100, 49,160, 70, 61, 0,245,147,136,182, 80,187, 89, 69,105,138,166, 83,219, 24,132,135,200,112, 95,175, + 68,220,215,179, 47,196, 12, 96, 48, 57,112,233,106, 21, 10,180,223,169,194, 66, 67,124,254,131, 58,163, 17, 9, 29,175,194,108, +145,131,114, 70, 13, 5, 20,114, 51, 40, 5,170,170,101, 0, 1,194, 67,237,232,157,112, 1,251, 14,245, 67,120,120, 56,111,235, +223,221,226, 87, 68,198, 64, 66,109,128,253,143,249,206, 33,246,253, 27,221,173,127,119,139,159, 59,118,246,248, 97,215,181,124, +170,236,185, 43, 1, 0,208,186,181, 83, 25,169,170,170, 66, 68, 68,132,203,253,239,143, 2,192, 41, 1,192,155,152,159, 54, 18, +248,247, 62,124,248,242, 4,164, 46,122, 31, 89,111, 61, 9, 49, 33,144,202,248,173,216,225,172,255, 19,151,202,112, 79,251,150, +248,232,191, 27,208,169, 83, 39, 68,182,237,138,190,109,187,194,102,249,195,253, 47,225, 33,147,179,254, 95,159, 59, 26,207,188, +186, 14,237,187,144,102,181, 31,103,253,143,221,244, 49,118,204,156, 14, 18, 63, 24,128,179, 42, 32,224, 44, 17,204, 93,251, 76, + 92, 28, 47,226,232, 99,121,129,100,189,187, 76,217,117,114,173,166, 83,183, 94,208, 43,128,243,184,136,218, 11,229, 40, 95,234, +128, 65, 23,143, 5,179, 23,241,126, 32,171, 87,175, 38, 10,133,130,154, 76, 38,184, 89,158, 84,161, 80, 96,245,234,213,126,148, + 39, 10, 30,106,107,107,223,121,242,201, 39, 83,214,174, 93, 43,143,140,140,132, 70,163,193,202,149, 43,245, 86,171,245,193, 96, +254, 31,206,226,231,150,203,249,155, 16,152,156,156, 76,116,186, 49, 52, 24,228, 15, 0, 28,177,243, 33, 40, 30, 21, 6,173,179, +103,207, 30,188,113,227,198,163,117,117,117,109,108, 54,231, 50, 83, 79,242,191,239,190,251, 48,120,240,224,137, 60,158,179,184, +166,228, 28,222,248,199, 43,248,102,203, 54,140, 27,214, 31,187,242, 15, 58, 13,152,182, 93, 17,217,182, 43, 6, 20, 21,225,193, + 41,179, 42, 46, 85, 26,199,118,136, 9,201,225,107,253, 63,151,185, 5, 75,254, 52, 22,109, 91, 43, 93,202, 5,119,143,124, 60, + 55,129,120, 7, 4, 79,192,157,171, 20,240, 82, 0, 0, 32, 34, 60, 76,251,139,118,179,234,124,252,189,232,210,173,135, 38, 34, + 84, 1,150, 2, 38,139, 21, 69, 69, 69, 40, 47,250, 85, 21, 30, 22, 10,134, 97,124, 14, 92,133, 92,142,141,223,143, 84,113, 25, +240, 77,186, 35, 24, 6,161,161,252,173, 39,110, 9, 96,104,116,107,176, 14,155,147,252,235, 97, 35, 18,159, 37,118, 61,193, 45, +169, 25,179, 96, 85, 3,210, 10,132,252,221,149, 0,247,194, 63, 85, 85, 85,190, 31,128, 15, 37,224,115,183, 85,194,107,151,254, +245,143, 15, 54, 3,194,120,202,105, 31, 29,142,141,135,126,197,111,167,126, 71,146,106, 66, 3,210,247,135,252, 57, 60,242,212, +107,248,186,127, 40,158,122,180,123, 80,218,111, 97,215, 36, 44,202,221, 8,242,198,171,216, 22, 55, 8, 43, 13,191, 53, 56, 63, + 57,178, 5,226,229,254,237, 73, 49,163,219, 98,237,182,220, 28, 92,209,157, 67,121,229, 85,148,158, 14,131,200, 17,129,161,125, +134, 67, 53, 91,117, 75, 39,181, 96, 84,251,163,148, 30, 34,132,140, 33,132,236,124,255,253,247,229,147, 38, 77,210, 27,141,198, +177,129,196,252,155, 66, 48,150, 0,170,213, 81, 65, 33,127, 79, 43, 53, 72,168,152, 58,117,106,215,218,218,218, 55, 10, 11, 11, + 23, 20, 23, 23,163,174,174, 14, 82,169, 20,109,218,180, 65,108,108,236,164,254,253,251,127,203, 83,214, 73, 0, 3,218, 71,135, +227,129, 7, 30,192,175,103,138,209,178,115,207, 6,227,237,193, 41,179,140, 0, 62,224, 67,254, 28,254,172,236,131, 49,249, 63, + 97,230,171,159, 97,196,136, 17,136,139,139,243,170,104, 5,171, 65, 56, 37,192,159,182,110, 76, 33, 19,148,136, 91, 71,250,188, + 74, 1, 3, 64, 68, 68,132,214, 82,117, 89,249,139,246,180, 10,112,102,210, 82, 74, 33,147,201, 16, 25,193,187, 6, 54, 36, 18, +137, 54, 82, 34, 9,250,205,113,174,126,145,221, 8,216,141,174, 12,120,142,248,253, 93,139,197,185,250,207, 30, 63,140,179,199, + 15, 35, 54, 54, 22,229,229,229, 1, 17,127,100,108, 91, 88,121, 36, 71,242,197,204,215, 62,199,129,125,218,160,201,187,112,225, +130,107,183, 63,155,197,124, 29,249,251, 67,252, 28,102,247, 15, 13, 90,251, 1, 0, 89,241,130,139,248, 57,242, 63, 95, 87,167, +154, 28,217, 2, 15,243,180,250,189,225,161,206,169, 4,157,235, 63, 4,144,216,190,102,205, 26,194, 85,251, 91,189,122, 53,113, +175,252,183,110,221, 58,178,122,245,106,215,251, 53,107,214,220,244, 65, 79, 41,221, 79, 8, 25,145,147,147,179, 80,175,215,175, +160,148, 22, 4,251,127, 4, 99, 9, 96, 48,201,233, 6,193, 20, 30, 30,190, 80,169, 84, 46,108,166,156,253,199,142, 29, 27, 10, +160,115,203,206, 61,141, 54,139, 57,164,126,188,233, 1,212, 0, 56,217, 33, 38,228, 49, 56,147, 5,121, 99,204, 43,107,111, 10, +241, 55, 71,209, 18, 72,254,214, 32, 49, 49,145, 23,249,251, 52, 64,197, 98,177,214,151, 59,254,102,131,139,237,115,196,143,102, + 18, 63, 23,155,174, 41,187,130,154,178, 43,136,141,141,109,150,197, 15, 0,118, 7,235,183,247,161, 41,148, 85,213, 4,252, 91, + 60,193,197,246,131, 69,252,193,110, 63, 46,182,191,197, 96,160,238, 86,127, 63,177,164, 89,196,255,191, 4, 74,233,207, 0,166, + 11, 45,113,235, 49, 99,198,140, 12, 0,159, 93,170, 52, 26,109, 22,179,123, 60, 50,162, 67, 76, 72, 20,252,220,253,143, 35, 85, +119, 55,255, 29,164, 84, 9,184,137, 74, 0, 47, 67, 43, 49, 49, 81, 72,236, 16, 32, 64,128, 0, 1, 2,254,199,192, 8, 77, 32, + 64,128, 0, 1, 2, 4, 8, 10,128, 0, 1, 2, 4, 8, 16, 32, 64, 80, 0, 4, 8, 16, 32, 64,128, 0, 1,130, 2, 32, 64,128, + 0, 1, 2, 4, 8,184, 43,208, 96, 21,192,252,249,243, 3,206, 34,245,182,221,228,237, 46,239,240,225,195, 1,203,235,215,175, +223, 13,151, 23,236,251,109,217, 50, 49, 96,121, 21, 21,191,222,234,231, 75,234, 21, 86, 22, 94,138,175,220,137,253,239,102,201, +171, 47, 76,196,212,183, 33, 5, 64,231,207,159,207, 10,237, 39,200,187,147,228,101,102,102,138,211,211,211,237, 0,240,209, 71, + 31,209,110,221,186, 97,196,136, 17, 68,104, 63,239,242,252, 86, 0,238, 6, 52,183,200,196,212,169, 83,149, 0,220, 75,134,170, + 54,110,220,168, 21,116,197, 91,131,154,154,154,199,143, 29, 59,214, 87, 36, 18, 45,146,201,100, 48, 26,141, 47, 12, 27, 54,236, + 93, 4,161,210, 30,165,212,239,106,140,119, 34,230,207,159, 79,193,115,147, 25, 1,183, 14,185,185,185,202,148,148, 20,109,128, +223, 85,229,229,229,237, 14, 70, 65,169,122,121,143,229,229,229,109, 88,179,102, 77, 52,156,123, 26, 56,112, 11,170, 91,186,131, + 35,255,189,123,247,210,159,126,250, 9, 73, 73, 73, 24, 49, 98,132,208,113,130,229, 1,184,211,145,159,159,175,108,206,247,167, + 78,157,170,220,184,113,163,102,234,212,169,238,135, 53, 83,167, 78, 13, 88, 9,224, 20,138,236,236,108,174, 84,167, 95,178,210, +211,211,169,159,255,175,201,245,192, 59,119,126,226,175, 60,149, 78, 23,122, 43, 20, 32,242,219,111,191,189,163,215,235,255,212, +177, 99,199, 22, 21, 21, 21,168,223,110,247,237,175,191,254,250,237,208,208,208, 81, 15, 62,248,160,166, 89,255, 32, 0,242, 87, +171,231,251, 61, 9,102,100,172, 38, 55, 79, 94,211,229,112, 27,219,244,133,239,248,218,184,113,163, 6,175, 18,144,127,121, 87, +168,240, 42,193,212,147,105,126,183,235,184,113,227, 40, 0,108,223,190, 61, 40, 4,198,109, 5,172, 86, 71, 5,125,125,124,110, +110,174, 50, 47, 47, 79,227, 15,217,254,229, 47,233,148, 82,231,214,234,222,240,240,195, 19, 85,121,121,121,154,148,148, 20, 18, + 64, 63, 30,181,109,219,182, 93, 35, 71,142,196,188,121,243,104, 86, 86,214, 24,189, 94,159,239,207,111,243,162, 52, 98,218, 16, + 41,212,243,212, 85, 47,124,177,248,219,183,166,191,245, 8,119,110,237,218,204, 38,127,227,172, 89,179, 40, 0,132,134, 54,190, +181, 65, 93, 93, 29, 0, 96,206,156, 57, 1, 61,159, 83,135, 84,200,207, 60,130,228,244, 76,154,158,158, 46,212, 63,224, 1,174, + 56,144,123,141, 0,177,143, 1,239,181,110, 54,143,122,218,183, 10,205, 34, 4,119,242,223,184,113, 35,153, 58,117, 42,117,147, +235,247,253,114, 10, 5, 71, 52,245, 27,126,248,175, 80,100, 71,251,241, 95,147,125, 94, 81,247,240, 95,249,139,243,115, 95,155, +198, 8,200, 79,175, 12,169,169,169,249,170, 87,175, 94, 83, 0, 48,148, 82, 40, 20, 10,148,149,149,161,186,186, 26,145,145,145, + 40, 43, 43,219,253,253,247,223,171, 30,124,240, 65,191,148,147,252,252,124,202,109,204, 66, 8,193,148, 41, 83,144,156,156,172, + 34,132,240,150,147,155,187,217,245, 62, 37,101,146,207,207,190, 96, 58,240,212, 31,205, 61,100, 85,131,207,158,199, 20, 67,124, +111,170,196,109, 39,236,142,189,123,247, 98,233,210,165,215, 61,139, 47,190,248,130,242,108, 55,101,118,118,182, 6,175,146,122, +130, 77,187,126,226,126,149, 52,219, 66,188,141,231,150, 6,150,118, 70, 70,134,138, 82,138,245,235,215,211,253,251,247,163, 79, +159, 62, 62,191,123,160,145,154,140,155,178, 23, 33, 47, 47, 79,195,178, 44, 50, 51, 51,225,107, 91,101, 66,136,146, 82,234,234, +175,223,126,251,109, 8, 33, 4,211,167, 79, 47, 5, 16, 55, 99,198,140,157,107,214,172, 97,252,177,216,223,221,249,174,235,253, +181,237, 87, 65, 8, 65,214,179, 33, 0, 8,222,153,245,246, 35, 45, 91,182, 4, 0,124,249,105, 22,230,141,156,199, 75,230,128, + 1, 3,208,165, 75,151,160,180,123,102,102, 38,147,158,158,206,126,244,209, 71,244,167,159,126, 66,233,233, 78, 64, 69,148,192, +234,126,146,191, 39,152,166, 38,242,236,236,108,100,102,102, 82,111, 19,104, 32, 59, 67, 53,215, 66,247, 37,207,205,202, 14,216, + 40,220,184,113, 35,217,184,113, 35,225,148, 0, 0,170,230, 40, 20,132, 16,164,165,165,129, 82, 74,220,126,155,223,138, 10,153, +170,115,189,248, 28,247,133,176,173,171, 93, 47, 62,199,253, 33,127, 74, 41,184,221,217,124,237,210,230,173, 79,234,116,186,207, + 34, 35, 35,167, 0, 96,230,206,157,139,153, 51,103, 66, 42,149, 66,161, 80, 64, 46,151,131, 16, 2,145, 72,132,154,154, 26,222, +237,152,147,147,163, 84,171,213, 52, 39, 39, 7,110,207, 4, 95,127,253, 53,230,205,155,167,201,201,201, 81,222,142, 3,215,155, + 66,112, 43, 60,107,217,217,217,154,140,140, 12,242,216,169,169, 94, 45,124,181, 90, 77,167,158, 76, 83,121,243, 12,248,194,188, +121,243,232,243,207, 63,143,206,157, 59, 7,229,247,206,155, 55,143,170,213, 81,136,137,217, 21,212,118,216,188,121,243,232,252, +252,252,221,125,251,246, 37, 31,126,248,161,150, 35,255,230, 96, 83,246, 34,172, 88,177, 2, 44,203, 98,209,162, 69,224, 35,211, +157,252, 1, 96,219,182,109, 91,234, 93,225, 81,211,167, 79,183,143, 28, 57, 18,106,181,154,229,107,180,120,142,209,149, 43, 87, +226,177, 7,156,182, 97,214,179, 10, 76, 27, 34,197, 11,227,158,231,125, 79,161,161,161, 24, 49, 98, 4,210,211,211, 73,114,114, +178,215, 23,119, 13, 95,101, 47, 61, 61,157, 5,156,219,172, 3, 64, 68, 72,133,192,234,205, 36,255, 38, 21, 0,142,172, 10, 11, + 11, 93,101, 39,221,173, 39,127,137,214,101, 65, 4,121, 82,242,162, 12,168,130,217,120, 27, 55,110,212, 4, 65,134, 75,161, 72, + 75, 75, 83,113,109,120, 55,193,157,252, 1,160,184,184,216,117,238,202,149, 43,188, 21,198,154,154,154, 55,141, 70,227, 44,134, + 97,152, 25, 51,102,160,166,166, 6, 37, 37, 37,144, 72, 36, 16,139,197, 16,139,197,144, 72, 36, 80, 40, 20, 48,153, 76, 94, 75, +162,122,153,224,148, 59,119,238,212, 16, 66,144,154,154,138, 53,107,214,144,228,228,100,146,145,145, 65, 82, 83, 83,185,254,163, + 17,166,138,166,201,191,190, 45, 85,220, 36,238,254,236,211,210,210, 84,201,201,201, 90, 32,176,146,180,201,201,201,100,205,154, + 53, 36, 59, 59, 27,148,210,160, 40, 99, 47,189,244, 18,178,179,179,121,245, 17, 95,248,230,155,111,198, 28, 58,116, 40,191, 83, +167, 78, 48, 24, 12, 52, 52, 52,148,238,219,183, 15,128, 43,201, 50, 32,242, 95,190,124, 57, 8, 33, 96, 24, 6,135, 14, 29, 2, + 39,211, 15,143,196, 35,132, 16, 76,155, 54,205, 94,127,200, 58,125,250,116,189, 82,169,196,188,121,243,216,111,191,253,214,231, +189,187,135,194,174,109,191, 10, 16, 96,253, 51,127, 84, 45,206,122, 54, 4,211,135,202,176,248,193, 23,120,255, 46, 62,150, 63, +159,107,246,238,221, 75, 51, 51, 51, 93,175, 67,135, 14,193,112,105, 0, 96, 53,129,132,217,145,255,250, 73,184,159,231, 94,194, +200,109, 72,254,233,139,223,242,122, 94,220,212,128, 44, 42, 42,162,133,133,133,200,206,206, 6,247,158,115,237,248, 51,200,111, + 52,249,187, 91,213,220, 36,116,187,194, 61, 36,112,183,129, 82,138,226,226, 98, 92,187,118,205,117,204,243,179, 15,136,126,252, +241,199,241, 9, 9, 9, 16,137, 68, 56,123,246, 44, 40,165,248,253,247,223, 97,181, 90, 65, 8,129, 88, 44, 6, 33, 4, 14,135, + 3, 70,163, 17,155, 54,109, 66,114,114,211, 97,143, 93,187,118,105, 0, 32, 53, 53,245,186,126, 91,255,153,114, 68,193,167, 95, +123,186,245,125,125,230, 99,229,115,104, 44, 28,192,199,245,239,101,242,108,118,146,148, 43,230,239,166,192,113, 10, 44, 23,243, +207,119, 35,255, 64,172,117, 78, 9,227,200,104,215,174, 93,154, 64,195, 0,156,188,110,221,186, 93, 71,110,129, 96,245,234,213, + 56,121,242, 36,141,141,141, 69,187,118,237, 92,219, 62, 95,184,112, 1, 34,145, 8,255,249,207,127, 2,250, 7, 35,135, 58,183, + 47, 99, 89, 22,127,251,219,223,176,114,229, 74,236,219,183, 15,132, 16, 60,156,242, 23, 92,188,192,111, 3,199,109,219,182,109, +174,127,198,102, 56, 87,200,176, 0, 48,125,250,244,106, 0, 45,242,242,242, 64, 8,225,173, 80, 57,173,255,235,247, 49,113,134, + 3,128, 47,179, 14, 35,183, 38,247,166,121,203, 78,157, 58,133, 67,135, 14, 53, 56,230,168, 62, 15,187,141, 5, 72, 45, 90, 60, +104,195, 33,143,205,174,147,146,146, 4,230,231, 65,254, 77, 42, 0,245,110, 23,194, 89,253, 28,249,123,141,253,249, 65,214, 77, + 89,130,124,226,196,190,228,121,158,191, 85, 59, 82, 77,157, 58,213, 61,214, 76,189,157,231, 60, 3,205, 34,221,141,193,141,131, + 25, 38,206, 15,200,242,111,108,178,141,143,143,191,238,218, 38,158, 73,139,232,232,232, 94, 22,139, 5, 85, 85, 85, 56,112,224, + 0, 68, 34, 17,172, 86, 43, 76, 38, 19, 88,150,117,237, 74,105,179,217, 96,177, 88,120,133, 24,184,231,208, 88,191, 77, 78, 78, + 38, 57, 57, 57, 52, 59, 59,219,167, 50,225,180,186,110, 76, 14,128, 98,200,170,235,136,158,251, 28,136, 34, 48, 98,196,136,230, + 43, 1, 30, 49,255,252,252,124,165,139,236,255,136,249, 7,148, 35,227,161,132, 1,112,238,182,168, 86,171, 41,159,231,192,215, + 11, 80,159,251,224,119,110, 1,183,179, 99,187,118,237, 16, 17, 17, 65, 60,149,221, 94,189,122, 5,108,249, 83, 74, 97,183,219, + 93,199,134, 13, 27,134,125,251,246, 97,207, 15, 14,188,187,140, 95,140, 61, 55, 55,119, 92,125,236,255, 4,128,150, 0,220, 55, + 27, 42, 1,208, 2, 0,242,242,242, 52,125,251,246,245, 41,175, 97,236,223,139,167,160,254, 47, 95,121,193, 64,122,122, 58, 73, + 74, 74,162,154,207, 98, 97,175,254, 21,132,173, 6, 28,206,157, 86, 25,145, 29,250,125, 12, 36, 82, 49, 44,142, 22, 56,120,161, + 47, 94, 89,174,195,161, 67,135,136,183,101,213, 2,252, 84, 0, 60, 61, 1,254, 90,254, 69, 69, 69, 52,152,238,110, 95,242,234, +195, 18, 65,243, 52,100,102,102,146,244,244,244,128,190,235,249, 59, 51, 50, 50, 12,106,181, 58,172,177,243,129,194, 61,246, 31, + 12,101,192, 61,246,207, 87, 25,152, 57,115, 38, 66, 67, 67, 17, 22, 22,134,240,240,112, 68, 70, 70,178, 81, 81, 81, 76, 94, 94, + 30, 30,127,252,113,215,117,114,185, 28, 99,199,142,133, 90,173,166,141,236, 86, 21, 99,181, 90, 81, 85, 85, 5,179,217,140,200, +200, 72,200,100, 50,216,237,118, 80, 74,225,112, 56, 96,181, 90, 97,179,217,224,112, 56,252,202, 47,240, 21,178, 74, 77, 77,197, +237, 16,154,241,149, 16,232, 47, 56, 37, 32,224,254,245,175,198,219,110,234,201,180,250,188,155,192,100,123, 90,255,238,138,100, + 32,201,128,158,214,127, 83,138, 41, 95,242, 23,137, 68, 52, 34, 34, 2,112, 38,212, 17, 0,212,102,179,161,166,166, 6,173, 90, +181, 10,232,190, 57, 99, 74, 44, 22, 99,193,130, 5, 56,116,232, 16,254,136,251,243,239,211,223,127,255,253,247,195,135, 15, 7, +128,112, 56,195,185, 70, 0,216,176, 97, 67,171, 61,123,246, 68, 80, 74, 93,202, 54,159,117,226, 43,223, 95,137,105,131,175,183, +254,103,254,219,136, 13, 7,108,160,148,162,223,140,126,152, 55,114, 30, 9,116,221,121,160, 74,128,106,118, 38,253,126,101, 71, +136, 13,122,192,238,252,215, 44, 0,169, 24, 40,190,214, 2,187, 47, 13,112,100,126, 89, 46, 58,116,232, 16, 73, 74, 74,146,227, +127, 28,124,172,127,128, 71, 37,192,252,252,124,151,235,223, 61, 31,128, 15,186,116,233, 66,210,210,210,130, 22,147,231, 33, 47, +224,248,250,212,169, 83,169,231, 43, 63, 63,159,229, 86, 5,184,173, 8, 8,180, 19,135,221,205, 29, 46, 51, 51, 19,203,151, 47, +111,208,175, 56,242, 79, 73, 73, 65, 74, 74, 10, 0, 96,207,158, 61, 77,137,137, 46, 42, 42, 50, 59, 28, 14,232,116, 58, 84, 84, + 84, 64,167,211,193,104, 52,194,104, 52,194, 96, 48, 64,175,215,163,166,166, 6, 38,147, 9, 22,139,197,149, 20,212, 36,137, 17, +130,156,156, 28,191, 20,182, 59, 25,123,247,238,109,240,114,199,169, 83,167,148,238,159,249,196,156, 61, 99,254,158,150,123,115, +178,246,189,125,119,205,154, 53, 36, 39, 39, 39,168,185, 0, 57, 57, 57,188,231, 46,142,252, 25,134,161,245,253,203,229,250,103, + 89, 22,165,165,165,232,214,173, 27,153, 63,127,190,223,191,229,229,197, 35,177,103,207, 30,176, 95,181, 0,165, 20, 43, 86,172, +112, 61,163,189, 7,120,231,237, 33, 55, 55,119, 18, 0, 76,159, 62,189,184, 94, 1,176,124,249,229,250, 86,243,231,207,111,181, +103,207, 30, 60,244,208, 67, 99,252, 89,166,120,109,251, 85, 16, 16,172,119,179,254,103,188,111,132,104, 90, 13,190, 60, 96,197, +115,207, 61,135,101,223,191,125, 43,230, 21, 17,167, 4, 60,248,156, 29,212, 20, 9,232, 1,232, 1, 81, 45,160, 47, 5,182, 29, +110,131,204, 47,203, 69,245,222, 2,113,122,122,186, 89, 32,127,223,228,239,211, 3,144,153,153,217, 32,238,239,158, 15,192,119, +237,101,189,187, 80,197,185,229,155,235,146,247, 38,143,115,251, 39, 39, 39,107,131,181,132, 40, 57, 57,249,183,252,252,252, 94, +183,227, 3,230,172,254, 96,185,255, 57,171,223, 95,247, 63,135,245,235,215,187,222,255,243,159,255,196, 39,159,124, 2, 0, 86, + 0, 82,142,248, 1, 96,236,216,177,190, 20, 0, 83, 66, 66, 2,140, 70, 35,172, 86, 43,202,203,203, 33,147,201, 32, 22,139, 93, + 30,128,186,186, 58, 24,141, 70, 88, 44, 22,212,212,212, 96,202,148, 41, 62, 21, 76,206,186,111,106, 89, 43,119, 29, 31,220,200, + 28,128, 64,206,123,130, 91,238,231, 13, 43, 86,172,208, 44, 88,176, 64,213,189,123,119,237,173,236,195,141, 89,255,238,240, 39, + 23,160, 49,235, 63, 80,203,159, 97, 24,202,178, 44, 1,240, 15,174,107, 59, 28,142, 87, 67, 67, 67, 17, 31, 31, 31,208, 28,243, +202,139, 35,161,213,106, 65,114, 98, 0, 0, 59, 94, 9,199,216,215,107, 49, 98,196, 8,188,177,108,143, 95,133,169,182,109,219, +182,105,228,200,145, 0, 80,190, 97, 67, 86,187, 61,123,246,181,160,132, 98,252, 67,227, 83, 82, 82, 82,182,248, 51,157, 0,206, +216,255,180, 33,146,134, 22, 63, 40, 22, 60,183, 0,113, 99, 91,223,178,130, 89,233,233,233, 13, 52,124, 90, 11,200,172, 0, 75, + 9,236, 14, 10, 25, 5,226, 20,140,251,245,118, 8,112,242,247,178, 23, 27, 85, 16, 56, 15,172,152,143,229, 63, 96,192,128,235, +242, 1,252,113,209,121,146,118, 16,200,217, 83,158,230, 6,116,188, 94,249,249,249, 65,147,119,183, 38,254,113,133,101, 56, 55, +113,118,118, 54,158,120,226, 9, 0,144,114,215,184,159,171,159,180, 26,195,241,193,131, 7, 63,174,213,106,179, 29, 14, 7,244, +122, 61,108, 54,155, 43,238,111, 54,155, 93, 75, 12,185,196,192,177, 99,199,106,121,244, 23,146,157,157, 77,235,189, 0, 13,250, +109,126,126, 62,119, 28,201,201,201,188,188, 85, 55, 59, 7,192, 51, 44,224,235,121, 52,117, 94,173, 86,211, 21, 43, 86,104, 30, +123,236, 49,124,245,213, 87, 1, 61,115,207,229,183,220,231,141, 27, 55,106,210,139,213,152,234,195,210, 30, 55,110, 28, 61,127, +254, 60,190,255,254,251, 70,219,251,252,249,243, 0,128,237,219,183,251,252, 61,105,105,217, 52, 45,109, 52,198,140, 41, 66, 81, + 81,145,215,236,242,202,202,209, 0,116, 80,171, 27,159,183, 56,242,183, 90,173, 84, 42,149,114,215,252,163, 94, 33,120,245,226, +197,139,232,216,177, 99, 64,150, 63,195, 16,167,194,206,145,255, 81, 59, 62,209, 88, 1, 0,111, 44,219,227,247, 28,193,141,137, +249,243,231, 39, 82, 74, 49, 97,226,132, 41, 15, 79,124,248,155, 64,166,166, 73,143, 62,114,130, 16,114, 31,165,128,104, 90, 13, + 40,165, 88,176,112, 1, 90,143,109,243, 71,224, 35,112,112,236, 76,209,140, 74,130,153,153,153,116,227,139,109, 17, 86,121, 30, +231,244,241,232, 44, 43, 7, 66,227, 32,174, 43, 69, 68, 93, 37,128, 86, 46,143,129,167,210, 32, 32, 0, 15,128,251,114, 63, 15, + 87, 31,205,206,206, 6,223,132, 41, 79,210, 14,214, 15,119,151, 23,132,245,255, 2,154, 9,119, 23,186, 59, 9,113,245, 36, 60, +207, 53, 18, 67,180, 3,248,122,228,200,145, 79,231,229,229,125, 96,183,219, 81, 93, 93,237,202, 1, 0,128,242,242,114, 84, 87, + 87,131, 82, 10,127,194, 75, 99,198,140, 81,237,220,185, 83,147,157,157,141,156,156, 28,234, 25,243, 31, 51,102,140, 95,197,128, +110, 4, 76, 7,158,242,155,240,189, 17,124, 83, 74, 64, 70, 70, 6,153, 55,111, 30, 13,132,252, 27, 36, 0,186, 61,119,183,164, + 64,127,189, 0,141, 42,238, 23, 46, 92,112, 41,104,124, 13, 13,247, 80,229,245,247,205,111,174,170,169,169,161,145,145,145,238, +228,255,170,197, 98, 65, 73, 73, 9, 58,119,238, 28, 16,249,171,213,106,202,126, 21,133, 29, 71,157,198,233, 58,141, 21, 27, 14, + 88, 65, 41,197,190, 31, 3,143, 44,238,221,187, 23, 15, 61,244,144, 42,208,242,193, 28, 65,179, 44, 43, 1,128,175,126,180,225, +185,231,158, 67,235,113,109, 60,252, 3,254,129,171,242, 55, 98,196, 8, 10,120, 95,238,231, 86, 9,144,247,243,237,200,212, 1, +177,137,120,124,109, 13,128, 56,103, 27, 60,217, 18, 29,196,151,241,122,114, 25, 62,213,104,132,170,128,104, 88,233,207,211,242, +247, 60, 47,110,106,162,200,204,204,164,222,150, 77,249, 19, 2,240, 66,218, 65,131,135,188,160,174,255,247, 40, 7,236, 55,210, +210,210,192, 35, 97,145, 55, 26,115,247, 7, 26, 6,104,204,221, 31, 72, 24,192,189,188,172, 39,249, 52,117,174,177, 91, 37,132, +172,154, 48, 97,194,154,245,235,215,219,164, 82, 41, 44, 22, 11,236,118, 59, 88,150, 69,139, 22, 45,160,211,233,144,230,231,210, +179,212,212, 84,109,106,106, 42,217,185,115, 39,205,201,201, 65,118,118, 54,184,186, 0,183,115,229,185, 96, 99,247,238,221,116, +194,132, 9,216,186,117,107,179,201,223,147,228,242,157, 10,153, 79,111,220,243,207, 63,127,157,113,225,137, 23, 94,120,129,242, + 77,242, 84,171,163,124,202, 83,171,249,197,255, 21, 10, 87,233, 75, 74, 41,133,209,104, 68, 73, 73, 73,192, 49,255, 6,158,143, +215,107, 27,124,110, 14,249,127,248,225,135,193,234,179,108,238,183, 91,186,185, 87, 2, 12, 22,154, 82,200,214,173, 91,231,151, +245,175, 78,237, 90,242,241,105,180,205,200, 57, 7,119,238, 25,241,159, 76,186,123,222,189, 56, 83,170,192,153, 51,103,160, 82, +169, 32, 32, 8, 30, 0, 0,104,140,228,111, 71, 45,235,118, 91,255, 31,140, 37,126,127, 40, 34,201, 65,251, 93, 83,167, 78, 85, +249, 91,222,215, 7, 49, 80,119,133,198, 91,162,149,231, 57,158,132,107,159, 57,115, 38,217,177, 99,135,242,210,165, 75, 26,147, +201, 4,135,195,129,251,238,187, 79,149,148,148, 20,240,243, 30, 51,102, 12, 25, 51,102, 12, 55,195, 7, 20,154,185,209, 57, 0, +190, 62,243,177, 56,235,179,195, 27, 18,142,159, 69,102,184, 54,194,171,132,230, 35,237, 58,123, 48, 61, 61,157,166, 23,171, 65, + 26, 22, 2, 34, 0,112,230,204, 25,218,196, 88,245,217,232,163, 71,143, 38,126,140,125, 18,140,107, 0,160,170,170, 10, 10,133, +130, 18, 66,208,177, 99, 71, 16, 66, 72,183,110,221,208, 92,242,103, 30,211,129, 16,130,148, 71,156,171,138, 8, 33,174,229,126, +156, 59,255, 22,129, 29, 48,171,127, 80, 5,206,153, 51,135, 83,254,195,234,189,122,118, 56,221,255,172,219, 53,126,221,112, 70, +206,185,182,238,220,195,185,250,211,211,211,137,122,195, 61,135,103, 0, 0, 32, 0, 73, 68, 65, 84,151,134,158, 57,115, 70, 96, +243, 96, 43, 0,119, 10,130,177,214, 63, 88,132,125, 3, 20,155,160,254,174, 96,111,236,115,163,173,231,250, 24,191,215,255, 97, +181, 90, 33, 18,137, 32, 18,137,110, 98, 95, 91, 77,110,111,121,141,143,133, 89,179,102,249, 47,240,213, 63,246,177,200,206,206, +110, 48,105,167, 23,171,221, 45,111,237,221, 48,151,180,110,221,154,252, 49, 86,156,201,182,205, 37,127,231, 51,105,106, 43,160, +235,177,122,245, 79, 55, 77, 35,152, 55,114, 30,185,217,115,130,159,243, 70, 40,156, 57, 69, 54, 55,229,211, 21,231, 87,169, 84, + 68,176,252,125,195, 91,104,128, 36, 38, 38, 10, 5, 19, 4, 8, 16, 32, 64,128,128,255, 49, 48, 66, 19, 8, 16, 32, 64,128, 0, + 1,130, 2, 32, 64,128, 0, 1, 2, 4, 8, 16, 20, 0, 1, 2, 4, 8, 16, 32, 64,128,160, 0, 8, 16, 32, 64,128, 0, 1, 2, +238, 10, 52, 88, 5, 48,127,254,252,128,179, 65,189, 21,118, 17,228, 9,242, 4,121, 55, 79,222,146, 37, 75, 26,106,247, 12,227, + 90,230,232,190,212,140,171,166,232,190,244,204, 91,249,224,176,176, 48,200,229,114,215,247, 25,134,113,173,184,112,151,199,109, +204,196,178,206, 85, 94,220,102, 57,194,243,245, 71, 30, 81,138,196, 50, 80,214, 14,150,181,107, 3,145, 71, 41, 85, 29, 57,114, + 68,156,152,152,152, 15,143,170,123, 1,202, 83, 30, 57,114, 4,137,137,137, 90, 97,188,221,121,242,252, 86, 0,254, 23,241,242, +203, 5, 13, 26,238,141, 55, 6,146,219, 74, 94,193,203, 20, 0,222, 24,248, 6,113,127, 31,168, 60,174, 82,156, 90,173, 70, 70, + 70, 70, 83,215, 53,121,222, 93, 30,220,150,233,113,223,113,255,190, 90,173,118,157,227, 43,247,127, 17,140,181, 78, 89,254,219, + 1,140,136, 42,215,180,179, 95,198,105,218, 25,135,234,162, 85, 17, 9,131, 32, 13, 13,215,250,250,254,254,253,251, 49,108,216, + 48, 23,241,115,132, 77, 8,185,142,176, 89,150,117,189, 46, 94,188,232, 85,222, 47,191,252,130, 1, 3, 6, 64,161, 80, 64, 44, + 22, 67, 36, 18, 53,144,201,145,190,195,225,112,189, 44, 22, 11, 10, 11, 11,113,207, 61,247,220,141,143,136, 56,121,145, 42,127, +255,253,119,156, 57,115, 70,211,162, 69, 11, 12, 31, 62,188, 89, 99,156, 16, 70, 41,147, 71,163, 69,212,189,154, 58, 67,177,202, + 80,123, 89,233,175, 12,150,101,149, 57, 57, 57,187, 79,159, 62,141,173, 91,183, 66,161, 80, 96,209,162, 69, 34,184,173,189, 15, + 64,158,166,232,220, 89,236,220,177, 29, 82,153, 12,207, 61,183, 96, 20,165, 84, 35,140,212,187,212, 3,112, 39, 33, 39, 39,199, +167,198,147,154,154,234,115, 96,114, 4,237, 73,220,129, 34,216,242,130, 13,183,202,124,188, 38, 45, 62,165,101,249,202,171, 87, + 4,154, 85, 93,156,171, 42,232,254,255,239,248, 81, 72,169,242,196,254, 29,136, 56,255,163,198,104,180,192, 54,136,129, 34,158, +160,219,165,163,184, 63,156,106,116,229, 63,227,215,144,217,170, 10,210,174, 73, 37,224,196,137, 19, 16,137, 68, 24, 62,124, 56, +196, 98,177,235,197, 41, 4,156,213,111,183,219,225,112, 56, 96,179,217,112,241,226, 69,236,222,189,219,171, 60,163,209,136,195, +135, 15, 99,240,224,193,144, 74,165,144, 72, 36, 13,100,178, 44, 11,187,221, 14,187,221, 14,155,205, 6,147,201,132,195,135, 15, +195, 96, 48,220, 22,250, 84,125, 63, 99,240, 71, 33,154,128, 57,122,201,146, 37,172,199,220,130,218,218, 90,196,196,196, 4,180, + 0,125,201,146, 37, 13,126,207,231, 89,133, 80, 40, 90, 65, 36,146,106, 12,181,151,253,150, 89, 80, 80, 0,131,193,128,193,131, + 7, 95, 76, 78, 78,110, 83, 89, 89,137, 29, 59,118, 56,162,163,163,145,148,148,212,228, 24,153, 51,110,244,117,109,115,236,212, + 41,104,195, 67,176,112,197,191, 46,247,235,223,171,253,213, 43,101,216,145,167,221,221,169, 87,191,100,189,190,102,151, 64,157, +183, 63,184,210,191,238,240,172, 5, 32,110,106,146,229, 38, 87, 95,159,111, 5,249,255,245,175,127,109,242, 26,157, 78,135, 47, +191,252,146,242, 81, 2, 56,178,110,174,181,126, 35,228,185, 91,254,205,181,254,221, 72,152, 0,160,106,181,218,231,198, 49, 60, +201,154,112,196,206, 89,251,238,150,191, 59,213,241,237, 51,110,158, 10,234, 94, 78, 24, 0,170,170,156,149, 17,163,163,243,239, +138,129,122,225,167,124,220,115, 89,163,185,108,100, 49,249, 30, 17,238,141,181,131,141,166,144, 68,139, 80, 91, 41,133,162,214, +132, 30, 71, 86,105, 10, 19,230,169,140, 33, 29,181,141, 91,146, 4, 39, 79,158,132, 84, 42,197,168, 81,163, 92,164, 45,145, 72, +192, 48, 12, 40,165,176,217,108,176,219,237,176, 88, 44,184,124,249, 50, 52, 26, 77,163, 91, 42, 51, 12, 3,155,205,134, 35, 71, +142, 96,248,240,225, 80, 40, 20,144,201,100, 46,121,156, 2, 96,177, 88, 96, 48, 24,112,236,216, 49,152,205,102,191, 10, 51,105, +181, 90,165, 72, 36,210,212,214,214, 66, 42,149,162,172,172,236,169,201,147, 39,215,202,229,242,207, 3, 33,109,173, 86, 59, 85, + 36, 18,125,229, 38,239,244,228,201,147,127,151,203,229,169,112,238, 80,233,183, 37,252,202, 43,175,104,150, 46, 93, 90,134,250, + 29,103,150, 44, 89,130, 19, 39, 78,160, 85,171, 86,141,214, 93,247, 69,254, 31,207,157,139,241,253,250, 1, 0, 90, 63,253, 52, + 20, 33,113, 48,232, 47, 65, 95,115, 78, 69,169, 67,235,175,204, 62,125,250,160,172,172, 12,251,247,239,239,200, 48, 12,142, 29, + 59,134,232,232,104,236,221,187, 23, 86,171,213,103, 59, 86,190,185,176,193,231, 48,171, 13,109,237,102, 60,247,252,171,237, 87, +188,251, 79,188,243,238,135,104,199, 56,240,225,187,203,243, 71, 77,155, 33,176,235, 29, 72,254,220,113, 94,123, 1, 0,215,215, +255,246,245,249,102, 34,152, 59,245,221, 9,112, 87, 2,154,233, 1,224, 8,150, 0,160,159, 60,250,153, 87, 66,126, 98,211,108, +222,100, 93,239,218, 39, 94, 38,108,247,239,187, 20, 4, 62, 33, 0,238,127,123,254,245,244, 0,220,233, 48, 87, 87, 40, 71, 88, + 14,107,202, 68, 14,220, 19, 9,116,236, 64, 33,234, 35,133,184, 75, 23, 72, 45,102, 88,126,184, 12, 75,141, 24, 34, 86, 2,115, +254,231, 26,102,252,179, 42, 86,236, 61, 28,192,185,231,207,158, 61,139,168,168, 40,168, 84, 42,200,229,114, 72,165, 82,136,197, + 98,151,213,111, 54,155, 81, 82, 82,130, 61,123,246,128, 97, 24, 48, 12,131,166,228, 57, 28, 14, 28, 63,126, 28,195,134, 13, 67, + 68, 68, 4,228,114, 57, 68, 34, 17,236,118, 59,172, 86, 43,244,122, 61,126,254,249,103, 88, 44, 22,136,197, 98, 87, 46,128, 47, +124,241,197, 23, 74,131,193,160, 57,127,254, 60,244,122, 61,164, 82, 41, 90,183,110,189,106,223,190,125, 24, 50,100,136, 56, 52, + 52,244, 19,127,148,128, 47,190,248,226, 81,131,193,240,149,135,188,132,125,251,246, 37, 12, 25, 50,228,203,208,208,208, 84,190, +242, 88,150, 85, 90,173, 86, 84, 85, 85,105,220, 60, 10, 0,128,165, 75,151, 22, 47, 89,178,164, 93,106,106,234, 40,185, 92,238, +215,252,199,136,164, 74,207, 99,215, 62,248, 0,173, 39,197,227,157,119,222, 87,217,108,117, 1,205,167,251,247,239,215,252,244, +211, 79,120,241,197, 23,245, 34,145, 40, 66, 46,151, 99,200,144, 33,208,104, 52,200,203,203, 67,187,118,237,252,240,119, 16,124, +113,246, 42,190, 62, 83,140,220,111, 63,133, 72, 68,176,240,233,199,217,190,173, 91, 50,153,207,189,138,181,254,202, 19,112, 75, +200,223, 83, 57,245,166, 20, 4,188, 10,224, 86,111,111,219,165, 75, 23,149,175,215,205,182,214,111,132,188, 96, 88,253,141,225, +147, 71, 63, 35, 79,108,154, 77,189,145, 63,248,135, 8, 26, 88,250, 85, 85,201, 46, 11, 29,127,108, 1,234,183,219,191, 41,162, +143,142,206, 15,200,250,183,219,237,202,159,127,254,153, 54,118,204,243, 92, 99,112,191,222,110,183, 43, 61,207,121, 30,107, 10, + 85,199,127,209,148, 20,235,209, 42, 92,140, 46,225, 20,226,150, 44,196, 15, 60,136,208,190,159, 67,209,255, 61,200, 34, 21,144, + 26, 76, 48, 26, 29,232, 32, 50, 98,239,250,198,149, 39,134, 97, 32, 22,139, 33,145, 72,112,230,204, 25, 28, 59,118, 12, 17, 17, + 17,136,137,137, 65, 76, 76, 12, 90,182,108,137, 22, 45, 90,160,166,166, 6,123,247,238,133, 72, 36,114,197,246,189,129, 59, 47, +149, 74,225,112, 56,112,250,244,105,132,132,132,160,101,203,150,104,213,170, 21, 98, 99, 99, 17, 22, 22,134,211,167, 79,195,102, +179,185, 66, 4,141, 41, 20,158,150,127,105,105,169,230,220,185,115,232,220,185, 51,198,141, 27,135,129, 3, 7,194,104, 52, 98, +247,238,221, 56,114,228,200, 71,102,179,153,119,237, 98,173, 86,171, 42, 45, 43,255,166,232,106, 13,194,239, 25,140,132,113,127, + 66,187,129, 41,208, 89, 24,236,204,223,133, 35, 71,142, 76, 54,155,205,127,225, 75,254,122,189, 30, 71,143, 30,213,236,223,191, + 31,125,250,244,193,146, 37, 75, 90,162, 62,158,190,100,201,146,118, 0,224, 15,249, 51, 34,169, 50, 52,172,173, 50, 58,166,151, +102,253,134,163,152,251,241,199,200, 59,124, 24,121,135, 15,163,245,211, 79, 3, 0,108,182,186, 61,129,140,227,188,188, 60,154, +155,155,139, 41, 83,166, 92, 12, 15, 15,103, 66, 66, 66, 10, 11, 10, 10,176,127,255,126, 84, 84, 84, 32, 33, 33,193, 47,121,239, + 31, 62,131,119, 15,254,134,181,239,190,116, 84, 44, 50,129,113,212,226,237,149, 31, 51, 95,237, 45, 68, 9, 35,198,189,247,222, + 43,176,236, 93, 2, 38, 80,130,191,133,155, 87,220, 24, 11,251,229, 2, 26,204,184,125,176,229,221, 72, 69,224,137, 77,179,169, +251,171, 49,175,128, 47,175,194,117,228,214, 80, 25,240,215, 83, 65, 26, 59,238,233, 21,224,131,218,218, 90,229,174, 93,187, 52, + 5, 5, 5,141, 30,115, 63,215, 20,220,175,223,181,107,151,166,182,182, 86,233,126,206,243, 88, 83,136, 48, 87, 34,239,146, 25, +219,206,179,184,172, 35, 40, 45, 7, 24,113, 36, 24, 18, 3, 98,150,161,174,148,224,232, 37, 22,199, 46,153, 81, 89,107, 67,239, +104,153,134,143, 2, 32,147,201,112,238,220, 57,156, 58,117, 10,209,209,209,136,138,138, 66, 84, 84, 20,140, 70, 35,246,239,223, + 15,137, 68, 2,169, 84,218,228, 94, 10,156,119,128, 83, 2, 40,165, 40, 42, 42, 66,116,116, 52,226,227,227, 17, 27, 27,139,162, +162, 34, 56, 28, 14,200,100, 50, 72,165,210, 6, 43, 15,188, 77, 43,220,155,242,242,114,205,149, 43, 87,208,179,103, 79, 60,248, +224,131,152, 56,113,162,106,226,196,137,170,225,195,135,195,225,112,224,199, 31,127, 68, 81, 81,209, 96, 0,188,226, 9,229,229, +229,187, 75,171,106, 16,221,181, 47, 18,146,231,160,231,132,249,232, 49, 97, 30, 58, 62,240, 40,172, 84,196,201,227,245,124,235, +115, 31, 52,103,206,156,225,238, 85, 85, 79,252,204,146, 37, 75,176,116,233, 82, 44, 93,186,244,148,103, 94, 64, 99, 16,137,229, +202,168,232, 30,154,214,237,134,105,162, 98,122,128, 48, 98,124,244,137, 6,115, 63,254, 24,115, 63,254, 24, 75,151, 46, 69,121, +121, 57,248,202,243,176,252,233,150, 45, 91, 48,100,200, 16,244,239,223,191, 35, 0,249,174, 93,187, 6, 92,184,112, 1,199,143, + 31,135,201,100,194,132, 9, 19, 70,241,149,151,245,251,101,188,247,243, 41,172,121,227,249,170,248,123, 59,246, 49, 26,116,200, +250,102, 23,142, 30,251, 29,123,191,219,137,154,107,165,152, 48, 97,124, 50, 4,220,182, 72, 76, 76,108,212,250,231,149, 3,144, +145,145, 65,242,243,243,149,124, 63,223,201, 8,166,165,126, 35,228, 1,193,115,255, 55,106,133,186,197,212,253, 37,127,206, 11, +224,110,157, 7, 3,190,146, 15,253,129, 86,171, 85,150,148,148,104,184,205, 93, 26, 59, 22, 8,206,158, 61,139,202,202, 74, 77, +219,182,109, 85, 74,165, 82,219,216,177, 70,137,171,226, 50, 14, 92, 53, 97, 66, 72, 8,246, 93,102,209,182,191, 12,157, 45,133, +208,157,248, 43, 54,189,125, 20,236,133, 26, 24,172, 20,197,181, 14, 40,196, 12,236, 53,215, 16,217,132,210,238,174, 4,200,229, +114, 92,188,120, 17,167, 78,157, 66,207,158, 61,161,211,233,112,240,224, 65, 87, 44,223, 87,188,158, 16,226,242, 2,112,242, 40, +165,184,124,249, 50,122,247,238,141,252,252,124,176, 44, 11,185, 92, 14,137, 68,226, 90, 37,192,199, 3,112,233,210, 37,152,205, +102, 12, 24, 48, 0,241,241,241, 42,145, 72,132,136,136, 8, 12, 26, 52, 72,117,240,224, 65,205,165, 75,151,160,215,235,143,129, +167,203,254,210,165, 75, 96, 25, 41,218, 37, 38,163, 69,124, 2, 24,145, 4,138,136, 88,116, 24, 52, 1, 23, 15,230,162, 94,222, + 5, 95,114, 40,165,202,234,234,106, 77,113,113, 49, 58,116,232,128,161, 67,135,170, 68, 34,145,118,216,176, 97,100,201,146, 37, +116,240,224,193,246,250,121, 51, 33, 50, 50, 18,245, 10,138,163, 41,153,114,121, 12, 98, 98,251,194,106,169, 65, 69,229, 97, 88, + 44,186,209, 54,155, 97, 32,128, 55, 7, 15, 30, 12, 0, 40,189,118, 13,245,242, 36,112,219,244,166, 41,252,242,203, 47,169,235, +215,175,199,204,153, 51, 49,108,216, 48, 0, 96,119,236,216, 33,206,203,203,195,220,185,115,199,246,233,211,103,167, 63,125,249, +180,222,136,197,123,126,197, 91,127, 83, 99,248,196,228,232, 58, 67, 5, 54,126,179, 7, 25, 31,125,141,109, 11,231,160, 75,217, + 21, 44,211, 95, 67,116,116,140,144, 4,120,135,192,221,237,239, 45, 95,165,209, 28, 0,207,216,190,175,207,119, 35,130,189, 4, + 47, 80,188,126,255,235, 42, 66,200,109,217,222, 30, 75,253, 26,228, 1,120, 42, 3,193, 92,254,199, 87, 57,200,205,205, 85,150, +150,150,106,172, 86,107,147,199,154, 3,157, 78,135,186,186, 58,141, 94,175, 87,121, 59,150,146,146,210,232,179, 59, 82,101, 66, +141,149,197,145,114, 59, 74,170,237,136, 59, 40, 70,159,141,103,113,241,194,113,252,254,147, 21,118,177, 8, 86, 22, 48, 91, 41, +116,148, 69,108, 20,109,146,176,221,151,255,113, 25,251,165,165,165,232,216,177, 35, 46, 92,184,224,114,249,139,197, 98,215,245, +254,134,243,220,107, 8,112,127,111, 80, 72,176, 26,205,203,222,191,206, 24,247,117, 1,203,178,168,171,171,115, 78,142, 98,177, + 74, 36, 18,105, 61, 60, 73,226,220,220, 92,164,164,164, 48,139, 23, 47, 46, 93,182,108,153,125,241,226,197, 77,222, 60, 33, 78, +133,200,100, 44,133,161,246,178,202,225, 48,107, 1,236, 5,240,102,109,109, 45,114,115,115, 93,202,228, 61,247,220, 99,245, 37, +175,190,127,165,228,228,228,100, 79,152, 48,193, 69,254, 63,252,240, 3,179,121,243,102, 40,149,202,137,254,146,255, 85,163, 5, +143,231, 29,196,115, 83, 39, 32,245,241, 41, 48,154,245,216,148,171,197,202, 15,179,240,217,216,251,209,165,236,138,192,166,119, +129, 50,224,169, 4,220,148, 74,128,106,181,154,186,199,116,125,125, 22,112,221,196,126, 67,201, 63,208,152, 58, 71,252,158,217, +254, 30,174,127, 82,255,242,122,109, 99,253,197, 87,191,224,219, 95, 82, 82, 82,180,221,186,117, 83, 69, 69, 69, 53,121,172, 57, +136,138,138, 66,183,110,221, 26, 16,189,183, 99,222, 96,114, 68,192, 70,128, 67, 21, 22,148, 57, 28,216, 85,100,198,198,108, 51, +118, 95,137,197, 89,105, 36,174,212,216,112,185,150, 69,157, 29, 48,218, 41,100, 49,173,125, 18, 51,183,190,223,225,112,192,110, +183, 35, 38, 38, 6, 97, 97, 97,232,216,177, 35,108, 54,155,235,184,183,130, 64,158,242,184,245,253,118,187, 29, 38,147, 9,148, + 82,180,111,223, 30,197,197,197,104,211,166, 13,196, 98, 49, 44, 22, 11,172, 86,171,235,255,242, 9, 15,118,232,208, 1,114,185, + 28,133,133,133,184,114,229,138,198,225,112, 64,175,215,147,159,126,250, 73, 99, 48, 24,208,161, 67, 7, 68, 68, 68, 60,200,119, +142,234,208,161, 3, 24,214,138,226,195,249,168,190,114, 26,172,195, 6,147,190, 28,151,126,250, 14,214, 58, 29, 39,175, 19, 31, +229,134, 67, 76, 76,140,134,101, 89,151,167,115,233,210,165,228,248,241,227,168, 39,109, 22, 64,156,183,130, 71,158,176,219, 77, +176,219, 12, 80,132,182,134, 92, 17, 13,128, 40, 1,216,151, 46, 93, 26,227, 38, 15,107,215,174,229, 10, 40,121,189,231,202,202, + 74,250,217,103,159,209,140,140, 12,250,175,127,253,235,219,148,148, 20, 76,156, 56,145,243, 6,232,183,108,217,130,212,212,212, +148,169, 83,167,126,199,167,205, 42, 43, 43,233,231,159,127, 78,167,253,245, 41,140,202,217,131,191,205,158,140,103, 94,152, 15, +179,213,128,243,231, 46, 35, 35, 99, 35, 54, 63, 60, 4,202,246,173, 2, 30, 27,155, 55,111, 22,230,245, 91, 8,207,112,128,103, + 34,224, 77, 45, 5,236, 25, 54,240,245,249,166, 89,250,141,196,234, 61,173,125,190,214,127, 99,242, 10, 94,126,153, 22,188,252, +135, 59,223,243,179, 47, 79, 68,176,228,185,131,115,249,127,242,232,103, 36, 16,247,127, 70, 70,134,203,178,111, 44,222,207, 29, +119,191,214, 23,124,229, 15,248, 19, 30, 80, 42,149,218,135, 31,126, 88,229, 94,156,198,219,177, 64,112,207, 61,247,224,225,135, + 31,110,224,234,247,118,172,209,239,119,187, 7,221, 66, 69, 8, 39,128,141, 82,156,212, 89,177,254,172, 5, 95, 30, 40,193,207, +231,170, 80, 98, 2, 42,205, 14,156, 51, 80, 92,181, 80, 24,172, 54, 85, 83,228,197, 45,205,179, 90,173, 48,153, 76,104,211,166, + 13,122,245,234, 85,175,232, 69, 99,224,192,129, 46,194,230, 72,187, 49,194,230, 8,221,102,179,193,106,181,130, 16,130,174, 93, +187,162,186,186, 26,151, 47, 95, 70, 85, 85, 21, 58,117,234, 4,134, 97, 96,181, 90, 97,177, 88, 92,223,241,133,216,216, 88, 85, +124,124, 60,142, 31, 63,142,239,191,255, 30, 91,183,110,213,108,221,186,117,247,190,125,251, 32, 18,137,240,192, 3, 15,160, 75, +151, 46, 38,240, 44,100, 19, 27, 27,155, 18, 23, 29,137,202,162, 95,241,251,206, 79,112,252,187,213, 56,249, 93, 6, 46,254,184, + 25, 50,134,229,228, 21,251,146, 35, 22,139,181,113,113,113,170,136,136, 8, 28, 57,114, 4, 87,174, 92,209, 24,141, 70,165,187, + 34, 80,239, 9, 96,214,175, 95,143,158, 61,123,250,252,109, 86, 75, 13,106,170,207, 66, 34, 9, 69,139,232,238,154,208,176,118, +144, 72, 66,149,132, 48,131,185,107,194,171,243,161,249,236, 25,140,233,110,224,148,230,235,240,221,119,223, 65,161, 80,160,103, +207,158,232,212,169, 19,234,195, 7,118,157, 78,103,200,201,201,105,145,152,152,152, 50,106,212,168, 45,124,251,110, 94,222,119, +136,136, 8,195,136,145,131,140,137,253,251,224,209,191,206,133,145,216, 81, 94, 86,133,121, 79,191,134,101, 73,247,160,127,171, +192,149,228,205,155, 55,211,183,223,126, 91, 80, 2,110, 19, 69,192, 27,110,155,189, 0,110,245,170,130, 64, 8,216, 95, 12,124, +195,169, 64,184, 19, 53,119,236,102,201,115,183,194,159,216, 52, 27, 79,108,154,221,224,189,251, 49,190, 22,187,187, 39,193,155, + 71,161,185,121, 1,238,158, 0,207,191,124, 17, 30, 30,174, 29, 61,122,180,106,224,192,129,141, 30,115, 63,215,100,187,187, 93, + 63,122,244,104, 85,120,248, 31,203,242,188, 29,107,210, 58,148,133,170,122,183,105,137,161, 49, 50,220, 31, 37, 69, 91, 57, 3, + 25,165,144, 91,236,232, 16, 38,134,142, 82,252,102,176,227,116,157, 29,237, 90,197,160,211,253, 35, 27,149,197, 89,253,220, 82, +191, 14, 29, 58,160,111,223,190,208,233,116,168,174,174, 70,117,117, 53,194,195,195, 49,120,240, 96, 88,173, 86, 87, 77,128,198, + 8,155, 83, 38,108, 54, 27, 8, 33, 72, 72, 72,128,201,100, 66,121,121, 57,202,202,202, 80, 94, 94,142,186,186, 58, 36, 36, 36, + 64, 44, 22,187,228, 53, 86, 87,192, 83, 41,139,139,139, 83,117,237,218, 21,231,207,159,199,246,237,219, 81, 80, 80,128,144,144, + 16,140, 26, 53, 10,125,251,246,253, 78, 46,151, 47, 4,207, 16,128, 82,169,220, 18,215, 42,118, 86,215, 54, 45, 96, 56,247, 19, + 78,111,255, 8,197, 5,223, 34, 74,230, 64,242,232, 81,232,219,183,239, 28,185, 92,158,203, 71, 86, 68, 68, 4,250,247,239, 15, + 74, 41, 14, 28, 56,128,194,194, 66, 77,113,113,177,166,170,170, 74,185,100,201, 18, 21, 87, 57, 49, 41, 41, 9,123,247,238,245, + 41,143,101,109,218, 26,221, 89, 85, 85,249, 49,200,228,209,104,221,246, 1, 77,108,235,129,154,240,136, 78,223,189,243,238,191, + 31,230,228,125,249,108, 8, 54,252, 96, 65, 99, 74,207,233,211,167,209,178,101, 75, 12, 27, 54,140,189,255,254,251, 97, 52, 26, + 81, 87, 87,135, 85,171, 86,133,117,239,222,125,210,180,105,211,182,248, 51, 38,126,255,253, 52, 58,118,136,199,180,105, 41, 33, +175,188,252, 28, 42,107,107, 80, 81, 89,129,244,103, 94,195,107,143,142,198,232, 14,113,205, 34,255,149, 43, 87,162, 87,175, 94, +248,224,131, 15, 4, 37,224, 38,226,215, 95,127,109,180, 14,192,117, 10,239,237, 66,240,254,172, 42, 72, 77, 77, 37,193,170, 4, +232, 11,158,133,120,130,161, 4, 4,131,252, 3,149,215, 88,169, 94, 79,203,220,159,146,189, 30, 74,130,171, 40, 80,115,238,203, + 93,105,112,183,246, 3, 89, 1,224,110,221,221,127,255,253,164,177, 99,158,231, 26, 67, 83,215,243,149,193,225, 1,229, 40,109, +145,152,194, 94,144,135, 11, 53, 64, 24,145,160, 99, 24,131, 98, 7,129, 72, 38,198,222, 50, 7,204, 44, 16, 43, 19,161,107,210, + 8,200,187, 37,105,155, 82, 0,108, 54, 27, 68, 34, 17, 58,119,238,140,254,253,251, 67,175,215,195,108, 54,187,214,231, 91,173, + 86, 68, 71, 71, 99,216,176, 97,216,178,101,139, 43, 36,224, 13, 14,135,195,149,213,223,163, 71, 15,212,187,233, 97, 54,155, 93, +227,153,243, 36,244,232,209, 3, 85, 85, 85, 48, 24, 12, 77,141,229, 6, 39,102,205,154,165,213,106,181,163,122,246,236,185,219, +173,112, 79,245,240,225,195,119,203,229,242,153, 0,204,254,180,229,172, 89,179,214,107,181, 90,125,207,158, 61,115,221,228, 85, + 12, 31, 62,124,149, 92, 46,255,148,175, 28,134, 97,180,109,219,182, 85,141, 27, 55, 14,231,207,159,215,156, 58,117, 10,151, 46, + 93, 66,120,120,184,166, 69,139, 22, 24, 51,102, 12,254,251,223,255, 34, 41, 41,137,247,111,179,219,141,218,106,221,239, 42,179, +185, 10, 45,162, 18, 52, 97,225,237, 17, 30,209, 1,117,181,197, 91,222, 90,246, 17,166, 79, 75,198,151,207,134,120,109, 39, 14, +227,199,143, 71, 94, 94, 30,174, 92,185,194, 84, 85, 85,193,108, 54, 99,239,222,189,226,122,165, 83,239,239,120,152, 48, 97, 60, + 54,109,218, 2,125,117, 37,174,148, 92,197,179, 79,206,182, 62,255,226, 82,233,163,163,134, 96,152, 69, 15, 72, 2,163,135,205, +155, 55,211,127,252,227, 31,174,114,208, 93,187,118,197,219,111,191,141, 23, 94,120,129, 78,154, 52,233,206,175,220,121,135, 42, + 5,183, 76, 1,184, 17,171, 10,130, 65,238, 28, 42, 42, 62,194,203, 5,223, 54, 89,109,207,159,228,191,138,138,143, 80,240,242, + 31,242,220,137,217,211,101,207,135,180, 43, 62,170, 64,193,183, 47, 7, 77, 94, 48,193,199, 67,192,237, 1,224, 79,127,249, 95, + 26,156,157,134,168, 84, 71, 45,118, 77,249,238, 93,144,216, 77, 56, 90, 75,145, 95,107,135,148, 16,196, 80, 10, 85,155, 22,136, +106, 29,171,138, 31,164,244, 97,105, 58, 61, 0,157, 58,117,194,192,129, 3, 97, 50,153, 96,179,217, 32,149, 74, 93,132,205, 89, +233,177,177,177, 24, 58,116, 40,182,111,223,222,164, 7, 64, 44, 22,163,111,223,190, 32,132,192,104, 52,186,188, 11,156,210,206, + 85, 23,100, 89, 22,189,123,247,198,193,131, 7,225, 79,114,165, 82,169,212,224,143, 60,145, 48, 56,171,237, 93, 2,207, 76,120, +111,158, 0, 55, 89,209, 0,170, 0,248, 93,155,152, 97, 24,109,139, 22, 45,208,187,119,111,149, 68, 34,225,150, 63,106, 0,160, +184,184, 24, 15, 61,244, 16,150, 47, 95,238,151, 76,135,195,162,173, 51, 20, 43,173,214, 26,149, 66,127, 65, 19,209,162, 43, 66, +194,218, 34, 36,172, 45,118,236, 42, 5, 25,221,180,197, 61,100,200, 16, 34,149, 74,105, 85, 85, 21,198,143, 31,111,141,137,137, +145,178, 44,139, 75,151, 46, 1, 1, 36, 75, 62,240,192, 16, 34,147,201,104,196,137, 66, 60,249,228,159, 16,159,208, 77,250,246, +115,127, 98,215,125,248, 41,179, 74,100, 14,168, 47,111,222,188,153, 46, 94,188, 24, 45, 90,180, 64, 73, 73, 9, 20, 10, 5, 88, +150, 69,104,104, 40,222,120,227, 13,188,252,242,203,130, 18,112,131,145,152,152,216,168, 23,128,215, 50,192, 27,129,219,121, 85, + 65, 83,132, 19,136,245,223,152, 60, 79, 75,157,115,221,251, 34,237, 96,203,115,247, 4, 4,122,190, 41,175,130,231,230, 63,254, +202,251, 95, 3,195, 48,218,196,209,227, 72, 85,157, 73, 25,105,183,104, 68, 23,139,112,143,237, 42,194, 99,226, 48,164,119,119, +196,180,107,169,138, 76, 28,233,115,124, 80, 74,209,185,115,103, 12, 27, 54,204, 21,143, 23,137, 68,176, 88, 44,174,210,189,238, + 97,130,246,237,219, 99,232,208,161,208,106,189,139, 86, 40, 20, 72, 76, 76,132, 88, 44,134,213,106,117,125,207,125,233,160,251, + 70, 64, 12,195,160, 95,191,126, 40, 44, 44, 12,164, 25, 40,128,218,250, 87, 48, 96, 8,132,248,189,121,141,122,245,234,197,229, + 81, 16,150,101,149, 70,163, 17, 22,139, 5,221,187,119,199,138, 21, 43,252,220, 28,135,106,109,214, 90,216,172, 6,149,201, 84, + 14,153, 44, 10, 18,105,184,134, 97,196,248, 98,253,119,170, 89, 51, 39, 52, 41,175,190,174, 63,121,239,189,247, 88,147,201, 4, + 0, 72, 72, 72,240,171,252,178, 59,250,247, 31, 64, 68,247,223,255,208,220,127,188,151,231,148, 71,153,132,132,123,145, 48,105, +210, 44,177, 88,188, 62, 16,153,203,150, 45, 19, 6,245,109,162, 4, 52, 69,254, 55, 85, 1,184, 83, 17,204,101,127,158,196,220, + 92,107, 61, 88,242,154, 99,113,187, 19, 59,247,222,195,101, 47,116, 34,158, 24,149, 50, 73, 91,111,189, 98, 68, 0,223, 79, 75, + 75, 67, 84, 84,148, 43,195,159,101, 89,151, 11,159,243, 0,112, 73,127,220,142,128, 93,187,118, 5, 33, 4, 27, 54,108,184, 78, +222,202,149, 43,145,157,157,237,186,214,225,112,248,220, 14, 88, 42,149, 34, 41, 41, 9,124,178,227,239, 84,101, 45, 44, 44, 12, + 97, 97, 97,136,137,137,105,198,216,225, 20,129, 90, 48,140, 24,206,116, 44, 86,195, 83, 30, 93,180,104, 17,169,127,158,148, 97, +152,102,205, 35, 14, 7,187,109,193,130, 5, 4, 0,195,178,172,131, 97, 24, 5,252, 12,191,112, 16,172,251,219, 75, 9,240, 5, +146,152,152, 40, 36,103, 8, 16, 32, 64,128, 0, 1,255, 99, 96,132, 38, 16, 32, 64,128, 0, 1, 2, 4, 5, 64,128, 0, 1, 2, + 4, 8, 16, 32, 40, 0, 2, 4, 8, 16, 32, 64,128, 0, 65, 1, 16, 32, 64,128, 0, 1, 2, 4,220, 21,104,176, 10, 96,254,252, +249, 1,103,112,174, 94,189,250,186,100, 66, 65,158, 32, 79,144,119,247,201, 83,171,213,244,145, 73,106,124,187, 57, 3, 25, 25, + 25, 12,188,172, 65, 23,218, 79,144,247,198, 27,111,184,174,121,249,229,151,137,208,126, 55, 87,158,223, 10, 0, 55,184, 27,187, + 56,144, 37, 47,119,178,188, 64,100,222,238,247,235, 5, 82, 0, 17, 0, 66,234,251, 3, 11,160, 2, 65, 88, 67, 29, 76,112,237, + 16,140,123,246,214,166,183,170,248, 80,109,237,255,111,239,202,195,154,184,214,247, 59, 73, 8, 1, 65, 22, 17, 17,149, 42, 32, +138,184, 32,238, 90,149, 88,144,130,128, 91,209,254,106,123,107, 55,162,183,215,122, 91, 84,172,116,177, 11,173,120,181,155,183, +173,161,183, 85,219,122,111, 43,181,130, 59,149, 26, 92,170, 86,197, 21,180, 42,224, 86, 65,169,202, 78, 66,150, 57,191, 63,194, + 96, 8, 89,102,146, 32,216,206,251, 60, 60, 9, 39,147, 47, 51,231,204,156,247,253,190,115,206,119,106, 35, 15, 29, 58,164,216, +183,111, 31, 0, 96,226,196,137, 24, 59,118, 44,235, 84,194,237,209, 14, 83,167,201, 16, 23, 27,161, 5,100, 34,153, 76, 70,255, +213, 18, 55,241,176,142,244,244,116,146,144, 16,212,226,127,107, 34,128, 71, 59, 71, 0, 24,144, 77,173, 55,128,160,102,217,190, +111,186,169, 14,194,158,221,255, 28,109,207,212,245,218,115,205, 29,253,122, 25,226, 47, 58,115, 96, 93, 81,209,233, 71,252,122, + 4,117,171,174,214,192,195,195, 9, 55,111,148,208, 97, 97, 67,238,134, 13, 30, 63, 18,192,101, 46, 6, 79, 28,254,140,148,150, + 92, 68,201, 21, 21,174,151, 19,244,234, 78, 33,168,183, 4,129, 65, 33,136, 24,243,247, 14,241,240,155, 18, 18,204, 94, 3,237, + 65,100,103,207,158, 85,132,135,239,198,218,181, 13,200,207, 7,222,124,243, 39, 92,191,126, 93,225,231,231, 7,137, 68,130,178, +178, 50,233,244,233,211,225, 8, 65,112,224,192, 1, 82, 93, 93, 45,141,142,142,134,179,179,179, 45,246, 4, 0, 16, 23, 27, 65, + 39, 39, 39,139,128, 76,228,100,235, 31, 21, 56,118,219, 94, 30,127, 2,168,213,169,200,205, 77, 70, 76, 76, 38, 18, 18, 50,154, + 35, 2,188, 16,184, 63,224, 19, 1,113,128, 33,217, 83, 20, 64,127,239,245,167,189, 86,141,186,254,169,220,221,223, 47, 11, 14, +238,219,127,198,180,137,232,213,163, 51, 60, 61,156, 81, 89,165,194,141,242, 94,130, 75,165,149, 62,219,183,126,165,136,121,116, +246,106, 39,113,167, 53,214,236,157, 59,187, 47,242,242,197,237, 10, 33,106, 48,123, 10, 48,110, 24, 16,244, 16, 80,124,133,224, +224,113, 37,118, 42, 78, 99,199,230,197,164, 79, 72,188,116,192, 32,235, 25,237,218, 42,218, 97, 46,138, 32,151,203,169,246, 18, + 1,119,239,222,197, 75, 47, 53,160,107, 87, 32, 41, 9, 88,177,162, 14, 39, 79,158,132, 86,171,133, 68, 34,129,175,175,175, 98, +251,246,237,232,219,183,175,116,248,240,225,249, 28, 59,128,200,194,194, 66,116,235,214, 77, 17, 29, 29, 77,125,251,237,183, 0, +160,200,203,203,195, 19, 79, 60,129,145, 35, 71,114,189, 86, 49, 0,236,220,117, 66, 0,100,210,250, 87,189,134,230,123, 16, 30, +134,222, 62, 0,204,156,185, 25,185,185,250,215,228,228, 18, 48, 17, 1, 62, 26,112,127,137,223,176,188,221, 82, 1,119,116,144, + 77, 94,205, 34,224,207, 76,254, 0, 68,123,114, 55,189, 38,157, 16, 17, 50, 98,104,119, 80,148, 62,171, 27, 77, 19,116,118,115, + 70,167, 32, 49,122,247,242, 64, 15, 63,183,135,246,228,110,122, 45, 46,225,153, 44, 0, 55, 45, 25,188,124,113,187, 98,252,176, + 26,252,243, 25, 64, 40,212, 11, 40,141, 22,232,228, 10,132, 6, 3,163,195,129,237,138, 26, 28, 57,189, 93, 49, 96,208, 68,155, + 30,124, 71, 13, 1,152,251, 62, 35, 2,238,119, 99,120,123,123, 99,251,118, 23,244,234,165, 68,126, 62, 80, 89, 41, 66,112,112, + 48,130,131,131, 81, 87, 87,135,210,210, 82,228,231,231,163,166,166, 70,209,175, 95, 63,214, 67, 3, 63,254,248, 99,164, 82,169, + 84,136,197, 98, 84, 86,182,140,100, 41,149, 74,124,249,229,151, 40, 45, 45, 37,143, 63,254, 56,151,250,164, 1, 32, 39, 91, 14, + 64, 38,208,191,218,142, 99,199,142, 53,215, 55,179,137,146,169, 50, 54,247,133, 97,219,178, 45,179,234, 20, 16, 18,137, 11, 23, + 48,178,174, 78,209,229,198, 13,252,238,235,139, 19,157, 59, 75,157, 6, 12, 0,161,168,124, 91,175,153,235,134, 81,108,108,176, + 45,107,107,123,134,161,255,228,228, 92, 36, 36, 4, 53,191, 50, 72, 72, 8,226, 69,192,125,128, 49,217, 51,251, 3, 24,150,243, +171, 0,140, 31,250, 63,249,245, 21,157, 57,176, 34, 56, 56, 56,100,100, 68,247, 22,229, 2, 1, 5,177, 88, 8, 23,137, 8, 78, + 78, 2, 4,245,241, 66, 80, 80,176,111,209,153, 3,219, 45, 9,197, 19,135, 63, 35, 66,212,224,229,103, 1, 85, 35,112,249, 58, + 80, 89, 13, 84,213, 0,255,221, 10, 44, 88, 14, 44, 91, 5,140,141, 0, 4,164, 6, 39, 14,127,198,123,139, 6, 24, 52,104,144, + 52, 39, 39, 20,190,190,192, 19, 79,136,224,231, 55, 2, 19, 39, 78,148, 38, 36, 36, 80,241,241,241,210,152,152, 24,116,235,214, + 13, 39, 78,156,192,247,223,127,175,248,233,167,159, 34, 27, 27, 27, 35, 45,217,252,246,219,111, 35, 27, 27, 27, 21, 78, 78, 78, + 22,127, 91,161, 80, 96,211,166, 77,145,108, 72,118,255,254,253, 4,128, 90, 46,151,139,239,137,128,123,100,186,127,255,126,194, + 85, 64, 29, 61,122,180,249,207, 82,153, 45,162,142,109,153, 37,242, 15,252,237, 55,197,244, 83,167, 20,189, 46, 22, 67, 92, 83, +131,238, 23,127, 67,228,145,195,138,174,167, 79, 43, 64, 72,164, 45,237,125,244,232, 81, 28, 59,118,140, 20, 22, 22, 70,218,122, +207, 48, 54,216,148,177,181,103, 76,244,108,202,172,129, 33,125,230, 85,157, 16,204, 63,240,247,137,248,217,164, 1,126, 96, 35, + 0,109,233,169,145, 54, 60, 63, 71,133,152, 25,251,230,126,199,210,111, 20,157, 59, 29, 59,107,134,180,153,244, 77, 65,226, 44, + 66, 85,117, 35, 66,130,188,145,181, 69, 17, 20, 54,120,188,135, 57,123,165, 37, 23, 49,123,138,254,253,238,253,192,167,223, 0, +147,199, 3,113,145,192,111,197,192,201, 34, 2, 23, 9,133,161, 97, 64,204, 68,224,199,220,139,136, 24,227, 56,207,221,150,186, +107,163, 57, 21, 54,193,221,221, 61,191,174, 78, 63,223,242,137, 39,158,192,184,113,227, 40,195,207,238,222,189, 43, 13, 13, 21, + 41, 18, 19, 1,138, 58,142,138,138, 6,197,239,191, 7, 89, 10,255, 69, 82, 20,165, 96,187, 57, 76, 69, 69,133,194,154,238,157, + 51,103, 14, 54,110,220,136,141, 27, 55,146, 57,115,230,180,104,139,253,251,247,147,141, 27, 55, 54, 31,215, 81,250, 3,182,101, +230,208, 88, 88,136, 62, 5, 5, 80, 11, 4,112,162, 0, 45, 77, 64,107,116,160,181, 90,116, 61,176, 31,197,132,160,243,208,161, + 54, 19,184,171,171,171,226,248,241,227,210,185,115,231,230,219,106, 3, 64, 11,143,220, 84,153, 45,209, 5,123,201,223, 28,209, +231, 26, 69, 2,120,180, 63, 76, 10, 0,115,147,223,108, 33, 28,107,132,200,213,222,253, 30,163,181,101,198,184,165, 73,133,182, +216, 51,245, 29, 27, 39, 46,138,252,252,131, 6,248,251,185,129, 16,224,192,225,235,104, 80,234,119, 93,141, 24,226,135,174, 93, + 92,112,253, 70, 45, 93,124,185, 82, 32, 18, 9,208, 55,208, 11,254,254,193,158,208,111,209,106, 18, 37, 87, 84, 24, 55, 12,104, +212, 0,187,246, 1,138,195, 4,254,221, 40, 4, 6, 0,143, 60, 12,244, 15,162, 32, 18,234,183, 22, 31, 29, 14,252, 75,174, 98, + 85,223,134, 33,121, 54,239,217, 40, 94,195,177,126,195,122,119,228, 10, 3, 91,208,180,157, 43, 6, 15, 30, 44, 53,254, 76, 40, + 20, 42, 6, 12,168,192,178,101,122,121,250,222,123, 23,113,229, 74,152, 89, 91, 42,149,202,170,231,111,136, 43, 87,174, 88, 61, +102,194,132, 9,212,132, 9, 19,154,201,126,227,198,141,196, 88, 32, 76,152, 48,161, 93,234,174, 45,188,127, 0,232,123,251,142, + 66,173,209, 64, 32, 16,128, 8,133,160,105, 26, 26,154, 6,173,211, 65,167,163,209,179,188, 92, 81, 51,116,168,205,215,220,208, +208, 0, 0,138, 99,199,142,129,162, 40,206,243, 59,218, 66, 4, 56,202,243,207, 77,206, 69, 76,102, 12,102,110, 6,146,115,245, +239,115,147,115,155,197,129,120, 91, 49,207,188,247, 17,134,115, 2, 88,205, 1, 48,183, 10,192,214,213, 1,230, 60, 46, 91, 60, + 49, 75,162,193, 86,129, 98,233,186,141,191,203,214,139, 48, 55,169,208, 22,123,150,190,195,252, 14, 5,128,222,100,117,238, 2, +173,159,237,239, 12, 0,184, 94, 86, 3,165, 82, 11, 0, 8, 14,244, 66,215, 46, 46, 56, 93, 84, 33,184,112,233, 46, 36, 18, 33, +130,250,120,162,178, 90, 13, 0,102, 13, 95, 47, 39, 8,122, 72,255,251,143, 78, 0,194, 7, 80,112, 22, 3, 90,173, 62, 18,224, +233, 14,148, 94, 3, 98, 38, 0, 15,245,212, 31,223,158, 48, 36,125, 91,198,133, 59, 58, 42, 42, 42,218, 44,138,210, 68,242,205, + 30,127,123,147,191, 33, 50, 50, 50, 72,106,106, 42,101,235,231,198,112, 42, 41, 70,163, 70, 13, 74, 40,130,142, 16, 80, 0,180, + 58, 26, 26, 45, 13,162,211,129,186,116, 1, 64,156,221,231, 93, 88, 88, 8, 31, 31, 31, 69,117,117,181,212,195,195,195,102, 17, + 96,173,236,126,145,127, 90, 90, 26,149,158,158, 78,102,110,110, 41, 8, 0, 32, 38, 51, 6,226,109,197,216,182,173,164,121, 37, + 0, 51, 97,208,219,219,155,103,234,251, 76,254,102, 5, 64, 71,135, 37, 66,180,133, 96,237, 89,226,104,209,110, 27,175, 38,160, +102, 85,114,253, 13,202,195,195, 9,149, 85, 42,248,120,187, 34, 41,177, 63,180, 58, 26,206,206, 66, 8, 5, 2, 16, 66, 16, 63, + 57, 8, 83,162,131, 64, 81,192,157, 74, 37, 60, 60,156, 0,224,174, 57,131,189,186, 83, 40,185, 74,189,136,105, 47, 0, 0, 32, + 0, 73, 68, 65, 84,208, 63, 8,152, 52, 70,223,235,252, 86, 12, 12,238, 15,120,117, 6, 98, 35, 1,154, 6, 68, 66,224,226,101, +253,241,108,219,150,203,123, 91, 19, 97, 88, 19,164,109, 13,154,166, 35,123,244,232,129,146,146, 18,236,223,191, 95, 49,126,252, +120,169,155,155, 27, 4, 2, 65, 62, 0,232,116, 58,233,185,115,190,138,183,222,186, 1,138,162, 80, 81, 17,130,144,144,222,184, +120,241,162, 57,123, 38,203, 55,109,218,212, 58,138, 68, 8,102,207,158,205,233,154, 13, 69, 64, 71, 34,127, 71,136, 4, 67,220, +237,217, 3,226,223, 46,128, 56, 1, 98,154,232, 39,182,234,180, 80, 19, 29, 26,180, 90, 40,131,251, 59,228,220, 7, 14, 28, 8, +138,162,108, 34,127, 0, 24, 57,114, 36, 70,140, 24, 65, 29, 61,122,148, 88, 42,179,134,166,136, 65, 11,194, 55, 85,198, 5,201, +185,247,136, 31, 64, 43,207,159,153, 48,184,109, 91, 9,207,212,237, 64,254, 15,172, 0,104,107, 65,225, 40, 66, 32, 4, 16,204, +174,108, 51, 17,192,172, 92, 16,204,170,100,227,253, 3,128,232,230,141,146,219,215,111,244,244,241,241,118,197, 7,159, 31,195, +132,177,189, 16, 49,184, 27, 40, 39,170,121, 69, 64,211,214,241,184,126,163, 22, 55,111,148, 92, 6, 96,214,173, 12,234, 45,193, + 47, 5, 74,244, 15, 2,124,134, 1, 75,231, 3, 11,231, 2, 30,238,250,176,255, 91,159, 0,203, 23,234,143,253,165, 64,127,188, +173, 4,237, 40, 79,189, 35,229, 2, 56,119,238, 28, 36, 18,125,157,236,216,177, 3,215,174, 93, 83,244,235,215, 79, 58,105,210, + 36,212,214,214, 70,122,123,123, 43, 14, 30,212, 34, 63, 31, 24, 49, 98, 56, 2, 2, 2,164, 61,123,246, 4, 0,133, 41,123,157, + 58,117,130, 90,173,102,245,219, 90,173,246,129,127,118, 13,201,159,141, 16, 96, 43, 2, 74,186,250, 74,157,207,156, 81,208,132, +160,147, 64, 4,161,144,130,150,232,208,160,209,160, 86,173, 70,153,191,191,212,199,142,243,118,117,117, 5, 69, 81,210, 17, 35, + 70,228,219,106,131, 33,122,107,101,247, 91, 4,164,165,165, 81,201, 77,158,189, 49,249, 27,122,255, 60,218,151,252,121, 1,112, + 63, 60,188, 54, 94, 82,216, 44, 2,216, 9, 13,109, 88,216,144,178,226,203,149, 62, 67,194,124,177,116,225,104,172,255,223, 89, +184, 72, 68, 8, 31,232, 11,138,162, 12, 60, 73,130,226,203,149, 8, 11, 27, 82, 8,160,214,156,193,192,160, 16,236,216,123, 26, +115,103, 2,164, 20, 24, 61, 3, 8,236, 5,108,204, 49, 56,104, 33,160,211, 1, 59,246,234,143,111, 47, 88,138, 20,181,215, 50, +192,187,119,239, 42, 66, 67, 47, 99,221, 58, 0,208,225,237,183,207,224,228,201, 6, 69, 67, 67, 3,106,107,107, 81, 90, 90,138, + 91,183,110, 33, 34, 34, 2,179,103,207,182,186, 12,144, 16, 34,165,105, 90, 33, 16, 88, 95,224,195, 8, 15,174, 96,134, 0, 54, +110,220,136, 9, 19, 38,180,235,243,149,154,154, 74, 49,196,111,109, 8,192,218, 49,134,240, 26, 58, 20,119,212,106,232, 20,249, + 80,139,157,224, 70, 68, 80,209, 52,170,213,106,212, 78,122, 4, 62,195,134,217, 24, 21,164, 48, 98,196, 8,155,199,253, 13,109, + 24, 18,189,169, 50,123, 68,192,177, 99,199, 44,150,177,129, 41,242,103, 60,127, 0,252,132,192,118, 38,127, 94, 0, 60,224,104, + 30,255,103, 63, 12,160, 11, 27, 60,126,210,246,173, 95, 29,252,181,192,189,255,168, 97,254,136,141, 10,196,238,159, 75,177,227, + 39,253,195,249, 90,202, 88,208, 52,193,175, 5,101, 40, 41, 41,190, 26,159,248,236, 63, 0,104,204, 25,140, 24,243,119,106,199, +230,197,228,195,175,244, 75, 1,215,190,171, 95,250, 23, 53, 78,191, 20,240,195,215,245,228,255,225, 87,128, 14,157,109,206, 8, +104,175,103,110, 45,130,208, 94,171, 0,234,235,235, 49,116,168, 10, 35, 70,232,255, 31, 62,156, 96,247,238, 82, 92,188,120,145, + 73, 4,132,200,200, 72,244,237,219,151, 85, 14,128,201,147, 39,231,103,103,103, 91,141, 2,104,181, 90,120,122,122, 74,185,158, +111,211,114,192,230,149, 1,251,247,239, 39,182, 14, 3,140, 28, 57,146, 85, 25, 23, 17, 96,237, 56,214, 70, 5,130,124,245,168, + 81,210,243, 78, 78,232, 85, 94,174,112,187,118, 13,170, 62,125,112,197,215, 87,234, 29, 17, 1, 52, 13,209,216, 64,176,142, 32, +233, 86, 54, 76,149,177,173, 75,227,227, 24,194,183, 86,102, 11,140, 73,159,137, 8,216, 59,132,199,163, 53,216, 76,140,230, 5, + 64, 27,122,230, 29,244, 55,238,196, 60, 58,251,163,220,221,223, 47,254,189,188, 54, 40,184,143, 23,166, 76, 14,130,151,167, 4, +149, 85, 42,156, 60,123, 11,197,151, 43, 81, 82, 82,124, 40,230,209,217, 63, 2,184,110,205, 96,159,144,120,233,129,130,237,138, + 67, 5, 53,152, 50, 9,248,226,125,125, 38,192,146,171,192,151,155,244,158,191, 14,157,209, 39, 36, 94,106,235,181,218, 51, 4, +192,150,252,219, 99, 14, 64,121,121,185,212,203,203, 71,113,252,248, 31, 0,128,139, 23, 59, 99,196,136, 1,232,210,165, 11, 36, + 18, 9,202,203,203,165,241,241,241,156, 82, 1,247,238,221, 91,122,225,194, 5,133, 97, 68,199,152,252,131,131,131, 49,114,228, + 72, 78, 36,198,172, 2, 48, 24,251,103, 38, 4,218, 36, 2, 76, 17,161,173,228,104,141,220, 57,145,191,129, 8,232, 50,124, 56, + 26, 0,170,161,169,200,222,169,106,246,146, 63,151,122, 99,251, 91,142,182,199,150,252,213, 9,193, 0, 63,254,127, 95, 34, 1, +230,132, 1,167,101,128,182, 78,150,227,186, 12,208, 86,123,182,218,116,244,249, 89,170, 39, 71,157,159, 61, 19, 23,157,196,157, +228,241,137,207,126, 87,116,230,192,103, 91,114,246, 5,250,245, 8, 26,109,176, 23,192,145,176,176, 33, 71,227, 19,159, 93, 6, +160,158,141,189, 1,131, 38,230, 15, 24, 52,145, 58,113,248, 51,242,253,142,139,120,239,211,142,183, 23, 64, 71, 36,127, 0,120, +252,241,199,113,250,244,105, 60,243,204,241,166, 8,192,112,204,154, 53, 68,234,234,234,154,111,171,205,240,240,240,252,240,240, +112,106,235,214,173,145,181,181,181, 10,161, 80, 8,129, 64, 0,173, 86, 11,177, 88, 12, 55, 55, 55,169, 3,200,223, 33, 34,128, +199,159, 19,105,105,105, 84,122,114, 58,241, 95,224, 47, 69,111,211,199,148, 37,231, 42,248,249, 0,237, 11, 17,219,142,210,209, + 29,111, 91,216,179,229,183, 30,228,235,181, 19,213, 97,131,199, 63, 25, 54,120, 60,147, 49,198, 13,128, 15,128,114, 0, 74, 52, +165,125,229,130,136, 49,127,167,108, 73,242,211,214,245,208,145,242, 74, 24,195,213,213, 53,127,204,152, 49,212,152, 49,142,175, +184,196,196,196,124, 56, 40,185, 37, 51,238,111, 76,242, 19, 38, 76,160, 54,110,220, 72, 58,194,124, 0, 30, 29, 79, 4, 88, 62, + 0, 60,249,183, 1,216,102, 1, 4, 0, 42, 60, 60,156, 31,123,225,193,131, 7, 15, 30, 60,254, 98,224,247, 2,224,193,131, 7, + 15, 30, 60,120, 1,192,131, 7, 15, 30, 60,120,240,224, 5, 0, 15, 30, 60,120,240,224,193,131, 23, 0, 60,120,240,224,193,131, + 7,143, 63, 7, 90,172, 2,152, 63,127,190,205,179, 50, 77, 37,114,224,237,181,141, 61, 54,155,216,180,167,189,188,188,188, 72, + 0,138,172,172, 44,135,216,219,187,119,111, 36, 77,211, 14,179,199,223,127,237,102,111, 54,128, 77,109,124,126, 78, 0, 36,208, + 39,173, 81, 65,191,154,133,192, 40,137, 13,223, 30,188,189, 63,187, 61,206, 2,192, 26, 57,152, 3,151,165, 84,142,182,119, 63, +145,156, 84, 77, 32, 22, 35,115,163, 11,171,243,203,203,203,139,204,202,202, 82, 56,234,122, 13,237,173, 94,189, 90,154,146,146, +162,176,101,123, 97, 83,246, 10, 63,237,140,129, 47,214,192, 30,123, 12,166,141,216,169, 56,125, 65, 7, 0,200,204,204, 36,201, +201,201,118,181,103, 72,183,239,161,212,122,195,197,197, 5, 89, 89, 89, 36, 41, 41,169,163,220, 31, 93,231,189,146,242,205,218, + 15, 86, 63, 5,224, 15, 7,216, 11,152,255,210,203, 95,124,254,201,135, 79,154,177,231, 4, 64, 11,203, 25,217,156,160,207,220, +216,117,225,194,151,191,249,248,227, 15,159,130,126, 51, 39, 26, 14,200,228,102,252, 28,115,188, 55, 14,183, 85, 67, 80, 20, 21, + 39, 16, 8, 6, 8, 4,130, 72,138,162, 66, 0,184,170,213,234, 92,161, 80,232, 73,211,116, 5, 33,228,117, 0,119, 28, 89, 7, + 60,120,152,194, 83, 37, 37,228,155,160, 32,135,245, 81,201, 50, 25,201,108, 35, 78, 20, 89,123,200, 9, 33,150, 30, 58,206, 29, +134,163,236,113,245, 96, 29,137, 61,123,246, 88,237, 68, 24,114, 77, 77, 77,133,175,175,175,201, 12,120, 41, 41, 41, 10,182,191, +201,216, 99,136,255,200,145, 35,205, 66,192, 30,123,244,185, 55, 32, 24,240, 54,190,222,171, 79, 29, 75,159,123,163,249, 24,193, +128,183, 57,213, 75,231,154, 87, 8, 77,128,239,118,235,109,197, 78,116, 66, 88,112, 17, 50, 51, 51, 9, 0,112, 21, 2,213,218, +239, 34,171,174,220,129,146,154,168,168,111,236,132,216,152, 42,244,240,163,112,252,248, 33, 82, 83,163,194,164, 73,147,218, 85, + 8,204, 95,184,240, 37,208,244,228,249, 11, 23,190,244,249,199, 31,191,110,183,189, 5, 11, 95, 32, 52, 29, 61,127,193,194,151, + 62, 95, 99,210,158,134,133, 25, 13, 0,106,193,130,133, 47,209,180,110,242,130, 5, 11, 95, 90, 99,218,150, 0, 54,228,122,176, + 19,106,195,251,239,135, 31,126, 80,204,152, 49, 67, 58,121,242,228,124,123,140, 10,133,194, 88,145, 72, 52, 65, 36, 18, 61, 46, + 20, 10,189, 4, 2,129, 91, 70, 70,134, 96,241,226,197,207,234,116, 58,104,245,120, 92,167,211, 37, 0,248,165, 73, 4,168,155, +250,191, 54, 31, 6,221,177, 99, 7, 97,219,223,197,197,197,113,186,167,119,238,220, 73,236,249, 62, 15,199,195,101,229, 74, 64, + 46,119,152, 61,229,146, 37,118,125,159,201, 8,200,105, 59, 96, 54,228, 63,108,216, 48, 20, 20, 20,112,242,248, 45,145, 60, 27, +123,166,236,167,166,166,162,180,180, 20, 89, 89, 89, 14,221,214, 53, 57, 33,147,192, 37, 4,153,155, 34, 41, 0,200,204,242,160, +184,144,255,234,213,171,165, 21, 21, 21, 10,115,228,159,154,154,138,140,140, 12, 78,228, 15, 0, 73, 73, 73, 24, 61,122,180,116, +244,232,209,118,217, 99,200,158,121, 93,241, 14, 90,144,255,146,153, 18,172,220,172, 98, 85, 87, 30,202, 20, 50, 48, 68,136,122, + 37,193, 43, 79, 73,112,164, 72, 11,101, 61, 65,131, 26,144,134, 23,161,232,162,142, 83, 52,160,244,250,135,164,234,102, 39,184, +119, 22,195,175,187, 27,186,118, 11,198,213, 18, 53,122, 15,208,192, 73, 82,129,188, 45,183,177,101,203, 22, 50,125,250,244,118, +233,240,100, 50,153,179, 79,143, 30, 11,191, 61,114,148,138,237,215,247, 37,153, 76,246,174, 92, 46,111,180,199, 94, 87,191, 30, + 11,191,219,123,132,138, 14,239,103,151, 61,153, 76, 38,246,243,235,190,240, 39,197, 1,106,248,144, 48,115,182,232,118,168,182, +230,237, 7,179,178,178, 20, 9, 9, 9,216,188,121,179, 98,242,228,201,173,218, 48, 34, 34,130,188,245,214, 91, 72, 72, 72,176, +216,190, 34,145,104,146, 88, 44, 30, 40, 22,139, 23,136,197, 98,215,235,215,175,163,111,223,190, 16, 10,133,112,119,119, 71,113, +113, 49,220,220,220, 68,199,142, 29,243, 60,124,248,240,129, 23, 95,124,177, 55,128,171, 0,196,230,234, 32, 57, 57,185,149,179, + 98,216,111, 49,229, 20, 69, 33, 51, 51,211,234,253,183,117,235, 86,179, 54, 12,203, 9, 33,136,139,139,227, 84,161, 57, 57, 57, +118,125,191, 45,113,234,212,169,200,240,240,240,124, 71,216,186,117,235, 22,161,105, 26, 16, 84, 65,221,168,130,216, 89, 2,208, +158, 16, 8, 4,232,214,173, 27, 53,216, 56,114,105, 33, 25,206,195, 15, 63, 76, 54,111,222, 12,115,246,102,206,156,137,131, 7, + 15, 82,182,158, 31, 0,148,223, 58, 79, 12,207,207,158,107,183, 37,154, 96, 46, 13, 48, 43, 1,192,150,252,217, 34, 53, 53,213, +234, 49,108,136,203, 28,249,175, 88,177, 2, 75,151, 46,109, 81,110,171, 8, 72, 30,150, 73,208, 37, 4,153, 63, 69, 82,134, 30, +127,116,116, 52, 5, 0,204,107,113,113, 49, 97, 67,214,150,200,191, 41, 50, 96,213,107,103,194,244,134, 30,190,241,208,130, 45, +246, 44,121,248, 75,102,178,223, 41,206, 71,249, 10,233,251,144, 16, 46,206, 20, 30,242, 23,226,118, 37, 13,141, 86,136, 59, 85, + 4,213,117, 4,197,191,211,128, 0,240,113, 61,131,188,188,188,200,168,168, 40,139,157,194,213,107, 31, 68,134, 6, 7,225,240, +205, 91,232, 19,208, 21, 3, 7, 7, 66,232,236,141,135,250, 84,162, 82,169, 66,197, 77, 29,126,191,165,130,171,168, 20,121,121, +238, 86,237,181, 17,230, 60,181,120,177,184,180,187, 63,156,135, 13, 23,168, 14,236,159, 3,224, 43, 27,236, 48,158,248,156,167, + 95, 90, 36,254, 93,236, 7,183,144, 8, 65, 77,225, 65, 91,237, 1,192,156, 23, 23,190, 44,134,179, 59,250,244, 11, 19, 92, 56, +123,194, 30, 91,142, 4,205, 60, 35, 20, 69, 65, 34,145, 72, 1, 40,140,239,137, 97,195,134,177, 34,127, 0,112,114,114,242,148, + 72, 36,115,111,223,190,237, 26, 18, 18,130,161, 67,135, 66, 36, 18,225,147, 79, 62,129, 78,167,195,160, 65,131,240,227,143, 63, +226,216,177, 99, 56,115,230, 12,132, 66,225,103, 58,157,110,170, 37,155, 83,167, 78,109,238,231,172,245,131,108, 8, 87, 46,151, + 75,253,252,252, 20,132, 16,139, 14,208,205,155, 55, 57,239,149,193,216,182,245,251, 12, 81,159, 63,127,222, 98,191, 17, 26, 26, + 42,229, 74,230,231,207,159, 87, 84, 87, 87,195,195,195, 67,106,143, 16, 56,113,242, 16,121,235,157,249,232,212,201,165,213,103, +245,245, 74,228,252,120, 26,103,228,114,106, 74,247,238,228,122, 98,162,249,190,253,192,106,125, 99, 30, 88,141,238,147,226, 33, +137, 24, 14, 93, 72, 88,203,240,217,119, 27,224,245,254,116, 12, 48, 24, 42, 82, 62,250, 60, 62,183,114,126,203,210,230,193,187, +139,171,190,224,141,143,144,178,232, 25, 0,192,221, 59, 13,120, 47,125, 45,137, 24, 58,214,102, 17,224,232, 33, 5,139, 2,128, +241,216,173,121,234, 29, 5,165,165,165, 88,186,116,169, 77, 2,194, 18,244,158,126, 50,181,103,207, 30,146,149, 57, 18, 16, 43, + 9,155,177,127, 83,100,109, 76,202,150,134, 5,204,193, 80, 80, 28, 57,114, 68, 49,122,244,232, 22,161,127,174,246,254,187,216, +205,108,231, 54,103, 85, 61,107, 59, 52, 77, 71, 58,187, 82, 16, 8, 0, 87, 23,160,170,134, 70, 35, 33,232,228, 66, 65, 69, 3, +202, 70,130,158, 93, 5,160,181,192,165,235, 58,148,150,150, 42, 96, 33, 61,237,185,162, 31, 34, 7, 14,236,175, 16,139, 9, 94, +152, 59, 10, 58, 29,193,205, 10, 53,174,221,168, 2,156,174,195,197,171, 17,229, 21, 87, 32, 16, 87,227,220,185, 42,120,120, 89, +182,215, 86,112,246,246,126,227,241,191,253,205,249, 53, 26,240, 90,154,230,118,235,244,169,215,109, 36, 89, 2, 0, 18, 15,239, + 55,254,239,201,191, 57,175,186,172, 67,207,217,169,110, 23, 74,207,152,178,103,117, 71, 54,153, 76,134,206, 30,158,111,204,121, +242, 41,231, 51,215, 42,145,248, 68,178,219,191,223, 73,177,245,220,204, 70,242,204,149, 91, 17,222, 58,230, 25,137,143,143, 71, + 84, 84, 84,126, 86, 86, 22,148, 74,101,115, 27, 50,158,127,124,124, 60,171, 54,117,118,118, 30, 91, 95, 95,223, 63, 52, 52, 20, + 82,169, 20, 41, 41, 41,120,238,185,231,244,157,185, 70,131,245,235,215,163,160,160, 0, 39, 78,156,192,247,223,127, 15,165, 82, + 25, 76,211,116,172, 37,155, 83,166, 76,113,232,253,180, 99,199, 14, 86, 67,115, 20, 69, 41,184,134,240, 13,109,219,242,253,166, +208,112,126,117,117, 53,202,202,202, 76,126,238,239,239, 15, 91, 9,188,172,172, 12,101,101,101,118, 9,129, 51,167, 47,226,155, + 13,219, 49,126,252, 88,132, 13,234,209, 92, 94,116,246, 6, 14, 28, 56,132, 31, 55,255, 76,178, 94,125, 21,215, 19, 19,225, 50, +110, 28,148,191,252, 98,210, 78,230,248, 20, 10, 0, 46,109, 88, 67, 6, 87,236,198, 83,123,183, 67, 23, 18, 6,229,162,229, 0, + 0,151, 85,203,225,118,177, 8,139, 75,197,232,251,244,130,123,245, 88,127,239, 57,181,116,126, 81,209,227, 90,157, 95,222,158, + 95,112,230,244, 69, 68, 12, 29,107,243,253, 99,203,144,130, 97,184,223, 82, 52, 64,196,213, 99,119, 52,209,218,139,172,172, 44, +187,190,159,156, 41, 35,232, 14,100, 38,232, 59,174,204,130,228, 22, 97,126,189,199, 95, 77,140, 35, 1,108,201,186,162,162,162, + 5, 57,219, 66,214,108,193,136, 14,153, 76, 70,172,229,131,182,228,217, 48, 96,194,255,230,236, 17, 66,200,237,115,175,160,123, + 83,232,191, 89, 49,235, 8, 84,106, 64,211, 84,166,209, 18, 16,129,254,253,217, 51, 5,204, 42, 1,147,112,119,175, 86,212, 43, + 5,240,241,246, 68,213,221, 6, 84, 85, 87,225,200,241,155,184,113,139, 64,220,169, 1, 61,130,235,160,108,184,141,190,131, 53, +232, 29,218,136,239,191, 40,192,238,221,187, 35,239,227, 45, 39,144,201,100, 81, 51, 95, 72,238, 86,230,225,133, 18, 45,224, 18, + 53, 25, 2,175, 46, 62, 50,153,108,178, 92, 46,255,201,128,172,157, 96, 48,238,109,174,223,151,201,100,209, 73,115, 95,232,246, +135,192, 3, 87,235, 52,240,140,136,130,200,221,203,216, 30,192,110, 2, 91,204,180,233, 51,186, 17,161, 51,170,235, 27, 49,112, +216, 24,184,117,246, 48,101,171, 93,192,120,255, 20, 69, 97,219,182,109, 36, 62, 62, 30,219,183,111,135,139,139, 75,100,106,106, +170,130, 11,249, 3,112,174,170,170,122, 90,163,209, 8, 92, 93, 93, 49, 97,194, 4,172, 90,181, 10, 78, 78, 78,144,201,100,216, +176, 97, 3, 10, 10, 10,112,228,200, 17,252,252,243,207, 56,123,246, 44,124,124,124,124,180, 90,237, 67,176, 50, 4,146,156,156, + 76,172, 13, 1,124,241,197, 23,172,206,179, 45,135, 0,182,110,221,234,144, 33, 0, 15, 15, 15,105, 89, 89,153,194,220,103,246, +182,187, 45, 66, 64, 90, 82, 66,238,172, 92,137, 15, 0,224,240, 97,220,157, 25,135,213, 67, 66,154, 67,246, 97, 3, 6, 96,214, +236, 41,232, 93,121, 27,215, 19, 19,209,101,201, 18, 40,130,130,168,193,191,252, 98,241, 57, 17, 75, 31, 70, 72,108, 36, 22, 47, +121, 23,255, 66, 17, 86,143,158,132,129, 35, 70, 33,248,110, 41,214,123, 14, 69,169,199, 45, 12,146, 72,136, 74,165, 98,213,190, +210, 73, 67,240,212,211,241, 56,250,235, 89,236,206,253, 9,111, 2, 88,189,106, 29,194, 6, 12,192, 83, 79,199,163, 65,121, 7, + 18, 14,246,140, 97,239, 28, 0, 78, 17,128, 7, 9,114,185,156,114,196,172,117,134,220,179,150, 94, 6,132, 98, 36, 79,238, 13, +120,246, 70,102,211,130, 37,182, 99,255,142,134,225,181, 49,147,254, 12, 61,127, 99, 48,115, 3,204, 77, 6,180,101, 39,194,141, +139, 58,153,141, 8,184,215,164,224,138,154,224,230,109, 26,128, 0,110,174,250, 16,167, 70, 75,160,106, 4, 84,106, 64,213, 8, +168, 53,128, 74, 9,168, 27,239, 69, 73, 76, 9, 10, 55,237, 43,228,198,181, 0,244,234,227, 6,226, 36,194,109,165, 18,138,125, +215,113,174,248, 6,238,222,173, 67,216, 48, 29,234, 85, 90,168, 26,117, 80, 54,208,184,121, 13, 80,214, 3, 91,182,108, 81,112, +217, 0,195,206, 54,161,133,158,158,111, 60,243,234,171,146,239, 13, 40,196,235,213, 52,183,187, 75, 23,189, 14,224, 39, 3,178, + 86,179, 48, 73, 68,110,158,111, 60,247,242, 82,201,174, 27,186,230,194,158,143, 47,117,187,250,229,171,134,246, 88, 69, 1, 92, +221,220, 95,127,233,149, 69,146,146,178,123,187, 69, 38, 60,145,236,246, 93,230,106, 83,182, 56, 61,107,166,238, 37,142,207, 26, + 97,188,127,137, 68, 34,141,138,138,202,103,150,140, 42,149, 74, 69, 65, 65, 1, 21, 31, 31,207,214,150, 22, 64, 48, 0, 58, 60, + 60,156,150, 72, 36,130, 13, 27, 54,224,217,103,159,197,251,239,191, 15, 66, 8,126,253,245, 87,236,219,183, 15,103,206,156, 65, +117,117, 53,250,246,237,139,154,154, 26, 87,129, 64,224,107,205,248,180,105,211,204,138,100,102,104, 96,202,148, 41,156,194,244, + 29,117, 8,192, 82, 20,192, 30,239,223, 94, 33, 80, 89, 85,213,252,222, 55,109, 30, 6,166,205,199,120,163, 99, 46, 63,250, 28, +122,238, 63,142,146, 69, 47,224, 87,127,127,184, 0, 56, 35,151, 83, 48,177, 44, 78,169, 84,146,158, 61, 59,227,234, 53, 32, 44, + 34, 20, 88,249, 26, 94,254,114, 11,230, 6,157,198,144,198, 98, 44,190, 37,198, 59, 27,151,225,253,244,207,113,230,236, 65,244, +234, 25, 70, 92, 92,204, 71,125, 13,237,121,119,113,197,163,113,163,240,104,220, 40,188, 69,127, 4,117,227, 82,156, 60, 9,156, + 60, 9, 28, 56, 16,143,127,175,185,136,184,184, 88, 18, 16,240, 16,130,130,190,225,196, 79,121, 15,191,134,146,131, 34, 43,125, +247,231,127, 13, 1, 32,147,201, 72, 82, 82,146,148, 25, 51, 52, 22, 1,134, 29, 18, 51, 30,111,235,124, 0,134,244,163,163,163, + 41,253, 48,128, 24,153, 27,239,239,245, 50,179,254,163,162,162,168,188,188, 60, 98, 45, 26, 98,109,217,161, 37, 66,231, 58, 28, +240,244,171,245,240,239, 38,192, 19, 9, 98,168, 26, 1, 15,119, 10, 2,170,201,235, 7,129,170, 1,168, 87, 19,212, 43, 9,234, + 85, 4, 52, 1, 4, 22,230, 92, 63,189,176, 30,131,134,148,194,175,255, 93,236,217, 85,129,187,119, 85, 8, 31, 83,131,193,222, +117,128, 83, 35, 84, 13, 52, 42,110, 16,212,215, 83,208,106, 41,120,251, 80, 0,117,223,231,178,133, 13, 29, 50,100,184, 87, 64, + 0, 14,233, 12,196,203, 19, 79,226,110,106,202, 48,153, 76, 54, 64, 46,151,159,227,112, 63,135,142, 24, 55,113,120, 23,255, 0, + 28, 63,218, 60, 71, 14, 93,165,255,135,171, 95, 44, 53,101,207,210, 86,216, 3,198,141, 27, 63,220,223,191, 39,206,157,184,220, + 92, 62,238,145, 41,248,159,124, 21,231,115,107, 3, 52,159, 59,243,252, 50,195, 0, 12,182,111,223,222,106,254,145,137,185, 0, + 76,163, 7, 3, 56,181,100,201,146,177, 34,145,200,237,235,175,191,198,186,117,235,240,204, 51,207, 96,197,138, 21,160, 40, 10, + 87,174, 92,129, 82,169, 68,106,106, 42,180, 90, 45,230,205,155, 71, 83, 20,101,245, 1,112,228,108,250,142, 62, 4, 96, 41, 10, +224, 8,239,223, 86,108,216,176, 1,127, 75,158,133,234,170, 70, 32,125, 45,234, 15, 28, 71,167,241,195,155, 63,175, 72, 95,139, + 34,103,103, 80,255,120, 30, 3,103, 63,138,195,235,119, 97,240,224, 17,102,237, 93,186, 84,136, 49,227, 98, 81, 88,228,133,181, +159,101, 97,252,248,177,120,231,211,101,120, 43,106, 14,190, 5,208,255,169,103,177,246,179, 44,136,197, 94,152, 58,109, 56,190, +230, 96,239,227, 15, 54, 97, 68,252, 32,188, 59,104, 21, 10,167,184,193, 43,225,199, 22,199,250,184, 74,112, 52, 95,129,128,191, +205,229, 92, 15, 7, 15,138,176,114,165,139, 21, 1,247, 23,138, 0, 24,143, 35,155, 35,248,166,227, 88, 35,179, 64, 63, 67, 93, + 79,252,151,144,245,201,101,232, 87, 1,180, 20, 5,108,134, 1, 28, 29,214,207,203,203, 35,134,222, 63, 19, 17, 48,252, 63, 41, + 41, 9, 76,178, 28,115,137, 33,184,144, 63,179, 10,192,156, 61,173, 14,168,111, 32,104, 84,235, 39,251, 53,170, 9, 68,206,247, + 62, 83, 53, 0, 74, 13,193,157,187, 4,127, 84, 18,156, 56,167, 5, 77, 3, 73, 73, 73,210, 75,151, 46,181,106, 27,173, 22, 40, +187,174,198,245,146, 74, 28, 60, 92, 9, 66, 40,156,251,141, 70,252, 19, 90,136, 69, 4,127,220, 2, 14,254, 4,212,212, 16, 16, + 26,120,120, 18, 5,137, 4,136,141,157,138,171, 87,175,178,186,166,236,245, 50, 50,109,174,237,171, 68, 4,110,157, 95,125, 97, + 69,134, 83, 14, 17,180, 96, 98, 31,103,103, 56,253, 99,161,211,149, 53, 31, 45, 3,240, 36, 91,123, 66, 23,183,101,243, 95, 95, +225,244, 83, 25,105, 97,175, 75, 39,103, 12,156,253,162,211,185, 77,159, 24,219, 51, 27, 1,144,184,116, 90,182,244,141,229, 78, +151,111, 86,183, 56,160,179,123, 39, 76,127,226, 25,167,156,255,126,197,233,220,218, 42,106,103,170, 44, 34, 34,130,156, 56,113, + 2,219,182,109,107,245,157,132,132, 4,147, 77, 1,160, 16,192,169,213,171, 87, 15,241,244,244,116, 99,194,224, 95,125,245, 21, +158,125,246, 89,172, 91,183,174,217,139, 95,189,122, 53,170,170,170, 80, 83, 83, 83,215,208,208, 80,218, 20, 65, 16, 91, 58,215, + 23, 94,120,129, 24,135,232, 25,239,159,109,248,255, 65, 25, 2, 48, 21, 5,112,180,247,207,216,100, 59, 4,112,110,204, 24, 80, + 47,204,134, 39, 0, 50,105, 24, 26, 78, 20,162, 62,125,237,189,122, 75,158,133,190, 79,205,130, 68,162,191,254,162,162, 98,139, +132, 93, 84, 84, 12, 0,136,141,211,139,136,130,227,103,240,237, 55,223,193,117,212, 72, 52,104,180, 80, 67,141, 9, 19,135,182, + 56,158,173,189,235, 58, 53,158,232,246, 34,232, 19,141, 72,250,215, 36,136, 31, 59,130, 1, 97, 3, 16, 54, 48,184,249,252, 82, + 23,175, 65, 80,144,144,245,125,243,200,255, 61, 18,117, 14,231,246,224,127,223, 80,214,166, 0,124,254, 57,218, 38, 17, 80, 71, + 68, 65, 65,129,213,217,228,121,121,121,145,172,151, 20, 58,119, 66, 86,239,253,128,182,128,160, 79, 39, 36,167,247, 65,102,126, + 60, 5,100,146,123,130, 32,218,230, 97, 0,227,165,128,230,150, 6,154,235, 44,101, 50, 89, 51,249, 27, 79, 0,100, 66,234, 76, +153,165, 8,128,161, 61, 71,117,230, 59,119,238,140,188, 81,190, 75, 65,119,165, 33, 16, 1, 78, 2,253,253,173,161, 9,180, 90, +160,182,150, 64,173, 1,180, 26,189, 40,152, 58, 77, 31,189,185,116,233,146, 89,123,141,183,119, 42,194,194,104, 28,216,167, 3, + 37, 0,254,184, 73, 65,226, 2,236,219, 13,168,149, 20, 40, 2, 12,142,112, 66,217, 53, 26, 19, 39, 78, 65, 92, 92, 28,197, 38, + 19, 86,246,122, 25, 89,249, 34,176,228, 83,219, 69, 0,161,117, 49,186, 46, 62,130, 93,244, 61, 22,234, 6,192,143, 2,148,195, +134,137, 46,107,117, 49,156,236, 17, 58, 6,238,222, 2,197, 77, 93,179,189,174, 18,192, 71, 66,193,117,208, 48, 81,209,119,116, +140, 57, 47,218,148,173, 78,238,158,130,171,183,170,154,136, 5,112,119,113,134,187,171, 24, 17,225, 67, 69, 91,190, 37, 49,237, +252,232,154,172,115,102,214,127,124,124,124,243, 61,202, 68,239,102,206,156,105,201, 3,173, 3,112,249,228,201,147,117,227,199, +143,239, 10,131, 53,253, 95,125,245, 85, 51,201,106, 52, 26,232,116, 58, 92,186,116, 9, 93,187,118,189, 77,211, 52, 43,181, 56, +109,218, 52,179, 67, 0, 92,136,246, 65, 24, 2, 48, 21, 5,112,164,247,207,133,248, 25,116,247,247,196, 23, 95,236, 69, 98,194, + 24,116, 27, 22, 6, 12, 11, 3,245,194,236,150,162, 23,192,173,155, 74,108,221,118, 24,221,253, 61,217,219,243,115,193,176,225, +125, 49,108,120,223, 86,199,113,181, 55, 97, 70, 40,210, 38,126, 2,186, 80, 79,254,207, 45,126,218, 38,123,198,120,213,253,213, + 61,239,215,190, 31, 93,142,242, 54,123, 32,237, 18, 0, 5, 5, 5,247, 61,107, 31,227,229, 50, 68, 23, 21, 21, 69,153, 32,127, +194,132, 21,147,146,146,108,250, 29,195, 85, 0, 76, 25, 87,207,223,120, 2, 96, 19,154,203, 82, 82, 82, 20, 73, 73, 73,172, 31, + 50, 67,242, 55, 53, 39,128,171, 61,107, 88,185, 89, 5,107,246,226,226,226,242,151,165,110,197, 35,163,157, 64, 3,208,168,105, + 56,139,245,213, 84, 91, 79,208,168, 33,208,234,128,130, 66, 29,116, 52,129,181, 37,123,113,113,113,249,111,188,182, 21, 19, 35, +133,152, 62, 71,136,186, 90,130,218,106,160,190,150, 66,159,190, 4, 58, 13, 5,145, 64,130,170,187, 52,202,126, 87, 99,209,203, +236, 38,140,101,175,151,145,143, 22, 2, 33, 1,192,154, 87,128, 5, 31,216, 38, 2, 72, 67,253,140,127, 12, 27,186,211, 47,103, +167,155,215,184,135,209, 13, 64, 55, 10,208, 29, 58,136,188,167,159,172,211, 52,212, 79,231, 98,143, 86, 53, 76,127, 33,106,248, +174,208,183,178,221,124, 7,143,133,143, 51,133,174, 18, 10,202,243,191, 96,235,107,115,235, 52,202, 6,214,246, 26, 85,202,233, +113,143,140,223,149,146,254,153,219,128, 33,195,224,238, 42,134,187,139, 51, 74,206,157,194, 27,169, 47,213, 41, 57,216,178,197, +147,103,115,185,166,200,127,249,242,229,173,194,252, 63,252,240,131, 34, 33, 33, 1,102,146, 4, 49, 68,175, 6,112,170, 95,191, +126, 37, 42,149,170,135, 80, 40,148,184,186,234,151, 98,109,222,188, 25, 51,103,206,132, 82,169,132, 74,165, 66, 99, 99, 35,220, +220,220, 84, 58,157, 46,135, 16,114,147,205,201, 58,106, 53,192,131, 50, 4, 96, 24, 5, 96,222,183, 7,241, 51,232,211,199, 15, +175,166, 37, 99,247,174, 95,145,189,229, 4,156,197,157,241,123,217,189, 17,172,158,254, 3,208,168,174, 65,196,176,254,248,240, +163,100,188,159,254, 57, 39,123,190,190, 30, 40, 58, 87,212,252,121,216,128, 48, 84, 84, 84,115,178, 55,101,225,116,204, 20, 60, +137,198,194, 58,140, 94, 48, 16,244, 96, 9,190,248,226,251,230,243,171,174,174,198,216,135, 67, 89,217, 51, 70, 84,102, 20,245, + 51,126,110, 83, 62,181, 89, 0,180, 5,249,179,177, 25, 21, 21, 69,101,101,101,145, 38,111, 23, 89, 89, 89,196,112, 89,162,177, +215,111, 74, 32,180,142,195, 82,128, 88, 0,184, 8, 1, 55, 17,208, 88,139,172,247,157, 0,151,163, 36,249,177, 62,128,139, 55, + 50,191,225,238,245, 91,154,237,207,144, 53,219, 53,236,198,228,111, 60, 39,128,171, 61,182,228,207,198,222,123, 25,107,169, 87, + 22,206, 35, 18, 9, 64,211,192,160,126,194,123,237,113, 86, 7,141,142, 64, 71, 11, 49, 99,198, 12, 86,226,228,237,119,215, 82, +139, 22,205, 35, 90, 45,160,214, 16,232,180,128,128, 2, 34,167, 0,181, 85, 20,126, 59,173,132, 82, 37, 64, 98,194, 12,214, 97, +255,229,207, 1,193, 61,245,255, 7,245, 0,108,141, 4,200,229,242, 35, 50,153, 44,246,230,212,184, 93, 1, 91,119,186, 5,140, +123, 24,154, 67, 7,241, 99, 66, 92,157,186,182, 54, 86, 46,151, 31,228,104,239,160, 76, 38,139, 61,255,230,180, 93,254,255,202, +113,235, 49, 98, 28,234,207, 31,194,198,127, 76,173,107,108,224,102,143,177,181, 58,237,239,187,222,249,248, 75,183,209, 99,198, +162,184,232, 20, 94, 74,126,178,174,161,174,142,243,185,181, 53,204, 37,251,145,201,100, 36, 62, 62,158,205,106, 0,161,167,167, +231, 41,165, 82,249,109,105,105,105,239, 33, 67,134, 4,106,181, 90,145,147,147, 19,114,114,114, 16, 29, 29, 13,149, 74,133,134, +134, 6, 92,186,116,169,198,203,203,107,175, 82,169,252,154,166,233,122,176,204, 0,200, 36, 5, 98, 66,236, 92, 66,255, 15,218, + 16,128, 97, 20,192, 17,237,107, 75,238, 0, 83,120, 52,118, 20, 30,141, 29,213,244,159,253, 26,182,165,189,105,246,137, 59,207, + 31,208,120,186, 14, 79,127, 54, 5,239,236, 93,102,247,185, 41,159, 81, 18, 47,173, 23, 84,223,168,238,139, 99,109,147, 0,104, + 15,207,223,216,251, 48, 12, 99,155, 11,245, 59,242, 28,185,140,253, 59,154,252, 13,196,142, 97, 34, 32, 70, 4, 41,154, 34, 29, +156,236, 89,155, 11,192,213,222, 7, 31,175,165,100, 50, 25, 17, 8,128,131, 5,250,177,126,102,194,159,126,220,127, 6, 39,123, +171, 86,173,165,230,205,111,202, 73, 33,208,219, 56,186, 31,168,175,163, 65,104, 32, 49,113, 10, 98, 98, 98,172,182, 71,246,122, + 25, 73,125, 18,240,116, 3,202,110, 3, 46,206, 0, 77,128, 78, 18, 32, 93, 6,164,201,109, 18, 1, 7,101, 50, 89,108, 65, 98, +220, 46,143,229,111,187,229, 47,127,163,174,209, 6,242, 55,182,151,191,100,234, 46,151,127,188,233,150,251,239,183, 56,147,191, +161,173, 23, 95,124, 49,238,141,127,190,176,115, 65, 74,170,219,103, 31,102, 48,228,127,218,196,179,175,229, 98,219,218,208, 17, +215,231,205, 20,249,207,155, 55,143, 48, 43, 1,182,109,219, 70, 40,138,178, 36, 4,220,212,106,117,157, 64, 32,200,243,247,247, +239, 89, 91, 91,251,226,241,227,199,187, 15, 29, 58,148,214,106,181, 13,213,213,213,183, 78,159, 62,125,165, 79,159, 62, 37, 93, +186,116, 41, 85, 42,149,155,181, 90,237, 45, 66, 8,107, 1,192, 36, 5, 50,136, 10,216,210,190,210, 54,236, 11, 29,110,219, 81, +227,254,246,218, 81, 41,133, 14, 61,222,209,246,170, 42, 5,200,208,202, 16,120,216, 15,179, 63,181, 46, 76,170, 42, 5,120, 40, +192,242, 49,247,147,252,205, 10, 0,107,107,253,185, 62,232,108,115, 7,112,177, 43,151,203, 41,115,155,237,112, 33,175,204,100, +185, 62,204,127, 17,192, 69,227, 79,171,155,254, 46,195,134,235, 85, 56,138, 92, 13,235, 69, 38,147, 17, 38,207, 64, 74, 74,138, + 77, 43, 28,140,237,109, 92,212,169, 89, 20,216, 35,154,140,219,132,153,240,103,107, 84, 98,237,231, 45,237,213,213,232, 59,224, +196,196, 68,110,247,223,183, 14,125,102, 52,134,164,189,111,249,155, 27, 26,107,107,159,182,215,187,102,236,253,244,217, 91, 27, + 84, 13,181,115,229,114,249, 33, 91,109,125,250,233,167, 7,100, 50, 89,236,103, 31,173,220, 80, 87, 87,103,238,220,180,184,255, +104,209,163, 26,147,127, 94, 94, 94, 36, 33, 4,219,183,111, 55, 60,198,146,189,107,106,181,218,153, 16, 82, 75,211,180, 92,173, + 86,255, 26, 16, 16,224, 83, 85, 85, 69,189,254,250,235, 53,213,213,213,119,122,244,232, 81, 91, 87, 87, 87,175, 86,171,107, 52, + 26, 77,163, 78,167, 83,114, 57, 97, 7, 13, 3,228,183, 97,157,230,227, 79,138,126,253, 6, 83,111,190,150, 73,102, 61, 30,141, +176,129,125,204, 30, 87, 84,120, 25,155,190,219,131,126,253, 6, 83,247,211,222,144, 33, 67,168,212, 69,114, 50,235,241,104,203, + 14,243,241, 82,108,250,110, 15,134, 12, 25, 98,245, 94,186,159,228,111, 82, 0, 56,218,179,111,203, 72, 65, 84, 84, 84, 62,171, + 16,191, 21, 56,114, 86,255,253,136,140,112,217,244,199, 17,209, 0,174,109, 98,184,172,203,222, 33, 9, 99,123, 92,201,223,158, + 25,255,108, 72, 27, 64, 80, 71,180,231,232,115,115,208,189, 77, 1, 0, 69, 81, 68, 32, 16,128,249, 99, 66,216, 83,166, 76, 65, +108,108, 44,104,154, 6, 77,211, 32,132, 88,251, 61, 74,171,213,186, 18, 66,116, 52, 77, 55,106, 52,154,253, 66,161,144, 18, 8, + 4,206, 0,156,105,154,134, 78,167, 19,106,181, 90,177, 86,171,237,174,211,233,206, 27,124,183,205, 55, 1,226,225, 24, 17,112, +165, 84, 69,118,239,220,130,107, 21, 53,240,243,106,104,254,236,102,165, 43, 2,124, 59,163,127,255,254, 86,201,186,173,236, 13, + 25, 50,132,186, 89,214, 72,214,124,180, 3,197,191,223,110,101, 47,184,167, 15, 2, 3, 3, 89,145,127, 91,193, 82,142, 20, 42, + 60, 60,156,223, 30,147, 7, 15, 30, 15, 42, 26, 12, 8,157, 54,112,108, 68, 6,229,229, 0, 60,160,159, 52,206, 19, 63, 15, 30, +230, 34, 0, 60,120,240,224,241, 0, 65,210, 36, 2,104, 3,226, 23,224,222, 16,135, 8, 64,247,166,247, 52, 95, 93, 60,120,240, + 2,128, 7, 15, 30,127, 14, 8, 0,184, 25,252,207, 16,191,216,128,244,233,166,227,120,239,159, 7, 15, 94, 0,240,224,193,227, + 47,210,167,241,164,207,131,135, 5,245,204,131, 7, 15, 30, 60,120,240,248, 43,171,229,249,243,231, 27,110,164, 67, 12,103,216, +203,100, 50, 98,180,209,206,181,168,168,168,230, 85,141,166, 82,177, 26,218,227,138, 63,163, 61,227,101,139,134,245,201,215, 31, +223, 30, 29,221, 94,122,122,122,243, 49,105,105,105,148, 13,246, 0, 51,233,128,249,251,217,186, 77,254,249,229,237,113,177,199, + 89, 0,112, 68, 87, 54, 7, 49,187,247, 57, 74,177, 24, 39, 35, 49,181, 27,160,169, 99,218, 67, 93, 49, 4,147,148,148, 36,101, +136,134,201, 0,102, 41, 39,248,253,196,246,237,219, 35,183,109,219,214, 76,130, 83,166, 76,145, 38, 38, 38,230,255, 25,213,174, +169,246, 56,127, 94,191, 50, 44, 52, 52,180, 93,207, 77, 38,147,145,169,211,100,200,201,150,155,188,103,119,238, 58, 65,114,178, +229, 22,239,229,157,187, 78, 88,236, 4,226, 98, 35,108,190,233,210,211,211, 73, 66, 66, 80,139,255,173,137, 0,107,168,173,171, +141,220,250,211, 86, 4,134, 5, 42, 64, 1,231, 79,158,147,142, 9, 31,139,208,126,161,156,238,191, 67,135, 14,181,186,238,177, + 99,199, 82,224,193,131, 71,155, 9, 0, 49,219, 3, 71,143, 30,205,217,184,169,205, 98, 24,152, 34, 81,227,141, 54,216, 18,173, + 45, 27,227,176, 17, 20,140,221,212,212, 84,100,100,100, 40,204,237, 45,206, 28,103,105,173,166,241, 57,246,232,211, 11, 0,112, + 75,165,130, 86,217,168, 47,172,170, 1,160,223,251,128, 75,110, 4, 67,242, 7,244,185,197,185,172,181,151,201,100, 68, 64,233, +179,235, 49,175,128,136, 87,212,158, 0, 0, 14,255, 73, 68, 65, 84,229,247,159,175,189,255,130,204,184, 61, 24,226,183,181, 61, + 28, 41, 42, 25,242,143,139,141, 80, 1, 50, 73, 78,182,220,230,223, 96, 4,132,105, 1, 32,183,235, 60,213,234, 84,228,230, 38, + 35, 38, 38, 19, 9, 9, 25,205, 17, 1, 91,132,192,193,162,131,228,161,161,189,240,161,124, 21,188, 92,189, 64,107,117, 80,145, + 70,197,238, 95,127,138,217,187,239,103, 50, 54,112,156, 84, 34,145, 88, 21, 2,135, 14, 29, 34, 77,145,133, 86, 30, 17, 47, 2, +120,252,149,113,234,212,169, 22,255,155,234,211,236, 17, 0,156,230, 15,152,218,197,206, 17, 32, 64,164,221, 54, 8,123, 13,192, +198,115,151,201,100, 36, 53, 53, 21, 43, 86,172, 0,128,230, 87, 83,199, 89,219, 33,172, 21, 60, 59,227, 76,233,119,112, 65, 79, +232,240, 11, 42,254,115, 2,167, 75,238, 96,198,138,117,237,118,163,157, 57, 91,136,193,131, 6,130, 38, 64, 97,161,254, 61,112, +239,189, 97, 57,205,178,170, 13,115,176, 91, 66,102,102, 38,197,182, 61,230,206,157, 11, 0,205,175, 38,201,159,162, 0, 11,247, +131, 76, 38, 35,143, 60,178, 11, 50, 89,172, 67, 69, 64, 92,108, 68, 67,114,114,178, 43,144,137,156,108,110,196,110,232,225,219, + 75,242,230,188,127, 0,152, 57,115, 51,114,115,245,175,201,201, 37, 96, 34, 2, 92,162, 1,132,144, 72,197,133,189,138, 23,255, + 49, 31,195,187, 14,133,139,135, 7,136, 90, 11,154,232, 32, 20,137, 17, 28, 21,156,251,219,176, 11, 88,145,153,161, 24,229, 51, + 90,234,234,234,106, 85, 4,220,190,125,187,197,255, 83,198,119,194,168,133,191,224,241, 12, 85,139,134,156, 52,105,146,205,237, +149,157,157, 77,166, 77,155,230,176,246,118,180,189, 54, 38,146, 72,123,211,250,158, 58,117, 42,178,137,132,108,181, 51,248,149, + 87, 94, 41,175,175,175, 15, 0, 48, 25,250, 77, 56, 67, 1,156,130,126, 83, 40, 0,216, 40,151,203,127,227,169,191, 53,249, 51, +101,198, 34,160,133, 0, 40, 45, 45, 37,165,165,165, 0,128,192,192, 64, 24,110, 54, 3,160,197,255,166, 62, 55,135,138,138, 10, + 69, 86, 86, 22,235, 72,128,241, 94,247,150, 72,152,106, 74,133,105, 76,162, 92, 67,236,153,153,153, 86,143,201,203,203, 99, 69, +254, 73, 73, 73,102, 73,127,233,210,165,200,200,200,128,161, 64, 96,131, 30,125,122,225, 70,101, 53,126,156, 55, 19, 93,168,113, + 40,249, 98, 17, 2,167, 7, 98, 79, 59,147, 63,128,102,194, 7,128,129, 3, 7,182, 40,103, 34, 3,134,229,142,246,236, 45, 17, + 49,211, 30,230, 72,127,253,250,245,200,200,200, 64,236,184,161,216,245,203, 73,192,189, 19, 80, 83,119,223,235,112,231,174, 19, +174, 64, 38,118,238, 58,225, 16,123,211,106,150, 89,124, 54,179, 59,191,199,234, 1, 49, 12,253, 39, 39,231, 34, 33, 33,168,249, +149, 65, 66, 66, 16,107, 17,240,197,255,190,192,251,159,190,139,241,125, 35,161,107,108,132, 86,167, 5, 37,162, 0, 8, 65, 64, +227,214, 31,101, 8,237,218, 31,203,230, 45,195,187, 43,223, 85, 60, 50,208,122, 52,203,184,179,155,226,191,222, 36,225,239,221, +187,151,216, 34, 2,178,179,179,201,206,215,119, 33,238, 29, 56,132,180,179,179,179,201,202,149, 43,177,100,201,146, 14, 45, 2, + 78,157, 58, 21, 89, 93, 93,173, 40, 43, 43, 67,120,120,184, 93,231, 89, 93, 93,173,184,215,101,219,244,156,151, 2,152, 11,224, + 36,128,175, 1, 68, 3,120, 20,192,223, 13, 4,192,237, 63, 41,159, 83,176,176, 13,184, 69, 71, 42, 85,207, 49,153, 25, 75, 77, +126,222, 66, 0, 4, 6, 6, 82,129,129,129,205,100,111, 24, 74,206,202,202,106,241,191,241,231,151, 46, 93, 50,123,130,140,168, + 72, 73, 73, 81,164,166,166,194,120,163, 28,227,205,115,178,178,178,204,134, 96, 77,117,246,198,101,237,185, 81, 17, 0,108,218, +180,201, 44,241, 3,104, 65,254, 75,151, 46,101,101,243,247,210,107,168,223,242, 6,220,158,253, 24, 61,250,244, 66,183, 46, 46, + 40,221, 82,170, 39,127,207,206,250, 33, 0, 39, 33,231,115, 77, 72, 72,144, 26, 14, 3, 36, 36, 36,112,142,210,208, 4, 8,232, + 4,252,251, 73,224,249,245, 64, 87, 87,224,124,149,233,242,162, 74,142,119,190, 25, 33,199, 37,106,243,246,219,111,155, 37,126, + 0, 88, 57, 55, 30,107,118, 31,129, 95, 96,119,220,188,122,203,170,247, 15, 0,108,162, 0, 92,194,248,122, 15, 95,102,210,211, +103,198,246,185,222,215, 43,255,107,190,142, 66,230,193,134,123, 37,168,197,171, 58, 33, 24,226,109,197,172,191,223,160,108,192, +184,217, 99, 21,163,187,143, 66, 99,125, 61, 68,206,206, 16,137,238,117, 65,165,197,197,216,154,147,115,227,217,103,230,246,232, +237, 28,128,161, 19,195,163,126,205,253, 53,114,212,240, 81,156,188,198,244,157,115,177,111,223, 62, 60,246, 88,203,242, 73,147, + 38, 81, 92, 69, 0, 67,254,232,253, 33,118,190,254,178,221, 34, 32, 59, 59,155,124,244,209, 71, 8, 9, 9,193,154, 53,107,176, + 96,193,130, 14, 39, 2, 12,137,223, 81,246, 24, 91,118, 68, 19,164, 0, 38, 2, 88, 79, 8,169,163, 40,202, 15,192, 5, 0, 87, +229,114,185, 22,127,110, 16,142,245,221,130,252,153,247,153, 25, 75, 91, 69, 1,238, 75, 30,128,172,172, 44,102,236, 21,165,165, +165,240,245,245,109, 37, 16,152,178,138,138, 10, 86,121,238,173, 77, 6,228,210, 97,206,154, 53,171,237,164,155, 1,129,153,242, +250, 51, 50, 50, 32,151,203, 41,107,179, 56,149,184,134,186,233,163, 64,220, 23, 1, 81,175,163, 14,255, 3,254,163,247, 22, 73, +214, 34, 56,253,109, 13,180, 90,238,137,206,226,227,227,243, 89,108,187,106, 57,194,243, 21,240,214, 90,160, 87, 79,224,214,118, + 49, 54,124,169,198,220,239,204,151,115,186,243,137, 99, 51, 85, 27, 78,246, 43,207, 94, 1,247, 48, 9,220,250,254, 19,155, 86, + 60,143, 33, 3,253,208, 47,254, 93, 86,237,193,230,254,100, 59, 84,192,220,187,134,228, 47,151,203, 41,102,226,159, 77, 68,211, +249, 61,202, 22,146, 55, 5,117, 66,176,201,242, 92,163, 72,128, 53,148, 87,148, 99,114,210,100,184,119,246,130,142,210,226,192, +190,253,168,173,171, 67, 66, 98, 34,254,168,168,192, 15,155,127,196,115,207,204,237,225, 44,113,134,128, 56, 33, 38, 34, 38,239, +130, 98,141, 77, 94, 99,101,101,165,221,215,109, 72,254, 0,236, 22, 1,217,217,217,100,249,242,229, 8, 14,214,215,103, 80, 80, + 16, 58, 82, 36,192,209,196,111,194,251,103,222,219,114,173, 3,154,136,208,137,162, 40, 87, 0, 97, 0,206, 1,232, 33,147,201, +106, 0, 84,201,229,114, 62,173, 61, 71,220,183, 68, 64,190,190,190,210,164,164,164, 86, 67, 1, 71,142, 28, 81, 52,109,246,194, +121,142,128,185,201,128,150, 60, 71,115, 2,165, 45,192,120,247,230,194,253,108,189,127, 0,216,253,234,114, 36,188,255, 1,180, + 81,227, 32, 2,224,118,184, 24,123, 74,238, 0, 0,180, 81, 11,160, 57,235, 3,170,235,223, 57,147, 20,219, 40,139, 37,220,153, +246, 63, 44,120,230, 58, 46,206, 91,130,250,159,213,240,243,177, 92,238,136, 8,128, 45,226, 96,253,250,245,122, 53,156, 48, 1, + 71,202, 42,224, 62,196, 29, 55,114, 75, 0,137, 51,102, 46,248, 27,188,123,198,183,219,131,104,110,214,191,163,162, 90,150, 86, + 8, 88, 91, 29,144,155,156,139,152,204, 24,204,220, 12, 36,231,234,223,231, 38,231,114,142, 2,212,169,106,225,227,210, 5, 90, + 85, 3,136,128, 96,196,200,145,216,178,101,139,234,163, 15, 62,144,208,132, 96,206,147,115,224,221,197, 27, 13,117,117,208,234, +180,112,119,234, 12,141, 64, 99,211,245, 86, 85, 85,181, 88, 29,192,117, 66, 96, 43,242,103, 96,163, 8,200,206,206, 38,169,169, +169, 24, 57,114,100,139,242,129, 3, 7, 34, 61, 61, 29,105,105,105,237, 38, 2,218,138,248,141,189,127, 0, 40, 43, 43,179, 53, + 10,240, 43,244,227,253, 53,208,135,254, 39, 3,184, 4, 96, 48,128, 28, 0,235,208,180, 83,167,165,238, 4, 54,134,210,255, 18, + 2,192,152, 16,152, 61,231,217,124,110,105,214, 52, 3,102,120,129,153, 16,200,204, 13, 96,162, 3,129,129,129, 10,102,184,160, +189, 58, 94, 71,194,218, 88, 63,227,253,179,177, 53, 99,237,102,144,196, 62,184, 53, 38, 2, 93, 48, 14, 46, 51,215, 64, 91,254, + 7,224,217, 25,162, 59,255,195,246,143, 10, 0,161,144,243,181,219,178, 10,194, 24,167, 95,249, 63, 12, 15, 7, 2, 23, 20, 34, +204,237, 25, 92,120, 40, 9,248,247, 18,179,229,237, 21, 1,200,200,200,192,248, 17,253, 16, 53, 46, 4, 9,131,150, 96,245, 71, +159,227, 92,193, 13,204,155, 52, 28, 55,115,118,162,186,178,198, 33,247,131,169,161, 2,107,207,135, 37,111,223, 81,247,168, 57, +251,150, 38, 14,166,165,165, 81,233,233,233,100,230,230,150,130, 0, 0, 98, 50, 99, 32,222, 86,140,109,219, 74,154, 87, 2, 48, + 19, 6,189,189,189, 77,246,191, 52, 77, 67, 71, 3,132,214,194,217, 69,130, 39,159,122, 74,242,214,155,111,162, 91,183,110,116, + 15, 63, 63,129,170,190, 14, 58, 2, 16, 90, 7,154,182, 30,209, 26, 59,118, 44,245,195, 15, 63,144, 59,119,238,160,166,166,166, +133,112, 52, 92, 29,192,101, 85, 64,118,118, 54, 89,253,124, 17, 32, 9, 6,110,126,218,250, 0, 73, 48, 86, 63, 95,132,148,255, +176, 19, 1,217,217,217,100,234,212,169,210,129, 3, 7, 42,238,220,185,211,234,243,128,128, 0, 76,157, 58, 85,250, 32, 77, 12, +180,197,251,183, 39, 10, 32,151,203,243, 13,158,175,238, 0, 78, 3,152, 46,151,203,185,108,101,202,147,191, 37, 1, 96,148,232, +199, 90, 34,160, 22,159, 91, 10,153, 38, 37, 37,153,140, 2, 48,100,239,235,235, 43, 77, 77, 77, 85, 48, 99,178, 73, 73, 73, 22, +151, 1, 90,242, 14,185, 78,254,107,171,101,128,140,119,111,105, 50, 32, 23,148,252, 43, 25, 78, 51,215, 64, 89,118, 17,162,195, +107,160,217,188, 0, 84,220, 42,108,253,251, 99,184,186,245, 50, 18, 86,126, 13,136,218, 39,179,243,146, 44, 32,119,229, 22,132, + 93,141, 1,110,215, 99,113,244, 18,139,229,142,136, 0,216,234,253,231,108, 89, 14, 97,143, 1,112, 67, 8,174,237,203, 68, 45, + 69,112,244,226,117, 68, 21,222, 96,217,238,215,154,255,159, 53, 75,222,130,236, 1,224,231,159, 99, 77, 30,103,233,249,176, 22, +234,119,196,178, 67, 71,172, 16, 72,206,189, 71,252, 0, 90,121,254,204,132,193,109,219, 74, 76,126,223,221,197, 29,101,213,101, + 24,217,123, 20,148,141, 42, 64,169,130, 86,173,193,178,212, 84, 80, 2, 8, 26,234,235, 64,211, 58,104,117, 4,206, 34, 39,252, + 81,247, 7,156,116,214, 87, 27, 63,246,216, 99,205,117,115,232,208, 33,194,244, 55,134,171, 3,202,203,203, 89, 95,231,180,105, +211,168,148,255,128,172,126,190, 8,161,125, 90,255,254,249,203,106,164,252, 39, 12,108,201,122,218,180,105, 84,118,118, 54, 25, + 57,114, 36, 2, 2, 2, 90,125, 94, 88, 88,136,156,156, 28, 69,123,145,127,147, 55, 78,181,229,216,191, 33,236,136, 2, 48,152, + 12,253,228,239, 70,158,194, 29, 40, 0,218, 10,140,231, 15, 0,163, 71,143,150,102,101,101, 41,152,208,191, 25,113, 32,189,116, +233,146,130, 43, 9,219,218, 73, 58,122, 25,160,161,247,111,138,248, 25,161,195,229,124, 79,151,220,129,230,236, 91,184,133, 95, +224, 23,183, 10,168,174, 65, 73,230, 34, 4,205,255, 16, 55,215, 45, 2,156, 68,128,160,125, 50, 59, 95,171, 7, 66,125,167,179, + 46,111,143, 8, 64, 70, 70, 70,221,236,168, 81,229, 30,180, 87,175, 6, 56, 73, 54,127,184, 0,159,109, 63,133,197,143, 62,140, +185, 31,252, 23,143,189,247, 77,187, 76, 30,101, 4,104, 83, 30, 0,202, 94,113,106, 79,168,223, 82, 20, 32,185,201,179, 55, 38, +127, 67,239,223, 26,252,125,253,177,251, 64, 46,198,246, 26, 11,215, 78,110,160,105, 2, 1,209,130,166, 40, 16, 66,160, 35,128, +150, 38,208,106,181, 80, 86,215, 99,199,177, 29, 16,235,196,156, 39,165, 26,175, 10, 72, 91, 48, 14, 83,252, 75,145,121,140,189, + 13,115, 34,128, 43,249, 27,218, 75, 75, 75, 35, 43, 87,174, 68,247,238,221,239, 9,251,146, 18,100,100,100,160, 35,120,254,142, + 22, 2,166,188,127,123,162, 0, 77,207, 68, 36,128,135, 0,188,246, 23,152,252, 7, 0, 66, 0,186, 7, 90, 0, 24,207,250, 79, + 74, 74,106, 30,119, 55, 20, 7,134,239,237,241,224,109,233,200, 29,181, 12,208,156,247,111, 43,241, 51,152,177, 98, 29,126, 4, +240,232,251, 83, 64,178, 22,129,154,181, 26,167, 75,238,128,242,246, 66,241,239, 53,122,239, 95, 40,108,151, 59,212,220,122,127, +123,242, 0,176, 17, 92,108,197,193,250,245,235,213, 0,106,159,143, 28, 92,243,207, 85, 31,171, 95, 93,150,170,234,218,217,247, + 78,209,185,107,221,230,158,251,175, 91,123,175, 26, 49, 71,206,134, 67, 52,220, 87, 20,152,250, 13,251, 34, 0,166,200,159,241, +252, 1, 88,157, 16, 40,145, 72,168,115, 91,207, 39, 42,198,229,231, 36, 13,122, 12, 53,170, 26, 80, 2, 64,159, 82,132,134, 78, + 71, 64,107,181,232,228,236,142, 67,213, 39,113,233,112, 49,162, 35,162,243,237,174,220,146, 23, 0,112, 95, 6,216, 66, 4,116, +191,134,243,229, 1, 54,145,191,161,189, 37, 75,150,144, 53,107,214,192,211,211, 19,119,238,220,193,242,229,203,209,209,194,254, +142, 16, 2,230,188,127, 91,162, 0, 50,153,172, 27, 0,191,166, 27,101, 40,128, 20, 0, 37,127, 17, 39, 93,215,150,198,239, 75, + 30, 0,115, 17,129,213,171, 87, 75,141,133, 66, 82, 82,146,130,171, 61, 67, 34,232, 8, 41,118, 13,189,127,227,229,127,165,165, +165, 45,234,141, 75,214, 62, 70, 4, 76,127,255, 43,144,205,128,207, 92, 57,242,255,249, 24, 30,206,216, 8, 56, 57,161,147, 68, +220, 46,215,107,184,198,223,212,123, 27,243, 0,104, 1, 8,154,218, 86, 96,103,123,220,154, 29, 53,170,236,159,153,219,250, 44, +123,110,114,103,127,191, 72, 53,128, 51, 73, 73, 73, 30, 0,220,108,109,143,123, 36, 29, 75, 30,121,100,151, 65,248,159,219,247, + 45,121,240,134,233,129,217, 10,137,182, 72, 6,100, 14,198,164,207, 68, 4,204, 13,121, 60, 61,235,233,173,219,254,187, 13,186, +217,218, 51, 19,123, 77, 28,220,197,189, 11, 84, 26, 21, 8, 33, 16,139,196,168, 82, 54,224,200,239, 63, 99,253,183, 27, 32, 29, + 32,117, 72,226,176,244,157,115,177, 97,195, 6, 44, 90,196, 61, 7,192, 61, 17, 0,187,200,223,208,222,130, 5, 11,152, 60, 0, +232,200, 99,254,134, 66,192,150,239,218,155, 59,192,240, 49,128,126,189,191, 10,192, 43, 0,142,201,229,114, 29,120,152,171,123, +156, 58,117, 10,153, 25, 75, 91,229, 1,176,152, 8,168,173,242, 0,152,138, 8,152, 35,122, 91,162, 0,246,162,173,150, 1, 50, + 98, 68, 46,151, 35, 47, 47,143, 46, 45, 45, 53, 36, 50,105, 84, 84, 20,103,239,102,198,138,117,128, 65,226,159,137,203,214, 54, +191,175,111,135,155,173,173,188,103,138,162, 62, 2,112, 23,250,229, 63, 79,218,105,238,230,243,145,131, 27,163,243,126,237, 60, +231,205,175, 33,151,203,197,121,121,121,221,209, 50,157,181, 77,237,209,214,145, 0,107,249,253,173,161, 45,134, 4,204,145,191, + 58, 33, 24,216,102,221, 49,147, 14,158, 68,237,251,225, 0, 57, 28,112, 4,227, 70,141, 67, 15,247, 30, 0, 77,240,135,234, 14, + 14,157, 56,132,155, 69, 55, 49, 41,116,146,212,217,217,185,221,219,195, 80, 4, 56,138,172,153, 72,192,131, 50,225,207,222, 44, +128, 14,232, 99, 50, 1,100,130, 7,103,152, 75, 0,100, 82, 0,180, 21, 82, 82, 82, 76,146,189,225, 78,108, 70, 80,176, 89, 85, +224, 40,175,191, 45,150, 1, 54,205,240,215,230,229,229,137,154,134, 14, 24,242,159, 20, 21, 21,197, 41,202,209,180,153,146,194, +209,231,104,110,140,217,209,185,238, 57,194, 25,128, 72, 46,151,191,110, 16, 2,123,202, 94,155,209,175,125, 81, 32,151,203, 39, +228,229,229, 33, 47, 47, 79, 5, 64,210,244,103, 55,241, 51, 81, 0, 91,235,204, 26,201, 79,157, 38,107,113, 28, 87,226,118,196, +144, 64, 90, 90, 26,149,158,156, 78,252, 23,248, 75,209,219,244, 49,101,201,185, 10,182,243, 1, 70,134,141,164, 26, 26, 26, 34, +215,189,191, 14, 1,193, 15, 41, 0,224, 66,225,111,210,248,232, 4,132,134,135,218,220, 30, 99,199,142,165, 54,111,222,220,106, + 85,128, 70,163,177,235, 6,114, 52, 89,255,217,102,251,119, 0,240, 75,252, 76, 68, 1,140,203, 88, 11, 0,107,158, 56, 91, 79, +221,214, 78,145,109, 34, 22,123,137,202,209, 68,199,216,203,203,203, 35,121,121,121, 34,195,250, 10, 12, 12,180,233,183,154, 8, +202,225, 29, 70, 71, 24,251, 54, 1,119, 0,117,250,132,252, 20, 5,192, 5,214,215,247,178,105,143, 43,121,121,121,204,186,178, +154,192,192,192,174,129,129,129,206, 29,161, 46,237,245,196,173,217,118,212,144,128, 85,114, 79,227,118,143,186,186,186,230,207, +154, 58,155,233,188, 49, 58,108,180, 67,206,115,230,204,153, 60,185,254,249,201,222,144,195, 52, 14, 38,127, 9,244,195, 13, 15, +188, 8,176, 90,145,225,225,225,188,106,226,193,131, 7, 15, 30, 60,254, 98, 16,240, 85,192,131, 7, 15, 30, 60,120,240, 2,128, + 7, 15, 30, 60,120,240,224,241, 23,192,255, 3,211,238,250, 72,118, 88, 93,170, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, + 0}; diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 82fcdd23c1f..1ada2729289 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -5071,6 +5071,18 @@ static char *ndof_pup(void) } +static char *snapmode_pup(void) +{ + static char string[512]; + char *str = string; + + str += sprintf(str, "%s", "Snap Mode: %t"); + str += sprintf(str, "%s", "|Vertex%x0"); + str += sprintf(str, "%s", "|Edge%x1"); + str += sprintf(str, "%s", "|Face%x2"); + return string; +} + static char *propfalloff_pup(void) { static char string[512]; @@ -5698,6 +5710,10 @@ void view3d_buttons(void) if (G.scene->snap_flag & SCE_SNAP) { uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Use Snap or Grid (Shift Tab)"); xco+= XIC; + uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target"); + xco+= XIC; + uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_VERTEXSEL, snapmode_pup(), xco,0,XIC+10,YIC, &(G.scene->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode"); + xco+= XIC; uiDefButS(block, MENU, B_NOP, "Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,0,70,YIC, &G.scene->snap_target, 0, 0, 0, 0, "Snap Target Mode"); xco+= 70; } else { diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 553b0993e5b..4270ce6a069 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2412,18 +2412,19 @@ void initRotation(TransInfo *t) t->flag |= T_NO_CONSTRAINT; } -static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3]) { +static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short around) { float vec[3], totmat[3][3], smat[3][3]; float eul[3], fmat[3][3], quat[4]; float *center = t->center; /* local constraint shouldn't alter center */ - if (t->around == V3D_LOCAL) { + if (around == V3D_LOCAL) { if (t->flag & (T_OBJECT|T_POSE)) { center = td->center; } else { - if(G.vd->around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { + /* !TODO! Make this if not rely on G */ + if(around==V3D_LOCAL && (G.scene->selectmode & SCE_SELECT_FACE)) { center = td->center; } } @@ -2627,7 +2628,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) VecRotToMat3(axis, angle * td->factor, mat); } - ElementRotation(t, td, mat); + ElementRotation(t, td, mat, t->around); } } @@ -2746,7 +2747,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a Mat3MulMat3(mat, smat, totmat); } - ElementRotation(t, td, mat); + ElementRotation(t, td, mat, t->around); } } @@ -2921,6 +2922,36 @@ static void applyTranslation(TransInfo *t, float vec[3]) { if (td->flag & TD_SKIP) continue; + /* handle snapping rotation before doing the translation */ + if (usingSnappingNormal(t)) + { + if (validSnappingNormal(t)) + { + float *original_normal = td->axismtx[2]; + float axis[3]; + float quat[4]; + float mat[3][3]; + float angle; + + Crossf(axis, original_normal, t->tsnap.snapNormal); + angle = saacos(Inpf(original_normal, t->tsnap.snapNormal)); + + AxisAngleToQuat(quat, axis, angle); + + QuatToMat3(quat, mat); + + ElementRotation(t, td, mat, V3D_LOCAL); + } + else + { + float mat[3][3]; + + Mat3One(mat); + + ElementRotation(t, td, mat, V3D_LOCAL); + } + } + if (t->con.applyVec) { float pvec[3]; t->con.applyVec(t, td, vec, tvec, pvec); @@ -4135,7 +4166,7 @@ int Align(TransInfo *t, short mval[2]) Mat3MulMat3(mat, t->spacemtx, invmat); - ElementRotation(t, td, mat); + ElementRotation(t, td, mat, t->around); } /* restoring original center */ diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 8154929eb17..eaa4a1d0ecf 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -113,7 +113,6 @@ extern TransInfo Trans; /* From transform.c */ /* ************************** Functions *************************** */ - void getViewVector(float coord[3], float vec[3]) { TransInfo *t = BIF_GetTransInfo(); diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 0e69e823d92..83940fa3729 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -55,11 +55,13 @@ #include "BIF_screen.h" #include "BIF_editsima.h" #include "BIF_drawimage.h" +#include "BIF_editmesh.h" #include "BKE_global.h" #include "BKE_utildefines.h" #include "BKE_DerivedMesh.h" #include "BKE_object.h" +#include "BKE_anim.h" /* for duplis */ #include "BSE_view.h" @@ -92,7 +94,8 @@ float ResizeBetween(TransInfo *t, float p1[3], float p2[3]); /* Modes */ #define NOT_SELECTED 0 #define NOT_ACTIVE 1 -int findNearestVertFromObjects(int *dist, float *loc, int mode); +int snapObjects(int *dist, float *loc, float *no, int mode); + /****************** IMPLEMENTATIONS *********************/ @@ -131,6 +134,15 @@ void drawSnapping(TransInfo *t) glTranslatef(t->tsnap.snapPoint[0], t->tsnap.snapPoint[1], t->tsnap.snapPoint[2]); + /* draw normal if needed */ + if (usingSnappingNormal(t) && validSnappingNormal(t)) + { + glBegin(GL_LINES); + glVertex3f(0, 0, 0); + glVertex3f(t->tsnap.snapNormal[0], t->tsnap.snapNormal[1], t->tsnap.snapNormal[2]); + glEnd(); + } + /* sets view screen aligned */ glRotatef( -360.0f*saacos(G.vd->viewquat[0])/(float)M_PI, G.vd->viewquat[1], G.vd->viewquat[2], G.vd->viewquat[3]); @@ -201,7 +213,8 @@ void applySnapping(TransInfo *t, float *vec) double current = PIL_check_seconds_timer(); // Time base quirky code to go around findnearest slowness - if (current - t->tsnap.last >= 0.25) + /* !TODO! add exception for object mode, no need to slow it down then */ + if (current - t->tsnap.last >= 0.1) { t->tsnap.calcSnap(t, vec); t->tsnap.targetSnap(t); @@ -222,6 +235,35 @@ void resetSnapping(TransInfo *t) t->tsnap.modeTarget = 0; t->tsnap.last = 0; t->tsnap.applySnap = NULL; + + t->tsnap.snapNormal[0] = 0; + t->tsnap.snapNormal[1] = 0; + t->tsnap.snapNormal[2] = 0; +} + +int usingSnappingNormal(TransInfo *t) +{ + if (G.scene->snap_flag & SCE_SNAP_ROTATE) + { + return 1; + } + else + { + return 0; + } +} + +int validSnappingNormal(TransInfo *t) +{ + if ((t->tsnap.status & (POINT_INIT|TARGET_INIT)) == (POINT_INIT|TARGET_INIT)) + { + if (Inpf(t->tsnap.snapNormal, t->tsnap.snapNormal) > 0) + { + return 1; + } + } + + return 0; } void initSnapping(TransInfo *t) @@ -445,14 +487,26 @@ void CalcSnapGeometry(TransInfo *t, float *vec) if (t->spacetype == SPACE_VIEW3D) { float vec[3]; + float no[3]; int found = 0; int dist = 40; // Use a user defined value here - found = findNearestVertFromObjects(&dist, vec, NOT_SELECTED); + found = snapObjects(&dist, vec, no, NOT_SELECTED); if (found == 1) { - VECCOPY(t->tsnap.snapPoint, vec); + float tangent[3]; + VecSubf(tangent, vec, t->tsnap.snapPoint); + tangent[2] = 0; + + if (Inpf(tangent, tangent) > 0) + { + VECCOPY(t->tsnap.snapTangent, tangent); + } + + VECCOPY(t->tsnap.snapPoint, vec); + VECCOPY(t->tsnap.snapNormal, no); + t->tsnap.status |= POINT_INIT; } else @@ -464,31 +518,18 @@ void CalcSnapGeometry(TransInfo *t, float *vec) /* Mesh edit mode */ else if (G.obedit != NULL && G.obedit->type==OB_MESH) { - /*if (G.scene->selectmode & B_SEL_VERT)*/ - if (t->spacetype == SPACE_VIEW3D) { - EditVert *nearest=NULL; float vec[3]; + float no[3]; int found = 0; int dist = 40; // Use a user defined value here - - // use findnearestverts in vert mode, others in other modes - nearest = findnearestvert(&dist, SELECT, 1); - - found = findNearestVertFromObjects(&dist, vec, NOT_ACTIVE); + + found = snapObjects(&dist, vec, no, NOT_ACTIVE); if (found == 1) { VECCOPY(t->tsnap.snapPoint, vec); - - t->tsnap.status |= POINT_INIT; - } - /* If there's no outside vertex nearer, but there's one in this mesh - */ - else if (nearest != NULL) - { - VECCOPY(t->tsnap.snapPoint, nearest->co); - Mat4MulVecfl(G.obedit->obmat, t->tsnap.snapPoint); + VECCOPY(t->tsnap.snapNormal, no); t->tsnap.status |= POINT_INIT; } @@ -522,33 +563,6 @@ void CalcSnapGeometry(TransInfo *t, float *vec) t->tsnap.status &= ~POINT_INIT; } } - - - /* - if (G.scene->selectmode & B_SEL_EDGE) - { - EditEdge *nearest=NULL; - int dist = 50; // Use a user defined value here - - // use findnearestverts in vert mode, others in other modes - nearest = findnearestedge(&dist); - - if (nearest != NULL) - { - VecAddf(t->tsnap.snapPoint, nearest->v1->co, nearest->v2->co); - - VecMulf(t->tsnap.snapPoint, 0.5f); - - Mat4MulVecfl(G.obedit->obmat, t->tsnap.snapPoint); - - t->tsnap.status |= POINT_INIT; - } - else - { - t->tsnap.status &= ~POINT_INIT; - } - } - */ } } @@ -723,101 +737,351 @@ void TargetSnapClosest(TransInfo *t) } /*================================================================*/ -int findNearestVertFromObjects(int *dist, float *loc, int mode) { + +/* find snapping point on face, return 1 on success */ +int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) +{ + MVert *v[4]; + int totvert; + int result = 0; + + v[0] = verts + face->v1; + v[1] = verts + face->v2; + v[2] = verts + face->v3; + + if (face->v4) + { + v[3] = verts + face->v4; + totvert = 4; + } + else + { + v[3] = NULL; + totvert = 3; + } + + switch(G.scene->snap_mode) + { + case SCE_SNAP_MODE_VERTEX: + { + float min_dist = FLT_MAX; + int i; + + for(i = 0; i < totvert; i++) + { + float vert_dist = VecLenf(v[i]->co, intersect); + + if (vert_dist < min_dist) + { + result = 1; + + min_dist = vert_dist; + + VECCOPY(loc, v[i]->co); + NormalShortToFloat(no, v[i]->no); + } + } + break; + } + case SCE_SNAP_MODE_EDGE: + { + float min_dist = FLT_MAX; + int i; + + for(i = 0; i < totvert; i++) + { + MVert *v1, *v2; + float edge_loc[3]; + float vec[3]; + float mul; + float edge_dist; + + v1 = v[i]; + v2 = v[(i + 1) % totvert]; + + VecSubf(edge_loc, v2->co, v1->co); + VecSubf(vec, intersect, v1->co); + + mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); + + VecMulf(edge_loc, mul); + VecAddf(edge_loc, edge_loc, v1->co); + + edge_dist = VecLenf(edge_loc, intersect); + + if (edge_dist < min_dist) + { + float n1[3], n2[3]; + result = 1; + + min_dist = edge_dist; + + VECCOPY(loc, edge_loc); + + NormalShortToFloat(n1, v1->no); + NormalShortToFloat(n2, v2->no); + VecLerpf(no, n1, n2, mul); + Normalize(no); + } + } + break; + } + case SCE_SNAP_MODE_FACE: + { + result = 1; + + VECCOPY(loc, intersect); + + if (totvert == 4) + CalcNormFloat4(v[0]->co, v[1]->co, v[2]->co, v[3]->co, no); + else + CalcNormFloat(v[0]->co, v[1]->co, v[2]->co, no); + break; + } + } + + return result; +} + +int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], float *loc, float *no, int *dist, float *depth, short EditMesh) +{ + float object_depth = FLT_MAX; + int retval = 0; + int totvert = dm->getNumVerts(dm); + int totface = dm->getNumFaces(dm); + + if (totvert > 0) { + float imat[4][4]; + float timat[3][3]; /* transpose inverse matrix for normals */ + float ray_start_local[3], ray_normal_local[3]; + int test = 1; + + Mat4Invert(imat, obmat); + + Mat3CpyMat4(timat, imat); + Mat3Transp(timat); + + VECCOPY(ray_start_local, ray_start); + VECCOPY(ray_normal_local, ray_normal); + + Mat4MulVecfl(imat, ray_start_local); + Mat4Mul3Vecfl(imat, ray_normal_local); + + + /* If number of vert is more than an arbitrary limit, + * test against boundbox first + * */ + if (totface > 16) { + struct BoundBox *bb = object_get_boundbox(ob); + test = ray_hit_boundbox(bb, ray_start_local, ray_normal_local); + } + + if (test == 1) { + MVert *verts = dm->getVertArray(dm); + MFace *faces = dm->getFaceArray(dm); + int *index_array; + int index = 0; + int i; + + test = 1; + + if (EditMesh) + { + index_array = dm->getFaceDataArray(dm, CD_ORIGINDEX); + EM_init_index_arrays(0, 0, 1); + } + + for( i = 0; i < totface; i++) { + MFace *f = faces + i; + float lambda; + int result; + + if (EditMesh) + { + EditFace *efa = NULL; + + if (index_array) + { + index = index_array[i]; + } + else + { + index = i; + } + + if (index == ORIGINDEX_NONE) + { + test = 0; + } + else + { + efa = EM_get_face_for_index(index); + + if (efa) + { + if (efa->v1->f1 & SELECT || efa->v2->f1 & SELECT || efa->v3->f1 & SELECT || (efa->v4 && efa->v4->f1 & SELECT)) + { + test = 0; + } + } + } + } + + + if (test) + { + result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, &lambda, NULL); + + if (result && lambda < object_depth) { + float location[3], normal[3]; + float intersect[3]; + + VECCOPY(intersect, ray_normal_local); + VecMulf(intersect, lambda); + VecAddf(intersect, intersect, ray_start_local); + + if (snapFace(f, verts, intersect, location, normal)) + { + float new_depth; + int screen_loc[2]; + + Mat4MulVecfl(obmat, location); + + new_depth = VecLenf(location, ray_start); + + if (new_depth < *depth) + { + object_depth = lambda; + *depth = new_depth; + retval = 1; + + VECCOPY(loc, location); + VECCOPY(no, normal); + + Mat3MulVecfl(timat, no); + Normalize(no); + + project_int(loc, screen_loc); + + *dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + } + } + } + + if (f->v4 && result == 0) + { + result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v3].co, verts[f->v4].co, verts[f->v1].co, &lambda, NULL); + + if (result && lambda < object_depth) { + float location[3], normal[3]; + float intersect[3]; + + VECCOPY(intersect, ray_normal_local); + VecMulf(intersect, lambda); + VecAddf(intersect, intersect, ray_start_local); + + if (snapFace(f, verts, intersect, location, normal)) + { + float new_depth; + int screen_loc[2]; + + Mat4MulVecfl(obmat, location); + + new_depth = VecLenf(location, ray_start); + + if (new_depth < *depth) + { + object_depth = lambda; + *depth = new_depth; + retval = 1; + + VECCOPY(loc, location); + VECCOPY(no, normal); + + Mat3MulVecfl(timat, no); + Normalize(no); + + project_int(loc, screen_loc); + + *dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + } + } + } + } + } + } + + if (EditMesh) + { + EM_free_index_arrays(); + } + } + } + + return retval; +} + +int snapObjects(int *dist, float *loc, float *no, int mode) { Base *base; + float depth = FLT_MAX; int retval = 0; short mval[2]; + float ray_start[3], ray_normal[3]; getmouseco_areawin(mval); + viewray(mval, ray_start, ray_normal); + + if (mode == NOT_ACTIVE) + { + DerivedMesh *dm, *dm_cage; + Object *ob = G.obedit; + + dm_cage = editmesh_get_derived_cage_and_final(&dm, CD_MASK_BAREMESH); + + retval = snapDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, loc, no, dist, &depth, 1); + + dm_cage->release(dm_cage); + dm->release(dm); + } base= FIRSTBASE; for ( base = FIRSTBASE; base != NULL; base = base->next ) { if ( BASE_SELECTABLE(base) && ((mode == NOT_SELECTED && (base->flag & SELECT) == 0) || (mode == NOT_ACTIVE && base != BASACT)) ) { Object *ob = base->object; - if (ob->type == OB_MESH) { - Mesh *me = ob->data; + if (ob->transflag & OB_DUPLI) + { + DupliObject *dupli_ob; + ListBase *lb = object_duplilist(G.scene, ob); - if (me->totvert > 0) { - int test = 1; - int i; + for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) + { + Object *ob = dupli_ob->ob; - /* If number of vert is more than an arbitrary limit, - * test against boundbox first - * */ - if (me->totvert > 16) { - struct BoundBox *bb = object_get_boundbox(ob); + if (ob->type == OB_MESH) { + DerivedMesh *dm = mesh_get_derived_final(ob, CD_MASK_BAREMESH); + int val; - int minx = 0, miny = 0, maxx = 0, maxy = 0; - int i; - - for (i = 0; i < 8; i++) { - float gloc[3]; - int sloc[2]; - - VECCOPY(gloc, bb->vec[i]); - Mat4MulVecfl(ob->obmat, gloc); - project_int(gloc, sloc); - - if (i == 0) { - minx = maxx = sloc[0]; - miny = maxy = sloc[1]; - } - else { - if (minx > sloc[0]) minx = sloc[0]; - else if (maxx < sloc[0]) maxx = sloc[0]; - - if (miny > sloc[1]) miny = sloc[1]; - else if (maxy < sloc[1]) maxy = sloc[1]; - } - } - - /* Pad with distance */ + val = snapDerivedMesh(ob, dm, dupli_ob->mat, ray_start, ray_normal, mval, loc, no, dist, &depth, 0); - minx -= *dist; - miny -= *dist; - maxx += *dist; - maxy += *dist; - - if (mval[0] > maxx || mval[0] < minx || - mval[1] > maxy || mval[1] < miny) { - - test = 0; - } - } - - if (test == 1) { - float *verts = mesh_get_mapped_verts_nors(ob); - - if (verts != NULL) { - float *fp; - - fp = verts; - for( i = 0; i < me->totvert; i++, fp += 6) { - float gloc[3]; - int sloc[2]; - int curdist; - - VECCOPY(gloc, fp); - Mat4MulVecfl(ob->obmat, gloc); - project_int(gloc, sloc); - - sloc[0] -= mval[0]; - sloc[1] -= mval[1]; - - curdist = abs(sloc[0]) + abs(sloc[1]); - - if (curdist < *dist) { - *dist = curdist; - retval = 1; - VECCOPY(loc, gloc); - } - } - } - - MEM_freeN(verts); + retval = retval || val; + + dm->release(dm); } } + + free_object_duplilist(lb); + } + + if (ob->type == OB_MESH) { + DerivedMesh *dm = mesh_get_derived_final(ob, CD_MASK_BAREMESH); + int val; + + val = snapDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, loc, no, dist, &depth, 0); + + retval = retval || val; + + dm->release(dm); } } } From 192037960d0b0f104aee6a8652bf1f410d880b1f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 Jun 2008 22:54:56 +0000 Subject: [PATCH 223/430] error in variable name, not sure how this even compiled --- source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index 09dd14172c8..c2f15aefe16 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -166,7 +166,7 @@ int set_tpage(MTFace *tface) glDisable ( GL_ALPHA_TEST ); /* glBlendEquationEXT(GL_FUNC_ADD_EXT); */ } - else if (alphamode==TF_CLIP){ + else if (fAlphamode==TF_CLIP){ glDisable(GL_BLEND); glEnable ( GL_ALPHA_TEST ); glAlphaFunc(GL_GREATER, 0.5f); From f72d450ae99927e7240f62900af4608a5db2d664 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Tue, 10 Jun 2008 05:12:51 +0000 Subject: [PATCH 224/430] == redcode == This makes it work for Mac OS X. Thanks to Jean-Luc Peuriere for the patch. --- extern/libopenjpeg/opj_malloc.h | 6 ++++-- extern/libopenjpeg/patches/osx.patch | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 extern/libopenjpeg/patches/osx.patch diff --git a/extern/libopenjpeg/opj_malloc.h b/extern/libopenjpeg/opj_malloc.h index 79698f8ff1b..4e9727af0f3 100644 --- a/extern/libopenjpeg/opj_malloc.h +++ b/extern/libopenjpeg/opj_malloc.h @@ -76,8 +76,10 @@ Allocate memory aligned to a 16 byte boundry #if defined(__sun) #define HAVE_MEMALIGN #elif defined(__GNUC__) - #define HAVE_MEMALIGN - #include + #ifndef __APPLE__ + #define HAVE_MEMALIGN + #include + #endif /* Linux x86_64 and OSX always align allocations to 16 bytes */ #elif !defined(__amd64__) && !defined(__APPLE__) /* FIXME: Yes, this is a big assumption */ diff --git a/extern/libopenjpeg/patches/osx.patch b/extern/libopenjpeg/patches/osx.patch new file mode 100644 index 00000000000..c518978eed6 --- /dev/null +++ b/extern/libopenjpeg/patches/osx.patch @@ -0,0 +1,17 @@ +Index: opj_malloc.h +=================================================================== +--- opj_malloc.h (revision 15089) ++++ opj_malloc.h (working copy) +@@ -76,8 +76,10 @@ + #if defined(__sun) + #define HAVE_MEMALIGN + #elif defined(__GNUC__) +- #define HAVE_MEMALIGN +- #include ++ #ifndef __APPLE__ ++ #define HAVE_MEMALIGN ++ #include ++ #endif + /* Linux x86_64 and OSX always align allocations to 16 bytes */ + #elif !defined(__amd64__) && !defined(__APPLE__) + /* FIXME: Yes, this is a big assumption */ From 70453c9e809eb92c6dfbd40949daa5dd792d8e28 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 10 Jun 2008 10:26:13 +0000 Subject: [PATCH 225/430] bugfix, missing calls to free editmesh index arrays --- source/blender/src/editmesh_lib.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c index 6251ba1a650..4d9679b6b8a 100644 --- a/source/blender/src/editmesh_lib.c +++ b/source/blender/src/editmesh_lib.c @@ -2199,18 +2199,25 @@ UvVertMap *make_uv_vert_map_EM(int selected, int do_face_idx_array, float *limit if(!selected || ((!efa->h) && (efa->f & SELECT))) totuv += (efa->v4)? 4: 3; - if(totuv==0) + if(totuv==0) { + if (do_face_idx_array) + EM_free_index_arrays(); return NULL; - + } vmap= (UvVertMap*)MEM_callocN(sizeof(*vmap), "UvVertMap"); - if (!vmap) + if (!vmap) { + if (do_face_idx_array) + EM_free_index_arrays(); return NULL; + } vmap->vert= (UvMapVert**)MEM_callocN(sizeof(*vmap->vert)*totverts, "UvMapVert*"); buf= vmap->buf= (UvMapVert*)MEM_callocN(sizeof(*vmap->buf)*totuv, "UvMapVert"); if (!vmap->vert || !vmap->buf) { free_uv_vert_map(vmap); + if (do_face_idx_array) + EM_free_index_arrays(); return NULL; } From d086126616fce3be0899369f21e1117b1d8d865a Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Tue, 10 Jun 2008 16:18:45 +0000 Subject: [PATCH 226/430] -> Stack corruption in viewline in viw.c viewline() would write past the end of an array allocated on the stack causing crashes. Fixed this. Martin, could you take a look at this? --- source/blender/src/view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 835aeb9bb30..008387d5a70 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -156,7 +156,7 @@ void viewray(short mval[2], float ray_start[3], float ray_normal[3]) /* create intersection coordinates in view Z direction at mouse coordinates */ void viewline(short mval[2], float ray_start[3], float ray_end[3]) { - float vec[3]; + float vec[4]; if(G.vd->persp != V3D_ORTHO){ vec[0]= 2.0f * mval[0] / curarea->winx - 1; From bdb3ef08cf694b167689a54e25ab026118b43e6d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jun 2008 05:25:52 +0000 Subject: [PATCH 227/430] Increased new nla, sound, action, ipo, timeline spaces max zoomlevel to use MAXFRAMEF, so you can view an entire animation ans so all time spaces have the same maximum which is important when the views lock to each others zoomlevel. Not ideal since it only affects newly created spaces, but probably not worth going through doversions since it wont effect many blender users. --- source/blender/src/space.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 90a48565a8f..6de12cf0f1e 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -3216,7 +3216,7 @@ void initipo(ScrArea *sa) sipo->v2d.min[0]= 0.01f; sipo->v2d.min[1]= 0.01f; - sipo->v2d.max[0]= 15000.0f; + sipo->v2d.max[0]= MAXFRAMEF; sipo->v2d.max[1]= 10000.0f; sipo->v2d.scroll= L_SCROLL+B_SCROLL; @@ -5175,7 +5175,7 @@ static void init_actionspace(ScrArea *sa) saction->v2d.min[0]= 0.0; saction->v2d.min[1]= 0.0; - saction->v2d.max[0]= 32000.0; + saction->v2d.max[0]= MAXFRAMEF; saction->v2d.max[1]= 1000.0; saction->v2d.minzoom= 0.01; @@ -5247,7 +5247,7 @@ static void init_soundspace(ScrArea *sa) ssound->v2d.min[0]= 1.0; ssound->v2d.min[1]= 259.0; - ssound->v2d.max[0]= 32000.0; + ssound->v2d.max[0]= MAXFRAMEF; ssound->v2d.max[1]= 259; ssound->v2d.minzoom= 0.1f; @@ -5977,7 +5977,7 @@ static void init_nlaspace(ScrArea *sa) snla->v2d.min[0]= 0.0; snla->v2d.min[1]= 0.0; - snla->v2d.max[0]= 1000.0; + snla->v2d.max[0]= MAXFRAMEF; snla->v2d.max[1]= 1000.0; snla->v2d.minzoom= 0.1F; @@ -6065,7 +6065,7 @@ static void init_timespace(ScrArea *sa) stime->v2d.min[0]= 1.0; stime->v2d.min[1]= (float)sa->winy; - stime->v2d.max[0]= 32000.0; + stime->v2d.max[0]= MAXFRAMEF; stime->v2d.max[1]= (float)sa->winy; stime->v2d.minzoom= 0.1f; From ef0ea178b13b6642517f820a2baf3c316110d7ae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jun 2008 09:04:41 +0000 Subject: [PATCH 228/430] bugfix, off by 1 error when filling in uninitialized values for new ID values when the requested name length was greater to or equal to 21. Also replaced incorrect use of strcpy with memmove since the strings overlap --- source/blender/blenkernel/intern/library.c | 2 +- source/blender/blenlib/intern/util.c | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index cc3f3f211a4..7c50b409693 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -934,7 +934,7 @@ int new_id(ListBase *lb, ID *id, const char *tname) } /* if result > 21, strncpy don't put the final '\0' to name. */ - if( result > 21 ) name[21]= 0; + if( result >= 21 ) name[21]= 0; result = check_for_dupid( lb, id, name ); strcpy( id->name+2, name ); diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 848e45ccb1b..a353015052c 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -883,6 +883,15 @@ void BLI_cleanup_file(const char *relabase, char *dir) dir = dir+2; /* skip the first // */ } } + + /* Note + * memmove( start, eind, strlen(eind)+1 ); + * is the same as + * strcpy( start, eind ); + * except strcpy should not be used because there is overlap, + * so use memmove's slightly more obscure syntax - Campbell + */ + #ifdef WIN32 if(dir[0]=='.') { /* happens for example in FILE_MAIN */ get_default_root(dir); @@ -896,17 +905,18 @@ void BLI_cleanup_file(const char *relabase, char *dir) if (dir[a] == '\\') break; a--; } - strcpy(dir+a,eind); + memmove( dir+a, eind, strlen(eind)+1 ); + } while ( (start = strstr(dir,"\\.\\")) ){ eind = start + strlen("\\.\\") - 1; - strcpy(start,eind); + memmove( start, eind, strlen(eind)+1 ); } while ( (start = strstr(dir,"\\\\" )) ){ eind = start + strlen("\\\\") - 1; - strcpy(start,eind); + memmove( start, eind, strlen(eind)+1 ); } if((a = strlen(dir))){ /* remove the '\\' at the end */ @@ -929,17 +939,17 @@ void BLI_cleanup_file(const char *relabase, char *dir) if (dir[a] == '/') break; a--; } - strcpy(dir+a,eind); + memmove( dir+a, eind, strlen(eind)+1 ); } while ( (start = strstr(dir,"/./")) ){ eind = start + strlen("/./") - 1; - strcpy(start,eind); + memmove( start, eind, strlen(eind)+1 ); } while ( (start = strstr(dir,"//" )) ){ eind = start + strlen("//") - 1; - strcpy(start,eind); + memmove( start, eind, strlen(eind)+1 ); } if( (a = strlen(dir)) ){ /* remove all '/' at the end */ From d0fc57e5dfb574fa63d34572a6e6e9c0f39127bc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jun 2008 10:45:41 +0000 Subject: [PATCH 229/430] [#13723] Select -> Grouped -> Objects in Same Group doesn't work directly after appending Menu was shown even when it couldn't do anything. behavior now matches the object copy menu. --- source/blender/src/space.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 6de12cf0f1e..53962d9519b 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2084,7 +2084,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } else if(ob && (ob->flag & OB_POSEMODE)) pose_select_grouped_menu(); - else + else if (ob) select_object_grouped_menu(); else if((G.obedit==0) && G.qual==LR_ALTKEY) { if(okee("Clear location")) { From 21a46a0155b4eefc91deb805b5f6f42afdf404cd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 11 Jun 2008 14:31:51 +0000 Subject: [PATCH 230/430] bugfix - duplicated script spaces would keep a pointer to the PyObject button list. (causing python errors with negative reference counts when freeing spaces) - Exiting blender would crash when a UI was open because the ScriptSpaces button PyList was being free'd after python Py_Finalize was called. --- source/blender/python/BPY_interface.c | 14 +++++++++----- source/blender/src/space.c | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 7c23c86d9ba..2f94e0eeebc 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -1154,13 +1154,17 @@ static void unlink_script( Script * script ) if( sl->spacetype == SPACE_SCRIPT ) { SpaceScript *sc = ( SpaceScript * ) sl; - if( sc->script == script ) { + if( sc->script == script ) { sc->script = NULL; - if( sc == - area->spacedata.first ) { - scrarea_queue_redraw - ( area ); + if( sc == area->spacedata.first ) { + scrarea_queue_redraw( area ); + } + + if (sc->but_refs) { + BPy_Set_DrawButtonsList(sc->but_refs); + BPy_Free_DrawButtonsList(); + sc->but_refs = NULL; } } } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 53962d9519b..a31bd457f47 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -6334,7 +6334,10 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2) SpaceNode *snode= (SpaceNode *)sl; snode->nodetree= NULL; } - + else if(sl->spacetype==SPACE_SCRIPT) { + SpaceScript *sc = ( SpaceScript * ) sl; + sc->but_refs = NULL; + } sl= sl->next; } From 39a47826e31219996c8a08b6cbe80d87ad3661cd Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Jun 2008 20:15:47 +0000 Subject: [PATCH 231/430] Fix for commit revision 15197, missing braces caused some shortcut keys not to work anymore. --- source/blender/src/space.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index a31bd457f47..c49486a6294 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2077,7 +2077,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) vgroup_operation_with_menu(); } } - else if((G.qual==LR_SHIFTKEY)) + else if((G.qual==LR_SHIFTKEY)) { if(G.obedit) { if(G.obedit->type==OB_MESH) select_mesh_group_menu(); @@ -2086,6 +2086,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) pose_select_grouped_menu(); else if (ob) select_object_grouped_menu(); + } else if((G.obedit==0) && G.qual==LR_ALTKEY) { if(okee("Clear location")) { clear_object('g'); From 82a108b4134cf43a185c22bfe7bf2035c4f6375a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Jun 2008 14:46:32 +0000 Subject: [PATCH 232/430] Curve Smoorth for venomgfx adjusting animation paths over terrain. --- source/blender/include/BDR_editcurve.h | 1 + source/blender/src/editcurve.c | 56 ++++++++++++++++++++++++++ source/blender/src/editobject.c | 5 ++- 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/source/blender/include/BDR_editcurve.h b/source/blender/include/BDR_editcurve.h index 4604359fcc9..363a6567f3e 100644 --- a/source/blender/include/BDR_editcurve.h +++ b/source/blender/include/BDR_editcurve.h @@ -99,6 +99,7 @@ int bezt_compare (const void *e1, const void *e2); void setweightNurb( void ); void setradiusNurb( void ); void smoothradiusNurb( void ); +void smoothNurb( void ); extern void undo_push_curve(char *name); diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index bd0abe83ee4..261bb26b0c4 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -1158,6 +1158,62 @@ void setradiusNurb( void ) allqueue(REDRAWINFO, 1); /* 1, because header->win==0! */ } +void smoothNurb( void ) +{ + + extern ListBase editNurb; + Nurb *nu; + BezTriple *bezt, *beztOrig; + BPoint *bp, *bpOrig; + int a, i, change = 0; + + /* floats for smoothing */ + float val, newval, offset; + + for(nu= editNurb.first; nu; nu= nu->next) { + if(nu->bezt) { + change = 0; + beztOrig = MEM_dupallocN( nu->bezt ); + for(bezt=nu->bezt+1, a=1; apntsu-1; a++, bezt++) { + if(bezt->f2 & SELECT) { + for(i=0; i<3; i++) { + val = bezt->vec[1][i]; + newval = ((beztOrig+(a-1))->vec[1][i] * 0.5) + ((beztOrig+(a+1))->vec[1][i] * 0.5); + offset = (val*((1.0/6.0)*5)) + (newval*(1.0/6.0)) - val; + /* offset handles */ + bezt->vec[1][i] += offset; + bezt->vec[0][i] += offset; + bezt->vec[2][i] += offset; + } + change = 1; + } + } + MEM_freeN(beztOrig); + if (change) + calchandlesNurb(nu); + } else if (nu->bp) { + bpOrig = MEM_dupallocN( nu->bp ); + /* Same as above, keep these the same! */ + for(bp=nu->bp+1, a=1; apntsu-1; a++, bp++) { + if(bp->f1 & SELECT) { + for(i=0; i<3; i++) { + val = bp->vec[i]; + newval = ((bpOrig+(a-1))->vec[i] * 0.5) + ((bpOrig+(a+1))->vec[i] * 0.5); + offset = (val*((1.0/6.0)*5)) + (newval*(1.0/6.0)) - val; + + bp->vec[i] += offset; + } + } + } + MEM_freeN(bpOrig); + } + } + BIF_undo_push("Smooth Curve"); + DAG_object_flush_update(G.scene, OBACT, OB_RECALC_DATA); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWBUTSALL, 0); + allqueue(REDRAWINFO, 1); /* 1, because header->win==0! */ +} /* TODO, make smoothing distance based */ void smoothradiusNurb( void ) diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 4029e031b63..38664f72b25 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -2735,7 +2735,7 @@ void special_editmenu(void) } else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) { - nr= pupmenu("Specials%t|Subdivide%x1|Switch Direction%x2|Set Goal Weight %x3|Set Radius %x4|Smooth Radius %x5"); + nr= pupmenu("Specials%t|Subdivide%x1|Switch Direction%x2|Set Goal Weight %x3|Set Radius %x4|Smooth Radius %x5|Smooth Radius %x6"); switch(nr) { case 1: @@ -2751,6 +2751,9 @@ void special_editmenu(void) setradiusNurb(); break; case 5: + smoothNurb(); + break; + case 6: smoothradiusNurb(); break; } From 1091db8f9b67772cc688cfb545bb616e203e3942 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Jun 2008 15:00:07 +0000 Subject: [PATCH 233/430] didnt name the smooth curve menu item. --- source/blender/src/editobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 38664f72b25..3c945775b5b 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -2735,7 +2735,7 @@ void special_editmenu(void) } else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) { - nr= pupmenu("Specials%t|Subdivide%x1|Switch Direction%x2|Set Goal Weight %x3|Set Radius %x4|Smooth Radius %x5|Smooth Radius %x6"); + nr= pupmenu("Specials%t|Subdivide%x1|Switch Direction%x2|Set Goal Weight%x3|Set Radius%x4|Smooth%x5|Smooth Radius%x6"); switch(nr) { case 1: From 7ffd70f39aec2388e3240b6981a20a4b9b23c271 Mon Sep 17 00:00:00 2001 From: Ben Batt Date: Thu, 12 Jun 2008 15:43:55 +0000 Subject: [PATCH 234/430] Patch #8613 - Vertex groups in the mirror modifier. This patch re-assigns the mirrored data to use vertex groups with "mirrored" names (e.g. L_arm -> R_arm, Leg.R -> Leg.L etc.). Vertex groups with the "mirrored" names must already exist in the base mesh. This means that it is no longer necessary to apply the mirror modifier in order to rig the mirrored data independently. Thanks to Michael Fox for the patch! --- source/blender/blenkernel/intern/modifier.c | 169 ++++++++++++++++++- source/blender/makesdna/DNA_modifier_types.h | 1 + source/blender/src/buttons_editing.c | 3 +- 3 files changed, 170 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index bd8a2ea219a..861534deb80 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -40,6 +40,7 @@ #include "stdarg.h" #include "math.h" #include "float.h" +#include "ctype.h" #include "BLI_arithb.h" #include "BLI_blenlib.h" @@ -1269,7 +1270,7 @@ static void mirrorModifier_initData(ModifierData *md) { MirrorModifierData *mmd = (MirrorModifierData*) md; - mmd->flag |= MOD_MIR_AXIS_X; + mmd->flag |= (MOD_MIR_AXIS_X | MOD_MIR_VGROUP); mmd->tolerance = 0.001; mmd->mirror_ob = NULL; } @@ -1308,6 +1309,118 @@ static void mirrorModifier_updateDepgraph(ModifierData *md, DagForest *forest, } } +/* finds the best possible flipped name. For renaming; check for unique names afterwards */ +/* if strip_number: removes number extensions */ +void vertgroup_flip_name (char *name, int strip_number) +{ + int len; + char prefix[128]={""}; /* The part before the facing */ + char suffix[128]={""}; /* The part after the facing */ + char replace[128]={""}; /* The replacement string */ + char number[128]={""}; /* The number extension string */ + char *index=NULL; + + len= strlen(name); + if(len<3) return; // we don't do names like .R or .L + + /* We first check the case with a .### extension, let's find the last period */ + if(isdigit(name[len-1])) { + index= strrchr(name, '.'); // last occurrance + if (index && isdigit(index[1]) ) { // doesnt handle case bone.1abc2 correct..., whatever! + if(strip_number==0) + strcpy(number, index); + *index= 0; + len= strlen(name); + } + } + + strcpy (prefix, name); + +#define IS_SEPARATOR(a) ((a)=='.' || (a)==' ' || (a)=='-' || (a)=='_') + + /* first case; separator . - _ with extensions r R l L */ + if( IS_SEPARATOR(name[len-2]) ) { + switch(name[len-1]) { + case 'l': + prefix[len-1]= 0; + strcpy(replace, "r"); + break; + case 'r': + prefix[len-1]= 0; + strcpy(replace, "l"); + break; + case 'L': + prefix[len-1]= 0; + strcpy(replace, "R"); + break; + case 'R': + prefix[len-1]= 0; + strcpy(replace, "L"); + break; + } + } + /* case; beginning with r R l L , with separator after it */ + else if( IS_SEPARATOR(name[1]) ) { + switch(name[0]) { + case 'l': + strcpy(replace, "r"); + strcpy(suffix, name+1); + prefix[0]= 0; + break; + case 'r': + strcpy(replace, "l"); + strcpy(suffix, name+1); + prefix[0]= 0; + break; + case 'L': + strcpy(replace, "R"); + strcpy(suffix, name+1); + prefix[0]= 0; + break; + case 'R': + strcpy(replace, "L"); + strcpy(suffix, name+1); + prefix[0]= 0; + break; + } + } + else if(len > 5) { + /* hrms, why test for a separator? lets do the rule 'ultimate left or right' */ + index = BLI_strcasestr(prefix, "right"); + if (index==prefix || index==prefix+len-5) { + if(index[0]=='r') + strcpy (replace, "left"); + else { + if(index[1]=='I') + strcpy (replace, "LEFT"); + else + strcpy (replace, "Left"); + } + *index= 0; + strcpy (suffix, index+5); + } + else { + index = BLI_strcasestr(prefix, "left"); + if (index==prefix || index==prefix+len-4) { + if(index[0]=='l') + strcpy (replace, "right"); + else { + if(index[1]=='E') + strcpy (replace, "RIGHT"); + else + strcpy (replace, "Right"); + } + *index= 0; + strcpy (suffix, index+4); + } + } + } + +#undef IS_SEPARATOR + + sprintf (name, "%s%s%s%s", prefix, replace, suffix, number); +} + static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, Object *ob, DerivedMesh *dm, @@ -1321,6 +1434,9 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, int maxVerts = dm->getNumVerts(dm); int maxEdges = dm->getNumEdges(dm); int maxFaces = dm->getNumFaces(dm); + int vector_size, j, a, b; + bDeformGroup *def, *defb; + bDeformGroup **vector_def = NULL; int (*indexMap)[2]; float mtx[4][4], imtx[4][4]; @@ -1330,6 +1446,21 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, result = CDDM_from_template(dm, maxVerts * 2, maxEdges * 2, maxFaces * 2); + + if (mmd->flag & MOD_MIR_VGROUP) { + /* calculate the number of deformedGroups */ + for(vector_size = 0, def = ob->defbase.first; def; + def = def->next, vector_size++); + + /* load the deformedGroups for fast access */ + vector_def = + (bDeformGroup **)MEM_mallocN(sizeof(bDeformGroup*) * vector_size, + "group_index"); + for(a = 0, def = ob->defbase.first; def; def = def->next, a++) { + vector_def[a] = def; + } + } + if (mmd->mirror_ob) { float obinv[4][4]; @@ -1374,16 +1505,48 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, mv->flag |= ME_VERT_MERGED; } else { MVert *mv2 = CDDM_get_vert(result, numVerts); + MDeformVert *dvert = NULL; DM_copy_vert_data(dm, result, i, numVerts, 1); *mv2 = *mv; - numVerts++; co[axis] = -co[axis]; if (mmd->mirror_ob) { VecMat4MulVecfl(co, imtx, co); } VecCopyf(mv2->co, co); + + if (mmd->flag & MOD_MIR_VGROUP){ + dvert = DM_get_vert_data(result, numVerts, CD_MDEFORMVERT); + + if (dvert) + { + for(j = 0; j < dvert[0].totweight; ++j) + { + char tmpname[32]; + + if(dvert->dw[j].def_nr < 0 || + dvert->dw[j].def_nr >= vector_size) + continue; + + def = vector_def[dvert->dw[j].def_nr]; + strcpy(tmpname, def->name); + vertgroup_flip_name(tmpname,0); + + for(b = 0, defb = ob->defbase.first; defb; + defb = defb->next, b++) + { + if(!strcmp(defb->name, tmpname)) + { + dvert->dw[j].def_nr = b; + break; + } + } + } + } + } + + numVerts++; } } @@ -1467,6 +1630,8 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } } + if (vector_def) MEM_freeN(vector_def); + MEM_freeN(indexMap); CDDM_lower_num_verts(result, numVerts); diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index fc015775f49..8c1df1450e8 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -176,6 +176,7 @@ typedef struct MirrorModifierData { #define MOD_MIR_AXIS_X 1<<3 #define MOD_MIR_AXIS_Y 1<<4 #define MOD_MIR_AXIS_Z 1<<5 +#define MOD_MIR_VGROUP 1<<6 typedef struct EdgeSplitModifierData { ModifierData modifier; diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 7e154d6c341..5d477b7ab09 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1767,7 +1767,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco } else if (md->type==eModifierType_Build) { height = 86; } else if (md->type==eModifierType_Mirror) { - height = 86; + height = 105; } else if (md->type==eModifierType_Bevel) { BevelModifierData *bmd = (BevelModifierData*) md; height = 105; /* height = 124; */ @@ -1899,6 +1899,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefButBitS(block, TOG, MOD_MIR_AXIS_Y, B_MODIFIER_RECALC, "Y", lx+20,cy,20,19, &mmd->flag, 0, 0, 0, 0, "Enable Y axis mirror"); uiDefButBitS(block, TOG, MOD_MIR_AXIS_Z, B_MODIFIER_RECALC, "Z", lx+40,cy,20,19, &mmd->flag, 0, 0, 0, 0, "Enable Z axis mirror"); uiDefButBitS(block, TOG, MOD_MIR_CLIPPING, B_MODIFIER_RECALC, "Do Clipping", lx+60, cy, buttonWidth-60,19, &mmd->flag, 1, 2, 0, 0, "Prevents during Transform vertices to go through Mirror"); + uiDefButBitS(block, TOG, MOD_MIR_VGROUP, B_MODIFIER_RECALC, "Mirror Vgroups", lx, (cy-=19), buttonWidth,19, &mmd->flag, 1, 2, 0, 0, "Mirror vertex groups (e.g. .R->.L)"); uiDefButBitS(block, TOG, MOD_MIR_MIRROR_U, B_MODIFIER_RECALC, "Mirror U", lx, (cy-=19), buttonWidth/2, 19, From 1e7f1f753f239f071e195d49a6c05963b09f9b42 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Jun 2008 16:29:00 +0000 Subject: [PATCH 235/430] When your home directory is full, saving defaults would fail without raising an error. checked all others instances of BLO_write_file give errors too. When autosave fails it reports an error in the console so its not too annoying. --- source/blender/src/usiblender.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 6c0838288b8..5ac8e186b68 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -925,7 +925,7 @@ void BIF_write_file(char *target) writeBlog(); } else { - error("%s", err); + error("failed to write blend file: %s", err); } waitcursor(0); @@ -940,7 +940,10 @@ void BIF_write_homefile(void) /* force save as regular blend file */ write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN); - BLO_write_file(tstr, write_flags, &err); + + if (!BLO_write_file(tstr, write_flags, &err)) { + error("failed writing defaults: %s", err); + } } void BIF_write_autosave(void) @@ -952,7 +955,9 @@ void BIF_write_autosave(void) /* force save as regular blend file */ write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN); - BLO_write_file(tstr, write_flags, &err); + if (!BLO_write_file(tstr, write_flags, &err)) { + fprintf(stderr, "failed to write autosave: %s\n", err); /* using error(...) is too annoying here */ + } } /* remove temp files assosiated with this blend file when quitting, loading or saving in a new path */ From 21c2613622a99bfea1871ef5b15ff21da706007b Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Thu, 12 Jun 2008 21:17:02 +0000 Subject: [PATCH 236/430] Update MSVC project files --- .../blender/blenkernel/BKE_blenkernel.vcproj | 9 ++++++--- projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj b/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj index 98bb21e7ad1..8efff1742b0 100644 --- a/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj +++ b/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj @@ -344,6 +344,9 @@ + + @@ -425,9 +428,6 @@ - - @@ -558,6 +558,9 @@ + + diff --git a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj index 8a2b8b95e38..34c195cf23d 100644 --- a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj +++ b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj @@ -346,6 +346,9 @@ + + @@ -458,6 +461,9 @@ + + From 8bd82d4e3645a1e1e141522f6a127bb73759096b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 13 Jun 2008 02:20:09 +0000 Subject: [PATCH 237/430] Some pose action ipo corruptions when using BGE, added some debug printf's when copying to/from the same pose since it should never happen. --- source/blender/blenkernel/intern/action.c | 17 +++++++++++++++++ .../gameengine/Converter/BL_ArmatureObject.cpp | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 5fb3d6f869a..4860c65f06c 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -290,6 +290,12 @@ void copy_pose(bPose **dst, bPose *src, int copycon) return; } + if (*dst==src) { + printf("copy_pose source and target are the same\n"); + *dst=NULL; + return; + } + outPose= MEM_callocN(sizeof(bPose), "pose"); duplicatelist(&outPose->chanbase, &src->chanbase); @@ -740,6 +746,11 @@ void extract_pose_from_pose(bPose *pose, const bPose *src) const bPoseChannel *schan; bPoseChannel *pchan= pose->chanbase.first; + if (pose==src) { + printf("extract_pose_from_pose source and target are the same\n"); + return; + } + for (schan=src->chanbase.first; schan; schan=schan->next, pchan= pchan->next) { copy_pose_channel_data(pchan, schan); } @@ -817,6 +828,12 @@ void copy_pose_result(bPose *to, bPose *from) return; } + if (to==from) { + printf("copy_pose_result source and target are the same\n"); + return; + } + + for(pchanfrom= from->chanbase.first; pchanfrom; pchanfrom= pchanfrom->next) { pchanto= get_pose_channel(to, pchanfrom->name); if(pchanto) { diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 08567dde840..d4712efda9e 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -92,9 +92,10 @@ BL_ArmatureObject::~BL_ArmatureObject() /* there is only 1 unique Pose per Armature */ void BL_ArmatureObject::ApplyPose() { - if (m_pose){ + if (m_pose) { // copy to armature object - extract_pose_from_pose(m_objArma->pose, m_pose); + if (m_objArma->pose != m_pose)/* This should never happen but it does - Campbell */ + extract_pose_from_pose(m_objArma->pose, m_pose); // is this needed anymore? //if (!m_mrdPose) From d8171e4bc6c25200661542ad9a42e8e41bb748c4 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 13 Jun 2008 22:23:24 +0000 Subject: [PATCH 238/430] soc-2008-mxcurioni: removed static dependencies (formerly fixed in app_blender/test_config.h). From now on, to use the branch, one needs to define a FREESTYLE_BLENDER_DIR environment variable to point to the Freestyle directory source/blender/freestyle --- .../intern/app_blender/AppConfig.cpp | 6 +----- .../intern/app_blender/Controller.cpp | 8 +++----- .../freestyle/intern/app_blender/api.cpp | 19 ++++++++++++------- .../intern/app_blender/test_config.h | 10 ---------- 4 files changed, 16 insertions(+), 27 deletions(-) delete mode 100644 source/blender/freestyle/intern/app_blender/test_config.h diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.cpp b/source/blender/freestyle/intern/app_blender/AppConfig.cpp index a2fa8787fa9..37d139f54e3 100755 --- a/source/blender/freestyle/intern/app_blender/AppConfig.cpp +++ b/source/blender/freestyle/intern/app_blender/AppConfig.cpp @@ -18,8 +18,6 @@ // /////////////////////////////////////////////////////////////////////////////// -#include "test_config.h" - #include "AppConfig.h" #include @@ -34,10 +32,8 @@ namespace Config{ _HomeDir = getEnvVar("HOME"); // get the root directory //soc - //setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR")); - setRootDir( TEST_ROOT_DIR ); + setRootDir(getEnvVar("FREESTYLE_BLENDER_DIR")); -//setRootDir(QString(".")); _pInstance = this; } void Path::setRootDir(const string& iRootDir){ diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 8b494ff5108..9abf082d5cc 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -64,8 +64,6 @@ #include "../system/StringUtils.h" -#include "test_config.h" - Controller::Controller() { @@ -1062,7 +1060,7 @@ void Controller::init_options(){ // Default init options Config::Path * cpath = Config::Path::getInstance(); - + // Directories ViewMapIO::Options::setModelsPath( StringUtils::toAscii( cpath->getModelsPath() ) ); PythonInterpreter::Options::setPythonPath( StringUtils::toAscii( cpath->getPythonPath() ) ); @@ -1079,8 +1077,8 @@ void Controller::init_options(){ // Papers Textures vector sl; - sl.push_back( StringUtils::toAscii( TEST_TEXTURE_FILE ) ); - TextureManager::Options::setPaperTextures(sl); + sl.push_back( StringUtils::toAscii( cpath->getPapersDir() + Config::DEFAULT_PAPER_TEXTURE ) ); + TextureManager::Options::setPaperTextures( sl ); // Drawing Buffers setFrontBufferFlag(false); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index c097b64ef53..2a7868304ea 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -2,7 +2,6 @@ #include "AppGLWidget.h" #include "Controller.h" #include "AppConfig.h" -#include "test_config.h" #include @@ -28,9 +27,8 @@ extern "C" { static Controller *controller = NULL; static AppGLWidget *view = NULL; - + void FRS_initialize(){ - Config::Path pathconfig; if( controller == NULL ) controller = new Controller; @@ -40,7 +38,8 @@ extern "C" { } void FRS_execute(Render* re) { - + + Config::Path pathconfig; FRS_initialize(); controller->SetView(view); @@ -51,12 +50,15 @@ extern "C" { view->_camera->setScreenWidthAndHeight(width, height); //view->setCameraState(const float* position, const float* orientation) - BPY_run_python_script( TEST_3DS_EXPORT ); + string script_3ds_export = pathconfig.getProjectDir() + + Config::DIR_SEP + "python" + + Config::DIR_SEP + "3ds_export.py"; + BPY_run_python_script( const_cast(script_3ds_export.c_str()) ); char btempdir[255]; BLI_where_is_temp(btempdir,1); string exported_3ds_file = btempdir; - exported_3ds_file += "/tmp_scene_freestyle.3ds"; + exported_3ds_file += Config::DIR_SEP + "tmp_scene_freestyle.3ds"; if( BLI_exists( const_cast(exported_3ds_file.c_str()) ) ) { controller->Load3DSFile( exported_3ds_file.c_str() ); } @@ -65,7 +67,10 @@ extern "C" { return; } - controller->InsertStyleModule( 0, TEST_STYLE_MODULE_FILE ); + string style_module = pathconfig.getProjectDir() + + Config::DIR_SEP + "style_modules" + + Config::DIR_SEP + "contour.py"; + controller->InsertStyleModule( 0, const_cast(style_module.c_str()) ); controller->toggleLayer(0, true); controller->ComputeViewMap(); diff --git a/source/blender/freestyle/intern/app_blender/test_config.h b/source/blender/freestyle/intern/app_blender/test_config.h deleted file mode 100644 index c2337c0ba4c..00000000000 --- a/source/blender/freestyle/intern/app_blender/test_config.h +++ /dev/null @@ -1,10 +0,0 @@ -#define TEST_STYLE_MODULE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/style_modules/contour.py" - -#define TEST_ROOT_DIR "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle" - -#define TEST_TEXTURE_FILE "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/data/textures/papers/whitepaper.jpg" - - - - -#define TEST_3DS_EXPORT "/Users/mx/Documents/work/GSoC_2008/bf-blender/branches/soc-2008-mxcurioni/source/blender/freestyle/python/3ds_export.py" From 714c6d5010356505e7b393bdda5e187b19e2da55 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 14 Jun 2008 03:00:38 +0000 Subject: [PATCH 239/430] Bugfix: Campbell's recent commit to fix game-engine pose/ipo corruption was causing segfaults with duplicating armatures. --- source/blender/blenkernel/intern/object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 125243bc56f..b72d9a0b044 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1100,6 +1100,8 @@ static void copy_object_pose(Object *obn, Object *ob) { bPoseChannel *chan; + /* note: need to clear obn->pose pointer first, so that copy_pose works (otherwise there's a crash) */ + obn->pose= NULL; copy_pose(&obn->pose, ob->pose, 1); /* 1 = copy constraints */ for (chan = obn->pose->chanbase.first; chan; chan=chan->next){ From 9c2bf9bdbcc23bb008af543b4fbbdf7c33d0decd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Jun 2008 16:54:46 +0000 Subject: [PATCH 240/430] bugfix for memory corruption caused by BLI_cleanup_file on paths that went too far back. /a/b/../../../ - problematic /a/b/c/../../../ - ok Also got rid of warnings in shadbuf.c with GET_INT_FROM_POINTER --- source/blender/blenlib/intern/util.c | 19 +++++++++++++------ source/blender/render/intern/source/shadbuf.c | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index a353015052c..5a85fbfc375 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -905,8 +905,11 @@ void BLI_cleanup_file(const char *relabase, char *dir) if (dir[a] == '\\') break; a--; } - memmove( dir+a, eind, strlen(eind)+1 ); - + if (a<0) { + break; + } else { + memmove( dir+a, eind, strlen(eind)+1 ); + } } while ( (start = strstr(dir,"\\.\\")) ){ @@ -939,7 +942,11 @@ void BLI_cleanup_file(const char *relabase, char *dir) if (dir[a] == '/') break; a--; } - memmove( dir+a, eind, strlen(eind)+1 ); + if (a<0) { + break; + } else { + memmove( dir+a, eind, strlen(eind)+1 ); + } } while ( (start = strstr(dir,"/./")) ){ @@ -1128,8 +1135,8 @@ int BLI_convertstringcode(char *path, const char *basepath) char vol[3] = {'\0', '\0', '\0'}; BLI_strncpy(vol, path, 3); - wasrelative= (strncmp(vol, "//", 2)==0); - + wasrelative= (vol[0]=='/' && vol[1]=='/'); + #ifdef WIN32 /* we are checking here if we have an absolute path that is not in the current blend file as a lib main - we are basically checking for the case that a @@ -1166,7 +1173,7 @@ int BLI_convertstringcode(char *path, const char *basepath) /* Paths starting with // will get the blend file as their base, * this isnt standard in any os but is uesed in blender all over the place */ - if (tmp[0] == '/' && tmp[1] == '/') { + if (wasrelative) { char *lslash= BLI_last_slash(base); if (lslash) { int baselen= (int) (lslash-base) + 1; diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index 796272eab2e..f3258b601de 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -636,7 +636,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int else { /* got warning on this for 64 bits.... */ /* but it's working code! in this case rz is not a pointer but zvalue (ton) */ - zsamp= (int) rz; + zsamp= GET_INT_FROM_POINTER(rz); } /* tricky stuff here; we use ints which can overflow easily with bias values */ @@ -816,7 +816,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSampleBuf *shsample, int xs, i else { /* same as before */ /* still working code! (ton) */ - zsamp= (int) rz; + zsamp= GET_INT_FROM_POINTER(rz); } /* NO schadow when sampled at 'eternal' distance */ From fc7a83b458811883b01e948a37e6177ae96602db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Jun 2008 17:12:49 +0000 Subject: [PATCH 241/430] Added access for adjusting timeOffset value at runtime, used for apricot (Franky climbing walls) --- source/gameengine/Ketsji/KX_GameObject.cpp | 21 +++++++++++++++++++ .../Ketsji/KX_SG_NodeRelationships.h | 15 +++++++++++++ source/gameengine/PyDoc/KX_GameObject.py | 2 ++ source/gameengine/SceneGraph/SG_Node.cpp | 11 ++++++++++ source/gameengine/SceneGraph/SG_Node.h | 8 +++++++ .../gameengine/SceneGraph/SG_ParentRelation.h | 10 +++++++++ source/gameengine/SceneGraph/SG_Spatial.cpp | 7 +++++++ source/gameengine/SceneGraph/SG_Spatial.h | 4 ++++ 8 files changed, 78 insertions(+) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index c192cd01261..6fde94fec53 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -911,6 +911,14 @@ PyObject* KX_GameObject::_getattr(const STR_String& attr) if (attr == "name") return PyString_FromString(m_name.ReadPtr()); + if (attr == "timeOffset") { + if (m_pSGNode->GetSGParent()->IsSlowParent()) { + return PyFloat_FromDouble(static_cast(m_pSGNode->GetSGParent()->GetParentRelation())->GetTimeOffset()); + } else { + return PyFloat_FromDouble(0.0); + } + } + _getattr_up(SCA_IObject); } @@ -932,6 +940,19 @@ int KX_GameObject::_setattr(const STR_String& attr, PyObject *value) // _setattr return 0; } } + + if (PyFloat_Check(value)) + { + MT_Scalar val = PyFloat_AsDouble(value); + if (attr == "timeOffset") { + if (m_pSGNode->GetSGParent()->IsSlowParent()) { + static_cast(m_pSGNode->GetSGParent()->GetParentRelation())->SetTimeOffset(val); + return 0; + } else { + return 0; + } + } + } if (PySequence_Check(value)) { diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.h b/source/gameengine/Ketsji/KX_SG_NodeRelationships.h index e53af22408e..faa650106c8 100644 --- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.h +++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.h @@ -177,8 +177,23 @@ public : NewCopy( ); + MT_Scalar + GetTimeOffset( + ) { return m_relax; } + + void + SetTimeOffset( + MT_Scalar relaxation + ) { m_relax = relaxation; } + ~KX_SlowParentRelation( ); + + bool + IsSlowRelation( + ) { + return true; + } private : diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index 8d29a704380..678df59e4a9 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -22,6 +22,8 @@ class KX_GameObject: @type orientation: 3x3 Matrix [[float]] @ivar scaling: The object's scaling factor. list [sx, sy, sz] @type scaling: list [sx, sy, sz] + @ivar timeOffset: adjust the slowparent delay at runtime. + @type timeOffset: float """ def setVisible(visible): diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp index ff9a9f7f371..4e90d7c4653 100644 --- a/source/gameengine/SceneGraph/SG_Node.cpp +++ b/source/gameengine/SceneGraph/SG_Node.cpp @@ -159,6 +159,17 @@ IsVertexParent() return false; } + bool +SG_Node:: +IsSlowParent() +{ + if (m_parent_relation) + { + return m_parent_relation->IsSlowRelation(); + } + return false; +} + void SG_Node:: DisconnectFromParent( diff --git a/source/gameengine/SceneGraph/SG_Node.h b/source/gameengine/SceneGraph/SG_Node.h index 5cf24de68f3..f86e3046d93 100644 --- a/source/gameengine/SceneGraph/SG_Node.h +++ b/source/gameengine/SceneGraph/SG_Node.h @@ -159,6 +159,14 @@ public: bool IsVertexParent( ) ; + + /** + * Return slow parent status. + */ + + bool + IsSlowParent( + ) ; /** * Update the spatial data of this node. Iterate through diff --git a/source/gameengine/SceneGraph/SG_ParentRelation.h b/source/gameengine/SceneGraph/SG_ParentRelation.h index 9d360d1c274..6507cb98519 100644 --- a/source/gameengine/SceneGraph/SG_ParentRelation.h +++ b/source/gameengine/SceneGraph/SG_ParentRelation.h @@ -99,6 +99,16 @@ public : ) { return false; } + + /** + * Need this to see if we are able to adjust time-offset from the python api + */ + virtual + bool + IsSlowRelation( + ) { + return false; + } protected : /** diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index 18049592977..5ba116e59db 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -87,6 +87,13 @@ SG_Spatial:: delete (m_parent_relation); } + SG_ParentRelation * +SG_Spatial:: +GetParentRelation( +){ + return m_parent_relation; +} + void SG_Spatial:: SetParentRelation( diff --git a/source/gameengine/SceneGraph/SG_Spatial.h b/source/gameengine/SceneGraph/SG_Spatial.h index a70784472a7..28848b0f933 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.h +++ b/source/gameengine/SceneGraph/SG_Spatial.h @@ -83,6 +83,10 @@ public: SetParentRelation( SG_ParentRelation *relation ); + + SG_ParentRelation * + GetParentRelation( + ); /** From 13d081c62c6014e30db719e558b2ad3ea000fd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Sat, 14 Jun 2008 18:57:42 +0000 Subject: [PATCH 242/430] fix for ndof inconsistencies, bug #13954 patch provided by Ettore Pasquini --- intern/ghost/intern/GHOST_SystemX11.cpp | 8 ++-- source/blender/src/view.c | 60 +++++++++++++++---------- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index ff1bf51bbb5..3003e0b8b14 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -488,12 +488,12 @@ GHOST_SystemX11::processEvent(XEvent *xe) data.changed = 1; data.delta = xcme.data.s[8] - data.time; data.time = xcme.data.s[8]; - data.tx = xcme.data.s[2]; - data.ty = xcme.data.s[3]; - data.tz = xcme.data.s[4]; + data.tx = xcme.data.s[2] >> 2; + data.ty = xcme.data.s[3] >> 2; + data.tz = xcme.data.s[4] >> 2; data.rx = xcme.data.s[5]; data.ry = xcme.data.s[6]; - data.rz = xcme.data.s[7]; + data.rz =-xcme.data.s[7]; g_event = new GHOST_EventNDOF(getMilliSeconds(), GHOST_kEventNDOFMotion, window, data); diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 008387d5a70..356a297b284 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -753,10 +753,11 @@ void viewmoveNDOFfly(int mode) // Apply rotation - - rvec[0] = -dval[3]; - rvec[1] = -dval[4]; - rvec[2] = dval[5]; + // Rotations feel relatively faster than translations only in fly mode, so + // we have no choice but to fix that here (not in the plugins) + rvec[0] = -0.5 * dval[3]; + rvec[1] = -0.5 * dval[4]; + rvec[2] = -0.5 * dval[5]; // rotate device x and y by view z @@ -824,8 +825,7 @@ void viewmove(int mode) return; } - // dist correction from other movement devices - + // dist correction from other movement devices if((dz_flag)||G.vd->dist==0) { dz_flag = 0; G.vd->dist = m_dist; @@ -1166,6 +1166,8 @@ void viewmoveNDOF(int mode) float reverse; float diff[4]; float d, curareaX, curareaY; + float mat[3][3]; + float upvec[3]; /* Sensitivity will control how fast the view rotates. The value was * obtained experimentally by tweaking until the author didn't get dizzy watching. @@ -1186,6 +1188,16 @@ void viewmoveNDOF(int mode) use_sel = 1; } + if((dz_flag)||G.vd->dist==0) { + dz_flag = 0; + G.vd->dist = m_dist; + upvec[0] = upvec[1] = 0; + upvec[2] = G.vd->dist; + Mat3CpyMat4(mat, G.vd->viewinv); + Mat3MulVecfl(mat, upvec); + VecAddf(G.vd->ofs, G.vd->ofs, upvec); + } + /*---------------------------------------------------- * sometimes this routine is called from headerbuttons * viewmove needs to refresh the screen @@ -1212,25 +1224,25 @@ void viewmoveNDOF(int mode) filterNDOFvalues(fval); - // put scaling back here, was previously in ghostwinlay - fval[0] = fval[0] * (1.0f/800.0f); - fval[1] = fval[1] * (1.0f/800.0f); - fval[2] = fval[2] * (1.0f/800.0f); - fval[3] = fval[3] * 0.00005f; - fval[4] = fval[4] * 0.00005f; - fval[5] = fval[5] * 0.00005f; - fval[6] = fval[6] / 1000000.0f; + // put scaling back here, was previously in ghostwinlay + fval[0] = fval[0] * (1.0f/1200.0f); + fval[1] = fval[1] * (1.0f/1200.0f); + fval[2] = fval[2] * (1.0f/1200.0f); + fval[3] = fval[3] * 0.00005f; + fval[4] =-fval[4] * 0.00005f; + fval[5] = fval[5] * 0.00005f; + fval[6] = fval[6] / 1000000.0f; - // scale more if not in perspective mode - if (G.vd->persp == V3D_ORTHO) { - fval[0] = fval[0] * 0.05f; - fval[1] = fval[1] * 0.05f; - fval[2] = fval[2] * 0.05f; - fval[3] = fval[3] * 0.9f; - fval[4] = fval[4] * 0.9f; - fval[5] = fval[5] * 0.9f; - zsens *= 8; - } + // scale more if not in perspective mode + if (G.vd->persp == V3D_ORTHO) { + fval[0] = fval[0] * 0.05f; + fval[1] = fval[1] * 0.05f; + fval[2] = fval[2] * 0.05f; + fval[3] = fval[3] * 0.9f; + fval[4] = fval[4] * 0.9f; + fval[5] = fval[5] * 0.9f; + zsens *= 8; + } /* set object offset */ From 89c1875bc9a761b52f2f2041203bfcf3ef34030e Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sat, 14 Jun 2008 20:42:15 +0000 Subject: [PATCH 243/430] BGE patch: support Set Scene in BGE. Linked Set Scene should have no name conflict in Object, Object data and Action of the main scene to avoid confusion in Python scripting. Nested Set Scene are supported. You will need Python scripting to create cross references between objects in the main scene and the Set (e.g TrackTo actuator) --- source/blender/blenkernel/BKE_scene.h | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index c50f5498de9..2bd528ab8c8 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -53,7 +53,7 @@ struct RenderData; } /* note; doesn't work when scene is empty */ -#define SETLOOPER(s, b) sce= s, b= sce->base.first; b; b= (b->next?b->next:sce->set?(sce=sce->set)->base.first:NULL) +#define SETLOOPER(s, b) sce= s, b= (Base*)sce->base.first; b; b= (Base*)(b->next?b->next:sce->set?(sce=sce->set)->base.first:NULL) void free_avicodecdata(struct AviCodecData *acd); diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 82d16ffa181..5a9cda67941 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -88,6 +88,7 @@ #include "BKE_main.h" #include "BKE_global.h" #include "BKE_object.h" +#include "BKE_scene.h" #include "BL_SkinMeshObject.h" #include "BL_SkinDeformer.h" #include "BL_MeshDeformer.h" @@ -1808,6 +1809,9 @@ void BL_ConvertBlenderObjects(struct Main* maggie, { Scene *blenderscene = GetSceneForName(maggie, scenename); + // for SETLOOPER + Scene *sce; + Base *base; // Get the frame settings of the canvas. // Get the aspect ratio of the canvas as designed by the user. @@ -1881,9 +1885,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie, } SetDefaultFaceType(blenderscene); - - Base *base = static_cast(blenderscene->base.first); - while(base) + // Let's support scene set. + // Beware of name conflict in linked data, it will not crash but will create confusion + // in Python scripting and in certain actuators (replace mesh). Linked scene *should* have + // no conflicting name for Object, Object data and Action. + for (SETLOOPER(blenderscene, base)) { Object* blenderobject = base->object; KX_GameObject* gameobj = gameobject_from_blenderobject( @@ -2038,7 +2044,6 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (gameobj) gameobj->Release(); - base = base->next; } if (blenderscene->camera) { @@ -2048,7 +2053,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, } // Set up armatures - for (base = static_cast(blenderscene->base.first); base; base=base->next){ + for(SETLOOPER(blenderscene, base)){ if (base->object->type==OB_MESH){ Mesh *me = (Mesh*)base->object->data; From c76bce9e6407aa9adda3bd1b1d66fe3b8d88299f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Jun 2008 08:56:11 +0000 Subject: [PATCH 244/430] bugfix, simple crash in drawaction --- source/blender/src/drawaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 65221dceaf9..8c4958a651a 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -730,7 +730,7 @@ void check_action_context(SpaceAction *saction) for (achan=saction->action->chanbase.first; achan; achan=achan->next) { pchan= get_pose_channel(ob->pose, achan->name); - if (pchan) { + if (pchan && pchan->bone) { if ((pchan->bone->layer & arm->layer)==0) achan->flag |= ACHAN_HIDDEN; else if (pchan->bone->flag & BONE_HIDDEN_P) From f63b70635c91062a8ef71b2a1f82ac8d4bb06372 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Jun 2008 09:43:24 +0000 Subject: [PATCH 245/430] bugfix, clip alpha wasn't working in the GE, not happy with these functions, they probably need bigger changes not to assume all alpha requires face sorting with a disabled depth buffer, --- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 6 +++--- source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 5a9cda67941..cb981f55c5a 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -542,7 +542,7 @@ BL_Material* ConvertMaterial( material->amb = mat->amb; // set alpha testing without z-sorting - if( ( validface && (!tface->transp)) && mat->mode & MA_ZTRA) { + if( ( validface && (!(tface->transp &~ TF_CLIP))) && mat->mode & MA_ZTRA) { // sets the RAS_IPolyMaterial::m_flag |RAS_FORCEALPHA // this is so we don't have the overhead of the z-sorting code material->ras_mode|=ALPHA_TEST; @@ -598,7 +598,7 @@ BL_Material* ConvertMaterial( material->ras_mode |= ( (tface->mode & TF_DYNAMIC)!= 0 )?COLLIDER:0; material->transp = tface->transp; - if(tface->transp) + if(tface->transp&~TF_CLIP) material->ras_mode |= TRANSP; material->tile = tface->tile; @@ -947,7 +947,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* // Use texface colors if available //TF_DYNAMIC means the polygon is a collision face collider = ((tface->mode & TF_DYNAMIC) != 0); - transp = tface->transp; + transp = tface->transp &~ TF_CLIP; tile = tface->tile; mode = tface->mode; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 5efe1ad26ca..cc978760da7 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -493,7 +493,7 @@ bool KX_BlenderMaterial::setDefaultBlending() glDisable(GL_BLEND); glEnable ( GL_ALPHA_TEST ); glAlphaFunc(GL_GREATER, 0.5f); - return true; + return false; } return false; } From a54edca11970f942d9335eb057cff18cfa96e2c7 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 15 Jun 2008 10:19:38 +0000 Subject: [PATCH 246/430] Whitespace commit in armature.c --- source/blender/blenkernel/intern/armature.c | 61 ++++++++++----------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index eca10e5b079..fb7d59c137a 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1709,13 +1709,13 @@ static void execute_posetree(Object *ob, PoseTree *tree) if (tree->totchannel == 0) return; - + iktree= MEM_mallocN(sizeof(void*)*tree->totchannel, "ik tree"); for(a=0; atotchannel; a++) { pchan= tree->pchan[a]; bone= pchan->bone; - + /* set DoF flag */ flag= 0; if(!(pchan->ikflag & BONE_IK_NO_XDOF) && !(pchan->ikflag & BONE_IK_NO_XDOF_TEMP)) @@ -1724,32 +1724,32 @@ static void execute_posetree(Object *ob, PoseTree *tree) flag |= IK_YDOF; if(!(pchan->ikflag & BONE_IK_NO_ZDOF) && !(pchan->ikflag & BONE_IK_NO_ZDOF_TEMP)) flag |= IK_ZDOF; - + if(tree->stretch && (pchan->ikstretch > 0.0)) { flag |= IK_TRANS_YDOF; hasstretch = 1; } - + seg= iktree[a]= IK_CreateSegment(flag); - + /* find parent */ if(a == 0) parent= NULL; else parent= iktree[tree->parent[a]]; - + IK_SetParent(seg, parent); - + /* get the matrix that transforms from prevbone into this bone */ Mat3CpyMat4(R_bonemat, pchan->pose_mat); - + /* gather transformations for this IK segment */ - + if (pchan->parent) Mat3CpyMat4(R_parmat, pchan->parent->pose_mat); else Mat3One(R_parmat); - + /* bone offset */ if (pchan->parent && (a > 0)) VecSubf(start, pchan->pose_head, pchan->parent->pose_tail); @@ -1759,37 +1759,37 @@ static void execute_posetree(Object *ob, PoseTree *tree) /* change length based on bone size */ length= bone->length*VecLength(R_bonemat[1]); - + /* compute rest basis and its inverse */ Mat3CpyMat3(rest_basis, bone->bone_mat); Mat3CpyMat3(irest_basis, bone->bone_mat); Mat3Transp(irest_basis); - + /* compute basis with rest_basis removed */ Mat3Inv(iR_parmat, R_parmat); Mat3MulMat3(full_basis, iR_parmat, R_bonemat); Mat3MulMat3(basis, irest_basis, full_basis); - + /* basis must be pure rotation */ Mat3Ortho(basis); - + /* transform offset into local bone space */ Mat3Ortho(iR_parmat); Mat3MulVecfl(iR_parmat, start); - + IK_SetTransform(seg, start, rest_basis, basis, length); - + if (pchan->ikflag & BONE_IK_XLIMIT) IK_SetLimit(seg, IK_X, pchan->limitmin[0], pchan->limitmax[0]); if (pchan->ikflag & BONE_IK_YLIMIT) IK_SetLimit(seg, IK_Y, pchan->limitmin[1], pchan->limitmax[1]); if (pchan->ikflag & BONE_IK_ZLIMIT) IK_SetLimit(seg, IK_Z, pchan->limitmin[2], pchan->limitmax[2]); - + IK_SetStiffness(seg, IK_X, pchan->stiffness[0]); IK_SetStiffness(seg, IK_Y, pchan->stiffness[1]); IK_SetStiffness(seg, IK_Z, pchan->stiffness[2]); - + if(tree->stretch && (pchan->ikstretch > 0.0)) { float ikstretch = pchan->ikstretch*pchan->ikstretch; IK_SetStiffness(seg, IK_TRANS_Y, MIN2(1.0-ikstretch, 0.99)); @@ -1818,7 +1818,7 @@ static void execute_posetree(Object *ob, PoseTree *tree) for (target=tree->targets.first; target; target=target->next) { float polepos[3]; int poleconstrain= 0; - + data= (bKinematicConstraint*)target->con->data; /* 1.0=ctime, we pass on object for auto-ik (owner-type here is object, even though @@ -1835,7 +1835,7 @@ static void execute_posetree(Object *ob, PoseTree *tree) /* same for pole vector target */ if(data->poletar) { get_constraint_target_matrix(target->con, 1, CONSTRAINT_OBTYPE_OBJECT, ob, rootmat, 1.0); - + if(data->flag & CONSTRAINT_IK_SETANGLE) { /* don't solve IK when we are setting the pole angle */ break; @@ -1844,7 +1844,7 @@ static void execute_posetree(Object *ob, PoseTree *tree) Mat4MulMat4(goal, rootmat, goalinv); VECCOPY(polepos, goal[3]); poleconstrain= 1; - + if(data->flag & CONSTRAINT_IK_GETANGLE) { poleangledata= data; data->flag &= ~CONSTRAINT_IK_GETANGLE; @@ -1903,36 +1903,35 @@ static void execute_posetree(Object *ob, PoseTree *tree) tree->basis_change= MEM_mallocN(sizeof(float[3][3])*tree->totchannel, "ik basis change"); if(hasstretch) ikstretch= MEM_mallocN(sizeof(float)*tree->totchannel, "ik stretch"); - + for(a=0; atotchannel; a++) { IK_GetBasisChange(iktree[a], tree->basis_change[a]); - + if(hasstretch) { /* have to compensate for scaling received from parent */ float parentstretch, stretch; - + pchan= tree->pchan[a]; parentstretch= (tree->parent[a] >= 0)? ikstretch[tree->parent[a]]: 1.0; - + if(tree->stretch && (pchan->ikstretch > 0.0)) { float trans[3], length; - + IK_GetTranslationChange(iktree[a], trans); length= pchan->bone->length*VecLength(pchan->pose_mat[1]); - + ikstretch[a]= (length == 0.0)? 1.0: (trans[1]+length)/length; } else ikstretch[a] = 1.0; - + stretch= (parentstretch == 0.0)? 1.0: ikstretch[a]/parentstretch; - + VecMulf(tree->basis_change[a][0], stretch); VecMulf(tree->basis_change[a][1], stretch); VecMulf(tree->basis_change[a][2], stretch); - } - + IK_FreeSegment(iktree[a]); } From eb9c4de83f8153fe028935ad83eadba467c499a0 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 15 Jun 2008 14:22:12 +0000 Subject: [PATCH 247/430] Patch [#13668] Tool tip correction By Olivier Saraja --- source/blender/src/buttons_editing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 5d477b7ab09..caa1f2195e2 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -2403,7 +2403,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco but= uiDefBut(block, BUT, B_MODIFIER_RECALC, "Bind", lx,(cy-=24), buttonWidth,19, 0, 0, 0, 0, 0, "Bind mesh to cage"); uiButSetFunc(but,modifiers_bindMeshDeform,ob,md); uiDefButS(block, NUM, B_NOP, "Precision:", lx,(cy-19), buttonWidth/2 + 20,19, &mmd->gridsize, 2, 10, 0.5, 0, "The grid size for binding"); - uiDefButBitS(block, TOG, MOD_MDEF_DYNAMIC_BIND, B_MODIFIER_RECALC, "Dynamic", lx+(buttonWidth+1)/2 + 20, (cy-=19), buttonWidth/2 - 20,19, &mmd->flag, 0.0, 31.0, 0, 0, "Invert vertex group influence"); + uiDefButBitS(block, TOG, MOD_MDEF_DYNAMIC_BIND, B_MODIFIER_RECALC, "Dynamic", lx+(buttonWidth+1)/2 + 20, (cy-=19), buttonWidth/2 - 20,19, &mmd->flag, 0.0, 31.0, 0, 0, "Recompute binding dynamically on top of other deformers like Shape Keys (slower and more memory consuming!)"); } uiBlockEndAlign(block); } else if (md->type==eModifierType_ParticleSystem) { From ad023e108a59331a454a8c4fb2cea99500b49528 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 15 Jun 2008 17:54:42 +0000 Subject: [PATCH 248/430] =?UTF-8?q?[#13691]=20apricot=20Snap=20didn?= =?UTF-8?q?=E2=80=99t=20work=20correct=20in=20svn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Updated selected restriction to not be so stingy. Snapping on edges and vertices work if they are part of a partially moving face 2. Change depth ordering (which didn't work all the time). Hits are sorted according to 2D distance and then depth, so for overlapping hits, it picks the one in front. --- source/blender/src/transform_snap.c | 147 ++++++++++++++++------------ 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 83940fa3729..3a1017915f9 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -739,9 +739,10 @@ void TargetSnapClosest(TransInfo *t) /* find snapping point on face, return 1 on success */ -int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) +int snapFace(MFace *face, EditFace *efa, MVert *verts, float *intersect, float *loc, float *no) { MVert *v[4]; + EditVert *eve[4]; int totvert; int result = 0; @@ -760,6 +761,14 @@ int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) totvert = 3; } + if (efa) + { + eve[0] = efa->v1; + eve[1] = efa->v2; + eve[2] = efa->v3; + eve[3] = efa->v4; + } + switch(G.scene->snap_mode) { case SCE_SNAP_MODE_VERTEX: @@ -769,16 +778,20 @@ int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) for(i = 0; i < totvert; i++) { - float vert_dist = VecLenf(v[i]->co, intersect); - if (vert_dist < min_dist) + if (efa == NULL || (eve[i]->f1 & SELECT) == 0) { - result = 1; + float vert_dist = VecLenf(v[i]->co, intersect); - min_dist = vert_dist; - - VECCOPY(loc, v[i]->co); - NormalShortToFloat(no, v[i]->no); + if (vert_dist < min_dist) + { + result = 1; + + min_dist = vert_dist; + + VECCOPY(loc, v[i]->co); + NormalShortToFloat(no, v[i]->no); + } } } break; @@ -791,51 +804,62 @@ int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) for(i = 0; i < totvert; i++) { MVert *v1, *v2; - float edge_loc[3]; - float vec[3]; - float mul; - float edge_dist; + EditVert *eve1, *eve2; v1 = v[i]; v2 = v[(i + 1) % totvert]; - VecSubf(edge_loc, v2->co, v1->co); - VecSubf(vec, intersect, v1->co); + eve1 = eve[i]; + eve2 = eve[(i + 1) % totvert]; - mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); - - VecMulf(edge_loc, mul); - VecAddf(edge_loc, edge_loc, v1->co); - - edge_dist = VecLenf(edge_loc, intersect); - - if (edge_dist < min_dist) + if (efa == NULL || ((eve1->f1 & SELECT) == 0 && (eve2->f1 & SELECT) == 0)) { - float n1[3], n2[3]; - result = 1; + float edge_loc[3]; + float vec[3]; + float mul; + float edge_dist; - min_dist = edge_dist; - - VECCOPY(loc, edge_loc); + VecSubf(edge_loc, v2->co, v1->co); + VecSubf(vec, intersect, v1->co); - NormalShortToFloat(n1, v1->no); - NormalShortToFloat(n2, v2->no); - VecLerpf(no, n1, n2, mul); - Normalize(no); + mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); + + VecMulf(edge_loc, mul); + VecAddf(edge_loc, edge_loc, v1->co); + + edge_dist = VecLenf(edge_loc, intersect); + + if (edge_dist < min_dist) + { + float n1[3], n2[3]; + result = 1; + + min_dist = edge_dist; + + VECCOPY(loc, edge_loc); + + NormalShortToFloat(n1, v1->no); + NormalShortToFloat(n2, v2->no); + VecLerpf(no, n1, n2, mul); + Normalize(no); + } } } break; } case SCE_SNAP_MODE_FACE: { - result = 1; - - VECCOPY(loc, intersect); - - if (totvert == 4) - CalcNormFloat4(v[0]->co, v[1]->co, v[2]->co, v[3]->co, no); - else - CalcNormFloat(v[0]->co, v[1]->co, v[2]->co, no); + if (efa == NULL || ((efa->f1 & SELECT) == 0)) + { + result = 1; + + VECCOPY(loc, intersect); + + if (totvert == 4) + CalcNormFloat4(v[0]->co, v[1]->co, v[2]->co, v[3]->co, no); + else + CalcNormFloat(v[0]->co, v[1]->co, v[2]->co, no); + } break; } } @@ -845,7 +869,6 @@ int snapFace(MFace *face, MVert *verts, float *intersect, float *loc, float *no) int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], float *loc, float *no, int *dist, float *depth, short EditMesh) { - float object_depth = FLT_MAX; int retval = 0; int totvert = dm->getNumVerts(dm); int totface = dm->getNumFaces(dm); @@ -883,8 +906,6 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta int index = 0; int i; - test = 1; - if (EditMesh) { index_array = dm->getFaceDataArray(dm, CD_ORIGINDEX); @@ -892,14 +913,15 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta } for( i = 0; i < totface; i++) { + EditFace *efa = NULL; MFace *f = faces + i; float lambda; int result; + test = 1; /* reset for every face */ + if (EditMesh) { - EditFace *efa = NULL; - if (index_array) { index = index_array[i]; @@ -917,12 +939,9 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta { efa = EM_get_face_for_index(index); - if (efa) + if (efa && efa->f1 & SELECT) { - if (efa->v1->f1 & SELECT || efa->v2->f1 & SELECT || efa->v3->f1 & SELECT || (efa->v4 && efa->v4->f1 & SELECT)) - { - test = 0; - } + test = 0; } } } @@ -932,7 +951,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta { result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, &lambda, NULL); - if (result && lambda < object_depth) { + if (result) { float location[3], normal[3]; float intersect[3]; @@ -940,18 +959,21 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta VecMulf(intersect, lambda); VecAddf(intersect, intersect, ray_start_local); - if (snapFace(f, verts, intersect, location, normal)) + if (snapFace(f, efa, verts, intersect, location, normal)) { float new_depth; int screen_loc[2]; + int new_dist; Mat4MulVecfl(obmat, location); new_depth = VecLenf(location, ray_start); - if (new_depth < *depth) + project_int(location, screen_loc); + new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + + if (new_dist <= *dist && new_depth < *depth) { - object_depth = lambda; *depth = new_depth; retval = 1; @@ -963,7 +985,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta project_int(loc, screen_loc); - *dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + *dist = new_dist; } } } @@ -972,7 +994,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta { result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v3].co, verts[f->v4].co, verts[f->v1].co, &lambda, NULL); - if (result && lambda < object_depth) { + if (result) { float location[3], normal[3]; float intersect[3]; @@ -980,18 +1002,21 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta VecMulf(intersect, lambda); VecAddf(intersect, intersect, ray_start_local); - if (snapFace(f, verts, intersect, location, normal)) + if (snapFace(f, efa, verts, intersect, location, normal)) { float new_depth; int screen_loc[2]; + int new_dist; Mat4MulVecfl(obmat, location); - new_depth = VecLenf(location, ray_start); + new_depth = VecLenf(location, ray_start); - if (new_depth < *depth) + project_int(location, screen_loc); + new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + + if (new_dist <= *dist && new_depth < *depth) { - object_depth = lambda; *depth = new_depth; retval = 1; @@ -1001,9 +1026,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta Mat3MulVecfl(timat, no); Normalize(no); - project_int(loc, screen_loc); - - *dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + *dist = new_dist; } } } From dfa10eba19012fb7a20233a3d434c67f32de10db Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 16 Jun 2008 00:51:19 +0000 Subject: [PATCH 249/430] soc-2008-mxcurioni: Freestyle now supports camera information (the image is still a bit larger than Blender's internal renderer, probably a field of view problem). 3d scene is now no longer rendered, only 2d scene (strokes from view map information) is. Style module is still static (contour.py), will soon be handled via independent UI panel. Phase 1 is considered finished. Phase 2 starts now: the objective is integrating Freestyle as an independent render layer. --- .../intern/app_blender/AppGLWidget.cpp | 2 +- .../intern/app_blender/AppGLWidget.h | 6 +- .../intern/app_blender/Controller.cpp | 288 +++++++++--------- .../freestyle/intern/app_blender/api.cpp | 33 +- .../blender/render/intern/source/pipeline.c | 14 +- 5 files changed, 189 insertions(+), 154 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index a06e25d72be..34a96681c50 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -130,7 +130,7 @@ AppGLWidget::AppGLWidget(const char *iName) _debug = false; _selection_mode = false; _Draw2DScene = true; - _Draw3DScene = true; + _Draw3DScene = false; _drawEnvMap = false; _currentEnvMap = 1; _maxId = 0; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 319fc248494..175eb67ba69 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -401,9 +401,9 @@ public: inline bool getRecordFlag() const {return _record;} - void setCameraState(const float* position, const float* orientation) { - _camera->setPosition(Vec(position[0], position[1], position[2])); - _camera->setOrientation(Quaternion(orientation[0], orientation[1], orientation[2], orientation[3])); + void setCameraState(const Vec& position, const Quaternion& orientation) { + _camera->setPosition(position); + _camera->setOrientation(orientation); } void getCameraState(float* position, float* orientation) const { diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 9abf082d5cc..9a820b835ca 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -209,7 +209,7 @@ int Controller::Load3DSFile(const char *iFileName) _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox _pView->SetModel(_RootNode); - _pView->FitBBox(); + //_pView->FitBBox(); _Chrono.start(); @@ -399,149 +399,149 @@ void Controller::SaveViewMapFile(const char *oFileName) cout << "ViewMap saving : " << d << endl; } -void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) -{ - ifstream ifs(iFileName, ios::binary); - if (!ifs.is_open()) { - cerr << "Error: Cannot load this file" << endl; - return; - } -// char buffer[buffer_size]; -// #if defined(__GNUC__) && (__GNUC__ < 3) -// ifs.rdbuf()->setbuf(buffer, buffer_size); -// # else -// ifs.rdbuf()->pubsetbuf(buffer, buffer_size); -// #endif - - // Test File Magic and version - char tmp_buffer[256]; - string test; - - ifs.getline(tmp_buffer, 255); - test = tmp_buffer; - if (test != Config::VIEWMAP_MAGIC) { - cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; - return; - } - ifs.getline(tmp_buffer, 255); - test = tmp_buffer; - if (test != Config::VIEWMAP_VERSION && !only_camera) { - cerr << "Error: This version of the ." << Config::VIEWMAP_EXTENSION << " file format is no longer supported" << endl; - return; - } - - // Read the models filenames and open them (if not already done) - string tmp; - vector tmp_vec; - unsigned models_nb, i; - - ifs.getline(tmp_buffer, 255); - models_nb = atoi(tmp_buffer); - for (i = 0; i < models_nb; i++) { - ifs.getline(tmp_buffer, 255); - tmp = tmp_buffer; - tmp_vec.push_back(tmp); - } - if (_ListOfModels != tmp_vec && !only_camera) { - CloseFile(); - vector pathnames; - int err = 0; - for (vector::const_iterator i = tmp_vec.begin(); i != tmp_vec.end(); i++) - { - pathnames.clear(); - StringUtils::getPathName(ViewMapIO::Options::getModelsPath(), *i, pathnames); - for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) - if (!(err = Load3DSFile(j->c_str()))) - break; - if (err) { - cerr << "Error: cannot find model \"" << *i << "\" - check the path in the Options" << endl; - return; - } - } - } - - // Set the camera position - float position[3]; - float orientation[4]; - ifs.read((char*)position, 3 * sizeof(*position)); - ifs.read((char*)orientation, 4 * sizeof(*orientation)); - _pView->setCameraState(position, orientation); - _pView->saveCameraState(); - - if (only_camera) { - return; - } - - // Reset ViewMap - if(NULL != _ViewMap) - { - delete _ViewMap; - _ViewMap = 0; - } - _pView->DetachSilhouette(); - if (NULL != _SilhouetteNode) - { - int ref = _SilhouetteNode->destroy(); - if(0 == ref) - delete _SilhouetteNode; - } - // if(NULL != _ProjectedSilhouette) - // { - // int ref = _ProjectedSilhouette->destroy(); - // if(0 == ref) - // delete _ProjectedSilhouette; - // } - // if(NULL != _VisibleProjectedSilhouette) - // { - // int ref = _VisibleProjectedSilhouette->destroy(); - // if(0 == ref) - // { - // delete _VisibleProjectedSilhouette; - // _VisibleProjectedSilhouette = 0; - // } - // } - _ViewMap = new ViewMap(); - - // Read ViewMap - _Chrono.start(); - if (ViewMapIO::load(ifs, _ViewMap, 0)) { - _Chrono.stop(); - - cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; - return; - } - - // Update display - ViewMapTesselator3D sTesselator3d; - //ViewMapTesselator2D sTesselator2d; - //sTesselator2d.SetNature(_edgeTesselationNature); - sTesselator3d.SetNature(_edgeTesselationNature); - - // Tesselate the 3D edges: - _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); - _SilhouetteNode->addRef(); - - // Tesselate 2D edges - // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); - // _ProjectedSilhouette->addRef(); - // - _pView->AddSilhouette(_SilhouetteNode); - //_pView->Add2DSilhouette(_ProjectedSilhouette); - - // Update options window - //_pOptionsWindow->updateViewMapFormat(); - - real d = _Chrono.stop(); - cout << "ViewMap loading : " << d << endl; - - // Compute the Directional ViewMap: - if(_ComputeSteerableViewMap){ - ComputeSteerableViewMap(); - } - - // Reset Style modules modification flags - resetModified(true); -} +// void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) +// { +// ifstream ifs(iFileName, ios::binary); +// if (!ifs.is_open()) { +// cerr << "Error: Cannot load this file" << endl; +// return; +// } +// // char buffer[buffer_size]; +// // #if defined(__GNUC__) && (__GNUC__ < 3) +// // ifs.rdbuf()->setbuf(buffer, buffer_size); +// // # else +// // ifs.rdbuf()->pubsetbuf(buffer, buffer_size); +// // #endif +// +// // Test File Magic and version +// char tmp_buffer[256]; +// string test; +// +// ifs.getline(tmp_buffer, 255); +// test = tmp_buffer; +// if (test != Config::VIEWMAP_MAGIC) { +// cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; +// return; +// } +// ifs.getline(tmp_buffer, 255); +// test = tmp_buffer; +// if (test != Config::VIEWMAP_VERSION && !only_camera) { +// cerr << "Error: This version of the ." << Config::VIEWMAP_EXTENSION << " file format is no longer supported" << endl; +// return; +// } +// +// // Read the models filenames and open them (if not already done) +// string tmp; +// vector tmp_vec; +// unsigned models_nb, i; +// +// ifs.getline(tmp_buffer, 255); +// models_nb = atoi(tmp_buffer); +// for (i = 0; i < models_nb; i++) { +// ifs.getline(tmp_buffer, 255); +// tmp = tmp_buffer; +// tmp_vec.push_back(tmp); +// } +// if (_ListOfModels != tmp_vec && !only_camera) { +// CloseFile(); +// vector pathnames; +// int err = 0; +// for (vector::const_iterator i = tmp_vec.begin(); i != tmp_vec.end(); i++) +// { +// pathnames.clear(); +// StringUtils::getPathName(ViewMapIO::Options::getModelsPath(), *i, pathnames); +// for (vector::const_iterator j = pathnames.begin(); j != pathnames.end(); j++) +// if (!(err = Load3DSFile(j->c_str()))) +// break; +// if (err) { +// cerr << "Error: cannot find model \"" << *i << "\" - check the path in the Options" << endl; +// return; +// } +// } +// } +// +// // Set the camera position +// float position[3]; +// float orientation[4]; +// ifs.read((char*)position, 3 * sizeof(*position)); +// ifs.read((char*)orientation, 4 * sizeof(*orientation)); +// _pView->setCameraState(position, orientation); +// _pView->saveCameraState(); +// +// if (only_camera) { +// return; +// } +// +// // Reset ViewMap +// if(NULL != _ViewMap) +// { +// delete _ViewMap; +// _ViewMap = 0; +// } +// _pView->DetachSilhouette(); +// if (NULL != _SilhouetteNode) +// { +// int ref = _SilhouetteNode->destroy(); +// if(0 == ref) +// delete _SilhouetteNode; +// } +// // if(NULL != _ProjectedSilhouette) +// // { +// // int ref = _ProjectedSilhouette->destroy(); +// // if(0 == ref) +// // delete _ProjectedSilhouette; +// // } +// // if(NULL != _VisibleProjectedSilhouette) +// // { +// // int ref = _VisibleProjectedSilhouette->destroy(); +// // if(0 == ref) +// // { +// // delete _VisibleProjectedSilhouette; +// // _VisibleProjectedSilhouette = 0; +// // } +// // } +// _ViewMap = new ViewMap(); +// +// // Read ViewMap +// _Chrono.start(); +// if (ViewMapIO::load(ifs, _ViewMap, 0)) { +// _Chrono.stop(); +// +// cerr << "Error: This is not a valid ." << Config::VIEWMAP_EXTENSION << " file" << endl; +// return; +// } +// +// // Update display +// ViewMapTesselator3D sTesselator3d; +// //ViewMapTesselator2D sTesselator2d; +// //sTesselator2d.SetNature(_edgeTesselationNature); +// sTesselator3d.SetNature(_edgeTesselationNature); +// +// // Tesselate the 3D edges: +// _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); +// _SilhouetteNode->addRef(); +// +// // Tesselate 2D edges +// // _ProjectedSilhouette = sTesselator2d.Tesselate(_ViewMap); +// // _ProjectedSilhouette->addRef(); +// // +// _pView->AddSilhouette(_SilhouetteNode); +// //_pView->Add2DSilhouette(_ProjectedSilhouette); +// +// // Update options window +// //_pOptionsWindow->updateViewMapFormat(); +// +// real d = _Chrono.stop(); +// cout << "ViewMap loading : " << d << endl; +// +// // Compute the Directional ViewMap: +// if(_ComputeSteerableViewMap){ +// ComputeSteerableViewMap(); +// } +// +// // Reset Style modules modification flags +// resetModified(true); +// } void Controller::ComputeViewMap() { diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 2a7868304ea..ba583080e79 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -35,26 +35,41 @@ extern "C" { if( view == NULL ) view = new AppGLWidget; + + controller->SetView(view); } void FRS_execute(Render* re) { + // instanciation Config::Path pathconfig; FRS_initialize(); - controller->SetView(view); + // initialize view dimensions unsigned int width = re->winx; unsigned int height = re->winy; view->setWidth(width); view->setHeight(height); view->_camera->setScreenWidthAndHeight(width, height); - //view->setCameraState(const float* position, const float* orientation) + // initialize camera + Object* maincam_obj = re->scene->camera; + Vec camPosition(maincam_obj->obmat[3][0], maincam_obj->obmat[3][1], maincam_obj->obmat[3][2]); + Vec camUp( re->viewmat[0][1], re->viewmat[1][1], re->viewmat[2][1]); + Vec camDirection( -re->viewmat[0][2], -re->viewmat[1][2], - re->viewmat[2][2]); + + view->_camera->setType(Camera::PERSPECTIVE); + view->_camera->setPosition(camPosition); + view->_camera->setUpVector(camUp); + view->_camera->setViewDirection(camDirection); + + // export scene to 3ds format string script_3ds_export = pathconfig.getProjectDir() + Config::DIR_SEP + "python" + Config::DIR_SEP + "3ds_export.py"; BPY_run_python_script( const_cast(script_3ds_export.c_str()) ); + // load 3ds scene char btempdir[255]; BLI_where_is_temp(btempdir,1); string exported_3ds_file = btempdir; @@ -67,22 +82,30 @@ extern "C" { return; } + // add style module string style_module = pathconfig.getProjectDir() + Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py"; controller->InsertStyleModule( 0, const_cast(style_module.c_str()) ); controller->toggleLayer(0, true); + + // compute view map controller->ComputeViewMap(); - controller->DrawStrokes(); // build strokes - view->draw(); // render final result + // build strokes + controller->DrawStrokes(); + // render final result + view->draw(); + + // copy result into render window RenderResult rres; RE_GetResultImage(re, &rres); view->readPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); re->result->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); - + + controller->CloseFile(); } #ifdef __cplusplus diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 41ad21f4544..5b2c7114fe3 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2194,14 +2194,26 @@ static void do_render_composite_fields_blur_3d(Render *re) static void freestyleRender(Render *re) { + float mat[4][4]; + + // init render result RE_FreeRenderResult(re->result); re->result = new_render_result(re, &re->disprect, 0, RR_USEMEM); + // set camera RE_SetCamera(re, re->scene->camera); - FRS_execute(re); + // set view + Mat4Ortho(re->scene->camera->obmat); + Mat4Invert(mat, re->scene->camera->obmat); + RE_SetView(re, mat); + // run Freestyle + re->i.starttime = PIL_check_seconds_timer(); + FRS_execute(re); + re->i.lastframetime = PIL_check_seconds_timer()- re->i.starttime; re->stats_draw(&re->i); + RE_Database_Free(re); } From f445dfbfb6113c0465491a5e1c275e81b602cc58 Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Mon, 16 Jun 2008 07:15:09 +0000 Subject: [PATCH 250/430] Patch [#13777] This commit fix the following problem in the DPX code: 1) The code always assume a depth of 10 bits 2) The code don't check the file type (Log or Linear) --- source/blender/imbuf/intern/cineon/dpxlib.c | 45 ++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c index a81e632a797..500c09ba265 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.c +++ b/source/blender/imbuf/intern/cineon/dpxlib.c @@ -441,10 +441,15 @@ intern_dpxOpen(int mode, const char* bytestuff, int bufsize) { default: break; } } - dpx->bitsPerPixel = 10; - /* dpx->bitsPerPixel = header.imageInfo.channel[0].bits_per_pixel; */ - dpx->imageOffset = ntohl(header.fileInfo.offset); + /* dpx->bitsPerPixel = 10; */ + dpx->bitsPerPixel = header.imageInfo.channel[0].bits_per_pixel; + if (dpx->bitsPerPixel != 10) { + if (verbose) d_printf("Don't support depth: %d\n", dpx->bitsPerPixel); + dpxClose(dpx); + return 0; + } + dpx->imageOffset = ntohl(header.fileInfo.offset); dpx->lineBufferLength = pixelsToLongs(dpx->width * dpx->depth); dpx->lineBuffer = malloc(dpx->lineBufferLength * 4); if (dpx->lineBuffer == 0) { @@ -471,6 +476,26 @@ intern_dpxOpen(int mode, const char* bytestuff, int bufsize) { dpx->fileYPos = 0; logImageGetByteConversionDefaults(&dpx->params); + /* The SMPTE define this code: + * 2 - Linear + * 3 - Logarithmic + * + * Note that transfer_characteristics is U8, don't need + * check the byte order. + */ + switch (header.imageInfo.channel[0].transfer_characteristics) { + case 2: + dpx->params.doLogarithm= 0; + break; + case 3: + dpx->params.doLogarithm= 1; + break; + default: + if (verbose) d_printf("Un-supported Transfer Characteristics: %d\n", header.imageInfo.channel[0].transfer_characteristics); + dpxClose(dpx); + return 0; + break; + } setupLut(dpx); dpx->getRow = &dpxGetRowBytes; @@ -563,6 +588,18 @@ dpxCreate(const char* filename, int width, int height, int depth) { ++shortFilename; } initDpxMainHeader(dpx, &header, shortFilename); + logImageGetByteConversionDefaults(&dpx->params); + /* Need set the file type before write the header! + * 2 - Linear + * 3 - Logarithmic + * + * Note that transfer characteristics is U8, don't need + * check the byte order. + */ + if (dpx->params.doLogarithm == 0) + header.imageInfo.channel[0].transfer_characteristics= 2; + else + header.imageInfo.channel[0].transfer_characteristics= 3; if (fwrite(&header, sizeof(header), 1, dpx->file) == 0) { if (verbose) d_printf("Couldn't write image header\n"); @@ -570,8 +607,6 @@ dpxCreate(const char* filename, int width, int height, int depth) { return 0; } dpx->fileYPos = 0; - - logImageGetByteConversionDefaults(&dpx->params); setupLut(dpx); dpx->getRow = 0; From 9b69c569178e118e1e2486f167164673a4201be0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Jun 2008 09:16:04 +0000 Subject: [PATCH 251/430] Material color was always overriding OBCOL for blender text. --- source/gameengine/BlenderRoutines/KX_BlenderGL.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 7c9dbcdaab2..2a5cc14018f 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -133,7 +133,12 @@ void BL_RenderText(int mode,const char* textstr,int textlen,struct MTFace* tface characters = 0; } - if(!col) glColor3f(1.0f, 1.0f, 1.0f); + /* When OBCOL flag is on the color is set in IndexPrimitives_3DText */ + if (tface->mode & TF_OBCOL) { /* Color has been set */ + col= NULL; + } else { + if(!col) glColor3f(1.0f, 1.0f, 1.0f); + } glPushMatrix(); for (index = 0; index < characters; index++) { From 1e3bdcf19846974b11c5a497eea56a34cdec0dde Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Jun 2008 14:08:24 +0000 Subject: [PATCH 252/430] bugfix from Markus Ilmola (glome) patch was in [#8540] Import scripts for MilkShape3D file formats Some animations were incorrectly imported and this adds support for weights. --- release/scripts/ms3d_import.py | 132 +++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 13 deletions(-) diff --git a/release/scripts/ms3d_import.py b/release/scripts/ms3d_import.py index 78ffbb92847..c1438cbfc97 100644 --- a/release/scripts/ms3d_import.py +++ b/release/scripts/ms3d_import.py @@ -50,7 +50,7 @@ def RM(a): cp = cos(a[1]) sr = sin(a[0]) cr = cos(a[0]) - return Matrix([cp*cy, sr*sp*cy+cr*-sy, cr*sp*cy+-sr*-sy],[cp*sy, sr*sp*sy+cr*cy, cr*sp*sy+-sr*cy], [-sp, sr*cp, cr*cp]) + return Matrix([cp*cy, cp*sy, -sp], [sr*sp*cy+cr*-sy, sr*sp*sy+cr*cy, sr*cp],[cr*sp*cy+-sr*-sy, cr*sp*sy+-sr*cy, cr*cp]) # Converts ms3d euler angles to a quaternion @@ -94,7 +94,12 @@ def import_ms3d(path): except IOError: return "Failed to open the file!" - # read id + # get the file size + file.seek(0, os.SEEK_END); + fileSize = file.tell(); + file.seek(0, os.SEEK_SET); + + # read id to check if the file is a MilkShape3D file id = file.read(10) if id!="MS3D000000": return "The file is not a MS3D file!" @@ -123,7 +128,7 @@ def import_ms3d(path): coords.append(struct.unpack("fff", file.read(3*4))) # read bone ids - boneIds.append(struct.unpack("B", file.read(1))[0]) + boneIds.append(struct.unpack("b", file.read(1))[0]) # skip refcount file.read(1) @@ -190,9 +195,10 @@ def import_ms3d(path): triangleIndices = struct.unpack(str(numGroupTriangles) + "H", file.read(2*numGroupTriangles)); # read material - material = struct.unpack("B", file.read(1))[0] - for j in xrange(numGroupTriangles): - mesh.faces[triangleIndices[j]].mat = material + material = struct.unpack("b", file.read(1))[0] + if material>=0: + for j in xrange(numGroupTriangles): + mesh.faces[triangleIndices[j]].mat = material # read the number of materials numMaterials = struct.unpack("H", file.read(2))[0] @@ -224,7 +230,6 @@ def import_ms3d(path): # read shininess shininess = struct.unpack("f", file.read(4))[0] - print "Shininess: " + str(shininess) # read transparency transparency = struct.unpack("f", file.read(4))[0] @@ -272,6 +277,7 @@ def import_ms3d(path): armature.makeEditable() # read joints + joints = [] rotKeys = {} posKeys = {} for i in xrange(numJoints): @@ -280,6 +286,7 @@ def import_ms3d(path): # read name name = uku(file.read(32)) + joints.append(name) # create the bone bone = Blender.Armature.Editbone() @@ -295,11 +302,13 @@ def import_ms3d(path): # read position pos = struct.unpack("fff", file.read(3*4)) - + # set head if bone.hasParent(): - bone.head = bone.parent.matrix * Vector(pos) + bone.parent.head - bone.matrix = bone.parent.matrix * RM(rot) + bone.head = Vector(pos) * bone.parent.matrix + bone.parent.head + tempM = RM(rot) * bone.parent.matrix + tempM.transpose; + bone.matrix = tempM else: bone.head = Vector(pos) bone.matrix = RM(rot) @@ -355,13 +364,111 @@ def import_ms3d(path): # create position keys for key in posKeys[name]: pbone.loc = Vector(key[1]) - pbone.insertKey(armOb, int(key[0]), Blender.Object.Pose.LOC, True) + pbone.insertKey(armOb, int(key[0]+0.5), Blender.Object.Pose.LOC, True) # create rotation keys for key in rotKeys[name]: pbone.quat = RQ(key[1]) - pbone.insertKey(armOb, int(key[0]), Blender.Object.Pose.ROT, True) + pbone.insertKey(armOb, int(key[0]+0.5), Blender.Object.Pose.ROT, True) + + # The old format ends here. If there is more data then the file is newer version + + # check to see if there are any comments + if file.tell()0: + print "Group comment: " + file.read(size) + + # Material comments + numComments = struct.unpack("i", file.read(4))[0] + for i in range(numComments): + file.read(4) # index + size = struct.unpack("i", file.read(4))[0] # comment size + if size>0: + print "Material comment: " + file.read(size) + + # Joint comments + numComments = struct.unpack("i", file.read(4))[0] + for i in range(numComments): + file.read(4) # index + size = struct.unpack("i", file.read(4))[0] # comment size + if size>0: + print "Joint comment: " + file.read(size) + + # Model comments + numComments = struct.unpack("i", file.read(4))[0] + for i in range(numComments): + file.read(4) # index + size = struct.unpack("i", file.read(4))[0] # comment size + if size>0: + print "Model comment: " + file.read(size) + + # Unknown version give a warning + else: + print "Warning: Unknown version!" + + + # check to see if there is any extra vertex data + if file.tell()=0 or ids[1]>=0 or ids[2]>=0: + mesh.assignVertsToGroup(joints[boneIds[i]], [i], 0.01*weights[0], 1) + if ids[0]>=0: + mesh.assignVertsToGroup(joints[ids[0]], [i], 0.01*weights[1], 1) + if ids[1]>=0: + mesh.assignVertsToGroup(joints[ids[1]], [i], 0.01*weights[2], 1) + if ids[2]>=0: + mesh.assignVertsToGroup(joints[ids[2]], [i], 0.01*(100-(weights[0]+weights[1]+weights[2])), 1) + + elif subVersion==1: + # read extra data for each vertex + for i in xrange(numVertices): + # bone ids + ids = struct.unpack("bbb", file.read(3)) + # weights + weights = struct.unpack("BBB", file.read(3)) + # add extra vertices with weights to deform groups + if ids[0]>=0 or ids[1]>=0 or ids[2]>=0: + mesh.assignVertsToGroup(joints[boneIds[i]], [i], 0.01*weights[0], 1) + if ids[0]>=0: + mesh.assignVertsToGroup(joints[ids[0]], [i], 0.01*weights[1], 1) + if ids[1]>=0: + mesh.assignVertsToGroup(joints[ids[1]], [i], 0.01*weights[2], 1) + if ids[2]>=0: + mesh.assignVertsToGroup(joints[ids[2]], [i], 0.01*(100-(weights[0]+weights[1]+weights[2])), 1) + + # non supported subversion give a warning + else: + print "Warning: Unknown subversion!" + # rest of the extra data in the file is not imported/used + + # refresh the view Blender.Redraw() # close the file @@ -378,4 +485,3 @@ def fileCallback(filename): Blender.Draw.PupMenu("An error occured during import: " + error + "|Not all data might have been imported succesfully.", 2) Blender.Window.FileSelector(fileCallback, 'Import') - From bb539ce1b5171fb2b34379655071054905c802cf Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 16 Jun 2008 16:48:09 +0000 Subject: [PATCH 253/430] Snapping Snap to cage only in edit mode (respect the edit cage flag of modifiers). Especially important for subsurf, otherwise, Andy's automerge + snap video doesn't work in current SVN. --- source/blender/src/transform_snap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 3a1017915f9..405b512bb5d 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -1056,14 +1056,13 @@ int snapObjects(int *dist, float *loc, float *no, int mode) { if (mode == NOT_ACTIVE) { - DerivedMesh *dm, *dm_cage; + DerivedMesh *dm; Object *ob = G.obedit; - dm_cage = editmesh_get_derived_cage_and_final(&dm, CD_MASK_BAREMESH); + dm = editmesh_get_derived_cage(CD_MASK_BAREMESH); retval = snapDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, loc, no, dist, &depth, 1); - dm_cage->release(dm_cage); dm->release(dm); } From 6be46f9ee3c29da2022e14bf812a5dac172453cb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Jun 2008 19:54:43 +0000 Subject: [PATCH 254/430] [#11456] New datablock type(s) added to Oops Schematic patch from Shawn Zilbert (enigmatic) This patch adds the camera data block type to the oops schematic view of the outliner. It also includes a little bit of code cleanup in the oops files. --- source/blender/include/BIF_oops.h | 8 ++ source/blender/makesdna/DNA_space_types.h | 1 + source/blender/src/drawoops.c | 9 ++ source/blender/src/header_oops.c | 4 +- source/blender/src/oops.c | 114 ++++++++++++++++++---- 5 files changed, 117 insertions(+), 19 deletions(-) diff --git a/source/blender/include/BIF_oops.h b/source/blender/include/BIF_oops.h index f6984a23f47..adeac4f3871 100644 --- a/source/blender/include/BIF_oops.h +++ b/source/blender/include/BIF_oops.h @@ -39,6 +39,10 @@ struct Mesh; struct MetaBall; struct Object; struct Lamp; +struct Camera; +struct Texture; +struct Lattice; +struct bArmature; void add_curve_oopslinks(struct Curve *cu, struct Oops *oops, short flag); void add_from_link(struct Oops *from, struct Oops *oops); void add_material_oopslinks(struct Material *ma, struct Oops *oops, short flag); @@ -46,6 +50,9 @@ void add_mball_oopslinks(struct MetaBall *mb, struct Oops *oops, short flag); void add_mesh_oopslinks(struct Mesh *me, struct Oops *oops, short flag); void add_object_oopslinks(struct Object *ob, struct Oops *oops, short flag); void add_lamp_oopslinks(struct Lamp *la, struct Oops *oops, short flag); +void add_camera_oopslinks(struct Camera *ca, struct Oops *oops, short flag); +void add_texture_oopslinks(struct Tex *tex, struct Oops *oops, short flag); +void add_lattice_oopslinks(struct Lattice *lt, struct Oops *oops, short flag); struct Oops *add_oops(void *id); struct OopsLink *add_oopslink(char *name, struct Oops *oops, short type, void *from, float xof, float yof); struct Oops *add_test_oops(void *id); /* incl links */ @@ -66,3 +73,4 @@ void test_oopslinko(struct OopsLink *ol); #endif + diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 619dfbb43a0..af60f9ca713 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -559,6 +559,7 @@ typedef struct SpaceImaSel { #define OOPS_IM 4096 #define OOPS_AR 8192 #define OOPS_GR 16384 +#define OOPS_CA 32768 /* SpaceOops->outlinevis */ #define SO_ALL_SCENES 0 diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c index 5da38135be3..75bea40a8b4 100644 --- a/source/blender/src/drawoops.c +++ b/source/blender/src/drawoops.c @@ -229,6 +229,8 @@ void draw_icon_oops(float *co, short type) case ID_LI: icon= ICON_LIBRARY_HLT; break; case ID_IM: icon= ICON_IMAGE_HLT; break; case ID_GR: icon= ICON_CIRCLE_DEHLT; break; + case ID_CA: icon= ICON_CAMERA_DEHLT; break; + case ID_AR: icon= ICON_ARMATURE; break; } glEnable(GL_BLEND); @@ -282,6 +284,12 @@ unsigned int give_oops_color(short type, short sel, unsigned int *border) body= 0x35659F; break; case ID_GR: body= 0x507050; break; + case ID_CA: + body= 0x7570A0; break; + case ID_LT: + body= 0xA08090; break; + case ID_AR: + body= 0x70B0C0; break; default: body= 0x606070; break; } @@ -516,3 +524,4 @@ void drawoopsspace(ScrArea *sa, void *spacedata) + diff --git a/source/blender/src/header_oops.c b/source/blender/src/header_oops.c index 7bfbf0ee667..ad65705b79d 100644 --- a/source/blender/src/header_oops.c +++ b/source/blender/src/header_oops.c @@ -509,8 +509,9 @@ void oops_buttons(void) uiDefIconButBitS(block, TOG, OOPS_IM, B_NEWOOPS, ICON_IMAGE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Image datablocks"); uiDefIconButBitS(block, TOG, OOPS_GR, B_NEWOOPS, ICON_CIRCLE_DEHLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Group datablocks"); uiDefIconButBitS(block, TOG, OOPS_LI, B_NEWOOPS, ICON_LIBRARY_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Library datablocks"); + uiDefIconButBitS(block, TOG, OOPS_CA, B_NEWOOPS, ICON_CAMERA_DEHLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Camera datablocks"); + uiDefIconButBitS(block, TOG, OOPS_AR, B_NEWOOPS, ICON_ARMATURE, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Armature datablocks"); - uiBlockEndAlign(block); /* name */ @@ -576,3 +577,4 @@ void oops_buttons(void) uiDrawBlock(block); } + diff --git a/source/blender/src/oops.c b/source/blender/src/oops.c index 1f851d2fa6c..99645b5e71f 100644 --- a/source/blender/src/oops.c +++ b/source/blender/src/oops.c @@ -48,6 +48,9 @@ #include "DNA_texture_types.h" #include "DNA_key_types.h" #include "DNA_group_types.h" +#include "DNA_camera_types.h" +#include "DNA_lattice_types.h" +#include "DNA_armature_types.h" #include "BKE_utildefines.h" #include "BKE_global.h" @@ -661,7 +664,6 @@ void add_material_oopslinks(Material *ma, Oops *oops, short flag) add_oopslink("group", oops, ID_GR, &(ma->group), OOPSX, (float)(0.5*OOPSY)); } - void add_group_oopslinks(Group *gp, Oops *oops, short flag) { GroupObject *gob; @@ -672,7 +674,6 @@ void add_group_oopslinks(Group *gp, Oops *oops, short flag) } } - void add_object_oopslinks(Object *ob, Oops *oops, short flag) { ID *id; @@ -698,6 +699,12 @@ void add_object_oopslinks(Object *ob, Oops *oops, short flag) case ID_LA: if(flag & OOPS_LA) add_oopslink("data", oops, ID_LA, &ob->data, (float)(.5*OOPSX), (float)OOPSY); break; + case ID_CA: + if(flag & OOPS_CA) add_oopslink("data", oops, ID_CA, &ob->data, (float)(.5*OOPSX), (float)OOPSY); + break; + case ID_AR: + if(flag & OOPS_AR) add_oopslink("data", oops, ID_AR, &ob->data, (float)(.5*OOPSX), (float)OOPSY); + break; } } @@ -748,7 +755,6 @@ void add_curve_oopslinks(Curve *cu, Oops *oops, short flag) add_oopslink("speed", oops, ID_IP, &cu->ipo, OOPSX, (float)(0.5*OOPSY)); if(cu->key) add_oopslink("ipo", oops, ID_IP, &cu->key->ipo, OOPSX, (float)(0.5*OOPSY)); } - } void add_mball_oopslinks(MetaBall *mb, Oops *oops, short flag) @@ -775,15 +781,36 @@ void add_lamp_oopslinks(Lamp *la, Oops *oops, short flag) } } } + if(flag & OOPS_IP) { + add_oopslink("ipo", oops, ID_IP, &la->ipo, OOPSX, (float)(0.5*OOPSY)); + } } +void add_camera_oopslinks(Camera *ca, Oops *oops, short flag) +{ + if(flag & OOPS_IP) { + add_oopslink("ipo", oops, ID_IP, &ca->ipo, OOPSX, (float)(0.5*OOPSY)); + } +} + +void add_texture_oopslinks(Tex *tex, Oops *oops, short flag) +{ + if(flag & OOPS_IM) { + add_oopslink("image", oops, ID_IM, &tex->ima, OOPSX, (float)(0.5*OOPSY)); + } +} + +void add_lattice_oopslinks(Lattice *lt, Oops *oops, short flag) +{ + if(flag & OOPS_IP) { + if(lt->key) add_oopslink("ipo", oops, ID_IP, <->key->ipo, OOPSX, (float)(0.5*OOPSY)); + } +} Oops *add_test_oops(void *id) /* incl links */ { Oops *oops; Object *ob; - Lamp *la; - Tex *tex; if(id==0) return NULL; @@ -821,9 +848,10 @@ Oops *add_test_oops(void *id) /* incl links */ add_mball_oopslinks((MetaBall *)id, oops, G.soops->visiflag); break; case ID_LA: - la= (Lamp *)id; - add_lamp_oopslinks(la, oops, G.soops->visiflag); - if(la->ipo) if(G.soops->visiflag & OOPS_IP) add_oopslink("ipo", oops, ID_IP, &la->ipo, OOPSX, (float)(0.3*OOPSY)); + add_lamp_oopslinks((Lamp *)id, oops, G.soops->visiflag); + break; + case ID_CA: + add_camera_oopslinks((Camera *)id, oops, G.soops->visiflag); break; case ID_IP: @@ -835,8 +863,14 @@ Oops *add_test_oops(void *id) /* incl links */ add_group_oopslinks((Group *)id, oops, G.soops->visiflag); break; case ID_TE: - tex= (Tex *)id; - if(tex->ima) if(G.soops->visiflag & OOPS_IM) add_oopslink("image", oops, ID_IM, &tex->ima, OOPSX, (float)(0.3*OOPSY)); + add_texture_oopslinks((Tex *)id, oops, G.soops->visiflag); + break; + case ID_LT: + add_lattice_oopslinks((Lattice *)id, oops, G.soops->visiflag); + break; + case ID_AR: + + break; } return oops; @@ -897,7 +931,7 @@ void build_oops() while(sce) { oops= add_test_oops(sce); - + if(G.soops->visiflag & OOPS_OB) { base= sce->base.first; while(base) { @@ -912,12 +946,13 @@ void build_oops() if(G.soops->visiflag & OOPS_OB) { Object *ob= G.main->object.first; - + while(ob) { oops= add_test_oops(ob); ob= ob->id.next; } } + if(G.soops->visiflag & OOPS_ME) { Mesh *me= G.main->mesh.first; while(me) { @@ -925,7 +960,7 @@ void build_oops() me= me->id.next; } } - + if(G.soops->visiflag & OOPS_CU) { Curve *cu= G.main->curve.first; while(cu) { @@ -933,7 +968,7 @@ void build_oops() cu= cu->id.next; } } - + if(G.soops->visiflag & OOPS_MB) { MetaBall *mb= G.main->mball.first; while(mb) { @@ -941,7 +976,7 @@ void build_oops() mb= mb->id.next; } } - + if(G.soops->visiflag & OOPS_LA) { Lamp *la= G.main->lamp.first; while(la) { @@ -950,6 +985,14 @@ void build_oops() } } + if(G.soops->visiflag & OOPS_CA) { + Camera *ca= G.main->camera.first; + while(ca) { + oops= add_test_oops(ca); + ca= ca->id.next; + } + } + if(G.soops->visiflag & OOPS_IP) { Ipo *ipo= G.main->ipo.first; while(ipo) { @@ -972,6 +1015,7 @@ void build_oops() tex= tex->id.next; } } + if(G.soops->visiflag & OOPS_IM) { Image *ima= G.main->image.first; while(ima) { @@ -979,6 +1023,7 @@ void build_oops() ima= ima->id.next; } } + if(G.soops->visiflag & OOPS_GR) { Group *gp= G.main->group.first; while(gp) { @@ -986,6 +1031,23 @@ void build_oops() gp= gp->id.next; } } + + if(G.soops->visiflag & OOPS_LT) { + Lattice *lt= G.main->latt.first; + while(lt) { + oops= add_test_oops(lt); + lt= lt->id.next; + } + } + + if(G.soops->visiflag & OOPS_AR) { + bArmature *ar= G.main->armature.first; + while(ar) { + oops= add_test_oops(ar); + ar= ar->id.next; + } + } + } else { @@ -1068,6 +1130,7 @@ void build_oops() else if(type==ID_LA && G.soops->visiflag & OOPS_LA) { Lamp *la= ob->data; oops= add_test_oops(ob->data); + if(G.soops->visiflag & OOPS_IP) add_test_oops(la->ipo); if(G.soops->visiflag & OOPS_TE) { for(a=0; avisiflag & OOPS_CA) { + Camera *ca= ob->data; + oops= add_test_oops(ob->data); + + if(G.soops->visiflag & OOPS_IP) add_test_oops(ca->ipo); + } + else if(type==ID_LT && G.soops->visiflag & OOPS_LT) { + Lattice *lt= ob->data; + oops= add_test_oops(ob->data); + + if(G.soops->visiflag & OOPS_IP) { + if(lt->key) oops= add_test_oops(lt->key->ipo); + } + } + else if(type==ID_AR && G.soops->visiflag & OOPS_AR) { + bArmature *ar= ob->data; + oops= add_test_oops(ob->data); + } } } base= base->next; } } - - - /* test links */ oops= G.soops->oops.first; From 4c391a0c30018917f6173d1200efcb93c02211f5 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Tue, 17 Jun 2008 04:18:34 +0000 Subject: [PATCH 255/430] * Simple addition to math node (comp and shading): Greater Than and Less Than modes. --- .../blender/nodes/intern/CMP_nodes/CMP_math.c | 18 +++++++++++++++++- .../blender/nodes/intern/SHD_nodes/SHD_math.c | 18 +++++++++++++++++- source/blender/src/drawnode.c | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c index e317998b5fc..d00ce18a44f 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c @@ -131,7 +131,23 @@ static void do_math(bNode *node, float *out, float *in, float *in2) { out[0]= (int)(in[0] + 0.5f); } - break; + break; + case 15: /* Less Than */ + { + if( in[0] < in2[0] ) + out[0]= 1.0f; + else + out[0]= 0.0f; + } + break; + case 16: /* Greater Than */ + { + if( in[0] > in2[0] ) + out[0]= 1.0f; + else + out[0]= 0.0f; + } + break; } } diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_math.c b/source/blender/nodes/intern/SHD_nodes/SHD_math.c index 95162e508d5..2e156cf12bf 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_math.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_math.c @@ -174,7 +174,23 @@ bNodeStack **out) else out[0]->vec[0]= (int)(in[1]->vec[0] + 0.5f); } - break; + break; + case 15: /* Less Than */ + { + if( in[0]->vec[0] < in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; + case 16: /* Greater Than */ + { + if( in[0]->vec[0] > in[1]->vec[0] ) + out[0]->vec[0]= 1.0f; + else + out[0]->vec[0]= 0.0f; + } + break; } } diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c index cea33685744..1169062fdd0 100644 --- a/source/blender/src/drawnode.c +++ b/source/blender/src/drawnode.c @@ -517,7 +517,7 @@ static int node_buts_math(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *b if(block) { uiBut *bt; - bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); + bt=uiDefButS(block, MENU, B_NODE_EXEC, "Add %x0|Subtract %x1|Multiply %x2|Divide %x3|Sine %x4|Cosine %x5|Tangent %x6|Arcsine %x7|Arccosine %x8|Arctangent %x9|Power %x10|Logarithm %x11|Minimum %x12|Maximum %x13|Round %x14|Less Than %x15|Greater Than %x16", butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20, &node->custom1, 0, 0, 0, 0, ""); uiButSetFunc(bt, node_but_title_cb, node, bt); } return 20; From c9d1924ea5575ae2a4ce2cc7fd16e63e6ef14d84 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 17 Jun 2008 10:06:38 +0000 Subject: [PATCH 256/430] Use the scenes framerate for ipo and action framerate in the game engine, was hard coded to 25. --- .../BlenderRoutines/BL_KetsjiEmbedStart.cpp | 6 ++++++ source/gameengine/Converter/BL_ActionActuator.cpp | 8 ++++---- source/gameengine/Ketsji/KX_GameObject.h | 3 +-- source/gameengine/Ketsji/KX_IpoActuator.cpp | 6 +++--- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 13 ++++++++++++- source/gameengine/Ketsji/KX_KetsjiEngine.h | 10 ++++++++++ 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index fa8409b123e..eb575c70ad7 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -372,6 +372,12 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, // start the engine ketsjiengine->StartEngine(true); + + // Set the animation playback rate for ipo's and actions + // the framerate below should patch with FPS macro defined in blendef.h + // Could be in StartEngine set the framerate, we need the scene to do this + ketsjiengine->SetAnimFrameRate( (((double) blscene->r.frs_sec) / blscene->r.frs_sec_base) ); + // the mainloop while (!exitrequested) { diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 1055c8771ef..ad126ebf123 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -134,14 +134,14 @@ void BL_ActionActuator::SetStartTime(float curtime) float direction = m_startframe < m_endframe ? 1.0 : -1.0; if (!(m_flag & ACT_FLAG_REVERSE)) - m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_FIXED_FRAME_PER_SEC; + m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_KetsjiEngine::GetAnimFrameRate(); else - m_starttime = curtime - direction*(m_endframe - m_localtime)/KX_FIXED_FRAME_PER_SEC; + m_starttime = curtime - direction*(m_endframe - m_localtime)/KX_KetsjiEngine::GetAnimFrameRate(); } void BL_ActionActuator::SetLocalTime(float curtime) { - float delta_time = (curtime - m_starttime)*KX_FIXED_FRAME_PER_SEC; + float delta_time = (curtime - m_starttime)*KX_KetsjiEngine::GetAnimFrameRate(); if (m_endframe < m_startframe) delta_time = -delta_time; @@ -385,7 +385,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame) blend_poses(m_pose, m_blendpose, 1.0 - newweight, ACTSTRIPMODE_BLEND); /* Increment current blending percentage */ - m_blendframe = (curtime - m_blendstart)*KX_FIXED_FRAME_PER_SEC; + m_blendframe = (curtime - m_blendstart)*KX_KetsjiEngine::GetAnimFrameRate(); if (m_blendframe>m_blendin) m_blendframe = m_blendin; diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 56b9f3f6375..8a90ec1463a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -45,9 +45,8 @@ #include "GEN_Map.h" #include "GEN_HashedPtr.h" #include "KX_Scene.h" +#include "KX_KetsjiEngine.h" /* for m_anim_framerate */ -#define KX_FIXED_FRAME_PER_SEC 25.0f -#define KX_FIXED_SEC_PER_FRAME (1.0f / KX_FIXED_FRAME_PER_SEC) #define KX_OB_DYNAMIC 1 diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 0f9caa456d9..cf246342cf9 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -164,14 +164,14 @@ void KX_IpoActuator::SetStartTime(float curtime) curtime = curtime - KX_KetsjiEngine::GetSuspendedDelta(); if (m_direction > 0) - m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_FIXED_FRAME_PER_SEC; + m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_KetsjiEngine::GetAnimFrameRate(); else - m_starttime = curtime - direction*(m_endframe - m_localtime)/KX_FIXED_FRAME_PER_SEC; + m_starttime = curtime - direction*(m_endframe - m_localtime)/KX_KetsjiEngine::GetAnimFrameRate(); } void KX_IpoActuator::SetLocalTime(float curtime) { - float delta_time = ((curtime - m_starttime) - KX_KetsjiEngine::GetSuspendedDelta())*KX_FIXED_FRAME_PER_SEC; + float delta_time = ((curtime - m_starttime) - KX_KetsjiEngine::GetSuspendedDelta())*KX_KetsjiEngine::GetAnimFrameRate(); // negative delta_time is caused by floating point inaccuracy // perhaps the inaccuracy could be reduced a bit diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 1e3393d59a8..56a06786679 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -71,6 +71,7 @@ #include "KX_TimeCategoryLogger.h" #include "RAS_FramingManager.h" +#include "stdio.h" // If define: little test for Nzc: guarded drawing. If the canvas is // not valid, skip rendering this frame. @@ -91,7 +92,7 @@ const char KX_KetsjiEngine::m_profileLabels[tc_numCategories][15] = { }; double KX_KetsjiEngine::m_ticrate = DEFAULT_LOGIC_TIC_RATE; - +double KX_KetsjiEngine::m_anim_framerate = 25.0; double KX_KetsjiEngine::m_suspendedtime = 0.0; double KX_KetsjiEngine::m_suspendeddelta = 0.0; @@ -1383,6 +1384,16 @@ void KX_KetsjiEngine::SetTicRate(double ticrate) m_ticrate = ticrate; } +double KX_KetsjiEngine::GetAnimFrameRate() +{ + return m_anim_framerate; +} + +void KX_KetsjiEngine::SetAnimFrameRate(double framerate) +{ + m_anim_framerate = framerate; +} + void KX_KetsjiEngine::SetTimingDisplay(bool frameRate, bool profile, bool properties) { m_show_framerate = frameRate; diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index bc2e3864be8..4c09bc3fcd5 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -103,6 +103,7 @@ private: double m_remainingTime; static double m_ticrate; + static double m_anim_framerate; /* for animation playback only - ipo and action */ static double m_suspendedtime; static double m_suspendeddelta; @@ -260,6 +261,15 @@ public: */ static void SetTicRate(double ticrate); + /** + * Gets the framerate for playing animations. (actions and ipos) + */ + static double GetAnimFrameRate(); + /** + * Sets the framerate for playing animations. (actions and ipos) + */ + static void SetAnimFrameRate(double framerate); + /** * Activates or deactivates timing information display. * @param frameRate Display for frame rate on or off. From 272a91f754fd215f2ad9b48ba80fe56ee0564d7a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 17 Jun 2008 10:27:34 +0000 Subject: [PATCH 257/430] Merge of apricot branch game engine changes into trunk, excluding GLSL. GLEW ==== Added the GLEW opengl extension library into extern/, always compiled into Blender now. This is much nicer than doing this kind of extension management manually, and will be used in the game engine, for GLSL, and other opengl extensions. * According to the GLEW website it works on Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris. There might still be platform specific issues due to this commit, so let me know and I'll look into it. * This means also that all extensions will now always be compiled in, regardless of the glext.h on the platform where compilation happens. Game Engine =========== Refactoring of the use of opengl extensions and other drawing code in the game engine, and cleaning up some hacks related to GLSL integration. These changes will be merged into trunk too after this. The game engine graphics demos & apricot level survived my tests, but this could use some good testing of course. For users: please test with the options "Generate Display Lists" and "Vertex Arrays" enabled, these should be the fastest and are supposed to be "unreliable", but if that's the case that's probably due to bugs that can be fixed. * The game engine now also uses GLEW for extensions, replacing the custom opengl extensions code that was there. Removes a lot of #ifdef's, but the runtime checks stay of course. * Removed the WITHOUT_GLEXT environment variable. This was added to work around a specific bug and only disabled multitexturing anyway. It might also have caused a slowdown since it was retrieving the environment variable for every vertex in immediate mode (bug #13680). * Refactored the code to allow drawing skinned meshes with vertex arrays too, removing some specific immediate mode drawing functions for this that only did extra normal calculation. Now it always splits vertices of flat faces instead. * Refactored normal recalculation with some minor optimizations, required for the above change. * Removed some outdated code behind the __NLA_OLDDEFORM #ifdef. * Fixed various bugs in setting of multitexture coordinates and vertex attributes for vertex arrays. These were not being enabled/disabled correct according to the opengl spec, leading to crashes. Also tangent attributes used an immediate mode call for vertex arrays, which can't work. * Fixed use of uninitialized variable in RAS_TexVert. * Exporting skinned meshes was doing O(n^2) lookups for vertices and deform weights, now uses same trick as regular meshes. --- blenderplayer/CMakeLists.txt | 1 + extern/CMakeLists.txt | 3 + extern/Makefile | 2 +- extern/SConscript | 2 + extern/glew/CMakeLists.txt | 33 + extern/glew/README.txt | 18 + extern/glew/SConscript | 12 + extern/glew/include/GL/glew.h | 9797 +++++++++++++++++ extern/glew/include/GL/glxew.h | 1062 ++ extern/glew/include/GL/wglew.h | 934 ++ extern/glew/src/Makefile | 56 + extern/glew/src/glew.c | 9756 ++++++++++++++++ source/Makefile | 1 + source/blender/src/CMakeLists.txt | 2 +- source/blender/src/Makefile | 1 + source/blender/src/SConscript | 2 +- source/blender/src/usiblender.c | 1 + source/creator/CMakeLists.txt | 1 + .../BlenderRoutines/BL_KetsjiEmbedStart.cpp | 44 +- .../gameengine/BlenderRoutines/CMakeLists.txt | 1 + .../BlenderRoutines/KX_BlenderCanvas.h | 8 +- .../BlenderRoutines/KX_BlenderGL.cpp | 52 +- .../BlenderRoutines/KX_BlenderRenderTools.cpp | 13 +- source/gameengine/BlenderRoutines/Makefile | 3 +- source/gameengine/BlenderRoutines/SConscript | 1 + .../BlenderRoutines/mac_compat_glext.h | 132 - .../Converter/BL_ArmatureObject.cpp | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 33 +- .../gameengine/Converter/BL_MeshDeformer.cpp | 160 +- source/gameengine/Converter/BL_MeshDeformer.h | 7 +- .../gameengine/Converter/BL_SkinDeformer.cpp | 43 +- source/gameengine/Converter/BL_SkinDeformer.h | 4 +- .../Converter/BL_SkinMeshObject.cpp | 24 +- .../gameengine/Converter/BL_SkinMeshObject.h | 43 +- .../Converter/KX_BlenderSceneConverter.cpp | 14 +- .../Converter/KX_BlenderSceneConverter.h | 5 + .../GamePlayer/common/CMakeLists.txt | 1 + .../gameengine/GamePlayer/common/GPC_Canvas.h | 18 +- .../GamePlayer/common/GPC_PolygonMaterial.cpp | 19 +- .../GamePlayer/common/GPC_RenderTools.cpp | 14 +- .../GamePlayer/common/GPC_RenderTools.h | 15 +- source/gameengine/GamePlayer/common/Makefile | 1 + .../gameengine/GamePlayer/common/SConscript | 3 +- .../GamePlayer/ghost/CMakeLists.txt | 1 + .../GamePlayer/ghost/GPG_Application.cpp | 43 +- .../GamePlayer/ghost/GPG_Application.h | 1 + source/gameengine/GamePlayer/ghost/Makefile | 1 + source/gameengine/GamePlayer/ghost/SConscript | 3 +- source/gameengine/Ketsji/BL_BlenderShader.cpp | 149 + source/gameengine/Ketsji/BL_BlenderShader.h | 44 + source/gameengine/Ketsji/BL_Material.cpp | 1 + source/gameengine/Ketsji/BL_Material.h | 3 +- source/gameengine/Ketsji/BL_Shader.cpp | 306 +- source/gameengine/Ketsji/BL_Texture.cpp | 161 +- source/gameengine/Ketsji/CMakeLists.txt | 1 + .../gameengine/Ketsji/KX_BlenderMaterial.cpp | 309 +- source/gameengine/Ketsji/KX_BlenderMaterial.h | 13 +- source/gameengine/Ketsji/KX_GameObject.cpp | 4 +- source/gameengine/Ketsji/KX_ISceneConverter.h | 3 + source/gameengine/Ketsji/KX_PythonInit.cpp | 70 +- source/gameengine/Ketsji/Makefile | 1 + source/gameengine/Ketsji/SConscript | 2 +- source/gameengine/Rasterizer/CMakeLists.txt | 1 + source/gameengine/Rasterizer/Makefile | 1 + .../Rasterizer/RAS_2DFilterManager.cpp | 63 +- source/gameengine/Rasterizer/RAS_CameraData.h | 4 +- .../Rasterizer/RAS_IPolygonMaterial.cpp | 6 - .../Rasterizer/RAS_IPolygonMaterial.h | 2 - .../gameengine/Rasterizer/RAS_IRasterizer.h | 29 +- .../Rasterizer/RAS_MaterialBucket.cpp | 39 +- .../gameengine/Rasterizer/RAS_MeshObject.cpp | 27 +- source/gameengine/Rasterizer/RAS_MeshObject.h | 1 + .../RAS_OpenGLRasterizer/ARB_multitexture.h | 150 - .../RAS_OpenGLRasterizer/CMakeLists.txt | 1 + .../EXT_separate_specular_color.h | 12 - .../Rasterizer/RAS_OpenGLRasterizer/Makefile | 1 + .../RAS_GLExtensionManager.cpp | 674 +- .../RAS_GLExtensionManager.h | 507 +- .../RAS_ListRasterizer.cpp | 19 +- .../RAS_OpenGLRasterizer.cpp | 1071 +- .../RAS_OpenGLRasterizer.h | 37 +- .../RAS_VAOpenGLRasterizer.cpp | 302 +- .../RAS_VAOpenGLRasterizer.h | 7 +- .../RAS_OpenGLRasterizer/SConscript | 6 +- .../RAS_OpenGLRasterizer/mkglext.py | 627 -- source/gameengine/Rasterizer/SConscript | 2 +- source/nan_definitions.mk | 1 + 87 files changed, 23076 insertions(+), 3974 deletions(-) create mode 100644 extern/glew/CMakeLists.txt create mode 100644 extern/glew/README.txt create mode 100644 extern/glew/SConscript create mode 100644 extern/glew/include/GL/glew.h create mode 100644 extern/glew/include/GL/glxew.h create mode 100644 extern/glew/include/GL/wglew.h create mode 100644 extern/glew/src/Makefile create mode 100644 extern/glew/src/glew.c delete mode 100644 source/gameengine/BlenderRoutines/mac_compat_glext.h create mode 100644 source/gameengine/Ketsji/BL_BlenderShader.cpp create mode 100644 source/gameengine/Ketsji/BL_BlenderShader.h delete mode 100644 source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h delete mode 100644 source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h delete mode 100644 source/gameengine/Rasterizer/RAS_OpenGLRasterizer/mkglext.py diff --git a/blenderplayer/CMakeLists.txt b/blenderplayer/CMakeLists.txt index 62b64ff04bb..d90639562d2 100644 --- a/blenderplayer/CMakeLists.txt +++ b/blenderplayer/CMakeLists.txt @@ -108,6 +108,7 @@ IF(UNIX) blenkernel_blc bf_quicktime extern_binreloc + extern_glew ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index d092e0d494d..ee5cab31e09 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -43,3 +43,6 @@ ENDIF(WITH_VERSE) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SUBDIRS(binreloc) ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + +SUBDIRS(glew) + diff --git a/extern/Makefile b/extern/Makefile index fd4573cc8b1..26ee25b608f 100644 --- a/extern/Makefile +++ b/extern/Makefile @@ -30,7 +30,7 @@ include nan_definitions.mk SOURCEDIR = extern DIR = $(OCGDIR)/extern -DIRS = qhull/src solid +DIRS = qhull/src solid glew/src ifeq ($(WITH_FREETYPE2), true) DIRS += bFTGL/src diff --git a/extern/SConscript b/extern/SConscript index c94b6573eb9..6612d38f4cf 100644 --- a/extern/SConscript +++ b/extern/SConscript @@ -2,6 +2,8 @@ Import('env') +SConscript(['glew/SConscript']) + if env['WITH_BF_GAMEENGINE']: SConscript(['qhull/SConscript', 'solid/SConscript']) diff --git a/extern/glew/CMakeLists.txt b/extern/glew/CMakeLists.txt new file mode 100644 index 00000000000..53ef014927c --- /dev/null +++ b/extern/glew/CMakeLists.txt @@ -0,0 +1,33 @@ +# $Id$ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Jacques Beaurain. +# +# ***** END GPL LICENSE BLOCK ***** + +SET(INC include src) + +SET(SRC + src/glew.c +) + +BLENDERLIB(extern_glew "${SRC}" "${INC}") diff --git a/extern/glew/README.txt b/extern/glew/README.txt new file mode 100644 index 00000000000..1b19c53523f --- /dev/null +++ b/extern/glew/README.txt @@ -0,0 +1,18 @@ +See doc/index.html for more information. + +If you downloaded the tarball from the GLEW website, you just need to: + + Unix: + + make + + Windows: + + use the project file in build/vc6/ + +If you wish to build GLEW from scratch (update the extension data from +the net or add your own extension information), you need a Unix +environment (including wget, perl, and GNU make). The extension data +is regenerated from the top level source directory with: + + make extensions diff --git a/extern/glew/SConscript b/extern/glew/SConscript new file mode 100644 index 00000000000..32b3b478113 --- /dev/null +++ b/extern/glew/SConscript @@ -0,0 +1,12 @@ +#!/usr/bin/python +import sys +import os + +Import('env') + +sources = ['src/glew.c'] + +defs = '' +incs = 'include' + +env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['intern', 'player'], priority=[25, 50]) diff --git a/extern/glew/include/GL/glew.h b/extern/glew/include/GL/glew.h new file mode 100644 index 00000000000..fd3fe10b938 --- /dev/null +++ b/extern/glew/include/GL/glew.h @@ -0,0 +1,9797 @@ +/* +** The OpenGL Extension Wrangler Library +** Copyright (C) 2002-2006, Milan Ikits +** Copyright (C) 2002-2006, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are met: +** +** * Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** * The name of the author may be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +** THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ + +/* added this here for blender, should be moved elsewhere */ +#define GLEW_STATIC + +#ifndef __glew_h__ +#define __glew_h__ +#define __GLEW_H__ + +#if defined(__gl_h_) || defined(__GL_H__) +#error gl.h included before glew.h +#endif +#if defined(__glext_h_) || defined(__GLEXT_H_) +#error glext.h included before glew.h +#endif +#if defined(__gl_ATI_h_) +#error glATI.h included before glew.h +#endif + +#define __gl_h_ +#define __GL_H__ +#define __glext_h_ +#define __GLEXT_H_ +#define __gl_ATI_h_ + +#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) + +/* + * GLEW does not include to avoid name space pollution. + * GL needs GLAPI and GLAPIENTRY, GLU needs APIENTRY, CALLBACK, and wchar_t + * defined properly. + */ +/* */ +#ifndef APIENTRY +#define GLEW_APIENTRY_DEFINED +# if defined(__CYGWIN__) || defined(__MINGW32__) +# define APIENTRY __stdcall +# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) +# define APIENTRY __stdcall +# else +# define APIENTRY +# endif +#endif +#ifndef GLAPI +# if defined(__CYGWIN__) || defined(__MINGW32__) +# define GLAPI extern +# endif +#endif +/* */ +#ifndef CALLBACK +#define GLEW_CALLBACK_DEFINED +# if defined(__CYGWIN__) || defined(__MINGW32__) +# define CALLBACK __attribute__ ((__stdcall__)) +# elif (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) +# define CALLBACK __stdcall +# else +# define CALLBACK +# endif +#endif +/* and */ +#ifndef WINGDIAPI +#define GLEW_WINGDIAPI_DEFINED +#define WINGDIAPI __declspec(dllimport) +#endif +/* */ +#if (defined(_MSC_VER) || defined(__BORLANDC__)) && !defined(_WCHAR_T_DEFINED) +typedef unsigned short wchar_t; +# define _WCHAR_T_DEFINED +#endif +/* */ +#if !defined(_W64) +# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +# define _W64 __w64 +# else +# define _W64 +# endif +#endif +#if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_) +# ifdef _WIN64 +typedef __int64 ptrdiff_t; +# else +typedef _W64 int ptrdiff_t; +# endif +# define _PTRDIFF_T_DEFINED +# define _PTRDIFF_T_ +#endif + +#ifndef GLAPI +# if defined(__CYGWIN__) || defined(__MINGW32__) +# define GLAPI extern +# else +# define GLAPI WINGDIAPI +# endif +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY APIENTRY +#endif + +/* + * GLEW_STATIC needs to be set when using the static version. + * GLEW_BUILD is set when building the DLL version. + */ +#ifdef GLEW_STATIC +# define GLEWAPI extern +#else +# ifdef GLEW_BUILD +# define GLEWAPI extern __declspec(dllexport) +# else +# define GLEWAPI extern __declspec(dllimport) +# endif +#endif + +#else /* _UNIX */ + +/* + * Needed for ptrdiff_t in turn needed by VBO. This is defined by ISO + * C. On my system, this amounts to _3 lines_ of included code, all of + * them pretty much harmless. If you know of a way of detecting 32 vs + * 64 _targets_ at compile time you are free to replace this with + * something that's portable. For now, _this_ is the portable solution. + * (mem, 2004-01-04) + */ + +#include + +#define GLEW_APIENTRY_DEFINED +#define APIENTRY +#define GLEWAPI extern + +/* */ +#ifndef GLAPI +#define GLAPI extern +#endif +#ifndef GLAPIENTRY +#define GLAPIENTRY +#endif + +#endif /* _WIN32 */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* ----------------------------- GL_VERSION_1_1 ---------------------------- */ + +#ifndef GL_VERSION_1_1 +#define GL_VERSION_1_1 1 + +#if defined(__APPLE__) +typedef unsigned long GLenum; +typedef unsigned long GLbitfield; +typedef unsigned long GLuint; +typedef long GLint; +typedef long GLsizei; +#else +typedef unsigned int GLenum; +typedef unsigned int GLbitfield; +typedef unsigned int GLuint; +typedef int GLint; +typedef int GLsizei; +#endif +typedef unsigned char GLboolean; +typedef signed char GLbyte; +typedef short GLshort; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void GLvoid; + +#define GL_ACCUM 0x0100 +#define GL_LOAD 0x0101 +#define GL_RETURN 0x0102 +#define GL_MULT 0x0103 +#define GL_ADD 0x0104 +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_CURRENT_BIT 0x00000001 +#define GL_POINT_BIT 0x00000002 +#define GL_LINE_BIT 0x00000004 +#define GL_POLYGON_BIT 0x00000008 +#define GL_POLYGON_STIPPLE_BIT 0x00000010 +#define GL_PIXEL_MODE_BIT 0x00000020 +#define GL_LIGHTING_BIT 0x00000040 +#define GL_FOG_BIT 0x00000080 +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_ACCUM_BUFFER_BIT 0x00000200 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_VIEWPORT_BIT 0x00000800 +#define GL_TRANSFORM_BIT 0x00001000 +#define GL_ENABLE_BIT 0x00002000 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_HINT_BIT 0x00008000 +#define GL_EVAL_BIT 0x00010000 +#define GL_LIST_BIT 0x00020000 +#define GL_TEXTURE_BIT 0x00040000 +#define GL_SCISSOR_BIT 0x00080000 +#define GL_ALL_ATTRIB_BITS 0x000fffff +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_QUADS 0x0007 +#define GL_QUAD_STRIP 0x0008 +#define GL_POLYGON 0x0009 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_TRUE 1 +#define GL_FALSE 0 +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_2_BYTES 0x1407 +#define GL_3_BYTES 0x1408 +#define GL_4_BYTES 0x1409 +#define GL_DOUBLE 0x140A +#define GL_NONE 0 +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +#define GL_FRONT_AND_BACK 0x0408 +#define GL_AUX0 0x0409 +#define GL_AUX1 0x040A +#define GL_AUX2 0x040B +#define GL_AUX3 0x040C +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_2D 0x0600 +#define GL_3D 0x0601 +#define GL_3D_COLOR 0x0602 +#define GL_3D_COLOR_TEXTURE 0x0603 +#define GL_4D_COLOR_TEXTURE 0x0604 +#define GL_PASS_THROUGH_TOKEN 0x0700 +#define GL_POINT_TOKEN 0x0701 +#define GL_LINE_TOKEN 0x0702 +#define GL_POLYGON_TOKEN 0x0703 +#define GL_BITMAP_TOKEN 0x0704 +#define GL_DRAW_PIXEL_TOKEN 0x0705 +#define GL_COPY_PIXEL_TOKEN 0x0706 +#define GL_LINE_RESET_TOKEN 0x0707 +#define GL_EXP 0x0800 +#define GL_EXP2 0x0801 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_COEFF 0x0A00 +#define GL_ORDER 0x0A01 +#define GL_DOMAIN 0x0A02 +#define GL_CURRENT_COLOR 0x0B00 +#define GL_CURRENT_INDEX 0x0B01 +#define GL_CURRENT_NORMAL 0x0B02 +#define GL_CURRENT_TEXTURE_COORDS 0x0B03 +#define GL_CURRENT_RASTER_COLOR 0x0B04 +#define GL_CURRENT_RASTER_INDEX 0x0B05 +#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 +#define GL_CURRENT_RASTER_POSITION 0x0B07 +#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 +#define GL_CURRENT_RASTER_DISTANCE 0x0B09 +#define GL_POINT_SMOOTH 0x0B10 +#define GL_POINT_SIZE 0x0B11 +#define GL_POINT_SIZE_RANGE 0x0B12 +#define GL_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LINE_WIDTH 0x0B21 +#define GL_LINE_WIDTH_RANGE 0x0B22 +#define GL_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 +#define GL_LIST_MODE 0x0B30 +#define GL_MAX_LIST_NESTING 0x0B31 +#define GL_LIST_BASE 0x0B32 +#define GL_LIST_INDEX 0x0B33 +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_STIPPLE 0x0B42 +#define GL_EDGE_FLAG 0x0B43 +#define GL_CULL_FACE 0x0B44 +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_LIGHTING 0x0B50 +#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_SHADE_MODEL 0x0B54 +#define GL_COLOR_MATERIAL_FACE 0x0B55 +#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_FOG 0x0B60 +#define GL_FOG_INDEX 0x0B61 +#define GL_FOG_DENSITY 0x0B62 +#define GL_FOG_START 0x0B63 +#define GL_FOG_END 0x0B64 +#define GL_FOG_MODE 0x0B65 +#define GL_FOG_COLOR 0x0B66 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_TEST 0x0B71 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_ACCUM_CLEAR_VALUE 0x0B80 +#define GL_STENCIL_TEST 0x0B90 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_MATRIX_MODE 0x0BA0 +#define GL_NORMALIZE 0x0BA1 +#define GL_VIEWPORT 0x0BA2 +#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 +#define GL_PROJECTION_STACK_DEPTH 0x0BA4 +#define GL_TEXTURE_STACK_DEPTH 0x0BA5 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_ATTRIB_STACK_DEPTH 0x0BB0 +#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 +#define GL_ALPHA_TEST 0x0BC0 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 +#define GL_DITHER 0x0BD0 +#define GL_BLEND_DST 0x0BE0 +#define GL_BLEND_SRC 0x0BE1 +#define GL_BLEND 0x0BE2 +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_INDEX_LOGIC_OP 0x0BF1 +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_AUX_BUFFERS 0x0C00 +#define GL_DRAW_BUFFER 0x0C01 +#define GL_READ_BUFFER 0x0C02 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_INDEX_CLEAR_VALUE 0x0C20 +#define GL_INDEX_WRITEMASK 0x0C21 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_INDEX_MODE 0x0C30 +#define GL_RGBA_MODE 0x0C31 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 +#define GL_RENDER_MODE 0x0C40 +#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_FOG_HINT 0x0C54 +#define GL_TEXTURE_GEN_S 0x0C60 +#define GL_TEXTURE_GEN_T 0x0C61 +#define GL_TEXTURE_GEN_R 0x0C62 +#define GL_TEXTURE_GEN_Q 0x0C63 +#define GL_PIXEL_MAP_I_TO_I 0x0C70 +#define GL_PIXEL_MAP_S_TO_S 0x0C71 +#define GL_PIXEL_MAP_I_TO_R 0x0C72 +#define GL_PIXEL_MAP_I_TO_G 0x0C73 +#define GL_PIXEL_MAP_I_TO_B 0x0C74 +#define GL_PIXEL_MAP_I_TO_A 0x0C75 +#define GL_PIXEL_MAP_R_TO_R 0x0C76 +#define GL_PIXEL_MAP_G_TO_G 0x0C77 +#define GL_PIXEL_MAP_B_TO_B 0x0C78 +#define GL_PIXEL_MAP_A_TO_A 0x0C79 +#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 +#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 +#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 +#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 +#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 +#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 +#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 +#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 +#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 +#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 +#define GL_UNPACK_SWAP_BYTES 0x0CF0 +#define GL_UNPACK_LSB_FIRST 0x0CF1 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_SWAP_BYTES 0x0D00 +#define GL_PACK_LSB_FIRST 0x0D01 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAP_COLOR 0x0D10 +#define GL_MAP_STENCIL 0x0D11 +#define GL_INDEX_SHIFT 0x0D12 +#define GL_INDEX_OFFSET 0x0D13 +#define GL_RED_SCALE 0x0D14 +#define GL_RED_BIAS 0x0D15 +#define GL_ZOOM_X 0x0D16 +#define GL_ZOOM_Y 0x0D17 +#define GL_GREEN_SCALE 0x0D18 +#define GL_GREEN_BIAS 0x0D19 +#define GL_BLUE_SCALE 0x0D1A +#define GL_BLUE_BIAS 0x0D1B +#define GL_ALPHA_SCALE 0x0D1C +#define GL_ALPHA_BIAS 0x0D1D +#define GL_DEPTH_SCALE 0x0D1E +#define GL_DEPTH_BIAS 0x0D1F +#define GL_MAX_EVAL_ORDER 0x0D30 +#define GL_MAX_LIGHTS 0x0D31 +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 +#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 +#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 +#define GL_MAX_NAME_STACK_DEPTH 0x0D37 +#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 +#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_INDEX_BITS 0x0D51 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_ACCUM_RED_BITS 0x0D58 +#define GL_ACCUM_GREEN_BITS 0x0D59 +#define GL_ACCUM_BLUE_BITS 0x0D5A +#define GL_ACCUM_ALPHA_BITS 0x0D5B +#define GL_NAME_STACK_DEPTH 0x0D70 +#define GL_AUTO_NORMAL 0x0D80 +#define GL_MAP1_COLOR_4 0x0D90 +#define GL_MAP1_INDEX 0x0D91 +#define GL_MAP1_NORMAL 0x0D92 +#define GL_MAP1_TEXTURE_COORD_1 0x0D93 +#define GL_MAP1_TEXTURE_COORD_2 0x0D94 +#define GL_MAP1_TEXTURE_COORD_3 0x0D95 +#define GL_MAP1_TEXTURE_COORD_4 0x0D96 +#define GL_MAP1_VERTEX_3 0x0D97 +#define GL_MAP1_VERTEX_4 0x0D98 +#define GL_MAP2_COLOR_4 0x0DB0 +#define GL_MAP2_INDEX 0x0DB1 +#define GL_MAP2_NORMAL 0x0DB2 +#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 +#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 +#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 +#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 +#define GL_MAP2_VERTEX_3 0x0DB7 +#define GL_MAP2_VERTEX_4 0x0DB8 +#define GL_MAP1_GRID_DOMAIN 0x0DD0 +#define GL_MAP1_GRID_SEGMENTS 0x0DD1 +#define GL_MAP2_GRID_DOMAIN 0x0DD2 +#define GL_MAP2_GRID_SEGMENTS 0x0DD3 +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 +#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 +#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 +#define GL_SELECTION_BUFFER_POINTER 0x0DF3 +#define GL_SELECTION_BUFFER_SIZE 0x0DF4 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 +#define GL_TEXTURE_BORDER_COLOR 0x1004 +#define GL_TEXTURE_BORDER 0x1005 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 +#define GL_COMPILE 0x1300 +#define GL_COMPILE_AND_EXECUTE 0x1301 +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +#define GL_COLOR_INDEXES 0x1603 +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_COLOR_INDEX 0x1900 +#define GL_STENCIL_INDEX 0x1901 +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_RED 0x1903 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A +#define GL_BITMAP 0x1A00 +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_RENDER 0x1C00 +#define GL_FEEDBACK 0x1C01 +#define GL_SELECT 0x1C02 +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_S 0x2000 +#define GL_T 0x2001 +#define GL_R 0x2002 +#define GL_Q 0x2003 +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 +#define GL_TEXTURE_ENV 0x2300 +#define GL_EYE_LINEAR 0x2400 +#define GL_OBJECT_LINEAR 0x2401 +#define GL_SPHERE_MAP 0x2402 +#define GL_TEXTURE_GEN_MODE 0x2500 +#define GL_OBJECT_PLANE 0x2501 +#define GL_EYE_PLANE 0x2502 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_CLAMP 0x2900 +#define GL_REPEAT 0x2901 +#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 +#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 +#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_ALPHA4 0x803B +#define GL_ALPHA8 0x803C +#define GL_ALPHA12 0x803D +#define GL_ALPHA16 0x803E +#define GL_LUMINANCE4 0x803F +#define GL_LUMINANCE8 0x8040 +#define GL_LUMINANCE12 0x8041 +#define GL_LUMINANCE16 0x8042 +#define GL_LUMINANCE4_ALPHA4 0x8043 +#define GL_LUMINANCE6_ALPHA2 0x8044 +#define GL_LUMINANCE8_ALPHA8 0x8045 +#define GL_LUMINANCE12_ALPHA4 0x8046 +#define GL_LUMINANCE12_ALPHA12 0x8047 +#define GL_LUMINANCE16_ALPHA16 0x8048 +#define GL_INTENSITY 0x8049 +#define GL_INTENSITY4 0x804A +#define GL_INTENSITY8 0x804B +#define GL_INTENSITY12 0x804C +#define GL_INTENSITY16 0x804D +#define GL_R3_G3_B2 0x2A10 +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB8 0x8051 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGBA2 0x8055 +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_TEXTURE_RED_SIZE 0x805C +#define GL_TEXTURE_GREEN_SIZE 0x805D +#define GL_TEXTURE_BLUE_SIZE 0x805E +#define GL_TEXTURE_ALPHA_SIZE 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE 0x8061 +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_TEXTURE_PRIORITY 0x8066 +#define GL_TEXTURE_RESIDENT 0x8067 +#define GL_TEXTURE_BINDING_1D 0x8068 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_INDEX_ARRAY 0x8077 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_EDGE_FLAG_ARRAY 0x8079 +#define GL_VERTEX_ARRAY_SIZE 0x807A +#define GL_VERTEX_ARRAY_TYPE 0x807B +#define GL_VERTEX_ARRAY_STRIDE 0x807C +#define GL_NORMAL_ARRAY_TYPE 0x807E +#define GL_NORMAL_ARRAY_STRIDE 0x807F +#define GL_COLOR_ARRAY_SIZE 0x8081 +#define GL_COLOR_ARRAY_TYPE 0x8082 +#define GL_COLOR_ARRAY_STRIDE 0x8083 +#define GL_INDEX_ARRAY_TYPE 0x8085 +#define GL_INDEX_ARRAY_STRIDE 0x8086 +#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A +#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C +#define GL_VERTEX_ARRAY_POINTER 0x808E +#define GL_NORMAL_ARRAY_POINTER 0x808F +#define GL_COLOR_ARRAY_POINTER 0x8090 +#define GL_INDEX_ARRAY_POINTER 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 +#define GL_V2F 0x2A20 +#define GL_V3F 0x2A21 +#define GL_C4UB_V2F 0x2A22 +#define GL_C4UB_V3F 0x2A23 +#define GL_C3F_V3F 0x2A24 +#define GL_N3F_V3F 0x2A25 +#define GL_C4F_N3F_V3F 0x2A26 +#define GL_T2F_V3F 0x2A27 +#define GL_T4F_V4F 0x2A28 +#define GL_T2F_C4UB_V3F 0x2A29 +#define GL_T2F_C3F_V3F 0x2A2A +#define GL_T2F_N3F_V3F 0x2A2B +#define GL_T2F_C4F_N3F_V3F 0x2A2C +#define GL_T4F_C4F_N3F_V4F 0x2A2D +#define GL_LOGIC_OP GL_INDEX_LOGIC_OP +#define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 + +GLAPI void GLAPIENTRY glAccum (GLenum op, GLfloat value); +GLAPI void GLAPIENTRY glAlphaFunc (GLenum func, GLclampf ref); +GLAPI GLboolean GLAPIENTRY glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences); +GLAPI void GLAPIENTRY glArrayElement (GLint i); +GLAPI void GLAPIENTRY glBegin (GLenum mode); +GLAPI void GLAPIENTRY glBindTexture (GLenum target, GLuint texture); +GLAPI void GLAPIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); +GLAPI void GLAPIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GLAPI void GLAPIENTRY glCallList (GLuint list); +GLAPI void GLAPIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists); +GLAPI void GLAPIENTRY glClear (GLbitfield mask); +GLAPI void GLAPIENTRY glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void GLAPIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLAPI void GLAPIENTRY glClearDepth (GLclampd depth); +GLAPI void GLAPIENTRY glClearIndex (GLfloat c); +GLAPI void GLAPIENTRY glClearStencil (GLint s); +GLAPI void GLAPIENTRY glClipPlane (GLenum plane, const GLdouble *equation); +GLAPI void GLAPIENTRY glColor3b (GLbyte red, GLbyte green, GLbyte blue); +GLAPI void GLAPIENTRY glColor3bv (const GLbyte *v); +GLAPI void GLAPIENTRY glColor3d (GLdouble red, GLdouble green, GLdouble blue); +GLAPI void GLAPIENTRY glColor3dv (const GLdouble *v); +GLAPI void GLAPIENTRY glColor3f (GLfloat red, GLfloat green, GLfloat blue); +GLAPI void GLAPIENTRY glColor3fv (const GLfloat *v); +GLAPI void GLAPIENTRY glColor3i (GLint red, GLint green, GLint blue); +GLAPI void GLAPIENTRY glColor3iv (const GLint *v); +GLAPI void GLAPIENTRY glColor3s (GLshort red, GLshort green, GLshort blue); +GLAPI void GLAPIENTRY glColor3sv (const GLshort *v); +GLAPI void GLAPIENTRY glColor3ub (GLubyte red, GLubyte green, GLubyte blue); +GLAPI void GLAPIENTRY glColor3ubv (const GLubyte *v); +GLAPI void GLAPIENTRY glColor3ui (GLuint red, GLuint green, GLuint blue); +GLAPI void GLAPIENTRY glColor3uiv (const GLuint *v); +GLAPI void GLAPIENTRY glColor3us (GLushort red, GLushort green, GLushort blue); +GLAPI void GLAPIENTRY glColor3usv (const GLushort *v); +GLAPI void GLAPIENTRY glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); +GLAPI void GLAPIENTRY glColor4bv (const GLbyte *v); +GLAPI void GLAPIENTRY glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); +GLAPI void GLAPIENTRY glColor4dv (const GLdouble *v); +GLAPI void GLAPIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GLAPI void GLAPIENTRY glColor4fv (const GLfloat *v); +GLAPI void GLAPIENTRY glColor4i (GLint red, GLint green, GLint blue, GLint alpha); +GLAPI void GLAPIENTRY glColor4iv (const GLint *v); +GLAPI void GLAPIENTRY glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha); +GLAPI void GLAPIENTRY glColor4sv (const GLshort *v); +GLAPI void GLAPIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +GLAPI void GLAPIENTRY glColor4ubv (const GLubyte *v); +GLAPI void GLAPIENTRY glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha); +GLAPI void GLAPIENTRY glColor4uiv (const GLuint *v); +GLAPI void GLAPIENTRY glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha); +GLAPI void GLAPIENTRY glColor4usv (const GLushort *v); +GLAPI void GLAPIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLAPI void GLAPIENTRY glColorMaterial (GLenum face, GLenum mode); +GLAPI void GLAPIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); +GLAPI void GLAPIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); +GLAPI void GLAPIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GLAPI void GLAPIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +GLAPI void GLAPIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void GLAPIENTRY glCullFace (GLenum mode); +GLAPI void GLAPIENTRY glDeleteLists (GLuint list, GLsizei range); +GLAPI void GLAPIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); +GLAPI void GLAPIENTRY glDepthFunc (GLenum func); +GLAPI void GLAPIENTRY glDepthMask (GLboolean flag); +GLAPI void GLAPIENTRY glDepthRange (GLclampd zNear, GLclampd zFar); +GLAPI void GLAPIENTRY glDisable (GLenum cap); +GLAPI void GLAPIENTRY glDisableClientState (GLenum array); +GLAPI void GLAPIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GLAPI void GLAPIENTRY glDrawBuffer (GLenum mode); +GLAPI void GLAPIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); +GLAPI void GLAPIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void GLAPIENTRY glEdgeFlag (GLboolean flag); +GLAPI void GLAPIENTRY glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glEdgeFlagv (const GLboolean *flag); +GLAPI void GLAPIENTRY glEnable (GLenum cap); +GLAPI void GLAPIENTRY glEnableClientState (GLenum array); +GLAPI void GLAPIENTRY glEnd (void); +GLAPI void GLAPIENTRY glEndList (void); +GLAPI void GLAPIENTRY glEvalCoord1d (GLdouble u); +GLAPI void GLAPIENTRY glEvalCoord1dv (const GLdouble *u); +GLAPI void GLAPIENTRY glEvalCoord1f (GLfloat u); +GLAPI void GLAPIENTRY glEvalCoord1fv (const GLfloat *u); +GLAPI void GLAPIENTRY glEvalCoord2d (GLdouble u, GLdouble v); +GLAPI void GLAPIENTRY glEvalCoord2dv (const GLdouble *u); +GLAPI void GLAPIENTRY glEvalCoord2f (GLfloat u, GLfloat v); +GLAPI void GLAPIENTRY glEvalCoord2fv (const GLfloat *u); +GLAPI void GLAPIENTRY glEvalMesh1 (GLenum mode, GLint i1, GLint i2); +GLAPI void GLAPIENTRY glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); +GLAPI void GLAPIENTRY glEvalPoint1 (GLint i); +GLAPI void GLAPIENTRY glEvalPoint2 (GLint i, GLint j); +GLAPI void GLAPIENTRY glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer); +GLAPI void GLAPIENTRY glFinish (void); +GLAPI void GLAPIENTRY glFlush (void); +GLAPI void GLAPIENTRY glFogf (GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glFogfv (GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glFogi (GLenum pname, GLint param); +GLAPI void GLAPIENTRY glFogiv (GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glFrontFace (GLenum mode); +GLAPI void GLAPIENTRY glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI GLuint GLAPIENTRY glGenLists (GLsizei range); +GLAPI void GLAPIENTRY glGenTextures (GLsizei n, GLuint *textures); +GLAPI void GLAPIENTRY glGetBooleanv (GLenum pname, GLboolean *params); +GLAPI void GLAPIENTRY glGetClipPlane (GLenum plane, GLdouble *equation); +GLAPI void GLAPIENTRY glGetDoublev (GLenum pname, GLdouble *params); +GLAPI GLenum GLAPIENTRY glGetError (void); +GLAPI void GLAPIENTRY glGetFloatv (GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetIntegerv (GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetLightiv (GLenum light, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetMapdv (GLenum target, GLenum query, GLdouble *v); +GLAPI void GLAPIENTRY glGetMapfv (GLenum target, GLenum query, GLfloat *v); +GLAPI void GLAPIENTRY glGetMapiv (GLenum target, GLenum query, GLint *v); +GLAPI void GLAPIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetMaterialiv (GLenum face, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetPixelMapfv (GLenum map, GLfloat *values); +GLAPI void GLAPIENTRY glGetPixelMapuiv (GLenum map, GLuint *values); +GLAPI void GLAPIENTRY glGetPixelMapusv (GLenum map, GLushort *values); +GLAPI void GLAPIENTRY glGetPointerv (GLenum pname, GLvoid* *params); +GLAPI void GLAPIENTRY glGetPolygonStipple (GLubyte *mask); +GLAPI const GLubyte * GLAPIENTRY glGetString (GLenum name); +GLAPI void GLAPIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params); +GLAPI void GLAPIENTRY glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetTexGeniv (GLenum coord, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void GLAPIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); +GLAPI void GLAPIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); +GLAPI void GLAPIENTRY glHint (GLenum target, GLenum mode); +GLAPI void GLAPIENTRY glIndexMask (GLuint mask); +GLAPI void GLAPIENTRY glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glIndexd (GLdouble c); +GLAPI void GLAPIENTRY glIndexdv (const GLdouble *c); +GLAPI void GLAPIENTRY glIndexf (GLfloat c); +GLAPI void GLAPIENTRY glIndexfv (const GLfloat *c); +GLAPI void GLAPIENTRY glIndexi (GLint c); +GLAPI void GLAPIENTRY glIndexiv (const GLint *c); +GLAPI void GLAPIENTRY glIndexs (GLshort c); +GLAPI void GLAPIENTRY glIndexsv (const GLshort *c); +GLAPI void GLAPIENTRY glIndexub (GLubyte c); +GLAPI void GLAPIENTRY glIndexubv (const GLubyte *c); +GLAPI void GLAPIENTRY glInitNames (void); +GLAPI void GLAPIENTRY glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer); +GLAPI GLboolean GLAPIENTRY glIsEnabled (GLenum cap); +GLAPI GLboolean GLAPIENTRY glIsList (GLuint list); +GLAPI GLboolean GLAPIENTRY glIsTexture (GLuint texture); +GLAPI void GLAPIENTRY glLightModelf (GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glLightModelfv (GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glLightModeli (GLenum pname, GLint param); +GLAPI void GLAPIENTRY glLightModeliv (GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glLighti (GLenum light, GLenum pname, GLint param); +GLAPI void GLAPIENTRY glLightiv (GLenum light, GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glLineStipple (GLint factor, GLushort pattern); +GLAPI void GLAPIENTRY glLineWidth (GLfloat width); +GLAPI void GLAPIENTRY glListBase (GLuint base); +GLAPI void GLAPIENTRY glLoadIdentity (void); +GLAPI void GLAPIENTRY glLoadMatrixd (const GLdouble *m); +GLAPI void GLAPIENTRY glLoadMatrixf (const GLfloat *m); +GLAPI void GLAPIENTRY glLoadName (GLuint name); +GLAPI void GLAPIENTRY glLogicOp (GLenum opcode); +GLAPI void GLAPIENTRY glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +GLAPI void GLAPIENTRY glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +GLAPI void GLAPIENTRY glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +GLAPI void GLAPIENTRY glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +GLAPI void GLAPIENTRY glMapGrid1d (GLint un, GLdouble u1, GLdouble u2); +GLAPI void GLAPIENTRY glMapGrid1f (GLint un, GLfloat u1, GLfloat u2); +GLAPI void GLAPIENTRY glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); +GLAPI void GLAPIENTRY glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); +GLAPI void GLAPIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glMateriali (GLenum face, GLenum pname, GLint param); +GLAPI void GLAPIENTRY glMaterialiv (GLenum face, GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glMatrixMode (GLenum mode); +GLAPI void GLAPIENTRY glMultMatrixd (const GLdouble *m); +GLAPI void GLAPIENTRY glMultMatrixf (const GLfloat *m); +GLAPI void GLAPIENTRY glNewList (GLuint list, GLenum mode); +GLAPI void GLAPIENTRY glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz); +GLAPI void GLAPIENTRY glNormal3bv (const GLbyte *v); +GLAPI void GLAPIENTRY glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz); +GLAPI void GLAPIENTRY glNormal3dv (const GLdouble *v); +GLAPI void GLAPIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); +GLAPI void GLAPIENTRY glNormal3fv (const GLfloat *v); +GLAPI void GLAPIENTRY glNormal3i (GLint nx, GLint ny, GLint nz); +GLAPI void GLAPIENTRY glNormal3iv (const GLint *v); +GLAPI void GLAPIENTRY glNormal3s (GLshort nx, GLshort ny, GLshort nz); +GLAPI void GLAPIENTRY glNormal3sv (const GLshort *v); +GLAPI void GLAPIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +GLAPI void GLAPIENTRY glPassThrough (GLfloat token); +GLAPI void GLAPIENTRY glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values); +GLAPI void GLAPIENTRY glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values); +GLAPI void GLAPIENTRY glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values); +GLAPI void GLAPIENTRY glPixelStoref (GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glPixelStorei (GLenum pname, GLint param); +GLAPI void GLAPIENTRY glPixelTransferf (GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glPixelTransferi (GLenum pname, GLint param); +GLAPI void GLAPIENTRY glPixelZoom (GLfloat xfactor, GLfloat yfactor); +GLAPI void GLAPIENTRY glPointSize (GLfloat size); +GLAPI void GLAPIENTRY glPolygonMode (GLenum face, GLenum mode); +GLAPI void GLAPIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GLAPI void GLAPIENTRY glPolygonStipple (const GLubyte *mask); +GLAPI void GLAPIENTRY glPopAttrib (void); +GLAPI void GLAPIENTRY glPopClientAttrib (void); +GLAPI void GLAPIENTRY glPopMatrix (void); +GLAPI void GLAPIENTRY glPopName (void); +GLAPI void GLAPIENTRY glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities); +GLAPI void GLAPIENTRY glPushAttrib (GLbitfield mask); +GLAPI void GLAPIENTRY glPushClientAttrib (GLbitfield mask); +GLAPI void GLAPIENTRY glPushMatrix (void); +GLAPI void GLAPIENTRY glPushName (GLuint name); +GLAPI void GLAPIENTRY glRasterPos2d (GLdouble x, GLdouble y); +GLAPI void GLAPIENTRY glRasterPos2dv (const GLdouble *v); +GLAPI void GLAPIENTRY glRasterPos2f (GLfloat x, GLfloat y); +GLAPI void GLAPIENTRY glRasterPos2fv (const GLfloat *v); +GLAPI void GLAPIENTRY glRasterPos2i (GLint x, GLint y); +GLAPI void GLAPIENTRY glRasterPos2iv (const GLint *v); +GLAPI void GLAPIENTRY glRasterPos2s (GLshort x, GLshort y); +GLAPI void GLAPIENTRY glRasterPos2sv (const GLshort *v); +GLAPI void GLAPIENTRY glRasterPos3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void GLAPIENTRY glRasterPos3dv (const GLdouble *v); +GLAPI void GLAPIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void GLAPIENTRY glRasterPos3fv (const GLfloat *v); +GLAPI void GLAPIENTRY glRasterPos3i (GLint x, GLint y, GLint z); +GLAPI void GLAPIENTRY glRasterPos3iv (const GLint *v); +GLAPI void GLAPIENTRY glRasterPos3s (GLshort x, GLshort y, GLshort z); +GLAPI void GLAPIENTRY glRasterPos3sv (const GLshort *v); +GLAPI void GLAPIENTRY glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void GLAPIENTRY glRasterPos4dv (const GLdouble *v); +GLAPI void GLAPIENTRY glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void GLAPIENTRY glRasterPos4fv (const GLfloat *v); +GLAPI void GLAPIENTRY glRasterPos4i (GLint x, GLint y, GLint z, GLint w); +GLAPI void GLAPIENTRY glRasterPos4iv (const GLint *v); +GLAPI void GLAPIENTRY glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void GLAPIENTRY glRasterPos4sv (const GLshort *v); +GLAPI void GLAPIENTRY glReadBuffer (GLenum mode); +GLAPI void GLAPIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); +GLAPI void GLAPIENTRY glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); +GLAPI void GLAPIENTRY glRectdv (const GLdouble *v1, const GLdouble *v2); +GLAPI void GLAPIENTRY glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); +GLAPI void GLAPIENTRY glRectfv (const GLfloat *v1, const GLfloat *v2); +GLAPI void GLAPIENTRY glRecti (GLint x1, GLint y1, GLint x2, GLint y2); +GLAPI void GLAPIENTRY glRectiv (const GLint *v1, const GLint *v2); +GLAPI void GLAPIENTRY glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2); +GLAPI void GLAPIENTRY glRectsv (const GLshort *v1, const GLshort *v2); +GLAPI GLint GLAPIENTRY glRenderMode (GLenum mode); +GLAPI void GLAPIENTRY glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +GLAPI void GLAPIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +GLAPI void GLAPIENTRY glScaled (GLdouble x, GLdouble y, GLdouble z); +GLAPI void GLAPIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void GLAPIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GLAPI void GLAPIENTRY glSelectBuffer (GLsizei size, GLuint *buffer); +GLAPI void GLAPIENTRY glShadeModel (GLenum mode); +GLAPI void GLAPIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GLAPI void GLAPIENTRY glStencilMask (GLuint mask); +GLAPI void GLAPIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GLAPI void GLAPIENTRY glTexCoord1d (GLdouble s); +GLAPI void GLAPIENTRY glTexCoord1dv (const GLdouble *v); +GLAPI void GLAPIENTRY glTexCoord1f (GLfloat s); +GLAPI void GLAPIENTRY glTexCoord1fv (const GLfloat *v); +GLAPI void GLAPIENTRY glTexCoord1i (GLint s); +GLAPI void GLAPIENTRY glTexCoord1iv (const GLint *v); +GLAPI void GLAPIENTRY glTexCoord1s (GLshort s); +GLAPI void GLAPIENTRY glTexCoord1sv (const GLshort *v); +GLAPI void GLAPIENTRY glTexCoord2d (GLdouble s, GLdouble t); +GLAPI void GLAPIENTRY glTexCoord2dv (const GLdouble *v); +GLAPI void GLAPIENTRY glTexCoord2f (GLfloat s, GLfloat t); +GLAPI void GLAPIENTRY glTexCoord2fv (const GLfloat *v); +GLAPI void GLAPIENTRY glTexCoord2i (GLint s, GLint t); +GLAPI void GLAPIENTRY glTexCoord2iv (const GLint *v); +GLAPI void GLAPIENTRY glTexCoord2s (GLshort s, GLshort t); +GLAPI void GLAPIENTRY glTexCoord2sv (const GLshort *v); +GLAPI void GLAPIENTRY glTexCoord3d (GLdouble s, GLdouble t, GLdouble r); +GLAPI void GLAPIENTRY glTexCoord3dv (const GLdouble *v); +GLAPI void GLAPIENTRY glTexCoord3f (GLfloat s, GLfloat t, GLfloat r); +GLAPI void GLAPIENTRY glTexCoord3fv (const GLfloat *v); +GLAPI void GLAPIENTRY glTexCoord3i (GLint s, GLint t, GLint r); +GLAPI void GLAPIENTRY glTexCoord3iv (const GLint *v); +GLAPI void GLAPIENTRY glTexCoord3s (GLshort s, GLshort t, GLshort r); +GLAPI void GLAPIENTRY glTexCoord3sv (const GLshort *v); +GLAPI void GLAPIENTRY glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q); +GLAPI void GLAPIENTRY glTexCoord4dv (const GLdouble *v); +GLAPI void GLAPIENTRY glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q); +GLAPI void GLAPIENTRY glTexCoord4fv (const GLfloat *v); +GLAPI void GLAPIENTRY glTexCoord4i (GLint s, GLint t, GLint r, GLint q); +GLAPI void GLAPIENTRY glTexCoord4iv (const GLint *v); +GLAPI void GLAPIENTRY glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q); +GLAPI void GLAPIENTRY glTexCoord4sv (const GLshort *v); +GLAPI void GLAPIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); +GLAPI void GLAPIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glTexGend (GLenum coord, GLenum pname, GLdouble param); +GLAPI void GLAPIENTRY glTexGendv (GLenum coord, GLenum pname, const GLdouble *params); +GLAPI void GLAPIENTRY glTexGenf (GLenum coord, GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glTexGeni (GLenum coord, GLenum pname, GLint param); +GLAPI void GLAPIENTRY glTexGeniv (GLenum coord, GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void GLAPIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void GLAPIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GLAPI void GLAPIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); +GLAPI void GLAPIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GLAPI void GLAPIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); +GLAPI void GLAPIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void GLAPIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +GLAPI void GLAPIENTRY glTranslated (GLdouble x, GLdouble y, GLdouble z); +GLAPI void GLAPIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); +GLAPI void GLAPIENTRY glVertex2d (GLdouble x, GLdouble y); +GLAPI void GLAPIENTRY glVertex2dv (const GLdouble *v); +GLAPI void GLAPIENTRY glVertex2f (GLfloat x, GLfloat y); +GLAPI void GLAPIENTRY glVertex2fv (const GLfloat *v); +GLAPI void GLAPIENTRY glVertex2i (GLint x, GLint y); +GLAPI void GLAPIENTRY glVertex2iv (const GLint *v); +GLAPI void GLAPIENTRY glVertex2s (GLshort x, GLshort y); +GLAPI void GLAPIENTRY glVertex2sv (const GLshort *v); +GLAPI void GLAPIENTRY glVertex3d (GLdouble x, GLdouble y, GLdouble z); +GLAPI void GLAPIENTRY glVertex3dv (const GLdouble *v); +GLAPI void GLAPIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z); +GLAPI void GLAPIENTRY glVertex3fv (const GLfloat *v); +GLAPI void GLAPIENTRY glVertex3i (GLint x, GLint y, GLint z); +GLAPI void GLAPIENTRY glVertex3iv (const GLint *v); +GLAPI void GLAPIENTRY glVertex3s (GLshort x, GLshort y, GLshort z); +GLAPI void GLAPIENTRY glVertex3sv (const GLshort *v); +GLAPI void GLAPIENTRY glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +GLAPI void GLAPIENTRY glVertex4dv (const GLdouble *v); +GLAPI void GLAPIENTRY glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GLAPI void GLAPIENTRY glVertex4fv (const GLfloat *v); +GLAPI void GLAPIENTRY glVertex4i (GLint x, GLint y, GLint z, GLint w); +GLAPI void GLAPIENTRY glVertex4iv (const GLint *v); +GLAPI void GLAPIENTRY glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w); +GLAPI void GLAPIENTRY glVertex4sv (const GLshort *v); +GLAPI void GLAPIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +GLAPI void GLAPIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#define GLEW_VERSION_1_1 GLEW_GET_VAR(__GLEW_VERSION_1_1) + +#endif /* GL_VERSION_1_1 */ + +/* ---------------------------------- GLU ---------------------------------- */ + +/* this is where we can safely include GLU */ +#if defined(__APPLE__) && defined(__MACH__) +#include +#else +#include +#endif + +/* ----------------------------- GL_VERSION_1_2 ---------------------------- */ + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 + +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E + +typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); + +#define glCopyTexSubImage3D GLEW_GET_FUN(__glewCopyTexSubImage3D) +#define glDrawRangeElements GLEW_GET_FUN(__glewDrawRangeElements) +#define glTexImage3D GLEW_GET_FUN(__glewTexImage3D) +#define glTexSubImage3D GLEW_GET_FUN(__glewTexSubImage3D) + +#define GLEW_VERSION_1_2 GLEW_GET_VAR(__GLEW_VERSION_1_2) + +#endif /* GL_VERSION_1_2 */ + +/* ----------------------------- GL_VERSION_1_3 ---------------------------- */ + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 + +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_SUBTRACT 0x84E7 +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#define GL_MULTISAMPLE_BIT 0x20000000 + +typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (GLAPIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLvoid *img); +typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble m[16]); +typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat m[16]); +typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble m[16]); +typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat m[16]); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); + +#define glActiveTexture GLEW_GET_FUN(__glewActiveTexture) +#define glClientActiveTexture GLEW_GET_FUN(__glewClientActiveTexture) +#define glCompressedTexImage1D GLEW_GET_FUN(__glewCompressedTexImage1D) +#define glCompressedTexImage2D GLEW_GET_FUN(__glewCompressedTexImage2D) +#define glCompressedTexImage3D GLEW_GET_FUN(__glewCompressedTexImage3D) +#define glCompressedTexSubImage1D GLEW_GET_FUN(__glewCompressedTexSubImage1D) +#define glCompressedTexSubImage2D GLEW_GET_FUN(__glewCompressedTexSubImage2D) +#define glCompressedTexSubImage3D GLEW_GET_FUN(__glewCompressedTexSubImage3D) +#define glGetCompressedTexImage GLEW_GET_FUN(__glewGetCompressedTexImage) +#define glLoadTransposeMatrixd GLEW_GET_FUN(__glewLoadTransposeMatrixd) +#define glLoadTransposeMatrixf GLEW_GET_FUN(__glewLoadTransposeMatrixf) +#define glMultTransposeMatrixd GLEW_GET_FUN(__glewMultTransposeMatrixd) +#define glMultTransposeMatrixf GLEW_GET_FUN(__glewMultTransposeMatrixf) +#define glMultiTexCoord1d GLEW_GET_FUN(__glewMultiTexCoord1d) +#define glMultiTexCoord1dv GLEW_GET_FUN(__glewMultiTexCoord1dv) +#define glMultiTexCoord1f GLEW_GET_FUN(__glewMultiTexCoord1f) +#define glMultiTexCoord1fv GLEW_GET_FUN(__glewMultiTexCoord1fv) +#define glMultiTexCoord1i GLEW_GET_FUN(__glewMultiTexCoord1i) +#define glMultiTexCoord1iv GLEW_GET_FUN(__glewMultiTexCoord1iv) +#define glMultiTexCoord1s GLEW_GET_FUN(__glewMultiTexCoord1s) +#define glMultiTexCoord1sv GLEW_GET_FUN(__glewMultiTexCoord1sv) +#define glMultiTexCoord2d GLEW_GET_FUN(__glewMultiTexCoord2d) +#define glMultiTexCoord2dv GLEW_GET_FUN(__glewMultiTexCoord2dv) +#define glMultiTexCoord2f GLEW_GET_FUN(__glewMultiTexCoord2f) +#define glMultiTexCoord2fv GLEW_GET_FUN(__glewMultiTexCoord2fv) +#define glMultiTexCoord2i GLEW_GET_FUN(__glewMultiTexCoord2i) +#define glMultiTexCoord2iv GLEW_GET_FUN(__glewMultiTexCoord2iv) +#define glMultiTexCoord2s GLEW_GET_FUN(__glewMultiTexCoord2s) +#define glMultiTexCoord2sv GLEW_GET_FUN(__glewMultiTexCoord2sv) +#define glMultiTexCoord3d GLEW_GET_FUN(__glewMultiTexCoord3d) +#define glMultiTexCoord3dv GLEW_GET_FUN(__glewMultiTexCoord3dv) +#define glMultiTexCoord3f GLEW_GET_FUN(__glewMultiTexCoord3f) +#define glMultiTexCoord3fv GLEW_GET_FUN(__glewMultiTexCoord3fv) +#define glMultiTexCoord3i GLEW_GET_FUN(__glewMultiTexCoord3i) +#define glMultiTexCoord3iv GLEW_GET_FUN(__glewMultiTexCoord3iv) +#define glMultiTexCoord3s GLEW_GET_FUN(__glewMultiTexCoord3s) +#define glMultiTexCoord3sv GLEW_GET_FUN(__glewMultiTexCoord3sv) +#define glMultiTexCoord4d GLEW_GET_FUN(__glewMultiTexCoord4d) +#define glMultiTexCoord4dv GLEW_GET_FUN(__glewMultiTexCoord4dv) +#define glMultiTexCoord4f GLEW_GET_FUN(__glewMultiTexCoord4f) +#define glMultiTexCoord4fv GLEW_GET_FUN(__glewMultiTexCoord4fv) +#define glMultiTexCoord4i GLEW_GET_FUN(__glewMultiTexCoord4i) +#define glMultiTexCoord4iv GLEW_GET_FUN(__glewMultiTexCoord4iv) +#define glMultiTexCoord4s GLEW_GET_FUN(__glewMultiTexCoord4s) +#define glMultiTexCoord4sv GLEW_GET_FUN(__glewMultiTexCoord4sv) +#define glSampleCoverage GLEW_GET_FUN(__glewSampleCoverage) + +#define GLEW_VERSION_1_3 GLEW_GET_VAR(__GLEW_VERSION_1_3) + +#endif /* GL_VERSION_1_3 */ + +/* ----------------------------- GL_VERSION_1_4 ---------------------------- */ + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 + +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E + +typedef void (GLAPIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (GLAPIENTRY * PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVPROC) (const GLfloat *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVPROC) (const GLint *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVPROC) (const GLshort *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVPROC) (const GLdouble *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVPROC) (const GLfloat *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVPROC) (const GLint *p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVPROC) (const GLshort *p); + +#define glBlendColor GLEW_GET_FUN(__glewBlendColor) +#define glBlendEquation GLEW_GET_FUN(__glewBlendEquation) +#define glBlendFuncSeparate GLEW_GET_FUN(__glewBlendFuncSeparate) +#define glFogCoordPointer GLEW_GET_FUN(__glewFogCoordPointer) +#define glFogCoordd GLEW_GET_FUN(__glewFogCoordd) +#define glFogCoorddv GLEW_GET_FUN(__glewFogCoorddv) +#define glFogCoordf GLEW_GET_FUN(__glewFogCoordf) +#define glFogCoordfv GLEW_GET_FUN(__glewFogCoordfv) +#define glMultiDrawArrays GLEW_GET_FUN(__glewMultiDrawArrays) +#define glMultiDrawElements GLEW_GET_FUN(__glewMultiDrawElements) +#define glPointParameterf GLEW_GET_FUN(__glewPointParameterf) +#define glPointParameterfv GLEW_GET_FUN(__glewPointParameterfv) +#define glSecondaryColor3b GLEW_GET_FUN(__glewSecondaryColor3b) +#define glSecondaryColor3bv GLEW_GET_FUN(__glewSecondaryColor3bv) +#define glSecondaryColor3d GLEW_GET_FUN(__glewSecondaryColor3d) +#define glSecondaryColor3dv GLEW_GET_FUN(__glewSecondaryColor3dv) +#define glSecondaryColor3f GLEW_GET_FUN(__glewSecondaryColor3f) +#define glSecondaryColor3fv GLEW_GET_FUN(__glewSecondaryColor3fv) +#define glSecondaryColor3i GLEW_GET_FUN(__glewSecondaryColor3i) +#define glSecondaryColor3iv GLEW_GET_FUN(__glewSecondaryColor3iv) +#define glSecondaryColor3s GLEW_GET_FUN(__glewSecondaryColor3s) +#define glSecondaryColor3sv GLEW_GET_FUN(__glewSecondaryColor3sv) +#define glSecondaryColor3ub GLEW_GET_FUN(__glewSecondaryColor3ub) +#define glSecondaryColor3ubv GLEW_GET_FUN(__glewSecondaryColor3ubv) +#define glSecondaryColor3ui GLEW_GET_FUN(__glewSecondaryColor3ui) +#define glSecondaryColor3uiv GLEW_GET_FUN(__glewSecondaryColor3uiv) +#define glSecondaryColor3us GLEW_GET_FUN(__glewSecondaryColor3us) +#define glSecondaryColor3usv GLEW_GET_FUN(__glewSecondaryColor3usv) +#define glSecondaryColorPointer GLEW_GET_FUN(__glewSecondaryColorPointer) +#define glWindowPos2d GLEW_GET_FUN(__glewWindowPos2d) +#define glWindowPos2dv GLEW_GET_FUN(__glewWindowPos2dv) +#define glWindowPos2f GLEW_GET_FUN(__glewWindowPos2f) +#define glWindowPos2fv GLEW_GET_FUN(__glewWindowPos2fv) +#define glWindowPos2i GLEW_GET_FUN(__glewWindowPos2i) +#define glWindowPos2iv GLEW_GET_FUN(__glewWindowPos2iv) +#define glWindowPos2s GLEW_GET_FUN(__glewWindowPos2s) +#define glWindowPos2sv GLEW_GET_FUN(__glewWindowPos2sv) +#define glWindowPos3d GLEW_GET_FUN(__glewWindowPos3d) +#define glWindowPos3dv GLEW_GET_FUN(__glewWindowPos3dv) +#define glWindowPos3f GLEW_GET_FUN(__glewWindowPos3f) +#define glWindowPos3fv GLEW_GET_FUN(__glewWindowPos3fv) +#define glWindowPos3i GLEW_GET_FUN(__glewWindowPos3i) +#define glWindowPos3iv GLEW_GET_FUN(__glewWindowPos3iv) +#define glWindowPos3s GLEW_GET_FUN(__glewWindowPos3s) +#define glWindowPos3sv GLEW_GET_FUN(__glewWindowPos3sv) + +#define GLEW_VERSION_1_4 GLEW_GET_VAR(__GLEW_VERSION_1_4) + +#endif /* GL_VERSION_1_4 */ + +/* ----------------------------- GL_VERSION_1_5 ---------------------------- */ + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 + +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 + +typedef ptrdiff_t GLsizeiptr; +typedef ptrdiff_t GLintptr; + +typedef void (GLAPIENTRY * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (GLAPIENTRY * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (GLAPIENTRY * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); +typedef void (GLAPIENTRY * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); +typedef void (GLAPIENTRY * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers); +typedef void (GLAPIENTRY * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint* ids); +typedef void (GLAPIENTRY * PFNGLENDQUERYPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint* buffers); +typedef void (GLAPIENTRY * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids); +typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid** params); +typedef void (GLAPIENTRY * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid* data); +typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint* params); +typedef void (GLAPIENTRY * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISBUFFERPROC) (GLuint buffer); +typedef GLboolean (GLAPIENTRY * PFNGLISQUERYPROC) (GLuint id); +typedef GLvoid* (GLAPIENTRY * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (GLAPIENTRY * PFNGLUNMAPBUFFERPROC) (GLenum target); + +#define glBeginQuery GLEW_GET_FUN(__glewBeginQuery) +#define glBindBuffer GLEW_GET_FUN(__glewBindBuffer) +#define glBufferData GLEW_GET_FUN(__glewBufferData) +#define glBufferSubData GLEW_GET_FUN(__glewBufferSubData) +#define glDeleteBuffers GLEW_GET_FUN(__glewDeleteBuffers) +#define glDeleteQueries GLEW_GET_FUN(__glewDeleteQueries) +#define glEndQuery GLEW_GET_FUN(__glewEndQuery) +#define glGenBuffers GLEW_GET_FUN(__glewGenBuffers) +#define glGenQueries GLEW_GET_FUN(__glewGenQueries) +#define glGetBufferParameteriv GLEW_GET_FUN(__glewGetBufferParameteriv) +#define glGetBufferPointerv GLEW_GET_FUN(__glewGetBufferPointerv) +#define glGetBufferSubData GLEW_GET_FUN(__glewGetBufferSubData) +#define glGetQueryObjectiv GLEW_GET_FUN(__glewGetQueryObjectiv) +#define glGetQueryObjectuiv GLEW_GET_FUN(__glewGetQueryObjectuiv) +#define glGetQueryiv GLEW_GET_FUN(__glewGetQueryiv) +#define glIsBuffer GLEW_GET_FUN(__glewIsBuffer) +#define glIsQuery GLEW_GET_FUN(__glewIsQuery) +#define glMapBuffer GLEW_GET_FUN(__glewMapBuffer) +#define glUnmapBuffer GLEW_GET_FUN(__glewUnmapBuffer) + +#define GLEW_VERSION_1_5 GLEW_GET_VAR(__GLEW_VERSION_1_5) + +#endif /* GL_VERSION_1_5 */ + +/* ----------------------------- GL_VERSION_2_0 ---------------------------- */ + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 + +#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_COORDS 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 + +typedef char GLchar; + +typedef void (GLAPIENTRY * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GLAPIENTRY * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar* name); +typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum, GLenum); +typedef void (GLAPIENTRY * PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (GLAPIENTRY * PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROC) (GLenum type); +typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (GLAPIENTRY * PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (GLAPIENTRY * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); +typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum* bufs); +typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint); +typedef void (GLAPIENTRY * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +typedef void (GLAPIENTRY * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders); +typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar* name); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param); +typedef void (GLAPIENTRY * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog); +typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source); +typedef void (GLAPIENTRY * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param); +typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLint programObj, const GLchar* name); +typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint, GLenum, GLvoid*); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVPROC) (GLuint, GLenum, GLdouble*); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVPROC) (GLuint, GLenum, GLfloat*); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVPROC) (GLuint, GLenum, GLint*); +typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (GLAPIENTRY * PFNGLISSHADERPROC) (GLuint shader); +typedef void (GLAPIENTRY * PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (GLAPIENTRY * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar** strings, const GLint* lengths); +typedef void (GLAPIENTRY * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void (GLAPIENTRY * PFNGLSTENCILMASKSEPARATEPROC) (GLenum, GLuint); +typedef void (GLAPIENTRY * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (GLAPIENTRY * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (GLAPIENTRY * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (GLAPIENTRY * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GLAPIENTRY * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (GLAPIENTRY * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GLAPIENTRY * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GLAPIENTRY * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GLAPIENTRY * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GLAPIENTRY * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* pointer); + +#define glAttachShader GLEW_GET_FUN(__glewAttachShader) +#define glBindAttribLocation GLEW_GET_FUN(__glewBindAttribLocation) +#define glBlendEquationSeparate GLEW_GET_FUN(__glewBlendEquationSeparate) +#define glCompileShader GLEW_GET_FUN(__glewCompileShader) +#define glCreateProgram GLEW_GET_FUN(__glewCreateProgram) +#define glCreateShader GLEW_GET_FUN(__glewCreateShader) +#define glDeleteProgram GLEW_GET_FUN(__glewDeleteProgram) +#define glDeleteShader GLEW_GET_FUN(__glewDeleteShader) +#define glDetachShader GLEW_GET_FUN(__glewDetachShader) +#define glDisableVertexAttribArray GLEW_GET_FUN(__glewDisableVertexAttribArray) +#define glDrawBuffers GLEW_GET_FUN(__glewDrawBuffers) +#define glEnableVertexAttribArray GLEW_GET_FUN(__glewEnableVertexAttribArray) +#define glGetActiveAttrib GLEW_GET_FUN(__glewGetActiveAttrib) +#define glGetActiveUniform GLEW_GET_FUN(__glewGetActiveUniform) +#define glGetAttachedShaders GLEW_GET_FUN(__glewGetAttachedShaders) +#define glGetAttribLocation GLEW_GET_FUN(__glewGetAttribLocation) +#define glGetProgramInfoLog GLEW_GET_FUN(__glewGetProgramInfoLog) +#define glGetProgramiv GLEW_GET_FUN(__glewGetProgramiv) +#define glGetShaderInfoLog GLEW_GET_FUN(__glewGetShaderInfoLog) +#define glGetShaderSource GLEW_GET_FUN(__glewGetShaderSource) +#define glGetShaderiv GLEW_GET_FUN(__glewGetShaderiv) +#define glGetUniformLocation GLEW_GET_FUN(__glewGetUniformLocation) +#define glGetUniformfv GLEW_GET_FUN(__glewGetUniformfv) +#define glGetUniformiv GLEW_GET_FUN(__glewGetUniformiv) +#define glGetVertexAttribPointerv GLEW_GET_FUN(__glewGetVertexAttribPointerv) +#define glGetVertexAttribdv GLEW_GET_FUN(__glewGetVertexAttribdv) +#define glGetVertexAttribfv GLEW_GET_FUN(__glewGetVertexAttribfv) +#define glGetVertexAttribiv GLEW_GET_FUN(__glewGetVertexAttribiv) +#define glIsProgram GLEW_GET_FUN(__glewIsProgram) +#define glIsShader GLEW_GET_FUN(__glewIsShader) +#define glLinkProgram GLEW_GET_FUN(__glewLinkProgram) +#define glShaderSource GLEW_GET_FUN(__glewShaderSource) +#define glStencilFuncSeparate GLEW_GET_FUN(__glewStencilFuncSeparate) +#define glStencilMaskSeparate GLEW_GET_FUN(__glewStencilMaskSeparate) +#define glStencilOpSeparate GLEW_GET_FUN(__glewStencilOpSeparate) +#define glUniform1f GLEW_GET_FUN(__glewUniform1f) +#define glUniform1fv GLEW_GET_FUN(__glewUniform1fv) +#define glUniform1i GLEW_GET_FUN(__glewUniform1i) +#define glUniform1iv GLEW_GET_FUN(__glewUniform1iv) +#define glUniform2f GLEW_GET_FUN(__glewUniform2f) +#define glUniform2fv GLEW_GET_FUN(__glewUniform2fv) +#define glUniform2i GLEW_GET_FUN(__glewUniform2i) +#define glUniform2iv GLEW_GET_FUN(__glewUniform2iv) +#define glUniform3f GLEW_GET_FUN(__glewUniform3f) +#define glUniform3fv GLEW_GET_FUN(__glewUniform3fv) +#define glUniform3i GLEW_GET_FUN(__glewUniform3i) +#define glUniform3iv GLEW_GET_FUN(__glewUniform3iv) +#define glUniform4f GLEW_GET_FUN(__glewUniform4f) +#define glUniform4fv GLEW_GET_FUN(__glewUniform4fv) +#define glUniform4i GLEW_GET_FUN(__glewUniform4i) +#define glUniform4iv GLEW_GET_FUN(__glewUniform4iv) +#define glUniformMatrix2fv GLEW_GET_FUN(__glewUniformMatrix2fv) +#define glUniformMatrix3fv GLEW_GET_FUN(__glewUniformMatrix3fv) +#define glUniformMatrix4fv GLEW_GET_FUN(__glewUniformMatrix4fv) +#define glUseProgram GLEW_GET_FUN(__glewUseProgram) +#define glValidateProgram GLEW_GET_FUN(__glewValidateProgram) +#define glVertexAttrib1d GLEW_GET_FUN(__glewVertexAttrib1d) +#define glVertexAttrib1dv GLEW_GET_FUN(__glewVertexAttrib1dv) +#define glVertexAttrib1f GLEW_GET_FUN(__glewVertexAttrib1f) +#define glVertexAttrib1fv GLEW_GET_FUN(__glewVertexAttrib1fv) +#define glVertexAttrib1s GLEW_GET_FUN(__glewVertexAttrib1s) +#define glVertexAttrib1sv GLEW_GET_FUN(__glewVertexAttrib1sv) +#define glVertexAttrib2d GLEW_GET_FUN(__glewVertexAttrib2d) +#define glVertexAttrib2dv GLEW_GET_FUN(__glewVertexAttrib2dv) +#define glVertexAttrib2f GLEW_GET_FUN(__glewVertexAttrib2f) +#define glVertexAttrib2fv GLEW_GET_FUN(__glewVertexAttrib2fv) +#define glVertexAttrib2s GLEW_GET_FUN(__glewVertexAttrib2s) +#define glVertexAttrib2sv GLEW_GET_FUN(__glewVertexAttrib2sv) +#define glVertexAttrib3d GLEW_GET_FUN(__glewVertexAttrib3d) +#define glVertexAttrib3dv GLEW_GET_FUN(__glewVertexAttrib3dv) +#define glVertexAttrib3f GLEW_GET_FUN(__glewVertexAttrib3f) +#define glVertexAttrib3fv GLEW_GET_FUN(__glewVertexAttrib3fv) +#define glVertexAttrib3s GLEW_GET_FUN(__glewVertexAttrib3s) +#define glVertexAttrib3sv GLEW_GET_FUN(__glewVertexAttrib3sv) +#define glVertexAttrib4Nbv GLEW_GET_FUN(__glewVertexAttrib4Nbv) +#define glVertexAttrib4Niv GLEW_GET_FUN(__glewVertexAttrib4Niv) +#define glVertexAttrib4Nsv GLEW_GET_FUN(__glewVertexAttrib4Nsv) +#define glVertexAttrib4Nub GLEW_GET_FUN(__glewVertexAttrib4Nub) +#define glVertexAttrib4Nubv GLEW_GET_FUN(__glewVertexAttrib4Nubv) +#define glVertexAttrib4Nuiv GLEW_GET_FUN(__glewVertexAttrib4Nuiv) +#define glVertexAttrib4Nusv GLEW_GET_FUN(__glewVertexAttrib4Nusv) +#define glVertexAttrib4bv GLEW_GET_FUN(__glewVertexAttrib4bv) +#define glVertexAttrib4d GLEW_GET_FUN(__glewVertexAttrib4d) +#define glVertexAttrib4dv GLEW_GET_FUN(__glewVertexAttrib4dv) +#define glVertexAttrib4f GLEW_GET_FUN(__glewVertexAttrib4f) +#define glVertexAttrib4fv GLEW_GET_FUN(__glewVertexAttrib4fv) +#define glVertexAttrib4iv GLEW_GET_FUN(__glewVertexAttrib4iv) +#define glVertexAttrib4s GLEW_GET_FUN(__glewVertexAttrib4s) +#define glVertexAttrib4sv GLEW_GET_FUN(__glewVertexAttrib4sv) +#define glVertexAttrib4ubv GLEW_GET_FUN(__glewVertexAttrib4ubv) +#define glVertexAttrib4uiv GLEW_GET_FUN(__glewVertexAttrib4uiv) +#define glVertexAttrib4usv GLEW_GET_FUN(__glewVertexAttrib4usv) +#define glVertexAttribPointer GLEW_GET_FUN(__glewVertexAttribPointer) + +#define GLEW_VERSION_2_0 GLEW_GET_VAR(__GLEW_VERSION_2_0) + +#endif /* GL_VERSION_2_0 */ + +/* -------------------------- GL_3DFX_multisample -------------------------- */ + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 + +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 + +#define GLEW_3DFX_multisample GLEW_GET_VAR(__GLEW_3DFX_multisample) + +#endif /* GL_3DFX_multisample */ + +/* ---------------------------- GL_3DFX_tbuffer ---------------------------- */ + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 + +typedef void (GLAPIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); + +#define glTbufferMask3DFX GLEW_GET_FUN(__glewTbufferMask3DFX) + +#define GLEW_3DFX_tbuffer GLEW_GET_VAR(__GLEW_3DFX_tbuffer) + +#endif /* GL_3DFX_tbuffer */ + +/* -------------------- GL_3DFX_texture_compression_FXT1 ------------------- */ + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 + +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 + +#define GLEW_3DFX_texture_compression_FXT1 GLEW_GET_VAR(__GLEW_3DFX_texture_compression_FXT1) + +#endif /* GL_3DFX_texture_compression_FXT1 */ + +/* ------------------------ GL_APPLE_client_storage ------------------------ */ + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 + +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 + +#define GLEW_APPLE_client_storage GLEW_GET_VAR(__GLEW_APPLE_client_storage) + +#endif /* GL_APPLE_client_storage */ + +/* ------------------------- GL_APPLE_element_array ------------------------ */ + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 + +#define GL_ELEMENT_ARRAY_APPLE 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A + +typedef void (GLAPIENTRY * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (GLAPIENTRY * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void* pointer); +typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint* first, const GLsizei *count, GLsizei primcount); +typedef void (GLAPIENTRY * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei *count, GLsizei primcount); + +#define glDrawElementArrayAPPLE GLEW_GET_FUN(__glewDrawElementArrayAPPLE) +#define glDrawRangeElementArrayAPPLE GLEW_GET_FUN(__glewDrawRangeElementArrayAPPLE) +#define glElementPointerAPPLE GLEW_GET_FUN(__glewElementPointerAPPLE) +#define glMultiDrawElementArrayAPPLE GLEW_GET_FUN(__glewMultiDrawElementArrayAPPLE) +#define glMultiDrawRangeElementArrayAPPLE GLEW_GET_FUN(__glewMultiDrawRangeElementArrayAPPLE) + +#define GLEW_APPLE_element_array GLEW_GET_VAR(__GLEW_APPLE_element_array) + +#endif /* GL_APPLE_element_array */ + +/* ----------------------------- GL_APPLE_fence ---------------------------- */ + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 + +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B + +typedef void (GLAPIENTRY * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint* fences); +typedef void (GLAPIENTRY * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef void (GLAPIENTRY * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +typedef void (GLAPIENTRY * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint* fences); +typedef GLboolean (GLAPIENTRY * PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef void (GLAPIENTRY * PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (GLAPIENTRY * PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (GLAPIENTRY * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); + +#define glDeleteFencesAPPLE GLEW_GET_FUN(__glewDeleteFencesAPPLE) +#define glFinishFenceAPPLE GLEW_GET_FUN(__glewFinishFenceAPPLE) +#define glFinishObjectAPPLE GLEW_GET_FUN(__glewFinishObjectAPPLE) +#define glGenFencesAPPLE GLEW_GET_FUN(__glewGenFencesAPPLE) +#define glIsFenceAPPLE GLEW_GET_FUN(__glewIsFenceAPPLE) +#define glSetFenceAPPLE GLEW_GET_FUN(__glewSetFenceAPPLE) +#define glTestFenceAPPLE GLEW_GET_FUN(__glewTestFenceAPPLE) +#define glTestObjectAPPLE GLEW_GET_FUN(__glewTestObjectAPPLE) + +#define GLEW_APPLE_fence GLEW_GET_VAR(__GLEW_APPLE_fence) + +#endif /* GL_APPLE_fence */ + +/* ------------------------- GL_APPLE_float_pixels ------------------------- */ + +#ifndef GL_APPLE_float_pixels +#define GL_APPLE_float_pixels 1 + +#define GL_HALF_APPLE 0x140B +#define GL_RGBA_FLOAT32_APPLE 0x8814 +#define GL_RGB_FLOAT32_APPLE 0x8815 +#define GL_ALPHA_FLOAT32_APPLE 0x8816 +#define GL_INTENSITY_FLOAT32_APPLE 0x8817 +#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 +#define GL_RGBA_FLOAT16_APPLE 0x881A +#define GL_RGB_FLOAT16_APPLE 0x881B +#define GL_ALPHA_FLOAT16_APPLE 0x881C +#define GL_INTENSITY_FLOAT16_APPLE 0x881D +#define GL_LUMINANCE_FLOAT16_APPLE 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F +#define GL_COLOR_FLOAT_APPLE 0x8A0F + +#define GLEW_APPLE_float_pixels GLEW_GET_VAR(__GLEW_APPLE_float_pixels) + +#endif /* GL_APPLE_float_pixels */ + +/* ------------------------- GL_APPLE_pixel_buffer ------------------------- */ + +#ifndef GL_APPLE_pixel_buffer +#define GL_APPLE_pixel_buffer 1 + +#define GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE 0x8A10 + +#define GLEW_APPLE_pixel_buffer GLEW_GET_VAR(__GLEW_APPLE_pixel_buffer) + +#endif /* GL_APPLE_pixel_buffer */ + +/* ------------------------ GL_APPLE_specular_vector ----------------------- */ + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 + +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 + +#define GLEW_APPLE_specular_vector GLEW_GET_VAR(__GLEW_APPLE_specular_vector) + +#endif /* GL_APPLE_specular_vector */ + +/* ------------------------- GL_APPLE_texture_range ------------------------ */ + +#ifndef GL_APPLE_texture_range +#define GL_APPLE_texture_range 1 + +#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 +#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 +#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC +#define GL_STORAGE_PRIVATE_APPLE 0x85BD +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF + +typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid **params); +typedef void (GLAPIENTRY * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, GLvoid *pointer); + +#define glGetTexParameterPointervAPPLE GLEW_GET_FUN(__glewGetTexParameterPointervAPPLE) +#define glTextureRangeAPPLE GLEW_GET_FUN(__glewTextureRangeAPPLE) + +#define GLEW_APPLE_texture_range GLEW_GET_VAR(__GLEW_APPLE_texture_range) + +#endif /* GL_APPLE_texture_range */ + +/* ------------------------ GL_APPLE_transform_hint ------------------------ */ + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 + +#define GL_TRANSFORM_HINT_APPLE 0x85B1 + +#define GLEW_APPLE_transform_hint GLEW_GET_VAR(__GLEW_APPLE_transform_hint) + +#endif /* GL_APPLE_transform_hint */ + +/* ---------------------- GL_APPLE_vertex_array_object --------------------- */ + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 + +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 + +typedef void (GLAPIENTRY * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (GLAPIENTRY * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays); +typedef void (GLAPIENTRY * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays); +typedef GLboolean (GLAPIENTRY * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); + +#define glBindVertexArrayAPPLE GLEW_GET_FUN(__glewBindVertexArrayAPPLE) +#define glDeleteVertexArraysAPPLE GLEW_GET_FUN(__glewDeleteVertexArraysAPPLE) +#define glGenVertexArraysAPPLE GLEW_GET_FUN(__glewGenVertexArraysAPPLE) +#define glIsVertexArrayAPPLE GLEW_GET_FUN(__glewIsVertexArrayAPPLE) + +#define GLEW_APPLE_vertex_array_object GLEW_GET_VAR(__GLEW_APPLE_vertex_array_object) + +#endif /* GL_APPLE_vertex_array_object */ + +/* ---------------------- GL_APPLE_vertex_array_range ---------------------- */ + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 + +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF + +typedef void (GLAPIENTRY * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer); +typedef void (GLAPIENTRY * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer); + +#define glFlushVertexArrayRangeAPPLE GLEW_GET_FUN(__glewFlushVertexArrayRangeAPPLE) +#define glVertexArrayParameteriAPPLE GLEW_GET_FUN(__glewVertexArrayParameteriAPPLE) +#define glVertexArrayRangeAPPLE GLEW_GET_FUN(__glewVertexArrayRangeAPPLE) + +#define GLEW_APPLE_vertex_array_range GLEW_GET_VAR(__GLEW_APPLE_vertex_array_range) + +#endif /* GL_APPLE_vertex_array_range */ + +/* --------------------------- GL_APPLE_ycbcr_422 -------------------------- */ + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 + +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB + +#define GLEW_APPLE_ycbcr_422 GLEW_GET_VAR(__GLEW_APPLE_ycbcr_422) + +#endif /* GL_APPLE_ycbcr_422 */ + +/* ----------------------- GL_ARB_color_buffer_float ----------------------- */ + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 + +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D + +typedef void (GLAPIENTRY * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); + +#define glClampColorARB GLEW_GET_FUN(__glewClampColorARB) + +#define GLEW_ARB_color_buffer_float GLEW_GET_VAR(__GLEW_ARB_color_buffer_float) + +#endif /* GL_ARB_color_buffer_float */ + +/* -------------------------- GL_ARB_depth_texture ------------------------- */ + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 + +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B + +#define GLEW_ARB_depth_texture GLEW_GET_VAR(__GLEW_ARB_depth_texture) + +#endif /* GL_ARB_depth_texture */ + +/* -------------------------- GL_ARB_draw_buffers -------------------------- */ + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 + +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 + +typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum* bufs); + +#define glDrawBuffersARB GLEW_GET_FUN(__glewDrawBuffersARB) + +#define GLEW_ARB_draw_buffers GLEW_GET_VAR(__GLEW_ARB_draw_buffers) + +#endif /* GL_ARB_draw_buffers */ + +/* ------------------------ GL_ARB_fragment_program ------------------------ */ + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 + +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 + +#define GLEW_ARB_fragment_program GLEW_GET_VAR(__GLEW_ARB_fragment_program) + +#endif /* GL_ARB_fragment_program */ + +/* --------------------- GL_ARB_fragment_program_shadow -------------------- */ + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 + +#define GLEW_ARB_fragment_program_shadow GLEW_GET_VAR(__GLEW_ARB_fragment_program_shadow) + +#endif /* GL_ARB_fragment_program_shadow */ + +/* ------------------------- GL_ARB_fragment_shader ------------------------ */ + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 + +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B + +#define GLEW_ARB_fragment_shader GLEW_GET_VAR(__GLEW_ARB_fragment_shader) + +#endif /* GL_ARB_fragment_shader */ + +/* ------------------------ GL_ARB_half_float_pixel ------------------------ */ + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 + +#define GL_HALF_FLOAT_ARB 0x140B + +#define GLEW_ARB_half_float_pixel GLEW_GET_VAR(__GLEW_ARB_half_float_pixel) + +#endif /* GL_ARB_half_float_pixel */ + +/* ----------------------------- GL_ARB_imaging ---------------------------- */ + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging 1 + +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_IGNORE_BORDER 0x8150 +#define GL_CONSTANT_BORDER 0x8151 +#define GL_WRAP_BORDER 0x8152 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 + +typedef void (GLAPIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void (GLAPIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void (GLAPIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GLAPIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values); +typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void (GLAPIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void (GLAPIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (GLAPIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (GLAPIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLRESETMINMAXPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); + +#define glColorSubTable GLEW_GET_FUN(__glewColorSubTable) +#define glColorTable GLEW_GET_FUN(__glewColorTable) +#define glColorTableParameterfv GLEW_GET_FUN(__glewColorTableParameterfv) +#define glColorTableParameteriv GLEW_GET_FUN(__glewColorTableParameteriv) +#define glConvolutionFilter1D GLEW_GET_FUN(__glewConvolutionFilter1D) +#define glConvolutionFilter2D GLEW_GET_FUN(__glewConvolutionFilter2D) +#define glConvolutionParameterf GLEW_GET_FUN(__glewConvolutionParameterf) +#define glConvolutionParameterfv GLEW_GET_FUN(__glewConvolutionParameterfv) +#define glConvolutionParameteri GLEW_GET_FUN(__glewConvolutionParameteri) +#define glConvolutionParameteriv GLEW_GET_FUN(__glewConvolutionParameteriv) +#define glCopyColorSubTable GLEW_GET_FUN(__glewCopyColorSubTable) +#define glCopyColorTable GLEW_GET_FUN(__glewCopyColorTable) +#define glCopyConvolutionFilter1D GLEW_GET_FUN(__glewCopyConvolutionFilter1D) +#define glCopyConvolutionFilter2D GLEW_GET_FUN(__glewCopyConvolutionFilter2D) +#define glGetColorTable GLEW_GET_FUN(__glewGetColorTable) +#define glGetColorTableParameterfv GLEW_GET_FUN(__glewGetColorTableParameterfv) +#define glGetColorTableParameteriv GLEW_GET_FUN(__glewGetColorTableParameteriv) +#define glGetConvolutionFilter GLEW_GET_FUN(__glewGetConvolutionFilter) +#define glGetConvolutionParameterfv GLEW_GET_FUN(__glewGetConvolutionParameterfv) +#define glGetConvolutionParameteriv GLEW_GET_FUN(__glewGetConvolutionParameteriv) +#define glGetHistogram GLEW_GET_FUN(__glewGetHistogram) +#define glGetHistogramParameterfv GLEW_GET_FUN(__glewGetHistogramParameterfv) +#define glGetHistogramParameteriv GLEW_GET_FUN(__glewGetHistogramParameteriv) +#define glGetMinmax GLEW_GET_FUN(__glewGetMinmax) +#define glGetMinmaxParameterfv GLEW_GET_FUN(__glewGetMinmaxParameterfv) +#define glGetMinmaxParameteriv GLEW_GET_FUN(__glewGetMinmaxParameteriv) +#define glGetSeparableFilter GLEW_GET_FUN(__glewGetSeparableFilter) +#define glHistogram GLEW_GET_FUN(__glewHistogram) +#define glMinmax GLEW_GET_FUN(__glewMinmax) +#define glResetHistogram GLEW_GET_FUN(__glewResetHistogram) +#define glResetMinmax GLEW_GET_FUN(__glewResetMinmax) +#define glSeparableFilter2D GLEW_GET_FUN(__glewSeparableFilter2D) + +#define GLEW_ARB_imaging GLEW_GET_VAR(__GLEW_ARB_imaging) + +#endif /* GL_ARB_imaging */ + +/* ------------------------- GL_ARB_matrix_palette ------------------------- */ + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 + +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 + +typedef void (GLAPIENTRY * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (GLAPIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, GLubyte *indices); +typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, GLuint *indices); +typedef void (GLAPIENTRY * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, GLushort *indices); + +#define glCurrentPaletteMatrixARB GLEW_GET_FUN(__glewCurrentPaletteMatrixARB) +#define glMatrixIndexPointerARB GLEW_GET_FUN(__glewMatrixIndexPointerARB) +#define glMatrixIndexubvARB GLEW_GET_FUN(__glewMatrixIndexubvARB) +#define glMatrixIndexuivARB GLEW_GET_FUN(__glewMatrixIndexuivARB) +#define glMatrixIndexusvARB GLEW_GET_FUN(__glewMatrixIndexusvARB) + +#define GLEW_ARB_matrix_palette GLEW_GET_VAR(__GLEW_ARB_matrix_palette) + +#endif /* GL_ARB_matrix_palette */ + +/* --------------------------- GL_ARB_multisample -------------------------- */ + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 + +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 + +typedef void (GLAPIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); + +#define glSampleCoverageARB GLEW_GET_FUN(__glewSampleCoverageARB) + +#define GLEW_ARB_multisample GLEW_GET_VAR(__GLEW_ARB_multisample) + +#endif /* GL_ARB_multisample */ + +/* -------------------------- GL_ARB_multitexture -------------------------- */ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 + +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 + +typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (GLAPIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); + +#define glActiveTextureARB GLEW_GET_FUN(__glewActiveTextureARB) +#define glClientActiveTextureARB GLEW_GET_FUN(__glewClientActiveTextureARB) +#define glMultiTexCoord1dARB GLEW_GET_FUN(__glewMultiTexCoord1dARB) +#define glMultiTexCoord1dvARB GLEW_GET_FUN(__glewMultiTexCoord1dvARB) +#define glMultiTexCoord1fARB GLEW_GET_FUN(__glewMultiTexCoord1fARB) +#define glMultiTexCoord1fvARB GLEW_GET_FUN(__glewMultiTexCoord1fvARB) +#define glMultiTexCoord1iARB GLEW_GET_FUN(__glewMultiTexCoord1iARB) +#define glMultiTexCoord1ivARB GLEW_GET_FUN(__glewMultiTexCoord1ivARB) +#define glMultiTexCoord1sARB GLEW_GET_FUN(__glewMultiTexCoord1sARB) +#define glMultiTexCoord1svARB GLEW_GET_FUN(__glewMultiTexCoord1svARB) +#define glMultiTexCoord2dARB GLEW_GET_FUN(__glewMultiTexCoord2dARB) +#define glMultiTexCoord2dvARB GLEW_GET_FUN(__glewMultiTexCoord2dvARB) +#define glMultiTexCoord2fARB GLEW_GET_FUN(__glewMultiTexCoord2fARB) +#define glMultiTexCoord2fvARB GLEW_GET_FUN(__glewMultiTexCoord2fvARB) +#define glMultiTexCoord2iARB GLEW_GET_FUN(__glewMultiTexCoord2iARB) +#define glMultiTexCoord2ivARB GLEW_GET_FUN(__glewMultiTexCoord2ivARB) +#define glMultiTexCoord2sARB GLEW_GET_FUN(__glewMultiTexCoord2sARB) +#define glMultiTexCoord2svARB GLEW_GET_FUN(__glewMultiTexCoord2svARB) +#define glMultiTexCoord3dARB GLEW_GET_FUN(__glewMultiTexCoord3dARB) +#define glMultiTexCoord3dvARB GLEW_GET_FUN(__glewMultiTexCoord3dvARB) +#define glMultiTexCoord3fARB GLEW_GET_FUN(__glewMultiTexCoord3fARB) +#define glMultiTexCoord3fvARB GLEW_GET_FUN(__glewMultiTexCoord3fvARB) +#define glMultiTexCoord3iARB GLEW_GET_FUN(__glewMultiTexCoord3iARB) +#define glMultiTexCoord3ivARB GLEW_GET_FUN(__glewMultiTexCoord3ivARB) +#define glMultiTexCoord3sARB GLEW_GET_FUN(__glewMultiTexCoord3sARB) +#define glMultiTexCoord3svARB GLEW_GET_FUN(__glewMultiTexCoord3svARB) +#define glMultiTexCoord4dARB GLEW_GET_FUN(__glewMultiTexCoord4dARB) +#define glMultiTexCoord4dvARB GLEW_GET_FUN(__glewMultiTexCoord4dvARB) +#define glMultiTexCoord4fARB GLEW_GET_FUN(__glewMultiTexCoord4fARB) +#define glMultiTexCoord4fvARB GLEW_GET_FUN(__glewMultiTexCoord4fvARB) +#define glMultiTexCoord4iARB GLEW_GET_FUN(__glewMultiTexCoord4iARB) +#define glMultiTexCoord4ivARB GLEW_GET_FUN(__glewMultiTexCoord4ivARB) +#define glMultiTexCoord4sARB GLEW_GET_FUN(__glewMultiTexCoord4sARB) +#define glMultiTexCoord4svARB GLEW_GET_FUN(__glewMultiTexCoord4svARB) + +#define GLEW_ARB_multitexture GLEW_GET_VAR(__GLEW_ARB_multitexture) + +#endif /* GL_ARB_multitexture */ + +/* ------------------------- GL_ARB_occlusion_query ------------------------ */ + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 + +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 + +typedef void (GLAPIENTRY * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (GLAPIENTRY * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint* ids); +typedef void (GLAPIENTRY * PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint* ids); +typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint* params); +typedef void (GLAPIENTRY * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISQUERYARBPROC) (GLuint id); + +#define glBeginQueryARB GLEW_GET_FUN(__glewBeginQueryARB) +#define glDeleteQueriesARB GLEW_GET_FUN(__glewDeleteQueriesARB) +#define glEndQueryARB GLEW_GET_FUN(__glewEndQueryARB) +#define glGenQueriesARB GLEW_GET_FUN(__glewGenQueriesARB) +#define glGetQueryObjectivARB GLEW_GET_FUN(__glewGetQueryObjectivARB) +#define glGetQueryObjectuivARB GLEW_GET_FUN(__glewGetQueryObjectuivARB) +#define glGetQueryivARB GLEW_GET_FUN(__glewGetQueryivARB) +#define glIsQueryARB GLEW_GET_FUN(__glewIsQueryARB) + +#define GLEW_ARB_occlusion_query GLEW_GET_VAR(__GLEW_ARB_occlusion_query) + +#endif /* GL_ARB_occlusion_query */ + +/* ----------------------- GL_ARB_pixel_buffer_object ---------------------- */ + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 + +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF + +#define GLEW_ARB_pixel_buffer_object GLEW_GET_VAR(__GLEW_ARB_pixel_buffer_object) + +#endif /* GL_ARB_pixel_buffer_object */ + +/* ------------------------ GL_ARB_point_parameters ------------------------ */ + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 + +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 + +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, GLfloat* params); + +#define glPointParameterfARB GLEW_GET_FUN(__glewPointParameterfARB) +#define glPointParameterfvARB GLEW_GET_FUN(__glewPointParameterfvARB) + +#define GLEW_ARB_point_parameters GLEW_GET_VAR(__GLEW_ARB_point_parameters) + +#endif /* GL_ARB_point_parameters */ + +/* -------------------------- GL_ARB_point_sprite -------------------------- */ + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 + +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 + +#define GLEW_ARB_point_sprite GLEW_GET_VAR(__GLEW_ARB_point_sprite) + +#endif /* GL_ARB_point_sprite */ + +/* ------------------------- GL_ARB_shader_objects ------------------------- */ + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 + +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 + +typedef char GLcharARB; +typedef unsigned int GLhandleARB; + +typedef void (GLAPIENTRY * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (GLAPIENTRY * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (GLAPIENTRY * PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef GLhandleARB (GLAPIENTRY * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (GLAPIENTRY * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef void (GLAPIENTRY * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef void (GLAPIENTRY * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name); +typedef void (GLAPIENTRY * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB *obj); +typedef GLhandleARB (GLAPIENTRY * PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (GLAPIENTRY * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *infoLog); +typedef void (GLAPIENTRY * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *source); +typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name); +typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint* params); +typedef void (GLAPIENTRY * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (GLAPIENTRY * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint *length); +typedef void (GLAPIENTRY * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (GLAPIENTRY * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (GLAPIENTRY * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (GLAPIENTRY * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (GLAPIENTRY * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (GLAPIENTRY * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (GLAPIENTRY * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (GLAPIENTRY * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (GLAPIENTRY * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +typedef void (GLAPIENTRY * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); + +#define glAttachObjectARB GLEW_GET_FUN(__glewAttachObjectARB) +#define glCompileShaderARB GLEW_GET_FUN(__glewCompileShaderARB) +#define glCreateProgramObjectARB GLEW_GET_FUN(__glewCreateProgramObjectARB) +#define glCreateShaderObjectARB GLEW_GET_FUN(__glewCreateShaderObjectARB) +#define glDeleteObjectARB GLEW_GET_FUN(__glewDeleteObjectARB) +#define glDetachObjectARB GLEW_GET_FUN(__glewDetachObjectARB) +#define glGetActiveUniformARB GLEW_GET_FUN(__glewGetActiveUniformARB) +#define glGetAttachedObjectsARB GLEW_GET_FUN(__glewGetAttachedObjectsARB) +#define glGetHandleARB GLEW_GET_FUN(__glewGetHandleARB) +#define glGetInfoLogARB GLEW_GET_FUN(__glewGetInfoLogARB) +#define glGetObjectParameterfvARB GLEW_GET_FUN(__glewGetObjectParameterfvARB) +#define glGetObjectParameterivARB GLEW_GET_FUN(__glewGetObjectParameterivARB) +#define glGetShaderSourceARB GLEW_GET_FUN(__glewGetShaderSourceARB) +#define glGetUniformLocationARB GLEW_GET_FUN(__glewGetUniformLocationARB) +#define glGetUniformfvARB GLEW_GET_FUN(__glewGetUniformfvARB) +#define glGetUniformivARB GLEW_GET_FUN(__glewGetUniformivARB) +#define glLinkProgramARB GLEW_GET_FUN(__glewLinkProgramARB) +#define glShaderSourceARB GLEW_GET_FUN(__glewShaderSourceARB) +#define glUniform1fARB GLEW_GET_FUN(__glewUniform1fARB) +#define glUniform1fvARB GLEW_GET_FUN(__glewUniform1fvARB) +#define glUniform1iARB GLEW_GET_FUN(__glewUniform1iARB) +#define glUniform1ivARB GLEW_GET_FUN(__glewUniform1ivARB) +#define glUniform2fARB GLEW_GET_FUN(__glewUniform2fARB) +#define glUniform2fvARB GLEW_GET_FUN(__glewUniform2fvARB) +#define glUniform2iARB GLEW_GET_FUN(__glewUniform2iARB) +#define glUniform2ivARB GLEW_GET_FUN(__glewUniform2ivARB) +#define glUniform3fARB GLEW_GET_FUN(__glewUniform3fARB) +#define glUniform3fvARB GLEW_GET_FUN(__glewUniform3fvARB) +#define glUniform3iARB GLEW_GET_FUN(__glewUniform3iARB) +#define glUniform3ivARB GLEW_GET_FUN(__glewUniform3ivARB) +#define glUniform4fARB GLEW_GET_FUN(__glewUniform4fARB) +#define glUniform4fvARB GLEW_GET_FUN(__glewUniform4fvARB) +#define glUniform4iARB GLEW_GET_FUN(__glewUniform4iARB) +#define glUniform4ivARB GLEW_GET_FUN(__glewUniform4ivARB) +#define glUniformMatrix2fvARB GLEW_GET_FUN(__glewUniformMatrix2fvARB) +#define glUniformMatrix3fvARB GLEW_GET_FUN(__glewUniformMatrix3fvARB) +#define glUniformMatrix4fvARB GLEW_GET_FUN(__glewUniformMatrix4fvARB) +#define glUseProgramObjectARB GLEW_GET_FUN(__glewUseProgramObjectARB) +#define glValidateProgramARB GLEW_GET_FUN(__glewValidateProgramARB) + +#define GLEW_ARB_shader_objects GLEW_GET_VAR(__GLEW_ARB_shader_objects) + +#endif /* GL_ARB_shader_objects */ + +/* ---------------------- GL_ARB_shading_language_100 ---------------------- */ + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 + +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C + +#define GLEW_ARB_shading_language_100 GLEW_GET_VAR(__GLEW_ARB_shading_language_100) + +#endif /* GL_ARB_shading_language_100 */ + +/* ----------------------------- GL_ARB_shadow ----------------------------- */ + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 + +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E + +#define GLEW_ARB_shadow GLEW_GET_VAR(__GLEW_ARB_shadow) + +#endif /* GL_ARB_shadow */ + +/* ------------------------- GL_ARB_shadow_ambient ------------------------- */ + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 + +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF + +#define GLEW_ARB_shadow_ambient GLEW_GET_VAR(__GLEW_ARB_shadow_ambient) + +#endif /* GL_ARB_shadow_ambient */ + +/* ---------------------- GL_ARB_texture_border_clamp ---------------------- */ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 + +#define GL_CLAMP_TO_BORDER_ARB 0x812D + +#define GLEW_ARB_texture_border_clamp GLEW_GET_VAR(__GLEW_ARB_texture_border_clamp) + +#endif /* GL_ARB_texture_border_clamp */ + +/* ----------------------- GL_ARB_texture_compression ---------------------- */ + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 + +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 + +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); +typedef void (GLAPIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, void* img); + +#define glCompressedTexImage1DARB GLEW_GET_FUN(__glewCompressedTexImage1DARB) +#define glCompressedTexImage2DARB GLEW_GET_FUN(__glewCompressedTexImage2DARB) +#define glCompressedTexImage3DARB GLEW_GET_FUN(__glewCompressedTexImage3DARB) +#define glCompressedTexSubImage1DARB GLEW_GET_FUN(__glewCompressedTexSubImage1DARB) +#define glCompressedTexSubImage2DARB GLEW_GET_FUN(__glewCompressedTexSubImage2DARB) +#define glCompressedTexSubImage3DARB GLEW_GET_FUN(__glewCompressedTexSubImage3DARB) +#define glGetCompressedTexImageARB GLEW_GET_FUN(__glewGetCompressedTexImageARB) + +#define GLEW_ARB_texture_compression GLEW_GET_VAR(__GLEW_ARB_texture_compression) + +#endif /* GL_ARB_texture_compression */ + +/* ------------------------ GL_ARB_texture_cube_map ------------------------ */ + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 + +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C + +#define GLEW_ARB_texture_cube_map GLEW_GET_VAR(__GLEW_ARB_texture_cube_map) + +#endif /* GL_ARB_texture_cube_map */ + +/* ------------------------- GL_ARB_texture_env_add ------------------------ */ + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 + +#define GLEW_ARB_texture_env_add GLEW_GET_VAR(__GLEW_ARB_texture_env_add) + +#endif /* GL_ARB_texture_env_add */ + +/* ----------------------- GL_ARB_texture_env_combine ---------------------- */ + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 + +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A + +#define GLEW_ARB_texture_env_combine GLEW_GET_VAR(__GLEW_ARB_texture_env_combine) + +#endif /* GL_ARB_texture_env_combine */ + +/* ---------------------- GL_ARB_texture_env_crossbar ---------------------- */ + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 + +#define GLEW_ARB_texture_env_crossbar GLEW_GET_VAR(__GLEW_ARB_texture_env_crossbar) + +#endif /* GL_ARB_texture_env_crossbar */ + +/* ------------------------ GL_ARB_texture_env_dot3 ------------------------ */ + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 + +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF + +#define GLEW_ARB_texture_env_dot3 GLEW_GET_VAR(__GLEW_ARB_texture_env_dot3) + +#endif /* GL_ARB_texture_env_dot3 */ + +/* -------------------------- GL_ARB_texture_float ------------------------- */ + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 + +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 + +#define GLEW_ARB_texture_float GLEW_GET_VAR(__GLEW_ARB_texture_float) + +#endif /* GL_ARB_texture_float */ + +/* --------------------- GL_ARB_texture_mirrored_repeat -------------------- */ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 + +#define GL_MIRRORED_REPEAT_ARB 0x8370 + +#define GLEW_ARB_texture_mirrored_repeat GLEW_GET_VAR(__GLEW_ARB_texture_mirrored_repeat) + +#endif /* GL_ARB_texture_mirrored_repeat */ + +/* -------------------- GL_ARB_texture_non_power_of_two -------------------- */ + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 + +#define GLEW_ARB_texture_non_power_of_two GLEW_GET_VAR(__GLEW_ARB_texture_non_power_of_two) + +#endif /* GL_ARB_texture_non_power_of_two */ + +/* ------------------------ GL_ARB_texture_rectangle ----------------------- */ + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 + +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 + +#define GLEW_ARB_texture_rectangle GLEW_GET_VAR(__GLEW_ARB_texture_rectangle) + +#endif /* GL_ARB_texture_rectangle */ + +/* ------------------------ GL_ARB_transpose_matrix ------------------------ */ + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 + +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 + +typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]); +typedef void (GLAPIENTRY * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]); +typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]); +typedef void (GLAPIENTRY * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]); + +#define glLoadTransposeMatrixdARB GLEW_GET_FUN(__glewLoadTransposeMatrixdARB) +#define glLoadTransposeMatrixfARB GLEW_GET_FUN(__glewLoadTransposeMatrixfARB) +#define glMultTransposeMatrixdARB GLEW_GET_FUN(__glewMultTransposeMatrixdARB) +#define glMultTransposeMatrixfARB GLEW_GET_FUN(__glewMultTransposeMatrixfARB) + +#define GLEW_ARB_transpose_matrix GLEW_GET_VAR(__GLEW_ARB_transpose_matrix) + +#endif /* GL_ARB_transpose_matrix */ + +/* -------------------------- GL_ARB_vertex_blend -------------------------- */ + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 + +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F + +typedef void (GLAPIENTRY * PFNGLVERTEXBLENDARBPROC) (GLint count); +typedef void (GLAPIENTRY * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); +typedef void (GLAPIENTRY * PFNGLWEIGHTBVARBPROC) (GLint size, GLbyte *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTDVARBPROC) (GLint size, GLdouble *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTFVARBPROC) (GLint size, GLfloat *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTIVARBPROC) (GLint size, GLint *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTSVARBPROC) (GLint size, GLshort *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTUBVARBPROC) (GLint size, GLubyte *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTUIVARBPROC) (GLint size, GLuint *weights); +typedef void (GLAPIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights); + +#define glVertexBlendARB GLEW_GET_FUN(__glewVertexBlendARB) +#define glWeightPointerARB GLEW_GET_FUN(__glewWeightPointerARB) +#define glWeightbvARB GLEW_GET_FUN(__glewWeightbvARB) +#define glWeightdvARB GLEW_GET_FUN(__glewWeightdvARB) +#define glWeightfvARB GLEW_GET_FUN(__glewWeightfvARB) +#define glWeightivARB GLEW_GET_FUN(__glewWeightivARB) +#define glWeightsvARB GLEW_GET_FUN(__glewWeightsvARB) +#define glWeightubvARB GLEW_GET_FUN(__glewWeightubvARB) +#define glWeightuivARB GLEW_GET_FUN(__glewWeightuivARB) +#define glWeightusvARB GLEW_GET_FUN(__glewWeightusvARB) + +#define GLEW_ARB_vertex_blend GLEW_GET_VAR(__GLEW_ARB_vertex_blend) + +#endif /* GL_ARB_vertex_blend */ + +/* ---------------------- GL_ARB_vertex_buffer_object ---------------------- */ + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 + +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA + +typedef ptrdiff_t GLsizeiptrARB; +typedef ptrdiff_t GLintptrARB; + +typedef void (GLAPIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (GLAPIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage); +typedef void (GLAPIENTRY * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid* data); +typedef void (GLAPIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint* buffers); +typedef void (GLAPIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint* buffers); +typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid** params); +typedef void (GLAPIENTRY * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid* data); +typedef GLboolean (GLAPIENTRY * PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef GLvoid * (GLAPIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (GLAPIENTRY * PFNGLUNMAPBUFFERARBPROC) (GLenum target); + +#define glBindBufferARB GLEW_GET_FUN(__glewBindBufferARB) +#define glBufferDataARB GLEW_GET_FUN(__glewBufferDataARB) +#define glBufferSubDataARB GLEW_GET_FUN(__glewBufferSubDataARB) +#define glDeleteBuffersARB GLEW_GET_FUN(__glewDeleteBuffersARB) +#define glGenBuffersARB GLEW_GET_FUN(__glewGenBuffersARB) +#define glGetBufferParameterivARB GLEW_GET_FUN(__glewGetBufferParameterivARB) +#define glGetBufferPointervARB GLEW_GET_FUN(__glewGetBufferPointervARB) +#define glGetBufferSubDataARB GLEW_GET_FUN(__glewGetBufferSubDataARB) +#define glIsBufferARB GLEW_GET_FUN(__glewIsBufferARB) +#define glMapBufferARB GLEW_GET_FUN(__glewMapBufferARB) +#define glUnmapBufferARB GLEW_GET_FUN(__glewUnmapBufferARB) + +#define GLEW_ARB_vertex_buffer_object GLEW_GET_VAR(__GLEW_ARB_vertex_buffer_object) + +#endif /* GL_ARB_vertex_buffer_object */ + +/* ------------------------- GL_ARB_vertex_program ------------------------- */ + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 + +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF + +typedef void (GLAPIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint* programs); +typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (GLAPIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint* programs); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void* string); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid** pointer); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program); +typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void* string); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer); + +#define glBindProgramARB GLEW_GET_FUN(__glewBindProgramARB) +#define glDeleteProgramsARB GLEW_GET_FUN(__glewDeleteProgramsARB) +#define glDisableVertexAttribArrayARB GLEW_GET_FUN(__glewDisableVertexAttribArrayARB) +#define glEnableVertexAttribArrayARB GLEW_GET_FUN(__glewEnableVertexAttribArrayARB) +#define glGenProgramsARB GLEW_GET_FUN(__glewGenProgramsARB) +#define glGetProgramEnvParameterdvARB GLEW_GET_FUN(__glewGetProgramEnvParameterdvARB) +#define glGetProgramEnvParameterfvARB GLEW_GET_FUN(__glewGetProgramEnvParameterfvARB) +#define glGetProgramLocalParameterdvARB GLEW_GET_FUN(__glewGetProgramLocalParameterdvARB) +#define glGetProgramLocalParameterfvARB GLEW_GET_FUN(__glewGetProgramLocalParameterfvARB) +#define glGetProgramStringARB GLEW_GET_FUN(__glewGetProgramStringARB) +#define glGetProgramivARB GLEW_GET_FUN(__glewGetProgramivARB) +#define glGetVertexAttribPointervARB GLEW_GET_FUN(__glewGetVertexAttribPointervARB) +#define glGetVertexAttribdvARB GLEW_GET_FUN(__glewGetVertexAttribdvARB) +#define glGetVertexAttribfvARB GLEW_GET_FUN(__glewGetVertexAttribfvARB) +#define glGetVertexAttribivARB GLEW_GET_FUN(__glewGetVertexAttribivARB) +#define glIsProgramARB GLEW_GET_FUN(__glewIsProgramARB) +#define glProgramEnvParameter4dARB GLEW_GET_FUN(__glewProgramEnvParameter4dARB) +#define glProgramEnvParameter4dvARB GLEW_GET_FUN(__glewProgramEnvParameter4dvARB) +#define glProgramEnvParameter4fARB GLEW_GET_FUN(__glewProgramEnvParameter4fARB) +#define glProgramEnvParameter4fvARB GLEW_GET_FUN(__glewProgramEnvParameter4fvARB) +#define glProgramLocalParameter4dARB GLEW_GET_FUN(__glewProgramLocalParameter4dARB) +#define glProgramLocalParameter4dvARB GLEW_GET_FUN(__glewProgramLocalParameter4dvARB) +#define glProgramLocalParameter4fARB GLEW_GET_FUN(__glewProgramLocalParameter4fARB) +#define glProgramLocalParameter4fvARB GLEW_GET_FUN(__glewProgramLocalParameter4fvARB) +#define glProgramStringARB GLEW_GET_FUN(__glewProgramStringARB) +#define glVertexAttrib1dARB GLEW_GET_FUN(__glewVertexAttrib1dARB) +#define glVertexAttrib1dvARB GLEW_GET_FUN(__glewVertexAttrib1dvARB) +#define glVertexAttrib1fARB GLEW_GET_FUN(__glewVertexAttrib1fARB) +#define glVertexAttrib1fvARB GLEW_GET_FUN(__glewVertexAttrib1fvARB) +#define glVertexAttrib1sARB GLEW_GET_FUN(__glewVertexAttrib1sARB) +#define glVertexAttrib1svARB GLEW_GET_FUN(__glewVertexAttrib1svARB) +#define glVertexAttrib2dARB GLEW_GET_FUN(__glewVertexAttrib2dARB) +#define glVertexAttrib2dvARB GLEW_GET_FUN(__glewVertexAttrib2dvARB) +#define glVertexAttrib2fARB GLEW_GET_FUN(__glewVertexAttrib2fARB) +#define glVertexAttrib2fvARB GLEW_GET_FUN(__glewVertexAttrib2fvARB) +#define glVertexAttrib2sARB GLEW_GET_FUN(__glewVertexAttrib2sARB) +#define glVertexAttrib2svARB GLEW_GET_FUN(__glewVertexAttrib2svARB) +#define glVertexAttrib3dARB GLEW_GET_FUN(__glewVertexAttrib3dARB) +#define glVertexAttrib3dvARB GLEW_GET_FUN(__glewVertexAttrib3dvARB) +#define glVertexAttrib3fARB GLEW_GET_FUN(__glewVertexAttrib3fARB) +#define glVertexAttrib3fvARB GLEW_GET_FUN(__glewVertexAttrib3fvARB) +#define glVertexAttrib3sARB GLEW_GET_FUN(__glewVertexAttrib3sARB) +#define glVertexAttrib3svARB GLEW_GET_FUN(__glewVertexAttrib3svARB) +#define glVertexAttrib4NbvARB GLEW_GET_FUN(__glewVertexAttrib4NbvARB) +#define glVertexAttrib4NivARB GLEW_GET_FUN(__glewVertexAttrib4NivARB) +#define glVertexAttrib4NsvARB GLEW_GET_FUN(__glewVertexAttrib4NsvARB) +#define glVertexAttrib4NubARB GLEW_GET_FUN(__glewVertexAttrib4NubARB) +#define glVertexAttrib4NubvARB GLEW_GET_FUN(__glewVertexAttrib4NubvARB) +#define glVertexAttrib4NuivARB GLEW_GET_FUN(__glewVertexAttrib4NuivARB) +#define glVertexAttrib4NusvARB GLEW_GET_FUN(__glewVertexAttrib4NusvARB) +#define glVertexAttrib4bvARB GLEW_GET_FUN(__glewVertexAttrib4bvARB) +#define glVertexAttrib4dARB GLEW_GET_FUN(__glewVertexAttrib4dARB) +#define glVertexAttrib4dvARB GLEW_GET_FUN(__glewVertexAttrib4dvARB) +#define glVertexAttrib4fARB GLEW_GET_FUN(__glewVertexAttrib4fARB) +#define glVertexAttrib4fvARB GLEW_GET_FUN(__glewVertexAttrib4fvARB) +#define glVertexAttrib4ivARB GLEW_GET_FUN(__glewVertexAttrib4ivARB) +#define glVertexAttrib4sARB GLEW_GET_FUN(__glewVertexAttrib4sARB) +#define glVertexAttrib4svARB GLEW_GET_FUN(__glewVertexAttrib4svARB) +#define glVertexAttrib4ubvARB GLEW_GET_FUN(__glewVertexAttrib4ubvARB) +#define glVertexAttrib4uivARB GLEW_GET_FUN(__glewVertexAttrib4uivARB) +#define glVertexAttrib4usvARB GLEW_GET_FUN(__glewVertexAttrib4usvARB) +#define glVertexAttribPointerARB GLEW_GET_FUN(__glewVertexAttribPointerARB) + +#define GLEW_ARB_vertex_program GLEW_GET_VAR(__GLEW_ARB_vertex_program) + +#endif /* GL_ARB_vertex_program */ + +/* -------------------------- GL_ARB_vertex_shader ------------------------- */ + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 + +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A + +typedef void (GLAPIENTRY * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB* name); +typedef void (GLAPIENTRY * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint (GLAPIENTRY * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name); + +#define glBindAttribLocationARB GLEW_GET_FUN(__glewBindAttribLocationARB) +#define glGetActiveAttribARB GLEW_GET_FUN(__glewGetActiveAttribARB) +#define glGetAttribLocationARB GLEW_GET_FUN(__glewGetAttribLocationARB) + +#define GLEW_ARB_vertex_shader GLEW_GET_VAR(__GLEW_ARB_vertex_shader) + +#endif /* GL_ARB_vertex_shader */ + +/* --------------------------- GL_ARB_window_pos --------------------------- */ + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 + +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort* p); + +#define glWindowPos2dARB GLEW_GET_FUN(__glewWindowPos2dARB) +#define glWindowPos2dvARB GLEW_GET_FUN(__glewWindowPos2dvARB) +#define glWindowPos2fARB GLEW_GET_FUN(__glewWindowPos2fARB) +#define glWindowPos2fvARB GLEW_GET_FUN(__glewWindowPos2fvARB) +#define glWindowPos2iARB GLEW_GET_FUN(__glewWindowPos2iARB) +#define glWindowPos2ivARB GLEW_GET_FUN(__glewWindowPos2ivARB) +#define glWindowPos2sARB GLEW_GET_FUN(__glewWindowPos2sARB) +#define glWindowPos2svARB GLEW_GET_FUN(__glewWindowPos2svARB) +#define glWindowPos3dARB GLEW_GET_FUN(__glewWindowPos3dARB) +#define glWindowPos3dvARB GLEW_GET_FUN(__glewWindowPos3dvARB) +#define glWindowPos3fARB GLEW_GET_FUN(__glewWindowPos3fARB) +#define glWindowPos3fvARB GLEW_GET_FUN(__glewWindowPos3fvARB) +#define glWindowPos3iARB GLEW_GET_FUN(__glewWindowPos3iARB) +#define glWindowPos3ivARB GLEW_GET_FUN(__glewWindowPos3ivARB) +#define glWindowPos3sARB GLEW_GET_FUN(__glewWindowPos3sARB) +#define glWindowPos3svARB GLEW_GET_FUN(__glewWindowPos3svARB) + +#define GLEW_ARB_window_pos GLEW_GET_VAR(__GLEW_ARB_window_pos) + +#endif /* GL_ARB_window_pos */ + +/* ------------------------- GL_ATIX_point_sprites ------------------------- */ + +#ifndef GL_ATIX_point_sprites +#define GL_ATIX_point_sprites 1 + +#define GLEW_ATIX_point_sprites GLEW_GET_VAR(__GLEW_ATIX_point_sprites) + +#endif /* GL_ATIX_point_sprites */ + +/* ---------------------- GL_ATIX_texture_env_combine3 --------------------- */ + +#ifndef GL_ATIX_texture_env_combine3 +#define GL_ATIX_texture_env_combine3 1 + +#define GL_MODULATE_ADD_ATIX 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATIX 0x8745 +#define GL_MODULATE_SUBTRACT_ATIX 0x8746 + +#define GLEW_ATIX_texture_env_combine3 GLEW_GET_VAR(__GLEW_ATIX_texture_env_combine3) + +#endif /* GL_ATIX_texture_env_combine3 */ + +/* ----------------------- GL_ATIX_texture_env_route ----------------------- */ + +#ifndef GL_ATIX_texture_env_route +#define GL_ATIX_texture_env_route 1 + +#define GL_SECONDARY_COLOR_ATIX 0x8747 +#define GL_TEXTURE_OUTPUT_RGB_ATIX 0x8748 +#define GL_TEXTURE_OUTPUT_ALPHA_ATIX 0x8749 + +#define GLEW_ATIX_texture_env_route GLEW_GET_VAR(__GLEW_ATIX_texture_env_route) + +#endif /* GL_ATIX_texture_env_route */ + +/* ---------------- GL_ATIX_vertex_shader_output_point_size ---------------- */ + +#ifndef GL_ATIX_vertex_shader_output_point_size +#define GL_ATIX_vertex_shader_output_point_size 1 + +#define GL_OUTPUT_POINT_SIZE_ATIX 0x610E + +#define GLEW_ATIX_vertex_shader_output_point_size GLEW_GET_VAR(__GLEW_ATIX_vertex_shader_output_point_size) + +#endif /* GL_ATIX_vertex_shader_output_point_size */ + +/* -------------------------- GL_ATI_draw_buffers -------------------------- */ + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 + +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 + +typedef void (GLAPIENTRY * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum* bufs); + +#define glDrawBuffersATI GLEW_GET_FUN(__glewDrawBuffersATI) + +#define GLEW_ATI_draw_buffers GLEW_GET_VAR(__GLEW_ATI_draw_buffers) + +#endif /* GL_ATI_draw_buffers */ + +/* -------------------------- GL_ATI_element_array ------------------------- */ + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 + +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A + +typedef void (GLAPIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +typedef void (GLAPIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void* pointer); + +#define glDrawElementArrayATI GLEW_GET_FUN(__glewDrawElementArrayATI) +#define glDrawRangeElementArrayATI GLEW_GET_FUN(__glewDrawRangeElementArrayATI) +#define glElementPointerATI GLEW_GET_FUN(__glewElementPointerATI) + +#define GLEW_ATI_element_array GLEW_GET_VAR(__GLEW_ATI_element_array) + +#endif /* GL_ATI_element_array */ + +/* ------------------------- GL_ATI_envmap_bumpmap ------------------------- */ + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 + +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C + +typedef void (GLAPIENTRY * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +typedef void (GLAPIENTRY * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void (GLAPIENTRY * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +typedef void (GLAPIENTRY * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); + +#define glGetTexBumpParameterfvATI GLEW_GET_FUN(__glewGetTexBumpParameterfvATI) +#define glGetTexBumpParameterivATI GLEW_GET_FUN(__glewGetTexBumpParameterivATI) +#define glTexBumpParameterfvATI GLEW_GET_FUN(__glewTexBumpParameterfvATI) +#define glTexBumpParameterivATI GLEW_GET_FUN(__glewTexBumpParameterivATI) + +#define GLEW_ATI_envmap_bumpmap GLEW_GET_VAR(__GLEW_ATI_envmap_bumpmap) + +#endif /* GL_ATI_envmap_bumpmap */ + +/* ------------------------- GL_ATI_fragment_shader ------------------------ */ + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 + +#define GL_RED_BIT_ATI 0x00000001 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B + +typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (GLAPIENTRY * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (GLAPIENTRY * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void (GLAPIENTRY * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (GLAPIENTRY * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (GLAPIENTRY * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef GLuint (GLAPIENTRY * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (GLAPIENTRY * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (GLAPIENTRY * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (GLAPIENTRY * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat* value); + +#define glAlphaFragmentOp1ATI GLEW_GET_FUN(__glewAlphaFragmentOp1ATI) +#define glAlphaFragmentOp2ATI GLEW_GET_FUN(__glewAlphaFragmentOp2ATI) +#define glAlphaFragmentOp3ATI GLEW_GET_FUN(__glewAlphaFragmentOp3ATI) +#define glBeginFragmentShaderATI GLEW_GET_FUN(__glewBeginFragmentShaderATI) +#define glBindFragmentShaderATI GLEW_GET_FUN(__glewBindFragmentShaderATI) +#define glColorFragmentOp1ATI GLEW_GET_FUN(__glewColorFragmentOp1ATI) +#define glColorFragmentOp2ATI GLEW_GET_FUN(__glewColorFragmentOp2ATI) +#define glColorFragmentOp3ATI GLEW_GET_FUN(__glewColorFragmentOp3ATI) +#define glDeleteFragmentShaderATI GLEW_GET_FUN(__glewDeleteFragmentShaderATI) +#define glEndFragmentShaderATI GLEW_GET_FUN(__glewEndFragmentShaderATI) +#define glGenFragmentShadersATI GLEW_GET_FUN(__glewGenFragmentShadersATI) +#define glPassTexCoordATI GLEW_GET_FUN(__glewPassTexCoordATI) +#define glSampleMapATI GLEW_GET_FUN(__glewSampleMapATI) +#define glSetFragmentShaderConstantATI GLEW_GET_FUN(__glewSetFragmentShaderConstantATI) + +#define GLEW_ATI_fragment_shader GLEW_GET_VAR(__GLEW_ATI_fragment_shader) + +#endif /* GL_ATI_fragment_shader */ + +/* ------------------------ GL_ATI_map_object_buffer ----------------------- */ + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 + +typedef void* (GLAPIENTRY * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (GLAPIENTRY * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); + +#define glMapObjectBufferATI GLEW_GET_FUN(__glewMapObjectBufferATI) +#define glUnmapObjectBufferATI GLEW_GET_FUN(__glewUnmapObjectBufferATI) + +#define GLEW_ATI_map_object_buffer GLEW_GET_VAR(__GLEW_ATI_map_object_buffer) + +#endif /* GL_ATI_map_object_buffer */ + +/* -------------------------- GL_ATI_pn_triangles -------------------------- */ + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 + +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 + +typedef void (GLAPIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); + +#define glPNTrianglesfATI GLEW_GET_FUN(__glPNTrianglewesfATI) +#define glPNTrianglesiATI GLEW_GET_FUN(__glPNTrianglewesiATI) + +#define GLEW_ATI_pn_triangles GLEW_GET_VAR(__GLEW_ATI_pn_triangles) + +#endif /* GL_ATI_pn_triangles */ + +/* ------------------------ GL_ATI_separate_stencil ------------------------ */ + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 + +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 + +typedef void (GLAPIENTRY * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void (GLAPIENTRY * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); + +#define glStencilFuncSeparateATI GLEW_GET_FUN(__glewStencilFuncSeparateATI) +#define glStencilOpSeparateATI GLEW_GET_FUN(__glewStencilOpSeparateATI) + +#define GLEW_ATI_separate_stencil GLEW_GET_VAR(__GLEW_ATI_separate_stencil) + +#endif /* GL_ATI_separate_stencil */ + +/* ---------------------- GL_ATI_text_fragment_shader ---------------------- */ + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 + +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 + +#define GLEW_ATI_text_fragment_shader GLEW_GET_VAR(__GLEW_ATI_text_fragment_shader) + +#endif /* GL_ATI_text_fragment_shader */ + +/* --------------------- GL_ATI_texture_compression_3dc -------------------- */ + +#ifndef GL_ATI_texture_compression_3dc +#define GL_ATI_texture_compression_3dc 1 + +#define GL_COMPRESSED_RGB_3DC_ATI 0x8837 + +#define GLEW_ATI_texture_compression_3dc GLEW_GET_VAR(__GLEW_ATI_texture_compression_3dc) + +#endif /* GL_ATI_texture_compression_3dc */ + +/* ---------------------- GL_ATI_texture_env_combine3 ---------------------- */ + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 + +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 + +#define GLEW_ATI_texture_env_combine3 GLEW_GET_VAR(__GLEW_ATI_texture_env_combine3) + +#endif /* GL_ATI_texture_env_combine3 */ + +/* -------------------------- GL_ATI_texture_float ------------------------- */ + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 + +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F + +#define GLEW_ATI_texture_float GLEW_GET_VAR(__GLEW_ATI_texture_float) + +#endif /* GL_ATI_texture_float */ + +/* ----------------------- GL_ATI_texture_mirror_once ---------------------- */ + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 + +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 + +#define GLEW_ATI_texture_mirror_once GLEW_GET_VAR(__GLEW_ATI_texture_mirror_once) + +#endif /* GL_ATI_texture_mirror_once */ + +/* ----------------------- GL_ATI_vertex_array_object ---------------------- */ + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 + +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 + +typedef void (GLAPIENTRY * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (GLAPIENTRY * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (GLAPIENTRY * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef GLuint (GLAPIENTRY * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void* pointer, GLenum usage); +typedef void (GLAPIENTRY * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void* pointer, GLenum preserve); +typedef void (GLAPIENTRY * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); + +#define glArrayObjectATI GLEW_GET_FUN(__glewArrayObjectATI) +#define glFreeObjectBufferATI GLEW_GET_FUN(__glewFreeObjectBufferATI) +#define glGetArrayObjectfvATI GLEW_GET_FUN(__glewGetArrayObjectfvATI) +#define glGetArrayObjectivATI GLEW_GET_FUN(__glewGetArrayObjectivATI) +#define glGetObjectBufferfvATI GLEW_GET_FUN(__glewGetObjectBufferfvATI) +#define glGetObjectBufferivATI GLEW_GET_FUN(__glewGetObjectBufferivATI) +#define glGetVariantArrayObjectfvATI GLEW_GET_FUN(__glewGetVariantArrayObjectfvATI) +#define glGetVariantArrayObjectivATI GLEW_GET_FUN(__glewGetVariantArrayObjectivATI) +#define glIsObjectBufferATI GLEW_GET_FUN(__glewIsObjectBufferATI) +#define glNewObjectBufferATI GLEW_GET_FUN(__glewNewObjectBufferATI) +#define glUpdateObjectBufferATI GLEW_GET_FUN(__glewUpdateObjectBufferATI) +#define glVariantArrayObjectATI GLEW_GET_FUN(__glewVariantArrayObjectATI) + +#define GLEW_ATI_vertex_array_object GLEW_GET_VAR(__GLEW_ATI_vertex_array_object) + +#endif /* GL_ATI_vertex_array_object */ + +/* ------------------- GL_ATI_vertex_attrib_array_object ------------------- */ + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 + +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); + +#define glGetVertexAttribArrayObjectfvATI GLEW_GET_FUN(__glewGetVertexAttribArrayObjectfvATI) +#define glGetVertexAttribArrayObjectivATI GLEW_GET_FUN(__glewGetVertexAttribArrayObjectivATI) +#define glVertexAttribArrayObjectATI GLEW_GET_FUN(__glewVertexAttribArrayObjectATI) + +#define GLEW_ATI_vertex_attrib_array_object GLEW_GET_VAR(__GLEW_ATI_vertex_attrib_array_object) + +#endif /* GL_ATI_vertex_attrib_array_object */ + +/* ------------------------- GL_ATI_vertex_streams ------------------------- */ + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 + +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_SOURCE_ATI 0x876C +#define GL_VERTEX_STREAM0_ATI 0x876D +#define GL_VERTEX_STREAM1_ATI 0x876E +#define GL_VERTEX_STREAM2_ATI 0x876F +#define GL_VERTEX_STREAM3_ATI 0x8770 +#define GL_VERTEX_STREAM4_ATI 0x8771 +#define GL_VERTEX_STREAM5_ATI 0x8772 +#define GL_VERTEX_STREAM6_ATI 0x8773 +#define GL_VERTEX_STREAM7_ATI 0x8774 + +typedef void (GLAPIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *v); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *v); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *v); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAPIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *v); + +#define glClientActiveVertexStreamATI GLEW_GET_FUN(__glewClientActiveVertexStreamATI) +#define glNormalStream3bATI GLEW_GET_FUN(__glewNormalStream3bATI) +#define glNormalStream3bvATI GLEW_GET_FUN(__glewNormalStream3bvATI) +#define glNormalStream3dATI GLEW_GET_FUN(__glewNormalStream3dATI) +#define glNormalStream3dvATI GLEW_GET_FUN(__glewNormalStream3dvATI) +#define glNormalStream3fATI GLEW_GET_FUN(__glewNormalStream3fATI) +#define glNormalStream3fvATI GLEW_GET_FUN(__glewNormalStream3fvATI) +#define glNormalStream3iATI GLEW_GET_FUN(__glewNormalStream3iATI) +#define glNormalStream3ivATI GLEW_GET_FUN(__glewNormalStream3ivATI) +#define glNormalStream3sATI GLEW_GET_FUN(__glewNormalStream3sATI) +#define glNormalStream3svATI GLEW_GET_FUN(__glewNormalStream3svATI) +#define glVertexBlendEnvfATI GLEW_GET_FUN(__glewVertexBlendEnvfATI) +#define glVertexBlendEnviATI GLEW_GET_FUN(__glewVertexBlendEnviATI) +#define glVertexStream2dATI GLEW_GET_FUN(__glewVertexStream2dATI) +#define glVertexStream2dvATI GLEW_GET_FUN(__glewVertexStream2dvATI) +#define glVertexStream2fATI GLEW_GET_FUN(__glewVertexStream2fATI) +#define glVertexStream2fvATI GLEW_GET_FUN(__glewVertexStream2fvATI) +#define glVertexStream2iATI GLEW_GET_FUN(__glewVertexStream2iATI) +#define glVertexStream2ivATI GLEW_GET_FUN(__glewVertexStream2ivATI) +#define glVertexStream2sATI GLEW_GET_FUN(__glewVertexStream2sATI) +#define glVertexStream2svATI GLEW_GET_FUN(__glewVertexStream2svATI) +#define glVertexStream3dATI GLEW_GET_FUN(__glewVertexStream3dATI) +#define glVertexStream3dvATI GLEW_GET_FUN(__glewVertexStream3dvATI) +#define glVertexStream3fATI GLEW_GET_FUN(__glewVertexStream3fATI) +#define glVertexStream3fvATI GLEW_GET_FUN(__glewVertexStream3fvATI) +#define glVertexStream3iATI GLEW_GET_FUN(__glewVertexStream3iATI) +#define glVertexStream3ivATI GLEW_GET_FUN(__glewVertexStream3ivATI) +#define glVertexStream3sATI GLEW_GET_FUN(__glewVertexStream3sATI) +#define glVertexStream3svATI GLEW_GET_FUN(__glewVertexStream3svATI) +#define glVertexStream4dATI GLEW_GET_FUN(__glewVertexStream4dATI) +#define glVertexStream4dvATI GLEW_GET_FUN(__glewVertexStream4dvATI) +#define glVertexStream4fATI GLEW_GET_FUN(__glewVertexStream4fATI) +#define glVertexStream4fvATI GLEW_GET_FUN(__glewVertexStream4fvATI) +#define glVertexStream4iATI GLEW_GET_FUN(__glewVertexStream4iATI) +#define glVertexStream4ivATI GLEW_GET_FUN(__glewVertexStream4ivATI) +#define glVertexStream4sATI GLEW_GET_FUN(__glewVertexStream4sATI) +#define glVertexStream4svATI GLEW_GET_FUN(__glewVertexStream4svATI) + +#define GLEW_ATI_vertex_streams GLEW_GET_VAR(__GLEW_ATI_vertex_streams) + +#endif /* GL_ATI_vertex_streams */ + +/* --------------------------- GL_EXT_422_pixels --------------------------- */ + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 + +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF + +#define GLEW_EXT_422_pixels GLEW_GET_VAR(__GLEW_EXT_422_pixels) + +#endif /* GL_EXT_422_pixels */ + +/* ---------------------------- GL_EXT_Cg_shader --------------------------- */ + +#ifndef GL_EXT_Cg_shader +#define GL_EXT_Cg_shader 1 + +#define GL_CG_VERTEX_SHADER_EXT 0x890E +#define GL_CG_FRAGMENT_SHADER_EXT 0x890F + +#define GLEW_EXT_Cg_shader GLEW_GET_VAR(__GLEW_EXT_Cg_shader) + +#endif /* GL_EXT_Cg_shader */ + +/* ------------------------------ GL_EXT_abgr ------------------------------ */ + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 + +#define GL_ABGR_EXT 0x8000 + +#define GLEW_EXT_abgr GLEW_GET_VAR(__GLEW_EXT_abgr) + +#endif /* GL_EXT_abgr */ + +/* ------------------------------ GL_EXT_bgra ------------------------------ */ + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 + +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 + +#define GLEW_EXT_bgra GLEW_GET_VAR(__GLEW_EXT_bgra) + +#endif /* GL_EXT_bgra */ + +/* --------------------------- GL_EXT_blend_color -------------------------- */ + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 + +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 + +typedef void (GLAPIENTRY * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + +#define glBlendColorEXT GLEW_GET_FUN(__glewBlendColorEXT) + +#define GLEW_EXT_blend_color GLEW_GET_VAR(__GLEW_EXT_blend_color) + +#endif /* GL_EXT_blend_color */ + +/* --------------------- GL_EXT_blend_equation_separate -------------------- */ + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 + +#define GL_BLEND_EQUATION_RGB_EXT 0x8009 +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D + +typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); + +#define glBlendEquationSeparateEXT GLEW_GET_FUN(__glewBlendEquationSeparateEXT) + +#define GLEW_EXT_blend_equation_separate GLEW_GET_VAR(__GLEW_EXT_blend_equation_separate) + +#endif /* GL_EXT_blend_equation_separate */ + +/* ----------------------- GL_EXT_blend_func_separate ---------------------- */ + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 + +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB + +typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +#define glBlendFuncSeparateEXT GLEW_GET_FUN(__glewBlendFuncSeparateEXT) + +#define GLEW_EXT_blend_func_separate GLEW_GET_VAR(__GLEW_EXT_blend_func_separate) + +#endif /* GL_EXT_blend_func_separate */ + +/* ------------------------- GL_EXT_blend_logic_op ------------------------- */ + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 + +#define GLEW_EXT_blend_logic_op GLEW_GET_VAR(__GLEW_EXT_blend_logic_op) + +#endif /* GL_EXT_blend_logic_op */ + +/* -------------------------- GL_EXT_blend_minmax -------------------------- */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 + +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 + +typedef void (GLAPIENTRY * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); + +#define glBlendEquationEXT GLEW_GET_FUN(__glewBlendEquationEXT) + +#define GLEW_EXT_blend_minmax GLEW_GET_VAR(__GLEW_EXT_blend_minmax) + +#endif /* GL_EXT_blend_minmax */ + +/* ------------------------- GL_EXT_blend_subtract ------------------------- */ + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 + +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B + +#define GLEW_EXT_blend_subtract GLEW_GET_VAR(__GLEW_EXT_blend_subtract) + +#endif /* GL_EXT_blend_subtract */ + +/* ------------------------ GL_EXT_clip_volume_hint ------------------------ */ + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 + +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 + +#define GLEW_EXT_clip_volume_hint GLEW_GET_VAR(__GLEW_EXT_clip_volume_hint) + +#endif /* GL_EXT_clip_volume_hint */ + +/* ------------------------------ GL_EXT_cmyka ----------------------------- */ + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 + +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F + +#define GLEW_EXT_cmyka GLEW_GET_VAR(__GLEW_EXT_cmyka) + +#endif /* GL_EXT_cmyka */ + +/* ------------------------- GL_EXT_color_subtable ------------------------- */ + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 + +typedef void (GLAPIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void* data); +typedef void (GLAPIENTRY * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); + +#define glColorSubTableEXT GLEW_GET_FUN(__glewColorSubTableEXT) +#define glCopyColorSubTableEXT GLEW_GET_FUN(__glewCopyColorSubTableEXT) + +#define GLEW_EXT_color_subtable GLEW_GET_VAR(__GLEW_EXT_color_subtable) + +#endif /* GL_EXT_color_subtable */ + +/* ---------------------- GL_EXT_compiled_vertex_array --------------------- */ + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 + +typedef void (GLAPIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (GLAPIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void); + +#define glLockArraysEXT GLEW_GET_FUN(__glewLockArraysEXT) +#define glUnlockArraysEXT GLEW_GET_FUN(__glewUnlockArraysEXT) + +#define GLEW_EXT_compiled_vertex_array GLEW_GET_VAR(__GLEW_EXT_compiled_vertex_array) + +#endif /* GL_EXT_compiled_vertex_array */ + +/* --------------------------- GL_EXT_convolution -------------------------- */ + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 + +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 + +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* image); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* image); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* image); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* row, void* column, void* span); +typedef void (GLAPIENTRY * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* row, const void* column); + +#define glConvolutionFilter1DEXT GLEW_GET_FUN(__glewConvolutionFilter1DEXT) +#define glConvolutionFilter2DEXT GLEW_GET_FUN(__glewConvolutionFilter2DEXT) +#define glConvolutionParameterfEXT GLEW_GET_FUN(__glewConvolutionParameterfEXT) +#define glConvolutionParameterfvEXT GLEW_GET_FUN(__glewConvolutionParameterfvEXT) +#define glConvolutionParameteriEXT GLEW_GET_FUN(__glewConvolutionParameteriEXT) +#define glConvolutionParameterivEXT GLEW_GET_FUN(__glewConvolutionParameterivEXT) +#define glCopyConvolutionFilter1DEXT GLEW_GET_FUN(__glewCopyConvolutionFilter1DEXT) +#define glCopyConvolutionFilter2DEXT GLEW_GET_FUN(__glewCopyConvolutionFilter2DEXT) +#define glGetConvolutionFilterEXT GLEW_GET_FUN(__glewGetConvolutionFilterEXT) +#define glGetConvolutionParameterfvEXT GLEW_GET_FUN(__glewGetConvolutionParameterfvEXT) +#define glGetConvolutionParameterivEXT GLEW_GET_FUN(__glewGetConvolutionParameterivEXT) +#define glGetSeparableFilterEXT GLEW_GET_FUN(__glewGetSeparableFilterEXT) +#define glSeparableFilter2DEXT GLEW_GET_FUN(__glewSeparableFilter2DEXT) + +#define GLEW_EXT_convolution GLEW_GET_VAR(__GLEW_EXT_convolution) + +#endif /* GL_EXT_convolution */ + +/* ------------------------ GL_EXT_coordinate_frame ------------------------ */ + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 + +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 + +typedef void (GLAPIENTRY * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer); +typedef void (GLAPIENTRY * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer); + +#define glBinormalPointerEXT GLEW_GET_FUN(__glewBinormalPointerEXT) +#define glTangentPointerEXT GLEW_GET_FUN(__glewTangentPointerEXT) + +#define GLEW_EXT_coordinate_frame GLEW_GET_VAR(__GLEW_EXT_coordinate_frame) + +#endif /* GL_EXT_coordinate_frame */ + +/* -------------------------- GL_EXT_copy_texture -------------------------- */ + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 + +typedef void (GLAPIENTRY * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (GLAPIENTRY * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GLAPIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + +#define glCopyTexImage1DEXT GLEW_GET_FUN(__glewCopyTexImage1DEXT) +#define glCopyTexImage2DEXT GLEW_GET_FUN(__glewCopyTexImage2DEXT) +#define glCopyTexSubImage1DEXT GLEW_GET_FUN(__glewCopyTexSubImage1DEXT) +#define glCopyTexSubImage2DEXT GLEW_GET_FUN(__glewCopyTexSubImage2DEXT) +#define glCopyTexSubImage3DEXT GLEW_GET_FUN(__glewCopyTexSubImage3DEXT) + +#define GLEW_EXT_copy_texture GLEW_GET_VAR(__GLEW_EXT_copy_texture) + +#endif /* GL_EXT_copy_texture */ + +/* --------------------------- GL_EXT_cull_vertex -------------------------- */ + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 + +typedef void (GLAPIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params); + +#define glCullParameterdvEXT GLEW_GET_FUN(__glewCullParameterdvEXT) +#define glCullParameterfvEXT GLEW_GET_FUN(__glewCullParameterfvEXT) + +#define GLEW_EXT_cull_vertex GLEW_GET_VAR(__GLEW_EXT_cull_vertex) + +#endif /* GL_EXT_cull_vertex */ + +/* ------------------------ GL_EXT_depth_bounds_test ----------------------- */ + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 + +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 + +typedef void (GLAPIENTRY * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); + +#define glDepthBoundsEXT GLEW_GET_FUN(__glewDepthBoundsEXT) + +#define GLEW_EXT_depth_bounds_test GLEW_GET_VAR(__GLEW_EXT_depth_bounds_test) + +#endif /* GL_EXT_depth_bounds_test */ + +/* ----------------------- GL_EXT_draw_range_elements ---------------------- */ + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 + +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 + +typedef void (GLAPIENTRY * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); + +#define glDrawRangeElementsEXT GLEW_GET_FUN(__glewDrawRangeElementsEXT) + +#define GLEW_EXT_draw_range_elements GLEW_GET_VAR(__GLEW_EXT_draw_range_elements) + +#endif /* GL_EXT_draw_range_elements */ + +/* ---------------------------- GL_EXT_fog_coord --------------------------- */ + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 + +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 + +typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (GLAPIENTRY * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (GLAPIENTRY * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); + +#define glFogCoordPointerEXT GLEW_GET_FUN(__glewFogCoordPointerEXT) +#define glFogCoorddEXT GLEW_GET_FUN(__glewFogCoorddEXT) +#define glFogCoorddvEXT GLEW_GET_FUN(__glewFogCoorddvEXT) +#define glFogCoordfEXT GLEW_GET_FUN(__glewFogCoordfEXT) +#define glFogCoordfvEXT GLEW_GET_FUN(__glewFogCoordfvEXT) + +#define GLEW_EXT_fog_coord GLEW_GET_VAR(__GLEW_EXT_fog_coord) + +#endif /* GL_EXT_fog_coord */ + +/* ------------------------ GL_EXT_fragment_lighting ----------------------- */ + +#ifndef GL_EXT_fragment_lighting +#define GL_EXT_fragment_lighting 1 + +#define GL_FRAGMENT_LIGHTING_EXT 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_EXT 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_EXT 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_EXT 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_EXT 0x8405 +#define GL_CURRENT_RASTER_NORMAL_EXT 0x8406 +#define GL_LIGHT_ENV_MODE_EXT 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_EXT 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT 0x840B +#define GL_FRAGMENT_LIGHT0_EXT 0x840C +#define GL_FRAGMENT_LIGHT7_EXT 0x8413 + +typedef void (GLAPIENTRY * PFNGLFRAGMENTCOLORMATERIALEXTPROC) (GLenum face, GLenum mode); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFEXTPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVEXTPROC) (GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIEXTPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVEXTPROC) (GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFEXTPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIEXTPROC) (GLenum light, GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFEXTPROC) (GLenum face, GLenum pname, const GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIEXTPROC) (GLenum face, GLenum pname, const GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLLIGHTENVIEXTPROC) (GLenum pname, GLint param); + +#define glFragmentColorMaterialEXT GLEW_GET_FUN(__glewFragmentColorMaterialEXT) +#define glFragmentLightModelfEXT GLEW_GET_FUN(__glewFragmentLightModelfEXT) +#define glFragmentLightModelfvEXT GLEW_GET_FUN(__glewFragmentLightModelfvEXT) +#define glFragmentLightModeliEXT GLEW_GET_FUN(__glewFragmentLightModeliEXT) +#define glFragmentLightModelivEXT GLEW_GET_FUN(__glewFragmentLightModelivEXT) +#define glFragmentLightfEXT GLEW_GET_FUN(__glewFragmentLightfEXT) +#define glFragmentLightfvEXT GLEW_GET_FUN(__glewFragmentLightfvEXT) +#define glFragmentLightiEXT GLEW_GET_FUN(__glewFragmentLightiEXT) +#define glFragmentLightivEXT GLEW_GET_FUN(__glewFragmentLightivEXT) +#define glFragmentMaterialfEXT GLEW_GET_FUN(__glewFragmentMaterialfEXT) +#define glFragmentMaterialfvEXT GLEW_GET_FUN(__glewFragmentMaterialfvEXT) +#define glFragmentMaterialiEXT GLEW_GET_FUN(__glewFragmentMaterialiEXT) +#define glFragmentMaterialivEXT GLEW_GET_FUN(__glewFragmentMaterialivEXT) +#define glGetFragmentLightfvEXT GLEW_GET_FUN(__glewGetFragmentLightfvEXT) +#define glGetFragmentLightivEXT GLEW_GET_FUN(__glewGetFragmentLightivEXT) +#define glGetFragmentMaterialfvEXT GLEW_GET_FUN(__glewGetFragmentMaterialfvEXT) +#define glGetFragmentMaterialivEXT GLEW_GET_FUN(__glewGetFragmentMaterialivEXT) +#define glLightEnviEXT GLEW_GET_FUN(__glewLightEnviEXT) + +#define GLEW_EXT_fragment_lighting GLEW_GET_VAR(__GLEW_EXT_fragment_lighting) + +#endif /* GL_EXT_fragment_lighting */ + +/* ------------------------ GL_EXT_framebuffer_blit ------------------------ */ + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 + +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA + +typedef void (GLAPIENTRY * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +#define glBlitFramebufferEXT GLEW_GET_FUN(__glewBlitFramebufferEXT) + +#define GLEW_EXT_framebuffer_blit GLEW_GET_VAR(__GLEW_EXT_framebuffer_blit) + +#endif /* GL_EXT_framebuffer_blit */ + +/* --------------------- GL_EXT_framebuffer_multisample -------------------- */ + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 + +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB + +typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + +#define glRenderbufferStorageMultisampleEXT GLEW_GET_FUN(__glewRenderbufferStorageMultisampleEXT) + +#define GLEW_EXT_framebuffer_multisample GLEW_GET_VAR(__GLEW_EXT_framebuffer_multisample) + +#endif /* GL_EXT_framebuffer_multisample */ + +/* ----------------------- GL_EXT_framebuffer_object ----------------------- */ + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 + +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 + +typedef void (GLAPIENTRY * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (GLAPIENTRY * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef GLenum (GLAPIENTRY * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint* framebuffers); +typedef void (GLAPIENTRY * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint* renderbuffers); +typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (GLAPIENTRY * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint* framebuffers); +typedef void (GLAPIENTRY * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint* renderbuffers); +typedef void (GLAPIENTRY * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef GLboolean (GLAPIENTRY * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); + +#define glBindFramebufferEXT GLEW_GET_FUN(__glewBindFramebufferEXT) +#define glBindRenderbufferEXT GLEW_GET_FUN(__glewBindRenderbufferEXT) +#define glCheckFramebufferStatusEXT GLEW_GET_FUN(__glewCheckFramebufferStatusEXT) +#define glDeleteFramebuffersEXT GLEW_GET_FUN(__glewDeleteFramebuffersEXT) +#define glDeleteRenderbuffersEXT GLEW_GET_FUN(__glewDeleteRenderbuffersEXT) +#define glFramebufferRenderbufferEXT GLEW_GET_FUN(__glewFramebufferRenderbufferEXT) +#define glFramebufferTexture1DEXT GLEW_GET_FUN(__glewFramebufferTexture1DEXT) +#define glFramebufferTexture2DEXT GLEW_GET_FUN(__glewFramebufferTexture2DEXT) +#define glFramebufferTexture3DEXT GLEW_GET_FUN(__glewFramebufferTexture3DEXT) +#define glGenFramebuffersEXT GLEW_GET_FUN(__glewGenFramebuffersEXT) +#define glGenRenderbuffersEXT GLEW_GET_FUN(__glewGenRenderbuffersEXT) +#define glGenerateMipmapEXT GLEW_GET_FUN(__glewGenerateMipmapEXT) +#define glGetFramebufferAttachmentParameterivEXT GLEW_GET_FUN(__glewGetFramebufferAttachmentParameterivEXT) +#define glGetRenderbufferParameterivEXT GLEW_GET_FUN(__glewGetRenderbufferParameterivEXT) +#define glIsFramebufferEXT GLEW_GET_FUN(__glewIsFramebufferEXT) +#define glIsRenderbufferEXT GLEW_GET_FUN(__glewIsRenderbufferEXT) +#define glRenderbufferStorageEXT GLEW_GET_FUN(__glewRenderbufferStorageEXT) + +#define GLEW_EXT_framebuffer_object GLEW_GET_VAR(__GLEW_EXT_framebuffer_object) + +#endif /* GL_EXT_framebuffer_object */ + +/* ---------------------------- GL_EXT_histogram --------------------------- */ + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 + +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 + +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values); +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values); +typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (GLAPIENTRY * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (GLAPIENTRY * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLRESETMINMAXEXTPROC) (GLenum target); + +#define glGetHistogramEXT GLEW_GET_FUN(__glewGetHistogramEXT) +#define glGetHistogramParameterfvEXT GLEW_GET_FUN(__glewGetHistogramParameterfvEXT) +#define glGetHistogramParameterivEXT GLEW_GET_FUN(__glewGetHistogramParameterivEXT) +#define glGetMinmaxEXT GLEW_GET_FUN(__glewGetMinmaxEXT) +#define glGetMinmaxParameterfvEXT GLEW_GET_FUN(__glewGetMinmaxParameterfvEXT) +#define glGetMinmaxParameterivEXT GLEW_GET_FUN(__glewGetMinmaxParameterivEXT) +#define glHistogramEXT GLEW_GET_FUN(__glewHistogramEXT) +#define glMinmaxEXT GLEW_GET_FUN(__glewMinmaxEXT) +#define glResetHistogramEXT GLEW_GET_FUN(__glewResetHistogramEXT) +#define glResetMinmaxEXT GLEW_GET_FUN(__glewResetMinmaxEXT) + +#define GLEW_EXT_histogram GLEW_GET_VAR(__GLEW_EXT_histogram) + +#endif /* GL_EXT_histogram */ + +/* ----------------------- GL_EXT_index_array_formats ---------------------- */ + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 + +#define GLEW_EXT_index_array_formats GLEW_GET_VAR(__GLEW_EXT_index_array_formats) + +#endif /* GL_EXT_index_array_formats */ + +/* --------------------------- GL_EXT_index_func --------------------------- */ + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 + +typedef void (GLAPIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLfloat ref); + +#define glIndexFuncEXT GLEW_GET_FUN(__glewIndexFuncEXT) + +#define GLEW_EXT_index_func GLEW_GET_VAR(__GLEW_EXT_index_func) + +#endif /* GL_EXT_index_func */ + +/* ------------------------- GL_EXT_index_material ------------------------- */ + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 + +typedef void (GLAPIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); + +#define glIndexMaterialEXT GLEW_GET_FUN(__glewIndexMaterialEXT) + +#define GLEW_EXT_index_material GLEW_GET_VAR(__GLEW_EXT_index_material) + +#endif /* GL_EXT_index_material */ + +/* -------------------------- GL_EXT_index_texture ------------------------- */ + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 + +#define GLEW_EXT_index_texture GLEW_GET_VAR(__GLEW_EXT_index_texture) + +#endif /* GL_EXT_index_texture */ + +/* -------------------------- GL_EXT_light_texture ------------------------- */ + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 + +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 + +typedef void (GLAPIENTRY * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (GLAPIENTRY * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (GLAPIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); + +#define glApplyTextureEXT GLEW_GET_FUN(__glewApplyTextureEXT) +#define glTextureLightEXT GLEW_GET_FUN(__glewTextureLightEXT) +#define glTextureMaterialEXT GLEW_GET_FUN(__glewTextureMaterialEXT) + +#define GLEW_EXT_light_texture GLEW_GET_VAR(__GLEW_EXT_light_texture) + +#endif /* GL_EXT_light_texture */ + +/* ------------------------- GL_EXT_misc_attribute ------------------------- */ + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 + +#define GLEW_EXT_misc_attribute GLEW_GET_VAR(__GLEW_EXT_misc_attribute) + +#endif /* GL_EXT_misc_attribute */ + +/* ------------------------ GL_EXT_multi_draw_arrays ----------------------- */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 + +typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint* first, GLsizei *count, GLsizei primcount); +typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, GLsizei* count, GLenum type, const GLvoid **indices, GLsizei primcount); + +#define glMultiDrawArraysEXT GLEW_GET_FUN(__glewMultiDrawArraysEXT) +#define glMultiDrawElementsEXT GLEW_GET_FUN(__glewMultiDrawElementsEXT) + +#define GLEW_EXT_multi_draw_arrays GLEW_GET_VAR(__GLEW_EXT_multi_draw_arrays) + +#endif /* GL_EXT_multi_draw_arrays */ + +/* --------------------------- GL_EXT_multisample -------------------------- */ + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 + +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 + +typedef void (GLAPIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (GLAPIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); + +#define glSampleMaskEXT GLEW_GET_FUN(__glewSampleMaskEXT) +#define glSamplePatternEXT GLEW_GET_FUN(__glewSamplePatternEXT) + +#define GLEW_EXT_multisample GLEW_GET_VAR(__GLEW_EXT_multisample) + +#endif /* GL_EXT_multisample */ + +/* ---------------------- GL_EXT_packed_depth_stencil ---------------------- */ + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 + +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 + +#define GLEW_EXT_packed_depth_stencil GLEW_GET_VAR(__GLEW_EXT_packed_depth_stencil) + +#endif /* GL_EXT_packed_depth_stencil */ + +/* -------------------------- GL_EXT_packed_pixels ------------------------- */ + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 + +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 + +#define GLEW_EXT_packed_pixels GLEW_GET_VAR(__GLEW_EXT_packed_pixels) + +#endif /* GL_EXT_packed_pixels */ + +/* ------------------------ GL_EXT_paletted_texture ------------------------ */ + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 + +#define GL_TEXTURE_1D 0x0DE0 +#define GL_TEXTURE_2D 0x0DE1 +#define GL_PROXY_TEXTURE_1D 0x8063 +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 +#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B + +typedef void (GLAPIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void* data); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void* data); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); + +#define glColorTableEXT GLEW_GET_FUN(__glewColorTableEXT) +#define glGetColorTableEXT GLEW_GET_FUN(__glewGetColorTableEXT) +#define glGetColorTableParameterfvEXT GLEW_GET_FUN(__glewGetColorTableParameterfvEXT) +#define glGetColorTableParameterivEXT GLEW_GET_FUN(__glewGetColorTableParameterivEXT) + +#define GLEW_EXT_paletted_texture GLEW_GET_VAR(__GLEW_EXT_paletted_texture) + +#endif /* GL_EXT_paletted_texture */ + +/* ----------------------- GL_EXT_pixel_buffer_object ---------------------- */ + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 + +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF + +#define GLEW_EXT_pixel_buffer_object GLEW_GET_VAR(__GLEW_EXT_pixel_buffer_object) + +#endif /* GL_EXT_pixel_buffer_object */ + +/* ------------------------- GL_EXT_pixel_transform ------------------------ */ + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 + +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 + +typedef void (GLAPIENTRY * PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, const GLfloat param); +typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, const GLint param); +typedef void (GLAPIENTRY * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); + +#define glGetPixelTransformParameterfvEXT GLEW_GET_FUN(__glewGetPixelTransformParameterfvEXT) +#define glGetPixelTransformParameterivEXT GLEW_GET_FUN(__glewGetPixelTransformParameterivEXT) +#define glPixelTransformParameterfEXT GLEW_GET_FUN(__glewPixelTransformParameterfEXT) +#define glPixelTransformParameterfvEXT GLEW_GET_FUN(__glewPixelTransformParameterfvEXT) +#define glPixelTransformParameteriEXT GLEW_GET_FUN(__glewPixelTransformParameteriEXT) +#define glPixelTransformParameterivEXT GLEW_GET_FUN(__glewPixelTransformParameterivEXT) + +#define GLEW_EXT_pixel_transform GLEW_GET_VAR(__GLEW_EXT_pixel_transform) + +#endif /* GL_EXT_pixel_transform */ + +/* ------------------- GL_EXT_pixel_transform_color_table ------------------ */ + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 + +#define GLEW_EXT_pixel_transform_color_table GLEW_GET_VAR(__GLEW_EXT_pixel_transform_color_table) + +#endif /* GL_EXT_pixel_transform_color_table */ + +/* ------------------------ GL_EXT_point_parameters ------------------------ */ + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 + +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 + +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params); + +#define glPointParameterfEXT GLEW_GET_FUN(__glewPointParameterfEXT) +#define glPointParameterfvEXT GLEW_GET_FUN(__glewPointParameterfvEXT) + +#define GLEW_EXT_point_parameters GLEW_GET_VAR(__GLEW_EXT_point_parameters) + +#endif /* GL_EXT_point_parameters */ + +/* ------------------------- GL_EXT_polygon_offset ------------------------- */ + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 + +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 + +typedef void (GLAPIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); + +#define glPolygonOffsetEXT GLEW_GET_FUN(__glewPolygonOffsetEXT) + +#define GLEW_EXT_polygon_offset GLEW_GET_VAR(__GLEW_EXT_polygon_offset) + +#endif /* GL_EXT_polygon_offset */ + +/* ------------------------- GL_EXT_rescale_normal ------------------------- */ + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 + +#define GLEW_EXT_rescale_normal GLEW_GET_VAR(__GLEW_EXT_rescale_normal) + +#endif /* GL_EXT_rescale_normal */ + +/* -------------------------- GL_EXT_scene_marker -------------------------- */ + +#ifndef GL_EXT_scene_marker +#define GL_EXT_scene_marker 1 + +typedef void (GLAPIENTRY * PFNGLBEGINSCENEEXTPROC) (void); +typedef void (GLAPIENTRY * PFNGLENDSCENEEXTPROC) (void); + +#define glBeginSceneEXT GLEW_GET_FUN(__glewBeginSceneEXT) +#define glEndSceneEXT GLEW_GET_FUN(__glewEndSceneEXT) + +#define GLEW_EXT_scene_marker GLEW_GET_VAR(__GLEW_EXT_scene_marker) + +#endif /* GL_EXT_scene_marker */ + +/* ------------------------- GL_EXT_secondary_color ------------------------ */ + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 + +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E + +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); + +#define glSecondaryColor3bEXT GLEW_GET_FUN(__glewSecondaryColor3bEXT) +#define glSecondaryColor3bvEXT GLEW_GET_FUN(__glewSecondaryColor3bvEXT) +#define glSecondaryColor3dEXT GLEW_GET_FUN(__glewSecondaryColor3dEXT) +#define glSecondaryColor3dvEXT GLEW_GET_FUN(__glewSecondaryColor3dvEXT) +#define glSecondaryColor3fEXT GLEW_GET_FUN(__glewSecondaryColor3fEXT) +#define glSecondaryColor3fvEXT GLEW_GET_FUN(__glewSecondaryColor3fvEXT) +#define glSecondaryColor3iEXT GLEW_GET_FUN(__glewSecondaryColor3iEXT) +#define glSecondaryColor3ivEXT GLEW_GET_FUN(__glewSecondaryColor3ivEXT) +#define glSecondaryColor3sEXT GLEW_GET_FUN(__glewSecondaryColor3sEXT) +#define glSecondaryColor3svEXT GLEW_GET_FUN(__glewSecondaryColor3svEXT) +#define glSecondaryColor3ubEXT GLEW_GET_FUN(__glewSecondaryColor3ubEXT) +#define glSecondaryColor3ubvEXT GLEW_GET_FUN(__glewSecondaryColor3ubvEXT) +#define glSecondaryColor3uiEXT GLEW_GET_FUN(__glewSecondaryColor3uiEXT) +#define glSecondaryColor3uivEXT GLEW_GET_FUN(__glewSecondaryColor3uivEXT) +#define glSecondaryColor3usEXT GLEW_GET_FUN(__glewSecondaryColor3usEXT) +#define glSecondaryColor3usvEXT GLEW_GET_FUN(__glewSecondaryColor3usvEXT) +#define glSecondaryColorPointerEXT GLEW_GET_FUN(__glewSecondaryColorPointerEXT) + +#define GLEW_EXT_secondary_color GLEW_GET_VAR(__GLEW_EXT_secondary_color) + +#endif /* GL_EXT_secondary_color */ + +/* --------------------- GL_EXT_separate_specular_color -------------------- */ + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 + +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA + +#define GLEW_EXT_separate_specular_color GLEW_GET_VAR(__GLEW_EXT_separate_specular_color) + +#endif /* GL_EXT_separate_specular_color */ + +/* -------------------------- GL_EXT_shadow_funcs -------------------------- */ + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 + +#define GLEW_EXT_shadow_funcs GLEW_GET_VAR(__GLEW_EXT_shadow_funcs) + +#endif /* GL_EXT_shadow_funcs */ + +/* --------------------- GL_EXT_shared_texture_palette --------------------- */ + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 + +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB + +#define GLEW_EXT_shared_texture_palette GLEW_GET_VAR(__GLEW_EXT_shared_texture_palette) + +#endif /* GL_EXT_shared_texture_palette */ + +/* ------------------------ GL_EXT_stencil_clear_tag ----------------------- */ + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 + +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 + +#define GLEW_EXT_stencil_clear_tag GLEW_GET_VAR(__GLEW_EXT_stencil_clear_tag) + +#endif /* GL_EXT_stencil_clear_tag */ + +/* ------------------------ GL_EXT_stencil_two_side ------------------------ */ + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 + +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 + +typedef void (GLAPIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); + +#define glActiveStencilFaceEXT GLEW_GET_FUN(__glewActiveStencilFaceEXT) + +#define GLEW_EXT_stencil_two_side GLEW_GET_VAR(__GLEW_EXT_stencil_two_side) + +#endif /* GL_EXT_stencil_two_side */ + +/* -------------------------- GL_EXT_stencil_wrap -------------------------- */ + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 + +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 + +#define GLEW_EXT_stencil_wrap GLEW_GET_VAR(__GLEW_EXT_stencil_wrap) + +#endif /* GL_EXT_stencil_wrap */ + +/* --------------------------- GL_EXT_subtexture --------------------------- */ + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 + +typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels); +typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); +typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); + +#define glTexSubImage1DEXT GLEW_GET_FUN(__glewTexSubImage1DEXT) +#define glTexSubImage2DEXT GLEW_GET_FUN(__glewTexSubImage2DEXT) +#define glTexSubImage3DEXT GLEW_GET_FUN(__glewTexSubImage3DEXT) + +#define GLEW_EXT_subtexture GLEW_GET_VAR(__GLEW_EXT_subtexture) + +#endif /* GL_EXT_subtexture */ + +/* ----------------------------- GL_EXT_texture ---------------------------- */ + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 + +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 + +#define GLEW_EXT_texture GLEW_GET_VAR(__GLEW_EXT_texture) + +#endif /* GL_EXT_texture */ + +/* ---------------------------- GL_EXT_texture3D --------------------------- */ + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 + +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 + +typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); + +#define glTexImage3DEXT GLEW_GET_FUN(__glewTexImage3DEXT) + +#define GLEW_EXT_texture3D GLEW_GET_VAR(__GLEW_EXT_texture3D) + +#endif /* GL_EXT_texture3D */ + +/* -------------------- GL_EXT_texture_compression_dxt1 -------------------- */ + +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 + +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 + +#define GLEW_EXT_texture_compression_dxt1 GLEW_GET_VAR(__GLEW_EXT_texture_compression_dxt1) + +#endif /* GL_EXT_texture_compression_dxt1 */ + +/* -------------------- GL_EXT_texture_compression_s3tc -------------------- */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 + +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 + +#define GLEW_EXT_texture_compression_s3tc GLEW_GET_VAR(__GLEW_EXT_texture_compression_s3tc) + +#endif /* GL_EXT_texture_compression_s3tc */ + +/* ------------------------ GL_EXT_texture_cube_map ------------------------ */ + +#ifndef GL_EXT_texture_cube_map +#define GL_EXT_texture_cube_map 1 + +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C + +#define GLEW_EXT_texture_cube_map GLEW_GET_VAR(__GLEW_EXT_texture_cube_map) + +#endif /* GL_EXT_texture_cube_map */ + +/* ----------------------- GL_EXT_texture_edge_clamp ----------------------- */ + +#ifndef GL_EXT_texture_edge_clamp +#define GL_EXT_texture_edge_clamp 1 + +#define GL_CLAMP_TO_EDGE_EXT 0x812F + +#define GLEW_EXT_texture_edge_clamp GLEW_GET_VAR(__GLEW_EXT_texture_edge_clamp) + +#endif /* GL_EXT_texture_edge_clamp */ + +/* --------------------------- GL_EXT_texture_env -------------------------- */ + +#ifndef GL_EXT_texture_env +#define GL_EXT_texture_env 1 + +#define GL_TEXTURE_ENV0_EXT 0 +#define GL_ENV_BLEND_EXT 0 +#define GL_TEXTURE_ENV_SHIFT_EXT 0 +#define GL_ENV_REPLACE_EXT 0 +#define GL_ENV_ADD_EXT 0 +#define GL_ENV_SUBTRACT_EXT 0 +#define GL_TEXTURE_ENV_MODE_ALPHA_EXT 0 +#define GL_ENV_REVERSE_SUBTRACT_EXT 0 +#define GL_ENV_REVERSE_BLEND_EXT 0 +#define GL_ENV_COPY_EXT 0 +#define GL_ENV_MODULATE_EXT 0 + +#define GLEW_EXT_texture_env GLEW_GET_VAR(__GLEW_EXT_texture_env) + +#endif /* GL_EXT_texture_env */ + +/* ------------------------- GL_EXT_texture_env_add ------------------------ */ + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 + +#define GLEW_EXT_texture_env_add GLEW_GET_VAR(__GLEW_EXT_texture_env_add) + +#endif /* GL_EXT_texture_env_add */ + +/* ----------------------- GL_EXT_texture_env_combine ---------------------- */ + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 + +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A + +#define GLEW_EXT_texture_env_combine GLEW_GET_VAR(__GLEW_EXT_texture_env_combine) + +#endif /* GL_EXT_texture_env_combine */ + +/* ------------------------ GL_EXT_texture_env_dot3 ------------------------ */ + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 + +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 + +#define GLEW_EXT_texture_env_dot3 GLEW_GET_VAR(__GLEW_EXT_texture_env_dot3) + +#endif /* GL_EXT_texture_env_dot3 */ + +/* ------------------- GL_EXT_texture_filter_anisotropic ------------------- */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 + +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF + +#define GLEW_EXT_texture_filter_anisotropic GLEW_GET_VAR(__GLEW_EXT_texture_filter_anisotropic) + +#endif /* GL_EXT_texture_filter_anisotropic */ + +/* ------------------------ GL_EXT_texture_lod_bias ------------------------ */ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 + +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 + +#define GLEW_EXT_texture_lod_bias GLEW_GET_VAR(__GLEW_EXT_texture_lod_bias) + +#endif /* GL_EXT_texture_lod_bias */ + +/* ---------------------- GL_EXT_texture_mirror_clamp ---------------------- */ + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 + +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 + +#define GLEW_EXT_texture_mirror_clamp GLEW_GET_VAR(__GLEW_EXT_texture_mirror_clamp) + +#endif /* GL_EXT_texture_mirror_clamp */ + +/* ------------------------- GL_EXT_texture_object ------------------------- */ + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 + +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A + +typedef GLboolean (GLAPIENTRY * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint* textures, GLboolean* residences); +typedef void (GLAPIENTRY * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (GLAPIENTRY * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint* textures); +typedef void (GLAPIENTRY * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint* textures); +typedef GLboolean (GLAPIENTRY * PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (GLAPIENTRY * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint* textures, const GLclampf* priorities); + +#define glAreTexturesResidentEXT GLEW_GET_FUN(__glewAreTexturesResidentEXT) +#define glBindTextureEXT GLEW_GET_FUN(__glewBindTextureEXT) +#define glDeleteTexturesEXT GLEW_GET_FUN(__glewDeleteTexturesEXT) +#define glGenTexturesEXT GLEW_GET_FUN(__glewGenTexturesEXT) +#define glIsTextureEXT GLEW_GET_FUN(__glewIsTextureEXT) +#define glPrioritizeTexturesEXT GLEW_GET_FUN(__glewPrioritizeTexturesEXT) + +#define GLEW_EXT_texture_object GLEW_GET_VAR(__GLEW_EXT_texture_object) + +#endif /* GL_EXT_texture_object */ + +/* --------------------- GL_EXT_texture_perturb_normal --------------------- */ + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 + +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF + +typedef void (GLAPIENTRY * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); + +#define glTextureNormalEXT GLEW_GET_FUN(__glewTextureNormalEXT) + +#define GLEW_EXT_texture_perturb_normal GLEW_GET_VAR(__GLEW_EXT_texture_perturb_normal) + +#endif /* GL_EXT_texture_perturb_normal */ + +/* ------------------------ GL_EXT_texture_rectangle ----------------------- */ + +#ifndef GL_EXT_texture_rectangle +#define GL_EXT_texture_rectangle 1 + +#define GL_TEXTURE_RECTANGLE_EXT 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8 + +#define GLEW_EXT_texture_rectangle GLEW_GET_VAR(__GLEW_EXT_texture_rectangle) + +#endif /* GL_EXT_texture_rectangle */ + +/* -------------------------- GL_EXT_texture_sRGB -------------------------- */ + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 + +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F + +#define GLEW_EXT_texture_sRGB GLEW_GET_VAR(__GLEW_EXT_texture_sRGB) + +#endif /* GL_EXT_texture_sRGB */ + +/* -------------------------- GL_EXT_vertex_array -------------------------- */ + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 + +#define GL_DOUBLE_EXT 0x140A +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 + +typedef void (GLAPIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (GLAPIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); +typedef void (GLAPIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (GLAPIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean* pointer); +typedef void (GLAPIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, void** params); +typedef void (GLAPIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer); +typedef void (GLAPIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer); +typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); +typedef void (GLAPIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); + +#define glArrayElementEXT GLEW_GET_FUN(__glewArrayElementEXT) +#define glColorPointerEXT GLEW_GET_FUN(__glewColorPointerEXT) +#define glDrawArraysEXT GLEW_GET_FUN(__glewDrawArraysEXT) +#define glEdgeFlagPointerEXT GLEW_GET_FUN(__glewEdgeFlagPointerEXT) +#define glGetPointervEXT GLEW_GET_FUN(__glewGetPointervEXT) +#define glIndexPointerEXT GLEW_GET_FUN(__glewIndexPointerEXT) +#define glNormalPointerEXT GLEW_GET_FUN(__glewNormalPointerEXT) +#define glTexCoordPointerEXT GLEW_GET_FUN(__glewTexCoordPointerEXT) +#define glVertexPointerEXT GLEW_GET_FUN(__glewVertexPointerEXT) + +#define GLEW_EXT_vertex_array GLEW_GET_VAR(__GLEW_EXT_vertex_array) + +#endif /* GL_EXT_vertex_array */ + +/* -------------------------- GL_EXT_vertex_shader ------------------------- */ + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 + +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED + +typedef void (GLAPIENTRY * PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef GLuint (GLAPIENTRY * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (GLAPIENTRY * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (GLAPIENTRY * PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLuint (GLAPIENTRY * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (GLAPIENTRY * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef void (GLAPIENTRY * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void (GLAPIENTRY * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (GLAPIENTRY * PFNGLGENSYMBOLSEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components); +typedef GLuint (GLAPIENTRY * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (GLAPIENTRY * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (GLAPIENTRY * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (GLAPIENTRY * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (GLAPIENTRY * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (GLAPIENTRY * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void (GLAPIENTRY * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void (GLAPIENTRY * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void (GLAPIENTRY * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid **data); +typedef void (GLAPIENTRY * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLboolean (GLAPIENTRY * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (GLAPIENTRY * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr); +typedef void (GLAPIENTRY * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr); +typedef void (GLAPIENTRY * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (GLAPIENTRY * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (GLAPIENTRY * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (GLAPIENTRY * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (GLAPIENTRY * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, GLvoid *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTBVEXTPROC) (GLuint id, GLbyte *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTDVEXTPROC) (GLuint id, GLdouble *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTFVEXTPROC) (GLuint id, GLfloat *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTIVEXTPROC) (GLuint id, GLint *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTSVEXTPROC) (GLuint id, GLshort *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTUBVEXTPROC) (GLuint id, GLubyte *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTUIVEXTPROC) (GLuint id, GLuint *addr); +typedef void (GLAPIENTRY * PFNGLVARIANTUSVEXTPROC) (GLuint id, GLushort *addr); +typedef void (GLAPIENTRY * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); + +#define glBeginVertexShaderEXT GLEW_GET_FUN(__glewBeginVertexShaderEXT) +#define glBindLightParameterEXT GLEW_GET_FUN(__glewBindLightParameterEXT) +#define glBindMaterialParameterEXT GLEW_GET_FUN(__glewBindMaterialParameterEXT) +#define glBindParameterEXT GLEW_GET_FUN(__glewBindParameterEXT) +#define glBindTexGenParameterEXT GLEW_GET_FUN(__glewBindTexGenParameterEXT) +#define glBindTextureUnitParameterEXT GLEW_GET_FUN(__glewBindTextureUnitParameterEXT) +#define glBindVertexShaderEXT GLEW_GET_FUN(__glewBindVertexShaderEXT) +#define glDeleteVertexShaderEXT GLEW_GET_FUN(__glewDeleteVertexShaderEXT) +#define glDisableVariantClientStateEXT GLEW_GET_FUN(__glewDisableVariantClientStateEXT) +#define glEnableVariantClientStateEXT GLEW_GET_FUN(__glewEnableVariantClientStateEXT) +#define glEndVertexShaderEXT GLEW_GET_FUN(__glewEndVertexShaderEXT) +#define glExtractComponentEXT GLEW_GET_FUN(__glewExtractComponentEXT) +#define glGenSymbolsEXT GLEW_GET_FUN(__glewGenSymbolsEXT) +#define glGenVertexShadersEXT GLEW_GET_FUN(__glewGenVertexShadersEXT) +#define glGetInvariantBooleanvEXT GLEW_GET_FUN(__glewGetInvariantBooleanvEXT) +#define glGetInvariantFloatvEXT GLEW_GET_FUN(__glewGetInvariantFloatvEXT) +#define glGetInvariantIntegervEXT GLEW_GET_FUN(__glewGetInvariantIntegervEXT) +#define glGetLocalConstantBooleanvEXT GLEW_GET_FUN(__glewGetLocalConstantBooleanvEXT) +#define glGetLocalConstantFloatvEXT GLEW_GET_FUN(__glewGetLocalConstantFloatvEXT) +#define glGetLocalConstantIntegervEXT GLEW_GET_FUN(__glewGetLocalConstantIntegervEXT) +#define glGetVariantBooleanvEXT GLEW_GET_FUN(__glewGetVariantBooleanvEXT) +#define glGetVariantFloatvEXT GLEW_GET_FUN(__glewGetVariantFloatvEXT) +#define glGetVariantIntegervEXT GLEW_GET_FUN(__glewGetVariantIntegervEXT) +#define glGetVariantPointervEXT GLEW_GET_FUN(__glewGetVariantPointervEXT) +#define glInsertComponentEXT GLEW_GET_FUN(__glewInsertComponentEXT) +#define glIsVariantEnabledEXT GLEW_GET_FUN(__glewIsVariantEnabledEXT) +#define glSetInvariantEXT GLEW_GET_FUN(__glewSetInvariantEXT) +#define glSetLocalConstantEXT GLEW_GET_FUN(__glewSetLocalConstantEXT) +#define glShaderOp1EXT GLEW_GET_FUN(__glewShaderOp1EXT) +#define glShaderOp2EXT GLEW_GET_FUN(__glewShaderOp2EXT) +#define glShaderOp3EXT GLEW_GET_FUN(__glewShaderOp3EXT) +#define glSwizzleEXT GLEW_GET_FUN(__glewSwizzleEXT) +#define glVariantPointerEXT GLEW_GET_FUN(__glewVariantPointerEXT) +#define glVariantbvEXT GLEW_GET_FUN(__glewVariantbvEXT) +#define glVariantdvEXT GLEW_GET_FUN(__glewVariantdvEXT) +#define glVariantfvEXT GLEW_GET_FUN(__glewVariantfvEXT) +#define glVariantivEXT GLEW_GET_FUN(__glewVariantivEXT) +#define glVariantsvEXT GLEW_GET_FUN(__glewVariantsvEXT) +#define glVariantubvEXT GLEW_GET_FUN(__glewVariantubvEXT) +#define glVariantuivEXT GLEW_GET_FUN(__glewVariantuivEXT) +#define glVariantusvEXT GLEW_GET_FUN(__glewVariantusvEXT) +#define glWriteMaskEXT GLEW_GET_FUN(__glewWriteMaskEXT) + +#define GLEW_EXT_vertex_shader GLEW_GET_VAR(__GLEW_EXT_vertex_shader) + +#endif /* GL_EXT_vertex_shader */ + +/* ------------------------ GL_EXT_vertex_weighting ------------------------ */ + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 + +#define GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3 +#define GL_MODELVIEW0_MATRIX_EXT 0x0BA6 +#define GL_MODELVIEW0_EXT 0x1700 +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 + +typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, void* pointer); +typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTFVEXTPROC) (GLfloat* weight); + +#define glVertexWeightPointerEXT GLEW_GET_FUN(__glewVertexWeightPointerEXT) +#define glVertexWeightfEXT GLEW_GET_FUN(__glewVertexWeightfEXT) +#define glVertexWeightfvEXT GLEW_GET_FUN(__glewVertexWeightfvEXT) + +#define GLEW_EXT_vertex_weighting GLEW_GET_VAR(__GLEW_EXT_vertex_weighting) + +#endif /* GL_EXT_vertex_weighting */ + +/* ------------------------ GL_GREMEDY_string_marker ----------------------- */ + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 + +typedef void (GLAPIENTRY * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void* string); + +#define glStringMarkerGREMEDY GLEW_GET_FUN(__glewStringMarkerGREMEDY) + +#define GLEW_GREMEDY_string_marker GLEW_GET_VAR(__GLEW_GREMEDY_string_marker) + +#endif /* GL_GREMEDY_string_marker */ + +/* --------------------- GL_HP_convolution_border_modes -------------------- */ + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 + +#define GLEW_HP_convolution_border_modes GLEW_GET_VAR(__GLEW_HP_convolution_border_modes) + +#endif /* GL_HP_convolution_border_modes */ + +/* ------------------------- GL_HP_image_transform ------------------------- */ + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 + +typedef void (GLAPIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, const GLfloat param); +typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, const GLint param); +typedef void (GLAPIENTRY * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params); + +#define glGetImageTransformParameterfvHP GLEW_GET_FUN(__glewGetImageTransformParameterfvHP) +#define glGetImageTransformParameterivHP GLEW_GET_FUN(__glewGetImageTransformParameterivHP) +#define glImageTransformParameterfHP GLEW_GET_FUN(__glewImageTransformParameterfHP) +#define glImageTransformParameterfvHP GLEW_GET_FUN(__glewImageTransformParameterfvHP) +#define glImageTransformParameteriHP GLEW_GET_FUN(__glewImageTransformParameteriHP) +#define glImageTransformParameterivHP GLEW_GET_FUN(__glewImageTransformParameterivHP) + +#define GLEW_HP_image_transform GLEW_GET_VAR(__GLEW_HP_image_transform) + +#endif /* GL_HP_image_transform */ + +/* -------------------------- GL_HP_occlusion_test ------------------------- */ + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 + +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 + +#define GLEW_HP_occlusion_test GLEW_GET_VAR(__GLEW_HP_occlusion_test) + +#endif /* GL_HP_occlusion_test */ + +/* ------------------------- GL_HP_texture_lighting ------------------------ */ + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 + +#define GLEW_HP_texture_lighting GLEW_GET_VAR(__GLEW_HP_texture_lighting) + +#endif /* GL_HP_texture_lighting */ + +/* --------------------------- GL_IBM_cull_vertex -------------------------- */ + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 + +#define GL_CULL_VERTEX_IBM 103050 + +#define GLEW_IBM_cull_vertex GLEW_GET_VAR(__GLEW_IBM_cull_vertex) + +#endif /* GL_IBM_cull_vertex */ + +/* ---------------------- GL_IBM_multimode_draw_arrays --------------------- */ + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 + +typedef void (GLAPIENTRY * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum* mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void (GLAPIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum* mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride); + +#define glMultiModeDrawArraysIBM GLEW_GET_FUN(__glewMultiModeDrawArraysIBM) +#define glMultiModeDrawElementsIBM GLEW_GET_FUN(__glewMultiModeDrawElementsIBM) + +#define GLEW_IBM_multimode_draw_arrays GLEW_GET_VAR(__GLEW_IBM_multimode_draw_arrays) + +#endif /* GL_IBM_multimode_draw_arrays */ + +/* ------------------------- GL_IBM_rasterpos_clip ------------------------- */ + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 + +#define GL_RASTER_POSITION_UNCLIPPED_IBM 103010 + +#define GLEW_IBM_rasterpos_clip GLEW_GET_VAR(__GLEW_IBM_rasterpos_clip) + +#endif /* GL_IBM_rasterpos_clip */ + +/* --------------------------- GL_IBM_static_data -------------------------- */ + +#ifndef GL_IBM_static_data +#define GL_IBM_static_data 1 + +#define GL_ALL_STATIC_DATA_IBM 103060 +#define GL_STATIC_VERTEX_ARRAY_IBM 103061 + +#define GLEW_IBM_static_data GLEW_GET_VAR(__GLEW_IBM_static_data) + +#endif /* GL_IBM_static_data */ + +/* --------------------- GL_IBM_texture_mirrored_repeat -------------------- */ + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_IBM_texture_mirrored_repeat 1 + +#define GL_MIRRORED_REPEAT_IBM 0x8370 + +#define GLEW_IBM_texture_mirrored_repeat GLEW_GET_VAR(__GLEW_IBM_texture_mirrored_repeat) + +#endif /* GL_IBM_texture_mirrored_repeat */ + +/* ----------------------- GL_IBM_vertex_array_lists ----------------------- */ + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 + +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 + +typedef void (GLAPIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); +typedef void (GLAPIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); + +#define glColorPointerListIBM GLEW_GET_FUN(__glewColorPointerListIBM) +#define glEdgeFlagPointerListIBM GLEW_GET_FUN(__glewEdgeFlagPointerListIBM) +#define glFogCoordPointerListIBM GLEW_GET_FUN(__glewFogCoordPointerListIBM) +#define glIndexPointerListIBM GLEW_GET_FUN(__glewIndexPointerListIBM) +#define glNormalPointerListIBM GLEW_GET_FUN(__glewNormalPointerListIBM) +#define glSecondaryColorPointerListIBM GLEW_GET_FUN(__glewSecondaryColorPointerListIBM) +#define glTexCoordPointerListIBM GLEW_GET_FUN(__glewTexCoordPointerListIBM) +#define glVertexPointerListIBM GLEW_GET_FUN(__glewVertexPointerListIBM) + +#define GLEW_IBM_vertex_array_lists GLEW_GET_VAR(__GLEW_IBM_vertex_array_lists) + +#endif /* GL_IBM_vertex_array_lists */ + +/* -------------------------- GL_INGR_color_clamp -------------------------- */ + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 + +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 + +#define GLEW_INGR_color_clamp GLEW_GET_VAR(__GLEW_INGR_color_clamp) + +#endif /* GL_INGR_color_clamp */ + +/* ------------------------- GL_INGR_interlace_read ------------------------ */ + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 + +#define GL_INTERLACE_READ_INGR 0x8568 + +#define GLEW_INGR_interlace_read GLEW_GET_VAR(__GLEW_INGR_interlace_read) + +#endif /* GL_INGR_interlace_read */ + +/* ------------------------ GL_INTEL_parallel_arrays ----------------------- */ + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 + +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 + +typedef void (GLAPIENTRY * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); +typedef void (GLAPIENTRY * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void** pointer); +typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); +typedef void (GLAPIENTRY * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); + +#define glColorPointervINTEL GLEW_GET_FUN(__glewColorPointervINTEL) +#define glNormalPointervINTEL GLEW_GET_FUN(__glewNormalPointervINTEL) +#define glTexCoordPointervINTEL GLEW_GET_FUN(__glewTexCoordPointervINTEL) +#define glVertexPointervINTEL GLEW_GET_FUN(__glewVertexPointervINTEL) + +#define GLEW_INTEL_parallel_arrays GLEW_GET_VAR(__GLEW_INTEL_parallel_arrays) + +#endif /* GL_INTEL_parallel_arrays */ + +/* ------------------------ GL_INTEL_texture_scissor ----------------------- */ + +#ifndef GL_INTEL_texture_scissor +#define GL_INTEL_texture_scissor 1 + +typedef void (GLAPIENTRY * PFNGLTEXSCISSORFUNCINTELPROC) (GLenum target, GLenum lfunc, GLenum hfunc); +typedef void (GLAPIENTRY * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tlow, GLclampf thigh); + +#define glTexScissorFuncINTEL GLEW_GET_FUN(__glewTexScissorFuncINTEL) +#define glTexScissorINTEL GLEW_GET_FUN(__glewTexScissorINTEL) + +#define GLEW_INTEL_texture_scissor GLEW_GET_VAR(__GLEW_INTEL_texture_scissor) + +#endif /* GL_INTEL_texture_scissor */ + +/* -------------------------- GL_KTX_buffer_region ------------------------- */ + +#ifndef GL_KTX_buffer_region +#define GL_KTX_buffer_region 1 + +#define GL_KTX_FRONT_REGION 0x0 +#define GL_KTX_BACK_REGION 0x1 +#define GL_KTX_Z_REGION 0x2 +#define GL_KTX_STENCIL_REGION 0x3 + +typedef GLuint (GLAPIENTRY * PFNGLBUFFERREGIONENABLEDEXTPROC) (void); +typedef void (GLAPIENTRY * PFNGLDELETEBUFFERREGIONEXTPROC) (GLenum region); +typedef void (GLAPIENTRY * PFNGLDRAWBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest); +typedef GLuint (GLAPIENTRY * PFNGLNEWBUFFERREGIONEXTPROC) (GLenum region); +typedef void (GLAPIENTRY * PFNGLREADBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height); + +#define glBufferRegionEnabledEXT GLEW_GET_FUN(__glewBufferRegionEnabledEXT) +#define glDeleteBufferRegionEXT GLEW_GET_FUN(__glewDeleteBufferRegionEXT) +#define glDrawBufferRegionEXT GLEW_GET_FUN(__glewDrawBufferRegionEXT) +#define glNewBufferRegionEXT GLEW_GET_FUN(__glewNewBufferRegionEXT) +#define glReadBufferRegionEXT GLEW_GET_FUN(__glewReadBufferRegionEXT) + +#define GLEW_KTX_buffer_region GLEW_GET_VAR(__GLEW_KTX_buffer_region) + +#endif /* GL_KTX_buffer_region */ + +/* ------------------------- GL_MESAX_texture_stack ------------------------ */ + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 + +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E + +#define GLEW_MESAX_texture_stack GLEW_GET_VAR(__GLEW_MESAX_texture_stack) + +#endif /* GL_MESAX_texture_stack */ + +/* -------------------------- GL_MESA_pack_invert -------------------------- */ + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 + +#define GL_PACK_INVERT_MESA 0x8758 + +#define GLEW_MESA_pack_invert GLEW_GET_VAR(__GLEW_MESA_pack_invert) + +#endif /* GL_MESA_pack_invert */ + +/* ------------------------- GL_MESA_resize_buffers ------------------------ */ + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 + +typedef void (GLAPIENTRY * PFNGLRESIZEBUFFERSMESAPROC) (void); + +#define glResizeBuffersMESA GLEW_GET_FUN(__glewResizeBuffersMESA) + +#define GLEW_MESA_resize_buffers GLEW_GET_VAR(__GLEW_MESA_resize_buffers) + +#endif /* GL_MESA_resize_buffers */ + +/* --------------------------- GL_MESA_window_pos -------------------------- */ + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 + +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2IVMESAPROC) (const GLint* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3IVMESAPROC) (const GLint* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4IVMESAPROC) (const GLint* p); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAPIENTRY * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort* p); + +#define glWindowPos2dMESA GLEW_GET_FUN(__glewWindowPos2dMESA) +#define glWindowPos2dvMESA GLEW_GET_FUN(__glewWindowPos2dvMESA) +#define glWindowPos2fMESA GLEW_GET_FUN(__glewWindowPos2fMESA) +#define glWindowPos2fvMESA GLEW_GET_FUN(__glewWindowPos2fvMESA) +#define glWindowPos2iMESA GLEW_GET_FUN(__glewWindowPos2iMESA) +#define glWindowPos2ivMESA GLEW_GET_FUN(__glewWindowPos2ivMESA) +#define glWindowPos2sMESA GLEW_GET_FUN(__glewWindowPos2sMESA) +#define glWindowPos2svMESA GLEW_GET_FUN(__glewWindowPos2svMESA) +#define glWindowPos3dMESA GLEW_GET_FUN(__glewWindowPos3dMESA) +#define glWindowPos3dvMESA GLEW_GET_FUN(__glewWindowPos3dvMESA) +#define glWindowPos3fMESA GLEW_GET_FUN(__glewWindowPos3fMESA) +#define glWindowPos3fvMESA GLEW_GET_FUN(__glewWindowPos3fvMESA) +#define glWindowPos3iMESA GLEW_GET_FUN(__glewWindowPos3iMESA) +#define glWindowPos3ivMESA GLEW_GET_FUN(__glewWindowPos3ivMESA) +#define glWindowPos3sMESA GLEW_GET_FUN(__glewWindowPos3sMESA) +#define glWindowPos3svMESA GLEW_GET_FUN(__glewWindowPos3svMESA) +#define glWindowPos4dMESA GLEW_GET_FUN(__glewWindowPos4dMESA) +#define glWindowPos4dvMESA GLEW_GET_FUN(__glewWindowPos4dvMESA) +#define glWindowPos4fMESA GLEW_GET_FUN(__glewWindowPos4fMESA) +#define glWindowPos4fvMESA GLEW_GET_FUN(__glewWindowPos4fvMESA) +#define glWindowPos4iMESA GLEW_GET_FUN(__glewWindowPos4iMESA) +#define glWindowPos4ivMESA GLEW_GET_FUN(__glewWindowPos4ivMESA) +#define glWindowPos4sMESA GLEW_GET_FUN(__glewWindowPos4sMESA) +#define glWindowPos4svMESA GLEW_GET_FUN(__glewWindowPos4svMESA) + +#define GLEW_MESA_window_pos GLEW_GET_VAR(__GLEW_MESA_window_pos) + +#endif /* GL_MESA_window_pos */ + +/* ------------------------- GL_MESA_ycbcr_texture ------------------------- */ + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 + +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 + +#define GLEW_MESA_ycbcr_texture GLEW_GET_VAR(__GLEW_MESA_ycbcr_texture) + +#endif /* GL_MESA_ycbcr_texture */ + +/* --------------------------- GL_NV_blend_square -------------------------- */ + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 + +#define GLEW_NV_blend_square GLEW_GET_VAR(__GLEW_NV_blend_square) + +#endif /* GL_NV_blend_square */ + +/* ----------------------- GL_NV_copy_depth_to_color ----------------------- */ + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 + +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F + +#define GLEW_NV_copy_depth_to_color GLEW_GET_VAR(__GLEW_NV_copy_depth_to_color) + +#endif /* GL_NV_copy_depth_to_color */ + +/* --------------------------- GL_NV_depth_clamp --------------------------- */ + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 + +#define GL_DEPTH_CLAMP_NV 0x864F + +#define GLEW_NV_depth_clamp GLEW_GET_VAR(__GLEW_NV_depth_clamp) + +#endif /* GL_NV_depth_clamp */ + +/* ---------------------------- GL_NV_evaluators --------------------------- */ + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 + +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 + +typedef void (GLAPIENTRY * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +typedef void (GLAPIENTRY * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void* points); +typedef void (GLAPIENTRY * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void* points); +typedef void (GLAPIENTRY * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint* params); + +#define glEvalMapsNV GLEW_GET_FUN(__glewEvalMapsNV) +#define glGetMapAttribParameterfvNV GLEW_GET_FUN(__glewGetMapAttribParameterfvNV) +#define glGetMapAttribParameterivNV GLEW_GET_FUN(__glewGetMapAttribParameterivNV) +#define glGetMapControlPointsNV GLEW_GET_FUN(__glewGetMapControlPointsNV) +#define glGetMapParameterfvNV GLEW_GET_FUN(__glewGetMapParameterfvNV) +#define glGetMapParameterivNV GLEW_GET_FUN(__glewGetMapParameterivNV) +#define glMapControlPointsNV GLEW_GET_FUN(__glewMapControlPointsNV) +#define glMapParameterfvNV GLEW_GET_FUN(__glewMapParameterfvNV) +#define glMapParameterivNV GLEW_GET_FUN(__glewMapParameterivNV) + +#define GLEW_NV_evaluators GLEW_GET_VAR(__GLEW_NV_evaluators) + +#endif /* GL_NV_evaluators */ + +/* ------------------------------ GL_NV_fence ------------------------------ */ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 + +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 + +typedef void (GLAPIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint* fences); +typedef void (GLAPIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GLAPIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint* fences); +typedef void (GLAPIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISFENCENVPROC) (GLuint fence); +typedef void (GLAPIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +typedef GLboolean (GLAPIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence); + +#define glDeleteFencesNV GLEW_GET_FUN(__glewDeleteFencesNV) +#define glFinishFenceNV GLEW_GET_FUN(__glewFinishFenceNV) +#define glGenFencesNV GLEW_GET_FUN(__glewGenFencesNV) +#define glGetFenceivNV GLEW_GET_FUN(__glewGetFenceivNV) +#define glIsFenceNV GLEW_GET_FUN(__glewIsFenceNV) +#define glSetFenceNV GLEW_GET_FUN(__glewSetFenceNV) +#define glTestFenceNV GLEW_GET_FUN(__glewTestFenceNV) + +#define GLEW_NV_fence GLEW_GET_VAR(__GLEW_NV_fence) + +#endif /* GL_NV_fence */ + +/* --------------------------- GL_NV_float_buffer -------------------------- */ + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 + +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E + +#define GLEW_NV_float_buffer GLEW_GET_VAR(__GLEW_NV_float_buffer) + +#endif /* GL_NV_float_buffer */ + +/* --------------------------- GL_NV_fog_distance -------------------------- */ + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 + +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C + +#define GLEW_NV_fog_distance GLEW_GET_VAR(__GLEW_NV_fog_distance) + +#endif /* GL_NV_fog_distance */ + +/* ------------------------- GL_NV_fragment_program ------------------------ */ + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 + +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 + +typedef void (GLAPIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble *params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat *params); +typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLdouble v[]); +typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLfloat v[]); + +#define glGetProgramNamedParameterdvNV GLEW_GET_FUN(__glewGetProgramNamedParameterdvNV) +#define glGetProgramNamedParameterfvNV GLEW_GET_FUN(__glewGetProgramNamedParameterfvNV) +#define glProgramNamedParameter4dNV GLEW_GET_FUN(__glewProgramNamedParameter4dNV) +#define glProgramNamedParameter4dvNV GLEW_GET_FUN(__glewProgramNamedParameter4dvNV) +#define glProgramNamedParameter4fNV GLEW_GET_FUN(__glewProgramNamedParameter4fNV) +#define glProgramNamedParameter4fvNV GLEW_GET_FUN(__glewProgramNamedParameter4fvNV) + +#define GLEW_NV_fragment_program GLEW_GET_VAR(__GLEW_NV_fragment_program) + +#endif /* GL_NV_fragment_program */ + +/* ------------------------ GL_NV_fragment_program2 ------------------------ */ + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 + +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 + +#define GLEW_NV_fragment_program2 GLEW_GET_VAR(__GLEW_NV_fragment_program2) + +#endif /* GL_NV_fragment_program2 */ + +/* --------------------- GL_NV_fragment_program_option --------------------- */ + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 + +#define GLEW_NV_fragment_program_option GLEW_GET_VAR(__GLEW_NV_fragment_program_option) + +#endif /* GL_NV_fragment_program_option */ + +/* ---------------------------- GL_NV_half_float --------------------------- */ + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 + +#define GL_HALF_FLOAT_NV 0x140B + +typedef unsigned short GLhalf; + +typedef void (GLAPIENTRY * PFNGLCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); +typedef void (GLAPIENTRY * PFNGLCOLOR3HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLCOLOR4HNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha); +typedef void (GLAPIENTRY * PFNGLCOLOR4HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLFOGCOORDHNVPROC) (GLhalf fog); +typedef void (GLAPIENTRY * PFNGLFOGCOORDHVNVPROC) (const GLhalf* fog); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalf s); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalf s, GLhalf t); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q); +typedef void (GLAPIENTRY * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLNORMAL3HNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz); +typedef void (GLAPIENTRY * PFNGLNORMAL3HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); +typedef void (GLAPIENTRY * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD1HNVPROC) (GLhalf s); +typedef void (GLAPIENTRY * PFNGLTEXCOORD1HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2HNVPROC) (GLhalf s, GLhalf t); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD3HNVPROC) (GLhalf s, GLhalf t, GLhalf r); +typedef void (GLAPIENTRY * PFNGLTEXCOORD3HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4HNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEX2HNVPROC) (GLhalf x, GLhalf y); +typedef void (GLAPIENTRY * PFNGLVERTEX2HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEX3HNVPROC) (GLhalf x, GLhalf y, GLhalf z); +typedef void (GLAPIENTRY * PFNGLVERTEX3HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEX4HNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w); +typedef void (GLAPIENTRY * PFNGLVERTEX4HVNVPROC) (const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalf x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalf x, GLhalf y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); +typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTHNVPROC) (GLhalf weight); +typedef void (GLAPIENTRY * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalf* weight); + +#define glColor3hNV GLEW_GET_FUN(__glewColor3hNV) +#define glColor3hvNV GLEW_GET_FUN(__glewColor3hvNV) +#define glColor4hNV GLEW_GET_FUN(__glewColor4hNV) +#define glColor4hvNV GLEW_GET_FUN(__glewColor4hvNV) +#define glFogCoordhNV GLEW_GET_FUN(__glewFogCoordhNV) +#define glFogCoordhvNV GLEW_GET_FUN(__glewFogCoordhvNV) +#define glMultiTexCoord1hNV GLEW_GET_FUN(__glewMultiTexCoord1hNV) +#define glMultiTexCoord1hvNV GLEW_GET_FUN(__glewMultiTexCoord1hvNV) +#define glMultiTexCoord2hNV GLEW_GET_FUN(__glewMultiTexCoord2hNV) +#define glMultiTexCoord2hvNV GLEW_GET_FUN(__glewMultiTexCoord2hvNV) +#define glMultiTexCoord3hNV GLEW_GET_FUN(__glewMultiTexCoord3hNV) +#define glMultiTexCoord3hvNV GLEW_GET_FUN(__glewMultiTexCoord3hvNV) +#define glMultiTexCoord4hNV GLEW_GET_FUN(__glewMultiTexCoord4hNV) +#define glMultiTexCoord4hvNV GLEW_GET_FUN(__glewMultiTexCoord4hvNV) +#define glNormal3hNV GLEW_GET_FUN(__glewNormal3hNV) +#define glNormal3hvNV GLEW_GET_FUN(__glewNormal3hvNV) +#define glSecondaryColor3hNV GLEW_GET_FUN(__glewSecondaryColor3hNV) +#define glSecondaryColor3hvNV GLEW_GET_FUN(__glewSecondaryColor3hvNV) +#define glTexCoord1hNV GLEW_GET_FUN(__glewTexCoord1hNV) +#define glTexCoord1hvNV GLEW_GET_FUN(__glewTexCoord1hvNV) +#define glTexCoord2hNV GLEW_GET_FUN(__glewTexCoord2hNV) +#define glTexCoord2hvNV GLEW_GET_FUN(__glewTexCoord2hvNV) +#define glTexCoord3hNV GLEW_GET_FUN(__glewTexCoord3hNV) +#define glTexCoord3hvNV GLEW_GET_FUN(__glewTexCoord3hvNV) +#define glTexCoord4hNV GLEW_GET_FUN(__glewTexCoord4hNV) +#define glTexCoord4hvNV GLEW_GET_FUN(__glewTexCoord4hvNV) +#define glVertex2hNV GLEW_GET_FUN(__glewVertex2hNV) +#define glVertex2hvNV GLEW_GET_FUN(__glewVertex2hvNV) +#define glVertex3hNV GLEW_GET_FUN(__glewVertex3hNV) +#define glVertex3hvNV GLEW_GET_FUN(__glewVertex3hvNV) +#define glVertex4hNV GLEW_GET_FUN(__glewVertex4hNV) +#define glVertex4hvNV GLEW_GET_FUN(__glewVertex4hvNV) +#define glVertexAttrib1hNV GLEW_GET_FUN(__glewVertexAttrib1hNV) +#define glVertexAttrib1hvNV GLEW_GET_FUN(__glewVertexAttrib1hvNV) +#define glVertexAttrib2hNV GLEW_GET_FUN(__glewVertexAttrib2hNV) +#define glVertexAttrib2hvNV GLEW_GET_FUN(__glewVertexAttrib2hvNV) +#define glVertexAttrib3hNV GLEW_GET_FUN(__glewVertexAttrib3hNV) +#define glVertexAttrib3hvNV GLEW_GET_FUN(__glewVertexAttrib3hvNV) +#define glVertexAttrib4hNV GLEW_GET_FUN(__glewVertexAttrib4hNV) +#define glVertexAttrib4hvNV GLEW_GET_FUN(__glewVertexAttrib4hvNV) +#define glVertexAttribs1hvNV GLEW_GET_FUN(__glewVertexAttribs1hvNV) +#define glVertexAttribs2hvNV GLEW_GET_FUN(__glewVertexAttribs2hvNV) +#define glVertexAttribs3hvNV GLEW_GET_FUN(__glewVertexAttribs3hvNV) +#define glVertexAttribs4hvNV GLEW_GET_FUN(__glewVertexAttribs4hvNV) +#define glVertexWeighthNV GLEW_GET_FUN(__glewVertexWeighthNV) +#define glVertexWeighthvNV GLEW_GET_FUN(__glewVertexWeighthvNV) + +#define GLEW_NV_half_float GLEW_GET_VAR(__GLEW_NV_half_float) + +#endif /* GL_NV_half_float */ + +/* ------------------------ GL_NV_light_max_exponent ----------------------- */ + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 + +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 + +#define GLEW_NV_light_max_exponent GLEW_GET_VAR(__GLEW_NV_light_max_exponent) + +#endif /* GL_NV_light_max_exponent */ + +/* --------------------- GL_NV_multisample_filter_hint --------------------- */ + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 + +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 + +#define GLEW_NV_multisample_filter_hint GLEW_GET_VAR(__GLEW_NV_multisample_filter_hint) + +#endif /* GL_NV_multisample_filter_hint */ + +/* ------------------------- GL_NV_occlusion_query ------------------------- */ + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 + +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 + +typedef void (GLAPIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint* ids); +typedef void (GLAPIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void (GLAPIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint* ids); +typedef void (GLAPIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); + +#define glBeginOcclusionQueryNV GLEW_GET_FUN(__glewBeginOcclusionQueryNV) +#define glDeleteOcclusionQueriesNV GLEW_GET_FUN(__glewDeleteOcclusionQueriesNV) +#define glEndOcclusionQueryNV GLEW_GET_FUN(__glewEndOcclusionQueryNV) +#define glGenOcclusionQueriesNV GLEW_GET_FUN(__glewGenOcclusionQueriesNV) +#define glGetOcclusionQueryivNV GLEW_GET_FUN(__glewGetOcclusionQueryivNV) +#define glGetOcclusionQueryuivNV GLEW_GET_FUN(__glewGetOcclusionQueryuivNV) +#define glIsOcclusionQueryNV GLEW_GET_FUN(__glewIsOcclusionQueryNV) + +#define GLEW_NV_occlusion_query GLEW_GET_VAR(__GLEW_NV_occlusion_query) + +#endif /* GL_NV_occlusion_query */ + +/* ----------------------- GL_NV_packed_depth_stencil ---------------------- */ + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 + +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA + +#define GLEW_NV_packed_depth_stencil GLEW_GET_VAR(__GLEW_NV_packed_depth_stencil) + +#endif /* GL_NV_packed_depth_stencil */ + +/* ------------------------- GL_NV_pixel_data_range ------------------------ */ + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 + +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D + +typedef void (GLAPIENTRY * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +typedef void (GLAPIENTRY * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, void* pointer); + +#define glFlushPixelDataRangeNV GLEW_GET_FUN(__glewFlushPixelDataRangeNV) +#define glPixelDataRangeNV GLEW_GET_FUN(__glewPixelDataRangeNV) + +#define GLEW_NV_pixel_data_range GLEW_GET_VAR(__GLEW_NV_pixel_data_range) + +#endif /* GL_NV_pixel_data_range */ + +/* --------------------------- GL_NV_point_sprite -------------------------- */ + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 + +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 + +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint* params); + +#define glPointParameteriNV GLEW_GET_FUN(__glewPointParameteriNV) +#define glPointParameterivNV GLEW_GET_FUN(__glewPointParameterivNV) + +#define GLEW_NV_point_sprite GLEW_GET_VAR(__GLEW_NV_point_sprite) + +#endif /* GL_NV_point_sprite */ + +/* ------------------------ GL_NV_primitive_restart ------------------------ */ + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 + +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 + +typedef void (GLAPIENTRY * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +typedef void (GLAPIENTRY * PFNGLPRIMITIVERESTARTNVPROC) (void); + +#define glPrimitiveRestartIndexNV GLEW_GET_FUN(__glewPrimitiveRestartIndexNV) +#define glPrimitiveRestartNV GLEW_GET_FUN(__glewPrimitiveRestartNV) + +#define GLEW_NV_primitive_restart GLEW_GET_VAR(__GLEW_NV_primitive_restart) + +#endif /* GL_NV_primitive_restart */ + +/* ------------------------ GL_NV_register_combiners ----------------------- */ + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 + +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 + +typedef void (GLAPIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (GLAPIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (GLAPIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint* params); + +#define glCombinerInputNV GLEW_GET_FUN(__glewCombinerInputNV) +#define glCombinerOutputNV GLEW_GET_FUN(__glewCombinerOutputNV) +#define glCombinerParameterfNV GLEW_GET_FUN(__glewCombinerParameterfNV) +#define glCombinerParameterfvNV GLEW_GET_FUN(__glewCombinerParameterfvNV) +#define glCombinerParameteriNV GLEW_GET_FUN(__glewCombinerParameteriNV) +#define glCombinerParameterivNV GLEW_GET_FUN(__glewCombinerParameterivNV) +#define glFinalCombinerInputNV GLEW_GET_FUN(__glewFinalCombinerInputNV) +#define glGetCombinerInputParameterfvNV GLEW_GET_FUN(__glewGetCombinerInputParameterfvNV) +#define glGetCombinerInputParameterivNV GLEW_GET_FUN(__glewGetCombinerInputParameterivNV) +#define glGetCombinerOutputParameterfvNV GLEW_GET_FUN(__glewGetCombinerOutputParameterfvNV) +#define glGetCombinerOutputParameterivNV GLEW_GET_FUN(__glewGetCombinerOutputParameterivNV) +#define glGetFinalCombinerInputParameterfvNV GLEW_GET_FUN(__glewGetFinalCombinerInputParameterfvNV) +#define glGetFinalCombinerInputParameterivNV GLEW_GET_FUN(__glewGetFinalCombinerInputParameterivNV) + +#define GLEW_NV_register_combiners GLEW_GET_VAR(__GLEW_NV_register_combiners) + +#endif /* GL_NV_register_combiners */ + +/* ----------------------- GL_NV_register_combiners2 ----------------------- */ + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 + +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 + +typedef void (GLAPIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat* params); + +#define glCombinerStageParameterfvNV GLEW_GET_FUN(__glewCombinerStageParameterfvNV) +#define glGetCombinerStageParameterfvNV GLEW_GET_FUN(__glewGetCombinerStageParameterfvNV) + +#define GLEW_NV_register_combiners2 GLEW_GET_VAR(__GLEW_NV_register_combiners2) + +#endif /* GL_NV_register_combiners2 */ + +/* -------------------------- GL_NV_texgen_emboss -------------------------- */ + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 + +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F + +#define GLEW_NV_texgen_emboss GLEW_GET_VAR(__GLEW_NV_texgen_emboss) + +#endif /* GL_NV_texgen_emboss */ + +/* ------------------------ GL_NV_texgen_reflection ------------------------ */ + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 + +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 + +#define GLEW_NV_texgen_reflection GLEW_GET_VAR(__GLEW_NV_texgen_reflection) + +#endif /* GL_NV_texgen_reflection */ + +/* --------------------- GL_NV_texture_compression_vtc --------------------- */ + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 + +#define GLEW_NV_texture_compression_vtc GLEW_GET_VAR(__GLEW_NV_texture_compression_vtc) + +#endif /* GL_NV_texture_compression_vtc */ + +/* ----------------------- GL_NV_texture_env_combine4 ---------------------- */ + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 + +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B + +#define GLEW_NV_texture_env_combine4 GLEW_GET_VAR(__GLEW_NV_texture_env_combine4) + +#endif /* GL_NV_texture_env_combine4 */ + +/* ---------------------- GL_NV_texture_expand_normal ---------------------- */ + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 + +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F + +#define GLEW_NV_texture_expand_normal GLEW_GET_VAR(__GLEW_NV_texture_expand_normal) + +#endif /* GL_NV_texture_expand_normal */ + +/* ------------------------ GL_NV_texture_rectangle ------------------------ */ + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 + +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 + +#define GLEW_NV_texture_rectangle GLEW_GET_VAR(__GLEW_NV_texture_rectangle) + +#endif /* GL_NV_texture_rectangle */ + +/* -------------------------- GL_NV_texture_shader ------------------------- */ + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 + +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F + +#define GLEW_NV_texture_shader GLEW_GET_VAR(__GLEW_NV_texture_shader) + +#endif /* GL_NV_texture_shader */ + +/* ------------------------- GL_NV_texture_shader2 ------------------------- */ + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 + +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D + +#define GLEW_NV_texture_shader2 GLEW_GET_VAR(__GLEW_NV_texture_shader2) + +#endif /* GL_NV_texture_shader2 */ + +/* ------------------------- GL_NV_texture_shader3 ------------------------- */ + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 + +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 + +#define GLEW_NV_texture_shader3 GLEW_GET_VAR(__GLEW_NV_texture_shader3) + +#endif /* GL_NV_texture_shader3 */ + +/* ------------------------ GL_NV_vertex_array_range ----------------------- */ + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 + +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 + +typedef void (GLAPIENTRY * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void (GLAPIENTRY * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, void* pointer); + +#define glFlushVertexArrayRangeNV GLEW_GET_FUN(__glewFlushVertexArrayRangeNV) +#define glVertexArrayRangeNV GLEW_GET_FUN(__glewVertexArrayRangeNV) + +#define GLEW_NV_vertex_array_range GLEW_GET_VAR(__GLEW_NV_vertex_array_range) + +#endif /* GL_NV_vertex_array_range */ + +/* ----------------------- GL_NV_vertex_array_range2 ----------------------- */ + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 + +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 + +#define GLEW_NV_vertex_array_range2 GLEW_GET_VAR(__GLEW_NV_vertex_array_range2) + +#endif /* GL_NV_vertex_array_range2 */ + +/* -------------------------- GL_NV_vertex_program ------------------------- */ + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 + +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F + +typedef GLboolean (GLAPIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint* ids, GLboolean *residences); +typedef void (GLAPIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint* ids); +typedef void (GLAPIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint* ids); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte* program); +typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid** pointer); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint* params); +typedef GLboolean (GLAPIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (GLAPIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte* program); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint num, const GLdouble* params); +typedef void (GLAPIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint num, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, GLuint* ids); +typedef void (GLAPIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); +typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei n, const GLubyte* v); + +#define glAreProgramsResidentNV GLEW_GET_FUN(__glewAreProgramsResidentNV) +#define glBindProgramNV GLEW_GET_FUN(__glewBindProgramNV) +#define glDeleteProgramsNV GLEW_GET_FUN(__glewDeleteProgramsNV) +#define glExecuteProgramNV GLEW_GET_FUN(__glewExecuteProgramNV) +#define glGenProgramsNV GLEW_GET_FUN(__glewGenProgramsNV) +#define glGetProgramParameterdvNV GLEW_GET_FUN(__glewGetProgramParameterdvNV) +#define glGetProgramParameterfvNV GLEW_GET_FUN(__glewGetProgramParameterfvNV) +#define glGetProgramStringNV GLEW_GET_FUN(__glewGetProgramStringNV) +#define glGetProgramivNV GLEW_GET_FUN(__glewGetProgramivNV) +#define glGetTrackMatrixivNV GLEW_GET_FUN(__glewGetTrackMatrixivNV) +#define glGetVertexAttribPointervNV GLEW_GET_FUN(__glewGetVertexAttribPointervNV) +#define glGetVertexAttribdvNV GLEW_GET_FUN(__glewGetVertexAttribdvNV) +#define glGetVertexAttribfvNV GLEW_GET_FUN(__glewGetVertexAttribfvNV) +#define glGetVertexAttribivNV GLEW_GET_FUN(__glewGetVertexAttribivNV) +#define glIsProgramNV GLEW_GET_FUN(__glewIsProgramNV) +#define glLoadProgramNV GLEW_GET_FUN(__glewLoadProgramNV) +#define glProgramParameter4dNV GLEW_GET_FUN(__glewProgramParameter4dNV) +#define glProgramParameter4dvNV GLEW_GET_FUN(__glewProgramParameter4dvNV) +#define glProgramParameter4fNV GLEW_GET_FUN(__glewProgramParameter4fNV) +#define glProgramParameter4fvNV GLEW_GET_FUN(__glewProgramParameter4fvNV) +#define glProgramParameters4dvNV GLEW_GET_FUN(__glewProgramParameters4dvNV) +#define glProgramParameters4fvNV GLEW_GET_FUN(__glewProgramParameters4fvNV) +#define glRequestResidentProgramsNV GLEW_GET_FUN(__glewRequestResidentProgramsNV) +#define glTrackMatrixNV GLEW_GET_FUN(__glewTrackMatrixNV) +#define glVertexAttrib1dNV GLEW_GET_FUN(__glewVertexAttrib1dNV) +#define glVertexAttrib1dvNV GLEW_GET_FUN(__glewVertexAttrib1dvNV) +#define glVertexAttrib1fNV GLEW_GET_FUN(__glewVertexAttrib1fNV) +#define glVertexAttrib1fvNV GLEW_GET_FUN(__glewVertexAttrib1fvNV) +#define glVertexAttrib1sNV GLEW_GET_FUN(__glewVertexAttrib1sNV) +#define glVertexAttrib1svNV GLEW_GET_FUN(__glewVertexAttrib1svNV) +#define glVertexAttrib2dNV GLEW_GET_FUN(__glewVertexAttrib2dNV) +#define glVertexAttrib2dvNV GLEW_GET_FUN(__glewVertexAttrib2dvNV) +#define glVertexAttrib2fNV GLEW_GET_FUN(__glewVertexAttrib2fNV) +#define glVertexAttrib2fvNV GLEW_GET_FUN(__glewVertexAttrib2fvNV) +#define glVertexAttrib2sNV GLEW_GET_FUN(__glewVertexAttrib2sNV) +#define glVertexAttrib2svNV GLEW_GET_FUN(__glewVertexAttrib2svNV) +#define glVertexAttrib3dNV GLEW_GET_FUN(__glewVertexAttrib3dNV) +#define glVertexAttrib3dvNV GLEW_GET_FUN(__glewVertexAttrib3dvNV) +#define glVertexAttrib3fNV GLEW_GET_FUN(__glewVertexAttrib3fNV) +#define glVertexAttrib3fvNV GLEW_GET_FUN(__glewVertexAttrib3fvNV) +#define glVertexAttrib3sNV GLEW_GET_FUN(__glewVertexAttrib3sNV) +#define glVertexAttrib3svNV GLEW_GET_FUN(__glewVertexAttrib3svNV) +#define glVertexAttrib4dNV GLEW_GET_FUN(__glewVertexAttrib4dNV) +#define glVertexAttrib4dvNV GLEW_GET_FUN(__glewVertexAttrib4dvNV) +#define glVertexAttrib4fNV GLEW_GET_FUN(__glewVertexAttrib4fNV) +#define glVertexAttrib4fvNV GLEW_GET_FUN(__glewVertexAttrib4fvNV) +#define glVertexAttrib4sNV GLEW_GET_FUN(__glewVertexAttrib4sNV) +#define glVertexAttrib4svNV GLEW_GET_FUN(__glewVertexAttrib4svNV) +#define glVertexAttrib4ubNV GLEW_GET_FUN(__glewVertexAttrib4ubNV) +#define glVertexAttrib4ubvNV GLEW_GET_FUN(__glewVertexAttrib4ubvNV) +#define glVertexAttribPointerNV GLEW_GET_FUN(__glewVertexAttribPointerNV) +#define glVertexAttribs1dvNV GLEW_GET_FUN(__glewVertexAttribs1dvNV) +#define glVertexAttribs1fvNV GLEW_GET_FUN(__glewVertexAttribs1fvNV) +#define glVertexAttribs1svNV GLEW_GET_FUN(__glewVertexAttribs1svNV) +#define glVertexAttribs2dvNV GLEW_GET_FUN(__glewVertexAttribs2dvNV) +#define glVertexAttribs2fvNV GLEW_GET_FUN(__glewVertexAttribs2fvNV) +#define glVertexAttribs2svNV GLEW_GET_FUN(__glewVertexAttribs2svNV) +#define glVertexAttribs3dvNV GLEW_GET_FUN(__glewVertexAttribs3dvNV) +#define glVertexAttribs3fvNV GLEW_GET_FUN(__glewVertexAttribs3fvNV) +#define glVertexAttribs3svNV GLEW_GET_FUN(__glewVertexAttribs3svNV) +#define glVertexAttribs4dvNV GLEW_GET_FUN(__glewVertexAttribs4dvNV) +#define glVertexAttribs4fvNV GLEW_GET_FUN(__glewVertexAttribs4fvNV) +#define glVertexAttribs4svNV GLEW_GET_FUN(__glewVertexAttribs4svNV) +#define glVertexAttribs4ubvNV GLEW_GET_FUN(__glewVertexAttribs4ubvNV) + +#define GLEW_NV_vertex_program GLEW_GET_VAR(__GLEW_NV_vertex_program) + +#endif /* GL_NV_vertex_program */ + +/* ------------------------ GL_NV_vertex_program1_1 ------------------------ */ + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 + +#define GLEW_NV_vertex_program1_1 GLEW_GET_VAR(__GLEW_NV_vertex_program1_1) + +#endif /* GL_NV_vertex_program1_1 */ + +/* ------------------------- GL_NV_vertex_program2 ------------------------- */ + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 + +#define GLEW_NV_vertex_program2 GLEW_GET_VAR(__GLEW_NV_vertex_program2) + +#endif /* GL_NV_vertex_program2 */ + +/* ---------------------- GL_NV_vertex_program2_option --------------------- */ + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 + +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 + +#define GLEW_NV_vertex_program2_option GLEW_GET_VAR(__GLEW_NV_vertex_program2_option) + +#endif /* GL_NV_vertex_program2_option */ + +/* ------------------------- GL_NV_vertex_program3 ------------------------- */ + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 + +#define MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C + +#define GLEW_NV_vertex_program3 GLEW_GET_VAR(__GLEW_NV_vertex_program3) + +#endif /* GL_NV_vertex_program3 */ + +/* ---------------------------- GL_OML_interlace --------------------------- */ + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 + +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 + +#define GLEW_OML_interlace GLEW_GET_VAR(__GLEW_OML_interlace) + +#endif /* GL_OML_interlace */ + +/* ---------------------------- GL_OML_resample ---------------------------- */ + +#ifndef GL_OML_resample +#define GL_OML_resample 1 + +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 + +#define GLEW_OML_resample GLEW_GET_VAR(__GLEW_OML_resample) + +#endif /* GL_OML_resample */ + +/* ---------------------------- GL_OML_subsample --------------------------- */ + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 + +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 + +#define GLEW_OML_subsample GLEW_GET_VAR(__GLEW_OML_subsample) + +#endif /* GL_OML_subsample */ + +/* --------------------------- GL_PGI_misc_hints --------------------------- */ + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 + +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 107000 +#define GL_CONSERVE_MEMORY_HINT_PGI 107005 +#define GL_RECLAIM_MEMORY_HINT_PGI 107006 +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 107010 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 107011 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 107012 +#define GL_ALWAYS_FAST_HINT_PGI 107020 +#define GL_ALWAYS_SOFT_HINT_PGI 107021 +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 107022 +#define GL_ALLOW_DRAW_WIN_HINT_PGI 107023 +#define GL_ALLOW_DRAW_FRG_HINT_PGI 107024 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 107025 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 107030 +#define GL_STRICT_LIGHTING_HINT_PGI 107031 +#define GL_STRICT_SCISSOR_HINT_PGI 107032 +#define GL_FULL_STIPPLE_HINT_PGI 107033 +#define GL_CLIP_NEAR_HINT_PGI 107040 +#define GL_CLIP_FAR_HINT_PGI 107041 +#define GL_WIDE_LINE_HINT_PGI 107042 +#define GL_BACK_NORMALS_HINT_PGI 107043 + +#define GLEW_PGI_misc_hints GLEW_GET_VAR(__GLEW_PGI_misc_hints) + +#endif /* GL_PGI_misc_hints */ + +/* -------------------------- GL_PGI_vertex_hints -------------------------- */ + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 + +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_VERTEX_DATA_HINT_PGI 107050 +#define GL_VERTEX_CONSISTENT_HINT_PGI 107051 +#define GL_MATERIAL_SIDE_HINT_PGI 107052 +#define GL_MAX_VERTEX_HINT_PGI 107053 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 + +#define GLEW_PGI_vertex_hints GLEW_GET_VAR(__GLEW_PGI_vertex_hints) + +#endif /* GL_PGI_vertex_hints */ + +/* ----------------------- GL_REND_screen_coordinates ---------------------- */ + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 + +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 + +#define GLEW_REND_screen_coordinates GLEW_GET_VAR(__GLEW_REND_screen_coordinates) + +#endif /* GL_REND_screen_coordinates */ + +/* ------------------------------- GL_S3_s3tc ------------------------------ */ + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 + +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#define GL_RGBA_DXT5_S3TC 0x83A4 +#define GL_RGBA4_DXT5_S3TC 0x83A5 + +#define GLEW_S3_s3tc GLEW_GET_VAR(__GLEW_S3_s3tc) + +#endif /* GL_S3_s3tc */ + +/* -------------------------- GL_SGIS_color_range -------------------------- */ + +#ifndef GL_SGIS_color_range +#define GL_SGIS_color_range 1 + +#define GL_EXTENDED_RANGE_SGIS 0x85A5 +#define GL_MIN_RED_SGIS 0x85A6 +#define GL_MAX_RED_SGIS 0x85A7 +#define GL_MIN_GREEN_SGIS 0x85A8 +#define GL_MAX_GREEN_SGIS 0x85A9 +#define GL_MIN_BLUE_SGIS 0x85AA +#define GL_MAX_BLUE_SGIS 0x85AB +#define GL_MIN_ALPHA_SGIS 0x85AC +#define GL_MAX_ALPHA_SGIS 0x85AD + +#define GLEW_SGIS_color_range GLEW_GET_VAR(__GLEW_SGIS_color_range) + +#endif /* GL_SGIS_color_range */ + +/* ------------------------- GL_SGIS_detail_texture ------------------------ */ + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 + +typedef void (GLAPIENTRY * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points); +typedef void (GLAPIENTRY * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat* points); + +#define glDetailTexFuncSGIS GLEW_GET_FUN(__glewDetailTexFuncSGIS) +#define glGetDetailTexFuncSGIS GLEW_GET_FUN(__glewGetDetailTexFuncSGIS) + +#define GLEW_SGIS_detail_texture GLEW_GET_VAR(__GLEW_SGIS_detail_texture) + +#endif /* GL_SGIS_detail_texture */ + +/* -------------------------- GL_SGIS_fog_function ------------------------- */ + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 + +typedef void (GLAPIENTRY * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat* points); +typedef void (GLAPIENTRY * PFNGLGETFOGFUNCSGISPROC) (GLfloat* points); + +#define glFogFuncSGIS GLEW_GET_FUN(__glewFogFuncSGIS) +#define glGetFogFuncSGIS GLEW_GET_FUN(__glewGetFogFuncSGIS) + +#define GLEW_SGIS_fog_function GLEW_GET_VAR(__GLEW_SGIS_fog_function) + +#endif /* GL_SGIS_fog_function */ + +/* ------------------------ GL_SGIS_generate_mipmap ------------------------ */ + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 + +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 + +#define GLEW_SGIS_generate_mipmap GLEW_GET_VAR(__GLEW_SGIS_generate_mipmap) + +#endif /* GL_SGIS_generate_mipmap */ + +/* -------------------------- GL_SGIS_multisample -------------------------- */ + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 + +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 + +typedef void (GLAPIENTRY * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (GLAPIENTRY * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); + +#define glSampleMaskSGIS GLEW_GET_FUN(__glewSampleMaskSGIS) +#define glSamplePatternSGIS GLEW_GET_FUN(__glewSamplePatternSGIS) + +#define GLEW_SGIS_multisample GLEW_GET_VAR(__GLEW_SGIS_multisample) + +#endif /* GL_SGIS_multisample */ + +/* ------------------------- GL_SGIS_pixel_texture ------------------------- */ + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 + +#define GLEW_SGIS_pixel_texture GLEW_GET_VAR(__GLEW_SGIS_pixel_texture) + +#endif /* GL_SGIS_pixel_texture */ + +/* ------------------------ GL_SGIS_sharpen_texture ------------------------ */ + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 + +typedef void (GLAPIENTRY * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat* points); +typedef void (GLAPIENTRY * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points); + +#define glGetSharpenTexFuncSGIS GLEW_GET_FUN(__glewGetSharpenTexFuncSGIS) +#define glSharpenTexFuncSGIS GLEW_GET_FUN(__glewSharpenTexFuncSGIS) + +#define GLEW_SGIS_sharpen_texture GLEW_GET_VAR(__GLEW_SGIS_sharpen_texture) + +#endif /* GL_SGIS_sharpen_texture */ + +/* --------------------------- GL_SGIS_texture4D --------------------------- */ + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 + +typedef void (GLAPIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void* pixels); +typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void* pixels); + +#define glTexImage4DSGIS GLEW_GET_FUN(__glewTexImage4DSGIS) +#define glTexSubImage4DSGIS GLEW_GET_FUN(__glewTexSubImage4DSGIS) + +#define GLEW_SGIS_texture4D GLEW_GET_VAR(__GLEW_SGIS_texture4D) + +#endif /* GL_SGIS_texture4D */ + +/* ---------------------- GL_SGIS_texture_border_clamp --------------------- */ + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 + +#define GL_CLAMP_TO_BORDER_SGIS 0x812D + +#define GLEW_SGIS_texture_border_clamp GLEW_GET_VAR(__GLEW_SGIS_texture_border_clamp) + +#endif /* GL_SGIS_texture_border_clamp */ + +/* ----------------------- GL_SGIS_texture_edge_clamp ---------------------- */ + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 + +#define GL_CLAMP_TO_EDGE_SGIS 0x812F + +#define GLEW_SGIS_texture_edge_clamp GLEW_GET_VAR(__GLEW_SGIS_texture_edge_clamp) + +#endif /* GL_SGIS_texture_edge_clamp */ + +/* ------------------------ GL_SGIS_texture_filter4 ------------------------ */ + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 + +typedef void (GLAPIENTRY * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat* weights); +typedef void (GLAPIENTRY * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat* weights); + +#define glGetTexFilterFuncSGIS GLEW_GET_FUN(__glewGetTexFilterFuncSGIS) +#define glTexFilterFuncSGIS GLEW_GET_FUN(__glewTexFilterFuncSGIS) + +#define GLEW_SGIS_texture_filter4 GLEW_GET_VAR(__GLEW_SGIS_texture_filter4) + +#endif /* GL_SGIS_texture_filter4 */ + +/* -------------------------- GL_SGIS_texture_lod -------------------------- */ + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 + +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D + +#define GLEW_SGIS_texture_lod GLEW_GET_VAR(__GLEW_SGIS_texture_lod) + +#endif /* GL_SGIS_texture_lod */ + +/* ------------------------- GL_SGIS_texture_select ------------------------ */ + +#ifndef GL_SGIS_texture_select +#define GL_SGIS_texture_select 1 + +#define GLEW_SGIS_texture_select GLEW_GET_VAR(__GLEW_SGIS_texture_select) + +#endif /* GL_SGIS_texture_select */ + +/* ----------------------------- GL_SGIX_async ----------------------------- */ + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 + +#define GL_ASYNC_MARKER_SGIX 0x8329 + +typedef void (GLAPIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef void (GLAPIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLint (GLAPIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint* markerp); +typedef GLuint (GLAPIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef GLboolean (GLAPIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (GLAPIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint* markerp); + +#define glAsyncMarkerSGIX GLEW_GET_FUN(__glewAsyncMarkerSGIX) +#define glDeleteAsyncMarkersSGIX GLEW_GET_FUN(__glewDeleteAsyncMarkersSGIX) +#define glFinishAsyncSGIX GLEW_GET_FUN(__glewFinishAsyncSGIX) +#define glGenAsyncMarkersSGIX GLEW_GET_FUN(__glewGenAsyncMarkersSGIX) +#define glIsAsyncMarkerSGIX GLEW_GET_FUN(__glewIsAsyncMarkerSGIX) +#define glPollAsyncSGIX GLEW_GET_FUN(__glewPollAsyncSGIX) + +#define GLEW_SGIX_async GLEW_GET_VAR(__GLEW_SGIX_async) + +#endif /* GL_SGIX_async */ + +/* ------------------------ GL_SGIX_async_histogram ------------------------ */ + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 + +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D + +#define GLEW_SGIX_async_histogram GLEW_GET_VAR(__GLEW_SGIX_async_histogram) + +#endif /* GL_SGIX_async_histogram */ + +/* -------------------------- GL_SGIX_async_pixel -------------------------- */ + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 + +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 + +#define GLEW_SGIX_async_pixel GLEW_GET_VAR(__GLEW_SGIX_async_pixel) + +#endif /* GL_SGIX_async_pixel */ + +/* ----------------------- GL_SGIX_blend_alpha_minmax ---------------------- */ + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 + +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 + +#define GLEW_SGIX_blend_alpha_minmax GLEW_GET_VAR(__GLEW_SGIX_blend_alpha_minmax) + +#endif /* GL_SGIX_blend_alpha_minmax */ + +/* ---------------------------- GL_SGIX_clipmap ---------------------------- */ + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 + +#define GLEW_SGIX_clipmap GLEW_GET_VAR(__GLEW_SGIX_clipmap) + +#endif /* GL_SGIX_clipmap */ + +/* ------------------------- GL_SGIX_depth_texture ------------------------- */ + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 + +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 + +#define GLEW_SGIX_depth_texture GLEW_GET_VAR(__GLEW_SGIX_depth_texture) + +#endif /* GL_SGIX_depth_texture */ + +/* -------------------------- GL_SGIX_flush_raster ------------------------- */ + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 + +typedef void (GLAPIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void); + +#define glFlushRasterSGIX GLEW_GET_FUN(__glewFlushRasterSGIX) + +#define GLEW_SGIX_flush_raster GLEW_GET_VAR(__GLEW_SGIX_flush_raster) + +#endif /* GL_SGIX_flush_raster */ + +/* --------------------------- GL_SGIX_fog_offset -------------------------- */ + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 + +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 + +#define GLEW_SGIX_fog_offset GLEW_GET_VAR(__GLEW_SGIX_fog_offset) + +#endif /* GL_SGIX_fog_offset */ + +/* -------------------------- GL_SGIX_fog_texture -------------------------- */ + +#ifndef GL_SGIX_fog_texture +#define GL_SGIX_fog_texture 1 + +#define GL_TEXTURE_FOG_SGIX 0 +#define GL_FOG_PATCHY_FACTOR_SGIX 0 +#define GL_FRAGMENT_FOG_SGIX 0 + +typedef void (GLAPIENTRY * PFNGLTEXTUREFOGSGIXPROC) (GLenum pname); + +#define glTextureFogSGIX GLEW_GET_FUN(__glewTextureFogSGIX) + +#define GLEW_SGIX_fog_texture GLEW_GET_VAR(__GLEW_SGIX_fog_texture) + +#endif /* GL_SGIX_fog_texture */ + +#if 0 +/* ------------------- GL_SGIX_fragment_specular_lighting ------------------ */ + +#ifndef GL_SGIX_fragment_specular_lighting +#define GL_SGIX_fragment_specular_lighting 1 + +typedef void (GLAPIENTRY * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, const GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, const GLfloat param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, const GLint param); +typedef void (GLAPIENTRY * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum value, const GLfloat* data); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum value, const GLint* data); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data); +typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data); + +#define glFragmentColorMaterialSGIX GLEW_GET_FUN(__glewFragmentColorMaterialSGIX) +#define glFragmentLightModelfSGIX GLEW_GET_FUN(__glewFragmentLightModelfSGIX) +#define glFragmentLightModelfvSGIX GLEW_GET_FUN(__glewFragmentLightModelfvSGIX) +#define glFragmentLightModeliSGIX GLEW_GET_FUN(__glewFragmentLightModeliSGIX) +#define glFragmentLightModelivSGIX GLEW_GET_FUN(__glewFragmentLightModelivSGIX) +#define glFragmentLightfSGIX GLEW_GET_FUN(__glewFragmentLightfSGIX) +#define glFragmentLightfvSGIX GLEW_GET_FUN(__glewFragmentLightfvSGIX) +#define glFragmentLightiSGIX GLEW_GET_FUN(__glewFragmentLightiSGIX) +#define glFragmentLightivSGIX GLEW_GET_FUN(__glewFragmentLightivSGIX) +#define glFragmentMaterialfSGIX GLEW_GET_FUN(__glewFragmentMaterialfSGIX) +#define glFragmentMaterialfvSGIX GLEW_GET_FUN(__glewFragmentMaterialfvSGIX) +#define glFragmentMaterialiSGIX GLEW_GET_FUN(__glewFragmentMaterialiSGIX) +#define glFragmentMaterialivSGIX GLEW_GET_FUN(__glewFragmentMaterialivSGIX) +#define glGetFragmentLightfvSGIX GLEW_GET_FUN(__glewGetFragmentLightfvSGIX) +#define glGetFragmentLightivSGIX GLEW_GET_FUN(__glewGetFragmentLightivSGIX) +#define glGetFragmentMaterialfvSGIX GLEW_GET_FUN(__glewGetFragmentMaterialfvSGIX) +#define glGetFragmentMaterialivSGIX GLEW_GET_FUN(__glewGetFragmentMaterialivSGIX) + +#define GLEW_SGIX_fragment_specular_lighting GLEW_GET_VAR(__GLEW_SGIX_fragment_specular_lighting) +#endif + +#endif /* GL_SGIX_fragment_specular_lighting */ + +/* --------------------------- GL_SGIX_framezoom --------------------------- */ + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 + +typedef void (GLAPIENTRY * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); + +#define glFrameZoomSGIX GLEW_GET_FUN(__glewFrameZoomSGIX) + +#define GLEW_SGIX_framezoom GLEW_GET_VAR(__GLEW_SGIX_framezoom) + +#endif /* GL_SGIX_framezoom */ + +/* --------------------------- GL_SGIX_interlace --------------------------- */ + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 + +#define GL_INTERLACE_SGIX 0x8094 + +#define GLEW_SGIX_interlace GLEW_GET_VAR(__GLEW_SGIX_interlace) + +#endif /* GL_SGIX_interlace */ + +/* ------------------------- GL_SGIX_ir_instrument1 ------------------------ */ + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 + +#define GLEW_SGIX_ir_instrument1 GLEW_GET_VAR(__GLEW_SGIX_ir_instrument1) + +#endif /* GL_SGIX_ir_instrument1 */ + +/* ------------------------- GL_SGIX_list_priority ------------------------- */ + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 + +#define GLEW_SGIX_list_priority GLEW_GET_VAR(__GLEW_SGIX_list_priority) + +#endif /* GL_SGIX_list_priority */ + +/* ------------------------- GL_SGIX_pixel_texture ------------------------- */ + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 + +typedef void (GLAPIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); + +#define glPixelTexGenSGIX GLEW_GET_FUN(__glewPixelTexGenSGIX) + +#define GLEW_SGIX_pixel_texture GLEW_GET_VAR(__GLEW_SGIX_pixel_texture) + +#endif /* GL_SGIX_pixel_texture */ + +/* ----------------------- GL_SGIX_pixel_texture_bits ---------------------- */ + +#ifndef GL_SGIX_pixel_texture_bits +#define GL_SGIX_pixel_texture_bits 1 + +#define GLEW_SGIX_pixel_texture_bits GLEW_GET_VAR(__GLEW_SGIX_pixel_texture_bits) + +#endif /* GL_SGIX_pixel_texture_bits */ + +/* ------------------------ GL_SGIX_reference_plane ------------------------ */ + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 + +typedef void (GLAPIENTRY * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble* equation); + +#define glReferencePlaneSGIX GLEW_GET_FUN(__glewReferencePlaneSGIX) + +#define GLEW_SGIX_reference_plane GLEW_GET_VAR(__GLEW_SGIX_reference_plane) + +#endif /* GL_SGIX_reference_plane */ + +/* ---------------------------- GL_SGIX_resample --------------------------- */ + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 + +#define GL_PACK_RESAMPLE_SGIX 0x842E +#define GL_UNPACK_RESAMPLE_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#define GL_RESAMPLE_REPLICATE_SGIX 0x8433 +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434 + +#define GLEW_SGIX_resample GLEW_GET_VAR(__GLEW_SGIX_resample) + +#endif /* GL_SGIX_resample */ + +/* ----------------------------- GL_SGIX_shadow ---------------------------- */ + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 + +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D + +#define GLEW_SGIX_shadow GLEW_GET_VAR(__GLEW_SGIX_shadow) + +#endif /* GL_SGIX_shadow */ + +/* ------------------------- GL_SGIX_shadow_ambient ------------------------ */ + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 + +#define GL_SHADOW_AMBIENT_SGIX 0x80BF + +#define GLEW_SGIX_shadow_ambient GLEW_GET_VAR(__GLEW_SGIX_shadow_ambient) + +#endif /* GL_SGIX_shadow_ambient */ + +/* ----------------------------- GL_SGIX_sprite ---------------------------- */ + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 + +typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (GLAPIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, GLint* params); + +#define glSpriteParameterfSGIX GLEW_GET_FUN(__glewSpriteParameterfSGIX) +#define glSpriteParameterfvSGIX GLEW_GET_FUN(__glewSpriteParameterfvSGIX) +#define glSpriteParameteriSGIX GLEW_GET_FUN(__glewSpriteParameteriSGIX) +#define glSpriteParameterivSGIX GLEW_GET_FUN(__glewSpriteParameterivSGIX) + +#define GLEW_SGIX_sprite GLEW_GET_VAR(__GLEW_SGIX_sprite) + +#endif /* GL_SGIX_sprite */ + +/* ----------------------- GL_SGIX_tag_sample_buffer ----------------------- */ + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 + +typedef void (GLAPIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); + +#define glTagSampleBufferSGIX GLEW_GET_FUN(__glewTagSampleBufferSGIX) + +#define GLEW_SGIX_tag_sample_buffer GLEW_GET_VAR(__GLEW_SGIX_tag_sample_buffer) + +#endif /* GL_SGIX_tag_sample_buffer */ + +/* ------------------------ GL_SGIX_texture_add_env ------------------------ */ + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 + +#define GLEW_SGIX_texture_add_env GLEW_GET_VAR(__GLEW_SGIX_texture_add_env) + +#endif /* GL_SGIX_texture_add_env */ + +/* -------------------- GL_SGIX_texture_coordinate_clamp ------------------- */ + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 + +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B + +#define GLEW_SGIX_texture_coordinate_clamp GLEW_GET_VAR(__GLEW_SGIX_texture_coordinate_clamp) + +#endif /* GL_SGIX_texture_coordinate_clamp */ + +/* ------------------------ GL_SGIX_texture_lod_bias ----------------------- */ + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 + +#define GLEW_SGIX_texture_lod_bias GLEW_GET_VAR(__GLEW_SGIX_texture_lod_bias) + +#endif /* GL_SGIX_texture_lod_bias */ + +/* ---------------------- GL_SGIX_texture_multi_buffer --------------------- */ + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 + +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E + +#define GLEW_SGIX_texture_multi_buffer GLEW_GET_VAR(__GLEW_SGIX_texture_multi_buffer) + +#endif /* GL_SGIX_texture_multi_buffer */ + +/* ------------------------- GL_SGIX_texture_range ------------------------- */ + +#ifndef GL_SGIX_texture_range +#define GL_SGIX_texture_range 1 + +#define GL_RGB_SIGNED_SGIX 0x85E0 +#define GL_RGBA_SIGNED_SGIX 0x85E1 +#define GL_ALPHA_SIGNED_SGIX 0x85E2 +#define GL_LUMINANCE_SIGNED_SGIX 0x85E3 +#define GL_INTENSITY_SIGNED_SGIX 0x85E4 +#define GL_LUMINANCE_ALPHA_SIGNED_SGIX 0x85E5 +#define GL_RGB16_SIGNED_SGIX 0x85E6 +#define GL_RGBA16_SIGNED_SGIX 0x85E7 +#define GL_ALPHA16_SIGNED_SGIX 0x85E8 +#define GL_LUMINANCE16_SIGNED_SGIX 0x85E9 +#define GL_INTENSITY16_SIGNED_SGIX 0x85EA +#define GL_LUMINANCE16_ALPHA16_SIGNED_SGIX 0x85EB +#define GL_RGB_EXTENDED_RANGE_SGIX 0x85EC +#define GL_RGBA_EXTENDED_RANGE_SGIX 0x85ED +#define GL_ALPHA_EXTENDED_RANGE_SGIX 0x85EE +#define GL_LUMINANCE_EXTENDED_RANGE_SGIX 0x85EF +#define GL_INTENSITY_EXTENDED_RANGE_SGIX 0x85F0 +#define GL_LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 0x85F1 +#define GL_RGB16_EXTENDED_RANGE_SGIX 0x85F2 +#define GL_RGBA16_EXTENDED_RANGE_SGIX 0x85F3 +#define GL_ALPHA16_EXTENDED_RANGE_SGIX 0x85F4 +#define GL_LUMINANCE16_EXTENDED_RANGE_SGIX 0x85F5 +#define GL_INTENSITY16_EXTENDED_RANGE_SGIX 0x85F6 +#define GL_LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX 0x85F7 +#define GL_MIN_LUMINANCE_SGIS 0x85F8 +#define GL_MAX_LUMINANCE_SGIS 0x85F9 +#define GL_MIN_INTENSITY_SGIS 0x85FA +#define GL_MAX_INTENSITY_SGIS 0x85FB + +#define GLEW_SGIX_texture_range GLEW_GET_VAR(__GLEW_SGIX_texture_range) + +#endif /* GL_SGIX_texture_range */ + +/* ----------------------- GL_SGIX_texture_scale_bias ---------------------- */ + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 + +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C + +#define GLEW_SGIX_texture_scale_bias GLEW_GET_VAR(__GLEW_SGIX_texture_scale_bias) + +#endif /* GL_SGIX_texture_scale_bias */ + +/* ------------------------- GL_SGIX_vertex_preclip ------------------------ */ + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 + +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF + +#define GLEW_SGIX_vertex_preclip GLEW_GET_VAR(__GLEW_SGIX_vertex_preclip) + +#endif /* GL_SGIX_vertex_preclip */ + +/* ---------------------- GL_SGIX_vertex_preclip_hint ---------------------- */ + +#ifndef GL_SGIX_vertex_preclip_hint +#define GL_SGIX_vertex_preclip_hint 1 + +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF + +#define GLEW_SGIX_vertex_preclip_hint GLEW_GET_VAR(__GLEW_SGIX_vertex_preclip_hint) + +#endif /* GL_SGIX_vertex_preclip_hint */ + +/* ----------------------------- GL_SGIX_ycrcb ----------------------------- */ + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 + +#define GLEW_SGIX_ycrcb GLEW_GET_VAR(__GLEW_SGIX_ycrcb) + +#endif /* GL_SGIX_ycrcb */ + +/* -------------------------- GL_SGI_color_matrix -------------------------- */ + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 + +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB + +#define GLEW_SGI_color_matrix GLEW_GET_VAR(__GLEW_SGI_color_matrix) + +#endif /* GL_SGI_color_matrix */ + +/* --------------------------- GL_SGI_color_table -------------------------- */ + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 + +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF + +typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat* params); +typedef void (GLAPIENTRY * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint* params); +typedef void (GLAPIENTRY * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* table); +typedef void (GLAPIENTRY * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat* params); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint* params); +typedef void (GLAPIENTRY * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void* table); + +#define glColorTableParameterfvSGI GLEW_GET_FUN(__glewColorTableParameterfvSGI) +#define glColorTableParameterivSGI GLEW_GET_FUN(__glewColorTableParameterivSGI) +#define glColorTableSGI GLEW_GET_FUN(__glewColorTableSGI) +#define glCopyColorTableSGI GLEW_GET_FUN(__glewCopyColorTableSGI) +#define glGetColorTableParameterfvSGI GLEW_GET_FUN(__glewGetColorTableParameterfvSGI) +#define glGetColorTableParameterivSGI GLEW_GET_FUN(__glewGetColorTableParameterivSGI) +#define glGetColorTableSGI GLEW_GET_FUN(__glewGetColorTableSGI) + +#define GLEW_SGI_color_table GLEW_GET_VAR(__GLEW_SGI_color_table) + +#endif /* GL_SGI_color_table */ + +/* ----------------------- GL_SGI_texture_color_table ---------------------- */ + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 + +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD + +#define GLEW_SGI_texture_color_table GLEW_GET_VAR(__GLEW_SGI_texture_color_table) + +#endif /* GL_SGI_texture_color_table */ + +/* ------------------------- GL_SUNX_constant_data ------------------------- */ + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 + +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 + +typedef void (GLAPIENTRY * PFNGLFINISHTEXTURESUNXPROC) (void); + +#define glFinishTextureSUNX GLEW_GET_FUN(__glewFinishTextureSUNX) + +#define GLEW_SUNX_constant_data GLEW_GET_VAR(__GLEW_SUNX_constant_data) + +#endif /* GL_SUNX_constant_data */ + +/* -------------------- GL_SUN_convolution_border_modes -------------------- */ + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 + +#define GL_WRAP_BORDER_SUN 0x81D4 + +#define GLEW_SUN_convolution_border_modes GLEW_GET_VAR(__GLEW_SUN_convolution_border_modes) + +#endif /* GL_SUN_convolution_border_modes */ + +/* -------------------------- GL_SUN_global_alpha -------------------------- */ + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 + +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA + +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +typedef void (GLAPIENTRY * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); + +#define glGlobalAlphaFactorbSUN GLEW_GET_FUN(__glewGlobalAlphaFactorbSUN) +#define glGlobalAlphaFactordSUN GLEW_GET_FUN(__glewGlobalAlphaFactordSUN) +#define glGlobalAlphaFactorfSUN GLEW_GET_FUN(__glewGlobalAlphaFactorfSUN) +#define glGlobalAlphaFactoriSUN GLEW_GET_FUN(__glewGlobalAlphaFactoriSUN) +#define glGlobalAlphaFactorsSUN GLEW_GET_FUN(__glewGlobalAlphaFactorsSUN) +#define glGlobalAlphaFactorubSUN GLEW_GET_FUN(__glewGlobalAlphaFactorubSUN) +#define glGlobalAlphaFactoruiSUN GLEW_GET_FUN(__glewGlobalAlphaFactoruiSUN) +#define glGlobalAlphaFactorusSUN GLEW_GET_FUN(__glewGlobalAlphaFactorusSUN) + +#define GLEW_SUN_global_alpha GLEW_GET_VAR(__GLEW_SUN_global_alpha) + +#endif /* GL_SUN_global_alpha */ + +/* --------------------------- GL_SUN_mesh_array --------------------------- */ + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 + +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 + +#define GLEW_SUN_mesh_array GLEW_GET_VAR(__GLEW_SUN_mesh_array) + +#endif /* GL_SUN_mesh_array */ + +/* ------------------------ GL_SUN_read_video_pixels ----------------------- */ + +#ifndef GL_SUN_read_video_pixels +#define GL_SUN_read_video_pixels 1 + +typedef void (GLAPIENTRY * PFNGLREADVIDEOPIXELSSUNPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); + +#define glReadVideoPixelsSUN GLEW_GET_FUN(__glewReadVideoPixelsSUN) + +#define GLEW_SUN_read_video_pixels GLEW_GET_VAR(__GLEW_SUN_read_video_pixels) + +#endif /* GL_SUN_read_video_pixels */ + +/* --------------------------- GL_SUN_slice_accum -------------------------- */ + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 + +#define GL_SLICE_ACCUM_SUN 0x85CC + +#define GLEW_SUN_slice_accum GLEW_GET_VAR(__GLEW_SUN_slice_accum) + +#endif /* GL_SUN_slice_accum */ + +/* -------------------------- GL_SUN_triangle_list ------------------------- */ + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 + +#define GL_RESTART_SUN 0x01 +#define GL_REPLACE_MIDDLE_SUN 0x02 +#define GL_REPLACE_OLDEST_SUN 0x03 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB + +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void* pointer); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte* code); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint* code); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort* code); + +#define glReplacementCodePointerSUN GLEW_GET_FUN(__glewReplacementCodePointerSUN) +#define glReplacementCodeubSUN GLEW_GET_FUN(__glewReplacementCodeubSUN) +#define glReplacementCodeubvSUN GLEW_GET_FUN(__glewReplacementCodeubvSUN) +#define glReplacementCodeuiSUN GLEW_GET_FUN(__glewReplacementCodeuiSUN) +#define glReplacementCodeuivSUN GLEW_GET_FUN(__glewReplacementCodeuivSUN) +#define glReplacementCodeusSUN GLEW_GET_FUN(__glewReplacementCodeusSUN) +#define glReplacementCodeusvSUN GLEW_GET_FUN(__glewReplacementCodeusvSUN) + +#define GLEW_SUN_triangle_list GLEW_GET_VAR(__GLEW_SUN_triangle_list) + +#endif /* GL_SUN_triangle_list */ + +/* ----------------------------- GL_SUN_vertex ----------------------------- */ + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 + +typedef void (GLAPIENTRY * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte* c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte* c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint* rc, const GLubyte *c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat* tc, const GLubyte *c, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (GLAPIENTRY * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (GLAPIENTRY * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *v); + +#define glColor3fVertex3fSUN GLEW_GET_FUN(__glewColor3fVertex3fSUN) +#define glColor3fVertex3fvSUN GLEW_GET_FUN(__glewColor3fVertex3fvSUN) +#define glColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewColor4fNormal3fVertex3fSUN) +#define glColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewColor4fNormal3fVertex3fvSUN) +#define glColor4ubVertex2fSUN GLEW_GET_FUN(__glewColor4ubVertex2fSUN) +#define glColor4ubVertex2fvSUN GLEW_GET_FUN(__glewColor4ubVertex2fvSUN) +#define glColor4ubVertex3fSUN GLEW_GET_FUN(__glewColor4ubVertex3fSUN) +#define glColor4ubVertex3fvSUN GLEW_GET_FUN(__glewColor4ubVertex3fvSUN) +#define glNormal3fVertex3fSUN GLEW_GET_FUN(__glewNormal3fVertex3fSUN) +#define glNormal3fVertex3fvSUN GLEW_GET_FUN(__glewNormal3fVertex3fvSUN) +#define glReplacementCodeuiColor3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor3fVertex3fSUN) +#define glReplacementCodeuiColor3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor3fVertex3fvSUN) +#define glReplacementCodeuiColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4fNormal3fVertex3fSUN) +#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4fNormal3fVertex3fvSUN) +#define glReplacementCodeuiColor4ubVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4ubVertex3fSUN) +#define glReplacementCodeuiColor4ubVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiColor4ubVertex3fvSUN) +#define glReplacementCodeuiNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiNormal3fVertex3fSUN) +#define glReplacementCodeuiNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiNormal3fVertex3fvSUN) +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) +#define glReplacementCodeuiTexCoord2fVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fVertex3fSUN) +#define glReplacementCodeuiTexCoord2fVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiTexCoord2fVertex3fvSUN) +#define glReplacementCodeuiVertex3fSUN GLEW_GET_FUN(__glewReplacementCodeuiVertex3fSUN) +#define glReplacementCodeuiVertex3fvSUN GLEW_GET_FUN(__glewReplacementCodeuiVertex3fvSUN) +#define glTexCoord2fColor3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor3fVertex3fSUN) +#define glTexCoord2fColor3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor3fVertex3fvSUN) +#define glTexCoord2fColor4fNormal3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor4fNormal3fVertex3fSUN) +#define glTexCoord2fColor4fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor4fNormal3fVertex3fvSUN) +#define glTexCoord2fColor4ubVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fColor4ubVertex3fSUN) +#define glTexCoord2fColor4ubVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fColor4ubVertex3fvSUN) +#define glTexCoord2fNormal3fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fNormal3fVertex3fSUN) +#define glTexCoord2fNormal3fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fNormal3fVertex3fvSUN) +#define glTexCoord2fVertex3fSUN GLEW_GET_FUN(__glewTexCoord2fVertex3fSUN) +#define glTexCoord2fVertex3fvSUN GLEW_GET_FUN(__glewTexCoord2fVertex3fvSUN) +#define glTexCoord4fColor4fNormal3fVertex4fSUN GLEW_GET_FUN(__glewTexCoord4fColor4fNormal3fVertex4fSUN) +#define glTexCoord4fColor4fNormal3fVertex4fvSUN GLEW_GET_FUN(__glewTexCoord4fColor4fNormal3fVertex4fvSUN) +#define glTexCoord4fVertex4fSUN GLEW_GET_FUN(__glewTexCoord4fVertex4fSUN) +#define glTexCoord4fVertex4fvSUN GLEW_GET_FUN(__glewTexCoord4fVertex4fvSUN) + +#define GLEW_SUN_vertex GLEW_GET_VAR(__GLEW_SUN_vertex) + +#endif /* GL_SUN_vertex */ + +/* -------------------------- GL_WIN_phong_shading ------------------------- */ + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 + +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB + +#define GLEW_WIN_phong_shading GLEW_GET_VAR(__GLEW_WIN_phong_shading) + +#endif /* GL_WIN_phong_shading */ + +/* -------------------------- GL_WIN_specular_fog -------------------------- */ + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 + +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC + +#define GLEW_WIN_specular_fog GLEW_GET_VAR(__GLEW_WIN_specular_fog) + +#endif /* GL_WIN_specular_fog */ + +/* ---------------------------- GL_WIN_swap_hint --------------------------- */ + +#ifndef GL_WIN_swap_hint +#define GL_WIN_swap_hint 1 + +typedef void (GLAPIENTRY * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height); + +#define glAddSwapHintRectWIN GLEW_GET_FUN(__glewAddSwapHintRectWIN) + +#define GLEW_WIN_swap_hint GLEW_GET_VAR(__GLEW_WIN_swap_hint) + +#endif /* GL_WIN_swap_hint */ + +/* ------------------------------------------------------------------------- */ + +#if defined(GLEW_MX) && defined(_WIN32) +#define GLEW_FUN_EXPORT +#else +#define GLEW_FUN_EXPORT GLEWAPI +#endif /* GLEW_MX */ + +#if defined(GLEW_MX) +#define GLEW_VAR_EXPORT +#else +#define GLEW_VAR_EXPORT GLEWAPI +#endif /* GLEW_MX */ + +#if defined(GLEW_MX) && defined(_WIN32) +struct GLEWContextStruct +{ +#endif /* GLEW_MX */ + +GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D; +GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements; +GLEW_FUN_EXPORT PFNGLTEXIMAGE3DPROC __glewTexImage3D; +GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D; + +GLEW_FUN_EXPORT PFNGLACTIVETEXTUREPROC __glewActiveTexture; +GLEW_FUN_EXPORT PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D; +GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage; +GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd; +GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf; +GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd; +GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv; +GLEW_FUN_EXPORT PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage; + +GLEW_FUN_EXPORT PFNGLBLENDCOLORPROC __glewBlendColor; +GLEW_FUN_EXPORT PFNGLBLENDEQUATIONPROC __glewBlendEquation; +GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate; +GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer; +GLEW_FUN_EXPORT PFNGLFOGCOORDDPROC __glewFogCoordd; +GLEW_FUN_EXPORT PFNGLFOGCOORDDVPROC __glewFogCoorddv; +GLEW_FUN_EXPORT PFNGLFOGCOORDFPROC __glewFogCoordf; +GLEW_FUN_EXPORT PFNGLFOGCOORDFVPROC __glewFogCoordfv; +GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays; +GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements; +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFPROC __glewPointParameterf; +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DPROC __glewWindowPos2d; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FPROC __glewWindowPos2f; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IPROC __glewWindowPos2i; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SPROC __glewWindowPos2s; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DPROC __glewWindowPos3d; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FPROC __glewWindowPos3f; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IPROC __glewWindowPos3i; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SPROC __glewWindowPos3s; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv; + +GLEW_FUN_EXPORT PFNGLBEGINQUERYPROC __glewBeginQuery; +GLEW_FUN_EXPORT PFNGLBINDBUFFERPROC __glewBindBuffer; +GLEW_FUN_EXPORT PFNGLBUFFERDATAPROC __glewBufferData; +GLEW_FUN_EXPORT PFNGLBUFFERSUBDATAPROC __glewBufferSubData; +GLEW_FUN_EXPORT PFNGLDELETEBUFFERSPROC __glewDeleteBuffers; +GLEW_FUN_EXPORT PFNGLDELETEQUERIESPROC __glewDeleteQueries; +GLEW_FUN_EXPORT PFNGLENDQUERYPROC __glewEndQuery; +GLEW_FUN_EXPORT PFNGLGENBUFFERSPROC __glewGenBuffers; +GLEW_FUN_EXPORT PFNGLGENQUERIESPROC __glewGenQueries; +GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv; +GLEW_FUN_EXPORT PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv; +GLEW_FUN_EXPORT PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData; +GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv; +GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv; +GLEW_FUN_EXPORT PFNGLGETQUERYIVPROC __glewGetQueryiv; +GLEW_FUN_EXPORT PFNGLISBUFFERPROC __glewIsBuffer; +GLEW_FUN_EXPORT PFNGLISQUERYPROC __glewIsQuery; +GLEW_FUN_EXPORT PFNGLMAPBUFFERPROC __glewMapBuffer; +GLEW_FUN_EXPORT PFNGLUNMAPBUFFERPROC __glewUnmapBuffer; + +GLEW_FUN_EXPORT PFNGLATTACHSHADERPROC __glewAttachShader; +GLEW_FUN_EXPORT PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation; +GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate; +GLEW_FUN_EXPORT PFNGLCOMPILESHADERPROC __glewCompileShader; +GLEW_FUN_EXPORT PFNGLCREATEPROGRAMPROC __glewCreateProgram; +GLEW_FUN_EXPORT PFNGLCREATESHADERPROC __glewCreateShader; +GLEW_FUN_EXPORT PFNGLDELETEPROGRAMPROC __glewDeleteProgram; +GLEW_FUN_EXPORT PFNGLDELETESHADERPROC __glewDeleteShader; +GLEW_FUN_EXPORT PFNGLDETACHSHADERPROC __glewDetachShader; +GLEW_FUN_EXPORT PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray; +GLEW_FUN_EXPORT PFNGLDRAWBUFFERSPROC __glewDrawBuffers; +GLEW_FUN_EXPORT PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray; +GLEW_FUN_EXPORT PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib; +GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform; +GLEW_FUN_EXPORT PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders; +GLEW_FUN_EXPORT PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation; +GLEW_FUN_EXPORT PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog; +GLEW_FUN_EXPORT PFNGLGETPROGRAMIVPROC __glewGetProgramiv; +GLEW_FUN_EXPORT PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog; +GLEW_FUN_EXPORT PFNGLGETSHADERSOURCEPROC __glewGetShaderSource; +GLEW_FUN_EXPORT PFNGLGETSHADERIVPROC __glewGetShaderiv; +GLEW_FUN_EXPORT PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation; +GLEW_FUN_EXPORT PFNGLGETUNIFORMFVPROC __glewGetUniformfv; +GLEW_FUN_EXPORT PFNGLGETUNIFORMIVPROC __glewGetUniformiv; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv; +GLEW_FUN_EXPORT PFNGLISPROGRAMPROC __glewIsProgram; +GLEW_FUN_EXPORT PFNGLISSHADERPROC __glewIsShader; +GLEW_FUN_EXPORT PFNGLLINKPROGRAMPROC __glewLinkProgram; +GLEW_FUN_EXPORT PFNGLSHADERSOURCEPROC __glewShaderSource; +GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate; +GLEW_FUN_EXPORT PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate; +GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate; +GLEW_FUN_EXPORT PFNGLUNIFORM1FPROC __glewUniform1f; +GLEW_FUN_EXPORT PFNGLUNIFORM1FVPROC __glewUniform1fv; +GLEW_FUN_EXPORT PFNGLUNIFORM1IPROC __glewUniform1i; +GLEW_FUN_EXPORT PFNGLUNIFORM1IVPROC __glewUniform1iv; +GLEW_FUN_EXPORT PFNGLUNIFORM2FPROC __glewUniform2f; +GLEW_FUN_EXPORT PFNGLUNIFORM2FVPROC __glewUniform2fv; +GLEW_FUN_EXPORT PFNGLUNIFORM2IPROC __glewUniform2i; +GLEW_FUN_EXPORT PFNGLUNIFORM2IVPROC __glewUniform2iv; +GLEW_FUN_EXPORT PFNGLUNIFORM3FPROC __glewUniform3f; +GLEW_FUN_EXPORT PFNGLUNIFORM3FVPROC __glewUniform3fv; +GLEW_FUN_EXPORT PFNGLUNIFORM3IPROC __glewUniform3i; +GLEW_FUN_EXPORT PFNGLUNIFORM3IVPROC __glewUniform3iv; +GLEW_FUN_EXPORT PFNGLUNIFORM4FPROC __glewUniform4f; +GLEW_FUN_EXPORT PFNGLUNIFORM4FVPROC __glewUniform4fv; +GLEW_FUN_EXPORT PFNGLUNIFORM4IPROC __glewUniform4i; +GLEW_FUN_EXPORT PFNGLUNIFORM4IVPROC __glewUniform4iv; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv; +GLEW_FUN_EXPORT PFNGLUSEPROGRAMPROC __glewUseProgram; +GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMPROC __glewValidateProgram; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer; + +GLEW_FUN_EXPORT PFNGLTBUFFERMASK3DFXPROC __glewTbufferMask3DFX; + +GLEW_FUN_EXPORT PFNGLDRAWELEMENTARRAYAPPLEPROC __glewDrawElementArrayAPPLE; +GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC __glewDrawRangeElementArrayAPPLE; +GLEW_FUN_EXPORT PFNGLELEMENTPOINTERAPPLEPROC __glewElementPointerAPPLE; +GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC __glewMultiDrawElementArrayAPPLE; +GLEW_FUN_EXPORT PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC __glewMultiDrawRangeElementArrayAPPLE; + +GLEW_FUN_EXPORT PFNGLDELETEFENCESAPPLEPROC __glewDeleteFencesAPPLE; +GLEW_FUN_EXPORT PFNGLFINISHFENCEAPPLEPROC __glewFinishFenceAPPLE; +GLEW_FUN_EXPORT PFNGLFINISHOBJECTAPPLEPROC __glewFinishObjectAPPLE; +GLEW_FUN_EXPORT PFNGLGENFENCESAPPLEPROC __glewGenFencesAPPLE; +GLEW_FUN_EXPORT PFNGLISFENCEAPPLEPROC __glewIsFenceAPPLE; +GLEW_FUN_EXPORT PFNGLSETFENCEAPPLEPROC __glewSetFenceAPPLE; +GLEW_FUN_EXPORT PFNGLTESTFENCEAPPLEPROC __glewTestFenceAPPLE; +GLEW_FUN_EXPORT PFNGLTESTOBJECTAPPLEPROC __glewTestObjectAPPLE; + +GLEW_FUN_EXPORT PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC __glewGetTexParameterPointervAPPLE; +GLEW_FUN_EXPORT PFNGLTEXTURERANGEAPPLEPROC __glewTextureRangeAPPLE; + +GLEW_FUN_EXPORT PFNGLBINDVERTEXARRAYAPPLEPROC __glewBindVertexArrayAPPLE; +GLEW_FUN_EXPORT PFNGLDELETEVERTEXARRAYSAPPLEPROC __glewDeleteVertexArraysAPPLE; +GLEW_FUN_EXPORT PFNGLGENVERTEXARRAYSAPPLEPROC __glewGenVertexArraysAPPLE; +GLEW_FUN_EXPORT PFNGLISVERTEXARRAYAPPLEPROC __glewIsVertexArrayAPPLE; + +GLEW_FUN_EXPORT PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC __glewFlushVertexArrayRangeAPPLE; +GLEW_FUN_EXPORT PFNGLVERTEXARRAYPARAMETERIAPPLEPROC __glewVertexArrayParameteriAPPLE; +GLEW_FUN_EXPORT PFNGLVERTEXARRAYRANGEAPPLEPROC __glewVertexArrayRangeAPPLE; + +GLEW_FUN_EXPORT PFNGLCLAMPCOLORARBPROC __glewClampColorARB; + +GLEW_FUN_EXPORT PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB; + +GLEW_FUN_EXPORT PFNGLCOLORSUBTABLEPROC __glewColorSubTable; +GLEW_FUN_EXPORT PFNGLCOLORTABLEPROC __glewColorTable; +GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERFVPROC __glewColorTableParameterfv; +GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERIVPROC __glewColorTableParameteriv; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER1DPROC __glewConvolutionFilter1D; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER2DPROC __glewConvolutionFilter2D; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFPROC __glewConvolutionParameterf; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFVPROC __glewConvolutionParameterfv; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIPROC __glewConvolutionParameteri; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIVPROC __glewConvolutionParameteriv; +GLEW_FUN_EXPORT PFNGLCOPYCOLORSUBTABLEPROC __glewCopyColorSubTable; +GLEW_FUN_EXPORT PFNGLCOPYCOLORTABLEPROC __glewCopyColorTable; +GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER1DPROC __glewCopyConvolutionFilter1D; +GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER2DPROC __glewCopyConvolutionFilter2D; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPROC __glewGetColorTable; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVPROC __glewGetColorTableParameterfv; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVPROC __glewGetColorTableParameteriv; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONFILTERPROC __glewGetConvolutionFilter; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERFVPROC __glewGetConvolutionParameterfv; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERIVPROC __glewGetConvolutionParameteriv; +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPROC __glewGetHistogram; +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERFVPROC __glewGetHistogramParameterfv; +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERIVPROC __glewGetHistogramParameteriv; +GLEW_FUN_EXPORT PFNGLGETMINMAXPROC __glewGetMinmax; +GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERFVPROC __glewGetMinmaxParameterfv; +GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERIVPROC __glewGetMinmaxParameteriv; +GLEW_FUN_EXPORT PFNGLGETSEPARABLEFILTERPROC __glewGetSeparableFilter; +GLEW_FUN_EXPORT PFNGLHISTOGRAMPROC __glewHistogram; +GLEW_FUN_EXPORT PFNGLMINMAXPROC __glewMinmax; +GLEW_FUN_EXPORT PFNGLRESETHISTOGRAMPROC __glewResetHistogram; +GLEW_FUN_EXPORT PFNGLRESETMINMAXPROC __glewResetMinmax; +GLEW_FUN_EXPORT PFNGLSEPARABLEFILTER2DPROC __glewSeparableFilter2D; + +GLEW_FUN_EXPORT PFNGLCURRENTPALETTEMATRIXARBPROC __glewCurrentPaletteMatrixARB; +GLEW_FUN_EXPORT PFNGLMATRIXINDEXPOINTERARBPROC __glewMatrixIndexPointerARB; +GLEW_FUN_EXPORT PFNGLMATRIXINDEXUBVARBPROC __glewMatrixIndexubvARB; +GLEW_FUN_EXPORT PFNGLMATRIXINDEXUIVARBPROC __glewMatrixIndexuivARB; +GLEW_FUN_EXPORT PFNGLMATRIXINDEXUSVARBPROC __glewMatrixIndexusvARB; + +GLEW_FUN_EXPORT PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB; + +GLEW_FUN_EXPORT PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB; +GLEW_FUN_EXPORT PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB; + +GLEW_FUN_EXPORT PFNGLBEGINQUERYARBPROC __glewBeginQueryARB; +GLEW_FUN_EXPORT PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB; +GLEW_FUN_EXPORT PFNGLENDQUERYARBPROC __glewEndQueryARB; +GLEW_FUN_EXPORT PFNGLGENQUERIESARBPROC __glewGenQueriesARB; +GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB; +GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB; +GLEW_FUN_EXPORT PFNGLGETQUERYIVARBPROC __glewGetQueryivARB; +GLEW_FUN_EXPORT PFNGLISQUERYARBPROC __glewIsQueryARB; + +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFARBPROC __glewPointParameterfARB; +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB; + +GLEW_FUN_EXPORT PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB; +GLEW_FUN_EXPORT PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB; +GLEW_FUN_EXPORT PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB; +GLEW_FUN_EXPORT PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB; +GLEW_FUN_EXPORT PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB; +GLEW_FUN_EXPORT PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB; +GLEW_FUN_EXPORT PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB; +GLEW_FUN_EXPORT PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB; +GLEW_FUN_EXPORT PFNGLGETHANDLEARBPROC __glewGetHandleARB; +GLEW_FUN_EXPORT PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB; +GLEW_FUN_EXPORT PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB; +GLEW_FUN_EXPORT PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB; +GLEW_FUN_EXPORT PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB; +GLEW_FUN_EXPORT PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB; +GLEW_FUN_EXPORT PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB; +GLEW_FUN_EXPORT PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB; +GLEW_FUN_EXPORT PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB; +GLEW_FUN_EXPORT PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB; +GLEW_FUN_EXPORT PFNGLUNIFORM1FARBPROC __glewUniform1fARB; +GLEW_FUN_EXPORT PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORM1IARBPROC __glewUniform1iARB; +GLEW_FUN_EXPORT PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB; +GLEW_FUN_EXPORT PFNGLUNIFORM2FARBPROC __glewUniform2fARB; +GLEW_FUN_EXPORT PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORM2IARBPROC __glewUniform2iARB; +GLEW_FUN_EXPORT PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB; +GLEW_FUN_EXPORT PFNGLUNIFORM3FARBPROC __glewUniform3fARB; +GLEW_FUN_EXPORT PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORM3IARBPROC __glewUniform3iARB; +GLEW_FUN_EXPORT PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB; +GLEW_FUN_EXPORT PFNGLUNIFORM4FARBPROC __glewUniform4fARB; +GLEW_FUN_EXPORT PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORM4IARBPROC __glewUniform4iARB; +GLEW_FUN_EXPORT PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB; +GLEW_FUN_EXPORT PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB; +GLEW_FUN_EXPORT PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB; +GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB; + +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB; +GLEW_FUN_EXPORT PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB; +GLEW_FUN_EXPORT PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB; + +GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB; +GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB; +GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB; +GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXFARBPROC __glewMultTransposeMatrixfARB; + +GLEW_FUN_EXPORT PFNGLVERTEXBLENDARBPROC __glewVertexBlendARB; +GLEW_FUN_EXPORT PFNGLWEIGHTPOINTERARBPROC __glewWeightPointerARB; +GLEW_FUN_EXPORT PFNGLWEIGHTBVARBPROC __glewWeightbvARB; +GLEW_FUN_EXPORT PFNGLWEIGHTDVARBPROC __glewWeightdvARB; +GLEW_FUN_EXPORT PFNGLWEIGHTFVARBPROC __glewWeightfvARB; +GLEW_FUN_EXPORT PFNGLWEIGHTIVARBPROC __glewWeightivARB; +GLEW_FUN_EXPORT PFNGLWEIGHTSVARBPROC __glewWeightsvARB; +GLEW_FUN_EXPORT PFNGLWEIGHTUBVARBPROC __glewWeightubvARB; +GLEW_FUN_EXPORT PFNGLWEIGHTUIVARBPROC __glewWeightuivARB; +GLEW_FUN_EXPORT PFNGLWEIGHTUSVARBPROC __glewWeightusvARB; + +GLEW_FUN_EXPORT PFNGLBINDBUFFERARBPROC __glewBindBufferARB; +GLEW_FUN_EXPORT PFNGLBUFFERDATAARBPROC __glewBufferDataARB; +GLEW_FUN_EXPORT PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB; +GLEW_FUN_EXPORT PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB; +GLEW_FUN_EXPORT PFNGLGENBUFFERSARBPROC __glewGenBuffersARB; +GLEW_FUN_EXPORT PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB; +GLEW_FUN_EXPORT PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB; +GLEW_FUN_EXPORT PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB; +GLEW_FUN_EXPORT PFNGLISBUFFERARBPROC __glewIsBufferARB; +GLEW_FUN_EXPORT PFNGLMAPBUFFERARBPROC __glewMapBufferARB; +GLEW_FUN_EXPORT PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB; + +GLEW_FUN_EXPORT PFNGLBINDPROGRAMARBPROC __glewBindProgramARB; +GLEW_FUN_EXPORT PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB; +GLEW_FUN_EXPORT PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB; +GLEW_FUN_EXPORT PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB; +GLEW_FUN_EXPORT PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB; +GLEW_FUN_EXPORT PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB; +GLEW_FUN_EXPORT PFNGLISPROGRAMARBPROC __glewIsProgramARB; +GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB; +GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB; +GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB; +GLEW_FUN_EXPORT PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB; +GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB; +GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB; +GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB; +GLEW_FUN_EXPORT PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB; +GLEW_FUN_EXPORT PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB; + +GLEW_FUN_EXPORT PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB; +GLEW_FUN_EXPORT PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB; +GLEW_FUN_EXPORT PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB; + +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DARBPROC __glewWindowPos2dARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVARBPROC __glewWindowPos2dvARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FARBPROC __glewWindowPos2fARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVARBPROC __glewWindowPos2fvARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IARBPROC __glewWindowPos2iARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVARBPROC __glewWindowPos2ivARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SARBPROC __glewWindowPos2sARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVARBPROC __glewWindowPos2svARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DARBPROC __glewWindowPos3dARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVARBPROC __glewWindowPos3dvARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FARBPROC __glewWindowPos3fARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVARBPROC __glewWindowPos3fvARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IARBPROC __glewWindowPos3iARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVARBPROC __glewWindowPos3ivARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SARBPROC __glewWindowPos3sARB; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVARBPROC __glewWindowPos3svARB; + +GLEW_FUN_EXPORT PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI; + +GLEW_FUN_EXPORT PFNGLDRAWELEMENTARRAYATIPROC __glewDrawElementArrayATI; +GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTARRAYATIPROC __glewDrawRangeElementArrayATI; +GLEW_FUN_EXPORT PFNGLELEMENTPOINTERATIPROC __glewElementPointerATI; + +GLEW_FUN_EXPORT PFNGLGETTEXBUMPPARAMETERFVATIPROC __glewGetTexBumpParameterfvATI; +GLEW_FUN_EXPORT PFNGLGETTEXBUMPPARAMETERIVATIPROC __glewGetTexBumpParameterivATI; +GLEW_FUN_EXPORT PFNGLTEXBUMPPARAMETERFVATIPROC __glewTexBumpParameterfvATI; +GLEW_FUN_EXPORT PFNGLTEXBUMPPARAMETERIVATIPROC __glewTexBumpParameterivATI; + +GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI; +GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI; +GLEW_FUN_EXPORT PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI; +GLEW_FUN_EXPORT PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI; +GLEW_FUN_EXPORT PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI; +GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI; +GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI; +GLEW_FUN_EXPORT PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI; +GLEW_FUN_EXPORT PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI; +GLEW_FUN_EXPORT PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI; +GLEW_FUN_EXPORT PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI; +GLEW_FUN_EXPORT PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI; +GLEW_FUN_EXPORT PFNGLSAMPLEMAPATIPROC __glewSampleMapATI; +GLEW_FUN_EXPORT PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI; + +GLEW_FUN_EXPORT PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI; +GLEW_FUN_EXPORT PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI; + +GLEW_FUN_EXPORT PFNGLPNTRIANGLESFATIPROC __glPNTrianglewesfATI; +GLEW_FUN_EXPORT PFNGLPNTRIANGLESIATIPROC __glPNTrianglewesiATI; + +GLEW_FUN_EXPORT PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI; +GLEW_FUN_EXPORT PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI; + +GLEW_FUN_EXPORT PFNGLARRAYOBJECTATIPROC __glewArrayObjectATI; +GLEW_FUN_EXPORT PFNGLFREEOBJECTBUFFERATIPROC __glewFreeObjectBufferATI; +GLEW_FUN_EXPORT PFNGLGETARRAYOBJECTFVATIPROC __glewGetArrayObjectfvATI; +GLEW_FUN_EXPORT PFNGLGETARRAYOBJECTIVATIPROC __glewGetArrayObjectivATI; +GLEW_FUN_EXPORT PFNGLGETOBJECTBUFFERFVATIPROC __glewGetObjectBufferfvATI; +GLEW_FUN_EXPORT PFNGLGETOBJECTBUFFERIVATIPROC __glewGetObjectBufferivATI; +GLEW_FUN_EXPORT PFNGLGETVARIANTARRAYOBJECTFVATIPROC __glewGetVariantArrayObjectfvATI; +GLEW_FUN_EXPORT PFNGLGETVARIANTARRAYOBJECTIVATIPROC __glewGetVariantArrayObjectivATI; +GLEW_FUN_EXPORT PFNGLISOBJECTBUFFERATIPROC __glewIsObjectBufferATI; +GLEW_FUN_EXPORT PFNGLNEWOBJECTBUFFERATIPROC __glewNewObjectBufferATI; +GLEW_FUN_EXPORT PFNGLUPDATEOBJECTBUFFERATIPROC __glewUpdateObjectBufferATI; +GLEW_FUN_EXPORT PFNGLVARIANTARRAYOBJECTATIPROC __glewVariantArrayObjectATI; + +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC __glewGetVertexAttribArrayObjectfvATI; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC __glewGetVertexAttribArrayObjectivATI; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBARRAYOBJECTATIPROC __glewVertexAttribArrayObjectATI; + +GLEW_FUN_EXPORT PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC __glewClientActiveVertexStreamATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3BATIPROC __glewNormalStream3bATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3BVATIPROC __glewNormalStream3bvATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3DATIPROC __glewNormalStream3dATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3DVATIPROC __glewNormalStream3dvATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3FATIPROC __glewNormalStream3fATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3FVATIPROC __glewNormalStream3fvATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3IATIPROC __glewNormalStream3iATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3IVATIPROC __glewNormalStream3ivATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3SATIPROC __glewNormalStream3sATI; +GLEW_FUN_EXPORT PFNGLNORMALSTREAM3SVATIPROC __glewNormalStream3svATI; +GLEW_FUN_EXPORT PFNGLVERTEXBLENDENVFATIPROC __glewVertexBlendEnvfATI; +GLEW_FUN_EXPORT PFNGLVERTEXBLENDENVIATIPROC __glewVertexBlendEnviATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2DATIPROC __glewVertexStream2dATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2DVATIPROC __glewVertexStream2dvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2FATIPROC __glewVertexStream2fATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2FVATIPROC __glewVertexStream2fvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2IATIPROC __glewVertexStream2iATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2IVATIPROC __glewVertexStream2ivATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2SATIPROC __glewVertexStream2sATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM2SVATIPROC __glewVertexStream2svATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3DATIPROC __glewVertexStream3dATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3DVATIPROC __glewVertexStream3dvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3FATIPROC __glewVertexStream3fATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3FVATIPROC __glewVertexStream3fvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3IATIPROC __glewVertexStream3iATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3IVATIPROC __glewVertexStream3ivATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3SATIPROC __glewVertexStream3sATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM3SVATIPROC __glewVertexStream3svATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4DATIPROC __glewVertexStream4dATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4DVATIPROC __glewVertexStream4dvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4FATIPROC __glewVertexStream4fATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4FVATIPROC __glewVertexStream4fvATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4IATIPROC __glewVertexStream4iATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4IVATIPROC __glewVertexStream4ivATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4SATIPROC __glewVertexStream4sATI; +GLEW_FUN_EXPORT PFNGLVERTEXSTREAM4SVATIPROC __glewVertexStream4svATI; + +GLEW_FUN_EXPORT PFNGLBLENDCOLOREXTPROC __glewBlendColorEXT; + +GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEEXTPROC __glewBlendEquationSeparateEXT; + +GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEEXTPROC __glewBlendFuncSeparateEXT; + +GLEW_FUN_EXPORT PFNGLBLENDEQUATIONEXTPROC __glewBlendEquationEXT; + +GLEW_FUN_EXPORT PFNGLCOLORSUBTABLEEXTPROC __glewColorSubTableEXT; +GLEW_FUN_EXPORT PFNGLCOPYCOLORSUBTABLEEXTPROC __glewCopyColorSubTableEXT; + +GLEW_FUN_EXPORT PFNGLLOCKARRAYSEXTPROC __glewLockArraysEXT; +GLEW_FUN_EXPORT PFNGLUNLOCKARRAYSEXTPROC __glewUnlockArraysEXT; + +GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER1DEXTPROC __glewConvolutionFilter1DEXT; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONFILTER2DEXTPROC __glewConvolutionFilter2DEXT; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFEXTPROC __glewConvolutionParameterfEXT; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERFVEXTPROC __glewConvolutionParameterfvEXT; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIEXTPROC __glewConvolutionParameteriEXT; +GLEW_FUN_EXPORT PFNGLCONVOLUTIONPARAMETERIVEXTPROC __glewConvolutionParameterivEXT; +GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC __glewCopyConvolutionFilter1DEXT; +GLEW_FUN_EXPORT PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC __glewCopyConvolutionFilter2DEXT; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONFILTEREXTPROC __glewGetConvolutionFilterEXT; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC __glewGetConvolutionParameterfvEXT; +GLEW_FUN_EXPORT PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC __glewGetConvolutionParameterivEXT; +GLEW_FUN_EXPORT PFNGLGETSEPARABLEFILTEREXTPROC __glewGetSeparableFilterEXT; +GLEW_FUN_EXPORT PFNGLSEPARABLEFILTER2DEXTPROC __glewSeparableFilter2DEXT; + +GLEW_FUN_EXPORT PFNGLBINORMALPOINTEREXTPROC __glewBinormalPointerEXT; +GLEW_FUN_EXPORT PFNGLTANGENTPOINTEREXTPROC __glewTangentPointerEXT; + +GLEW_FUN_EXPORT PFNGLCOPYTEXIMAGE1DEXTPROC __glewCopyTexImage1DEXT; +GLEW_FUN_EXPORT PFNGLCOPYTEXIMAGE2DEXTPROC __glewCopyTexImage2DEXT; +GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE1DEXTPROC __glewCopyTexSubImage1DEXT; +GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE2DEXTPROC __glewCopyTexSubImage2DEXT; +GLEW_FUN_EXPORT PFNGLCOPYTEXSUBIMAGE3DEXTPROC __glewCopyTexSubImage3DEXT; + +GLEW_FUN_EXPORT PFNGLCULLPARAMETERDVEXTPROC __glewCullParameterdvEXT; +GLEW_FUN_EXPORT PFNGLCULLPARAMETERFVEXTPROC __glewCullParameterfvEXT; + +GLEW_FUN_EXPORT PFNGLDEPTHBOUNDSEXTPROC __glewDepthBoundsEXT; + +GLEW_FUN_EXPORT PFNGLDRAWRANGEELEMENTSEXTPROC __glewDrawRangeElementsEXT; + +GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTEREXTPROC __glewFogCoordPointerEXT; +GLEW_FUN_EXPORT PFNGLFOGCOORDDEXTPROC __glewFogCoorddEXT; +GLEW_FUN_EXPORT PFNGLFOGCOORDDVEXTPROC __glewFogCoorddvEXT; +GLEW_FUN_EXPORT PFNGLFOGCOORDFEXTPROC __glewFogCoordfEXT; +GLEW_FUN_EXPORT PFNGLFOGCOORDFVEXTPROC __glewFogCoordfvEXT; + +GLEW_FUN_EXPORT PFNGLFRAGMENTCOLORMATERIALEXTPROC __glewFragmentColorMaterialEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFEXTPROC __glewFragmentLightModelfEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFVEXTPROC __glewFragmentLightModelfvEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIEXTPROC __glewFragmentLightModeliEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIVEXTPROC __glewFragmentLightModelivEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFEXTPROC __glewFragmentLightfEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFVEXTPROC __glewFragmentLightfvEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIEXTPROC __glewFragmentLightiEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIVEXTPROC __glewFragmentLightivEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFEXTPROC __glewFragmentMaterialfEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFVEXTPROC __glewFragmentMaterialfvEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIEXTPROC __glewFragmentMaterialiEXT; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIVEXTPROC __glewFragmentMaterialivEXT; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTFVEXTPROC __glewGetFragmentLightfvEXT; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTIVEXTPROC __glewGetFragmentLightivEXT; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALFVEXTPROC __glewGetFragmentMaterialfvEXT; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALIVEXTPROC __glewGetFragmentMaterialivEXT; +GLEW_FUN_EXPORT PFNGLLIGHTENVIEXTPROC __glewLightEnviEXT; + +GLEW_FUN_EXPORT PFNGLBLITFRAMEBUFFEREXTPROC __glewBlitFramebufferEXT; + +GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewRenderbufferStorageMultisampleEXT; + +GLEW_FUN_EXPORT PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT; +GLEW_FUN_EXPORT PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT; +GLEW_FUN_EXPORT PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT; +GLEW_FUN_EXPORT PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT; +GLEW_FUN_EXPORT PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT; +GLEW_FUN_EXPORT PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT; +GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT; +GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT; +GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT; +GLEW_FUN_EXPORT PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT; +GLEW_FUN_EXPORT PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT; +GLEW_FUN_EXPORT PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT; +GLEW_FUN_EXPORT PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT; +GLEW_FUN_EXPORT PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT; +GLEW_FUN_EXPORT PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT; +GLEW_FUN_EXPORT PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT; +GLEW_FUN_EXPORT PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT; + +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMEXTPROC __glewGetHistogramEXT; +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERFVEXTPROC __glewGetHistogramParameterfvEXT; +GLEW_FUN_EXPORT PFNGLGETHISTOGRAMPARAMETERIVEXTPROC __glewGetHistogramParameterivEXT; +GLEW_FUN_EXPORT PFNGLGETMINMAXEXTPROC __glewGetMinmaxEXT; +GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERFVEXTPROC __glewGetMinmaxParameterfvEXT; +GLEW_FUN_EXPORT PFNGLGETMINMAXPARAMETERIVEXTPROC __glewGetMinmaxParameterivEXT; +GLEW_FUN_EXPORT PFNGLHISTOGRAMEXTPROC __glewHistogramEXT; +GLEW_FUN_EXPORT PFNGLMINMAXEXTPROC __glewMinmaxEXT; +GLEW_FUN_EXPORT PFNGLRESETHISTOGRAMEXTPROC __glewResetHistogramEXT; +GLEW_FUN_EXPORT PFNGLRESETMINMAXEXTPROC __glewResetMinmaxEXT; + +GLEW_FUN_EXPORT PFNGLINDEXFUNCEXTPROC __glewIndexFuncEXT; + +GLEW_FUN_EXPORT PFNGLINDEXMATERIALEXTPROC __glewIndexMaterialEXT; + +GLEW_FUN_EXPORT PFNGLAPPLYTEXTUREEXTPROC __glewApplyTextureEXT; +GLEW_FUN_EXPORT PFNGLTEXTURELIGHTEXTPROC __glewTextureLightEXT; +GLEW_FUN_EXPORT PFNGLTEXTUREMATERIALEXTPROC __glewTextureMaterialEXT; + +GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSEXTPROC __glewMultiDrawArraysEXT; +GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSEXTPROC __glewMultiDrawElementsEXT; + +GLEW_FUN_EXPORT PFNGLSAMPLEMASKEXTPROC __glewSampleMaskEXT; +GLEW_FUN_EXPORT PFNGLSAMPLEPATTERNEXTPROC __glewSamplePatternEXT; + +GLEW_FUN_EXPORT PFNGLCOLORTABLEEXTPROC __glewColorTableEXT; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEEXTPROC __glewGetColorTableEXT; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVEXTPROC __glewGetColorTableParameterfvEXT; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVEXTPROC __glewGetColorTableParameterivEXT; + +GLEW_FUN_EXPORT PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC __glewGetPixelTransformParameterfvEXT; +GLEW_FUN_EXPORT PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC __glewGetPixelTransformParameterivEXT; +GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERFEXTPROC __glewPixelTransformParameterfEXT; +GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC __glewPixelTransformParameterfvEXT; +GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERIEXTPROC __glewPixelTransformParameteriEXT; +GLEW_FUN_EXPORT PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC __glewPixelTransformParameterivEXT; + +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFEXTPROC __glewPointParameterfEXT; +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVEXTPROC __glewPointParameterfvEXT; + +GLEW_FUN_EXPORT PFNGLPOLYGONOFFSETEXTPROC __glewPolygonOffsetEXT; + +GLEW_FUN_EXPORT PFNGLBEGINSCENEEXTPROC __glewBeginSceneEXT; +GLEW_FUN_EXPORT PFNGLENDSCENEEXTPROC __glewEndSceneEXT; + +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT; + +GLEW_FUN_EXPORT PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT; + +GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE1DEXTPROC __glewTexSubImage1DEXT; +GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE2DEXTPROC __glewTexSubImage2DEXT; +GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE3DEXTPROC __glewTexSubImage3DEXT; + +GLEW_FUN_EXPORT PFNGLTEXIMAGE3DEXTPROC __glewTexImage3DEXT; + +GLEW_FUN_EXPORT PFNGLARETEXTURESRESIDENTEXTPROC __glewAreTexturesResidentEXT; +GLEW_FUN_EXPORT PFNGLBINDTEXTUREEXTPROC __glewBindTextureEXT; +GLEW_FUN_EXPORT PFNGLDELETETEXTURESEXTPROC __glewDeleteTexturesEXT; +GLEW_FUN_EXPORT PFNGLGENTEXTURESEXTPROC __glewGenTexturesEXT; +GLEW_FUN_EXPORT PFNGLISTEXTUREEXTPROC __glewIsTextureEXT; +GLEW_FUN_EXPORT PFNGLPRIORITIZETEXTURESEXTPROC __glewPrioritizeTexturesEXT; + +GLEW_FUN_EXPORT PFNGLTEXTURENORMALEXTPROC __glewTextureNormalEXT; + +GLEW_FUN_EXPORT PFNGLARRAYELEMENTEXTPROC __glewArrayElementEXT; +GLEW_FUN_EXPORT PFNGLCOLORPOINTEREXTPROC __glewColorPointerEXT; +GLEW_FUN_EXPORT PFNGLDRAWARRAYSEXTPROC __glewDrawArraysEXT; +GLEW_FUN_EXPORT PFNGLEDGEFLAGPOINTEREXTPROC __glewEdgeFlagPointerEXT; +GLEW_FUN_EXPORT PFNGLGETPOINTERVEXTPROC __glewGetPointervEXT; +GLEW_FUN_EXPORT PFNGLINDEXPOINTEREXTPROC __glewIndexPointerEXT; +GLEW_FUN_EXPORT PFNGLNORMALPOINTEREXTPROC __glewNormalPointerEXT; +GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTEREXTPROC __glewTexCoordPointerEXT; +GLEW_FUN_EXPORT PFNGLVERTEXPOINTEREXTPROC __glewVertexPointerEXT; + +GLEW_FUN_EXPORT PFNGLBEGINVERTEXSHADEREXTPROC __glewBeginVertexShaderEXT; +GLEW_FUN_EXPORT PFNGLBINDLIGHTPARAMETEREXTPROC __glewBindLightParameterEXT; +GLEW_FUN_EXPORT PFNGLBINDMATERIALPARAMETEREXTPROC __glewBindMaterialParameterEXT; +GLEW_FUN_EXPORT PFNGLBINDPARAMETEREXTPROC __glewBindParameterEXT; +GLEW_FUN_EXPORT PFNGLBINDTEXGENPARAMETEREXTPROC __glewBindTexGenParameterEXT; +GLEW_FUN_EXPORT PFNGLBINDTEXTUREUNITPARAMETEREXTPROC __glewBindTextureUnitParameterEXT; +GLEW_FUN_EXPORT PFNGLBINDVERTEXSHADEREXTPROC __glewBindVertexShaderEXT; +GLEW_FUN_EXPORT PFNGLDELETEVERTEXSHADEREXTPROC __glewDeleteVertexShaderEXT; +GLEW_FUN_EXPORT PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC __glewDisableVariantClientStateEXT; +GLEW_FUN_EXPORT PFNGLENABLEVARIANTCLIENTSTATEEXTPROC __glewEnableVariantClientStateEXT; +GLEW_FUN_EXPORT PFNGLENDVERTEXSHADEREXTPROC __glewEndVertexShaderEXT; +GLEW_FUN_EXPORT PFNGLEXTRACTCOMPONENTEXTPROC __glewExtractComponentEXT; +GLEW_FUN_EXPORT PFNGLGENSYMBOLSEXTPROC __glewGenSymbolsEXT; +GLEW_FUN_EXPORT PFNGLGENVERTEXSHADERSEXTPROC __glewGenVertexShadersEXT; +GLEW_FUN_EXPORT PFNGLGETINVARIANTBOOLEANVEXTPROC __glewGetInvariantBooleanvEXT; +GLEW_FUN_EXPORT PFNGLGETINVARIANTFLOATVEXTPROC __glewGetInvariantFloatvEXT; +GLEW_FUN_EXPORT PFNGLGETINVARIANTINTEGERVEXTPROC __glewGetInvariantIntegervEXT; +GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC __glewGetLocalConstantBooleanvEXT; +GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTFLOATVEXTPROC __glewGetLocalConstantFloatvEXT; +GLEW_FUN_EXPORT PFNGLGETLOCALCONSTANTINTEGERVEXTPROC __glewGetLocalConstantIntegervEXT; +GLEW_FUN_EXPORT PFNGLGETVARIANTBOOLEANVEXTPROC __glewGetVariantBooleanvEXT; +GLEW_FUN_EXPORT PFNGLGETVARIANTFLOATVEXTPROC __glewGetVariantFloatvEXT; +GLEW_FUN_EXPORT PFNGLGETVARIANTINTEGERVEXTPROC __glewGetVariantIntegervEXT; +GLEW_FUN_EXPORT PFNGLGETVARIANTPOINTERVEXTPROC __glewGetVariantPointervEXT; +GLEW_FUN_EXPORT PFNGLINSERTCOMPONENTEXTPROC __glewInsertComponentEXT; +GLEW_FUN_EXPORT PFNGLISVARIANTENABLEDEXTPROC __glewIsVariantEnabledEXT; +GLEW_FUN_EXPORT PFNGLSETINVARIANTEXTPROC __glewSetInvariantEXT; +GLEW_FUN_EXPORT PFNGLSETLOCALCONSTANTEXTPROC __glewSetLocalConstantEXT; +GLEW_FUN_EXPORT PFNGLSHADEROP1EXTPROC __glewShaderOp1EXT; +GLEW_FUN_EXPORT PFNGLSHADEROP2EXTPROC __glewShaderOp2EXT; +GLEW_FUN_EXPORT PFNGLSHADEROP3EXTPROC __glewShaderOp3EXT; +GLEW_FUN_EXPORT PFNGLSWIZZLEEXTPROC __glewSwizzleEXT; +GLEW_FUN_EXPORT PFNGLVARIANTPOINTEREXTPROC __glewVariantPointerEXT; +GLEW_FUN_EXPORT PFNGLVARIANTBVEXTPROC __glewVariantbvEXT; +GLEW_FUN_EXPORT PFNGLVARIANTDVEXTPROC __glewVariantdvEXT; +GLEW_FUN_EXPORT PFNGLVARIANTFVEXTPROC __glewVariantfvEXT; +GLEW_FUN_EXPORT PFNGLVARIANTIVEXTPROC __glewVariantivEXT; +GLEW_FUN_EXPORT PFNGLVARIANTSVEXTPROC __glewVariantsvEXT; +GLEW_FUN_EXPORT PFNGLVARIANTUBVEXTPROC __glewVariantubvEXT; +GLEW_FUN_EXPORT PFNGLVARIANTUIVEXTPROC __glewVariantuivEXT; +GLEW_FUN_EXPORT PFNGLVARIANTUSVEXTPROC __glewVariantusvEXT; +GLEW_FUN_EXPORT PFNGLWRITEMASKEXTPROC __glewWriteMaskEXT; + +GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTPOINTEREXTPROC __glewVertexWeightPointerEXT; +GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTFEXTPROC __glewVertexWeightfEXT; +GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTFVEXTPROC __glewVertexWeightfvEXT; + +GLEW_FUN_EXPORT PFNGLSTRINGMARKERGREMEDYPROC __glewStringMarkerGREMEDY; + +GLEW_FUN_EXPORT PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC __glewGetImageTransformParameterfvHP; +GLEW_FUN_EXPORT PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC __glewGetImageTransformParameterivHP; +GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERFHPPROC __glewImageTransformParameterfHP; +GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERFVHPPROC __glewImageTransformParameterfvHP; +GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERIHPPROC __glewImageTransformParameteriHP; +GLEW_FUN_EXPORT PFNGLIMAGETRANSFORMPARAMETERIVHPPROC __glewImageTransformParameterivHP; + +GLEW_FUN_EXPORT PFNGLMULTIMODEDRAWARRAYSIBMPROC __glewMultiModeDrawArraysIBM; +GLEW_FUN_EXPORT PFNGLMULTIMODEDRAWELEMENTSIBMPROC __glewMultiModeDrawElementsIBM; + +GLEW_FUN_EXPORT PFNGLCOLORPOINTERLISTIBMPROC __glewColorPointerListIBM; +GLEW_FUN_EXPORT PFNGLEDGEFLAGPOINTERLISTIBMPROC __glewEdgeFlagPointerListIBM; +GLEW_FUN_EXPORT PFNGLFOGCOORDPOINTERLISTIBMPROC __glewFogCoordPointerListIBM; +GLEW_FUN_EXPORT PFNGLINDEXPOINTERLISTIBMPROC __glewIndexPointerListIBM; +GLEW_FUN_EXPORT PFNGLNORMALPOINTERLISTIBMPROC __glewNormalPointerListIBM; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLORPOINTERLISTIBMPROC __glewSecondaryColorPointerListIBM; +GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTERLISTIBMPROC __glewTexCoordPointerListIBM; +GLEW_FUN_EXPORT PFNGLVERTEXPOINTERLISTIBMPROC __glewVertexPointerListIBM; + +GLEW_FUN_EXPORT PFNGLCOLORPOINTERVINTELPROC __glewColorPointervINTEL; +GLEW_FUN_EXPORT PFNGLNORMALPOINTERVINTELPROC __glewNormalPointervINTEL; +GLEW_FUN_EXPORT PFNGLTEXCOORDPOINTERVINTELPROC __glewTexCoordPointervINTEL; +GLEW_FUN_EXPORT PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL; + +GLEW_FUN_EXPORT PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL; +GLEW_FUN_EXPORT PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL; + +GLEW_FUN_EXPORT PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT; +GLEW_FUN_EXPORT PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT; +GLEW_FUN_EXPORT PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT; +GLEW_FUN_EXPORT PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT; +GLEW_FUN_EXPORT PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT; + +GLEW_FUN_EXPORT PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA; + +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DMESAPROC __glewWindowPos2dMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2DVMESAPROC __glewWindowPos2dvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FMESAPROC __glewWindowPos2fMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2FVMESAPROC __glewWindowPos2fvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IMESAPROC __glewWindowPos2iMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2IVMESAPROC __glewWindowPos2ivMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SMESAPROC __glewWindowPos2sMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS2SVMESAPROC __glewWindowPos2svMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DMESAPROC __glewWindowPos3dMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3DVMESAPROC __glewWindowPos3dvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FMESAPROC __glewWindowPos3fMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3FVMESAPROC __glewWindowPos3fvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IMESAPROC __glewWindowPos3iMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3IVMESAPROC __glewWindowPos3ivMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SMESAPROC __glewWindowPos3sMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS3SVMESAPROC __glewWindowPos3svMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4DMESAPROC __glewWindowPos4dMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4DVMESAPROC __glewWindowPos4dvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4FMESAPROC __glewWindowPos4fMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4FVMESAPROC __glewWindowPos4fvMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4IMESAPROC __glewWindowPos4iMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4IVMESAPROC __glewWindowPos4ivMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4SMESAPROC __glewWindowPos4sMESA; +GLEW_FUN_EXPORT PFNGLWINDOWPOS4SVMESAPROC __glewWindowPos4svMESA; + +GLEW_FUN_EXPORT PFNGLEVALMAPSNVPROC __glewEvalMapsNV; +GLEW_FUN_EXPORT PFNGLGETMAPATTRIBPARAMETERFVNVPROC __glewGetMapAttribParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETMAPATTRIBPARAMETERIVNVPROC __glewGetMapAttribParameterivNV; +GLEW_FUN_EXPORT PFNGLGETMAPCONTROLPOINTSNVPROC __glewGetMapControlPointsNV; +GLEW_FUN_EXPORT PFNGLGETMAPPARAMETERFVNVPROC __glewGetMapParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETMAPPARAMETERIVNVPROC __glewGetMapParameterivNV; +GLEW_FUN_EXPORT PFNGLMAPCONTROLPOINTSNVPROC __glewMapControlPointsNV; +GLEW_FUN_EXPORT PFNGLMAPPARAMETERFVNVPROC __glewMapParameterfvNV; +GLEW_FUN_EXPORT PFNGLMAPPARAMETERIVNVPROC __glewMapParameterivNV; + +GLEW_FUN_EXPORT PFNGLDELETEFENCESNVPROC __glewDeleteFencesNV; +GLEW_FUN_EXPORT PFNGLFINISHFENCENVPROC __glewFinishFenceNV; +GLEW_FUN_EXPORT PFNGLGENFENCESNVPROC __glewGenFencesNV; +GLEW_FUN_EXPORT PFNGLGETFENCEIVNVPROC __glewGetFenceivNV; +GLEW_FUN_EXPORT PFNGLISFENCENVPROC __glewIsFenceNV; +GLEW_FUN_EXPORT PFNGLSETFENCENVPROC __glewSetFenceNV; +GLEW_FUN_EXPORT PFNGLTESTFENCENVPROC __glewTestFenceNV; + +GLEW_FUN_EXPORT PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV; +GLEW_FUN_EXPORT PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV; +GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV; +GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV; +GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV; +GLEW_FUN_EXPORT PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV; + +GLEW_FUN_EXPORT PFNGLCOLOR3HNVPROC __glewColor3hNV; +GLEW_FUN_EXPORT PFNGLCOLOR3HVNVPROC __glewColor3hvNV; +GLEW_FUN_EXPORT PFNGLCOLOR4HNVPROC __glewColor4hNV; +GLEW_FUN_EXPORT PFNGLCOLOR4HVNVPROC __glewColor4hvNV; +GLEW_FUN_EXPORT PFNGLFOGCOORDHNVPROC __glewFogCoordhNV; +GLEW_FUN_EXPORT PFNGLFOGCOORDHVNVPROC __glewFogCoordhvNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1HNVPROC __glewMultiTexCoord1hNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD1HVNVPROC __glewMultiTexCoord1hvNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2HNVPROC __glewMultiTexCoord2hNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD2HVNVPROC __glewMultiTexCoord2hvNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3HNVPROC __glewMultiTexCoord3hNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD3HVNVPROC __glewMultiTexCoord3hvNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4HNVPROC __glewMultiTexCoord4hNV; +GLEW_FUN_EXPORT PFNGLMULTITEXCOORD4HVNVPROC __glewMultiTexCoord4hvNV; +GLEW_FUN_EXPORT PFNGLNORMAL3HNVPROC __glewNormal3hNV; +GLEW_FUN_EXPORT PFNGLNORMAL3HVNVPROC __glewNormal3hvNV; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3HNVPROC __glewSecondaryColor3hNV; +GLEW_FUN_EXPORT PFNGLSECONDARYCOLOR3HVNVPROC __glewSecondaryColor3hvNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD1HNVPROC __glewTexCoord1hNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD1HVNVPROC __glewTexCoord1hvNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD2HNVPROC __glewTexCoord2hNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD2HVNVPROC __glewTexCoord2hvNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD3HNVPROC __glewTexCoord3hNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD3HVNVPROC __glewTexCoord3hvNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD4HNVPROC __glewTexCoord4hNV; +GLEW_FUN_EXPORT PFNGLTEXCOORD4HVNVPROC __glewTexCoord4hvNV; +GLEW_FUN_EXPORT PFNGLVERTEX2HNVPROC __glewVertex2hNV; +GLEW_FUN_EXPORT PFNGLVERTEX2HVNVPROC __glewVertex2hvNV; +GLEW_FUN_EXPORT PFNGLVERTEX3HNVPROC __glewVertex3hNV; +GLEW_FUN_EXPORT PFNGLVERTEX3HVNVPROC __glewVertex3hvNV; +GLEW_FUN_EXPORT PFNGLVERTEX4HNVPROC __glewVertex4hNV; +GLEW_FUN_EXPORT PFNGLVERTEX4HVNVPROC __glewVertex4hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1HNVPROC __glewVertexAttrib1hNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1HVNVPROC __glewVertexAttrib1hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2HNVPROC __glewVertexAttrib2hNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2HVNVPROC __glewVertexAttrib2hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3HNVPROC __glewVertexAttrib3hNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3HVNVPROC __glewVertexAttrib3hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4HNVPROC __glewVertexAttrib4hNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4HVNVPROC __glewVertexAttrib4hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1HVNVPROC __glewVertexAttribs1hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2HVNVPROC __glewVertexAttribs2hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3HVNVPROC __glewVertexAttribs3hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4HVNVPROC __glewVertexAttribs4hvNV; +GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTHNVPROC __glewVertexWeighthNV; +GLEW_FUN_EXPORT PFNGLVERTEXWEIGHTHVNVPROC __glewVertexWeighthvNV; + +GLEW_FUN_EXPORT PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV; +GLEW_FUN_EXPORT PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV; +GLEW_FUN_EXPORT PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV; +GLEW_FUN_EXPORT PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV; +GLEW_FUN_EXPORT PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV; +GLEW_FUN_EXPORT PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV; +GLEW_FUN_EXPORT PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV; + +GLEW_FUN_EXPORT PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV; +GLEW_FUN_EXPORT PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV; + +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERINVPROC __glewPointParameteriNV; +GLEW_FUN_EXPORT PFNGLPOINTPARAMETERIVNVPROC __glewPointParameterivNV; + +GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV; +GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV; + +GLEW_FUN_EXPORT PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV; +GLEW_FUN_EXPORT PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV; +GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV; +GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV; +GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV; +GLEW_FUN_EXPORT PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV; +GLEW_FUN_EXPORT PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV; +GLEW_FUN_EXPORT PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV; +GLEW_FUN_EXPORT PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV; +GLEW_FUN_EXPORT PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV; + +GLEW_FUN_EXPORT PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV; + +GLEW_FUN_EXPORT PFNGLFLUSHVERTEXARRAYRANGENVPROC __glewFlushVertexArrayRangeNV; +GLEW_FUN_EXPORT PFNGLVERTEXARRAYRANGENVPROC __glewVertexArrayRangeNV; + +GLEW_FUN_EXPORT PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV; +GLEW_FUN_EXPORT PFNGLBINDPROGRAMNVPROC __glewBindProgramNV; +GLEW_FUN_EXPORT PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV; +GLEW_FUN_EXPORT PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV; +GLEW_FUN_EXPORT PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV; +GLEW_FUN_EXPORT PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV; +GLEW_FUN_EXPORT PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV; +GLEW_FUN_EXPORT PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV; +GLEW_FUN_EXPORT PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV; +GLEW_FUN_EXPORT PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV; +GLEW_FUN_EXPORT PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV; +GLEW_FUN_EXPORT PFNGLISPROGRAMNVPROC __glewIsProgramNV; +GLEW_FUN_EXPORT PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV; +GLEW_FUN_EXPORT PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV; +GLEW_FUN_EXPORT PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV; +GLEW_FUN_EXPORT PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV; +GLEW_FUN_EXPORT PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV; + +GLEW_FUN_EXPORT PFNGLDETAILTEXFUNCSGISPROC __glewDetailTexFuncSGIS; +GLEW_FUN_EXPORT PFNGLGETDETAILTEXFUNCSGISPROC __glewGetDetailTexFuncSGIS; + +GLEW_FUN_EXPORT PFNGLFOGFUNCSGISPROC __glewFogFuncSGIS; +GLEW_FUN_EXPORT PFNGLGETFOGFUNCSGISPROC __glewGetFogFuncSGIS; + +GLEW_FUN_EXPORT PFNGLSAMPLEMASKSGISPROC __glewSampleMaskSGIS; +GLEW_FUN_EXPORT PFNGLSAMPLEPATTERNSGISPROC __glewSamplePatternSGIS; + +GLEW_FUN_EXPORT PFNGLGETSHARPENTEXFUNCSGISPROC __glewGetSharpenTexFuncSGIS; +GLEW_FUN_EXPORT PFNGLSHARPENTEXFUNCSGISPROC __glewSharpenTexFuncSGIS; + +GLEW_FUN_EXPORT PFNGLTEXIMAGE4DSGISPROC __glewTexImage4DSGIS; +GLEW_FUN_EXPORT PFNGLTEXSUBIMAGE4DSGISPROC __glewTexSubImage4DSGIS; + +GLEW_FUN_EXPORT PFNGLGETTEXFILTERFUNCSGISPROC __glewGetTexFilterFuncSGIS; +GLEW_FUN_EXPORT PFNGLTEXFILTERFUNCSGISPROC __glewTexFilterFuncSGIS; + +GLEW_FUN_EXPORT PFNGLASYNCMARKERSGIXPROC __glewAsyncMarkerSGIX; +GLEW_FUN_EXPORT PFNGLDELETEASYNCMARKERSSGIXPROC __glewDeleteAsyncMarkersSGIX; +GLEW_FUN_EXPORT PFNGLFINISHASYNCSGIXPROC __glewFinishAsyncSGIX; +GLEW_FUN_EXPORT PFNGLGENASYNCMARKERSSGIXPROC __glewGenAsyncMarkersSGIX; +GLEW_FUN_EXPORT PFNGLISASYNCMARKERSGIXPROC __glewIsAsyncMarkerSGIX; +GLEW_FUN_EXPORT PFNGLPOLLASYNCSGIXPROC __glewPollAsyncSGIX; + +GLEW_FUN_EXPORT PFNGLFLUSHRASTERSGIXPROC __glewFlushRasterSGIX; + +GLEW_FUN_EXPORT PFNGLTEXTUREFOGSGIXPROC __glewTextureFogSGIX; + +#if 0 +GLEW_FUN_EXPORT PFNGLFRAGMENTCOLORMATERIALSGIXPROC __glewFragmentColorMaterialSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFSGIXPROC __glewFragmentLightModelfSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELFVSGIXPROC __glewFragmentLightModelfvSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELISGIXPROC __glewFragmentLightModeliSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTMODELIVSGIXPROC __glewFragmentLightModelivSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFSGIXPROC __glewFragmentLightfSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTFVSGIXPROC __glewFragmentLightfvSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTISGIXPROC __glewFragmentLightiSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTLIGHTIVSGIXPROC __glewFragmentLightivSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFSGIXPROC __glewFragmentMaterialfSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALFVSGIXPROC __glewFragmentMaterialfvSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALISGIXPROC __glewFragmentMaterialiSGIX; +GLEW_FUN_EXPORT PFNGLFRAGMENTMATERIALIVSGIXPROC __glewFragmentMaterialivSGIX; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTFVSGIXPROC __glewGetFragmentLightfvSGIX; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTLIGHTIVSGIXPROC __glewGetFragmentLightivSGIX; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALFVSGIXPROC __glewGetFragmentMaterialfvSGIX; +GLEW_FUN_EXPORT PFNGLGETFRAGMENTMATERIALIVSGIXPROC __glewGetFragmentMaterialivSGIX; +#endif + +GLEW_FUN_EXPORT PFNGLFRAMEZOOMSGIXPROC __glewFrameZoomSGIX; + +GLEW_FUN_EXPORT PFNGLPIXELTEXGENSGIXPROC __glewPixelTexGenSGIX; + +GLEW_FUN_EXPORT PFNGLREFERENCEPLANESGIXPROC __glewReferencePlaneSGIX; + +GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERFSGIXPROC __glewSpriteParameterfSGIX; +GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERFVSGIXPROC __glewSpriteParameterfvSGIX; +GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERISGIXPROC __glewSpriteParameteriSGIX; +GLEW_FUN_EXPORT PFNGLSPRITEPARAMETERIVSGIXPROC __glewSpriteParameterivSGIX; + +GLEW_FUN_EXPORT PFNGLTAGSAMPLEBUFFERSGIXPROC __glewTagSampleBufferSGIX; + +GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERFVSGIPROC __glewColorTableParameterfvSGI; +GLEW_FUN_EXPORT PFNGLCOLORTABLEPARAMETERIVSGIPROC __glewColorTableParameterivSGI; +GLEW_FUN_EXPORT PFNGLCOLORTABLESGIPROC __glewColorTableSGI; +GLEW_FUN_EXPORT PFNGLCOPYCOLORTABLESGIPROC __glewCopyColorTableSGI; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERFVSGIPROC __glewGetColorTableParameterfvSGI; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLEPARAMETERIVSGIPROC __glewGetColorTableParameterivSGI; +GLEW_FUN_EXPORT PFNGLGETCOLORTABLESGIPROC __glewGetColorTableSGI; + +GLEW_FUN_EXPORT PFNGLFINISHTEXTURESUNXPROC __glewFinishTextureSUNX; + +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORBSUNPROC __glewGlobalAlphaFactorbSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORDSUNPROC __glewGlobalAlphaFactordSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORFSUNPROC __glewGlobalAlphaFactorfSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORISUNPROC __glewGlobalAlphaFactoriSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORSSUNPROC __glewGlobalAlphaFactorsSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUBSUNPROC __glewGlobalAlphaFactorubSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUISUNPROC __glewGlobalAlphaFactoruiSUN; +GLEW_FUN_EXPORT PFNGLGLOBALALPHAFACTORUSSUNPROC __glewGlobalAlphaFactorusSUN; + +GLEW_FUN_EXPORT PFNGLREADVIDEOPIXELSSUNPROC __glewReadVideoPixelsSUN; + +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEPOINTERSUNPROC __glewReplacementCodePointerSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUBSUNPROC __glewReplacementCodeubSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUBVSUNPROC __glewReplacementCodeubvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUISUNPROC __glewReplacementCodeuiSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVSUNPROC __glewReplacementCodeuivSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUSSUNPROC __glewReplacementCodeusSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUSVSUNPROC __glewReplacementCodeusvSUN; + +GLEW_FUN_EXPORT PFNGLCOLOR3FVERTEX3FSUNPROC __glewColor3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLCOLOR3FVERTEX3FVSUNPROC __glewColor3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewColor4fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewColor4fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX2FSUNPROC __glewColor4ubVertex2fSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX2FVSUNPROC __glewColor4ubVertex2fvSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX3FSUNPROC __glewColor4ubVertex3fSUN; +GLEW_FUN_EXPORT PFNGLCOLOR4UBVERTEX3FVSUNPROC __glewColor4ubVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLNORMAL3FVERTEX3FSUNPROC __glewNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLNORMAL3FVERTEX3FVSUNPROC __glewNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC __glewReplacementCodeuiColor3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC __glewReplacementCodeuiColor4ubVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC __glewReplacementCodeuiColor4ubVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC __glewReplacementCodeuiVertex3fSUN; +GLEW_FUN_EXPORT PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC __glewReplacementCodeuiVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC __glewTexCoord2fColor3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC __glewTexCoord2fColor3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC __glewTexCoord2fColor4ubVertex3fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC __glewTexCoord2fColor4ubVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fNormal3fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fNormal3fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FVERTEX3FSUNPROC __glewTexCoord2fVertex3fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD2FVERTEX3FVSUNPROC __glewTexCoord2fVertex3fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fvSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD4FVERTEX4FSUNPROC __glewTexCoord4fVertex4fSUN; +GLEW_FUN_EXPORT PFNGLTEXCOORD4FVERTEX4FVSUNPROC __glewTexCoord4fVertex4fvSUN; + +GLEW_FUN_EXPORT PFNGLADDSWAPHINTRECTWINPROC __glewAddSwapHintRectWIN; + +#if defined(GLEW_MX) && !defined(_WIN32) +struct GLEWContextStruct +{ +#endif /* GLEW_MX */ + +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1; +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2; +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_3; +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_4; +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_5; +GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_2_0; +GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_multisample; +GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_tbuffer; +GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_texture_compression_FXT1; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_client_storage; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_element_array; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_fence; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_float_pixels; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_pixel_buffer; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_specular_vector; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_texture_range; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_transform_hint; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_array_object; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_array_range; +GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_ycbcr_422; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_color_buffer_float; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_draw_buffers; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_program; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_program_shadow; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_fragment_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_half_float_pixel; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_imaging; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_matrix_palette; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multisample; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multitexture; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_occlusion_query; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_pixel_buffer_object; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_point_parameters; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_point_sprite; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_objects; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_100; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow_ambient; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_border_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_compression; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_cube_map; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_add; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_combine; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_crossbar; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_env_dot3; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_float; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_mirrored_repeat; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_non_power_of_two; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rectangle; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transpose_matrix; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_blend; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_buffer_object; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_program; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_ARB_window_pos; +GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_point_sprites; +GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_texture_env_combine3; +GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_texture_env_route; +GLEW_VAR_EXPORT GLboolean __GLEW_ATIX_vertex_shader_output_point_size; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_draw_buffers; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_element_array; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_envmap_bumpmap; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_fragment_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_map_object_buffer; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_pn_triangles; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_separate_stencil; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_text_fragment_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_compression_3dc; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_env_combine3; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_float; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_texture_mirror_once; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_array_object; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_attrib_array_object; +GLEW_VAR_EXPORT GLboolean __GLEW_ATI_vertex_streams; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_422_pixels; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_Cg_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_abgr; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_bgra; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_color; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_equation_separate; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_func_separate; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_logic_op; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_minmax; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_blend_subtract; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_clip_volume_hint; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_cmyka; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_color_subtable; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_compiled_vertex_array; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_convolution; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_coordinate_frame; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_copy_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_cull_vertex; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_depth_bounds_test; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_draw_range_elements; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fog_coord; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fragment_lighting; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_blit; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_multisample; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_object; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_histogram; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_array_formats; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_func; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_material; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_index_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_light_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_misc_attribute; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_multi_draw_arrays; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_multisample; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_packed_depth_stencil; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_packed_pixels; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_paletted_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_buffer_object; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_transform; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_pixel_transform_color_table; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_point_parameters; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_polygon_offset; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_rescale_normal; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_scene_marker; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_secondary_color; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_separate_specular_color; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shadow_funcs; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_shared_texture_palette; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_clear_tag; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_two_side; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_stencil_wrap; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_subtexture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture3D; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_dxt1; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_compression_s3tc; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_cube_map; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_edge_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_add; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_combine; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_env_dot3; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_filter_anisotropic; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_lod_bias; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_mirror_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_object; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_perturb_normal; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_rectangle; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_texture_sRGB; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_array; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_EXT_vertex_weighting; +GLEW_VAR_EXPORT GLboolean __GLEW_GREMEDY_string_marker; +GLEW_VAR_EXPORT GLboolean __GLEW_HP_convolution_border_modes; +GLEW_VAR_EXPORT GLboolean __GLEW_HP_image_transform; +GLEW_VAR_EXPORT GLboolean __GLEW_HP_occlusion_test; +GLEW_VAR_EXPORT GLboolean __GLEW_HP_texture_lighting; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_cull_vertex; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_multimode_draw_arrays; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_rasterpos_clip; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_static_data; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_texture_mirrored_repeat; +GLEW_VAR_EXPORT GLboolean __GLEW_IBM_vertex_array_lists; +GLEW_VAR_EXPORT GLboolean __GLEW_INGR_color_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_INGR_interlace_read; +GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_parallel_arrays; +GLEW_VAR_EXPORT GLboolean __GLEW_INTEL_texture_scissor; +GLEW_VAR_EXPORT GLboolean __GLEW_KTX_buffer_region; +GLEW_VAR_EXPORT GLboolean __GLEW_MESAX_texture_stack; +GLEW_VAR_EXPORT GLboolean __GLEW_MESA_pack_invert; +GLEW_VAR_EXPORT GLboolean __GLEW_MESA_resize_buffers; +GLEW_VAR_EXPORT GLboolean __GLEW_MESA_window_pos; +GLEW_VAR_EXPORT GLboolean __GLEW_MESA_ycbcr_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_blend_square; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_copy_depth_to_color; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_depth_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_evaluators; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_fence; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_float_buffer; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_fog_distance; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program2; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_fragment_program_option; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_half_float; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_light_max_exponent; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_multisample_filter_hint; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_occlusion_query; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_packed_depth_stencil; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_pixel_data_range; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_point_sprite; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_primitive_restart; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_register_combiners; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_register_combiners2; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texgen_emboss; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texgen_reflection; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_compression_vtc; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_env_combine4; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_expand_normal; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_rectangle; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader2; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_texture_shader3; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_array_range; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_array_range2; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program1_1; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program2_option; +GLEW_VAR_EXPORT GLboolean __GLEW_NV_vertex_program3; +GLEW_VAR_EXPORT GLboolean __GLEW_OML_interlace; +GLEW_VAR_EXPORT GLboolean __GLEW_OML_resample; +GLEW_VAR_EXPORT GLboolean __GLEW_OML_subsample; +GLEW_VAR_EXPORT GLboolean __GLEW_PGI_misc_hints; +GLEW_VAR_EXPORT GLboolean __GLEW_PGI_vertex_hints; +GLEW_VAR_EXPORT GLboolean __GLEW_REND_screen_coordinates; +GLEW_VAR_EXPORT GLboolean __GLEW_S3_s3tc; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_color_range; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_detail_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_fog_function; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_generate_mipmap; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_multisample; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_pixel_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_sharpen_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture4D; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_border_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_edge_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_filter4; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_lod; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIS_texture_select; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async_histogram; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_async_pixel; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_blend_alpha_minmax; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_clipmap; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_depth_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_flush_raster; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fog_offset; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fog_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_fragment_specular_lighting; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_framezoom; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_interlace; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_ir_instrument1; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_list_priority; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_pixel_texture; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_pixel_texture_bits; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_reference_plane; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_resample; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_shadow; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_shadow_ambient; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_sprite; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_tag_sample_buffer; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_add_env; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_coordinate_clamp; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_lod_bias; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_multi_buffer; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_range; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_texture_scale_bias; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_vertex_preclip; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_vertex_preclip_hint; +GLEW_VAR_EXPORT GLboolean __GLEW_SGIX_ycrcb; +GLEW_VAR_EXPORT GLboolean __GLEW_SGI_color_matrix; +GLEW_VAR_EXPORT GLboolean __GLEW_SGI_color_table; +GLEW_VAR_EXPORT GLboolean __GLEW_SGI_texture_color_table; +GLEW_VAR_EXPORT GLboolean __GLEW_SUNX_constant_data; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_convolution_border_modes; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_global_alpha; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_mesh_array; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_read_video_pixels; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_slice_accum; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_triangle_list; +GLEW_VAR_EXPORT GLboolean __GLEW_SUN_vertex; +GLEW_VAR_EXPORT GLboolean __GLEW_WIN_phong_shading; +GLEW_VAR_EXPORT GLboolean __GLEW_WIN_specular_fog; +GLEW_VAR_EXPORT GLboolean __GLEW_WIN_swap_hint; + +#ifdef GLEW_MX +}; /* GLEWContextStruct */ +#endif /* GLEW_MX */ + +/* ------------------------------------------------------------------------- */ + +/* error codes */ +#define GLEW_OK 0 +#define GLEW_NO_ERROR 0 +#define GLEW_ERROR_NO_GL_VERSION 1 /* missing GL version */ +#define GLEW_ERROR_GL_VERSION_10_ONLY 2 /* GL 1.1 and up are not supported */ +#define GLEW_ERROR_GLX_VERSION_11_ONLY 3 /* GLX 1.2 and up are not supported */ + +/* string codes */ +#define GLEW_VERSION 1 + +/* API */ +#ifdef GLEW_MX + +typedef struct GLEWContextStruct GLEWContext; +GLEWAPI GLenum glewContextInit (GLEWContext* ctx); +GLEWAPI GLboolean glewContextIsSupported (GLEWContext* ctx, const char* name); + +#define glewInit() glewContextInit(glewGetContext()) +#define glewIsSupported(x) glewContextIsSupported(glewGetContext(), x) +#define glewIsExtensionSupported(x) glewIsSupported(x) + +#ifdef _WIN32 +# define GLEW_GET_VAR(x) glewGetContext()->x +# define GLEW_GET_FUN(x) glewGetContext()->x +#else +# define GLEW_GET_VAR(x) glewGetContext()->x +# define GLEW_GET_FUN(x) x +#endif + +#else /* GLEW_MX */ + +GLEWAPI GLenum glewInit (); +GLEWAPI GLboolean glewIsSupported (const char* name); +#define glewIsExtensionSupported(x) glewIsSupported(x) + +#define GLEW_GET_VAR(x) x +#define GLEW_GET_FUN(x) x + +#endif /* GLEW_MX */ + +GLEWAPI GLboolean glewExperimental; +GLEWAPI GLboolean glewGetExtension (const char* name); +GLEWAPI const GLubyte* glewGetErrorString (GLenum error); +GLEWAPI const GLubyte* glewGetString (GLenum name); + +#ifdef __cplusplus +} +#endif + +#ifdef GLEW_APIENTRY_DEFINED +#undef GLEW_APIENTRY_DEFINED +#undef APIENTRY +#undef GLAPIENTRY +#endif + +#ifdef GLEW_CALLBACK_DEFINED +#undef GLEW_CALLBACK_DEFINED +#undef CALLBACK +#endif + +#ifdef GLEW_WINGDIAPI_DEFINED +#undef GLEW_WINGDIAPI_DEFINED +#undef WINGDIAPI +#endif + +#undef GLAPI +/* #undef GLEWAPI */ + +#endif /* __glew_h__ */ diff --git a/extern/glew/include/GL/glxew.h b/extern/glew/include/GL/glxew.h new file mode 100644 index 00000000000..d21397aeed4 --- /dev/null +++ b/extern/glew/include/GL/glxew.h @@ -0,0 +1,1062 @@ +/* +** The OpenGL Extension Wrangler Library +** Copyright (C) 2002-2006, Milan Ikits +** Copyright (C) 2002-2006, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are met: +** +** * Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** * The name of the author may be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +** THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +** The contents of this file are subject to the GLX Public License Version 1.0 +** (the "License"). You may not use this file except in compliance with the +** License. You may obtain a copy of the License at Silicon Graphics, Inc., +** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 +** or at http://www.sgi.com/software/opensource/glx/license.html. +** +** Software distributed under the License is distributed on an "AS IS" +** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY +** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR +** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific +** language governing rights and limitations under the License. +** +** The Original Software is GLX version 1.2 source code, released February, +** 1999. The developer of the Original Software is Silicon Graphics, Inc. +** Those portions of the Subject Software created by Silicon Graphics, Inc. +** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. +*/ + +#ifndef __glxew_h__ +#define __glxew_h__ +#define __GLXEW_H__ + +#ifdef __glxext_h_ +#error glxext.h included before glxew.h +#endif + +#define __glxext_h_ +#define __GLX_glx_h__ + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* ---------------------------- GLX_VERSION_1_0 --------------------------- */ + +#ifndef GLX_VERSION_1_0 +#define GLX_VERSION_1_0 1 + +#define GLX_USE_GL 1 +#define GLX_BUFFER_SIZE 2 +#define GLX_LEVEL 3 +#define GLX_RGBA 4 +#define GLX_DOUBLEBUFFER 5 +#define GLX_STEREO 6 +#define GLX_AUX_BUFFERS 7 +#define GLX_RED_SIZE 8 +#define GLX_GREEN_SIZE 9 +#define GLX_BLUE_SIZE 10 +#define GLX_ALPHA_SIZE 11 +#define GLX_DEPTH_SIZE 12 +#define GLX_STENCIL_SIZE 13 +#define GLX_ACCUM_RED_SIZE 14 +#define GLX_ACCUM_GREEN_SIZE 15 +#define GLX_ACCUM_BLUE_SIZE 16 +#define GLX_ACCUM_ALPHA_SIZE 17 +#define GLX_BAD_SCREEN 1 +#define GLX_BAD_ATTRIBUTE 2 +#define GLX_NO_EXTENSION 3 +#define GLX_BAD_VISUAL 4 +#define GLX_BAD_CONTEXT 5 +#define GLX_BAD_VALUE 6 +#define GLX_BAD_ENUM 7 + +typedef XID GLXDrawable; +typedef XID GLXPixmap; +typedef struct __GLXcontextRec *GLXContext; + +extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase); +extern Bool glXQueryVersion (Display *dpy, int *major, int *minor); +extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value); +extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList); +extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap); +extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix); +extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct); +extern void glXDestroyContext (Display *dpy, GLXContext ctx); +extern Bool glXIsDirect (Display *dpy, GLXContext ctx); +extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask); +extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx); +extern GLXContext glXGetCurrentContext (void); +extern GLXDrawable glXGetCurrentDrawable (void); +extern void glXWaitGL (void); +extern void glXWaitX (void); +extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable); +extern void glXUseXFont (Font font, int first, int count, int listBase); + +#define GLXEW_VERSION_1_0 GLXEW_GET_VAR(__GLXEW_VERSION_1_0) + +#endif /* GLX_VERSION_1_0 */ + +/* ---------------------------- GLX_VERSION_1_1 --------------------------- */ + +#ifndef GLX_VERSION_1_1 +#define GLX_VERSION_1_1 + +#define GLX_VENDOR 0x1 +#define GLX_VERSION 0x2 +#define GLX_EXTENSIONS 0x3 + +extern const char* glXQueryExtensionsString (Display *dpy, int screen); +extern const char* glXGetClientString (Display *dpy, int name); +extern const char* glXQueryServerString (Display *dpy, int screen, int name); + +#define GLXEW_VERSION_1_1 GLXEW_GET_VAR(__GLXEW_VERSION_1_1) + +#endif /* GLX_VERSION_1_1 */ + +/* ---------------------------- GLX_VERSION_1_2 ---------------------------- */ + +#ifndef GLX_VERSION_1_2 +#define GLX_VERSION_1_2 1 + +typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void); + +#define glXGetCurrentDisplay GLXEW_GET_FUN(__glewXGetCurrentDisplay) + +#define GLXEW_VERSION_1_2 GLXEW_GET_VAR(__GLXEW_VERSION_1_2) + +#endif /* GLX_VERSION_1_2 */ + +/* ---------------------------- GLX_VERSION_1_3 ---------------------------- */ + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 + +#define GLX_RGBA_BIT 0x00000001 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_DONT_CARE 0xFFFFFFFF + +typedef XID GLXFBConfigID; +typedef XID GLXWindow; +typedef XID GLXPbuffer; +typedef struct __GLXFBConfigRec *GLXFBConfig; +typedef struct { int event_type; int draw_type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; unsigned int buffer_mask; unsigned int aux_buffer; int x, y; int width, height; int count; } GLXPbufferClobberEvent; +typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; long pad[24]; } GLXEvent; + +typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); +typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); +typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); +typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); +typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); +typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); + +#define glXChooseFBConfig GLXEW_GET_FUN(__glewXChooseFBConfig) +#define glXCreateNewContext GLXEW_GET_FUN(__glewXCreateNewContext) +#define glXCreatePbuffer GLXEW_GET_FUN(__glewXCreatePbuffer) +#define glXCreatePixmap GLXEW_GET_FUN(__glewXCreatePixmap) +#define glXCreateWindow GLXEW_GET_FUN(__glewXCreateWindow) +#define glXDestroyPbuffer GLXEW_GET_FUN(__glewXDestroyPbuffer) +#define glXDestroyPixmap GLXEW_GET_FUN(__glewXDestroyPixmap) +#define glXDestroyWindow GLXEW_GET_FUN(__glewXDestroyWindow) +#define glXGetCurrentReadDrawable GLXEW_GET_FUN(__glewXGetCurrentReadDrawable) +#define glXGetFBConfigAttrib GLXEW_GET_FUN(__glewXGetFBConfigAttrib) +#define glXGetFBConfigs GLXEW_GET_FUN(__glewXGetFBConfigs) +#define glXGetSelectedEvent GLXEW_GET_FUN(__glewXGetSelectedEvent) +#define glXGetVisualFromFBConfig GLXEW_GET_FUN(__glewXGetVisualFromFBConfig) +#define glXMakeContextCurrent GLXEW_GET_FUN(__glewXMakeContextCurrent) +#define glXQueryContext GLXEW_GET_FUN(__glewXQueryContext) +#define glXQueryDrawable GLXEW_GET_FUN(__glewXQueryDrawable) +#define glXSelectEvent GLXEW_GET_FUN(__glewXSelectEvent) + +#define GLXEW_VERSION_1_3 GLXEW_GET_VAR(__GLXEW_VERSION_1_3) + +#endif /* GLX_VERSION_1_3 */ + +/* ---------------------------- GLX_VERSION_1_4 ---------------------------- */ + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 + +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 + +extern void ( * glXGetProcAddress (const GLubyte *procName)) (void); + +#define GLXEW_VERSION_1_4 GLXEW_GET_VAR(__GLXEW_VERSION_1_4) + +#endif /* GLX_VERSION_1_4 */ + +/* -------------------------- GLX_3DFX_multisample ------------------------- */ + +#ifndef GLX_3DFX_multisample +#define GLX_3DFX_multisample 1 + +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 + +#define GLXEW_3DFX_multisample GLXEW_GET_VAR(__GLXEW_3DFX_multisample) + +#endif /* GLX_3DFX_multisample */ + +/* ------------------------- GLX_ARB_fbconfig_float ------------------------ */ + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 + +#define GLX_RGBA_FLOAT_BIT 0x00000004 +#define GLX_RGBA_FLOAT_TYPE 0x20B9 + +#define GLXEW_ARB_fbconfig_float GLXEW_GET_VAR(__GLXEW_ARB_fbconfig_float) + +#endif /* GLX_ARB_fbconfig_float */ + +/* ------------------------ GLX_ARB_get_proc_address ----------------------- */ + +#ifndef GLX_ARB_get_proc_address +#define GLX_ARB_get_proc_address 1 + +extern void ( * glXGetProcAddressARB (const GLubyte *procName)) (void); + +#define GLXEW_ARB_get_proc_address GLXEW_GET_VAR(__GLXEW_ARB_get_proc_address) + +#endif /* GLX_ARB_get_proc_address */ + +/* -------------------------- GLX_ARB_multisample -------------------------- */ + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 + +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 + +#define GLXEW_ARB_multisample GLXEW_GET_VAR(__GLXEW_ARB_multisample) + +#endif /* GLX_ARB_multisample */ + +/* ----------------------- GLX_ATI_pixel_format_float ---------------------- */ + +#ifndef GLX_ATI_pixel_format_float +#define GLX_ATI_pixel_format_float 1 + +#define GLX_RGBA_FLOAT_ATI_BIT 0x00000100 + +#define GLXEW_ATI_pixel_format_float GLXEW_GET_VAR(__GLXEW_ATI_pixel_format_float) + +#endif /* GLX_ATI_pixel_format_float */ + +/* ------------------------- GLX_ATI_render_texture ------------------------ */ + +#ifndef GLX_ATI_render_texture +#define GLX_ATI_render_texture 1 + +#define GLX_BIND_TO_TEXTURE_RGB_ATI 0x9800 +#define GLX_BIND_TO_TEXTURE_RGBA_ATI 0x9801 +#define GLX_TEXTURE_FORMAT_ATI 0x9802 +#define GLX_TEXTURE_TARGET_ATI 0x9803 +#define GLX_MIPMAP_TEXTURE_ATI 0x9804 +#define GLX_TEXTURE_RGB_ATI 0x9805 +#define GLX_TEXTURE_RGBA_ATI 0x9806 +#define GLX_NO_TEXTURE_ATI 0x9807 +#define GLX_TEXTURE_CUBE_MAP_ATI 0x9808 +#define GLX_TEXTURE_1D_ATI 0x9809 +#define GLX_TEXTURE_2D_ATI 0x980A +#define GLX_MIPMAP_LEVEL_ATI 0x980B +#define GLX_CUBE_MAP_FACE_ATI 0x980C +#define GLX_TEXTURE_CUBE_MAP_POSITIVE_X_ATI 0x980D +#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_X_ATI 0x980E +#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Y_ATI 0x980F +#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Y_ATI 0x9810 +#define GLX_TEXTURE_CUBE_MAP_POSITIVE_Z_ATI 0x9811 +#define GLX_TEXTURE_CUBE_MAP_NEGATIVE_Z_ATI 0x9812 +#define GLX_FRONT_LEFT_ATI 0x9813 +#define GLX_FRONT_RIGHT_ATI 0x9814 +#define GLX_BACK_LEFT_ATI 0x9815 +#define GLX_BACK_RIGHT_ATI 0x9816 +#define GLX_AUX0_ATI 0x9817 +#define GLX_AUX1_ATI 0x9818 +#define GLX_AUX2_ATI 0x9819 +#define GLX_AUX3_ATI 0x981A +#define GLX_AUX4_ATI 0x981B +#define GLX_AUX5_ATI 0x981C +#define GLX_AUX6_ATI 0x981D +#define GLX_AUX7_ATI 0x981E +#define GLX_AUX8_ATI 0x981F +#define GLX_AUX9_ATI 0x9820 +#define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821 +#define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822 + +typedef void ( * PFNGLXBINDTEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer); +typedef void ( * PFNGLXDRAWABLEATTRIBATIPROC) (Display *dpy, GLXDrawable draw, const int *attrib_list); +typedef void ( * PFNGLXRELEASETEXIMAGEATIPROC) (Display *dpy, GLXPbuffer pbuf, int buffer); + +#define glXBindTexImageATI GLXEW_GET_FUN(__glewXBindTexImageATI) +#define glXDrawableAttribATI GLXEW_GET_FUN(__glewXDrawableAttribATI) +#define glXReleaseTexImageATI GLXEW_GET_FUN(__glewXReleaseTexImageATI) + +#define GLXEW_ATI_render_texture GLXEW_GET_VAR(__GLXEW_ATI_render_texture) + +#endif /* GLX_ATI_render_texture */ + +/* ------------------------- GLX_EXT_import_context ------------------------ */ + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 + +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C + +typedef XID GLXContextID; + +typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display* dpy, GLXContext context); +typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display* dpy, GLXContextID contextID); +typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display* dpy, GLXContext context, int attribute,int *value); + +#define glXFreeContextEXT GLXEW_GET_FUN(__glewXFreeContextEXT) +#define glXGetContextIDEXT GLXEW_GET_FUN(__glewXGetContextIDEXT) +#define glXImportContextEXT GLXEW_GET_FUN(__glewXImportContextEXT) +#define glXQueryContextInfoEXT GLXEW_GET_FUN(__glewXQueryContextInfoEXT) + +#define GLXEW_EXT_import_context GLXEW_GET_VAR(__GLXEW_EXT_import_context) + +#endif /* GLX_EXT_import_context */ + +/* -------------------------- GLX_EXT_scene_marker ------------------------- */ + +#ifndef GLX_EXT_scene_marker +#define GLX_EXT_scene_marker 1 + +#define GLXEW_EXT_scene_marker GLXEW_GET_VAR(__GLXEW_EXT_scene_marker) + +#endif /* GLX_EXT_scene_marker */ + +/* -------------------------- GLX_EXT_visual_info -------------------------- */ + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 + +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 + +#define GLXEW_EXT_visual_info GLXEW_GET_VAR(__GLXEW_EXT_visual_info) + +#endif /* GLX_EXT_visual_info */ + +/* ------------------------- GLX_EXT_visual_rating ------------------------- */ + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 + +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D + +#define GLXEW_EXT_visual_rating GLXEW_GET_VAR(__GLXEW_EXT_visual_rating) + +#endif /* GLX_EXT_visual_rating */ + +/* -------------------------- GLX_MESA_agp_offset -------------------------- */ + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 + +typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void* pointer); + +#define glXGetAGPOffsetMESA GLXEW_GET_FUN(__glewXGetAGPOffsetMESA) + +#define GLXEW_MESA_agp_offset GLXEW_GET_VAR(__GLXEW_MESA_agp_offset) + +#endif /* GLX_MESA_agp_offset */ + +/* ------------------------ GLX_MESA_copy_sub_buffer ----------------------- */ + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 + +typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display* dpy, GLXDrawable drawable, int x, int y, int width, int height); + +#define glXCopySubBufferMESA GLXEW_GET_FUN(__glewXCopySubBufferMESA) + +#define GLXEW_MESA_copy_sub_buffer GLXEW_GET_VAR(__GLXEW_MESA_copy_sub_buffer) + +#endif /* GLX_MESA_copy_sub_buffer */ + +/* ------------------------ GLX_MESA_pixmap_colormap ----------------------- */ + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 + +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display* dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); + +#define glXCreateGLXPixmapMESA GLXEW_GET_FUN(__glewXCreateGLXPixmapMESA) + +#define GLXEW_MESA_pixmap_colormap GLXEW_GET_VAR(__GLXEW_MESA_pixmap_colormap) + +#endif /* GLX_MESA_pixmap_colormap */ + +/* ------------------------ GLX_MESA_release_buffers ----------------------- */ + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 + +typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display* dpy, GLXDrawable d); + +#define glXReleaseBuffersMESA GLXEW_GET_FUN(__glewXReleaseBuffersMESA) + +#define GLXEW_MESA_release_buffers GLXEW_GET_VAR(__GLXEW_MESA_release_buffers) + +#endif /* GLX_MESA_release_buffers */ + +/* ------------------------- GLX_MESA_set_3dfx_mode ------------------------ */ + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 + +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 + +typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode); + +#define glXSet3DfxModeMESA GLXEW_GET_FUN(__glewXSet3DfxModeMESA) + +#define GLXEW_MESA_set_3dfx_mode GLXEW_GET_VAR(__GLXEW_MESA_set_3dfx_mode) + +#endif /* GLX_MESA_set_3dfx_mode */ + +/* -------------------------- GLX_NV_float_buffer -------------------------- */ + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 + +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 + +#define GLXEW_NV_float_buffer GLXEW_GET_VAR(__GLXEW_NV_float_buffer) + +#endif /* GLX_NV_float_buffer */ + +/* ----------------------- GLX_NV_vertex_array_range ----------------------- */ + +#ifndef GLX_NV_vertex_array_range +#define GLX_NV_vertex_array_range 1 + +typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); +typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer); + +#define glXAllocateMemoryNV GLXEW_GET_FUN(__glewXAllocateMemoryNV) +#define glXFreeMemoryNV GLXEW_GET_FUN(__glewXFreeMemoryNV) + +#define GLXEW_NV_vertex_array_range GLXEW_GET_VAR(__GLXEW_NV_vertex_array_range) + +#endif /* GLX_NV_vertex_array_range */ + +/* -------------------------- GLX_OML_swap_method -------------------------- */ + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 + +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 + +#define GLXEW_OML_swap_method GLXEW_GET_VAR(__GLXEW_OML_swap_method) + +#endif /* GLX_OML_swap_method */ + +/* -------------------------- GLX_OML_sync_control ------------------------- */ + +#if !defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#include +#define GLX_OML_sync_control 1 + +typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator); +typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc); +typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc); +typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc); + +#define glXGetMscRateOML GLXEW_GET_FUN(__glewXGetMscRateOML) +#define glXGetSyncValuesOML GLXEW_GET_FUN(__glewXGetSyncValuesOML) +#define glXSwapBuffersMscOML GLXEW_GET_FUN(__glewXSwapBuffersMscOML) +#define glXWaitForMscOML GLXEW_GET_FUN(__glewXWaitForMscOML) +#define glXWaitForSbcOML GLXEW_GET_FUN(__glewXWaitForSbcOML) + +#define GLXEW_OML_sync_control GLXEW_GET_VAR(__GLXEW_OML_sync_control) + +#endif /* GLX_OML_sync_control */ + +/* ------------------------ GLX_SGIS_blended_overlay ----------------------- */ + +#ifndef GLX_SGIS_blended_overlay +#define GLX_SGIS_blended_overlay 1 + +#define GLX_BLENDED_RGBA_SGIS 0x8025 + +#define GLXEW_SGIS_blended_overlay GLXEW_GET_VAR(__GLXEW_SGIS_blended_overlay) + +#endif /* GLX_SGIS_blended_overlay */ + +/* -------------------------- GLX_SGIS_color_range ------------------------- */ + +#ifndef GLX_SGIS_color_range +#define GLX_SGIS_color_range 1 + +#define GLX_MIN_RED_SGIS 0 +#define GLX_MAX_GREEN_SGIS 0 +#define GLX_MIN_BLUE_SGIS 0 +#define GLX_MAX_ALPHA_SGIS 0 +#define GLX_MIN_GREEN_SGIS 0 +#define GLX_MIN_ALPHA_SGIS 0 +#define GLX_MAX_RED_SGIS 0 +#define GLX_EXTENDED_RANGE_SGIS 0 +#define GLX_MAX_BLUE_SGIS 0 + +#define GLXEW_SGIS_color_range GLXEW_GET_VAR(__GLXEW_SGIS_color_range) + +#endif /* GLX_SGIS_color_range */ + +/* -------------------------- GLX_SGIS_multisample ------------------------- */ + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 + +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 + +#define GLXEW_SGIS_multisample GLXEW_GET_VAR(__GLXEW_SGIS_multisample) + +#endif /* GLX_SGIS_multisample */ + +/* ---------------------- GLX_SGIS_shared_multisample ---------------------- */ + +#ifndef GLX_SGIS_shared_multisample +#define GLX_SGIS_shared_multisample 1 + +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 + +#define GLXEW_SGIS_shared_multisample GLXEW_GET_VAR(__GLXEW_SGIS_shared_multisample) + +#endif /* GLX_SGIS_shared_multisample */ + +/* --------------------------- GLX_SGIX_fbconfig --------------------------- */ + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 + +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_SCREEN_EXT 0x800C +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 + +typedef XID GLXFBConfigIDSGIX; +typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; + +typedef GLXFBConfigSGIX* ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display* dpy, GLXFBConfig config, Pixmap pixmap); +typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display* dpy, GLXFBConfigSGIX config, int attribute, int *value); +typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display* dpy, XVisualInfo *vis); +typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfig config); + +#define glXChooseFBConfigSGIX GLXEW_GET_FUN(__glewXChooseFBConfigSGIX) +#define glXCreateContextWithConfigSGIX GLXEW_GET_FUN(__glewXCreateContextWithConfigSGIX) +#define glXCreateGLXPixmapWithConfigSGIX GLXEW_GET_FUN(__glewXCreateGLXPixmapWithConfigSGIX) +#define glXGetFBConfigAttribSGIX GLXEW_GET_FUN(__glewXGetFBConfigAttribSGIX) +#define glXGetFBConfigFromVisualSGIX GLXEW_GET_FUN(__glewXGetFBConfigFromVisualSGIX) +#define glXGetVisualFromFBConfigSGIX GLXEW_GET_FUN(__glewXGetVisualFromFBConfigSGIX) + +#define GLXEW_SGIX_fbconfig GLXEW_GET_VAR(__GLXEW_SGIX_fbconfig) + +#endif /* GLX_SGIX_fbconfig */ + +/* ---------------------------- GLX_SGIX_pbuffer --------------------------- */ + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 + +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 + +typedef XID GLXPbufferSGIX; +typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX; + +typedef GLXPbuffer ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display* dpy, GLXFBConfig config, unsigned int width, unsigned int height, int *attrib_list); +typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf); +typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long *mask); +typedef void ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display* dpy, GLXPbuffer pbuf, int attribute, unsigned int *value); +typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display* dpy, GLXDrawable drawable, unsigned long mask); + +#define glXCreateGLXPbufferSGIX GLXEW_GET_FUN(__glewXCreateGLXPbufferSGIX) +#define glXDestroyGLXPbufferSGIX GLXEW_GET_FUN(__glewXDestroyGLXPbufferSGIX) +#define glXGetSelectedEventSGIX GLXEW_GET_FUN(__glewXGetSelectedEventSGIX) +#define glXQueryGLXPbufferSGIX GLXEW_GET_FUN(__glewXQueryGLXPbufferSGIX) +#define glXSelectEventSGIX GLXEW_GET_FUN(__glewXSelectEventSGIX) + +#define GLXEW_SGIX_pbuffer GLXEW_GET_VAR(__GLXEW_SGIX_pbuffer) + +#endif /* GLX_SGIX_pbuffer */ + +/* ------------------------- GLX_SGIX_swap_barrier ------------------------- */ + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 + +typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); +typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); + +#define glXBindSwapBarrierSGIX GLXEW_GET_FUN(__glewXBindSwapBarrierSGIX) +#define glXQueryMaxSwapBarriersSGIX GLXEW_GET_FUN(__glewXQueryMaxSwapBarriersSGIX) + +#define GLXEW_SGIX_swap_barrier GLXEW_GET_VAR(__GLXEW_SGIX_swap_barrier) + +#endif /* GLX_SGIX_swap_barrier */ + +/* -------------------------- GLX_SGIX_swap_group -------------------------- */ + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 + +typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); + +#define glXJoinSwapGroupSGIX GLXEW_GET_FUN(__glewXJoinSwapGroupSGIX) + +#define GLXEW_SGIX_swap_group GLXEW_GET_VAR(__GLXEW_SGIX_swap_group) + +#endif /* GLX_SGIX_swap_group */ + +/* ------------------------- GLX_SGIX_video_resize ------------------------- */ + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 + +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 + +typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display* display, int screen, int channel, Window window); +typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int x, int y, int w, int h); +typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display* display, int screen, int channel, GLenum synctype); +typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display* display, int screen, int channel, int *x, int *y, int *w, int *h); +typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display* display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); + +#define glXBindChannelToWindowSGIX GLXEW_GET_FUN(__glewXBindChannelToWindowSGIX) +#define glXChannelRectSGIX GLXEW_GET_FUN(__glewXChannelRectSGIX) +#define glXChannelRectSyncSGIX GLXEW_GET_FUN(__glewXChannelRectSyncSGIX) +#define glXQueryChannelDeltasSGIX GLXEW_GET_FUN(__glewXQueryChannelDeltasSGIX) +#define glXQueryChannelRectSGIX GLXEW_GET_FUN(__glewXQueryChannelRectSGIX) + +#define GLXEW_SGIX_video_resize GLXEW_GET_VAR(__GLXEW_SGIX_video_resize) + +#endif /* GLX_SGIX_video_resize */ + +/* ---------------------- GLX_SGIX_visual_select_group --------------------- */ + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 + +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 + +#define GLXEW_SGIX_visual_select_group GLXEW_GET_VAR(__GLXEW_SGIX_visual_select_group) + +#endif /* GLX_SGIX_visual_select_group */ + +/* ---------------------------- GLX_SGI_cushion ---------------------------- */ + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 + +typedef void ( * PFNGLXCUSHIONSGIPROC) (Display* dpy, Window window, float cushion); + +#define glXCushionSGI GLXEW_GET_FUN(__glewXCushionSGI) + +#define GLXEW_SGI_cushion GLXEW_GET_VAR(__GLXEW_SGI_cushion) + +#endif /* GLX_SGI_cushion */ + +/* ----------------------- GLX_SGI_make_current_read ----------------------- */ + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 + +typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); +typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); + +#define glXGetCurrentReadDrawableSGI GLXEW_GET_FUN(__glewXGetCurrentReadDrawableSGI) +#define glXMakeCurrentReadSGI GLXEW_GET_FUN(__glewXMakeCurrentReadSGI) + +#define GLXEW_SGI_make_current_read GLXEW_GET_VAR(__GLXEW_SGI_make_current_read) + +#endif /* GLX_SGI_make_current_read */ + +/* -------------------------- GLX_SGI_swap_control ------------------------- */ + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 + +typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); + +#define glXSwapIntervalSGI GLXEW_GET_FUN(__glewXSwapIntervalSGI) + +#define GLXEW_SGI_swap_control GLXEW_GET_VAR(__GLXEW_SGI_swap_control) + +#endif /* GLX_SGI_swap_control */ + +/* --------------------------- GLX_SGI_video_sync -------------------------- */ + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 + +typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (uint* count); +typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int* count); + +#define glXGetVideoSyncSGI GLXEW_GET_FUN(__glewXGetVideoSyncSGI) +#define glXWaitVideoSyncSGI GLXEW_GET_FUN(__glewXWaitVideoSyncSGI) + +#define GLXEW_SGI_video_sync GLXEW_GET_VAR(__GLXEW_SGI_video_sync) + +#endif /* GLX_SGI_video_sync */ + +/* --------------------- GLX_SUN_get_transparent_index --------------------- */ + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 + +typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display* dpy, Window overlay, Window underlay, unsigned long *pTransparentIndex); + +#define glXGetTransparentIndexSUN GLXEW_GET_FUN(__glewXGetTransparentIndexSUN) + +#define GLXEW_SUN_get_transparent_index GLXEW_GET_VAR(__GLXEW_SUN_get_transparent_index) + +#endif /* GLX_SUN_get_transparent_index */ + +/* -------------------------- GLX_SUN_video_resize ------------------------- */ + +#ifndef GLX_SUN_video_resize +#define GLX_SUN_video_resize 1 + +#define GLX_VIDEO_RESIZE_SUN 0x8171 +#define GL_VIDEO_RESIZE_COMPENSATION_SUN 0x85CD + +typedef int ( * PFNGLXGETVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float* factor); +typedef int ( * PFNGLXVIDEORESIZESUNPROC) (Display* display, GLXDrawable window, float factor); + +#define glXGetVideoResizeSUN GLXEW_GET_FUN(__glewXGetVideoResizeSUN) +#define glXVideoResizeSUN GLXEW_GET_FUN(__glewXVideoResizeSUN) + +#define GLXEW_SUN_video_resize GLXEW_GET_VAR(__GLXEW_SUN_video_resize) + +#endif /* GLX_SUN_video_resize */ + +/* ------------------------------------------------------------------------- */ + +#ifdef GLEW_MX +#define GLXEW_EXPORT +#else +#define GLXEW_EXPORT extern +#endif /* GLEW_MX */ + +extern PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay; + +extern PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig; +extern PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext; +extern PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer; +extern PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap; +extern PFNGLXCREATEWINDOWPROC __glewXCreateWindow; +extern PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer; +extern PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap; +extern PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow; +extern PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable; +extern PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib; +extern PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs; +extern PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent; +extern PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig; +extern PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent; +extern PFNGLXQUERYCONTEXTPROC __glewXQueryContext; +extern PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable; +extern PFNGLXSELECTEVENTPROC __glewXSelectEvent; + +extern PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI; +extern PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI; +extern PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI; + +extern PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT; +extern PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT; +extern PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT; +extern PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT; + +extern PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA; + +extern PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA; + +extern PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA; + +extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA; + +extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA; + +extern PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV; +extern PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV; + +#ifdef GLX_OML_sync_control +extern PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML; +extern PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML; +extern PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML; +extern PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML; +extern PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML; +#endif + +extern PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX; +extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX; +extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX; +extern PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX; +extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX; +extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX; + +extern PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX; +extern PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX; +extern PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX; +extern PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX; +extern PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX; + +extern PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX; +extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX; + +extern PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX; + +extern PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX; +extern PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX; +extern PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX; +extern PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX; +extern PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX; + +extern PFNGLXCUSHIONSGIPROC __glewXCushionSGI; + +extern PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI; +extern PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI; + +extern PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI; + +extern PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI; +extern PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI; + +extern PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN; + +extern PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN; +extern PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN; + +#if defined(GLEW_MX) +struct GLXEWContextStruct +{ +#endif /* GLEW_MX */ + +GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_0; +GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_1; +GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_2; +GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_3; +GLXEW_EXPORT GLboolean __GLXEW_VERSION_1_4; +GLXEW_EXPORT GLboolean __GLXEW_3DFX_multisample; +GLXEW_EXPORT GLboolean __GLXEW_ARB_fbconfig_float; +GLXEW_EXPORT GLboolean __GLXEW_ARB_get_proc_address; +GLXEW_EXPORT GLboolean __GLXEW_ARB_multisample; +GLXEW_EXPORT GLboolean __GLXEW_ATI_pixel_format_float; +GLXEW_EXPORT GLboolean __GLXEW_ATI_render_texture; +GLXEW_EXPORT GLboolean __GLXEW_EXT_import_context; +GLXEW_EXPORT GLboolean __GLXEW_EXT_scene_marker; +GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_info; +GLXEW_EXPORT GLboolean __GLXEW_EXT_visual_rating; +GLXEW_EXPORT GLboolean __GLXEW_MESA_agp_offset; +GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer; +GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap; +GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers; +GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode; +GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer; +GLXEW_EXPORT GLboolean __GLXEW_NV_vertex_array_range; +GLXEW_EXPORT GLboolean __GLXEW_OML_swap_method; +GLXEW_EXPORT GLboolean __GLXEW_OML_sync_control; +GLXEW_EXPORT GLboolean __GLXEW_SGIS_blended_overlay; +GLXEW_EXPORT GLboolean __GLXEW_SGIS_color_range; +GLXEW_EXPORT GLboolean __GLXEW_SGIS_multisample; +GLXEW_EXPORT GLboolean __GLXEW_SGIS_shared_multisample; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_fbconfig; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_pbuffer; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_barrier; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_swap_group; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_video_resize; +GLXEW_EXPORT GLboolean __GLXEW_SGIX_visual_select_group; +GLXEW_EXPORT GLboolean __GLXEW_SGI_cushion; +GLXEW_EXPORT GLboolean __GLXEW_SGI_make_current_read; +GLXEW_EXPORT GLboolean __GLXEW_SGI_swap_control; +GLXEW_EXPORT GLboolean __GLXEW_SGI_video_sync; +GLXEW_EXPORT GLboolean __GLXEW_SUN_get_transparent_index; +GLXEW_EXPORT GLboolean __GLXEW_SUN_video_resize; + +#ifdef GLEW_MX +}; /* GLXEWContextStruct */ +#endif /* GLEW_MX */ + +/* ------------------------------------------------------------------------ */ + +#ifdef GLEW_MX + +typedef struct GLXEWContextStruct GLXEWContext; +extern GLenum glxewContextInit (GLXEWContext* ctx); +extern GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name); + +#define glxewInit() glxewContextInit(glxewGetContext()) +#define glxewIsSupported(x) glxewContextIsSupported(glxewGetContext(), x) + +#define GLXEW_GET_VAR(x) glxewGetContext()->x +#define GLXEW_GET_FUN(x) x + +#else /* GLEW_MX */ + +#define GLXEW_GET_VAR(x) x +#define GLXEW_GET_FUN(x) x + +extern GLboolean glxewIsSupported (const char* name); + +#endif /* GLEW_MX */ + +extern GLboolean glxewGetExtension (const char* name); + +#ifdef __cplusplus +} +#endif + +#endif /* __glxew_h__ */ diff --git a/extern/glew/include/GL/wglew.h b/extern/glew/include/GL/wglew.h new file mode 100644 index 00000000000..febb1d07399 --- /dev/null +++ b/extern/glew/include/GL/wglew.h @@ -0,0 +1,934 @@ +/* +** The OpenGL Extension Wrangler Library +** Copyright (C) 2002-2006, Milan Ikits +** Copyright (C) 2002-2006, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are met: +** +** * Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** * The name of the author may be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +** THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef __wglew_h__ +#define __wglew_h__ +#define __WGLEW_H__ + +#ifdef __wglext_h_ +#error wglext.h included before wglew.h +#endif + +#define __wglext_h_ + +#if !defined(APIENTRY) && !defined(__CYGWIN__) +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN 1 +# endif +#include +#endif + +/* + * GLEW_STATIC needs to be set when using the static version. + * GLEW_BUILD is set when building the DLL version. + */ +#ifdef GLEW_STATIC +# define GLEWAPI extern +#else +# ifdef GLEW_BUILD +# define GLEWAPI extern __declspec(dllexport) +# else +# define GLEWAPI extern __declspec(dllimport) +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* -------------------------- WGL_3DFX_multisample ------------------------- */ + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 + +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 + +#define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample) + +#endif /* WGL_3DFX_multisample */ + +/* ------------------------- WGL_3DL_stereo_control ------------------------ */ + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 + +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 + +typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); + +#define wglSetStereoEmitterState3DL WGLEW_GET_FUN(__wglewSetStereoEmitterState3DL) + +#define WGLEW_3DL_stereo_control WGLEW_GET_VAR(__WGLEW_3DL_stereo_control) + +#endif /* WGL_3DL_stereo_control */ + +/* ------------------------- WGL_ARB_buffer_region ------------------------- */ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 + +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 + +typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); + +#define wglCreateBufferRegionARB WGLEW_GET_FUN(__wglewCreateBufferRegionARB) +#define wglDeleteBufferRegionARB WGLEW_GET_FUN(__wglewDeleteBufferRegionARB) +#define wglRestoreBufferRegionARB WGLEW_GET_FUN(__wglewRestoreBufferRegionARB) +#define wglSaveBufferRegionARB WGLEW_GET_FUN(__wglewSaveBufferRegionARB) + +#define WGLEW_ARB_buffer_region WGLEW_GET_VAR(__WGLEW_ARB_buffer_region) + +#endif /* WGL_ARB_buffer_region */ + +/* ----------------------- WGL_ARB_extensions_string ----------------------- */ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 + +typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); + +#define wglGetExtensionsStringARB WGLEW_GET_FUN(__wglewGetExtensionsStringARB) + +#define WGLEW_ARB_extensions_string WGLEW_GET_VAR(__WGLEW_ARB_extensions_string) + +#endif /* WGL_ARB_extensions_string */ + +/* ----------------------- WGL_ARB_make_current_read ----------------------- */ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 + +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (VOID); +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); + +#define wglGetCurrentReadDCARB WGLEW_GET_FUN(__wglewGetCurrentReadDCARB) +#define wglMakeContextCurrentARB WGLEW_GET_FUN(__wglewMakeContextCurrentARB) + +#define WGLEW_ARB_make_current_read WGLEW_GET_VAR(__WGLEW_ARB_make_current_read) + +#endif /* WGL_ARB_make_current_read */ + +/* -------------------------- WGL_ARB_multisample -------------------------- */ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 + +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 + +#define WGLEW_ARB_multisample WGLEW_GET_VAR(__WGLEW_ARB_multisample) + +#endif /* WGL_ARB_multisample */ + +/* ---------------------------- WGL_ARB_pbuffer ---------------------------- */ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 + +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 + +DECLARE_HANDLE(HPBUFFERARB); + +typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int* piValue); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); + +#define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB) +#define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB) +#define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB) +#define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB) +#define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB) + +#define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer) + +#endif /* WGL_ARB_pbuffer */ + +/* -------------------------- WGL_ARB_pixel_format ------------------------- */ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 + +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B + +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, int *piValues); + +#define wglChoosePixelFormatARB WGLEW_GET_FUN(__wglewChoosePixelFormatARB) +#define wglGetPixelFormatAttribfvARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvARB) +#define wglGetPixelFormatAttribivARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribivARB) + +#define WGLEW_ARB_pixel_format WGLEW_GET_VAR(__WGLEW_ARB_pixel_format) + +#endif /* WGL_ARB_pixel_format */ + +/* ----------------------- WGL_ARB_pixel_format_float ---------------------- */ + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 + +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 + +#define WGLEW_ARB_pixel_format_float WGLEW_GET_VAR(__WGLEW_ARB_pixel_format_float) + +#endif /* WGL_ARB_pixel_format_float */ + +/* ------------------------- WGL_ARB_render_texture ------------------------ */ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 + +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 + +typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int* piAttribList); + +#define wglBindTexImageARB WGLEW_GET_FUN(__wglewBindTexImageARB) +#define wglReleaseTexImageARB WGLEW_GET_FUN(__wglewReleaseTexImageARB) +#define wglSetPbufferAttribARB WGLEW_GET_FUN(__wglewSetPbufferAttribARB) + +#define WGLEW_ARB_render_texture WGLEW_GET_VAR(__WGLEW_ARB_render_texture) + +#endif /* WGL_ARB_render_texture */ + +/* ----------------------- WGL_ATI_pixel_format_float ---------------------- */ + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 + +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#define GL_RGBA_FLOAT_MODE_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 + +#define WGLEW_ATI_pixel_format_float WGLEW_GET_VAR(__WGLEW_ATI_pixel_format_float) + +#endif /* WGL_ATI_pixel_format_float */ + +/* -------------------- WGL_ATI_render_texture_rectangle ------------------- */ + +#ifndef WGL_ATI_render_texture_rectangle +#define WGL_ATI_render_texture_rectangle 1 + +#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5 + +#define WGLEW_ATI_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_ATI_render_texture_rectangle) + +#endif /* WGL_ATI_render_texture_rectangle */ + +/* -------------------------- WGL_EXT_depth_float -------------------------- */ + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 + +#define WGL_DEPTH_FLOAT_EXT 0x2040 + +#define WGLEW_EXT_depth_float WGLEW_GET_VAR(__WGLEW_EXT_depth_float) + +#endif /* WGL_EXT_depth_float */ + +/* ---------------------- WGL_EXT_display_color_table ---------------------- */ + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 + +typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef void (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (GLushort* table, GLuint length); + +#define wglBindDisplayColorTableEXT WGLEW_GET_FUN(__wglewBindDisplayColorTableEXT) +#define wglCreateDisplayColorTableEXT WGLEW_GET_FUN(__wglewCreateDisplayColorTableEXT) +#define wglDestroyDisplayColorTableEXT WGLEW_GET_FUN(__wglewDestroyDisplayColorTableEXT) +#define wglLoadDisplayColorTableEXT WGLEW_GET_FUN(__wglewLoadDisplayColorTableEXT) + +#define WGLEW_EXT_display_color_table WGLEW_GET_VAR(__WGLEW_EXT_display_color_table) + +#endif /* WGL_EXT_display_color_table */ + +/* ----------------------- WGL_EXT_extensions_string ----------------------- */ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 + +typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); + +#define wglGetExtensionsStringEXT WGLEW_GET_FUN(__wglewGetExtensionsStringEXT) + +#define WGLEW_EXT_extensions_string WGLEW_GET_VAR(__WGLEW_EXT_extensions_string) + +#endif /* WGL_EXT_extensions_string */ + +/* ----------------------- WGL_EXT_make_current_read ----------------------- */ + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 + +typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (VOID); +typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); + +#define wglGetCurrentReadDCEXT WGLEW_GET_FUN(__wglewGetCurrentReadDCEXT) +#define wglMakeContextCurrentEXT WGLEW_GET_FUN(__wglewMakeContextCurrentEXT) + +#define WGLEW_EXT_make_current_read WGLEW_GET_VAR(__WGLEW_EXT_make_current_read) + +#endif /* WGL_EXT_make_current_read */ + +/* -------------------------- WGL_EXT_multisample -------------------------- */ + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 + +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 + +#define WGLEW_EXT_multisample WGLEW_GET_VAR(__WGLEW_EXT_multisample) + +#endif /* WGL_EXT_multisample */ + +/* ---------------------------- WGL_EXT_pbuffer ---------------------------- */ + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 + +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 + +DECLARE_HANDLE(HPBUFFEREXT); + +typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList); +typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int* piValue); +typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); + +#define wglCreatePbufferEXT WGLEW_GET_FUN(__wglewCreatePbufferEXT) +#define wglDestroyPbufferEXT WGLEW_GET_FUN(__wglewDestroyPbufferEXT) +#define wglGetPbufferDCEXT WGLEW_GET_FUN(__wglewGetPbufferDCEXT) +#define wglQueryPbufferEXT WGLEW_GET_FUN(__wglewQueryPbufferEXT) +#define wglReleasePbufferDCEXT WGLEW_GET_FUN(__wglewReleasePbufferDCEXT) + +#define WGLEW_EXT_pbuffer WGLEW_GET_VAR(__WGLEW_EXT_pbuffer) + +#endif /* WGL_EXT_pbuffer */ + +/* -------------------------- WGL_EXT_pixel_format ------------------------- */ + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 + +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C + +typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT *pfValues); +typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues); + +#define wglChoosePixelFormatEXT WGLEW_GET_FUN(__wglewChoosePixelFormatEXT) +#define wglGetPixelFormatAttribfvEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvEXT) +#define wglGetPixelFormatAttribivEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribivEXT) + +#define WGLEW_EXT_pixel_format WGLEW_GET_VAR(__WGLEW_EXT_pixel_format) + +#endif /* WGL_EXT_pixel_format */ + +/* -------------------------- WGL_EXT_swap_control ------------------------- */ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 + +typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); +typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); + +#define wglGetSwapIntervalEXT WGLEW_GET_FUN(__wglewGetSwapIntervalEXT) +#define wglSwapIntervalEXT WGLEW_GET_FUN(__wglewSwapIntervalEXT) + +#define WGLEW_EXT_swap_control WGLEW_GET_VAR(__WGLEW_EXT_swap_control) + +#endif /* WGL_EXT_swap_control */ + +/* --------------------- WGL_I3D_digital_video_control --------------------- */ + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 + +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 + +typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue); +typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue); + +#define wglGetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewGetDigitalVideoParametersI3D) +#define wglSetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewSetDigitalVideoParametersI3D) + +#define WGLEW_I3D_digital_video_control WGLEW_GET_VAR(__WGLEW_I3D_digital_video_control) + +#endif /* WGL_I3D_digital_video_control */ + +/* ----------------------------- WGL_I3D_gamma ----------------------------- */ + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 + +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F + +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT* puRed, USHORT *puGreen, USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT* puRed, const USHORT *puGreen, const USHORT *puBlue); +typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue); + +#define wglGetGammaTableI3D WGLEW_GET_FUN(__wglewGetGammaTableI3D) +#define wglGetGammaTableParametersI3D WGLEW_GET_FUN(__wglewGetGammaTableParametersI3D) +#define wglSetGammaTableI3D WGLEW_GET_FUN(__wglewSetGammaTableI3D) +#define wglSetGammaTableParametersI3D WGLEW_GET_FUN(__wglewSetGammaTableParametersI3D) + +#define WGLEW_I3D_gamma WGLEW_GET_VAR(__WGLEW_I3D_gamma) + +#endif /* WGL_I3D_gamma */ + +/* ---------------------------- WGL_I3D_genlock ---------------------------- */ + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 + +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C + +typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT* uRate); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT* uDelay); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT* uEdge); +typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT* uSource); +typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL* pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT* uMaxLineDelay, UINT *uMaxPixelDelay); + +#define wglDisableGenlockI3D WGLEW_GET_FUN(__wglewDisableGenlockI3D) +#define wglEnableGenlockI3D WGLEW_GET_FUN(__wglewEnableGenlockI3D) +#define wglGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGenlockSampleRateI3D) +#define wglGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGenlockSourceDelayI3D) +#define wglGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGenlockSourceEdgeI3D) +#define wglGenlockSourceI3D WGLEW_GET_FUN(__wglewGenlockSourceI3D) +#define wglGetGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGetGenlockSampleRateI3D) +#define wglGetGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGetGenlockSourceDelayI3D) +#define wglGetGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGetGenlockSourceEdgeI3D) +#define wglGetGenlockSourceI3D WGLEW_GET_FUN(__wglewGetGenlockSourceI3D) +#define wglIsEnabledGenlockI3D WGLEW_GET_FUN(__wglewIsEnabledGenlockI3D) +#define wglQueryGenlockMaxSourceDelayI3D WGLEW_GET_FUN(__wglewQueryGenlockMaxSourceDelayI3D) + +#define WGLEW_I3D_genlock WGLEW_GET_VAR(__WGLEW_I3D_genlock) + +#endif /* WGL_I3D_genlock */ + +/* -------------------------- WGL_I3D_image_buffer ------------------------- */ + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 + +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 + +typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, HANDLE* pEvent, LPVOID *pAddress, DWORD *pSize, UINT count); +typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, LPVOID* pAddress, UINT count); + +#define wglAssociateImageBufferEventsI3D WGLEW_GET_FUN(__wglewAssociateImageBufferEventsI3D) +#define wglCreateImageBufferI3D WGLEW_GET_FUN(__wglewCreateImageBufferI3D) +#define wglDestroyImageBufferI3D WGLEW_GET_FUN(__wglewDestroyImageBufferI3D) +#define wglReleaseImageBufferEventsI3D WGLEW_GET_FUN(__wglewReleaseImageBufferEventsI3D) + +#define WGLEW_I3D_image_buffer WGLEW_GET_VAR(__WGLEW_I3D_image_buffer) + +#endif /* WGL_I3D_image_buffer */ + +/* ------------------------ WGL_I3D_swap_frame_lock ------------------------ */ + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 + +typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (VOID); +typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (VOID); +typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL* pFlag); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL* pFlag); + +#define wglDisableFrameLockI3D WGLEW_GET_FUN(__wglewDisableFrameLockI3D) +#define wglEnableFrameLockI3D WGLEW_GET_FUN(__wglewEnableFrameLockI3D) +#define wglIsEnabledFrameLockI3D WGLEW_GET_FUN(__wglewIsEnabledFrameLockI3D) +#define wglQueryFrameLockMasterI3D WGLEW_GET_FUN(__wglewQueryFrameLockMasterI3D) + +#define WGLEW_I3D_swap_frame_lock WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_lock) + +#endif /* WGL_I3D_swap_frame_lock */ + +/* ------------------------ WGL_I3D_swap_frame_usage ----------------------- */ + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 + +typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); +typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float* pUsage); +typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); + +#define wglBeginFrameTrackingI3D WGLEW_GET_FUN(__wglewBeginFrameTrackingI3D) +#define wglEndFrameTrackingI3D WGLEW_GET_FUN(__wglewEndFrameTrackingI3D) +#define wglGetFrameUsageI3D WGLEW_GET_FUN(__wglewGetFrameUsageI3D) +#define wglQueryFrameTrackingI3D WGLEW_GET_FUN(__wglewQueryFrameTrackingI3D) + +#define WGLEW_I3D_swap_frame_usage WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_usage) + +#endif /* WGL_I3D_swap_frame_usage */ + +/* -------------------------- WGL_NV_float_buffer -------------------------- */ + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 + +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 + +#define WGLEW_NV_float_buffer WGLEW_GET_VAR(__WGLEW_NV_float_buffer) + +#endif /* WGL_NV_float_buffer */ + +/* ---------------------- WGL_NV_render_depth_texture ---------------------- */ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 + +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 + +#define WGLEW_NV_render_depth_texture WGLEW_GET_VAR(__WGLEW_NV_render_depth_texture) + +#endif /* WGL_NV_render_depth_texture */ + +/* -------------------- WGL_NV_render_texture_rectangle -------------------- */ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 + +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 + +#define WGLEW_NV_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_NV_render_texture_rectangle) + +#endif /* WGL_NV_render_texture_rectangle */ + +/* ----------------------- WGL_NV_vertex_array_range ----------------------- */ + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 + +typedef void * (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); +typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); + +#define wglAllocateMemoryNV WGLEW_GET_FUN(__wglewAllocateMemoryNV) +#define wglFreeMemoryNV WGLEW_GET_FUN(__wglewFreeMemoryNV) + +#define WGLEW_NV_vertex_array_range WGLEW_GET_VAR(__WGLEW_NV_vertex_array_range) + +#endif /* WGL_NV_vertex_array_range */ + +/* -------------------------- WGL_OML_sync_control ------------------------- */ + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 + +typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32* numerator, INT32 *denominator); +typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64* ust, INT64 *msc, INT64 *sbc); +typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64 *msc, INT64 *sbc); +typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64* ust, INT64 *msc, INT64 *sbc); + +#define wglGetMscRateOML WGLEW_GET_FUN(__wglewGetMscRateOML) +#define wglGetSyncValuesOML WGLEW_GET_FUN(__wglewGetSyncValuesOML) +#define wglSwapBuffersMscOML WGLEW_GET_FUN(__wglewSwapBuffersMscOML) +#define wglSwapLayerBuffersMscOML WGLEW_GET_FUN(__wglewSwapLayerBuffersMscOML) +#define wglWaitForMscOML WGLEW_GET_FUN(__wglewWaitForMscOML) +#define wglWaitForSbcOML WGLEW_GET_FUN(__wglewWaitForSbcOML) + +#define WGLEW_OML_sync_control WGLEW_GET_VAR(__WGLEW_OML_sync_control) + +#endif /* WGL_OML_sync_control */ + +/* ------------------------------------------------------------------------- */ + +#ifdef GLEW_MX +#define WGLEW_EXPORT +#else +#define WGLEW_EXPORT GLEWAPI +#endif /* GLEW_MX */ + +#ifdef GLEW_MX +struct WGLEWContextStruct +{ +#endif /* GLEW_MX */ + +WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL; + +WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB; +WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB; +WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB; +WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB; + +WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB; + +WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB; +WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB; + +WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB; +WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB; +WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB; +WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB; +WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB; + +WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB; +WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB; +WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB; + +WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB; +WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB; +WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB; + +WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT; +WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT; +WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT; +WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT; + +WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT; + +WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT; +WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT; + +WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT; +WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT; +WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT; +WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT; +WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT; + +WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT; +WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT; +WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT; + +WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT; +WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT; + +WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D; +WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D; + +WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D; +WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D; +WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D; +WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D; + +WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D; +WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D; +WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D; +WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D; +WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D; +WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D; +WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D; +WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D; +WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D; +WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D; +WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D; +WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D; + +WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D; +WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D; +WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D; +WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D; + +WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D; +WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D; +WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D; +WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D; + +WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D; +WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D; +WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D; +WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D; + +WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV; +WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV; + +WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML; +WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML; +WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML; +WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML; +WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML; +WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML; +WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample; +WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control; +WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region; +WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string; +WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read; +WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample; +WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer; +WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format; +WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float; +WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture; +WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float; +WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle; +WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float; +WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table; +WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string; +WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read; +WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample; +WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer; +WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format; +WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control; +WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control; +WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma; +WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock; +WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer; +WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock; +WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage; +WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer; +WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture; +WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle; +WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range; +WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control; + +#ifdef GLEW_MX +}; /* WGLEWContextStruct */ +#endif /* GLEW_MX */ + +/* ------------------------------------------------------------------------- */ + +#ifdef GLEW_MX + +typedef struct WGLEWContextStruct WGLEWContext; +GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx); +GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name); + +#define wglewInit() wglewContextInit(wglewGetContext()) +#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x) + +#define WGLEW_GET_VAR(x) wglewGetContext()->x +#define WGLEW_GET_FUN(x) wglewGetContext()->x + +#else /* GLEW_MX */ + +#define WGLEW_GET_VAR(x) x +#define WGLEW_GET_FUN(x) x + +GLEWAPI GLboolean wglewIsSupported (const char* name); + +#endif /* GLEW_MX */ + +GLEWAPI GLboolean wglewGetExtension (const char* name); + +#ifdef __cplusplus +} +#endif + +#undef GLEWAPI + +#endif /* __wglew_h__ */ diff --git a/extern/glew/src/Makefile b/extern/glew/src/Makefile new file mode 100644 index 00000000000..55cc7cfccad --- /dev/null +++ b/extern/glew/src/Makefile @@ -0,0 +1,56 @@ +# +# $Id$ +# +# ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. The Blender +# Foundation also sells licenses for use in proprietary software under +# the Blender License. See http://www.blender.org/BL/ for information +# about this. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL/BL DUAL LICENSE BLOCK ***** +# +# + +LIBNAME = glew +DIR = $(OCGDIR)/extern/$(LIBNAME) + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I../include + +CSRCS = glew.c +CCSRCS = +include nan_compile.mk + +install: all debug + @[ -d $(NAN_GLEW) ] || mkdir -p $(NAN_GLEW) + @[ -d $(NAN_GLEW)/include/GL ] || mkdir -p $(NAN_GLEW)/include/GL + @[ -d $(NAN_GLEW)/lib ] || mkdir -p $(NAN_GLEW)/lib + @[ -d $(NAN_GLEW)/lib/debug ] || mkdir -p $(NAN_GLEW)/lib/debug + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/lib$(LIBNAME).a $(NAN_GLEW)/lib/ +ifeq ($(OS),darwin) + ranlib $(NAN_GLEW)/lib/lib$(LIBNAME).a + ranlib $(NAN_GLEW)/lib/lib$(LIBNAME).a +endif + @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/GL/*.h $(NAN_GLEW)/include/GL + diff --git a/extern/glew/src/glew.c b/extern/glew/src/glew.c new file mode 100644 index 00000000000..593f0e58f7c --- /dev/null +++ b/extern/glew/src/glew.c @@ -0,0 +1,9756 @@ +/* +** The OpenGL Extension Wrangler Library +** Copyright (C) 2002-2006, Milan Ikits +** Copyright (C) 2002-2006, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev +** All rights reserved. +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are met: +** +** * Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** * The name of the author may be used to endorse or promote products +** derived from this software without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +** THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include +#if defined(_WIN32) +# include +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) +# include +#endif + +/* + * Define glewGetContext and related helper macros. + */ +#ifdef GLEW_MX +# define glewGetContext() ctx +# ifdef _WIN32 +# define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx +# define GLEW_CONTEXT_ARG_VAR_INIT ctx +# define wglewGetContext() ctx +# define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx +# define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx +# else /* _WIN32 */ +# define GLEW_CONTEXT_ARG_DEF_INIT void +# define GLEW_CONTEXT_ARG_VAR_INIT +# define glxewGetContext() ctx +# define GLXEW_CONTEXT_ARG_DEF_INIT void +# define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx +# endif /* _WIN32 */ +# define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx +#else /* GLEW_MX */ +# define GLEW_CONTEXT_ARG_DEF_INIT void +# define GLEW_CONTEXT_ARG_VAR_INIT +# define GLEW_CONTEXT_ARG_DEF_LIST void +# define WGLEW_CONTEXT_ARG_DEF_INIT void +# define WGLEW_CONTEXT_ARG_DEF_LIST void +# define GLXEW_CONTEXT_ARG_DEF_INIT void +# define GLXEW_CONTEXT_ARG_DEF_LIST void +#endif /* GLEW_MX */ + +#if defined(__APPLE__) +#include +#include +#include + +void* NSGLGetProcAddress (const GLubyte *name) +{ + NSSymbol symbol; + char* symbolName; + /* prepend a '_' for the Unix C symbol mangling convention */ + symbolName = malloc(strlen((const char*)name) + 2); + strcpy(symbolName+1, (const char*)name); + symbolName[0] = '_'; + symbol = NULL; + if (NSIsSymbolNameDefined(symbolName)) + symbol = NSLookupAndBindSymbol(symbolName); + free(symbolName); + return symbol ? NSAddressOfSymbol(symbol) : NULL; +} +#endif /* __APPLE__ */ + +#if defined(__sgi) || defined (__sun) +#include +#include +#include + +void* dlGetProcAddress (const GLubyte* name) +{ + static void* h = NULL; + static void* gpa; + + if (h == NULL) + { + if ((h = dlopen(NULL, RTLD_LAZY | RTLD_LOCAL)) == NULL) return NULL; + gpa = dlsym(h, "glXGetProcAddress"); + } + + if (gpa != NULL) + return ((void*(*)(const GLubyte*))gpa)(name); + else + return dlsym(h, (const char*)name); +} +#endif /* __sgi || __sun */ + +/* + * Define glewGetProcAddress. + */ +#if defined(_WIN32) +# define glewGetProcAddress(name) wglGetProcAddress((LPCSTR)name) +#else +# if defined(__APPLE__) +# define glewGetProcAddress(name) NSGLGetProcAddress(name) +# else +# if defined(__sgi) || defined(__sun) +# define glewGetProcAddress(name) dlGetProcAddress(name) +# else /* __linux */ +# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name) +# endif +# endif +#endif + +/* + * GLEW, just like OpenGL or GLU, does not rely on the standard C library. + * These functions implement the functionality required in this file. + */ + +static GLuint _glewStrLen (const GLubyte* s) +{ + GLuint i=0; + if (s == NULL) return 0; + while (s[i] != '\0') i++; + return i; +} + +static GLuint _glewStrCLen (const GLubyte* s, GLubyte c) +{ + GLuint i=0; + if (s == NULL) return 0; + while (s[i] != '\0' && s[i] != c) i++; + return s[i] == c ? i : 0; +} + +static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n) +{ + GLuint i=0; + if(a == NULL || b == NULL) + return (a == NULL && b == NULL && n == 0) ? GL_TRUE : GL_FALSE; + while (i < n && a[i] != '\0' && b[i] != '\0' && a[i] == b[i]) i++; + return i == n ? GL_TRUE : GL_FALSE; +} + +static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +{ + while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t')) + { + (*a)++; + (*na)--; + } + if(*na >= nb) + { + GLuint i=0; + while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++; + if(i == nb) + { + *a = *a + nb; + *na = *na - nb; + return GL_TRUE; + } + } + return GL_FALSE; +} + +static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +{ + if(*na >= nb) + { + GLuint i=0; + while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++; + if(i == nb) + { + *a = *a + nb; + *na = *na - nb; + return GL_TRUE; + } + } + return GL_FALSE; +} + +static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb) +{ + if(*na >= nb) + { + GLuint i=0; + while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++; + if (i == nb && (*na == nb || (*a)[i] == ' ' || (*a)[i] == '\n' || (*a)[i] == '\r' || (*a)[i] == '\t')) + { + *a = *a + nb; + *na = *na - nb; + return GL_TRUE; + } + } + return GL_FALSE; +} + +#if !defined(_WIN32) || !defined(GLEW_MX) + +PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D = NULL; +PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements = NULL; +PFNGLTEXIMAGE3DPROC __glewTexImage3D = NULL; +PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D = NULL; + +PFNGLACTIVETEXTUREPROC __glewActiveTexture = NULL; +PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture = NULL; +PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D = NULL; +PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D = NULL; +PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D = NULL; +PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage = NULL; +PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd = NULL; +PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf = NULL; +PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd = NULL; +PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf = NULL; +PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d = NULL; +PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv = NULL; +PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f = NULL; +PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv = NULL; +PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i = NULL; +PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv = NULL; +PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s = NULL; +PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv = NULL; +PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d = NULL; +PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv = NULL; +PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f = NULL; +PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv = NULL; +PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i = NULL; +PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv = NULL; +PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s = NULL; +PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv = NULL; +PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d = NULL; +PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv = NULL; +PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f = NULL; +PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv = NULL; +PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i = NULL; +PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv = NULL; +PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s = NULL; +PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv = NULL; +PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d = NULL; +PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv = NULL; +PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f = NULL; +PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv = NULL; +PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i = NULL; +PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv = NULL; +PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s = NULL; +PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv = NULL; +PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage = NULL; + +PFNGLBLENDCOLORPROC __glewBlendColor = NULL; +PFNGLBLENDEQUATIONPROC __glewBlendEquation = NULL; +PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate = NULL; +PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer = NULL; +PFNGLFOGCOORDDPROC __glewFogCoordd = NULL; +PFNGLFOGCOORDDVPROC __glewFogCoorddv = NULL; +PFNGLFOGCOORDFPROC __glewFogCoordf = NULL; +PFNGLFOGCOORDFVPROC __glewFogCoordfv = NULL; +PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays = NULL; +PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements = NULL; +PFNGLPOINTPARAMETERFPROC __glewPointParameterf = NULL; +PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv = NULL; +PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b = NULL; +PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv = NULL; +PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d = NULL; +PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv = NULL; +PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f = NULL; +PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv = NULL; +PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i = NULL; +PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv = NULL; +PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s = NULL; +PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv = NULL; +PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub = NULL; +PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv = NULL; +PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui = NULL; +PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv = NULL; +PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us = NULL; +PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv = NULL; +PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer = NULL; +PFNGLWINDOWPOS2DPROC __glewWindowPos2d = NULL; +PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv = NULL; +PFNGLWINDOWPOS2FPROC __glewWindowPos2f = NULL; +PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv = NULL; +PFNGLWINDOWPOS2IPROC __glewWindowPos2i = NULL; +PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv = NULL; +PFNGLWINDOWPOS2SPROC __glewWindowPos2s = NULL; +PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv = NULL; +PFNGLWINDOWPOS3DPROC __glewWindowPos3d = NULL; +PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv = NULL; +PFNGLWINDOWPOS3FPROC __glewWindowPos3f = NULL; +PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv = NULL; +PFNGLWINDOWPOS3IPROC __glewWindowPos3i = NULL; +PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv = NULL; +PFNGLWINDOWPOS3SPROC __glewWindowPos3s = NULL; +PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv = NULL; + +PFNGLBEGINQUERYPROC __glewBeginQuery = NULL; +PFNGLBINDBUFFERPROC __glewBindBuffer = NULL; +PFNGLBUFFERDATAPROC __glewBufferData = NULL; +PFNGLBUFFERSUBDATAPROC __glewBufferSubData = NULL; +PFNGLDELETEBUFFERSPROC __glewDeleteBuffers = NULL; +PFNGLDELETEQUERIESPROC __glewDeleteQueries = NULL; +PFNGLENDQUERYPROC __glewEndQuery = NULL; +PFNGLGENBUFFERSPROC __glewGenBuffers = NULL; +PFNGLGENQUERIESPROC __glewGenQueries = NULL; +PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv = NULL; +PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv = NULL; +PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData = NULL; +PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv = NULL; +PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv = NULL; +PFNGLGETQUERYIVPROC __glewGetQueryiv = NULL; +PFNGLISBUFFERPROC __glewIsBuffer = NULL; +PFNGLISQUERYPROC __glewIsQuery = NULL; +PFNGLMAPBUFFERPROC __glewMapBuffer = NULL; +PFNGLUNMAPBUFFERPROC __glewUnmapBuffer = NULL; + +PFNGLATTACHSHADERPROC __glewAttachShader = NULL; +PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation = NULL; +PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate = NULL; +PFNGLCOMPILESHADERPROC __glewCompileShader = NULL; +PFNGLCREATEPROGRAMPROC __glewCreateProgram = NULL; +PFNGLCREATESHADERPROC __glewCreateShader = NULL; +PFNGLDELETEPROGRAMPROC __glewDeleteProgram = NULL; +PFNGLDELETESHADERPROC __glewDeleteShader = NULL; +PFNGLDETACHSHADERPROC __glewDetachShader = NULL; +PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray = NULL; +PFNGLDRAWBUFFERSPROC __glewDrawBuffers = NULL; +PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray = NULL; +PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib = NULL; +PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform = NULL; +PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders = NULL; +PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation = NULL; +PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog = NULL; +PFNGLGETPROGRAMIVPROC __glewGetProgramiv = NULL; +PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog = NULL; +PFNGLGETSHADERSOURCEPROC __glewGetShaderSource = NULL; +PFNGLGETSHADERIVPROC __glewGetShaderiv = NULL; +PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation = NULL; +PFNGLGETUNIFORMFVPROC __glewGetUniformfv = NULL; +PFNGLGETUNIFORMIVPROC __glewGetUniformiv = NULL; +PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv = NULL; +PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv = NULL; +PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv = NULL; +PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv = NULL; +PFNGLISPROGRAMPROC __glewIsProgram = NULL; +PFNGLISSHADERPROC __glewIsShader = NULL; +PFNGLLINKPROGRAMPROC __glewLinkProgram = NULL; +PFNGLSHADERSOURCEPROC __glewShaderSource = NULL; +PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate = NULL; +PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate = NULL; +PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate = NULL; +PFNGLUNIFORM1FPROC __glewUniform1f = NULL; +PFNGLUNIFORM1FVPROC __glewUniform1fv = NULL; +PFNGLUNIFORM1IPROC __glewUniform1i = NULL; +PFNGLUNIFORM1IVPROC __glewUniform1iv = NULL; +PFNGLUNIFORM2FPROC __glewUniform2f = NULL; +PFNGLUNIFORM2FVPROC __glewUniform2fv = NULL; +PFNGLUNIFORM2IPROC __glewUniform2i = NULL; +PFNGLUNIFORM2IVPROC __glewUniform2iv = NULL; +PFNGLUNIFORM3FPROC __glewUniform3f = NULL; +PFNGLUNIFORM3FVPROC __glewUniform3fv = NULL; +PFNGLUNIFORM3IPROC __glewUniform3i = NULL; +PFNGLUNIFORM3IVPROC __glewUniform3iv = NULL; +PFNGLUNIFORM4FPROC __glewUniform4f = NULL; +PFNGLUNIFORM4FVPROC __glewUniform4fv = NULL; +PFNGLUNIFORM4IPROC __glewUniform4i = NULL; +PFNGLUNIFORM4IVPROC __glewUniform4iv = NULL; +PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv = NULL; +PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv = NULL; +PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv = NULL; +PFNGLUSEPROGRAMPROC __glewUseProgram = NULL; +PFNGLVALIDATEPROGRAMPROC __glewValidateProgram = NULL; +PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d = NULL; +PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv = NULL; +PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f = NULL; +PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv = NULL; +PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s = NULL; +PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv = NULL; +PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d = NULL; +PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv = NULL; +PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f = NULL; +PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv = NULL; +PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s = NULL; +PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv = NULL; +PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d = NULL; +PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv = NULL; +PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f = NULL; +PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv = NULL; +PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s = NULL; +PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv = NULL; +PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv = NULL; +PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv = NULL; +PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv = NULL; +PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub = NULL; +PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv = NULL; +PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv = NULL; +PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv = NULL; +PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv = NULL; +PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d = NULL; +PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv = NULL; +PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f = NULL; +PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv = NULL; +PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv = NULL; +PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s = NULL; +PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv = NULL; +PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv = NULL; +PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv = NULL; +PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv = NULL; +PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer = NULL; + +PFNGLTBUFFERMASK3DFXPROC __glewTbufferMask3DFX = NULL; + +PFNGLDRAWELEMENTARRAYAPPLEPROC __glewDrawElementArrayAPPLE = NULL; +PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC __glewDrawRangeElementArrayAPPLE = NULL; +PFNGLELEMENTPOINTERAPPLEPROC __glewElementPointerAPPLE = NULL; +PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC __glewMultiDrawElementArrayAPPLE = NULL; +PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC __glewMultiDrawRangeElementArrayAPPLE = NULL; + +PFNGLDELETEFENCESAPPLEPROC __glewDeleteFencesAPPLE = NULL; +PFNGLFINISHFENCEAPPLEPROC __glewFinishFenceAPPLE = NULL; +PFNGLFINISHOBJECTAPPLEPROC __glewFinishObjectAPPLE = NULL; +PFNGLGENFENCESAPPLEPROC __glewGenFencesAPPLE = NULL; +PFNGLISFENCEAPPLEPROC __glewIsFenceAPPLE = NULL; +PFNGLSETFENCEAPPLEPROC __glewSetFenceAPPLE = NULL; +PFNGLTESTFENCEAPPLEPROC __glewTestFenceAPPLE = NULL; +PFNGLTESTOBJECTAPPLEPROC __glewTestObjectAPPLE = NULL; + +PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC __glewGetTexParameterPointervAPPLE = NULL; +PFNGLTEXTURERANGEAPPLEPROC __glewTextureRangeAPPLE = NULL; + +PFNGLBINDVERTEXARRAYAPPLEPROC __glewBindVertexArrayAPPLE = NULL; +PFNGLDELETEVERTEXARRAYSAPPLEPROC __glewDeleteVertexArraysAPPLE = NULL; +PFNGLGENVERTEXARRAYSAPPLEPROC __glewGenVertexArraysAPPLE = NULL; +PFNGLISVERTEXARRAYAPPLEPROC __glewIsVertexArrayAPPLE = NULL; + +PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC __glewFlushVertexArrayRangeAPPLE = NULL; +PFNGLVERTEXARRAYPARAMETERIAPPLEPROC __glewVertexArrayParameteriAPPLE = NULL; +PFNGLVERTEXARRAYRANGEAPPLEPROC __glewVertexArrayRangeAPPLE = NULL; + +PFNGLCLAMPCOLORARBPROC __glewClampColorARB = NULL; + +PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB = NULL; + +PFNGLCOLORSUBTABLEPROC __glewColorSubTable = NULL; +PFNGLCOLORTABLEPROC __glewColorTable = NULL; +PFNGLCOLORTABLEPARAMETERFVPROC __glewColorTableParameterfv = NULL; +PFNGLCOLORTABLEPARAMETERIVPROC __glewColorTableParameteriv = NULL; +PFNGLCONVOLUTIONFILTER1DPROC __glewConvolutionFilter1D = NULL; +PFNGLCONVOLUTIONFILTER2DPROC __glewConvolutionFilter2D = NULL; +PFNGLCONVOLUTIONPARAMETERFPROC __glewConvolutionParameterf = NULL; +PFNGLCONVOLUTIONPARAMETERFVPROC __glewConvolutionParameterfv = NULL; +PFNGLCONVOLUTIONPARAMETERIPROC __glewConvolutionParameteri = NULL; +PFNGLCONVOLUTIONPARAMETERIVPROC __glewConvolutionParameteriv = NULL; +PFNGLCOPYCOLORSUBTABLEPROC __glewCopyColorSubTable = NULL; +PFNGLCOPYCOLORTABLEPROC __glewCopyColorTable = NULL; +PFNGLCOPYCONVOLUTIONFILTER1DPROC __glewCopyConvolutionFilter1D = NULL; +PFNGLCOPYCONVOLUTIONFILTER2DPROC __glewCopyConvolutionFilter2D = NULL; +PFNGLGETCOLORTABLEPROC __glewGetColorTable = NULL; +PFNGLGETCOLORTABLEPARAMETERFVPROC __glewGetColorTableParameterfv = NULL; +PFNGLGETCOLORTABLEPARAMETERIVPROC __glewGetColorTableParameteriv = NULL; +PFNGLGETCONVOLUTIONFILTERPROC __glewGetConvolutionFilter = NULL; +PFNGLGETCONVOLUTIONPARAMETERFVPROC __glewGetConvolutionParameterfv = NULL; +PFNGLGETCONVOLUTIONPARAMETERIVPROC __glewGetConvolutionParameteriv = NULL; +PFNGLGETHISTOGRAMPROC __glewGetHistogram = NULL; +PFNGLGETHISTOGRAMPARAMETERFVPROC __glewGetHistogramParameterfv = NULL; +PFNGLGETHISTOGRAMPARAMETERIVPROC __glewGetHistogramParameteriv = NULL; +PFNGLGETMINMAXPROC __glewGetMinmax = NULL; +PFNGLGETMINMAXPARAMETERFVPROC __glewGetMinmaxParameterfv = NULL; +PFNGLGETMINMAXPARAMETERIVPROC __glewGetMinmaxParameteriv = NULL; +PFNGLGETSEPARABLEFILTERPROC __glewGetSeparableFilter = NULL; +PFNGLHISTOGRAMPROC __glewHistogram = NULL; +PFNGLMINMAXPROC __glewMinmax = NULL; +PFNGLRESETHISTOGRAMPROC __glewResetHistogram = NULL; +PFNGLRESETMINMAXPROC __glewResetMinmax = NULL; +PFNGLSEPARABLEFILTER2DPROC __glewSeparableFilter2D = NULL; + +PFNGLCURRENTPALETTEMATRIXARBPROC __glewCurrentPaletteMatrixARB = NULL; +PFNGLMATRIXINDEXPOINTERARBPROC __glewMatrixIndexPointerARB = NULL; +PFNGLMATRIXINDEXUBVARBPROC __glewMatrixIndexubvARB = NULL; +PFNGLMATRIXINDEXUIVARBPROC __glewMatrixIndexuivARB = NULL; +PFNGLMATRIXINDEXUSVARBPROC __glewMatrixIndexusvARB = NULL; + +PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB = NULL; + +PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB = NULL; +PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB = NULL; +PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB = NULL; +PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB = NULL; +PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB = NULL; +PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB = NULL; +PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB = NULL; +PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB = NULL; +PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB = NULL; +PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB = NULL; +PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB = NULL; +PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB = NULL; +PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB = NULL; +PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB = NULL; +PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB = NULL; +PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB = NULL; +PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB = NULL; +PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB = NULL; +PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB = NULL; +PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB = NULL; +PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB = NULL; +PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB = NULL; +PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB = NULL; +PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB = NULL; +PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB = NULL; +PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB = NULL; +PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB = NULL; +PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB = NULL; +PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB = NULL; +PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB = NULL; +PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB = NULL; +PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB = NULL; +PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB = NULL; +PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB = NULL; + +PFNGLBEGINQUERYARBPROC __glewBeginQueryARB = NULL; +PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB = NULL; +PFNGLENDQUERYARBPROC __glewEndQueryARB = NULL; +PFNGLGENQUERIESARBPROC __glewGenQueriesARB = NULL; +PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB = NULL; +PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB = NULL; +PFNGLGETQUERYIVARBPROC __glewGetQueryivARB = NULL; +PFNGLISQUERYARBPROC __glewIsQueryARB = NULL; + +PFNGLPOINTPARAMETERFARBPROC __glewPointParameterfARB = NULL; +PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB = NULL; + +PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB = NULL; +PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB = NULL; +PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB = NULL; +PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB = NULL; +PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB = NULL; +PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB = NULL; +PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB = NULL; +PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB = NULL; +PFNGLGETHANDLEARBPROC __glewGetHandleARB = NULL; +PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB = NULL; +PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB = NULL; +PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB = NULL; +PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB = NULL; +PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB = NULL; +PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB = NULL; +PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB = NULL; +PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB = NULL; +PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB = NULL; +PFNGLUNIFORM1FARBPROC __glewUniform1fARB = NULL; +PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB = NULL; +PFNGLUNIFORM1IARBPROC __glewUniform1iARB = NULL; +PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB = NULL; +PFNGLUNIFORM2FARBPROC __glewUniform2fARB = NULL; +PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB = NULL; +PFNGLUNIFORM2IARBPROC __glewUniform2iARB = NULL; +PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB = NULL; +PFNGLUNIFORM3FARBPROC __glewUniform3fARB = NULL; +PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB = NULL; +PFNGLUNIFORM3IARBPROC __glewUniform3iARB = NULL; +PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB = NULL; +PFNGLUNIFORM4FARBPROC __glewUniform4fARB = NULL; +PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB = NULL; +PFNGLUNIFORM4IARBPROC __glewUniform4iARB = NULL; +PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB = NULL; +PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB = NULL; +PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB = NULL; +PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB = NULL; +PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB = NULL; +PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB = NULL; + +PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB = NULL; +PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB = NULL; +PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB = NULL; +PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB = NULL; +PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB = NULL; + +PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB = NULL; +PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB = NULL; +PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB = NULL; +PFNGLMULTTRANSPOSEMATRIXFARBPROC __glewMultTransposeMatrixfARB = NULL; + +PFNGLVERTEXBLENDARBPROC __glewVertexBlendARB = NULL; +PFNGLWEIGHTPOINTERARBPROC __glewWeightPointerARB = NULL; +PFNGLWEIGHTBVARBPROC __glewWeightbvARB = NULL; +PFNGLWEIGHTDVARBPROC __glewWeightdvARB = NULL; +PFNGLWEIGHTFVARBPROC __glewWeightfvARB = NULL; +PFNGLWEIGHTIVARBPROC __glewWeightivARB = NULL; +PFNGLWEIGHTSVARBPROC __glewWeightsvARB = NULL; +PFNGLWEIGHTUBVARBPROC __glewWeightubvARB = NULL; +PFNGLWEIGHTUIVARBPROC __glewWeightuivARB = NULL; +PFNGLWEIGHTUSVARBPROC __glewWeightusvARB = NULL; + +PFNGLBINDBUFFERARBPROC __glewBindBufferARB = NULL; +PFNGLBUFFERDATAARBPROC __glewBufferDataARB = NULL; +PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB = NULL; +PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB = NULL; +PFNGLGENBUFFERSARBPROC __glewGenBuffersARB = NULL; +PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB = NULL; +PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB = NULL; +PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB = NULL; +PFNGLISBUFFERARBPROC __glewIsBufferARB = NULL; +PFNGLMAPBUFFERARBPROC __glewMapBufferARB = NULL; +PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB = NULL; + +PFNGLBINDPROGRAMARBPROC __glewBindProgramARB = NULL; +PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB = NULL; +PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB = NULL; +PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB = NULL; +PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB = NULL; +PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB = NULL; +PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB = NULL; +PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB = NULL; +PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB = NULL; +PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB = NULL; +PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB = NULL; +PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB = NULL; +PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB = NULL; +PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB = NULL; +PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB = NULL; +PFNGLISPROGRAMARBPROC __glewIsProgramARB = NULL; +PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB = NULL; +PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB = NULL; +PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB = NULL; +PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB = NULL; +PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB = NULL; +PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB = NULL; +PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB = NULL; +PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB = NULL; +PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB = NULL; +PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB = NULL; +PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB = NULL; +PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB = NULL; +PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB = NULL; +PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB = NULL; +PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB = NULL; +PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB = NULL; +PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB = NULL; +PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB = NULL; +PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB = NULL; +PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB = NULL; +PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB = NULL; +PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB = NULL; +PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB = NULL; +PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB = NULL; +PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB = NULL; +PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB = NULL; +PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB = NULL; +PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB = NULL; +PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB = NULL; +PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB = NULL; +PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB = NULL; +PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB = NULL; +PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB = NULL; +PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB = NULL; +PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB = NULL; +PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB = NULL; +PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB = NULL; +PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB = NULL; +PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB = NULL; +PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB = NULL; +PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB = NULL; +PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB = NULL; +PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB = NULL; +PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB = NULL; +PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB = NULL; +PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB = NULL; + +PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB = NULL; +PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB = NULL; +PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB = NULL; + +PFNGLWINDOWPOS2DARBPROC __glewWindowPos2dARB = NULL; +PFNGLWINDOWPOS2DVARBPROC __glewWindowPos2dvARB = NULL; +PFNGLWINDOWPOS2FARBPROC __glewWindowPos2fARB = NULL; +PFNGLWINDOWPOS2FVARBPROC __glewWindowPos2fvARB = NULL; +PFNGLWINDOWPOS2IARBPROC __glewWindowPos2iARB = NULL; +PFNGLWINDOWPOS2IVARBPROC __glewWindowPos2ivARB = NULL; +PFNGLWINDOWPOS2SARBPROC __glewWindowPos2sARB = NULL; +PFNGLWINDOWPOS2SVARBPROC __glewWindowPos2svARB = NULL; +PFNGLWINDOWPOS3DARBPROC __glewWindowPos3dARB = NULL; +PFNGLWINDOWPOS3DVARBPROC __glewWindowPos3dvARB = NULL; +PFNGLWINDOWPOS3FARBPROC __glewWindowPos3fARB = NULL; +PFNGLWINDOWPOS3FVARBPROC __glewWindowPos3fvARB = NULL; +PFNGLWINDOWPOS3IARBPROC __glewWindowPos3iARB = NULL; +PFNGLWINDOWPOS3IVARBPROC __glewWindowPos3ivARB = NULL; +PFNGLWINDOWPOS3SARBPROC __glewWindowPos3sARB = NULL; +PFNGLWINDOWPOS3SVARBPROC __glewWindowPos3svARB = NULL; + +PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI = NULL; + +PFNGLDRAWELEMENTARRAYATIPROC __glewDrawElementArrayATI = NULL; +PFNGLDRAWRANGEELEMENTARRAYATIPROC __glewDrawRangeElementArrayATI = NULL; +PFNGLELEMENTPOINTERATIPROC __glewElementPointerATI = NULL; + +PFNGLGETTEXBUMPPARAMETERFVATIPROC __glewGetTexBumpParameterfvATI = NULL; +PFNGLGETTEXBUMPPARAMETERIVATIPROC __glewGetTexBumpParameterivATI = NULL; +PFNGLTEXBUMPPARAMETERFVATIPROC __glewTexBumpParameterfvATI = NULL; +PFNGLTEXBUMPPARAMETERIVATIPROC __glewTexBumpParameterivATI = NULL; + +PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI = NULL; +PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI = NULL; +PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI = NULL; +PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI = NULL; +PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI = NULL; +PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI = NULL; +PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI = NULL; +PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI = NULL; +PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI = NULL; +PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI = NULL; +PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI = NULL; +PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI = NULL; +PFNGLSAMPLEMAPATIPROC __glewSampleMapATI = NULL; +PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI = NULL; + +PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI = NULL; +PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI = NULL; + +PFNGLPNTRIANGLESFATIPROC __glPNTrianglewesfATI = NULL; +PFNGLPNTRIANGLESIATIPROC __glPNTrianglewesiATI = NULL; + +PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI = NULL; +PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI = NULL; + +PFNGLARRAYOBJECTATIPROC __glewArrayObjectATI = NULL; +PFNGLFREEOBJECTBUFFERATIPROC __glewFreeObjectBufferATI = NULL; +PFNGLGETARRAYOBJECTFVATIPROC __glewGetArrayObjectfvATI = NULL; +PFNGLGETARRAYOBJECTIVATIPROC __glewGetArrayObjectivATI = NULL; +PFNGLGETOBJECTBUFFERFVATIPROC __glewGetObjectBufferfvATI = NULL; +PFNGLGETOBJECTBUFFERIVATIPROC __glewGetObjectBufferivATI = NULL; +PFNGLGETVARIANTARRAYOBJECTFVATIPROC __glewGetVariantArrayObjectfvATI = NULL; +PFNGLGETVARIANTARRAYOBJECTIVATIPROC __glewGetVariantArrayObjectivATI = NULL; +PFNGLISOBJECTBUFFERATIPROC __glewIsObjectBufferATI = NULL; +PFNGLNEWOBJECTBUFFERATIPROC __glewNewObjectBufferATI = NULL; +PFNGLUPDATEOBJECTBUFFERATIPROC __glewUpdateObjectBufferATI = NULL; +PFNGLVARIANTARRAYOBJECTATIPROC __glewVariantArrayObjectATI = NULL; + +PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC __glewGetVertexAttribArrayObjectfvATI = NULL; +PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC __glewGetVertexAttribArrayObjectivATI = NULL; +PFNGLVERTEXATTRIBARRAYOBJECTATIPROC __glewVertexAttribArrayObjectATI = NULL; + +PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC __glewClientActiveVertexStreamATI = NULL; +PFNGLNORMALSTREAM3BATIPROC __glewNormalStream3bATI = NULL; +PFNGLNORMALSTREAM3BVATIPROC __glewNormalStream3bvATI = NULL; +PFNGLNORMALSTREAM3DATIPROC __glewNormalStream3dATI = NULL; +PFNGLNORMALSTREAM3DVATIPROC __glewNormalStream3dvATI = NULL; +PFNGLNORMALSTREAM3FATIPROC __glewNormalStream3fATI = NULL; +PFNGLNORMALSTREAM3FVATIPROC __glewNormalStream3fvATI = NULL; +PFNGLNORMALSTREAM3IATIPROC __glewNormalStream3iATI = NULL; +PFNGLNORMALSTREAM3IVATIPROC __glewNormalStream3ivATI = NULL; +PFNGLNORMALSTREAM3SATIPROC __glewNormalStream3sATI = NULL; +PFNGLNORMALSTREAM3SVATIPROC __glewNormalStream3svATI = NULL; +PFNGLVERTEXBLENDENVFATIPROC __glewVertexBlendEnvfATI = NULL; +PFNGLVERTEXBLENDENVIATIPROC __glewVertexBlendEnviATI = NULL; +PFNGLVERTEXSTREAM2DATIPROC __glewVertexStream2dATI = NULL; +PFNGLVERTEXSTREAM2DVATIPROC __glewVertexStream2dvATI = NULL; +PFNGLVERTEXSTREAM2FATIPROC __glewVertexStream2fATI = NULL; +PFNGLVERTEXSTREAM2FVATIPROC __glewVertexStream2fvATI = NULL; +PFNGLVERTEXSTREAM2IATIPROC __glewVertexStream2iATI = NULL; +PFNGLVERTEXSTREAM2IVATIPROC __glewVertexStream2ivATI = NULL; +PFNGLVERTEXSTREAM2SATIPROC __glewVertexStream2sATI = NULL; +PFNGLVERTEXSTREAM2SVATIPROC __glewVertexStream2svATI = NULL; +PFNGLVERTEXSTREAM3DATIPROC __glewVertexStream3dATI = NULL; +PFNGLVERTEXSTREAM3DVATIPROC __glewVertexStream3dvATI = NULL; +PFNGLVERTEXSTREAM3FATIPROC __glewVertexStream3fATI = NULL; +PFNGLVERTEXSTREAM3FVATIPROC __glewVertexStream3fvATI = NULL; +PFNGLVERTEXSTREAM3IATIPROC __glewVertexStream3iATI = NULL; +PFNGLVERTEXSTREAM3IVATIPROC __glewVertexStream3ivATI = NULL; +PFNGLVERTEXSTREAM3SATIPROC __glewVertexStream3sATI = NULL; +PFNGLVERTEXSTREAM3SVATIPROC __glewVertexStream3svATI = NULL; +PFNGLVERTEXSTREAM4DATIPROC __glewVertexStream4dATI = NULL; +PFNGLVERTEXSTREAM4DVATIPROC __glewVertexStream4dvATI = NULL; +PFNGLVERTEXSTREAM4FATIPROC __glewVertexStream4fATI = NULL; +PFNGLVERTEXSTREAM4FVATIPROC __glewVertexStream4fvATI = NULL; +PFNGLVERTEXSTREAM4IATIPROC __glewVertexStream4iATI = NULL; +PFNGLVERTEXSTREAM4IVATIPROC __glewVertexStream4ivATI = NULL; +PFNGLVERTEXSTREAM4SATIPROC __glewVertexStream4sATI = NULL; +PFNGLVERTEXSTREAM4SVATIPROC __glewVertexStream4svATI = NULL; + +PFNGLBLENDCOLOREXTPROC __glewBlendColorEXT = NULL; + +PFNGLBLENDEQUATIONSEPARATEEXTPROC __glewBlendEquationSeparateEXT = NULL; + +PFNGLBLENDFUNCSEPARATEEXTPROC __glewBlendFuncSeparateEXT = NULL; + +PFNGLBLENDEQUATIONEXTPROC __glewBlendEquationEXT = NULL; + +PFNGLCOLORSUBTABLEEXTPROC __glewColorSubTableEXT = NULL; +PFNGLCOPYCOLORSUBTABLEEXTPROC __glewCopyColorSubTableEXT = NULL; + +PFNGLLOCKARRAYSEXTPROC __glewLockArraysEXT = NULL; +PFNGLUNLOCKARRAYSEXTPROC __glewUnlockArraysEXT = NULL; + +PFNGLCONVOLUTIONFILTER1DEXTPROC __glewConvolutionFilter1DEXT = NULL; +PFNGLCONVOLUTIONFILTER2DEXTPROC __glewConvolutionFilter2DEXT = NULL; +PFNGLCONVOLUTIONPARAMETERFEXTPROC __glewConvolutionParameterfEXT = NULL; +PFNGLCONVOLUTIONPARAMETERFVEXTPROC __glewConvolutionParameterfvEXT = NULL; +PFNGLCONVOLUTIONPARAMETERIEXTPROC __glewConvolutionParameteriEXT = NULL; +PFNGLCONVOLUTIONPARAMETERIVEXTPROC __glewConvolutionParameterivEXT = NULL; +PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC __glewCopyConvolutionFilter1DEXT = NULL; +PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC __glewCopyConvolutionFilter2DEXT = NULL; +PFNGLGETCONVOLUTIONFILTEREXTPROC __glewGetConvolutionFilterEXT = NULL; +PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC __glewGetConvolutionParameterfvEXT = NULL; +PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC __glewGetConvolutionParameterivEXT = NULL; +PFNGLGETSEPARABLEFILTEREXTPROC __glewGetSeparableFilterEXT = NULL; +PFNGLSEPARABLEFILTER2DEXTPROC __glewSeparableFilter2DEXT = NULL; + +PFNGLBINORMALPOINTEREXTPROC __glewBinormalPointerEXT = NULL; +PFNGLTANGENTPOINTEREXTPROC __glewTangentPointerEXT = NULL; + +PFNGLCOPYTEXIMAGE1DEXTPROC __glewCopyTexImage1DEXT = NULL; +PFNGLCOPYTEXIMAGE2DEXTPROC __glewCopyTexImage2DEXT = NULL; +PFNGLCOPYTEXSUBIMAGE1DEXTPROC __glewCopyTexSubImage1DEXT = NULL; +PFNGLCOPYTEXSUBIMAGE2DEXTPROC __glewCopyTexSubImage2DEXT = NULL; +PFNGLCOPYTEXSUBIMAGE3DEXTPROC __glewCopyTexSubImage3DEXT = NULL; + +PFNGLCULLPARAMETERDVEXTPROC __glewCullParameterdvEXT = NULL; +PFNGLCULLPARAMETERFVEXTPROC __glewCullParameterfvEXT = NULL; + +PFNGLDEPTHBOUNDSEXTPROC __glewDepthBoundsEXT = NULL; + +PFNGLDRAWRANGEELEMENTSEXTPROC __glewDrawRangeElementsEXT = NULL; + +PFNGLFOGCOORDPOINTEREXTPROC __glewFogCoordPointerEXT = NULL; +PFNGLFOGCOORDDEXTPROC __glewFogCoorddEXT = NULL; +PFNGLFOGCOORDDVEXTPROC __glewFogCoorddvEXT = NULL; +PFNGLFOGCOORDFEXTPROC __glewFogCoordfEXT = NULL; +PFNGLFOGCOORDFVEXTPROC __glewFogCoordfvEXT = NULL; + +PFNGLFRAGMENTCOLORMATERIALEXTPROC __glewFragmentColorMaterialEXT = NULL; +PFNGLFRAGMENTLIGHTMODELFEXTPROC __glewFragmentLightModelfEXT = NULL; +PFNGLFRAGMENTLIGHTMODELFVEXTPROC __glewFragmentLightModelfvEXT = NULL; +PFNGLFRAGMENTLIGHTMODELIEXTPROC __glewFragmentLightModeliEXT = NULL; +PFNGLFRAGMENTLIGHTMODELIVEXTPROC __glewFragmentLightModelivEXT = NULL; +PFNGLFRAGMENTLIGHTFEXTPROC __glewFragmentLightfEXT = NULL; +PFNGLFRAGMENTLIGHTFVEXTPROC __glewFragmentLightfvEXT = NULL; +PFNGLFRAGMENTLIGHTIEXTPROC __glewFragmentLightiEXT = NULL; +PFNGLFRAGMENTLIGHTIVEXTPROC __glewFragmentLightivEXT = NULL; +PFNGLFRAGMENTMATERIALFEXTPROC __glewFragmentMaterialfEXT = NULL; +PFNGLFRAGMENTMATERIALFVEXTPROC __glewFragmentMaterialfvEXT = NULL; +PFNGLFRAGMENTMATERIALIEXTPROC __glewFragmentMaterialiEXT = NULL; +PFNGLFRAGMENTMATERIALIVEXTPROC __glewFragmentMaterialivEXT = NULL; +PFNGLGETFRAGMENTLIGHTFVEXTPROC __glewGetFragmentLightfvEXT = NULL; +PFNGLGETFRAGMENTLIGHTIVEXTPROC __glewGetFragmentLightivEXT = NULL; +PFNGLGETFRAGMENTMATERIALFVEXTPROC __glewGetFragmentMaterialfvEXT = NULL; +PFNGLGETFRAGMENTMATERIALIVEXTPROC __glewGetFragmentMaterialivEXT = NULL; +PFNGLLIGHTENVIEXTPROC __glewLightEnviEXT = NULL; + +PFNGLBLITFRAMEBUFFEREXTPROC __glewBlitFramebufferEXT = NULL; + +PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewRenderbufferStorageMultisampleEXT = NULL; + +PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT = NULL; +PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT = NULL; +PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT = NULL; +PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT = NULL; +PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT = NULL; +PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT = NULL; +PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT = NULL; +PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT = NULL; +PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT = NULL; +PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT = NULL; +PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT = NULL; +PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT = NULL; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT = NULL; +PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT = NULL; +PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT = NULL; +PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT = NULL; +PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT = NULL; + +PFNGLGETHISTOGRAMEXTPROC __glewGetHistogramEXT = NULL; +PFNGLGETHISTOGRAMPARAMETERFVEXTPROC __glewGetHistogramParameterfvEXT = NULL; +PFNGLGETHISTOGRAMPARAMETERIVEXTPROC __glewGetHistogramParameterivEXT = NULL; +PFNGLGETMINMAXEXTPROC __glewGetMinmaxEXT = NULL; +PFNGLGETMINMAXPARAMETERFVEXTPROC __glewGetMinmaxParameterfvEXT = NULL; +PFNGLGETMINMAXPARAMETERIVEXTPROC __glewGetMinmaxParameterivEXT = NULL; +PFNGLHISTOGRAMEXTPROC __glewHistogramEXT = NULL; +PFNGLMINMAXEXTPROC __glewMinmaxEXT = NULL; +PFNGLRESETHISTOGRAMEXTPROC __glewResetHistogramEXT = NULL; +PFNGLRESETMINMAXEXTPROC __glewResetMinmaxEXT = NULL; + +PFNGLINDEXFUNCEXTPROC __glewIndexFuncEXT = NULL; + +PFNGLINDEXMATERIALEXTPROC __glewIndexMaterialEXT = NULL; + +PFNGLAPPLYTEXTUREEXTPROC __glewApplyTextureEXT = NULL; +PFNGLTEXTURELIGHTEXTPROC __glewTextureLightEXT = NULL; +PFNGLTEXTUREMATERIALEXTPROC __glewTextureMaterialEXT = NULL; + +PFNGLMULTIDRAWARRAYSEXTPROC __glewMultiDrawArraysEXT = NULL; +PFNGLMULTIDRAWELEMENTSEXTPROC __glewMultiDrawElementsEXT = NULL; + +PFNGLSAMPLEMASKEXTPROC __glewSampleMaskEXT = NULL; +PFNGLSAMPLEPATTERNEXTPROC __glewSamplePatternEXT = NULL; + +PFNGLCOLORTABLEEXTPROC __glewColorTableEXT = NULL; +PFNGLGETCOLORTABLEEXTPROC __glewGetColorTableEXT = NULL; +PFNGLGETCOLORTABLEPARAMETERFVEXTPROC __glewGetColorTableParameterfvEXT = NULL; +PFNGLGETCOLORTABLEPARAMETERIVEXTPROC __glewGetColorTableParameterivEXT = NULL; + +PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC __glewGetPixelTransformParameterfvEXT = NULL; +PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC __glewGetPixelTransformParameterivEXT = NULL; +PFNGLPIXELTRANSFORMPARAMETERFEXTPROC __glewPixelTransformParameterfEXT = NULL; +PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC __glewPixelTransformParameterfvEXT = NULL; +PFNGLPIXELTRANSFORMPARAMETERIEXTPROC __glewPixelTransformParameteriEXT = NULL; +PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC __glewPixelTransformParameterivEXT = NULL; + +PFNGLPOINTPARAMETERFEXTPROC __glewPointParameterfEXT = NULL; +PFNGLPOINTPARAMETERFVEXTPROC __glewPointParameterfvEXT = NULL; + +PFNGLPOLYGONOFFSETEXTPROC __glewPolygonOffsetEXT = NULL; + +PFNGLBEGINSCENEEXTPROC __glewBeginSceneEXT = NULL; +PFNGLENDSCENEEXTPROC __glewEndSceneEXT = NULL; + +PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT = NULL; +PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT = NULL; +PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT = NULL; +PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT = NULL; +PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT = NULL; +PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT = NULL; +PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT = NULL; +PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT = NULL; +PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT = NULL; +PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT = NULL; +PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT = NULL; +PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT = NULL; +PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT = NULL; +PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT = NULL; +PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT = NULL; +PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT = NULL; +PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT = NULL; + +PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT = NULL; + +PFNGLTEXSUBIMAGE1DEXTPROC __glewTexSubImage1DEXT = NULL; +PFNGLTEXSUBIMAGE2DEXTPROC __glewTexSubImage2DEXT = NULL; +PFNGLTEXSUBIMAGE3DEXTPROC __glewTexSubImage3DEXT = NULL; + +PFNGLTEXIMAGE3DEXTPROC __glewTexImage3DEXT = NULL; + +PFNGLARETEXTURESRESIDENTEXTPROC __glewAreTexturesResidentEXT = NULL; +PFNGLBINDTEXTUREEXTPROC __glewBindTextureEXT = NULL; +PFNGLDELETETEXTURESEXTPROC __glewDeleteTexturesEXT = NULL; +PFNGLGENTEXTURESEXTPROC __glewGenTexturesEXT = NULL; +PFNGLISTEXTUREEXTPROC __glewIsTextureEXT = NULL; +PFNGLPRIORITIZETEXTURESEXTPROC __glewPrioritizeTexturesEXT = NULL; + +PFNGLTEXTURENORMALEXTPROC __glewTextureNormalEXT = NULL; + +PFNGLARRAYELEMENTEXTPROC __glewArrayElementEXT = NULL; +PFNGLCOLORPOINTEREXTPROC __glewColorPointerEXT = NULL; +PFNGLDRAWARRAYSEXTPROC __glewDrawArraysEXT = NULL; +PFNGLEDGEFLAGPOINTEREXTPROC __glewEdgeFlagPointerEXT = NULL; +PFNGLGETPOINTERVEXTPROC __glewGetPointervEXT = NULL; +PFNGLINDEXPOINTEREXTPROC __glewIndexPointerEXT = NULL; +PFNGLNORMALPOINTEREXTPROC __glewNormalPointerEXT = NULL; +PFNGLTEXCOORDPOINTEREXTPROC __glewTexCoordPointerEXT = NULL; +PFNGLVERTEXPOINTEREXTPROC __glewVertexPointerEXT = NULL; + +PFNGLBEGINVERTEXSHADEREXTPROC __glewBeginVertexShaderEXT = NULL; +PFNGLBINDLIGHTPARAMETEREXTPROC __glewBindLightParameterEXT = NULL; +PFNGLBINDMATERIALPARAMETEREXTPROC __glewBindMaterialParameterEXT = NULL; +PFNGLBINDPARAMETEREXTPROC __glewBindParameterEXT = NULL; +PFNGLBINDTEXGENPARAMETEREXTPROC __glewBindTexGenParameterEXT = NULL; +PFNGLBINDTEXTUREUNITPARAMETEREXTPROC __glewBindTextureUnitParameterEXT = NULL; +PFNGLBINDVERTEXSHADEREXTPROC __glewBindVertexShaderEXT = NULL; +PFNGLDELETEVERTEXSHADEREXTPROC __glewDeleteVertexShaderEXT = NULL; +PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC __glewDisableVariantClientStateEXT = NULL; +PFNGLENABLEVARIANTCLIENTSTATEEXTPROC __glewEnableVariantClientStateEXT = NULL; +PFNGLENDVERTEXSHADEREXTPROC __glewEndVertexShaderEXT = NULL; +PFNGLEXTRACTCOMPONENTEXTPROC __glewExtractComponentEXT = NULL; +PFNGLGENSYMBOLSEXTPROC __glewGenSymbolsEXT = NULL; +PFNGLGENVERTEXSHADERSEXTPROC __glewGenVertexShadersEXT = NULL; +PFNGLGETINVARIANTBOOLEANVEXTPROC __glewGetInvariantBooleanvEXT = NULL; +PFNGLGETINVARIANTFLOATVEXTPROC __glewGetInvariantFloatvEXT = NULL; +PFNGLGETINVARIANTINTEGERVEXTPROC __glewGetInvariantIntegervEXT = NULL; +PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC __glewGetLocalConstantBooleanvEXT = NULL; +PFNGLGETLOCALCONSTANTFLOATVEXTPROC __glewGetLocalConstantFloatvEXT = NULL; +PFNGLGETLOCALCONSTANTINTEGERVEXTPROC __glewGetLocalConstantIntegervEXT = NULL; +PFNGLGETVARIANTBOOLEANVEXTPROC __glewGetVariantBooleanvEXT = NULL; +PFNGLGETVARIANTFLOATVEXTPROC __glewGetVariantFloatvEXT = NULL; +PFNGLGETVARIANTINTEGERVEXTPROC __glewGetVariantIntegervEXT = NULL; +PFNGLGETVARIANTPOINTERVEXTPROC __glewGetVariantPointervEXT = NULL; +PFNGLINSERTCOMPONENTEXTPROC __glewInsertComponentEXT = NULL; +PFNGLISVARIANTENABLEDEXTPROC __glewIsVariantEnabledEXT = NULL; +PFNGLSETINVARIANTEXTPROC __glewSetInvariantEXT = NULL; +PFNGLSETLOCALCONSTANTEXTPROC __glewSetLocalConstantEXT = NULL; +PFNGLSHADEROP1EXTPROC __glewShaderOp1EXT = NULL; +PFNGLSHADEROP2EXTPROC __glewShaderOp2EXT = NULL; +PFNGLSHADEROP3EXTPROC __glewShaderOp3EXT = NULL; +PFNGLSWIZZLEEXTPROC __glewSwizzleEXT = NULL; +PFNGLVARIANTPOINTEREXTPROC __glewVariantPointerEXT = NULL; +PFNGLVARIANTBVEXTPROC __glewVariantbvEXT = NULL; +PFNGLVARIANTDVEXTPROC __glewVariantdvEXT = NULL; +PFNGLVARIANTFVEXTPROC __glewVariantfvEXT = NULL; +PFNGLVARIANTIVEXTPROC __glewVariantivEXT = NULL; +PFNGLVARIANTSVEXTPROC __glewVariantsvEXT = NULL; +PFNGLVARIANTUBVEXTPROC __glewVariantubvEXT = NULL; +PFNGLVARIANTUIVEXTPROC __glewVariantuivEXT = NULL; +PFNGLVARIANTUSVEXTPROC __glewVariantusvEXT = NULL; +PFNGLWRITEMASKEXTPROC __glewWriteMaskEXT = NULL; + +PFNGLVERTEXWEIGHTPOINTEREXTPROC __glewVertexWeightPointerEXT = NULL; +PFNGLVERTEXWEIGHTFEXTPROC __glewVertexWeightfEXT = NULL; +PFNGLVERTEXWEIGHTFVEXTPROC __glewVertexWeightfvEXT = NULL; + +PFNGLSTRINGMARKERGREMEDYPROC __glewStringMarkerGREMEDY = NULL; + +PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC __glewGetImageTransformParameterfvHP = NULL; +PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC __glewGetImageTransformParameterivHP = NULL; +PFNGLIMAGETRANSFORMPARAMETERFHPPROC __glewImageTransformParameterfHP = NULL; +PFNGLIMAGETRANSFORMPARAMETERFVHPPROC __glewImageTransformParameterfvHP = NULL; +PFNGLIMAGETRANSFORMPARAMETERIHPPROC __glewImageTransformParameteriHP = NULL; +PFNGLIMAGETRANSFORMPARAMETERIVHPPROC __glewImageTransformParameterivHP = NULL; + +PFNGLMULTIMODEDRAWARRAYSIBMPROC __glewMultiModeDrawArraysIBM = NULL; +PFNGLMULTIMODEDRAWELEMENTSIBMPROC __glewMultiModeDrawElementsIBM = NULL; + +PFNGLCOLORPOINTERLISTIBMPROC __glewColorPointerListIBM = NULL; +PFNGLEDGEFLAGPOINTERLISTIBMPROC __glewEdgeFlagPointerListIBM = NULL; +PFNGLFOGCOORDPOINTERLISTIBMPROC __glewFogCoordPointerListIBM = NULL; +PFNGLINDEXPOINTERLISTIBMPROC __glewIndexPointerListIBM = NULL; +PFNGLNORMALPOINTERLISTIBMPROC __glewNormalPointerListIBM = NULL; +PFNGLSECONDARYCOLORPOINTERLISTIBMPROC __glewSecondaryColorPointerListIBM = NULL; +PFNGLTEXCOORDPOINTERLISTIBMPROC __glewTexCoordPointerListIBM = NULL; +PFNGLVERTEXPOINTERLISTIBMPROC __glewVertexPointerListIBM = NULL; + +PFNGLCOLORPOINTERVINTELPROC __glewColorPointervINTEL = NULL; +PFNGLNORMALPOINTERVINTELPROC __glewNormalPointervINTEL = NULL; +PFNGLTEXCOORDPOINTERVINTELPROC __glewTexCoordPointervINTEL = NULL; +PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL = NULL; + +PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL = NULL; +PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL = NULL; + +PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT = NULL; +PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT = NULL; +PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT = NULL; +PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT = NULL; +PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT = NULL; + +PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA = NULL; + +PFNGLWINDOWPOS2DMESAPROC __glewWindowPos2dMESA = NULL; +PFNGLWINDOWPOS2DVMESAPROC __glewWindowPos2dvMESA = NULL; +PFNGLWINDOWPOS2FMESAPROC __glewWindowPos2fMESA = NULL; +PFNGLWINDOWPOS2FVMESAPROC __glewWindowPos2fvMESA = NULL; +PFNGLWINDOWPOS2IMESAPROC __glewWindowPos2iMESA = NULL; +PFNGLWINDOWPOS2IVMESAPROC __glewWindowPos2ivMESA = NULL; +PFNGLWINDOWPOS2SMESAPROC __glewWindowPos2sMESA = NULL; +PFNGLWINDOWPOS2SVMESAPROC __glewWindowPos2svMESA = NULL; +PFNGLWINDOWPOS3DMESAPROC __glewWindowPos3dMESA = NULL; +PFNGLWINDOWPOS3DVMESAPROC __glewWindowPos3dvMESA = NULL; +PFNGLWINDOWPOS3FMESAPROC __glewWindowPos3fMESA = NULL; +PFNGLWINDOWPOS3FVMESAPROC __glewWindowPos3fvMESA = NULL; +PFNGLWINDOWPOS3IMESAPROC __glewWindowPos3iMESA = NULL; +PFNGLWINDOWPOS3IVMESAPROC __glewWindowPos3ivMESA = NULL; +PFNGLWINDOWPOS3SMESAPROC __glewWindowPos3sMESA = NULL; +PFNGLWINDOWPOS3SVMESAPROC __glewWindowPos3svMESA = NULL; +PFNGLWINDOWPOS4DMESAPROC __glewWindowPos4dMESA = NULL; +PFNGLWINDOWPOS4DVMESAPROC __glewWindowPos4dvMESA = NULL; +PFNGLWINDOWPOS4FMESAPROC __glewWindowPos4fMESA = NULL; +PFNGLWINDOWPOS4FVMESAPROC __glewWindowPos4fvMESA = NULL; +PFNGLWINDOWPOS4IMESAPROC __glewWindowPos4iMESA = NULL; +PFNGLWINDOWPOS4IVMESAPROC __glewWindowPos4ivMESA = NULL; +PFNGLWINDOWPOS4SMESAPROC __glewWindowPos4sMESA = NULL; +PFNGLWINDOWPOS4SVMESAPROC __glewWindowPos4svMESA = NULL; + +PFNGLEVALMAPSNVPROC __glewEvalMapsNV = NULL; +PFNGLGETMAPATTRIBPARAMETERFVNVPROC __glewGetMapAttribParameterfvNV = NULL; +PFNGLGETMAPATTRIBPARAMETERIVNVPROC __glewGetMapAttribParameterivNV = NULL; +PFNGLGETMAPCONTROLPOINTSNVPROC __glewGetMapControlPointsNV = NULL; +PFNGLGETMAPPARAMETERFVNVPROC __glewGetMapParameterfvNV = NULL; +PFNGLGETMAPPARAMETERIVNVPROC __glewGetMapParameterivNV = NULL; +PFNGLMAPCONTROLPOINTSNVPROC __glewMapControlPointsNV = NULL; +PFNGLMAPPARAMETERFVNVPROC __glewMapParameterfvNV = NULL; +PFNGLMAPPARAMETERIVNVPROC __glewMapParameterivNV = NULL; + +PFNGLDELETEFENCESNVPROC __glewDeleteFencesNV = NULL; +PFNGLFINISHFENCENVPROC __glewFinishFenceNV = NULL; +PFNGLGENFENCESNVPROC __glewGenFencesNV = NULL; +PFNGLGETFENCEIVNVPROC __glewGetFenceivNV = NULL; +PFNGLISFENCENVPROC __glewIsFenceNV = NULL; +PFNGLSETFENCENVPROC __glewSetFenceNV = NULL; +PFNGLTESTFENCENVPROC __glewTestFenceNV = NULL; + +PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV = NULL; +PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV = NULL; +PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV = NULL; +PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV = NULL; +PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV = NULL; +PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV = NULL; + +PFNGLCOLOR3HNVPROC __glewColor3hNV = NULL; +PFNGLCOLOR3HVNVPROC __glewColor3hvNV = NULL; +PFNGLCOLOR4HNVPROC __glewColor4hNV = NULL; +PFNGLCOLOR4HVNVPROC __glewColor4hvNV = NULL; +PFNGLFOGCOORDHNVPROC __glewFogCoordhNV = NULL; +PFNGLFOGCOORDHVNVPROC __glewFogCoordhvNV = NULL; +PFNGLMULTITEXCOORD1HNVPROC __glewMultiTexCoord1hNV = NULL; +PFNGLMULTITEXCOORD1HVNVPROC __glewMultiTexCoord1hvNV = NULL; +PFNGLMULTITEXCOORD2HNVPROC __glewMultiTexCoord2hNV = NULL; +PFNGLMULTITEXCOORD2HVNVPROC __glewMultiTexCoord2hvNV = NULL; +PFNGLMULTITEXCOORD3HNVPROC __glewMultiTexCoord3hNV = NULL; +PFNGLMULTITEXCOORD3HVNVPROC __glewMultiTexCoord3hvNV = NULL; +PFNGLMULTITEXCOORD4HNVPROC __glewMultiTexCoord4hNV = NULL; +PFNGLMULTITEXCOORD4HVNVPROC __glewMultiTexCoord4hvNV = NULL; +PFNGLNORMAL3HNVPROC __glewNormal3hNV = NULL; +PFNGLNORMAL3HVNVPROC __glewNormal3hvNV = NULL; +PFNGLSECONDARYCOLOR3HNVPROC __glewSecondaryColor3hNV = NULL; +PFNGLSECONDARYCOLOR3HVNVPROC __glewSecondaryColor3hvNV = NULL; +PFNGLTEXCOORD1HNVPROC __glewTexCoord1hNV = NULL; +PFNGLTEXCOORD1HVNVPROC __glewTexCoord1hvNV = NULL; +PFNGLTEXCOORD2HNVPROC __glewTexCoord2hNV = NULL; +PFNGLTEXCOORD2HVNVPROC __glewTexCoord2hvNV = NULL; +PFNGLTEXCOORD3HNVPROC __glewTexCoord3hNV = NULL; +PFNGLTEXCOORD3HVNVPROC __glewTexCoord3hvNV = NULL; +PFNGLTEXCOORD4HNVPROC __glewTexCoord4hNV = NULL; +PFNGLTEXCOORD4HVNVPROC __glewTexCoord4hvNV = NULL; +PFNGLVERTEX2HNVPROC __glewVertex2hNV = NULL; +PFNGLVERTEX2HVNVPROC __glewVertex2hvNV = NULL; +PFNGLVERTEX3HNVPROC __glewVertex3hNV = NULL; +PFNGLVERTEX3HVNVPROC __glewVertex3hvNV = NULL; +PFNGLVERTEX4HNVPROC __glewVertex4hNV = NULL; +PFNGLVERTEX4HVNVPROC __glewVertex4hvNV = NULL; +PFNGLVERTEXATTRIB1HNVPROC __glewVertexAttrib1hNV = NULL; +PFNGLVERTEXATTRIB1HVNVPROC __glewVertexAttrib1hvNV = NULL; +PFNGLVERTEXATTRIB2HNVPROC __glewVertexAttrib2hNV = NULL; +PFNGLVERTEXATTRIB2HVNVPROC __glewVertexAttrib2hvNV = NULL; +PFNGLVERTEXATTRIB3HNVPROC __glewVertexAttrib3hNV = NULL; +PFNGLVERTEXATTRIB3HVNVPROC __glewVertexAttrib3hvNV = NULL; +PFNGLVERTEXATTRIB4HNVPROC __glewVertexAttrib4hNV = NULL; +PFNGLVERTEXATTRIB4HVNVPROC __glewVertexAttrib4hvNV = NULL; +PFNGLVERTEXATTRIBS1HVNVPROC __glewVertexAttribs1hvNV = NULL; +PFNGLVERTEXATTRIBS2HVNVPROC __glewVertexAttribs2hvNV = NULL; +PFNGLVERTEXATTRIBS3HVNVPROC __glewVertexAttribs3hvNV = NULL; +PFNGLVERTEXATTRIBS4HVNVPROC __glewVertexAttribs4hvNV = NULL; +PFNGLVERTEXWEIGHTHNVPROC __glewVertexWeighthNV = NULL; +PFNGLVERTEXWEIGHTHVNVPROC __glewVertexWeighthvNV = NULL; + +PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV = NULL; +PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV = NULL; +PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV = NULL; +PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV = NULL; +PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV = NULL; +PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV = NULL; +PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV = NULL; + +PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV = NULL; +PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV = NULL; + +PFNGLPOINTPARAMETERINVPROC __glewPointParameteriNV = NULL; +PFNGLPOINTPARAMETERIVNVPROC __glewPointParameterivNV = NULL; + +PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV = NULL; +PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV = NULL; + +PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV = NULL; +PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV = NULL; +PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV = NULL; +PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV = NULL; +PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV = NULL; +PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV = NULL; +PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV = NULL; +PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV = NULL; +PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV = NULL; +PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV = NULL; +PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV = NULL; +PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV = NULL; +PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV = NULL; + +PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV = NULL; +PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV = NULL; + +PFNGLFLUSHVERTEXARRAYRANGENVPROC __glewFlushVertexArrayRangeNV = NULL; +PFNGLVERTEXARRAYRANGENVPROC __glewVertexArrayRangeNV = NULL; + +PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV = NULL; +PFNGLBINDPROGRAMNVPROC __glewBindProgramNV = NULL; +PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV = NULL; +PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV = NULL; +PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV = NULL; +PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV = NULL; +PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV = NULL; +PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV = NULL; +PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV = NULL; +PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV = NULL; +PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV = NULL; +PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV = NULL; +PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV = NULL; +PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV = NULL; +PFNGLISPROGRAMNVPROC __glewIsProgramNV = NULL; +PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV = NULL; +PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV = NULL; +PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV = NULL; +PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV = NULL; +PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV = NULL; +PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV = NULL; +PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV = NULL; +PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV = NULL; +PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV = NULL; +PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV = NULL; +PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV = NULL; +PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV = NULL; +PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV = NULL; +PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV = NULL; +PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV = NULL; +PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV = NULL; +PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV = NULL; +PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV = NULL; +PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV = NULL; +PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV = NULL; +PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV = NULL; +PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV = NULL; +PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV = NULL; +PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV = NULL; +PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV = NULL; +PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV = NULL; +PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV = NULL; +PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV = NULL; +PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV = NULL; +PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV = NULL; +PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV = NULL; +PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV = NULL; +PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV = NULL; +PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV = NULL; +PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV = NULL; +PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV = NULL; +PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV = NULL; +PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV = NULL; +PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV = NULL; +PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV = NULL; +PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV = NULL; +PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV = NULL; +PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV = NULL; +PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV = NULL; +PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV = NULL; +PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV = NULL; +PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV = NULL; +PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV = NULL; +PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV = NULL; + +PFNGLDETAILTEXFUNCSGISPROC __glewDetailTexFuncSGIS = NULL; +PFNGLGETDETAILTEXFUNCSGISPROC __glewGetDetailTexFuncSGIS = NULL; + +PFNGLFOGFUNCSGISPROC __glewFogFuncSGIS = NULL; +PFNGLGETFOGFUNCSGISPROC __glewGetFogFuncSGIS = NULL; + +PFNGLSAMPLEMASKSGISPROC __glewSampleMaskSGIS = NULL; +PFNGLSAMPLEPATTERNSGISPROC __glewSamplePatternSGIS = NULL; + +PFNGLGETSHARPENTEXFUNCSGISPROC __glewGetSharpenTexFuncSGIS = NULL; +PFNGLSHARPENTEXFUNCSGISPROC __glewSharpenTexFuncSGIS = NULL; + +PFNGLTEXIMAGE4DSGISPROC __glewTexImage4DSGIS = NULL; +PFNGLTEXSUBIMAGE4DSGISPROC __glewTexSubImage4DSGIS = NULL; + +PFNGLGETTEXFILTERFUNCSGISPROC __glewGetTexFilterFuncSGIS = NULL; +PFNGLTEXFILTERFUNCSGISPROC __glewTexFilterFuncSGIS = NULL; + +PFNGLASYNCMARKERSGIXPROC __glewAsyncMarkerSGIX = NULL; +PFNGLDELETEASYNCMARKERSSGIXPROC __glewDeleteAsyncMarkersSGIX = NULL; +PFNGLFINISHASYNCSGIXPROC __glewFinishAsyncSGIX = NULL; +PFNGLGENASYNCMARKERSSGIXPROC __glewGenAsyncMarkersSGIX = NULL; +PFNGLISASYNCMARKERSGIXPROC __glewIsAsyncMarkerSGIX = NULL; +PFNGLPOLLASYNCSGIXPROC __glewPollAsyncSGIX = NULL; + +PFNGLFLUSHRASTERSGIXPROC __glewFlushRasterSGIX = NULL; + +PFNGLTEXTUREFOGSGIXPROC __glewTextureFogSGIX = NULL; + +#if 0 +PFNGLFRAGMENTCOLORMATERIALSGIXPROC __glewFragmentColorMaterialSGIX = NULL; +PFNGLFRAGMENTLIGHTMODELFSGIXPROC __glewFragmentLightModelfSGIX = NULL; +PFNGLFRAGMENTLIGHTMODELFVSGIXPROC __glewFragmentLightModelfvSGIX = NULL; +PFNGLFRAGMENTLIGHTMODELISGIXPROC __glewFragmentLightModeliSGIX = NULL; +PFNGLFRAGMENTLIGHTMODELIVSGIXPROC __glewFragmentLightModelivSGIX = NULL; +PFNGLFRAGMENTLIGHTFSGIXPROC __glewFragmentLightfSGIX = NULL; +PFNGLFRAGMENTLIGHTFVSGIXPROC __glewFragmentLightfvSGIX = NULL; +PFNGLFRAGMENTLIGHTISGIXPROC __glewFragmentLightiSGIX = NULL; +PFNGLFRAGMENTLIGHTIVSGIXPROC __glewFragmentLightivSGIX = NULL; +PFNGLFRAGMENTMATERIALFSGIXPROC __glewFragmentMaterialfSGIX = NULL; +PFNGLFRAGMENTMATERIALFVSGIXPROC __glewFragmentMaterialfvSGIX = NULL; +PFNGLFRAGMENTMATERIALISGIXPROC __glewFragmentMaterialiSGIX = NULL; +PFNGLFRAGMENTMATERIALIVSGIXPROC __glewFragmentMaterialivSGIX = NULL; +PFNGLGETFRAGMENTLIGHTFVSGIXPROC __glewGetFragmentLightfvSGIX = NULL; +PFNGLGETFRAGMENTLIGHTIVSGIXPROC __glewGetFragmentLightivSGIX = NULL; +PFNGLGETFRAGMENTMATERIALFVSGIXPROC __glewGetFragmentMaterialfvSGIX = NULL; +PFNGLGETFRAGMENTMATERIALIVSGIXPROC __glewGetFragmentMaterialivSGIX = NULL; +#endif + +PFNGLFRAMEZOOMSGIXPROC __glewFrameZoomSGIX = NULL; + +PFNGLPIXELTEXGENSGIXPROC __glewPixelTexGenSGIX = NULL; + +PFNGLREFERENCEPLANESGIXPROC __glewReferencePlaneSGIX = NULL; + +PFNGLSPRITEPARAMETERFSGIXPROC __glewSpriteParameterfSGIX = NULL; +PFNGLSPRITEPARAMETERFVSGIXPROC __glewSpriteParameterfvSGIX = NULL; +PFNGLSPRITEPARAMETERISGIXPROC __glewSpriteParameteriSGIX = NULL; +PFNGLSPRITEPARAMETERIVSGIXPROC __glewSpriteParameterivSGIX = NULL; + +PFNGLTAGSAMPLEBUFFERSGIXPROC __glewTagSampleBufferSGIX = NULL; + +PFNGLCOLORTABLEPARAMETERFVSGIPROC __glewColorTableParameterfvSGI = NULL; +PFNGLCOLORTABLEPARAMETERIVSGIPROC __glewColorTableParameterivSGI = NULL; +PFNGLCOLORTABLESGIPROC __glewColorTableSGI = NULL; +PFNGLCOPYCOLORTABLESGIPROC __glewCopyColorTableSGI = NULL; +PFNGLGETCOLORTABLEPARAMETERFVSGIPROC __glewGetColorTableParameterfvSGI = NULL; +PFNGLGETCOLORTABLEPARAMETERIVSGIPROC __glewGetColorTableParameterivSGI = NULL; +PFNGLGETCOLORTABLESGIPROC __glewGetColorTableSGI = NULL; + +PFNGLFINISHTEXTURESUNXPROC __glewFinishTextureSUNX = NULL; + +PFNGLGLOBALALPHAFACTORBSUNPROC __glewGlobalAlphaFactorbSUN = NULL; +PFNGLGLOBALALPHAFACTORDSUNPROC __glewGlobalAlphaFactordSUN = NULL; +PFNGLGLOBALALPHAFACTORFSUNPROC __glewGlobalAlphaFactorfSUN = NULL; +PFNGLGLOBALALPHAFACTORISUNPROC __glewGlobalAlphaFactoriSUN = NULL; +PFNGLGLOBALALPHAFACTORSSUNPROC __glewGlobalAlphaFactorsSUN = NULL; +PFNGLGLOBALALPHAFACTORUBSUNPROC __glewGlobalAlphaFactorubSUN = NULL; +PFNGLGLOBALALPHAFACTORUISUNPROC __glewGlobalAlphaFactoruiSUN = NULL; +PFNGLGLOBALALPHAFACTORUSSUNPROC __glewGlobalAlphaFactorusSUN = NULL; + +PFNGLREADVIDEOPIXELSSUNPROC __glewReadVideoPixelsSUN = NULL; + +PFNGLREPLACEMENTCODEPOINTERSUNPROC __glewReplacementCodePointerSUN = NULL; +PFNGLREPLACEMENTCODEUBSUNPROC __glewReplacementCodeubSUN = NULL; +PFNGLREPLACEMENTCODEUBVSUNPROC __glewReplacementCodeubvSUN = NULL; +PFNGLREPLACEMENTCODEUISUNPROC __glewReplacementCodeuiSUN = NULL; +PFNGLREPLACEMENTCODEUIVSUNPROC __glewReplacementCodeuivSUN = NULL; +PFNGLREPLACEMENTCODEUSSUNPROC __glewReplacementCodeusSUN = NULL; +PFNGLREPLACEMENTCODEUSVSUNPROC __glewReplacementCodeusvSUN = NULL; + +PFNGLCOLOR3FVERTEX3FSUNPROC __glewColor3fVertex3fSUN = NULL; +PFNGLCOLOR3FVERTEX3FVSUNPROC __glewColor3fVertex3fvSUN = NULL; +PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewColor4fNormal3fVertex3fSUN = NULL; +PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewColor4fNormal3fVertex3fvSUN = NULL; +PFNGLCOLOR4UBVERTEX2FSUNPROC __glewColor4ubVertex2fSUN = NULL; +PFNGLCOLOR4UBVERTEX2FVSUNPROC __glewColor4ubVertex2fvSUN = NULL; +PFNGLCOLOR4UBVERTEX3FSUNPROC __glewColor4ubVertex3fSUN = NULL; +PFNGLCOLOR4UBVERTEX3FVSUNPROC __glewColor4ubVertex3fvSUN = NULL; +PFNGLNORMAL3FVERTEX3FSUNPROC __glewNormal3fVertex3fSUN = NULL; +PFNGLNORMAL3FVERTEX3FVSUNPROC __glewNormal3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC __glewReplacementCodeuiColor3fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC __glewReplacementCodeuiColor4ubVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC __glewReplacementCodeuiColor4ubVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiNormal3fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiNormal3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fvSUN = NULL; +PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC __glewReplacementCodeuiVertex3fSUN = NULL; +PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC __glewReplacementCodeuiVertex3fvSUN = NULL; +PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC __glewTexCoord2fColor3fVertex3fSUN = NULL; +PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC __glewTexCoord2fColor3fVertex3fvSUN = NULL; +PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fSUN = NULL; +PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fvSUN = NULL; +PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC __glewTexCoord2fColor4ubVertex3fSUN = NULL; +PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC __glewTexCoord2fColor4ubVertex3fvSUN = NULL; +PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fNormal3fVertex3fSUN = NULL; +PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fNormal3fVertex3fvSUN = NULL; +PFNGLTEXCOORD2FVERTEX3FSUNPROC __glewTexCoord2fVertex3fSUN = NULL; +PFNGLTEXCOORD2FVERTEX3FVSUNPROC __glewTexCoord2fVertex3fvSUN = NULL; +PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fSUN = NULL; +PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fvSUN = NULL; +PFNGLTEXCOORD4FVERTEX4FSUNPROC __glewTexCoord4fVertex4fSUN = NULL; +PFNGLTEXCOORD4FVERTEX4FVSUNPROC __glewTexCoord4fVertex4fvSUN = NULL; + +PFNGLADDSWAPHINTRECTWINPROC __glewAddSwapHintRectWIN = NULL; + +#endif /* !WIN32 || !GLEW_MX */ + +#if !defined(GLEW_MX) + +GLboolean __GLEW_VERSION_1_1 = GL_FALSE; +GLboolean __GLEW_VERSION_1_2 = GL_FALSE; +GLboolean __GLEW_VERSION_1_3 = GL_FALSE; +GLboolean __GLEW_VERSION_1_4 = GL_FALSE; +GLboolean __GLEW_VERSION_1_5 = GL_FALSE; +GLboolean __GLEW_VERSION_2_0 = GL_FALSE; +GLboolean __GLEW_3DFX_multisample = GL_FALSE; +GLboolean __GLEW_3DFX_tbuffer = GL_FALSE; +GLboolean __GLEW_3DFX_texture_compression_FXT1 = GL_FALSE; +GLboolean __GLEW_APPLE_client_storage = GL_FALSE; +GLboolean __GLEW_APPLE_element_array = GL_FALSE; +GLboolean __GLEW_APPLE_fence = GL_FALSE; +GLboolean __GLEW_APPLE_float_pixels = GL_FALSE; +GLboolean __GLEW_APPLE_pixel_buffer = GL_FALSE; +GLboolean __GLEW_APPLE_specular_vector = GL_FALSE; +GLboolean __GLEW_APPLE_texture_range = GL_FALSE; +GLboolean __GLEW_APPLE_transform_hint = GL_FALSE; +GLboolean __GLEW_APPLE_vertex_array_object = GL_FALSE; +GLboolean __GLEW_APPLE_vertex_array_range = GL_FALSE; +GLboolean __GLEW_APPLE_ycbcr_422 = GL_FALSE; +GLboolean __GLEW_ARB_color_buffer_float = GL_FALSE; +GLboolean __GLEW_ARB_depth_texture = GL_FALSE; +GLboolean __GLEW_ARB_draw_buffers = GL_FALSE; +GLboolean __GLEW_ARB_fragment_program = GL_FALSE; +GLboolean __GLEW_ARB_fragment_program_shadow = GL_FALSE; +GLboolean __GLEW_ARB_fragment_shader = GL_FALSE; +GLboolean __GLEW_ARB_half_float_pixel = GL_FALSE; +GLboolean __GLEW_ARB_imaging = GL_FALSE; +GLboolean __GLEW_ARB_matrix_palette = GL_FALSE; +GLboolean __GLEW_ARB_multisample = GL_FALSE; +GLboolean __GLEW_ARB_multitexture = GL_FALSE; +GLboolean __GLEW_ARB_occlusion_query = GL_FALSE; +GLboolean __GLEW_ARB_pixel_buffer_object = GL_FALSE; +GLboolean __GLEW_ARB_point_parameters = GL_FALSE; +GLboolean __GLEW_ARB_point_sprite = GL_FALSE; +GLboolean __GLEW_ARB_shader_objects = GL_FALSE; +GLboolean __GLEW_ARB_shading_language_100 = GL_FALSE; +GLboolean __GLEW_ARB_shadow = GL_FALSE; +GLboolean __GLEW_ARB_shadow_ambient = GL_FALSE; +GLboolean __GLEW_ARB_texture_border_clamp = GL_FALSE; +GLboolean __GLEW_ARB_texture_compression = GL_FALSE; +GLboolean __GLEW_ARB_texture_cube_map = GL_FALSE; +GLboolean __GLEW_ARB_texture_env_add = GL_FALSE; +GLboolean __GLEW_ARB_texture_env_combine = GL_FALSE; +GLboolean __GLEW_ARB_texture_env_crossbar = GL_FALSE; +GLboolean __GLEW_ARB_texture_env_dot3 = GL_FALSE; +GLboolean __GLEW_ARB_texture_float = GL_FALSE; +GLboolean __GLEW_ARB_texture_mirrored_repeat = GL_FALSE; +GLboolean __GLEW_ARB_texture_non_power_of_two = GL_FALSE; +GLboolean __GLEW_ARB_texture_rectangle = GL_FALSE; +GLboolean __GLEW_ARB_transpose_matrix = GL_FALSE; +GLboolean __GLEW_ARB_vertex_blend = GL_FALSE; +GLboolean __GLEW_ARB_vertex_buffer_object = GL_FALSE; +GLboolean __GLEW_ARB_vertex_program = GL_FALSE; +GLboolean __GLEW_ARB_vertex_shader = GL_FALSE; +GLboolean __GLEW_ARB_window_pos = GL_FALSE; +GLboolean __GLEW_ATIX_point_sprites = GL_FALSE; +GLboolean __GLEW_ATIX_texture_env_combine3 = GL_FALSE; +GLboolean __GLEW_ATIX_texture_env_route = GL_FALSE; +GLboolean __GLEW_ATIX_vertex_shader_output_point_size = GL_FALSE; +GLboolean __GLEW_ATI_draw_buffers = GL_FALSE; +GLboolean __GLEW_ATI_element_array = GL_FALSE; +GLboolean __GLEW_ATI_envmap_bumpmap = GL_FALSE; +GLboolean __GLEW_ATI_fragment_shader = GL_FALSE; +GLboolean __GLEW_ATI_map_object_buffer = GL_FALSE; +GLboolean __GLEW_ATI_pn_triangles = GL_FALSE; +GLboolean __GLEW_ATI_separate_stencil = GL_FALSE; +GLboolean __GLEW_ATI_text_fragment_shader = GL_FALSE; +GLboolean __GLEW_ATI_texture_compression_3dc = GL_FALSE; +GLboolean __GLEW_ATI_texture_env_combine3 = GL_FALSE; +GLboolean __GLEW_ATI_texture_float = GL_FALSE; +GLboolean __GLEW_ATI_texture_mirror_once = GL_FALSE; +GLboolean __GLEW_ATI_vertex_array_object = GL_FALSE; +GLboolean __GLEW_ATI_vertex_attrib_array_object = GL_FALSE; +GLboolean __GLEW_ATI_vertex_streams = GL_FALSE; +GLboolean __GLEW_EXT_422_pixels = GL_FALSE; +GLboolean __GLEW_EXT_Cg_shader = GL_FALSE; +GLboolean __GLEW_EXT_abgr = GL_FALSE; +GLboolean __GLEW_EXT_bgra = GL_FALSE; +GLboolean __GLEW_EXT_blend_color = GL_FALSE; +GLboolean __GLEW_EXT_blend_equation_separate = GL_FALSE; +GLboolean __GLEW_EXT_blend_func_separate = GL_FALSE; +GLboolean __GLEW_EXT_blend_logic_op = GL_FALSE; +GLboolean __GLEW_EXT_blend_minmax = GL_FALSE; +GLboolean __GLEW_EXT_blend_subtract = GL_FALSE; +GLboolean __GLEW_EXT_clip_volume_hint = GL_FALSE; +GLboolean __GLEW_EXT_cmyka = GL_FALSE; +GLboolean __GLEW_EXT_color_subtable = GL_FALSE; +GLboolean __GLEW_EXT_compiled_vertex_array = GL_FALSE; +GLboolean __GLEW_EXT_convolution = GL_FALSE; +GLboolean __GLEW_EXT_coordinate_frame = GL_FALSE; +GLboolean __GLEW_EXT_copy_texture = GL_FALSE; +GLboolean __GLEW_EXT_cull_vertex = GL_FALSE; +GLboolean __GLEW_EXT_depth_bounds_test = GL_FALSE; +GLboolean __GLEW_EXT_draw_range_elements = GL_FALSE; +GLboolean __GLEW_EXT_fog_coord = GL_FALSE; +GLboolean __GLEW_EXT_fragment_lighting = GL_FALSE; +GLboolean __GLEW_EXT_framebuffer_blit = GL_FALSE; +GLboolean __GLEW_EXT_framebuffer_multisample = GL_FALSE; +GLboolean __GLEW_EXT_framebuffer_object = GL_FALSE; +GLboolean __GLEW_EXT_histogram = GL_FALSE; +GLboolean __GLEW_EXT_index_array_formats = GL_FALSE; +GLboolean __GLEW_EXT_index_func = GL_FALSE; +GLboolean __GLEW_EXT_index_material = GL_FALSE; +GLboolean __GLEW_EXT_index_texture = GL_FALSE; +GLboolean __GLEW_EXT_light_texture = GL_FALSE; +GLboolean __GLEW_EXT_misc_attribute = GL_FALSE; +GLboolean __GLEW_EXT_multi_draw_arrays = GL_FALSE; +GLboolean __GLEW_EXT_multisample = GL_FALSE; +GLboolean __GLEW_EXT_packed_depth_stencil = GL_FALSE; +GLboolean __GLEW_EXT_packed_pixels = GL_FALSE; +GLboolean __GLEW_EXT_paletted_texture = GL_FALSE; +GLboolean __GLEW_EXT_pixel_buffer_object = GL_FALSE; +GLboolean __GLEW_EXT_pixel_transform = GL_FALSE; +GLboolean __GLEW_EXT_pixel_transform_color_table = GL_FALSE; +GLboolean __GLEW_EXT_point_parameters = GL_FALSE; +GLboolean __GLEW_EXT_polygon_offset = GL_FALSE; +GLboolean __GLEW_EXT_rescale_normal = GL_FALSE; +GLboolean __GLEW_EXT_scene_marker = GL_FALSE; +GLboolean __GLEW_EXT_secondary_color = GL_FALSE; +GLboolean __GLEW_EXT_separate_specular_color = GL_FALSE; +GLboolean __GLEW_EXT_shadow_funcs = GL_FALSE; +GLboolean __GLEW_EXT_shared_texture_palette = GL_FALSE; +GLboolean __GLEW_EXT_stencil_clear_tag = GL_FALSE; +GLboolean __GLEW_EXT_stencil_two_side = GL_FALSE; +GLboolean __GLEW_EXT_stencil_wrap = GL_FALSE; +GLboolean __GLEW_EXT_subtexture = GL_FALSE; +GLboolean __GLEW_EXT_texture = GL_FALSE; +GLboolean __GLEW_EXT_texture3D = GL_FALSE; +GLboolean __GLEW_EXT_texture_compression_dxt1 = GL_FALSE; +GLboolean __GLEW_EXT_texture_compression_s3tc = GL_FALSE; +GLboolean __GLEW_EXT_texture_cube_map = GL_FALSE; +GLboolean __GLEW_EXT_texture_edge_clamp = GL_FALSE; +GLboolean __GLEW_EXT_texture_env = GL_FALSE; +GLboolean __GLEW_EXT_texture_env_add = GL_FALSE; +GLboolean __GLEW_EXT_texture_env_combine = GL_FALSE; +GLboolean __GLEW_EXT_texture_env_dot3 = GL_FALSE; +GLboolean __GLEW_EXT_texture_filter_anisotropic = GL_FALSE; +GLboolean __GLEW_EXT_texture_lod_bias = GL_FALSE; +GLboolean __GLEW_EXT_texture_mirror_clamp = GL_FALSE; +GLboolean __GLEW_EXT_texture_object = GL_FALSE; +GLboolean __GLEW_EXT_texture_perturb_normal = GL_FALSE; +GLboolean __GLEW_EXT_texture_rectangle = GL_FALSE; +GLboolean __GLEW_EXT_texture_sRGB = GL_FALSE; +GLboolean __GLEW_EXT_vertex_array = GL_FALSE; +GLboolean __GLEW_EXT_vertex_shader = GL_FALSE; +GLboolean __GLEW_EXT_vertex_weighting = GL_FALSE; +GLboolean __GLEW_GREMEDY_string_marker = GL_FALSE; +GLboolean __GLEW_HP_convolution_border_modes = GL_FALSE; +GLboolean __GLEW_HP_image_transform = GL_FALSE; +GLboolean __GLEW_HP_occlusion_test = GL_FALSE; +GLboolean __GLEW_HP_texture_lighting = GL_FALSE; +GLboolean __GLEW_IBM_cull_vertex = GL_FALSE; +GLboolean __GLEW_IBM_multimode_draw_arrays = GL_FALSE; +GLboolean __GLEW_IBM_rasterpos_clip = GL_FALSE; +GLboolean __GLEW_IBM_static_data = GL_FALSE; +GLboolean __GLEW_IBM_texture_mirrored_repeat = GL_FALSE; +GLboolean __GLEW_IBM_vertex_array_lists = GL_FALSE; +GLboolean __GLEW_INGR_color_clamp = GL_FALSE; +GLboolean __GLEW_INGR_interlace_read = GL_FALSE; +GLboolean __GLEW_INTEL_parallel_arrays = GL_FALSE; +GLboolean __GLEW_INTEL_texture_scissor = GL_FALSE; +GLboolean __GLEW_KTX_buffer_region = GL_FALSE; +GLboolean __GLEW_MESAX_texture_stack = GL_FALSE; +GLboolean __GLEW_MESA_pack_invert = GL_FALSE; +GLboolean __GLEW_MESA_resize_buffers = GL_FALSE; +GLboolean __GLEW_MESA_window_pos = GL_FALSE; +GLboolean __GLEW_MESA_ycbcr_texture = GL_FALSE; +GLboolean __GLEW_NV_blend_square = GL_FALSE; +GLboolean __GLEW_NV_copy_depth_to_color = GL_FALSE; +GLboolean __GLEW_NV_depth_clamp = GL_FALSE; +GLboolean __GLEW_NV_evaluators = GL_FALSE; +GLboolean __GLEW_NV_fence = GL_FALSE; +GLboolean __GLEW_NV_float_buffer = GL_FALSE; +GLboolean __GLEW_NV_fog_distance = GL_FALSE; +GLboolean __GLEW_NV_fragment_program = GL_FALSE; +GLboolean __GLEW_NV_fragment_program2 = GL_FALSE; +GLboolean __GLEW_NV_fragment_program_option = GL_FALSE; +GLboolean __GLEW_NV_half_float = GL_FALSE; +GLboolean __GLEW_NV_light_max_exponent = GL_FALSE; +GLboolean __GLEW_NV_multisample_filter_hint = GL_FALSE; +GLboolean __GLEW_NV_occlusion_query = GL_FALSE; +GLboolean __GLEW_NV_packed_depth_stencil = GL_FALSE; +GLboolean __GLEW_NV_pixel_data_range = GL_FALSE; +GLboolean __GLEW_NV_point_sprite = GL_FALSE; +GLboolean __GLEW_NV_primitive_restart = GL_FALSE; +GLboolean __GLEW_NV_register_combiners = GL_FALSE; +GLboolean __GLEW_NV_register_combiners2 = GL_FALSE; +GLboolean __GLEW_NV_texgen_emboss = GL_FALSE; +GLboolean __GLEW_NV_texgen_reflection = GL_FALSE; +GLboolean __GLEW_NV_texture_compression_vtc = GL_FALSE; +GLboolean __GLEW_NV_texture_env_combine4 = GL_FALSE; +GLboolean __GLEW_NV_texture_expand_normal = GL_FALSE; +GLboolean __GLEW_NV_texture_rectangle = GL_FALSE; +GLboolean __GLEW_NV_texture_shader = GL_FALSE; +GLboolean __GLEW_NV_texture_shader2 = GL_FALSE; +GLboolean __GLEW_NV_texture_shader3 = GL_FALSE; +GLboolean __GLEW_NV_vertex_array_range = GL_FALSE; +GLboolean __GLEW_NV_vertex_array_range2 = GL_FALSE; +GLboolean __GLEW_NV_vertex_program = GL_FALSE; +GLboolean __GLEW_NV_vertex_program1_1 = GL_FALSE; +GLboolean __GLEW_NV_vertex_program2 = GL_FALSE; +GLboolean __GLEW_NV_vertex_program2_option = GL_FALSE; +GLboolean __GLEW_NV_vertex_program3 = GL_FALSE; +GLboolean __GLEW_OML_interlace = GL_FALSE; +GLboolean __GLEW_OML_resample = GL_FALSE; +GLboolean __GLEW_OML_subsample = GL_FALSE; +GLboolean __GLEW_PGI_misc_hints = GL_FALSE; +GLboolean __GLEW_PGI_vertex_hints = GL_FALSE; +GLboolean __GLEW_REND_screen_coordinates = GL_FALSE; +GLboolean __GLEW_S3_s3tc = GL_FALSE; +GLboolean __GLEW_SGIS_color_range = GL_FALSE; +GLboolean __GLEW_SGIS_detail_texture = GL_FALSE; +GLboolean __GLEW_SGIS_fog_function = GL_FALSE; +GLboolean __GLEW_SGIS_generate_mipmap = GL_FALSE; +GLboolean __GLEW_SGIS_multisample = GL_FALSE; +GLboolean __GLEW_SGIS_pixel_texture = GL_FALSE; +GLboolean __GLEW_SGIS_sharpen_texture = GL_FALSE; +GLboolean __GLEW_SGIS_texture4D = GL_FALSE; +GLboolean __GLEW_SGIS_texture_border_clamp = GL_FALSE; +GLboolean __GLEW_SGIS_texture_edge_clamp = GL_FALSE; +GLboolean __GLEW_SGIS_texture_filter4 = GL_FALSE; +GLboolean __GLEW_SGIS_texture_lod = GL_FALSE; +GLboolean __GLEW_SGIS_texture_select = GL_FALSE; +GLboolean __GLEW_SGIX_async = GL_FALSE; +GLboolean __GLEW_SGIX_async_histogram = GL_FALSE; +GLboolean __GLEW_SGIX_async_pixel = GL_FALSE; +GLboolean __GLEW_SGIX_blend_alpha_minmax = GL_FALSE; +GLboolean __GLEW_SGIX_clipmap = GL_FALSE; +GLboolean __GLEW_SGIX_depth_texture = GL_FALSE; +GLboolean __GLEW_SGIX_flush_raster = GL_FALSE; +GLboolean __GLEW_SGIX_fog_offset = GL_FALSE; +GLboolean __GLEW_SGIX_fog_texture = GL_FALSE; +GLboolean __GLEW_SGIX_fragment_specular_lighting = GL_FALSE; +GLboolean __GLEW_SGIX_framezoom = GL_FALSE; +GLboolean __GLEW_SGIX_interlace = GL_FALSE; +GLboolean __GLEW_SGIX_ir_instrument1 = GL_FALSE; +GLboolean __GLEW_SGIX_list_priority = GL_FALSE; +GLboolean __GLEW_SGIX_pixel_texture = GL_FALSE; +GLboolean __GLEW_SGIX_pixel_texture_bits = GL_FALSE; +GLboolean __GLEW_SGIX_reference_plane = GL_FALSE; +GLboolean __GLEW_SGIX_resample = GL_FALSE; +GLboolean __GLEW_SGIX_shadow = GL_FALSE; +GLboolean __GLEW_SGIX_shadow_ambient = GL_FALSE; +GLboolean __GLEW_SGIX_sprite = GL_FALSE; +GLboolean __GLEW_SGIX_tag_sample_buffer = GL_FALSE; +GLboolean __GLEW_SGIX_texture_add_env = GL_FALSE; +GLboolean __GLEW_SGIX_texture_coordinate_clamp = GL_FALSE; +GLboolean __GLEW_SGIX_texture_lod_bias = GL_FALSE; +GLboolean __GLEW_SGIX_texture_multi_buffer = GL_FALSE; +GLboolean __GLEW_SGIX_texture_range = GL_FALSE; +GLboolean __GLEW_SGIX_texture_scale_bias = GL_FALSE; +GLboolean __GLEW_SGIX_vertex_preclip = GL_FALSE; +GLboolean __GLEW_SGIX_vertex_preclip_hint = GL_FALSE; +GLboolean __GLEW_SGIX_ycrcb = GL_FALSE; +GLboolean __GLEW_SGI_color_matrix = GL_FALSE; +GLboolean __GLEW_SGI_color_table = GL_FALSE; +GLboolean __GLEW_SGI_texture_color_table = GL_FALSE; +GLboolean __GLEW_SUNX_constant_data = GL_FALSE; +GLboolean __GLEW_SUN_convolution_border_modes = GL_FALSE; +GLboolean __GLEW_SUN_global_alpha = GL_FALSE; +GLboolean __GLEW_SUN_mesh_array = GL_FALSE; +GLboolean __GLEW_SUN_read_video_pixels = GL_FALSE; +GLboolean __GLEW_SUN_slice_accum = GL_FALSE; +GLboolean __GLEW_SUN_triangle_list = GL_FALSE; +GLboolean __GLEW_SUN_vertex = GL_FALSE; +GLboolean __GLEW_WIN_phong_shading = GL_FALSE; +GLboolean __GLEW_WIN_specular_fog = GL_FALSE; +GLboolean __GLEW_WIN_swap_hint = GL_FALSE; + +#endif /* !GLEW_MX */ + +#ifdef GL_VERSION_1_2 + +static GLboolean _glewInit_GL_VERSION_1_2 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCopyTexSubImage3D")) == NULL) || r; + r = ((glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)glewGetProcAddress((const GLubyte*)"glDrawRangeElements")) == NULL) || r; + r = ((glTexImage3D = (PFNGLTEXIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexImage3D")) == NULL) || r; + r = ((glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage3D")) == NULL) || r; + + return r; +} + +#endif /* GL_VERSION_1_2 */ + +#ifdef GL_VERSION_1_3 + +static GLboolean _glewInit_GL_VERSION_1_3 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glActiveTexture = (PFNGLACTIVETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glActiveTexture")) == NULL) || r; + r = ((glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glClientActiveTexture")) == NULL) || r; + r = ((glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage1D")) == NULL) || r; + r = ((glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage2D")) == NULL) || r; + r = ((glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage3D")) == NULL) || r; + r = ((glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage1D")) == NULL) || r; + r = ((glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage2D")) == NULL) || r; + r = ((glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage3D")) == NULL) || r; + r = ((glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)glewGetProcAddress((const GLubyte*)"glGetCompressedTexImage")) == NULL) || r; + r = ((glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixd")) == NULL) || r; + r = ((glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixf")) == NULL) || r; + r = ((glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixd")) == NULL) || r; + r = ((glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixf")) == NULL) || r; + r = ((glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1d")) == NULL) || r; + r = ((glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dv")) == NULL) || r; + r = ((glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1f")) == NULL) || r; + r = ((glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fv")) == NULL) || r; + r = ((glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1i")) == NULL) || r; + r = ((glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1iv")) == NULL) || r; + r = ((glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1s")) == NULL) || r; + r = ((glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1sv")) == NULL) || r; + r = ((glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2d")) == NULL) || r; + r = ((glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dv")) == NULL) || r; + r = ((glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2f")) == NULL) || r; + r = ((glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fv")) == NULL) || r; + r = ((glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2i")) == NULL) || r; + r = ((glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2iv")) == NULL) || r; + r = ((glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2s")) == NULL) || r; + r = ((glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2sv")) == NULL) || r; + r = ((glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3d")) == NULL) || r; + r = ((glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dv")) == NULL) || r; + r = ((glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3f")) == NULL) || r; + r = ((glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fv")) == NULL) || r; + r = ((glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3i")) == NULL) || r; + r = ((glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3iv")) == NULL) || r; + r = ((glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3s")) == NULL) || r; + r = ((glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3sv")) == NULL) || r; + r = ((glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4d")) == NULL) || r; + r = ((glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dv")) == NULL) || r; + r = ((glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4f")) == NULL) || r; + r = ((glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fv")) == NULL) || r; + r = ((glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4i")) == NULL) || r; + r = ((glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4iv")) == NULL) || r; + r = ((glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4s")) == NULL) || r; + r = ((glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4sv")) == NULL) || r; + r = ((glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)glewGetProcAddress((const GLubyte*)"glSampleCoverage")) == NULL) || r; + + return r; +} + +#endif /* GL_VERSION_1_3 */ + +#ifdef GL_VERSION_1_4 + +static GLboolean _glewInit_GL_VERSION_1_4 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendColor = (PFNGLBLENDCOLORPROC)glewGetProcAddress((const GLubyte*)"glBlendColor")) == NULL) || r; + r = ((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)"glBlendEquation")) == NULL) || r; + r = ((glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glBlendFuncSeparate")) == NULL) || r; + r = ((glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC)glewGetProcAddress((const GLubyte*)"glFogCoordPointer")) == NULL) || r; + r = ((glFogCoordd = (PFNGLFOGCOORDDPROC)glewGetProcAddress((const GLubyte*)"glFogCoordd")) == NULL) || r; + r = ((glFogCoorddv = (PFNGLFOGCOORDDVPROC)glewGetProcAddress((const GLubyte*)"glFogCoorddv")) == NULL) || r; + r = ((glFogCoordf = (PFNGLFOGCOORDFPROC)glewGetProcAddress((const GLubyte*)"glFogCoordf")) == NULL) || r; + r = ((glFogCoordfv = (PFNGLFOGCOORDFVPROC)glewGetProcAddress((const GLubyte*)"glFogCoordfv")) == NULL) || r; + r = ((glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawArrays")) == NULL) || r; + r = ((glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElements")) == NULL) || r; + r = ((glPointParameterf = (PFNGLPOINTPARAMETERFPROC)glewGetProcAddress((const GLubyte*)"glPointParameterf")) == NULL) || r; + r = ((glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfv")) == NULL) || r; + r = ((glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3b")) == NULL) || r; + r = ((glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bv")) == NULL) || r; + r = ((glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3d")) == NULL) || r; + r = ((glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dv")) == NULL) || r; + r = ((glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3f")) == NULL) || r; + r = ((glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fv")) == NULL) || r; + r = ((glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3i")) == NULL) || r; + r = ((glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3iv")) == NULL) || r; + r = ((glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3s")) == NULL) || r; + r = ((glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3sv")) == NULL) || r; + r = ((glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ub")) == NULL) || r; + r = ((glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubv")) == NULL) || r; + r = ((glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ui")) == NULL) || r; + r = ((glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uiv")) == NULL) || r; + r = ((glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3us")) == NULL) || r; + r = ((glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usv")) == NULL) || r; + r = ((glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColorPointer")) == NULL) || r; + r = ((glWindowPos2d = (PFNGLWINDOWPOS2DPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2d")) == NULL) || r; + r = ((glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dv")) == NULL) || r; + r = ((glWindowPos2f = (PFNGLWINDOWPOS2FPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2f")) == NULL) || r; + r = ((glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fv")) == NULL) || r; + r = ((glWindowPos2i = (PFNGLWINDOWPOS2IPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2i")) == NULL) || r; + r = ((glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2iv")) == NULL) || r; + r = ((glWindowPos2s = (PFNGLWINDOWPOS2SPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2s")) == NULL) || r; + r = ((glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2sv")) == NULL) || r; + r = ((glWindowPos3d = (PFNGLWINDOWPOS3DPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3d")) == NULL) || r; + r = ((glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dv")) == NULL) || r; + r = ((glWindowPos3f = (PFNGLWINDOWPOS3FPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3f")) == NULL) || r; + r = ((glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fv")) == NULL) || r; + r = ((glWindowPos3i = (PFNGLWINDOWPOS3IPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3i")) == NULL) || r; + r = ((glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3iv")) == NULL) || r; + r = ((glWindowPos3s = (PFNGLWINDOWPOS3SPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3s")) == NULL) || r; + r = ((glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3sv")) == NULL) || r; + + return r; +} + +#endif /* GL_VERSION_1_4 */ + +#ifdef GL_VERSION_1_5 + +static GLboolean _glewInit_GL_VERSION_1_5 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBeginQuery = (PFNGLBEGINQUERYPROC)glewGetProcAddress((const GLubyte*)"glBeginQuery")) == NULL) || r; + r = ((glBindBuffer = (PFNGLBINDBUFFERPROC)glewGetProcAddress((const GLubyte*)"glBindBuffer")) == NULL) || r; + r = ((glBufferData = (PFNGLBUFFERDATAPROC)glewGetProcAddress((const GLubyte*)"glBufferData")) == NULL) || r; + r = ((glBufferSubData = (PFNGLBUFFERSUBDATAPROC)glewGetProcAddress((const GLubyte*)"glBufferSubData")) == NULL) || r; + r = ((glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDeleteBuffers")) == NULL) || r; + r = ((glDeleteQueries = (PFNGLDELETEQUERIESPROC)glewGetProcAddress((const GLubyte*)"glDeleteQueries")) == NULL) || r; + r = ((glEndQuery = (PFNGLENDQUERYPROC)glewGetProcAddress((const GLubyte*)"glEndQuery")) == NULL) || r; + r = ((glGenBuffers = (PFNGLGENBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glGenBuffers")) == NULL) || r; + r = ((glGenQueries = (PFNGLGENQUERIESPROC)glewGetProcAddress((const GLubyte*)"glGenQueries")) == NULL) || r; + r = ((glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetBufferParameteriv")) == NULL) || r; + r = ((glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)glewGetProcAddress((const GLubyte*)"glGetBufferPointerv")) == NULL) || r; + r = ((glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)glewGetProcAddress((const GLubyte*)"glGetBufferSubData")) == NULL) || r; + r = ((glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectiv")) == NULL) || r; + r = ((glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectuiv")) == NULL) || r; + r = ((glGetQueryiv = (PFNGLGETQUERYIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryiv")) == NULL) || r; + r = ((glIsBuffer = (PFNGLISBUFFERPROC)glewGetProcAddress((const GLubyte*)"glIsBuffer")) == NULL) || r; + r = ((glIsQuery = (PFNGLISQUERYPROC)glewGetProcAddress((const GLubyte*)"glIsQuery")) == NULL) || r; + r = ((glMapBuffer = (PFNGLMAPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glMapBuffer")) == NULL) || r; + r = ((glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glUnmapBuffer")) == NULL) || r; + + return r; +} + +#endif /* GL_VERSION_1_5 */ + +#ifdef GL_VERSION_2_0 + +static GLboolean _glewInit_GL_VERSION_2_0 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAttachShader = (PFNGLATTACHSHADERPROC)glewGetProcAddress((const GLubyte*)"glAttachShader")) == NULL) || r; + r = ((glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glBindAttribLocation")) == NULL) || r; + r = ((glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glBlendEquationSeparate")) == NULL) || r; + r = ((glCompileShader = (PFNGLCOMPILESHADERPROC)glewGetProcAddress((const GLubyte*)"glCompileShader")) == NULL) || r; + r = ((glCreateProgram = (PFNGLCREATEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glCreateProgram")) == NULL) || r; + r = ((glCreateShader = (PFNGLCREATESHADERPROC)glewGetProcAddress((const GLubyte*)"glCreateShader")) == NULL) || r; + r = ((glDeleteProgram = (PFNGLDELETEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgram")) == NULL) || r; + r = ((glDeleteShader = (PFNGLDELETESHADERPROC)glewGetProcAddress((const GLubyte*)"glDeleteShader")) == NULL) || r; + r = ((glDetachShader = (PFNGLDETACHSHADERPROC)glewGetProcAddress((const GLubyte*)"glDetachShader")) == NULL) || r; + r = ((glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)glewGetProcAddress((const GLubyte*)"glDisableVertexAttribArray")) == NULL) || r; + r = ((glDrawBuffers = (PFNGLDRAWBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffers")) == NULL) || r; + r = ((glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)glewGetProcAddress((const GLubyte*)"glEnableVertexAttribArray")) == NULL) || r; + r = ((glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAttrib")) == NULL) || r; + r = ((glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)glewGetProcAddress((const GLubyte*)"glGetActiveUniform")) == NULL) || r; + r = ((glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)glewGetProcAddress((const GLubyte*)"glGetAttachedShaders")) == NULL) || r; + r = ((glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glGetAttribLocation")) == NULL) || r; + r = ((glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)glewGetProcAddress((const GLubyte*)"glGetProgramInfoLog")) == NULL) || r; + r = ((glGetProgramiv = (PFNGLGETPROGRAMIVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramiv")) == NULL) || r; + r = ((glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)glewGetProcAddress((const GLubyte*)"glGetShaderInfoLog")) == NULL) || r; + r = ((glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)glewGetProcAddress((const GLubyte*)"glGetShaderSource")) == NULL) || r; + r = ((glGetShaderiv = (PFNGLGETSHADERIVPROC)glewGetProcAddress((const GLubyte*)"glGetShaderiv")) == NULL) || r; + r = ((glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glGetUniformLocation")) == NULL) || r; + r = ((glGetUniformfv = (PFNGLGETUNIFORMFVPROC)glewGetProcAddress((const GLubyte*)"glGetUniformfv")) == NULL) || r; + r = ((glGetUniformiv = (PFNGLGETUNIFORMIVPROC)glewGetProcAddress((const GLubyte*)"glGetUniformiv")) == NULL) || r; + r = ((glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointerv")) == NULL) || r; + r = ((glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdv")) == NULL) || r; + r = ((glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfv")) == NULL) || r; + r = ((glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribiv")) == NULL) || r; + r = ((glIsProgram = (PFNGLISPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glIsProgram")) == NULL) || r; + r = ((glIsShader = (PFNGLISSHADERPROC)glewGetProcAddress((const GLubyte*)"glIsShader")) == NULL) || r; + r = ((glLinkProgram = (PFNGLLINKPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glLinkProgram")) == NULL) || r; + r = ((glShaderSource = (PFNGLSHADERSOURCEPROC)glewGetProcAddress((const GLubyte*)"glShaderSource")) == NULL) || r; + r = ((glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilFuncSeparate")) == NULL) || r; + r = ((glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilMaskSeparate")) == NULL) || r; + r = ((glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilOpSeparate")) == NULL) || r; + r = ((glUniform1f = (PFNGLUNIFORM1FPROC)glewGetProcAddress((const GLubyte*)"glUniform1f")) == NULL) || r; + r = ((glUniform1fv = (PFNGLUNIFORM1FVPROC)glewGetProcAddress((const GLubyte*)"glUniform1fv")) == NULL) || r; + r = ((glUniform1i = (PFNGLUNIFORM1IPROC)glewGetProcAddress((const GLubyte*)"glUniform1i")) == NULL) || r; + r = ((glUniform1iv = (PFNGLUNIFORM1IVPROC)glewGetProcAddress((const GLubyte*)"glUniform1iv")) == NULL) || r; + r = ((glUniform2f = (PFNGLUNIFORM2FPROC)glewGetProcAddress((const GLubyte*)"glUniform2f")) == NULL) || r; + r = ((glUniform2fv = (PFNGLUNIFORM2FVPROC)glewGetProcAddress((const GLubyte*)"glUniform2fv")) == NULL) || r; + r = ((glUniform2i = (PFNGLUNIFORM2IPROC)glewGetProcAddress((const GLubyte*)"glUniform2i")) == NULL) || r; + r = ((glUniform2iv = (PFNGLUNIFORM2IVPROC)glewGetProcAddress((const GLubyte*)"glUniform2iv")) == NULL) || r; + r = ((glUniform3f = (PFNGLUNIFORM3FPROC)glewGetProcAddress((const GLubyte*)"glUniform3f")) == NULL) || r; + r = ((glUniform3fv = (PFNGLUNIFORM3FVPROC)glewGetProcAddress((const GLubyte*)"glUniform3fv")) == NULL) || r; + r = ((glUniform3i = (PFNGLUNIFORM3IPROC)glewGetProcAddress((const GLubyte*)"glUniform3i")) == NULL) || r; + r = ((glUniform3iv = (PFNGLUNIFORM3IVPROC)glewGetProcAddress((const GLubyte*)"glUniform3iv")) == NULL) || r; + r = ((glUniform4f = (PFNGLUNIFORM4FPROC)glewGetProcAddress((const GLubyte*)"glUniform4f")) == NULL) || r; + r = ((glUniform4fv = (PFNGLUNIFORM4FVPROC)glewGetProcAddress((const GLubyte*)"glUniform4fv")) == NULL) || r; + r = ((glUniform4i = (PFNGLUNIFORM4IPROC)glewGetProcAddress((const GLubyte*)"glUniform4i")) == NULL) || r; + r = ((glUniform4iv = (PFNGLUNIFORM4IVPROC)glewGetProcAddress((const GLubyte*)"glUniform4iv")) == NULL) || r; + r = ((glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix2fv")) == NULL) || r; + r = ((glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix3fv")) == NULL) || r; + r = ((glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix4fv")) == NULL) || r; + r = ((glUseProgram = (PFNGLUSEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glUseProgram")) == NULL) || r; + r = ((glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glValidateProgram")) == NULL) || r; + r = ((glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1d")) == NULL) || r; + r = ((glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dv")) == NULL) || r; + r = ((glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1f")) == NULL) || r; + r = ((glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fv")) == NULL) || r; + r = ((glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1s")) == NULL) || r; + r = ((glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sv")) == NULL) || r; + r = ((glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2d")) == NULL) || r; + r = ((glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dv")) == NULL) || r; + r = ((glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2f")) == NULL) || r; + r = ((glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fv")) == NULL) || r; + r = ((glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2s")) == NULL) || r; + r = ((glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sv")) == NULL) || r; + r = ((glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3d")) == NULL) || r; + r = ((glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dv")) == NULL) || r; + r = ((glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3f")) == NULL) || r; + r = ((glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fv")) == NULL) || r; + r = ((glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3s")) == NULL) || r; + r = ((glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sv")) == NULL) || r; + r = ((glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nbv")) == NULL) || r; + r = ((glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Niv")) == NULL) || r; + r = ((glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nsv")) == NULL) || r; + r = ((glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nub")) == NULL) || r; + r = ((glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nubv")) == NULL) || r; + r = ((glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nuiv")) == NULL) || r; + r = ((glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nusv")) == NULL) || r; + r = ((glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4bv")) == NULL) || r; + r = ((glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4d")) == NULL) || r; + r = ((glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dv")) == NULL) || r; + r = ((glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4f")) == NULL) || r; + r = ((glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fv")) == NULL) || r; + r = ((glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4iv")) == NULL) || r; + r = ((glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4s")) == NULL) || r; + r = ((glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sv")) == NULL) || r; + r = ((glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubv")) == NULL) || r; + r = ((glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4uiv")) == NULL) || r; + r = ((glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4usv")) == NULL) || r; + r = ((glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointer")) == NULL) || r; + + return r; +} + +#endif /* GL_VERSION_2_0 */ + +#ifdef GL_3DFX_multisample + +#endif /* GL_3DFX_multisample */ + +#ifdef GL_3DFX_tbuffer + +static GLboolean _glewInit_GL_3DFX_tbuffer (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTbufferMask3DFX = (PFNGLTBUFFERMASK3DFXPROC)glewGetProcAddress((const GLubyte*)"glTbufferMask3DFX")) == NULL) || r; + + return r; +} + +#endif /* GL_3DFX_tbuffer */ + +#ifdef GL_3DFX_texture_compression_FXT1 + +#endif /* GL_3DFX_texture_compression_FXT1 */ + +#ifdef GL_APPLE_client_storage + +#endif /* GL_APPLE_client_storage */ + +#ifdef GL_APPLE_element_array + +static GLboolean _glewInit_GL_APPLE_element_array (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDrawElementArrayAPPLE = (PFNGLDRAWELEMENTARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glDrawElementArrayAPPLE")) == NULL) || r; + r = ((glDrawRangeElementArrayAPPLE = (PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glDrawRangeElementArrayAPPLE")) == NULL) || r; + r = ((glElementPointerAPPLE = (PFNGLELEMENTPOINTERAPPLEPROC)glewGetProcAddress((const GLubyte*)"glElementPointerAPPLE")) == NULL) || r; + r = ((glMultiDrawElementArrayAPPLE = (PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElementArrayAPPLE")) == NULL) || r; + r = ((glMultiDrawRangeElementArrayAPPLE = (PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawRangeElementArrayAPPLE")) == NULL) || r; + + return r; +} + +#endif /* GL_APPLE_element_array */ + +#ifdef GL_APPLE_fence + +static GLboolean _glewInit_GL_APPLE_fence (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDeleteFencesAPPLE = (PFNGLDELETEFENCESAPPLEPROC)glewGetProcAddress((const GLubyte*)"glDeleteFencesAPPLE")) == NULL) || r; + r = ((glFinishFenceAPPLE = (PFNGLFINISHFENCEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glFinishFenceAPPLE")) == NULL) || r; + r = ((glFinishObjectAPPLE = (PFNGLFINISHOBJECTAPPLEPROC)glewGetProcAddress((const GLubyte*)"glFinishObjectAPPLE")) == NULL) || r; + r = ((glGenFencesAPPLE = (PFNGLGENFENCESAPPLEPROC)glewGetProcAddress((const GLubyte*)"glGenFencesAPPLE")) == NULL) || r; + r = ((glIsFenceAPPLE = (PFNGLISFENCEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glIsFenceAPPLE")) == NULL) || r; + r = ((glSetFenceAPPLE = (PFNGLSETFENCEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glSetFenceAPPLE")) == NULL) || r; + r = ((glTestFenceAPPLE = (PFNGLTESTFENCEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glTestFenceAPPLE")) == NULL) || r; + r = ((glTestObjectAPPLE = (PFNGLTESTOBJECTAPPLEPROC)glewGetProcAddress((const GLubyte*)"glTestObjectAPPLE")) == NULL) || r; + + return r; +} + +#endif /* GL_APPLE_fence */ + +#ifdef GL_APPLE_float_pixels + +#endif /* GL_APPLE_float_pixels */ + +#ifdef GL_APPLE_pixel_buffer + +#endif /* GL_APPLE_pixel_buffer */ + +#ifdef GL_APPLE_specular_vector + +#endif /* GL_APPLE_specular_vector */ + +#ifdef GL_APPLE_texture_range + +static GLboolean _glewInit_GL_APPLE_texture_range (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetTexParameterPointervAPPLE = (PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC)glewGetProcAddress((const GLubyte*)"glGetTexParameterPointervAPPLE")) == NULL) || r; + r = ((glTextureRangeAPPLE = (PFNGLTEXTURERANGEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glTextureRangeAPPLE")) == NULL) || r; + + return r; +} + +#endif /* GL_APPLE_texture_range */ + +#ifdef GL_APPLE_transform_hint + +#endif /* GL_APPLE_transform_hint */ + +#ifdef GL_APPLE_vertex_array_object + +static GLboolean _glewInit_GL_APPLE_vertex_array_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBindVertexArrayAPPLE = (PFNGLBINDVERTEXARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glBindVertexArrayAPPLE")) == NULL) || r; + r = ((glDeleteVertexArraysAPPLE = (PFNGLDELETEVERTEXARRAYSAPPLEPROC)glewGetProcAddress((const GLubyte*)"glDeleteVertexArraysAPPLE")) == NULL) || r; + r = ((glGenVertexArraysAPPLE = (PFNGLGENVERTEXARRAYSAPPLEPROC)glewGetProcAddress((const GLubyte*)"glGenVertexArraysAPPLE")) == NULL) || r; + r = ((glIsVertexArrayAPPLE = (PFNGLISVERTEXARRAYAPPLEPROC)glewGetProcAddress((const GLubyte*)"glIsVertexArrayAPPLE")) == NULL) || r; + + return r; +} + +#endif /* GL_APPLE_vertex_array_object */ + +#ifdef GL_APPLE_vertex_array_range + +static GLboolean _glewInit_GL_APPLE_vertex_array_range (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFlushVertexArrayRangeAPPLE = (PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glFlushVertexArrayRangeAPPLE")) == NULL) || r; + r = ((glVertexArrayParameteriAPPLE = (PFNGLVERTEXARRAYPARAMETERIAPPLEPROC)glewGetProcAddress((const GLubyte*)"glVertexArrayParameteriAPPLE")) == NULL) || r; + r = ((glVertexArrayRangeAPPLE = (PFNGLVERTEXARRAYRANGEAPPLEPROC)glewGetProcAddress((const GLubyte*)"glVertexArrayRangeAPPLE")) == NULL) || r; + + return r; +} + +#endif /* GL_APPLE_vertex_array_range */ + +#ifdef GL_APPLE_ycbcr_422 + +#endif /* GL_APPLE_ycbcr_422 */ + +#ifdef GL_ARB_color_buffer_float + +static GLboolean _glewInit_GL_ARB_color_buffer_float (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glClampColorARB = (PFNGLCLAMPCOLORARBPROC)glewGetProcAddress((const GLubyte*)"glClampColorARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_color_buffer_float */ + +#ifdef GL_ARB_depth_texture + +#endif /* GL_ARB_depth_texture */ + +#ifdef GL_ARB_draw_buffers + +static GLboolean _glewInit_GL_ARB_draw_buffers (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDrawBuffersARB = (PFNGLDRAWBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffersARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_draw_buffers */ + +#ifdef GL_ARB_fragment_program + +#endif /* GL_ARB_fragment_program */ + +#ifdef GL_ARB_fragment_program_shadow + +#endif /* GL_ARB_fragment_program_shadow */ + +#ifdef GL_ARB_fragment_shader + +#endif /* GL_ARB_fragment_shader */ + +#ifdef GL_ARB_half_float_pixel + +#endif /* GL_ARB_half_float_pixel */ + +#ifdef GL_ARB_imaging + +static GLboolean _glewInit_GL_ARB_imaging (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)"glBlendEquation")) == NULL) || r; + r = ((glColorSubTable = (PFNGLCOLORSUBTABLEPROC)glewGetProcAddress((const GLubyte*)"glColorSubTable")) == NULL) || r; + r = ((glColorTable = (PFNGLCOLORTABLEPROC)glewGetProcAddress((const GLubyte*)"glColorTable")) == NULL) || r; + r = ((glColorTableParameterfv = (PFNGLCOLORTABLEPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glColorTableParameterfv")) == NULL) || r; + r = ((glColorTableParameteriv = (PFNGLCOLORTABLEPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glColorTableParameteriv")) == NULL) || r; + r = ((glConvolutionFilter1D = (PFNGLCONVOLUTIONFILTER1DPROC)glewGetProcAddress((const GLubyte*)"glConvolutionFilter1D")) == NULL) || r; + r = ((glConvolutionFilter2D = (PFNGLCONVOLUTIONFILTER2DPROC)glewGetProcAddress((const GLubyte*)"glConvolutionFilter2D")) == NULL) || r; + r = ((glConvolutionParameterf = (PFNGLCONVOLUTIONPARAMETERFPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameterf")) == NULL) || r; + r = ((glConvolutionParameterfv = (PFNGLCONVOLUTIONPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameterfv")) == NULL) || r; + r = ((glConvolutionParameteri = (PFNGLCONVOLUTIONPARAMETERIPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameteri")) == NULL) || r; + r = ((glConvolutionParameteriv = (PFNGLCONVOLUTIONPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameteriv")) == NULL) || r; + r = ((glCopyColorSubTable = (PFNGLCOPYCOLORSUBTABLEPROC)glewGetProcAddress((const GLubyte*)"glCopyColorSubTable")) == NULL) || r; + r = ((glCopyColorTable = (PFNGLCOPYCOLORTABLEPROC)glewGetProcAddress((const GLubyte*)"glCopyColorTable")) == NULL) || r; + r = ((glCopyConvolutionFilter1D = (PFNGLCOPYCONVOLUTIONFILTER1DPROC)glewGetProcAddress((const GLubyte*)"glCopyConvolutionFilter1D")) == NULL) || r; + r = ((glCopyConvolutionFilter2D = (PFNGLCOPYCONVOLUTIONFILTER2DPROC)glewGetProcAddress((const GLubyte*)"glCopyConvolutionFilter2D")) == NULL) || r; + r = ((glGetColorTable = (PFNGLGETCOLORTABLEPROC)glewGetProcAddress((const GLubyte*)"glGetColorTable")) == NULL) || r; + r = ((glGetColorTableParameterfv = (PFNGLGETCOLORTABLEPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameterfv")) == NULL) || r; + r = ((glGetColorTableParameteriv = (PFNGLGETCOLORTABLEPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameteriv")) == NULL) || r; + r = ((glGetConvolutionFilter = (PFNGLGETCONVOLUTIONFILTERPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionFilter")) == NULL) || r; + r = ((glGetConvolutionParameterfv = (PFNGLGETCONVOLUTIONPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionParameterfv")) == NULL) || r; + r = ((glGetConvolutionParameteriv = (PFNGLGETCONVOLUTIONPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionParameteriv")) == NULL) || r; + r = ((glGetHistogram = (PFNGLGETHISTOGRAMPROC)glewGetProcAddress((const GLubyte*)"glGetHistogram")) == NULL) || r; + r = ((glGetHistogramParameterfv = (PFNGLGETHISTOGRAMPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glGetHistogramParameterfv")) == NULL) || r; + r = ((glGetHistogramParameteriv = (PFNGLGETHISTOGRAMPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetHistogramParameteriv")) == NULL) || r; + r = ((glGetMinmax = (PFNGLGETMINMAXPROC)glewGetProcAddress((const GLubyte*)"glGetMinmax")) == NULL) || r; + r = ((glGetMinmaxParameterfv = (PFNGLGETMINMAXPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glGetMinmaxParameterfv")) == NULL) || r; + r = ((glGetMinmaxParameteriv = (PFNGLGETMINMAXPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetMinmaxParameteriv")) == NULL) || r; + r = ((glGetSeparableFilter = (PFNGLGETSEPARABLEFILTERPROC)glewGetProcAddress((const GLubyte*)"glGetSeparableFilter")) == NULL) || r; + r = ((glHistogram = (PFNGLHISTOGRAMPROC)glewGetProcAddress((const GLubyte*)"glHistogram")) == NULL) || r; + r = ((glMinmax = (PFNGLMINMAXPROC)glewGetProcAddress((const GLubyte*)"glMinmax")) == NULL) || r; + r = ((glResetHistogram = (PFNGLRESETHISTOGRAMPROC)glewGetProcAddress((const GLubyte*)"glResetHistogram")) == NULL) || r; + r = ((glResetMinmax = (PFNGLRESETMINMAXPROC)glewGetProcAddress((const GLubyte*)"glResetMinmax")) == NULL) || r; + r = ((glSeparableFilter2D = (PFNGLSEPARABLEFILTER2DPROC)glewGetProcAddress((const GLubyte*)"glSeparableFilter2D")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_imaging */ + +#ifdef GL_ARB_matrix_palette + +static GLboolean _glewInit_GL_ARB_matrix_palette (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCurrentPaletteMatrixARB = (PFNGLCURRENTPALETTEMATRIXARBPROC)glewGetProcAddress((const GLubyte*)"glCurrentPaletteMatrixARB")) == NULL) || r; + r = ((glMatrixIndexPointerARB = (PFNGLMATRIXINDEXPOINTERARBPROC)glewGetProcAddress((const GLubyte*)"glMatrixIndexPointerARB")) == NULL) || r; + r = ((glMatrixIndexubvARB = (PFNGLMATRIXINDEXUBVARBPROC)glewGetProcAddress((const GLubyte*)"glMatrixIndexubvARB")) == NULL) || r; + r = ((glMatrixIndexuivARB = (PFNGLMATRIXINDEXUIVARBPROC)glewGetProcAddress((const GLubyte*)"glMatrixIndexuivARB")) == NULL) || r; + r = ((glMatrixIndexusvARB = (PFNGLMATRIXINDEXUSVARBPROC)glewGetProcAddress((const GLubyte*)"glMatrixIndexusvARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_matrix_palette */ + +#ifdef GL_ARB_multisample + +static GLboolean _glewInit_GL_ARB_multisample (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC)glewGetProcAddress((const GLubyte*)"glSampleCoverageARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_multisample */ + +#ifdef GL_ARB_multitexture + +static GLboolean _glewInit_GL_ARB_multitexture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)glewGetProcAddress((const GLubyte*)"glActiveTextureARB")) == NULL) || r; + r = ((glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)glewGetProcAddress((const GLubyte*)"glClientActiveTextureARB")) == NULL) || r; + r = ((glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dARB")) == NULL) || r; + r = ((glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dvARB")) == NULL) || r; + r = ((glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fARB")) == NULL) || r; + r = ((glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fvARB")) == NULL) || r; + r = ((glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1iARB")) == NULL) || r; + r = ((glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1ivARB")) == NULL) || r; + r = ((glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1sARB")) == NULL) || r; + r = ((glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1svARB")) == NULL) || r; + r = ((glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dARB")) == NULL) || r; + r = ((glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dvARB")) == NULL) || r; + r = ((glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fARB")) == NULL) || r; + r = ((glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fvARB")) == NULL) || r; + r = ((glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2iARB")) == NULL) || r; + r = ((glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2ivARB")) == NULL) || r; + r = ((glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2sARB")) == NULL) || r; + r = ((glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2svARB")) == NULL) || r; + r = ((glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dARB")) == NULL) || r; + r = ((glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dvARB")) == NULL) || r; + r = ((glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fARB")) == NULL) || r; + r = ((glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fvARB")) == NULL) || r; + r = ((glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3iARB")) == NULL) || r; + r = ((glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3ivARB")) == NULL) || r; + r = ((glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3sARB")) == NULL) || r; + r = ((glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3svARB")) == NULL) || r; + r = ((glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dARB")) == NULL) || r; + r = ((glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dvARB")) == NULL) || r; + r = ((glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fARB")) == NULL) || r; + r = ((glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fvARB")) == NULL) || r; + r = ((glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4iARB")) == NULL) || r; + r = ((glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4ivARB")) == NULL) || r; + r = ((glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4sARB")) == NULL) || r; + r = ((glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4svARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_multitexture */ + +#ifdef GL_ARB_occlusion_query + +static GLboolean _glewInit_GL_ARB_occlusion_query (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBeginQueryARB = (PFNGLBEGINQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glBeginQueryARB")) == NULL) || r; + r = ((glDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteQueriesARB")) == NULL) || r; + r = ((glEndQueryARB = (PFNGLENDQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glEndQueryARB")) == NULL) || r; + r = ((glGenQueriesARB = (PFNGLGENQUERIESARBPROC)glewGetProcAddress((const GLubyte*)"glGenQueriesARB")) == NULL) || r; + r = ((glGetQueryObjectivARB = (PFNGLGETQUERYOBJECTIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectivARB")) == NULL) || r; + r = ((glGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectuivARB")) == NULL) || r; + r = ((glGetQueryivARB = (PFNGLGETQUERYIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryivARB")) == NULL) || r; + r = ((glIsQueryARB = (PFNGLISQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glIsQueryARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_occlusion_query */ + +#ifdef GL_ARB_pixel_buffer_object + +#endif /* GL_ARB_pixel_buffer_object */ + +#ifdef GL_ARB_point_parameters + +static GLboolean _glewInit_GL_ARB_point_parameters (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfARB")) == NULL) || r; + r = ((glPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfvARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_point_parameters */ + +#ifdef GL_ARB_point_sprite + +#endif /* GL_ARB_point_sprite */ + +#ifdef GL_ARB_shader_objects + +static GLboolean _glewInit_GL_ARB_shader_objects (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glAttachObjectARB")) == NULL) || r; + r = ((glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)glewGetProcAddress((const GLubyte*)"glCompileShaderARB")) == NULL) || r; + r = ((glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glCreateProgramObjectARB")) == NULL) || r; + r = ((glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glCreateShaderObjectARB")) == NULL) || r; + r = ((glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteObjectARB")) == NULL) || r; + r = ((glDetachObjectARB = (PFNGLDETACHOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glDetachObjectARB")) == NULL) || r; + r = ((glGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveUniformARB")) == NULL) || r; + r = ((glGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC)glewGetProcAddress((const GLubyte*)"glGetAttachedObjectsARB")) == NULL) || r; + r = ((glGetHandleARB = (PFNGLGETHANDLEARBPROC)glewGetProcAddress((const GLubyte*)"glGetHandleARB")) == NULL) || r; + r = ((glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)glewGetProcAddress((const GLubyte*)"glGetInfoLogARB")) == NULL) || r; + r = ((glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetObjectParameterfvARB")) == NULL) || r; + r = ((glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetObjectParameterivARB")) == NULL) || r; + r = ((glGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC)glewGetProcAddress((const GLubyte*)"glGetShaderSourceARB")) == NULL) || r; + r = ((glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformLocationARB")) == NULL) || r; + r = ((glGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformfvARB")) == NULL) || r; + r = ((glGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformivARB")) == NULL) || r; + r = ((glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glLinkProgramARB")) == NULL) || r; + r = ((glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)glewGetProcAddress((const GLubyte*)"glShaderSourceARB")) == NULL) || r; + r = ((glUniform1fARB = (PFNGLUNIFORM1FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1fARB")) == NULL) || r; + r = ((glUniform1fvARB = (PFNGLUNIFORM1FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1fvARB")) == NULL) || r; + r = ((glUniform1iARB = (PFNGLUNIFORM1IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1iARB")) == NULL) || r; + r = ((glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1ivARB")) == NULL) || r; + r = ((glUniform2fARB = (PFNGLUNIFORM2FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fARB")) == NULL) || r; + r = ((glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fvARB")) == NULL) || r; + r = ((glUniform2iARB = (PFNGLUNIFORM2IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2iARB")) == NULL) || r; + r = ((glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2ivARB")) == NULL) || r; + r = ((glUniform3fARB = (PFNGLUNIFORM3FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fARB")) == NULL) || r; + r = ((glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fvARB")) == NULL) || r; + r = ((glUniform3iARB = (PFNGLUNIFORM3IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3iARB")) == NULL) || r; + r = ((glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3ivARB")) == NULL) || r; + r = ((glUniform4fARB = (PFNGLUNIFORM4FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fARB")) == NULL) || r; + r = ((glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fvARB")) == NULL) || r; + r = ((glUniform4iARB = (PFNGLUNIFORM4IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4iARB")) == NULL) || r; + r = ((glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4ivARB")) == NULL) || r; + r = ((glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix2fvARB")) == NULL) || r; + r = ((glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix3fvARB")) == NULL) || r; + r = ((glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix4fvARB")) == NULL) || r; + r = ((glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glUseProgramObjectARB")) == NULL) || r; + r = ((glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glValidateProgramARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_shader_objects */ + +#ifdef GL_ARB_shading_language_100 + +#endif /* GL_ARB_shading_language_100 */ + +#ifdef GL_ARB_shadow + +#endif /* GL_ARB_shadow */ + +#ifdef GL_ARB_shadow_ambient + +#endif /* GL_ARB_shadow_ambient */ + +#ifdef GL_ARB_texture_border_clamp + +#endif /* GL_ARB_texture_border_clamp */ + +#ifdef GL_ARB_texture_compression + +static GLboolean _glewInit_GL_ARB_texture_compression (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCompressedTexImage1DARB = (PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage1DARB")) == NULL) || r; + r = ((glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage2DARB")) == NULL) || r; + r = ((glCompressedTexImage3DARB = (PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage3DARB")) == NULL) || r; + r = ((glCompressedTexSubImage1DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage1DARB")) == NULL) || r; + r = ((glCompressedTexSubImage2DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage2DARB")) == NULL) || r; + r = ((glCompressedTexSubImage3DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage3DARB")) == NULL) || r; + r = ((glGetCompressedTexImageARB = (PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"glGetCompressedTexImageARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_texture_compression */ + +#ifdef GL_ARB_texture_cube_map + +#endif /* GL_ARB_texture_cube_map */ + +#ifdef GL_ARB_texture_env_add + +#endif /* GL_ARB_texture_env_add */ + +#ifdef GL_ARB_texture_env_combine + +#endif /* GL_ARB_texture_env_combine */ + +#ifdef GL_ARB_texture_env_crossbar + +#endif /* GL_ARB_texture_env_crossbar */ + +#ifdef GL_ARB_texture_env_dot3 + +#endif /* GL_ARB_texture_env_dot3 */ + +#ifdef GL_ARB_texture_float + +#endif /* GL_ARB_texture_float */ + +#ifdef GL_ARB_texture_mirrored_repeat + +#endif /* GL_ARB_texture_mirrored_repeat */ + +#ifdef GL_ARB_texture_non_power_of_two + +#endif /* GL_ARB_texture_non_power_of_two */ + +#ifdef GL_ARB_texture_rectangle + +#endif /* GL_ARB_texture_rectangle */ + +#ifdef GL_ARB_transpose_matrix + +static GLboolean _glewInit_GL_ARB_transpose_matrix (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glLoadTransposeMatrixdARB = (PFNGLLOADTRANSPOSEMATRIXDARBPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixdARB")) == NULL) || r; + r = ((glLoadTransposeMatrixfARB = (PFNGLLOADTRANSPOSEMATRIXFARBPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixfARB")) == NULL) || r; + r = ((glMultTransposeMatrixdARB = (PFNGLMULTTRANSPOSEMATRIXDARBPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixdARB")) == NULL) || r; + r = ((glMultTransposeMatrixfARB = (PFNGLMULTTRANSPOSEMATRIXFARBPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixfARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_transpose_matrix */ + +#ifdef GL_ARB_vertex_blend + +static GLboolean _glewInit_GL_ARB_vertex_blend (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glVertexBlendARB = (PFNGLVERTEXBLENDARBPROC)glewGetProcAddress((const GLubyte*)"glVertexBlendARB")) == NULL) || r; + r = ((glWeightPointerARB = (PFNGLWEIGHTPOINTERARBPROC)glewGetProcAddress((const GLubyte*)"glWeightPointerARB")) == NULL) || r; + r = ((glWeightbvARB = (PFNGLWEIGHTBVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightbvARB")) == NULL) || r; + r = ((glWeightdvARB = (PFNGLWEIGHTDVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightdvARB")) == NULL) || r; + r = ((glWeightfvARB = (PFNGLWEIGHTFVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightfvARB")) == NULL) || r; + r = ((glWeightivARB = (PFNGLWEIGHTIVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightivARB")) == NULL) || r; + r = ((glWeightsvARB = (PFNGLWEIGHTSVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightsvARB")) == NULL) || r; + r = ((glWeightubvARB = (PFNGLWEIGHTUBVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightubvARB")) == NULL) || r; + r = ((glWeightuivARB = (PFNGLWEIGHTUIVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightuivARB")) == NULL) || r; + r = ((glWeightusvARB = (PFNGLWEIGHTUSVARBPROC)glewGetProcAddress((const GLubyte*)"glWeightusvARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_vertex_blend */ + +#ifdef GL_ARB_vertex_buffer_object + +static GLboolean _glewInit_GL_ARB_vertex_buffer_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBindBufferARB = (PFNGLBINDBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glBindBufferARB")) == NULL) || r; + r = ((glBufferDataARB = (PFNGLBUFFERDATAARBPROC)glewGetProcAddress((const GLubyte*)"glBufferDataARB")) == NULL) || r; + r = ((glBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC)glewGetProcAddress((const GLubyte*)"glBufferSubDataARB")) == NULL) || r; + r = ((glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteBuffersARB")) == NULL) || r; + r = ((glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glGenBuffersARB")) == NULL) || r; + r = ((glGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferParameterivARB")) == NULL) || r; + r = ((glGetBufferPointervARB = (PFNGLGETBUFFERPOINTERVARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferPointervARB")) == NULL) || r; + r = ((glGetBufferSubDataARB = (PFNGLGETBUFFERSUBDATAARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferSubDataARB")) == NULL) || r; + r = ((glIsBufferARB = (PFNGLISBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glIsBufferARB")) == NULL) || r; + r = ((glMapBufferARB = (PFNGLMAPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glMapBufferARB")) == NULL) || r; + r = ((glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glUnmapBufferARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_vertex_buffer_object */ + +#ifdef GL_ARB_vertex_program + +static GLboolean _glewInit_GL_ARB_vertex_program (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBindProgramARB = (PFNGLBINDPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glBindProgramARB")) == NULL) || r; + r = ((glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgramsARB")) == NULL) || r; + r = ((glDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC)glewGetProcAddress((const GLubyte*)"glDisableVertexAttribArrayARB")) == NULL) || r; + r = ((glEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC)glewGetProcAddress((const GLubyte*)"glEnableVertexAttribArrayARB")) == NULL) || r; + r = ((glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC)glewGetProcAddress((const GLubyte*)"glGenProgramsARB")) == NULL) || r; + r = ((glGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramEnvParameterdvARB")) == NULL) || r; + r = ((glGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramEnvParameterfvARB")) == NULL) || r; + r = ((glGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramLocalParameterdvARB")) == NULL) || r; + r = ((glGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramLocalParameterfvARB")) == NULL) || r; + r = ((glGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramStringARB")) == NULL) || r; + r = ((glGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramivARB")) == NULL) || r; + r = ((glGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointervARB")) == NULL) || r; + r = ((glGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdvARB")) == NULL) || r; + r = ((glGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfvARB")) == NULL) || r; + r = ((glGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribivARB")) == NULL) || r; + r = ((glIsProgramARB = (PFNGLISPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glIsProgramARB")) == NULL) || r; + r = ((glProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4dARB")) == NULL) || r; + r = ((glProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4dvARB")) == NULL) || r; + r = ((glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4fARB")) == NULL) || r; + r = ((glProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4fvARB")) == NULL) || r; + r = ((glProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4dARB")) == NULL) || r; + r = ((glProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4dvARB")) == NULL) || r; + r = ((glProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4fARB")) == NULL) || r; + r = ((glProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4fvARB")) == NULL) || r; + r = ((glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"glProgramStringARB")) == NULL) || r; + r = ((glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dARB")) == NULL) || r; + r = ((glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dvARB")) == NULL) || r; + r = ((glVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fARB")) == NULL) || r; + r = ((glVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fvARB")) == NULL) || r; + r = ((glVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sARB")) == NULL) || r; + r = ((glVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1svARB")) == NULL) || r; + r = ((glVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dARB")) == NULL) || r; + r = ((glVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dvARB")) == NULL) || r; + r = ((glVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fARB")) == NULL) || r; + r = ((glVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fvARB")) == NULL) || r; + r = ((glVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sARB")) == NULL) || r; + r = ((glVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2svARB")) == NULL) || r; + r = ((glVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dARB")) == NULL) || r; + r = ((glVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dvARB")) == NULL) || r; + r = ((glVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fARB")) == NULL) || r; + r = ((glVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fvARB")) == NULL) || r; + r = ((glVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sARB")) == NULL) || r; + r = ((glVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3svARB")) == NULL) || r; + r = ((glVertexAttrib4NbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NbvARB")) == NULL) || r; + r = ((glVertexAttrib4NivARB = (PFNGLVERTEXATTRIB4NIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NivARB")) == NULL) || r; + r = ((glVertexAttrib4NsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NsvARB")) == NULL) || r; + r = ((glVertexAttrib4NubARB = (PFNGLVERTEXATTRIB4NUBARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NubARB")) == NULL) || r; + r = ((glVertexAttrib4NubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NubvARB")) == NULL) || r; + r = ((glVertexAttrib4NuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NuivARB")) == NULL) || r; + r = ((glVertexAttrib4NusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NusvARB")) == NULL) || r; + r = ((glVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4bvARB")) == NULL) || r; + r = ((glVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dARB")) == NULL) || r; + r = ((glVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dvARB")) == NULL) || r; + r = ((glVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fARB")) == NULL) || r; + r = ((glVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fvARB")) == NULL) || r; + r = ((glVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ivARB")) == NULL) || r; + r = ((glVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sARB")) == NULL) || r; + r = ((glVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4svARB")) == NULL) || r; + r = ((glVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubvARB")) == NULL) || r; + r = ((glVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4uivARB")) == NULL) || r; + r = ((glVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4usvARB")) == NULL) || r; + r = ((glVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointerARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_vertex_program */ + +#ifdef GL_ARB_vertex_shader + +static GLboolean _glewInit_GL_ARB_vertex_shader (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glBindAttribLocationARB")) == NULL) || r; + r = ((glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAttribARB")) == NULL) || r; + r = ((glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glGetAttribLocationARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_vertex_shader */ + +#ifdef GL_ARB_window_pos + +static GLboolean _glewInit_GL_ARB_window_pos (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glWindowPos2dARB = (PFNGLWINDOWPOS2DARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dARB")) == NULL) || r; + r = ((glWindowPos2dvARB = (PFNGLWINDOWPOS2DVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dvARB")) == NULL) || r; + r = ((glWindowPos2fARB = (PFNGLWINDOWPOS2FARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fARB")) == NULL) || r; + r = ((glWindowPos2fvARB = (PFNGLWINDOWPOS2FVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fvARB")) == NULL) || r; + r = ((glWindowPos2iARB = (PFNGLWINDOWPOS2IARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2iARB")) == NULL) || r; + r = ((glWindowPos2ivARB = (PFNGLWINDOWPOS2IVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2ivARB")) == NULL) || r; + r = ((glWindowPos2sARB = (PFNGLWINDOWPOS2SARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2sARB")) == NULL) || r; + r = ((glWindowPos2svARB = (PFNGLWINDOWPOS2SVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2svARB")) == NULL) || r; + r = ((glWindowPos3dARB = (PFNGLWINDOWPOS3DARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dARB")) == NULL) || r; + r = ((glWindowPos3dvARB = (PFNGLWINDOWPOS3DVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dvARB")) == NULL) || r; + r = ((glWindowPos3fARB = (PFNGLWINDOWPOS3FARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fARB")) == NULL) || r; + r = ((glWindowPos3fvARB = (PFNGLWINDOWPOS3FVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fvARB")) == NULL) || r; + r = ((glWindowPos3iARB = (PFNGLWINDOWPOS3IARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3iARB")) == NULL) || r; + r = ((glWindowPos3ivARB = (PFNGLWINDOWPOS3IVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3ivARB")) == NULL) || r; + r = ((glWindowPos3sARB = (PFNGLWINDOWPOS3SARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3sARB")) == NULL) || r; + r = ((glWindowPos3svARB = (PFNGLWINDOWPOS3SVARBPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3svARB")) == NULL) || r; + + return r; +} + +#endif /* GL_ARB_window_pos */ + +#ifdef GL_ATIX_point_sprites + +#endif /* GL_ATIX_point_sprites */ + +#ifdef GL_ATIX_texture_env_combine3 + +#endif /* GL_ATIX_texture_env_combine3 */ + +#ifdef GL_ATIX_texture_env_route + +#endif /* GL_ATIX_texture_env_route */ + +#ifdef GL_ATIX_vertex_shader_output_point_size + +#endif /* GL_ATIX_vertex_shader_output_point_size */ + +#ifdef GL_ATI_draw_buffers + +static GLboolean _glewInit_GL_ATI_draw_buffers (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDrawBuffersATI = (PFNGLDRAWBUFFERSATIPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffersATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_draw_buffers */ + +#ifdef GL_ATI_element_array + +static GLboolean _glewInit_GL_ATI_element_array (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDrawElementArrayATI = (PFNGLDRAWELEMENTARRAYATIPROC)glewGetProcAddress((const GLubyte*)"glDrawElementArrayATI")) == NULL) || r; + r = ((glDrawRangeElementArrayATI = (PFNGLDRAWRANGEELEMENTARRAYATIPROC)glewGetProcAddress((const GLubyte*)"glDrawRangeElementArrayATI")) == NULL) || r; + r = ((glElementPointerATI = (PFNGLELEMENTPOINTERATIPROC)glewGetProcAddress((const GLubyte*)"glElementPointerATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_element_array */ + +#ifdef GL_ATI_envmap_bumpmap + +static GLboolean _glewInit_GL_ATI_envmap_bumpmap (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetTexBumpParameterfvATI = (PFNGLGETTEXBUMPPARAMETERFVATIPROC)glewGetProcAddress((const GLubyte*)"glGetTexBumpParameterfvATI")) == NULL) || r; + r = ((glGetTexBumpParameterivATI = (PFNGLGETTEXBUMPPARAMETERIVATIPROC)glewGetProcAddress((const GLubyte*)"glGetTexBumpParameterivATI")) == NULL) || r; + r = ((glTexBumpParameterfvATI = (PFNGLTEXBUMPPARAMETERFVATIPROC)glewGetProcAddress((const GLubyte*)"glTexBumpParameterfvATI")) == NULL) || r; + r = ((glTexBumpParameterivATI = (PFNGLTEXBUMPPARAMETERIVATIPROC)glewGetProcAddress((const GLubyte*)"glTexBumpParameterivATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_envmap_bumpmap */ + +#ifdef GL_ATI_fragment_shader + +static GLboolean _glewInit_GL_ATI_fragment_shader (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAlphaFragmentOp1ATI = (PFNGLALPHAFRAGMENTOP1ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp1ATI")) == NULL) || r; + r = ((glAlphaFragmentOp2ATI = (PFNGLALPHAFRAGMENTOP2ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp2ATI")) == NULL) || r; + r = ((glAlphaFragmentOp3ATI = (PFNGLALPHAFRAGMENTOP3ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp3ATI")) == NULL) || r; + r = ((glBeginFragmentShaderATI = (PFNGLBEGINFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glBeginFragmentShaderATI")) == NULL) || r; + r = ((glBindFragmentShaderATI = (PFNGLBINDFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glBindFragmentShaderATI")) == NULL) || r; + r = ((glColorFragmentOp1ATI = (PFNGLCOLORFRAGMENTOP1ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp1ATI")) == NULL) || r; + r = ((glColorFragmentOp2ATI = (PFNGLCOLORFRAGMENTOP2ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp2ATI")) == NULL) || r; + r = ((glColorFragmentOp3ATI = (PFNGLCOLORFRAGMENTOP3ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp3ATI")) == NULL) || r; + r = ((glDeleteFragmentShaderATI = (PFNGLDELETEFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glDeleteFragmentShaderATI")) == NULL) || r; + r = ((glEndFragmentShaderATI = (PFNGLENDFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glEndFragmentShaderATI")) == NULL) || r; + r = ((glGenFragmentShadersATI = (PFNGLGENFRAGMENTSHADERSATIPROC)glewGetProcAddress((const GLubyte*)"glGenFragmentShadersATI")) == NULL) || r; + r = ((glPassTexCoordATI = (PFNGLPASSTEXCOORDATIPROC)glewGetProcAddress((const GLubyte*)"glPassTexCoordATI")) == NULL) || r; + r = ((glSampleMapATI = (PFNGLSAMPLEMAPATIPROC)glewGetProcAddress((const GLubyte*)"glSampleMapATI")) == NULL) || r; + r = ((glSetFragmentShaderConstantATI = (PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)glewGetProcAddress((const GLubyte*)"glSetFragmentShaderConstantATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_fragment_shader */ + +#ifdef GL_ATI_map_object_buffer + +static GLboolean _glewInit_GL_ATI_map_object_buffer (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glMapObjectBufferATI = (PFNGLMAPOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glMapObjectBufferATI")) == NULL) || r; + r = ((glUnmapObjectBufferATI = (PFNGLUNMAPOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glUnmapObjectBufferATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_map_object_buffer */ + +#ifdef GL_ATI_pn_triangles + +static GLboolean _glewInit_GL_ATI_pn_triangles (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPNTrianglesfATI = (PFNGLPNTRIANGLESFATIPROC)glewGetProcAddress((const GLubyte*)"glPNTrianglesfATI")) == NULL) || r; + r = ((glPNTrianglesiATI = (PFNGLPNTRIANGLESIATIPROC)glewGetProcAddress((const GLubyte*)"glPNTrianglesiATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_pn_triangles */ + +#ifdef GL_ATI_separate_stencil + +static GLboolean _glewInit_GL_ATI_separate_stencil (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glStencilFuncSeparateATI = (PFNGLSTENCILFUNCSEPARATEATIPROC)glewGetProcAddress((const GLubyte*)"glStencilFuncSeparateATI")) == NULL) || r; + r = ((glStencilOpSeparateATI = (PFNGLSTENCILOPSEPARATEATIPROC)glewGetProcAddress((const GLubyte*)"glStencilOpSeparateATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_separate_stencil */ + +#ifdef GL_ATI_text_fragment_shader + +#endif /* GL_ATI_text_fragment_shader */ + +#ifdef GL_ATI_texture_compression_3dc + +#endif /* GL_ATI_texture_compression_3dc */ + +#ifdef GL_ATI_texture_env_combine3 + +#endif /* GL_ATI_texture_env_combine3 */ + +#ifdef GL_ATI_texture_float + +#endif /* GL_ATI_texture_float */ + +#ifdef GL_ATI_texture_mirror_once + +#endif /* GL_ATI_texture_mirror_once */ + +#ifdef GL_ATI_vertex_array_object + +static GLboolean _glewInit_GL_ATI_vertex_array_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glArrayObjectATI = (PFNGLARRAYOBJECTATIPROC)glewGetProcAddress((const GLubyte*)"glArrayObjectATI")) == NULL) || r; + r = ((glFreeObjectBufferATI = (PFNGLFREEOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glFreeObjectBufferATI")) == NULL) || r; + r = ((glGetArrayObjectfvATI = (PFNGLGETARRAYOBJECTFVATIPROC)glewGetProcAddress((const GLubyte*)"glGetArrayObjectfvATI")) == NULL) || r; + r = ((glGetArrayObjectivATI = (PFNGLGETARRAYOBJECTIVATIPROC)glewGetProcAddress((const GLubyte*)"glGetArrayObjectivATI")) == NULL) || r; + r = ((glGetObjectBufferfvATI = (PFNGLGETOBJECTBUFFERFVATIPROC)glewGetProcAddress((const GLubyte*)"glGetObjectBufferfvATI")) == NULL) || r; + r = ((glGetObjectBufferivATI = (PFNGLGETOBJECTBUFFERIVATIPROC)glewGetProcAddress((const GLubyte*)"glGetObjectBufferivATI")) == NULL) || r; + r = ((glGetVariantArrayObjectfvATI = (PFNGLGETVARIANTARRAYOBJECTFVATIPROC)glewGetProcAddress((const GLubyte*)"glGetVariantArrayObjectfvATI")) == NULL) || r; + r = ((glGetVariantArrayObjectivATI = (PFNGLGETVARIANTARRAYOBJECTIVATIPROC)glewGetProcAddress((const GLubyte*)"glGetVariantArrayObjectivATI")) == NULL) || r; + r = ((glIsObjectBufferATI = (PFNGLISOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glIsObjectBufferATI")) == NULL) || r; + r = ((glNewObjectBufferATI = (PFNGLNEWOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glNewObjectBufferATI")) == NULL) || r; + r = ((glUpdateObjectBufferATI = (PFNGLUPDATEOBJECTBUFFERATIPROC)glewGetProcAddress((const GLubyte*)"glUpdateObjectBufferATI")) == NULL) || r; + r = ((glVariantArrayObjectATI = (PFNGLVARIANTARRAYOBJECTATIPROC)glewGetProcAddress((const GLubyte*)"glVariantArrayObjectATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_vertex_array_object */ + +#ifdef GL_ATI_vertex_attrib_array_object + +static GLboolean _glewInit_GL_ATI_vertex_attrib_array_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetVertexAttribArrayObjectfvATI = (PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribArrayObjectfvATI")) == NULL) || r; + r = ((glGetVertexAttribArrayObjectivATI = (PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribArrayObjectivATI")) == NULL) || r; + r = ((glVertexAttribArrayObjectATI = (PFNGLVERTEXATTRIBARRAYOBJECTATIPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribArrayObjectATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_vertex_attrib_array_object */ + +#ifdef GL_ATI_vertex_streams + +static GLboolean _glewInit_GL_ATI_vertex_streams (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glClientActiveVertexStreamATI = (PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC)glewGetProcAddress((const GLubyte*)"glClientActiveVertexStreamATI")) == NULL) || r; + r = ((glNormalStream3bATI = (PFNGLNORMALSTREAM3BATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3bATI")) == NULL) || r; + r = ((glNormalStream3bvATI = (PFNGLNORMALSTREAM3BVATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3bvATI")) == NULL) || r; + r = ((glNormalStream3dATI = (PFNGLNORMALSTREAM3DATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3dATI")) == NULL) || r; + r = ((glNormalStream3dvATI = (PFNGLNORMALSTREAM3DVATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3dvATI")) == NULL) || r; + r = ((glNormalStream3fATI = (PFNGLNORMALSTREAM3FATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3fATI")) == NULL) || r; + r = ((glNormalStream3fvATI = (PFNGLNORMALSTREAM3FVATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3fvATI")) == NULL) || r; + r = ((glNormalStream3iATI = (PFNGLNORMALSTREAM3IATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3iATI")) == NULL) || r; + r = ((glNormalStream3ivATI = (PFNGLNORMALSTREAM3IVATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3ivATI")) == NULL) || r; + r = ((glNormalStream3sATI = (PFNGLNORMALSTREAM3SATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3sATI")) == NULL) || r; + r = ((glNormalStream3svATI = (PFNGLNORMALSTREAM3SVATIPROC)glewGetProcAddress((const GLubyte*)"glNormalStream3svATI")) == NULL) || r; + r = ((glVertexBlendEnvfATI = (PFNGLVERTEXBLENDENVFATIPROC)glewGetProcAddress((const GLubyte*)"glVertexBlendEnvfATI")) == NULL) || r; + r = ((glVertexBlendEnviATI = (PFNGLVERTEXBLENDENVIATIPROC)glewGetProcAddress((const GLubyte*)"glVertexBlendEnviATI")) == NULL) || r; + r = ((glVertexStream2dATI = (PFNGLVERTEXSTREAM2DATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2dATI")) == NULL) || r; + r = ((glVertexStream2dvATI = (PFNGLVERTEXSTREAM2DVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2dvATI")) == NULL) || r; + r = ((glVertexStream2fATI = (PFNGLVERTEXSTREAM2FATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2fATI")) == NULL) || r; + r = ((glVertexStream2fvATI = (PFNGLVERTEXSTREAM2FVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2fvATI")) == NULL) || r; + r = ((glVertexStream2iATI = (PFNGLVERTEXSTREAM2IATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2iATI")) == NULL) || r; + r = ((glVertexStream2ivATI = (PFNGLVERTEXSTREAM2IVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2ivATI")) == NULL) || r; + r = ((glVertexStream2sATI = (PFNGLVERTEXSTREAM2SATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2sATI")) == NULL) || r; + r = ((glVertexStream2svATI = (PFNGLVERTEXSTREAM2SVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream2svATI")) == NULL) || r; + r = ((glVertexStream3dATI = (PFNGLVERTEXSTREAM3DATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3dATI")) == NULL) || r; + r = ((glVertexStream3dvATI = (PFNGLVERTEXSTREAM3DVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3dvATI")) == NULL) || r; + r = ((glVertexStream3fATI = (PFNGLVERTEXSTREAM3FATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3fATI")) == NULL) || r; + r = ((glVertexStream3fvATI = (PFNGLVERTEXSTREAM3FVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3fvATI")) == NULL) || r; + r = ((glVertexStream3iATI = (PFNGLVERTEXSTREAM3IATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3iATI")) == NULL) || r; + r = ((glVertexStream3ivATI = (PFNGLVERTEXSTREAM3IVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3ivATI")) == NULL) || r; + r = ((glVertexStream3sATI = (PFNGLVERTEXSTREAM3SATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3sATI")) == NULL) || r; + r = ((glVertexStream3svATI = (PFNGLVERTEXSTREAM3SVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream3svATI")) == NULL) || r; + r = ((glVertexStream4dATI = (PFNGLVERTEXSTREAM4DATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4dATI")) == NULL) || r; + r = ((glVertexStream4dvATI = (PFNGLVERTEXSTREAM4DVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4dvATI")) == NULL) || r; + r = ((glVertexStream4fATI = (PFNGLVERTEXSTREAM4FATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4fATI")) == NULL) || r; + r = ((glVertexStream4fvATI = (PFNGLVERTEXSTREAM4FVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4fvATI")) == NULL) || r; + r = ((glVertexStream4iATI = (PFNGLVERTEXSTREAM4IATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4iATI")) == NULL) || r; + r = ((glVertexStream4ivATI = (PFNGLVERTEXSTREAM4IVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4ivATI")) == NULL) || r; + r = ((glVertexStream4sATI = (PFNGLVERTEXSTREAM4SATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4sATI")) == NULL) || r; + r = ((glVertexStream4svATI = (PFNGLVERTEXSTREAM4SVATIPROC)glewGetProcAddress((const GLubyte*)"glVertexStream4svATI")) == NULL) || r; + + return r; +} + +#endif /* GL_ATI_vertex_streams */ + +#ifdef GL_EXT_422_pixels + +#endif /* GL_EXT_422_pixels */ + +#ifdef GL_EXT_Cg_shader + +#endif /* GL_EXT_Cg_shader */ + +#ifdef GL_EXT_abgr + +#endif /* GL_EXT_abgr */ + +#ifdef GL_EXT_bgra + +#endif /* GL_EXT_bgra */ + +#ifdef GL_EXT_blend_color + +static GLboolean _glewInit_GL_EXT_blend_color (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendColorEXT = (PFNGLBLENDCOLOREXTPROC)glewGetProcAddress((const GLubyte*)"glBlendColorEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_blend_color */ + +#ifdef GL_EXT_blend_equation_separate + +static GLboolean _glewInit_GL_EXT_blend_equation_separate (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendEquationSeparateEXT = (PFNGLBLENDEQUATIONSEPARATEEXTPROC)glewGetProcAddress((const GLubyte*)"glBlendEquationSeparateEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_blend_equation_separate */ + +#ifdef GL_EXT_blend_func_separate + +static GLboolean _glewInit_GL_EXT_blend_func_separate (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendFuncSeparateEXT = (PFNGLBLENDFUNCSEPARATEEXTPROC)glewGetProcAddress((const GLubyte*)"glBlendFuncSeparateEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_blend_func_separate */ + +#ifdef GL_EXT_blend_logic_op + +#endif /* GL_EXT_blend_logic_op */ + +#ifdef GL_EXT_blend_minmax + +static GLboolean _glewInit_GL_EXT_blend_minmax (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlendEquationEXT = (PFNGLBLENDEQUATIONEXTPROC)glewGetProcAddress((const GLubyte*)"glBlendEquationEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_blend_minmax */ + +#ifdef GL_EXT_blend_subtract + +#endif /* GL_EXT_blend_subtract */ + +#ifdef GL_EXT_clip_volume_hint + +#endif /* GL_EXT_clip_volume_hint */ + +#ifdef GL_EXT_cmyka + +#endif /* GL_EXT_cmyka */ + +#ifdef GL_EXT_color_subtable + +static GLboolean _glewInit_GL_EXT_color_subtable (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColorSubTableEXT = (PFNGLCOLORSUBTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"glColorSubTableEXT")) == NULL) || r; + r = ((glCopyColorSubTableEXT = (PFNGLCOPYCOLORSUBTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyColorSubTableEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_color_subtable */ + +#ifdef GL_EXT_compiled_vertex_array + +static GLboolean _glewInit_GL_EXT_compiled_vertex_array (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC)glewGetProcAddress((const GLubyte*)"glLockArraysEXT")) == NULL) || r; + r = ((glUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC)glewGetProcAddress((const GLubyte*)"glUnlockArraysEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_compiled_vertex_array */ + +#ifdef GL_EXT_convolution + +static GLboolean _glewInit_GL_EXT_convolution (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glConvolutionFilter1DEXT = (PFNGLCONVOLUTIONFILTER1DEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionFilter1DEXT")) == NULL) || r; + r = ((glConvolutionFilter2DEXT = (PFNGLCONVOLUTIONFILTER2DEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionFilter2DEXT")) == NULL) || r; + r = ((glConvolutionParameterfEXT = (PFNGLCONVOLUTIONPARAMETERFEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameterfEXT")) == NULL) || r; + r = ((glConvolutionParameterfvEXT = (PFNGLCONVOLUTIONPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameterfvEXT")) == NULL) || r; + r = ((glConvolutionParameteriEXT = (PFNGLCONVOLUTIONPARAMETERIEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameteriEXT")) == NULL) || r; + r = ((glConvolutionParameterivEXT = (PFNGLCONVOLUTIONPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glConvolutionParameterivEXT")) == NULL) || r; + r = ((glCopyConvolutionFilter1DEXT = (PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyConvolutionFilter1DEXT")) == NULL) || r; + r = ((glCopyConvolutionFilter2DEXT = (PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyConvolutionFilter2DEXT")) == NULL) || r; + r = ((glGetConvolutionFilterEXT = (PFNGLGETCONVOLUTIONFILTEREXTPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionFilterEXT")) == NULL) || r; + r = ((glGetConvolutionParameterfvEXT = (PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionParameterfvEXT")) == NULL) || r; + r = ((glGetConvolutionParameterivEXT = (PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetConvolutionParameterivEXT")) == NULL) || r; + r = ((glGetSeparableFilterEXT = (PFNGLGETSEPARABLEFILTEREXTPROC)glewGetProcAddress((const GLubyte*)"glGetSeparableFilterEXT")) == NULL) || r; + r = ((glSeparableFilter2DEXT = (PFNGLSEPARABLEFILTER2DEXTPROC)glewGetProcAddress((const GLubyte*)"glSeparableFilter2DEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_convolution */ + +#ifdef GL_EXT_coordinate_frame + +static GLboolean _glewInit_GL_EXT_coordinate_frame (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBinormalPointerEXT = (PFNGLBINORMALPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glBinormalPointerEXT")) == NULL) || r; + r = ((glTangentPointerEXT = (PFNGLTANGENTPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glTangentPointerEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_coordinate_frame */ + +#ifdef GL_EXT_copy_texture + +static GLboolean _glewInit_GL_EXT_copy_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCopyTexImage1DEXT = (PFNGLCOPYTEXIMAGE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyTexImage1DEXT")) == NULL) || r; + r = ((glCopyTexImage2DEXT = (PFNGLCOPYTEXIMAGE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyTexImage2DEXT")) == NULL) || r; + r = ((glCopyTexSubImage1DEXT = (PFNGLCOPYTEXSUBIMAGE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyTexSubImage1DEXT")) == NULL) || r; + r = ((glCopyTexSubImage2DEXT = (PFNGLCOPYTEXSUBIMAGE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyTexSubImage2DEXT")) == NULL) || r; + r = ((glCopyTexSubImage3DEXT = (PFNGLCOPYTEXSUBIMAGE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glCopyTexSubImage3DEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_copy_texture */ + +#ifdef GL_EXT_cull_vertex + +static GLboolean _glewInit_GL_EXT_cull_vertex (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCullParameterdvEXT = (PFNGLCULLPARAMETERDVEXTPROC)glewGetProcAddress((const GLubyte*)"glCullParameterdvEXT")) == NULL) || r; + r = ((glCullParameterfvEXT = (PFNGLCULLPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glCullParameterfvEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_cull_vertex */ + +#ifdef GL_EXT_depth_bounds_test + +static GLboolean _glewInit_GL_EXT_depth_bounds_test (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDepthBoundsEXT = (PFNGLDEPTHBOUNDSEXTPROC)glewGetProcAddress((const GLubyte*)"glDepthBoundsEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_depth_bounds_test */ + +#ifdef GL_EXT_draw_range_elements + +static GLboolean _glewInit_GL_EXT_draw_range_elements (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDrawRangeElementsEXT = (PFNGLDRAWRANGEELEMENTSEXTPROC)glewGetProcAddress((const GLubyte*)"glDrawRangeElementsEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_draw_range_elements */ + +#ifdef GL_EXT_fog_coord + +static GLboolean _glewInit_GL_EXT_fog_coord (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFogCoordPointerEXT = (PFNGLFOGCOORDPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glFogCoordPointerEXT")) == NULL) || r; + r = ((glFogCoorddEXT = (PFNGLFOGCOORDDEXTPROC)glewGetProcAddress((const GLubyte*)"glFogCoorddEXT")) == NULL) || r; + r = ((glFogCoorddvEXT = (PFNGLFOGCOORDDVEXTPROC)glewGetProcAddress((const GLubyte*)"glFogCoorddvEXT")) == NULL) || r; + r = ((glFogCoordfEXT = (PFNGLFOGCOORDFEXTPROC)glewGetProcAddress((const GLubyte*)"glFogCoordfEXT")) == NULL) || r; + r = ((glFogCoordfvEXT = (PFNGLFOGCOORDFVEXTPROC)glewGetProcAddress((const GLubyte*)"glFogCoordfvEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_fog_coord */ + +#ifdef GL_EXT_fragment_lighting + +static GLboolean _glewInit_GL_EXT_fragment_lighting (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFragmentColorMaterialEXT = (PFNGLFRAGMENTCOLORMATERIALEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentColorMaterialEXT")) == NULL) || r; + r = ((glFragmentLightModelfEXT = (PFNGLFRAGMENTLIGHTMODELFEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelfEXT")) == NULL) || r; + r = ((glFragmentLightModelfvEXT = (PFNGLFRAGMENTLIGHTMODELFVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelfvEXT")) == NULL) || r; + r = ((glFragmentLightModeliEXT = (PFNGLFRAGMENTLIGHTMODELIEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModeliEXT")) == NULL) || r; + r = ((glFragmentLightModelivEXT = (PFNGLFRAGMENTLIGHTMODELIVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelivEXT")) == NULL) || r; + r = ((glFragmentLightfEXT = (PFNGLFRAGMENTLIGHTFEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightfEXT")) == NULL) || r; + r = ((glFragmentLightfvEXT = (PFNGLFRAGMENTLIGHTFVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightfvEXT")) == NULL) || r; + r = ((glFragmentLightiEXT = (PFNGLFRAGMENTLIGHTIEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightiEXT")) == NULL) || r; + r = ((glFragmentLightivEXT = (PFNGLFRAGMENTLIGHTIVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightivEXT")) == NULL) || r; + r = ((glFragmentMaterialfEXT = (PFNGLFRAGMENTMATERIALFEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialfEXT")) == NULL) || r; + r = ((glFragmentMaterialfvEXT = (PFNGLFRAGMENTMATERIALFVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialfvEXT")) == NULL) || r; + r = ((glFragmentMaterialiEXT = (PFNGLFRAGMENTMATERIALIEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialiEXT")) == NULL) || r; + r = ((glFragmentMaterialivEXT = (PFNGLFRAGMENTMATERIALIVEXTPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialivEXT")) == NULL) || r; + r = ((glGetFragmentLightfvEXT = (PFNGLGETFRAGMENTLIGHTFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentLightfvEXT")) == NULL) || r; + r = ((glGetFragmentLightivEXT = (PFNGLGETFRAGMENTLIGHTIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentLightivEXT")) == NULL) || r; + r = ((glGetFragmentMaterialfvEXT = (PFNGLGETFRAGMENTMATERIALFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentMaterialfvEXT")) == NULL) || r; + r = ((glGetFragmentMaterialivEXT = (PFNGLGETFRAGMENTMATERIALIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentMaterialivEXT")) == NULL) || r; + r = ((glLightEnviEXT = (PFNGLLIGHTENVIEXTPROC)glewGetProcAddress((const GLubyte*)"glLightEnviEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_fragment_lighting */ + +#ifdef GL_EXT_framebuffer_blit + +static GLboolean _glewInit_GL_EXT_framebuffer_blit (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBlitFramebufferEXT = (PFNGLBLITFRAMEBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glBlitFramebufferEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_framebuffer_blit */ + +#ifdef GL_EXT_framebuffer_multisample + +static GLboolean _glewInit_GL_EXT_framebuffer_multisample (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glRenderbufferStorageMultisampleEXT = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)glewGetProcAddress((const GLubyte*)"glRenderbufferStorageMultisampleEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_framebuffer_multisample */ + +#ifdef GL_EXT_framebuffer_object + +static GLboolean _glewInit_GL_EXT_framebuffer_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindFramebufferEXT")) == NULL) || r; + r = ((glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindRenderbufferEXT")) == NULL) || r; + r = ((glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)glewGetProcAddress((const GLubyte*)"glCheckFramebufferStatusEXT")) == NULL) || r; + r = ((glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteFramebuffersEXT")) == NULL) || r; + r = ((glDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteRenderbuffersEXT")) == NULL) || r; + r = ((glFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferRenderbufferEXT")) == NULL) || r; + r = ((glFramebufferTexture1DEXT = (PFNGLFRAMEBUFFERTEXTURE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture1DEXT")) == NULL) || r; + r = ((glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture2DEXT")) == NULL) || r; + r = ((glFramebufferTexture3DEXT = (PFNGLFRAMEBUFFERTEXTURE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture3DEXT")) == NULL) || r; + r = ((glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenFramebuffersEXT")) == NULL) || r; + r = ((glGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenRenderbuffersEXT")) == NULL) || r; + r = ((glGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC)glewGetProcAddress((const GLubyte*)"glGenerateMipmapEXT")) == NULL) || r; + r = ((glGetFramebufferAttachmentParameterivEXT = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFramebufferAttachmentParameterivEXT")) == NULL) || r; + r = ((glGetRenderbufferParameterivEXT = (PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetRenderbufferParameterivEXT")) == NULL) || r; + r = ((glIsFramebufferEXT = (PFNGLISFRAMEBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glIsFramebufferEXT")) == NULL) || r; + r = ((glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glIsRenderbufferEXT")) == NULL) || r; + r = ((glRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC)glewGetProcAddress((const GLubyte*)"glRenderbufferStorageEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_framebuffer_object */ + +#ifdef GL_EXT_histogram + +static GLboolean _glewInit_GL_EXT_histogram (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetHistogramEXT = (PFNGLGETHISTOGRAMEXTPROC)glewGetProcAddress((const GLubyte*)"glGetHistogramEXT")) == NULL) || r; + r = ((glGetHistogramParameterfvEXT = (PFNGLGETHISTOGRAMPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetHistogramParameterfvEXT")) == NULL) || r; + r = ((glGetHistogramParameterivEXT = (PFNGLGETHISTOGRAMPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetHistogramParameterivEXT")) == NULL) || r; + r = ((glGetMinmaxEXT = (PFNGLGETMINMAXEXTPROC)glewGetProcAddress((const GLubyte*)"glGetMinmaxEXT")) == NULL) || r; + r = ((glGetMinmaxParameterfvEXT = (PFNGLGETMINMAXPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetMinmaxParameterfvEXT")) == NULL) || r; + r = ((glGetMinmaxParameterivEXT = (PFNGLGETMINMAXPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetMinmaxParameterivEXT")) == NULL) || r; + r = ((glHistogramEXT = (PFNGLHISTOGRAMEXTPROC)glewGetProcAddress((const GLubyte*)"glHistogramEXT")) == NULL) || r; + r = ((glMinmaxEXT = (PFNGLMINMAXEXTPROC)glewGetProcAddress((const GLubyte*)"glMinmaxEXT")) == NULL) || r; + r = ((glResetHistogramEXT = (PFNGLRESETHISTOGRAMEXTPROC)glewGetProcAddress((const GLubyte*)"glResetHistogramEXT")) == NULL) || r; + r = ((glResetMinmaxEXT = (PFNGLRESETMINMAXEXTPROC)glewGetProcAddress((const GLubyte*)"glResetMinmaxEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_histogram */ + +#ifdef GL_EXT_index_array_formats + +#endif /* GL_EXT_index_array_formats */ + +#ifdef GL_EXT_index_func + +static GLboolean _glewInit_GL_EXT_index_func (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glIndexFuncEXT = (PFNGLINDEXFUNCEXTPROC)glewGetProcAddress((const GLubyte*)"glIndexFuncEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_index_func */ + +#ifdef GL_EXT_index_material + +static GLboolean _glewInit_GL_EXT_index_material (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glIndexMaterialEXT = (PFNGLINDEXMATERIALEXTPROC)glewGetProcAddress((const GLubyte*)"glIndexMaterialEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_index_material */ + +#ifdef GL_EXT_index_texture + +#endif /* GL_EXT_index_texture */ + +#ifdef GL_EXT_light_texture + +static GLboolean _glewInit_GL_EXT_light_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glApplyTextureEXT = (PFNGLAPPLYTEXTUREEXTPROC)glewGetProcAddress((const GLubyte*)"glApplyTextureEXT")) == NULL) || r; + r = ((glTextureLightEXT = (PFNGLTEXTURELIGHTEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureLightEXT")) == NULL) || r; + r = ((glTextureMaterialEXT = (PFNGLTEXTUREMATERIALEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureMaterialEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_light_texture */ + +#ifdef GL_EXT_misc_attribute + +#endif /* GL_EXT_misc_attribute */ + +#ifdef GL_EXT_multi_draw_arrays + +static GLboolean _glewInit_GL_EXT_multi_draw_arrays (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glMultiDrawArraysEXT = (PFNGLMULTIDRAWARRAYSEXTPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawArraysEXT")) == NULL) || r; + r = ((glMultiDrawElementsEXT = (PFNGLMULTIDRAWELEMENTSEXTPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElementsEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_multi_draw_arrays */ + +#ifdef GL_EXT_multisample + +static GLboolean _glewInit_GL_EXT_multisample (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glSampleMaskEXT = (PFNGLSAMPLEMASKEXTPROC)glewGetProcAddress((const GLubyte*)"glSampleMaskEXT")) == NULL) || r; + r = ((glSamplePatternEXT = (PFNGLSAMPLEPATTERNEXTPROC)glewGetProcAddress((const GLubyte*)"glSamplePatternEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_multisample */ + +#ifdef GL_EXT_packed_depth_stencil + +#endif /* GL_EXT_packed_depth_stencil */ + +#ifdef GL_EXT_packed_pixels + +#endif /* GL_EXT_packed_pixels */ + +#ifdef GL_EXT_paletted_texture + +static GLboolean _glewInit_GL_EXT_paletted_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColorTableEXT = (PFNGLCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"glColorTableEXT")) == NULL) || r; + r = ((glGetColorTableEXT = (PFNGLGETCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableEXT")) == NULL) || r; + r = ((glGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameterfvEXT")) == NULL) || r; + r = ((glGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameterivEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_paletted_texture */ + +#ifdef GL_EXT_pixel_buffer_object + +#endif /* GL_EXT_pixel_buffer_object */ + +#ifdef GL_EXT_pixel_transform + +static GLboolean _glewInit_GL_EXT_pixel_transform (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetPixelTransformParameterfvEXT = (PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetPixelTransformParameterfvEXT")) == NULL) || r; + r = ((glGetPixelTransformParameterivEXT = (PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetPixelTransformParameterivEXT")) == NULL) || r; + r = ((glPixelTransformParameterfEXT = (PFNGLPIXELTRANSFORMPARAMETERFEXTPROC)glewGetProcAddress((const GLubyte*)"glPixelTransformParameterfEXT")) == NULL) || r; + r = ((glPixelTransformParameterfvEXT = (PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glPixelTransformParameterfvEXT")) == NULL) || r; + r = ((glPixelTransformParameteriEXT = (PFNGLPIXELTRANSFORMPARAMETERIEXTPROC)glewGetProcAddress((const GLubyte*)"glPixelTransformParameteriEXT")) == NULL) || r; + r = ((glPixelTransformParameterivEXT = (PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glPixelTransformParameterivEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_pixel_transform */ + +#ifdef GL_EXT_pixel_transform_color_table + +#endif /* GL_EXT_pixel_transform_color_table */ + +#ifdef GL_EXT_point_parameters + +static GLboolean _glewInit_GL_EXT_point_parameters (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPointParameterfEXT = (PFNGLPOINTPARAMETERFEXTPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfEXT")) == NULL) || r; + r = ((glPointParameterfvEXT = (PFNGLPOINTPARAMETERFVEXTPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfvEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_point_parameters */ + +#ifdef GL_EXT_polygon_offset + +static GLboolean _glewInit_GL_EXT_polygon_offset (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPolygonOffsetEXT = (PFNGLPOLYGONOFFSETEXTPROC)glewGetProcAddress((const GLubyte*)"glPolygonOffsetEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_polygon_offset */ + +#ifdef GL_EXT_rescale_normal + +#endif /* GL_EXT_rescale_normal */ + +#ifdef GL_EXT_scene_marker + +static GLboolean _glewInit_GL_EXT_scene_marker (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBeginSceneEXT = (PFNGLBEGINSCENEEXTPROC)glewGetProcAddress((const GLubyte*)"glBeginSceneEXT")) == NULL) || r; + r = ((glEndSceneEXT = (PFNGLENDSCENEEXTPROC)glewGetProcAddress((const GLubyte*)"glEndSceneEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_scene_marker */ + +#ifdef GL_EXT_secondary_color + +static GLboolean _glewInit_GL_EXT_secondary_color (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glSecondaryColor3bEXT = (PFNGLSECONDARYCOLOR3BEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bEXT")) == NULL) || r; + r = ((glSecondaryColor3bvEXT = (PFNGLSECONDARYCOLOR3BVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bvEXT")) == NULL) || r; + r = ((glSecondaryColor3dEXT = (PFNGLSECONDARYCOLOR3DEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dEXT")) == NULL) || r; + r = ((glSecondaryColor3dvEXT = (PFNGLSECONDARYCOLOR3DVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dvEXT")) == NULL) || r; + r = ((glSecondaryColor3fEXT = (PFNGLSECONDARYCOLOR3FEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fEXT")) == NULL) || r; + r = ((glSecondaryColor3fvEXT = (PFNGLSECONDARYCOLOR3FVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fvEXT")) == NULL) || r; + r = ((glSecondaryColor3iEXT = (PFNGLSECONDARYCOLOR3IEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3iEXT")) == NULL) || r; + r = ((glSecondaryColor3ivEXT = (PFNGLSECONDARYCOLOR3IVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ivEXT")) == NULL) || r; + r = ((glSecondaryColor3sEXT = (PFNGLSECONDARYCOLOR3SEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3sEXT")) == NULL) || r; + r = ((glSecondaryColor3svEXT = (PFNGLSECONDARYCOLOR3SVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3svEXT")) == NULL) || r; + r = ((glSecondaryColor3ubEXT = (PFNGLSECONDARYCOLOR3UBEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubEXT")) == NULL) || r; + r = ((glSecondaryColor3ubvEXT = (PFNGLSECONDARYCOLOR3UBVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubvEXT")) == NULL) || r; + r = ((glSecondaryColor3uiEXT = (PFNGLSECONDARYCOLOR3UIEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uiEXT")) == NULL) || r; + r = ((glSecondaryColor3uivEXT = (PFNGLSECONDARYCOLOR3UIVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uivEXT")) == NULL) || r; + r = ((glSecondaryColor3usEXT = (PFNGLSECONDARYCOLOR3USEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usEXT")) == NULL) || r; + r = ((glSecondaryColor3usvEXT = (PFNGLSECONDARYCOLOR3USVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usvEXT")) == NULL) || r; + r = ((glSecondaryColorPointerEXT = (PFNGLSECONDARYCOLORPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColorPointerEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_secondary_color */ + +#ifdef GL_EXT_separate_specular_color + +#endif /* GL_EXT_separate_specular_color */ + +#ifdef GL_EXT_shadow_funcs + +#endif /* GL_EXT_shadow_funcs */ + +#ifdef GL_EXT_shared_texture_palette + +#endif /* GL_EXT_shared_texture_palette */ + +#ifdef GL_EXT_stencil_clear_tag + +#endif /* GL_EXT_stencil_clear_tag */ + +#ifdef GL_EXT_stencil_two_side + +static GLboolean _glewInit_GL_EXT_stencil_two_side (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glActiveStencilFaceEXT = (PFNGLACTIVESTENCILFACEEXTPROC)glewGetProcAddress((const GLubyte*)"glActiveStencilFaceEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_stencil_two_side */ + +#ifdef GL_EXT_stencil_wrap + +#endif /* GL_EXT_stencil_wrap */ + +#ifdef GL_EXT_subtexture + +static GLboolean _glewInit_GL_EXT_subtexture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTexSubImage1DEXT = (PFNGLTEXSUBIMAGE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage1DEXT")) == NULL) || r; + r = ((glTexSubImage2DEXT = (PFNGLTEXSUBIMAGE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage2DEXT")) == NULL) || r; + r = ((glTexSubImage3DEXT = (PFNGLTEXSUBIMAGE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage3DEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_subtexture */ + +#ifdef GL_EXT_texture + +#endif /* GL_EXT_texture */ + +#ifdef GL_EXT_texture3D + +static GLboolean _glewInit_GL_EXT_texture3D (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTexImage3DEXT = (PFNGLTEXIMAGE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glTexImage3DEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_texture3D */ + +#ifdef GL_EXT_texture_compression_dxt1 + +#endif /* GL_EXT_texture_compression_dxt1 */ + +#ifdef GL_EXT_texture_compression_s3tc + +#endif /* GL_EXT_texture_compression_s3tc */ + +#ifdef GL_EXT_texture_cube_map + +#endif /* GL_EXT_texture_cube_map */ + +#ifdef GL_EXT_texture_edge_clamp + +#endif /* GL_EXT_texture_edge_clamp */ + +#ifdef GL_EXT_texture_env + +#endif /* GL_EXT_texture_env */ + +#ifdef GL_EXT_texture_env_add + +#endif /* GL_EXT_texture_env_add */ + +#ifdef GL_EXT_texture_env_combine + +#endif /* GL_EXT_texture_env_combine */ + +#ifdef GL_EXT_texture_env_dot3 + +#endif /* GL_EXT_texture_env_dot3 */ + +#ifdef GL_EXT_texture_filter_anisotropic + +#endif /* GL_EXT_texture_filter_anisotropic */ + +#ifdef GL_EXT_texture_lod_bias + +#endif /* GL_EXT_texture_lod_bias */ + +#ifdef GL_EXT_texture_mirror_clamp + +#endif /* GL_EXT_texture_mirror_clamp */ + +#ifdef GL_EXT_texture_object + +static GLboolean _glewInit_GL_EXT_texture_object (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAreTexturesResidentEXT = (PFNGLARETEXTURESRESIDENTEXTPROC)glewGetProcAddress((const GLubyte*)"glAreTexturesResidentEXT")) == NULL) || r; + r = ((glBindTextureEXT = (PFNGLBINDTEXTUREEXTPROC)glewGetProcAddress((const GLubyte*)"glBindTextureEXT")) == NULL) || r; + r = ((glDeleteTexturesEXT = (PFNGLDELETETEXTURESEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteTexturesEXT")) == NULL) || r; + r = ((glGenTexturesEXT = (PFNGLGENTEXTURESEXTPROC)glewGetProcAddress((const GLubyte*)"glGenTexturesEXT")) == NULL) || r; + r = ((glIsTextureEXT = (PFNGLISTEXTUREEXTPROC)glewGetProcAddress((const GLubyte*)"glIsTextureEXT")) == NULL) || r; + r = ((glPrioritizeTexturesEXT = (PFNGLPRIORITIZETEXTURESEXTPROC)glewGetProcAddress((const GLubyte*)"glPrioritizeTexturesEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_texture_object */ + +#ifdef GL_EXT_texture_perturb_normal + +static GLboolean _glewInit_GL_EXT_texture_perturb_normal (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTextureNormalEXT = (PFNGLTEXTURENORMALEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureNormalEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_texture_perturb_normal */ + +#ifdef GL_EXT_texture_rectangle + +#endif /* GL_EXT_texture_rectangle */ + +#ifdef GL_EXT_texture_sRGB + +#endif /* GL_EXT_texture_sRGB */ + +#ifdef GL_EXT_vertex_array + +static GLboolean _glewInit_GL_EXT_vertex_array (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glArrayElementEXT = (PFNGLARRAYELEMENTEXTPROC)glewGetProcAddress((const GLubyte*)"glArrayElementEXT")) == NULL) || r; + r = ((glColorPointerEXT = (PFNGLCOLORPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glColorPointerEXT")) == NULL) || r; + r = ((glDrawArraysEXT = (PFNGLDRAWARRAYSEXTPROC)glewGetProcAddress((const GLubyte*)"glDrawArraysEXT")) == NULL) || r; + r = ((glEdgeFlagPointerEXT = (PFNGLEDGEFLAGPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glEdgeFlagPointerEXT")) == NULL) || r; + r = ((glGetPointervEXT = (PFNGLGETPOINTERVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetPointervEXT")) == NULL) || r; + r = ((glIndexPointerEXT = (PFNGLINDEXPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glIndexPointerEXT")) == NULL) || r; + r = ((glNormalPointerEXT = (PFNGLNORMALPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glNormalPointerEXT")) == NULL) || r; + r = ((glTexCoordPointerEXT = (PFNGLTEXCOORDPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glTexCoordPointerEXT")) == NULL) || r; + r = ((glVertexPointerEXT = (PFNGLVERTEXPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glVertexPointerEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_vertex_array */ + +#ifdef GL_EXT_vertex_shader + +static GLboolean _glewInit_GL_EXT_vertex_shader (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBeginVertexShaderEXT = (PFNGLBEGINVERTEXSHADEREXTPROC)glewGetProcAddress((const GLubyte*)"glBeginVertexShaderEXT")) == NULL) || r; + r = ((glBindLightParameterEXT = (PFNGLBINDLIGHTPARAMETEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindLightParameterEXT")) == NULL) || r; + r = ((glBindMaterialParameterEXT = (PFNGLBINDMATERIALPARAMETEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindMaterialParameterEXT")) == NULL) || r; + r = ((glBindParameterEXT = (PFNGLBINDPARAMETEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindParameterEXT")) == NULL) || r; + r = ((glBindTexGenParameterEXT = (PFNGLBINDTEXGENPARAMETEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindTexGenParameterEXT")) == NULL) || r; + r = ((glBindTextureUnitParameterEXT = (PFNGLBINDTEXTUREUNITPARAMETEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindTextureUnitParameterEXT")) == NULL) || r; + r = ((glBindVertexShaderEXT = (PFNGLBINDVERTEXSHADEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindVertexShaderEXT")) == NULL) || r; + r = ((glDeleteVertexShaderEXT = (PFNGLDELETEVERTEXSHADEREXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteVertexShaderEXT")) == NULL) || r; + r = ((glDisableVariantClientStateEXT = (PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC)glewGetProcAddress((const GLubyte*)"glDisableVariantClientStateEXT")) == NULL) || r; + r = ((glEnableVariantClientStateEXT = (PFNGLENABLEVARIANTCLIENTSTATEEXTPROC)glewGetProcAddress((const GLubyte*)"glEnableVariantClientStateEXT")) == NULL) || r; + r = ((glEndVertexShaderEXT = (PFNGLENDVERTEXSHADEREXTPROC)glewGetProcAddress((const GLubyte*)"glEndVertexShaderEXT")) == NULL) || r; + r = ((glExtractComponentEXT = (PFNGLEXTRACTCOMPONENTEXTPROC)glewGetProcAddress((const GLubyte*)"glExtractComponentEXT")) == NULL) || r; + r = ((glGenSymbolsEXT = (PFNGLGENSYMBOLSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenSymbolsEXT")) == NULL) || r; + r = ((glGenVertexShadersEXT = (PFNGLGENVERTEXSHADERSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenVertexShadersEXT")) == NULL) || r; + r = ((glGetInvariantBooleanvEXT = (PFNGLGETINVARIANTBOOLEANVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetInvariantBooleanvEXT")) == NULL) || r; + r = ((glGetInvariantFloatvEXT = (PFNGLGETINVARIANTFLOATVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetInvariantFloatvEXT")) == NULL) || r; + r = ((glGetInvariantIntegervEXT = (PFNGLGETINVARIANTINTEGERVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetInvariantIntegervEXT")) == NULL) || r; + r = ((glGetLocalConstantBooleanvEXT = (PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetLocalConstantBooleanvEXT")) == NULL) || r; + r = ((glGetLocalConstantFloatvEXT = (PFNGLGETLOCALCONSTANTFLOATVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetLocalConstantFloatvEXT")) == NULL) || r; + r = ((glGetLocalConstantIntegervEXT = (PFNGLGETLOCALCONSTANTINTEGERVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetLocalConstantIntegervEXT")) == NULL) || r; + r = ((glGetVariantBooleanvEXT = (PFNGLGETVARIANTBOOLEANVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetVariantBooleanvEXT")) == NULL) || r; + r = ((glGetVariantFloatvEXT = (PFNGLGETVARIANTFLOATVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetVariantFloatvEXT")) == NULL) || r; + r = ((glGetVariantIntegervEXT = (PFNGLGETVARIANTINTEGERVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetVariantIntegervEXT")) == NULL) || r; + r = ((glGetVariantPointervEXT = (PFNGLGETVARIANTPOINTERVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetVariantPointervEXT")) == NULL) || r; + r = ((glInsertComponentEXT = (PFNGLINSERTCOMPONENTEXTPROC)glewGetProcAddress((const GLubyte*)"glInsertComponentEXT")) == NULL) || r; + r = ((glIsVariantEnabledEXT = (PFNGLISVARIANTENABLEDEXTPROC)glewGetProcAddress((const GLubyte*)"glIsVariantEnabledEXT")) == NULL) || r; + r = ((glSetInvariantEXT = (PFNGLSETINVARIANTEXTPROC)glewGetProcAddress((const GLubyte*)"glSetInvariantEXT")) == NULL) || r; + r = ((glSetLocalConstantEXT = (PFNGLSETLOCALCONSTANTEXTPROC)glewGetProcAddress((const GLubyte*)"glSetLocalConstantEXT")) == NULL) || r; + r = ((glShaderOp1EXT = (PFNGLSHADEROP1EXTPROC)glewGetProcAddress((const GLubyte*)"glShaderOp1EXT")) == NULL) || r; + r = ((glShaderOp2EXT = (PFNGLSHADEROP2EXTPROC)glewGetProcAddress((const GLubyte*)"glShaderOp2EXT")) == NULL) || r; + r = ((glShaderOp3EXT = (PFNGLSHADEROP3EXTPROC)glewGetProcAddress((const GLubyte*)"glShaderOp3EXT")) == NULL) || r; + r = ((glSwizzleEXT = (PFNGLSWIZZLEEXTPROC)glewGetProcAddress((const GLubyte*)"glSwizzleEXT")) == NULL) || r; + r = ((glVariantPointerEXT = (PFNGLVARIANTPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glVariantPointerEXT")) == NULL) || r; + r = ((glVariantbvEXT = (PFNGLVARIANTBVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantbvEXT")) == NULL) || r; + r = ((glVariantdvEXT = (PFNGLVARIANTDVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantdvEXT")) == NULL) || r; + r = ((glVariantfvEXT = (PFNGLVARIANTFVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantfvEXT")) == NULL) || r; + r = ((glVariantivEXT = (PFNGLVARIANTIVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantivEXT")) == NULL) || r; + r = ((glVariantsvEXT = (PFNGLVARIANTSVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantsvEXT")) == NULL) || r; + r = ((glVariantubvEXT = (PFNGLVARIANTUBVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantubvEXT")) == NULL) || r; + r = ((glVariantuivEXT = (PFNGLVARIANTUIVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantuivEXT")) == NULL) || r; + r = ((glVariantusvEXT = (PFNGLVARIANTUSVEXTPROC)glewGetProcAddress((const GLubyte*)"glVariantusvEXT")) == NULL) || r; + r = ((glWriteMaskEXT = (PFNGLWRITEMASKEXTPROC)glewGetProcAddress((const GLubyte*)"glWriteMaskEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_vertex_shader */ + +#ifdef GL_EXT_vertex_weighting + +static GLboolean _glewInit_GL_EXT_vertex_weighting (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glVertexWeightPointerEXT = (PFNGLVERTEXWEIGHTPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glVertexWeightPointerEXT")) == NULL) || r; + r = ((glVertexWeightfEXT = (PFNGLVERTEXWEIGHTFEXTPROC)glewGetProcAddress((const GLubyte*)"glVertexWeightfEXT")) == NULL) || r; + r = ((glVertexWeightfvEXT = (PFNGLVERTEXWEIGHTFVEXTPROC)glewGetProcAddress((const GLubyte*)"glVertexWeightfvEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_EXT_vertex_weighting */ + +#ifdef GL_GREMEDY_string_marker + +static GLboolean _glewInit_GL_GREMEDY_string_marker (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glStringMarkerGREMEDY = (PFNGLSTRINGMARKERGREMEDYPROC)glewGetProcAddress((const GLubyte*)"glStringMarkerGREMEDY")) == NULL) || r; + + return r; +} + +#endif /* GL_GREMEDY_string_marker */ + +#ifdef GL_HP_convolution_border_modes + +#endif /* GL_HP_convolution_border_modes */ + +#ifdef GL_HP_image_transform + +static GLboolean _glewInit_GL_HP_image_transform (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetImageTransformParameterfvHP = (PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC)glewGetProcAddress((const GLubyte*)"glGetImageTransformParameterfvHP")) == NULL) || r; + r = ((glGetImageTransformParameterivHP = (PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC)glewGetProcAddress((const GLubyte*)"glGetImageTransformParameterivHP")) == NULL) || r; + r = ((glImageTransformParameterfHP = (PFNGLIMAGETRANSFORMPARAMETERFHPPROC)glewGetProcAddress((const GLubyte*)"glImageTransformParameterfHP")) == NULL) || r; + r = ((glImageTransformParameterfvHP = (PFNGLIMAGETRANSFORMPARAMETERFVHPPROC)glewGetProcAddress((const GLubyte*)"glImageTransformParameterfvHP")) == NULL) || r; + r = ((glImageTransformParameteriHP = (PFNGLIMAGETRANSFORMPARAMETERIHPPROC)glewGetProcAddress((const GLubyte*)"glImageTransformParameteriHP")) == NULL) || r; + r = ((glImageTransformParameterivHP = (PFNGLIMAGETRANSFORMPARAMETERIVHPPROC)glewGetProcAddress((const GLubyte*)"glImageTransformParameterivHP")) == NULL) || r; + + return r; +} + +#endif /* GL_HP_image_transform */ + +#ifdef GL_HP_occlusion_test + +#endif /* GL_HP_occlusion_test */ + +#ifdef GL_HP_texture_lighting + +#endif /* GL_HP_texture_lighting */ + +#ifdef GL_IBM_cull_vertex + +#endif /* GL_IBM_cull_vertex */ + +#ifdef GL_IBM_multimode_draw_arrays + +static GLboolean _glewInit_GL_IBM_multimode_draw_arrays (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glMultiModeDrawArraysIBM = (PFNGLMULTIMODEDRAWARRAYSIBMPROC)glewGetProcAddress((const GLubyte*)"glMultiModeDrawArraysIBM")) == NULL) || r; + r = ((glMultiModeDrawElementsIBM = (PFNGLMULTIMODEDRAWELEMENTSIBMPROC)glewGetProcAddress((const GLubyte*)"glMultiModeDrawElementsIBM")) == NULL) || r; + + return r; +} + +#endif /* GL_IBM_multimode_draw_arrays */ + +#ifdef GL_IBM_rasterpos_clip + +#endif /* GL_IBM_rasterpos_clip */ + +#ifdef GL_IBM_static_data + +#endif /* GL_IBM_static_data */ + +#ifdef GL_IBM_texture_mirrored_repeat + +#endif /* GL_IBM_texture_mirrored_repeat */ + +#ifdef GL_IBM_vertex_array_lists + +static GLboolean _glewInit_GL_IBM_vertex_array_lists (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColorPointerListIBM = (PFNGLCOLORPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glColorPointerListIBM")) == NULL) || r; + r = ((glEdgeFlagPointerListIBM = (PFNGLEDGEFLAGPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glEdgeFlagPointerListIBM")) == NULL) || r; + r = ((glFogCoordPointerListIBM = (PFNGLFOGCOORDPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glFogCoordPointerListIBM")) == NULL) || r; + r = ((glIndexPointerListIBM = (PFNGLINDEXPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glIndexPointerListIBM")) == NULL) || r; + r = ((glNormalPointerListIBM = (PFNGLNORMALPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glNormalPointerListIBM")) == NULL) || r; + r = ((glSecondaryColorPointerListIBM = (PFNGLSECONDARYCOLORPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColorPointerListIBM")) == NULL) || r; + r = ((glTexCoordPointerListIBM = (PFNGLTEXCOORDPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glTexCoordPointerListIBM")) == NULL) || r; + r = ((glVertexPointerListIBM = (PFNGLVERTEXPOINTERLISTIBMPROC)glewGetProcAddress((const GLubyte*)"glVertexPointerListIBM")) == NULL) || r; + + return r; +} + +#endif /* GL_IBM_vertex_array_lists */ + +#ifdef GL_INGR_color_clamp + +#endif /* GL_INGR_color_clamp */ + +#ifdef GL_INGR_interlace_read + +#endif /* GL_INGR_interlace_read */ + +#ifdef GL_INTEL_parallel_arrays + +static GLboolean _glewInit_GL_INTEL_parallel_arrays (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColorPointervINTEL = (PFNGLCOLORPOINTERVINTELPROC)glewGetProcAddress((const GLubyte*)"glColorPointervINTEL")) == NULL) || r; + r = ((glNormalPointervINTEL = (PFNGLNORMALPOINTERVINTELPROC)glewGetProcAddress((const GLubyte*)"glNormalPointervINTEL")) == NULL) || r; + r = ((glTexCoordPointervINTEL = (PFNGLTEXCOORDPOINTERVINTELPROC)glewGetProcAddress((const GLubyte*)"glTexCoordPointervINTEL")) == NULL) || r; + r = ((glVertexPointervINTEL = (PFNGLVERTEXPOINTERVINTELPROC)glewGetProcAddress((const GLubyte*)"glVertexPointervINTEL")) == NULL) || r; + + return r; +} + +#endif /* GL_INTEL_parallel_arrays */ + +#ifdef GL_INTEL_texture_scissor + +static GLboolean _glewInit_GL_INTEL_texture_scissor (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTexScissorFuncINTEL = (PFNGLTEXSCISSORFUNCINTELPROC)glewGetProcAddress((const GLubyte*)"glTexScissorFuncINTEL")) == NULL) || r; + r = ((glTexScissorINTEL = (PFNGLTEXSCISSORINTELPROC)glewGetProcAddress((const GLubyte*)"glTexScissorINTEL")) == NULL) || r; + + return r; +} + +#endif /* GL_INTEL_texture_scissor */ + +#ifdef GL_KTX_buffer_region + +static GLboolean _glewInit_GL_KTX_buffer_region (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBufferRegionEnabledEXT = (PFNGLBUFFERREGIONENABLEDEXTPROC)glewGetProcAddress((const GLubyte*)"glBufferRegionEnabledEXT")) == NULL) || r; + r = ((glDeleteBufferRegionEXT = (PFNGLDELETEBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteBufferRegionEXT")) == NULL) || r; + r = ((glDrawBufferRegionEXT = (PFNGLDRAWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDrawBufferRegionEXT")) == NULL) || r; + r = ((glNewBufferRegionEXT = (PFNGLNEWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glNewBufferRegionEXT")) == NULL) || r; + r = ((glReadBufferRegionEXT = (PFNGLREADBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glReadBufferRegionEXT")) == NULL) || r; + + return r; +} + +#endif /* GL_KTX_buffer_region */ + +#ifdef GL_MESAX_texture_stack + +#endif /* GL_MESAX_texture_stack */ + +#ifdef GL_MESA_pack_invert + +#endif /* GL_MESA_pack_invert */ + +#ifdef GL_MESA_resize_buffers + +static GLboolean _glewInit_GL_MESA_resize_buffers (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glResizeBuffersMESA = (PFNGLRESIZEBUFFERSMESAPROC)glewGetProcAddress((const GLubyte*)"glResizeBuffersMESA")) == NULL) || r; + + return r; +} + +#endif /* GL_MESA_resize_buffers */ + +#ifdef GL_MESA_window_pos + +static GLboolean _glewInit_GL_MESA_window_pos (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glWindowPos2dMESA = (PFNGLWINDOWPOS2DMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dMESA")) == NULL) || r; + r = ((glWindowPos2dvMESA = (PFNGLWINDOWPOS2DVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dvMESA")) == NULL) || r; + r = ((glWindowPos2fMESA = (PFNGLWINDOWPOS2FMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fMESA")) == NULL) || r; + r = ((glWindowPos2fvMESA = (PFNGLWINDOWPOS2FVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fvMESA")) == NULL) || r; + r = ((glWindowPos2iMESA = (PFNGLWINDOWPOS2IMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2iMESA")) == NULL) || r; + r = ((glWindowPos2ivMESA = (PFNGLWINDOWPOS2IVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2ivMESA")) == NULL) || r; + r = ((glWindowPos2sMESA = (PFNGLWINDOWPOS2SMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2sMESA")) == NULL) || r; + r = ((glWindowPos2svMESA = (PFNGLWINDOWPOS2SVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2svMESA")) == NULL) || r; + r = ((glWindowPos3dMESA = (PFNGLWINDOWPOS3DMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dMESA")) == NULL) || r; + r = ((glWindowPos3dvMESA = (PFNGLWINDOWPOS3DVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dvMESA")) == NULL) || r; + r = ((glWindowPos3fMESA = (PFNGLWINDOWPOS3FMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fMESA")) == NULL) || r; + r = ((glWindowPos3fvMESA = (PFNGLWINDOWPOS3FVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fvMESA")) == NULL) || r; + r = ((glWindowPos3iMESA = (PFNGLWINDOWPOS3IMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3iMESA")) == NULL) || r; + r = ((glWindowPos3ivMESA = (PFNGLWINDOWPOS3IVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3ivMESA")) == NULL) || r; + r = ((glWindowPos3sMESA = (PFNGLWINDOWPOS3SMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3sMESA")) == NULL) || r; + r = ((glWindowPos3svMESA = (PFNGLWINDOWPOS3SVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3svMESA")) == NULL) || r; + r = ((glWindowPos4dMESA = (PFNGLWINDOWPOS4DMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4dMESA")) == NULL) || r; + r = ((glWindowPos4dvMESA = (PFNGLWINDOWPOS4DVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4dvMESA")) == NULL) || r; + r = ((glWindowPos4fMESA = (PFNGLWINDOWPOS4FMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4fMESA")) == NULL) || r; + r = ((glWindowPos4fvMESA = (PFNGLWINDOWPOS4FVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4fvMESA")) == NULL) || r; + r = ((glWindowPos4iMESA = (PFNGLWINDOWPOS4IMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4iMESA")) == NULL) || r; + r = ((glWindowPos4ivMESA = (PFNGLWINDOWPOS4IVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4ivMESA")) == NULL) || r; + r = ((glWindowPos4sMESA = (PFNGLWINDOWPOS4SMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4sMESA")) == NULL) || r; + r = ((glWindowPos4svMESA = (PFNGLWINDOWPOS4SVMESAPROC)glewGetProcAddress((const GLubyte*)"glWindowPos4svMESA")) == NULL) || r; + + return r; +} + +#endif /* GL_MESA_window_pos */ + +#ifdef GL_MESA_ycbcr_texture + +#endif /* GL_MESA_ycbcr_texture */ + +#ifdef GL_NV_blend_square + +#endif /* GL_NV_blend_square */ + +#ifdef GL_NV_copy_depth_to_color + +#endif /* GL_NV_copy_depth_to_color */ + +#ifdef GL_NV_depth_clamp + +#endif /* GL_NV_depth_clamp */ + +#ifdef GL_NV_evaluators + +static GLboolean _glewInit_GL_NV_evaluators (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glEvalMapsNV = (PFNGLEVALMAPSNVPROC)glewGetProcAddress((const GLubyte*)"glEvalMapsNV")) == NULL) || r; + r = ((glGetMapAttribParameterfvNV = (PFNGLGETMAPATTRIBPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapAttribParameterfvNV")) == NULL) || r; + r = ((glGetMapAttribParameterivNV = (PFNGLGETMAPATTRIBPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapAttribParameterivNV")) == NULL) || r; + r = ((glGetMapControlPointsNV = (PFNGLGETMAPCONTROLPOINTSNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapControlPointsNV")) == NULL) || r; + r = ((glGetMapParameterfvNV = (PFNGLGETMAPPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapParameterfvNV")) == NULL) || r; + r = ((glGetMapParameterivNV = (PFNGLGETMAPPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetMapParameterivNV")) == NULL) || r; + r = ((glMapControlPointsNV = (PFNGLMAPCONTROLPOINTSNVPROC)glewGetProcAddress((const GLubyte*)"glMapControlPointsNV")) == NULL) || r; + r = ((glMapParameterfvNV = (PFNGLMAPPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glMapParameterfvNV")) == NULL) || r; + r = ((glMapParameterivNV = (PFNGLMAPPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glMapParameterivNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_evaluators */ + +#ifdef GL_NV_fence + +static GLboolean _glewInit_GL_NV_fence (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDeleteFencesNV = (PFNGLDELETEFENCESNVPROC)glewGetProcAddress((const GLubyte*)"glDeleteFencesNV")) == NULL) || r; + r = ((glFinishFenceNV = (PFNGLFINISHFENCENVPROC)glewGetProcAddress((const GLubyte*)"glFinishFenceNV")) == NULL) || r; + r = ((glGenFencesNV = (PFNGLGENFENCESNVPROC)glewGetProcAddress((const GLubyte*)"glGenFencesNV")) == NULL) || r; + r = ((glGetFenceivNV = (PFNGLGETFENCEIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetFenceivNV")) == NULL) || r; + r = ((glIsFenceNV = (PFNGLISFENCENVPROC)glewGetProcAddress((const GLubyte*)"glIsFenceNV")) == NULL) || r; + r = ((glSetFenceNV = (PFNGLSETFENCENVPROC)glewGetProcAddress((const GLubyte*)"glSetFenceNV")) == NULL) || r; + r = ((glTestFenceNV = (PFNGLTESTFENCENVPROC)glewGetProcAddress((const GLubyte*)"glTestFenceNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_fence */ + +#ifdef GL_NV_float_buffer + +#endif /* GL_NV_float_buffer */ + +#ifdef GL_NV_fog_distance + +#endif /* GL_NV_fog_distance */ + +#ifdef GL_NV_fragment_program + +static GLboolean _glewInit_GL_NV_fragment_program (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetProgramNamedParameterdvNV = (PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramNamedParameterdvNV")) == NULL) || r; + r = ((glGetProgramNamedParameterfvNV = (PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramNamedParameterfvNV")) == NULL) || r; + r = ((glProgramNamedParameter4dNV = (PFNGLPROGRAMNAMEDPARAMETER4DNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4dNV")) == NULL) || r; + r = ((glProgramNamedParameter4dvNV = (PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4dvNV")) == NULL) || r; + r = ((glProgramNamedParameter4fNV = (PFNGLPROGRAMNAMEDPARAMETER4FNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4fNV")) == NULL) || r; + r = ((glProgramNamedParameter4fvNV = (PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4fvNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_fragment_program */ + +#ifdef GL_NV_fragment_program2 + +#endif /* GL_NV_fragment_program2 */ + +#ifdef GL_NV_fragment_program_option + +#endif /* GL_NV_fragment_program_option */ + +#ifdef GL_NV_half_float + +static GLboolean _glewInit_GL_NV_half_float (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColor3hNV = (PFNGLCOLOR3HNVPROC)glewGetProcAddress((const GLubyte*)"glColor3hNV")) == NULL) || r; + r = ((glColor3hvNV = (PFNGLCOLOR3HVNVPROC)glewGetProcAddress((const GLubyte*)"glColor3hvNV")) == NULL) || r; + r = ((glColor4hNV = (PFNGLCOLOR4HNVPROC)glewGetProcAddress((const GLubyte*)"glColor4hNV")) == NULL) || r; + r = ((glColor4hvNV = (PFNGLCOLOR4HVNVPROC)glewGetProcAddress((const GLubyte*)"glColor4hvNV")) == NULL) || r; + r = ((glFogCoordhNV = (PFNGLFOGCOORDHNVPROC)glewGetProcAddress((const GLubyte*)"glFogCoordhNV")) == NULL) || r; + r = ((glFogCoordhvNV = (PFNGLFOGCOORDHVNVPROC)glewGetProcAddress((const GLubyte*)"glFogCoordhvNV")) == NULL) || r; + r = ((glMultiTexCoord1hNV = (PFNGLMULTITEXCOORD1HNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1hNV")) == NULL) || r; + r = ((glMultiTexCoord1hvNV = (PFNGLMULTITEXCOORD1HVNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1hvNV")) == NULL) || r; + r = ((glMultiTexCoord2hNV = (PFNGLMULTITEXCOORD2HNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2hNV")) == NULL) || r; + r = ((glMultiTexCoord2hvNV = (PFNGLMULTITEXCOORD2HVNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2hvNV")) == NULL) || r; + r = ((glMultiTexCoord3hNV = (PFNGLMULTITEXCOORD3HNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3hNV")) == NULL) || r; + r = ((glMultiTexCoord3hvNV = (PFNGLMULTITEXCOORD3HVNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3hvNV")) == NULL) || r; + r = ((glMultiTexCoord4hNV = (PFNGLMULTITEXCOORD4HNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4hNV")) == NULL) || r; + r = ((glMultiTexCoord4hvNV = (PFNGLMULTITEXCOORD4HVNVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4hvNV")) == NULL) || r; + r = ((glNormal3hNV = (PFNGLNORMAL3HNVPROC)glewGetProcAddress((const GLubyte*)"glNormal3hNV")) == NULL) || r; + r = ((glNormal3hvNV = (PFNGLNORMAL3HVNVPROC)glewGetProcAddress((const GLubyte*)"glNormal3hvNV")) == NULL) || r; + r = ((glSecondaryColor3hNV = (PFNGLSECONDARYCOLOR3HNVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3hNV")) == NULL) || r; + r = ((glSecondaryColor3hvNV = (PFNGLSECONDARYCOLOR3HVNVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3hvNV")) == NULL) || r; + r = ((glTexCoord1hNV = (PFNGLTEXCOORD1HNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord1hNV")) == NULL) || r; + r = ((glTexCoord1hvNV = (PFNGLTEXCOORD1HVNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord1hvNV")) == NULL) || r; + r = ((glTexCoord2hNV = (PFNGLTEXCOORD2HNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2hNV")) == NULL) || r; + r = ((glTexCoord2hvNV = (PFNGLTEXCOORD2HVNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2hvNV")) == NULL) || r; + r = ((glTexCoord3hNV = (PFNGLTEXCOORD3HNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord3hNV")) == NULL) || r; + r = ((glTexCoord3hvNV = (PFNGLTEXCOORD3HVNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord3hvNV")) == NULL) || r; + r = ((glTexCoord4hNV = (PFNGLTEXCOORD4HNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4hNV")) == NULL) || r; + r = ((glTexCoord4hvNV = (PFNGLTEXCOORD4HVNVPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4hvNV")) == NULL) || r; + r = ((glVertex2hNV = (PFNGLVERTEX2HNVPROC)glewGetProcAddress((const GLubyte*)"glVertex2hNV")) == NULL) || r; + r = ((glVertex2hvNV = (PFNGLVERTEX2HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertex2hvNV")) == NULL) || r; + r = ((glVertex3hNV = (PFNGLVERTEX3HNVPROC)glewGetProcAddress((const GLubyte*)"glVertex3hNV")) == NULL) || r; + r = ((glVertex3hvNV = (PFNGLVERTEX3HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertex3hvNV")) == NULL) || r; + r = ((glVertex4hNV = (PFNGLVERTEX4HNVPROC)glewGetProcAddress((const GLubyte*)"glVertex4hNV")) == NULL) || r; + r = ((glVertex4hvNV = (PFNGLVERTEX4HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertex4hvNV")) == NULL) || r; + r = ((glVertexAttrib1hNV = (PFNGLVERTEXATTRIB1HNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1hNV")) == NULL) || r; + r = ((glVertexAttrib1hvNV = (PFNGLVERTEXATTRIB1HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1hvNV")) == NULL) || r; + r = ((glVertexAttrib2hNV = (PFNGLVERTEXATTRIB2HNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2hNV")) == NULL) || r; + r = ((glVertexAttrib2hvNV = (PFNGLVERTEXATTRIB2HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2hvNV")) == NULL) || r; + r = ((glVertexAttrib3hNV = (PFNGLVERTEXATTRIB3HNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3hNV")) == NULL) || r; + r = ((glVertexAttrib3hvNV = (PFNGLVERTEXATTRIB3HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3hvNV")) == NULL) || r; + r = ((glVertexAttrib4hNV = (PFNGLVERTEXATTRIB4HNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4hNV")) == NULL) || r; + r = ((glVertexAttrib4hvNV = (PFNGLVERTEXATTRIB4HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4hvNV")) == NULL) || r; + r = ((glVertexAttribs1hvNV = (PFNGLVERTEXATTRIBS1HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1hvNV")) == NULL) || r; + r = ((glVertexAttribs2hvNV = (PFNGLVERTEXATTRIBS2HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2hvNV")) == NULL) || r; + r = ((glVertexAttribs3hvNV = (PFNGLVERTEXATTRIBS3HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3hvNV")) == NULL) || r; + r = ((glVertexAttribs4hvNV = (PFNGLVERTEXATTRIBS4HVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4hvNV")) == NULL) || r; + r = ((glVertexWeighthNV = (PFNGLVERTEXWEIGHTHNVPROC)glewGetProcAddress((const GLubyte*)"glVertexWeighthNV")) == NULL) || r; + r = ((glVertexWeighthvNV = (PFNGLVERTEXWEIGHTHVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexWeighthvNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_half_float */ + +#ifdef GL_NV_light_max_exponent + +#endif /* GL_NV_light_max_exponent */ + +#ifdef GL_NV_multisample_filter_hint + +#endif /* GL_NV_multisample_filter_hint */ + +#ifdef GL_NV_occlusion_query + +static GLboolean _glewInit_GL_NV_occlusion_query (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glBeginOcclusionQueryNV = (PFNGLBEGINOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glBeginOcclusionQueryNV")) == NULL) || r; + r = ((glDeleteOcclusionQueriesNV = (PFNGLDELETEOCCLUSIONQUERIESNVPROC)glewGetProcAddress((const GLubyte*)"glDeleteOcclusionQueriesNV")) == NULL) || r; + r = ((glEndOcclusionQueryNV = (PFNGLENDOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glEndOcclusionQueryNV")) == NULL) || r; + r = ((glGenOcclusionQueriesNV = (PFNGLGENOCCLUSIONQUERIESNVPROC)glewGetProcAddress((const GLubyte*)"glGenOcclusionQueriesNV")) == NULL) || r; + r = ((glGetOcclusionQueryivNV = (PFNGLGETOCCLUSIONQUERYIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetOcclusionQueryivNV")) == NULL) || r; + r = ((glGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetOcclusionQueryuivNV")) == NULL) || r; + r = ((glIsOcclusionQueryNV = (PFNGLISOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glIsOcclusionQueryNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_occlusion_query */ + +#ifdef GL_NV_packed_depth_stencil + +#endif /* GL_NV_packed_depth_stencil */ + +#ifdef GL_NV_pixel_data_range + +static GLboolean _glewInit_GL_NV_pixel_data_range (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFlushPixelDataRangeNV = (PFNGLFLUSHPIXELDATARANGENVPROC)glewGetProcAddress((const GLubyte*)"glFlushPixelDataRangeNV")) == NULL) || r; + r = ((glPixelDataRangeNV = (PFNGLPIXELDATARANGENVPROC)glewGetProcAddress((const GLubyte*)"glPixelDataRangeNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_pixel_data_range */ + +#ifdef GL_NV_point_sprite + +static GLboolean _glewInit_GL_NV_point_sprite (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPointParameteriNV = (PFNGLPOINTPARAMETERINVPROC)glewGetProcAddress((const GLubyte*)"glPointParameteriNV")) == NULL) || r; + r = ((glPointParameterivNV = (PFNGLPOINTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glPointParameterivNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_point_sprite */ + +#ifdef GL_NV_primitive_restart + +static GLboolean _glewInit_GL_NV_primitive_restart (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPrimitiveRestartIndexNV = (PFNGLPRIMITIVERESTARTINDEXNVPROC)glewGetProcAddress((const GLubyte*)"glPrimitiveRestartIndexNV")) == NULL) || r; + r = ((glPrimitiveRestartNV = (PFNGLPRIMITIVERESTARTNVPROC)glewGetProcAddress((const GLubyte*)"glPrimitiveRestartNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_primitive_restart */ + +#ifdef GL_NV_register_combiners + +static GLboolean _glewInit_GL_NV_register_combiners (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCombinerInputNV = (PFNGLCOMBINERINPUTNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerInputNV")) == NULL) || r; + r = ((glCombinerOutputNV = (PFNGLCOMBINEROUTPUTNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerOutputNV")) == NULL) || r; + r = ((glCombinerParameterfNV = (PFNGLCOMBINERPARAMETERFNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterfNV")) == NULL) || r; + r = ((glCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterfvNV")) == NULL) || r; + r = ((glCombinerParameteriNV = (PFNGLCOMBINERPARAMETERINVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameteriNV")) == NULL) || r; + r = ((glCombinerParameterivNV = (PFNGLCOMBINERPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterivNV")) == NULL) || r; + r = ((glFinalCombinerInputNV = (PFNGLFINALCOMBINERINPUTNVPROC)glewGetProcAddress((const GLubyte*)"glFinalCombinerInputNV")) == NULL) || r; + r = ((glGetCombinerInputParameterfvNV = (PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerInputParameterfvNV")) == NULL) || r; + r = ((glGetCombinerInputParameterivNV = (PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerInputParameterivNV")) == NULL) || r; + r = ((glGetCombinerOutputParameterfvNV = (PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerOutputParameterfvNV")) == NULL) || r; + r = ((glGetCombinerOutputParameterivNV = (PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerOutputParameterivNV")) == NULL) || r; + r = ((glGetFinalCombinerInputParameterfvNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetFinalCombinerInputParameterfvNV")) == NULL) || r; + r = ((glGetFinalCombinerInputParameterivNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetFinalCombinerInputParameterivNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_register_combiners */ + +#ifdef GL_NV_register_combiners2 + +static GLboolean _glewInit_GL_NV_register_combiners2 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glCombinerStageParameterfvNV = (PFNGLCOMBINERSTAGEPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerStageParameterfvNV")) == NULL) || r; + r = ((glGetCombinerStageParameterfvNV = (PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerStageParameterfvNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_register_combiners2 */ + +#ifdef GL_NV_texgen_emboss + +#endif /* GL_NV_texgen_emboss */ + +#ifdef GL_NV_texgen_reflection + +#endif /* GL_NV_texgen_reflection */ + +#ifdef GL_NV_texture_compression_vtc + +#endif /* GL_NV_texture_compression_vtc */ + +#ifdef GL_NV_texture_env_combine4 + +#endif /* GL_NV_texture_env_combine4 */ + +#ifdef GL_NV_texture_expand_normal + +#endif /* GL_NV_texture_expand_normal */ + +#ifdef GL_NV_texture_rectangle + +#endif /* GL_NV_texture_rectangle */ + +#ifdef GL_NV_texture_shader + +#endif /* GL_NV_texture_shader */ + +#ifdef GL_NV_texture_shader2 + +#endif /* GL_NV_texture_shader2 */ + +#ifdef GL_NV_texture_shader3 + +#endif /* GL_NV_texture_shader3 */ + +#ifdef GL_NV_vertex_array_range + +static GLboolean _glewInit_GL_NV_vertex_array_range (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFlushVertexArrayRangeNV = (PFNGLFLUSHVERTEXARRAYRANGENVPROC)glewGetProcAddress((const GLubyte*)"glFlushVertexArrayRangeNV")) == NULL) || r; + r = ((glVertexArrayRangeNV = (PFNGLVERTEXARRAYRANGENVPROC)glewGetProcAddress((const GLubyte*)"glVertexArrayRangeNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_vertex_array_range */ + +#ifdef GL_NV_vertex_array_range2 + +#endif /* GL_NV_vertex_array_range2 */ + +#ifdef GL_NV_vertex_program + +static GLboolean _glewInit_GL_NV_vertex_program (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAreProgramsResidentNV = (PFNGLAREPROGRAMSRESIDENTNVPROC)glewGetProcAddress((const GLubyte*)"glAreProgramsResidentNV")) == NULL) || r; + r = ((glBindProgramNV = (PFNGLBINDPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glBindProgramNV")) == NULL) || r; + r = ((glDeleteProgramsNV = (PFNGLDELETEPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgramsNV")) == NULL) || r; + r = ((glExecuteProgramNV = (PFNGLEXECUTEPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glExecuteProgramNV")) == NULL) || r; + r = ((glGenProgramsNV = (PFNGLGENPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glGenProgramsNV")) == NULL) || r; + r = ((glGetProgramParameterdvNV = (PFNGLGETPROGRAMPARAMETERDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramParameterdvNV")) == NULL) || r; + r = ((glGetProgramParameterfvNV = (PFNGLGETPROGRAMPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramParameterfvNV")) == NULL) || r; + r = ((glGetProgramStringNV = (PFNGLGETPROGRAMSTRINGNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramStringNV")) == NULL) || r; + r = ((glGetProgramivNV = (PFNGLGETPROGRAMIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramivNV")) == NULL) || r; + r = ((glGetTrackMatrixivNV = (PFNGLGETTRACKMATRIXIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetTrackMatrixivNV")) == NULL) || r; + r = ((glGetVertexAttribPointervNV = (PFNGLGETVERTEXATTRIBPOINTERVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointervNV")) == NULL) || r; + r = ((glGetVertexAttribdvNV = (PFNGLGETVERTEXATTRIBDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdvNV")) == NULL) || r; + r = ((glGetVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfvNV")) == NULL) || r; + r = ((glGetVertexAttribivNV = (PFNGLGETVERTEXATTRIBIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribivNV")) == NULL) || r; + r = ((glIsProgramNV = (PFNGLISPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glIsProgramNV")) == NULL) || r; + r = ((glLoadProgramNV = (PFNGLLOADPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glLoadProgramNV")) == NULL) || r; + r = ((glProgramParameter4dNV = (PFNGLPROGRAMPARAMETER4DNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4dNV")) == NULL) || r; + r = ((glProgramParameter4dvNV = (PFNGLPROGRAMPARAMETER4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4dvNV")) == NULL) || r; + r = ((glProgramParameter4fNV = (PFNGLPROGRAMPARAMETER4FNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4fNV")) == NULL) || r; + r = ((glProgramParameter4fvNV = (PFNGLPROGRAMPARAMETER4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4fvNV")) == NULL) || r; + r = ((glProgramParameters4dvNV = (PFNGLPROGRAMPARAMETERS4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameters4dvNV")) == NULL) || r; + r = ((glProgramParameters4fvNV = (PFNGLPROGRAMPARAMETERS4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameters4fvNV")) == NULL) || r; + r = ((glRequestResidentProgramsNV = (PFNGLREQUESTRESIDENTPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glRequestResidentProgramsNV")) == NULL) || r; + r = ((glTrackMatrixNV = (PFNGLTRACKMATRIXNVPROC)glewGetProcAddress((const GLubyte*)"glTrackMatrixNV")) == NULL) || r; + r = ((glVertexAttrib1dNV = (PFNGLVERTEXATTRIB1DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dNV")) == NULL) || r; + r = ((glVertexAttrib1dvNV = (PFNGLVERTEXATTRIB1DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dvNV")) == NULL) || r; + r = ((glVertexAttrib1fNV = (PFNGLVERTEXATTRIB1FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fNV")) == NULL) || r; + r = ((glVertexAttrib1fvNV = (PFNGLVERTEXATTRIB1FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fvNV")) == NULL) || r; + r = ((glVertexAttrib1sNV = (PFNGLVERTEXATTRIB1SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sNV")) == NULL) || r; + r = ((glVertexAttrib1svNV = (PFNGLVERTEXATTRIB1SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1svNV")) == NULL) || r; + r = ((glVertexAttrib2dNV = (PFNGLVERTEXATTRIB2DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dNV")) == NULL) || r; + r = ((glVertexAttrib2dvNV = (PFNGLVERTEXATTRIB2DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dvNV")) == NULL) || r; + r = ((glVertexAttrib2fNV = (PFNGLVERTEXATTRIB2FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fNV")) == NULL) || r; + r = ((glVertexAttrib2fvNV = (PFNGLVERTEXATTRIB2FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fvNV")) == NULL) || r; + r = ((glVertexAttrib2sNV = (PFNGLVERTEXATTRIB2SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sNV")) == NULL) || r; + r = ((glVertexAttrib2svNV = (PFNGLVERTEXATTRIB2SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2svNV")) == NULL) || r; + r = ((glVertexAttrib3dNV = (PFNGLVERTEXATTRIB3DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dNV")) == NULL) || r; + r = ((glVertexAttrib3dvNV = (PFNGLVERTEXATTRIB3DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dvNV")) == NULL) || r; + r = ((glVertexAttrib3fNV = (PFNGLVERTEXATTRIB3FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fNV")) == NULL) || r; + r = ((glVertexAttrib3fvNV = (PFNGLVERTEXATTRIB3FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fvNV")) == NULL) || r; + r = ((glVertexAttrib3sNV = (PFNGLVERTEXATTRIB3SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sNV")) == NULL) || r; + r = ((glVertexAttrib3svNV = (PFNGLVERTEXATTRIB3SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3svNV")) == NULL) || r; + r = ((glVertexAttrib4dNV = (PFNGLVERTEXATTRIB4DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dNV")) == NULL) || r; + r = ((glVertexAttrib4dvNV = (PFNGLVERTEXATTRIB4DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dvNV")) == NULL) || r; + r = ((glVertexAttrib4fNV = (PFNGLVERTEXATTRIB4FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fNV")) == NULL) || r; + r = ((glVertexAttrib4fvNV = (PFNGLVERTEXATTRIB4FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fvNV")) == NULL) || r; + r = ((glVertexAttrib4sNV = (PFNGLVERTEXATTRIB4SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sNV")) == NULL) || r; + r = ((glVertexAttrib4svNV = (PFNGLVERTEXATTRIB4SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4svNV")) == NULL) || r; + r = ((glVertexAttrib4ubNV = (PFNGLVERTEXATTRIB4UBNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubNV")) == NULL) || r; + r = ((glVertexAttrib4ubvNV = (PFNGLVERTEXATTRIB4UBVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubvNV")) == NULL) || r; + r = ((glVertexAttribPointerNV = (PFNGLVERTEXATTRIBPOINTERNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointerNV")) == NULL) || r; + r = ((glVertexAttribs1dvNV = (PFNGLVERTEXATTRIBS1DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1dvNV")) == NULL) || r; + r = ((glVertexAttribs1fvNV = (PFNGLVERTEXATTRIBS1FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1fvNV")) == NULL) || r; + r = ((glVertexAttribs1svNV = (PFNGLVERTEXATTRIBS1SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1svNV")) == NULL) || r; + r = ((glVertexAttribs2dvNV = (PFNGLVERTEXATTRIBS2DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2dvNV")) == NULL) || r; + r = ((glVertexAttribs2fvNV = (PFNGLVERTEXATTRIBS2FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2fvNV")) == NULL) || r; + r = ((glVertexAttribs2svNV = (PFNGLVERTEXATTRIBS2SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2svNV")) == NULL) || r; + r = ((glVertexAttribs3dvNV = (PFNGLVERTEXATTRIBS3DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3dvNV")) == NULL) || r; + r = ((glVertexAttribs3fvNV = (PFNGLVERTEXATTRIBS3FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3fvNV")) == NULL) || r; + r = ((glVertexAttribs3svNV = (PFNGLVERTEXATTRIBS3SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3svNV")) == NULL) || r; + r = ((glVertexAttribs4dvNV = (PFNGLVERTEXATTRIBS4DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4dvNV")) == NULL) || r; + r = ((glVertexAttribs4fvNV = (PFNGLVERTEXATTRIBS4FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4fvNV")) == NULL) || r; + r = ((glVertexAttribs4svNV = (PFNGLVERTEXATTRIBS4SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4svNV")) == NULL) || r; + r = ((glVertexAttribs4ubvNV = (PFNGLVERTEXATTRIBS4UBVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4ubvNV")) == NULL) || r; + + return r; +} + +#endif /* GL_NV_vertex_program */ + +#ifdef GL_NV_vertex_program1_1 + +#endif /* GL_NV_vertex_program1_1 */ + +#ifdef GL_NV_vertex_program2 + +#endif /* GL_NV_vertex_program2 */ + +#ifdef GL_NV_vertex_program2_option + +#endif /* GL_NV_vertex_program2_option */ + +#ifdef GL_NV_vertex_program3 + +#endif /* GL_NV_vertex_program3 */ + +#ifdef GL_OML_interlace + +#endif /* GL_OML_interlace */ + +#ifdef GL_OML_resample + +#endif /* GL_OML_resample */ + +#ifdef GL_OML_subsample + +#endif /* GL_OML_subsample */ + +#ifdef GL_PGI_misc_hints + +#endif /* GL_PGI_misc_hints */ + +#ifdef GL_PGI_vertex_hints + +#endif /* GL_PGI_vertex_hints */ + +#ifdef GL_REND_screen_coordinates + +#endif /* GL_REND_screen_coordinates */ + +#ifdef GL_S3_s3tc + +#endif /* GL_S3_s3tc */ + +#ifdef GL_SGIS_color_range + +#endif /* GL_SGIS_color_range */ + +#ifdef GL_SGIS_detail_texture + +static GLboolean _glewInit_GL_SGIS_detail_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glDetailTexFuncSGIS = (PFNGLDETAILTEXFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glDetailTexFuncSGIS")) == NULL) || r; + r = ((glGetDetailTexFuncSGIS = (PFNGLGETDETAILTEXFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glGetDetailTexFuncSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_detail_texture */ + +#ifdef GL_SGIS_fog_function + +static GLboolean _glewInit_GL_SGIS_fog_function (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFogFuncSGIS = (PFNGLFOGFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glFogFuncSGIS")) == NULL) || r; + r = ((glGetFogFuncSGIS = (PFNGLGETFOGFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glGetFogFuncSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_fog_function */ + +#ifdef GL_SGIS_generate_mipmap + +#endif /* GL_SGIS_generate_mipmap */ + +#ifdef GL_SGIS_multisample + +static GLboolean _glewInit_GL_SGIS_multisample (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glSampleMaskSGIS = (PFNGLSAMPLEMASKSGISPROC)glewGetProcAddress((const GLubyte*)"glSampleMaskSGIS")) == NULL) || r; + r = ((glSamplePatternSGIS = (PFNGLSAMPLEPATTERNSGISPROC)glewGetProcAddress((const GLubyte*)"glSamplePatternSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_multisample */ + +#ifdef GL_SGIS_pixel_texture + +#endif /* GL_SGIS_pixel_texture */ + +#ifdef GL_SGIS_sharpen_texture + +static GLboolean _glewInit_GL_SGIS_sharpen_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetSharpenTexFuncSGIS = (PFNGLGETSHARPENTEXFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glGetSharpenTexFuncSGIS")) == NULL) || r; + r = ((glSharpenTexFuncSGIS = (PFNGLSHARPENTEXFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glSharpenTexFuncSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_sharpen_texture */ + +#ifdef GL_SGIS_texture4D + +static GLboolean _glewInit_GL_SGIS_texture4D (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTexImage4DSGIS = (PFNGLTEXIMAGE4DSGISPROC)glewGetProcAddress((const GLubyte*)"glTexImage4DSGIS")) == NULL) || r; + r = ((glTexSubImage4DSGIS = (PFNGLTEXSUBIMAGE4DSGISPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage4DSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_texture4D */ + +#ifdef GL_SGIS_texture_border_clamp + +#endif /* GL_SGIS_texture_border_clamp */ + +#ifdef GL_SGIS_texture_edge_clamp + +#endif /* GL_SGIS_texture_edge_clamp */ + +#ifdef GL_SGIS_texture_filter4 + +static GLboolean _glewInit_GL_SGIS_texture_filter4 (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGetTexFilterFuncSGIS = (PFNGLGETTEXFILTERFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glGetTexFilterFuncSGIS")) == NULL) || r; + r = ((glTexFilterFuncSGIS = (PFNGLTEXFILTERFUNCSGISPROC)glewGetProcAddress((const GLubyte*)"glTexFilterFuncSGIS")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIS_texture_filter4 */ + +#ifdef GL_SGIS_texture_lod + +#endif /* GL_SGIS_texture_lod */ + +#ifdef GL_SGIS_texture_select + +#endif /* GL_SGIS_texture_select */ + +#ifdef GL_SGIX_async + +static GLboolean _glewInit_GL_SGIX_async (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAsyncMarkerSGIX = (PFNGLASYNCMARKERSGIXPROC)glewGetProcAddress((const GLubyte*)"glAsyncMarkerSGIX")) == NULL) || r; + r = ((glDeleteAsyncMarkersSGIX = (PFNGLDELETEASYNCMARKERSSGIXPROC)glewGetProcAddress((const GLubyte*)"glDeleteAsyncMarkersSGIX")) == NULL) || r; + r = ((glFinishAsyncSGIX = (PFNGLFINISHASYNCSGIXPROC)glewGetProcAddress((const GLubyte*)"glFinishAsyncSGIX")) == NULL) || r; + r = ((glGenAsyncMarkersSGIX = (PFNGLGENASYNCMARKERSSGIXPROC)glewGetProcAddress((const GLubyte*)"glGenAsyncMarkersSGIX")) == NULL) || r; + r = ((glIsAsyncMarkerSGIX = (PFNGLISASYNCMARKERSGIXPROC)glewGetProcAddress((const GLubyte*)"glIsAsyncMarkerSGIX")) == NULL) || r; + r = ((glPollAsyncSGIX = (PFNGLPOLLASYNCSGIXPROC)glewGetProcAddress((const GLubyte*)"glPollAsyncSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_async */ + +#ifdef GL_SGIX_async_histogram + +#endif /* GL_SGIX_async_histogram */ + +#ifdef GL_SGIX_async_pixel + +#endif /* GL_SGIX_async_pixel */ + +#ifdef GL_SGIX_blend_alpha_minmax + +#endif /* GL_SGIX_blend_alpha_minmax */ + +#ifdef GL_SGIX_clipmap + +#endif /* GL_SGIX_clipmap */ + +#ifdef GL_SGIX_depth_texture + +#endif /* GL_SGIX_depth_texture */ + +#ifdef GL_SGIX_flush_raster + +static GLboolean _glewInit_GL_SGIX_flush_raster (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFlushRasterSGIX = (PFNGLFLUSHRASTERSGIXPROC)glewGetProcAddress((const GLubyte*)"glFlushRasterSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_flush_raster */ + +#ifdef GL_SGIX_fog_offset + +#endif /* GL_SGIX_fog_offset */ + +#ifdef GL_SGIX_fog_texture + +static GLboolean _glewInit_GL_SGIX_fog_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTextureFogSGIX = (PFNGLTEXTUREFOGSGIXPROC)glewGetProcAddress((const GLubyte*)"glTextureFogSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_fog_texture */ + +#ifdef GL_SGIX_fragment_specular_lighting + +static GLboolean _glewInit_GL_SGIX_fragment_specular_lighting (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + +#if 0 + r = ((glFragmentColorMaterialSGIX = (PFNGLFRAGMENTCOLORMATERIALSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentColorMaterialSGIX")) == NULL) || r; + r = ((glFragmentLightModelfSGIX = (PFNGLFRAGMENTLIGHTMODELFSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelfSGIX")) == NULL) || r; + r = ((glFragmentLightModelfvSGIX = (PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelfvSGIX")) == NULL) || r; + r = ((glFragmentLightModeliSGIX = (PFNGLFRAGMENTLIGHTMODELISGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModeliSGIX")) == NULL) || r; + r = ((glFragmentLightModelivSGIX = (PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightModelivSGIX")) == NULL) || r; + r = ((glFragmentLightfSGIX = (PFNGLFRAGMENTLIGHTFSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightfSGIX")) == NULL) || r; + r = ((glFragmentLightfvSGIX = (PFNGLFRAGMENTLIGHTFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightfvSGIX")) == NULL) || r; + r = ((glFragmentLightiSGIX = (PFNGLFRAGMENTLIGHTISGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightiSGIX")) == NULL) || r; + r = ((glFragmentLightivSGIX = (PFNGLFRAGMENTLIGHTIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentLightivSGIX")) == NULL) || r; + r = ((glFragmentMaterialfSGIX = (PFNGLFRAGMENTMATERIALFSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialfSGIX")) == NULL) || r; + r = ((glFragmentMaterialfvSGIX = (PFNGLFRAGMENTMATERIALFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialfvSGIX")) == NULL) || r; + r = ((glFragmentMaterialiSGIX = (PFNGLFRAGMENTMATERIALISGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialiSGIX")) == NULL) || r; + r = ((glFragmentMaterialivSGIX = (PFNGLFRAGMENTMATERIALIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glFragmentMaterialivSGIX")) == NULL) || r; + r = ((glGetFragmentLightfvSGIX = (PFNGLGETFRAGMENTLIGHTFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentLightfvSGIX")) == NULL) || r; + r = ((glGetFragmentLightivSGIX = (PFNGLGETFRAGMENTLIGHTIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentLightivSGIX")) == NULL) || r; + r = ((glGetFragmentMaterialfvSGIX = (PFNGLGETFRAGMENTMATERIALFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentMaterialfvSGIX")) == NULL) || r; + r = ((glGetFragmentMaterialivSGIX = (PFNGLGETFRAGMENTMATERIALIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glGetFragmentMaterialivSGIX")) == NULL) || r; +#endif + + return r; +} + +#endif /* GL_SGIX_fragment_specular_lighting */ + +#ifdef GL_SGIX_framezoom + +static GLboolean _glewInit_GL_SGIX_framezoom (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFrameZoomSGIX = (PFNGLFRAMEZOOMSGIXPROC)glewGetProcAddress((const GLubyte*)"glFrameZoomSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_framezoom */ + +#ifdef GL_SGIX_interlace + +#endif /* GL_SGIX_interlace */ + +#ifdef GL_SGIX_ir_instrument1 + +#endif /* GL_SGIX_ir_instrument1 */ + +#ifdef GL_SGIX_list_priority + +#endif /* GL_SGIX_list_priority */ + +#ifdef GL_SGIX_pixel_texture + +static GLboolean _glewInit_GL_SGIX_pixel_texture (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glPixelTexGenSGIX = (PFNGLPIXELTEXGENSGIXPROC)glewGetProcAddress((const GLubyte*)"glPixelTexGenSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_pixel_texture */ + +#ifdef GL_SGIX_pixel_texture_bits + +#endif /* GL_SGIX_pixel_texture_bits */ + +#ifdef GL_SGIX_reference_plane + +static GLboolean _glewInit_GL_SGIX_reference_plane (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glReferencePlaneSGIX = (PFNGLREFERENCEPLANESGIXPROC)glewGetProcAddress((const GLubyte*)"glReferencePlaneSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_reference_plane */ + +#ifdef GL_SGIX_resample + +#endif /* GL_SGIX_resample */ + +#ifdef GL_SGIX_shadow + +#endif /* GL_SGIX_shadow */ + +#ifdef GL_SGIX_shadow_ambient + +#endif /* GL_SGIX_shadow_ambient */ + +#ifdef GL_SGIX_sprite + +static GLboolean _glewInit_GL_SGIX_sprite (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glSpriteParameterfSGIX = (PFNGLSPRITEPARAMETERFSGIXPROC)glewGetProcAddress((const GLubyte*)"glSpriteParameterfSGIX")) == NULL) || r; + r = ((glSpriteParameterfvSGIX = (PFNGLSPRITEPARAMETERFVSGIXPROC)glewGetProcAddress((const GLubyte*)"glSpriteParameterfvSGIX")) == NULL) || r; + r = ((glSpriteParameteriSGIX = (PFNGLSPRITEPARAMETERISGIXPROC)glewGetProcAddress((const GLubyte*)"glSpriteParameteriSGIX")) == NULL) || r; + r = ((glSpriteParameterivSGIX = (PFNGLSPRITEPARAMETERIVSGIXPROC)glewGetProcAddress((const GLubyte*)"glSpriteParameterivSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_sprite */ + +#ifdef GL_SGIX_tag_sample_buffer + +static GLboolean _glewInit_GL_SGIX_tag_sample_buffer (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glTagSampleBufferSGIX = (PFNGLTAGSAMPLEBUFFERSGIXPROC)glewGetProcAddress((const GLubyte*)"glTagSampleBufferSGIX")) == NULL) || r; + + return r; +} + +#endif /* GL_SGIX_tag_sample_buffer */ + +#ifdef GL_SGIX_texture_add_env + +#endif /* GL_SGIX_texture_add_env */ + +#ifdef GL_SGIX_texture_coordinate_clamp + +#endif /* GL_SGIX_texture_coordinate_clamp */ + +#ifdef GL_SGIX_texture_lod_bias + +#endif /* GL_SGIX_texture_lod_bias */ + +#ifdef GL_SGIX_texture_multi_buffer + +#endif /* GL_SGIX_texture_multi_buffer */ + +#ifdef GL_SGIX_texture_range + +#endif /* GL_SGIX_texture_range */ + +#ifdef GL_SGIX_texture_scale_bias + +#endif /* GL_SGIX_texture_scale_bias */ + +#ifdef GL_SGIX_vertex_preclip + +#endif /* GL_SGIX_vertex_preclip */ + +#ifdef GL_SGIX_vertex_preclip_hint + +#endif /* GL_SGIX_vertex_preclip_hint */ + +#ifdef GL_SGIX_ycrcb + +#endif /* GL_SGIX_ycrcb */ + +#ifdef GL_SGI_color_matrix + +#endif /* GL_SGI_color_matrix */ + +#ifdef GL_SGI_color_table + +static GLboolean _glewInit_GL_SGI_color_table (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColorTableParameterfvSGI = (PFNGLCOLORTABLEPARAMETERFVSGIPROC)glewGetProcAddress((const GLubyte*)"glColorTableParameterfvSGI")) == NULL) || r; + r = ((glColorTableParameterivSGI = (PFNGLCOLORTABLEPARAMETERIVSGIPROC)glewGetProcAddress((const GLubyte*)"glColorTableParameterivSGI")) == NULL) || r; + r = ((glColorTableSGI = (PFNGLCOLORTABLESGIPROC)glewGetProcAddress((const GLubyte*)"glColorTableSGI")) == NULL) || r; + r = ((glCopyColorTableSGI = (PFNGLCOPYCOLORTABLESGIPROC)glewGetProcAddress((const GLubyte*)"glCopyColorTableSGI")) == NULL) || r; + r = ((glGetColorTableParameterfvSGI = (PFNGLGETCOLORTABLEPARAMETERFVSGIPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameterfvSGI")) == NULL) || r; + r = ((glGetColorTableParameterivSGI = (PFNGLGETCOLORTABLEPARAMETERIVSGIPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableParameterivSGI")) == NULL) || r; + r = ((glGetColorTableSGI = (PFNGLGETCOLORTABLESGIPROC)glewGetProcAddress((const GLubyte*)"glGetColorTableSGI")) == NULL) || r; + + return r; +} + +#endif /* GL_SGI_color_table */ + +#ifdef GL_SGI_texture_color_table + +#endif /* GL_SGI_texture_color_table */ + +#ifdef GL_SUNX_constant_data + +static GLboolean _glewInit_GL_SUNX_constant_data (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glFinishTextureSUNX = (PFNGLFINISHTEXTURESUNXPROC)glewGetProcAddress((const GLubyte*)"glFinishTextureSUNX")) == NULL) || r; + + return r; +} + +#endif /* GL_SUNX_constant_data */ + +#ifdef GL_SUN_convolution_border_modes + +#endif /* GL_SUN_convolution_border_modes */ + +#ifdef GL_SUN_global_alpha + +static GLboolean _glewInit_GL_SUN_global_alpha (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glGlobalAlphaFactorbSUN = (PFNGLGLOBALALPHAFACTORBSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactorbSUN")) == NULL) || r; + r = ((glGlobalAlphaFactordSUN = (PFNGLGLOBALALPHAFACTORDSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactordSUN")) == NULL) || r; + r = ((glGlobalAlphaFactorfSUN = (PFNGLGLOBALALPHAFACTORFSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactorfSUN")) == NULL) || r; + r = ((glGlobalAlphaFactoriSUN = (PFNGLGLOBALALPHAFACTORISUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactoriSUN")) == NULL) || r; + r = ((glGlobalAlphaFactorsSUN = (PFNGLGLOBALALPHAFACTORSSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactorsSUN")) == NULL) || r; + r = ((glGlobalAlphaFactorubSUN = (PFNGLGLOBALALPHAFACTORUBSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactorubSUN")) == NULL) || r; + r = ((glGlobalAlphaFactoruiSUN = (PFNGLGLOBALALPHAFACTORUISUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactoruiSUN")) == NULL) || r; + r = ((glGlobalAlphaFactorusSUN = (PFNGLGLOBALALPHAFACTORUSSUNPROC)glewGetProcAddress((const GLubyte*)"glGlobalAlphaFactorusSUN")) == NULL) || r; + + return r; +} + +#endif /* GL_SUN_global_alpha */ + +#ifdef GL_SUN_mesh_array + +#endif /* GL_SUN_mesh_array */ + +#ifdef GL_SUN_read_video_pixels + +static GLboolean _glewInit_GL_SUN_read_video_pixels (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glReadVideoPixelsSUN = (PFNGLREADVIDEOPIXELSSUNPROC)glewGetProcAddress((const GLubyte*)"glReadVideoPixelsSUN")) == NULL) || r; + + return r; +} + +#endif /* GL_SUN_read_video_pixels */ + +#ifdef GL_SUN_slice_accum + +#endif /* GL_SUN_slice_accum */ + +#ifdef GL_SUN_triangle_list + +static GLboolean _glewInit_GL_SUN_triangle_list (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glReplacementCodePointerSUN = (PFNGLREPLACEMENTCODEPOINTERSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodePointerSUN")) == NULL) || r; + r = ((glReplacementCodeubSUN = (PFNGLREPLACEMENTCODEUBSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeubSUN")) == NULL) || r; + r = ((glReplacementCodeubvSUN = (PFNGLREPLACEMENTCODEUBVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeubvSUN")) == NULL) || r; + r = ((glReplacementCodeuiSUN = (PFNGLREPLACEMENTCODEUISUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiSUN")) == NULL) || r; + r = ((glReplacementCodeuivSUN = (PFNGLREPLACEMENTCODEUIVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuivSUN")) == NULL) || r; + r = ((glReplacementCodeusSUN = (PFNGLREPLACEMENTCODEUSSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeusSUN")) == NULL) || r; + r = ((glReplacementCodeusvSUN = (PFNGLREPLACEMENTCODEUSVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeusvSUN")) == NULL) || r; + + return r; +} + +#endif /* GL_SUN_triangle_list */ + +#ifdef GL_SUN_vertex + +static GLboolean _glewInit_GL_SUN_vertex (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glColor3fVertex3fSUN = (PFNGLCOLOR3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glColor3fVertex3fSUN")) == NULL) || r; + r = ((glColor3fVertex3fvSUN = (PFNGLCOLOR3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glColor3fVertex3fvSUN")) == NULL) || r; + r = ((glColor4fNormal3fVertex3fSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glColor4fNormal3fVertex3fvSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glColor4ubVertex2fSUN = (PFNGLCOLOR4UBVERTEX2FSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4ubVertex2fSUN")) == NULL) || r; + r = ((glColor4ubVertex2fvSUN = (PFNGLCOLOR4UBVERTEX2FVSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4ubVertex2fvSUN")) == NULL) || r; + r = ((glColor4ubVertex3fSUN = (PFNGLCOLOR4UBVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4ubVertex3fSUN")) == NULL) || r; + r = ((glColor4ubVertex3fvSUN = (PFNGLCOLOR4UBVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glColor4ubVertex3fvSUN")) == NULL) || r; + r = ((glNormal3fVertex3fSUN = (PFNGLNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glNormal3fVertex3fSUN")) == NULL) || r; + r = ((glNormal3fVertex3fvSUN = (PFNGLNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor3fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor4fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor4fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor4ubVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor4ubVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiColor4ubVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiColor4ubVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiNormal3fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiTexCoord2fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiTexCoord2fVertex3fvSUN")) == NULL) || r; + r = ((glReplacementCodeuiVertex3fSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiVertex3fSUN")) == NULL) || r; + r = ((glReplacementCodeuiVertex3fvSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glReplacementCodeuiVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord2fColor3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor3fVertex3fSUN")) == NULL) || r; + r = ((glTexCoord2fColor3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor3fVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor4fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor4fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord2fColor4ubVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor4ubVertex3fSUN")) == NULL) || r; + r = ((glTexCoord2fColor4ubVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fColor4ubVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord2fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fNormal3fVertex3fSUN")) == NULL) || r; + r = ((glTexCoord2fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fNormal3fVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord2fVertex3fSUN = (PFNGLTEXCOORD2FVERTEX3FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fVertex3fSUN")) == NULL) || r; + r = ((glTexCoord2fVertex3fvSUN = (PFNGLTEXCOORD2FVERTEX3FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord2fVertex3fvSUN")) == NULL) || r; + r = ((glTexCoord4fColor4fNormal3fVertex4fSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4fColor4fNormal3fVertex4fSUN")) == NULL) || r; + r = ((glTexCoord4fColor4fNormal3fVertex4fvSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4fColor4fNormal3fVertex4fvSUN")) == NULL) || r; + r = ((glTexCoord4fVertex4fSUN = (PFNGLTEXCOORD4FVERTEX4FSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4fVertex4fSUN")) == NULL) || r; + r = ((glTexCoord4fVertex4fvSUN = (PFNGLTEXCOORD4FVERTEX4FVSUNPROC)glewGetProcAddress((const GLubyte*)"glTexCoord4fVertex4fvSUN")) == NULL) || r; + + return r; +} + +#endif /* GL_SUN_vertex */ + +#ifdef GL_WIN_phong_shading + +#endif /* GL_WIN_phong_shading */ + +#ifdef GL_WIN_specular_fog + +#endif /* GL_WIN_specular_fog */ + +#ifdef GL_WIN_swap_hint + +static GLboolean _glewInit_GL_WIN_swap_hint (GLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glAddSwapHintRectWIN = (PFNGLADDSWAPHINTRECTWINPROC)glewGetProcAddress((const GLubyte*)"glAddSwapHintRectWIN")) == NULL) || r; + + return r; +} + +#endif /* GL_WIN_swap_hint */ + +/* ------------------------------------------------------------------------- */ + +/* + * Search for name in the extensions string. Use of strstr() + * is not sufficient because extension names can be prefixes of + * other extension names. Could use strtok() but the constant + * string returned by glGetString might be in read-only memory. + */ +GLboolean glewGetExtension (const char* name) +{ + GLubyte* p; + GLubyte* end; + GLuint len = _glewStrLen((const GLubyte*)name); + p = (GLubyte*)glGetString(GL_EXTENSIONS); + if (0 == p) return GL_FALSE; + end = p + _glewStrLen(p); + while (p < end) + { + GLuint n = _glewStrCLen(p, ' '); + if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE; + p += n+1; + } + return GL_FALSE; +} + +/* ------------------------------------------------------------------------- */ + +#ifndef GLEW_MX +static +#endif +GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) +{ + const GLubyte* s; + GLuint dot, major, minor; + /* query opengl version */ + s = glGetString(GL_VERSION); + dot = _glewStrCLen(s, '.'); + major = dot-1; + minor = dot+1; + if (dot == 0 || s[minor] == '\0') + return GLEW_ERROR_NO_GL_VERSION; + if (s[major] == '1' && s[minor] == '0') + { + return GLEW_ERROR_GL_VERSION_10_ONLY; + } + else + { + if (s[major] >= '2') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_3 = GL_TRUE; + GLEW_VERSION_1_4 = GL_TRUE; + GLEW_VERSION_1_5 = GL_TRUE; + GLEW_VERSION_2_0 = GL_TRUE; + } + else + { + if (s[minor] >= '5') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_3 = GL_TRUE; + GLEW_VERSION_1_4 = GL_TRUE; + GLEW_VERSION_1_5 = GL_TRUE; + GLEW_VERSION_2_0 = GL_FALSE; + } + if (s[minor] == '4') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_3 = GL_TRUE; + GLEW_VERSION_1_4 = GL_TRUE; + GLEW_VERSION_1_5 = GL_FALSE; + GLEW_VERSION_2_0 = GL_FALSE; + } + if (s[minor] == '3') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_3 = GL_TRUE; + GLEW_VERSION_1_4 = GL_FALSE; + GLEW_VERSION_1_5 = GL_FALSE; + GLEW_VERSION_2_0 = GL_FALSE; + } + if (s[minor] == '2') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_TRUE; + GLEW_VERSION_1_3 = GL_FALSE; + GLEW_VERSION_1_4 = GL_FALSE; + GLEW_VERSION_1_5 = GL_FALSE; + GLEW_VERSION_2_0 = GL_FALSE; + } + if (s[minor] < '2') + { + GLEW_VERSION_1_1 = GL_TRUE; + GLEW_VERSION_1_2 = GL_FALSE; + GLEW_VERSION_1_3 = GL_FALSE; + GLEW_VERSION_1_4 = GL_FALSE; + GLEW_VERSION_1_5 = GL_FALSE; + GLEW_VERSION_2_0 = GL_FALSE; + } + } + } + /* initialize extensions */ +#ifdef GL_VERSION_1_2 + if (glewExperimental || GLEW_VERSION_1_2) GLEW_VERSION_1_2 = !_glewInit_GL_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_VERSION_1_2 */ +#ifdef GL_VERSION_1_3 + if (glewExperimental || GLEW_VERSION_1_3) GLEW_VERSION_1_3 = !_glewInit_GL_VERSION_1_3(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_VERSION_1_3 */ +#ifdef GL_VERSION_1_4 + if (glewExperimental || GLEW_VERSION_1_4) GLEW_VERSION_1_4 = !_glewInit_GL_VERSION_1_4(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_VERSION_1_4 */ +#ifdef GL_VERSION_1_5 + if (glewExperimental || GLEW_VERSION_1_5) GLEW_VERSION_1_5 = !_glewInit_GL_VERSION_1_5(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_VERSION_1_5 */ +#ifdef GL_VERSION_2_0 + if (glewExperimental || GLEW_VERSION_2_0) GLEW_VERSION_2_0 = !_glewInit_GL_VERSION_2_0(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_VERSION_2_0 */ +#ifdef GL_3DFX_multisample + GLEW_3DFX_multisample = glewGetExtension("GL_3DFX_multisample"); +#endif /* GL_3DFX_multisample */ +#ifdef GL_3DFX_tbuffer + GLEW_3DFX_tbuffer = glewGetExtension("GL_3DFX_tbuffer"); + if (glewExperimental || GLEW_3DFX_tbuffer) GLEW_3DFX_tbuffer = !_glewInit_GL_3DFX_tbuffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_3DFX_tbuffer */ +#ifdef GL_3DFX_texture_compression_FXT1 + GLEW_3DFX_texture_compression_FXT1 = glewGetExtension("GL_3DFX_texture_compression_FXT1"); +#endif /* GL_3DFX_texture_compression_FXT1 */ +#ifdef GL_APPLE_client_storage + GLEW_APPLE_client_storage = glewGetExtension("GL_APPLE_client_storage"); +#endif /* GL_APPLE_client_storage */ +#ifdef GL_APPLE_element_array + GLEW_APPLE_element_array = glewGetExtension("GL_APPLE_element_array"); + if (glewExperimental || GLEW_APPLE_element_array) GLEW_APPLE_element_array = !_glewInit_GL_APPLE_element_array(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_APPLE_element_array */ +#ifdef GL_APPLE_fence + GLEW_APPLE_fence = glewGetExtension("GL_APPLE_fence"); + if (glewExperimental || GLEW_APPLE_fence) GLEW_APPLE_fence = !_glewInit_GL_APPLE_fence(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_APPLE_fence */ +#ifdef GL_APPLE_float_pixels + GLEW_APPLE_float_pixels = glewGetExtension("GL_APPLE_float_pixels"); +#endif /* GL_APPLE_float_pixels */ +#ifdef GL_APPLE_pixel_buffer + GLEW_APPLE_pixel_buffer = glewGetExtension("GL_APPLE_pixel_buffer"); +#endif /* GL_APPLE_pixel_buffer */ +#ifdef GL_APPLE_specular_vector + GLEW_APPLE_specular_vector = glewGetExtension("GL_APPLE_specular_vector"); +#endif /* GL_APPLE_specular_vector */ +#ifdef GL_APPLE_texture_range + GLEW_APPLE_texture_range = glewGetExtension("GL_APPLE_texture_range"); + if (glewExperimental || GLEW_APPLE_texture_range) GLEW_APPLE_texture_range = !_glewInit_GL_APPLE_texture_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_APPLE_texture_range */ +#ifdef GL_APPLE_transform_hint + GLEW_APPLE_transform_hint = glewGetExtension("GL_APPLE_transform_hint"); +#endif /* GL_APPLE_transform_hint */ +#ifdef GL_APPLE_vertex_array_object + GLEW_APPLE_vertex_array_object = glewGetExtension("GL_APPLE_vertex_array_object"); + if (glewExperimental || GLEW_APPLE_vertex_array_object) GLEW_APPLE_vertex_array_object = !_glewInit_GL_APPLE_vertex_array_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_APPLE_vertex_array_object */ +#ifdef GL_APPLE_vertex_array_range + GLEW_APPLE_vertex_array_range = glewGetExtension("GL_APPLE_vertex_array_range"); + if (glewExperimental || GLEW_APPLE_vertex_array_range) GLEW_APPLE_vertex_array_range = !_glewInit_GL_APPLE_vertex_array_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_APPLE_vertex_array_range */ +#ifdef GL_APPLE_ycbcr_422 + GLEW_APPLE_ycbcr_422 = glewGetExtension("GL_APPLE_ycbcr_422"); +#endif /* GL_APPLE_ycbcr_422 */ +#ifdef GL_ARB_color_buffer_float + GLEW_ARB_color_buffer_float = glewGetExtension("GL_ARB_color_buffer_float"); + if (glewExperimental || GLEW_ARB_color_buffer_float) GLEW_ARB_color_buffer_float = !_glewInit_GL_ARB_color_buffer_float(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_color_buffer_float */ +#ifdef GL_ARB_depth_texture + GLEW_ARB_depth_texture = glewGetExtension("GL_ARB_depth_texture"); +#endif /* GL_ARB_depth_texture */ +#ifdef GL_ARB_draw_buffers + GLEW_ARB_draw_buffers = glewGetExtension("GL_ARB_draw_buffers"); + if (glewExperimental || GLEW_ARB_draw_buffers) GLEW_ARB_draw_buffers = !_glewInit_GL_ARB_draw_buffers(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_draw_buffers */ +#ifdef GL_ARB_fragment_program + GLEW_ARB_fragment_program = glewGetExtension("GL_ARB_fragment_program"); +#endif /* GL_ARB_fragment_program */ +#ifdef GL_ARB_fragment_program_shadow + GLEW_ARB_fragment_program_shadow = glewGetExtension("GL_ARB_fragment_program_shadow"); +#endif /* GL_ARB_fragment_program_shadow */ +#ifdef GL_ARB_fragment_shader + GLEW_ARB_fragment_shader = glewGetExtension("GL_ARB_fragment_shader"); +#endif /* GL_ARB_fragment_shader */ +#ifdef GL_ARB_half_float_pixel + GLEW_ARB_half_float_pixel = glewGetExtension("GL_ARB_half_float_pixel"); +#endif /* GL_ARB_half_float_pixel */ +#ifdef GL_ARB_imaging + GLEW_ARB_imaging = glewGetExtension("GL_ARB_imaging"); + if (glewExperimental || GLEW_ARB_imaging) GLEW_ARB_imaging = !_glewInit_GL_ARB_imaging(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_imaging */ +#ifdef GL_ARB_matrix_palette + GLEW_ARB_matrix_palette = glewGetExtension("GL_ARB_matrix_palette"); + if (glewExperimental || GLEW_ARB_matrix_palette) GLEW_ARB_matrix_palette = !_glewInit_GL_ARB_matrix_palette(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_matrix_palette */ +#ifdef GL_ARB_multisample + GLEW_ARB_multisample = glewGetExtension("GL_ARB_multisample"); + if (glewExperimental || GLEW_ARB_multisample) GLEW_ARB_multisample = !_glewInit_GL_ARB_multisample(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_multisample */ +#ifdef GL_ARB_multitexture + GLEW_ARB_multitexture = glewGetExtension("GL_ARB_multitexture"); + if (glewExperimental || GLEW_ARB_multitexture) GLEW_ARB_multitexture = !_glewInit_GL_ARB_multitexture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_multitexture */ +#ifdef GL_ARB_occlusion_query + GLEW_ARB_occlusion_query = glewGetExtension("GL_ARB_occlusion_query"); + if (glewExperimental || GLEW_ARB_occlusion_query) GLEW_ARB_occlusion_query = !_glewInit_GL_ARB_occlusion_query(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_occlusion_query */ +#ifdef GL_ARB_pixel_buffer_object + GLEW_ARB_pixel_buffer_object = glewGetExtension("GL_ARB_pixel_buffer_object"); +#endif /* GL_ARB_pixel_buffer_object */ +#ifdef GL_ARB_point_parameters + GLEW_ARB_point_parameters = glewGetExtension("GL_ARB_point_parameters"); + if (glewExperimental || GLEW_ARB_point_parameters) GLEW_ARB_point_parameters = !_glewInit_GL_ARB_point_parameters(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_point_parameters */ +#ifdef GL_ARB_point_sprite + GLEW_ARB_point_sprite = glewGetExtension("GL_ARB_point_sprite"); +#endif /* GL_ARB_point_sprite */ +#ifdef GL_ARB_shader_objects + GLEW_ARB_shader_objects = glewGetExtension("GL_ARB_shader_objects"); + if (glewExperimental || GLEW_ARB_shader_objects) GLEW_ARB_shader_objects = !_glewInit_GL_ARB_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_shader_objects */ +#ifdef GL_ARB_shading_language_100 + GLEW_ARB_shading_language_100 = glewGetExtension("GL_ARB_shading_language_100"); +#endif /* GL_ARB_shading_language_100 */ +#ifdef GL_ARB_shadow + GLEW_ARB_shadow = glewGetExtension("GL_ARB_shadow"); +#endif /* GL_ARB_shadow */ +#ifdef GL_ARB_shadow_ambient + GLEW_ARB_shadow_ambient = glewGetExtension("GL_ARB_shadow_ambient"); +#endif /* GL_ARB_shadow_ambient */ +#ifdef GL_ARB_texture_border_clamp + GLEW_ARB_texture_border_clamp = glewGetExtension("GL_ARB_texture_border_clamp"); +#endif /* GL_ARB_texture_border_clamp */ +#ifdef GL_ARB_texture_compression + GLEW_ARB_texture_compression = glewGetExtension("GL_ARB_texture_compression"); + if (glewExperimental || GLEW_ARB_texture_compression) GLEW_ARB_texture_compression = !_glewInit_GL_ARB_texture_compression(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_texture_compression */ +#ifdef GL_ARB_texture_cube_map + GLEW_ARB_texture_cube_map = glewGetExtension("GL_ARB_texture_cube_map"); +#endif /* GL_ARB_texture_cube_map */ +#ifdef GL_ARB_texture_env_add + GLEW_ARB_texture_env_add = glewGetExtension("GL_ARB_texture_env_add"); +#endif /* GL_ARB_texture_env_add */ +#ifdef GL_ARB_texture_env_combine + GLEW_ARB_texture_env_combine = glewGetExtension("GL_ARB_texture_env_combine"); +#endif /* GL_ARB_texture_env_combine */ +#ifdef GL_ARB_texture_env_crossbar + GLEW_ARB_texture_env_crossbar = glewGetExtension("GL_ARB_texture_env_crossbar"); +#endif /* GL_ARB_texture_env_crossbar */ +#ifdef GL_ARB_texture_env_dot3 + GLEW_ARB_texture_env_dot3 = glewGetExtension("GL_ARB_texture_env_dot3"); +#endif /* GL_ARB_texture_env_dot3 */ +#ifdef GL_ARB_texture_float + GLEW_ARB_texture_float = glewGetExtension("GL_ARB_texture_float"); +#endif /* GL_ARB_texture_float */ +#ifdef GL_ARB_texture_mirrored_repeat + GLEW_ARB_texture_mirrored_repeat = glewGetExtension("GL_ARB_texture_mirrored_repeat"); +#endif /* GL_ARB_texture_mirrored_repeat */ +#ifdef GL_ARB_texture_non_power_of_two + GLEW_ARB_texture_non_power_of_two = glewGetExtension("GL_ARB_texture_non_power_of_two"); +#endif /* GL_ARB_texture_non_power_of_two */ +#ifdef GL_ARB_texture_rectangle + GLEW_ARB_texture_rectangle = glewGetExtension("GL_ARB_texture_rectangle"); +#endif /* GL_ARB_texture_rectangle */ +#ifdef GL_ARB_transpose_matrix + GLEW_ARB_transpose_matrix = glewGetExtension("GL_ARB_transpose_matrix"); + if (glewExperimental || GLEW_ARB_transpose_matrix) GLEW_ARB_transpose_matrix = !_glewInit_GL_ARB_transpose_matrix(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_transpose_matrix */ +#ifdef GL_ARB_vertex_blend + GLEW_ARB_vertex_blend = glewGetExtension("GL_ARB_vertex_blend"); + if (glewExperimental || GLEW_ARB_vertex_blend) GLEW_ARB_vertex_blend = !_glewInit_GL_ARB_vertex_blend(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_vertex_blend */ +#ifdef GL_ARB_vertex_buffer_object + GLEW_ARB_vertex_buffer_object = glewGetExtension("GL_ARB_vertex_buffer_object"); + if (glewExperimental || GLEW_ARB_vertex_buffer_object) GLEW_ARB_vertex_buffer_object = !_glewInit_GL_ARB_vertex_buffer_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_vertex_buffer_object */ +#ifdef GL_ARB_vertex_program + GLEW_ARB_vertex_program = glewGetExtension("GL_ARB_vertex_program"); + if (glewExperimental || GLEW_ARB_vertex_program) GLEW_ARB_vertex_program = !_glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_vertex_program */ +#ifdef GL_ARB_vertex_shader + GLEW_ARB_vertex_shader = glewGetExtension("GL_ARB_vertex_shader"); + if (glewExperimental || GLEW_ARB_vertex_shader) { GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); } +#endif /* GL_ARB_vertex_shader */ +#ifdef GL_ARB_window_pos + GLEW_ARB_window_pos = glewGetExtension("GL_ARB_window_pos"); + if (glewExperimental || GLEW_ARB_window_pos) GLEW_ARB_window_pos = !_glewInit_GL_ARB_window_pos(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ARB_window_pos */ +#ifdef GL_ATIX_point_sprites + GLEW_ATIX_point_sprites = glewGetExtension("GL_ATIX_point_sprites"); +#endif /* GL_ATIX_point_sprites */ +#ifdef GL_ATIX_texture_env_combine3 + GLEW_ATIX_texture_env_combine3 = glewGetExtension("GL_ATIX_texture_env_combine3"); +#endif /* GL_ATIX_texture_env_combine3 */ +#ifdef GL_ATIX_texture_env_route + GLEW_ATIX_texture_env_route = glewGetExtension("GL_ATIX_texture_env_route"); +#endif /* GL_ATIX_texture_env_route */ +#ifdef GL_ATIX_vertex_shader_output_point_size + GLEW_ATIX_vertex_shader_output_point_size = glewGetExtension("GL_ATIX_vertex_shader_output_point_size"); +#endif /* GL_ATIX_vertex_shader_output_point_size */ +#ifdef GL_ATI_draw_buffers + GLEW_ATI_draw_buffers = glewGetExtension("GL_ATI_draw_buffers"); + if (glewExperimental || GLEW_ATI_draw_buffers) GLEW_ATI_draw_buffers = !_glewInit_GL_ATI_draw_buffers(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_draw_buffers */ +#ifdef GL_ATI_element_array + GLEW_ATI_element_array = glewGetExtension("GL_ATI_element_array"); + if (glewExperimental || GLEW_ATI_element_array) GLEW_ATI_element_array = !_glewInit_GL_ATI_element_array(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_element_array */ +#ifdef GL_ATI_envmap_bumpmap + GLEW_ATI_envmap_bumpmap = glewGetExtension("GL_ATI_envmap_bumpmap"); + if (glewExperimental || GLEW_ATI_envmap_bumpmap) GLEW_ATI_envmap_bumpmap = !_glewInit_GL_ATI_envmap_bumpmap(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_envmap_bumpmap */ +#ifdef GL_ATI_fragment_shader + GLEW_ATI_fragment_shader = glewGetExtension("GL_ATI_fragment_shader"); + if (glewExperimental || GLEW_ATI_fragment_shader) GLEW_ATI_fragment_shader = !_glewInit_GL_ATI_fragment_shader(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_fragment_shader */ +#ifdef GL_ATI_map_object_buffer + GLEW_ATI_map_object_buffer = glewGetExtension("GL_ATI_map_object_buffer"); + if (glewExperimental || GLEW_ATI_map_object_buffer) GLEW_ATI_map_object_buffer = !_glewInit_GL_ATI_map_object_buffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_map_object_buffer */ +#ifdef GL_ATI_pn_triangles + GLEW_ATI_pn_triangles = glewGetExtension("GL_ATI_pn_triangles"); + if (glewExperimental || GLEW_ATI_pn_triangles) GLEW_ATI_pn_triangles = !_glewInit_GL_ATI_pn_triangles(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_pn_triangles */ +#ifdef GL_ATI_separate_stencil + GLEW_ATI_separate_stencil = glewGetExtension("GL_ATI_separate_stencil"); + if (glewExperimental || GLEW_ATI_separate_stencil) GLEW_ATI_separate_stencil = !_glewInit_GL_ATI_separate_stencil(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_separate_stencil */ +#ifdef GL_ATI_text_fragment_shader + GLEW_ATI_text_fragment_shader = glewGetExtension("GL_ATI_text_fragment_shader"); +#endif /* GL_ATI_text_fragment_shader */ +#ifdef GL_ATI_texture_compression_3dc + GLEW_ATI_texture_compression_3dc = glewGetExtension("GL_ATI_texture_compression_3dc"); +#endif /* GL_ATI_texture_compression_3dc */ +#ifdef GL_ATI_texture_env_combine3 + GLEW_ATI_texture_env_combine3 = glewGetExtension("GL_ATI_texture_env_combine3"); +#endif /* GL_ATI_texture_env_combine3 */ +#ifdef GL_ATI_texture_float + GLEW_ATI_texture_float = glewGetExtension("GL_ATI_texture_float"); +#endif /* GL_ATI_texture_float */ +#ifdef GL_ATI_texture_mirror_once + GLEW_ATI_texture_mirror_once = glewGetExtension("GL_ATI_texture_mirror_once"); +#endif /* GL_ATI_texture_mirror_once */ +#ifdef GL_ATI_vertex_array_object + GLEW_ATI_vertex_array_object = glewGetExtension("GL_ATI_vertex_array_object"); + if (glewExperimental || GLEW_ATI_vertex_array_object) GLEW_ATI_vertex_array_object = !_glewInit_GL_ATI_vertex_array_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_vertex_array_object */ +#ifdef GL_ATI_vertex_attrib_array_object + GLEW_ATI_vertex_attrib_array_object = glewGetExtension("GL_ATI_vertex_attrib_array_object"); + if (glewExperimental || GLEW_ATI_vertex_attrib_array_object) GLEW_ATI_vertex_attrib_array_object = !_glewInit_GL_ATI_vertex_attrib_array_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_vertex_attrib_array_object */ +#ifdef GL_ATI_vertex_streams + GLEW_ATI_vertex_streams = glewGetExtension("GL_ATI_vertex_streams"); + if (glewExperimental || GLEW_ATI_vertex_streams) GLEW_ATI_vertex_streams = !_glewInit_GL_ATI_vertex_streams(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_ATI_vertex_streams */ +#ifdef GL_EXT_422_pixels + GLEW_EXT_422_pixels = glewGetExtension("GL_EXT_422_pixels"); +#endif /* GL_EXT_422_pixels */ +#ifdef GL_EXT_Cg_shader + GLEW_EXT_Cg_shader = glewGetExtension("GL_EXT_Cg_shader"); +#endif /* GL_EXT_Cg_shader */ +#ifdef GL_EXT_abgr + GLEW_EXT_abgr = glewGetExtension("GL_EXT_abgr"); +#endif /* GL_EXT_abgr */ +#ifdef GL_EXT_bgra + GLEW_EXT_bgra = glewGetExtension("GL_EXT_bgra"); +#endif /* GL_EXT_bgra */ +#ifdef GL_EXT_blend_color + GLEW_EXT_blend_color = glewGetExtension("GL_EXT_blend_color"); + if (glewExperimental || GLEW_EXT_blend_color) GLEW_EXT_blend_color = !_glewInit_GL_EXT_blend_color(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_blend_color */ +#ifdef GL_EXT_blend_equation_separate + GLEW_EXT_blend_equation_separate = glewGetExtension("GL_EXT_blend_equation_separate"); + if (glewExperimental || GLEW_EXT_blend_equation_separate) GLEW_EXT_blend_equation_separate = !_glewInit_GL_EXT_blend_equation_separate(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_blend_equation_separate */ +#ifdef GL_EXT_blend_func_separate + GLEW_EXT_blend_func_separate = glewGetExtension("GL_EXT_blend_func_separate"); + if (glewExperimental || GLEW_EXT_blend_func_separate) GLEW_EXT_blend_func_separate = !_glewInit_GL_EXT_blend_func_separate(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_blend_func_separate */ +#ifdef GL_EXT_blend_logic_op + GLEW_EXT_blend_logic_op = glewGetExtension("GL_EXT_blend_logic_op"); +#endif /* GL_EXT_blend_logic_op */ +#ifdef GL_EXT_blend_minmax + GLEW_EXT_blend_minmax = glewGetExtension("GL_EXT_blend_minmax"); + if (glewExperimental || GLEW_EXT_blend_minmax) GLEW_EXT_blend_minmax = !_glewInit_GL_EXT_blend_minmax(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_blend_minmax */ +#ifdef GL_EXT_blend_subtract + GLEW_EXT_blend_subtract = glewGetExtension("GL_EXT_blend_subtract"); +#endif /* GL_EXT_blend_subtract */ +#ifdef GL_EXT_clip_volume_hint + GLEW_EXT_clip_volume_hint = glewGetExtension("GL_EXT_clip_volume_hint"); +#endif /* GL_EXT_clip_volume_hint */ +#ifdef GL_EXT_cmyka + GLEW_EXT_cmyka = glewGetExtension("GL_EXT_cmyka"); +#endif /* GL_EXT_cmyka */ +#ifdef GL_EXT_color_subtable + GLEW_EXT_color_subtable = glewGetExtension("GL_EXT_color_subtable"); + if (glewExperimental || GLEW_EXT_color_subtable) GLEW_EXT_color_subtable = !_glewInit_GL_EXT_color_subtable(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_color_subtable */ +#ifdef GL_EXT_compiled_vertex_array + GLEW_EXT_compiled_vertex_array = glewGetExtension("GL_EXT_compiled_vertex_array"); + if (glewExperimental || GLEW_EXT_compiled_vertex_array) GLEW_EXT_compiled_vertex_array = !_glewInit_GL_EXT_compiled_vertex_array(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_compiled_vertex_array */ +#ifdef GL_EXT_convolution + GLEW_EXT_convolution = glewGetExtension("GL_EXT_convolution"); + if (glewExperimental || GLEW_EXT_convolution) GLEW_EXT_convolution = !_glewInit_GL_EXT_convolution(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_convolution */ +#ifdef GL_EXT_coordinate_frame + GLEW_EXT_coordinate_frame = glewGetExtension("GL_EXT_coordinate_frame"); + if (glewExperimental || GLEW_EXT_coordinate_frame) GLEW_EXT_coordinate_frame = !_glewInit_GL_EXT_coordinate_frame(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_coordinate_frame */ +#ifdef GL_EXT_copy_texture + GLEW_EXT_copy_texture = glewGetExtension("GL_EXT_copy_texture"); + if (glewExperimental || GLEW_EXT_copy_texture) GLEW_EXT_copy_texture = !_glewInit_GL_EXT_copy_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_copy_texture */ +#ifdef GL_EXT_cull_vertex + GLEW_EXT_cull_vertex = glewGetExtension("GL_EXT_cull_vertex"); + if (glewExperimental || GLEW_EXT_cull_vertex) GLEW_EXT_cull_vertex = !_glewInit_GL_EXT_cull_vertex(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_cull_vertex */ +#ifdef GL_EXT_depth_bounds_test + GLEW_EXT_depth_bounds_test = glewGetExtension("GL_EXT_depth_bounds_test"); + if (glewExperimental || GLEW_EXT_depth_bounds_test) GLEW_EXT_depth_bounds_test = !_glewInit_GL_EXT_depth_bounds_test(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_depth_bounds_test */ +#ifdef GL_EXT_draw_range_elements + GLEW_EXT_draw_range_elements = glewGetExtension("GL_EXT_draw_range_elements"); + if (glewExperimental || GLEW_EXT_draw_range_elements) GLEW_EXT_draw_range_elements = !_glewInit_GL_EXT_draw_range_elements(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_draw_range_elements */ +#ifdef GL_EXT_fog_coord + GLEW_EXT_fog_coord = glewGetExtension("GL_EXT_fog_coord"); + if (glewExperimental || GLEW_EXT_fog_coord) GLEW_EXT_fog_coord = !_glewInit_GL_EXT_fog_coord(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_fog_coord */ +#ifdef GL_EXT_fragment_lighting + GLEW_EXT_fragment_lighting = glewGetExtension("GL_EXT_fragment_lighting"); + if (glewExperimental || GLEW_EXT_fragment_lighting) GLEW_EXT_fragment_lighting = !_glewInit_GL_EXT_fragment_lighting(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_fragment_lighting */ +#ifdef GL_EXT_framebuffer_blit + GLEW_EXT_framebuffer_blit = glewGetExtension("GL_EXT_framebuffer_blit"); + if (glewExperimental || GLEW_EXT_framebuffer_blit) GLEW_EXT_framebuffer_blit = !_glewInit_GL_EXT_framebuffer_blit(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_framebuffer_blit */ +#ifdef GL_EXT_framebuffer_multisample + GLEW_EXT_framebuffer_multisample = glewGetExtension("GL_EXT_framebuffer_multisample"); + if (glewExperimental || GLEW_EXT_framebuffer_multisample) GLEW_EXT_framebuffer_multisample = !_glewInit_GL_EXT_framebuffer_multisample(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_framebuffer_multisample */ +#ifdef GL_EXT_framebuffer_object + GLEW_EXT_framebuffer_object = glewGetExtension("GL_EXT_framebuffer_object"); + if (glewExperimental || GLEW_EXT_framebuffer_object) GLEW_EXT_framebuffer_object = !_glewInit_GL_EXT_framebuffer_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_framebuffer_object */ +#ifdef GL_EXT_histogram + GLEW_EXT_histogram = glewGetExtension("GL_EXT_histogram"); + if (glewExperimental || GLEW_EXT_histogram) GLEW_EXT_histogram = !_glewInit_GL_EXT_histogram(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_histogram */ +#ifdef GL_EXT_index_array_formats + GLEW_EXT_index_array_formats = glewGetExtension("GL_EXT_index_array_formats"); +#endif /* GL_EXT_index_array_formats */ +#ifdef GL_EXT_index_func + GLEW_EXT_index_func = glewGetExtension("GL_EXT_index_func"); + if (glewExperimental || GLEW_EXT_index_func) GLEW_EXT_index_func = !_glewInit_GL_EXT_index_func(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_index_func */ +#ifdef GL_EXT_index_material + GLEW_EXT_index_material = glewGetExtension("GL_EXT_index_material"); + if (glewExperimental || GLEW_EXT_index_material) GLEW_EXT_index_material = !_glewInit_GL_EXT_index_material(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_index_material */ +#ifdef GL_EXT_index_texture + GLEW_EXT_index_texture = glewGetExtension("GL_EXT_index_texture"); +#endif /* GL_EXT_index_texture */ +#ifdef GL_EXT_light_texture + GLEW_EXT_light_texture = glewGetExtension("GL_EXT_light_texture"); + if (glewExperimental || GLEW_EXT_light_texture) GLEW_EXT_light_texture = !_glewInit_GL_EXT_light_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_light_texture */ +#ifdef GL_EXT_misc_attribute + GLEW_EXT_misc_attribute = glewGetExtension("GL_EXT_misc_attribute"); +#endif /* GL_EXT_misc_attribute */ +#ifdef GL_EXT_multi_draw_arrays + GLEW_EXT_multi_draw_arrays = glewGetExtension("GL_EXT_multi_draw_arrays"); + if (glewExperimental || GLEW_EXT_multi_draw_arrays) GLEW_EXT_multi_draw_arrays = !_glewInit_GL_EXT_multi_draw_arrays(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_multi_draw_arrays */ +#ifdef GL_EXT_multisample + GLEW_EXT_multisample = glewGetExtension("GL_EXT_multisample"); + if (glewExperimental || GLEW_EXT_multisample) GLEW_EXT_multisample = !_glewInit_GL_EXT_multisample(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_multisample */ +#ifdef GL_EXT_packed_depth_stencil + GLEW_EXT_packed_depth_stencil = glewGetExtension("GL_EXT_packed_depth_stencil"); +#endif /* GL_EXT_packed_depth_stencil */ +#ifdef GL_EXT_packed_pixels + GLEW_EXT_packed_pixels = glewGetExtension("GL_EXT_packed_pixels"); +#endif /* GL_EXT_packed_pixels */ +#ifdef GL_EXT_paletted_texture + GLEW_EXT_paletted_texture = glewGetExtension("GL_EXT_paletted_texture"); + if (glewExperimental || GLEW_EXT_paletted_texture) GLEW_EXT_paletted_texture = !_glewInit_GL_EXT_paletted_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_paletted_texture */ +#ifdef GL_EXT_pixel_buffer_object + GLEW_EXT_pixel_buffer_object = glewGetExtension("GL_EXT_pixel_buffer_object"); +#endif /* GL_EXT_pixel_buffer_object */ +#ifdef GL_EXT_pixel_transform + GLEW_EXT_pixel_transform = glewGetExtension("GL_EXT_pixel_transform"); + if (glewExperimental || GLEW_EXT_pixel_transform) GLEW_EXT_pixel_transform = !_glewInit_GL_EXT_pixel_transform(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_pixel_transform */ +#ifdef GL_EXT_pixel_transform_color_table + GLEW_EXT_pixel_transform_color_table = glewGetExtension("GL_EXT_pixel_transform_color_table"); +#endif /* GL_EXT_pixel_transform_color_table */ +#ifdef GL_EXT_point_parameters + GLEW_EXT_point_parameters = glewGetExtension("GL_EXT_point_parameters"); + if (glewExperimental || GLEW_EXT_point_parameters) GLEW_EXT_point_parameters = !_glewInit_GL_EXT_point_parameters(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_point_parameters */ +#ifdef GL_EXT_polygon_offset + GLEW_EXT_polygon_offset = glewGetExtension("GL_EXT_polygon_offset"); + if (glewExperimental || GLEW_EXT_polygon_offset) GLEW_EXT_polygon_offset = !_glewInit_GL_EXT_polygon_offset(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_polygon_offset */ +#ifdef GL_EXT_rescale_normal + GLEW_EXT_rescale_normal = glewGetExtension("GL_EXT_rescale_normal"); +#endif /* GL_EXT_rescale_normal */ +#ifdef GL_EXT_scene_marker + GLEW_EXT_scene_marker = glewGetExtension("GL_EXT_scene_marker"); + if (glewExperimental || GLEW_EXT_scene_marker) GLEW_EXT_scene_marker = !_glewInit_GL_EXT_scene_marker(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_scene_marker */ +#ifdef GL_EXT_secondary_color + GLEW_EXT_secondary_color = glewGetExtension("GL_EXT_secondary_color"); + if (glewExperimental || GLEW_EXT_secondary_color) GLEW_EXT_secondary_color = !_glewInit_GL_EXT_secondary_color(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_secondary_color */ +#ifdef GL_EXT_separate_specular_color + GLEW_EXT_separate_specular_color = glewGetExtension("GL_EXT_separate_specular_color"); +#endif /* GL_EXT_separate_specular_color */ +#ifdef GL_EXT_shadow_funcs + GLEW_EXT_shadow_funcs = glewGetExtension("GL_EXT_shadow_funcs"); +#endif /* GL_EXT_shadow_funcs */ +#ifdef GL_EXT_shared_texture_palette + GLEW_EXT_shared_texture_palette = glewGetExtension("GL_EXT_shared_texture_palette"); +#endif /* GL_EXT_shared_texture_palette */ +#ifdef GL_EXT_stencil_clear_tag + GLEW_EXT_stencil_clear_tag = glewGetExtension("GL_EXT_stencil_clear_tag"); +#endif /* GL_EXT_stencil_clear_tag */ +#ifdef GL_EXT_stencil_two_side + GLEW_EXT_stencil_two_side = glewGetExtension("GL_EXT_stencil_two_side"); + if (glewExperimental || GLEW_EXT_stencil_two_side) GLEW_EXT_stencil_two_side = !_glewInit_GL_EXT_stencil_two_side(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_stencil_two_side */ +#ifdef GL_EXT_stencil_wrap + GLEW_EXT_stencil_wrap = glewGetExtension("GL_EXT_stencil_wrap"); +#endif /* GL_EXT_stencil_wrap */ +#ifdef GL_EXT_subtexture + GLEW_EXT_subtexture = glewGetExtension("GL_EXT_subtexture"); + if (glewExperimental || GLEW_EXT_subtexture) GLEW_EXT_subtexture = !_glewInit_GL_EXT_subtexture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_subtexture */ +#ifdef GL_EXT_texture + GLEW_EXT_texture = glewGetExtension("GL_EXT_texture"); +#endif /* GL_EXT_texture */ +#ifdef GL_EXT_texture3D + GLEW_EXT_texture3D = glewGetExtension("GL_EXT_texture3D"); + if (glewExperimental || GLEW_EXT_texture3D) GLEW_EXT_texture3D = !_glewInit_GL_EXT_texture3D(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_texture3D */ +#ifdef GL_EXT_texture_compression_dxt1 + GLEW_EXT_texture_compression_dxt1 = glewGetExtension("GL_EXT_texture_compression_dxt1"); +#endif /* GL_EXT_texture_compression_dxt1 */ +#ifdef GL_EXT_texture_compression_s3tc + GLEW_EXT_texture_compression_s3tc = glewGetExtension("GL_EXT_texture_compression_s3tc"); +#endif /* GL_EXT_texture_compression_s3tc */ +#ifdef GL_EXT_texture_cube_map + GLEW_EXT_texture_cube_map = glewGetExtension("GL_EXT_texture_cube_map"); +#endif /* GL_EXT_texture_cube_map */ +#ifdef GL_EXT_texture_edge_clamp + GLEW_EXT_texture_edge_clamp = glewGetExtension("GL_EXT_texture_edge_clamp"); +#endif /* GL_EXT_texture_edge_clamp */ +#ifdef GL_EXT_texture_env + GLEW_EXT_texture_env = glewGetExtension("GL_EXT_texture_env"); +#endif /* GL_EXT_texture_env */ +#ifdef GL_EXT_texture_env_add + GLEW_EXT_texture_env_add = glewGetExtension("GL_EXT_texture_env_add"); +#endif /* GL_EXT_texture_env_add */ +#ifdef GL_EXT_texture_env_combine + GLEW_EXT_texture_env_combine = glewGetExtension("GL_EXT_texture_env_combine"); +#endif /* GL_EXT_texture_env_combine */ +#ifdef GL_EXT_texture_env_dot3 + GLEW_EXT_texture_env_dot3 = glewGetExtension("GL_EXT_texture_env_dot3"); +#endif /* GL_EXT_texture_env_dot3 */ +#ifdef GL_EXT_texture_filter_anisotropic + GLEW_EXT_texture_filter_anisotropic = glewGetExtension("GL_EXT_texture_filter_anisotropic"); +#endif /* GL_EXT_texture_filter_anisotropic */ +#ifdef GL_EXT_texture_lod_bias + GLEW_EXT_texture_lod_bias = glewGetExtension("GL_EXT_texture_lod_bias"); +#endif /* GL_EXT_texture_lod_bias */ +#ifdef GL_EXT_texture_mirror_clamp + GLEW_EXT_texture_mirror_clamp = glewGetExtension("GL_EXT_texture_mirror_clamp"); +#endif /* GL_EXT_texture_mirror_clamp */ +#ifdef GL_EXT_texture_object + GLEW_EXT_texture_object = glewGetExtension("GL_EXT_texture_object"); + if (glewExperimental || GLEW_EXT_texture_object) GLEW_EXT_texture_object = !_glewInit_GL_EXT_texture_object(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_texture_object */ +#ifdef GL_EXT_texture_perturb_normal + GLEW_EXT_texture_perturb_normal = glewGetExtension("GL_EXT_texture_perturb_normal"); + if (glewExperimental || GLEW_EXT_texture_perturb_normal) GLEW_EXT_texture_perturb_normal = !_glewInit_GL_EXT_texture_perturb_normal(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_texture_perturb_normal */ +#ifdef GL_EXT_texture_rectangle + GLEW_EXT_texture_rectangle = glewGetExtension("GL_EXT_texture_rectangle"); +#endif /* GL_EXT_texture_rectangle */ +#ifdef GL_EXT_texture_sRGB + GLEW_EXT_texture_sRGB = glewGetExtension("GL_EXT_texture_sRGB"); +#endif /* GL_EXT_texture_sRGB */ +#ifdef GL_EXT_vertex_array + GLEW_EXT_vertex_array = glewGetExtension("GL_EXT_vertex_array"); + if (glewExperimental || GLEW_EXT_vertex_array) GLEW_EXT_vertex_array = !_glewInit_GL_EXT_vertex_array(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_vertex_array */ +#ifdef GL_EXT_vertex_shader + GLEW_EXT_vertex_shader = glewGetExtension("GL_EXT_vertex_shader"); + if (glewExperimental || GLEW_EXT_vertex_shader) GLEW_EXT_vertex_shader = !_glewInit_GL_EXT_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_vertex_shader */ +#ifdef GL_EXT_vertex_weighting + GLEW_EXT_vertex_weighting = glewGetExtension("GL_EXT_vertex_weighting"); + if (glewExperimental || GLEW_EXT_vertex_weighting) GLEW_EXT_vertex_weighting = !_glewInit_GL_EXT_vertex_weighting(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_EXT_vertex_weighting */ +#ifdef GL_GREMEDY_string_marker + GLEW_GREMEDY_string_marker = glewGetExtension("GL_GREMEDY_string_marker"); + if (glewExperimental || GLEW_GREMEDY_string_marker) GLEW_GREMEDY_string_marker = !_glewInit_GL_GREMEDY_string_marker(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_GREMEDY_string_marker */ +#ifdef GL_HP_convolution_border_modes + GLEW_HP_convolution_border_modes = glewGetExtension("GL_HP_convolution_border_modes"); +#endif /* GL_HP_convolution_border_modes */ +#ifdef GL_HP_image_transform + GLEW_HP_image_transform = glewGetExtension("GL_HP_image_transform"); + if (glewExperimental || GLEW_HP_image_transform) GLEW_HP_image_transform = !_glewInit_GL_HP_image_transform(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_HP_image_transform */ +#ifdef GL_HP_occlusion_test + GLEW_HP_occlusion_test = glewGetExtension("GL_HP_occlusion_test"); +#endif /* GL_HP_occlusion_test */ +#ifdef GL_HP_texture_lighting + GLEW_HP_texture_lighting = glewGetExtension("GL_HP_texture_lighting"); +#endif /* GL_HP_texture_lighting */ +#ifdef GL_IBM_cull_vertex + GLEW_IBM_cull_vertex = glewGetExtension("GL_IBM_cull_vertex"); +#endif /* GL_IBM_cull_vertex */ +#ifdef GL_IBM_multimode_draw_arrays + GLEW_IBM_multimode_draw_arrays = glewGetExtension("GL_IBM_multimode_draw_arrays"); + if (glewExperimental || GLEW_IBM_multimode_draw_arrays) GLEW_IBM_multimode_draw_arrays = !_glewInit_GL_IBM_multimode_draw_arrays(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_IBM_multimode_draw_arrays */ +#ifdef GL_IBM_rasterpos_clip + GLEW_IBM_rasterpos_clip = glewGetExtension("GL_IBM_rasterpos_clip"); +#endif /* GL_IBM_rasterpos_clip */ +#ifdef GL_IBM_static_data + GLEW_IBM_static_data = glewGetExtension("GL_IBM_static_data"); +#endif /* GL_IBM_static_data */ +#ifdef GL_IBM_texture_mirrored_repeat + GLEW_IBM_texture_mirrored_repeat = glewGetExtension("GL_IBM_texture_mirrored_repeat"); +#endif /* GL_IBM_texture_mirrored_repeat */ +#ifdef GL_IBM_vertex_array_lists + GLEW_IBM_vertex_array_lists = glewGetExtension("GL_IBM_vertex_array_lists"); + if (glewExperimental || GLEW_IBM_vertex_array_lists) GLEW_IBM_vertex_array_lists = !_glewInit_GL_IBM_vertex_array_lists(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_IBM_vertex_array_lists */ +#ifdef GL_INGR_color_clamp + GLEW_INGR_color_clamp = glewGetExtension("GL_INGR_color_clamp"); +#endif /* GL_INGR_color_clamp */ +#ifdef GL_INGR_interlace_read + GLEW_INGR_interlace_read = glewGetExtension("GL_INGR_interlace_read"); +#endif /* GL_INGR_interlace_read */ +#ifdef GL_INTEL_parallel_arrays + GLEW_INTEL_parallel_arrays = glewGetExtension("GL_INTEL_parallel_arrays"); + if (glewExperimental || GLEW_INTEL_parallel_arrays) GLEW_INTEL_parallel_arrays = !_glewInit_GL_INTEL_parallel_arrays(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_INTEL_parallel_arrays */ +#ifdef GL_INTEL_texture_scissor + GLEW_INTEL_texture_scissor = glewGetExtension("GL_INTEL_texture_scissor"); + if (glewExperimental || GLEW_INTEL_texture_scissor) GLEW_INTEL_texture_scissor = !_glewInit_GL_INTEL_texture_scissor(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_INTEL_texture_scissor */ +#ifdef GL_KTX_buffer_region + GLEW_KTX_buffer_region = glewGetExtension("GL_KTX_buffer_region"); + if (glewExperimental || GLEW_KTX_buffer_region) GLEW_KTX_buffer_region = !_glewInit_GL_KTX_buffer_region(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_KTX_buffer_region */ +#ifdef GL_MESAX_texture_stack + GLEW_MESAX_texture_stack = glewGetExtension("GL_MESAX_texture_stack"); +#endif /* GL_MESAX_texture_stack */ +#ifdef GL_MESA_pack_invert + GLEW_MESA_pack_invert = glewGetExtension("GL_MESA_pack_invert"); +#endif /* GL_MESA_pack_invert */ +#ifdef GL_MESA_resize_buffers + GLEW_MESA_resize_buffers = glewGetExtension("GL_MESA_resize_buffers"); + if (glewExperimental || GLEW_MESA_resize_buffers) GLEW_MESA_resize_buffers = !_glewInit_GL_MESA_resize_buffers(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_MESA_resize_buffers */ +#ifdef GL_MESA_window_pos + GLEW_MESA_window_pos = glewGetExtension("GL_MESA_window_pos"); + if (glewExperimental || GLEW_MESA_window_pos) GLEW_MESA_window_pos = !_glewInit_GL_MESA_window_pos(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_MESA_window_pos */ +#ifdef GL_MESA_ycbcr_texture + GLEW_MESA_ycbcr_texture = glewGetExtension("GL_MESA_ycbcr_texture"); +#endif /* GL_MESA_ycbcr_texture */ +#ifdef GL_NV_blend_square + GLEW_NV_blend_square = glewGetExtension("GL_NV_blend_square"); +#endif /* GL_NV_blend_square */ +#ifdef GL_NV_copy_depth_to_color + GLEW_NV_copy_depth_to_color = glewGetExtension("GL_NV_copy_depth_to_color"); +#endif /* GL_NV_copy_depth_to_color */ +#ifdef GL_NV_depth_clamp + GLEW_NV_depth_clamp = glewGetExtension("GL_NV_depth_clamp"); +#endif /* GL_NV_depth_clamp */ +#ifdef GL_NV_evaluators + GLEW_NV_evaluators = glewGetExtension("GL_NV_evaluators"); + if (glewExperimental || GLEW_NV_evaluators) GLEW_NV_evaluators = !_glewInit_GL_NV_evaluators(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_evaluators */ +#ifdef GL_NV_fence + GLEW_NV_fence = glewGetExtension("GL_NV_fence"); + if (glewExperimental || GLEW_NV_fence) GLEW_NV_fence = !_glewInit_GL_NV_fence(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_fence */ +#ifdef GL_NV_float_buffer + GLEW_NV_float_buffer = glewGetExtension("GL_NV_float_buffer"); +#endif /* GL_NV_float_buffer */ +#ifdef GL_NV_fog_distance + GLEW_NV_fog_distance = glewGetExtension("GL_NV_fog_distance"); +#endif /* GL_NV_fog_distance */ +#ifdef GL_NV_fragment_program + GLEW_NV_fragment_program = glewGetExtension("GL_NV_fragment_program"); + if (glewExperimental || GLEW_NV_fragment_program) GLEW_NV_fragment_program = !_glewInit_GL_NV_fragment_program(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_fragment_program */ +#ifdef GL_NV_fragment_program2 + GLEW_NV_fragment_program2 = glewGetExtension("GL_NV_fragment_program2"); +#endif /* GL_NV_fragment_program2 */ +#ifdef GL_NV_fragment_program_option + GLEW_NV_fragment_program_option = glewGetExtension("GL_NV_fragment_program_option"); +#endif /* GL_NV_fragment_program_option */ +#ifdef GL_NV_half_float + GLEW_NV_half_float = glewGetExtension("GL_NV_half_float"); + if (glewExperimental || GLEW_NV_half_float) GLEW_NV_half_float = !_glewInit_GL_NV_half_float(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_half_float */ +#ifdef GL_NV_light_max_exponent + GLEW_NV_light_max_exponent = glewGetExtension("GL_NV_light_max_exponent"); +#endif /* GL_NV_light_max_exponent */ +#ifdef GL_NV_multisample_filter_hint + GLEW_NV_multisample_filter_hint = glewGetExtension("GL_NV_multisample_filter_hint"); +#endif /* GL_NV_multisample_filter_hint */ +#ifdef GL_NV_occlusion_query + GLEW_NV_occlusion_query = glewGetExtension("GL_NV_occlusion_query"); + if (glewExperimental || GLEW_NV_occlusion_query) GLEW_NV_occlusion_query = !_glewInit_GL_NV_occlusion_query(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_occlusion_query */ +#ifdef GL_NV_packed_depth_stencil + GLEW_NV_packed_depth_stencil = glewGetExtension("GL_NV_packed_depth_stencil"); +#endif /* GL_NV_packed_depth_stencil */ +#ifdef GL_NV_pixel_data_range + GLEW_NV_pixel_data_range = glewGetExtension("GL_NV_pixel_data_range"); + if (glewExperimental || GLEW_NV_pixel_data_range) GLEW_NV_pixel_data_range = !_glewInit_GL_NV_pixel_data_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_pixel_data_range */ +#ifdef GL_NV_point_sprite + GLEW_NV_point_sprite = glewGetExtension("GL_NV_point_sprite"); + if (glewExperimental || GLEW_NV_point_sprite) GLEW_NV_point_sprite = !_glewInit_GL_NV_point_sprite(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_point_sprite */ +#ifdef GL_NV_primitive_restart + GLEW_NV_primitive_restart = glewGetExtension("GL_NV_primitive_restart"); + if (glewExperimental || GLEW_NV_primitive_restart) GLEW_NV_primitive_restart = !_glewInit_GL_NV_primitive_restart(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_primitive_restart */ +#ifdef GL_NV_register_combiners + GLEW_NV_register_combiners = glewGetExtension("GL_NV_register_combiners"); + if (glewExperimental || GLEW_NV_register_combiners) GLEW_NV_register_combiners = !_glewInit_GL_NV_register_combiners(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_register_combiners */ +#ifdef GL_NV_register_combiners2 + GLEW_NV_register_combiners2 = glewGetExtension("GL_NV_register_combiners2"); + if (glewExperimental || GLEW_NV_register_combiners2) GLEW_NV_register_combiners2 = !_glewInit_GL_NV_register_combiners2(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_register_combiners2 */ +#ifdef GL_NV_texgen_emboss + GLEW_NV_texgen_emboss = glewGetExtension("GL_NV_texgen_emboss"); +#endif /* GL_NV_texgen_emboss */ +#ifdef GL_NV_texgen_reflection + GLEW_NV_texgen_reflection = glewGetExtension("GL_NV_texgen_reflection"); +#endif /* GL_NV_texgen_reflection */ +#ifdef GL_NV_texture_compression_vtc + GLEW_NV_texture_compression_vtc = glewGetExtension("GL_NV_texture_compression_vtc"); +#endif /* GL_NV_texture_compression_vtc */ +#ifdef GL_NV_texture_env_combine4 + GLEW_NV_texture_env_combine4 = glewGetExtension("GL_NV_texture_env_combine4"); +#endif /* GL_NV_texture_env_combine4 */ +#ifdef GL_NV_texture_expand_normal + GLEW_NV_texture_expand_normal = glewGetExtension("GL_NV_texture_expand_normal"); +#endif /* GL_NV_texture_expand_normal */ +#ifdef GL_NV_texture_rectangle + GLEW_NV_texture_rectangle = glewGetExtension("GL_NV_texture_rectangle"); +#endif /* GL_NV_texture_rectangle */ +#ifdef GL_NV_texture_shader + GLEW_NV_texture_shader = glewGetExtension("GL_NV_texture_shader"); +#endif /* GL_NV_texture_shader */ +#ifdef GL_NV_texture_shader2 + GLEW_NV_texture_shader2 = glewGetExtension("GL_NV_texture_shader2"); +#endif /* GL_NV_texture_shader2 */ +#ifdef GL_NV_texture_shader3 + GLEW_NV_texture_shader3 = glewGetExtension("GL_NV_texture_shader3"); +#endif /* GL_NV_texture_shader3 */ +#ifdef GL_NV_vertex_array_range + GLEW_NV_vertex_array_range = glewGetExtension("GL_NV_vertex_array_range"); + if (glewExperimental || GLEW_NV_vertex_array_range) GLEW_NV_vertex_array_range = !_glewInit_GL_NV_vertex_array_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_vertex_array_range */ +#ifdef GL_NV_vertex_array_range2 + GLEW_NV_vertex_array_range2 = glewGetExtension("GL_NV_vertex_array_range2"); +#endif /* GL_NV_vertex_array_range2 */ +#ifdef GL_NV_vertex_program + GLEW_NV_vertex_program = glewGetExtension("GL_NV_vertex_program"); + if (glewExperimental || GLEW_NV_vertex_program) GLEW_NV_vertex_program = !_glewInit_GL_NV_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_NV_vertex_program */ +#ifdef GL_NV_vertex_program1_1 + GLEW_NV_vertex_program1_1 = glewGetExtension("GL_NV_vertex_program1_1"); +#endif /* GL_NV_vertex_program1_1 */ +#ifdef GL_NV_vertex_program2 + GLEW_NV_vertex_program2 = glewGetExtension("GL_NV_vertex_program2"); +#endif /* GL_NV_vertex_program2 */ +#ifdef GL_NV_vertex_program2_option + GLEW_NV_vertex_program2_option = glewGetExtension("GL_NV_vertex_program2_option"); +#endif /* GL_NV_vertex_program2_option */ +#ifdef GL_NV_vertex_program3 + GLEW_NV_vertex_program3 = glewGetExtension("GL_NV_vertex_program3"); +#endif /* GL_NV_vertex_program3 */ +#ifdef GL_OML_interlace + GLEW_OML_interlace = glewGetExtension("GL_OML_interlace"); +#endif /* GL_OML_interlace */ +#ifdef GL_OML_resample + GLEW_OML_resample = glewGetExtension("GL_OML_resample"); +#endif /* GL_OML_resample */ +#ifdef GL_OML_subsample + GLEW_OML_subsample = glewGetExtension("GL_OML_subsample"); +#endif /* GL_OML_subsample */ +#ifdef GL_PGI_misc_hints + GLEW_PGI_misc_hints = glewGetExtension("GL_PGI_misc_hints"); +#endif /* GL_PGI_misc_hints */ +#ifdef GL_PGI_vertex_hints + GLEW_PGI_vertex_hints = glewGetExtension("GL_PGI_vertex_hints"); +#endif /* GL_PGI_vertex_hints */ +#ifdef GL_REND_screen_coordinates + GLEW_REND_screen_coordinates = glewGetExtension("GL_REND_screen_coordinates"); +#endif /* GL_REND_screen_coordinates */ +#ifdef GL_S3_s3tc + GLEW_S3_s3tc = glewGetExtension("GL_S3_s3tc"); +#endif /* GL_S3_s3tc */ +#ifdef GL_SGIS_color_range + GLEW_SGIS_color_range = glewGetExtension("GL_SGIS_color_range"); +#endif /* GL_SGIS_color_range */ +#ifdef GL_SGIS_detail_texture + GLEW_SGIS_detail_texture = glewGetExtension("GL_SGIS_detail_texture"); + if (glewExperimental || GLEW_SGIS_detail_texture) GLEW_SGIS_detail_texture = !_glewInit_GL_SGIS_detail_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_detail_texture */ +#ifdef GL_SGIS_fog_function + GLEW_SGIS_fog_function = glewGetExtension("GL_SGIS_fog_function"); + if (glewExperimental || GLEW_SGIS_fog_function) GLEW_SGIS_fog_function = !_glewInit_GL_SGIS_fog_function(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_fog_function */ +#ifdef GL_SGIS_generate_mipmap + GLEW_SGIS_generate_mipmap = glewGetExtension("GL_SGIS_generate_mipmap"); +#endif /* GL_SGIS_generate_mipmap */ +#ifdef GL_SGIS_multisample + GLEW_SGIS_multisample = glewGetExtension("GL_SGIS_multisample"); + if (glewExperimental || GLEW_SGIS_multisample) GLEW_SGIS_multisample = !_glewInit_GL_SGIS_multisample(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_multisample */ +#ifdef GL_SGIS_pixel_texture + GLEW_SGIS_pixel_texture = glewGetExtension("GL_SGIS_pixel_texture"); +#endif /* GL_SGIS_pixel_texture */ +#ifdef GL_SGIS_sharpen_texture + GLEW_SGIS_sharpen_texture = glewGetExtension("GL_SGIS_sharpen_texture"); + if (glewExperimental || GLEW_SGIS_sharpen_texture) GLEW_SGIS_sharpen_texture = !_glewInit_GL_SGIS_sharpen_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_sharpen_texture */ +#ifdef GL_SGIS_texture4D + GLEW_SGIS_texture4D = glewGetExtension("GL_SGIS_texture4D"); + if (glewExperimental || GLEW_SGIS_texture4D) GLEW_SGIS_texture4D = !_glewInit_GL_SGIS_texture4D(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_texture4D */ +#ifdef GL_SGIS_texture_border_clamp + GLEW_SGIS_texture_border_clamp = glewGetExtension("GL_SGIS_texture_border_clamp"); +#endif /* GL_SGIS_texture_border_clamp */ +#ifdef GL_SGIS_texture_edge_clamp + GLEW_SGIS_texture_edge_clamp = glewGetExtension("GL_SGIS_texture_edge_clamp"); +#endif /* GL_SGIS_texture_edge_clamp */ +#ifdef GL_SGIS_texture_filter4 + GLEW_SGIS_texture_filter4 = glewGetExtension("GL_SGIS_texture_filter4"); + if (glewExperimental || GLEW_SGIS_texture_filter4) GLEW_SGIS_texture_filter4 = !_glewInit_GL_SGIS_texture_filter4(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIS_texture_filter4 */ +#ifdef GL_SGIS_texture_lod + GLEW_SGIS_texture_lod = glewGetExtension("GL_SGIS_texture_lod"); +#endif /* GL_SGIS_texture_lod */ +#ifdef GL_SGIS_texture_select + GLEW_SGIS_texture_select = glewGetExtension("GL_SGIS_texture_select"); +#endif /* GL_SGIS_texture_select */ +#ifdef GL_SGIX_async + GLEW_SGIX_async = glewGetExtension("GL_SGIX_async"); + if (glewExperimental || GLEW_SGIX_async) GLEW_SGIX_async = !_glewInit_GL_SGIX_async(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_async */ +#ifdef GL_SGIX_async_histogram + GLEW_SGIX_async_histogram = glewGetExtension("GL_SGIX_async_histogram"); +#endif /* GL_SGIX_async_histogram */ +#ifdef GL_SGIX_async_pixel + GLEW_SGIX_async_pixel = glewGetExtension("GL_SGIX_async_pixel"); +#endif /* GL_SGIX_async_pixel */ +#ifdef GL_SGIX_blend_alpha_minmax + GLEW_SGIX_blend_alpha_minmax = glewGetExtension("GL_SGIX_blend_alpha_minmax"); +#endif /* GL_SGIX_blend_alpha_minmax */ +#ifdef GL_SGIX_clipmap + GLEW_SGIX_clipmap = glewGetExtension("GL_SGIX_clipmap"); +#endif /* GL_SGIX_clipmap */ +#ifdef GL_SGIX_depth_texture + GLEW_SGIX_depth_texture = glewGetExtension("GL_SGIX_depth_texture"); +#endif /* GL_SGIX_depth_texture */ +#ifdef GL_SGIX_flush_raster + GLEW_SGIX_flush_raster = glewGetExtension("GL_SGIX_flush_raster"); + if (glewExperimental || GLEW_SGIX_flush_raster) GLEW_SGIX_flush_raster = !_glewInit_GL_SGIX_flush_raster(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_flush_raster */ +#ifdef GL_SGIX_fog_offset + GLEW_SGIX_fog_offset = glewGetExtension("GL_SGIX_fog_offset"); +#endif /* GL_SGIX_fog_offset */ +#ifdef GL_SGIX_fog_texture + GLEW_SGIX_fog_texture = glewGetExtension("GL_SGIX_fog_texture"); + if (glewExperimental || GLEW_SGIX_fog_texture) GLEW_SGIX_fog_texture = !_glewInit_GL_SGIX_fog_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_fog_texture */ +#ifdef GL_SGIX_fragment_specular_lighting + GLEW_SGIX_fragment_specular_lighting = glewGetExtension("GL_SGIX_fragment_specular_lighting"); + if (glewExperimental || GLEW_SGIX_fragment_specular_lighting) GLEW_SGIX_fragment_specular_lighting = !_glewInit_GL_SGIX_fragment_specular_lighting(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_fragment_specular_lighting */ +#ifdef GL_SGIX_framezoom + GLEW_SGIX_framezoom = glewGetExtension("GL_SGIX_framezoom"); + if (glewExperimental || GLEW_SGIX_framezoom) GLEW_SGIX_framezoom = !_glewInit_GL_SGIX_framezoom(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_framezoom */ +#ifdef GL_SGIX_interlace + GLEW_SGIX_interlace = glewGetExtension("GL_SGIX_interlace"); +#endif /* GL_SGIX_interlace */ +#ifdef GL_SGIX_ir_instrument1 + GLEW_SGIX_ir_instrument1 = glewGetExtension("GL_SGIX_ir_instrument1"); +#endif /* GL_SGIX_ir_instrument1 */ +#ifdef GL_SGIX_list_priority + GLEW_SGIX_list_priority = glewGetExtension("GL_SGIX_list_priority"); +#endif /* GL_SGIX_list_priority */ +#ifdef GL_SGIX_pixel_texture + GLEW_SGIX_pixel_texture = glewGetExtension("GL_SGIX_pixel_texture"); + if (glewExperimental || GLEW_SGIX_pixel_texture) GLEW_SGIX_pixel_texture = !_glewInit_GL_SGIX_pixel_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_pixel_texture */ +#ifdef GL_SGIX_pixel_texture_bits + GLEW_SGIX_pixel_texture_bits = glewGetExtension("GL_SGIX_pixel_texture_bits"); +#endif /* GL_SGIX_pixel_texture_bits */ +#ifdef GL_SGIX_reference_plane + GLEW_SGIX_reference_plane = glewGetExtension("GL_SGIX_reference_plane"); + if (glewExperimental || GLEW_SGIX_reference_plane) GLEW_SGIX_reference_plane = !_glewInit_GL_SGIX_reference_plane(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_reference_plane */ +#ifdef GL_SGIX_resample + GLEW_SGIX_resample = glewGetExtension("GL_SGIX_resample"); +#endif /* GL_SGIX_resample */ +#ifdef GL_SGIX_shadow + GLEW_SGIX_shadow = glewGetExtension("GL_SGIX_shadow"); +#endif /* GL_SGIX_shadow */ +#ifdef GL_SGIX_shadow_ambient + GLEW_SGIX_shadow_ambient = glewGetExtension("GL_SGIX_shadow_ambient"); +#endif /* GL_SGIX_shadow_ambient */ +#ifdef GL_SGIX_sprite + GLEW_SGIX_sprite = glewGetExtension("GL_SGIX_sprite"); + if (glewExperimental || GLEW_SGIX_sprite) GLEW_SGIX_sprite = !_glewInit_GL_SGIX_sprite(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_sprite */ +#ifdef GL_SGIX_tag_sample_buffer + GLEW_SGIX_tag_sample_buffer = glewGetExtension("GL_SGIX_tag_sample_buffer"); + if (glewExperimental || GLEW_SGIX_tag_sample_buffer) GLEW_SGIX_tag_sample_buffer = !_glewInit_GL_SGIX_tag_sample_buffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGIX_tag_sample_buffer */ +#ifdef GL_SGIX_texture_add_env + GLEW_SGIX_texture_add_env = glewGetExtension("GL_SGIX_texture_add_env"); +#endif /* GL_SGIX_texture_add_env */ +#ifdef GL_SGIX_texture_coordinate_clamp + GLEW_SGIX_texture_coordinate_clamp = glewGetExtension("GL_SGIX_texture_coordinate_clamp"); +#endif /* GL_SGIX_texture_coordinate_clamp */ +#ifdef GL_SGIX_texture_lod_bias + GLEW_SGIX_texture_lod_bias = glewGetExtension("GL_SGIX_texture_lod_bias"); +#endif /* GL_SGIX_texture_lod_bias */ +#ifdef GL_SGIX_texture_multi_buffer + GLEW_SGIX_texture_multi_buffer = glewGetExtension("GL_SGIX_texture_multi_buffer"); +#endif /* GL_SGIX_texture_multi_buffer */ +#ifdef GL_SGIX_texture_range + GLEW_SGIX_texture_range = glewGetExtension("GL_SGIX_texture_range"); +#endif /* GL_SGIX_texture_range */ +#ifdef GL_SGIX_texture_scale_bias + GLEW_SGIX_texture_scale_bias = glewGetExtension("GL_SGIX_texture_scale_bias"); +#endif /* GL_SGIX_texture_scale_bias */ +#ifdef GL_SGIX_vertex_preclip + GLEW_SGIX_vertex_preclip = glewGetExtension("GL_SGIX_vertex_preclip"); +#endif /* GL_SGIX_vertex_preclip */ +#ifdef GL_SGIX_vertex_preclip_hint + GLEW_SGIX_vertex_preclip_hint = glewGetExtension("GL_SGIX_vertex_preclip_hint"); +#endif /* GL_SGIX_vertex_preclip_hint */ +#ifdef GL_SGIX_ycrcb + GLEW_SGIX_ycrcb = glewGetExtension("GL_SGIX_ycrcb"); +#endif /* GL_SGIX_ycrcb */ +#ifdef GL_SGI_color_matrix + GLEW_SGI_color_matrix = glewGetExtension("GL_SGI_color_matrix"); +#endif /* GL_SGI_color_matrix */ +#ifdef GL_SGI_color_table + GLEW_SGI_color_table = glewGetExtension("GL_SGI_color_table"); + if (glewExperimental || GLEW_SGI_color_table) GLEW_SGI_color_table = !_glewInit_GL_SGI_color_table(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SGI_color_table */ +#ifdef GL_SGI_texture_color_table + GLEW_SGI_texture_color_table = glewGetExtension("GL_SGI_texture_color_table"); +#endif /* GL_SGI_texture_color_table */ +#ifdef GL_SUNX_constant_data + GLEW_SUNX_constant_data = glewGetExtension("GL_SUNX_constant_data"); + if (glewExperimental || GLEW_SUNX_constant_data) GLEW_SUNX_constant_data = !_glewInit_GL_SUNX_constant_data(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SUNX_constant_data */ +#ifdef GL_SUN_convolution_border_modes + GLEW_SUN_convolution_border_modes = glewGetExtension("GL_SUN_convolution_border_modes"); +#endif /* GL_SUN_convolution_border_modes */ +#ifdef GL_SUN_global_alpha + GLEW_SUN_global_alpha = glewGetExtension("GL_SUN_global_alpha"); + if (glewExperimental || GLEW_SUN_global_alpha) GLEW_SUN_global_alpha = !_glewInit_GL_SUN_global_alpha(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SUN_global_alpha */ +#ifdef GL_SUN_mesh_array + GLEW_SUN_mesh_array = glewGetExtension("GL_SUN_mesh_array"); +#endif /* GL_SUN_mesh_array */ +#ifdef GL_SUN_read_video_pixels + GLEW_SUN_read_video_pixels = glewGetExtension("GL_SUN_read_video_pixels"); + if (glewExperimental || GLEW_SUN_read_video_pixels) GLEW_SUN_read_video_pixels = !_glewInit_GL_SUN_read_video_pixels(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SUN_read_video_pixels */ +#ifdef GL_SUN_slice_accum + GLEW_SUN_slice_accum = glewGetExtension("GL_SUN_slice_accum"); +#endif /* GL_SUN_slice_accum */ +#ifdef GL_SUN_triangle_list + GLEW_SUN_triangle_list = glewGetExtension("GL_SUN_triangle_list"); + if (glewExperimental || GLEW_SUN_triangle_list) GLEW_SUN_triangle_list = !_glewInit_GL_SUN_triangle_list(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SUN_triangle_list */ +#ifdef GL_SUN_vertex + GLEW_SUN_vertex = glewGetExtension("GL_SUN_vertex"); + if (glewExperimental || GLEW_SUN_vertex) GLEW_SUN_vertex = !_glewInit_GL_SUN_vertex(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_SUN_vertex */ +#ifdef GL_WIN_phong_shading + GLEW_WIN_phong_shading = glewGetExtension("GL_WIN_phong_shading"); +#endif /* GL_WIN_phong_shading */ +#ifdef GL_WIN_specular_fog + GLEW_WIN_specular_fog = glewGetExtension("GL_WIN_specular_fog"); +#endif /* GL_WIN_specular_fog */ +#ifdef GL_WIN_swap_hint + GLEW_WIN_swap_hint = glewGetExtension("GL_WIN_swap_hint"); + if (glewExperimental || GLEW_WIN_swap_hint) GLEW_WIN_swap_hint = !_glewInit_GL_WIN_swap_hint(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GL_WIN_swap_hint */ + + return GLEW_OK; +} + + +#if defined(_WIN32) + +#if !defined(GLEW_MX) + +PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL = NULL; + +PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB = NULL; +PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB = NULL; +PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB = NULL; +PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB = NULL; + +PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB = NULL; + +PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB = NULL; +PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB = NULL; + +PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB = NULL; +PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB = NULL; +PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB = NULL; +PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB = NULL; +PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB = NULL; + +PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB = NULL; +PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB = NULL; +PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB = NULL; + +PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB = NULL; +PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB = NULL; +PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB = NULL; + +PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT = NULL; +PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT = NULL; +PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT = NULL; +PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT = NULL; + +PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT = NULL; + +PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT = NULL; +PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT = NULL; + +PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT = NULL; +PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT = NULL; +PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT = NULL; +PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT = NULL; +PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT = NULL; + +PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT = NULL; +PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT = NULL; +PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT = NULL; + +PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT = NULL; +PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT = NULL; + +PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D = NULL; +PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D = NULL; + +PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D = NULL; +PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D = NULL; +PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D = NULL; +PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D = NULL; + +PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D = NULL; +PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D = NULL; +PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D = NULL; +PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D = NULL; +PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D = NULL; +PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D = NULL; +PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D = NULL; +PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D = NULL; +PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D = NULL; +PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D = NULL; +PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D = NULL; +PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D = NULL; + +PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D = NULL; +PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D = NULL; +PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D = NULL; +PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D = NULL; + +PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D = NULL; +PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D = NULL; +PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D = NULL; +PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D = NULL; + +PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D = NULL; +PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D = NULL; +PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D = NULL; +PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D = NULL; + +PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV = NULL; +PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV = NULL; + +PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML = NULL; +PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML = NULL; +PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML = NULL; +PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML = NULL; +PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML = NULL; +PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML = NULL; +GLboolean __WGLEW_3DFX_multisample = GL_FALSE; +GLboolean __WGLEW_3DL_stereo_control = GL_FALSE; +GLboolean __WGLEW_ARB_buffer_region = GL_FALSE; +GLboolean __WGLEW_ARB_extensions_string = GL_FALSE; +GLboolean __WGLEW_ARB_make_current_read = GL_FALSE; +GLboolean __WGLEW_ARB_multisample = GL_FALSE; +GLboolean __WGLEW_ARB_pbuffer = GL_FALSE; +GLboolean __WGLEW_ARB_pixel_format = GL_FALSE; +GLboolean __WGLEW_ARB_pixel_format_float = GL_FALSE; +GLboolean __WGLEW_ARB_render_texture = GL_FALSE; +GLboolean __WGLEW_ATI_pixel_format_float = GL_FALSE; +GLboolean __WGLEW_ATI_render_texture_rectangle = GL_FALSE; +GLboolean __WGLEW_EXT_depth_float = GL_FALSE; +GLboolean __WGLEW_EXT_display_color_table = GL_FALSE; +GLboolean __WGLEW_EXT_extensions_string = GL_FALSE; +GLboolean __WGLEW_EXT_make_current_read = GL_FALSE; +GLboolean __WGLEW_EXT_multisample = GL_FALSE; +GLboolean __WGLEW_EXT_pbuffer = GL_FALSE; +GLboolean __WGLEW_EXT_pixel_format = GL_FALSE; +GLboolean __WGLEW_EXT_swap_control = GL_FALSE; +GLboolean __WGLEW_I3D_digital_video_control = GL_FALSE; +GLboolean __WGLEW_I3D_gamma = GL_FALSE; +GLboolean __WGLEW_I3D_genlock = GL_FALSE; +GLboolean __WGLEW_I3D_image_buffer = GL_FALSE; +GLboolean __WGLEW_I3D_swap_frame_lock = GL_FALSE; +GLboolean __WGLEW_I3D_swap_frame_usage = GL_FALSE; +GLboolean __WGLEW_NV_float_buffer = GL_FALSE; +GLboolean __WGLEW_NV_render_depth_texture = GL_FALSE; +GLboolean __WGLEW_NV_render_texture_rectangle = GL_FALSE; +GLboolean __WGLEW_NV_vertex_array_range = GL_FALSE; +GLboolean __WGLEW_OML_sync_control = GL_FALSE; + +#endif /* !GLEW_MX */ + +#ifdef WGL_3DFX_multisample + +#endif /* WGL_3DFX_multisample */ + +#ifdef WGL_3DL_stereo_control + +static GLboolean _glewInit_WGL_3DL_stereo_control (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC)glewGetProcAddress((const GLubyte*)"wglSetStereoEmitterState3DL")) == NULL) || r; + + return r; +} + +#endif /* WGL_3DL_stereo_control */ + +#ifdef WGL_ARB_buffer_region + +static GLboolean _glewInit_WGL_ARB_buffer_region (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglCreateBufferRegionARB = (PFNWGLCREATEBUFFERREGIONARBPROC)glewGetProcAddress((const GLubyte*)"wglCreateBufferRegionARB")) == NULL) || r; + r = ((wglDeleteBufferRegionARB = (PFNWGLDELETEBUFFERREGIONARBPROC)glewGetProcAddress((const GLubyte*)"wglDeleteBufferRegionARB")) == NULL) || r; + r = ((wglRestoreBufferRegionARB = (PFNWGLRESTOREBUFFERREGIONARBPROC)glewGetProcAddress((const GLubyte*)"wglRestoreBufferRegionARB")) == NULL) || r; + r = ((wglSaveBufferRegionARB = (PFNWGLSAVEBUFFERREGIONARBPROC)glewGetProcAddress((const GLubyte*)"wglSaveBufferRegionARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_buffer_region */ + +#ifdef WGL_ARB_extensions_string + +static GLboolean _glewInit_WGL_ARB_extensions_string (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_extensions_string */ + +#ifdef WGL_ARB_make_current_read + +static GLboolean _glewInit_WGL_ARB_make_current_read (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetCurrentReadDCARB = (PFNWGLGETCURRENTREADDCARBPROC)glewGetProcAddress((const GLubyte*)"wglGetCurrentReadDCARB")) == NULL) || r; + r = ((wglMakeContextCurrentARB = (PFNWGLMAKECONTEXTCURRENTARBPROC)glewGetProcAddress((const GLubyte*)"wglMakeContextCurrentARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_make_current_read */ + +#ifdef WGL_ARB_multisample + +#endif /* WGL_ARB_multisample */ + +#ifdef WGL_ARB_pbuffer + +static GLboolean _glewInit_WGL_ARB_pbuffer (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglCreatePbufferARB")) == NULL) || r; + r = ((wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglDestroyPbufferARB")) == NULL) || r; + r = ((wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPbufferDCARB")) == NULL) || r; + r = ((wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglQueryPbufferARB")) == NULL) || r; + r = ((wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)glewGetProcAddress((const GLubyte*)"wglReleasePbufferDCARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_pbuffer */ + +#ifdef WGL_ARB_pixel_format + +static GLboolean _glewInit_WGL_ARB_pixel_format (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)glewGetProcAddress((const GLubyte*)"wglChoosePixelFormatARB")) == NULL) || r; + r = ((wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribfvARB")) == NULL) || r; + r = ((wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribivARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_pixel_format */ + +#ifdef WGL_ARB_pixel_format_float + +#endif /* WGL_ARB_pixel_format_float */ + +#ifdef WGL_ARB_render_texture + +static GLboolean _glewInit_WGL_ARB_render_texture (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"wglBindTexImageARB")) == NULL) || r; + r = ((wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"wglReleaseTexImageARB")) == NULL) || r; + r = ((wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)glewGetProcAddress((const GLubyte*)"wglSetPbufferAttribARB")) == NULL) || r; + + return r; +} + +#endif /* WGL_ARB_render_texture */ + +#ifdef WGL_ATI_pixel_format_float + +#endif /* WGL_ATI_pixel_format_float */ + +#ifdef WGL_ATI_render_texture_rectangle + +#endif /* WGL_ATI_render_texture_rectangle */ + +#ifdef WGL_EXT_depth_float + +#endif /* WGL_EXT_depth_float */ + +#ifdef WGL_EXT_display_color_table + +static GLboolean _glewInit_WGL_EXT_display_color_table (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglBindDisplayColorTableEXT = (PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"wglBindDisplayColorTableEXT")) == NULL) || r; + r = ((wglCreateDisplayColorTableEXT = (PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"wglCreateDisplayColorTableEXT")) == NULL) || r; + r = ((wglDestroyDisplayColorTableEXT = (PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"wglDestroyDisplayColorTableEXT")) == NULL) || r; + r = ((wglLoadDisplayColorTableEXT = (PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)glewGetProcAddress((const GLubyte*)"wglLoadDisplayColorTableEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_display_color_table */ + +#ifdef WGL_EXT_extensions_string + +static GLboolean _glewInit_WGL_EXT_extensions_string (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_extensions_string */ + +#ifdef WGL_EXT_make_current_read + +static GLboolean _glewInit_WGL_EXT_make_current_read (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetCurrentReadDCEXT = (PFNWGLGETCURRENTREADDCEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetCurrentReadDCEXT")) == NULL) || r; + r = ((wglMakeContextCurrentEXT = (PFNWGLMAKECONTEXTCURRENTEXTPROC)glewGetProcAddress((const GLubyte*)"wglMakeContextCurrentEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_make_current_read */ + +#ifdef WGL_EXT_multisample + +#endif /* WGL_EXT_multisample */ + +#ifdef WGL_EXT_pbuffer + +static GLboolean _glewInit_WGL_EXT_pbuffer (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglCreatePbufferEXT = (PFNWGLCREATEPBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"wglCreatePbufferEXT")) == NULL) || r; + r = ((wglDestroyPbufferEXT = (PFNWGLDESTROYPBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"wglDestroyPbufferEXT")) == NULL) || r; + r = ((wglGetPbufferDCEXT = (PFNWGLGETPBUFFERDCEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetPbufferDCEXT")) == NULL) || r; + r = ((wglQueryPbufferEXT = (PFNWGLQUERYPBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"wglQueryPbufferEXT")) == NULL) || r; + r = ((wglReleasePbufferDCEXT = (PFNWGLRELEASEPBUFFERDCEXTPROC)glewGetProcAddress((const GLubyte*)"wglReleasePbufferDCEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_pbuffer */ + +#ifdef WGL_EXT_pixel_format + +static GLboolean _glewInit_WGL_EXT_pixel_format (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglChoosePixelFormatEXT = (PFNWGLCHOOSEPIXELFORMATEXTPROC)glewGetProcAddress((const GLubyte*)"wglChoosePixelFormatEXT")) == NULL) || r; + r = ((wglGetPixelFormatAttribfvEXT = (PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribfvEXT")) == NULL) || r; + r = ((wglGetPixelFormatAttribivEXT = (PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribivEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_pixel_format */ + +#ifdef WGL_EXT_swap_control + +static GLboolean _glewInit_WGL_EXT_swap_control (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetSwapIntervalEXT")) == NULL) || r; + r = ((wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)glewGetProcAddress((const GLubyte*)"wglSwapIntervalEXT")) == NULL) || r; + + return r; +} + +#endif /* WGL_EXT_swap_control */ + +#ifdef WGL_I3D_digital_video_control + +static GLboolean _glewInit_WGL_I3D_digital_video_control (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetDigitalVideoParametersI3D = (PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetDigitalVideoParametersI3D")) == NULL) || r; + r = ((wglSetDigitalVideoParametersI3D = (PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)glewGetProcAddress((const GLubyte*)"wglSetDigitalVideoParametersI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_digital_video_control */ + +#ifdef WGL_I3D_gamma + +static GLboolean _glewInit_WGL_I3D_gamma (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetGammaTableI3D = (PFNWGLGETGAMMATABLEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGammaTableI3D")) == NULL) || r; + r = ((wglGetGammaTableParametersI3D = (PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGammaTableParametersI3D")) == NULL) || r; + r = ((wglSetGammaTableI3D = (PFNWGLSETGAMMATABLEI3DPROC)glewGetProcAddress((const GLubyte*)"wglSetGammaTableI3D")) == NULL) || r; + r = ((wglSetGammaTableParametersI3D = (PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)glewGetProcAddress((const GLubyte*)"wglSetGammaTableParametersI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_gamma */ + +#ifdef WGL_I3D_genlock + +static GLboolean _glewInit_WGL_I3D_genlock (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglDisableGenlockI3D = (PFNWGLDISABLEGENLOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglDisableGenlockI3D")) == NULL) || r; + r = ((wglEnableGenlockI3D = (PFNWGLENABLEGENLOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglEnableGenlockI3D")) == NULL) || r; + r = ((wglGenlockSampleRateI3D = (PFNWGLGENLOCKSAMPLERATEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGenlockSampleRateI3D")) == NULL) || r; + r = ((wglGenlockSourceDelayI3D = (PFNWGLGENLOCKSOURCEDELAYI3DPROC)glewGetProcAddress((const GLubyte*)"wglGenlockSourceDelayI3D")) == NULL) || r; + r = ((wglGenlockSourceEdgeI3D = (PFNWGLGENLOCKSOURCEEDGEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGenlockSourceEdgeI3D")) == NULL) || r; + r = ((wglGenlockSourceI3D = (PFNWGLGENLOCKSOURCEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGenlockSourceI3D")) == NULL) || r; + r = ((wglGetGenlockSampleRateI3D = (PFNWGLGETGENLOCKSAMPLERATEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGenlockSampleRateI3D")) == NULL) || r; + r = ((wglGetGenlockSourceDelayI3D = (PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGenlockSourceDelayI3D")) == NULL) || r; + r = ((wglGetGenlockSourceEdgeI3D = (PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGenlockSourceEdgeI3D")) == NULL) || r; + r = ((wglGetGenlockSourceI3D = (PFNWGLGETGENLOCKSOURCEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetGenlockSourceI3D")) == NULL) || r; + r = ((wglIsEnabledGenlockI3D = (PFNWGLISENABLEDGENLOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglIsEnabledGenlockI3D")) == NULL) || r; + r = ((wglQueryGenlockMaxSourceDelayI3D = (PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)glewGetProcAddress((const GLubyte*)"wglQueryGenlockMaxSourceDelayI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_genlock */ + +#ifdef WGL_I3D_image_buffer + +static GLboolean _glewInit_WGL_I3D_image_buffer (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglAssociateImageBufferEventsI3D = (PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)glewGetProcAddress((const GLubyte*)"wglAssociateImageBufferEventsI3D")) == NULL) || r; + r = ((wglCreateImageBufferI3D = (PFNWGLCREATEIMAGEBUFFERI3DPROC)glewGetProcAddress((const GLubyte*)"wglCreateImageBufferI3D")) == NULL) || r; + r = ((wglDestroyImageBufferI3D = (PFNWGLDESTROYIMAGEBUFFERI3DPROC)glewGetProcAddress((const GLubyte*)"wglDestroyImageBufferI3D")) == NULL) || r; + r = ((wglReleaseImageBufferEventsI3D = (PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)glewGetProcAddress((const GLubyte*)"wglReleaseImageBufferEventsI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_image_buffer */ + +#ifdef WGL_I3D_swap_frame_lock + +static GLboolean _glewInit_WGL_I3D_swap_frame_lock (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglDisableFrameLockI3D = (PFNWGLDISABLEFRAMELOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglDisableFrameLockI3D")) == NULL) || r; + r = ((wglEnableFrameLockI3D = (PFNWGLENABLEFRAMELOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglEnableFrameLockI3D")) == NULL) || r; + r = ((wglIsEnabledFrameLockI3D = (PFNWGLISENABLEDFRAMELOCKI3DPROC)glewGetProcAddress((const GLubyte*)"wglIsEnabledFrameLockI3D")) == NULL) || r; + r = ((wglQueryFrameLockMasterI3D = (PFNWGLQUERYFRAMELOCKMASTERI3DPROC)glewGetProcAddress((const GLubyte*)"wglQueryFrameLockMasterI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_swap_frame_lock */ + +#ifdef WGL_I3D_swap_frame_usage + +static GLboolean _glewInit_WGL_I3D_swap_frame_usage (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglBeginFrameTrackingI3D = (PFNWGLBEGINFRAMETRACKINGI3DPROC)glewGetProcAddress((const GLubyte*)"wglBeginFrameTrackingI3D")) == NULL) || r; + r = ((wglEndFrameTrackingI3D = (PFNWGLENDFRAMETRACKINGI3DPROC)glewGetProcAddress((const GLubyte*)"wglEndFrameTrackingI3D")) == NULL) || r; + r = ((wglGetFrameUsageI3D = (PFNWGLGETFRAMEUSAGEI3DPROC)glewGetProcAddress((const GLubyte*)"wglGetFrameUsageI3D")) == NULL) || r; + r = ((wglQueryFrameTrackingI3D = (PFNWGLQUERYFRAMETRACKINGI3DPROC)glewGetProcAddress((const GLubyte*)"wglQueryFrameTrackingI3D")) == NULL) || r; + + return r; +} + +#endif /* WGL_I3D_swap_frame_usage */ + +#ifdef WGL_NV_float_buffer + +#endif /* WGL_NV_float_buffer */ + +#ifdef WGL_NV_render_depth_texture + +#endif /* WGL_NV_render_depth_texture */ + +#ifdef WGL_NV_render_texture_rectangle + +#endif /* WGL_NV_render_texture_rectangle */ + +#ifdef WGL_NV_vertex_array_range + +static GLboolean _glewInit_WGL_NV_vertex_array_range (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglAllocateMemoryNV = (PFNWGLALLOCATEMEMORYNVPROC)glewGetProcAddress((const GLubyte*)"wglAllocateMemoryNV")) == NULL) || r; + r = ((wglFreeMemoryNV = (PFNWGLFREEMEMORYNVPROC)glewGetProcAddress((const GLubyte*)"wglFreeMemoryNV")) == NULL) || r; + + return r; +} + +#endif /* WGL_NV_vertex_array_range */ + +#ifdef WGL_OML_sync_control + +static GLboolean _glewInit_WGL_OML_sync_control (WGLEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((wglGetMscRateOML = (PFNWGLGETMSCRATEOMLPROC)glewGetProcAddress((const GLubyte*)"wglGetMscRateOML")) == NULL) || r; + r = ((wglGetSyncValuesOML = (PFNWGLGETSYNCVALUESOMLPROC)glewGetProcAddress((const GLubyte*)"wglGetSyncValuesOML")) == NULL) || r; + r = ((wglSwapBuffersMscOML = (PFNWGLSWAPBUFFERSMSCOMLPROC)glewGetProcAddress((const GLubyte*)"wglSwapBuffersMscOML")) == NULL) || r; + r = ((wglSwapLayerBuffersMscOML = (PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)glewGetProcAddress((const GLubyte*)"wglSwapLayerBuffersMscOML")) == NULL) || r; + r = ((wglWaitForMscOML = (PFNWGLWAITFORMSCOMLPROC)glewGetProcAddress((const GLubyte*)"wglWaitForMscOML")) == NULL) || r; + r = ((wglWaitForSbcOML = (PFNWGLWAITFORSBCOMLPROC)glewGetProcAddress((const GLubyte*)"wglWaitForSbcOML")) == NULL) || r; + + return r; +} + +#endif /* WGL_OML_sync_control */ + +/* ------------------------------------------------------------------------- */ + +static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL; +static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL; + +GLboolean wglewGetExtension (const char* name) +{ + GLubyte* p; + GLubyte* end; + GLuint len = _glewStrLen((const GLubyte*)name); + if (_wglewGetExtensionsStringARB == NULL) + if (_wglewGetExtensionsStringEXT == NULL) + return GL_FALSE; + else + p = (GLubyte*)_wglewGetExtensionsStringEXT(); + else + p = (GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC()); + if (0 == p) return GL_FALSE; + end = p + _glewStrLen(p); + while (p < end) + { + GLuint n = _glewStrCLen(p, ' '); + if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE; + p += n+1; + } + return GL_FALSE; +} + +GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST) +{ + GLboolean crippled; + /* find wgl extension string query functions */ + if (_wglewGetExtensionsStringARB == NULL) + _wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB"); + if (_wglewGetExtensionsStringEXT == NULL) + _wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT"); + /* initialize extensions */ + crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL; +#ifdef WGL_3DFX_multisample + WGLEW_3DFX_multisample = wglewGetExtension("WGL_3DFX_multisample"); +#endif /* WGL_3DFX_multisample */ +#ifdef WGL_3DL_stereo_control + WGLEW_3DL_stereo_control = wglewGetExtension("WGL_3DL_stereo_control"); + if (glewExperimental || WGLEW_3DL_stereo_control|| crippled) WGLEW_3DL_stereo_control= !_glewInit_WGL_3DL_stereo_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_3DL_stereo_control */ +#ifdef WGL_ARB_buffer_region + WGLEW_ARB_buffer_region = wglewGetExtension("WGL_ARB_buffer_region"); + if (glewExperimental || WGLEW_ARB_buffer_region|| crippled) WGLEW_ARB_buffer_region= !_glewInit_WGL_ARB_buffer_region(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_buffer_region */ +#ifdef WGL_ARB_extensions_string + WGLEW_ARB_extensions_string = wglewGetExtension("WGL_ARB_extensions_string"); + if (glewExperimental || WGLEW_ARB_extensions_string|| crippled) WGLEW_ARB_extensions_string= !_glewInit_WGL_ARB_extensions_string(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_extensions_string */ +#ifdef WGL_ARB_make_current_read + WGLEW_ARB_make_current_read = wglewGetExtension("WGL_ARB_make_current_read"); + if (glewExperimental || WGLEW_ARB_make_current_read|| crippled) WGLEW_ARB_make_current_read= !_glewInit_WGL_ARB_make_current_read(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_make_current_read */ +#ifdef WGL_ARB_multisample + WGLEW_ARB_multisample = wglewGetExtension("WGL_ARB_multisample"); +#endif /* WGL_ARB_multisample */ +#ifdef WGL_ARB_pbuffer + WGLEW_ARB_pbuffer = wglewGetExtension("WGL_ARB_pbuffer"); + if (glewExperimental || WGLEW_ARB_pbuffer|| crippled) WGLEW_ARB_pbuffer= !_glewInit_WGL_ARB_pbuffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_pbuffer */ +#ifdef WGL_ARB_pixel_format + WGLEW_ARB_pixel_format = wglewGetExtension("WGL_ARB_pixel_format"); + if (glewExperimental || WGLEW_ARB_pixel_format|| crippled) WGLEW_ARB_pixel_format= !_glewInit_WGL_ARB_pixel_format(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_pixel_format */ +#ifdef WGL_ARB_pixel_format_float + WGLEW_ARB_pixel_format_float = wglewGetExtension("WGL_ARB_pixel_format_float"); +#endif /* WGL_ARB_pixel_format_float */ +#ifdef WGL_ARB_render_texture + WGLEW_ARB_render_texture = wglewGetExtension("WGL_ARB_render_texture"); + if (glewExperimental || WGLEW_ARB_render_texture|| crippled) WGLEW_ARB_render_texture= !_glewInit_WGL_ARB_render_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_ARB_render_texture */ +#ifdef WGL_ATI_pixel_format_float + WGLEW_ATI_pixel_format_float = wglewGetExtension("WGL_ATI_pixel_format_float"); +#endif /* WGL_ATI_pixel_format_float */ +#ifdef WGL_ATI_render_texture_rectangle + WGLEW_ATI_render_texture_rectangle = wglewGetExtension("WGL_ATI_render_texture_rectangle"); +#endif /* WGL_ATI_render_texture_rectangle */ +#ifdef WGL_EXT_depth_float + WGLEW_EXT_depth_float = wglewGetExtension("WGL_EXT_depth_float"); +#endif /* WGL_EXT_depth_float */ +#ifdef WGL_EXT_display_color_table + WGLEW_EXT_display_color_table = wglewGetExtension("WGL_EXT_display_color_table"); + if (glewExperimental || WGLEW_EXT_display_color_table|| crippled) WGLEW_EXT_display_color_table= !_glewInit_WGL_EXT_display_color_table(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_display_color_table */ +#ifdef WGL_EXT_extensions_string + WGLEW_EXT_extensions_string = wglewGetExtension("WGL_EXT_extensions_string"); + if (glewExperimental || WGLEW_EXT_extensions_string|| crippled) WGLEW_EXT_extensions_string= !_glewInit_WGL_EXT_extensions_string(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_extensions_string */ +#ifdef WGL_EXT_make_current_read + WGLEW_EXT_make_current_read = wglewGetExtension("WGL_EXT_make_current_read"); + if (glewExperimental || WGLEW_EXT_make_current_read|| crippled) WGLEW_EXT_make_current_read= !_glewInit_WGL_EXT_make_current_read(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_make_current_read */ +#ifdef WGL_EXT_multisample + WGLEW_EXT_multisample = wglewGetExtension("WGL_EXT_multisample"); +#endif /* WGL_EXT_multisample */ +#ifdef WGL_EXT_pbuffer + WGLEW_EXT_pbuffer = wglewGetExtension("WGL_EXT_pbuffer"); + if (glewExperimental || WGLEW_EXT_pbuffer|| crippled) WGLEW_EXT_pbuffer= !_glewInit_WGL_EXT_pbuffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_pbuffer */ +#ifdef WGL_EXT_pixel_format + WGLEW_EXT_pixel_format = wglewGetExtension("WGL_EXT_pixel_format"); + if (glewExperimental || WGLEW_EXT_pixel_format|| crippled) WGLEW_EXT_pixel_format= !_glewInit_WGL_EXT_pixel_format(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_pixel_format */ +#ifdef WGL_EXT_swap_control + WGLEW_EXT_swap_control = wglewGetExtension("WGL_EXT_swap_control"); + if (glewExperimental || WGLEW_EXT_swap_control|| crippled) WGLEW_EXT_swap_control= !_glewInit_WGL_EXT_swap_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_EXT_swap_control */ +#ifdef WGL_I3D_digital_video_control + WGLEW_I3D_digital_video_control = wglewGetExtension("WGL_I3D_digital_video_control"); + if (glewExperimental || WGLEW_I3D_digital_video_control|| crippled) WGLEW_I3D_digital_video_control= !_glewInit_WGL_I3D_digital_video_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_digital_video_control */ +#ifdef WGL_I3D_gamma + WGLEW_I3D_gamma = wglewGetExtension("WGL_I3D_gamma"); + if (glewExperimental || WGLEW_I3D_gamma|| crippled) WGLEW_I3D_gamma= !_glewInit_WGL_I3D_gamma(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_gamma */ +#ifdef WGL_I3D_genlock + WGLEW_I3D_genlock = wglewGetExtension("WGL_I3D_genlock"); + if (glewExperimental || WGLEW_I3D_genlock|| crippled) WGLEW_I3D_genlock= !_glewInit_WGL_I3D_genlock(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_genlock */ +#ifdef WGL_I3D_image_buffer + WGLEW_I3D_image_buffer = wglewGetExtension("WGL_I3D_image_buffer"); + if (glewExperimental || WGLEW_I3D_image_buffer|| crippled) WGLEW_I3D_image_buffer= !_glewInit_WGL_I3D_image_buffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_image_buffer */ +#ifdef WGL_I3D_swap_frame_lock + WGLEW_I3D_swap_frame_lock = wglewGetExtension("WGL_I3D_swap_frame_lock"); + if (glewExperimental || WGLEW_I3D_swap_frame_lock|| crippled) WGLEW_I3D_swap_frame_lock= !_glewInit_WGL_I3D_swap_frame_lock(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_swap_frame_lock */ +#ifdef WGL_I3D_swap_frame_usage + WGLEW_I3D_swap_frame_usage = wglewGetExtension("WGL_I3D_swap_frame_usage"); + if (glewExperimental || WGLEW_I3D_swap_frame_usage|| crippled) WGLEW_I3D_swap_frame_usage= !_glewInit_WGL_I3D_swap_frame_usage(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_I3D_swap_frame_usage */ +#ifdef WGL_NV_float_buffer + WGLEW_NV_float_buffer = wglewGetExtension("WGL_NV_float_buffer"); +#endif /* WGL_NV_float_buffer */ +#ifdef WGL_NV_render_depth_texture + WGLEW_NV_render_depth_texture = wglewGetExtension("WGL_NV_render_depth_texture"); +#endif /* WGL_NV_render_depth_texture */ +#ifdef WGL_NV_render_texture_rectangle + WGLEW_NV_render_texture_rectangle = wglewGetExtension("WGL_NV_render_texture_rectangle"); +#endif /* WGL_NV_render_texture_rectangle */ +#ifdef WGL_NV_vertex_array_range + WGLEW_NV_vertex_array_range = wglewGetExtension("WGL_NV_vertex_array_range"); + if (glewExperimental || WGLEW_NV_vertex_array_range|| crippled) WGLEW_NV_vertex_array_range= !_glewInit_WGL_NV_vertex_array_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_NV_vertex_array_range */ +#ifdef WGL_OML_sync_control + WGLEW_OML_sync_control = wglewGetExtension("WGL_OML_sync_control"); + if (glewExperimental || WGLEW_OML_sync_control|| crippled) WGLEW_OML_sync_control= !_glewInit_WGL_OML_sync_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* WGL_OML_sync_control */ + + return GLEW_OK; +} + +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) + +PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL; + +PFNGLXCHOOSEFBCONFIGPROC __glewXChooseFBConfig = NULL; +PFNGLXCREATENEWCONTEXTPROC __glewXCreateNewContext = NULL; +PFNGLXCREATEPBUFFERPROC __glewXCreatePbuffer = NULL; +PFNGLXCREATEPIXMAPPROC __glewXCreatePixmap = NULL; +PFNGLXCREATEWINDOWPROC __glewXCreateWindow = NULL; +PFNGLXDESTROYPBUFFERPROC __glewXDestroyPbuffer = NULL; +PFNGLXDESTROYPIXMAPPROC __glewXDestroyPixmap = NULL; +PFNGLXDESTROYWINDOWPROC __glewXDestroyWindow = NULL; +PFNGLXGETCURRENTREADDRAWABLEPROC __glewXGetCurrentReadDrawable = NULL; +PFNGLXGETFBCONFIGATTRIBPROC __glewXGetFBConfigAttrib = NULL; +PFNGLXGETFBCONFIGSPROC __glewXGetFBConfigs = NULL; +PFNGLXGETSELECTEDEVENTPROC __glewXGetSelectedEvent = NULL; +PFNGLXGETVISUALFROMFBCONFIGPROC __glewXGetVisualFromFBConfig = NULL; +PFNGLXMAKECONTEXTCURRENTPROC __glewXMakeContextCurrent = NULL; +PFNGLXQUERYCONTEXTPROC __glewXQueryContext = NULL; +PFNGLXQUERYDRAWABLEPROC __glewXQueryDrawable = NULL; +PFNGLXSELECTEVENTPROC __glewXSelectEvent = NULL; + +PFNGLXBINDTEXIMAGEATIPROC __glewXBindTexImageATI = NULL; +PFNGLXDRAWABLEATTRIBATIPROC __glewXDrawableAttribATI = NULL; +PFNGLXRELEASETEXIMAGEATIPROC __glewXReleaseTexImageATI = NULL; + +PFNGLXFREECONTEXTEXTPROC __glewXFreeContextEXT = NULL; +PFNGLXGETCONTEXTIDEXTPROC __glewXGetContextIDEXT = NULL; +PFNGLXIMPORTCONTEXTEXTPROC __glewXImportContextEXT = NULL; +PFNGLXQUERYCONTEXTINFOEXTPROC __glewXQueryContextInfoEXT = NULL; + +PFNGLXGETAGPOFFSETMESAPROC __glewXGetAGPOffsetMESA = NULL; + +PFNGLXCOPYSUBBUFFERMESAPROC __glewXCopySubBufferMESA = NULL; + +PFNGLXCREATEGLXPIXMAPMESAPROC __glewXCreateGLXPixmapMESA = NULL; + +PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA = NULL; + +PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA = NULL; + +PFNGLXALLOCATEMEMORYNVPROC __glewXAllocateMemoryNV = NULL; +PFNGLXFREEMEMORYNVPROC __glewXFreeMemoryNV = NULL; + +#ifdef GLX_OML_sync_control +PFNGLXGETMSCRATEOMLPROC __glewXGetMscRateOML = NULL; +PFNGLXGETSYNCVALUESOMLPROC __glewXGetSyncValuesOML = NULL; +PFNGLXSWAPBUFFERSMSCOMLPROC __glewXSwapBuffersMscOML = NULL; +PFNGLXWAITFORMSCOMLPROC __glewXWaitForMscOML = NULL; +PFNGLXWAITFORSBCOMLPROC __glewXWaitForSbcOML = NULL; +#endif + +PFNGLXCHOOSEFBCONFIGSGIXPROC __glewXChooseFBConfigSGIX = NULL; +PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC __glewXCreateContextWithConfigSGIX = NULL; +PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC __glewXCreateGLXPixmapWithConfigSGIX = NULL; +PFNGLXGETFBCONFIGATTRIBSGIXPROC __glewXGetFBConfigAttribSGIX = NULL; +PFNGLXGETFBCONFIGFROMVISUALSGIXPROC __glewXGetFBConfigFromVisualSGIX = NULL; +PFNGLXGETVISUALFROMFBCONFIGSGIXPROC __glewXGetVisualFromFBConfigSGIX = NULL; + +PFNGLXCREATEGLXPBUFFERSGIXPROC __glewXCreateGLXPbufferSGIX = NULL; +PFNGLXDESTROYGLXPBUFFERSGIXPROC __glewXDestroyGLXPbufferSGIX = NULL; +PFNGLXGETSELECTEDEVENTSGIXPROC __glewXGetSelectedEventSGIX = NULL; +PFNGLXQUERYGLXPBUFFERSGIXPROC __glewXQueryGLXPbufferSGIX = NULL; +PFNGLXSELECTEVENTSGIXPROC __glewXSelectEventSGIX = NULL; + +PFNGLXBINDSWAPBARRIERSGIXPROC __glewXBindSwapBarrierSGIX = NULL; +PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC __glewXQueryMaxSwapBarriersSGIX = NULL; + +PFNGLXJOINSWAPGROUPSGIXPROC __glewXJoinSwapGroupSGIX = NULL; + +PFNGLXBINDCHANNELTOWINDOWSGIXPROC __glewXBindChannelToWindowSGIX = NULL; +PFNGLXCHANNELRECTSGIXPROC __glewXChannelRectSGIX = NULL; +PFNGLXCHANNELRECTSYNCSGIXPROC __glewXChannelRectSyncSGIX = NULL; +PFNGLXQUERYCHANNELDELTASSGIXPROC __glewXQueryChannelDeltasSGIX = NULL; +PFNGLXQUERYCHANNELRECTSGIXPROC __glewXQueryChannelRectSGIX = NULL; + +PFNGLXCUSHIONSGIPROC __glewXCushionSGI = NULL; + +PFNGLXGETCURRENTREADDRAWABLESGIPROC __glewXGetCurrentReadDrawableSGI = NULL; +PFNGLXMAKECURRENTREADSGIPROC __glewXMakeCurrentReadSGI = NULL; + +PFNGLXSWAPINTERVALSGIPROC __glewXSwapIntervalSGI = NULL; + +PFNGLXGETVIDEOSYNCSGIPROC __glewXGetVideoSyncSGI = NULL; +PFNGLXWAITVIDEOSYNCSGIPROC __glewXWaitVideoSyncSGI = NULL; + +PFNGLXGETTRANSPARENTINDEXSUNPROC __glewXGetTransparentIndexSUN = NULL; + +PFNGLXGETVIDEORESIZESUNPROC __glewXGetVideoResizeSUN = NULL; +PFNGLXVIDEORESIZESUNPROC __glewXVideoResizeSUN = NULL; + +#if !defined(GLEW_MX) + +GLboolean __GLXEW_VERSION_1_0 = GL_FALSE; +GLboolean __GLXEW_VERSION_1_1 = GL_FALSE; +GLboolean __GLXEW_VERSION_1_2 = GL_FALSE; +GLboolean __GLXEW_VERSION_1_3 = GL_FALSE; +GLboolean __GLXEW_VERSION_1_4 = GL_FALSE; +GLboolean __GLXEW_3DFX_multisample = GL_FALSE; +GLboolean __GLXEW_ARB_fbconfig_float = GL_FALSE; +GLboolean __GLXEW_ARB_get_proc_address = GL_FALSE; +GLboolean __GLXEW_ARB_multisample = GL_FALSE; +GLboolean __GLXEW_ATI_pixel_format_float = GL_FALSE; +GLboolean __GLXEW_ATI_render_texture = GL_FALSE; +GLboolean __GLXEW_EXT_import_context = GL_FALSE; +GLboolean __GLXEW_EXT_scene_marker = GL_FALSE; +GLboolean __GLXEW_EXT_visual_info = GL_FALSE; +GLboolean __GLXEW_EXT_visual_rating = GL_FALSE; +GLboolean __GLXEW_MESA_agp_offset = GL_FALSE; +GLboolean __GLXEW_MESA_copy_sub_buffer = GL_FALSE; +GLboolean __GLXEW_MESA_pixmap_colormap = GL_FALSE; +GLboolean __GLXEW_MESA_release_buffers = GL_FALSE; +GLboolean __GLXEW_MESA_set_3dfx_mode = GL_FALSE; +GLboolean __GLXEW_NV_float_buffer = GL_FALSE; +GLboolean __GLXEW_NV_vertex_array_range = GL_FALSE; +GLboolean __GLXEW_OML_swap_method = GL_FALSE; +#ifdef GLX_OML_sync_control +GLboolean __GLXEW_OML_sync_control = GL_FALSE; +#endif +GLboolean __GLXEW_SGIS_blended_overlay = GL_FALSE; +GLboolean __GLXEW_SGIS_color_range = GL_FALSE; +GLboolean __GLXEW_SGIS_multisample = GL_FALSE; +GLboolean __GLXEW_SGIS_shared_multisample = GL_FALSE; +GLboolean __GLXEW_SGIX_fbconfig = GL_FALSE; +GLboolean __GLXEW_SGIX_pbuffer = GL_FALSE; +GLboolean __GLXEW_SGIX_swap_barrier = GL_FALSE; +GLboolean __GLXEW_SGIX_swap_group = GL_FALSE; +GLboolean __GLXEW_SGIX_video_resize = GL_FALSE; +GLboolean __GLXEW_SGIX_visual_select_group = GL_FALSE; +GLboolean __GLXEW_SGI_cushion = GL_FALSE; +GLboolean __GLXEW_SGI_make_current_read = GL_FALSE; +GLboolean __GLXEW_SGI_swap_control = GL_FALSE; +GLboolean __GLXEW_SGI_video_sync = GL_FALSE; +GLboolean __GLXEW_SUN_get_transparent_index = GL_FALSE; +GLboolean __GLXEW_SUN_video_resize = GL_FALSE; + +#endif /* !GLEW_MX */ + +#ifdef GLX_VERSION_1_2 + +static GLboolean _glewInit_GLX_VERSION_1_2 (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentDisplay")) == NULL) || r; + + return r; +} + +#endif /* GLX_VERSION_1_2 */ + +#ifdef GLX_VERSION_1_3 + +static GLboolean _glewInit_GLX_VERSION_1_3 (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC)glewGetProcAddress((const GLubyte*)"glXChooseFBConfig")) == NULL) || r; + r = ((glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC)glewGetProcAddress((const GLubyte*)"glXCreateNewContext")) == NULL) || r; + r = ((glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glXCreatePbuffer")) == NULL) || r; + r = ((glXCreatePixmap = (PFNGLXCREATEPIXMAPPROC)glewGetProcAddress((const GLubyte*)"glXCreatePixmap")) == NULL) || r; + r = ((glXCreateWindow = (PFNGLXCREATEWINDOWPROC)glewGetProcAddress((const GLubyte*)"glXCreateWindow")) == NULL) || r; + r = ((glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glXDestroyPbuffer")) == NULL) || r; + r = ((glXDestroyPixmap = (PFNGLXDESTROYPIXMAPPROC)glewGetProcAddress((const GLubyte*)"glXDestroyPixmap")) == NULL) || r; + r = ((glXDestroyWindow = (PFNGLXDESTROYWINDOWPROC)glewGetProcAddress((const GLubyte*)"glXDestroyWindow")) == NULL) || r; + r = ((glXGetCurrentReadDrawable = (PFNGLXGETCURRENTREADDRAWABLEPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentReadDrawable")) == NULL) || r; + r = ((glXGetFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC)glewGetProcAddress((const GLubyte*)"glXGetFBConfigAttrib")) == NULL) || r; + r = ((glXGetFBConfigs = (PFNGLXGETFBCONFIGSPROC)glewGetProcAddress((const GLubyte*)"glXGetFBConfigs")) == NULL) || r; + r = ((glXGetSelectedEvent = (PFNGLXGETSELECTEDEVENTPROC)glewGetProcAddress((const GLubyte*)"glXGetSelectedEvent")) == NULL) || r; + r = ((glXGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC)glewGetProcAddress((const GLubyte*)"glXGetVisualFromFBConfig")) == NULL) || r; + r = ((glXMakeContextCurrent = (PFNGLXMAKECONTEXTCURRENTPROC)glewGetProcAddress((const GLubyte*)"glXMakeContextCurrent")) == NULL) || r; + r = ((glXQueryContext = (PFNGLXQUERYCONTEXTPROC)glewGetProcAddress((const GLubyte*)"glXQueryContext")) == NULL) || r; + r = ((glXQueryDrawable = (PFNGLXQUERYDRAWABLEPROC)glewGetProcAddress((const GLubyte*)"glXQueryDrawable")) == NULL) || r; + r = ((glXSelectEvent = (PFNGLXSELECTEVENTPROC)glewGetProcAddress((const GLubyte*)"glXSelectEvent")) == NULL) || r; + + return r; +} + +#endif /* GLX_VERSION_1_3 */ + +#ifdef GLX_VERSION_1_4 + +#endif /* GLX_VERSION_1_4 */ + +#ifdef GLX_3DFX_multisample + +#endif /* GLX_3DFX_multisample */ + +#ifdef GLX_ARB_fbconfig_float + +#endif /* GLX_ARB_fbconfig_float */ + +#ifdef GLX_ARB_get_proc_address + +#endif /* GLX_ARB_get_proc_address */ + +#ifdef GLX_ARB_multisample + +#endif /* GLX_ARB_multisample */ + +#ifdef GLX_ATI_pixel_format_float + +#endif /* GLX_ATI_pixel_format_float */ + +#ifdef GLX_ATI_render_texture + +static GLboolean _glewInit_GLX_ATI_render_texture (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXBindTexImageATI = (PFNGLXBINDTEXIMAGEATIPROC)glewGetProcAddress((const GLubyte*)"glXBindTexImageATI")) == NULL) || r; + r = ((glXDrawableAttribATI = (PFNGLXDRAWABLEATTRIBATIPROC)glewGetProcAddress((const GLubyte*)"glXDrawableAttribATI")) == NULL) || r; + r = ((glXReleaseTexImageATI = (PFNGLXRELEASETEXIMAGEATIPROC)glewGetProcAddress((const GLubyte*)"glXReleaseTexImageATI")) == NULL) || r; + + return r; +} + +#endif /* GLX_ATI_render_texture */ + +#ifdef GLX_EXT_import_context + +static GLboolean _glewInit_GLX_EXT_import_context (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXFreeContextEXT = (PFNGLXFREECONTEXTEXTPROC)glewGetProcAddress((const GLubyte*)"glXFreeContextEXT")) == NULL) || r; + r = ((glXGetContextIDEXT = (PFNGLXGETCONTEXTIDEXTPROC)glewGetProcAddress((const GLubyte*)"glXGetContextIDEXT")) == NULL) || r; + r = ((glXImportContextEXT = (PFNGLXIMPORTCONTEXTEXTPROC)glewGetProcAddress((const GLubyte*)"glXImportContextEXT")) == NULL) || r; + r = ((glXQueryContextInfoEXT = (PFNGLXQUERYCONTEXTINFOEXTPROC)glewGetProcAddress((const GLubyte*)"glXQueryContextInfoEXT")) == NULL) || r; + + return r; +} + +#endif /* GLX_EXT_import_context */ + +#ifdef GLX_EXT_scene_marker + +#endif /* GLX_EXT_scene_marker */ + +#ifdef GLX_EXT_visual_info + +#endif /* GLX_EXT_visual_info */ + +#ifdef GLX_EXT_visual_rating + +#endif /* GLX_EXT_visual_rating */ + +#ifdef GLX_MESA_agp_offset + +static GLboolean _glewInit_GLX_MESA_agp_offset (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetAGPOffsetMESA = (PFNGLXGETAGPOFFSETMESAPROC)glewGetProcAddress((const GLubyte*)"glXGetAGPOffsetMESA")) == NULL) || r; + + return r; +} + +#endif /* GLX_MESA_agp_offset */ + +#ifdef GLX_MESA_copy_sub_buffer + +static GLboolean _glewInit_GLX_MESA_copy_sub_buffer (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXCopySubBufferMESA = (PFNGLXCOPYSUBBUFFERMESAPROC)glewGetProcAddress((const GLubyte*)"glXCopySubBufferMESA")) == NULL) || r; + + return r; +} + +#endif /* GLX_MESA_copy_sub_buffer */ + +#ifdef GLX_MESA_pixmap_colormap + +static GLboolean _glewInit_GLX_MESA_pixmap_colormap (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXCreateGLXPixmapMESA = (PFNGLXCREATEGLXPIXMAPMESAPROC)glewGetProcAddress((const GLubyte*)"glXCreateGLXPixmapMESA")) == NULL) || r; + + return r; +} + +#endif /* GLX_MESA_pixmap_colormap */ + +#ifdef GLX_MESA_release_buffers + +static GLboolean _glewInit_GLX_MESA_release_buffers (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXReleaseBuffersMESA = (PFNGLXRELEASEBUFFERSMESAPROC)glewGetProcAddress((const GLubyte*)"glXReleaseBuffersMESA")) == NULL) || r; + + return r; +} + +#endif /* GLX_MESA_release_buffers */ + +#ifdef GLX_MESA_set_3dfx_mode + +static GLboolean _glewInit_GLX_MESA_set_3dfx_mode (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC)glewGetProcAddress((const GLubyte*)"glXSet3DfxModeMESA")) == NULL) || r; + + return r; +} + +#endif /* GLX_MESA_set_3dfx_mode */ + +#ifdef GLX_NV_float_buffer + +#endif /* GLX_NV_float_buffer */ + +#ifdef GLX_NV_vertex_array_range + +static GLboolean _glewInit_GLX_NV_vertex_array_range (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXAllocateMemoryNV = (PFNGLXALLOCATEMEMORYNVPROC)glewGetProcAddress((const GLubyte*)"glXAllocateMemoryNV")) == NULL) || r; + r = ((glXFreeMemoryNV = (PFNGLXFREEMEMORYNVPROC)glewGetProcAddress((const GLubyte*)"glXFreeMemoryNV")) == NULL) || r; + + return r; +} + +#endif /* GLX_NV_vertex_array_range */ + +#ifdef GLX_OML_swap_method + +#endif /* GLX_OML_swap_method */ + +#if defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#include + +static GLboolean _glewInit_GLX_OML_sync_control (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetMscRateOML = (PFNGLXGETMSCRATEOMLPROC)glewGetProcAddress((const GLubyte*)"glXGetMscRateOML")) == NULL) || r; + r = ((glXGetSyncValuesOML = (PFNGLXGETSYNCVALUESOMLPROC)glewGetProcAddress((const GLubyte*)"glXGetSyncValuesOML")) == NULL) || r; + r = ((glXSwapBuffersMscOML = (PFNGLXSWAPBUFFERSMSCOMLPROC)glewGetProcAddress((const GLubyte*)"glXSwapBuffersMscOML")) == NULL) || r; + r = ((glXWaitForMscOML = (PFNGLXWAITFORMSCOMLPROC)glewGetProcAddress((const GLubyte*)"glXWaitForMscOML")) == NULL) || r; + r = ((glXWaitForSbcOML = (PFNGLXWAITFORSBCOMLPROC)glewGetProcAddress((const GLubyte*)"glXWaitForSbcOML")) == NULL) || r; + + return r; +} + +#endif /* GLX_OML_sync_control */ + +#ifdef GLX_SGIS_blended_overlay + +#endif /* GLX_SGIS_blended_overlay */ + +#ifdef GLX_SGIS_color_range + +#endif /* GLX_SGIS_color_range */ + +#ifdef GLX_SGIS_multisample + +#endif /* GLX_SGIS_multisample */ + +#ifdef GLX_SGIS_shared_multisample + +#endif /* GLX_SGIS_shared_multisample */ + +#ifdef GLX_SGIX_fbconfig + +static GLboolean _glewInit_GLX_SGIX_fbconfig (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXChooseFBConfigSGIX = (PFNGLXCHOOSEFBCONFIGSGIXPROC)glewGetProcAddress((const GLubyte*)"glXChooseFBConfigSGIX")) == NULL) || r; + r = ((glXCreateContextWithConfigSGIX = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC)glewGetProcAddress((const GLubyte*)"glXCreateContextWithConfigSGIX")) == NULL) || r; + r = ((glXCreateGLXPixmapWithConfigSGIX = (PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC)glewGetProcAddress((const GLubyte*)"glXCreateGLXPixmapWithConfigSGIX")) == NULL) || r; + r = ((glXGetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC)glewGetProcAddress((const GLubyte*)"glXGetFBConfigAttribSGIX")) == NULL) || r; + r = ((glXGetFBConfigFromVisualSGIX = (PFNGLXGETFBCONFIGFROMVISUALSGIXPROC)glewGetProcAddress((const GLubyte*)"glXGetFBConfigFromVisualSGIX")) == NULL) || r; + r = ((glXGetVisualFromFBConfigSGIX = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC)glewGetProcAddress((const GLubyte*)"glXGetVisualFromFBConfigSGIX")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGIX_fbconfig */ + +#ifdef GLX_SGIX_pbuffer + +static GLboolean _glewInit_GLX_SGIX_pbuffer (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC)glewGetProcAddress((const GLubyte*)"glXCreateGLXPbufferSGIX")) == NULL) || r; + r = ((glXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC)glewGetProcAddress((const GLubyte*)"glXDestroyGLXPbufferSGIX")) == NULL) || r; + r = ((glXGetSelectedEventSGIX = (PFNGLXGETSELECTEDEVENTSGIXPROC)glewGetProcAddress((const GLubyte*)"glXGetSelectedEventSGIX")) == NULL) || r; + r = ((glXQueryGLXPbufferSGIX = (PFNGLXQUERYGLXPBUFFERSGIXPROC)glewGetProcAddress((const GLubyte*)"glXQueryGLXPbufferSGIX")) == NULL) || r; + r = ((glXSelectEventSGIX = (PFNGLXSELECTEVENTSGIXPROC)glewGetProcAddress((const GLubyte*)"glXSelectEventSGIX")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGIX_pbuffer */ + +#ifdef GLX_SGIX_swap_barrier + +static GLboolean _glewInit_GLX_SGIX_swap_barrier (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXBindSwapBarrierSGIX = (PFNGLXBINDSWAPBARRIERSGIXPROC)glewGetProcAddress((const GLubyte*)"glXBindSwapBarrierSGIX")) == NULL) || r; + r = ((glXQueryMaxSwapBarriersSGIX = (PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC)glewGetProcAddress((const GLubyte*)"glXQueryMaxSwapBarriersSGIX")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGIX_swap_barrier */ + +#ifdef GLX_SGIX_swap_group + +static GLboolean _glewInit_GLX_SGIX_swap_group (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXJoinSwapGroupSGIX = (PFNGLXJOINSWAPGROUPSGIXPROC)glewGetProcAddress((const GLubyte*)"glXJoinSwapGroupSGIX")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGIX_swap_group */ + +#ifdef GLX_SGIX_video_resize + +static GLboolean _glewInit_GLX_SGIX_video_resize (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXBindChannelToWindowSGIX = (PFNGLXBINDCHANNELTOWINDOWSGIXPROC)glewGetProcAddress((const GLubyte*)"glXBindChannelToWindowSGIX")) == NULL) || r; + r = ((glXChannelRectSGIX = (PFNGLXCHANNELRECTSGIXPROC)glewGetProcAddress((const GLubyte*)"glXChannelRectSGIX")) == NULL) || r; + r = ((glXChannelRectSyncSGIX = (PFNGLXCHANNELRECTSYNCSGIXPROC)glewGetProcAddress((const GLubyte*)"glXChannelRectSyncSGIX")) == NULL) || r; + r = ((glXQueryChannelDeltasSGIX = (PFNGLXQUERYCHANNELDELTASSGIXPROC)glewGetProcAddress((const GLubyte*)"glXQueryChannelDeltasSGIX")) == NULL) || r; + r = ((glXQueryChannelRectSGIX = (PFNGLXQUERYCHANNELRECTSGIXPROC)glewGetProcAddress((const GLubyte*)"glXQueryChannelRectSGIX")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGIX_video_resize */ + +#ifdef GLX_SGIX_visual_select_group + +#endif /* GLX_SGIX_visual_select_group */ + +#ifdef GLX_SGI_cushion + +static GLboolean _glewInit_GLX_SGI_cushion (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXCushionSGI = (PFNGLXCUSHIONSGIPROC)glewGetProcAddress((const GLubyte*)"glXCushionSGI")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGI_cushion */ + +#ifdef GLX_SGI_make_current_read + +static GLboolean _glewInit_GLX_SGI_make_current_read (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetCurrentReadDrawableSGI = (PFNGLXGETCURRENTREADDRAWABLESGIPROC)glewGetProcAddress((const GLubyte*)"glXGetCurrentReadDrawableSGI")) == NULL) || r; + r = ((glXMakeCurrentReadSGI = (PFNGLXMAKECURRENTREADSGIPROC)glewGetProcAddress((const GLubyte*)"glXMakeCurrentReadSGI")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGI_make_current_read */ + +#ifdef GLX_SGI_swap_control + +static GLboolean _glewInit_GLX_SGI_swap_control (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)glewGetProcAddress((const GLubyte*)"glXSwapIntervalSGI")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGI_swap_control */ + +#ifdef GLX_SGI_video_sync + +static GLboolean _glewInit_GLX_SGI_video_sync (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetVideoSyncSGI = (PFNGLXGETVIDEOSYNCSGIPROC)glewGetProcAddress((const GLubyte*)"glXGetVideoSyncSGI")) == NULL) || r; + r = ((glXWaitVideoSyncSGI = (PFNGLXWAITVIDEOSYNCSGIPROC)glewGetProcAddress((const GLubyte*)"glXWaitVideoSyncSGI")) == NULL) || r; + + return r; +} + +#endif /* GLX_SGI_video_sync */ + +#ifdef GLX_SUN_get_transparent_index + +static GLboolean _glewInit_GLX_SUN_get_transparent_index (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetTransparentIndexSUN = (PFNGLXGETTRANSPARENTINDEXSUNPROC)glewGetProcAddress((const GLubyte*)"glXGetTransparentIndexSUN")) == NULL) || r; + + return r; +} + +#endif /* GLX_SUN_get_transparent_index */ + +#ifdef GLX_SUN_video_resize + +static GLboolean _glewInit_GLX_SUN_video_resize (GLXEW_CONTEXT_ARG_DEF_INIT) +{ + GLboolean r = GL_FALSE; + + r = ((glXGetVideoResizeSUN = (PFNGLXGETVIDEORESIZESUNPROC)glewGetProcAddress((const GLubyte*)"glXGetVideoResizeSUN")) == NULL) || r; + r = ((glXVideoResizeSUN = (PFNGLXVIDEORESIZESUNPROC)glewGetProcAddress((const GLubyte*)"glXVideoResizeSUN")) == NULL) || r; + + return r; +} + +#endif /* GLX_SUN_video_resize */ + +/* ------------------------------------------------------------------------ */ + +GLboolean glxewGetExtension (const char* name) +{ + GLubyte* p; + GLubyte* end; + GLuint len = _glewStrLen((const GLubyte*)name); +/* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; */ +/* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay())); */ + if (glXGetClientString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE; + p = (GLubyte*)glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS); + if (0 == p) return GL_FALSE; + end = p + _glewStrLen(p); + while (p < end) + { + GLuint n = _glewStrCLen(p, ' '); + if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE; + p += n+1; + } + return GL_FALSE; +} + +GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST) +{ + int major, minor; + /* initialize core GLX 1.2 */ + if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT)) return GLEW_ERROR_GLX_VERSION_11_ONLY; + /* initialize flags */ + GLXEW_VERSION_1_0 = GL_TRUE; + GLXEW_VERSION_1_1 = GL_TRUE; + GLXEW_VERSION_1_2 = GL_TRUE; + GLXEW_VERSION_1_3 = GL_TRUE; + GLXEW_VERSION_1_4 = GL_TRUE; + /* query GLX version */ + glXQueryVersion(glXGetCurrentDisplay(), &major, &minor); + if (major == 1 && minor <= 3) + { + switch (minor) + { + case 3: + GLXEW_VERSION_1_4 = GL_FALSE; + break; + case 2: + GLXEW_VERSION_1_4 = GL_FALSE; + GLXEW_VERSION_1_3 = GL_FALSE; + break; + default: + return GLEW_ERROR_GLX_VERSION_11_ONLY; + break; + } + } + /* initialize extensions */ +#ifdef GLX_VERSION_1_3 + if (glewExperimental || GLXEW_VERSION_1_3) GLXEW_VERSION_1_3 = !_glewInit_GLX_VERSION_1_3(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_VERSION_1_3 */ +#ifdef GLX_3DFX_multisample + GLXEW_3DFX_multisample = glxewGetExtension("GLX_3DFX_multisample"); +#endif /* GLX_3DFX_multisample */ +#ifdef GLX_ARB_fbconfig_float + GLXEW_ARB_fbconfig_float = glxewGetExtension("GLX_ARB_fbconfig_float"); +#endif /* GLX_ARB_fbconfig_float */ +#ifdef GLX_ARB_get_proc_address + GLXEW_ARB_get_proc_address = glxewGetExtension("GLX_ARB_get_proc_address"); +#endif /* GLX_ARB_get_proc_address */ +#ifdef GLX_ARB_multisample + GLXEW_ARB_multisample = glxewGetExtension("GLX_ARB_multisample"); +#endif /* GLX_ARB_multisample */ +#ifdef GLX_ATI_pixel_format_float + GLXEW_ATI_pixel_format_float = glxewGetExtension("GLX_ATI_pixel_format_float"); +#endif /* GLX_ATI_pixel_format_float */ +#ifdef GLX_ATI_render_texture + GLXEW_ATI_render_texture = glxewGetExtension("GLX_ATI_render_texture"); + if (glewExperimental || GLXEW_ATI_render_texture) GLXEW_ATI_render_texture = !_glewInit_GLX_ATI_render_texture(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_ATI_render_texture */ +#ifdef GLX_EXT_import_context + GLXEW_EXT_import_context = glxewGetExtension("GLX_EXT_import_context"); + if (glewExperimental || GLXEW_EXT_import_context) GLXEW_EXT_import_context = !_glewInit_GLX_EXT_import_context(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_EXT_import_context */ +#ifdef GLX_EXT_scene_marker + GLXEW_EXT_scene_marker = glxewGetExtension("GLX_EXT_scene_marker"); +#endif /* GLX_EXT_scene_marker */ +#ifdef GLX_EXT_visual_info + GLXEW_EXT_visual_info = glxewGetExtension("GLX_EXT_visual_info"); +#endif /* GLX_EXT_visual_info */ +#ifdef GLX_EXT_visual_rating + GLXEW_EXT_visual_rating = glxewGetExtension("GLX_EXT_visual_rating"); +#endif /* GLX_EXT_visual_rating */ +#ifdef GLX_MESA_agp_offset + GLXEW_MESA_agp_offset = glxewGetExtension("GLX_MESA_agp_offset"); + if (glewExperimental || GLXEW_MESA_agp_offset) GLXEW_MESA_agp_offset = !_glewInit_GLX_MESA_agp_offset(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_MESA_agp_offset */ +#ifdef GLX_MESA_copy_sub_buffer + GLXEW_MESA_copy_sub_buffer = glxewGetExtension("GLX_MESA_copy_sub_buffer"); + if (glewExperimental || GLXEW_MESA_copy_sub_buffer) GLXEW_MESA_copy_sub_buffer = !_glewInit_GLX_MESA_copy_sub_buffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_MESA_copy_sub_buffer */ +#ifdef GLX_MESA_pixmap_colormap + GLXEW_MESA_pixmap_colormap = glxewGetExtension("GLX_MESA_pixmap_colormap"); + if (glewExperimental || GLXEW_MESA_pixmap_colormap) GLXEW_MESA_pixmap_colormap = !_glewInit_GLX_MESA_pixmap_colormap(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_MESA_pixmap_colormap */ +#ifdef GLX_MESA_release_buffers + GLXEW_MESA_release_buffers = glxewGetExtension("GLX_MESA_release_buffers"); + if (glewExperimental || GLXEW_MESA_release_buffers) GLXEW_MESA_release_buffers = !_glewInit_GLX_MESA_release_buffers(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_MESA_release_buffers */ +#ifdef GLX_MESA_set_3dfx_mode + GLXEW_MESA_set_3dfx_mode = glxewGetExtension("GLX_MESA_set_3dfx_mode"); + if (glewExperimental || GLXEW_MESA_set_3dfx_mode) GLXEW_MESA_set_3dfx_mode = !_glewInit_GLX_MESA_set_3dfx_mode(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_MESA_set_3dfx_mode */ +#ifdef GLX_NV_float_buffer + GLXEW_NV_float_buffer = glxewGetExtension("GLX_NV_float_buffer"); +#endif /* GLX_NV_float_buffer */ +#ifdef GLX_NV_vertex_array_range + GLXEW_NV_vertex_array_range = glxewGetExtension("GLX_NV_vertex_array_range"); + if (glewExperimental || GLXEW_NV_vertex_array_range) GLXEW_NV_vertex_array_range = !_glewInit_GLX_NV_vertex_array_range(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_NV_vertex_array_range */ +#ifdef GLX_OML_swap_method + GLXEW_OML_swap_method = glxewGetExtension("GLX_OML_swap_method"); +#endif /* GLX_OML_swap_method */ +#if defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#include + GLXEW_OML_sync_control = glxewGetExtension("GLX_OML_sync_control"); + if (glewExperimental || GLXEW_OML_sync_control) GLXEW_OML_sync_control = !_glewInit_GLX_OML_sync_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_OML_sync_control */ +#ifdef GLX_SGIS_blended_overlay + GLXEW_SGIS_blended_overlay = glxewGetExtension("GLX_SGIS_blended_overlay"); +#endif /* GLX_SGIS_blended_overlay */ +#ifdef GLX_SGIS_color_range + GLXEW_SGIS_color_range = glxewGetExtension("GLX_SGIS_color_range"); +#endif /* GLX_SGIS_color_range */ +#ifdef GLX_SGIS_multisample + GLXEW_SGIS_multisample = glxewGetExtension("GLX_SGIS_multisample"); +#endif /* GLX_SGIS_multisample */ +#ifdef GLX_SGIS_shared_multisample + GLXEW_SGIS_shared_multisample = glxewGetExtension("GLX_SGIS_shared_multisample"); +#endif /* GLX_SGIS_shared_multisample */ +#ifdef GLX_SGIX_fbconfig + GLXEW_SGIX_fbconfig = glxewGetExtension("GLX_SGIX_fbconfig"); + if (glewExperimental || GLXEW_SGIX_fbconfig) GLXEW_SGIX_fbconfig = !_glewInit_GLX_SGIX_fbconfig(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGIX_fbconfig */ +#ifdef GLX_SGIX_pbuffer + GLXEW_SGIX_pbuffer = glxewGetExtension("GLX_SGIX_pbuffer"); + if (glewExperimental || GLXEW_SGIX_pbuffer) GLXEW_SGIX_pbuffer = !_glewInit_GLX_SGIX_pbuffer(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGIX_pbuffer */ +#ifdef GLX_SGIX_swap_barrier + GLXEW_SGIX_swap_barrier = glxewGetExtension("GLX_SGIX_swap_barrier"); + if (glewExperimental || GLXEW_SGIX_swap_barrier) GLXEW_SGIX_swap_barrier = !_glewInit_GLX_SGIX_swap_barrier(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGIX_swap_barrier */ +#ifdef GLX_SGIX_swap_group + GLXEW_SGIX_swap_group = glxewGetExtension("GLX_SGIX_swap_group"); + if (glewExperimental || GLXEW_SGIX_swap_group) GLXEW_SGIX_swap_group = !_glewInit_GLX_SGIX_swap_group(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGIX_swap_group */ +#ifdef GLX_SGIX_video_resize + GLXEW_SGIX_video_resize = glxewGetExtension("GLX_SGIX_video_resize"); + if (glewExperimental || GLXEW_SGIX_video_resize) GLXEW_SGIX_video_resize = !_glewInit_GLX_SGIX_video_resize(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGIX_video_resize */ +#ifdef GLX_SGIX_visual_select_group + GLXEW_SGIX_visual_select_group = glxewGetExtension("GLX_SGIX_visual_select_group"); +#endif /* GLX_SGIX_visual_select_group */ +#ifdef GLX_SGI_cushion + GLXEW_SGI_cushion = glxewGetExtension("GLX_SGI_cushion"); + if (glewExperimental || GLXEW_SGI_cushion) GLXEW_SGI_cushion = !_glewInit_GLX_SGI_cushion(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGI_cushion */ +#ifdef GLX_SGI_make_current_read + GLXEW_SGI_make_current_read = glxewGetExtension("GLX_SGI_make_current_read"); + if (glewExperimental || GLXEW_SGI_make_current_read) GLXEW_SGI_make_current_read = !_glewInit_GLX_SGI_make_current_read(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGI_make_current_read */ +#ifdef GLX_SGI_swap_control + GLXEW_SGI_swap_control = glxewGetExtension("GLX_SGI_swap_control"); + if (glewExperimental || GLXEW_SGI_swap_control) GLXEW_SGI_swap_control = !_glewInit_GLX_SGI_swap_control(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGI_swap_control */ +#ifdef GLX_SGI_video_sync + GLXEW_SGI_video_sync = glxewGetExtension("GLX_SGI_video_sync"); + if (glewExperimental || GLXEW_SGI_video_sync) GLXEW_SGI_video_sync = !_glewInit_GLX_SGI_video_sync(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SGI_video_sync */ +#ifdef GLX_SUN_get_transparent_index + GLXEW_SUN_get_transparent_index = glxewGetExtension("GLX_SUN_get_transparent_index"); + if (glewExperimental || GLXEW_SUN_get_transparent_index) GLXEW_SUN_get_transparent_index = !_glewInit_GLX_SUN_get_transparent_index(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SUN_get_transparent_index */ +#ifdef GLX_SUN_video_resize + GLXEW_SUN_video_resize = glxewGetExtension("GLX_SUN_video_resize"); + if (glewExperimental || GLXEW_SUN_video_resize) GLXEW_SUN_video_resize = !_glewInit_GLX_SUN_video_resize(GLEW_CONTEXT_ARG_VAR_INIT); +#endif /* GLX_SUN_video_resize */ + + return GLEW_OK; +} + +#endif /* !__APPLE__ || GLEW_APPLE_GLX */ + +/* ------------------------------------------------------------------------ */ + +const GLubyte* glewGetErrorString (GLenum error) +{ + static const GLubyte* _glewErrorString[] = + { + (const GLubyte*)"No error", + (const GLubyte*)"Missing GL version", + (const GLubyte*)"GL 1.1 and up are not supported", + (const GLubyte*)"GLX 1.2 and up are not supported", + (const GLubyte*)"Unknown error" + }; + const int max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1; + return _glewErrorString[(int)error > max_error ? max_error : (int)error]; +} + +const GLubyte* glewGetString (GLenum name) +{ + static const GLubyte* _glewString[] = + { + (const GLubyte*)NULL, + (const GLubyte*)"1.3.4" + }; + const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1; + return _glewString[(int)name > max_string ? 0 : (int)name]; +} + +/* ------------------------------------------------------------------------ */ + +GLboolean glewExperimental = GL_FALSE; + +#if !defined(GLEW_MX) + +#if defined(_WIN32) +extern GLenum wglewContextInit (void); +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */ +extern GLenum glxewContextInit (void); +#endif /* _WIN32 */ + +GLenum glewInit () +{ + GLenum r; + if ( (r = glewContextInit()) ) return r; +#if defined(_WIN32) + return wglewContextInit(); +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */ + return glxewContextInit(); +#else + return r; +#endif /* _WIN32 */ +} + +#endif /* !GLEW_MX */ +#ifdef GLEW_MX +GLboolean glewContextIsSupported (GLEWContext* ctx, const char* name) +#else +GLboolean glewIsSupported (const char* name) +#endif +{ + GLubyte* pos = (GLubyte*)name; + GLuint len = _glewStrLen(pos); + GLboolean ret = GL_TRUE; + while (ret && len > 0) + { + if (_glewStrSame1(&pos, &len, (const GLubyte*)"GL_", 3)) + { + if (_glewStrSame2(&pos, &len, (const GLubyte*)"VERSION_", 8)) + { +#ifdef GL_VERSION_1_2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_2", 3)) + { + ret = GLEW_VERSION_1_2; + continue; + } +#endif +#ifdef GL_VERSION_1_3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_3", 3)) + { + ret = GLEW_VERSION_1_3; + continue; + } +#endif +#ifdef GL_VERSION_1_4 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_4", 3)) + { + ret = GLEW_VERSION_1_4; + continue; + } +#endif +#ifdef GL_VERSION_1_5 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_5", 3)) + { + ret = GLEW_VERSION_1_5; + continue; + } +#endif +#ifdef GL_VERSION_2_0 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"2_0", 3)) + { + ret = GLEW_VERSION_2_0; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DFX_", 5)) + { +#ifdef GL_3DFX_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLEW_3DFX_multisample; + continue; + } +#endif +#ifdef GL_3DFX_tbuffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"tbuffer", 7)) + { + ret = GLEW_3DFX_tbuffer; + continue; + } +#endif +#ifdef GL_3DFX_texture_compression_FXT1 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression_FXT1", 24)) + { + ret = GLEW_3DFX_texture_compression_FXT1; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"APPLE_", 6)) + { +#ifdef GL_APPLE_client_storage + if (_glewStrSame3(&pos, &len, (const GLubyte*)"client_storage", 14)) + { + ret = GLEW_APPLE_client_storage; + continue; + } +#endif +#ifdef GL_APPLE_element_array + if (_glewStrSame3(&pos, &len, (const GLubyte*)"element_array", 13)) + { + ret = GLEW_APPLE_element_array; + continue; + } +#endif +#ifdef GL_APPLE_fence + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fence", 5)) + { + ret = GLEW_APPLE_fence; + continue; + } +#endif +#ifdef GL_APPLE_float_pixels + if (_glewStrSame3(&pos, &len, (const GLubyte*)"float_pixels", 12)) + { + ret = GLEW_APPLE_float_pixels; + continue; + } +#endif +#ifdef GL_APPLE_pixel_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_buffer", 12)) + { + ret = GLEW_APPLE_pixel_buffer; + continue; + } +#endif +#ifdef GL_APPLE_specular_vector + if (_glewStrSame3(&pos, &len, (const GLubyte*)"specular_vector", 15)) + { + ret = GLEW_APPLE_specular_vector; + continue; + } +#endif +#ifdef GL_APPLE_texture_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_range", 13)) + { + ret = GLEW_APPLE_texture_range; + continue; + } +#endif +#ifdef GL_APPLE_transform_hint + if (_glewStrSame3(&pos, &len, (const GLubyte*)"transform_hint", 14)) + { + ret = GLEW_APPLE_transform_hint; + continue; + } +#endif +#ifdef GL_APPLE_vertex_array_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_object", 19)) + { + ret = GLEW_APPLE_vertex_array_object; + continue; + } +#endif +#ifdef GL_APPLE_vertex_array_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_range", 18)) + { + ret = GLEW_APPLE_vertex_array_range; + continue; + } +#endif +#ifdef GL_APPLE_ycbcr_422 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"ycbcr_422", 9)) + { + ret = GLEW_APPLE_ycbcr_422; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ARB_", 4)) + { +#ifdef GL_ARB_color_buffer_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_buffer_float", 18)) + { + ret = GLEW_ARB_color_buffer_float; + continue; + } +#endif +#ifdef GL_ARB_depth_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"depth_texture", 13)) + { + ret = GLEW_ARB_depth_texture; + continue; + } +#endif +#ifdef GL_ARB_draw_buffers + if (_glewStrSame3(&pos, &len, (const GLubyte*)"draw_buffers", 12)) + { + ret = GLEW_ARB_draw_buffers; + continue; + } +#endif +#ifdef GL_ARB_fragment_program + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_program", 16)) + { + ret = GLEW_ARB_fragment_program; + continue; + } +#endif +#ifdef GL_ARB_fragment_program_shadow + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_program_shadow", 23)) + { + ret = GLEW_ARB_fragment_program_shadow; + continue; + } +#endif +#ifdef GL_ARB_fragment_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_shader", 15)) + { + ret = GLEW_ARB_fragment_shader; + continue; + } +#endif +#ifdef GL_ARB_half_float_pixel + if (_glewStrSame3(&pos, &len, (const GLubyte*)"half_float_pixel", 16)) + { + ret = GLEW_ARB_half_float_pixel; + continue; + } +#endif +#ifdef GL_ARB_imaging + if (_glewStrSame3(&pos, &len, (const GLubyte*)"imaging", 7)) + { + ret = GLEW_ARB_imaging; + continue; + } +#endif +#ifdef GL_ARB_matrix_palette + if (_glewStrSame3(&pos, &len, (const GLubyte*)"matrix_palette", 14)) + { + ret = GLEW_ARB_matrix_palette; + continue; + } +#endif +#ifdef GL_ARB_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLEW_ARB_multisample; + continue; + } +#endif +#ifdef GL_ARB_multitexture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multitexture", 12)) + { + ret = GLEW_ARB_multitexture; + continue; + } +#endif +#ifdef GL_ARB_occlusion_query + if (_glewStrSame3(&pos, &len, (const GLubyte*)"occlusion_query", 15)) + { + ret = GLEW_ARB_occlusion_query; + continue; + } +#endif +#ifdef GL_ARB_pixel_buffer_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_buffer_object", 19)) + { + ret = GLEW_ARB_pixel_buffer_object; + continue; + } +#endif +#ifdef GL_ARB_point_parameters + if (_glewStrSame3(&pos, &len, (const GLubyte*)"point_parameters", 16)) + { + ret = GLEW_ARB_point_parameters; + continue; + } +#endif +#ifdef GL_ARB_point_sprite + if (_glewStrSame3(&pos, &len, (const GLubyte*)"point_sprite", 12)) + { + ret = GLEW_ARB_point_sprite; + continue; + } +#endif +#ifdef GL_ARB_shader_objects + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_objects", 14)) + { + ret = GLEW_ARB_shader_objects; + continue; + } +#endif +#ifdef GL_ARB_shading_language_100 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_100", 20)) + { + ret = GLEW_ARB_shading_language_100; + continue; + } +#endif +#ifdef GL_ARB_shadow + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow", 6)) + { + ret = GLEW_ARB_shadow; + continue; + } +#endif +#ifdef GL_ARB_shadow_ambient + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow_ambient", 14)) + { + ret = GLEW_ARB_shadow_ambient; + continue; + } +#endif +#ifdef GL_ARB_texture_border_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_border_clamp", 20)) + { + ret = GLEW_ARB_texture_border_clamp; + continue; + } +#endif +#ifdef GL_ARB_texture_compression + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression", 19)) + { + ret = GLEW_ARB_texture_compression; + continue; + } +#endif +#ifdef GL_ARB_texture_cube_map + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_cube_map", 16)) + { + ret = GLEW_ARB_texture_cube_map; + continue; + } +#endif +#ifdef GL_ARB_texture_env_add + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_add", 15)) + { + ret = GLEW_ARB_texture_env_add; + continue; + } +#endif +#ifdef GL_ARB_texture_env_combine + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_combine", 19)) + { + ret = GLEW_ARB_texture_env_combine; + continue; + } +#endif +#ifdef GL_ARB_texture_env_crossbar + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_crossbar", 20)) + { + ret = GLEW_ARB_texture_env_crossbar; + continue; + } +#endif +#ifdef GL_ARB_texture_env_dot3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_dot3", 16)) + { + ret = GLEW_ARB_texture_env_dot3; + continue; + } +#endif +#ifdef GL_ARB_texture_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_float", 13)) + { + ret = GLEW_ARB_texture_float; + continue; + } +#endif +#ifdef GL_ARB_texture_mirrored_repeat + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_mirrored_repeat", 23)) + { + ret = GLEW_ARB_texture_mirrored_repeat; + continue; + } +#endif +#ifdef GL_ARB_texture_non_power_of_two + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_non_power_of_two", 24)) + { + ret = GLEW_ARB_texture_non_power_of_two; + continue; + } +#endif +#ifdef GL_ARB_texture_rectangle + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_rectangle", 17)) + { + ret = GLEW_ARB_texture_rectangle; + continue; + } +#endif +#ifdef GL_ARB_transpose_matrix + if (_glewStrSame3(&pos, &len, (const GLubyte*)"transpose_matrix", 16)) + { + ret = GLEW_ARB_transpose_matrix; + continue; + } +#endif +#ifdef GL_ARB_vertex_blend + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_blend", 12)) + { + ret = GLEW_ARB_vertex_blend; + continue; + } +#endif +#ifdef GL_ARB_vertex_buffer_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_buffer_object", 20)) + { + ret = GLEW_ARB_vertex_buffer_object; + continue; + } +#endif +#ifdef GL_ARB_vertex_program + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program", 14)) + { + ret = GLEW_ARB_vertex_program; + continue; + } +#endif +#ifdef GL_ARB_vertex_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_shader", 13)) + { + ret = GLEW_ARB_vertex_shader; + continue; + } +#endif +#ifdef GL_ARB_window_pos + if (_glewStrSame3(&pos, &len, (const GLubyte*)"window_pos", 10)) + { + ret = GLEW_ARB_window_pos; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ATIX_", 5)) + { +#ifdef GL_ATIX_point_sprites + if (_glewStrSame3(&pos, &len, (const GLubyte*)"point_sprites", 13)) + { + ret = GLEW_ATIX_point_sprites; + continue; + } +#endif +#ifdef GL_ATIX_texture_env_combine3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_combine3", 20)) + { + ret = GLEW_ATIX_texture_env_combine3; + continue; + } +#endif +#ifdef GL_ATIX_texture_env_route + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_route", 17)) + { + ret = GLEW_ATIX_texture_env_route; + continue; + } +#endif +#ifdef GL_ATIX_vertex_shader_output_point_size + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_shader_output_point_size", 31)) + { + ret = GLEW_ATIX_vertex_shader_output_point_size; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ATI_", 4)) + { +#ifdef GL_ATI_draw_buffers + if (_glewStrSame3(&pos, &len, (const GLubyte*)"draw_buffers", 12)) + { + ret = GLEW_ATI_draw_buffers; + continue; + } +#endif +#ifdef GL_ATI_element_array + if (_glewStrSame3(&pos, &len, (const GLubyte*)"element_array", 13)) + { + ret = GLEW_ATI_element_array; + continue; + } +#endif +#ifdef GL_ATI_envmap_bumpmap + if (_glewStrSame3(&pos, &len, (const GLubyte*)"envmap_bumpmap", 14)) + { + ret = GLEW_ATI_envmap_bumpmap; + continue; + } +#endif +#ifdef GL_ATI_fragment_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_shader", 15)) + { + ret = GLEW_ATI_fragment_shader; + continue; + } +#endif +#ifdef GL_ATI_map_object_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"map_object_buffer", 17)) + { + ret = GLEW_ATI_map_object_buffer; + continue; + } +#endif +#ifdef GL_ATI_pn_triangles + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pn_triangles", 12)) + { + ret = GLEW_ATI_pn_triangles; + continue; + } +#endif +#ifdef GL_ATI_separate_stencil + if (_glewStrSame3(&pos, &len, (const GLubyte*)"separate_stencil", 16)) + { + ret = GLEW_ATI_separate_stencil; + continue; + } +#endif +#ifdef GL_ATI_text_fragment_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"text_fragment_shader", 20)) + { + ret = GLEW_ATI_text_fragment_shader; + continue; + } +#endif +#ifdef GL_ATI_texture_compression_3dc + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression_3dc", 23)) + { + ret = GLEW_ATI_texture_compression_3dc; + continue; + } +#endif +#ifdef GL_ATI_texture_env_combine3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_combine3", 20)) + { + ret = GLEW_ATI_texture_env_combine3; + continue; + } +#endif +#ifdef GL_ATI_texture_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_float", 13)) + { + ret = GLEW_ATI_texture_float; + continue; + } +#endif +#ifdef GL_ATI_texture_mirror_once + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_mirror_once", 19)) + { + ret = GLEW_ATI_texture_mirror_once; + continue; + } +#endif +#ifdef GL_ATI_vertex_array_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_object", 19)) + { + ret = GLEW_ATI_vertex_array_object; + continue; + } +#endif +#ifdef GL_ATI_vertex_attrib_array_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_attrib_array_object", 26)) + { + ret = GLEW_ATI_vertex_attrib_array_object; + continue; + } +#endif +#ifdef GL_ATI_vertex_streams + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_streams", 14)) + { + ret = GLEW_ATI_vertex_streams; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"EXT_", 4)) + { +#ifdef GL_EXT_422_pixels + if (_glewStrSame3(&pos, &len, (const GLubyte*)"422_pixels", 10)) + { + ret = GLEW_EXT_422_pixels; + continue; + } +#endif +#ifdef GL_EXT_Cg_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"Cg_shader", 9)) + { + ret = GLEW_EXT_Cg_shader; + continue; + } +#endif +#ifdef GL_EXT_abgr + if (_glewStrSame3(&pos, &len, (const GLubyte*)"abgr", 4)) + { + ret = GLEW_EXT_abgr; + continue; + } +#endif +#ifdef GL_EXT_bgra + if (_glewStrSame3(&pos, &len, (const GLubyte*)"bgra", 4)) + { + ret = GLEW_EXT_bgra; + continue; + } +#endif +#ifdef GL_EXT_blend_color + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_color", 11)) + { + ret = GLEW_EXT_blend_color; + continue; + } +#endif +#ifdef GL_EXT_blend_equation_separate + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_equation_separate", 23)) + { + ret = GLEW_EXT_blend_equation_separate; + continue; + } +#endif +#ifdef GL_EXT_blend_func_separate + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_func_separate", 19)) + { + ret = GLEW_EXT_blend_func_separate; + continue; + } +#endif +#ifdef GL_EXT_blend_logic_op + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_logic_op", 14)) + { + ret = GLEW_EXT_blend_logic_op; + continue; + } +#endif +#ifdef GL_EXT_blend_minmax + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_minmax", 12)) + { + ret = GLEW_EXT_blend_minmax; + continue; + } +#endif +#ifdef GL_EXT_blend_subtract + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_subtract", 14)) + { + ret = GLEW_EXT_blend_subtract; + continue; + } +#endif +#ifdef GL_EXT_clip_volume_hint + if (_glewStrSame3(&pos, &len, (const GLubyte*)"clip_volume_hint", 16)) + { + ret = GLEW_EXT_clip_volume_hint; + continue; + } +#endif +#ifdef GL_EXT_cmyka + if (_glewStrSame3(&pos, &len, (const GLubyte*)"cmyka", 5)) + { + ret = GLEW_EXT_cmyka; + continue; + } +#endif +#ifdef GL_EXT_color_subtable + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_subtable", 14)) + { + ret = GLEW_EXT_color_subtable; + continue; + } +#endif +#ifdef GL_EXT_compiled_vertex_array + if (_glewStrSame3(&pos, &len, (const GLubyte*)"compiled_vertex_array", 21)) + { + ret = GLEW_EXT_compiled_vertex_array; + continue; + } +#endif +#ifdef GL_EXT_convolution + if (_glewStrSame3(&pos, &len, (const GLubyte*)"convolution", 11)) + { + ret = GLEW_EXT_convolution; + continue; + } +#endif +#ifdef GL_EXT_coordinate_frame + if (_glewStrSame3(&pos, &len, (const GLubyte*)"coordinate_frame", 16)) + { + ret = GLEW_EXT_coordinate_frame; + continue; + } +#endif +#ifdef GL_EXT_copy_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"copy_texture", 12)) + { + ret = GLEW_EXT_copy_texture; + continue; + } +#endif +#ifdef GL_EXT_cull_vertex + if (_glewStrSame3(&pos, &len, (const GLubyte*)"cull_vertex", 11)) + { + ret = GLEW_EXT_cull_vertex; + continue; + } +#endif +#ifdef GL_EXT_depth_bounds_test + if (_glewStrSame3(&pos, &len, (const GLubyte*)"depth_bounds_test", 17)) + { + ret = GLEW_EXT_depth_bounds_test; + continue; + } +#endif +#ifdef GL_EXT_draw_range_elements + if (_glewStrSame3(&pos, &len, (const GLubyte*)"draw_range_elements", 19)) + { + ret = GLEW_EXT_draw_range_elements; + continue; + } +#endif +#ifdef GL_EXT_fog_coord + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fog_coord", 9)) + { + ret = GLEW_EXT_fog_coord; + continue; + } +#endif +#ifdef GL_EXT_fragment_lighting + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_lighting", 17)) + { + ret = GLEW_EXT_fragment_lighting; + continue; + } +#endif +#ifdef GL_EXT_framebuffer_blit + if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_blit", 16)) + { + ret = GLEW_EXT_framebuffer_blit; + continue; + } +#endif +#ifdef GL_EXT_framebuffer_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_multisample", 23)) + { + ret = GLEW_EXT_framebuffer_multisample; + continue; + } +#endif +#ifdef GL_EXT_framebuffer_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_object", 18)) + { + ret = GLEW_EXT_framebuffer_object; + continue; + } +#endif +#ifdef GL_EXT_histogram + if (_glewStrSame3(&pos, &len, (const GLubyte*)"histogram", 9)) + { + ret = GLEW_EXT_histogram; + continue; + } +#endif +#ifdef GL_EXT_index_array_formats + if (_glewStrSame3(&pos, &len, (const GLubyte*)"index_array_formats", 19)) + { + ret = GLEW_EXT_index_array_formats; + continue; + } +#endif +#ifdef GL_EXT_index_func + if (_glewStrSame3(&pos, &len, (const GLubyte*)"index_func", 10)) + { + ret = GLEW_EXT_index_func; + continue; + } +#endif +#ifdef GL_EXT_index_material + if (_glewStrSame3(&pos, &len, (const GLubyte*)"index_material", 14)) + { + ret = GLEW_EXT_index_material; + continue; + } +#endif +#ifdef GL_EXT_index_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"index_texture", 13)) + { + ret = GLEW_EXT_index_texture; + continue; + } +#endif +#ifdef GL_EXT_light_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"light_texture", 13)) + { + ret = GLEW_EXT_light_texture; + continue; + } +#endif +#ifdef GL_EXT_misc_attribute + if (_glewStrSame3(&pos, &len, (const GLubyte*)"misc_attribute", 14)) + { + ret = GLEW_EXT_misc_attribute; + continue; + } +#endif +#ifdef GL_EXT_multi_draw_arrays + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multi_draw_arrays", 17)) + { + ret = GLEW_EXT_multi_draw_arrays; + continue; + } +#endif +#ifdef GL_EXT_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLEW_EXT_multisample; + continue; + } +#endif +#ifdef GL_EXT_packed_depth_stencil + if (_glewStrSame3(&pos, &len, (const GLubyte*)"packed_depth_stencil", 20)) + { + ret = GLEW_EXT_packed_depth_stencil; + continue; + } +#endif +#ifdef GL_EXT_packed_pixels + if (_glewStrSame3(&pos, &len, (const GLubyte*)"packed_pixels", 13)) + { + ret = GLEW_EXT_packed_pixels; + continue; + } +#endif +#ifdef GL_EXT_paletted_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"paletted_texture", 16)) + { + ret = GLEW_EXT_paletted_texture; + continue; + } +#endif +#ifdef GL_EXT_pixel_buffer_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_buffer_object", 19)) + { + ret = GLEW_EXT_pixel_buffer_object; + continue; + } +#endif +#ifdef GL_EXT_pixel_transform + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_transform", 15)) + { + ret = GLEW_EXT_pixel_transform; + continue; + } +#endif +#ifdef GL_EXT_pixel_transform_color_table + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_transform_color_table", 27)) + { + ret = GLEW_EXT_pixel_transform_color_table; + continue; + } +#endif +#ifdef GL_EXT_point_parameters + if (_glewStrSame3(&pos, &len, (const GLubyte*)"point_parameters", 16)) + { + ret = GLEW_EXT_point_parameters; + continue; + } +#endif +#ifdef GL_EXT_polygon_offset + if (_glewStrSame3(&pos, &len, (const GLubyte*)"polygon_offset", 14)) + { + ret = GLEW_EXT_polygon_offset; + continue; + } +#endif +#ifdef GL_EXT_rescale_normal + if (_glewStrSame3(&pos, &len, (const GLubyte*)"rescale_normal", 14)) + { + ret = GLEW_EXT_rescale_normal; + continue; + } +#endif +#ifdef GL_EXT_scene_marker + if (_glewStrSame3(&pos, &len, (const GLubyte*)"scene_marker", 12)) + { + ret = GLEW_EXT_scene_marker; + continue; + } +#endif +#ifdef GL_EXT_secondary_color + if (_glewStrSame3(&pos, &len, (const GLubyte*)"secondary_color", 15)) + { + ret = GLEW_EXT_secondary_color; + continue; + } +#endif +#ifdef GL_EXT_separate_specular_color + if (_glewStrSame3(&pos, &len, (const GLubyte*)"separate_specular_color", 23)) + { + ret = GLEW_EXT_separate_specular_color; + continue; + } +#endif +#ifdef GL_EXT_shadow_funcs + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow_funcs", 12)) + { + ret = GLEW_EXT_shadow_funcs; + continue; + } +#endif +#ifdef GL_EXT_shared_texture_palette + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shared_texture_palette", 22)) + { + ret = GLEW_EXT_shared_texture_palette; + continue; + } +#endif +#ifdef GL_EXT_stencil_clear_tag + if (_glewStrSame3(&pos, &len, (const GLubyte*)"stencil_clear_tag", 17)) + { + ret = GLEW_EXT_stencil_clear_tag; + continue; + } +#endif +#ifdef GL_EXT_stencil_two_side + if (_glewStrSame3(&pos, &len, (const GLubyte*)"stencil_two_side", 16)) + { + ret = GLEW_EXT_stencil_two_side; + continue; + } +#endif +#ifdef GL_EXT_stencil_wrap + if (_glewStrSame3(&pos, &len, (const GLubyte*)"stencil_wrap", 12)) + { + ret = GLEW_EXT_stencil_wrap; + continue; + } +#endif +#ifdef GL_EXT_subtexture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"subtexture", 10)) + { + ret = GLEW_EXT_subtexture; + continue; + } +#endif +#ifdef GL_EXT_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture", 7)) + { + ret = GLEW_EXT_texture; + continue; + } +#endif +#ifdef GL_EXT_texture3D + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture3D", 9)) + { + ret = GLEW_EXT_texture3D; + continue; + } +#endif +#ifdef GL_EXT_texture_compression_dxt1 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression_dxt1", 24)) + { + ret = GLEW_EXT_texture_compression_dxt1; + continue; + } +#endif +#ifdef GL_EXT_texture_compression_s3tc + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression_s3tc", 24)) + { + ret = GLEW_EXT_texture_compression_s3tc; + continue; + } +#endif +#ifdef GL_EXT_texture_cube_map + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_cube_map", 16)) + { + ret = GLEW_EXT_texture_cube_map; + continue; + } +#endif +#ifdef GL_EXT_texture_edge_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_edge_clamp", 18)) + { + ret = GLEW_EXT_texture_edge_clamp; + continue; + } +#endif +#ifdef GL_EXT_texture_env + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env", 11)) + { + ret = GLEW_EXT_texture_env; + continue; + } +#endif +#ifdef GL_EXT_texture_env_add + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_add", 15)) + { + ret = GLEW_EXT_texture_env_add; + continue; + } +#endif +#ifdef GL_EXT_texture_env_combine + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_combine", 19)) + { + ret = GLEW_EXT_texture_env_combine; + continue; + } +#endif +#ifdef GL_EXT_texture_env_dot3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_dot3", 16)) + { + ret = GLEW_EXT_texture_env_dot3; + continue; + } +#endif +#ifdef GL_EXT_texture_filter_anisotropic + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_filter_anisotropic", 26)) + { + ret = GLEW_EXT_texture_filter_anisotropic; + continue; + } +#endif +#ifdef GL_EXT_texture_lod_bias + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_lod_bias", 16)) + { + ret = GLEW_EXT_texture_lod_bias; + continue; + } +#endif +#ifdef GL_EXT_texture_mirror_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_mirror_clamp", 20)) + { + ret = GLEW_EXT_texture_mirror_clamp; + continue; + } +#endif +#ifdef GL_EXT_texture_object + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_object", 14)) + { + ret = GLEW_EXT_texture_object; + continue; + } +#endif +#ifdef GL_EXT_texture_perturb_normal + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_perturb_normal", 22)) + { + ret = GLEW_EXT_texture_perturb_normal; + continue; + } +#endif +#ifdef GL_EXT_texture_rectangle + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_rectangle", 17)) + { + ret = GLEW_EXT_texture_rectangle; + continue; + } +#endif +#ifdef GL_EXT_texture_sRGB + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_sRGB", 12)) + { + ret = GLEW_EXT_texture_sRGB; + continue; + } +#endif +#ifdef GL_EXT_vertex_array + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array", 12)) + { + ret = GLEW_EXT_vertex_array; + continue; + } +#endif +#ifdef GL_EXT_vertex_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_shader", 13)) + { + ret = GLEW_EXT_vertex_shader; + continue; + } +#endif +#ifdef GL_EXT_vertex_weighting + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_weighting", 16)) + { + ret = GLEW_EXT_vertex_weighting; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"GREMEDY_", 8)) + { +#ifdef GL_GREMEDY_string_marker + if (_glewStrSame3(&pos, &len, (const GLubyte*)"string_marker", 13)) + { + ret = GLEW_GREMEDY_string_marker; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"HP_", 3)) + { +#ifdef GL_HP_convolution_border_modes + if (_glewStrSame3(&pos, &len, (const GLubyte*)"convolution_border_modes", 24)) + { + ret = GLEW_HP_convolution_border_modes; + continue; + } +#endif +#ifdef GL_HP_image_transform + if (_glewStrSame3(&pos, &len, (const GLubyte*)"image_transform", 15)) + { + ret = GLEW_HP_image_transform; + continue; + } +#endif +#ifdef GL_HP_occlusion_test + if (_glewStrSame3(&pos, &len, (const GLubyte*)"occlusion_test", 14)) + { + ret = GLEW_HP_occlusion_test; + continue; + } +#endif +#ifdef GL_HP_texture_lighting + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_lighting", 16)) + { + ret = GLEW_HP_texture_lighting; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"IBM_", 4)) + { +#ifdef GL_IBM_cull_vertex + if (_glewStrSame3(&pos, &len, (const GLubyte*)"cull_vertex", 11)) + { + ret = GLEW_IBM_cull_vertex; + continue; + } +#endif +#ifdef GL_IBM_multimode_draw_arrays + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multimode_draw_arrays", 21)) + { + ret = GLEW_IBM_multimode_draw_arrays; + continue; + } +#endif +#ifdef GL_IBM_rasterpos_clip + if (_glewStrSame3(&pos, &len, (const GLubyte*)"rasterpos_clip", 14)) + { + ret = GLEW_IBM_rasterpos_clip; + continue; + } +#endif +#ifdef GL_IBM_static_data + if (_glewStrSame3(&pos, &len, (const GLubyte*)"static_data", 11)) + { + ret = GLEW_IBM_static_data; + continue; + } +#endif +#ifdef GL_IBM_texture_mirrored_repeat + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_mirrored_repeat", 23)) + { + ret = GLEW_IBM_texture_mirrored_repeat; + continue; + } +#endif +#ifdef GL_IBM_vertex_array_lists + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_lists", 18)) + { + ret = GLEW_IBM_vertex_array_lists; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"INGR_", 5)) + { +#ifdef GL_INGR_color_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_clamp", 11)) + { + ret = GLEW_INGR_color_clamp; + continue; + } +#endif +#ifdef GL_INGR_interlace_read + if (_glewStrSame3(&pos, &len, (const GLubyte*)"interlace_read", 14)) + { + ret = GLEW_INGR_interlace_read; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"INTEL_", 6)) + { +#ifdef GL_INTEL_parallel_arrays + if (_glewStrSame3(&pos, &len, (const GLubyte*)"parallel_arrays", 15)) + { + ret = GLEW_INTEL_parallel_arrays; + continue; + } +#endif +#ifdef GL_INTEL_texture_scissor + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_scissor", 15)) + { + ret = GLEW_INTEL_texture_scissor; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"KTX_", 4)) + { +#ifdef GL_KTX_buffer_region + if (_glewStrSame3(&pos, &len, (const GLubyte*)"buffer_region", 13)) + { + ret = GLEW_KTX_buffer_region; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"MESAX_", 6)) + { +#ifdef GL_MESAX_texture_stack + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_stack", 13)) + { + ret = GLEW_MESAX_texture_stack; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"MESA_", 5)) + { +#ifdef GL_MESA_pack_invert + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pack_invert", 11)) + { + ret = GLEW_MESA_pack_invert; + continue; + } +#endif +#ifdef GL_MESA_resize_buffers + if (_glewStrSame3(&pos, &len, (const GLubyte*)"resize_buffers", 14)) + { + ret = GLEW_MESA_resize_buffers; + continue; + } +#endif +#ifdef GL_MESA_window_pos + if (_glewStrSame3(&pos, &len, (const GLubyte*)"window_pos", 10)) + { + ret = GLEW_MESA_window_pos; + continue; + } +#endif +#ifdef GL_MESA_ycbcr_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"ycbcr_texture", 13)) + { + ret = GLEW_MESA_ycbcr_texture; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"NV_", 3)) + { +#ifdef GL_NV_blend_square + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_square", 12)) + { + ret = GLEW_NV_blend_square; + continue; + } +#endif +#ifdef GL_NV_copy_depth_to_color + if (_glewStrSame3(&pos, &len, (const GLubyte*)"copy_depth_to_color", 19)) + { + ret = GLEW_NV_copy_depth_to_color; + continue; + } +#endif +#ifdef GL_NV_depth_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"depth_clamp", 11)) + { + ret = GLEW_NV_depth_clamp; + continue; + } +#endif +#ifdef GL_NV_evaluators + if (_glewStrSame3(&pos, &len, (const GLubyte*)"evaluators", 10)) + { + ret = GLEW_NV_evaluators; + continue; + } +#endif +#ifdef GL_NV_fence + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fence", 5)) + { + ret = GLEW_NV_fence; + continue; + } +#endif +#ifdef GL_NV_float_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"float_buffer", 12)) + { + ret = GLEW_NV_float_buffer; + continue; + } +#endif +#ifdef GL_NV_fog_distance + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fog_distance", 12)) + { + ret = GLEW_NV_fog_distance; + continue; + } +#endif +#ifdef GL_NV_fragment_program + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_program", 16)) + { + ret = GLEW_NV_fragment_program; + continue; + } +#endif +#ifdef GL_NV_fragment_program2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_program2", 17)) + { + ret = GLEW_NV_fragment_program2; + continue; + } +#endif +#ifdef GL_NV_fragment_program_option + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_program_option", 23)) + { + ret = GLEW_NV_fragment_program_option; + continue; + } +#endif +#ifdef GL_NV_half_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"half_float", 10)) + { + ret = GLEW_NV_half_float; + continue; + } +#endif +#ifdef GL_NV_light_max_exponent + if (_glewStrSame3(&pos, &len, (const GLubyte*)"light_max_exponent", 18)) + { + ret = GLEW_NV_light_max_exponent; + continue; + } +#endif +#ifdef GL_NV_multisample_filter_hint + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample_filter_hint", 23)) + { + ret = GLEW_NV_multisample_filter_hint; + continue; + } +#endif +#ifdef GL_NV_occlusion_query + if (_glewStrSame3(&pos, &len, (const GLubyte*)"occlusion_query", 15)) + { + ret = GLEW_NV_occlusion_query; + continue; + } +#endif +#ifdef GL_NV_packed_depth_stencil + if (_glewStrSame3(&pos, &len, (const GLubyte*)"packed_depth_stencil", 20)) + { + ret = GLEW_NV_packed_depth_stencil; + continue; + } +#endif +#ifdef GL_NV_pixel_data_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_data_range", 16)) + { + ret = GLEW_NV_pixel_data_range; + continue; + } +#endif +#ifdef GL_NV_point_sprite + if (_glewStrSame3(&pos, &len, (const GLubyte*)"point_sprite", 12)) + { + ret = GLEW_NV_point_sprite; + continue; + } +#endif +#ifdef GL_NV_primitive_restart + if (_glewStrSame3(&pos, &len, (const GLubyte*)"primitive_restart", 17)) + { + ret = GLEW_NV_primitive_restart; + continue; + } +#endif +#ifdef GL_NV_register_combiners + if (_glewStrSame3(&pos, &len, (const GLubyte*)"register_combiners", 18)) + { + ret = GLEW_NV_register_combiners; + continue; + } +#endif +#ifdef GL_NV_register_combiners2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"register_combiners2", 19)) + { + ret = GLEW_NV_register_combiners2; + continue; + } +#endif +#ifdef GL_NV_texgen_emboss + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texgen_emboss", 13)) + { + ret = GLEW_NV_texgen_emboss; + continue; + } +#endif +#ifdef GL_NV_texgen_reflection + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texgen_reflection", 17)) + { + ret = GLEW_NV_texgen_reflection; + continue; + } +#endif +#ifdef GL_NV_texture_compression_vtc + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_compression_vtc", 23)) + { + ret = GLEW_NV_texture_compression_vtc; + continue; + } +#endif +#ifdef GL_NV_texture_env_combine4 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_env_combine4", 20)) + { + ret = GLEW_NV_texture_env_combine4; + continue; + } +#endif +#ifdef GL_NV_texture_expand_normal + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_expand_normal", 21)) + { + ret = GLEW_NV_texture_expand_normal; + continue; + } +#endif +#ifdef GL_NV_texture_rectangle + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_rectangle", 17)) + { + ret = GLEW_NV_texture_rectangle; + continue; + } +#endif +#ifdef GL_NV_texture_shader + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_shader", 14)) + { + ret = GLEW_NV_texture_shader; + continue; + } +#endif +#ifdef GL_NV_texture_shader2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_shader2", 15)) + { + ret = GLEW_NV_texture_shader2; + continue; + } +#endif +#ifdef GL_NV_texture_shader3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_shader3", 15)) + { + ret = GLEW_NV_texture_shader3; + continue; + } +#endif +#ifdef GL_NV_vertex_array_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_range", 18)) + { + ret = GLEW_NV_vertex_array_range; + continue; + } +#endif +#ifdef GL_NV_vertex_array_range2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_range2", 19)) + { + ret = GLEW_NV_vertex_array_range2; + continue; + } +#endif +#ifdef GL_NV_vertex_program + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program", 14)) + { + ret = GLEW_NV_vertex_program; + continue; + } +#endif +#ifdef GL_NV_vertex_program1_1 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program1_1", 17)) + { + ret = GLEW_NV_vertex_program1_1; + continue; + } +#endif +#ifdef GL_NV_vertex_program2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program2", 15)) + { + ret = GLEW_NV_vertex_program2; + continue; + } +#endif +#ifdef GL_NV_vertex_program2_option + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program2_option", 22)) + { + ret = GLEW_NV_vertex_program2_option; + continue; + } +#endif +#ifdef GL_NV_vertex_program3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_program3", 15)) + { + ret = GLEW_NV_vertex_program3; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"OML_", 4)) + { +#ifdef GL_OML_interlace + if (_glewStrSame3(&pos, &len, (const GLubyte*)"interlace", 9)) + { + ret = GLEW_OML_interlace; + continue; + } +#endif +#ifdef GL_OML_resample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"resample", 8)) + { + ret = GLEW_OML_resample; + continue; + } +#endif +#ifdef GL_OML_subsample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"subsample", 9)) + { + ret = GLEW_OML_subsample; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"PGI_", 4)) + { +#ifdef GL_PGI_misc_hints + if (_glewStrSame3(&pos, &len, (const GLubyte*)"misc_hints", 10)) + { + ret = GLEW_PGI_misc_hints; + continue; + } +#endif +#ifdef GL_PGI_vertex_hints + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_hints", 12)) + { + ret = GLEW_PGI_vertex_hints; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"REND_", 5)) + { +#ifdef GL_REND_screen_coordinates + if (_glewStrSame3(&pos, &len, (const GLubyte*)"screen_coordinates", 18)) + { + ret = GLEW_REND_screen_coordinates; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"S3_", 3)) + { +#ifdef GL_S3_s3tc + if (_glewStrSame3(&pos, &len, (const GLubyte*)"s3tc", 4)) + { + ret = GLEW_S3_s3tc; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGIS_", 5)) + { +#ifdef GL_SGIS_color_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_range", 11)) + { + ret = GLEW_SGIS_color_range; + continue; + } +#endif +#ifdef GL_SGIS_detail_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"detail_texture", 14)) + { + ret = GLEW_SGIS_detail_texture; + continue; + } +#endif +#ifdef GL_SGIS_fog_function + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fog_function", 12)) + { + ret = GLEW_SGIS_fog_function; + continue; + } +#endif +#ifdef GL_SGIS_generate_mipmap + if (_glewStrSame3(&pos, &len, (const GLubyte*)"generate_mipmap", 15)) + { + ret = GLEW_SGIS_generate_mipmap; + continue; + } +#endif +#ifdef GL_SGIS_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLEW_SGIS_multisample; + continue; + } +#endif +#ifdef GL_SGIS_pixel_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_texture", 13)) + { + ret = GLEW_SGIS_pixel_texture; + continue; + } +#endif +#ifdef GL_SGIS_sharpen_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"sharpen_texture", 15)) + { + ret = GLEW_SGIS_sharpen_texture; + continue; + } +#endif +#ifdef GL_SGIS_texture4D + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture4D", 9)) + { + ret = GLEW_SGIS_texture4D; + continue; + } +#endif +#ifdef GL_SGIS_texture_border_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_border_clamp", 20)) + { + ret = GLEW_SGIS_texture_border_clamp; + continue; + } +#endif +#ifdef GL_SGIS_texture_edge_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_edge_clamp", 18)) + { + ret = GLEW_SGIS_texture_edge_clamp; + continue; + } +#endif +#ifdef GL_SGIS_texture_filter4 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_filter4", 15)) + { + ret = GLEW_SGIS_texture_filter4; + continue; + } +#endif +#ifdef GL_SGIS_texture_lod + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_lod", 11)) + { + ret = GLEW_SGIS_texture_lod; + continue; + } +#endif +#ifdef GL_SGIS_texture_select + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_select", 14)) + { + ret = GLEW_SGIS_texture_select; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGIX_", 5)) + { +#ifdef GL_SGIX_async + if (_glewStrSame3(&pos, &len, (const GLubyte*)"async", 5)) + { + ret = GLEW_SGIX_async; + continue; + } +#endif +#ifdef GL_SGIX_async_histogram + if (_glewStrSame3(&pos, &len, (const GLubyte*)"async_histogram", 15)) + { + ret = GLEW_SGIX_async_histogram; + continue; + } +#endif +#ifdef GL_SGIX_async_pixel + if (_glewStrSame3(&pos, &len, (const GLubyte*)"async_pixel", 11)) + { + ret = GLEW_SGIX_async_pixel; + continue; + } +#endif +#ifdef GL_SGIX_blend_alpha_minmax + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_alpha_minmax", 18)) + { + ret = GLEW_SGIX_blend_alpha_minmax; + continue; + } +#endif +#ifdef GL_SGIX_clipmap + if (_glewStrSame3(&pos, &len, (const GLubyte*)"clipmap", 7)) + { + ret = GLEW_SGIX_clipmap; + continue; + } +#endif +#ifdef GL_SGIX_depth_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"depth_texture", 13)) + { + ret = GLEW_SGIX_depth_texture; + continue; + } +#endif +#ifdef GL_SGIX_flush_raster + if (_glewStrSame3(&pos, &len, (const GLubyte*)"flush_raster", 12)) + { + ret = GLEW_SGIX_flush_raster; + continue; + } +#endif +#ifdef GL_SGIX_fog_offset + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fog_offset", 10)) + { + ret = GLEW_SGIX_fog_offset; + continue; + } +#endif +#ifdef GL_SGIX_fog_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fog_texture", 11)) + { + ret = GLEW_SGIX_fog_texture; + continue; + } +#endif +#ifdef GL_SGIX_fragment_specular_lighting + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fragment_specular_lighting", 26)) + { + ret = GLEW_SGIX_fragment_specular_lighting; + continue; + } +#endif +#ifdef GL_SGIX_framezoom + if (_glewStrSame3(&pos, &len, (const GLubyte*)"framezoom", 9)) + { + ret = GLEW_SGIX_framezoom; + continue; + } +#endif +#ifdef GL_SGIX_interlace + if (_glewStrSame3(&pos, &len, (const GLubyte*)"interlace", 9)) + { + ret = GLEW_SGIX_interlace; + continue; + } +#endif +#ifdef GL_SGIX_ir_instrument1 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"ir_instrument1", 14)) + { + ret = GLEW_SGIX_ir_instrument1; + continue; + } +#endif +#ifdef GL_SGIX_list_priority + if (_glewStrSame3(&pos, &len, (const GLubyte*)"list_priority", 13)) + { + ret = GLEW_SGIX_list_priority; + continue; + } +#endif +#ifdef GL_SGIX_pixel_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_texture", 13)) + { + ret = GLEW_SGIX_pixel_texture; + continue; + } +#endif +#ifdef GL_SGIX_pixel_texture_bits + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_texture_bits", 18)) + { + ret = GLEW_SGIX_pixel_texture_bits; + continue; + } +#endif +#ifdef GL_SGIX_reference_plane + if (_glewStrSame3(&pos, &len, (const GLubyte*)"reference_plane", 15)) + { + ret = GLEW_SGIX_reference_plane; + continue; + } +#endif +#ifdef GL_SGIX_resample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"resample", 8)) + { + ret = GLEW_SGIX_resample; + continue; + } +#endif +#ifdef GL_SGIX_shadow + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow", 6)) + { + ret = GLEW_SGIX_shadow; + continue; + } +#endif +#ifdef GL_SGIX_shadow_ambient + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow_ambient", 14)) + { + ret = GLEW_SGIX_shadow_ambient; + continue; + } +#endif +#ifdef GL_SGIX_sprite + if (_glewStrSame3(&pos, &len, (const GLubyte*)"sprite", 6)) + { + ret = GLEW_SGIX_sprite; + continue; + } +#endif +#ifdef GL_SGIX_tag_sample_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"tag_sample_buffer", 17)) + { + ret = GLEW_SGIX_tag_sample_buffer; + continue; + } +#endif +#ifdef GL_SGIX_texture_add_env + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_add_env", 15)) + { + ret = GLEW_SGIX_texture_add_env; + continue; + } +#endif +#ifdef GL_SGIX_texture_coordinate_clamp + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_coordinate_clamp", 24)) + { + ret = GLEW_SGIX_texture_coordinate_clamp; + continue; + } +#endif +#ifdef GL_SGIX_texture_lod_bias + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_lod_bias", 16)) + { + ret = GLEW_SGIX_texture_lod_bias; + continue; + } +#endif +#ifdef GL_SGIX_texture_multi_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_multi_buffer", 20)) + { + ret = GLEW_SGIX_texture_multi_buffer; + continue; + } +#endif +#ifdef GL_SGIX_texture_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_range", 13)) + { + ret = GLEW_SGIX_texture_range; + continue; + } +#endif +#ifdef GL_SGIX_texture_scale_bias + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_scale_bias", 18)) + { + ret = GLEW_SGIX_texture_scale_bias; + continue; + } +#endif +#ifdef GL_SGIX_vertex_preclip + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_preclip", 14)) + { + ret = GLEW_SGIX_vertex_preclip; + continue; + } +#endif +#ifdef GL_SGIX_vertex_preclip_hint + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_preclip_hint", 19)) + { + ret = GLEW_SGIX_vertex_preclip_hint; + continue; + } +#endif +#ifdef GL_SGIX_ycrcb + if (_glewStrSame3(&pos, &len, (const GLubyte*)"ycrcb", 5)) + { + ret = GLEW_SGIX_ycrcb; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGI_", 4)) + { +#ifdef GL_SGI_color_matrix + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_matrix", 12)) + { + ret = GLEW_SGI_color_matrix; + continue; + } +#endif +#ifdef GL_SGI_color_table + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_table", 11)) + { + ret = GLEW_SGI_color_table; + continue; + } +#endif +#ifdef GL_SGI_texture_color_table + if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_color_table", 19)) + { + ret = GLEW_SGI_texture_color_table; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SUNX_", 5)) + { +#ifdef GL_SUNX_constant_data + if (_glewStrSame3(&pos, &len, (const GLubyte*)"constant_data", 13)) + { + ret = GLEW_SUNX_constant_data; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SUN_", 4)) + { +#ifdef GL_SUN_convolution_border_modes + if (_glewStrSame3(&pos, &len, (const GLubyte*)"convolution_border_modes", 24)) + { + ret = GLEW_SUN_convolution_border_modes; + continue; + } +#endif +#ifdef GL_SUN_global_alpha + if (_glewStrSame3(&pos, &len, (const GLubyte*)"global_alpha", 12)) + { + ret = GLEW_SUN_global_alpha; + continue; + } +#endif +#ifdef GL_SUN_mesh_array + if (_glewStrSame3(&pos, &len, (const GLubyte*)"mesh_array", 10)) + { + ret = GLEW_SUN_mesh_array; + continue; + } +#endif +#ifdef GL_SUN_read_video_pixels + if (_glewStrSame3(&pos, &len, (const GLubyte*)"read_video_pixels", 17)) + { + ret = GLEW_SUN_read_video_pixels; + continue; + } +#endif +#ifdef GL_SUN_slice_accum + if (_glewStrSame3(&pos, &len, (const GLubyte*)"slice_accum", 11)) + { + ret = GLEW_SUN_slice_accum; + continue; + } +#endif +#ifdef GL_SUN_triangle_list + if (_glewStrSame3(&pos, &len, (const GLubyte*)"triangle_list", 13)) + { + ret = GLEW_SUN_triangle_list; + continue; + } +#endif +#ifdef GL_SUN_vertex + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex", 6)) + { + ret = GLEW_SUN_vertex; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"WIN_", 4)) + { +#ifdef GL_WIN_phong_shading + if (_glewStrSame3(&pos, &len, (const GLubyte*)"phong_shading", 13)) + { + ret = GLEW_WIN_phong_shading; + continue; + } +#endif +#ifdef GL_WIN_specular_fog + if (_glewStrSame3(&pos, &len, (const GLubyte*)"specular_fog", 12)) + { + ret = GLEW_WIN_specular_fog; + continue; + } +#endif +#ifdef GL_WIN_swap_hint + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_hint", 9)) + { + ret = GLEW_WIN_swap_hint; + continue; + } +#endif + } + } + ret = (len == 0); + } + return ret; +} + +#if defined(_WIN32) + +#if defined(GLEW_MX) +GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name) +#else +GLboolean wglewIsSupported (const char* name) +#endif +{ + GLubyte* pos = (GLubyte*)name; + GLuint len = _glewStrLen(pos); + GLboolean ret = GL_TRUE; + while (ret && len > 0) + { + if (_glewStrSame1(&pos, &len, (const GLubyte*)"WGL_", 4)) + { + if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DFX_", 5)) + { +#ifdef WGL_3DFX_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = WGLEW_3DFX_multisample; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DL_", 4)) + { +#ifdef WGL_3DL_stereo_control + if (_glewStrSame3(&pos, &len, (const GLubyte*)"stereo_control", 14)) + { + ret = WGLEW_3DL_stereo_control; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ARB_", 4)) + { +#ifdef WGL_ARB_buffer_region + if (_glewStrSame3(&pos, &len, (const GLubyte*)"buffer_region", 13)) + { + ret = WGLEW_ARB_buffer_region; + continue; + } +#endif +#ifdef WGL_ARB_extensions_string + if (_glewStrSame3(&pos, &len, (const GLubyte*)"extensions_string", 17)) + { + ret = WGLEW_ARB_extensions_string; + continue; + } +#endif +#ifdef WGL_ARB_make_current_read + if (_glewStrSame3(&pos, &len, (const GLubyte*)"make_current_read", 17)) + { + ret = WGLEW_ARB_make_current_read; + continue; + } +#endif +#ifdef WGL_ARB_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = WGLEW_ARB_multisample; + continue; + } +#endif +#ifdef WGL_ARB_pbuffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pbuffer", 7)) + { + ret = WGLEW_ARB_pbuffer; + continue; + } +#endif +#ifdef WGL_ARB_pixel_format + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_format", 12)) + { + ret = WGLEW_ARB_pixel_format; + continue; + } +#endif +#ifdef WGL_ARB_pixel_format_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_format_float", 18)) + { + ret = WGLEW_ARB_pixel_format_float; + continue; + } +#endif +#ifdef WGL_ARB_render_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"render_texture", 14)) + { + ret = WGLEW_ARB_render_texture; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ATI_", 4)) + { +#ifdef WGL_ATI_pixel_format_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_format_float", 18)) + { + ret = WGLEW_ATI_pixel_format_float; + continue; + } +#endif +#ifdef WGL_ATI_render_texture_rectangle + if (_glewStrSame3(&pos, &len, (const GLubyte*)"render_texture_rectangle", 24)) + { + ret = WGLEW_ATI_render_texture_rectangle; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"EXT_", 4)) + { +#ifdef WGL_EXT_depth_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"depth_float", 11)) + { + ret = WGLEW_EXT_depth_float; + continue; + } +#endif +#ifdef WGL_EXT_display_color_table + if (_glewStrSame3(&pos, &len, (const GLubyte*)"display_color_table", 19)) + { + ret = WGLEW_EXT_display_color_table; + continue; + } +#endif +#ifdef WGL_EXT_extensions_string + if (_glewStrSame3(&pos, &len, (const GLubyte*)"extensions_string", 17)) + { + ret = WGLEW_EXT_extensions_string; + continue; + } +#endif +#ifdef WGL_EXT_make_current_read + if (_glewStrSame3(&pos, &len, (const GLubyte*)"make_current_read", 17)) + { + ret = WGLEW_EXT_make_current_read; + continue; + } +#endif +#ifdef WGL_EXT_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = WGLEW_EXT_multisample; + continue; + } +#endif +#ifdef WGL_EXT_pbuffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pbuffer", 7)) + { + ret = WGLEW_EXT_pbuffer; + continue; + } +#endif +#ifdef WGL_EXT_pixel_format + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_format", 12)) + { + ret = WGLEW_EXT_pixel_format; + continue; + } +#endif +#ifdef WGL_EXT_swap_control + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_control", 12)) + { + ret = WGLEW_EXT_swap_control; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"I3D_", 4)) + { +#ifdef WGL_I3D_digital_video_control + if (_glewStrSame3(&pos, &len, (const GLubyte*)"digital_video_control", 21)) + { + ret = WGLEW_I3D_digital_video_control; + continue; + } +#endif +#ifdef WGL_I3D_gamma + if (_glewStrSame3(&pos, &len, (const GLubyte*)"gamma", 5)) + { + ret = WGLEW_I3D_gamma; + continue; + } +#endif +#ifdef WGL_I3D_genlock + if (_glewStrSame3(&pos, &len, (const GLubyte*)"genlock", 7)) + { + ret = WGLEW_I3D_genlock; + continue; + } +#endif +#ifdef WGL_I3D_image_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"image_buffer", 12)) + { + ret = WGLEW_I3D_image_buffer; + continue; + } +#endif +#ifdef WGL_I3D_swap_frame_lock + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_frame_lock", 15)) + { + ret = WGLEW_I3D_swap_frame_lock; + continue; + } +#endif +#ifdef WGL_I3D_swap_frame_usage + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_frame_usage", 16)) + { + ret = WGLEW_I3D_swap_frame_usage; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"NV_", 3)) + { +#ifdef WGL_NV_float_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"float_buffer", 12)) + { + ret = WGLEW_NV_float_buffer; + continue; + } +#endif +#ifdef WGL_NV_render_depth_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"render_depth_texture", 20)) + { + ret = WGLEW_NV_render_depth_texture; + continue; + } +#endif +#ifdef WGL_NV_render_texture_rectangle + if (_glewStrSame3(&pos, &len, (const GLubyte*)"render_texture_rectangle", 24)) + { + ret = WGLEW_NV_render_texture_rectangle; + continue; + } +#endif +#ifdef WGL_NV_vertex_array_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_range", 18)) + { + ret = WGLEW_NV_vertex_array_range; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"OML_", 4)) + { +#ifdef WGL_OML_sync_control + if (_glewStrSame3(&pos, &len, (const GLubyte*)"sync_control", 12)) + { + ret = WGLEW_OML_sync_control; + continue; + } +#endif + } + } + ret = (len == 0); + } + return ret; +} + +#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) + +#if defined(GLEW_MX) +GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name) +#else +GLboolean glxewIsSupported (const char* name) +#endif +{ + GLubyte* pos = (GLubyte*)name; + GLuint len = _glewStrLen(pos); + GLboolean ret = GL_TRUE; + while (ret && len > 0) + { + if(_glewStrSame1(&pos, &len, (const GLubyte*)"GLX_", 4)) + { + if (_glewStrSame2(&pos, &len, (const GLubyte*)"VERSION_", 8)) + { +#ifdef GLX_VERSION_1_2 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_2", 3)) + { + ret = GLXEW_VERSION_1_2; + continue; + } +#endif +#ifdef GLX_VERSION_1_3 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_3", 3)) + { + ret = GLXEW_VERSION_1_3; + continue; + } +#endif +#ifdef GLX_VERSION_1_4 + if (_glewStrSame3(&pos, &len, (const GLubyte*)"1_4", 3)) + { + ret = GLXEW_VERSION_1_4; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DFX_", 5)) + { +#ifdef GLX_3DFX_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLXEW_3DFX_multisample; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ARB_", 4)) + { +#ifdef GLX_ARB_fbconfig_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fbconfig_float", 14)) + { + ret = GLXEW_ARB_fbconfig_float; + continue; + } +#endif +#ifdef GLX_ARB_get_proc_address + if (_glewStrSame3(&pos, &len, (const GLubyte*)"get_proc_address", 16)) + { + ret = GLXEW_ARB_get_proc_address; + continue; + } +#endif +#ifdef GLX_ARB_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLXEW_ARB_multisample; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"ATI_", 4)) + { +#ifdef GLX_ATI_pixel_format_float + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_format_float", 18)) + { + ret = GLXEW_ATI_pixel_format_float; + continue; + } +#endif +#ifdef GLX_ATI_render_texture + if (_glewStrSame3(&pos, &len, (const GLubyte*)"render_texture", 14)) + { + ret = GLXEW_ATI_render_texture; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"EXT_", 4)) + { +#ifdef GLX_EXT_import_context + if (_glewStrSame3(&pos, &len, (const GLubyte*)"import_context", 14)) + { + ret = GLXEW_EXT_import_context; + continue; + } +#endif +#ifdef GLX_EXT_scene_marker + if (_glewStrSame3(&pos, &len, (const GLubyte*)"scene_marker", 12)) + { + ret = GLXEW_EXT_scene_marker; + continue; + } +#endif +#ifdef GLX_EXT_visual_info + if (_glewStrSame3(&pos, &len, (const GLubyte*)"visual_info", 11)) + { + ret = GLXEW_EXT_visual_info; + continue; + } +#endif +#ifdef GLX_EXT_visual_rating + if (_glewStrSame3(&pos, &len, (const GLubyte*)"visual_rating", 13)) + { + ret = GLXEW_EXT_visual_rating; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"MESA_", 5)) + { +#ifdef GLX_MESA_agp_offset + if (_glewStrSame3(&pos, &len, (const GLubyte*)"agp_offset", 10)) + { + ret = GLXEW_MESA_agp_offset; + continue; + } +#endif +#ifdef GLX_MESA_copy_sub_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"copy_sub_buffer", 15)) + { + ret = GLXEW_MESA_copy_sub_buffer; + continue; + } +#endif +#ifdef GLX_MESA_pixmap_colormap + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixmap_colormap", 15)) + { + ret = GLXEW_MESA_pixmap_colormap; + continue; + } +#endif +#ifdef GLX_MESA_release_buffers + if (_glewStrSame3(&pos, &len, (const GLubyte*)"release_buffers", 15)) + { + ret = GLXEW_MESA_release_buffers; + continue; + } +#endif +#ifdef GLX_MESA_set_3dfx_mode + if (_glewStrSame3(&pos, &len, (const GLubyte*)"set_3dfx_mode", 13)) + { + ret = GLXEW_MESA_set_3dfx_mode; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"NV_", 3)) + { +#ifdef GLX_NV_float_buffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"float_buffer", 12)) + { + ret = GLXEW_NV_float_buffer; + continue; + } +#endif +#ifdef GLX_NV_vertex_array_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"vertex_array_range", 18)) + { + ret = GLXEW_NV_vertex_array_range; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"OML_", 4)) + { +#ifdef GLX_OML_swap_method + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_method", 11)) + { + ret = GLXEW_OML_swap_method; + continue; + } +#endif +#if defined(GLX_OML_sync_control) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#include + if (_glewStrSame3(&pos, &len, (const GLubyte*)"sync_control", 12)) + { + ret = GLXEW_OML_sync_control; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGIS_", 5)) + { +#ifdef GLX_SGIS_blended_overlay + if (_glewStrSame3(&pos, &len, (const GLubyte*)"blended_overlay", 15)) + { + ret = GLXEW_SGIS_blended_overlay; + continue; + } +#endif +#ifdef GLX_SGIS_color_range + if (_glewStrSame3(&pos, &len, (const GLubyte*)"color_range", 11)) + { + ret = GLXEW_SGIS_color_range; + continue; + } +#endif +#ifdef GLX_SGIS_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"multisample", 11)) + { + ret = GLXEW_SGIS_multisample; + continue; + } +#endif +#ifdef GLX_SGIS_shared_multisample + if (_glewStrSame3(&pos, &len, (const GLubyte*)"shared_multisample", 18)) + { + ret = GLXEW_SGIS_shared_multisample; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGIX_", 5)) + { +#ifdef GLX_SGIX_fbconfig + if (_glewStrSame3(&pos, &len, (const GLubyte*)"fbconfig", 8)) + { + ret = GLXEW_SGIX_fbconfig; + continue; + } +#endif +#ifdef GLX_SGIX_pbuffer + if (_glewStrSame3(&pos, &len, (const GLubyte*)"pbuffer", 7)) + { + ret = GLXEW_SGIX_pbuffer; + continue; + } +#endif +#ifdef GLX_SGIX_swap_barrier + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_barrier", 12)) + { + ret = GLXEW_SGIX_swap_barrier; + continue; + } +#endif +#ifdef GLX_SGIX_swap_group + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_group", 10)) + { + ret = GLXEW_SGIX_swap_group; + continue; + } +#endif +#ifdef GLX_SGIX_video_resize + if (_glewStrSame3(&pos, &len, (const GLubyte*)"video_resize", 12)) + { + ret = GLXEW_SGIX_video_resize; + continue; + } +#endif +#ifdef GLX_SGIX_visual_select_group + if (_glewStrSame3(&pos, &len, (const GLubyte*)"visual_select_group", 19)) + { + ret = GLXEW_SGIX_visual_select_group; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SGI_", 4)) + { +#ifdef GLX_SGI_cushion + if (_glewStrSame3(&pos, &len, (const GLubyte*)"cushion", 7)) + { + ret = GLXEW_SGI_cushion; + continue; + } +#endif +#ifdef GLX_SGI_make_current_read + if (_glewStrSame3(&pos, &len, (const GLubyte*)"make_current_read", 17)) + { + ret = GLXEW_SGI_make_current_read; + continue; + } +#endif +#ifdef GLX_SGI_swap_control + if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_control", 12)) + { + ret = GLXEW_SGI_swap_control; + continue; + } +#endif +#ifdef GLX_SGI_video_sync + if (_glewStrSame3(&pos, &len, (const GLubyte*)"video_sync", 10)) + { + ret = GLXEW_SGI_video_sync; + continue; + } +#endif + } + if (_glewStrSame2(&pos, &len, (const GLubyte*)"SUN_", 4)) + { +#ifdef GLX_SUN_get_transparent_index + if (_glewStrSame3(&pos, &len, (const GLubyte*)"get_transparent_index", 21)) + { + ret = GLXEW_SUN_get_transparent_index; + continue; + } +#endif +#ifdef GLX_SUN_video_resize + if (_glewStrSame3(&pos, &len, (const GLubyte*)"video_resize", 12)) + { + ret = GLXEW_SUN_video_resize; + continue; + } +#endif + } + } + ret = (len == 0); + } + return ret; +} + +#endif /* _WIN32 */ diff --git a/source/Makefile b/source/Makefile index 5ebff3bbbf5..d06962cbe3f 100644 --- a/source/Makefile +++ b/source/Makefile @@ -157,6 +157,7 @@ COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a COMLIB += $(NAN_PNG)/lib/libpng.a COMLIB += $(OCGDIR)/blender/yafray/$(DEBUG_DIR)libyafrayexport.a COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a +COMLIB += $(NAN_GLEW)/lib/libglew.a ifeq ($(WITH_QUICKTIME), true) COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a diff --git a/source/blender/src/CMakeLists.txt b/source/blender/src/CMakeLists.txt index d6874cdd4db..342579fb3b0 100644 --- a/source/blender/src/CMakeLists.txt +++ b/source/blender/src/CMakeLists.txt @@ -35,7 +35,7 @@ SET(INC ../../kernel/gen_system ../../../intern/SoundSystem ../readstreamglue ../quicktime ../../../intern/elbeem/extern ../../../intern/ghost ../../../intern/opennl/extern - ../nodes + ../nodes ../../../extern/glew/include ${PYTHON_INC} ${SDL_INC} ) diff --git a/source/blender/src/Makefile b/source/blender/src/Makefile index c1c0ef8b1f2..001efc58b5d 100644 --- a/source/blender/src/Makefile +++ b/source/blender/src/Makefile @@ -143,4 +143,5 @@ ifeq ($(NAN_TWEAK_MODE), true) CPPFLAGS += -DTWEAK_MODE endif +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index f466798c40c..229cc87ef37 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -26,7 +26,7 @@ incs += ' #/intern/bsp/extern ../radiosity/extern/include' incs += ' #/intern/decimation/extern ../blenloader ../python' incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue ../nodes' incs += ' ../quicktime #/intern/elbeem/extern' -incs += ' #/intern/ghost #/intern/opennl/extern' +incs += ' #/intern/ghost #/intern/opennl/extern #/extern/glew/include' incs += ' ' + env['BF_PYTHON_INC'] diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 5ac8e186b68..2a4672e3052 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -1038,6 +1038,7 @@ void BIF_init(void) BIF_filelist_init_icons(); init_gl_stuff(); /* drawview.c, after homefile */ + glewInit(); readBlog(); BLI_strncpy(G.lib, G.sce, FILE_MAX); } diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 05c58a258ec..d17b94c631d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -259,6 +259,7 @@ IF(UNIX) blender_python bf_quicktime extern_binreloc + extern_glew ) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index eb575c70ad7..06aa0609ad9 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -40,9 +40,7 @@ #pragma warning (disable:4786) #endif -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#endif +#include "GL/glew.h" #include "KX_BlenderGL.h" #include "KX_BlenderCanvas.h" @@ -57,10 +55,10 @@ #include "KX_PythonInit.h" #include "KX_PyConstraintBinding.h" +#include "RAS_GLExtensionManager.h" #include "RAS_OpenGLRasterizer.h" #include "RAS_VAOpenGLRasterizer.h" #include "RAS_ListRasterizer.h" -#include "RAS_GLExtensionManager.h" #include "NG_LoopBackNetworkDeviceInterface.h" #include "SND_DeviceManager.h" @@ -142,12 +140,12 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, // so we can safely run Python code and API calls PyGILState_STATE gilstate = PyGILState_Ensure(); - bgl::InitExtensions(1); - + bgl::InitExtensions(true); + do { View3D *v3d= (View3D*) area->spacedata.first; - + // get some preferences SYS_SystemHandle syshandle = SYS_GetSystem(); bool properties = (SYS_GetCommandLineInt(syshandle, "show_properties", 0) != 0); @@ -156,22 +154,10 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool game2ipo = (SYS_GetCommandLineInt(syshandle, "game2ipo", 0) != 0); bool displaylists = (SYS_GetCommandLineInt(syshandle, "displaylists", 0) != 0); - bool usemat = false; - - #if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(bgl::RAS_EXT_support._ARB_multitexture && bgl::QueryVersion(1, 1)) { - usemat = (SYS_GetCommandLineInt(syshandle, "blender_material", 0) != 0); - int unitmax=0; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&unitmax); - bgl::max_texture_units = MAXTEX>unitmax?unitmax:MAXTEX; - //std::cout << "using(" << bgl::max_texture_units << ") of(" << unitmax << ") texture units." << std::endl; - } else { - bgl::max_texture_units = 0; - } - } - #endif + bool usemat = false, useglslmat = false; + if(GLEW_ARB_multitexture && GLEW_VERSION_1_1) + usemat = (SYS_GetCommandLineInt(syshandle, "blender_material", 0) != 0); // create the canvas, rasterizer and rendertools RAS_ICanvas* canvas = new KX_BlenderCanvas(area); @@ -186,12 +172,12 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, bool lock_arrays = (displaylists && useVertexArrays); if(displaylists){ - if (useVertexArrays) { + if (useVertexArrays) rasterizer = new RAS_ListRasterizer(canvas, true, lock_arrays); - } else { + else rasterizer = new RAS_ListRasterizer(canvas); - } - } else if (useVertexArrays && bgl::QueryVersion(1, 1)) + } + else if (useVertexArrays && GLEW_VERSION_1_1) rasterizer = new RAS_VAOpenGLRasterizer(canvas, lock_arrays); else rasterizer = new RAS_OpenGLRasterizer(canvas); @@ -338,6 +324,8 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, if(usemat) sceneconverter->SetMaterials(true); + if(useglslmat) + sceneconverter->SetGLSLMaterials(true); KX_Scene* startscene = new KX_Scene(keyboarddevice, mousedevice, @@ -504,7 +492,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area, // so we can safely run Python code and API calls PyGILState_STATE gilstate = PyGILState_Ensure(); - bgl::InitExtensions(1); + bgl::InitExtensions(true); do { @@ -533,7 +521,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area, if(displaylists && !useVertexArrays) rasterizer = new RAS_ListRasterizer(canvas); - else if (useVertexArrays && bgl::QueryVersion(1, 1)) + else if (useVertexArrays && GLEW_VERSION_1_1) rasterizer = new RAS_VAOpenGLRasterizer(canvas, lock_arrays); else rasterizer = new RAS_OpenGLRasterizer(canvas); diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index 764be732343..1d72fb9cde1 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -33,6 +33,7 @@ SET(INC ../../../source/blender/blenloader ../../../extern/bullet2/src ../../../extern/solid + ../../../extern/glew/include ${PYTHON_INC} ) diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h index f9ff8f61b97..b155d39e149 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h @@ -32,12 +32,8 @@ #ifdef WIN32 #include #endif -#ifdef __APPLE__ -# define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif + +#include "GL/glew.h" #include "RAS_ICanvas.h" #include "RAS_Rect.h" diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 2a5cc14018f..230d6b262c6 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -44,21 +44,9 @@ #include "BMF_Api.h" +#include "GL/glew.h" +#include "BIF_gl.h" -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -#if defined(__sun__) && !defined(__sparc__) -#include -#else -#include -#endif -#endif -#include "RAS_OpenGLRasterizer/RAS_GLExtensionManager.h" -#include "RAS_OpenGLRasterizer/ARB_multitexture.h" #include "BL_Material.h" // MAXTEX /* Data types encoding the game world: */ @@ -77,7 +65,6 @@ #include "BKE_bmfont.h" #include "BKE_image.h" -#include "BIF_gl.h" extern "C" { #include "BDR_drawmesh.h" #include "BIF_mywindow.h" @@ -88,12 +75,6 @@ extern "C" { /* end of blender block */ -#ifdef __APPLE__ -#include -#else -#include -#endif - /* was in drawmesh.c */ void spack(unsigned int ucol) { @@ -194,28 +175,19 @@ void DisableForText() glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); } -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - for(int i=0; i -#endif //WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif +#include "GL/glew.h" #include "RAS_IRenderTools.h" #include "RAS_IRasterizer.h" @@ -317,7 +308,7 @@ void KX_BlenderRenderTools::EnableOpenGLLights() glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, true); - if (bgl::QueryExtension(bgl::_GL_EXT_separate_specular_color) || bgl::QueryVersion(1, 2)) + if (GLEW_EXT_separate_specular_color || GLEW_VERSION_1_2) glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); } diff --git a/source/gameengine/BlenderRoutines/Makefile b/source/gameengine/BlenderRoutines/Makefile index 64a17f44a84..a7394158a20 100644 --- a/source/gameengine/BlenderRoutines/Makefile +++ b/source/gameengine/BlenderRoutines/Makefile @@ -35,7 +35,6 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) -CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_SUMO)/include -I$(NAN_SOLID)/include CPPFLAGS += -I$(NAN_SOLID) CPPFLAGS += -I$(NAN_STRING)/include @@ -43,6 +42,8 @@ CPPFLAGS += -I$(NAN_MOTO)/include CPPFLAGS += -I$(NAN_BMFONT)/include CPPFLAGS += -I$(NAN_FUZZICS)/include CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include +CPPFLAGS += -I$(NAN_GLEW)/include +CPPFLAGS += -I$(OPENGL_HEADERS) # because of kernel dependency on makesdna CPPFLAGS += -I../../blender/makesdna CPPFLAGS += -I../../blender/include diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript index 95e1da2d470..327f4798e04 100644 --- a/source/gameengine/BlenderRoutines/SConscript +++ b/source/gameengine/BlenderRoutines/SConscript @@ -15,6 +15,7 @@ incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common' incs += ' #source/gameengine/Physics/Bullet #source/gameengine/Physics/Sumo' incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork' incs += ' #intern/SoundSystem #source/blender/misc #source/blender/blenloader' +incs += ' #extern/glew/include' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_SOLID_INC'] diff --git a/source/gameengine/BlenderRoutines/mac_compat_glext.h b/source/gameengine/BlenderRoutines/mac_compat_glext.h deleted file mode 100644 index 0ec676963b1..00000000000 --- a/source/gameengine/BlenderRoutines/mac_compat_glext.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef __mac_compat_glext_h_ -#define __mac_compat_glext_h_ - - -#ifdef __cplusplus -extern "C" { -#endif - -#define APIENTRYP * -# define GL_GLEXT_LEGACY 1 -# include - -//#if GL_ARB_shader_objects -typedef char GLcharARB; -typedef void *GLhandleARB; -//#endif - -//#if GL_ARB_vertex_buffer_object -typedef long GLintptrARB; -typedef long GLsizeiptrARB; -//#endif - - -// GL_ARB_multitexture -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - -//GL_ARB_shader_objects -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (unsigned int obj); -typedef unsigned int (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (unsigned int containerObj, unsigned int attachedObj); -typedef unsigned int (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (unsigned int shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (unsigned int shaderObj); -typedef unsigned int (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (unsigned int containerObj, unsigned int obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (unsigned int programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (unsigned int programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (unsigned int programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (unsigned int obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (unsigned int obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (unsigned int obj, GLsizei maxLength, GLsizei *length, void *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (unsigned int containerObj, GLsizei maxCount, GLsizei *count, unsigned int *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (unsigned int programObj, const void *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (unsigned int programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (unsigned int programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (unsigned int obj, GLsizei maxLength, GLsizei *length, void *source); - - -//GL_ARB_vertex_shader -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (unsigned int programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (unsigned int programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (unsigned int programObj, const GLcharARB *name); - - -//GL_ARB_vertex_program -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); - -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index d4712efda9e..f73d5b42a01 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -144,7 +144,7 @@ void BL_ArmatureObject::GetPose(bPose **pose) { /* If the caller supplies a null pose, create a new one. */ /* Otherwise, copy the armature's pose channels into the caller-supplied pose */ - + if (!*pose) { /* probably not to good of an idea to duplicate everying, but it clears up diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index cb981f55c5a..0ad9258bcc0 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -510,6 +510,7 @@ BL_Material* ConvertMaterial( } } } + // above one tex the switches here // are not used switch(valid_index) { @@ -588,6 +589,9 @@ BL_Material* ConvertMaterial( MT_Point2 uv[4]; MT_Point2 uv2[4]; + uv[0]= uv[1]= uv[2]= uv[3]= MT_Point2(0.0f, 0.0f); + uv2[0]= uv2[1]= uv2[2]= uv2[3]= MT_Point2(0.0f, 0.0f); + if( validface ) { material->ras_mode |= !( @@ -731,14 +735,14 @@ static MT_Vector4* BL_ComputeMeshTangentSpace(Mesh* mesh) MT_Vector3 *tan1 = new MT_Vector3[mesh->totvert]; MT_Vector3 *tan2 = new MT_Vector3[mesh->totvert]; - unsigned int v; + int v; for (v = 0; v < mesh->totvert; v++) { tan1[v] = MT_Vector3(0.0, 0.0, 0.0); tan2[v] = MT_Vector3(0.0, 0.0, 0.0); } - for (unsigned int p = 0; p < mesh->totface; p++, mface++, tface++) + for (int p = 0; p < mesh->totface; p++, mface++, tface++) { MT_Vector3 v1(mesh->mvert[mface->v1].co), v2(mesh->mvert[mface->v2].co), @@ -830,9 +834,10 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* } } - meshobj->SetName(mesh->id.name); meshobj->m_xyz_index_to_vertex_index_mapping.resize(mesh->totvert); + if(skinMesh) + ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.resize(mesh->totvert); for (int f=0;ftotface;f++,mface++) { @@ -882,7 +887,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* Material* ma = 0; bool polyvisible = true; RAS_IPolyMaterial* polymat = NULL; - BL_Material *bl_mat; + BL_Material *bl_mat = NULL; if(converter->GetMaterials()) { @@ -892,6 +897,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* ma = give_current_material(blenderobj, 1); bl_mat = ConvertMaterial(mesh, ma, tface, mface, mmcol, lightlayer, blenderobj, layers); + bl_mat->glslmat = converter->GetGLSLMaterials(); // set the index were dealing with bl_mat->material_index = (int)mface->mat_nr; @@ -1066,19 +1072,19 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* d3=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v3, &mesh->dvert[mface->v3], polymat); if (nverts==4) d4=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v4, &mesh->dvert[mface->v4], polymat); - poly->SetVertex(0,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,d1,flat, polymat)); - poly->SetVertex(1,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,d2,flat, polymat)); - poly->SetVertex(2,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,d3,flat, polymat)); + poly->SetVertex(0,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,d1,flat,polymat,mface->v1)); + poly->SetVertex(1,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,d2,flat,polymat,mface->v2)); + poly->SetVertex(2,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,d3,flat,polymat,mface->v3)); if (nverts==4) - poly->SetVertex(3,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,d4, flat,polymat)); + poly->SetVertex(3,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,d4,flat,polymat,mface->v4)); } else { - poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,polymat,mface->v1)); - poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,polymat,mface->v2)); - poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,polymat,mface->v3)); + poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,false,polymat,mface->v1)); + poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,false,polymat,mface->v2)); + poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,false,polymat,mface->v3)); if (nverts==4) - poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,polymat,mface->v4)); + poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,false,polymat,mface->v4)); } meshobj->AddPolygon(poly); if (poly->IsCollider()) @@ -1116,6 +1122,9 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* layer.face++; } } + meshobj->m_xyz_index_to_vertex_index_mapping.clear(); + if(skinMesh) + ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.clear(); meshobj->UpdateMaterialList(); // pre calculate texture generation diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index ab31179b047..85ba894f9a5 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -43,27 +43,25 @@ #include "BL_SkinMeshObject.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "BLI_arithb.h" #include "GEN_Map.h" #include "STR_HashedString.h" - bool BL_MeshDeformer::Apply(RAS_IPolyMaterial *mat) { size_t i, j, index; vecVertexArray array; vecIndexArrays mvarray; vecIndexArrays diarray; - + RAS_TexVert *tv; MVert *mvert; - + // For each material array = m_pMeshObject->GetVertexCache(mat); mvarray = m_pMeshObject->GetMVertCache(mat); diarray = m_pMeshObject->GetDIndexCache(mat); - + // For each array for (i=0; itotvert; v++){ - m_transnors[v]=MT_Point3(0,0,0); - } - - /* Find the face normals */ - for (f = 0; ftotface; f++){ - // Make new face normal based on the transverts - MFace *mf= &((MFace*)m_bmesh->mface)[f]; - - if (mf->v3) { - for (int vl=0; vl<3; vl++){ - co1[vl]=m_transverts[mf->v1][vl]; - co2[vl]=m_transverts[mf->v2][vl]; - co3[vl]=m_transverts[mf->v3][vl]; - if (mf->v4) - co4[vl]=m_transverts[mf->v4][vl]; + vecIndexArrays indexarrays; + vecIndexArrays mvarrays; + vecIndexArrays diarrays; + vecVertexArray vertexarrays; + size_t i, j; + + /* set vertex normals to zero */ + for (i=0; i<(size_t)m_bmesh->totvert; i++) + m_transnors[i] = MT_Vector3(0.0f, 0.0f, 0.0f); + + /* add face normals to vertices. */ + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); + + indexarrays = m_pMeshObject->GetIndexCache(mat); + vertexarrays = m_pMeshObject->GetVertexCache(mat); + diarrays = m_pMeshObject->GetDIndexCache(mat); + mvarrays = m_pMeshObject->GetMVertCache(mat); + + for (i=0; iUsesTriangles()? 3: 4; + + for(j=0; jv4) - CalcNormFloat4(co1, co2, co3, co4, fnor); - else - CalcNormFloat(co1, co2, co3, fnor); - - /* Decide which normals are affected by this face's normal */ - m_transnors[mf->v1]+=MT_Point3(fnor); - m_transnors[mf->v2]+=MT_Point3(fnor); - m_transnors[mf->v3]+=MT_Point3(fnor); - if (mf->v4) - m_transnors[mf->v4]+=MT_Point3(fnor); } } - - for (v =0; vtotvert; v++){ -// float nor[3]; - m_transnors[v]=m_transnors[v].safe_normalized(); -// nor[0]=m_transnors[v][0]; -// nor[1]=m_transnors[v][1]; -// nor[2]=m_transnors[v][2]; - - }; + /* assign smooth vertex normals */ + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); + + vertexarrays = m_pMeshObject->GetVertexCache(mat); + diarrays = m_pMeshObject->GetDIndexCache(mat); + mvarrays = m_pMeshObject->GetMVertCache(mat); + + for (i=0; itotvert+m_bmesh->totface){ + if (m_tvtot!=m_bmesh->totvert+m_bmesh->totface) { if (m_transverts) - delete []m_transverts; + delete [] m_transverts; if (m_transnors) - delete []m_transnors; + delete [] m_transnors; - m_transnors =new MT_Point3[m_bmesh->totvert+m_bmesh->totface]; m_transverts=new float[(sizeof(*m_transverts)*m_bmesh->totvert)][3]; + m_transnors=new MT_Vector3[m_bmesh->totvert]; m_tvtot = m_bmesh->totvert; } } diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h index a6be11d786e..88dc2500859 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.h +++ b/source/gameengine/Converter/BL_MeshDeformer.h @@ -48,9 +48,9 @@ public: BL_MeshDeformer(struct Object* obj, class BL_SkinMeshObject *meshobj ): m_pMeshObject(meshobj), m_bmesh((struct Mesh*)(obj->data)), + m_transverts(0), + m_transnors(0), m_objMesh(obj), - m_transnors(NULL), - m_transverts(NULL), m_tvtot(0) {}; virtual ~BL_MeshDeformer(); @@ -62,12 +62,11 @@ public: protected: class BL_SkinMeshObject* m_pMeshObject; struct Mesh* m_bmesh; - MT_Point3* m_transnors; - //MT_Point3* m_transverts; // this is so m_transverts doesn't need to be converted // before deformation float (*m_transverts)[3]; + MT_Vector3* m_transnors; struct Object* m_objMesh; // -- int m_tvtot; diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 14faa3317d0..0f884674c09 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -57,7 +57,6 @@ extern "C"{ #define __NLA_DEFNORMALS //#undef __NLA_DEFNORMALS - BL_SkinDeformer::BL_SkinDeformer( struct Object *bmeshobj_old, // Blender object that owns the new mesh struct Object *bmeshobj_new, // Blender object that owns the original mesh @@ -87,25 +86,15 @@ BL_SkinDeformer::~BL_SkinDeformer() Mat4CpyMat4(m_objMesh->obmat, m_obmat); } -/* XXX note, this __NLA_OLDDEFORM define seems to be obsolete */ - bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) { size_t i, j, index; vecVertexArray array; -#ifdef __NLA_OLDDEFORM - vecMVertArray mvarray; -#else vecIndexArrays mvarray; -#endif vecMDVertArray dvarray; vecIndexArrays diarray; RAS_TexVert *tv; -#ifdef __NLA_OLDDEFORM - MVert *mvert; - MDeformVert *dvert; -#endif MT_Point3 pt; // float co[3]; @@ -115,48 +104,24 @@ bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) Update(); array = m_pMeshObject->GetVertexCache(mat); -#ifdef __NLA_OLDDEFORM - dvarray = m_pMeshObject->GetDVertCache(mat); -#endif mvarray = m_pMeshObject->GetMVertCache(mat); diarray = m_pMeshObject->GetDIndexCache(mat); - // For each array - for (i=0; isize(); j++){ + for (j=0; jsize(); j++) { tv = &((*array[i])[j]); index = ((*diarray[i])[j]); -#ifdef __NLA_OLDDEFORM - pt = tv->xyz(); - mvert = ((*mvarray[i])[index]); - dvert = ((*dvarray[i])[index]); -#endif // Copy the untransformed data from the original mvert -#ifdef __NLA_OLDDEFORM - co[0]=mvert->co[0]; - co[1]=mvert->co[1]; - co[2]=mvert->co[2]; - - // Do the deformation -/* XXX note, doesnt exist anymore */ -// GB_calc_armature_deform(co, dvert); - tv->SetXYZ(co); -#else // Set the data tv->SetXYZ(m_transverts[((*mvarray[i])[index])]); -#ifdef __NLA_DEFNORMALS - - tv->SetNormal(m_transnors[((*mvarray[i])[index])]); -#endif -#endif } } - + return true; } @@ -197,7 +162,9 @@ void BL_SkinDeformer::Update(void) VECCOPY(m_transverts[v], m_bmesh->mvert[v].co); armature_deform_verts( par_arma, m_objMesh, NULL, m_transverts, NULL, m_bmesh->totvert, ARM_DEF_VGROUP, NULL, NULL ); +#ifdef __NLA_DEFNORMALS RecalcNormals(); +#endif /* Update the current frame */ m_lastUpdate=m_armobj->GetLastFrame(); diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h index e130dc15dbf..79f6453a25d 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.h +++ b/source/gameengine/Converter/BL_SkinDeformer.h @@ -69,8 +69,8 @@ public: m_armobj(arma), m_lastUpdate(-1), m_defbase(&bmeshobj->defbase), - m_releaseobject(false), - m_restoremat(false) + m_restoremat(false), + m_releaseobject(false) { }; diff --git a/source/gameengine/Converter/BL_SkinMeshObject.cpp b/source/gameengine/Converter/BL_SkinMeshObject.cpp index 8bc78c7f757..69feb72f5dc 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.cpp +++ b/source/gameengine/Converter/BL_SkinMeshObject.cpp @@ -53,23 +53,27 @@ void BL_SkinMeshObject::AddPolygon(RAS_Polygon* poly) RAS_MeshObject::AddPolygon(poly); } -#ifdef __NLA_OLDDEFORM -int BL_SkinMeshObject::FindOrAddDeform(int vtxarray, struct MVert *mv, struct MDeformVert *dv, RAS_IPolyMaterial* mat) -#else int BL_SkinMeshObject::FindOrAddDeform(unsigned int vtxarray, unsigned int mv, struct MDeformVert *dv, RAS_IPolyMaterial* mat) -#endif { BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); int numvert = ao->m_MvertArrayCache1[vtxarray]->size(); - + /* Check to see if this has already been pushed */ - for (unsigned int i=0; im_MvertArrayCache1[vtxarray]->size(); i++){ - if (mv == (*ao->m_MvertArrayCache1[vtxarray])[i]) - return i; + for (vector::iterator it = m_mvert_to_dvert_mapping[mv].begin(); + it != m_mvert_to_dvert_mapping[mv].end(); + it++) + { + if(it->mat == mat) + return it->index; } ao->m_MvertArrayCache1[vtxarray]->push_back(mv); ao->m_DvertArrayCache1[vtxarray]->push_back(dv); + + BL_MDVertMap mdmap; + mdmap.mat = mat; + mdmap.index = numvert; + m_mvert_to_dvert_mapping[mv].push_back(mdmap); return numvert; }; @@ -105,11 +109,7 @@ int BL_SkinMeshObject::FindVertexArray(int numverts,RAS_IPolyMaterial* polymat) KX_IndexArray *ia = new KX_IndexArray(); ao->m_IndexArrayCache1.push_back(ia); -#ifdef __NLA_OLDDEFORM - BL_MVertArray *bva = new BL_MVertArray(); -#else KX_IndexArray *bva = new KX_IndexArray(); -#endif ao->m_MvertArrayCache1.push_back(bva); BL_DeformVertArray *dva = new BL_DeformVertArray(); diff --git a/source/gameengine/Converter/BL_SkinMeshObject.h b/source/gameengine/Converter/BL_SkinMeshObject.h index 0ca7428c0f0..2422d4cd4c9 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.h +++ b/source/gameengine/Converter/BL_SkinMeshObject.h @@ -106,6 +106,9 @@ class BL_SkinMeshObject : public RAS_MeshObject protected: public: + struct BL_MDVertMap { RAS_IPolyMaterial *mat; int index; }; + vector > m_mvert_to_dvert_mapping; + void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec); // void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,class RAS_BucketManager* bucketmgr); @@ -139,37 +142,17 @@ public: const MT_Point2& uv2, const MT_Vector4& tangent, const unsigned int rgbacolor, - const MT_Vector3& normal, int defnr, bool flat, RAS_IPolyMaterial* mat) + const MT_Vector3& normal, int defnr, bool flat, RAS_IPolyMaterial* mat, int origindex) { - RAS_TexVert tempvert(xyz,uv,uv2, tangent,rgbacolor,normal,flat ? TV_CALCFACENORMAL : 0); - - // KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - - int numverts = ao->m_VertexArrayCache1[vtxarray]->size();//m_VertexArrayCount[vtxarray]; - - int index=-1; - - for (int i=0;im_VertexArrayCache1[vtxarray])[i]; - if (tempvert.closeTo(&vtx)) - { - index = i; - break; - } - - } - if (index >= 0) - return index; - - // no vertex found, add one - ao->m_VertexArrayCache1[vtxarray]->push_back(tempvert); - ao->m_DIndexArrayCache1[vtxarray]->push_back(defnr); - - return numverts; - - + BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat); + int numverts = ao->m_VertexArrayCache1[vtxarray]->size(); + int index = RAS_MeshObject::FindOrAddVertex(vtxarray, xyz, uv, uv2, tangent, rgbacolor, normal, flat, mat, origindex); + + /* this means a new vertex was added, so we add the defnr too */ + if(index == numverts) + ao->m_DIndexArrayCache1[vtxarray]->push_back(defnr); + + return index; } }; diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 8640e69102b..de91bce2ab1 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -100,7 +100,8 @@ KX_BlenderSceneConverter::KX_BlenderSceneConverter( m_sipo(sipo), m_ketsjiEngine(engine), m_alwaysUseExpandFraming(false), - m_usemat(false) + m_usemat(false), + m_useglslmat(false) { m_newfilename = ""; } @@ -449,6 +450,13 @@ void KX_BlenderSceneConverter::RemoveScene(KX_Scene *scene) void KX_BlenderSceneConverter::SetMaterials(bool val) { m_usemat = val; + m_useglslmat = false; +} + +void KX_BlenderSceneConverter::SetGLSLMaterials(bool val) +{ + m_usemat = val; + m_useglslmat = val; } bool KX_BlenderSceneConverter::GetMaterials() @@ -456,6 +464,10 @@ bool KX_BlenderSceneConverter::GetMaterials() return m_usemat; } +bool KX_BlenderSceneConverter::GetGLSLMaterials() +{ + return m_useglslmat; +} void KX_BlenderSceneConverter::RegisterBlenderMaterial(BL_Material *mat) { diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.h b/source/gameengine/Converter/KX_BlenderSceneConverter.h index a45d7396875..e5d6ccc5caf 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.h +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.h @@ -75,6 +75,7 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter class KX_Scene* m_currentScene; // Scene being converted bool m_alwaysUseExpandFraming; bool m_usemat; + bool m_useglslmat; void localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo* sipo); // struct Ipo* findIpoForName(char* objName); @@ -146,6 +147,10 @@ public: virtual void SetMaterials(bool val); virtual bool GetMaterials(); + // use blender glsl materials + virtual void SetGLSLMaterials(bool val); + virtual bool GetGLSLMaterials(); + }; #endif //__KX_BLENDERSCENECONVERTER_H diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt index 29cdcd640f5..e26f8b9d69a 100644 --- a/source/gameengine/GamePlayer/common/CMakeLists.txt +++ b/source/gameengine/GamePlayer/common/CMakeLists.txt @@ -69,6 +69,7 @@ SET(INC ../../../../source/gameengine/GamePlayer/ghost ../../../../source/blender/misc ../../../../source/blender/blenloader + ../../../../extern/glew/include ${PYTHON_INC} ${SOLID_INC} ${PNG_INC} diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h index bd66c865988..f82166dfa88 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.h +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h @@ -33,18 +33,12 @@ #include "RAS_ICanvas.h" #include "RAS_Rect.h" -#if defined(WIN32) || defined(__APPLE__) - #ifdef WIN32 - #pragma warning (disable:4786) // suppress stl-MSVC debug info warning - #include - #include - #else // WIN32 - // __APPLE__ is defined - #include - #endif // WIN32 -#else //defined(WIN32) || defined(__APPLE__) - #include -#endif //defined(WIN32) || defined(__APPLE__) +#ifdef WIN32 + #pragma warning (disable:4786) // suppress stl-MSVC debug info warning + #include +#endif // WIN32 + +#include "GL/glew.h" #include diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index c2f15aefe16..b1e2b5af0e6 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -31,23 +31,7 @@ #include #endif -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -#if defined(__sun__) && !defined(__sparc__) -#include -#else -#include -#endif -#endif - - +#include "GL/glew.h" #include "GPC_PolygonMaterial.h" #include "MT_Vector3.h" @@ -88,7 +72,6 @@ static int fDoMipMap = 1; static int fLinearMipMap=1; static int fAlphamode= -1; -using namespace bgl; /* (n&(n-1)) zeros the least significant bit of n */ static int is_pow2(int num) { return ((num)&(num-1))==0; diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 885981a2898..44eeccedbd1 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -34,12 +34,8 @@ #include #endif -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif +#include "GL/glew.h" + #include #include "GPC_RenderTools.h" @@ -137,10 +133,6 @@ int GPC_RenderTools::ProcessLighting(int layer) { if (m_clientobject) { - if (layer == RAS_LIGHT_OBJECT_LAYER) - { - layer = static_cast(m_clientobject)->GetLayer(); - } if (applyLights(layer)) { EnableOpenGLLights(); @@ -160,7 +152,7 @@ void GPC_RenderTools::EnableOpenGLLights() glEnable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT_AND_BACK,GL_DIFFUSE); - if (bgl::QueryExtension(bgl::_GL_EXT_separate_specular_color) || bgl::QueryVersion(1, 2)) + if (GLEW_EXT_separate_specular_color || GLEW_VERSION_1_2) glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); } diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.h b/source/gameengine/GamePlayer/common/GPC_RenderTools.h index ee0212da643..f7230cb0865 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.h +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.h @@ -30,18 +30,11 @@ #ifndef __GPC_RENDERTOOLS_H #define __GPC_RENDERTOOLS_H -#if defined(WIN32) || defined(__APPLE__) - #ifdef WIN32 - #include - #include - #else // WIN32 - // __APPLE__ is defined - #include - #endif // WIN32 -#else //defined(WIN32) || defined(__APPLE__) - #include -#endif //defined(WIN32) || defined(__APPLE__) +#ifdef WIN32 + #include +#endif // WIN32 +#include "GL/glew.h" #include "RAS_IRenderTools.h" diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile index 508dee18755..19d792ddbdb 100644 --- a/source/gameengine/GamePlayer/common/Makefile +++ b/source/gameengine/GamePlayer/common/Makefile @@ -35,6 +35,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I../../../blender/blenkernel diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript index 6ff3ae10735..3b2367d2592 100644 --- a/source/gameengine/GamePlayer/common/SConscript +++ b/source/gameengine/GamePlayer/common/SConscript @@ -45,7 +45,8 @@ incs = ['.', '#source/gameengine/Network/LoopBackNetwork', '#source/gameengine/GamePlayer/ghost', '#source/blender/misc', - '#source/blender/blenloader'] + '#source/blender/blenloader', + '#extern/glew/include'] #This is all plugin stuff! #if sys.platform=='win32': diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 3d17cd2cfdd..d9f0675001f 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -65,6 +65,7 @@ SET(INC ../../../../source/blender/misc ../../../../source/blender/blenloader ../../../../extern/solid + ../../../../extern/glew/include ${PYTHON_INC} ) diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index dfd15227501..c4cf698d5ee 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -37,18 +37,7 @@ #include #endif -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -#if defined(__sun__) && !defined(__sparc__) -#include -#else -#include -#endif -#endif +#include "GL/glew.h" #include "GPG_Application.h" @@ -134,7 +123,8 @@ GPG_Application::GPG_Application(GHOST_ISystem* system, struct Main* maggie, STR m_sceneconverter(0), m_networkdevice(0), m_audiodevice(0), - m_blendermat(0) + m_blendermat(0), + m_blenderglslmat(0) { fSystem = system; } @@ -487,7 +477,8 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) { if (!m_engineInitialized) { - bgl::InitExtensions(1); + glewInit(); + bgl::InitExtensions(true); // get and set the preferences SYS_SystemHandle syshandle = SYS_GetSystem(); @@ -508,26 +499,10 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 0; bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", G.fileflags & G_FILE_DIAPLAY_LISTS) != 0); -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { + if(GLEW_ARB_multitexture && GLEW_VERSION_1_1) { int gameflag =(G.fileflags & G_FILE_GAME_MAT); - - if(bgl::RAS_EXT_support._ARB_multitexture && bgl::QueryVersion(1, 1)) { - m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", gameflag) != 0); - int unitmax=0; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&unitmax); - bgl::max_texture_units = MAXTEX>unitmax?unitmax:MAXTEX; - //std::cout << "using(" << bgl::max_texture_units << ") of(" << unitmax << ") texture units." << std::endl; - } else { - bgl::max_texture_units = 0; - } - } else { - m_blendermat=0; + m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", gameflag) != 0); } -#else - m_blendermat=0; -#endif//GL_ARB_multitexture - // ---------------------------------- // create the canvas, rasterizer and rendertools m_canvas = new GPG_Canvas(window); @@ -545,7 +520,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) } else { m_rasterizer = new RAS_ListRasterizer(m_canvas); } - else if (useVertexArrays && bgl::QueryVersion(1, 1)) + else if (useVertexArrays && GLEW_VERSION_1_1) m_rasterizer = new RAS_VAOpenGLRasterizer(m_canvas); else m_rasterizer = new RAS_OpenGLRasterizer(m_canvas); @@ -655,6 +630,8 @@ bool GPG_Application::startEngine(void) // sceneconverter->SetAlwaysUseExpandFraming(true); if(m_blendermat) m_sceneconverter->SetMaterials(true); + if(m_blenderglslmat) + m_sceneconverter->SetGLSLMaterials(true); KX_Scene* startscene = new KX_Scene(m_keyboard, m_mouse, diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.h b/source/gameengine/GamePlayer/ghost/GPG_Application.h index 024ca1dbf32..17f5add8b19 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.h +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.h @@ -141,6 +141,7 @@ protected: SND_IAudioDevice* m_audiodevice; bool m_blendermat; + bool m_blenderglslmat; }; diff --git a/source/gameengine/GamePlayer/ghost/Makefile b/source/gameengine/GamePlayer/ghost/Makefile index d5aae181396..13940ac3fc8 100644 --- a/source/gameengine/GamePlayer/ghost/Makefile +++ b/source/gameengine/GamePlayer/ghost/Makefile @@ -36,6 +36,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) # OpenGL header files +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_BMFONT)/include diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index bd37777031e..f3cce6c7443 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -39,7 +39,8 @@ incs = ['.', '#source/gameengine/Network/LoopBackNetwork', '#source/gameengine/GamePlayer/common', '#source/blender/misc', - '#source/blender/blenloader'] + '#source/blender/blenloader', + '#extern/glew/include'] incs += Split(env['BF_PYTHON_INC']) incs += Split(env['BF_SOLID_INC']) diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp new file mode 100644 index 00000000000..06e012123b1 --- /dev/null +++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp @@ -0,0 +1,149 @@ + +#include "DNA_customdata_types.h" + +#include "BL_BlenderShader.h" + +#if 0 +#include "GPU_extensions.h" +#include "GPU_material.h" +#endif + +#include "RAS_MeshObject.h" +#include "RAS_IRasterizer.h" + +const bool BL_BlenderShader::Ok()const +{ +#if 0 + return (mGPUMat != 0); +#endif + + return false; +} + +BL_BlenderShader::BL_BlenderShader(struct Material *ma) +: +#if 0 + mGPUMat(0), +#endif + mBound(false) +{ +#if 0 + if(ma) + mGPUMat = GPU_material_from_blender(ma, GPU_PROFILE_DERIVEDMESH); +#endif +} + +BL_BlenderShader::~BL_BlenderShader() +{ +#if 0 + if(mGPUMat) { + GPU_material_unbind(mGPUMat); + mGPUMat = 0; + } +#endif +} + +void BL_BlenderShader::ApplyShader() +{ +} + +void BL_BlenderShader::SetProg(bool enable) +{ +#if 0 + if(mGPUMat) { + if(enable) { + GPU_material_bind(mGPUMat); + mBound = true; + } + else { + GPU_material_unbind(mGPUMat); + mBound = false; + } + } +#endif +} + +int BL_BlenderShader::GetAttribNum() +{ +#if 0 + GPUVertexAttribs attribs; + int i, enabled = 0; + + if(!mGPUMat) + return enabled; + + GPU_material_vertex_attributes(mGPUMat, &attribs); + + for(i = 0; i < attribs.totlayer; i++) + if(attribs.layer[i].glindex+1 > enabled) + enabled= attribs.layer[i].glindex+1; + + if(enabled > BL_MAX_ATTRIB) + enabled = BL_MAX_ATTRIB; + + return enabled; +#endif + + return 0; +} + +void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) +{ +#if 0 + GPUVertexAttribs attribs; + int i, attrib_num; + + if(!mGPUMat) + return; + + if(ras->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) { + GPU_material_vertex_attributes(mGPUMat, &attribs); + attrib_num = GetAttribNum(); + + ras->SetTexCoordNum(0); + ras->SetAttribNum(attrib_num); + for(i=0; iSetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, i); + + for(i = 0; i < attribs.totlayer; i++) { + if(attribs.layer[i].glindex > attrib_num) + continue; + + if(attribs.layer[i].type == CD_MTFACE) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + else if(attribs.layer[i].type == CD_TANGENT) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, attribs.layer[i].glindex); + else if(attribs.layer[i].type == CD_ORCO) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_ORCO, attribs.layer[i].glindex); + else if(attribs.layer[i].type == CD_NORMAL) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_NORM, attribs.layer[i].glindex); + } + + ras->EnableTextures(true); + } + else + ras->EnableTextures(false); +#endif +} + +void BL_BlenderShader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) +{ +#if 0 + float obmat[4][4], viewmat[4][4]; + + if(!mGPUMat || !mBound) + return; + + MT_Matrix4x4 model; + model.setValue(ms.m_OpenGLMatrix); + MT_Matrix4x4 view; + rasty->GetViewMatrix(view); + + model.getValue((float*)obmat); + view.getValue((float*)viewmat); + + GPU_material_bind_uniforms(mGPUMat, obmat, viewmat); +#endif +} + +// eof diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h new file mode 100644 index 00000000000..4cab0e644c3 --- /dev/null +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -0,0 +1,44 @@ + +#ifndef __BL_GPUSHADER_H__ +#define __BL_GPUSHADER_H__ + +#if 0 +#include "GPU_material.h" +#endif + +#include "MT_Matrix4x4.h" +#include "MT_Matrix3x3.h" +#include "MT_Tuple2.h" +#include "MT_Tuple3.h" +#include "MT_Tuple4.h" + +struct Material; + +#define BL_MAX_ATTRIB 16 + +/** + * BL_BlenderShader + * Blender GPU shader material + */ +class BL_BlenderShader +{ +private: +#if 0 + GPUMaterial *mGPUMat; +#endif + bool mBound; + +public: + BL_BlenderShader(struct Material *ma); + virtual ~BL_BlenderShader(); + + const bool Ok()const; + void SetProg(bool enable); + + void ApplyShader(); + void SetTexCoords(class RAS_IRasterizer* ras); + int GetAttribNum(); + void Update(const class KX_MeshSlot & ms, class RAS_IRasterizer* rasty); +}; + +#endif//__BL_GPUSHADER_H__ diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp index 7ed2da590a9..f5312ccd023 100644 --- a/source/gameengine/Ketsji/BL_Material.cpp +++ b/source/gameengine/Ketsji/BL_Material.cpp @@ -34,6 +34,7 @@ BL_Material::BL_Material() rgb[3] = 0; IdMode = 0; ras_mode = 0; + glslmat = 0; tile = 0; matname = "NoMaterial"; matcolor[0] = 0.5f; diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index 8be91316237..ddb6662830a 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -20,7 +20,7 @@ struct EnvMap; although the more you add the slower the search time will be. we will go for three, which should be enough */ -#define MAXTEX 3//match in RAS_TexVert & RAS_OpenGLRasterizer +#define MAXTEX 3 //match in RAS_TexVert & RAS_OpenGLRasterizer // different mapping modes class BL_Mapping @@ -47,6 +47,7 @@ public: int IdMode; unsigned int ras_mode; + bool glslmat; STR_String texname[MAXTEX]; unsigned int flag[MAXTEX]; diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index 105a87e767b..15350db6650 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -1,21 +1,5 @@ - -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -/* #if defined(__sun__) && !defined(__sparc__) -#include -#else -*/ -#include -/* #endif */ -#endif +#include "GL/glew.h" #include #include "BL_Shader.h" @@ -31,7 +15,6 @@ #include "RAS_MeshObject.h" #include "RAS_IRasterizer.h" -//using namespace bgl; #define spit(x) std::cout << x << std::endl; #define SORT_UNIFORMS 1 @@ -46,7 +29,7 @@ BL_Uniform::BL_Uniform(int data_size) mDataLen(data_size) { #ifdef SORT_UNIFORMS - MT_assert(mDataLen <= UNIFORM_MAX_LEN); + MT_assert((int)mDataLen <= UNIFORM_MAX_LEN); mData = (void*)MEM_mallocN(mDataLen, "shader-uniform-alloc"); #endif } @@ -63,7 +46,6 @@ BL_Uniform::~BL_Uniform() void BL_Uniform::Apply(class BL_Shader *shader) { -#ifdef GL_ARB_shader_objects #ifdef SORT_UNIFORMS MT_assert(mType > UNI_NONE && mType < UNI_MAX && mData); @@ -74,48 +56,47 @@ void BL_Uniform::Apply(class BL_Shader *shader) { case UNI_FLOAT: { float *f = (float*)mData; - bgl::blUniform1fARB(mLoc,(GLfloat)*f); + glUniform1fARB(mLoc,(GLfloat)*f); }break; case UNI_INT: { int *f = (int*)mData; - bgl::blUniform1iARB(mLoc, (GLint)*f); + glUniform1iARB(mLoc, (GLint)*f); }break; case UNI_FLOAT2: { float *f = (float*)mData; - bgl::blUniform2fvARB(mLoc,1, (GLfloat*)f); + glUniform2fvARB(mLoc,1, (GLfloat*)f); }break; case UNI_FLOAT3: { float *f = (float*)mData; - bgl::blUniform3fvARB(mLoc,1,(GLfloat*)f); + glUniform3fvARB(mLoc,1,(GLfloat*)f); }break; case UNI_FLOAT4: { float *f = (float*)mData; - bgl::blUniform4fvARB(mLoc,1,(GLfloat*)f); + glUniform4fvARB(mLoc,1,(GLfloat*)f); }break; case UNI_INT2: { int *f = (int*)mData; - bgl::blUniform2ivARB(mLoc,1,(GLint*)f); + glUniform2ivARB(mLoc,1,(GLint*)f); }break; case UNI_INT3: { int *f = (int*)mData; - bgl::blUniform3ivARB(mLoc,1,(GLint*)f); + glUniform3ivARB(mLoc,1,(GLint*)f); }break; case UNI_INT4: { int *f = (int*)mData; - bgl::blUniform4ivARB(mLoc,1,(GLint*)f); + glUniform4ivARB(mLoc,1,(GLint*)f); }break; case UNI_MAT4: { float *f = (float*)mData; - bgl::blUniformMatrix4fvARB(mLoc, 1, mTranspose?GL_TRUE:GL_FALSE,(GLfloat*)f); + glUniformMatrix4fvARB(mLoc, 1, mTranspose?GL_TRUE:GL_FALSE,(GLfloat*)f); }break; case UNI_MAT3: { float *f = (float*)mData; - bgl::blUniformMatrix3fvARB(mLoc, 1, mTranspose?GL_TRUE:GL_FALSE,(GLfloat*)f); + glUniformMatrix3fvARB(mLoc, 1, mTranspose?GL_TRUE:GL_FALSE,(GLfloat*)f); }break; } mDirty = false; #endif -#endif } void BL_Uniform::SetData(int location, int type,bool transpose) @@ -144,17 +125,14 @@ BL_Shader::BL_Shader(PyTypeObject *T) mError(0), mDirty(true) { - // if !RAS_EXT_support._ARB_shader_objects this class will not be used + // if !GLEW_ARB_shader_objects this class will not be used //for (int i=0; i 0 && vertlen < MAX_LOG_LEN){ logInf = (char*)MEM_mallocN(vertlen, "vert-log"); - bgl::blGetInfoLogARB(tmpVert, vertlen, (GLsizei*)&char_len, logInf); + glGetInfoLogARB(tmpVert, vertlen, (GLsizei*)&char_len, logInf); if(char_len >0) { spit("---- Vertex Shader Error ----"); spit(logInf); @@ -308,20 +283,20 @@ bool BL_Shader::LinkProgram() logInf=0; } // check for compile errors - bgl::blGetObjectParameterivARB(tmpVert, GL_OBJECT_COMPILE_STATUS_ARB,(GLint*)&vertstatus); + glGetObjectParameterivARB(tmpVert, GL_OBJECT_COMPILE_STATUS_ARB,(GLint*)&vertstatus); if(!vertstatus) { spit("---- Vertex shader failed to compile ----"); goto programError; } // -- fragment shader ---------------- - tmpFrag = bgl::blCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); - bgl::blShaderSourceARB(tmpFrag, 1,(const char**)&fragProg, 0); - bgl::blCompileShaderARB(tmpFrag); - bgl::blGetObjectParameterivARB(tmpFrag, GL_OBJECT_INFO_LOG_LENGTH_ARB, (GLint*) &fraglen); + tmpFrag = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); + glShaderSourceARB(tmpFrag, 1,(const char**)&fragProg, 0); + glCompileShaderARB(tmpFrag); + glGetObjectParameterivARB(tmpFrag, GL_OBJECT_INFO_LOG_LENGTH_ARB, (GLint*) &fraglen); if(fraglen >0 && fraglen < MAX_LOG_LEN){ logInf = (char*)MEM_mallocN(fraglen, "frag-log"); - bgl::blGetInfoLogARB(tmpFrag, fraglen,(GLsizei*) &char_len, logInf); + glGetInfoLogARB(tmpFrag, fraglen,(GLsizei*) &char_len, logInf); if(char_len >0) { spit("---- Fragment Shader Error ----"); spit(logInf); @@ -330,7 +305,7 @@ bool BL_Shader::LinkProgram() logInf=0; } - bgl::blGetObjectParameterivARB(tmpFrag, GL_OBJECT_COMPILE_STATUS_ARB, (GLint*) &fragstatus); + glGetObjectParameterivARB(tmpFrag, GL_OBJECT_COMPILE_STATUS_ARB, (GLint*) &fragstatus); if(!fragstatus){ spit("---- Fragment shader failed to compile ----"); goto programError; @@ -339,17 +314,17 @@ bool BL_Shader::LinkProgram() // -- program ------------------------ // set compiled vert/frag shader & link - tmpProg = bgl::blCreateProgramObjectARB(); - bgl::blAttachObjectARB(tmpProg, tmpVert); - bgl::blAttachObjectARB(tmpProg, tmpFrag); - bgl::blLinkProgramARB(tmpProg); - bgl::blGetObjectParameterivARB(tmpProg, GL_OBJECT_INFO_LOG_LENGTH_ARB, (GLint*) &proglen); - bgl::blGetObjectParameterivARB(tmpProg, GL_OBJECT_LINK_STATUS_ARB, (GLint*) &progstatus); + tmpProg = glCreateProgramObjectARB(); + glAttachObjectARB(tmpProg, tmpVert); + glAttachObjectARB(tmpProg, tmpFrag); + glLinkProgramARB(tmpProg); + glGetObjectParameterivARB(tmpProg, GL_OBJECT_INFO_LOG_LENGTH_ARB, (GLint*) &proglen); + glGetObjectParameterivARB(tmpProg, GL_OBJECT_LINK_STATUS_ARB, (GLint*) &progstatus); if(proglen > 0 && proglen < MAX_LOG_LEN) { logInf = (char*)MEM_mallocN(proglen, "prog-log"); - bgl::blGetInfoLogARB(tmpProg, proglen, (GLsizei*)&char_len, logInf); + glGetInfoLogARB(tmpProg, proglen, (GLsizei*)&char_len, logInf); if(char_len >0) { spit("---- GLSL Program ----"); spit(logInf); @@ -365,24 +340,24 @@ bool BL_Shader::LinkProgram() // set mShader = tmpProg; - bgl::blDeleteObjectARB(tmpVert); - bgl::blDeleteObjectARB(tmpFrag); + glDeleteObjectARB(tmpVert); + glDeleteObjectARB(tmpFrag); mOk = 1; mError = 0; return true; programError: if(tmpVert) { - bgl::blDeleteObjectARB(tmpVert); + glDeleteObjectARB(tmpVert); tmpVert=0; } if(tmpFrag) { - bgl::blDeleteObjectARB(tmpFrag); + glDeleteObjectARB(tmpFrag); tmpFrag=0; } if(tmpProg) { - bgl::blDeleteObjectARB(tmpProg); + glDeleteObjectARB(tmpProg); tmpProg=0; } @@ -390,9 +365,6 @@ programError: mUse = 0; mError = 1; return false; -#else - return false; -#endif//GL_ARB_shader_objects } const char *BL_Shader::GetVertPtr() @@ -428,15 +400,13 @@ unsigned int BL_Shader::GetProg() void BL_Shader::SetSampler(int loc, int unit) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - bgl::blUniform1iARB(loc, unit); + glUniform1iARB(loc, unit); } -#endif } // //void BL_Shader::InitializeSampler(int unit, BL_Texture* texture) @@ -449,31 +419,28 @@ void BL_Shader::SetSampler(int loc, int unit) void BL_Shader::SetProg(bool enable) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { if( mShader != 0 && mOk && enable) { - bgl::blUseProgramObjectARB(mShader); + glUseProgramObjectARB(mShader); } else { - bgl::blUseProgramObjectARB(0); + glUseProgramObjectARB(0); } } -#endif } void BL_Shader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) { -#ifdef GL_ARB_shader_objects if(!Ok() || !mPreDef.size()) return; - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { MT_Matrix4x4 model; @@ -578,210 +545,185 @@ void BL_Shader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) } } } -#endif } int BL_Shader::GetAttribLocation(const STR_String& name) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - return bgl::blGetAttribLocationARB(mShader, name.ReadPtr()); + return glGetAttribLocationARB(mShader, name.ReadPtr()); } -#endif + return -1; } void BL_Shader::BindAttribute(const STR_String& attr, int loc) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - bgl::blBindAttribLocationARB(mShader, loc, attr.ReadPtr()); + glBindAttribLocationARB(mShader, loc, attr.ReadPtr()); } -#endif } int BL_Shader::GetUniformLocation(const STR_String& name) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { MT_assert(mShader!=0); - int location = bgl::blGetUniformLocationARB(mShader, name.ReadPtr()); + int location = glGetUniformLocationARB(mShader, name.ReadPtr()); if(location == -1) spit("Invalid uniform value: " << name.ReadPtr() << "."); return location; } -#endif + return -1; } void BL_Shader::SetUniform(int uniform, const MT_Tuple2& vec) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { float value[2]; vec.getValue(value); - bgl::blUniform2fvARB(uniform, 1, value); + glUniform2fvARB(uniform, 1, value); } -#endif } void BL_Shader::SetUniform(int uniform, const MT_Tuple3& vec) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { float value[3]; vec.getValue(value); - bgl::blUniform3fvARB(uniform, 1, value); + glUniform3fvARB(uniform, 1, value); } -#endif } void BL_Shader::SetUniform(int uniform, const MT_Tuple4& vec) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { float value[4]; vec.getValue(value); - bgl::blUniform4fvARB(uniform, 1, value); + glUniform4fvARB(uniform, 1, value); } -#endif } void BL_Shader::SetUniform(int uniform, const unsigned int& val) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - bgl::blUniform1iARB(uniform, val); + glUniform1iARB(uniform, val); } -#endif } void BL_Shader::SetUniform(int uniform, const int val) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - bgl::blUniform1iARB(uniform, val); + glUniform1iARB(uniform, val); } -#endif } void BL_Shader::SetUniform(int uniform, const float& val) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { - bgl::blUniform1fARB(uniform, val); + glUniform1fARB(uniform, val); } -#endif } void BL_Shader::SetUniform(int uniform, const MT_Matrix4x4& vec, bool transpose) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { float value[16]; vec.getValue(value); - bgl::blUniformMatrix4fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value); + glUniformMatrix4fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value); } -#endif } void BL_Shader::SetUniform(int uniform, const MT_Matrix3x3& vec, bool transpose) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { float value[9]; value[0] = (float)vec[0][0]; value[1] = (float)vec[1][0]; value[2] = (float)vec[2][0]; value[3] = (float)vec[0][1]; value[4] = (float)vec[1][1]; value[5] = (float)vec[2][1]; value[6] = (float)vec[0][2]; value[7] = (float)vec[1][2]; value[7] = (float)vec[2][2]; - bgl::blUniformMatrix3fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value); + glUniformMatrix3fvARB(uniform, 1, transpose?GL_TRUE:GL_FALSE, value); } -#endif } void BL_Shader::SetUniform(int uniform, const float* val, int len) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { if(len == 2) - bgl::blUniform2fvARB(uniform, 1,(GLfloat*)val); + glUniform2fvARB(uniform, 1,(GLfloat*)val); else if (len == 3) - bgl::blUniform3fvARB(uniform, 1,(GLfloat*)val); + glUniform3fvARB(uniform, 1,(GLfloat*)val); else if (len == 4) - bgl::blUniform4fvARB(uniform, 1,(GLfloat*)val); + glUniform4fvARB(uniform, 1,(GLfloat*)val); else MT_assert(0); } -#endif } void BL_Shader::SetUniform(int uniform, const int* val, int len) { -#ifdef GL_ARB_shader_objects - if( RAS_EXT_support._ARB_fragment_shader && - RAS_EXT_support._ARB_vertex_shader && - RAS_EXT_support._ARB_shader_objects + if( GLEW_ARB_fragment_shader && + GLEW_ARB_vertex_shader && + GLEW_ARB_shader_objects ) { if(len == 2) - bgl::blUniform2ivARB(uniform, 1, (GLint*)val); + glUniform2ivARB(uniform, 1, (GLint*)val); else if (len == 3) - bgl::blUniform3ivARB(uniform, 1, (GLint*)val); + glUniform3ivARB(uniform, 1, (GLint*)val); else if (len == 4) - bgl::blUniform4ivARB(uniform, 1, (GLint*)val); + glUniform4ivARB(uniform, 1, (GLint*)val); else MT_assert(0); } -#endif } @@ -849,7 +791,6 @@ PyParentObject BL_Shader::Parents[] = { KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProgram)" ) { -#ifdef GL_ARB_shader_objects if(mShader !=0 && mOk ) { // already set... @@ -862,7 +803,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProg vertProg = v; fragProg = f; if( LinkProgram() ) { - bgl::blUseProgramObjectARB( mShader ); + glUseProgramObjectARB( mShader ); mUse = apply!=0; Py_Return; } @@ -871,24 +812,19 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProg mUse = 0; Py_Return; } - return NULL; -#else Py_Return; -#endif } KX_PYMETHODDEF_DOC( BL_Shader, delSource, "delSource( )" ) { -#ifdef GL_ARB_shader_objects ClearUniforms(); - bgl::blUseProgramObjectARB(0); + glUseProgramObjectARB(0); - bgl::blDeleteObjectARB(mShader); + glDeleteObjectARB(mShader); mShader = 0; mOk = 0; mUse = 0; -#endif Py_Return; } @@ -909,7 +845,6 @@ KX_PYMETHODDEF_DOC( BL_Shader, getFragmentProg ,"getFragmentProg( )" ) KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()") { -#ifdef GL_ARB_shader_objects if(mError) { Py_INCREF(Py_None); return Py_None; @@ -919,15 +854,15 @@ KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()") return NULL; } int stat = 0; - bgl::blValidateProgramARB(mShader); - bgl::blGetObjectParameterivARB(mShader, GL_OBJECT_VALIDATE_STATUS_ARB,(GLint*) &stat); + glValidateProgramARB(mShader); + glGetObjectParameterivARB(mShader, GL_OBJECT_VALIDATE_STATUS_ARB,(GLint*) &stat); if(stat > 0 && stat < MAX_LOG_LEN) { int char_len=0; char *logInf = (char*)MEM_mallocN(stat, "validate-log"); - bgl::blGetInfoLogARB(mShader, stat,(GLsizei*) &char_len, logInf); + glGetInfoLogARB(mShader, stat,(GLsizei*) &char_len, logInf); if(char_len >0) { spit("---- GLSL Validation ----"); spit(logInf); @@ -935,7 +870,6 @@ KX_PYMETHODDEF_DOC( BL_Shader, validate, "validate()") MEM_freeN(logInf); logInf=0; } -#endif//GL_ARB_shader_objects Py_Return; } @@ -1412,7 +1346,6 @@ KX_PYMETHODDEF_DOC( BL_Shader, setUniformMatrix3, KX_PYMETHODDEF_DOC( BL_Shader, setAttrib, "setAttrib(enum)" ) { -#ifdef GL_ARB_shader_objects if(mError) { Py_INCREF(Py_None); return Py_None; @@ -1424,11 +1357,10 @@ KX_PYMETHODDEF_DOC( BL_Shader, setAttrib, "setAttrib(enum)" ) return NULL; } mAttr=SHD_TANGENT; - bgl::blUseProgramObjectARB(mShader); - bgl::blBindAttribLocationARB(mShader, mAttr, "Tangent"); + glUseProgramObjectARB(mShader); + glBindAttribLocationARB(mShader, mAttr, "Tangent"); Py_Return; } -#endif return NULL; } diff --git a/source/gameengine/Ketsji/BL_Texture.cpp b/source/gameengine/Ketsji/BL_Texture.cpp index 687b1af957d..f24ef4322f0 100644 --- a/source/gameengine/Ketsji/BL_Texture.cpp +++ b/source/gameengine/Ketsji/BL_Texture.cpp @@ -1,19 +1,6 @@ // ------------------------------------ -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -/* #if defined(__sun__) && !defined(__sparc__) -#include -#else */ -#include -/* #endif */ -#endif + +#include "GL/glew.h" #include #include @@ -30,15 +17,11 @@ #include "BLI_blenlib.h" #include "RAS_OpenGLRasterizer/RAS_GLExtensionManager.h" -#include "RAS_OpenGLRasterizer/ARB_multitexture.h" #include "RAS_ICanvas.h" #include "RAS_Rect.h" #include "KX_GameObject.h" - -using namespace bgl; - #define spit(x) std::cout << x << std::endl; #include "MEM_guardedalloc.h" @@ -220,9 +203,7 @@ void BL_Texture::InitNonPow2Tex(unsigned int *pix,int x,int y,bool mipmap) bool BL_Texture::InitCubeMap(int unit, EnvMap *cubemap) { -#ifdef GL_ARB_texture_cube_map - - if (!RAS_EXT_support._ARB_texture_cube_map) + if (!GLEW_ARB_texture_cube_map) { spit("cubemaps not supported"); mOk = false; @@ -312,9 +293,8 @@ bool BL_Texture::InitCubeMap(int unit, EnvMap *cubemap) glTexParameteri( GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); glTexParameteri( GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); glTexParameteri( GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - #ifdef GL_VERSION_1_2 - glTexParameteri( GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE ); - #endif + if(GLEW_VERSION_1_2) + glTexParameteri( GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE ); if (needs_split) my_free_envmapdata(cubemap); @@ -326,13 +306,6 @@ bool BL_Texture::InitCubeMap(int unit, EnvMap *cubemap) mOk = IsValid(); return mOk; - -#else - - mOk = false; - return mOk; - -#endif//GL_ARB_texture_cube_map } bool BL_Texture::IsValid() @@ -362,58 +335,40 @@ int BL_Texture::GetMaxUnits() { GLint unit=0; -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(RAS_EXT_support._ARB_multitexture) { - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &unit); - return (MAXTEX>=unit?unit:MAXTEX); - } + if(GLEW_ARB_multitexture) { + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &unit); + return (MAXTEX>=unit?unit:MAXTEX); } -#endif + return 0; } void BL_Texture::ActivateFirst() { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(RAS_EXT_support._ARB_multitexture) - bgl::blActiveTextureARB(GL_TEXTURE0_ARB); - } -#endif + if(GLEW_ARB_multitexture) + glActiveTextureARB(GL_TEXTURE0_ARB); } void BL_Texture::ActivateUnit(int unit) { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(RAS_EXT_support._ARB_multitexture) - if(unit <= MAXTEX) - bgl::blActiveTextureARB(GL_TEXTURE0_ARB+unit); - } -#endif + if(GLEW_ARB_multitexture) + if(unit <= MAXTEX) + glActiveTextureARB(GL_TEXTURE0_ARB+unit); } void BL_Texture::DisableUnit() { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(RAS_EXT_support._ARB_multitexture) - bgl::blActiveTextureARB(GL_TEXTURE0_ARB+mUnit); - } -#endif - + if(GLEW_ARB_multitexture) + glActiveTextureARB(GL_TEXTURE0_ARB+mUnit); glMatrixMode(GL_TEXTURE); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); - #ifdef GL_ARB_texture_cube_map - if(RAS_EXT_support._ARB_texture_cube_map && glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB)) + if(GLEW_ARB_texture_cube_map && glIsEnabled(GL_TEXTURE_CUBE_MAP_ARB)) glDisable(GL_TEXTURE_CUBE_MAP_ARB); else - #endif { if (glIsEnabled(GL_TEXTURE_2D)) glDisable(GL_TEXTURE_2D); @@ -429,56 +384,45 @@ void BL_Texture::DisableUnit() void BL_Texture::DisableAllTextures() { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - glDisable(GL_BLEND); - for(int i=0; i #endif -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -/* #if defined(__sun__) && !defined(__sparc__) -#include -#else -*/ -#include -/* #endif */ -#endif +#include "GL/glew.h" #include "KX_BlenderMaterial.h" #include "BL_Material.h" @@ -37,7 +22,6 @@ #include "RAS_MeshObject.h" #include "RAS_IRasterizer.h" #include "RAS_OpenGLRasterizer/RAS_GLExtensionManager.h" -#include "RAS_OpenGLRasterizer/ARB_multitexture.h" extern "C" { #include "BDR_drawmesh.h" @@ -52,7 +36,6 @@ extern "C" { #include "DNA_meshdata_types.h" #include "BKE_mesh.h" // ------------------------------------ -using namespace bgl; #define spit(x) std::cout << x << std::endl; //static PyObject *gTextureDict = 0; @@ -81,6 +64,7 @@ KX_BlenderMaterial::KX_BlenderMaterial( ), mMaterial(data), mShader(0), + mBlenderShader(0), mScene(scene), mUserDefBlend(0), mModified(0), @@ -100,9 +84,6 @@ KX_BlenderMaterial::KX_BlenderMaterial( int max = BL_Texture::GetMaxUnits(); mMaterial->num_enabled = enabled>=max?max:enabled; - // base class - m_enabled = mMaterial->num_enabled; - // test the sum of the various modes for equality // so we can ether accept or reject this material // as being equal, this is rather important to @@ -144,25 +125,30 @@ void KX_BlenderMaterial::OnConstruction() if (mConstructed) // when material are reused between objects return; - - // for each unique material... - int i; - for(i=0; inum_enabled; i++) { - if( mMaterial->mapping[i].mapping & USEENV ) { - if(!RAS_EXT_support._ARB_texture_cube_map) { - spit("CubeMap textures not supported"); - continue; - } - if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) - spit("unable to initialize image("<matname<< ", image will not be available"); - } - else { - if( mMaterial->img[i] ) { - if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) + if(mMaterial->glslmat) { + SetBlenderGLSLShader(); + } + else { + // for each unique material... + int i; + for(i=0; inum_enabled; i++) { + if( mMaterial->mapping[i].mapping & USEENV ) { + if(!GLEW_ARB_texture_cube_map) { + spit("CubeMap textures not supported"); + continue; + } + if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) spit("unable to initialize image("<matname<< ", image will not be available"); + mMaterial->matname<< ", image will not be available"); + } + + else { + if( mMaterial->img[i] ) { + if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) + spit("unable to initialize image("<matname<< ", image will not be available"); + } } } } @@ -176,11 +162,17 @@ void KX_BlenderMaterial::OnExit() if( mShader ) { //note, the shader here is allocated, per unique material //and this function is called per face - mShader->SetProg(0); + mShader->SetProg(false); delete mShader; mShader = 0; } + if( mBlenderShader ) { + mBlenderShader->SetProg(false); + delete mBlenderShader; + mBlenderShader = 0; + } + BL_Texture::ActivateFirst(); for(int i=0; inum_enabled; i++) { BL_Texture::ActivateUnit(i); @@ -195,7 +187,7 @@ void KX_BlenderMaterial::OnExit() void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras) { - MT_assert(RAS_EXT_support._ARB_shader_objects && mShader); + MT_assert(GLEW_ARB_shader_objects && mShader); int i; if( !enable || !mShader->Ok() ) { @@ -229,10 +221,23 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras) } } +void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras) +{ + if( !enable || !mBlenderShader->Ok() ) { + // frame cleanup. + mBlenderShader->SetProg(false); + BL_Texture::DisableAllTextures(); + return; + } + + BL_Texture::DisableAllTextures(); + mBlenderShader->SetProg(true); + mBlenderShader->ApplyShader(); +} void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras) { - if(RAS_EXT_support._ARB_shader_objects && mShader) + if(GLEW_ARB_shader_objects && mShader) mShader->SetProg(false); BL_Texture::DisableAllTextures(); @@ -301,14 +306,10 @@ KX_BlenderMaterial::ActivatShaders( cachingInfo = GetCachingInfo(); - if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED ) { + if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) tmp->setShaderData( true, rasty); - rasty->EnableTextures(true); - } - else { + else tmp->setShaderData( false, rasty); - rasty->EnableTextures(false); - } if(mMaterial->mode & RAS_IRasterizer::KX_TWOSIDE) rasty->SetCullFace(false); @@ -330,24 +331,28 @@ KX_BlenderMaterial::ActivatShaders( } void -KX_BlenderMaterial::ActivateMat( - RAS_IRasterizer* rasty, - TCachingInfo& cachingInfo - )const +KX_BlenderMaterial::ActivateBlenderShaders( + RAS_IRasterizer* rasty, + TCachingInfo& cachingInfo)const { KX_BlenderMaterial *tmp = const_cast(this); + + // reset... + if(tmp->mMaterial->IsShared()) + cachingInfo =0; + if (GetCachingInfo() != cachingInfo) { - if (!cachingInfo) - tmp->setTexData( false,rasty ); + if (!cachingInfo) + tmp->setBlenderShaderData(false, rasty); cachingInfo = GetCachingInfo(); - - if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) { - tmp->setTexData( true,rasty ); + + if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) { + tmp->setBlenderShaderData(true, rasty); rasty->EnableTextures(true); } - else{ - tmp->setTexData( false,rasty); + else { + tmp->setBlenderShaderData(false, rasty); rasty->EnableTextures(false); } @@ -365,11 +370,48 @@ KX_BlenderMaterial::ActivateMat( else rasty->SetLines(false); } + + ActivatGLMaterials(rasty); + mBlenderShader->SetTexCoords(rasty); +} + +void +KX_BlenderMaterial::ActivateMat( + RAS_IRasterizer* rasty, + TCachingInfo& cachingInfo + )const +{ + KX_BlenderMaterial *tmp = const_cast(this); + if (GetCachingInfo() != cachingInfo) { + if (!cachingInfo) + tmp->setTexData( false,rasty ); + + cachingInfo = GetCachingInfo(); + + if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) + tmp->setTexData( true,rasty ); + else + tmp->setTexData( false,rasty); + + if(mMaterial->mode & RAS_IRasterizer::KX_TWOSIDE) + rasty->SetCullFace(false); + else + rasty->SetCullFace(true); + + if (((mMaterial->ras_mode &WIRE)!=0) || mMaterial->mode & RAS_IRasterizer::KX_LINES) + { + if((mMaterial->ras_mode &WIRE)!=0) + rasty->SetCullFace(false); + rasty->SetLines(true); + } + else + rasty->SetLines(false); + } + ActivatGLMaterials(rasty); ActivateTexGen(rasty); } - bool KX_BlenderMaterial::Activate( RAS_IRasterizer* rasty, @@ -377,7 +419,7 @@ KX_BlenderMaterial::Activate( )const { bool dopass = false; - if( RAS_EXT_support._ARB_shader_objects && ( mShader && mShader->Ok() ) ) { + if( GLEW_ARB_shader_objects && ( mShader && mShader->Ok() ) ) { if( (mPass++) < mShader->getNumPass() ) { ActivatShaders(rasty, cachingInfo); dopass = true; @@ -390,6 +432,18 @@ KX_BlenderMaterial::Activate( return dopass; } } + else if( GLEW_ARB_shader_objects && ( mBlenderShader && mBlenderShader->Ok() ) ) { + if( (mPass++) == 0 ) { + ActivateBlenderShaders(rasty, cachingInfo); + dopass = true; + return dopass; + } + else { + mPass = 0; + dopass = false; + return dopass; + } + } else { switch (mPass++) { @@ -408,34 +462,39 @@ KX_BlenderMaterial::Activate( void KX_BlenderMaterial::ActivateMeshSlot(const KX_MeshSlot & ms, RAS_IRasterizer* rasty) const { - if(mShader && RAS_EXT_support._ARB_shader_objects) + if(mShader && GLEW_ARB_shader_objects) mShader->Update(ms, rasty); + if(mBlenderShader && GLEW_ARB_shader_objects) + mBlenderShader->Update(ms, rasty); } void KX_BlenderMaterial::ActivatGLMaterials( RAS_IRasterizer* rasty )const { - rasty->SetSpecularity( - mMaterial->speccolor[0]*mMaterial->spec_f, - mMaterial->speccolor[1]*mMaterial->spec_f, - mMaterial->speccolor[2]*mMaterial->spec_f, - mMaterial->spec_f - ); + if(!mBlenderShader) { + rasty->SetSpecularity( + mMaterial->speccolor[0]*mMaterial->spec_f, + mMaterial->speccolor[1]*mMaterial->spec_f, + mMaterial->speccolor[2]*mMaterial->spec_f, + mMaterial->spec_f + ); - rasty->SetShinyness( mMaterial->hard ); + rasty->SetShinyness( mMaterial->hard ); - rasty->SetDiffuse( - mMaterial->matcolor[0]*mMaterial->ref+mMaterial->emit, - mMaterial->matcolor[1]*mMaterial->ref+mMaterial->emit, - mMaterial->matcolor[2]*mMaterial->ref+mMaterial->emit, - 1.0f); + rasty->SetDiffuse( + mMaterial->matcolor[0]*mMaterial->ref+mMaterial->emit, + mMaterial->matcolor[1]*mMaterial->ref+mMaterial->emit, + mMaterial->matcolor[2]*mMaterial->ref+mMaterial->emit, + 1.0f); - rasty->SetEmissive( - mMaterial->matcolor[0]*mMaterial->emit, - mMaterial->matcolor[1]*mMaterial->emit, - mMaterial->matcolor[2]*mMaterial->emit, - 1.0 ); + rasty->SetEmissive( + mMaterial->matcolor[0]*mMaterial->emit, + mMaterial->matcolor[1]*mMaterial->emit, + mMaterial->matcolor[2]*mMaterial->emit, + 1.0 ); + + rasty->SetAmbient(mMaterial->amb); + } - rasty->SetAmbient(mMaterial->amb); if (mMaterial->material) rasty->SetPolygonOffset(-mMaterial->material->zoffs, 0.0); } @@ -443,34 +502,46 @@ void KX_BlenderMaterial::ActivatGLMaterials( RAS_IRasterizer* rasty )const void KX_BlenderMaterial::ActivateTexGen(RAS_IRasterizer *ras) const { - if(mShader && RAS_EXT_support._ARB_shader_objects) - if(mShader->GetAttribute() == BL_Shader::SHD_TANGENT) - ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT); - - for(int i=0; inum_enabled; i++) { - int mode = mMaterial->mapping[i].mapping; - - if (mode &USECUSTOMUV) - { - STR_String str = mMaterial->mapping[i].uvCoName; - if (!str.IsEmpty()) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_UV2, i); - continue; + if(ras->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) { + ras->SetAttribNum(0); + if(mShader && GLEW_ARB_shader_objects) { + if(mShader->GetAttribute() == BL_Shader::SHD_TANGENT) { + ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, 1); + ras->SetAttribNum(2); + } } - if( mode &(USEREFL|USEOBJ)) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_GEN, i); - else if(mode &USEORCO) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_ORCO, i); - else if(mode &USENORM) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_NORM, i); - else if(mode &USEUV) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_UV1, i); - else if(mode &USETANG) - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXTANGENT, i); - else - ras->SetTexCoords(RAS_IRasterizer::RAS_TEXCO_DISABLE, i); + ras->SetTexCoordNum(mMaterial->num_enabled); + + for(int i=0; inum_enabled; i++) { + int mode = mMaterial->mapping[i].mapping; + + if (mode &USECUSTOMUV) + { + STR_String str = mMaterial->mapping[i].uvCoName; + if (!str.IsEmpty()) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_UV2, i); + continue; + } + + if( mode &(USEREFL|USEOBJ)) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_GEN, i); + else if(mode &USEORCO) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_ORCO, i); + else if(mode &USENORM) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_NORM, i); + else if(mode &USEUV) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_UV1, i); + else if(mode &USETANG) + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXTANGENT, i); + else + ras->SetTexCoord(RAS_IRasterizer::RAS_TEXCO_DISABLE, i); + } + + ras->EnableTextures(true); } + else + ras->EnableTextures(false); } bool KX_BlenderMaterial::setDefaultBlending() @@ -503,8 +574,7 @@ void KX_BlenderMaterial::setTexMatrixData(int i) glMatrixMode(GL_TEXTURE); glLoadIdentity(); -#ifdef GL_ARB_texture_cube_map - if( RAS_EXT_support._ARB_texture_cube_map && + if( GLEW_ARB_texture_cube_map && mTextures[i].GetTextureType() == GL_TEXTURE_CUBE_MAP_ARB && mMaterial->mapping[i].mapping & USEREFL) { glScalef( @@ -514,7 +584,6 @@ void KX_BlenderMaterial::setTexMatrixData(int i) ); } else -#endif { glScalef( mMaterial->mapping[i].scale[0], @@ -663,28 +732,23 @@ int KX_BlenderMaterial::_setattr(const STR_String& attr, PyObject *pyvalue) KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()") { -#ifdef GL_ARB_fragment_shader - if( !RAS_EXT_support._ARB_fragment_shader) { + if( !GLEW_ARB_fragment_shader) { if(!mModified) spit("Fragment shaders not supported"); mModified = true; Py_Return; } -#endif -#ifdef GL_ARB_vertex_shader - if( !RAS_EXT_support._ARB_vertex_shader) { + if( !GLEW_ARB_vertex_shader) { if(!mModified) spit("Vertex shaders not supported"); mModified = true; Py_Return; } -#endif -#ifdef GL_ARB_shader_objects - if(!RAS_EXT_support._ARB_shader_objects) { + if(!GLEW_ARB_shader_objects) { if(!mModified) spit("GLSL not supported"); mModified = true; @@ -723,13 +787,20 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()") } PyErr_Format(PyExc_ValueError, "GLSL Error"); return NULL; - -#else - Py_Return; -#endif//GL_ARB_shader_objects } +void KX_BlenderMaterial::SetBlenderGLSLShader(void) +{ + if(!mBlenderShader) + mBlenderShader = new BL_BlenderShader(mMaterial->material); + + if(!mBlenderShader->Ok()) { + delete mBlenderShader; + mBlenderShader = 0; + } +} + KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getMaterialIndex, "getMaterialIndex()") { return PyInt_FromLong( mMaterial->material_index ); diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index b9d48199520..62e96b71937 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -8,6 +8,7 @@ #include "BL_Material.h" #include "BL_Texture.h" #include "BL_Shader.h" +#include "BL_BlenderShader.h" #include "PyObjectPlus.h" @@ -60,6 +61,10 @@ public: TCachingInfo& cachingInfo )const; + void ActivateBlenderShaders( + RAS_IRasterizer* rasty, + TCachingInfo& cachingInfo + )const; MTFace* GetMTFace(void) const; unsigned int* GetMCol(void) const; @@ -86,8 +91,9 @@ public: // pre calculate to avoid pops/lag at startup virtual void OnConstruction( ); private: - BL_Material* mMaterial; - BL_Shader* mShader; + BL_Material* mMaterial; + BL_Shader* mShader; + BL_BlenderShader* mBlenderShader; KX_Scene* mScene; BL_Texture mTextures[MAXTEX]; // texture array bool mUserDefBlend; @@ -95,12 +101,15 @@ private: bool mModified; bool mConstructed; // if false, don't clean on exit + void SetBlenderGLSLShader(); + void ActivatGLMaterials( RAS_IRasterizer* rasty )const; void ActivateTexGen( RAS_IRasterizer *ras ) const; // message centers void setTexData( bool enable,RAS_IRasterizer *ras); + void setBlenderShaderData( bool enable, RAS_IRasterizer *ras); void setShaderData( bool enable, RAS_IRasterizer *ras); bool setDefaultBlending(); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 6fde94fec53..5698c106b17 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -81,8 +81,8 @@ KX_GameObject::KX_GameObject( m_bVisible(true), m_pPhysicsController1(NULL), m_pPhysicsEnvironment(NULL), - m_isDeformable(false), - m_pHitObject(NULL) + m_pHitObject(NULL), + m_isDeformable(false) { m_ignore_activity_culling = false; m_pClient_info = new KX_ClientObjectInfo(this, KX_ClientObjectInfo::ACTOR); diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index bba289bf891..f069048cd3d 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -74,6 +74,9 @@ public: virtual void SetMaterials(bool val) =0; virtual bool GetMaterials()=0; + // use blender glsl materials + virtual void SetGLSLMaterials(bool val) =0; + virtual bool GetGLSLMaterials()=0; }; #endif //__KX_ISCENECONVERTER_H diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index a80a7f04e8f..0831788009d 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -28,25 +28,7 @@ * Initialize Python thingies. */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -/* #if defined(__sun__) && !defined(__sparc__) -#include -#else */ -#include -/* #endif */ -#endif +#include "GL/glew.h" #include @@ -310,17 +292,13 @@ static PyObject* gPyGetCurrentScene(PyObject* self, static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *) { #define pprint(x) std::cout << x << std::endl; - bgl::BL_EXTInfo ext = bgl::RAS_EXT_support; bool count=0; bool support=0; pprint("Supported Extensions..."); -#ifdef GL_ARB_shader_objects - pprint(" GL_ARB_shader_objects supported? "<< (ext._ARB_shader_objects?"yes.":"no.")); + pprint(" GL_ARB_shader_objects supported? "<< (GLEW_ARB_shader_objects?"yes.":"no.")); count = 1; -#endif -#ifdef GL_ARB_vertex_shader - support= ext._ARB_vertex_shader; + support= GLEW_ARB_vertex_shader; pprint(" GL_ARB_vertex_shader supported? "<< (support?"yes.":"no.")); count = 1; if(support){ @@ -339,9 +317,8 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *) pprint(" Max combined texture units." << max); pprint(""); } -#endif -#ifdef GL_ARB_fragment_shader - support=ext._ARB_fragment_shader; + + support=GLEW_ARB_fragment_shader; pprint(" GL_ARB_fragment_shader supported? "<< (support?"yes.":"no.")); count = 1; if(support){ @@ -351,9 +328,8 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *) pprint(" Max uniform components." << max); pprint(""); } -#endif -#ifdef GL_ARB_texture_cube_map - support = ext._ARB_texture_cube_map; + + support = GLEW_ARB_texture_cube_map; pprint(" GL_ARB_texture_cube_map supported? "<< (support?"yes.":"no.")); count = 1; if(support){ @@ -363,25 +339,21 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *) pprint(" Max cubemap size." << size); pprint(""); } -#endif -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - support = ext._ARB_multitexture; - count = 1; - pprint(" GL_ARB_multitexture supported? "<< (support?"yes.":"no.")); - if(support){ - pprint(" ----------Details----------"); - int units=0; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&units); - pprint(" Max texture units available. " << units); - pprint(""); - } - } -#endif -#ifdef GL_ARB_texture_env_combine - pprint(" GL_ARB_texture_env_combine supported? "<< (ext._ARB_texture_env_combine?"yes.":"no.")); + + support = GLEW_ARB_multitexture; count = 1; -#endif + pprint(" GL_ARB_multitexture supported? "<< (support?"yes.":"no.")); + if(support){ + pprint(" ----------Details----------"); + int units=0; + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&units); + pprint(" Max texture units available. " << units); + pprint(""); + } + + pprint(" GL_ARB_texture_env_combine supported? "<< (GLEW_ARB_texture_env_combine?"yes.":"no.")); + count = 1; + if(!count) pprint("No extenstions are used in this build"); diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile index e6e541d0931..47a4855b00c 100644 --- a/source/gameengine/Ketsji/Makefile +++ b/source/gameengine/Ketsji/Makefile @@ -36,6 +36,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) CPPFLAGS += $(OGL_CPPFLAGS) +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) -I../../blender/python CPPFLAGS += -I$(NAN_STRING)/include diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index c7c80345796..fdac5a71071 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -18,7 +18,7 @@ incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common #sourc incs += ' #source/gameengine/Physics/BlOde #source/gameengine/Physics/Dummy' incs += ' #source/gameengine/Physics/Sumo #source/gameengine/Physics/Sumo/include' incs += ' #source/gameengine/Physics/Sumo/Fuzzics/include #source/gameengine/Network/LoopBackNetwork' -incs += ' #source/blender/misc #source/blender/blenloader' +incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include' cflags = [] if env['OURPLATFORM'] == 'win32-vc': diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt index e604fe0e133..18a755afefd 100644 --- a/source/gameengine/Rasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/CMakeLists.txt @@ -31,6 +31,7 @@ SET(INC ../../../source/kernel/gen_system ../../../intern/string ../../../intern/moto/include + ../../../extern/glew/include ) BLENDERLIB(bf_rasterizer "${SRC}" "${INC}") diff --git a/source/gameengine/Rasterizer/Makefile b/source/gameengine/Rasterizer/Makefile index d544056e8ae..1ca3e3b0283 100644 --- a/source/gameengine/Rasterizer/Makefile +++ b/source/gameengine/Rasterizer/Makefile @@ -35,6 +35,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_MOTO)/include diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 80d6d55df25..291890a8dde 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -46,18 +46,7 @@ #include "RAS_2DFilterManager.h" #include -#ifdef WIN32 -// OpenGL gl.h needs 'windows.h' on windows platforms -#include -#endif //WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif - -#include "RAS_OpenGLRasterizer/RAS_GLExtensionManager.h" +#include "GL/glew.h" #ifdef HAVE_CONFIG_H #include @@ -69,7 +58,7 @@ texturewidth(-1), textureheight(-1), canvaswidth(-1), canvasheight(-1), numberoffilters(0),texname(-1) { - isshadersupported = bgl::QueryVersion(2,0); + isshadersupported = GLEW_VERSION_2_0; if(!isshadersupported) { std::cout<<"shaders not supported!" << std::endl; @@ -93,14 +82,14 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) { GLuint program = 0; #if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) - GLuint fShader = bgl::blCreateShaderObjectARB(GL_FRAGMENT_SHADER); + GLuint fShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER); GLint success; - bgl::blShaderSourceARB(fShader, 1, (const char**)&shadersource, NULL); + glShaderSourceARB(fShader, 1, (const char**)&shadersource, NULL); - bgl::blCompileShaderARB(fShader); + glCompileShaderARB(fShader); - bgl::blGetObjectParameterivARB(fShader, GL_COMPILE_STATUS, &success); + glGetObjectParameterivARB(fShader, GL_COMPILE_STATUS, &success); if(!success) { /*Shader Comile Error*/ @@ -108,11 +97,11 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) return 0; } - program = bgl::blCreateProgramObjectARB(); - bgl::blAttachObjectARB(program, fShader); + program = glCreateProgramObjectARB(); + glAttachObjectARB(program, fShader); - bgl::blLinkProgramARB(program); - bgl::blGetObjectParameterivARB(program, GL_LINK_STATUS, &success); + glLinkProgramARB(program); + glGetObjectParameterivARB(program, GL_LINK_STATUS, &success); if (!success) { /*Program Link Error*/ @@ -120,8 +109,8 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) return 0; } - bgl::blValidateProgramARB(program); - bgl::blGetObjectParameterivARB(program, GL_VALIDATE_STATUS, &success); + glValidateProgramARB(program); + glGetObjectParameterivARB(program, GL_VALIDATE_STATUS, &success); if (!success) { /*Program Validation Error*/ @@ -164,30 +153,30 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) { #if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) GLint uniformLoc; - bgl::blUseProgramObjectARB(shaderprogram); - uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); - bgl::blActiveTextureARB(GL_TEXTURE0); + glUseProgramObjectARB(shaderprogram); + uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); + glActiveTextureARB(GL_TEXTURE0); //glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texname); if (uniformLoc != -1) { - bgl::blUniform1iARB(uniformLoc, 0); + glUniform1iARB(uniformLoc, 0); } - uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_TextureCoordinateOffset"); + uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_TextureCoordinateOffset"); if (uniformLoc != -1) { - bgl::blUniform2fvARB(uniformLoc, 9, textureoffsets); + glUniform2fvARB(uniformLoc, 9, textureoffsets); } - uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureWidth"); + uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureWidth"); if (uniformLoc != -1) { - bgl::blUniform1fARB(uniformLoc,texturewidth); + glUniform1fARB(uniformLoc,texturewidth); } - uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureHeight"); + uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureHeight"); if (uniformLoc != -1) { - bgl::blUniform1fARB(uniformLoc,textureheight); + glUniform1fARB(uniformLoc,textureheight); } #endif } @@ -195,7 +184,7 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) void RAS_2DFilterManager::EndShaderProgram() { #if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) - bgl::blUseProgramObjectARB(0); + glUseProgramObjectARB(0); #endif } @@ -325,7 +314,7 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str if(mode == RAS_2DFILTER_NOFILTER) { if(m_filters[pass]) - bgl::blDeleteObjectARB(m_filters[pass]); + glDeleteObjectARB(m_filters[pass]); m_enabled[pass] = 0; m_filters[pass] = 0; return; @@ -334,7 +323,7 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str if(mode == RAS_2DFILTER_CUSTOMFILTER) { if(m_filters[pass]) - bgl::blDeleteObjectARB(m_filters[pass]); + glDeleteObjectARB(m_filters[pass]); m_filters[pass] = CreateShaderProgram(text.Ptr()); m_enabled[pass] = 1; return; @@ -343,7 +332,7 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str if(mode>=RAS_2DFILTER_MOTIONBLUR && mode<=RAS_2DFILTER_INVERT) { if(m_filters[pass]) - bgl::blDeleteObjectARB(m_filters[pass]); + glDeleteObjectARB(m_filters[pass]); m_filters[pass] = CreateShaderProgram(mode); m_enabled[pass] = 1; } diff --git a/source/gameengine/Rasterizer/RAS_CameraData.h b/source/gameengine/Rasterizer/RAS_CameraData.h index 6aa9b34962b..0327a3f4763 100644 --- a/source/gameengine/Rasterizer/RAS_CameraData.h +++ b/source/gameengine/Rasterizer/RAS_CameraData.h @@ -49,12 +49,12 @@ struct RAS_CameraData m_clipstart(clipstart), m_clipend(clipend), m_perspective(perspective), - m_focallength(focallength), m_viewport(viewport), m_viewportleft(viewportleft), m_viewportbottom(viewportbottom), m_viewportright(viewportright), - m_viewporttop(viewporttop) + m_viewporttop(viewporttop), + m_focallength(focallength) { } }; diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index 61860c4c405..bff98abe058 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -56,7 +56,6 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname, m_bIsTriangle(bIsTriangle), m_polymatid(m_newpolymatid++), m_flag(0), - m_enabled(0), m_multimode(0) { m_shininess = 35.0; @@ -148,10 +147,5 @@ const unsigned int RAS_IPolyMaterial::GetFlag() const { return m_flag; } -const unsigned int RAS_IPolyMaterial::GetEnabled() const -{ - return m_enabled; -} - unsigned int RAS_IPolyMaterial::m_newpolymatid = 0; diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h index 3284ddb7ddd..09824f6975c 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h @@ -77,7 +77,6 @@ protected: // will move... unsigned int m_flag;//MaterialProps - unsigned int m_enabled;// enabled for this mat int m_multimode; // sum of values public: @@ -141,7 +140,6 @@ public: const STR_String& GetMaterialName() const; const STR_String& GetTextureName() const; const unsigned int GetFlag() const; - const unsigned int GetEnabled() const; /* * PreCalculate texture gen diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h index 18a7f261c94..dbedc492afa 100644 --- a/source/gameengine/Rasterizer/RAS_IRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h @@ -213,17 +213,7 @@ public: bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot)=0; - /** - * @copydoc IndexPrimitives - * IndexPrimitivesEx will renormalize faces if @param vertexarrays[i].getFlag() & TV_CALCFACENORMAL - */ - virtual void IndexPrimitives_Ex( const vecVertexArray& vertexarrays, - const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, - bool useObjectColor, - const MT_Vector4& rgbacolor)=0; + /** * IndexPrimitives_3DText will render text into the polygons. * The text to be rendered is from @param rendertools client object's text property. @@ -246,16 +236,6 @@ public: const MT_Vector4& rgbacolor, class KX_ListSlot** slot)=0; - virtual void IndexPrimitivesMulti_Ex( - const vecVertexArray& vertexarrays, - const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, - bool useObjectColor, - const MT_Vector4& rgbacolor)=0; - - virtual void SetProjectionMatrix(MT_CmMatrix4x4 & mat)=0; /* This one should become our final version, methinks. */ /** @@ -389,8 +369,11 @@ public: virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)=0; - virtual void SetTexCoords(TexCoGen coords, int unit) = 0; - virtual void SetAttrib(int type) = 0; + + virtual void SetTexCoordNum(int num) = 0; + virtual void SetAttribNum(int num) = 0; + virtual void SetTexCoord(TexCoGen coords, int unit) = 0; + virtual void SetAttrib(TexCoGen coords, int unit) = 0; virtual void GetViewMatrix(MT_Matrix4x4 &mat) const = 0; virtual bool QueryLists(){return false;} diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index 96ce220ae4d..1beade7acf7 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -177,7 +177,6 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I bool dolights = false; const unsigned int flag = m_material->GetFlag(); - if( flag & RAS_BLENDERMAT) dolights = (flag &RAS_MULTILIGHT)!=0; else @@ -237,11 +236,10 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa rendertools, // needed for textprinting on polys ms.m_bObjectColor, ms.m_RGBAcolor); - } // for using glMultiTexCoord - else if(m_material->GetFlag() & RAS_MULTITEX ) + else if((m_material->GetFlag() & RAS_MULTITEX)) { rasty->IndexPrimitivesMulti( ms.m_mesh->GetVertexCache(m_material), @@ -251,37 +249,10 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa rendertools, ms.m_bObjectColor, ms.m_RGBAcolor, - &ms.m_DisplayList + (ms.m_pDeformer)? 0: &ms.m_DisplayList ); } - // for using glMultiTexCoord on deformer - else if(m_material->GetFlag() & RAS_DEFMULTI ) - { - rasty->IndexPrimitivesMulti_Ex( - ms.m_mesh->GetVertexCache(m_material), - ms.m_mesh->GetIndexCache(m_material), - drawmode, - m_material, - rendertools, - ms.m_bObjectColor, - ms.m_RGBAcolor - ); - } - - // Use the (slower) IndexPrimitives_Ex which can recalc face normals & such - // for deformed objects - eventually should be extended to recalc ALL normals - else if (ms.m_pDeformer){ - rasty->IndexPrimitives_Ex( - ms.m_mesh->GetVertexCache(m_material), - ms.m_mesh->GetIndexCache(m_material), - drawmode, - m_material, - rendertools, // needed for textprinting on polys - ms.m_bObjectColor, - ms.m_RGBAcolor - ); - } // Use the normal IndexPrimitives else { @@ -293,7 +264,7 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa rendertools, // needed for textprinting on polys ms.m_bObjectColor, ms.m_RGBAcolor, - &ms.m_DisplayList + (ms.m_pDeformer)? 0: &ms.m_DisplayList ); } @@ -316,14 +287,14 @@ void RAS_MaterialBucket::Render(const MT_Transform& cameratrans, //rasty->SetMaterial(*m_material); - int drawmode; for (T_MeshSlotList::const_iterator it = m_meshSlots.begin(); ! (it == m_meshSlots.end()); ++it) { rendertools->SetClientObject((*it).m_clientObj); - while (ActivateMaterial(cameratrans, rasty, rendertools, drawmode)) + while (ActivateMaterial(cameratrans, rasty, rendertools, drawmode)) { RenderMeshSlot(cameratrans, rasty, rendertools, *it, drawmode); + } } // to reset the eventual GL_CW mode rendertools->SetClientObject(NULL); diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index e4b654343e7..db74110ceea 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -256,27 +256,30 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray, const MT_Vector4& tangent, const unsigned int rgbacolor, const MT_Vector3& normal, + bool flat, RAS_IPolyMaterial* mat, int orgindex) { KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); int numverts = ao->m_VertexArrayCache1[vtxarray]->size();//m_VertexArrayCount[vtxarray]; - RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, 0); + RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, flat? TV_CALCFACENORMAL: 0); + #define KX_FIND_SHARED_VERTICES #ifdef KX_FIND_SHARED_VERTICES - - for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[orgindex].begin(); - it != m_xyz_index_to_vertex_index_mapping[orgindex].end(); - it++) - { - if ((*it).m_arrayindex1 == ao->m_index1 && - (*it).m_array == vtxarray && - *(*it).m_matid == *mat && - (*ao->m_VertexArrayCache1[vtxarray])[(*it).m_index].closeTo(&newvert) - ) + if(!flat) { + for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[orgindex].begin(); + it != m_xyz_index_to_vertex_index_mapping[orgindex].end(); + it++) { - return (*it).m_index; + if ((*it).m_arrayindex1 == ao->m_index1 && + (*it).m_array == vtxarray && + *(*it).m_matid == *mat && + (*ao->m_VertexArrayCache1[vtxarray])[(*it).m_index].closeTo(&newvert) + ) + { + return (*it).m_index; + } } } #endif // KX_FIND_SHARED_VERTICES diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h index 89c472cd0d4..d8e7a3391aa 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.h +++ b/source/gameengine/Rasterizer/RAS_MeshObject.h @@ -238,6 +238,7 @@ public: const MT_Vector4& tangent, const unsigned int rgbacolor, const MT_Vector3& normal, + bool flat, RAS_IPolyMaterial* mat, int orgindex ); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h deleted file mode 100644 index a2f27ce3361..00000000000 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef __ARB_MULTITEXTURE_H__ -#define __ARB_MULTITEXTURE_H__ - -/* -*/ - -/* ---------------------------------------------------------------------------- - GL_ARB_multitexture ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_multitexture - #define GL_TEXTURE0_ARB 0x84C0 - #define GL_TEXTURE1_ARB 0x84C1 - #define GL_TEXTURE2_ARB 0x84C2 - #define GL_TEXTURE3_ARB 0x84C3 - #define GL_TEXTURE4_ARB 0x84C4 - #define GL_TEXTURE5_ARB 0x84C5 - #define GL_TEXTURE6_ARB 0x84C6 - #define GL_TEXTURE7_ARB 0x84C7 - #define GL_TEXTURE8_ARB 0x84C8 - #define GL_TEXTURE9_ARB 0x84C9 - #define GL_TEXTURE10_ARB 0x84CA - #define GL_ACTIVE_TEXTURE_ARB 0x84E0 - #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 - #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#endif - - -/* ---------------------------------------------------------------------------- - GL_ARB_texture_env_combine ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_texture_env_combine - #define GL_COMBINE_ARB 0x8570 - #define GL_COMBINE_RGB_ARB 0x8571 - #define GL_COMBINE_ALPHA_ARB 0x8572 - #define GL_SOURCE0_RGB_ARB 0x8580 - #define GL_SOURCE1_RGB_ARB 0x8581 - #define GL_SOURCE2_RGB_ARB 0x8582 - #define GL_SOURCE0_ALPHA_ARB 0x8588 - #define GL_SOURCE1_ALPHA_ARB 0x8589 - #define GL_SOURCE2_ALPHA_ARB 0x858A - #define GL_OPERAND0_RGB_ARB 0x8590 - #define GL_OPERAND1_RGB_ARB 0x8591 - #define GL_OPERAND2_RGB_ARB 0x8592 - #define GL_OPERAND0_ALPHA_ARB 0x8598 - #define GL_OPERAND1_ALPHA_ARB 0x8599 - #define GL_OPERAND2_ALPHA_ARB 0x859A - #define GL_RGB_SCALE_ARB 0x8573 - #define GL_ADD_SIGNED_ARB 0x8574 - #define GL_INTERPOLATE_ARB 0x8575 - #define GL_SUBTRACT_ARB 0x84E7 - #define GL_CONSTANT_ARB 0x8576 - #define GL_PRIMARY_COLOR_ARB 0x8577 - #define GL_PREVIOUS_ARB 0x8578 -#endif - -/* ---------------------------------------------------------------------------- - GL_ARB_texture_cube_map ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_texture_cube_map - #define GL_NORMAL_MAP_ARB 0x8511 - #define GL_REFLECTION_MAP_ARB 0x8512 - #define GL_TEXTURE_CUBE_MAP_ARB 0x8513 - #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 - #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 - #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A - #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B - #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif - -/* ---------------------------------------------------------------------------- - GL_ARB_shader_objects ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_shader_objects - #define GL_PROGRAM_OBJECT_ARB 0x8B40 - #define GL_SHADER_OBJECT_ARB 0x8B48 - #define GL_OBJECT_TYPE_ARB 0x8B4E - #define GL_OBJECT_SUBTYPE_ARB 0x8B4F - #define GL_FLOAT_VEC2_ARB 0x8B50 - #define GL_FLOAT_VEC3_ARB 0x8B51 - #define GL_FLOAT_VEC4_ARB 0x8B52 - #define GL_INT_VEC2_ARB 0x8B53 - #define GL_INT_VEC3_ARB 0x8B54 - #define GL_INT_VEC4_ARB 0x8B55 - #define GL_BOOL_ARB 0x8B56 - #define GL_BOOL_VEC2_ARB 0x8B57 - #define GL_BOOL_VEC3_ARB 0x8B58 - #define GL_BOOL_VEC4_ARB 0x8B59 - #define GL_FLOAT_MAT2_ARB 0x8B5A - #define GL_FLOAT_MAT3_ARB 0x8B5B - #define GL_FLOAT_MAT4_ARB 0x8B5C - #define GL_SAMPLER_1D_ARB 0x8B5D - #define GL_SAMPLER_2D_ARB 0x8B5E - #define GL_SAMPLER_3D_ARB 0x8B5F - #define GL_SAMPLER_CUBE_ARB 0x8B60 - #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 - #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 - #define GL_SAMPLER_2D_RECT_ARB 0x8B63 - #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 - #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 - #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 - #define GL_OBJECT_LINK_STATUS_ARB 0x8B82 - #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 - #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 - #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 - #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 - #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 - #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#endif - -/* ---------------------------------------------------------------------------- - GL_ARB_vertex_shader ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_vertex_shader - #define GL_VERTEX_SHADER_ARB 0x8B31 - #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A - #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B - #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C - #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D - #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 - #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#endif - - -/* ---------------------------------------------------------------------------- - GL_ARB_fragment_shader ----------------------------------------------------------------------------- */ -#ifdef GL_ARB_fragment_shader - #define GL_FRAGMENT_SHADER_ARB 0x8B30 - #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 - #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif - - -/* ---------------------------------------------------------------------------- - GL_ARB_depth_texture ----------------------------------------------------------------------------- */ -#ifndef GL_ARB_depth_texture - #define GL_DEPTH_COMPONENT16_ARB 0x81A5 - #define GL_DEPTH_COMPONENT24_ARB 0x81A6 - #define GL_DEPTH_COMPONENT32_ARB 0x81A7 - #define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A - #define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - - -#endif//__ARB_MULTITEXTURE_H__ diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt index 5153834899b..2a6d64ecc73 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt @@ -31,6 +31,7 @@ SET(INC ../../../../intern/string ../../../../intern/moto/include ../../../../source/gameengine/Rasterizer + ../../../../extern/glew/include ) BLENDERLIB(bf_oglrasterizer "${SRC}" "${INC}") diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h deleted file mode 100644 index 5a9d8f32a87..00000000000 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/EXT_separate_specular_color.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif - -#ifndef GL_VERSION_1_2 -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#endif diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile index 1a88c51dc25..f01978b8eb1 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile @@ -36,6 +36,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_MOTO)/include diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp index 81a7ccb7a5d..d241bd1ee31 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp @@ -25,665 +25,43 @@ * * ***** END GPL LICENSE BLOCK ***** */ -/* - The extension manager's job is to link at runtime OpenGL extension - functions. - Since the various platform have different methods of finding a fn - pointer, this file attempts to encapsulate all that, so it gets a - little messy. Hopefully we can -*/ -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -# include - -# include - -#elif defined(__APPLE__) -# include -# define GL_GLEXT_LEGACY 1 -# include - -#else /* UNIX */ -# include -# include - -# include -#endif - -#include #include -#include -#include -#include - -#include "STR_String.h" #include "RAS_GLExtensionManager.h" -/* ----------------------------------------------------------------------------- - - Platform specific functions section. - - Required Functions: - static void bglInitEntryPoints (void) -- Loads the GL library - static void bglDeallocEntryPoints (void) -- Frees the GL library - static void *bglGetProcAddress(const GLubyte* entry) -- Finds the address of - the GL function entry - -*/ -#if defined(BGL_NO_EXTENSIONS) -static void bglInitEntryPoints (void) {} -static void bglDeallocEntryPoints (void) {} - -static void *bglGetProcAddress(const GLubyte* entry) -{ - /* No Extensions! */ - return NULL; -} -#elif defined(__APPLE__) -/* http://developer.apple.com/qa/qa2001/qa1188.html */ -CFBundleRef gBundleRefOpenGL = NULL; - -// ------------------------- - -static OSStatus bglInitEntryPoints (void) -{ - OSStatus err = noErr; - const Str255 frameworkName = "\pOpenGL.framework"; - FSRefParam fileRefParam; - FSRef fileRef; - CFURLRef bundleURLOpenGL; - - memset(&fileRefParam, 0, sizeof(fileRefParam)); - memset(&fileRef, 0, sizeof(fileRef)); - - fileRefParam.ioNamePtr = frameworkName; - fileRefParam.newRef = &fileRef; - - // Frameworks directory/folder - err = FindFolder (kSystemDomain, kFrameworksFolderType, false, - &fileRefParam.ioVRefNum, (SInt32*)&fileRefParam.ioDirID); - if (noErr != err) { - DebugStr ((unsigned char *)"\pCould not find frameworks folder"); - return err; - } - err = PBMakeFSRefSync (&fileRefParam); // make FSRef for folder - if (noErr != err) { - DebugStr ((unsigned char *)"\pCould make FSref to frameworks folder"); - return err; - } - // create URL to folder - bundleURLOpenGL = CFURLCreateFromFSRef (kCFAllocatorDefault, - &fileRef); - if (!bundleURLOpenGL) { - DebugStr ((unsigned char *)"\pCould create OpenGL Framework bundle URL"); - return paramErr; - } - // create ref to GL's bundle - gBundleRefOpenGL = CFBundleCreate (kCFAllocatorDefault, - bundleURLOpenGL); - if (!gBundleRefOpenGL) { - DebugStr ((unsigned char *)"\pCould not create OpenGL Framework bundle"); - return paramErr; - } - CFRelease (bundleURLOpenGL); // release created bundle - // if the code was successfully loaded, look for our function. - if (!CFBundleLoadExecutable (gBundleRefOpenGL)) { - DebugStr ((unsigned char *)"\pCould not load MachO executable"); - return paramErr; - } - return err; -} - -// ------------------------- - -static void bglDeallocEntryPoints (void) -{ - if (gBundleRefOpenGL != NULL) { - // unload the bundle's code. - CFBundleUnloadExecutable (gBundleRefOpenGL); - CFRelease (gBundleRefOpenGL); - gBundleRefOpenGL = NULL; - } -} - -// ------------------------- - -/*unused*/ -static void * bglGetProcAddress (const GLubyte * pszProc) -{ - if (!gBundleRefOpenGL) - return NULL; - - return CFBundleGetFunctionPointerForName (gBundleRefOpenGL, - CFStringCreateWithCStringNoCopy (NULL, - (const char *) pszProc, CFStringGetSystemEncoding (), NULL)); -} -#elif defined(GLX_ARB_get_proc_address) -/* Not all glx.h define PFNGLXGETPROCADDRESSARBPROC ! - We define our own if needed. */ -#ifdef HAVE_PFNGLXGETPROCADDRESSARBPROC -#define PFNBGLXGETPROCADDRESSARBPROC PFNGLXGETPROCADDRESSARBPROC -#else -typedef void (*(*PFNBGLXGETPROCADDRESSARBPROC)(const GLubyte *procname))(); -#endif - -void *_getProcAddress(const GLubyte *procName) { return NULL; } -PFNBGLXGETPROCADDRESSARBPROC bglGetProcAddress; - - -//weird bug related to combination of pthreads,libGL and dlopen -//cannot call dlclose in such environment, causes crashes -//so try to keep a global handle to libGL -void* libGL = 0; - -static void bglInitEntryPoints (void) -{ - Display *dpy = glXGetCurrentDisplay(); - std::vector Xextensions = STR_String(glXQueryExtensionsString(dpy, DefaultScreen(dpy))).Explode(' '); - if (std::find(Xextensions.begin(), Xextensions.end(), "GLX_ARB_get_proc_address") != Xextensions.end()) - { - if (!libGL) - { - libGL = dlopen("libGL.so", RTLD_LAZY|RTLD_GLOBAL); - if (libGL) - bglGetProcAddress = (PFNBGLXGETPROCADDRESSARBPROC) (dlsym(libGL, "glXGetProcAddressARB")); - else - std::cout << "Error: " << dlerror() << std::endl; - - // dlclose(libGL); - if (!bglGetProcAddress) - bglGetProcAddress = (PFNBGLXGETPROCADDRESSARBPROC) _getProcAddress; - - // -- - if(!bglGetProcAddress) - std::cout << "Error: unable to find _getProcAddress in libGL" << std::endl; - } - } -} - -static void bglDeallocEntryPoints (void) {} - -#elif defined(WIN32) -static void bglInitEntryPoints (void) {} -static void bglDeallocEntryPoints (void) {} - -#define bglGetProcAddress(entry) wglGetProcAddress((LPCSTR) entry) - -#else /* Unknown Platform - disable extensions */ -static void bglInitEntryPoints (void) {} -static void bglDeallocEntryPoints (void) {} - -static void *bglGetProcAddress(const GLubyte* entry) -{ - /* No Extensions! */ - return NULL; -} - -#endif /* End Platform Specific */ - -/* ----------------------------------------------------------------------------- - - GL Extension Manager. -*/ - /* Bit array of available extensions */ -static std::bitset enabled_extensions; -static std::vector extensions; -static int m_debug; - -static void LinkExtensions(); - -static void EnableExtension(bgl::ExtensionName name) -{ - unsigned int num = (unsigned int) name; - if (num < bgl::NUM_EXTENSIONS) - enabled_extensions.set(num); -} - - -static bool QueryExtension(STR_String extension_name) -{ - return std::find(extensions.begin(), extensions.end(), extension_name) != extensions.end(); -} - namespace bgl { - -void InitExtensions(int debug) -{ - m_debug = debug; - bglInitEntryPoints (); //init bundle - EnableExtension(_BGL_TEST); - LinkExtensions(); - bglDeallocEntryPoints(); -} - -bool QueryExtension(ExtensionName name) -{ - unsigned int num = (unsigned int) name; - if (num < NUM_EXTENSIONS) - return enabled_extensions[num]; - - return false; -} - -bool QueryVersion(int major, int minor) -{ - static int gl_major = 0; - static int gl_minor = 0; - - if (gl_major == 0) + void InitExtensions(bool debug) { - const char *gl_version_str = (const char *) glGetString(GL_VERSION); - if (!gl_version_str) - return false; - STR_String gl_version = STR_String(gl_version_str); - int i = gl_version.Find('.'); - gl_major = gl_version.Left(i).ToInt(); - gl_minor = gl_version.Mid(i+1, gl_version.FindOneOf(". ", i+1) - i - 1).ToInt(); - - static bool doQueryVersion = m_debug; - if (doQueryVersion) - { - doQueryVersion = false; - std::cout << "GL_VERSION: " << gl_major << "." << gl_minor << " (" << gl_version << ")" << std::endl; - } - } - - if (gl_major > major) - return true; - - if (gl_major == major && gl_minor >= minor) - return true; + static bool firsttime = true; - return false; -} + if(firsttime) { + firsttime = false; - -/******************************************************************************* -1. Extension function entry points go here - -Need to #ifdef (compile time test for extension) -Add null functions if appropriate - -Some extensions have been incorporated into the core GL, eg Multitexture was -added in GL v1.1. If Blender calls one of these functions before they are -linked, it will crash. Even worse, if Blender *indirectly* calls one of these -functions, (ie the GL implementation calls them itself) Blender will crash. - -We fix this by adding them to the bgl namespace - the functions are now -private to the gameengine. Code can transparently use extensions by adding: - -using namespace bgl; - -to their source. Cunning like a weasel. - - ******************************************************************************/ - -#if defined(PFNGLPNTRIANGLESIATIPROC) -PFNGLPNTRIANGLESIATIPROC glPNTrianglesiATI; -PFNGLPNTRIANGLESFATIPROC glPNTrianglesfATI; -#endif - -BL_EXTInfo RAS_EXT_support; - -#ifdef GL_ARB_multitexture -int max_texture_units = 2; -PFNGLACTIVETEXTUREARBPROC blActiveTextureARB; -PFNGLCLIENTACTIVETEXTUREARBPROC blClientActiveTextureARB; -PFNGLMULTITEXCOORD1DARBPROC blMultiTexCoord1dARB; -PFNGLMULTITEXCOORD1DVARBPROC blMultiTexCoord1dvARB; -PFNGLMULTITEXCOORD1FARBPROC blMultiTexCoord1fARB; -PFNGLMULTITEXCOORD1FVARBPROC blMultiTexCoord1fvARB; -PFNGLMULTITEXCOORD1IARBPROC blMultiTexCoord1iARB; -PFNGLMULTITEXCOORD1IVARBPROC blMultiTexCoord1ivARB; -PFNGLMULTITEXCOORD1SARBPROC blMultiTexCoord1sARB; -PFNGLMULTITEXCOORD1SVARBPROC blMultiTexCoord1svARB; -PFNGLMULTITEXCOORD2DARBPROC blMultiTexCoord2dARB; -PFNGLMULTITEXCOORD2DVARBPROC blMultiTexCoord2dvARB; -PFNGLMULTITEXCOORD2FARBPROC blMultiTexCoord2fARB; -PFNGLMULTITEXCOORD2FVARBPROC blMultiTexCoord2fvARB; -PFNGLMULTITEXCOORD2IARBPROC blMultiTexCoord2iARB; -PFNGLMULTITEXCOORD2IVARBPROC blMultiTexCoord2ivARB; -PFNGLMULTITEXCOORD2SARBPROC blMultiTexCoord2sARB; -PFNGLMULTITEXCOORD2SVARBPROC blMultiTexCoord2svARB; -PFNGLMULTITEXCOORD3DARBPROC blMultiTexCoord3dARB; -PFNGLMULTITEXCOORD3DVARBPROC blMultiTexCoord3dvARB; -PFNGLMULTITEXCOORD3FARBPROC blMultiTexCoord3fARB; -PFNGLMULTITEXCOORD3FVARBPROC blMultiTexCoord3fvARB; -PFNGLMULTITEXCOORD3IARBPROC blMultiTexCoord3iARB; -PFNGLMULTITEXCOORD3IVARBPROC blMultiTexCoord3ivARB; -PFNGLMULTITEXCOORD3SARBPROC blMultiTexCoord3sARB; -PFNGLMULTITEXCOORD3SVARBPROC blMultiTexCoord3svARB; -PFNGLMULTITEXCOORD4DARBPROC blMultiTexCoord4dARB; -PFNGLMULTITEXCOORD4DVARBPROC blMultiTexCoord4dvARB; -PFNGLMULTITEXCOORD4FARBPROC blMultiTexCoord4fARB; -PFNGLMULTITEXCOORD4FVARBPROC blMultiTexCoord4fvARB; -PFNGLMULTITEXCOORD4IARBPROC blMultiTexCoord4iARB; -PFNGLMULTITEXCOORD4IVARBPROC blMultiTexCoord4ivARB; -PFNGLMULTITEXCOORD4SARBPROC blMultiTexCoord4sARB; -PFNGLMULTITEXCOORD4SVARBPROC blMultiTexCoord4svARB; -#endif - -#ifdef GL_ARB_shader_objects - PFNGLDELETEOBJECTARBPROC blDeleteObjectARB; - PFNGLGETHANDLEARBPROC blGetHandleARB; - PFNGLDETACHOBJECTARBPROC blDetachObjectARB; - PFNGLCREATESHADEROBJECTARBPROC blCreateShaderObjectARB; - PFNGLSHADERSOURCEARBPROC blShaderSourceARB; - PFNGLCOMPILESHADERARBPROC blCompileShaderARB; - PFNGLCREATEPROGRAMOBJECTARBPROC blCreateProgramObjectARB; - PFNGLATTACHOBJECTARBPROC blAttachObjectARB; - PFNGLLINKPROGRAMARBPROC blLinkProgramARB; - PFNGLUSEPROGRAMOBJECTARBPROC blUseProgramObjectARB; - PFNGLVALIDATEPROGRAMARBPROC blValidateProgramARB; - PFNGLUNIFORM1FARBPROC blUniform1fARB; - PFNGLUNIFORM2FARBPROC blUniform2fARB; - PFNGLUNIFORM3FARBPROC blUniform3fARB; - PFNGLUNIFORM4FARBPROC blUniform4fARB; - PFNGLUNIFORM1IARBPROC blUniform1iARB; - PFNGLUNIFORM2IARBPROC blUniform2iARB; - PFNGLUNIFORM3IARBPROC blUniform3iARB; - PFNGLUNIFORM4IARBPROC blUniform4iARB; - PFNGLUNIFORM1FVARBPROC blUniform1fvARB; - PFNGLUNIFORM2FVARBPROC blUniform2fvARB; - PFNGLUNIFORM3FVARBPROC blUniform3fvARB; - PFNGLUNIFORM4FVARBPROC blUniform4fvARB; - PFNGLUNIFORM1IVARBPROC blUniform1ivARB; - PFNGLUNIFORM2IVARBPROC blUniform2ivARB; - PFNGLUNIFORM3IVARBPROC blUniform3ivARB; - PFNGLUNIFORM4IVARBPROC blUniform4ivARB; - PFNGLUNIFORMMATRIX2FVARBPROC blUniformMatrix2fvARB; - PFNGLUNIFORMMATRIX3FVARBPROC blUniformMatrix3fvARB; - PFNGLUNIFORMMATRIX4FVARBPROC blUniformMatrix4fvARB; - PFNGLGETOBJECTPARAMETERFVARBPROC blGetObjectParameterfvARB; - PFNGLGETOBJECTPARAMETERIVARBPROC blGetObjectParameterivARB; - PFNGLGETINFOLOGARBPROC blGetInfoLogARB; - PFNGLGETATTACHEDOBJECTSARBPROC blGetAttachedObjectsARB; - PFNGLGETUNIFORMLOCATIONARBPROC blGetUniformLocationARB; - PFNGLGETACTIVEUNIFORMARBPROC blGetActiveUniformARB; - PFNGLGETUNIFORMFVARBPROC blGetUniformfvARB; - PFNGLGETUNIFORMIVARBPROC blGetUniformivARB; - PFNGLGETSHADERSOURCEARBPROC blGetShaderSourceARB; -#endif - -#ifdef GL_ARB_vertex_shader -PFNGLBINDATTRIBLOCATIONARBPROC blBindAttribLocationARB; -PFNGLGETACTIVEATTRIBARBPROC blGetActiveAttribARB; -PFNGLGETATTRIBLOCATIONARBPROC blGetAttribLocationARB; -#endif - -#ifdef GL_ARB_vertex_program - PFNGLVERTEXATTRIB1FARBPROC blVertexAttrib1fARB; - PFNGLVERTEXATTRIB1FVARBPROC blVertexAttrib1fvARB; - PFNGLVERTEXATTRIB2FARBPROC blVertexAttrib2fARB; - PFNGLVERTEXATTRIB2FVARBPROC blVertexAttrib2fvARB; - PFNGLVERTEXATTRIB3FARBPROC blVertexAttrib3fARB; - PFNGLVERTEXATTRIB3FVARBPROC blVertexAttrib3fvARB; - PFNGLVERTEXATTRIB4FARBPROC blVertexAttrib4fARB; - PFNGLVERTEXATTRIB4FVARBPROC blVertexAttrib4fvARB; - PFNGLGETPROGRAMSTRINGARBPROC blGetProgramStringARB; - PFNGLGETVERTEXATTRIBDVARBPROC blGetVertexAttribdvARB; - PFNGLGETVERTEXATTRIBFVARBPROC blGetVertexAttribfvARB; - PFNGLGETVERTEXATTRIBIVARBPROC blGetVertexAttribivARB; -#endif - - /* -#ifdef GL_EXT_compiled_vertex_array - PFNGLLOCKARRAYSEXTPROC blLockArraysEXT; - PFNGLUNLOCKARRAYSEXTPROC blUnlockArraysEXT; -#endif -*/ - -} // namespace bgl - -using namespace bgl; -/******************************************************************************* -2. Query extension functions here - -Need to #ifdef (compile time test for extension) -Use QueryExtension("GL_EXT_name") to test at runtime. -Use bglGetProcAddress to find entry point -Use EnableExtension(_GL_EXT_...) to allow Blender to use the extension. - - ******************************************************************************/ -static void LinkExtensions() -{ - static bool doDebugMessages = m_debug; - extensions = STR_String((const char *) glGetString(GL_EXTENSIONS)).Explode(' '); - RAS_EXT_support = BL_EXTInfo(); - -#if defined(PFNGLPNTRIANGLESIATIPROC) - if (QueryExtension("GL_ATI_pn_triangles")) - { - glPNTrianglesiATI = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glPNTrianglesiATI")); - glPNTrianglesfATI = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glPNTrianglesfATI")); - if (glPNTrianglesiATI && glPNTrianglesfATI) { - EnableExtension(_GL_ATI_pn_triangles); - if (doDebugMessages) - std::cout << "Enabled GL_ATI_pn_triangles" << std::endl; - } else { - std::cout << "ERROR: GL_ATI_pn_triangles implementation is broken!" << std::endl; - } - } -#endif - -#ifdef GL_ARB_texture_env_combine - if (QueryExtension("GL_ARB_texture_env_combine")) - { - EnableExtension(_GL_ARB_texture_env_combine); - RAS_EXT_support._ARB_texture_env_combine = 1; - if (doDebugMessages) - { - std::cout << "Detected GL_ARB_texture_env_combine" << std::endl; - } - } -#endif - -#ifdef GL_ARB_texture_cube_map - if (QueryExtension("GL_ARB_texture_cube_map")) - { - EnableExtension(_GL_ARB_texture_cube_map); - RAS_EXT_support._ARB_texture_cube_map = 1; - if (doDebugMessages) - std::cout << "Detected GL_ARB_texture_cube_map" << std::endl; - } -#endif - -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if (QueryExtension("GL_ARB_multitexture")) { - bgl::blActiveTextureARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glActiveTextureARB")); - bgl::blClientActiveTextureARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glClientActiveTextureARB")); - bgl::blMultiTexCoord1dARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1dARB")); - bgl::blMultiTexCoord1dvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1dvARB")); - bgl::blMultiTexCoord1fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1fARB")); - bgl::blMultiTexCoord1fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1fvARB")); - bgl::blMultiTexCoord1iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1iARB")); - bgl::blMultiTexCoord1ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1ivARB")); - bgl::blMultiTexCoord1sARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1sARB")); - bgl::blMultiTexCoord1svARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1svARB")); - bgl::blMultiTexCoord2dARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2dARB")); - bgl::blMultiTexCoord2dvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2dvARB")); - bgl::blMultiTexCoord2fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2fARB")); - bgl::blMultiTexCoord2fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2fvARB")); - bgl::blMultiTexCoord2iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2iARB")); - bgl::blMultiTexCoord2ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2ivARB")); - bgl::blMultiTexCoord2sARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2sARB")); - bgl::blMultiTexCoord2svARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord2svARB")); - bgl::blMultiTexCoord3dARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3dARB")); - bgl::blMultiTexCoord3dvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3dvARB")); - bgl::blMultiTexCoord3fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3fARB")); - bgl::blMultiTexCoord3fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3fvARB")); - bgl::blMultiTexCoord3iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3iARB")); - bgl::blMultiTexCoord3ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3ivARB")); - bgl::blMultiTexCoord3sARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3sARB")); - bgl::blMultiTexCoord3svARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord3svARB")); - bgl::blMultiTexCoord4dARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4dARB")); - bgl::blMultiTexCoord4dvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4dvARB")); - bgl::blMultiTexCoord4fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4fARB")); - bgl::blMultiTexCoord4fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4fvARB")); - bgl::blMultiTexCoord4iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4iARB")); - bgl::blMultiTexCoord4ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4ivARB")); - bgl::blMultiTexCoord4sARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4sARB")); - bgl::blMultiTexCoord4svARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glMultiTexCoord4svARB")); - if (bgl::blActiveTextureARB && bgl::blClientActiveTextureARB && bgl::blMultiTexCoord1dARB && bgl::blMultiTexCoord1dvARB && bgl::blMultiTexCoord1fARB && bgl::blMultiTexCoord1fvARB && bgl::blMultiTexCoord1iARB && bgl::blMultiTexCoord1ivARB && bgl::blMultiTexCoord1sARB && bgl::blMultiTexCoord1svARB && bgl::blMultiTexCoord2dARB && bgl::blMultiTexCoord2dvARB && bgl::blMultiTexCoord2fARB && bgl::blMultiTexCoord2fvARB && bgl::blMultiTexCoord2iARB && bgl::blMultiTexCoord2ivARB && bgl::blMultiTexCoord2sARB && bgl::blMultiTexCoord2svARB && bgl::blMultiTexCoord3dARB && bgl::blMultiTexCoord3dvARB && bgl::blMultiTexCoord3fARB && bgl::blMultiTexCoord3fvARB && bgl::blMultiTexCoord3iARB && bgl::blMultiTexCoord3ivARB && bgl::blMultiTexCoord3sARB && bgl::blMultiTexCoord3svARB && bgl::blMultiTexCoord4dARB && bgl::blMultiTexCoord4dvARB && bgl::blMultiTexCoord4fARB && bgl::blMultiTexCoord4fvARB && bgl::blMultiTexCoord4iARB && bgl::blMultiTexCoord4ivARB && bgl::blMultiTexCoord4sARB && bgl::blMultiTexCoord4svARB) { - EnableExtension(_GL_ARB_multitexture); - RAS_EXT_support._ARB_multitexture = 1; - if (doDebugMessages) - std::cout << "Enabled GL_ARB_multitexture" << std::endl; - } else { - std::cout << "ERROR: GL_ARB_multitexture implementation is broken!" << std::endl; + if(debug) { + if(GLEW_ATI_pn_triangles) + std::cout << "Enabled GL_ATI_pn_triangles" << std::endl; + if(GLEW_ARB_texture_env_combine) + std::cout << "Detected GL_ARB_texture_env_combine" << std::endl; + if(GLEW_ARB_texture_cube_map) + std::cout << "Detected GL_ARB_texture_cube_map" << std::endl; + if(GLEW_ARB_multitexture) + std::cout << "Detected GL_ARB_multitexture" << std::endl; + if(GLEW_ARB_shader_objects) + std::cout << "Detected GL_ARB_shader_objects" << std::endl; + if(GLEW_ARB_vertex_shader) + std::cout << "Detected GL_ARB_vertex_shader" << std::endl; + if(GLEW_ARB_fragment_shader) + std::cout << "Detected GL_ARB_fragment_shader" << std::endl; + if(GLEW_ARB_vertex_program) + std::cout << "Detected GL_ARB_vertex_program" << std::endl; + if(GLEW_ARB_depth_texture) + std::cout << "Detected GL_ARB_depth_texture" << std::endl; + if(GLEW_EXT_separate_specular_color) + std::cout << "Detected GL_EXT_separate_specular_color" << std::endl; } } } -#endif - -#if GL_ARB_shader_objects - if (QueryExtension("GL_ARB_shader_objects")) - { - bgl::blDeleteObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glDeleteObjectARB")); - bgl::blGetHandleARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetHandleARB")); - bgl::blDetachObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glDetachObjectARB")); - bgl::blCreateShaderObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glCreateShaderObjectARB")); - bgl::blShaderSourceARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glShaderSourceARB")); - bgl::blCompileShaderARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glCompileShaderARB")); - bgl::blCreateProgramObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glCreateProgramObjectARB")); - bgl::blAttachObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glAttachObjectARB")); - bgl::blLinkProgramARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glLinkProgramARB")); - bgl::blUseProgramObjectARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUseProgramObjectARB")); - bgl::blValidateProgramARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glValidateProgramARB")); - bgl::blUniform1fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform1fARB")); - bgl::blUniform2fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform2fARB")); - bgl::blUniform3fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform3fARB")); - bgl::blUniform4fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform4fARB")); - bgl::blUniform1iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform1iARB")); - bgl::blUniform2iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform2iARB")); - bgl::blUniform3iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform3iARB")); - bgl::blUniform4iARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform4iARB")); - bgl::blUniform1fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform1fvARB")); - bgl::blUniform2fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform2fvARB")); - bgl::blUniform3fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform3fvARB")); - bgl::blUniform4fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform4fvARB")); - bgl::blUniform1ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform1ivARB")); - bgl::blUniform2ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform2ivARB")); - bgl::blUniform3ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform3ivARB")); - bgl::blUniform4ivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniform4ivARB")); - bgl::blUniformMatrix2fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniformMatrix2fvARB")); - bgl::blUniformMatrix3fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniformMatrix3fvARB")); - bgl::blUniformMatrix4fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUniformMatrix4fvARB")); - bgl::blGetObjectParameterfvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetObjectParameterfvARB")); - bgl::blGetObjectParameterivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetObjectParameterivARB")); - bgl::blGetInfoLogARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetInfoLogARB")); - bgl::blGetAttachedObjectsARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetAttachedObjectsARB")); - bgl::blGetUniformLocationARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetUniformLocationARB")); - bgl::blGetActiveUniformARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetActiveUniformARB")); - bgl::blGetUniformfvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetUniformfvARB")); - bgl::blGetUniformivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetUniformivARB")); - bgl::blGetShaderSourceARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetShaderSourceARB")); - if (bgl::blDeleteObjectARB && bgl::blGetHandleARB && bgl::blDetachObjectARB && bgl::blCreateShaderObjectARB && bgl::blShaderSourceARB && bgl::blCompileShaderARB && bgl::blCreateProgramObjectARB && bgl::blAttachObjectARB && bgl::blLinkProgramARB && bgl::blUseProgramObjectARB && bgl::blValidateProgramARB && bgl::blUniform1fARB && bgl::blUniform2fARB && bgl::blUniform3fARB && bgl::blUniform4fARB && bgl::blUniform1iARB && bgl::blUniform2iARB && bgl::blUniform3iARB && bgl::blUniform4iARB && bgl::blUniform1fvARB && bgl::blUniform2fvARB && bgl::blUniform3fvARB && bgl::blUniform4fvARB && bgl::blUniform1ivARB && bgl::blUniform2ivARB && bgl::blUniform3ivARB && bgl::blUniform4ivARB && bgl::blUniformMatrix2fvARB && bgl::blUniformMatrix3fvARB && bgl::blUniformMatrix4fvARB && bgl::blGetObjectParameterfvARB && bgl::blGetObjectParameterivARB && bgl::blGetInfoLogARB && bgl::blGetAttachedObjectsARB && bgl::blGetUniformLocationARB && bgl::blGetActiveUniformARB && bgl::blGetUniformfvARB && bgl::blGetUniformivARB && bgl::blGetShaderSourceARB) { - EnableExtension(_GL_ARB_shader_objects); - RAS_EXT_support._ARB_shader_objects =1; - if (doDebugMessages) - std::cout << "Enabled GL_ARB_shader_objects" << std::endl; - } else { - std::cout << "ERROR: GL_ARB_shader_objects implementation is broken!" << std::endl; - } - } -#endif - -#if GL_ARB_vertex_shader - if (QueryExtension("GL_ARB_vertex_shader")) - { - bgl::blBindAttribLocationARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glBindAttribLocationARB")); - bgl::blGetActiveAttribARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetActiveAttribARB")); - bgl::blGetAttribLocationARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetAttribLocationARB")); - if (bgl::blBindAttribLocationARB && bgl::blGetActiveAttribARB && bgl::blGetAttribLocationARB) { - EnableExtension(_GL_ARB_vertex_shader); - RAS_EXT_support._ARB_vertex_shader = 1; - if (doDebugMessages) - std::cout << "Enabled GL_ARB_vertex_shader" << std::endl; - } else { - std::cout << "ERROR: GL_ARB_vertex_shader implementation is broken!" << std::endl; - } - } -#endif - -#ifdef GL_ARB_fragment_shader - if (QueryExtension("GL_ARB_fragment_shader")) - { - EnableExtension(_GL_ARB_fragment_shader); - RAS_EXT_support._ARB_fragment_shader = 1; - if (doDebugMessages) - std::cout << "Detected GL_ARB_fragment_shader" << std::endl; - } -#endif - -#if defined(GL_ARB_vertex_program) - if (QueryExtension("GL_ARB_vertex_program")) - { - bgl::blVertexAttrib1fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib1fARB")); - bgl::blVertexAttrib1fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib1fvARB")); - bgl::blVertexAttrib2fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib2fARB")); - bgl::blVertexAttrib2fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib2fvARB")); - bgl::blVertexAttrib3fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib3fARB")); - bgl::blVertexAttrib3fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib3fvARB")); - bgl::blVertexAttrib4fARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib4fARB")); - bgl::blVertexAttrib4fvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glVertexAttrib4fvARB")); - bgl::blGetVertexAttribdvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetVertexAttribdvARB")); - bgl::blGetVertexAttribfvARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetVertexAttribfvARB")); - bgl::blGetVertexAttribivARB = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glGetVertexAttribivARB")); - if (bgl::blVertexAttrib1fARB && bgl::blVertexAttrib1fvARB && bgl::blVertexAttrib2fARB && bgl::blVertexAttrib2fvARB && bgl::blVertexAttrib3fARB && bgl::blVertexAttrib3fvARB && bgl::blGetVertexAttribdvARB) { - EnableExtension(_GL_ARB_vertex_program); - RAS_EXT_support._ARB_vertex_program = 1; - if (doDebugMessages) - std::cout << "Enabled GL_ARB_vertex_program" << std::endl; - } else { - std::cout << "ERROR: GL_ARB_vertex_program implementation is broken!" << std::endl; - } - } -#endif - - -#ifdef GL_ARB_depth_texture - if (QueryExtension("GL_ARB_depth_texture")) - { - EnableExtension(_GL_ARB_depth_texture); - RAS_EXT_support._ARB_depth_texture = 1; - if (doDebugMessages) - { - std::cout << "Detected GL_ARB_depth_texture" << std::endl; - } - } -#endif -/* -#ifdef GL_EXT_compiled_vertex_array - if (QueryExtension("GL_EXT_compiled_vertex_array")) - { - blLockArraysEXT = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glLockArraysEXT")); - blUnlockArraysEXT = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUnlockArraysEXT")); - if (blLockArraysEXT && blUnlockArraysEXT) { - EnableExtension(_GL_EXT_compiled_vertex_array); - RAS_EXT_support._EXT_compiled_vertex_array = 1; - if (doDebugMessages) - std::cout << "Enabled GL_EXT_compiled_vertex_array" << std::endl; - } else { - std::cout << "ERROR: GL_EXT_compiled_vertex_array implementation is broken!" << std::endl; - } - } -#endif -*/ - if (QueryExtension("GL_EXT_separate_specular_color")) - { - EnableExtension(_GL_EXT_separate_specular_color); - if (doDebugMessages) - std::cout << "Detected GL_EXT_separate_specular_color" << std::endl; - } - - doDebugMessages = false; -} +} // namespace bgl diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h index 3e24ee204a1..2265becbdad 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h @@ -29,513 +29,14 @@ #ifndef __RAS_GLEXTENSIONMANAGER_H__ #define __RAS_GLEXTENSIONMANAGER_H__ +#include "GL/glew.h" -#ifdef WIN32 -# include -# include +/* Note: this used to have a lot more code, but now extension handling + * is done by GLEW, so it does mostly debug stuff */ -#elif defined(__APPLE__) -# define GL_GLEXT_LEGACY 1 -# include -# include - -#else /* UNIX */ -# define __glext_h_ -# include -# include -# undef GL_ARB_multitexture // (ubuntu) -# undef __glext_h_ -#endif - -#ifdef WITH_GLEXT -#ifdef WIN32 -# include -#elif defined(__APPLE__) -# include "mac_compat_glext.h" -# include -#else -# include -#endif -#endif - -#ifdef __sgi -# undef GL_ARB_vertex_program -#endif - -#include "EXT_separate_specular_color.h" -#include "ARB_multitexture.h" namespace bgl { - /** - * This is a list of all registered OpenGL extensions. - * It is available from: - * http://oss.sgi.com/projects/ogl-sample/registry/ - */ - typedef enum { - /* ARB Extensions */ - _GL_ARB_imaging, - _GL_ARB_multitexture , - _GLX_ARB_get_proc_address , - _GL_ARB_transpose_matrix , - _WGL_ARB_buffer_region , - _GL_ARB_multisample , - _GL_ARB_texture_env_add , - _GL_ARB_texture_cube_map , - _WGL_ARB_extensions_string , - _WGL_ARB_pixel_format , - _WGL_ARB_make_current_read , - _WGL_ARB_pbuffer , - _GL_ARB_texture_compression , - _GL_ARB_texture_border_clamp , - _GL_ARB_point_parameters , - _GL_ARB_vertex_blend , - _GL_ARB_matrix_palette , - _GL_ARB_texture_env_combine , - _GL_ARB_texture_env_crossbar , - _GL_ARB_texture_env_dot3 , - _WGL_ARB_render_texture , - _GL_ARB_texture_mirrored_repeat , - _GL_ARB_depth_texture , - _GL_ARB_shadow , - _GL_ARB_shadow_ambient , - _GL_ARB_window_pos , - _GL_ARB_vertex_program , - _GL_ARB_fragment_program , - _GL_ARB_vertex_buffer_object , - _GL_ARB_occlusion_query , - _GL_ARB_shader_objects , - _GL_ARB_vertex_shader , - _GL_ARB_fragment_shader , - _GL_ARB_shading_language_100 , - _GL_ARB_texture_non_power_of_two , - _GL_ARB_point_sprite , - _GL_ARB_fragment_program_shadow , - - /* Non ARB Extensions */ - _GL_EXT_abgr , - _GL_EXT_blend_color , - _GL_EXT_polygon_offset , - _GL_EXT_texture , - _GL_EXT_texture3D , - _GL_SGIS_texture_filter4 , - _GL_EXT_subtexture , - _GL_EXT_copy_texture , - _GL_EXT_histogram , - _GL_EXT_convolution , - _GL_SGI_color_matrix , - _GL_SGI_color_table , - _GL_SGIS_pixel_texture , - _GL_SGIS_texture4D , - _GL_SGI_texture_color_table , - _GL_EXT_cmyka , - _GL_EXT_texture_object , - _GL_SGIS_detail_texture , - _GL_SGIS_sharpen_texture , - _GL_EXT_packed_pixels , - _GL_SGIS_texture_lod , - _GL_SGIS_multisample , - _GL_EXT_rescale_normal , - _GLX_EXT_visual_info , - _GL_EXT_vertex_array , - _GL_EXT_misc_attribute , - _GL_SGIS_generate_mipmap , - _GL_SGIX_clipmap , - _GL_SGIX_shadow , - _GL_SGIS_texture_edge_clamp , - _GL_SGIS_texture_border_clamp , - _GL_EXT_blend_minmax , - _GL_EXT_blend_subtract , - _GL_EXT_blend_logic_op , - _GLX_SGI_swap_control , - _GLX_SGI_video_sync , - _GLX_SGI_make_current_read , - _GLX_SGIX_video_source , - _GLX_EXT_visual_rating , - _GL_SGIX_interlace , - _GLX_EXT_import_context , - _GLX_SGIX_fbconfig , - _GLX_SGIX_pbuffer , - _GL_SGIS_texture_select , - _GL_SGIX_sprite , - _GL_SGIX_texture_multi_buffer , - _GL_EXT_point_parameters , - _GL_SGIX_instruments , - _GL_SGIX_texture_scale_bias , - _GL_SGIX_framezoom , - _GL_SGIX_tag_sample_buffer , - _GL_SGIX_reference_plane , - _GL_SGIX_flush_raster , - _GLX_SGI_cushion , - _GL_SGIX_depth_texture , - _GL_SGIS_fog_function , - _GL_SGIX_fog_offset , - _GL_HP_image_transform , - _GL_HP_convolution_border_modes , - _GL_SGIX_texture_add_env , - _GL_EXT_color_subtable , - _GLU_EXT_object_space_tess , - _GL_PGI_vertex_hints , - _GL_PGI_misc_hints , - _GL_EXT_paletted_texture , - _GL_EXT_clip_volume_hint , - _GL_SGIX_list_priority , - _GL_SGIX_ir_instrument1 , - _GLX_SGIX_video_resize , - _GL_SGIX_texture_lod_bias , - _GLU_SGI_filter4_parameters , - _GLX_SGIX_dm_buffer , - _GL_SGIX_shadow_ambient , - _GLX_SGIX_swap_group , - _GLX_SGIX_swap_barrier , - _GL_EXT_index_texture , - _GL_EXT_index_material , - _GL_EXT_index_func , - _GL_EXT_index_array_formats , - _GL_EXT_compiled_vertex_array , - _GL_EXT_cull_vertex , - _GLU_EXT_nurbs_tessellator , - _GL_SGIX_ycrcb , - _GL_EXT_fragment_lighting , - _GL_IBM_rasterpos_clip , - _GL_HP_texture_lighting , - _GL_EXT_draw_range_elements , - _GL_WIN_phong_shading , - _GL_WIN_specular_fog , - _GLX_SGIS_color_range , - _GL_EXT_light_texture , - _GL_SGIX_blend_alpha_minmax , - _GL_EXT_scene_marker , - _GL_SGIX_pixel_texture_bits , - _GL_EXT_bgra , - _GL_SGIX_async , - _GL_SGIX_async_pixel , - _GL_SGIX_async_histogram , - _GL_INTEL_texture_scissor , - _GL_INTEL_parallel_arrays , - _GL_HP_occlusion_test , - _GL_EXT_pixel_transform , - _GL_EXT_pixel_transform_color_table , - _GL_EXT_shared_texture_palette , - _GLX_SGIS_blended_overlay , - _GL_EXT_separate_specular_color , - _GL_EXT_secondary_color , - _GL_EXT_texture_env , - _GL_EXT_texture_perturb_normal , - _GL_EXT_multi_draw_arrays , - _GL_EXT_fog_coord , - _GL_REND_screen_coordinates , - _GL_EXT_coordinate_frame , - _GL_EXT_texture_env_combine , - _GL_APPLE_specular_vector , - _GL_SGIX_pixel_texture , - _GL_APPLE_transform_hint , - _GL_SUNX_constant_data , - _GL_SUN_global_alpha , - _GL_SUN_triangle_list , - _GL_SUN_vertex , - _WGL_EXT_display_color_table , - _WGL_EXT_extensions_string , - _WGL_EXT_make_current_read , - _WGL_EXT_pixel_format , - _WGL_EXT_pbuffer , - _WGL_EXT_swap_control , - _GL_EXT_blend_func_separate , - _GL_INGR_color_clamp , - _GL_INGR_interlace_read , - _GL_EXT_stencil_wrap , - _WGL_EXT_depth_float , - _GL_EXT_422_pixels , - _GL_NV_texgen_reflection , - _GL_SGIX_texture_range , - _GL_SUN_convolution_border_modes , - _GLX_SUN_get_transparent_index , - _GL_EXT_texture_env_add , - _GL_EXT_texture_lod_bias , - _GL_EXT_texture_filter_anisotropic , - _GL_EXT_vertex_weighting , - _GL_NV_light_max_exponent , - _GL_NV_vertex_array_range , - _GL_NV_register_combiners , - _GL_NV_fog_distance , - _GL_NV_texgen_emboss , - _GL_NV_blend_square , - _GL_NV_texture_env_combine4 , - _GL_MESA_resize_buffers , - _GL_MESA_window_pos , - _GL_EXT_texture_compression_s3tc , - _GL_IBM_cull_vertex , - _GL_IBM_multimode_draw_arrays , - _GL_IBM_vertex_array_lists , - _GL_3DFX_texture_compression_FXT1 , - _GL_3DFX_multisample , - _GL_3DFX_tbuffer , - _WGL_EXT_multisample , - _GL_SGIX_vertex_preclip , - _GL_SGIX_resample , - _GL_SGIS_texture_color_mask , - _GLX_MESA_copy_sub_buffer , - _GLX_MESA_pixmap_colormap , - _GLX_MESA_release_buffers , - _GLX_MESA_set_3dfx_mode , - _GL_EXT_texture_env_dot3 , - _GL_ATI_texture_mirror_once , - _GL_NV_fence , - _GL_IBM_static_data , - _GL_IBM_texture_mirrored_repeat , - _GL_NV_evaluators , - _GL_NV_packed_depth_stencil , - _GL_NV_register_combiners2 , - _GL_NV_texture_compression_vtc , - _GL_NV_texture_rectangle , - _GL_NV_texture_shader , - _GL_NV_texture_shader2 , - _GL_NV_vertex_array_range2 , - _GL_NV_vertex_program , - _GLX_SGIX_visual_select_group , - _GL_SGIX_texture_coordinate_clamp , - _GLX_OML_swap_method , - _GLX_OML_sync_control , - _GL_OML_interlace , - _GL_OML_subsample , - _GL_OML_resample , - _WGL_OML_sync_control , - _GL_NV_copy_depth_to_color , - _GL_ATI_envmap_bumpmap , - _GL_ATI_fragment_shader , - _GL_ATI_pn_triangles , - _GL_ATI_vertex_array_object , - _GL_EXT_vertex_shader , - _GL_ATI_vertex_streams , - _WGL_I3D_digital_video_control , - _WGL_I3D_gamma , - _WGL_I3D_genlock , - _WGL_I3D_image_buffer , - _WGL_I3D_swap_frame_lock , - _WGL_I3D_swap_frame_usage , - _GL_ATI_element_array , - _GL_SUN_mesh_array , - _GL_SUN_slice_accum , - _GL_NV_multisample_filter_hint , - _GL_NV_depth_clamp , - _GL_NV_occlusion_query , - _GL_NV_point_sprite , - _WGL_NV_render_depth_texture , - _WGL_NV_render_texture_rectangle , - _GL_NV_texture_shader3 , - _GL_NV_vertex_program1_1 , - _GL_EXT_shadow_funcs , - _GL_EXT_stencil_two_side , - _GL_ATI_text_fragment_shader , - _GL_APPLE_client_storage , - _GL_APPLE_element_array , - _GL_APPLE_fence , - _GL_APPLE_vertex_array_object , - _GL_APPLE_vertex_array_range , - _GL_APPLE_ycbcr_422 , - _GL_S3_s3tc , - _GL_ATI_draw_buffers , - _WGL_ATI_pixel_format_float , - _GL_ATI_texture_env_combine3 , - _GL_ATI_texture_float , - _GL_NV_float_buffer , - _GL_NV_fragment_program , - _GL_NV_half_float , - _GL_NV_pixel_data_range , - _GL_NV_primitive_restart , - _GL_NV_texture_expand_normal , - _GL_NV_vertex_program2 , - _GL_ATI_map_object_buffer , - _GL_ATI_separate_stencil , - _GL_ATI_vertex_attrib_array_object , - _GL_OES_byte_coordinates , - _GL_OES_fixed_point , - _GL_OES_single_precision , - _GL_OES_compressed_paletted_texture , - _GL_OES_read_format , - _GL_OES_query_matrix , - _GL_EXT_depth_bounds_test , - _GL_EXT_texture_mirror_clamp , - _GL_EXT_blend_equation_separate , - _GL_MESA_pack_invert , - _GL_MESA_ycbcr_texture, - - /* Finished */ - _BGL_TEST, - NUM_EXTENSIONS - } ExtensionName; - - /** - * Checks at runtime whether OpenGL supports the named extension. - * Returns true if OpenGL supports the given extension. - * - * @param name The extension name to check. - */ - bool QueryExtension(ExtensionName name); - /** - * Checks the OpenGL version. - * Returns true if OpenGL is at least the given version. - * - * @param major The major version required - * @param minor The minor version required - */ - bool QueryVersion(int major, int minor); - /** - * This will dynamically link all runtime supported extensions into - * the binary. - * - * @param debug Enable debug printing. This will print debugging info - * when extensions are loaded. - */ - void InitExtensions(int debug); - -#if defined(PFNGLPNTRIANGLESIATIPROC) -extern PFNGLPNTRIANGLESIATIPROC blPNTrianglesiATI; -extern PFNGLPNTRIANGLESFATIPROC blPNTrianglesfATI; -#endif - - -// quick runtime checks -typedef struct BL_EXTInfo -{ - BL_EXTInfo(): - _ARB_multitexture(0), - _ARB_texture_env_combine(0), - _EXT_blend_color(0), - _ARB_texture_cube_map(0), - _ARB_shader_objects(0), - _ARB_vertex_shader(0), - _ARB_fragment_shader(0), - _EXT_texture3D(0), - _ARB_vertex_program(0), - _ARB_depth_texture(0), - _EXT_compiled_vertex_array(0) - { - // - } - bool _ARB_multitexture; - bool _ARB_texture_env_combine; - bool _EXT_blend_color; - bool _ARB_texture_cube_map; - bool _ARB_shader_objects; - bool _ARB_vertex_shader; - bool _ARB_fragment_shader; - bool _EXT_texture3D; - bool _ARB_vertex_program; - bool _ARB_depth_texture; - bool _EXT_compiled_vertex_array; -}BL_EXTInfo; - -extern BL_EXTInfo RAS_EXT_support; - -#ifdef GL_ARB_multitexture // defined in glext.h now... -extern int max_texture_units; -extern PFNGLACTIVETEXTUREARBPROC blActiveTextureARB; -extern PFNGLCLIENTACTIVETEXTUREARBPROC blClientActiveTextureARB; -extern PFNGLMULTITEXCOORD1DARBPROC blMultiTexCoord1dARB; -extern PFNGLMULTITEXCOORD1DVARBPROC blMultiTexCoord1dvARB; -extern PFNGLMULTITEXCOORD1FARBPROC blMultiTexCoord1fARB; -extern PFNGLMULTITEXCOORD1FVARBPROC blMultiTexCoord1fvARB; -extern PFNGLMULTITEXCOORD1IARBPROC blMultiTexCoord1iARB; -extern PFNGLMULTITEXCOORD1IVARBPROC blMultiTexCoord1ivARB; -extern PFNGLMULTITEXCOORD1SARBPROC blMultiTexCoord1sARB; -extern PFNGLMULTITEXCOORD1SVARBPROC blMultiTexCoord1svARB; -extern PFNGLMULTITEXCOORD2DARBPROC blMultiTexCoord2dARB; -extern PFNGLMULTITEXCOORD2DVARBPROC blMultiTexCoord2dvARB; -extern PFNGLMULTITEXCOORD2FARBPROC blMultiTexCoord2fARB; -extern PFNGLMULTITEXCOORD2FVARBPROC blMultiTexCoord2fvARB; -extern PFNGLMULTITEXCOORD2IARBPROC blMultiTexCoord2iARB; -extern PFNGLMULTITEXCOORD2IVARBPROC blMultiTexCoord2ivARB; -extern PFNGLMULTITEXCOORD2SARBPROC blMultiTexCoord2sARB; -extern PFNGLMULTITEXCOORD2SVARBPROC blMultiTexCoord2svARB; -extern PFNGLMULTITEXCOORD3DARBPROC blMultiTexCoord3dARB; -extern PFNGLMULTITEXCOORD3DVARBPROC blMultiTexCoord3dvARB; -extern PFNGLMULTITEXCOORD3FARBPROC blMultiTexCoord3fARB; -extern PFNGLMULTITEXCOORD3FVARBPROC blMultiTexCoord3fvARB; -extern PFNGLMULTITEXCOORD3IARBPROC blMultiTexCoord3iARB; -extern PFNGLMULTITEXCOORD3IVARBPROC blMultiTexCoord3ivARB; -extern PFNGLMULTITEXCOORD3SARBPROC blMultiTexCoord3sARB; -extern PFNGLMULTITEXCOORD3SVARBPROC blMultiTexCoord3svARB; -extern PFNGLMULTITEXCOORD4DARBPROC blMultiTexCoord4dARB; -extern PFNGLMULTITEXCOORD4DVARBPROC blMultiTexCoord4dvARB; -extern PFNGLMULTITEXCOORD4FARBPROC blMultiTexCoord4fARB; -extern PFNGLMULTITEXCOORD4FVARBPROC blMultiTexCoord4fvARB; -extern PFNGLMULTITEXCOORD4IARBPROC blMultiTexCoord4iARB; -extern PFNGLMULTITEXCOORD4IVARBPROC blMultiTexCoord4ivARB; -extern PFNGLMULTITEXCOORD4SARBPROC blMultiTexCoord4sARB; -extern PFNGLMULTITEXCOORD4SVARBPROC blMultiTexCoord4svARB; -#endif - - -#ifdef GL_ARB_shader_objects -extern PFNGLDELETEOBJECTARBPROC blDeleteObjectARB; -extern PFNGLGETHANDLEARBPROC blGetHandleARB; -extern PFNGLDETACHOBJECTARBPROC blDetachObjectARB; -extern PFNGLCREATESHADEROBJECTARBPROC blCreateShaderObjectARB; -extern PFNGLSHADERSOURCEARBPROC blShaderSourceARB; -extern PFNGLCOMPILESHADERARBPROC blCompileShaderARB; -extern PFNGLCREATEPROGRAMOBJECTARBPROC blCreateProgramObjectARB; -extern PFNGLATTACHOBJECTARBPROC blAttachObjectARB; -extern PFNGLLINKPROGRAMARBPROC blLinkProgramARB; -extern PFNGLUSEPROGRAMOBJECTARBPROC blUseProgramObjectARB; -extern PFNGLVALIDATEPROGRAMARBPROC blValidateProgramARB; -extern PFNGLUNIFORM1FARBPROC blUniform1fARB; -extern PFNGLUNIFORM2FARBPROC blUniform2fARB; -extern PFNGLUNIFORM3FARBPROC blUniform3fARB; -extern PFNGLUNIFORM4FARBPROC blUniform4fARB; -extern PFNGLUNIFORM1IARBPROC blUniform1iARB; -extern PFNGLUNIFORM2IARBPROC blUniform2iARB; -extern PFNGLUNIFORM3IARBPROC blUniform3iARB; -extern PFNGLUNIFORM4IARBPROC blUniform4iARB; -extern PFNGLUNIFORM1FVARBPROC blUniform1fvARB; -extern PFNGLUNIFORM2FVARBPROC blUniform2fvARB; -extern PFNGLUNIFORM3FVARBPROC blUniform3fvARB; -extern PFNGLUNIFORM4FVARBPROC blUniform4fvARB; -extern PFNGLUNIFORM1IVARBPROC blUniform1ivARB; -extern PFNGLUNIFORM2IVARBPROC blUniform2ivARB; -extern PFNGLUNIFORM3IVARBPROC blUniform3ivARB; -extern PFNGLUNIFORM4IVARBPROC blUniform4ivARB; -extern PFNGLUNIFORMMATRIX2FVARBPROC blUniformMatrix2fvARB; -extern PFNGLUNIFORMMATRIX3FVARBPROC blUniformMatrix3fvARB; -extern PFNGLUNIFORMMATRIX4FVARBPROC blUniformMatrix4fvARB; -extern PFNGLGETOBJECTPARAMETERFVARBPROC blGetObjectParameterfvARB; -extern PFNGLGETOBJECTPARAMETERIVARBPROC blGetObjectParameterivARB; -extern PFNGLGETINFOLOGARBPROC blGetInfoLogARB; -extern PFNGLGETATTACHEDOBJECTSARBPROC blGetAttachedObjectsARB; -extern PFNGLGETUNIFORMLOCATIONARBPROC blGetUniformLocationARB; -extern PFNGLGETACTIVEUNIFORMARBPROC blGetActiveUniformARB; -extern PFNGLGETUNIFORMFVARBPROC blGetUniformfvARB; -extern PFNGLGETUNIFORMIVARBPROC blGetUniformivARB; -extern PFNGLGETSHADERSOURCEARBPROC blGetShaderSourceARB; -#endif - -#ifdef GL_ARB_vertex_shader -extern PFNGLBINDATTRIBLOCATIONARBPROC blBindAttribLocationARB; -extern PFNGLGETACTIVEATTRIBARBPROC blGetActiveAttribARB; -extern PFNGLGETATTRIBLOCATIONARBPROC blGetAttribLocationARB; -#endif - -#ifdef GL_ARB_vertex_program -extern PFNGLVERTEXATTRIB1FARBPROC blVertexAttrib1fARB; -extern PFNGLVERTEXATTRIB1FVARBPROC blVertexAttrib1fvARB; -extern PFNGLVERTEXATTRIB2FARBPROC blVertexAttrib2fARB; -extern PFNGLVERTEXATTRIB2FVARBPROC blVertexAttrib2fvARB; -extern PFNGLVERTEXATTRIB3FARBPROC blVertexAttrib3fARB; -extern PFNGLVERTEXATTRIB3FVARBPROC blVertexAttrib3fvARB; -extern PFNGLVERTEXATTRIB4FARBPROC blVertexAttrib4fARB; -extern PFNGLVERTEXATTRIB4FVARBPROC blVertexAttrib4fvARB; -extern PFNGLGETPROGRAMSTRINGARBPROC blGetProgramStringARB; -extern PFNGLGETVERTEXATTRIBDVARBPROC blGetVertexAttribdvARB; -extern PFNGLGETVERTEXATTRIBFVARBPROC blGetVertexAttribfvARB; -extern PFNGLGETVERTEXATTRIBIVARBPROC blGetVertexAttribivARB; -#endif - -/* -#ifdef GL_EXT_compiled_vertex_array -extern PFNGLLOCKARRAYSEXTPROC blLockArraysEXT; -extern PFNGLUNLOCKARRAYSEXTPROC blUnlockArraysEXT; -#endif -*/ + void InitExtensions(bool debug); } /* namespace bgl */ - #endif /* __RAS_GLEXTENSIONMANAGER_H__ */ diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index afa98fdb274..39080b80492 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -6,15 +6,10 @@ #ifdef WIN32 #include #endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif + +#include "GL/glew.h" #include "RAS_TexVert.h" -#include "RAS_GLExtensionManager.h" #include "MT_assert.h" //#ifndef NDEBUG @@ -27,8 +22,8 @@ RAS_ListSlot::RAS_ListSlot(RAS_ListRasterizer* rasty) : KX_ListSlot(), - m_flag(LIST_MODIFY|LIST_CREATE), m_list(0), + m_flag(LIST_MODIFY|LIST_CREATE), m_rasty(rasty) { } @@ -176,7 +171,7 @@ void RAS_ListRasterizer::IndexPrimitives( RAS_ListSlot* localSlot =0; // useObjectColor(are we updating every frame?) - if(!useObjectColor) { + if(!useObjectColor && slot) { localSlot = FindOrAdd(vertexarrays, slot); localSlot->DrawList(); if(localSlot->End()) { @@ -203,7 +198,7 @@ void RAS_ListRasterizer::IndexPrimitives( ); } - if(!useObjectColor) { + if(!useObjectColor && slot) { localSlot->EndList(); *slot = localSlot; } @@ -223,7 +218,7 @@ void RAS_ListRasterizer::IndexPrimitivesMulti( RAS_ListSlot* localSlot =0; // useObjectColor(are we updating every frame?) - if(!useObjectColor) { + if(!useObjectColor && slot) { localSlot = FindOrAdd(vertexarrays, slot); localSlot->DrawList(); @@ -251,7 +246,7 @@ void RAS_ListRasterizer::IndexPrimitivesMulti( ); } - if(!useObjectColor) { + if(!useObjectColor && slot) { localSlot->EndList(); *slot = localSlot; } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index f99121e5b7c..d3c0426de86 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -31,33 +31,13 @@ #include "RAS_OpenGLRasterizer.h" -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#include -#else -#include -#if defined(__sun__) && !defined(__sparc__) -#include -#else -#include -#endif -#endif +#include "GL/glew.h" #include "RAS_Rect.h" #include "RAS_TexVert.h" #include "MT_CmMatrix4x4.h" #include "RAS_IRenderTools.h" // rendering text -#include "RAS_GLExtensionManager.h" - /** * 32x32 bit masks for vinterlace stereo mode */ @@ -83,10 +63,11 @@ RAS_OpenGLRasterizer::RAS_OpenGLRasterizer(RAS_ICanvas* canvas) m_focallength(0.0), m_setfocallength(false), m_noOfScanlines(32), - m_useTang(false), - m_materialCachingInfo(0), m_motionblur(0), - m_motionblurvalue(-1.0) + m_motionblurvalue(-1.0), + m_texco_num(0), + m_attrib_num(0), + m_materialCachingInfo(0) { m_viewmatrix.Identity(); @@ -335,7 +316,7 @@ void RAS_OpenGLRasterizer::Exit() glDisable(GL_POLYGON_STIPPLE); glDisable(GL_LIGHTING); - if (bgl::QueryExtension(bgl::_GL_EXT_separate_specular_color) || bgl::QueryVersion(1, 2)) + if (GLEW_EXT_separate_specular_color || GLEW_VERSION_1_2) glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SINGLE_COLOR); EndFrame(); @@ -802,277 +783,6 @@ void RAS_OpenGLRasterizer::IndexPrimitives(const vecVertexArray & vertexarrays, } -void RAS_OpenGLRasterizer::IndexPrimitives_Ex(const vecVertexArray & vertexarrays, - const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, - bool useObjectColor, - const MT_Vector4& rgbacolor - ) -{ - bool recalc; - GLenum drawmode; - switch (mode) - { - case 0: - drawmode = GL_TRIANGLES; - break; - case 1: - drawmode = GL_LINES; - break; - case 2: - drawmode = GL_QUADS; - break; - default: - drawmode = GL_LINES; - break; - } - - const RAS_TexVert* vertexarray ; - unsigned int numindices,vt; - - for (vt=0;vt RAS_MAX_TEXCO) + m_texco_num = RAS_MAX_TEXCO; +} + +void RAS_OpenGLRasterizer::SetAttribNum(int num) +{ + m_attrib_num = num; + if(m_attrib_num > RAS_MAX_ATTRIB) + m_attrib_num = RAS_MAX_ATTRIB; +} + +void RAS_OpenGLRasterizer::SetTexCoord(TexCoGen coords, int unit) { // this changes from material to material - if(unit < RAS_MAX) + if(unit < RAS_MAX_TEXCO) m_texco[unit] = coords; } -void RAS_OpenGLRasterizer::SetAttrib(int type) +void RAS_OpenGLRasterizer::SetAttrib(TexCoGen coords, int unit) { - if(type == RAS_TEXTANGENT) m_useTang=true; + // this changes from material to material + if(unit < RAS_MAX_ATTRIB) + m_attrib[unit] = coords; } -void RAS_OpenGLRasterizer::TexCoord(const RAS_TexVert &tv, int enabled) +void RAS_OpenGLRasterizer::TexCoord(const RAS_TexVert &tv) { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(bgl::RAS_EXT_support._ARB_multitexture) { - for(int unit=0; unitGetEnabled(); - - if (!numindices) - break; - - int vindex=0; - switch (mode) { - case 1: + glBegin(GL_QUADS); + vindex=0; + if (useObjectColor) { - glBegin(GL_LINES); - vindex=0; - for (unsigned int i=0;iGetEnabled(); - - if (!numindices) - continue; - - int vindex=0; - switch (mode) { - case 1: + glBegin(GL_TRIANGLES); + vindex=0; + if (useObjectColor) { - glBegin(GL_LINES); - vindex=0; - for (unsigned int i=0;i m_debugLines; - virtual void SetTexCoords(TexCoGen coords,int enabled); - virtual void SetAttrib(int type); - void TexCoord(const RAS_TexVert &tv, int unit); + virtual void SetTexCoordNum(int num); + virtual void SetAttribNum(int num); + virtual void SetTexCoord(TexCoGen coords, int unit); + virtual void SetAttrib(TexCoGen coords, int unit); + + void TexCoord(const RAS_TexVert &tv); virtual void GetViewMatrix(MT_Matrix4x4 &mat) const; void Tangent(const RAS_TexVert& v1, diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp index ddfcc3f3f9d..67c72aacdcf 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp @@ -32,34 +32,21 @@ #include "RAS_VAOpenGLRasterizer.h" #include -#ifdef WIN32 -#include -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include -#else -#include -#endif +#include "GL/glew.h" #include "STR_String.h" #include "RAS_TexVert.h" #include "MT_CmMatrix4x4.h" #include "RAS_IRenderTools.h" // rendering text - -#include "RAS_GLExtensionManager.h" - -using namespace bgl; - RAS_VAOpenGLRasterizer::RAS_VAOpenGLRasterizer(RAS_ICanvas* canvas, bool lock) : RAS_OpenGLRasterizer(canvas), - m_Lock(lock && RAS_EXT_support._EXT_compiled_vertex_array) + m_Lock(lock && GLEW_EXT_compiled_vertex_array), + m_last_texco_num(0), + m_last_attrib_num(0) { } - - RAS_VAOpenGLRasterizer::~RAS_VAOpenGLRasterizer() { } @@ -82,53 +69,36 @@ bool RAS_VAOpenGLRasterizer::Init(void) return result; } - - void RAS_VAOpenGLRasterizer::SetDrawingMode(int drawingmode) { m_drawingmode = drawingmode; - switch (m_drawingmode) + switch (m_drawingmode) { - case KX_BOUNDINGBOX: - { - } - case KX_WIREFRAME: - { + case KX_BOUNDINGBOX: + case KX_WIREFRAME: glDisable (GL_CULL_FACE); break; - } - case KX_TEXTURED: - { - } - case KX_SHADED: - { + case KX_TEXTURED: + case KX_SHADED: glEnableClientState(GL_COLOR_ARRAY); - } - case KX_SOLID: - { + case KX_SOLID: + break; + default: break; - } - default: - { - } } } - - void RAS_VAOpenGLRasterizer::Exit() { glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); + EnableTextures(false); RAS_OpenGLRasterizer::Exit(); } - - void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, int mode, @@ -142,24 +112,16 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays GLenum drawmode; switch (mode) { - case 0: - { - drawmode = GL_TRIANGLES; - break; - } - case 2: - { - drawmode = GL_QUADS; - break; - } - case 1: //lines - { - } - default: - { - drawmode = GL_LINES; - break; - } + case 0: + drawmode = GL_TRIANGLES; + break; + case 2: + drawmode = GL_QUADS; + break; + case 1: //lines + default: + drawmode = GL_LINES; + break; } const RAS_TexVert* vertexarray; unsigned int numindices, vt; @@ -208,7 +170,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays } } - void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, int mode, @@ -222,28 +183,19 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa GLenum drawmode; switch (mode) { - case 0: - { - drawmode = GL_TRIANGLES; - break; - } - case 2: - { - drawmode = GL_QUADS; - break; - } - case 1: //lines - { - } - default: - { - drawmode = GL_LINES; - break; - } + case 0: + drawmode = GL_TRIANGLES; + break; + case 2: + drawmode = GL_QUADS; + break; + case 1: //lines + default: + drawmode = GL_LINES; + break; } const RAS_TexVert* vertexarray; unsigned int numindices, vt; - const unsigned int enabled = polymat->GetEnabled(); if (drawmode != GL_LINES) { @@ -251,7 +203,8 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa { glDisableClientState(GL_COLOR_ARRAY); glColor4d(rgbacolor[0], rgbacolor[1], rgbacolor[2], rgbacolor[3]); - } else + } + else { glColor4d(0,0,0,1.0); glEnableClientState(GL_COLOR_ARRAY); @@ -271,11 +224,10 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa if (!numindices) continue; - - glVertexPointer(3,GL_FLOAT,vtxstride,vertexarray->getLocalXYZ()); - TexCoordPtr(vertexarray, enabled); - //glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1()); + glVertexPointer(3,GL_FLOAT,vtxstride,vertexarray->getLocalXYZ()); + TexCoordPtr(vertexarray); + glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); glNormalPointer(GL_FLOAT,vtxstride,vertexarray->getNormal()); @@ -290,62 +242,146 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa } } -void RAS_VAOpenGLRasterizer::TexCoordPtr(const RAS_TexVert *tv, int enabled) +void RAS_VAOpenGLRasterizer::TexCoordPtr(const RAS_TexVert *tv) { -#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) - if (!getenv("WITHOUT_GLEXT")) { - if(bgl::RAS_EXT_support._ARB_multitexture) - { - for(int unit=0; unitgetFlag() & TV_2NDUV && (int)tv->getUnit() == unit) { glEnableClientState(GL_TEXTURE_COORD_ARRAY); - if( tv->getFlag() & TV_2NDUV && tv->getUnit() == unit ) { - glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert), tv->getUV2()); - continue; - } - switch(m_texco[unit]) - { - case RAS_TEXCO_DISABLE: - case RAS_TEXCO_OBJECT: - case RAS_TEXCO_GEN: - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - break; - case RAS_TEXCO_ORCO: - case RAS_TEXCO_GLOB: - glTexCoordPointer(3, GL_FLOAT, sizeof(RAS_TexVert),tv->getLocalXYZ()); - break; - case RAS_TEXCO_UV1: - glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert),tv->getUV1()); - break; - case RAS_TEXCO_NORM: - glTexCoordPointer(3, GL_FLOAT, sizeof(RAS_TexVert),tv->getNormal()); - break; - case RAS_TEXTANGENT: - glTexCoordPointer(4, GL_FLOAT, sizeof(RAS_TexVert),tv->getTangent()); - break; - case RAS_TEXCO_UV2: - glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert),tv->getUV2()); - break; - } + glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert), tv->getUV2()); + continue; + } + switch(m_texco[unit]) + { + case RAS_TEXCO_ORCO: + case RAS_TEXCO_GLOB: + glTexCoordPointer(3, GL_FLOAT, sizeof(RAS_TexVert),tv->getLocalXYZ()); + break; + case RAS_TEXCO_UV1: + glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert),tv->getUV1()); + break; + case RAS_TEXCO_NORM: + glTexCoordPointer(3, GL_FLOAT, sizeof(RAS_TexVert),tv->getNormal()); + break; + case RAS_TEXTANGENT: + glTexCoordPointer(4, GL_FLOAT, sizeof(RAS_TexVert),tv->getTangent()); + break; + case RAS_TEXCO_UV2: + glTexCoordPointer(2, GL_FLOAT, sizeof(RAS_TexVert),tv->getUV2()); + break; + default: + break; } } - -#ifdef GL_ARB_vertex_program - if(m_useTang && bgl::RAS_EXT_support._ARB_vertex_program) - bgl::blVertexAttrib4fvARB(1/*tangent*/, tv->getTangent()); -#endif } -#endif -} + if(GLEW_ARB_vertex_program) { + for(unit=0; unitgetLocalXYZ()); + break; + case RAS_TEXCO_UV1: + glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV1()); + break; + case RAS_TEXCO_NORM: + glVertexAttribPointer(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getNormal()); + break; + case RAS_TEXTANGENT: + glVertexAttribPointer(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent()); + break; + case RAS_TEXCO_UV2: + glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV2()); + break; + default: + break; + } + } + } +} void RAS_VAOpenGLRasterizer::EnableTextures(bool enable) { - if (enable) - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - else - glDisableClientState(GL_TEXTURE_COORD_ARRAY); + TexCoGen *texco, *attrib; + int unit, texco_num, attrib_num; + + /* disable previously enabled texture coordinates and attributes. ideally + * this shouldn't be necessary .. */ + if(enable) + EnableTextures(false); + + /* we cache last texcoords and attribs to ensure we disable the ones that + * were actually last set */ + if(enable) { + texco = m_texco; + texco_num = m_texco_num; + attrib = m_attrib; + attrib_num = m_attrib_num; + + memcpy(m_last_texco, m_texco, sizeof(TexCoGen)*m_texco_num); + m_last_texco_num = m_texco_num; + memcpy(m_last_attrib, m_attrib, sizeof(TexCoGen)*m_attrib_num); + m_last_attrib_num = m_attrib_num; + } + else { + texco = m_last_texco; + texco_num = m_last_texco_num; + attrib = m_last_attrib; + attrib_num = m_last_attrib_num; + } + + if(GLEW_ARB_multitexture) { + for(unit=0; unit tmp -# Code can be copied & pasted from tmp to GL_ExtensionManager.cpp. -# -# glext.h is available here: http://oss.sgi.com/projects/ogl-sample/ABI/glext.h -# - -from sys import stdin -import string, re - -glext_h = string.split(stdin.read(), '\n') - -# These extensions have been incorporated into the core GL or been superceded. -# Code will not be generated for these extensions -blacklist = [ - "GL_EXT_multisample", - "GL_INGR_blend_func_separate", - "GL_SGIX_fragment_lighting", - "GL_SGIX_polynomial_ffd", - "GL_SGIS_point_parameters", - "GL_EXT_texture_object", - "GL_EXT_subtexture", - "GL_EXT_copy_texture", - "GL_EXT_vertex_array", - "GL_EXT_point_parameters", - "GL_EXT_blend_color", - "GL_EXT_polygon_offset", - "GL_EXT_texture"] - -# Only code for these extensions will be generated. Extensions on both the -# blacklist & whitelist will not have code generated. -# This list is from http://oss.sgi.com/projects/ogl-sample/registry/ at 14-Mar-04 -whitelist = [ - # ARB Extensions - "GL_ARB_multitexture", - "GLX_ARB_get_proc_address", - "GL_ARB_transpose_matrix", - "WGL_ARB_buffer_region", - "GL_ARB_multisample", - "GL_ARB_texture_env_add", - "GL_ARB_texture_cube_map", - "WGL_ARB_extensions_string", - "WGL_ARB_pixel_format", - "WGL_ARB_make_current_read", - "WGL_ARB_pbuffer", - "GL_ARB_texture_compression", - "GL_ARB_texture_border_clamp", - "GL_ARB_point_parameters", - "GL_ARB_vertex_blend", - "GL_ARB_matrix_palette", - "GL_ARB_texture_env_combine", - "GL_ARB_texture_env_crossbar", - "GL_ARB_texture_env_dot3", - "WGL_ARB_render_texture", - "GL_ARB_texture_mirrored_repeat", - "GL_ARB_depth_texture", - "GL_ARB_shadow", - "GL_ARB_shadow_ambient", - "GL_ARB_window_pos", - "GL_ARB_vertex_program", - "GL_ARB_fragment_program", - "GL_ARB_vertex_buffer_object", - "GL_ARB_occlusion_query", - "GL_ARB_shader_objects", - "GL_ARB_vertex_shader", - "GL_ARB_fragment_shader", - "GL_ARB_shading_language_100", - "GL_ARB_texture_non_power_of_two", - "GL_ARB_point_sprite", - "GL_ARB_fragment_program_shadow", - - # Non ARB Extensions - "GL_EXT_abgr", - "GL_EXT_blend_color", - "GL_EXT_polygon_offset", - "GL_EXT_texture", - "GL_EXT_texture3D", - "GL_SGIS_texture_filter4", - "GL_EXT_subtexture", - "GL_EXT_copy_texture", - "GL_EXT_histogram", - "GL_EXT_convolution", - "GL_SGI_color_matrix", - "GL_SGI_color_table", - "GL_SGIS_pixel_texture", - "GL_SGIS_texture4D", - "GL_SGI_texture_color_table", - "GL_EXT_cmyka", - "GL_EXT_texture_object", - "GL_SGIS_detail_texture", - "GL_SGIS_sharpen_texture", - "GL_EXT_packed_pixels", - "GL_SGIS_texture_lod", - "GL_SGIS_multisample", - "GL_EXT_rescale_normal", - "GLX_EXT_visual_info", - "GL_EXT_vertex_array", - "GL_EXT_misc_attribute", - "GL_SGIS_generate_mipmap", - "GL_SGIX_clipmap", - "GL_SGIX_shadow", - "GL_SGIS_texture_edge_clamp", - "GL_SGIS_texture_border_clamp", - "GL_EXT_blend_minmax", - "GL_EXT_blend_subtract", - "GL_EXT_blend_logic_op", - "GLX_SGI_swap_control", - "GLX_SGI_video_sync", - "GLX_SGI_make_current_read", - "GLX_SGIX_video_source", - "GLX_EXT_visual_rating", - "GL_SGIX_interlace", - "GLX_EXT_import_context", - "GLX_SGIX_fbconfig", - "GLX_SGIX_pbuffer", - "GL_SGIS_texture_select", - "GL_SGIX_sprite", - "GL_SGIX_texture_multi_buffer", - "GL_EXT_point_parameters", - "GL_SGIX_instruments", - "GL_SGIX_texture_scale_bias", - "GL_SGIX_framezoom", - "GL_SGIX_tag_sample_buffer", - "GL_SGIX_reference_plane", - "GL_SGIX_flush_raster", - "GLX_SGI_cushion", - "GL_SGIX_depth_texture", - "GL_SGIS_fog_function", - "GL_SGIX_fog_offset", - "GL_HP_image_transform", - "GL_HP_convolution_border_modes", - "GL_SGIX_texture_add_env", - "GL_EXT_color_subtable", - "GLU_EXT_object_space_tess", - "GL_PGI_vertex_hints", - "GL_PGI_misc_hints", - "GL_EXT_paletted_texture", - "GL_EXT_clip_volume_hint", - "GL_SGIX_list_priority", - "GL_SGIX_ir_instrument1", - "GLX_SGIX_video_resize", - "GL_SGIX_texture_lod_bias", - "GLU_SGI_filter4_parameters", - "GLX_SGIX_dm_buffer", - "GL_SGIX_shadow_ambient", - "GLX_SGIX_swap_group", - "GLX_SGIX_swap_barrier", - "GL_EXT_index_texture", - "GL_EXT_index_material", - "GL_EXT_index_func", - "GL_EXT_index_array_formats", - "GL_EXT_compiled_vertex_array", - "GL_EXT_cull_vertex", - "GLU_EXT_nurbs_tessellator", - "GL_SGIX_ycrcb", - "GL_EXT_fragment_lighting", - "GL_IBM_rasterpos_clip", - "GL_HP_texture_lighting", - "GL_EXT_draw_range_elements", - "GL_WIN_phong_shading", - "GL_WIN_specular_fog", - "GLX_SGIS_color_range", - "GL_EXT_light_texture", - "GL_SGIX_blend_alpha_minmax", - "GL_EXT_scene_marker", - "GL_SGIX_pixel_texture_bits", - "GL_EXT_bgra", - "GL_SGIX_async", - "GL_SGIX_async_pixel", - "GL_SGIX_async_histogram", - "GL_INTEL_texture_scissor", - "GL_INTEL_parallel_arrays", - "GL_HP_occlusion_test", - "GL_EXT_pixel_transform", - "GL_EXT_pixel_transform_color_table", - "GL_EXT_shared_texture_palette", - "GLX_SGIS_blended_overlay", - "GL_EXT_separate_specular_color", - "GL_EXT_secondary_color", - "GL_EXT_texture_env", - "GL_EXT_texture_perturb_normal", - "GL_EXT_multi_draw_arrays", - "GL_EXT_fog_coord", - "GL_REND_screen_coordinates", - "GL_EXT_coordinate_frame", - "GL_EXT_texture_env_combine", - "GL_APPLE_specular_vector", - "GL_SGIX_pixel_texture", - "GL_APPLE_transform_hint", - "GL_SUNX_constant_data", - "GL_SUN_global_alpha", - "GL_SUN_triangle_list", - "GL_SUN_vertex", - "WGL_EXT_display_color_table", - "WGL_EXT_extensions_string", - "WGL_EXT_make_current_read", - "WGL_EXT_pixel_format", - "WGL_EXT_pbuffer", - "WGL_EXT_swap_control", - "GL_EXT_blend_func_separate", - "GL_INGR_color_clamp", - "GL_INGR_interlace_read", - "GL_EXT_stencil_wrap", - "WGL_EXT_depth_float", - "GL_EXT_422_pixels", - "GL_NV_texgen_reflection", - "GL_SGIX_texture_range", - "GL_SUN_convolution_border_modes", - "GLX_SUN_get_transparent_index", - "GL_EXT_texture_env_add", - "GL_EXT_texture_lod_bias", - "GL_EXT_texture_filter_anisotropic", - "GL_EXT_vertex_weighting", - "GL_NV_light_max_exponent", - "GL_NV_vertex_array_range", - "GL_NV_register_combiners", - "GL_NV_fog_distance", - "GL_NV_texgen_emboss", - "GL_NV_blend_square", - "GL_NV_texture_env_combine4", - "GL_MESA_resize_buffers", - "GL_MESA_window_pos", - "GL_EXT_texture_compression_s3tc", - "GL_IBM_cull_vertex", - "GL_IBM_multimode_draw_arrays", - "GL_IBM_vertex_array_lists", - "GL_3DFX_texture_compression_FXT1", - "GL_3DFX_multisample", - "GL_3DFX_tbuffer", - "WGL_EXT_multisample", - "GL_SGIX_vertex_preclip", - "GL_SGIX_resample", - "GL_SGIS_texture_color_mask", - "GLX_MESA_copy_sub_buffer", - "GLX_MESA_pixmap_colormap", - "GLX_MESA_release_buffers", - "GLX_MESA_set_3dfx_mode", - "GL_EXT_texture_env_dot3", - "GL_ATI_texture_mirror_once", - "GL_NV_fence", - "GL_IBM_static_data", - "GL_IBM_texture_mirrored_repeat", - "GL_NV_evaluators", - "GL_NV_packed_depth_stencil", - "GL_NV_register_combiners2", - "GL_NV_texture_compression_vtc", - "GL_NV_texture_rectangle", - "GL_NV_texture_shader", - "GL_NV_texture_shader2", - "GL_NV_vertex_array_range2", - "GL_NV_vertex_program", - "GLX_SGIX_visual_select_group", - "GL_SGIX_texture_coordinate_clamp", - "GLX_OML_swap_method", - "GLX_OML_sync_control", - "GL_OML_interlace", - "GL_OML_subsample", - "GL_OML_resample", - "WGL_OML_sync_control", - "GL_NV_copy_depth_to_color", - "GL_ATI_envmap_bumpmap", - "GL_ATI_fragment_shader", - "GL_ATI_pn_triangles", - "GL_ATI_vertex_array_object", - "GL_EXT_vertex_shader", - "GL_ATI_vertex_streams", - "WGL_I3D_digital_video_control", - "WGL_I3D_gamma", - "WGL_I3D_genlock", - "WGL_I3D_image_buffer", - "WGL_I3D_swap_frame_lock", - "WGL_I3D_swap_frame_usage", - "GL_ATI_element_array", - "GL_SUN_mesh_array", - "GL_SUN_slice_accum", - "GL_NV_multisample_filter_hint", - "GL_NV_depth_clamp", - "GL_NV_occlusion_query", - "GL_NV_point_sprite", - "WGL_NV_render_depth_texture", - "WGL_NV_render_texture_rectangle", - "GL_NV_texture_shader3", - "GL_NV_vertex_program1_1", - "GL_EXT_shadow_funcs", - "GL_EXT_stencil_two_side", - "GL_ATI_text_fragment_shader", - "GL_APPLE_client_storage", - "GL_APPLE_element_array", - "GL_APPLE_fence", - "GL_APPLE_vertex_array_object", - "GL_APPLE_vertex_array_range", - "GL_APPLE_ycbcr_422", - "GL_S3_s3tc", - "GL_ATI_draw_buffers", - "WGL_ATI_pixel_format_float", - "GL_ATI_texture_env_combine3", - "GL_ATI_texture_float", - "GL_NV_float_buffer", - "GL_NV_fragment_program", - "GL_NV_half_float", - "GL_NV_pixel_data_range", - "GL_NV_primitive_restart", - "GL_NV_texture_expand_normal", - "GL_NV_vertex_program2", - "GL_ATI_map_object_buffer", - "GL_ATI_separate_stencil", - "GL_ATI_vertex_attrib_array_object", - "GL_OES_byte_coordinates", - "GL_OES_fixed_point", - "GL_OES_single_precision", - "GL_OES_compressed_paletted_texture", - "GL_OES_read_format", - "GL_OES_query_matrix", - "GL_EXT_depth_bounds_test", - "GL_EXT_texture_mirror_clamp", - "GL_EXT_blend_equation_separate", - "GL_MESA_pack_invert", - "GL_MESA_ycbcr_texture"] - -""" -Example code output: -#ifdef GL_EXT_compiled_vertex_array - if (QueryExtension("GL_EXT_compiled_vertex_array")) - { - glUnlockArraysEXT = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glUnlockArraysEXT")); - glLockArraysEXT = reinterpret_cast(bglGetProcAddress((const GLubyte *) "glLockArraysEXT")); - if (glUnlockArraysEXT && glLockArraysEXT) - { - EnableExtension(_GL_EXT_compiled_vertex_array); - if (doDebugMessages) - std::cout << "Detected GL_EXT_compiled_vertex_array" << std::endl; - } else { - std::cout << "ERROR: GL_EXT_compiled_vertex_array implementation is broken!" << std::endl; - } - } -#endif -""" -def writeext(ext, fnlist): - if (find(blacklist, ext)): - return - if (len(fnlist) == 0): - # This extension has no functions to detect - don't need to wrap in - # #ifdef GL_extension names - print "\tif (QueryExtension(\"" + ext + "\"))" - print "\t{" - print "\t\tEnableExtension(_" + ext + ");" - print "\t\tif (doDebugMessages)" - print "\t\t\tstd::cout << \"Detected " + ext + "\" << std::endl;" - print "\t}" - print - return - print "#if defined(" + ext + ")" - print "\tif (QueryExtension(\"" + ext + "\"))" - print "\t{" - for fn in fnlist: - print "\t\t" + fn[0] + " = reinterpret_cast<" + fn[1] + ">(bglGetProcAddress((const GLubyte *) \"" + fn[0] + "\"));" - errcheck = "" - for fn in fnlist: - if (errcheck == ""): - errcheck = fn[0] - else: - errcheck = errcheck + " && " + fn[0] - print "\t\tif (" + errcheck + ") {" - print "\t\t\tEnableExtension(_" + ext + ");" - print "\t\t\tif (doDebugMessages)" - print "\t\t\t\tstd::cout << \"Enabled " + ext + "\" << std::endl;" - print "\t\t} else {" - print "\t\t\tstd::cout << \"ERROR: " + ext + " implementation is broken!\" << std::endl;" - print "\t\t}" - print "\t}" - print "#endif" - print - -""" -Example Output: -#if defined(GL_EXT_compiled_vertex_array) -PFNGLLOCKARRAYSEXTPROC glLockArraysEXT; -PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT; -#endif -""" -def writeproto(ext, fnlist): - if (find(blacklist, ext) or not find(whitelist, ext)): - return - print "#if defined(" + ext + ")" - for fn in fnlist: - print fn[1] + " " + fn[0] + ";" - print "#endif" - print - -""" -#ifdef GL_EXT_compiled_vertex_array -extern PFNGLLOCKARRAYSEXTPROC glLockArraysEXT; -extern PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT; -#endif -""" -def writeheader(ext, fnlisti): - if (find(blacklist, ext) or not find(whitelist, ext)): - return - print "#if defined(" + ext + ")" - for fn in fnlist: - print "extern " + fn[1] + " " + fn[0] + ";" - print "#endif" - print - -def find(l, x): - for i in l: - if (i == x): - return 1 - return 0 - - -# Write Prototypes -ext = "" -fns = [] -fnlist = [] -ifdef = 0 -for i in glext_h: - line = re.search('^#ifn?def', i) - if (line): - ifdef = ifdef + 1 - - line = re.search('^#ifndef (GL_.*)', i) - if (line): - if (not re.search('GL_VERSION.*', line.group(1)) and find(whitelist, line.group(1))): - ext = line.group(1) - - line = re.search('^#endif', i) - if (line): - ifdef = ifdef - 1 - if (ifdef == 0 and ext != ""): - writeproto(ext, fnlist) - ext = "" - fns = [] - fnlist = [] - if (ext != ""): - line = re.search('.* (gl.*) \(.*\);', i) - if (line): - fns += [line.group(1)] - line = re.search('.*PFN(.*)PROC.*', i) - if (line): - for j in fns: - if (string.lower(line.group(1)) == string.lower(j)): - fnlist += [(j, "PFN" + line.group(1) + "PROC")] - -# Write link code -ext = "" -fns = [] -fnlist = [] -ifdef = 0 -for i in glext_h: - line = re.search('^#ifn?def', i) - if (line): - ifdef = ifdef + 1 - - line = re.search('^#ifndef (GL_.*)', i) - if (line): - if (not re.search('GL_VERSION.*', line.group(1)) and find(whitelist, line.group(1))): - ext = line.group(1) - - line = re.search('^#endif', i) - if (line): - ifdef = ifdef - 1 - if (ifdef == 0 and ext != ""): - writeext(ext, fnlist) - ext = "" - fns = [] - fnlist = [] - if (ext != ""): - line = re.search('.* (gl.*) \(.*\);', i) - if (line): - fns += [line.group(1)] - line = re.search('.*PFN(.*)PROC.*', i) - if (line): - for j in fns: - if (string.lower(line.group(1)) == string.lower(j)): - fnlist += [(j, "PFN" + line.group(1) + "PROC")] - -# Write header code -ext = "" -fns = [] -fnlist = [] -ifdef = 0 -for i in glext_h: - line = re.search('^#ifn?def', i) - if (line): - ifdef = ifdef + 1 - - line = re.search('^#ifndef (GL_.*)', i) - if (line): - if (not re.search('GL_VERSION.*', line.group(1)) and find(whitelist, line.group(1))): - ext = line.group(1) - - line = re.search('^#endif', i) - if (line): - ifdef = ifdef - 1 - if (ifdef == 0 and ext != ""): - writeheader(ext, fnlist) - ext = "" - fns = [] - fnlist = [] - if (ext != ""): - line = re.search('.* (gl.*) \(.*\);', i) - if (line): - fns += [line.group(1)] - line = re.search('.*PFN(.*)PROC.*', i) - if (line): - for j in fns: - if (string.lower(line.group(1)) == string.lower(j)): - fnlist += [(j, "PFN" + line.group(1) + "PROC")] - -# Write Python link code -ext = "" -extensions = [] -fns = [] -defines = [] -ifdef = 0 -for i in glext_h: - line = re.search('^#ifn?def', i) - if (line): - ifdef = ifdef + 1 - - line = re.search('^#ifndef (GL_.*)', i) - if (line): - if (not re.search('GL_VERSION.*', line.group(1)) and find(whitelist, line.group(1))): - ext = line.group(1) - - line = re.search('^#endif', i) - if (line): - ifdef = ifdef - 1 - if (ifdef == 0 and ext != ""): - done = 0 - for e in range(len(extensions)): - if extensions[e][0] == ext: - extensions[e] = (ext, defines + extensions[e][1], fns + extensions[e][2]) - done = 1 - if not done: - extensions = extensions + [(ext, defines, fns)] - ext = "" - fns = [] - defines = [] - if (ext != ""): - line = re.search('#define +(GL.*) +(0x.*)', i) # #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 - if (line): - defines += [(line.group(1), line.group(2))] - - line = re.search('(.* )(gl.*)(\(.*\));', i) # GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat); - if (line): - fns += [(line.group(1), line.group(2), line.group(3))] - -for ext in extensions: - if (find(blacklist, ext[0]) or not find(whitelist, ext[0])): - continue - print "#if defined(" + ext[0] + ")" - for fn in ext[2]: - line = re.search('gl(.*)', fn[1]) - # BGL_Wrap(2, RasterPos2f, void, (GLfloat, GLfloat)) - rtype = "" - for r in string.split(fn[0]): - if r != "GLAPI" and r != "APIENTRY": - rtype = rtype + " " + r - params = "" - for p in string.split(fn[2], ','): - pline = re.search('(.*) \*', p) - if (pline): - p = pline.group(1) + "P" - if params == "": - params = p - else: - params = params + "," + p - if not params[-1] == ")": - params = params + ")" - print "BGL_Wrap(" + str(len(string.split(fn[2], ','))) + ", " + line.group(1) + ",\t" + rtype + ",\t" + params + ")" - print "#endif" - print - -for ext in extensions: - if (find(blacklist, ext[0]) or not find(whitelist, ext[0])): - continue - print 'PyDict_SetItemString(dict, "' + ext[0] + '", PyInt_FromLong(_' + ext[0] + '))' - print "#if defined(" + ext[0] + ")" - print "if (bglQueryExtension(_" + ext[0] + ")) {" - if len(ext[2]) > 0: - for fn in ext[2]: - line = re.search('gl(.*)', fn[1]) - # MethodDef(Vertex3iv), - print " BGL_AddMethod(" + line.group(1) + ");" - print - - for define in ext[1]: - print " BGL_AddConst(" + define[0] + ");" - print - - print "}" - print "#endif" - print diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript index ff79a5d97b8..f077833b850 100644 --- a/source/gameengine/Rasterizer/SConscript +++ b/source/gameengine/Rasterizer/SConscript @@ -7,7 +7,7 @@ if env['WITH_BF_GLEXT'] == 1: env['CPPFLAGS'].append('-DWITH_GLEXT') -incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines' +incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include' if env['OURPLATFORM']=='win32-vc': cflags = [] diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index e19d10dba64..9c1a28de999 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -98,6 +98,7 @@ endif export NAN_OPENNL ?= $(LCGDIR)/opennl export NAN_ELBEEM ?= $(LCGDIR)/elbeem export NAN_SUPERLU ?= $(LCGDIR)/superlu + export NAN_GLEW ?= $(LCGDIR)/glew ifeq ($(FREE_WINDOWS), true) export NAN_FTGL ?= $(LCGDIR)/gcc/ftgl export NAN_FFMPEG ?= $(LCGDIR)/gcc/ffmpeg From b4c123c275172eb4f8477ea90c3f68d61565483b Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Tue, 17 Jun 2008 21:17:11 +0000 Subject: [PATCH 258/430] [#14400] Crash on grab/move on axis when nothing selected (patch included) I used a different fix than the included patch, but that was a pretty nasty crasher (only crash on menu/toolbox, not hotkeys). --- source/blender/src/transform_constraints.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 769ebd2ea97..2d01c2303fc 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -550,6 +550,10 @@ void setUserConstraint(TransInfo *t, int mode, const char ftext[]) { void BIF_setLocalLockConstraint(char axis, char *text) { TransInfo *t = BIF_GetTransInfo(); + if (t->total == 0) { + return; + } + switch (axis) { case 'x': setLocalConstraint(t, (CON_AXIS1|CON_AXIS2), text); @@ -566,6 +570,10 @@ void BIF_setLocalLockConstraint(char axis, char *text) { void BIF_setLocalAxisConstraint(char axis, char *text) { TransInfo *t = BIF_GetTransInfo(); + if (t->total == 0) { + return; + } + switch (axis) { case 'X': setLocalConstraint(t, CON_AXIS0, text); @@ -584,6 +592,10 @@ void BIF_setSingleAxisConstraint(float vec[3], char *text) { TransInfo *t = BIF_GetTransInfo(); float space[3][3], v[3]; + if (t->total == 0) { + return; + } + VECCOPY(space[0], vec); v[0] = vec[2]; @@ -622,6 +634,10 @@ void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text) { TransInfo *t = BIF_GetTransInfo(); float space[3][3]; + if (t->total == 0) { + return; + } + VECCOPY(space[0], vec1); VECCOPY(space[1], vec2); Crossf(space[2], space[0], space[1]); From 2bece8dcb5104bc95149b0c40723f1dc855d6b29 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 18 Jun 2008 06:46:49 +0000 Subject: [PATCH 259/430] BGE Patch: Add Shape Action support and update MSCV_7 project file for glew. Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys. --- extern/glew/make/msvc_7_0/glew_vc7.vcproj | 146 ++++ extern/make/msvc_7_0/extern.sln | 65 ++ projectfiles_vc7/blender/blender.vcproj | 4 +- .../blenderhook/KX_blenderhook.vcproj | 4 +- .../gameengine/converter/KX_converter.vcproj | 12 + .../gameplayer/common/GP_common.vcproj | 4 +- .../gameplayer/ghost/GP_ghost.vcproj | 8 +- .../gameengine/ketsji/KX_ketsji.vcproj | 18 +- .../rasterizer/RAS_rasterizer.vcproj | 12 +- .../RAS_openglrasterizer.vcproj | 21 +- source/blender/blenkernel/BKE_action.h | 5 + source/blender/blenkernel/BKE_key.h | 11 + source/blender/blenkernel/intern/action.c | 7 +- source/blender/blenkernel/intern/key.c | 2 +- source/blender/blenkernel/intern/sca.c | 1 + source/blender/blenloader/intern/readfile.c | 8 + source/blender/blenloader/intern/writefile.c | 1 + source/blender/makesdna/DNA_actuator_types.h | 1 + source/blender/src/buttons_logic.c | 12 + .../Converter/BL_BlenderDataConversion.cpp | 37 +- .../Converter/BL_DeformableGameObject.cpp | 47 ++ .../Converter/BL_DeformableGameObject.h | 40 +- .../gameengine/Converter/BL_MeshDeformer.cpp | 2 +- source/gameengine/Converter/BL_MeshDeformer.h | 4 +- .../Converter/BL_ShapeActionActuator.cpp | 797 ++++++++++++++++++ .../Converter/BL_ShapeActionActuator.h | 133 +++ .../gameengine/Converter/BL_ShapeDeformer.cpp | 125 +++ .../gameengine/Converter/BL_ShapeDeformer.h | 93 ++ .../gameengine/Converter/BL_SkinDeformer.cpp | 50 +- source/gameengine/Converter/BL_SkinDeformer.h | 35 +- .../Converter/BL_SkinMeshObject.cpp | 58 ++ .../gameengine/Converter/BL_SkinMeshObject.h | 36 +- .../Converter/KX_ConvertActuators.cpp | 25 + source/gameengine/GameLogic/SCA_IObject.h | 2 +- source/gameengine/Ketsji/KX_GameObject.cpp | 1 + source/gameengine/Ketsji/KX_GameObject.h | 17 +- source/gameengine/Ketsji/KX_Scene.cpp | 128 +-- source/gameengine/Rasterizer/RAS_Deformer.h | 2 +- .../gameengine/Rasterizer/RAS_MeshObject.cpp | 5 +- source/gameengine/Rasterizer/RAS_MeshObject.h | 5 +- 40 files changed, 1824 insertions(+), 160 deletions(-) create mode 100644 extern/glew/make/msvc_7_0/glew_vc7.vcproj create mode 100644 source/gameengine/Converter/BL_ShapeActionActuator.cpp create mode 100644 source/gameengine/Converter/BL_ShapeActionActuator.h create mode 100644 source/gameengine/Converter/BL_ShapeDeformer.cpp create mode 100644 source/gameengine/Converter/BL_ShapeDeformer.h diff --git a/extern/glew/make/msvc_7_0/glew_vc7.vcproj b/extern/glew/make/msvc_7_0/glew_vc7.vcproj new file mode 100644 index 00000000000..a8141587350 --- /dev/null +++ b/extern/glew/make/msvc_7_0/glew_vc7.vcproj @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/extern/make/msvc_7_0/extern.sln b/extern/make/msvc_7_0/extern.sln index afc88ddda8e..e4bc550f503 100644 --- a/extern/make/msvc_7_0/extern.sln +++ b/extern/make/msvc_7_0/extern.sln @@ -8,6 +8,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "solid", "..\..\solid\make\msvc_7_0\solid.vcproj", "{D696C86B-0B53-4471-A50D-5B983A6FA4AD}" ProjectSection(ProjectDependencies) = postProject {6461F05D-4698-47AB-A8E8-1CA2ACC9948B} = {6461F05D-4698-47AB-A8E8-1CA2ACC9948B} + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} {0112CAD5-3584-412A-A2E5-1315A00437B4} = {0112CAD5-3584-412A-A2E5-1315A00437B4} {B83C6BED-11EC-46C8-AFFA-121EEDE94373} = {B83C6BED-11EC-46C8-AFFA-121EEDE94373} {524264F4-DF21-4B79-847F-E7CA643ECD0B} = {524264F4-DF21-4B79-847F-E7CA643ECD0B} @@ -46,6 +47,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bullet2", "..\..\bullet2\ma ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glew", "..\..\glew\make\msvc_7_0\glew_vc7.vcproj", "{BAC615B0-F1AF-418B-8D23-A10FD8870D6A}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution 3D Plugin Debug = 3D Plugin Debug @@ -54,6 +59,10 @@ Global Blender Release = Blender Release BlenderPlayer Debug = BlenderPlayer Debug BlenderPlayer Release = BlenderPlayer Release + Debug = Debug + Release = Release + EndGlobalSection + GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {9C71A793-C177-4CAB-8EC5-923D500B39F8}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 @@ -68,6 +77,10 @@ Global {9C71A793-C177-4CAB-8EC5-923D500B39F8}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {9C71A793-C177-4CAB-8EC5-923D500B39F8}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {9C71A793-C177-4CAB-8EC5-923D500B39F8}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Debug.Build.0 = 3D Plugin Debug|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Release.ActiveCfg = 3D Plugin Release|Win32 + {9C71A793-C177-4CAB-8EC5-923D500B39F8}.Release.Build.0 = 3D Plugin Release|Win32 {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -80,6 +93,10 @@ Global {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Debug.Build.0 = 3D Plugin Debug|Win32 + {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Release.ActiveCfg = 3D Plugin Release|Win32 + {D696C86B-0B53-4471-A50D-5B983A6FA4AD}.Release.Build.0 = 3D Plugin Release|Win32 {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -92,6 +109,10 @@ Global {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Debug.Build.0 = Blender Debug|Win32 {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Release.ActiveCfg = Blender Debug|Win32 {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.BlenderPlayer Release.Build.0 = Blender Debug|Win32 + {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Debug.Build.0 = 3D Plugin Debug|Win32 + {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Release.ActiveCfg = 3D Plugin Release|Win32 + {6461F05D-4698-47AB-A8E8-1CA2ACC9948B}.Release.Build.0 = 3D Plugin Release|Win32 {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {524264F4-DF21-4B79-847F-E7CA643ECD0B}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -104,6 +125,10 @@ Global {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {524264F4-DF21-4B79-847F-E7CA643ECD0B}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Debug.Build.0 = 3D Plugin Debug|Win32 + {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Release.ActiveCfg = 3D Plugin Release|Win32 + {524264F4-DF21-4B79-847F-E7CA643ECD0B}.Release.Build.0 = 3D Plugin Release|Win32 {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -116,6 +141,10 @@ Global {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Debug.Build.0 = Blender Debug|Win32 {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Release.ActiveCfg = Blender Debug|Win32 {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.BlenderPlayer Release.Build.0 = Blender Debug|Win32 + {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Debug.Build.0 = 3D Plugin Debug|Win32 + {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Release.ActiveCfg = 3D Plugin Release|Win32 + {B83C6BED-11EC-46C8-AFFA-121EEDE94373}.Release.Build.0 = 3D Plugin Release|Win32 {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {0112CAD5-3584-412A-A2E5-1315A00437B4}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -128,6 +157,10 @@ Global {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Debug.Build.0 = Blender Debug|Win32 {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Release.ActiveCfg = Blender Debug|Win32 {0112CAD5-3584-412A-A2E5-1315A00437B4}.BlenderPlayer Release.Build.0 = Blender Debug|Win32 + {0112CAD5-3584-412A-A2E5-1315A00437B4}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {0112CAD5-3584-412A-A2E5-1315A00437B4}.Debug.Build.0 = 3D Plugin Debug|Win32 + {0112CAD5-3584-412A-A2E5-1315A00437B4}.Release.ActiveCfg = 3D Plugin Release|Win32 + {0112CAD5-3584-412A-A2E5-1315A00437B4}.Release.Build.0 = 3D Plugin Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -140,6 +173,10 @@ Global {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Debug.Build.0 = 3D Plugin Debug|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Release.ActiveCfg = 3D Plugin Release|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Release.Build.0 = 3D Plugin Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -152,6 +189,10 @@ Global {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Debug.Build.0 = 3D Plugin Debug|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Release.ActiveCfg = 3D Plugin Release|Win32 + {F9850C15-FF0A-429E-9D47-89FB433C9BD8}.Release.Build.0 = 3D Plugin Release|Win32 {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Blender Debug.ActiveCfg = Blender Debug|Win32 @@ -160,6 +201,10 @@ Global {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Blender Release.Build.0 = Blender Release|Win32 {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.BlenderPlayer Debug.ActiveCfg = BlenderPlayer Debug|Win32 {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.BlenderPlayer Release.ActiveCfg = BlenderPlayer Release|Win32 + {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Debug.ActiveCfg = BlenderPlayer Debug|Win32 + {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Debug.Build.0 = BlenderPlayer Debug|Win32 + {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Release.ActiveCfg = BlenderPlayer Release|Win32 + {FC752464-F413-4D4F-842D-A5D3AA0E6A3D}.Release.Build.0 = BlenderPlayer Release|Win32 {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug.ActiveCfg = 3D Plugin Debug|Win32 {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Debug.Build.0 = 3D Plugin Debug|Win32 {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.3D Plugin Release.ActiveCfg = 3D Plugin Release|Win32 @@ -172,6 +217,26 @@ Global {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Debug.ActiveCfg = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Debug.Build.0 = 3D Plugin Debug|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Release.ActiveCfg = 3D Plugin Release|Win32 + {FFD3C64A-30E2-4BC7-BC8F-51818C320400}.Release.Build.0 = 3D Plugin Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Debug.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Debug.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Release.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.3D Plugin Release.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Debug.ActiveCfg = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Debug.Build.0 = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Release.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Blender Release.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Debug.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Debug.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Release.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.BlenderPlayer Release.Build.0 = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Debug.ActiveCfg = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Debug.Build.0 = Blender Debug|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release.ActiveCfg = Blender Release|Win32 + {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}.Release.Build.0 = Blender Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/projectfiles_vc7/blender/blender.vcproj b/projectfiles_vc7/blender/blender.vcproj index 2f73bfefd27..6372a2f73f5 100644 --- a/projectfiles_vc7/blender/blender.vcproj +++ b/projectfiles_vc7/blender/blender.vcproj @@ -41,7 +41,7 @@ + + + + @@ -396,6 +402,12 @@ + + + + diff --git a/projectfiles_vc7/gameengine/gameplayer/common/GP_common.vcproj b/projectfiles_vc7/gameengine/gameplayer/common/GP_common.vcproj index cba8b1558c9..223a1187347 100644 --- a/projectfiles_vc7/gameengine/gameplayer/common/GP_common.vcproj +++ b/projectfiles_vc7/gameengine/gameplayer/common/GP_common.vcproj @@ -124,7 +124,7 @@ + + @@ -539,6 +542,9 @@ + + diff --git a/projectfiles_vc7/gameengine/rasterizer/RAS_rasterizer.vcproj b/projectfiles_vc7/gameengine/rasterizer/RAS_rasterizer.vcproj index 40a92a5c181..31520b06546 100644 --- a/projectfiles_vc7/gameengine/rasterizer/RAS_rasterizer.vcproj +++ b/projectfiles_vc7/gameengine/rasterizer/RAS_rasterizer.vcproj @@ -21,7 +21,7 @@ - - - - - - diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index b5e34444d13..716eac81b55 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -44,6 +44,7 @@ struct bActionChannel; struct bPose; struct bPoseChannel; struct Object; +struct ID; /* Kernel prototypes */ #ifdef __cplusplus @@ -157,6 +158,10 @@ void rest_pose(struct bPose *pose); float get_action_frame(struct Object *ob, float cframe); /* map strip time to global time (frame nr) */ float get_action_frame_inv(struct Object *ob, float cframe); +/* builds a list of NlaIpoChannel with ipo values to write in datablock */ +void extract_ipochannels_from_action(ListBase *lb, struct ID *id, struct bAction *act, char *name, float ctime); +/* write values returned by extract_ipochannels_from_action, returns the number of value written */ +int execute_ipochannels(ListBase *lb); #ifdef __cplusplus }; diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index a6871aa837f..faf8692b89a 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -40,6 +40,11 @@ struct Object; struct Lattice; struct Mesh; +/* Kernel prototypes */ +#ifdef __cplusplus +extern "C" { +#endif + void free_key(struct Key *sc); struct Key *add_key(struct ID *id); struct Key *copy_key(struct Key *key); @@ -57,6 +62,12 @@ int do_ob_key(struct Object *ob); struct Key *ob_get_key(struct Object *ob); struct KeyBlock *ob_get_keyblock(struct Object *ob); struct KeyBlock *key_get_keyblock(struct Key *key, int index); +// needed for the GE +void do_rel_key(int start, int end, int tot, char *basispoin, struct Key *key, int mode); + +#ifdef __cplusplus +}; +#endif #endif diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 4860c65f06c..05f2e69fce1 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -860,7 +860,7 @@ typedef struct NlaIpoChannel { int type; } NlaIpoChannel; -static void extract_ipochannels_from_action(ListBase *lb, ID *id, bAction *act, char *name, float ctime) +void extract_ipochannels_from_action(ListBase *lb, ID *id, bAction *act, char *name, float ctime) { bActionChannel *achan= get_action_channel(act, name); IpoCurve *icu; @@ -953,15 +953,18 @@ static void blend_ipochannels(ListBase *dst, ListBase *src, float srcweight, int } } -static void execute_ipochannels(ListBase *lb) +int execute_ipochannels(ListBase *lb) { NlaIpoChannel *nic; + int count = 0; for(nic= lb->first; nic; nic= nic->next) { if(nic->poin) { write_ipo_poin(nic->poin, nic->type, nic->val); + count++; } } + return count; } /* nla timing */ diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 3b4e562a87a..dd6c7ddacd2 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -630,7 +630,7 @@ void cp_cu_key(Curve *cu, KeyBlock *kb, int start, int end) } -static void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, int mode) +void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, int mode) { KeyBlock *kb; int *ofsp, ofs[3], elemsize, b; diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 86e395b3770..92544f19721 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -411,6 +411,7 @@ void init_actuator(bActuator *act) switch(act->type) { #ifdef __NLA case ACT_ACTION: + case ACT_SHAPEACTION: act->data= MEM_callocN(sizeof(bActionActuator), "actionact"); break; #endif diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 7d0dd9e41c1..fa7cbb06139 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2991,6 +2991,10 @@ static void lib_link_object(FileData *fd, Main *main) bActionActuator *aa= act->data; aa->act= newlibadr(fd, ob->id.lib, aa->act); } + else if(act->type==ACT_SHAPEACTION) { + bActionActuator *aa= act->data; + aa->act= newlibadr(fd, ob->id.lib, aa->act); + } else if(act->type==ACT_PROPERTY) { bPropertyActuator *pa= act->data; pa->ob= newlibadr(fd, ob->id.lib, pa->ob); @@ -8399,6 +8403,10 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob) bActionActuator *aa= act->data; expand_doit(fd, mainvar, aa->act); } + else if(act->type==ACT_SHAPEACTION) { + bActionActuator *aa= act->data; + expand_doit(fd, mainvar, aa->act); + } else if(act->type==ACT_PROPERTY) { bPropertyActuator *pa= act->data; expand_doit(fd, mainvar, pa->ob); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index b4a9f225470..2595b95bbf0 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -664,6 +664,7 @@ static void write_actuators(WriteData *wd, ListBase *lb) switch(act->type) { case ACT_ACTION: + case ACT_SHAPEACTION: writestruct(wd, DATA, "bActionActuator", 1, act->data); break; case ACT_SOUND: diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index e34b376737a..a326f5b01d6 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -278,6 +278,7 @@ typedef struct FreeCamera { #define ACT_VISIBILITY 18 #define ACT_2DFILTER 19 #define ACT_PARENT 20 +#define ACT_SHAPEACTION 21 /* actuator flag */ #define ACT_SHOW 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 27caedf0cdd..59fedf04e30 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -677,6 +677,8 @@ static char *controller_pup(void) static char *actuator_name(int type) { switch (type) { + case ACT_SHAPEACTION: + return "Shape Action"; case ACT_ACTION: return "Action"; case ACT_OBJECT: @@ -732,6 +734,14 @@ static char *actuator_pup(Object *owner) "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" "|Visibility %x18|2D Filter %x19|Parent %x20"; break; + + case OB_MESH: + return "Actuators %t|Shape Action %x21|Motion %x0|Constraint %x9|Ipo %x1" + "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" + "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" + "|Visibility %x18|2D Filter %x19|Parent %x20"; + break; + default: return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1" "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" @@ -1433,6 +1443,7 @@ static int get_col_actuator(int type) { switch(type) { case ACT_ACTION: return TH_BUT_ACTION; + case ACT_SHAPEACTION: return TH_BUT_ACTION; case ACT_OBJECT: return TH_BUT_NEUTRAL; case ACT_IPO: return TH_BUT_SETTING; case ACT_PROPERTY: return TH_BUT_SETTING1; @@ -1541,6 +1552,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho break; } case ACT_ACTION: + case ACT_SHAPEACTION: { /* DrawAct */ #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 0ad9258bcc0..32946267202 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -90,6 +90,7 @@ #include "BKE_object.h" #include "BKE_scene.h" #include "BL_SkinMeshObject.h" +#include "BL_ShapeDeformer.h" #include "BL_SkinDeformer.h" #include "BL_MeshDeformer.h" //#include "BL_ArmatureController.h" @@ -223,15 +224,16 @@ static unsigned int KX_Mcol2uint_new(MCol col) static void SetDefaultFaceType(Scene* scene) { default_face_mode = TF_DYNAMIC; - Base *base = static_cast(scene->base.first); - while(base) + Scene *sce; + Base *base; + + for(SETLOOPER(scene,base)) { if (base->object->type == OB_LAMP) { default_face_mode = TF_DYNAMIC|TF_LIGHT; return; } - base = base->next; } } @@ -800,12 +802,12 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* // Determine if we need to make a skinned mesh - if (mesh->dvert){ - meshobj = new BL_SkinMeshObject(lightlayer); + if (mesh->dvert || mesh->key){ + meshobj = new BL_SkinMeshObject(mesh, lightlayer); skinMesh = true; } else { - meshobj = new RAS_MeshObject(lightlayer); + meshobj = new RAS_MeshObject(mesh, lightlayer); } MT_Vector4 *tangent = 0; if (tface) @@ -1644,7 +1646,7 @@ static KX_GameObject *gameobject_from_blenderobject( // needed for python scripting kxscene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj); - gameobj = new BL_DeformableGameObject(kxscene,KX_Scene::m_callbacks); + gameobj = new BL_DeformableGameObject(ob,kxscene,KX_Scene::m_callbacks); // set transformation gameobj->AddMesh(meshobj); @@ -1655,12 +1657,24 @@ static KX_GameObject *gameobject_from_blenderobject( ((ob->gameflag2 & OB_NEVER_DO_ACTIVITY_CULLING)!=0); gameobj->SetIgnoreActivityCulling(ignoreActivityCulling); - // If this is a skin object, make Skin Controller - if (ob->parent && ob->parent->type == OB_ARMATURE && ob->partype==PARSKEL && ((Mesh*)ob->data)->dvert){ + // two options exists for deform: shape keys and armature + // only support relative shape key + bool bHasShapeKey = mesh->key != NULL && mesh->key->type==KEY_RELATIVE; + bool bHasDvert = mesh->dvert != NULL; + bool bHasArmature = (ob->parent && ob->parent->type == OB_ARMATURE && ob->partype==PARSKEL && bHasDvert); + + if (bHasShapeKey) { + // not that we can have shape keys without dvert! + BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj, + ob, (BL_SkinMeshObject*)meshobj); + ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; + } else if (bHasArmature) { BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; - } - else if (((Mesh*)ob->data)->dvert){ + } else if (bHasDvert) { + // this case correspond to a mesh that can potentially deform but not with the + // object to which it is attached for the moment. A skin mesh was created in + // BL_ConvertMesh() so must create a deformer too! BL_MeshDeformer *dcont = new BL_MeshDeformer(ob, (BL_SkinMeshObject*)meshobj ); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; } @@ -1696,6 +1710,7 @@ static KX_GameObject *gameobject_from_blenderobject( { gameobj->SetPhysicsEnvironment(kxscene->GetPhysicsEnvironment()); gameobj->SetLayer(ob->lay); + gameobj->SetBlenderObject(ob); } return gameobj; } diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index 68a2e41ca47..d23274324ee 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -28,6 +28,8 @@ */ #include "BL_DeformableGameObject.h" +#include "BL_ShapeDeformer.h" +#include "BL_ShapeActionActuator.h" #ifdef HAVE_CONFIG_H #include @@ -60,3 +62,48 @@ CValue* BL_DeformableGameObject::GetReplica() ProcessReplica(replica); return replica; } + +bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short priority, double curtime) +{ + if (curtime != m_lastframe){ + m_activePriority = 9999; + m_lastframe= curtime; + m_activeAct = NULL; + } + + if (priority<=m_activePriority) + { + if (m_activeAct && (m_activeAct!=act)) + m_activeAct->SetBlendTime(0.0f); /* Reset the blend timer */ + m_activeAct = act; + m_activePriority = priority; + m_lastframe = curtime; + + return true; + } + else{ + act->SetBlendTime(0.0f); + return false; + } +} + +bool BL_DeformableGameObject::GetShape(vector &shape) +{ + shape.clear(); + if (m_pDeformer) + { + Mesh* mesh = ((BL_MeshDeformer*)m_pDeformer)->GetMesh(); + // this check is normally superfluous: a shape deformer can only be created if the mesh + // has relative keys + if (mesh && mesh->key && mesh->key->type==KEY_RELATIVE) + { + KeyBlock *kb; + for (kb = (KeyBlock*)mesh->key->block.first; kb; kb = (KeyBlock*)kb->next) + { + shape.push_back(kb->curval); + } + } + } + return !shape.empty(); +} + diff --git a/source/gameengine/Converter/BL_DeformableGameObject.h b/source/gameengine/Converter/BL_DeformableGameObject.h index d943cc7388a..57a404ad72b 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.h +++ b/source/gameengine/Converter/BL_DeformableGameObject.h @@ -34,15 +34,28 @@ #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning #endif //WIN32 +#include "DNA_mesh_types.h" #include "KX_GameObject.h" -#include "RAS_Deformer.h" +#include "BL_MeshDeformer.h" +#include + +class BL_ShapeActionActuator; +struct Key; class BL_DeformableGameObject : public KX_GameObject { public: - RAS_Deformer *m_pDeformer; CValue* GetReplica(); + + double GetLastFrame () + { + return m_lastframe; + } + Object* GetBlendObject() + { + return m_blendobj; + } virtual void Relink(GEN_Map*map) { if (m_pDeformer) @@ -50,13 +63,32 @@ public: }; void ProcessReplica(KX_GameObject* replica); - BL_DeformableGameObject(void* sgReplicationInfo, SG_Callbacks callbacks) : + BL_DeformableGameObject(Object* blendobj, void* sgReplicationInfo, SG_Callbacks callbacks) : KX_GameObject(sgReplicationInfo,callbacks), - m_pDeformer(NULL) + m_pDeformer(NULL), + m_activeAct(NULL), + m_lastframe(0.), + m_blendobj(blendobj), + m_activePriority(9999) { m_isDeformable = true; }; virtual ~BL_DeformableGameObject(); + bool SetActiveAction(class BL_ShapeActionActuator *act, short priority, double curtime); + + bool GetShape(vector &shape); + Key* GetKey() + { + return (m_pDeformer) ? ((BL_MeshDeformer*)m_pDeformer)->GetMesh()->key : NULL; + } + +public: + RAS_Deformer *m_pDeformer; +protected: + class BL_ShapeActionActuator *m_activeAct; + double m_lastframe; + Object* m_blendobj; + short m_activePriority; }; diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index 85ba894f9a5..212827a660f 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -198,7 +198,7 @@ void BL_MeshDeformer::RecalcNormals() void BL_MeshDeformer::VerifyStorage() { /* Ensure that we have the right number of verts assigned */ - if (m_tvtot!=m_bmesh->totvert+m_bmesh->totface) { + if (m_tvtot!=m_bmesh->totvert){ if (m_transverts) delete [] m_transverts; if (m_transnors) diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h index 88dc2500859..8d8b56b1eed 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.h +++ b/source/gameengine/Converter/BL_MeshDeformer.h @@ -32,6 +32,7 @@ #include "RAS_Deformer.h" #include "DNA_object_types.h" +#include "DNA_key_types.h" #include "MT_Point3.h" #include @@ -56,8 +57,9 @@ public: virtual ~BL_MeshDeformer(); virtual void SetSimulatedTime(double time){}; virtual bool Apply(class RAS_IPolyMaterial *mat); - virtual void Update(void){}; + virtual bool Update(void){ return false; }; virtual RAS_Deformer* GetReplica(){return NULL;}; + struct Mesh* GetMesh() { return m_bmesh; }; // virtual void InitDeform(double time){}; protected: class BL_SkinMeshObject* m_pMeshObject; diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp new file mode 100644 index 00000000000..3e1369e1e9f --- /dev/null +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -0,0 +1,797 @@ +/** +* $Id: BL_ShapeActionActuator.cpp 14444 2008-04-16 22:40:48Z hos $ +* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** +*/ + +#if defined (__sgi) +#include +#else +#include +#endif + +#include "SCA_LogicManager.h" +#include "BL_ShapeActionActuator.h" +#include "BL_ActionActuator.h" +#include "BL_ShapeDeformer.h" +#include "KX_GameObject.h" +#include "STR_HashedString.h" +#include "DNA_action_types.h" +#include "DNA_nla_types.h" +#include "DNA_actuator_types.h" +#include "BKE_action.h" +#include "DNA_armature_types.h" +#include "MEM_guardedalloc.h" +#include "BLI_blenlib.h" +#include "BLI_arithb.h" +#include "MT_Matrix4x4.h" +#include "BKE_utildefines.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +BL_ShapeActionActuator::~BL_ShapeActionActuator() +{ +} + +void BL_ShapeActionActuator::ProcessReplica() +{ + m_localtime=m_startframe; + m_lastUpdate=-1; +} + +void BL_ShapeActionActuator::SetBlendTime (float newtime) +{ + m_blendframe = newtime; +} + +CValue* BL_ShapeActionActuator::GetReplica() +{ + BL_ShapeActionActuator* replica = new BL_ShapeActionActuator(*this);//m_float,GetName()); + replica->ProcessReplica(); + + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + return replica; +} + +bool BL_ShapeActionActuator::ClampLocalTime() +{ + if (m_startframe < m_endframe) { + if (m_localtime < m_startframe) + { + m_localtime = m_startframe; + return true; + } + else if (m_localtime > m_endframe) + { + m_localtime = m_endframe; + return true; + } + } else { + if (m_localtime > m_startframe) + { + m_localtime = m_startframe; + return true; + } + else if (m_localtime < m_endframe) + { + m_localtime = m_endframe; + return true; + } + } + return false; +} + +void BL_ShapeActionActuator::SetStartTime(float curtime) +{ + float direction = m_startframe < m_endframe ? 1.0 : -1.0; + + if (!(m_flag & ACT_FLAG_REVERSE)) + m_starttime = curtime - direction*(m_localtime - m_startframe)/KX_KetsjiEngine::GetAnimFrameRate(); + else + m_starttime = curtime - direction*(m_endframe - m_localtime)/KX_KetsjiEngine::GetAnimFrameRate(); +} + +void BL_ShapeActionActuator::SetLocalTime(float curtime) +{ + float delta_time = (curtime - m_starttime)*KX_KetsjiEngine::GetAnimFrameRate(); + + if (m_endframe < m_startframe) + delta_time = -delta_time; + + if (!(m_flag & ACT_FLAG_REVERSE)) + m_localtime = m_startframe + delta_time; + else + m_localtime = m_endframe - delta_time; +} + +void BL_ShapeActionActuator::BlendShape(Key* key, float srcweight) +{ + vector::const_iterator it; + float dstweight; + int i; + KeyBlock *kb; + + dstweight = 1.0F - srcweight; + + for (it=m_blendshape.begin(), kb = (KeyBlock*)key->block.first; + kb && it != m_blendshape.end(); + kb = (KeyBlock*)kb->next, it++) { + kb->curval = kb->curval * dstweight + (*it) * srcweight; + } +} + +bool BL_ShapeActionActuator::Update(double curtime, bool frame) +{ + bool bNegativeEvent = false; + bool bPositiveEvent = false; + bool keepgoing = true; + bool wrap = false; + bool apply=true; + int priority; + float newweight; + + // result = true if animation has to be continued, false if animation stops + // maybe there are events for us in the queue ! + if (frame) + { + for (vector::iterator i=m_events.begin(); !(i==m_events.end());i++) + { + if ((*i)->GetNumber() == 0.0f) + bNegativeEvent = true; + else + bPositiveEvent= true; + (*i)->Release(); + + } + m_events.clear(); + + if (bPositiveEvent) + m_flag |= ACT_FLAG_ACTIVE; + + if (bNegativeEvent) + { + if (!(m_flag & ACT_FLAG_ACTIVE)) + return false; + m_flag &= ~ACT_FLAG_ACTIVE; + } + } + + /* This action can only be attached to a deform object */ + BL_DeformableGameObject *obj = (BL_DeformableGameObject*)GetParent(); + float length = m_endframe - m_startframe; + + priority = m_priority; + + /* Determine pre-incrementation behaviour and set appropriate flags */ + switch (m_playtype){ + case ACT_ACTION_MOTION: + if (bNegativeEvent){ + keepgoing=false; + apply=false; + }; + break; + case ACT_ACTION_FROM_PROP: + if (bNegativeEvent){ + apply=false; + keepgoing=false; + } + break; + case ACT_ACTION_LOOP_END: + if (bPositiveEvent){ + if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + m_flag &= ~ACT_FLAG_KEYUP; + m_flag &= ~ACT_FLAG_REVERSE; + m_flag |= ACT_FLAG_LOCKINPUT; + m_localtime = m_startframe; + m_starttime = curtime; + } + } + if (bNegativeEvent){ + m_flag |= ACT_FLAG_KEYUP; + } + break; + case ACT_ACTION_LOOP_STOP: + if (bPositiveEvent){ + if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + m_flag &= ~ACT_FLAG_REVERSE; + m_flag &= ~ACT_FLAG_KEYUP; + m_flag |= ACT_FLAG_LOCKINPUT; + SetStartTime(curtime); + } + } + if (bNegativeEvent){ + m_flag |= ACT_FLAG_KEYUP; + m_flag &= ~ACT_FLAG_LOCKINPUT; + keepgoing=false; + apply=false; + } + break; + case ACT_ACTION_FLIPPER: + if (bPositiveEvent){ + if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + m_flag &= ~ACT_FLAG_REVERSE; + m_flag |= ACT_FLAG_LOCKINPUT; + SetStartTime(curtime); + } + } + else if (bNegativeEvent){ + m_flag |= ACT_FLAG_REVERSE; + m_flag &= ~ACT_FLAG_LOCKINPUT; + SetStartTime(curtime); + } + break; + case ACT_ACTION_PLAY: + if (bPositiveEvent){ + if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + m_flag &= ~ACT_FLAG_REVERSE; + m_localtime = m_starttime; + m_starttime = curtime; + m_flag |= ACT_FLAG_LOCKINPUT; + } + } + break; + default: + break; + } + + /* Perform increment */ + if (keepgoing){ + if (m_playtype == ACT_ACTION_MOTION){ + MT_Point3 newpos; + MT_Point3 deltapos; + + newpos = obj->NodeGetWorldPosition(); + + /* Find displacement */ + deltapos = newpos-m_lastpos; + m_localtime += (length/m_stridelength) * deltapos.length(); + m_lastpos = newpos; + } + else{ + SetLocalTime(curtime); + } + } + + /* Check if a wrapping response is needed */ + if (length){ + if (m_localtime < m_startframe || m_localtime > m_endframe) + { + m_localtime = m_startframe + fmod(m_localtime, length); + wrap = true; + } + } + else + m_localtime = m_startframe; + + /* Perform post-increment tasks */ + switch (m_playtype){ + case ACT_ACTION_FROM_PROP: + { + CValue* propval = GetParent()->GetProperty(m_propname); + if (propval) + m_localtime = propval->GetNumber(); + + if (bNegativeEvent){ + keepgoing=false; + } + } + break; + case ACT_ACTION_MOTION: + break; + case ACT_ACTION_LOOP_STOP: + break; + case ACT_ACTION_FLIPPER: + if (wrap){ + if (!(m_flag & ACT_FLAG_REVERSE)){ + m_localtime=m_endframe; + //keepgoing = false; + } + else { + m_localtime=m_startframe; + keepgoing = false; + } + } + break; + case ACT_ACTION_LOOP_END: + if (wrap){ + if (m_flag & ACT_FLAG_KEYUP){ + keepgoing = false; + m_localtime = m_endframe; + m_flag &= ~ACT_FLAG_LOCKINPUT; + } + SetStartTime(curtime); + } + break; + case ACT_ACTION_PLAY: + if (wrap){ + m_localtime = m_endframe; + keepgoing = false; + m_flag &= ~ACT_FLAG_LOCKINPUT; + } + break; + default: + keepgoing = false; + break; + } + + + if (bNegativeEvent) + m_blendframe=0.0f; + + /* Apply the pose if necessary*/ + if (apply) { + + /* Priority test */ + if (obj->SetActiveAction(this, priority, curtime)){ + Key *key = obj->GetKey(); + + if (!key) { + // this could happen if the mesh was changed in the middle of an action + // and the new mesh has no key, stop the action + keepgoing = false; + } + else { + ListBase tchanbase= {NULL, NULL}; + + if (m_blendin && m_blendframe==0.0f){ + // this is the start of the blending, remember the startup shape + obj->GetShape(m_blendshape); + m_blendstart = curtime; + } + // only interested in shape channel + extract_ipochannels_from_action(&tchanbase, &key->id, m_action, "Shape", m_localtime); + + if (!execute_ipochannels(&tchanbase)) { + // no update, this is possible if action does not match the keys, stop the action + keepgoing = false; + } + else { + // the key have changed, apply blending if needed + if (m_blendin && (m_blendframem_blendin) + m_blendframe = m_blendin; + } + m_lastUpdate = m_localtime; + } + BLI_freelistN(&tchanbase); + } + } + else{ + m_blendframe = 0.0f; + } + } + + if (!keepgoing){ + m_blendframe = 0.0f; + } + return keepgoing; +}; + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ + +PyTypeObject BL_ShapeActionActuator::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "BL_ShapeActionActuator", + sizeof(BL_ShapeActionActuator), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject BL_ShapeActionActuator::Parents[] = { + &BL_ShapeActionActuator::Type, + &SCA_IActuator::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef BL_ShapeActionActuator::Methods[] = { + {"setAction", (PyCFunction) BL_ShapeActionActuator::sPySetAction, METH_VARARGS, SetAction_doc}, + {"setStart", (PyCFunction) BL_ShapeActionActuator::sPySetStart, METH_VARARGS, SetStart_doc}, + {"setEnd", (PyCFunction) BL_ShapeActionActuator::sPySetEnd, METH_VARARGS, SetEnd_doc}, + {"setBlendin", (PyCFunction) BL_ShapeActionActuator::sPySetBlendin, METH_VARARGS, SetBlendin_doc}, + {"setPriority", (PyCFunction) BL_ShapeActionActuator::sPySetPriority, METH_VARARGS, SetPriority_doc}, + {"setFrame", (PyCFunction) BL_ShapeActionActuator::sPySetFrame, METH_VARARGS, SetFrame_doc}, + {"setProperty", (PyCFunction) BL_ShapeActionActuator::sPySetProperty, METH_VARARGS, SetProperty_doc}, + {"setBlendtime", (PyCFunction) BL_ShapeActionActuator::sPySetBlendtime, METH_VARARGS, SetBlendtime_doc}, + + {"getAction", (PyCFunction) BL_ShapeActionActuator::sPyGetAction, METH_VARARGS, GetAction_doc}, + {"getStart", (PyCFunction) BL_ShapeActionActuator::sPyGetStart, METH_VARARGS, GetStart_doc}, + {"getEnd", (PyCFunction) BL_ShapeActionActuator::sPyGetEnd, METH_VARARGS, GetEnd_doc}, + {"getBlendin", (PyCFunction) BL_ShapeActionActuator::sPyGetBlendin, METH_VARARGS, GetBlendin_doc}, + {"getPriority", (PyCFunction) BL_ShapeActionActuator::sPyGetPriority, METH_VARARGS, GetPriority_doc}, + {"getFrame", (PyCFunction) BL_ShapeActionActuator::sPyGetFrame, METH_VARARGS, GetFrame_doc}, + {"getProperty", (PyCFunction) BL_ShapeActionActuator::sPyGetProperty, METH_VARARGS, GetProperty_doc}, + {"getType", (PyCFunction) BL_ShapeActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, + {"setType", (PyCFunction) BL_ShapeActionActuator::sPySetType, METH_VARARGS, SetType_doc}, + {NULL,NULL} //Sentinel +}; + +PyObject* BL_ShapeActionActuator::_getattr(const STR_String& attr) { + _getattr_up(SCA_IActuator); +} + +/* setStart */ +char BL_ShapeActionActuator::GetAction_doc[] = +"getAction()\n" +"\tReturns a string containing the name of the current action.\n"; + +PyObject* BL_ShapeActionActuator::PyGetAction(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + if (m_action){ + result = Py_BuildValue("s", m_action->id.name+2); + } + else{ + Py_INCREF(Py_None); + result = Py_None; + } + + return result; +} + +/* getProperty */ +char BL_ShapeActionActuator::GetProperty_doc[] = +"getProperty()\n" +"\tReturns the name of the property to be used in FromProp mode.\n"; + +PyObject* BL_ShapeActionActuator::PyGetProperty(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("s", (const char *)m_propname); + + return result; +} + +/* getFrame */ +char BL_ShapeActionActuator::GetFrame_doc[] = +"getFrame()\n" +"\tReturns the current frame number.\n"; + +PyObject* BL_ShapeActionActuator::PyGetFrame(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("f", m_localtime); + + return result; +} + +/* getEnd */ +char BL_ShapeActionActuator::GetEnd_doc[] = +"getEnd()\n" +"\tReturns the last frame of the action.\n"; + +PyObject* BL_ShapeActionActuator::PyGetEnd(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("f", m_endframe); + + return result; +} + +/* getStart */ +char BL_ShapeActionActuator::GetStart_doc[] = +"getStart()\n" +"\tReturns the starting frame of the action.\n"; + +PyObject* BL_ShapeActionActuator::PyGetStart(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("f", m_startframe); + + return result; +} + +/* getBlendin */ +char BL_ShapeActionActuator::GetBlendin_doc[] = +"getBlendin()\n" +"\tReturns the number of interpolation animation frames to be\n" +"\tgenerated when this actuator is triggered.\n"; + +PyObject* BL_ShapeActionActuator::PyGetBlendin(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("f", m_blendin); + + return result; +} + +/* getPriority */ +char BL_ShapeActionActuator::GetPriority_doc[] = +"getPriority()\n" +"\tReturns the priority for this actuator. Actuators with lower\n" +"\tPriority numbers will override actuators with higher numbers.\n"; + +PyObject* BL_ShapeActionActuator::PyGetPriority(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("i", m_priority); + + return result; +} + +/* setAction */ +char BL_ShapeActionActuator::SetAction_doc[] = +"setAction(action, (reset))\n" +"\t - action : The name of the action to set as the current action.\n" +"\t Should be an action with Shape channels.\n" +"\t - reset : Optional parameter indicating whether to reset the\n" +"\t blend timer or not. A value of 1 indicates that the\n" +"\t timer should be reset. A value of 0 will leave it\n" +"\t unchanged. If reset is not specified, the timer will" +"\t be reset.\n"; + +PyObject* BL_ShapeActionActuator::PySetAction(PyObject* self, + PyObject* args, + PyObject* kwds) { + char *string; + int reset = 1; + + if (PyArg_ParseTuple(args,"s|i",&string, &reset)) + { + bAction *action; + + action = (bAction*)SCA_ILogicBrick::m_sCurrentLogicManager->GetActionByName(STR_String(string)); + + if (!action){ + /* NOTE! Throw an exception or something */ + // printf ("setAction failed: Action not found\n", string); + } + else{ + m_action=action; + if (reset) + m_blendframe = 0.f; + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setStart */ +char BL_ShapeActionActuator::SetStart_doc[] = +"setStart(start)\n" +"\t - start : Specifies the starting frame of the animation.\n"; + +PyObject* BL_ShapeActionActuator::PySetStart(PyObject* self, + PyObject* args, + PyObject* kwds) { + float start; + + if (PyArg_ParseTuple(args,"f",&start)) + { + m_startframe = start; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setEnd */ +char BL_ShapeActionActuator::SetEnd_doc[] = +"setEnd(end)\n" +"\t - end : Specifies the ending frame of the animation.\n"; + +PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* self, + PyObject* args, + PyObject* kwds) { + float end; + + if (PyArg_ParseTuple(args,"f",&end)) + { + m_endframe = end; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setBlendin */ +char BL_ShapeActionActuator::SetBlendin_doc[] = +"setBlendin(blendin)\n" +"\t - blendin : Specifies the number of frames of animation to generate\n" +"\t when making transitions between actions.\n"; + +PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* self, + PyObject* args, + PyObject* kwds) { + float blendin; + + if (PyArg_ParseTuple(args,"f",&blendin)) + { + m_blendin = blendin; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setBlendtime */ +char BL_ShapeActionActuator::SetBlendtime_doc[] = +"setBlendtime(blendtime)\n" +"\t - blendtime : Allows the script to directly modify the internal timer\n" +"\t used when generating transitions between actions. This\n" +"\t parameter must be in the range from 0.0 to 1.0.\n"; + +PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* self, + PyObject* args, + PyObject* kwds) { + float blendframe; + + if (PyArg_ParseTuple(args,"f",&blendframe)) + { + m_blendframe = blendframe * m_blendin; + if (m_blendframe<0.f) + m_blendframe = 0.f; + if (m_blendframe>m_blendin) + m_blendframe = m_blendin; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setPriority */ +char BL_ShapeActionActuator::SetPriority_doc[] = +"setPriority(priority)\n" +"\t - priority : Specifies the new priority. Actuators will lower\n" +"\t priority numbers will override actuators with higher\n" +"\t numbers.\n"; + +PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* self, + PyObject* args, + PyObject* kwds) { + int priority; + + if (PyArg_ParseTuple(args,"i",&priority)) + { + m_priority = priority; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setFrame */ +char BL_ShapeActionActuator::SetFrame_doc[] = +"setFrame(frame)\n" +"\t - frame : Specifies the new current frame for the animation\n"; + +PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* self, + PyObject* args, + PyObject* kwds) { + float frame; + + if (PyArg_ParseTuple(args,"f",&frame)) + { + m_localtime = frame; + if (m_localtimem_endframe) + m_localtime=m_endframe; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* setProperty */ +char BL_ShapeActionActuator::SetProperty_doc[] = +"setProperty(prop)\n" +"\t - prop : A string specifying the property name to be used in\n" +"\t FromProp playback mode.\n"; + +PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* self, + PyObject* args, + PyObject* kwds) { + char *string; + + if (PyArg_ParseTuple(args,"s",&string)) + { + m_propname = string; + } + + Py_INCREF(Py_None); + return Py_None; +} + +/* getType */ +char BL_ShapeActionActuator::GetType_doc[] = +"getType()\n" +"\tReturns the operation mode of the actuator.\n"; +PyObject* BL_ShapeActionActuator::PyGetType(PyObject* self, + PyObject* args, + PyObject* kwds) { + return Py_BuildValue("h", m_playtype); +} + +/* setType */ +char BL_ShapeActionActuator::SetType_doc[] = +"setType(mode)\n" +"\t - mode: Play (0), Flipper (2), LoopStop (3), LoopEnd (4) or Property (6)\n" +"\tSet the operation mode of the actuator.\n"; +PyObject* BL_ShapeActionActuator::PySetType(PyObject* self, + PyObject* args, + PyObject* kwds) { + short typeArg; + + if (!PyArg_ParseTuple(args, "h", &typeArg)) { + return NULL; + } + + switch (typeArg) { + case ACT_ACTION_PLAY: + case ACT_ACTION_FLIPPER: + case ACT_ACTION_LOOP_STOP: + case ACT_ACTION_LOOP_END: + case ACT_ACTION_FROM_PROP: + m_playtype = typeArg; + break; + default: + printf("Invalid type for action actuator: %d\n", typeArg); /* error */ + } + + Py_Return; +} + diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h new file mode 100644 index 00000000000..c4236a5208e --- /dev/null +++ b/source/gameengine/Converter/BL_ShapeActionActuator.h @@ -0,0 +1,133 @@ +/** + * $Id: BL_ShapeActionActuator.h 14444 2008-04-16 22:40:48Z hos $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BL_SHAPEACTIONACTUATOR +#define BL_SHAPEACTIONACTUATOR + +#include "GEN_HashedPtr.h" +#include "SCA_IActuator.h" +#include "MT_Point3.h" +#include + +struct Key; +class BL_ShapeActionActuator : public SCA_IActuator +{ +public: + Py_Header; + BL_ShapeActionActuator(SCA_IObject* gameobj, + const STR_String& propname, + float starttime, + float endtime, + struct bAction *action, + short playtype, + short blendin, + short priority, + float stride, + PyTypeObject* T=&Type) + : SCA_IActuator(gameobj,T), + + m_lastpos(0, 0, 0), + m_blendframe(0), + m_flag(0), + m_startframe (starttime), + m_endframe(endtime) , + m_starttime(0), + m_localtime(starttime), + m_lastUpdate(-1), + m_blendin(blendin), + m_blendstart(0), + m_stridelength(stride), + m_playtype(playtype), + m_priority(priority), + m_action(action), + m_propname(propname) + { + }; + virtual ~BL_ShapeActionActuator(); + virtual bool Update(double curtime, bool frame); + virtual CValue* GetReplica(); + virtual void ProcessReplica(); + + void SetBlendTime (float newtime); + void BlendShape(struct Key* key, float weigth); + + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetAction); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetBlendin); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetPriority); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetStart); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetEnd); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetFrame); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetProperty); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetBlendtime); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetChannel); + + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetAction); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetBlendin); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetPriority); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetStart); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetEnd); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetFrame); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetProperty); +// KX_PYMETHOD(BL_ActionActuator,GetChannel); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,GetType); + KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetType); + + virtual PyObject* _getattr(const STR_String& attr); + +protected: + + void SetStartTime(float curtime); + void SetLocalTime(float curtime); + bool ClampLocalTime(); + + MT_Point3 m_lastpos; + float m_blendframe; + int m_flag; + /** The frame this action starts */ + float m_startframe; + /** The frame this action ends */ + float m_endframe; + /** The time this action started */ + float m_starttime; + /** The current time of the action */ + float m_localtime; + + float m_lastUpdate; + float m_blendin; + float m_blendstart; + float m_stridelength; + short m_playtype; + short m_priority; + struct bAction *m_action; + STR_String m_propname; + vector m_blendshape; +}; + +#endif + diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp new file mode 100644 index 00000000000..54b1041c328 --- /dev/null +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -0,0 +1,125 @@ +/** + * $Id: BL_ShapeDeformer.cpp 14444 2008-04-16 22:40:48Z hos $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifdef WIN32 +#pragma warning (disable : 4786) +#endif //WIN32 + +#include "MEM_guardedalloc.h" +#include "BL_ShapeDeformer.h" +#include "GEN_Map.h" +#include "STR_HashedString.h" +#include "RAS_IPolygonMaterial.h" +#include "BL_SkinMeshObject.h" + +//#include "BL_ArmatureController.h" +#include "DNA_armature_types.h" +#include "DNA_action_types.h" +#include "DNA_key_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" +#include "BKE_armature.h" +#include "BKE_action.h" +#include "BKE_key.h" +#include "MT_Point3.h" + +extern "C"{ + #include "BKE_lattice.h" +} + #include "BKE_utildefines.h" + +#include "BLI_blenlib.h" +#include "BLI_arithb.h" + +#define __NLA_DEFNORMALS +//#undef __NLA_DEFNORMALS + + +BL_ShapeDeformer::~BL_ShapeDeformer() +{ +}; + +RAS_Deformer *BL_ShapeDeformer::GetReplica() +{ + BL_ShapeDeformer *result; + + result = new BL_ShapeDeformer(*this); + result->ProcessReplica(); + return result; +} + +void BL_ShapeDeformer::ProcessReplica() +{ +} + +bool BL_ShapeDeformer::Update(void) +{ + bool bShapeUpdate = false; + bool bSkinUpdate = false; + + /* See if the object shape has changed */ + if (m_lastShapeUpdate != m_gameobj->GetLastFrame()) { + /* the key coefficient have been set already, we just need to blend the keys */ + Object* blendobj = m_gameobj->GetBlendObject(); + + // make sure the vertex weight cache is in line with this object + m_pMeshObject->CheckWeightCache(blendobj); + + /* we will blend the key directly in mvert array: it is used by armature as the start position */ + do_rel_key(0, m_bmesh->totvert, m_bmesh->totvert, (char *)m_bmesh->mvert->co, m_bmesh->key, 0); + + // Don't release the weight array as in Blender, it will most likely be reusable on next frame + // The weight array are ultimately deleted when the skin mesh is destroyed + + /* Update the current frame */ + m_lastShapeUpdate=m_gameobj->GetLastFrame(); + + // As we have changed, the mesh, the skin deformer must update as well. + // This will force the update + BL_SkinDeformer::ForceUpdate(); + bShapeUpdate = true; + } + // check for armature deform + bSkinUpdate = BL_SkinDeformer::Update(); + + if (!bSkinUpdate && bShapeUpdate) { + // this means that there is no armature, we still need to copy the vertex to m_transverts + // and update the normal (was not done after shape key calculation) + + /* store verts locally */ + VerifyStorage(); + + for (int v =0; vtotvert; v++) + VECCOPY(m_transverts[v], m_bmesh->mvert[v].co); + + RecalcNormals(); + bSkinUpdate = true; + } + return bSkinUpdate; +} diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h new file mode 100644 index 00000000000..920eae86b7e --- /dev/null +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -0,0 +1,93 @@ +/** + * $Id: BL_SkinDeformer.h 14444 2008-04-16 22:40:48Z hos $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BL_SHAPEDEFORMER +#define BL_SHAPEDEFORMER + +#ifdef WIN32 +#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning +#endif //WIN32 + +#include "BL_SkinDeformer.h" +#include "BL_DeformableGameObject.h" +#include + + +class BL_ShapeDeformer : public BL_SkinDeformer +{ +public: + virtual void Relink(GEN_Map*map) + { + void **h_obj = (*map)[m_gameobj]; + if (h_obj){ + m_gameobj = (BL_DeformableGameObject*)(*h_obj); + } + else + m_gameobj=NULL; + // relink the underlying skin deformer + BL_SkinDeformer::Relink(map); + }; + BL_ShapeDeformer(BL_DeformableGameObject *gameobj, + Object *bmeshobj, + BL_SkinMeshObject *mesh) + : + BL_SkinDeformer(bmeshobj, mesh), + m_lastShapeUpdate(-1), + m_gameobj(gameobj) + { + }; + + /* this second constructor is needed for making a mesh deformable on the fly. */ + BL_ShapeDeformer(BL_DeformableGameObject *gameobj, + struct Object *bmeshobj_old, + struct Object *bmeshobj_new, + class BL_SkinMeshObject *mesh, + bool release_object, + BL_ArmatureObject* arma = NULL) + : + BL_SkinDeformer(bmeshobj_old, bmeshobj_new, mesh, release_object, arma), + m_lastShapeUpdate(-1), + m_gameobj(gameobj) + { + }; + + virtual void ProcessReplica(); + virtual RAS_Deformer *GetReplica(); + virtual ~BL_ShapeDeformer(); + + bool Update (void); + +protected: + double m_lastShapeUpdate; + BL_DeformableGameObject* m_gameobj; + +}; + +#endif + diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 0f884674c09..78fc73f21a1 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -57,6 +57,19 @@ extern "C"{ #define __NLA_DEFNORMALS //#undef __NLA_DEFNORMALS +BL_SkinDeformer::BL_SkinDeformer(struct Object *bmeshobj, + class BL_SkinMeshObject *mesh, + BL_ArmatureObject* arma) + : // + BL_MeshDeformer(bmeshobj, mesh), + m_armobj(arma), + m_lastArmaUpdate(-1), + m_defbase(&bmeshobj->defbase), + m_releaseobject(false) +{ + Mat4CpyMat4(m_obmat, bmeshobj->obmat); +}; + BL_SkinDeformer::BL_SkinDeformer( struct Object *bmeshobj_old, // Blender object that owns the new mesh struct Object *bmeshobj_new, // Blender object that owns the original mesh @@ -65,25 +78,22 @@ BL_SkinDeformer::BL_SkinDeformer( BL_ArmatureObject* arma) : BL_MeshDeformer(bmeshobj_old, mesh), m_armobj(arma), - m_lastUpdate(-1), + m_lastArmaUpdate(-1), m_defbase(&bmeshobj_old->defbase), m_releaseobject(release_object) { - Mat4CpyMat4(m_obmat, bmeshobj_old->obmat); - m_restoremat = true; // this is needed to ensure correct deformation of mesh: // the deformation is done with Blender's armature_deform_verts() function // that takes an object as parameter and not a mesh. The object matrice is used - // in the calculation, so we must force the same matrice to simulate a pure replacement of mesh - Mat4CpyMat4(bmeshobj_old->obmat, bmeshobj_new->obmat); + // in the calculation, so we must use the matrix of the original object to + // simulate a pure replacement of the mesh. + Mat4CpyMat4(m_obmat, bmeshobj_new->obmat); } BL_SkinDeformer::~BL_SkinDeformer() { if(m_releaseobject && m_armobj) m_armobj->Release(); - if (m_restoremat) - Mat4CpyMat4(m_objMesh->obmat, m_obmat); } bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) @@ -98,15 +108,13 @@ bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) MT_Point3 pt; // float co[3]; - if (!m_armobj) + if (!Update()) + // no need to update the cache return false; - Update(); - array = m_pMeshObject->GetVertexCache(mat); mvarray = m_pMeshObject->GetMVertCache(mat); diarray = m_pMeshObject->GetDIndexCache(mat); - // For each array for (i=0; iGetLastFrame()){ + if (m_armobj && m_lastArmaUpdate!=m_armobj->GetLastFrame()){ + float obmat[4][4]; // the original object matrice /* Do all of the posing necessary */ m_armobj->ApplyPose(); @@ -161,14 +170,27 @@ void BL_SkinDeformer::Update(void) for (int v =0; vtotvert; v++) VECCOPY(m_transverts[v], m_bmesh->mvert[v].co); + // save matrix first + Mat4CpyMat4(obmat, m_objMesh->obmat); + // set reference matrix + Mat4CpyMat4(m_objMesh->obmat, m_obmat); + armature_deform_verts( par_arma, m_objMesh, NULL, m_transverts, NULL, m_bmesh->totvert, ARM_DEF_VGROUP, NULL, NULL ); + + // restore matrix + Mat4CpyMat4(m_objMesh->obmat, obmat); + #ifdef __NLA_DEFNORMALS RecalcNormals(); #endif /* Update the current frame */ - m_lastUpdate=m_armobj->GetLastFrame(); + m_lastArmaUpdate=m_armobj->GetLastFrame(); + + /* indicate that the m_transverts and normals are up to date */ + return true; } + return false; } /* XXX note: I propose to drop this function */ diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h index 79f6453a25d..603e716fb1e 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.h +++ b/source/gameengine/Converter/BL_SkinDeformer.h @@ -52,27 +52,20 @@ public: // void SetArmatureController (BL_ArmatureController *cont); virtual void Relink(GEN_Map*map) { - void **h_obj = (*map)[m_armobj]; - if (h_obj){ - SetArmature( (BL_ArmatureObject*)(*h_obj) ); + if (m_armobj){ + void **h_obj = (*map)[m_armobj]; + if (h_obj){ + SetArmature( (BL_ArmatureObject*)(*h_obj) ); + } + else + m_armobj=NULL; } - else - m_armobj=NULL; } void SetArmature (class BL_ArmatureObject *armobj); BL_SkinDeformer(struct Object *bmeshobj, class BL_SkinMeshObject *mesh, - BL_ArmatureObject* arma = NULL) - : // - BL_MeshDeformer(bmeshobj, mesh), - m_armobj(arma), - m_lastUpdate(-1), - m_defbase(&bmeshobj->defbase), - m_restoremat(false), - m_releaseobject(false) - { - }; + BL_ArmatureObject* arma = NULL); /* this second constructor is needed for making a mesh deformable on the fly. */ BL_SkinDeformer(struct Object *bmeshobj_old, @@ -84,16 +77,20 @@ public: virtual void ProcessReplica(); virtual RAS_Deformer *GetReplica(); virtual ~BL_SkinDeformer(); - void Update (void); + bool Update (void); bool Apply (class RAS_IPolyMaterial *polymat); + void ForceUpdate() + { + m_lastArmaUpdate = -1.0; + }; + protected: BL_ArmatureObject* m_armobj; // Our parent object float m_time; - double m_lastUpdate; + double m_lastArmaUpdate; ListBase* m_defbase; - float m_obmat[4][4]; // the original object matrice in case of dynamic mesh replacement - bool m_restoremat; + float m_obmat[4][4]; // the reference matrix for skeleton deform bool m_releaseobject; }; diff --git a/source/gameengine/Converter/BL_SkinMeshObject.cpp b/source/gameengine/Converter/BL_SkinMeshObject.cpp index 69feb72f5dc..9d3702b53a2 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.cpp +++ b/source/gameengine/Converter/BL_SkinMeshObject.cpp @@ -150,5 +150,63 @@ void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObje } +static get_def_index(Object* ob, const char* vgroup) +{ + bDeformGroup *curdef; + int index = 0; + + for (curdef = (bDeformGroup*)ob->defbase.first; curdef; curdef=(bDeformGroup*)curdef->next, index++) + if (!strcmp(curdef->name, vgroup)) + return index; + return -1; +} + +void BL_SkinMeshObject::CheckWeightCache(Object* obj) +{ + KeyBlock *kb; + int kbindex, defindex; + MDeformVert *dvert= NULL; + int totvert, i, j; + float *weights; + + if (!m_mesh->key) + return; + + for(kbindex=0, kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next, kbindex++) + { + // first check the cases where the weight must be cleared + if (kb->vgroup[0] == 0 || + m_mesh->dvert == NULL || + (defindex = get_def_index(obj, kb->vgroup)) == -1) { + if (kb->weights) { + MEM_freeN(kb->weights); + kb->weights = NULL; + } + m_cacheWeightIndex[kbindex] = -1; + } else if (m_cacheWeightIndex[kbindex] != defindex) { + // a weight array is required but the cache is not matching + if (kb->weights) { + MEM_freeN(kb->weights); + kb->weights = NULL; + } + + dvert= m_mesh->dvert; + totvert= m_mesh->totvert; + + weights= (float*)MEM_callocN(totvert*sizeof(float), "weights"); + + for (i=0; i < totvert; i++, dvert++) { + for(j=0; jtotweight; j++) { + if (dvert->dw[j].def_nr == defindex) { + weights[i]= dvert->dw[j].weight; + break; + } + } + } + kb->weights = weights; + m_cacheWeightIndex[kbindex] = defindex; + } + } +} diff --git a/source/gameengine/Converter/BL_SkinMeshObject.h b/source/gameengine/Converter/BL_SkinMeshObject.h index 2422d4cd4c9..cc2b8de600e 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.h +++ b/source/gameengine/Converter/BL_SkinMeshObject.h @@ -33,7 +33,7 @@ #ifdef WIN32 #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning #endif //WIN32 - +#include "MEM_guardedalloc.h" #include "RAS_MeshObject.h" #include "RAS_Deformer.h" #include "RAS_IPolygonMaterial.h" @@ -41,6 +41,7 @@ #include "BL_MeshDeformer.h" #include "DNA_mesh_types.h" +#include "DNA_key_types.h" #include "DNA_meshdata_types.h" typedef vector BL_MVertArray; @@ -105,6 +106,8 @@ class BL_SkinMeshObject : public RAS_MeshObject } protected: + vector m_cacheWeightIndex; + public: struct BL_MDVertMap { RAS_IPolyMaterial *mat; int index; }; vector > m_mvert_to_dvert_mapping; @@ -113,10 +116,33 @@ public: // void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,class RAS_BucketManager* bucketmgr); int FindVertexArray(int numverts,RAS_IPolyMaterial* polymat); - BL_SkinMeshObject(int lightlayer) : RAS_MeshObject (lightlayer) - { m_class = 1;}; + BL_SkinMeshObject(Mesh* mesh, int lightlayer) : RAS_MeshObject (mesh, lightlayer) + { + m_class = 1; + if (m_mesh && m_mesh->key) + { + KeyBlock *kb; + int count=0; + // initialize weight cache for shape objects + // count how many keys in this mesh + for(kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next) + count++; + m_cacheWeightIndex.resize(count,-1); + } + }; - virtual ~BL_SkinMeshObject(){ + virtual ~BL_SkinMeshObject() + { + if (m_mesh && m_mesh->key) + { + KeyBlock *kb; + // remove the weight cache to avoid memory leak + for(kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next) { + if(kb->weights) + MEM_freeN(kb->weights); + kb->weights= NULL; + } + } }; const vecIndexArrays& GetDIndexCache (RAS_IPolyMaterial* mat) @@ -154,6 +180,8 @@ public: return index; } + // for shape keys, + void CheckWeightCache(struct Object* obj); }; diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 6b594e2e70b..f219c3a1472 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -84,6 +84,7 @@ #include "DNA_actuator_types.h" #include "DNA_packedFile_types.h" #include "BL_ActionActuator.h" +#include "BL_ShapeActionActuator.h" /* end of blender include block */ #include "BL_BlenderDataConversion.h" @@ -195,6 +196,30 @@ void BL_ConvertActuators(char* maggiename, else printf ("Discarded action actuator from non-armature object [%s]\n", blenderobject->id.name+2); } + case ACT_SHAPEACTION: + { + if (blenderobject->type==OB_MESH){ + bActionActuator* actact = (bActionActuator*) bact->data; + STR_String propname = (actact->name ? actact->name : ""); + + BL_ShapeActionActuator* tmpbaseact = new BL_ShapeActionActuator( + gameobj, + propname, + actact->sta, + actact->end, + actact->act, + actact->type, // + 1, because Blender starts to count at zero, + actact->blendin, + actact->priority, + actact->stridelength + // Ketsji at 1, because zero is reserved for "NoDef" + ); + baseact= tmpbaseact; + break; + } + else + printf ("Discarded shape action actuator from non-mesh object [%s]\n", blenderobject->id.name+2); + } case ACT_IPO: { bIpoActuator* ipoact = (bIpoActuator*) bact->data; diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index 4b0fc741b8f..e8251e0ceaa 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -120,7 +120,7 @@ public: virtual int GetGameObjectType() {return -1;} typedef enum ObjectTypes { - OBJ_ARMATURE=0 + OBJ_ARMATURE=0, }ObjectTypes; }; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5698c106b17..88b936aafd5 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -78,6 +78,7 @@ KX_GameObject::KX_GameObject( m_bSuspendDynamics(false), m_bUseObjectColor(false), m_bIsNegativeScaling(false), + m_pBlenderObject(NULL), m_bVisible(true), m_pPhysicsController1(NULL), m_pPhysicsEnvironment(NULL), diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 8a90ec1463a..63a660617c4 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -55,7 +55,7 @@ struct KX_ClientObjectInfo; class RAS_MeshObject; class KX_IPhysicsController; class PHY_IPhysicsEnvironment; - +struct Object; /** * KX_GameObject is the main class for dynamic objects. @@ -71,6 +71,7 @@ protected: STR_String m_text; int m_layer; std::vector m_meshes; + struct Object* m_pBlenderObject; bool m_bSuspendDynamics; bool m_bUseObjectColor; @@ -359,6 +360,20 @@ public: return m_pSGNode; } + /** + * @section blender object accessor functions. + */ + + struct Object* GetBlenderObject( ) + { + return m_pBlenderObject; + } + + void SetBlenderObject( struct Object* obj) + { + m_pBlenderObject = obj; + } + /** * Set the Scene graph node for this game object. * warning - it is your responsibility to make sure diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index e4054e07475..fff33ca82fd 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -74,7 +74,7 @@ #include "KX_IPhysicsController.h" #include "KX_BlenderSceneConverter.h" -#include "BL_SkinDeformer.h" +#include "BL_ShapeDeformer.h" #include "BL_DeformableGameObject.h" // to get USE_BULLET! @@ -809,67 +809,80 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) -void KX_Scene::ReplaceMesh(class CValue* gameobj,void* meshobj) +void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) { - KX_GameObject* newobj = static_cast(gameobj); + KX_GameObject* gameobj = static_cast(obj); RAS_MeshObject* mesh = static_cast(meshobj); - const STR_String origMeshName = newobj->GetMesh(0)->GetName(); - - if( !newobj || !mesh ) + if(!gameobj || !mesh) { std::cout << "warning: invalid object, mesh will not be replaced" << std::endl; return; } - newobj->RemoveMeshes(); - newobj->AddMesh(mesh); - - bool isDeformer = (newobj->m_isDeformable && mesh->m_class == 1); - if(isDeformer) - { - /* FindBlendObjByGameObj() can return 0... - In the case of 0 here, - the replicated object that is calling this function - is some how not in the map. (which is strange because it's added) - So we will search the map by the first mesh name - to try to locate it there. If its still not found - spit some message rather than crash - */ - Object* blendobj = static_cast(m_logicmgr->FindBlendObjByGameObj(newobj)); - Object* oldblendobj = static_cast(m_logicmgr->FindBlendObjByGameMeshName(mesh->GetName())); + gameobj->RemoveMeshes(); + gameobj->AddMesh(mesh); - bool parSkin = blendobj && blendobj->parent && blendobj->parent->type == OB_ARMATURE && blendobj->partype==PARSKEL; - bool releaseParent = true; - KX_GameObject* parentobj = newobj->GetParent(); - - - // lookup by mesh name if blendobj is 0 - if( !blendobj && parentobj ) + if (gameobj->m_isDeformable) + { + BL_DeformableGameObject* newobj = static_cast( gameobj ); + + if (newobj->m_pDeformer) { - blendobj = static_cast(m_logicmgr->FindBlendObjByGameMeshName(origMeshName)); - - // replace the mesh on the parent armature - if( blendobj ) - parSkin = parentobj->GetGameObjectType() == SCA_IObject::OBJ_ARMATURE; - - // can't do it - else - std::cout << "warning: child object for " << parentobj->GetName().ReadPtr() - << " not found, and can't create!" << std::endl; + delete newobj->m_pDeformer; + newobj->m_pDeformer = NULL; } - if( blendobj && oldblendobj ) + if (mesh->m_class == 1) { - isDeformer = (static_cast(blendobj->data)->dvert != 0); - BL_DeformableGameObject* deformIter =0; + // we must create a new deformer but which one? + KX_GameObject* parentobj = newobj->GetParent(); + // this always return the original game object (also for replicate) + Object* blendobj = newobj->GetBlenderObject(); + // object that owns the new mesh + Object* oldblendobj = static_cast(m_logicmgr->FindBlendObjByGameMeshName(mesh->GetName())); + Mesh* blendmesh = mesh->GetMesh(); - // armature parent - if( parSkin && isDeformer ) + bool bHasShapeKey = blendmesh->key != NULL && blendmesh->key->type==KEY_RELATIVE; + bool bHasDvert = blendmesh->dvert != NULL; + bool bHasArmature = + parentobj && // current parent is armature + parentobj->GetGameObjectType() == SCA_IObject::OBJ_ARMATURE && + oldblendobj && // needed for mesh deform + blendobj->parent && // original object had armature (not sure this test is needed) + blendobj->parent->type == OB_ARMATURE && + blendobj->partype==PARSKEL && + blendmesh->dvert!=NULL; // mesh has vertex group + bool releaseParent = true; + + if (bHasShapeKey) + { + BL_ShapeDeformer* shapeDeformer; + if (bHasArmature) + { + shapeDeformer = new BL_ShapeDeformer( + newobj, + oldblendobj, blendobj, + static_cast(mesh), + true, + static_cast( parentobj ) + ); + releaseParent= false; + } + else + { + shapeDeformer = new BL_ShapeDeformer( + newobj, + oldblendobj, blendobj, + static_cast(mesh), + false, + NULL + ); + } + newobj->m_pDeformer = shapeDeformer; + } + else if (bHasArmature) { - deformIter = static_cast( newobj ); - delete deformIter->m_pDeformer; - BL_SkinDeformer* skinDeformer = new BL_SkinDeformer( oldblendobj, blendobj, static_cast(mesh), @@ -877,27 +890,22 @@ void KX_Scene::ReplaceMesh(class CValue* gameobj,void* meshobj) static_cast( parentobj ) ); releaseParent= false; - deformIter->m_pDeformer = skinDeformer; + newobj->m_pDeformer = skinDeformer; } - - // normal deformer - if( !parSkin && isDeformer) + else if (bHasDvert) { - deformIter = static_cast( newobj ); - delete deformIter->m_pDeformer; - BL_MeshDeformer* meshdeformer = new BL_MeshDeformer( oldblendobj, static_cast(mesh) ); - - deformIter->m_pDeformer = meshdeformer; + newobj->m_pDeformer = meshdeformer; } + + // release parent reference if its not being used + if( releaseParent && parentobj) + parentobj->Release(); } - // release parent reference if its not being used - if( releaseParent && parentobj) - parentobj->Release(); } - newobj->Bucketize(); + gameobj->Bucketize(); } diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h index bea68e203a9..4e8484ab880 100644 --- a/source/gameengine/Rasterizer/RAS_Deformer.h +++ b/source/gameengine/Rasterizer/RAS_Deformer.h @@ -43,7 +43,7 @@ public: virtual ~RAS_Deformer(){}; virtual void Relink(GEN_Map*map)=0; virtual bool Apply(class RAS_IPolyMaterial *polymat)=0; - virtual void Update(void)=0; + virtual bool Update(void)=0; virtual RAS_Deformer *GetReplica()=0; protected: class RAS_MeshObject *m_pMesh; diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index db74110ceea..d7ab88a6b06 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -63,12 +63,13 @@ KX_ArrayOptimizer::~KX_ArrayOptimizer() -RAS_MeshObject::RAS_MeshObject(int lightlayer) +RAS_MeshObject::RAS_MeshObject(Mesh* mesh, int lightlayer) : m_bModified(true), m_lightlayer(lightlayer), m_zsort(false), m_MeshMod(true), - m_class(0) + m_class(0), + m_mesh(mesh) { } diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h index d8e7a3391aa..d9aa133efb2 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.h +++ b/source/gameengine/Rasterizer/RAS_MeshObject.h @@ -43,6 +43,7 @@ #include "GEN_HashedPtr.h" +struct Mesh; /** * This class holds an array of vertices and indicies. */ @@ -144,9 +145,10 @@ protected: GEN_Map m_matVertexArrayS; RAS_MaterialBucket::Set m_materials; + Mesh* m_mesh; public: // for now, meshes need to be in a certain layer (to avoid sorting on lights in realtime) - RAS_MeshObject(int lightlayer); + RAS_MeshObject(Mesh* mesh, int lightlayer); virtual ~RAS_MeshObject(); vector m_sortedMaterials; @@ -258,6 +260,7 @@ public: bool MeshModified(); void SetMeshModified(bool v){m_MeshMod = v;} + Mesh* GetMesh() { return m_mesh; } }; From 48c7c9d957896b0f3faa10c72cc86a55b5c39b88 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 18 Jun 2008 07:03:47 +0000 Subject: [PATCH 260/430] Forgot to set Id property on new shape action files --- source/gameengine/Converter/BL_ShapeActionActuator.cpp | 2 +- source/gameengine/Converter/BL_ShapeActionActuator.h | 2 +- source/gameengine/Converter/BL_ShapeDeformer.cpp | 2 +- source/gameengine/Converter/BL_ShapeDeformer.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index 3e1369e1e9f..58d46d76e5b 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -1,5 +1,5 @@ /** -* $Id: BL_ShapeActionActuator.cpp 14444 2008-04-16 22:40:48Z hos $ +* $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h index c4236a5208e..434a62a1233 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.h +++ b/source/gameengine/Converter/BL_ShapeActionActuator.h @@ -1,5 +1,5 @@ /** - * $Id: BL_ShapeActionActuator.h 14444 2008-04-16 22:40:48Z hos $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp index 54b1041c328..b8a589c295a 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.cpp +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -1,5 +1,5 @@ /** - * $Id: BL_ShapeDeformer.cpp 14444 2008-04-16 22:40:48Z hos $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h index 920eae86b7e..9bbdde3fb2c 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.h +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -1,5 +1,5 @@ /** - * $Id: BL_SkinDeformer.h 14444 2008-04-16 22:40:48Z hos $ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * From d39154bb50571c07fa5f2425261f123034b0b1c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Jun 2008 09:06:51 +0000 Subject: [PATCH 261/430] bugfix, BGE, use vec.safe_normalized() rather then vec.normalized() because in some cases the ray_cast sensor could crash blender. --- source/gameengine/Ketsji/KX_RayCast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/Ketsji/KX_RayCast.cpp b/source/gameengine/Ketsji/KX_RayCast.cpp index b88741625b6..89e2d645d54 100644 --- a/source/gameengine/Ketsji/KX_RayCast.cpp +++ b/source/gameengine/Ketsji/KX_RayCast.cpp @@ -49,7 +49,7 @@ bool KX_RayCast::RayTest(KX_IPhysicsController* ignore_controller, PHY_IPhysicsE // // returns true if an object was found, false if not. MT_Point3 frompoint(_frompoint); - const MT_Vector3 todir( (topoint - frompoint).normalized() ); + const MT_Vector3 todir( (topoint - frompoint).safe_normalized() ); PHY_IPhysicsController* hit_controller; PHY__Vector3 phy_pos; From 5cd4b6ac90da5e01da3d758480a404c1562cb792 Mon Sep 17 00:00:00 2001 From: Jiri Hnidek Date: Wed, 18 Jun 2008 09:52:31 +0000 Subject: [PATCH 262/430] Small fix to be able to compile Blender. --- source/gameengine/Converter/BL_SkinMeshObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/Converter/BL_SkinMeshObject.cpp b/source/gameengine/Converter/BL_SkinMeshObject.cpp index 9d3702b53a2..49492923c7c 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.cpp +++ b/source/gameengine/Converter/BL_SkinMeshObject.cpp @@ -150,7 +150,7 @@ void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObje } -static get_def_index(Object* ob, const char* vgroup) +static int get_def_index(Object* ob, const char* vgroup) { bDeformGroup *curdef; int index = 0; From 3f488f4d7092f8636a7af7860bd9c134f92baecf Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 18 Jun 2008 10:30:14 +0000 Subject: [PATCH 263/430] * Fix for a crash in game engine vertex array drawing with texfaces. * For 2D filters, don't require opengl 2.0 but just the extensions, so it works on computers without full 2.0 support too. * In debug mode, don't print memory statistics for preview render. --- .../render/intern/source/convertblender.c | 2 +- .../Rasterizer/RAS_2DFilterManager.cpp | 17 ++++++---------- .../RAS_VAOpenGLRasterizer.cpp | 20 +++++++++++++++++-- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 89a0a5ba7cb..796a99ca796 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -4434,7 +4434,7 @@ void RE_Database_Free(Render *re) LampRen *lar; /* statistics for debugging render memory usage */ - if(G.f & G_DEBUG) { + if((G.f & G_DEBUG) && (G.rendering)) { if((re->r.scemode & R_PREVIEWBUTS)==0) { BKE_image_print_memlist(); MEM_printmemlist_stats(); diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 291890a8dde..e9ab4ccca8d 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -54,11 +54,13 @@ RAS_2DFilterManager::RAS_2DFilterManager(): -texturewidth(-1), textureheight(-1), +texname(-1), texturewidth(-1), textureheight(-1), canvaswidth(-1), canvasheight(-1), -numberoffilters(0),texname(-1) +numberoffilters(0) { - isshadersupported = GLEW_VERSION_2_0; + isshadersupported = GLEW_ARB_shader_objects && + GLEW_ARB_fragment_shader && GLEW_ARB_multitexture; + if(!isshadersupported) { std::cout<<"shaders not supported!" << std::endl; @@ -81,7 +83,6 @@ RAS_2DFilterManager::~RAS_2DFilterManager() unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) { GLuint program = 0; -#if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) GLuint fShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER); GLint success; @@ -117,7 +118,7 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) std::cout << "2dFilters - Shader program validation error" << std::endl; return 0; } -#endif + return program; } @@ -151,7 +152,6 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(int filtermode) void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) { -#if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) GLint uniformLoc; glUseProgramObjectARB(shaderprogram); uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); @@ -178,14 +178,11 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) { glUniform1fARB(uniformLoc,textureheight); } -#endif } void RAS_2DFilterManager::EndShaderProgram() { -#if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) glUseProgramObjectARB(0); -#endif } void RAS_2DFilterManager::SetupTexture() @@ -295,7 +292,6 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str { if(!isshadersupported) return; -#if defined(GL_ARB_shader_objects) && defined(WITH_GLEXT) if(pass<0 || pass>=MAX_RENDER_PASS) return; @@ -336,5 +332,4 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str m_filters[pass] = CreateShaderProgram(mode); m_enabled[pass] = 1; } -#endif } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp index 67c72aacdcf..ce76318c2ce 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp @@ -142,6 +142,9 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays glColor3d(0,0,0); } + EnableTextures(false); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + // use glDrawElements to draw each vertexarray for (vt=0;vt Date: Wed, 18 Jun 2008 15:22:42 +0000 Subject: [PATCH 264/430] Patch #8882 - Falloff in the wave modifier This patch adds the ability to specify a falloff radius in the Wave modifier. Currently only linear falloff is supported. Thanks to Michael Fox for the patch! --- source/blender/blenkernel/intern/modifier.c | 38 ++++++++++++++++---- source/blender/makesdna/DNA_modifier_types.h | 5 +-- source/blender/src/buttons_editing.c | 6 ++-- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 861534deb80..eceab9f32d8 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4525,13 +4525,13 @@ static void castModifier_deformVertsEM( /* Wave */ -static void waveModifier_initData(ModifierData *md) +static void waveModifier_initData(ModifierData *md) { WaveModifierData *wmd = (WaveModifierData*) md; // whadya know, moved here from Iraq - + wmd->flag |= (MOD_WAVE_X | MOD_WAVE_Y | MOD_WAVE_CYCL | MOD_WAVE_NORM_X | MOD_WAVE_NORM_Y | MOD_WAVE_NORM_Z); - + wmd->objectcenter = NULL; wmd->texture = NULL; wmd->map_object = NULL; @@ -4541,6 +4541,7 @@ static void waveModifier_initData(ModifierData *md) wmd->narrow= 1.5f; wmd->lifetime= 0.0f; wmd->damp= 10.0f; + wmd->falloff= 0.0f; wmd->texmapping = MOD_WAV_MAP_LOCAL; wmd->defgrp_name[0] = 0; } @@ -4560,6 +4561,7 @@ static void waveModifier_copyData(ModifierData *md, ModifierData *target) twmd->starty = wmd->starty; twmd->timeoffs = wmd->timeoffs; twmd->width = wmd->width; + twmd->falloff = wmd->falloff; twmd->objectcenter = wmd->objectcenter; twmd->texture = wmd->texture; twmd->map_object = wmd->map_object; @@ -4770,7 +4772,7 @@ static void waveModifier_do( if(x > wmd->lifetime) { lifefac = x - wmd->lifetime; - + if(lifefac > wmd->damp) lifefac = 0.0; else lifefac = (float)(wmd->height * (1.0 - sqrt(lifefac / wmd->damp))); @@ -4791,6 +4793,8 @@ static void waveModifier_do( float x = co[0] - wmd->startx; float y = co[1] - wmd->starty; float amplit= 0.0f; + float dist = 0.0f; + float falloff_fac = 0.0f; TexResult texres; MDeformWeight *def_weight = NULL; @@ -4813,14 +4817,29 @@ static void waveModifier_do( get_texture_value(wmd->texture, tex_co[i], &texres); } + /*get dist*/ + if(wmd->flag & MOD_WAVE_X) { + if(wmd->flag & MOD_WAVE_Y){ + dist = (float)sqrt(x*x + y*y); + } + else{ + dist = fabs(x); + } + } + else if(wmd->flag & MOD_WAVE_Y) { + dist = fabs(y); + } + + falloff_fac = (1.0-(dist / wmd->falloff)); + CLAMP(falloff_fac,0,1); if(wmd->flag & MOD_WAVE_X) { if(wmd->flag & MOD_WAVE_Y) amplit = (float)sqrt(x*x + y*y); else amplit = x; } - else if(wmd->flag & MOD_WAVE_Y) + else if(wmd->flag & MOD_WAVE_Y) amplit= y; - + /* this way it makes nice circles */ amplit -= (ctime - wmd->timeoffs) * wmd->speed; @@ -4833,12 +4852,19 @@ static void waveModifier_do( if(amplit > -wmd->width && amplit < wmd->width) { amplit = amplit * wmd->narrow; amplit = (float)(1.0 / exp(amplit * amplit) - minfac); + + /*apply texture*/ if(wmd->texture) amplit = amplit * texres.tin; + /*apply weight*/ if(def_weight) amplit = amplit * def_weight->weight; + /*apply falloff*/ + if (wmd->falloff > 0) + amplit = amplit * falloff_fac; + if(mvert) { /* move along normals */ if(wmd->flag & MOD_WAVE_NORM_X) { diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 8c1df1450e8..a44d9793062 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -329,13 +329,14 @@ typedef struct WaveModifierData { short flag, pad; float startx, starty, height, width; - float narrow, speed, damp; + float narrow, speed, damp, falloff; int texmapping, uvlayer_tmp; char uvlayer_name[32]; - + float timeoffs, lifetime; + float pad1; } WaveModifierData; typedef struct ArmatureModifierData { diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index caa1f2195e2..88b72e5f514 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1792,7 +1792,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco height = 143; } else if (md->type==eModifierType_Wave) { WaveModifierData *wmd = (WaveModifierData *)md; - height = 294; + height = 315; if(wmd->texmapping == MOD_WAV_MAP_OBJECT || wmd->texmapping == MOD_WAV_MAP_UV) height += 19; @@ -2154,6 +2154,8 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco uiDefButF(block, NUM, B_MODIFIER_RECALC, "Time end:", lx,(cy-=19),buttonWidth,19, &wmd->timeoffs, -MAXFRAMEF, MAXFRAMEF, 100, 0, "Specify ending frame of the wave"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Lifetime:", lx,(cy-=19),buttonWidth,19, &wmd->lifetime, -MAXFRAMEF, MAXFRAMEF, 100, 0, "Specify the lifespan of the wave"); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Damptime:", lx,(cy-=19),buttonWidth,19, &wmd->damp, -MAXFRAMEF, MAXFRAMEF, 100, 0, "Specify the dampingtime of the wave"); + uiDefButF(block, NUM, B_MODIFIER_RECALC, "Falloff:", lx,(cy-=19),buttonWidth,19, &wmd->falloff, 0, 100, 100, 0, "Specify the falloff radius of the waves"); + cy -= 9; uiBlockBeginAlign(block); uiDefButF(block, NUM, B_MODIFIER_RECALC, "Sta x:", lx,(cy-=19),113,19, &wmd->startx, -100.0, 100.0, 100, 0, "Starting position for the X axis"); @@ -2190,7 +2192,7 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco &wmd->map_object, "Object to get texture coordinates from"); } - cy -= 9; + cy -= 9; uiBlockBeginAlign(block); uiDefButF(block, NUMSLI, B_MODIFIER_RECALC, "Speed:", lx,(cy-=19),220,19, &wmd->speed, -2.0, 2.0, 0, 0, "Specify the wave speed"); uiDefButF(block, NUMSLI, B_MODIFIER_RECALC, "Height:", lx,(cy-=19),220,19, &wmd->height, -2.0, 2.0, 0, 0, "Specify the amplitude of the wave"); From 1c1f81914c37d3021fe7555277523bf23385add0 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 18 Jun 2008 17:13:33 +0000 Subject: [PATCH 265/430] == VRML97 export == Patch #10569 from Michalis Kamburelis (sorry for the delay). This patch adds a popup menu that lets the user choose whether they want to export selected, whether thay wanted to export compressed, and whether they want to export the file from blender's "Z up" coordinates to VRML's "Y up". I'm not too crazy about the caching to disk of these options via GetRegistry/SetRegistry, but since this seems to occur in many of the other export scripts I'll leave it as is. --- release/scripts/vrml97_export.py | 72 ++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py index eb3be80c99c..f66f2bc6136 100644 --- a/release/scripts/vrml97_export.py +++ b/release/scripts/vrml97_export.py @@ -3,9 +3,6 @@ Name: 'VRML97 (.wrl)...' Blender: 241 Group: 'Export' -Submenu: 'All Objects...' all -Submenu: 'All Objects compressed...' comp -Submenu: 'Selected Objects...' selected Tooltip: 'Export to VRML97 file (.wrl)' """ @@ -55,7 +52,7 @@ want to export only selected or all relevant objects. import Blender from Blender import Object, Mesh, Lamp, Draw, BGL, \ - Image, Text, sys, Mathutils + Image, Text, sys, Mathutils, Registry from Blender.Scene import Render import math @@ -70,8 +67,9 @@ worldmat = Blender.Texture.Get() filename = Blender.Get('filename') _safeOverwrite = True extension = '' -ARG='' +# Matrices below are used only when export_rotate_z_to_y.val: +# # Blender is Z up, VRML is Y up, both are right hand coordinate # systems, so to go from Blender coords to VRML coords we rotate # by 90 degrees around the X axis. In matrix notation, we have a @@ -633,8 +631,9 @@ class VRML2Export: meshVertexList = me.verts for vertex in meshVertexList: - blenvert = Mathutils.Vector(vertex.co) - vrmlvert = M_blen2vrml * blenvert + vrmlvert = blenvert = Mathutils.Vector(vertex.co) + if export_rotate_z_to_y.val: + vrmlvert = M_blen2vrml * vrmlvert self.writeUnindented("%s %s %s\n " % \ (vrmlvert[0], \ vrmlvert[1], \ @@ -1016,7 +1015,10 @@ class VRML2Export: return ob_matrix = Mathutils.Matrix(ob.getMatrix('worldspace')) - matrix = M_blen2vrml * ob_matrix * M_vrml2blen + if export_rotate_z_to_y.val: + matrix = M_blen2vrml * ob_matrix * M_vrml2blen + else: + matrix = ob_matrix e = matrix.rotationPart().toEuler() v = matrix.translationPart() @@ -1089,7 +1091,7 @@ class VRML2Export: self.writeFog() self.proto = 0 allObj = [] - if ARG == 'selected': + if export_selection_only.val: allObj = list(scene.objects.context) else: allObj = list(scene.objects) @@ -1098,7 +1100,7 @@ class VRML2Export: for thisObj in allObj: self.writeObject(thisObj) - if ARG != 'selected': + if not export_selection_only.val: self.writeScript() self.cleanup() @@ -1213,26 +1215,54 @@ def select_file(filename): wrlexport=VRML2Export(filename) wrlexport.export(scene, world, worldmat) +######################################################### +# UI and Registry utilities +######################################################### + +export_selection_only = Draw.Create(0) +export_rotate_z_to_y = Draw.Create(1) +export_compressed = Draw.Create(0) + +def save_to_registry(): + d = {} + d['selection_only'] = export_selection_only.val + d['rotate_z_to_y'] = export_rotate_z_to_y.val + d['compressed'] = export_compressed.val + Registry.SetKey('vrml97_export', d, True) + +def load_from_registry(): + d = Registry.GetKey('vrml97_export', True) + if d: + try: + export_selection_only.val = d['selection_only'] + export_rotate_z_to_y.val = d['rotate_z_to_y'] + export_compressed.val = d['compressed'] + except: save_to_registry() # If data is not valid, rewrite it. + +def show_popup(): + pup_block = [ + ('Selection Only', export_selection_only, 'Only export objects in visible selection. Else export whole scene.'), + ('Rotate +Z to +Y', export_rotate_z_to_y, 'Rotate such that +Z axis (Blender up) becomes +Y (VRML up).'), + ('Compress', export_compressed, 'Generate a .wrz file (normal VRML compressed by gzip).') + ] + return Draw.PupBlock('Export VRML 97...', pup_block) ######################################################### # main routine ######################################################### -try: - ARG = __script__['arg'] # user selected argument -except: - print "older version" +load_from_registry() -if Blender.Get('version') < 235: - print "Warning: VRML97 export failed, wrong blender version!" - print " You aren't running blender version 2.35 or greater" - print " download a newer version from http://blender3d.org/" -else: - if ARG == 'comp': +# Note that show_popup must be done before Blender.Window.FileSelector, +# because export_compressed affects the suggested extension of resulting +# file. + +if show_popup(): + save_to_registry() + if export_compressed.val: extension=".wrz" from gzip import * else: extension=".wrl" Blender.Window.FileSelector(select_file, "Export VRML97", \ sys.makename(ext=extension)) - From 4ed60f45759a930412f7d480a635f688e32627c3 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 18 Jun 2008 19:58:05 +0000 Subject: [PATCH 266/430] == VRML97 export == Don't export vertex colors if a mesh doesn't have any (even if a texface has 'shared cols' set). --- release/scripts/vrml97_export.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py index f66f2bc6136..80810dddf75 100644 --- a/release/scripts/vrml97_export.py +++ b/release/scripts/vrml97_export.py @@ -454,6 +454,8 @@ class VRML2Export: if mat: if (mat.mode & Blender.Material.Modes['VCOL_PAINT']): self.vcolors = 1 + else: + self.vcolors = 0 # check if object is wireframe only if ob.drawType == Blender.Object.DrawTypes.WIRE: From fd8e873e012072011846b34a233d149ca5d3bb80 Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 18 Jun 2008 21:16:29 +0000 Subject: [PATCH 267/430] == VRML97 exporter == Faulty indentation of a line sometimes caused a bunch of empty lines to be printed into the TextureCoordinate and texCoodIndex fields (benign error, just ugly). --- release/scripts/vrml97_export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/scripts/vrml97_export.py b/release/scripts/vrml97_export.py index 80810dddf75..b28c7f5bbdc 100644 --- a/release/scripts/vrml97_export.py +++ b/release/scripts/vrml97_export.py @@ -731,8 +731,8 @@ class VRML2Export: round(uv[1], self.tp)) j=j+1 indexStr += "-1" - texIndexList.append(indexStr) - texCoordList.append(coordStr) + texIndexList.append(indexStr) + texCoordList.append(coordStr) self.writeIndented("texCoord TextureCoordinate {\n", 1) self.writeIndented("point [\n", 1) From df8a3882c6dbaa201c586419d9720162c4805fdf Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 18 Jun 2008 21:22:17 +0000 Subject: [PATCH 268/430] BGE patch #13625: getLinearVelocity() rewrite to use only vector and matrix operations --- source/gameengine/Ketsji/KX_GameObject.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 88b936aafd5..eaa6564ba84 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -646,8 +646,8 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) { - MT_Vector3 velocity(0.0,0.0,0.0); - MT_Matrix3x3 ori, locvel; + MT_Vector3 velocity(0.0,0.0,0.0), locvel; + MT_Matrix3x3 ori; int i, j; if (m_pPhysicsController1) { @@ -657,11 +657,8 @@ MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) { ori = GetSGNode()->GetWorldOrientation(); - for(i=0; i < 3; i++) - for(j=0; j < 3; j++) - locvel[i][j]= velocity[i]*ori[i][j]; - for(i=0; i < 3; i++) - velocity[i] = locvel[0][i] + locvel[1][i] + locvel[2][i]; + locvel = velocity * ori; + return locvel; } } return velocity; From d6c8d2f701b9c2adb0707e2c46e79c9d3d144d9d Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Thu, 19 Jun 2008 13:41:06 +0000 Subject: [PATCH 269/430] Just make gcc compiler happy (stupid harmless warning) --- source/blender/src/transform_snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 405b512bb5d..295cfa4574c 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -902,7 +902,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta if (test == 1) { MVert *verts = dm->getVertArray(dm); MFace *faces = dm->getFaceArray(dm); - int *index_array; + int *index_array = NULL; int index = 0; int i; From de7619991c73bdc93294c8ff892e9df92e0f681d Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Thu, 19 Jun 2008 14:40:46 +0000 Subject: [PATCH 270/430] BGE bug fix for new shape action: mesh with multiple materials did not deform properly --- source/gameengine/Converter/BL_ShapeDeformer.cpp | 2 ++ source/gameengine/Converter/BL_SkinDeformer.cpp | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp index b8a589c295a..3ae634905b9 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.cpp +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -118,7 +118,9 @@ bool BL_ShapeDeformer::Update(void) for (int v =0; vtotvert; v++) VECCOPY(m_transverts[v], m_bmesh->mvert[v].co); +#ifdef __NLA_DEFNORMALS RecalcNormals(); +#endif bSkinUpdate = true; } return bSkinUpdate; diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 78fc73f21a1..1015221c392 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -108,9 +108,7 @@ bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) MT_Point3 pt; // float co[3]; - if (!Update()) - // no need to update the cache - return false; + Update(); array = m_pMeshObject->GetVertexCache(mat); mvarray = m_pMeshObject->GetMVertCache(mat); From a1e78a0cca624061929eb3bae4420be5c16fd540 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 20 Jun 2008 20:54:29 +0000 Subject: [PATCH 271/430] * Documented that get/setOrientation use an inverted rotation matrix * OB prefix is needed when specifying the object for the Message Actuator, this is very bad since other object fields in the BGE dont need this prefix - a real fix would need do_versions to keep old files running. * RotationMatrix was all nans if the rotation vector axis was 0,0,0, Changed so in this case just return a matrix that doesn't rotate anything, spent some angry hours to find these issues, maybe this will save others the hassle ;) --- source/blender/python/api2_2x/Mathutils.c | 49 +++++++++++++---------- source/blender/src/buttons_logic.c | 2 +- source/gameengine/PyDoc/KX_GameObject.py | 4 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/source/blender/python/api2_2x/Mathutils.c b/source/blender/python/api2_2x/Mathutils.c index e63fc5ef38f..87ac3e3e6ba 100644 --- a/source/blender/python/api2_2x/Mathutils.c +++ b/source/blender/python/api2_2x/Mathutils.c @@ -725,28 +725,33 @@ PyObject *M_Mathutils_RotationMatrix(PyObject * self, PyObject * args) vec->vec[0] /= norm; vec->vec[1] /= norm; vec->vec[2] /= norm; - - //create matrix - cosAngle = (float) cos(angle); - sinAngle = (float) sin(angle); - mat[0] = ((vec->vec[0] * vec->vec[0]) * (1 - cosAngle)) + - cosAngle; - mat[1] = ((vec->vec[0] * vec->vec[1]) * (1 - cosAngle)) + - (vec->vec[2] * sinAngle); - mat[2] = ((vec->vec[0] * vec->vec[2]) * (1 - cosAngle)) - - (vec->vec[1] * sinAngle); - mat[3] = ((vec->vec[0] * vec->vec[1]) * (1 - cosAngle)) - - (vec->vec[2] * sinAngle); - mat[4] = ((vec->vec[1] * vec->vec[1]) * (1 - cosAngle)) + - cosAngle; - mat[5] = ((vec->vec[1] * vec->vec[2]) * (1 - cosAngle)) + - (vec->vec[0] * sinAngle); - mat[6] = ((vec->vec[0] * vec->vec[2]) * (1 - cosAngle)) + - (vec->vec[1] * sinAngle); - mat[7] = ((vec->vec[1] * vec->vec[2]) * (1 - cosAngle)) - - (vec->vec[0] * sinAngle); - mat[8] = ((vec->vec[2] * vec->vec[2]) * (1 - cosAngle)) + - cosAngle; + + if (isnan(vec->vec[0]) || isnan(vec->vec[1]) || isnan(vec->vec[2])) { + /* zero length vector, return an identity matrix, could also return an error */ + mat[0]= mat[4] = mat[8] = 1.0f; + } else { + /* create matrix */ + cosAngle = (float) cos(angle); + sinAngle = (float) sin(angle); + mat[0] = ((vec->vec[0] * vec->vec[0]) * (1 - cosAngle)) + + cosAngle; + mat[1] = ((vec->vec[0] * vec->vec[1]) * (1 - cosAngle)) + + (vec->vec[2] * sinAngle); + mat[2] = ((vec->vec[0] * vec->vec[2]) * (1 - cosAngle)) - + (vec->vec[1] * sinAngle); + mat[3] = ((vec->vec[0] * vec->vec[1]) * (1 - cosAngle)) - + (vec->vec[2] * sinAngle); + mat[4] = ((vec->vec[1] * vec->vec[1]) * (1 - cosAngle)) + + cosAngle; + mat[5] = ((vec->vec[1] * vec->vec[2]) * (1 - cosAngle)) + + (vec->vec[0] * sinAngle); + mat[6] = ((vec->vec[0] * vec->vec[2]) * (1 - cosAngle)) + + (vec->vec[1] * sinAngle); + mat[7] = ((vec->vec[1] * vec->vec[2]) * (1 - cosAngle)) - + (vec->vec[0] * sinAngle); + mat[8] = ((vec->vec[2] * vec->vec[2]) * (1 - cosAngle)) + + cosAngle; + } } else { return EXPP_ReturnPyObjError(PyExc_AttributeError, "Mathutils.RotationMatrix(): unrecognizable axis of rotation type - expected x,y,z or r\n"); diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 59fedf04e30..b6877b2e2b7 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -2149,7 +2149,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho uiDefBut(block, TEX, 1, "To: ", (xco+10), (yco-(myline++*24)), (width-20), 19, &ma->toPropName, 0, 31, 0, 0, - "Optional send message to objects with this name only" + "Optional send message to objects with this name only (Prefix name with OB)" ", or empty to broadcast"); #endif diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index 678df59e4a9..ff55f975543 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -50,7 +50,7 @@ class KX_GameObject: """ Sets the game object's orientation. - @type orn: 3x3 rotation matrix, or Quaternion. + @type orn: 3x3 inverted rotation matrix, or Quaternion. @param orn: a rotation matrix specifying the new rotation. """ def alignAxisToVect(vect, axis): @@ -69,7 +69,7 @@ class KX_GameObject: """ Gets the game object's orientation. - @rtype: 3x3 rotation matrix + @rtype: 3x3 inverted rotation matrix @return: The game object's rotation matrix """ def getLinearVelocity(local): From 86d227367b4cdfa839582077e919e64bf6cf1c8d Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Jun 2008 01:31:29 +0000 Subject: [PATCH 272/430] Bugfix: Update-automatically option in IPO-Editor now updates objects using the active IPO-block as their ObAction when transforming keyframes. --- source/blender/src/transform_generics.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index eaa4a1d0ecf..6cb7a34d1bc 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -325,7 +325,7 @@ void recalcData(TransInfo *t) else { for (base=G.scene->base.first; base; base=base->next) { /* recalculate scale of selected nla-strips */ - if (base->object->nlastrips.first) { + if (base->object && base->object->nlastrips.first) { Object *bob= base->object; bActionStrip *strip; @@ -398,8 +398,15 @@ void recalcData(TransInfo *t) } } else if(G.sipo->blocktype==ID_OB) { + Object *ob= OBACT; Base *base= FIRSTBASE; + /* only if this if active object has this ipo in an action (assumes that current ipo is in action) */ + if ((ob) && (ob->ipoflag & OB_ACTION_OB) && (G.sipo->pin==0)) { + ob->ctime= -1234567.0f; + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + } + while(base) { if(base->object->ipo==G.sipo->ipo) { do_ob_ipo(base->object); From 1ee7a20b93ee3c640b119e1a650e49dcb0f97de9 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Jun 2008 01:56:11 +0000 Subject: [PATCH 273/430] Compiler warning fixes (part 1 or 2) --- source/blender/blenkernel/intern/modifier.c | 74 ++++++++++----------- source/blender/include/BIF_oops.h | 2 + source/blender/src/oops.c | 1 - 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index eceab9f32d8..a0841bb9f03 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -1422,10 +1422,10 @@ void vertgroup_flip_name (char *name, int strip_number) } static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, - Object *ob, - DerivedMesh *dm, - int initFlags, - int axis) + Object *ob, + DerivedMesh *dm, + int initFlags, + int axis) { int i; float tolerance = mmd->tolerance; @@ -1434,7 +1434,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, int maxVerts = dm->getNumVerts(dm); int maxEdges = dm->getNumEdges(dm); int maxFaces = dm->getNumFaces(dm); - int vector_size, j, a, b; + int vector_size=0, j, a, b; bDeformGroup *def, *defb; bDeformGroup **vector_def = NULL; int (*indexMap)[2]; @@ -1463,7 +1463,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, if (mmd->mirror_ob) { float obinv[4][4]; - + Mat4Invert(obinv, mmd->mirror_ob->obmat); Mat4MulMat4(mtx, ob->obmat, obinv); Mat4Invert(imtx, mtx); @@ -1474,16 +1474,16 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, MVert *mv = CDDM_get_vert(result, numVerts); int isShared; float co[3]; - + dm->getVert(dm, i, &inMV); - + VecCopyf(co, inMV.co); - + if (mmd->mirror_ob) { VecMat4MulVecfl(co, mtx, co); } isShared = ABS(co[axis])<=tolerance; - + /* Because the topology result (# of vertices) must be the same if * the mesh data is overridden by vertex cos, have to calc sharedness * based on original coordinates. This is why we test before copy. @@ -1491,10 +1491,10 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, DM_copy_vert_data(dm, result, i, numVerts, 1); *mv = inMV; numVerts++; - + indexMap[i][0] = numVerts - 1; indexMap[i][1] = !isShared; - + if(isShared) { co[axis] = 0; if (mmd->mirror_ob) { @@ -1506,33 +1506,33 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } else { MVert *mv2 = CDDM_get_vert(result, numVerts); MDeformVert *dvert = NULL; - + DM_copy_vert_data(dm, result, i, numVerts, 1); *mv2 = *mv; - + co[axis] = -co[axis]; if (mmd->mirror_ob) { VecMat4MulVecfl(co, imtx, co); } VecCopyf(mv2->co, co); - + if (mmd->flag & MOD_MIR_VGROUP){ dvert = DM_get_vert_data(result, numVerts, CD_MDEFORMVERT); - + if (dvert) { for(j = 0; j < dvert[0].totweight; ++j) { char tmpname[32]; - + if(dvert->dw[j].def_nr < 0 || dvert->dw[j].def_nr >= vector_size) continue; - + def = vector_def[dvert->dw[j].def_nr]; strcpy(tmpname, def->name); vertgroup_flip_name(tmpname,0); - + for(b = 0, defb = ob->defbase.first; defb; defb = defb->next, b++) { @@ -1545,7 +1545,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } } } - + numVerts++; } } @@ -1553,25 +1553,25 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, for(i = 0; i < maxEdges; i++) { MEdge inMED; MEdge *med = CDDM_get_edge(result, numEdges); - + dm->getEdge(dm, i, &inMED); - + DM_copy_edge_data(dm, result, i, numEdges, 1); *med = inMED; numEdges++; - + med->v1 = indexMap[inMED.v1][0]; med->v2 = indexMap[inMED.v2][0]; if(initFlags) med->flag |= ME_EDGEDRAW | ME_EDGERENDER; - + if(indexMap[inMED.v1][1] || indexMap[inMED.v2][1]) { MEdge *med2 = CDDM_get_edge(result, numEdges); - + DM_copy_edge_data(dm, result, i, numEdges, 1); *med2 = *med; numEdges++; - + med2->v1 += indexMap[inMED.v1][1]; med2->v2 += indexMap[inMED.v2][1]; } @@ -1580,13 +1580,13 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, for(i = 0; i < maxFaces; i++) { MFace inMF; MFace *mf = CDDM_get_face(result, numFaces); - + dm->getFace(dm, i, &inMF); - + DM_copy_face_data(dm, result, i, numFaces, 1); *mf = inMF; numFaces++; - + mf->v1 = indexMap[inMF.v1][0]; mf->v2 = indexMap[inMF.v2][0]; mf->v3 = indexMap[inMF.v3][0]; @@ -1598,15 +1598,15 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, || (mf->v4 && indexMap[inMF.v4][1])) { MFace *mf2 = CDDM_get_face(result, numFaces); static int corner_indices[4] = {2, 1, 0, 3}; - + DM_copy_face_data(dm, result, i, numFaces, 1); *mf2 = *mf; - + mf2->v1 += indexMap[inMF.v1][1]; mf2->v2 += indexMap[inMF.v2][1]; mf2->v3 += indexMap[inMF.v3][1]; if(inMF.v4) mf2->v4 += indexMap[inMF.v4][1]; - + /* mirror UVs if enabled */ if(mmd->flag & (MOD_MIR_MIRROR_U | MOD_MIR_MIRROR_V)) { MTFace *tf = result->getFaceData(result, numFaces, CD_MTFACE); @@ -1620,14 +1620,14 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } } } - + /* Flip face normal */ SWAP(int, mf2->v1, mf2->v3); DM_swap_face_data(result, numFaces, corner_indices); - + test_index_face(mf2, &result->faceData, numFaces, inMF.v4?4:3); numFaces++; - } + } } if (vector_def) MEM_freeN(vector_def); @@ -1642,8 +1642,8 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, } static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd, - Object *ob, DerivedMesh *dm, - int initFlags) + Object *ob, DerivedMesh *dm, + int initFlags) { DerivedMesh *result = dm; diff --git a/source/blender/include/BIF_oops.h b/source/blender/include/BIF_oops.h index adeac4f3871..2375a918d0e 100644 --- a/source/blender/include/BIF_oops.h +++ b/source/blender/include/BIF_oops.h @@ -43,6 +43,8 @@ struct Camera; struct Texture; struct Lattice; struct bArmature; +struct Tex; + void add_curve_oopslinks(struct Curve *cu, struct Oops *oops, short flag); void add_from_link(struct Oops *from, struct Oops *oops); void add_material_oopslinks(struct Material *ma, struct Oops *oops, short flag); diff --git a/source/blender/src/oops.c b/source/blender/src/oops.c index 99645b5e71f..51d83eff3e6 100644 --- a/source/blender/src/oops.c +++ b/source/blender/src/oops.c @@ -1153,7 +1153,6 @@ void build_oops() } } else if(type==ID_AR && G.soops->visiflag & OOPS_AR) { - bArmature *ar= ob->data; oops= add_test_oops(ob->data); } } From 5372def2b069699809cf9439381b03364137adb5 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sun, 22 Jun 2008 14:23:57 +0000 Subject: [PATCH 274/430] BGE patch: add state engine support in the logic bricks. This patch introduces a simple state engine system with the logic bricks. This system features full backward compatibility, multiple active states, multiple state transitions, automatic disabling of sensor and actuators, full GUI support and selective display of sensors and actuators. Note: Python API is available but not documented yet. It will be added asap. State internals =============== The state system is object based. The current state mask is stored in the object as a 32 bit value; each bit set in the mask is an active state. The controllers have a state mask too but only one bit can be set: a controller belongs to a single state. The game engine will only execute controllers that belong to active states. Sensors and actuators don't have a state mask but are effectively attached to states via their links to the controllers. Sensors and actuators can be connected to more than one state. When a controller becomes inactive because of a state change, its links to sensors and actuators are temporarily broken (until the state becomes active again). If an actuator gets isolated, i.e all the links to controllers are broken, it is automatically disabled. If a sensor gets isolated, the game engine will stop calling it to save CPU. It will also reset the sensor internal state so that it can react as if the game just started when it gets reconnected to an active controller. For example, an Always sensor in no pulse mode that is connected to a single state (i.e connected to one or more controllers of a single state) will generate a pulse each time the state becomes active. This feature is not available on all sensors, see the notes below. GUI === This system system is fully configurable through the GUI: the object state mask is visible under the object bar in the controller's colum as an array of buttons just like the 3D view layer mask. Click on a state bit to only display the controllers of that state. You can select more than one state with SHIFT-click. The All button sets all the bits so that you can see all the controllers of the object. The Ini button sets the state mask back to the object default state. You can change the default state of object by first selecting the desired state mask and storing using the menu under the State button. If you define a default state mask, it will be loaded into the object state make when you load the blend file or when you run the game under the blenderplayer. However, when you run the game under Blender, the current selected state mask will be used as the startup state for the object. This allows you to test specific state during the game design. The controller display the state they belong to with a new button in the controller header. When you add a new controller, it is added by default in the lowest enabled state. You can change the controller state by clicking on the button and selecting another state. If more than one state is enabled in the object state mask, controllers are grouped by state for more readibility. The new Sta button in the sensor and actuator column header allows you to display only the sensors and actuators that are linked to visible controllers. A new state actuator is available to modify the state during the game. It defines a bit mask and the operation to apply on the current object state mask: Cpy: the bit mask is copied to the object state mask. Add: the bits that set in the bit mask will be turned on in the object state mask. Sub: the bits that set in the bit mask will be turned off in the object state mask. Inv: the bits that set in the bit mask will be inverted in the objecyy state mask. Notes ===== - Although states have no name, a simply convention consists in using the name of the first controller of the state as the state name. The GUI will support that convention by displaying as a hint the name of the first controller of the state when you move the mouse over a state bit of the object state mask or of the state actuator bit mask. - Each object has a state mask and each object can have a state engine but if several objects are part of a logical group, it is recommended to put the state engine only in the main object and to link the controllers of that object to the sensors and actuators of the different objects. - When loading an old blend file, the state mask of all objects and controllers are initialized to 1 so that all the controllers belong to this single state. This ensures backward compatibility with existing game. - When the state actuator is activated at the same time as other actuators, these actuators are guaranteed to execute before being eventually disabled due to the state change. This is useful for example to send a message or update a property at the time of changing the state. - Sensors that depend on underlying resource won't reset fully when they are isolated. By the time they are acticated again, they will behave as follow: * keyboard sensor: keys already pressed won't be detected. The keyboard sensor is only sensitive to new key press. * collision sensor: objects already colliding won't be detected. Only new collisions are detected. * near and radar sensor: same as collision sensor. --- .../gameengine/ketsji/KX_ketsji.vcproj | 6 + source/blender/blenkernel/intern/sca.c | 3 + source/blender/blenloader/intern/readfile.c | 12 + source/blender/blenloader/intern/writefile.c | 3 + source/blender/include/BIF_butspace.h | 2 + source/blender/include/BIF_interface.h | 1 + source/blender/include/butspace.h | 4 + source/blender/makesdna/DNA_actuator_types.h | 8 + .../blender/makesdna/DNA_controller_types.h | 3 +- source/blender/makesdna/DNA_object_types.h | 6 +- source/blender/makesdna/DNA_sensor_types.h | 1 + source/blender/src/buttons_logic.c | 640 +++++++++++++----- source/blender/src/interface.c | 4 + .../Converter/BL_BlenderDataConversion.cpp | 8 + .../Converter/KX_ConvertActuators.cpp | 15 +- .../Converter/KX_ConvertControllers.cpp | 1 + .../gameengine/GameLogic/SCA_AlwaysSensor.cpp | 7 +- .../gameengine/GameLogic/SCA_AlwaysSensor.h | 2 + source/gameengine/GameLogic/SCA_IActuator.cpp | 10 + source/gameengine/GameLogic/SCA_IActuator.h | 7 + .../gameengine/GameLogic/SCA_IController.cpp | 97 ++- source/gameengine/GameLogic/SCA_IController.h | 4 + source/gameengine/GameLogic/SCA_IObject.cpp | 13 +- source/gameengine/GameLogic/SCA_IObject.h | 19 +- source/gameengine/GameLogic/SCA_ISensor.cpp | 23 +- source/gameengine/GameLogic/SCA_ISensor.h | 10 + .../GameLogic/SCA_JoystickSensor.cpp | 6 +- .../gameengine/GameLogic/SCA_JoystickSensor.h | 1 + .../GameLogic/SCA_KeyboardSensor.cpp | 11 +- .../gameengine/GameLogic/SCA_KeyboardSensor.h | 2 + .../gameengine/GameLogic/SCA_LogicManager.cpp | 20 +- .../gameengine/GameLogic/SCA_MouseSensor.cpp | 6 +- source/gameengine/GameLogic/SCA_MouseSensor.h | 2 +- .../GameLogic/SCA_PropertySensor.cpp | 6 +- .../gameengine/GameLogic/SCA_PropertySensor.h | 1 + .../gameengine/GameLogic/SCA_RandomSensor.cpp | 16 +- .../gameengine/GameLogic/SCA_RandomSensor.h | 1 + .../KXNetwork/KX_NetworkMessageSensor.cpp | 7 +- .../KXNetwork/KX_NetworkMessageSensor.h | 1 + .../gameengine/Ketsji/KX_MouseFocusSensor.cpp | 5 +- .../gameengine/Ketsji/KX_MouseFocusSensor.h | 1 + source/gameengine/Ketsji/KX_RadarSensor.cpp | 1 - source/gameengine/Ketsji/KX_RaySensor.cpp | 14 +- source/gameengine/Ketsji/KX_RaySensor.h | 1 + source/gameengine/Ketsji/KX_Scene.cpp | 2 - source/gameengine/Ketsji/KX_StateActuator.cpp | 207 ++++++ source/gameengine/Ketsji/KX_StateActuator.h | 83 +++ source/gameengine/Ketsji/KX_TouchSensor.cpp | 14 +- source/gameengine/Ketsji/KX_TouchSensor.h | 1 + 49 files changed, 1119 insertions(+), 199 deletions(-) create mode 100644 source/gameengine/Ketsji/KX_StateActuator.cpp create mode 100644 source/gameengine/Ketsji/KX_StateActuator.h diff --git a/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj b/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj index c8173750bdc..af0ba74497a 100644 --- a/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj +++ b/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj @@ -474,6 +474,9 @@ + + @@ -695,6 +698,9 @@ + + diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 92544f19721..16ca5d7542d 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -465,6 +465,9 @@ void init_actuator(bActuator *act) case ACT_PARENT: act->data = MEM_callocN(sizeof( bParentActuator ), "parent act"); break; + case ACT_STATE: + act->data = MEM_callocN(sizeof( bStateActuator ), "state act"); + break; default: ; /* this is very severe... I cannot make any memory for this */ /* logic brick... */ diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fa7cbb06139..9cfce5e34fa 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3011,6 +3011,9 @@ static void lib_link_object(FileData *fd, Main *main) bParentActuator *parenta = act->data; parenta->ob = newlibadr(fd, ob->id.lib, parenta->ob); } + else if(act->type==ACT_STATE) { + /* bStateActuator *statea = act->data; */ + } act= act->next; } @@ -3307,11 +3310,19 @@ static void direct_link_object(FileData *fd, Object *ob) direct_link_constraints(fd, &ob->constraints); link_glob_list(fd, &ob->controllers); + if (ob->init_state) { + /* if a known first state is specified, set it so that the game will start ok */ + ob->state = ob->init_state; + } else if (!ob->state) { + ob->state = 1; + } cont= ob->controllers.first; while(cont) { cont->data= newdataadr(fd, cont->data); cont->links= newdataadr(fd, cont->links); test_pointer_array(fd, (void **)&cont->links); + if (cont->state_mask == 0) + cont->state_mask = 1; cont= cont->next; } @@ -7635,6 +7646,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2595b95bbf0..9f28e13ff7b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -715,6 +715,9 @@ static void write_actuators(WriteData *wd, ListBase *lb) case ACT_PARENT: writestruct(wd, DATA, "bParentActuator", 1, act->data); break; + case ACT_STATE: + writestruct(wd, DATA, "bStateActuator", 1, act->data); + break; default: ; /* error: don't know how to write this file */ } diff --git a/source/blender/include/BIF_butspace.h b/source/blender/include/BIF_butspace.h index cbbd8013c82..f0b37814947 100644 --- a/source/blender/include/BIF_butspace.h +++ b/source/blender/include/BIF_butspace.h @@ -99,6 +99,8 @@ extern void validate_editbonebutton_cb(void *bonev, void *namev); #define BUTS_ACT_SEL 64 #define BUTS_ACT_ACT 128 #define BUTS_ACT_LINK 256 +#define BUTS_SENS_STATE 512 +#define BUTS_ACT_STATE 1024 /* buttons grid */ diff --git a/source/blender/include/BIF_interface.h b/source/blender/include/BIF_interface.h index fbd4e4ecd91..3da4466d4d3 100644 --- a/source/blender/include/BIF_interface.h +++ b/source/blender/include/BIF_interface.h @@ -185,6 +185,7 @@ void uiDrawBlock(struct uiBlock *block); void uiGetMouse(int win, short *adr); void uiComposeLinks(uiBlock *block); void uiSetButLock(int val, char *lockstr); +uiBut *uiFindInlink(uiBlock *block, void *poin); void uiClearButLock(void); int uiDoBlocks(struct ListBase *lb, int event, int movemouse_quit); void uiSetCurFont(uiBlock *block, int index); diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index 7571d64be91..c0542e3f34c 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -52,6 +52,8 @@ struct Image; #define BUTS_ACT_SEL 64 #define BUTS_ACT_ACT 128 #define BUTS_ACT_LINK 256 +#define BUTS_SENS_STATE 512 +#define BUTS_ACT_STATE 1024 /* internal */ @@ -583,6 +585,8 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_SETACTOR 2715 #define B_SETMAINACTOR 2716 #define B_SETDYNA 2717 +#define B_SET_STATE_BIT 2718 +#define B_INIT_STATE_BIT 2719 /* *********************** */ #define B_FPAINTBUTS 2900 diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index a326f5b01d6..417ba540e2c 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -208,6 +208,11 @@ typedef struct bParentActuator { struct Object *ob; } bParentActuator; +typedef struct bStateActuator { + int type; /* 0=Set, 1=Add, 2=Rem, 3=Chg */ + unsigned int mask; /* the bits to change */ +} bStateActuator; + typedef struct bActuator { struct bActuator *next, *prev, *mynew; short type; @@ -279,11 +284,14 @@ typedef struct FreeCamera { #define ACT_2DFILTER 19 #define ACT_PARENT 20 #define ACT_SHAPEACTION 21 +#define ACT_STATE 22 /* actuator flag */ #define ACT_SHOW 1 #define ACT_DEL 2 #define ACT_NEW 4 +#define ACT_LINKED 8 +#define ACT_VISIBLE 16 /* link codes */ #define LINK_SENSOR 0 diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index 95c9b0d0cf7..cc9215e7d14 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -57,7 +57,7 @@ typedef struct bController { struct bSensor **slinks; short val, valo; - int pad5; + unsigned int state_mask; } bController; @@ -71,6 +71,7 @@ typedef struct bController { #define CONT_SHOW 1 #define CONT_DEL 2 #define CONT_NEW 4 +#define CONT_MASK 8 #endif diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 83168248b9a..c4e8cb4925b 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -216,7 +216,9 @@ typedef struct Object { struct DerivedMesh *derivedDeform, *derivedFinal; int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ - int pad; + unsigned int state; /* bit masks of game controllers that are active */ + unsigned int init_state; /* bit masks of initial state as recorded by the users */ + int pad2; /*#ifdef WITH_VERSE*/ void *vnode; /* pointer at object VerseNode */ @@ -440,6 +442,8 @@ extern Object workob; #define OB_ADDCONT 512 #define OB_ADDACT 1024 #define OB_SHOWCONT 2048 +#define OB_SETSTBIT 4096 +#define OB_INITSTBIT 8192 /* ob->restrictflag */ #define OB_RESTRICT_VIEW 1 diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 90e2b8f9f41..3fd57a85349 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -202,6 +202,7 @@ typedef struct bJoystickSensor { #define SENS_DEL 2 #define SENS_NEW 4 #define SENS_NOT 8 +#define SENS_VISIBLE 16 /* sensor->pulse */ #define SENS_PULSE_CONT 0 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index b6877b2e2b7..c4fc17bc4d0 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -88,6 +88,7 @@ #include "mydevice.h" #include "nla.h" /* For __NLA : Important, do not remove */ #include "butspace.h" // own module +#include "interface.h" /* internals */ void buttons_enji(uiBlock *, Object *); @@ -228,7 +229,7 @@ static void sca_move_sensor(void *datav, void *data2_unused) bSensor *sens_to_delete= datav; int val; Base *base; - bSensor *sens; + bSensor *sens, *tmp; val= pupmenu("Move up%x1|Move down %x2"); @@ -245,12 +246,24 @@ static void sca_move_sensor(void *datav, void *data2_unused) if(sens) { if( val==1 && sens->prev) { - BLI_remlink(&base->object->sensors, sens); - BLI_insertlinkbefore(&base->object->sensors, sens->prev, sens); + for (tmp=sens->prev; tmp; tmp=tmp->prev) { + if (tmp->flag & SENS_VISIBLE) + break; + } + if (tmp) { + BLI_remlink(&base->object->sensors, sens); + BLI_insertlinkbefore(&base->object->sensors, tmp, sens); + } } else if( val==2 && sens->next) { - BLI_remlink(&base->object->sensors, sens); - BLI_insertlink(&base->object->sensors, sens->next, sens); + for (tmp=sens->next; tmp; tmp=tmp->next) { + if (tmp->flag & SENS_VISIBLE) + break; + } + if (tmp) { + BLI_remlink(&base->object->sensors, sens); + BLI_insertlink(&base->object->sensors, tmp, sens); + } } BIF_undo_push("Move sensor"); allqueue(REDRAWBUTSLOGIC, 0); @@ -267,7 +280,7 @@ static void sca_move_controller(void *datav, void *data2_unused) bController *controller_to_del= datav; int val; Base *base; - bController *cont; + bController *cont, *tmp; val= pupmenu("Move up%x1|Move down %x2"); @@ -284,12 +297,27 @@ static void sca_move_controller(void *datav, void *data2_unused) if(cont) { if( val==1 && cont->prev) { - BLI_remlink(&base->object->controllers, cont); - BLI_insertlinkbefore(&base->object->controllers, cont->prev, cont); + /* locate the controller that has the same state mask but is earlier in the list */ + tmp = cont->prev; + while(tmp) { + if(tmp->state_mask & cont->state_mask) + break; + tmp = tmp->prev; + } + if (tmp) { + BLI_remlink(&base->object->controllers, cont); + BLI_insertlinkbefore(&base->object->controllers, tmp, cont); + } } else if( val==2 && cont->next) { + tmp = cont->next; + while(tmp) { + if(tmp->state_mask & cont->state_mask) + break; + tmp = tmp->next; + } BLI_remlink(&base->object->controllers, cont); - BLI_insertlink(&base->object->controllers, cont->next, cont); + BLI_insertlink(&base->object->controllers, tmp, cont); } BIF_undo_push("Move controller"); allqueue(REDRAWBUTSLOGIC, 0); @@ -306,7 +334,7 @@ static void sca_move_actuator(void *datav, void *data2_unused) bActuator *actuator_to_move= datav; int val; Base *base; - bActuator *act; + bActuator *act, *tmp; val= pupmenu("Move up%x1|Move down %x2"); @@ -323,12 +351,25 @@ static void sca_move_actuator(void *datav, void *data2_unused) if(act) { if( val==1 && act->prev) { - BLI_remlink(&base->object->actuators, act); - BLI_insertlinkbefore(&base->object->actuators, act->prev, act); + /* locate the first visible actuators before this one */ + for (tmp = act->prev; tmp; tmp=tmp->prev) { + if (tmp->flag & ACT_VISIBLE) + break; + } + if (tmp) { + BLI_remlink(&base->object->actuators, act); + BLI_insertlinkbefore(&base->object->actuators, tmp, act); + } } else if( val==2 && act->next) { - BLI_remlink(&base->object->actuators, act); - BLI_insertlink(&base->object->actuators, act->next, act); + for (tmp=act->next; tmp; tmp=tmp->next) { + if (tmp->flag & ACT_VISIBLE) + break; + } + if (tmp) { + BLI_remlink(&base->object->actuators, act); + BLI_insertlink(&base->object->actuators, tmp, act); + } } BIF_undo_push("Move actuator"); allqueue(REDRAWBUTSLOGIC, 0); @@ -348,7 +389,7 @@ void do_logic_buts(unsigned short event) bActuator *act; Base *base; Object *ob; - int didit; + int didit, bit; ob= OBACT; if(ob==0) return; @@ -462,6 +503,18 @@ void do_logic_buts(unsigned short event) make_unique_prop_names(cont->name); base->object->scaflag |= OB_SHOWCONT; BLI_addtail(&(base->object->controllers), cont); + /* set the controller state mask from the current object state. + A controller is always in a single state, so select the lowest bit set + from the object state */ + for (bit=0; bit<32; bit++) { + if (base->object->state & (1<state_mask = (1<state_mask == 0) { + /* shouldn't happen, object state is never 0 */ + cont->state_mask = 1; + } } base= base->next; } @@ -469,6 +522,32 @@ void do_logic_buts(unsigned short event) allqueue(REDRAWBUTSLOGIC, 0); break; + case B_SET_STATE_BIT: + base= FIRSTBASE; + while(base) { + if(base->object->scaflag & OB_SETSTBIT) { + base->object->scaflag &= ~OB_SETSTBIT; + base->object->state = 0x3FFFFFFF; + } + base= base->next; + } + allqueue(REDRAWBUTSLOGIC, 0); + break; + + case B_INIT_STATE_BIT: + base= FIRSTBASE; + while(base) { + if(base->object->scaflag & OB_INITSTBIT) { + base->object->scaflag &= ~OB_INITSTBIT; + base->object->state = base->object->init_state; + if (!base->object->state) + base->object->state = 1; + } + base= base->next; + } + allqueue(REDRAWBUTSLOGIC, 0); + break; + case B_CHANGE_CONT: base= FIRSTBASE; while(base) { @@ -505,7 +584,7 @@ void do_logic_buts(unsigned short event) BIF_undo_push("Delete controller"); allqueue(REDRAWBUTSLOGIC, 0); break; - + case B_ADD_ACT: base= FIRSTBASE; while(base) { @@ -717,6 +796,8 @@ static char *actuator_name(int type) return "2D Filter"; case ACT_PARENT: return "Parent"; + case ACT_STATE: + return "State"; } return "unknown"; } @@ -732,21 +813,21 @@ static char *actuator_pup(Object *owner) return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1" "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" - "|Visibility %x18|2D Filter %x19|Parent %x20"; + "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22"; break; case OB_MESH: return "Actuators %t|Shape Action %x21|Motion %x0|Constraint %x9|Ipo %x1" "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" - "|Visibility %x18|2D Filter %x19|Parent %x20"; + "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22"; break; default: return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1" "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" - "|Visibility %x18|2D Filter %x19|Parent %x20"; + "|Visibility %x18|2D Filter %x19|Parent %x20|State %x22"; } } @@ -815,7 +896,8 @@ static ID **get_selected_and_linked_obs(short *count, short scavisflag) if(scavisflag & BUTS_ACT_ACT) OBACT->scavisflag |= OB_VIS_ACT; } - if(scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK)) { + /* BUTS_XXX_STATE are similar to BUTS_XXX_LINK for selecting the object */ + if(scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) { doit= 1; while(doit) { doit= 0; @@ -824,7 +906,7 @@ static ID **get_selected_and_linked_obs(short *count, short scavisflag) while(ob) { /* 1st case: select sensor when controller selected */ - if((scavisflag & BUTS_SENS_LINK) && (ob->scavisflag & OB_VIS_SENS)==0) { + if((scavisflag & (BUTS_SENS_LINK|BUTS_SENS_STATE)) && (ob->scavisflag & OB_VIS_SENS)==0) { sens= ob->sensors.first; while(sens) { for(a=0; atotlinks; a++) { @@ -879,7 +961,7 @@ static ID **get_selected_and_linked_obs(short *count, short scavisflag) } /* 4th case: select actuator when controller selected */ - if( (scavisflag & BUTS_ACT_LINK) && (ob->scavisflag & OB_VIS_CONT)) { + if( (scavisflag & (BUTS_ACT_LINK|BUTS_ACT_STATE)) && (ob->scavisflag & OB_VIS_CONT)) { cont= ob->controllers.first; while(cont) { for(a=0; atotlinks; a++) { @@ -1458,6 +1540,7 @@ static int get_col_actuator(int type) case ACT_GAME: return TH_BUT_SETTING2; case ACT_VISIBILITY: return TH_BUT_NUM; case ACT_CONSTRAINT: return TH_BUT_ACTION; + case ACT_STATE: return TH_BUT_SETTING2; default: return TH_BUT_NEUTRAL; } } @@ -1468,7 +1551,23 @@ static void set_col_actuator(int item, int medium) } -static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, short yco, short width) +char *get_state_name(Object *ob, short bit) +{ + bController *cont; + unsigned int mask; + + mask = (1<controllers.first; + while (cont) { + if (cont->state_mask & mask) { + return cont->name; + } + cont = cont->next; + } + return (char*)""; +} + +static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, short xco, short yco, short width) { bSoundActuator *sa = NULL; bCDActuator *cda = NULL; @@ -1487,11 +1586,12 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho bVisibilityActuator *visAct = NULL; bTwoDFilterActuator *tdfa = NULL; bParentActuator *parAct = NULL; + bStateActuator *staAct = NULL; float *fp; short ysize = 0, wval; - char *str; - int myline; + char *str, name[32]; + int myline, stbit; /* yco is at the top of the rect, draw downwards */ uiBlockSetEmboss(block, UI_EMBOSSM); @@ -2022,6 +2122,37 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho break; + case ACT_STATE: + ysize = 34; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, + (float)yco-ysize, (float)xco+width, (float)yco, 1); + + staAct = act->data; + + str= "Operation %t|Cpy %x0|Add %x1|Sub %x2|Inv %x3"; + + uiDefButI(block, MENU, B_REDR, str, + xco + 10, yco - 24, 65, 19, &staAct->type, + 0.0, 0.0, 0, 0, + "Select the bit operation on object state mask"); + + for (wval=0; wval<15; wval+=5) { + uiBlockBeginAlign(block); + for (stbit=0; stbit<5; stbit++) { + uiDefButBitI(block, TOG, (1<<(stbit+wval)), 0, "", (short)(xco+85+12*stbit+13*wval), yco-17, 12, 12, (int *)&(staAct->mask), 0, 0, 0, 0, get_state_name(ob, (short)(wval+stbit))); + } + for (stbit=0; stbit<5; stbit++) { + uiDefButBitI(block, TOG, (1<<(stbit+wval+15)), 0, "", (short)(xco+85+12*stbit+13*wval), yco-29, 12, 12, (int *)&(staAct->mask), 0, 0, 0, 0, get_state_name(ob, (short)(wval+stbit+15))); + } + } + uiBlockEndAlign(block); + + yco-= ysize; + + break; + case ACT_RANDOM: ysize = 69; @@ -2596,6 +2727,120 @@ void buttons_bullet(uiBlock *block, Object *ob) uiBlockEndAlign(block); } +static void check_object_state(void *arg1_but, void *arg2_mask) +{ + unsigned int *cont_mask = arg2_mask; + uiBut *but = arg1_but; + + if (*cont_mask == 0 || !(G.qual & LR_SHIFTKEY)) + *cont_mask = (1<retval); + but->retval = B_REDR; +} + +static void check_controller_state_mask(void *arg1_but, void *arg2_mask) +{ + unsigned int *cont_mask = arg2_mask; + uiBut *but = arg1_but; + + /* a controller is always in a single state */ + *cont_mask = (1<retval); + but->retval = B_REDR; +} + +static int first_bit(unsigned int mask) +{ + int bit; + + for (bit=0; bit<32; bit++) { + if (mask & (1<uiblocks, "Controller state mask", UI_EMBOSS, UI_HELV, curarea->win); + + /* use this for a fake extra empy space around the buttons */ + uiDefBut(block, LABEL, 0, "", -5, -5, 200, 34, NULL, 0, 0, 0, 0, ""); + + for (offset=0; offset<15; offset+=5) { + uiBlockBeginAlign(block); + for (stbit=0; stbit<5; stbit++) { + but = uiDefButBitI(block, TOG, (1<<(stbit+offset)), (stbit+offset), "", (short)(xco+12*stbit+13*offset), yco, 12, 12, (int *)&(cont->state_mask), 0, 0, 0, 0, ""); + uiButSetFunc(but, check_controller_state_mask, but, &(cont->state_mask)); + } + for (stbit=0; stbit<5; stbit++) { + but = uiDefButBitI(block, TOG, (1<<(stbit+offset+15)), (stbit+offset+15), "", (short)(xco+12*stbit+13*offset), yco-12, 12, 12, (int *)&(cont->state_mask), 0, 0, 0, 0, ""); + uiButSetFunc(but, check_controller_state_mask, but, &(cont->state_mask)); + } + } + uiBlockEndAlign(block); + + uiBlockSetDirection(block, UI_TOP); + + return block; +} + +static void do_object_state_menu(void *arg, int event) +{ + Object *ob = arg; + + switch (event) { + case 0: + ob->state = 0x3FFFFFFF; + break; + case 1: + ob->state = ob->init_state; + if (!ob->state) + ob->state = 1; + break; + case 2: + ob->init_state = ob->state; + break; + } + allqueue(REDRAWBUTSLOGIC, 0); +} + +static uiBlock *object_state_mask_menu(void *arg_obj) +{ + uiBlock *block; + uiBut *but; + short xco = 0; + + block= uiNewBlock(&curarea->uiblocks, "obstatemenu", UI_EMBOSSP, UI_HELV, curarea->win); + uiBlockSetButmFunc(block, do_object_state_menu, arg_obj); + + uiDefBut(block, BUTM, 1, "Set all bits", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, ""); + uiDefBut(block, BUTM, 1, "Recall init state", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefBut(block, SEPR, 0, "", 0, (short)(xco-=6), 160, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, BUTM, 1, "Store init state", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 2, ""); + + uiBlockSetDirection(block, UI_TOP); + return block; +} + +static int is_sensor_linked(uiBlock *block, bSensor *sens) +{ + bController *cont; + int i, count; + + for (count=0, i=0; itotlinks; i++) { + cont = sens->links[i]; + if (uiFindInlink(block, cont) != NULL) + return 1; + } + return 0; +} + /* never used, see CVS 1.134 for the code */ /* static FreeCamera *new_freecamera(void) */ @@ -2614,7 +2859,7 @@ void logic_buts(void) uiBlock *block; uiBut *but; World *wrld; - int a; + int a, iact, stbit, offset; short xco, yco, count, width, ycoo; char *pupstr, name[32]; @@ -2686,78 +2931,27 @@ void logic_buts(void) uiClearButLock(); idar= get_selected_and_linked_obs(&count, G.buts->scaflag); - - /* ******************************* */ - xco= 375; yco= 170; width= 230; - uiBlockSetEmboss(block, UI_EMBOSSP); - uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 80, 19, ""); - uiBlockSetEmboss(block, UI_EMBOSS); - - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); - uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); - uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); - uiBlockEndAlign(block); - + /* clean ACT_LINKED and ACT_VISIBLE of all potentially visible actuators so that + we can determine which is actually linked/visible */ for(a=0; ascavisflag & OB_VIS_SENS) == 0) continue; - - /* presume it is only objects for now */ - uiBlockSetEmboss(block, UI_EMBOSS); - uiBlockBeginAlign(block); - if(ob->sensors.first) uiSetCurFont(block, UI_HELVB); - uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors"); - if(ob->sensors.first) uiSetCurFont(block, UI_HELV); - uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor"); - uiBlockEndAlign(block); - yco-=20; - - if(ob->scaflag & OB_SHOWSENS) { - - sens= ob->sensors.first; - while(sens) { - uiBlockSetEmboss(block, UI_EMBOSSM); - uiDefIconButBitS(block, TOG, SENS_DEL, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor"); - uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings"); - - ycoo= yco; - if(sens->flag & SENS_SHOW) - { - uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 100, 19, &sens->type, 0, 0, 0, 0, "Sensor type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, sens->name, 0, 31, 0, 0, "Sensor name"); - uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0); - - sens->otype= sens->type; - yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name); - if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; - } - else { - set_col_sensor(sens->type, 1); - glRecti(xco+22, yco, xco+width-22,yco+19); - but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 100, 19, sens, 0, 0, 0, 0, ""); - uiButSetFunc(but, sca_move_sensor, sens, NULL); - but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+122), yco, (short)(width-144), 19, sens, 0, 31, 0, 0, ""); - uiButSetFunc(but, sca_move_sensor, sens, NULL); - } - - but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, 19, 19, NULL, 0, 0, 0, 0, ""); - uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER); - - yco-=20; - - sens= sens->next; - } - yco-= 6; + act= ob->actuators.first; + while(act) { + act->flag &= ~(ACT_LINKED|ACT_VISIBLE); + act = act->next; + } + /* same for sensors */ + sens= ob->sensors.first; + while(sens) { + sens->flag &= ~(SENS_VISIBLE); + sens = sens->next; } } - + + /* start with the controller because we need to know which one is visible */ /* ******************************* */ - xco= 675; yco= 170; width= 230; + xco= 695; yco= 170; width= 275; uiBlockSetEmboss(block, UI_EMBOSSP); uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, 19, ""); @@ -2785,59 +2979,193 @@ void logic_buts(void) if(ob->controllers.first) uiSetCurFont(block, UI_HELV); uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller"); uiBlockEndAlign(block); - yco-=20; + yco-=17; + /* mark all actuators linked to these controllers */ + /* note that some of these actuators could be from objects that are not in the display list. + It's ok because those actuators will not be displayed here */ + cont= ob->controllers.first; + while(cont) { + for (iact=0; iacttotlinks; iact++) { + act = cont->links[iact]; + act->flag |= ACT_LINKED; + } + cont = cont->next; + } + if(ob->scaflag & OB_SHOWCONT) { - - cont= ob->controllers.first; - while(cont) { - uiBlockSetEmboss(block, UI_EMBOSSM); - uiDefIconButBitS(block, TOG, CONT_DEL, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller"); - uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings"); - - if(cont->flag & CONT_SHOW) { - cont->otype= cont->type; - uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 100, 19, &cont->type, 0, 0, 0, 0, "Controller type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, cont->name, 0, 31, 0, 0, "Controller name"); - uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0); - - ycoo= yco; - yco= draw_controllerbuttons(cont, block, xco, yco, width); - if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; + + /* first show the state */ + uiBlockSetEmboss(block, UI_EMBOSSP); + uiDefBlockBut(block, object_state_mask_menu, ob, "State", (short)(xco-10), (short)(yco-10), 40, 19, "Object state menu: store and retrieve initial state"); + uiBlockSetEmboss(block, UI_EMBOSS); + if (!ob->state) + ob->state = 1; + for (offset=0; offset<15; offset+=5) { + uiBlockBeginAlign(block); + for (stbit=0; stbit<5; stbit++) { + but = uiDefButBitI(block, TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); + uiButSetFunc(but, check_object_state, but, &(ob->state)); } - else { - cpack(0x999999); - glRecti(xco+22, yco, xco+width-22,yco+19); - but= uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 100, 19, cont, 0, 0, 0, 0, "Controller type"); - uiButSetFunc(but, sca_move_controller, cont, NULL); - but= uiDefBut(block, LABEL, 0, cont->name,(short)(xco+122), yco,(short)(width-144), 19, cont, 0, 0, 0, 0, "Controller name"); - uiButSetFunc(but, sca_move_controller, cont, NULL); - ycoo= yco; + for (stbit=0; stbit<5; stbit++) { + but = uiDefButBitI(block, TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + uiButSetFunc(but, check_object_state, but, &(ob->state)); } + } + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, OB_SETSTBIT, B_SET_STATE_BIT, "All",(short)(xco+235), yco-10, 25, 19, &ob->scaflag, 0, 0, 0, 0, "Set all state bits"); + uiDefButBitS(block, TOG, OB_INITSTBIT, B_INIT_STATE_BIT, "Ini",(short)(xco+260), yco-10, 25, 19, &ob->scaflag, 0, 0, 0, 0, "Set the initial state"); + uiBlockEndAlign(block); + + yco-=35; - but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, 19, 19, NULL, 0, 0, 0, 0, ""); - uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR); - - uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, 19, 19, cont, LINK_CONTROLLER, 0, 0, 0, ""); - - yco-=20; + /* display only the controllers that match the current state */ + offset = 0; + for (stbit=0; stbit<32; stbit++) { + if (!(ob->state & (1<controllers.first; + while(cont) { + if (cont->state_mask & (1<totlinks; iact++) { + act = cont->links[iact]; + act->flag |= ACT_VISIBLE; + } + uiBlockSetEmboss(block, UI_EMBOSSM); + uiDefIconButBitS(block, TOG, CONT_DEL, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller"); + uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings"); + uiBlockSetEmboss(block, UI_EMBOSSP); + sprintf(name, "%d", first_bit(cont->state_mask)+1); + uiDefBlockBut(block, controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22, 19, "Set controller state mask"); + uiBlockSetEmboss(block, UI_EMBOSSM); - cont= cont->next; + if(cont->flag & CONT_SHOW) { + cont->otype= cont->type; + uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 100, 19, &cont->type, 0, 0, 0, 0, "Controller type"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-166), 19, cont->name, 0, 31, 0, 0, "Controller name"); + uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0); + + ycoo= yco; + yco= draw_controllerbuttons(cont, block, xco, yco, width); + if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; + } + else { + cpack(0x999999); + glRecti(xco+22, yco, xco+width-22,yco+19); + but= uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 100, 19, cont, 0, 0, 0, 0, "Controller type"); + uiButSetFunc(but, sca_move_controller, cont, NULL); + but= uiDefBut(block, LABEL, 0, cont->name,(short)(xco+122), yco,(short)(width-166), 19, cont, 0, 0, 0, 0, "Controller name"); + uiButSetFunc(but, sca_move_controller, cont, NULL); + ycoo= yco; + } + + but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, 19, 19, NULL, 0, 0, 0, 0, ""); + uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR); + + uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, 19, 19, cont, LINK_CONTROLLER, 0, 0, 0, ""); + /* offset is >0 if at least one controller was displayed */ + offset++; + yco-=20; + } + cont= cont->next; + } + } yco-= 6; } } /* ******************************* */ - xco= 985; yco= 170; width= 280; + xco= 375; yco= 170; width= 250; + + uiBlockSetEmboss(block, UI_EMBOSSP); + uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 70, 19, ""); + uiBlockSetEmboss(block, UI_EMBOSS); + + uiBlockBeginAlign(block); + uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+80, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); + uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+80+(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); + uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+80+2*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); + uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "Sta", xco+80+3*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states"); + uiBlockEndAlign(block); + + for(a=0; ascavisflag & OB_VIS_SENS) == 0) continue; + + /* presume it is only objects for now */ + uiBlockSetEmboss(block, UI_EMBOSS); + uiBlockBeginAlign(block); + if(ob->sensors.first) uiSetCurFont(block, UI_HELVB); + uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors"); + if(ob->sensors.first) uiSetCurFont(block, UI_HELV); + uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor"); + uiBlockEndAlign(block); + yco-=20; + + if(ob->scaflag & OB_SHOWSENS) { + + sens= ob->sensors.first; + while(sens) { + if (!(G.buts->scaflag & BUTS_SENS_STATE) || + sens->totlinks == 0 || /* always display sensor without links so that is can be edited */ + is_sensor_linked(block, sens)) { + sens->flag |= SENS_VISIBLE; + uiBlockSetEmboss(block, UI_EMBOSSM); + uiDefIconButBitS(block, TOG, SENS_DEL, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor"); + uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings"); + + ycoo= yco; + if(sens->flag & SENS_SHOW) + { + uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 100, 19, &sens->type, 0, 0, 0, 0, "Sensor type"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, sens->name, 0, 31, 0, 0, "Sensor name"); + uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0); + + sens->otype= sens->type; + yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name); + if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; + } + else { + set_col_sensor(sens->type, 1); + glRecti(xco+22, yco, xco+width-22,yco+19); + but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 100, 19, sens, 0, 0, 0, 0, ""); + uiButSetFunc(but, sca_move_sensor, sens, NULL); + but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+122), yco, (short)(width-144), 19, sens, 0, 31, 0, 0, ""); + uiButSetFunc(but, sca_move_sensor, sens, NULL); + } + + but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, 19, 19, NULL, 0, 0, 0, 0, ""); + uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER); + + yco-=20; + } + sens= sens->next; + } + yco-= 6; + } + } + + /* ******************************* */ + xco= 1040; yco= 170; width= 280; uiBlockSetEmboss(block, UI_EMBOSSP); - uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 100, 19, ""); + uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 90, 19, ""); uiBlockSetEmboss(block, UI_EMBOSS); uiBlockBeginAlign(block); - uiDefButBitS(block, TOG, BUTS_ACT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); - uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); - uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); + uiDefButBitS(block, TOG, BUTS_ACT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); + uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); + uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); + uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "Sta", xco+110+3*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states"); uiBlockEndAlign(block); for(a=0; aactuators.first; while(act) { - uiBlockSetEmboss(block, UI_EMBOSSM); - uiDefIconButBitS(block, TOG, ACT_DEL, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator"); - uiDefIconButBitS(block, ICONTOG, ACT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings"); + if (!(G.buts->scaflag & BUTS_ACT_STATE) || + !(act->flag & ACT_LINKED) || /* always display actuators without links so that is can be edited */ + (act->flag & ACT_VISIBLE)) { /* this actuator has visible connection, display it */ + act->flag |= ACT_VISIBLE; /* mark the actuator as visible to help implementing the up/down action */ + uiBlockSetEmboss(block, UI_EMBOSSM); + uiDefIconButBitS(block, TOG, ACT_DEL, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator"); + uiDefIconButBitS(block, ICONTOG, ACT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings"); - if(act->flag & ACT_SHOW) { - act->otype= act->type; - uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 100, 19, &act->type, 0, 0, 0, 0, "Actuator type"); - but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, act->name, 0, 31, 0, 0, "Actuator name"); - uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0); + if(act->flag & ACT_SHOW) { + act->otype= act->type; + uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 100, 19, &act->type, 0, 0, 0, 0, "Actuator type"); + but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, act->name, 0, 31, 0, 0, "Actuator name"); + uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0); - ycoo= yco; - yco= draw_actuatorbuttons(act, block, xco, yco, width); - if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; + ycoo= yco; + yco= draw_actuatorbuttons(ob, act, block, xco, yco, width); + if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2; + } + else { + set_col_actuator(act->type, 1); + glRecti((short)(xco+22), yco, (short)(xco+width-22),(short)(yco+19)); + but= uiDefBut(block, LABEL, 0, actuator_name(act->type), (short)(xco+22), yco, 100, 19, act, 0, 0, 0, 0, "Actuator type"); + uiButSetFunc(but, sca_move_actuator, act, NULL); + but= uiDefBut(block, LABEL, 0, act->name, (short)(xco+122), yco, (short)(width-144), 19, act, 0, 0, 0, 0, "Actuator name"); + uiButSetFunc(but, sca_move_actuator, act, NULL); + ycoo= yco; + } + + uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, 19, 19, act, LINK_ACTUATOR, 0, 0, 0, ""); + + yco-=20; } - else { - set_col_actuator(act->type, 1); - glRecti((short)(xco+22), yco, (short)(xco+width-22),(short)(yco+19)); - but= uiDefBut(block, LABEL, 0, actuator_name(act->type), (short)(xco+22), yco, 100, 19, act, 0, 0, 0, 0, "Actuator type"); - uiButSetFunc(but, sca_move_actuator, act, NULL); - but= uiDefBut(block, LABEL, 0, act->name, (short)(xco+122), yco, (short)(width-144), 19, act, 0, 0, 0, 0, "Actuator name"); - uiButSetFunc(but, sca_move_actuator, act, NULL); - ycoo= yco; - } - - uiDefIconBut(block, INLINK, 0, ICON_INLINK,(short)(xco-19), ycoo, 19, 19, act, LINK_ACTUATOR, 0, 0, 0, ""); - - yco-=20; - act= act->next; } yco-= 6; diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 6582866d9a1..4fbf92d646e 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -2797,6 +2797,10 @@ static void ui_add_link_line(ListBase *listb, uiBut *but, uiBut *bt) line->to= bt; } +uiBut *uiFindInlink(uiBlock *block, void *poin) +{ + return ui_find_inlink(block, poin); +} void uiComposeLinks(uiBlock *block) { diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 32946267202..21c18634e21 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2324,6 +2324,14 @@ void BL_ConvertBlenderObjects(struct Main* maggie, bool isInActiveLayer = (blenderobj->lay & activeLayerBitInfo)!=0; BL_ConvertSensors(blenderobj,gameobj,logicmgr,kxscene,keydev,executePriority,activeLayerBitInfo,isInActiveLayer,canvas,converter); } + // apply the initial state to controllers + for ( i=0;iGetCount();i++) + { + KX_GameObject* gameobj = static_cast(logicbrick_conversionlist->GetValue(i)); + struct Object* blenderobj = converter->FindBlenderObject(gameobj); + gameobj->SetState(blenderobj->state); + } + #endif //CONVERT_LOGIC logicbrick_conversionlist->Release(); diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index f219c3a1472..c02c2a29595 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -56,6 +56,7 @@ #include "KX_ConstraintActuator.h" #include "KX_CameraActuator.h" #include "KX_GameActuator.h" +#include "KX_StateActuator.h" #include "KX_VisibilityActuator.h" #include "KX_SCA_AddObjectActuator.h" #include "KX_SCA_EndObjectActuator.h" @@ -857,7 +858,19 @@ void BL_ConvertActuators(char* maggiename, baseact = tmp_vis_act; } break; - + + case ACT_STATE: + { + bStateActuator *sta_act = (bStateActuator *) bact->data; + KX_StateActuator * tmp_sta_act = NULL; + + tmp_sta_act = + new KX_StateActuator(gameobj, sta_act->type, sta_act->mask); + + baseact = tmp_sta_act; + } + break; + case ACT_2DFILTER: { bTwoDFilterActuator *_2dfilter = (bTwoDFilterActuator*) bact->data; diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp index a26cfa95b6d..179dd9f8478 100644 --- a/source/gameengine/Converter/KX_ConvertControllers.cpp +++ b/source/gameengine/Converter/KX_ConvertControllers.cpp @@ -161,6 +161,7 @@ void BL_ConvertControllers( if (gamecontroller) { gamecontroller->SetExecutePriority(executePriority++); + gamecontroller->SetState(bcontr->state_mask); STR_String uniquename = bcontr->name; uniquename += "#CONTR#"; uniqueint++; diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp index 67df5d091ab..f9fbf2387c4 100644 --- a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp +++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp @@ -53,10 +53,13 @@ SCA_AlwaysSensor::SCA_AlwaysSensor(class SCA_EventManager* eventmgr, : SCA_ISensor(gameobj,eventmgr, T) { //SetDrawColor(255,0,0); - m_alwaysresult = true; + Init(); } - +void SCA_AlwaysSensor::Init() +{ + m_alwaysresult = true; +} SCA_AlwaysSensor::~SCA_AlwaysSensor() { diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.h b/source/gameengine/GameLogic/SCA_AlwaysSensor.h index 474ed025432..8bf2a8aa98e 100644 --- a/source/gameengine/GameLogic/SCA_AlwaysSensor.h +++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.h @@ -45,6 +45,8 @@ public: virtual CValue* GetReplica(); virtual bool Evaluate(CValue* event); virtual bool IsPositiveTrigger(); + virtual void Init(); + /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ diff --git a/source/gameengine/GameLogic/SCA_IActuator.cpp b/source/gameengine/GameLogic/SCA_IActuator.cpp index 568d0eb4a89..eeca2d7b44c 100644 --- a/source/gameengine/GameLogic/SCA_IActuator.cpp +++ b/source/gameengine/GameLogic/SCA_IActuator.cpp @@ -36,6 +36,7 @@ using namespace std; SCA_IActuator::SCA_IActuator(SCA_IObject* gameobj, PyTypeObject* T) : + m_links(0), SCA_ILogicBrick(gameobj,T) { // nothing to do @@ -109,3 +110,12 @@ SCA_IActuator::~SCA_IActuator() RemoveAllEvents(); } +void SCA_IActuator::DecLink() +{ + m_links--; + if (m_links < 0) + { + printf("Warning: actuator %s has negative m_links: %d\n", m_name.Ptr(), m_links); + m_links = 0; + } +} diff --git a/source/gameengine/GameLogic/SCA_IActuator.h b/source/gameengine/GameLogic/SCA_IActuator.h index b802aa4b298..774b27c5ad4 100644 --- a/source/gameengine/GameLogic/SCA_IActuator.h +++ b/source/gameengine/GameLogic/SCA_IActuator.h @@ -34,8 +34,11 @@ class SCA_IActuator : public SCA_ILogicBrick { + friend class SCA_LogicManager; protected: std::vector m_events; + int m_links; // number of active links to controllers + // when 0, the actuator is automatically stopped void RemoveAllEvents(); public: @@ -83,6 +86,10 @@ public: */ bool IsNegativeEvent() const; virtual ~SCA_IActuator(); + + void IncLink() { m_links++; } + void DecLink(); + bool IsNoLink() const { return !m_links; } }; #endif //__KX_IACTUATOR diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp index 5cb62678c6b..bbe5a51db3c 100644 --- a/source/gameengine/GameLogic/SCA_IController.cpp +++ b/source/gameengine/GameLogic/SCA_IController.cpp @@ -29,6 +29,7 @@ #include "SCA_IController.h" #include "SCA_LogicManager.h" #include "SCA_IActuator.h" +#include "SCA_ISensor.h" #ifdef HAVE_CONFIG_H #include @@ -37,6 +38,7 @@ SCA_IController::SCA_IController(SCA_IObject* gameobj, PyTypeObject* T) : + m_statemask(0), SCA_ILogicBrick(gameobj,T) { } @@ -45,6 +47,7 @@ SCA_IController::SCA_IController(SCA_IObject* gameobj, SCA_IController::~SCA_IController() { + UnlinkAllActuators(); } @@ -65,6 +68,14 @@ const std::vector& SCA_IController::GetLinkedActuators() void SCA_IController::UnlinkAllSensors() { + if (IsActive()) + { + std::vector::iterator sensit; + for (sensit = m_linkedsensors.begin();!(sensit==m_linkedsensors.end());++sensit) + { + (*sensit)->DecLink(); + } + } m_linkedsensors.clear(); } @@ -72,6 +83,14 @@ void SCA_IController::UnlinkAllSensors() void SCA_IController::UnlinkAllActuators() { + if (IsActive()) + { + std::vector::iterator actit; + for (actit = m_linkedactuators.begin();!(actit==m_linkedactuators.end());++actit) + { + (*actit)->DecLink(); + } + } m_linkedactuators.clear(); } @@ -95,26 +114,94 @@ void SCA_IController::Trigger(SCA_LogicManager* logicmgr) void SCA_IController::LinkToActuator(SCA_IActuator* actua) { m_linkedactuators.push_back(actua); + if (IsActive()) + { + actua->IncLink(); + } } void SCA_IController::UnlinkActuator(class SCA_IActuator* actua) { std::vector::iterator actit; - std::vector::iterator actfound = m_linkedactuators.end(); for (actit = m_linkedactuators.begin();!(actit==m_linkedactuators.end());++actit) { if ((*actit) == actua) - actfound = actit; + { + break; + } } - if (!(actfound==m_linkedactuators.end())) + if (!(actit==m_linkedactuators.end())) { - m_linkedactuators.erase(actfound); + m_linkedactuators.erase(actit); + if (IsActive()) + { + (*actit)->DecLink(); + } } - } void SCA_IController::LinkToSensor(SCA_ISensor* sensor) { m_linkedsensors.push_back(sensor); + if (IsActive()) + { + sensor->IncLink(); + } } + +void SCA_IController::UnlinkSensor(class SCA_ISensor* sensor) +{ + std::vector::iterator sensit; + for (sensit = m_linkedsensors.begin();!(sensit==m_linkedsensors.end());++sensit) + { + if ((*sensit) == sensor) + { + break; + } + + } + if (!(sensit==m_linkedsensors.end())) + { + m_linkedsensors.erase(sensit); + if (IsActive()) + { + (*sensit)->DecLink(); + } + } +} + +void SCA_IController::ApplyState(unsigned int state) +{ + std::vector::iterator actit; + std::vector::iterator sensit; + + if (m_statemask & state) + { + if (!IsActive()) + { + // reactive the controller, all the links to actuator are valid again + for (actit = m_linkedactuators.begin();!(actit==m_linkedactuators.end());++actit) + { + (*actit)->IncLink(); + } + for (sensit = m_linkedsensors.begin();!(sensit==m_linkedsensors.end());++sensit) + { + (*sensit)->IncLink(); + } + SetActive(true); + } + } else if (IsActive()) + { + for (actit = m_linkedactuators.begin();!(actit==m_linkedactuators.end());++actit) + { + (*actit)->DecLink(); + } + for (sensit = m_linkedsensors.begin();!(sensit==m_linkedsensors.end());++sensit) + { + (*sensit)->DecLink(); + } + SetActive(false); + } +} + diff --git a/source/gameengine/GameLogic/SCA_IController.h b/source/gameengine/GameLogic/SCA_IController.h index 79e956dec4e..f67c0942eb4 100644 --- a/source/gameengine/GameLogic/SCA_IController.h +++ b/source/gameengine/GameLogic/SCA_IController.h @@ -36,6 +36,7 @@ class SCA_IController : public SCA_ILogicBrick protected: std::vector m_linkedsensors; std::vector m_linkedactuators; + unsigned int m_statemask; public: SCA_IController(SCA_IObject* gameobj,PyTypeObject* T); virtual ~SCA_IController(); @@ -47,6 +48,9 @@ public: void UnlinkAllSensors(); void UnlinkAllActuators(); void UnlinkActuator(class SCA_IActuator* actua); + void UnlinkSensor(class SCA_ISensor* sensor); + void SetState(unsigned int state) { m_statemask = state; } + void ApplyState(unsigned int state); }; diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index 6df9e23f3fa..826e7bbdf0e 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -40,7 +40,7 @@ MT_Point3 SCA_IObject::m_sDummy=MT_Point3(0,0,0); -SCA_IObject::SCA_IObject(PyTypeObject* T): CValue(T) +SCA_IObject::SCA_IObject(PyTypeObject* T): m_state(0), CValue(T) { m_suspended = false; } @@ -329,6 +329,17 @@ void SCA_IObject::Resume(void) } } +void SCA_IObject::SetState(unsigned int state) +{ + m_state = state; + // update the status of the controllers + SCA_ControllerList::iterator contit; + for (contit = m_controllers.begin(); contit != m_controllers.end(); contit++) + { + (*contit)->ApplyState(m_state); + } +} + /* ------------------------------------------------------------------------- */ diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index e8251e0ceaa..07b4310a91e 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -67,7 +67,12 @@ protected: * Ignore updates? */ bool m_suspended; - + + /** + * current state = bit mask of state that are active + */ + unsigned int m_state; + public: SCA_IObject(PyTypeObject* T=&Type); @@ -111,7 +116,17 @@ public: * Resume progress */ void Resume(void); - + + /** + * Set the object state + */ + void SetState(unsigned int state); + + /** + * Get the object state + */ + unsigned int GetState(void) { return m_state; } + // const class MT_Point3& ConvertPythonPylist(PyObject* pylist); // here come the python forwarded methods diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 9fdee0c19da..1c29eb27be5 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -52,6 +52,7 @@ SCA_ISensor::SCA_ISensor(SCA_IObject* gameobj, SCA_ILogicBrick(gameobj,T), m_triggered(false) { + m_links = 0; m_suspended = false; m_invert = false; m_pos_ticks = 0; @@ -111,6 +112,25 @@ void SCA_ISensor::Resume() { m_suspended = false; } +void SCA_ISensor::Init() { + printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name); +} + +void SCA_ISensor::DecLink() { + m_links--; + if (m_links < 0) + { + printf("Warning: sensor %s has negative m_links: %d\n", m_name.Ptr(), m_links); + m_links = 0; + } + if (!m_links) + { + // sensor is detached from all controllers, initialize it so that it + // is fresh as at startup when it is reattached again. + Init(); + } +} + /* python integration */ PyTypeObject SCA_ISensor::Type = { @@ -177,7 +197,8 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr, CValue* event) { // calculate if a __triggering__ is wanted - if (!m_suspended) { + // don't evaluate a sensor that is not connected to any controller + if (m_links && !m_suspended) { bool result = this->Evaluate(event); if (result) { logicmgr->AddActivatedSensor(this); diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index e14fb34241a..292b2d160ae 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -64,6 +64,9 @@ class SCA_ISensor : public SCA_ILogicBrick /** Sensor must ignore updates? */ bool m_suspended; + /** number of connections to controller */ + int m_links; + /** Pass the activation on to the logic manager.*/ void SignalActivation(class SCA_LogicManager* logicmgr); @@ -81,6 +84,7 @@ public: void Activate(class SCA_LogicManager* logicmgr,CValue* event); virtual bool Evaluate(CValue* event) = 0; virtual bool IsPositiveTrigger(); + virtual void Init(); virtual PyObject* _getattr(const STR_String& attr); virtual CValue* GetReplica()=0; @@ -114,6 +118,12 @@ public: /** Resume sensing. */ void Resume(); + void IncLink() + { m_links++; } + void DecLink(); + bool IsNoLink() const + { return !m_links; } + /* Python functions: */ KX_PYMETHOD_DOC(SCA_ISensor,IsPositive); KX_PYMETHOD_DOC(SCA_ISensor,GetUsePosPulseMode); diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index b0e7fee130d..81938f05af1 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -64,9 +64,13 @@ std::cout << " button flag "<< m_buttonf << std::endl; std::cout << " hat " << m_hat << std::endl; std::cout << " hat flag " << m_hatf << std::endl; */ - m_istrig=0; + Init(); } +void SCA_JoystickSensor::Init() +{ + m_istrig=0; +} SCA_JoystickSensor::~SCA_JoystickSensor() { diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h index 2fbe1edf1e7..69068da6494 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.h +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h @@ -95,6 +95,7 @@ public: virtual bool Evaluate(CValue* event); virtual bool IsPositiveTrigger(); + virtual void Init(); /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index f13b1bcf4c9..c6c06846e3b 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -62,7 +62,7 @@ SCA_KeyboardSensor::SCA_KeyboardSensor(SCA_KeyboardManager* keybdmgr, if (hotkey == SCA_IInputDevice::KX_ESCKEY) keybdmgr->GetInputDevice()->HookEscape(); // SetDrawColor(0xff0000ff); - m_val=0; + Init(); } @@ -71,7 +71,14 @@ SCA_KeyboardSensor::~SCA_KeyboardSensor() { } - +void SCA_KeyboardSensor::Init() +{ + // this function is used when the sensor is disconnected from all controllers + // by the state engine. It reinitializes the sensor as if it was just created. + // However, if the target key is pressed when the sensor is reactivated, it + // will not generated an event (see remark in Evaluate()). + m_val = 0; +} CValue* SCA_KeyboardSensor::GetReplica() { diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h index e87eddecd32..b86f6931d27 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h @@ -114,6 +114,8 @@ public: PyTypeObject* T=&Type ); virtual ~SCA_KeyboardSensor(); virtual CValue* GetReplica(); + virtual void Init(); + short int GetHotkey(); virtual bool Evaluate(CValue* event); diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp index 49f01d643e5..fb1a2c29eb6 100644 --- a/source/gameengine/GameLogic/SCA_LogicManager.cpp +++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp @@ -165,6 +165,11 @@ void* SCA_LogicManager::FindBlendObjByGameMeshName(const STR_String& gamemeshnam void SCA_LogicManager::RemoveSensor(SCA_ISensor* sensor) { + controllerlist contlist = m_sensorcontrollermapje[sensor]; + for (controllerlist::const_iterator c= contlist.begin();!(c==contlist.end());c++) + { + (*c)->UnlinkSensor(sensor); + } m_sensorcontrollermapje.erase(sensor); for (vector::const_iterator ie=m_eventmanagers.begin(); @@ -176,6 +181,8 @@ void SCA_LogicManager::RemoveSensor(SCA_ISensor* sensor) void SCA_LogicManager::RemoveController(SCA_IController* controller) { + controller->UnlinkAllSensors(); + controller->UnlinkAllActuators(); std::map::iterator sit; for (sit = m_sensorcontrollermapje.begin();!(sit==m_sensorcontrollermapje.end());++sit) { @@ -236,7 +243,8 @@ void SCA_LogicManager::BeginFrame(double curtime, double fixedtime) !(c==contlist.end());c++) { SCA_IController* contr = *c;//controllerarray->at(c); - triggeredControllerSet.insert(SmartControllerPtr(contr,0)); + if (contr->IsActive()) + triggeredControllerSet.insert(SmartControllerPtr(contr,0)); } //sensor->SetActive(false); } @@ -273,6 +281,16 @@ void SCA_LogicManager::UpdateFrame(double curtime, bool frame) (*ia)->SetActive(false); //m_activeactuators.pop_back(); + } else if ((*ia)->IsNoLink()) + { + // This actuator has no more links but it still active + // make sure it will get a negative event on next frame to stop it + // Do this check after Update() rather than before to make sure + // that all the actuators that are activated at same time than a state + // actuator have a chance to execute. + CValue* event = new CBoolValue(false); + (*ia)->RemoveAllEvents(); + (*ia)->AddEvent(event); } } diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index 8810b7470ed..11e67eda014 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -58,7 +58,6 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr, { m_mousemode = mousemode; m_triggermode = true; - m_val = 0; /* stores the latest attribute */ switch (m_mousemode) { case KX_MOUSESENSORMODE_LEFTBUTTON: @@ -79,7 +78,12 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr, default: ; /* ignore, no hotkey */ } + Init(); +} +void SCA_MouseSensor::Init() +{ + m_val = 0; /* stores the latest attribute */ } SCA_MouseSensor::~SCA_MouseSensor() diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h index 86c9d96a800..26a1c5e3fd2 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.h +++ b/source/gameengine/GameLogic/SCA_MouseSensor.h @@ -96,7 +96,7 @@ class SCA_MouseSensor : public SCA_ISensor virtual ~SCA_MouseSensor(); virtual CValue* GetReplica(); virtual bool Evaluate(CValue* event); - + virtual void Init(); virtual bool IsPositiveTrigger(); short int GetModeKey(); SCA_IInputDevice::KX_EnumInputs GetHotKey(); diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index f1fcb18d32e..d6eb246ffd2 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -57,7 +57,6 @@ SCA_PropertySensor::SCA_PropertySensor(SCA_EventManager* eventmgr, m_lastresult(false), m_range_expr(NULL) { - m_recentresult=false; //CParser pars; //pars.SetContext(this->AddRef()); //CValue* resultval = m_rightexpr->Calculate(); @@ -73,7 +72,12 @@ SCA_PropertySensor::SCA_PropertySensor(SCA_EventManager* eventmgr, { PrecalculateRangeExpression(); } + Init(); +} +void SCA_PropertySensor::Init() +{ + m_recentresult = false; } void SCA_PropertySensor::PrecalculateRangeExpression() diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h index 81c9b958f25..6871cb3afdc 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.h +++ b/source/gameengine/GameLogic/SCA_PropertySensor.h @@ -77,6 +77,7 @@ public: virtual void Delete(); virtual ~SCA_PropertySensor(); virtual CValue* GetReplica(); + virtual void Init(); void PrecalculateRangeExpression(); bool CheckPropertyCondition(); diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp index 0e856e0d6bb..3626522e49a 100644 --- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp +++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp @@ -50,16 +50,9 @@ SCA_RandomSensor::SCA_RandomSensor(SCA_EventManager* eventmgr, PyTypeObject* T) : SCA_ISensor(gameobj,eventmgr, T) { - m_iteration = 0; - m_interval = 0; - m_lastdraw = false; - // m_basegenerator is never deleted => memory leak m_basegenerator = new SCA_RandomNumberGenerator(startseed); - m_currentDraw = m_basegenerator->Draw(); - //registration is done globally, don't do it here - //Note: it was probably done to work around a bug in Evaluate(). It is now fixed - //RegisterToManager(); + Init(); } @@ -69,6 +62,13 @@ SCA_RandomSensor::~SCA_RandomSensor() /* Nothing to be done here. */ } +void SCA_RandomSensor::Init() +{ + m_iteration = 0; + m_interval = 0; + m_lastdraw = false; + m_currentDraw = m_basegenerator->Draw(); +} CValue* SCA_RandomSensor::GetReplica() diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h index cc54179aa4e..d29bfb6837a 100644 --- a/source/gameengine/GameLogic/SCA_RandomSensor.h +++ b/source/gameengine/GameLogic/SCA_RandomSensor.h @@ -54,6 +54,7 @@ public: virtual CValue* GetReplica(); virtual bool Evaluate(CValue* event); virtual bool IsPositiveTrigger(); + virtual void Init(); /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index e320453b7aa..027cb2a0ffa 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -58,10 +58,15 @@ KX_NetworkMessageSensor::KX_NetworkMessageSensor( m_NetworkScene(NetworkScene), m_subject(subject), m_frame_message_count (0), - m_IsUp(false), m_BodyList(NULL), m_SubjectList(NULL) { + Init(); +} + +void KX_NetworkMessageSensor::Init() +{ + m_IsUp = false; } KX_NetworkMessageSensor::~KX_NetworkMessageSensor() diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h index d051b715aab..6fd92d17be3 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h @@ -65,6 +65,7 @@ public: virtual CValue* GetReplica(); virtual bool Evaluate(CValue* event); virtual bool IsPositiveTrigger(); + virtual void Init(); void EndFrame(); /* ------------------------------------------------------------- */ diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index 60b90138abe..f306f0dbfbb 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -69,11 +69,14 @@ KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr, m_gp_canvas(canvas), m_kxscene(kxscene) { + Init(); +} +void KX_MouseFocusSensor::Init() +{ m_mouse_over_in_previous_frame = false; m_positive_event = false; m_hitObject = 0; - } bool KX_MouseFocusSensor::Evaluate(CValue* event) diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index 86f32fbf4be..b011ebe1288 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -68,6 +68,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor * @attention Overrides default evaluate. */ virtual bool Evaluate(CValue* event); + virtual void Init(); virtual bool IsPositiveTrigger() { bool result = m_positive_event; diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index 31fffffa3c1..987e0b946b2 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -71,7 +71,6 @@ KX_RadarSensor::KX_RadarSensor(SCA_EventManager* eventmgr, //sumoObj->setClientObject(&m_client_info); } - KX_RadarSensor::~KX_RadarSensor() { diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index a85dc61cac8..02b814105b4 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -60,17 +60,19 @@ KX_RaySensor::KX_RaySensor(class SCA_EventManager* eventmgr, m_bFindMaterial(bFindMaterial), m_distance(distance), m_scene(ketsjiScene), - m_bTriggered(false), - m_axis(axis), - m_rayHit(false), - m_hitObject(NULL) + m_axis(axis) { - + Init(); } - +void KX_RaySensor::Init() +{ + m_bTriggered = false; + m_rayHit = false; + m_hitObject = NULL; +} KX_RaySensor::~KX_RaySensor() { diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h index 8a317ffaa07..f4305b053d1 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.h +++ b/source/gameengine/Ketsji/KX_RaySensor.h @@ -66,6 +66,7 @@ public: virtual bool Evaluate(CValue* event); virtual bool IsPositiveTrigger(); + virtual void Init(); bool RayHit(KX_ClientObjectInfo* client, MT_Point3& hit_point, MT_Vector3& hit_normal, void * const data); diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index fff33ca82fd..1526709f425 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -754,8 +754,6 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) for (SCA_ControllerList::iterator itc = controllers.begin(); !(itc==controllers.end());itc++) { - (*itc)->UnlinkAllSensors(); - (*itc)->UnlinkAllActuators(); m_logicmgr->RemoveController(*itc); } diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp new file mode 100644 index 00000000000..95a79f0c480 --- /dev/null +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -0,0 +1,207 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + * Actuator to toggle visibility/invisibility of objects + */ + +#include "KX_StateActuator.h" +#include "KX_GameObject.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +KX_StateActuator::KX_StateActuator( + SCA_IObject* gameobj, + int operation, + unsigned int mask, + PyTypeObject* T + ) + : SCA_IActuator(gameobj,T), + m_operation(operation), + m_mask(mask) +{ + // intentionally empty +} + +KX_StateActuator::~KX_StateActuator( + void + ) +{ + // intentionally empty +} + +CValue* +KX_StateActuator::GetReplica( + void + ) +{ + KX_StateActuator* replica = new KX_StateActuator(*this); + replica->ProcessReplica(); + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + return replica; +} + +bool +KX_StateActuator::Update() +{ + bool bNegativeEvent = IsNegativeEvent(); + unsigned int objMask; + + RemoveAllEvents(); + if (bNegativeEvent) return false; + + KX_GameObject *obj = (KX_GameObject*) GetParent(); + + objMask = obj->GetState(); + switch (m_operation) + { + case OP_CPY: + objMask = m_mask; + break; + case OP_SET: + objMask |= m_mask; + break; + case OP_CLR: + objMask &= ~m_mask; + break; + case OP_NEG: + objMask ^= m_mask; + break; + default: + // unsupported operation, no nothing + return false; + } + obj->SetState(objMask); + return false; +} + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + + + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject +KX_StateActuator::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "KX_StateActuator", + sizeof(KX_StateActuator), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject +KX_StateActuator::Parents[] = { + &KX_StateActuator::Type, + &SCA_IActuator::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef +KX_StateActuator::Methods[] = { + {"setOperation", (PyCFunction) KX_StateActuator::sPySetOperation, + METH_VARARGS, SetOperation_doc}, + {"setMask", (PyCFunction) KX_StateActuator::sPySetMask, + METH_VARARGS, SetMask_doc}, + {NULL,NULL} //Sentinel +}; + +PyObject* +KX_StateActuator::_getattr( + const STR_String& attr + ) +{ + _getattr_up(SCA_IActuator); +}; + + + +/* set operation ---------------------------------------------------------- */ +char +KX_StateActuator::SetOperation_doc[] = +"setOperation(op)\n" +"\t - op : bit operation (0=Copy, 1=Set, 2=Clear, 3=Negate)" +"\tSet the type of bit operation to be applied on object state mask.\n" +"\tUse setMask() to specify the bits that will be modified.\n"; +PyObject* + +KX_StateActuator::PySetOperation(PyObject* self, + PyObject* args, + PyObject* kwds) { + int oper; + + if(!PyArg_ParseTuple(args, "i", &oper)) { + return NULL; + } + + m_operation = oper; + + Py_Return; +} + +/* set mask ---------------------------------------------------------- */ +char +KX_StateActuator::SetMask_doc[] = +"setMask(mask)\n" +"\t - mask : bits that will be modified" +"\tSet the value that defines the bits that will be modified by the operation.\n" +"\tThe bits that are 1 in the value will be updated in the object state,\n" +"\tthe bits that are 0 are will be left unmodified expect for the Copy operation\n" +"\twhich copies the value to the object state.\n"; +PyObject* + +KX_StateActuator::PySetMask(PyObject* self, + PyObject* args, + PyObject* kwds) { + int mask; + + if(!PyArg_ParseTuple(args, "i", &mask)) { + return NULL; + } + + m_mask = mask; + + Py_Return; +} + + diff --git a/source/gameengine/Ketsji/KX_StateActuator.h b/source/gameengine/Ketsji/KX_StateActuator.h new file mode 100644 index 00000000000..8698e51b2c1 --- /dev/null +++ b/source/gameengine/Ketsji/KX_StateActuator.h @@ -0,0 +1,83 @@ +/* + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + * Actuator to toggle visibility/invisibility of objects + */ + +#ifndef __KX_STATEACTUATOR +#define __KX_STATEACTUATOR + +#include "SCA_IActuator.h" + +class KX_StateActuator : public SCA_IActuator +{ + Py_Header; + + /** Make visible? */ + enum { + OP_CPY = 0, + OP_SET, + OP_CLR, + OP_NEG + }; + int m_operation; + unsigned int m_mask; + + public: + + KX_StateActuator( + SCA_IObject* gameobj, + int operation, + unsigned int mask, + PyTypeObject* T=&Type + ); + + virtual + ~KX_StateActuator( + void + ); + + virtual CValue* + GetReplica( + void + ); + + virtual bool + Update(); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + //KX_PYMETHOD_DOC + KX_PYMETHOD_DOC(KX_StateActuator,SetOperation); + KX_PYMETHOD_DOC(KX_StateActuator,SetMask); +}; + +#endif + diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 3f185359de0..56c2780871b 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -77,18 +77,14 @@ KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj :SCA_ISensor(gameobj,eventmgr,T), m_touchedpropname(touchedpropname), m_bFindMaterial(bFindMaterial), -m_eventmgr(eventmgr), +m_eventmgr(eventmgr) /*m_sumoObj(sumoObj),*/ -m_bCollision(false), -m_bTriggered(false), -m_bLastTriggered(false) { // KX_TouchEventManager* touchmgr = (KX_TouchEventManager*) eventmgr; // m_resptable = touchmgr->GetResponseTable(); // m_solidHandle = m_sumoObj->getObjectHandle(); - m_hitObject = NULL; m_colliders = new CListValue(); KX_ClientObjectInfo *client_info = gameobj->getClientInfo(); @@ -98,8 +94,16 @@ m_bLastTriggered(false) m_physCtrl = dynamic_cast(gameobj->GetPhysicsController()); MT_assert( !gameobj->GetPhysicsController() || m_physCtrl ); + Init(); } +void KX_TouchSensor::Init() +{ + m_bCollision = false; + m_bTriggered = false; + m_bLastTriggered = false; + m_hitObject = NULL; +} KX_TouchSensor::~KX_TouchSensor() { diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h index f594196628a..056440ccd6c 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.h +++ b/source/gameengine/Ketsji/KX_TouchSensor.h @@ -72,6 +72,7 @@ public: virtual CValue* GetReplica(); virtual void SynchronizeTransform(); virtual bool Evaluate(CValue* event); + virtual void Init(); virtual void ReParent(SCA_IObject* parent); virtual void RegisterSumo(KX_TouchEventManager* touchman); From 63060128ec1947287cae8ea0a1c041f2cabca87f Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 22 Jun 2008 15:48:12 +0000 Subject: [PATCH 275/430] == Redcode == Doing image comparison revealed, that Kb = Kr = 0.0 for redcode :) --- extern/libredcode/debayer.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/extern/libredcode/debayer.c b/extern/libredcode/debayer.c index f7f22e1cc54..de7bec510cb 100644 --- a/extern/libredcode/debayer.c +++ b/extern/libredcode/debayer.c @@ -9,8 +9,6 @@ void redcode_ycbcr2rgb_fullscale( int x,y; int pix_max = 4096; int mask = pix_max - 1; - float Kb = 0.0722; - float Kr = 0.2126; float *o; for (y = 0; y < height; y++) { @@ -25,9 +23,9 @@ void redcode_ycbcr2rgb_fullscale( float y2 = (planes[3][i] & mask); float y2p = (planes[3][i_p] & mask); - float b_ = cb * (1.0 - Kb)/(pix_max/2); - float r_ = cr * (1.0 - Kr)/(pix_max/2); - float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + float b_ = cb /(pix_max/2); + float r_ = cr /(pix_max/2); + float g_ = 0.0; float y_[4] = {y1 / pix_max, (y2 + y2p)/2 / pix_max, @@ -68,8 +66,6 @@ void redcode_ycbcr2rgb_halfscale( int x,y; int pix_max = 4096; int mask = pix_max - 1; - float Kb = 0.0722; - float Kr = 0.2126; for (y = 0; y < height; y++) { float *o = out + width * (height - y - 1); @@ -80,9 +76,9 @@ void redcode_ycbcr2rgb_halfscale( float cr = (planes[2][i] & mask) - pix_max/2; float y2 = (planes[3][i] & mask); - float b_ = cb * (1.0 - Kb)/(pix_max/2); - float r_ = cr * (1.0 - Kr)/(pix_max/2); - float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + float b_ = cb /(pix_max/2); + float r_ = cr /(pix_max/2); + float g_ = 0.0; float y = (y1 + y2)/2 / pix_max; @@ -101,8 +97,6 @@ void redcode_ycbcr2rgb_quarterscale( int x,y; int pix_max = 4096; int mask = pix_max - 1; - float Kb = 0.0722; - float Kr = 0.2126; for (y = 0; y < height; y += 2) { float *o = out + (width/2) * (height/2 - y/2 - 1); @@ -113,9 +107,9 @@ void redcode_ycbcr2rgb_quarterscale( float cr = (planes[2][i] & mask) - pix_max/2; float y2 = planes[3][i] & mask; - float b_ = cb * (1.0 - Kb)/(pix_max/2); - float r_ = cr * (1.0 - Kr)/(pix_max/2); - float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb); + float b_ = cb /(pix_max/2); + float r_ = cr /(pix_max/2); + float g_ = 0.0; float y = (y1 + y2)/2 / pix_max; From 381f15189d8555ff4825917f3f7076bb8524bbc4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 22 Jun 2008 19:34:18 +0000 Subject: [PATCH 276/430] bugfix, Shift+H would hide unselected objects on unseen layers. --- source/blender/src/editobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 3c945775b5b..2e5785eaab8 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -5942,7 +5942,7 @@ void hide_objects(int select) Base *base; short changed = 0, changed_act = 0; for(base = FIRSTBASE; base; base=base->next){ - if(TESTBASELIB(base)==select){ + if ((base->lay & G.vd->lay) && (TESTBASELIB(base)==select)) { base->flag &= ~SELECT; base->object->flag = base->flag; base->object->restrictflag |= OB_RESTRICT_VIEW; From abda1a9ec17d830396c72d1dccd799509cebaa80 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 22 Jun 2008 20:39:41 +0000 Subject: [PATCH 277/430] == FFMPEG == Added serious interlacing to movies opened using ffmpeg. (Other video decoders to be done) Rational: deinterlacing, if done seriously _has_ to be done in YUV-space. Since internal interface first converts data to RGB we are pretty much lost (and fall back to IMB_filtery in that case). --- source/blender/imbuf/IMB_imbuf_types.h | 1 + source/blender/imbuf/intern/anim.c | 20 ++++++++++++++++++++ source/blender/src/buttons_scene.c | 2 +- source/blender/src/sequence.c | 14 ++++++++++---- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index 94203bab447..73ef83393b0 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -149,6 +149,7 @@ typedef enum { #define IB_zbuffloat (1 << 16) #define IB_multilayer (1 << 17) #define IB_imginfo (1 << 18) +#define IB_animdeinterlace (1 << 19) /* * The bit flag is stored in the ImBuf.ftype variable. diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 87d67f5263b..7fc8145c4a7 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -638,6 +638,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { AVPacket packet; int64_t pts_to_search = 0; int pos_found = 1; + int filter_y = 0; if (anim == 0) return (0); @@ -722,6 +723,18 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { } if(frameFinished && pos_found == 1) { + if (anim->ib_flags & IB_animdeinterlace) { + if (avpicture_deinterlace( + anim->pFrame, + anim->pFrame, + anim->pCodecCtx->pix_fmt, + anim->pCodecCtx->width, + anim->pCodecCtx->height) + < 0) { + filter_y = 1; + } + } + if (G.order == B_ENDIAN) { int * dstStride = anim->pFrameRGB->linesize; @@ -823,6 +836,10 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { av_free_packet(&packet); } + if (filter_y && ibuf) { + IMB_filtery(ibuf); + } + return(ibuf); } @@ -983,6 +1000,7 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) { char head[256], tail[256]; unsigned short digits; int pic; + int filter_y = (anim->ib_flags & IB_animdeinterlace); if (anim == NULL) return(0); @@ -1040,6 +1058,7 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) { case ANIM_FFMPEG: ibuf = ffmpeg_fetchibuf(anim, position); if (ibuf) anim->curposition = position; + filter_y = 0; /* done internally */ break; #endif #ifdef WITH_REDCODE @@ -1052,6 +1071,7 @@ struct ImBuf * IMB_anim_absolute(struct anim * anim, int position) { if (ibuf) { if (anim->ib_flags & IB_ttob) IMB_flipy(ibuf); + if (filter_y) IMB_filtery(ibuf); sprintf(ibuf->name, "%s.%04d", anim->name, anim->curposition + 1); } diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 3797a92f16f..5ab4e5b6741 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -900,7 +900,7 @@ static void seq_panel_filter_video() "Convert input to float data"); uiDefButBitI(block, TOG, SEQ_FILTERY, - B_SEQ_BUT_RELOAD, "FilterY", + B_SEQ_BUT_RELOAD_FILE, "FilterY", 170,110,80,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields"); diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index bf519dd6e9c..6851929bbc2 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -445,7 +445,10 @@ void reload_sequence_new_file(Sequence * seq) seq->strip->len = seq->len; } else if (seq->type == SEQ_MOVIE) { if(seq->anim) IMB_free_anim(seq->anim); - seq->anim = openanim(str, IB_rect); + seq->anim = openanim( + str, IB_rect | + ((seq->flag & SEQ_FILTERY) + ? IB_animdeinterlace : 0)); if (!seq->anim) { return; @@ -1445,7 +1448,7 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra) seq->strip->orx= se->ibuf->x; seq->strip->ory= se->ibuf->y; - if(seq->flag & SEQ_FILTERY) { + if((seq->flag & SEQ_FILTERY) && seq->type != SEQ_MOVIE) { IMB_filtery(se->ibuf); } @@ -1772,8 +1775,11 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra, BLI_join_dirfile(name, seq->strip->dir, seq->strip->stripdata->name); BLI_convertstringcode(name, G.sce); BLI_convertstringframe(name, G.scene->r.cfra); - - seq->anim = openanim(name, IB_rect); + + seq->anim = openanim( + name, IB_rect | + ((seq->flag & SEQ_FILTERY) + ? IB_animdeinterlace : 0)); } if(seq->anim) { IMB_anim_set_preseek(seq->anim, seq->anim_preseek); From dac3434b03976b101435572559ebba7a6d1fc862 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 22 Jun 2008 20:40:13 +0000 Subject: [PATCH 278/430] [#14398] In Object- and EditMode, global rotate manual input is different than mouse The sign of the rotation angle was sometimes different between num input and mouse input. --- source/blender/include/transform.h | 6 +++--- source/blender/src/transform.c | 8 ++++---- source/blender/src/transform_constraints.c | 19 ++++++++++++------- source/blender/src/transform_snap.c | 2 +- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 7d497dc05ec..4e3b80134f9 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -102,9 +102,9 @@ typedef struct TransCon { /* Apply function pointer for linear vectorial transformation */ /* The last three parameters are pointers to the in/out/printable vectors */ void (*applySize)(struct TransInfo *, struct TransData *, float [3][3]); - /* Apply function pointer for rotation transformation (prototype will change */ - void (*applyRot)(struct TransInfo *, struct TransData *, float [3]); - /* Apply function pointer for rotation transformation (prototype will change */ + /* Apply function pointer for size transformation */ + void (*applyRot)(struct TransInfo *, struct TransData *, float [3], float *); + /* Apply function pointer for rotation transformation */ } TransCon; typedef struct TransDataIpokey { diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 4270ce6a069..705a5f868e7 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2621,7 +2621,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) continue; if (t->con.applyRot) { - t->con.applyRot(t, td, axis); + t->con.applyRot(t, td, axis, NULL); VecRotToMat3(axis, angle * td->factor, mat); } else if (t->flag & T_PROP_EDIT) { @@ -2654,7 +2654,7 @@ int Rotation(TransInfo *t, short mval[2]) snapGrid(t, &final); if (t->con.applyRot) { - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, &final); } applySnapping(t, &final); @@ -3314,7 +3314,7 @@ int PushPull(TransInfo *t, short mval[2]) } if (t->con.applyRot && t->con.mode & CON_APPLY) { - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, NULL); } for(i = 0 ; i < t->total; i++, td++) { @@ -3326,7 +3326,7 @@ int PushPull(TransInfo *t, short mval[2]) VecSubf(vec, t->center, td->center); if (t->con.applyRot && t->con.mode & CON_APPLY) { - t->con.applyRot(t, td, axis); + t->con.applyRot(t, td, axis, NULL); if (isLockConstraint(t)) { float dvec[3]; Projf(dvec, vec, axis); diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 2d01c2303fc..796b013cb88 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -393,7 +393,7 @@ static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3] * (ie: not doing counterclockwise rotations when the mouse moves clockwise). */ -static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) +static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle) { if (!td && t->con.mode & CON_APPLY) { int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2); @@ -413,9 +413,9 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) break; } /* don't flip axis if asked to or if num input */ - if (!(mode & CON_NOFLIP) && hasNumInput(&t->num) == 0) { + if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) { if (Inpf(vec, t->viewinv[2]) > 0.0f) { - VecMulf(vec, -1.0f); + *angle = -(*angle); } } } @@ -435,10 +435,15 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) * (ie: not doing counterclockwise rotations when the mouse moves clockwise). */ -static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3]) +static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle) { - if (td && t->con.mode & CON_APPLY) { + if (t->con.mode & CON_APPLY) { int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2); + + /* on setup call, use first object */ + if (td == NULL) { + td= t->data; + } switch(mode) { case CON_AXIS0: @@ -454,9 +459,9 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3]) VECCOPY(vec, td->axismtx[2]); break; } - if (!(mode & CON_NOFLIP)) { + if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) { if (Inpf(vec, t->viewinv[2]) > 0.0f) { - VecMulf(vec, -1.0f); + *angle = -(*angle); } } } diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 295cfa4574c..04ca5b08755 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -412,7 +412,7 @@ float RotationBetween(TransInfo *t, float p1[3], float p2[3]) if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) { float axis[3], tmp[3]; - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, NULL); Projf(tmp, end, axis); VecSubf(end, end, tmp); From d229db61e9f7e7e25a2c9c5cb5f4a8ce1623cc4d Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 22 Jun 2008 20:59:29 +0000 Subject: [PATCH 279/430] == Sequencer == Renamed Filter-Y to De-Interlace and moved F-Key to D-Key. (Also added file reload on D-Key) --- source/blender/src/buttons_scene.c | 2 +- source/blender/src/editseq.c | 3 ++- source/blender/src/space.c | 10 ++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 5ab4e5b6741..1c98950080a 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -900,7 +900,7 @@ static void seq_panel_filter_video() "Convert input to float data"); uiDefButBitI(block, TOG, SEQ_FILTERY, - B_SEQ_BUT_RELOAD_FILE, "FilterY", + B_SEQ_BUT_RELOAD_FILE, "De-Inter", 170,110,80,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields"); diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index fb0fac4489d..b9351f82d1e 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -2634,12 +2634,13 @@ void set_filter_seq(void) ed= G.scene->ed; if(ed==0) return; - if(okee("Set FilterY")==0) return; + if(okee("Set Deinterlace")==0) return; WHILE_SEQ(ed->seqbasep) { if(seq->flag & SELECT) { if(seq->type==SEQ_MOVIE) { seq->flag |= SEQ_FILTERY; + reload_sequence_new_file(seq); } } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index c49486a6294..585f6b59ceb 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -4976,11 +4976,13 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } break; case DKEY: - if (G.qual == (LR_CTRLKEY|LR_SHIFTKEY)) + if (G.qual == (LR_CTRLKEY|LR_SHIFTKEY)) { duplicate_marker(); - else if ((G.qual==LR_SHIFTKEY)) { + } else if ((G.qual==LR_SHIFTKEY)) { if(sseq->mainb) break; add_duplicate_seq(); + } else if (G.qual == 0) { + set_filter_seq(); } break; case EKEY: @@ -4988,10 +4990,6 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt) if((G.qual==0)) transform_seq('e', 0); break; - case FKEY: - if((G.qual==0)) - set_filter_seq(); - break; case GKEY: if (G.qual & LR_CTRLKEY) transform_markers('g', 0); From 90352534930c6c5619abbed60fdd7cf3688d1657 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 22 Jun 2008 21:48:02 +0000 Subject: [PATCH 280/430] [#14392] C3D Import c3d importer for motion capture data This could do with some improvements but for now its acceptable. - Note, could people please not mix tabs and spaces. -Text copied from the patch submission- The c3d_import with 2.46 was able to import a mocap cloud for some c3d files. I have improved it: Version History: 0.4: PERIN Released under Blender Artistic Licence 0.5: WICKES used marker names, fixed 2.45 depricated call 0.6: WICKES creates armature for each subject 0.7: WICKES constrains armature to follow the empties (markers). Verified for shake hands s 0.8: WICKES resolved DEC support issue see also http://wiki.blender.org/index.php/Tutorials%5CMoCap-Section_3 for how this program gets the mocap data into Blender and creates an armature, like the BVH script does. I'd like someone to test and verify, and if accepted, replace the current c3d_import.py --- See patch url for example files http://projects.blender.org/tracker/index.php?func=detail&aid=14392&group_id=9&atid=127 --- release/scripts/c3d_import.py | 1237 +++++++++++++++++++++++++++++++++ 1 file changed, 1237 insertions(+) create mode 100644 release/scripts/c3d_import.py diff --git a/release/scripts/c3d_import.py b/release/scripts/c3d_import.py new file mode 100644 index 00000000000..d67d56261d1 --- /dev/null +++ b/release/scripts/c3d_import.py @@ -0,0 +1,1237 @@ +#!BPY + +""" +Name: 'Motion Capture (.c3d)...' +Blender: 246 +Group: 'Import' +Tooltip: 'Import a C3D Motion Capture file' +""" +__script__ = "C3D Motion Capture file import" +__author__ = " Jean-Baptiste PERIN, Roger D. Wickes (rogerwickes@yahoo.com)" +__version__ = "0.8" +__url__ = ["Communicate problems and errors, BlenderArtists.org, Python forum"] +__email__= ["rogerwickes@yahoo.com", "c3d script"] +__bpydoc__ = """\ +c3d_import.py v0.8 + +Script loading Graphics Lab Motion Capture file, +Usage:
    + - Run the script
    + - Choose the file to open
    + - Press Import C3D button
    + +Version History: + 0.4: PERIN Released under Blender Artistic Licence + 0.5: WICKES used marker names, fixed 2.45 depricated call + 0.6: WICKES creates armature for each subject + 0.7: WICKES constrains armature to follow the empties (markers). Verified for shake hands s + 0.8: WICKES resolved DEC support issue +""" + +#---------------------------------------------- +# (c) Jean-Baptiste PERIN december 2005, released under Blender Artistic Licence +# for the Blender 2.40 Python Scripts Bundle. +#---------------------------------------------- + +###################################################### +# This script imports a C3D file into blender. +# Loader is based on MATLAB C3D loader from +# Alan Morris, Toronto, October 1998 +# Jaap Harlaar, Amsterdam, april 2002 +###################################################### + +import string +import Blender +from Blender import * +import bpy +import struct +import BPyMessages +Vector= Blender.Mathutils.Vector +Euler= Blender.Mathutils.Euler +Matrix= Blender.Mathutils.Matrix +RotationMatrix = Blender.Mathutils.RotationMatrix +TranslationMatrix= Blender.Mathutils.TranslationMatrix + +#================= +# Global Variables, Constants, Defaults, and Shorthand References +#================= +# set senstitivity for displaying debug/console messages. 0=few, 100=max, including clicks at major steps +# debug(num,string) to conditionally display status/info in console window +DEBUG=Blender.Get('rt') + +# marker sets known in the world +HUMAN_CMU= "HumanRTKm.mkr" # The Human Real-Time capture marker set used by CMU +HUMAN_CMU2="HumanRT.mkr" # found in another file, seems same as others in that series +MARKER_SETS = [ HUMAN_CMU, HUMAN_CMU2 ] # marker sets that this program supports (can make an armature for) +XYZ_LIMIT= 10000 #max value for coordinates if in integer format + +# what layers to put stuff on in scene. 1 is selected, so everything goes there +# selecting only layer 2 shows only the armature moving, 12 shows only the empties +LAYERS_ARMOB= [1,2] +LAYERS_MARKER=[1,12] +CLEAN=True # Should program ignore markers at (0,0,0) and beyond the outer limits? + +scn = Blender.Scene.GetCurrent() +# Why on earth would you rename a scene when importing data??? - Campbell +# scn.name="MoCap" #may want this enterable or derived based on motion being analyzed +#TODO: ultimately, a library of motions to append from means you need good naming of things + +BCS=Blender.Constraint.Settings # shorthand dictionary - define with brace, reference with bracket +trackto={"+x":BCS.TRACKX, "+y":BCS.TRACKY, "+z":BCS.TRACKZ, "-x":BCS.TRACKNEGX, "-y":BCS.TRACKNEGY, "-z":BCS.TRACKNEGZ} +trackup={"x":BCS.UPX, "y":BCS.UPY, "z":BCS.UPZ} + +#=============================# +# Classes +#=============================# +class Marker: + def __init__(self, x, y, z): + self.x=0.0 + self.y=0.0 + self.z=0.0 + + def __repr__(self): #report on self, as in if just printed + return str("[x = "+str(self.x) +" y = " + str(self.y)+" z = "+ str(self.z)+"]") + +class ParameterGroup: + def __init__(self, nom, description, parameter): + self.name = nom + self.description = description + self.parameter = parameter + + def __repr__(self): + return self.name, " ", self.description, " ", self.parameter + +class Parameter: + def __init__(self, name, datatype, dim, data, description): + self.name = name + self.datatype = datatype + self.dim = dim + self.data = data + self.description = description + + def __repr__(self): + return self.name, " ", self.description, " ", self.dim + +class MyVector: + def __init__(self, fx,fy,fz): + self.x=fx + self.y=fy + self.z=fz + +class Mybone: + "information structure for bone generation and posing" + def __init__(self, name,vec,par,head,tail,const): + self.name=name # name of this bone. must be unique within armature + self.vec=vec # edit bone vector it points + self.parent=par # name of parent bone to locate head and form a chain + self.headMark=head # list of 0+ markers where the head of this non-parented bone should be placed + self.tailMark=tail # list of 0+ markers where the tip should be placed + self.const=const # list of 0+ constraint tuples to control posing + self.head=MyVector(0,0,0) #T-pose location + self.tail=MyVector(0,0,0) + def __repr__(self): + return '[Mybone "%s"]' % self.name + + +#=============================# +# functions/modules +#=============================# +def error(str): + Draw.PupMenu('ERROR%t|'+str) + return +def status(str): + Draw.PupMenu('STATUS%t|'+str+"|Continue?") + return +def debug(num,msg): #use log4j or just console here. + if DEBUG >= num: + print 'debug:', (' '*num), msg + #TODO: if level 0, make a text file in Blender file to record major stuff + return + +def names(ob): return ob.name + + +######### +# Cette fonction renvoie la liste des empties +# in : +# out : emp_list (List of Object) la liste des objets de type "Empty" +######### +def getEmpty(name): + obs = [ob for ob in scn.objects if ob.type=="Empty" and ob.name==name] + if len(obs)==0: + return None + elif len(obs)==1: + return obs[0] + else: + error("FATAL ERROR: %i empties %s in file" % (len(obs),ob[0])) +######### +# Cette fonction renvoie un empty +# in : objname : le nom de l'empty recherche +# out : myobj : l'empty cree ou retrouve +######### +def GetOrCreateEmpty(objname): + myobj= getEmpty(objname) + if myobj==None: + myobj = scn.objects.new("Empty",objname) + myobj.layers= LAYERS_MARKER + debug(50,'Marker/Empty created %s' % myobj) + return myobj + +def GetOrCreateCurve(ipo, curvename): + """ + Retrieve or create a Blender Ipo Curve named C{curvename} in the C{ipo} Ipo + + >>> import mylib + + >>> lIpo = GetOrCreateIPO("Une IPO") + >>> laCurve = GetOrCreateCurve(lIpo, "RotX") + + Either an ipo curve named C{curvename} exists before the call then this curve is returned, + Or such a curve doesn't exist before the call .. then it is created into the c{ipo} Ipo and returned + + @type ipo: Blender Ipo + @param ipo: the Ipo in which the curve must be retrieved or created. + @type curvename: string + @param curvename: name of the IPO. + @rtype: Blender Curve + @return: a Blender Curve named C{curvename} in the C{ipo} Ipo + """ + try: + mycurve = ipo.getCurve(curvename) + if mycurve != None: + pass + else: + mycurve = ipo.addCurve(curvename) + except: + mycurve = ipo.addCurve(curvename) + return mycurve + +def eraseIPO (objectname): + object = Blender.Object.Get(objectname) + lIpo = object.getIpo() + if lIpo != None: + nbCurves = lIpo.getNcurves() + for i in range(nbCurves): + nbBezPoints = lIpo.getNBezPoints(i) + for j in range(nbBezPoints): + lIpo.delBezPoint(i) + +def comp_loc(emptyNameList): + myloc=Vector(0,0,0) + for emName in emptyNameList: + myobj = Blender.Object.Get(emName) + for i in range(3): + myloc[i]= myloc[i]+(myobj.loc[i]/len(emptyNameList)) #take the average loc of all marks + return myloc + +def comp_len(head, tail): # computes the length of a bone + headvec=comp_loc(head) + tailvec=comp_loc(tail) + netvec=headvec-tailvec + return netvec.length + +def createHumanCMU(): # human bone structure, makes a node set for CMU MoCap Lab + # order of bones: "spine","chest","neck","head",...face toward you in front view + # pose constraints are tuples of (type,target,influence,other-as-needed) + # constraint stack order is important. for proper bone pointing and orinetation: + # IK, then TT +YZ in world space. then LR XZ to 0 in world space, this points the bone, twists it, but then + # limits the rotation to the sidebar enpty with the Z facing it, and Y pointing along the bone. + nodes=[] # bonename, vector, parent, head targets, tail targets, constraint list + for i in range(23): nodes.append(Mybone("name","vec","par",[],[],[])) + nodes[0]= Mybone("root", "-Y","",["RBWT", "LBWT"],["RFWT", "LFWT", "RBWT", "LBWT"],[("LOC","RBWT",1.0),("LOC","LBWT",0.5),("IK","RFWT",1.0),("IK","LFWT",0.5),("TT","RBWT",1,"+YZ"),("LR","XZ",1)]) + nodes[1]= Mybone("spine","+Z","root",[],["STRN","T10"],[("IK","STRN",1.0),("IK","T10",0.5),("TT","STRN",1,"+YZ"),("LR","XZ",1)]) + nodes[2]= Mybone("chest","+Z","spine",[],["CLAV","C7"],[("IK","CLAV",1.0),("IK","C7",0.5),("TT","CLAV",1,"+YZ"),("LR","XZ",1)]) + nodes[3]= Mybone("neck", "+Z","chest",[],["RBHD","LBHD"],[("IK","RBHD",1.0),("IK","LBHD",0.5),("TT","LBHD",1,"+YZ"),("LR","XZ",1)]) + nodes[4]= Mybone("head" ,"-Y","neck",[],["RFHD","LFHD"],[("IK","RFHD",1.0),("IK","LFHD",0.5),("TT","LFHD",1,"+YZ"),("LR","XZ",1)]) + + nodes[5]= Mybone("shoulder.R","-X","chest",[],["RSHO"],[("IK","RSHO",1.0)]) + nodes[6]= Mybone("toparm.R", "-X","shoulder.R",[],["RELB"],[("IK","RELB",1.0),("TT","RUPA",1,"+YZ"),("LR","XZ",1)]) + nodes[7]= Mybone("lowarm.R", "-X","toparm.R",[],["RWRA","RWRB"],[("IK","RWRA",1.0),("IK","RWRB",0.5),("TT","RFRM",1,"+YZ"),("LR","XZ",1)]) + nodes[8]= Mybone("hand.R", "-X","lowarm.R",[],["RFIN"],[("IK","RFIN",1.0),("TT","RWRA",1,"+YZ"),("LR","XZ",1)]) #missing ,"RTHM" + + nodes[9]= Mybone("hip.R", "-X","root",[],["RFWT","RBWT"],[("IK","RFWT",1.0),("IK","RBWT",0.5)]) + nodes[10]=Mybone("topleg.R","-Z","hip.R",[],["RKNE"],[("IK","RKNE",1),("TT","RTHI",1,"+YZ"),("LR","XZ",1)]) + nodes[11]=Mybone("lowleg.R","-Z","topleg.R",[],["RANK","RHEE"],[("IK","RHEE",1.0),("TT","RSHN",1,"+YZ"),("LR","XZ",1)]) + nodes[12]=Mybone("foot.R", "-Y","lowleg.R",[],["RTOE","RMT5"],[("IK","RTOE",1.0),("IK","RMT5",0.2),("TT","RMT5",1,"+YZ")]) + nodes[13]=Mybone("toes.R", "-Y","foot.R",[],["RTOE"],[("IK","RTOE",1.0)]) + + nodes[14]=Mybone("shoulder.L","+X","chest",[],["LSHO"],[("IK","LSHO",1.0)]) + nodes[15]=Mybone("toparm.L", "+X","shoulder.L",[],["LELB"],[("IK","LELB",1.0),("TT","LUPA",1,"+YZ"),("LR","XZ",1)]) + nodes[16]=Mybone("lowarm.L", "+X","toparm.L",[],["LWRA","LWRB"],[("IK","LWRA",1.0),("IK","LWRB",0.5),("TT","LFRM",1,"+YZ"),("LR","XZ",1)]) + nodes[17]=Mybone("hand.L", "+X","lowarm.L",[],["LFIN"],[("IK","LFIN",1.0),("TT","RWRA",1,"+YZ"),("LR","XZ",1)]) #missing ,"LTHM" + + nodes[18]=Mybone("hip.L", "+X","root",[],["LFWT","LBWT"],[("IK","LFWT",1.0),("IK","LBWT",0.5)]) + nodes[19]=Mybone("topleg.L","-Z","hip.L",[],["LKNE"],[("IK","LKNE",1),("TT","LTHI",1,"+YZ"),("LR","XZ",1)]) + nodes[20]=Mybone("lowleg.L","-Z","topleg.L",[],["LANK","LHEE"],[("IK","LHEE",1.0),("TT","LSHN",1,"+YZ"),("LR","XZ",1)]) + nodes[21]=Mybone("foot.L", "-Y","lowleg.L",[],["LTOE","LMT5"],[("IK","LTOE",1.0),("IK","LMT5",0.2),("TT","LMT5",1,"+YZ"),("LR","XZ",1)]) + nodes[22]=Mybone("toes.L", "-Y","foot.L",[],["LTOE"],[("IK","LTOE",1.0)]) + return nodes + +def createNodes(marker_set): # make a list of bone name, parent, edit head loc, edit tail loc, pose constraints + #ultimately, I want to read in an XML file here that specifies the node trees for various marker sets + if marker_set==HUMAN_CMU: nodes= createHumanCMU() #load up and verify the file has the CMU marker set + elif marker_set==HUMAN_CMU2: nodes= createHumanCMU() + else: nodes=[] + return nodes +def findEntry(item,list): + for i in range(len(list)): + if item==list[i]: break + debug(100,"findEtnry %s is %i in list of %i items" % (item,i,len(list))) + return i +def makeNodes(prefix, markerList, empties, marker_set): #make sure the file has the nodes selected + nodes= createNodes(marker_set) # list has generic marker names; replace them with the actual object names created + #each entry in markerlist has a corresponding entry in empties in the same order + errList=[] + for i in range(len(nodes)): + node= nodes[i] + debug(60,"Adapting node %s to prefix %s" % (node,prefix)) + + #replace generic head markers with actual empty names + for im in range(len(node.headMark)): + marker= node.headMark[im] + mark= prefix+marker + imn= findEntry(mark,markerList) + if imn < len(markerList): + debug(90,"Adapating head marker %s to %s" % (marker,empties[imn].name)) + nodes[i].headMark[im]= empties[imn].name + else: errList.append([node.name,"head location",mark,node,2]) + + #replace generic tail markers with actual empty names + for im in range(len(node.tailMark)): + marker= node.tailMark[im] + mark= prefix+marker + imn= findEntry(mark,markerList) + if imn < len(markerList): + debug(90,"Adapating marker %s to %s" % (marker,empties[imn].name)) + nodes[i].tailMark[im]= empties[imn].name + else: errList.append([node.name,"tail location",mark,node,2]) + + #replace generic constraint markers (if the constraint references a marker) with empty name + for im in range(len(node.const)): + const=node.const[im] + if const[0] in ("LOC","IK","TT"): + marker=const[1] + mark= prefix+marker + imn= findEntry(mark,markerList) + if imn < len(markerList): + debug(90,"Adapating %s constraint marker %s to %s" % (const[0],marker,empties[imn].name)) + if const[0] in ("IK","LR","LOC"): + nodes[i].const[im]=(const[0], empties[imn].name, const[2]) + else: nodes[i].const[im]=(const[0], empties[imn].name, const[2], const[3]) + else: errList.append([node.name,const[0]+" constraint",mark,node,4]) + + if errList!=[]: #we have issues. + for err in errList: + debug(0,"Bone "+err[0]+" specifies "+err[2]+" as "+err[1]+"which was not specified in file.") + #need a popup here to ignore/cleanup node tree, or add the marker(?) or abort + usrOption= 1 + if usrOption==0: #ignore this marker (remove it) + for node in nodes: #find the bone in error + if node.name==err[0]: + print "Before",node + if err[3] in range(2,3): + node[err[3]].remove(err[2]) #find the marker in error and remove it + elif err[3]==4: #find the constraint and remove it + for const in node.const: + if const[1]==err[2]: node.const.remove(const) + print "After",node + elif usrOption==1: #add these markers as static empties, and user will automate them later + #and the bones will be keyed to them, so it will all be good. + #file may have just mis-named the empty, or the location can be derived based on other markers + em= GetOrCreateEmpty(err[2]) + else: abort() #abend + if DEBUG==100: status("Nodes Updated") + return nodes #nodes may be updated + +def makeBones(arm,nodes): + debug(20,"Making %i edit bones" % len(nodes)) + for node in nodes: + bone= Blender.Armature.Editbone() + bone.name= node.name + arm.bones[bone.name]= bone #add it to the armature + debug(50,"Bone added: %s" % bone) + if bone.name <> node.name: + debug(0,"ERROR: duplicate node % name specified" % node.name) + node.name= bone.name #you may not get what you asked for + if node.parent!="": #parent + debug(60,"Bone parent: %s"%node.parent) + bone.parent= arm.bones[node.parent] + bone.options = [Armature.CONNECTED] + #compute head = average of the reference empties + if node.headMark==[]: # no head explicitly stated, must be tail of parent + for parnode in nodes: + if node.parent==parnode.name: break + node.headMark= parnode.tailMark + node.head= parnode.tail + else: node.head= comp_loc(node.headMark) #node head is specified, probably only for root. + + bone.head= node.head + debug(60,"%s bone head: (%0.2f, %0.2f, %0.2f)" % (bone.name,bone.head.x, bone.head.y, bone.head.z)) + mylen=comp_len(node.headMark,node.tailMark) # length of the bone as it was recorded for that person + # for our T position, compute the bone length, add it to the head vector component to get the tail + if node.vec[0]=="-": mylen=-mylen + debug(80,"Bone vector %s length %0.2f" %(node.vec,mylen)) + node.tail= Vector(node.head) + myvec=node.vec[1].lower() + if myvec=="x": node.tail.x+=mylen + elif myvec=="y": node.tail.y+=mylen + elif myvec=="z": node.tail.z+=mylen + else: + debug(0,"%s %s %s %s" % (node.vec,myvec,node.vec[0],node.vec[1])) + error("ERROR IN BONE SPEC ") + bone.tail= node.tail + debug(60,"Bone tail: (%i,%i,%i)" %(bone.tail.x, bone.tail.y, bone.tail.z)) + #Armature created in the T postion, but with bone lengths to match the marker set and subject + #when this is constrained to the markers, the recorded action will be relative to a know Rotation + #so that all recorded actions should be interchangeable. wooot! + #Only have to adjust starting object loc when matching up actions. + return #arm #updated + +def makeConstLoc(pbone,const): + const_new= pbone.constraints.append(Constraint.Type.COPYLOC) + const_new.name = const[0]+"-"+const[1] + const_target=Blender.Object.Get(const[1]) + const_new[BCS.TARGET]= const_target + const_new.influence = const[2] + return + +def makeConstLimRot(pbone,const): + const_new= pbone.constraints.append(Constraint.Type.LIMITROT) + const_new.name = const[0]+"-"+const[1] + for axis in const[1]: + if axis.lower()=="x": const_new[BCS.LIMIT] |= BCS.LIMIT_XROT #set + if axis.lower()=="y": const_new[BCS.LIMIT] |= BCS.LIMIT_YROT #set + if axis.lower()=="z": const_new[BCS.LIMIT] |= BCS.LIMIT_ZROT #set + const_new[BCS.OWNERSPACE]= BCS.SPACE_LOCAL + const_new.influence = const[2] + # fyi, const[Constraint.Settings.LIMIT] &= ~Constraint.Settings.LIMIT_XROT #reset + return + +def makeConstIK(prefix,pbone,const): + #Blender 246 only supports one IK Solver per bone, but we might want many, + # so we need to create a reference empty named after the bone + # that floats between the markers, so the bone can point to it as a singularity + myob= GetOrCreateEmpty(prefix+pbone.name) + # note that this empty gets all the IK constraints added on + myconst= myob.constraints.append(Constraint.Type.COPYLOC) + myconst.name=const[0]+"-"+const[1] + myconst[Constraint.Settings.TARGET]= Blender.Object.Get(const[1]) + myconst.influence = const[2] + + #point the bone once to the empty via IK + success=False + for myconst in pbone.constraints: + if myconst.type == Constraint.Type.IKSOLVER: success=True + if not(success): #add an IK constraint to the bone to point to the empty + #print pbone + myconst= pbone.constraints.append(Constraint.Type.IKSOLVER) + myconst.name = const[1] + myconst[BCS.TARGET]= myob + myconst.influence = const[2] + #const_new[Constraint.Settings.BONE]= ? + myconst[BCS.CHAINLEN]= 1 + myconst[BCS.USETIP]= True + myconst[BCS.STRETCH]= False + return + +def makeConstTT(pbone,const): + myconst= pbone.constraints.append(Constraint.Type.TRACKTO) + myconst.name=const[0]+"-"+const[1] + debug(70,"%s %s" % (myconst,const[3])) + myob= GetOrCreateEmpty(const[1]) + myconst[BCS.TARGET]= myob + myconst.influence = const[2] + #const[3] is the Track and the thrird char is the Up indicator + myconst[BCS.TRACK]= trackto[const[3][0:2].lower()] + myconst[BCS.UP]=trackup[const[3][2].lower()]#up direction + myconst[BCS.OWNERSPACE]= BCS.SPACE_LOCAL + myconst[BCS.TARGETSPACE]= [BCS.SPACE_LOCAL] + if const[3][1]==const[3][2]: debug(0,"WARNING: Track To axis and up axis should not be the same. Constraint is INACTIVE") + return + +def makePoses(prefix,arm_ob,nodes): # pose this armature object based on node requirements + #this is constraint-based posing, not hard-keyed posing. + #we do constraint-based first so that user can adjust the constraints, possibly smooth/tweak motion + # add additional bones or referneces/constraints, before baking to hard keyframes + + pose= arm_ob.getPose() + debug(0,"Posing %s %s" % (arm_ob, pose)) + for node in nodes: + debug(30, "examining %s" %node) + if len(node.const)>0: #constraints for this bone are desired + pbone = pose.bones[node.name] + debug(40,"Posing bone %s" %pbone) + for const in node.const: + debug(50,"Constraining %s by %s" %(pbone,const)) + if const[0]=="LOC":makeConstLoc(pbone,const) + elif const[0]=="IK": makeConstIK(prefix,pbone,const) + elif const[0]=="LR": makeConstLimRot(pbone,const) + elif const[0]=="TT": makeConstTT(pbone,const) + else: + error("FATAL: constraint %s not supported" %const[0]) + break + debug(10, "Posing complete. Cycling pose and edit mode") + pose.update() + return + +def make_arm(subject,prefix,markerList, emptyList,marker_set): + debug(10,"**************************") + debug(00, "**** Making Armature for %s..." % subject) + debug(10, "**************************") + # copied from bvh import bvh_node_dict2armature; trying to use similar process for further integtration down the road + # Add the new armature, + + nodes= makeNodes(prefix, markerList, emptyList, marker_set) #assume everyone in file uses the same mocap suit + # each person in the file may be different height, so each needs their own new armature to match marker location + +## obs= Blender.Object.Get() +## success=False +## for ob in obs: +## if ob.name==subject: +## success=True +## if success: +## menu="Human Armature already exists for this subject." +## menu+="%t|Create another in this scene" +## menu+="%l|Start a new scene" +## menu+="%l|Use this armature" +## menusel= Draw.PupMenu(menu) + + arm= Blender.Armature.New(subject) #make an armature. + debug(10,"Created Armature %s" % arm) + # Put us into editmode + arm.makeEditable() + arm.drawType = Armature.OCTAHEDRON + makeBones(arm,nodes) + scn = Blender.Scene.GetCurrent() #add it to the current scene. could create new scenes here as yaf + arm_ob= scn.objects.new(arm) #instance it in the scene. this is the new way for 2.46 to instance objects + arm_ob.name= subject #name it something like the person it represents + arm_ob.layers= LAYERS_ARMOB + debug(20,"Instanced Armature %s" % arm_ob) + arm.update() #exit editmode. Arm must be instanced as an object before you can save changes or pose it + Blender.Redraw() # show the world + if DEBUG==100: status("T-Bones made.") + + makePoses(prefix,arm_ob,nodes) #constrain arm_ob with these markers + + scn.update(1) #make everyone behave themselves in the scene, and respect the new constraints + return arm_ob + +def setupAnim(StartFrame, EndFrame, VideoFrameRate): + debug(100, 'VideoFrameRate is %i' %VideoFrameRate) + if VideoFrameRate<1: VideoFrameRate=1 + if VideoFrameRate>120: VideoFrameRate=120 + # set up anim panel for them + context=scn.getRenderingContext() + context.startFrame(StartFrame) + context.endFrame(EndFrame) + context.framesPerSec(int(VideoFrameRate)) + Blender.Set("curframe",StartFrame) + Blender.Redraw() + return + +def makeCloud(Nmarkers,markerList,StartFrame,EndFrame,Markers): + debug(10, "**************************") + debug(00, "*** Making Cloud Formation") + debug(10, "**************************") + empties=[] + ipos=[] + curvesX=[] + curvesY=[] + curvesZ=[] + debug(0, "%i Markers (empty cloud) will be put on layers %s" % (Nmarkers,LAYERS_MARKER)) + # Empty Cloud formation + for i in range(Nmarkers): + debug(100,"%i marker %s"%(i, markerList[i])) + emptyname = markerList[i] # rdw: to use meaningful names from Points parameter + em= GetOrCreateEmpty(emptyname) #in this scene + #make a list of the actual empty + empties.append(em) + #assign it an ipo with the loc xyz curves + lipo = Ipo.New("Object",em.name) + ipos.append(lipo) + curvesX.append(GetOrCreateCurve(ipos[i],'LocX')) + curvesY.append(GetOrCreateCurve(ipos[i],'LocY')) + curvesZ.append(GetOrCreateCurve(ipos[i],'LocZ')) + empties[i].setIpo(ipos[i]) + debug(30,"Cloud of %i empties created." % len(empties)) + NvideoFrames= EndFrame-StartFrame+1 + debug(10, "**************************") + debug(00, "**** Calculating Marker Ipo Curves over %i Frames ..." % NvideoFrames) + debug(10, "**************************") + err= index=0 #number of errors, logical frame + for frame in range(StartFrame,EndFrame+1): + if index==0: start=sys.time() + elif index==100: + tmp=(NvideoFrames-100)*(sys.time()-start)/6000 + debug(0,"%i minutes process time estimated" % tmp) + elif index >100: print index*100/(NvideoFrames-1),"% complete\r", + for i in range(Nmarkers): + if Markers[index][i].z < 0: Markers[index][i].z= -Markers[index][i].z + success=True + if CLEAN: #check for good data + # C3D marker decoding may have coordinates negative (improper sign bit decoding?) + myX= abs(Markers[index][i].x) + myY= abs(Markers[index][i].y) + myZ= Markers[index][i].z + if myX > 10000 or myY > 10000 or myZ > 10000: success=False + if myX <.01 and myY <.01 and myZ <.01: success=False # discontinuity in marker tracking (lost marker) + + if success: + curvesX[i].append((frame, Markers[index][i].x)) #2.46 knot method + curvesY[i].append((frame, Markers[index][i].y)) + curvesZ[i].append((frame, Markers[index][i].z)) + if frame==StartFrame: debug(40, "%s loc frame %i: (%0.2f, %0.2f, %0.2f)" % (markerList[i],frame,Markers[index][i].x,Markers[index][i].y,Markers[index][i].z)) + else: + err+=1 # some files have thousands... + #debug(30,"Point ignored for marker:%s frame %i: (%i, %i, %i)" % (markerList[i],frame,Markers[index][i].x,Markers[index][i].y,Markers[index][i].z)) + index += 1 + debug(70, "%i points ignored across all markers and frames. Recalculating..." % err) + + for i in range(Nmarkers): + curvesX[i].Recalc() + curvesY[i].Recalc() + curvesZ[i].Recalc() + Blender.Set('curframe', StartFrame) + Blender.Redraw() + if DEBUG==100: status("Clound formed") + return empties + +def getNumber(str, length): + if length==2: # unsigned short + return struct.unpack('H',str[0:2])[0], str[2:] + sum = 0 + for i in range(length): + #sum = (sum << 8) + ord(str[i]) for big endian + sum = sum + ord(str[i])*(2**(8*i)) + return sum, str[length:] +def unpackFloat(chunk,proctype): + #print proctype + myvar=chunk[0:4] + if proctype==2: #DEC-VAX + myvar=chunk[2:4]+chunk[0:2] #swap lo=hi word order pair + return struct.unpack('f',myvar[0:4])[0] + +def getFloat(chunk,proctype): + return unpackFloat(chunk, proctype), chunk[4:] +def parseFloat(chunk,ptr,proctype): + return unpackFloat(chunk[ptr:ptr+4], proctype), ptr+4 + + +def load_c3d(FullFileName): +# Input: FullFileName - file (including path) to be read +# +# Variable: +# Markers 3D-marker data [Nmarkers x NvideoFrames x Ndim(=3)] +# VideoFrameRate Frames/sec +# AnalogSignals Analog signals [Nsignals x NanalogSamples ] +# AnalogFrameRate Samples/sec +# Event Event(Nevents).time ..value ..name +# ParameterGroup ParameterGroup(Ngroups).Parameters(Nparameters).data ..etc. +# CameraInfo MarkerRelated CameraInfo [Nmarkers x NvideoFrames] +# ResidualError MarkerRelated ErrorInfo [Nmarkers x NvideoFrames] + + Markers=[]; + VideoFrameRate=120; + AnalogSignals=[]; + AnalogFrameRate=0; + Event=[]; + ParameterGroups=[]; + CameraInfo=[]; + ResidualError=[]; + + debug(10, "*********************") + debug(10, "**** Opening File ***") + debug(10, "*********************") + + #ind=findstr(FullFileName,'\'); + #if ind>0, FileName=FullFileName(ind(length(ind))+1:length(FullFileName)); else FileName=FullFileName; end + debug(0, "FileName = " + FullFileName) + fid=open(FullFileName,'rb'); # native format (PC-intel). ideasman says maybe rU + content = fid.read(); + content_memory = content + #Header section + NrecordFirstParameterblock, content = getNumber(content,1) # Reading record number of parameter section + + key, content = getNumber(content,1) + if key!=80: + error('File: does not comply to the C3D format') + fid.close() + return + #Paramter section + content = content[512*(NrecordFirstParameterblock-1)+1:] # first word ignored + #file format spec says that 3rd byte=NumberofParmaterRecords... but is ignored here. + proctype,content =getNumber(content,1) + proctype = proctype-83 + proctypes= ["unknown","(INTEL-PC)","(DEC-VAX)","(MIPS-SUN/SGI)"] + + if proctype in (1,2): debug(0, "Processor coding %s"%proctypes[proctype]) + elif proctype==3: debug(0,"Program untested with %s"%proctypes[proctype]) + else: + debug(0, "INVALID processor type %i"%proctype) + proctype=1 + debug(0,"OVERRIDE processor type %i"%proctype) + + #if proctype==2, + # fclose(fid); + # fid=fopen(FullFileName,'r','d'); % DEC VAX D floating point and VAX ordering + #end + debug(10, "***********************") + debug(00, "**** Reading Header ***") + debug(10, "***********************") + + # ############################################### + # ## ## + # ## read header ## + # ## ## + # ############################################### + + #%NrecordFirstParameterblock=fread(fid,1,'int8'); % Reading record number of parameter section + #%key1=fread(fid,1,'int8'); % key = 80; + + content = content_memory + #fseek(fid,2,'bof'); + content = content[2:] + + # + Nmarkers, content=getNumber(content, 2) + NanalogSamplesPerVideoFrame, content = getNumber(content, 2) + StartFrame, content = getNumber(content, 2) + EndFrame, content = getNumber(content, 2) + MaxInterpolationGap, content = getNumber(content, 2) + + Scale, content = getFloat(content,proctype) + + NrecordDataBlock, content = getNumber(content, 2) + NanalogFramesPerVideoFrame, content = getNumber(content, 2) + + if NanalogFramesPerVideoFrame > 0: + NanalogChannels=NanalogSamplesPerVideoFrame/NanalogFramesPerVideoFrame + else: + NanalogChannels=0 + + VideoFrameRate, content = getFloat(content,proctype) + + AnalogFrameRate=VideoFrameRate*NanalogFramesPerVideoFrame + NvideoFrames = EndFrame - StartFrame + 1 + + debug(0, "Scale= %0.2f" %Scale) + debug(0, "NanalogFramesPerVideoFrame= %i" %NanalogFramesPerVideoFrame) + debug(0, "Video Frame Rate= %i" %VideoFrameRate) + debug(0, "AnalogFrame Rate= %i"%AnalogFrameRate) + debug(0, "# markers= %i" %Nmarkers) + debug(0, "StartFrame= %i" %StartFrame) + debug(0, "EndFrame= %i" %EndFrame) + debug(0, "# Video Frames= %i" %NvideoFrames) + + if Scale>0: + debug(0, "Marker data is in integer format") + if Scale>(XYZ_LIMIT/32767): + Scale=XYZ_LIMIT/32767.0 + debug(0, "OVERRIDE: Max coordinate is %i, Scale changed to %0.2f" % (XYZ_LIMIT,Scale)) + else: debug(0, "Marker data is in floating point format") + if VideoFrameRate<1 or VideoFrameRate>120: + VideoFrameRate= 120 + debug(0, "OVERRIDE Video Frame Rate= %i" %VideoFrameRate) + if proctype not in (1,2): # Intel, DEC are known good + debug(0, "OVERRIDE|Program not tested with this encoding. Set to Intel") + proctype= 1 + + debug(10, "***********************") + debug(10, "**** Reading Events ...") + debug(10, "***********************") + + content = content_memory + content = content[298:] #bizarre .. ce devrait être 150 selon la doc rdw skips first 299 bytes? + + EventIndicator, content = getNumber(content, 2) + EventTime=[] + EventValue=[] + EventName=[] + + debug(0, "Event Indicator = %i" %EventIndicator) + if EventIndicator==12345: #rdw: somehow, this original code seems fishy, but I cannot deny it. + Nevents, content = getNumber(content, 2) + debug(0, "Nevents= %i" %Nevents) + content = content[2:] + if Nevents>0: + for i in range(Nevents): + letime, content = getFloat(content,proctype) + EventTime.append(letime) + content = content_memory + content = content[188*2:] + for i in range(Nevents): + lavalue, content = getNumber(content, 1) + EventValue.append(lavalue) + content = content_memory + content = content[198*2:] + for i in range(Nevents): + lenom = content[0:4] + content = content[4:] + EventName.append(lenom) + + debug(00, "***************************") + debug(00, "**** Reading Parameters ...") + debug(10, "***************************") + subjects=[] # a name would be nice, but human will do + prefixes=[] # added on to mocap marker names, one for each subject + marker_subjects = [] # hopefully will be specified in the file and known to this program + markerList=[] + ParameterGroups = [] + ParameterNumberIndex = [] + + content = content_memory + content = content[512*(NrecordFirstParameterblock-1):] + + dat1, content = getNumber(content, 1) + key2, content = getNumber(content, 1) + + NparameterRecords, content = getNumber(content, 1) + debug(100, "NparameterRecords=%i"%NparameterRecords) + proctype,content =getNumber(content,1) + proctype = proctype-83 # proctype: 1(INTEL-PC); 2(DEC-VAX); 3(MIPS-SUN/SGI) + + for i in range(NparameterRecords): + leparam = ParameterGroup(None, None, []) + ParameterGroups.append(leparam) + ParameterNumberIndex.append(0) + # + Ncharacters, content = getNumber(content, 1) + if Ncharacters>=128: + Ncharacters = -(2**8)+(Ncharacters) + GroupNumber, content = getNumber(content, 1) + if GroupNumber>=128: + GroupNumber = -(2**8)+(GroupNumber) + debug(80,"GroupNumber = %i, Nchar=%i" %(GroupNumber,Ncharacters)) + + while Ncharacters > 0: + if GroupNumber<0: + GroupNumber=abs(GroupNumber) + GroupName = content[0:Ncharacters] + content = content[Ncharacters:] + #print "Group Number = ", GroupNumber + ParameterGroups[GroupNumber].name = GroupName + #print "ParameterGroupName =", GroupName + offset, content = getNumber(content, 2) + deschars, content = getNumber(content, 1) + GroupDescription = content[0:deschars] + content = content[deschars:] + ParameterGroups[GroupNumber].description = GroupDescription + # + ParameterNumberIndex[GroupNumber]=0 + content = content[offset-3-deschars:] + else: + + ParameterNumberIndex[GroupNumber]=ParameterNumberIndex[GroupNumber]+1 + ParameterNumber=ParameterNumberIndex[GroupNumber] + #print "ParameterNumber=", ParameterNumber + ParameterGroups[GroupNumber].parameter.append(Parameter(None, None, [], [], None)) + ParameterName = content[0:Ncharacters] + content = content[Ncharacters:] + #print "ParameterName = ",ParameterName + if len(ParameterName)>0: + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].name=ParameterName + offset, content = getNumber(content, 2) + filepos = len(content_memory)-len(content) + nextrec = filepos+offset-2 + + type, content=getNumber(content, 1) + if type>=128: + type = -(2**8)+type + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].type=type + + dimnum, content=getNumber(content, 1) + if dimnum == 0: + datalength = abs(type) + else: + mult=1 + dimension=[] + for j in range (dimnum): + ladim, content = getNumber(content, 1) + dimension.append(ladim) + mult=mult*dimension[j] + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].dim.append(dimension[j]) + datalength = abs(type)*mult + + #print "ParameterNumber = ", ParameterNumber, " Group Number = ", GroupNumber + + if type==-1: + data = "" + wordlength=dimension[0] + if dimnum==2 and datalength>0: + for j in range(dimension[1]): + data=string.rstrip(content[0:wordlength]) + content = content[wordlength:] + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data.append(data) + elif dimnum==1 and datalength>0: + data=content[0:wordlength] + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data.append(data) # ??? + + myParam=string.rstrip(ParameterName) + myGroup=string.rstrip(GroupName) + msg= "-%s-%s-" % (myGroup,myParam) + if myGroup == "POINT": + if myParam== "LABELS": + # named in form of subject:marker. + # the list "empties" is a corresponding list of actual empty object names that make up the cloud + markerList= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sLABELS = %i %s" %(msg, len(markerList),markerList)) #list of logical markers from 0 to n corresponding to points + elif myParam== "LABELS2": #more labels + # named in form of subject:marker. + # the list "empties" is a corresponding list of actual empty object names that make up the cloud + momarkList= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + markerList+=momarkList + debug(0, "%sLABELS2 = %i %s" %(msg, len(momarkList),momarkList)) #list of logical markers from 0 to n corresponding to points + else: debug(70, "%s UNUSED = %s" %(msg,ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data)) + elif myGroup in ["SUBJECT", "SUBJECTS"]: #info about the actor + if myParam in ["NAME", "NAMES"]: + subjects= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sNames of Subjects = %s" %(msg, subjects)) # might be useful in naming armatures + for i in range(len(subjects)): + subjects[i]=subjects[i].rstrip() + if subjects[i]=="": subjects[i]="Human" + elif myParam == "LABEL_PREFIXES": + prefixes = ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sMarker Prefixes = %s" %(msg, prefixes)) # to xlate marker name to that in file + for i in range(len(prefixes)): + prefixes[i]=prefixes[i].rstrip() + elif myParam== "MARKER_SETS": + marker_subjects= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sMarker Set = %s"%(msg, marker_subjects)) # marker set that each subject was wearing + elif myParam== "MODEL_PARAM": + action= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sModel Paramter = %s"%(msg,action)) # might be a good name for the blender scene + elif myParam== "LABELS": + # named in form of subject:marker. + # the list "empties" is a corresponding list of actual empty object names that make up the cloud + markerList= ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + debug(0, "%sLABELS = %i %s"%(msg, len(markerList),markerList)) #list of logical markers from 0 to n corresponding to points + else: debug(70, "%sUNUSED = %s"%(msg, ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data)) + else: + debug(70, "%sUNUSED = %s"%(msg, ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data)) + elif type == 1: + debug(100,"Block type %i is largely unsupported and untested."%type) + data = [] + Nparameters=datalength/abs(type) + debug(100, "Nparameters=%i"%Nparameters) + for i in range(Nparameters): + ladata,content = getNumber(content, 1) + data.append(ladata) + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + #print ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + + #print "type boolean" + elif type == 2 and datalength>0: + debug(100,"Block type %i is largely unsupported and untested."%type) + data = [] + Nparameters=datalength/abs(type) + debug(100, "Nparameters=%i"%Nparameters) + for i in range(Nparameters): + ladata,content = getNumber(content, 2) + data.append(ladata) + #ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + if dimnum>1: + #???? print "arg je comprends pas" + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + #???ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=reshape(data,dimension) + else: + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + #print ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + #pass + #print "type integer" + elif type == 4 and datalength>0: + debug(100,"Block type %i is largely unsupported and untested."%type) + data = [] + Nparameters=datalength/abs(type) + debug(100, "Nparameters=%i"%Nparameters) + for i in range(Nparameters): + ladata,content = getFloat(content,proctype) + data.append(ladata) + if dimnum>1: + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + #print "arg je comprends pas" + #???ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=reshape(data,dimension) + else: + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data=data + #print ParameterGroups[GroupNumber].parameter[ParameterNumber-1].data + else: + debug(100,"Block type %i is largely unsupported and untested."%type) + #print "error" + pass + deschars, content= getNumber(content, 1) + if deschars>0: + description = content[0:deschars] + content = content[deschars:] + ParameterGroups[GroupNumber].parameter[ParameterNumber-1].description=description + + content = content_memory + content = content[nextrec:] + + Ncharacters,content = getNumber(content, 1) + if Ncharacters>=128: + Ncharacters = -(2**8)+(Ncharacters) + GroupNumber,content = getNumber(content, 1) + if GroupNumber>=128: + GroupNumber = -(2**8)+(GroupNumber) + debug(80,"GroupNumber = %i, Nchar=%i" %(GroupNumber,Ncharacters)) + + debug(00, "***************************") + debug(00, "**** Examining Parameters ...") + debug(10, "***************************") + + if len(subjects)==0: subjects=["Test"] #well, somebody got mocapped! + for i in range(0, len(subjects)-len(prefixes)): prefixes.append("") + for i in range(0, len(subjects)-len(marker_subjects)): marker_subjects.append(subjects[i]) + + #make a markerlist if they didn't + debug(0, "%i Markers specified, %i marker names supplied" %(Nmarkers,len(markerList))) + if len(markerList)==0: + debug(0, "File missing any POINT LABELS marker list. Making defaults") + #I guess just make cloud of empty.xxx + if len(markerList)XYZ_LIMIT or abs(myy)>XYZ_LIMIT or abs(myz)>XYZ_LIMIT: + err+=1 + if err>100: + debug(0, "Warning: 100 data points for markers seem way out there") + debug(0, "data read: (%i, %i, %i)" %(x,y,z)) + debug(0, "Consider revising Scale %0.2f" % Scale) + debug(0, "which now givs coordinates: (%i, %i, %i)" %(x*Scale,y*Scale,z*Scale)) + err=-0 + if abs(myx)>XYZ_LIMIT: myx= XYZ_LIMIT*myx/abs(myx) #preserve sign + if abs(myy)>XYZ_LIMIT: myy= XYZ_LIMIT*myy/abs(myy) #preserve sign + if abs(myz)>XYZ_LIMIT: myz= XYZ_LIMIT*myz/abs(myz) #preserve sign + Markers[i][j].x = myx + Markers[i][j].y = myy + Markers[i][j].z = myz + + a,ptr_read = parseFloat(content, ptr_read, proctype) + a = int(a) + highbyte = int(a/256) + lowbyte=a-highbyte*256 + CameraInfo[i][j] = highbyte + ResidualError[i][j] = lowbyte*abs(Scale) + #Monitor marker location to ensure data block is being parsed properly + if j==0: debug(90,"Frame %i loc of %s: (%i, %i, %i)" % (i,markerList[j],myx,myy,myz)) + if i==0: debug(50, "Initial loc of %s: (%i, %i, %i)" % (markerList[j],myx,myy,myz)) + + ptr_read+=residuals #skip over the following + #for j in range (NanalogFramesPerVideoFrame): + # for k in range(NanalogChannels): + # val, content = getNumber(content, 2) + # AnalogSignals[j+NanalogFramesPerVideoFrame*(i)][k]=val #??? i-1 + #else + # for i=1:NvideoFrames + # for j=1:Nmarkers + # Markers(i,j,1:3)=fread(fid,3,'int16')'.*Scale; + # ResidualError(i,j)=fread(fid,1,'int8'); + # CameraInfo(i,j)=fread(fid,1,'int8'); + # end + # waitbar(i/NvideoFrames) + # for j=1:NanalogFramesPerVideoFrame, + # AnalogSignals(j+NanalogFramesPerVideoFrame*(i-1),1:NanalogChannels)=... + # fread(fid,NanalogChannels,'int16')'; + # end + # end + #end + + else: #Scale is positive, but should be <1 to scale down, like 0.05 + two16= -2**16 + if len(content) < NvideoFrames*(Nmarkers*(6+2)+residuals): + error("%i bytes is not enough data for |%i frames|%i markers|%i residual" %(len(content),NvideoFrames,Nmarkers,residuals)) + #Note: I really tried to optimize this loop, since it was taking hours to process + for i in range(NvideoFrames): + if i==0: start=sys.time() + elif i==10: + tmp=(sys.time()-start)*NvideoFrames/600 + debug(0,"%i minutes remaining..." % tmp) + else: print "%i percent complete. On Frame %i Points procesed: %i\r" % (i*100/NvideoFrames,i,i*Nmarkers), + + for j in range(Nmarkers): + #x, content = getNumber(content,2) + # this is old skool signed int, not but not a short. + x = ord(content[ptr_read+0]) + (ord(content[ptr_read+1])<<8) + if x>32768: x+=two16 + y = ord(content[ptr_read+2]) + (ord(content[ptr_read+3])<<8) + if y>32768: y+=two16 + z = ord(content[ptr_read+4]) + (ord(content[ptr_read+5])<<8) + if z>32768: z+=two16 + +## +## x = ord(content[ptr_read]) + ord(content[ptr_read+1])*(2**8) +## ptr_read+=2 +## if x > 32768: +## x=-(2**16)+(x) +## #y, content = getNumber(content,2) +## y = ord(content[ptr_read]) + ord(content[ptr_read+1])*(2**8) +## ptr_read+=2 +## if y > 32768: +## y=-(2**16)+(y) +## #z, content = getNumber(content,2) +## z = ord(content[ptr_read]) + ord(content[ptr_read+1])*(2**8) +## ptr_read+=2 +## if z > 32768: +## z=-(2**16)+(z) +## +## print "(%i=%i, %i=%i, %i=%i)" %(x,myx,y,myy,z,myz) + + # for integers, I changed Scale above to avoid getting impossible numbers + Markers[i][j].x = x*Scale + Markers[i][j].y = y*Scale + Markers[i][j].z = z*Scale + +## ResidualError[i][j], content = getNumber(content, 1) +## CameraInfo[i][j], content = getNumber(content, 1) + #try to improve performance by: + ResidualError[i][j]= ord(content[ptr_read+6]) + CameraInfo[i][j]= ord(content[ptr_read+7]) + + content= content[ptr_read+8:] + ptr_read=0 + + if j==0: debug(100,"Frame %i loc of %s: %s" % (i,markerList[j],Markers[i][j])) + if i==0: debug(50, "Initial loc of %s: (%s)" % (markerList[j],Markers[i][j])) + + #for j in range (NanalogFramesPerVideoFrame): + # for k in range(NanalogChannels): + # val, content = getNumber(content, 2) + #AnalogSignals(j+NanalogFramesPerVideoFrame*(i-1),1:NanalogChannels)=val + ptr_read= residuals # skip over the above + print "\ndone with file." + fid.close() + + cloud= makeCloud(Nmarkers,markerList,StartFrame,EndFrame,Markers) + + setupAnim(StartFrame, EndFrame,VideoFrameRate) + + debug(10, "**************************") + debug(00, "**** Making %i Armatures" % len(subjects)) + debug(10, "**************************") + for i in range(len(subjects)): + marker_set= marker_subjects[i] + success=False + if len(marker_set)>0: + for trymark in MARKER_SETS: + if trymark[0:len(marker_set)]==marker_set: + marker_set=trymark + success=True + if success: + debug(0, "Armature for %s will be put on layers %s" % (subjects[i],LAYERS_ARMOB)) + debug(0, " based on an markers beginning with %s" % prefixes[i]) + ob= make_arm(subjects[i],prefixes[i],markerList,cloud,marker_set) + else: + debug(00, "Presently, this program can automatically create a constrained armature for marker sets %s" % MARKER_SETS) + debug(00, "%s uses an unknown marker set %s" % (subjects[i],marker_set)) + debug(10, "Have a nice day! If you figure out an armature node system for this cloud, please add it to the program.") + + debug(10, "**************************") + debug(00, "**** Conclusion") + minmax=[0,0,0,0,0,0] + for i in range(NvideoFrames): + for j in range(Nmarkers): + if minmax[0]>Markers[i][j].x: minmax[0]=Markers[i][j].x + if minmax[1]>Markers[i][j].y: minmax[1]=Markers[i][j].y + if minmax[2]>Markers[i][j].z: minmax[2]=Markers[i][j].z + if minmax[3] Date: Sun, 22 Jun 2008 22:46:02 +0000 Subject: [PATCH 281/430] [#14405] New python Script - Bake Constraints AGAIN PLEAST USE TABS, lost quite some time with mixed tab/space adjustments alone. Other then that, patch is very useful ;) ---Text from patch submission --- Using a slightly revised BPy_Armature, this script takes any non-armature object type and creates an Action that keys the object location (by default, for every frame). If it is an Armature, it goes into each bone and keys the locrot of the bone. You can now edit the armature, but the motions still rotate the bones. This enables the next step, re-targeting, which changes bone lengths to fit a mesh. High-level, we are working toward: 1. import mocap (bvh or c3d) 2. bake to make an action library (using this script) 3. re-target and use the actions to drive/deform any character mesh (theeth) --- release/scripts/animation_bake_constraints.py | 800 ++++++++++++++++++ release/scripts/bpymodules/BPyArmature.py | 75 +- 2 files changed, 845 insertions(+), 30 deletions(-) create mode 100644 release/scripts/animation_bake_constraints.py diff --git a/release/scripts/animation_bake_constraints.py b/release/scripts/animation_bake_constraints.py new file mode 100644 index 00000000000..130e93d8591 --- /dev/null +++ b/release/scripts/animation_bake_constraints.py @@ -0,0 +1,800 @@ +#!BPY + +""" +Name: 'Bake Constraints' +Blender: 246 +Group: 'Animation' +Tooltip: 'Bake a Constrained object/rig to IPOs' +Fillename: 'Bake_Constraint.py' +""" + +__author__ = "Roger Wickes (rogerwickes(at)yahoo.com)" +__script__ = "Bake Constraints" +__version__ = "0.6" +__url__ = ["Communicate problems and errors, http://www.blenderartists.com/forum/private.php?do=newpm to PapaSmurf"] +__email__= ["Roger Wickes, rogerwickes@yahoo.com", "scripts"] +__bpydoc__ = """\ + +bake_constraints + +This script bakes the real-world LocRot of an object (the net effect of any constraints - +(Copy, Limit, Track, Follow, - that affect Location, Rotation) +(usually one constrained to match another's location and/or Tracked to another) +and creates a clone with a set of Ipo Curves named Ipo +These curves control a non-constrained object and thus make it mimic the constrained object +Actions can be then be edited without the need for the drivers/constraining objects + +Developed for use with MoCap data, where a bone is constrained to point at an empty +moving through space and time. This records the actual locrot of the armature +so that the motion can be edited, reoriented, scaled, and used as NLA Actions + +see also wiki Scripts/Manual/ Sandbox/Animation/Bake_Constraints (tbd) + +Usage:
    + - Select the reference Object(s) you want to bake
    + - Set the frame range to bake in the Anim Panel
    + - Set the test code (if you want a self-test) in the RT field in the Anim Panel
    + -- Set RT:1 in the Anim panel to create a test armature
    +
    + - Run the script
    + - The clone copy of the object is created and it has an IPO curve assigned to it. + - The clone shadows the object by an offset locrot (see usrDelta) + - That Ipo has Location and Rotation curves that make the shadow mimic the movement of the selected object, + but without using constraints. Bones move identically in relation to the armature as the reference object + + +Version History: + 0.1: bakes Loc Rot for a constrained object + 0.2: bakes Loc and Rot for the bones within Armature object + 0.3: UI for setting options + 0.3.1 add manual to script library + 0.4: bake multiple objects + 0.5: root bone worldspace rotation + 0.6: re-integration with BPyArmature + +License, Copyright, and Attribution: + by Roger WICKES May 2008, released under Blender Artistic Licence to Public Domain + feel free to add to any Blender Python Scripts Bundle. + Thanks to Jean-Baptiste PERIN, IdeasMan42 (Campbell Barton?), Basil_Fawlty/Cage_drei (Andrew Cruse) + much lifted/learned from blender.org/documentation/245PytonDoc and wiki + some modules based on c3D_Import.py, PoseLib16.py and IPO/Armature code examples e.g. camera jitter + +Pseudocode (planned versions): + Initialize + If at least one object is selected + For each selected object, + create a shadow object + remove any constraints on the clone + create or reset an ipo curve named like the object + for each frame + set the clone's locrot key based on the reference object + if it's an armature, + create an action (which is an Ipo for each bone) + for each frame of the animation + for each bone in the armature + set the key + Else you're a smurf + +Test Conditions and Regressions: + 1. (v0.1) Non-armatures (the cube), with ipo curve and constraints at the object level + 2. armatures, with ipo curve and constraints at the object level + 3. armatures, with bones that have ipo curves and constraints + +Naming conventions: + arm = a specific objec type armature + bone = bones that make up the skeleton of an armature + + ob = object, an instance of an object type + ebone = edit bone, a bone in edit mode + pbone = pose bone, a posed bone in an object + tst = testing, self-test routines + usr = user-entered or designated stuff + +Pattern Notes (let me know if I've violated any): + Bergin Starting,Designing, Programming, Coding + Bergin 23 Indent for Structure - I don't like only 2, but the editor is set up that way + Bergin 26 Be Spacey Not Tabby - personal frustraion here. workaround is to Format->convert to whitespace + Bergin 27 Consistent Capitalization - except Blender, because I love it. + Bergin 28 Name Your Constants - not for those I plan on making variable + Python 01 Return Everything - I made this one up, all functions and methods end in return + even though it is decoration in Python, it helps Python throw an indentation error for typing mistakes + Wickes 01 Decorate Your Code - for visual appeal and to ease maintenance, include separators like ######### + to visually distinquish and separate functions, making it quicker to scan through code for methods + Wickes 02 Whitespace helps readability - include blanks around = # and lines (after def, after return) to make it stand out and pretty + +""" +######################################## + +import Blender +from Blender import * +from Blender.Mathutils import * +import struct +import string +import bpy +import BPyMessages +import BPyArmature +# reload(BPyArmature) +from BPyArmature import getBakedPoseData + +Vector= Blender.Mathutils.Vector +Euler= Blender.Mathutils.Euler +Matrix= Blender.Mathutils.Matrix #invert() function at least +RotationMatrix = Blender.Mathutils.RotationMatrix +TranslationMatrix= Blender.Mathutils.TranslationMatrix +Quaternion = Blender.Mathutils.Quaternion +Vector = Blender.Mathutils.Vector +POSE_XFORM= [Blender.Object.Pose.LOC, Blender.Object.Pose.ROT] + +#================= +# Global Variables +#================= + +# set senstitivity for displaying debug/console messages. 0=none, 100=max +# then call debug(num,string) to conditionally display status/info in console window +MODE=Blender.Get('rt') #execution mode: 0=run normal, x=self-test (test error trapping etc) +DEBUG=100 #how much detail on internal processing for big brother to see +BATCH=False #called from command line? is someone there? Would you like some cake? + +#there are two coordinate systems, the real, or absolute 3D space, +# and the local relative to a parent. +COORDINATE_SYSTEMS = ['local','real'] +COORD_LOCAL = 0 +COORD_REAL = 1 + +# User Settings - Change these options manually or via GUI (future TODO) +usrCoord = COORD_REAL # what the user wants +usrParent = False # True=keep parent (if exists), False = breakaway (usually with Real) +usrFreeze = 2 #2=yes, 0=no. Freezes shadow object in place at current frame as origin + #TODO - i wonder if usrFreeze means we should set Delta to the the difference between the original object and parent? +# delta is amount to offset/change from the reference object. future set in a ui, so technically not a constant +usrDelta = [10,10,0,0,0,0] #order specific - Loc xyz Rot xyz +usrACTION = True # Offset baked Action frames to start at frame 1 +usrBAKEobjIPO = False # bake the object Ipo? it is useless for MoCap, as we only want the Action, and the Object does not move + +CURFRAME = 'curframe' #keyword to use when getting the frame number that the scene is presently on +ARMATURE = 'Armature' #en anglais +BONE_SPACES = ['ARMATURESPACE','BONESPACE'] + # 'ARMATURESPACE' - this matrix of the bone in relation to the armature + # 'BONESPACE' - the matrix of the bone in relation to itself + +#Ipo curves created are prefixed with a name, like Ipo_ or Bake_ followed by the object/bone name +#bakedArmName = "b." #used for both the armature class and object instance +#ipoObjectNamePrefix= "" +#ipoBoneNamePrefix = "" +# for example, if on entry an armature named Man was selected, and the object prefix was "a." +# on exit an armature and an IPO curve named a.Man exists for the object as a whole +# if that armature had bones (spine, neck, arm) and the bone prefix was "a." +# the bones and IPO curves will be (a.spine, a.neck, a.arm) + +R2D = 18/3.1415 # radian to grad +BLENDER_VERSION = Blender.Get('version') + +# Gets the current scene, there can be many scenes in 1 blend file. +scn = Blender.Scene.GetCurrent() + +#================= +# Methods +#================= +######################################## +def debug(num,msg): #use log4j or just console here. + + if DEBUG >= num: + if BATCH == False: + print 'debug: '[:num/10+7]+msg + #TODO: else write out to file (runs faster if it doesnt have to display details) + return + +######################################## +def error(str): + debug(0,'ERROR: '+str) + if BATCH == False: + Draw.PupMenu('ERROR%t|'+str) + return + +######################################## +def getRenderInfo(): + context=scn.getRenderingContext() + staframe = context.startFrame() + endframe = context.endFrame() + if endframe 245: debug(0,'WARNING: Programmer check for Bone updates in dupliArmature') + + eboneNames = sortBones(xbones) + + i=0 + # error('bones sorted. continue?') + for abone in eboneNames: #set all editable attributes to fully define the bone. + for bone in xbones: + if bone.name == abone: break # get the reference bone + ebone = Armature.Editbone() #throw me a bone, bone-man! + ebones.append(ebone) #you're on my list, buddy + + ebone.name = bone.name + ebone.headRadius = bone.headRadius + ebone.tailRadius = bone.tailRadius + ebone.weight = bone.weight + ebone.options = bone.options + + ebone.head = bone.head[space] #dictionary lookups + ebone.tail = bone.tail[space] + ebone.matrix = bone.matrix[space] + ebone.roll = bone.roll[space] + + debug(30,'Generating new %s as child of %s' % (bone,bone.parent)) + if bone.hasParent(): +# parent=bone.parent.name +# debug(100,'looking for %s' % parent) +# for parbone in xbones: if parbone.name == parent: break # get the parent bone +# ebone.parent = arm.bones[ebones[j].name] + ebone.parent = arm.bones[bone.parent.name] +# else: +# ebone.parent = None + debug(30,'Generating new editbone %s as child of %s' % (ebone,ebone.parent)) + arm.bones[ebone.name] = ebone # i would have expected an append or add function, but this works + + debug (100,'arm.bones: \n%s' % arm.bones) + debug (20,'Cloned %i bones now in armature %s' %(len(arm.bones),arm.name)) + + myob = scn.objects.new(arm) #interestingly, object must be created before + arm.update() #armature can be saved + debug(40,'dupArm finished %s instanced as object %s' % (arm.name,myob.getName())) + print ob.matrix + print myob.matrix + + return myob + +def scrub(): # scrubs to startframe + staFrame,endFrame,curFrame = getRenderInfo() + + # eye-candy, go from current to start, fwd or back + if not BATCH: + print "Positioning to start..." + frameinc=(staFrame-curFrame)/10 + if abs(frameinc) >= 1: + for i in range(10): + curFrame+=frameinc + Blender.Set(CURFRAME,curFrame) # computes the constrained location of the 'real' objects + Blender.Redraw() + Blender.Set(CURFRAME, staFrame) + +######################################## +def bakeBones(ref_ob,arm_ob): #copy pose from ref_ob to arm_ob + scrub() + staFrame,endFrame,curFrame = getRenderInfo() + act = getBakedPoseData(ref_ob, staFrame, endFrame, ACTION_BAKE = True, ACTION_BAKE_FIRST_FRAME = usrACTION) # bake the pose positions of the reference ob to the armature ob + arm_ob.action = act + scrub() + + # user comprehension feature - change action name and channel ipo names to match the names of the bone they drive + debug (80,'Renaming each action ipo to match the bone they pose') + act.name = arm_ob.name + arm_channels = act.getAllChannelIpos() + pose= arm_ob.getPose() + pbones= pose.bones.values() #we want the bones themselves, not the dictionary lookup + print arm_channels.keys() + for pbone in pbones: + debug (100,'Channel listing for %s: %s' % (pbone.name,arm_channels[pbone.name] )) + ipo=arm_channels[pbone.name] + ipo.name = pbone.name # since bone names are unique within an armature, the pose names can be the same since they are within an Action + + return + +######################################## +def getOrCreateCurve(ipo, curvename): + + """ + Retrieve or create a Blender Ipo Curve named C{curvename} in the C{ipo} Ipo + Either an ipo curve named C{curvename} exists before the call then this curve is returned, + Or such a curve doesn't exist before the call .. then it is created into the c{ipo} Ipo and returned + """ + try: + mycurve = ipo.getCurve(curvename) + if mycurve != None: + pass + else: + mycurve = ipo.addCurve(curvename) + except: + mycurve = ipo.addCurve(curvename) + return mycurve + +######################################## +def eraseCurve(ipo,numCurves): + debug(80,'Erasing %i curves for %' % (numCurves,ipo.GetName())) + for i in range(numCurves): + nbBezPoints = ipo.getNBezPoints(i) + for j in range(nbBezPoints): + ipo.delBezPoint(i) + return + +######################################## +def resetIPO(ipo): + ipoName=ipoObjectNamePrefix + obName + debug(40,'Resetting ipo curve named %s' %ipoName) + numCurves = ipo.getNcurves() #like LocX, LocY, etc + if numCurves > 0: + eraseCurve(ipo, numCurves) #erase data if one exists + return + +######################################## +def resetIPOs(ob): #resets all IPO curvess assocated with an object and its bones + debug(30,'Resetting any ipo curves linked to %s' %ob.getName()) + ipo = ob.getIpo() #may be None + ipoName = ipo.getName() #name of the IPO that guides/controls this object + debug(70,'Object IPO is %s' %ipoName) + try: + ipo = Ipo.Get(ipoName) + except: + ipo = Ipo.New('Object', ipoName) + resetIPO(ipo) + if ob.getType() == ARMATURE: + arm_data=ob.getData() + bones=arm_data.bones.values() + for bone in bones: + #for each bone: get the name and check for a Pose IPO + debug(10,'Processing '+ bone.name) + return + +######################################## +def parse(string,delim): + index = string.find(delim) # -1 if not found, else pointer to delim + if index+1: return string[:index] + return string + +######################################## +def newIpo(ipoName): #add a new Ipo object to the Blender scene + ipo=Blender.Ipo.New('Object',ipoName) + + ipo.addCurve('LocX') + ipo.addCurve('LocY') + ipo.addCurve('LocZ') + ipo.addCurve('RotX') + ipo.addCurve('RotY') + ipo.addCurve('RotZ') + return ipo + +######################################## +def makeUpaName(type,name): #i know this exists in Blender somewhere... + debug(90,'Making up a new %s name using %s as a basis.' % (type,name)) + name = (parse(name,'.')) + if type == 'Ipo': + ipoName = name # maybe we get lucky today + ext = 0 + extlen = 3 # 3 digit extensions, like hello.002 + success = False + while not(success): + try: + debug(100,'Trying %s' % ipoName) + ipo = Ipo.Get(ipoName) + #that one exists if we get here. add on extension and keep trying + ext +=1 + if ext>=10**extlen: extlen +=1 # go to more digits if 999 not found + ipoName = '%s.%s' % (name, str(ext).zfill(extlen)) + except: # could not find it + success = True + name=ipoName + else: + debug (0,'FATAL ERROR: I dont know how to make up a new %s name based on %s' % (type,ob)) + return + return name + +######################################## +def createIpo(ob): #create an Ipo and curves and link them to this object + #first, we have to create a unique name + #try first with just the name of the object to keep things simple. + ipoName = makeUpaName('Ipo',ob.getName()) # make up a name for a new Ipo based on the object name + + debug(20,'Ipo and LocRot curves called %s' % ipoName) + + ipo=newIpo(ipoName) + + ob.setIpo(ipo) #link them + return ipo + +######################################## +def getLocLocal(ob): + key = [ + ob.LocX, + ob.LocY, + ob.LocZ, + ob.RotX*R2D, #get the curves in this order + ob.RotY*R2D, + ob.RotZ*R2D + ] + return key + +######################################## +def getLocReal(ob): + obMatrix = ob.matrixWorld #Thank you IdeasMan42 + loc = obMatrix.translationPart() + rot = obMatrix.toEuler() + key = [ + loc.x, + loc.y, + loc.z, + rot.x/10, + rot.y/10, + rot.z/10 + ] + return key + +######################################## +def getLocRot(ob,space): + if space in xrange(len(COORDINATE_SYSTEMS)): + if space == COORD_LOCAL: + key = getLocLocal(ob) + return key + elif space == COORD_REAL: + key = getLocReal(ob) + return key + else: #hey, programmers make mistakes too. + debug(0,'Fatal Error: getLoc called with %i' % space) + return + +######################################## +def getCurves(ipo): + ipos = [ + ipo[Ipo.OB_LOCX], + ipo[Ipo.OB_LOCY], + ipo[Ipo.OB_LOCZ], + ipo[Ipo.OB_ROTX], #get the curves in this order + ipo[Ipo.OB_ROTY], + ipo[Ipo.OB_ROTZ] + ] + return ipos + +######################################## +def addPoint(time,keyLocRot,ipos): + if BLENDER_VERSION < 245: + debug(0,'WARNING: addPoint uses BezTriple') + for i in range(len(ipos)): + point = BezTriple.New() #this was new with Blender 2.45 API + point.pt = (time, keyLocRot[i]) + point.handleTypes = [1,1] + + ipos[i].append(point) + return ipos + +######################################## +def bakeFrames(ob,myipo): #bakes an object in a scene, returning the IPO containing the curves + myipoName = myipo.getName() + debug(20,'Baking frames for scene %s object %s to ipo %s' % (scn.getName(),ob.getName(),myipoName)) + ipos = getCurves(myipo) + #TODO: Gui setup idea: myOffset + # reset action to start at frame 1 or at location + myOffset=0 #=1-staframe + #loop through frames in the animation. Often, there is rollup and the mocap starts late + staframe,endframe,curframe = getRenderInfo() + for frame in range(staframe, endframe+1): + debug(80,'Baking Frame %i' % frame) + #tell Blender to advace to frame + Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects + if not BATCH: Blender.Redraw() # no secrets, let user see what we are doing + + #using the constrained Loc Rot of the object, set the location of the unconstrained clone. Yea! Clones are FreeMen + key = getLocRot(ob,usrCoord) #a key is a set of specifed exact channel values (LocRotScale) for a certain frame + key = [a+b for a,b in zip(key, usrDelta)] #offset to the new location + + myframe= frame+myOffset + Blender.Set(CURFRAME,myframe) + + time = Blender.Get('curtime') #for BezTriple + ipos = addPoint(time,key,ipos) #add this data at this time to the ipos + debug(100,'%s %i %.3f %.2f %.2f %.2f %.2f %.2f %.2f' % (myipoName, myframe, time, key[0], key[1], key[2], key[3], key[4], key[5])) + # eye-candy - smoothly rewind the animation, showing now how the clone match moves + if endframe-staframe <400 and not BATCH: + for frame in range (endframe,staframe,-1): #rewind + Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects + Blender.Redraw() + Blender.Set(CURFRAME,staframe) + Blender.Redraw() + + return ipos + +######################################## +def duplicateLinked(ob): + obType = ob.type + debug(10,'Duplicating %s Object named %s' % (obType,ob.getName())) + scn.objects.selected = [ob] +## rdw: simplified by just duplicating armature. kept code as reference for creating armatures +## disadvantage is that you cant have clone as stick and original as octahedron +## since they share the same Armature. User can click Make Single User button. +## if obType == ARMATURE: #build a copy from scratch +## myob= dupliArmature(ob) +## else: + Blender.Object.Duplicate() # Duplicate linked, including pose constraints. + myobs = Object.GetSelected() #duplicate is top on the list + myob = myobs[0] + if usrParent == False: + myob.clrParent(usrFreeze) + debug(20,'=myob= was created as %s' % myob.getName()) + return myob + +######################################## +def removeConstraints(ob): + for const in ob.constraints: + debug(90,'removed %s => %s' % (ob.name, const)) + ob.constraints.remove(const) + return + +######################################## +def removeConstraintsOb(ob): # from object or armature + debug(40,'Removing constraints from '+ob.getName()) + if BLENDER_VERSION > 241: #constraints module not available before 242 + removeConstraints(ob) + if ob.getType() == ARMATURE: + pose = ob.getPose() + for pbone in pose.bones.values(): + #bone = pose.bones[bonename] + removeConstraints(pbone) + #should also check if it is a deflector? + return + +######################################## +def deLinkOb(type,ob): #remove linkages + if type == 'Ipo': + success = ob.clearIpo() #true=there was one + if success: debug(80,'deLinked Ipo curve to %s' % ob.getName()) + return + +######################################## +def bakeObject(ob): #bakes the core object locrot and assigns the Ipo to a Clone + if ob != None: + # Clone the object - duplicate it, clean the clone, and create an ipo curve for the clone + myob = duplicateLinked(ob) #clone it + removeConstraintsOb(myob) #my object is a free man + deLinkOb('Ipo',myob) #kids, it's not nice to share. you've been lied to + if usrBAKEobjIPO: + myipo = createIpo(myob) #create own IPO and curves for the clone object + ipos = bakeFrames(ob,myipo) #bake the locrot for this obj for the scene frames + +# staframe,endframe,curframe = getRenderInfo() +# frame = staframe +# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects +# frame +=1 +# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects +# frame -=1 +# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects +# if not BATCH: Blender.Redraw() +# + return myob + +######################################## +def bake(ob): #bakes an object of any type + + debug(30,'Baking %s object %s' % (ob.getType(), ob)) + + myob = bakeObject(ob) #creates and bakes the object motion + + if ob.getType() == ARMATURE: +# error('Object baked. Continue with bones?') + bakeBones(ob,myob) #go into the bones and copy from -> to in frame range + #future idea: bakeMesh (net result of Shapekeys, Softbody, Cloth, Fluidsim,...) + + return + +######################################## +def tstCreateArm(): #create a test armature in scene + # rip-off from http://www.blender.org/documentation/245PythonDoc/Pose-module.html - thank you! + + debug(0,'Making Test Armature') + # New Armature + arm_data= Armature.New('myArmature') + print arm_data + arm_ob = scn.objects.new(arm_data) + arm_data.makeEditable() + + # Add 4 bones + ebones = [Armature.Editbone(), Armature.Editbone(), Armature.Editbone(), Armature.Editbone()] + + # Name the editbones + ebones[0].name = 'Bone.001' + ebones[1].name = 'Bone.002' + ebones[2].name = 'Bone.003' + ebones[3].name = 'Bone.004' + + # Assign the editbones to the armature + for eb in ebones: + arm_data.bones[eb.name]= eb + + # Set the locations of the bones + ebones[0].head= Mathutils.Vector(0,0,0) + ebones[0].tail= Mathutils.Vector(0,0,1) #tip + ebones[1].head= Mathutils.Vector(0,0,1) + ebones[1].tail= Mathutils.Vector(0,0,2) + ebones[2].head= Mathutils.Vector(0,0,2) + ebones[2].tail= Mathutils.Vector(0,0,3) + ebones[3].head= Mathutils.Vector(0,0,3) + ebones[3].tail= Mathutils.Vector(0,0,4) + + ebones[1].parent= ebones[0] + ebones[2].parent= ebones[1] + ebones[3].parent= ebones[2] + + arm_data.update() + # Done with editing the armature + + # Assign the pose animation + arm_pose = arm_ob.getPose() + + act = arm_ob.getAction() + if not act: # Add a pose action if we dont have one + act = Armature.NLA.NewAction() + act.setActive(arm_ob) + + xbones=arm_ob.data.bones.values() + pbones = arm_pose.bones.values() + + frame = 1 + for pbone in pbones: # set bones to no rotation + pbone.quat[:] = 1.000,0.000,0.000,0.0000 + pbone.insertKey(arm_ob, frame, Object.Pose.ROT) + + # Set a different rotation at frame 25 + pbones[0].quat[:] = 1.000,0.1000,0.2000,0.20000 + pbones[1].quat[:] = 1.000,0.6000,0.5000,0.40000 + pbones[2].quat[:] = 1.000,0.1000,0.3000,0.40000 + pbones[3].quat[:] = 1.000,-0.2000,-0.3000,0.30000 + + frame = 25 + for i in xrange(4): + pbones[i].insertKey(arm_ob, frame, Object.Pose.ROT) + + pbones[0].quat[:] = 1.000,0.000,0.000,0.0000 + pbones[1].quat[:] = 1.000,0.000,0.000,0.0000 + pbones[2].quat[:] = 1.000,0.000,0.000,0.0000 + pbones[3].quat[:] = 1.000,0.000,0.000,0.0000 + + frame = 50 + for pbone in pbones: # set bones to no rotation + pbone.quat[:] = 1.000,0.000,0.000,0.0000 + pbone.insertKey(arm_ob, frame, Object.Pose.ROT) + + return arm_ob + +######################################## +def tstMoveOb(ob): # makes a simple LocRot animation of object in the scene + anim = [ + #Loc Rot/10 + # + ( 0,0,0, 0, 0, 0), #frame 1 origin + ( 1,0,0, 0, 0, 0), #frame 2 + ( 1,1,0, 0, 0, 0), + ( 1,1,1, 0, 0, 0), + ( 1,1,1,4.5, 0, 0), + ( 1,1,1,4.5,4.5, 0), + ( 1,1,1,4.5,4.5,4.5) + ] + space = COORD_LOCAL + ipo = createIpo(ob) #create an Ipo and curves for this object + ipos = getCurves(ipo) + + # span this motion over the currently set anim range + # to set points, i need time but do not know how it is computed, so will have to advance the animation + staframe,endframe,curframe = getRenderInfo() + + frame = staframe #x position of new ipo datapoint. set to staframe if you want a match + frameDelta=(endframe-staframe)/(len(anim)) #accomplish the animation in frame range + for key in anim: #effectively does a getLocRot() + #tell Blender to advace to frame + Blender.Set('curframe',frame) # computes the constrained location of the 'real' objects + time = Blender.Get('curtime') + + ipos = addPoint(time,key,ipos) #add this data at this time to the ipos + + debug(100,'%s %i %.3f %.2f %.2f %.2f %.2f %.2f %.2f' % (ipo.name, frame, time, key[0], key[1], key[2], key[3], key[4], key[5])) + frame += frameDelta + Blender.Set('curframe',curframe) # reset back to where we started + return +#================= +# Program Template +#================= +######################################## +def main(): + # return code set via rt button in Blender Buttons Scene Context Anim panel + + if MODE == 1: #create test armature #1 + ob = tstCreateArm() # make test arm and select it + tstMoveOb(ob) + scn.objects.selected = [ob] + + obs = Blender.Object.GetSelected() #scn.objects.selected + debug(20,'Baking %i objects' % len(obs)) + + if len(obs) >= 1: # user might have multiple objects selected + for ob in obs: + bake(ob) + else: + error('Please select at least one object') + return + +######################################## +def benchmark(): # This lets you benchmark (time) the script's running duration + + Window.WaitCursor(1) + t = sys.time() + debug(60,'%s began at %.0f' %(__script__,sys.time())) + + # Run the function on the active scene + in_editmode = Window.EditMode() + if in_editmode: Window.EditMode(0) + + main() + + if in_editmode: Window.EditMode(1) + + # Timing the script is a good way to be aware on any speed hits when scripting + debug(60,'%s Script finished in %.2f seconds' % (__script__,sys.time()-t) ) + Window.WaitCursor(0) + return + +######################################## +# This lets you can import the script without running it +if __name__ == '__main__': + debug(0, "------------------------------------") + debug(0, '%s %s Script begins with mode=%i debug=%i batch=%s version=%i' % (__script__,__version__,MODE,DEBUG,BATCH,BLENDER_VERSION)) + + benchmark() diff --git a/release/scripts/bpymodules/BPyArmature.py b/release/scripts/bpymodules/BPyArmature.py index d0b41dc35c5..63df02d080c 100644 --- a/release/scripts/bpymodules/BPyArmature.py +++ b/release/scripts/bpymodules/BPyArmature.py @@ -11,13 +11,19 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Version History: +# 1.0 original release bakes an armature into a matrix +# 1.1 optional params (ACTION_BAKE, ACTION_BAKE_FIRST_FRAME, direct function to key and return the Action import Blender +from Blender import sys import bpy -def getBakedPoseData(ob_arm, start_frame, end_frame): +def getBakedPoseData(ob_arm, start_frame, end_frame, ACTION_BAKE = False, ACTION_BAKE_FIRST_FRAME = True): ''' If you are currently getting IPO's this function can be used to - return a list of frame aligned bone dictionary's + ACTION_BAKE==False: return a list of frame aligned bone dictionary's + ACTION_BAKE==True: return an action with keys aligned to bone constrained movement + if ACTION_BAKE_FIRST_FRAME is not supplied or is true: keys begin at frame 1 The data in these can be swaped in for the IPO loc and quat @@ -77,7 +83,13 @@ def getBakedPoseData(ob_arm, start_frame, end_frame): # --------------------------------- Main loop to collect IPO data frame_index = 0 + NvideoFrames= end_frame-start_frame for current_frame in xrange(start_frame, end_frame+1): + if frame_index==0: start=sys.time() + elif frame_index==15: print NvideoFrames*(sys.time()-start),"seconds estimated..." #slows as it grows *3 + elif frame_index >15: + percom= frame_index*100/NvideoFrames + print "Frame %i Overall %i percent complete\r" % (current_frame, percom), ob_arm.action = backup_action #pose.update() # not needed Blender.Set('curframe', current_frame) @@ -88,9 +100,7 @@ def getBakedPoseData(ob_arm, start_frame, end_frame): for index, parent_index, bone_name, rest_bone, rest_matrix, rest_matrix_inv, pose_bone, ipo in armature_bone_data: matrix= pose_bone.poseMatrix - parent_bone= rest_bone.parent - if parent_index != -1: parent_pose_matrix = armature_bone_data[parent_index][6].poseMatrix parent_bone_matrix_inv = armature_bone_data[parent_index][5] @@ -98,40 +108,45 @@ def getBakedPoseData(ob_arm, start_frame, end_frame): rest_matrix= rest_matrix * parent_bone_matrix_inv matrix=matrix * rest_matrix.copy().invert() - pose_bone.quat= matrix.toQuat() pose_bone.loc= matrix.translationPart() - pose_bone.insertKey(ob_arm, 1, POSE_XFORM) # always frame 1 + if ACTION_BAKE==False: + pose_bone.insertKey(ob_arm, 1, POSE_XFORM) # always frame 1 + + # THIS IS A BAD HACK! IT SUCKS BIGTIME BUT THE RESULT ARE NICE + # - use a temp action and bake into that, always at the same frame + # so as not to make big IPO's, then collect the result from the IPOs - # THIS IS A BAD HACK! IT SUCKS BIGTIME BUT THE RESULT ARE NICE - # - use a temp action and bake into that, always at the same frame - # so as not to make big IPO's, then collect the result from the IPOs + # Now get the data from the IPOs + if not ipo: ipo = armature_bone_data[index][7] = new_action.getChannelIpo(bone_name) - # Now get the data from the IPOs - if not ipo: ipo = armature_bone_data[index][7] = new_action.getChannelIpo(bone_name) + loc = Vector() + quat = Quaternion() - loc = Vector() - quat = Quaternion() + for curve in ipo: + val = curve.evaluate(1) + curve_name= curve.name + if curve_name == 'LocX': loc[0] = val + elif curve_name == 'LocY': loc[1] = val + elif curve_name == 'LocZ': loc[2] = val + elif curve_name == 'QuatW': quat[3] = val + elif curve_name == 'QuatX': quat[0] = val + elif curve_name == 'QuatY': quat[1] = val + elif curve_name == 'QuatZ': quat[2] = val - for curve in ipo: - val = curve.evaluate(1) - curve_name= curve.name - if curve_name == 'LocX': loc[0] = val - elif curve_name == 'LocY': loc[1] = val - elif curve_name == 'LocZ': loc[2] = val - elif curve_name == 'QuatW': quat[3] = val - elif curve_name == 'QuatX': quat[0] = val - elif curve_name == 'QuatY': quat[1] = val - elif curve_name == 'QuatZ': quat[2] = val - - bake_data[frame_index][bone_name] = loc, quat - - + bake_data[frame_index][bone_name] = loc, quat + else: + if ACTION_BAKE_FIRST_FRAME: pose_bone.insertKey(ob_arm, frame_index+1, POSE_XFORM) + else: pose_bone.insertKey(ob_arm, current_frame , POSE_XFORM) frame_index+=1 - + print "\nBaking Complete." ob_arm.action = backup_action - Blender.Set('curframe', backup_frame) - return bake_data + if ACTION_BAKE==False: + Blender.Set('curframe', backup_frame) + return bake_data + elif ACTION_BAKE==True: + return new_action + else: print "ERROR: Invalid ACTION_BAKE %i sent to BPyArmature" % ACTION_BAKE From b22d3e615d75232ba0ac3327acb4c1b0101e77a4 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 22 Jun 2008 23:07:42 +0000 Subject: [PATCH 282/430] Moving Line to Line intersection into arithb --- source/blender/blenlib/BLI_arithb.h | 1 + source/blender/blenlib/intern/arithb.c | 68 +++++++++++++++++++++++ source/blender/python/api2_2x/Mathutils.c | 62 +++------------------ 3 files changed, 78 insertions(+), 53 deletions(-) diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 4d277cf98e1..4fa880c36d1 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -374,6 +374,7 @@ void LocQuatSizeToMat4(float mat[][4], float loc[3], float quat[4], float size[3 void tubemap(float x, float y, float z, float *u, float *v); void spheremap(float x, float y, float z, float *u, float *v); +int LineIntersectLine(float v1[3], float v2[3], float v3[3], float v4[3], float i1[3], float i2[3]); int LineIntersectsTriangle(float p1[3], float p2[3], float v0[3], float v1[3], float v2[3], float *lambda, float *uv); int RayIntersectsTriangle(float p1[3], float d[3], float v0[3], float v1[3], float v2[3], float *lambda, float *uv); int SweepingSphereIntersectsTriangleUV(float p1[3], float p2[3], float radius, float v0[3], float v1[3], float v2[3], float *lambda, float *ipoint); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 322a9e6fd02..2084ab3da5f 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -4032,6 +4032,74 @@ int AxialLineIntersectsTriangle(int axis, float p1[3], float p2[3], float v0[3], return 1; } +/* Returns the number of point of interests + * 0 - lines are colinear + * 1 - lines are coplanar, i1 is set to intersection + * 2 - i1 and i2 are the nearest points on line 1 (v1, v2) and line 2 (v3, v4) respectively + * */ +int LineIntersectLine(float v1[3], float v2[3], float v3[3], float v4[3], float i1[3], float i2[3]) +{ + float a[3], b[3], c[3], ab[3], cb[3], dir1[3], dir2[3]; + float d; + + VecSubf(c, v3, v1); + VecSubf(a, v2, v1); + VecSubf(b, v4, v3); + + VecCopyf(dir1, a); + Normalize(dir1); + VecCopyf(dir2, b); + Normalize(dir2); + d = Inpf(dir1, dir2); + if (d == 1.0f || d == -1.0f) { + /* colinear */ + return 0; + } + + Crossf(ab, a, b); + d = Inpf(c, ab); + + /* test if the two lines are coplanar */ + if (d > -0.000001f && d < 0.000001f) { + Crossf(cb, c, b); + + VecMulf(a, Inpf(cb, ab) / Inpf(ab, ab)); + VecAddf(i1, v1, a); + VecCopyf(i2, i1); + + return 1; /* one intersection only */ + } + /* if not */ + else { + float n[3], t[3]; + float v3t[3], v4t[3]; + VecSubf(t, v1, v3); + + /* offset between both plane where the lines lies */ + Crossf(n, a, b); + Projf(t, t, n); + + /* for the first line, offset the second line until it is coplanar */ + VecAddf(v3t, v3, t); + VecAddf(v4t, v4, t); + + VecSubf(c, v3t, v1); + VecSubf(a, v2, v1); + VecSubf(b, v4t, v3); + + Crossf(ab, a, b); + Crossf(cb, c, b); + + VecMulf(a, Inpf(cb, ab) / Inpf(ab, ab)); + VecAddf(i1, v1, a); + + /* for the second line, just substract the offset from the first intersection point */ + VecSubf(i2, i1, t); + + return 2; /* two nearest points */ + } +} + int AabbIntersectAabb(float min1[3], float max1[3], float min2[3], float max2[3]) { return (min1[0]size == 3 || vec1->size == 2) { - float a[3], b[3], c[3], ab[3], cb[3], dir1[3], dir2[3]; - float d; + int result; + if (vec1->size == 3) { VECCOPY(v1, vec1->vec); VECCOPY(v2, vec2->vec); @@ -1477,63 +1477,19 @@ PyObject *M_Mathutils_LineIntersect( PyObject * self, PyObject * args ) v4[1] = vec4->vec[1]; v4[2] = 0.0f; } + + result = LineIntersectLine(v1, v2, v3, v4, i1, i2); - VecSubf(c, v3, v1); - VecSubf(a, v2, v1); - VecSubf(b, v4, v3); - - VECCOPY(dir1, a); - Normalize(dir1); - VECCOPY(dir2, b); - Normalize(dir2); - d = Inpf(dir1, dir2); - if (d == 1.0f || d == -1.0f) { + if (result == 0) { /* colinear */ return EXPP_incr_ret( Py_None ); } - - Crossf(ab, a, b); - d = Inpf(c, ab); - - /* test if the two lines are coplanar */ - if (d > -0.000001f && d < 0.000001f) { - Crossf(cb, c, b); - - VecMulf(a, Inpf(cb, ab) / Inpf(ab, ab)); - VecAddf(i1, v1, a); - VECCOPY(i2, i1); - } - /* if not */ else { - float n[3], t[3]; - VecSubf(t, v1, v3); - - /* offset between both plane where the lines lies */ - Crossf(n, a, b); - Projf(t, t, n); - - /* for the first line, offset the second line until it is coplanar */ - VecAddf(v3, v3, t); - VecAddf(v4, v4, t); - - VecSubf(c, v3, v1); - VecSubf(a, v2, v1); - VecSubf(b, v4, v3); - - Crossf(ab, a, b); - Crossf(cb, c, b); - - VecMulf(a, Inpf(cb, ab) / Inpf(ab, ab)); - VecAddf(i1, v1, a); - - /* for the second line, just substract the offset from the first intersection point */ - VecSubf(i2, i1, t); + tuple = PyTuple_New( 2 ); + PyTuple_SetItem( tuple, 0, newVectorObject(i1, vec1->size, Py_NEW) ); + PyTuple_SetItem( tuple, 1, newVectorObject(i2, vec1->size, Py_NEW) ); + return tuple; } - - tuple = PyTuple_New( 2 ); - PyTuple_SetItem( tuple, 0, newVectorObject(i1, vec1->size, Py_NEW) ); - PyTuple_SetItem( tuple, 1, newVectorObject(i2, vec1->size, Py_NEW) ); - return tuple; } else { return ( EXPP_ReturnPyObjError( PyExc_TypeError, From 7a55f52b1bddc389dca1d456dafb79751abcc9c1 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 22 Jun 2008 23:21:29 +0000 Subject: [PATCH 283/430] Transform Snapping Snap to edges and vertice without have to go through faces. This means you can import floor plans and use the edges as snapping guides and other sort of fun things. The bounding box test still needs padding though. --- source/blender/src/transform_snap.c | 569 ++++++++++++++++------------ 1 file changed, 337 insertions(+), 232 deletions(-) diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 04ca5b08755..d16308f17ae 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -737,136 +737,6 @@ void TargetSnapClosest(TransInfo *t) } /*================================================================*/ - -/* find snapping point on face, return 1 on success */ -int snapFace(MFace *face, EditFace *efa, MVert *verts, float *intersect, float *loc, float *no) -{ - MVert *v[4]; - EditVert *eve[4]; - int totvert; - int result = 0; - - v[0] = verts + face->v1; - v[1] = verts + face->v2; - v[2] = verts + face->v3; - - if (face->v4) - { - v[3] = verts + face->v4; - totvert = 4; - } - else - { - v[3] = NULL; - totvert = 3; - } - - if (efa) - { - eve[0] = efa->v1; - eve[1] = efa->v2; - eve[2] = efa->v3; - eve[3] = efa->v4; - } - - switch(G.scene->snap_mode) - { - case SCE_SNAP_MODE_VERTEX: - { - float min_dist = FLT_MAX; - int i; - - for(i = 0; i < totvert; i++) - { - - if (efa == NULL || (eve[i]->f1 & SELECT) == 0) - { - float vert_dist = VecLenf(v[i]->co, intersect); - - if (vert_dist < min_dist) - { - result = 1; - - min_dist = vert_dist; - - VECCOPY(loc, v[i]->co); - NormalShortToFloat(no, v[i]->no); - } - } - } - break; - } - case SCE_SNAP_MODE_EDGE: - { - float min_dist = FLT_MAX; - int i; - - for(i = 0; i < totvert; i++) - { - MVert *v1, *v2; - EditVert *eve1, *eve2; - - v1 = v[i]; - v2 = v[(i + 1) % totvert]; - - eve1 = eve[i]; - eve2 = eve[(i + 1) % totvert]; - - if (efa == NULL || ((eve1->f1 & SELECT) == 0 && (eve2->f1 & SELECT) == 0)) - { - float edge_loc[3]; - float vec[3]; - float mul; - float edge_dist; - - VecSubf(edge_loc, v2->co, v1->co); - VecSubf(vec, intersect, v1->co); - - mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); - - VecMulf(edge_loc, mul); - VecAddf(edge_loc, edge_loc, v1->co); - - edge_dist = VecLenf(edge_loc, intersect); - - if (edge_dist < min_dist) - { - float n1[3], n2[3]; - result = 1; - - min_dist = edge_dist; - - VECCOPY(loc, edge_loc); - - NormalShortToFloat(n1, v1->no); - NormalShortToFloat(n2, v2->no); - VecLerpf(no, n1, n2, mul); - Normalize(no); - } - } - } - break; - } - case SCE_SNAP_MODE_FACE: - { - if (efa == NULL || ((efa->f1 & SELECT) == 0)) - { - result = 1; - - VECCOPY(loc, intersect); - - if (totvert == 4) - CalcNormFloat4(v[0]->co, v[1]->co, v[2]->co, v[3]->co, no); - else - CalcNormFloat(v[0]->co, v[1]->co, v[2]->co, no); - } - break; - } - } - - return result; -} - int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], short mval[2], float *loc, float *no, int *dist, float *depth, short EditMesh) { int retval = 0; @@ -891,7 +761,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta Mat4Mul3Vecfl(imat, ray_normal_local); - /* If number of vert is more than an arbitrary limit, + /* If number of vert is more than an arbitrary limit, * test against boundbox first * */ if (totface > 16) { @@ -900,117 +770,83 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta } if (test == 1) { - MVert *verts = dm->getVertArray(dm); - MFace *faces = dm->getFaceArray(dm); - int *index_array = NULL; - int index = 0; - int i; - if (EditMesh) + switch (G.scene->snap_mode) { - index_array = dm->getFaceDataArray(dm, CD_ORIGINDEX); - EM_init_index_arrays(0, 0, 1); - } - - for( i = 0; i < totface; i++) { - EditFace *efa = NULL; - MFace *f = faces + i; - float lambda; - int result; - - test = 1; /* reset for every face */ - - if (EditMesh) - { - if (index_array) + case SCE_SNAP_MODE_FACE: + { + MVert *verts = dm->getVertArray(dm); + MFace *faces = dm->getFaceArray(dm); + int *index_array = NULL; + int index = 0; + int i; + + if (EditMesh) { - index = index_array[i]; - } - else - { - index = i; + index_array = dm->getFaceDataArray(dm, CD_ORIGINDEX); + EM_init_index_arrays(0, 0, 1); } - if (index == ORIGINDEX_NONE) - { - test = 0; - } - else - { - efa = EM_get_face_for_index(index); + for( i = 0; i < totface; i++) { + EditFace *efa = NULL; + MFace *f = faces + i; + float lambda; + int result; - if (efa && efa->f1 & SELECT) + test = 1; /* reset for every face */ + + if (EditMesh) { - test = 0; - } - } - } - - - if (test) - { - result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, &lambda, NULL); - - if (result) { - float location[3], normal[3]; - float intersect[3]; - - VECCOPY(intersect, ray_normal_local); - VecMulf(intersect, lambda); - VecAddf(intersect, intersect, ray_start_local); - - if (snapFace(f, efa, verts, intersect, location, normal)) - { - float new_depth; - int screen_loc[2]; - int new_dist; - - Mat4MulVecfl(obmat, location); - - new_depth = VecLenf(location, ray_start); - - project_int(location, screen_loc); - new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); - - if (new_dist <= *dist && new_depth < *depth) + if (index_array) { - *depth = new_depth; - retval = 1; - - VECCOPY(loc, location); - VECCOPY(no, normal); - - Mat3MulVecfl(timat, no); - Normalize(no); - - project_int(loc, screen_loc); - - *dist = new_dist; - } - } - } - - if (f->v4 && result == 0) - { - result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v3].co, verts[f->v4].co, verts[f->v1].co, &lambda, NULL); - - if (result) { - float location[3], normal[3]; - float intersect[3]; + index = index_array[i]; + } + else + { + index = i; + } - VECCOPY(intersect, ray_normal_local); - VecMulf(intersect, lambda); - VecAddf(intersect, intersect, ray_start_local); - - if (snapFace(f, efa, verts, intersect, location, normal)) - { + if (index == ORIGINDEX_NONE) + { + test = 0; + } + else + { + efa = EM_get_face_for_index(index); + + if (efa && efa->f & SELECT) + { + test = 0; + } + } + } + + + if (test) + { + result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, &lambda, NULL); + + if (result) { + float location[3], normal[3]; + float intersect[3]; float new_depth; int screen_loc[2]; int new_dist; + VECCOPY(intersect, ray_normal_local); + VecMulf(intersect, lambda); + VecAddf(intersect, intersect, ray_start_local); + + VECCOPY(location, intersect); + + if (f->v4) + CalcNormFloat4(verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co, normal); + else + CalcNormFloat(verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, normal); + Mat4MulVecfl(obmat, location); - new_depth = VecLenf(location, ray_start); + new_depth = VecLenf(location, ray_start); project_int(location, screen_loc); new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); @@ -1029,14 +865,283 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta *dist = new_dist; } } + + if (f->v4 && result == 0) + { + result = RayIntersectsTriangle(ray_start_local, ray_normal_local, verts[f->v3].co, verts[f->v4].co, verts[f->v1].co, &lambda, NULL); + + if (result) { + float location[3], normal[3]; + float intersect[3]; + float new_depth; + int screen_loc[2]; + int new_dist; + + VECCOPY(intersect, ray_normal_local); + VecMulf(intersect, lambda); + VecAddf(intersect, intersect, ray_start_local); + + VECCOPY(location, intersect); + + if (f->v4) + CalcNormFloat4(verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, verts[f->v4].co, normal); + else + CalcNormFloat(verts[f->v1].co, verts[f->v2].co, verts[f->v3].co, normal); + + Mat4MulVecfl(obmat, location); + + new_depth = VecLenf(location, ray_start); + + project_int(location, screen_loc); + new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + + if (new_dist <= *dist && new_depth < *depth) + { + *depth = new_depth; + retval = 1; + + VECCOPY(loc, location); + VECCOPY(no, normal); + + Mat3MulVecfl(timat, no); + Normalize(no); + + *dist = new_dist; + } + } + } } } + + if (EditMesh) + { + EM_free_index_arrays(); + } + break; + } + case SCE_SNAP_MODE_VERTEX: + { + MVert *verts = dm->getVertArray(dm); + int *index_array = NULL; + int index = 0; + int i; + + if (EditMesh) + { + index_array = dm->getVertDataArray(dm, CD_ORIGINDEX); + EM_init_index_arrays(1, 0, 0); + } + + for( i = 0; i < totvert; i++) { + EditVert *eve = NULL; + MVert *v = verts + i; + + test = 1; /* reset for every vert */ + + if (EditMesh) + { + if (index_array) + { + index = index_array[i]; + } + else + { + index = i; + } + + if (index == ORIGINDEX_NONE) + { + test = 0; + } + else + { + eve = EM_get_vert_for_index(index); + + if (eve && eve->f & SELECT) + { + test = 0; + } + } + } + + + if (test) + { + float dvec[3]; + + VecSubf(dvec, v->co, ray_start_local); + + if (Inpf(ray_normal_local, dvec) > 0) + { + float location[3]; + float new_depth; + int screen_loc[2]; + int new_dist; + + VECCOPY(location, v->co); + + Mat4MulVecfl(obmat, location); + + new_depth = VecLenf(location, ray_start); + + project_int(location, screen_loc); + new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + + if (new_dist <= *dist && new_depth < *depth) + { + *depth = new_depth; + retval = 1; + + VECCOPY(loc, location); + + NormalShortToFloat(no, v->no); + Mat3MulVecfl(timat, no); + Normalize(no); + + *dist = new_dist; + } + } + } + } + + if (EditMesh) + { + EM_free_index_arrays(); + } + break; + } + case SCE_SNAP_MODE_EDGE: + { + MVert *verts = dm->getVertArray(dm); + MEdge *edges = dm->getEdgeArray(dm); + int totedge = dm->getNumEdges(dm); + int *index_array = NULL; + int index = 0; + int i; + + if (EditMesh) + { + index_array = dm->getEdgeDataArray(dm, CD_ORIGINDEX); + EM_init_index_arrays(0, 1, 0); + } + + for( i = 0; i < totedge; i++) { + EditEdge *eed = NULL; + MEdge *e = edges + i; + + test = 1; /* reset for every vert */ + + if (EditMesh) + { + if (index_array) + { + index = index_array[i]; + } + else + { + index = i; + } + + if (index == ORIGINDEX_NONE) + { + test = 0; + } + else + { + eed = EM_get_edge_for_index(index); + + if (eed && ((eed->v1->f & SELECT) || (eed->v2->f & SELECT))) + { + test = 0; + } + } + } + + + if (test) + { + float intersect[3] = {0, 0, 0}, ray_end[3], dvec[3]; + int result; + + VECCOPY(ray_end, ray_normal_local); + VecMulf(ray_end, 2000); + VecAddf(ray_end, ray_start_local, ray_end); + + result = LineIntersectLine(verts[e->v1].co, verts[e->v2].co, ray_start_local, ray_end, intersect, dvec); /* dvec used but we don't care about result */ + + if (result) + { + float edge_loc[3], vec[3]; + float mul; + + /* check for behind ray_start */ + VecSubf(dvec, intersect, ray_start_local); + + VecSubf(edge_loc, verts[e->v1].co, verts[e->v2].co); + VecSubf(vec, intersect, verts[e->v2].co); + + mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); + + if (mul > 1) { + mul = 1; + VECCOPY(intersect, verts[e->v1].co); + } + else if (mul < 0) { + mul = 0; + VECCOPY(intersect, verts[e->v2].co); + } + + if (Inpf(ray_normal_local, dvec) > 0) + { + float location[3]; + float new_depth; + int screen_loc[2]; + int new_dist; + + VECCOPY(location, intersect); + + Mat4MulVecfl(obmat, location); + + new_depth = VecLenf(location, ray_start); + + project_int(location, screen_loc); + new_dist = abs(screen_loc[0] - mval[0]) + abs(screen_loc[1] - mval[1]); + + if (new_dist <= *dist && new_depth < *depth) + { + float n1[3], n2[3]; + + *depth = new_depth; + retval = 1; + + VecSubf(edge_loc, verts[e->v1].co, verts[e->v2].co); + VecSubf(vec, intersect, verts[e->v2].co); + + mul = Inpf(vec, edge_loc) / Inpf(edge_loc, edge_loc); + + NormalShortToFloat(n1, verts[e->v1].no); + NormalShortToFloat(n2, verts[e->v2].no); + VecLerpf(no, n2, n1, mul); + Normalize(no); + + VECCOPY(loc, location); + + Mat3MulVecfl(timat, no); + Normalize(no); + + *dist = new_dist; + } + } + } + } + } + + if (EditMesh) + { + EM_free_index_arrays(); + } + break; } - } - - if (EditMesh) - { - EM_free_index_arrays(); } } } From fcc377e204bd1cb3d474c1e3bbb5e0ae7f267cff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Jun 2008 00:21:49 +0000 Subject: [PATCH 284/430] [#13635] DirectX8Exporter with vertex colors patch from Masaru Nemoto (mnemoto) Made some modifications to the patch, use reduce() to get total face verts and some speedup for face vcol looping, also don't write vcol alpha since its used by brushes internally and has no useful meaning. --- release/scripts/DirectX8Exporter.py | 34 ++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/release/scripts/DirectX8Exporter.py b/release/scripts/DirectX8Exporter.py index 2ec42057039..01212545f77 100644 --- a/release/scripts/DirectX8Exporter.py +++ b/release/scripts/DirectX8Exporter.py @@ -6,9 +6,9 @@ # Group: 'Export' # Tooltip: 'Export to DirectX text file format format for XNA Animation Component Library.' """ -__author__ = "minahito (original:Arben (Ben) Omari)" -__url__ = ("blender", "blenderartists.org", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it") -__version__ = "3.0" +__author__ = "vertex color exporting feature is added by mnemoto (original:minahito (original:Arben (Ben) Omari))" +__url__ = ("blender", "elysiun", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it","Adjuster's site http://ex.homeunix.net/") +__version__ = "3.1" __bpydoc__ = """\ This script exports a Blender mesh with armature to DirectX 8's text file @@ -444,6 +444,7 @@ class xExport: self.writeMeshMaterialList(obj, mesh, tex) self.writeMeshNormals(obj, mesh) self.writeMeshTextureCoords(obj, mesh) + self.writeMeshVertexColors(obj, mesh) self.file.write(" } // End of the Mesh %s \n" % (obj.name)) @@ -464,6 +465,7 @@ class xExport: self.writeMeshMaterialList(obj, mesh, tex) self.writeMeshNormals(obj, mesh) self.writeMeshTextureCoords(obj, mesh) + self.writeMeshVertexColors(obj, mesh) self.file.write(" }\n") self.file.write("}\n") ind = objs.index(obj) @@ -1047,6 +1049,32 @@ template SkinWeights {\n\ self.file.write(",\n") self.file.write("} //End of MeshTextureCoords\n") + + #*********************************************** + #MESH VORTEX COLORS + #*********************************************** + def writeMeshVertexColors(self, name, mesh): + if mesh.hasVertexColours(): + self.file.write("MeshVertexColors {\n") + #VERTICES NUMBER + numvert = reduce( lambda i,f: len(f)+i, mesh.faces, 0) + self.file.write("%d;\n" % (numvert)) + #VERTEX COLORS + + vcounter =0 + for f in mesh.faces: + col = f.col + for i,c in enumerate(col): + # Note vcol alpha has no meaning + self.file.write("%d;%f;%f;%f;%f;" % (vcounter,c.r/255.0, c.g/255.0, c.b/255.0, 1.0)) # c.a/255.0)) + vcounter+=1 + if vcounter == numvert : + self.file.write(";\n") + else : + self.file.write(",\n") + + self.file.write("} //End of MeshVertexColors\n") + #***********************************************#***********************************************#*********************************************** #*********************************************** #FRAMES From cb6fd8927cbdc12b299a1ccaea4321ddf162dd4d Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Mon, 23 Jun 2008 07:59:26 +0000 Subject: [PATCH 285/430] An initializer line was missing from the beginning of a loop, causing crashes. --- source/blender/blenkernel/intern/particle_system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index f06ef221795..458171cc232 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2596,6 +2596,7 @@ static void precalc_effectors(Object *ob, ParticleSystem *psys, ParticleSystemMo for(ec= lb->first; ec; ec= ec->next) { PartDeflect *pd= ec->ob->pd; + co = NULL; if(ec->type==PSYS_EC_EFFECTOR && pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE && part->phystype!=PART_PHYS_BOIDS) { From 75e22a1917fb638a67d475b224cb6e368e821783 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 23 Jun 2008 15:32:44 +0000 Subject: [PATCH 286/430] BGE patch #14386: Action Actuator Current Frame Prop. This patch is very usefull for action feedback logic: a sensor on the property can be used to detect a certain moment in the action and trigger more stuff. The property must be on float type for best results --- source/blender/makesdna/DNA_actuator_types.h | 1 + source/blender/src/buttons_logic.c | 23 +++++---- .../Converter/BL_ActionActuator.cpp | 49 +++++++++++++++++++ .../gameengine/Converter/BL_ActionActuator.h | 7 ++- .../Converter/KX_ConvertActuators.cpp | 2 + 5 files changed, 71 insertions(+), 11 deletions(-) diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 417ba540e2c..70d603a6ed9 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -50,6 +50,7 @@ typedef struct bActionActuator { short type, flag; /* Playback type */ int sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ + char frameProp[32]; /* Set this property to the actions current frame */ int blendin; /* Number of frames of blending */ short priority; /* Execution priority */ short strideaxis; /* Displacement axis */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index c4fc17bc4d0..e7933c10162 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1673,31 +1673,34 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh #else str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6"; #endif - uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, width-60, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); - uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+30, yco-44, width-60, 19, &aa->act, "Action name"); + uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, (width-60)/2, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); + uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+30 + ((width-60)/2), yco-24, (width-60)/2, 19, &aa->act, "Action name"); if(aa->type == ACT_ACTION_FROM_PROP) { - uiDefBut(block, TEX, 0, "Prop: ",xco+30, yco-64, width-60, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); + uiDefBut(block, TEX, 0, "Prop: ",xco+30, yco-44, width-60, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); } else { - uiDefButI(block, NUM, 0, "Sta: ",xco+30, yco-64, (width-60)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); - uiDefButI(block, NUM, 0, "End: ",xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); + uiDefButI(block, NUM, 0, "Sta: ",xco+30, yco-44, (width-60)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); + uiDefButI(block, NUM, 0, "End: ",xco+30+(width-60)/2, yco-44, (width-60)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); } + + uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); + uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers"); - - - uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-84, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); - uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-84, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers"); + uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); + #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR if(aa->type == ACT_ACTION_MOTION) { - uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-104, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action"); + uiDefButF(block, NUM, 0, "Cycle: ",xco+30, yco-84, (width-60)/2, 19, &aa->stridelength, 0.0, 2500.0, 0, 0, "Distance covered by a single cycle of the action"); } #endif + + yco-=ysize; break; } diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index ad126ebf123..83be5d3a14f 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -49,6 +49,7 @@ #include "BLI_arithb.h" #include "MT_Matrix4x4.h" #include "BKE_utildefines.h" +#include "FloatValue.h" #ifdef HAVE_CONFIG_H #include @@ -348,6 +349,18 @@ bool BL_ActionActuator::Update(double curtime, bool frame) break; } + /* Set the property if its defined */ + if (m_framepropname) { + CValue* propowner = GetParent(); + CValue* oldprop = propowner->GetProperty(m_framepropname); + CValue* newval = new CFloatValue(m_localtime); + if (oldprop) { + oldprop->SetValue(newval); + } else { + propowner->SetProperty(m_framepropname, newval); + } + newval->Release(); + } if (bNegativeEvent) m_blendframe=0.0; @@ -446,6 +459,7 @@ PyMethodDef BL_ActionActuator::Methods[] = { {"setPriority", (PyCFunction) BL_ActionActuator::sPySetPriority, METH_VARARGS, SetPriority_doc}, {"setFrame", (PyCFunction) BL_ActionActuator::sPySetFrame, METH_VARARGS, SetFrame_doc}, {"setProperty", (PyCFunction) BL_ActionActuator::sPySetProperty, METH_VARARGS, SetProperty_doc}, + {"setFrameProperty", (PyCFunction) BL_ActionActuator::sPySetFrameProperty, METH_VARARGS, SetFrameProperty_doc}, {"setBlendtime", (PyCFunction) BL_ActionActuator::sPySetBlendtime, METH_VARARGS, SetBlendtime_doc}, {"getAction", (PyCFunction) BL_ActionActuator::sPyGetAction, METH_VARARGS, GetAction_doc}, @@ -455,6 +469,7 @@ PyMethodDef BL_ActionActuator::Methods[] = { {"getPriority", (PyCFunction) BL_ActionActuator::sPyGetPriority, METH_VARARGS, GetPriority_doc}, {"getFrame", (PyCFunction) BL_ActionActuator::sPyGetFrame, METH_VARARGS, GetFrame_doc}, {"getProperty", (PyCFunction) BL_ActionActuator::sPyGetProperty, METH_VARARGS, GetProperty_doc}, + {"getFrameProperty", (PyCFunction) BL_ActionActuator::sPyGetFrameProperty, METH_VARARGS, GetFrameProperty_doc}, {"setChannel", (PyCFunction) BL_ActionActuator::sPySetChannel, METH_VARARGS, SetChannel_doc}, // {"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_VARARGS}, {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, @@ -502,6 +517,21 @@ PyObject* BL_ActionActuator::PyGetProperty(PyObject* self, return result; } +/* getProperty */ +char BL_ActionActuator::GetFrameProperty_doc[] = +"getFrameProperty()\n" +"\tReturns the name of the property, that is set to the current frame number.\n"; + +PyObject* BL_ActionActuator::PyGetFrameProperty(PyObject* self, + PyObject* args, + PyObject* kwds) { + PyObject *result; + + result = Py_BuildValue("s", (const char *)m_framepropname); + + return result; +} + /* getFrame */ char BL_ActionActuator::GetFrame_doc[] = "getFrame()\n" @@ -763,6 +793,25 @@ PyObject* BL_ActionActuator::PySetProperty(PyObject* self, return Py_None; } +/* setFrameProperty */ +char BL_ActionActuator::SetFrameProperty_doc[] = +"setFrameProperty(prop)\n" +"\t - prop : A string specifying the property of the frame set up update.\n"; + +PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* self, + PyObject* args, + PyObject* kwds) { + char *string; + + if (PyArg_ParseTuple(args,"s",&string)) + { + m_framepropname = string; + } + + Py_INCREF(Py_None); + return Py_None; +} + /* PyObject* BL_ActionActuator::PyGetChannel(PyObject* self, PyObject* args, diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h index 62edcc7fad7..190f727c9c3 100644 --- a/source/gameengine/Converter/BL_ActionActuator.h +++ b/source/gameengine/Converter/BL_ActionActuator.h @@ -40,6 +40,7 @@ public: Py_Header; BL_ActionActuator(SCA_IObject* gameobj, const STR_String& propname, + const STR_String& framepropname, float starttime, float endtime, struct bAction *action, @@ -67,7 +68,8 @@ public: m_blendpose(NULL), m_userpose(NULL), m_action(action), - m_propname(propname) + m_propname(propname), + m_framepropname(framepropname) { }; virtual ~BL_ActionActuator(); @@ -84,6 +86,7 @@ public: KX_PYMETHOD_DOC(BL_ActionActuator,SetEnd); KX_PYMETHOD_DOC(BL_ActionActuator,SetFrame); KX_PYMETHOD_DOC(BL_ActionActuator,SetProperty); + KX_PYMETHOD_DOC(BL_ActionActuator,SetFrameProperty); KX_PYMETHOD_DOC(BL_ActionActuator,SetBlendtime); KX_PYMETHOD_DOC(BL_ActionActuator,SetChannel); @@ -94,6 +97,7 @@ public: KX_PYMETHOD_DOC(BL_ActionActuator,GetEnd); KX_PYMETHOD_DOC(BL_ActionActuator,GetFrame); KX_PYMETHOD_DOC(BL_ActionActuator,GetProperty); + KX_PYMETHOD_DOC(BL_ActionActuator,GetFrameProperty); // KX_PYMETHOD(BL_ActionActuator,GetChannel); KX_PYMETHOD_DOC(BL_ActionActuator,GetType); KX_PYMETHOD_DOC(BL_ActionActuator,SetType); @@ -138,6 +142,7 @@ protected: struct bPose* m_userpose; struct bAction *m_action; STR_String m_propname; + STR_String m_framepropname; }; enum { diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index c02c2a29595..89e2925a6c1 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -178,10 +178,12 @@ void BL_ConvertActuators(char* maggiename, if (blenderobject->type==OB_ARMATURE){ bActionActuator* actact = (bActionActuator*) bact->data; STR_String propname = (actact->name ? actact->name : ""); + STR_String propframe = (actact->frameProp ? actact->frameProp : ""); BL_ActionActuator* tmpbaseact = new BL_ActionActuator( gameobj, propname, + propframe, actact->sta, actact->end, actact->act, From 8b9503e0ecb9c1f524278df0fafda409425b21da Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Jun 2008 16:47:15 +0000 Subject: [PATCH 287/430] bugfix [#14796] -t command line switch doesn't work unless FIXED_THREADS has previously been turned on Command line threads now override blendfile setting in background mode. Command line Threads greater then 8 are now clamped. --- source/blender/render/intern/source/pipeline.c | 6 +++--- source/creator/creator.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index ebb52c49132..6a0af82b4d7 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2675,9 +2675,9 @@ void RE_set_max_threads(int threads) void RE_init_threadcount(Render *re) { - if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */ + if(commandline_threads >= 1) { /* only set as an arg in background mode */ + re->r.threads= MIN2(commandline_threads, BLENDER_MAX_THREADS); + } else if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */ re->r.threads = BLI_system_thread_count(); - } else if(commandline_threads >= 1 && commandline_threads<=BLENDER_MAX_THREADS) { - re->r.threads= commandline_threads; } } diff --git a/source/creator/creator.c b/source/creator/creator.c index 2e6b5d7353e..9589f1e3e94 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -195,7 +195,7 @@ static void print_help(void) printf (" (formats that can be compiled into blender, not available on all systems)\n"); printf (" \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x \tSet option to add the file extension to the end of the file.\n"); - printf (" -t \tUse amount of for rendering.\n"); + printf (" -t \tUse amount of for rendering (background mode only).\n"); printf (" [1-8], 0 for systems processor count.\n"); printf ("\nAnimation playback options:\n"); printf (" -a \tPlayback , only operates this way when -b is not used.\n"); @@ -723,6 +723,8 @@ int main(int argc, char **argv) a++; if(G.background) { RE_set_max_threads(atoi(argv[a])); + } else { + printf("Warning: threads can only be set in background mode\n"); } break; case 'x': /* extension */ From 67c0b32375c9c2f9838cf110975d7fce9d783daa Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 23 Jun 2008 20:26:48 +0000 Subject: [PATCH 288/430] BGE patch: Add level option on sensor and fix sensor reset. Level option is now available on all sensors but is only implemented on mouse and keyboard sensors. The purpose of that option is to make the sensor react on level rather than edge by default. It's only applicable to state engine system when there is a state transition: the sensor will generate a pulse if the condition is met from the start of the state. Normally, the keyboard sensor generate a pulse only when the key is pressed and not when the key is already pressed. This patch allows to select this behavior. The second part of the patch corrects the reset method for sensors with inverted output. --- source/blender/makesdna/DNA_sensor_types.h | 2 +- .../Converter/KX_ConvertSensors.cpp | 5 ++- source/gameengine/GameLogic/SCA_ISensor.cpp | 34 +++++++++++++++++++ source/gameengine/GameLogic/SCA_ISensor.h | 7 ++++ .../GameLogic/SCA_JoystickSensor.cpp | 2 +- .../GameLogic/SCA_KeyboardSensor.cpp | 24 ++++++------- .../gameengine/GameLogic/SCA_MouseSensor.cpp | 11 +++--- .../GameLogic/SCA_PropertySensor.cpp | 2 +- .../gameengine/Ketsji/KX_MouseFocusSensor.cpp | 8 ++--- source/gameengine/Ketsji/KX_RaySensor.cpp | 2 +- 10 files changed, 69 insertions(+), 28 deletions(-) diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index 3fd57a85349..ae7b92bb06c 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -144,7 +144,7 @@ typedef struct bSensor { /* just add here, to avoid align errors... */ short invert; /* Whether or not to invert the output. */ - short freq2; /* The negative pulsing frequency? Not used anymore... */ + short level; /* Whether the sensor is level base (edge by default) */ int pad; } bSensor; diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index 80fa3838d60..e7e4eeae7d2 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -251,6 +251,7 @@ void BL_ConvertSensors(struct Object* blenderobject, bool neg_pulsemode = false; int frequency = 0; bool invert = false; + bool level = false; while(sens) { @@ -263,7 +264,8 @@ void BL_ConvertSensors(struct Object* blenderobject, frequency = sens->freq; invert = !(sens->invert == 0); - + level = !(sens->level == 0); + switch (sens->type) { case SENS_ALWAYS: @@ -711,6 +713,7 @@ void BL_ConvertSensors(struct Object* blenderobject, neg_pulsemode, frequency); gamesensor->SetInvert(invert); + gamesensor->SetLevel(level); gamesensor->SetName(STR_String(sens->name)); gameobj->AddSensor(gamesensor); diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 1c29eb27be5..6cfae9d8919 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -55,6 +55,7 @@ SCA_ISensor::SCA_ISensor(SCA_IObject* gameobj, m_links = 0; m_suspended = false; m_invert = false; + m_level = false; m_pos_ticks = 0; m_neg_ticks = 0; m_pos_pulsemode = false; @@ -95,6 +96,10 @@ void SCA_ISensor::SetInvert(bool inv) { m_invert = inv; } +void SCA_ISensor::SetLevel(bool lvl) { + m_level = lvl; +} + float SCA_ISensor::GetNumber() { return IsPositiveTrigger(); @@ -177,6 +182,10 @@ PyMethodDef SCA_ISensor::Methods[] = { METH_VARARGS, GetInvert_doc}, {"setInvert", (PyCFunction) SCA_ISensor::sPySetInvert, METH_VARARGS, SetInvert_doc}, + {"getLevel", (PyCFunction) SCA_ISensor::sPyGetLevel, + METH_VARARGS, GetLevel_doc}, + {"setLevel", (PyCFunction) SCA_ISensor::sPySetLevel, + METH_VARARGS, SetLevel_doc}, {NULL,NULL} //Sentinel }; @@ -328,6 +337,31 @@ PyObject* SCA_ISensor::PySetInvert(PyObject* self, PyObject* args, PyObject* kwd Py_Return; } +char SCA_ISensor::GetLevel_doc[] = +"getLevel()\n" +"\tReturns whether this sensor is a level detector or a edge detector.\n" +"\tIt makes a difference only in case of logic state transition (state actuator).\n" +"\tA level detector will immediately generate a pulse if the condition for the\n" +"\tdetector is met when entering the state. A edge detector will wait for an off-on\n" +"\ttransition to occur.\n" +"\tOnly some sensors implement this feature: keyboard.\n"; +PyObject* SCA_ISensor::PyGetLevel(PyObject* self, PyObject* args, PyObject* kwds) +{ + return BoolToPyArg(m_level); +} + +char SCA_ISensor::SetLevel_doc[] = +"setLevel(level?)\n" +"\t- level?: Detect level instead of edge? (KX_TRUE, KX_FALSE)\n" +"\tSet whether to detect level or edge transition when entering a state.\n"; +PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds) +{ + int pyarg = 0; + if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; } + m_level = PyArgToBool(pyarg); + Py_Return; +} + char SCA_ISensor::GetUseNegPulseMode_doc[] = "getUseNegPulseMode()\n" "\tReturns whether negative pulse mode is active.\n"; diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index 292b2d160ae..3527b87ebdb 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -61,6 +61,9 @@ class SCA_ISensor : public SCA_ILogicBrick /** invert the output signal*/ bool m_invert; + /** detect level instead of edge*/ + bool m_level; + /** Sensor must ignore updates? */ bool m_suspended; @@ -105,6 +108,8 @@ public: virtual void Delete() { Release(); } /** Set inversion of pulses on or off. */ void SetInvert(bool inv); + /** set the level detection on or off */ + void SetLevel(bool lvl); void RegisterToManager(); virtual float GetNumber(); @@ -134,6 +139,8 @@ public: KX_PYMETHOD_DOC(SCA_ISensor,SetUseNegPulseMode); KX_PYMETHOD_DOC(SCA_ISensor,GetInvert); KX_PYMETHOD_DOC(SCA_ISensor,SetInvert); + KX_PYMETHOD_DOC(SCA_ISensor,GetLevel); + KX_PYMETHOD_DOC(SCA_ISensor,SetLevel); }; diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 81938f05af1..8668c22f044 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -69,7 +69,7 @@ std::cout << " hat flag " << m_hatf << std::endl; void SCA_JoystickSensor::Init() { - m_istrig=0; + m_istrig=(m_invert)?1:0; } SCA_JoystickSensor::~SCA_JoystickSensor() diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index c6c06846e3b..43ce25f94df 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -77,7 +77,7 @@ void SCA_KeyboardSensor::Init() // by the state engine. It reinitializes the sensor as if it was just created. // However, if the target key is pressed when the sensor is reactivated, it // will not generated an event (see remark in Evaluate()). - m_val = 0; + m_val = (m_invert)?1:0; } CValue* SCA_KeyboardSensor::GetReplica() @@ -176,10 +176,10 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) { if (m_val == 0) { - //see comment below - //m_val = 1; - //result = true; - ; + if (m_level) { + m_val = 1; + result = true; + } } } else { @@ -229,15 +229,11 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) { if (m_val == 0) { - //hmm, this abnormal situation may occur in the following cases: - //- the key was pressed while the scene was suspended - //- this is a new scene and the key is active from the start - //In the second case, it's dangerous to activate the sensor - //(think of a key to go to next scene) - //What we really need is a edge/level flag in the key sensor - //m_val = 1; - //result = true; - ; + if (m_level) + { + m_val = 1; + result = true; + } } } } diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index 11e67eda014..42d35837489 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -83,7 +83,7 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr, void SCA_MouseSensor::Init() { - m_val = 0; /* stores the latest attribute */ + m_val = (m_invert)?1:0; /* stores the latest attribute */ } SCA_MouseSensor::~SCA_MouseSensor() @@ -168,10 +168,11 @@ bool SCA_MouseSensor::Evaluate(CValue* event) { if (m_val == 0) { - //dangerous - //m_val = 1; - //result = true; - ; + if (m_level) + { + m_val = 1; + result = true; + } } } else { diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index d6eb246ffd2..655e9060238 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -54,7 +54,6 @@ SCA_PropertySensor::SCA_PropertySensor(SCA_EventManager* eventmgr, m_checkpropval(propval), m_checkpropmaxval(propmaxval), m_checkpropname(propname), - m_lastresult(false), m_range_expr(NULL) { //CParser pars; @@ -78,6 +77,7 @@ SCA_PropertySensor::SCA_PropertySensor(SCA_EventManager* eventmgr, void SCA_PropertySensor::Init() { m_recentresult = false; + m_lastresult = m_invert?true:false; } void SCA_PropertySensor::PrecalculateRangeExpression() diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index f306f0dbfbb..f89d32bbe66 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -74,7 +74,7 @@ KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr, void KX_MouseFocusSensor::Init() { - m_mouse_over_in_previous_frame = false; + m_mouse_over_in_previous_frame = (m_invert)?true:false; m_positive_event = false; m_hitObject = 0; } @@ -92,13 +92,13 @@ bool KX_MouseFocusSensor::Evaluate(CValue* event) obHasFocus = ParentObjectHasFocus(); if (!obHasFocus) { + m_positive_event = false; if (m_mouse_over_in_previous_frame) { - m_positive_event = false; - result = true; + result = true; } } else { + m_positive_event = true; if (!m_mouse_over_in_previous_frame) { - m_positive_event = true; result = true; } } diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 02b814105b4..e847c59bae1 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -69,7 +69,7 @@ KX_RaySensor::KX_RaySensor(class SCA_EventManager* eventmgr, void KX_RaySensor::Init() { - m_bTriggered = false; + m_bTriggered = (m_invert)?true:false; m_rayHit = false; m_hitObject = NULL; } From 10c57fd86e0d42fe5e9f1928598e4642aa778e89 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 23 Jun 2008 20:29:32 +0000 Subject: [PATCH 289/430] BGE bug fix: action constraints were not correctly copied from Blender to BGE local copy, only the first one was copied --- source/blender/blenkernel/intern/action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 05f2e69fce1..5b96bf11056 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -350,7 +350,7 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan pchan->flag= chan->flag; con= chan->constraints.first; - for(pcon= pchan->constraints.first; pcon; pcon= pcon->next) { + for(pcon= pchan->constraints.first; pcon; pcon= pcon->next, con= con->next) { pcon->enforce= con->enforce; pcon->headtail= con->headtail; } From 02132de7aadee611c8641f01fa44efdf43f54cc4 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 23 Jun 2008 20:41:18 +0000 Subject: [PATCH 290/430] BGE patch: Add NAND, NOR, XOR, XNOR controllers. NAND controller is an inverted AND controller: the output is 1 if any of the input is 0. NOR controller is an inverted OR controller: the output is 0 if any of the input is 1. XOR controller is an exclusive OR: the output is 1 if and only if one input is 1 and all the other inputs are 0. XNOR controller is an inverted XOR: the output is 0 if and only if one input is 0 and all the other inputs are 0. The NAND, NORT and XNOR controllers are very usefull to create complementary outputs to start and stop actuators synchronously. MSCV project files updated. --- .../gameengine/gamelogic/SCA_GameLogic.vcproj | 24 +++ .../blender/makesdna/DNA_controller_types.h | 4 + source/blender/src/buttons_logic.c | 14 +- .../Converter/KX_ConvertControllers.cpp | 28 ++++ .../GameLogic/SCA_NANDController.cpp | 144 +++++++++++++++++ .../gameengine/GameLogic/SCA_NANDController.h | 56 +++++++ .../GameLogic/SCA_NORController.cpp | 144 +++++++++++++++++ .../gameengine/GameLogic/SCA_NORController.h | 56 +++++++ .../GameLogic/SCA_XNORController.cpp | 148 ++++++++++++++++++ .../gameengine/GameLogic/SCA_XNORController.h | 56 +++++++ .../GameLogic/SCA_XORController.cpp | 148 ++++++++++++++++++ .../gameengine/GameLogic/SCA_XORController.h | 56 +++++++ source/gameengine/Ketsji/KX_TouchSensor.cpp | 2 +- 13 files changed, 878 insertions(+), 2 deletions(-) create mode 100644 source/gameengine/GameLogic/SCA_NANDController.cpp create mode 100644 source/gameengine/GameLogic/SCA_NANDController.h create mode 100644 source/gameengine/GameLogic/SCA_NORController.cpp create mode 100644 source/gameengine/GameLogic/SCA_NORController.h create mode 100644 source/gameengine/GameLogic/SCA_XNORController.cpp create mode 100644 source/gameengine/GameLogic/SCA_XNORController.h create mode 100644 source/gameengine/GameLogic/SCA_XORController.cpp create mode 100644 source/gameengine/GameLogic/SCA_XORController.h diff --git a/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj b/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj index 07fcfa64a72..e0405b4d7c7 100644 --- a/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj +++ b/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj @@ -395,6 +395,12 @@ + + + + @@ -425,6 +431,12 @@ + + + +
    + + + + @@ -528,6 +546,12 @@ + + + + diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h index cc9215e7d14..376f95b0145 100644 --- a/source/blender/makesdna/DNA_controller_types.h +++ b/source/blender/makesdna/DNA_controller_types.h @@ -66,6 +66,10 @@ typedef struct bController { #define CONT_LOGIC_OR 1 #define CONT_EXPRESSION 2 #define CONT_PYTHON 3 +#define CONT_LOGIC_NAND 4 +#define CONT_LOGIC_NOR 5 +#define CONT_LOGIC_XOR 6 +#define CONT_LOGIC_XNOR 7 /* controller->flag */ #define CONT_SHOW 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index e7933c10162..bfa451428c3 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -740,6 +740,14 @@ static char *controller_name(int type) return "AND"; case CONT_LOGIC_OR: return "OR"; + case CONT_LOGIC_NAND: + return "NAND"; + case CONT_LOGIC_NOR: + return "NOR"; + case CONT_LOGIC_XOR: + return "XOR"; + case CONT_LOGIC_XNOR: + return "XNOR"; case CONT_EXPRESSION: return "Expression"; case CONT_PYTHON: @@ -750,7 +758,7 @@ static char *controller_name(int type) static char *controller_pup(void) { - return "Controllers %t|AND %x0|OR %x1|Expression %x2|Python %x3"; + return "Controllers %t|AND %x0|OR %x1|XOR %x6|NAND %x4|NOR %x5|XNOR %x7|Expression %x2|Python %x3"; } static char *actuator_name(int type) @@ -1066,6 +1074,10 @@ static void draw_default_sensor_header(bSensor *sens, (short)(x + 10 + 0.85 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19, &sens->invert, 0.0, 0.0, 0, 0, "Invert the level (output) of this sensor"); + uiDefButS(block, TOG, 1, "Lvl", + (short)(x + 10 + 0.70 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19, + &sens->level, 0.0, 0.0, 0, 0, + "Level detector versus edge detector (only applicable in case of logic state transition)"); } static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco, short width,char* objectname) diff --git a/source/gameengine/Converter/KX_ConvertControllers.cpp b/source/gameengine/Converter/KX_ConvertControllers.cpp index 179dd9f8478..da490b4ee85 100644 --- a/source/gameengine/Converter/KX_ConvertControllers.cpp +++ b/source/gameengine/Converter/KX_ConvertControllers.cpp @@ -35,6 +35,10 @@ // Controller #include "SCA_ANDController.h" #include "SCA_ORController.h" +#include "SCA_NANDController.h" +#include "SCA_NORController.h" +#include "SCA_XORController.h" +#include "SCA_XNORController.h" #include "SCA_PythonController.h" #include "SCA_ExpressionController.h" @@ -112,6 +116,30 @@ void BL_ConvertControllers( LinkControllerToActuators(gamecontroller,bcontr,logicmgr,converter); break; } + case CONT_LOGIC_NAND: + { + gamecontroller = new SCA_NANDController(gameobj); + LinkControllerToActuators(gamecontroller,bcontr,logicmgr,converter); + break; + } + case CONT_LOGIC_NOR: + { + gamecontroller = new SCA_NORController(gameobj); + LinkControllerToActuators(gamecontroller,bcontr,logicmgr,converter); + break; + } + case CONT_LOGIC_XOR: + { + gamecontroller = new SCA_XORController(gameobj); + LinkControllerToActuators(gamecontroller,bcontr,logicmgr,converter); + break; + } + case CONT_LOGIC_XNOR: + { + gamecontroller = new SCA_XNORController(gameobj); + LinkControllerToActuators(gamecontroller,bcontr,logicmgr,converter); + break; + } case CONT_EXPRESSION: { bExpressionCont* bexpcont = (bExpressionCont*) bcontr->data; diff --git a/source/gameengine/GameLogic/SCA_NANDController.cpp b/source/gameengine/GameLogic/SCA_NANDController.cpp new file mode 100644 index 00000000000..5b869ee8298 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_NANDController.cpp @@ -0,0 +1,144 @@ +/** + * 'Nand' together all inputs + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "SCA_NANDController.h" +#include "SCA_ISensor.h" +#include "SCA_LogicManager.h" +#include "BoolValue.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* ------------------------------------------------------------------------- */ +/* Native functions */ +/* ------------------------------------------------------------------------- */ + +SCA_NANDController::SCA_NANDController(SCA_IObject* gameobj, + PyTypeObject* T) + : + SCA_IController(gameobj,T) +{ +} + + + +SCA_NANDController::~SCA_NANDController() +{ +} + + + +void SCA_NANDController::Trigger(SCA_LogicManager* logicmgr) +{ + + bool sensorresult = false; + + for (vector::const_iterator is=m_linkedsensors.begin(); + !(is==m_linkedsensors.end());is++) + { + SCA_ISensor* sensor = *is; + if (!sensor->IsPositiveTrigger()) + { + sensorresult = true; + break; + } + } + + CValue* newevent = new CBoolValue(sensorresult); + + for (vector::const_iterator i=m_linkedactuators.begin(); + !(i==m_linkedactuators.end());i++) + { + SCA_IActuator* actua = *i;//m_linkedactuators.at(i); + logicmgr->AddActiveActuator(actua,newevent); + } + + // every actuator that needs the event, has a it's own reference to it now so + // release it (so to be clear: if there is no actuator, it's deleted right now) + newevent->Release(); + +} + + + +CValue* SCA_NANDController::GetReplica() +{ + CValue* replica = new SCA_NANDController(*this); + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + return replica; +} + + + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject SCA_NANDController::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "SCA_NANDController", + sizeof(SCA_NANDController), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject SCA_NANDController::Parents[] = { + &SCA_NANDController::Type, + &SCA_IController::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef SCA_NANDController::Methods[] = { + {NULL,NULL} //Sentinel +}; + +PyObject* SCA_NANDController::_getattr(const STR_String& attr) { + _getattr_up(SCA_IController); +} + +/* eof */ diff --git a/source/gameengine/GameLogic/SCA_NANDController.h b/source/gameengine/GameLogic/SCA_NANDController.h new file mode 100644 index 00000000000..1193ff64f07 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_NANDController.h @@ -0,0 +1,56 @@ +/** + * SCA_NANDController.h + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __KX_NANDCONTROLLER +#define __KX_NANDCONTROLLER + +#include "SCA_IController.h" + +class SCA_NANDController : public SCA_IController +{ + Py_Header; + //virtual void Trigger(class SCA_LogicManager* logicmgr); +public: + SCA_NANDController(SCA_IObject* gameobj,PyTypeObject* T=&Type); + virtual ~SCA_NANDController(); + virtual CValue* GetReplica(); + virtual void Trigger(SCA_LogicManager* logicmgr); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + +}; + +#endif //__KX_NANDCONTROLLER + diff --git a/source/gameengine/GameLogic/SCA_NORController.cpp b/source/gameengine/GameLogic/SCA_NORController.cpp new file mode 100644 index 00000000000..2866dec0b74 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_NORController.cpp @@ -0,0 +1,144 @@ +/** + * 'Nor' together all inputs + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "SCA_NORController.h" +#include "SCA_ISensor.h" +#include "SCA_LogicManager.h" +#include "BoolValue.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* ------------------------------------------------------------------------- */ +/* Native functions */ +/* ------------------------------------------------------------------------- */ + +SCA_NORController::SCA_NORController(SCA_IObject* gameobj, + PyTypeObject* T) + : + SCA_IController(gameobj,T) +{ +} + + + +SCA_NORController::~SCA_NORController() +{ +} + + + +void SCA_NORController::Trigger(SCA_LogicManager* logicmgr) +{ + + bool sensorresult = true; + + for (vector::const_iterator is=m_linkedsensors.begin(); + !(is==m_linkedsensors.end());is++) + { + SCA_ISensor* sensor = *is; + if (sensor->IsPositiveTrigger()) + { + sensorresult = false; + break; + } + } + + CValue* newevent = new CBoolValue(sensorresult); + + for (vector::const_iterator i=m_linkedactuators.begin(); + !(i==m_linkedactuators.end());i++) + { + SCA_IActuator* actua = *i;//m_linkedactuators.at(i); + logicmgr->AddActiveActuator(actua,newevent); + } + + // every actuator that needs the event, has a it's own reference to it now so + // release it (so to be clear: if there is no actuator, it's deleted right now) + newevent->Release(); + +} + + + +CValue* SCA_NORController::GetReplica() +{ + CValue* replica = new SCA_NORController(*this); + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + return replica; +} + + + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject SCA_NORController::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "SCA_NORController", + sizeof(SCA_NORController), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject SCA_NORController::Parents[] = { + &SCA_NORController::Type, + &SCA_IController::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef SCA_NORController::Methods[] = { + {NULL,NULL} //Sentinel +}; + +PyObject* SCA_NORController::_getattr(const STR_String& attr) { + _getattr_up(SCA_IController); +} + +/* eof */ diff --git a/source/gameengine/GameLogic/SCA_NORController.h b/source/gameengine/GameLogic/SCA_NORController.h new file mode 100644 index 00000000000..aab59e3d46c --- /dev/null +++ b/source/gameengine/GameLogic/SCA_NORController.h @@ -0,0 +1,56 @@ +/** + * SCA_NORController.h + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __KX_NORCONTROLLER +#define __KX_NORCONTROLLER + +#include "SCA_IController.h" + +class SCA_NORController : public SCA_IController +{ + Py_Header; + //virtual void Trigger(class SCA_LogicManager* logicmgr); +public: + SCA_NORController(SCA_IObject* gameobj,PyTypeObject* T=&Type); + virtual ~SCA_NORController(); + virtual CValue* GetReplica(); + virtual void Trigger(SCA_LogicManager* logicmgr); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + +}; + +#endif //__KX_NORCONTROLLER + diff --git a/source/gameengine/GameLogic/SCA_XNORController.cpp b/source/gameengine/GameLogic/SCA_XNORController.cpp new file mode 100644 index 00000000000..3ef7c07fe0a --- /dev/null +++ b/source/gameengine/GameLogic/SCA_XNORController.cpp @@ -0,0 +1,148 @@ +/** + * 'Xnor' together all inputs + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "SCA_XNORController.h" +#include "SCA_ISensor.h" +#include "SCA_LogicManager.h" +#include "BoolValue.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* ------------------------------------------------------------------------- */ +/* Native functions */ +/* ------------------------------------------------------------------------- */ + +SCA_XNORController::SCA_XNORController(SCA_IObject* gameobj, + PyTypeObject* T) + : + SCA_IController(gameobj,T) +{ +} + + + +SCA_XNORController::~SCA_XNORController() +{ +} + + + +void SCA_XNORController::Trigger(SCA_LogicManager* logicmgr) +{ + + bool sensorresult = true; + + for (vector::const_iterator is=m_linkedsensors.begin(); + !(is==m_linkedsensors.end());is++) + { + SCA_ISensor* sensor = *is; + if (sensor->IsPositiveTrigger()) + { + if (sensorresult == false) + { + sensorresult = true; + break; + } + sensorresult = false; + } + } + + CValue* newevent = new CBoolValue(sensorresult); + + for (vector::const_iterator i=m_linkedactuators.begin(); + !(i==m_linkedactuators.end());i++) + { + SCA_IActuator* actua = *i;//m_linkedactuators.at(i); + logicmgr->AddActiveActuator(actua,newevent); + } + + // every actuator that needs the event, has a it's own reference to it now so + // release it (so to be clear: if there is no actuator, it's deleted right now) + newevent->Release(); + +} + + + +CValue* SCA_XNORController::GetReplica() +{ + CValue* replica = new SCA_XNORController(*this); + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + return replica; +} + + + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject SCA_XNORController::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "SCA_XNORController", + sizeof(SCA_XNORController), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject SCA_XNORController::Parents[] = { + &SCA_XNORController::Type, + &SCA_IController::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef SCA_XNORController::Methods[] = { + {NULL,NULL} //Sentinel +}; + +PyObject* SCA_XNORController::_getattr(const STR_String& attr) { + _getattr_up(SCA_IController); +} + +/* eof */ diff --git a/source/gameengine/GameLogic/SCA_XNORController.h b/source/gameengine/GameLogic/SCA_XNORController.h new file mode 100644 index 00000000000..4b1eaee95d8 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_XNORController.h @@ -0,0 +1,56 @@ +/** + * SCA_XNORController.h + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __KX_XNORCONTROLLER +#define __KX_XNORCONTROLLER + +#include "SCA_IController.h" + +class SCA_XNORController : public SCA_IController +{ + Py_Header; + //virtual void Trigger(class SCA_LogicManager* logicmgr); +public: + SCA_XNORController(SCA_IObject* gameobj,PyTypeObject* T=&Type); + virtual ~SCA_XNORController(); + virtual CValue* GetReplica(); + virtual void Trigger(SCA_LogicManager* logicmgr); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + +}; + +#endif //__KX_XNORCONTROLLER + diff --git a/source/gameengine/GameLogic/SCA_XORController.cpp b/source/gameengine/GameLogic/SCA_XORController.cpp new file mode 100644 index 00000000000..6499c62f5f2 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_XORController.cpp @@ -0,0 +1,148 @@ +/** + * 'Xor' together all inputs + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "SCA_XORController.h" +#include "SCA_ISensor.h" +#include "SCA_LogicManager.h" +#include "BoolValue.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* ------------------------------------------------------------------------- */ +/* Native functions */ +/* ------------------------------------------------------------------------- */ + +SCA_XORController::SCA_XORController(SCA_IObject* gameobj, + PyTypeObject* T) + : + SCA_IController(gameobj,T) +{ +} + + + +SCA_XORController::~SCA_XORController() +{ +} + + + +void SCA_XORController::Trigger(SCA_LogicManager* logicmgr) +{ + + bool sensorresult = false; + + for (vector::const_iterator is=m_linkedsensors.begin(); + !(is==m_linkedsensors.end());is++) + { + SCA_ISensor* sensor = *is; + if (sensor->IsPositiveTrigger()) + { + if (sensorresult == true) + { + sensorresult = false; + break; + } + sensorresult = true; + } + } + + CValue* newevent = new CBoolValue(sensorresult); + + for (vector::const_iterator i=m_linkedactuators.begin(); + !(i==m_linkedactuators.end());i++) + { + SCA_IActuator* actua = *i;//m_linkedactuators.at(i); + logicmgr->AddActiveActuator(actua,newevent); + } + + // every actuator that needs the event, has a it's own reference to it now so + // release it (so to be clear: if there is no actuator, it's deleted right now) + newevent->Release(); + +} + + + +CValue* SCA_XORController::GetReplica() +{ + CValue* replica = new SCA_XORController(*this); + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + return replica; +} + + + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject SCA_XORController::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "SCA_XORController", + sizeof(SCA_XORController), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject SCA_XORController::Parents[] = { + &SCA_XORController::Type, + &SCA_IController::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef SCA_XORController::Methods[] = { + {NULL,NULL} //Sentinel +}; + +PyObject* SCA_XORController::_getattr(const STR_String& attr) { + _getattr_up(SCA_IController); +} + +/* eof */ diff --git a/source/gameengine/GameLogic/SCA_XORController.h b/source/gameengine/GameLogic/SCA_XORController.h new file mode 100644 index 00000000000..f50cd33c125 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_XORController.h @@ -0,0 +1,56 @@ +/** + * SCA_XORController.h + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __KX_XORCONTROLLER +#define __KX_XORCONTROLLER + +#include "SCA_IController.h" + +class SCA_XORController : public SCA_IController +{ + Py_Header; + //virtual void Trigger(class SCA_LogicManager* logicmgr); +public: + SCA_XORController(SCA_IObject* gameobj,PyTypeObject* T=&Type); + virtual ~SCA_XORController(); + virtual CValue* GetReplica(); + virtual void Trigger(SCA_LogicManager* logicmgr); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + +}; + +#endif //__KX_XORCONTROLLER + diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 56c2780871b..5311f059f03 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -101,7 +101,7 @@ void KX_TouchSensor::Init() { m_bCollision = false; m_bTriggered = false; - m_bLastTriggered = false; + m_bLastTriggered = (m_invert)?true:false; m_hitObject = NULL; } From 533539901b1a50962a5870ee30d7c0d1ba123585 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Jun 2008 09:49:29 +0000 Subject: [PATCH 291/430] Artists complaining about these popups * Nothing indicated - is not helpful, and very annoying with occluded geometry with high poly meshes, sometimes the selection doesn't work 100% of the time and the menu pops up over what you want to select. * No (correct) camera error doesn't seem to be needed, has been there since rev 2. --- source/blender/src/editmesh_mods.c | 4 ++-- source/blender/src/space.c | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index d5e34779173..c7a75b32df1 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -2307,7 +2307,7 @@ void selectconnected_mesh(void) if(em->edges.first==0) return; if( unified_findnearest(&eve, &eed, &efa)==0 ) { - error("Nothing indicated "); + /* error("Nothing indicated "); */ /* this is mostly annoying, eps with occluded geometry */ return; } @@ -2407,7 +2407,7 @@ static void selectconnected_delimit_mesh__internal(short all, short sel) EditFace *efa_mouse = findnearestface(&dist); if( !efa_mouse ) { - error("Nothing indicated "); + /* error("Nothing indicated "); */ /* this is mostly annoying, eps with occluded geometry */ return; } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 585f6b59ceb..d0c5267ab89 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -437,9 +437,6 @@ static void SaveState(void) if(G.f & G_TEXTUREPAINT) texpaint_enable_mipmap(); - if(G.scene->camera==0 || G.scene->camera->type!=OB_CAMERA) - error("no (correct) camera"); - waitcursor(1); } From 15c105c157057d249192b02f438cc60af600f9e6 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 24 Jun 2008 19:37:43 +0000 Subject: [PATCH 292/430] BGE patch: Add damping and clamping option to motion actuator. This patch introduces two options for the motion actuator: damping: number of frames to reach the target velocity. It takes into account the startup velocityin the target velocity direction and add 1/damping fraction of target velocity until the full velocity is reached. Works only with linear and angular velocity. It will be extended to delta and force motion method in a future release. clamping: apply the force and torque as long as the target velocity is not reached. If this option is set, the velocity specified in linV or angV are not applied to the object but used as target velocity. You should also specify a force in force or torque field: the force will be applied as long as the velocity along the axis of the vector set in linV or angV is not reached. Works best in low friction environment. --- source/blender/makesdna/DNA_actuator_types.h | 4 +- source/blender/src/buttons_logic.c | 6 +- .../Converter/BL_BlenderDataConversion.cpp | 4 +- .../Converter/KX_ConvertActuators.cpp | 4 +- .../Ketsji/KX_BulletPhysicsController.cpp | 7 + .../Ketsji/KX_BulletPhysicsController.h | 1 + source/gameengine/Ketsji/KX_GameObject.cpp | 21 +++ source/gameengine/Ketsji/KX_GameObject.h | 8 ++ .../gameengine/Ketsji/KX_IPhysicsController.h | 1 + .../gameengine/Ketsji/KX_ObjectActuator.cpp | 131 +++++++++++++++--- source/gameengine/Ketsji/KX_ObjectActuator.h | 36 ++++- .../Ketsji/KX_SumoPhysicsController.h | 2 + 12 files changed, 203 insertions(+), 22 deletions(-) diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 70d603a6ed9..3f08ea05705 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -98,7 +98,8 @@ typedef struct bPropertyActuator { } bPropertyActuator; typedef struct bObjectActuator { - int flag, type; + short flag, type; + int damping; float forceloc[3], forcerot[3]; float loc[3], rot[3]; float dloc[3], drot[3]; @@ -252,6 +253,7 @@ typedef struct FreeCamera { #define ACT_ANG_VEL_LOCAL 32 //#define ACT_ADD_LIN_VEL_LOCAL 64 #define ACT_ADD_LIN_VEL 64 +#define ACT_CLAMP_VEL 128 #define ACT_OBJECT_FORCE 0 #define ACT_OBJECT_TORQUE 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index bfa451428c3..ec85952a2f8 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1613,7 +1613,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh { case ACT_OBJECT: { - ysize= 129; + ysize= 152; glRects(xco, yco-ysize, xco+width, yco); uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); @@ -1651,6 +1651,10 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButF(block, NUM, 0, "", xco+45+wval, yco-125, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, ""); uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-125, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, ""); + uiDefBut(block, LABEL, 0, "damp", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); + uiDefButI(block, NUM, 0, "", xco+45, yco-148, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); + uiDefButBitI(block, TOG, ACT_CLAMP_VEL, 0, "clamp",xco+45+wval, yco-148, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between SET and CLAMP Velocity"); + uiDefButBitI(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); uiDefButBitI(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); uiDefButBitI(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 21c18634e21..665783a1ba5 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1668,6 +1668,8 @@ static KX_GameObject *gameobject_from_blenderobject( BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj, ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; + if (bHasArmature) + dcont->LoadShapeDrivers(ob->parent); } else if (bHasArmature) { BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; @@ -2329,7 +2331,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, { KX_GameObject* gameobj = static_cast(logicbrick_conversionlist->GetValue(i)); struct Object* blenderobj = converter->FindBlenderObject(gameobj); - gameobj->SetState(blenderobj->state); + gameobj->SetState((blenderobj->init_state)?blenderobj->init_state:blenderobj->state); } #endif //CONVERT_LOGIC diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 89e2925a6c1..f0b549594f2 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -137,6 +137,7 @@ void BL_ConvertActuators(char* maggiename, MT_Vector3 angvelvec ( KX_BLENDERTRUNC(obact->angularvelocity[0]), KX_BLENDERTRUNC(obact->angularvelocity[1]), KX_BLENDERTRUNC(obact->angularvelocity[2])); + short damping = obact->damping; drotvec /= BLENDER_HACK_DTIME; //drotvec /= BLENDER_HACK_DTIME; @@ -157,7 +158,7 @@ void BL_ConvertActuators(char* maggiename, bitLocalFlag.DRot = bool((obact->flag & ACT_DROT_LOCAL)!=0); bitLocalFlag.LinearVelocity = bool((obact->flag & ACT_LIN_VEL_LOCAL)!=0); bitLocalFlag.AngularVelocity = bool((obact->flag & ACT_ANG_VEL_LOCAL)!=0); - + bitLocalFlag.ClampVelocity = bool((obact->flag & ACT_CLAMP_VEL)!=0); bitLocalFlag.AddOrSetLinV = bool((obact->flag & ACT_ADD_LIN_VEL)!=0); @@ -168,6 +169,7 @@ void BL_ConvertActuators(char* maggiename, drotvec.getValue(), linvelvec.getValue(), angvelvec.getValue(), + damping, bitLocalFlag ); baseact = tmpbaseact; diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index aa7c75e9633..70443ced7a9 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -102,6 +102,13 @@ MT_Vector3 KX_BulletPhysicsController::GetLinearVelocity() CcdPhysicsController::GetLinearVelocity(angVel[0],angVel[1],angVel[2]);//rcruiz return MT_Vector3(angVel[0],angVel[1],angVel[2]); } +MT_Vector3 KX_BulletPhysicsController::GetAngularVelocity() +{ + float angVel[3]; + //CcdPhysicsController::GetAngularVelocity(angVel[0],angVel[1],angVel[2]); + CcdPhysicsController::GetAngularVelocity(angVel[0],angVel[1],angVel[2]);//rcruiz + return MT_Vector3(angVel[0],angVel[1],angVel[2]); +} MT_Vector3 KX_BulletPhysicsController::GetVelocity(const MT_Point3& pos) { float linVel[3]; diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h index 619ac42503f..0853755dffa 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h @@ -25,6 +25,7 @@ public: virtual void ApplyTorque(const MT_Vector3& torque,bool local); virtual void ApplyForce(const MT_Vector3& force,bool local); virtual MT_Vector3 GetLinearVelocity(); + virtual MT_Vector3 GetAngularVelocity(); virtual MT_Vector3 GetVelocity(const MT_Point3& pos); virtual void SetAngularVelocity(const MT_Vector3& ang_vel,bool local); virtual void SetLinearVelocity(const MT_Vector3& lin_vel,bool local); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index eaa6564ba84..cdbce81d610 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -664,6 +664,27 @@ MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) return velocity; } +MT_Vector3 KX_GameObject::GetAngularVelocity(bool local) +{ + MT_Vector3 velocity(0.0,0.0,0.0), locvel; + MT_Matrix3x3 ori; + int i, j; + if (m_pPhysicsController1) + { + velocity = m_pPhysicsController1->GetAngularVelocity(); + + if (local) + { + ori = GetSGNode()->GetWorldOrientation(); + + locvel = velocity * ori; + return locvel; + } + } + return velocity; +} + + // scenegraph node stuff diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 63a660617c4..cab1f3167d5 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -258,6 +258,14 @@ public: bool local=false ); + /** + * Return the angular velocity of the game object. + */ + MT_Vector3 + GetAngularVelocity( + bool local=false + ); + /** * Align the object to a given normal. */ diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index 009db40d3e8..2ec66a883eb 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -64,6 +64,7 @@ public: virtual void ApplyTorque(const MT_Vector3& torque,bool local)=0; virtual void ApplyForce(const MT_Vector3& force,bool local)=0; virtual MT_Vector3 GetLinearVelocity()=0; + virtual MT_Vector3 GetAngularVelocity()=0; virtual MT_Vector3 GetVelocity(const MT_Point3& pos)=0; virtual void SetAngularVelocity(const MT_Vector3& ang_vel,bool local)=0; virtual void SetLinearVelocity(const MT_Vector3& lin_vel,bool local)=0; diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 22a406792f9..03ae14997ab 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -50,6 +50,7 @@ KX_ObjectActuator( const MT_Vector3& drot, const MT_Vector3& linV, const MT_Vector3& angV, + const short damping, const KX_LocalFlags& flag, PyTypeObject* T ) : @@ -60,9 +61,16 @@ KX_ObjectActuator( m_drot(drot), m_linear_velocity(linV), m_angular_velocity(angV), + m_linear_length2(0.0), + m_current_linear_factor(0.0), + m_current_angular_factor(0.0), + m_damping(damping), m_bitLocalFlag (flag), - m_active_combined_velocity (false) + m_active_combined_velocity (false), + m_linear_damping_active(false), + m_angular_damping_active(false) { + UpdateFuzzyFlags(); } bool KX_ObjectActuator::Update() @@ -87,42 +95,98 @@ bool KX_ObjectActuator::Update() ); m_active_combined_velocity = false; } + m_linear_damping_active = false; return false; } else if (parent) { - /* Probably better to use some flags, so these MT_zero tests can be */ - /* skipped. */ - if (!MT_fuzzyZero(m_force)) + if (!m_bitLocalFlag.ZeroForce) { - parent->ApplyForce(m_force,(m_bitLocalFlag.Force) != 0); + if (m_bitLocalFlag.ClampVelocity && !m_bitLocalFlag.ZeroLinearVelocity) + { + // The user is requesting not to exceed the velocity set in m_linear_velocity + // The verification is done by projecting the actual speed along the linV direction + // and comparing it with the linV vector length + MT_Vector3 linV; + linV = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); + if (linV.dot(m_linear_velocity) < m_linear_length2) + parent->ApplyForce(m_force,(m_bitLocalFlag.Force) != 0); + } else + { + parent->ApplyForce(m_force,(m_bitLocalFlag.Force) != 0); + } } - if (!MT_fuzzyZero(m_torque)) + if (!m_bitLocalFlag.ZeroTorque) { - parent->ApplyTorque(m_torque,(m_bitLocalFlag.Torque) != 0); + if (m_bitLocalFlag.ClampVelocity && !m_bitLocalFlag.ZeroAngularVelocity) + { + // The user is requesting not to exceed the velocity set in m_angular_velocity + // The verification is done by projecting the actual speed in the + MT_Vector3 angV; + angV = parent->GetAngularVelocity(m_bitLocalFlag.AngularVelocity); + if (angV.dot(m_angular_velocity) < m_angular_velocity.length2()) + parent->ApplyTorque(m_torque,(m_bitLocalFlag.Torque) != 0); + } else + { + parent->ApplyTorque(m_torque,(m_bitLocalFlag.Torque) != 0); + } } - if (!MT_fuzzyZero(m_dloc)) + if (!m_bitLocalFlag.ZeroDLoc) { parent->ApplyMovement(m_dloc,(m_bitLocalFlag.DLoc) != 0); } - if (!MT_fuzzyZero(m_drot)) + if (!m_bitLocalFlag.ZeroDRot) { parent->ApplyRotation(m_drot,(m_bitLocalFlag.DRot) != 0); } - if (!MT_fuzzyZero(m_linear_velocity)) + if (!m_bitLocalFlag.ZeroLinearVelocity && !m_bitLocalFlag.ClampVelocity) { if (m_bitLocalFlag.AddOrSetLinV) { parent->addLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); } else { m_active_combined_velocity = true; - parent->setLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); + if (m_damping > 0) { + MT_Vector3 linV; + if (!m_linear_damping_active) { + // delta and the start speed (depends on the existing speed in that direction) + linV = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); + // keep only the projection along the desired direction + m_current_linear_factor = linV.dot(m_linear_velocity)/m_linear_length2; + m_linear_damping_active = true; + } + if (m_current_linear_factor < 1.0) + m_current_linear_factor += 1.0/m_damping; + if (m_current_linear_factor > 1.0) + m_current_linear_factor = 1.0; + linV = m_current_linear_factor * m_linear_velocity; + parent->setLinearVelocity(linV,(m_bitLocalFlag.LinearVelocity) != 0); + } else { + parent->setLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); + } } } - if (!MT_fuzzyZero(m_angular_velocity)) + if (!m_bitLocalFlag.ZeroAngularVelocity && !m_bitLocalFlag.ClampVelocity) { - parent->setAngularVelocity(m_angular_velocity,(m_bitLocalFlag.AngularVelocity) != 0); m_active_combined_velocity = true; + if (m_damping > 0) { + MT_Vector3 angV; + if (!m_angular_damping_active) { + // delta and the start speed (depends on the existing speed in that direction) + angV = parent->GetAngularVelocity(m_bitLocalFlag.AngularVelocity); + // keep only the projection along the desired direction + m_current_angular_factor = angV.dot(m_angular_velocity)/m_angular_length2; + m_angular_damping_active = true; + } + if (m_current_angular_factor < 1.0) + m_current_angular_factor += 1.0/m_damping; + if (m_current_angular_factor > 1.0) + m_current_angular_factor = 1.0; + angV = m_current_angular_factor * m_angular_velocity; + parent->setAngularVelocity(angV,(m_bitLocalFlag.AngularVelocity) != 0); + } else { + parent->setAngularVelocity(m_angular_velocity,(m_bitLocalFlag.AngularVelocity) != 0); + } } } @@ -199,6 +263,8 @@ PyMethodDef KX_ObjectActuator::Methods[] = { {"setLinearVelocity", (PyCFunction) KX_ObjectActuator::sPySetLinearVelocity, METH_VARARGS}, {"getAngularVelocity", (PyCFunction) KX_ObjectActuator::sPyGetAngularVelocity, METH_VARARGS}, {"setAngularVelocity", (PyCFunction) KX_ObjectActuator::sPySetAngularVelocity, METH_VARARGS}, + {"setVelocityDamping", (PyCFunction) KX_ObjectActuator::sPySetVelocityDamping, METH_VARARGS}, + {"getVelocityDamping", (PyCFunction) KX_ObjectActuator::sPyGetVelocityDamping, METH_VARARGS}, {NULL,NULL} //Sentinel @@ -238,6 +304,7 @@ PyObject* KX_ObjectActuator::PySetForce(PyObject* self, } m_force.setValue(vecArg); m_bitLocalFlag.Force = PyArgToBool(bToggle); + UpdateFuzzyFlags(); Py_Return; } @@ -268,6 +335,7 @@ PyObject* KX_ObjectActuator::PySetTorque(PyObject* self, } m_torque.setValue(vecArg); m_bitLocalFlag.Torque = PyArgToBool(bToggle); + UpdateFuzzyFlags(); Py_Return; } @@ -298,6 +366,7 @@ PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self, } m_dloc.setValue(vecArg); m_bitLocalFlag.DLoc = PyArgToBool(bToggle); + UpdateFuzzyFlags(); Py_Return; } @@ -328,6 +397,7 @@ PyObject* KX_ObjectActuator::PySetDRot(PyObject* self, } m_drot.setValue(vecArg); m_bitLocalFlag.DRot = PyArgToBool(bToggle); + UpdateFuzzyFlags(); Py_Return; } @@ -341,6 +411,7 @@ PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self, PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_linear_velocity[1])); PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_linear_velocity[2])); PyList_SetItem(retVal, 3, BoolToPyArg(m_bitLocalFlag.LinearVelocity)); + PyList_SetItem(retVal, 4, BoolToPyArg(m_bitLocalFlag.ClampVelocity)); return retVal; } @@ -351,12 +422,15 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, PyObject* kwds) { float vecArg[3]; int bToggle = 0; - if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], - &vecArg[2], &bToggle)) { + int bClamp = 0; + if (!PyArg_ParseTuple(args, "fffi|i", &vecArg[0], &vecArg[1], + &vecArg[2], &bToggle, &bClamp)) { return NULL; } m_linear_velocity.setValue(vecArg); m_bitLocalFlag.LinearVelocity = PyArgToBool(bToggle); + m_bitLocalFlag.ClampVelocity = PyArgToBool(bClamp); + UpdateFuzzyFlags(); Py_Return; } @@ -371,6 +445,7 @@ PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self, PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_angular_velocity[1])); PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_angular_velocity[2])); PyList_SetItem(retVal, 3, BoolToPyArg(m_bitLocalFlag.AngularVelocity)); + PyList_SetItem(retVal, 4, BoolToPyArg(m_bitLocalFlag.ClampVelocity)); return retVal; } @@ -380,15 +455,37 @@ PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self, PyObject* kwds) { float vecArg[3]; int bToggle = 0; - if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], - &vecArg[2], &bToggle)) { + int bClamp = 0; + if (!PyArg_ParseTuple(args, "fffi|i", &vecArg[0], &vecArg[1], + &vecArg[2], &bToggle, &bClamp)) { return NULL; } m_angular_velocity.setValue(vecArg); m_bitLocalFlag.AngularVelocity = PyArgToBool(bToggle); + m_bitLocalFlag.ClampVelocity = PyArgToBool(bClamp); + UpdateFuzzyFlags(); Py_Return; } +/* 13. setVelocityDamping */ +PyObject* KX_ObjectActuator::PySetVelocityDamping(PyObject* self, + PyObject* args, + PyObject* kwds) { + int damping = 0; + if (!PyArg_ParseTuple(args, "i", &damping) || damping < 0 || damping > 1000) { + return NULL; + } + m_damping = damping; + Py_Return; +} + +/* 13. getVelocityDamping */ +PyObject* KX_ObjectActuator::PyGetVelocityDamping(PyObject* self, + PyObject* args, + PyObject* kwds) { + return Py_BuildValue("i",m_damping); +} + diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index edbae154b8b..ec6dab5cd48 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -46,7 +46,13 @@ struct KX_LocalFlags { DLoc(false), LinearVelocity(false), AngularVelocity(false), - AddOrSetLinV(false) + AddOrSetLinV(false), + ClampVelocity(false), + ZeroForce(false), + ZeroDRot(false), + ZeroDLoc(false), + ZeroLinearVelocity(false), + ZeroAngularVelocity(false) { } @@ -57,6 +63,13 @@ struct KX_LocalFlags { unsigned short LinearVelocity : 1; unsigned short AngularVelocity : 1; unsigned short AddOrSetLinV : 1; + unsigned short ClampVelocity : 1; + unsigned short ZeroForce : 1; + unsigned short ZeroTorque : 1; + unsigned short ZeroDRot : 1; + unsigned short ZeroDLoc : 1; + unsigned short ZeroLinearVelocity : 1; + unsigned short ZeroAngularVelocity : 1; }; class KX_ObjectActuator : public SCA_IActuator @@ -69,6 +82,11 @@ class KX_ObjectActuator : public SCA_IActuator MT_Vector3 m_drot; MT_Vector3 m_linear_velocity; MT_Vector3 m_angular_velocity; + MT_Scalar m_linear_length2; + MT_Scalar m_angular_length2; + MT_Scalar m_current_linear_factor; + MT_Scalar m_current_angular_factor; + short m_damping; KX_LocalFlags m_bitLocalFlag; // A hack bool -- oh no sorry everyone @@ -77,6 +95,8 @@ class KX_ObjectActuator : public SCA_IActuator // setting linear velocity. bool m_active_combined_velocity; + bool m_linear_damping_active; + bool m_angular_damping_active; public: enum KX_OBJECT_ACT_VEC_TYPE { @@ -103,6 +123,7 @@ public: const MT_Vector3& drot, const MT_Vector3& linV, const MT_Vector3& angV, + const short damping, const KX_LocalFlags& flag, PyTypeObject* T=&Type ); @@ -110,6 +131,17 @@ public: CValue* GetReplica(); void SetForceLoc(const double force[3]) { /*m_force=force;*/ } + void UpdateFuzzyFlags() + { + m_bitLocalFlag.ZeroForce = MT_fuzzyZero(m_force); + m_bitLocalFlag.ZeroTorque = MT_fuzzyZero(m_torque); + m_bitLocalFlag.ZeroDLoc = MT_fuzzyZero(m_dloc); + m_bitLocalFlag.ZeroDRot = MT_fuzzyZero(m_drot); + m_bitLocalFlag.ZeroLinearVelocity = MT_fuzzyZero(m_linear_velocity); + m_linear_length2 = (m_bitLocalFlag.ZeroLinearVelocity) ? 0.0 : m_linear_velocity.length2(); + m_bitLocalFlag.ZeroAngularVelocity = MT_fuzzyZero(m_angular_velocity); + m_angular_length2 = (m_bitLocalFlag.ZeroAngularVelocity) ? 0.0 : m_angular_velocity.length2(); + } virtual bool Update(); @@ -132,6 +164,8 @@ public: KX_PYMETHOD(KX_ObjectActuator,SetLinearVelocity); KX_PYMETHOD(KX_ObjectActuator,GetAngularVelocity); KX_PYMETHOD(KX_ObjectActuator,SetAngularVelocity); + KX_PYMETHOD(KX_ObjectActuator,SetVelocityDamping); + KX_PYMETHOD(KX_ObjectActuator,GetVelocityDamping); }; #endif //__KX_OBJECTACTUATOR diff --git a/source/gameengine/Ketsji/KX_SumoPhysicsController.h b/source/gameengine/Ketsji/KX_SumoPhysicsController.h index 868465c8f10..8c061ae4056 100644 --- a/source/gameengine/Ketsji/KX_SumoPhysicsController.h +++ b/source/gameengine/Ketsji/KX_SumoPhysicsController.h @@ -68,6 +68,8 @@ public: void ApplyTorque(const MT_Vector3& torque,bool local); void ApplyForce(const MT_Vector3& force,bool local); MT_Vector3 GetLinearVelocity(); + MT_Vector3 GetAngularVelocity() // to keep compiler happy + { return MT_Vector3(0.0,0.0,0.0); } MT_Vector3 GetVelocity(const MT_Point3& pos); void SetAngularVelocity(const MT_Vector3& ang_vel,bool local); void SetLinearVelocity(const MT_Vector3& lin_vel,bool local); From 4d478cbe8629bed1d32205f85e3583f73a5c16a7 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 24 Jun 2008 21:39:45 +0000 Subject: [PATCH 293/430] BGE patch: remove Shape key driver code from previous commit --- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 665783a1ba5..1bde5ad3450 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1668,8 +1668,6 @@ static KX_GameObject *gameobject_from_blenderobject( BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj, ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; - if (bHasArmature) - dcont->LoadShapeDrivers(ob->parent); } else if (bHasArmature) { BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; From 820c2df12c9d1ba7479c0a924f90f79a33028db9 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 24 Jun 2008 22:19:00 +0000 Subject: [PATCH 294/430] BGE patch: Add automatic support for armature driven shape keys. To take advantage of this feature, you must have a mesh with relative shape keys and shape Ipo curves with drivers referring to bones of the mesh's parent armature. The BGE will automatically detect the dependency between the shape keys and the armature and execute the Ipo drivers during the rendering of the armature actions. This technique is used to make the armature action more natural: the shape keys compensate in places where the armature deformation is uggly and the drivers make sure that the shape correction is synchronized with the bone position. Note: This is not compatible with shape actions; BLender does not allow to have Shape Ipo Curves and Shape actions at the same time. --- source/blender/blenkernel/BKE_ipo.h | 8 ++++ .../Converter/BL_BlenderDataConversion.cpp | 2 + .../gameengine/Converter/BL_ShapeDeformer.cpp | 47 +++++++++++++++++++ .../gameengine/Converter/BL_ShapeDeformer.h | 9 ++++ .../gameengine/Converter/BL_SkinDeformer.cpp | 5 +- source/gameengine/Converter/BL_SkinDeformer.h | 8 ++++ source/gameengine/Ketsji/KX_Scene.cpp | 1 + 7 files changed, 76 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index 922f3201345..5b209cb8f5b 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -31,6 +31,10 @@ #ifndef BKE_IPO_H #define BKE_IPO_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct CfraElem { struct CfraElem *next, *prev; float cfra; @@ -111,5 +115,9 @@ float IPO_GetFloatValue(struct Ipo *ipo, short c, float ctime); +#ifdef __cplusplus +}; +#endif + #endif diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 1bde5ad3450..665783a1ba5 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1668,6 +1668,8 @@ static KX_GameObject *gameobject_from_blenderobject( BL_ShapeDeformer *dcont = new BL_ShapeDeformer((BL_DeformableGameObject*)gameobj, ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; + if (bHasArmature) + dcont->LoadShapeDrivers(ob->parent); } else if (bHasArmature) { BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp index 3ae634905b9..eb5c1467ea5 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.cpp +++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp @@ -44,9 +44,12 @@ #include "DNA_key_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "DNA_ipo_types.h" +#include "DNA_curve_types.h" #include "BKE_armature.h" #include "BKE_action.h" #include "BKE_key.h" +#include "BKE_ipo.h" #include "MT_Point3.h" extern "C"{ @@ -78,11 +81,55 @@ void BL_ShapeDeformer::ProcessReplica() { } +bool BL_ShapeDeformer::LoadShapeDrivers(Object* arma) +{ + IpoCurve *icu; + + m_shapeDrivers.clear(); + // check if this mesh has armature driven shape keys + if (m_bmesh->key->ipo) { + for(icu= (IpoCurve*)m_bmesh->key->ipo->curve.first; icu; icu= (IpoCurve*)icu->next) { + if(icu->driver && + (icu->flag & IPO_MUTE) == 0 && + icu->driver->type == IPO_DRIVER_TYPE_NORMAL && + icu->driver->ob == arma && + icu->driver->blocktype == ID_AR) { + // this shape key ipo curve has a driver on the parent armature + // record this curve in the shape deformer so that the corresponding + m_shapeDrivers.push_back(icu); + } + } + } + return !m_shapeDrivers.empty(); +} + +bool BL_ShapeDeformer::ExecuteShapeDrivers(void) +{ + if (!m_shapeDrivers.empty() && PoseUpdated()) { + vector::iterator it; + void *poin; + int type; + for (it=m_shapeDrivers.begin(); it!=m_shapeDrivers.end(); it++) { + // no need to set a specific time: this curve has a driver + IpoCurve *icu = *it; + calc_icu(icu, 1.0f); + poin = get_ipo_poin((ID*)m_bmesh->key, icu, &type); + if (poin) + write_ipo_poin(poin, type, icu->curval); + } + ForceUpdate(); + return true; + } + return false; +} + bool BL_ShapeDeformer::Update(void) { bool bShapeUpdate = false; bool bSkinUpdate = false; + ExecuteShapeDrivers(); + /* See if the object shape has changed */ if (m_lastShapeUpdate != m_gameobj->GetLastFrame()) { /* the key coefficient have been set already, we just need to blend the keys */ diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h index 9bbdde3fb2c..9f8361dbaca 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.h +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -38,6 +38,7 @@ #include "BL_DeformableGameObject.h" #include +struct IpoCurve; class BL_ShapeDeformer : public BL_SkinDeformer { @@ -82,8 +83,16 @@ public: virtual ~BL_ShapeDeformer(); bool Update (void); + bool LoadShapeDrivers(Object* arma); + bool ExecuteShapeDrivers(void); + + void ForceUpdate() + { + m_lastShapeUpdate = -1.0; + }; protected: + vector m_shapeDrivers; double m_lastShapeUpdate; BL_DeformableGameObject* m_gameobj; diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index 1015221c392..dd7119b1031 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -149,12 +149,9 @@ void BL_SkinDeformer::ProcessReplica() bool BL_SkinDeformer::Update(void) { /* See if the armature has been updated for this frame */ - if (m_armobj && m_lastArmaUpdate!=m_armobj->GetLastFrame()){ + if (PoseUpdated()){ float obmat[4][4]; // the original object matrice - /* Do all of the posing necessary */ - m_armobj->ApplyPose(); - /* XXX note: where_is_pose() (from BKE_armature.h) calculates all matrices needed to start deforming */ /* but it requires the blender object pointer... */ diff --git a/source/gameengine/Converter/BL_SkinDeformer.h b/source/gameengine/Converter/BL_SkinDeformer.h index 603e716fb1e..c5568c049cb 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.h +++ b/source/gameengine/Converter/BL_SkinDeformer.h @@ -79,6 +79,14 @@ public: virtual ~BL_SkinDeformer(); bool Update (void); bool Apply (class RAS_IPolyMaterial *polymat); + bool PoseUpdated(void) + { + if (m_armobj && m_lastArmaUpdate!=m_armobj->GetLastFrame()) { + m_armobj->ApplyPose(); + return true; + } + return false; + } void ForceUpdate() { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 1526709f425..a7e91e27df3 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -866,6 +866,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) static_cast( parentobj ) ); releaseParent= false; + shapeDeformer->LoadShapeDrivers(blendobj->parent); } else { From 7ba2389932dd54468b0e8ded17bea9e272c92304 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Jun 2008 13:21:38 +0000 Subject: [PATCH 295/430] added r/w access to nurb curves orderU for migius --- source/blender/python/api2_2x/CurNurb.c | 34 ++++++++++++++++++++++ source/blender/python/api2_2x/doc/Curve.py | 2 ++ 2 files changed, 36 insertions(+) diff --git a/source/blender/python/api2_2x/CurNurb.c b/source/blender/python/api2_2x/CurNurb.c index 174b5fb08dc..b2120bd63c6 100644 --- a/source/blender/python/api2_2x/CurNurb.c +++ b/source/blender/python/api2_2x/CurNurb.c @@ -53,6 +53,8 @@ static int CurNurb_setFlagU( BPy_CurNurb * self, PyObject * args ); static PyObject *CurNurb_getFlagV( BPy_CurNurb * self ); static PyObject *CurNurb_oldsetFlagV( BPy_CurNurb * self, PyObject * args ); static int CurNurb_setFlagV( BPy_CurNurb * self, PyObject * args ); +static PyObject *CurNurb_getOrderU( BPy_CurNurb * self ); +static int CurNurb_setOrderU( BPy_CurNurb * self, PyObject * args ); static PyObject *CurNurb_getType( BPy_CurNurb * self ); static PyObject *CurNurb_oldsetType( BPy_CurNurb * self, PyObject * args ); static int CurNurb_setType( BPy_CurNurb * self, PyObject * args ); @@ -176,6 +178,9 @@ static PyGetSetDef BPy_CurNurb_getseters[] = { (getter)CurNurb_getFlagV, (setter)CurNurb_setFlagV, "The knot type in the V direction", NULL}, + {"orderU", + (getter)CurNurb_getOrderU, (setter)CurNurb_setOrderU, + "order setting for U direction", NULL}, {"type", (getter)CurNurb_getType, (setter)CurNurb_setType, "The curve type (poly: bezier, or NURBS)", @@ -710,6 +715,35 @@ static int CurNurb_setFlagV( BPy_CurNurb * self, PyObject * args ) return 0; } +static PyObject *CurNurb_getOrderU( BPy_CurNurb * self ) +{ + return PyInt_FromLong( ( long ) self->nurb->orderu ); +} + +static int CurNurb_setOrderU( BPy_CurNurb * self, PyObject * args ) +{ + int order; + + args = PyNumber_Int( args ); + if( !args ) + return EXPP_ReturnIntError( PyExc_TypeError, + "expected integer argument" ); + + order = ( int )PyInt_AS_LONG( args ); + Py_DECREF( args ); + + if( order < 2 ) order = 2; + else if( order > 6 ) order = 6; + + if( self->nurb->pntsu < order ) + order = self->nurb->pntsu; + + self->nurb->orderu = (short)order; + makeknots( self->nurb, 1, self->nurb->flagu >> 1 ); + + return 0; +} + /* * CurNurb_getIter * diff --git a/source/blender/python/api2_2x/doc/Curve.py b/source/blender/python/api2_2x/doc/Curve.py index ba8d6d21970..765921665cd 100644 --- a/source/blender/python/api2_2x/doc/Curve.py +++ b/source/blender/python/api2_2x/doc/Curve.py @@ -535,6 +535,8 @@ class CurNurb: @type flagU: int @ivar flagV: The CurNurb knot flag V. See L{setFlagU} for description. @type flagV: int + @ivar orderU: The CurNurb knot order U, for nurbs curves only, this is clamped by the number of points, so the orderU will never be greater. + @type orderU: int @ivar type: The type of the curve (Poly: 0, Bezier: 1, NURBS: 4) @type type: int @ivar knotsU: The knot vector in the U direction. The tuple will be empty From c353af4d3a1ce51125b81f023c8725855906601e Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Wed, 25 Jun 2008 14:09:15 +0000 Subject: [PATCH 296/430] BGE patch 15044 approved: Edit Object Dynamics Actuator. Add enable/disable dynamics actuator under the "Edit Object" category. The Enable/disable rigid body option is also availale but not implemented. --- .../gameengine/ketsji/KX_ketsji.vcproj | 6 + source/blender/makesdna/DNA_actuator_types.h | 9 +- source/blender/src/buttons_logic.c | 11 +- .../Converter/KX_ConvertActuators.cpp | 10 + source/gameengine/Ketsji/KX_GameObject.cpp | 25 +-- source/gameengine/Ketsji/KX_GameObject.h | 28 ++- .../Ketsji/KX_SCA_DynamicActuator.cpp | 206 ++++++++++++++++++ .../Ketsji/KX_SCA_DynamicActuator.h | 76 +++++++ 8 files changed, 341 insertions(+), 30 deletions(-) create mode 100644 source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp create mode 100644 source/gameengine/Ketsji/KX_SCA_DynamicActuator.h diff --git a/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj b/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj index af0ba74497a..9d5a9f55074 100644 --- a/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj +++ b/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj @@ -462,6 +462,9 @@ + + @@ -686,6 +689,9 @@ + + diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 3f08ea05705..20316f26804 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -81,7 +81,7 @@ typedef struct bEditObjectActuator { char name[32]; float linVelocity[3]; /* initial lin. velocity on creation */ short localflag; /* flag for the lin. vel: apply locally */ - short pad; + short dyn_operation; } bEditObjectActuator; typedef struct bSceneActuator { @@ -360,10 +360,11 @@ typedef struct FreeCamera { /* editObjectActuator->type */ #define ACT_EDOB_ADD_OBJECT 0 #define ACT_EDOB_END_OBJECT 1 -#define ACT_EDOB_REPLACE_MESH 2 +#define ACT_EDOB_REPLACE_MESH 2 #define ACT_EDOB_TRACK_TO 3 -#define ACT_EDOB_MAKE_CHILD 4 -#define ACT_EDOB_END_CHILD 5 +#define ACT_EDOB_DYNAMICS 4 + + /* editObjectActuator->flag */ #define ACT_TRACK_3D 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index ec85952a2f8..6cdc1d9b7c1 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1940,8 +1940,15 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes"); uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking"); } - - str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3"; + else if(eoa->type==ACT_EDOB_DYNAMICS) { + ysize= 48; + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + str= "Dynamic Operation %t|Restore Dynamics %x0|Suspend Dynamics %x1|Enable Rigid Body %x2|Disable Rigid Body %x3"; + uiDefButS(block, MENU, B_REDR, str, xco+40, yco-44, (width-80), 19, &(eoa->dyn_operation), 0.0, 0.0, 0, 0, ""); + } + str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3|Dynamics %x4"; uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &eoa->type, 0.0, 0.0, 0, 0, ""); yco-= ysize; diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index f0b549594f2..a50c072914d 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -62,6 +62,7 @@ #include "KX_SCA_EndObjectActuator.h" #include "KX_SCA_ReplaceMeshActuator.h" #include "KX_ParentActuator.h" +#include "KX_SCA_DynamicActuator.h" #include "KX_Scene.h" #include "KX_KetsjiEngine.h" @@ -602,6 +603,15 @@ void BL_ConvertActuators(char* maggiename, blenderobject->upflag ); baseact = tmptrackact; + break; + } + case ACT_EDOB_DYNAMICS: + { + KX_SCA_DynamicActuator* tmpdynact + = new KX_SCA_DynamicActuator(gameobj, + editobact->dyn_operation + ); + baseact = tmpdynact; } } break; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index cdbce81d610..4b467a229f0 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1283,17 +1283,7 @@ PyObject* KX_GameObject::PySuspendDynamics(PyObject* self, PyObject* args, PyObject* kwds) { - if (m_bSuspendDynamics) - { - Py_Return; - } - - if (m_pPhysicsController1) - { - m_pPhysicsController1->SuspendDynamics(); - } - m_bSuspendDynamics = true; - + SuspendDynamics(); Py_Return; } @@ -1303,18 +1293,7 @@ PyObject* KX_GameObject::PyRestoreDynamics(PyObject* self, PyObject* args, PyObject* kwds) { - - if (!m_bSuspendDynamics) - { - Py_Return; - } - - if (m_pPhysicsController1) - { - m_pPhysicsController1->RestoreDynamics(); - } - m_bSuspendDynamics = false; - + RestoreDynamics(); Py_Return; } diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index cab1f3167d5..a0507cb9dbc 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -46,7 +46,7 @@ #include "GEN_HashedPtr.h" #include "KX_Scene.h" #include "KX_KetsjiEngine.h" /* for m_anim_framerate */ - +#include "KX_IPhysicsController.h" /* for suspend/resume */ #define KX_OB_DYNAMIC 1 @@ -652,6 +652,32 @@ public: */ void Resume(void); + void SuspendDynamics(void) { + if (m_bSuspendDynamics) + { + return; + } + + if (m_pPhysicsController1) + { + m_pPhysicsController1->SuspendDynamics(); + } + m_bSuspendDynamics = true; + } + + void RestoreDynamics(void) { + if (!m_bSuspendDynamics) + { + return; + } + + if (m_pPhysicsController1) + { + m_pPhysicsController1->RestoreDynamics(); + } + m_bSuspendDynamics = false; + } + KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; } /** * @section Python interface functions. diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp new file mode 100644 index 00000000000..d44ab477749 --- /dev/null +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp @@ -0,0 +1,206 @@ +// +// Adjust dynamics settins for this object +// +// $Id$ +// +// ***** BEGIN GPL LICENSE BLOCK ***** +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +// The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +// All rights reserved. +// +// The Original Code is: all of this file. +// +// Contributor(s): none yet. +// +// ***** END GPL LICENSE BLOCK ***** + +// +// Previously existed as: + +// \source\gameengine\GameLogic\SCA_DynamicActuator.cpp + +// Please look here for revision history. + +#include "KX_SCA_DynamicActuator.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ + + PyTypeObject + +KX_SCA_DynamicActuator:: + +Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "KX_SCA_DynamicActuator", + sizeof(KX_SCA_DynamicActuator), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, + __repr, + 0, + 0, + 0, + 0, + 0 +}; + +PyParentObject KX_SCA_DynamicActuator::Parents[] = { + &KX_SCA_DynamicActuator::Type, + &SCA_IActuator::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + + +PyMethodDef KX_SCA_DynamicActuator::Methods[] = { + KX_PYMETHODTABLE(KX_SCA_DynamicActuator, setOperation), + KX_PYMETHODTABLE(KX_SCA_DynamicActuator, getOperation), + {NULL,NULL} //Sentinel +}; + + + +PyObject* KX_SCA_DynamicActuator::_getattr(const STR_String& attr) +{ + _getattr_up(SCA_IActuator); +} + + + +/* 1. setOperation */ +KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, setOperation, +"setOperation(operation?)\n" +"\t - operation? : type of dynamic operation\n" +"\t 0 = restore dynamics\n" +"\t 1 = disable dynamics\n" +"\t 2 = enable rigid body\n" +"\t 3 = disable rigid body\n" +"Change the dynamic status of the parent object.\n") +{ + int dyn_operation; + + if (!PyArg_ParseTuple(args, "i", &dyn_operation)) + { + return NULL; + } + if (dyn_operation <0 || dyn_operation>3) { + PyErr_SetString(PyExc_IndexError, "Dynamic Actuator's setOperation() range must be between 0 and 3"); + return NULL; + } + m_dyn_operation= dyn_operation; + Py_Return; +} + +KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation, +"getOperation() -> integer\n" +"Returns the operation type of this actuator.\n" +) +{ + return PyInt_FromLong((long)m_dyn_operation); +} + + +/* ------------------------------------------------------------------------- */ +/* Native functions */ +/* ------------------------------------------------------------------------- */ + +KX_SCA_DynamicActuator::KX_SCA_DynamicActuator(SCA_IObject *gameobj, + short dyn_operation, + PyTypeObject* T) : + + SCA_IActuator(gameobj, T), + m_dyn_operation(dyn_operation) +{ +} /* End of constructor */ + + +KX_SCA_DynamicActuator::~KX_SCA_DynamicActuator() +{ + // there's nothing to be done here, really.... +} /* end of destructor */ + + + +bool KX_SCA_DynamicActuator::Update() +{ + // bool result = false; /*unused*/ + KX_GameObject *obj = (KX_GameObject*) GetParent(); + bool bNegativeEvent = IsNegativeEvent(); + KX_IPhysicsController* controller; + RemoveAllEvents(); + + if (bNegativeEvent) + return false; // do nothing on negative events + + if (!obj) + return false; // object not accessible, shouldnt happen + controller = obj->GetPhysicsController(); + if (!controller) + return false; // no physic object + + switch (m_dyn_operation) + { + case 0: + obj->RestoreDynamics(); + break; + case 1: + obj->SuspendDynamics(); + break; + case 2: + controller->setRigidBody(true); + break; + case 3: + controller->setRigidBody(false); + break; + } + + return false; +} + + + +CValue* KX_SCA_DynamicActuator::GetReplica() +{ + KX_SCA_DynamicActuator* replica = + new KX_SCA_DynamicActuator(*this); + + if (replica == NULL) + return NULL; + + replica->ProcessReplica(); + + // this will copy properties and so on... + CValue::AddDataToReplica(replica); + + return replica; +}; + + +/* eof */ diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h new file mode 100644 index 00000000000..b47c3a511d9 --- /dev/null +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h @@ -0,0 +1,76 @@ +// +// Add object to the game world on action of this actuator +// +// $Id$ +// +// ***** BEGIN GPL LICENSE BLOCK ***** +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// +// The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +// All rights reserved. +// +// The Original Code is: all of this file. +// +// Contributor(s): Campbell Barton +// +// ***** END GPL LICENSE BLOCK ***** +// + +#ifndef __KX_SCA_DYNAMICACTUATOR +#define __KX_SCA_DYNAMICACTUATOR + +#include "SCA_IActuator.h" +#include "SCA_PropertyActuator.h" +#include "SCA_LogicManager.h" + +#include "KX_GameObject.h" +#include "KX_IPhysicsController.h" + +class KX_SCA_DynamicActuator : public SCA_IActuator +{ + Py_Header; + + // dynamics operation to apply to the game object + short m_dyn_operation; + public: + KX_SCA_DynamicActuator( + SCA_IObject* gameobj, + short dyn_operation, + PyTypeObject* T=&Type + ); + + ~KX_SCA_DynamicActuator( + ); + + CValue* + GetReplica( + ); + + virtual bool + Update(); + + virtual PyObject* + _getattr( + const STR_String& attr + ); + + /* 1. setOperation */ + KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,setOperation); + KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,getOperation); + +}; + +#endif From 84c4e89eba40d13795ce6b808f2faf3771ba2550 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Jun 2008 16:09:29 +0000 Subject: [PATCH 297/430] Commented out face transp changing when switching images, this is more annoying then helpful. Edited Game engine docs to note that the matrix will need to be transposed if used with Mathutils.Matrix() Edited "Collision" button since ray-sensor also uses collision. --- source/blender/src/buttons_editing.c | 2 +- source/blender/src/editsima.c | 6 ++++-- source/gameengine/PyDoc/KX_GameObject.py | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 88b72e5f514..7eff79fec88 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -6219,7 +6219,7 @@ static void editing_panel_mesh_texface(void) uiDefButBitS(block, TOG, TF_TILES, B_REDR_3D_IMA, "Tiles", 660,160,60,19, &tf->mode, 0, 0, 0, 0, "Use tilemode for face"); uiDefButBitS(block, TOG, TF_LIGHT, REDRAWVIEW3D, "Light", 720,160,60,19, &tf->mode, 0, 0, 0, 0, "Use light for face"); uiDefButBitS(block, TOG, TF_INVISIBLE, REDRAWVIEW3D, "Invisible",780,160,60,19, &tf->mode, 0, 0, 0, 0, "Make face invisible"); - uiDefButBitS(block, TOG, TF_DYNAMIC, REDRAWVIEW3D, "Collision", 840,160,60,19, &tf->mode, 0, 0, 0, 0, "Use face for collision detection"); + uiDefButBitS(block, TOG, TF_DYNAMIC, REDRAWVIEW3D, "Collision", 840,160,60,19, &tf->mode, 0, 0, 0, 0, "Use face for collision and ray-sensor detection"); uiBlockBeginAlign(block); uiDefButBitS(block, TOG, TF_SHAREDCOL, REDRAWVIEW3D, "Shared", 600,135,60,19, &tf->mode, 0, 0, 0, 0, "Blend vertex colors across face when vertices are shared"); diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 5f8485267bc..18a9803dcae 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -2690,15 +2690,17 @@ void image_changed(SpaceImage *sima, Image *image) if(image->id.us==0) id_us_plus(&image->id); else id_lib_extern(&image->id); - +#if 0 /* GE People dont like us messing with their face modes */ if (tface->transp==TF_ADD) {} /* they obviously know what they are doing! - leave as is */ else if (ibuf && ibuf->depth == 32) tface->transp = TF_ALPHA; else tface->transp = TF_SOLID; - +#endif } else { tface->tpage= NULL; tface->mode &= ~TF_TEX; +#if 0 tface->transp = TF_SOLID; +#endif } change = 1; } diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index ff55f975543..abcf5a942dd 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -50,8 +50,9 @@ class KX_GameObject: """ Sets the game object's orientation. - @type orn: 3x3 inverted rotation matrix, or Quaternion. + @type orn: 3x3 rotation matrix, or Quaternion. @param orn: a rotation matrix specifying the new rotation. + @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. """ def alignAxisToVect(vect, axis): """ @@ -71,6 +72,7 @@ class KX_GameObject: @rtype: 3x3 inverted rotation matrix @return: The game object's rotation matrix + @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. """ def getLinearVelocity(local): """ From ac25593479b2b45908312f83d255cd7d225b4ba2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Jun 2008 16:15:57 +0000 Subject: [PATCH 298/430] int toggle button function was being used on a short, remove warnings in buttons_logic.c too --- source/blender/src/buttons_logic.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 6cdc1d9b7c1..297cde844d3 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1602,7 +1602,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh float *fp; short ysize = 0, wval; - char *str, name[32]; + char *str; int myline, stbit; /* yco is at the top of the rect, draw downwards */ @@ -1653,16 +1653,16 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefBut(block, LABEL, 0, "damp", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); uiDefButI(block, NUM, 0, "", xco+45, yco-148, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); - uiDefButBitI(block, TOG, ACT_CLAMP_VEL, 0, "clamp",xco+45+wval, yco-148, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between SET and CLAMP Velocity"); + uiDefButBitS(block, TOG, ACT_CLAMP_VEL, 0, "clamp",xco+45+wval, yco-148, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between SET and CLAMP Velocity"); - uiDefButBitI(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-83, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-83, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitI(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV"); + uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV"); yco-= ysize; break; @@ -2789,7 +2789,6 @@ static uiBlock *controller_state_mask_menu(void *arg_cont) uiBlock *block; uiBut *but; bController *cont = arg_cont; - int mask; short yco = 12, xco = 0, stbit, offset; @@ -2839,7 +2838,6 @@ static void do_object_state_menu(void *arg, int event) static uiBlock *object_state_mask_menu(void *arg_obj) { uiBlock *block; - uiBut *but; short xco = 0; block= uiNewBlock(&curarea->uiblocks, "obstatemenu", UI_EMBOSSP, UI_HELV, curarea->win); From 11cdc2a002c5baf1a1405e7dc246cacbd2d9392d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 Jun 2008 12:39:06 +0000 Subject: [PATCH 299/430] Python API/Game engine fixes, dosn't affect 2.47 * Action FrameProp was checking if the string was true, not that it contained any text. * Added GameObject.getVisible() since there is already a getVisible * Added GameObject.getPropertyNames() Needed in apricot so Franky can collect and throw items in the level without having the names defined elsewhere or modifying his game logic which is stored in a separate blend file. --- .../Converter/BL_ActionActuator.cpp | 2 +- source/gameengine/Expressions/Value.cpp | 24 +++++++++++++++---- source/gameengine/Expressions/Value.h | 2 ++ source/gameengine/Ketsji/KX_GameObject.cpp | 15 ++++++++++++ source/gameengine/Ketsji/KX_GameObject.h | 3 +++ source/gameengine/PyDoc/KX_GameObject.py | 15 ++++++++++-- 6 files changed, 53 insertions(+), 8 deletions(-) diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 83be5d3a14f..5050da3fe7f 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -350,7 +350,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame) } /* Set the property if its defined */ - if (m_framepropname) { + if (m_framepropname[0] != '\0') { CValue* propowner = GetParent(); CValue* oldprop = propowner->GetProperty(m_framepropname); CValue* newval = new CFloatValue(m_localtime); diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 56208ab4ad5..f0195d5df82 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -520,11 +520,6 @@ void CValue::CloneProperties(CValue *replica) } - - - - - double* CValue::GetVector3(bool bGetTransformedVec) { assertd(false); // don;t get vector from me @@ -775,6 +770,25 @@ int CValue::_setattr(const STR_String& attr,PyObject* pyobj) //PyObjectPlus::_setattr(attr,value); return 0; }; + +PyObject* CValue::ConvertKeysToPython( void ) +{ + PyObject *pylist = PyList_New( 0 ); + PyObject *pystr; + + if (m_pNamedPropertyArray) + { + for ( std::map::iterator it = m_pNamedPropertyArray->begin(); + !(it == m_pNamedPropertyArray->end());it++) + { + pystr = PyString_FromString( (*it).first ); + PyList_Append(pylist, pystr); + Py_DECREF( pystr ); + } + } + return pylist; +} + /* PyObject* CValue::PyMake(PyObject* ignored,PyObject* args) { diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h index ccb9c34749d..561e5521d60 100644 --- a/source/gameengine/Expressions/Value.h +++ b/source/gameengine/Expressions/Value.h @@ -253,6 +253,8 @@ public: virtual int _delattr(const STR_String& attr); virtual int _setattr(const STR_String& attr,PyObject* value); + virtual PyObject* ConvertKeysToPython( void ); + KX_PYMETHOD(CValue,GetName); #else diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 4b467a229f0..3ca5f5809e6 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -803,6 +803,7 @@ void KX_GameObject::Suspend(void) PyMethodDef KX_GameObject::Methods[] = { {"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_VARARGS}, + {"getVisible",(PyCFunction) KX_GameObject::sPyGetVisible, METH_VARARGS}, {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS}, {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_VARARGS}, {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_VARARGS}, @@ -823,6 +824,7 @@ PyMethodDef KX_GameObject::Methods[] = { {"removeParent", (PyCFunction)KX_GameObject::sPyRemoveParent,METH_VARARGS}, {"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS}, {"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_VARARGS}, + {"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_VARARGS}, KX_PYMETHODTABLE(KX_GameObject, getDistanceTo), KX_PYMETHODTABLE(KX_GameObject, rayCastTo), KX_PYMETHODTABLE(KX_GameObject, rayCast), @@ -1095,6 +1097,12 @@ PyObject* KX_GameObject::PySetVisible(PyObject* self, } +PyObject* KX_GameObject::PyGetVisible(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + return PyInt_FromLong(m_bVisible); +} PyObject* KX_GameObject::PyGetVelocity(PyObject* self, @@ -1383,6 +1391,13 @@ PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self, return PyInt_FromLong((long)physid); } +PyObject* KX_GameObject::PyGetPropertyNames(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + return ConvertKeysToPython(); +} + KX_PYMETHODDEF_DOC(KX_GameObject, getDistanceTo, "getDistanceTo(other): get distance to another point/KX_GameObject") { diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index a0507cb9dbc..796cb4a161f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -718,6 +718,7 @@ public: KX_PYMETHOD(KX_GameObject,GetReactionForce); KX_PYMETHOD(KX_GameObject,GetOrientation); KX_PYMETHOD(KX_GameObject,SetOrientation); + KX_PYMETHOD(KX_GameObject,GetVisible); KX_PYMETHOD(KX_GameObject,SetVisible); KX_PYMETHOD(KX_GameObject,AlignAxisToVect); KX_PYMETHOD(KX_GameObject,SuspendDynamics); @@ -731,9 +732,11 @@ public: KX_PYMETHOD(KX_GameObject,SetParent); KX_PYMETHOD(KX_GameObject,RemoveParent); KX_PYMETHOD(KX_GameObject,GetPhysicsId); + KX_PYMETHOD(KX_GameObject,GetPropertyNames); KX_PYMETHOD_DOC(KX_GameObject,rayCastTo); KX_PYMETHOD_DOC(KX_GameObject,rayCast); KX_PYMETHOD_DOC(KX_GameObject,getDistanceTo); + private : /** diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index abcf5a942dd..572ac2d42ae 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -25,7 +25,12 @@ class KX_GameObject: @ivar timeOffset: adjust the slowparent delay at runtime. @type timeOffset: float """ - + def getVisible(visible): + """ + Gets the game object's visible flag. + + @type visible: boolean + """ def setVisible(visible): """ Sets the game object's visible flag. @@ -176,6 +181,12 @@ class KX_GameObject: """ Returns the user data object associated with this game object's physics controller. """ + def getPropertyNames(): + """ + Gets a list of all property names. + @rtype: list + @return: All property names for this object. + """ def getDistanceTo(other): """ Returns the distance to another object or point. @@ -216,7 +227,7 @@ class KX_GameObject: If is casted from/to object center or explicit [x,y,z] points. The ray does not have X-Ray capability: the first object hit (other than self object) stops the ray If a property was specified and the first object hit does not have that property, there is no hit - The ray ignores collision-free objects + The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects. @param to: [x,y,z] or object to which the ray is casted @type to: L{KX_GameObject} or 3-tuple From cef2867fef5031eae686ebd88095a2e1bede6f29 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Thu, 26 Jun 2008 16:42:20 +0000 Subject: [PATCH 300/430] Make it so it accepts blah.tiff as a filename not just blah.tif This is for bug [#15132] When saving a render .tif is appended to the saved file even if the name contains .tiff Kent --- source/blender/blenkernel/intern/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index b2557c9c07e..c73279746fb 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -857,8 +857,8 @@ void BKE_add_image_extension(char *string, int imtype) extension= ".bmp"; } else if(G.have_libtiff && (imtype==R_TIFF)) { - if(!BLI_testextensie(string, ".tif")) - extension= ".tif"; + if(!BLI_testextensie(string, ".tif") && + !BLI_testextensie(string, ".tiff")) extension= ".tif"; } #ifdef WITH_OPENEXR else if( ELEM(imtype, R_OPENEXR, R_MULTILAYER)) { From a8f00246bae68a08562832fbb010ff674e293599 Mon Sep 17 00:00:00 2001 From: Juho Vepsalainen Date: Thu, 26 Jun 2008 17:08:07 +0000 Subject: [PATCH 301/430] Fix for bug [#13651] Convertor->Math->Divide broken Changed the if statement to catch zero case properly. --- source/blender/nodes/intern/CMP_nodes/CMP_math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c index d00ce18a44f..421c1343df7 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c @@ -57,7 +57,7 @@ static void do_math(bNode *node, float *out, float *in, float *in2) break; case 3: /* Divide */ { - if(in[1]==0) /* We don't want to divide by zero. */ + if(in2[0]==0) /* We don't want to divide by zero. */ out[0]= 0.0; else out[0]= in[0] / in2[0]; From f0a3cbcdac4c7f84daef7c33e858a10277400a5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jun 2008 11:35:55 +0000 Subject: [PATCH 302/430] patch [#15865] BGE API call to delete objects from Dalai Felinto (dfelinto) renamed deleteObject to endObject() to match the user interface. --- source/gameengine/Ketsji/KX_GameObject.cpp | 13 +++++++++++++ source/gameengine/Ketsji/KX_GameObject.h | 3 ++- source/gameengine/PyDoc/KX_GameObject.py | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 3ca5f5809e6..fd06b223216 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -825,6 +825,7 @@ PyMethodDef KX_GameObject::Methods[] = { {"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS}, {"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_VARARGS}, {"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_VARARGS}, + {"endObject",(PyCFunction) KX_GameObject::sPyEndObject, METH_VARARGS}, KX_PYMETHODTABLE(KX_GameObject, getDistanceTo), KX_PYMETHODTABLE(KX_GameObject, rayCastTo), KX_PYMETHODTABLE(KX_GameObject, rayCast), @@ -858,6 +859,18 @@ PyObject* KX_GameObject::sPySetPosition(PyObject* self, } +PyObject* KX_GameObject::PyEndObject(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + + KX_Scene *scene = PHY_GetActiveScene(); + scene->DelayedRemoveObject(this); + + return Py_None; + +} + PyObject* KX_GameObject::PyGetPosition(PyObject* self, PyObject* args, diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 796cb4a161f..682b339bf62 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -710,7 +710,7 @@ public: PyObject* args, PyObject* kwds ); - + KX_PYMETHOD(KX_GameObject,GetPosition); KX_PYMETHOD(KX_GameObject,GetLinearVelocity); KX_PYMETHOD(KX_GameObject,GetVelocity); @@ -733,6 +733,7 @@ public: KX_PYMETHOD(KX_GameObject,RemoveParent); KX_PYMETHOD(KX_GameObject,GetPhysicsId); KX_PYMETHOD(KX_GameObject,GetPropertyNames); + KX_PYMETHOD(KX_GameObject,EndObject); KX_PYMETHOD_DOC(KX_GameObject,rayCastTo); KX_PYMETHOD_DOC(KX_GameObject,rayCast); KX_PYMETHOD_DOC(KX_GameObject,getDistanceTo); diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index 572ac2d42ae..f971a7f5f54 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -25,6 +25,11 @@ class KX_GameObject: @ivar timeOffset: adjust the slowparent delay at runtime. @type timeOffset: float """ + def endObject(visible): + """ + Delete this object, can be used inpace of the EndObject Actuator. + The actual removal of the object from the scene is delayed. + """ def getVisible(visible): """ Gets the game object's visible flag. From f9ae102afd4a6dd03a028127c2e2b4f99ae8cf57 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Jun 2008 23:01:33 +0000 Subject: [PATCH 303/430] bugfix, txt_to_buf would crash on an empty text file. Also checked all other uses of text->lines.first to make sure the assumption isn't made elsewhere. Added 2 more checks for text->lines.first when converting text buffer to objects. --- source/blender/blenkernel/intern/text.c | 3 ++- source/blender/src/editfont.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 876547042dc..53b7bb975a3 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -942,7 +942,8 @@ char *txt_to_buf (Text *text) if (!text) return NULL; if (!text->curl) return NULL; if (!text->sell) return NULL; - + if (!text->lines.first) return NULL; + linef= text->lines.first; charf= 0; diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c index cb245867c89..a3b05a008c8 100644 --- a/source/blender/src/editfont.c +++ b/source/blender/src/editfont.c @@ -354,7 +354,7 @@ void txt_export_to_object(struct Text *text) // char sdir[FILE_MAXDIR]; // char sfile[FILE_MAXFILE]; - if(!text) return; + if(!text || !text->lines.first) return; id = (ID *)text; @@ -429,7 +429,7 @@ void txt_export_to_objects(struct Text *text) int linenum = 0; float offset[3] = {0.0,0.0,0.0}; - if(!text) return; + if(!text || !text->lines.first) return; id = (ID *)text; From 1231a2171adf1f5ce596eb12a018978bb6a39695 Mon Sep 17 00:00:00 2001 From: Hamed Zaghaghi Date: Sat, 28 Jun 2008 03:18:11 +0000 Subject: [PATCH 304/430] BGE 2d-filter, custom shaders now can have depth texture and luminance texture --- source/blender/makesdna/DNA_actuator_types.h | 8 +- source/blender/src/buttons_logic.c | 6 +- .../BlenderRoutines/KX_BlenderRenderTools.cpp | 4 +- .../BlenderRoutines/KX_BlenderRenderTools.h | 2 +- .../Converter/KX_ConvertActuators.cpp | 2 +- .../GameLogic/SCA_2DFilterActuator.cpp | 4 +- .../GameLogic/SCA_2DFilterActuator.h | 2 + .../Rasterizer/RAS_2DFilterManager.cpp | 101 ++++++++++++++---- .../Rasterizer/RAS_2DFilterManager.h | 10 +- .../gameengine/Rasterizer/RAS_IRenderTools.h | 2 +- 10 files changed, 109 insertions(+), 32 deletions(-) diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 20316f26804..51f03a676e4 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -192,11 +192,13 @@ typedef struct bVisibilityActuator { } bVisibilityActuator; typedef struct bTwoDFilterActuator{ - char pad[4]; - /* Tells what type of 2D Filter*/ + char pad[2]; + /* bitwise flag for enabling or disabling depth(bit 0) and luminance(bit 1) */ + short texture_flag; + /* Tells what type of 2D Filter */ short type; /* (flag == 0) means 2D filter is activate and - (flag != 0) means 2D filter is inactive*/ + (flag != 0) means 2D filter is inactive */ short flag; int int_arg; /* a float argument */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 297cde844d3..bfe2c92fde5 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -2382,7 +2382,11 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh break; case ACT_2DFILTER_CUSTOMFILTER: uiDefButI(block, NUM, B_REDR, "Pass Number:", xco+30,yco-44,width-60,19,&tdfa->int_arg,0.0,MAX_RENDER_PASS-1,0.0,0.0,"Set motion blur value"); - uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width-60, 19, &tdfa->text, ""); + uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "Script: ", xco+30,yco-64,width/2-32, 19, &tdfa->text, ""); + uiDefButS(block, TOG|BIT|0, B_REDR, "Depth", xco+width/2+2 , yco - 64, width/4-16 , 19, + &tdfa->texture_flag, 0.0, 0.0, 0, 0, "Includes Depth Texture (bgl_DepthTexture)"); + uiDefButS(block, TOG|BIT|1, B_REDR, "Luminance", xco+3*width/4-14 , yco - 64, width/4-16 , 19, + &tdfa->texture_flag, 0.0, 0.0, 0, 0, "Includes Luminance Texture (bgl_LuminanceTexture)"); break; } diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index 07a3649aa0f..73d2870720a 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -483,9 +483,9 @@ void KX_BlenderRenderTools::MotionBlur(RAS_IRasterizer* rasterizer) } } -void KX_BlenderRenderTools::Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text) +void KX_BlenderRenderTools::Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text, short texture_flag) { - m_filtermanager.EnableFilter(filtermode, pass, text); + m_filtermanager.EnableFilter(filtermode, pass, text, texture_flag); } void KX_BlenderRenderTools::Render2DFilters(RAS_ICanvas* canvas) diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h index 31eaa14d66b..7748e31156d 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h @@ -101,7 +101,7 @@ public: virtual void MotionBlur(RAS_IRasterizer* rasterizer); - virtual void Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text); + virtual void Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text, short texture_flag); virtual void Render2DFilters(RAS_ICanvas* canvas); diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index a50c072914d..ea26c55a44e 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -944,7 +944,7 @@ void BL_ConvertActuators(char* maggiename, } tmp = new SCA_2DFilterActuator(gameobj, filtermode, _2dfilter->flag, - _2dfilter->float_arg,_2dfilter->int_arg,ketsjiEngine->GetRasterizer(),rendertools); + _2dfilter->float_arg,_2dfilter->int_arg,_2dfilter->texture_flag,ketsjiEngine->GetRasterizer(),rendertools); if (_2dfilter->text) { diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp index f3b5b1fdda2..56249bb52ec 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp @@ -18,6 +18,7 @@ SCA_2DFilterActuator::SCA_2DFilterActuator( short flag, float float_arg, int int_arg, + short texture_flag, RAS_IRasterizer* rasterizer, RAS_IRenderTools* rendertools, PyTypeObject* T) @@ -25,6 +26,7 @@ SCA_2DFilterActuator::SCA_2DFilterActuator( m_type(type), m_flag(flag), m_int_arg(int_arg), + m_texture_flag(texture_flag), m_float_arg(float_arg), m_rasterizer(rasterizer), m_rendertools(rendertools) @@ -72,7 +74,7 @@ bool SCA_2DFilterActuator::Update() } else if(m_type < RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS) { - m_rendertools->Update2DFilter(m_type, m_int_arg, m_shaderText); + m_rendertools->Update2DFilter(m_type, m_int_arg, m_shaderText, m_texture_flag); } return true; } diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.h b/source/gameengine/GameLogic/SCA_2DFilterActuator.h index 7b0cfff951e..451a7b9491a 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.h +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.h @@ -16,6 +16,7 @@ private: short m_flag; float m_float_arg; int m_int_arg; + short m_texture_flag; STR_String m_shaderText; RAS_IRasterizer* m_rasterizer; RAS_IRenderTools* m_rendertools; @@ -28,6 +29,7 @@ public: short flag, float float_arg, int int_arg, + short texture_flag, RAS_IRasterizer* rasterizer, RAS_IRenderTools* rendertools, PyTypeObject* T=&Type diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index e9ab4ccca8d..e2761ce0a15 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -54,7 +54,7 @@ RAS_2DFilterManager::RAS_2DFilterManager(): -texname(-1), texturewidth(-1), textureheight(-1), +texturewidth(-1), textureheight(-1), canvaswidth(-1), canvasheight(-1), numberoffilters(0) { @@ -72,8 +72,9 @@ numberoffilters(0) { m_filters[passindex] = 0; m_enabled[passindex] = 0; + texflag[passindex] = 0; } - + texname[0] = texname[1] = texname[2] = -1; } RAS_2DFilterManager::~RAS_2DFilterManager() @@ -150,30 +151,54 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(int filtermode) return 0; } -void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) +void RAS_2DFilterManager::StartShaderProgram(int passindex) { GLint uniformLoc; - glUseProgramObjectARB(shaderprogram); - uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); + glUseProgramObjectARB(m_filters[passindex]); + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_RenderedTexture"); glActiveTextureARB(GL_TEXTURE0); - //glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D, texname); + glBindTexture(GL_TEXTURE_2D, texname[0]); if (uniformLoc != -1) { glUniform1iARB(uniformLoc, 0); } - uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_TextureCoordinateOffset"); + + /* send depth texture to glsl program if it needs */ + if(texflag[passindex] & 0x1){ + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_DepthTexture"); + glActiveTextureARB(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, texname[1]); + + if (uniformLoc != -1) + { + glUniform1iARB(uniformLoc, 1); + } + } + + /* send luminance texture to glsl program if it needs */ + if(texflag[passindex] & 0x1){ + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_LuminanceTexture"); + glActiveTextureARB(GL_TEXTURE2); + glBindTexture(GL_TEXTURE_2D, texname[2]); + + if (uniformLoc != -1) + { + glUniform1iARB(uniformLoc, 2); + } + } + + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_TextureCoordinateOffset"); if (uniformLoc != -1) { glUniform2fvARB(uniformLoc, 9, textureoffsets); } - uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureWidth"); + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_RenderedTextureWidth"); if (uniformLoc != -1) { glUniform1fARB(uniformLoc,texturewidth); } - uniformLoc = glGetUniformLocationARB(shaderprogram, "bgl_RenderedTextureHeight"); + uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_RenderedTextureHeight"); if (uniformLoc != -1) { glUniform1fARB(uniformLoc,textureheight); @@ -187,14 +212,33 @@ void RAS_2DFilterManager::EndShaderProgram() void RAS_2DFilterManager::SetupTexture() { - if(texname!=-1) + if(texname[0]!=-1 || texname[1]!=-1) { - glDeleteTextures(1,(const GLuint *)&texname); + glDeleteTextures(2, texname); } - glGenTextures(1, (GLuint *)&texname); - glBindTexture(GL_TEXTURE_2D, texname); + glGenTextures(3, texname); + + glBindTexture(GL_TEXTURE_2D, texname[0]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth, textureheight, 0, GL_RGB, - GL_UNSIGNED_BYTE, 0); + GL_UNSIGNED_BYTE, 0); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + + glBindTexture(GL_TEXTURE_2D, texname[1]); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32, texturewidth,textureheight, 0, GL_DEPTH_COMPONENT, + GL_FLOAT,NULL); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, + GL_NONE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + + glBindTexture(GL_TEXTURE_2D, texname[2]); + glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16, texturewidth, textureheight, 0, GL_LUMINANCE, + GL_UNSIGNED_BYTE, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); @@ -246,12 +290,27 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) int passindex; bool first = true; + for(passindex =0; passindex Date: Sat, 28 Jun 2008 14:19:25 +0000 Subject: [PATCH 305/430] BGE , fix an compile error --- source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | 4 ++-- source/gameengine/GamePlayer/common/GPC_RenderTools.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 44eeccedbd1..a5017574873 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -602,9 +602,9 @@ void GPC_RenderTools::MotionBlur(RAS_IRasterizer* rasterizer) } } -void GPC_RenderTools::Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text) +void GPC_RenderTools::Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text, short texture_flag) { - m_filtermanager.EnableFilter(filtermode, pass, text); + m_filtermanager.EnableFilter(filtermode, pass, text, texture_flag); } void GPC_RenderTools::Render2DFilters(RAS_ICanvas* canvas) diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.h b/source/gameengine/GamePlayer/common/GPC_RenderTools.h index f7230cb0865..cb7193f3513 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.h +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.h @@ -142,7 +142,7 @@ public: virtual void MotionBlur(RAS_IRasterizer* rasterizer); - virtual void Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text); + virtual void Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text, short texture_flag); virtual void Render2DFilters(RAS_ICanvas* canvas); From e27d635e186d6d8bb10a2efd5c43bbc76caff70f Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 29 Jun 2008 03:58:46 +0000 Subject: [PATCH 306/430] Added autokey call for Flip Quats tool (Alt-F in PoseMode) --- source/blender/src/poseobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c index dcceea971f7..cc08bf53a72 100644 --- a/source/blender/src/poseobject.c +++ b/source/blender/src/poseobject.c @@ -1627,6 +1627,8 @@ void pose_flipquats(void) pchan->quat[3]= -pchan->quat[3]; } } - + + /* do autokey */ + autokeyframe_pose_cb_func(ob, TFM_ROTATION, 0); } From 13e4ae15428cc5f05d114ec522953e6cf06b4dbb Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 29 Jun 2008 05:52:11 +0000 Subject: [PATCH 307/430] Action Editor - Group drawing tweaks: * When all the action-channels for a group are hidden (i.e. their related bones are not visible), the group in question is also not drawn. This helps reduce clutter. (slikdigit funboard request) * When a group has no channels belonging to it, the expand icon/button isn't drawn for that group. --- source/blender/src/drawaction.c | 11 +++++++---- source/blender/src/editaction.c | 13 +++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 8c4958a651a..89466151a39 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -474,10 +474,13 @@ static void draw_channel_names(void) indent= 0; special= -1; - if (EXPANDED_AGRP(agrp)) - expand = ICON_TRIA_DOWN; - else - expand = ICON_TRIA_RIGHT; + /* only show expand if there are any channels */ + if (agrp->channels.first) { + if (EXPANDED_AGRP(agrp)) + expand = ICON_TRIA_DOWN; + else + expand = ICON_TRIA_RIGHT; + } if (EDITABLE_AGRP(agrp)) protect = ICON_UNLOCKED; diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 40b6b7ba6fe..f93a1526e3c 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -390,7 +390,7 @@ static void actdata_filter_actionchannel (ListBase *act_data, bActionChannel *ac static void actdata_filter_action (ListBase *act_data, bAction *act, int filter_mode) { - bActListElem *ale; + bActListElem *ale=NULL; bActionGroup *agrp; bActionChannel *achan, *lastchan=NULL; @@ -429,6 +429,15 @@ static void actdata_filter_action (ListBase *act_data, bAction *act, int filter_ for (achan= agrp->channels.first; achan && achan->grp==agrp; achan= achan->next) { actdata_filter_actionchannel(act_data, achan, filter_mode); } + + /* remove group from filtered list if last element is group + * (i.e. only if group had channels, which were all hidden) + */ + if ( (ale) && (act_data->last == ale) && + (ale->data == agrp) && (agrp->channels.first) ) + { + BLI_freelinkN(act_data, ale); + } } } } @@ -3648,7 +3657,7 @@ static void mouse_actionchannels (short mval[]) { bActionGroup *agrp= (bActionGroup *)act_channel; - if (mval[0] < 16) { + if ((mval[0] < 16) && (agrp->channels.first)) { /* toggle expand */ agrp->flag ^= AGRP_EXPANDED; } From 7056d63f418dfcfd774d7dce27aa442939daf7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Sun, 29 Jun 2008 12:25:15 +0000 Subject: [PATCH 308/430] adding explicit cast to get things compiling --- source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index e2761ce0a15..23153fcd86c 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -214,9 +214,9 @@ void RAS_2DFilterManager::SetupTexture() { if(texname[0]!=-1 || texname[1]!=-1) { - glDeleteTextures(2, texname); + glDeleteTextures(2, (GLuint*)texname); } - glGenTextures(3, texname); + glGenTextures(3, (GLuint*)texname); glBindTexture(GL_TEXTURE_2D, texname[0]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth, textureheight, 0, GL_RGB, From bdcffe35b9ab6a86a2ff526355f24827ce7b04c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Luc=20Peuri=C3=A8re?= Date: Sun, 29 Jun 2008 12:53:42 +0000 Subject: [PATCH 309/430] NDOF bugfixes 14402 & 14403 by ettore Pasquini --- source/blender/src/view.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/source/blender/src/view.c b/source/blender/src/view.c index 356a297b284..f457f9203ff 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -689,10 +689,6 @@ void viewmoveNDOFfly(int mode) if (G.vd->ndoffilter) filterNDOFvalues(fval); -// for(i=0;i<7;i++) printf("%f ",dval[i]); -// printf("\n"); - - // Scale input values // if(dval[6] == 0) return; // guard against divide by zero @@ -701,12 +697,6 @@ void viewmoveNDOFfly(int mode) // user scaling dval[i] = dval[i] * ndof_axis_scale[i]; - - // non-linear scaling - if(dval[i]<0.0f) - dval[i] = -1.0f * dval[i] * dval[i]; - else - dval[i] = dval[i] * dval[i]; } @@ -1216,18 +1206,16 @@ void viewmoveNDOF(int mode) // prevTime = now; // sbadjust *= 60 * frametime; /* normalize ndof device adjustments to 100Hz for framerate independence */ - /* fetch the current state of the ndof device */ + /* fetch the current state of the ndof device & enforce dominant mode if selected */ getndof(fval); - // printf(" motion command %f %f %f %f %f %f %f \n", fval[0], fval[1], fval[2], - // fval[3], fval[4], fval[5], fval[6]); - if (G.vd->ndoffilter) - filterNDOFvalues(fval); + if (G.vd->ndoffilter) + filterNDOFvalues(fval); // put scaling back here, was previously in ghostwinlay - fval[0] = fval[0] * (1.0f/1200.0f); - fval[1] = fval[1] * (1.0f/1200.0f); - fval[2] = fval[2] * (1.0f/1200.0f); + fval[0] = fval[0] * (1.0f/600.0f); + fval[1] = fval[1] * (1.0f/600.0f); + fval[2] = fval[2] * (1.0f/1100.0f); fval[3] = fval[3] * 0.00005f; fval[4] =-fval[4] * 0.00005f; fval[5] = fval[5] * 0.00005f; @@ -1255,14 +1243,16 @@ void viewmoveNDOF(int mode) VECCOPY(obofs, G.vd->ofs); } - /* calc an adjustment based on distance from camera */ - if (ob) { + /* calc an adjustment based on distance from camera + disabled per patch 14402 */ + d = 1.0f; + +/* if (ob) { VecSubf(diff, obofs, G.vd->ofs); d = VecLength(diff); } - else { - d = 1.0f; - } +*/ + reverse = (G.vd->persmat[2][1] < 0.0f) ? -1.0f : 1.0f; /*---------------------------------------------------- From 4b59a4bea0d84330cc9b925e8f95a63eb384bd54 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 29 Jun 2008 15:11:35 +0000 Subject: [PATCH 310/430] == FFMPEG / ImBuf == Fixed deinterlacing (inplace deinterlacing didn't work out properly...). [#14672] Sequencer: deinterlace filter artifacts --- source/blender/imbuf/intern/IMB_anim.h | 3 +- source/blender/imbuf/intern/anim.c | 70 ++++++++++++++++++-------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 71d35949833..7dc1f966b71 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -183,8 +183,9 @@ struct anim { AVFormatContext *pFormatCtx; AVCodecContext *pCodecCtx; AVCodec *pCodec; - AVFrame *pFrameRGB; AVFrame *pFrame; + AVFrame *pFrameRGB; + AVFrame *pFrameDeinterlaced; struct SwsContext *img_convert_ctx; int videoStream; #endif diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 7fc8145c4a7..720f5b0f7c8 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -600,6 +600,7 @@ static int startffmpeg(struct anim * anim) { anim->videoStream = videoStream; anim->pFrame = avcodec_alloc_frame(); + anim->pFrameDeinterlaced = avcodec_alloc_frame(); anim->pFrameRGB = avcodec_alloc_frame(); if (avpicture_get_size(PIX_FMT_BGR32, anim->x, anim->y) @@ -609,10 +610,20 @@ static int startffmpeg(struct anim * anim) { avcodec_close(anim->pCodecCtx); av_close_input_file(anim->pFormatCtx); av_free(anim->pFrameRGB); + av_free(anim->pFrameDeinterlaced); av_free(anim->pFrame); return -1; } + if (anim->ib_flags & IB_animdeinterlace) { + avpicture_fill((AVPicture*) anim->pFrameDeinterlaced, + MEM_callocN(avpicture_get_size( + anim->pCodecCtx->pix_fmt, + anim->x, anim->y), + "ffmpeg deinterlace"), + anim->pCodecCtx->pix_fmt, anim->x, anim->y); + } + if (pCodecCtx->has_b_frames) { anim->preseek = 25; /* FIXME: detect gopsize ... */ } else { @@ -644,7 +655,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect, 0); - avpicture_fill((AVPicture *)anim->pFrameRGB, + avpicture_fill((AVPicture*) anim->pFrameRGB, (unsigned char*) ibuf->rect, PIX_FMT_BGR32, anim->x, anim->y); @@ -723,15 +734,29 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { } if(frameFinished && pos_found == 1) { + AVFrame * input = anim->pFrame; + + /* This means the data wasnt read properly, + this check stops crashing */ + if (input->data[0]==0 && input->data[1]==0 + && input->data[2]==0 && input->data[3]==0){ + av_free_packet(&packet); + break; + } + if (anim->ib_flags & IB_animdeinterlace) { if (avpicture_deinterlace( - anim->pFrame, + (AVPicture*) + anim->pFrameDeinterlaced, + (const AVPicture*) anim->pFrame, anim->pCodecCtx->pix_fmt, anim->pCodecCtx->width, anim->pCodecCtx->height) < 0) { filter_y = 1; + } else { + input = anim->pFrameDeinterlaced; } } @@ -748,8 +773,8 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { unsigned char* top; sws_scale(anim->img_convert_ctx, - anim->pFrame->data, - anim->pFrame->linesize, + input->data, + input->linesize, 0, anim->pCodecCtx->height, dst2, @@ -806,27 +831,25 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { int i; unsigned char* r; - /* This means the data wasnt read properly, this check stops crashing */ - if (anim->pFrame->data[0]!=0 || anim->pFrame->data[1]!=0 || anim->pFrame->data[2]!=0 || anim->pFrame->data[3]!=0) { - sws_scale(anim->img_convert_ctx, - anim->pFrame->data, - anim->pFrame->linesize, - 0, - anim->pCodecCtx->height, - dst2, - dstStride2); + sws_scale(anim->img_convert_ctx, + input->data, + input->linesize, + 0, + anim->pCodecCtx->height, + dst2, + dstStride2); - /* workaround: sws_scale - sets alpha = 0... */ + /* workaround: sws_scale + sets alpha = 0... */ - r = (unsigned char*) ibuf->rect; - - for (i = 0; i < ibuf->x * ibuf->y;i++){ - r[3] = 0xff; - r+=4; - } + r = (unsigned char*) ibuf->rect; + + for (i = 0; i < ibuf->x * ibuf->y;i++){ + r[3] = 0xff; + r+=4; } + av_free_packet(&packet); break; } @@ -851,6 +874,11 @@ static void free_anim_ffmpeg(struct anim * anim) { av_close_input_file(anim->pFormatCtx); av_free(anim->pFrameRGB); av_free(anim->pFrame); + + if (anim->ib_flags & IB_animdeinterlace) { + MEM_freeN(anim->pFrameDeinterlaced->data[0]); + } + av_free(anim->pFrameDeinterlaced); sws_freeContext(anim->img_convert_ctx); } anim->duration = 0; From d5f4b3620f19e816415fcf22dda6479d00986eea Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 29 Jun 2008 20:53:17 +0000 Subject: [PATCH 311/430] Fix for bug #8680: GameLogic.getRandomFloat() returns very small values on 64 bit, instead of range 0..1. Also a warning fix. --- intern/iksolver/intern/IK_QTask.h | 2 +- intern/moto/include/MT_random.h | 6 +++--- intern/moto/intern/MT_random.cpp | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/intern/iksolver/intern/IK_QTask.h b/intern/iksolver/intern/IK_QTask.h index c291a0e7e50..4d469d737f8 100644 --- a/intern/iksolver/intern/IK_QTask.h +++ b/intern/iksolver/intern/IK_QTask.h @@ -74,7 +74,7 @@ public: virtual bool PositionTask() const { return false; } - virtual void Scale(float scale) {} + virtual void Scale(float) {} protected: int m_id; diff --git a/intern/moto/include/MT_random.h b/intern/moto/include/MT_random.h index d7da546cf03..3afe1dd1662 100644 --- a/intern/moto/include/MT_random.h +++ b/intern/moto/include/MT_random.h @@ -31,10 +31,10 @@ #include -#define MT_RAND_MAX ULONG_MAX +#define MT_RAND_MAX UINT_MAX -extern void MT_srand(unsigned long); -extern unsigned long MT_rand(); +extern void MT_srand(unsigned int); +extern unsigned int MT_rand(); #endif diff --git a/intern/moto/intern/MT_random.cpp b/intern/moto/intern/MT_random.cpp index 96cb394d3da..b8302e093ca 100644 --- a/intern/moto/intern/MT_random.cpp +++ b/intern/moto/intern/MT_random.cpp @@ -76,11 +76,11 @@ #define TEMPERING_SHIFT_T(y) (y << 15) #define TEMPERING_SHIFT_L(y) (y >> 18) -static unsigned long mt[N]; /* the array for the state vector */ +static unsigned int mt[N]; /* the array for the state vector */ static int mti = N+1; /* mti==N+1 means mt[N] is not initialized */ /* initializing the array with a NONZERO seed */ -void MT_srand(unsigned long seed) +void MT_srand(unsigned int seed) { /* setting initial seeds to mt[N] using */ /* the generator Line 25 of Table 1 in */ @@ -91,12 +91,12 @@ void MT_srand(unsigned long seed) mt[mti] = (69069 * mt[mti-1]) & 0xffffffff; } -unsigned long MT_rand() +unsigned int MT_rand() { - static unsigned long mag01[2] = { 0x0, MATRIX_A }; + static unsigned int mag01[2] = { 0x0, MATRIX_A }; /* mag01[x] = x * MATRIX_A for x=0,1 */ - unsigned long y; + unsigned int y; if (mti >= N) { /* generate N words at one time */ int kk; From 6d7a43dd5440002128a7b1b3fa30661f9b9626a9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 29 Jun 2008 21:06:18 +0000 Subject: [PATCH 312/430] Fix for bug #13757: camera lens minimum value for ipo's was different than the button. --- source/blender/blenkernel/intern/ipo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 321d4f1d37e..59eb3837aab 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1859,7 +1859,7 @@ void set_icu_vars(IpoCurve *icu) /* yafray: aperture & focal distance params */ switch(icu->adrcode) { case CAM_LENS: - icu->ymin= 5.0; + icu->ymin= 1.0; icu->ymax= 1000.0; break; case CAM_STA: From ab7794392e9708ddbba24d9b444f61c06b19099b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 29 Jun 2008 21:51:27 +0000 Subject: [PATCH 313/430] Fix for bug #7753: after game engine drawing with vertex arrays, nurbs/curves/text dissappears. This also removes the "vertex arrays" option and enables it always for OpenGL version >= 1.1 - there's no need to have an option to make things render faster disabled by default, also it should work stable now. --- source/blender/makesdna/DNA_userdef_types.h | 2 +- source/blender/src/drawview.c | 3 +- source/blender/src/space.c | 11 ++---- .../BlenderRoutines/BL_KetsjiEmbedStart.cpp | 34 +++++++------------ .../GamePlayer/ghost/GPG_Application.cpp | 12 +++---- .../gameengine/GamePlayer/ghost/GPG_ghost.cpp | 3 +- .../RAS_OpenGLRasterizer.cpp | 3 ++ .../RAS_VAOpenGLRasterizer.cpp | 5 +-- 8 files changed, 31 insertions(+), 42 deletions(-) diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index acc1651e9fa..3de5b0ff5ba 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -310,7 +310,7 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_DUP_ACT (1 << 10) /* gameflags */ -#define USER_VERTEX_ARRAYS 1 +#define USER_DEPRECATED_FLAG 1 #define USER_DISABLE_SOUND 2 #define USER_DISABLE_MIPMAP 4 diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index deb7ddc068d..2f1cdb8b951 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -246,7 +246,8 @@ void default_gl_light(void) glDisable(GL_COLOR_MATERIAL); } -/* also called when render 'ogl' */ +/* also called when render 'ogl' + keep synced with Myinit_gl_stuff in the game engine! */ void init_gl_stuff(void) { float mat_ambient[] = { 0.0, 0.0, 0.0, 0.0 }; diff --git a/source/blender/src/space.c b/source/blender/src/space.c index d0c5267ab89..4422411b1c5 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -378,9 +378,6 @@ void space_set_commmandline_options(void) { if ( (syshandle = SYS_GetSystem()) ) { /* User defined settings */ - a= (U.gameflags & USER_VERTEX_ARRAYS); - SYS_WriteCommandLineInt(syshandle, "vertexarrays", a); - a= (U.gameflags & USER_DISABLE_SOUND); SYS_WriteCommandLineInt(syshandle, "noaudio", a); @@ -4255,15 +4252,11 @@ void drawinfospace(ScrArea *sa, void *spacedata) uiDefButS(block, MENU, B_GLRESLIMITCHANGED, "GL Texture Clamp Off%x0|%l|GL Texture Clamp 8192%x8192|GL Texture Clamp 4096%x4096|GL Texture Clamp 2048%x2048|GL Texture Clamp 1024%x1024|GL Texture Clamp 512%x512|GL Texture Clamp 256%x256|GL Texture Clamp 128%x128", (xpos+edgsp+(5*mpref)+(5*midsp)),y4,mpref,buth, &(U.glreslimit), 0, 0, 0, 0, "Limit the texture size to save graphics memory"); - uiDefButBitI(block, TOG, USER_VERTEX_ARRAYS, 0, "Vertex Arrays", - (xpos+edgsp+(5*mpref)+(5*midsp)),y3,mpref,buth, - &(U.gameflags), 0, 0, 0, 0, "Toggles between vertex arrays on (less reliable) and off (more reliable)"); - uiDefButI(block, NUM, 0, "Time Out ", - (xpos+edgsp+(5*mpref)+(5*midsp)), y2, mpref, buth, + (xpos+edgsp+(5*mpref)+(5*midsp)), y3, mpref, buth, &U.textimeout, 0.0, 3600.0, 30, 2, "Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated)"); uiDefButI(block, NUM, 0, "Collect Rate ", - (xpos+edgsp+(5*mpref)+(5*midsp)), y1, mpref, buth, + (xpos+edgsp+(5*mpref)+(5*midsp)), y2, mpref, buth, &U.texcollectrate, 1.0, 3600.0, 30, 2, "Number of seconds between each run of the GL texture garbage collector."); /* *** */ diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index 06aa0609ad9..4af5ac4d5d2 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -165,20 +165,14 @@ extern "C" void StartKetsjiShell(struct ScrArea *area, RAS_IRenderTools* rendertools = new KX_BlenderRenderTools(); RAS_IRasterizer* rasterizer = NULL; - // let's see if we want to use vertexarrays or not - int usevta = SYS_GetCommandLineInt(syshandle,"vertexarrays",1); - bool useVertexArrays = (usevta > 0); - - bool lock_arrays = (displaylists && useVertexArrays); - - if(displaylists){ - if (useVertexArrays) - rasterizer = new RAS_ListRasterizer(canvas, true, lock_arrays); + if(displaylists) { + if (GLEW_VERSION_1_1) + rasterizer = new RAS_ListRasterizer(canvas, true, true); else rasterizer = new RAS_ListRasterizer(canvas); } - else if (useVertexArrays && GLEW_VERSION_1_1) - rasterizer = new RAS_VAOpenGLRasterizer(canvas, lock_arrays); + else if (GLEW_VERSION_1_1) + rasterizer = new RAS_VAOpenGLRasterizer(canvas, false); else rasterizer = new RAS_OpenGLRasterizer(canvas); @@ -513,16 +507,14 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area, RAS_IRenderTools* rendertools = new KX_BlenderRenderTools(); RAS_IRasterizer* rasterizer = NULL; - // let's see if we want to use vertexarrays or not - int usevta = SYS_GetCommandLineInt(syshandle,"vertexarrays",1); - bool useVertexArrays = (usevta > 0); - - bool lock_arrays = (displaylists && useVertexArrays); - - if(displaylists && !useVertexArrays) - rasterizer = new RAS_ListRasterizer(canvas); - else if (useVertexArrays && GLEW_VERSION_1_1) - rasterizer = new RAS_VAOpenGLRasterizer(canvas, lock_arrays); + if(displaylists) { + if (GLEW_VERSION_1_1) + rasterizer = new RAS_ListRasterizer(canvas, true, true); + else + rasterizer = new RAS_ListRasterizer(canvas); + } + else if (GLEW_VERSION_1_1) + rasterizer = new RAS_VAOpenGLRasterizer(canvas, false); else rasterizer = new RAS_OpenGLRasterizer(canvas); diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index c4cf698d5ee..d6908b53d40 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -496,7 +496,6 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixed_framerate", fixedFr) != 0); bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); - bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 0; bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", G.fileflags & G_FILE_DIAPLAY_LISTS) != 0); if(GLEW_ARB_multitexture && GLEW_VERSION_1_1) { @@ -514,16 +513,17 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) if (!m_rendertools) goto initFailed; - if(useLists) - if (useVertexArrays) { + if(useLists) { + if(GLEW_VERSION_1_1) m_rasterizer = new RAS_ListRasterizer(m_canvas, true); - } else { + else m_rasterizer = new RAS_ListRasterizer(m_canvas); - } - else if (useVertexArrays && GLEW_VERSION_1_1) + } + else if (GLEW_VERSION_1_1) m_rasterizer = new RAS_VAOpenGLRasterizer(m_canvas); else m_rasterizer = new RAS_OpenGLRasterizer(m_canvas); + m_rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) stereoMode); if (!m_rasterizer) goto initFailed; diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index bc80c0a7612..8222e5c8bac 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -187,11 +187,10 @@ void usage(char* program) printf(" show_framerate 0 Show the frame rate\n"); printf(" show_properties 0 Show debug properties\n"); printf(" show_profile 0 Show profiling information\n"); - printf(" vertexarrays 1 Enable vertex arrays\n"); printf(" blender_material 0 Enable material settings\n"); printf("\n"); printf("example: %s -p 10 10 320 200 -g noaudio c:\\loadtest.blend\n", program); - printf("example: %s -g vertexarrays = 0 c:\\loadtest.blend\n", program); + printf("example: %s -g show_framerate = 0 c:\\loadtest.blend\n", program); } char *get_filename(int argc, char **argv) { diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index d3c0426de86..18147b53f4c 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -125,6 +125,9 @@ static void Myinit_gl_stuff(void) glDisable(GL_TEXTURE_1D); glDisable(GL_TEXTURE_2D); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_NORMAL_ARRAY); + glPixelTransferi(GL_MAP_COLOR, GL_FALSE); glPixelTransferi(GL_RED_SCALE, 1); glPixelTransferi(GL_RED_BIAS, 0); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp index ce76318c2ce..c4702fe5a74 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp @@ -91,9 +91,10 @@ void RAS_VAOpenGLRasterizer::SetDrawingMode(int drawingmode) void RAS_VAOpenGLRasterizer::Exit() { - glDisableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); EnableTextures(false); RAS_OpenGLRasterizer::Exit(); From 6a3e8e7fff4e577bea02966546293760c19deec7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Jun 2008 21:52:23 +0000 Subject: [PATCH 314/430] BGE python api addition, GameObject get/setState and Controller.getState() Also added a note in the tooltip for action priority when using more then 1 action at a time. --- source/blender/src/buttons_logic.c | 2 +- .../GameLogic/SCA_PythonController.cpp | 9 +++++ .../GameLogic/SCA_PythonController.h | 1 + source/gameengine/Ketsji/KX_GameObject.cpp | 35 +++++++++++++++++++ source/gameengine/Ketsji/KX_GameObject.h | 2 ++ source/gameengine/PyDoc/KX_GameObject.py | 14 ++++++++ .../gameengine/PyDoc/SCA_PythonController.py | 8 +++++ 7 files changed, 70 insertions(+), 1 deletion(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index bfe2c92fde5..3b545697f8e 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1703,7 +1703,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh } uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); - uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers"); + uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding clannels must be lower in the stack"); uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 44cdc0a7de5..be00117cd21 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -232,6 +232,7 @@ PyMethodDef SCA_PythonController::Methods[] = { METH_VARARGS, SCA_PythonController::GetSensor_doc}, {"getScript", (PyCFunction) SCA_PythonController::sPyGetScript, METH_VARARGS}, {"setScript", (PyCFunction) SCA_PythonController::sPySetScript, METH_VARARGS}, + {"getState", (PyCFunction) SCA_PythonController::sPyGetState, METH_VARARGS}, {NULL,NULL} //Sentinel }; @@ -442,4 +443,12 @@ PyObject* SCA_PythonController::PySetScript(PyObject* self, Py_Return; } +/* 1. getScript */ +PyObject* SCA_PythonController::PyGetState(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + return PyInt_FromLong(m_statemask); +} + /* eof */ diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h index 63975234da9..f3af54f402f 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.h +++ b/source/gameengine/GameLogic/SCA_PythonController.h @@ -81,6 +81,7 @@ class SCA_PythonController : public SCA_IController KX_PYMETHOD_DOC(SCA_PythonController,GetActuators); KX_PYMETHOD(SCA_PythonController,SetScript); KX_PYMETHOD(SCA_PythonController,GetScript); + KX_PYMETHOD(SCA_PythonController,GetState); }; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index fd06b223216..b7750e68e8f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -804,6 +804,8 @@ void KX_GameObject::Suspend(void) PyMethodDef KX_GameObject::Methods[] = { {"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_VARARGS}, {"getVisible",(PyCFunction) KX_GameObject::sPyGetVisible, METH_VARARGS}, + {"setState",(PyCFunction) KX_GameObject::sPySetState, METH_VARARGS}, + {"getState",(PyCFunction) KX_GameObject::sPyGetState, METH_VARARGS}, {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS}, {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_VARARGS}, {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_VARARGS}, @@ -1117,6 +1119,39 @@ PyObject* KX_GameObject::PyGetVisible(PyObject* self, return PyInt_FromLong(m_bVisible); } +PyObject* KX_GameObject::PyGetState(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + int state = 0; + state |= GetState(); + return PyInt_FromLong(state); +} + +PyObject* KX_GameObject::PySetState(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + int state_i; + unsigned int state = 0; + + if (PyArg_ParseTuple(args,"i",&state_i)) + { + state |= state_i; + if ((state & ((1<<30)-1)) == 0) { + PyErr_SetString(PyExc_AttributeError, "The state bitfield was not between 0 and 30 (1<<0 and 1<<29)"); + return NULL; + } + SetState(state); + } + else + { + return NULL; + } + Py_Return; +} + + PyObject* KX_GameObject::PyGetVelocity(PyObject* self, PyObject* args, diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 682b339bf62..89f4cb396d1 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -720,6 +720,8 @@ public: KX_PYMETHOD(KX_GameObject,SetOrientation); KX_PYMETHOD(KX_GameObject,GetVisible); KX_PYMETHOD(KX_GameObject,SetVisible); + KX_PYMETHOD(KX_GameObject,GetState); + KX_PYMETHOD(KX_GameObject,SetState); KX_PYMETHOD(KX_GameObject,AlignAxisToVect); KX_PYMETHOD(KX_GameObject,SuspendDynamics); KX_PYMETHOD(KX_GameObject,RestoreDynamics); diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index f971a7f5f54..ec7496daa75 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -40,6 +40,20 @@ class KX_GameObject: """ Sets the game object's visible flag. + @type visible: boolean + """ + def getState(): + """ + Gets the game object's state bitmask. + + @rtype: int + @return: the objects state. + """ + def setState(): + """ + Sets the game object's visible flag. + The bitmasks for states from 1 to 30 can be set with (1<<0, 1<<1, 1<<2 ... 1<<29) + @type visible: boolean """ def setPosition(pos): diff --git a/source/gameengine/PyDoc/SCA_PythonController.py b/source/gameengine/PyDoc/SCA_PythonController.py index eb9e57c0819..6d91736d636 100644 --- a/source/gameengine/PyDoc/SCA_PythonController.py +++ b/source/gameengine/PyDoc/SCA_PythonController.py @@ -46,4 +46,12 @@ class SCA_PythonController(SCA_IController): @type script: string. """ + def getState(): + """ + Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active. + This for instance will always be true however you could compare with a previous state to see when the state was activated. + GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState() + + @rtype: int + """ From 5b15a610ee2688a42f24b6ef16a7fce5a4aa96df Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 30 Jun 2008 14:44:12 +0000 Subject: [PATCH 315/430] Fix crash in python API (Campbell: please check :) ) -- using myLamp.setType(number) crashed blender (reported in IRC by Djoef) --- source/blender/python/api2_2x/Lamp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index ef3174ac4ed..d9034847a85 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -1525,7 +1525,11 @@ static PyObject *Lamp_oldsetType( BPy_Lamp * self, PyObject * value ) if( !value ) return ( EXPP_ReturnPyObjError( PyExc_TypeError, "expected string argument" ) ); - + + if( !type ) + return EXPP_ReturnPyObjError ( PyExc_AttributeError, + "expected string argument" ); + /* check for valid arguments, set type accordingly */ if( !strcmp( type, "Lamp" ) ) From 90c2c290587ac74eac310fd407adf5ffe1a2f619 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 30 Jun 2008 15:02:22 +0000 Subject: [PATCH 316/430] Fix for python APi error - (Campbell: please check :) ) -- using myLamp.setType(Area) resulted in 'TypeError: expected int argument in [0,5]' (reported in IRC by Djoef) --- source/blender/python/api2_2x/Lamp.c | 11 +++-------- source/blender/src/buttons_logic.c | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c index d9034847a85..53d25a6429d 100644 --- a/source/blender/python/api2_2x/Lamp.c +++ b/source/blender/python/api2_2x/Lamp.c @@ -1520,14 +1520,9 @@ static PyObject *Lamp_oldsetType( BPy_Lamp * self, PyObject * value ) char *type = PyString_AsString(value); PyObject *arg, *error; - /* parse string argument */ - - if( !value ) - return ( EXPP_ReturnPyObjError( PyExc_TypeError, - "expected string argument" ) ); - + /* parse string argument */ if( !type ) - return EXPP_ReturnPyObjError ( PyExc_AttributeError, + return EXPP_ReturnPyObjError ( PyExc_TypeError, "expected string argument" ); /* check for valid arguments, set type accordingly */ @@ -1550,7 +1545,7 @@ static PyObject *Lamp_oldsetType( BPy_Lamp * self, PyObject * value ) /* build tuple, call wrapper */ - arg = Py_BuildValue( "(i)", type ); + arg = Py_BuildValue( "(i)", self->lamp->type ); error = EXPP_setterWrapper ( (void *)self, arg, (setter)Lamp_setType ); Py_DECREF ( arg ); return error; diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 3b545697f8e..4e5e8a605ee 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1703,7 +1703,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh } uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); - uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding clannels must be lower in the stack"); + uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); From 96152f8409d98983630f4246427f795412787ac8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Jul 2008 05:16:08 +0000 Subject: [PATCH 317/430] track to would crash (with a C++ assert) if the source and target are in the same location, which I have had happen a few times while testing. --- .../gameengine/Ketsji/KX_TrackToActuator.cpp | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index b9792303565..731a610c2eb 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -224,7 +224,8 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) { KX_GameObject* curobj = (KX_GameObject*) GetParent(); MT_Vector3 dir = ((KX_GameObject*)m_object)->NodeGetWorldPosition() - curobj->NodeGetWorldPosition(); - dir.normalize(); + if (dir.length2()) + dir.normalize(); MT_Vector3 up(0,0,1); @@ -250,12 +251,12 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) #endif if (m_allow3D) { - up = (up - up.dot(dir) * dir).normalized(); + up = (up - up.dot(dir) * dir).safe_normalized(); } else { - dir = (dir - up.dot(dir)*up).normalized(); + dir = (dir - up.dot(dir)*up).safe_normalized(); } MT_Vector3 left; @@ -266,8 +267,8 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) case 0: // TRACK X { // (1.0 , 0.0 , 0.0 ) x direction is forward, z (0.0 , 0.0 , 1.0 ) up - left = dir.normalized(); - dir = (left.cross(up)).normalized(); + left = dir.safe_normalized(); + dir = (left.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -279,7 +280,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) case 1: // TRACK Y { // (0.0 , 1.0 , 0.0 ) y direction is forward, z (0.0 , 0.0 , 1.0 ) up - left = (dir.cross(up)).normalized(); + left = (dir.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -291,10 +292,10 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) case 2: // track Z { - left = up.normalized(); - up = dir.normalized(); + left = up.safe_normalized(); + up = dir.safe_normalized(); dir = left; - left = (dir.cross(up)).normalized(); + left = (dir.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -306,8 +307,8 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) case 3: // TRACK -X { // (1.0 , 0.0 , 0.0 ) x direction is forward, z (0.0 , 0.0 , 1.0 ) up - left = -dir.normalized(); - dir = -(left.cross(up)).normalized(); + left = -dir.safe_normalized(); + dir = -(left.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -319,7 +320,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) case 4: // TRACK -Y { // (0.0 , -1.0 , 0.0 ) -y direction is forward, z (0.0 , 0.0 , 1.0 ) up - left = (-dir.cross(up)).normalized(); + left = (-dir.cross(up)).safe_normalized(); mat.setValue ( left[0], -dir[0],up[0], left[1], -dir[1],up[1], @@ -329,10 +330,10 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) } case 5: // track -Z { - left = up.normalized(); - up = -dir.normalized(); + left = up.safe_normalized(); + up = -dir.safe_normalized(); dir = left; - left = (dir.cross(up)).normalized(); + left = (dir.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -345,8 +346,8 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) default: { // (1.0 , 0.0 , 0.0 ) -x direction is forward, z (0.0 , 0.0 , 1.0 ) up - left = -dir.normalized(); - dir = -(left.cross(up)).normalized(); + left = -dir.safe_normalized(); + dir = -(left.cross(up)).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], From 06ee2ed60e9ac8ebf205a665132484666dca232b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Jul 2008 06:44:34 +0000 Subject: [PATCH 318/430] let the logic buttons operate on objects in different scenes. They would already display but pressing the buttons did nothing. This is useful when using 1 scene for a character and another for a test level, so the character logic can be edited without switching scenes. --- source/blender/src/buttons_logic.c | 112 +++++++++++------------------ 1 file changed, 43 insertions(+), 69 deletions(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 4e5e8a605ee..5065ba1fc2a 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -387,7 +387,6 @@ void do_logic_buts(unsigned short event) bSensor *sens; bController *cont; bActuator *act; - Base *base; Object *ob; int didit, bit; @@ -443,16 +442,14 @@ void do_logic_buts(unsigned short event) break; case B_ADD_SENS: - base= FIRSTBASE; - while(base) { - if(base->object->scaflag & OB_ADDSENS) { - base->object->scaflag &= ~OB_ADDSENS; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + if(ob->scaflag & OB_ADDSENS) { + ob->scaflag &= ~OB_ADDSENS; sens= new_sensor(SENS_ALWAYS); - BLI_addtail(&(base->object->sensors), sens); + BLI_addtail(&(ob->sensors), sens); make_unique_prop_names(sens->name); - base->object->scaflag |= OB_SHOWSENS; + ob->scaflag |= OB_SHOWSENS; } - base= base->next; } BIF_undo_push("Add sensor"); @@ -460,9 +457,8 @@ void do_logic_buts(unsigned short event) break; case B_CHANGE_SENS: - base= FIRSTBASE; - while(base) { - sens= base->object->sensors.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + sens= ob->sensors.first; while(sens) { if(sens->type != sens->otype) { init_sensor(sens); @@ -471,43 +467,39 @@ void do_logic_buts(unsigned short event) } sens= sens->next; } - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); break; case B_DEL_SENS: - base= FIRSTBASE; - while(base) { - sens= base->object->sensors.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + sens= ob->sensors.first; while(sens) { if(sens->flag & SENS_DEL) { - BLI_remlink(&(base->object->sensors), sens); + BLI_remlink(&(ob->sensors), sens); free_sensor(sens); break; } sens= sens->next; } - base= base->next; } BIF_undo_push("Delete sensor"); allqueue(REDRAWBUTSLOGIC, 0); break; case B_ADD_CONT: - base= FIRSTBASE; - while(base) { - if(base->object->scaflag & OB_ADDCONT) { - base->object->scaflag &= ~OB_ADDCONT; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + if(ob->scaflag & OB_ADDCONT) { + ob->scaflag &= ~OB_ADDCONT; cont= new_controller(CONT_LOGIC_AND); make_unique_prop_names(cont->name); - base->object->scaflag |= OB_SHOWCONT; - BLI_addtail(&(base->object->controllers), cont); + ob->scaflag |= OB_SHOWCONT; + BLI_addtail(&(ob->controllers), cont); /* set the controller state mask from the current object state. A controller is always in a single state, so select the lowest bit set from the object state */ for (bit=0; bit<32; bit++) { - if (base->object->state & (1<state & (1<state_mask = (1<state_mask = 1; } } - base= base->next; } BIF_undo_push("Add controller"); allqueue(REDRAWBUTSLOGIC, 0); break; case B_SET_STATE_BIT: - base= FIRSTBASE; - while(base) { - if(base->object->scaflag & OB_SETSTBIT) { - base->object->scaflag &= ~OB_SETSTBIT; - base->object->state = 0x3FFFFFFF; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + if(ob->scaflag & OB_SETSTBIT) { + ob->scaflag &= ~OB_SETSTBIT; + ob->state = 0x3FFFFFFF; } - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); break; case B_INIT_STATE_BIT: - base= FIRSTBASE; - while(base) { - if(base->object->scaflag & OB_INITSTBIT) { - base->object->scaflag &= ~OB_INITSTBIT; - base->object->state = base->object->init_state; - if (!base->object->state) - base->object->state = 1; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + if(ob->scaflag & OB_INITSTBIT) { + ob->scaflag &= ~OB_INITSTBIT; + ob->state = ob->init_state; + if (!ob->state) + ob->state = 1; } - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); break; case B_CHANGE_CONT: - base= FIRSTBASE; - while(base) { - cont= base->object->controllers.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + cont= ob->controllers.first; while(cont) { if(cont->type != cont->otype) { init_controller(cont); @@ -560,51 +546,45 @@ void do_logic_buts(unsigned short event) } cont= cont->next; } - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); break; case B_DEL_CONT: - base= FIRSTBASE; - while(base) { - cont= base->object->controllers.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + cont= ob->controllers.first; while(cont) { if(cont->flag & CONT_DEL) { - BLI_remlink(&(base->object->controllers), cont); + BLI_remlink(&(ob->controllers), cont); unlink_controller(cont); free_controller(cont); break; } cont= cont->next; } - base= base->next; } BIF_undo_push("Delete controller"); allqueue(REDRAWBUTSLOGIC, 0); break; case B_ADD_ACT: - base= FIRSTBASE; - while(base) { - if(base->object->scaflag & OB_ADDACT) { - base->object->scaflag &= ~OB_ADDACT; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + if(ob->scaflag & OB_ADDACT) { + ob->scaflag &= ~OB_ADDACT; act= new_actuator(ACT_OBJECT); make_unique_prop_names(act->name); - BLI_addtail(&(base->object->actuators), act); - base->object->scaflag |= OB_SHOWACT; + BLI_addtail(&(ob->actuators), act); + ob->scaflag |= OB_SHOWACT; } - base= base->next; } BIF_undo_push("Add actuator"); allqueue(REDRAWBUTSLOGIC, 0); break; case B_CHANGE_ACT: - base= FIRSTBASE; - while(base) { - act= base->object->actuators.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + act= ob->actuators.first; while(act) { if(act->type != act->otype) { init_actuator(act); @@ -613,25 +593,22 @@ void do_logic_buts(unsigned short event) } act= act->next; } - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); break; case B_DEL_ACT: - base= FIRSTBASE; - while(base) { - act= base->object->actuators.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + act= ob->actuators.first; while(act) { if(act->flag & ACT_DEL) { - BLI_remlink(&(base->object->actuators), act); + BLI_remlink(&(ob->actuators), act); unlink_actuator(act); free_actuator(act); break; } act= act->next; } - base= base->next; } BIF_undo_push("Delete actuator"); allqueue(REDRAWBUTSLOGIC, 0); @@ -640,10 +617,8 @@ void do_logic_buts(unsigned short event) case B_SOUNDACT_BROWSE: /* since we don't know which... */ didit= 0; - base= FIRSTBASE; - while(base) - { - act= base->object->actuators.first; + for(ob=G.main->object.first; ob; ob=ob->id.next) { + act= ob->actuators.first; while(act) { if(act->type==ACT_SOUND) @@ -684,7 +659,6 @@ void do_logic_buts(unsigned short event) } if(didit) break; - base= base->next; } allqueue(REDRAWBUTSLOGIC, 0); allqueue(REDRAWSOUND, 0); From bc8364fef030d95f27cff5ae6e068cc78bd1abd5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Jul 2008 13:21:37 +0000 Subject: [PATCH 319/430] bugfix, ActionActuator was missing many checks for PyArg_ParseTuple failing. This meant an error in a script could be reported in a different line or script file which makes it quite hard to trace the problem. There were also places where invalid pointers could be used because of this. The whole game engine pyapi probably needs to have these checks added. --- .../Converter/BL_ActionActuator.cpp | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 5050da3fe7f..44f6ec1af90 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -641,6 +641,9 @@ PyObject* BL_ActionActuator::PySetAction(PyObject* self, m_blendframe = 0; } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -660,6 +663,9 @@ PyObject* BL_ActionActuator::PySetStart(PyObject* self, { m_startframe = start; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -679,6 +685,9 @@ PyObject* BL_ActionActuator::PySetEnd(PyObject* self, { m_endframe = end; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -699,6 +708,9 @@ PyObject* BL_ActionActuator::PySetBlendin(PyObject* self, { m_blendin = blendin; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -724,6 +736,9 @@ PyObject* BL_ActionActuator::PySetBlendtime(PyObject* self, if (m_blendframe>m_blendin) m_blendframe = m_blendin; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -745,6 +760,9 @@ PyObject* BL_ActionActuator::PySetPriority(PyObject* self, { m_priority = priority; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -768,6 +786,9 @@ PyObject* BL_ActionActuator::PySetFrame(PyObject* self, else if (m_localtime>m_endframe) m_localtime=m_endframe; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -788,6 +809,9 @@ PyObject* BL_ActionActuator::PySetProperty(PyObject* self, { m_propname = string; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -807,6 +831,9 @@ PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* self, { m_framepropname = string; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -822,6 +849,9 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* self, { m_propname = string; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -846,7 +876,8 @@ PyObject* BL_ActionActuator::PySetChannel(PyObject* self, int row,col; int mode = 0; /* 0 for bone space, 1 for armature/world space */ - PyArg_ParseTuple(args,"sO|i", &string, &pylist, &mode); + if (!PyArg_ParseTuple(args,"sO|i", &string, &pylist, &mode)) + return NULL; if (pylist->ob_type == &CListValue::Type) { From b0958b6646b3b1fa8127f7620ce00e63ff82d0e7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Jul 2008 16:43:46 +0000 Subject: [PATCH 320/430] Checked all cases where PyArg_ParseTuple is used in blenders game engine and made sure all will raise errors when called with invalid args. --- .../Converter/BL_ShapeActionActuator.cpp | 24 +++++++ source/gameengine/Ketsji/BL_Shader.cpp | 2 +- .../KXNetwork/KX_NetworkMessageActuator.cpp | 14 ++++- .../KXNetwork/KX_NetworkMessageSensor.cpp | 3 + source/gameengine/Ketsji/KX_Camera.cpp | 8 ++- source/gameengine/Ketsji/KX_GameObject.cpp | 9 ++- source/gameengine/Ketsji/KX_MeshProxy.cpp | 12 ++++ .../Ketsji/KX_PhysicsObjectWrapper.cpp | 12 ++++ .../Ketsji/KX_PyConstraintBinding.cpp | 63 ++++++++++++++++++- source/gameengine/Ketsji/KX_PythonInit.cpp | 20 +++++- .../gameengine/Ketsji/KX_VehicleWrapper.cpp | 33 ++++++++-- 11 files changed, 187 insertions(+), 13 deletions(-) diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index 58d46d76e5b..7196b393ed4 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -604,6 +604,9 @@ PyObject* BL_ShapeActionActuator::PySetAction(PyObject* self, m_blendframe = 0.f; } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -623,6 +626,9 @@ PyObject* BL_ShapeActionActuator::PySetStart(PyObject* self, { m_startframe = start; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -642,6 +648,9 @@ PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* self, { m_endframe = end; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -662,6 +671,9 @@ PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* self, { m_blendin = blendin; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -687,6 +699,9 @@ PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* self, if (m_blendframe>m_blendin) m_blendframe = m_blendin; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -708,6 +723,9 @@ PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* self, { m_priority = priority; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -731,6 +749,9 @@ PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* self, else if (m_localtime>m_endframe) m_localtime=m_endframe; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; @@ -751,6 +772,9 @@ PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* self, { m_propname = string; } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index 15350db6650..f6f9a29b0e2 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -812,7 +812,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSource," setSource(vertexProgram, fragmentProg mUse = 0; Py_Return; } - Py_Return; + return NULL; } diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp index 3ade810c394..85921ae75ca 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp @@ -158,6 +158,9 @@ PyObject* KX_NetworkMessageActuator::PySetToPropName( if (PyArg_ParseTuple(args, "s", &ToPropName)) { m_toPropName = ToPropName; } + else { + return NULL; + } Py_Return; } @@ -173,7 +176,10 @@ PyObject* KX_NetworkMessageActuator::PySetSubject( if (PyArg_ParseTuple(args, "s", &Subject)) { m_subject = Subject; } - + else { + return NULL; + } + Py_Return; } @@ -188,6 +194,9 @@ PyObject* KX_NetworkMessageActuator::PySetBodyType( if (PyArg_ParseTuple(args, "i", &BodyType)) { m_bodyType = BodyType; } + else { + return NULL; + } Py_Return; } @@ -203,6 +212,9 @@ PyObject* KX_NetworkMessageActuator::PySetBody( if (PyArg_ParseTuple(args, "s", &Body)) { m_body = Body; } + else { + return NULL; + } Py_Return; } diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index 027cb2a0ffa..0c66ac1fde3 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -233,6 +233,9 @@ PyObject* KX_NetworkMessageSensor::PySetSubjectFilterText( { m_subject = Subject; } + else { + return NULL; + } Py_Return; } diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 27e47d72bbe..3830d422138 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -588,7 +588,7 @@ KX_PYMETHODDEF_DOC(KX_Camera, sphereInsideFrustum, PyErr_SetString(PyExc_TypeError, "sphereInsideFrustum: Expected arguments: (center, radius)"); - Py_Return; + return NULL; } KX_PYMETHODDEF_DOC(KX_Camera, boxInsideFrustum, @@ -766,6 +766,10 @@ KX_PYMETHODDEF_DOC(KX_Camera, enableViewport, else EnableViewport(false); } + else { + return NULL; + } + Py_Return; } @@ -777,6 +781,8 @@ KX_PYMETHODDEF_DOC(KX_Camera, setViewport, if (PyArg_ParseTuple(args,"iiii",&left, &bottom, &right, &top)) { SetViewport(left, bottom, right, top); + } else { + return NULL; } Py_Return; } diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index b7750e68e8f..ee8161702e1 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1168,6 +1168,9 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* self, if (pypos) PyVecTo(pypos, point); } + else { + return NULL; + } if (m_pPhysicsController1) { @@ -1256,6 +1259,10 @@ PyObject* KX_GameObject::PySetParent(PyObject* self, this->SetParent(scene, obj); } + else { + return NULL; + } + Py_Return; } @@ -1282,7 +1289,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, return meshproxy; } } - Py_Return; + return NULL; } diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 5c8fef1fca0..c7a251751cd 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -157,6 +157,9 @@ PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* self, { matname = m_meshobj->GetMaterialName(matid); } + else { + return NULL; + } return PyString_FromString(matname.Ptr()); @@ -174,6 +177,9 @@ PyObject* KX_MeshProxy::PyGetTextureName(PyObject* self, { matname = m_meshobj->GetTextureName(matid); } + else { + return NULL; + } return PyString_FromString(matname.Ptr()); @@ -195,6 +201,9 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* self, length = m_meshobj->GetVertexArrayLength(mat); } } + else { + return NULL; + } return PyInt_FromLong(length); @@ -217,6 +226,9 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* self, vertexob = new KX_VertexProxy(this, vertex); } } + else { + return NULL; + } return vertexob; diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp index 27cfaefc076..2df4c6a9980 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp @@ -58,6 +58,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* self, { m_ctrl->setPosition(x,y,z); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -72,6 +75,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* self, { m_ctrl->SetLinearVelocity(x,y,z,local != 0); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -85,6 +91,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* self, { m_ctrl->SetAngularVelocity(x,y,z,local != 0); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -97,6 +106,9 @@ PyObject* KX_PhysicsObjectWrapper::PySetActive(PyObject* self, { m_ctrl->SetActive(active!=0); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp index 172882ff18d..c01d6a632a3 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp @@ -82,12 +82,15 @@ static PyObject* gPySetGravity(PyObject* self, PyObject* kwds) { float x,y,z; - int len = PyTuple_Size(args); - if ((len == 3) && PyArg_ParseTuple(args,"fff",&x,&y,&z)) + if (PyArg_ParseTuple(args,"fff",&x,&y,&z)) { if (PHY_GetActiveEnvironment()) PHY_GetActiveEnvironment()->setGravity(x,y,z); } + else { + return NULL; + } + Py_INCREF(Py_None); return Py_None; } @@ -105,6 +108,10 @@ static PyObject* gPySetDebugMode(PyObject* self, } } + else { + return NULL; + } + Py_INCREF(Py_None); return Py_None; } @@ -122,6 +129,9 @@ static PyObject* gPySetNumTimeSubSteps(PyObject* self, PHY_GetActiveEnvironment()->setNumTimeSubSteps(substep); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -138,6 +148,9 @@ static PyObject* gPySetNumIterations(PyObject* self, PHY_GetActiveEnvironment()->setNumIterations(iter); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -155,6 +168,9 @@ static PyObject* gPySetDeactivationTime(PyObject* self, PHY_GetActiveEnvironment()->setDeactivationTime(deactive_time); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -171,6 +187,9 @@ static PyObject* gPySetDeactivationLinearTreshold(PyObject* self, PHY_GetActiveEnvironment()->setDeactivationLinearTreshold( linearDeactivationTreshold); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -187,6 +206,9 @@ static PyObject* gPySetDeactivationAngularTreshold(PyObject* self, PHY_GetActiveEnvironment()->setDeactivationAngularTreshold( angularDeactivationTreshold); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -202,6 +224,9 @@ static PyObject* gPySetContactBreakingTreshold(PyObject* self, PHY_GetActiveEnvironment()->setContactBreakingTreshold( contactBreakingTreshold); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -218,6 +243,9 @@ static PyObject* gPySetCcdMode(PyObject* self, PHY_GetActiveEnvironment()->setCcdMode( ccdMode); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -233,6 +261,9 @@ static PyObject* gPySetSorConstant(PyObject* self, PHY_GetActiveEnvironment()->setSolverSorConstant( sor); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -248,6 +279,9 @@ static PyObject* gPySetSolverTau(PyObject* self, PHY_GetActiveEnvironment()->setSolverTau( tau); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -264,6 +298,9 @@ static PyObject* gPySetSolverDamping(PyObject* self, PHY_GetActiveEnvironment()->setSolverDamping( damping); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -279,6 +316,9 @@ static PyObject* gPySetLinearAirDamping(PyObject* self, PHY_GetActiveEnvironment()->setLinearAirDamping( damping); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -295,6 +335,9 @@ static PyObject* gPySetUseEpa(PyObject* self, PHY_GetActiveEnvironment()->setUseEpa(epa); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } static PyObject* gPySetSolverType(PyObject* self, @@ -309,6 +352,9 @@ static PyObject* gPySetSolverType(PyObject* self, PHY_GetActiveEnvironment()->setSolverType(solverType); } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -338,6 +384,9 @@ static PyObject* gPyGetVehicleConstraint(PyObject* self, } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -395,6 +444,9 @@ static PyObject* gPyCreateConstraint(PyObject* self, } } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -421,6 +473,9 @@ static PyObject* gPyGetAppliedImpulse(PyObject* self, appliedImpulse = PHY_GetActiveEnvironment()->getAppliedImpulse(constraintid); } } + else { + return NULL; + } return PyFloat_FromDouble(appliedImpulse); } @@ -443,6 +498,10 @@ static PyObject* gPyRemoveConstraint(PyObject* self, PHY_GetActiveEnvironment()->removeConstraint(constraintid); } } + else { + return NULL; + } + Py_INCREF(Py_None); return Py_None; } diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 0831788009d..47f5577552f 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -425,7 +425,7 @@ static PyObject* gPyEnableVisibility(PyObject*, } else { - Py_Return; + return NULL; } Py_Return; } @@ -449,6 +449,9 @@ static PyObject* gPyShowMouse(PyObject*, gp_Canvas->SetMouseState(RAS_ICanvas::MOUSE_INVISIBLE); } } + else { + return NULL; + } Py_Return; } @@ -465,6 +468,9 @@ static PyObject* gPySetMousePosition(PyObject*, if (gp_Canvas) gp_Canvas->SetMousePosition(x,y); } + else { + return NULL; + } Py_Return; } @@ -568,6 +574,9 @@ static PyObject* gPySetMistStart(PyObject*, gp_Rasterizer->SetFogStart(miststart); } } + else { + return NULL; + } Py_Return; } @@ -586,6 +595,9 @@ static PyObject* gPySetMistEnd(PyObject*, gp_Rasterizer->SetFogEnd(mistend); } } + else { + return NULL; + } Py_Return; } @@ -623,6 +635,9 @@ static PyObject* gPyMakeScreenshot(PyObject*, gp_Canvas->MakeScreenShot(filename); } } + else { + return NULL; + } Py_Return; } @@ -638,6 +653,9 @@ static PyObject* gPyEnableMotionBlur(PyObject*, gp_Rasterizer->EnableMotionBlur(motionblurvalue); } } + else { + return NULL; + } Py_Return; } diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp index fba2ecc223b..7e8160a4d67 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp @@ -68,6 +68,8 @@ PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* self, printf("attempt for addWheel: suspensionRestLength%f wheelRadius %f, hasSteering:%d\n",suspensionRestLength,wheelRadius,hasSteering); m_vehicle->AddWheel(motionState,aPos,aDir,aAxle,suspensionRestLength,wheelRadius,hasSteering); + } else { + return NULL; } Py_INCREF(Py_None); return Py_None; @@ -90,8 +92,7 @@ PyObject* KX_VehicleWrapper::PyGetWheelPosition(PyObject* self, MT_Vector3 pos(position[0],position[1],position[2]); return PyObjectFrom(pos); } - Py_INCREF(Py_None); - return Py_None; + return NULL; } PyObject* KX_VehicleWrapper::PyGetWheelRotation(PyObject* self, @@ -103,8 +104,7 @@ PyObject* KX_VehicleWrapper::PyGetWheelRotation(PyObject* self, { return PyFloat_FromDouble(m_vehicle->GetWheelRotation(wheelIndex)); } - Py_INCREF(Py_None); - return Py_None; + return NULL; } PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* self, @@ -120,8 +120,7 @@ PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* self, MT_Matrix3x3 ornmat(quatorn); return PyObjectFrom(ornmat); } - Py_INCREF(Py_None); - return Py_None; + return NULL; } @@ -155,6 +154,9 @@ PyObject* KX_VehicleWrapper::PyApplyEngineForce(PyObject* self, force *= -1.f;//someone reverse some conventions inside Bullet (axle winding) m_vehicle->ApplyEngineForce(force,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -170,6 +172,9 @@ PyObject* KX_VehicleWrapper::PySetTyreFriction(PyObject* self, { m_vehicle->SetWheelFriction(wheelFriction,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -185,6 +190,9 @@ PyObject* KX_VehicleWrapper::PySetSuspensionStiffness(PyObject* self, { m_vehicle->SetSuspensionStiffness(suspensionStiffness,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -199,6 +207,8 @@ PyObject* KX_VehicleWrapper::PySetSuspensionDamping(PyObject* self, if (PyArg_ParseTuple(args,"fi",&suspensionDamping,&wheelIndex)) { m_vehicle->SetSuspensionDamping(suspensionDamping,wheelIndex); + } else { + return NULL; } Py_INCREF(Py_None); return Py_None; @@ -214,6 +224,8 @@ PyObject* KX_VehicleWrapper::PySetSuspensionCompression(PyObject* self, if (PyArg_ParseTuple(args,"fi",&suspensionCompression,&wheelIndex)) { m_vehicle->SetSuspensionCompression(suspensionCompression,wheelIndex); + } else { + return NULL; } Py_INCREF(Py_None); return Py_None; @@ -230,6 +242,9 @@ PyObject* KX_VehicleWrapper::PySetRollInfluence(PyObject* self, { m_vehicle->SetRollInfluence(rollInfluence,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -246,6 +261,9 @@ PyObject* KX_VehicleWrapper::PyApplyBraking(PyObject* self, { m_vehicle->ApplyBraking(braking,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } @@ -264,6 +282,9 @@ PyObject* KX_VehicleWrapper::PySetSteeringValue(PyObject* self, { m_vehicle->SetSteeringValue(steeringValue,wheelIndex); } + else { + return NULL; + } Py_INCREF(Py_None); return Py_None; } From ffb07fcfb3dc1228b0bdc411c286a1244daeed26 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 2 Jul 2008 12:16:36 +0000 Subject: [PATCH 321/430] soc-2008-mxcurioni: renamed libQGLWidget's Camera class to AppGLWidget_Camera to use Blender's Camera struct, integrated the camera parameters from Blender. Perspective projection (precisely field of view) is now correct. Orthographic projection still having issues. --- .../intern/app_blender/AppGLWidget.cpp | 2 +- .../intern/app_blender/AppGLWidget.h | 2 +- .../intern/app_blender/AppGLWidget_camera.cpp | 152 +++++++++--------- .../intern/app_blender/AppGLWidget_camera.h | 10 +- .../app_blender/AppGLWidget_constraint.h | 8 +- .../AppGLWidget_manipulatedCameraFrame.cpp | 4 +- .../AppGLWidget_manipulatedCameraFrame.h | 6 +- .../AppGLWidget_manipulatedFrame.cpp | 2 +- .../AppGLWidget_manipulatedFrame.h | 2 +- .../freestyle/intern/app_blender/api.cpp | 19 ++- 10 files changed, 110 insertions(+), 97 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 34a96681c50..2b43b2b9a0c 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -58,7 +58,7 @@ bool AppGLWidget::_backBufferFlag = true; AppGLWidget::AppGLWidget(const char *iName) { //soc - _camera = new Camera; + _camera = new AppGLWidget_Camera; _Fovy = 30.f; //_SceneDepth = 2.f; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 175eb67ba69..bc18be00a31 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -90,7 +90,7 @@ public: void setStateFileName(const string& name); - Camera * _camera; + AppGLWidget_Camera * _camera; protected: unsigned int _width, _height; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp index 23c3b2f09a4..26f2e024cd8 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.cpp @@ -36,7 +36,7 @@ using namespace std; See IODistance(), physicalDistanceToScreen(), physicalScreenWidth() and focusDistance() documentations for default stereo parameter values. */ -Camera::Camera() +AppGLWidget_Camera::AppGLWidget_Camera() : fieldOfView_(M_PI/4.0f) { // #CONNECTION# Camera copy constructor @@ -85,7 +85,7 @@ Camera::Camera() The frame() is deleted, but the different keyFrameInterpolator() are \e not deleted (in case they are shared). */ -Camera::~Camera() +AppGLWidget_Camera::~AppGLWidget_Camera() { delete frame_; //delete interpolationKfi_; @@ -93,7 +93,7 @@ Camera::~Camera() /*! Copy constructor. Performs a deep copy using operator=(). */ -Camera::Camera(const Camera& camera) +AppGLWidget_Camera::AppGLWidget_Camera(const AppGLWidget_Camera& camera) { // #CONNECTION# Camera constructor //interpolationKfi_ = new KeyFrameInterpolator; @@ -122,7 +122,7 @@ Camera::Camera(const Camera& camera) camera()->setScreenWidthAndHeight(width(), height()); \endcode The same applies to sceneCenter() and sceneRadius(), if needed. */ -Camera& Camera::operator=(const Camera& camera) +AppGLWidget_Camera& AppGLWidget_Camera::operator=(const AppGLWidget_Camera& camera) { setScreenWidthAndHeight(camera.screenWidth(), camera.screenHeight()); setFieldOfView(camera.fieldOfView()); @@ -164,7 +164,7 @@ Non-positive dimension are silently replaced by a 1 pixel value to ensure frustr If your Camera is used without a QGLViewer (offscreen rendering, shadow maps), use setAspectRatio() instead to define the projection matrix. */ -void Camera::setScreenWidthAndHeight(int width, int height) +void AppGLWidget_Camera::setScreenWidthAndHeight(int width, int height) { // Prevent negative and zero dimensions that would cause divisions by zero. screenWidth_ = width > 0 ? width : 1; @@ -208,7 +208,7 @@ void Camera::setScreenWidthAndHeight(int width, int height) \attention The value is always positive although the clipping plane is positioned at a negative z value in the Camera coordinate system. This follows the \c gluPerspective standard. */ -float Camera::zNear() const +float AppGLWidget_Camera::zNear() const { float z = distanceToSceneCenter() - zClippingCoefficient()*sceneRadius(); @@ -217,8 +217,8 @@ float Camera::zNear() const if (z < zMin) switch (type()) { - case Camera::PERSPECTIVE : z = zMin; break; - case Camera::ORTHOGRAPHIC : z = 0.0; break; + case AppGLWidget_Camera::PERSPECTIVE : z = zMin; break; + case AppGLWidget_Camera::ORTHOGRAPHIC : z = 0.0; break; } return z; } @@ -232,7 +232,7 @@ zFar = distanceToSceneCenter() + zClippingCoefficient()*sceneRadius(); \endcode See the zNear() documentation for details. */ -float Camera::zFar() const +float AppGLWidget_Camera::zFar() const { return distanceToSceneCenter() + zClippingCoefficient()*sceneRadius(); } @@ -241,12 +241,12 @@ float Camera::zFar() const Prefix the type with Camera, as in: \code camera()->setType(Camera::ORTHOGRAPHIC); // or even qglviewer::Camera::ORTHOGRAPHIC if you do not use namespace \endcode */ -void Camera::setType(Type type) +void AppGLWidget_Camera::setType(Type type) { // make ORTHOGRAPHIC frustum fit PERSPECTIVE (at least in plane normal to viewDirection(), passing // through RAP) Done only when CHANGING type since orthoCoef_ may have been changed with a // setRevolveAroundPoint() in the meantime. - if ( (type == Camera::ORTHOGRAPHIC) && (type_ == Camera::PERSPECTIVE) ) + if ( (type == AppGLWidget_Camera::ORTHOGRAPHIC) && (type_ == AppGLWidget_Camera::PERSPECTIVE) ) orthoCoef_ = tan(fieldOfView()/2.0); type_ = type; } @@ -264,7 +264,7 @@ use an instance of your new class to move the Camera. A \c NULL \p mcf pointer will silently be ignored. The calling method is responsible for deleting the previous frame() pointer if needed in order to prevent memory leaks. */ -void Camera::setFrame(ManipulatedCameraFrame* const mcf) +void AppGLWidget_Camera::setFrame(ManipulatedCameraFrame* const mcf) { if (!mcf) return; @@ -275,7 +275,7 @@ void Camera::setFrame(ManipulatedCameraFrame* const mcf) /*! Returns the distance from the Camera center to sceneCenter(), projected along the Camera Z axis. Used by zNear() and zFar() to optimize the Z range. */ -float Camera::distanceToSceneCenter() const +float AppGLWidget_Camera::distanceToSceneCenter() const { return fabs((frame()->coordinatesOf(sceneCenter())).z); } @@ -296,7 +296,7 @@ float Camera::distanceToSceneCenter() const Overload this method to change this behavior if desired, as is done in the
    standardCamera example. */ -void Camera::getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight) const +void AppGLWidget_Camera::getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight) const { const float dist = orthoCoef_ * fabs(cameraCoordinatesOf(revolveAroundPoint()).z); //#CONNECTION# fitScreenRegion @@ -322,14 +322,14 @@ void Camera::getOrthoWidthHeight(GLdouble& halfWidth, GLdouble& halfHeight) cons \note You must call this method if your Camera is not associated with a QGLViewer and is used for offscreen computations (using (un)projectedCoordinatesOf() for instance). loadProjectionMatrix() does it otherwise. */ -void Camera::computeProjectionMatrix() const +void AppGLWidget_Camera::computeProjectionMatrix() const { const float ZNear = zNear(); const float ZFar = zFar(); switch (type()) { - case Camera::PERSPECTIVE: + case AppGLWidget_Camera::PERSPECTIVE: { // #CONNECTION# all non null coefficients were set to 0.0 in constructor. const float f = 1.0/tan(fieldOfView()/2.0); @@ -342,7 +342,7 @@ void Camera::computeProjectionMatrix() const // same as gluPerspective( 180.0*fieldOfView()/M_PI, aspectRatio(), zNear(), zFar() ); break; } - case Camera::ORTHOGRAPHIC: + case AppGLWidget_Camera::ORTHOGRAPHIC: { GLdouble w, h; getOrthoWidthHeight(w,h); @@ -368,7 +368,7 @@ void Camera::computeProjectionMatrix() const \note You must call this method if your Camera is not associated with a QGLViewer and is used for offscreen computations (using (un)projectedCoordinatesOf() for instance). loadModelViewMatrix() does it otherwise. */ -void Camera::computeModelViewMatrix() const +void AppGLWidget_Camera::computeModelViewMatrix() const { const Quaternion q = frame()->orientation(); @@ -427,7 +427,7 @@ void Camera::computeModelViewMatrix() const \attention If you use several OpenGL contexts and bypass the Qt main refresh loop, you should call QGLWidget::makeCurrent() before this method in order to activate the right OpenGL context. */ -void Camera::loadProjectionMatrix(bool reset) const +void AppGLWidget_Camera::loadProjectionMatrix(bool reset) const { // WARNING: makeCurrent must be called by every calling method glMatrixMode(GL_PROJECTION); @@ -464,7 +464,7 @@ void Camera::loadProjectionMatrix(bool reset) const \attention If you use several OpenGL contexts and bypass the Qt main refresh loop, you should call QGLWidget::makeCurrent() before this method in order to activate the right OpenGL context. */ -void Camera::loadModelViewMatrix(bool reset) const +void AppGLWidget_Camera::loadModelViewMatrix(bool reset) const { // WARNING: makeCurrent must be called by every calling method glMatrixMode(GL_MODELVIEW); @@ -500,7 +500,7 @@ void Camera::loadModelViewMatrix(bool reset) const Note that getProjectionMatrix() always returns the mono-vision matrix. \attention glMatrixMode is set to \c GL_PROJECTION. */ -void Camera::loadProjectionMatrixStereo(bool leftBuffer) const +void AppGLWidget_Camera::loadProjectionMatrixStereo(bool leftBuffer) const { float left, right, bottom, top; float screenHalfWidth, halfWidth, side, shift, delta; @@ -510,7 +510,7 @@ void Camera::loadProjectionMatrixStereo(bool leftBuffer) const switch (type()) { - case Camera::PERSPECTIVE: + case AppGLWidget_Camera::PERSPECTIVE: // compute half width of screen, // corresponding to zero parallax plane to deduce decay of cameras screenHalfWidth = focusDistance() * tan(horizontalFieldOfView() / 2.0); @@ -531,8 +531,8 @@ void Camera::loadProjectionMatrixStereo(bool leftBuffer) const glFrustum(left, right, bottom, top, zNear(), zFar() ); break; - case Camera::ORTHOGRAPHIC: - cout << "Camera::setProjectionMatrixStereo: Stereo not available with Ortho mode"; + case AppGLWidget_Camera::ORTHOGRAPHIC: + cout << "AppGLWidget_Camera::setProjectionMatrixStereo: Stereo not available with Ortho mode"; break; } } @@ -555,7 +555,7 @@ void Camera::loadProjectionMatrixStereo(bool leftBuffer) const href="../examples/contribs.html#anaglyph">anaglyph examples for an illustration. \attention glMatrixMode is set to \c GL_MODELVIEW. */ -void Camera::loadModelViewMatrixStereo(bool leftBuffer) const +void AppGLWidget_Camera::loadModelViewMatrixStereo(bool leftBuffer) const { // WARNING: makeCurrent must be called by every calling method glMatrixMode(GL_MODELVIEW); @@ -585,7 +585,7 @@ void Camera::loadModelViewMatrixStereo(bool leftBuffer) const man page for details). See also getModelViewMatrix() and setFromProjectionMatrix(). */ -void Camera::getProjectionMatrix(GLdouble m[16]) const +void AppGLWidget_Camera::getProjectionMatrix(GLdouble m[16]) const { // May not be needed, but easier and more robust like this. computeProjectionMatrix(); @@ -607,7 +607,7 @@ void Camera::getProjectionMatrix(GLdouble m[16]) const man page for details). See also getProjectionMatrix() and setFromModelViewMatrix(). */ -void Camera::getModelViewMatrix(GLdouble m[16]) const +void AppGLWidget_Camera::getModelViewMatrix(GLdouble m[16]) const { // May not be needed, but easier like this. // Prevents from retrieving matrix in stereo mode -> overwrites shifted value. @@ -619,7 +619,7 @@ void Camera::getModelViewMatrix(GLdouble m[16]) const /*! Fills \p m with the product of the ModelView and Projection matrices. Calls getModelViewMatrix() and getProjectionMatrix() and then fills \p m with the product of these two matrices. */ -void Camera::getModelViewProjectionMatrix(GLdouble m[16]) const +void AppGLWidget_Camera::getModelViewProjectionMatrix(GLdouble m[16]) const { GLdouble mv[16]; GLdouble proj[16]; @@ -639,18 +639,18 @@ void Camera::getModelViewProjectionMatrix(GLdouble m[16]) const } #ifndef DOXYGEN -void Camera::getProjectionMatrix(GLfloat m[16]) const +void AppGLWidget_Camera::getProjectionMatrix(GLfloat m[16]) const { - cout << "Warning : Camera::getProjectionMatrix requires a GLdouble matrix array"; + cout << "Warning : AppGLWidget_Camera::getProjectionMatrix requires a GLdouble matrix array"; static GLdouble mat[16]; getProjectionMatrix(mat); for (int i=0; i<16; ++i) m[i] = float(mat[i]); } -void Camera::getModelViewMatrix(GLfloat m[16]) const +void AppGLWidget_Camera::getModelViewMatrix(GLfloat m[16]) const { - cout << "Warning : Camera::getModelViewMatrix requires a GLdouble matrix array"; + cout << "Warning : AppGLWidget_Camera::getModelViewMatrix requires a GLdouble matrix array"; static GLdouble mat[16]; getModelViewMatrix(mat); for (int i=0; i<16; ++i) @@ -662,7 +662,7 @@ void Camera::getModelViewMatrix(GLfloat m[16]) const \attention This methods also sets focusDistance() to sceneRadius() / tan(fieldOfView()/2) and flySpeed() to 1% of sceneRadius(). */ -void Camera::setSceneRadius(float radius) +void AppGLWidget_Camera::setSceneRadius(float radius) { if (radius <= 0.0) { @@ -679,7 +679,7 @@ void Camera::setSceneRadius(float radius) /*! Similar to setSceneRadius() and setSceneCenter(), but the scene limits are defined by a (world axis aligned) bounding box. */ -void Camera::setSceneBoundingBox(const Vec& min, const Vec& max) +void AppGLWidget_Camera::setSceneBoundingBox(const Vec& min, const Vec& max) { setSceneCenter((min+max)/2.0); setSceneRadius(0.5*(max-min).norm()); @@ -689,7 +689,7 @@ void Camera::setSceneBoundingBox(const Vec& min, const Vec& max) /*! Sets the sceneCenter(). \attention This method also sets the revolveAroundPoint() to sceneCenter(). */ -void Camera::setSceneCenter(const Vec& center) +void AppGLWidget_Camera::setSceneCenter(const Vec& center) { sceneCenter_ = center; setRevolveAroundPoint(sceneCenter()); @@ -700,7 +700,7 @@ void Camera::setSceneCenter(const Vec& center) Returns \c true if a pointUnderPixel() was found and sceneCenter() was actually changed. See also setRevolveAroundPointFromPixel(). See the pointUnderPixel() documentation. */ -bool Camera::setSceneCenterFromPixel(const Point& pixel) +bool AppGLWidget_Camera::setSceneCenterFromPixel(const Point& pixel) { bool found; Vec point = pointUnderPixel(pixel, found); @@ -710,7 +710,7 @@ bool Camera::setSceneCenterFromPixel(const Point& pixel) } /*! Changes the revolveAroundPoint() to \p rap (defined in the world coordinate system). */ -void Camera::setRevolveAroundPoint(const Vec& rap) +void AppGLWidget_Camera::setRevolveAroundPoint(const Vec& rap) { const float prevDist = fabs(cameraCoordinatesOf(revolveAroundPoint()).z); @@ -733,7 +733,7 @@ revolveAroundPoint() is left unchanged. pointUnderPixel(). See also setSceneCenterFromPixel(). */ -bool Camera::setRevolveAroundPointFromPixel(const Point& pixel) +bool AppGLWidget_Camera::setRevolveAroundPointFromPixel(const Point& pixel) { bool found; Vec point = pointUnderPixel(pixel, found); @@ -756,13 +756,13 @@ bool Camera::setRevolveAroundPointFromPixel(const Point& pixel) glVertex3fv(sceneCenter() + 20 * pixelGLRatio(sceneCenter()) * camera()->upVector()); glEnd(); \endcode */ -float Camera::pixelGLRatio(const Vec& position) const +float AppGLWidget_Camera::pixelGLRatio(const Vec& position) const { switch (type()) { - case Camera::PERSPECTIVE : + case AppGLWidget_Camera::PERSPECTIVE : return 2.0 * fabs((frame()->coordinatesOf(position)).z) * tan(fieldOfView()/2.0) / screenHeight(); - case Camera::ORTHOGRAPHIC : + case AppGLWidget_Camera::ORTHOGRAPHIC : { GLdouble w, h; getOrthoWidthHeight(w,h); @@ -798,7 +798,7 @@ float Camera::pixelGLRatio(const Vec& position) const \attention The fieldOfView() is clamped to M_PI/2.0. This happens when the Camera is at a distance lower than sqrt(2.0) * sceneRadius() from the sceneCenter(). It optimizes the shadow map resolution, although it may miss some parts of the scene. */ -void Camera::setFOVToFitScene() +void AppGLWidget_Camera::setFOVToFitScene() { if (distanceToSceneCenter() > sqrt(2.0)*sceneRadius()) setFieldOfView(2.0 * asin(sceneRadius() / distanceToSceneCenter())); @@ -908,7 +908,7 @@ void Camera::setFOVToFitScene() \note The precision of the z-Buffer highly depends on how the zNear() and zFar() values are fitted to your scene. Loose boundaries will result in imprecision along the viewing direction. */ -Vec Camera::pointUnderPixel(const Point& pixel, bool& found) const +Vec AppGLWidget_Camera::pointUnderPixel(const Point& pixel, bool& found) const { float depth; // Qt uses upper corner for its origin while GL uses the lower corner. @@ -924,7 +924,7 @@ Vec Camera::pointUnderPixel(const Point& pixel, bool& found) const Simply calls fitSphere() on a sphere defined by sceneCenter() and sceneRadius(). You will typically use this method in QGLViewer::init() after you defined a new sceneRadius(). */ -void Camera::showEntireScene() +void AppGLWidget_Camera::showEntireScene() { fitSphere(sceneCenter(), sceneRadius()); } @@ -934,7 +934,7 @@ void Camera::showEntireScene() Simply projects the current position on a line passing through sceneCenter(). See also showEntireScene().*/ -void Camera::centerScene() +void AppGLWidget_Camera::centerScene() { frame()->projectOnLine(sceneCenter(), viewDirection()); } @@ -945,7 +945,7 @@ void Camera::centerScene() The Camera position() is not modified. Simply setViewDirection(). See also setUpVector(), setOrientation(), showEntireScene(), fitSphere() and fitBoundingBox(). */ -void Camera::lookAt(const Vec& target) +void AppGLWidget_Camera::lookAt(const Vec& target) { setViewDirection(target - position()); } @@ -957,19 +957,19 @@ void Camera::lookAt(const Vec& target) You should therefore orientate the Camera before you call this method. See lookAt(), setOrientation() and setUpVector(). */ -void Camera::fitSphere(const Vec& center, float radius) +void AppGLWidget_Camera::fitSphere(const Vec& center, float radius) { float distance = 0.0f; switch (type()) { - case Camera::PERSPECTIVE : + case AppGLWidget_Camera::PERSPECTIVE : { const float yview = radius / sin(fieldOfView()/2.0); const float xview = radius / sin(horizontalFieldOfView()/2.0); distance = qMax(xview,yview); break; } - case Camera::ORTHOGRAPHIC : + case AppGLWidget_Camera::ORTHOGRAPHIC : { distance = ((center-revolveAroundPoint()) * viewDirection()) + (radius / orthoCoef_); break; @@ -981,7 +981,7 @@ void Camera::fitSphere(const Vec& center, float radius) /*! Moves the Camera so that the (world axis aligned) bounding box (\p min, \p max) is entirely visible, using fitSphere(). */ -void Camera::fitBoundingBox(const Vec& min, const Vec& max) +void AppGLWidget_Camera::fitBoundingBox(const Vec& min, const Vec& max) { float diameter = qMax(fabs(max[1]-min[1]), fabs(max[0]-min[0])); diameter = qMax(fabsf(max[2]-min[2]), diameter); @@ -1001,7 +1001,7 @@ void Camera::fitBoundingBox(const Vec& min, const Vec& max) When \p noMove is \c true (default), the Camera position() is left unchanged, which is an intuitive behavior when the Camera is in a walkthrough fly mode (see the QGLViewer::MOVE_FORWARD and QGLViewer::MOVE_BACKWARD QGLViewer::MouseAction). */ -void Camera::setUpVector(const Vec& up, bool noMove) +void AppGLWidget_Camera::setUpVector(const Vec& up, bool noMove) { Quaternion q(Vec(0.0, 1.0, 0.0), frame()->transformOf(up)); @@ -1025,7 +1025,7 @@ void Camera::setUpVector(const Vec& up, bool noMove) This method can be useful to create Quicktime VR panoramic sequences, see the QGLViewer::saveSnapshot() documentation for details. */ -void Camera::setOrientation(float theta, float phi) +void AppGLWidget_Camera::setOrientation(float theta, float phi) { Vec axis(0.0, 1.0, 0.0); const Quaternion rot1(axis, theta); @@ -1035,7 +1035,7 @@ void Camera::setOrientation(float theta, float phi) } /*! Sets the Camera orientation(), defined in the world coordinate system. */ -void Camera::setOrientation(const Quaternion& q) +void AppGLWidget_Camera::setOrientation(const Quaternion& q) { frame()->setOrientation(q); //frame()->updateFlyUpVector(); @@ -1046,7 +1046,7 @@ void Camera::setOrientation(const Quaternion& q) The Camera position() is not modified. The Camera is rotated so that the horizon (defined by its upVector()) is preserved. See also lookAt() and setUpVector(). */ -void Camera::setViewDirection(const Vec& direction) +void AppGLWidget_Camera::setViewDirection(const Vec& direction) { if (direction.squaredNorm() < 1E-10) return; @@ -1096,7 +1096,7 @@ Only the orientation() and position() of the Camera are modified. \note If you defined your matrix as \c GLdouble \c mvm[4][4], pass \c &(mvm[0][0]) as a parameter. */ -void Camera::setFromModelViewMatrix(const GLdouble* const modelViewMatrix) +void AppGLWidget_Camera::setFromModelViewMatrix(const GLdouble* const modelViewMatrix) { // Get upper left (rotation) matrix double upperLeft[3][3]; @@ -1134,7 +1134,7 @@ void Camera::setFromModelViewMatrix(const GLdouble* const modelViewMatrix) atan(1.0/projectionMatrix[5]). This code was written by Sylvain Paris. */ -void Camera::setFromProjectionMatrix(const float matrix[12]) +void AppGLWidget_Camera::setFromProjectionMatrix(const float matrix[12]) { // The 3 lines of the matrix are the normals to the planes x=0, y=0, z=0 // in the camera CS. As we normalize them, we do not need the 4th coordinate. @@ -1284,7 +1284,7 @@ void Camera::setFromProjectionMatrix(const GLdouble* projectionMatrix) ///////////////////////// Camera to world transform /////////////////////// /*! Same as cameraCoordinatesOf(), but with \c float[3] parameters (\p src and \p res may be identical pointers). */ -void Camera::getCameraCoordinatesOf(const float src[3], float res[3]) const +void AppGLWidget_Camera::getCameraCoordinatesOf(const float src[3], float res[3]) const { Vec r = cameraCoordinatesOf(Vec(src)); for (int i=0; i<3; ++i) @@ -1292,7 +1292,7 @@ void Camera::getCameraCoordinatesOf(const float src[3], float res[3]) const } /*! Same as worldCoordinatesOf(), but with \c float[3] parameters (\p src and \p res may be identical pointers). */ -void Camera::getWorldCoordinatesOf(const float src[3], float res[3]) const +void AppGLWidget_Camera::getWorldCoordinatesOf(const float src[3], float res[3]) const { Vec r = worldCoordinatesOf(Vec(src)); for (int i=0; i<3; ++i) @@ -1304,7 +1304,7 @@ void Camera::getWorldCoordinatesOf(const float src[3], float res[3]) const This method is mainly used in conjunction with \c gluProject, which requires such a viewport. Returned values are (0, screenHeight(), screenWidth(), - screenHeight()), so that the origin is located in the \e upper left corner of the window (Qt style coordinate system). */ -void Camera::getViewport(GLint viewport[4]) const +void AppGLWidget_Camera::getViewport(GLint viewport[4]) const { viewport[0] = 0; viewport[1] = screenHeight(); @@ -1337,7 +1337,7 @@ void Camera::getViewport(GLint viewport[4]) const If you call this method several times with no change in the matrices, consider precomputing the projection times modelview matrix to save computation time if required (\c P x \c M in the \c gluProject man page). */ -Vec Camera::projectedCoordinatesOf(const Vec& src, const Frame* frame) const +Vec AppGLWidget_Camera::projectedCoordinatesOf(const Vec& src, const Frame* frame) const { GLdouble x,y,z; static GLint viewport[4]; @@ -1379,7 +1379,7 @@ Vec Camera::projectedCoordinatesOf(const Vec& src, const Frame* frame) const This method is not computationally optimized. If you call it several times with no change in the matrices, you should buffer the entire inverse projection matrix (modelview, projection and then viewport) to speed-up the queries. See the \c gluUnProject man page for details. */ -Vec Camera::unprojectedCoordinatesOf(const Vec& src, const Frame* frame) const +Vec AppGLWidget_Camera::unprojectedCoordinatesOf(const Vec& src, const Frame* frame) const { GLdouble x,y,z; static GLint viewport[4]; @@ -1392,7 +1392,7 @@ Vec Camera::unprojectedCoordinatesOf(const Vec& src, const Frame* frame) const } /*! Same as projectedCoordinatesOf(), but with \c float parameters (\p src and \p res can be identical pointers). */ -void Camera::getProjectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const +void AppGLWidget_Camera::getProjectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const { Vec r = projectedCoordinatesOf(Vec(src), frame); for (int i=0; i<3; ++i) @@ -1400,7 +1400,7 @@ void Camera::getProjectedCoordinatesOf(const float src[3], float res[3], const F } /*! Same as unprojectedCoordinatesOf(), but with \c float parameters (\p src and \p res can be identical pointers). */ -void Camera::getUnprojectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const +void AppGLWidget_Camera::getUnprojectedCoordinatesOf(const float src[3], float res[3], const Frame* frame) const { Vec r = unprojectedCoordinatesOf(Vec(src), frame); for (int i=0; i<3; ++i) @@ -1532,11 +1532,11 @@ camera()->deletePath(i); This method is useful for analytical intersection in a selection method. See the select example for an illustration. */ -void Camera::convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const +void AppGLWidget_Camera::convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const { switch (type()) { - case Camera::PERSPECTIVE: + case AppGLWidget_Camera::PERSPECTIVE: orig = position(); dir = Vec( ((2.0 * pixel.x() / screenWidth()) - 1.0) * tan(fieldOfView()/2.0) * aspectRatio(), ((2.0 * (screenHeight()-pixel.y()) / screenHeight()) - 1.0) * tan(fieldOfView()/2.0), @@ -1545,7 +1545,7 @@ void Camera::convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const dir.normalize(); break; - case Camera::ORTHOGRAPHIC: + case AppGLWidget_Camera::ORTHOGRAPHIC: { GLdouble w,h; getOrthoWidthHeight(w,h); @@ -1559,9 +1559,9 @@ void Camera::convertClickToLine(const Point& pixel, Vec& orig, Vec& dir) const #ifndef DOXYGEN /*! This method has been deprecated in libQGLViewer version 2.2.0 */ -void Camera::drawCamera(float, float, float) +void AppGLWidget_Camera::drawCamera(float, float, float) { - cout << "drawCamera is deprecated. Use Camera::draw() instead."; + cout << "drawCamera is deprecated. Use AppGLWidget_Camera::draw() instead."; } #endif @@ -1585,7 +1585,7 @@ The Camera is then correctly positioned and orientated. \note The drawing of a QGLViewer's own QGLViewer::camera() should not be visible, but may create artefacts due to numerical imprecisions. */ -void Camera::draw(bool drawFarPlane, float scale) const +void AppGLWidget_Camera::draw(bool drawFarPlane, float scale) const { glPushMatrix(); glMultMatrixd(frame()->worldMatrix()); @@ -1598,7 +1598,7 @@ void Camera::draw(bool drawFarPlane, float scale) const switch (type()) { - case Camera::PERSPECTIVE: + case AppGLWidget_Camera::PERSPECTIVE: { points[0].y = points[0].z * tan(fieldOfView()/2.0); points[0].x = points[0].y * aspectRatio(); @@ -1609,7 +1609,7 @@ void Camera::draw(bool drawFarPlane, float scale) const points[1].x = ratio * points[0].x; break; } - case Camera::ORTHOGRAPHIC: + case AppGLWidget_Camera::ORTHOGRAPHIC: { GLdouble hw, hh; getOrthoWidthHeight(hw, hh); @@ -1658,7 +1658,7 @@ void Camera::draw(bool drawFarPlane, float scale) const // Frustum lines switch (type()) { - case Camera::PERSPECTIVE : + case AppGLWidget_Camera::PERSPECTIVE : glBegin(GL_LINES); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f( points[farIndex].x, points[farIndex].y, -points[farIndex].z); @@ -1670,7 +1670,7 @@ void Camera::draw(bool drawFarPlane, float scale) const glVertex3f( points[farIndex].x, -points[farIndex].y, -points[farIndex].z); glEnd(); break; - case Camera::ORTHOGRAPHIC : + case AppGLWidget_Camera::ORTHOGRAPHIC : if (drawFarPlane) { glBegin(GL_LINES); @@ -1713,7 +1713,7 @@ applied in an other viewer to visualize the culling results: glClipPlane(GL_CLIP_PLANE0, coef[2]); glClipPlane(GL_CLIP_PLANE1, coef[3]); \endcode */ -void Camera::getFrustumPlanesCoefficients(GLdouble coef[6][4]) const +void AppGLWidget_Camera::getFrustumPlanesCoefficients(GLdouble coef[6][4]) const { // Computed once and for all const Vec pos = position(); @@ -1727,7 +1727,7 @@ void Camera::getFrustumPlanesCoefficients(GLdouble coef[6][4]) const switch (type()) { - case Camera::PERSPECTIVE : + case AppGLWidget_Camera::PERSPECTIVE : { const float hhfov = horizontalFieldOfView() / 2.0; const float chhfov = cos(hhfov); @@ -1768,7 +1768,7 @@ void Camera::getFrustumPlanesCoefficients(GLdouble coef[6][4]) const break; } - case Camera::ORTHOGRAPHIC : + case AppGLWidget_Camera::ORTHOGRAPHIC : normal[0] = -right; normal[1] = right; normal[4] = up; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h index cd349803712..e71e85839b1 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_camera.h @@ -79,15 +79,15 @@ A Camera can also be used outside of a QGLViewer or even without OpenGL for its coordinate system conversion capabilities. Note however that some of them explicitly rely on the presence of a Z-buffer. \nosubgrouping */ - class Camera + class AppGLWidget_Camera { public: - Camera(); - virtual ~Camera(); + AppGLWidget_Camera(); + virtual ~AppGLWidget_Camera(); - Camera(const Camera& camera); - Camera& operator=(const Camera& camera); + AppGLWidget_Camera(const AppGLWidget_Camera& camera); + AppGLWidget_Camera& operator=(const AppGLWidget_Camera& camera); /*! Enumerates the two possible types of Camera. diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h index 64e8d333d74..4bd629a05de 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_constraint.h @@ -31,7 +31,7 @@ //namespace qglviewer { class Frame; - class Camera; + class AppGLWidget_Camera; /*! \brief An interface class for Frame constraints. \class Constraint constraint.h QGLViewer/constraint.h @@ -322,7 +322,7 @@ class CameraConstraint : public AxisPlaneConstraint { public: - explicit CameraConstraint(const Camera* const camera); + explicit CameraConstraint(const AppGLWidget_Camera* const camera); /*! Virtual destructor. Empty. */ virtual ~CameraConstraint() {}; @@ -330,10 +330,10 @@ virtual void constrainRotation (Quaternion& rotation, Frame* const frame); /*! Returns the associated Camera. Set using the CameraConstraint constructor. */ - const Camera* camera() const { return camera_; }; + const AppGLWidget_Camera* camera() const { return camera_; }; private: - const Camera* const camera_; + const AppGLWidget_Camera* const camera_; }; //} // namespace qglviewer diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp index 7b52b90eedc..dafd64c4d19 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.cpp @@ -71,14 +71,14 @@ ManipulatedCameraFrame::ManipulatedCameraFrame(const ManipulatedCameraFrame& mcf //////////////////////////////////////////////////////////////////////////////// /*! Returns a Quaternion that is a rotation around current camera Y, proportionnal to the horizontal mouse position. */ -Quaternion ManipulatedCameraFrame::turnQuaternion(int x, const Camera* const camera) +Quaternion ManipulatedCameraFrame::turnQuaternion(int x, const AppGLWidget_Camera* const camera) { return Quaternion(Vec(0.0, 1.0, 0.0), rotationSensitivity()*(prevPos_.x()-x)/camera->screenWidth()); } /*! Returns a Quaternion that is the composition of two rotations, inferred from the mouse pitch (X axis) and yaw (flyUpVector() axis). */ -Quaternion ManipulatedCameraFrame::pitchYawQuaternion(int x, int y, const Camera* const camera) +Quaternion ManipulatedCameraFrame::pitchYawQuaternion(int x, int y, const AppGLWidget_Camera* const camera) { const Quaternion rotX(Vec(1.0, 0.0, 0.0), rotationSensitivity()*(prevPos_.y()-y)/camera->screenHeight()); const Quaternion rotY(transformOf(flyUpVector()), rotationSensitivity()*(prevPos_.x()-x)/camera->screenWidth()); diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h index df9d8f8e7e3..334fcfeade5 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedCameraFrame.h @@ -50,7 +50,7 @@ class ManipulatedCameraFrame : public ManipulatedFrame { #ifndef DOXYGEN - friend class Camera; + friend class AppGLWidget_Camera; //friend class ::QGLViewer; #endif @@ -151,8 +151,8 @@ private: void updateFlyUpVector(); - Quaternion turnQuaternion(int x, const Camera* const camera); - Quaternion pitchYawQuaternion(int x, int y, const Camera* const camera); + Quaternion turnQuaternion(int x, const AppGLWidget_Camera* const camera); + Quaternion pitchYawQuaternion(int x, int y, const AppGLWidget_Camera* const camera); private: // Fly mode data diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp index 31243308472..3ec5e83bf50 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.cpp @@ -97,7 +97,7 @@ static float projectOnBall(float x, float y) #ifndef DOXYGEN /*! Returns a quaternion computed according to the mouse motion. Mouse positions are projected on a deformed ball, centered on (\p cx,\p cy). */ -Quaternion ManipulatedFrame::deformedBallQuaternion(int x, int y, float cx, float cy, const Camera* const camera) +Quaternion ManipulatedFrame::deformedBallQuaternion(int x, int y, float cx, float cy, const AppGLWidget_Camera* const camera) { // Points on the deformed ball float px = rotationSensitivity() * (prevPos_.x() - cx) / camera->screenWidth(); diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h index 4dfc82c672a..e57dd9fc756 100644 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget_manipulatedFrame.h @@ -220,7 +220,7 @@ #ifndef DOXYGEN protected: - Quaternion deformedBallQuaternion(int x, int y, float cx, float cy, const Camera* const camera); + Quaternion deformedBallQuaternion(int x, int y, float cx, float cy, const AppGLWidget_Camera* const camera); int action_; // Should be a QGLViewer::MouseAction, but include loop Constraint* previousConstraint_; // When manipulation is without Contraint. diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index ba583080e79..96edf7fcdba 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -9,6 +9,8 @@ extern "C" { #endif +#include "DNA_camera_types.h" + #include "render_types.h" #include "renderpipeline.h" @@ -54,14 +56,25 @@ extern "C" { // initialize camera Object* maincam_obj = re->scene->camera; + Camera *cam = (Camera*) maincam_obj->data; + + if(cam->type == CAM_PERSP){ + view->_camera->setType(AppGLWidget_Camera::PERSPECTIVE); + view->_camera->setHorizontalFieldOfView( M_PI / 180.0f * cam->angle ); + } + else if (cam->type == CAM_ORTHO){ + view->_camera->setType(AppGLWidget_Camera::ORTHOGRAPHIC); + // view->_camera->setFocusDistance does not seem to work + // integrate cam->ortho_scale parameter + } + Vec camPosition(maincam_obj->obmat[3][0], maincam_obj->obmat[3][1], maincam_obj->obmat[3][2]); Vec camUp( re->viewmat[0][1], re->viewmat[1][1], re->viewmat[2][1]); - Vec camDirection( -re->viewmat[0][2], -re->viewmat[1][2], - re->viewmat[2][2]); - - view->_camera->setType(Camera::PERSPECTIVE); + Vec camDirection( -re->viewmat[0][2], -re->viewmat[1][2], -re->viewmat[2][2]); view->_camera->setPosition(camPosition); view->_camera->setUpVector(camUp); view->_camera->setViewDirection(camDirection); + // export scene to 3ds format string script_3ds_export = pathconfig.getProjectDir() + From 8ca128414ddbe73bf31755df6cf19e5c70aba99c Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Wed, 2 Jul 2008 20:28:49 +0000 Subject: [PATCH 322/430] Cloth collisions: Reorganized collision system to be more flexible for other parts of blender, so it can be more easily reused. Also slowed down friction impulse. --- source/blender/blenkernel/BKE_cloth.h | 2 +- source/blender/blenkernel/intern/cloth.c | 4 +- source/blender/blenkernel/intern/collision.c | 473 +++++++++++-------- source/blender/blenkernel/intern/implicit.c | 13 +- 4 files changed, 277 insertions(+), 215 deletions(-) diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 2e5da236a89..f3c13d3d820 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -208,7 +208,7 @@ typedef enum //////////////////////////////////////////////// // needed for implicit.c -int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ); +int cloth_bvh_objcollision ( Object *ob, ClothModifierData * clmd, float step, float dt ); //////////////////////////////////////////////// diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 6034b85e20f..c7817b017ef 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -132,7 +132,7 @@ void cloth_init ( ClothModifierData *clmd ) clmd->coll_parms->self_friction = 5.0; clmd->coll_parms->friction = 5.0; - clmd->coll_parms->loop_count = 3; + clmd->coll_parms->loop_count = 2; clmd->coll_parms->epsilon = 0.015f; clmd->coll_parms->flags = CLOTH_COLLSETTINGS_FLAG_ENABLED; clmd->coll_parms->collision_list = NULL; @@ -471,7 +471,7 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul tend(); - /* printf ( "Cloth simulation time: %f\n", ( float ) tval() ); */ + // printf ( "%f\n", ( float ) tval() ); return ret; } diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 7f41ca033d3..26c5d186d87 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -541,7 +541,7 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier { Normalize ( vrel_t_pre ); - impulse = 2.0 * magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); + impulse = magtangent / ( 1.0 + w1*w1 + w2*w2 + w3*w3 ); // 2.0 * VECADDMUL ( cloth1->verts[collpair->ap1].impulse, vrel_t_pre, w1 * impulse ); VECADDMUL ( cloth1->verts[collpair->ap2].impulse, vrel_t_pre, w2 * impulse ); VECADDMUL ( cloth1->verts[collpair->ap3].impulse, vrel_t_pre, w3 * impulse ); @@ -1291,52 +1291,223 @@ int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierData *col return 1; } -int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData *collmd, float step, float dt ) +int cloth_do_selfcollisions(ClothModifierData * clmd) +{ + int ret2 = 0, l; + Cloth *cloth = clmd->clothObject; + + if ( clmd->clothObject->bvhselftree ) + { + for(l = 0; l < clmd->coll_parms->self_loop_count; l++) + { + BVHTreeOverlap *overlap = NULL; + ClothVertex *verts = clmd->clothObject->verts; // needed for openMP + int k; + int ret = 0, result = 0; + + // search for overlapping collision pairs + overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); + +// #pragma omp parallel for private(k, i, j) schedule(static) + for ( k = 0; k < result; k++ ) + { + float temp[3]; + float length = 0; + float mindistance; + int i, j; + + i = overlap[k].indexA; + j = overlap[k].indexB; + + mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); + + if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) + { + if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) + { + continue; + } + } + + VECSUB ( temp, verts[i].tx, verts[j].tx ); + + if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; + + // check for adjacent points (i must be smaller j) + if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) + { + continue; + } + + length = Normalize ( temp ); + + if ( length < mindistance ) + { + float correction = mindistance - length; + + if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, -correction ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + } + else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) + { + VecMulf ( temp, correction ); + VECADD ( verts[i].tx, verts[i].tx, temp ); + } + else + { + VecMulf ( temp, -correction*0.5 ); + VECADD ( verts[j].tx, verts[j].tx, temp ); + + VECSUB ( verts[i].tx, verts[i].tx, temp ); + } + ret = 1; + ret2 += ret; + } + else + { + // check for approximated time collisions + } + } + + if ( overlap ) + MEM_freeN ( overlap ); + + if(!ret) + break; + + } + //////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////// + // SELFCOLLISIONS: update velocities + //////////////////////////////////////////////////////////// + if ( ret2 ) + { + int i; + ClothVertex *verts = clmd->clothObject->verts; // needed for openMP + + for ( i = 0; i < cloth->numverts; i++ ) + { + if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) + { + VECSUB ( verts[i].tv, verts[i].tx, verts[i].txold ); + } + } + } + //////////////////////////////////////////////////////////// + } + return ret2; +} + +// return all collision objects in scene +// collision object will exclude self +CollisionModifierData **get_collisionobjects(Object *self, int *numcollobj) +{ + Base *base=NULL; + CollisionModifierData **objs = NULL; + Object *coll_ob = NULL; + CollisionModifierData *collmd = NULL; + int numobj = 0, maxobj = 100; + + objs = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray"); + // check all collision objects + for ( base = G.scene->base.first; base; base = base->next ) + { + coll_ob = base->object; + collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision ); + + if ( !collmd ) + { + if ( coll_ob->dup_group ) + { + GroupObject *go; + Group *group = coll_ob->dup_group; + + for ( go= group->gobject.first; go; go= go->next ) + { + coll_ob = go->ob; + + collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision ); + + if ( !collmd ) + continue; + + if(coll_ob == self) + continue; + + if(numobj >= maxobj) + { + // realloc + int oldmax = maxobj; + CollisionModifierData **tmp; + maxobj *= 2; + tmp = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray"); + memcpy(tmp, objs, sizeof(CollisionModifierData *)*oldmax); + MEM_freeN(objs); + objs = tmp; + } + + objs[numobj] = collmd; + numobj++; + } + } + } + else + { + if(coll_ob == self) + continue; + + if(numobj >= maxobj) + { + // realloc + int oldmax = maxobj; + CollisionModifierData **tmp; + maxobj *= 2; + tmp = MEM_callocN(sizeof(CollisionModifierData *)*maxobj, "CollisionObjectsArray"); + memcpy(tmp, objs, sizeof(CollisionModifierData *)*oldmax); + MEM_freeN(objs); + objs = tmp; + + } + + objs[numobj] = collmd; + numobj++; + } + } + *numcollobj = numobj; + return objs; +} + +void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, CollisionModifierData *collmd, CollPair **collisions, CollPair **collisions_index, int numresult, BVHTreeOverlap *overlap) +{ + int i; + + *collisions = ( CollPair* ) MEM_mallocN ( sizeof ( CollPair ) * numresult * 4, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision + *collisions_index = *collisions; + + for ( i = 0; i < numresult; i++ ) + { + *collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd, overlap+i, *collisions_index ); + } +} + +int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, CollisionModifierData *collmd, CollPair *collisions, CollPair *collisions_index) { Cloth *cloth = clmd->clothObject; - BVHTree *cloth_bvh= ( BVHTree * ) cloth->bvhtree; - long i=0, j = 0, numfaces = 0, numverts = 0; + int i=0, j = 0, numfaces = 0, numverts = 0; ClothVertex *verts = NULL; - CollPair *collisions = NULL, *collisions_index = NULL; int ret = 0; int result = 0; float tnull[3] = {0,0,0}; - BVHTreeOverlap *overlap = NULL; - - + numfaces = clmd->clothObject->numfaces; numverts = clmd->clothObject->numverts; - + verts = cloth->verts; - - if ( collmd->bvhtree ) - { - /* get pointer to bounding volume hierarchy */ - BVHTree *coll_bvh = collmd->bvhtree; - - /* move object to position (step) in time */ - collision_move_object ( collmd, step + dt, step ); - - /* search for overlapping collision pairs */ - overlap = BLI_bvhtree_overlap ( cloth_bvh, coll_bvh, &result ); - - collisions = ( CollPair* ) MEM_mallocN ( sizeof ( CollPair ) * result*4, "collision array" ); //*4 since cloth_collision_static can return more than 1 collision - collisions_index = collisions; - - for ( i = 0; i < result; i++ ) - { - collisions_index = cloth_collision ( ( ModifierData * ) clmd, ( ModifierData * ) collmd, overlap+i, collisions_index ); - } - - if ( overlap ) - MEM_freeN ( overlap ); - } - else - { - if ( G.rt > 0 ) - printf ( "cloth_bvh_objcollision: found a collision object with clothObject or collData NULL.\n" ); - } - + // process all collisions (calculate impulses, TODO: also repulses if distance too short) result = 1; for ( j = 0; j < 5; j++ ) // 5 is just a value that ensures convergence @@ -1363,48 +1534,22 @@ int cloth_bvh_objcollisions_do ( ClothModifierData * clmd, CollisionModifierData } } } -/* - result += cloth_collision_moving ( clmd, collmd, collisions, collisions_index ); - - // apply impulses in parallel - if ( result ) - { - for ( i = 0; i < numverts; i++ ) - { - // calculate "velocities" (just xnew = xold + v; no dt in v) - if ( verts[i].impulse_count ) - { - VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count ); - VECCOPY ( verts[i].impulse, tnull ); - verts[i].impulse_count = 0; - - ret++; - } - } - } -*/ } } - - if ( collisions ) MEM_freeN ( collisions ); - return ret; } // cloth - object collisions -int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) +int cloth_bvh_objcollision ( Object *ob, ClothModifierData * clmd, float step, float dt ) { - Base *base=NULL; - CollisionModifierData *collmd=NULL; Cloth *cloth=NULL; - Object *coll_ob=NULL; BVHTree *cloth_bvh=NULL; - long i=0, j = 0, k = 0, l = 0, numfaces = 0, numverts = 0; - int result = 0, rounds = 0; // result counts applied collisions; ic is for debug output; + long i=0, numfaces = 0, numverts = 0; + int rounds = 0; // result counts applied collisions; ic is for debug output; ClothVertex *verts = NULL; int ret = 0, ret2 = 0; - ClothModifierData *tclmd; - int collisions = 0; + CollisionModifierData **collobjs = NULL; + int numcollobj = 0; if ( ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_COLLOBJ ) || ! ( ( ( Cloth * ) clmd->clothObject )->bvhtree ) ) { @@ -1424,54 +1569,61 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) // update cloth bvh bvhtree_update_from_cloth ( clmd, 1 ); // 0 means STATIC, 1 means MOVING (see later in this function) bvhselftree_update_from_cloth ( clmd, 0 ); // 0 means STATIC, 1 means MOVING (see later in this function) + + collobjs = get_collisionobjects(ob, &numcollobj); + + if(!collobjs) + return 0; do { - result = 0; + CollPair **collisions, **collisions_index; + ret2 = 0; + collisions = MEM_callocN(sizeof(CollPair *) *numcollobj , "CollPair"); + collisions_index = MEM_callocN(sizeof(CollPair *) *numcollobj , "CollPair"); + // check all collision objects - for ( base = G.scene->base.first; base; base = base->next ) + for(i = 0; i < numcollobj; i++) { - coll_ob = base->object; - collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision ); - - if ( !collmd ) + CollisionModifierData *collmd = collobjs[i]; + BVHTreeOverlap *overlap = NULL; + int result = 0; + + /* move object to position (step) in time */ + collision_move_object ( collmd, step + dt, step ); + + /* search for overlapping collision pairs */ + overlap = BLI_bvhtree_overlap ( cloth_bvh, collmd->bvhtree, &result ); + + // go to next object if no overlap is there + if(!result || !overlap) { - if ( coll_ob->dup_group ) - { - GroupObject *go; - Group *group = coll_ob->dup_group; - - for ( go= group->gobject.first; go; go= go->next ) - { - coll_ob = go->ob; - - collmd = ( CollisionModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Collision ); - - if ( !collmd ) - continue; - - tclmd = ( ClothModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Cloth ); - if ( tclmd == clmd ) - continue; - - ret += cloth_bvh_objcollisions_do ( clmd, collmd, step, dt ); - ret2 += ret; - } - } - } - else - { - tclmd = ( ClothModifierData * ) modifiers_findByType ( coll_ob, eModifierType_Cloth ); - if ( tclmd == clmd ) - continue; - - ret += cloth_bvh_objcollisions_do ( clmd, collmd, step, dt ); - ret2 += ret; + if ( overlap ) + MEM_freeN ( overlap ); + continue; } + + /* check if collisions really happen (costly near check) */ + cloth_bvh_objcollisions_nearcheck ( clmd, collmd, &collisions[i], &collisions_index[i], result, overlap); + + // resolve nearby collisions + ret += cloth_bvh_objcollisions_resolve ( clmd, collmd, collisions[i], collisions_index[i]); + ret2 += ret; + + if ( overlap ) + MEM_freeN ( overlap ); } rounds++; + + for(i = 0; i < numcollobj; i++) + { + if ( collisions[i] ) MEM_freeN ( collisions[i] ); + } + + MEM_freeN(collisions); + MEM_freeN(collisions_index); //////////////////////////////////////////////////////////// // update positions @@ -1493,117 +1645,20 @@ int cloth_bvh_objcollision ( ClothModifierData * clmd, float step, float dt ) } //////////////////////////////////////////////////////////// - + //////////////////////////////////////////////////////////// // Test on *simple* selfcollisions //////////////////////////////////////////////////////////// if ( clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_SELF ) { - for(l = 0; l < clmd->coll_parms->self_loop_count; l++) - { - // TODO: add coll quality rounds again - BVHTreeOverlap *overlap = NULL; - - collisions = 1; - verts = cloth->verts; // needed for openMP - - numfaces = clmd->clothObject->numfaces; - numverts = clmd->clothObject->numverts; - - verts = cloth->verts; - - if ( cloth->bvhselftree ) - { - // search for overlapping collision pairs - overlap = BLI_bvhtree_overlap ( cloth->bvhselftree, cloth->bvhselftree, &result ); - - // #pragma omp parallel for private(k, i, j) schedule(static) - for ( k = 0; k < result; k++ ) - { - float temp[3]; - float length = 0; - float mindistance; - - i = overlap[k].indexA; - j = overlap[k].indexB; - - mindistance = clmd->coll_parms->selfepsilon* ( cloth->verts[i].avg_spring_len + cloth->verts[j].avg_spring_len ); - - if ( clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_GOAL ) - { - if ( ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - && ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) ) - { - continue; - } - } - - VECSUB ( temp, verts[i].tx, verts[j].tx ); - - if ( ( ABS ( temp[0] ) > mindistance ) || ( ABS ( temp[1] ) > mindistance ) || ( ABS ( temp[2] ) > mindistance ) ) continue; - - // check for adjacent points (i must be smaller j) - if ( BLI_edgehash_haskey ( cloth->edgehash, MIN2(i, j), MAX2(i, j) ) ) - { - continue; - } - - length = Normalize ( temp ); - - if ( length < mindistance ) - { - float correction = mindistance - length; - - if ( cloth->verts [i].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, -correction ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - } - else if ( cloth->verts [j].flags & CLOTH_VERT_FLAG_PINNED ) - { - VecMulf ( temp, correction ); - VECADD ( verts[i].tx, verts[i].tx, temp ); - } - else - { - VecMulf ( temp, -correction*0.5 ); - VECADD ( verts[j].tx, verts[j].tx, temp ); - - VECSUB ( verts[i].tx, verts[i].tx, temp ); - } - ret = 1; - ret2 += ret; - } - else - { - // check for approximated time collisions - } - } - - if ( overlap ) - MEM_freeN ( overlap ); - - } - } - //////////////////////////////////////////////////////////// - - //////////////////////////////////////////////////////////// - // SELFCOLLISIONS: update velocities - //////////////////////////////////////////////////////////// - if ( ret2 ) - { - for ( i = 0; i < cloth->numverts; i++ ) - { - if ( ! ( verts [i].flags & CLOTH_VERT_FLAG_PINNED ) ) - { - VECSUB ( verts[i].tv, verts[i].tx, verts[i].txold ); - } - } - } - //////////////////////////////////////////////////////////// + ret2 += cloth_do_selfcollisions(clmd); } + //////////////////////////////////////////////////////////// } while ( ret2 && ( clmd->coll_parms->loop_count>rounds ) ); + + if(collobjs) + + MEM_freeN(collobjs); return MIN2 ( ret, 1 ); } diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 808984aaa3c..297ac0b1530 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1588,10 +1588,17 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase VECSUB(verts[i].tv, verts[i].tx, verts[i].txold); VECCOPY(verts[i].v, verts[i].tv); } - + // call collision function - result = cloth_bvh_objcollision(clmd, step + dt, dt); - + // TODO: check if "step" or "step+dt" is correct - dg + result = cloth_bvh_objcollision(ob, clmd, step, dt); + + // correct velocity again, just to be sure we had to change it due to adaptive collisions + for(i = 0; i < numverts; i++) + { + VECSUB(verts[i].tv, verts[i].tx, id->X[i]); + } + // copy corrected positions back to simulation for(i = 0; i < numverts; i++) { From 424141f44d1c971455d7d207ad386d1fcd7d854b Mon Sep 17 00:00:00 2001 From: Willian Padovani Germano Date: Wed, 2 Jul 2008 21:01:59 +0000 Subject: [PATCH 323/430] == Python, GE & Threads == Martin Sell (thanks!) reported that threading via scripts was not working in the game engine with Blender 2.46 and later. My fault, to make pynodes work properly with threads > 1 I disabled Python's "check interval", preventing threads created via scripts from receiving time to run. Now only during rendering check interval is disabled (set to max int). Still experimental, I added the calls in BPY_do_all_scripts, since it's called in BIF_do_render, but will probably move the code to its own function after more testing & feedback. --- source/blender/python/BPY_interface.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c index 2f94e0eeebc..226657655fa 100644 --- a/source/blender/python/BPY_interface.c +++ b/source/blender/python/BPY_interface.c @@ -229,13 +229,6 @@ void BPY_start_python( int argc, char **argv ) /* Initialize thread support (also acquires lock) */ PyEval_InitThreads(); - /* Don't allow the Python Interpreter to release the GIL on - * its own, to guarantee PyNodes work properly. For Blender this - * is currently the best default behavior. - * The following code in C is equivalent in Python to: - * "import sys; sys.setcheckinterval(sys.maxint)" */ - _Py_CheckInterval = PyInt_GetMax(); - //Overrides __import__ init_ourImport( ); init_ourReload( ); @@ -2188,6 +2181,18 @@ void BPY_do_all_scripts( short event ) BPY_do_pyscript( &( G.scene->id ), event ); + /* Don't allow the Python Interpreter to release the GIL on + * its own, to guarantee PyNodes work properly. For Blender this + * is currently the best default behavior. + * The following code in C is equivalent in Python to: + * "import sys; sys.setcheckinterval(sys.maxint)" */ + if (event == SCRIPT_RENDER) { + _Py_CheckInterval = PyInt_GetMax(); + } + else if (event == SCRIPT_POSTRENDER) { + _Py_CheckInterval = 100; /* Python default */ + } + return; } @@ -2270,9 +2275,9 @@ void BPY_do_pyscript( ID * id, short event ) return; } - /* tell we're running a scriptlink. The sum also tells if this script - * is running nested inside another. Blender.Load needs this info to - * avoid trouble with invalid slink pointers. */ + /* tell we're running a scriptlink. The sum also tells if this + * script is running nested inside another. Blender.Load needs + * this info to avoid trouble with invalid slink pointers. */ during_slink++; disable_where_scriptlink( (short)during_slink ); From 31aa43da9736a014579ec05fb68ff2051f5eb69d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 3 Jul 2008 01:34:50 +0000 Subject: [PATCH 324/430] Adding GameObject setLinearVelocity(), without this interacting with objects requires them to have logic bricks to apply force which doesn't work well when the character is in a seperate blend file to the levels. (its also messy to have a script & multiple motion actuators on each object you can pickup and throw). This is also needed for removing any force that existed before suspending dynamics - In the case of franky hanging, resuming dynamics when he fell would apply the velocity he had when grabbing making dropping to the ground work unpredictably. Also note in pydocs that enable/disable rigidbody physics doesn't work with bullet yet. --- source/gameengine/Ketsji/KX_GameObject.cpp | 18 +++++++++++++++++- source/gameengine/Ketsji/KX_GameObject.h | 1 + source/gameengine/PyDoc/KX_GameObject.py | 20 ++++++++++++++++++-- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index ee8161702e1..993e852a7ee 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -812,6 +812,7 @@ PyMethodDef KX_GameObject::Methods[] = { {"getOrientation", (PyCFunction) KX_GameObject::sPyGetOrientation, METH_VARARGS}, {"setOrientation", (PyCFunction) KX_GameObject::sPySetOrientation, METH_VARARGS}, {"getLinearVelocity", (PyCFunction) KX_GameObject::sPyGetLinearVelocity, METH_VARARGS}, + {"setLinearVelocity", (PyCFunction) KX_GameObject::sPySetLinearVelocity, METH_VARARGS}, {"getVelocity", (PyCFunction) KX_GameObject::sPyGetVelocity, METH_VARARGS}, {"getMass", (PyCFunction) KX_GameObject::sPyGetMass, METH_VARARGS}, {"getReactionForce", (PyCFunction) KX_GameObject::sPyGetReactionForce, METH_VARARGS}, @@ -1091,7 +1092,22 @@ PyObject* KX_GameObject::PyGetLinearVelocity(PyObject* self, } } - +PyObject* KX_GameObject::PySetLinearVelocity(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + int local = 0; + PyObject* pyvect; + + if (PyArg_ParseTuple(args,"O|i",&pyvect,&local)) { + MT_Vector3 velocity; + if (PyVecTo(pyvect, velocity)) { + setLinearVelocity(velocity, (local!=0)); + Py_Return; + } + } + return NULL; +} PyObject* KX_GameObject::PySetVisible(PyObject* self, PyObject* args, diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 89f4cb396d1..3a9abd2fc61 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -713,6 +713,7 @@ public: KX_PYMETHOD(KX_GameObject,GetPosition); KX_PYMETHOD(KX_GameObject,GetLinearVelocity); + KX_PYMETHOD(KX_GameObject,SetLinearVelocity); KX_PYMETHOD(KX_GameObject,GetVelocity); KX_PYMETHOD(KX_GameObject,GetMass); KX_PYMETHOD(KX_GameObject,GetReactionForce); diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index ec7496daa75..faadf61abb5 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -98,7 +98,7 @@ class KX_GameObject: @return: The game object's rotation matrix @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. """ - def getLinearVelocity(local): + def getLinearVelocity(local = 0): """ Gets the game object's linear velocity. @@ -106,11 +106,24 @@ class KX_GameObject: ie no angular velocity component. @type local: boolean - @param local: - False: you get the "global" velocity ie: relative to world orientation. + @param local: - False: you get the "global" velocity ie: relative to world orientation (default). - True: you get the "local" velocity ie: relative to object orientation. @rtype: list [vx, vy, vz] @return: the object's linear velocity. """ + def setLinearVelocity(velocity, local = 0): + """ + Sets the game object's linear velocity. + + This method sets game object's velocity through it's centre of mass, + ie no angular velocity component. + + @type velocity: 3d vector. + @param velocity: linear velocity vector. + @type local: boolean + @param local: - False: you get the "global" velocity ie: relative to world orientation (default). + - True: you get the "local" velocity ie: relative to object orientation. + """ def getVelocity(point): """ Gets the game object's velocity at the specified point. @@ -158,16 +171,19 @@ class KX_GameObject: def restoreDynamics(): """ Resumes physics for this object. + @Note: The objects linear velocity will be applied from when the dynamics were suspended. """ def enableRigidBody(): """ Enables rigid body physics for this object. Rigid body physics allows the object to roll on collisions. + @Note: This is not working with bullet physics yet. """ def disableRigidBody(): """ Disables rigid body physics for this object. + @Note: This is not working with bullet physics yet. The angular is removed but rigid body physics can still rotate it later. """ def getParent(): """ From 7e7791755a768d63b595aa65f3a1621fd94226fd Mon Sep 17 00:00:00 2001 From: Hamed Zaghaghi Date: Thu, 3 Jul 2008 10:38:35 +0000 Subject: [PATCH 325/430] Sun,Sky and atmosphere for lamps(sun type), PATCH#8063 http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9 --- source/blender/blenkernel/intern/object.c | 11 + source/blender/blenlib/BLI_arithb.h | 3 + source/blender/blenlib/intern/arithb.c | 60 +++ source/blender/blenloader/intern/readfile.c | 17 + source/blender/makesdna/DNA_lamp_types.h | 19 + .../render/intern/include/pixelshading.h | 1 + .../render/intern/include/render_types.h | 4 + source/blender/render/intern/include/sunsky.h | 141 +++++ .../render/intern/source/convertblender.c | 25 +- .../render/intern/source/pixelshading.c | 78 ++- .../blender/render/intern/source/rendercore.c | 91 ++++ source/blender/render/intern/source/sunsky.c | 492 ++++++++++++++++++ source/blender/src/buttons_shading.c | 41 ++ 13 files changed, 980 insertions(+), 3 deletions(-) create mode 100644 source/blender/render/intern/include/sunsky.h create mode 100644 source/blender/render/intern/source/sunsky.c diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index b72d9a0b044..7b36e46d45e 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -732,6 +732,17 @@ void *add_lamp(char *name) la->preview=NULL; la->falloff_type = LA_FALLOFF_INVLINEAR; la->curfalloff = curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); + la->sun_effect_type = 0; + la->horizon_brightness = 1.0; + la->spread = 1.0; + la->sun_brightness = 1.0; + la->sun_size = 1.0; + la->backscattered_light = 1.0; + la->atm_turbidity = 2.0; + la->atm_inscattering_factor = 1.0; + la->atm_extinction_factor = 1.0; + la->atm_distance_factor = 1.0; + la->sun_intensity = 1.0; curvemapping_initialize(la->curfalloff); return la; } diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 4fa880c36d1..89ce51c2f02 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -323,6 +323,9 @@ void yuv_to_rgb(float y, float u, float v, float *lr, float *lg, float *lb); void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb); void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr); void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv); +void xyz_to_rgb(float x, float y, float z, float *r, float *g, float *b); +int constrain_rgb(float *r, float *g, float *b); +void gamma_correct_rgb(float *r, float *g, float *b); unsigned int hsv_to_cpack(float h, float s, float v); unsigned int rgb_to_cpack(float r, float g, float b); void cpack_to_rgb(unsigned int col, float *r, float *g, float *b); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 2084ab3da5f..c97ca3c6a8a 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -3414,6 +3414,66 @@ void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv) *lv = v; } +/*http://brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html + * SMPTE-C XYZ to RGB matrix*/ +void xyz_to_rgb(float xc, float yc, float zc, float *r, float *g, float *b) +{ + *r = (3.50570 * xc) + (-1.73964 * yc) + (-0.544011 * zc); + *g = (-1.06906 * xc) + (1.97781 * yc) + (0.0351720 * zc); + *b = (0.0563117 * xc) + (-0.196994 * yc) + (1.05005 * zc); +} + +/*If the requested RGB shade contains a negative weight for + one of the primaries, it lies outside the colour gamut + accessible from the given triple of primaries. Desaturate + it by adding white, equal quantities of R, G, and B, enough + to make RGB all positive. The function returns 1 if the + components were modified, zero otherwise.*/ +int constrain_rgb(float *r, float *g, float *b) +{ + float w; + + /* Amount of white needed is w = - min(0, *r, *g, *b) */ + + w = (0 < *r) ? 0 : *r; + w = (w < *g) ? w : *g; + w = (w < *b) ? w : *b; + w = -w; + + /* Add just enough white to make r, g, b all positive. */ + + if (w > 0) { + *r += w; *g += w; *b += w; + return 1; /* Colour modified to fit RGB gamut */ + } + + return 0; /* Colour within RGB gamut */ +} + +/*Transform linear RGB values to nonlinear RGB values. Rec. + 709 is ITU-R Recommendation BT. 709 (1990) ``Basic + Parameter Values for the HDTV Standard for the Studio and + for International Programme Exchange'', formerly CCIR Rec. + 709.*/ +void gamma_correct(float *c) +{ + /* Rec. 709 gamma correction. */ + float cc = 0.018; + + if (*c < cc) { + *c *= ((1.099 * pow(cc, 0.45)) - 0.099) / cc; + } else { + *c = (1.099 * pow(*c, 0.45)) - 0.099; + } +} + +void gamma_correct_rgb(float *r, float *g, float *b) +{ + gamma_correct(r); + gamma_correct(g); + gamma_correct(b); +} + /* we define a 'cpack' here as a (3 byte color code) number that can be expressed like 0xFFAA66 or so. for that reason it is sensitive for endianness... with this function it works correctly diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9cfce5e34fa..3c629818b2d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7646,6 +7646,23 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + /* sun/sky */ + if ((main->versionfile < 246) ){ + Lamp *la; + for(la=main->lamp.first; la; la= la->id.next) { + la->sun_effect_type = 0; + la->horizon_brightness = 1.0; + la->spread = 1.0; + la->sun_brightness = 1.0; + la->sun_size = 1.0; + la->backscattered_light = 1.0; + la->atm_turbidity = 2.0; + la->atm_inscattering_factor = 1.0; + la->atm_extinction_factor = 1.0; + la->atm_distance_factor = 1.0; + la->sun_intensity = 1.0; + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h index 2afe78289c1..c00dae08eb4 100644 --- a/source/blender/makesdna/DNA_lamp_types.h +++ b/source/blender/makesdna/DNA_lamp_types.h @@ -76,6 +76,21 @@ typedef struct Lamp { /* texact is for buttons */ short texact, shadhalostep; + /* sun/sky */ + short sun_effect_type; + short atm_pad[3]; + float horizon_brightness; + float spread; + float sun_brightness; + float sun_size; + float backscattered_light; + float sun_intensity; + float atm_turbidity; + float atm_inscattering_factor; + float atm_extinction_factor; + float atm_distance_factor; + + /* yafray: photonlight params */ int YF_numphotons, YF_numsearch; short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad; @@ -123,6 +138,10 @@ typedef struct Lamp { /* Since it is used with LOCAL lamp, can't use LA_SHAD */ #define LA_YF_SOFT 16384 +/* sun effect type*/ +#define LA_SUN_EFFECT_SKY 1 +#define LA_SUN_EFFECT_AP 2 + /* falloff_type */ #define LA_FALLOFF_CONSTANT 0 #define LA_FALLOFF_INVLINEAR 1 diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index ee7199a4295..15d696df89d 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -55,6 +55,7 @@ int shadeHaloFloat(HaloRen *har, */ void shadeSkyPixel(float *collector, float fx, float fy); void shadeSkyView(float *colf, float *rco, float *view, float *dxyview); +void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy, float distance); /* ------------------------------------------------------------------------- */ diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 8414b6aefe3..2f97b19f75c 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -42,6 +42,7 @@ #include "RE_pipeline.h" #include "RE_shader_ext.h" /* TexResult, ShadeResult, ShadeInput */ +#include "sunsky.h" struct Object; struct MemArena; @@ -455,6 +456,9 @@ typedef struct LampRen { float area_size, area_sizey, area_sizez; float adapt_thresh; + /* sun/sky */ + struct SunSky *sunsky; + struct ShadBuf *shb; float *jitter; diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h new file mode 100644 index 00000000000..c61a637269a --- /dev/null +++ b/source/blender/render/intern/include/sunsky.h @@ -0,0 +1,141 @@ + /** + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): zaghaghi + * + * ***** END GPL LICENSE BLOCK ***** + */ +/** + * This feature comes from Preetham paper on "A Practical Analytic Model for Daylight" + * and example code from Brian Smits, another author of that paper in + * http://www.cs.utah.edu/vissim/papers/sunsky/code/ + * */ +#ifndef SUNSKY_H_ +#define SUNSKY_H_ + +#define SPECTRUM_MAX_COMPONENTS 100 +#define SPECTRUM_START 350.0 +#define SPECTRUM_END 800.0 + +typedef struct SunSky +{ + short effect_type; + float turbidity; + float theta, phi; + + float toSun[3]; + + /*float sunSpectralRaddata[SPECTRUM_MAX_COMPONENTS];*/ + float sunSolidAngle; + + float zenith_Y, zenith_x, zenith_y; + + float perez_Y[5], perez_x[5], perez_y[5]; + + /* suggested by glome in + * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/ + float horizon_brightness; + float spread; + float sun_brightness; + float sun_size; + float backscattered_light; + + float atm_HGg; + + float atm_SunIntensity; + float atm_InscatteringMultiplier; + float atm_ExtinctionMultiplier; + float atm_BetaRayMultiplier; + float atm_BetaMieMultiplier; + float atm_DistanceMultiplier; + + float atm_BetaRay[3]; + float atm_BetaDashRay[3]; + float atm_BetaMie[3]; + float atm_BetaDashMie[3]; + float atm_BetaRM[3]; +}SunSky; + +/** + * InitSunSky: + * this function compute some sun,sky parameters according to input parameters and also initiate some other sun, sky parameters + * parameters: + * sunSky, is a structure that contains informtion about sun, sky and atmosphere, in this function, most of its values initiated + * turb, is atmosphere turbidity + * toSun, contains sun direction + * horizon_brighness, controls the brightness of the horizon colors + * spread, controls colors spreed at horizon + * sun_brightness, controls sun's brightness + * sun_size, controls sun's size + * back_scatter, controls back scatter light + * */ +void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_brightness, + float spread,float sun_brightness, float sun_size, float back_scatter); + +/** + * GetSkyXYZRadiance: + * this function compute sky radiance according to a view parameters `theta' and `phi'and sunSky values + * parameters: + * sunSky, sontains sun and sky parameters + * theta, is sun's theta + * phi, is sun's phi + * color_out, is computed color that shows sky radiance in XYZ color format + * */ +void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float color_out[3]); + +/** + * GetSkyXYZRadiancef: + * this function compute sky radiance according to a view direction `varg' and sunSky values + * parameters: + * sunSky, sontains sun and sky parameters + * varg, shows direction + * color_out, is computed color that shows sky radiance in XYZ color format + * */ +void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_out[3]); + +/** + * InitAtmosphere: + * this function intiate sunSky structure with user input parameters. + * parameters: + * sunSky, contains information about sun, and in this function some atmosphere parameters will initiated + * sun_intens, shows sun intensity value + * mief, Mie scattering factor this factor currently call with 1.0 + * rayf, Rayleigh scattering factor, this factor currently call with 1.0 + * inscattf, inscatter light factor that range from 0.0 to 1.0, 0.0 means no inscatter light and 1.0 means full inscatter light + * extincf, extinction light factor that range from 0.0 to 1.0, 0.0 means no extinction and 1.0 means full extinction + * disf, is distance factor, multiplyed to pixle's z value to compute each pixle's distance to camera, + * */ +void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float rayf, float inscattf, float extincf, float disf); + +/** + * AtmospherePixleShader: + * this function apply atmosphere effect on a pixle color `rgb' at distance `s' + * parameters: + * sunSky, contains information about sun parameters and user values + * view, is camera view vector + * s, is distance + * rgb, contains rendered color value for a pixle + * */ +void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3]); + +/** + * ClipColor: + * clip a color to range [0,1]; + * */ +void ClipColor(float c[3]); + +#endif /*SUNSKY_H_*/ diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 796a99ca796..daee892ad9a 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3494,6 +3494,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) LampRen *lar; GroupObject *go; float mat[4][4], angle, xn, yn; + float vec[3]; int c; /* previewrender sets this to zero... prevent accidents */ @@ -3576,8 +3577,9 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) lar->ray_samp_type= la->ray_samp_type; lar->adapt_thresh= la->adapt_thresh; + lar->sunsky = NULL; - if( ELEM3(lar->type, LA_SPOT, LA_SUN, LA_LOCAL)) { + if( ELEM(lar->type, LA_SPOT, LA_LOCAL)) { lar->ray_totsamp= lar->ray_samp*lar->ray_samp; lar->area_shape = LA_AREA_SQUARE; lar->area_sizey= lar->area_size; @@ -3607,6 +3609,26 @@ static GroupObject *add_render_lamp(Render *re, Object *ob) area_lamp_vectors(lar); init_jitter_plane(lar); // subsamples } + else if(lar->type==LA_SUN){ + lar->ray_totsamp= lar->ray_samp*lar->ray_samp; + lar->area_shape = LA_AREA_SQUARE; + lar->area_sizey= lar->area_size; + + if((la->sun_effect_type & LA_SUN_EFFECT_SKY) || + (la->sun_effect_type & LA_SUN_EFFECT_AP)){ + lar->sunsky = (struct SunSky*)MEM_callocN(sizeof(struct SunSky), "sunskyren"); + lar->sunsky->effect_type = la->sun_effect_type; + + VECCOPY(vec,ob->obmat[2]); + Normalize(vec); + + InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness, + la->spread, la->sun_brightness, la->sun_size, la->backscattered_light); + + InitAtmosphere(lar->sunsky, la->sun_intensity, 1.0, 1.0, la->atm_inscattering_factor, la->atm_extinction_factor, + la->atm_distance_factor); + } + } else lar->ray_totsamp= 0; #ifndef DISABLE_YAFRAY @@ -4447,6 +4469,7 @@ void RE_Database_Free(Render *re) freeshadowbuf(lar); if(lar->jitter) MEM_freeN(lar->jitter); if(lar->shadsamp) MEM_freeN(lar->shadsamp); + if(lar->sunsky) MEM_freeN(lar->sunsky); curvemapping_free(lar->curfalloff); } diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index fc5ac68e8c9..2e3509f0471 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -57,6 +57,7 @@ #include "rendercore.h" #include "shadbuf.h" #include "pixelshading.h" +#include "sunsky.h" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* defined in pipeline.c, is hardcopy of active dynamic allocated Render */ @@ -567,13 +568,49 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview) } } +/* shade sky according to sun lamps, all parameters are like shadeSkyView except sunsky*/ +void shadeSunView(struct SunSky *sunsky, float *colf, float *rco, float *view, float *dxyview) +{ + float colorxyz[3]; + float scale; + + /** + sunAngle = sqrt(sunsky->sunSolidAngle / M_PI); + + sunDir[0] = sunsky->toSun[0]; + sunDir[1] = sunsky->toSun[1]; + sunDir[2] = sunsky->toSun[2]; + */ + + Normalize(view); + MTC_Mat3MulVecfl(R.imat, view); + if (view[2] < 0.0) + view[2] = 0.0; + Normalize(view); + GetSkyXYZRadiancef(sunsky, view, colorxyz); + scale = MAX3(colorxyz[0], colorxyz[1], colorxyz[2]); + colorxyz[0] /= scale; + colorxyz[1] /= scale; + colorxyz[2] /= scale; + + xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &colf[0], &colf[1], &colf[2]); + + ClipColor(colf); +} + + /* Stuff the sky color into the collector. */ void shadeSkyPixel(float *collector, float fx, float fy) { float view[3], dxyview[2]; - + float sun_collector[3]; + float suns_color[3]; + short num_sun_lamp; + GroupObject *go; + LampRen *lar; + /* The rules for sky: 1. Draw an image, if a background image was provided. Stop @@ -585,7 +622,6 @@ void shadeSkyPixel(float *collector, float fx, float fy) /* 1. Do a backbuffer image: */ if(R.r.bufflag & 1) { fillBackgroundImage(collector, fx, fy); - return; } else if((R.wrld.skytype & (WO_SKYBLEND+WO_SKYTEX))==0) { /* 2. solid color */ @@ -620,7 +656,45 @@ void shadeSkyPixel(float *collector, float fx, float fy) shadeSkyView(collector, NULL, view, dxyview); collector[3] = 0.0f; } + + suns_color[0] = suns_color[1] = suns_color[2] = 0; + num_sun_lamp = 0; + for(go=R.lights.first; go; go= go->next) { + lar= go->lampren; + if(lar->type==LA_SUN && lar->sunsky && (lar->sunsky->effect_type & LA_SUN_EFFECT_SKY)){ + + num_sun_lamp ++; + calc_view_vector(view, fx, fy); + Normalize(view); + + shadeSunView(lar->sunsky, sun_collector, NULL, view, NULL); + suns_color[0] += sun_collector[0]; + suns_color[1] += sun_collector[1]; + suns_color[2] += sun_collector[2]; + + } + } + if( num_sun_lamp > 0 ){ + suns_color[0] /= num_sun_lamp; + suns_color[1] /= num_sun_lamp; + suns_color[2] /= num_sun_lamp; + + collector[0] += suns_color[0]; + collector[1] += suns_color[1]; + collector[2] += suns_color[2]; + ClipColor(collector); + } } +/* aerial perspective */ +void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy, float distance) +{ + float view[3]; + + calc_view_vector(view, fx, fy); + Normalize(view); + /*MTC_Mat3MulVecfl(R.imat, view);*/ + AtmospherePixleShader(sunsky, view, distance, collector); +} /* eof */ diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index dae7b0dcd88..67be0ce4c00 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -47,6 +47,7 @@ #include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_meshdata_types.h" +#include "DNA_group_types.h" #include "BKE_global.h" #include "BKE_image.h" @@ -665,6 +666,88 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl) } } +static void atm_tile(RenderPart *pa, RenderLayer *rl) +{ + RenderPass *zpass; + GroupObject *go; + LampRen *lar; + + int x, y; + short first_lamp; + float *zrect; + float *rgbrect; + float rgb[3]={0}; + float tmp_rgb[3]; + float fac; + float facm; + + fac = 0.5; + facm = 1.0 - fac; + + /* check that z pass is enabled */ + if(pa->rectz==NULL) return; + for(zpass= rl->passes.first; zpass; zpass= zpass->next) + if(zpass->passtype==SCE_PASS_Z) + break; + + if(zpass==NULL) return; + + /* check for at least one sun lamp that its atmosphere flag is is enabled */ + first_lamp = 1; + for(go=R.lights.first; go; go= go->next) { + lar= go->lampren; + if(lar->type==LA_SUN && lar->sunsky && + (lar->sunsky->effect_type & LA_SUN_EFFECT_AP)){ + first_lamp = 0; + break; + } + } + /* do nothign and return if there is no sun lamp */ + if(first_lamp) + return; + + zrect = zpass->rect; + rgbrect = rl->rectf; + /* for each x,y and sun lamp*/ + for(y=pa->disprect.ymin; ydisprect.ymax; y++) { + for(x=pa->disprect.xmin; xdisprect.xmax; x++, zrect++, rgbrect+=4) { + + first_lamp = 1; + for(go=R.lights.first; go; go= go->next) { + lar= go->lampren; + if(lar->type==LA_SUN && lar->sunsky) + + { + /* if it's sky continue and don't apply atmosphere effect on it */ + if(*zrect >= 9.9e10){ + continue; + } + + if(lar->sunsky->effect_type & LA_SUN_EFFECT_AP){ + VECCOPY(tmp_rgb, rgbrect); + + shadeAtmPixel(lar->sunsky, tmp_rgb, x, y, *zrect); + + if(first_lamp){ + VECCOPY(rgb, tmp_rgb); + first_lamp = 0; + } + else{ + rgb[0] = facm*rgb[0] + fac*tmp_rgb[0]; + rgb[1] = facm*rgb[1] + fac*tmp_rgb[1]; + rgb[2] = facm*rgb[2] + fac*tmp_rgb[2]; + } + } + } + } + + /* if at least for one sun lamp aerial perspective was applied*/ + if(first_lamp==0) + VECCOPY(rgbrect, rgb); + } + } +} + static void shadeDA_tile(RenderPart *pa, RenderLayer *rl) { RenderResult *rr= pa->result; @@ -1122,6 +1205,10 @@ void zbufshadeDA_tile(RenderPart *pa) if(R.r.mode & R_EDGE) edge_enhance_add(pa, rl->rectf, edgerect); + /* sun/sky */ + if(rl->layflag & SCE_LAY_SKY) + atm_tile(pa, rl); + if(rl->passflag & SCE_PASS_VECTOR) reset_sky_speed(pa, rl); @@ -1282,6 +1369,10 @@ void zbufshade_tile(RenderPart *pa) edge_enhance_add(pa, rl->rectf, edgerect); } + /* sun/sky */ + if(rl->layflag & SCE_LAY_SKY) + atm_tile(pa, rl); + if(rl->passflag & SCE_PASS_VECTOR) reset_sky_speed(pa, rl); diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c new file mode 100644 index 00000000000..191867765a3 --- /dev/null +++ b/source/blender/render/intern/source/sunsky.c @@ -0,0 +1,492 @@ + /** + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * ***** END GPL LICENSE BLOCK ***** + */ + + +#include "sunsky.h" +#include "math.h" +#include "BLI_arithb.h" + + +/** + * These macros are defined for vector operations + * */ + +/** + * compute v1 = v2 op v3 + * v1, v2 and v3 are vectors contains 3 float + * */ +#define vec3opv(v1, v2, op, v3) \ + v1[0] = (v2[0] op v3[0]); \ + v1[1] = (v2[1] op v3[1]);\ + v1[2] = (v2[2] op v3[2]); + +/** + * compute v1 = v2 op f1 + * v1, v2 are vectors contains 3 float + * and f1 is a float + * */ +#define vec3opf(v1, v2, op, f1)\ + v1[0] = (v2[0] op (f1));\ + v1[1] = (v2[1] op (f1));\ + v1[2] = (v2[2] op (f1)); + +/** + * compute v1 = f1 op v2 + * v1, v2 are vectors contains 3 float + * and f1 is a float + * */ +#define fopvec3(v1, f1, op, v2)\ + v1[0] = ((f1) op v2[0]);\ + v1[1] = ((f1) op v2[1]);\ + v1[2] = ((f1) op v2[2]); + +/** + * ClipColor: + * clip a color to range [0,1]; + * */ +void ClipColor(float c[3]) +{ + if (c[0] > 1.0) c[0] = 1.0; + if (c[0] < 0.0) c[0] = 0.0; + if (c[1] > 1.0) c[1] = 1.0; + if (c[1] < 0.0) c[1] = 0.0; + if (c[2] > 1.0) c[2] = 1.0; + if (c[2] < 0.0) c[2] = 0.0; +} + +/** + * AngleBetween: + * compute angle between to direction + * all angles are in radians + * */ +static float AngleBetween(float thetav, float phiv, float theta, float phi) +{ + float cospsi = sin(thetav) * sin(theta) * cos(phi - phiv) + cos(thetav) * cos(theta); + + if (cospsi > 1.0) + return 0; + if (cospsi < -1.0) + return M_PI; + + return acos(cospsi); +} + +/** + * DirectionToThetaPhi: + * this function convert a direction to it's theta and phi value + * parameters: + * toSun: contains direction information + * theta, phi, are return values from this conversion + * */ +static void DirectionToThetaPhi(float *toSun, float *theta, float *phi) +{ + *theta = acos(toSun[2]); + if (fabs(*theta) < 1e-5) + *phi = 0; + else + *phi = atan2(toSun[1], toSun[0]); +} + +/** + * PerezFunction: + * compute perez function value based on input paramters + * */ +float PerezFunction(struct SunSky *sunsky, const float *lam, float theta, float gamma, float lvz) +{ + float den, num; + + den = ((1 + lam[0] * exp(lam[1])) * + (1 + lam[2] * exp(lam[3] * sunsky->theta) + lam[4] * cos(sunsky->theta) * cos(sunsky->theta))); + + num = ((1 + lam[0] * exp(lam[1] / cos(theta))) * + (1 + lam[2] * exp(lam[3] * gamma) + lam[4] * cos(gamma) * cos(gamma))); + + return(lvz * num / den); +} + +/** + * InitSunSky: + * this function compute some sun,sky parameters according to input parameters and also initiate some other sun, sky parameters + * parameters: + * sunSky, is a structure that contains informtion about sun, sky and atmosphere, in this function, most of its values initiated + * turb, is atmosphere turbidity + * toSun, contains sun direction + * horizon_brighness, controls the brightness of the horizon colors + * spread, controls colors spreed at horizon + * sun_brightness, controls sun's brightness + * sun_size, controls sun's size + * back_scatter, controls back scatter light + * */ +void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_brightness, + float spread,float sun_brightness, float sun_size, float back_scatter) +{ + + float theta2; + float theta3; + float T; + float T2; + float chi; + + sunsky->turbidity = turb; + + sunsky->horizon_brightness = horizon_brightness; + sunsky->spread = spread; + sunsky->sun_brightness = sun_brightness; + sunsky->sun_size = sun_size; + sunsky->backscattered_light = back_scatter; + + sunsky->toSun[0] = toSun[0]; + sunsky->toSun[1] = toSun[1]; + sunsky->toSun[2] = toSun[2]; + + DirectionToThetaPhi(sunsky->toSun, &sunsky->theta, &sunsky->phi); + + sunsky->sunSolidAngle = 0.25 * M_PI * 1.39 * 1.39 / (150 * 150); // = 6.7443e-05 + + theta2 = sunsky->theta*sunsky->theta; + theta3 = theta2 * sunsky->theta; + T = turb; + T2 = turb*turb; + + chi = (4.0 / 9.0 - T / 120.0) * (M_PI - 2 * sunsky->theta); + sunsky->zenith_Y = (4.0453 * T - 4.9710) * tan(chi) - .2155 * T + 2.4192; + sunsky->zenith_Y *= 1000; // conversion from kcd/m^2 to cd/m^2 + + if (sunsky->zenith_Y<=0) + sunsky->zenith_Y = 1e-6; + + sunsky->zenith_x = + ( + 0.00165 * theta3 - 0.00374 * theta2 + 0.00208 * sunsky->theta + 0) * T2 + + ( -0.02902 * theta3 + 0.06377 * theta2 - 0.03202 * sunsky->theta + 0.00394) * T + + ( + 0.11693 * theta3 - 0.21196 * theta2 + 0.06052 * sunsky->theta + 0.25885); + + sunsky->zenith_y = + ( + 0.00275 * theta3 - 0.00610 * theta2 + 0.00316 * sunsky->theta + 0) * T2 + + ( -0.04214 * theta3 + 0.08970 * theta2 - 0.04153 * sunsky->theta + 0.00515) * T + + ( + 0.15346 * theta3 - 0.26756 * theta2 + 0.06669 * sunsky->theta + 0.26688); + + + sunsky->perez_Y[0] = 0.17872 * T - 1.46303; + sunsky->perez_Y[1] = -0.35540 * T + 0.42749; + sunsky->perez_Y[2] = -0.02266 * T + 5.32505; + sunsky->perez_Y[3] = 0.12064 * T - 2.57705; + sunsky->perez_Y[4] = -0.06696 * T + 0.37027; + + sunsky->perez_x[0] = -0.01925 * T - 0.25922; + sunsky->perez_x[1] = -0.06651 * T + 0.00081; + sunsky->perez_x[2] = -0.00041 * T + 0.21247; + sunsky->perez_x[3] = -0.06409 * T - 0.89887; + sunsky->perez_x[4] = -0.00325 * T + 0.04517; + + sunsky->perez_y[0] = -0.01669 * T - 0.26078; + sunsky->perez_y[1] = -0.09495 * T + 0.00921; + sunsky->perez_y[2] = -0.00792 * T + 0.21023; + sunsky->perez_y[3] = -0.04405 * T - 1.65369; + sunsky->perez_y[4] = -0.01092 * T + 0.05291; + + /* suggested by glome in + * http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9*/ + sunsky->perez_Y[0] *= sunsky->horizon_brightness; + sunsky->perez_x[0] *= sunsky->horizon_brightness; + sunsky->perez_y[0] *= sunsky->horizon_brightness; + + sunsky->perez_Y[1] *= sunsky->spread; + sunsky->perez_x[1] *= sunsky->spread; + sunsky->perez_y[1] *= sunsky->spread; + + sunsky->perez_Y[2] *= sunsky->sun_brightness; + sunsky->perez_x[2] *= sunsky->sun_brightness; + sunsky->perez_y[2] *= sunsky->sun_brightness; + + sunsky->perez_Y[3] *= sunsky->sun_size; + sunsky->perez_x[3] *= sunsky->sun_size; + sunsky->perez_y[3] *= sunsky->sun_size; + + sunsky->perez_Y[4] *= sunsky->backscattered_light; + sunsky->perez_x[4] *= sunsky->backscattered_light; + sunsky->perez_y[4] *= sunsky->backscattered_light; +} + +/** + * GetSkyXYZRadiance: + * this function compute sky radiance according to a view parameters `theta' and `phi'and sunSky values + * parameters: + * sunSky, sontains sun and sky parameters + * theta, is sun's theta + * phi, is sun's phi + * color_out, is computed color that shows sky radiance in XYZ color format + * */ +void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float color_out[3]) +{ + float gamma; + float x,y,Y,X,Z; + float hfade=1, nfade=1; + + + if (theta>(0.5*M_PI)) { + hfade = 1.0-(theta*M_1_PI-0.5)*2.0; + hfade = hfade*hfade*(3.0-2.0*hfade); + theta = 0.5*M_PI; + } + + if (sunsky->theta>(0.5*M_PI)) { + if (theta<=0.5*M_PI) { + nfade = 1.0-(0.5-theta*M_1_PI)*2.0; + nfade *= 1.0-(sunsky->theta*M_1_PI-0.5)*2.0; + nfade = nfade*nfade*(3.0-2.0*nfade); + } + } + + gamma = AngleBetween(theta, phi, sunsky->theta, sunsky->phi); + + // Compute xyY values + x = PerezFunction(sunsky, sunsky->perez_x, theta, gamma, sunsky->zenith_x); + y = PerezFunction(sunsky, sunsky->perez_y, theta, gamma, sunsky->zenith_y); + Y = nfade * hfade * PerezFunction(sunsky, sunsky->perez_Y, theta, gamma, sunsky->zenith_Y); + + X = (x / y) * Y; + Z = ((1 - x - y) / y) * Y; + + color_out[0] = X; + color_out[1] = Y; + color_out[2] = Z; +} + +/** + * GetSkyXYZRadiancef: + * this function compute sky radiance according to a view direction `varg' and sunSky values + * parameters: + * sunSky, sontains sun and sky parameters + * varg, shows direction + * color_out, is computed color that shows sky radiance in XYZ color format + * */ +void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_out[3]) +{ + float theta, phi; + float v[3]; + + VecCopyf(v, (float*)varg); + Normalize(v); + + if (v[2] < 0.001){ + v[2] = 0.001; + Normalize(v); + } + + DirectionToThetaPhi(v, &theta, &phi); + GetSkyXYZRadiance(sunsky, theta, phi, color_out); +} + +/** + * ComputeAttenuatedSunlight: + * this function compute attenuated sun light based on sun's theta and atmosphere turbidity + * parameters: + * theta, is sun's theta + * turbidity: is atmosphere turbidity + * fTau: contains computed attenuated sun light + * */ +void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) +{ + float fBeta ; + float fTauR, fTauA; + float m ; + float fAlpha; + + int i; + float fLambda[3]; + fLambda[0] = 0.65f; + fLambda[1] = 0.57f; + fLambda[2] = 0.475f; + + fAlpha = 1.3f; + fBeta = 0.04608365822050f * turbidity - 0.04586025928522f; + + m = 1.0/(cos(theta) + 0.15f*pow(93.885f-theta/M_PI*180.0f,-1.253f)); + + for(i = 0; i < 3; i++) + { + // Rayleigh Scattering + fTauR = exp( -m * 0.008735f * pow(fLambda[i], (float)(-4.08f))); + + // Aerosal (water + dust) attenuation + fTauA = exp(-m * fBeta * pow(fLambda[i], -fAlpha)); + + fTau[i] = fTauR * fTauA; + } +} + +/** + * InitAtmosphere: + * this function intiate sunSky structure with user input parameters. + * parameters: + * sunSky, contains information about sun, and in this function some atmosphere parameters will initiated + * sun_intens, shows sun intensity value + * mief, Mie scattering factor this factor currently call with 1.0 + * rayf, Rayleigh scattering factor, this factor currently call with 1.0 + * inscattf, inscatter light factor that range from 0.0 to 1.0, 0.0 means no inscatter light and 1.0 means full inscatter light + * extincf, extinction light factor that range from 0.0 to 1.0, 0.0 means no extinction and 1.0 means full extinction + * disf, is distance factor, multiplyed to pixle's z value to compute each pixle's distance to camera, + * */ +void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float rayf, + float inscattf, float extincf, float disf) +{ + const float pi = 3.14159265358f; + const float n = 1.003f; // refractive index + const float N = 2.545e25; + const float pn = 0.035f; + const float T = 2.0f; + float fTemp, fTemp2, fTemp3, fBeta, fBetaDash; + float c = (6.544*T - 6.51)*1e-17; + float K[3] = {0.685f, 0.679f, 0.670f}; + float vBetaMieTemp[3]; + + float fLambda[3],fLambda2[3], fLambda4[3]; + float vLambda2[3]; + float vLambda4[3]; + + int i; + + sunSky->atm_SunIntensity = sun_intens; + sunSky->atm_BetaMieMultiplier = mief; + sunSky->atm_BetaRayMultiplier = rayf; + sunSky->atm_InscatteringMultiplier = inscattf; + sunSky->atm_ExtinctionMultiplier = extincf; + sunSky->atm_DistanceMultiplier = disf; + + sunSky->atm_HGg=0.8; + + fLambda[0] = 1/650e-9f; + fLambda[1] = 1/570e-9f; + fLambda[2] = 1/475e-9f; + for (i=0; i < 3; i++) + { + fLambda2[i] = fLambda[i]*fLambda[i]; + fLambda4[i] = fLambda2[i]*fLambda2[i]; + } + + vLambda2[0] = fLambda2[0]; + vLambda2[1] = fLambda2[1]; + vLambda2[2] = fLambda2[2]; + + vLambda4[0] = fLambda4[0]; + vLambda4[1] = fLambda4[1]; + vLambda4[2] = fLambda4[2]; + + // Rayleigh scattering constants. + fTemp = pi*pi*(n*n-1)*(n*n-1)*(6+3*pn)/(6-7*pn)/N; + fBeta = 8*fTemp*pi/3; + + vec3opf(sunSky->atm_BetaRay, vLambda4, *, fBeta); + fBetaDash = fTemp/2; + vec3opf(sunSky->atm_BetaDashRay, vLambda4,*, fBetaDash); + + + // Mie scattering constants. + fTemp2 = 0.434*c*(2*pi)*(2*pi)*0.5f; + vec3opf(sunSky->atm_BetaDashMie, vLambda2, *, fTemp2); + + fTemp3 = 0.434f*c*pi*(2*pi)*(2*pi); + + vec3opv(vBetaMieTemp, K, *, fLambda); + vec3opf(sunSky->atm_BetaMie, vBetaMieTemp,*, fTemp3); + +} + +/** + * AtmospherePixleShader: + * this function apply atmosphere effect on a pixle color `rgb' at distance `s' + * parameters: + * sunSky, contains information about sun parameters and user values + * view, is camera view vector + * s, is distance + * rgb, contains rendered color value for a pixle + * */ +void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3]) +{ + float costheta; + float Phase_1; + float Phase_2; + float sunColor[3]; + + float E[3]; + float E1[3]; + + + float I[3]; + float fTemp; + float vTemp1[3], vTemp2[3]; + + float sunDirection[3]; + + s *= sunSky->atm_DistanceMultiplier; + + sunDirection[0] = sunSky->toSun[0]; + sunDirection[1] = sunSky->toSun[1]; + sunDirection[2] = sunSky->toSun[2]; + + costheta = Inpf(view, sunDirection); // cos(theta) + Phase_1 = 1 + (costheta * costheta); // Phase_1 + + vec3opf(sunSky->atm_BetaRay, sunSky->atm_BetaRay, *, sunSky->atm_BetaRayMultiplier); + vec3opf(sunSky->atm_BetaMie, sunSky->atm_BetaMie, *, sunSky->atm_BetaMieMultiplier); + vec3opv(sunSky->atm_BetaRM, sunSky->atm_BetaRay, +, sunSky->atm_BetaMie); + + //e^(-(beta_1 + beta_2) * s) = E1 + vec3opf(E1, sunSky->atm_BetaRM, *, -s/log(2)); + E1[0] = exp(E1[0]); + E1[1] = exp(E1[1]); + E1[2] = exp(E1[2]); + + VecCopyf(E, E1); + + //Phase2(theta) = (1-g^2)/(1+g-2g*cos(theta))^(3/2) + fTemp = 1 + sunSky->atm_HGg - 2 * sunSky->atm_HGg * costheta; + fTemp = fTemp * sqrt(fTemp); + Phase_2 = (1 - sunSky->atm_HGg * sunSky->atm_HGg)/fTemp; + + vec3opf(vTemp1, sunSky->atm_BetaDashRay, *, Phase_1); + vec3opf(vTemp2, sunSky->atm_BetaDashMie, *, Phase_2); + + vec3opv(vTemp1, vTemp1, +, vTemp2); + fopvec3(vTemp2, 1.0, -, E1); + vec3opv(vTemp1, vTemp1, *, vTemp2); + + fopvec3(vTemp2, 1.0, / , sunSky->atm_BetaRM); + + vec3opv(I, vTemp1, *, vTemp2); + + vec3opf(I, I, *, sunSky->atm_InscatteringMultiplier); + vec3opf(E, E, *, sunSky->atm_ExtinctionMultiplier); + + //scale to color sun + ComputeAttenuatedSunlight(sunSky->theta, sunSky->turbidity, sunColor); + vec3opv(E, E, *, sunColor); + + vec3opf(I, I, *, sunSky->atm_SunIntensity); + + vec3opv(rgb, rgb, *, E); + vec3opv(rgb, rgb, +, I); +} + +#undef vec3opv +#undef vec3opf +#undef fopvec3 + +/* EOF */ diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 04a497ffdea..ca6705b2084 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2803,6 +2803,42 @@ static void lamp_panel_yafray(Object *ob, Lamp *la) } +static void lamp_panel_atmosphere(Object *ob, Lamp *la) +{ + uiBlock *block; + int y; + block= uiNewBlock(&curarea->uiblocks, "lamp_panel_atm", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Shadow and Spot", "Lamp"); + if(uiNewPanel(curarea, block, "Sky/Atmosphere", "Lamp", 3*PANELX, PANELY, PANELW, PANELH)==0) return; + + uiSetButLock(la->id.lib!=0, ERROR_LIBDATA_MESSAGE); + + uiDefButBitS(block, TOG, LA_SUN_EFFECT_SKY, REDRAWVIEW3D, "Sky", 10,205,BUTW2,20,&(la->sun_effect_type), 0, 0, 0, 0, "Apply sun light effect on sky."); + uiDefButBitS(block, TOG, LA_SUN_EFFECT_AP, REDRAWVIEW3D, "Atmosphere", 20+BUTW2,205,BUTW2,20,&(la->sun_effect_type), 0, 0, 0, 0, "Apply sun light effect on atmosphere."); + + if(la->sun_effect_type & (LA_SUN_EFFECT_SKY|LA_SUN_EFFECT_AP)){ + uiDefButF(block, NUM, B_LAMPREDRAW, "Turbidity:",10,180,BUTW1,19, &(la->atm_turbidity), 1.000f, 30.0f, 1, 0, "Sky Turbidity"); + } + + y = 180; + if(la->sun_effect_type & LA_SUN_EFFECT_SKY) + { + uiDefButF(block, NUM, B_LAMPREDRAW, "Hor.Bright:",10,y-25,BUTW2,19, &(la->horizon_brightness), 0.00f, 20.00f, 10, 0, "Sets horizon brightness."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Hor.Spread:",10,y-50,BUTW2,19, &(la->spread), 0.00f, 10.00f, 10, 0, "Sets horizon spread."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Sun Bright:",10,y-75,BUTW2,19, &(la->sun_brightness), 0.00f, 10.0f, 10, 0, "Sets sun brightness."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Sun Size:",10,y-100,BUTW2,19, &(la->sun_size), 0.00f, 10.00f, 10, 0, "Sets sun size."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Back Light:",10,y-125,BUTW2,19, &(la->backscattered_light), -1.00f, 1.00f, 10, 0, "Sets backscatter light."); + } + + if(la->sun_effect_type & LA_SUN_EFFECT_AP) + { + uiDefButF(block, NUM, B_LAMPREDRAW, "Sun Intens.:",20+BUTW2,y-25,BUTW2,19, &(la->sun_intensity), 0.00f, 10.00f, 10, 0, "Sets sun intensity."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Inscattering:",20+BUTW2,y-50,BUTW2,19, &(la->atm_inscattering_factor), 0.00f, 1.00f, 10, 0, "In Scattering Contribution Factor."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Extinction:",20+BUTW2,y-75,BUTW2,19, &(la->atm_extinction_factor), 0.00f, 1.00f, 10, 0, "Extinction Scattering Contribution Factor."); + uiDefButF(block, NUM, B_LAMPREDRAW, "Distance:",20+BUTW2,y-100,BUTW2,19, &(la->atm_distance_factor), 0.000f, 500.0f, 10, 0, "Scale blender distance to real distance."); + } +} + static void lamp_panel_falloff(Object *ob, Lamp *la) { uiBlock *block; @@ -4354,6 +4390,11 @@ void lamp_panels() /* spherelight radius default is zero, so nothing to do */ lamp_panel_yafray(ob, la); } + + if(la->type == LA_SUN){ + lamp_panel_atmosphere(ob, ob->data); + } + lamp_panel_texture(ob, ob->data); lamp_panel_mapto(ob, ob->data); From 70c33ec526aad53df4f08329d7f514bbb7706724 Mon Sep 17 00:00:00 2001 From: Simon Clitherow Date: Thu, 3 Jul 2008 19:10:54 +0000 Subject: [PATCH 326/430] Window Installer: A couple of fixes: - uninstaller now deletes itself (oops! :) - uninstaller now correctly locates \.blender for removal. --- release/windows/installer/00.sconsblender.nsi | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi index 338075c1b18..c96b188fb02 100644 --- a/release/windows/installer/00.sconsblender.nsi +++ b/release/windows/installer/00.sconsblender.nsi @@ -353,6 +353,7 @@ Section "Blender-VERSION (required)" SecCopyUI SetOutPath $INSTDIR ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\BlenderFoundation "Install_Dir" "$INSTDIR" + WriteRegStr HKLM SOFTWARE\BlenderFoundation "Home_Dir" "$BLENDERHOME" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayName" "Blender (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "UninstallString" '"$INSTDIR\uninstall.exe"' @@ -406,28 +407,32 @@ SectionEnd UninstallText "This will uninstall Blender VERSION. Hit next to continue." Section "Uninstall" + Delete $INSTDIR\uninstall.exe + + ReadRegStr $BLENDERHOME HKLM "SOFTWARE\BlenderFoundation" "Home_Dir" + ; remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" DeleteRegKey HKLM SOFTWARE\BlenderFoundation ; remove files [DELROOTDIRCONTS] - Delete $INSTDIR\.blender\.bfont.ttf - Delete $INSTDIR\.blender\.Blanguages + Delete $BLENDERHOME\.blender\.bfont.ttf + Delete $BLENDERHOME\.blender\.Blanguages ; remove shortcuts, if any. Delete "$SMPROGRAMS\Blender Foundation\Blender\*.*" Delete "$DESKTOP\Blender.lnk" ; remove directories used. - RMDir /r $INSTDIR\.blender\locale + RMDir /r $BLENDERHOME\.blender\locale MessageBox MB_YESNO "Erase .blender\scripts folder? (ALL contents will be erased!)" IDNO Next - RMDir /r $INSTDIR\.blender\scripts - RMDir /r $INSTDIR\.blender\scripts\bpymodules - RMDir /r $INSTDIR\.blender\scripts\bpydata - RMDir /r $INSTDIR\.blender\scripts\bpydata\config + RMDir /r $BLENDERHOME\.blender\scripts + RMDir /r $BLENDERHOME\.blender\scripts\bpymodules + RMDir /r $BLENDERHOME\.blender\scripts\bpydata + RMDir /r $BLENDERHOME\.blender\scripts\bpydata\config Next: - RMDir /r $INSTDIR\plugins\include - RMDir /r $INSTDIR\plugins - RMDir $INSTDIR\.blender + RMDir /r $BLENDERHOME\plugins\include + RMDir /r $BLENDERHOME\plugins + RMDir $BLENDERHOME\.blender RMDir "$SMPROGRAMS\Blender Foundation\Blender" RMDir "$SMPROGRAMS\Blender Foundation" RMDir "$INSTDIR" From 5c93e756823cda49466ce7e546268d551fb7de2f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Jul 2008 00:05:50 +0000 Subject: [PATCH 327/430] non user visible changes and small optimizations to the game engine pyapi as well as fixing some bugs. * 2 returning errors without exception set another return None instead of NULL. * a missing check for parent relation * BPY matrix length was incorrect in matrix.c, this change could break some scripts, however when a script expects a list of lists for a matrix, the len() function is incorrect and will give an error. This was the only thing stopping apricot game logic running in trunk. Also added a function for GameObjects - getAxisVect(vec), multiplies the vector be the objects worldspace rotation matrix. Very useful if you want to know what the forward direction is for an object and dont want to use Blender.Mathutils which is tedious and not available in BlenderPlayer yet. --- source/blender/python/api2_2x/matrix.c | 2 +- source/gameengine/Expressions/PyObjectPlus.h | 27 ++ .../GameLogic/SCA_PythonController.cpp | 79 ++--- .../GameLogic/SCA_PythonController.h | 21 +- source/gameengine/Ketsji/KX_GameObject.cpp | 332 ++++++++---------- source/gameengine/Ketsji/KX_GameObject.h | 57 ++- source/gameengine/PyDoc/KX_GameObject.py | 13 +- 7 files changed, 238 insertions(+), 293 deletions(-) diff --git a/source/blender/python/api2_2x/matrix.c b/source/blender/python/api2_2x/matrix.c index d81e56ec3dc..9f5e49e8d88 100644 --- a/source/blender/python/api2_2x/matrix.c +++ b/source/blender/python/api2_2x/matrix.c @@ -483,7 +483,7 @@ static char MatrixObject_doc[] = "This is a wrapper for matrix objects."; sequence length*/ static int Matrix_len(MatrixObject * self) { - return (self->colSize * self->rowSize); + return (self->rowSize); } /*----------------------------object[]--------------------------- sequence accessor (get) diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index de89ed9b5c8..04cc119efee 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -99,6 +99,18 @@ static inline void Py_Fatal(char *M) { return ((class_name*) self)->Py##method_name(self, args, kwds); \ }; \ +#define KX_PYMETHOD_NOARGS(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self); \ + static PyObject* sPy##method_name( PyObject* self) { \ + return ((class_name*) self)->Py##method_name(self); \ + }; \ + +#define KX_PYMETHOD_O(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self, PyObject* value); \ + static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ + return ((class_name*) self)->Py##method_name(self, value); \ + }; \ + #define KX_PYMETHOD_DOC(class_name, method_name) \ PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \ @@ -106,6 +118,21 @@ static inline void Py_Fatal(char *M) { }; \ static char method_name##_doc[]; \ +#define KX_PYMETHOD_DOC_O(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self, PyObject* value); \ + static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ + return ((class_name*) self)->Py##method_name(self, value); \ + }; \ + static char method_name##_doc[]; \ + +#define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \ + PyObject* Py##method_name(PyObject* self); \ + static PyObject* sPy##method_name( PyObject* self) { \ + return ((class_name*) self)->Py##method_name(self); \ + }; \ + static char method_name##_doc[]; \ + + /* The line above should remain empty */ /** * Method table macro (with doc) diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index be00117cd21..76386079bdf 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -144,9 +144,7 @@ static char* sPyGetCurrentController__doc__; #endif -PyObject* SCA_PythonController::sPyGetCurrentController(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_PythonController::sPyGetCurrentController(PyObject* self) { m_sCurrentController->AddRef(); return m_sCurrentController; @@ -159,8 +157,7 @@ static char* sPyAddActiveActuator__doc__; PyObject* SCA_PythonController::sPyAddActiveActuator( PyObject* self, - PyObject* args, - PyObject* kwds) + PyObject* args) { PyObject* ob1; @@ -187,8 +184,7 @@ PyObject* SCA_PythonController::sPyAddActiveActuator( m_sCurrentLogicManager->AddActiveActuator((SCA_IActuator*)act,boolval); boolval->Release(); } - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } @@ -222,17 +218,13 @@ PyParentObject SCA_PythonController::Parents[] = { NULL }; PyMethodDef SCA_PythonController::Methods[] = { - {"getActuators", (PyCFunction) SCA_PythonController::sPyGetActuators, - METH_VARARGS, SCA_PythonController::GetActuators_doc}, - {"getActuator", (PyCFunction) SCA_PythonController::sPyGetActuator, - METH_VARARGS, SCA_PythonController::GetActuator_doc}, - {"getSensors", (PyCFunction) SCA_PythonController::sPyGetSensors, - METH_VARARGS, SCA_PythonController::GetSensors_doc}, - {"getSensor", (PyCFunction) SCA_PythonController::sPyGetSensor, - METH_VARARGS, SCA_PythonController::GetSensor_doc}, - {"getScript", (PyCFunction) SCA_PythonController::sPyGetScript, METH_VARARGS}, - {"setScript", (PyCFunction) SCA_PythonController::sPySetScript, METH_VARARGS}, - {"getState", (PyCFunction) SCA_PythonController::sPyGetState, METH_VARARGS}, + {"getActuators", (PyCFunction) SCA_PythonController::sPyGetActuators, METH_NOARGS, SCA_PythonController::GetActuators_doc}, + {"getActuator", (PyCFunction) SCA_PythonController::sPyGetActuator, METH_O, SCA_PythonController::GetActuator_doc}, + {"getSensors", (PyCFunction) SCA_PythonController::sPyGetSensors, METH_NOARGS, SCA_PythonController::GetSensors_doc}, + {"getSensor", (PyCFunction) SCA_PythonController::sPyGetSensor, METH_O, SCA_PythonController::GetSensor_doc}, + {"getScript", (PyCFunction) SCA_PythonController::sPyGetScript, METH_NOARGS}, + {"setScript", (PyCFunction) SCA_PythonController::sPySetScript, METH_O}, + {"getState", (PyCFunction) SCA_PythonController::sPyGetState, METH_NOARGS}, {NULL,NULL} //Sentinel }; @@ -330,14 +322,12 @@ PyObject* SCA_PythonController::_getattr(const STR_String& attr) -PyObject* SCA_PythonController::PyGetActuators(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_PythonController::PyGetActuators(PyObject* self) { PyObject* resultlist = PyList_New(m_linkedactuators.size()); for (unsigned int index=0;indexAddRef()); + PyList_SET_ITEM(resultlist,index,m_linkedactuators[index]->AddRef()); } return resultlist; @@ -346,14 +336,12 @@ PyObject* SCA_PythonController::PyGetActuators(PyObject* self, char SCA_PythonController::GetSensor_doc[] = "GetSensor (char sensorname) return linked sensor that is named [sensorname]\n"; PyObject* -SCA_PythonController::PyGetSensor(PyObject* self, - PyObject* args, - PyObject* kwds) +SCA_PythonController::PyGetSensor(PyObject* self, PyObject* value) { - char *scriptArg; - - if (!PyArg_ParseTuple(args, "s", &scriptArg)) { + char *scriptArg = PyString_AsString(value); + if (scriptArg==NULL) { + PyErr_SetString(PyExc_TypeError, "expected a string (sensor name)"); return NULL; } @@ -376,14 +364,12 @@ SCA_PythonController::PyGetSensor(PyObject* self, char SCA_PythonController::GetActuator_doc[] = "GetActuator (char sensorname) return linked actuator that is named [actuatorname]\n"; PyObject* -SCA_PythonController::PyGetActuator(PyObject* self, - PyObject* args, - PyObject* kwds) +SCA_PythonController::PyGetActuator(PyObject* self, PyObject* value) { - char *scriptArg; - - if (!PyArg_ParseTuple(args, "s", &scriptArg)) { + char *scriptArg = PyString_AsString(value); + if (scriptArg==NULL) { + PyErr_SetString(PyExc_TypeError, "expected a string (actuator name)"); return NULL; } @@ -404,34 +390,29 @@ SCA_PythonController::PyGetActuator(PyObject* self, char SCA_PythonController::GetSensors_doc[] = "getSensors returns a list of all attached sensors"; PyObject* -SCA_PythonController::PyGetSensors(PyObject* self, - PyObject* args, - PyObject* kwds) +SCA_PythonController::PyGetSensors(PyObject* self) { PyObject* resultlist = PyList_New(m_linkedsensors.size()); for (unsigned int index=0;indexAddRef()); + PyList_SET_ITEM(resultlist,index,m_linkedsensors[index]->AddRef()); } return resultlist; } /* 1. getScript */ -PyObject* SCA_PythonController::PyGetScript(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_PythonController::PyGetScript(PyObject* self) { return PyString_FromString(m_scriptText); } /* 2. setScript */ -PyObject* SCA_PythonController::PySetScript(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_PythonController::PySetScript(PyObject* self, PyObject* value) { - char *scriptArg; - if (!PyArg_ParseTuple(args, "s", &scriptArg)) { + char *scriptArg = PyString_AsString(value); + if (scriptArg==NULL) { + PyErr_SetString(PyExc_TypeError, "expected a string (script name)"); return NULL; } @@ -440,13 +421,11 @@ PyObject* SCA_PythonController::PySetScript(PyObject* self, this->SetScriptText(scriptArg); - Py_Return; + Py_RETURN_NONE; } /* 1. getScript */ -PyObject* SCA_PythonController::PyGetState(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_PythonController::PyGetState(PyObject* self) { return PyInt_FromLong(m_statemask); } diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h index f3af54f402f..39b6c68c359 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.h +++ b/source/gameengine/GameLogic/SCA_PythonController.h @@ -66,22 +66,19 @@ class SCA_PythonController : public SCA_IController void SetDictionary(PyObject* pythondictionary); static char* sPyGetCurrentController__doc__; - static PyObject* sPyGetCurrentController(PyObject* self, - PyObject* args, - PyObject* kwds); + static PyObject* sPyGetCurrentController(PyObject* self); static char* sPyAddActiveActuator__doc__; static PyObject* sPyAddActiveActuator(PyObject* self, - PyObject* args, - PyObject* kwds); + PyObject* args); virtual PyObject* _getattr(const STR_String& attr); - KX_PYMETHOD_DOC(SCA_PythonController,GetSensors); - KX_PYMETHOD_DOC(SCA_PythonController,GetSensor); - KX_PYMETHOD_DOC(SCA_PythonController,GetActuator); - KX_PYMETHOD_DOC(SCA_PythonController,GetActuators); - KX_PYMETHOD(SCA_PythonController,SetScript); - KX_PYMETHOD(SCA_PythonController,GetScript); - KX_PYMETHOD(SCA_PythonController,GetState); + KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetSensors); + KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetActuators); + KX_PYMETHOD_DOC_O(SCA_PythonController,GetSensor); + KX_PYMETHOD_DOC_O(SCA_PythonController,GetActuator); + KX_PYMETHOD_O(SCA_PythonController,SetScript); + KX_PYMETHOD_NOARGS(SCA_PythonController,GetScript); + KX_PYMETHOD_NOARGS(SCA_PythonController,GetState); }; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 993e852a7ee..c4925cb772c 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -648,7 +648,6 @@ MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) { MT_Vector3 velocity(0.0,0.0,0.0), locvel; MT_Matrix3x3 ori; - int i, j; if (m_pPhysicsController1) { velocity = m_pPhysicsController1->GetLinearVelocity(); @@ -668,7 +667,6 @@ MT_Vector3 KX_GameObject::GetAngularVelocity(bool local) { MT_Vector3 velocity(0.0,0.0,0.0), locvel; MT_Matrix3x3 ori; - int i, j; if (m_pPhysicsController1) { velocity = m_pPhysicsController1->GetAngularVelocity(); @@ -802,36 +800,37 @@ void KX_GameObject::Suspend(void) PyMethodDef KX_GameObject::Methods[] = { - {"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_VARARGS}, - {"getVisible",(PyCFunction) KX_GameObject::sPyGetVisible, METH_VARARGS}, - {"setState",(PyCFunction) KX_GameObject::sPySetState, METH_VARARGS}, - {"getState",(PyCFunction) KX_GameObject::sPyGetState, METH_VARARGS}, - {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS}, - {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_VARARGS}, - {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_VARARGS}, - {"getOrientation", (PyCFunction) KX_GameObject::sPyGetOrientation, METH_VARARGS}, - {"setOrientation", (PyCFunction) KX_GameObject::sPySetOrientation, METH_VARARGS}, + {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_NOARGS}, + {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_O}, {"getLinearVelocity", (PyCFunction) KX_GameObject::sPyGetLinearVelocity, METH_VARARGS}, {"setLinearVelocity", (PyCFunction) KX_GameObject::sPySetLinearVelocity, METH_VARARGS}, {"getVelocity", (PyCFunction) KX_GameObject::sPyGetVelocity, METH_VARARGS}, - {"getMass", (PyCFunction) KX_GameObject::sPyGetMass, METH_VARARGS}, - {"getReactionForce", (PyCFunction) KX_GameObject::sPyGetReactionForce, METH_VARARGS}, + {"getMass", (PyCFunction) KX_GameObject::sPyGetMass, METH_NOARGS}, + {"getReactionForce", (PyCFunction) KX_GameObject::sPyGetReactionForce, METH_NOARGS}, + {"getOrientation", (PyCFunction) KX_GameObject::sPyGetOrientation, METH_NOARGS}, + {"setOrientation", (PyCFunction) KX_GameObject::sPySetOrientation, METH_O}, + {"getVisible",(PyCFunction) KX_GameObject::sPyGetVisible, METH_NOARGS}, + {"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_O}, + {"getState",(PyCFunction) KX_GameObject::sPyGetState, METH_NOARGS}, + {"setState",(PyCFunction) KX_GameObject::sPySetState, METH_O}, + {"alignAxisToVect",(PyCFunction) KX_GameObject::sPyAlignAxisToVect, METH_VARARGS}, + {"getAxisVect",(PyCFunction) KX_GameObject::sPyGetAxisVect, METH_O}, + {"suspendDynamics", (PyCFunction)KX_GameObject::sPySuspendDynamics,METH_NOARGS}, + {"restoreDynamics", (PyCFunction)KX_GameObject::sPyRestoreDynamics,METH_NOARGS}, + {"enableRigidBody", (PyCFunction)KX_GameObject::sPyEnableRigidBody,METH_NOARGS}, + {"disableRigidBody", (PyCFunction)KX_GameObject::sPyDisableRigidBody,METH_NOARGS}, {"applyImpulse", (PyCFunction) KX_GameObject::sPyApplyImpulse, METH_VARARGS}, - {"setCollisionMargin", (PyCFunction) KX_GameObject::sPySetCollisionMargin, METH_VARARGS}, - {"suspendDynamics", (PyCFunction)KX_GameObject::sPySuspendDynamics,METH_VARARGS}, - {"restoreDynamics", (PyCFunction)KX_GameObject::sPyRestoreDynamics,METH_VARARGS}, - {"enableRigidBody", (PyCFunction)KX_GameObject::sPyEnableRigidBody,METH_VARARGS}, - {"disableRigidBody", (PyCFunction)KX_GameObject::sPyDisableRigidBody,METH_VARARGS}, - {"getParent", (PyCFunction)KX_GameObject::sPyGetParent,METH_VARARGS}, - {"setParent", (PyCFunction)KX_GameObject::sPySetParent,METH_VARARGS}, - {"removeParent", (PyCFunction)KX_GameObject::sPyRemoveParent,METH_VARARGS}, + {"setCollisionMargin", (PyCFunction) KX_GameObject::sPySetCollisionMargin, METH_O}, + {"getParent", (PyCFunction)KX_GameObject::sPyGetParent,METH_NOARGS}, + {"setParent", (PyCFunction)KX_GameObject::sPySetParent,METH_O}, + {"removeParent", (PyCFunction)KX_GameObject::sPyRemoveParent,METH_NOARGS}, {"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS}, - {"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_VARARGS}, - {"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_VARARGS}, - {"endObject",(PyCFunction) KX_GameObject::sPyEndObject, METH_VARARGS}, - KX_PYMETHODTABLE(KX_GameObject, getDistanceTo), + {"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_NOARGS}, + {"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_NOARGS}, + {"endObject",(PyCFunction) KX_GameObject::sPyEndObject, METH_NOARGS}, KX_PYMETHODTABLE(KX_GameObject, rayCastTo), KX_PYMETHODTABLE(KX_GameObject, rayCast), + KX_PYMETHODTABLE(KX_GameObject, getDistanceTo), {NULL,NULL} //Sentinel }; @@ -853,18 +852,7 @@ bool KX_GameObject::ConvertPythonVectorArgs(PyObject* args, } */ - -PyObject* KX_GameObject::sPySetPosition(PyObject* self, - PyObject* args, - PyObject* kwds) -{ - return ((KX_GameObject*) self)->PySetPosition(self, args, kwds); -} - - -PyObject* KX_GameObject::PyEndObject(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyEndObject(PyObject* self) { KX_Scene *scene = PHY_GetActiveScene(); @@ -875,9 +863,7 @@ PyObject* KX_GameObject::PyEndObject(PyObject* self, } -PyObject* KX_GameObject::PyGetPosition(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetPosition(PyObject* self) { return PyObjectFrom(NodeGetWorldPosition()); } @@ -931,7 +917,7 @@ PyObject* KX_GameObject::_getattr(const STR_String& attr) parent->AddRef(); return parent; } - Py_Return; + Py_RETURN_NONE; } if (attr == "visible") @@ -982,7 +968,7 @@ int KX_GameObject::_setattr(const STR_String& attr, PyObject *value) // _setattr { MT_Scalar val = PyFloat_AsDouble(value); if (attr == "timeOffset") { - if (m_pSGNode->GetSGParent()->IsSlowParent()) { + if (m_pSGNode->GetSGParent() && m_pSGNode->GetSGParent()->IsSlowParent()) { static_cast(m_pSGNode->GetSGParent()->GetParentRelation())->SetTimeOffset(val); return 0; } else { @@ -1103,68 +1089,57 @@ PyObject* KX_GameObject::PySetLinearVelocity(PyObject* self, MT_Vector3 velocity; if (PyVecTo(pyvect, velocity)) { setLinearVelocity(velocity, (local!=0)); - Py_Return; + Py_RETURN_NONE; } } return NULL; } -PyObject* KX_GameObject::PySetVisible(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetVisible(PyObject* self, PyObject* value) { - int visible = 1; + int visible = PyInt_AsLong(value); - if (PyArg_ParseTuple(args,"i",&visible)) - { - MarkVisible(visible!=0); - m_bVisible = (visible!=0); + if (visible==-1 && PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "expected 0 or 1"); + return NULL; } - else - { - return NULL; - } - Py_Return; + + MarkVisible(visible!=0); + m_bVisible = (visible!=0); + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetVisible(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetVisible(PyObject* self) { return PyInt_FromLong(m_bVisible); } -PyObject* KX_GameObject::PyGetState(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetState(PyObject* self) { int state = 0; state |= GetState(); return PyInt_FromLong(state); } -PyObject* KX_GameObject::PySetState(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetState(PyObject* self, PyObject* value) { - int state_i; + int state_i = PyInt_AsLong(value); unsigned int state = 0; - if (PyArg_ParseTuple(args,"i",&state_i)) - { - state |= state_i; - if ((state & ((1<<30)-1)) == 0) { - PyErr_SetString(PyExc_AttributeError, "The state bitfield was not between 0 and 30 (1<<0 and 1<<29)"); - return NULL; - } - SetState(state); + if (state_i == -1 && PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "expected an int bit field"); + return NULL; } - else - { - return NULL; + + state |= state_i; + if ((state & ((1<<30)-1)) == 0) { + PyErr_SetString(PyExc_AttributeError, "The state bitfield was not between 0 and 30 (1<<0 and 1<<29)"); + return NULL; } - Py_Return; + SetState(state); + + Py_RETURN_NONE; } @@ -1198,26 +1173,14 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* self, -PyObject* KX_GameObject::PyGetMass(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetMass(PyObject* self) { - PyObject* pymass = NULL; - - float mass = GetPhysicsController()->GetMass(); - pymass = PyFloat_FromDouble(mass); - - if (pymass) - return pymass; - - Py_Return; + return PyFloat_FromDouble(GetPhysicsController()->GetMass()); } -PyObject* KX_GameObject::PyGetReactionForce(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetReactionForce(PyObject* self) { // only can get the velocity if we have a physics object connected to us... return PyObjectFrom(GetPhysicsController()->getReactionForce()); @@ -1225,32 +1188,25 @@ PyObject* KX_GameObject::PyGetReactionForce(PyObject* self, -PyObject* KX_GameObject::PyEnableRigidBody(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyEnableRigidBody(PyObject* self) { - GetPhysicsController()->setRigidBody(true); - Py_Return; + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyDisableRigidBody(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyDisableRigidBody(PyObject* self) { GetPhysicsController()->setRigidBody(false); - Py_Return; + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetParent(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetParent(PyObject* self) { KX_GameObject* parent = this->GetParent(); if (parent) @@ -1258,37 +1214,31 @@ PyObject* KX_GameObject::PyGetParent(PyObject* self, parent->AddRef(); return parent; } - Py_Return; + Py_RETURN_NONE; } -PyObject* KX_GameObject::PySetParent(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetParent(PyObject* self, PyObject* value) { - PyObject* gameobj; - if (PyArg_ParseTuple(args, "O!", &KX_GameObject::Type, &gameobj)) - { - // The object we want to set as parent - CValue *m_ob = (CValue*)gameobj; - KX_GameObject *obj = ((KX_GameObject*)m_ob); - KX_Scene *scene = PHY_GetActiveScene(); - - this->SetParent(scene, obj); - } - else { + if (!PyObject_TypeCheck(value, &KX_GameObject::Type)) { + PyErr_SetString(PyExc_TypeError, "expected a KX_GameObject type"); return NULL; } - Py_Return; + // The object we want to set as parent + CValue *m_ob = (CValue*)value; + KX_GameObject *obj = ((KX_GameObject*)m_ob); + KX_Scene *scene = PHY_GetActiveScene(); + + this->SetParent(scene, obj); + + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyRemoveParent(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyRemoveParent(PyObject* self) { KX_Scene *scene = PHY_GetActiveScene(); this->RemoveParent(scene); - Py_Return; + Py_RETURN_NONE; } PyObject* KX_GameObject::PyGetMesh(PyObject* self, @@ -1312,21 +1262,21 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, -PyObject* KX_GameObject::PySetCollisionMargin(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetCollisionMargin(PyObject* self, PyObject* value) { - float collisionMargin; - if (PyArg_ParseTuple(args, "f", &collisionMargin)) - { - if (m_pPhysicsController1) - { - m_pPhysicsController1->setMargin(collisionMargin); - Py_Return; - } - + float collisionMargin = PyFloat_AsDouble(value); + + if (collisionMargin==-1 && PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "expected a float"); + return NULL; } + if (m_pPhysicsController1) + { + m_pPhysicsController1->setMargin(collisionMargin); + Py_RETURN_NONE; + } + PyErr_SetString(PyExc_RuntimeError, "This object has no physics controller"); return NULL; } @@ -1338,17 +1288,20 @@ PyObject* KX_GameObject::PyApplyImpulse(PyObject* self, { PyObject* pyattach; PyObject* pyimpulse; + + if (!m_pPhysicsController1) { + PyErr_SetString(PyExc_RuntimeError, "This object has no physics controller"); + return NULL; + } + if (PyArg_ParseTuple(args, "OO", &pyattach, &pyimpulse)) { MT_Point3 attach; MT_Vector3 impulse; - if (m_pPhysicsController1) + if (PyVecTo(pyattach, attach) && PyVecTo(pyimpulse, impulse)) { - if (PyVecTo(pyattach, attach) && PyVecTo(pyimpulse, impulse)) - { - m_pPhysicsController1->applyImpulse(attach, impulse); - Py_Return; - } + m_pPhysicsController1->applyImpulse(attach, impulse); + Py_RETURN_NONE; } } @@ -1358,59 +1311,46 @@ PyObject* KX_GameObject::PyApplyImpulse(PyObject* self, -PyObject* KX_GameObject::PySuspendDynamics(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySuspendDynamics(PyObject* self) { SuspendDynamics(); - Py_Return; + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyRestoreDynamics(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyRestoreDynamics(PyObject* self) { RestoreDynamics(); - Py_Return; + Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetOrientation(PyObject* self, - PyObject* args, - PyObject* kwds) //keywords +PyObject* KX_GameObject::PyGetOrientation(PyObject* self) //keywords { return PyObjectFrom(NodeGetWorldOrientation()); } -PyObject* KX_GameObject::PySetOrientation(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetOrientation(PyObject* self, PyObject* value) { - PyObject* pylist; - - if (PyArg_ParseTuple(args,"O",&pylist)) + MT_Matrix3x3 matrix; + if (PyObject_IsMT_Matrix(value, 3) && PyMatTo(value, matrix)) { - MT_Matrix3x3 matrix; - if (PyObject_IsMT_Matrix(pylist, 3) && PyMatTo(pylist, matrix)) - { - NodeSetLocalOrientation(matrix); - NodeUpdateGS(0.f,true); - Py_Return; - } - - MT_Quaternion quat; - if (PyVecTo(pylist, quat)) - { - matrix.setRotation(quat); - NodeSetLocalOrientation(matrix); - NodeUpdateGS(0.f,true); - Py_Return; - } + NodeSetLocalOrientation(matrix); + NodeUpdateGS(0.f,true); + Py_RETURN_NONE; + } + + MT_Quaternion quat; + if (PyVecTo(value, quat)) + { + matrix.setRotation(quat); + NodeSetLocalOrientation(matrix); + NodeUpdateGS(0.f,true); + Py_RETURN_NONE; } return NULL; } @@ -1428,30 +1368,36 @@ PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, if (PyVecTo(pyvect, vect)) { AlignAxisToVect(vect,axis); - Py_Return; + Py_RETURN_NONE; } } return NULL; } -PyObject* KX_GameObject::PySetPosition(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetAxisVect(PyObject* self, PyObject* value) { - MT_Point3 pos; - if (PyVecArgTo(args, pos)) + MT_Vector3 vect; + if (PyVecTo(value, vect)) { - NodeSetLocalPosition(pos); - NodeUpdateGS(0.f,true); - Py_Return; + return PyObjectFrom(vect * NodeGetWorldOrientation()); } - return NULL; } -PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PySetPosition(PyObject* self, PyObject* value) +{ + MT_Point3 pos; + if (PyVecTo(value, pos)) + { + NodeSetLocalPosition(pos); + NodeUpdateGS(0.f,true); + Py_RETURN_NONE; + } + + return NULL; +} + +PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self) { KX_IPhysicsController* ctrl = GetPhysicsController(); uint_ptr physid=0; @@ -1462,9 +1408,7 @@ PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self, return PyInt_FromLong((long)physid); } -PyObject* KX_GameObject::PyGetPropertyNames(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_GameObject::PyGetPropertyNames(PyObject* self) { return ConvertKeysToPython(); } @@ -1563,7 +1507,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo, m_pHitObject->AddRef(); return m_pHitObject; } - Py_Return; + Py_RETURN_NONE; } KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, @@ -1646,7 +1590,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, // resultNormal[0], resultNormal[1], resultNormal[2]); } return Py_BuildValue("OOO", Py_None, Py_None, Py_None); - //Py_Return; + //Py_RETURN_NONE; } /* --------------------------------------------------------------------- diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 3a9abd2fc61..31b56df5368 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -696,47 +696,34 @@ public: PyObject *value ); // _setattr method - PyObject* - PySetPosition( - PyObject* self, - PyObject* args, - PyObject* kwds - ); - - static - PyObject* - sPySetPosition( - PyObject* self, - PyObject* args, - PyObject* kwds - ); - - KX_PYMETHOD(KX_GameObject,GetPosition); + KX_PYMETHOD_NOARGS(KX_GameObject,GetPosition); + KX_PYMETHOD_O(KX_GameObject,SetPosition); KX_PYMETHOD(KX_GameObject,GetLinearVelocity); KX_PYMETHOD(KX_GameObject,SetLinearVelocity); KX_PYMETHOD(KX_GameObject,GetVelocity); - KX_PYMETHOD(KX_GameObject,GetMass); - KX_PYMETHOD(KX_GameObject,GetReactionForce); - KX_PYMETHOD(KX_GameObject,GetOrientation); - KX_PYMETHOD(KX_GameObject,SetOrientation); - KX_PYMETHOD(KX_GameObject,GetVisible); - KX_PYMETHOD(KX_GameObject,SetVisible); - KX_PYMETHOD(KX_GameObject,GetState); - KX_PYMETHOD(KX_GameObject,SetState); + KX_PYMETHOD_NOARGS(KX_GameObject,GetMass); + KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce); + KX_PYMETHOD_NOARGS(KX_GameObject,GetOrientation); + KX_PYMETHOD_O(KX_GameObject,SetOrientation); + KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible); + KX_PYMETHOD_O(KX_GameObject,SetVisible); + KX_PYMETHOD_NOARGS(KX_GameObject,GetState); + KX_PYMETHOD_O(KX_GameObject,SetState); KX_PYMETHOD(KX_GameObject,AlignAxisToVect); - KX_PYMETHOD(KX_GameObject,SuspendDynamics); - KX_PYMETHOD(KX_GameObject,RestoreDynamics); - KX_PYMETHOD(KX_GameObject,EnableRigidBody); - KX_PYMETHOD(KX_GameObject,DisableRigidBody); + KX_PYMETHOD_O(KX_GameObject,GetAxisVect); + KX_PYMETHOD_NOARGS(KX_GameObject,SuspendDynamics); + KX_PYMETHOD_NOARGS(KX_GameObject,RestoreDynamics); + KX_PYMETHOD_NOARGS(KX_GameObject,EnableRigidBody); + KX_PYMETHOD_NOARGS(KX_GameObject,DisableRigidBody); KX_PYMETHOD(KX_GameObject,ApplyImpulse); - KX_PYMETHOD(KX_GameObject,SetCollisionMargin); + KX_PYMETHOD_O(KX_GameObject,SetCollisionMargin); + KX_PYMETHOD_NOARGS(KX_GameObject,GetParent); + KX_PYMETHOD_O(KX_GameObject,SetParent); + KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent); KX_PYMETHOD(KX_GameObject,GetMesh); - KX_PYMETHOD(KX_GameObject,GetParent); - KX_PYMETHOD(KX_GameObject,SetParent); - KX_PYMETHOD(KX_GameObject,RemoveParent); - KX_PYMETHOD(KX_GameObject,GetPhysicsId); - KX_PYMETHOD(KX_GameObject,GetPropertyNames); - KX_PYMETHOD(KX_GameObject,EndObject); + KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId); + KX_PYMETHOD_NOARGS(KX_GameObject,GetPropertyNames); + KX_PYMETHOD_NOARGS(KX_GameObject,EndObject); KX_PYMETHOD_DOC(KX_GameObject,rayCastTo); KX_PYMETHOD_DOC(KX_GameObject,rayCast); KX_PYMETHOD_DOC(KX_GameObject,getDistanceTo); diff --git a/source/gameengine/PyDoc/KX_GameObject.py b/source/gameengine/PyDoc/KX_GameObject.py index faadf61abb5..37c188b7f22 100644 --- a/source/gameengine/PyDoc/KX_GameObject.py +++ b/source/gameengine/PyDoc/KX_GameObject.py @@ -90,11 +90,22 @@ class KX_GameObject: - 1: Y axis - 2: Z axis (default) """ + def getAxisVect(vect): + """ + Returns the axis vector rotates by the objects worldspace orientation. + This is the equivalent if multiplying the vector by the orientation matrix. + + @type vect: 3d vector. + @param vect: a vector to align the axis. + @rtype: 3d vector. + @return: The vector in relation to the objects rotation. + + """ def getOrientation(): """ Gets the game object's orientation. - @rtype: 3x3 inverted rotation matrix + @rtype: 3x3 rotation matrix @return: The game object's rotation matrix @note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. """ From bd74679a397efa82ac81386bf8da5877bd32dded Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Jul 2008 00:30:44 +0000 Subject: [PATCH 328/430] small changes to py funcs that can run 100s of times a second, so python wont generate empty args tuple when they are not needed. --- source/gameengine/GameLogic/SCA_ILogicBrick.cpp | 12 ++++-------- source/gameengine/GameLogic/SCA_ILogicBrick.h | 4 ++-- source/gameengine/GameLogic/SCA_ISensor.cpp | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp index 8423d06dfcd..f6efd485adb 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp @@ -242,8 +242,8 @@ PyParentObject SCA_ILogicBrick::Parents[] = { PyMethodDef SCA_ILogicBrick::Methods[] = { - {"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_VARARGS}, - {"getExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_VARARGS}, + {"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_NOARGS}, + {"getExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_NOARGS}, {"setExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_VARARGS}, {NULL,NULL} //Sentinel }; @@ -258,9 +258,7 @@ SCA_ILogicBrick::_getattr(const STR_String& attr) -PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self) { CValue* parent = GetParent(); if (parent) @@ -294,9 +292,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self, -PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self) { return PyInt_FromLong(m_Execute_Ueber_Priority); } diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h index f359ee0911b..80bc6ae3b86 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.h +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h @@ -82,9 +82,9 @@ public: // python methods - KX_PYMETHOD(SCA_ILogicBrick,GetOwner); + KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetOwner); KX_PYMETHOD(SCA_ILogicBrick,SetExecutePriority); - KX_PYMETHOD(SCA_ILogicBrick,GetExecutePriority); + KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority); enum KX_BOOL_TYPE { KX_BOOL_NODEF = 0, diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 6cfae9d8919..1b163deb7bb 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -118,7 +118,7 @@ void SCA_ISensor::Resume() { } void SCA_ISensor::Init() { - printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name); + printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name.Ptr()); } void SCA_ISensor::DecLink() { From 5bee0c9a82cf08205da50b529e51021645225314 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 4 Jul 2008 07:59:19 +0000 Subject: [PATCH 329/430] soc-2008-mxcurioni: foundations for Freestyle as a render layer - new UI buttons and mode flags, Freestyle API refactoring, modified pipeline to incorporate the new render layer. Compared to previously, the layer functionality is available when selecting 'Blender Internal' as the rendering engine. Freestyle's result is not available in the layer yet. I need to integrate OpenGL offscreen rendering properly (with framebuffer objects) to reach that goal. --- .../{FST_freestyle.h => FRS_freestyle.h} | 3 +- .../freestyle/intern/app_blender/api.cpp | 67 ++++++++++++------- source/blender/makesdna/DNA_scene_types.h | 2 + source/blender/python/api2_2x/sceneRender.c | 4 ++ .../blender/render/intern/source/pipeline.c | 20 +++++- source/blender/src/buttons_scene.c | 9 ++- 6 files changed, 74 insertions(+), 31 deletions(-) rename source/blender/freestyle/{FST_freestyle.h => FRS_freestyle.h} (60%) diff --git a/source/blender/freestyle/FST_freestyle.h b/source/blender/freestyle/FRS_freestyle.h similarity index 60% rename from source/blender/freestyle/FST_freestyle.h rename to source/blender/freestyle/FRS_freestyle.h index 1f516078258..060ccf6961a 100644 --- a/source/blender/freestyle/FST_freestyle.h +++ b/source/blender/freestyle/FRS_freestyle.h @@ -5,7 +5,8 @@ extern "C" { #endif - void FRS_execute(Render* re); + void FRS_prepare(Render* re); + void FRS_execute(Render* re, int render_in_layer); #ifdef __cplusplus } diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 96edf7fcdba..4ca13000ccb 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -27,11 +27,16 @@ using namespace std; extern "C" { #endif + static Config::Path *pathconfig = NULL; static Controller *controller = NULL; static AppGLWidget *view = NULL; + void FRS_initialize(){ + if( pathconfig == NULL ) + pathconfig = new Config::Path; + if( controller == NULL ) controller = new Controller; @@ -41,20 +46,14 @@ extern "C" { controller->SetView(view); } - void FRS_execute(Render* re) { - - // instanciation - Config::Path pathconfig; - FRS_initialize(); - - // initialize view dimensions - unsigned int width = re->winx; - unsigned int height = re->winy; - view->setWidth(width); - view->setHeight(height); - view->_camera->setScreenWidthAndHeight(width, height); - - // initialize camera + + void FRS_init_view(Render* re){ + view->setWidth( re->winx ); + view->setHeight( re->winy ); + view->_camera->setScreenWidthAndHeight( re->winx, re->winy); + } + + void FRS_init_camera(Render* re){ Object* maincam_obj = re->scene->camera; Camera *cam = (Camera*) maincam_obj->data; @@ -62,22 +61,23 @@ extern "C" { view->_camera->setType(AppGLWidget_Camera::PERSPECTIVE); view->_camera->setHorizontalFieldOfView( M_PI / 180.0f * cam->angle ); } - else if (cam->type == CAM_ORTHO){ - view->_camera->setType(AppGLWidget_Camera::ORTHOGRAPHIC); - // view->_camera->setFocusDistance does not seem to work - // integrate cam->ortho_scale parameter - } + // else if (cam->type == CAM_ORTHO){ + // view->_camera->setType(AppGLWidget_Camera::ORTHOGRAPHIC); + // // view->_camera->setFocusDistance does not seem to work + // // integrate cam->ortho_scale parameter + // } Vec camPosition(maincam_obj->obmat[3][0], maincam_obj->obmat[3][1], maincam_obj->obmat[3][2]); Vec camUp( re->viewmat[0][1], re->viewmat[1][1], re->viewmat[2][1]); Vec camDirection( -re->viewmat[0][2], -re->viewmat[1][2], -re->viewmat[2][2]); view->_camera->setPosition(camPosition); view->_camera->setUpVector(camUp); - view->_camera->setViewDirection(camDirection); + view->_camera->setViewDirection(camDirection); + } - + void FRS_scene_3ds_export(Render* re) { // export scene to 3ds format - string script_3ds_export = pathconfig.getProjectDir() + + string script_3ds_export = pathconfig->getProjectDir() + Config::DIR_SEP + "python" + Config::DIR_SEP + "3ds_export.py"; BPY_run_python_script( const_cast(script_3ds_export.c_str()) ); @@ -94,9 +94,20 @@ extern "C" { cout << "Cannot find" << exported_3ds_file << endl; return; } + } + + void FRS_prepare(Render* re) { + FRS_initialize(); + FRS_init_view(re); + FRS_init_camera(re); + + FRS_scene_3ds_export(re); + } + + void FRS_render(Render* re) { // add style module - string style_module = pathconfig.getProjectDir() + + string style_module = pathconfig->getProjectDir() + Config::DIR_SEP + "style_modules" + Config::DIR_SEP + "contour.py"; controller->InsertStyleModule( 0, const_cast(style_module.c_str()) ); @@ -114,12 +125,20 @@ extern "C" { // copy result into render window RenderResult rres; RE_GetResultImage(re, &rres); - view->readPixels(0,0,width,height,AppGLWidget::RGBA, rres.rectf ); + view->readPixels(0, 0, re->winx, re->winy, AppGLWidget::RGBA, rres.rectf ); re->result->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); controller->CloseFile(); } + + void FRS_execute(Render* re, bool render_in_layer) { + + //if(render_in_layer) + // set-up offscreen rendering + + FRS_render(re); + } #ifdef __cplusplus } diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 59a7ee69527..0b224a24d4d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -134,6 +134,7 @@ typedef struct SceneRenderLayer { #define SCE_LAY_EDGE 8 #define SCE_LAY_SKY 16 #define SCE_LAY_STRAND 32 +#define SCE_LAY_FRS 64 /* flags between 32 and 0x8000 are set to 1 already, for future options */ #define SCE_LAY_ALL_Z 0x8000 @@ -571,6 +572,7 @@ typedef struct Scene { #define R_ORTHO 0x0008 #define R_ENVMAP 0x0010 #define R_EDGE 0x0020 +#define R_EDGE_FRS 0x2000000 // will replace R_EDGE #define R_FIELDS 0x0040 #define R_FIELDSTILL 0x0080 #define R_RADIO 0x0100 diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c index 2174c435405..a6f35bf4d5d 100644 --- a/source/blender/python/api2_2x/sceneRender.c +++ b/source/blender/python/api2_2x/sceneRender.c @@ -3487,6 +3487,10 @@ static PyGetSetDef BPy_RenderLayer_getseters[] = { (getter)RenderLayer_getLayflagBits, (setter)RenderLayer_setLayflagBits, "Render Edge-enhance in this Layer (only works for Solid faces)", (void *)SCE_LAY_EDGE}, + {"enableFreestyle", + (getter)RenderLayer_getLayflagBits, (setter)RenderLayer_setLayflagBits, + "Render Freestyle in this Layer", + (void *)SCE_LAY_FRS}, {"enableSky", (getter)RenderLayer_getLayflagBits, (setter)RenderLayer_setLayflagBits, "Render Sky or backbuffer in this Layer", diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 5b2c7114fe3..8403d237f8f 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -70,7 +70,7 @@ #endif /* disable yafray */ -#include "FST_freestyle.h" +#include "FRS_freestyle.h" /* internal */ @@ -1621,7 +1621,7 @@ void RE_TileProcessor(Render *re, int firsttile, int threaded) static void do_render_3d(Render *re) { - + RenderLayer *rl; // re->cfra= cfra; /* <- unused! */ /* make render verts/faces/halos/lamps */ @@ -1632,6 +1632,17 @@ static void do_render_3d(Render *re) threaded_tile_processor(re); + /* Freestyle */ + if( re->r.mode & R_EDGE_FRS ) { + for(rl = re->result->layers.first; rl; rl= rl->next) { + if(rl->layflag & SCE_LAY_FRS) { + printf("Freestyle as a render layer\n"); + FRS_prepare(re); + FRS_execute(re,1); + } + } + } + /* do left-over 3d post effects (flares) */ if(re->flag & R_HALO) if(!re->test_break()) @@ -2208,9 +2219,12 @@ static void freestyleRender(Render *re) Mat4Invert(mat, re->scene->camera->obmat); RE_SetView(re, mat); + // Freestyle initialization + FRS_prepare(re); + // run Freestyle re->i.starttime = PIL_check_seconds_timer(); - FRS_execute(re); + FRS_execute(re, 0); re->i.lastframetime = PIL_check_seconds_timer()- re->i.starttime; re->stats_draw(&re->i); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 78b6abb5773..198f853393d 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -2108,7 +2108,8 @@ static void render_panel_output(void) /* Toon shading buttons */ uiBlockBeginAlign(block); uiDefButBitI(block, TOG, R_EDGE, B_NOP,"Edge", 115, 89, 60, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon Edge-enhance"); - uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 175, 89, 135, 20, "Display Edge settings"); + uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 175, 89, 75, 20, "Display Edge settings"); + uiDefButBitI(block, TOG, R_EDGE_FRS, B_NOP,"Freestyle", 250, 89, 60, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Freestyle"); uiBlockEndAlign(block); uiBlockBeginAlign(block); @@ -3384,8 +3385,10 @@ static void render_panel_layers(void) uiDefButBitI(block, TOG, SCE_LAY_HALO, B_NOP,"Halo", 95, 85, 40, 20, &srl->layflag, 0, 0, 0, 0, "Render Halos in this Layer (on top of Solid)"); uiDefButBitI(block, TOG, SCE_LAY_ZTRA, B_NOP,"Ztra", 135, 85, 40, 20, &srl->layflag, 0, 0, 0, 0, "Render Z-Transparent faces in this Layer (On top of Solid and Halos)"); uiDefButBitI(block, TOG, SCE_LAY_SKY, B_NOP,"Sky", 175, 85, 40, 20, &srl->layflag, 0, 0, 0, 0, "Render Sky or backbuffer in this Layer"); - uiDefButBitI(block, TOG, SCE_LAY_EDGE, B_NOP,"Edge", 215, 85, 45, 20, &srl->layflag, 0, 0, 0, 0, "Render Edge-enhance in this Layer (only works for Solid faces)"); - uiDefButBitI(block, TOG, SCE_LAY_STRAND, B_NOP,"Strand",260, 85, 50, 20, &srl->layflag, 0, 0, 0, 0, "Render Strands in this Layer"); + uiDefButBitI(block, TOG, SCE_LAY_EDGE, B_NOP,"Edge", 215, 85, 25, 20, &srl->layflag, 0, 0, 0, 0, "Render Edge-enhance in this Layer (only works for Solid faces)"); + uiDefButBitI(block, TOG, SCE_LAY_FRS, B_NOP,"FrSt", 240, 85, 30, 20, &srl->layflag, 0, 0, 0, 0, "Render Freestyle in this Layer"); + uiDefButBitI(block, TOG, SCE_LAY_STRAND, B_NOP,"Strand",270, 85, 40, 20, &srl->layflag, 0, 0, 0, 0, "Render Strands in this Layer"); + uiDefIDPoinBut(block, test_grouppoin_but, ID_GR, B_SET_PASS, "Light:", 50, 65, 130, 20, &(srl->light_override), "Name of Group to use as Lamps instead"); uiDefIDPoinBut(block, test_matpoin_but, ID_MA, B_SET_PASS, "Mat:", 180, 65, 130, 20, &(srl->mat_override), "Name of Material to use as Materials instead"); From 70d239ef7d2eb3d3c92fc4f1441f4a41815370cb Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Fri, 4 Jul 2008 08:14:50 +0000 Subject: [PATCH 330/430] BGE logic update: new servo control motion actuator, new distance constraint actuator, new orientation constraint actuator, new actuator sensor. General ======= - Removal of Damp option in motion actuator (replaced by Servo control motion). - No PyDoc at present, will be added soon. Generalization of the Lvl option ================================ A sensor with the Lvl option selected will always produce an event at the start of the game or when entering a state or at object creation. The event will be positive or negative depending of the sensor condition. A negative pulse makes sense when used with a NAND controller: it will be converted into an actuator activation. Servo control motion ==================== A new variant of the motion actuator allows to control speed with force. The control if of type "PID" (Propotional, Integral, Derivate): the force is automatically adapted to achieve the target speed. All the parameters of the servo controller are configurable. The result is a great variety of motion style: anysotropic friction, flying, sliding, pseudo Dloc... This actuator should be used in preference to Dloc and LinV as it produces more fluid movements and avoids the collision problem with Dloc. LinV : target speed as (X,Y,Z) vector in local or world coordinates (mostly useful in local coordinates). Limit: the force can be limited along each axis (in the same coordinates of LinV). No limitation means that the force will grow as large as necessary to achieve the target speed along that axis. Set a max value to limit the accelaration along an axis (slow start) and set a min value (negative) to limit the brake force. P: Proportional coefficient of servo controller, don't set directly unless you know what you're doing. I: Integral coefficient of servo controller. Use low value (<0.1) for slow reaction (sliding), high values (>0.5) for hard control. The P coefficient will be automatically set to 60 times the I coefficient (a reasonable value). D: Derivate coefficient. Leave to 0 unless you know what you're doing. High values create instability. Notes: - This actuator works perfectly in zero friction environment: the PID controller will simulate friction by applying force as needed. - This actuator is compatible with simple Drot motion actuator but not with LinV and Dloc motion. - (0,0,0) is a valid target speed. - All parameters are accessible through Python. Distance constraint actuator ============================ A new variant of the constraint actuator allows to set the distance and orientation relative to a surface. The controller uses a ray to detect the surface (or any object) and adapt the distance and orientation parallel to the surface. Damp: Time constant (in nb of frames) of distance and orientation control. Dist: Select to enable distance control and set target distance. The object will be position at the given distance of surface along the ray direction. Direction: chose a local axis as the ray direction. Range: length of ray. Objecgt within this distance will be detected. N : Select to enable orientation control. The actuator will change the orientation and the location of the object so that it is parallel to the surface at the vertical of the point of contact of the ray. M/P : Select to enable material detection. Default is property detection. Property/Material: name of property/material that the target of ray must have to be detected. If not set, property/ material filter is disabled and any collisioning object within range will be detected. PER : Select to enable persistent operation. Normally the actuator disables itself automatically if the ray does not reach a valid target. time : Maximum activation time of actuator. 0 : unlimited. >0: number of frames before automatic deactivation. rotDamp: Time constant (in nb of frame) of orientation control. 0 : use Damp parameter. >0: use a different time constant for orientation. Notes: - If neither N nor Dist options are set, the actuator does not change the position and orientation of the object; it works as a ray sensor. - The ray has no "X-ray" capability: if the first object hit does not have the required property/material, it returns no hit and the actuator disables itself unless PER option is enabled. - This actuator changes the position and orientation but not the speed of the object. This has an important implication in a gravity environment: the gravity will cause the speed to increase although the object seems to stay still (it is repositioned at each frame). The gravity must be compensated in one way or another. the new servo control motion actuator is the simplest way: set the target speed along the ray axis to 0 and the servo control will automatically compensate the gravity. - This actuator changes the orientation of the object and will conflict with Drot motion unless it is placed BEFORE the Drot motion actuator (the order of actuator is important) - All parameters are accessible through Python. Orientation constraint ====================== A new variant of the constraint actuator allows to align an object axis along a global direction. Damp : Time constant (in nb of frames) of orientation control. X,Y,Z: Global coordinates of reference direction. time : Maximum activation time of actuator. 0 : unlimited. >0: number of frames before automatic deactivation. Notes: - (X,Y,Z) = (0,0,0) is not a valid direction - This actuator changes the orientation of the object and will conflict with Drot motion unless it is placed BEFORE the Drot motion actuator (the order of actuator is important). - This actuator doesn't change the location and speed. It is compatible with gravity. - All parameters are accessible through Python. Actuator sensor =============== This sensor detects the activation and deactivation of actuators of the same object. The sensor generates a positive pulse when the corresponding sensor is activated and a negative pulse when it is deactivated (the contrary if the Inv option is selected). This is mostly useful to chain actions and to detect the loss of contact of the distance motion actuator. Notes: - Actuators are disabled at the start of the game; if you want to detect the On-Off transition of an actuator after it has been activated at least once, unselect the Lvl and Inv options and use a NAND controller. - Some actuators deactivates themselves immediately after being activated. The sensor detects this situation as an On-Off transition. - The actuator name can be set through Python. --- .../blender/render/BRE_render.vcproj | 8 +- .../gameengine/gamelogic/SCA_GameLogic.vcproj | 12 + source/blender/blenkernel/intern/sca.c | 3 + source/blender/blenloader/intern/writefile.c | 3 + source/blender/makesdna/DNA_actuator_types.h | 38 +- source/blender/makesdna/DNA_sensor_types.h | 7 + .../render/intern/source/convertblender.c | 1 + source/blender/src/buttons_logic.c | 306 +++++++--- .../Converter/KX_ConvertActuators.cpp | 130 ++-- .../Converter/KX_ConvertSensors.cpp | 14 + .../GameLogic/SCA_ActuatorEventManager.cpp | 76 +++ .../GameLogic/SCA_ActuatorEventManager.h | 52 ++ .../GameLogic/SCA_ActuatorSensor.cpp | 196 ++++++ .../gameengine/GameLogic/SCA_ActuatorSensor.h | 74 +++ .../gameengine/GameLogic/SCA_EventManager.cpp | 4 +- .../gameengine/GameLogic/SCA_EventManager.h | 4 +- source/gameengine/GameLogic/SCA_IObject.cpp | 34 +- source/gameengine/GameLogic/SCA_ISensor.cpp | 1 + source/gameengine/GameLogic/SCA_ISensor.h | 3 + .../GameLogic/SCA_JoystickSensor.cpp | 8 +- .../GameLogic/SCA_KeyboardSensor.cpp | 17 +- .../gameengine/GameLogic/SCA_LogicManager.cpp | 4 + .../gameengine/GameLogic/SCA_MouseSensor.cpp | 12 +- .../GameLogic/SCA_PropertySensor.cpp | 7 +- .../Ketsji/KX_ConstraintActuator.cpp | 574 +++++++++++++++--- .../gameengine/Ketsji/KX_ConstraintActuator.h | 59 +- source/gameengine/Ketsji/KX_GameObject.cpp | 34 ++ source/gameengine/Ketsji/KX_GameObject.h | 9 + .../gameengine/Ketsji/KX_MouseFocusSensor.cpp | 8 +- source/gameengine/Ketsji/KX_NearSensor.cpp | 5 +- .../gameengine/Ketsji/KX_ObjectActuator.cpp | 371 ++++++++--- source/gameengine/Ketsji/KX_ObjectActuator.h | 19 +- source/gameengine/Ketsji/KX_RaySensor.cpp | 10 +- source/gameengine/Ketsji/KX_Scene.cpp | 3 + source/gameengine/Ketsji/KX_TouchSensor.cpp | 12 +- 35 files changed, 1744 insertions(+), 374 deletions(-) create mode 100644 source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp create mode 100644 source/gameengine/GameLogic/SCA_ActuatorEventManager.h create mode 100644 source/gameengine/GameLogic/SCA_ActuatorSensor.cpp create mode 100644 source/gameengine/GameLogic/SCA_ActuatorSensor.h diff --git a/projectfiles_vc7/blender/render/BRE_render.vcproj b/projectfiles_vc7/blender/render/BRE_render.vcproj index 4869dd606f1..4331d6e1579 100644 --- a/projectfiles_vc7/blender/render/BRE_render.vcproj +++ b/projectfiles_vc7/blender/render/BRE_render.vcproj @@ -74,7 +74,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging" - PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR" + PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;_USE_MATH_DEFINES" BasicRuntimeChecks="3" RuntimeLibrary="1" DefaultCharIsUnsigned="TRUE" @@ -175,6 +175,9 @@ + + @@ -245,6 +248,9 @@ + + diff --git a/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj b/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj index e0405b4d7c7..7e2db4f564f 100644 --- a/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj +++ b/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj @@ -332,6 +332,12 @@ + + + + @@ -444,6 +450,12 @@ + + + + diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 16ca5d7542d..fcf1c7ce311 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -150,6 +150,9 @@ void init_sensor(bSensor *sens) case SENS_PROPERTY: sens->data= MEM_callocN(sizeof(bPropertySensor), "propsens"); break; + case SENS_ACTUATOR: + sens->data= MEM_callocN(sizeof(bActuatorSensor), "actsens"); + break; case SENS_MOUSE: ms=sens->data= MEM_callocN(sizeof(bMouseSensor), "mousesens"); ms->type= LEFTMOUSE; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9f28e13ff7b..ca91f1dc346 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -603,6 +603,9 @@ static void write_sensors(WriteData *wd, ListBase *lb) case SENS_PROPERTY: writestruct(wd, DATA, "bPropertySensor", 1, sens->data); break; + case SENS_ACTUATOR: + writestruct(wd, DATA, "bActuatorSensor", 1, sens->data); + break; case SENS_COLLISION: writestruct(wd, DATA, "bCollisionSensor", 1, sens->data); break; diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 51f03a676e4..3cf80a4efa6 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -98,8 +98,8 @@ typedef struct bPropertyActuator { } bPropertyActuator; typedef struct bObjectActuator { - short flag, type; - int damping; + short flag, type, otype; + short damping; float forceloc[3], forcerot[3]; float loc[3], rot[3]; float dloc[3], drot[3]; @@ -124,10 +124,13 @@ typedef struct bCameraActuator { } bCameraActuator ; typedef struct bConstraintActuator { + short type, mode; short flag, damp; - float slow; + short time, rotdamp; + int pad; float minloc[3], maxloc[3]; float minrot[3], maxrot[3]; + char matprop[32]; } bConstraintActuator; typedef struct bGroupActuator { @@ -249,20 +252,19 @@ typedef struct FreeCamera { /* objectactuator->flag */ #define ACT_FORCE_LOCAL 1 #define ACT_TORQUE_LOCAL 2 +#define ACT_SERVO_LIMIT_X 2 #define ACT_DLOC_LOCAL 4 +#define ACT_SERVO_LIMIT_Y 4 #define ACT_DROT_LOCAL 8 +#define ACT_SERVO_LIMIT_Z 8 #define ACT_LIN_VEL_LOCAL 16 #define ACT_ANG_VEL_LOCAL 32 //#define ACT_ADD_LIN_VEL_LOCAL 64 #define ACT_ADD_LIN_VEL 64 -#define ACT_CLAMP_VEL 128 -#define ACT_OBJECT_FORCE 0 -#define ACT_OBJECT_TORQUE 1 -#define ACT_OBJECT_DLOC 2 -#define ACT_OBJECT_DROT 3 -#define ACT_OBJECT_LINV 4 -#define ACT_OBJECT_ANGV 5 +/* objectactuator->type */ +#define ACT_OBJECT_NORMAL 0 +#define ACT_OBJECT_SERVO 1 /* actuator->type */ #define ACT_OBJECT 0 @@ -358,6 +360,22 @@ typedef struct FreeCamera { #define ACT_CONST_ROTX 8 #define ACT_CONST_ROTY 16 #define ACT_CONST_ROTZ 32 +#define ACT_CONST_NORMAL 64 +#define ACT_CONST_MATERIAL 128 +#define ACT_CONST_PERMANENT 256 +#define ACT_CONST_DISTANCE 512 +/* constraint mode */ +#define ACT_CONST_DIRPX 1 +#define ACT_CONST_DIRPY 2 +#define ACT_CONST_DIRPZ 4 +#define ACT_CONST_DIRMX 8 +#define ACT_CONST_DIRMY 16 +#define ACT_CONST_DIRMZ 32 + +/* constraint type */ +#define ACT_CONST_TYPE_LOC 0 +#define ACT_CONST_TYPE_DIST 1 +#define ACT_CONST_TYPE_ORI 2 /* editObjectActuator->type */ #define ACT_EDOB_ADD_OBJECT 0 diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h index ae7b92bb06c..c0306f43730 100644 --- a/source/blender/makesdna/DNA_sensor_types.h +++ b/source/blender/makesdna/DNA_sensor_types.h @@ -82,6 +82,12 @@ typedef struct bPropertySensor { char maxvalue[32]; } bPropertySensor; +typedef struct bActuatorSensor { + int type; + int pad; + char name[32]; +} bActuatorSensor; + typedef struct bCollisionSensor { char name[32]; /* property name */ char materialName[32]; /* material */ @@ -197,6 +203,7 @@ typedef struct bJoystickSensor { #define SENS_RAY 9 #define SENS_MESSAGE 10 #define SENS_JOYSTICK 11 +#define SENS_ACTUATOR 12 /* sensor->flag */ #define SENS_SHOW 1 #define SENS_DEL 2 diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index daee892ad9a..f9ec0e9d843 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -114,6 +114,7 @@ #include "sss.h" #include "strand.h" #include "zbuf.h" +#include "sunsky.h" #ifndef DISABLE_YAFRAY /* disable yafray */ diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 5065ba1fc2a..be8483b7e04 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -681,6 +681,8 @@ static char *sensor_name(int type) return "Keyboard"; case SENS_PROPERTY: return "Property"; + case SENS_ACTUATOR: + return "Actuator"; case SENS_MOUSE: return "Mouse"; case SENS_COLLISION: @@ -704,7 +706,7 @@ static char *sensor_pup(void) /* the number needs to match defines in game.h */ return "Sensors %t|Always %x0|Keyboard %x3|Mouse %x5|" "Touch %x1|Collision %x6|Near %x2|Radar %x7|" - "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11"; + "Property %x4|Random %x8|Ray %x9|Message %x10|Joystick %x11|Actuator %x12"; } static char *controller_name(int type) @@ -1003,6 +1005,7 @@ static int get_col_sensor(int type) case SENS_NEAR: return TH_BUT_SETTING1; case SENS_KEYBOARD: return TH_BUT_SETTING2; case SENS_PROPERTY: return TH_BUT_NUM; + case SENS_ACTUATOR: return TH_BUT_NUM; case SENS_MOUSE: return TH_BUT_TEXTFIELD; case SENS_RADAR: return TH_BUT_POPUP; case SENS_RANDOM: return TH_BUT_NEUTRAL; @@ -1067,6 +1070,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short bRaySensor *raySens = NULL; bMessageSensor *mes = NULL; bJoystickSensor *joy = NULL; + bActuatorSensor *as = NULL; short ysize; char *str; @@ -1277,6 +1281,22 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short yco-= ysize; break; } + case SENS_ACTUATOR: + { + ysize= 48; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, + (float)xco+width, (float)yco, 1); + + draw_default_sensor_header(sens, block, xco, yco, width); + as= sens->data; + + uiDefBut(block, TEX, 1, "Act: ", xco+30,yco-44,width-60, 19, + as->name, 0, 31, 0, 0, "Actuator name, actuator active state modifications will be detected"); + yco-= ysize; + break; + } case SENS_MOUSE: { ms= sens->data; @@ -1537,6 +1557,37 @@ static void set_col_actuator(int item, int medium) } +static void change_object_actuator(void *act, void *arg) +{ + bObjectActuator *oa = act; + int i; + + if (oa->type != oa->otype) { + switch (oa->type) { + case ACT_OBJECT_NORMAL: + memset(oa, 0, sizeof(bObjectActuator)); + oa->flag = ACT_FORCE_LOCAL|ACT_TORQUE_LOCAL|ACT_DLOC_LOCAL|ACT_DROT_LOCAL; + oa->type = ACT_OBJECT_NORMAL; + break; + + case ACT_OBJECT_SERVO: + memset(oa, 0, sizeof(bObjectActuator)); + oa->flag = ACT_LIN_VEL_LOCAL; + oa->type = ACT_OBJECT_SERVO; + oa->forcerot[0] = 30.0f; + oa->forcerot[1] = 0.5f; + oa->forcerot[2] = 0.0f; + break; + } + } +} + +void update_object_actuator_PID(void *act, void *arg) +{ + bObjectActuator *oa = act; + oa->forcerot[0] = 60.0f*oa->forcerot[1]; +} + char *get_state_name(Object *ob, short bit) { bController *cont; @@ -1578,6 +1629,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh short ysize = 0, wval; char *str; int myline, stbit; + uiBut *but; /* yco is at the top of the rect, draw downwards */ uiBlockSetEmboss(block, UI_EMBOSSM); @@ -1587,57 +1639,100 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh { case ACT_OBJECT: { - ysize= 152; - - glRects(xco, yco-ysize, xco+width, yco); - uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - oa = act->data; wval = (width-100)/3; - - uiDefBut(block, LABEL, 0, "Force", xco, yco-22, 55, 19, NULL, 0, 0, 0, 0, "Sets the force"); - uiDefButF(block, NUM, 0, "", xco+45, yco-22, wval, 19, oa->forceloc, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-22, wval, 19, oa->forceloc+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-22, wval, 19, oa->forceloc+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "Torque", xco, yco-41, 55, 19, NULL, 0, 0, 0, 0, "Sets the torque"); - uiDefButF(block, NUM, 0, "", xco+45, yco-41, wval, 19, oa->forcerot, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-41, wval, 19, oa->forcerot+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-41, wval, 19, oa->forcerot+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "dLoc", xco, yco-64, 45, 19, NULL, 0, 0, 0, 0, "Sets the dLoc"); - uiDefButF(block, NUM, 0, "", xco+45, yco-64, wval, 19, oa->dloc, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-64, wval, 19, oa->dloc+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-64, wval, 19, oa->dloc+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "dRot", xco, yco-83, 45, 19, NULL, 0, 0, 0, 0, "Sets the dRot"); - uiDefButF(block, NUM, 0, "", xco+45, yco-83, wval, 19, oa->drot, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-83, wval, 19, oa->drot+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-83, wval, 19, oa->drot+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "linV", xco, yco-106, 45, 19, NULL, 0, 0, 0, 0, "Sets the linear velocity"); - uiDefButF(block, NUM, 0, "", xco+45, yco-106, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-106, wval, 19, oa->linearvelocity+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-106, wval, 19, oa->linearvelocity+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "angV", xco, yco-125, 45, 19, NULL, 0, 0, 0, 0, "Sets the angular velocity"); - uiDefButF(block, NUM, 0, "", xco+45, yco-125, wval, 19, oa->angularvelocity, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+wval, yco-125, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-125, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, ""); - - uiDefBut(block, LABEL, 0, "damp", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); - uiDefButI(block, NUM, 0, "", xco+45, yco-148, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); - uiDefButBitS(block, TOG, ACT_CLAMP_VEL, 0, "clamp",xco+45+wval, yco-148, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between SET and CLAMP Velocity"); + if (oa->type == ACT_OBJECT_NORMAL) + { + ysize= 175; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + uiDefBut(block, LABEL, 0, "Force", xco, yco-45, 55, 19, NULL, 0, 0, 0, 0, "Sets the force"); + uiDefButF(block, NUM, 0, "", xco+45, yco-45, wval, 19, oa->forceloc, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-45, wval, 19, oa->forceloc+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-45, wval, 19, oa->forceloc+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "Torque", xco, yco-64, 55, 19, NULL, 0, 0, 0, 0, "Sets the torque"); + uiDefButF(block, NUM, 0, "", xco+45, yco-64, wval, 19, oa->forcerot, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-64, wval, 19, oa->forcerot+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-64, wval, 19, oa->forcerot+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "dLoc", xco, yco-87, 45, 19, NULL, 0, 0, 0, 0, "Sets the dLoc"); + uiDefButF(block, NUM, 0, "", xco+45, yco-87, wval, 19, oa->dloc, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-87, wval, 19, oa->dloc+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-87, wval, 19, oa->dloc+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "dRot", xco, yco-106, 45, 19, NULL, 0, 0, 0, 0, "Sets the dRot"); + uiDefButF(block, NUM, 0, "", xco+45, yco-106, wval, 19, oa->drot, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-106, wval, 19, oa->drot+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-106, wval, 19, oa->drot+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "linV", xco, yco-129, 45, 19, NULL, 0, 0, 0, 0, "Sets the linear velocity"); + uiDefButF(block, NUM, 0, "", xco+45, yco-129, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-129, wval, 19, oa->linearvelocity+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-129, wval, 19, oa->linearvelocity+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "angV", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Sets the angular velocity"); + uiDefButF(block, NUM, 0, "", xco+45, yco-148, wval, 19, oa->angularvelocity, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-148, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-148, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, ""); + + uiDefBut(block, LABEL, 0, "damp", xco, yco-171, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); + uiDefButI(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); - uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitS(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitS(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-83, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - uiDefButBitS(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); - - uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV"); - + uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-87, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-129, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + uiDefButBitS(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-148, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); + + uiDefButBitS(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-129, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV"); + + } else if (oa->type == ACT_OBJECT_SERVO) + { + ysize= 172; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + uiDefBut(block, LABEL, 0, "linV", xco, yco-45, 45, 19, NULL, 0, 0, 0, 0, "Sets the target linear velocity, it will be achieve by automatic application of force. Null velocity is a valid target"); + uiDefButF(block, NUM, 0, "", xco+45, yco-45, wval, 19, oa->linearvelocity, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-45, wval, 19, oa->linearvelocity+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-45, wval, 19, oa->linearvelocity+2, -10000.0, 10000.0, 10, 0, ""); + uiDefButBitS(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Velocity is defined in local coordinates"); + + uiDefBut(block, LABEL, 0, "Limit", xco, yco-68, 45, 19, NULL, 0, 0, 0, 0, "Select if the force need to be limited along certain axis (local or global depending on LinV Local flag)"); + uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_X, B_REDR, "X", xco+45, yco-68, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the X axis"); + uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_Y, B_REDR, "Y", xco+45+wval, yco-68, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the Y axis"); + uiDefButBitS(block, TOG, ACT_SERVO_LIMIT_Z, B_REDR, "Z", xco+45+2*wval, yco-68, wval, 19, &oa->flag, 0.0, 0.0, 0, 0, "Set limit to force along the Z axis"); + uiDefBut(block, LABEL, 0, "Max", xco, yco-87, 45, 19, NULL, 0, 0, 0, 0, "Set the upper limit for force"); + uiDefBut(block, LABEL, 0, "Min", xco, yco-106, 45, 19, NULL, 0, 0, 0, 0, "Set the lower limit for force"); + if (oa->flag & ACT_SERVO_LIMIT_X) { + uiDefButF(block, NUM, 0, "", xco+45, yco-87, wval, 19, oa->dloc, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45, yco-106, wval, 19, oa->drot, -10000.0, 10000.0, 10, 0, ""); + } + if (oa->flag & ACT_SERVO_LIMIT_Y) { + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-87, wval, 19, oa->dloc+1, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+wval, yco-106, wval, 19, oa->drot+1, -10000.0, 10000.0, 10, 0, ""); + } + if (oa->flag & ACT_SERVO_LIMIT_Z) { + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-87, wval, 19, oa->dloc+2, -10000.0, 10000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-106, wval, 19, oa->drot+2, -10000.0, 10000.0, 10, 0, ""); + } + uiDefBut(block, LABEL, 0, "Servo", xco, yco-129, 45, 19, NULL, 0, 0, 0, 0, "Coefficients of the PID servo controller"); + uiDefButF(block, NUMSLI, B_REDR, "P: ", xco+45, yco-129, wval*3, 19, oa->forcerot, 0.00, 200.0, 100, 0, "Proportional coefficient, typical value is 60x Integral coefficient"); + uiDefBut(block, LABEL, 0, "Slow", xco, yco-148, 45, 19, NULL, 0, 0, 0, 0, "Low value of I coefficient correspond to slow response"); + but = uiDefButF(block, NUMSLI, B_REDR, " I : ", xco+45, yco-148, wval*3, 19, oa->forcerot+1, 0.0, 3.0, 1, 0, "Integral coefficient, low value (0.01) for slow response, high value (0.5) for fast response"); + uiButSetFunc(but, update_object_actuator_PID, oa, NULL); + uiDefBut(block, LABEL, 0, "Fast", xco+45+3*wval, yco-148, 45, 19, NULL, 0, 0, 0, 0, "High value of I coefficient correspond to fast response"); + uiDefButF(block, NUMSLI, B_REDR, "D: ", xco+45, yco-167, wval*3, 19, oa->forcerot+2, -100.0, 100.0, 100, 0, "Derivate coefficient, not required, high values can cause instability"); + } + str= "Motion Type %t|Simple motion %x0|Servo Control %x1"; + but = uiDefButS(block, MENU, B_REDR, str, xco+40, yco-23, (width-80), 19, &oa->type, 0.0, 0.0, 0, 0, ""); + oa->otype = oa->type; + uiButSetFunc(but, change_object_actuator, oa, NULL); yco-= ysize; break; } @@ -1930,34 +2025,97 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh break; case ACT_CONSTRAINT: - - ysize= 44; - - glRects(xco, yco-ysize, xco+width, yco); - uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - coa= act->data; - -/* str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4|Rot X %x8|Rot Y %x16|Rot Z %x32"; */ - str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4"; - uiDefButS(block, MENU, 1, str, xco+10, yco-40, 70, 19, &coa->flag, 0.0, 0.0, 0, 0, ""); - uiDefButS(block, NUM, 0, "Damp:", xco+10, yco-20, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, ""); - uiDefBut(block, LABEL, 0, "Min", xco+80, yco-20, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, ""); - uiDefBut(block, LABEL, 0, "Max", xco+80+(width-90)/2, yco-20, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, ""); - - if(coa->flag & ACT_CONST_LOCX) fp= coa->minloc; - else if(coa->flag & ACT_CONST_LOCY) fp= coa->minloc+1; - else if(coa->flag & ACT_CONST_LOCZ) fp= coa->minloc+2; - else if(coa->flag & ACT_CONST_ROTX) fp= coa->minrot; - else if(coa->flag & ACT_CONST_ROTY) fp= coa->minrot+1; - else fp= coa->minrot+2; - - uiDefButF(block, NUM, 0, "", xco+80, yco-40, (width-90)/2, 19, fp, -2000.0, 2000.0, 10, 0, ""); - uiDefButF(block, NUM, 0, "", xco+80+(width-90)/2, yco-40, (width-90)/2, 19, fp+3, -2000.0, 2000.0, 10, 0, ""); - - yco-= ysize; + if (coa->type == ACT_CONST_TYPE_LOC) { + ysize= 69; + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + /* str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4|Rot X %x8|Rot Y %x16|Rot Z %x32"; */ + /* coa->flag &= ~(63); */ + str= "Limit %t|None %x0|Loc X %x1|Loc Y %x2|Loc Z %x4"; + coa->flag &= ~(7); + coa->time = 0; + uiDefButS(block, MENU, 1, str, xco+10, yco-65, 70, 19, &coa->flag, 0.0, 0.0, 0, 0, ""); + + uiDefButS(block, NUM, 0, "Damp:", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Min", xco+80, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Max", xco+80+(width-90)/2, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, ""); + + if(coa->flag & ACT_CONST_LOCX) fp= coa->minloc; + else if(coa->flag & ACT_CONST_LOCY) fp= coa->minloc+1; + else if(coa->flag & ACT_CONST_LOCZ) fp= coa->minloc+2; + else if(coa->flag & ACT_CONST_ROTX) fp= coa->minrot; + else if(coa->flag & ACT_CONST_ROTY) fp= coa->minrot+1; + else fp= coa->minrot+2; + + uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-90)/2, 19, fp, -2000.0, 2000.0, 10, 0, ""); + uiDefButF(block, NUM, 0, "", xco+80+(width-90)/2, yco-65, (width-90)/2, 19, fp+3, -2000.0, 2000.0, 10, 0, ""); + } else if (coa->type == ACT_CONST_TYPE_DIST) { + ysize= 106; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4|-X axis %x8|-Y axis %x16|-Z axis %x32"; + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Set the direction of the ray"); + + uiDefButS(block, NUM, 0, "Damp:", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Range", xco+80, yco-45, (width-115)/2, 19, NULL, 0.0, 0.0, 0, 0, "Set the maximum length of ray"); + uiDefButBitS(block, TOG, ACT_CONST_DISTANCE, B_REDR, "Dist", xco+80+(width-115)/2, yco-45, (width-115)/2, 19, &coa->flag, 0.0, 0.0, 0, 0, "Force distance of object to point of impact of ray"); + + if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRMX)) fp= coa->minloc; + else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRMY)) fp= coa->minloc+1; + else fp= coa->minloc+2; + + uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-115)/2, 19, fp+3, 0.0, 2000.0, 10, 0, "Maximum length of ray"); + if (coa->flag & ACT_CONST_DISTANCE) + uiDefButF(block, NUM, 0, "", xco+80+(width-115)/2, yco-65, (width-115)/2, 19, fp, -2000.0, 2000.0, 10, 0, "Keep this distance to target"); + uiDefButBitS(block, TOG, ACT_CONST_NORMAL, 0, "N", xco+80+(width-115), yco-65, 25, 19, + &coa->flag, 0.0, 0.0, 0, 0, "Set object axis along the normal at hit position"); + uiDefButBitS(block, TOG, ACT_CONST_MATERIAL, B_REDR, "M/P", xco+10, yco-84, 40, 19, + &coa->flag, 0.0, 0.0, 0, 0, "Detect material instead of property"); + if (coa->flag & ACT_CONST_MATERIAL) + { + uiDefBut(block, TEX, 1, "Material:", xco + 50, yco-84, (width-60), 19, + coa->matprop, 0, 31, 0, 0, + "Ray detects only Objects with this material"); + } + else + { + uiDefBut(block, TEX, 1, "Property:", xco + 50, yco-84, (width-60), 19, + coa->matprop, 0, 31, 0, 0, + "Ray detect only Objects with this property"); + } + uiDefButBitS(block, TOG, ACT_CONST_PERMANENT, 0, "PER", xco+10, yco-103, 40, 19, + &coa->flag, 0.0, 0.0, 0, 0, "Persistent actuator: stays active even if ray does not reach target"); + uiDefButS(block, NUM, 0, "time", xco+50, yco-103, (width-60)/2, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited"); + uiDefButS(block, NUM, 0, "rotDamp", xco+50+(width-60)/2, yco-103, (width-60)/2, 19, &(coa->rotdamp), 0.0, 100.0, 0, 0, "Use a different damping for orientation"); + } else if (coa->type == ACT_CONST_TYPE_ORI) { + ysize= 87; + + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z axis %x4"; + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Select the axis to be aligned along the reference direction"); + + uiDefButS(block, NUM, 0, "Damp:", xco+10, yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "X", xco+80, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Y", xco+80+(width-115)/3, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Z", xco+80+2*(width-115)/3, yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefButF(block, NUM, 0, "", xco+80, yco-65, (width-115)/3, 19, &coa->maxrot[0], -2000.0, 2000.0, 10, 0, "X component of reference direction"); + uiDefButF(block, NUM, 0, "", xco+80+(width-115)/3, yco-65, (width-115)/3, 19, &coa->maxrot[1], -2000.0, 2000.0, 10, 0, "Y component of reference direction"); + uiDefButF(block, NUM, 0, "", xco+80+2*(width-115)/3, yco-65, (width-115)/3, 19, &coa->maxrot[2], -2000.0, 2000.0, 10, 0, "Z component of reference direction"); + + uiDefButS(block, NUM, 0, "time", xco+10, yco-84, 70+(width-115)/3, 19, &(coa->time), 0.0, 1000.0, 0, 0, "Maximum activation time in frame, 0 for unlimited"); + } + str= "Constraint Type %t|Location %x0|Distance %x1|Orientation %x2"; + but = uiDefButS(block, MENU, B_REDR, str, xco+40, yco-23, (width-80), 19, &coa->type, 0.0, 0.0, 0, 0, ""); + yco-= ysize; break; case ACT_SCENE: diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index ea26c55a44e..6e05ea31fe8 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -159,7 +159,7 @@ void BL_ConvertActuators(char* maggiename, bitLocalFlag.DRot = bool((obact->flag & ACT_DROT_LOCAL)!=0); bitLocalFlag.LinearVelocity = bool((obact->flag & ACT_LIN_VEL_LOCAL)!=0); bitLocalFlag.AngularVelocity = bool((obact->flag & ACT_ANG_VEL_LOCAL)!=0); - bitLocalFlag.ClampVelocity = bool((obact->flag & ACT_CLAMP_VEL)!=0); + bitLocalFlag.ServoControl = bool(obact->type == ACT_OBJECT_SERVO); bitLocalFlag.AddOrSetLinV = bool((obact->flag & ACT_ADD_LIN_VEL)!=0); @@ -619,51 +619,105 @@ void BL_ConvertActuators(char* maggiename, case ACT_CONSTRAINT: { float min = 0.0, max = 0.0; + char *prop = NULL; KX_ConstraintActuator::KX_CONSTRAINTTYPE locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_NODEF; bConstraintActuator *conact = (bConstraintActuator*) bact->data; /* convert settings... degrees in the ui become radians */ /* internally */ - switch (conact->flag) { - case ACT_CONST_LOCX: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCX; - min = conact->minloc[0]; - max = conact->maxloc[0]; - break; - case ACT_CONST_LOCY: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCY; - min = conact->minloc[1]; - max = conact->maxloc[1]; - break; - case ACT_CONST_LOCZ: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCZ; - min = conact->minloc[2]; - max = conact->maxloc[2]; - break; - case ACT_CONST_ROTX: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTX; - min = MT_2_PI * conact->minrot[0] / 360.0; - max = MT_2_PI * conact->maxrot[0] / 360.0; - break; - case ACT_CONST_ROTY: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTY; - min = MT_2_PI * conact->minrot[1] / 360.0; - max = MT_2_PI * conact->maxrot[1] / 360.0; - break; - case ACT_CONST_ROTZ: - locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTZ; - min = MT_2_PI * conact->minrot[2] / 360.0; - max = MT_2_PI * conact->maxrot[2] / 360.0; - break; - default: - ; /* error */ + if (conact->type == ACT_CONST_TYPE_ORI) { + switch (conact->mode) { + case ACT_CONST_DIRPX: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIX; + break; + case ACT_CONST_DIRPY: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIY; + break; + case ACT_CONST_DIRPZ: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIZ; + break; + } + } else if (conact->type == ACT_CONST_TYPE_DIST) { + switch (conact->mode) { + case ACT_CONST_DIRPX: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPX; + min = conact->minloc[0]; + max = conact->maxloc[0]; + break; + case ACT_CONST_DIRPY: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPY; + min = conact->minloc[1]; + max = conact->maxloc[1]; + break; + case ACT_CONST_DIRPZ: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPZ; + min = conact->minloc[2]; + max = conact->maxloc[2]; + break; + case ACT_CONST_DIRMX: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRMX; + min = conact->minloc[0]; + max = conact->maxloc[0]; + break; + case ACT_CONST_DIRMY: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRMY; + min = conact->minloc[1]; + max = conact->maxloc[1]; + break; + case ACT_CONST_DIRMZ: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRMZ; + min = conact->minloc[2]; + max = conact->maxloc[2]; + break; + } + prop = conact->matprop; + } else { + switch (conact->flag) { + case ACT_CONST_LOCX: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCX; + min = conact->minloc[0]; + max = conact->maxloc[0]; + break; + case ACT_CONST_LOCY: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCY; + min = conact->minloc[1]; + max = conact->maxloc[1]; + break; + case ACT_CONST_LOCZ: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_LOCZ; + min = conact->minloc[2]; + max = conact->maxloc[2]; + break; + case ACT_CONST_ROTX: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTX; + min = MT_2_PI * conact->minrot[0] / 360.0; + max = MT_2_PI * conact->maxrot[0] / 360.0; + break; + case ACT_CONST_ROTY: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTY; + min = MT_2_PI * conact->minrot[1] / 360.0; + max = MT_2_PI * conact->maxrot[1] / 360.0; + break; + case ACT_CONST_ROTZ: + locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTZ; + min = MT_2_PI * conact->minrot[2] / 360.0; + max = MT_2_PI * conact->maxrot[2] / 360.0; + break; + default: + ; /* error */ + } } KX_ConstraintActuator *tmpconact = new KX_ConstraintActuator(gameobj, - conact->damp, - min, - max, - locrot); + conact->damp, + conact->rotdamp, + min, + max, + conact->maxrot, + locrot, + conact->time, + conact->flag, + prop); baseact = tmpconact; break; } diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index e7e4eeae7d2..7c9df688d45 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -64,6 +64,7 @@ probably misplaced */ #include "KX_MouseFocusSensor.h" #include "SCA_JoystickSensor.h" #include "KX_NetworkMessageSensor.h" +#include "SCA_ActuatorSensor.h" #include "SCA_PropertySensor.h" @@ -538,6 +539,19 @@ void BL_ConvertSensors(struct Object* blenderobject, break; } + case SENS_ACTUATOR: + { + bActuatorSensor* blenderactsensor = (bActuatorSensor*) sens->data; + // we will reuse the property event manager, there is nothing special with this sensor + SCA_EventManager* eventmgr + = logicmgr->FindEventManager(SCA_EventManager::ACTUATOR_EVENTMGR); + if (eventmgr) + { + STR_String propname=blenderactsensor->name; + gamesensor = new SCA_ActuatorSensor(eventmgr,gameobj,propname); + } + break; + } case SENS_RADAR: { diff --git a/source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp b/source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp new file mode 100644 index 00000000000..28ca1fd673f --- /dev/null +++ b/source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp @@ -0,0 +1,76 @@ +/** + * $Id$ + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "SCA_ISensor.h" +#include "SCA_ActuatorEventManager.h" +#include "SCA_ActuatorSensor.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + + +SCA_ActuatorEventManager::SCA_ActuatorEventManager(class SCA_LogicManager* logicmgr) + : SCA_EventManager(ACTUATOR_EVENTMGR), + m_logicmgr(logicmgr) +{ +} + + + +SCA_ActuatorEventManager::~SCA_ActuatorEventManager() +{ + +} + + + +void SCA_ActuatorEventManager::RegisterSensor(SCA_ISensor* sensor) +{ + m_sensors.push_back(sensor); +} + + + +void SCA_ActuatorEventManager::NextFrame() +{ + // check for changed actuator + for (vector::const_iterator it = m_sensors.begin();!(it==m_sensors.end());it++) + { + (*it)->Activate(m_logicmgr,NULL); + } +} + +void SCA_ActuatorEventManager::UpdateFrame() +{ + // update the state of actuator before executing them + for (vector::const_iterator it = m_sensors.begin();!(it==m_sensors.end());it++) + { + ((SCA_ActuatorSensor*)(*it))->Update(); + } +} \ No newline at end of file diff --git a/source/gameengine/GameLogic/SCA_ActuatorEventManager.h b/source/gameengine/GameLogic/SCA_ActuatorEventManager.h new file mode 100644 index 00000000000..b5108764197 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_ActuatorEventManager.h @@ -0,0 +1,52 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef __KX_ACTUATOREVENTMANAGER +#define __KX_ACTUATOREVENTMANAGER + +#include "SCA_EventManager.h" + +#include + +using namespace std; + +class SCA_ActuatorEventManager : public SCA_EventManager +{ + class SCA_LogicManager* m_logicmgr; + +public: + SCA_ActuatorEventManager(class SCA_LogicManager* logicmgr); + virtual ~SCA_ActuatorEventManager(); + virtual void NextFrame(); + virtual void UpdateFrame(); + virtual void RegisterSensor(SCA_ISensor* sensor); + //SCA_LogicManager* GetLogicManager() { return m_logicmgr;} +}; + +#endif //__KX_ACTUATOREVENTMANAGER + diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp new file mode 100644 index 00000000000..9645bfbed4a --- /dev/null +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp @@ -0,0 +1,196 @@ +/** + * Actuator sensor + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include +#include "SCA_ActuatorSensor.h" +#include "SCA_EventManager.h" +#include "SCA_LogicManager.h" + +#ifdef HAVE_CONFIG_H +#include +#endif + +SCA_ActuatorSensor::SCA_ActuatorSensor(SCA_EventManager* eventmgr, + SCA_IObject* gameobj, + const STR_String& actname, + PyTypeObject* T ) + : SCA_ISensor(gameobj,eventmgr,T), + m_checkactname(actname) +{ + m_actuator = GetParent()->FindActuator(m_checkactname); + Init(); +} + +void SCA_ActuatorSensor::Init() +{ + m_lastresult = m_invert?true:false; + m_midresult = m_lastresult; + m_reset = true; +} + +CValue* SCA_ActuatorSensor::GetReplica() +{ + SCA_ActuatorSensor* replica = new SCA_ActuatorSensor(*this); + // m_range_expr must be recalculated on replica! + CValue::AddDataToReplica(replica); + replica->Init(); + + return replica; +} + +void SCA_ActuatorSensor::ReParent(SCA_IObject* parent) +{ + m_actuator = parent->FindActuator(m_checkactname); + SCA_ISensor::ReParent(parent); +} + +bool SCA_ActuatorSensor::IsPositiveTrigger() +{ + bool result = m_lastresult; + if (m_invert) + result = !result; + + return result; +} + + + +SCA_ActuatorSensor::~SCA_ActuatorSensor() +{ +} + + + +bool SCA_ActuatorSensor::Evaluate(CValue* event) +{ + if (m_actuator) + { + bool result = m_actuator->IsActive(); + bool reset = m_reset && m_level; + + m_reset = false; + if (m_lastresult != result || m_midresult != result) + { + m_lastresult = m_midresult = result; + return true; + } + return (reset) ? true : false; + } + return false; +} + +void SCA_ActuatorSensor::Update() +{ + if (m_actuator) + { + m_midresult = m_actuator->IsActive(); + } +} + + +/* ------------------------------------------------------------------------- */ +/* Python functions */ +/* ------------------------------------------------------------------------- */ + +/* Integration hooks ------------------------------------------------------- */ +PyTypeObject SCA_ActuatorSensor::Type = { + PyObject_HEAD_INIT(&PyType_Type) + 0, + "SCA_ActuatorSensor", + sizeof(SCA_ActuatorSensor), + 0, + PyDestructor, + 0, + __getattr, + __setattr, + 0, //&MyPyCompare, + __repr, + 0, //&cvalue_as_number, + 0, + 0, + 0, + 0 +}; + +PyParentObject SCA_ActuatorSensor::Parents[] = { + &SCA_ActuatorSensor::Type, + &SCA_ISensor::Type, + &SCA_ILogicBrick::Type, + &CValue::Type, + NULL +}; + +PyMethodDef SCA_ActuatorSensor::Methods[] = { + {"getActuator", (PyCFunction) SCA_ActuatorSensor::sPyGetActuator, METH_VARARGS, GetActuator_doc}, + {"setActuator", (PyCFunction) SCA_ActuatorSensor::sPySetActuator, METH_VARARGS, SetActuator_doc}, + {NULL,NULL} //Sentinel +}; + +PyObject* SCA_ActuatorSensor::_getattr(const STR_String& attr) { + _getattr_up(SCA_ISensor); /* implicit return! */ +} + +/* 3. getActuator */ +char SCA_ActuatorSensor::GetActuator_doc[] = +"getActuator()\n" +"\tReturn the Actuator with which the sensor operates.\n"; +PyObject* SCA_ActuatorSensor::PyGetActuator(PyObject* self, PyObject* args, PyObject* kwds) +{ + return PyString_FromString(m_checkactname); +} + +/* 4. setActuator */ +char SCA_ActuatorSensor::SetActuator_doc[] = +"setActuator(name)\n" +"\t- name: string\n" +"\tSets the Actuator with which to operate. If there is no Actuator\n" +"\tof this name, the call is ignored.\n"; +PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* self, PyObject* args, PyObject* kwds) +{ + /* We should query whether the name exists. Or should we create a prop */ + /* on the fly? */ + char *actNameArg = NULL; + + if (!PyArg_ParseTuple(args, "s", &actNameArg)) { + return NULL; + } + + SCA_IActuator* act = GetParent()->FindActuator(STR_String(actNameArg)); + if (act) { + m_checkactname = actNameArg; + m_actuator = act; + } else { + ; /* error: bad actuator name */ + } + Py_Return; +} + +/* eof */ diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h new file mode 100644 index 00000000000..6086c5bfce0 --- /dev/null +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h @@ -0,0 +1,74 @@ +/** + * Actuator sensor + * + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef __KX_ACTUATORSENSOR +#define __KX_ACTUATORSENSOR + +#include "SCA_ISensor.h" +#include "SCA_IActuator.h" + +class SCA_ActuatorSensor : public SCA_ISensor +{ + Py_Header; + STR_String m_checkactname; + bool m_lastresult; + bool m_midresult; + protected: + SCA_IActuator* m_actuator; +public: + SCA_ActuatorSensor(class SCA_EventManager* eventmgr, + SCA_IObject* gameobj, + const STR_String& actname, + PyTypeObject* T=&Type ); + + virtual ~SCA_ActuatorSensor(); + virtual CValue* GetReplica(); + virtual void Init(); + virtual bool Evaluate(CValue* event); + virtual bool IsPositiveTrigger(); + virtual void ReParent(SCA_IObject* parent); + void Update(); + + /* --------------------------------------------------------------------- */ + /* Python interface ---------------------------------------------------- */ + /* --------------------------------------------------------------------- */ + + virtual PyObject* _getattr(const STR_String& attr); + + /* 3. setProperty */ + KX_PYMETHOD_DOC(SCA_ActuatorSensor,SetActuator); + /* 4. getProperty */ + KX_PYMETHOD_DOC(SCA_ActuatorSensor,GetActuator); + +}; + +#endif + diff --git a/source/gameengine/GameLogic/SCA_EventManager.cpp b/source/gameengine/GameLogic/SCA_EventManager.cpp index 1ca88182ddc..0169864a133 100644 --- a/source/gameengine/GameLogic/SCA_EventManager.cpp +++ b/source/gameengine/GameLogic/SCA_EventManager.cpp @@ -72,7 +72,9 @@ void SCA_EventManager::EndFrame() { } - +void SCA_EventManager::UpdateFrame() +{ +} int SCA_EventManager::GetType() { diff --git a/source/gameengine/GameLogic/SCA_EventManager.h b/source/gameengine/GameLogic/SCA_EventManager.h index 89731497f6f..9cc1718cd1e 100644 --- a/source/gameengine/GameLogic/SCA_EventManager.h +++ b/source/gameengine/GameLogic/SCA_EventManager.h @@ -49,7 +49,8 @@ public: RAY_EVENTMGR, RADAR_EVENTMGR, NETWORK_EVENTMGR, - JOY_EVENTMGR + JOY_EVENTMGR, + ACTUATOR_EVENTMGR }; SCA_EventManager(EVENT_MANAGER_TYPE mgrtype); @@ -58,6 +59,7 @@ public: virtual void RemoveSensor(class SCA_ISensor* sensor); virtual void NextFrame(double curtime, double fixedtime); virtual void NextFrame(); + virtual void UpdateFrame(); virtual void EndFrame(); virtual void RegisterSensor(class SCA_ISensor* sensor)=0; int GetType(); diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index 826e7bbdf0e..27e7d5faada 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -157,15 +157,15 @@ bool SCA_IObject::GetIgnoreActivityCulling() void SCA_IObject::ReParentLogic() { - SCA_SensorList& oldsensors = GetSensors(); - - int sen = 0; - SCA_SensorList::iterator its; - for (its = oldsensors.begin(); !(its==oldsensors.end()); ++its) + SCA_ActuatorList& oldactuators = GetActuators(); + int act = 0; + SCA_ActuatorList::iterator ita; + for (ita = oldactuators.begin(); !(ita==oldactuators.end()); ++ita) { - SCA_ISensor* newsensor = (SCA_ISensor*)(*its)->GetReplica(); - newsensor->ReParent(this); - oldsensors[sen++] = newsensor; + SCA_IActuator* newactuator = (SCA_IActuator*) (*ita)->GetReplica(); + newactuator->ReParent(this); + newactuator->SetActive(false); + oldactuators[act++] = newactuator; } SCA_ControllerList& oldcontrollers = GetControllers(); @@ -178,17 +178,17 @@ void SCA_IObject::ReParentLogic() oldcontrollers[con++]=newcontroller; } - SCA_ActuatorList& oldactuators = GetActuators(); - - int act = 0; - SCA_ActuatorList::iterator ita; - for (ita = oldactuators.begin(); !(ita==oldactuators.end()); ++ita) + // convert sensors last so that actuators are already available for Actuator sensor + SCA_SensorList& oldsensors = GetSensors(); + int sen = 0; + SCA_SensorList::iterator its; + for (its = oldsensors.begin(); !(its==oldsensors.end()); ++its) { - SCA_IActuator* newactuator = (SCA_IActuator*) (*ita)->GetReplica(); - newactuator->ReParent(this); - newactuator->SetActive(false); - oldactuators[act++] = newactuator; + SCA_ISensor* newsensor = (SCA_ISensor*)(*its)->GetReplica(); + newsensor->ReParent(this); + oldsensors[sen++] = newsensor; } + // a new object cannot be client of any actuator m_registeredActuators.clear(); diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 1b163deb7bb..68341b57435 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -56,6 +56,7 @@ SCA_ISensor::SCA_ISensor(SCA_IObject* gameobj, m_suspended = false; m_invert = false; m_level = false; + m_reset = false; m_pos_ticks = 0; m_neg_ticks = 0; m_pos_pulsemode = false; diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index 3527b87ebdb..f2ed6a803c2 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -64,6 +64,9 @@ class SCA_ISensor : public SCA_ILogicBrick /** detect level instead of edge*/ bool m_level; + /** sensor has been reset */ + bool m_reset; + /** Sensor must ignore updates? */ bool m_suspended; diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 8668c22f044..3fb439eb25b 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -70,6 +70,7 @@ std::cout << " hat flag " << m_hatf << std::endl; void SCA_JoystickSensor::Init() { m_istrig=(m_invert)?1:0; + m_reset = true; } SCA_JoystickSensor::~SCA_JoystickSensor() @@ -79,9 +80,10 @@ SCA_JoystickSensor::~SCA_JoystickSensor() CValue* SCA_JoystickSensor::GetReplica() { - CValue* replica = new SCA_JoystickSensor(*this); + SCA_JoystickSensor* replica = new SCA_JoystickSensor(*this); // this will copy properties and so on... CValue::AddDataToReplica(replica); + replica->Init(); return replica; } @@ -99,7 +101,9 @@ bool SCA_JoystickSensor::Evaluate(CValue* event) { SCA_Joystick *js = m_pJoystickMgr->GetJoystickDevice(); bool result = false; + bool reset = m_reset && m_level; + m_reset = false; switch(m_joymode) { case KX_JOYSENSORMODE_AXIS: @@ -240,6 +244,8 @@ bool SCA_JoystickSensor::Evaluate(CValue* event) if(!js->IsTrig()){ m_istrig = 0; } + if (reset) + result = true; return result; } diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index 43ce25f94df..a7a6fa93db4 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -78,14 +78,15 @@ void SCA_KeyboardSensor::Init() // However, if the target key is pressed when the sensor is reactivated, it // will not generated an event (see remark in Evaluate()). m_val = (m_invert)?1:0; + m_reset = true; } CValue* SCA_KeyboardSensor::GetReplica() { - CValue* replica = new SCA_KeyboardSensor(*this); + SCA_KeyboardSensor* replica = new SCA_KeyboardSensor(*this); // this will copy properties and so on... CValue::AddDataToReplica(replica); - + replica->Init(); return replica; } @@ -120,8 +121,8 @@ bool SCA_KeyboardSensor::TriggerOnAllKeys() bool SCA_KeyboardSensor::Evaluate(CValue* eventval) { bool result = false; + bool reset = m_reset && m_level; SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice(); - // cerr << "SCA_KeyboardSensor::Eval event, sensing for "<< m_hotkey << " at device " << inputdev << "\n"; /* See if we need to do logging: togPropState exists and is @@ -134,7 +135,7 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) LogKeystrokes(); } - + m_reset = false; /* Now see whether events must be bounced. */ if (m_bAllKeys) @@ -176,8 +177,8 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) { if (m_val == 0) { + m_val = 1; if (m_level) { - m_val = 1; result = true; } } @@ -229,9 +230,9 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) { if (m_val == 0) { + m_val = 1; if (m_level) { - m_val = 1; result = true; } } @@ -240,7 +241,9 @@ bool SCA_KeyboardSensor::Evaluate(CValue* eventval) } } } - + if (reset) + // force an event + result = true; return result; } diff --git a/source/gameengine/GameLogic/SCA_LogicManager.cpp b/source/gameengine/GameLogic/SCA_LogicManager.cpp index fb1a2c29eb6..f50161cbecb 100644 --- a/source/gameengine/GameLogic/SCA_LogicManager.cpp +++ b/source/gameengine/GameLogic/SCA_LogicManager.cpp @@ -271,6 +271,10 @@ void SCA_LogicManager::UpdateFrame(double curtime, bool frame) } m_removedActuators.clear(); + // About to run actuators, but before update the sensors for those which depends on actuators + for (vector::const_iterator ie=m_eventmanagers.begin(); !(ie==m_eventmanagers.end()); ie++) + (*ie)->UpdateFrame(); + for (set::iterator ia = m_activeActuators.begin();!(ia==m_activeActuators.end());ia++) { //SCA_IActuator* actua = *ia; diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index 42d35837489..2298ddb0743 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -84,6 +84,7 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr, void SCA_MouseSensor::Init() { m_val = (m_invert)?1:0; /* stores the latest attribute */ + m_reset = true; } SCA_MouseSensor::~SCA_MouseSensor() @@ -95,9 +96,10 @@ SCA_MouseSensor::~SCA_MouseSensor() CValue* SCA_MouseSensor::GetReplica() { - CValue* replica = new SCA_MouseSensor(*this); + SCA_MouseSensor* replica = new SCA_MouseSensor(*this); // this will copy properties and so on... CValue::AddDataToReplica(replica); + replica->Init(); return replica; } @@ -132,6 +134,7 @@ SCA_IInputDevice::KX_EnumInputs SCA_MouseSensor::GetHotKey() bool SCA_MouseSensor::Evaluate(CValue* event) { bool result = false; + bool reset = m_reset && m_level; SCA_IInputDevice* mousedev = m_pMouseMgr->GetInputDevice(); @@ -143,7 +146,7 @@ bool SCA_MouseSensor::Evaluate(CValue* event) /* both MOUSEX and MOUSEY. Treat all of these as key-presses. */ /* So, treat KX_MOUSESENSORMODE_POSITION as */ /* KX_MOUSESENSORMODE_POSITIONX || KX_MOUSESENSORMODE_POSITIONY */ - + m_reset = false; switch (m_mousemode) { case KX_MOUSESENSORMODE_LEFTBUTTON: case KX_MOUSESENSORMODE_MIDDLEBUTTON: @@ -168,9 +171,9 @@ bool SCA_MouseSensor::Evaluate(CValue* event) { if (m_val == 0) { + m_val = 1; if (m_level) { - m_val = 1; result = true; } } @@ -222,6 +225,9 @@ bool SCA_MouseSensor::Evaluate(CValue* event) ; /* error */ } + if (reset) + // force an event + result = true; return result; } diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index 655e9060238..c50c011cc63 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -78,6 +78,7 @@ void SCA_PropertySensor::Init() { m_recentresult = false; m_lastresult = m_invert?true:false; + m_reset = true; } void SCA_PropertySensor::PrecalculateRangeExpression() @@ -111,6 +112,7 @@ CValue* SCA_PropertySensor::GetReplica() SCA_PropertySensor* replica = new SCA_PropertySensor(*this); // m_range_expr must be recalculated on replica! CValue::AddDataToReplica(replica); + replica->Init(); replica->m_range_expr = NULL; if (replica->m_checktype==KX_PROPSENSOR_INTERVAL) @@ -153,14 +155,15 @@ SCA_PropertySensor::~SCA_PropertySensor() bool SCA_PropertySensor::Evaluate(CValue* event) { bool result = CheckPropertyCondition(); + bool reset = m_reset && m_level; + m_reset = false; if (m_lastresult!=result) { m_lastresult = result; return true; } - - return false; + return (reset) ? true : false; } diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index bd843d97199..80288a72485 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -35,6 +35,7 @@ #include "MT_Point3.h" #include "MT_Matrix3x3.h" #include "KX_GameObject.h" +#include "KX_RayCast.h" #ifdef HAVE_CONFIG_H #include @@ -45,35 +46,54 @@ /* ------------------------------------------------------------------------- */ KX_ConstraintActuator::KX_ConstraintActuator(SCA_IObject *gameobj, - int dampTime, + int posDampTime, + int rotDampTime, float minBound, float maxBound, + float refDir[3], int locrotxyz, - PyTypeObject* T) - : SCA_IActuator(gameobj, T) + int time, + int option, + char *property, + PyTypeObject* T) : + m_refDirection(refDir), + m_currentTime(0), + SCA_IActuator(gameobj, T) { - m_dampTime = dampTime; + m_posDampTime = posDampTime; + m_rotDampTime = rotDampTime; m_locrot = locrotxyz; + m_option = option; + m_activeTime = time; + if (property) { + strncpy(m_property, property, sizeof(m_property)); + m_property[sizeof(m_property)-1] = 0; + } else { + m_property[0] = 0; + } /* The units of bounds are determined by the type of constraint. To */ /* make the constraint application easier and more transparent later on, */ /* I think converting the bounds to the applicable domain makes more */ /* sense. */ switch (m_locrot) { - case KX_ACT_CONSTRAINT_LOCX: - case KX_ACT_CONSTRAINT_LOCY: - case KX_ACT_CONSTRAINT_LOCZ: + case KX_ACT_CONSTRAINT_ORIX: + case KX_ACT_CONSTRAINT_ORIY: + case KX_ACT_CONSTRAINT_ORIZ: + { + MT_Scalar len = m_refDirection.length(); + if (MT_fuzzyZero(len)) { + // missing a valid direction + std::cout << "WARNING: Constraint actuator " << GetName() << ": There is no valid reference direction!" << std::endl; + m_locrot = KX_ACT_CONSTRAINT_NODEF; + } else { + m_refDirection /= len; + } + } + break; + default: m_minimumBound = minBound; m_maximumBound = maxBound; break; - case KX_ACT_CONSTRAINT_ROTX: - case KX_ACT_CONSTRAINT_ROTY: - case KX_ACT_CONSTRAINT_ROTZ: - /* The user interface asks for degrees, we are radian. */ - m_minimumBound = MT_radians(minBound); - m_maximumBound = MT_radians(maxBound); - break; - default: - ; /* error */ } } /* End of constructor */ @@ -83,6 +103,40 @@ KX_ConstraintActuator::~KX_ConstraintActuator() // there's nothing to be done here, really.... } /* end of destructor */ +bool KX_ConstraintActuator::RayHit(KX_ClientObjectInfo* client, MT_Point3& hit_point, MT_Vector3& hit_normal, void * const data) +{ + + KX_GameObject* hitKXObj = client->m_gameobject; + + if (client->m_type > KX_ClientObjectInfo::ACTOR) + { + // false hit + return false; + } + bool bFound = false; + + if (m_property[0] == 0) + { + bFound = true; + } + else + { + if (m_option & KX_ACT_CONSTRAINT_MATERIAL) + { + if (client->m_auxilary_info) + { + bFound = !strcmp(m_property, ((char*)client->m_auxilary_info)); + } + } + else + { + bFound = hitKXObj->GetProperty(m_property) != NULL; + } + } + + return bFound; +} + bool KX_ConstraintActuator::Update(double curtime, bool frame) { @@ -90,70 +144,198 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); - if (bNegativeEvent) - return false; // do nothing on negative events + if (!bNegativeEvent) { + /* Constraint clamps the values to the specified range, with a sort of */ + /* low-pass filtered time response, if the damp time is unequal to 0. */ - /* Constraint clamps the values to the specified range, with a sort of */ - /* low-pass filtered time response, if the damp time is unequal to 0. */ + /* Having to retrieve location/rotation and setting it afterwards may not */ + /* be efficient enough... Somthing to look at later. */ + KX_GameObject *obj = (KX_GameObject*) GetParent(); + MT_Point3 position = obj->NodeGetWorldPosition(); + MT_Point3 newposition; + MT_Vector3 direction; + MT_Matrix3x3 rotation = obj->NodeGetWorldOrientation(); + MT_Scalar filter, newdistance; + int axis, sign; - /* Having to retrieve location/rotation and setting it afterwards may not */ - /* be efficient enough... Somthing to look at later. */ - KX_GameObject *parent = (KX_GameObject*) GetParent(); - MT_Point3 position = parent->NodeGetWorldPosition(); - MT_Matrix3x3 rotation = parent->NodeGetWorldOrientation(); -// MT_Vector3 eulerrot = rotation.getEuler(); - - switch (m_locrot) { - case KX_ACT_CONSTRAINT_LOCX: - Clamp(position[0], m_minimumBound, m_maximumBound); - result = true; - break; - case KX_ACT_CONSTRAINT_LOCY: - Clamp(position[1], m_minimumBound, m_maximumBound); - result = true; - break; - case KX_ACT_CONSTRAINT_LOCZ: - Clamp(position[2], m_minimumBound, m_maximumBound); - result = true; - break; - -// case KX_ACT_CONSTRAINT_ROTX: -// /* The angles are Euler angles (I think that's what they are called) */ -// /* but we need to convert from/to the MT_Matrix3x3. */ -// Clamp(eulerrot[0], m_minimumBound, m_maximumBound); -// break; -// case KX_ACT_CONSTRAINT_ROTY: -// Clamp(eulerrot[1], m_minimumBound, m_maximumBound); -// break; -// case KX_ACT_CONSTRAINT_ROTZ: -// Clamp(eulerrot[2], m_minimumBound, m_maximumBound); -// break; -// default: -// ; /* error */ + if (m_posDampTime) { + filter = m_posDampTime/(1.0+m_posDampTime); + } + switch (m_locrot) { + case KX_ACT_CONSTRAINT_ORIX: + case KX_ACT_CONSTRAINT_ORIY: + case KX_ACT_CONSTRAINT_ORIZ: + switch (m_locrot) { + case KX_ACT_CONSTRAINT_ORIX: + direction[0] = rotation[0][0]; + direction[1] = rotation[1][0]; + direction[2] = rotation[2][0]; + axis = 0; + break; + case KX_ACT_CONSTRAINT_ORIY: + direction[0] = rotation[0][1]; + direction[1] = rotation[1][1]; + direction[2] = rotation[2][1]; + axis = 1; + break; + case KX_ACT_CONSTRAINT_ORIZ: + direction[0] = rotation[0][2]; + direction[1] = rotation[1][2]; + direction[2] = rotation[2][2]; + axis = 2; + break; + } + // apply damping on the direction + if (m_posDampTime) { + direction = filter*direction + (1.0-filter)*m_refDirection; + } + obj->AlignAxisToVect(direction, axis); + result = true; + goto CHECK_TIME; + case KX_ACT_CONSTRAINT_DIRPX: + case KX_ACT_CONSTRAINT_DIRPY: + case KX_ACT_CONSTRAINT_DIRPZ: + case KX_ACT_CONSTRAINT_DIRMX: + case KX_ACT_CONSTRAINT_DIRMY: + case KX_ACT_CONSTRAINT_DIRMZ: + switch (m_locrot) { + case KX_ACT_CONSTRAINT_DIRPX: + direction[0] = rotation[0][0]; + direction[1] = rotation[1][0]; + direction[2] = rotation[2][0]; + axis = 0; // axis according to KX_GameObject::AlignAxisToVect() + sign = 1; // X axis will be anti parrallel to normal + break; + case KX_ACT_CONSTRAINT_DIRPY: + direction[0] = rotation[0][1]; + direction[1] = rotation[1][1]; + direction[2] = rotation[2][1]; + axis = 1; + sign = 1; + break; + case KX_ACT_CONSTRAINT_DIRPZ: + direction[0] = rotation[0][2]; + direction[1] = rotation[1][2]; + direction[2] = rotation[2][2]; + axis = 2; + sign = 1; + break; + case KX_ACT_CONSTRAINT_DIRMX: + direction[0] = -rotation[0][0]; + direction[1] = -rotation[1][0]; + direction[2] = -rotation[2][0]; + axis = 0; + sign = 0; + break; + case KX_ACT_CONSTRAINT_DIRMY: + direction[0] = -rotation[0][1]; + direction[1] = -rotation[1][1]; + direction[2] = -rotation[2][1]; + axis = 1; + sign = 0; + break; + case KX_ACT_CONSTRAINT_DIRMZ: + direction[0] = -rotation[0][2]; + direction[1] = -rotation[1][2]; + direction[2] = -rotation[2][2]; + axis = 2; + sign = 0; + break; + } + direction.normalize(); + { + MT_Point3 topoint = position + (m_maximumBound) * direction; + MT_Point3 resultpoint; + MT_Vector3 resultnormal; + PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment(); + KX_IPhysicsController *spc = obj->GetPhysicsController(); + + if (!pe) { + std::cout << "WARNING: Constraint actuator " << GetName() << ": There is no physics environment!" << std::endl; + goto CHECK_TIME; + } + if (!spc) { + // the object is not physical, we probably want to avoid hitting its own parent + KX_GameObject *parent = obj->GetParent(); + if (parent) { + spc = parent->GetPhysicsController(); + parent->Release(); + } + } + result = KX_RayCast::RayTest(spc, pe, position, topoint, resultpoint, resultnormal, KX_RayCast::Callback(this)); + + if (result) { + // compute new position & orientation + if ((m_option & (KX_ACT_CONSTRAINT_NORMAL|KX_ACT_CONSTRAINT_DISTANCE)) == 0) { + // if none option is set, the actuator does nothing but detect ray + // (works like a sensor) + goto CHECK_TIME; + } + if (m_option & KX_ACT_CONSTRAINT_NORMAL) { + // the new orientation must be so that the axis is parallel to normal + if (sign) + resultnormal = -resultnormal; + // apply damping on the direction + if (m_rotDampTime) { + MT_Scalar rotFilter = 1.0/(1.0+m_rotDampTime); + resultnormal = (-m_rotDampTime*rotFilter)*direction + rotFilter*resultnormal; + } else if (m_posDampTime) { + resultnormal = -filter*direction + (1.0-filter)*resultnormal; + } + obj->AlignAxisToVect(resultnormal, axis); + direction = -resultnormal; + } + if (m_option & KX_ACT_CONSTRAINT_DISTANCE) { + if (m_posDampTime) { + newdistance = filter*(position-resultpoint).length()+(1.0-filter)*m_minimumBound; + } else { + newdistance = m_minimumBound; + } + } else { + newdistance = (position-resultpoint).length(); + } + newposition = resultpoint-newdistance*direction; + } else if (m_option & KX_ACT_CONSTRAINT_PERMANENT) { + // no contact but still keep running + result = true; + goto CHECK_TIME; + } + } + break; + case KX_ACT_CONSTRAINT_LOCX: + case KX_ACT_CONSTRAINT_LOCY: + case KX_ACT_CONSTRAINT_LOCZ: + newposition = position; + switch (m_locrot) { + case KX_ACT_CONSTRAINT_LOCX: + Clamp(newposition[0], m_minimumBound, m_maximumBound); + break; + case KX_ACT_CONSTRAINT_LOCY: + Clamp(newposition[1], m_minimumBound, m_maximumBound); + break; + case KX_ACT_CONSTRAINT_LOCZ: + Clamp(newposition[2], m_minimumBound, m_maximumBound); + break; + } + result = true; + if (m_posDampTime) { + newposition = filter*position + (1.0-filter)*newposition; + } + break; + } + if (result) { + // set the new position but take into account parent if any + obj->NodeSetWorldPosition(newposition); + } + CHECK_TIME: + if (result && m_activeTime > 0 ) { + if (++m_currentTime >= m_activeTime) + result = false; + } } - - /* Will be replaced by a filtered clamp. */ - - - switch (m_locrot) { - case KX_ACT_CONSTRAINT_LOCX: - case KX_ACT_CONSTRAINT_LOCY: - case KX_ACT_CONSTRAINT_LOCZ: - parent->NodeSetLocalPosition(position); - break; - - -// case KX_ACT_CONSTRAINT_ROTX: -// case KX_ACT_CONSTRAINT_ROTY: -// case KX_ACT_CONSTRAINT_ROTZ: -// rotation.setEuler(eulerrot); -// parent->NodeSetLocalOrientation(rotation); - break; - - default: - ; /* error */ + if (!result) { + m_currentTime = 0; } - return result; } /* end of KX_ConstraintActuator::Update(double curtime,double deltatime) */ @@ -214,10 +396,24 @@ PyParentObject KX_ConstraintActuator::Parents[] = { PyMethodDef KX_ConstraintActuator::Methods[] = { {"setDamp", (PyCFunction) KX_ConstraintActuator::sPySetDamp, METH_VARARGS, SetDamp_doc}, {"getDamp", (PyCFunction) KX_ConstraintActuator::sPyGetDamp, METH_VARARGS, GetDamp_doc}, + {"setRotDamp", (PyCFunction) KX_ConstraintActuator::sPySetRotDamp, METH_VARARGS, SetRotDamp_doc}, + {"getRotDamp", (PyCFunction) KX_ConstraintActuator::sPyGetRotDamp, METH_VARARGS, GetRotDamp_doc}, + {"setDirection", (PyCFunction) KX_ConstraintActuator::sPySetDirection, METH_VARARGS, SetDirection_doc}, + {"getDirection", (PyCFunction) KX_ConstraintActuator::sPyGetDirection, METH_VARARGS, GetDirection_doc}, + {"setOption", (PyCFunction) KX_ConstraintActuator::sPySetOption, METH_VARARGS, SetOption_doc}, + {"getOption", (PyCFunction) KX_ConstraintActuator::sPyGetOption, METH_VARARGS, GetOption_doc}, + {"setTime", (PyCFunction) KX_ConstraintActuator::sPySetTime, METH_VARARGS, SetTime_doc}, + {"getTime", (PyCFunction) KX_ConstraintActuator::sPyGetTime, METH_VARARGS, GetTime_doc}, + {"setProperty", (PyCFunction) KX_ConstraintActuator::sPySetProperty, METH_VARARGS, SetProperty_doc}, + {"getProperty", (PyCFunction) KX_ConstraintActuator::sPyGetProperty, METH_VARARGS, GetProperty_doc}, {"setMin", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, SetMin_doc}, {"getMin", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_VARARGS, GetMin_doc}, + {"setDistance", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, SetDistance_doc}, + {"getDistance", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_VARARGS, GetDistance_doc}, {"setMax", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, SetMax_doc}, {"getMax", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_VARARGS, GetMax_doc}, + {"setRayLength", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, SetRayLength_doc}, + {"getRayLength", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_VARARGS, GetRayLength_doc}, {"setLimit", (PyCFunction) KX_ConstraintActuator::sPySetLimit, METH_VARARGS, SetLimit_doc}, {"getLimit", (PyCFunction) KX_ConstraintActuator::sPyGetLimit, METH_VARARGS, GetLimit_doc}, {NULL,NULL} //Sentinel @@ -231,7 +427,7 @@ PyObject* KX_ConstraintActuator::_getattr(const STR_String& attr) { char KX_ConstraintActuator::SetDamp_doc[] = "setDamp(duration)\n" "\t- duration: integer\n" -"\tSets the time with which the constraint application is delayed.\n" +"\tSets the time constant of the orientation and distance constraint.\n" "\tIf the duration is negative, it is set to 0.\n"; PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, PyObject* args, @@ -241,21 +437,192 @@ PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, return NULL; } - m_dampTime = dampArg; - if (m_dampTime < 0) m_dampTime = 0; + m_posDampTime = dampArg; + if (m_posDampTime < 0) m_posDampTime = 0; Py_Return; } /* 3. getDamp */ char KX_ConstraintActuator::GetDamp_doc[] = -"GetDamp()\n" -"\tReturns the damping time for application of the constraint.\n"; +"getDamp()\n" +"\tReturns the damping parameter.\n"; PyObject* KX_ConstraintActuator::PyGetDamp(PyObject* self, PyObject* args, PyObject* kwds){ - return PyInt_FromLong(m_dampTime); + return PyInt_FromLong(m_posDampTime); } +/* 2. setRotDamp */ +char KX_ConstraintActuator::SetRotDamp_doc[] = +"setRotDamp(duration)\n" +"\t- duration: integer\n" +"\tSets the time constant of the orientation constraint.\n" +"\tIf the duration is negative, it is set to 0.\n"; +PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self, + PyObject* args, + PyObject* kwds) { + int dampArg; + if(!PyArg_ParseTuple(args, "i", &dampArg)) { + return NULL; + } + + m_rotDampTime = dampArg; + if (m_rotDampTime < 0) m_rotDampTime = 0; + + Py_Return; +} +/* 3. getRotDamp */ +char KX_ConstraintActuator::GetRotDamp_doc[] = +"getRotDamp()\n" +"\tReturns the damping time for application of the constraint.\n"; +PyObject* KX_ConstraintActuator::PyGetRotDamp(PyObject* self, + PyObject* args, + PyObject* kwds){ + return PyInt_FromLong(m_rotDampTime); +} + +/* 2. setDirection */ +char KX_ConstraintActuator::SetDirection_doc[] = +"setDirection(vector)\n" +"\t- vector: 3-tuple\n" +"\tSets the reference direction in world coordinate for the orientation constraint.\n"; +PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self, + PyObject* args, + PyObject* kwds) { + float x, y, z; + MT_Scalar len; + MT_Vector3 dir; + + if(!PyArg_ParseTuple(args, "(fff)", &x, &y, &z)) { + return NULL; + } + dir[0] = x; + dir[1] = y; + dir[2] = z; + len = dir.length(); + if (MT_fuzzyZero(len)) { + std::cout << "Invalid direction" << std::endl; + return NULL; + } + m_refDirection = dir/len; + + Py_Return; +} +/* 3. getDirection */ +char KX_ConstraintActuator::GetDirection_doc[] = +"getDirection()\n" +"\tReturns the reference direction of the orientation constraint as a 3-tuple.\n"; +PyObject* KX_ConstraintActuator::PyGetDirection(PyObject* self, + PyObject* args, + PyObject* kwds){ + PyObject *retVal = PyList_New(3); + + PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_refDirection[0])); + PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_refDirection[1])); + PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_refDirection[2])); + return retVal; +} + +/* 2. setOption */ +char KX_ConstraintActuator::SetOption_doc[] = +"setOption(option)\n" +"\t- option: integer\n" +"\tSets several options of the distance constraint.\n" +"\tBinary combination of the following values:\n" +"\t\t 64 : Activate alignment to surface\n" +"\t\t128 : Detect material rather than property\n" +"\t\t256 : No deactivation if ray does not hit target\n" +"\t\t512 : Activate distance control\n"; +PyObject* KX_ConstraintActuator::PySetOption(PyObject* self, + PyObject* args, + PyObject* kwds) { + int option; + if(!PyArg_ParseTuple(args, "i", &option)) { + return NULL; + } + + m_option = option; + + Py_Return; +} +/* 3. getOption */ +char KX_ConstraintActuator::GetOption_doc[] = +"getOption()\n" +"\tReturns the option parameter.\n"; +PyObject* KX_ConstraintActuator::PyGetOption(PyObject* self, + PyObject* args, + PyObject* kwds){ + return PyInt_FromLong(m_option); +} + +/* 2. setTime */ +char KX_ConstraintActuator::SetTime_doc[] = +"setTime(duration)\n" +"\t- duration: integer\n" +"\tSets the activation time of the actuator.\n" +"\tThe actuator disables itself after this many frame.\n" +"\tIf set to 0 or negative, the actuator is not limited in time.\n"; +PyObject* KX_ConstraintActuator::PySetTime(PyObject* self, + PyObject* args, + PyObject* kwds) { + int t; + if(!PyArg_ParseTuple(args, "i", &t)) { + return NULL; + } + + if (t < 0) + t = 0; + m_activeTime = t; + + Py_Return; +} +/* 3. getTime */ +char KX_ConstraintActuator::GetTime_doc[] = +"getTime()\n" +"\tReturns the time parameter.\n"; +PyObject* KX_ConstraintActuator::PyGetTime(PyObject* self, + PyObject* args, + PyObject* kwds){ + return PyInt_FromLong(m_activeTime); +} + +/* 2. setProperty */ +char KX_ConstraintActuator::SetProperty_doc[] = +"setProperty(property)\n" +"\t- property: string\n" +"\tSets the name of the property or material for the ray detection of the distance constraint.\n" +"\tIf empty, the ray will detect any collisioning object.\n"; +PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self, + PyObject* args, + PyObject* kwds) { + char *property; + if (!PyArg_ParseTuple(args, "s", &property)) { + return NULL; + } + if (property == NULL) { + m_property[0] = 0; + } else { + strncpy(m_property, property, sizeof(m_property)); + m_property[sizeof(m_property)-1] = 0; + } + + Py_Return; +} +/* 3. getProperty */ +char KX_ConstraintActuator::GetProperty_doc[] = +"getProperty()\n" +"\tReturns the property parameter.\n"; +PyObject* KX_ConstraintActuator::PyGetProperty(PyObject* self, + PyObject* args, + PyObject* kwds){ + return PyString_FromString(m_property); +} + +/* 4. setDistance */ +char KX_ConstraintActuator::SetDistance_doc[] = +"setDistance(distance)\n" +"\t- distance: float\n" +"\tSets the target distance in distance constraint\n"; /* 4. setMin */ char KX_ConstraintActuator::SetMin_doc[] = "setMin(lower_bound)\n" @@ -271,9 +638,7 @@ PyObject* KX_ConstraintActuator::PySetMin(PyObject* self, } switch (m_locrot) { - case KX_ACT_CONSTRAINT_LOCX: - case KX_ACT_CONSTRAINT_LOCY: - case KX_ACT_CONSTRAINT_LOCZ: + default: m_minimumBound = minArg; break; case KX_ACT_CONSTRAINT_ROTX: @@ -281,12 +646,14 @@ PyObject* KX_ConstraintActuator::PySetMin(PyObject* self, case KX_ACT_CONSTRAINT_ROTZ: m_minimumBound = MT_radians(minArg); break; - default: - ; /* error */ } Py_Return; } +/* 5. getDistance */ +char KX_ConstraintActuator::GetDistance_doc[] = +"getDistance()\n" +"\tReturns the distance parameter \n"; /* 5. getMin */ char KX_ConstraintActuator::GetMin_doc[] = "getMin()\n" @@ -298,6 +665,11 @@ PyObject* KX_ConstraintActuator::PyGetMin(PyObject* self, return PyFloat_FromDouble(m_minimumBound); } +/* 6. setRayLength */ +char KX_ConstraintActuator::SetRayLength_doc[] = +"setRayLength(length)\n" +"\t- length: float\n" +"\tSets the maximum ray length of the distance constraint\n"; /* 6. setMax */ char KX_ConstraintActuator::SetMax_doc[] = "setMax(upper_bound)\n" @@ -313,9 +685,7 @@ PyObject* KX_ConstraintActuator::PySetMax(PyObject* self, } switch (m_locrot) { - case KX_ACT_CONSTRAINT_LOCX: - case KX_ACT_CONSTRAINT_LOCY: - case KX_ACT_CONSTRAINT_LOCZ: + default: m_maximumBound = maxArg; break; case KX_ACT_CONSTRAINT_ROTX: @@ -323,12 +693,14 @@ PyObject* KX_ConstraintActuator::PySetMax(PyObject* self, case KX_ACT_CONSTRAINT_ROTZ: m_maximumBound = MT_radians(maxArg); break; - default: - ; /* error */ } Py_Return; } +/* 7. getRayLength */ +char KX_ConstraintActuator::GetRayLength_doc[] = +"getRayLength()\n" +"\tReturns the length of the ray\n"; /* 7. getMax */ char KX_ConstraintActuator::GetMax_doc[] = "getMax()\n" @@ -345,9 +717,19 @@ PyObject* KX_ConstraintActuator::PyGetMax(PyObject* self, /* 8. setLimit */ char KX_ConstraintActuator::SetLimit_doc[] = "setLimit(type)\n" -"\t- type: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY,\n" -"\t KX_CONSTRAINTACT_LOCZ, KX_CONSTRAINTACT_ROTX,\n" -"\t KX_CONSTRAINTACT_ROTY, or KX_CONSTRAINTACT_ROTZ.\n" +"\t- type: integer\n" +"\t 1 : LocX\n" +"\t 2 : LocY\n" +"\t 3 : LocZ\n" +"\t 7 : Distance along +X axis\n" +"\t 8 : Distance along +Y axis\n" +"\t 9 : Distance along +Z axis\n" +"\t 10 : Distance along -X axis\n" +"\t 11 : Distance along -Y axis\n" +"\t 12 : Distance along -Z axis\n" +"\t 13 : Align X axis\n" +"\t 14 : Align Y axis\n" +"\t 15 : Align Z axis\n" "\tSets the type of constraint.\n"; PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, PyObject* args, @@ -363,7 +745,7 @@ PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, } /* 9. getLimit */ char KX_ConstraintActuator::GetLimit_doc[] = -"getLimit(type)\n" +"getLimit()\n" "\tReturns the type of constraint.\n"; PyObject* KX_ConstraintActuator::PyGetLimit(PyObject* self, PyObject* args, diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index a21a5f30de6..5a1d4d23217 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -34,19 +34,31 @@ #include "SCA_IActuator.h" #include "MT_Scalar.h" +#include "MT_Vector3.h" +#include "KX_ClientObjectInfo.h" class KX_ConstraintActuator : public SCA_IActuator { Py_Header; protected: // Damp time (int), - int m_dampTime; - // min (float), + int m_posDampTime; + int m_rotDampTime; + // min (float) float m_minimumBound; - // max (float), + // max (float) float m_maximumBound; + // reference direction + MT_Vector3 m_refDirection; // locrotxyz choice (pick one): only one choice allowed at a time! int m_locrot; + // active time of actuator + int m_activeTime; + int m_currentTime; + // option + int m_option; + // property to check + char m_property[32]; /** * Clamp to , . Borders are included (in as far as @@ -56,6 +68,7 @@ protected: public: + // m_locrot enum KX_CONSTRAINTTYPE { KX_ACT_CONSTRAINT_NODEF = 0, KX_ACT_CONSTRAINT_LOCX, @@ -64,16 +77,37 @@ protected: KX_ACT_CONSTRAINT_ROTX, KX_ACT_CONSTRAINT_ROTY, KX_ACT_CONSTRAINT_ROTZ, + KX_ACT_CONSTRAINT_DIRPX, + KX_ACT_CONSTRAINT_DIRPY, + KX_ACT_CONSTRAINT_DIRPZ, + KX_ACT_CONSTRAINT_DIRMX, + KX_ACT_CONSTRAINT_DIRMY, + KX_ACT_CONSTRAINT_DIRMZ, + KX_ACT_CONSTRAINT_ORIX, + KX_ACT_CONSTRAINT_ORIY, + KX_ACT_CONSTRAINT_ORIZ, KX_ACT_CONSTRAINT_MAX }; - + // match ACT_CONST_... values from BIF_interface.h + enum KX_CONSTRAINTOPT { + KX_ACT_CONSTRAINT_NORMAL = 64, + KX_ACT_CONSTRAINT_MATERIAL = 128, + KX_ACT_CONSTRAINT_PERMANENT = 256, + KX_ACT_CONSTRAINT_DISTANCE = 512 + }; bool IsValidMode(KX_CONSTRAINTTYPE m); + bool RayHit(KX_ClientObjectInfo* client, MT_Point3& hit_point, MT_Vector3& hit_normal, void * const data); KX_ConstraintActuator(SCA_IObject* gameobj, - int damptime, + int posDamptime, + int rotDampTime, float min, float max, + float refDir[3], int locrot, + int time, + int option, + char *property, PyTypeObject* T=&Type); virtual ~KX_ConstraintActuator(); virtual CValue* GetReplica() { @@ -94,13 +128,26 @@ protected: KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDamp); KX_PYMETHOD_DOC(KX_ConstraintActuator,GetDamp); + KX_PYMETHOD_DOC(KX_ConstraintActuator,SetRotDamp); + KX_PYMETHOD_DOC(KX_ConstraintActuator,GetRotDamp); + KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDirection); + KX_PYMETHOD_DOC(KX_ConstraintActuator,GetDirection); + KX_PYMETHOD_DOC(KX_ConstraintActuator,SetOption); + KX_PYMETHOD_DOC(KX_ConstraintActuator,GetOption); + KX_PYMETHOD_DOC(KX_ConstraintActuator,SetTime); + KX_PYMETHOD_DOC(KX_ConstraintActuator,GetTime); + KX_PYMETHOD_DOC(KX_ConstraintActuator,SetProperty); + KX_PYMETHOD_DOC(KX_ConstraintActuator,GetProperty); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMin); KX_PYMETHOD_DOC(KX_ConstraintActuator,GetMin); + static char SetDistance_doc[]; + static char GetDistance_doc[]; KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMax); KX_PYMETHOD_DOC(KX_ConstraintActuator,GetMax); + static char SetRayLength_doc[]; + static char GetRayLength_doc[]; KX_PYMETHOD_DOC(KX_ConstraintActuator,SetLimit); KX_PYMETHOD_DOC(KX_ConstraintActuator,GetLimit); - }; #endif //__KX_CONSTRAINTACTUATOR diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index c4925cb772c..d6d2254850a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -644,6 +644,15 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) NodeSetLocalOrientation(orimat); } +MT_Scalar KX_GameObject::GetMass() +{ + if (m_pPhysicsController1) + { + return m_pPhysicsController1->GetMass(); + } + return 0.0; +} + MT_Vector3 KX_GameObject::GetLinearVelocity(bool local) { MT_Vector3 velocity(0.0,0.0,0.0), locvel; @@ -735,6 +744,31 @@ void KX_GameObject::NodeSetRelativeScale(const MT_Vector3& scale) GetSGNode()->RelativeScale(scale); } +void KX_GameObject::NodeSetWorldPosition(const MT_Point3& trans) +{ + SG_Node* parent = m_pSGNode->GetSGParent(); + if (parent != NULL) + { + // Make sure the objects have some scale + MT_Vector3 scale = parent->GetWorldScaling(); + if (fabs(scale[0]) < FLT_EPSILON || + fabs(scale[1]) < FLT_EPSILON || + fabs(scale[2]) < FLT_EPSILON) + { + return; + } + scale[0] = 1.0/scale[0]; + scale[1] = 1.0/scale[1]; + scale[2] = 1.0/scale[2]; + MT_Matrix3x3 invori = parent->GetWorldOrientation().inverse(); + MT_Vector3 newpos = invori*(trans-parent->GetWorldPosition())*scale; + NodeSetLocalPosition(MT_Point3(newpos[0],newpos[1],newpos[2])); + } + else + { + NodeSetLocalPosition(trans); + } +} void KX_GameObject::NodeUpdateGS(double time,bool bInitiator) diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 31b56df5368..5e44a36515d 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -258,6 +258,12 @@ public: bool local=false ); + /** + * Return the mass of the object + */ + MT_Scalar + GetMass(); + /** * Return the angular velocity of the game object. */ @@ -332,6 +338,9 @@ public: void NodeSetRelativeScale( const MT_Vector3& scale ); + // adapt local position so that world position is set to desired position + void NodeSetWorldPosition(const MT_Point3& trans); + void NodeUpdateGS( double time, diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index f89d32bbe66..db0bef8b7e1 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -77,15 +77,17 @@ void KX_MouseFocusSensor::Init() m_mouse_over_in_previous_frame = (m_invert)?true:false; m_positive_event = false; m_hitObject = 0; + m_reset = true; } bool KX_MouseFocusSensor::Evaluate(CValue* event) { bool result = false; bool obHasFocus = false; + bool reset = m_reset && m_level; // cout << "evaluate focus mouse sensor "<m_colliders = new CListValue(); - replica->m_bCollision = false; - replica->m_bTriggered= false; - replica->m_hitObject = NULL; - replica->m_bLastTriggered = false; + replica->Init(); // this will copy properties and so on... CValue::AddDataToReplica(replica); diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 03ae14997ab..9ac0b4d4703 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -68,8 +68,15 @@ KX_ObjectActuator( m_bitLocalFlag (flag), m_active_combined_velocity (false), m_linear_damping_active(false), - m_angular_damping_active(false) + m_angular_damping_active(false), + m_error_accumulator(0.0,0.0,0.0), + m_previous_error(0.0,0.0,0.0) { + if (m_bitLocalFlag.ServoControl) + { + // in servo motion, the force is local if the target velocity is local + m_bitLocalFlag.Force = m_bitLocalFlag.LinearVelocity; + } UpdateFuzzyFlags(); } @@ -87,105 +94,151 @@ bool KX_ObjectActuator::Update() // it should reconcile the externally set velocity with it's // own velocity. if (m_active_combined_velocity) { - parent->ResolveCombinedVelocities( - m_linear_velocity, - m_angular_velocity, - (m_bitLocalFlag.LinearVelocity) != 0, - (m_bitLocalFlag.AngularVelocity) != 0 - ); + if (parent) + parent->ResolveCombinedVelocities( + m_linear_velocity, + m_angular_velocity, + (m_bitLocalFlag.LinearVelocity) != 0, + (m_bitLocalFlag.AngularVelocity) != 0 + ); m_active_combined_velocity = false; } m_linear_damping_active = false; + m_angular_damping_active = false; + m_error_accumulator.setValue(0.0,0.0,0.0); + m_previous_error.setValue(0.0,0.0,0.0); return false; - } else - if (parent) + } else if (parent) { - if (!m_bitLocalFlag.ZeroForce) + if (m_bitLocalFlag.ServoControl) { - if (m_bitLocalFlag.ClampVelocity && !m_bitLocalFlag.ZeroLinearVelocity) + // In this mode, we try to reach a target speed using force + // As we don't know the friction, we must implement a generic + // servo control to achieve the speed in a configurable + // v = current velocity + // V = target velocity + // e = V-v = speed error + // dt = time interval since previous update + // I = sum(e(t)*dt) + // dv = e(t) - e(t-1) + // KP, KD, KI : coefficient + // F = KP*e+KI*I+KD*dv + MT_Scalar mass = parent->GetMass(); + if (mass < MT_EPSILON) + return false; + MT_Vector3 v = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); + MT_Vector3 e = m_linear_velocity - v; + MT_Vector3 dv = e - m_previous_error; + MT_Vector3 I = m_error_accumulator + e; + + m_force = m_torque.x()*e+m_torque.y()*I+m_torque.z()*dv; + // to automatically adapt the PID coefficient to mass; + m_force *= mass; + if (m_bitLocalFlag.Torque) { - // The user is requesting not to exceed the velocity set in m_linear_velocity - // The verification is done by projecting the actual speed along the linV direction - // and comparing it with the linV vector length - MT_Vector3 linV; - linV = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); - if (linV.dot(m_linear_velocity) < m_linear_length2) - parent->ApplyForce(m_force,(m_bitLocalFlag.Force) != 0); - } else + if (m_force[0] > m_dloc[0]) + { + m_force[0] = m_dloc[0]; + I[0] = m_error_accumulator[0]; + } else if (m_force[0] < m_drot[0]) + { + m_force[0] = m_drot[0]; + I[0] = m_error_accumulator[0]; + } + } + if (m_bitLocalFlag.DLoc) + { + if (m_force[1] > m_dloc[1]) + { + m_force[1] = m_dloc[1]; + I[1] = m_error_accumulator[1]; + } else if (m_force[1] < m_drot[1]) + { + m_force[1] = m_drot[1]; + I[1] = m_error_accumulator[1]; + } + } + if (m_bitLocalFlag.DRot) + { + if (m_force[2] > m_dloc[2]) + { + m_force[2] = m_dloc[2]; + I[2] = m_error_accumulator[2]; + } else if (m_force[2] < m_drot[2]) + { + m_force[2] = m_drot[2]; + I[2] = m_error_accumulator[2]; + } + } + m_previous_error = e; + m_error_accumulator = I; + parent->ApplyForce(m_force,(m_bitLocalFlag.LinearVelocity) != 0); + } else + { + if (!m_bitLocalFlag.ZeroForce) { parent->ApplyForce(m_force,(m_bitLocalFlag.Force) != 0); } - } - if (!m_bitLocalFlag.ZeroTorque) - { - if (m_bitLocalFlag.ClampVelocity && !m_bitLocalFlag.ZeroAngularVelocity) - { - // The user is requesting not to exceed the velocity set in m_angular_velocity - // The verification is done by projecting the actual speed in the - MT_Vector3 angV; - angV = parent->GetAngularVelocity(m_bitLocalFlag.AngularVelocity); - if (angV.dot(m_angular_velocity) < m_angular_velocity.length2()) - parent->ApplyTorque(m_torque,(m_bitLocalFlag.Torque) != 0); - } else + if (!m_bitLocalFlag.ZeroTorque) { parent->ApplyTorque(m_torque,(m_bitLocalFlag.Torque) != 0); } - } - if (!m_bitLocalFlag.ZeroDLoc) - { - parent->ApplyMovement(m_dloc,(m_bitLocalFlag.DLoc) != 0); - } - if (!m_bitLocalFlag.ZeroDRot) - { - parent->ApplyRotation(m_drot,(m_bitLocalFlag.DRot) != 0); - } - if (!m_bitLocalFlag.ZeroLinearVelocity && !m_bitLocalFlag.ClampVelocity) - { - if (m_bitLocalFlag.AddOrSetLinV) { - parent->addLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); - } else { - m_active_combined_velocity = true; - if (m_damping > 0) { - MT_Vector3 linV; - if (!m_linear_damping_active) { - // delta and the start speed (depends on the existing speed in that direction) - linV = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); - // keep only the projection along the desired direction - m_current_linear_factor = linV.dot(m_linear_velocity)/m_linear_length2; - m_linear_damping_active = true; - } - if (m_current_linear_factor < 1.0) - m_current_linear_factor += 1.0/m_damping; - if (m_current_linear_factor > 1.0) - m_current_linear_factor = 1.0; - linV = m_current_linear_factor * m_linear_velocity; - parent->setLinearVelocity(linV,(m_bitLocalFlag.LinearVelocity) != 0); + if (!m_bitLocalFlag.ZeroDLoc) + { + parent->ApplyMovement(m_dloc,(m_bitLocalFlag.DLoc) != 0); + } + if (!m_bitLocalFlag.ZeroDRot) + { + parent->ApplyRotation(m_drot,(m_bitLocalFlag.DRot) != 0); + } + if (!m_bitLocalFlag.ZeroLinearVelocity) + { + if (m_bitLocalFlag.AddOrSetLinV) { + parent->addLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); } else { - parent->setLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); + m_active_combined_velocity = true; + if (m_damping > 0) { + MT_Vector3 linV; + if (!m_linear_damping_active) { + // delta and the start speed (depends on the existing speed in that direction) + linV = parent->GetLinearVelocity(m_bitLocalFlag.LinearVelocity); + // keep only the projection along the desired direction + m_current_linear_factor = linV.dot(m_linear_velocity)/m_linear_length2; + m_linear_damping_active = true; + } + if (m_current_linear_factor < 1.0) + m_current_linear_factor += 1.0/m_damping; + if (m_current_linear_factor > 1.0) + m_current_linear_factor = 1.0; + linV = m_current_linear_factor * m_linear_velocity; + parent->setLinearVelocity(linV,(m_bitLocalFlag.LinearVelocity) != 0); + } else { + parent->setLinearVelocity(m_linear_velocity,(m_bitLocalFlag.LinearVelocity) != 0); + } } } - } - if (!m_bitLocalFlag.ZeroAngularVelocity && !m_bitLocalFlag.ClampVelocity) - { - m_active_combined_velocity = true; - if (m_damping > 0) { - MT_Vector3 angV; - if (!m_angular_damping_active) { - // delta and the start speed (depends on the existing speed in that direction) - angV = parent->GetAngularVelocity(m_bitLocalFlag.AngularVelocity); - // keep only the projection along the desired direction - m_current_angular_factor = angV.dot(m_angular_velocity)/m_angular_length2; - m_angular_damping_active = true; + if (!m_bitLocalFlag.ZeroAngularVelocity) + { + m_active_combined_velocity = true; + if (m_damping > 0) { + MT_Vector3 angV; + if (!m_angular_damping_active) { + // delta and the start speed (depends on the existing speed in that direction) + angV = parent->GetAngularVelocity(m_bitLocalFlag.AngularVelocity); + // keep only the projection along the desired direction + m_current_angular_factor = angV.dot(m_angular_velocity)/m_angular_length2; + m_angular_damping_active = true; + } + if (m_current_angular_factor < 1.0) + m_current_angular_factor += 1.0/m_damping; + if (m_current_angular_factor > 1.0) + m_current_angular_factor = 1.0; + angV = m_current_angular_factor * m_angular_velocity; + parent->setAngularVelocity(angV,(m_bitLocalFlag.AngularVelocity) != 0); + } else { + parent->setAngularVelocity(m_angular_velocity,(m_bitLocalFlag.AngularVelocity) != 0); } - if (m_current_angular_factor < 1.0) - m_current_angular_factor += 1.0/m_damping; - if (m_current_angular_factor > 1.0) - m_current_angular_factor = 1.0; - angV = m_current_angular_factor * m_angular_velocity; - parent->setAngularVelocity(angV,(m_bitLocalFlag.AngularVelocity) != 0); - } else { - parent->setAngularVelocity(m_angular_velocity,(m_bitLocalFlag.AngularVelocity) != 0); } } @@ -263,8 +316,17 @@ PyMethodDef KX_ObjectActuator::Methods[] = { {"setLinearVelocity", (PyCFunction) KX_ObjectActuator::sPySetLinearVelocity, METH_VARARGS}, {"getAngularVelocity", (PyCFunction) KX_ObjectActuator::sPyGetAngularVelocity, METH_VARARGS}, {"setAngularVelocity", (PyCFunction) KX_ObjectActuator::sPySetAngularVelocity, METH_VARARGS}, - {"setVelocityDamping", (PyCFunction) KX_ObjectActuator::sPySetVelocityDamping, METH_VARARGS}, - {"getVelocityDamping", (PyCFunction) KX_ObjectActuator::sPyGetVelocityDamping, METH_VARARGS}, + {"setDamping", (PyCFunction) KX_ObjectActuator::sPySetDamping, METH_VARARGS}, + {"getDamping", (PyCFunction) KX_ObjectActuator::sPyGetDamping, METH_VARARGS}, + {"setForceLimitX", (PyCFunction) KX_ObjectActuator::sPySetForceLimitX, METH_VARARGS}, + {"getForceLimitX", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitX, METH_VARARGS}, + {"setForceLimitY", (PyCFunction) KX_ObjectActuator::sPySetForceLimitY, METH_VARARGS}, + {"getForceLimitY", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitY, METH_VARARGS}, + {"setForceLimitZ", (PyCFunction) KX_ObjectActuator::sPySetForceLimitZ, METH_VARARGS}, + {"getForceLimitZ", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitZ, METH_VARARGS}, + {"setPID", (PyCFunction) KX_ObjectActuator::sPyGetPID, METH_VARARGS}, + {"getPID", (PyCFunction) KX_ObjectActuator::sPySetPID, METH_VARARGS}, + {NULL,NULL} //Sentinel @@ -411,7 +473,6 @@ PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self, PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_linear_velocity[1])); PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_linear_velocity[2])); PyList_SetItem(retVal, 3, BoolToPyArg(m_bitLocalFlag.LinearVelocity)); - PyList_SetItem(retVal, 4, BoolToPyArg(m_bitLocalFlag.ClampVelocity)); return retVal; } @@ -422,14 +483,12 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, PyObject* kwds) { float vecArg[3]; int bToggle = 0; - int bClamp = 0; - if (!PyArg_ParseTuple(args, "fffi|i", &vecArg[0], &vecArg[1], - &vecArg[2], &bToggle, &bClamp)) { + if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], + &vecArg[2], &bToggle)) { return NULL; } m_linear_velocity.setValue(vecArg); m_bitLocalFlag.LinearVelocity = PyArgToBool(bToggle); - m_bitLocalFlag.ClampVelocity = PyArgToBool(bClamp); UpdateFuzzyFlags(); Py_Return; } @@ -445,7 +504,6 @@ PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self, PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_angular_velocity[1])); PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_angular_velocity[2])); PyList_SetItem(retVal, 3, BoolToPyArg(m_bitLocalFlag.AngularVelocity)); - PyList_SetItem(retVal, 4, BoolToPyArg(m_bitLocalFlag.ClampVelocity)); return retVal; } @@ -455,22 +513,20 @@ PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self, PyObject* kwds) { float vecArg[3]; int bToggle = 0; - int bClamp = 0; - if (!PyArg_ParseTuple(args, "fffi|i", &vecArg[0], &vecArg[1], - &vecArg[2], &bToggle, &bClamp)) { + if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], + &vecArg[2], &bToggle)) { return NULL; } m_angular_velocity.setValue(vecArg); m_bitLocalFlag.AngularVelocity = PyArgToBool(bToggle); - m_bitLocalFlag.ClampVelocity = PyArgToBool(bClamp); UpdateFuzzyFlags(); Py_Return; } -/* 13. setVelocityDamping */ -PyObject* KX_ObjectActuator::PySetVelocityDamping(PyObject* self, - PyObject* args, - PyObject* kwds) { +/* 13. setDamping */ +PyObject* KX_ObjectActuator::PySetDamping(PyObject* self, + PyObject* args, + PyObject* kwds) { int damping = 0; if (!PyArg_ParseTuple(args, "i", &damping) || damping < 0 || damping > 1000) { return NULL; @@ -480,11 +536,124 @@ PyObject* KX_ObjectActuator::PySetVelocityDamping(PyObject* self, } /* 13. getVelocityDamping */ -PyObject* KX_ObjectActuator::PyGetVelocityDamping(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PyGetDamping(PyObject* self, + PyObject* args, + PyObject* kwds) { return Py_BuildValue("i",m_damping); } +/* 6. getForceLimitX */ +PyObject* KX_ObjectActuator::PyGetForceLimitX(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + PyObject *retVal = PyList_New(3); + + PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_drot[0])); + PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_dloc[0])); + PyList_SetItem(retVal, 2, BoolToPyArg(m_bitLocalFlag.Torque)); + + return retVal; +} +/* 7. setForceLimitX */ +PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + float vecArg[2]; + int bToggle = 0; + if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + return NULL; + } + m_drot[0] = vecArg[0]; + m_dloc[0] = vecArg[1]; + m_bitLocalFlag.Torque = PyArgToBool(bToggle); + Py_Return; +} + +/* 6. getForceLimitY */ +PyObject* KX_ObjectActuator::PyGetForceLimitY(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + PyObject *retVal = PyList_New(3); + + PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_drot[1])); + PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_dloc[1])); + PyList_SetItem(retVal, 2, BoolToPyArg(m_bitLocalFlag.DLoc)); + + return retVal; +} +/* 7. setForceLimitY */ +PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + float vecArg[2]; + int bToggle = 0; + if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + return NULL; + } + m_drot[1] = vecArg[0]; + m_dloc[1] = vecArg[1]; + m_bitLocalFlag.DLoc = PyArgToBool(bToggle); + Py_Return; +} + +/* 6. getForceLimitZ */ +PyObject* KX_ObjectActuator::PyGetForceLimitZ(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + PyObject *retVal = PyList_New(3); + + PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_drot[2])); + PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_dloc[2])); + PyList_SetItem(retVal, 2, BoolToPyArg(m_bitLocalFlag.DRot)); + + return retVal; +} +/* 7. setForceLimitZ */ +PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + float vecArg[2]; + int bToggle = 0; + if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + return NULL; + } + m_drot[2] = vecArg[0]; + m_dloc[2] = vecArg[1]; + m_bitLocalFlag.DRot = PyArgToBool(bToggle); + Py_Return; +} + +/* 4. getPID */ +PyObject* KX_ObjectActuator::PyGetPID(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + PyObject *retVal = PyList_New(3); + + PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_torque[0])); + PyList_SetItem(retVal, 1, PyFloat_FromDouble(m_torque[1])); + PyList_SetItem(retVal, 2, PyFloat_FromDouble(m_torque[2])); + + return retVal; +} +/* 5. setPID */ +PyObject* KX_ObjectActuator::PySetPID(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + float vecArg[3]; + if (!PyArg_ParseTuple(args, "fff", &vecArg[0], &vecArg[1], &vecArg[2])) { + return NULL; + } + m_torque.setValue(vecArg); + Py_Return; +} + diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index ec6dab5cd48..bb74756551f 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -47,7 +47,6 @@ struct KX_LocalFlags { LinearVelocity(false), AngularVelocity(false), AddOrSetLinV(false), - ClampVelocity(false), ZeroForce(false), ZeroDRot(false), ZeroDLoc(false), @@ -63,7 +62,7 @@ struct KX_LocalFlags { unsigned short LinearVelocity : 1; unsigned short AngularVelocity : 1; unsigned short AddOrSetLinV : 1; - unsigned short ClampVelocity : 1; + unsigned short ServoControl : 1; unsigned short ZeroForce : 1; unsigned short ZeroTorque : 1; unsigned short ZeroDRot : 1; @@ -84,9 +83,13 @@ class KX_ObjectActuator : public SCA_IActuator MT_Vector3 m_angular_velocity; MT_Scalar m_linear_length2; MT_Scalar m_angular_length2; + // used in damping MT_Scalar m_current_linear_factor; MT_Scalar m_current_angular_factor; short m_damping; + // used in servo control + MT_Vector3 m_previous_error; + MT_Vector3 m_error_accumulator; KX_LocalFlags m_bitLocalFlag; // A hack bool -- oh no sorry everyone @@ -164,8 +167,16 @@ public: KX_PYMETHOD(KX_ObjectActuator,SetLinearVelocity); KX_PYMETHOD(KX_ObjectActuator,GetAngularVelocity); KX_PYMETHOD(KX_ObjectActuator,SetAngularVelocity); - KX_PYMETHOD(KX_ObjectActuator,SetVelocityDamping); - KX_PYMETHOD(KX_ObjectActuator,GetVelocityDamping); + KX_PYMETHOD(KX_ObjectActuator,SetDamping); + KX_PYMETHOD(KX_ObjectActuator,GetDamping); + KX_PYMETHOD(KX_ObjectActuator,GetForceLimitX); + KX_PYMETHOD(KX_ObjectActuator,SetForceLimitX); + KX_PYMETHOD(KX_ObjectActuator,GetForceLimitY); + KX_PYMETHOD(KX_ObjectActuator,SetForceLimitY); + KX_PYMETHOD(KX_ObjectActuator,GetForceLimitZ); + KX_PYMETHOD(KX_ObjectActuator,SetForceLimitZ); + KX_PYMETHOD(KX_ObjectActuator,GetPID); + KX_PYMETHOD(KX_ObjectActuator,SetPID); }; #endif //__KX_OBJECTACTUATOR diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index e847c59bae1..a416c8c9f89 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -72,6 +72,7 @@ void KX_RaySensor::Init() m_bTriggered = (m_invert)?true:false; m_rayHit = false; m_hitObject = NULL; + m_reset = true; } KX_RaySensor::~KX_RaySensor() @@ -83,9 +84,10 @@ KX_RaySensor::~KX_RaySensor() CValue* KX_RaySensor::GetReplica() { - CValue* replica = new KX_RaySensor(*this); + KX_RaySensor* replica = new KX_RaySensor(*this); // this will copy properties and so on... CValue::AddDataToReplica(replica); + replica->Init(); return replica; } @@ -151,6 +153,7 @@ bool KX_RaySensor::RayHit(KX_ClientObjectInfo* client, MT_Point3& hit_point, MT_ bool KX_RaySensor::Evaluate(CValue* event) { bool result = false; + bool reset = m_reset && m_level; m_rayHit = false; m_hitObject = NULL; m_hitPosition = MT_Vector3(0,0,0); @@ -162,6 +165,7 @@ bool KX_RaySensor::Evaluate(CValue* event) MT_Matrix3x3 invmat = matje.inverse(); MT_Vector3 todir; + m_reset = false; switch (m_axis) { case 1: // X @@ -263,7 +267,9 @@ bool KX_RaySensor::Evaluate(CValue* event) } } - + if (reset) + // force an event + result = true; return result; } diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index a7e91e27df3..337b1af6df7 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -48,6 +48,7 @@ #include "SCA_KeyboardManager.h" #include "SCA_MouseManager.h" #include "SCA_PropertyEventManager.h" +#include "SCA_ActuatorEventManager.h" #include "KX_Camera.h" #include "SCA_JoystickManager.h" @@ -143,6 +144,7 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice, SCA_AlwaysEventManager* alwaysmgr = new SCA_AlwaysEventManager(m_logicmgr); SCA_PropertyEventManager* propmgr = new SCA_PropertyEventManager(m_logicmgr); + SCA_ActuatorEventManager* actmgr = new SCA_ActuatorEventManager(m_logicmgr); SCA_RandomEventManager* rndmgr = new SCA_RandomEventManager(m_logicmgr); KX_RayEventManager* raymgr = new KX_RayEventManager(m_logicmgr); @@ -152,6 +154,7 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice, m_logicmgr->RegisterEventManager(alwaysmgr); m_logicmgr->RegisterEventManager(propmgr); + m_logicmgr->RegisterEventManager(actmgr); m_logicmgr->RegisterEventManager(m_keyboardmgr); m_logicmgr->RegisterEventManager(m_mousemgr); m_logicmgr->RegisterEventManager(m_timemgr); diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 5311f059f03..ce3aa1de2ef 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -61,7 +61,9 @@ void KX_TouchSensor::EndFrame() { bool KX_TouchSensor::Evaluate(CValue* event) { bool result = false; + bool reset = m_reset && m_level; + m_reset = false; if (m_bTriggered != m_bLastTriggered) { m_bLastTriggered = m_bTriggered; @@ -69,7 +71,9 @@ bool KX_TouchSensor::Evaluate(CValue* event) m_hitObject = NULL; result = true; } - + if (reset) + // force an event + result = true; return result; } @@ -103,6 +107,7 @@ void KX_TouchSensor::Init() m_bTriggered = false; m_bLastTriggered = (m_invert)?true:false; m_hitObject = NULL; + m_reset = true; } KX_TouchSensor::~KX_TouchSensor() @@ -115,10 +120,7 @@ CValue* KX_TouchSensor::GetReplica() { KX_TouchSensor* replica = new KX_TouchSensor(*this); replica->m_colliders = new CListValue(); - replica->m_bCollision = false; - replica->m_bTriggered= false; - replica->m_hitObject = NULL; - replica->m_bLastTriggered = false; + replica->Init(); // this will copy properties and so on... CValue::AddDataToReplica(replica); return replica; From d9c60da9b7fdf7707adb48f4731daac55648f45d Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Fri, 4 Jul 2008 17:32:55 +0000 Subject: [PATCH 331/430] -> Moving Pooling Alloctor to BlenLib Bmesh's pooling allocator is probably usefull for other parts of blender as well, so I am moving it to BlenLib. --- source/blender/blenlib/BLI_mempool.h | 42 +++++++ source/blender/blenlib/intern/BLI_mempool.c | 131 ++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 source/blender/blenlib/BLI_mempool.h create mode 100644 source/blender/blenlib/intern/BLI_mempool.c diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h new file mode 100644 index 00000000000..a706e5f3874 --- /dev/null +++ b/source/blender/blenlib/BLI_mempool.h @@ -0,0 +1,42 @@ +/** + * Simple fast memory allocator + * + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Geoffrey Bantle. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef BLI_MEMPOOL_H +#define BLI_MEMPOOL_H + +struct BLI_mempool; +typedef struct BLI_mempool BLI_mempool; + +BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk); +void *BLI_mempool_alloc(BLI_mempool *pool); +void BLI_mempool_free(BLI_mempool *pool, void *addr); +void BLI_mempool_destroy(BLI_mempool *pool); + +#endif \ No newline at end of file diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c new file mode 100644 index 00000000000..7bbf0c4732e --- /dev/null +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -0,0 +1,131 @@ +/** + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008 by Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/* + Simple, fast memory allocator for allocating many elements of the same size. +*/ + +#include "MEM_guardedalloc.h" +#include "BLI_blenlib.h" +#include "DNA_listBase.h" +#include "BLI_linklist.h" +#include + +typedef struct BLI_freenode{ + struct BLI_freenode *next; +}BLI_freenode; + +typedef struct BLI_mempool_chunk{ + struct BLI_mempool_chunk *next, *prev; + void *data; +}BLI_mempool_chunk; + +typedef struct BLI_mempool{ + struct ListBase chunks; + int esize, csize, pchunk; /*size of elements and chunks in bytes and number of elements per chunk*/ + struct BLI_freenode *free; /*free element list. Interleaved into chunk datas.*/ +}BLI_mempool; + +BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk) +{ BLI_mempool *pool = NULL; + BLI_freenode *lasttail = NULL, *curnode = NULL; + int i,j, maxchunks; + char *addr; + + /*allocate the pool structure*/ + pool = MEM_mallocN(sizeof(BLI_mempool),"memory pool"); + pool->esize = esize; + pool->pchunk = pchunk; + pool->csize = esize * pchunk; + pool->chunks.first = pool->chunks.last = NULL; + + maxchunks = tote / pchunk; + + /*allocate the actual chunks*/ + for(i=0; i < maxchunks; i++){ + BLI_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk), "BLI_Mempool Chunk"); + mpchunk->next = mpchunk->prev = NULL; + mpchunk->data = MEM_mallocN(pool->csize, "BLI Mempool Chunk Data"); + BLI_addtail(&(pool->chunks), mpchunk); + + if(i==0) pool->free = mpchunk->data; /*start of the list*/ + /*loop through the allocated data, building the pointer structures*/ + for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ + curnode = ((BLI_freenode*)addr); + addr += pool->esize; + curnode->next = (BLI_freenode*)addr; + } + /*final pointer in the previously allocated chunk is wrong.*/ + if(lasttail) lasttail->next = mpchunk->data; + /*set the end of this chunks memoryy to the new tail for next iteration*/ + lasttail = curnode; + } + /*terminate the list*/ + curnode->next = NULL; + return pool; +} + +void *BLI_mempool_alloc(BLI_mempool *pool){ + void *retval=NULL; + BLI_freenode *curnode=NULL; + char *addr=NULL; + int j; + + if(!(pool->free)){ + /*need to allocate a new chunk*/ + BLI_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BLI_mempool_chunk), "BLI_Mempool Chunk"); + mpchunk->next = mpchunk->prev = NULL; + mpchunk->data = MEM_mallocN(pool->csize, "BLI_Mempool Chunk Data"); + BLI_addtail(&(pool->chunks), mpchunk); + + pool->free = mpchunk->data; /*start of the list*/ + for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ + curnode = ((BLI_freenode*)addr); + addr += pool->esize; + curnode->next = (BLI_freenode*)addr; + } + curnode->next = NULL; /*terminate the list*/ + } + + retval = pool->free; + pool->free = pool->free->next; + //memset(retval, 0, pool->esize); + return retval; +} +void BLI_mempool_free(BLI_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid! + BLI_freenode *newhead = addr; + newhead->next = pool->free; + pool->free = newhead; +} +void BLI_mempool_destroy(BLI_mempool *pool) +{ + BLI_mempool_chunk *mpchunk=NULL; + for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data); + BLI_freelistN(&(pool->chunks)); + MEM_freeN(pool); +} \ No newline at end of file From 733b4c935139577444d06d9f99a560107b4c587e Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Fri, 4 Jul 2008 17:59:16 +0000 Subject: [PATCH 332/430] -> Vertex Group support for bevel (editmode only) Vertex groups are now preserved when beveling (editmode only). Modifier support as well as uv/vert colors to follow soon. --- source/blender/blenkernel/BKE_bmesh.h | 21 +- source/blender/blenkernel/BKE_customdata.h | 25 +- .../blenkernel/intern/BME_conversions.c | 27 +- source/blender/blenkernel/intern/BME_mesh.c | 80 ++--- .../blender/blenkernel/intern/BME_structure.c | 134 ++------- source/blender/blenkernel/intern/BME_tools.c | 25 +- .../blender/blenkernel/intern/bmesh_private.h | 6 - source/blender/blenkernel/intern/customdata.c | 277 +++++++++++++++++- .../blender/makesdna/DNA_customdata_types.h | 10 +- source/blender/makesdna/DNA_meshdata_types.h | 15 + 10 files changed, 419 insertions(+), 201 deletions(-) diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 51a5d29dbb7..8ec7144faf6 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -39,12 +39,12 @@ #include "DNA_listBase.h" #include "BLI_ghash.h" +#include "BLI_mempool.h" #include "BLI_memarena.h" #include "DNA_image_types.h" #include "BLI_editVert.h" #include "BKE_DerivedMesh.h" #include "transform.h" -#include "BKE_bmeshCustomData.h" /*forward declerations*/ struct BME_Vert; @@ -53,13 +53,6 @@ struct BME_Poly; struct BME_Loop; -/*structure for fast memory allocation/frees*/ -typedef struct BME_mempool{ - struct ListBase chunks; - int esize, csize, pchunk; /*size of elements and chunks in bytes and number of elements per chunk*/ - struct BME_freenode *free; /*free element list. Interleaved into chunk datas.*/ -}BME_mempool; - /*Notes on further structure Cleanup: -Remove the tflags, they belong in custom data layers -Remove the eflags completely, they are mostly not used @@ -78,10 +71,10 @@ typedef struct BME_Mesh { ListBase verts, edges, polys; /*memory pools used for storing mesh elements*/ - struct BME_mempool *vpool; - struct BME_mempool *epool; - struct BME_mempool *ppool; - struct BME_mempool *lpool; + struct BLI_mempool *vpool; + struct BLI_mempool *epool; + struct BLI_mempool *ppool; + struct BLI_mempool *lpool; /*some scratch arrays used by eulers*/ struct BME_Vert **vtar; struct BME_Edge **edar; @@ -90,7 +83,7 @@ typedef struct BME_Mesh int vtarlen, edarlen, lparlen, plarlen; int totvert, totedge, totpoly, totloop; /*record keeping*/ int nextv, nexte, nextp, nextl; /*Next element ID for verts/edges/faces/loops. Never reused*/ - struct BME_CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ + struct CustomData vdata, edata, pdata, ldata; /*Custom Data Layer information*/ } BME_Mesh; typedef struct BME_Vert @@ -169,7 +162,7 @@ int BME_radial_find_face(struct BME_Edge *e,struct BME_Poly *f); struct BME_Loop *BME_loop_find_loop(struct BME_Poly *f, struct BME_Vert *v); /*MESH CREATION/DESTRUCTION*/ -struct BME_Mesh *BME_make_mesh(int allocsize[4], struct BME_CustomDataInit init[4]); +struct BME_Mesh *BME_make_mesh(int allocsize[4]); void BME_free_mesh(struct BME_Mesh *bm); /*FULL MESH VALIDATION*/ int BME_validate_mesh(struct BME_Mesh *bm, int halt); diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index d0535f1752e..81c2e4a4b94 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -40,6 +40,7 @@ extern const CustomDataMask CD_MASK_BAREMESH; extern const CustomDataMask CD_MASK_MESH; extern const CustomDataMask CD_MASK_EDITMESH; extern const CustomDataMask CD_MASK_DERIVEDMESH; +extern const CustomDataMask CD_MASK_BMESH; /* for ORIGINDEX layer type, indicates no original index for this element */ #define ORIGINDEX_NONE -1 @@ -134,6 +135,9 @@ void CustomData_copy_data(const struct CustomData *source, void CustomData_em_copy_data(const struct CustomData *source, struct CustomData *dest, void *src_block, void **dest_block); +void CustomData_bmesh_copy_data(const struct CustomData *source, + struct CustomData *dest,void *src_block, + void **dest_block); /* frees data in a CustomData object * return 1 on success, 0 on failure @@ -160,6 +164,10 @@ void CustomData_interp(const struct CustomData *source, struct CustomData *dest, void CustomData_em_interp(struct CustomData *data, void **src_blocks, float *weights, float *sub_weights, int count, void *dest_block); +void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks, + float *weights, float *sub_weights, int count, + void *dest_block); + /* swaps the data in the element corners, to new corners with indices as specified in corner_indices. for edges this is an array of length 2, for @@ -172,6 +180,8 @@ void CustomData_swap(struct CustomData *data, int index, int *corner_indices); void *CustomData_get(const struct CustomData *data, int index, int type); void *CustomData_em_get(const struct CustomData *data, void *block, int type); void *CustomData_em_get_n(const struct CustomData *data, void *block, int type, int n); +void *CustomData_bmesh_get(const struct CustomData *data, void *block, int type); +void *CustomData_bmesh_get_n(const struct CustomData *data, void *block, int type, int n); /* gets a pointer to the active or first layer of type * returns NULL if there is no layer of type @@ -199,6 +209,12 @@ void CustomData_em_set(struct CustomData *data, void *block, int type, void CustomData_em_set_n(struct CustomData *data, void *block, int type, int n, void *source); +void CustomData_bmesh_set(const struct CustomData *data, void *block, int type, + void *source); + +void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n, + void *source); + /* set the pointer of to the first layer of type. the old data is not freed. * returns the value of ptr if the layer is found, NULL otherwise */ @@ -220,12 +236,20 @@ void CustomData_set_layer_flag(struct CustomData *data, int type, int flag); void CustomData_em_set_default(struct CustomData *data, void **block); void CustomData_em_free_block(struct CustomData *data, void **block); +void CustomData_bmesh_set_default(struct CustomData *data, void **block); +void CustomData_bmesh_free_block(struct CustomData *data, void **block); + /* copy custom data to/from layers as in mesh/derivedmesh, to editmesh blocks of data. the CustomData's must not be compatible */ void CustomData_to_em_block(const struct CustomData *source, struct CustomData *dest, int index, void **block); void CustomData_from_em_block(const struct CustomData *source, struct CustomData *dest, void *block, int index); +void CustomData_to_bmesh_block(const struct CustomData *source, + struct CustomData *dest, int src_index, void **dest_block); +void CustomData_from_bmesh_block(const struct CustomData *source, + struct CustomData *dest, void *src_block, int dest_index); + /* query info over types */ void CustomData_file_write_info(int type, char **structname, int *structnum); @@ -240,5 +264,4 @@ void CustomData_set_layer_unique_name(struct CustomData *data, int index); /* for file reading compatibility, returns false if the layer was freed, only after this test passes, layer->data should be assigned */ int CustomData_verify_versions(struct CustomData *data, int index); - #endif diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 08483711c45..7952546de7c 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -33,6 +33,7 @@ */ #include "MEM_guardedalloc.h" +#include "BKE_customdata.h" #include "DNA_listBase.h" #include "DNA_meshdata_types.h" @@ -54,11 +55,14 @@ #include "bmesh_private.h" #include "BSE_edit.h" +/*Converts an EditMesh to a BME_Mesh.*/ +static void bmesh_init_cdPool(CustomData *data, int allocsize){ + if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize); +} BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { BME_Mesh *bm; int allocsize[4] = {512,512,2048,512}; - BME_CustomDataInit *init = MEM_callocN(sizeof(BME_CustomDataInit) * 4, "Bmesh custom data init"); BME_Vert *v1, *v2; BME_Edge *e, *edar[4]; BME_Poly *f; @@ -68,9 +72,12 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { EditFace *efa; int len; - bm = BME_make_mesh(allocsize,init); + bm = BME_make_mesh(allocsize); + + CustomData_copy(&em->vdata, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0); + bmesh_init_cdPool(&bm->vdata, allocsize[0]); + BME_model_begin(bm); - /*add verts*/ eve= em->verts.first; while(eve) { @@ -80,8 +87,8 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { v1->h = eve->h; v1->bweight = eve->bweight; - /* link the verts for edge and face construction; - * kind of a dangerous thing - remember to cast back to BME_Vert before using! */ + /*Copy Custom Data*/ + CustomData_bmesh_copy_data(&em->vdata, &bm->vdata, eve->data, &v1->data); eve->tmp.v = (EditVert*)v1; eve = eve->next; } @@ -102,6 +109,8 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { /* link the edges for face construction; * kind of a dangerous thing - remember to cast back to BME_Edge before using! */ + /*Copy CustomData*/ + eed->tmp.e = (EditEdge*)e; eed = eed->next; } @@ -137,7 +146,6 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { efa = efa->next; } BME_model_end(bm); - MEM_freeN(init); return bm; } @@ -161,6 +169,8 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { if (em == NULL) return NULL; + + CustomData_copy(&bm->vdata, &em->vdata, CD_MASK_BMESH, CD_CALLOC, 0); /* convert to EditMesh */ /* make editverts */ totvert = BLI_countlist(&(bm->verts)); @@ -176,6 +186,7 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { eve1->f = (unsigned char)v1->flag; eve1->h = (unsigned char)v1->h; eve1->bweight = v1->bweight; + CustomData_em_copy_data(&bm->vdata, &em->vdata, v1->data, &eve1->data); } /* make edges */ @@ -234,7 +245,6 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) BME_Mesh *bm; int allocsize[4] = {512,512,2048,512}; - BME_CustomDataInit *init = MEM_callocN(sizeof(BME_CustomDataInit) * 4, "Bmesh custom data init"); MVert *mvert, *mv; MEdge *medge, *me; MFace *mface, *mf; @@ -245,7 +255,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) EdgeHash *edge_hash = BLI_edgehash_new(); - bm = BME_make_mesh(allocsize,init); + bm = BME_make_mesh(allocsize); totvert = dm->getNumVerts(dm); totedge = dm->getNumEdges(dm); totface = dm->getNumFaces(dm); @@ -300,7 +310,6 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) BME_model_end(bm); BLI_edgehash_free(edge_hash, NULL); MEM_freeN(vert_array); - MEM_freeN(init); return bm; } diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c index 184ef2b8a0e..ad46a7c1eb7 100644 --- a/source/blender/blenkernel/intern/BME_mesh.c +++ b/source/blender/blenkernel/intern/BME_mesh.c @@ -32,64 +32,33 @@ * ***** END GPL LICENSE BLOCK ***** */ + #include "MEM_guardedalloc.h" - #include "DNA_listBase.h" -#include "DNA_meshdata_types.h" -#include "DNA_mesh_types.h" -#include "DNA_object_types.h" -#include "DNA_scene_types.h" - - +#include "BLI_blenlib.h" #include "BKE_utildefines.h" #include "BKE_bmesh.h" -#include "BKE_global.h" -#include "BKE_depsgraph.h" -#include "BLI_blenlib.h" -#include "BLI_editVert.h" -#include "BIF_editmesh.h" -#include "BIF_space.h" -#include "editmesh.h" #include "bmesh_private.h" -#include "mydevice.h" - -#include "BSE_edit.h" /* * BME MAKE MESH * * Allocates a new BME_Mesh structure. - * The arguments are two arrays, one of type int - * and another of type BME_CustomDataInit. The first array - * contains the allocation size for each element pool in - * the mesh. For instance allocsize[0] contains the number - * of vertices to allocate at a time for the vertex pool. - * - * The second array contains structures describing the layout - * of custom data for each element type in the mesh. So init[0] - * contains the custom data layout information for vertices, init[1] - * the layout information for edges and so on. - * * Returns - * Pointer to a Bmesh * */ -BME_Mesh *BME_make_mesh(int allocsize[4], BME_CustomDataInit init[4]) +BME_Mesh *BME_make_mesh(int allocsize[4]) { /*allocate the structure*/ BME_Mesh *bm = MEM_callocN(sizeof(BME_Mesh),"BMesh"); /*allocate the memory pools for the mesh elements*/ - bm->vpool = BME_mempool_create(sizeof(BME_Vert), allocsize[0], allocsize[0]); - bm->epool = BME_mempool_create(sizeof(BME_Edge), allocsize[1], allocsize[1]); - bm->lpool = BME_mempool_create(sizeof(BME_Loop), allocsize[2], allocsize[2]); - bm->ppool = BME_mempool_create(sizeof(BME_Poly), allocsize[3], allocsize[3]); - /*Setup custom data layers*/ - BME_CD_Create(&bm->vdata, &init[0], allocsize[0]); - BME_CD_Create(&bm->edata, &init[1], allocsize[1]); - BME_CD_Create(&bm->ldata, &init[2], allocsize[2]); - BME_CD_Create(&bm->pdata, &init[3], allocsize[3]); + bm->vpool = BLI_mempool_create(sizeof(BME_Vert), allocsize[0], allocsize[0]); + bm->epool = BLI_mempool_create(sizeof(BME_Edge), allocsize[1], allocsize[1]); + bm->lpool = BLI_mempool_create(sizeof(BME_Loop), allocsize[2], allocsize[2]); + bm->ppool = BLI_mempool_create(sizeof(BME_Poly), allocsize[3], allocsize[3]); return bm; } /* @@ -105,26 +74,35 @@ void BME_free_mesh(BME_Mesh *bm) BME_Loop *l; BME_Poly *f; - for(v=bm->verts.first; v; v=v->next) BME_CD_free_block(&bm->vdata, &v->data); - for(e=bm->edges.first; e; e=e->next) BME_CD_free_block(&bm->edata, &e->data); + for(v=bm->verts.first; v; v=v->next) CustomData_bmesh_free_block(&bm->vdata, &v->data); + for(e=bm->edges.first; e; e=e->next) CustomData_bmesh_free_block(&bm->edata, &e->data); for(f=bm->polys.first; f; f=f->next){ - BME_CD_free_block(&bm->pdata, &f->data); + CustomData_bmesh_free_block(&bm->pdata, &f->data); l = f->loopbase; do{ - BME_CD_free_block(&bm->ldata, &l->data); + CustomData_bmesh_free_block(&bm->ldata, &l->data); l = l->next; }while(l!=f->loopbase); } + + /*Free custom data pools, This should probably go in CustomData_free?*/ + if(bm->vdata.totlayer) BLI_mempool_destroy(bm->vdata.pool); + if(bm->edata.totlayer) BLI_mempool_destroy(bm->edata.pool); + if(bm->ldata.totlayer) BLI_mempool_destroy(bm->ldata.pool); + if(bm->pdata.totlayer) BLI_mempool_destroy(bm->pdata.pool); + + /*free custom data*/ + CustomData_free(&bm->vdata,0); + CustomData_free(&bm->edata,0); + CustomData_free(&bm->ldata,0); + CustomData_free(&bm->pdata,0); + /*destroy element pools*/ - BME_mempool_destroy(bm->vpool); - BME_mempool_destroy(bm->epool); - BME_mempool_destroy(bm->ppool); - BME_mempool_destroy(bm->lpool); - /*free custom data pools*/ - BME_CD_Free(&bm->vdata); - BME_CD_Free(&bm->edata); - BME_CD_Free(&bm->ldata); - BME_CD_Free(&bm->pdata); + BLI_mempool_destroy(bm->vpool); + BLI_mempool_destroy(bm->epool); + BLI_mempool_destroy(bm->ppool); + BLI_mempool_destroy(bm->lpool); + MEM_freeN(bm); } diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index cbf780c6467..92ef9e3e03c 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -42,100 +42,6 @@ #include "BLI_linklist.h" #include "BLI_ghash.h" -#include "BKE_customdata.h" - -/* - Simple, fast memory allocator for allocating many elements of the same size. -*/ -typedef struct BME_mempool_chunk{ - struct BME_mempool_chunk *next, *prev; - void *data; -}BME_mempool_chunk; - -/*this is just to make things prettier*/ -typedef struct BME_freenode{ - struct BME_freenode *next; -}BME_freenode; - -BME_mempool *BME_mempool_create(int esize, int tote, int pchunk) -{ BME_mempool *pool = NULL; - BME_freenode *lasttail = NULL, *curnode = NULL; - int i,j, maxchunks; - char *addr; - - /*allocate the pool structure*/ - pool = MEM_mallocN(sizeof(BME_mempool),"memory pool"); - pool->esize = esize; - pool->pchunk = pchunk; - pool->csize = esize * pchunk; - pool->chunks.first = pool->chunks.last = NULL; - - maxchunks = tote / pchunk; - - /*allocate the actual chunks*/ - for(i=0; i < maxchunks; i++){ - BME_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BME_mempool_chunk), "BME_Mempool Chunk"); - mpchunk->next = mpchunk->prev = NULL; - mpchunk->data = MEM_mallocN(pool->csize, "BME Mempool Chunk Data"); - BLI_addtail(&(pool->chunks), mpchunk); - - if(i==0) pool->free = mpchunk->data; /*start of the list*/ - /*loop through the allocated data, building the pointer structures*/ - for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ - curnode = ((BME_freenode*)addr); - addr += pool->esize; - curnode->next = (BME_freenode*)addr; - } - /*final pointer in the previously allocated chunk is wrong.*/ - if(lasttail) lasttail->next = mpchunk->data; - /*set the end of this chunks memory to the new tail for next iteration*/ - lasttail = curnode; - } - /*terminate the list*/ - curnode->next = NULL; - return pool; -} - -void *BME_mempool_alloc(BME_mempool *pool){ - void *retval=NULL; - BME_freenode *curnode=NULL; - char *addr=NULL; - int j; - - if(!(pool->free)){ - /*need to allocate a new chunk*/ - BME_mempool_chunk *mpchunk = MEM_mallocN(sizeof(BME_mempool_chunk), "BME_Mempool Chunk"); - mpchunk->next = mpchunk->prev = NULL; - mpchunk->data = MEM_mallocN(pool->csize, "BME_Mempool Chunk Data"); - BLI_addtail(&(pool->chunks), mpchunk); - - pool->free = mpchunk->data; /*start of the list*/ - for(addr = mpchunk->data, j=0; j < pool->pchunk; j++){ - curnode = ((BME_freenode*)addr); - addr += pool->esize; - curnode->next = (BME_freenode*)addr; - } - curnode->next = NULL; /*terminate the list*/ - } - - retval = pool->free; - pool->free = pool->free->next; - //memset(retval, 0, pool->esize); - return retval; -} - -void BME_mempool_free(BME_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid! - BME_freenode *newhead = addr; - newhead->next = pool->free; - pool->free = newhead; -} -void BME_mempool_destroy(BME_mempool *pool) -{ - BME_mempool_chunk *mpchunk=NULL; - for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data); - BLI_freelistN(&(pool->chunks)); - MEM_freeN(pool); -} /** * MISC utility functions. * @@ -179,7 +85,7 @@ int BME_edge_swapverts(BME_Edge *e, BME_Vert *orig, BME_Vert *new){ BME_Vert *BME_addvertlist(BME_Mesh *bm, BME_Vert *example){ BME_Vert *v=NULL; - v = BME_mempool_alloc(bm->vpool); + v = BLI_mempool_alloc(bm->vpool); v->next = v->prev = NULL; v->EID = bm->nextv; v->co[0] = v->co[1] = v->co[2] = 0.0f; @@ -195,16 +101,16 @@ BME_Vert *BME_addvertlist(BME_Mesh *bm, BME_Vert *example){ if(example){ VECCOPY(v->co,example->co); - BME_CD_copy_data(&bm->vdata, &bm->vdata, example->data, &v->data); + CustomData_bmesh_copy_data(&bm->vdata, &bm->vdata, example->data, &v->data); } else - BME_CD_set_default(&bm->vdata, &v->data); + CustomData_bmesh_set_default(&bm->vdata, &v->data); return v; } BME_Edge *BME_addedgelist(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge *example){ BME_Edge *e=NULL; - e = BME_mempool_alloc(bm->epool); + e = BLI_mempool_alloc(bm->epool); e->next = e->prev = NULL; e->EID = bm->nexte; e->v1 = v1; @@ -222,16 +128,16 @@ BME_Edge *BME_addedgelist(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Edge *ex BLI_addtail(&(bm->edges), e); if(example) - BME_CD_copy_data(&bm->edata, &bm->edata, example->data, &e->data); + CustomData_bmesh_copy_data(&bm->edata, &bm->edata, example->data, &e->data); else - BME_CD_set_default(&bm->edata, &e->data); + CustomData_bmesh_set_default(&bm->edata, &e->data); return e; } BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, BME_Loop *example){ BME_Loop *l=NULL; - l = BME_mempool_alloc(bm->lpool); + l = BLI_mempool_alloc(bm->lpool); l->next = l->prev = NULL; l->EID = bm->nextl; l->radial.next = l->radial.prev = NULL; @@ -246,16 +152,16 @@ BME_Loop *BME_create_loop(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Poly *f, B bm->totloop++; if(example) - BME_CD_copy_data(&bm->ldata, &bm->ldata, example->data, &l->data); + CustomData_bmesh_copy_data(&bm->ldata, &bm->ldata, example->data, &l->data); else - BME_CD_set_default(&bm->ldata, &l->data); + CustomData_bmesh_set_default(&bm->ldata, &l->data); return l; } BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ BME_Poly *f = NULL; - f = BME_mempool_alloc(bm->ppool); + f = BLI_mempool_alloc(bm->ppool); f->next = f->prev = NULL; f->EID = bm->nextp; f->loopbase = NULL; @@ -268,9 +174,9 @@ BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ bm->totpoly++; if(example) - BME_CD_copy_data(&bm->pdata, &bm->pdata, example->data, &f->data); + CustomData_bmesh_copy_data(&bm->pdata, &bm->pdata, example->data, &f->data); else - BME_CD_set_default(&bm->pdata, &f->data); + CustomData_bmesh_set_default(&bm->pdata, &f->data); return f; @@ -281,23 +187,23 @@ BME_Poly *BME_addpolylist(BME_Mesh *bm, BME_Poly *example){ */ void BME_free_vert(BME_Mesh *bm, BME_Vert *v){ bm->totvert--; - BME_CD_free_block(&bm->vdata, &v->data); - BME_mempool_free(bm->vpool, v); + CustomData_bmesh_free_block(&bm->vdata, &v->data); + BLI_mempool_free(bm->vpool, v); } void BME_free_edge(BME_Mesh *bm, BME_Edge *e){ bm->totedge--; - BME_CD_free_block(&bm->edata, &e->data); - BME_mempool_free(bm->epool, e); + CustomData_bmesh_free_block(&bm->edata, &e->data); + BLI_mempool_free(bm->epool, e); } void BME_free_poly(BME_Mesh *bm, BME_Poly *f){ bm->totpoly--; - BME_CD_free_block(&bm->pdata, &f->data); - BME_mempool_free(bm->ppool, f); + CustomData_bmesh_free_block(&bm->pdata, &f->data); + BLI_mempool_free(bm->ppool, f); } void BME_free_loop(BME_Mesh *bm, BME_Loop *l){ bm->totloop--; - BME_CD_free_block(&bm->ldata, &l->data); - BME_mempool_free(bm->lpool, l); + CustomData_bmesh_free_block(&bm->ldata, &l->data); + BLI_mempool_free(bm->lpool, l); } /** * BMESH CYCLES diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index 7ce967d1d22..916e6bee59f 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -205,7 +205,21 @@ static BME_Poly *BME_split_face(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Ver return nf; } -/* a wrapper for BME_SEMV that transfers element flags */ + +static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, float fac) +{ + void *src[2]; + float w[2]; + if (v1->data && v2->data) { + src[0]= v1->data; + src[1]= v2->data; + w[0] = 1.0f-fac; + w[1] = fac; + CustomData_em_interp(&bm->vdata, src, w, NULL, 2, v->data); + } +} + +/* a wrapper for BME_SEMV that transfers element flags */ /*add custom data interpolation in here!*/ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge **ne, float percent) { BME_Vert *nv, *v2; float len; @@ -224,10 +238,11 @@ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge (*ne)->crease = e->crease; (*ne)->bweight = e->bweight; } - return nv; } + + static int BME_bevel_is_split_vert(BME_Loop *l) { /* look for verts that have already been added to the edge when * beveling other polys; this can be determined by testing the @@ -315,7 +330,7 @@ static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int * Finally, return the split vert. */ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, BME_Loop *l, float *up_vec, float value, BME_TransData_Head *td) { BME_TransData *vtd, *vtd1, *vtd2; - BME_Vert *sv, *v2, *v3; + BME_Vert *sv, *v2, *v3, *ov; BME_Loop *lv1, *lv2; BME_Edge *ne, *e1, *e2; float maxfactor, scale, len, dis, vec1[3], vec2[3], t_up_vec[3]; @@ -349,7 +364,9 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B else { e1 = e2; } + ov = BME_edge_getothervert(e1,v); sv = BME_split_edge(bm,v,e1,&ne,0); + //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ @@ -388,7 +405,9 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B } else { is_split_vert = 0; + ov = BME_edge_getothervert(l->e,v); sv = BME_split_edge(bm,v,l->e,&ne,0); + //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index 4aa2a85b8b1..f34ef0090f3 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -39,11 +39,6 @@ #include "BKE_bmesh.h" -struct BME_mempool *BME_mempool_create(int esize, int tote, int pchunk); -void BME_mempool_destroy(struct BME_mempool *pool); -void *BME_mempool_alloc(struct BME_mempool *pool); -void BME_mempool_free(struct BME_mempool *pool, void *address); - /*ALLOCATION/DEALLOCATION*/ struct BME_Vert *BME_addvertlist(struct BME_Mesh *bm, struct BME_Vert *example); struct BME_Edge *BME_addedgelist(struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *example); @@ -54,7 +49,6 @@ void BME_free_vert(struct BME_Mesh *bm, struct BME_Vert *v); void BME_free_edge(struct BME_Mesh *bm, struct BME_Edge *e); void BME_free_poly(struct BME_Mesh *bm, struct BME_Poly *f); void BME_free_loop(struct BME_Mesh *bm, struct BME_Loop *l); -//void BME_delete_loop(struct BME_Mesh *bm, struct BME_Loop *l); /*DOUBLE CIRCULAR LINKED LIST FUNCTIONS*/ void BME_cycle_append(void *h, void *nt); diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 77068d8ed66..946cb449912 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -36,6 +36,7 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" +#include "BLI_mempool.h" #include "DNA_customdata_types.h" #include "DNA_listBase.h" @@ -454,13 +455,16 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { {sizeof(MStringProperty), "MStringProperty",1,"String",NULL,NULL,NULL,NULL}, {sizeof(OrigSpaceFace), "OrigSpaceFace", 1, "UVTex", layerCopy_origspace_face, NULL, layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face}, - {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL} + {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}, + {sizeof(MTexPoly), "MTexPoly", 1, "Face Texture", NULL, NULL, NULL, NULL, NULL}, + {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, NULL, NULL, NULL}, + {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, NULL, NULL, NULL} }; const char *LAYERTYPENAMES[CD_NUMTYPES] = { "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace", "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags","CDMFloatProperty", - "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco"}; + "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco", "CDMTexPoly", "CDMLoopUV", "CDMloopCol"}; const CustomDataMask CD_MASK_BAREMESH = CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE; @@ -475,6 +479,8 @@ const CustomDataMask CD_MASK_DERIVEDMESH = CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO; +const CustomDataMask CD_MASK_BMESH = + CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL; static const LayerTypeInfo *layerType_getInfo(int type) { @@ -1449,6 +1455,273 @@ void CustomData_from_em_block(const CustomData *source, CustomData *dest, } +/*Bmesh functions*/ +void CustomData_bmesh_free_block(CustomData *data, void **block) +{ + const LayerTypeInfo *typeInfo; + int i; + + if(!*block) return; + for(i = 0; i < data->totlayer; ++i) { + if(!(data->layers[i].flag & CD_FLAG_NOFREE)) { + typeInfo = layerType_getInfo(data->layers[i].type); + + if(typeInfo->free) { + int offset = data->layers[i].offset; + typeInfo->free((char*)*block + offset, 1, typeInfo->size); + } + } + } + + BLI_mempool_free(data->pool, *block); + *block = NULL; +} + +static void CustomData_bmesh_alloc_block(CustomData *data, void **block) +{ + + if (*block) + CustomData_bmesh_free_block(data, block); + + if (data->totsize > 0) + *block = BLI_mempool_alloc(data->pool); + else + *block = NULL; +} + +void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest, + void *src_block, void **dest_block) +{ + const LayerTypeInfo *typeInfo; + int dest_i, src_i; + + if (!*dest_block) + CustomData_bmesh_alloc_block(dest, dest_block); + + /* copies a layer at a time */ + dest_i = 0; + for(src_i = 0; src_i < source->totlayer; ++src_i) { + + /* find the first dest layer with type >= the source type + * (this should work because layers are ordered by type) + */ + while(dest_i < dest->totlayer + && dest->layers[dest_i].type < source->layers[src_i].type) + ++dest_i; + + /* if there are no more dest layers, we're done */ + if(dest_i >= dest->totlayer) return; + + /* if we found a matching layer, copy the data */ + if(dest->layers[dest_i].type == source->layers[src_i].type && + strcmp(dest->layers[dest_i].name, source->layers[src_i].name) == 0) { + char *src_data = (char*)src_block + source->layers[src_i].offset; + char *dest_data = (char*)*dest_block + dest->layers[dest_i].offset; + + typeInfo = layerType_getInfo(source->layers[src_i].type); + + if(typeInfo->copy) + typeInfo->copy(src_data, dest_data, 1); + else + memcpy(dest_data, src_data, typeInfo->size); + + /* if there are multiple source & dest layers of the same type, + * we don't want to copy all source layers to the same dest, so + * increment dest_i + */ + ++dest_i; + } + } +} + +/*Bmesh Custom Data Functions. Should replace editmesh ones with these as well, due to more effecient memory alloc*/ +void *CustomData_bmesh_get(const CustomData *data, void *block, int type) +{ + int layer_index; + + /* get the layer index of the first layer of type */ + layer_index = CustomData_get_active_layer_index(data, type); + if(layer_index < 0) return NULL; + + return (char *)block + data->layers[layer_index].offset; +} + +void *CustomData_bmesh_get_n(const CustomData *data, void *block, int type, int n) +{ + int layer_index; + + /* get the layer index of the first layer of type */ + layer_index = CustomData_get_layer_index(data, type); + if(layer_index < 0) return NULL; + + return (char *)block + data->layers[layer_index+n].offset; +} + +void CustomData_bmesh_set(CustomData *data, void *block, int type, void *source) +{ + void *dest = CustomData_bmesh_get(data, block, type); + const LayerTypeInfo *typeInfo = layerType_getInfo(type); + + if(!dest) return; + + if(typeInfo->copy) + typeInfo->copy(source, dest, 1); + else + memcpy(dest, source, typeInfo->size); +} + +void CustomData_bmesh_set_n(CustomData *data, void *block, int type, int n, void *source) +{ + void *dest = CustomData_bmesh_get_n(data, block, type, n); + const LayerTypeInfo *typeInfo = layerType_getInfo(type); + + if(!dest) return; + + if(typeInfo->copy) + typeInfo->copy(source, dest, 1); + else + memcpy(dest, source, typeInfo->size); +} + +void CustomData_bmesh_interp(CustomData *data, void **src_blocks, float *weights, + float *sub_weights, int count, void *dest_block) +{ + int i, j; + void *source_buf[SOURCE_BUF_SIZE]; + void **sources = source_buf; + + /* slow fallback in case we're interpolating a ridiculous number of + * elements + */ + if(count > SOURCE_BUF_SIZE) + sources = MEM_callocN(sizeof(*sources) * count, + "CustomData_interp sources"); + + /* interpolates a layer at a time */ + for(i = 0; i < data->totlayer; ++i) { + CustomDataLayer *layer = &data->layers[i]; + const LayerTypeInfo *typeInfo = layerType_getInfo(layer->type); + + if(typeInfo->interp) { + for(j = 0; j < count; ++j) + sources[j] = (char *)src_blocks[j] + layer->offset; + + typeInfo->interp(sources, weights, sub_weights, count, + (char *)dest_block + layer->offset); + } + } + + if(count > SOURCE_BUF_SIZE) MEM_freeN(sources); +} + +void CustomData_bmesh_set_default(CustomData *data, void **block) +{ + const LayerTypeInfo *typeInfo; + int i; + + if (!*block) + CustomData_bmesh_alloc_block(data, block); + + for(i = 0; i < data->totlayer; ++i) { + int offset = data->layers[i].offset; + + typeInfo = layerType_getInfo(data->layers[i].type); + + if(typeInfo->set_default) + typeInfo->set_default((char*)*block + offset, 1); + } +} + +void CustomData_to_bmesh_block(const CustomData *source, CustomData *dest, + int src_index, void **dest_block) +{ + const LayerTypeInfo *typeInfo; + int dest_i, src_i, src_offset; + + if (!*dest_block) + CustomData_bmesh_alloc_block(dest, dest_block); + + /* copies a layer at a time */ + dest_i = 0; + for(src_i = 0; src_i < source->totlayer; ++src_i) { + + /* find the first dest layer with type >= the source type + * (this should work because layers are ordered by type) + */ + while(dest_i < dest->totlayer + && dest->layers[dest_i].type < source->layers[src_i].type) + ++dest_i; + + /* if there are no more dest layers, we're done */ + if(dest_i >= dest->totlayer) return; + + /* if we found a matching layer, copy the data */ + if(dest->layers[dest_i].type == source->layers[src_i].type) { + int offset = dest->layers[dest_i].offset; + char *src_data = source->layers[src_i].data; + char *dest_data = (char*)*dest_block + offset; + + typeInfo = layerType_getInfo(dest->layers[dest_i].type); + src_offset = src_index * typeInfo->size; + + if(typeInfo->copy) + typeInfo->copy(src_data + src_offset, dest_data, 1); + else + memcpy(dest_data, src_data + src_offset, typeInfo->size); + + /* if there are multiple source & dest layers of the same type, + * we don't want to copy all source layers to the same dest, so + * increment dest_i + */ + ++dest_i; + } + } +} + +void CustomData_from_bmesh_block(const CustomData *source, CustomData *dest, + void *src_block, int dest_index) +{ + const LayerTypeInfo *typeInfo; + int dest_i, src_i, dest_offset; + + /* copies a layer at a time */ + dest_i = 0; + for(src_i = 0; src_i < source->totlayer; ++src_i) { + + /* find the first dest layer with type >= the source type + * (this should work because layers are ordered by type) + */ + while(dest_i < dest->totlayer + && dest->layers[dest_i].type < source->layers[src_i].type) + ++dest_i; + + /* if there are no more dest layers, we're done */ + if(dest_i >= dest->totlayer) return; + + /* if we found a matching layer, copy the data */ + if(dest->layers[dest_i].type == source->layers[src_i].type) { + int offset = source->layers[src_i].offset; + char *src_data = (char*)src_block + offset; + char *dest_data = dest->layers[dest_i].data; + + typeInfo = layerType_getInfo(dest->layers[dest_i].type); + dest_offset = dest_index * typeInfo->size; + + if(typeInfo->copy) + typeInfo->copy(src_data, dest_data + dest_offset, 1); + else + memcpy(dest_data + dest_offset, src_data, typeInfo->size); + + /* if there are multiple source & dest layers of the same type, + * we don't want to copy all source layers to the same dest, so + * increment dest_i + */ + ++dest_i; + } + } + +} + void CustomData_file_write_info(int type, char **structname, int *structnum) { const LayerTypeInfo *typeInfo = layerType_getInfo(type); diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 73a39abac55..72557145270 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -26,6 +26,7 @@ * * ***** END GPL LICENSE BLOCK ***** */ + #ifndef DNA_CUSTOMDATA_TYPES_H #define DNA_CUSTOMDATA_TYPES_H @@ -48,6 +49,7 @@ typedef struct CustomData { CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ int totlayer, maxlayer; /* number of layers, size of layers array */ int totsize, pad; /* in editmode, total size of all data layers */ + void *pool; /* for Bmesh: Memory pool for allocation of blocks*/ } CustomData; /* CustomData.type */ @@ -66,7 +68,10 @@ typedef struct CustomData { #define CD_PROP_STR 12 #define CD_ORIGSPACE 13 /* for modifier stack face location mapping */ #define CD_ORCO 14 -#define CD_NUMTYPES 15 +#define CD_MTEXPOLY 15 +#define CD_MLOOPUV 16 +#define CD_MLOOPCOL 17 +#define CD_NUMTYPES 18 /* Bits for CustomDataMask */ #define CD_MASK_MVERT (1 << CD_MVERT) @@ -84,6 +89,9 @@ typedef struct CustomData { #define CD_MASK_PROP_STR (1 << CD_PROP_STR) #define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE) #define CD_MASK_ORCO (1 << CD_ORCO) +#define CD_MASK_MTEXPOLY (1 << CD_MTEXPOLY) +#define CD_MASK_MLOOPUV (1 << CD_MLOOPUV) +#define CD_MASK_MLOOPCOL (1 << CD_MLOOPCOL) /* CustomData.flag */ diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index a717df640f1..6d025839ac8 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -69,6 +69,21 @@ typedef struct MCol { char a, r, g, b; } MCol; +/*bmesh custom data stuff*/ +typedef struct MTexPoly{ + struct Image *tpage; + char flag, transp; + short mode,tile,unwrap; +}MTexPoly; + +typedef struct MLoopUV{ + float uv[2]; +}MLoopUV; + +typedef struct MLoopCol{ + char a, r, g, b; +}MLoopCol; + typedef struct MSticky { float co[2]; } MSticky; From 107b78a3d2b1a37f91b1e46511a3ea29f7f5cbbf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Jul 2008 19:00:56 +0000 Subject: [PATCH 333/430] Made some python game engine funcs use NOARGS, getAxisVec was using wrong multiplication order. Use BUT_TOGDUAL for controllers init states so you can see what the init state is for any controller without using the button to check. --- source/blender/src/buttons_logic.c | 4 ++-- source/blender/src/interface_draw.c | 8 +++++-- source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 28 +++++++++------------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index be8483b7e04..cb09f947f3c 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -3164,11 +3164,11 @@ void logic_buts(void) for (offset=0; offset<15; offset+=5) { uiBlockBeginAlign(block); for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); + but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } } diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 83f1221b1fb..e7041e60003 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -180,8 +180,12 @@ static void ui_draw_icon(uiBut *but, BIFIconID icon, int blend) height= ICON_HEIGHT; if(but->flag & UI_ICON_LEFT) { - if (but->type==BUT_TOGDUAL && but->drawstr[0]) { - xs= but->x1-1.0; + if (but->type==BUT_TOGDUAL) { + if (but->drawstr[0]) { + xs= but->x1-1.0; + } else { + xs= (but->x1+but->x2- height)/2.0; + } } else if (but->type==BUTM ) { xs= but->x1+1.0; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index d6d2254850a..507cedcd5d3 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1413,7 +1413,7 @@ PyObject* KX_GameObject::PyGetAxisVect(PyObject* self, PyObject* value) MT_Vector3 vect; if (PyVecTo(value, vect)) { - return PyObjectFrom(vect * NodeGetWorldOrientation()); + return PyObjectFrom(NodeGetWorldOrientation() * vect); } return NULL; } diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 47f5577552f..433e0636833 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -103,9 +103,7 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons static PyObject* ErrorObject; STR_String gPyGetRandomFloat_doc="getRandomFloat returns a random floating point value in the range [0..1)"; -static PyObject* gPyGetRandomFloat(PyObject*, - PyObject*, - PyObject*) +static PyObject* gPyGetRandomFloat(PyObject*) { return PyFloat_FromDouble(MT_random()); } @@ -156,9 +154,7 @@ static PyObject* gPyExpandPath(PyObject*, static bool usedsp = false; // this gets a pointer to an array filled with floats -static PyObject* gPyGetSpectrum(PyObject*, - PyObject* args, - PyObject*) +static PyObject* gPyGetSpectrum(PyObject*) { SND_IAudioDevice* audiodevice = SND_DeviceManager::Instance(); @@ -237,7 +233,7 @@ static PyObject* gPySetLogicTicRate(PyObject*, return NULL; } -static PyObject* gPyGetLogicTicRate(PyObject*, PyObject*, PyObject*) +static PyObject* gPyGetLogicTicRate(PyObject*) { return PyFloat_FromDouble(KX_KetsjiEngine::GetTicRate()); } @@ -273,7 +269,7 @@ static PyObject* gPySetPhysicsDebug(PyObject*, -static PyObject* gPyGetPhysicsTicRate(PyObject*, PyObject*, PyObject*) +static PyObject* gPyGetPhysicsTicRate(PyObject*) { return PyFloat_FromDouble(PHY_GetActiveEnvironment()->getFixedTimeStep()); } @@ -281,9 +277,7 @@ static PyObject* gPyGetPhysicsTicRate(PyObject*, PyObject*, PyObject*) static STR_String gPyGetCurrentScene_doc = "getCurrentScene()\n" "Gets a reference to the current scene.\n"; -static PyObject* gPyGetCurrentScene(PyObject* self, - PyObject* args, - PyObject* kwds) +static PyObject* gPyGetCurrentScene(PyObject* self) { Py_INCREF(gp_KetsjiScene); return (PyObject*) gp_KetsjiScene; @@ -366,19 +360,19 @@ static struct PyMethodDef game_methods[] = { {"expandPath", (PyCFunction)gPyExpandPath, METH_VARARGS, gPyExpandPath_doc}, {"getCurrentController", (PyCFunction) SCA_PythonController::sPyGetCurrentController, - METH_VARARGS, SCA_PythonController::sPyGetCurrentController__doc__}, + METH_NOARGS, SCA_PythonController::sPyGetCurrentController__doc__}, {"getCurrentScene", (PyCFunction) gPyGetCurrentScene, - METH_VARARGS, gPyGetCurrentScene_doc.Ptr()}, + METH_NOARGS, gPyGetCurrentScene_doc.Ptr()}, {"addActiveActuator",(PyCFunction) SCA_PythonController::sPyAddActiveActuator, METH_VARARGS, SCA_PythonController::sPyAddActiveActuator__doc__}, {"getRandomFloat",(PyCFunction) gPyGetRandomFloat, - METH_VARARGS,gPyGetRandomFloat_doc.Ptr()}, + METH_NOARGS,gPyGetRandomFloat_doc.Ptr()}, {"setGravity",(PyCFunction) gPySetGravity, METH_VARARGS,"set Gravitation"}, - {"getSpectrum",(PyCFunction) gPyGetSpectrum, METH_VARARGS,"get audio spectrum"}, + {"getSpectrum",(PyCFunction) gPyGetSpectrum, METH_NOARGS,"get audio spectrum"}, {"stopDSP",(PyCFunction) gPyStopDSP, METH_VARARGS,"stop using the audio dsp (for performance reasons)"}, - {"getLogicTicRate", (PyCFunction) gPyGetLogicTicRate, METH_VARARGS, "Gets the logic tic rate"}, + {"getLogicTicRate", (PyCFunction) gPyGetLogicTicRate, METH_NOARGS, "Gets the logic tic rate"}, {"setLogicTicRate", (PyCFunction) gPySetLogicTicRate, METH_VARARGS, "Sets the logic tic rate"}, - {"getPhysicsTicRate", (PyCFunction) gPyGetPhysicsTicRate, METH_VARARGS, "Gets the physics tic rate"}, + {"getPhysicsTicRate", (PyCFunction) gPyGetPhysicsTicRate, METH_NOARGS, "Gets the physics tic rate"}, {"setPhysicsTicRate", (PyCFunction) gPySetPhysicsTicRate, METH_VARARGS, "Sets the physics tic rate"}, {"PrintGLInfo", (PyCFunction)pyPrintExt, METH_NOARGS, "Prints GL Extension Info"}, {NULL, (PyCFunction) NULL, 0, NULL } From 488a8291d13a631ee1f9a41fce6eccea712ddc5e Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Fri, 4 Jul 2008 20:21:08 +0000 Subject: [PATCH 334/430] == compile fix == - fix compilation for MSVC (added missing math define) - note: defines were already duplicated, added twice to keep them in synch --- source/blender/blenlib/BLI_arithb.h | 3 +++ source/blender/blenlib/BLI_winstuff.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 89ce51c2f02..c22b6f79e08 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -50,6 +50,9 @@ extern "C" { #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 #endif +#ifndef M_1_PI +#define M_1_PI 0.318309886183790671538 +#endif #ifdef WIN32 #ifndef FREE_WINDOWS diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 9c192ba8b09..11150075bac 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -73,6 +73,9 @@ #ifndef M_SQRT1_2 #define M_SQRT1_2 0.70710678118654752440 #endif +#ifndef M_1_PI +#define M_1_PI 0.318309886183790671538 +#endif #define MAXPATHLEN MAX_PATH From 0bdfc6a953ef23be522523c4eec50b32716a6afd Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Fri, 4 Jul 2008 20:24:15 +0000 Subject: [PATCH 335/430] == BUGFIX == - fix crash when exiting game engine (with ESC-key). - reason for crash: std::vector iterator is invalid after vector::erase --- source/gameengine/GameLogic/SCA_IController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp index bbe5a51db3c..8f156cc63e7 100644 --- a/source/gameengine/GameLogic/SCA_IController.cpp +++ b/source/gameengine/GameLogic/SCA_IController.cpp @@ -133,11 +133,11 @@ void SCA_IController::UnlinkActuator(class SCA_IActuator* actua) } if (!(actit==m_linkedactuators.end())) { - m_linkedactuators.erase(actit); if (IsActive()) { (*actit)->DecLink(); } + m_linkedactuators.erase(actit); } } @@ -163,11 +163,11 @@ void SCA_IController::UnlinkSensor(class SCA_ISensor* sensor) } if (!(sensit==m_linkedsensors.end())) { - m_linkedsensors.erase(sensit); if (IsActive()) { (*sensit)->DecLink(); } + m_linkedsensors.erase(sensit); } } From eda5b6d7368e813024b68c8e3085a82c111a26fc Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Fri, 4 Jul 2008 22:32:06 +0000 Subject: [PATCH 336/430] ->Last Commit broke compilation on GCC CustomData_bmesh_set function header and prototype didnt match. For some reason this not only compiledon MSVC but didnt even warn... --- source/blender/blenkernel/intern/customdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 946cb449912..4880a246e1c 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1557,7 +1557,7 @@ void *CustomData_bmesh_get_n(const CustomData *data, void *block, int type, int return (char *)block + data->layers[layer_index+n].offset; } -void CustomData_bmesh_set(CustomData *data, void *block, int type, void *source) +void CustomData_bmesh_set(const CustomData *data, void *block, int type, void *source) { void *dest = CustomData_bmesh_get(data, block, type); const LayerTypeInfo *typeInfo = layerType_getInfo(type); From 5200f51a876ee6519cfdcd2e29e1a2e265244a20 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 5 Jul 2008 06:22:15 +0000 Subject: [PATCH 337/430] soc-2008-mxcurioni: first render layer implementation with frame buffer objects. It does not work yet: I cannot manage to read from the correct buffer yet. --- .../intern/app_blender/AppGLWidget.cpp | 24 +++--- .../intern/app_blender/AppGLWidget.h | 33 ++++---- .../freestyle/intern/app_blender/api.cpp | 79 +++++++++++++++---- .../blender/render/intern/source/pipeline.c | 9 +-- 4 files changed, 98 insertions(+), 47 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 2b43b2b9a0c..9a5a21ca93c 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -152,6 +152,9 @@ AppGLWidget::AppGLWidget(const char *iName) // _backBufferFlag = true; _record = false; + + workingBuffer = GL_BACK; //soc + } AppGLWidget::~AppGLWidget() @@ -402,15 +405,16 @@ void AppGLWidget::prepareCanvas() makeCurrent(); glPushAttrib(GL_ALL_ATTRIB_BITS); - if(_frontBufferFlag){ - if(_backBufferFlag) - glDrawBuffer(GL_FRONT_AND_BACK); - else - glDrawBuffer(GL_FRONT); - } - else if(_backBufferFlag) - glDrawBuffer(GL_BACK); - + // if(_frontBufferFlag){ + // if(_backBufferFlag) + // glDrawBuffer(GL_FRONT_AND_BACK); + // else + // glDrawBuffer(GL_FRONT); + // } + // else if(_backBufferFlag) + // glDrawBuffer(GL_BACK); + glDrawBuffer( workingBuffer ); //soc + // Projection Matrix //================== glMatrixMode(GL_PROJECTION); @@ -427,7 +431,7 @@ void AppGLWidget::prepareCanvas() void AppGLWidget::releaseCanvas() { makeCurrent(); - glDrawBuffer(GL_BACK); + glDrawBuffer( workingBuffer ); //soc glPopAttrib(); } diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index bc18be00a31..447eece30c9 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -91,6 +91,7 @@ public: AppGLWidget_Camera * _camera; + int workingBuffer; protected: unsigned int _width, _height; @@ -342,7 +343,7 @@ public: { makeCurrent(); //glReadBuffer(GL_FRONT); //in reality: glReadBuffer and glDrawBuffer are both set to GL_BACK - glReadBuffer(GL_BACK); + //glReadBuffer(GL_BACK); GLenum glformat; switch(format) { @@ -371,21 +372,21 @@ public: BACK } GLBuffer; - void setReadPixelsBuffer(int iBuffer) - { - makeCurrent(); - switch(iBuffer) - { - case FRONT: - glReadBuffer(GL_FRONT); - break; - case BACK: - glReadBuffer(GL_BACK); - break; - default: - break; - } - } + // void setReadPixelsBuffer(int iBuffer) + // { + // makeCurrent(); + // switch(iBuffer) + // { + // case FRONT: + // glReadBuffer(GL_FRONT); + // break; + // case BACK: + // glReadBuffer(GL_BACK); + // break; + // default: + // break; + // } + // } BBox scene3DBBox() const { return _ModelRootNode->bbox(); } diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 4ca13000ccb..fc0e6764710 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -105,7 +105,14 @@ extern "C" { FRS_scene_3ds_export(re); } - void FRS_render(Render* re) { + void FRS_render(Render* re, int render_in_layer) { + + if(render_in_layer) { + view->workingBuffer = GL_COLOR_ATTACHMENT0_EXT; + } else { + view->workingBuffer = GL_BACK; + } + // add style module string style_module = pathconfig->getProjectDir() + Config::DIR_SEP + "style_modules" + @@ -121,23 +128,67 @@ extern "C" { // render final result view->draw(); - - // copy result into render window - RenderResult rres; - RE_GetResultImage(re, &rres); - view->readPixels(0, 0, re->winx, re->winy, AppGLWidget::RGBA, rres.rectf ); - re->result->renlay = render_get_active_layer(re, re->result); - re->display_draw(re->result, NULL); - - controller->CloseFile(); } - void FRS_execute(Render* re, bool render_in_layer) { + void FRS_execute(Render* re, int render_in_layer) { - //if(render_in_layer) - // set-up offscreen rendering + GLuint framebuffer, renderbuffer; + GLenum status; + RenderLayer *rl; - FRS_render(re); + if(render_in_layer) { + cout << "Freestyle as a render layer - SETUP" << endl; + + // set up frame buffer + glGenFramebuffersEXT(1, &framebuffer); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer); + + // set up render buffer + glGenRenderbuffersEXT(1, &renderbuffer); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffer); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA8, re->winx, re->winy); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffer); + + // status verification + status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if (status != GL_FRAMEBUFFER_COMPLETE_EXT){ + cout << "Framebuffer setup error" << endl; + return; + } + + glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); + + } else { + glDrawBuffer(GL_BACK); + } + + FRS_render(re, render_in_layer); + + if(render_in_layer) { + for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next) { + if(rl->layflag & SCE_LAY_FRS) { + cout << "Freestyle as a render layer - RESULT" << endl; + + // transfer render to layer + glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); + glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_FLOAT, rl->rectf ); + + // bind window + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glDeleteRenderbuffersEXT(1, &renderbuffer); + glDeleteFramebuffersEXT(1, &framebuffer); + } + } + } else { + // copy result into render window + RenderResult rres; + RE_GetResultImage(re, &rres); + view->readPixels(0, 0, re->winx, re->winy, AppGLWidget::RGBA, rres.rectf ); + re->result->renlay = render_get_active_layer(re, re->result); + re->display_draw(re->result, NULL); + } + + controller->CloseFile(); } #ifdef __cplusplus diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 8403d237f8f..d91736e9a10 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1634,13 +1634,8 @@ static void do_render_3d(Render *re) /* Freestyle */ if( re->r.mode & R_EDGE_FRS ) { - for(rl = re->result->layers.first; rl; rl= rl->next) { - if(rl->layflag & SCE_LAY_FRS) { - printf("Freestyle as a render layer\n"); - FRS_prepare(re); - FRS_execute(re,1); - } - } + FRS_prepare(re); + FRS_execute(re,1); } /* do left-over 3d post effects (flares) */ From 65c9dfe436a9debb71f79a77f9eb0ec49cb8f4cd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 5 Jul 2008 08:50:41 +0000 Subject: [PATCH 338/430] soc-2008-mxcurioni: render layer with FBOs -> render buffers, version 2. Still not working. --- .../intern/app_blender/AppGLWidget.cpp | 4 +-- .../freestyle/intern/app_blender/api.cpp | 27 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 9a5a21ca93c..16fb5eae57e 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -413,7 +413,7 @@ void AppGLWidget::prepareCanvas() // } // else if(_backBufferFlag) // glDrawBuffer(GL_BACK); - glDrawBuffer( workingBuffer ); //soc + //glDrawBuffer( workingBuffer ); //soc // Projection Matrix //================== @@ -431,7 +431,7 @@ void AppGLWidget::prepareCanvas() void AppGLWidget::releaseCanvas() { makeCurrent(); - glDrawBuffer( workingBuffer ); //soc + //glDrawBuffer( workingBuffer ); //soc glPopAttrib(); } diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index fc0e6764710..dfb8c073bdc 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -132,7 +132,7 @@ extern "C" { void FRS_execute(Render* re, int render_in_layer) { - GLuint framebuffer, renderbuffer; + GLuint framebuffer, renderbuffers[2]; GLenum status; RenderLayer *rl; @@ -143,23 +143,28 @@ extern "C" { glGenFramebuffersEXT(1, &framebuffer); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer); - // set up render buffer - glGenRenderbuffersEXT(1, &renderbuffer); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffer); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA8, re->winx, re->winy); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffer); + // set up render buffer: one color buffer, one depth buffer + glGenRenderbuffersEXT(2, renderbuffers); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[0]); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, re->winx, re->winy); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffers[0]); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[1]); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, re->winx, re->winy); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, renderbuffers[1]); // status verification status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); if (status != GL_FRAMEBUFFER_COMPLETE_EXT){ cout << "Framebuffer setup error" << endl; + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glDeleteRenderbuffersEXT(2, renderbuffers); + glDeleteFramebuffersEXT(1, &framebuffer); return; } glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); - - } else { - glDrawBuffer(GL_BACK); } FRS_render(re, render_in_layer); @@ -168,14 +173,14 @@ extern "C" { for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next) { if(rl->layflag & SCE_LAY_FRS) { cout << "Freestyle as a render layer - RESULT" << endl; - + // transfer render to layer glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_FLOAT, rl->rectf ); // bind window glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glDeleteRenderbuffersEXT(1, &renderbuffer); + glDeleteRenderbuffersEXT(2, renderbuffers); glDeleteFramebuffersEXT(1, &framebuffer); } } From 2fc5281c83c2fffbd4fde59d1053795bf1d36798 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Jul 2008 11:08:39 +0000 Subject: [PATCH 339/430] patch [#17275] Fix for: pressing delete on an empty sequencer pops up a confirmation from Roelf De Kock (kiemdoder) to address report #15025 --- source/blender/src/editseq.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source/blender/src/editseq.c b/source/blender/src/editseq.c index b9351f82d1e..f9432f8e69a 100644 --- a/source/blender/src/editseq.c +++ b/source/blender/src/editseq.c @@ -2135,12 +2135,25 @@ void del_seq(void) Sequence *seq; MetaStack *ms; Editing *ed; - - if(okee("Erase selected")==0) return; + int nothingSelected = TRUE; ed= G.scene->ed; if(ed==0) return; + seq=get_last_seq(); + if (seq && seq->flag & SELECT) { /* avoid a loop since this is likely to be selected */ + nothingSelected = FALSE; + } else { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if (seq->flag & SELECT) { + nothingSelected = FALSE; + break; + } + } + } + + if(nothingSelected || okee("Erase selected")==0) return; + /* free imbufs of all dependent strips */ for(seq=ed->seqbasep->first; seq; seq=seq->next) if(seq->flag & SELECT) From d50fbd65685895d9edab98de02c3004ef14ddb13 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 5 Jul 2008 11:13:57 +0000 Subject: [PATCH 340/430] soc-2008-mxcurioni: render buffer format --- source/blender/freestyle/intern/app_blender/api.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index dfb8c073bdc..1a56f5aa587 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -1,4 +1,3 @@ - #include "AppGLWidget.h" #include "Controller.h" #include "AppConfig.h" @@ -147,7 +146,7 @@ extern "C" { glGenRenderbuffersEXT(2, renderbuffers); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[0]); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, re->winx, re->winy); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, re->winx, re->winy); glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffers[0]); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[1]); @@ -164,7 +163,7 @@ extern "C" { return; } - glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); + glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // really needed ? } FRS_render(re, render_in_layer); From 85611d10451c1b14a89271c2cf53a9f268c89ede Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 5 Jul 2008 11:16:03 +0000 Subject: [PATCH 341/430] soc-2008-mxcurioni: render buffer modification --- source/blender/freestyle/intern/app_blender/api.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 1a56f5aa587..737ae0c6625 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -163,6 +163,8 @@ extern "C" { return; } + glPushAttrib(GL_VIEWPORT_BIT); + glViewport(0, 0, re->winx, re->winy); glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // really needed ? } @@ -179,6 +181,8 @@ extern "C" { // bind window glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glDrawBuffer(GL_BACK); + glPopAttrib(); glDeleteRenderbuffersEXT(2, renderbuffers); glDeleteFramebuffersEXT(1, &framebuffer); } From e6e2087e90417c3a5c4cf934bb2f54f5cc5c214d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Jul 2008 11:38:16 +0000 Subject: [PATCH 342/430] Updates from Roger Wickes [#16494] Animation Bake Constraints update links cloned children to cloned parents, useful for ik target baking. whitespace, capitalization. [#15032] C3D Import script cleanup/IK Changed code to put IK constraints on a user-defined layer, separate from Markers. cleaned up module naming convention. removed questionable sloc. add revision history. forced the TrackTo constraint to use a valid marker, and not make up one on its own. --- release/scripts/animation_bake_constraints.py | 208 +++++++++--------- release/scripts/c3d_import.py | 60 ++--- 2 files changed, 133 insertions(+), 135 deletions(-) diff --git a/release/scripts/animation_bake_constraints.py b/release/scripts/animation_bake_constraints.py index 130e93d8591..8a416c3c488 100644 --- a/release/scripts/animation_bake_constraints.py +++ b/release/scripts/animation_bake_constraints.py @@ -9,8 +9,8 @@ Fillename: 'Bake_Constraint.py' """ __author__ = "Roger Wickes (rogerwickes(at)yahoo.com)" -__script__ = "Bake Constraints" -__version__ = "0.6" +__script__ = "Animation Bake Constraints" +__version__ = "0.7" __url__ = ["Communicate problems and errors, http://www.blenderartists.com/forum/private.php?do=newpm to PapaSmurf"] __email__= ["Roger Wickes, rogerwickes@yahoo.com", "scripts"] __bpydoc__ = """\ @@ -28,58 +28,62 @@ Developed for use with MoCap data, where a bone is constrained to point at an em moving through space and time. This records the actual locrot of the armature so that the motion can be edited, reoriented, scaled, and used as NLA Actions -see also wiki Scripts/Manual/ Sandbox/Animation/Bake_Constraints (tbd) +see also wiki Scripts/Manual/ Tutorial/Motion Capture
    -Usage:
    +Usage:
    - Select the reference Object(s) you want to bake
    - Set the frame range to bake in the Anim Panel
    - Set the test code (if you want a self-test) in the RT field in the Anim Panel
    - -- Set RT:1 in the Anim panel to create a test armature
    + -- Set RT:1 to create a test armature
    + -- Set RT: up to 100 for more debug messages and status updates

    - - Run the script
    - - The clone copy of the object is created and it has an IPO curve assigned to it. - - The clone shadows the object by an offset locrot (see usrDelta) - - That Ipo has Location and Rotation curves that make the shadow mimic the movement of the selected object, - but without using constraints. Bones move identically in relation to the armature as the reference object + - Run the script
    + - The clone copy of the object is created and it has an IPO curve assigned to it.
    + - The clone shadows the object by an offset locrot (see usrDelta)
    + - That Object has Ipo Location and Rotation curves that make the clone mimic the movement
    + of the selected object, but without using constraints.
    + - If the object was an Armature, the clone's bones move identically in relation to the
    + original armature, and an Action is created that drives the bone movements.
    - Version History: - 0.1: bakes Loc Rot for a constrained object - 0.2: bakes Loc and Rot for the bones within Armature object - 0.3: UI for setting options - 0.3.1 add manual to script library - 0.4: bake multiple objects - 0.5: root bone worldspace rotation - 0.6: re-integration with BPyArmature - + 0.1: bakes Loc Rot for a constrained object + 0.2: bakes Loc and Rot for the bones within Armature object + 0.3: UI for setting options + 0.3.1 add manual to script library + 0.4: bake multiple objects + 0.5: root bone worldspace rotation + 0.6: re-integration with BPyArmature + 0.7: bakes parents and leaves clones selected + License, Copyright, and Attribution: - by Roger WICKES May 2008, released under Blender Artistic Licence to Public Domain - feel free to add to any Blender Python Scripts Bundle. - Thanks to Jean-Baptiste PERIN, IdeasMan42 (Campbell Barton?), Basil_Fawlty/Cage_drei (Andrew Cruse) + by Roger WICKES May 2008, released under Blender Artistic Licence to Public Domain + feel free to add to any Blender Python Scripts Bundle. + Thanks to Jean-Baptiste PERIN, IdeasMan42 (Campbell Barton), Basil_Fawlty/Cage_drei (Andrew Cruse) much lifted/learned from blender.org/documentation/245PytonDoc and wiki some modules based on c3D_Import.py, PoseLib16.py and IPO/Armature code examples e.g. camera jitter -Pseudocode (planned versions): +Pseudocode: Initialize If at least one object is selected For each selected object, - create a shadow object + create a cloned object remove any constraints on the clone create or reset an ipo curve named like the object for each frame set the clone's locrot key based on the reference object if it's an armature, - create an action (which is an Ipo for each bone) - for each frame of the animation - for each bone in the armature - set the key + create an action (which is an Ipo for each bone) + for each frame of the animation + for each bone in the armature + set the key Else you're a smurf Test Conditions and Regressions: 1. (v0.1) Non-armatures (the cube), with ipo curve and constraints at the object level 2. armatures, with ipo curve and constraints at the object level 3. armatures, with bones that have ipo curves and constraints - + 4. objects without parents, children with unselected parents, select children first. + Naming conventions: arm = a specific objec type armature bone = bones that make up the skeleton of an armature @@ -89,19 +93,6 @@ Naming conventions: pbone = pose bone, a posed bone in an object tst = testing, self-test routines usr = user-entered or designated stuff - -Pattern Notes (let me know if I've violated any): - Bergin Starting,Designing, Programming, Coding - Bergin 23 Indent for Structure - I don't like only 2, but the editor is set up that way - Bergin 26 Be Spacey Not Tabby - personal frustraion here. workaround is to Format->convert to whitespace - Bergin 27 Consistent Capitalization - except Blender, because I love it. - Bergin 28 Name Your Constants - not for those I plan on making variable - Python 01 Return Everything - I made this one up, all functions and methods end in return - even though it is decoration in Python, it helps Python throw an indentation error for typing mistakes - Wickes 01 Decorate Your Code - for visual appeal and to ease maintenance, include separators like ######### - to visually distinquish and separate functions, making it quicker to scan through code for methods - Wickes 02 Whitespace helps readability - include blanks around = # and lines (after def, after return) to make it stand out and pretty - """ ######################################## @@ -131,8 +122,8 @@ POSE_XFORM= [Blender.Object.Pose.LOC, Blender.Object.Pose.ROT] # set senstitivity for displaying debug/console messages. 0=none, 100=max # then call debug(num,string) to conditionally display status/info in console window -MODE=Blender.Get('rt') #execution mode: 0=run normal, x=self-test (test error trapping etc) -DEBUG=100 #how much detail on internal processing for big brother to see +MODE=Blender.Get('rt') #execution mode: 0=run normal, 1=make test armature +DEBUG=Blender.Get('rt') #how much detail on internal processing for user to see. range 0-100 BATCH=False #called from command line? is someone there? Would you like some cake? #there are two coordinate systems, the real, or absolute 3D space, @@ -143,13 +134,11 @@ COORD_REAL = 1 # User Settings - Change these options manually or via GUI (future TODO) usrCoord = COORD_REAL # what the user wants -usrParent = False # True=keep parent (if exists), False = breakaway (usually with Real) +usrParent = False # True=clone keeps original parent, False = clone's parent is the clone of the original parent (if cloned) usrFreeze = 2 #2=yes, 0=no. Freezes shadow object in place at current frame as origin - #TODO - i wonder if usrFreeze means we should set Delta to the the difference between the original object and parent? # delta is amount to offset/change from the reference object. future set in a ui, so technically not a constant usrDelta = [10,10,0,0,0,0] #order specific - Loc xyz Rot xyz usrACTION = True # Offset baked Action frames to start at frame 1 -usrBAKEobjIPO = False # bake the object Ipo? it is useless for MoCap, as we only want the Action, and the Object does not move CURFRAME = 'curframe' #keyword to use when getting the frame number that the scene is presently on ARMATURE = 'Armature' #en anglais @@ -159,7 +148,7 @@ BONE_SPACES = ['ARMATURESPACE','BONESPACE'] #Ipo curves created are prefixed with a name, like Ipo_ or Bake_ followed by the object/bone name #bakedArmName = "b." #used for both the armature class and object instance -#ipoObjectNamePrefix= "" +usrObjectNamePrefix= "" #ipoBoneNamePrefix = "" # for example, if on entry an armature named Man was selected, and the object prefix was "a." # on exit an armature and an IPO curve named a.Man exists for the object as a whole @@ -177,7 +166,6 @@ scn = Blender.Scene.GetCurrent() #================= ######################################## def debug(num,msg): #use log4j or just console here. - if DEBUG >= num: if BATCH == False: print 'debug: '[:num/10+7]+msg @@ -201,9 +189,26 @@ def getRenderInfo(): debug(90,'Scene is on frame %i and frame range is %i to %i' % (curframe,staframe,endframe)) return (staframe,endframe,curframe) +######################################## +def sortObjects(obs): #returns a list of objects sorted based on parent dependency + obClones= [] + while len(obClones) < len(obs): + for ob in obs: + if not ob in obClones: + par= ob.getParent() + #if no parent, or the parent is not scheduled to be cloned + if par==None: + obClones.append(ob) # add the independent + elif par not in obs: # parent will not be cloned + obClones.append(ob) # add the child + elif par in obClones: # is it on the list? + obClones.append(ob) # add the child + # parent may be a child, so it will be caught next time thru + debug(100,'clone object order: \n%s' % obClones) + return obClones # ordered list of (ob, par) tuples + ######################################## def sortBones(xbones): #returns a sorted list of bones that should be added,sorted based on parent dependency - print ('My suggestion would be:') # while there are bones to add, # look thru the list of bones we need to add # if we have not already added this bone @@ -215,7 +220,7 @@ def sortBones(xbones): #returns a sorted list of bones that should be added,sort # else #we need to keep cycling and catch its parent # else it is a root bone # add it -# else skip it, it's prego +# else skip it, it's already in there # endfor # endwhile xboneNames=[] @@ -240,7 +245,6 @@ def sortBones(xbones): #returns a sorted list of bones that should be added,sort ######################################## def dupliArmature(ob): #makes a copy in current scn of the armature used by ob and its bones - ob_mat = ob.matrixWorld ob_data = ob.getData() debug(49,'Reference object uses %s' % ob_data) @@ -261,8 +265,6 @@ def dupliArmature(ob): #makes a copy in current scn of the armature used by ob a #when creating a child, we cannot link to a parent if it does not yet exist in our armature ebones = [] #list of the bones I want to create for my arm - if BLENDER_VERSION > 245: debug(0,'WARNING: Programmer check for Bone updates in dupliArmature') - eboneNames = sortBones(xbones) i=0 @@ -306,13 +308,13 @@ def dupliArmature(ob): #makes a copy in current scn of the armature used by ob a print myob.matrix return myob - +######################################## def scrub(): # scrubs to startframe staFrame,endFrame,curFrame = getRenderInfo() # eye-candy, go from current to start, fwd or back if not BATCH: - print "Positioning to start..." + debug(100, "Positioning to start...") frameinc=(staFrame-curFrame)/10 if abs(frameinc) >= 1: for i in range(10): @@ -320,6 +322,7 @@ def scrub(): # scrubs to startframe Blender.Set(CURFRAME,curFrame) # computes the constrained location of the 'real' objects Blender.Redraw() Blender.Set(CURFRAME, staFrame) + return ######################################## def bakeBones(ref_ob,arm_ob): #copy pose from ref_ob to arm_ob @@ -335,7 +338,6 @@ def bakeBones(ref_ob,arm_ob): #copy pose from ref_ob to arm_ob arm_channels = act.getAllChannelIpos() pose= arm_ob.getPose() pbones= pose.bones.values() #we want the bones themselves, not the dictionary lookup - print arm_channels.keys() for pbone in pbones: debug (100,'Channel listing for %s: %s' % (pbone.name,arm_channels[pbone.name] )) ipo=arm_channels[pbone.name] @@ -344,8 +346,7 @@ def bakeBones(ref_ob,arm_ob): #copy pose from ref_ob to arm_ob return ######################################## -def getOrCreateCurve(ipo, curvename): - +def getOrCreateCurve(ipo, curvename): """ Retrieve or create a Blender Ipo Curve named C{curvename} in the C{ipo} Ipo Either an ipo curve named C{curvename} exists before the call then this curve is returned, @@ -362,18 +363,17 @@ def getOrCreateCurve(ipo, curvename): return mycurve ######################################## -def eraseCurve(ipo,numCurves): - debug(80,'Erasing %i curves for %' % (numCurves,ipo.GetName())) +def eraseCurve(ipo,numCurves): + debug(90,'Erasing %i curves for %' % (numCurves,ipo.GetName())) for i in range(numCurves): - nbBezPoints = ipo.getNBezPoints(i) + nbBezPoints= ipo.getNBezPoints(i) for j in range(nbBezPoints): ipo.delBezPoint(i) return ######################################## def resetIPO(ipo): - ipoName=ipoObjectNamePrefix + obName - debug(40,'Resetting ipo curve named %s' %ipoName) + debug(60,'Resetting ipo curve named %s' %ipo.name) numCurves = ipo.getNcurves() #like LocX, LocY, etc if numCurves > 0: eraseCurve(ipo, numCurves) #erase data if one exists @@ -399,11 +399,11 @@ def resetIPOs(ob): #resets all IPO curvess assocated with an object and its bone return ######################################## -def parse(string,delim): +def parse(string,delim): index = string.find(delim) # -1 if not found, else pointer to delim if index+1: return string[:index] return string - + ######################################## def newIpo(ipoName): #add a new Ipo object to the Blender scene ipo=Blender.Ipo.New('Object',ipoName) @@ -438,19 +438,16 @@ def makeUpaName(type,name): #i know this exists in Blender somewhere... name=ipoName else: debug (0,'FATAL ERROR: I dont know how to make up a new %s name based on %s' % (type,ob)) - return + return None return name ######################################## -def createIpo(ob): #create an Ipo and curves and link them to this object +def createIpo(ob): #create an Ipo and curves and link them to this object #first, we have to create a unique name #try first with just the name of the object to keep things simple. ipoName = makeUpaName('Ipo',ob.getName()) # make up a name for a new Ipo based on the object name - debug(20,'Ipo and LocRot curves called %s' % ipoName) - ipo=newIpo(ipoName) - ob.setIpo(ipo) #link them return ipo @@ -465,7 +462,7 @@ def getLocLocal(ob): ob.RotZ*R2D ] return key - + ######################################## def getLocReal(ob): obMatrix = ob.matrixWorld #Thank you IdeasMan42 @@ -505,7 +502,7 @@ def getCurves(ipo): ipo[Ipo.OB_ROTZ] ] return ipos - + ######################################## def addPoint(time,keyLocRot,ipos): if BLENDER_VERSION < 245: @@ -579,7 +576,7 @@ def removeConstraints(ob): debug(90,'removed %s => %s' % (ob.name, const)) ob.constraints.remove(const) return - + ######################################## def removeConstraintsOb(ob): # from object or armature debug(40,'Removing constraints from '+ob.getName()) @@ -605,37 +602,27 @@ def bakeObject(ob): #bakes the core object locrot and assigns the Ipo to a Clone if ob != None: # Clone the object - duplicate it, clean the clone, and create an ipo curve for the clone myob = duplicateLinked(ob) #clone it + myob.name= usrObjectNamePrefix + ob.getName() removeConstraintsOb(myob) #my object is a free man deLinkOb('Ipo',myob) #kids, it's not nice to share. you've been lied to - if usrBAKEobjIPO: + if ob.getType() != ARMATURE: # baking armatures is based on bones, not object myipo = createIpo(myob) #create own IPO and curves for the clone object ipos = bakeFrames(ob,myipo) #bake the locrot for this obj for the scene frames - -# staframe,endframe,curframe = getRenderInfo() -# frame = staframe -# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects -# frame +=1 -# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects -# frame -=1 -# Blender.Set(CURFRAME,frame) # computes the constrained location of the 'real' objects -# if not BATCH: Blender.Redraw() -# return myob - + ######################################## -def bake(ob): #bakes an object of any type - - debug(30,'Baking %s object %s' % (ob.getType(), ob)) - - myob = bakeObject(ob) #creates and bakes the object motion - +def bake(ob,par): #bakes an object of any type, linking it to parent + debug(0,'Baking %s object %s' % (ob.getType(), ob)) + clone = bakeObject(ob) #creates and bakes the object motion + if par!= None: + par.makeParent([clone]) + debug(20,"assigned object to parent %s" % par) if ob.getType() == ARMATURE: -# error('Object baked. Continue with bones?') - bakeBones(ob,myob) #go into the bones and copy from -> to in frame range +## error('Object baked. Continue with bones?') + bakeBones(ob,clone) #go into the bones and copy from -> to in frame range #future idea: bakeMesh (net result of Shapekeys, Softbody, Cloth, Fluidsim,...) - - return - + return clone + ######################################## def tstCreateArm(): #create a test armature in scene # rip-off from http://www.blender.org/documentation/245PythonDoc/Pose-module.html - thank you! @@ -690,8 +677,8 @@ def tstCreateArm(): #create a test armature in scene frame = 1 for pbone in pbones: # set bones to no rotation - pbone.quat[:] = 1.000,0.000,0.000,0.0000 - pbone.insertKey(arm_ob, frame, Object.Pose.ROT) + pbone.quat[:] = 1.000,0.000,0.000,0.0000 + pbone.insertKey(arm_ob, frame, Object.Pose.ROT) # Set a different rotation at frame 25 pbones[0].quat[:] = 1.000,0.1000,0.2000,0.20000 @@ -747,7 +734,7 @@ def tstMoveOb(ob): # makes a simple LocRot animation of object in the scene debug(100,'%s %i %.3f %.2f %.2f %.2f %.2f %.2f %.2f' % (ipo.name, frame, time, key[0], key[1], key[2], key[3], key[4], key[5])) frame += frameDelta - Blender.Set('curframe',curframe) # reset back to where we started + Blender.Set(CURFRAME,curframe) # reset back to where we started return #================= # Program Template @@ -755,25 +742,31 @@ def tstMoveOb(ob): # makes a simple LocRot animation of object in the scene ######################################## def main(): # return code set via rt button in Blender Buttons Scene Context Anim panel - if MODE == 1: #create test armature #1 ob = tstCreateArm() # make test arm and select it tstMoveOb(ob) scn.objects.selected = [ob] - obs = Blender.Object.GetSelected() #scn.objects.selected - debug(20,'Baking %i objects' % len(obs)) + obs= Blender.Object.GetSelected() #scn.objects.selected + obs= sortObjects(obs) + debug(0,'Baking %i objects' % len(obs)) if len(obs) >= 1: # user might have multiple objects selected + i= 0 + clones=[] # my clone army for ob in obs: - bake(ob) + par= ob.getParent() + if not usrParent: + if par in obs: + par= clones[obs.index(par)] + clones.append(bake(ob,par)) + scn.objects.selected = clones else: error('Please select at least one object') return ######################################## def benchmark(): # This lets you benchmark (time) the script's running duration - Window.WaitCursor(1) t = sys.time() debug(60,'%s began at %.0f' %(__script__,sys.time())) @@ -787,7 +780,7 @@ def benchmark(): # This lets you benchmark (time) the script's running duration if in_editmode: Window.EditMode(1) # Timing the script is a good way to be aware on any speed hits when scripting - debug(60,'%s Script finished in %.2f seconds' % (__script__,sys.time()-t) ) + debug(0,'%s Script finished in %.2f seconds' % (__script__,sys.time()-t) ) Window.WaitCursor(0) return @@ -795,6 +788,5 @@ def benchmark(): # This lets you benchmark (time) the script's running duration # This lets you can import the script without running it if __name__ == '__main__': debug(0, "------------------------------------") - debug(0, '%s %s Script begins with mode=%i debug=%i batch=%s version=%i' % (__script__,__version__,MODE,DEBUG,BATCH,BLENDER_VERSION)) - + debug(0, "%s %s Script begins with mode=%i debug=%i batch=%s" % (__script__,__version__,MODE,DEBUG,BATCH)) benchmark() diff --git a/release/scripts/c3d_import.py b/release/scripts/c3d_import.py index d67d56261d1..ca4f8cd79e9 100644 --- a/release/scripts/c3d_import.py +++ b/release/scripts/c3d_import.py @@ -8,7 +8,7 @@ Tooltip: 'Import a C3D Motion Capture file' """ __script__ = "C3D Motion Capture file import" __author__ = " Jean-Baptiste PERIN, Roger D. Wickes (rogerwickes@yahoo.com)" -__version__ = "0.8" +__version__ = "0.9" __url__ = ["Communicate problems and errors, BlenderArtists.org, Python forum"] __email__= ["rogerwickes@yahoo.com", "c3d script"] __bpydoc__ = """\ @@ -16,9 +16,9 @@ c3d_import.py v0.8 Script loading Graphics Lab Motion Capture file, Usage:
    - - Run the script
    - - Choose the file to open
    - - Press Import C3D button
    + - Run the script
    + - Choose the file to open
    + - Press Import C3D button
    Version History: 0.4: PERIN Released under Blender Artistic Licence @@ -26,6 +26,7 @@ Version History: 0.6: WICKES creates armature for each subject 0.7: WICKES constrains armature to follow the empties (markers). Verified for shake hands s 0.8: WICKES resolved DEC support issue + 0.9: BARTON removed scene name change, whitespace edits. WICKES added IK layers """ #---------------------------------------------- @@ -69,12 +70,12 @@ XYZ_LIMIT= 10000 #max value for coordinates if in integer format # selecting only layer 2 shows only the armature moving, 12 shows only the empties LAYERS_ARMOB= [1,2] LAYERS_MARKER=[1,12] +LAYERS_IK=[1,11] +IK_PREFIX="ik_" # prefix in empty name: ik_prefix+subject prefix+bone name + CLEAN=True # Should program ignore markers at (0,0,0) and beyond the outer limits? scn = Blender.Scene.GetCurrent() -# Why on earth would you rename a scene when importing data??? - Campbell -# scn.name="MoCap" #may want this enterable or derived based on motion being analyzed -#TODO: ultimately, a library of motions to append from means you need good naming of things BCS=Blender.Constraint.Settings # shorthand dictionary - define with brace, reference with bracket trackto={"+x":BCS.TRACKX, "+y":BCS.TRACKY, "+z":BCS.TRACKZ, "-x":BCS.TRACKNEGX, "-y":BCS.TRACKNEGY, "-z":BCS.TRACKNEGZ} @@ -169,22 +170,21 @@ def getEmpty(name): # in : objname : le nom de l'empty recherche # out : myobj : l'empty cree ou retrouve ######### -def GetOrCreateEmpty(objname): +def getOrCreateEmpty(objname): myobj= getEmpty(objname) if myobj==None: myobj = scn.objects.new("Empty",objname) - myobj.layers= LAYERS_MARKER debug(50,'Marker/Empty created %s' % myobj) return myobj -def GetOrCreateCurve(ipo, curvename): +def getOrCreateCurve(ipo, curvename): """ Retrieve or create a Blender Ipo Curve named C{curvename} in the C{ipo} Ipo >>> import mylib >>> lIpo = GetOrCreateIPO("Une IPO") - >>> laCurve = GetOrCreateCurve(lIpo, "RotX") + >>> laCurve = getOrCreateCurve(lIpo, "RotX") Either an ipo curve named C{curvename} exists before the call then this curve is returned, Or such a curve doesn't exist before the call .. then it is created into the c{ipo} Ipo and returned @@ -338,7 +338,8 @@ def makeNodes(prefix, markerList, empties, marker_set): #make sure the file has elif usrOption==1: #add these markers as static empties, and user will automate them later #and the bones will be keyed to them, so it will all be good. #file may have just mis-named the empty, or the location can be derived based on other markers - em= GetOrCreateEmpty(err[2]) + em= getOrCreateEmpty(err[2]) + em.layers= LAYERS_MARKER else: abort() #abend if DEBUG==100: status("Nodes Updated") return nodes #nodes may be updated @@ -411,8 +412,9 @@ def makeConstIK(prefix,pbone,const): #Blender 246 only supports one IK Solver per bone, but we might want many, # so we need to create a reference empty named after the bone # that floats between the markers, so the bone can point to it as a singularity - myob= GetOrCreateEmpty(prefix+pbone.name) - # note that this empty gets all the IK constraints added on + myob= getOrCreateEmpty(IK_PREFIX+prefix+pbone.name) + myob.layers= LAYERS_IK + # note that this empty gets all the IK constraints added on as location constraints myconst= myob.constraints.append(Constraint.Type.COPYLOC) myconst.name=const[0]+"-"+const[1] myconst[Constraint.Settings.TARGET]= Blender.Object.Get(const[1]) @@ -438,15 +440,18 @@ def makeConstTT(pbone,const): myconst= pbone.constraints.append(Constraint.Type.TRACKTO) myconst.name=const[0]+"-"+const[1] debug(70,"%s %s" % (myconst,const[3])) - myob= GetOrCreateEmpty(const[1]) - myconst[BCS.TARGET]= myob - myconst.influence = const[2] - #const[3] is the Track and the thrird char is the Up indicator - myconst[BCS.TRACK]= trackto[const[3][0:2].lower()] - myconst[BCS.UP]=trackup[const[3][2].lower()]#up direction - myconst[BCS.OWNERSPACE]= BCS.SPACE_LOCAL - myconst[BCS.TARGETSPACE]= [BCS.SPACE_LOCAL] - if const[3][1]==const[3][2]: debug(0,"WARNING: Track To axis and up axis should not be the same. Constraint is INACTIVE") + myob= getEmpty(const[1]) + if myob!= None: + myconst[BCS.TARGET]= myob + myconst.influence = const[2] + #const[3] is the Track and the thrird char is the Up indicator + myconst[BCS.TRACK]= trackto[const[3][0:2].lower()] + myconst[BCS.UP]=trackup[const[3][2].lower()]#up direction + myconst[BCS.OWNERSPACE]= BCS.SPACE_LOCAL + myconst[BCS.TARGETSPACE]= [BCS.SPACE_LOCAL] + if const[3][1]==const[3][2]: debug(0,"WARNING: Track To axis and up axis should not be the same. Constraint is INACTIVE") + else: #marker not found. could be missing from this file, or an error in node spec + error("TrackTo Constraint for %s |specifies unknown marker %s" % (pbone.name,const[1])) return def makePoses(prefix,arm_ob,nodes): # pose this armature object based on node requirements @@ -543,15 +548,16 @@ def makeCloud(Nmarkers,markerList,StartFrame,EndFrame,Markers): for i in range(Nmarkers): debug(100,"%i marker %s"%(i, markerList[i])) emptyname = markerList[i] # rdw: to use meaningful names from Points parameter - em= GetOrCreateEmpty(emptyname) #in this scene + em= getOrCreateEmpty(emptyname) #in this scene + em.layers= LAYERS_MARKER #make a list of the actual empty empties.append(em) #assign it an ipo with the loc xyz curves lipo = Ipo.New("Object",em.name) ipos.append(lipo) - curvesX.append(GetOrCreateCurve(ipos[i],'LocX')) - curvesY.append(GetOrCreateCurve(ipos[i],'LocY')) - curvesZ.append(GetOrCreateCurve(ipos[i],'LocZ')) + curvesX.append(getOrCreateCurve(ipos[i],'LocX')) + curvesY.append(getOrCreateCurve(ipos[i],'LocY')) + curvesZ.append(getOrCreateCurve(ipos[i],'LocZ')) empties[i].setIpo(ipos[i]) debug(30,"Cloud of %i empties created." % len(empties)) NvideoFrames= EndFrame-StartFrame+1 From 79f858b7958681e3d1fb6a827fdf26a737abfbdd Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 6 Jul 2008 09:21:39 +0000 Subject: [PATCH 343/430] Bugfix #17139 When "image type" is a movie, image file saving falls back to jpg as a default. The code checking extensions didn't correctly include quicktime. --- source/blender/blenkernel/intern/image.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c73279746fb..f16269aa50c 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -848,10 +848,6 @@ void BKE_add_image_extension(char *string, int imtype) if(!BLI_testextensie(string, ".tga")) extension= ".tga"; } - else if(ELEM5(imtype, R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90)) { - if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg"))) - extension= ".jpg"; - } else if(imtype==R_BMP) { if(!BLI_testextensie(string, ".bmp")) extension= ".bmp"; @@ -874,10 +870,14 @@ void BKE_add_image_extension(char *string, int imtype) if (!BLI_testextensie(string, ".dpx")) extension= ".dpx"; } - else { /* targa default */ + else if(imtype==R_TARGA) { if(!BLI_testextensie(string, ".tga")) extension= ".tga"; } + else { // R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc + if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg"))) + extension= ".jpg"; + } strcat(string, extension); } From 37205596dab7685da29b9a7b91b1b29f9361c419 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 6 Jul 2008 11:25:58 +0000 Subject: [PATCH 344/430] #16675: Object name doesn't get updated in 3D viewports if it is changed via Buttons Window --- source/blender/src/headerbuttons.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 81ad135f514..1a91ada1562 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -1628,6 +1628,7 @@ void do_global_buttons(unsigned short event) allqueue(REDRAWOOPS, 1); allqueue(REDRAWACTION, 1); allqueue(REDRAWNLA, 1); + allqueue(REDRAWVIEW3D, 1); /* name scene also in set PUPmenu */ allqueue(REDRAWBUTSALL, 0); allqueue(REDRAWIMAGE, 0); From 1df2701fd78232b9f463531f1c707643d14de6cd Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 6 Jul 2008 13:52:17 +0000 Subject: [PATCH 345/430] Bugfix #16669 The Image "do premul" option didn't work when Image was of type Sequence. (Note: this option converts key-alpha images to premul, as is standard in Blender rendering) --- source/blender/blenkernel/intern/image.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index f16269aa50c..b6c8ad59e08 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1512,6 +1512,10 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame) image_initialize_after_load(ima, ibuf); image_assign_ibuf(ima, ibuf, 0, frame); #endif + + if(ima->flag & IMA_DO_PREMUL) + converttopremul(ibuf); + } else ima->ok= 0; From 8a729824f454bfee6c66db1db0411ecc5fd4ad38 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 6 Jul 2008 14:11:30 +0000 Subject: [PATCH 346/430] GameObject rayCast and rayCastTo were not setting exception strings (causes return without exception set error) Also made game state buttons only have a dot in states that have controllers in them. --- source/blender/src/buttons_logic.c | 7 +++++-- source/gameengine/Ketsji/KX_GameObject.cpp | 12 +++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index cb09f947f3c..1a9e1030688 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -3126,6 +3126,8 @@ void logic_buts(void) ob= OBACT; for(a=0; alinks[iact]; act->flag |= ACT_LINKED; } + controller_state_mask |= cont->state_mask; cont = cont->next; } @@ -3164,11 +3167,11 @@ void logic_buts(void) for (offset=0; offset<15; offset+=5) { uiBlockBeginAlign(block); for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); + but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } } diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 507cedcd5d3..bde5e2cd0a2 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1506,8 +1506,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo, { KX_GameObject *other; PyErr_Clear(); - if (!PyType_IsSubtype(pyarg->ob_type, &KX_GameObject::Type)) + if (!PyType_IsSubtype(pyarg->ob_type, &KX_GameObject::Type)) { + PyErr_SetString(PyExc_TypeError, "the first argument to rayCastTo must be a vector or a KX_GameObject"); return NULL; + } other = static_cast(pyarg); toPoint = other->NodeGetWorldPosition(); } @@ -1567,8 +1569,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, if (!PyVecTo(pyto, toPoint)) { PyErr_Clear(); - if (!PyType_IsSubtype(pyto->ob_type, &KX_GameObject::Type)) + if (!PyType_IsSubtype(pyto->ob_type, &KX_GameObject::Type)) { + PyErr_SetString(PyExc_TypeError, "the first argument to rayCast must be a vector or a KX_GameObject"); return NULL; + } other = static_cast(pyto); toPoint = other->NodeGetWorldPosition(); } @@ -1579,8 +1583,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, else if (!PyVecTo(pyfrom, fromPoint)) { PyErr_Clear(); - if (!PyType_IsSubtype(pyfrom->ob_type, &KX_GameObject::Type)) + if (!PyType_IsSubtype(pyfrom->ob_type, &KX_GameObject::Type)) { + PyErr_SetString(PyExc_TypeError, "the second optional argument to rayCast must be a vector or a KX_GameObject"); return NULL; + } other = static_cast(pyfrom); fromPoint = other->NodeGetWorldPosition(); } From a06a4663c4df9094acf5ab01e7407f379b137b51 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 6 Jul 2008 15:38:51 +0000 Subject: [PATCH 347/430] === Transform Snap === Bugfix face snapping in edit mesh didn't test for selection properly --- source/blender/src/transform_snap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index d16308f17ae..3c17d0c1da8 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -814,7 +814,7 @@ int snapDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta { efa = EM_get_face_for_index(index); - if (efa && efa->f & SELECT) + if (efa && ((efa->v1->f & SELECT) || (efa->v2->f & SELECT) || (efa->v3->f & SELECT) || (efa->v4 && efa->v4->f & SELECT))) { test = 0; } From dd5148e265ac519776da5df78c6186eaefc7e7b8 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 6 Jul 2008 22:52:55 +0000 Subject: [PATCH 348/430] Fix for bug: [#14570] particle system: grid distribution + vertex emitting bug - grid distribution didn't check for emission from vertices --- source/blender/blenkernel/intern/particle.c | 2 +- source/blender/blenkernel/intern/particle_system.c | 10 +++++----- source/blender/src/buttons_object.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 18fca5439ef..24a3d348ae7 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1371,7 +1371,7 @@ void psys_particle_on_shape(int distr, int index, float *fuv, float *vec, float /************************************************/ void psys_particle_on_emitter(Object *ob, ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor){ if(psmd){ - if(psmd->psys->part->distr==PART_DISTR_GRID){ + if(psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT){ if(vec){ VECCOPY(vec,fuv); } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 458171cc232..f70648965f4 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -168,7 +168,7 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart) int i, totpart, totsaved = 0; if(new_totpart<0) { - if(psys->part->distr==PART_DISTR_GRID) { + if(psys->part->distr==PART_DISTR_GRID && psys->part->from != PART_FROM_VERT) { totpart= psys->part->grid_res; totpart*=totpart*totpart; } @@ -1056,7 +1056,7 @@ int psys_threads_init_distribution(ParticleThread *threads, DerivedMesh *finaldm dm= CDDM_from_mesh((Mesh*)ob->data, ob); /* special handling of grid distribution */ - if(part->distr==PART_DISTR_GRID){ + if(part->distr==PART_DISTR_GRID && from != PART_FROM_VERT){ distribute_particles_in_grid(dm,psys); dm->release(dm); return 0; @@ -1600,7 +1600,7 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps NormalQuat(pa->r_rot); - if(part->distr!=PART_DISTR_GRID){ + if(part->distr!=PART_DISTR_GRID && part->from != PART_FROM_VERT){ /* any unique random number will do (r_ave[0]) */ if(ptex.exist < 0.5*(1.0+pa->r_ave[0])) pa->flag |= PARS_UNEXIST; @@ -4515,7 +4515,7 @@ void psys_changed_type(ParticleSystem *psys) if(part->from == PART_FROM_PARTICLE) { if(part->type != PART_REACTOR) part->from = PART_FROM_FACE; - if(part->distr == PART_DISTR_GRID) + if(part->distr == PART_DISTR_GRID && part->from != PART_FROM_VERT) part->distr = PART_DISTR_JIT; } @@ -4710,7 +4710,7 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier oldtotpart = psys->totpart; oldtotchild = psys->totchild; - if(part->distr == PART_DISTR_GRID) + if(part->distr == PART_DISTR_GRID && part->from != PART_FROM_VERT) totpart = part->grid_res*part->grid_res*part->grid_res; else totpart = psys->part->totpart; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index ba409723784..ebe770c89e7 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -4812,7 +4812,7 @@ static void object_panel_particle_system(Object *ob) uiDefBut(block, LABEL, 0, "Basic:", butx,(buty-=buth),butw,buth, NULL, 0.0, 0, 0, 0, ""); uiBlockBeginAlign(block); - if(part->distr==PART_DISTR_GRID) + if(part->distr==PART_DISTR_GRID && part->from != PART_FROM_VERT) uiDefButI(block, NUM, B_PART_ALLOC, "Resol:", butx,(buty-=buth),butw,buth, &part->grid_res, 1.0, 100.0, 0, 0, "The resolution of the particle grid"); else uiDefButI(block, NUM, B_PART_ALLOC, "Amount:", butx,(buty-=buth),butw,buth, &part->totpart, 0.0, 100000.0, 0, 0, "The total number of particles"); From 707301ad1b502fbbb552ae8827402f2d67ba881e Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 7 Jul 2008 00:54:32 +0000 Subject: [PATCH 349/430] Little tweak to timeline_force_draw, so that button windows are updated properly --- source/blender/src/edittime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index 5a10ea65738..2c37a0eb20f 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -803,11 +803,11 @@ static void timeline_force_draw(short val) if(sa->spacetype==SPACE_VIEW3D) { if(sa==samin || (val & TIME_ALL_3D_WIN)) dodraw= 1; } - else if(ELEM6(sa->spacetype, SPACE_NLA, SPACE_IPO, SPACE_SEQ, SPACE_BUTS, SPACE_ACTION, SPACE_SOUND)) { + else if(ELEM5(sa->spacetype, SPACE_NLA, SPACE_IPO, SPACE_SEQ, SPACE_ACTION, SPACE_SOUND)) { if(val & TIME_ALL_ANIM_WIN) dodraw= 1; } else if(sa->spacetype==SPACE_BUTS) { - if(val & TIME_ALL_BUTS_WIN) dodraw= 1; + if(val & TIME_ALL_BUTS_WIN) dodraw= 2; } else if(sa->spacetype==SPACE_IMAGE) { if (val & TIME_ALL_IMAGE_WIN) dodraw = 1; From 32cefbdecfc4867dfca813e304a6184987115013 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 7 Jul 2008 01:56:47 +0000 Subject: [PATCH 350/430] Derived Mesh Bugfix EditMesh MEdge vertex index were doubled incremented, so more or less always wrong (even worse, could read outside of array). --- source/blender/blenkernel/intern/DerivedMesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 30405660658..4d3f9143b85 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1052,7 +1052,7 @@ void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r) /* store vertex indices in tmp union */ for(ev = em->verts.first, i = 0; ev; ev = ev->next, ++i) - ev->tmp.l = (long) i++; + ev->tmp.l = (long) i; for( ; ee; ee = ee->next, ++edge_r) { edge_r->crease = (unsigned char) (ee->crease*255.0f); From 0456a71eddb53a60ffe127c4d6870ce46374264c Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Mon, 7 Jul 2008 02:02:10 +0000 Subject: [PATCH 351/430] * New UV editor selection mode: Island This goes alongside vertex and face selection and selects an entire UV island with a single click. It's a lot less painful to use when rearranging UV layouts, especially with Drag Immediately on - see: http://mke3.net/blender/etc/uv_island.mov --- source/blender/makesdna/DNA_space_types.h | 11 +++++++++-- source/blender/src/drawimage.c | 2 +- source/blender/src/editsima.c | 16 ++++++++++++---- source/blender/src/header_image.c | 23 +++++++++++++---------- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index af60f9ca713..bc30a12ff27 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -232,8 +232,9 @@ typedef struct SpaceImage { short imanr; short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ int flag; + short selectmode; short imtypenr, lock; - short pin, pad2; + short pin; float zoom; char dt_uv; /* UV draw type */ char sticky; /* sticky selection type */ @@ -496,6 +497,12 @@ typedef struct SpaceImaSel { #define SI_STICKY_DISABLE 1 #define SI_STICKY_VERTEX 2 +/* SpaceImage->selectmode */ +#define SI_SELECT_VERTEX 0 +#define SI_SELECT_EDGE 1 /* not implemented */ +#define SI_SELECT_FACE 2 +#define SI_SELECT_ISLAND 3 + /* SpaceImage->flag */ #define SI_BE_SQUARE 1<<0 #define SI_EDITTILE 1<<1 @@ -503,7 +510,7 @@ typedef struct SpaceImaSel { #define SI_DRAWTOOL 1<<3 #define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */ #define SI_DRAWSHADOW 1<<5 -#define SI_SELACTFACE 1<<6 +#define SI_SELACTFACE 1<<6 /* deprecated */ #define SI_DEPRECATED2 1<<7 #define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */ #define SI_COORDFLOATS 1<<9 diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 547de85e856..14849cdd450 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -422,7 +422,7 @@ int draw_uvs_face_check(void) return 1; } } else { - if (G.sima->flag & SI_SELACTFACE) { + if (G.sima->selectmode == SI_SELECT_FACE) { return 1; } } diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 18a9803dcae..7c2edc3e236 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -694,7 +694,7 @@ void mouse_select_sima(void) EditFace *efa; MTFace *tf, *nearesttf; EditFace *nearestefa=NULL; - int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift; + int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island; char sticky= 0; int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ unsigned int hitv[4], nearestv; @@ -706,7 +706,7 @@ void mouse_select_sima(void) edgeloop= G.qual & LR_ALTKEY; shift= G.qual & LR_SHIFTKEY; - + if (G.sima->flag & SI_SYNC_UVSEL) { /* copy from mesh */ if (G.scene->selectmode == SCE_SELECT_FACE) { @@ -718,7 +718,8 @@ void mouse_select_sima(void) } } else { /* normal operation */ - actface= G.sima->flag & SI_SELACTFACE; + actface= G.sima->selectmode == SI_SELECT_FACE; + island= G.sima->selectmode == SI_SELECT_ISLAND; switch(G.sima->sticky) { case SI_STICKY_LOC: @@ -760,6 +761,9 @@ void mouse_select_sima(void) if (nearestefa->v4) hitv[3]= nearestefa->v4->tmp.l; else hitv[3]= 0xFFFFFFFF; + } + else if (island) { + } else { find_nearest_uv(&nearesttf, &nearestefa, &nearestv, &nearestuv); @@ -774,7 +778,11 @@ void mouse_select_sima(void) } } - if(!edgeloop && shift) { + if (island) { + if(shift) select_linked_tface_uv(1); + else select_linked_tface_uv(0); + } + else if(!edgeloop && shift) { /* (de)select face */ if(actface) { if(simaFaceSel_Check(nearestefa, nearesttf)) { diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c index 7ac57cb839b..fac9e3af1af 100644 --- a/source/blender/src/header_image.c +++ b/source/blender/src/header_image.c @@ -1214,28 +1214,31 @@ void image_buttons(void) uiBlockBeginAlign(block); /* B_SEL_VERT & B_SEL_FACE are not defined here which is a bit bad, BUT it works even if image editor is fullscreen */ - uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)"); - xco+= XIC; + uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, + xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)"); /* no edge */ /*uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode (Ctrl Tab 2)"); xco+= XIC; */ - uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)"); - xco+= XIC+8; + uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, + xco+=XIC,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)"); uiBlockEndAlign(block); } else { uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, SI_SELACTFACE, B_REDR, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.sima->flag, 1.0, 0.0, 0, 0, "UV Vertex select mode"); - xco+= XIC; - uiDefIconButBitI(block, TOG, SI_SELACTFACE, B_REDR, ICON_FACESEL, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "UV Face select mode"); - xco+= XIC+8; - uiBlockEndAlign(block); + uiDefIconButS(block, ROW, B_REDR, ICON_VERTEXSEL, + xco,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_VERTEX, 0, 0, "UV vertex select mode"); + uiDefIconButS(block, ROW, B_REDR, ICON_FACESEL, + xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_FACE, 0, 0, "UV Face select mode"); + uiDefIconButS(block, ROW, B_REDR, ICON_MESH, + xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_ISLAND, 0, 0, "UV Island select mode"); + uiBlockEndAlign(block); + /* would use these if const's could go in strings * SI_STICKY_LOC SI_STICKY_DISABLE SI_STICKY_VERTEX */ ubut = uiDefIconTextButC(block, ICONTEXTROW, B_REDR, ICON_STICKY_UVS_LOC, "Sticky UV Selection: %t|Disable%x1|Shared Location%x0|Shared Vertex%x2", - xco,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0, + xco+=XIC+10,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0, "Sticky UV Selection (Hotkeys: Shift C, Alt C, Ctrl C)"); } From 17dc66c1d1e9ac276e7e5bc772d23caf83e7a2d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Jul 2008 04:17:03 +0000 Subject: [PATCH 352/430] [#17288] Sequencer API: added a method, a geter/setter, the blend modes dict and corrected a malfunction on audio strips blend mode from Luca Bonavita (mindrones) - adds the method "rebuildProxy()" useful to rebuild all the strips at once: the user can do - adds a BlendModes dictionary under the Blender.Scene.Sequence module: the user can see the blending option with - adds the getter/setter "blendMode" - adds a function seq_can_blend in sequence.c as requested by Peter, useful for these purposes but also to solve a bug after - the bug is you can apply blend modes to an audio strip that doesn't make sense: changed the test and now you cannot assign blend mode other than Replace to audio strips Omitted DNA cleanup part since its only whitespace and Id prefer to have a useful "svn blame" output. --- source/blender/include/BSE_sequence.h | 2 + source/blender/python/api2_2x/sceneSequence.c | 74 ++++++++++++++++++- source/blender/src/buttons_scene.c | 2 +- source/blender/src/sequence.c | 10 +++ 4 files changed, 84 insertions(+), 4 deletions(-) diff --git a/source/blender/include/BSE_sequence.h b/source/blender/include/BSE_sequence.h index 15a9218b735..0d96de7be60 100644 --- a/source/blender/include/BSE_sequence.h +++ b/source/blender/include/BSE_sequence.h @@ -92,6 +92,8 @@ void update_changed_seq_and_deps(struct Sequence *seq, int len_change, int ibuf_ struct RenderResult; void do_render_seq(struct RenderResult *rr, int cfra); +int seq_can_blend(struct Sequence *seq); + #define SEQ_HAS_PATH(seq) (seq->type==SEQ_MOVIE || seq->type==SEQ_HD_SOUND || seq->type==SEQ_RAM_SOUND || seq->type==SEQ_IMAGE) #endif diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c index 56821980cd2..0d3ad3fcb44 100644 --- a/source/blender/python/api2_2x/sceneSequence.c +++ b/source/blender/python/api2_2x/sceneSequence.c @@ -81,6 +81,7 @@ returns None if notfound.\nIf 'name' is not specified, it returns a list of all static PyObject *Sequence_copy( BPy_Sequence * self ); static PyObject *Sequence_new( BPy_Sequence * self, PyObject * args ); static PyObject *Sequence_remove( BPy_Sequence * self, PyObject * args ); +static PyObject *Sequence_rebuildProxy( BPy_Sequence * self ); static PyObject *SceneSeq_new( BPy_SceneSeq * self, PyObject * args ); static PyObject *SceneSeq_remove( BPy_SceneSeq * self, PyObject * args ); @@ -96,6 +97,8 @@ static PyMethodDef BPy_Sequence_methods[] = { "() - Return a copy of the sequence containing the same objects."}, {"copy", ( PyCFunction ) Sequence_copy, METH_NOARGS, "() - Return a copy of the sequence containing the same objects."}, + {"rebuildProxy", ( PyCFunction ) Sequence_rebuildProxy, METH_VARARGS, + "() - Rebuild the active strip's Proxy."}, {NULL, NULL, 0, NULL} }; @@ -309,6 +312,7 @@ static PyObject *Sequence_copy( BPy_Sequence * self ) Py_RETURN_NONE; } + /*****************************************************************************/ /* PythonTypeObject callback function prototypes */ /*****************************************************************************/ @@ -383,8 +387,6 @@ static PyObject *SceneSeq_nextIter( BPy_Sequence * self ) } - - static PyObject *Sequence_getName( BPy_Sequence * self ) { return PyString_FromString( self->seq->name+2 ); @@ -403,11 +405,13 @@ static int Sequence_setName( BPy_Sequence * self, PyObject * value ) return 0; } + static PyObject *Sequence_getProxyDir( BPy_Sequence * self ) { return PyString_FromString( self->seq->strip->proxy ? self->seq->strip->proxy->dir : "" ); } + static int Sequence_setProxyDir( BPy_Sequence * self, PyObject * value ) { char *name = NULL; @@ -430,6 +434,14 @@ static int Sequence_setProxyDir( BPy_Sequence * self, PyObject * value ) } +static PyObject *Sequence_rebuildProxy( BPy_Sequence * self ) +{ + if (self->seq->strip->proxy) + seq_proxy_rebuild(self->seq); + Py_RETURN_NONE; +} + + static PyObject *Sequence_getSound( BPy_Sequence * self ) { if (self->seq->type == SEQ_RAM_SOUND && self->seq->sound) @@ -622,6 +634,54 @@ static int Sequence_setImages( BPy_Sequence * self, PyObject *value ) return 0; } +static PyObject *M_Sequence_BlendModesDict( void ) +{ + PyObject *M = PyConstant_New( ); + + if( M ) { + BPy_constant *d = ( BPy_constant * ) M; + PyConstant_Insert( d, "CROSS", PyInt_FromLong( SEQ_CROSS ) ); + PyConstant_Insert( d, "ADD", PyInt_FromLong( SEQ_ADD ) ); + PyConstant_Insert( d, "SUBTRACT", PyInt_FromLong( SEQ_SUB ) ); + PyConstant_Insert( d, "ALPHAOVER", PyInt_FromLong( SEQ_ALPHAOVER ) ); + PyConstant_Insert( d, "ALPHAUNDER", PyInt_FromLong( SEQ_ALPHAUNDER ) ); + PyConstant_Insert( d, "GAMMACROSS", PyInt_FromLong( SEQ_GAMCROSS ) ); + PyConstant_Insert( d, "MULTIPLY", PyInt_FromLong( SEQ_MUL ) ); + PyConstant_Insert( d, "OVERDROP", PyInt_FromLong( SEQ_OVERDROP ) ); + PyConstant_Insert( d, "PLUGIN", PyInt_FromLong( SEQ_PLUGIN ) ); + PyConstant_Insert( d, "WIPE", PyInt_FromLong( SEQ_WIPE ) ); + PyConstant_Insert( d, "GLOW", PyInt_FromLong( SEQ_GLOW ) ); + PyConstant_Insert( d, "TRANSFORM", PyInt_FromLong( SEQ_TRANSFORM ) ); + PyConstant_Insert( d, "COLOR", PyInt_FromLong( SEQ_COLOR ) ); + PyConstant_Insert( d, "SPEED", PyInt_FromLong( SEQ_SPEED ) ); + } + return M; +} + +static PyObject *Sequence_getBlendMode( BPy_Sequence * self ) +{ + return PyInt_FromLong( self->seq->blend_mode ); +} + +static int Sequence_setBlendMode( BPy_Sequence * self, PyObject * value ) +{ + struct Sequence *seq= self->seq; + int number = PyInt_AsLong( value ); + + if( number==-1 && PyErr_Occurred() ) + return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); + + if ( !seq_can_blend(seq) ) + return EXPP_ReturnIntError( PyExc_AttributeError, "this sequence type dosnt support blending" ); + + if (numberSEQ_EFFECT_MAX) + return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); + + seq->blend_mode=number; + + return 0; +} + /* * get floating point attributes */ @@ -836,7 +896,11 @@ static PyGetSetDef BPy_Sequence_getseters[] = { (getter)Sequence_getImages, (setter)Sequence_setImages, "Sequence scene", NULL}, - + {"blendMode", + (getter)Sequence_getBlendMode, (setter)Sequence_setBlendMode, + "Sequence Blend Mode", + NULL}, + {"type", (getter)getIntAttr, (setter)NULL, "", @@ -1131,6 +1195,7 @@ PyObject *M_Sequence_Get( PyObject * self, PyObject * args ) /*****************************************************************************/ PyObject *Sequence_Init( void ) { + PyObject *BlendModesDict = M_Sequence_BlendModesDict( ); PyObject *submodule; if( PyType_Ready( &Sequence_Type ) < 0 ) return NULL; @@ -1142,6 +1207,9 @@ PyObject *Sequence_Init( void ) "The Blender Sequence module\n\n\ This module provides access to **Sequence Data** in Blender.\n" ); + if( BlendModesDict ) + PyModule_AddObject( submodule, "BlendModes", BlendModesDict ); + /*Add SUBMODULES to the module*/ /*PyDict_SetItemString(dict, "Constraint", Constraint_Init()); //creates a *new* module*/ return submodule; diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 1c98950080a..af90d01fb59 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -499,7 +499,7 @@ static char* seq_panel_blend_modes() so that would collide also. */ - if (!(last_seq->type & SEQ_EFFECT)) { + if ( seq_can_blend(last_seq) ) { int i; for (i = SEQ_EFFECT; i <= SEQ_EFFECT_MAX; i++) { diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index 6851929bbc2..9426548dc38 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -2380,6 +2380,16 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown) return i; } +/* check used when we need to change seq->blend_mode but not to effect or audio strips */ +int seq_can_blend(Sequence *seq) +{ + if (ELEM4(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE)) { + return 1; + } else { + return 0; + } +} + /* threading api */ static ListBase running_threads; From e341586f9d4b2f7dec633217bf613a8b5e50f060 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Jul 2008 21:04:30 +0000 Subject: [PATCH 353/430] own mistake with drawing used state bits. Other minor changes and removed some warnings. --- source/blender/src/buttons_logic.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 1a9e1030688..616a5a227c4 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1560,7 +1560,6 @@ static void set_col_actuator(int item, int medium) static void change_object_actuator(void *act, void *arg) { bObjectActuator *oa = act; - int i; if (oa->type != oa->otype) { switch (oa->type) { @@ -1679,7 +1678,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-148, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, ""); uiDefBut(block, LABEL, 0, "damp", xco, yco-171, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); - uiDefButI(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); + uiDefButS(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); @@ -1816,11 +1815,11 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButI(block, NUM, 0, "Sta", xco+20, yco-44, (width-100)/2, 19, &ia->sta, 0.0, MAXFRAMEF, 0, 0, - "Start frame"); + "Start frame, (subtract 1 to match blenders frame numbers)"); uiDefButI(block, NUM, 0, "End", xco+18+(width-90)/2, yco-44, (width-100)/2, 19, &ia->end, 0.0, MAXFRAMEF, 0, 0, - "End frame"); + "End frame, (subtract 1 to match blenders frame numbers)"); uiDefButBitS(block, TOG, ACT_IPOFORCE, B_REDR, "Force", xco+width-78, yco-44, 43, 19, @@ -1967,7 +1966,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh glRects(xco, yco-ysize, xco+width, yco); uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Add this Object (cant be on an visible layer)"); + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Add this Object and all its children (cant be on an visible layer)"); uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the new Object lives"); wval= (width-60)/3; @@ -2248,7 +2247,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, 31.0, 0, 0, "Use this property to define the Group position"); } else { - uiDefButI(block, NUM, 0, "Sta", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame"); + uiDefButI(block, NUM, 0, "State", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame"); uiDefButI(block, NUM, 0, "End", xco+20+(width-40)/2, yco-44, (width-40)/2, 19, &ga->end, 0.0, 2500.0, 0, 0, "End frame"); } yco-= ysize; @@ -3171,7 +3170,7 @@ void logic_buts(void) uiButSetFunc(but, check_object_state, but, &(ob->state)); } for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset+15)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } } @@ -3255,7 +3254,7 @@ void logic_buts(void) uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+80, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+80+(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+80+2*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); - uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "Sta", xco+80+3*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states"); + uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "State", xco+80+3*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states"); uiBlockEndAlign(block); for(a=0; ascaflag, 0, 0, 0, 0, "Show all selected Objects"); uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); - uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "Sta", xco+110+3*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states"); + uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "State", xco+110+3*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states"); uiBlockEndAlign(block); for(a=0; a Date: Mon, 7 Jul 2008 22:11:11 +0000 Subject: [PATCH 354/430] patch from res2k to stop the blender window being upscaled on vista. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 82a76b3c706..293f8fc1661 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -302,6 +302,15 @@ GHOST_TSuccess GHOST_SystemWin32::init() { GHOST_TSuccess success = GHOST_System::init(); + /* Disable scaling on high DPI displays on Vista */ + HMODULE user32 = ::LoadLibraryA("user32.dll"); + typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)(); + LPFNSETPROCESSDPIAWARE SetProcessDPIAware = + (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware"); + if (SetProcessDPIAware) + SetProcessDPIAware(); + FreeLibrary(user32); + // Determine whether this system has a high frequency performance counter. */ m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE; if (m_hasPerformanceCounter) { From 3185253a066053ba0ece547e4f17adcc152ddb71 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Tue, 8 Jul 2008 02:22:37 +0000 Subject: [PATCH 355/430] -> UV and VCOL support for bevel (editmode) BMesh and the bevel code now support UVs/VCOLS. The offset is fixed at this time, but will be made dynamic later. --- source/blender/blenkernel/BKE_customdata.h | 5 + .../blenkernel/intern/BME_conversions.c | 137 ++++++++++++++++-- source/blender/blenkernel/intern/BME_eulers.c | 14 +- .../blender/blenkernel/intern/BME_structure.c | 1 - source/blender/blenkernel/intern/BME_tools.c | 82 ++++++++++- source/blender/blenkernel/intern/customdata.c | 117 ++++++++++++++- source/blender/blenlib/BLI_mempool.h | 4 +- source/blender/blenlib/intern/BLI_mempool.c | 13 +- 8 files changed, 339 insertions(+), 34 deletions(-) diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 81c2e4a4b94..12f68c771e0 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -41,6 +41,7 @@ extern const CustomDataMask CD_MASK_MESH; extern const CustomDataMask CD_MASK_EDITMESH; extern const CustomDataMask CD_MASK_DERIVEDMESH; extern const CustomDataMask CD_MASK_BMESH; +extern const CustomDataMask CD_MASK_FACECORNERS; /* for ORIGINDEX layer type, indicates no original index for this element */ #define ORIGINDEX_NONE -1 @@ -264,4 +265,8 @@ void CustomData_set_layer_unique_name(struct CustomData *data, int index); /* for file reading compatibility, returns false if the layer was freed, only after this test passes, layer->data should be assigned */ int CustomData_verify_versions(struct CustomData *data, int index); + +void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); +void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); +void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize); #endif diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 7952546de7c..f375ca62726 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -55,14 +55,104 @@ #include "bmesh_private.h" #include "BSE_edit.h" -/*Converts an EditMesh to a BME_Mesh.*/ -static void bmesh_init_cdPool(CustomData *data, int allocsize){ - if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize); + +static void BME_corners_to_loops(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_em_get_n(facedata, face_block, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texpoly->tpage = texface->tpage; + texpoly->flag = texface->flag; + texpoly->transp = texface->transp; + texpoly->mode = texface->mode; + texpoly->tile = texface->tile; + texpoly->unwrap = texface->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + mloopuv->uv[0] = texface->uv[j][0]; + mloopuv->uv[1] = texface->uv[j][1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_em_get_n(facedata, face_block, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mloopcol->r = mcol[j].r; + mloopcol->g = mcol[j].g; + mloopcol->b = mcol[j].b; + mloopcol->a = mcol[j].a; + j++; + l = l->next; + }while(l!=f->loopbase); + } } +static void BME_loops_to_corners(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_em_get_n(facedata, face_block, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texface->tpage = texpoly->tpage; + texface->flag = texpoly->flag; + texface->transp = texpoly->transp; + texface->mode = texpoly->mode; + texface->tile = texpoly->tile; + texface->unwrap = texpoly->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + texface->uv[j][0] = mloopuv->uv[0]; + texface->uv[j][1] = mloopuv->uv[1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_em_get_n(facedata, face_block, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mcol[j].r = mloopcol->r; + mcol[j].g = mloopcol->g; + mcol[j].b = mloopcol->b; + mcol[j].a = mloopcol->a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} +/*move the EditMesh conversion functions to editmesh_tools.c*/ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { BME_Mesh *bm; - int allocsize[4] = {512,512,2048,512}; + int allocsize[4] = {512,512,2048,512}, numTex, numCol; BME_Vert *v1, *v2; BME_Edge *e, *edar[4]; BME_Poly *f; @@ -74,8 +164,21 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { int len; bm = BME_make_mesh(allocsize); + /*copy custom data layout*/ CustomData_copy(&em->vdata, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0); - bmesh_init_cdPool(&bm->vdata, allocsize[0]); + CustomData_copy(&em->edata, &bm->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&em->fdata, &bm->pdata, CD_MASK_BMESH, CD_CALLOC, 0); + + /*copy face corner data*/ + CustomData_to_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata); + /*initialize memory pools*/ + CustomData_bmesh_init_pool(&bm->vdata, allocsize[0]); + CustomData_bmesh_init_pool(&bm->edata, allocsize[1]); + CustomData_bmesh_init_pool(&bm->ldata, allocsize[2]); + CustomData_bmesh_init_pool(&bm->pdata, allocsize[3]); + /*needed later*/ + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); BME_model_begin(bm); /*add verts*/ @@ -86,7 +189,6 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { v1->flag = eve->f; v1->h = eve->h; v1->bweight = eve->bweight; - /*Copy Custom Data*/ CustomData_bmesh_copy_data(&em->vdata, &bm->vdata, eve->data, &v1->data); eve->tmp.v = (EditVert*)v1; @@ -106,15 +208,10 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { if(eed->seam) e->flag |= ME_SEAM; if(eed->h & EM_FGON) e->flag |= ME_FGON; if(eed->h & 1) e->flag |= ME_HIDE; - - /* link the edges for face construction; - * kind of a dangerous thing - remember to cast back to BME_Edge before using! */ - /*Copy CustomData*/ - eed->tmp.e = (EditEdge*)e; + CustomData_bmesh_copy_data(&em->edata, &bm->edata, eed->data, &e->data); eed = eed->next; } - /*add faces.*/ efa= em->faces.first; while(efa) { @@ -143,12 +240,13 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { if(efa->f & 1) f->flag |= ME_FACE_SEL; else f->flag &= ~ME_FACE_SEL; } + CustomData_bmesh_copy_data(&em->fdata, &bm->pdata, efa->data, &f->data); + BME_corners_to_loops(bm, &em->fdata, efa->data, f,numCol,numTex); efa = efa->next; } BME_model_end(bm); return bm; } - /* adds the geometry in the bmesh to G.editMesh (does not free G.editMesh) * if td != NULL, the transdata will be mapped to the EditVert's co */ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { @@ -163,7 +261,7 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { EditEdge *eed; EditFace *efa; - int totvert, len, i; + int totvert, len, i, numTex, numCol; em = G.editMesh; @@ -171,6 +269,13 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { CustomData_copy(&bm->vdata, &em->vdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&bm->edata, &em->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&bm->pdata, &em->fdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_from_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata); + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + + /* convert to EditMesh */ /* make editverts */ totvert = BLI_countlist(&(bm->verts)); @@ -202,6 +307,8 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { if(e->flag & ME_HIDE) eed->h |= 1; if(G.scene->selectmode==SCE_SELECT_EDGE) EM_select_edge(eed, eed->f & SELECT); + + CustomData_em_copy_data(&bm->edata, &em->edata, e->data, &eed->data); } } @@ -228,6 +335,8 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { if(f->flag & ME_HIDE) efa->h= 1; if((G.f & G_FACESELECT) && (efa->f & SELECT)) EM_select_face(efa, 1); /* flush down */ + CustomData_em_copy_data(&bm->pdata, &em->fdata, f->data, &efa->data); + BME_loops_to_corners(bm, &em->fdata, efa->data, f,numCol,numTex); } } diff --git a/source/blender/blenkernel/intern/BME_eulers.c b/source/blender/blenkernel/intern/BME_eulers.c index 3403f5829fe..801e0b8bdec 100644 --- a/source/blender/blenkernel/intern/BME_eulers.c +++ b/source/blender/blenkernel/intern/BME_eulers.c @@ -39,6 +39,7 @@ #include "DNA_mesh_types.h" #include "BKE_utildefines.h" +#include "BKE_customdata.h" #include "BKE_bmesh.h" #include "BLI_blenlib.h" @@ -618,8 +619,8 @@ BME_Poly *BME_SFME(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Vert *v2, BME_Lo BME_disk_append_edge(e, v2); f2 = BME_addpolylist(bm,f); - f1loop = BME_create_loop(bm,v2,e,f,NULL); - f2loop = BME_create_loop(bm,v1,e,f2,NULL); + f1loop = BME_create_loop(bm,v2,e,f,v2loop); + f2loop = BME_create_loop(bm,v1,e,f2,v1loop); f1loop->prev = v2loop->prev; f2loop->prev = v1loop->prev; @@ -663,16 +664,16 @@ BME_Poly *BME_SFME(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Vert *v2, BME_Lo * Takes a an edge and pointer to one of its vertices and collapses * the edge on that vertex. * - * Before: OE KE + * Before: OE KE * ------- ------- * | || | - * OV KV TV + * OV KV TV * * * After: OE * --------------- * | | - * OV TV + * OV TV * * * Restrictions: @@ -723,6 +724,8 @@ int BME_JEKV(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv) /*remove ke from tv's disk cycle*/ BME_disk_remove_edge(ke, tv); + + /*deal with radial cycle of ke*/ if(ke->loop){ /*first step, fix the neighboring loops of all loops in ke's radial cycle*/ @@ -763,6 +766,7 @@ int BME_JEKV(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv) } + /*Validate disk cycles*/ diskbase = BME_disk_getpointer(ov->edge,ov); edok = BME_cycle_validate(valance1, diskbase); diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index 92ef9e3e03c..ca27f5efd10 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -41,7 +41,6 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" #include "BLI_ghash.h" - /** * MISC utility functions. * diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index 916e6bee59f..90259031e5c 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -215,10 +215,42 @@ static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, src[1]= v2->data; w[0] = 1.0f-fac; w[1] = fac; - CustomData_em_interp(&bm->vdata, src, w, NULL, 2, v->data); + CustomData_bmesh_interp(&bm->vdata, src, w, NULL, 2, v->data); } } + +static void BME_data_facevert_edgesplit(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, BME_Edge *e1, float fac){ + void *src[2]; + float w[2]; + BME_Loop *l=NULL, *v1loop = NULL, *vloop = NULL, *v2loop = NULL; + + w[0] = 1.0f - fac; + w[1] = fac; + + if(!e1->loop) return; + l = e1->loop; + do{ + if(l->v == v1){ + v1loop = l; + vloop = v1loop->next; + v2loop = vloop->next; + }else if(l->v == v){ + v1loop = l->next; + vloop = l; + v2loop = l->prev; + + } + + src[0] = v1loop->data; + src[1] = v2loop->data; + + CustomData_bmesh_interp(&bm->ldata, src,w, NULL, 2, vloop->data); + l = l->radial.next->data; + }while(l!=e1->loop); +} + + /* a wrapper for BME_SEMV that transfers element flags */ /*add custom data interpolation in here!*/ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge **ne, float percent) { BME_Vert *nv, *v2; @@ -238,9 +270,37 @@ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge (*ne)->crease = e->crease; (*ne)->bweight = e->bweight; } + /*v->nv->v2*/ + BME_data_facevert_edgesplit(bm,v2, v, nv, e, 0.75); return nv; } +static void BME_collapse_vert(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv, float fac){ + void *src[2]; + float w[2]; + BME_Loop *l=NULL, *kvloop=NULL, *tvloop=NULL; + BME_Vert *tv = BME_edge_getothervert(ke,kv); + + w[0] = 1.0f - fac; + w[1] = fac; + + if(ke->loop){ + l = ke->loop; + do{ + if(l->v == tv && l->next->v == kv){ + tvloop = l; + kvloop = l->next; + + src[0] = kvloop->data; + src[1] = tvloop->data; + CustomData_bmesh_interp(&bm->ldata, src,w, NULL, 2, kvloop->data); + } + l=l->radial.next->data; + }while(l!=ke->loop); + } + BME_JEKV(bm,ke,kv); +} + static int BME_bevel_is_split_vert(BME_Loop *l) { @@ -367,6 +427,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B ov = BME_edge_getothervert(e1,v); sv = BME_split_edge(bm,v,e1,&ne,0); //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ + //BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25); + //BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25); BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ @@ -408,6 +470,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B ov = BME_edge_getothervert(l->e,v); sv = BME_split_edge(bm,v,l->e,&ne,0); //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ + //BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25); + //BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25); BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ @@ -586,12 +650,15 @@ static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int opti if (kl->v == kv) { BME_split_face(bm,kl->f,kl->prev->v,kl->next->v,&nl,kl->prev->e); BME_JFKE(bm,((BME_Loop*)kl->prev->radial.next->data)->f,kl->f,kl->prev->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); + } else { BME_split_face(bm,kl->f,kl->next->next->v,kl->v,&nl,kl->next->e); BME_JFKE(bm,((BME_Loop*)kl->next->radial.next->data)->f,kl->f,kl->next->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } l = l->prev; } @@ -620,12 +687,14 @@ static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int opti if (kl->v == kv) { BME_split_face(bm,kl->f,kl->prev->v,kl->next->v,&nl,kl->prev->e); BME_JFKE(bm,((BME_Loop*)kl->prev->radial.next->data)->f,kl->f,kl->prev->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } else { BME_split_face(bm,kl->f,kl->next->next->v,kl->v,&nl,kl->next->e); BME_JFKE(bm,((BME_Loop*)kl->next->radial.next->data)->f,kl->f,kl->next->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } } @@ -1092,7 +1161,8 @@ static void bmesh_dissolve_disk(BME_Mesh *bm, BME_Vert *v){ e = BME_disk_nextedge(e,v); }while(e != v->edge); } - BME_JEKV(bm,v->edge,v); + BME_collapse_vert(bm, v->edge, v, 1.0); + //BME_JEKV(bm,v->edge,v); } } static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, int defgrp_index, BME_TransData_Head *td) { diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 4880a246e1c..d79dcb14f37 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -360,8 +360,80 @@ static void layerDefault_origspace_face(void *data, int count) } /* --------- */ +static void layerDefault_mloopcol(void *data, int count) +{ + static MLoopCol default_mloopcol = {255,255,255,255}; + MLoopCol *mlcol = (MLoopCol*)data; + int i; + for(i = 0; i < count; i++) + mlcol[i] = default_mloopcol; +} +static void layerInterp_mloopcol(void **sources, float *weights, + float *sub_weights, int count, void *dest) +{ + MLoopCol *mc = dest; + int i; + float *sub_weight; + struct { + float a; + float r; + float g; + float b; + } col; + col.a = col.r = col.g = col.b = 0; + + sub_weight = sub_weights; + for(i = 0; i < count; ++i){ + float weight = weights ? weights[i] : 1; + MLoopCol *src = sources[i]; + if(sub_weights){ + col.a += src->a * (*sub_weight) * weight; + col.r += src->r * (*sub_weight) * weight; + col.g += src->g * (*sub_weight) * weight; + col.b += src->b * (*sub_weight) * weight; + sub_weight++; + } else { + col.a += src->a * weight; + col.r += src->r * weight; + col.g += src->g * weight; + col.b += src->b * weight; + } + } + mc->a = (int)col.a; + mc->r = (int)col.r; + mc->g = (int)col.g; + mc->b = (int)col.b; +} +static void layerInterp_mloopuv(void **sources, float *weights, + float *sub_weights, int count, void *dest) +{ + MLoopUV *mluv = dest; + int i; + float *sub_weight; + struct { + float u; + float v; + }uv; + uv.u = uv.v = 0.0; + + sub_weight = sub_weights; + for(i = 0; i < count; ++i){ + float weight = weights ? weights[i] : 1; + MLoopUV *src = sources[i]; + if(sub_weights){ + uv.u += src->uv[0] * (*sub_weight) * weight; + uv.v += src->uv[1] * (*sub_weight) * weight; + sub_weight++; + } else { + uv.u += src->uv[0] * weight; + uv.v += src->uv[1] * weight; + } + } + mluv->uv[0] = uv.u; + mluv->uv[1] = uv.v; +} static void layerInterp_mcol(void **sources, float *weights, float *sub_weights, int count, void *dest) @@ -433,6 +505,8 @@ static void layerDefault_mcol(void *data, int count) mcol[i] = default_mcol; } + + const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { {sizeof(MVert), "MVert", 1, NULL, NULL, NULL, NULL, NULL, NULL}, {sizeof(MSticky), "MSticky", 1, NULL, NULL, NULL, layerInterp_msticky, NULL, @@ -457,8 +531,8 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face}, {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}, {sizeof(MTexPoly), "MTexPoly", 1, "Face Texture", NULL, NULL, NULL, NULL, NULL}, - {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, NULL, NULL, NULL}, - {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, NULL, NULL, NULL} + {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, layerInterp_mloopuv, NULL, NULL}, + {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, layerInterp_mloopcol, NULL, layerDefault_mloopcol} }; const char *LAYERTYPENAMES[CD_NUMTYPES] = { @@ -480,7 +554,11 @@ const CustomDataMask CD_MASK_DERIVEDMESH = CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO; const CustomDataMask CD_MASK_BMESH = - CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL; + CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR; +const CustomDataMask CD_MASK_FACECORNERS = + CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV | + CD_MASK_MLOOPCOL; + static const LayerTypeInfo *layerType_getInfo(int type) { @@ -1456,6 +1534,36 @@ void CustomData_from_em_block(const CustomData *source, CustomData *dest, } /*Bmesh functions*/ + +void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata) +{ + int i; + for(i=0; i < fdata->totlayer; i++){ + if(fdata->layers[i].type == CD_MTFACE){ + CustomData_add_layer(pdata, CD_MTEXPOLY, CD_CALLOC, &(fdata->layers[i].name), 0); + CustomData_add_layer(ldata, CD_MLOOPUV, CD_CALLOC, &(fdata->layers[i].name), 0); + } + else if(fdata->layers[i].type == CD_MCOL) + CustomData_add_layer(ldata, CD_MLOOPCOL, CD_CALLOC, &(fdata->layers[i].name), 0); + } +} +void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata){ + int i; + for(i=0; i < pdata->totlayer; i++){ + if(pdata->layers[i].type == CD_MTEXPOLY) + CustomData_add_layer(fdata, CD_MTFACE, CD_CALLOC, &(pdata->layers[i].name), 0); + } + for(i=0; i < ldata->totlayer; i++){ + if(ldata->layers[i].type == CD_MLOOPCOL) + CustomData_add_layer(fdata, CD_MCOL, CD_CALLOC, &(ldata->layers[i].name), 0); + } +} + + +void CustomData_bmesh_init_pool(CustomData *data, int allocsize){ + if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize); +} + void CustomData_bmesh_free_block(CustomData *data, void **block) { const LayerTypeInfo *typeInfo; @@ -1484,7 +1592,7 @@ static void CustomData_bmesh_alloc_block(CustomData *data, void **block) CustomData_bmesh_free_block(data, block); if (data->totsize > 0) - *block = BLI_mempool_alloc(data->pool); + *block = BLI_mempool_calloc(data->pool); else *block = NULL; } @@ -1601,7 +1709,6 @@ void CustomData_bmesh_interp(CustomData *data, void **src_blocks, float *weights for(i = 0; i < data->totlayer; ++i) { CustomDataLayer *layer = &data->layers[i]; const LayerTypeInfo *typeInfo = layerType_getInfo(layer->type); - if(typeInfo->interp) { for(j = 0; j < count; ++j) sources[j] = (char *)src_blocks[j] + layer->offset; diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index a706e5f3874..8b31459dd38 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -36,7 +36,9 @@ typedef struct BLI_mempool BLI_mempool; BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk); void *BLI_mempool_alloc(BLI_mempool *pool); +void *BLI_mempool_calloc(BLI_mempool *pool); void BLI_mempool_free(BLI_mempool *pool, void *addr); void BLI_mempool_destroy(BLI_mempool *pool); -#endif \ No newline at end of file + +#endif diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 7bbf0c4732e..7ac7b8b1791 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -89,7 +89,6 @@ BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk) curnode->next = NULL; return pool; } - void *BLI_mempool_alloc(BLI_mempool *pool){ void *retval=NULL; BLI_freenode *curnode=NULL; @@ -117,6 +116,16 @@ void *BLI_mempool_alloc(BLI_mempool *pool){ //memset(retval, 0, pool->esize); return retval; } + +void *BLI_mempool_calloc(BLI_mempool *pool){ + void *retval=NULL; + retval = BLI_mempool_alloc(pool); + memset(retval, 0, pool->esize); + return retval; +} + + + void BLI_mempool_free(BLI_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid! BLI_freenode *newhead = addr; newhead->next = pool->free; @@ -128,4 +137,4 @@ void BLI_mempool_destroy(BLI_mempool *pool) for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data); BLI_freelistN(&(pool->chunks)); MEM_freeN(pool); -} \ No newline at end of file +} From 22e87792f155b774399f66c512802a62c5751719 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 8 Jul 2008 07:06:42 +0000 Subject: [PATCH 356/430] == Select Swap for Armatures (Ctrl I) == It is now possible to swap the selection of bones in EditMode and PoseMode using the CTRL IKEY hotkey. As a result, the hotkey for adding IK Constraints has now changed to SHIFT IKEY (so that select swap can have a consistent hotkey) --- source/blender/src/editarmature.c | 51 ++++++++++++++++++++++-------- source/blender/src/header_view3d.c | 15 +++++++-- source/blender/src/space.c | 16 +++++++--- 3 files changed, 62 insertions(+), 20 deletions(-) diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 39f93510358..6310dd0a262 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -1646,8 +1646,9 @@ void load_editArmature(void) } /* toggle==0: deselect - toggle==1: swap + toggle==1: swap (based on test) toggle==2: only active tag + toggle==3: swap (no test) */ void deselectall_armature(int toggle, int doundo) { @@ -1670,18 +1671,30 @@ void deselectall_armature(int toggle, int doundo) else sel= toggle; /* Set the flags */ - for (eBone=G.edbo.first;eBone;eBone=eBone->next){ - if (sel==1) { + for (eBone=G.edbo.first;eBone;eBone=eBone->next) { + if (sel==3) { + /* invert selection of bone */ + if ((arm->layer & eBone->layer) && (eBone->flag & BONE_HIDDEN_A)==0) { + eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + eBone->flag &= ~BONE_ACTIVE; + } + } + else if (sel==1) { + /* select bone */ if(arm->layer & eBone->layer && (eBone->flag & BONE_HIDDEN_A)==0) { eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); if(eBone->parent) eBone->parent->flag |= (BONE_TIPSEL); } } - else if (sel==2) + else if (sel==2) { + /* clear active flag */ eBone->flag &= ~(BONE_ACTIVE); - else + } + else { + /* deselect bone */ eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL | BONE_ACTIVE); + } } allqueue(REDRAWVIEW3D, 0); @@ -3276,8 +3289,9 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits) } /* test==0: deselect all - test==1: swap select - test==2: only clear active tag + test==1: swap select (apply to all the opposite of current situation) + test==2: only clear active tag + test==3: swap select (no test / inverse selection status of all independently) */ void deselectall_posearmature (Object *ob, int test, int doundo) { @@ -3307,16 +3321,27 @@ void deselectall_posearmature (Object *ob, int test, int doundo) /* Set the flags accordingly */ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { - if (selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); - else if (selectmode==1) pchan->bone->flag |= BONE_SELECTED; - else pchan->bone->flag &= ~BONE_ACTIVE; + if (test==3) { + pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + pchan->bone->flag &= ~BONE_ACTIVE; + } + else { + if (selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); + else if (selectmode==1) pchan->bone->flag |= BONE_SELECTED; + else pchan->bone->flag &= ~BONE_ACTIVE; + } } } /* action editor */ - deselect_actionchannels(ob->action, 0); /* deselects for sure */ - if (selectmode == 1) - deselect_actionchannels(ob->action, 1); /* swaps */ + if (test == 3) { + deselect_actionchannels(ob->action, 2); /* inverts selection */ + } + else { + deselect_actionchannels(ob->action, 0); /* deselects for sure */ + if (selectmode == 1) + deselect_actionchannels(ob->action, 1); /* swaps */ + } allqueue(REDRAWBUTSEDIT, 0); allqueue(REDRAWBUTSOBJECT, 0); diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 1ada2729289..0f3a46c8a8c 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -1313,6 +1313,9 @@ static void do_view3d_select_armaturemenu(void *arg, int event) case 3: /* Select Parent(s) */ select_bone_parent(); break; + case 4: /* Swap Select All */ + deselectall_armature(3, 1); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -1331,6 +1334,8 @@ static uiBlock *view3d_select_armaturemenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Swap Select All|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Parent(s)|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); if(curarea->headertype==HEADERTOP) { @@ -1356,12 +1361,15 @@ static void do_view3d_select_pose_armaturemenu(void *arg, int event) case 2: /* Select/Deselect all */ deselectall_posearmature(OBACT, 1, 1); break; - case 3: + case 3: /* Select Target(s) of Constraint(s) */ pose_select_constraint_target(); break; - case 4: + case 4: /* Select Bone's Parent */ select_bone_parent(); break; + case 5: /* Swap Select All */ + deselectall_posearmature(OBACT, 3, 1); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -1379,6 +1387,7 @@ static uiBlock *view3d_select_pose_armaturemenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Swap Select All|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Constraint Target|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Parent(s)|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); @@ -4106,7 +4115,7 @@ static uiBlock *view3d_pose_armature_ikmenu(void *arg_unused) block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armature_ikmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); uiBlockSetButmFunc(block, do_view3d_pose_armature_ikmenu, NULL); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add IK to Bone...|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add IK to Bone...|Shift I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear IK...|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiBlockSetDirection(block, UI_RIGHT); diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 4422411b1c5..fe9bb3279cc 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2189,10 +2189,14 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case IKEY: if(G.qual==LR_CTRLKEY) { - if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) - pose_add_IK(); - else if(ob && G.obedit) - selectswap_mesh(); + if((ob) && (ob->flag & OB_POSEMODE) && (ob->type==OB_ARMATURE)) + deselectall_posearmature(ob, 3, 1); + else if(ob && G.obedit) { + if(G.obedit->type == OB_ARMATURE) + deselectall_armature(3, 1); + else + selectswap_mesh(); + } else selectswap(); } @@ -2200,6 +2204,10 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) pose_clear_IK(); } + else if(G.qual==LR_SHIFTKEY) { + if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) + pose_add_IK(); + } break; case JKEY: From 878a5303f3f2e310e5bcbc5cead6ed9e4eb28286 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 8 Jul 2008 07:30:38 +0000 Subject: [PATCH 357/430] Compiler warning fixes (how some of this stuff compiled without stopping compiling I don't know) ;) --- source/blender/blenkernel/BKE_bmeshCustomData.h | 4 ++-- source/blender/blenkernel/intern/BME_Customdata.c | 9 +++++---- source/blender/blenlib/intern/BLI_kdopbvh.c | 2 ++ source/blender/src/editsima.c | 2 +- source/blender/src/view.c | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index 423f75e532d..4f5f2641f54 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -38,7 +38,7 @@ #ifndef BKE_BMESHCUSTOMDATA_H #define BKE_BMESHCUSTOMDATA_H -struct BME_mempool; +struct BLI_mempool; /*Custom Data Types and defines Eventual plan is to move almost everything to custom data and let caller @@ -62,7 +62,7 @@ typedef struct BME_CustomDataLayer { typedef struct BME_CustomData { struct BME_CustomDataLayer *layers; /*Custom Data Layers*/ - struct BME_mempool *pool; /*pool for alloc of blocks*/ + struct BLI_mempool *pool; /*pool for alloc of blocks*/ int totlayer, totsize; /*total layers and total size in bytes of each block*/ } BME_CustomData; diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c index 8b48efbdbd2..1fc8a4071dc 100644 --- a/source/blender/blenkernel/intern/BME_Customdata.c +++ b/source/blender/blenkernel/intern/BME_Customdata.c @@ -40,6 +40,7 @@ #include "bmesh_private.h" #include #include "MEM_guardedalloc.h" +#include "BLI_mempool.h" /********************* Layer type information **********************/ typedef struct BME_LayerTypeInfo { @@ -83,7 +84,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc if(data->totlayer){ /*alloc memory*/ data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers"); - data->pool = BME_mempool_create(data->totsize, initalloc, initalloc); + data->pool = BLI_mempool_create(data->totsize, initalloc, initalloc); /*initialize layer data*/ for(i=0; i < BME_CD_NUMTYPES; i++){ if(init->layout[i]){ @@ -102,7 +103,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc void BME_CD_Free(BME_CustomData *data) { - if(data->pool) BME_mempool_destroy(data->pool); + if(data->pool) BLI_mempool_destroy(data->pool); } /*Block level ops*/ @@ -119,7 +120,7 @@ void BME_CD_free_block(BME_CustomData *data, void **block) typeInfo->free((char*)*block + offset, 1, typeInfo->size); } } - BME_mempool_free(data->pool, *block); + BLI_mempool_free(data->pool, *block); *block = NULL; } @@ -130,7 +131,7 @@ static void BME_CD_alloc_block(BME_CustomData *data, void **block) if (*block) BME_CD_free_block(data, block); //if we copy layers that have their own free functions like deformverts if (data->totsize > 0) - *block = BME_mempool_alloc(data->pool); + *block = BLI_mempool_alloc(data->pool); else *block = NULL; } diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index a85883f6572..a97b9ca6672 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -523,6 +523,7 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char return; } +#if 0 static void verify_tree(BVHTree *tree) { int i, j, check = 0; @@ -569,6 +570,7 @@ static void verify_tree(BVHTree *tree) printf("branches: %d, leafs: %d, total: %d\n", tree->totbranch, tree->totleaf, tree->totbranch + tree->totleaf); } +#endif void BLI_bvhtree_balance(BVHTree *tree) { diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 7c2edc3e236..69070d61bf0 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -694,7 +694,7 @@ void mouse_select_sima(void) EditFace *efa; MTFace *tf, *nearesttf; EditFace *nearestefa=NULL; - int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island; + int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island=0; char sticky= 0; int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ unsigned int hitv[4], nearestv; diff --git a/source/blender/src/view.c b/source/blender/src/view.c index f457f9203ff..12450bee9de 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -1154,7 +1154,7 @@ void viewmoveNDOF(int mode) float q1[4]; float obofs[3]; float reverse; - float diff[4]; + //float diff[4]; float d, curareaX, curareaY; float mat[3][3]; float upvec[3]; From a166def7b3b20f3a36779fa5a336a6b286e0f966 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Jul 2008 10:18:34 +0000 Subject: [PATCH 358/430] scenes set pose objects would draw in posemode while weight painting if they were set to posemode in their scene. --- source/blender/include/BDR_drawobject.h | 1 + source/blender/include/BIF_editarmature.h | 2 +- source/blender/src/drawarmature.c | 17 +++++++++-------- source/blender/src/drawobject.c | 8 ++++---- source/blender/src/drawview.c | 4 ++-- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/blender/include/BDR_drawobject.h b/source/blender/include/BDR_drawobject.h index 3f9a6e438cc..de28db64c3b 100644 --- a/source/blender/include/BDR_drawobject.h +++ b/source/blender/include/BDR_drawobject.h @@ -63,6 +63,7 @@ void get_local_bounds(struct Object *ob, float *center, float *size); /* drawing flags: */ #define DRAW_PICKING 1 #define DRAW_CONSTCOLOR 2 +#define DRAW_SCENESET 4 void draw_object(struct Base *base, int flag); void drawaxes(float size, int flag, char drawtype); diff --git a/source/blender/include/BIF_editarmature.h b/source/blender/include/BIF_editarmature.h index 0e1557ac378..24112c7f11a 100644 --- a/source/blender/include/BIF_editarmature.h +++ b/source/blender/include/BIF_editarmature.h @@ -80,7 +80,7 @@ void clear_armature(struct Object *ob, char mode); void delete_armature(void); void deselectall_armature(int toggle, int doundo); void deselectall_posearmature (struct Object *ob, int test, int doundo); -int draw_armature(struct Base *base, int dt); +int draw_armature(struct Base *base, int dt, int flag); void extrude_armature(int forked); void subdivide_armature(int numcuts); diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index 73915a69139..6d78b21dfbb 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -2500,7 +2500,7 @@ static void draw_ghost_poses(Base *base) /* ********************************** Armature Drawing - Main ************************* */ /* called from drawobject.c, return 1 if nothing was drawn */ -int draw_armature(Base *base, int dt) +int draw_armature(Base *base, int dt, int flag) { Object *ob= base->object; bArmature *arm= ob->data; @@ -2544,15 +2544,16 @@ int draw_armature(Base *base, int dt) if (arm->ghostep) draw_ghost_poses(base); } + if ((flag & DRAW_SCENESET)==0) { + if(ob==OBACT) + arm->flag |= ARM_POSEMODE; + else if(G.f & G_WEIGHTPAINT) + arm->flag |= ARM_POSEMODE; - if(ob==OBACT) - arm->flag |= ARM_POSEMODE; - else if(G.f & G_WEIGHTPAINT) - arm->flag |= ARM_POSEMODE; - - draw_pose_paths(ob); + draw_pose_paths(ob); + } } - } + } draw_pose_channels(base, dt); arm->flag &= ~ARM_POSEMODE; diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 96ba8c71755..045bf292446 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -4620,7 +4620,7 @@ static void drawSolidSelect(Base *base) } else if(ob->type==OB_ARMATURE) { if(!(ob->flag & OB_POSEMODE)) { - draw_armature(base, OB_WIRE); + draw_armature(base, OB_WIRE, 0); } } @@ -4741,7 +4741,7 @@ void drawRBpivot(bRigidBodyJointConstraint *data){ setlinestyle(0); } -/* flag can be DRAW_PICKING and/or DRAW_CONSTCOLOR */ +/* flag can be DRAW_PICKING and/or DRAW_CONSTCOLOR, DRAW_SCENESET */ void draw_object(Base *base, int flag) { static int warning_recursive= 0; @@ -4943,7 +4943,7 @@ void draw_object(Base *base, int flag) /* draw outline for selected solid objects, mesh does itself */ if((G.vd->flag & V3D_SELECT_OUTLINE) && ob->type!=OB_MESH) { - if(dt>OB_WIRE && dtOB_WIRE && dtdtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(flag&DRAW_PICKING)) { drawSolidSelect(base); } @@ -5090,7 +5090,7 @@ void draw_object(Base *base, int flag) break; case OB_ARMATURE: if(dt>OB_WIRE) set_gl_material(0); // we use defmaterial - empty_object= draw_armature(base, dt); + empty_object= draw_armature(base, dt, flag); break; default: drawaxes(1.0, flag, OB_ARROWS); diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 2f1cdb8b951..f595a101f63 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3097,7 +3097,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata) if(v3d->lay & base->lay) { BIF_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(base, DRAW_CONSTCOLOR); + draw_object(base, DRAW_CONSTCOLOR|DRAW_SCENESET); if(base->object->transflag & OB_DUPLI) { draw_dupli_objects_color(v3d, base, TH_WIRE); @@ -3319,7 +3319,7 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4] where_is_object(base->object); BIF_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(base, DRAW_CONSTCOLOR); + draw_object(base, DRAW_CONSTCOLOR|DRAW_SCENESET); if(base->object->transflag & OB_DUPLI) { draw_dupli_objects(v3d, base); From 168ae6765e3b53d4485bccc1ddbc39e74bdfe0d9 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 8 Jul 2008 11:47:22 +0000 Subject: [PATCH 359/430] Bugfix #16535 The infamous Fkey 'make face' in editmode still failed in cases, giving an annoying convex error popup. Found two errors in this code: - not all cases were evaluated to make a face of 4 vertices (6 cases) - the function that makes always a face when the 4 edges already exist failed when not in vertex-select mode. I also removed the popup, but added a print... its still not perfect. --- source/blender/src/editmesh_add.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c index 952ae957f34..9516f39b05c 100644 --- a/source/blender/src/editmesh_add.c +++ b/source/blender/src/editmesh_add.c @@ -379,7 +379,7 @@ static EditFace *addface_from_edges(void) /* find the 4 edges */ for(eed= em->edges.first; eed; eed= eed->next) { - if(eed->f & SELECT) { + if( (eed->f & SELECT) || (eed->v1->f & eed->v2->f & SELECT) ) { if(eedar[0]==NULL) eedar[0]= eed; else if(eedar[1]==NULL) eedar[1]= eed; else if(eedar[2]==NULL) eedar[2]= eed; @@ -765,6 +765,7 @@ void addedgeface_mesh(void) /* if 4 edges exist, we just create the face, convex or not */ efa= addface_from_edges(); if(efa==NULL) { + /* the order of vertices can be anything, 6 cases to check */ if( convex(neweve[0]->co, neweve[1]->co, neweve[2]->co, neweve[3]->co) ) { efa= addfacelist(neweve[0], neweve[1], neweve[2], neweve[3], NULL, NULL); @@ -775,17 +776,16 @@ void addedgeface_mesh(void) else if( convex(neweve[0]->co, neweve[2]->co, neweve[1]->co, neweve[3]->co) ) { efa= addfacelist(neweve[0], neweve[2], neweve[1], neweve[3], NULL, NULL); } - - else if( convex(neweve[1]->co, neweve[2]->co, neweve[3]->co, neweve[0]->co) ) { - efa= addfacelist(neweve[1], neweve[2], neweve[3], neweve[0], NULL, NULL); + else if( convex(neweve[0]->co, neweve[1]->co, neweve[3]->co, neweve[2]->co) ) { + efa= addfacelist(neweve[0], neweve[1], neweve[3], neweve[2], NULL, NULL); } - else if( convex(neweve[1]->co, neweve[3]->co, neweve[0]->co, neweve[2]->co) ) { - efa= addfacelist(neweve[1], neweve[3], neweve[0], neweve[2], NULL, NULL); + else if( convex(neweve[0]->co, neweve[3]->co, neweve[2]->co, neweve[1]->co) ) { + efa= addfacelist(neweve[0], neweve[3], neweve[2], neweve[1], NULL, NULL); } - else if( convex(neweve[1]->co, neweve[3]->co, neweve[2]->co, neweve[0]->co) ) { - efa= addfacelist(neweve[1], neweve[3], neweve[2], neweve[0], NULL, NULL); + else if( convex(neweve[0]->co, neweve[3]->co, neweve[1]->co, neweve[2]->co) ) { + efa= addfacelist(neweve[0], neweve[3], neweve[1], neweve[2], NULL, NULL); } - else error("The selected vertices form a concave quad"); + else printf("cannot find nice quad from concave set of vertices\n"); } } } From d1fd99b0700b6a779e4d01ddbffb4b946d02b382 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Tue, 8 Jul 2008 12:18:43 +0000 Subject: [PATCH 360/430] BGE logic patch: new "Add" mode for Ipo actuator, several corrections in state system. New Add mode for Ipo actuator ============================= A new Add button, mutually exclusive with Force button, is available in the Ipo actuator. When selected, it activates the Add mode that consists in adding the Ipo curve to the current object situation in world coordinates, or parent coordinates if the object has a parent. Scale Ipo curves are multiplied instead of added to the object current scale. If the local flag is selected, the Ipo curve is added (multiplied) in the object's local coordinates. Delta Ipo curves are handled identically to normal Ipo curve and there is no need to work with Delta Ipo curves provided that you make sure that the Ipo curve starts from origin. Origin means location 0 for Location Ipo curve, rotation 0 for Rotation Ipo curve and scale 1 for Scale Ipo curve. The "current object situation" means the object's location, rotation and scale at the start of the Ipo curve. For Loop Stop and Loop End Ipo actuators, this means at the start of each loop. This initial state is used as a base during the execution of the Ipo Curve but when the Ipo curve is restarted (later or immediately in case of Loop mode), the object current situation at that time is used as the new base. For reference, here is the exact operation of the Add mode for each type of Ipo curve (oLoc, oRot, oScale, oMat: object's loc/rot/scale and orientation matrix at the start of the curve; iLoc, iRot, iScale, iMat: Ipo curve loc/rot/scale and orientation matrix resulting from the rotation). Location Local=false: newLoc = oLoc+iLoc Local=true : newLoc = oLoc+oScale*(oMat*iLoc) Rotation Local=false: newMat = iMat*oMat Local=true : newMat = oMat*iMat Scale Local=false: newScale = oScale*iScale Local=true : newScale = oScale*iScale Add+Local mode is very useful to have dynamic object executing complex movement relative to their current location/orientation. Of cource, dynamics should be disabled during the execution of the curve. Several corrections in state system =================================== - Object initial state is taken into account when adding object dynamically - Fix bug with link count when adding object dynamically - Fix false on-off detection for Actuator sensor when actuator is trigged on negative event. - Fix Parent actuator false activation on negative event - Loop Ipo curve not restarting at correct frame when start frame is different from one. --- .../blender/blenlib/BLI_blenlib.vcproj | 6 + source/blender/makesdna/DNA_actuator_types.h | 5 +- source/blender/src/buttons_logic.c | 61 ++++--- .../Converter/BL_BlenderDataConversion.cpp | 3 +- .../Converter/KX_ConvertActuators.cpp | 7 +- .../GameLogic/SCA_ActuatorSensor.cpp | 2 +- source/gameengine/GameLogic/SCA_IActuator.h | 1 + source/gameengine/GameLogic/SCA_IObject.cpp | 8 +- source/gameengine/GameLogic/SCA_IObject.h | 15 ++ source/gameengine/GameLogic/SCA_ISensor.h | 2 + source/gameengine/Ketsji/KX_GameObject.cpp | 39 ++-- source/gameengine/Ketsji/KX_GameObject.h | 14 +- .../gameengine/Ketsji/KX_IPO_SGController.cpp | 87 ++++++--- .../gameengine/Ketsji/KX_IPO_SGController.h | 7 +- source/gameengine/Ketsji/KX_IpoActuator.cpp | 171 ++++++++---------- source/gameengine/Ketsji/KX_IpoActuator.h | 12 +- .../gameengine/Ketsji/KX_ParentActuator.cpp | 6 + source/gameengine/Ketsji/KX_Scene.cpp | 2 + source/gameengine/SceneGraph/SG_Controller.h | 4 +- 19 files changed, 274 insertions(+), 178 deletions(-) diff --git a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj index 34c195cf23d..0dfbcaa5577 100644 --- a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj +++ b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj @@ -358,6 +358,9 @@ + + @@ -473,6 +476,9 @@ + + diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 3cf80a4efa6..77ebef744eb 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -339,8 +339,9 @@ typedef struct FreeCamera { /* ipoactuator->flag */ #define ACT_IPOFORCE (1 << 0) #define ACT_IPOEND (1 << 1) -#define ACT_IPOFORCE_LOCAL (1 << 2) -#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOLOCAL (1 << 2) +#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOADD (1 << 5) /* ipoactuator->flag for k2k */ #define ACT_K2K_PREV 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 616a5a227c4..7050e61a6ac 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1581,6 +1581,18 @@ static void change_object_actuator(void *act, void *arg) } } +static void change_ipo_actuator(void *arg1_but, void *arg2_ia) +{ + bIpoActuator *ia = arg2_ia; + uiBut *but = arg1_but; + + if (but->retval & ACT_IPOFORCE) + ia->flag &= ~ACT_IPOADD; + else if (but->retval & ACT_IPOADD) + ia->flag &= ~ACT_IPOFORCE; + but->retval = B_REDR; +} + void update_object_actuator_PID(void *act, void *arg) { bObjectActuator *oa = act; @@ -1799,42 +1811,49 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6"; - uiDefButS(block, MENU, B_REDR, str, xco+20, yco-24, width-40 - (width-40)/3, 19, &ia->type, 0, 0, 0, 0, ""); - uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR, - "Child", xco+20+0.666*(width-40), yco-24, (width-40)/3, 19, + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, (width-20)/2, 19, &ia->type, 0, 0, 0, 0, ""); + + but = uiDefButBitS(block, TOG, ACT_IPOFORCE, ACT_IPOFORCE, + "Force", xco+10+(width-20)/2, yco-24, (width-20)/4-10, 19, &ia->flag, 0, 0, 0, 0, - "Add all children Objects as well"); + "Convert Ipo to force. Force is applied in global or local coordinate according to Local flag"); + uiButSetFunc(but, change_ipo_actuator, but, ia); + + but = uiDefButBitS(block, TOG, ACT_IPOADD, ACT_IPOADD, + "Add", xco+3*(width-20)/4, yco-24, (width-20)/4-10, 19, + &ia->flag, 0, 0, 0, 0, + "Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag"); + uiButSetFunc(but, change_ipo_actuator, but, ia); + + /* Only show the do-force-local toggle if force is requested */ + if (ia->flag & (ACT_IPOFORCE|ACT_IPOADD)) { + uiDefButBitS(block, TOG, ACT_IPOLOCAL, 0, + "L", xco+width-30, yco-24, 20, 19, + &ia->flag, 0, 0, 0, 0, + "Let the ipo acts in local coordinates, used in Force and Add mode."); + } if(ia->type==ACT_IPO_FROM_PROP) { uiDefBut(block, TEX, 0, - "Prop: ", xco+20, yco-44, width-40, 19, + "Prop: ", xco+10, yco-44, width-80, 19, ia->name, 0.0, 31.0, 0, 0, "Use this property to define the Ipo position"); } else { uiDefButI(block, NUM, 0, - "Sta", xco+20, yco-44, (width-100)/2, 19, + "Sta", xco+10, yco-44, (width-80)/2, 19, &ia->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame, (subtract 1 to match blenders frame numbers)"); uiDefButI(block, NUM, 0, - "End", xco+18+(width-90)/2, yco-44, (width-100)/2, 19, + "End", xco+10+(width-80)/2, yco-44, (width-80)/2, 19, &ia->end, 0.0, MAXFRAMEF, 0, 0, "End frame, (subtract 1 to match blenders frame numbers)"); - - uiDefButBitS(block, TOG, ACT_IPOFORCE, B_REDR, - "Force", xco+width-78, yco-44, 43, 19, - &ia->flag, 0, 0, 0, 0, - "Convert Ipo to force"); - - /* Only show the do-force-local toggle if force is requested */ - if (ia->flag & ACT_IPOFORCE) { - uiDefButBitS(block, TOG, ACT_IPOFORCE_LOCAL, 0, - "L", xco+width-35, yco-44, 15, 19, - &ia->flag, 0, 0, 0, 0, - "Let the force-ipo act in local coordinates."); - } - } + uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR, + "Child", xco+10+(width-80), yco-44, 60, 19, + &ia->flag, 0, 0, 0, 0, + "Update IPO on all children Objects as well"); + yco-= ysize; break; } diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 665783a1ba5..d8b157cb5b4 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2331,7 +2331,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie, { KX_GameObject* gameobj = static_cast(logicbrick_conversionlist->GetValue(i)); struct Object* blenderobj = converter->FindBlenderObject(gameobj); - gameobj->SetState((blenderobj->init_state)?blenderobj->init_state:blenderobj->state); + gameobj->SetInitState((blenderobj->init_state)?blenderobj->init_state:blenderobj->state); + gameobj->ResetState(); } #endif //CONVERT_LOGIC diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 6e05ea31fe8..9b1bc1e6b90 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -233,7 +233,8 @@ void BL_ConvertActuators(char* maggiename, STR_String propname = ( ipoact->name ? ipoact->name : ""); // first bit? bool ipo_as_force = (ipoact->flag & ACT_IPOFORCE); - bool force_local = (ipoact->flag & ACT_IPOFORCE_LOCAL); + bool local = (ipoact->flag & ACT_IPOLOCAL); + bool ipo_add = (ipoact->flag & ACT_IPOADD); KX_IpoActuator* tmpbaseact = new KX_IpoActuator( gameobj, @@ -244,8 +245,8 @@ void BL_ConvertActuators(char* maggiename, ipoact->type + 1, // + 1, because Blender starts to count at zero, // Ketsji at 1, because zero is reserved for "NoDef" ipo_as_force, - force_local - ); + ipo_add, + local); baseact = tmpbaseact; break; } diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp index 9645bfbed4a..e1c8ef87dd1 100644 --- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp @@ -111,7 +111,7 @@ void SCA_ActuatorSensor::Update() { if (m_actuator) { - m_midresult = m_actuator->IsActive(); + m_midresult = m_actuator->IsActive() && !m_actuator->IsNegativeEvent(); } } diff --git a/source/gameengine/GameLogic/SCA_IActuator.h b/source/gameengine/GameLogic/SCA_IActuator.h index 774b27c5ad4..7ffb21b5490 100644 --- a/source/gameengine/GameLogic/SCA_IActuator.h +++ b/source/gameengine/GameLogic/SCA_IActuator.h @@ -87,6 +87,7 @@ public: bool IsNegativeEvent() const; virtual ~SCA_IActuator(); + void ClrLink() { m_links=0; } void IncLink() { m_links++; } void DecLink(); bool IsNoLink() const { return !m_links; } diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index 27e7d5faada..c5bb4a41552 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -40,7 +40,7 @@ MT_Point3 SCA_IObject::m_sDummy=MT_Point3(0,0,0); -SCA_IObject::SCA_IObject(PyTypeObject* T): m_state(0), CValue(T) +SCA_IObject::SCA_IObject(PyTypeObject* T): m_initState(0), m_state(0), CValue(T) { m_suspended = false; } @@ -164,7 +164,9 @@ void SCA_IObject::ReParentLogic() { SCA_IActuator* newactuator = (SCA_IActuator*) (*ita)->GetReplica(); newactuator->ReParent(this); + // actuators are initially not connected to any controller newactuator->SetActive(false); + newactuator->ClrLink(); oldactuators[act++] = newactuator; } @@ -175,6 +177,7 @@ void SCA_IObject::ReParentLogic() { SCA_IController* newcontroller = (SCA_IController*)(*itc)->GetReplica(); newcontroller->ReParent(this); + newcontroller->SetActive(false); oldcontrollers[con++]=newcontroller; } @@ -186,6 +189,9 @@ void SCA_IObject::ReParentLogic() { SCA_ISensor* newsensor = (SCA_ISensor*)(*its)->GetReplica(); newsensor->ReParent(this); + newsensor->SetActive(false); + // sensors are initially not connected to any controller + newsensor->ClrLink(); oldsensors[sen++] = newsensor; } diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index 07b4310a91e..38a7ed29dca 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -68,6 +68,11 @@ protected: */ bool m_suspended; + /** + * init state of object (used when object is created) + */ + unsigned int m_initState; + /** * current state = bit mask of state that are active */ @@ -117,6 +122,16 @@ public: */ void Resume(void); + /** + * Set init state + */ + void SetInitState(unsigned int initState) { m_initState = initState; } + + /** + * initialize the state when object is created + */ + void ResetState(void) { SetState(m_initState); } + /** * Set the object state */ diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index f2ed6a803c2..4ce49e71507 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -126,6 +126,8 @@ public: /** Resume sensing. */ void Resume(); + void ClrLink() + { m_links = 0; } void IncLink() { m_links++; } void DecLink(); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index bde5e2cd0a2..88fbbb5fd1f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -405,34 +405,25 @@ void KX_GameObject::ResetDebugColor() SetDebugColor(0xff000000); } +void KX_GameObject::InitIPO(bool ipo_as_force, + bool ipo_add, + bool ipo_local) +{ + SGControllerList::iterator it = GetSGNode()->GetSGControllerList().begin(); + while (it != GetSGNode()->GetSGControllerList().end()) { + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_RESET, true); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_AS_FORCE, ipo_as_force); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_ADD, ipo_add); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_LOCAL, ipo_local); + it++; + } +} void KX_GameObject::UpdateIPO(float curframetime, - bool recurse, - bool ipo_as_force, - bool force_local) + bool recurse) { - - // The ipo-actuator needs a sumo reference... this is retrieved (unfortunately) - // by the iposgcontr itself... -// ipocontr->SetSumoReference(gameobj->GetSumoScene(), -// gameobj->GetSumoObject()); - - - // The ipo has to be treated as a force, and not a displacement! - // For this case, we send some settings to the controller. This - // may need some caching... - if (ipo_as_force) { - SGControllerList::iterator it = GetSGNode()->GetSGControllerList().begin(); - - while (it != GetSGNode()->GetSGControllerList().end()) { - (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_AS_FORCE, ipo_as_force); - (*it)->SetOption(SG_Controller::SG_CONTR_IPO_FORCES_ACT_LOCAL, force_local); - it++; - } - } - - // The rest is the 'normal' update procedure. + // just the 'normal' update procedure. GetSGNode()->SetSimulatedTime(curframetime,recurse); GetSGNode()->UpdateWorldData(curframetime); UpdateTransform(); diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 5e44a36515d..b4f50087742 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -489,15 +489,23 @@ public: UpdateNonDynas( ); + /** + * Function to set IPO option at start of IPO + */ + void + InitIPO( + bool ipo_as_force, + bool ipo_add, + bool ipo_local + ); + /** * Odd function to update an ipo. ??? */ void UpdateIPO( float curframetime, - bool recurse, - bool ipo_as_force, - bool force_ipo_local + bool recurse ); /** * Updates Material Ipo data diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.cpp b/source/gameengine/Ketsji/KX_IPO_SGController.cpp index 5303e9a9e85..d3aa924665e 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.cpp +++ b/source/gameengine/Ketsji/KX_IPO_SGController.cpp @@ -55,7 +55,8 @@ typedef unsigned long uint_ptr; // start on another frame, the 1.0 should change. KX_IpoSGController::KX_IpoSGController() : m_ipo_as_force(false), - m_force_ipo_acts_local(false), + m_ipo_add(false), + m_ipo_local(false), m_modified(true), m_ipo_start_initialized(false), m_ipotime(1.0) @@ -75,8 +76,23 @@ void KX_IpoSGController::SetOption( m_ipo_as_force = (value != 0); m_modified = true; break; - case SG_CONTR_IPO_FORCES_ACT_LOCAL: - m_force_ipo_acts_local = (value != 0); + case SG_CONTR_IPO_IPO_ADD: + m_ipo_add = (value != 0); + m_modified = true; + break; + case SG_CONTR_IPO_RESET: + if (m_ipo_start_initialized && value) { + m_ipo_start_initialized = false; + m_modified = true; + } + break; + case SG_CONTR_IPO_LOCAL: + if (value/* && ((SG_Node*)m_pObject)->GetSGParent() == NULL*/) { + // only accept local Ipo if the object has no parent + m_ipo_local = true; + } else { + m_ipo_local = false; + } m_modified = true; break; default: @@ -129,15 +145,19 @@ bool KX_IpoSGController::Update(double currentTime) { if (m_game_object && ob) { - m_game_object->GetPhysicsController()->ApplyForce(m_force_ipo_acts_local ? + m_game_object->GetPhysicsController()->ApplyForce(m_ipo_local ? ob->GetWorldOrientation() * m_ipo_xform.GetPosition() : m_ipo_xform.GetPosition(), false); } } else { - //by default, leave object as it stands - MT_Point3 newPosition = ob->GetLocalPosition(); + // Local ipo should be defined with the object position at (0,0,0) + // Local transform is applied to the object based on initial position + MT_Point3 newPosition(0.0,0.0,0.0); + + if (!m_ipo_add) + newPosition = ob->GetLocalPosition(); //apply separate IPO channels if there is any data in them //Loc and dLoc act by themselves or are additive //LocX and dLocX @@ -145,23 +165,28 @@ bool KX_IpoSGController::Update(double currentTime) newPosition[0] = (m_ipo_channels_active[OB_DLOC_X] ? m_ipo_xform.GetPosition()[0] + m_ipo_xform.GetDeltaPosition()[0] : m_ipo_xform.GetPosition()[0]); } else if (m_ipo_channels_active[OB_DLOC_X] && m_ipo_start_initialized) { - newPosition[0] = (m_ipo_start_point[0] + m_ipo_xform.GetDeltaPosition()[0]); + newPosition[0] = (((!m_ipo_add)?m_ipo_start_point[0]:0.0) + m_ipo_xform.GetDeltaPosition()[0]); } //LocY and dLocY if (m_ipo_channels_active[OB_LOC_Y]) { newPosition[1] = (m_ipo_channels_active[OB_DLOC_Y] ? m_ipo_xform.GetPosition()[1] + m_ipo_xform.GetDeltaPosition()[1] : m_ipo_xform.GetPosition()[1]); } else if (m_ipo_channels_active[OB_DLOC_Y] && m_ipo_start_initialized) { - newPosition[1] = (m_ipo_start_point[1] + m_ipo_xform.GetDeltaPosition()[1]); + newPosition[1] = (((!m_ipo_add)?m_ipo_start_point[1]:0.0) + m_ipo_xform.GetDeltaPosition()[1]); } //LocZ and dLocZ if (m_ipo_channels_active[OB_LOC_Z]) { newPosition[2] = (m_ipo_channels_active[OB_DLOC_Z] ? m_ipo_xform.GetPosition()[2] + m_ipo_xform.GetDeltaPosition()[2] : m_ipo_xform.GetPosition()[2]); } else if (m_ipo_channels_active[OB_DLOC_Z] && m_ipo_start_initialized) { - newPosition[2] = (m_ipo_start_point[2] + m_ipo_xform.GetDeltaPosition()[2]); + newPosition[2] = (((!m_ipo_add)?m_ipo_start_point[2]:0.0) + m_ipo_xform.GetDeltaPosition()[2]); + } + if (m_ipo_add) { + if (m_ipo_local) + newPosition = m_ipo_start_point + m_ipo_start_scale*(m_ipo_start_orient*newPosition); + else + newPosition = m_ipo_start_point + newPosition; } - ob->SetLocalPosition(newPosition); } } @@ -170,21 +195,23 @@ bool KX_IpoSGController::Update(double currentTime) if (m_ipo_as_force) { if (m_game_object && ob) { - m_game_object->ApplyTorque(m_force_ipo_acts_local ? + m_game_object->ApplyTorque(m_ipo_local ? ob->GetWorldOrientation() * m_ipo_xform.GetEulerAngles() : m_ipo_xform.GetEulerAngles(), false); } } else { - double yaw, pitch, roll; //final Euler angles + double yaw=0, pitch=0, roll=0; //final Euler angles double tempYaw=0, tempPitch=0, tempRoll=0; //temp holders - ob->GetLocalOrientation().getEuler(yaw, pitch, roll); + if (!m_ipo_add) + ob->GetLocalOrientation().getEuler(yaw, pitch, roll); //RotX and dRotX if (m_ipo_channels_active[OB_ROT_X]) { yaw = (m_ipo_channels_active[OB_DROT_X] ? (m_ipo_xform.GetEulerAngles()[0] + m_ipo_xform.GetDeltaEulerAngles()[0]) : m_ipo_xform.GetEulerAngles()[0] ); } else if (m_ipo_channels_active[OB_DROT_X] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); yaw = tempYaw + m_ipo_xform.GetDeltaEulerAngles()[0]; } @@ -193,7 +220,8 @@ bool KX_IpoSGController::Update(double currentTime) pitch = (m_ipo_channels_active[OB_DROT_Y] ? (m_ipo_xform.GetEulerAngles()[1] + m_ipo_xform.GetDeltaEulerAngles()[1]) : m_ipo_xform.GetEulerAngles()[1] ); } else if (m_ipo_channels_active[OB_DROT_Y] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); pitch = tempPitch + m_ipo_xform.GetDeltaEulerAngles()[1]; } @@ -202,23 +230,34 @@ bool KX_IpoSGController::Update(double currentTime) roll = (m_ipo_channels_active[OB_DROT_Z] ? (m_ipo_xform.GetEulerAngles()[2] + m_ipo_xform.GetDeltaEulerAngles()[2]) : m_ipo_xform.GetEulerAngles()[2] ); } else if (m_ipo_channels_active[OB_DROT_Z] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); roll = tempRoll + m_ipo_xform.GetDeltaEulerAngles()[2]; } - - ob->SetLocalOrientation(MT_Vector3(yaw, pitch, roll)); + if (m_ipo_add) { + MT_Matrix3x3 rotation(MT_Vector3(yaw, pitch, roll)); + if (m_ipo_local) + rotation = m_ipo_start_orient * rotation; + else + rotation = rotation * m_ipo_start_orient; + ob->SetLocalOrientation(rotation); + } else { + ob->SetLocalOrientation(MT_Vector3(yaw, pitch, roll)); + } } } //modifies scale? if (m_ipo_channels_active[OB_SIZE_X] || m_ipo_channels_active[OB_SIZE_Y] || m_ipo_channels_active[OB_SIZE_Z] || m_ipo_channels_active[OB_DSIZE_X] || m_ipo_channels_active[OB_DSIZE_Y] || m_ipo_channels_active[OB_DSIZE_Z]) { //default is no scale change - MT_Vector3 newScale = ob->GetLocalScale(); + MT_Vector3 newScale(1.0,1.0,1.0); + if (!m_ipo_add) + newScale = ob->GetLocalScale(); if (m_ipo_channels_active[OB_SIZE_X]) { newScale[0] = (m_ipo_channels_active[OB_DSIZE_X] ? (m_ipo_xform.GetScaling()[0] + m_ipo_xform.GetDeltaScaling()[0]) : m_ipo_xform.GetScaling()[0]); } else if (m_ipo_channels_active[OB_DSIZE_X] && m_ipo_start_initialized) { - newScale[0] = (m_ipo_xform.GetDeltaScaling()[0] + m_ipo_start_scale[0]); + newScale[0] = (m_ipo_xform.GetDeltaScaling()[0] + ((!m_ipo_add)?m_ipo_start_scale[0]:0.0)); } //RotY dRotY @@ -226,7 +265,7 @@ bool KX_IpoSGController::Update(double currentTime) newScale[1] = (m_ipo_channels_active[OB_DSIZE_Y] ? (m_ipo_xform.GetScaling()[1] + m_ipo_xform.GetDeltaScaling()[1]): m_ipo_xform.GetScaling()[1]); } else if (m_ipo_channels_active[OB_DSIZE_Y] && m_ipo_start_initialized) { - newScale[1] = (m_ipo_xform.GetDeltaScaling()[1] + m_ipo_start_scale[1]); + newScale[1] = (m_ipo_xform.GetDeltaScaling()[1] + ((!m_ipo_add)?m_ipo_start_scale[1]:0.0)); } //RotZ and dRotZ @@ -234,7 +273,11 @@ bool KX_IpoSGController::Update(double currentTime) newScale[2] = (m_ipo_channels_active[OB_DSIZE_Z] ? (m_ipo_xform.GetScaling()[2] + m_ipo_xform.GetDeltaScaling()[2]) : m_ipo_xform.GetScaling()[2]); } else if (m_ipo_channels_active[OB_DSIZE_Z] && m_ipo_start_initialized) { - newScale[2] = (m_ipo_xform.GetDeltaScaling()[2] + m_ipo_start_scale[2]); + newScale[2] = (m_ipo_xform.GetDeltaScaling()[2] + ((!m_ipo_add)?m_ipo_start_scale[2]:1.0)); + } + + if (m_ipo_add) { + newScale = m_ipo_start_scale * newScale; } ob->SetLocalScale(newScale); diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.h b/source/gameengine/Ketsji/KX_IPO_SGController.h index 7b5a151b41c..0bd8980f11c 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.h +++ b/source/gameengine/Ketsji/KX_IPO_SGController.h @@ -48,8 +48,11 @@ class KX_IpoSGController : public SG_Controller /** Interpret the ipo as a force rather than a displacement? */ bool m_ipo_as_force; - /** Ipo-as-force acts in local rather than in global coordinates? */ - bool m_force_ipo_acts_local; + /** Add Ipo curve to current loc/rot/scale */ + bool m_ipo_add; + + /** Ipo must be applied in local coordinate rather than in global coordinates (used for force and Add mode)*/ + bool m_ipo_local; /** Were settings altered since the last update? */ bool m_modified; diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index cf246342cf9..b7103f49aee 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -59,40 +59,6 @@ STR_String KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp"; /* ------------------------------------------------------------------------- */ /* Native functions */ /* ------------------------------------------------------------------------- */ -/** Another poltergeist? This seems to be a very transient class... */ -class CIpoAction : public CAction -{ - float m_curtime; - bool m_recurse; - KX_GameObject* m_gameobj; - bool m_ipo_as_force; - bool m_force_ipo_local; - -public: - CIpoAction(KX_GameObject* gameobj, - float curtime, - bool recurse, - bool ipo_as_force, - bool force_ipo_local) : - m_curtime(curtime) , - m_recurse(recurse), - m_gameobj(gameobj), - m_ipo_as_force(ipo_as_force), - m_force_ipo_local(force_ipo_local) - { - /* intentionally empty */ - }; - - virtual void Execute() const - { - m_gameobj->UpdateIPO( - m_curtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - }; - -}; KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, const STR_String& propname, @@ -101,7 +67,8 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, bool recurse, int acttype, bool ipo_as_force, - bool force_ipo_local, + bool ipo_add, + bool ipo_local, PyTypeObject* T) : SCA_IActuator(gameobj,T), m_bNegativeEvent(false), @@ -112,7 +79,8 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, m_direction(1), m_propname(propname), m_ipo_as_force(ipo_as_force), - m_force_ipo_local(force_ipo_local), + m_ipo_add(ipo_add), + m_ipo_local(ipo_local), m_type((IpoActType)acttype) { m_starttime = -2.0*fabs(m_endframe - m_startframe) - 1.0; @@ -160,7 +128,7 @@ bool KX_IpoActuator::ClampLocalTime() void KX_IpoActuator::SetStartTime(float curtime) { - float direction = m_startframe < m_endframe ? 1.0 : -1.0; + float direction = m_startframe < m_endframe ? 1.0f : -1.0f; curtime = curtime - KX_KetsjiEngine::GetSuspendedDelta(); if (m_direction > 0) @@ -195,31 +163,26 @@ bool KX_IpoActuator::Update(double curtime, bool frame) // maybe there are events for us in the queue ! bool bNegativeEvent = false; int numevents = 0; + bool bIpoStart = false; if (frame) { numevents = m_events.size(); - for (vector::iterator i=m_events.end(); !(i==m_events.begin());) - { - --i; - if ((*i)->GetNumber() == 0.0f) - bNegativeEvent = true; - - (*i)->Release(); - } - m_events.clear(); + bNegativeEvent = IsNegativeEvent(); + RemoveAllEvents(); } - double start_smaller_then_end = ( m_startframe < m_endframe ? 1.0 : -1.0); + float start_smaller_then_end = ( m_startframe < m_endframe ? 1.0f : -1.0f); bool result=true; if (!bNegativeEvent) { - if (m_starttime < -2.0*start_smaller_then_end*(m_endframe - m_startframe)) + if (m_starttime < -2.0f*start_smaller_then_end*(m_endframe - m_startframe)) { // start for all Ipo, initial start for LOOP_STOP m_starttime = curtime - KX_KetsjiEngine::GetSuspendedDelta(); m_bIpoPlaying = true; + bIpoStart = true; } } @@ -230,7 +193,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame) { // Check if playing forwards. result = ! finished - if (start_smaller_then_end > 0.0) + if (start_smaller_then_end > 0.f) result = (m_localtime < m_endframe && m_bIpoPlaying); else result = (m_localtime > m_endframe && m_bIpoPlaying); @@ -241,14 +204,10 @@ bool KX_IpoActuator::Update(double curtime, bool frame) /* Perform clamping */ ClampLocalTime(); - - CIpoAction ipoaction( - (KX_GameObject*)GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); } else { m_localtime=m_startframe; @@ -270,13 +229,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) m_direction = -m_direction; } - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + if (bIpoStart && m_direction > 0) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } case KX_ACT_IPO_FLIPPER: @@ -299,14 +254,10 @@ bool KX_IpoActuator::Update(double curtime, bool frame) if (ClampLocalTime() && m_localtime == m_startframe) result = false; - - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } @@ -352,8 +303,12 @@ bool KX_IpoActuator::Update(double curtime, bool frame) if (!m_bNegativeEvent){ /* Perform wraparound */ SetLocalTime(curtime); - m_localtime = m_startframe + fmod(m_localtime, m_startframe - m_endframe); + if (start_smaller_then_end > 0.f) + m_localtime = m_startframe + fmod(m_localtime - m_startframe, m_endframe - m_startframe); + else + m_localtime = m_startframe - fmod(m_startframe - m_localtime, m_startframe - m_endframe); SetStartTime(curtime); + bIpoStart = true; } else { @@ -365,13 +320,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) } } - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + if (m_bIpoPlaying && bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } @@ -391,14 +342,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) { m_localtime = propval->GetNumber(); - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); - + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); } else { result = false; @@ -493,6 +439,10 @@ PyMethodDef KX_IpoActuator::Methods[] = { METH_VARARGS, SetIpoAsForce_doc}, {"getIpoAsForce", (PyCFunction) KX_IpoActuator::sPyGetIpoAsForce, METH_VARARGS, GetIpoAsForce_doc}, + {"setIpoAdd", (PyCFunction) KX_IpoActuator::sPySetIpoAdd, + METH_VARARGS, SetIpoAdd_doc}, + {"getIpoAdd", (PyCFunction) KX_IpoActuator::sPyGetIpoAdd, + METH_VARARGS, GetIpoAdd_doc}, {"setType", (PyCFunction) KX_IpoActuator::sPySetType, METH_VARARGS, SetType_doc}, {"getType", (PyCFunction) KX_IpoActuator::sPyGetType, @@ -512,11 +462,11 @@ PyObject* KX_IpoActuator::_getattr(const STR_String& attr) { /* set --------------------------------------------------------------------- */ char KX_IpoActuator::Set_doc[] = -"set(mode, startframe, endframe, force?)\n" -"\t - mode: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n" +"set(type, startframe, endframe, mode?)\n" +"\t - type: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n" "\t - startframe: first frame to use (int)\n" "\t - endframe : last frame to use (int)\n" -"\t - force? : interpret this ipo as a force? (KX_TRUE, KX_FALSE)" +"\t - mode? : special mode (0=normal, 1=interpret location as force, 2=additive)" "\tSet the properties of the actuator.\n"; PyObject* KX_IpoActuator::PySet(PyObject* self, PyObject* args, @@ -543,7 +493,8 @@ PyObject* KX_IpoActuator::PySet(PyObject* self, m_type = modenum; m_startframe = startFrame; m_endframe = stopFrame; - m_ipo_as_force = PyArgToBool(forceToggle); + m_ipo_as_force = forceToggle == 1; + m_ipo_add = forceToggle == 2; break; default: ; /* error */ @@ -641,6 +592,8 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, } m_ipo_as_force = PyArgToBool(boolArg); + if (m_ipo_as_force) + m_ipo_add = false; Py_Return; } @@ -654,6 +607,36 @@ PyObject* KX_IpoActuator::PyGetIpoAsForce(PyObject* self, return BoolToPyArg(m_ipo_as_force); } +/* 6. setIpoAsForce: */ +char KX_IpoActuator::SetIpoAdd_doc[] = +"setIpoAdd(add?)\n" +"\t - add? : add flag (KX_TRUE, KX_FALSE)\n" +"\tSet whether to interpret the ipo as additive rather than absolute.\n"; +PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, + PyObject* args, + PyObject* kwds) { + int boolArg; + + if (!PyArg_ParseTuple(args, "i", &boolArg)) { + return NULL; + } + + m_ipo_add = PyArgToBool(boolArg); + if (m_ipo_add) + m_ipo_as_force = false; + + Py_Return; +} +/* 7. getIpoAsForce: */ +char KX_IpoActuator::GetIpoAdd_doc[] = +"getIpoAsAdd()\n" +"\tReturns whether to interpret the ipo as additive rather than absolute.\n"; +PyObject* KX_IpoActuator::PyGetIpoAdd(PyObject* self, + PyObject* args, + PyObject* kwds) { + return BoolToPyArg(m_ipo_add); +} + /* 8. setType: */ char KX_IpoActuator::SetType_doc[] = "setType(mode)\n" @@ -701,7 +684,7 @@ PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* self, return NULL; } - m_force_ipo_local = PyArgToBool(boolArg); + m_ipo_local = PyArgToBool(boolArg); Py_Return; } @@ -713,7 +696,7 @@ char KX_IpoActuator::GetForceIpoActsLocal_doc[] = PyObject* KX_IpoActuator::PyGetForceIpoActsLocal(PyObject* self, PyObject* args, PyObject* kwds) { - return BoolToPyArg(m_force_ipo_local); + return BoolToPyArg(m_ipo_local); } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 79e8daa3f87..ae554fb0fce 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -75,8 +75,11 @@ protected: /** Interpret the ipo as a force? */ bool m_ipo_as_force; - /** Apply a force-ipo locally? */ - bool m_force_ipo_local; + /** Add Ipo curve to current loc/rot/scale */ + bool m_ipo_add; + + /** The Ipo curve is applied in local coordinates */ + bool m_ipo_local; bool m_bIpoPlaying; @@ -113,7 +116,8 @@ public: bool recurse, int acttype, bool ipo_as_force, - bool force_ipo_local, + bool ipo_add, + bool ipo_local, PyTypeObject* T=&Type); virtual ~KX_IpoActuator() {}; @@ -144,6 +148,8 @@ public: KX_PYMETHOD_DOC(KX_IpoActuator,GetEnd); KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAsForce); KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAsForce); + KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAdd); + KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAdd); KX_PYMETHOD_DOC(KX_IpoActuator,SetType); KX_PYMETHOD_DOC(KX_IpoActuator,GetType); KX_PYMETHOD_DOC(KX_IpoActuator,SetForceIpoActsLocal); diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index 5c433cb68b1..8b379bcd44f 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -77,6 +77,12 @@ CValue* KX_ParentActuator::GetReplica() bool KX_ParentActuator::Update() { + bool bNegativeEvent = IsNegativeEvent(); + RemoveAllEvents(); + + if (bNegativeEvent) + return false; // do nothing on negative events + KX_GameObject *obj = (KX_GameObject*) GetParent(); KX_Scene *scene = PHY_GetActiveScene(); switch (m_mode) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 337b1af6df7..c5f6230b2f2 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -601,6 +601,8 @@ void KX_Scene::ReplicateLogic(KX_GameObject* newobj) } } } + // ready to set initial state + newobj->ResetState(); } diff --git a/source/gameengine/SceneGraph/SG_Controller.h b/source/gameengine/SceneGraph/SG_Controller.h index d65a2f0c256..c32885b915f 100644 --- a/source/gameengine/SceneGraph/SG_Controller.h +++ b/source/gameengine/SceneGraph/SG_Controller.h @@ -101,7 +101,9 @@ public: enum SG_Controller_option { SG_CONTR_NODEF = 0, SG_CONTR_IPO_IPO_AS_FORCE, - SG_CONTR_IPO_FORCES_ACT_LOCAL, + SG_CONTR_IPO_IPO_ADD, + SG_CONTR_IPO_LOCAL, + SG_CONTR_IPO_RESET, SG_CONTR_CAMIPO_LENS, SG_CONTR_CAMIPO_CLIPEND, SG_CONTR_CAMIPO_CLIPSTART, From 092a5b9fbdc4bfe2d5fd31db697fa81bc7a3f71b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 8 Jul 2008 17:04:58 +0000 Subject: [PATCH 361/430] Fix for crash in freeing group nodes, node trees have to be freed before materials. --- source/blender/blenkernel/intern/library.c | 60 +++++++++++----------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 7c50b409693..c3dddf06e7c 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -224,48 +224,50 @@ void flag_all_listbases_ids(short flag, short value) /* note: MAX_LIBARRAY define should match this code */ int set_listbasepointers(Main *main, ListBase **lb) { + int a = 0; + /* BACKWARDS! also watch order of free-ing! (mesh<->mat) */ - lb[0]= &(main->ipo); - lb[1]= &(main->key); - lb[2]= &(main->image); - lb[3]= &(main->tex); - lb[4]= &(main->mat); - lb[5]= &(main->vfont); + lb[a++]= &(main->ipo); + lb[a++]= &(main->key); + lb[a++]= &(main->nodetree); + lb[a++]= &(main->image); + lb[a++]= &(main->tex); + lb[a++]= &(main->mat); + lb[a++]= &(main->vfont); /* Important!: When adding a new object type, * the specific data should be inserted here */ - lb[6]= &(main->armature); - lb[7]= &(main->action); + lb[a++]= &(main->armature); + lb[a++]= &(main->action); - lb[8]= &(main->mesh); - lb[9]= &(main->curve); - lb[10]= &(main->mball); + lb[a++]= &(main->mesh); + lb[a++]= &(main->curve); + lb[a++]= &(main->mball); - lb[11]= &(main->wave); - lb[12]= &(main->latt); - lb[13]= &(main->lamp); - lb[14]= &(main->camera); + lb[a++]= &(main->wave); + lb[a++]= &(main->latt); + lb[a++]= &(main->lamp); + lb[a++]= &(main->camera); - lb[15]= &(main->text); - lb[16]= &(main->sound); - lb[17]= &(main->group); - lb[18]= &(main->nodetree); - lb[19]= &(main->brush); - lb[20]= &(main->script); - lb[21]= &(main->particle); + lb[a++]= &(main->text); + lb[a++]= &(main->sound); + lb[a++]= &(main->group); + lb[a++]= &(main->brush); + lb[a++]= &(main->script); + lb[a++]= &(main->particle); - lb[22]= &(main->world); - lb[23]= &(main->screen); - lb[24]= &(main->object); - lb[25]= &(main->scene); - lb[26]= &(main->library); + lb[a++]= &(main->world); + lb[a++]= &(main->screen); + lb[a++]= &(main->object); + lb[a++]= &(main->scene); + lb[a++]= &(main->library); - lb[27]= NULL; + lb[a]= NULL; - return 27; + return a; } /* *********** ALLOC AND FREE ***************** From bbf1ce2762651f0d3f3a9c302c3575c68ca21ca7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Jul 2008 17:57:31 +0000 Subject: [PATCH 362/430] bugfix - GameEngine PyObject methods did not all return when using dir(), because inherited methods were ignored, This made it incredibly annoying, not only having to search a C++ file to see what functions were available. but looking up methods inherited from other C++ classes. There is still no __members__ attribute so dir() wont work at all for attributes. --- source/gameengine/Expressions/PyObjectPlus.h | 32 +++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 04cc119efee..2bcb604dd23 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -76,18 +76,36 @@ static inline void Py_Fatal(char *M) { virtual PyTypeObject *GetType(void) {return &Type;}; \ virtual PyParentObject *GetParents(void) {return Parents;} + // This defines the _getattr_up macro // which allows attribute and method calls // to be properly passed up the hierarchy. #define _getattr_up(Parent) \ - PyObject *rvalue = Py_FindMethod(Methods, this, const_cast(attr.ReadPtr())); \ - if (rvalue == NULL) \ - { \ - PyErr_Clear(); \ - return Parent::_getattr(attr); \ + PyObject *rvalue = NULL; \ + if (attr=="__methods__") { \ + PyObject *_attr_string = NULL; \ + PyMethodDef *meth = Methods; \ + rvalue = Parent::_getattr(attr); \ + if (rvalue==NULL) { \ + PyErr_Clear(); \ + rvalue = PyList_New(0); \ } \ - else \ - return rvalue + if (meth) { \ + for (; meth->ml_name != NULL; meth++) { \ + _attr_string = PyString_FromString(meth->ml_name); \ + PyList_Append(rvalue, _attr_string); \ + Py_DECREF(_attr_string); \ + } \ + } \ + } else { \ + rvalue = Py_FindMethod(Methods, this, const_cast(attr.ReadPtr())); \ + if (rvalue == NULL) { \ + PyErr_Clear(); \ + rvalue = Parent::_getattr(attr); \ + } \ + } \ + return rvalue; \ + /** * These macros are helpfull when embedding Python routines. The second From e279fc4a8181a7e8083c80c29e1c1bb6dfba7473 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 8 Jul 2008 22:43:44 +0000 Subject: [PATCH 363/430] fix for crasher with touch sensor, ben you may want to look at this, should be ok since the ray sensor does NULL checks in for getNewClientInfo in a similar area. --- .../gameengine/Ketsji/KX_TouchEventManager.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp index 80ee15a9475..423543eef5c 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp +++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp @@ -137,14 +137,18 @@ void KX_TouchEventManager::NextFrame() // KX_GameObject* gameOb1 = ctrl1->getClientInfo(); KX_ClientObjectInfo *client_info = static_cast(ctrl1->getNewClientInfo()); - list::iterator sit; - for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) - static_cast(*sit)->NewHandleCollision((*cit).first, (*cit).second, NULL); - + if (client_info) { + for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) { + static_cast(*sit)->NewHandleCollision((*cit).first, (*cit).second, NULL); + } + } client_info = static_cast((*cit).second->getNewClientInfo()); - for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) - static_cast(*sit)->NewHandleCollision((*cit).second, (*cit).first, NULL); + if (client_info) { + for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) { + static_cast(*sit)->NewHandleCollision((*cit).second, (*cit).first, NULL); + } + } } m_newCollisions.clear(); From f7f0077294b727b673671af32a0fd9f86dbe353b Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 8 Jul 2008 22:55:00 +0000 Subject: [PATCH 364/430] soc-2008-mxcurioni: first (blank) file upload for SWIG removal, in source/blender/freestyle/intern/python. The migration will be based on source/blender/freestyle/intern/swig/ModuleWrapper.{cpp,h} --- source/blender/freestyle/SConscript | 2 +- .../freestyle/intern/app_blender/api.cpp | 72 ++++++++++++------- .../intern/python/BinaryPredicate0D.cpp | 0 .../intern/python/BinaryPredicate1D.cpp | 0 .../python/BinaryPredicate1D/FalseBP1D.cpp | 0 .../python/BinaryPredicate1D/Length2DBP1D.cpp | 0 .../BinaryPredicate1D/SameShapeIdBP1D.cpp | 0 .../python/BinaryPredicate1D/TrueBP1D.cpp | 0 .../ViewMapGradientNormBP1D.cpp | 0 .../intern/python/CurvePointIterator.cpp | 0 .../freestyle/intern/python/EdgeModifier.cpp | 0 .../python/EdgeModifier/TimestampModifier.cpp | 0 source/blender/freestyle/intern/python/Id.cpp | 0 .../freestyle/intern/python/Interface0D.cpp | 0 .../intern/python/Interface0D/CurvePoint.cpp | 0 .../Interface0D/CurvePoint/StrokeVertex.cpp | 0 .../intern/python/Interface0D/SVertex.cpp | 0 .../intern/python/Interface0D/ViewVertex.cpp | 0 .../Interface0D/ViewVertex/NonTVertex.cpp | 0 .../python/Interface0D/ViewVertex/TVertex.cpp | 0 .../intern/python/Interface0DIterator.cpp | 0 .../freestyle/intern/python/Interface1D.cpp | 0 .../intern/python/Interface1D/Curve.cpp | 0 .../intern/python/Interface1D/Curve/Chain.cpp | 0 .../intern/python/Interface1D/FEdge.cpp | 0 .../python/Interface1D/FEdge/FEdgeSharp.cpp | 0 .../python/Interface1D/FEdge/FEdgeSmooth.cpp | 0 .../intern/python/Interface1D/Stroke.cpp | 0 .../intern/python/Interface1D/ViewEdge.cpp | 0 .../freestyle/intern/python/Material.cpp | 0 .../blender/freestyle/intern/python/Noise.cpp | 0 .../freestyle/intern/python/Operators.cpp | 0 .../freestyle/intern/python/SShape.cpp | 0 .../intern/python/StrokeAttribute.cpp | 0 .../freestyle/intern/python/StrokeShader.cpp | 0 .../StrokeShader/BackboneStretcherShader.cpp | 0 .../python/StrokeShader/BezierCurveShader.cpp | 0 .../StrokeShader/CalligraphicShader.cpp | 0 .../python/StrokeShader/ColorNoiseShader.cpp | 0 .../ColorVariationPatternShader.cpp | 0 .../StrokeShader/ConstantColorShader.cpp | 0 .../StrokeShader/ConstantThicknessShader.cpp | 0 .../ConstrainedIncreasingThicknessShader.cpp | 0 .../StrokeShader/GuidingLinesShader.cpp | 0 .../StrokeShader/IncreasingColorShader.cpp | 0 .../IncreasingThicknessShader.cpp | 0 .../StrokeShader/PolygonalizationShader.cpp | 0 .../python/StrokeShader/SamplingShader.cpp | 0 .../StrokeShader/SpatialNoiseShader.cpp | 0 .../StrokeShader/StrokeTextureShader.cpp | 0 .../StrokeShader/TextureAssignerShader.cpp | 0 .../StrokeShader/ThicknessNoiseShader.cpp | 0 .../ThicknessVariationPatternShader.cpp | 0 .../python/StrokeShader/TipRemoverShader.cpp | 0 .../python/StrokeShader/fstreamShader.cpp | 0 .../python/StrokeShader/streamShader.cpp | 0 .../intern/python/StrokeVertexIterator.cpp | 0 .../intern/python/UnaryFunction0D.cpp | 0 .../UnaryFunction0D_Id/ShapeIdF0D.cpp | 0 .../UnaryFunction0D_Material/MaterialF0D.cpp | 0 .../CurveNatureF0D.cpp | 0 .../UnaryFunction0D_Vec2f/Normal2DF0D.cpp | 0 .../VertexOrientation2DF0D.cpp | 0 .../VertexOrientation3DF0D.cpp | 0 .../GetOccludeeF0D.cpp | 0 .../UnaryFunction0D_ViewShape/GetShapeF0D.cpp | 0 .../UnaryFunction0D_double/DensityF0D.cpp | 0 .../LocalAverageDepthF0D.cpp | 0 .../GetCurvilinearAbscissaF0D.cpp | 0 .../UnaryFunction0D_float/GetParameterF0D.cpp | 0 .../GetViewMapGradientNormF0D.cpp | 0 .../ReadCompleteViewMapPixelF0D.cpp | 0 .../UnaryFunction0D_float/ReadMapPixelF0D.cpp | 0 .../ReadSteerableViewMapPixelF0D.cpp | 0 .../Curvature2DAngleF0D.cpp | 0 .../UnaryFunction0D_real/GetProjectedXF0D.cpp | 0 .../UnaryFunction0D_real/GetProjectedYF0D.cpp | 0 .../UnaryFunction0D_real/GetProjectedZF0D.cpp | 0 .../UnaryFunction0D_real/GetXF0D.cpp | 0 .../UnaryFunction0D_real/GetYF0D.cpp | 0 .../UnaryFunction0D_real/GetZF0D.cpp | 0 .../ZDiscontinuityF0D.cpp | 0 .../QuantitativeInvisibilityF0D.cpp | 0 .../GetOccludersF0D.cpp | 0 .../intern/python/UnaryFunction1D.cpp | 0 .../CurveNatureF1D.cpp | 0 .../UnaryFunction1D_Vec2f/Normal2DF1D.cpp | 0 .../Orientation2DF1D.cpp | 0 .../Orientation3DF1D.cpp | 0 .../UnaryFunction1D_double/DensityF1D.cpp | 0 .../GetCompleteViewMapDensityF1D.cpp | 0 .../GetDirectionalViewMapDensityF1D.cpp | 0 .../LocalAverageDepthF1D.cpp | 0 .../Curvature2DAngleF1D.cpp | 0 .../UnaryFunction1D_real/GetProjectedXF1D.cpp | 0 .../UnaryFunction1D_real/GetProjectedYF1D.cpp | 0 .../UnaryFunction1D_real/GetProjectedZF1D.cpp | 0 .../GetSteerableViewMapDensityF1D.cpp | 0 .../GetViewMapGradientNormF1D.cpp | 0 .../UnaryFunction1D_real/GetXF1D.cpp | 0 .../UnaryFunction1D_real/GetYF1D.cpp | 0 .../UnaryFunction1D_real/GetZF1D.cpp | 0 .../ZDiscontinuityF1D.cpp | 0 .../QuantitativeInvisibilityF1D.cpp | 0 .../GetOccludeeF1D.cpp | 0 .../GetOccludersF1D.cpp | 0 .../GetShapeF1D.cpp | 0 .../ChainingTimeStampF1D.cpp | 0 .../IncrementChainingTimeStampF1D.cpp | 0 .../UnaryFunction1D_void/TimeStampF1D.cpp | 0 .../intern/python/UnaryPredicate0D.cpp | 0 .../python/UnaryPredicate0D/FalseUP0D.cpp | 0 .../python/UnaryPredicate0D/TrueUP0D.cpp | 0 .../intern/python/UnaryPredicate1D.cpp | 0 .../python/UnaryPredicate1D/ContourUP1D.cpp | 0 .../UnaryPredicate1D/DensityLowerThanUP1D.cpp | 0 .../EqualToChainingTimeStampUP1D.cpp | 0 .../UnaryPredicate1D/EqualToTimeStampUP1D.cpp | 0 .../UnaryPredicate1D/ExternalContourUP1D.cpp | 0 .../python/UnaryPredicate1D/FalseUP1D.cpp | 0 .../QuantitativeInvisibilityUP1D.cpp | 0 .../python/UnaryPredicate1D/ShapeUP1D.cpp | 0 .../python/UnaryPredicate1D/TrueUP1D.cpp | 0 .../intern/python/ViewEdgeIterator.cpp | 0 .../ViewEdgeIterator/ChainingIterator.cpp | 0 .../ChainPredicateIterator.cpp | 0 .../ChainSilhouetteIterator.cpp | 0 .../freestyle/intern/python/ViewMap.cpp | 0 .../freestyle/intern/python/ViewShape.cpp | 0 .../python/orientedViewEdgeIterator.cpp | 0 130 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate0D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp create mode 100644 source/blender/freestyle/intern/python/CurvePointIterator.cpp create mode 100644 source/blender/freestyle/intern/python/EdgeModifier.cpp create mode 100644 source/blender/freestyle/intern/python/EdgeModifier/TimestampModifier.cpp create mode 100644 source/blender/freestyle/intern/python/Id.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/SVertex.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp create mode 100644 source/blender/freestyle/intern/python/Interface0DIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/Curve.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/Curve/Chain.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/Stroke.cpp create mode 100644 source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp create mode 100644 source/blender/freestyle/intern/python/Material.cpp create mode 100644 source/blender/freestyle/intern/python/Noise.cpp create mode 100644 source/blender/freestyle/intern/python/Operators.cpp create mode 100644 source/blender/freestyle/intern/python/SShape.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeAttribute.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp create mode 100644 source/blender/freestyle/intern/python/StrokeVertexIterator.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp create mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator.cpp create mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp create mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp create mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp create mode 100644 source/blender/freestyle/intern/python/ViewMap.cpp create mode 100644 source/blender/freestyle/intern/python/ViewShape.cpp create mode 100644 source/blender/freestyle/intern/python/orientedViewEdgeIterator.cpp diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 656cecb4e75..31715bda5a3 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -7,7 +7,7 @@ defs = [] incs = '' incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python ' -incs += '../render/extern/include ../render/intern/include' +incs += '../render/extern/include ../render/intern/include ../include ../src' incs += ' #/extern/freestyle/lib3ds' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 36dac821898..2395df646f0 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -106,11 +106,12 @@ extern "C" { void FRS_render(Render* re, int render_in_layer) { - if(render_in_layer) { - view->workingBuffer = GL_COLOR_ATTACHMENT0_EXT; - } else { - view->workingBuffer = GL_BACK; - } + // if(render_in_layer) { + // view->workingBuffer = GL_COLOR_ATTACHMENT0_EXT; + // } else { + // view->workingBuffer = GL_BACK; + // } + view->workingBuffer = GL_BACK; // add style module string style_module = pathconfig->getProjectDir() + @@ -134,8 +135,12 @@ extern "C" { GLuint framebuffer, renderbuffers[2]; GLenum status; RenderLayer *rl; + GLubyte *pixc; if(render_in_layer) { + + pixc = (GLubyte *) malloc( 4 * re->winx * re->winy * sizeof(GLubyte) ); + cout << "Freestyle as a render layer - SETUP" << endl; // set up frame buffer @@ -146,7 +151,7 @@ extern "C" { glGenRenderbuffersEXT(2, renderbuffers); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[0]); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA16F_ARB, re->winx, re->winy); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, re->winx, re->winy); glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffers[0]); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[1]); @@ -163,38 +168,51 @@ extern "C" { return; } - glPushAttrib(GL_VIEWPORT_BIT); + glPushAttrib(GL_VIEWPORT_BIT); + glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // should not be needed glViewport(0, 0, re->winx, re->winy); - glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // really needed ? - } - - FRS_render(re, render_in_layer); - - if(render_in_layer) { - for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next) { - if(rl->layflag & SCE_LAY_FRS) { - cout << "Freestyle as a render layer - RESULT" << endl; - - // transfer render to layer - glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); - glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_FLOAT, rl->rectf ); + + FRS_render(re, render_in_layer); - // bind window - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glDrawBuffer(GL_BACK); - glPopAttrib(); - glDeleteRenderbuffersEXT(2, renderbuffers); - glDeleteFramebuffersEXT(1, &framebuffer); + // keep first Freestyle layer + for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next) + if(rl->layflag & SCE_LAY_FRS) + break; + + cout << "Freestyle as a render layer - RESULT" << endl; + + // transfer render to layer + glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); + glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_UNSIGNED_BYTE, pixc ); + + int p; + for(int i = 0; i < re->winx; i++) { + for(int j = 0; j < re->winy; j++){ + p = 4*(i*re->winy + j); + *(rl->rectf + p ) = 1.0*pixc[ p ]/255.0; + *(rl->rectf + p + 1) = 1.0*pixc[ p+1 ]/255.0; + *(rl->rectf + p + 2) = 1.0*pixc[ p+2 ]/255.0; + *(rl->rectf + p + 3) = 1.0*pixc[ p+3 ]/255.0; } } + + // bind window + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glDrawBuffer(GL_BACK); + glPopAttrib(); + glDeleteRenderbuffersEXT(2, renderbuffers); + glDeleteFramebuffersEXT(1, &framebuffer); + } else { - // copy result into render window + FRS_render(re, render_in_layer); + RenderResult rres; RE_GetResultImage(re, &rres); view->readPixels(0, 0, re->winx, re->winy, AppGLWidget::RGBA, rres.rectf ); re->result->renlay = render_get_active_layer(re, re->result); re->display_draw(re->result, NULL); } + controller->CloseFile(); } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/CurvePointIterator.cpp b/source/blender/freestyle/intern/python/CurvePointIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/EdgeModifier.cpp b/source/blender/freestyle/intern/python/EdgeModifier.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/EdgeModifier/TimestampModifier.cpp b/source/blender/freestyle/intern/python/EdgeModifier/TimestampModifier.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Interface0DIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/Chain.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Material.cpp b/source/blender/freestyle/intern/python/Material.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Noise.cpp b/source/blender/freestyle/intern/python/Noise.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Operators.cpp b/source/blender/freestyle/intern/python/Operators.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/SShape.cpp b/source/blender/freestyle/intern/python/SShape.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/StrokeAttribute.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader.cpp b/source/blender/freestyle/intern/python/StrokeShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewMap.cpp b/source/blender/freestyle/intern/python/ViewMap.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/ViewShape.cpp b/source/blender/freestyle/intern/python/ViewShape.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/orientedViewEdgeIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d From 16dccd3ffdb00bb81400c804b30b13de26d1dc10 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Jul 2008 00:58:57 +0000 Subject: [PATCH 365/430] exiting wasnt working (was raising errors), also use dict.keys() rather then appending from iteritems, --- tools/Blender.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/tools/Blender.py b/tools/Blender.py index 30e9979cf9a..2c982a0a46f 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -69,10 +69,10 @@ def internal_lib_to_dict(dict = None, libtype = None, libname = None, priority = dict[libtype][priority] = libname # libtype and priority can both be lists, for defining lib in multiple places -def add_lib_to_dict(dict = None, libtype = None, libname = None, priority = 100): +def add_lib_to_dict(env, dict = None, libtype = None, libname = None, priority = 100): if not dict or not libtype or not libname: print "Passed wrong arg" - Exit() + env.Exit() if type(libtype) is str and type(priority) is int: internal_lib_to_dict(dict, libtype, libname, priority) @@ -82,10 +82,10 @@ def add_lib_to_dict(dict = None, libtype = None, libname = None, priority = 100) internal_lib_to_dict(dict, lt, libname, p) else: print "libtype and priority lists are unequal in length" - Exit() + env.Exit() else: print "Wrong type combinations for libtype and priority. Only str and int or list and list" - Exit() + env.Exit() def create_blender_liblist(lenv = None, libtype = None): if not lenv or not libtype: @@ -93,11 +93,9 @@ def create_blender_liblist(lenv = None, libtype = None): lst = [] if libtype in possible_types: - sortlist = [] - for k,v in libs[libtype].iteritems(): - sortlist.append(k) - sortlist.sort() curlib = libs[libtype] + sortlist = curlib.keys() + sortlist.sort() for sk in sortlist: v = curlib[sk] lst.append('#' + root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) @@ -175,11 +173,10 @@ def propose_priorities(): for t in possible_types: print bc.OKGREEN+"\t"+t+bc.ENDC new_priority = 0 - sortlist = [] - for k,v in libs[t].iteritems(): - sortlist.append(k) - sortlist.sort() curlib = libs[t] + sortlist = curlib.keys() + sortlist.sort() + for sk in sortlist: v = curlib[sk] #for p,v in sorted(libs[t].iteritems()): @@ -368,7 +365,7 @@ class BlenderEnvironment(SConsEnvironment): global libs if not self or not libname or not source: print bc.FAIL+'Cannot continue. Missing argument for BlenderRes '+libname+bc.ENDC - Exit() + self.Exit() if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross'): print bc.FAIL+'BlenderRes is for windows only!'+bc.END self.Exit() @@ -383,7 +380,7 @@ class BlenderEnvironment(SConsEnvironment): def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None): if not self or not libname or not sources: print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC - Exit() + self.Exit() if libname in quickie or len(quickie)==0: if libname in quickdebug: print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname +bc.ENDC+bc.OKBLUE+ " (debug mode)" + bc.ENDC @@ -419,7 +416,7 @@ class BlenderEnvironment(SConsEnvironment): else: print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC # note: libs is a global - add_lib_to_dict(libs, libtype, libname, priority) + add_lib_to_dict(self, libs, libtype, libname, priority) def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''): print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC From d760119f451ef9ff0218ad5e053e51d54c64fc1b Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 9 Jul 2008 08:24:13 +0000 Subject: [PATCH 366/430] soc-mx-2008: SWIG dependency - wrapper functions extracted from ModuleWrapper.cpp --- .../intern/python/BinaryPredicate0D.cpp | 8 + .../intern/python/BinaryPredicate1D.cpp | 12 + .../python/BinaryPredicate1D/FalseBP1D.cpp | 16 + .../python/BinaryPredicate1D/Length2DBP1D.cpp | 16 + .../BinaryPredicate1D/SameShapeIdBP1D.cpp | 16 + .../python/BinaryPredicate1D/TrueBP1D.cpp | 16 + .../ViewMapGradientNormBP1D.cpp | 12 + .../intern/python/CurvePointIterator.cpp | 284 ++++++++++++++++++ source/blender/freestyle/intern/python/Id.cpp | 32 ++ .../freestyle/intern/python/Interface0D.cpp | 68 +++++ .../intern/python/Interface0D/CurvePoint.cpp | 176 +++++++++++ .../Interface0D/CurvePoint/StrokeVertex.cpp | 104 +++++++ .../intern/python/Interface0D/SVertex.cpp | 268 +++++++++++++++++ .../intern/python/Interface0D/ViewVertex.cpp | 76 +++++ .../Interface0D/ViewVertex/NonTVertex.cpp | 132 ++++++++ .../python/Interface0D/ViewVertex/TVertex.cpp | 184 ++++++++++++ .../intern/python/Interface0DIterator.cpp | 104 +++++++ .../freestyle/intern/python/Interface1D.cpp | 56 ++++ .../intern/python/Interface1D/Curve.cpp | 112 +++++++ .../intern/python/Interface1D/FEdge.cpp | 252 ++++++++++++++++ .../python/Interface1D/FEdge/FEdgeSharp.cpp | 44 +++ .../python/Interface1D/FEdge/FEdgeSmooth.cpp | 32 ++ .../intern/python/Interface1D/Stroke.cpp | 236 +++++++++++++++ .../intern/python/Interface1D/ViewEdge.cpp | 236 +++++++++++++++ .../freestyle/intern/python/Material.cpp | 112 +++++++ .../blender/freestyle/intern/python/Noise.cpp | 48 +++ .../freestyle/intern/python/Operators.cpp | 104 +++++++ .../freestyle/intern/python/SShape.cpp | 120 ++++++++ .../intern/python/StrokeAttribute.cpp | 112 +++++++ .../freestyle/intern/python/StrokeShader.cpp | 12 + .../StrokeShader/BackboneStretcherShader.cpp | 8 + .../python/StrokeShader/BezierCurveShader.cpp | 8 + .../StrokeShader/CalligraphicShader.cpp | 4 + .../python/StrokeShader/ColorNoiseShader.cpp | 8 + .../ColorVariationPatternShader.cpp | 4 + .../StrokeShader/ConstantColorShader.cpp | 12 + .../StrokeShader/ConstantThicknessShader.cpp | 8 + .../ConstrainedIncreasingThicknessShader.cpp | 4 + .../StrokeShader/GuidingLinesShader.cpp | 8 + .../StrokeShader/IncreasingColorShader.cpp | 8 + .../IncreasingThicknessShader.cpp | 4 + .../StrokeShader/PolygonalizationShader.cpp | 8 + .../python/StrokeShader/SamplingShader.cpp | 8 + .../StrokeShader/SpatialNoiseShader.cpp | 4 + .../StrokeShader/StrokeTextureShader.cpp | 8 + .../StrokeShader/TextureAssignerShader.cpp | 8 + .../StrokeShader/ThicknessNoiseShader.cpp | 8 + .../ThicknessVariationPatternShader.cpp | 4 + .../python/StrokeShader/TipRemoverShader.cpp | 4 + .../python/StrokeShader/fstreamShader.cpp | 8 + .../python/StrokeShader/streamShader.cpp | 12 + .../intern/python/StrokeVertexIterator.cpp | 260 ++++++++++++++++ .../intern/python/UnaryFunction0D.cpp | 0 .../UnaryFunction0D/UnaryFunction0DDouble.cpp | 12 + .../UnaryFunction0D/UnaryFunction0DFloat.cpp | 12 + .../UnaryFunction0D/UnaryFunction0DId.cpp | 12 + .../UnaryFunction0DUnsigned.cpp | 12 + .../UnaryFunction0D/UnaryFunction0DVec2f.cpp | 12 + .../UnaryFunction0D/UnaryFunction0DVec3f.cpp | 12 + .../UnaryFunction0DVectorViewShape.cpp | 8 + .../UnaryFunction0DViewShape.cpp | 8 + .../UnaryFunction0D_Id/ShapeIdF0D.cpp | 16 + .../UnaryFunction0D_Material/MaterialF0D.cpp | 16 + .../CurveNatureF0D.cpp | 16 + .../UnaryFunction0D_Vec2f/Normal2DF0D.cpp | 16 + .../VertexOrientation2DF0D.cpp | 16 + .../VertexOrientation3DF0D.cpp | 16 + .../GetOccludeeF0D.cpp | 16 + .../UnaryFunction0D_ViewShape/GetShapeF0D.cpp | 16 + .../UnaryFunction0D_double/DensityF0D.cpp | 0 .../LocalAverageDepthF0D.cpp | 0 .../GetCurvilinearAbscissaF0D.cpp | 16 + .../UnaryFunction0D_float/GetParameterF0D.cpp | 16 + .../GetViewMapGradientNormF0D.cpp | 12 + .../ReadCompleteViewMapPixelF0D.cpp | 12 + .../UnaryFunction0D_float/ReadMapPixelF0D.cpp | 12 + .../ReadSteerableViewMapPixelF0D.cpp | 12 + .../Curvature2DAngleF0D.cpp | 16 + .../UnaryFunction0D_real/GetProjectedXF0D.cpp | 16 + .../UnaryFunction0D_real/GetProjectedYF0D.cpp | 16 + .../UnaryFunction0D_real/GetProjectedZF0D.cpp | 16 + .../UnaryFunction0D_real/GetXF0D.cpp | 16 + .../UnaryFunction0D_real/GetYF0D.cpp | 16 + .../UnaryFunction0D_real/GetZF0D.cpp | 16 + .../ZDiscontinuityF0D.cpp | 16 + .../QuantitativeInvisibilityF0D.cpp | 16 + .../GetOccludersF0D.cpp | 16 + .../intern/python/UnaryFunction0DVoid.cpp | 12 + .../intern/python/UnaryFunction1D.cpp | 0 .../UnaryFunction1D/UnaryFunction1DDouble.cpp | 20 ++ .../UnaryFunction1D/UnaryFunction1DFloat.cpp | 20 ++ .../UnaryFunction1DUnsigned.cpp | 20 ++ .../UnaryFunction1D/UnaryFunction1DVec2f.cpp | 20 ++ .../UnaryFunction1D/UnaryFunction1DVec3f.cpp | 20 ++ .../UnaryFunction1DVectorViewShape.cpp | 16 + .../CurveNatureF1D.cpp | 12 + .../UnaryFunction1D_Vec2f/Normal2DF1D.cpp | 12 + .../Orientation2DF1D.cpp | 12 + .../Orientation3DF1D.cpp | 12 + .../UnaryFunction1D_double/DensityF1D.cpp | 8 + .../GetCompleteViewMapDensityF1D.cpp | 12 + .../GetDirectionalViewMapDensityF1D.cpp | 12 + .../LocalAverageDepthF1D.cpp | 12 + .../Curvature2DAngleF1D.cpp | 12 + .../UnaryFunction1D_real/GetProjectedXF1D.cpp | 12 + .../UnaryFunction1D_real/GetProjectedYF1D.cpp | 12 + .../UnaryFunction1D_real/GetProjectedZF1D.cpp | 12 + .../GetSteerableViewMapDensityF1D.cpp | 8 + .../GetViewMapGradientNormF1D.cpp | 12 + .../UnaryFunction1D_real/GetXF1D.cpp | 12 + .../UnaryFunction1D_real/GetYF1D.cpp | 12 + .../UnaryFunction1D_real/GetZF1D.cpp | 12 + .../ZDiscontinuityF1D.cpp | 12 + .../QuantitativeInvisibilityF1D.cpp | 12 + .../GetOccludeeF1D.cpp | 12 + .../GetOccludersF1D.cpp | 12 + .../GetShapeF1D.cpp | 12 + .../ChainingTimeStampF1D.cpp | 16 + .../IncrementChainingTimeStampF1D.cpp | 16 + .../UnaryFunction1D_void/TimeStampF1D.cpp | 16 + .../intern/python/UnaryFunction1DVoid.cpp | 20 ++ .../intern/python/UnaryPredicate0D.cpp | 12 + .../python/UnaryPredicate0D/FalseUP0D.cpp | 12 + .../python/UnaryPredicate0D/TrueUP0D.cpp | 12 + .../intern/python/UnaryPredicate1D.cpp | 12 + .../python/UnaryPredicate1D/ContourUP1D.cpp | 16 + .../UnaryPredicate1D/DensityLowerThanUP1D.cpp | 12 + .../EqualToChainingTimeStampUP1D.cpp | 12 + .../UnaryPredicate1D/EqualToTimeStampUP1D.cpp | 12 + .../UnaryPredicate1D/ExternalContourUP1D.cpp | 16 + .../python/UnaryPredicate1D/FalseUP1D.cpp | 12 + .../QuantitativeInvisibilityUP1D.cpp | 12 + .../python/UnaryPredicate1D/ShapeUP1D.cpp | 12 + .../python/UnaryPredicate1D/TrueUP1D.cpp | 12 + .../ViewEdgeIterator/ChainingIterator.cpp | 36 +++ .../ChainPredicateIterator.cpp | 12 + .../ChainSilhouetteIterator.cpp | 16 + .../freestyle/intern/python/ViewMap.cpp | 104 +++++++ .../freestyle/intern/python/ViewShape.cpp | 88 ++++++ 139 files changed, 4736 insertions(+) delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp index e69de29bb2d..ea7b1fcca89 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_BinaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp index e69de29bb2d..ebf4ab94ecb 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_BinaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_BinaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp index e69de29bb2d..59946ce22e1 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_FalseBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FalseBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp index e69de29bb2d..a249a230b87 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_Length2DBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Length2DBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp index e69de29bb2d..d82c4166a09 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp index e69de29bb2d..b0e5825e0d6 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_TrueBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TrueBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp index e69de29bb2d..3bd22915831 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/CurvePointIterator.cpp b/source/blender/freestyle/intern/python/CurvePointIterator.cpp index e69de29bb2d..4e4291a9c88 100644 --- a/source/blender/freestyle/intern/python/CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/CurvePointIterator.cpp @@ -0,0 +1,284 @@ +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_CurvePointIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp index e69de29bb2d..681db76faab 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/Id.cpp @@ -0,0 +1,32 @@ +SWIGINTERN PyObject *_wrap_Id_getFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id_getSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id_setFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id_setSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Id___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index e69de29bb2d..54541cdb8cb 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -0,0 +1,68 @@ +SWIGINTERN PyObject *_wrap_Interface0D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0D_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index e69de29bb2d..7d966185449 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -0,0 +1,176 @@ +SWIGINTERN PyObject *_wrap_CurvePoint_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_CurvePoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp index e69de29bb2d..aa98b1cc008 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp @@ -0,0 +1,104 @@ +SWIGINTERN PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp index e69de29bb2d..f6a4a26a65c 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp @@ -0,0 +1,268 @@ +SWIGINTERN PyObject *_wrap_SVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_SVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_normalsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_viewvertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_setCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_getCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_setCurvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SVertex_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp index e69de29bb2d..2b3e733e605 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp @@ -0,0 +1,76 @@ +SWIGINTERN PyObject *_wrap_ViewVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp index e69de29bb2d..d287ddf0c72 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp @@ -0,0 +1,132 @@ +SWIGINTERN PyObject *_wrap_NonTVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_NonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_svertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_SetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddIncomingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddOutgoingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_NonTVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp index e69de29bb2d..32e7ccd0ff8 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp @@ -0,0 +1,184 @@ +SWIGINTERN PyObject *_wrap_TVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_backSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_GetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_mate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Interface0DIterator.cpp index e69de29bb2d..283dd48ce20 100644 --- a/source/blender/freestyle/intern/python/Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Interface0DIterator.cpp @@ -0,0 +1,104 @@ +SWIGINTERN PyObject *_wrap_Interface0DIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface0DIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index e69de29bb2d..0bbb6049d74 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -0,0 +1,56 @@ +SWIGINTERN PyObject *_wrap_Interface1D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_getTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Interface1D_setTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve.cpp index e69de29bb2d..758227e6ad9 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve.cpp @@ -0,0 +1,112 @@ +SWIGINTERN PyObject *_wrap_Curve_computeCurvatureAndOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_nSegments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curveVerticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_curveVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp index e69de29bb2d..4985a2d00a4 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp @@ -0,0 +1,252 @@ +SWIGINTERN PyObject *_wrap_FEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_FEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_vertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_vertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_nextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_previousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_invisibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_viewedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_aFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_getOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_isSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetVertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetVertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetNextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetaFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_SetSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_CommonVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_min2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_max2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_viewedge_nature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp index e69de29bb2d..70a01ad4176 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp @@ -0,0 +1,44 @@ +SWIGINTERN PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp index e69de29bb2d..9c478f24839 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp @@ -0,0 +1,32 @@ +SWIGINTERN PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_face(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_materialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp index e69de29bb2d..c86c2eafac9 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp @@ -0,0 +1,236 @@ +SWIGINTERN PyObject *_wrap_Stroke_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Stroke(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_ComputeSampling(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_InsertVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_Render(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_RenderBasic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_hasTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_vertices_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_push_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp index e69de29bb2d..d9db8ea83c4 100644 --- a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp @@ -0,0 +1,236 @@ +SWIGINTERN PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_fedgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_fedgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_isClosed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_bShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_splittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_AddOccluder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_setSplittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Material.cpp b/source/blender/freestyle/intern/python/Material.cpp index e69de29bb2d..217e2d7e89c 100644 --- a/source/blender/freestyle/intern/python/Material.cpp +++ b/source/blender/freestyle/intern/python/Material.cpp @@ -0,0 +1,112 @@ +SWIGINTERN PyObject *_wrap_Material_diffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_diffuseA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_specular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_specularR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_specularG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_specularB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_specularA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_ambient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_ambientR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_ambientG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_ambientB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_ambientA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_emission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_emissionR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_emissionG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_emissionB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_emissionA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_shininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_SetDiffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_SetSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_SetAmbient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_SetEmission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material_SetShininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Material___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Noise.cpp b/source/blender/freestyle/intern/python/Noise.cpp index e69de29bb2d..e64393d9b35 100644 --- a/source/blender/freestyle/intern/python/Noise.cpp +++ b/source/blender/freestyle/intern/python/Noise.cpp @@ -0,0 +1,48 @@ +SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/Operators.cpp b/source/blender/freestyle/intern/python/Operators.cpp index e69de29bb2d..df9fa4571aa 100644 --- a/source/blender/freestyle/intern/python/Operators.cpp +++ b/source/blender/freestyle/intern/python/Operators.cpp @@ -0,0 +1,104 @@ +SWIGINTERN PyObject *_wrap_Operators_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_sort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getViewEdgeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getChainFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getStrokeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getViewEdgesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getChainsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Operators_getStrokesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/SShape.cpp b/source/blender/freestyle/intern/python/SShape.cpp index e69de29bb2d..201fba6ed9d 100644 --- a/source/blender/freestyle/intern/python/SShape.cpp +++ b/source/blender/freestyle/intern/python/SShape.cpp @@ -0,0 +1,120 @@ +SWIGINTERN PyObject *_wrap_SShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_SShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_AddNewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_AddChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_ComputeBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SetViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_SShape_SetImportance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/StrokeAttribute.cpp index e69de29bb2d..c38da608c2d 100644 --- a/source/blender/freestyle/intern/python/StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/StrokeAttribute.cpp @@ -0,0 +1,112 @@ +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThickness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader.cpp b/source/blender/freestyle/intern/python/StrokeShader.cpp index e69de29bb2d..6348b654003 100644 --- a/source/blender/freestyle/intern/python/StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_StrokeShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_StrokeShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp index e69de29bb2d..68ea395d7b9 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_BackboneStretcherShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_BackboneStretcherShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp index e69de29bb2d..bf480135451 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_BezierCurveShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_BezierCurveShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp index e69de29bb2d..cf7caa68326 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_CalligraphicShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp index e69de29bb2d..34f21261c33 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_ColorNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ColorNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp index e69de29bb2d..4d97fbf6c3c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_ColorVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp index e69de29bb2d..e1a58326696 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ConstantColorShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ConstantColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ConstantColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp index e69de29bb2d..3d6950d556e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_ConstantThicknessShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ConstantThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp index e69de29bb2d..a0e0a4ace8c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_ConstrainedIncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp index e69de29bb2d..fdd198a30af 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_GuidingLinesShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GuidingLinesShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp index e69de29bb2d..bfac8efda55 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_IncreasingColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_IncreasingColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp index e69de29bb2d..e17f06dfafb 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_IncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp index e69de29bb2d..533d481165f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_PolygonalizationShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_PolygonalizationShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp index e69de29bb2d..698905ad292 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_SamplingShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_SamplingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp index e69de29bb2d..68a41f48160 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_SpatialNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp index e69de29bb2d..317273262ae 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_StrokeTextureShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_StrokeTextureShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp index e69de29bb2d..4bb2f6bf03a 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_TextureAssignerShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TextureAssignerShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp index e69de29bb2d..a0542e8d400 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_ThicknessNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ThicknessNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp index e69de29bb2d..992d526e728 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_ThicknessVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp index e69de29bb2d..883cd4c0ded 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp @@ -0,0 +1,4 @@ +SWIGINTERN PyObject *_wrap_TipRemoverShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp index e69de29bb2d..275c7277ce4 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_fstreamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_fstreamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp index e69de29bb2d..4f36bfae337 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_streamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_streamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_streamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp index e69de29bb2d..7997a73e28c 100644 --- a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp @@ -0,0 +1,260 @@ +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getIt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp new file mode 100644 index 00000000000..a6ec72c8c19 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp new file mode 100644 index 00000000000..3a4b0326cf7 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp new file mode 100644 index 00000000000..8388d964479 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp new file mode 100644 index 00000000000..9d2491bee33 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp new file mode 100644 index 00000000000..36a7772ab72 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp new file mode 100644 index 00000000000..5996de16ac1 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp new file mode 100644 index 00000000000..0552b54aed8 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp new file mode 100644 index 00000000000..a8af361cc63 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp index e69de29bb2d..bed3db84681 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ShapeIdF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ShapeIdF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp index e69de29bb2d..d12d4b6383d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_MaterialF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_MaterialF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp index e69de29bb2d..814c89c1766 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_CurveNatureF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurveNatureF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp index e69de29bb2d..64ee307e011 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_Normal2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp index e69de29bb2d..6611a23e41c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp index e69de29bb2d..24dabfcdc66 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp index e69de29bb2d..9029b9ea863 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetOccludeeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetOccludeeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp index e69de29bb2d..6e9d3abde41 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetShapeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetShapeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp index e69de29bb2d..cf684395749 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp index e69de29bb2d..aab03185ae8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetParameterF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetParameterF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp index e69de29bb2d..5007e5c68cd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp index e69de29bb2d..c0dc2350a00 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ReadCompleteViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp index e69de29bb2d..4adcced09e5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ReadMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ReadMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ReadMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp index e69de29bb2d..7c3c4c58120 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ReadSteerableViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp index e69de29bb2d..749af7bbf8b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp index e69de29bb2d..727e617512a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetProjectedXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp index e69de29bb2d..c135ac5a45c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetProjectedYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp index e69de29bb2d..928e3ce73f8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetProjectedZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp index e69de29bb2d..e6286fd53fe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp index e69de29bb2d..767c21d5592 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp index e69de29bb2d..526a321f667 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp index e69de29bb2d..d043f373dd1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp index e69de29bb2d..edc9c97f740 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp index e69de29bb2d..3968e1293a9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_GetOccludersF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp new file mode 100644 index 00000000000..f7c7dca2535 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp new file mode 100644 index 00000000000..b7194d3e116 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp new file mode 100644 index 00000000000..a41994114e4 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp new file mode 100644 index 00000000000..2b0b96e0357 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp new file mode 100644 index 00000000000..546a3f66399 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp new file mode 100644 index 00000000000..28b73b81b8a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp new file mode 100644 index 00000000000..dafd9a65499 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp index e69de29bb2d..37046f061b7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_CurveNatureF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_CurveNatureF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_CurveNatureF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp index e69de29bb2d..eff9b48cc02 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_Normal2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Normal2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp index e69de29bb2d..20cf0d51899 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_Orientation2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Orientation2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp index e69de29bb2d..bb81f96636b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_Orientation3DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Orientation3DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp index e69de29bb2d..c8d47b2459d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_DensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_DensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp index e69de29bb2d..dd701012a52 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetCompleteViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp index e69de29bb2d..eb6f4944493 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetDirectionalViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp index e69de29bb2d..72de11c5fa4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_LocalAverageDepthF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp index e69de29bb2d..88d2c10e5a5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp index e69de29bb2d..e61ee24e638 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetProjectedXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp index e69de29bb2d..9e718a52d50 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetProjectedYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp index e69de29bb2d..d06dbf3e22d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetProjectedZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetProjectedZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetProjectedZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp index e69de29bb2d..1b86998ad8e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp @@ -0,0 +1,8 @@ +SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp index e69de29bb2d..4dc575822be 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp index e69de29bb2d..2a1b4a368dc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp index e69de29bb2d..c63b097d650 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp index e69de29bb2d..c90b2827c38 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp index e69de29bb2d..a546ba3a459 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp index e69de29bb2d..af8855575b1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp index e69de29bb2d..2c64c360207 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetOccludeeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludeeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp index e69de29bb2d..04031c34697 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetOccludersF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetOccludersF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp index e69de29bb2d..839850b298e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_GetShapeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_GetShapeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp index e69de29bb2d..db66d1526a8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp index e69de29bb2d..0a9052e4fab 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp index e69de29bb2d..27a6274940e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_TimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp new file mode 100644 index 00000000000..5962613d088 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp @@ -0,0 +1,20 @@ +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp index e69de29bb2d..0619e4d5bd0 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp index e69de29bb2d..5747ad1e6ea 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_FalseUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FalseUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_FalseUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp index e69de29bb2d..897ebd8ba90 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_TrueUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TrueUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TrueUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp index e69de29bb2d..a786c172563 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_UnaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_UnaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_UnaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp index e69de29bb2d..d7a22ab9286 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp index e69de29bb2d..dc9ec4ee5bf 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp index e69de29bb2d..a8a185a51fc 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp index e69de29bb2d..b8083f3528e 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp index e69de29bb2d..8cdabb068ca 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ExternalContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ExternalContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp index e69de29bb2d..df1a53373c1 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_FalseUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_FalseUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_FalseUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp index e69de29bb2d..0fb10c1f36c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp index e69de29bb2d..752665b4aae 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ShapeUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ShapeUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ShapeUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp index e69de29bb2d..2b4584c01de 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_TrueUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_TrueUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_TrueUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp index e69de29bb2d..53dbfc9b320 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp @@ -0,0 +1,36 @@ +SWIGINTERN PyObject *_wrap_ChainingIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_getVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_isIncrementing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainingIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp index e69de29bb2d..2f4c5645b47 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp @@ -0,0 +1,12 @@ +SWIGINTERN PyObject *_wrap_ChainPredicateIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainPredicateIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_ChainPredicateIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp index e69de29bb2d..20a4a5d7c46 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp @@ -0,0 +1,16 @@ +SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_disown_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/ViewMap.cpp b/source/blender/freestyle/intern/python/ViewMap.cpp index e69de29bb2d..ecd3fe21e44 100644 --- a/source/blender/freestyle/intern/python/ViewMap.cpp +++ b/source/blender/freestyle/intern/python/ViewMap.cpp @@ -0,0 +1,104 @@ +SWIGINTERN PyObject *_wrap_ViewMap_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_AddSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/ViewShape.cpp b/source/blender/freestyle/intern/python/ViewShape.cpp index e69de29bb2d..f95e0f829b0 100644 --- a/source/blender/freestyle/intern/python/ViewShape.cpp +++ b/source/blender/freestyle/intern/python/ViewShape.cpp @@ -0,0 +1,88 @@ +SWIGINTERN PyObject *_wrap_ViewShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_delete_ViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetSShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_AddVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + +SWIGINTERN PyObject *_wrap_ViewShape_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +} + + From 60d099648c05ac469e3499e9755477c5180b9721 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Jul 2008 09:21:52 +0000 Subject: [PATCH 367/430] added a factor argument for aligning to vector, this isn't correct since it does linear interpolation of the vector and renormalizes. (can be improved to rotate correctly but for our use ist ok for now, would also be useful to have an argument to clamp the maximum rotation angle to get a constant rotation speed), This will used to make franky upright when falling from an angle, to track to a surface when hanging onto a ledge and setting the glide pitch. Without this rotation is instant and jerky. currently this is done with Mathutils which isnt available in Blender Player. def do_rotate_up(own): own.alignAxisToVect([0,0,1], 2, 0.1) replaces... def do_rotate_up(own): up_nor = Vector(0,0,1) own_mat = Matrix(*own.getOrientation()).transpose() own_up = up_nor * own_mat ang = AngleBetweenVecs(own_up, up_nor) if ang > 0.005: # Set orientation cross = CrossVecs(own_up, up_nor) new_mat = own_mat * RotationMatrix(ang*0.1, 3, 'r', cross) own.setOrientation(new_mat.transpose()) M source/gameengine/Ketsji/KX_GameObject.cpp M source/gameengine/Ketsji/KX_GameObject.h --- source/gameengine/Ketsji/KX_GameObject.cpp | 39 ++++++++++++++++++---- source/gameengine/Ketsji/KX_GameObject.h | 3 +- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 88fbbb5fd1f..e29ca72500a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -572,7 +572,7 @@ void KX_GameObject::SetObjectColor(const MT_Vector4& rgbavec) m_objectColor = rgbavec; } -void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) +void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis, float fac) { MT_Matrix3x3 orimat; MT_Vector3 vect,ori,z,x,y; @@ -585,6 +585,11 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) cout << "alignAxisToVect() Error: Null vector!\n"; return; } + + if (fac<=0.0) { + return; + } + // normalize vect /= len; orimat = GetSGNode()->GetWorldOrientation(); @@ -594,7 +599,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); //pivot axis if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) //is the vector paralell to the pivot? ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); //change the pivot! - x = vect; + if (fac == 1.0) { + x = vect; + } else { + x = (vect * fac) + ((orimat * MT_Vector3(1.0, 0.0, 0.0)) * (1-fac)); + len = x.length(); + if (MT_fuzzyZero(len)) x = vect; + else x /= len; + } y = ori.cross(x); z = x.cross(y); break; @@ -602,7 +614,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); - y = vect; + if (fac == 1.0) { + y = vect; + } else { + y = (vect * fac) + ((orimat * MT_Vector3(0.0, 1.0, 0.0)) * (1-fac)); + len = y.length(); + if (MT_fuzzyZero(len)) y = vect; + else y /= len; + } z = ori.cross(y); x = y.cross(z); break; @@ -610,7 +629,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); - z = vect; + if (fac == 1.0) { + z = vect; + } else { + z = (vect * fac) + ((orimat * MT_Vector3(0.0, 0.0, 1.0)) * (1-fac)); + len = z.length(); + if (MT_fuzzyZero(len)) z = vect; + else z /= len; + } x = ori.cross(z); y = z.cross(x); break; @@ -1386,13 +1412,14 @@ PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, { PyObject* pyvect; int axis = 2; //z axis is the default + float fac = 1.0; - if (PyArg_ParseTuple(args,"O|i",&pyvect,&axis)) + if (PyArg_ParseTuple(args,"O|if",&pyvect,&axis, &fac)) { MT_Vector3 vect; if (PyVecTo(pyvect, vect)) { - AlignAxisToVect(vect,axis); + AlignAxisToVect(vect,axis,fac); Py_RETURN_NONE; } } diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index b4f50087742..ddbf863aa1a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -278,7 +278,8 @@ public: void AlignAxisToVect( const MT_Vector3& vect, - int axis = 2 + int axis = 2, + float fac = 1.0 ); /** From 838886daf35b791d24e18e3f039a7f9c3c8332e4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 9 Jul 2008 10:13:09 +0000 Subject: [PATCH 368/430] Fix for bugfix #12075: gamma node check for nan was always checking red channel. --- source/blender/nodes/intern/CMP_nodes/CMP_gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c index ff9e2b716ce..e77de3726cb 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c @@ -47,7 +47,7 @@ static void do_gamma(bNode *node, float *out, float *in, float *fac) int i=0; for(i=0; i<3; i++) { /* check for negative to avoid nan's */ - out[i] = (in[0] > 0.0f)? pow(in[i],fac[0]): in[0]; + out[i] = (in[i] > 0.0f)? pow(in[i],fac[0]): in[i]; } out[3] = in[3]; } From bad6b003db72c9265bf817c55f909aa23ec84fb3 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 9 Jul 2008 10:51:03 +0000 Subject: [PATCH 369/430] Fix for reported openexr file reading failures. For simple RGB(A) files, the channel names in openexr were supposed to be simply "R" "G" "B" and "A" too. Other programs like other names... like lower case, or like "ambient.r" Tested with file from renderman. --- .../imbuf/intern/openexr/openexr_api.cpp | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index b59908fef39..7dee9891ce5 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -842,7 +842,7 @@ typedef struct RGBA } RGBA; -#if 0 +/* debug only */ static void exr_print_filecontents(InputFile *file) { const ChannelList &channels = file->header().channels(); @@ -853,7 +853,28 @@ static void exr_print_filecontents(InputFile *file) printf("OpenEXR-load: Found channel %s of type %d\n", i.name(), channel.type); } } -#endif + +/* for non-multilayer, map R G B A channel names to something that's in this file */ +static const char *exr_rgba_channelname(InputFile *file, const char *chan) +{ + const ChannelList &channels = file->header().channels(); + + for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) + { + const Channel &channel = i.channel(); + const char *str= i.name(); + int len= strlen(str); + if(len) { + if(strcasecmp(chan, str+len-1)==0) { + printf("name %s\n", str); + return str; + } + } + } + return chan; +} + + static int exr_has_zbuffer(InputFile *file) { @@ -896,7 +917,8 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags) //printf("OpenEXR-load: image data window %d %d %d %d\n", // dw.min.x, dw.min.y, dw.max.x, dw.max.y); - // exr_print_filecontents(file); + if(0) // debug + exr_print_filecontents(file); is_multi= exr_is_renderresult(file); @@ -935,11 +957,15 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags) /* but, since we read y-flipped (negative y stride) we move to last scanline */ first+= 4*(height-1)*width; - frameBuffer.insert ("R", Slice (FLOAT, (char *) first, xstride, ystride)); - frameBuffer.insert ("G", Slice (FLOAT, (char *) (first+1), xstride, ystride)); - frameBuffer.insert ("B", Slice (FLOAT, (char *) (first+2), xstride, ystride)); - /* 1.0 is fill value */ - frameBuffer.insert ("A", Slice (FLOAT, (char *) (first+3), xstride, ystride, 1, 1, 1.0f)); + frameBuffer.insert ( exr_rgba_channelname(file, "R"), + Slice (FLOAT, (char *) first, xstride, ystride)); + frameBuffer.insert ( exr_rgba_channelname(file, "G"), + Slice (FLOAT, (char *) (first+1), xstride, ystride)); + frameBuffer.insert ( exr_rgba_channelname(file, "B"), + Slice (FLOAT, (char *) (first+2), xstride, ystride)); + + frameBuffer.insert ( exr_rgba_channelname(file, "A"), + Slice (FLOAT, (char *) (first+3), xstride, ystride, 1, 1, 1.0f)); /* 1.0 is fill value */ if(exr_has_zbuffer(file)) { From 180a7d1f623bfa78ff9f8397507053e679a0efbc Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 9 Jul 2008 13:12:58 +0000 Subject: [PATCH 370/430] Replaced strcasecmp with BLI_strcasecmp, to make msvc happy! --- source/blender/imbuf/intern/openexr/openexr_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 7dee9891ce5..16e76331916 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -865,7 +865,7 @@ static const char *exr_rgba_channelname(InputFile *file, const char *chan) const char *str= i.name(); int len= strlen(str); if(len) { - if(strcasecmp(chan, str+len-1)==0) { + if(BLI_strcasecmp(chan, str+len-1)==0) { printf("name %s\n", str); return str; } From d0d179dce604a529381425a6c53f6cf4ea756b1d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 9 Jul 2008 15:25:34 +0000 Subject: [PATCH 371/430] Buhh... and now I left in testing print in exr code. --- source/blender/imbuf/intern/openexr/openexr_api.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 16e76331916..fe352610a40 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -866,7 +866,6 @@ static const char *exr_rgba_channelname(InputFile *file, const char *chan) int len= strlen(str); if(len) { if(BLI_strcasecmp(chan, str+len-1)==0) { - printf("name %s\n", str); return str; } } From 732d886e0a8853ad8029e3e68cc826b69a28cf87 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Jul 2008 15:30:15 +0000 Subject: [PATCH 372/430] bugfix, vector was not checked for zero length before normalizing, closing blender instantly with an assert. --- source/gameengine/Ketsji/KX_GameObject.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index e29ca72500a..db13d30e2f1 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1608,14 +1608,18 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, other = static_cast(pyfrom); fromPoint = other->NodeGetWorldPosition(); } - - if (dist != 0.0f) - { + + if (dist != 0.0f) { MT_Vector3 toDir = toPoint-fromPoint; + if (MT_fuzzyZero(toDir.length2())) { + return Py_BuildValue("OOO", Py_None, Py_None, Py_None); + } toDir.normalize(); toPoint = fromPoint + (dist) * toDir; + } else if (MT_fuzzyZero((toPoint-fromPoint).length2())) { + return Py_BuildValue("OOO", Py_None, Py_None, Py_None); } - + MT_Point3 resultPoint; MT_Vector3 resultNormal; PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment(); From 12c128ac040a842f3fb72a1f4e103abf061a47e2 Mon Sep 17 00:00:00 2001 From: Ben Batt Date: Wed, 9 Jul 2008 15:54:53 +0000 Subject: [PATCH 373/430] Fixed bug #14510 - wave modifier crash CDDM_apply_vert_coords needs a CDDerivedMesh, but it was getting a CCGDerivedMesh from the preceding Subsurf modifier. This fix just makes a CDDerivedMesh copy of the supplied DerivedMesh rather than using it directly. --- source/blender/blenkernel/intern/modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index a0841bb9f03..f13f8ef0298 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4920,7 +4920,7 @@ static void waveModifier_deformVertsEM( if(!wmd->texture && !wmd->defgrp_name[0] && !(wmd->flag & MOD_WAVE_NORM)) dm = derivedData; - else if(derivedData) dm = derivedData; + else if(derivedData) dm = CDDM_copy(derivedData); else dm = CDDM_from_editmesh(editData, ob->data); if(wmd->flag & MOD_WAVE_NORM) { From b915ba5e970b1dd594e81318828321c5fb8c38f7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Jul 2008 19:15:26 +0000 Subject: [PATCH 374/430] [#17298] surface normal direction compensation for objects with negative scale in rendering with radiosity from Roelf De Kock (kiemdoder) Fixes bug [#7969] Mirroring Object Breaks Radiosity Calculations - copied from the tracker. The code in this patch detects whether an object has negative scale (test the OB_NEG_SCALE bit in Object.transflag) and then compensate for the negative scale when the surface normals are calculated for a radiosity render. --- .../blender/radiosity/intern/source/radrender.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/blender/radiosity/intern/source/radrender.c b/source/blender/radiosity/intern/source/radrender.c index e5ef1e9a4a2..68b5fa81f43 100644 --- a/source/blender/radiosity/intern/source/radrender.c +++ b/source/blender/radiosity/intern/source/radrender.c @@ -369,9 +369,18 @@ printf(" Rad elems: %d emittors %d\n", RG.totelem, RG.totpatch); if(vlr->mat->mode & MA_RADIO) { /* during render, vlr->n gets flipped/corrected, we cannot have that */ - if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co, rf->norm); - else CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, rf->norm); - + if (obr->ob->transflag & OB_NEG_SCALE){ + /* The object has negative scale that will cause the normals to flip. + To counter this unwanted normal flip, swap vertex 2 and 4 for a quad + or vertex 2 and 3 (see flip_face) for a triangle in the call to CalcNormFloat4 + in order to flip the normals back to the way they were in the original mesh. */ + if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v4->co, vlr->v3->co, vlr->v2->co, rf->norm); + else CalcNormFloat(vlr->v1->co, vlr->v3->co, vlr->v2->co, rf->norm); + }else{ + if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co, rf->norm); + else CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, rf->norm); + } + rf->totrad[0]= vlr->mat->emit*vlr->mat->r; rf->totrad[1]= vlr->mat->emit*vlr->mat->g; rf->totrad[2]= vlr->mat->emit*vlr->mat->b; From 496a9c1a95c4d7f4219f713c274edf29d9d5d41d Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 10 Jul 2008 00:15:57 +0000 Subject: [PATCH 375/430] Apricot Request: When changing the active action in the NLA editor with NLA-override off, armatures now have their restpose applied before the new action is evaluated. I've commented the code here to make it clearer what is going on. --- source/blender/src/editnla.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index d758f34949a..dbc0deecb2c 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -501,26 +501,47 @@ static void set_active_strip(Object *ob, bActionStrip *act) { bActionStrip *strip; + /* make sure all other strips are not active */ for (strip = ob->nlastrips.first; strip; strip=strip->next) strip->flag &= ~ACTSTRIP_ACTIVE; - if(act) { + /* act is new active strip */ + if (act) { + /* set active flag for this strip */ act->flag |= ACTSTRIP_ACTIVE; - - if(ob->action!=act->act) { - if(ob->action) ob->action->id.us--; - if(act->act->id.lib) { + + /* check if active action will still be the same one */ + if (ob->action != act->act) { + /* clear object's links with its current action (if present) */ + if (ob->action) { + ob->action->id.us--; + } + + /* only set object's action to active strip's action if possible */ + if (act->act->id.lib) { ob->action= NULL; } else { ob->action= act->act; id_us_plus(&ob->action->id); - } + } + + /* request redrawing in relevant spaces */ allqueue(REDRAWIPO, 0); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWACTION, 0); allqueue(REDRAWNLA, 0); - ob->ctime= -1234567.0f; // eveil! + + /* when only showing action (i.e. nla-override off), + * reset pose to restpose for armatures + */ + if ((ob->nlaflag & OB_NLA_OVERRIDE)==0) { + if (ob->type == OB_ARMATURE) + rest_pose(ob->pose); + } + + /* flush depsgraph */ + ob->ctime= -1234567.0f; // evil! DAG_object_flush_update(G.scene, ob, OB_RECALC_OB|OB_RECALC_DATA); } } From 5c825162616b39a70639ead6d7f4146c84e0b13f Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Thu, 10 Jul 2008 00:46:19 +0000 Subject: [PATCH 376/430] -> Support for Custom Data in bevel modifier Added Customdata to Bmesh <-> derivedmesh functions --- source/blender/blenkernel/BKE_customdata.h | 3 +- .../blenkernel/intern/BME_conversions.c | 136 +++++++++++++++++- source/blender/blenkernel/intern/customdata.c | 8 +- 3 files changed, 138 insertions(+), 9 deletions(-) diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 12f68c771e0..e84c7d30956 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -266,7 +266,8 @@ void CustomData_set_layer_unique_name(struct CustomData *data, int index); only after this test passes, layer->data should be assigned */ int CustomData_verify_versions(struct CustomData *data, int index); +/*BMesh specific customdata stuff*/ void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); -void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); +void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total); void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize); #endif diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index f375ca62726..daf0de5b748 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -56,6 +56,102 @@ #include "BSE_edit.h" +/*merge these functions*/ +static void BME_DMcorners_to_loops(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f, int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i< numTex; i++){ + texface = CustomData_get_layer_n(facedata, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texpoly->tpage = texface[index].tpage; + texpoly->flag = texface[index].flag; + texpoly->transp = texface[index].transp; + texpoly->mode = texface[index].mode; + texpoly->tile = texface[index].tile; + texpoly->unwrap = texface[index].unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + mloopuv->uv[0] = texface[index].uv[j][0]; + mloopuv->uv[1] = texface[index].uv[j][1]; + j++; + l = l->next; + }while(l!=f->loopbase); + } + + for(i=0; i < numCol; i++){ + mcol = CustomData_get_layer_n(facedata, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mloopcol->r = mcol[(index*4)+j].r; + mloopcol->g = mcol[(index*4)+j].g; + mloopcol->b = mcol[(index*4)+j].b; + mloopcol->a = mcol[(index*4)+j].a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} + +static void BME_DMloops_to_corners(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_get_layer_n(facedata, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texface[index].tpage = texpoly->tpage; + texface[index].flag = texpoly->flag; + texface[index].transp = texpoly->transp; + texface[index].mode = texpoly->mode; + texface[index].tile = texpoly->tile; + texface[index].unwrap = texpoly->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + texface[index].uv[j][0] = mloopuv->uv[0]; + texface[index].uv[j][1] = mloopuv->uv[1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_get_layer_n(facedata,CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mcol[(index*4) + j].r = mloopcol->r; + mcol[(index*4) + j].g = mloopcol->g; + mcol[(index*4) + j].b = mloopcol->b; + mcol[(index*4) + j].a = mloopcol->a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} + + static void BME_corners_to_loops(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){ int i, j; BME_Loop *l; @@ -271,7 +367,7 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { CustomData_copy(&bm->vdata, &em->vdata, CD_MASK_BMESH, CD_CALLOC, 0); CustomData_copy(&bm->edata, &em->edata, CD_MASK_BMESH, CD_CALLOC, 0); CustomData_copy(&bm->pdata, &em->fdata, CD_MASK_BMESH, CD_CALLOC, 0); - CustomData_from_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata); + CustomData_from_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata,0); numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); @@ -357,7 +453,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) MVert *mvert, *mv; MEdge *medge, *me; MFace *mface, *mf; - int totface,totedge,totvert,i,len; + int totface,totedge,totvert,i,len, numTex, numCol; BME_Vert *v1=NULL,*v2=NULL, **vert_array; BME_Edge *e=NULL; BME_Poly *f=NULL; @@ -365,6 +461,22 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) EdgeHash *edge_hash = BLI_edgehash_new(); bm = BME_make_mesh(allocsize); + /*copy custom data layout*/ + CustomData_copy(&dm->vertData, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&dm->edgeData, &bm->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&dm->faceData, &bm->pdata, CD_MASK_BMESH, CD_CALLOC, 0); + + /*copy face corner data*/ + CustomData_to_bmeshpoly(&dm->faceData, &bm->pdata, &bm->ldata); + /*initialize memory pools*/ + CustomData_bmesh_init_pool(&bm->vdata, allocsize[0]); + CustomData_bmesh_init_pool(&bm->edata, allocsize[1]); + CustomData_bmesh_init_pool(&bm->ldata, allocsize[2]); + CustomData_bmesh_init_pool(&bm->pdata, allocsize[3]); + /*needed later*/ + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + totvert = dm->getNumVerts(dm); totedge = dm->getNumEdges(dm); totface = dm->getNumFaces(dm); @@ -381,6 +493,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) vert_array[i] = v1; v1->flag = mv->flag; v1->bweight = mv->bweight/255.0f; + CustomData_to_bmesh_block(&dm->vertData, &bm->vdata, i, &v1->data); } /*add edges*/ for(i=0,me = medge; i < totedge;i++,me++){ @@ -391,6 +504,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) e->bweight = me->bweight/255.0f; e->flag = (unsigned char)me->flag; BLI_edgehash_insert(edge_hash,me->v1,me->v2,e); + CustomData_to_bmesh_block(&dm->edgeData, &bm->edata, i, &e->data); } /*add faces.*/ for(i=0,mf = mface; i < totface;i++,mf++){ @@ -414,6 +528,8 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) f = BME_MF(bm,v1,v2,edar,len); f->mat_nr = mf->mat_nr; f->flag = mf->flag; + CustomData_to_bmesh_block(&dm->faceData,&bm->pdata,i,&f->data); + BME_DMcorners_to_loops(bm, &dm->faceData,i,f, numCol,numTex); } BME_model_end(bm); @@ -427,7 +543,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) MFace *mface, *mf; MEdge *medge, *me; MVert *mvert, *mv; - int totface,totedge,totvert,i,bmeshok,len; + int totface,totedge,totvert,i,bmeshok,len, numTex, numCol; BME_Vert *v1=NULL; BME_Edge *e=NULL, *oe=NULL; @@ -463,12 +579,21 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) /*convert back to mesh*/ result = CDDM_from_template(dm,totvert,totedge,totface); + CustomData_merge(&bm->vdata, &result->vertData, CD_MASK_BMESH, CD_CALLOC, totvert); + CustomData_merge(&bm->edata, &result->edgeData, CD_MASK_BMESH, CD_CALLOC, totedge); + CustomData_merge(&bm->pdata, &result->faceData, CD_MASK_BMESH, CD_CALLOC, totface); + CustomData_from_bmeshpoly(&result->faceData, &bm->pdata, &bm->ldata,totface); + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + + /*Make Verts*/ mvert = CDDM_get_verts(result); for(i=0,v1=bm->verts.first,mv=mvert;v1;v1=v1->next,i++,mv++){ VECCOPY(mv->co,v1->co); mv->flag = (unsigned char)v1->flag; mv->bweight = (char)(255.0*v1->bweight); + CustomData_from_bmesh_block(&bm->vdata, &result->vertData, &v1->data, i); } medge = CDDM_get_edges(result); i=0; @@ -486,6 +611,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) me->crease = (char)(255.0*e->crease); me->bweight = (char)(255.0*e->bweight); me->flag = e->flag; + CustomData_from_bmesh_block(&bm->edata, &result->edgeData, &e->data, i); me++; i++; } @@ -507,9 +633,11 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) if(mf->v3 == 0 || (len == 4 && mf->v4 == 0)){ test_index_face(mf, NULL, i, len); } - i++; mf->mat_nr = (unsigned char)f->mat_nr; mf->flag = (unsigned char)f->flag; + CustomData_from_bmesh_block(&bm->pdata, &result->faceData, &f->data, i); + BME_DMloops_to_corners(bm, &result->faceData, i, f,numCol,numTex); + i++; } } } diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index d79dcb14f37..501293ecd81 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1534,7 +1534,7 @@ void CustomData_from_em_block(const CustomData *source, CustomData *dest, } /*Bmesh functions*/ - +/*needed to convert to/from different face reps*/ void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata) { int i; @@ -1547,15 +1547,15 @@ void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *l CustomData_add_layer(ldata, CD_MLOOPCOL, CD_CALLOC, &(fdata->layers[i].name), 0); } } -void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata){ +void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata, int total){ int i; for(i=0; i < pdata->totlayer; i++){ if(pdata->layers[i].type == CD_MTEXPOLY) - CustomData_add_layer(fdata, CD_MTFACE, CD_CALLOC, &(pdata->layers[i].name), 0); + CustomData_add_layer(fdata, CD_MTFACE, CD_CALLOC, &(pdata->layers[i].name), total); } for(i=0; i < ldata->totlayer; i++){ if(ldata->layers[i].type == CD_MLOOPCOL) - CustomData_add_layer(fdata, CD_MCOL, CD_CALLOC, &(ldata->layers[i].name), 0); + CustomData_add_layer(fdata, CD_MCOL, CD_CALLOC, &(ldata->layers[i].name), total); } } From 3d7358539df4526ffc2c2bbd40cf2001c5acf374 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 10 Jul 2008 01:47:51 +0000 Subject: [PATCH 377/430] AutoMerge Keyframes option for Action/NLA editors will now also delete duplicate keyframes if a Duplicate (SHIFT-DKEY) operation is cancelled. --- source/blender/src/transform_conversions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index dcebf6b7557..10e49cdd218 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -3610,6 +3610,7 @@ void special_aftertrans_update(TransInfo *t) Base *base; short redrawipo=0, resetslowpar=1; int cancelled= (t->state == TRANS_CANCEL); + short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0; if (t->spacetype==SPACE_VIEW3D) { if (G.obedit) { @@ -3622,7 +3623,7 @@ void special_aftertrans_update(TransInfo *t) } } } - if (t->spacetype == SPACE_ACTION) { + else if (t->spacetype == SPACE_ACTION) { void *data; short datatype; @@ -3644,7 +3645,7 @@ void special_aftertrans_update(TransInfo *t) /* Do curve cleanups? */ if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_action_clean((bAction *)data); } @@ -3659,7 +3660,7 @@ void special_aftertrans_update(TransInfo *t) IpoCurve *icu; if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_ipo_clean(key->ipo); } @@ -3685,7 +3686,7 @@ void special_aftertrans_update(TransInfo *t) /* after transform, remove duplicate keyframes on a frame that resulted from transform */ if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_nla_clean(t); } From 99fdf27af92b9bd9d05c108f2c2c8a240c5536bc Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 10 Jul 2008 12:47:20 +0000 Subject: [PATCH 378/430] Sync with Apricot Game Engine ============================= * Clean up and optimizations in skinned/deformed mesh code. * Compatibility fixes and clean up in the rasterizer. * Changes related to GLSL shadow buffers which should have no effect, to keep the code in sync with apricot. --- intern/moto/include/GEN_Map.h | 18 ++ source/blender/src/usiblender.c | 2 + .../BlenderRoutines/KX_BlenderGL.cpp | 2 +- .../Converter/BL_BlenderDataConversion.cpp | 118 ++++++------- .../gameengine/Converter/BL_MeshDeformer.cpp | 164 ++++++++++-------- source/gameengine/Converter/BL_MeshDeformer.h | 14 +- .../gameengine/Converter/BL_ShapeDeformer.h | 11 +- .../gameengine/Converter/BL_SkinDeformer.cpp | 53 +++--- source/gameengine/Converter/BL_SkinDeformer.h | 6 +- .../Converter/BL_SkinMeshObject.cpp | 84 --------- .../gameengine/Converter/BL_SkinMeshObject.h | 94 ---------- source/gameengine/Ketsji/BL_BlenderShader.cpp | 80 ++++++--- source/gameengine/Ketsji/BL_BlenderShader.h | 15 +- source/gameengine/Ketsji/BL_Material.cpp | 6 +- source/gameengine/Ketsji/BL_Material.h | 7 +- .../gameengine/Ketsji/KX_BlenderMaterial.cpp | 100 +++++++---- source/gameengine/Ketsji/KX_BlenderMaterial.h | 2 + source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 46 ++++- source/gameengine/Ketsji/KX_KetsjiEngine.h | 1 + source/gameengine/Ketsji/KX_Light.cpp | 80 ++++++++- source/gameengine/Ketsji/KX_Light.h | 16 +- source/gameengine/Ketsji/KX_Scene.cpp | 41 +++-- source/gameengine/Ketsji/KX_Scene.h | 8 +- .../Rasterizer/RAS_BucketManager.cpp | 2 +- .../Rasterizer/RAS_IPolygonMaterial.cpp | 16 ++ .../Rasterizer/RAS_IPolygonMaterial.h | 2 + .../gameengine/Rasterizer/RAS_IRasterizer.h | 59 ++++--- .../Rasterizer/RAS_MaterialBucket.cpp | 53 +++--- .../Rasterizer/RAS_MaterialBucket.h | 10 +- .../gameengine/Rasterizer/RAS_MeshObject.cpp | 63 ++++--- source/gameengine/Rasterizer/RAS_MeshObject.h | 6 +- .../RAS_ListRasterizer.cpp | 25 ++- .../RAS_OpenGLRasterizer/RAS_ListRasterizer.h | 8 +- .../RAS_OpenGLRasterizer.cpp | 102 ++--------- .../RAS_OpenGLRasterizer.h | 10 +- .../RAS_VAOpenGLRasterizer.cpp | 94 +++++----- .../RAS_VAOpenGLRasterizer.h | 8 +- source/gameengine/Rasterizer/RAS_TexVert.cpp | 42 +---- source/gameengine/Rasterizer/RAS_TexVert.h | 24 ++- source/kernel/gen_system/GEN_HashedPtr.h | 1 + source/kernel/gen_system/GEN_Map.h | 18 ++ 42 files changed, 762 insertions(+), 751 deletions(-) diff --git a/intern/moto/include/GEN_Map.h b/intern/moto/include/GEN_Map.h index db3335d6110..9f56924419e 100644 --- a/intern/moto/include/GEN_Map.h +++ b/intern/moto/include/GEN_Map.h @@ -82,6 +82,24 @@ public: } return 0; } + + Key* getKey(int index) { + int count=0; + for (int i=0;im_key; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } void clear() { for (int i = 0; i < m_num_buckets; ++i) { diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 2a4672e3052..4aea0df74b9 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -34,6 +34,8 @@ #include #include +#include "GL/glew.h" + #ifdef WIN32 #include /* need to include windows.h so _WIN32_IE is defined */ #ifndef _WIN32_IE diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 230d6b262c6..ed6ea7c5f6a 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -26,6 +26,7 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include "GL/glew.h" #include "KX_BlenderGL.h" #ifdef HAVE_CONFIG_H @@ -44,7 +45,6 @@ #include "BMF_Api.h" -#include "GL/glew.h" #include "BIF_gl.h" #include "BL_Material.h" // MAXTEX diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index d8b157cb5b4..f3e22cd297a 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -312,11 +312,13 @@ BL_Material* ConvertMaterial( Mesh* mesh, Material *mat, MTFace* tface, + const char *tfaceName, MFace* mface, MCol* mmcol, int lightlayer, Object* blenderobj, - MTF_localLayer *layers) + MTF_localLayer *layers, + bool glslmat) { //this needs some type of manager BL_Material *material = new BL_Material(); @@ -335,7 +337,7 @@ BL_Material* ConvertMaterial( if(validmat) { // use vertex colors by explicitly setting - if(mat->mode &MA_VERTEXCOLP) + if(mat->mode &MA_VERTEXCOLP || glslmat) type = 0; // use lighting? @@ -558,6 +560,7 @@ BL_Material* ConvertMaterial( } else { int valid = 0; + // check for tface tex to fallback on if( validface ){ @@ -590,6 +593,7 @@ BL_Material* ConvertMaterial( } MT_Point2 uv[4]; MT_Point2 uv2[4]; + const char *uvName = "", *uv2Name = ""; uv[0]= uv[1]= uv[2]= uv[3]= MT_Point2(0.0f, 0.0f); uv2[0]= uv2[1]= uv2[2]= uv2[3]= MT_Point2(0.0f, 0.0f); @@ -616,6 +620,8 @@ BL_Material* ConvertMaterial( if (mface->v4) uv[3] = MT_Point2(tface->uv[3]); + + uvName = tfaceName; } else { // nothing at all @@ -641,39 +647,38 @@ BL_Material* ConvertMaterial( isFirstSet = false; else { - MT_Point2 uvSet[4]; for (int lay=0; layuv[0]); uvSet[1] = MT_Point2(layer.face->uv[1]); uvSet[2] = MT_Point2(layer.face->uv[2]); if (mface->v4) uvSet[3] = MT_Point2(layer.face->uv[3]); + else + uvSet[3] = MT_Point2(0.0f, 0.0f); - processed = true; - } - - if (!processed) continue; - - if (isFirstSet) - { - uv[0] = uvSet[0]; uv[1] = uvSet[1]; - uv[2] = uvSet[2]; uv[3] = uvSet[3]; - isFirstSet = false; - } - else - { - uv2[0] = uvSet[0]; uv2[1] = uvSet[1]; - uv2[2] = uvSet[2]; uv2[3] = uvSet[3]; - map.mapping |= USECUSTOMUV; + if (isFirstSet) + { + uv[0] = uvSet[0]; uv[1] = uvSet[1]; + uv[2] = uvSet[2]; uv[3] = uvSet[3]; + isFirstSet = false; + uvName = layer.name; + } + else + { + uv2[0] = uvSet[0]; uv2[1] = uvSet[1]; + uv2[2] = uvSet[2]; uv2[3] = uvSet[3]; + map.mapping |= USECUSTOMUV; + uv2Name = layer.name; + } } } } @@ -693,9 +698,8 @@ BL_Material* ConvertMaterial( } material->SetConversionRGB(rgb); - material->SetConversionUV(uv); - material->SetConversionUV2(uv2); - + material->SetConversionUV(uvName, uv); + material->SetConversionUV2(uv2Name, uv2); material->ras_mode |= (mface->v4==0)?TRIANGLE:0; if(validmat) @@ -797,6 +801,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* MFace* mface = static_cast(mesh->mface); MTFace* tface = static_cast(mesh->mtface); + const char *tfaceName = ""; MCol* mmcol = mesh->mcol; MT_assert(mface || mesh->totface == 0); @@ -832,14 +837,14 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* layers[validLayers].face = (MTFace*)mesh->fdata.layers[i].data;; layers[validLayers].name = mesh->fdata.layers[i].name; + if(tface == layers[validLayers].face) + tfaceName = layers[validLayers].name; validLayers++; } } meshobj->SetName(mesh->id.name); meshobj->m_xyz_index_to_vertex_index_mapping.resize(mesh->totvert); - if(skinMesh) - ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.resize(mesh->totvert); for (int f=0;ftotface;f++,mface++) { @@ -898,8 +903,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* else ma = give_current_material(blenderobj, 1); - bl_mat = ConvertMaterial(mesh, ma, tface, mface, mmcol, lightlayer, blenderobj, layers); - bl_mat->glslmat = converter->GetGLSLMaterials(); + bl_mat = ConvertMaterial(mesh, ma, tface, tfaceName, mface, mmcol, lightlayer, blenderobj, layers, converter->GetGLSLMaterials()); // set the index were dealing with bl_mat->material_index = (int)mface->mat_nr; @@ -1059,35 +1063,25 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* int nverts = mface->v4?4:3; int vtxarray = meshobj->FindVertexArray(nverts,polymat); RAS_Polygon* poly = new RAS_Polygon(bucket,polyvisible,nverts,vtxarray); - if (skinMesh) { - int d1, d2, d3, d4=0; - bool flat; + bool flat; + + if (skinMesh) { /* If the face is set to solid, all fnors are the same */ if (mface->flag & ME_SMOOTH) flat = false; else flat = true; - - d1=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v1, &mesh->dvert[mface->v1], polymat); - d2=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v2, &mesh->dvert[mface->v2], polymat); - d3=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v3, &mesh->dvert[mface->v3], polymat); - if (nverts==4) - d4=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v4, &mesh->dvert[mface->v4], polymat); - poly->SetVertex(0,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,d1,flat,polymat,mface->v1)); - poly->SetVertex(1,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,d2,flat,polymat,mface->v2)); - poly->SetVertex(2,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,d3,flat,polymat,mface->v3)); - if (nverts==4) - poly->SetVertex(3,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,d4,flat,polymat,mface->v4)); } else - { - poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,false,polymat,mface->v1)); - poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,false,polymat,mface->v2)); - poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,false,polymat,mface->v3)); - if (nverts==4) - poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,false,polymat,mface->v4)); - } + flat = false; + + poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,flat,polymat,mface->v1)); + poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,flat,polymat,mface->v2)); + poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,flat,polymat,mface->v3)); + if (nverts==4) + poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,flat,polymat,mface->v4)); + meshobj->AddPolygon(poly); if (poly->IsCollider()) { @@ -1125,8 +1119,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* } } meshobj->m_xyz_index_to_vertex_index_mapping.clear(); - if(skinMesh) - ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.clear(); meshobj->UpdateMaterialList(); // pre calculate texture generation @@ -1545,7 +1537,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, -static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { +static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { RAS_LightObject lightobj; KX_LightObject *gamelight; @@ -1577,8 +1569,15 @@ static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX } else { lightobj.m_type = RAS_LightObject::LIGHT_NORMAL; } + +#ifdef BLENDER_GLSL + if(converter->GetGLSLMaterials()) + GPU_lamp_from_blender(ob, la); - gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj); + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj, ob->gpulamp); +#else + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj, NULL); +#endif BL_ConvertLampIpos(la, gamelight, converter); return gamelight; @@ -1610,7 +1609,7 @@ static KX_GameObject *gameobject_from_blenderobject( { case OB_LAMP: { - KX_LightObject* gamelight= gamelight_from_blamp(static_cast(ob->data), ob->lay, kxscene, rendertools, converter); + KX_LightObject* gamelight= gamelight_from_blamp(ob, static_cast(ob->data), ob->lay, kxscene, rendertools, converter); gameobj = gamelight; gamelight->AddRef(); @@ -1660,7 +1659,7 @@ static KX_GameObject *gameobject_from_blenderobject( // two options exists for deform: shape keys and armature // only support relative shape key bool bHasShapeKey = mesh->key != NULL && mesh->key->type==KEY_RELATIVE; - bool bHasDvert = mesh->dvert != NULL; + bool bHasDvert = mesh->dvert != NULL && ob->defbase.first; bool bHasArmature = (ob->parent && ob->parent->type == OB_ARMATURE && ob->partype==PARSKEL && bHasDvert); if (bHasShapeKey) { @@ -1671,13 +1670,15 @@ static KX_GameObject *gameobject_from_blenderobject( if (bHasArmature) dcont->LoadShapeDrivers(ob->parent); } else if (bHasArmature) { - BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); + BL_SkinDeformer *dcont = new BL_SkinDeformer((BL_DeformableGameObject*)gameobj, + ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; } else if (bHasDvert) { // this case correspond to a mesh that can potentially deform but not with the // object to which it is attached for the moment. A skin mesh was created in // BL_ConvertMesh() so must create a deformer too! - BL_MeshDeformer *dcont = new BL_MeshDeformer(ob, (BL_SkinMeshObject*)meshobj ); + BL_MeshDeformer *dcont = new BL_MeshDeformer((BL_DeformableGameObject*)gameobj, + ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; } @@ -2075,7 +2076,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (blenderscene->camera) { KX_Camera *gamecamera= (KX_Camera*) converter->FindGameObject(blenderscene->camera); - kxscene->SetActiveCamera(gamecamera); + if(gamecamera) + kxscene->SetActiveCamera(gamecamera); } // Set up armatures diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index 212827a660f..39d66a90e92 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -39,6 +39,7 @@ #endif #include "RAS_IPolygonMaterial.h" +#include "BL_DeformableGameObject.h" #include "BL_MeshDeformer.h" #include "BL_SkinMeshObject.h" #include "DNA_mesh_types.h" @@ -47,33 +48,40 @@ #include "GEN_Map.h" #include "STR_HashedString.h" -bool BL_MeshDeformer::Apply(RAS_IPolyMaterial *mat) +bool BL_MeshDeformer::Apply(RAS_IPolyMaterial*) { - size_t i, j, index; - vecVertexArray array; - vecIndexArrays mvarray; - vecIndexArrays diarray; + size_t i, j; + float *co; - RAS_TexVert *tv; - MVert *mvert; + // only apply once per frame if the mesh is actually modified + if(m_pMeshObject->MeshModified() && + m_lastDeformUpdate != m_gameobj->GetLastFrame()) { + // For each material + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - // For each material - array = m_pMeshObject->GetVertexCache(mat); - mvarray = m_pMeshObject->GetMVertCache(mat); - diarray = m_pMeshObject->GetDIndexCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); - // For each array - for (i=0; isize(); j++){ - tv = &((*array[i])[j]); - index = ((*diarray[i])[j]); + // For each array + for (i=0; imvert[((*mvarray[i])[index])]); - tv->SetXYZ(MT_Point3(mvert->co)); + // For each vertex + for (j=0; jmvert[v.getOrigIndex()].co; + v.SetXYZ(MT_Point3(co)); + } + } } + + m_lastDeformUpdate = m_gameobj->GetLastFrame(); + + return true; } - return true; + + return false; } BL_MeshDeformer::~BL_MeshDeformer() @@ -92,83 +100,86 @@ void BL_MeshDeformer::RecalcNormals() /* We don't normalize for performance, not doing it for faces normals * gives area-weight normals which often look better anyway, and use * GL_NORMALIZE so we don't have to do per vertex normalization either - * since the GPU can do it faster - * - * There's a lot of indirection here to get to the data, can this work - * with less arrays/indirection? */ - - vecIndexArrays indexarrays; - vecIndexArrays mvarrays; - vecIndexArrays diarrays; - vecVertexArray vertexarrays; + * since the GPU can do it faster */ size_t i, j; /* set vertex normals to zero */ - for (i=0; i<(size_t)m_bmesh->totvert; i++) - m_transnors[i] = MT_Vector3(0.0f, 0.0f, 0.0f); + memset(m_transnors, 0, sizeof(float)*3*m_bmesh->totvert); /* add face normals to vertices. */ for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); mit != m_pMeshObject->GetLastMaterial(); ++ mit) { RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - indexarrays = m_pMeshObject->GetIndexCache(mat); - vertexarrays = m_pMeshObject->GetVertexCache(mat); - diarrays = m_pMeshObject->GetDIndexCache(mat); - mvarrays = m_pMeshObject->GetMVertCache(mat); + const vecIndexArrays& indexarrays = m_pMeshObject->GetIndexCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); for (i=0; iUsesTriangles()? 3: 4; for(j=0; jgetLocalXYZ(); - fnor = (((mv2-mv1).cross(mv3-mv2))+((mv4-mv3).cross(mv1-mv4))); //.safe_normalized(); + n1[0]= co1[0]-co3[0]; + n1[1]= co1[1]-co3[1]; + n1[2]= co1[2]-co3[2]; + + n2[0]= co2[0]-co4[0]; + n2[1]= co2[1]-co4[1]; + n2[2]= co2[2]-co4[2]; } - else - fnor = ((mv2-mv1).cross(mv3-mv2)); //.safe_normalized(); + else { + n1[0]= co1[0]-co2[0]; + n2[0]= co2[0]-co3[0]; + n1[1]= co1[1]-co2[1]; + + n2[1]= co2[1]-co3[1]; + n1[2]= co1[2]-co2[2]; + n2[2]= co2[2]-co3[2]; + } + + fnor[0]= n1[1]*n2[2] - n1[2]*n2[1]; + fnor[1]= n1[2]*n2[0] - n1[0]*n2[2]; + fnor[2]= n1[0]*n2[1] - n1[1]*n2[0]; /* add to vertices for smooth normals */ - m_transnors[mvarray[diarray[i1]]] += fnor; - m_transnors[mvarray[diarray[i2]]] += fnor; - m_transnors[mvarray[diarray[i3]]] += fnor; + float *vn1 = m_transnors[v1.getOrigIndex()]; + float *vn2 = m_transnors[v2.getOrigIndex()]; + float *vn3 = m_transnors[v3.getOrigIndex()]; + + vn1[0] += fnor[0]; vn1[1] += fnor[1]; vn1[2] += fnor[2]; + vn2[0] += fnor[0]; vn2[1] += fnor[1]; vn2[2] += fnor[2]; + vn3[0] += fnor[0]; vn3[1] += fnor[1]; vn3[2] += fnor[2]; + + if(v4) { + float *vn4 = m_transnors[v4->getOrigIndex()]; + vn4[0] += fnor[0]; vn4[1] += fnor[1]; vn4[2] += fnor[2]; + } /* in case of flat - just assign, the vertices are split */ if(v1.getFlag() & TV_CALCFACENORMAL) { v1.SetNormal(fnor); v2.SetNormal(fnor); v3.SetNormal(fnor); - } - - if(nvert == 4) { - int i4 = indexarray[j+3]; - RAS_TexVert& v4 = vertexarray[i4]; - - /* same as above */ - m_transnors[mvarray[diarray[i4]]] += fnor; - - if(v4.getFlag() & TV_CALCFACENORMAL) - v4.SetNormal(fnor); + if(v4) + v4->SetNormal(fnor); } } } @@ -179,18 +190,17 @@ void BL_MeshDeformer::RecalcNormals() mit != m_pMeshObject->GetLastMaterial(); ++ mit) { RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - vertexarrays = m_pMeshObject->GetVertexCache(mat); - diarrays = m_pMeshObject->GetDIndexCache(mat); - mvarrays = m_pMeshObject->GetMVertCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); for (i=0; itotvert)][3]; - m_transnors=new MT_Vector3[m_bmesh->totvert]; + m_transverts=new float[m_bmesh->totvert][3]; + m_transnors=new float[m_bmesh->totvert][3]; m_tvtot = m_bmesh->totvert; } } diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h index 8d8b56b1eed..e9f7f0b192f 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.h +++ b/source/gameengine/Converter/BL_MeshDeformer.h @@ -40,19 +40,25 @@ #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning #endif //WIN32 +class BL_DeformableGameObject; + class BL_MeshDeformer : public RAS_Deformer { public: void VerifyStorage(); void RecalcNormals(); virtual void Relink(GEN_Map*map){}; - BL_MeshDeformer(struct Object* obj, class BL_SkinMeshObject *meshobj ): + BL_MeshDeformer(BL_DeformableGameObject *gameobj, + struct Object* obj, + class BL_SkinMeshObject *meshobj ): m_pMeshObject(meshobj), m_bmesh((struct Mesh*)(obj->data)), m_transverts(0), m_transnors(0), m_objMesh(obj), - m_tvtot(0) + m_tvtot(0), + m_gameobj(gameobj), + m_lastDeformUpdate(-1) {}; virtual ~BL_MeshDeformer(); virtual void SetSimulatedTime(double time){}; @@ -68,10 +74,12 @@ protected: // this is so m_transverts doesn't need to be converted // before deformation float (*m_transverts)[3]; - MT_Vector3* m_transnors; + float (*m_transnors)[3]; struct Object* m_objMesh; // -- int m_tvtot; + BL_DeformableGameObject* m_gameobj; + double m_lastDeformUpdate; }; #endif diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h index 9f8361dbaca..5f0188e3a42 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.h +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -58,9 +58,8 @@ public: Object *bmeshobj, BL_SkinMeshObject *mesh) : - BL_SkinDeformer(bmeshobj, mesh), - m_lastShapeUpdate(-1), - m_gameobj(gameobj) + BL_SkinDeformer(gameobj,bmeshobj, mesh), + m_lastShapeUpdate(-1) { }; @@ -72,9 +71,8 @@ public: bool release_object, BL_ArmatureObject* arma = NULL) : - BL_SkinDeformer(bmeshobj_old, bmeshobj_new, mesh, release_object, arma), - m_lastShapeUpdate(-1), - m_gameobj(gameobj) + BL_SkinDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, arma), + m_lastShapeUpdate(-1) { }; @@ -94,7 +92,6 @@ public: protected: vector m_shapeDrivers; double m_lastShapeUpdate; - BL_DeformableGameObject* m_gameobj; }; diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index dd7119b1031..d3442fe5298 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -57,11 +57,12 @@ extern "C"{ #define __NLA_DEFNORMALS //#undef __NLA_DEFNORMALS -BL_SkinDeformer::BL_SkinDeformer(struct Object *bmeshobj, +BL_SkinDeformer::BL_SkinDeformer(BL_DeformableGameObject *gameobj, + struct Object *bmeshobj, class BL_SkinMeshObject *mesh, BL_ArmatureObject* arma) : // - BL_MeshDeformer(bmeshobj, mesh), + BL_MeshDeformer(gameobj, bmeshobj, mesh), m_armobj(arma), m_lastArmaUpdate(-1), m_defbase(&bmeshobj->defbase), @@ -71,12 +72,13 @@ BL_SkinDeformer::BL_SkinDeformer(struct Object *bmeshobj, }; BL_SkinDeformer::BL_SkinDeformer( + BL_DeformableGameObject *gameobj, struct Object *bmeshobj_old, // Blender object that owns the new mesh struct Object *bmeshobj_new, // Blender object that owns the original mesh class BL_SkinMeshObject *mesh, bool release_object, BL_ArmatureObject* arma) : - BL_MeshDeformer(bmeshobj_old, mesh), + BL_MeshDeformer(gameobj, bmeshobj_old, mesh), m_armobj(arma), m_lastArmaUpdate(-1), m_defbase(&bmeshobj_old->defbase), @@ -96,35 +98,32 @@ BL_SkinDeformer::~BL_SkinDeformer() m_armobj->Release(); } -bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) +bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *) { - size_t i, j, index; - vecVertexArray array; - vecIndexArrays mvarray; - vecMDVertArray dvarray; - vecIndexArrays diarray; + size_t i, j; - RAS_TexVert *tv; - MT_Point3 pt; -// float co[3]; + if (!Update()) + // no need to update the cache + return false; - Update(); + // Update all materials at once, so we can do the above update test + // without ending up with some materials not updated + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - array = m_pMeshObject->GetVertexCache(mat); - mvarray = m_pMeshObject->GetMVertCache(mat); - diarray = m_pMeshObject->GetDIndexCache(mat); - // For each array - for (i=0; isize(); j++) { + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); - tv = &((*array[i])[j]); - - index = ((*diarray[i])[j]); - - // Copy the untransformed data from the original mvert - // Set the data - tv->SetXYZ(m_transverts[((*mvarray[i])[index])]); + // For each array + for (i=0; im_MvertArrayCache1[vtxarray]->size(); - - /* Check to see if this has already been pushed */ - for (vector::iterator it = m_mvert_to_dvert_mapping[mv].begin(); - it != m_mvert_to_dvert_mapping[mv].end(); - it++) - { - if(it->mat == mat) - return it->index; - } - - ao->m_MvertArrayCache1[vtxarray]->push_back(mv); - ao->m_DvertArrayCache1[vtxarray]->push_back(dv); - - BL_MDVertMap mdmap; - mdmap.mat = mat; - mdmap.index = numvert; - m_mvert_to_dvert_mapping[mv].push_back(mdmap); - - return numvert; -}; - -int BL_SkinMeshObject::FindVertexArray(int numverts,RAS_IPolyMaterial* polymat) -{ - int array=-1; - - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(polymat); - - - for (size_t i=0;im_VertexArrayCache1.size();i++) - { - if ( (ao->m_TriangleArrayCount[i] + (numverts-2)) < BUCKET_MAX_TRIANGLES) - { - if((ao->m_VertexArrayCache1[i]->size()+numverts < BUCKET_MAX_INDICES)) - { - array = i; - ao->m_TriangleArrayCount[array]+=numverts-2; - break; - } - } - } - - - if (array == -1) - { - array = ao->m_VertexArrayCache1.size(); - - vector* va = new vector; - ao->m_VertexArrayCache1.push_back(va); - - KX_IndexArray *ia = new KX_IndexArray(); - ao->m_IndexArrayCache1.push_back(ia); - - KX_IndexArray *bva = new KX_IndexArray(); - ao->m_MvertArrayCache1.push_back(bva); - - BL_DeformVertArray *dva = new BL_DeformVertArray(); - ao->m_DvertArrayCache1.push_back(dva); - - KX_IndexArray *da = new KX_IndexArray(); - ao->m_DIndexArrayCache1.push_back(da); - - ao->m_TriangleArrayCount.push_back(numverts-2); - - } - - - return array; -} - - //void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,RAS_BucketManager* bucketmgr) void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec) { diff --git a/source/gameengine/Converter/BL_SkinMeshObject.h b/source/gameengine/Converter/BL_SkinMeshObject.h index cc2b8de600e..c21fb64204b 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.h +++ b/source/gameengine/Converter/BL_SkinMeshObject.h @@ -44,78 +44,19 @@ #include "DNA_key_types.h" #include "DNA_meshdata_types.h" -typedef vector BL_MVertArray; -typedef vector BL_DeformVertArray; -typedef vector BL_VertexArray; - - -typedef vector*> vecMDVertArray; -typedef vector*> vecBVertexArray; - -class BL_SkinArrayOptimizer : public KX_ArrayOptimizer -{ -public: - BL_SkinArrayOptimizer(int index) - :KX_ArrayOptimizer (index) {}; - virtual ~BL_SkinArrayOptimizer(){ - - for (vector::iterator itv = m_MvertArrayCache1.begin(); - !(itv == m_MvertArrayCache1.end());itv++) - { - delete (*itv); - } - for (vector::iterator itd = m_DvertArrayCache1.begin(); - !(itd == m_DvertArrayCache1.end());itd++) - { - delete (*itd); - } - for (vector::iterator iti = m_DIndexArrayCache1.begin(); - !(iti == m_DIndexArrayCache1.end());iti++) - { - delete (*iti); - } - - m_MvertArrayCache1.clear(); - m_DvertArrayCache1.clear(); - m_DIndexArrayCache1.clear(); - }; - - vector m_MvertArrayCache1; - vector m_DvertArrayCache1; - vector m_DIndexArrayCache1; - -}; - class BL_SkinMeshObject : public RAS_MeshObject { // enum { BUCKET_MAX_INDICES = 16384};//2048};//8192}; // enum { BUCKET_MAX_TRIANGLES = 4096}; - KX_ArrayOptimizer* GetArrayOptimizer(RAS_IPolyMaterial* polymat) - { - KX_ArrayOptimizer** aop = (m_matVertexArrayS[*polymat]); - if (aop) - return *aop; - int numelements = m_matVertexArrayS.size(); - m_sortedMaterials.push_back(polymat); - - BL_SkinArrayOptimizer* ao = new BL_SkinArrayOptimizer(numelements); - m_matVertexArrayS.insert(*polymat,ao); - return ao; - } - protected: vector m_cacheWeightIndex; public: - struct BL_MDVertMap { RAS_IPolyMaterial *mat; int index; }; - vector > m_mvert_to_dvert_mapping; - void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec); // void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,class RAS_BucketManager* bucketmgr); - int FindVertexArray(int numverts,RAS_IPolyMaterial* polymat); BL_SkinMeshObject(Mesh* mesh, int lightlayer) : RAS_MeshObject (mesh, lightlayer) { m_class = 1; @@ -144,42 +85,7 @@ public: } } }; - - const vecIndexArrays& GetDIndexCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_DIndexArrayCache1; - } - const vecMDVertArray& GetDVertCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_DvertArrayCache1; - } - const vecIndexArrays& GetMVertCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_MvertArrayCache1; - } - void AddPolygon(RAS_Polygon* poly); - int FindOrAddDeform(unsigned int vtxarray, unsigned int mv, struct MDeformVert *dv, RAS_IPolyMaterial* mat); - int FindOrAddVertex(int vtxarray,const MT_Point3& xyz, - const MT_Point2& uv, - const MT_Point2& uv2, - const MT_Vector4& tangent, - const unsigned int rgbacolor, - const MT_Vector3& normal, int defnr, bool flat, RAS_IPolyMaterial* mat, int origindex) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat); - int numverts = ao->m_VertexArrayCache1[vtxarray]->size(); - int index = RAS_MeshObject::FindOrAddVertex(vtxarray, xyz, uv, uv2, tangent, rgbacolor, normal, flat, mat, origindex); - - /* this means a new vertex was added, so we add the defnr too */ - if(index == numverts) - ao->m_DIndexArrayCache1[vtxarray]->push_back(defnr); - - return index; - } // for shape keys, void CheckWeightCache(struct Object* obj); diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp index 06e012123b1..dd45d522b9f 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.cpp +++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp @@ -1,9 +1,11 @@ #include "DNA_customdata_types.h" +#include "DNA_material_types.h" #include "BL_BlenderShader.h" +#include "BL_Material.h" -#if 0 +#ifdef BLENDER_GLSL #include "GPU_extensions.h" #include "GPU_material.h" #endif @@ -13,29 +15,32 @@ const bool BL_BlenderShader::Ok()const { -#if 0 +#ifdef BLENDER_GLSL return (mGPUMat != 0); +#else + return 0; #endif - - return false; } -BL_BlenderShader::BL_BlenderShader(struct Material *ma) +BL_BlenderShader::BL_BlenderShader(struct Material *ma, int lightlayer) : -#if 0 +#ifdef BLENDER_GLSL mGPUMat(0), #endif - mBound(false) + mBound(false), + mLightLayer(lightlayer) { -#if 0 - if(ma) - mGPUMat = GPU_material_from_blender(ma, GPU_PROFILE_DERIVEDMESH); +#ifdef BLENDER_GLSL + if(ma) { + GPU_material_from_blender(ma); + mGPUMat = ma->gpumaterial; + } #endif } BL_BlenderShader::~BL_BlenderShader() { -#if 0 +#ifdef BLENDER_GLSL if(mGPUMat) { GPU_material_unbind(mGPUMat); mGPUMat = 0; @@ -43,16 +48,12 @@ BL_BlenderShader::~BL_BlenderShader() #endif } -void BL_BlenderShader::ApplyShader() -{ -} - void BL_BlenderShader::SetProg(bool enable) { -#if 0 +#ifdef BLENDER_GLSL if(mGPUMat) { if(enable) { - GPU_material_bind(mGPUMat); + GPU_material_bind(mGPUMat, mLightLayer); mBound = true; } else { @@ -65,7 +66,7 @@ void BL_BlenderShader::SetProg(bool enable) int BL_BlenderShader::GetAttribNum() { -#if 0 +#ifdef BLENDER_GLSL GPUVertexAttribs attribs; int i, enabled = 0; @@ -82,17 +83,19 @@ int BL_BlenderShader::GetAttribNum() enabled = BL_MAX_ATTRIB; return enabled; -#endif - +#else return 0; +#endif } -void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) +void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat) { -#if 0 +#ifdef BLENDER_GLSL GPUVertexAttribs attribs; int i, attrib_num; + ras->SetAttribNum(0); + if(!mGPUMat) return; @@ -109,14 +112,24 @@ void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) if(attribs.layer[i].glindex > attrib_num) continue; - if(attribs.layer[i].type == CD_MTFACE) - ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + if(attribs.layer[i].type == CD_MTFACE) { + if(!mat->uvName.IsEmpty() && strcmp(mat->uvName.ReadPtr(), attribs.layer[i].name) == 0) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + else if(!mat->uv2Name.IsEmpty() && strcmp(mat->uv2Name.ReadPtr(), attribs.layer[i].name) == 0) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV2, attribs.layer[i].glindex); + else + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + } else if(attribs.layer[i].type == CD_TANGENT) ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, attribs.layer[i].glindex); else if(attribs.layer[i].type == CD_ORCO) ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_ORCO, attribs.layer[i].glindex); else if(attribs.layer[i].type == CD_NORMAL) ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_NORM, attribs.layer[i].glindex); + else if(attribs.layer[i].type == CD_MCOL) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_VCOL, attribs.layer[i].glindex); + else + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, attribs.layer[i].glindex); } ras->EnableTextures(true); @@ -128,8 +141,8 @@ void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) void BL_BlenderShader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) { -#if 0 - float obmat[4][4], viewmat[4][4]; +#ifdef BLENDER_GLSL + float obmat[4][4], viewmat[4][4], viewinvmat[4][4]; if(!mGPUMat || !mBound) return; @@ -142,7 +155,20 @@ void BL_BlenderShader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) model.getValue((float*)obmat); view.getValue((float*)viewmat); - GPU_material_bind_uniforms(mGPUMat, obmat, viewmat); + view.invert(); + view.getValue((float*)viewinvmat); + + GPU_material_bind_uniforms(mGPUMat, obmat, viewmat, viewinvmat); +#endif +} + +bool BL_BlenderShader::Equals(BL_BlenderShader *blshader) +{ +#ifdef BLENDER_GLSL + /* to avoid unneeded state switches */ + return (blshader && mGPUMat == blshader->mGPUMat && mLightLayer == blshader->mLightLayer); +#else + return true; #endif } diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h index 4cab0e644c3..b758d1a9cba 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.h +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -2,7 +2,7 @@ #ifndef __BL_GPUSHADER_H__ #define __BL_GPUSHADER_H__ -#if 0 +#ifdef BLENDER_GLSL #include "GPU_material.h" #endif @@ -12,7 +12,10 @@ #include "MT_Tuple3.h" #include "MT_Tuple4.h" +#include "RAS_IPolygonMaterial.h" + struct Material; +class BL_Material; #define BL_MAX_ATTRIB 16 @@ -23,22 +26,24 @@ struct Material; class BL_BlenderShader { private: -#if 0 +#ifdef BLENDER_GLSL GPUMaterial *mGPUMat; #endif bool mBound; + int mLightLayer; public: - BL_BlenderShader(struct Material *ma); + BL_BlenderShader(struct Material *ma, int lightlayer); virtual ~BL_BlenderShader(); const bool Ok()const; void SetProg(bool enable); - void ApplyShader(); - void SetTexCoords(class RAS_IRasterizer* ras); int GetAttribNum(); + void SetAttribs(class RAS_IRasterizer* ras, const BL_Material *mat); void Update(const class KX_MeshSlot & ms, class RAS_IRasterizer* rasty); + + bool Equals(BL_BlenderShader *blshader); }; #endif//__BL_GPUSHADER_H__ diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp index f5312ccd023..7e3d6984f19 100644 --- a/source/gameengine/Ketsji/BL_Material.cpp +++ b/source/gameengine/Ketsji/BL_Material.cpp @@ -105,7 +105,8 @@ void BL_Material::GetConversionRGB(unsigned int *nrgb) { *nrgb = rgb[3]; } -void BL_Material::SetConversionUV(MT_Point2 *nuv) { +void BL_Material::SetConversionUV(const STR_String& name, MT_Point2 *nuv) { + uvName = name; uv[0] = *nuv++; uv[1] = *nuv++; uv[2] = *nuv++; @@ -118,7 +119,8 @@ void BL_Material::GetConversionUV(MT_Point2 *nuv){ *nuv++ = uv[2]; *nuv = uv[3]; } -void BL_Material::SetConversionUV2(MT_Point2 *nuv) { +void BL_Material::SetConversionUV2(const STR_String& name, MT_Point2 *nuv) { + uv2Name = name; uv2[0] = *nuv++; uv2[1] = *nuv++; uv2[2] = *nuv++; diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index ddb6662830a..568f7e171de 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -83,13 +83,16 @@ public: MT_Point2 uv[4]; MT_Point2 uv2[4]; + STR_String uvName; + STR_String uv2Name; + void SetConversionRGB(unsigned int *rgb); void GetConversionRGB(unsigned int *rgb); - void SetConversionUV(MT_Point2 *uv); + void SetConversionUV(const STR_String& name, MT_Point2 *uv); void GetConversionUV(MT_Point2 *uv); - void SetConversionUV2(MT_Point2 *uv); + void SetConversionUV2(const STR_String& name, MT_Point2 *uv); void GetConversionUV2(MT_Point2 *uv); void SetSharedMaterial(bool v); diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 02b1ffd432a..0f445a9f32e 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -38,6 +38,8 @@ extern "C" { // ------------------------------------ #define spit(x) std::cout << x << std::endl; +BL_BlenderShader *KX_BlenderMaterial::mLastBlenderShader = NULL; + //static PyObject *gTextureDict = 0; KX_BlenderMaterial::KX_BlenderMaterial( @@ -126,32 +128,31 @@ void KX_BlenderMaterial::OnConstruction() // when material are reused between objects return; - if(mMaterial->glslmat) { + if(mMaterial->glslmat) SetBlenderGLSLShader(); - } - else { - // for each unique material... - int i; - for(i=0; inum_enabled; i++) { - if( mMaterial->mapping[i].mapping & USEENV ) { - if(!GLEW_ARB_texture_cube_map) { - spit("CubeMap textures not supported"); - continue; - } - if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) + + // for each unique material... + int i; + for(i=0; inum_enabled; i++) { + if( mMaterial->mapping[i].mapping & USEENV ) { + if(!GLEW_ARB_texture_cube_map) { + spit("CubeMap textures not supported"); + continue; + } + if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) + spit("unable to initialize image("<matname<< ", image will not be available"); + } + + else { + if( mMaterial->img[i] ) { + if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) spit("unable to initialize image("<matname<< ", image will not be available"); - } - - else { - if( mMaterial->img[i] ) { - if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) - spit("unable to initialize image("<matname<< ", image will not be available"); - } + mMaterial->matname<< ", image will not be available"); } } } + mBlendFunc[0] =0; mBlendFunc[1] =0; mConstructed = true; @@ -168,7 +169,11 @@ void KX_BlenderMaterial::OnExit() } if( mBlenderShader ) { - mBlenderShader->SetProg(false); + if(mBlenderShader == mLastBlenderShader) { + mBlenderShader->SetProg(false); + mLastBlenderShader = NULL; + } + delete mBlenderShader; mBlenderShader = 0; } @@ -225,14 +230,23 @@ void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras { if( !enable || !mBlenderShader->Ok() ) { // frame cleanup. - mBlenderShader->SetProg(false); + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } BL_Texture::DisableAllTextures(); return; } - BL_Texture::DisableAllTextures(); - mBlenderShader->SetProg(true); - mBlenderShader->ApplyShader(); + if(!mBlenderShader->Equals(mLastBlenderShader)) { + BL_Texture::DisableAllTextures(); + + if(mLastBlenderShader) + mLastBlenderShader->SetProg(false); + + mBlenderShader->SetProg(true); + mLastBlenderShader= mBlenderShader; + } } void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras) @@ -298,7 +312,12 @@ KX_BlenderMaterial::ActivatShaders( // reset... if(tmp->mMaterial->IsShared()) cachingInfo =0; - + + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } + if (GetCachingInfo() != cachingInfo) { if (!cachingInfo) @@ -372,7 +391,7 @@ KX_BlenderMaterial::ActivateBlenderShaders( } ActivatGLMaterials(rasty); - mBlenderShader->SetTexCoords(rasty); + mBlenderShader->SetAttribs(rasty, mMaterial); } void @@ -382,6 +401,12 @@ KX_BlenderMaterial::ActivateMat( )const { KX_BlenderMaterial *tmp = const_cast(this); + + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } + if (GetCachingInfo() != cachingInfo) { if (!cachingInfo) tmp->setTexData( false,rasty ); @@ -460,17 +485,29 @@ KX_BlenderMaterial::Activate( return dopass; } +bool KX_BlenderMaterial::UsesLighting(RAS_IRasterizer *rasty) const +{ + if(!RAS_IPolyMaterial::UsesLighting(rasty)) + return false; + + if(mShader && mShader->Ok()); + else if(mBlenderShader && mBlenderShader->Ok()) + return false; + + return true; +} + void KX_BlenderMaterial::ActivateMeshSlot(const KX_MeshSlot & ms, RAS_IRasterizer* rasty) const { if(mShader && GLEW_ARB_shader_objects) mShader->Update(ms, rasty); - if(mBlenderShader && GLEW_ARB_shader_objects) + else if(mBlenderShader && GLEW_ARB_shader_objects) mBlenderShader->Update(ms, rasty); } void KX_BlenderMaterial::ActivatGLMaterials( RAS_IRasterizer* rasty )const { - if(!mBlenderShader) { + if(mShader || !mBlenderShader) { rasty->SetSpecularity( mMaterial->speccolor[0]*mMaterial->spec_f, mMaterial->speccolor[1]*mMaterial->spec_f, @@ -506,6 +543,7 @@ void KX_BlenderMaterial::ActivateTexGen(RAS_IRasterizer *ras) const ras->SetAttribNum(0); if(mShader && GLEW_ARB_shader_objects) { if(mShader->GetAttribute() == BL_Shader::SHD_TANGENT) { + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, 0); ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, 1); ras->SetAttribNum(2); } @@ -793,7 +831,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()") void KX_BlenderMaterial::SetBlenderGLSLShader(void) { if(!mBlenderShader) - mBlenderShader = new BL_BlenderShader(mMaterial->material); + mBlenderShader = new BL_BlenderShader(mMaterial->material, m_lightlayer); if(!mBlenderShader->Ok()) { delete mBlenderShader; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index 62e96b71937..bf6d2095e7c 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -94,6 +94,7 @@ private: BL_Material* mMaterial; BL_Shader* mShader; BL_BlenderShader* mBlenderShader; + static BL_BlenderShader *mLastBlenderShader; KX_Scene* mScene; BL_Texture mTextures[MAXTEX]; // texture array bool mUserDefBlend; @@ -106,6 +107,7 @@ private: void ActivatGLMaterials( RAS_IRasterizer* rasty )const; void ActivateTexGen( RAS_IRasterizer *ras ) const; + bool UsesLighting(RAS_IRasterizer *rasty) const; // message centers void setTexData( bool enable,RAS_IRasterizer *ras); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index db13d30e2f1..2ac4f909077 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1306,7 +1306,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, return meshproxy; } } - return NULL; + Py_RETURN_NONE; } diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 56a06786679..20187a193ba 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -55,6 +55,7 @@ #include "KX_Scene.h" #include "MT_CmMatrix4x4.h" #include "KX_Camera.h" +#include "KX_Light.h" #include "KX_PythonInit.h" #include "KX_PyConstraintBinding.h" #include "PHY_IPhysicsEnvironment.h" @@ -614,6 +615,9 @@ void KX_KetsjiEngine::Render() // pass the scene's worldsettings to the rasterizer SetWorldSettings(scene->GetWorldInfo()); + // shadow buffers + RenderShadowBuffers(scene); + // Avoid drawing the scene with the active camera twice when it's viewport is enabled if(cam && !cam->GetViewport()) { @@ -885,8 +889,48 @@ void KX_KetsjiEngine::SetupRenderFrame(KX_Scene *scene, KX_Camera* cam) viewport.GetTop() ); -} +} +void KX_KetsjiEngine::RenderShadowBuffers(KX_Scene *scene) +{ + CListValue *lightlist = scene->GetLightList(); + int i, drawmode; + + for(i=0; iGetCount(); i++) { + KX_LightObject *light = (KX_LightObject*)lightlist->GetValue(i); + + light->Update(); + + if(m_drawingmode == RAS_IRasterizer::KX_TEXTURED && light->HasShadowBuffer()) { + /* make temporary camera */ + RAS_CameraData camdata = RAS_CameraData(); + KX_Camera *cam = new KX_Camera(scene, scene->m_callbacks, camdata, false); + cam->SetName("__shadow__cam__"); + + MT_Transform camtrans; + + /* switch drawmode for speed */ + drawmode = m_rasterizer->GetDrawingMode(); + m_rasterizer->SetDrawingMode(RAS_IRasterizer::KX_SHADOW); + + /* binds framebuffer object, sets up camera .. */ + light->BindShadowBuffer(m_rasterizer, cam, camtrans); + + /* update scene */ + scene->UpdateMeshTransformations(); + scene->CalculateVisibleMeshes(m_rasterizer, cam, light->GetShadowLayer()); + + /* render */ + m_rasterizer->ClearDepthBuffer(); + scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); + + /* unbind framebuffer object, restore drawmode, free camera */ + light->UnbindShadowBuffer(m_rasterizer); + m_rasterizer->SetDrawingMode(drawmode); + cam->Release(); + } + } +} // update graphics void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam) diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 4c09bc3fcd5..77b69ec2d9e 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -179,6 +179,7 @@ private: void RenderFrame(KX_Scene* scene, KX_Camera* cam); void PostRenderFrame(); void RenderDebugProperties(); + void RenderShadowBuffers(KX_Scene *scene); void SetBackGround(KX_WorldInfo* worldinfo); void SetWorldSettings(KX_WorldInfo* worldinfo); void DoSound(KX_Scene* scene); diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 7decc5bc769..4e3d6180d22 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -36,14 +36,20 @@ #endif #include "KX_Light.h" +#include "KX_Camera.h" +#include "RAS_IRasterizer.h" #include "RAS_IRenderTools.h" #include "KX_PyMath.h" +#ifdef BLENDER_GLSL +#include "GPU_material.h" +#endif KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, class RAS_IRenderTools* rendertools, const RAS_LightObject& lightobj, + struct GPULamp *gpulamp, PyTypeObject* T ) : @@ -53,12 +59,12 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, m_lightobj = lightobj; m_lightobj.m_worldmatrix = GetOpenGLMatrixPtr(); m_rendertools->AddLight(&m_lightobj); + m_gpulamp = gpulamp; }; KX_LightObject::~KX_LightObject() { - m_rendertools->RemoveLight(&m_lightobj); } @@ -78,6 +84,78 @@ CValue* KX_LightObject::GetReplica() return replica; } +void KX_LightObject::Update() +{ +#ifdef BLENDER_GLSL + if(m_gpulamp) { + float obmat[4][4]; + double *dobmat = GetOpenGLMatrixPtr()->getPointer(); + + for(int i=0; i<4; i++) + for(int j=0; j<4; j++, dobmat++) + obmat[i][j] = (float)*dobmat; + + GPU_lamp_update(m_gpulamp, obmat); + } +#endif +} + +bool KX_LightObject::HasShadowBuffer() +{ +#ifdef BLENDER_GLSL + return (m_gpulamp && GPU_lamp_has_shadow_buffer(m_gpulamp)); +#else + return false; +#endif +} + +int KX_LightObject::GetShadowLayer() +{ +#ifdef BLENDER_GLSL + if(m_gpulamp) + return GPU_lamp_shadow_layer(m_gpulamp); + else +#endif + return 0; +} + +void KX_LightObject::BindShadowBuffer(RAS_IRasterizer *ras, KX_Camera *cam, MT_Transform& camtrans) +{ +#ifdef BLENDER_GLSL + float viewmat[4][4], winmat[4][4]; + int winsize; + + /* bind framebuffer */ + GPU_lamp_shadow_buffer_bind(m_gpulamp, viewmat, &winsize, winmat); + + /* setup camera transformation */ + MT_Matrix4x4 modelviewmat((float*)viewmat); + MT_Matrix4x4 projectionmat((float*)winmat); + + MT_Transform trans = MT_Transform((float*)viewmat); + camtrans.invert(trans); + + cam->SetModelviewMatrix(modelviewmat); + cam->SetProjectionMatrix(projectionmat); + + cam->NodeSetLocalPosition(camtrans.getOrigin()); + cam->NodeSetLocalOrientation(camtrans.getBasis()); + cam->NodeUpdateGS(0,true); + + /* setup rasterizer transformations */ + ras->SetProjectionMatrix(projectionmat); + ras->SetViewMatrix(modelviewmat, cam->NodeGetWorldPosition(), + cam->GetCameraLocation(), cam->GetCameraOrientation()); +#endif +} + +void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras) +{ +#ifdef BLENDER_GLSL + GPU_lamp_shadow_buffer_unbind(m_gpulamp); +#endif +} + PyObject* KX_LightObject::_getattr(const STR_String& attr) { if (attr == "layer") diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index 236d3e4e12e..62eb26c61a8 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -32,19 +32,33 @@ #include "RAS_LightObject.h" #include "KX_GameObject.h" +struct GPULamp; +class KX_Camera; +class RAS_IRasterizer; +class RAS_IRenderTools; +class MT_Transform; + class KX_LightObject : public KX_GameObject { Py_Header; protected: RAS_LightObject m_lightobj; class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj + struct GPULamp *m_gpulamp; static char doc[]; public: - KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, PyTypeObject *T = &Type); + KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, struct GPULamp *gpulamp, PyTypeObject *T = &Type); virtual ~KX_LightObject(); virtual CValue* GetReplica(); RAS_LightObject* GetLightData() { return &m_lightobj;} + + /* GLSL shadow */ + bool HasShadowBuffer(); + int GetShadowLayer(); + void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans); + void UnbindShadowBuffer(class RAS_IRasterizer *ras); + void Update(); virtual PyObject* _getattr(const STR_String& attr); /* lens, near, far, projection_matrix */ virtual int _setattr(const STR_String& attr, PyObject *pyvalue); diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index c5f6230b2f2..065800379d8 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -888,6 +888,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) else if (bHasArmature) { BL_SkinDeformer* skinDeformer = new BL_SkinDeformer( + newobj, oldblendobj, blendobj, static_cast(mesh), true, @@ -899,7 +900,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) else if (bHasDvert) { BL_MeshDeformer* meshdeformer = new BL_MeshDeformer( - oldblendobj, static_cast(mesh) + newobj, oldblendobj, static_cast(mesh) ); newobj->m_pDeformer = meshdeformer; } @@ -1004,12 +1005,13 @@ void KX_Scene::UpdateMeshTransformations() } } -void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam) +void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam, int layer) { int intersect = KX_Camera::INTERSECT; KX_GameObject *gameobj = node->Client()?(KX_GameObject*) node->Client()->GetSGClientObject():NULL; - bool dotest = (gameobj && gameobj->GetVisible()) || node->Left() || node->Right(); - + bool visible = (gameobj && gameobj->GetVisible() && (!layer || (gameobj->GetLayer() & layer))); + bool dotest = visible || node->Left() || node->Right(); + /* If the camera is inside the box, assume intersect. */ if (dotest && !node->inside( cam->NodeGetWorldPosition())) { @@ -1033,19 +1035,19 @@ void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam break; case KX_Camera::INTERSECT: if (gameobj) - MarkVisible(rasty, gameobj,cam); + MarkVisible(rasty, gameobj, cam, layer); if (node->Left()) - MarkVisible(node->Left(), rasty,cam); + MarkVisible(node->Left(), rasty, cam, layer); if (node->Right()) - MarkVisible(node->Right(), rasty,cam); + MarkVisible(node->Right(), rasty, cam, layer); break; case KX_Camera::INSIDE: - MarkSubTreeVisible(node, rasty, true,cam); + MarkSubTreeVisible(node, rasty, true, cam, layer); break; } } -void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible,KX_Camera* cam) +void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera* cam, int layer) { if (node->Client()) { @@ -1068,16 +1070,23 @@ void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool vi } } if (node->Left()) - MarkSubTreeVisible(node->Left(), rasty, visible,cam); + MarkSubTreeVisible(node->Left(), rasty, visible, cam, layer); if (node->Right()) - MarkSubTreeVisible(node->Right(), rasty, visible,cam); + MarkSubTreeVisible(node->Right(), rasty, visible, cam, layer); } -void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Camera* cam) +void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Camera* cam,int layer) { // User (Python/Actuator) has forced object invisible... if (!gameobj->GetVisible()) return; + + // Shadow lamp layers + if(layer && !(gameobj->GetLayer() & layer)) { + gameobj->MarkVisible(false); + return; + } + // If Frustum culling is off, the object is always visible. bool vis = !cam->GetFrustumCulling(); @@ -1127,20 +1136,20 @@ void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Cam } } -void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam) +void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam, int layer) { // FIXME: When tree is operational #if 1 // do this incrementally in the future for (int i = 0; i < m_objectlist->GetCount(); i++) { - MarkVisible(rasty, static_cast(m_objectlist->GetValue(i)), cam); + MarkVisible(rasty, static_cast(m_objectlist->GetValue(i)), cam, layer); } #else if (cam->GetFrustumCulling()) - MarkVisible(m_objecttree, rasty, cam); + MarkVisible(m_objecttree, rasty, cam, layer); else - MarkSubTreeVisible(m_objecttree, rasty, true, cam); + MarkSubTreeVisible(m_objecttree, rasty, true, cam, layer); #endif } diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 733df2f69a1..28dee1b5893 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -260,9 +260,9 @@ protected: /** * Visibility testing functions. */ - void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera*cam); - void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera*cam); - void MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj, KX_Camera*cam); + void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera*cam,int layer=0); + void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera*cam,int layer=0); + void MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj, KX_Camera*cam, int layer=0); double m_suspendedtime; double m_suspendeddelta; @@ -483,7 +483,7 @@ public: void SetNetworkScene(NG_NetworkScene *newScene); void SetWorldInfo(class KX_WorldInfo* wi); KX_WorldInfo* GetWorldInfo(); - void CalculateVisibleMeshes(RAS_IRasterizer* rasty, KX_Camera *cam); + void CalculateVisibleMeshes(RAS_IRasterizer* rasty, KX_Camera *cam, int layer=0); void UpdateMeshTransformations(); KX_Camera* GetpCamera(); SND_Scene* GetSoundScene(); diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp index 50df1a1e2ea..b4492ca03a9 100644 --- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp +++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp @@ -109,7 +109,7 @@ void RAS_BucketManager::RenderAlphaBuckets( // it is needed for compatibility. rasty->SetDepthMask(RAS_IRasterizer::KX_DEPTHMASK_DISABLED); - int drawingmode; + RAS_IRasterizer::DrawMode drawingmode; std::multiset< alphamesh, backtofront>::iterator msit = alphameshset.begin(); for (; msit != alphameshset.end(); ++msit) { diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index bff98abe058..cb10ba6bf37 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -27,6 +27,7 @@ */ #include "RAS_IPolygonMaterial.h" +#include "RAS_IRasterizer.h" #ifdef HAVE_CONFIG_H #include @@ -148,4 +149,19 @@ const unsigned int RAS_IPolyMaterial::GetFlag() const return m_flag; } +bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const +{ + bool dolights = false; + + if(m_flag & RAS_BLENDERMAT) + dolights = (m_flag &RAS_MULTILIGHT)!=0; + else if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID); + else if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW); + else + dolights = (m_drawingmode & 16)!=0; + + return dolights; +} + unsigned int RAS_IPolyMaterial::m_newpolymatid = 0; + diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h index 09824f6975c..d2d1dba99d9 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h @@ -140,6 +140,8 @@ public: const STR_String& GetMaterialName() const; const STR_String& GetTextureName() const; const unsigned int GetFlag() const; + + virtual bool UsesLighting(RAS_IRasterizer *rasty) const; /* * PreCalculate texture gen diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h index dbedc492afa..d4a9177a85d 100644 --- a/source/gameengine/Rasterizer/RAS_IRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h @@ -33,12 +33,23 @@ #pragma warning (disable:4786) #endif +#include "STR_HashedString.h" + #include "MT_CmMatrix4x4.h" #include "MT_Matrix4x4.h" +#include "RAS_TexVert.h" + +#include +using namespace std; + class RAS_ICanvas; class RAS_IPolyMaterial; -#include "RAS_MaterialBucket.h" + +typedef vector KX_IndexArray; +typedef vector KX_VertexArray; +typedef vector< KX_VertexArray* > vecVertexArray; +typedef vector< KX_IndexArray* > vecIndexArrays; /** * 3D rendering device context interface. @@ -62,7 +73,18 @@ public: KX_WIREFRAME, KX_SOLID, KX_SHADED, - KX_TEXTURED + KX_TEXTURED, + KX_SHADOW + }; + + /** + * Drawing modes + */ + + enum DrawMode { + KX_MODE_LINES = 1, + KX_MODE_TRIANGLES, + KX_MODE_QUADS }; /** @@ -111,6 +133,7 @@ public: RAS_TEXCO_NORM, //< Normal coordinates RAS_TEXTANGENT, //< RAS_TEXCO_UV2, //< + RAS_TEXCO_VCOL, //< Vertex Color RAS_TEXCO_DISABLE //< Disable this texture unit (cached) }; @@ -197,45 +220,37 @@ public: * IndexPrimitives: Renders primitives. * @param vertexarrays is an array of vertex arrays * @param indexarrays is an array of index arrays - * @param mode determines the type of primitive stored in the vertex/index arrays: - * 0 triangles - * 1 lines (default) - * 2 quads - * @param polymat (reserved) + * @param mode determines the type of primitive stored in the vertex/index arrays * @param useObjectColor will render the object using @param rgbacolor instead of * vertex colors. */ - virtual void IndexPrimitives( const vecVertexArray& vertexarrays, + virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot)=0; + virtual void IndexPrimitivesMulti( + const vecVertexArray& vertexarrays, + const vecIndexArrays & indexarrays, + DrawMode mode, + bool useObjectColor, + const MT_Vector4& rgbacolor, + class KX_ListSlot** slot)=0; + /** * IndexPrimitives_3DText will render text into the polygons. * The text to be rendered is from @param rendertools client object's text property. */ virtual void IndexPrimitives_3DText( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, + DrawMode mode, class RAS_IPolyMaterial* polymat, class RAS_IRenderTools* rendertools, bool useObjectColor, const MT_Vector4& rgbacolor)=0; - virtual void IndexPrimitivesMulti( - const vecVertexArray& vertexarrays, - const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, - bool useObjectColor, - const MT_Vector4& rgbacolor, - class KX_ListSlot** slot)=0; - virtual void SetProjectionMatrix(MT_CmMatrix4x4 & mat)=0; /* This one should become our final version, methinks. */ /** diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index 1beade7acf7..e295d69e48e 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -167,38 +167,30 @@ RAS_MaterialBucket::T_MeshSlotList::iterator RAS_MaterialBucket::msEnd() } bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools *rendertools, int &drawmode) + RAS_IRenderTools *rendertools, RAS_IRasterizer::DrawMode &drawmode) { rendertools->SetViewMat(cameratrans); if (!rasty->SetMaterial(*m_material)) return false; - bool dolights = false; - const unsigned int flag = m_material->GetFlag(); - - if( flag & RAS_BLENDERMAT) - dolights = (flag &RAS_MULTILIGHT)!=0; - else - dolights = (m_material->GetDrawingMode()&16)!=0; - - if ((rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID) || !dolights) - { - rendertools->ProcessLighting(-1); - } - else - { + if (m_material->UsesLighting(rasty)) rendertools->ProcessLighting(RAS_IRenderTools::RAS_LIGHT_OBJECT_LAYER/*m_material->GetLightLayer()*/); - } + else + rendertools->ProcessLighting(-1); - drawmode = (rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID ? - 1: (m_material->UsesTriangles() ? 0 : 2)); + if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID) + drawmode = RAS_IRasterizer::KX_MODE_LINES; + else if(m_material->UsesTriangles()) + drawmode = RAS_IRasterizer::KX_MODE_TRIANGLES; + else + drawmode = RAS_IRasterizer::KX_MODE_QUADS; return true; } void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, int drawmode) + RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, RAS_IRasterizer::DrawMode drawmode) { if (!ms.m_bVisible) return; @@ -225,6 +217,17 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_DisplayList->SetModified(ms.m_mesh->MeshModified()); } + // verify if we can use display list, not for deformed object, and + // also don't create a new display list when drawing shadow buffers, + // then it won't have texture coordinates for actual drawing + KX_ListSlot **displaylist; + if(ms.m_pDeformer) + displaylist = 0; + else if(!ms.m_DisplayList && rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW) + displaylist = 0; + else + displaylist = &ms.m_DisplayList; + // Use the text-specific IndexPrimitives for text faces if (m_material->GetDrawingMode() & RAS_IRasterizer::RAS_RENDER_3DPOLYGON_TEXT) { @@ -245,12 +248,9 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_mesh->GetVertexCache(m_material), ms.m_mesh->GetIndexCache(m_material), drawmode, - m_material, - rendertools, ms.m_bObjectColor, ms.m_RGBAcolor, - (ms.m_pDeformer)? 0: &ms.m_DisplayList - ); + displaylist); } // Use the normal IndexPrimitives @@ -260,12 +260,9 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_mesh->GetVertexCache(m_material), ms.m_mesh->GetIndexCache(m_material), drawmode, - m_material, - rendertools, // needed for textprinting on polys ms.m_bObjectColor, ms.m_RGBAcolor, - (ms.m_pDeformer)? 0: &ms.m_DisplayList - ); + displaylist); } if(rasty->QueryLists()) { @@ -287,7 +284,7 @@ void RAS_MaterialBucket::Render(const MT_Transform& cameratrans, //rasty->SetMaterial(*m_material); - int drawmode; + RAS_IRasterizer::DrawMode drawmode; for (T_MeshSlotList::const_iterator it = m_meshSlots.begin(); ! (it == m_meshSlots.end()); ++it) { diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h index 5ad0c173a56..13d8a53714a 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h @@ -35,17 +35,13 @@ #include "MT_Transform.h" #include "RAS_IPolygonMaterial.h" +#include "RAS_IRasterizer.h" #include "RAS_Deformer.h" // __NLA #include #include #include using namespace std; -typedef vector KX_IndexArray; -typedef vector KX_VertexArray; -typedef vector< KX_VertexArray* > vecVertexArray; -typedef vector< KX_IndexArray* > vecIndexArrays; - /** * KX_VertexIndex */ @@ -146,9 +142,9 @@ public: const MT_Vector4& rgbavec); void RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, int drawmode); + RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, RAS_IRasterizer::DrawMode drawmode); bool ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools *rendertools, int &drawmode); + RAS_IRenderTools *rendertools, RAS_IRasterizer::DrawMode& drawmode); unsigned int NumMeshSlots(); T_MeshSlotList::iterator msBegin(); diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index d7ab88a6b06..4420f16c56d 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -68,8 +68,8 @@ RAS_MeshObject::RAS_MeshObject(Mesh* mesh, int lightlayer) m_lightlayer(lightlayer), m_zsort(false), m_MeshMod(true), - m_class(0), - m_mesh(mesh) + m_mesh(mesh), + m_class(0) { } @@ -259,18 +259,18 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray, const MT_Vector3& normal, bool flat, RAS_IPolyMaterial* mat, - int orgindex) + int origindex) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); int numverts = ao->m_VertexArrayCache1[vtxarray]->size();//m_VertexArrayCount[vtxarray]; - RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, flat? TV_CALCFACENORMAL: 0); + RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, flat? TV_CALCFACENORMAL: 0,origindex); #define KX_FIND_SHARED_VERTICES #ifdef KX_FIND_SHARED_VERTICES if(!flat) { - for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[orgindex].begin(); - it != m_xyz_index_to_vertex_index_mapping[orgindex].end(); + for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[origindex].begin(); + it != m_xyz_index_to_vertex_index_mapping[origindex].end(); it++) { if ((*it).m_arrayindex1 == ao->m_index1 && @@ -293,22 +293,18 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray, idx.m_array = vtxarray; idx.m_index = numverts; idx.m_matid = mat; - m_xyz_index_to_vertex_index_mapping[orgindex].push_back(idx); + m_xyz_index_to_vertex_index_mapping[origindex].push_back(idx); return numverts; } - - -const vecVertexArray& RAS_MeshObject::GetVertexCache (RAS_IPolyMaterial* mat) +vecVertexArray& RAS_MeshObject::GetVertexCache (RAS_IPolyMaterial* mat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); return ao->m_VertexArrayCache1; } - - int RAS_MeshObject::GetVertexArrayLength(RAS_IPolyMaterial* mat) { int len = 0; @@ -362,7 +358,7 @@ RAS_TexVert* RAS_MeshObject::GetVertex(unsigned int matid, const vecIndexArrays& RAS_MeshObject::GetIndexCache (RAS_IPolyMaterial* mat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); return ao->m_IndexArrayCache1; } @@ -371,16 +367,27 @@ const vecIndexArrays& RAS_MeshObject::GetIndexCache (RAS_IPolyMaterial* mat) KX_ArrayOptimizer* RAS_MeshObject::GetArrayOptimizer(RAS_IPolyMaterial* polymat) { - KX_ArrayOptimizer** aop = (m_matVertexArrayS[*polymat]); + KX_ArrayOptimizer** aop = m_matVertexArrayS[polymat]; - if (aop) + if(aop) return *aop; + // didn't find array, but an array might already exist + // for a material equal to this one + for(int i=0;igetValue()); + if(*mat == *polymat) { + m_matVertexArrayS.insert(polymat, *m_matVertexArrayS.at(i)); + return *m_matVertexArrayS.at(i); + } + } + + // create new array int numelements = m_matVertexArrayS.size(); m_sortedMaterials.push_back(polymat); - + KX_ArrayOptimizer* ao = new KX_ArrayOptimizer(numelements); - m_matVertexArrayS.insert(*polymat,ao); + m_matVertexArrayS.insert(polymat, ao); return ao; } @@ -463,7 +470,7 @@ RAS_TexVert* RAS_MeshObject::GetVertex(short array, unsigned int index, RAS_IPolyMaterial* polymat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(polymat);//*(m_matVertexArrays[*polymat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(polymat); return &((*(ao->m_VertexArrayCache1)[array])[index]); } @@ -471,13 +478,19 @@ RAS_TexVert* RAS_MeshObject::GetVertex(short array, void RAS_MeshObject::ClearArrayData() { - for (int i=0;i m_matVertexArrayS; + GEN_Map m_matVertexArrayS; RAS_MaterialBucket::Set m_materials; Mesh* m_mesh; @@ -242,10 +242,10 @@ public: const MT_Vector3& normal, bool flat, RAS_IPolyMaterial* mat, - int orgindex + int origindex ); - const vecVertexArray& GetVertexCache (RAS_IPolyMaterial* mat); + vecVertexArray& GetVertexCache (RAS_IPolyMaterial* mat); int GetVertexArrayLength(RAS_IPolyMaterial* mat); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index 39080b80492..c2687319717 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -161,9 +161,7 @@ void RAS_ListRasterizer::ReleaseAlloc() void RAS_ListRasterizer::IndexPrimitives( const vecVertexArray & vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) @@ -185,15 +183,13 @@ void RAS_ListRasterizer::IndexPrimitives( if (mUseVertexArrays) { RAS_VAOpenGLRasterizer::IndexPrimitives( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } else { RAS_OpenGLRasterizer::IndexPrimitives( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } @@ -208,9 +204,7 @@ void RAS_ListRasterizer::IndexPrimitives( void RAS_ListRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) @@ -230,18 +224,19 @@ void RAS_ListRasterizer::IndexPrimitivesMulti( } } - if (mUseVertexArrays) { + // workaround: note how we do not use vertex arrays for making display + // lists, since glVertexAttribPointerARB doesn't seem to work correct + // in display lists on ATI? either a bug in the driver or in Blender .. + if (mUseVertexArrays && !localSlot) { RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } else { RAS_OpenGLRasterizer::IndexPrimitivesMulti( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h index 4b3304d7396..b1b19144c12 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h @@ -52,9 +52,7 @@ public: virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot @@ -63,9 +61,7 @@ public: virtual void IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index 18147b53f4c..dcc36bf5a39 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -368,23 +368,11 @@ void RAS_OpenGLRasterizer::SetDrawingMode(int drawingmode) switch (m_drawingmode) { - case KX_BOUNDINGBOX: - { - } case KX_WIREFRAME: { glDisable (GL_CULL_FACE); break; } - case KX_TEXTURED: - { - } - case KX_SHADED: - { - } - case KX_SOLID: - { - } default: { } @@ -603,33 +591,14 @@ void RAS_OpenGLRasterizer::GetViewMatrix(MT_Matrix4x4 &mat) const void RAS_OpenGLRasterizer::IndexPrimitives(const vecVertexArray & vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot ) { - GLenum drawmode; - switch (mode) - { - case 0: - drawmode = GL_TRIANGLES; - break; - case 1: - drawmode = GL_LINES; - break; - case 2: - drawmode = GL_QUADS; - break; - default: - drawmode = GL_LINES; - break; - } - - const RAS_TexVert* vertexarray ; - unsigned int numindices,vt; + const RAS_TexVert* vertexarray; + unsigned int numindices, vt; for (vt=0;vtgetLocalXYZ()); - glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1()); - glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); glNormalPointer(GL_FLOAT,vtxstride,vertexarray->getNormal()); + glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1()); + if(glIsEnabled(GL_COLOR_ARRAY)) + glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); //if(m_Lock) // local->Begin(vertexarrays[vt]->size()); @@ -169,8 +166,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays //if(m_Lock) // local->End(); - - } glDisableClientState(GL_TEXTURE_COORD_ARRAY); @@ -178,28 +173,21 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) { static const GLsizei vtxstride = sizeof(RAS_TexVert); + GLenum drawmode; - switch (mode) - { - case 0: - drawmode = GL_TRIANGLES; - break; - case 2: - drawmode = GL_QUADS; - break; - case 1: //lines - default: - drawmode = GL_LINES; - break; - } + if(mode == KX_MODE_TRIANGLES) + drawmode = GL_TRIANGLES; + else if(mode == KX_MODE_QUADS) + drawmode = GL_QUADS; + else + drawmode = GL_LINES; + const RAS_TexVert* vertexarray; unsigned int numindices, vt; @@ -232,10 +220,10 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa continue; glVertexPointer(3,GL_FLOAT,vtxstride,vertexarray->getLocalXYZ()); - TexCoordPtr(vertexarray); - - glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); glNormalPointer(GL_FLOAT,vtxstride,vertexarray->getNormal()); + TexCoordPtr(vertexarray); + if(glIsEnabled(GL_COLOR_ARRAY)) + glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); //if(m_Lock) // local->Begin(vertexarrays[vt]->size()); @@ -296,19 +284,22 @@ void RAS_VAOpenGLRasterizer::TexCoordPtr(const RAS_TexVert *tv) switch(m_attrib[unit]) { case RAS_TEXCO_ORCO: case RAS_TEXCO_GLOB: - glVertexAttribPointer(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getLocalXYZ()); + glVertexAttribPointerARB(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getLocalXYZ()); break; case RAS_TEXCO_UV1: - glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV1()); + glVertexAttribPointerARB(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV1()); break; case RAS_TEXCO_NORM: - glVertexAttribPointer(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getNormal()); + glVertexAttribPointerARB(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getNormal()); break; case RAS_TEXTANGENT: - glVertexAttribPointer(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent()); + glVertexAttribPointerARB(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent()); break; case RAS_TEXCO_UV2: - glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV2()); + glVertexAttribPointerARB(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV2()); + break; + case RAS_TEXCO_VCOL: + glVertexAttribPointerARB(unit, 4, GL_UNSIGNED_BYTE, GL_FALSE, sizeof(RAS_TexVert), tv->getRGBA()); break; default: break; @@ -386,11 +377,12 @@ void RAS_VAOpenGLRasterizer::EnableTextures(bool enable) case RAS_TEXCO_NORM: case RAS_TEXTANGENT: case RAS_TEXCO_UV2: - if(enable) glEnableVertexAttribArray(unit); - else glDisableVertexAttribArray(unit); + case RAS_TEXCO_VCOL: + if(enable) glEnableVertexAttribArrayARB(unit); + else glDisableVertexAttribArrayARB(unit); break; default: - glDisableVertexAttribArray(unit); + glDisableVertexAttribArrayARB(unit); break; } } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h index ea08887028f..e4cc4ace0e8 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h @@ -52,9 +52,7 @@ public: virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot); @@ -62,9 +60,7 @@ public: virtual void IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot); diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index 61ac456b2bc..935633dc636 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -40,7 +40,8 @@ RAS_TexVert::RAS_TexVert(const MT_Point3& xyz, const MT_Vector4& tangent, const unsigned int rgba, const MT_Vector3& normal, - const short flag) + const short flag, + const unsigned int origindex) { xyz.getValue(m_localxyz); uv.getValue(m_uv1); @@ -49,6 +50,7 @@ RAS_TexVert::RAS_TexVert(const MT_Point3& xyz, SetNormal(normal); tangent.getValue(m_tangent); m_flag = flag; + m_origindex = origindex; m_unit = 2; } @@ -107,44 +109,6 @@ void RAS_TexVert::SetNormal(const MT_Vector3& normal) normal.getValue(m_normal); } -#ifndef RAS_TexVert_INLINE - -// leave multiline for debugging -const float* RAS_TexVert::getUV1 () const -{ - return m_uv1; -} - -const float* RAS_TexVert::getUV2 () const -{ - return m_uv2; -} - - - -const float* RAS_TexVert::getNormal() const -{ - return m_normal; -} - -const float* RAS_TexVert::getTangent() const -{ - return m_tangent; -} - - -const float* RAS_TexVert::getLocalXYZ() const -{ - return m_localxyz; -} - -const unsigned char* RAS_TexVert::getRGBA() const -{ - return (unsigned char*) &m_rgba; -} - -#endif - // compare two vertices, and return TRUE if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { diff --git a/source/gameengine/Rasterizer/RAS_TexVert.h b/source/gameengine/Rasterizer/RAS_TexVert.h index 84135db918f..bf092b4b230 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.h +++ b/source/gameengine/Rasterizer/RAS_TexVert.h @@ -42,8 +42,6 @@ static MT_Point2 g_pt2; #define TV_MAX 3//match Def in BL_Material.h -#define RAS_TexVert_INLINE 1 - class RAS_TexVert { @@ -55,9 +53,10 @@ class RAS_TexVert float m_normal[3]; // 3*2 = 6 short m_flag; // 2 unsigned int m_unit; // 4 + unsigned int m_origindex; // 4 //--------- - // 52 - //32 bytes total size, fits nice = 52 = not fit nice. + // 56 + // 32 bytes total size, fits nice = 56 = not fit nice. // We'll go for 64 bytes total size - 24 bytes left. public: short getFlag() const; @@ -71,11 +70,10 @@ public: const MT_Vector4& tangent, const unsigned int rgba, const MT_Vector3& normal, - const short flag); + const short flag, + const unsigned int origindex); ~RAS_TexVert() {}; - // leave multiline for debugging -#ifdef RAS_TexVert_INLINE const float* getUV1 () const { return m_uv1; }; @@ -99,13 +97,11 @@ public: const unsigned char* getRGBA() const { return (unsigned char *) &m_rgba; } -#else - const float* getUV1 () const; - const float* getUV2 () const; - const float* getNormal() const; - const float* getLocalXYZ() const; - const unsigned char* getRGBA() const; -#endif + + const unsigned int getOrigIndex() const { + return m_origindex; + } + void SetXYZ(const MT_Point3& xyz); void SetUV(const MT_Point2& uv); void SetUV2(const MT_Point2& uv); diff --git a/source/kernel/gen_system/GEN_HashedPtr.h b/source/kernel/gen_system/GEN_HashedPtr.h index 777ec76e067..13faa5f227b 100644 --- a/source/kernel/gen_system/GEN_HashedPtr.h +++ b/source/kernel/gen_system/GEN_HashedPtr.h @@ -39,6 +39,7 @@ public: GEN_HashedPtr(void* val) : m_valptr(val) {}; unsigned int hash() const { return GEN_Hash(m_valptr);}; inline friend bool operator ==(const GEN_HashedPtr & rhs, const GEN_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;}; + void *getValue() const { return m_valptr; } }; #endif //__GEN_HASHEDPTR diff --git a/source/kernel/gen_system/GEN_Map.h b/source/kernel/gen_system/GEN_Map.h index f9c14800499..37c75d8293a 100644 --- a/source/kernel/gen_system/GEN_Map.h +++ b/source/kernel/gen_system/GEN_Map.h @@ -82,6 +82,24 @@ public: } return 0; } + + Key* getKey(int index) { + int count=0; + for (int i=0;im_key; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } void clear() { for (int i = 0; i < m_num_buckets; ++i) { From 310a37c29c283b2a7aef0ec2e3cc7fe366b23698 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 10 Jul 2008 14:23:19 +0000 Subject: [PATCH 379/430] Adding an option for action actuator - "Continue" this means animations always play from where they left off. Continue was the 2.46 operation too, so new functionality is the option to disable. When using states, an action like kick or throw can often switch out before finishing playing the action, and there was no way to play from the start frame the second time round. (even setting the actions current frame through python doesn't work work) --- source/blender/makesdna/DNA_actuator_types.h | 5 +-- source/blender/src/buttons_logic.c | 20 +++++++----- .../Converter/BL_ActionActuator.cpp | 32 +++++++++++++++++-- .../gameengine/Converter/BL_ActionActuator.h | 5 +++ .../Converter/KX_ConvertActuators.cpp | 1 + source/gameengine/PyDoc/BL_ActionActuator.py | 15 +++++++++ 6 files changed, 65 insertions(+), 13 deletions(-) diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 77ebef744eb..a467722e8e1 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -51,8 +51,9 @@ typedef struct bActionActuator { int sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ char frameProp[32]; /* Set this property to the actions current frame */ - int blendin; /* Number of frames of blending */ - short priority; /* Execution priority */ + short blendin; /* Number of frames of blending */ + short priority; /* Execution priority */ + short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ float stridelength; /* Displacement incurred by cycle */ } bActionActuator; diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 7050e61a6ac..cc4df06e22d 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1769,23 +1769,27 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh #else str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6"; #endif - uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, (width-60)/2, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); - uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+30 + ((width-60)/2), yco-24, (width-60)/2, 19, &aa->act, "Action name"); + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, width/3, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); + uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+10+ (width/3), yco-24, ((width/3)*2) - (20 + 60), 19, &aa->act, "Action name"); + + uiDefButBitS(block, TOGN, 1, 0, "Continue", xco+((width/3)*2)+20, yco-24, 60, 19, + &aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time"); + if(aa->type == ACT_ACTION_FROM_PROP) { - uiDefBut(block, TEX, 0, "Prop: ",xco+30, yco-44, width-60, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); + uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); } else { - uiDefButI(block, NUM, 0, "Sta: ",xco+30, yco-44, (width-60)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); - uiDefButI(block, NUM, 0, "End: ",xco+30+(width-60)/2, yco-44, (width-60)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); + uiDefButI(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); + uiDefButI(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); } - uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); - uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); + uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending"); + uiDefButS(block, NUM, 0, "Priority: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); - uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); + uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 44f6ec1af90..5d6dd694765 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -184,6 +184,11 @@ bool BL_ActionActuator::Update(double curtime, bool frame) if (bNegativeEvent) { + // dont continue where we left off when restarting + if (m_end_reset) { + m_flag &= ~ACT_FLAG_LOCKINPUT; + } + if (!(m_flag & ACT_FLAG_ACTIVE)) return false; m_flag &= ~ACT_FLAG_ACTIVE; @@ -472,8 +477,10 @@ PyMethodDef BL_ActionActuator::Methods[] = { {"getFrameProperty", (PyCFunction) BL_ActionActuator::sPyGetFrameProperty, METH_VARARGS, GetFrameProperty_doc}, {"setChannel", (PyCFunction) BL_ActionActuator::sPySetChannel, METH_VARARGS, SetChannel_doc}, // {"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_VARARGS}, - {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, + {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, {"setType", (PyCFunction) BL_ActionActuator::sPySetType, METH_VARARGS, SetType_doc}, + {"getContinue", (PyCFunction) BL_ActionActuator::sPyGetContinue, METH_NOARGS, 0}, + {"setContinue", (PyCFunction) BL_ActionActuator::sPySetContinue, METH_O, 0}, {NULL,NULL} //Sentinel }; @@ -978,7 +985,26 @@ PyObject* BL_ActionActuator::PySetType(PyObject* self, default: printf("Invalid type for action actuator: %d\n", typeArg); /* error */ } - - Py_Return; + Py_RETURN_NONE; +} + +PyObject* BL_ActionActuator::PyGetContinue(PyObject* self) { + return PyInt_FromLong((long)(m_end_reset==0)); +} + +PyObject* BL_ActionActuator::PySetContinue(PyObject* self, PyObject* value) { + int param = PyObject_IsTrue( value ); + + if( param == -1 ) { + PyErr_SetString( PyExc_TypeError, "expected True/False or 0/1" ); + return NULL; + } + + if (param) { + m_end_reset = 0; + } else { + m_end_reset = 1; + } + Py_RETURN_NONE; } diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h index 190f727c9c3..a67b6d29b74 100644 --- a/source/gameengine/Converter/BL_ActionActuator.h +++ b/source/gameengine/Converter/BL_ActionActuator.h @@ -47,6 +47,7 @@ public: short playtype, short blendin, short priority, + short end_reset, float stride, PyTypeObject* T=&Type) : SCA_IActuator(gameobj,T), @@ -64,6 +65,7 @@ public: m_stridelength(stride), m_playtype(playtype), m_priority(priority), + m_end_reset(end_reset), m_pose(NULL), m_blendpose(NULL), m_userpose(NULL), @@ -101,6 +103,8 @@ public: // KX_PYMETHOD(BL_ActionActuator,GetChannel); KX_PYMETHOD_DOC(BL_ActionActuator,GetType); KX_PYMETHOD_DOC(BL_ActionActuator,SetType); + KX_PYMETHOD_NOARGS(BL_ActionActuator,GetContinue); + KX_PYMETHOD_O(BL_ActionActuator,SetContinue); virtual PyObject* _getattr(const STR_String& attr); @@ -137,6 +141,7 @@ protected: float m_stridelength; short m_playtype; short m_priority; + short m_end_reset; struct bPose* m_pose; struct bPose* m_blendpose; struct bPose* m_userpose; diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 9b1bc1e6b90..1f87e9d9ac7 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -193,6 +193,7 @@ void BL_ConvertActuators(char* maggiename, actact->type, // + 1, because Blender starts to count at zero, actact->blendin, actact->priority, + actact->end_reset, actact->stridelength // Ketsji at 1, because zero is reserved for "NoDef" ); diff --git a/source/gameengine/PyDoc/BL_ActionActuator.py b/source/gameengine/PyDoc/BL_ActionActuator.py index 41f41080c31..d56888cde80 100644 --- a/source/gameengine/PyDoc/BL_ActionActuator.py +++ b/source/gameengine/PyDoc/BL_ActionActuator.py @@ -86,6 +86,14 @@ class BL_ActionActuator(SCA_IActuator): @param mode: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND @type mode: integer """ + + def setContinue(cont): + """ + Set the actions continue option True or False. see getContinue. + + @param cont: The continue option. + @type cont: bool + """ def getType(): """ @@ -94,6 +102,13 @@ class BL_ActionActuator(SCA_IActuator): @rtype: integer @return: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND """ + + def getContinue(): + """ + When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame. + + @rtype: bool + """ def getAction(): """ From 46493c0af5e60f8841eaccb7d79b9537c9252406 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 10 Jul 2008 15:30:35 +0000 Subject: [PATCH 380/430] Fix for bug #17292: vertex paint blur darkens the colors as you paint, due to old optimization to use >>8, but this is equivalent to /256, and it should be /255. --- source/blender/src/vpaint.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 4e883caba55..935c546a235 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -566,9 +566,9 @@ static unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } @@ -586,11 +586,11 @@ static unsigned int mcol_add(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - temp= cp1[1] + ((fac*cp2[1])>>8); + temp= cp1[1] + ((fac*cp2[1])/255); if(temp>254) cp[1]= 255; else cp[1]= temp; - temp= cp1[2] + ((fac*cp2[2])>>8); + temp= cp1[2] + ((fac*cp2[2])/255); if(temp>254) cp[2]= 255; else cp[2]= temp; - temp= cp1[3] + ((fac*cp2[3])>>8); + temp= cp1[3] + ((fac*cp2[3])/255); if(temp>254) cp[3]= 255; else cp[3]= temp; return col; @@ -609,11 +609,11 @@ static unsigned int mcol_sub(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - temp= cp1[1] - ((fac*cp2[1])>>8); + temp= cp1[1] - ((fac*cp2[1])/255); if(temp<0) cp[1]= 0; else cp[1]= temp; - temp= cp1[2] - ((fac*cp2[2])>>8); + temp= cp1[2] - ((fac*cp2[2])/255); if(temp<0) cp[2]= 0; else cp[2]= temp; - temp= cp1[3] - ((fac*cp2[3])>>8); + temp= cp1[3] - ((fac*cp2[3])/255); if(temp<0) cp[3]= 0; else cp[3]= temp; return col; @@ -635,9 +635,9 @@ static unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac) /* first mul, then blend the fac */ cp[0]= 255; - cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])>>8) )>>8; - cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])>>8) )>>8; - cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])>>8) )>>8; + cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])/255) )/255; + cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])/255) )/255; + cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])/255) )/255; return col; @@ -664,9 +664,9 @@ static unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac) return col1; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } @@ -692,9 +692,9 @@ static unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac) return col1; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } From 7971d7c9f308e54066da748d24943b7f65cbb869 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 10 Jul 2008 16:29:42 +0000 Subject: [PATCH 381/430] Fix for bug #14665: stars not working in 3D view. --- source/blender/render/intern/source/convertblender.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index f9ec0e9d843..faa7a68f754 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -204,6 +204,7 @@ void RE_make_stars(Render *re, void (*initfunc)(void), else stargrid *= 1.0; /* then it draws fewer */ if(re) MTC_Mat4Invert(mat, re->viewmat); + else MTC_Mat4One(mat); /* BOUNDING BOX CALCULATION * bbox goes from z = loc_near_var | loc_far_var, From 8eab9e15d5e4dac5373b8a2c3ed771cf2cf2f933 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 10 Jul 2008 18:11:36 +0000 Subject: [PATCH 382/430] Fix for bug #14411: missing preview render redraw for a few lamp buttons. --- source/blender/src/buttons_shading.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index ca6705b2084..1b580381ca5 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2900,15 +2900,15 @@ static void lamp_panel_lamp(Object *ob, Lamp *la) uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButS(block, MENU, B_LAMPREDRAW, "Falloff %t|Constant %x0|Inverse Linear %x1|Inverse Square %x2|Custom Curve %x3|Lin/Quad Weighted %x4|", 10,150,100,19, &la->falloff_type, 0,0,0,0, "Lamp falloff - intensity decay with distance"); - uiDefButBitS(block, TOG, LA_SPHERE, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value"); + uiDefButBitS(block, TOG, LA_SPHERE, B_LAMPPRV,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value"); } uiBlockBeginAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButBitS(block, TOG, LA_LAYER, 0,"Layer", 10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same layer as the lamp only"); uiDefButBitS(block, TOG, LA_NEG, B_LAMPPRV,"Negative", 10,50,100,19,&la->mode, 0, 0, 0, 0, "Sets lamp to cast negative light"); - uiDefButBitS(block, TOG, LA_NO_DIFF, 0,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp"); - uiDefButBitS(block, TOG, LA_NO_SPEC, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp"); + uiDefButBitS(block, TOG, LA_NO_DIFF, B_LAMPPRV,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp"); + uiDefButBitS(block, TOG, LA_NO_SPEC, B_LAMPPRV,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp"); uiBlockEndAlign(block); uiBlockSetCol(block, TH_AUTO); From 2e144abfbdeed7f6011c47e36d5f8f514b1bcee7 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 11 Jul 2008 00:36:38 +0000 Subject: [PATCH 383/430] Bugfix #17306: Missing refresh call for button in UserPrefs Autokey settings were missing redraw for Info-window --- source/blender/src/space.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index fe9bb3279cc..3b8bb4c3929 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -4440,7 +4440,10 @@ static void winqreadinfospace(ScrArea *sa, void *spacedata, BWinEvent *evt) switch(event) { case UI_BUT_EVENT: - if(val==REDRAWTIME) allqueue(REDRAWTIME, 0); + if(val==REDRAWTIME) { + allqueue(REDRAWTIME, 0); + addqueue(sa->win, REDRAW, 1); + } else if(val==B_ADD_THEME) { bTheme *btheme, *new; From 3fce5ba59ad7ce7033ecf135e45ce768b7f81026 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 11 Jul 2008 14:11:55 +0000 Subject: [PATCH 384/430] Memory leak fix: br_find_exe() uses strdup() which uses malloc and therefore the returned string needs free'ing (Found with valgrind). --- source/blender/blenlib/intern/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 5a85fbfc375..48ebf770e1b 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1722,6 +1722,7 @@ void BLI_where_am_i(char *fullname, const char *name) path = br_find_exe( NULL ); if (path) { strcpy(fullname, path); + free(path); return; } #endif From efb2639a26d2dbbc11e2edc3b17c34646eade902 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Fri, 11 Jul 2008 17:08:45 +0000 Subject: [PATCH 385/430] Memory leak fix (found with Valgrind) --- source/blender/blenlib/intern/storage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index ca7a376d3a2..fbcc56ac21d 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -382,6 +382,7 @@ void BLI_adddirstrings() pwuser = getpwuid(files[num].s.st_uid); if ( pwuser ) { strcpy(files[num].owner, pwuser->pw_name); + free(pwuser); } else { sprintf(files[num].owner, "%d", files[num].s.st_uid); } From 1ffdc6679171c40ac1b2e5852ceaaa1495fbcd17 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Fri, 11 Jul 2008 23:47:44 +0000 Subject: [PATCH 386/430] Fix for bug [#13479] Particle system "corrupts" when changing material colour and used in conjunction with softbodies - changing particlesystem settings for hair particles cleared & recalculated everything even when hair softbody was baked --- source/blender/blenkernel/intern/pointcache.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 57ecffbb796..43805959e62 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -459,9 +459,10 @@ int BKE_ptcache_object_reset(Object *ob, int mode) PTCacheID pid; ParticleSystem *psys; ModifierData *md; - int reset; + int reset, skip; reset= 0; + skip= 0; if(ob->soft) { BKE_ptcache_id_from_softbody(&pid, ob, ob->soft); @@ -469,11 +470,18 @@ int BKE_ptcache_object_reset(Object *ob, int mode) } for(psys=ob->particlesystem.first; psys; psys=psys->next) { - BKE_ptcache_id_from_particles(&pid, ob, psys); - reset |= BKE_ptcache_id_reset(&pid, mode); - + /* Baked softbody hair has to be checked first, because we don't want to reset */ + /* particles or softbody in that case -jahka */ if(psys->soft) { BKE_ptcache_id_from_softbody(&pid, ob, psys->soft); + if(mode == PSYS_RESET_ALL || !(psys->part->type == PART_HAIR && (pid.cache->flag & PTCACHE_BAKED))) + reset |= BKE_ptcache_id_reset(&pid, mode); + else + skip = 1; + } + + if(skip == 0) { + BKE_ptcache_id_from_particles(&pid, ob, psys); reset |= BKE_ptcache_id_reset(&pid, mode); } } From d124d3c5cdfdc9d470a4734281396b97c4d3afb5 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 12 Jul 2008 04:02:08 +0000 Subject: [PATCH 387/430] soc-2008-mxcurioni: first part of the Freestyle Python implementation. A new Freestyle module is added. The following modules are implemented: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. I added a Convert module to help in the creation of Python objects for Freestyle's data structures. I also added a missing file for guarded_alloc needed for compilation on Windows. --- intern/guardedalloc/intern/mmap_win.c | 260 ++++++++++++++++++ intern/guardedalloc/mmap_win.h | 51 ++++ source/blender/freestyle/SConscript | 14 +- .../freestyle/intern/app_blender/api.cpp | 111 +++----- .../intern/python/BinaryPredicate0D.cpp | 147 +++++++++- .../intern/python/BinaryPredicate0D.h | 37 +++ .../intern/python/BinaryPredicate1D.cpp | 150 +++++++++- .../intern/python/BinaryPredicate1D.h | 37 +++ .../python/BinaryPredicate1D/FalseBP1D.cpp | 8 +- .../python/BinaryPredicate1D/Length2DBP1D.cpp | 8 +- .../BinaryPredicate1D/SameShapeIdBP1D.cpp | 8 +- .../python/BinaryPredicate1D/TrueBP1D.cpp | 8 +- .../ViewMapGradientNormBP1D.cpp | 6 +- .../freestyle/intern/python/Convert.cpp | 54 ++++ .../blender/freestyle/intern/python/Convert.h | 32 +++ .../intern/python/CurvePointIterator.cpp | 142 +++++----- .../freestyle/intern/python/Freestyle.cpp | 136 +++++++++ .../freestyle/intern/python/Freestyle.h | 32 +++ source/blender/freestyle/intern/python/Id.cpp | 197 +++++++++++-- source/blender/freestyle/intern/python/Id.h | 39 +++ .../freestyle/intern/python/Interface0D.cpp | 179 ++++++++++-- .../freestyle/intern/python/Interface0D.h | 36 +++ .../intern/python/Interface0D/CurvePoint.cpp | 88 +++--- .../Interface0D/CurvePoint/StrokeVertex.cpp | 52 ++-- .../intern/python/Interface0D/SVertex.cpp | 134 ++++----- .../intern/python/Interface0D/ViewVertex.cpp | 38 +-- .../Interface0D/ViewVertex/NonTVertex.cpp | 66 ++--- .../python/Interface0D/ViewVertex/TVertex.cpp | 92 +++---- .../intern/python/Interface0DIterator.cpp | 52 ++-- .../freestyle/intern/python/Interface1D.cpp | 179 +++++++++--- .../freestyle/intern/python/Interface1D.h | 36 +++ .../intern/python/Interface1D/Curve.cpp | 56 ++-- .../intern/python/Interface1D/FEdge.cpp | 126 ++++----- .../python/Interface1D/FEdge/FEdgeSharp.cpp | 22 +- .../python/Interface1D/FEdge/FEdgeSmooth.cpp | 16 +- .../intern/python/Interface1D/Stroke.cpp | 118 ++++---- .../intern/python/Interface1D/ViewEdge.cpp | 118 ++++---- .../freestyle/intern/python/Material.cpp | 56 ++-- .../blender/freestyle/intern/python/Noise.cpp | 24 +- .../freestyle/intern/python/Operators.cpp | 77 +----- .../freestyle/intern/python/SShape.cpp | 60 ++-- .../intern/python/StrokeAttribute.cpp | 56 ++-- .../freestyle/intern/python/StrokeShader.cpp | 6 +- .../StrokeShader/BackboneStretcherShader.cpp | 4 +- .../python/StrokeShader/BezierCurveShader.cpp | 4 +- .../StrokeShader/CalligraphicShader.cpp | 2 +- .../python/StrokeShader/ColorNoiseShader.cpp | 4 +- .../ColorVariationPatternShader.cpp | 2 +- .../StrokeShader/ConstantColorShader.cpp | 6 +- .../StrokeShader/ConstantThicknessShader.cpp | 4 +- .../ConstrainedIncreasingThicknessShader.cpp | 2 +- .../StrokeShader/GuidingLinesShader.cpp | 4 +- .../StrokeShader/IncreasingColorShader.cpp | 4 +- .../IncreasingThicknessShader.cpp | 2 +- .../StrokeShader/PolygonalizationShader.cpp | 4 +- .../python/StrokeShader/SamplingShader.cpp | 4 +- .../StrokeShader/SpatialNoiseShader.cpp | 2 +- .../StrokeShader/StrokeTextureShader.cpp | 4 +- .../StrokeShader/TextureAssignerShader.cpp | 4 +- .../StrokeShader/ThicknessNoiseShader.cpp | 4 +- .../ThicknessVariationPatternShader.cpp | 2 +- .../python/StrokeShader/TipRemoverShader.cpp | 2 +- .../python/StrokeShader/fstreamShader.cpp | 4 +- .../python/StrokeShader/streamShader.cpp | 6 +- .../intern/python/StrokeVertexIterator.cpp | 130 ++++----- .../UnaryFunction0D/UnaryFunction0DDouble.cpp | 6 +- .../UnaryFunction0D/UnaryFunction0DFloat.cpp | 6 +- .../UnaryFunction0D/UnaryFunction0DId.cpp | 6 +- .../UnaryFunction0DUnsigned.cpp | 6 +- .../UnaryFunction0D/UnaryFunction0DVec2f.cpp | 6 +- .../UnaryFunction0D/UnaryFunction0DVec3f.cpp | 6 +- .../UnaryFunction0DVectorViewShape.cpp | 4 +- .../UnaryFunction0DViewShape.cpp | 4 +- .../UnaryFunction0D_Id/ShapeIdF0D.cpp | 8 +- .../UnaryFunction0D_Material/MaterialF0D.cpp | 8 +- .../CurveNatureF0D.cpp | 8 +- .../UnaryFunction0D_Vec2f/Normal2DF0D.cpp | 8 +- .../VertexOrientation2DF0D.cpp | 8 +- .../VertexOrientation3DF0D.cpp | 8 +- .../GetOccludeeF0D.cpp | 8 +- .../UnaryFunction0D_ViewShape/GetShapeF0D.cpp | 8 +- .../UnaryFunction0D_double/DensityF0D.cpp | 12 + .../LocalAverageDepthF0D.cpp | 12 + .../GetCurvilinearAbscissaF0D.cpp | 8 +- .../UnaryFunction0D_float/GetParameterF0D.cpp | 8 +- .../GetViewMapGradientNormF0D.cpp | 6 +- .../ReadCompleteViewMapPixelF0D.cpp | 6 +- .../UnaryFunction0D_float/ReadMapPixelF0D.cpp | 6 +- .../ReadSteerableViewMapPixelF0D.cpp | 6 +- .../Curvature2DAngleF0D.cpp | 8 +- .../UnaryFunction0D_real/GetProjectedXF0D.cpp | 8 +- .../UnaryFunction0D_real/GetProjectedYF0D.cpp | 8 +- .../UnaryFunction0D_real/GetProjectedZF0D.cpp | 8 +- .../UnaryFunction0D_real/GetXF0D.cpp | 8 +- .../UnaryFunction0D_real/GetYF0D.cpp | 8 +- .../UnaryFunction0D_real/GetZF0D.cpp | 8 +- .../ZDiscontinuityF0D.cpp | 8 +- .../QuantitativeInvisibilityF0D.cpp | 8 +- .../GetOccludersF0D.cpp | 8 +- .../intern/python/UnaryFunction0DVoid.cpp | 6 +- .../UnaryFunction1D/UnaryFunction1DDouble.cpp | 10 +- .../UnaryFunction1D/UnaryFunction1DFloat.cpp | 10 +- .../UnaryFunction1DUnsigned.cpp | 10 +- .../UnaryFunction1D/UnaryFunction1DVec2f.cpp | 10 +- .../UnaryFunction1D/UnaryFunction1DVec3f.cpp | 10 +- .../UnaryFunction1DVectorViewShape.cpp | 8 +- .../CurveNatureF1D.cpp | 6 +- .../UnaryFunction1D_Vec2f/Normal2DF1D.cpp | 6 +- .../Orientation2DF1D.cpp | 6 +- .../Orientation3DF1D.cpp | 6 +- .../UnaryFunction1D_double/DensityF1D.cpp | 4 +- .../GetCompleteViewMapDensityF1D.cpp | 6 +- .../GetDirectionalViewMapDensityF1D.cpp | 6 +- .../LocalAverageDepthF1D.cpp | 6 +- .../Curvature2DAngleF1D.cpp | 6 +- .../UnaryFunction1D_real/GetProjectedXF1D.cpp | 6 +- .../UnaryFunction1D_real/GetProjectedYF1D.cpp | 6 +- .../UnaryFunction1D_real/GetProjectedZF1D.cpp | 6 +- .../GetSteerableViewMapDensityF1D.cpp | 4 +- .../GetViewMapGradientNormF1D.cpp | 6 +- .../UnaryFunction1D_real/GetXF1D.cpp | 6 +- .../UnaryFunction1D_real/GetYF1D.cpp | 6 +- .../UnaryFunction1D_real/GetZF1D.cpp | 6 +- .../ZDiscontinuityF1D.cpp | 6 +- .../QuantitativeInvisibilityF1D.cpp | 6 +- .../GetOccludeeF1D.cpp | 6 +- .../GetOccludersF1D.cpp | 6 +- .../GetShapeF1D.cpp | 6 +- .../ChainingTimeStampF1D.cpp | 8 +- .../IncrementChainingTimeStampF1D.cpp | 8 +- .../UnaryFunction1D_void/TimeStampF1D.cpp | 8 +- .../intern/python/UnaryFunction1DVoid.cpp | 10 +- .../intern/python/UnaryPredicate0D.cpp | 6 +- .../python/UnaryPredicate0D/FalseUP0D.cpp | 6 +- .../python/UnaryPredicate0D/TrueUP0D.cpp | 6 +- .../intern/python/UnaryPredicate1D.cpp | 6 +- .../python/UnaryPredicate1D/ContourUP1D.cpp | 8 +- .../UnaryPredicate1D/DensityLowerThanUP1D.cpp | 6 +- .../EqualToChainingTimeStampUP1D.cpp | 6 +- .../UnaryPredicate1D/EqualToTimeStampUP1D.cpp | 6 +- .../UnaryPredicate1D/ExternalContourUP1D.cpp | 8 +- .../python/UnaryPredicate1D/FalseUP1D.cpp | 6 +- .../QuantitativeInvisibilityUP1D.cpp | 6 +- .../python/UnaryPredicate1D/ShapeUP1D.cpp | 6 +- .../python/UnaryPredicate1D/TrueUP1D.cpp | 6 +- .../ViewEdgeIterator/ChainingIterator.cpp | 18 +- .../ChainPredicateIterator.cpp | 6 +- .../ChainSilhouetteIterator.cpp | 8 +- .../freestyle/intern/python/ViewMap.cpp | 52 ++-- .../freestyle/intern/python/ViewShape.cpp | 44 +-- source/blender/python/SConscript | 2 +- source/blender/python/api2_2x/Blender.c | 2 + .../blender/render/intern/source/pipeline.c | 2 +- 153 files changed, 2725 insertions(+), 1337 deletions(-) create mode 100644 intern/guardedalloc/intern/mmap_win.c create mode 100644 intern/guardedalloc/mmap_win.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate0D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D.h create mode 100644 source/blender/freestyle/intern/python/Convert.cpp create mode 100644 source/blender/freestyle/intern/python/Convert.h create mode 100644 source/blender/freestyle/intern/python/Freestyle.cpp create mode 100644 source/blender/freestyle/intern/python/Freestyle.h create mode 100644 source/blender/freestyle/intern/python/Id.h create mode 100644 source/blender/freestyle/intern/python/Interface0D.h create mode 100644 source/blender/freestyle/intern/python/Interface1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp diff --git a/intern/guardedalloc/intern/mmap_win.c b/intern/guardedalloc/intern/mmap_win.c new file mode 100644 index 00000000000..436c99344a7 --- /dev/null +++ b/intern/guardedalloc/intern/mmap_win.c @@ -0,0 +1,260 @@ +/** + * $Id: $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Andrea Weikert. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#if defined(WIN32) + +#include +#include +#include +#include +#include + +#include "mmap_win.h" + +#ifndef FILE_MAP_EXECUTE +//not defined in earlier versions of the Platform SDK (before February 2003) +#define FILE_MAP_EXECUTE 0x0020 +#endif + +/* --------------------------------------------------------------------- */ +/* local storage definitions */ +/* --------------------------------------------------------------------- */ +/* all memory mapped chunks are put in linked lists */ +typedef struct mmapLink +{ + struct mmapLink *next,*prev; +} mmapLink; + +typedef struct mmapListBase +{ + void *first, *last; +} mmapListBase; + +typedef struct MemMap { + struct MemMap *next,*prev; + void *mmap; + HANDLE fhandle; + HANDLE maphandle; +} MemMap; + +/* --------------------------------------------------------------------- */ +/* local functions */ +/* --------------------------------------------------------------------- */ + +static void mmap_addtail(volatile mmapListBase *listbase, void *vlink); +static void mmap_remlink(volatile mmapListBase *listbase, void *vlink); +static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr); + +static int mmap_get_prot_flags (int flags); +static int mmap_get_access_flags (int flags); + +/* --------------------------------------------------------------------- */ +/* vars */ +/* --------------------------------------------------------------------- */ +volatile static struct mmapListBase _mmapbase; +volatile static struct mmapListBase *mmapbase = &_mmapbase; + + +/* --------------------------------------------------------------------- */ +/* implementation */ +/* --------------------------------------------------------------------- */ + +/* mmap for windows */ +void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset) +{ + HANDLE fhandle = INVALID_HANDLE_VALUE; + HANDLE maphandle; + int prot_flags = mmap_get_prot_flags(prot); + int access_flags = mmap_get_access_flags(prot); + MemMap *mm = NULL; + void *ptr = NULL; + + if ( flags & MAP_FIXED ) { + return MAP_FAILED; + } + + /* + if ( fd == -1 ) { + _set_errno( EBADF ); + return MAP_FAILED; + } + */ + + if ( fd != -1 ) { + fhandle = (HANDLE) _get_osfhandle (fd); + } + if ( fhandle == INVALID_HANDLE_VALUE ) { + if (!(flags & MAP_ANONYMOUS)) { + errno = EBADF; + return MAP_FAILED; + } + } else { + if ( !DuplicateHandle( GetCurrentProcess(), fhandle, GetCurrentProcess(), + &fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) { + return MAP_FAILED; + } + } + + maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL); + if ( maphandle == 0 ) { + errno = EBADF; + return MAP_FAILED; + } + + ptr = MapViewOfFile(maphandle, access_flags, 0, offset, 0); + if ( ptr == NULL ) { + DWORD dwLastErr = GetLastError(); + if ( dwLastErr == ERROR_MAPPED_ALIGNMENT ) + errno=EINVAL; + else + errno=EACCES; + CloseHandle(maphandle); + return MAP_FAILED; + } + + mm= (MemMap *)malloc(sizeof(MemMap)); + if (!mm) { + errno=ENOMEM; + } + mm->fhandle = fhandle; + mm->maphandle = maphandle; + mm->mmap = ptr; + mmap_addtail(mmapbase, mm); + + return ptr; +} + +/* munmap for windows */ +long munmap(void *ptr, long size) +{ + MemMap *mm = mmap_findlink(mmapbase, ptr); + if (!mm) { + errno=EINVAL; + return -1; + } + UnmapViewOfFile( mm->mmap ); + CloseHandle( mm->maphandle ); + CloseHandle( mm->fhandle); + mmap_remlink(mmapbase, mm); + return 0; +} + +/* --------------------------------------------------------------------- */ +/* local functions */ +/* --------------------------------------------------------------------- */ + +static void mmap_addtail(volatile mmapListBase *listbase, void *vlink) +{ + struct mmapLink *link= vlink; + + if (link == 0) return; + if (listbase == 0) return; + + link->next = 0; + link->prev = listbase->last; + + if (listbase->last) ((struct mmapLink *)listbase->last)->next = link; + if (listbase->first == 0) listbase->first = link; + listbase->last = link; +} + +static void mmap_remlink(volatile mmapListBase *listbase, void *vlink) +{ + struct mmapLink *link= vlink; + + if (link == 0) return; + if (listbase == 0) return; + + if (link->next) link->next->prev = link->prev; + if (link->prev) link->prev->next = link->next; + + if (listbase->last == link) listbase->last = link->prev; + if (listbase->first == link) listbase->first = link->next; +} + +static void *mmap_findlink(volatile mmapListBase *listbase, void *ptr) +{ + MemMap *mm; + + if (ptr == 0) return NULL; + if (listbase == 0) return NULL; + + mm = (MemMap *)listbase->first; + while (mm) { + if (mm->mmap == ptr) { + return mm; + } + mm = mm->next; + } + return NULL; +} + +static int mmap_get_prot_flags (int flags) +{ + int prot = PAGE_NOACCESS; + + if ( ( flags & PROT_READ ) == PROT_READ ) { + if ( ( flags & PROT_WRITE ) == PROT_WRITE ) { + prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; + } else { + prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_READONLY; + } + } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) { + prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_WRITECOPY; + } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) { + prot = PAGE_EXECUTE_READ; + } + return prot; +} + +static int mmap_get_access_flags (int flags) +{ + int access = 0; + + if ( ( flags & PROT_READ ) == PROT_READ ) { + if ( ( flags & PROT_WRITE ) == PROT_WRITE ) { + access = FILE_MAP_WRITE; + } else { + access = (flags & PROT_EXEC) ? FILE_MAP_EXECUTE : FILE_MAP_READ; + } + } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) { + access = FILE_MAP_COPY; + } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) { + access = FILE_MAP_EXECUTE; + } + return access; +} + + +#endif // WIN32 + + + + + diff --git a/intern/guardedalloc/mmap_win.h b/intern/guardedalloc/mmap_win.h new file mode 100644 index 00000000000..53af86e1f66 --- /dev/null +++ b/intern/guardedalloc/mmap_win.h @@ -0,0 +1,51 @@ +/** + * $Id: $ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2008 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): Andrea Weikert. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef MMAP_WIN_H +#define MMAP_WIN_H + +#define PROT_NONE 0 +#define PROT_READ 1 +#define PROT_WRITE 2 +#define PROT_EXEC 4 + +#define MAP_FILE 0 +#define MAP_SHARED 1 +#define MAP_PRIVATE 2 +#define MAP_TYPE 0xF +#define MAP_FIXED 0x10 +#define MAP_ANONYMOUS 0x20 +#define MAP_ANON MAP_ANONYMOUS + +#define MAP_FAILED ((void *)-1) + +void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset); +long munmap(void *ptr, long size); + +#endif \ No newline at end of file diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 31715bda5a3..98a66e272be 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -56,10 +56,22 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'): prefix = 'intern/app_blender' app_sources = env.Glob(prefix + '/*.cpp') +# Python +prefix = 'intern/python' +# python_sources = env.Glob(prefix + '/*.cpp') +python_sources = [ + prefix + '/Freestyle.cpp', + prefix + '/Convert.cpp', + prefix + '/BinaryPredicate0D.cpp', + prefix + '/BinaryPredicate1D.cpp', + prefix + '/Id.cpp', + prefix + '/Interface0D.cpp', + prefix + '/Interface1D.cpp' + ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ + winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \ - + app_sources + + app_sources + python_sources env.BlenderLib (libname="bf_freestyle", sources=sources, diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 2395df646f0..2468839bdc7 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -106,12 +106,11 @@ extern "C" { void FRS_render(Render* re, int render_in_layer) { - // if(render_in_layer) { - // view->workingBuffer = GL_COLOR_ATTACHMENT0_EXT; - // } else { - // view->workingBuffer = GL_BACK; - // } - view->workingBuffer = GL_BACK; + if(render_in_layer) { + view->workingBuffer = GL_COLOR_ATTACHMENT1_EXT; + } else { + view->workingBuffer = GL_BACK; + } // add style module string style_module = pathconfig->getProjectDir() + @@ -132,76 +131,52 @@ extern "C" { void FRS_execute(Render* re, int render_in_layer) { - GLuint framebuffer, renderbuffers[2]; - GLenum status; - RenderLayer *rl; - GLubyte *pixc; - if(render_in_layer) { - - pixc = (GLubyte *) malloc( 4 * re->winx * re->winy * sizeof(GLubyte) ); - - cout << "Freestyle as a render layer - SETUP" << endl; + + // GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + // switch(status){ + // case GL_FRAMEBUFFER_COMPLETE_EXT: + // cout << "CORRECT: GL_FRAMEBUFFER_COMPLETE" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" << endl; + // break; + // case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" << endl; + // break; + // case GL_FRAMEBUFFER_UNSUPPORTED_EXT: + // cout << "ERROR: GL_FRAMEBUFFER_UNSUPPORTED" << endl; + // break; + // } + + RenderLayer *rl; - // set up frame buffer - glGenFramebuffersEXT(1, &framebuffer); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer); - - // set up render buffer: one color buffer, one depth buffer - glGenRenderbuffersEXT(2, renderbuffers); - - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[0]); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, re->winx, re->winy); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, renderbuffers[0]); - - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffers[1]); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, re->winx, re->winy); - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, renderbuffers[1]); - - // status verification - status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT){ - cout << "Framebuffer setup error" << endl; - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glDeleteRenderbuffersEXT(2, renderbuffers); - glDeleteFramebuffersEXT(1, &framebuffer); - return; - } - - glPushAttrib(GL_VIEWPORT_BIT); - glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); // should not be needed - glViewport(0, 0, re->winx, re->winy); - - FRS_render(re, render_in_layer); - - // keep first Freestyle layer for(rl = (RenderLayer *)re->result->layers.first; rl; rl= rl->next) if(rl->layflag & SCE_LAY_FRS) break; - - cout << "Freestyle as a render layer - RESULT" << endl; - - // transfer render to layer - glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); - glReadPixels(0, 0, re->winx, re->winy, GL_RGBA, GL_UNSIGNED_BYTE, pixc ); - + int p; - for(int i = 0; i < re->winx; i++) { - for(int j = 0; j < re->winy; j++){ - p = 4*(i*re->winy + j); - *(rl->rectf + p ) = 1.0*pixc[ p ]/255.0; - *(rl->rectf + p + 1) = 1.0*pixc[ p+1 ]/255.0; - *(rl->rectf + p + 2) = 1.0*pixc[ p+2 ]/255.0; - *(rl->rectf + p + 3) = 1.0*pixc[ p+3 ]/255.0; + for(int j = 0; j < re->winy; j++) { + for(int i = 0; i < re->winx; i++){ + p = 4*(j*re->winx + i); + rl->rectf[p] *= 0.6; + rl->rectf[p + 1] = 0.6 * rl->rectf[p + 1]; + rl->rectf[p + 2] *= 0.6; + rl->rectf[p + 3] = 1.0; } } - - // bind window - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - glDrawBuffer(GL_BACK); - glPopAttrib(); - glDeleteRenderbuffersEXT(2, renderbuffers); - glDeleteFramebuffersEXT(1, &framebuffer); } else { FRS_render(re, render_in_layer); diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp index ea7b1fcca89..2c16adb7a82 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp @@ -1,8 +1,147 @@ -SWIGINTERN PyObject *_wrap_BinaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#include "BinaryPredicate0D.h" + +#include "Convert.h" +#include "Interface0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the BinaryPredicate0D module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------BinaryPredicate0D module doc strings-----------------------------*/ +static char M_BinaryPredicate0D_doc[] = "The Blender.Freestyle.BinaryPredicate0D submodule"; +/*----------------------BinaryPredicate0D module method def----------------------------*/ +struct PyMethodDef M_BinaryPredicate0D_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject BinaryPredicate0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "BinaryPredicate0D", /* tp_name */ + sizeof( BPy_BinaryPredicate0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *BinaryPredicate0D_Init( void ) +{ + PyObject *submodule; + + if( PyType_Ready( &BinaryPredicate0D_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate0D", M_BinaryPredicate0D_methods, M_BinaryPredicate0D_doc ); + + return submodule; +} + +//------------------------INSTANCE METHODS ---------------------------------- + +PyObject *BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args) +{ + return PyString_FromString( self->bp0D->getName().c_str() ); +} + +PyObject *BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args) +{ + BPy_BinaryPredicate0D *obj1; + BPy_Interface0D *obj2, *obj3; + bool b; + + if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate0D___call__", &obj1, obj2, &obj3)) + cout << "ERROR: BinaryPredicate0D___call__ " << endl; + + b = self->bp0D->operator()( *(obj2->if0D) , *(obj3->if0D) ); + return PyBool_from_bool( b ); + } -SWIGINTERN PyObject *_wrap_BinaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BinaryPredicate0D.h new file mode 100644 index 00000000000..30467d2e565 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_BINARYPREDICATE0D_H +#define FREESTYLE_PYTHON_BINARYPREDICATE0D_H + +#include "../stroke/Predicates0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject BinaryPredicate0D_Type; + +#define BPy_BinaryPredicate0D_Check(v) \ + ((v)->ob_type == &BinaryPredicate0D_Type) + +/*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/ +typedef struct { + PyObject_HEAD + BinaryPredicate0D *bp0D; +} BPy_BinaryPredicate0D; + +/*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/ + +PyObject *BinaryPredicate0D_Init( void ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_BINARYPREDICATE0D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp index ebf4ab94ecb..d6a99d689bb 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp @@ -1,12 +1,146 @@ -SWIGINTERN PyObject *_wrap_BinaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#include "BinaryPredicate1D.h" + +#include "Convert.h" +#include "Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the BinaryPredicate1D module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------BinaryPredicate1D module doc strings-----------------------------*/ +static char M_BinaryPredicate1D_doc[] = "The Blender.Freestyle.BinaryPredicate1D submodule"; +/*----------------------BinaryPredicate1D module method def----------------------------*/ +struct PyMethodDef M_BinaryPredicate1D_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject BinaryPredicate1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "BinaryPredicate1D", /* tp_name */ + sizeof( BPy_BinaryPredicate1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *BinaryPredicate1D_Init( void ) +{ + PyObject *submodule; + + if( PyType_Ready( &BinaryPredicate1D_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate1D", M_BinaryPredicate1D_methods, M_BinaryPredicate1D_doc ); + + return submodule; +} + +//------------------------INSTANCE METHODS ---------------------------------- + +PyObject *BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args) +{ + return PyString_FromString( self->bp1D->getName().c_str() ); +} + +PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args) +{ + BPy_BinaryPredicate1D *obj1; + BPy_Interface1D *obj2, *obj3; + bool b; + + if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate1D___call__", &obj1, &obj2, &obj3)) + cout << "ERROR: BinaryPredicate1D___call__ " << endl; + + b = self->bp1D->operator()( *(obj2->if1D) , *(obj3->if1D) ); + return PyBool_from_bool( b ); } -SWIGINTERN PyObject *_wrap_BinaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - -SWIGINTERN PyObject *_wrap_disown_BinaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D.h new file mode 100644 index 00000000000..d401c585197 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_BINARYPREDICATE1D_H +#define FREESTYLE_PYTHON_BINARYPREDICATE1D_H + +#include "../stroke/Predicates1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject BinaryPredicate1D_Type; + +#define BPy_BinaryPredicate1D_Check(v) \ + ((v)->ob_type == &BinaryPredicate1D_Type) + +/*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/ +typedef struct { + PyObject_HEAD + BinaryPredicate1D *bp1D; +} BPy_BinaryPredicate1D; + +/*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/ + +PyObject *BinaryPredicate1D_Init( void ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_BINARYPREDICATE1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp index 59946ce22e1..1f1a1ec840b 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_FalseBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseBP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FalseBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseBP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_FalseBP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_FalseBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_FalseBP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp index a249a230b87..402e59c3f29 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_Length2DBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Length2DBP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Length2DBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Length2DBP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_Length2DBP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Length2DBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Length2DBP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp index d82c4166a09..d980750bb33 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SameShapeIdBP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp index b0e5825e0d6..2afd2e163ea 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_TrueBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueBP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TrueBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueBP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_TrueBP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TrueBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TrueBP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp index 3bd22915831..873acd93149 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp new file mode 100644 index 00000000000..c8ceddaf98b --- /dev/null +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -0,0 +1,54 @@ +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/////////////////////////////////////////////////////////////////////////////////////////// + +static char M_Convert_doc[] = "The Blender.Freestyle.Convert utility submodule"; +/*----------------------Freestyle module method def----------------------------*/ +struct PyMethodDef M_Convert_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *Convert_Init( void ) +{ + return Py_InitModule3( "Blender.Freestyle.Convert", M_Convert_methods, M_Convert_doc ); +} + +//------------------------------------------------------------------------- + +PyObject *PyBool_from_bool( bool b ){ + // SWIG_From_bool + return PyBool_FromLong( b ? 1 : 0); +} + + +PyObject *Vector_from_Vec2f( Vec2f vec ) { + float vec_data[2]; // because vec->_coord is protected + vec_data[0] = vec.x(); vec_data[1] = vec.y(); + return newVectorObject( vec_data, 3, Py_NEW); +} + +PyObject *Vector_from_Vec3f( Vec3f vec ) { + float vec_data[3]; // because vec->_coord is protected + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); +} + +PyObject *Vector_from_Vec3r( Vec3r vec ) { + float vec_data[3]; // because vec->_coord is protected + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h new file mode 100644 index 00000000000..d1bac93734a --- /dev/null +++ b/source/blender/freestyle/intern/python/Convert.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_CONVERT_H +#define FREESTYLE_PYTHON_CONVERT_H + +#include "../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include "api2_2x/vector.h" +#include "api2_2x/gen_utils.h" + +PyObject *Convert_Init( void ); + +PyObject *PyBool_from_bool( bool b ); + +PyObject *Vector_from_Vec2f( Vec2f v ); +PyObject *Vector_from_Vec3f( Vec3f v ); +PyObject *Vector_from_Vec3r( Vec3r v ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_CONVERT_H */ diff --git a/source/blender/freestyle/intern/python/CurvePointIterator.cpp b/source/blender/freestyle/intern/python/CurvePointIterator.cpp index 4e4291a9c88..57dc86ea5e4 100644 --- a/source/blender/freestyle/intern/python/CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/CurvePointIterator.cpp @@ -1,284 +1,284 @@ -SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__step_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__step_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__step_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__step_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___A_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___A_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___B_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___B_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__begin_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__begin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__begin_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__end_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__end_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__end_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__end_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__n_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__n_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__t_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__t_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__Point_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__Point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__Point_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) { + PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_CurvePointIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_CurvePointIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_copy(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___eq__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getObject(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator___deref__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_isBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_isEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_A(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_B(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_t2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_SetA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_SetB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_fedge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_point2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_point3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_normal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp new file mode 100644 index 00000000000..e3a5cf91117 --- /dev/null +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -0,0 +1,136 @@ +#include "Freestyle.h" + +#include "BinaryPredicate0D.h" +#include "BinaryPredicate1D.h" +#include "Id.h" +#include "Interface0D.h" +#include "Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the Freestyle module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------Freestyle module doc strings-----------------------------*/ +static char M_Freestyle_doc[] = "The Blender.Freestyle submodule"; +/*----------------------Freestyle module method def----------------------------*/ +struct PyMethodDef M_Freestyle_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject Freestyle_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Freestyle", /* tp_name */ + sizeof( BPy_Freestyle ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *Freestyle_Init( void ) +{ + PyObject *submodule; + PyObject *dict; + + if( PyType_Ready( &Freestyle_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle", M_Freestyle_methods, M_Freestyle_doc ); + + dict = PyModule_GetDict( submodule ); + PyDict_SetItemString( dict, "BinaryPredicate0D", BinaryPredicate0D_Init() ); + PyDict_SetItemString( dict, "BinaryPredicate1D", BinaryPredicate1D_Init() ); + PyDict_SetItemString( dict, "Interface0D", Interface0D_Init() ); + PyDict_SetItemString( dict, "Interface1D", Interface1D_Init() ); + PyDict_SetItemString( dict, "Id", Id_Init() ); + + return submodule; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/Freestyle.h b/source/blender/freestyle/intern/python/Freestyle.h new file mode 100644 index 00000000000..7e7ed56f5f2 --- /dev/null +++ b/source/blender/freestyle/intern/python/Freestyle.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_FREESTYLE_H +#define FREESTYLE_PYTHON_FREESTYLE_H + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Freestyle_Type; + +#define BPy_Freestyle_Check(v) \ + ((v)->ob_type == &Freestyle_Type) + +/*---------------------------Python BPy_Freestyle structure definition----------*/ +typedef struct { + PyObject_HEAD +} BPy_Freestyle; + +/*---------------------------Python BPy_Freestyle visible prototypes-----------*/ + +PyObject *Freestyle_Init( void ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FREESTYLE_H */ diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp index 681db76faab..a835efa78f7 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/Id.cpp @@ -1,32 +1,197 @@ -SWIGINTERN PyObject *_wrap_Id_getFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#include "Id.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the Id module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------Id module doc strings-----------------------------*/ +static char M_Id_doc[] = "The Blender.Freestyle.Id submodule"; +/*----------------------Id module method def----------------------------*/ +struct PyMethodDef M_Id_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject Id_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Id", /* tp_name */ + sizeof( BPy_Id ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *Id_Init( void ) +{ + PyObject *submodule; + + if( PyType_Ready( &Id_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle.Id", M_Id_methods, M_Id_doc ); + + return submodule; +} + +//------------------------INSTANCE METHODS ---------------------------------- + +PyObject *Id_getFirst( BPy_Id *self ) { + return PyInt_FromLong( self->id->getFirst() ); } -SWIGINTERN PyObject *_wrap_Id_getSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Id_getSecond( BPy_Id *self) { + return PyInt_FromLong( self->id->getSecond() ); } -SWIGINTERN PyObject *_wrap_Id_setFirst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Id_setFirst( BPy_Id *self , PyObject *args) { + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + unsigned int i; + + if( !PyArg_ParseTuple(args, (char *)"OO:Id_setFirst", &obj1, &obj2) ) + cout << "ERROR: Id_setFirst" << endl; + + i = static_cast( PyInt_AsLong(obj2) ); + self->id->setFirst( i ); + + Py_RETURN_NONE; } -SWIGINTERN PyObject *_wrap_Id_setSecond(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Id_setSecond( BPy_Id *self , PyObject *args) { + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + unsigned int i; + + if( !PyArg_ParseTuple(args, (char *)"OO:Id_setSecond", &obj1, &obj2) ) + cout << "ERROR: Id_setSecond" << endl; + + i = static_cast( PyInt_AsLong(obj2) ); + self->id->setSecond( i ); + + Py_RETURN_NONE; +} + +PyObject *Id___eq__( BPy_Id *self , PyObject *args) { + BPy_Id * obj1 = 0 ; + BPy_Id * obj2 = 0 ; + + if( !PyArg_ParseTuple(args, (char *)"OO:Id___eq__", &obj1, &obj2) ) + cout << "ERROR: Id___eq__" << endl; + + return PyBool_from_bool( obj1->id == obj2->id ); } -SWIGINTERN PyObject *_wrap_Id___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Id___ne__(PyObject *self , PyObject *args) { + BPy_Id * obj1 = 0 ; + BPy_Id * obj2 = 0 ; + + if( !PyArg_ParseTuple(args, (char *)"OO:Id___ne__", &obj1, &obj2) ) + cout << "ERROR: Id___ne__" << endl; + + return PyBool_from_bool( obj1->id != obj2->id ); +} + +PyObject *Id___lt__(PyObject *self , PyObject *args) { + BPy_Id * obj1 = 0 ; + BPy_Id * obj2 = 0 ; + + if( !PyArg_ParseTuple(args, (char *)"OO:Id___lt__", &obj1, &obj2) ) + cout << "ERROR: Id___lt__" << endl; + + return PyBool_from_bool( obj1->id < obj2->id ); } -SWIGINTERN PyObject *_wrap_Id___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - -SWIGINTERN PyObject *_wrap_Id___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_delete_Id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/Id.h b/source/blender/freestyle/intern/python/Id.h new file mode 100644 index 00000000000..032f35f7094 --- /dev/null +++ b/source/blender/freestyle/intern/python/Id.h @@ -0,0 +1,39 @@ +#ifndef FREESTYLE_PYTHON_ID_H +#define FREESTYLE_PYTHON_ID_H + +#include +using namespace std; + +#include "../system/Id.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Id_Type; + +#define BPy_Id_Check(v) \ + ((v)->ob_type == &Id_Type) + +/*---------------------------Python BPy_Id structure definition----------*/ +typedef struct { + PyObject_HEAD + Id *id; +} BPy_Id; + +/*---------------------------Python BPy_Id visible prototypes-----------*/ + +PyObject *Id_Init( void ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ID_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 54541cdb8cb..e09e0447aa7 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -1,68 +1,187 @@ -SWIGINTERN PyObject *_wrap_Interface0D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#include "Interface0D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the Interface0D module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------Interface0D module doc strings-----------------------------*/ +static char M_Interface0D_doc[] = "The Blender.Freestyle.Interface0D submodule"; +/*----------------------Interface0D module method def----------------------------*/ +struct PyMethodDef M_Interface0D_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject Interface0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Interface0D", /* tp_name */ + sizeof( BPy_Interface0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *Interface0D_Init( void ) +{ + PyObject *submodule; + + if( PyType_Ready( &Interface0D_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle.Interface0D", M_Interface0D_methods, M_Interface0D_doc ); + + return submodule; +} + +//------------------------INSTANCE METHODS ---------------------------------- + +PyObject *Interface0D_getExactTypeName( BPy_Interface0D *self ) { + return PyString_FromString( self->if0D->getExactTypeName().c_str() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getX( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getX() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getY( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getY() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getZ( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getZ() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getPoint3D( BPy_Interface0D *self ) { + return Vector_from_Vec3f( self->if0D->getPoint3D() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getProjectedX( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getProjectedX() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getProjectedY( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getProjectedY() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getProjectedZ( BPy_Interface0D *self ) { + return PyFloat_FromDouble( self->if0D->getProjectedZ() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getPoint2D( BPy_Interface0D *self ) { + return Vector_from_Vec2f( self->if0D->getPoint2D() ); } -SWIGINTERN PyObject *_wrap_Interface0D_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getFEdge( BPy_Interface0D *self ) { + // FEdge } -SWIGINTERN PyObject *_wrap_Interface0D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getId( BPy_Interface0D *self ) { + // Id } -SWIGINTERN PyObject *_wrap_Interface0D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface0D_getNature( BPy_Interface0D *self ) { + // VertexNature } -SWIGINTERN PyObject *_wrap_Interface0D_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - -SWIGINTERN PyObject *_wrap_Interface0D_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface0D_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface0D_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_new_Interface0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - +#endif diff --git a/source/blender/freestyle/intern/python/Interface0D.h b/source/blender/freestyle/intern/python/Interface0D.h new file mode 100644 index 00000000000..e3e97cbaecd --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_INTERFACE0D_H +#define FREESTYLE_PYTHON_INTERFACE0D_H + +#include "../view_map/Interface0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Interface0D_Type; + +#define BPy_Interface0D_Check(v) \ + ((v)->ob_type == &Interface0D_Type) + +/*---------------------------Python BPy_Interface0D structure definition----------*/ +typedef struct { + PyObject_HEAD + Interface0D *if0D; +} BPy_Interface0D; + +/*---------------------------Python BPy_Interface0D visible prototypes-----------*/ + +PyObject *Interface0D_Init( void ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_INTERFACE0D_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index 7d966185449..6591973f8b3 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -1,176 +1,176 @@ -SWIGINTERN PyObject *_wrap_CurvePoint_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_castToTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { + PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_CurvePoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_CurvePoint(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint___eq__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_A(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_B(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_t2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_SetA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_SetB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_SetT2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_fedge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_point2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_point3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_normal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_z_discontinuity(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_curvatureFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *CurvePoint_directionFredo(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp index aa98b1cc008..7f2e364d0b4 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp @@ -1,104 +1,104 @@ -SWIGINTERN PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { + PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_StrokeVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_StrokeVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_x(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_y(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_getPoint(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_strokeLength(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_u(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp index f6a4a26a65c..41d01d4b649 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp @@ -1,268 +1,268 @@ -SWIGINTERN PyObject *_wrap_SVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_castToTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SVertex__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SVertex__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SVertex__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { + PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_SVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_SVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex___eq__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_point3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_point2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_normals(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_normalsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_normalsSize(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_fedges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_fedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_fedges_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_fedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_fedges_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_shape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_z(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_viewvertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_viewvertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_AddNormal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_setCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_setCurvatureInfo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_getCurvatureInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_getCurvatureInfo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_setCurvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_setCurvatureFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_setDirectionFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_curvatureFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_directionFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetFEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_SetViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_AddFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_Replace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_fedge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_point2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_point3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_normal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_shape_id(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_shape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { + PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_shape_importance(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_qi(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SVertex_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SVertex_z_discontinuity(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp index 2b3e733e605..293f42949e3 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp @@ -1,76 +1,76 @@ -SWIGINTERN PyObject *_wrap_ViewVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_setNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_Replace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edgesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edgesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewVertex_edgesIterator(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp index d287ddf0c72..772a385139e 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp @@ -1,132 +1,132 @@ -SWIGINTERN PyObject *_wrap_NonTVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_NonTVertex__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_NonTVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_NonTVertex__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { + PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_NonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_NonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_svertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_svertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_viewedges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_SetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_SetSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_AddIncomingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_AddIncomingViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_AddOutgoingViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_AddOutgoingViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args) { + PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_Replace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) { + PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_edgesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_edgesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_NonTVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_NonTVertex_edgesIterator(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp index 32e7ccd0ff8..715170c1422 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp @@ -1,184 +1,184 @@ -SWIGINTERN PyObject *_wrap_TVertex_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_castToTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_TVertex__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_TVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_TVertex__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { + PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_frontSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_frontSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_backSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_backSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_frontEdgeA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_frontEdgeB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_backEdgeA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_backEdgeB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetFrontVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetBackSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { + PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { + PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_GetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_GetSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_Replace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_Replace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_mate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_mate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { + PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edgesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_edgesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edgesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_edgesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TVertex_edgesIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TVertex_edgesIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TVertex(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Interface0DIterator.cpp index 283dd48ce20..48b7560acea 100644 --- a/source/blender/freestyle/intern/python/Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Interface0DIterator.cpp @@ -1,104 +1,104 @@ -SWIGINTERN PyObject *_wrap_Interface0DIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getObject(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator___deref__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_increment(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_decrement(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_isBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_isEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator___eq__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator___ne__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_t(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_u(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Interface0DIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Interface0DIterator_castToTVertex(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 0bbb6049d74..65641c6c8ff 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -1,56 +1,171 @@ -SWIGINTERN PyObject *_wrap_Interface1D_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#include "Interface1D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + + +/*-----------------------Python API function prototypes for the Interface1D module--*/ +//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); +/*-----------------------Interface1D module doc strings-----------------------------*/ +static char M_Interface1D_doc[] = "The Blender.Freestyle.Interface1D submodule"; +/*----------------------Interface1D module method def----------------------------*/ +struct PyMethodDef M_Interface1D_methods[] = { +// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Freestyle method def------------------------------*/ + +PyTypeObject Interface1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Interface1D", /* tp_name */ + sizeof( BPy_Interface1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyObject *Interface1D_Init( void ) +{ + PyObject *submodule; + + if( PyType_Ready( &Interface1D_Type ) < 0 ) + return NULL; + + submodule = Py_InitModule3( "Blender.Freestyle.Interface1D", M_Interface1D_methods, M_Interface1D_doc ); + + return submodule; } +//------------------------INSTANCE METHODS ---------------------------------- -SWIGINTERN PyObject *_wrap_Interface1D_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + +PyObject *Interface1D_getExactTypeName( BPy_Interface1D *self ) { + return PyString_FromString( self->if1D->getExactTypeName().c_str() ); } - -SWIGINTERN PyObject *_wrap_Interface1D_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface1D_getVertices( BPy_Interface1D *self ) { + // Vector } - -SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface1D_getPoints( BPy_Interface1D *self ) { + // Vector } - -SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface1D_getLength2D( BPy_Interface1D *self ) { + return PyFloat_FromDouble( (double) self->if1D->getLength2D() ); } - -SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *args) { +PyObject *Interface1D_getId( BPy_Interface1D *self ) { + // Id } - -SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface1D_getNature( BPy_Interface1D *self ) { + // EdgeNature } - -SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ) { + return PyInt_FromLong( self->if1D->getTimeStamp() ); } +PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args) { + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + unsigned int timestamp; + + if( !PyArg_ParseTuple(args, (char *)"OO:Interface1D_setTimeStamp", &obj1, &obj2) ) + cout << "ERROR: Interface1D_setTimeStamp" << endl; + + timestamp = static_cast( PyInt_AsLong(obj2) ); + self->if1D->setTimeStamp( timestamp ); -SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) { + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// -SWIGINTERN PyObject *_wrap_Interface1D_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface1D_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface1D_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface1D_getTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Interface1D_setTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +#ifdef __cplusplus } +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D.h b/source/blender/freestyle/intern/python/Interface1D.h new file mode 100644 index 00000000000..7477d368372 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_INTERFACE1D_H +#define FREESTYLE_PYTHON_INTERFACE1D_H + +#include "../view_map/Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Interface1D_Type; + +#define BPy_Interface1D_Check(v) \ + ((v)->ob_type == &Interface1D_Type) + +/*---------------------------Python BPy_Interface1D structure definition----------*/ +typedef struct { + PyObject_HEAD + Interface1D *if1D; +} BPy_Interface1D; + +/*---------------------------Python BPy_Interface1D visible prototypes-----------*/ + +PyObject *Interface1D_Init( void ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_INTERFACE1D_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve.cpp index 758227e6ad9..4fac75b3f0d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve.cpp @@ -1,112 +1,112 @@ -SWIGINTERN PyObject *_wrap_Curve_computeCurvatureAndOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_computeCurvatureAndOrientation(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_push_vertex_back__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_back__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_push_vertex_back__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_push_vertex_front__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_front__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_push_vertex_front__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_getLength2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_nSegments(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_nSegments(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_setId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curvePointsBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curvePointsBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curvePointsEnd__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curvePointsEnd__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curveVerticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curveVerticesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_curveVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_curveVerticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_verticesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_verticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curve_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { + PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp index 4985a2d00a4..862456d2b7c 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp @@ -1,252 +1,252 @@ -SWIGINTERN PyObject *_wrap_FEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getLength2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_FEdge__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_FEdge__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_FEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_FEdge__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { + PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_FEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_FEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_vertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_vertexA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_vertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_vertexB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_nextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_nextEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_previousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_previousEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_shape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_invisibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_invisibility(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_viewedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_viewedge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_center3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_center2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_aFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_aFace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_getOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_getOccludeeEmpty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_isSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_isSmooth(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetVertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetVertexA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetVertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetVertexB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetNextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetNextEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetaFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetaFace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_SetSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_SetSmooth(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_CommonVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_CommonVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_min2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_min2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_max2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_max2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_shape_id(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_shape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_shape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { + PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_shape_importance(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_qi(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_z_discontinuity(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_viewedge_nature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_viewedge_nature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_orientation2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_orientation3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_verticesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_verticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { + PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdge_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { + PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp index 70a01ad4176..d6bd8c6f085 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp @@ -1,44 +1,44 @@ -SWIGINTERN PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_normalA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_normalB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_aMaterialIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_aMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_aMaterial(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_bMaterialIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_bMaterial(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_bMaterial(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp index 9c478f24839..e453bbdc863 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp @@ -1,32 +1,32 @@ -SWIGINTERN PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_face(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_face(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_normal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_materialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_materialIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_material(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp index c86c2eafac9..fe5feb7068b 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp @@ -1,236 +1,236 @@ -SWIGINTERN PyObject *_wrap_Stroke_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_Stroke__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Stroke__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_Stroke__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { + PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Stroke(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Stroke(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_ComputeSampling(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_ComputeSampling(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_Resample__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_Resample__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_Resample__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { +PyObject *Stroke_Resample(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_RemoveVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_InsertVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_InsertVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_Render(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_Render(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_RenderBasic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_RenderBasic(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getLength2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getMediumType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getTextureId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_hasTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_hasTips(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_vertices_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_vertices_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_viewedges_begin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_viewedges_begin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args) { +PyObject *Stroke_viewedges_begin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_viewedges_end__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_viewedges_end__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) { +PyObject *Stroke_viewedges_end(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_viewedges_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getBeginningOrientation(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getBeginningOrientationX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getBeginningOrientationY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getEndingOrientation(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getEndingOrientationX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientationY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_getEndingOrientationY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetLength(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetMediumType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetTextureId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetTips(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_push_back(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_push_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_push_front(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_AddViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetBeginningOrientation__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetBeginningOrientation__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { +PyObject *Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetEndingOrientation__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_SetEndingOrientation__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { +PyObject *Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_strokeVerticesBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_strokeVerticesBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject *args) { +PyObject *Stroke_strokeVerticesBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_strokeVerticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_strokeVerticesSize(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_verticesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_verticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { +PyObject *Stroke_pointsBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Stroke_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { +PyObject *Stroke_pointsEnd(PyObject *self, PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp index d9db8ea83c4..1b55b601c89 100644 --- a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp @@ -1,236 +1,236 @@ -SWIGINTERN PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { + PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_A(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_B(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_fedgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_fedgeA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_fedgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_fedgeB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_viewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_isClosed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_isClosed(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_bShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_bShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluders(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_splittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_splittingId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetaShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_SetQI(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_AddOccluder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_AddOccluder(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_setSplittingId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_setSplittingId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_getLength2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_getLength2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_qi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_qi(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_shape_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_shape_id(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_shape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_shape_importance(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_verticesBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_verticesBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_verticesEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_verticesEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Material.cpp b/source/blender/freestyle/intern/python/Material.cpp index 217e2d7e89c..459de449336 100644 --- a/source/blender/freestyle/intern/python/Material.cpp +++ b/source/blender/freestyle/intern/python/Material.cpp @@ -1,112 +1,112 @@ -SWIGINTERN PyObject *_wrap_Material_diffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_diffuse(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_diffuseR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_diffuseR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_diffuseG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_diffuseG(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_diffuseB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_diffuseB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_diffuseA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_diffuseA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_specular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_specular(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_specularR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_specularR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_specularG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_specularG(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_specularB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_specularB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_specularA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_specularA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_ambient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_ambient(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_ambientR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_ambientR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_ambientG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_ambientG(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_ambientB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_ambientB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_ambientA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_ambientA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_emission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_emission(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_emissionR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_emissionR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_emissionG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_emissionG(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_emissionB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_emissionB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_emissionA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_emissionA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_shininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_shininess(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_SetDiffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_SetDiffuse(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_SetSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_SetSpecular(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_SetAmbient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_SetAmbient(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_SetEmission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_SetEmission(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material_SetShininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material_SetShininess(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material___ne__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Material___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Material___eq__(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Noise.cpp b/source/blender/freestyle/intern/python/Noise.cpp index e64393d9b35..8e6b7aa5022 100644 --- a/source/blender/freestyle/intern/python/Noise.cpp +++ b/source/blender/freestyle/intern/python/Noise.cpp @@ -1,48 +1,48 @@ -SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence1__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence1__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence1__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { + PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { + PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { + PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_smoothNoise1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_smoothNoise1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_smoothNoise2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Noise_smoothNoise3(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/Operators.cpp b/source/blender/freestyle/intern/python/Operators.cpp index df9fa4571aa..efae258d5ee 100644 --- a/source/blender/freestyle/intern/python/Operators.cpp +++ b/source/blender/freestyle/intern/python/Operators.cpp @@ -1,104 +1,57 @@ -SWIGINTERN PyObject *_wrap_Operators_select(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_select(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_chain(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_bidirectionalChain(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { +PyObject *Operators_sequentialSplit(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_recursiveSplit(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_sort(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject *args) { +PyObject *Operators_create(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_getViewEdgeFromIndex(PyObject *self , PyObject *args) { + } -SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_getChainFromIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_getStrokeFromIndex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_sequentialSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_getViewEdgesSize(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *args) { +PyObject *Operators_getChainsSize(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +PyObject *Operators_getStrokesSize(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_sort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getViewEdgeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getChainFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getStrokeFromIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getViewEdgesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getChainsSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_Operators_getStrokesSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -} - - -SWIGINTERN PyObject *_wrap_delete_Operators(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *delete_Operators(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/SShape.cpp b/source/blender/freestyle/intern/python/SShape.cpp index 201fba6ed9d..a5b1cf3f27a 100644 --- a/source/blender/freestyle/intern/python/SShape.cpp +++ b/source/blender/freestyle/intern/python/SShape.cpp @@ -1,120 +1,120 @@ -SWIGINTERN PyObject *_wrap_SShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SShape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_SShape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { + PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_SShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_SShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_AddEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_AddNewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_AddNewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_AddChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_AddChain(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_CreateSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SplitEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SetBBox(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_ComputeBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_ComputeBBox(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_RemoveEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_GetVertexList(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_GetEdgeList(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_GetChains(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_bbox(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_material(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_materials(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_viewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_importance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_importance(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SetId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SetMaterials(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SetViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SetViewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_SShape_SetImportance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SShape_SetImportance(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/StrokeAttribute.cpp index c38da608c2d..c54eca16e11 100644 --- a/source/blender/freestyle/intern/python/StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/StrokeAttribute.cpp @@ -1,112 +1,112 @@ -SWIGINTERN PyObject *_wrap_StrokeAttribute_getColor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getColor(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getColorR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getColorG(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getColorB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getAlpha(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getThickness(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getThickness(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getThicknessR(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getThicknessL(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_isVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_isVisible(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getAttributeReal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_isAttributeAvailableReal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec2f(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec3f(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setColor__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setAlpha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setAlpha(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setThickness__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeReal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setAttributeReal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader.cpp b/source/blender/freestyle/intern/python/StrokeShader.cpp index 6348b654003..268d1fabe36 100644 --- a/source/blender/freestyle/intern/python/StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_StrokeShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeShader_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_StrokeShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_StrokeShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp index 68ea395d7b9..96fd31e982e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_BackboneStretcherShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_BackboneStretcherShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_BackboneStretcherShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_BackboneStretcherShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp index bf480135451..a4d476bb2d6 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_BezierCurveShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_BezierCurveShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_BezierCurveShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_BezierCurveShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp index cf7caa68326..2f7a422d311 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_CalligraphicShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CalligraphicShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp index 34f21261c33..1b52e33fd8f 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_ColorNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ColorNoiseShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ColorNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ColorNoiseShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp index 4d97fbf6c3c..7529c869939 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_ColorVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ColorVariationPatternShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp index e1a58326696..e636331c57c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ConstantColorShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ConstantColorShader_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ConstantColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ConstantColorShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ConstantColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ConstantColorShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp index 3d6950d556e..1840ef71f6d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_ConstantThicknessShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ConstantThicknessShader_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ConstantThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ConstantThicknessShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp index a0e0a4ace8c..41eb1c94d17 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_ConstrainedIncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ConstrainedIncreasingThicknessShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp index fdd198a30af..633523af330 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_GuidingLinesShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GuidingLinesShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GuidingLinesShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GuidingLinesShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp index bfac8efda55..2fbb74f3768 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_IncreasingColorShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_IncreasingColorShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_IncreasingColorShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_IncreasingColorShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp index e17f06dfafb..4d97f43841d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_IncreasingThicknessShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_IncreasingThicknessShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp index 533d481165f..098330d37bd 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_PolygonalizationShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_PolygonalizationShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_PolygonalizationShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_PolygonalizationShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp index 698905ad292..3a42bda3b08 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_SamplingShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SamplingShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_SamplingShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_SamplingShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp index 68a41f48160..ff90e7f973c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_SpatialNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_SpatialNoiseShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp index 317273262ae..90636eb5aee 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_StrokeTextureShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeTextureShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_StrokeTextureShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_StrokeTextureShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp index 4bb2f6bf03a..9a308d60ac3 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_TextureAssignerShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TextureAssignerShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TextureAssignerShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TextureAssignerShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp index a0542e8d400..0c69aa5cfc1 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_ThicknessNoiseShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ThicknessNoiseShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ThicknessNoiseShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ThicknessNoiseShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp index 992d526e728..02326259be8 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_ThicknessVariationPatternShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ThicknessVariationPatternShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp index 883cd4c0ded..4a202ddd6ee 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp @@ -1,4 +1,4 @@ -SWIGINTERN PyObject *_wrap_TipRemoverShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TipRemoverShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp index 275c7277ce4..dc19cde3871 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_fstreamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_fstreamShader_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_fstreamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_fstreamShader_shade(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp index 4f36bfae337..aa3250f858c 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_streamShader_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_streamShader_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_streamShader_shade(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_streamShader_shade(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_streamShader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_streamShader(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp index 7997a73e28c..3fae5a34060 100644 --- a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp @@ -1,260 +1,260 @@ -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_castToInterface0DIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getObject(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator___deref__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator___deref__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_increment(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_decrement(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isBegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_isBegin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_isEnd(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator___eq__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_t(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_u(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_copy(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getIt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getIt(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_x(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_y(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_curvilinearAbscissa(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_strokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_strokeLength(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getProjectedX(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getProjectedY(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getProjectedZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getProjectedZ(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_getNature(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_castToSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_castToViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_castToNonTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_castToTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_A(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_B(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_t2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_t2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_fedge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_fedge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_normal(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occluders_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occluders_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occluders_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluders_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occluders_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occludee(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occluded_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occluded_shape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_occludee_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_occludee_empty(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_z_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_z_discontinuity(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_curvatureFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_curvatureFredo(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp index a6ec72c8c19..df286794dd3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp index 3a4b0326cf7..ccb89d91ecf 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp index 8388d964479..b854b3ccaa4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DId_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DId___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DId(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp index 9d2491bee33..425d1cdabf5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp index 36a7772ab72..828d39b6de7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp index 5996de16ac1..b6a6d0264bc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp index 0552b54aed8..f9736680ab8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp index a8af361cc63..3dddb333a55 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp index bed3db84681..58fa20b8e95 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ShapeIdF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ShapeIdF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ShapeIdF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ShapeIdF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ShapeIdF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ShapeIdF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ShapeIdF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp index d12d4b6383d..167a68b8977 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_MaterialF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_MaterialF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_MaterialF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_MaterialF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_MaterialF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_MaterialF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_MaterialF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp index 814c89c1766..1b155757589 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_CurveNatureF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurveNatureF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurveNatureF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurveNatureF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_CurveNatureF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_CurveNatureF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_CurveNatureF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp index 64ee307e011..99f892529ab 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_Normal2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Normal2DF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Normal2DF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_Normal2DF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Normal2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Normal2DF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp index 6611a23e41c..bf7fbfe2550 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_VertexOrientation2DF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_VertexOrientation2DF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_VertexOrientation2DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_VertexOrientation2DF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp index 24dabfcdc66..32d5ac529fa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_VertexOrientation3DF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_VertexOrientation3DF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_VertexOrientation3DF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_VertexOrientation3DF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp index 9029b9ea863..2dc779a3fdb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetOccludeeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludeeF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetOccludeeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludeeF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetOccludeeF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetOccludeeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetOccludeeF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp index 6e9d3abde41..92ec79efec5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetShapeF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetShapeF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetShapeF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetShapeF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetShapeF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetShapeF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetShapeF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp new file mode 100644 index 00000000000..50986360f2c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp @@ -0,0 +1,12 @@ + PyObject *_wrap_DensityF0D_getName(PyObject *self , PyObject *args) { +} + + + PyObject *_wrap_DensityF0D___call__(PyObject *self , PyObject *args) { +} + + + PyObject *_wrap_delete_DensityF0D(PyObject *self , PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp new file mode 100644 index 00000000000..0738f2cf6dc --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp @@ -0,0 +1,12 @@ + PyObject *_wrap_LocalAverageDepthF0D_getName(PyObject *self , PyObject *args) { +} + + + PyObject *_wrap_LocalAverageDepthF0D___call__(PyObject *self , PyObject *args) { +} + + + PyObject *_wrap_delete_LocalAverageDepthF0D(PyObject *self , PyObject *args) { +} + + diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp index cf684395749..359e3186905 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetCurvilinearAbscissaF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetCurvilinearAbscissaF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetCurvilinearAbscissaF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetCurvilinearAbscissaF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetCurvilinearAbscissaF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetCurvilinearAbscissaF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp index aab03185ae8..71b7ac85a7f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetParameterF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetParameterF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetParameterF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetParameterF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetParameterF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetParameterF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetParameterF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp index 5007e5c68cd..8def0ea948f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetViewMapGradientNormF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetViewMapGradientNormF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetViewMapGradientNormF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp index c0dc2350a00..74fdf60dffc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadCompleteViewMapPixelF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ReadCompleteViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadCompleteViewMapPixelF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ReadCompleteViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ReadCompleteViewMapPixelF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp index 4adcced09e5..cb2bdd4c60a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ReadMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadMapPixelF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ReadMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadMapPixelF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ReadMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ReadMapPixelF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp index 7c3c4c58120..dc32cf290a0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadSteerableViewMapPixelF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ReadSteerableViewMapPixelF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ReadSteerableViewMapPixelF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ReadSteerableViewMapPixelF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ReadSteerableViewMapPixelF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp index 749af7bbf8b..f91642ad7c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curvature2DAngleF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curvature2DAngleF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curvature2DAngleF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_Curvature2DAngleF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Curvature2DAngleF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp index 727e617512a..f99666cdd65 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetProjectedXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedXF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedXF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetProjectedXF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedXF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp index c135ac5a45c..44eb1d44bf2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetProjectedYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedYF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedYF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetProjectedYF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedYF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp index 928e3ce73f8..0257328973b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetProjectedZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedZF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedZF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetProjectedZF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedZF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp index e6286fd53fe..6bc16ad36d1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetXF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetXF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetXF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetXF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetXF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetXF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetXF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp index 767c21d5592..c2651fc59be 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetYF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetYF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetYF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetYF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetYF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetYF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetYF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp index 526a321f667..e3f1f56a932 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetZF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetZF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetZF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetZF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetZF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetZF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetZF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp index d043f373dd1..c72e020066a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ZDiscontinuityF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ZDiscontinuityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ZDiscontinuityF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ZDiscontinuityF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ZDiscontinuityF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp index edc9c97f740..15e3114b81a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_QuantitativeInvisibilityF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_QuantitativeInvisibilityF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp index 3968e1293a9..95de61007c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_GetOccludersF0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludersF0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludersF0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_GetOccludersF0D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetOccludersF0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetOccludersF0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp index f7c7dca2535..92a87b04a80 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp index b7194d3e116..ad7c6627799 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp index a41994114e4..cb572980f8f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp index 2b0b96e0357..eb230a2d49f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp index 546a3f66399..64fb6ef6ed7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp index 28b73b81b8a..d7b360eb10e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp index dafd9a65499..1fe16797593 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp index 37046f061b7..94d180e6cc8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_CurveNatureF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurveNatureF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_CurveNatureF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_CurveNatureF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_CurveNatureF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_CurveNatureF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp index eff9b48cc02..81e5a18cb2c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_Normal2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Normal2DF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Normal2DF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Normal2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Normal2DF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp index 20cf0d51899..2d6cfed8575 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_Orientation2DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Orientation2DF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Orientation2DF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Orientation2DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Orientation2DF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp index bb81f96636b..f416f2ace03 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_Orientation3DF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Orientation3DF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Orientation3DF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Orientation3DF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Orientation3DF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp index c8d47b2459d..861a94b7cd3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_DensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_DensityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_DensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_DensityF1D___call__(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp index dd701012a52..c8220604cb8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetCompleteViewMapDensityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetCompleteViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetCompleteViewMapDensityF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetCompleteViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetCompleteViewMapDensityF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp index eb6f4944493..b7c4e40fd82 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetDirectionalViewMapDensityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetDirectionalViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetDirectionalViewMapDensityF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetDirectionalViewMapDensityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetDirectionalViewMapDensityF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp index 72de11c5fa4..6b9c687e9e0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_LocalAverageDepthF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_LocalAverageDepthF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_LocalAverageDepthF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_LocalAverageDepthF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_LocalAverageDepthF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp index 88d2c10e5a5..d2057990944 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curvature2DAngleF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_Curvature2DAngleF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_Curvature2DAngleF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_Curvature2DAngleF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_Curvature2DAngleF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp index e61ee24e638..d7c8ace1bb2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetProjectedXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedXF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedXF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedXF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp index 9e718a52d50..e567e07ba5a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetProjectedYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedYF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedYF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedYF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp index d06dbf3e22d..b20ee1443e7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetProjectedZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedZF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetProjectedZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetProjectedZF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetProjectedZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetProjectedZF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp index 1b86998ad8e..21df4596b5e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp @@ -1,8 +1,8 @@ -SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetSteerableViewMapDensityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetSteerableViewMapDensityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetSteerableViewMapDensityF1D___call__(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp index 4dc575822be..bd5425450e8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetViewMapGradientNormF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetViewMapGradientNormF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetViewMapGradientNormF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetViewMapGradientNormF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetViewMapGradientNormF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp index 2a1b4a368dc..73b4df64df6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetXF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetXF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetXF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetXF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetXF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetXF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp index c63b097d650..36a1ffed9c6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetYF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetYF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetYF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetYF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetYF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetYF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp index c90b2827c38..ad0fc844a1c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetZF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetZF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetZF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetZF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetZF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetZF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp index a546ba3a459..886607f7ca9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ZDiscontinuityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ZDiscontinuityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ZDiscontinuityF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ZDiscontinuityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ZDiscontinuityF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp index af8855575b1..436b617886b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_QuantitativeInvisibilityF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp index 2c64c360207..7df4ea835ca 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetOccludeeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludeeF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludeeF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetOccludeeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetOccludeeF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp index 04031c34697..26c14fc4a81 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetOccludersF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludersF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetOccludersF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetOccludersF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetOccludersF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp index 839850b298e..e1fd19d5d3b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_GetShapeF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetShapeF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_GetShapeF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_GetShapeF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_GetShapeF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp index db66d1526a8..daf3c773267 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingTimeStampF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingTimeStampF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ChainingTimeStampF1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ChainingTimeStampF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp index 0a9052e4fab..291d180a3fe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_IncrementChainingTimeStampF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_IncrementChainingTimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_IncrementChainingTimeStampF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_IncrementChainingTimeStampF1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_IncrementChainingTimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_IncrementChainingTimeStampF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp index 27a6274940e..8df3b712a30 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_TimeStampF1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TimeStampF1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TimeStampF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TimeStampF1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_TimeStampF1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TimeStampF1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TimeStampF1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp index 5962613d088..13c8a088dfb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp @@ -1,20 +1,20 @@ -SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp index 0619e4d5bd0..7c67de86079 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryPredicate0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryPredicate0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryPredicate0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryPredicate0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryPredicate0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryPredicate0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp index 5747ad1e6ea..53930660f3f 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_FalseUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseUP0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FalseUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseUP0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_FalseUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_FalseUP0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp index 897ebd8ba90..776e49b5d77 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_TrueUP0D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueUP0D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TrueUP0D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueUP0D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TrueUP0D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TrueUP0D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp index a786c172563..0f2b5c4ad3a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_UnaryPredicate1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryPredicate1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_UnaryPredicate1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_UnaryPredicate1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_UnaryPredicate1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_UnaryPredicate1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp index d7a22ab9286..89ba9f3f683 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ContourUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ContourUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ContourUP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ContourUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp index dc9ec4ee5bf..664d73d59c1 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp index a8a185a51fc..7cd9c17a99b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp index b8083f3528e..d6925dd2b44 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp index 8cdabb068ca..9107f0fe326 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ExternalContourUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ExternalContourUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ExternalContourUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ExternalContourUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ExternalContourUP1D(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ExternalContourUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ExternalContourUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp index df1a53373c1..6164463a3af 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_FalseUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_FalseUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_FalseUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_FalseUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_FalseUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp index 0fb10c1f36c..fc538008446 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp index 752665b4aae..4ec5cc13b3a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ShapeUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ShapeUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ShapeUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ShapeUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ShapeUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ShapeUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp index 2b4584c01de..7c8e0a6239d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_TrueUP1D_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueUP1D_getName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_TrueUP1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_TrueUP1D___call__(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_TrueUP1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_TrueUP1D(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp index 53dbfc9b320..18ab37aeecd 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp @@ -1,36 +1,36 @@ -SWIGINTERN PyObject *_wrap_ChainingIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_init(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_traverse(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_getVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_getVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_isIncrementing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_isIncrementing(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_increment(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainingIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainingIterator_decrement(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ChainingIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_ChainingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_ChainingIterator(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp index 2f4c5645b47..3b3b4433e59 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp @@ -1,12 +1,12 @@ -SWIGINTERN PyObject *_wrap_ChainPredicateIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainPredicateIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainPredicateIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainPredicateIterator_traverse(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_ChainPredicateIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_ChainPredicateIterator(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp index 20a4a5d7c46..53d37c1578c 100644 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp @@ -1,16 +1,16 @@ -SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainSilhouetteIterator_getExactTypeName(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ChainSilhouetteIterator_traverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ChainSilhouetteIterator_traverse(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ChainSilhouetteIterator(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_disown_ChainSilhouetteIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_disown_ChainSilhouetteIterator(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/ViewMap.cpp b/source/blender/freestyle/intern/python/ViewMap.cpp index ecd3fe21e44..24a986b3885 100644 --- a/source/blender/freestyle/intern/python/ViewMap.cpp +++ b/source/blender/freestyle/intern/python/ViewMap.cpp @@ -1,104 +1,104 @@ -SWIGINTERN PyObject *_wrap_ViewMap_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewMap(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ViewMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ViewMap(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_getInstance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_getInstance(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_ViewShapes(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_ViewEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_ViewVertices(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_FEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_SVertices(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_viewedges_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_viewedges_begin(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_viewedges_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_viewedges_end(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_viewedges_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_viewedges_size(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_viewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_viewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_AddViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_AddViewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_AddViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_AddViewEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_AddViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_AddViewVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_AddFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_AddFEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_AddSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_AddSVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_CreateTVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/python/ViewShape.cpp b/source/blender/freestyle/intern/python/ViewShape.cpp index f95e0f829b0..023ce06f44f 100644 --- a/source/blender/freestyle/intern/python/ViewShape.cpp +++ b/source/blender/freestyle/intern/python/ViewShape.cpp @@ -1,88 +1,88 @@ -SWIGINTERN PyObject *_wrap_ViewShape_userdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_userdata_set(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_userdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_userdata_get(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { + PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_dupplicate(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_delete_ViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_delete_ViewShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_SplitEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { + PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_vertices(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_edges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_getId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_getId(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_SetSShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_SetSShape(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_SetVertices(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_SetEdges(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_AddVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_AddVertex(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_AddEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_AddEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_RemoveEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_RemoveEdge(PyObject *self , PyObject *args) { } -SWIGINTERN PyObject *_wrap_ViewShape_RemoveVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *_wrap_ViewShape_RemoveVertex(PyObject *self , PyObject *args) { } diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript index 481fdcbe13e..8612a9d6ca9 100644 --- a/source/blender/python/SConscript +++ b/source/blender/python/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = Split('BPY_interface.c BPY_menus.c') + env.Glob('api2_2x/*.c') incs = 'api2_2x ../blenkernel ../nodes ../blenlib ../blenloader' -incs += ' ../render/extern/include ../radiosity/extern/include' +incs += ' ../render/extern/include ../radiosity/extern/include ../freestyle/intern/python' incs += ' ../makesdna #intern/guardedalloc #intern/bmfont ../imbuf ../include' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_OPENGL_INC'] diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index d8385c1d660..633badb759d 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -97,6 +97,7 @@ struct ID; /*keep me up here */ #include "World.h" #include "Types.h" #include "Particle.h" +#include "Freestyle.h" /**********************************************************/ /* Python API function prototypes for the Blender module. */ @@ -1095,4 +1096,5 @@ void M_Blender_Init(void) PyDict_SetItemString(dict, "Window", Window_Init()); PyDict_SetItemString(dict, "World", World_Init()); + PyDict_SetItemString(dict, "Freestyle", Freestyle_Init()); } diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 93d2c12cbbe..888eca414d0 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1621,7 +1621,7 @@ void RE_TileProcessor(Render *re, int firsttile, int threaded) static void do_render_3d(Render *re) { - RenderLayer *rl; + // re->cfra= cfra; /* <- unused! */ /* make render verts/faces/halos/lamps */ From 8398730043faeb9af860ca7a408a5a4ba49b46f1 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 12 Jul 2008 05:02:47 +0000 Subject: [PATCH 388/430] soc-2008-mxcurioni: merge with trunk - rev 15540 --- intern/ghost/intern/GHOST_SystemWin32.cpp | 9 + intern/moto/include/GEN_Map.h | 18 ++ .../blender/blenlib/BLI_blenlib.vcproj | 6 + .../blender/blenkernel/BKE_bmeshCustomData.h | 4 +- source/blender/blenkernel/BKE_customdata.h | 6 + .../blenkernel/intern/BME_Customdata.c | 9 +- .../blenkernel/intern/BME_conversions.c | 271 ++++++++++++++++-- source/blender/blenkernel/intern/BME_eulers.c | 14 +- .../blender/blenkernel/intern/BME_structure.c | 1 - source/blender/blenkernel/intern/BME_tools.c | 82 +++++- .../blender/blenkernel/intern/DerivedMesh.c | 2 +- source/blender/blenkernel/intern/customdata.c | 117 +++++++- source/blender/blenkernel/intern/library.c | 60 ++-- source/blender/blenkernel/intern/modifier.c | 2 +- source/blender/blenkernel/intern/particle.c | 2 +- .../blenkernel/intern/particle_system.c | 10 +- source/blender/blenkernel/intern/pointcache.c | 16 +- source/blender/blenlib/BLI_mempool.h | 4 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 2 + source/blender/blenlib/intern/BLI_mempool.c | 13 +- source/blender/blenlib/intern/storage.c | 1 + source/blender/blenlib/intern/util.c | 1 + .../imbuf/intern/openexr/openexr_api.cpp | 41 ++- source/blender/include/BDR_drawobject.h | 1 + source/blender/include/BIF_editarmature.h | 2 +- source/blender/include/BSE_sequence.h | 2 + source/blender/makesdna/DNA_actuator_types.h | 10 +- source/blender/makesdna/DNA_space_types.h | 11 +- .../nodes/intern/CMP_nodes/CMP_gamma.c | 2 +- source/blender/python/api2_2x/sceneSequence.c | 74 ++++- .../radiosity/intern/source/radrender.c | 15 +- .../render/intern/source/convertblender.c | 1 + source/blender/src/buttons_logic.c | 98 ++++--- source/blender/src/buttons_object.c | 2 +- source/blender/src/buttons_scene.c | 2 +- source/blender/src/buttons_shading.c | 6 +- source/blender/src/drawarmature.c | 17 +- source/blender/src/drawimage.c | 2 +- source/blender/src/drawobject.c | 8 +- source/blender/src/drawview.c | 4 +- source/blender/src/editarmature.c | 51 +++- source/blender/src/editmesh_add.c | 18 +- source/blender/src/editnla.c | 35 ++- source/blender/src/editsima.c | 16 +- source/blender/src/edittime.c | 4 +- source/blender/src/header_image.c | 23 +- source/blender/src/header_view3d.c | 15 +- source/blender/src/sequence.c | 10 + source/blender/src/space.c | 21 +- source/blender/src/transform_conversions.c | 9 +- source/blender/src/usiblender.c | 2 + source/blender/src/view.c | 2 +- source/blender/src/vpaint.c | 36 +-- .../BlenderRoutines/KX_BlenderGL.cpp | 2 +- .../Converter/BL_ActionActuator.cpp | 32 ++- .../gameengine/Converter/BL_ActionActuator.h | 5 + .../Converter/BL_BlenderDataConversion.cpp | 121 ++++---- .../gameengine/Converter/BL_MeshDeformer.cpp | 164 ++++++----- source/gameengine/Converter/BL_MeshDeformer.h | 14 +- .../gameengine/Converter/BL_ShapeDeformer.h | 11 +- .../gameengine/Converter/BL_SkinDeformer.cpp | 53 ++-- source/gameengine/Converter/BL_SkinDeformer.h | 6 +- .../Converter/BL_SkinMeshObject.cpp | 84 ------ .../gameengine/Converter/BL_SkinMeshObject.h | 94 ------ .../Converter/KX_ConvertActuators.cpp | 8 +- source/gameengine/Expressions/PyObjectPlus.h | 32 ++- .../GameLogic/SCA_ActuatorSensor.cpp | 2 +- source/gameengine/GameLogic/SCA_IActuator.h | 1 + source/gameengine/GameLogic/SCA_IObject.cpp | 8 +- source/gameengine/GameLogic/SCA_IObject.h | 15 + source/gameengine/GameLogic/SCA_ISensor.h | 2 + source/gameengine/Ketsji/BL_BlenderShader.cpp | 80 ++++-- source/gameengine/Ketsji/BL_BlenderShader.h | 15 +- source/gameengine/Ketsji/BL_Material.cpp | 6 +- source/gameengine/Ketsji/BL_Material.h | 7 +- .../gameengine/Ketsji/KX_BlenderMaterial.cpp | 100 +++++-- source/gameengine/Ketsji/KX_BlenderMaterial.h | 2 + source/gameengine/Ketsji/KX_GameObject.cpp | 92 +++--- source/gameengine/Ketsji/KX_GameObject.h | 17 +- .../gameengine/Ketsji/KX_IPO_SGController.cpp | 87 ++++-- .../gameengine/Ketsji/KX_IPO_SGController.h | 7 +- source/gameengine/Ketsji/KX_IpoActuator.cpp | 171 +++++------ source/gameengine/Ketsji/KX_IpoActuator.h | 12 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 46 ++- source/gameengine/Ketsji/KX_KetsjiEngine.h | 1 + source/gameengine/Ketsji/KX_Light.cpp | 80 +++++- source/gameengine/Ketsji/KX_Light.h | 16 +- .../gameengine/Ketsji/KX_ParentActuator.cpp | 6 + source/gameengine/Ketsji/KX_Scene.cpp | 43 +-- source/gameengine/Ketsji/KX_Scene.h | 8 +- .../Ketsji/KX_TouchEventManager.cpp | 16 +- source/gameengine/PyDoc/BL_ActionActuator.py | 15 + .../Rasterizer/RAS_BucketManager.cpp | 2 +- .../Rasterizer/RAS_IPolygonMaterial.cpp | 16 ++ .../Rasterizer/RAS_IPolygonMaterial.h | 2 + .../gameengine/Rasterizer/RAS_IRasterizer.h | 59 ++-- .../Rasterizer/RAS_MaterialBucket.cpp | 53 ++-- .../Rasterizer/RAS_MaterialBucket.h | 10 +- .../gameengine/Rasterizer/RAS_MeshObject.cpp | 63 ++-- source/gameengine/Rasterizer/RAS_MeshObject.h | 6 +- .../RAS_ListRasterizer.cpp | 25 +- .../RAS_OpenGLRasterizer/RAS_ListRasterizer.h | 8 +- .../RAS_OpenGLRasterizer.cpp | 102 ++----- .../RAS_OpenGLRasterizer.h | 10 +- .../RAS_VAOpenGLRasterizer.cpp | 94 +++--- .../RAS_VAOpenGLRasterizer.h | 8 +- source/gameengine/Rasterizer/RAS_TexVert.cpp | 42 +-- source/gameengine/Rasterizer/RAS_TexVert.h | 24 +- source/gameengine/SceneGraph/SG_Controller.h | 4 +- source/kernel/gen_system/GEN_HashedPtr.h | 1 + source/kernel/gen_system/GEN_Map.h | 18 ++ tools/Blender.py | 27 +- 112 files changed, 2057 insertions(+), 1188 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 82a76b3c706..293f8fc1661 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -302,6 +302,15 @@ GHOST_TSuccess GHOST_SystemWin32::init() { GHOST_TSuccess success = GHOST_System::init(); + /* Disable scaling on high DPI displays on Vista */ + HMODULE user32 = ::LoadLibraryA("user32.dll"); + typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)(); + LPFNSETPROCESSDPIAWARE SetProcessDPIAware = + (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware"); + if (SetProcessDPIAware) + SetProcessDPIAware(); + FreeLibrary(user32); + // Determine whether this system has a high frequency performance counter. */ m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE; if (m_hasPerformanceCounter) { diff --git a/intern/moto/include/GEN_Map.h b/intern/moto/include/GEN_Map.h index db3335d6110..9f56924419e 100644 --- a/intern/moto/include/GEN_Map.h +++ b/intern/moto/include/GEN_Map.h @@ -82,6 +82,24 @@ public: } return 0; } + + Key* getKey(int index) { + int count=0; + for (int i=0;im_key; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } void clear() { for (int i = 0; i < m_num_buckets; ++i) { diff --git a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj index 34c195cf23d..0dfbcaa5577 100644 --- a/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj +++ b/projectfiles_vc7/blender/blenlib/BLI_blenlib.vcproj @@ -358,6 +358,9 @@ + + @@ -473,6 +476,9 @@ + + diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index 423f75e532d..4f5f2641f54 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -38,7 +38,7 @@ #ifndef BKE_BMESHCUSTOMDATA_H #define BKE_BMESHCUSTOMDATA_H -struct BME_mempool; +struct BLI_mempool; /*Custom Data Types and defines Eventual plan is to move almost everything to custom data and let caller @@ -62,7 +62,7 @@ typedef struct BME_CustomDataLayer { typedef struct BME_CustomData { struct BME_CustomDataLayer *layers; /*Custom Data Layers*/ - struct BME_mempool *pool; /*pool for alloc of blocks*/ + struct BLI_mempool *pool; /*pool for alloc of blocks*/ int totlayer, totsize; /*total layers and total size in bytes of each block*/ } BME_CustomData; diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 81c2e4a4b94..e84c7d30956 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -41,6 +41,7 @@ extern const CustomDataMask CD_MASK_MESH; extern const CustomDataMask CD_MASK_EDITMESH; extern const CustomDataMask CD_MASK_DERIVEDMESH; extern const CustomDataMask CD_MASK_BMESH; +extern const CustomDataMask CD_MASK_FACECORNERS; /* for ORIGINDEX layer type, indicates no original index for this element */ #define ORIGINDEX_NONE -1 @@ -264,4 +265,9 @@ void CustomData_set_layer_unique_name(struct CustomData *data, int index); /* for file reading compatibility, returns false if the layer was freed, only after this test passes, layer->data should be assigned */ int CustomData_verify_versions(struct CustomData *data, int index); + +/*BMesh specific customdata stuff*/ +void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata); +void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *pdata, struct CustomData *ldata, int total); +void CustomData_bmesh_init_pool(struct CustomData *data, int allocsize); #endif diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c index 8b48efbdbd2..1fc8a4071dc 100644 --- a/source/blender/blenkernel/intern/BME_Customdata.c +++ b/source/blender/blenkernel/intern/BME_Customdata.c @@ -40,6 +40,7 @@ #include "bmesh_private.h" #include #include "MEM_guardedalloc.h" +#include "BLI_mempool.h" /********************* Layer type information **********************/ typedef struct BME_LayerTypeInfo { @@ -83,7 +84,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc if(data->totlayer){ /*alloc memory*/ data->layers = MEM_callocN(sizeof(BME_CustomDataLayer)*data->totlayer, "BMesh Custom Data Layers"); - data->pool = BME_mempool_create(data->totsize, initalloc, initalloc); + data->pool = BLI_mempool_create(data->totsize, initalloc, initalloc); /*initialize layer data*/ for(i=0; i < BME_CD_NUMTYPES; i++){ if(init->layout[i]){ @@ -102,7 +103,7 @@ void BME_CD_Create(BME_CustomData *data, BME_CustomDataInit *init, int initalloc void BME_CD_Free(BME_CustomData *data) { - if(data->pool) BME_mempool_destroy(data->pool); + if(data->pool) BLI_mempool_destroy(data->pool); } /*Block level ops*/ @@ -119,7 +120,7 @@ void BME_CD_free_block(BME_CustomData *data, void **block) typeInfo->free((char*)*block + offset, 1, typeInfo->size); } } - BME_mempool_free(data->pool, *block); + BLI_mempool_free(data->pool, *block); *block = NULL; } @@ -130,7 +131,7 @@ static void BME_CD_alloc_block(BME_CustomData *data, void **block) if (*block) BME_CD_free_block(data, block); //if we copy layers that have their own free functions like deformverts if (data->totsize > 0) - *block = BME_mempool_alloc(data->pool); + *block = BLI_mempool_alloc(data->pool); else *block = NULL; } diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 7952546de7c..daf0de5b748 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -55,14 +55,200 @@ #include "bmesh_private.h" #include "BSE_edit.h" -/*Converts an EditMesh to a BME_Mesh.*/ -static void bmesh_init_cdPool(CustomData *data, int allocsize){ - if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize); + +/*merge these functions*/ +static void BME_DMcorners_to_loops(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f, int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i< numTex; i++){ + texface = CustomData_get_layer_n(facedata, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texpoly->tpage = texface[index].tpage; + texpoly->flag = texface[index].flag; + texpoly->transp = texface[index].transp; + texpoly->mode = texface[index].mode; + texpoly->tile = texface[index].tile; + texpoly->unwrap = texface[index].unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + mloopuv->uv[0] = texface[index].uv[j][0]; + mloopuv->uv[1] = texface[index].uv[j][1]; + j++; + l = l->next; + }while(l!=f->loopbase); + } + + for(i=0; i < numCol; i++){ + mcol = CustomData_get_layer_n(facedata, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mloopcol->r = mcol[(index*4)+j].r; + mloopcol->g = mcol[(index*4)+j].g; + mloopcol->b = mcol[(index*4)+j].b; + mloopcol->a = mcol[(index*4)+j].a; + j++; + l = l->next; + }while(l!=f->loopbase); + } } +static void BME_DMloops_to_corners(BME_Mesh *bm, CustomData *facedata, int index, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_get_layer_n(facedata, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texface[index].tpage = texpoly->tpage; + texface[index].flag = texpoly->flag; + texface[index].transp = texpoly->transp; + texface[index].mode = texpoly->mode; + texface[index].tile = texpoly->tile; + texface[index].unwrap = texpoly->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + texface[index].uv[j][0] = mloopuv->uv[0]; + texface[index].uv[j][1] = mloopuv->uv[1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_get_layer_n(facedata,CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mcol[(index*4) + j].r = mloopcol->r; + mcol[(index*4) + j].g = mloopcol->g; + mcol[(index*4) + j].b = mloopcol->b; + mcol[(index*4) + j].a = mloopcol->a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} + + +static void BME_corners_to_loops(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_em_get_n(facedata, face_block, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texpoly->tpage = texface->tpage; + texpoly->flag = texface->flag; + texpoly->transp = texface->transp; + texpoly->mode = texface->mode; + texpoly->tile = texface->tile; + texpoly->unwrap = texface->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + mloopuv->uv[0] = texface->uv[j][0]; + mloopuv->uv[1] = texface->uv[j][1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_em_get_n(facedata, face_block, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mloopcol->r = mcol[j].r; + mloopcol->g = mcol[j].g; + mloopcol->b = mcol[j].b; + mloopcol->a = mcol[j].a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} + +static void BME_loops_to_corners(BME_Mesh *bm, CustomData *facedata, void *face_block, BME_Poly *f,int numCol, int numTex){ + int i, j; + BME_Loop *l; + MTFace *texface; + MTexPoly *texpoly; + MCol *mcol; + MLoopCol *mloopcol; + MLoopUV *mloopuv; + + for(i=0; i < numTex; i++){ + texface = CustomData_em_get_n(facedata, face_block, CD_MTFACE, i); + texpoly = CustomData_bmesh_get_n(&bm->pdata, f->data, CD_MTEXPOLY, i); + + texface->tpage = texpoly->tpage; + texface->flag = texpoly->flag; + texface->transp = texpoly->transp; + texface->mode = texpoly->mode; + texface->tile = texpoly->tile; + texface->unwrap = texpoly->unwrap; + + j = 0; + l = f->loopbase; + do{ + mloopuv = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPUV, i); + texface->uv[j][0] = mloopuv->uv[0]; + texface->uv[j][1] = mloopuv->uv[1]; + j++; + l = l->next; + }while(l!=f->loopbase); + + } + for(i=0; i < numCol; i++){ + mcol = CustomData_em_get_n(facedata, face_block, CD_MCOL, i); + j = 0; + l = f->loopbase; + do{ + mloopcol = CustomData_bmesh_get_n(&bm->ldata, l->data, CD_MLOOPCOL, i); + mcol[j].r = mloopcol->r; + mcol[j].g = mloopcol->g; + mcol[j].b = mloopcol->b; + mcol[j].a = mloopcol->a; + j++; + l = l->next; + }while(l!=f->loopbase); + } +} +/*move the EditMesh conversion functions to editmesh_tools.c*/ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { BME_Mesh *bm; - int allocsize[4] = {512,512,2048,512}; + int allocsize[4] = {512,512,2048,512}, numTex, numCol; BME_Vert *v1, *v2; BME_Edge *e, *edar[4]; BME_Poly *f; @@ -74,8 +260,21 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { int len; bm = BME_make_mesh(allocsize); + /*copy custom data layout*/ CustomData_copy(&em->vdata, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0); - bmesh_init_cdPool(&bm->vdata, allocsize[0]); + CustomData_copy(&em->edata, &bm->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&em->fdata, &bm->pdata, CD_MASK_BMESH, CD_CALLOC, 0); + + /*copy face corner data*/ + CustomData_to_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata); + /*initialize memory pools*/ + CustomData_bmesh_init_pool(&bm->vdata, allocsize[0]); + CustomData_bmesh_init_pool(&bm->edata, allocsize[1]); + CustomData_bmesh_init_pool(&bm->ldata, allocsize[2]); + CustomData_bmesh_init_pool(&bm->pdata, allocsize[3]); + /*needed later*/ + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); BME_model_begin(bm); /*add verts*/ @@ -86,7 +285,6 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { v1->flag = eve->f; v1->h = eve->h; v1->bweight = eve->bweight; - /*Copy Custom Data*/ CustomData_bmesh_copy_data(&em->vdata, &bm->vdata, eve->data, &v1->data); eve->tmp.v = (EditVert*)v1; @@ -106,15 +304,10 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { if(eed->seam) e->flag |= ME_SEAM; if(eed->h & EM_FGON) e->flag |= ME_FGON; if(eed->h & 1) e->flag |= ME_HIDE; - - /* link the edges for face construction; - * kind of a dangerous thing - remember to cast back to BME_Edge before using! */ - /*Copy CustomData*/ - eed->tmp.e = (EditEdge*)e; + CustomData_bmesh_copy_data(&em->edata, &bm->edata, eed->data, &e->data); eed = eed->next; } - /*add faces.*/ efa= em->faces.first; while(efa) { @@ -143,12 +336,13 @@ BME_Mesh *BME_editmesh_to_bmesh(EditMesh *em) { if(efa->f & 1) f->flag |= ME_FACE_SEL; else f->flag &= ~ME_FACE_SEL; } + CustomData_bmesh_copy_data(&em->fdata, &bm->pdata, efa->data, &f->data); + BME_corners_to_loops(bm, &em->fdata, efa->data, f,numCol,numTex); efa = efa->next; } BME_model_end(bm); return bm; } - /* adds the geometry in the bmesh to G.editMesh (does not free G.editMesh) * if td != NULL, the transdata will be mapped to the EditVert's co */ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { @@ -163,7 +357,7 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { EditEdge *eed; EditFace *efa; - int totvert, len, i; + int totvert, len, i, numTex, numCol; em = G.editMesh; @@ -171,6 +365,13 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { CustomData_copy(&bm->vdata, &em->vdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&bm->edata, &em->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&bm->pdata, &em->fdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_from_bmeshpoly(&em->fdata, &bm->pdata, &bm->ldata,0); + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + + /* convert to EditMesh */ /* make editverts */ totvert = BLI_countlist(&(bm->verts)); @@ -202,6 +403,8 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { if(e->flag & ME_HIDE) eed->h |= 1; if(G.scene->selectmode==SCE_SELECT_EDGE) EM_select_edge(eed, eed->f & SELECT); + + CustomData_em_copy_data(&bm->edata, &em->edata, e->data, &eed->data); } } @@ -228,6 +431,8 @@ EditMesh *BME_bmesh_to_editmesh(BME_Mesh *bm, BME_TransData_Head *td) { if(f->flag & ME_HIDE) efa->h= 1; if((G.f & G_FACESELECT) && (efa->f & SELECT)) EM_select_face(efa, 1); /* flush down */ + CustomData_em_copy_data(&bm->pdata, &em->fdata, f->data, &efa->data); + BME_loops_to_corners(bm, &em->fdata, efa->data, f,numCol,numTex); } } @@ -248,7 +453,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) MVert *mvert, *mv; MEdge *medge, *me; MFace *mface, *mf; - int totface,totedge,totvert,i,len; + int totface,totedge,totvert,i,len, numTex, numCol; BME_Vert *v1=NULL,*v2=NULL, **vert_array; BME_Edge *e=NULL; BME_Poly *f=NULL; @@ -256,6 +461,22 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) EdgeHash *edge_hash = BLI_edgehash_new(); bm = BME_make_mesh(allocsize); + /*copy custom data layout*/ + CustomData_copy(&dm->vertData, &bm->vdata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&dm->edgeData, &bm->edata, CD_MASK_BMESH, CD_CALLOC, 0); + CustomData_copy(&dm->faceData, &bm->pdata, CD_MASK_BMESH, CD_CALLOC, 0); + + /*copy face corner data*/ + CustomData_to_bmeshpoly(&dm->faceData, &bm->pdata, &bm->ldata); + /*initialize memory pools*/ + CustomData_bmesh_init_pool(&bm->vdata, allocsize[0]); + CustomData_bmesh_init_pool(&bm->edata, allocsize[1]); + CustomData_bmesh_init_pool(&bm->ldata, allocsize[2]); + CustomData_bmesh_init_pool(&bm->pdata, allocsize[3]); + /*needed later*/ + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + totvert = dm->getNumVerts(dm); totedge = dm->getNumEdges(dm); totface = dm->getNumFaces(dm); @@ -272,6 +493,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) vert_array[i] = v1; v1->flag = mv->flag; v1->bweight = mv->bweight/255.0f; + CustomData_to_bmesh_block(&dm->vertData, &bm->vdata, i, &v1->data); } /*add edges*/ for(i=0,me = medge; i < totedge;i++,me++){ @@ -282,6 +504,7 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) e->bweight = me->bweight/255.0f; e->flag = (unsigned char)me->flag; BLI_edgehash_insert(edge_hash,me->v1,me->v2,e); + CustomData_to_bmesh_block(&dm->edgeData, &bm->edata, i, &e->data); } /*add faces.*/ for(i=0,mf = mface; i < totface;i++,mf++){ @@ -305,6 +528,8 @@ BME_Mesh *BME_derivedmesh_to_bmesh(DerivedMesh *dm) f = BME_MF(bm,v1,v2,edar,len); f->mat_nr = mf->mat_nr; f->flag = mf->flag; + CustomData_to_bmesh_block(&dm->faceData,&bm->pdata,i,&f->data); + BME_DMcorners_to_loops(bm, &dm->faceData,i,f, numCol,numTex); } BME_model_end(bm); @@ -318,7 +543,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) MFace *mface, *mf; MEdge *medge, *me; MVert *mvert, *mv; - int totface,totedge,totvert,i,bmeshok,len; + int totface,totedge,totvert,i,bmeshok,len, numTex, numCol; BME_Vert *v1=NULL; BME_Edge *e=NULL, *oe=NULL; @@ -354,12 +579,21 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) /*convert back to mesh*/ result = CDDM_from_template(dm,totvert,totedge,totface); + CustomData_merge(&bm->vdata, &result->vertData, CD_MASK_BMESH, CD_CALLOC, totvert); + CustomData_merge(&bm->edata, &result->edgeData, CD_MASK_BMESH, CD_CALLOC, totedge); + CustomData_merge(&bm->pdata, &result->faceData, CD_MASK_BMESH, CD_CALLOC, totface); + CustomData_from_bmeshpoly(&result->faceData, &bm->pdata, &bm->ldata,totface); + numTex = CustomData_number_of_layers(&bm->pdata, CD_MTEXPOLY); + numCol = CustomData_number_of_layers(&bm->ldata, CD_MLOOPCOL); + + /*Make Verts*/ mvert = CDDM_get_verts(result); for(i=0,v1=bm->verts.first,mv=mvert;v1;v1=v1->next,i++,mv++){ VECCOPY(mv->co,v1->co); mv->flag = (unsigned char)v1->flag; mv->bweight = (char)(255.0*v1->bweight); + CustomData_from_bmesh_block(&bm->vdata, &result->vertData, &v1->data, i); } medge = CDDM_get_edges(result); i=0; @@ -377,6 +611,7 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) me->crease = (char)(255.0*e->crease); me->bweight = (char)(255.0*e->bweight); me->flag = e->flag; + CustomData_from_bmesh_block(&bm->edata, &result->edgeData, &e->data, i); me++; i++; } @@ -398,9 +633,11 @@ DerivedMesh *BME_bmesh_to_derivedmesh(BME_Mesh *bm, DerivedMesh *dm) if(mf->v3 == 0 || (len == 4 && mf->v4 == 0)){ test_index_face(mf, NULL, i, len); } - i++; mf->mat_nr = (unsigned char)f->mat_nr; mf->flag = (unsigned char)f->flag; + CustomData_from_bmesh_block(&bm->pdata, &result->faceData, &f->data, i); + BME_DMloops_to_corners(bm, &result->faceData, i, f,numCol,numTex); + i++; } } } diff --git a/source/blender/blenkernel/intern/BME_eulers.c b/source/blender/blenkernel/intern/BME_eulers.c index 3403f5829fe..801e0b8bdec 100644 --- a/source/blender/blenkernel/intern/BME_eulers.c +++ b/source/blender/blenkernel/intern/BME_eulers.c @@ -39,6 +39,7 @@ #include "DNA_mesh_types.h" #include "BKE_utildefines.h" +#include "BKE_customdata.h" #include "BKE_bmesh.h" #include "BLI_blenlib.h" @@ -618,8 +619,8 @@ BME_Poly *BME_SFME(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Vert *v2, BME_Lo BME_disk_append_edge(e, v2); f2 = BME_addpolylist(bm,f); - f1loop = BME_create_loop(bm,v2,e,f,NULL); - f2loop = BME_create_loop(bm,v1,e,f2,NULL); + f1loop = BME_create_loop(bm,v2,e,f,v2loop); + f2loop = BME_create_loop(bm,v1,e,f2,v1loop); f1loop->prev = v2loop->prev; f2loop->prev = v1loop->prev; @@ -663,16 +664,16 @@ BME_Poly *BME_SFME(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Vert *v2, BME_Lo * Takes a an edge and pointer to one of its vertices and collapses * the edge on that vertex. * - * Before: OE KE + * Before: OE KE * ------- ------- * | || | - * OV KV TV + * OV KV TV * * * After: OE * --------------- * | | - * OV TV + * OV TV * * * Restrictions: @@ -723,6 +724,8 @@ int BME_JEKV(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv) /*remove ke from tv's disk cycle*/ BME_disk_remove_edge(ke, tv); + + /*deal with radial cycle of ke*/ if(ke->loop){ /*first step, fix the neighboring loops of all loops in ke's radial cycle*/ @@ -763,6 +766,7 @@ int BME_JEKV(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv) } + /*Validate disk cycles*/ diskbase = BME_disk_getpointer(ov->edge,ov); edok = BME_cycle_validate(valance1, diskbase); diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index 92ef9e3e03c..ca27f5efd10 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -41,7 +41,6 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" #include "BLI_ghash.h" - /** * MISC utility functions. * diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index 916e6bee59f..90259031e5c 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -215,10 +215,42 @@ static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, src[1]= v2->data; w[0] = 1.0f-fac; w[1] = fac; - CustomData_em_interp(&bm->vdata, src, w, NULL, 2, v->data); + CustomData_bmesh_interp(&bm->vdata, src, w, NULL, 2, v->data); } } + +static void BME_data_facevert_edgesplit(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, BME_Edge *e1, float fac){ + void *src[2]; + float w[2]; + BME_Loop *l=NULL, *v1loop = NULL, *vloop = NULL, *v2loop = NULL; + + w[0] = 1.0f - fac; + w[1] = fac; + + if(!e1->loop) return; + l = e1->loop; + do{ + if(l->v == v1){ + v1loop = l; + vloop = v1loop->next; + v2loop = vloop->next; + }else if(l->v == v){ + v1loop = l->next; + vloop = l; + v2loop = l->prev; + + } + + src[0] = v1loop->data; + src[1] = v2loop->data; + + CustomData_bmesh_interp(&bm->ldata, src,w, NULL, 2, vloop->data); + l = l->radial.next->data; + }while(l!=e1->loop); +} + + /* a wrapper for BME_SEMV that transfers element flags */ /*add custom data interpolation in here!*/ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge **ne, float percent) { BME_Vert *nv, *v2; @@ -238,9 +270,37 @@ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge (*ne)->crease = e->crease; (*ne)->bweight = e->bweight; } + /*v->nv->v2*/ + BME_data_facevert_edgesplit(bm,v2, v, nv, e, 0.75); return nv; } +static void BME_collapse_vert(BME_Mesh *bm, BME_Edge *ke, BME_Vert *kv, float fac){ + void *src[2]; + float w[2]; + BME_Loop *l=NULL, *kvloop=NULL, *tvloop=NULL; + BME_Vert *tv = BME_edge_getothervert(ke,kv); + + w[0] = 1.0f - fac; + w[1] = fac; + + if(ke->loop){ + l = ke->loop; + do{ + if(l->v == tv && l->next->v == kv){ + tvloop = l; + kvloop = l->next; + + src[0] = kvloop->data; + src[1] = tvloop->data; + CustomData_bmesh_interp(&bm->ldata, src,w, NULL, 2, kvloop->data); + } + l=l->radial.next->data; + }while(l!=ke->loop); + } + BME_JEKV(bm,ke,kv); +} + static int BME_bevel_is_split_vert(BME_Loop *l) { @@ -367,6 +427,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B ov = BME_edge_getothervert(e1,v); sv = BME_split_edge(bm,v,e1,&ne,0); //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ + //BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25); + //BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25); BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ @@ -408,6 +470,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B ov = BME_edge_getothervert(l->e,v); sv = BME_split_edge(bm,v,l->e,&ne,0); //BME_data_interp_from_verts(bm, v, ov, sv, 0.25); /*this is technically wrong...*/ + //BME_data_interp_from_faceverts(bm, v, ov, sv, 0.25); + //BME_data_interp_from_faceverts(bm, ov, v, sv, 0.25); BME_assign_transdata(td, bm, sv, sv->co, sv->co, NULL, sv->co, 0, -1, -1, NULL); /* quick default */ sv->tflag1 |= BME_BEVEL_BEVEL; ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */ @@ -586,12 +650,15 @@ static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int opti if (kl->v == kv) { BME_split_face(bm,kl->f,kl->prev->v,kl->next->v,&nl,kl->prev->e); BME_JFKE(bm,((BME_Loop*)kl->prev->radial.next->data)->f,kl->f,kl->prev->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); + } else { BME_split_face(bm,kl->f,kl->next->next->v,kl->v,&nl,kl->next->e); BME_JFKE(bm,((BME_Loop*)kl->next->radial.next->data)->f,kl->f,kl->next->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } l = l->prev; } @@ -620,12 +687,14 @@ static BME_Loop *BME_bevel_edge(BME_Mesh *bm, BME_Loop *l, float value, int opti if (kl->v == kv) { BME_split_face(bm,kl->f,kl->prev->v,kl->next->v,&nl,kl->prev->e); BME_JFKE(bm,((BME_Loop*)kl->prev->radial.next->data)->f,kl->f,kl->prev->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } else { BME_split_face(bm,kl->f,kl->next->next->v,kl->v,&nl,kl->next->e); BME_JFKE(bm,((BME_Loop*)kl->next->radial.next->data)->f,kl->f,kl->next->e); - BME_JEKV(bm,kl->e,kv); + BME_collapse_vert(bm, kl->e, kv, 1.0); + //BME_JEKV(bm,kl->e,kv); } } @@ -1092,7 +1161,8 @@ static void bmesh_dissolve_disk(BME_Mesh *bm, BME_Vert *v){ e = BME_disk_nextedge(e,v); }while(e != v->edge); } - BME_JEKV(bm,v->edge,v); + BME_collapse_vert(bm, v->edge, v, 1.0); + //BME_JEKV(bm,v->edge,v); } } static BME_Mesh *BME_bevel_mesh(BME_Mesh *bm, float value, int res, int options, int defgrp_index, BME_TransData_Head *td) { diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 30405660658..4d3f9143b85 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1052,7 +1052,7 @@ void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r) /* store vertex indices in tmp union */ for(ev = em->verts.first, i = 0; ev; ev = ev->next, ++i) - ev->tmp.l = (long) i++; + ev->tmp.l = (long) i; for( ; ee; ee = ee->next, ++edge_r) { edge_r->crease = (unsigned char) (ee->crease*255.0f); diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 4880a246e1c..501293ecd81 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -360,8 +360,80 @@ static void layerDefault_origspace_face(void *data, int count) } /* --------- */ +static void layerDefault_mloopcol(void *data, int count) +{ + static MLoopCol default_mloopcol = {255,255,255,255}; + MLoopCol *mlcol = (MLoopCol*)data; + int i; + for(i = 0; i < count; i++) + mlcol[i] = default_mloopcol; +} +static void layerInterp_mloopcol(void **sources, float *weights, + float *sub_weights, int count, void *dest) +{ + MLoopCol *mc = dest; + int i; + float *sub_weight; + struct { + float a; + float r; + float g; + float b; + } col; + col.a = col.r = col.g = col.b = 0; + + sub_weight = sub_weights; + for(i = 0; i < count; ++i){ + float weight = weights ? weights[i] : 1; + MLoopCol *src = sources[i]; + if(sub_weights){ + col.a += src->a * (*sub_weight) * weight; + col.r += src->r * (*sub_weight) * weight; + col.g += src->g * (*sub_weight) * weight; + col.b += src->b * (*sub_weight) * weight; + sub_weight++; + } else { + col.a += src->a * weight; + col.r += src->r * weight; + col.g += src->g * weight; + col.b += src->b * weight; + } + } + mc->a = (int)col.a; + mc->r = (int)col.r; + mc->g = (int)col.g; + mc->b = (int)col.b; +} +static void layerInterp_mloopuv(void **sources, float *weights, + float *sub_weights, int count, void *dest) +{ + MLoopUV *mluv = dest; + int i; + float *sub_weight; + struct { + float u; + float v; + }uv; + uv.u = uv.v = 0.0; + + sub_weight = sub_weights; + for(i = 0; i < count; ++i){ + float weight = weights ? weights[i] : 1; + MLoopUV *src = sources[i]; + if(sub_weights){ + uv.u += src->uv[0] * (*sub_weight) * weight; + uv.v += src->uv[1] * (*sub_weight) * weight; + sub_weight++; + } else { + uv.u += src->uv[0] * weight; + uv.v += src->uv[1] * weight; + } + } + mluv->uv[0] = uv.u; + mluv->uv[1] = uv.v; +} static void layerInterp_mcol(void **sources, float *weights, float *sub_weights, int count, void *dest) @@ -433,6 +505,8 @@ static void layerDefault_mcol(void *data, int count) mcol[i] = default_mcol; } + + const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { {sizeof(MVert), "MVert", 1, NULL, NULL, NULL, NULL, NULL, NULL}, {sizeof(MSticky), "MSticky", 1, NULL, NULL, NULL, layerInterp_msticky, NULL, @@ -457,8 +531,8 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerInterp_origspace_face, layerSwap_origspace_face, layerDefault_origspace_face}, {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}, {sizeof(MTexPoly), "MTexPoly", 1, "Face Texture", NULL, NULL, NULL, NULL, NULL}, - {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, NULL, NULL, NULL}, - {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, NULL, NULL, NULL} + {sizeof(MLoopUV), "MLoopUV", 1, "UV coord", NULL, NULL, layerInterp_mloopuv, NULL, NULL}, + {sizeof(MLoopCol), "MLoopCol", 1, "Col", NULL, NULL, layerInterp_mloopcol, NULL, layerDefault_mloopcol} }; const char *LAYERTYPENAMES[CD_NUMTYPES] = { @@ -480,7 +554,11 @@ const CustomDataMask CD_MASK_DERIVEDMESH = CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO; const CustomDataMask CD_MASK_BMESH = - CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL; + CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR; +const CustomDataMask CD_MASK_FACECORNERS = + CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV | + CD_MASK_MLOOPCOL; + static const LayerTypeInfo *layerType_getInfo(int type) { @@ -1456,6 +1534,36 @@ void CustomData_from_em_block(const CustomData *source, CustomData *dest, } /*Bmesh functions*/ +/*needed to convert to/from different face reps*/ +void CustomData_to_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata) +{ + int i; + for(i=0; i < fdata->totlayer; i++){ + if(fdata->layers[i].type == CD_MTFACE){ + CustomData_add_layer(pdata, CD_MTEXPOLY, CD_CALLOC, &(fdata->layers[i].name), 0); + CustomData_add_layer(ldata, CD_MLOOPUV, CD_CALLOC, &(fdata->layers[i].name), 0); + } + else if(fdata->layers[i].type == CD_MCOL) + CustomData_add_layer(ldata, CD_MLOOPCOL, CD_CALLOC, &(fdata->layers[i].name), 0); + } +} +void CustomData_from_bmeshpoly(CustomData *fdata, CustomData *pdata, CustomData *ldata, int total){ + int i; + for(i=0; i < pdata->totlayer; i++){ + if(pdata->layers[i].type == CD_MTEXPOLY) + CustomData_add_layer(fdata, CD_MTFACE, CD_CALLOC, &(pdata->layers[i].name), total); + } + for(i=0; i < ldata->totlayer; i++){ + if(ldata->layers[i].type == CD_MLOOPCOL) + CustomData_add_layer(fdata, CD_MCOL, CD_CALLOC, &(ldata->layers[i].name), total); + } +} + + +void CustomData_bmesh_init_pool(CustomData *data, int allocsize){ + if(data->totlayer)data->pool = BLI_mempool_create(data->totsize, allocsize, allocsize); +} + void CustomData_bmesh_free_block(CustomData *data, void **block) { const LayerTypeInfo *typeInfo; @@ -1484,7 +1592,7 @@ static void CustomData_bmesh_alloc_block(CustomData *data, void **block) CustomData_bmesh_free_block(data, block); if (data->totsize > 0) - *block = BLI_mempool_alloc(data->pool); + *block = BLI_mempool_calloc(data->pool); else *block = NULL; } @@ -1601,7 +1709,6 @@ void CustomData_bmesh_interp(CustomData *data, void **src_blocks, float *weights for(i = 0; i < data->totlayer; ++i) { CustomDataLayer *layer = &data->layers[i]; const LayerTypeInfo *typeInfo = layerType_getInfo(layer->type); - if(typeInfo->interp) { for(j = 0; j < count; ++j) sources[j] = (char *)src_blocks[j] + layer->offset; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 7c50b409693..c3dddf06e7c 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -224,48 +224,50 @@ void flag_all_listbases_ids(short flag, short value) /* note: MAX_LIBARRAY define should match this code */ int set_listbasepointers(Main *main, ListBase **lb) { + int a = 0; + /* BACKWARDS! also watch order of free-ing! (mesh<->mat) */ - lb[0]= &(main->ipo); - lb[1]= &(main->key); - lb[2]= &(main->image); - lb[3]= &(main->tex); - lb[4]= &(main->mat); - lb[5]= &(main->vfont); + lb[a++]= &(main->ipo); + lb[a++]= &(main->key); + lb[a++]= &(main->nodetree); + lb[a++]= &(main->image); + lb[a++]= &(main->tex); + lb[a++]= &(main->mat); + lb[a++]= &(main->vfont); /* Important!: When adding a new object type, * the specific data should be inserted here */ - lb[6]= &(main->armature); - lb[7]= &(main->action); + lb[a++]= &(main->armature); + lb[a++]= &(main->action); - lb[8]= &(main->mesh); - lb[9]= &(main->curve); - lb[10]= &(main->mball); + lb[a++]= &(main->mesh); + lb[a++]= &(main->curve); + lb[a++]= &(main->mball); - lb[11]= &(main->wave); - lb[12]= &(main->latt); - lb[13]= &(main->lamp); - lb[14]= &(main->camera); + lb[a++]= &(main->wave); + lb[a++]= &(main->latt); + lb[a++]= &(main->lamp); + lb[a++]= &(main->camera); - lb[15]= &(main->text); - lb[16]= &(main->sound); - lb[17]= &(main->group); - lb[18]= &(main->nodetree); - lb[19]= &(main->brush); - lb[20]= &(main->script); - lb[21]= &(main->particle); + lb[a++]= &(main->text); + lb[a++]= &(main->sound); + lb[a++]= &(main->group); + lb[a++]= &(main->brush); + lb[a++]= &(main->script); + lb[a++]= &(main->particle); - lb[22]= &(main->world); - lb[23]= &(main->screen); - lb[24]= &(main->object); - lb[25]= &(main->scene); - lb[26]= &(main->library); + lb[a++]= &(main->world); + lb[a++]= &(main->screen); + lb[a++]= &(main->object); + lb[a++]= &(main->scene); + lb[a++]= &(main->library); - lb[27]= NULL; + lb[a]= NULL; - return 27; + return a; } /* *********** ALLOC AND FREE ***************** diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index a0841bb9f03..f13f8ef0298 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -4920,7 +4920,7 @@ static void waveModifier_deformVertsEM( if(!wmd->texture && !wmd->defgrp_name[0] && !(wmd->flag & MOD_WAVE_NORM)) dm = derivedData; - else if(derivedData) dm = derivedData; + else if(derivedData) dm = CDDM_copy(derivedData); else dm = CDDM_from_editmesh(editData, ob->data); if(wmd->flag & MOD_WAVE_NORM) { diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 18fca5439ef..24a3d348ae7 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1371,7 +1371,7 @@ void psys_particle_on_shape(int distr, int index, float *fuv, float *vec, float /************************************************/ void psys_particle_on_emitter(Object *ob, ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor){ if(psmd){ - if(psmd->psys->part->distr==PART_DISTR_GRID){ + if(psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT){ if(vec){ VECCOPY(vec,fuv); } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 458171cc232..f70648965f4 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -168,7 +168,7 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart) int i, totpart, totsaved = 0; if(new_totpart<0) { - if(psys->part->distr==PART_DISTR_GRID) { + if(psys->part->distr==PART_DISTR_GRID && psys->part->from != PART_FROM_VERT) { totpart= psys->part->grid_res; totpart*=totpart*totpart; } @@ -1056,7 +1056,7 @@ int psys_threads_init_distribution(ParticleThread *threads, DerivedMesh *finaldm dm= CDDM_from_mesh((Mesh*)ob->data, ob); /* special handling of grid distribution */ - if(part->distr==PART_DISTR_GRID){ + if(part->distr==PART_DISTR_GRID && from != PART_FROM_VERT){ distribute_particles_in_grid(dm,psys); dm->release(dm); return 0; @@ -1600,7 +1600,7 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps NormalQuat(pa->r_rot); - if(part->distr!=PART_DISTR_GRID){ + if(part->distr!=PART_DISTR_GRID && part->from != PART_FROM_VERT){ /* any unique random number will do (r_ave[0]) */ if(ptex.exist < 0.5*(1.0+pa->r_ave[0])) pa->flag |= PARS_UNEXIST; @@ -4515,7 +4515,7 @@ void psys_changed_type(ParticleSystem *psys) if(part->from == PART_FROM_PARTICLE) { if(part->type != PART_REACTOR) part->from = PART_FROM_FACE; - if(part->distr == PART_DISTR_GRID) + if(part->distr == PART_DISTR_GRID && part->from != PART_FROM_VERT) part->distr = PART_DISTR_JIT; } @@ -4710,7 +4710,7 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier oldtotpart = psys->totpart; oldtotchild = psys->totchild; - if(part->distr == PART_DISTR_GRID) + if(part->distr == PART_DISTR_GRID && part->from != PART_FROM_VERT) totpart = part->grid_res*part->grid_res*part->grid_res; else totpart = psys->part->totpart; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 57ecffbb796..43805959e62 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -459,9 +459,10 @@ int BKE_ptcache_object_reset(Object *ob, int mode) PTCacheID pid; ParticleSystem *psys; ModifierData *md; - int reset; + int reset, skip; reset= 0; + skip= 0; if(ob->soft) { BKE_ptcache_id_from_softbody(&pid, ob, ob->soft); @@ -469,11 +470,18 @@ int BKE_ptcache_object_reset(Object *ob, int mode) } for(psys=ob->particlesystem.first; psys; psys=psys->next) { - BKE_ptcache_id_from_particles(&pid, ob, psys); - reset |= BKE_ptcache_id_reset(&pid, mode); - + /* Baked softbody hair has to be checked first, because we don't want to reset */ + /* particles or softbody in that case -jahka */ if(psys->soft) { BKE_ptcache_id_from_softbody(&pid, ob, psys->soft); + if(mode == PSYS_RESET_ALL || !(psys->part->type == PART_HAIR && (pid.cache->flag & PTCACHE_BAKED))) + reset |= BKE_ptcache_id_reset(&pid, mode); + else + skip = 1; + } + + if(skip == 0) { + BKE_ptcache_id_from_particles(&pid, ob, psys); reset |= BKE_ptcache_id_reset(&pid, mode); } } diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index a706e5f3874..8b31459dd38 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -36,7 +36,9 @@ typedef struct BLI_mempool BLI_mempool; BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk); void *BLI_mempool_alloc(BLI_mempool *pool); +void *BLI_mempool_calloc(BLI_mempool *pool); void BLI_mempool_free(BLI_mempool *pool, void *addr); void BLI_mempool_destroy(BLI_mempool *pool); -#endif \ No newline at end of file + +#endif diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index a85883f6572..a97b9ca6672 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -523,6 +523,7 @@ static void bvh_div_nodes(BVHTree *tree, BVHNode *node, int start, int end, char return; } +#if 0 static void verify_tree(BVHTree *tree) { int i, j, check = 0; @@ -569,6 +570,7 @@ static void verify_tree(BVHTree *tree) printf("branches: %d, leafs: %d, total: %d\n", tree->totbranch, tree->totleaf, tree->totbranch + tree->totleaf); } +#endif void BLI_bvhtree_balance(BVHTree *tree) { diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 7bbf0c4732e..7ac7b8b1791 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -89,7 +89,6 @@ BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk) curnode->next = NULL; return pool; } - void *BLI_mempool_alloc(BLI_mempool *pool){ void *retval=NULL; BLI_freenode *curnode=NULL; @@ -117,6 +116,16 @@ void *BLI_mempool_alloc(BLI_mempool *pool){ //memset(retval, 0, pool->esize); return retval; } + +void *BLI_mempool_calloc(BLI_mempool *pool){ + void *retval=NULL; + retval = BLI_mempool_alloc(pool); + memset(retval, 0, pool->esize); + return retval; +} + + + void BLI_mempool_free(BLI_mempool *pool, void *addr){ //doesnt protect against double frees, dont be stupid! BLI_freenode *newhead = addr; newhead->next = pool->free; @@ -128,4 +137,4 @@ void BLI_mempool_destroy(BLI_mempool *pool) for(mpchunk = pool->chunks.first; mpchunk; mpchunk = mpchunk->next) MEM_freeN(mpchunk->data); BLI_freelistN(&(pool->chunks)); MEM_freeN(pool); -} \ No newline at end of file +} diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index ca7a376d3a2..fbcc56ac21d 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -382,6 +382,7 @@ void BLI_adddirstrings() pwuser = getpwuid(files[num].s.st_uid); if ( pwuser ) { strcpy(files[num].owner, pwuser->pw_name); + free(pwuser); } else { sprintf(files[num].owner, "%d", files[num].s.st_uid); } diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 5a85fbfc375..48ebf770e1b 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -1722,6 +1722,7 @@ void BLI_where_am_i(char *fullname, const char *name) path = br_find_exe( NULL ); if (path) { strcpy(fullname, path); + free(path); return; } #endif diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index b59908fef39..fe352610a40 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -842,7 +842,7 @@ typedef struct RGBA } RGBA; -#if 0 +/* debug only */ static void exr_print_filecontents(InputFile *file) { const ChannelList &channels = file->header().channels(); @@ -853,7 +853,27 @@ static void exr_print_filecontents(InputFile *file) printf("OpenEXR-load: Found channel %s of type %d\n", i.name(), channel.type); } } -#endif + +/* for non-multilayer, map R G B A channel names to something that's in this file */ +static const char *exr_rgba_channelname(InputFile *file, const char *chan) +{ + const ChannelList &channels = file->header().channels(); + + for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); ++i) + { + const Channel &channel = i.channel(); + const char *str= i.name(); + int len= strlen(str); + if(len) { + if(BLI_strcasecmp(chan, str+len-1)==0) { + return str; + } + } + } + return chan; +} + + static int exr_has_zbuffer(InputFile *file) { @@ -896,7 +916,8 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags) //printf("OpenEXR-load: image data window %d %d %d %d\n", // dw.min.x, dw.min.y, dw.max.x, dw.max.y); - // exr_print_filecontents(file); + if(0) // debug + exr_print_filecontents(file); is_multi= exr_is_renderresult(file); @@ -935,11 +956,15 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags) /* but, since we read y-flipped (negative y stride) we move to last scanline */ first+= 4*(height-1)*width; - frameBuffer.insert ("R", Slice (FLOAT, (char *) first, xstride, ystride)); - frameBuffer.insert ("G", Slice (FLOAT, (char *) (first+1), xstride, ystride)); - frameBuffer.insert ("B", Slice (FLOAT, (char *) (first+2), xstride, ystride)); - /* 1.0 is fill value */ - frameBuffer.insert ("A", Slice (FLOAT, (char *) (first+3), xstride, ystride, 1, 1, 1.0f)); + frameBuffer.insert ( exr_rgba_channelname(file, "R"), + Slice (FLOAT, (char *) first, xstride, ystride)); + frameBuffer.insert ( exr_rgba_channelname(file, "G"), + Slice (FLOAT, (char *) (first+1), xstride, ystride)); + frameBuffer.insert ( exr_rgba_channelname(file, "B"), + Slice (FLOAT, (char *) (first+2), xstride, ystride)); + + frameBuffer.insert ( exr_rgba_channelname(file, "A"), + Slice (FLOAT, (char *) (first+3), xstride, ystride, 1, 1, 1.0f)); /* 1.0 is fill value */ if(exr_has_zbuffer(file)) { diff --git a/source/blender/include/BDR_drawobject.h b/source/blender/include/BDR_drawobject.h index 3f9a6e438cc..de28db64c3b 100644 --- a/source/blender/include/BDR_drawobject.h +++ b/source/blender/include/BDR_drawobject.h @@ -63,6 +63,7 @@ void get_local_bounds(struct Object *ob, float *center, float *size); /* drawing flags: */ #define DRAW_PICKING 1 #define DRAW_CONSTCOLOR 2 +#define DRAW_SCENESET 4 void draw_object(struct Base *base, int flag); void drawaxes(float size, int flag, char drawtype); diff --git a/source/blender/include/BIF_editarmature.h b/source/blender/include/BIF_editarmature.h index 0e1557ac378..24112c7f11a 100644 --- a/source/blender/include/BIF_editarmature.h +++ b/source/blender/include/BIF_editarmature.h @@ -80,7 +80,7 @@ void clear_armature(struct Object *ob, char mode); void delete_armature(void); void deselectall_armature(int toggle, int doundo); void deselectall_posearmature (struct Object *ob, int test, int doundo); -int draw_armature(struct Base *base, int dt); +int draw_armature(struct Base *base, int dt, int flag); void extrude_armature(int forked); void subdivide_armature(int numcuts); diff --git a/source/blender/include/BSE_sequence.h b/source/blender/include/BSE_sequence.h index 15a9218b735..0d96de7be60 100644 --- a/source/blender/include/BSE_sequence.h +++ b/source/blender/include/BSE_sequence.h @@ -92,6 +92,8 @@ void update_changed_seq_and_deps(struct Sequence *seq, int len_change, int ibuf_ struct RenderResult; void do_render_seq(struct RenderResult *rr, int cfra); +int seq_can_blend(struct Sequence *seq); + #define SEQ_HAS_PATH(seq) (seq->type==SEQ_MOVIE || seq->type==SEQ_HD_SOUND || seq->type==SEQ_RAM_SOUND || seq->type==SEQ_IMAGE) #endif diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 3cf80a4efa6..a467722e8e1 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -51,8 +51,9 @@ typedef struct bActionActuator { int sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ char frameProp[32]; /* Set this property to the actions current frame */ - int blendin; /* Number of frames of blending */ - short priority; /* Execution priority */ + short blendin; /* Number of frames of blending */ + short priority; /* Execution priority */ + short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ float stridelength; /* Displacement incurred by cycle */ } bActionActuator; @@ -339,8 +340,9 @@ typedef struct FreeCamera { /* ipoactuator->flag */ #define ACT_IPOFORCE (1 << 0) #define ACT_IPOEND (1 << 1) -#define ACT_IPOFORCE_LOCAL (1 << 2) -#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOLOCAL (1 << 2) +#define ACT_IPOCHILD (1 << 4) +#define ACT_IPOADD (1 << 5) /* ipoactuator->flag for k2k */ #define ACT_K2K_PREV 1 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index af60f9ca713..bc30a12ff27 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -232,8 +232,9 @@ typedef struct SpaceImage { short imanr; short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ int flag; + short selectmode; short imtypenr, lock; - short pin, pad2; + short pin; float zoom; char dt_uv; /* UV draw type */ char sticky; /* sticky selection type */ @@ -496,6 +497,12 @@ typedef struct SpaceImaSel { #define SI_STICKY_DISABLE 1 #define SI_STICKY_VERTEX 2 +/* SpaceImage->selectmode */ +#define SI_SELECT_VERTEX 0 +#define SI_SELECT_EDGE 1 /* not implemented */ +#define SI_SELECT_FACE 2 +#define SI_SELECT_ISLAND 3 + /* SpaceImage->flag */ #define SI_BE_SQUARE 1<<0 #define SI_EDITTILE 1<<1 @@ -503,7 +510,7 @@ typedef struct SpaceImaSel { #define SI_DRAWTOOL 1<<3 #define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */ #define SI_DRAWSHADOW 1<<5 -#define SI_SELACTFACE 1<<6 +#define SI_SELACTFACE 1<<6 /* deprecated */ #define SI_DEPRECATED2 1<<7 #define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */ #define SI_COORDFLOATS 1<<9 diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c index ff9e2b716ce..e77de3726cb 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c @@ -47,7 +47,7 @@ static void do_gamma(bNode *node, float *out, float *in, float *fac) int i=0; for(i=0; i<3; i++) { /* check for negative to avoid nan's */ - out[i] = (in[0] > 0.0f)? pow(in[i],fac[0]): in[0]; + out[i] = (in[i] > 0.0f)? pow(in[i],fac[0]): in[i]; } out[3] = in[3]; } diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c index 56821980cd2..0d3ad3fcb44 100644 --- a/source/blender/python/api2_2x/sceneSequence.c +++ b/source/blender/python/api2_2x/sceneSequence.c @@ -81,6 +81,7 @@ returns None if notfound.\nIf 'name' is not specified, it returns a list of all static PyObject *Sequence_copy( BPy_Sequence * self ); static PyObject *Sequence_new( BPy_Sequence * self, PyObject * args ); static PyObject *Sequence_remove( BPy_Sequence * self, PyObject * args ); +static PyObject *Sequence_rebuildProxy( BPy_Sequence * self ); static PyObject *SceneSeq_new( BPy_SceneSeq * self, PyObject * args ); static PyObject *SceneSeq_remove( BPy_SceneSeq * self, PyObject * args ); @@ -96,6 +97,8 @@ static PyMethodDef BPy_Sequence_methods[] = { "() - Return a copy of the sequence containing the same objects."}, {"copy", ( PyCFunction ) Sequence_copy, METH_NOARGS, "() - Return a copy of the sequence containing the same objects."}, + {"rebuildProxy", ( PyCFunction ) Sequence_rebuildProxy, METH_VARARGS, + "() - Rebuild the active strip's Proxy."}, {NULL, NULL, 0, NULL} }; @@ -309,6 +312,7 @@ static PyObject *Sequence_copy( BPy_Sequence * self ) Py_RETURN_NONE; } + /*****************************************************************************/ /* PythonTypeObject callback function prototypes */ /*****************************************************************************/ @@ -383,8 +387,6 @@ static PyObject *SceneSeq_nextIter( BPy_Sequence * self ) } - - static PyObject *Sequence_getName( BPy_Sequence * self ) { return PyString_FromString( self->seq->name+2 ); @@ -403,11 +405,13 @@ static int Sequence_setName( BPy_Sequence * self, PyObject * value ) return 0; } + static PyObject *Sequence_getProxyDir( BPy_Sequence * self ) { return PyString_FromString( self->seq->strip->proxy ? self->seq->strip->proxy->dir : "" ); } + static int Sequence_setProxyDir( BPy_Sequence * self, PyObject * value ) { char *name = NULL; @@ -430,6 +434,14 @@ static int Sequence_setProxyDir( BPy_Sequence * self, PyObject * value ) } +static PyObject *Sequence_rebuildProxy( BPy_Sequence * self ) +{ + if (self->seq->strip->proxy) + seq_proxy_rebuild(self->seq); + Py_RETURN_NONE; +} + + static PyObject *Sequence_getSound( BPy_Sequence * self ) { if (self->seq->type == SEQ_RAM_SOUND && self->seq->sound) @@ -622,6 +634,54 @@ static int Sequence_setImages( BPy_Sequence * self, PyObject *value ) return 0; } +static PyObject *M_Sequence_BlendModesDict( void ) +{ + PyObject *M = PyConstant_New( ); + + if( M ) { + BPy_constant *d = ( BPy_constant * ) M; + PyConstant_Insert( d, "CROSS", PyInt_FromLong( SEQ_CROSS ) ); + PyConstant_Insert( d, "ADD", PyInt_FromLong( SEQ_ADD ) ); + PyConstant_Insert( d, "SUBTRACT", PyInt_FromLong( SEQ_SUB ) ); + PyConstant_Insert( d, "ALPHAOVER", PyInt_FromLong( SEQ_ALPHAOVER ) ); + PyConstant_Insert( d, "ALPHAUNDER", PyInt_FromLong( SEQ_ALPHAUNDER ) ); + PyConstant_Insert( d, "GAMMACROSS", PyInt_FromLong( SEQ_GAMCROSS ) ); + PyConstant_Insert( d, "MULTIPLY", PyInt_FromLong( SEQ_MUL ) ); + PyConstant_Insert( d, "OVERDROP", PyInt_FromLong( SEQ_OVERDROP ) ); + PyConstant_Insert( d, "PLUGIN", PyInt_FromLong( SEQ_PLUGIN ) ); + PyConstant_Insert( d, "WIPE", PyInt_FromLong( SEQ_WIPE ) ); + PyConstant_Insert( d, "GLOW", PyInt_FromLong( SEQ_GLOW ) ); + PyConstant_Insert( d, "TRANSFORM", PyInt_FromLong( SEQ_TRANSFORM ) ); + PyConstant_Insert( d, "COLOR", PyInt_FromLong( SEQ_COLOR ) ); + PyConstant_Insert( d, "SPEED", PyInt_FromLong( SEQ_SPEED ) ); + } + return M; +} + +static PyObject *Sequence_getBlendMode( BPy_Sequence * self ) +{ + return PyInt_FromLong( self->seq->blend_mode ); +} + +static int Sequence_setBlendMode( BPy_Sequence * self, PyObject * value ) +{ + struct Sequence *seq= self->seq; + int number = PyInt_AsLong( value ); + + if( number==-1 && PyErr_Occurred() ) + return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); + + if ( !seq_can_blend(seq) ) + return EXPP_ReturnIntError( PyExc_AttributeError, "this sequence type dosnt support blending" ); + + if (numberSEQ_EFFECT_MAX) + return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); + + seq->blend_mode=number; + + return 0; +} + /* * get floating point attributes */ @@ -836,7 +896,11 @@ static PyGetSetDef BPy_Sequence_getseters[] = { (getter)Sequence_getImages, (setter)Sequence_setImages, "Sequence scene", NULL}, - + {"blendMode", + (getter)Sequence_getBlendMode, (setter)Sequence_setBlendMode, + "Sequence Blend Mode", + NULL}, + {"type", (getter)getIntAttr, (setter)NULL, "", @@ -1131,6 +1195,7 @@ PyObject *M_Sequence_Get( PyObject * self, PyObject * args ) /*****************************************************************************/ PyObject *Sequence_Init( void ) { + PyObject *BlendModesDict = M_Sequence_BlendModesDict( ); PyObject *submodule; if( PyType_Ready( &Sequence_Type ) < 0 ) return NULL; @@ -1142,6 +1207,9 @@ PyObject *Sequence_Init( void ) "The Blender Sequence module\n\n\ This module provides access to **Sequence Data** in Blender.\n" ); + if( BlendModesDict ) + PyModule_AddObject( submodule, "BlendModes", BlendModesDict ); + /*Add SUBMODULES to the module*/ /*PyDict_SetItemString(dict, "Constraint", Constraint_Init()); //creates a *new* module*/ return submodule; diff --git a/source/blender/radiosity/intern/source/radrender.c b/source/blender/radiosity/intern/source/radrender.c index e5ef1e9a4a2..68b5fa81f43 100644 --- a/source/blender/radiosity/intern/source/radrender.c +++ b/source/blender/radiosity/intern/source/radrender.c @@ -369,9 +369,18 @@ printf(" Rad elems: %d emittors %d\n", RG.totelem, RG.totpatch); if(vlr->mat->mode & MA_RADIO) { /* during render, vlr->n gets flipped/corrected, we cannot have that */ - if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co, rf->norm); - else CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, rf->norm); - + if (obr->ob->transflag & OB_NEG_SCALE){ + /* The object has negative scale that will cause the normals to flip. + To counter this unwanted normal flip, swap vertex 2 and 4 for a quad + or vertex 2 and 3 (see flip_face) for a triangle in the call to CalcNormFloat4 + in order to flip the normals back to the way they were in the original mesh. */ + if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v4->co, vlr->v3->co, vlr->v2->co, rf->norm); + else CalcNormFloat(vlr->v1->co, vlr->v3->co, vlr->v2->co, rf->norm); + }else{ + if(vlr->v4) CalcNormFloat4(vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4->co, rf->norm); + else CalcNormFloat(vlr->v1->co, vlr->v2->co, vlr->v3->co, rf->norm); + } + rf->totrad[0]= vlr->mat->emit*vlr->mat->r; rf->totrad[1]= vlr->mat->emit*vlr->mat->g; rf->totrad[2]= vlr->mat->emit*vlr->mat->b; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index f9ec0e9d843..faa7a68f754 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -204,6 +204,7 @@ void RE_make_stars(Render *re, void (*initfunc)(void), else stargrid *= 1.0; /* then it draws fewer */ if(re) MTC_Mat4Invert(mat, re->viewmat); + else MTC_Mat4One(mat); /* BOUNDING BOX CALCULATION * bbox goes from z = loc_near_var | loc_far_var, diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 1a9e1030688..cc4df06e22d 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1560,7 +1560,6 @@ static void set_col_actuator(int item, int medium) static void change_object_actuator(void *act, void *arg) { bObjectActuator *oa = act; - int i; if (oa->type != oa->otype) { switch (oa->type) { @@ -1582,6 +1581,18 @@ static void change_object_actuator(void *act, void *arg) } } +static void change_ipo_actuator(void *arg1_but, void *arg2_ia) +{ + bIpoActuator *ia = arg2_ia; + uiBut *but = arg1_but; + + if (but->retval & ACT_IPOFORCE) + ia->flag &= ~ACT_IPOADD; + else if (but->retval & ACT_IPOADD) + ia->flag &= ~ACT_IPOFORCE; + but->retval = B_REDR; +} + void update_object_actuator_PID(void *act, void *arg) { bObjectActuator *oa = act; @@ -1679,7 +1690,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-148, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, ""); uiDefBut(block, LABEL, 0, "damp", xco, yco-171, 45, 19, NULL, 0, 0, 0, 0, "Number of frames to reach the target velocity"); - uiDefButI(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); + uiDefButS(block, NUM, 0, "", xco+45, yco-171, wval, 19, &oa->damping, 0.0, 1000.0, 100, 0, ""); uiDefButBitS(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-45, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); uiDefButBitS(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation"); @@ -1758,23 +1769,27 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh #else str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6"; #endif - uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, (width-60)/2, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); - uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+30 + ((width-60)/2), yco-24, (width-60)/2, 19, &aa->act, "Action name"); + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, width/3, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type"); + uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, "AC: ", xco+10+ (width/3), yco-24, ((width/3)*2) - (20 + 60), 19, &aa->act, "Action name"); + + uiDefButBitS(block, TOGN, 1, 0, "Continue", xco+((width/3)*2)+20, yco-24, 60, 19, + &aa->end_reset, 0.0, 0.0, 0, 0, "Restore last frame when switching on/off, otherwise play from the start each time"); + if(aa->type == ACT_ACTION_FROM_PROP) { - uiDefBut(block, TEX, 0, "Prop: ",xco+30, yco-44, width-60, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); + uiDefBut(block, TEX, 0, "Prop: ",xco+10, yco-44, width-20, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define the Action position"); } else { - uiDefButI(block, NUM, 0, "Sta: ",xco+30, yco-44, (width-60)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); - uiDefButI(block, NUM, 0, "End: ",xco+30+(width-60)/2, yco-44, (width-60)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); + uiDefButI(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame"); + uiDefButI(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 0, "End frame"); } - uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, (width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of motion blending"); - uiDefButS(block, NUM, 0, "Priority: ", xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); + uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending"); + uiDefButS(block, NUM, 0, "Priority: ", xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 0.0, "Execution priority - lower numbers will override actions with higher numbers, With 2 or more actions at once, the overriding channels must be lower in the stack"); - uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); + uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, width-20, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this actions current frame number"); #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR @@ -1800,42 +1815,49 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6"; - uiDefButS(block, MENU, B_REDR, str, xco+20, yco-24, width-40 - (width-40)/3, 19, &ia->type, 0, 0, 0, 0, ""); - uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR, - "Child", xco+20+0.666*(width-40), yco-24, (width-40)/3, 19, + uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, (width-20)/2, 19, &ia->type, 0, 0, 0, 0, ""); + + but = uiDefButBitS(block, TOG, ACT_IPOFORCE, ACT_IPOFORCE, + "Force", xco+10+(width-20)/2, yco-24, (width-20)/4-10, 19, &ia->flag, 0, 0, 0, 0, - "Add all children Objects as well"); + "Convert Ipo to force. Force is applied in global or local coordinate according to Local flag"); + uiButSetFunc(but, change_ipo_actuator, but, ia); + + but = uiDefButBitS(block, TOG, ACT_IPOADD, ACT_IPOADD, + "Add", xco+3*(width-20)/4, yco-24, (width-20)/4-10, 19, + &ia->flag, 0, 0, 0, 0, + "Ipo is added to the current loc/rot/scale in global or local coordinate according to Local flag"); + uiButSetFunc(but, change_ipo_actuator, but, ia); + + /* Only show the do-force-local toggle if force is requested */ + if (ia->flag & (ACT_IPOFORCE|ACT_IPOADD)) { + uiDefButBitS(block, TOG, ACT_IPOLOCAL, 0, + "L", xco+width-30, yco-24, 20, 19, + &ia->flag, 0, 0, 0, 0, + "Let the ipo acts in local coordinates, used in Force and Add mode."); + } if(ia->type==ACT_IPO_FROM_PROP) { uiDefBut(block, TEX, 0, - "Prop: ", xco+20, yco-44, width-40, 19, + "Prop: ", xco+10, yco-44, width-80, 19, ia->name, 0.0, 31.0, 0, 0, "Use this property to define the Ipo position"); } else { uiDefButI(block, NUM, 0, - "Sta", xco+20, yco-44, (width-100)/2, 19, + "Sta", xco+10, yco-44, (width-80)/2, 19, &ia->sta, 0.0, MAXFRAMEF, 0, 0, - "Start frame"); + "Start frame, (subtract 1 to match blenders frame numbers)"); uiDefButI(block, NUM, 0, - "End", xco+18+(width-90)/2, yco-44, (width-100)/2, 19, + "End", xco+10+(width-80)/2, yco-44, (width-80)/2, 19, &ia->end, 0.0, MAXFRAMEF, 0, 0, - "End frame"); - - uiDefButBitS(block, TOG, ACT_IPOFORCE, B_REDR, - "Force", xco+width-78, yco-44, 43, 19, - &ia->flag, 0, 0, 0, 0, - "Convert Ipo to force"); - - /* Only show the do-force-local toggle if force is requested */ - if (ia->flag & ACT_IPOFORCE) { - uiDefButBitS(block, TOG, ACT_IPOFORCE_LOCAL, 0, - "L", xco+width-35, yco-44, 15, 19, - &ia->flag, 0, 0, 0, 0, - "Let the force-ipo act in local coordinates."); - } - + "End frame, (subtract 1 to match blenders frame numbers)"); } + uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR, + "Child", xco+10+(width-80), yco-44, 60, 19, + &ia->flag, 0, 0, 0, 0, + "Update IPO on all children Objects as well"); + yco-= ysize; break; } @@ -1967,7 +1989,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh glRects(xco, yco-ysize, xco+width, yco); uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); - uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Add this Object (cant be on an visible layer)"); + uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Add this Object and all its children (cant be on an visible layer)"); uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the new Object lives"); wval= (width-60)/3; @@ -2248,7 +2270,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-44, width-40, 19, ga->name, 0.0, 31.0, 0, 0, "Use this property to define the Group position"); } else { - uiDefButI(block, NUM, 0, "Sta", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame"); + uiDefButI(block, NUM, 0, "State", xco+20, yco-44, (width-40)/2, 19, &ga->sta, 0.0, 2500.0, 0, 0, "Start frame"); uiDefButI(block, NUM, 0, "End", xco+20+(width-40)/2, yco-44, (width-40)/2, 19, &ga->end, 0.0, 2500.0, 0, 0, "End frame"); } yco-= ysize; @@ -3171,7 +3193,7 @@ void logic_buts(void) uiButSetFunc(but, check_object_state, but, &(ob->state)); } for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset+15)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } } @@ -3255,7 +3277,7 @@ void logic_buts(void) uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+80, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects"); uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+80+(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+80+2*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); - uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "Sta", xco+80+3*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states"); + uiDefButBitS(block, TOG, BUTS_SENS_STATE, B_REDR, "State", xco+80+3*(width-70)/4, yco+35, (width-70)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only sensors connected to active states"); uiBlockEndAlign(block); for(a=0; ascaflag, 0, 0, 0, 0, "Show all selected Objects"); uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object"); uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller"); - uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "Sta", xco+110+3*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states"); + uiDefButBitS(block, TOG, BUTS_ACT_STATE, B_REDR, "State", xco+110+3*(width-100)/4, yco+35, (width-100)/4, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show only actuators connected to active states"); uiBlockEndAlign(block); for(a=0; adistr==PART_DISTR_GRID) + if(part->distr==PART_DISTR_GRID && part->from != PART_FROM_VERT) uiDefButI(block, NUM, B_PART_ALLOC, "Resol:", butx,(buty-=buth),butw,buth, &part->grid_res, 1.0, 100.0, 0, 0, "The resolution of the particle grid"); else uiDefButI(block, NUM, B_PART_ALLOC, "Amount:", butx,(buty-=buth),butw,buth, &part->totpart, 0.0, 100000.0, 0, 0, "The total number of particles"); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index f136599519c..a58d44538a2 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -499,7 +499,7 @@ static char* seq_panel_blend_modes() so that would collide also. */ - if (!(last_seq->type & SEQ_EFFECT)) { + if ( seq_can_blend(last_seq) ) { int i; for (i = SEQ_EFFECT; i <= SEQ_EFFECT_MAX; i++) { diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index ca6705b2084..1b580381ca5 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2900,15 +2900,15 @@ static void lamp_panel_lamp(Object *ob, Lamp *la) uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButS(block, MENU, B_LAMPREDRAW, "Falloff %t|Constant %x0|Inverse Linear %x1|Inverse Square %x2|Custom Curve %x3|Lin/Quad Weighted %x4|", 10,150,100,19, &la->falloff_type, 0,0,0,0, "Lamp falloff - intensity decay with distance"); - uiDefButBitS(block, TOG, LA_SPHERE, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value"); + uiDefButBitS(block, TOG, LA_SPHERE, B_LAMPPRV,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value"); } uiBlockBeginAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); uiDefButBitS(block, TOG, LA_LAYER, 0,"Layer", 10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same layer as the lamp only"); uiDefButBitS(block, TOG, LA_NEG, B_LAMPPRV,"Negative", 10,50,100,19,&la->mode, 0, 0, 0, 0, "Sets lamp to cast negative light"); - uiDefButBitS(block, TOG, LA_NO_DIFF, 0,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp"); - uiDefButBitS(block, TOG, LA_NO_SPEC, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp"); + uiDefButBitS(block, TOG, LA_NO_DIFF, B_LAMPPRV,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp"); + uiDefButBitS(block, TOG, LA_NO_SPEC, B_LAMPPRV,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp"); uiBlockEndAlign(block); uiBlockSetCol(block, TH_AUTO); diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index 73915a69139..6d78b21dfbb 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -2500,7 +2500,7 @@ static void draw_ghost_poses(Base *base) /* ********************************** Armature Drawing - Main ************************* */ /* called from drawobject.c, return 1 if nothing was drawn */ -int draw_armature(Base *base, int dt) +int draw_armature(Base *base, int dt, int flag) { Object *ob= base->object; bArmature *arm= ob->data; @@ -2544,15 +2544,16 @@ int draw_armature(Base *base, int dt) if (arm->ghostep) draw_ghost_poses(base); } + if ((flag & DRAW_SCENESET)==0) { + if(ob==OBACT) + arm->flag |= ARM_POSEMODE; + else if(G.f & G_WEIGHTPAINT) + arm->flag |= ARM_POSEMODE; - if(ob==OBACT) - arm->flag |= ARM_POSEMODE; - else if(G.f & G_WEIGHTPAINT) - arm->flag |= ARM_POSEMODE; - - draw_pose_paths(ob); + draw_pose_paths(ob); + } } - } + } draw_pose_channels(base, dt); arm->flag &= ~ARM_POSEMODE; diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index 547de85e856..14849cdd450 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -422,7 +422,7 @@ int draw_uvs_face_check(void) return 1; } } else { - if (G.sima->flag & SI_SELACTFACE) { + if (G.sima->selectmode == SI_SELECT_FACE) { return 1; } } diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 96ba8c71755..045bf292446 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -4620,7 +4620,7 @@ static void drawSolidSelect(Base *base) } else if(ob->type==OB_ARMATURE) { if(!(ob->flag & OB_POSEMODE)) { - draw_armature(base, OB_WIRE); + draw_armature(base, OB_WIRE, 0); } } @@ -4741,7 +4741,7 @@ void drawRBpivot(bRigidBodyJointConstraint *data){ setlinestyle(0); } -/* flag can be DRAW_PICKING and/or DRAW_CONSTCOLOR */ +/* flag can be DRAW_PICKING and/or DRAW_CONSTCOLOR, DRAW_SCENESET */ void draw_object(Base *base, int flag) { static int warning_recursive= 0; @@ -4943,7 +4943,7 @@ void draw_object(Base *base, int flag) /* draw outline for selected solid objects, mesh does itself */ if((G.vd->flag & V3D_SELECT_OUTLINE) && ob->type!=OB_MESH) { - if(dt>OB_WIRE && dtOB_WIRE && dtdtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(flag&DRAW_PICKING)) { drawSolidSelect(base); } @@ -5090,7 +5090,7 @@ void draw_object(Base *base, int flag) break; case OB_ARMATURE: if(dt>OB_WIRE) set_gl_material(0); // we use defmaterial - empty_object= draw_armature(base, dt); + empty_object= draw_armature(base, dt, flag); break; default: drawaxes(1.0, flag, OB_ARROWS); diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 2f1cdb8b951..f595a101f63 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3097,7 +3097,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata) if(v3d->lay & base->lay) { BIF_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(base, DRAW_CONSTCOLOR); + draw_object(base, DRAW_CONSTCOLOR|DRAW_SCENESET); if(base->object->transflag & OB_DUPLI) { draw_dupli_objects_color(v3d, base, TH_WIRE); @@ -3319,7 +3319,7 @@ void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4] where_is_object(base->object); BIF_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(base, DRAW_CONSTCOLOR); + draw_object(base, DRAW_CONSTCOLOR|DRAW_SCENESET); if(base->object->transflag & OB_DUPLI) { draw_dupli_objects(v3d, base); diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 39f93510358..6310dd0a262 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -1646,8 +1646,9 @@ void load_editArmature(void) } /* toggle==0: deselect - toggle==1: swap + toggle==1: swap (based on test) toggle==2: only active tag + toggle==3: swap (no test) */ void deselectall_armature(int toggle, int doundo) { @@ -1670,18 +1671,30 @@ void deselectall_armature(int toggle, int doundo) else sel= toggle; /* Set the flags */ - for (eBone=G.edbo.first;eBone;eBone=eBone->next){ - if (sel==1) { + for (eBone=G.edbo.first;eBone;eBone=eBone->next) { + if (sel==3) { + /* invert selection of bone */ + if ((arm->layer & eBone->layer) && (eBone->flag & BONE_HIDDEN_A)==0) { + eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + eBone->flag &= ~BONE_ACTIVE; + } + } + else if (sel==1) { + /* select bone */ if(arm->layer & eBone->layer && (eBone->flag & BONE_HIDDEN_A)==0) { eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); if(eBone->parent) eBone->parent->flag |= (BONE_TIPSEL); } } - else if (sel==2) + else if (sel==2) { + /* clear active flag */ eBone->flag &= ~(BONE_ACTIVE); - else + } + else { + /* deselect bone */ eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL | BONE_ACTIVE); + } } allqueue(REDRAWVIEW3D, 0); @@ -3276,8 +3289,9 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits) } /* test==0: deselect all - test==1: swap select - test==2: only clear active tag + test==1: swap select (apply to all the opposite of current situation) + test==2: only clear active tag + test==3: swap select (no test / inverse selection status of all independently) */ void deselectall_posearmature (Object *ob, int test, int doundo) { @@ -3307,16 +3321,27 @@ void deselectall_posearmature (Object *ob, int test, int doundo) /* Set the flags accordingly */ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { if ((pchan->bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) { - if (selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); - else if (selectmode==1) pchan->bone->flag |= BONE_SELECTED; - else pchan->bone->flag &= ~BONE_ACTIVE; + if (test==3) { + pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + pchan->bone->flag &= ~BONE_ACTIVE; + } + else { + if (selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); + else if (selectmode==1) pchan->bone->flag |= BONE_SELECTED; + else pchan->bone->flag &= ~BONE_ACTIVE; + } } } /* action editor */ - deselect_actionchannels(ob->action, 0); /* deselects for sure */ - if (selectmode == 1) - deselect_actionchannels(ob->action, 1); /* swaps */ + if (test == 3) { + deselect_actionchannels(ob->action, 2); /* inverts selection */ + } + else { + deselect_actionchannels(ob->action, 0); /* deselects for sure */ + if (selectmode == 1) + deselect_actionchannels(ob->action, 1); /* swaps */ + } allqueue(REDRAWBUTSEDIT, 0); allqueue(REDRAWBUTSOBJECT, 0); diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c index 952ae957f34..9516f39b05c 100644 --- a/source/blender/src/editmesh_add.c +++ b/source/blender/src/editmesh_add.c @@ -379,7 +379,7 @@ static EditFace *addface_from_edges(void) /* find the 4 edges */ for(eed= em->edges.first; eed; eed= eed->next) { - if(eed->f & SELECT) { + if( (eed->f & SELECT) || (eed->v1->f & eed->v2->f & SELECT) ) { if(eedar[0]==NULL) eedar[0]= eed; else if(eedar[1]==NULL) eedar[1]= eed; else if(eedar[2]==NULL) eedar[2]= eed; @@ -765,6 +765,7 @@ void addedgeface_mesh(void) /* if 4 edges exist, we just create the face, convex or not */ efa= addface_from_edges(); if(efa==NULL) { + /* the order of vertices can be anything, 6 cases to check */ if( convex(neweve[0]->co, neweve[1]->co, neweve[2]->co, neweve[3]->co) ) { efa= addfacelist(neweve[0], neweve[1], neweve[2], neweve[3], NULL, NULL); @@ -775,17 +776,16 @@ void addedgeface_mesh(void) else if( convex(neweve[0]->co, neweve[2]->co, neweve[1]->co, neweve[3]->co) ) { efa= addfacelist(neweve[0], neweve[2], neweve[1], neweve[3], NULL, NULL); } - - else if( convex(neweve[1]->co, neweve[2]->co, neweve[3]->co, neweve[0]->co) ) { - efa= addfacelist(neweve[1], neweve[2], neweve[3], neweve[0], NULL, NULL); + else if( convex(neweve[0]->co, neweve[1]->co, neweve[3]->co, neweve[2]->co) ) { + efa= addfacelist(neweve[0], neweve[1], neweve[3], neweve[2], NULL, NULL); } - else if( convex(neweve[1]->co, neweve[3]->co, neweve[0]->co, neweve[2]->co) ) { - efa= addfacelist(neweve[1], neweve[3], neweve[0], neweve[2], NULL, NULL); + else if( convex(neweve[0]->co, neweve[3]->co, neweve[2]->co, neweve[1]->co) ) { + efa= addfacelist(neweve[0], neweve[3], neweve[2], neweve[1], NULL, NULL); } - else if( convex(neweve[1]->co, neweve[3]->co, neweve[2]->co, neweve[0]->co) ) { - efa= addfacelist(neweve[1], neweve[3], neweve[2], neweve[0], NULL, NULL); + else if( convex(neweve[0]->co, neweve[3]->co, neweve[1]->co, neweve[2]->co) ) { + efa= addfacelist(neweve[0], neweve[3], neweve[1], neweve[2], NULL, NULL); } - else error("The selected vertices form a concave quad"); + else printf("cannot find nice quad from concave set of vertices\n"); } } } diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index d758f34949a..dbc0deecb2c 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -501,26 +501,47 @@ static void set_active_strip(Object *ob, bActionStrip *act) { bActionStrip *strip; + /* make sure all other strips are not active */ for (strip = ob->nlastrips.first; strip; strip=strip->next) strip->flag &= ~ACTSTRIP_ACTIVE; - if(act) { + /* act is new active strip */ + if (act) { + /* set active flag for this strip */ act->flag |= ACTSTRIP_ACTIVE; - - if(ob->action!=act->act) { - if(ob->action) ob->action->id.us--; - if(act->act->id.lib) { + + /* check if active action will still be the same one */ + if (ob->action != act->act) { + /* clear object's links with its current action (if present) */ + if (ob->action) { + ob->action->id.us--; + } + + /* only set object's action to active strip's action if possible */ + if (act->act->id.lib) { ob->action= NULL; } else { ob->action= act->act; id_us_plus(&ob->action->id); - } + } + + /* request redrawing in relevant spaces */ allqueue(REDRAWIPO, 0); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWACTION, 0); allqueue(REDRAWNLA, 0); - ob->ctime= -1234567.0f; // eveil! + + /* when only showing action (i.e. nla-override off), + * reset pose to restpose for armatures + */ + if ((ob->nlaflag & OB_NLA_OVERRIDE)==0) { + if (ob->type == OB_ARMATURE) + rest_pose(ob->pose); + } + + /* flush depsgraph */ + ob->ctime= -1234567.0f; // evil! DAG_object_flush_update(G.scene, ob, OB_RECALC_OB|OB_RECALC_DATA); } } diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 18a9803dcae..69070d61bf0 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -694,7 +694,7 @@ void mouse_select_sima(void) EditFace *efa; MTFace *tf, *nearesttf; EditFace *nearestefa=NULL; - int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift; + int a, selectsticky, edgeloop, actface, nearestuv, nearestedge, i, shift, island=0; char sticky= 0; int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */ unsigned int hitv[4], nearestv; @@ -706,7 +706,7 @@ void mouse_select_sima(void) edgeloop= G.qual & LR_ALTKEY; shift= G.qual & LR_SHIFTKEY; - + if (G.sima->flag & SI_SYNC_UVSEL) { /* copy from mesh */ if (G.scene->selectmode == SCE_SELECT_FACE) { @@ -718,7 +718,8 @@ void mouse_select_sima(void) } } else { /* normal operation */ - actface= G.sima->flag & SI_SELACTFACE; + actface= G.sima->selectmode == SI_SELECT_FACE; + island= G.sima->selectmode == SI_SELECT_ISLAND; switch(G.sima->sticky) { case SI_STICKY_LOC: @@ -760,6 +761,9 @@ void mouse_select_sima(void) if (nearestefa->v4) hitv[3]= nearestefa->v4->tmp.l; else hitv[3]= 0xFFFFFFFF; + } + else if (island) { + } else { find_nearest_uv(&nearesttf, &nearestefa, &nearestv, &nearestuv); @@ -774,7 +778,11 @@ void mouse_select_sima(void) } } - if(!edgeloop && shift) { + if (island) { + if(shift) select_linked_tface_uv(1); + else select_linked_tface_uv(0); + } + else if(!edgeloop && shift) { /* (de)select face */ if(actface) { if(simaFaceSel_Check(nearestefa, nearesttf)) { diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index 5a10ea65738..2c37a0eb20f 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -803,11 +803,11 @@ static void timeline_force_draw(short val) if(sa->spacetype==SPACE_VIEW3D) { if(sa==samin || (val & TIME_ALL_3D_WIN)) dodraw= 1; } - else if(ELEM6(sa->spacetype, SPACE_NLA, SPACE_IPO, SPACE_SEQ, SPACE_BUTS, SPACE_ACTION, SPACE_SOUND)) { + else if(ELEM5(sa->spacetype, SPACE_NLA, SPACE_IPO, SPACE_SEQ, SPACE_ACTION, SPACE_SOUND)) { if(val & TIME_ALL_ANIM_WIN) dodraw= 1; } else if(sa->spacetype==SPACE_BUTS) { - if(val & TIME_ALL_BUTS_WIN) dodraw= 1; + if(val & TIME_ALL_BUTS_WIN) dodraw= 2; } else if(sa->spacetype==SPACE_IMAGE) { if (val & TIME_ALL_IMAGE_WIN) dodraw = 1; diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c index 7ac57cb839b..fac9e3af1af 100644 --- a/source/blender/src/header_image.c +++ b/source/blender/src/header_image.c @@ -1214,28 +1214,31 @@ void image_buttons(void) uiBlockBeginAlign(block); /* B_SEL_VERT & B_SEL_FACE are not defined here which is a bit bad, BUT it works even if image editor is fullscreen */ - uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)"); - xco+= XIC; + uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, + xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode (Ctrl Tab 1)"); /* no edge */ /*uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode (Ctrl Tab 2)"); xco+= XIC; */ - uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)"); - xco+= XIC+8; + uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, + xco+=XIC,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode (Ctrl Tab 3)"); uiBlockEndAlign(block); } else { uiBlockBeginAlign(block); - uiDefIconButBitI(block, TOGN, SI_SELACTFACE, B_REDR, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.sima->flag, 1.0, 0.0, 0, 0, "UV Vertex select mode"); - xco+= XIC; - uiDefIconButBitI(block, TOG, SI_SELACTFACE, B_REDR, ICON_FACESEL, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "UV Face select mode"); - xco+= XIC+8; - uiBlockEndAlign(block); + uiDefIconButS(block, ROW, B_REDR, ICON_VERTEXSEL, + xco,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_VERTEX, 0, 0, "UV vertex select mode"); + uiDefIconButS(block, ROW, B_REDR, ICON_FACESEL, + xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_FACE, 0, 0, "UV Face select mode"); + uiDefIconButS(block, ROW, B_REDR, ICON_MESH, + xco+=XIC,0,XIC,YIC, &G.sima->selectmode, 0.0, SI_SELECT_ISLAND, 0, 0, "UV Island select mode"); + uiBlockEndAlign(block); + /* would use these if const's could go in strings * SI_STICKY_LOC SI_STICKY_DISABLE SI_STICKY_VERTEX */ ubut = uiDefIconTextButC(block, ICONTEXTROW, B_REDR, ICON_STICKY_UVS_LOC, "Sticky UV Selection: %t|Disable%x1|Shared Location%x0|Shared Vertex%x2", - xco,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0, + xco+=XIC+10,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0, "Sticky UV Selection (Hotkeys: Shift C, Alt C, Ctrl C)"); } diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 1ada2729289..0f3a46c8a8c 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -1313,6 +1313,9 @@ static void do_view3d_select_armaturemenu(void *arg, int event) case 3: /* Select Parent(s) */ select_bone_parent(); break; + case 4: /* Swap Select All */ + deselectall_armature(3, 1); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -1331,6 +1334,8 @@ static uiBlock *view3d_select_armaturemenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Swap Select All|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Parent(s)|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); if(curarea->headertype==HEADERTOP) { @@ -1356,12 +1361,15 @@ static void do_view3d_select_pose_armaturemenu(void *arg, int event) case 2: /* Select/Deselect all */ deselectall_posearmature(OBACT, 1, 1); break; - case 3: + case 3: /* Select Target(s) of Constraint(s) */ pose_select_constraint_target(); break; - case 4: + case 4: /* Select Bone's Parent */ select_bone_parent(); break; + case 5: /* Swap Select All */ + deselectall_posearmature(OBACT, 3, 1); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -1379,6 +1387,7 @@ static uiBlock *view3d_select_pose_armaturemenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Swap Select All|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Constraint Target|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Parent(s)|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); @@ -4106,7 +4115,7 @@ static uiBlock *view3d_pose_armature_ikmenu(void *arg_unused) block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armature_ikmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); uiBlockSetButmFunc(block, do_view3d_pose_armature_ikmenu, NULL); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add IK to Bone...|Ctrl I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add IK to Bone...|Shift I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear IK...|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); uiBlockSetDirection(block, UI_RIGHT); diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index 6851929bbc2..9426548dc38 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -2380,6 +2380,16 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown) return i; } +/* check used when we need to change seq->blend_mode but not to effect or audio strips */ +int seq_can_blend(Sequence *seq) +{ + if (ELEM4(seq->type, SEQ_IMAGE, SEQ_META, SEQ_SCENE, SEQ_MOVIE)) { + return 1; + } else { + return 0; + } +} + /* threading api */ static ListBase running_threads; diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 4422411b1c5..3b8bb4c3929 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2189,10 +2189,14 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) break; case IKEY: if(G.qual==LR_CTRLKEY) { - if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) - pose_add_IK(); - else if(ob && G.obedit) - selectswap_mesh(); + if((ob) && (ob->flag & OB_POSEMODE) && (ob->type==OB_ARMATURE)) + deselectall_posearmature(ob, 3, 1); + else if(ob && G.obedit) { + if(G.obedit->type == OB_ARMATURE) + deselectall_armature(3, 1); + else + selectswap_mesh(); + } else selectswap(); } @@ -2200,6 +2204,10 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) pose_clear_IK(); } + else if(G.qual==LR_SHIFTKEY) { + if(ob && (ob->flag & OB_POSEMODE) && ob->type==OB_ARMATURE) + pose_add_IK(); + } break; case JKEY: @@ -4432,7 +4440,10 @@ static void winqreadinfospace(ScrArea *sa, void *spacedata, BWinEvent *evt) switch(event) { case UI_BUT_EVENT: - if(val==REDRAWTIME) allqueue(REDRAWTIME, 0); + if(val==REDRAWTIME) { + allqueue(REDRAWTIME, 0); + addqueue(sa->win, REDRAW, 1); + } else if(val==B_ADD_THEME) { bTheme *btheme, *new; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index dcebf6b7557..10e49cdd218 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -3610,6 +3610,7 @@ void special_aftertrans_update(TransInfo *t) Base *base; short redrawipo=0, resetslowpar=1; int cancelled= (t->state == TRANS_CANCEL); + short duplicate= (t->undostr && strstr(t->undostr, "Duplicate")) ? 1 : 0; if (t->spacetype==SPACE_VIEW3D) { if (G.obedit) { @@ -3622,7 +3623,7 @@ void special_aftertrans_update(TransInfo *t) } } } - if (t->spacetype == SPACE_ACTION) { + else if (t->spacetype == SPACE_ACTION) { void *data; short datatype; @@ -3644,7 +3645,7 @@ void special_aftertrans_update(TransInfo *t) /* Do curve cleanups? */ if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_action_clean((bAction *)data); } @@ -3659,7 +3660,7 @@ void special_aftertrans_update(TransInfo *t) IpoCurve *icu; if ( (G.saction->flag & SACTION_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_ipo_clean(key->ipo); } @@ -3685,7 +3686,7 @@ void special_aftertrans_update(TransInfo *t) /* after transform, remove duplicate keyframes on a frame that resulted from transform */ if ( (G.snla->flag & SNLA_NOTRANSKEYCULL)==0 && - (cancelled == 0) ) + ((cancelled == 0) || (duplicate)) ) { posttrans_nla_clean(t); } diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 2a4672e3052..4aea0df74b9 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -34,6 +34,8 @@ #include #include +#include "GL/glew.h" + #ifdef WIN32 #include /* need to include windows.h so _WIN32_IE is defined */ #ifndef _WIN32_IE diff --git a/source/blender/src/view.c b/source/blender/src/view.c index f457f9203ff..12450bee9de 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -1154,7 +1154,7 @@ void viewmoveNDOF(int mode) float q1[4]; float obofs[3]; float reverse; - float diff[4]; + //float diff[4]; float d, curareaX, curareaY; float mat[3][3]; float upvec[3]; diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index 4e883caba55..935c546a235 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -566,9 +566,9 @@ static unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } @@ -586,11 +586,11 @@ static unsigned int mcol_add(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - temp= cp1[1] + ((fac*cp2[1])>>8); + temp= cp1[1] + ((fac*cp2[1])/255); if(temp>254) cp[1]= 255; else cp[1]= temp; - temp= cp1[2] + ((fac*cp2[2])>>8); + temp= cp1[2] + ((fac*cp2[2])/255); if(temp>254) cp[2]= 255; else cp[2]= temp; - temp= cp1[3] + ((fac*cp2[3])>>8); + temp= cp1[3] + ((fac*cp2[3])/255); if(temp>254) cp[3]= 255; else cp[3]= temp; return col; @@ -609,11 +609,11 @@ static unsigned int mcol_sub(unsigned int col1, unsigned int col2, int fac) cp= (char *)&col; cp[0]= 255; - temp= cp1[1] - ((fac*cp2[1])>>8); + temp= cp1[1] - ((fac*cp2[1])/255); if(temp<0) cp[1]= 0; else cp[1]= temp; - temp= cp1[2] - ((fac*cp2[2])>>8); + temp= cp1[2] - ((fac*cp2[2])/255); if(temp<0) cp[2]= 0; else cp[2]= temp; - temp= cp1[3] - ((fac*cp2[3])>>8); + temp= cp1[3] - ((fac*cp2[3])/255); if(temp<0) cp[3]= 0; else cp[3]= temp; return col; @@ -635,9 +635,9 @@ static unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac) /* first mul, then blend the fac */ cp[0]= 255; - cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])>>8) )>>8; - cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])>>8) )>>8; - cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])>>8) )>>8; + cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])/255) )/255; + cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])/255) )/255; + cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])/255) )/255; return col; @@ -664,9 +664,9 @@ static unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac) return col1; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } @@ -692,9 +692,9 @@ static unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac) return col1; cp[0]= 255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8; - cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8; - cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8; + cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; + cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; + cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; return col; } diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 230d6b262c6..ed6ea7c5f6a 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -26,6 +26,7 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include "GL/glew.h" #include "KX_BlenderGL.h" #ifdef HAVE_CONFIG_H @@ -44,7 +45,6 @@ #include "BMF_Api.h" -#include "GL/glew.h" #include "BIF_gl.h" #include "BL_Material.h" // MAXTEX diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 44f6ec1af90..5d6dd694765 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -184,6 +184,11 @@ bool BL_ActionActuator::Update(double curtime, bool frame) if (bNegativeEvent) { + // dont continue where we left off when restarting + if (m_end_reset) { + m_flag &= ~ACT_FLAG_LOCKINPUT; + } + if (!(m_flag & ACT_FLAG_ACTIVE)) return false; m_flag &= ~ACT_FLAG_ACTIVE; @@ -472,8 +477,10 @@ PyMethodDef BL_ActionActuator::Methods[] = { {"getFrameProperty", (PyCFunction) BL_ActionActuator::sPyGetFrameProperty, METH_VARARGS, GetFrameProperty_doc}, {"setChannel", (PyCFunction) BL_ActionActuator::sPySetChannel, METH_VARARGS, SetChannel_doc}, // {"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_VARARGS}, - {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, + {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, GetType_doc}, {"setType", (PyCFunction) BL_ActionActuator::sPySetType, METH_VARARGS, SetType_doc}, + {"getContinue", (PyCFunction) BL_ActionActuator::sPyGetContinue, METH_NOARGS, 0}, + {"setContinue", (PyCFunction) BL_ActionActuator::sPySetContinue, METH_O, 0}, {NULL,NULL} //Sentinel }; @@ -978,7 +985,26 @@ PyObject* BL_ActionActuator::PySetType(PyObject* self, default: printf("Invalid type for action actuator: %d\n", typeArg); /* error */ } - - Py_Return; + Py_RETURN_NONE; +} + +PyObject* BL_ActionActuator::PyGetContinue(PyObject* self) { + return PyInt_FromLong((long)(m_end_reset==0)); +} + +PyObject* BL_ActionActuator::PySetContinue(PyObject* self, PyObject* value) { + int param = PyObject_IsTrue( value ); + + if( param == -1 ) { + PyErr_SetString( PyExc_TypeError, "expected True/False or 0/1" ); + return NULL; + } + + if (param) { + m_end_reset = 0; + } else { + m_end_reset = 1; + } + Py_RETURN_NONE; } diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h index 190f727c9c3..a67b6d29b74 100644 --- a/source/gameengine/Converter/BL_ActionActuator.h +++ b/source/gameengine/Converter/BL_ActionActuator.h @@ -47,6 +47,7 @@ public: short playtype, short blendin, short priority, + short end_reset, float stride, PyTypeObject* T=&Type) : SCA_IActuator(gameobj,T), @@ -64,6 +65,7 @@ public: m_stridelength(stride), m_playtype(playtype), m_priority(priority), + m_end_reset(end_reset), m_pose(NULL), m_blendpose(NULL), m_userpose(NULL), @@ -101,6 +103,8 @@ public: // KX_PYMETHOD(BL_ActionActuator,GetChannel); KX_PYMETHOD_DOC(BL_ActionActuator,GetType); KX_PYMETHOD_DOC(BL_ActionActuator,SetType); + KX_PYMETHOD_NOARGS(BL_ActionActuator,GetContinue); + KX_PYMETHOD_O(BL_ActionActuator,SetContinue); virtual PyObject* _getattr(const STR_String& attr); @@ -137,6 +141,7 @@ protected: float m_stridelength; short m_playtype; short m_priority; + short m_end_reset; struct bPose* m_pose; struct bPose* m_blendpose; struct bPose* m_userpose; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 665783a1ba5..f3e22cd297a 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -312,11 +312,13 @@ BL_Material* ConvertMaterial( Mesh* mesh, Material *mat, MTFace* tface, + const char *tfaceName, MFace* mface, MCol* mmcol, int lightlayer, Object* blenderobj, - MTF_localLayer *layers) + MTF_localLayer *layers, + bool glslmat) { //this needs some type of manager BL_Material *material = new BL_Material(); @@ -335,7 +337,7 @@ BL_Material* ConvertMaterial( if(validmat) { // use vertex colors by explicitly setting - if(mat->mode &MA_VERTEXCOLP) + if(mat->mode &MA_VERTEXCOLP || glslmat) type = 0; // use lighting? @@ -558,6 +560,7 @@ BL_Material* ConvertMaterial( } else { int valid = 0; + // check for tface tex to fallback on if( validface ){ @@ -590,6 +593,7 @@ BL_Material* ConvertMaterial( } MT_Point2 uv[4]; MT_Point2 uv2[4]; + const char *uvName = "", *uv2Name = ""; uv[0]= uv[1]= uv[2]= uv[3]= MT_Point2(0.0f, 0.0f); uv2[0]= uv2[1]= uv2[2]= uv2[3]= MT_Point2(0.0f, 0.0f); @@ -616,6 +620,8 @@ BL_Material* ConvertMaterial( if (mface->v4) uv[3] = MT_Point2(tface->uv[3]); + + uvName = tfaceName; } else { // nothing at all @@ -641,39 +647,38 @@ BL_Material* ConvertMaterial( isFirstSet = false; else { - MT_Point2 uvSet[4]; for (int lay=0; layuv[0]); uvSet[1] = MT_Point2(layer.face->uv[1]); uvSet[2] = MT_Point2(layer.face->uv[2]); if (mface->v4) uvSet[3] = MT_Point2(layer.face->uv[3]); + else + uvSet[3] = MT_Point2(0.0f, 0.0f); - processed = true; - } - - if (!processed) continue; - - if (isFirstSet) - { - uv[0] = uvSet[0]; uv[1] = uvSet[1]; - uv[2] = uvSet[2]; uv[3] = uvSet[3]; - isFirstSet = false; - } - else - { - uv2[0] = uvSet[0]; uv2[1] = uvSet[1]; - uv2[2] = uvSet[2]; uv2[3] = uvSet[3]; - map.mapping |= USECUSTOMUV; + if (isFirstSet) + { + uv[0] = uvSet[0]; uv[1] = uvSet[1]; + uv[2] = uvSet[2]; uv[3] = uvSet[3]; + isFirstSet = false; + uvName = layer.name; + } + else + { + uv2[0] = uvSet[0]; uv2[1] = uvSet[1]; + uv2[2] = uvSet[2]; uv2[3] = uvSet[3]; + map.mapping |= USECUSTOMUV; + uv2Name = layer.name; + } } } } @@ -693,9 +698,8 @@ BL_Material* ConvertMaterial( } material->SetConversionRGB(rgb); - material->SetConversionUV(uv); - material->SetConversionUV2(uv2); - + material->SetConversionUV(uvName, uv); + material->SetConversionUV2(uv2Name, uv2); material->ras_mode |= (mface->v4==0)?TRIANGLE:0; if(validmat) @@ -797,6 +801,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* MFace* mface = static_cast(mesh->mface); MTFace* tface = static_cast(mesh->mtface); + const char *tfaceName = ""; MCol* mmcol = mesh->mcol; MT_assert(mface || mesh->totface == 0); @@ -832,14 +837,14 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* layers[validLayers].face = (MTFace*)mesh->fdata.layers[i].data;; layers[validLayers].name = mesh->fdata.layers[i].name; + if(tface == layers[validLayers].face) + tfaceName = layers[validLayers].name; validLayers++; } } meshobj->SetName(mesh->id.name); meshobj->m_xyz_index_to_vertex_index_mapping.resize(mesh->totvert); - if(skinMesh) - ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.resize(mesh->totvert); for (int f=0;ftotface;f++,mface++) { @@ -898,8 +903,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* else ma = give_current_material(blenderobj, 1); - bl_mat = ConvertMaterial(mesh, ma, tface, mface, mmcol, lightlayer, blenderobj, layers); - bl_mat->glslmat = converter->GetGLSLMaterials(); + bl_mat = ConvertMaterial(mesh, ma, tface, tfaceName, mface, mmcol, lightlayer, blenderobj, layers, converter->GetGLSLMaterials()); // set the index were dealing with bl_mat->material_index = (int)mface->mat_nr; @@ -1059,35 +1063,25 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* int nverts = mface->v4?4:3; int vtxarray = meshobj->FindVertexArray(nverts,polymat); RAS_Polygon* poly = new RAS_Polygon(bucket,polyvisible,nverts,vtxarray); - if (skinMesh) { - int d1, d2, d3, d4=0; - bool flat; + bool flat; + + if (skinMesh) { /* If the face is set to solid, all fnors are the same */ if (mface->flag & ME_SMOOTH) flat = false; else flat = true; - - d1=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v1, &mesh->dvert[mface->v1], polymat); - d2=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v2, &mesh->dvert[mface->v2], polymat); - d3=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v3, &mesh->dvert[mface->v3], polymat); - if (nverts==4) - d4=((BL_SkinMeshObject*)meshobj)->FindOrAddDeform(vtxarray, mface->v4, &mesh->dvert[mface->v4], polymat); - poly->SetVertex(0,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,d1,flat,polymat,mface->v1)); - poly->SetVertex(1,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,d2,flat,polymat,mface->v2)); - poly->SetVertex(2,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,d3,flat,polymat,mface->v3)); - if (nverts==4) - poly->SetVertex(3,((BL_SkinMeshObject*)meshobj)->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,d4,flat,polymat,mface->v4)); } else - { - poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,false,polymat,mface->v1)); - poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,false,polymat,mface->v2)); - poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,false,polymat,mface->v3)); - if (nverts==4) - poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,false,polymat,mface->v4)); - } + flat = false; + + poly->SetVertex(0,meshobj->FindOrAddVertex(vtxarray,pt0,uv0,uv20,tan0,rgb0,no0,flat,polymat,mface->v1)); + poly->SetVertex(1,meshobj->FindOrAddVertex(vtxarray,pt1,uv1,uv21,tan1,rgb1,no1,flat,polymat,mface->v2)); + poly->SetVertex(2,meshobj->FindOrAddVertex(vtxarray,pt2,uv2,uv22,tan2,rgb2,no2,flat,polymat,mface->v3)); + if (nverts==4) + poly->SetVertex(3,meshobj->FindOrAddVertex(vtxarray,pt3,uv3,uv23,tan3,rgb3,no3,flat,polymat,mface->v4)); + meshobj->AddPolygon(poly); if (poly->IsCollider()) { @@ -1125,8 +1119,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* } } meshobj->m_xyz_index_to_vertex_index_mapping.clear(); - if(skinMesh) - ((BL_SkinMeshObject*)meshobj)->m_mvert_to_dvert_mapping.clear(); meshobj->UpdateMaterialList(); // pre calculate texture generation @@ -1545,7 +1537,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj, -static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { +static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) { RAS_LightObject lightobj; KX_LightObject *gamelight; @@ -1577,8 +1569,15 @@ static KX_LightObject *gamelight_from_blamp(Lamp *la, unsigned int layerflag, KX } else { lightobj.m_type = RAS_LightObject::LIGHT_NORMAL; } + +#ifdef BLENDER_GLSL + if(converter->GetGLSLMaterials()) + GPU_lamp_from_blender(ob, la); - gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj); + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj, ob->gpulamp); +#else + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rendertools, lightobj, NULL); +#endif BL_ConvertLampIpos(la, gamelight, converter); return gamelight; @@ -1610,7 +1609,7 @@ static KX_GameObject *gameobject_from_blenderobject( { case OB_LAMP: { - KX_LightObject* gamelight= gamelight_from_blamp(static_cast(ob->data), ob->lay, kxscene, rendertools, converter); + KX_LightObject* gamelight= gamelight_from_blamp(ob, static_cast(ob->data), ob->lay, kxscene, rendertools, converter); gameobj = gamelight; gamelight->AddRef(); @@ -1660,7 +1659,7 @@ static KX_GameObject *gameobject_from_blenderobject( // two options exists for deform: shape keys and armature // only support relative shape key bool bHasShapeKey = mesh->key != NULL && mesh->key->type==KEY_RELATIVE; - bool bHasDvert = mesh->dvert != NULL; + bool bHasDvert = mesh->dvert != NULL && ob->defbase.first; bool bHasArmature = (ob->parent && ob->parent->type == OB_ARMATURE && ob->partype==PARSKEL && bHasDvert); if (bHasShapeKey) { @@ -1671,13 +1670,15 @@ static KX_GameObject *gameobject_from_blenderobject( if (bHasArmature) dcont->LoadShapeDrivers(ob->parent); } else if (bHasArmature) { - BL_SkinDeformer *dcont = new BL_SkinDeformer(ob, (BL_SkinMeshObject*)meshobj ); + BL_SkinDeformer *dcont = new BL_SkinDeformer((BL_DeformableGameObject*)gameobj, + ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; } else if (bHasDvert) { // this case correspond to a mesh that can potentially deform but not with the // object to which it is attached for the moment. A skin mesh was created in // BL_ConvertMesh() so must create a deformer too! - BL_MeshDeformer *dcont = new BL_MeshDeformer(ob, (BL_SkinMeshObject*)meshobj ); + BL_MeshDeformer *dcont = new BL_MeshDeformer((BL_DeformableGameObject*)gameobj, + ob, (BL_SkinMeshObject*)meshobj); ((BL_DeformableGameObject*)gameobj)->m_pDeformer = dcont; } @@ -2075,7 +2076,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (blenderscene->camera) { KX_Camera *gamecamera= (KX_Camera*) converter->FindGameObject(blenderscene->camera); - kxscene->SetActiveCamera(gamecamera); + if(gamecamera) + kxscene->SetActiveCamera(gamecamera); } // Set up armatures @@ -2331,7 +2333,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie, { KX_GameObject* gameobj = static_cast(logicbrick_conversionlist->GetValue(i)); struct Object* blenderobj = converter->FindBlenderObject(gameobj); - gameobj->SetState((blenderobj->init_state)?blenderobj->init_state:blenderobj->state); + gameobj->SetInitState((blenderobj->init_state)?blenderobj->init_state:blenderobj->state); + gameobj->ResetState(); } #endif //CONVERT_LOGIC diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index 212827a660f..39d66a90e92 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -39,6 +39,7 @@ #endif #include "RAS_IPolygonMaterial.h" +#include "BL_DeformableGameObject.h" #include "BL_MeshDeformer.h" #include "BL_SkinMeshObject.h" #include "DNA_mesh_types.h" @@ -47,33 +48,40 @@ #include "GEN_Map.h" #include "STR_HashedString.h" -bool BL_MeshDeformer::Apply(RAS_IPolyMaterial *mat) +bool BL_MeshDeformer::Apply(RAS_IPolyMaterial*) { - size_t i, j, index; - vecVertexArray array; - vecIndexArrays mvarray; - vecIndexArrays diarray; + size_t i, j; + float *co; - RAS_TexVert *tv; - MVert *mvert; + // only apply once per frame if the mesh is actually modified + if(m_pMeshObject->MeshModified() && + m_lastDeformUpdate != m_gameobj->GetLastFrame()) { + // For each material + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - // For each material - array = m_pMeshObject->GetVertexCache(mat); - mvarray = m_pMeshObject->GetMVertCache(mat); - diarray = m_pMeshObject->GetDIndexCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); - // For each array - for (i=0; isize(); j++){ - tv = &((*array[i])[j]); - index = ((*diarray[i])[j]); + // For each array + for (i=0; imvert[((*mvarray[i])[index])]); - tv->SetXYZ(MT_Point3(mvert->co)); + // For each vertex + for (j=0; jmvert[v.getOrigIndex()].co; + v.SetXYZ(MT_Point3(co)); + } + } } + + m_lastDeformUpdate = m_gameobj->GetLastFrame(); + + return true; } - return true; + + return false; } BL_MeshDeformer::~BL_MeshDeformer() @@ -92,83 +100,86 @@ void BL_MeshDeformer::RecalcNormals() /* We don't normalize for performance, not doing it for faces normals * gives area-weight normals which often look better anyway, and use * GL_NORMALIZE so we don't have to do per vertex normalization either - * since the GPU can do it faster - * - * There's a lot of indirection here to get to the data, can this work - * with less arrays/indirection? */ - - vecIndexArrays indexarrays; - vecIndexArrays mvarrays; - vecIndexArrays diarrays; - vecVertexArray vertexarrays; + * since the GPU can do it faster */ size_t i, j; /* set vertex normals to zero */ - for (i=0; i<(size_t)m_bmesh->totvert; i++) - m_transnors[i] = MT_Vector3(0.0f, 0.0f, 0.0f); + memset(m_transnors, 0, sizeof(float)*3*m_bmesh->totvert); /* add face normals to vertices. */ for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); mit != m_pMeshObject->GetLastMaterial(); ++ mit) { RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - indexarrays = m_pMeshObject->GetIndexCache(mat); - vertexarrays = m_pMeshObject->GetVertexCache(mat); - diarrays = m_pMeshObject->GetDIndexCache(mat); - mvarrays = m_pMeshObject->GetMVertCache(mat); + const vecIndexArrays& indexarrays = m_pMeshObject->GetIndexCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); for (i=0; iUsesTriangles()? 3: 4; for(j=0; jgetLocalXYZ(); - fnor = (((mv2-mv1).cross(mv3-mv2))+((mv4-mv3).cross(mv1-mv4))); //.safe_normalized(); + n1[0]= co1[0]-co3[0]; + n1[1]= co1[1]-co3[1]; + n1[2]= co1[2]-co3[2]; + + n2[0]= co2[0]-co4[0]; + n2[1]= co2[1]-co4[1]; + n2[2]= co2[2]-co4[2]; } - else - fnor = ((mv2-mv1).cross(mv3-mv2)); //.safe_normalized(); + else { + n1[0]= co1[0]-co2[0]; + n2[0]= co2[0]-co3[0]; + n1[1]= co1[1]-co2[1]; + + n2[1]= co2[1]-co3[1]; + n1[2]= co1[2]-co2[2]; + n2[2]= co2[2]-co3[2]; + } + + fnor[0]= n1[1]*n2[2] - n1[2]*n2[1]; + fnor[1]= n1[2]*n2[0] - n1[0]*n2[2]; + fnor[2]= n1[0]*n2[1] - n1[1]*n2[0]; /* add to vertices for smooth normals */ - m_transnors[mvarray[diarray[i1]]] += fnor; - m_transnors[mvarray[diarray[i2]]] += fnor; - m_transnors[mvarray[diarray[i3]]] += fnor; + float *vn1 = m_transnors[v1.getOrigIndex()]; + float *vn2 = m_transnors[v2.getOrigIndex()]; + float *vn3 = m_transnors[v3.getOrigIndex()]; + + vn1[0] += fnor[0]; vn1[1] += fnor[1]; vn1[2] += fnor[2]; + vn2[0] += fnor[0]; vn2[1] += fnor[1]; vn2[2] += fnor[2]; + vn3[0] += fnor[0]; vn3[1] += fnor[1]; vn3[2] += fnor[2]; + + if(v4) { + float *vn4 = m_transnors[v4->getOrigIndex()]; + vn4[0] += fnor[0]; vn4[1] += fnor[1]; vn4[2] += fnor[2]; + } /* in case of flat - just assign, the vertices are split */ if(v1.getFlag() & TV_CALCFACENORMAL) { v1.SetNormal(fnor); v2.SetNormal(fnor); v3.SetNormal(fnor); - } - - if(nvert == 4) { - int i4 = indexarray[j+3]; - RAS_TexVert& v4 = vertexarray[i4]; - - /* same as above */ - m_transnors[mvarray[diarray[i4]]] += fnor; - - if(v4.getFlag() & TV_CALCFACENORMAL) - v4.SetNormal(fnor); + if(v4) + v4->SetNormal(fnor); } } } @@ -179,18 +190,17 @@ void BL_MeshDeformer::RecalcNormals() mit != m_pMeshObject->GetLastMaterial(); ++ mit) { RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - vertexarrays = m_pMeshObject->GetVertexCache(mat); - diarrays = m_pMeshObject->GetDIndexCache(mat); - mvarrays = m_pMeshObject->GetMVertCache(mat); + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); for (i=0; itotvert)][3]; - m_transnors=new MT_Vector3[m_bmesh->totvert]; + m_transverts=new float[m_bmesh->totvert][3]; + m_transnors=new float[m_bmesh->totvert][3]; m_tvtot = m_bmesh->totvert; } } diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h index 8d8b56b1eed..e9f7f0b192f 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.h +++ b/source/gameengine/Converter/BL_MeshDeformer.h @@ -40,19 +40,25 @@ #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning #endif //WIN32 +class BL_DeformableGameObject; + class BL_MeshDeformer : public RAS_Deformer { public: void VerifyStorage(); void RecalcNormals(); virtual void Relink(GEN_Map*map){}; - BL_MeshDeformer(struct Object* obj, class BL_SkinMeshObject *meshobj ): + BL_MeshDeformer(BL_DeformableGameObject *gameobj, + struct Object* obj, + class BL_SkinMeshObject *meshobj ): m_pMeshObject(meshobj), m_bmesh((struct Mesh*)(obj->data)), m_transverts(0), m_transnors(0), m_objMesh(obj), - m_tvtot(0) + m_tvtot(0), + m_gameobj(gameobj), + m_lastDeformUpdate(-1) {}; virtual ~BL_MeshDeformer(); virtual void SetSimulatedTime(double time){}; @@ -68,10 +74,12 @@ protected: // this is so m_transverts doesn't need to be converted // before deformation float (*m_transverts)[3]; - MT_Vector3* m_transnors; + float (*m_transnors)[3]; struct Object* m_objMesh; // -- int m_tvtot; + BL_DeformableGameObject* m_gameobj; + double m_lastDeformUpdate; }; #endif diff --git a/source/gameengine/Converter/BL_ShapeDeformer.h b/source/gameengine/Converter/BL_ShapeDeformer.h index 9f8361dbaca..5f0188e3a42 100644 --- a/source/gameengine/Converter/BL_ShapeDeformer.h +++ b/source/gameengine/Converter/BL_ShapeDeformer.h @@ -58,9 +58,8 @@ public: Object *bmeshobj, BL_SkinMeshObject *mesh) : - BL_SkinDeformer(bmeshobj, mesh), - m_lastShapeUpdate(-1), - m_gameobj(gameobj) + BL_SkinDeformer(gameobj,bmeshobj, mesh), + m_lastShapeUpdate(-1) { }; @@ -72,9 +71,8 @@ public: bool release_object, BL_ArmatureObject* arma = NULL) : - BL_SkinDeformer(bmeshobj_old, bmeshobj_new, mesh, release_object, arma), - m_lastShapeUpdate(-1), - m_gameobj(gameobj) + BL_SkinDeformer(gameobj, bmeshobj_old, bmeshobj_new, mesh, release_object, arma), + m_lastShapeUpdate(-1) { }; @@ -94,7 +92,6 @@ public: protected: vector m_shapeDrivers; double m_lastShapeUpdate; - BL_DeformableGameObject* m_gameobj; }; diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp index dd7119b1031..d3442fe5298 100644 --- a/source/gameengine/Converter/BL_SkinDeformer.cpp +++ b/source/gameengine/Converter/BL_SkinDeformer.cpp @@ -57,11 +57,12 @@ extern "C"{ #define __NLA_DEFNORMALS //#undef __NLA_DEFNORMALS -BL_SkinDeformer::BL_SkinDeformer(struct Object *bmeshobj, +BL_SkinDeformer::BL_SkinDeformer(BL_DeformableGameObject *gameobj, + struct Object *bmeshobj, class BL_SkinMeshObject *mesh, BL_ArmatureObject* arma) : // - BL_MeshDeformer(bmeshobj, mesh), + BL_MeshDeformer(gameobj, bmeshobj, mesh), m_armobj(arma), m_lastArmaUpdate(-1), m_defbase(&bmeshobj->defbase), @@ -71,12 +72,13 @@ BL_SkinDeformer::BL_SkinDeformer(struct Object *bmeshobj, }; BL_SkinDeformer::BL_SkinDeformer( + BL_DeformableGameObject *gameobj, struct Object *bmeshobj_old, // Blender object that owns the new mesh struct Object *bmeshobj_new, // Blender object that owns the original mesh class BL_SkinMeshObject *mesh, bool release_object, BL_ArmatureObject* arma) : - BL_MeshDeformer(bmeshobj_old, mesh), + BL_MeshDeformer(gameobj, bmeshobj_old, mesh), m_armobj(arma), m_lastArmaUpdate(-1), m_defbase(&bmeshobj_old->defbase), @@ -96,35 +98,32 @@ BL_SkinDeformer::~BL_SkinDeformer() m_armobj->Release(); } -bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *mat) +bool BL_SkinDeformer::Apply(RAS_IPolyMaterial *) { - size_t i, j, index; - vecVertexArray array; - vecIndexArrays mvarray; - vecMDVertArray dvarray; - vecIndexArrays diarray; + size_t i, j; - RAS_TexVert *tv; - MT_Point3 pt; -// float co[3]; + if (!Update()) + // no need to update the cache + return false; - Update(); + // Update all materials at once, so we can do the above update test + // without ending up with some materials not updated + for(RAS_MaterialBucket::Set::iterator mit = m_pMeshObject->GetFirstMaterial(); + mit != m_pMeshObject->GetLastMaterial(); ++ mit) { + RAS_IPolyMaterial *mat = (*mit)->GetPolyMaterial(); - array = m_pMeshObject->GetVertexCache(mat); - mvarray = m_pMeshObject->GetMVertCache(mat); - diarray = m_pMeshObject->GetDIndexCache(mat); - // For each array - for (i=0; isize(); j++) { + vecVertexArray& vertexarrays = m_pMeshObject->GetVertexCache(mat); - tv = &((*array[i])[j]); - - index = ((*diarray[i])[j]); - - // Copy the untransformed data from the original mvert - // Set the data - tv->SetXYZ(m_transverts[((*mvarray[i])[index])]); + // For each array + for (i=0; im_MvertArrayCache1[vtxarray]->size(); - - /* Check to see if this has already been pushed */ - for (vector::iterator it = m_mvert_to_dvert_mapping[mv].begin(); - it != m_mvert_to_dvert_mapping[mv].end(); - it++) - { - if(it->mat == mat) - return it->index; - } - - ao->m_MvertArrayCache1[vtxarray]->push_back(mv); - ao->m_DvertArrayCache1[vtxarray]->push_back(dv); - - BL_MDVertMap mdmap; - mdmap.mat = mat; - mdmap.index = numvert; - m_mvert_to_dvert_mapping[mv].push_back(mdmap); - - return numvert; -}; - -int BL_SkinMeshObject::FindVertexArray(int numverts,RAS_IPolyMaterial* polymat) -{ - int array=-1; - - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(polymat); - - - for (size_t i=0;im_VertexArrayCache1.size();i++) - { - if ( (ao->m_TriangleArrayCount[i] + (numverts-2)) < BUCKET_MAX_TRIANGLES) - { - if((ao->m_VertexArrayCache1[i]->size()+numverts < BUCKET_MAX_INDICES)) - { - array = i; - ao->m_TriangleArrayCount[array]+=numverts-2; - break; - } - } - } - - - if (array == -1) - { - array = ao->m_VertexArrayCache1.size(); - - vector* va = new vector; - ao->m_VertexArrayCache1.push_back(va); - - KX_IndexArray *ia = new KX_IndexArray(); - ao->m_IndexArrayCache1.push_back(ia); - - KX_IndexArray *bva = new KX_IndexArray(); - ao->m_MvertArrayCache1.push_back(bva); - - BL_DeformVertArray *dva = new BL_DeformVertArray(); - ao->m_DvertArrayCache1.push_back(dva); - - KX_IndexArray *da = new KX_IndexArray(); - ao->m_DIndexArrayCache1.push_back(da); - - ao->m_TriangleArrayCount.push_back(numverts-2); - - } - - - return array; -} - - //void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,RAS_BucketManager* bucketmgr) void BL_SkinMeshObject::Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec) { diff --git a/source/gameengine/Converter/BL_SkinMeshObject.h b/source/gameengine/Converter/BL_SkinMeshObject.h index cc2b8de600e..c21fb64204b 100644 --- a/source/gameengine/Converter/BL_SkinMeshObject.h +++ b/source/gameengine/Converter/BL_SkinMeshObject.h @@ -44,78 +44,19 @@ #include "DNA_key_types.h" #include "DNA_meshdata_types.h" -typedef vector BL_MVertArray; -typedef vector BL_DeformVertArray; -typedef vector BL_VertexArray; - - -typedef vector*> vecMDVertArray; -typedef vector*> vecBVertexArray; - -class BL_SkinArrayOptimizer : public KX_ArrayOptimizer -{ -public: - BL_SkinArrayOptimizer(int index) - :KX_ArrayOptimizer (index) {}; - virtual ~BL_SkinArrayOptimizer(){ - - for (vector::iterator itv = m_MvertArrayCache1.begin(); - !(itv == m_MvertArrayCache1.end());itv++) - { - delete (*itv); - } - for (vector::iterator itd = m_DvertArrayCache1.begin(); - !(itd == m_DvertArrayCache1.end());itd++) - { - delete (*itd); - } - for (vector::iterator iti = m_DIndexArrayCache1.begin(); - !(iti == m_DIndexArrayCache1.end());iti++) - { - delete (*iti); - } - - m_MvertArrayCache1.clear(); - m_DvertArrayCache1.clear(); - m_DIndexArrayCache1.clear(); - }; - - vector m_MvertArrayCache1; - vector m_DvertArrayCache1; - vector m_DIndexArrayCache1; - -}; - class BL_SkinMeshObject : public RAS_MeshObject { // enum { BUCKET_MAX_INDICES = 16384};//2048};//8192}; // enum { BUCKET_MAX_TRIANGLES = 4096}; - KX_ArrayOptimizer* GetArrayOptimizer(RAS_IPolyMaterial* polymat) - { - KX_ArrayOptimizer** aop = (m_matVertexArrayS[*polymat]); - if (aop) - return *aop; - int numelements = m_matVertexArrayS.size(); - m_sortedMaterials.push_back(polymat); - - BL_SkinArrayOptimizer* ao = new BL_SkinArrayOptimizer(numelements); - m_matVertexArrayS.insert(*polymat,ao); - return ao; - } - protected: vector m_cacheWeightIndex; public: - struct BL_MDVertMap { RAS_IPolyMaterial *mat; int index; }; - vector > m_mvert_to_dvert_mapping; - void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec); // void Bucketize(double* oglmatrix,void* clientobj,bool useObjectColor,const MT_Vector4& rgbavec,class RAS_BucketManager* bucketmgr); - int FindVertexArray(int numverts,RAS_IPolyMaterial* polymat); BL_SkinMeshObject(Mesh* mesh, int lightlayer) : RAS_MeshObject (mesh, lightlayer) { m_class = 1; @@ -144,42 +85,7 @@ public: } } }; - - const vecIndexArrays& GetDIndexCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_DIndexArrayCache1; - } - const vecMDVertArray& GetDVertCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_DvertArrayCache1; - } - const vecIndexArrays& GetMVertCache (RAS_IPolyMaterial* mat) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); - return ao->m_MvertArrayCache1; - } - void AddPolygon(RAS_Polygon* poly); - int FindOrAddDeform(unsigned int vtxarray, unsigned int mv, struct MDeformVert *dv, RAS_IPolyMaterial* mat); - int FindOrAddVertex(int vtxarray,const MT_Point3& xyz, - const MT_Point2& uv, - const MT_Point2& uv2, - const MT_Vector4& tangent, - const unsigned int rgbacolor, - const MT_Vector3& normal, int defnr, bool flat, RAS_IPolyMaterial* mat, int origindex) - { - BL_SkinArrayOptimizer* ao = (BL_SkinArrayOptimizer*)GetArrayOptimizer(mat); - int numverts = ao->m_VertexArrayCache1[vtxarray]->size(); - int index = RAS_MeshObject::FindOrAddVertex(vtxarray, xyz, uv, uv2, tangent, rgbacolor, normal, flat, mat, origindex); - - /* this means a new vertex was added, so we add the defnr too */ - if(index == numverts) - ao->m_DIndexArrayCache1[vtxarray]->push_back(defnr); - - return index; - } // for shape keys, void CheckWeightCache(struct Object* obj); diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index 6e05ea31fe8..1f87e9d9ac7 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -193,6 +193,7 @@ void BL_ConvertActuators(char* maggiename, actact->type, // + 1, because Blender starts to count at zero, actact->blendin, actact->priority, + actact->end_reset, actact->stridelength // Ketsji at 1, because zero is reserved for "NoDef" ); @@ -233,7 +234,8 @@ void BL_ConvertActuators(char* maggiename, STR_String propname = ( ipoact->name ? ipoact->name : ""); // first bit? bool ipo_as_force = (ipoact->flag & ACT_IPOFORCE); - bool force_local = (ipoact->flag & ACT_IPOFORCE_LOCAL); + bool local = (ipoact->flag & ACT_IPOLOCAL); + bool ipo_add = (ipoact->flag & ACT_IPOADD); KX_IpoActuator* tmpbaseact = new KX_IpoActuator( gameobj, @@ -244,8 +246,8 @@ void BL_ConvertActuators(char* maggiename, ipoact->type + 1, // + 1, because Blender starts to count at zero, // Ketsji at 1, because zero is reserved for "NoDef" ipo_as_force, - force_local - ); + ipo_add, + local); baseact = tmpbaseact; break; } diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 04cc119efee..2bcb604dd23 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -76,18 +76,36 @@ static inline void Py_Fatal(char *M) { virtual PyTypeObject *GetType(void) {return &Type;}; \ virtual PyParentObject *GetParents(void) {return Parents;} + // This defines the _getattr_up macro // which allows attribute and method calls // to be properly passed up the hierarchy. #define _getattr_up(Parent) \ - PyObject *rvalue = Py_FindMethod(Methods, this, const_cast(attr.ReadPtr())); \ - if (rvalue == NULL) \ - { \ - PyErr_Clear(); \ - return Parent::_getattr(attr); \ + PyObject *rvalue = NULL; \ + if (attr=="__methods__") { \ + PyObject *_attr_string = NULL; \ + PyMethodDef *meth = Methods; \ + rvalue = Parent::_getattr(attr); \ + if (rvalue==NULL) { \ + PyErr_Clear(); \ + rvalue = PyList_New(0); \ } \ - else \ - return rvalue + if (meth) { \ + for (; meth->ml_name != NULL; meth++) { \ + _attr_string = PyString_FromString(meth->ml_name); \ + PyList_Append(rvalue, _attr_string); \ + Py_DECREF(_attr_string); \ + } \ + } \ + } else { \ + rvalue = Py_FindMethod(Methods, this, const_cast(attr.ReadPtr())); \ + if (rvalue == NULL) { \ + PyErr_Clear(); \ + rvalue = Parent::_getattr(attr); \ + } \ + } \ + return rvalue; \ + /** * These macros are helpfull when embedding Python routines. The second diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp index 9645bfbed4a..e1c8ef87dd1 100644 --- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp @@ -111,7 +111,7 @@ void SCA_ActuatorSensor::Update() { if (m_actuator) { - m_midresult = m_actuator->IsActive(); + m_midresult = m_actuator->IsActive() && !m_actuator->IsNegativeEvent(); } } diff --git a/source/gameengine/GameLogic/SCA_IActuator.h b/source/gameengine/GameLogic/SCA_IActuator.h index 774b27c5ad4..7ffb21b5490 100644 --- a/source/gameengine/GameLogic/SCA_IActuator.h +++ b/source/gameengine/GameLogic/SCA_IActuator.h @@ -87,6 +87,7 @@ public: bool IsNegativeEvent() const; virtual ~SCA_IActuator(); + void ClrLink() { m_links=0; } void IncLink() { m_links++; } void DecLink(); bool IsNoLink() const { return !m_links; } diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index 27e7d5faada..c5bb4a41552 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -40,7 +40,7 @@ MT_Point3 SCA_IObject::m_sDummy=MT_Point3(0,0,0); -SCA_IObject::SCA_IObject(PyTypeObject* T): m_state(0), CValue(T) +SCA_IObject::SCA_IObject(PyTypeObject* T): m_initState(0), m_state(0), CValue(T) { m_suspended = false; } @@ -164,7 +164,9 @@ void SCA_IObject::ReParentLogic() { SCA_IActuator* newactuator = (SCA_IActuator*) (*ita)->GetReplica(); newactuator->ReParent(this); + // actuators are initially not connected to any controller newactuator->SetActive(false); + newactuator->ClrLink(); oldactuators[act++] = newactuator; } @@ -175,6 +177,7 @@ void SCA_IObject::ReParentLogic() { SCA_IController* newcontroller = (SCA_IController*)(*itc)->GetReplica(); newcontroller->ReParent(this); + newcontroller->SetActive(false); oldcontrollers[con++]=newcontroller; } @@ -186,6 +189,9 @@ void SCA_IObject::ReParentLogic() { SCA_ISensor* newsensor = (SCA_ISensor*)(*its)->GetReplica(); newsensor->ReParent(this); + newsensor->SetActive(false); + // sensors are initially not connected to any controller + newsensor->ClrLink(); oldsensors[sen++] = newsensor; } diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h index 07b4310a91e..38a7ed29dca 100644 --- a/source/gameengine/GameLogic/SCA_IObject.h +++ b/source/gameengine/GameLogic/SCA_IObject.h @@ -68,6 +68,11 @@ protected: */ bool m_suspended; + /** + * init state of object (used when object is created) + */ + unsigned int m_initState; + /** * current state = bit mask of state that are active */ @@ -117,6 +122,16 @@ public: */ void Resume(void); + /** + * Set init state + */ + void SetInitState(unsigned int initState) { m_initState = initState; } + + /** + * initialize the state when object is created + */ + void ResetState(void) { SetState(m_initState); } + /** * Set the object state */ diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index f2ed6a803c2..4ce49e71507 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -126,6 +126,8 @@ public: /** Resume sensing. */ void Resume(); + void ClrLink() + { m_links = 0; } void IncLink() { m_links++; } void DecLink(); diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp index 06e012123b1..dd45d522b9f 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.cpp +++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp @@ -1,9 +1,11 @@ #include "DNA_customdata_types.h" +#include "DNA_material_types.h" #include "BL_BlenderShader.h" +#include "BL_Material.h" -#if 0 +#ifdef BLENDER_GLSL #include "GPU_extensions.h" #include "GPU_material.h" #endif @@ -13,29 +15,32 @@ const bool BL_BlenderShader::Ok()const { -#if 0 +#ifdef BLENDER_GLSL return (mGPUMat != 0); +#else + return 0; #endif - - return false; } -BL_BlenderShader::BL_BlenderShader(struct Material *ma) +BL_BlenderShader::BL_BlenderShader(struct Material *ma, int lightlayer) : -#if 0 +#ifdef BLENDER_GLSL mGPUMat(0), #endif - mBound(false) + mBound(false), + mLightLayer(lightlayer) { -#if 0 - if(ma) - mGPUMat = GPU_material_from_blender(ma, GPU_PROFILE_DERIVEDMESH); +#ifdef BLENDER_GLSL + if(ma) { + GPU_material_from_blender(ma); + mGPUMat = ma->gpumaterial; + } #endif } BL_BlenderShader::~BL_BlenderShader() { -#if 0 +#ifdef BLENDER_GLSL if(mGPUMat) { GPU_material_unbind(mGPUMat); mGPUMat = 0; @@ -43,16 +48,12 @@ BL_BlenderShader::~BL_BlenderShader() #endif } -void BL_BlenderShader::ApplyShader() -{ -} - void BL_BlenderShader::SetProg(bool enable) { -#if 0 +#ifdef BLENDER_GLSL if(mGPUMat) { if(enable) { - GPU_material_bind(mGPUMat); + GPU_material_bind(mGPUMat, mLightLayer); mBound = true; } else { @@ -65,7 +66,7 @@ void BL_BlenderShader::SetProg(bool enable) int BL_BlenderShader::GetAttribNum() { -#if 0 +#ifdef BLENDER_GLSL GPUVertexAttribs attribs; int i, enabled = 0; @@ -82,17 +83,19 @@ int BL_BlenderShader::GetAttribNum() enabled = BL_MAX_ATTRIB; return enabled; -#endif - +#else return 0; +#endif } -void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) +void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat) { -#if 0 +#ifdef BLENDER_GLSL GPUVertexAttribs attribs; int i, attrib_num; + ras->SetAttribNum(0); + if(!mGPUMat) return; @@ -109,14 +112,24 @@ void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) if(attribs.layer[i].glindex > attrib_num) continue; - if(attribs.layer[i].type == CD_MTFACE) - ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + if(attribs.layer[i].type == CD_MTFACE) { + if(!mat->uvName.IsEmpty() && strcmp(mat->uvName.ReadPtr(), attribs.layer[i].name) == 0) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + else if(!mat->uv2Name.IsEmpty() && strcmp(mat->uv2Name.ReadPtr(), attribs.layer[i].name) == 0) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV2, attribs.layer[i].glindex); + else + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex); + } else if(attribs.layer[i].type == CD_TANGENT) ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, attribs.layer[i].glindex); else if(attribs.layer[i].type == CD_ORCO) ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_ORCO, attribs.layer[i].glindex); else if(attribs.layer[i].type == CD_NORMAL) ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_NORM, attribs.layer[i].glindex); + else if(attribs.layer[i].type == CD_MCOL) + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_VCOL, attribs.layer[i].glindex); + else + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, attribs.layer[i].glindex); } ras->EnableTextures(true); @@ -128,8 +141,8 @@ void BL_BlenderShader::SetTexCoords(RAS_IRasterizer* ras) void BL_BlenderShader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) { -#if 0 - float obmat[4][4], viewmat[4][4]; +#ifdef BLENDER_GLSL + float obmat[4][4], viewmat[4][4], viewinvmat[4][4]; if(!mGPUMat || !mBound) return; @@ -142,7 +155,20 @@ void BL_BlenderShader::Update( const KX_MeshSlot & ms, RAS_IRasterizer* rasty ) model.getValue((float*)obmat); view.getValue((float*)viewmat); - GPU_material_bind_uniforms(mGPUMat, obmat, viewmat); + view.invert(); + view.getValue((float*)viewinvmat); + + GPU_material_bind_uniforms(mGPUMat, obmat, viewmat, viewinvmat); +#endif +} + +bool BL_BlenderShader::Equals(BL_BlenderShader *blshader) +{ +#ifdef BLENDER_GLSL + /* to avoid unneeded state switches */ + return (blshader && mGPUMat == blshader->mGPUMat && mLightLayer == blshader->mLightLayer); +#else + return true; #endif } diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h index 4cab0e644c3..b758d1a9cba 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.h +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -2,7 +2,7 @@ #ifndef __BL_GPUSHADER_H__ #define __BL_GPUSHADER_H__ -#if 0 +#ifdef BLENDER_GLSL #include "GPU_material.h" #endif @@ -12,7 +12,10 @@ #include "MT_Tuple3.h" #include "MT_Tuple4.h" +#include "RAS_IPolygonMaterial.h" + struct Material; +class BL_Material; #define BL_MAX_ATTRIB 16 @@ -23,22 +26,24 @@ struct Material; class BL_BlenderShader { private: -#if 0 +#ifdef BLENDER_GLSL GPUMaterial *mGPUMat; #endif bool mBound; + int mLightLayer; public: - BL_BlenderShader(struct Material *ma); + BL_BlenderShader(struct Material *ma, int lightlayer); virtual ~BL_BlenderShader(); const bool Ok()const; void SetProg(bool enable); - void ApplyShader(); - void SetTexCoords(class RAS_IRasterizer* ras); int GetAttribNum(); + void SetAttribs(class RAS_IRasterizer* ras, const BL_Material *mat); void Update(const class KX_MeshSlot & ms, class RAS_IRasterizer* rasty); + + bool Equals(BL_BlenderShader *blshader); }; #endif//__BL_GPUSHADER_H__ diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp index f5312ccd023..7e3d6984f19 100644 --- a/source/gameengine/Ketsji/BL_Material.cpp +++ b/source/gameengine/Ketsji/BL_Material.cpp @@ -105,7 +105,8 @@ void BL_Material::GetConversionRGB(unsigned int *nrgb) { *nrgb = rgb[3]; } -void BL_Material::SetConversionUV(MT_Point2 *nuv) { +void BL_Material::SetConversionUV(const STR_String& name, MT_Point2 *nuv) { + uvName = name; uv[0] = *nuv++; uv[1] = *nuv++; uv[2] = *nuv++; @@ -118,7 +119,8 @@ void BL_Material::GetConversionUV(MT_Point2 *nuv){ *nuv++ = uv[2]; *nuv = uv[3]; } -void BL_Material::SetConversionUV2(MT_Point2 *nuv) { +void BL_Material::SetConversionUV2(const STR_String& name, MT_Point2 *nuv) { + uv2Name = name; uv2[0] = *nuv++; uv2[1] = *nuv++; uv2[2] = *nuv++; diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index ddb6662830a..568f7e171de 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -83,13 +83,16 @@ public: MT_Point2 uv[4]; MT_Point2 uv2[4]; + STR_String uvName; + STR_String uv2Name; + void SetConversionRGB(unsigned int *rgb); void GetConversionRGB(unsigned int *rgb); - void SetConversionUV(MT_Point2 *uv); + void SetConversionUV(const STR_String& name, MT_Point2 *uv); void GetConversionUV(MT_Point2 *uv); - void SetConversionUV2(MT_Point2 *uv); + void SetConversionUV2(const STR_String& name, MT_Point2 *uv); void GetConversionUV2(MT_Point2 *uv); void SetSharedMaterial(bool v); diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 02b1ffd432a..0f445a9f32e 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -38,6 +38,8 @@ extern "C" { // ------------------------------------ #define spit(x) std::cout << x << std::endl; +BL_BlenderShader *KX_BlenderMaterial::mLastBlenderShader = NULL; + //static PyObject *gTextureDict = 0; KX_BlenderMaterial::KX_BlenderMaterial( @@ -126,32 +128,31 @@ void KX_BlenderMaterial::OnConstruction() // when material are reused between objects return; - if(mMaterial->glslmat) { + if(mMaterial->glslmat) SetBlenderGLSLShader(); - } - else { - // for each unique material... - int i; - for(i=0; inum_enabled; i++) { - if( mMaterial->mapping[i].mapping & USEENV ) { - if(!GLEW_ARB_texture_cube_map) { - spit("CubeMap textures not supported"); - continue; - } - if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) + + // for each unique material... + int i; + for(i=0; inum_enabled; i++) { + if( mMaterial->mapping[i].mapping & USEENV ) { + if(!GLEW_ARB_texture_cube_map) { + spit("CubeMap textures not supported"); + continue; + } + if(!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) + spit("unable to initialize image("<matname<< ", image will not be available"); + } + + else { + if( mMaterial->img[i] ) { + if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) spit("unable to initialize image("<matname<< ", image will not be available"); - } - - else { - if( mMaterial->img[i] ) { - if( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) - spit("unable to initialize image("<matname<< ", image will not be available"); - } + mMaterial->matname<< ", image will not be available"); } } } + mBlendFunc[0] =0; mBlendFunc[1] =0; mConstructed = true; @@ -168,7 +169,11 @@ void KX_BlenderMaterial::OnExit() } if( mBlenderShader ) { - mBlenderShader->SetProg(false); + if(mBlenderShader == mLastBlenderShader) { + mBlenderShader->SetProg(false); + mLastBlenderShader = NULL; + } + delete mBlenderShader; mBlenderShader = 0; } @@ -225,14 +230,23 @@ void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras { if( !enable || !mBlenderShader->Ok() ) { // frame cleanup. - mBlenderShader->SetProg(false); + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } BL_Texture::DisableAllTextures(); return; } - BL_Texture::DisableAllTextures(); - mBlenderShader->SetProg(true); - mBlenderShader->ApplyShader(); + if(!mBlenderShader->Equals(mLastBlenderShader)) { + BL_Texture::DisableAllTextures(); + + if(mLastBlenderShader) + mLastBlenderShader->SetProg(false); + + mBlenderShader->SetProg(true); + mLastBlenderShader= mBlenderShader; + } } void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras) @@ -298,7 +312,12 @@ KX_BlenderMaterial::ActivatShaders( // reset... if(tmp->mMaterial->IsShared()) cachingInfo =0; - + + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } + if (GetCachingInfo() != cachingInfo) { if (!cachingInfo) @@ -372,7 +391,7 @@ KX_BlenderMaterial::ActivateBlenderShaders( } ActivatGLMaterials(rasty); - mBlenderShader->SetTexCoords(rasty); + mBlenderShader->SetAttribs(rasty, mMaterial); } void @@ -382,6 +401,12 @@ KX_BlenderMaterial::ActivateMat( )const { KX_BlenderMaterial *tmp = const_cast(this); + + if(mLastBlenderShader) { + mLastBlenderShader->SetProg(false); + mLastBlenderShader= NULL; + } + if (GetCachingInfo() != cachingInfo) { if (!cachingInfo) tmp->setTexData( false,rasty ); @@ -460,17 +485,29 @@ KX_BlenderMaterial::Activate( return dopass; } +bool KX_BlenderMaterial::UsesLighting(RAS_IRasterizer *rasty) const +{ + if(!RAS_IPolyMaterial::UsesLighting(rasty)) + return false; + + if(mShader && mShader->Ok()); + else if(mBlenderShader && mBlenderShader->Ok()) + return false; + + return true; +} + void KX_BlenderMaterial::ActivateMeshSlot(const KX_MeshSlot & ms, RAS_IRasterizer* rasty) const { if(mShader && GLEW_ARB_shader_objects) mShader->Update(ms, rasty); - if(mBlenderShader && GLEW_ARB_shader_objects) + else if(mBlenderShader && GLEW_ARB_shader_objects) mBlenderShader->Update(ms, rasty); } void KX_BlenderMaterial::ActivatGLMaterials( RAS_IRasterizer* rasty )const { - if(!mBlenderShader) { + if(mShader || !mBlenderShader) { rasty->SetSpecularity( mMaterial->speccolor[0]*mMaterial->spec_f, mMaterial->speccolor[1]*mMaterial->spec_f, @@ -506,6 +543,7 @@ void KX_BlenderMaterial::ActivateTexGen(RAS_IRasterizer *ras) const ras->SetAttribNum(0); if(mShader && GLEW_ARB_shader_objects) { if(mShader->GetAttribute() == BL_Shader::SHD_TANGENT) { + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, 0); ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, 1); ras->SetAttribNum(2); } @@ -793,7 +831,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()") void KX_BlenderMaterial::SetBlenderGLSLShader(void) { if(!mBlenderShader) - mBlenderShader = new BL_BlenderShader(mMaterial->material); + mBlenderShader = new BL_BlenderShader(mMaterial->material, m_lightlayer); if(!mBlenderShader->Ok()) { delete mBlenderShader; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index 62e96b71937..bf6d2095e7c 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -94,6 +94,7 @@ private: BL_Material* mMaterial; BL_Shader* mShader; BL_BlenderShader* mBlenderShader; + static BL_BlenderShader *mLastBlenderShader; KX_Scene* mScene; BL_Texture mTextures[MAXTEX]; // texture array bool mUserDefBlend; @@ -106,6 +107,7 @@ private: void ActivatGLMaterials( RAS_IRasterizer* rasty )const; void ActivateTexGen( RAS_IRasterizer *ras ) const; + bool UsesLighting(RAS_IRasterizer *rasty) const; // message centers void setTexData( bool enable,RAS_IRasterizer *ras); diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index bde5e2cd0a2..2ac4f909077 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -405,34 +405,25 @@ void KX_GameObject::ResetDebugColor() SetDebugColor(0xff000000); } +void KX_GameObject::InitIPO(bool ipo_as_force, + bool ipo_add, + bool ipo_local) +{ + SGControllerList::iterator it = GetSGNode()->GetSGControllerList().begin(); + while (it != GetSGNode()->GetSGControllerList().end()) { + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_RESET, true); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_AS_FORCE, ipo_as_force); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_ADD, ipo_add); + (*it)->SetOption(SG_Controller::SG_CONTR_IPO_LOCAL, ipo_local); + it++; + } +} void KX_GameObject::UpdateIPO(float curframetime, - bool recurse, - bool ipo_as_force, - bool force_local) + bool recurse) { - - // The ipo-actuator needs a sumo reference... this is retrieved (unfortunately) - // by the iposgcontr itself... -// ipocontr->SetSumoReference(gameobj->GetSumoScene(), -// gameobj->GetSumoObject()); - - - // The ipo has to be treated as a force, and not a displacement! - // For this case, we send some settings to the controller. This - // may need some caching... - if (ipo_as_force) { - SGControllerList::iterator it = GetSGNode()->GetSGControllerList().begin(); - - while (it != GetSGNode()->GetSGControllerList().end()) { - (*it)->SetOption(SG_Controller::SG_CONTR_IPO_IPO_AS_FORCE, ipo_as_force); - (*it)->SetOption(SG_Controller::SG_CONTR_IPO_FORCES_ACT_LOCAL, force_local); - it++; - } - } - - // The rest is the 'normal' update procedure. + // just the 'normal' update procedure. GetSGNode()->SetSimulatedTime(curframetime,recurse); GetSGNode()->UpdateWorldData(curframetime); UpdateTransform(); @@ -581,7 +572,7 @@ void KX_GameObject::SetObjectColor(const MT_Vector4& rgbavec) m_objectColor = rgbavec; } -void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) +void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis, float fac) { MT_Matrix3x3 orimat; MT_Vector3 vect,ori,z,x,y; @@ -594,6 +585,11 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) cout << "alignAxisToVect() Error: Null vector!\n"; return; } + + if (fac<=0.0) { + return; + } + // normalize vect /= len; orimat = GetSGNode()->GetWorldOrientation(); @@ -603,7 +599,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); //pivot axis if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) //is the vector paralell to the pivot? ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); //change the pivot! - x = vect; + if (fac == 1.0) { + x = vect; + } else { + x = (vect * fac) + ((orimat * MT_Vector3(1.0, 0.0, 0.0)) * (1-fac)); + len = x.length(); + if (MT_fuzzyZero(len)) x = vect; + else x /= len; + } y = ori.cross(x); z = x.cross(y); break; @@ -611,7 +614,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) ori = MT_Vector3(orimat[0][2], orimat[1][2], orimat[2][2]); - y = vect; + if (fac == 1.0) { + y = vect; + } else { + y = (vect * fac) + ((orimat * MT_Vector3(0.0, 1.0, 0.0)) * (1-fac)); + len = y.length(); + if (MT_fuzzyZero(len)) y = vect; + else y /= len; + } z = ori.cross(y); x = y.cross(z); break; @@ -619,7 +629,14 @@ void KX_GameObject::AlignAxisToVect(const MT_Vector3& dir, int axis) ori = MT_Vector3(orimat[0][1], orimat[1][1], orimat[2][1]); if (MT_abs(vect.dot(ori)) > 1.0-3.0*MT_EPSILON) ori = MT_Vector3(orimat[0][0], orimat[1][0], orimat[2][0]); - z = vect; + if (fac == 1.0) { + z = vect; + } else { + z = (vect * fac) + ((orimat * MT_Vector3(0.0, 0.0, 1.0)) * (1-fac)); + len = z.length(); + if (MT_fuzzyZero(len)) z = vect; + else z /= len; + } x = ori.cross(z); y = z.cross(x); break; @@ -1289,7 +1306,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, return meshproxy; } } - return NULL; + Py_RETURN_NONE; } @@ -1395,13 +1412,14 @@ PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, { PyObject* pyvect; int axis = 2; //z axis is the default + float fac = 1.0; - if (PyArg_ParseTuple(args,"O|i",&pyvect,&axis)) + if (PyArg_ParseTuple(args,"O|if",&pyvect,&axis, &fac)) { MT_Vector3 vect; if (PyVecTo(pyvect, vect)) { - AlignAxisToVect(vect,axis); + AlignAxisToVect(vect,axis,fac); Py_RETURN_NONE; } } @@ -1590,14 +1608,18 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, other = static_cast(pyfrom); fromPoint = other->NodeGetWorldPosition(); } - - if (dist != 0.0f) - { + + if (dist != 0.0f) { MT_Vector3 toDir = toPoint-fromPoint; + if (MT_fuzzyZero(toDir.length2())) { + return Py_BuildValue("OOO", Py_None, Py_None, Py_None); + } toDir.normalize(); toPoint = fromPoint + (dist) * toDir; + } else if (MT_fuzzyZero((toPoint-fromPoint).length2())) { + return Py_BuildValue("OOO", Py_None, Py_None, Py_None); } - + MT_Point3 resultPoint; MT_Vector3 resultNormal; PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment(); diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 5e44a36515d..ddbf863aa1a 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -278,7 +278,8 @@ public: void AlignAxisToVect( const MT_Vector3& vect, - int axis = 2 + int axis = 2, + float fac = 1.0 ); /** @@ -489,15 +490,23 @@ public: UpdateNonDynas( ); + /** + * Function to set IPO option at start of IPO + */ + void + InitIPO( + bool ipo_as_force, + bool ipo_add, + bool ipo_local + ); + /** * Odd function to update an ipo. ??? */ void UpdateIPO( float curframetime, - bool recurse, - bool ipo_as_force, - bool force_ipo_local + bool recurse ); /** * Updates Material Ipo data diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.cpp b/source/gameengine/Ketsji/KX_IPO_SGController.cpp index 5303e9a9e85..d3aa924665e 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.cpp +++ b/source/gameengine/Ketsji/KX_IPO_SGController.cpp @@ -55,7 +55,8 @@ typedef unsigned long uint_ptr; // start on another frame, the 1.0 should change. KX_IpoSGController::KX_IpoSGController() : m_ipo_as_force(false), - m_force_ipo_acts_local(false), + m_ipo_add(false), + m_ipo_local(false), m_modified(true), m_ipo_start_initialized(false), m_ipotime(1.0) @@ -75,8 +76,23 @@ void KX_IpoSGController::SetOption( m_ipo_as_force = (value != 0); m_modified = true; break; - case SG_CONTR_IPO_FORCES_ACT_LOCAL: - m_force_ipo_acts_local = (value != 0); + case SG_CONTR_IPO_IPO_ADD: + m_ipo_add = (value != 0); + m_modified = true; + break; + case SG_CONTR_IPO_RESET: + if (m_ipo_start_initialized && value) { + m_ipo_start_initialized = false; + m_modified = true; + } + break; + case SG_CONTR_IPO_LOCAL: + if (value/* && ((SG_Node*)m_pObject)->GetSGParent() == NULL*/) { + // only accept local Ipo if the object has no parent + m_ipo_local = true; + } else { + m_ipo_local = false; + } m_modified = true; break; default: @@ -129,15 +145,19 @@ bool KX_IpoSGController::Update(double currentTime) { if (m_game_object && ob) { - m_game_object->GetPhysicsController()->ApplyForce(m_force_ipo_acts_local ? + m_game_object->GetPhysicsController()->ApplyForce(m_ipo_local ? ob->GetWorldOrientation() * m_ipo_xform.GetPosition() : m_ipo_xform.GetPosition(), false); } } else { - //by default, leave object as it stands - MT_Point3 newPosition = ob->GetLocalPosition(); + // Local ipo should be defined with the object position at (0,0,0) + // Local transform is applied to the object based on initial position + MT_Point3 newPosition(0.0,0.0,0.0); + + if (!m_ipo_add) + newPosition = ob->GetLocalPosition(); //apply separate IPO channels if there is any data in them //Loc and dLoc act by themselves or are additive //LocX and dLocX @@ -145,23 +165,28 @@ bool KX_IpoSGController::Update(double currentTime) newPosition[0] = (m_ipo_channels_active[OB_DLOC_X] ? m_ipo_xform.GetPosition()[0] + m_ipo_xform.GetDeltaPosition()[0] : m_ipo_xform.GetPosition()[0]); } else if (m_ipo_channels_active[OB_DLOC_X] && m_ipo_start_initialized) { - newPosition[0] = (m_ipo_start_point[0] + m_ipo_xform.GetDeltaPosition()[0]); + newPosition[0] = (((!m_ipo_add)?m_ipo_start_point[0]:0.0) + m_ipo_xform.GetDeltaPosition()[0]); } //LocY and dLocY if (m_ipo_channels_active[OB_LOC_Y]) { newPosition[1] = (m_ipo_channels_active[OB_DLOC_Y] ? m_ipo_xform.GetPosition()[1] + m_ipo_xform.GetDeltaPosition()[1] : m_ipo_xform.GetPosition()[1]); } else if (m_ipo_channels_active[OB_DLOC_Y] && m_ipo_start_initialized) { - newPosition[1] = (m_ipo_start_point[1] + m_ipo_xform.GetDeltaPosition()[1]); + newPosition[1] = (((!m_ipo_add)?m_ipo_start_point[1]:0.0) + m_ipo_xform.GetDeltaPosition()[1]); } //LocZ and dLocZ if (m_ipo_channels_active[OB_LOC_Z]) { newPosition[2] = (m_ipo_channels_active[OB_DLOC_Z] ? m_ipo_xform.GetPosition()[2] + m_ipo_xform.GetDeltaPosition()[2] : m_ipo_xform.GetPosition()[2]); } else if (m_ipo_channels_active[OB_DLOC_Z] && m_ipo_start_initialized) { - newPosition[2] = (m_ipo_start_point[2] + m_ipo_xform.GetDeltaPosition()[2]); + newPosition[2] = (((!m_ipo_add)?m_ipo_start_point[2]:0.0) + m_ipo_xform.GetDeltaPosition()[2]); + } + if (m_ipo_add) { + if (m_ipo_local) + newPosition = m_ipo_start_point + m_ipo_start_scale*(m_ipo_start_orient*newPosition); + else + newPosition = m_ipo_start_point + newPosition; } - ob->SetLocalPosition(newPosition); } } @@ -170,21 +195,23 @@ bool KX_IpoSGController::Update(double currentTime) if (m_ipo_as_force) { if (m_game_object && ob) { - m_game_object->ApplyTorque(m_force_ipo_acts_local ? + m_game_object->ApplyTorque(m_ipo_local ? ob->GetWorldOrientation() * m_ipo_xform.GetEulerAngles() : m_ipo_xform.GetEulerAngles(), false); } } else { - double yaw, pitch, roll; //final Euler angles + double yaw=0, pitch=0, roll=0; //final Euler angles double tempYaw=0, tempPitch=0, tempRoll=0; //temp holders - ob->GetLocalOrientation().getEuler(yaw, pitch, roll); + if (!m_ipo_add) + ob->GetLocalOrientation().getEuler(yaw, pitch, roll); //RotX and dRotX if (m_ipo_channels_active[OB_ROT_X]) { yaw = (m_ipo_channels_active[OB_DROT_X] ? (m_ipo_xform.GetEulerAngles()[0] + m_ipo_xform.GetDeltaEulerAngles()[0]) : m_ipo_xform.GetEulerAngles()[0] ); } else if (m_ipo_channels_active[OB_DROT_X] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); yaw = tempYaw + m_ipo_xform.GetDeltaEulerAngles()[0]; } @@ -193,7 +220,8 @@ bool KX_IpoSGController::Update(double currentTime) pitch = (m_ipo_channels_active[OB_DROT_Y] ? (m_ipo_xform.GetEulerAngles()[1] + m_ipo_xform.GetDeltaEulerAngles()[1]) : m_ipo_xform.GetEulerAngles()[1] ); } else if (m_ipo_channels_active[OB_DROT_Y] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); pitch = tempPitch + m_ipo_xform.GetDeltaEulerAngles()[1]; } @@ -202,23 +230,34 @@ bool KX_IpoSGController::Update(double currentTime) roll = (m_ipo_channels_active[OB_DROT_Z] ? (m_ipo_xform.GetEulerAngles()[2] + m_ipo_xform.GetDeltaEulerAngles()[2]) : m_ipo_xform.GetEulerAngles()[2] ); } else if (m_ipo_channels_active[OB_DROT_Z] && m_ipo_start_initialized) { - m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); + if (!m_ipo_add) + m_ipo_start_orient.getEuler(tempYaw, tempPitch, tempRoll); roll = tempRoll + m_ipo_xform.GetDeltaEulerAngles()[2]; } - - ob->SetLocalOrientation(MT_Vector3(yaw, pitch, roll)); + if (m_ipo_add) { + MT_Matrix3x3 rotation(MT_Vector3(yaw, pitch, roll)); + if (m_ipo_local) + rotation = m_ipo_start_orient * rotation; + else + rotation = rotation * m_ipo_start_orient; + ob->SetLocalOrientation(rotation); + } else { + ob->SetLocalOrientation(MT_Vector3(yaw, pitch, roll)); + } } } //modifies scale? if (m_ipo_channels_active[OB_SIZE_X] || m_ipo_channels_active[OB_SIZE_Y] || m_ipo_channels_active[OB_SIZE_Z] || m_ipo_channels_active[OB_DSIZE_X] || m_ipo_channels_active[OB_DSIZE_Y] || m_ipo_channels_active[OB_DSIZE_Z]) { //default is no scale change - MT_Vector3 newScale = ob->GetLocalScale(); + MT_Vector3 newScale(1.0,1.0,1.0); + if (!m_ipo_add) + newScale = ob->GetLocalScale(); if (m_ipo_channels_active[OB_SIZE_X]) { newScale[0] = (m_ipo_channels_active[OB_DSIZE_X] ? (m_ipo_xform.GetScaling()[0] + m_ipo_xform.GetDeltaScaling()[0]) : m_ipo_xform.GetScaling()[0]); } else if (m_ipo_channels_active[OB_DSIZE_X] && m_ipo_start_initialized) { - newScale[0] = (m_ipo_xform.GetDeltaScaling()[0] + m_ipo_start_scale[0]); + newScale[0] = (m_ipo_xform.GetDeltaScaling()[0] + ((!m_ipo_add)?m_ipo_start_scale[0]:0.0)); } //RotY dRotY @@ -226,7 +265,7 @@ bool KX_IpoSGController::Update(double currentTime) newScale[1] = (m_ipo_channels_active[OB_DSIZE_Y] ? (m_ipo_xform.GetScaling()[1] + m_ipo_xform.GetDeltaScaling()[1]): m_ipo_xform.GetScaling()[1]); } else if (m_ipo_channels_active[OB_DSIZE_Y] && m_ipo_start_initialized) { - newScale[1] = (m_ipo_xform.GetDeltaScaling()[1] + m_ipo_start_scale[1]); + newScale[1] = (m_ipo_xform.GetDeltaScaling()[1] + ((!m_ipo_add)?m_ipo_start_scale[1]:0.0)); } //RotZ and dRotZ @@ -234,7 +273,11 @@ bool KX_IpoSGController::Update(double currentTime) newScale[2] = (m_ipo_channels_active[OB_DSIZE_Z] ? (m_ipo_xform.GetScaling()[2] + m_ipo_xform.GetDeltaScaling()[2]) : m_ipo_xform.GetScaling()[2]); } else if (m_ipo_channels_active[OB_DSIZE_Z] && m_ipo_start_initialized) { - newScale[2] = (m_ipo_xform.GetDeltaScaling()[2] + m_ipo_start_scale[2]); + newScale[2] = (m_ipo_xform.GetDeltaScaling()[2] + ((!m_ipo_add)?m_ipo_start_scale[2]:1.0)); + } + + if (m_ipo_add) { + newScale = m_ipo_start_scale * newScale; } ob->SetLocalScale(newScale); diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.h b/source/gameengine/Ketsji/KX_IPO_SGController.h index 7b5a151b41c..0bd8980f11c 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.h +++ b/source/gameengine/Ketsji/KX_IPO_SGController.h @@ -48,8 +48,11 @@ class KX_IpoSGController : public SG_Controller /** Interpret the ipo as a force rather than a displacement? */ bool m_ipo_as_force; - /** Ipo-as-force acts in local rather than in global coordinates? */ - bool m_force_ipo_acts_local; + /** Add Ipo curve to current loc/rot/scale */ + bool m_ipo_add; + + /** Ipo must be applied in local coordinate rather than in global coordinates (used for force and Add mode)*/ + bool m_ipo_local; /** Were settings altered since the last update? */ bool m_modified; diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index cf246342cf9..b7103f49aee 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -59,40 +59,6 @@ STR_String KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp"; /* ------------------------------------------------------------------------- */ /* Native functions */ /* ------------------------------------------------------------------------- */ -/** Another poltergeist? This seems to be a very transient class... */ -class CIpoAction : public CAction -{ - float m_curtime; - bool m_recurse; - KX_GameObject* m_gameobj; - bool m_ipo_as_force; - bool m_force_ipo_local; - -public: - CIpoAction(KX_GameObject* gameobj, - float curtime, - bool recurse, - bool ipo_as_force, - bool force_ipo_local) : - m_curtime(curtime) , - m_recurse(recurse), - m_gameobj(gameobj), - m_ipo_as_force(ipo_as_force), - m_force_ipo_local(force_ipo_local) - { - /* intentionally empty */ - }; - - virtual void Execute() const - { - m_gameobj->UpdateIPO( - m_curtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - }; - -}; KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, const STR_String& propname, @@ -101,7 +67,8 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, bool recurse, int acttype, bool ipo_as_force, - bool force_ipo_local, + bool ipo_add, + bool ipo_local, PyTypeObject* T) : SCA_IActuator(gameobj,T), m_bNegativeEvent(false), @@ -112,7 +79,8 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, m_direction(1), m_propname(propname), m_ipo_as_force(ipo_as_force), - m_force_ipo_local(force_ipo_local), + m_ipo_add(ipo_add), + m_ipo_local(ipo_local), m_type((IpoActType)acttype) { m_starttime = -2.0*fabs(m_endframe - m_startframe) - 1.0; @@ -160,7 +128,7 @@ bool KX_IpoActuator::ClampLocalTime() void KX_IpoActuator::SetStartTime(float curtime) { - float direction = m_startframe < m_endframe ? 1.0 : -1.0; + float direction = m_startframe < m_endframe ? 1.0f : -1.0f; curtime = curtime - KX_KetsjiEngine::GetSuspendedDelta(); if (m_direction > 0) @@ -195,31 +163,26 @@ bool KX_IpoActuator::Update(double curtime, bool frame) // maybe there are events for us in the queue ! bool bNegativeEvent = false; int numevents = 0; + bool bIpoStart = false; if (frame) { numevents = m_events.size(); - for (vector::iterator i=m_events.end(); !(i==m_events.begin());) - { - --i; - if ((*i)->GetNumber() == 0.0f) - bNegativeEvent = true; - - (*i)->Release(); - } - m_events.clear(); + bNegativeEvent = IsNegativeEvent(); + RemoveAllEvents(); } - double start_smaller_then_end = ( m_startframe < m_endframe ? 1.0 : -1.0); + float start_smaller_then_end = ( m_startframe < m_endframe ? 1.0f : -1.0f); bool result=true; if (!bNegativeEvent) { - if (m_starttime < -2.0*start_smaller_then_end*(m_endframe - m_startframe)) + if (m_starttime < -2.0f*start_smaller_then_end*(m_endframe - m_startframe)) { // start for all Ipo, initial start for LOOP_STOP m_starttime = curtime - KX_KetsjiEngine::GetSuspendedDelta(); m_bIpoPlaying = true; + bIpoStart = true; } } @@ -230,7 +193,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame) { // Check if playing forwards. result = ! finished - if (start_smaller_then_end > 0.0) + if (start_smaller_then_end > 0.f) result = (m_localtime < m_endframe && m_bIpoPlaying); else result = (m_localtime > m_endframe && m_bIpoPlaying); @@ -241,14 +204,10 @@ bool KX_IpoActuator::Update(double curtime, bool frame) /* Perform clamping */ ClampLocalTime(); - - CIpoAction ipoaction( - (KX_GameObject*)GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); } else { m_localtime=m_startframe; @@ -270,13 +229,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) m_direction = -m_direction; } - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + if (bIpoStart && m_direction > 0) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } case KX_ACT_IPO_FLIPPER: @@ -299,14 +254,10 @@ bool KX_IpoActuator::Update(double curtime, bool frame) if (ClampLocalTime() && m_localtime == m_startframe) result = false; - - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } @@ -352,8 +303,12 @@ bool KX_IpoActuator::Update(double curtime, bool frame) if (!m_bNegativeEvent){ /* Perform wraparound */ SetLocalTime(curtime); - m_localtime = m_startframe + fmod(m_localtime, m_startframe - m_endframe); + if (start_smaller_then_end > 0.f) + m_localtime = m_startframe + fmod(m_localtime - m_startframe, m_endframe - m_startframe); + else + m_localtime = m_startframe - fmod(m_startframe - m_localtime, m_startframe - m_endframe); SetStartTime(curtime); + bIpoStart = true; } else { @@ -365,13 +320,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) } } - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); + if (m_bIpoPlaying && bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); break; } @@ -391,14 +342,9 @@ bool KX_IpoActuator::Update(double curtime, bool frame) { m_localtime = propval->GetNumber(); - CIpoAction ipoaction( - (KX_GameObject*) GetParent(), - m_localtime, - m_recurse, - m_ipo_as_force, - m_force_ipo_local); - GetParent()->Execute(ipoaction); - + if (bIpoStart) + ((KX_GameObject*)GetParent())->InitIPO(m_ipo_as_force, m_ipo_add, m_ipo_local); + ((KX_GameObject*)GetParent())->UpdateIPO(m_localtime,m_recurse); } else { result = false; @@ -493,6 +439,10 @@ PyMethodDef KX_IpoActuator::Methods[] = { METH_VARARGS, SetIpoAsForce_doc}, {"getIpoAsForce", (PyCFunction) KX_IpoActuator::sPyGetIpoAsForce, METH_VARARGS, GetIpoAsForce_doc}, + {"setIpoAdd", (PyCFunction) KX_IpoActuator::sPySetIpoAdd, + METH_VARARGS, SetIpoAdd_doc}, + {"getIpoAdd", (PyCFunction) KX_IpoActuator::sPyGetIpoAdd, + METH_VARARGS, GetIpoAdd_doc}, {"setType", (PyCFunction) KX_IpoActuator::sPySetType, METH_VARARGS, SetType_doc}, {"getType", (PyCFunction) KX_IpoActuator::sPyGetType, @@ -512,11 +462,11 @@ PyObject* KX_IpoActuator::_getattr(const STR_String& attr) { /* set --------------------------------------------------------------------- */ char KX_IpoActuator::Set_doc[] = -"set(mode, startframe, endframe, force?)\n" -"\t - mode: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n" +"set(type, startframe, endframe, mode?)\n" +"\t - type: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n" "\t - startframe: first frame to use (int)\n" "\t - endframe : last frame to use (int)\n" -"\t - force? : interpret this ipo as a force? (KX_TRUE, KX_FALSE)" +"\t - mode? : special mode (0=normal, 1=interpret location as force, 2=additive)" "\tSet the properties of the actuator.\n"; PyObject* KX_IpoActuator::PySet(PyObject* self, PyObject* args, @@ -543,7 +493,8 @@ PyObject* KX_IpoActuator::PySet(PyObject* self, m_type = modenum; m_startframe = startFrame; m_endframe = stopFrame; - m_ipo_as_force = PyArgToBool(forceToggle); + m_ipo_as_force = forceToggle == 1; + m_ipo_add = forceToggle == 2; break; default: ; /* error */ @@ -641,6 +592,8 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, } m_ipo_as_force = PyArgToBool(boolArg); + if (m_ipo_as_force) + m_ipo_add = false; Py_Return; } @@ -654,6 +607,36 @@ PyObject* KX_IpoActuator::PyGetIpoAsForce(PyObject* self, return BoolToPyArg(m_ipo_as_force); } +/* 6. setIpoAsForce: */ +char KX_IpoActuator::SetIpoAdd_doc[] = +"setIpoAdd(add?)\n" +"\t - add? : add flag (KX_TRUE, KX_FALSE)\n" +"\tSet whether to interpret the ipo as additive rather than absolute.\n"; +PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, + PyObject* args, + PyObject* kwds) { + int boolArg; + + if (!PyArg_ParseTuple(args, "i", &boolArg)) { + return NULL; + } + + m_ipo_add = PyArgToBool(boolArg); + if (m_ipo_add) + m_ipo_as_force = false; + + Py_Return; +} +/* 7. getIpoAsForce: */ +char KX_IpoActuator::GetIpoAdd_doc[] = +"getIpoAsAdd()\n" +"\tReturns whether to interpret the ipo as additive rather than absolute.\n"; +PyObject* KX_IpoActuator::PyGetIpoAdd(PyObject* self, + PyObject* args, + PyObject* kwds) { + return BoolToPyArg(m_ipo_add); +} + /* 8. setType: */ char KX_IpoActuator::SetType_doc[] = "setType(mode)\n" @@ -701,7 +684,7 @@ PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* self, return NULL; } - m_force_ipo_local = PyArgToBool(boolArg); + m_ipo_local = PyArgToBool(boolArg); Py_Return; } @@ -713,7 +696,7 @@ char KX_IpoActuator::GetForceIpoActsLocal_doc[] = PyObject* KX_IpoActuator::PyGetForceIpoActsLocal(PyObject* self, PyObject* args, PyObject* kwds) { - return BoolToPyArg(m_force_ipo_local); + return BoolToPyArg(m_ipo_local); } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 79e8daa3f87..ae554fb0fce 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -75,8 +75,11 @@ protected: /** Interpret the ipo as a force? */ bool m_ipo_as_force; - /** Apply a force-ipo locally? */ - bool m_force_ipo_local; + /** Add Ipo curve to current loc/rot/scale */ + bool m_ipo_add; + + /** The Ipo curve is applied in local coordinates */ + bool m_ipo_local; bool m_bIpoPlaying; @@ -113,7 +116,8 @@ public: bool recurse, int acttype, bool ipo_as_force, - bool force_ipo_local, + bool ipo_add, + bool ipo_local, PyTypeObject* T=&Type); virtual ~KX_IpoActuator() {}; @@ -144,6 +148,8 @@ public: KX_PYMETHOD_DOC(KX_IpoActuator,GetEnd); KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAsForce); KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAsForce); + KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAdd); + KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAdd); KX_PYMETHOD_DOC(KX_IpoActuator,SetType); KX_PYMETHOD_DOC(KX_IpoActuator,GetType); KX_PYMETHOD_DOC(KX_IpoActuator,SetForceIpoActsLocal); diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 56a06786679..20187a193ba 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -55,6 +55,7 @@ #include "KX_Scene.h" #include "MT_CmMatrix4x4.h" #include "KX_Camera.h" +#include "KX_Light.h" #include "KX_PythonInit.h" #include "KX_PyConstraintBinding.h" #include "PHY_IPhysicsEnvironment.h" @@ -614,6 +615,9 @@ void KX_KetsjiEngine::Render() // pass the scene's worldsettings to the rasterizer SetWorldSettings(scene->GetWorldInfo()); + // shadow buffers + RenderShadowBuffers(scene); + // Avoid drawing the scene with the active camera twice when it's viewport is enabled if(cam && !cam->GetViewport()) { @@ -885,8 +889,48 @@ void KX_KetsjiEngine::SetupRenderFrame(KX_Scene *scene, KX_Camera* cam) viewport.GetTop() ); -} +} +void KX_KetsjiEngine::RenderShadowBuffers(KX_Scene *scene) +{ + CListValue *lightlist = scene->GetLightList(); + int i, drawmode; + + for(i=0; iGetCount(); i++) { + KX_LightObject *light = (KX_LightObject*)lightlist->GetValue(i); + + light->Update(); + + if(m_drawingmode == RAS_IRasterizer::KX_TEXTURED && light->HasShadowBuffer()) { + /* make temporary camera */ + RAS_CameraData camdata = RAS_CameraData(); + KX_Camera *cam = new KX_Camera(scene, scene->m_callbacks, camdata, false); + cam->SetName("__shadow__cam__"); + + MT_Transform camtrans; + + /* switch drawmode for speed */ + drawmode = m_rasterizer->GetDrawingMode(); + m_rasterizer->SetDrawingMode(RAS_IRasterizer::KX_SHADOW); + + /* binds framebuffer object, sets up camera .. */ + light->BindShadowBuffer(m_rasterizer, cam, camtrans); + + /* update scene */ + scene->UpdateMeshTransformations(); + scene->CalculateVisibleMeshes(m_rasterizer, cam, light->GetShadowLayer()); + + /* render */ + m_rasterizer->ClearDepthBuffer(); + scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); + + /* unbind framebuffer object, restore drawmode, free camera */ + light->UnbindShadowBuffer(m_rasterizer); + m_rasterizer->SetDrawingMode(drawmode); + cam->Release(); + } + } +} // update graphics void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam) diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 4c09bc3fcd5..77b69ec2d9e 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -179,6 +179,7 @@ private: void RenderFrame(KX_Scene* scene, KX_Camera* cam); void PostRenderFrame(); void RenderDebugProperties(); + void RenderShadowBuffers(KX_Scene *scene); void SetBackGround(KX_WorldInfo* worldinfo); void SetWorldSettings(KX_WorldInfo* worldinfo); void DoSound(KX_Scene* scene); diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 7decc5bc769..4e3d6180d22 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -36,14 +36,20 @@ #endif #include "KX_Light.h" +#include "KX_Camera.h" +#include "RAS_IRasterizer.h" #include "RAS_IRenderTools.h" #include "KX_PyMath.h" +#ifdef BLENDER_GLSL +#include "GPU_material.h" +#endif KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, class RAS_IRenderTools* rendertools, const RAS_LightObject& lightobj, + struct GPULamp *gpulamp, PyTypeObject* T ) : @@ -53,12 +59,12 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, m_lightobj = lightobj; m_lightobj.m_worldmatrix = GetOpenGLMatrixPtr(); m_rendertools->AddLight(&m_lightobj); + m_gpulamp = gpulamp; }; KX_LightObject::~KX_LightObject() { - m_rendertools->RemoveLight(&m_lightobj); } @@ -78,6 +84,78 @@ CValue* KX_LightObject::GetReplica() return replica; } +void KX_LightObject::Update() +{ +#ifdef BLENDER_GLSL + if(m_gpulamp) { + float obmat[4][4]; + double *dobmat = GetOpenGLMatrixPtr()->getPointer(); + + for(int i=0; i<4; i++) + for(int j=0; j<4; j++, dobmat++) + obmat[i][j] = (float)*dobmat; + + GPU_lamp_update(m_gpulamp, obmat); + } +#endif +} + +bool KX_LightObject::HasShadowBuffer() +{ +#ifdef BLENDER_GLSL + return (m_gpulamp && GPU_lamp_has_shadow_buffer(m_gpulamp)); +#else + return false; +#endif +} + +int KX_LightObject::GetShadowLayer() +{ +#ifdef BLENDER_GLSL + if(m_gpulamp) + return GPU_lamp_shadow_layer(m_gpulamp); + else +#endif + return 0; +} + +void KX_LightObject::BindShadowBuffer(RAS_IRasterizer *ras, KX_Camera *cam, MT_Transform& camtrans) +{ +#ifdef BLENDER_GLSL + float viewmat[4][4], winmat[4][4]; + int winsize; + + /* bind framebuffer */ + GPU_lamp_shadow_buffer_bind(m_gpulamp, viewmat, &winsize, winmat); + + /* setup camera transformation */ + MT_Matrix4x4 modelviewmat((float*)viewmat); + MT_Matrix4x4 projectionmat((float*)winmat); + + MT_Transform trans = MT_Transform((float*)viewmat); + camtrans.invert(trans); + + cam->SetModelviewMatrix(modelviewmat); + cam->SetProjectionMatrix(projectionmat); + + cam->NodeSetLocalPosition(camtrans.getOrigin()); + cam->NodeSetLocalOrientation(camtrans.getBasis()); + cam->NodeUpdateGS(0,true); + + /* setup rasterizer transformations */ + ras->SetProjectionMatrix(projectionmat); + ras->SetViewMatrix(modelviewmat, cam->NodeGetWorldPosition(), + cam->GetCameraLocation(), cam->GetCameraOrientation()); +#endif +} + +void KX_LightObject::UnbindShadowBuffer(RAS_IRasterizer *ras) +{ +#ifdef BLENDER_GLSL + GPU_lamp_shadow_buffer_unbind(m_gpulamp); +#endif +} + PyObject* KX_LightObject::_getattr(const STR_String& attr) { if (attr == "layer") diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index 236d3e4e12e..62eb26c61a8 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -32,19 +32,33 @@ #include "RAS_LightObject.h" #include "KX_GameObject.h" +struct GPULamp; +class KX_Camera; +class RAS_IRasterizer; +class RAS_IRenderTools; +class MT_Transform; + class KX_LightObject : public KX_GameObject { Py_Header; protected: RAS_LightObject m_lightobj; class RAS_IRenderTools* m_rendertools; //needed for registering and replication of lightobj + struct GPULamp *m_gpulamp; static char doc[]; public: - KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, PyTypeObject *T = &Type); + KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,class RAS_IRenderTools* rendertools,const struct RAS_LightObject& lightobj, struct GPULamp *gpulamp, PyTypeObject *T = &Type); virtual ~KX_LightObject(); virtual CValue* GetReplica(); RAS_LightObject* GetLightData() { return &m_lightobj;} + + /* GLSL shadow */ + bool HasShadowBuffer(); + int GetShadowLayer(); + void BindShadowBuffer(class RAS_IRasterizer *ras, class KX_Camera *cam, class MT_Transform& camtrans); + void UnbindShadowBuffer(class RAS_IRasterizer *ras); + void Update(); virtual PyObject* _getattr(const STR_String& attr); /* lens, near, far, projection_matrix */ virtual int _setattr(const STR_String& attr, PyObject *pyvalue); diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index 5c433cb68b1..8b379bcd44f 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -77,6 +77,12 @@ CValue* KX_ParentActuator::GetReplica() bool KX_ParentActuator::Update() { + bool bNegativeEvent = IsNegativeEvent(); + RemoveAllEvents(); + + if (bNegativeEvent) + return false; // do nothing on negative events + KX_GameObject *obj = (KX_GameObject*) GetParent(); KX_Scene *scene = PHY_GetActiveScene(); switch (m_mode) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 337b1af6df7..065800379d8 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -601,6 +601,8 @@ void KX_Scene::ReplicateLogic(KX_GameObject* newobj) } } } + // ready to set initial state + newobj->ResetState(); } @@ -886,6 +888,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) else if (bHasArmature) { BL_SkinDeformer* skinDeformer = new BL_SkinDeformer( + newobj, oldblendobj, blendobj, static_cast(mesh), true, @@ -897,7 +900,7 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj) else if (bHasDvert) { BL_MeshDeformer* meshdeformer = new BL_MeshDeformer( - oldblendobj, static_cast(mesh) + newobj, oldblendobj, static_cast(mesh) ); newobj->m_pDeformer = meshdeformer; } @@ -1002,12 +1005,13 @@ void KX_Scene::UpdateMeshTransformations() } } -void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam) +void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam, int layer) { int intersect = KX_Camera::INTERSECT; KX_GameObject *gameobj = node->Client()?(KX_GameObject*) node->Client()->GetSGClientObject():NULL; - bool dotest = (gameobj && gameobj->GetVisible()) || node->Left() || node->Right(); - + bool visible = (gameobj && gameobj->GetVisible() && (!layer || (gameobj->GetLayer() & layer))); + bool dotest = visible || node->Left() || node->Right(); + /* If the camera is inside the box, assume intersect. */ if (dotest && !node->inside( cam->NodeGetWorldPosition())) { @@ -1031,19 +1035,19 @@ void KX_Scene::MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera* cam break; case KX_Camera::INTERSECT: if (gameobj) - MarkVisible(rasty, gameobj,cam); + MarkVisible(rasty, gameobj, cam, layer); if (node->Left()) - MarkVisible(node->Left(), rasty,cam); + MarkVisible(node->Left(), rasty, cam, layer); if (node->Right()) - MarkVisible(node->Right(), rasty,cam); + MarkVisible(node->Right(), rasty, cam, layer); break; case KX_Camera::INSIDE: - MarkSubTreeVisible(node, rasty, true,cam); + MarkSubTreeVisible(node, rasty, true, cam, layer); break; } } -void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible,KX_Camera* cam) +void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera* cam, int layer) { if (node->Client()) { @@ -1066,16 +1070,23 @@ void KX_Scene::MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool vi } } if (node->Left()) - MarkSubTreeVisible(node->Left(), rasty, visible,cam); + MarkSubTreeVisible(node->Left(), rasty, visible, cam, layer); if (node->Right()) - MarkSubTreeVisible(node->Right(), rasty, visible,cam); + MarkSubTreeVisible(node->Right(), rasty, visible, cam, layer); } -void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Camera* cam) +void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Camera* cam,int layer) { // User (Python/Actuator) has forced object invisible... if (!gameobj->GetVisible()) return; + + // Shadow lamp layers + if(layer && !(gameobj->GetLayer() & layer)) { + gameobj->MarkVisible(false); + return; + } + // If Frustum culling is off, the object is always visible. bool vis = !cam->GetFrustumCulling(); @@ -1125,20 +1136,20 @@ void KX_Scene::MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj,KX_Cam } } -void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam) +void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam, int layer) { // FIXME: When tree is operational #if 1 // do this incrementally in the future for (int i = 0; i < m_objectlist->GetCount(); i++) { - MarkVisible(rasty, static_cast(m_objectlist->GetValue(i)), cam); + MarkVisible(rasty, static_cast(m_objectlist->GetValue(i)), cam, layer); } #else if (cam->GetFrustumCulling()) - MarkVisible(m_objecttree, rasty, cam); + MarkVisible(m_objecttree, rasty, cam, layer); else - MarkSubTreeVisible(m_objecttree, rasty, true, cam); + MarkSubTreeVisible(m_objecttree, rasty, true, cam, layer); #endif } diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 733df2f69a1..28dee1b5893 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -260,9 +260,9 @@ protected: /** * Visibility testing functions. */ - void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera*cam); - void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera*cam); - void MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj, KX_Camera*cam); + void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty, KX_Camera*cam,int layer=0); + void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible, KX_Camera*cam,int layer=0); + void MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj, KX_Camera*cam, int layer=0); double m_suspendedtime; double m_suspendeddelta; @@ -483,7 +483,7 @@ public: void SetNetworkScene(NG_NetworkScene *newScene); void SetWorldInfo(class KX_WorldInfo* wi); KX_WorldInfo* GetWorldInfo(); - void CalculateVisibleMeshes(RAS_IRasterizer* rasty, KX_Camera *cam); + void CalculateVisibleMeshes(RAS_IRasterizer* rasty, KX_Camera *cam, int layer=0); void UpdateMeshTransformations(); KX_Camera* GetpCamera(); SND_Scene* GetSoundScene(); diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.cpp b/source/gameengine/Ketsji/KX_TouchEventManager.cpp index 80ee15a9475..423543eef5c 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.cpp +++ b/source/gameengine/Ketsji/KX_TouchEventManager.cpp @@ -137,14 +137,18 @@ void KX_TouchEventManager::NextFrame() // KX_GameObject* gameOb1 = ctrl1->getClientInfo(); KX_ClientObjectInfo *client_info = static_cast(ctrl1->getNewClientInfo()); - list::iterator sit; - for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) - static_cast(*sit)->NewHandleCollision((*cit).first, (*cit).second, NULL); - + if (client_info) { + for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) { + static_cast(*sit)->NewHandleCollision((*cit).first, (*cit).second, NULL); + } + } client_info = static_cast((*cit).second->getNewClientInfo()); - for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) - static_cast(*sit)->NewHandleCollision((*cit).second, (*cit).first, NULL); + if (client_info) { + for ( sit = client_info->m_sensors.begin(); sit != client_info->m_sensors.end(); ++sit) { + static_cast(*sit)->NewHandleCollision((*cit).second, (*cit).first, NULL); + } + } } m_newCollisions.clear(); diff --git a/source/gameengine/PyDoc/BL_ActionActuator.py b/source/gameengine/PyDoc/BL_ActionActuator.py index 41f41080c31..d56888cde80 100644 --- a/source/gameengine/PyDoc/BL_ActionActuator.py +++ b/source/gameengine/PyDoc/BL_ActionActuator.py @@ -86,6 +86,14 @@ class BL_ActionActuator(SCA_IActuator): @param mode: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND @type mode: integer """ + + def setContinue(cont): + """ + Set the actions continue option True or False. see getContinue. + + @param cont: The continue option. + @type cont: bool + """ def getType(): """ @@ -94,6 +102,13 @@ class BL_ActionActuator(SCA_IActuator): @rtype: integer @return: KX_ACTIONACT_PLAY, KX_ACTIONACT_PROPERTY, KX_ACTIONACT_FLIPPER, KX_ACTIONACT_LOOPSTOP, KX_ACTIONACT_LOOPEND """ + + def getContinue(): + """ + When True, the action will always play from where last left off, otherwise negative events to this actuator will reset it to its start frame. + + @rtype: bool + """ def getAction(): """ diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp index 50df1a1e2ea..b4492ca03a9 100644 --- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp +++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp @@ -109,7 +109,7 @@ void RAS_BucketManager::RenderAlphaBuckets( // it is needed for compatibility. rasty->SetDepthMask(RAS_IRasterizer::KX_DEPTHMASK_DISABLED); - int drawingmode; + RAS_IRasterizer::DrawMode drawingmode; std::multiset< alphamesh, backtofront>::iterator msit = alphameshset.begin(); for (; msit != alphameshset.end(); ++msit) { diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index bff98abe058..cb10ba6bf37 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -27,6 +27,7 @@ */ #include "RAS_IPolygonMaterial.h" +#include "RAS_IRasterizer.h" #ifdef HAVE_CONFIG_H #include @@ -148,4 +149,19 @@ const unsigned int RAS_IPolyMaterial::GetFlag() const return m_flag; } +bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const +{ + bool dolights = false; + + if(m_flag & RAS_BLENDERMAT) + dolights = (m_flag &RAS_MULTILIGHT)!=0; + else if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID); + else if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW); + else + dolights = (m_drawingmode & 16)!=0; + + return dolights; +} + unsigned int RAS_IPolyMaterial::m_newpolymatid = 0; + diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h index 09824f6975c..d2d1dba99d9 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h @@ -140,6 +140,8 @@ public: const STR_String& GetMaterialName() const; const STR_String& GetTextureName() const; const unsigned int GetFlag() const; + + virtual bool UsesLighting(RAS_IRasterizer *rasty) const; /* * PreCalculate texture gen diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h index dbedc492afa..d4a9177a85d 100644 --- a/source/gameengine/Rasterizer/RAS_IRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h @@ -33,12 +33,23 @@ #pragma warning (disable:4786) #endif +#include "STR_HashedString.h" + #include "MT_CmMatrix4x4.h" #include "MT_Matrix4x4.h" +#include "RAS_TexVert.h" + +#include +using namespace std; + class RAS_ICanvas; class RAS_IPolyMaterial; -#include "RAS_MaterialBucket.h" + +typedef vector KX_IndexArray; +typedef vector KX_VertexArray; +typedef vector< KX_VertexArray* > vecVertexArray; +typedef vector< KX_IndexArray* > vecIndexArrays; /** * 3D rendering device context interface. @@ -62,7 +73,18 @@ public: KX_WIREFRAME, KX_SOLID, KX_SHADED, - KX_TEXTURED + KX_TEXTURED, + KX_SHADOW + }; + + /** + * Drawing modes + */ + + enum DrawMode { + KX_MODE_LINES = 1, + KX_MODE_TRIANGLES, + KX_MODE_QUADS }; /** @@ -111,6 +133,7 @@ public: RAS_TEXCO_NORM, //< Normal coordinates RAS_TEXTANGENT, //< RAS_TEXCO_UV2, //< + RAS_TEXCO_VCOL, //< Vertex Color RAS_TEXCO_DISABLE //< Disable this texture unit (cached) }; @@ -197,45 +220,37 @@ public: * IndexPrimitives: Renders primitives. * @param vertexarrays is an array of vertex arrays * @param indexarrays is an array of index arrays - * @param mode determines the type of primitive stored in the vertex/index arrays: - * 0 triangles - * 1 lines (default) - * 2 quads - * @param polymat (reserved) + * @param mode determines the type of primitive stored in the vertex/index arrays * @param useObjectColor will render the object using @param rgbacolor instead of * vertex colors. */ - virtual void IndexPrimitives( const vecVertexArray& vertexarrays, + virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot)=0; + virtual void IndexPrimitivesMulti( + const vecVertexArray& vertexarrays, + const vecIndexArrays & indexarrays, + DrawMode mode, + bool useObjectColor, + const MT_Vector4& rgbacolor, + class KX_ListSlot** slot)=0; + /** * IndexPrimitives_3DText will render text into the polygons. * The text to be rendered is from @param rendertools client object's text property. */ virtual void IndexPrimitives_3DText( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, + DrawMode mode, class RAS_IPolyMaterial* polymat, class RAS_IRenderTools* rendertools, bool useObjectColor, const MT_Vector4& rgbacolor)=0; - virtual void IndexPrimitivesMulti( - const vecVertexArray& vertexarrays, - const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, - bool useObjectColor, - const MT_Vector4& rgbacolor, - class KX_ListSlot** slot)=0; - virtual void SetProjectionMatrix(MT_CmMatrix4x4 & mat)=0; /* This one should become our final version, methinks. */ /** diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index 1beade7acf7..e295d69e48e 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -167,38 +167,30 @@ RAS_MaterialBucket::T_MeshSlotList::iterator RAS_MaterialBucket::msEnd() } bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools *rendertools, int &drawmode) + RAS_IRenderTools *rendertools, RAS_IRasterizer::DrawMode &drawmode) { rendertools->SetViewMat(cameratrans); if (!rasty->SetMaterial(*m_material)) return false; - bool dolights = false; - const unsigned int flag = m_material->GetFlag(); - - if( flag & RAS_BLENDERMAT) - dolights = (flag &RAS_MULTILIGHT)!=0; - else - dolights = (m_material->GetDrawingMode()&16)!=0; - - if ((rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID) || !dolights) - { - rendertools->ProcessLighting(-1); - } - else - { + if (m_material->UsesLighting(rasty)) rendertools->ProcessLighting(RAS_IRenderTools::RAS_LIGHT_OBJECT_LAYER/*m_material->GetLightLayer()*/); - } + else + rendertools->ProcessLighting(-1); - drawmode = (rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID ? - 1: (m_material->UsesTriangles() ? 0 : 2)); + if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID) + drawmode = RAS_IRasterizer::KX_MODE_LINES; + else if(m_material->UsesTriangles()) + drawmode = RAS_IRasterizer::KX_MODE_TRIANGLES; + else + drawmode = RAS_IRasterizer::KX_MODE_QUADS; return true; } void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, int drawmode) + RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, RAS_IRasterizer::DrawMode drawmode) { if (!ms.m_bVisible) return; @@ -225,6 +217,17 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_DisplayList->SetModified(ms.m_mesh->MeshModified()); } + // verify if we can use display list, not for deformed object, and + // also don't create a new display list when drawing shadow buffers, + // then it won't have texture coordinates for actual drawing + KX_ListSlot **displaylist; + if(ms.m_pDeformer) + displaylist = 0; + else if(!ms.m_DisplayList && rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW) + displaylist = 0; + else + displaylist = &ms.m_DisplayList; + // Use the text-specific IndexPrimitives for text faces if (m_material->GetDrawingMode() & RAS_IRasterizer::RAS_RENDER_3DPOLYGON_TEXT) { @@ -245,12 +248,9 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_mesh->GetVertexCache(m_material), ms.m_mesh->GetIndexCache(m_material), drawmode, - m_material, - rendertools, ms.m_bObjectColor, ms.m_RGBAcolor, - (ms.m_pDeformer)? 0: &ms.m_DisplayList - ); + displaylist); } // Use the normal IndexPrimitives @@ -260,12 +260,9 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_mesh->GetVertexCache(m_material), ms.m_mesh->GetIndexCache(m_material), drawmode, - m_material, - rendertools, // needed for textprinting on polys ms.m_bObjectColor, ms.m_RGBAcolor, - (ms.m_pDeformer)? 0: &ms.m_DisplayList - ); + displaylist); } if(rasty->QueryLists()) { @@ -287,7 +284,7 @@ void RAS_MaterialBucket::Render(const MT_Transform& cameratrans, //rasty->SetMaterial(*m_material); - int drawmode; + RAS_IRasterizer::DrawMode drawmode; for (T_MeshSlotList::const_iterator it = m_meshSlots.begin(); ! (it == m_meshSlots.end()); ++it) { diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h index 5ad0c173a56..13d8a53714a 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h @@ -35,17 +35,13 @@ #include "MT_Transform.h" #include "RAS_IPolygonMaterial.h" +#include "RAS_IRasterizer.h" #include "RAS_Deformer.h" // __NLA #include #include #include using namespace std; -typedef vector KX_IndexArray; -typedef vector KX_VertexArray; -typedef vector< KX_VertexArray* > vecVertexArray; -typedef vector< KX_IndexArray* > vecIndexArrays; - /** * KX_VertexIndex */ @@ -146,9 +142,9 @@ public: const MT_Vector4& rgbavec); void RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, int drawmode); + RAS_IRenderTools* rendertools, const KX_MeshSlot &ms, RAS_IRasterizer::DrawMode drawmode); bool ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools *rendertools, int &drawmode); + RAS_IRenderTools *rendertools, RAS_IRasterizer::DrawMode& drawmode); unsigned int NumMeshSlots(); T_MeshSlotList::iterator msBegin(); diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index d7ab88a6b06..4420f16c56d 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -68,8 +68,8 @@ RAS_MeshObject::RAS_MeshObject(Mesh* mesh, int lightlayer) m_lightlayer(lightlayer), m_zsort(false), m_MeshMod(true), - m_class(0), - m_mesh(mesh) + m_mesh(mesh), + m_class(0) { } @@ -259,18 +259,18 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray, const MT_Vector3& normal, bool flat, RAS_IPolyMaterial* mat, - int orgindex) + int origindex) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); int numverts = ao->m_VertexArrayCache1[vtxarray]->size();//m_VertexArrayCount[vtxarray]; - RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, flat? TV_CALCFACENORMAL: 0); + RAS_TexVert newvert(xyz,uv,uv2,tangent,rgbacolor,normal, flat? TV_CALCFACENORMAL: 0,origindex); #define KX_FIND_SHARED_VERTICES #ifdef KX_FIND_SHARED_VERTICES if(!flat) { - for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[orgindex].begin(); - it != m_xyz_index_to_vertex_index_mapping[orgindex].end(); + for (std::vector::iterator it = m_xyz_index_to_vertex_index_mapping[origindex].begin(); + it != m_xyz_index_to_vertex_index_mapping[origindex].end(); it++) { if ((*it).m_arrayindex1 == ao->m_index1 && @@ -293,22 +293,18 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray, idx.m_array = vtxarray; idx.m_index = numverts; idx.m_matid = mat; - m_xyz_index_to_vertex_index_mapping[orgindex].push_back(idx); + m_xyz_index_to_vertex_index_mapping[origindex].push_back(idx); return numverts; } - - -const vecVertexArray& RAS_MeshObject::GetVertexCache (RAS_IPolyMaterial* mat) +vecVertexArray& RAS_MeshObject::GetVertexCache (RAS_IPolyMaterial* mat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); return ao->m_VertexArrayCache1; } - - int RAS_MeshObject::GetVertexArrayLength(RAS_IPolyMaterial* mat) { int len = 0; @@ -362,7 +358,7 @@ RAS_TexVert* RAS_MeshObject::GetVertex(unsigned int matid, const vecIndexArrays& RAS_MeshObject::GetIndexCache (RAS_IPolyMaterial* mat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(mat); return ao->m_IndexArrayCache1; } @@ -371,16 +367,27 @@ const vecIndexArrays& RAS_MeshObject::GetIndexCache (RAS_IPolyMaterial* mat) KX_ArrayOptimizer* RAS_MeshObject::GetArrayOptimizer(RAS_IPolyMaterial* polymat) { - KX_ArrayOptimizer** aop = (m_matVertexArrayS[*polymat]); + KX_ArrayOptimizer** aop = m_matVertexArrayS[polymat]; - if (aop) + if(aop) return *aop; + // didn't find array, but an array might already exist + // for a material equal to this one + for(int i=0;igetValue()); + if(*mat == *polymat) { + m_matVertexArrayS.insert(polymat, *m_matVertexArrayS.at(i)); + return *m_matVertexArrayS.at(i); + } + } + + // create new array int numelements = m_matVertexArrayS.size(); m_sortedMaterials.push_back(polymat); - + KX_ArrayOptimizer* ao = new KX_ArrayOptimizer(numelements); - m_matVertexArrayS.insert(*polymat,ao); + m_matVertexArrayS.insert(polymat, ao); return ao; } @@ -463,7 +470,7 @@ RAS_TexVert* RAS_MeshObject::GetVertex(short array, unsigned int index, RAS_IPolyMaterial* polymat) { - KX_ArrayOptimizer* ao = GetArrayOptimizer(polymat);//*(m_matVertexArrays[*polymat]); + KX_ArrayOptimizer* ao = GetArrayOptimizer(polymat); return &((*(ao->m_VertexArrayCache1)[array])[index]); } @@ -471,13 +478,19 @@ RAS_TexVert* RAS_MeshObject::GetVertex(short array, void RAS_MeshObject::ClearArrayData() { - for (int i=0;i m_matVertexArrayS; + GEN_Map m_matVertexArrayS; RAS_MaterialBucket::Set m_materials; Mesh* m_mesh; @@ -242,10 +242,10 @@ public: const MT_Vector3& normal, bool flat, RAS_IPolyMaterial* mat, - int orgindex + int origindex ); - const vecVertexArray& GetVertexCache (RAS_IPolyMaterial* mat); + vecVertexArray& GetVertexCache (RAS_IPolyMaterial* mat); int GetVertexArrayLength(RAS_IPolyMaterial* mat); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index 39080b80492..c2687319717 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -161,9 +161,7 @@ void RAS_ListRasterizer::ReleaseAlloc() void RAS_ListRasterizer::IndexPrimitives( const vecVertexArray & vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) @@ -185,15 +183,13 @@ void RAS_ListRasterizer::IndexPrimitives( if (mUseVertexArrays) { RAS_VAOpenGLRasterizer::IndexPrimitives( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } else { RAS_OpenGLRasterizer::IndexPrimitives( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } @@ -208,9 +204,7 @@ void RAS_ListRasterizer::IndexPrimitives( void RAS_ListRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) @@ -230,18 +224,19 @@ void RAS_ListRasterizer::IndexPrimitivesMulti( } } - if (mUseVertexArrays) { + // workaround: note how we do not use vertex arrays for making display + // lists, since glVertexAttribPointerARB doesn't seem to work correct + // in display lists on ATI? either a bug in the driver or in Blender .. + if (mUseVertexArrays && !localSlot) { RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } else { RAS_OpenGLRasterizer::IndexPrimitivesMulti( vertexarrays, indexarrays, - mode, polymat, - rendertools, useObjectColor, + mode, useObjectColor, rgbacolor,slot ); } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h index 4b3304d7396..b1b19144c12 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h @@ -52,9 +52,7 @@ public: virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot @@ -63,9 +61,7 @@ public: virtual void IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp index 18147b53f4c..dcc36bf5a39 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp @@ -368,23 +368,11 @@ void RAS_OpenGLRasterizer::SetDrawingMode(int drawingmode) switch (m_drawingmode) { - case KX_BOUNDINGBOX: - { - } case KX_WIREFRAME: { glDisable (GL_CULL_FACE); break; } - case KX_TEXTURED: - { - } - case KX_SHADED: - { - } - case KX_SOLID: - { - } default: { } @@ -603,33 +591,14 @@ void RAS_OpenGLRasterizer::GetViewMatrix(MT_Matrix4x4 &mat) const void RAS_OpenGLRasterizer::IndexPrimitives(const vecVertexArray & vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot ) { - GLenum drawmode; - switch (mode) - { - case 0: - drawmode = GL_TRIANGLES; - break; - case 1: - drawmode = GL_LINES; - break; - case 2: - drawmode = GL_QUADS; - break; - default: - drawmode = GL_LINES; - break; - } - - const RAS_TexVert* vertexarray ; - unsigned int numindices,vt; + const RAS_TexVert* vertexarray; + unsigned int numindices, vt; for (vt=0;vtgetLocalXYZ()); - glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1()); - glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); glNormalPointer(GL_FLOAT,vtxstride,vertexarray->getNormal()); + glTexCoordPointer(2,GL_FLOAT,vtxstride,vertexarray->getUV1()); + if(glIsEnabled(GL_COLOR_ARRAY)) + glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); //if(m_Lock) // local->Begin(vertexarrays[vt]->size()); @@ -169,8 +166,6 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays //if(m_Lock) // local->End(); - - } glDisableClientState(GL_TEXTURE_COORD_ARRAY); @@ -178,28 +173,21 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot) { static const GLsizei vtxstride = sizeof(RAS_TexVert); + GLenum drawmode; - switch (mode) - { - case 0: - drawmode = GL_TRIANGLES; - break; - case 2: - drawmode = GL_QUADS; - break; - case 1: //lines - default: - drawmode = GL_LINES; - break; - } + if(mode == KX_MODE_TRIANGLES) + drawmode = GL_TRIANGLES; + else if(mode == KX_MODE_QUADS) + drawmode = GL_QUADS; + else + drawmode = GL_LINES; + const RAS_TexVert* vertexarray; unsigned int numindices, vt; @@ -232,10 +220,10 @@ void RAS_VAOpenGLRasterizer::IndexPrimitivesMulti( const vecVertexArray& vertexa continue; glVertexPointer(3,GL_FLOAT,vtxstride,vertexarray->getLocalXYZ()); - TexCoordPtr(vertexarray); - - glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); glNormalPointer(GL_FLOAT,vtxstride,vertexarray->getNormal()); + TexCoordPtr(vertexarray); + if(glIsEnabled(GL_COLOR_ARRAY)) + glColorPointer(4,GL_UNSIGNED_BYTE,vtxstride,vertexarray->getRGBA()); //if(m_Lock) // local->Begin(vertexarrays[vt]->size()); @@ -296,19 +284,22 @@ void RAS_VAOpenGLRasterizer::TexCoordPtr(const RAS_TexVert *tv) switch(m_attrib[unit]) { case RAS_TEXCO_ORCO: case RAS_TEXCO_GLOB: - glVertexAttribPointer(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getLocalXYZ()); + glVertexAttribPointerARB(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getLocalXYZ()); break; case RAS_TEXCO_UV1: - glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV1()); + glVertexAttribPointerARB(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV1()); break; case RAS_TEXCO_NORM: - glVertexAttribPointer(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getNormal()); + glVertexAttribPointerARB(unit, 3, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getNormal()); break; case RAS_TEXTANGENT: - glVertexAttribPointer(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent()); + glVertexAttribPointerARB(unit, 4, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getTangent()); break; case RAS_TEXCO_UV2: - glVertexAttribPointer(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV2()); + glVertexAttribPointerARB(unit, 2, GL_FLOAT, GL_FALSE, sizeof(RAS_TexVert), tv->getUV2()); + break; + case RAS_TEXCO_VCOL: + glVertexAttribPointerARB(unit, 4, GL_UNSIGNED_BYTE, GL_FALSE, sizeof(RAS_TexVert), tv->getRGBA()); break; default: break; @@ -386,11 +377,12 @@ void RAS_VAOpenGLRasterizer::EnableTextures(bool enable) case RAS_TEXCO_NORM: case RAS_TEXTANGENT: case RAS_TEXCO_UV2: - if(enable) glEnableVertexAttribArray(unit); - else glDisableVertexAttribArray(unit); + case RAS_TEXCO_VCOL: + if(enable) glEnableVertexAttribArrayARB(unit); + else glDisableVertexAttribArrayARB(unit); break; default: - glDisableVertexAttribArray(unit); + glDisableVertexAttribArrayARB(unit); break; } } diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h index ea08887028f..e4cc4ace0e8 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h @@ -52,9 +52,7 @@ public: virtual void IndexPrimitives( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot); @@ -62,9 +60,7 @@ public: virtual void IndexPrimitivesMulti( const vecVertexArray& vertexarrays, const vecIndexArrays & indexarrays, - int mode, - class RAS_IPolyMaterial* polymat, - class RAS_IRenderTools* rendertools, + DrawMode mode, bool useObjectColor, const MT_Vector4& rgbacolor, class KX_ListSlot** slot); diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index 61ac456b2bc..935633dc636 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -40,7 +40,8 @@ RAS_TexVert::RAS_TexVert(const MT_Point3& xyz, const MT_Vector4& tangent, const unsigned int rgba, const MT_Vector3& normal, - const short flag) + const short flag, + const unsigned int origindex) { xyz.getValue(m_localxyz); uv.getValue(m_uv1); @@ -49,6 +50,7 @@ RAS_TexVert::RAS_TexVert(const MT_Point3& xyz, SetNormal(normal); tangent.getValue(m_tangent); m_flag = flag; + m_origindex = origindex; m_unit = 2; } @@ -107,44 +109,6 @@ void RAS_TexVert::SetNormal(const MT_Vector3& normal) normal.getValue(m_normal); } -#ifndef RAS_TexVert_INLINE - -// leave multiline for debugging -const float* RAS_TexVert::getUV1 () const -{ - return m_uv1; -} - -const float* RAS_TexVert::getUV2 () const -{ - return m_uv2; -} - - - -const float* RAS_TexVert::getNormal() const -{ - return m_normal; -} - -const float* RAS_TexVert::getTangent() const -{ - return m_tangent; -} - - -const float* RAS_TexVert::getLocalXYZ() const -{ - return m_localxyz; -} - -const unsigned char* RAS_TexVert::getRGBA() const -{ - return (unsigned char*) &m_rgba; -} - -#endif - // compare two vertices, and return TRUE if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { diff --git a/source/gameengine/Rasterizer/RAS_TexVert.h b/source/gameengine/Rasterizer/RAS_TexVert.h index 84135db918f..bf092b4b230 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.h +++ b/source/gameengine/Rasterizer/RAS_TexVert.h @@ -42,8 +42,6 @@ static MT_Point2 g_pt2; #define TV_MAX 3//match Def in BL_Material.h -#define RAS_TexVert_INLINE 1 - class RAS_TexVert { @@ -55,9 +53,10 @@ class RAS_TexVert float m_normal[3]; // 3*2 = 6 short m_flag; // 2 unsigned int m_unit; // 4 + unsigned int m_origindex; // 4 //--------- - // 52 - //32 bytes total size, fits nice = 52 = not fit nice. + // 56 + // 32 bytes total size, fits nice = 56 = not fit nice. // We'll go for 64 bytes total size - 24 bytes left. public: short getFlag() const; @@ -71,11 +70,10 @@ public: const MT_Vector4& tangent, const unsigned int rgba, const MT_Vector3& normal, - const short flag); + const short flag, + const unsigned int origindex); ~RAS_TexVert() {}; - // leave multiline for debugging -#ifdef RAS_TexVert_INLINE const float* getUV1 () const { return m_uv1; }; @@ -99,13 +97,11 @@ public: const unsigned char* getRGBA() const { return (unsigned char *) &m_rgba; } -#else - const float* getUV1 () const; - const float* getUV2 () const; - const float* getNormal() const; - const float* getLocalXYZ() const; - const unsigned char* getRGBA() const; -#endif + + const unsigned int getOrigIndex() const { + return m_origindex; + } + void SetXYZ(const MT_Point3& xyz); void SetUV(const MT_Point2& uv); void SetUV2(const MT_Point2& uv); diff --git a/source/gameengine/SceneGraph/SG_Controller.h b/source/gameengine/SceneGraph/SG_Controller.h index d65a2f0c256..c32885b915f 100644 --- a/source/gameengine/SceneGraph/SG_Controller.h +++ b/source/gameengine/SceneGraph/SG_Controller.h @@ -101,7 +101,9 @@ public: enum SG_Controller_option { SG_CONTR_NODEF = 0, SG_CONTR_IPO_IPO_AS_FORCE, - SG_CONTR_IPO_FORCES_ACT_LOCAL, + SG_CONTR_IPO_IPO_ADD, + SG_CONTR_IPO_LOCAL, + SG_CONTR_IPO_RESET, SG_CONTR_CAMIPO_LENS, SG_CONTR_CAMIPO_CLIPEND, SG_CONTR_CAMIPO_CLIPSTART, diff --git a/source/kernel/gen_system/GEN_HashedPtr.h b/source/kernel/gen_system/GEN_HashedPtr.h index 777ec76e067..13faa5f227b 100644 --- a/source/kernel/gen_system/GEN_HashedPtr.h +++ b/source/kernel/gen_system/GEN_HashedPtr.h @@ -39,6 +39,7 @@ public: GEN_HashedPtr(void* val) : m_valptr(val) {}; unsigned int hash() const { return GEN_Hash(m_valptr);}; inline friend bool operator ==(const GEN_HashedPtr & rhs, const GEN_HashedPtr & lhs) { return rhs.m_valptr == lhs.m_valptr;}; + void *getValue() const { return m_valptr; } }; #endif //__GEN_HASHEDPTR diff --git a/source/kernel/gen_system/GEN_Map.h b/source/kernel/gen_system/GEN_Map.h index f9c14800499..37c75d8293a 100644 --- a/source/kernel/gen_system/GEN_Map.h +++ b/source/kernel/gen_system/GEN_Map.h @@ -82,6 +82,24 @@ public: } return 0; } + + Key* getKey(int index) { + int count=0; + for (int i=0;im_key; + } + bucket = bucket->m_next; + count++; + } + } + return 0; + } void clear() { for (int i = 0; i < m_num_buckets; ++i) { diff --git a/tools/Blender.py b/tools/Blender.py index 633a576efee..5eaeab7f5ae 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -69,10 +69,10 @@ def internal_lib_to_dict(dict = None, libtype = None, libname = None, priority = dict[libtype][priority] = libname # libtype and priority can both be lists, for defining lib in multiple places -def add_lib_to_dict(dict = None, libtype = None, libname = None, priority = 100): +def add_lib_to_dict(env, dict = None, libtype = None, libname = None, priority = 100): if not dict or not libtype or not libname: print "Passed wrong arg" - Exit() + env.Exit() if type(libtype) is str and type(priority) is int: internal_lib_to_dict(dict, libtype, libname, priority) @@ -82,10 +82,10 @@ def add_lib_to_dict(dict = None, libtype = None, libname = None, priority = 100) internal_lib_to_dict(dict, lt, libname, p) else: print "libtype and priority lists are unequal in length" - Exit() + env.Exit() else: print "Wrong type combinations for libtype and priority. Only str and int or list and list" - Exit() + env.Exit() def create_blender_liblist(lenv = None, libtype = None): if not lenv or not libtype: @@ -93,11 +93,9 @@ def create_blender_liblist(lenv = None, libtype = None): lst = [] if libtype in possible_types: - sortlist = [] - for k,v in libs[libtype].iteritems(): - sortlist.append(k) - sortlist.sort() curlib = libs[libtype] + sortlist = curlib.keys() + sortlist.sort() for sk in sortlist: v = curlib[sk] lst.append('#' + root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']) @@ -177,11 +175,10 @@ def propose_priorities(): for t in possible_types: print bc.OKGREEN+"\t"+t+bc.ENDC new_priority = 0 - sortlist = [] - for k,v in libs[t].iteritems(): - sortlist.append(k) - sortlist.sort() curlib = libs[t] + sortlist = curlib.keys() + sortlist.sort() + for sk in sortlist: v = curlib[sk] #for p,v in sorted(libs[t].iteritems()): @@ -370,7 +367,7 @@ class BlenderEnvironment(SConsEnvironment): global libs if not self or not libname or not source: print bc.FAIL+'Cannot continue. Missing argument for BlenderRes '+libname+bc.ENDC - Exit() + self.Exit() if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross'): print bc.FAIL+'BlenderRes is for windows only!'+bc.END self.Exit() @@ -385,7 +382,7 @@ class BlenderEnvironment(SConsEnvironment): def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None): if not self or not libname or not sources: print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC - Exit() + self.Exit() if libname in quickie or len(quickie)==0: if libname in quickdebug: print bc.HEADER+'Configuring library '+bc.ENDC+bc.OKGREEN+libname +bc.ENDC+bc.OKBLUE+ " (debug mode)" + bc.ENDC @@ -421,7 +418,7 @@ class BlenderEnvironment(SConsEnvironment): else: print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC # note: libs is a global - add_lib_to_dict(libs, libtype, libname, priority) + add_lib_to_dict(self, libs, libtype, libname, priority) def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''): print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC From 96e52b09da9c808a6d10526f2115178e8499ebec Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 15 Jul 2008 01:07:19 +0000 Subject: [PATCH 389/430] soc-2008-mxcurioni: Reimplemented the Freestyle Python API's files to be correctly used as classes and not submodules. Added and integrated object lifecycle functions (__new__, __alloc__, __repr__) for the previous classes: BinaryPredicate0D, BinaryPredicate1D, Id, Interface0D, Interface1D. All of these classes were tested within Blender's Python interpreter with simple test cases and their getter/setters were corrected. Interface0DIterator was modified to allow BPy_Interface1D to be instantiated: verticesBegin(), verticesEnd(), pointsBegin(float) and pointsEnd(float) are not pure virtual functions anymore. If they are called directly from BPy_Interface1D (instead of its subclasses), an error message is displayed. --- .../intern/python/BinaryPredicate0D.cpp | 107 +++++++----- .../intern/python/BinaryPredicate0D.h | 2 +- .../intern/python/BinaryPredicate1D.cpp | 108 +++++++----- .../intern/python/BinaryPredicate1D.h | 3 +- .../freestyle/intern/python/Convert.cpp | 12 +- .../blender/freestyle/intern/python/Convert.h | 4 + .../freestyle/intern/python/Freestyle.cpp | 22 +-- source/blender/freestyle/intern/python/Id.cpp | 163 ++++++++++++------ source/blender/freestyle/intern/python/Id.h | 3 +- .../freestyle/intern/python/Interface0D.cpp | 115 ++++++++---- .../freestyle/intern/python/Interface0D.h | 3 +- .../freestyle/intern/python/Interface1D.cpp | 121 ++++++++----- .../freestyle/intern/python/Interface1D.h | 2 +- .../freestyle/intern/view_map/Interface1D.h | 23 ++- 14 files changed, 454 insertions(+), 234 deletions(-) diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp index 2c16adb7a82..107216a6b50 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp @@ -9,18 +9,22 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for BinaryPredicate0D instance -----------*/ +static PyObject * BinaryPredicate0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self); +static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self); -/*-----------------------Python API function prototypes for the BinaryPredicate0D module--*/ -//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); -/*-----------------------BinaryPredicate0D module doc strings-----------------------------*/ -static char M_BinaryPredicate0D_doc[] = "The Blender.Freestyle.BinaryPredicate0D submodule"; -/*----------------------BinaryPredicate0D module method def----------------------------*/ -struct PyMethodDef M_BinaryPredicate0D_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, +static PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args); +static PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args); + +/*----------------------BinaryPredicate0D instance definitions ----------------------------*/ +static PyMethodDef BPy_BinaryPredicate0D_methods[] = { + {"getName", ( PyCFunction ) BinaryPredicate0D_getName, METH_NOARGS, "( )Returns the string of the name of the binary predicate."}, + {"__call__", ( PyCFunction ) BinaryPredicate0D___call__, METH_VARARGS, "BinaryPredicate0D(Interface0D, Interface0D ). Must be overloaded by inherited classes. It evaluates a relation between two Interface0D." }, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Freestyle method def------------------------------*/ +/*-----------------------BPy_BinaryPredicate0D type definition ------------------------------*/ PyTypeObject BinaryPredicate0D_Type = { PyObject_HEAD_INIT( NULL ) @@ -30,12 +34,12 @@ PyTypeObject BinaryPredicate0D_Type = { 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ - NULL, /* tp_repr */ + (destructor)BinaryPredicate0D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)BinaryPredicate0D___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -78,17 +82,17 @@ PyTypeObject BinaryPredicate0D_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - NULL, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + BPy_BinaryPredicate0D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + (newfunc)BinaryPredicate0D___new__, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -106,35 +110,60 @@ PyTypeObject BinaryPredicate0D_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyObject *BinaryPredicate0D_Init( void ) +PyMODINIT_FUNC BinaryPredicate0D_Init( PyObject *module ) { - PyObject *submodule; - + if( module == NULL ) + return; + if( PyType_Ready( &BinaryPredicate0D_Type ) < 0 ) - return NULL; - - submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate0D", M_BinaryPredicate0D_methods, M_BinaryPredicate0D_doc ); - - return submodule; + return; + + Py_INCREF( &BinaryPredicate0D_Type ); + PyModule_AddObject(module, "BinaryPredicate0D", (PyObject *)&BinaryPredicate0D_Type); } //------------------------INSTANCE METHODS ---------------------------------- -PyObject *BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args) +PyObject * BinaryPredicate0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + BPy_BinaryPredicate0D *self; + + self = (BPy_BinaryPredicate0D *)type->tp_alloc(type, 0); + if (self != NULL) { + self->bp0D = new BinaryPredicate0D(); + } + + return (PyObject *)self; +} + +void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self) +{ + delete self->bp0D; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->bp0D->getName().c_str(), self->bp0D ); +} + + +PyObject * BinaryPredicate0D_getName( BPy_BinaryPredicate0D *self, PyObject *args) { return PyString_FromString( self->bp0D->getName().c_str() ); } -PyObject *BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args) +PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *args) { - BPy_BinaryPredicate0D *obj1; - BPy_Interface0D *obj2, *obj3; + BPy_Interface0D *obj1, *obj2; bool b; - if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate0D___call__", &obj1, obj2, &obj3)) + if( !PyArg_ParseTuple(args,(char *)"OO:BinaryPredicate0D___call__", &obj1, obj2) ) { cout << "ERROR: BinaryPredicate0D___call__ " << endl; + return NULL; + } - b = self->bp0D->operator()( *(obj2->if0D) , *(obj3->if0D) ); + b = self->bp0D->operator()( *(obj1->if0D) , *(obj2->if0D) ); return PyBool_from_bool( b ); } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BinaryPredicate0D.h index 30467d2e565..6ad25ab2816 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.h @@ -24,7 +24,7 @@ typedef struct { /*---------------------------Python BPy_BinaryPredicate0D visible prototypes-----------*/ -PyObject *BinaryPredicate0D_Init( void ); +PyMODINIT_FUNC BinaryPredicate0D_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp index d6a99d689bb..afdab7c08ed 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp @@ -9,33 +9,36 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for BinaryPredicate1D instance -----------*/ +static PyObject * BinaryPredicate1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D *self); +static PyObject * BinaryPredicate1D___repr__(BPy_BinaryPredicate1D *self); -/*-----------------------Python API function prototypes for the BinaryPredicate1D module--*/ -//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); -/*-----------------------BinaryPredicate1D module doc strings-----------------------------*/ -static char M_BinaryPredicate1D_doc[] = "The Blender.Freestyle.BinaryPredicate1D submodule"; -/*----------------------BinaryPredicate1D module method def----------------------------*/ -struct PyMethodDef M_BinaryPredicate1D_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, +static PyObject * BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args); +static PyObject * BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args); + +/*----------------------BinaryPredicate1D instance definitions ----------------------------*/ +static PyMethodDef BPy_BinaryPredicate1D_methods[] = { + {"getName", ( PyCFunction ) BinaryPredicate1D_getName, METH_NOARGS, "( )Returns the string of the name of the binary predicate."}, + {"__call__", ( PyCFunction ) BinaryPredicate1D___call__, METH_VARARGS, "BinaryPredicate1D(Interface1D, Interface1D ). Must be overloaded by inherited classes. It evaluates a relation between two Interface1D." }, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Freestyle method def------------------------------*/ - +/*-----------------------BPy_BinaryPredicate1D type definition ------------------------------*/ PyTypeObject BinaryPredicate1D_Type = { PyObject_HEAD_INIT( NULL ) - 0, /* ob_size */ + 0, /* ob_size */ "BinaryPredicate1D", /* tp_name */ sizeof( BPy_BinaryPredicate1D ), /* tp_basicsize */ - 0, /* tp_itemsize */ + 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ - NULL, /* tp_repr */ + (destructor)BinaryPredicate1D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)BinaryPredicate1D___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -78,17 +81,17 @@ PyTypeObject BinaryPredicate1D_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - NULL, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + BPy_BinaryPredicate1D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + BinaryPredicate1D___new__, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -106,20 +109,44 @@ PyTypeObject BinaryPredicate1D_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyObject *BinaryPredicate1D_Init( void ) +PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) { - PyObject *submodule; - + if( module == NULL ) + return; + if( PyType_Ready( &BinaryPredicate1D_Type ) < 0 ) - return NULL; - - submodule = Py_InitModule3( "Blender.Freestyle.BinaryPredicate1D", M_BinaryPredicate1D_methods, M_BinaryPredicate1D_doc ); - - return submodule; + return; + + Py_INCREF( &BinaryPredicate1D_Type ); + PyModule_AddObject(module, "BinaryPredicate1D", (PyObject *)&BinaryPredicate1D_Type); } + //------------------------INSTANCE METHODS ---------------------------------- +PyObject * BinaryPredicate1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + BPy_BinaryPredicate1D *self; + + self = (BPy_BinaryPredicate1D *)type->tp_alloc(type, 0); + if (self != NULL) { + self->bp1D = new BinaryPredicate1D(); + } + + return (PyObject *)self; +} + +void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D* self) +{ + delete self->bp1D; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * BinaryPredicate1D___repr__(BPy_BinaryPredicate1D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->bp1D->getName().c_str(), self->bp1D ); +} + PyObject *BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args) { return PyString_FromString( self->bp1D->getName().c_str() ); @@ -127,14 +154,15 @@ PyObject *BinaryPredicate1D_getName( BPy_BinaryPredicate1D *self, PyObject *args PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *args) { - BPy_BinaryPredicate1D *obj1; - BPy_Interface1D *obj2, *obj3; + BPy_Interface1D *obj1, *obj2; bool b; - if (!PyArg_ParseTuple(args,(char *)"OOO:BinaryPredicate1D___call__", &obj1, &obj2, &obj3)) + if( !PyArg_ParseTuple(args,(char *)"OO:BinaryPredicate1D___call__", &obj1, &obj2) ) { cout << "ERROR: BinaryPredicate1D___call__ " << endl; + return NULL; + } - b = self->bp1D->operator()( *(obj2->if1D) , *(obj3->if1D) ); + b = self->bp1D->operator()( *(obj1->if1D) , *(obj2->if1D) ); return PyBool_from_bool( b ); } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D.h index d401c585197..2745ca6fc3f 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.h @@ -24,8 +24,7 @@ typedef struct { /*---------------------------Python BPy_BinaryPredicate1D visible prototypes-----------*/ -PyObject *BinaryPredicate1D_Init( void ); - +PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index c8ceddaf98b..d87848cde8e 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -32,7 +32,7 @@ PyObject *PyBool_from_bool( bool b ){ PyObject *Vector_from_Vec2f( Vec2f vec ) { float vec_data[2]; // because vec->_coord is protected vec_data[0] = vec.x(); vec_data[1] = vec.y(); - return newVectorObject( vec_data, 3, Py_NEW); + return newVectorObject( vec_data, 2, Py_NEW); } PyObject *Vector_from_Vec3f( Vec3f vec ) { @@ -47,6 +47,16 @@ PyObject *Vector_from_Vec3r( Vec3r vec ) { return newVectorObject( vec_data, 3, Py_NEW); } +PyObject *BPy_Id_from_Id( Id id ) { + BPy_Id *py_id; + + py_id = (BPy_Id *) Id_Type.tp_new( &Id_Type, 0, 0 ); + py_id->id->setFirst( id.getFirst() ); + py_id->id->setSecond( id.getSecond() ); + + return (PyObject *)py_id; +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index d1bac93734a..a2e7eeafd94 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -4,6 +4,8 @@ #include "../geometry/Geom.h" using namespace Geometry; +#include "Id.h" + #ifdef __cplusplus extern "C" { #endif @@ -22,6 +24,8 @@ PyObject *Vector_from_Vec2f( Vec2f v ); PyObject *Vector_from_Vec3f( Vec3f v ); PyObject *Vector_from_Vec3r( Vec3r v ); +PyObject *BPy_Id_from_Id( Id id ); + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index e3a5cf91117..93d01b29040 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -111,22 +111,22 @@ PyTypeObject Freestyle_Type = { //-------------------MODULE INITIALIZATION-------------------------------- PyObject *Freestyle_Init( void ) { - PyObject *submodule; - PyObject *dict; + PyObject *module; if( PyType_Ready( &Freestyle_Type ) < 0 ) return NULL; - submodule = Py_InitModule3( "Blender.Freestyle", M_Freestyle_methods, M_Freestyle_doc ); - - dict = PyModule_GetDict( submodule ); - PyDict_SetItemString( dict, "BinaryPredicate0D", BinaryPredicate0D_Init() ); - PyDict_SetItemString( dict, "BinaryPredicate1D", BinaryPredicate1D_Init() ); - PyDict_SetItemString( dict, "Interface0D", Interface0D_Init() ); - PyDict_SetItemString( dict, "Interface1D", Interface1D_Init() ); - PyDict_SetItemString( dict, "Id", Id_Init() ); + // initialize modules + module = Py_InitModule3( "Blender.Freestyle", M_Freestyle_methods, M_Freestyle_doc ); - return submodule; + // attach its classes (adding the object types to the module) + BinaryPredicate0D_Init( module ); + BinaryPredicate1D_Init( module ); + Id_Init( module ); + Interface0D_Init( module ); + Interface1D_Init( module ); + + return module; } /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp index a835efa78f7..1f862df0204 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/Id.cpp @@ -8,33 +8,48 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for Id instance -----------*/ +static PyObject * Id___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static void Id___dealloc__(BPy_Id *self); +static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds); +static PyObject * Id___repr__(BPy_Id* self); -/*-----------------------Python API function prototypes for the Id module--*/ -//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); -/*-----------------------Id module doc strings-----------------------------*/ -static char M_Id_doc[] = "The Blender.Freestyle.Id submodule"; -/*----------------------Id module method def----------------------------*/ -struct PyMethodDef M_Id_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, +static PyObject * Id_getFirst( BPy_Id *self ); +static PyObject * Id_getSecond( BPy_Id *self); +static PyObject * Id_setFirst( BPy_Id *self , PyObject *args); +static PyObject * Id_setSecond( BPy_Id *self , PyObject *args); +static PyObject * Id___eq__( BPy_Id *self , PyObject *args); +static PyObject * Id___ne__( BPy_Id *self , PyObject *args); +static PyObject * Id___lt__( BPy_Id *self , PyObject *args); + +/*----------------------Id instance definitions ----------------------------*/ +static PyMethodDef BPy_Id_methods[] = { + {"getFirst", ( PyCFunction ) Id_getFirst, METH_NOARGS, "Returns the first Id number"}, + {"getSecond", ( PyCFunction ) Id_getSecond, METH_NOARGS, "Returns the second Id number" }, + {"setFirst", ( PyCFunction ) Id_setFirst, METH_VARARGS, "Sets the first number constituing the Id" }, + {"setSecond", ( PyCFunction ) Id_setSecond, METH_VARARGS, "Sets the second number constituing the Id" }, + {"__eq__", ( PyCFunction ) Id___eq__, METH_VARARGS, "Operator ==" }, + {"__ne__", ( PyCFunction ) Id___ne__, METH_VARARGS, "Operator !=" }, + {"__lt__", ( PyCFunction ) Id___lt__, METH_VARARGS, "Operator <" }, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Freestyle method def------------------------------*/ +/*-----------------------BPy_Id type definition ------------------------------*/ PyTypeObject Id_Type = { PyObject_HEAD_INIT( NULL ) 0, /* ob_size */ - "Id", /* tp_name */ - sizeof( BPy_Id ), /* tp_basicsize */ + "Id", /* tp_name */ + sizeof( BPy_Id ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ + (destructor)Id___dealloc__, /* tp_dealloc */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ - NULL, /* tp_repr */ + (reprfunc)Id___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -77,17 +92,17 @@ PyTypeObject Id_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - NULL, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + BPy_Id_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Id___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + Id___new__, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -105,20 +120,57 @@ PyTypeObject Id_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyObject *Id_Init( void ) +PyMODINIT_FUNC Id_Init( PyObject *module ) { - PyObject *submodule; - + if( module == NULL ) + return; + if( PyType_Ready( &Id_Type ) < 0 ) - return NULL; - - submodule = Py_InitModule3( "Blender.Freestyle.Id", M_Id_methods, M_Id_doc ); - - return submodule; + return; + + Py_INCREF( &Id_Type ); + PyModule_AddObject(module, "Id", (PyObject *)&Id_Type); } //------------------------INSTANCE METHODS ---------------------------------- +PyObject * Id___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + BPy_Id *self; + + self = (BPy_Id *)type->tp_alloc(type, 0); + if (self != NULL) { + self->id = new Id(); + } + + return (PyObject *)self; +} + +void Id___dealloc__(BPy_Id* self) +{ + delete self->id; + self->ob_type->tp_free((PyObject*)self); +} + +int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds) +{ + int first = 0, second = 0; + static char *kwlist[] = {"first", "second", NULL}; + + if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &first, &second) ) + return -1; + + self->id->setFirst( first ); + self->id->setSecond( second ); + + return 0; +} + +PyObject * Id___repr__(BPy_Id* self) +{ + return PyString_FromFormat("[ first: %i, second: %i ](BPy_Id)", self->id->getFirst(), self->id->getSecond() ); +} + PyObject *Id_getFirst( BPy_Id *self ) { return PyInt_FromLong( self->id->getFirst() ); } @@ -130,14 +182,13 @@ PyObject *Id_getSecond( BPy_Id *self) { PyObject *Id_setFirst( BPy_Id *self , PyObject *args) { - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; unsigned int i; - if( !PyArg_ParseTuple(args, (char *)"OO:Id_setFirst", &obj1, &obj2) ) + if( !PyArg_ParseTuple(args, (char *)"i:Id_setFirst", i) ) { cout << "ERROR: Id_setFirst" << endl; + Py_RETURN_NONE; + } - i = static_cast( PyInt_AsLong(obj2) ); self->id->setFirst( i ); Py_RETURN_NONE; @@ -145,48 +196,50 @@ PyObject *Id_setFirst( BPy_Id *self , PyObject *args) { PyObject *Id_setSecond( BPy_Id *self , PyObject *args) { - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; unsigned int i; - if( !PyArg_ParseTuple(args, (char *)"OO:Id_setSecond", &obj1, &obj2) ) + if( !PyArg_ParseTuple(args, (char *)"i:Id_setSecond", i) ) { cout << "ERROR: Id_setSecond" << endl; + Py_RETURN_NONE; + } - i = static_cast( PyInt_AsLong(obj2) ); self->id->setSecond( i ); Py_RETURN_NONE; } PyObject *Id___eq__( BPy_Id *self , PyObject *args) { - BPy_Id * obj1 = 0 ; - BPy_Id * obj2 = 0 ; + BPy_Id * other = 0 ; - if( !PyArg_ParseTuple(args, (char *)"OO:Id___eq__", &obj1, &obj2) ) + if( !PyArg_ParseTuple(args, (char *)"O:Id___eq__", &other) ) { cout << "ERROR: Id___eq__" << endl; + Py_RETURN_NONE; + } - return PyBool_from_bool( obj1->id == obj2->id ); + return PyBool_from_bool( self->id == other->id ); } -PyObject *Id___ne__(PyObject *self , PyObject *args) { - BPy_Id * obj1 = 0 ; - BPy_Id * obj2 = 0 ; +PyObject *Id___ne__(BPy_Id *self , PyObject *args) { + BPy_Id * other = 0 ; - if( !PyArg_ParseTuple(args, (char *)"OO:Id___ne__", &obj1, &obj2) ) + if( !PyArg_ParseTuple(args, (char *)"O:Id___ne__", &other) ) { cout << "ERROR: Id___ne__" << endl; - - return PyBool_from_bool( obj1->id != obj2->id ); + Py_RETURN_NONE; + } + + return PyBool_from_bool( self->id != other->id ); } -PyObject *Id___lt__(PyObject *self , PyObject *args) { - BPy_Id * obj1 = 0 ; - BPy_Id * obj2 = 0 ; +PyObject *Id___lt__(BPy_Id *self , PyObject *args) { + BPy_Id * other = 0 ; - if( !PyArg_ParseTuple(args, (char *)"OO:Id___lt__", &obj1, &obj2) ) + if( !PyArg_ParseTuple(args, (char *)"O:Id___lt__", &other) ) { cout << "ERROR: Id___lt__" << endl; - - return PyBool_from_bool( obj1->id < obj2->id ); + Py_RETURN_NONE; + } + + return PyBool_from_bool( self->id <= other->id ); } diff --git a/source/blender/freestyle/intern/python/Id.h b/source/blender/freestyle/intern/python/Id.h index 032f35f7094..608ff3eef99 100644 --- a/source/blender/freestyle/intern/python/Id.h +++ b/source/blender/freestyle/intern/python/Id.h @@ -27,8 +27,7 @@ typedef struct { /*---------------------------Python BPy_Id visible prototypes-----------*/ -PyObject *Id_Init( void ); - +PyMODINIT_FUNC Id_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index e09e0447aa7..47b9b28839f 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -8,18 +8,42 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for Interface0D instance -----------*/ +static PyObject * Interface0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static void Interface0D___dealloc__(BPy_Interface0D *self); +static PyObject * Interface0D___repr__(BPy_Interface0D *self); -/*-----------------------Python API function prototypes for the Interface0D module--*/ -//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); -/*-----------------------Interface0D module doc strings-----------------------------*/ -static char M_Interface0D_doc[] = "The Blender.Freestyle.Interface0D submodule"; -/*----------------------Interface0D module method def----------------------------*/ -struct PyMethodDef M_Interface0D_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, +static PyObject *Interface0D_getExactTypeName( BPy_Interface0D *self ); +static PyObject *Interface0D_getX( BPy_Interface0D *self ); +static PyObject *Interface0D_getY( BPy_Interface0D *self ); +static PyObject *Interface0D_getZ( BPy_Interface0D *self ); +static PyObject *Interface0D_getPoint3D( BPy_Interface0D *self ); +static PyObject *Interface0D_getProjectedX( BPy_Interface0D *self ); +static PyObject *Interface0D_getProjectedY( BPy_Interface0D *self ); +static PyObject *Interface0D_getProjectedZ( BPy_Interface0D *self ); +static PyObject *Interface0D_getPoint2D( BPy_Interface0D *self ); +static PyObject *Interface0D_getFEdge( BPy_Interface0D *self ); +static PyObject *Interface0D_getId( BPy_Interface0D *self ); +static PyObject *Interface0D_getNature( BPy_Interface0D *self ); + +/*----------------------Interface0D instance definitions ----------------------------*/ +static PyMethodDef BPy_Interface0D_methods[] = { + {"getExactTypeName", ( PyCFunction ) Interface0D_getExactTypeName, METH_NOARGS, "( )Returns the string of the name of the interface."}, + {"getX", ( PyCFunction ) Interface0D_getX, METH_NOARGS, "( )Returns the 3D x coordinate of the point. "}, + {"getY", ( PyCFunction ) Interface0D_getY, METH_NOARGS, "( )Returns the 3D y coordinate of the point. "}, + {"getZ", ( PyCFunction ) Interface0D_getZ, METH_NOARGS, "( )Returns the 3D z coordinate of the point. "}, + {"getPoint3D", ( PyCFunction ) Interface0D_getPoint3D, METH_NOARGS, "() Returns the 3D point."}, + {"getProjectedX", ( PyCFunction ) Interface0D_getProjectedX, METH_NOARGS, "() Returns the 2D x coordinate of the point."}, + {"getProjectedY", ( PyCFunction ) Interface0D_getProjectedY, METH_NOARGS, "() Returns the 2D y coordinate of the point."}, + {"getProjectedZ", ( PyCFunction ) Interface0D_getProjectedZ, METH_NOARGS, "() Returns the 2D z coordinate of the point."}, + {"getPoint2D", ( PyCFunction ) Interface0D_getPoint2D, METH_NOARGS, "() Returns the 2D point."}, + {"getFEdge", ( PyCFunction ) Interface0D_getFEdge, METH_NOARGS, "() Returns the FEdge that lies between this Interface0D and the Interface0D given as argument."}, + {"getId", ( PyCFunction ) Interface0D_getId, METH_NOARGS, "() Returns the Id of the point."}, + {"getNature", ( PyCFunction ) Interface0D_getNature, METH_NOARGS, "() Returns the nature of the point."}, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Freestyle method def------------------------------*/ +/*-----------------------BPy_Interface0D type definition ------------------------------*/ PyTypeObject Interface0D_Type = { PyObject_HEAD_INIT( NULL ) @@ -29,12 +53,12 @@ PyTypeObject Interface0D_Type = { 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ - NULL, /* tp_repr */ + (destructor)Interface0D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)Interface0D___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -77,17 +101,17 @@ PyTypeObject Interface0D_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - NULL, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + BPy_Interface0D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + (newfunc)Interface0D___new__, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -105,20 +129,43 @@ PyTypeObject Interface0D_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyObject *Interface0D_Init( void ) +PyMODINIT_FUNC Interface0D_Init( PyObject *module ) { - PyObject *submodule; - + if( module == NULL ) + return; + if( PyType_Ready( &Interface0D_Type ) < 0 ) - return NULL; - - submodule = Py_InitModule3( "Blender.Freestyle.Interface0D", M_Interface0D_methods, M_Interface0D_doc ); - - return submodule; + return; + + Py_INCREF( &Interface0D_Type ); + PyModule_AddObject(module, "Interface0D", (PyObject *)&Interface0D_Type); } //------------------------INSTANCE METHODS ---------------------------------- +PyObject * Interface0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + BPy_Interface0D *self; + + self = (BPy_Interface0D *)type->tp_alloc(type, 0); + if (self != NULL) { + self->if0D = new Interface0D(); + } + + return (PyObject *)self; +} + +void Interface0D___dealloc__(BPy_Interface0D* self) +{ + delete self->if0D; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * Interface0D___repr__(BPy_Interface0D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->if0D->getExactTypeName().c_str(), self->if0D ); +} + PyObject *Interface0D_getExactTypeName( BPy_Interface0D *self ) { return PyString_FromString( self->if0D->getExactTypeName().c_str() ); } @@ -170,7 +217,7 @@ PyObject *Interface0D_getFEdge( BPy_Interface0D *self ) { PyObject *Interface0D_getId( BPy_Interface0D *self ) { - // Id + return BPy_Id_from_Id( self->if0D->getId() ); } diff --git a/source/blender/freestyle/intern/python/Interface0D.h b/source/blender/freestyle/intern/python/Interface0D.h index e3e97cbaecd..10df1463da8 100644 --- a/source/blender/freestyle/intern/python/Interface0D.h +++ b/source/blender/freestyle/intern/python/Interface0D.h @@ -24,8 +24,7 @@ typedef struct { /*---------------------------Python BPy_Interface0D visible prototypes-----------*/ -PyObject *Interface0D_Init( void ); - +PyMODINIT_FUNC Interface0D_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 65641c6c8ff..7511401198b 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -8,18 +8,34 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +/*--------------- Python API function prototypes for Interface1D instance -----------*/ +static PyObject * Interface1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static void Interface1D___dealloc__(BPy_Interface1D *self); +static PyObject * Interface1D___repr__(BPy_Interface1D *self); -/*-----------------------Python API function prototypes for the Interface1D module--*/ -//static PyObject *Freestyle_testOutput( BPy_Freestyle * self ); -/*-----------------------Interface1D module doc strings-----------------------------*/ -static char M_Interface1D_doc[] = "The Blender.Freestyle.Interface1D submodule"; -/*----------------------Interface1D module method def----------------------------*/ -struct PyMethodDef M_Interface1D_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, +static PyObject *Interface1D_getExactTypeName( BPy_Interface1D *self ); +static PyObject *Interface1D_getVertices( BPy_Interface1D *self ); +static PyObject *Interface1D_getPoints( BPy_Interface1D *self ); +static PyObject *Interface1D_getLength2D( BPy_Interface1D *self ); +static PyObject *Interface1D_getId( BPy_Interface1D *self ); +static PyObject *Interface1D_getNature( BPy_Interface1D *self ); +static PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ); +static PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args); + +/*----------------------Interface1D instance definitions ----------------------------*/ +static PyMethodDef BPy_Interface1D_methods[] = { + {"getExactTypeName", ( PyCFunction ) Interface1D_getExactTypeName, METH_NOARGS, "( )Returns the string of the name of the interface."}, + {"getVertices", ( PyCFunction ) Interface1D_getVertices, METH_NOARGS, "Returns the vertices"}, + {"getPoints", ( PyCFunction ) Interface1D_getPoints, METH_NOARGS, "Returns the points. The difference with getVertices() is that here we can iterate over points of the 1D element at any given sampling. At each call, a virtual point is created."}, + {"getLength2D", ( PyCFunction ) Interface1D_getLength2D, METH_NOARGS, "Returns the 2D length of the 1D element"}, + {"getId", ( PyCFunction ) Interface1D_getId, METH_NOARGS, "Returns the Id of the 1D element"}, + {"getNature", ( PyCFunction ) Interface1D_getNature, METH_NOARGS, "Returns the nature of the 1D element"}, + {"getTimeStamp", ( PyCFunction ) Interface1D_getTimeStamp, METH_NOARGS, "Returns the time stamp of the 1D element. Mainly used for selection"}, + {"setTimeStamp", ( PyCFunction ) Interface1D_setTimeStamp, METH_VARARGS, "Sets the time stamp for the 1D element"}, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Freestyle method def------------------------------*/ +/*-----------------------BPy_Interface1D type definition ------------------------------*/ PyTypeObject Interface1D_Type = { PyObject_HEAD_INIT( NULL ) @@ -29,12 +45,12 @@ PyTypeObject Interface1D_Type = { 0, /* tp_itemsize */ /* methods */ - NULL, /* tp_dealloc */ - NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ - NULL, /* tp_repr */ + (destructor)Interface1D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)Interface1D___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -77,17 +93,17 @@ PyTypeObject Interface1D_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - NULL, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + BPy_Interface1D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + (newfunc)Interface1D___new__, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -105,31 +121,53 @@ PyTypeObject Interface1D_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyObject *Interface1D_Init( void ) +PyMODINIT_FUNC Interface1D_Init( PyObject *module ) { - PyObject *submodule; - + if( module == NULL ) + return; + if( PyType_Ready( &Interface1D_Type ) < 0 ) - return NULL; - - submodule = Py_InitModule3( "Blender.Freestyle.Interface1D", M_Interface1D_methods, M_Interface1D_doc ); - - return submodule; + return; + + Py_INCREF( &Interface1D_Type ); + PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type); } //------------------------INSTANCE METHODS ---------------------------------- +PyObject * Interface1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + BPy_Interface1D *self; + + self = (BPy_Interface1D *)type->tp_alloc(type, 0); + if (self != NULL) { + self->if1D = new Interface1D(); + } + + return (PyObject *)self; +} + +void Interface1D___dealloc__(BPy_Interface1D* self) +{ + delete self->if1D; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * Interface1D___repr__(BPy_Interface1D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->if1D->getExactTypeName().c_str(), self->if1D ); +} PyObject *Interface1D_getExactTypeName( BPy_Interface1D *self ) { return PyString_FromString( self->if1D->getExactTypeName().c_str() ); } PyObject *Interface1D_getVertices( BPy_Interface1D *self ) { - // Vector + return PyList_New(0); } PyObject *Interface1D_getPoints( BPy_Interface1D *self ) { - // Vector + return PyList_New(0); } PyObject *Interface1D_getLength2D( BPy_Interface1D *self ) { @@ -137,7 +175,7 @@ PyObject *Interface1D_getLength2D( BPy_Interface1D *self ) { } PyObject *Interface1D_getId( BPy_Interface1D *self ) { - // Id + return BPy_Id_from_Id( self->if1D->getId() ); } PyObject *Interface1D_getNature( BPy_Interface1D *self ) { @@ -149,14 +187,13 @@ PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ) { } PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args) { - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - unsigned int timestamp; - - if( !PyArg_ParseTuple(args, (char *)"OO:Interface1D_setTimeStamp", &obj1, &obj2) ) + int timestamp = 0 ; + + if( !PyArg_ParseTuple(args, (char *)"i:Interface1D_setTimeStamp", ×tamp) ) { cout << "ERROR: Interface1D_setTimeStamp" << endl; + Py_RETURN_NONE; + } - timestamp = static_cast( PyInt_AsLong(obj2) ); self->if1D->setTimeStamp( timestamp ); Py_RETURN_NONE; diff --git a/source/blender/freestyle/intern/python/Interface1D.h b/source/blender/freestyle/intern/python/Interface1D.h index 7477d368372..f39203744e4 100644 --- a/source/blender/freestyle/intern/python/Interface1D.h +++ b/source/blender/freestyle/intern/python/Interface1D.h @@ -24,7 +24,7 @@ typedef struct { /*---------------------------Python BPy_Interface1D visible prototypes-----------*/ -PyObject *Interface1D_Init( void ); +PyMODINIT_FUNC Interface1D_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 96dd94c36f9..8c75afc73df 100755 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -139,11 +139,19 @@ public: /*! Returns an iterator over the Interface1D vertices, * pointing to the first vertex. */ - virtual Interface0DIterator verticesBegin() = 0; + virtual Interface0DIterator verticesBegin() { + cerr << "Warning: method verticesBegin() not implemented" << endl; + return Interface0DIterator(); + } + /*! Returns an iterator over the Interface1D vertices, * pointing after the last vertex. */ - virtual Interface0DIterator verticesEnd() = 0; + virtual Interface0DIterator verticesEnd(){ + cerr << "Warning: method verticesEnd() not implemented" << endl; + return Interface0DIterator(); + } + /*! Returns an iterator over the Interface1D points, * pointing to the first point. The difference with * verticesBegin() is that here we can iterate over @@ -153,7 +161,11 @@ public: * The sampling with which we want to iterate over points of * this 1D element. */ - virtual Interface0DIterator pointsBegin(float t=0.f) = 0; + virtual Interface0DIterator pointsBegin(float t=0.f) { + cerr << "Warning: method pointsBegin() not implemented" << endl; + return Interface0DIterator(); + } + /*! Returns an iterator over the Interface1D points, * pointing after the last point. The difference with * verticesEnd() is that here we can iterate over @@ -163,7 +175,10 @@ public: * The sampling with which we want to iterate over points of * this 1D element. */ - virtual Interface0DIterator pointsEnd(float t=0.f) = 0; + virtual Interface0DIterator pointsEnd(float t=0.f) { + cerr << "Warning: method pointsEnd() not implemented" << endl; + return Interface0DIterator(); + } // Data access methods From cc1a6b398da9bd2cec78c4242c5b205f079aa4a6 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 15 Jul 2008 05:33:12 +0000 Subject: [PATCH 390/430] soc-2008-mxcurioni: reimplemented the initialization/allocation for base classes. The Python object type tp_new slot is now set to PyType_GenericNew, instead of the former custom functions. As a note, by default, Python does not set this slot: it is therefore mandatory for the base classes. For children classes, only __init__ is needed. To make our base classes subclasses, the Py_TPFLAGS_BASETYPE flag was added to the object type tp_flags slot. Finally, I began to implement CurvePoint, descendant of Interface0D. This commit allowed me to verify that my SWIG replacement method works: interfaces are well taken into account by children. For a test, use the following code: ================================ import Blender from Blender import Freestyle from Blender.Freestyle import * print Interface0D() print CurvePoint() ================================ The __repr__ method is only implemented in Interface0D: PyObject * Interface0D___repr__(BPy_Interface0D* self) { return PyString_FromFormat("type: %s - address: %p", self->if0D->getExactTypeName().c_str(), self->if0D );} and the result is of the form: type: Interface0D - address: 0x18e5ccc0 type: CurvePoint - address: 0x18e473f0 As you can see, the correct getExactTypeName of the class is called. --- source/blender/freestyle/SConscript | 1 + .../intern/python/BinaryPredicate0D.cpp | 21 +- .../intern/python/BinaryPredicate1D.cpp | 20 +- .../freestyle/intern/python/Freestyle.cpp | 2 + source/blender/freestyle/intern/python/Id.cpp | 34 +- .../freestyle/intern/python/Interface0D.cpp | 26 +- .../intern/python/Interface0D/CurvePoint.cpp | 402 ++++++++++-------- .../intern/python/Interface0D/CurvePoint.h | 31 ++ .../freestyle/intern/python/Interface1D.cpp | 20 +- 9 files changed, 311 insertions(+), 246 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface0D/CurvePoint.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 98a66e272be..f54c12470a6 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -66,6 +66,7 @@ python_sources = [ prefix + '/BinaryPredicate1D.cpp', prefix + '/Id.cpp', prefix + '/Interface0D.cpp', + prefix + '/Interface0D/CurvePoint.cpp', prefix + '/Interface1D.cpp' ] diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp index 107216a6b50..d76c1ba78ba 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp @@ -10,7 +10,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for BinaryPredicate0D instance -----------*/ -static PyObject * BinaryPredicate0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds); static void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D *self); static PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D *self); @@ -59,7 +59,7 @@ PyTypeObject BinaryPredicate0D_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ @@ -90,9 +90,9 @@ PyTypeObject BinaryPredicate0D_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ + (initproc)BinaryPredicate0D___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - (newfunc)BinaryPredicate0D___new__, /* newfunc tp_new; */ + PyType_GenericNew, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -124,16 +124,10 @@ PyMODINIT_FUNC BinaryPredicate0D_Init( PyObject *module ) //------------------------INSTANCE METHODS ---------------------------------- -PyObject * BinaryPredicate0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) { - BPy_BinaryPredicate0D *self; - - self = (BPy_BinaryPredicate0D *)type->tp_alloc(type, 0); - if (self != NULL) { - self->bp0D = new BinaryPredicate0D(); - } - - return (PyObject *)self; + self->bp0D = new BinaryPredicate0D(); + return 0; } void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self) @@ -142,6 +136,7 @@ void BinaryPredicate0D___dealloc__(BPy_BinaryPredicate0D* self) self->ob_type->tp_free((PyObject*)self); } + PyObject * BinaryPredicate0D___repr__(BPy_BinaryPredicate0D* self) { return PyString_FromFormat("type: %s - address: %p", self->bp0D->getName().c_str(), self->bp0D ); diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp index afdab7c08ed..73d5a3a4232 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp @@ -10,7 +10,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for BinaryPredicate1D instance -----------*/ -static PyObject * BinaryPredicate1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds); static void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D *self); static PyObject * BinaryPredicate1D___repr__(BPy_BinaryPredicate1D *self); @@ -58,7 +58,7 @@ PyTypeObject BinaryPredicate1D_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ @@ -89,9 +89,9 @@ PyTypeObject BinaryPredicate1D_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ + (initproc)BinaryPredicate1D___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - BinaryPredicate1D___new__, /* newfunc tp_new; */ + PyType_GenericNew, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -124,16 +124,10 @@ PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) //------------------------INSTANCE METHODS ---------------------------------- -PyObject * BinaryPredicate1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds) { - BPy_BinaryPredicate1D *self; - - self = (BPy_BinaryPredicate1D *)type->tp_alloc(type, 0); - if (self != NULL) { - self->bp1D = new BinaryPredicate1D(); - } - - return (PyObject *)self; + self->bp1D = new BinaryPredicate1D(); + return 0; } void BinaryPredicate1D___dealloc__(BPy_BinaryPredicate1D* self) diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index 93d01b29040..9630aa38f80 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -4,8 +4,10 @@ #include "BinaryPredicate1D.h" #include "Id.h" #include "Interface0D.h" +#include "Interface0D/CurvePoint.h" #include "Interface1D.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp index 1f862df0204..3c769933dcc 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/Id.cpp @@ -9,9 +9,8 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for Id instance -----------*/ -static PyObject * Id___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); -static void Id___dealloc__(BPy_Id *self); static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds); +static void Id___dealloc__(BPy_Id *self); static PyObject * Id___repr__(BPy_Id* self); static PyObject * Id_getFirst( BPy_Id *self ); @@ -69,7 +68,7 @@ PyTypeObject Id_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ @@ -102,7 +101,7 @@ PyTypeObject Id_Type = { 0, /* long tp_dictoffset; */ (initproc)Id___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - Id___new__, /* newfunc tp_new; */ + PyType_GenericNew, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -134,24 +133,6 @@ PyMODINIT_FUNC Id_Init( PyObject *module ) //------------------------INSTANCE METHODS ---------------------------------- -PyObject * Id___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - BPy_Id *self; - - self = (BPy_Id *)type->tp_alloc(type, 0); - if (self != NULL) { - self->id = new Id(); - } - - return (PyObject *)self; -} - -void Id___dealloc__(BPy_Id* self) -{ - delete self->id; - self->ob_type->tp_free((PyObject*)self); -} - int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds) { int first = 0, second = 0; @@ -160,12 +141,17 @@ int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds) if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &first, &second) ) return -1; - self->id->setFirst( first ); - self->id->setSecond( second ); + self->id = new Id( first, second ); return 0; } +void Id___dealloc__(BPy_Id* self) +{ + delete self->id; + self->ob_type->tp_free((PyObject*)self); +} + PyObject * Id___repr__(BPy_Id* self) { return PyString_FromFormat("[ first: %i, second: %i ](BPy_Id)", self->id->getFirst(), self->id->getSecond() ); diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 47b9b28839f..216dbaec1e9 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -1,6 +1,7 @@ #include "Interface0D.h" #include "Convert.h" +#include "Interface0D/CurvePoint.h" #ifdef __cplusplus extern "C" { @@ -9,7 +10,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for Interface0D instance -----------*/ -static PyObject * Interface0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static int Interface0D___init__(BPy_Interface0D *self, PyObject *args, PyObject *kwds); static void Interface0D___dealloc__(BPy_Interface0D *self); static PyObject * Interface0D___repr__(BPy_Interface0D *self); @@ -78,7 +79,7 @@ PyTypeObject Interface0D_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ @@ -109,9 +110,9 @@ PyTypeObject Interface0D_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ + (initproc)Interface0D___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - (newfunc)Interface0D___new__, /* newfunc tp_new; */ + PyType_GenericNew, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -136,23 +137,22 @@ PyMODINIT_FUNC Interface0D_Init( PyObject *module ) if( PyType_Ready( &Interface0D_Type ) < 0 ) return; + + if( PyType_Ready( &CurvePoint_Type ) < 0 ) + return; Py_INCREF( &Interface0D_Type ); PyModule_AddObject(module, "Interface0D", (PyObject *)&Interface0D_Type); + Py_INCREF( &CurvePoint_Type ); + PyModule_AddObject(module, "CurvePoint", (PyObject *)&CurvePoint_Type); } //------------------------INSTANCE METHODS ---------------------------------- -PyObject * Interface0D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +int Interface0D___init__(BPy_Interface0D *self, PyObject *args, PyObject *kwds) { - BPy_Interface0D *self; - - self = (BPy_Interface0D *)type->tp_alloc(type, 0); - if (self != NULL) { - self->if0D = new Interface0D(); - } - - return (PyObject *)self; + self->if0D = new Interface0D(); + return 0; } void Interface0D___dealloc__(BPy_Interface0D* self) diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index 6591973f8b3..e360062b9d6 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -1,176 +1,238 @@ -PyObject *CurvePoint_getExactTypeName(PyObject *self , PyObject *args) { +#include "CurvePoint.h" + +#include "../Convert.h" +#include "../../stroke/Curve.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for CurvePoint instance -----------*/ +static int CurvePoint___init__(BPy_CurvePoint *self, PyObject *args, PyObject *kwds); + +/*----------------------CurvePoint instance definitions ----------------------------*/ +static PyMethodDef BPy_CurvePoint_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_CurvePoint type definition ------------------------------*/ + +PyTypeObject CurvePoint_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "CurvePoint", /* tp_name */ + sizeof( BPy_CurvePoint ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_CurvePoint_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)CurvePoint___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int CurvePoint___init__(BPy_CurvePoint *self, PyObject *args, PyObject *kwds) +{ + + self->py_if0D.if0D = new CurvePoint(); + return 0; } -PyObject *CurvePoint_getX(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getY(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getZ(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getPoint3D(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getProjectedX(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getProjectedY(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getProjectedZ(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getPoint2D(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getFEdge(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getId(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_getNature(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_castToSVertex(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_castToViewVertex(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_castToNonTVertex(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_castToTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_CurvePoint(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint___eq__(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_A(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_B(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_t2d(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_SetA(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_SetB(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_SetT2d(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_fedge(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_point2d(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_point3d(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_normal(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_shape(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occluders_begin(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occluders_end(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occluders_empty(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occluders_size(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occludee(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occluded_shape(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_occludee_empty(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_z_discontinuity(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_curvatureFredo(PyObject *self , PyObject *args) { -} - - -PyObject *CurvePoint_directionFredo(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } +#endif + + + +// +// PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { +// } +// +// +// PyObject *_wrap_delete_CurvePoint(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint___eq__(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_A(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_B(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_t2d(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_SetA(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_SetB(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_SetT2d(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_fedge(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_point2d(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_point3d(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_normal(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_shape(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occluders_begin(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occluders_end(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occluders_empty(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occluders_size(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occludee(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occluded_shape(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_occludee_empty(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_z_discontinuity(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_curvatureFredo(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *CurvePoint_directionFredo(PyObject *self , PyObject *args) { +// } diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h new file mode 100644 index 00000000000..096de2efed3 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CURVEPOINT_H +#define FREESTYLE_PYTHON_CURVEPOINT_H + +#include "../Interface0D.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject CurvePoint_Type; + +#define BPy_CurvePoint_Check(v) \ + ((v)->ob_type == &CurvePoint_Type) + +/*---------------------------Python BPy_CurvePoint structure definition----------*/ +typedef struct { + BPy_Interface0D py_if0D; +} BPy_CurvePoint; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVEPOINT_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 7511401198b..27bb71b2f50 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -9,7 +9,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for Interface1D instance -----------*/ -static PyObject * Interface1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds); +static int Interface1D___init__(BPy_Interface1D *self, PyObject *args, PyObject *kwds); static void Interface1D___dealloc__(BPy_Interface1D *self); static PyObject * Interface1D___repr__(BPy_Interface1D *self); @@ -70,7 +70,7 @@ PyTypeObject Interface1D_Type = { NULL, /* PyBufferProcs *tp_as_buffer; */ /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT, /* long tp_flags; */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ /*** Assigned meaning in release 2.0 ***/ @@ -101,9 +101,9 @@ PyTypeObject Interface1D_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - NULL, /* initproc tp_init; */ + (initproc)Interface1D___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - (newfunc)Interface1D___new__, /* newfunc tp_new; */ + PyType_GenericNew, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ @@ -135,16 +135,10 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) //------------------------INSTANCE METHODS ---------------------------------- -PyObject * Interface1D___new__(PyTypeObject *type, PyObject *args, PyObject *kwds) +int Interface1D___init__(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { - BPy_Interface1D *self; - - self = (BPy_Interface1D *)type->tp_alloc(type, 0); - if (self != NULL) { - self->if1D = new Interface1D(); - } - - return (PyObject *)self; + self->if1D = new Interface1D(); + return 0; } void Interface1D___dealloc__(BPy_Interface1D* self) From e4748940c0a61171d5c4e45d8d5a9637d05ac429 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 17 Jul 2008 06:35:30 +0000 Subject: [PATCH 391/430] soc-2008-mxcurioni: SWIG removal - completed SVertex and CurvePoint classes migration. Stabilized a lot of the code for C++ -> Python conversion. Added the correct rich comparison operator and tested it. Corrected 'dupplicate' typo and changde to __copy__ for Python API. From now on, when a set should be output (PySet_Type), it is given as a list (PyList_Type). The reason is that it doesn't really matter what we bring back to the Python interpreter. The set is guaranteed in memory on the C++ side. For the CurvePoint class, the userdata variable is not yet ported (and will probably available as a list or a dictionary). The CurvePoint implementation works except for the initialization from other CurvePoints: somehow, the inner variables don't seem to be correctly handled. I do not know if it is a bug in Freestyle or if the CurvePoint object's state is correct for my test case. CurvePoint needs more testing. --- source/blender/freestyle/SConscript | 1 + .../intern/python/BinaryPredicate0D.cpp | 2 +- .../intern/python/BinaryPredicate1D.cpp | 2 +- .../freestyle/intern/python/Convert.cpp | 67 ++- .../blender/freestyle/intern/python/Convert.h | 4 +- source/blender/freestyle/intern/python/Id.cpp | 64 +-- .../freestyle/intern/python/Interface0D.cpp | 14 +- .../intern/python/Interface0D/CurvePoint.cpp | 234 ++++----- .../intern/python/Interface0D/CurvePoint.h | 3 +- .../intern/python/Interface0D/SVertex.cpp | 483 +++++++++--------- .../freestyle/intern/python/Interface1D.cpp | 2 +- .../python/Interface1D/FEdge/FEdgeSharp.cpp | 2 +- .../freestyle/intern/swig/ModuleWrapper.cpp | 80 +-- .../freestyle/intern/view_map/Silhouette.h | 12 +- .../freestyle/intern/view_map/ViewMap.h | 18 +- .../freestyle/intern/winged_edge/WEdge.cpp | 20 +- .../freestyle/intern/winged_edge/WEdge.h | 10 +- .../freestyle/intern/winged_edge/WXEdge.h | 8 +- source/blender/freestyle/python/Freestyle.py | 16 +- 19 files changed, 518 insertions(+), 524 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index f54c12470a6..42d78a393eb 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -67,6 +67,7 @@ python_sources = [ prefix + '/Id.cpp', prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', + prefix + '/Interface0D/SVertex.cpp', prefix + '/Interface1D.cpp' ] diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp index d76c1ba78ba..67358c65bbf 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp @@ -153,7 +153,7 @@ PyObject * BinaryPredicate0D___call__( BPy_BinaryPredicate0D *self, PyObject *ar BPy_Interface0D *obj1, *obj2; bool b; - if( !PyArg_ParseTuple(args,(char *)"OO:BinaryPredicate0D___call__", &obj1, obj2) ) { + if( !PyArg_ParseTuple(args,(char *)"OO", &obj1, &obj2) ) { cout << "ERROR: BinaryPredicate0D___call__ " << endl; return NULL; } diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp index 73d5a3a4232..bf2772ecdcc 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp @@ -151,7 +151,7 @@ PyObject *BinaryPredicate1D___call__( BPy_BinaryPredicate1D *self, PyObject *arg BPy_Interface1D *obj1, *obj2; bool b; - if( !PyArg_ParseTuple(args,(char *)"OO:BinaryPredicate1D___call__", &obj1, &obj2) ) { + if( !PyArg_ParseTuple(args,(char *)"OO", &obj1, &obj2) ) { cout << "ERROR: BinaryPredicate1D___call__ " << endl; return NULL; } diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index d87848cde8e..59b2406f480 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -7,21 +7,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -static char M_Convert_doc[] = "The Blender.Freestyle.Convert utility submodule"; -/*----------------------Freestyle module method def----------------------------*/ -struct PyMethodDef M_Convert_methods[] = { -// {"testOutput", ( PyCFunction ) Freestyle_testOutput, METH_NOARGS, "() - Return Curve Data name"}, - {NULL, NULL, 0, NULL} -}; - - -//-------------------MODULE INITIALIZATION-------------------------------- -PyObject *Convert_Init( void ) -{ - return Py_InitModule3( "Blender.Freestyle.Convert", M_Convert_methods, M_Convert_doc ); -} - -//------------------------------------------------------------------------- PyObject *PyBool_from_bool( bool b ){ // SWIG_From_bool @@ -31,32 +16,64 @@ PyObject *PyBool_from_bool( bool b ){ PyObject *Vector_from_Vec2f( Vec2f vec ) { float vec_data[2]; // because vec->_coord is protected - vec_data[0] = vec.x(); vec_data[1] = vec.y(); - return newVectorObject( vec_data, 2, Py_NEW); + + if( &vec != 0 ){ + vec_data[0] = vec.x(); vec_data[1] = vec.y(); + return newVectorObject( vec_data, 2, Py_NEW); + } + + Py_RETURN_NONE; } PyObject *Vector_from_Vec3f( Vec3f vec ) { float vec_data[3]; // because vec->_coord is protected - vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); - return newVectorObject( vec_data, 3, Py_NEW); + + if( &vec != 0 ){ + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); + } + + Py_RETURN_NONE; } PyObject *Vector_from_Vec3r( Vec3r vec ) { float vec_data[3]; // because vec->_coord is protected - vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); - return newVectorObject( vec_data, 3, Py_NEW); + + if( &vec != 0 ){ + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); + } + + Py_RETURN_NONE; } PyObject *BPy_Id_from_Id( Id id ) { BPy_Id *py_id; - py_id = (BPy_Id *) Id_Type.tp_new( &Id_Type, 0, 0 ); - py_id->id->setFirst( id.getFirst() ); - py_id->id->setSecond( id.getSecond() ); + if( &id != 0 ) { + py_id = (BPy_Id *) Id_Type.tp_new( &Id_Type, 0, 0 ); + py_id->id = new Id( id.getFirst(), id.getSecond() ); + + return (PyObject *)py_id; + } - return (PyObject *)py_id; + Py_RETURN_NONE; } +PyObject *BPy_SVertex_from_SVertex( SVertex sv ) { + BPy_SVertex *py_sv; + + if( &sv != 0 ) { + py_sv = (BPy_SVertex *) SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); + py_sv->sv = new SVertex( sv ); + py_sv->py_if0D.if0D = py_sv->sv; + + return (PyObject *)py_sv; + } + + Py_RETURN_NONE; +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index a2e7eeafd94..ba8e3ea02d2 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -5,6 +5,7 @@ using namespace Geometry; #include "Id.h" +#include "Interface0D/SVertex.h" #ifdef __cplusplus extern "C" { @@ -16,8 +17,6 @@ extern "C" { #include "api2_2x/vector.h" #include "api2_2x/gen_utils.h" -PyObject *Convert_Init( void ); - PyObject *PyBool_from_bool( bool b ); PyObject *Vector_from_Vec2f( Vec2f v ); @@ -25,6 +24,7 @@ PyObject *Vector_from_Vec3f( Vec3f v ); PyObject *Vector_from_Vec3r( Vec3r v ); PyObject *BPy_Id_from_Id( Id id ); +PyObject *BPy_SVertex_from_SVertex( SVertex sv ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/Id.cpp index 3c769933dcc..4f2964d8060 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/Id.cpp @@ -12,14 +12,12 @@ extern "C" { static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds); static void Id___dealloc__(BPy_Id *self); static PyObject * Id___repr__(BPy_Id* self); +static PyObject * Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid); static PyObject * Id_getFirst( BPy_Id *self ); static PyObject * Id_getSecond( BPy_Id *self); static PyObject * Id_setFirst( BPy_Id *self , PyObject *args); static PyObject * Id_setSecond( BPy_Id *self , PyObject *args); -static PyObject * Id___eq__( BPy_Id *self , PyObject *args); -static PyObject * Id___ne__( BPy_Id *self , PyObject *args); -static PyObject * Id___lt__( BPy_Id *self , PyObject *args); /*----------------------Id instance definitions ----------------------------*/ static PyMethodDef BPy_Id_methods[] = { @@ -27,9 +25,6 @@ static PyMethodDef BPy_Id_methods[] = { {"getSecond", ( PyCFunction ) Id_getSecond, METH_NOARGS, "Returns the second Id number" }, {"setFirst", ( PyCFunction ) Id_setFirst, METH_VARARGS, "Sets the first number constituing the Id" }, {"setSecond", ( PyCFunction ) Id_setSecond, METH_VARARGS, "Sets the second number constituing the Id" }, - {"__eq__", ( PyCFunction ) Id___eq__, METH_VARARGS, "Operator ==" }, - {"__ne__", ( PyCFunction ) Id___ne__, METH_VARARGS, "Operator !=" }, - {"__lt__", ( PyCFunction ) Id___lt__, METH_VARARGS, "Operator <" }, {NULL, NULL, 0, NULL} }; @@ -80,7 +75,7 @@ PyTypeObject Id_Type = { /*** Assigned meaning in release 2.1 ***/ /*** rich comparisons ***/ - NULL, /* richcmpfunc tp_richcompare; */ + (richcmpfunc)Id_RichCompare, /* richcmpfunc tp_richcompare; */ /*** weak reference enabler ***/ 0, /* long tp_weaklistoffset; */ @@ -170,7 +165,7 @@ PyObject *Id_getSecond( BPy_Id *self) { PyObject *Id_setFirst( BPy_Id *self , PyObject *args) { unsigned int i; - if( !PyArg_ParseTuple(args, (char *)"i:Id_setFirst", i) ) { + if( !PyArg_ParseTuple(args, (char *)"i", &i) ) { cout << "ERROR: Id_setFirst" << endl; Py_RETURN_NONE; } @@ -184,7 +179,7 @@ PyObject *Id_setFirst( BPy_Id *self , PyObject *args) { PyObject *Id_setSecond( BPy_Id *self , PyObject *args) { unsigned int i; - if( !PyArg_ParseTuple(args, (char *)"i:Id_setSecond", i) ) { + if( !PyArg_ParseTuple(args, (char *)"i", &i) ) { cout << "ERROR: Id_setSecond" << endl; Py_RETURN_NONE; } @@ -194,38 +189,29 @@ PyObject *Id_setSecond( BPy_Id *self , PyObject *args) { Py_RETURN_NONE; } -PyObject *Id___eq__( BPy_Id *self , PyObject *args) { - BPy_Id * other = 0 ; - - if( !PyArg_ParseTuple(args, (char *)"O:Id___eq__", &other) ) { - cout << "ERROR: Id___eq__" << endl; - Py_RETURN_NONE; +PyObject * Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid) { + switch(opid){ + case Py_LT: + return PyBool_from_bool( o1->id->operator<(*(o2->id)) ); + break; + case Py_LE: + return PyBool_from_bool( o1->id->operator<(*(o2->id)) || o1->id->operator<(*(o2->id)) ); + break; + case Py_EQ: + return PyBool_from_bool( o1->id->operator==(*(o2->id)) ); + break; + case Py_NE: + return PyBool_from_bool( o1->id->operator!=(*(o2->id)) ); + break; + case Py_GT: + return PyBool_from_bool(!( o1->id->operator<(*(o2->id)) || o1->id->operator<(*(o2->id)) )); + break; + case Py_GE: + return PyBool_from_bool(!( o1->id->operator<(*(o2->id)) )); + break; } - return PyBool_from_bool( self->id == other->id ); -} - - -PyObject *Id___ne__(BPy_Id *self , PyObject *args) { - BPy_Id * other = 0 ; - - if( !PyArg_ParseTuple(args, (char *)"O:Id___ne__", &other) ) { - cout << "ERROR: Id___ne__" << endl; - Py_RETURN_NONE; - } - - return PyBool_from_bool( self->id != other->id ); -} - -PyObject *Id___lt__(BPy_Id *self , PyObject *args) { - BPy_Id * other = 0 ; - - if( !PyArg_ParseTuple(args, (char *)"O:Id___lt__", &other) ) { - cout << "ERROR: Id___lt__" << endl; - Py_RETURN_NONE; - } - - return PyBool_from_bool( self->id <= other->id ); + Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 216dbaec1e9..27804b3d276 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -2,6 +2,7 @@ #include "Convert.h" #include "Interface0D/CurvePoint.h" +#include "Interface0D/SVertex.h" #ifdef __cplusplus extern "C" { @@ -137,14 +138,19 @@ PyMODINIT_FUNC Interface0D_Init( PyObject *module ) if( PyType_Ready( &Interface0D_Type ) < 0 ) return; - - if( PyType_Ready( &CurvePoint_Type ) < 0 ) - return; - Py_INCREF( &Interface0D_Type ); PyModule_AddObject(module, "Interface0D", (PyObject *)&Interface0D_Type); + + if( PyType_Ready( &CurvePoint_Type ) < 0 ) + return; Py_INCREF( &CurvePoint_Type ); PyModule_AddObject(module, "CurvePoint", (PyObject *)&CurvePoint_Type); + + if( PyType_Ready( &SVertex_Type ) < 0 ) + return; + Py_INCREF( &SVertex_Type ); + PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type); + } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index e360062b9d6..5a81f07973d 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -11,9 +11,25 @@ extern "C" { /*--------------- Python API function prototypes for CurvePoint instance -----------*/ static int CurvePoint___init__(BPy_CurvePoint *self, PyObject *args, PyObject *kwds); +static PyObject * CurvePoint___copy__( BPy_CurvePoint *self ); +static PyObject * CurvePoint_A( BPy_CurvePoint *self ); +static PyObject * CurvePoint_B( BPy_CurvePoint *self ); +static PyObject * CurvePoint_t2d( BPy_CurvePoint *self ); +static PyObject *CurvePoint_SetA( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_SetB( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_SetT2d( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_curvatureFredo( BPy_CurvePoint *self , PyObject *args); /*----------------------CurvePoint instance definitions ----------------------------*/ static PyMethodDef BPy_CurvePoint_methods[] = { + {"__copy__", ( PyCFunction ) CurvePoint___copy__, METH_NOARGS, "( )Cloning method."}, + {"A", ( PyCFunction ) CurvePoint_A, METH_NOARGS, "( )Returns the first SVertex upon which the CurvePoint is built."}, + {"B", ( PyCFunction ) CurvePoint_B, METH_NOARGS, "( )Returns the second SVertex upon which the CurvePoint is built."}, + {"t2d", ( PyCFunction ) CurvePoint_t2d, METH_NOARGS, "( )Returns the interpolation parameter."}, + {"SetA", ( PyCFunction ) CurvePoint_SetA, METH_VARARGS, "(SVertex sv )Sets the first SVertex upon which to build the CurvePoint."}, + {"SetB", ( PyCFunction ) CurvePoint_SetB, METH_VARARGS, "(SVertex sv )Sets the second SVertex upon which to build the CurvePoint."}, + {"SetT2d", ( PyCFunction ) CurvePoint_SetT2d, METH_VARARGS, "( )Sets the 2D interpolation parameter to use."}, + {"curvatureFredo", ( PyCFunction ) CurvePoint_curvatureFredo, METH_NOARGS, "( )angle in radians."}, {NULL, NULL, 0, NULL} }; @@ -110,129 +126,113 @@ PyTypeObject CurvePoint_Type = { int CurvePoint___init__(BPy_CurvePoint *self, PyObject *args, PyObject *kwds) { - self->py_if0D.if0D = new CurvePoint(); + PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0; + + if (! PyArg_ParseTuple(args, "|OOO", &obj1, &obj2, &obj3) ) + return -1; + + if( !obj1 && !obj2 && !obj3 ){ + self->cp = new CurvePoint(); + } else if( PyFloat_Check(obj3) ) { + if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + self->cp = new CurvePoint( ((BPy_SVertex *) obj1)->sv, + ((BPy_SVertex *) obj2)->sv, + PyFloat_AsDouble( obj3 ) ); + } else if( BPy_CurvePoint_Check(obj1) && BPy_CurvePoint_Check(obj2) ) { + self->cp = new CurvePoint( ((BPy_CurvePoint *) obj1)->cp, + ((BPy_CurvePoint *) obj2)->cp, + PyFloat_AsDouble( obj3 ) ); + } else { + return -1; + } + } else { + return -1; + } + + self->py_if0D.if0D = self->cp; + return 0; } +PyObject * CurvePoint___copy__( BPy_CurvePoint *self ) { + BPy_CurvePoint *py_cp; + + py_cp = (BPy_CurvePoint *) CurvePoint_Type.tp_new( &CurvePoint_Type, 0, 0 ); + + py_cp->cp = new CurvePoint( *(self->cp) ); + py_cp->py_if0D.if0D = py_cp->cp; + + return (PyObject *) py_cp; +} + +PyObject * CurvePoint_A( BPy_CurvePoint *self ) { + if( self->cp->A() ) + return BPy_SVertex_from_SVertex( *(self->cp->A()) ); + + Py_RETURN_NONE; +} + +PyObject * CurvePoint_B( BPy_CurvePoint *self ) { + if( self->cp->B() ) + return BPy_SVertex_from_SVertex( *(self->cp->B()) ); + + Py_RETURN_NONE; +} + +PyObject * CurvePoint_t2d( BPy_CurvePoint *self ) { + return PyFloat_FromDouble( self->cp->t2d() ); +} + +PyObject *CurvePoint_SetA( BPy_CurvePoint *self , PyObject *args) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: CurvePoint_SetA" << endl; + Py_RETURN_NONE; + } + + self->cp->SetA( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +PyObject *CurvePoint_SetB( BPy_CurvePoint *self , PyObject *args) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: CurvePoint_SetB" << endl; + Py_RETURN_NONE; + } + + self->cp->SetB( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +PyObject *CurvePoint_SetT2d( BPy_CurvePoint *self , PyObject *args) { + float t; + + if( !PyArg_ParseTuple(args, "f", &t) ) { + cout << "ERROR: CurvePoint_SetT2d" << endl; + Py_RETURN_NONE; + } + + self->cp->SetT2d( t ); + + Py_RETURN_NONE; +} + +PyObject *CurvePoint_curvatureFredo( BPy_CurvePoint *self , PyObject *args) { + return PyFloat_FromDouble( self->cp->curvatureFredo() ); +} + +///bool operator== (const CurvePoint &b) + + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus } #endif - - - -// -// PyObject *_wrap_new_CurvePoint__SWIG_0(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_CurvePoint__SWIG_1(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_CurvePoint__SWIG_2(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_CurvePoint__SWIG_3(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { -// } -// -// -// PyObject *_wrap_delete_CurvePoint(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint___eq__(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_A(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_B(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_t2d(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_SetA(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_SetB(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_SetT2d(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_fedge(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_point2d(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_point3d(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_normal(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_shape(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occluders_begin(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occluders_end(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occluders_empty(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occluders_size(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occludee(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occluded_shape(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_occludee_empty(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_z_discontinuity(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_curvatureFredo(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *CurvePoint_directionFredo(PyObject *self , PyObject *args) { -// } - - diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h index 096de2efed3..ac30f74c4dd 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h @@ -2,7 +2,7 @@ #define FREESTYLE_PYTHON_CURVEPOINT_H #include "../Interface0D.h" - +#include "../../stroke/Curve.h" #ifdef __cplusplus extern "C" { @@ -20,6 +20,7 @@ extern PyTypeObject CurvePoint_Type; /*---------------------------Python BPy_CurvePoint structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; + CurvePoint *cp; } BPy_CurvePoint; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp index 41d01d4b649..fd5b372a1d9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp @@ -1,268 +1,251 @@ - PyObject *_wrap_SVertex_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getPoint3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getProjectedX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getProjectedY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getProjectedZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getPoint2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_castToSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_castToViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_castToNonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_castToTVertex(PyObject *self , PyObject *args) { -} +#include "SVertex.h" + +#include "../Convert.h" +#include "../Id.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SVertex instance -----------*/ +static int SVertex___init__(BPy_SVertex *self, PyObject *args, PyObject *kwds); +static PyObject * SVertex___copy__( BPy_SVertex *self ); +static PyObject * SVertex_normals( BPy_SVertex *self ); +static PyObject * SVertex_normalsSize( BPy_SVertex *self ); +static PyObject * SVertex_SetPoint3D( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_SetPoint2D( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_AddNormal( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_SetId( BPy_SVertex *self , PyObject *args); +/*----------------------SVertex instance definitions ----------------------------*/ +static PyMethodDef BPy_SVertex_methods[] = { + {"__copy__", ( PyCFunction ) SVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {"normals", ( PyCFunction ) SVertex_normals, METH_NOARGS, "Returns the normals for this Vertex as a list. In a smooth surface, a vertex has exactly one normal. In a sharp surface, a vertex can have any number of normals."}, + {"normalsSize", ( PyCFunction ) SVertex_normalsSize, METH_NOARGS, "Returns the number of different normals for this vertex." }, + {"SetPoint3D", ( PyCFunction ) SVertex_SetPoint3D, METH_VARARGS, "Sets the 3D coordinates of the SVertex." }, + {"SetPoint2D", ( PyCFunction ) SVertex_SetPoint2D, METH_VARARGS, "Sets the 3D projected coordinates of the SVertex." }, + {"AddNormal", ( PyCFunction ) SVertex_AddNormal, METH_VARARGS, "Adds a normal to the Svertex's set of normals. If the same normal is already in the set, nothing changes." }, + {"SetId", ( PyCFunction ) SVertex_SetId, METH_VARARGS, "Sets the Id." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_SVertex type definition ------------------------------*/ + +PyTypeObject SVertex_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SVertex", /* tp_name */ + sizeof( BPy_SVertex ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_SVertex_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SVertex___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int SVertex___init__(BPy_SVertex *self, PyObject *args, PyObject *kwds) +{ + PyObject *py_point = 0; + BPy_Id *py_id = 0; + + if (! PyArg_ParseTuple(args, "|OO", &py_point, &py_id) ) + return -1; + + if( py_point && py_id && PyList_Check(py_point) && PyList_Size(py_point) == 3 ) { + Vec3r v( PyFloat_AsDouble( PyList_GetItem(py_point, 0) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 1) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 2) ) ); + + self->sv = new SVertex( v, *(py_id->id) ); + } else { + self->sv = new SVertex(); + } + + self->py_if0D.if0D = self->sv; + + return 0; +} + +PyObject * SVertex___copy__( BPy_SVertex *self ) { + BPy_SVertex *py_svertex; + + py_svertex = (BPy_SVertex *) SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); + + py_svertex->sv = self->sv->duplicate(); + py_svertex->py_if0D.if0D = py_svertex->sv; + + return (PyObject *) py_svertex; +} + + +PyObject * SVertex_normals( BPy_SVertex *self ) { + PyObject *py_normals; + set< Vec3r > normals; + + py_normals = PyList_New(NULL); + normals = self->sv->normals(); + + for( set< Vec3r >::iterator set_iterator = normals.begin(); set_iterator != normals.end(); set_iterator++ ) { + PyList_Append( py_normals, Vector_from_Vec3r(*set_iterator) ); + } + + return py_normals; +} + +PyObject * SVertex_normalsSize( BPy_SVertex *self ) { + return PyInt_FromLong( self->sv->normalsSize() ); +} + +PyObject *SVertex_SetPoint3D( BPy_SVertex *self , PyObject *args) { + PyObject *py_point; + + if(!( PyArg_ParseTuple(args, "O", &py_point) + && PyList_Check(py_point) && PyList_Size(py_point) == 3 )) { + cout << "ERROR: SVertex_SetPoint3D" << endl; + Py_RETURN_NONE; + } + + Vec3r v( PyFloat_AsDouble( PyList_GetItem(py_point, 0) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 1) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 2) ) ); + self->sv->SetPoint3D( v ); + + Py_RETURN_NONE; +} + +PyObject *SVertex_SetPoint2D( BPy_SVertex *self , PyObject *args) { + PyObject *py_point; + + if(!( PyArg_ParseTuple(args, "O", &py_point) + && PyList_Check(py_point) && PyList_Size(py_point) == 3 )) { + cout << "ERROR: SVertex_SetPoint2D" << endl; + Py_RETURN_NONE; + } + Vec3r v( PyFloat_AsDouble( PyList_GetItem(py_point, 0) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 1) ), + PyFloat_AsDouble( PyList_GetItem(py_point, 2) ) ); + self->sv->SetPoint2D( v ); - PyObject *_wrap_SVertex_userdata_set(PyObject *self , PyObject *args) { + Py_RETURN_NONE; } +PyObject *SVertex_AddNormal( BPy_SVertex *self , PyObject *args) { + PyObject *py_normal; - PyObject *_wrap_SVertex_userdata_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_SVertex__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_SVertex__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_SVertex__SWIG_2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_SVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_dupplicate(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex___eq__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_point3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_point2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_normals(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_normalsSize(PyObject *self , PyObject *args) { -} + if(!( PyArg_ParseTuple(args, "O", &py_normal) + && PyList_Check(py_normal) && PyList_Size(py_normal) == 3 )) { + cout << "ERROR: SVertex_AddNormal" << endl; + Py_RETURN_NONE; + } + + cout << "yoyo" << endl; + Vec3r n( PyFloat_AsDouble( PyList_GetItem(py_normal, 0) ), + PyFloat_AsDouble( PyList_GetItem(py_normal, 1) ), + PyFloat_AsDouble( PyList_GetItem(py_normal, 2) ) ); + self->sv->AddNormal( n ); - PyObject *_wrap_SVertex_fedges(PyObject *self , PyObject *args) { + Py_RETURN_NONE; } +PyObject *SVertex_SetId( BPy_SVertex *self , PyObject *args) { + BPy_Id *py_id; - PyObject *_wrap_SVertex_fedges_begin(PyObject *self , PyObject *args) { -} + if( !PyArg_ParseTuple(args, "O", &py_id) ) { + cout << "ERROR: SVertex_SetId" << endl; + Py_RETURN_NONE; + } + self->sv->SetId( *(py_id->id) ); - PyObject *_wrap_SVertex_fedges_end(PyObject *self , PyObject *args) { + Py_RETURN_NONE; } +// virtual bool operator== (const SVertex &iBrother) +// ViewVertex * viewvertex () +// void AddFEdge (FEdge *iFEdge) - PyObject *_wrap_SVertex_shape__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_z(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_viewvertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_SetPoint3D(PyObject *self , PyObject *args) { -} - +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_SVertex_SetPoint2D(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_SVertex_AddNormal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_setCurvatureInfo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_getCurvatureInfo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_setCurvatureFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_setDirectionFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_curvatureFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_directionFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_SetId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_SetFEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_SetShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_SetViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_AddFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_Replace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_fedge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_point2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_point3d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_normal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_shape_id(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_shape__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_SVertex_shape_importance(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_qi(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occluders_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occluders_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occluders_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occluders_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occludee(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occluded_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_occludee_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SVertex_z_discontinuity(PyObject *self , PyObject *args) { -} - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 27bb71b2f50..27c5f4d08ff 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -183,7 +183,7 @@ PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ) { PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args) { int timestamp = 0 ; - if( !PyArg_ParseTuple(args, (char *)"i:Interface1D_setTimeStamp", ×tamp) ) { + if( !PyArg_ParseTuple(args, (char *)"i", ×tamp) ) { cout << "ERROR: Interface1D_setTimeStamp" << endl; Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp index d6bd8c6f085..da409ffe209 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp @@ -1,4 +1,4 @@ - PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *self , PyObject *args) { + PyObject *_wrap_FEdgeSharp_duplicate(PyObject *self , PyObject *args) { } diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index 94662595bd9..df94340e88a 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -29688,7 +29688,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; SVertex *result = 0 ; @@ -29696,15 +29696,15 @@ SWIGINTERN PyObject *_wrap_SVertex_dupplicate(PyObject *SWIGUNUSEDPARM(self), Py int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SVertex_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:SVertex_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_dupplicate" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_duplicate" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); { try { - result = (SVertex *)(arg1)->dupplicate(); + result = (SVertex *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -31592,7 +31592,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; FEdge *result = 0 ; @@ -31600,15 +31600,15 @@ SWIGINTERN PyObject *_wrap_FEdge_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyOb int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:FEdge_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:FEdge_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_dupplicate" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_duplicate" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); { try { - result = (FEdge *)(arg1)->dupplicate(); + result = (FEdge *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -34543,7 +34543,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; SVertex *result = 0 ; @@ -34551,15 +34551,15 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUSEDP int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSVertexIterator_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_dupplicate" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_duplicate" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); { try { - result = (SVertex *)(*arg1)->dupplicate(); + result = (SVertex *)(*arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36256,7 +36256,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSharp_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; FEdge *result = 0 ; @@ -36264,15 +36264,15 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_dupplicate(PyObject *SWIGUNUSEDPARM(self), int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSharp_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_dupplicate" "', argument " "1"" of type '" "FEdgeSharp *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_duplicate" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); { try { - result = (FEdge *)(arg1)->dupplicate(); + result = (FEdge *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36843,7 +36843,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSmooth_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; FEdge *result = 0 ; @@ -36851,15 +36851,15 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *SWIGUNUSEDPARM(self) int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:FEdgeSmooth_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_dupplicate" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_duplicate" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); { try { - result = (FEdge *)(arg1)->dupplicate(); + result = (FEdge *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37278,7 +37278,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; SShape *result = 0 ; @@ -37286,15 +37286,15 @@ SWIGINTERN PyObject *_wrap_SShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyO int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SShape_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:SShape_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_dupplicate" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_duplicate" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); { try { - result = (SShape *)(arg1)->dupplicate(); + result = (SShape *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -54232,7 +54232,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShape_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; ViewShape *result = 0 ; @@ -54240,15 +54240,15 @@ SWIGINTERN PyObject *_wrap_ViewShape_dupplicate(PyObject *SWIGUNUSEDPARM(self), int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:ViewShape_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_dupplicate" "', argument " "1"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_duplicate" "', argument " "1"" of type '" "ViewShape *""'"); } arg1 = reinterpret_cast< ViewShape * >(argp1); { try { - result = (ViewShape *)(arg1)->dupplicate(); + result = (ViewShape *)(arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -56608,7 +56608,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; SVertex *result = 0 ; @@ -56616,15 +56616,15 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_dupplicate(PyObject *SWIGUNUS int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_dupplicate",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeSVertexIterator_duplicate",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_dupplicate" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_duplicate" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { try { - result = (SVertex *)(*arg1)->dupplicate(); + result = (SVertex *)(*arg1)->duplicate(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106893,7 +106893,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SVertex_userdata_get", _wrap_SVertex_userdata_get, METH_VARARGS, NULL}, { (char *)"new_SVertex", _wrap_new_SVertex, METH_VARARGS, NULL}, { (char *)"delete_SVertex", _wrap_delete_SVertex, METH_VARARGS, NULL}, - { (char *)"SVertex_dupplicate", _wrap_SVertex_dupplicate, METH_VARARGS, NULL}, + { (char *)"SVertex_duplicate", _wrap_SVertex_duplicate, METH_VARARGS, NULL}, { (char *)"SVertex___eq__", _wrap_SVertex___eq__, METH_VARARGS, NULL}, { (char *)"SVertex_point3D", _wrap_SVertex_point3D, METH_VARARGS, NULL}, { (char *)"SVertex_point2D", _wrap_SVertex_point2D, METH_VARARGS, NULL}, @@ -106943,7 +106943,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdge_userdata_get", _wrap_FEdge_userdata_get, METH_VARARGS, NULL}, { (char *)"new_FEdge", _wrap_new_FEdge, METH_VARARGS, NULL}, { (char *)"delete_FEdge", _wrap_delete_FEdge, METH_VARARGS, NULL}, - { (char *)"FEdge_dupplicate", _wrap_FEdge_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdge_duplicate", _wrap_FEdge_duplicate, METH_VARARGS, NULL}, { (char *)"FEdge_vertexA", _wrap_FEdge_vertexA, METH_VARARGS, NULL}, { (char *)"FEdge_vertexB", _wrap_FEdge_vertexB, METH_VARARGS, NULL}, { (char *)"FEdge_getNature", _wrap_FEdge_getNature, METH_VARARGS, NULL}, @@ -107021,7 +107021,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSVertexIterator_castToTVertex", _wrap_FEdgeSVertexIterator_castToTVertex, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_userdata_set", _wrap_FEdgeSVertexIterator_userdata_set, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_userdata_get", _wrap_FEdgeSVertexIterator_userdata_get, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_dupplicate", _wrap_FEdgeSVertexIterator_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_duplicate", _wrap_FEdgeSVertexIterator_duplicate, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_point3D", _wrap_FEdgeSVertexIterator_point3D, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_point2D", _wrap_FEdgeSVertexIterator_point2D, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_normals", _wrap_FEdgeSVertexIterator_normals, METH_VARARGS, NULL}, @@ -107065,7 +107065,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSVertexIterator_swigregister", FEdgeSVertexIterator_swigregister, METH_VARARGS, NULL}, { (char *)"new_FEdgeSharp", _wrap_new_FEdgeSharp, METH_VARARGS, NULL}, { (char *)"delete_FEdgeSharp", _wrap_delete_FEdgeSharp, METH_VARARGS, NULL}, - { (char *)"FEdgeSharp_dupplicate", _wrap_FEdgeSharp_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_duplicate", _wrap_FEdgeSharp_duplicate, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_normalA", _wrap_FEdgeSharp_normalA, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_normalB", _wrap_FEdgeSharp_normalB, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_aMaterialIndex", _wrap_FEdgeSharp_aMaterialIndex, METH_VARARGS, NULL}, @@ -107079,7 +107079,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSharp_swigregister", FEdgeSharp_swigregister, METH_VARARGS, NULL}, { (char *)"new_FEdgeSmooth", _wrap_new_FEdgeSmooth, METH_VARARGS, NULL}, { (char *)"delete_FEdgeSmooth", _wrap_delete_FEdgeSmooth, METH_VARARGS, NULL}, - { (char *)"FEdgeSmooth_dupplicate", _wrap_FEdgeSmooth_dupplicate, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_duplicate", _wrap_FEdgeSmooth_duplicate, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_face", _wrap_FEdgeSmooth_face, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_normal", _wrap_FEdgeSmooth_normal, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_materialIndex", _wrap_FEdgeSmooth_materialIndex, METH_VARARGS, NULL}, @@ -107091,7 +107091,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SShape_userdata_set", _wrap_SShape_userdata_set, METH_VARARGS, NULL}, { (char *)"SShape_userdata_get", _wrap_SShape_userdata_get, METH_VARARGS, NULL}, { (char *)"new_SShape", _wrap_new_SShape, METH_VARARGS, NULL}, - { (char *)"SShape_dupplicate", _wrap_SShape_dupplicate, METH_VARARGS, NULL}, + { (char *)"SShape_duplicate", _wrap_SShape_duplicate, METH_VARARGS, NULL}, { (char *)"delete_SShape", _wrap_delete_SShape, METH_VARARGS, NULL}, { (char *)"SShape_AddEdge", _wrap_SShape_AddEdge, METH_VARARGS, NULL}, { (char *)"SShape_AddNewVertex", _wrap_SShape_AddNewVertex, METH_VARARGS, NULL}, @@ -107439,7 +107439,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewShape_userdata_set", _wrap_ViewShape_userdata_set, METH_VARARGS, NULL}, { (char *)"ViewShape_userdata_get", _wrap_ViewShape_userdata_get, METH_VARARGS, NULL}, { (char *)"new_ViewShape", _wrap_new_ViewShape, METH_VARARGS, NULL}, - { (char *)"ViewShape_dupplicate", _wrap_ViewShape_dupplicate, METH_VARARGS, NULL}, + { (char *)"ViewShape_duplicate", _wrap_ViewShape_duplicate, METH_VARARGS, NULL}, { (char *)"delete_ViewShape", _wrap_delete_ViewShape, METH_VARARGS, NULL}, { (char *)"ViewShape_SplitEdge", _wrap_ViewShape_SplitEdge, METH_VARARGS, NULL}, { (char *)"ViewShape_sshape", _wrap_ViewShape_sshape, METH_VARARGS, NULL}, @@ -107494,7 +107494,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdgeSVertexIterator_castToTVertex", _wrap_ViewEdgeSVertexIterator_castToTVertex, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_userdata_set", _wrap_ViewEdgeSVertexIterator_userdata_set, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_userdata_get", _wrap_ViewEdgeSVertexIterator_userdata_get, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_dupplicate", _wrap_ViewEdgeSVertexIterator_dupplicate, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_duplicate", _wrap_ViewEdgeSVertexIterator_duplicate, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_point3D", _wrap_ViewEdgeSVertexIterator_point3D, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_point2D", _wrap_ViewEdgeSVertexIterator_point2D, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_normals", _wrap_ViewEdgeSVertexIterator_normals, METH_VARARGS, NULL}, diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index 958c0545d6d..c6a1763eec6 100755 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -206,7 +206,7 @@ public: } /*! Cloning method. */ - virtual SVertex * dupplicate() { + virtual SVertex * duplicate() { SVertex *clone = new SVertex(*this); return clone; } @@ -455,7 +455,7 @@ public: /*! Destructor */ virtual ~FEdge() {} /*! Cloning method. */ - virtual FEdge* dupplicate() + virtual FEdge* duplicate() { FEdge *clone = new FEdge(*this); return clone; @@ -805,7 +805,7 @@ public: /*! Destructor. */ virtual ~FEdgeSharp() {} /*! Cloning method. */ - virtual FEdge* dupplicate(){ + virtual FEdge* duplicate(){ FEdge *clone = new FEdgeSharp(*this); return clone; } @@ -886,7 +886,7 @@ public: /*! Destructor. */ virtual ~FEdgeSmooth() {} /*! Cloning method. */ - virtual FEdge* dupplicate(){ + virtual FEdge* duplicate(){ FEdge *clone = new FEdgeSmooth(*this); return clone; } @@ -980,7 +980,7 @@ public: e!=eend; e++) { - FEdge *newe = (*e)->dupplicate(); + FEdge *newe = (*e)->duplicate(); _edgesList.push_back(newe); } @@ -1053,7 +1053,7 @@ public: } } /*! Cloning method. */ - virtual SShape * dupplicate() + virtual SShape * duplicate() { SShape *clone = new SShape(*this); return clone; diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index bdbb140e130..7528d27cac6 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -254,7 +254,7 @@ protected: userdata = 0; } /*! Cloning method. */ - virtual ViewVertex * dupplicate() = 0; + virtual ViewVertex * duplicate() = 0; public: /*! Destructor. */ @@ -443,7 +443,7 @@ protected: } /*! Cloning method. */ - virtual ViewVertex * dupplicate() + virtual ViewVertex * duplicate() { TVertex *clone = new TVertex(*this); return clone; @@ -650,7 +650,7 @@ protected: _ViewEdges = iBrother._ViewEdges; } /*! Cloning method. */ - virtual ViewVertex * dupplicate() + virtual ViewVertex * duplicate() { NonTVertex *clone = new NonTVertex(*this); return clone; @@ -878,7 +878,7 @@ protected: userdata = 0; } /*! Cloning method. */ - virtual ViewEdge * dupplicate() + virtual ViewEdge * duplicate() { ViewEdge *clone = new ViewEdge(*this); return clone; @@ -1107,22 +1107,22 @@ public: _SShape = iBrother._SShape; vector& vvertices = iBrother.vertices(); - // dupplicate vertices + // duplicate vertices for(vv=vvertices.begin(), vvend=vvertices.end(); vv!=vvend; vv++) { - ViewVertex * newVertex = (*vv)->dupplicate(); + ViewVertex * newVertex = (*vv)->duplicate(); AddVertex(newVertex); } vector& vvedges = iBrother.edges(); - // dupplicate edges + // duplicate edges for(ve=vvedges.begin(), veend=vvedges.end(); ve!=veend; ve++) { - ViewEdge * newEdge = (*ve)->dupplicate(); + ViewEdge * newEdge = (*ve)->duplicate(); AddEdge(newEdge); // here the shape is set as the edge's shape } @@ -1209,7 +1209,7 @@ public: } /*! Cloning method. */ - virtual ViewShape * dupplicate() + virtual ViewShape * duplicate() { ViewShape *clone = new ViewShape(*this); return clone; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp index 79b3a8dae26..3f27bf6a8a0 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp @@ -70,7 +70,7 @@ WVertex::WVertex(WVertex& iBrother) ((vertexdata*)(iBrother.userdata))->_copy = this; } -WVertex* WVertex::dupplicate() +WVertex* WVertex::duplicate() { WVertex *clone = new WVertex(*this); return clone; @@ -180,7 +180,7 @@ WOEdge::WOEdge(WOEdge& iBrother) ((oedgedata*)(iBrother.userdata))->_copy = this; } -WOEdge * WOEdge::dupplicate() +WOEdge * WOEdge::duplicate() { WOEdge *clone = new WOEdge(*this); return clone; @@ -221,10 +221,10 @@ WEdge::WEdge(WEdge& iBrother) if(NULL != aoedge) //_paOEdge = new WOEdge(*aoedge); - _paOEdge = aoedge->dupplicate(); + _paOEdge = aoedge->duplicate(); if(NULL != boedge) //_pbOEdge = new WOEdge(*boedge); - _pbOEdge = boedge->dupplicate(); + _pbOEdge = boedge->duplicate(); _nOEdges = iBrother.GetNumberOfOEdges(); _Id = iBrother.GetId(); @@ -232,7 +232,7 @@ WEdge::WEdge(WEdge& iBrother) ((edgedata*)(iBrother.userdata))->_copy = this; } -WEdge * WEdge::dupplicate() +WEdge * WEdge::duplicate() { WEdge *clone = new WEdge(*this); return clone; @@ -260,7 +260,7 @@ WFace::WFace(WFace& iBrother) ((facedata*)(iBrother.userdata))->_copy = this; } -WFace * WFace::dupplicate() +WFace * WFace::duplicate() { WFace * clone = new WFace(*this); return clone; @@ -466,7 +466,7 @@ WShape * WFace::getShape() LIB_WINGED_EDGE_EXPORT unsigned WShape::_SceneCurrentId = 0; -WShape * WShape::dupplicate() +WShape * WShape::duplicate() { WShape *clone = new WShape(*this); return clone; @@ -485,7 +485,7 @@ WShape::WShape(WShape& iBrother) v++) { //WVertex *newVertex = new WVertex(*(*v)); - WVertex *newVertex = (*v)->dupplicate(); + WVertex *newVertex = (*v)->duplicate(); newVertex->SetShape(this); AddVertex(newVertex); @@ -498,7 +498,7 @@ WShape::WShape(WShape& iBrother) e++) { //WEdge *newEdge = new WEdge(*(*e)); - WEdge *newEdge = (*e)->dupplicate(); + WEdge *newEdge = (*e)->duplicate(); AddEdge(newEdge); } @@ -509,7 +509,7 @@ WShape::WShape(WShape& iBrother) f++) { //WFace *newFace = new WFace(*(*f)); - WFace *newFace = (*f)->dupplicate(); + WFace *newFace = (*f)->duplicate(); AddFace(newFace); } diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 1ab37246469..b4c6a38f5bd 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -68,7 +68,7 @@ public: inline WVertex(const Vec3r &v) {_Id = 0; _Vertex = v; userdata = NULL; _Shape = NULL;_Smooth=true;_Border=-1;} /*! Copy constructor */ WVertex(WVertex& iBrother); - virtual WVertex * dupplicate(); + virtual WVertex * duplicate(); virtual ~WVertex() {} /*! accessors */ @@ -314,7 +314,7 @@ public: /*! copy constructor */ WOEdge(WOEdge& iBrother); - virtual WOEdge * dupplicate(); + virtual WOEdge * duplicate(); /*! accessors */ // inline WOEdge *GetaCWEdge() {return _paCWEdge;} @@ -393,7 +393,7 @@ public: /*! Copy constructor */ WEdge(WEdge& iBrother); - virtual WEdge * dupplicate(); + virtual WEdge * duplicate(); virtual ~WEdge() { @@ -502,7 +502,7 @@ public: inline WFace() {userdata = NULL;_MaterialIndex = 0;} /*! copy constructor */ WFace(WFace& iBrother); - virtual WFace * dupplicate(); + virtual WFace * duplicate(); virtual ~WFace() {} /*! accessors */ @@ -709,7 +709,7 @@ public: inline WShape() {_meanEdgeSize = 0;_Id = _SceneCurrentId; _SceneCurrentId++;} /*! copy constructor */ WShape(WShape& iBrother); - virtual WShape * dupplicate(); + virtual WShape * duplicate(); virtual ~WShape() { if(_EdgeList.size() != 0) diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index 66204ba5e99..8c53bb8390e 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -58,7 +58,7 @@ public: WXVertex(WXVertex& iBrother) : WVertex(iBrother) {_curvatures = new CurvatureInfo(*iBrother._curvatures);} - virtual WVertex * dupplicate() + virtual WVertex * duplicate() { WXVertex *clone = new WXVertex(*this); return clone; @@ -109,7 +109,7 @@ public: inline WXEdge(WXEdge& iBrother) : WEdge(iBrother) {_nature = iBrother.nature();_front = iBrother._front;_order = iBrother._order;} - virtual WEdge * dupplicate() + virtual WEdge * duplicate() { WXEdge *clone = new WXEdge(*this); return clone; @@ -334,7 +334,7 @@ public: _SmoothLayers.push_back(new WXFaceLayer(**wxf)); } } - virtual WFace * dupplicate() + virtual WFace * duplicate() { WXFace * clone = new WXFace(*this); return clone; @@ -471,7 +471,7 @@ public: { _computeViewIndependant = iBrother._computeViewIndependant; } - virtual WShape * dupplicate() + virtual WShape * duplicate() { WXShape *clone = new WXShape(*this); return clone; diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index 43ae6772f35..40e879654bc 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -853,7 +853,7 @@ class SVertex(Interface0D): except: self.this = this __swig_destroy__ = _Freestyle.delete_SVertex __del__ = lambda self : None; - def dupplicate(*args): return _Freestyle.SVertex_dupplicate(*args) + def duplicate(*args): return _Freestyle.SVertex_duplicate(*args) def __eq__(*args): return _Freestyle.SVertex___eq__(*args) def point3D(*args): return _Freestyle.SVertex_point3D(*args) def point2D(*args): return _Freestyle.SVertex_point2D(*args) @@ -921,7 +921,7 @@ class FEdge(Interface1D): except: self.this = this __swig_destroy__ = _Freestyle.delete_FEdge __del__ = lambda self : None; - def dupplicate(*args): return _Freestyle.FEdge_dupplicate(*args) + def duplicate(*args): return _Freestyle.FEdge_duplicate(*args) def vertexA(*args): return _Freestyle.FEdge_vertexA(*args) def vertexB(*args): return _Freestyle.FEdge_vertexB(*args) def getNature(*args): return _Freestyle.FEdge_getNature(*args) @@ -1016,7 +1016,7 @@ class FEdgeSVertexIterator(Interface0DIteratorNested): __swig_setmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_set __swig_getmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_get if _newclass:userdata = _swig_property(_Freestyle.FEdgeSVertexIterator_userdata_get, _Freestyle.FEdgeSVertexIterator_userdata_set) - def dupplicate(*args): return _Freestyle.FEdgeSVertexIterator_dupplicate(*args) + def duplicate(*args): return _Freestyle.FEdgeSVertexIterator_duplicate(*args) def point3D(*args): return _Freestyle.FEdgeSVertexIterator_point3D(*args) def point2D(*args): return _Freestyle.FEdgeSVertexIterator_point2D(*args) def normals(*args): return _Freestyle.FEdgeSVertexIterator_normals(*args) @@ -1074,7 +1074,7 @@ class FEdgeSharp(FEdge): except: self.this = this __swig_destroy__ = _Freestyle.delete_FEdgeSharp __del__ = lambda self : None; - def dupplicate(*args): return _Freestyle.FEdgeSharp_dupplicate(*args) + def duplicate(*args): return _Freestyle.FEdgeSharp_duplicate(*args) def normalA(*args): return _Freestyle.FEdgeSharp_normalA(*args) def normalB(*args): return _Freestyle.FEdgeSharp_normalB(*args) def aMaterialIndex(*args): return _Freestyle.FEdgeSharp_aMaterialIndex(*args) @@ -1102,7 +1102,7 @@ class FEdgeSmooth(FEdge): except: self.this = this __swig_destroy__ = _Freestyle.delete_FEdgeSmooth __del__ = lambda self : None; - def dupplicate(*args): return _Freestyle.FEdgeSmooth_dupplicate(*args) + def duplicate(*args): return _Freestyle.FEdgeSmooth_duplicate(*args) def face(*args): return _Freestyle.FEdgeSmooth_face(*args) def normal(*args): return _Freestyle.FEdgeSmooth_normal(*args) def materialIndex(*args): return _Freestyle.FEdgeSmooth_materialIndex(*args) @@ -1126,7 +1126,7 @@ class SShape(_object): this = _Freestyle.new_SShape(*args) try: self.this.append(this) except: self.this = this - def dupplicate(*args): return _Freestyle.SShape_dupplicate(*args) + def duplicate(*args): return _Freestyle.SShape_duplicate(*args) __swig_destroy__ = _Freestyle.delete_SShape __del__ = lambda self : None; def AddEdge(*args): return _Freestyle.SShape_AddEdge(*args) @@ -1623,7 +1623,7 @@ class ViewShape(_object): this = _Freestyle.new_ViewShape(*args) try: self.this.append(this) except: self.this = this - def dupplicate(*args): return _Freestyle.ViewShape_dupplicate(*args) + def duplicate(*args): return _Freestyle.ViewShape_duplicate(*args) __swig_destroy__ = _Freestyle.delete_ViewShape __del__ = lambda self : None; def SplitEdge(*args): return _Freestyle.ViewShape_SplitEdge(*args) @@ -1706,7 +1706,7 @@ class ViewEdgeSVertexIterator(Interface0DIteratorNested): __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_set __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_get if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeSVertexIterator_userdata_get, _Freestyle.ViewEdgeSVertexIterator_userdata_set) - def dupplicate(*args): return _Freestyle.ViewEdgeSVertexIterator_dupplicate(*args) + def duplicate(*args): return _Freestyle.ViewEdgeSVertexIterator_duplicate(*args) def point3D(*args): return _Freestyle.ViewEdgeSVertexIterator_point3D(*args) def point2D(*args): return _Freestyle.ViewEdgeSVertexIterator_point2D(*args) def normals(*args): return _Freestyle.ViewEdgeSVertexIterator_normals(*args) From d3973dac717da1557a9a8d50f5c13e25ae75eaa8 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 18 Jul 2008 02:55:23 +0000 Subject: [PATCH 392/430] soc-2008-mxcurioni: FEdge class added. Modifed converting functions to passing-by-reference format. Improved the type checking for FEdge and CurvePoint. Modified FEdge C++ class to test for null vertices. Updated previous classes to support FEdge. So far, whenever a Python object is created from its corresponding C++ object, the input object reference is copied into a new object. Due to Freestyle's functions (especially regarding the way it is iterated), it is currently impossible to deal with a pointer-based Python object. It is not a real drawback, just an aspect to keep in mind. --- source/blender/freestyle/SConscript | 3 +- .../freestyle/intern/python/Convert.cpp | 79 ++- .../blender/freestyle/intern/python/Convert.h | 16 +- .../freestyle/intern/python/Interface0D.cpp | 30 +- .../intern/python/Interface0D/CurvePoint.cpp | 9 +- .../intern/python/Interface0D/SVertex.cpp | 24 +- .../intern/python/Interface0D/SVertex.h | 33 ++ .../freestyle/intern/python/Interface1D.cpp | 12 +- .../intern/python/Interface1D/FEdge.cpp | 531 ++++++++++-------- .../intern/python/Interface1D/FEdge.h | 32 ++ .../freestyle/intern/view_map/Silhouette.h | 2 + 11 files changed, 474 insertions(+), 297 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface0D/SVertex.h create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 42d78a393eb..5a7745292a4 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -68,7 +68,8 @@ python_sources = [ prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', prefix + '/Interface0D/SVertex.cpp', - prefix + '/Interface1D.cpp' + prefix + '/Interface1D.cpp', + prefix + '/Interface1D/FEdge.cpp' ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index 59b2406f480..47ad6f3c0ad 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -9,71 +9,64 @@ extern "C" { PyObject *PyBool_from_bool( bool b ){ - // SWIG_From_bool return PyBool_FromLong( b ? 1 : 0); } -PyObject *Vector_from_Vec2f( Vec2f vec ) { +PyObject *Vector_from_Vec2f( Vec2f& vec ) { float vec_data[2]; // because vec->_coord is protected - if( &vec != 0 ){ - vec_data[0] = vec.x(); vec_data[1] = vec.y(); - return newVectorObject( vec_data, 2, Py_NEW); - } - - Py_RETURN_NONE; + vec_data[0] = vec.x(); vec_data[1] = vec.y(); + return newVectorObject( vec_data, 2, Py_NEW); } -PyObject *Vector_from_Vec3f( Vec3f vec ) { +PyObject *Vector_from_Vec3f( Vec3f& vec ) { float vec_data[3]; // because vec->_coord is protected - if( &vec != 0 ){ - vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); - return newVectorObject( vec_data, 3, Py_NEW); - } - - Py_RETURN_NONE; + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); } -PyObject *Vector_from_Vec3r( Vec3r vec ) { +PyObject *Vector_from_Vec3r( Vec3r& vec ) { float vec_data[3]; // because vec->_coord is protected - if( &vec != 0 ){ - vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); - return newVectorObject( vec_data, 3, Py_NEW); - } - - Py_RETURN_NONE; + vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); + return newVectorObject( vec_data, 3, Py_NEW); } -PyObject *BPy_Id_from_Id( Id id ) { - BPy_Id *py_id; - - if( &id != 0 ) { - py_id = (BPy_Id *) Id_Type.tp_new( &Id_Type, 0, 0 ); - py_id->id = new Id( id.getFirst(), id.getSecond() ); +PyObject *BPy_Id_from_Id( Id& id ) { + PyObject *py_id = Id_Type.tp_new( &Id_Type, 0, 0 ); + ((BPy_Id *) py_id)->id = new Id( id.getFirst(), id.getSecond() ); - return (PyObject *)py_id; - } - - Py_RETURN_NONE; + return py_id; } -PyObject *BPy_SVertex_from_SVertex( SVertex sv ) { - BPy_SVertex *py_sv; +PyObject *BPy_Interface0D_from_Interface0D( Interface0D& if0D ) { + PyObject *py_if0D = Interface0D_Type.tp_new( &Interface0D_Type, 0, 0 ); + ((BPy_Interface0D *) py_if0D)->if0D = &if0D; - if( &sv != 0 ) { - py_sv = (BPy_SVertex *) SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); - py_sv->sv = new SVertex( sv ); - py_sv->py_if0D.if0D = py_sv->sv; - - return (PyObject *)py_sv; - } - - Py_RETURN_NONE; + return py_if0D; } + +PyObject *BPy_SVertex_from_SVertex( SVertex& sv ) { + PyObject *py_sv = SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); + ((BPy_SVertex *) py_sv)->sv = new SVertex( sv ); + ((BPy_SVertex *) py_sv)->py_if0D.if0D = ((BPy_SVertex *) py_sv)->sv; + + return py_sv; +} + +PyObject *BPy_FEdge_from_FEdge( FEdge& fe ) { + PyObject *py_fe = FEdge_Type.tp_new( &FEdge_Type, 0, 0 ); + ((BPy_FEdge *) py_fe)->fe = new FEdge( fe ); + ((BPy_FEdge *) py_fe)->py_if1D.if1D = ((BPy_FEdge *) py_fe)->fe; + + return py_fe; +} + + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index ba8e3ea02d2..edd62b1f24a 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -5,7 +5,9 @@ using namespace Geometry; #include "Id.h" +#include "Interface0D.h" #include "Interface0D/SVertex.h" +#include "Interface1D/FEdge.h" #ifdef __cplusplus extern "C" { @@ -17,14 +19,16 @@ extern "C" { #include "api2_2x/vector.h" #include "api2_2x/gen_utils.h" -PyObject *PyBool_from_bool( bool b ); +PyObject * PyBool_from_bool( bool b ); -PyObject *Vector_from_Vec2f( Vec2f v ); -PyObject *Vector_from_Vec3f( Vec3f v ); -PyObject *Vector_from_Vec3r( Vec3r v ); +PyObject * Vector_from_Vec2f( Vec2f& v ); +PyObject * Vector_from_Vec3f( Vec3f& v ); +PyObject * Vector_from_Vec3r( Vec3r& v ); -PyObject *BPy_Id_from_Id( Id id ); -PyObject *BPy_SVertex_from_SVertex( SVertex sv ); +PyObject * BPy_Id_from_Id( Id& id ); +PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); +PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); +PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 27804b3d276..39c2146e015 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -3,6 +3,7 @@ #include "Convert.h" #include "Interface0D/CurvePoint.h" #include "Interface0D/SVertex.h" +#include "Interface1D/FEdge.h" #ifdef __cplusplus extern "C" { @@ -24,7 +25,7 @@ static PyObject *Interface0D_getProjectedX( BPy_Interface0D *self ); static PyObject *Interface0D_getProjectedY( BPy_Interface0D *self ); static PyObject *Interface0D_getProjectedZ( BPy_Interface0D *self ); static PyObject *Interface0D_getPoint2D( BPy_Interface0D *self ); -static PyObject *Interface0D_getFEdge( BPy_Interface0D *self ); +static PyObject *Interface0D_getFEdge( BPy_Interface0D *self, PyObject *args ); static PyObject *Interface0D_getId( BPy_Interface0D *self ); static PyObject *Interface0D_getNature( BPy_Interface0D *self ); @@ -39,7 +40,7 @@ static PyMethodDef BPy_Interface0D_methods[] = { {"getProjectedY", ( PyCFunction ) Interface0D_getProjectedY, METH_NOARGS, "() Returns the 2D y coordinate of the point."}, {"getProjectedZ", ( PyCFunction ) Interface0D_getProjectedZ, METH_NOARGS, "() Returns the 2D z coordinate of the point."}, {"getPoint2D", ( PyCFunction ) Interface0D_getPoint2D, METH_NOARGS, "() Returns the 2D point."}, - {"getFEdge", ( PyCFunction ) Interface0D_getFEdge, METH_NOARGS, "() Returns the FEdge that lies between this Interface0D and the Interface0D given as argument."}, + {"getFEdge", ( PyCFunction ) Interface0D_getFEdge, METH_VARARGS, "(Interface0D i) Returns the FEdge that lies between this Interface0D and the Interface0D given as argument."}, {"getId", ( PyCFunction ) Interface0D_getId, METH_NOARGS, "() Returns the Id of the point."}, {"getNature", ( PyCFunction ) Interface0D_getNature, METH_NOARGS, "() Returns the nature of the point."}, {NULL, NULL, 0, NULL} @@ -193,7 +194,8 @@ PyObject *Interface0D_getZ( BPy_Interface0D *self ) { PyObject *Interface0D_getPoint3D( BPy_Interface0D *self ) { - return Vector_from_Vec3f( self->if0D->getPoint3D() ); + Vec3f v( self->if0D->getPoint3D() ); + return Vector_from_Vec3f( v ); } @@ -213,22 +215,36 @@ PyObject *Interface0D_getProjectedZ( BPy_Interface0D *self ) { PyObject *Interface0D_getPoint2D( BPy_Interface0D *self ) { - return Vector_from_Vec2f( self->if0D->getPoint2D() ); + Vec2f v( self->if0D->getPoint2D() ); + return Vector_from_Vec2f( v ); } -PyObject *Interface0D_getFEdge( BPy_Interface0D *self ) { - // FEdge +PyObject *Interface0D_getFEdge( BPy_Interface0D *self, PyObject *args ) { + PyObject *py_if0D; + + if(!( PyArg_ParseTuple(args, "O", &py_if0D) && BPy_Interface0D_Check(py_if0D) )) { + cout << "ERROR: Interface0D_getFEdge" << endl; + Py_RETURN_NONE; + } + + FEdge *fe = self->if0D->getFEdge(*( ((BPy_Interface0D *) py_if0D)->if0D )); + if( fe ) + return BPy_FEdge_from_FEdge( *fe ); + + Py_RETURN_NONE; } PyObject *Interface0D_getId( BPy_Interface0D *self ) { - return BPy_Id_from_Id( self->if0D->getId() ); + Id id( self->if0D->getId() ); + return BPy_Id_from_Id( id ); } PyObject *Interface0D_getNature( BPy_Interface0D *self ) { // VertexNature + Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index 5a81f07973d..f76fc9c9931 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -1,7 +1,6 @@ #include "CurvePoint.h" #include "../Convert.h" -#include "../../stroke/Curve.h" #ifdef __cplusplus extern "C" { @@ -166,15 +165,15 @@ PyObject * CurvePoint___copy__( BPy_CurvePoint *self ) { } PyObject * CurvePoint_A( BPy_CurvePoint *self ) { - if( self->cp->A() ) - return BPy_SVertex_from_SVertex( *(self->cp->A()) ); + if( SVertex *A = self->cp->A() ) + return BPy_SVertex_from_SVertex( *A ); Py_RETURN_NONE; } PyObject * CurvePoint_B( BPy_CurvePoint *self ) { - if( self->cp->B() ) - return BPy_SVertex_from_SVertex( *(self->cp->B()) ); + if( SVertex *B = self->cp->B() ) + return BPy_SVertex_from_SVertex( *B ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp index fd5b372a1d9..eb91d7daf10 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp @@ -18,6 +18,8 @@ static PyObject * SVertex_SetPoint3D( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_SetPoint2D( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_AddNormal( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_SetId( BPy_SVertex *self , PyObject *args); +static PyObject *SVertex_AddFEdge( BPy_SVertex *self , PyObject *args); + /*----------------------SVertex instance definitions ----------------------------*/ static PyMethodDef BPy_SVertex_methods[] = { {"__copy__", ( PyCFunction ) SVertex___copy__, METH_NOARGS, "( )Cloning method."}, @@ -27,6 +29,7 @@ static PyMethodDef BPy_SVertex_methods[] = { {"SetPoint2D", ( PyCFunction ) SVertex_SetPoint2D, METH_VARARGS, "Sets the 3D projected coordinates of the SVertex." }, {"AddNormal", ( PyCFunction ) SVertex_AddNormal, METH_VARARGS, "Adds a normal to the Svertex's set of normals. If the same normal is already in the set, nothing changes." }, {"SetId", ( PyCFunction ) SVertex_SetId, METH_VARARGS, "Sets the Id." }, + {"AddFEdge", ( PyCFunction ) SVertex_AddFEdge, METH_VARARGS, "Add an FEdge to the list of edges emanating from this SVertex." }, {NULL, NULL, 0, NULL} }; @@ -163,7 +166,8 @@ PyObject * SVertex_normals( BPy_SVertex *self ) { normals = self->sv->normals(); for( set< Vec3r >::iterator set_iterator = normals.begin(); set_iterator != normals.end(); set_iterator++ ) { - PyList_Append( py_normals, Vector_from_Vec3r(*set_iterator) ); + Vec3r v( *set_iterator ); + PyList_Append( py_normals, Vector_from_Vec3r(v) ); } return py_normals; @@ -215,8 +219,6 @@ PyObject *SVertex_AddNormal( BPy_SVertex *self , PyObject *args) { cout << "ERROR: SVertex_AddNormal" << endl; Py_RETURN_NONE; } - - cout << "yoyo" << endl; Vec3r n( PyFloat_AsDouble( PyList_GetItem(py_normal, 0) ), PyFloat_AsDouble( PyList_GetItem(py_normal, 1) ), @@ -239,9 +241,23 @@ PyObject *SVertex_SetId( BPy_SVertex *self , PyObject *args) { Py_RETURN_NONE; } +PyObject *SVertex_AddFEdge( BPy_SVertex *self , PyObject *args) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: SVertex_AddFEdge" << endl; + Py_RETURN_NONE; + } + + self->sv->AddFEdge( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + + // virtual bool operator== (const SVertex &iBrother) // ViewVertex * viewvertex () -// void AddFEdge (FEdge *iFEdge) + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.h b/source/blender/freestyle/intern/python/Interface0D/SVertex.h new file mode 100644 index 00000000000..ac89133ab55 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_SVERTEX_H +#define FREESTYLE_PYTHON_SVERTEX_H + +#include "../../view_map/Silhouette.h" +#include "../Interface0D.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SVertex_Type; + +#define BPy_SVertex_Check(v) \ + ((v)->ob_type == &SVertex_Type) + +/*---------------------------Python BPy_SVertex structure definition----------*/ +typedef struct { + BPy_Interface0D py_if0D; + SVertex *sv; +} BPy_SVertex; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SVERTEX_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 27c5f4d08ff..971403b3354 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -1,6 +1,7 @@ #include "Interface1D.h" #include "Convert.h" +#include "Interface1D/FEdge.h" #ifdef __cplusplus extern "C" { @@ -128,9 +129,14 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) if( PyType_Ready( &Interface1D_Type ) < 0 ) return; - Py_INCREF( &Interface1D_Type ); PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type); + + if( PyType_Ready( &FEdge_Type ) < 0 ) + return; + Py_INCREF( &FEdge_Type ); + PyModule_AddObject(module, "FEdge", (PyObject *)&FEdge_Type); + } //------------------------INSTANCE METHODS ---------------------------------- @@ -169,11 +175,13 @@ PyObject *Interface1D_getLength2D( BPy_Interface1D *self ) { } PyObject *Interface1D_getId( BPy_Interface1D *self ) { - return BPy_Id_from_Id( self->if1D->getId() ); + Id id( self->if1D->getId() ); + return BPy_Id_from_Id( id ); } PyObject *Interface1D_getNature( BPy_Interface1D *self ) { // EdgeNature + Py_RETURN_NONE; } PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ) { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp index 862456d2b7c..e8e5c6787e3 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp @@ -1,252 +1,325 @@ - PyObject *_wrap_FEdge_getExactTypeName(PyObject *self , PyObject *args) { +#include "FEdge.h" + +#include "../Convert.h" +#include "../Interface0D/SVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FEdge instance -----------*/ +static int FEdge___init__(BPy_FEdge *self, PyObject *args, PyObject *kwds); +static PyObject * FEdge___copy__( BPy_FEdge *self ); +static PyObject * FEdge_vertexA( BPy_FEdge *self ); +static PyObject * FEdge_vertexB( BPy_FEdge *self ); +static PyObject * FEdge___getitem__( BPy_FEdge *self, PyObject *args ); +static PyObject * FEdge_nextEdge( BPy_FEdge *self ); +static PyObject * FEdge_previousEdge( BPy_FEdge *self ); +static PyObject * FEdge_getVertices( BPy_FEdge *self ); +static PyObject * FEdge_getPoints( BPy_FEdge *self ); +static PyObject * FEdge_isSmooth( BPy_FEdge *self ); +static PyObject * FEdge_SetVertexA( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetVertexB( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetId( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetSmooth( BPy_FEdge *self , PyObject *args); + +/*----------------------FEdge instance definitions ----------------------------*/ +static PyMethodDef BPy_FEdge_methods[] = { + {"__copy__", ( PyCFunction ) FEdge___copy__, METH_NOARGS, "() Cloning method."}, + {"vertexA", ( PyCFunction ) FEdge_vertexA, METH_NOARGS, "() Returns the first SVertex."}, + {"vertexB", ( PyCFunction ) FEdge_vertexB, METH_NOARGS, "() Returns the second SVertex."}, + {"__getitem__", ( PyCFunction ) FEdge___getitem__, METH_VARARGS, "(int i) Returns the first SVertex if i=0, the seccond SVertex if i=1."}, + {"nextEdge", ( PyCFunction ) FEdge_nextEdge, METH_NOARGS, "() Returns the FEdge following this one in the ViewEdge. If this FEdge is the last of the ViewEdge, 0 is returned."}, + {"previousEdge", ( PyCFunction ) FEdge_previousEdge, METH_NOARGS, "Returns the Edge preceding this one in the ViewEdge. If this FEdge is the first one of the ViewEdge, 0 is returned."}, + {"getVertices", ( PyCFunction ) FEdge_getVertices, METH_NOARGS, "Returns the vertices"}, + {"getPoints", ( PyCFunction ) FEdge_getPoints, METH_NOARGS, "Returns the points. The difference with getVertices() is that here we can iterate over points of the 1D element at any given sampling. At each call, a virtual point is created."}, + {"isSmooth", ( PyCFunction ) FEdge_isSmooth, METH_NOARGS, "() Returns true if this FEdge is a smooth FEdge."}, + {"SetVertexA", ( PyCFunction ) FEdge_SetVertexA, METH_VARARGS, "(SVertex v) Sets the first SVertex. ."}, + {"SetVertexB", ( PyCFunction ) FEdge_SetVertexB, METH_VARARGS, "(SVertex v) Sets the second SVertex. "}, + {"SetId", ( PyCFunction ) FEdge_SetId, METH_VARARGS, "(Id id) Sets the FEdge Id ."}, + {"SetNextEdge", ( PyCFunction ) FEdge_SetNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "}, + {"SetPreviousEdge", ( PyCFunction ) FEdge_SetPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "}, + {"SetSmooth", ( PyCFunction ) FEdge_SetSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_FEdge type definition ------------------------------*/ + +PyTypeObject FEdge_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FEdge", /* tp_name */ + sizeof( BPy_FEdge ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_FEdge_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FEdge___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int FEdge___init__(BPy_FEdge *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj1 = 0, *obj2 = 0; + + if (! PyArg_ParseTuple(args, "|OO", &obj1, &obj2) ) + return -1; + + if( !obj1 && !obj2 ){ + self->fe = new FEdge(); + } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + self->fe = new FEdge( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); + } else { + return -1; + } + + self->py_if1D.if1D = self->fe; + + return 0; } - PyObject *_wrap_FEdge_getLength2D(PyObject *self , PyObject *args) { +PyObject * FEdge___copy__( BPy_FEdge *self ) { + BPy_FEdge *py_fe; + + py_fe = (BPy_FEdge *) FEdge_Type.tp_new( &FEdge_Type, 0, 0 ); + + py_fe->fe = new FEdge( *(self->fe) ); + py_fe->py_if1D.if1D = py_fe->fe; + + return (PyObject *) py_fe; +} + +PyObject * FEdge_vertexA( BPy_FEdge *self ) { + if( self->fe->vertexA() ){ + return BPy_SVertex_from_SVertex( *(self->fe->vertexA()) ); + } + + Py_RETURN_NONE; +} + +PyObject * FEdge_vertexB( BPy_FEdge *self ) { + if( self->fe->vertexB() ){ + return BPy_SVertex_from_SVertex( *(self->fe->vertexB()) ); + } + + Py_RETURN_NONE; } - PyObject *_wrap_FEdge_getId(PyObject *self , PyObject *args) { +PyObject * FEdge___getitem__( BPy_FEdge *self, PyObject *args ) { + int i; + + if(!( PyArg_ParseTuple(args, "i", &i) && (i == 0 || i == 1) )) { + cout << "ERROR: FEdge___getitem__" << endl; + Py_RETURN_NONE; + } + + if( SVertex *v = self->fe->operator[](i) ) + return BPy_SVertex_from_SVertex( *v ); + + Py_RETURN_NONE; +} + +PyObject * FEdge_nextEdge( BPy_FEdge *self ) { + if( FEdge *fe = self->fe->nextEdge() ) + return BPy_FEdge_from_FEdge( *fe ); + + Py_RETURN_NONE; +} + +PyObject * FEdge_previousEdge( BPy_FEdge *self ) { + if( FEdge *fe = self->fe->previousEdge() ) + return BPy_FEdge_from_FEdge( *fe ); + + Py_RETURN_NONE; +} + +PyObject * FEdge_isSmooth( BPy_FEdge *self ) { + return PyBool_from_bool( self->fe->isSmooth() ); +} + +PyObject *FEdge_SetVertexA( BPy_FEdge *self , PyObject *args) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: FEdge_SetVertexA" << endl; + Py_RETURN_NONE; + } + + self->fe->SetVertexA( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +PyObject *FEdge_SetVertexB( BPy_FEdge *self , PyObject *args) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: FEdge_SetVertexB" << endl; + Py_RETURN_NONE; + } + + self->fe->SetVertexB( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +PyObject *FEdge_SetId( BPy_FEdge *self , PyObject *args) { + PyObject *py_id; + + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: FEdge_SetId" << endl; + Py_RETURN_NONE; + } + + self->fe->SetId(*( ((BPy_Id *) py_id)->id )); + + Py_RETURN_NONE; } - PyObject *_wrap_FEdge_userdata_set(PyObject *self , PyObject *args) { +PyObject *FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: FEdge_SetNextEdge" << endl; + Py_RETURN_NONE; + } + + self->fe->SetNextEdge( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; } +PyObject *FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args) { + PyObject *py_fe; - PyObject *_wrap_FEdge_userdata_get(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: FEdge_SetPreviousEdge" << endl; + Py_RETURN_NONE; + } + + self->fe->SetPreviousEdge( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; } +PyObject *FEdge_SetSmooth( BPy_FEdge *self , PyObject *args) { + int b; - PyObject *_wrap_new_FEdge__SWIG_0(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "i", &b) )) { + cout << "ERROR: FEdge_SetSmooth" << endl; + Py_RETURN_NONE; + } + + self->fe->SetSmooth( (bool) b ); + + Py_RETURN_NONE; } - - PyObject *_wrap_new_FEdge__SWIG_1(PyObject *self , PyObject *args) { +PyObject *FEdge_getVertices( BPy_FEdge *self ) { + PyObject *py_vertices = PyList_New(NULL); + + for( Interface0DIterator it = self->fe->verticesBegin(); it != self->fe->verticesEnd(); it++ ) { + PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) ); + } + + return py_vertices; } - - PyObject *_wrap_new_FEdge__SWIG_2(PyObject *self , PyObject *args) { +PyObject *FEdge_getPoints( BPy_FEdge *self ) { + PyObject *py_points = PyList_New(NULL); + + for( Interface0DIterator it = self->fe->pointsBegin(); it != self->fe->pointsEnd(); it++ ) { + PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) ); + } + + return py_points; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_FEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_dupplicate(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_vertexA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_vertexB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_nextEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_previousEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_shape__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_invisibility(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_viewedge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_center3d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_center2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_aFace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_getOccludeeEmpty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_isSmooth(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetVertexA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetVertexB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetNextEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetaFace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_SetSmooth(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_CommonVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_min2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_max2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_shape_id(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_shape__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_FEdge_shape_importance(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_qi(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occluders_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occluders_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occluders_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occluders_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occludee(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occluded_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_occludee_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_z_discontinuity(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_viewedge_nature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_orientation2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_orientation3d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_verticesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_verticesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.h b/source/blender/freestyle/intern/python/Interface1D/FEdge.h new file mode 100644 index 00000000000..39c9c56e391 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_FEDGE_H +#define FREESTYLE_PYTHON_FEDGE_H + +#include "../Interface1D.h" +#include "../../view_map/Silhouette.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FEdge_Type; + +#define BPy_FEdge_Check(v) \ + ((v)->ob_type == &FEdge_Type) + +/*---------------------------Python BPy_FEdge structure definition----------*/ +typedef struct { + BPy_Interface1D py_if1D; + FEdge *fe; +} BPy_FEdge; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FEDGE_H */ diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index c6a1763eec6..15947fe3ba4 100755 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -412,6 +412,8 @@ public: /*! Default constructor */ inline FEdge() { userdata = NULL; + _VertexA = NULL; + _VertexB = NULL; _Nature = Nature::NO_FEATURE; _NextEdge = NULL; _PreviousEdge = NULL; From 21674d2db2dbc932fa87699768c1ebb2f61bc941 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 18 Jul 2008 04:59:07 +0000 Subject: [PATCH 393/430] soc-2008-mxcurioni: canvas for UnaryFunction0D, UnaryFunction1D, UnaryPredicate0D, UnaryPredicate1D. UnaryFunction0D and UnaryFunction1D implementations are going to be really challenging due to the changes in the infrastructure: UnaryFunction0D and UnaryFunction0D are templates and must be determined for compile-time. The easiest solution is to support each type individually; unfortunately, it removes the benefit of using an interface. To find a middle ground, a general unary function Python object type was created for 0D and 1D. In both cases, the types have a void* pointer keeping the address of the current unary function type. I am not sure yet if it will work. Interface0DIterator being removed by a list type, the t() and u() coordinate functions will to be transferred somehow, probably directly at the Interface0D level. --- .../freestyle/intern/python/Freestyle.cpp | 9 +- .../intern/python/UnaryFunction0D.cpp | 173 +++++++++++++++++ .../freestyle/intern/python/UnaryFunction0D.h | 35 ++++ .../intern/python/UnaryFunction0DVoid.cpp | 12 -- .../intern/python/UnaryFunction1D.cpp | 175 ++++++++++++++++++ .../freestyle/intern/python/UnaryFunction1D.h | 35 ++++ .../intern/python/UnaryFunction1DVoid.cpp | 20 -- .../intern/python/UnaryPredicate0D.cpp | 164 +++++++++++++++- .../intern/python/UnaryPredicate0D.h | 35 ++++ .../intern/python/UnaryPredicate1D.cpp | 164 +++++++++++++++- .../intern/python/UnaryPredicate1D.h | 35 ++++ 11 files changed, 818 insertions(+), 39 deletions(-) create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D.h delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D.h delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D.h diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index 9630aa38f80..809568abe2c 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -6,7 +6,10 @@ #include "Interface0D.h" #include "Interface0D/CurvePoint.h" #include "Interface1D.h" - +#include "UnaryFunction0D.h" +#include "UnaryFunction1D.h" +#include "UnaryPredicate0D.h" +#include "UnaryPredicate1D.h" #ifdef __cplusplus extern "C" { @@ -127,6 +130,10 @@ PyObject *Freestyle_Init( void ) Id_Init( module ); Interface0D_Init( module ); Interface1D_Init( module ); + UnaryFunction0D_Init( module ); + UnaryFunction1D_Init( module ); + UnaryPredicate0D_Init( module ); + UnaryPredicate1D_Init( module ); return module; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D.cpp new file mode 100644 index 00000000000..b9da3dfc20d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D.cpp @@ -0,0 +1,173 @@ +#include "UnaryFunction0D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0D instance -----------*/ +static int UnaryFunction0D___init__(BPy_UnaryFunction0D *self, PyObject *args, PyObject *kwds); +static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self); +static PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D *self); + +static PyObject * UnaryFunction0D_getName( BPy_UnaryFunction0D *self, PyObject *args); +static PyObject * UnaryFunction0D___call__( BPy_UnaryFunction0D *self, PyObject *args); + +/*----------------------UnaryFunction0D instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0D_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0D_getName, METH_NOARGS, ""}, + {"__call__", ( PyCFunction ) UnaryFunction0D___call__, METH_VARARGS, "" }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0D type definition ------------------------------*/ + +PyTypeObject UnaryFunction0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0D", /* tp_name */ + sizeof( BPy_UnaryFunction0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0D___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC UnaryFunction0D_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0D_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0D_Type ); + PyModule_AddObject(module, "UnaryFunction0D", (PyObject *)&UnaryFunction0D_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0D___init__(BPy_UnaryFunction0D *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D* self) +{ + //delete self->uf0D; + self->ob_type->tp_free((PyObject*)self); +} + + +PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D* self) +{ + return PyString_FromFormat("type: %s - address: %p", ((UnaryFunction0D *) self->uf0D)->getName().c_str(), self->uf0D ); +} + + +PyObject * UnaryFunction0D_getName( BPy_UnaryFunction0D *self, PyObject *args) +{ + return PyString_FromString( ((UnaryFunction0D *) self->uf0D)->getName().c_str() ); +} + +PyObject * UnaryFunction0D___call__( BPy_UnaryFunction0D *self, PyObject *args) +{ + PyObject *l; + + if( !PyArg_ParseTuple(args, "O", &l) ) { + cout << "ERROR: UnaryFunction0D___call__ " << endl; + return NULL; + } + + // pb: operator() is called on Interface0DIterator while we have a list + // solutions: + // 1)reconvert back to iterator ? + // 2) adapt interface0d to have t(), u() functions + + // b = self->bp0D->operator()( *(obj1->uf0D) ); + // return PyBool_from_bool( b ); + + Py_RETURN_NONE; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D.h new file mode 100644 index 00000000000..365b340d96c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D.h @@ -0,0 +1,35 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0D_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0D_H + +#include "../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0D_Type; + +#define BPy_UnaryFunction0D_Check(v) \ + ((v)->ob_type == &UnaryFunction0D_Type) + +/*---------------------------Python BPy_UnaryFunction0D structure definition----------*/ +typedef struct { + PyObject_HEAD + void *uf0D; +} BPy_UnaryFunction0D; + +/*---------------------------Python BPy_UnaryFunction0D visible prototypes-----------*/ + +PyMODINIT_FUNC UnaryFunction0D_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp deleted file mode 100644 index 92a87b04a80..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0DVoid.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D.cpp new file mode 100644 index 00000000000..db026ced338 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D.cpp @@ -0,0 +1,175 @@ +#include "UnaryFunction1D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1D instance -----------*/ +static int UnaryFunction1D___init__(BPy_UnaryFunction1D *self, PyObject *args, PyObject *kwds); +static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self); +static PyObject * UnaryFunction1D___repr__(BPy_UnaryFunction1D *self); + +static PyObject * UnaryFunction1D_getName( BPy_UnaryFunction1D *self, PyObject *args); +static PyObject * UnaryFunction1D___call__( BPy_UnaryFunction1D *self, PyObject *args); + +/*----------------------UnaryFunction1D instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1D_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1D_getName, METH_NOARGS, ""}, + {"__call__", ( PyCFunction ) UnaryFunction1D___call__, METH_VARARGS, "" }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1D type definition ------------------------------*/ + +PyTypeObject UnaryFunction1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1D", /* tp_name */ + sizeof( BPy_UnaryFunction1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1D___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + NULL, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + NULL, /* long tp_dictoffset; */ + (initproc)UnaryFunction1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC UnaryFunction1D_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1D_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1D_Type ); + PyModule_AddObject(module, "UnaryFunction1D", (PyObject *)&UnaryFunction1D_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1D___init__(BPy_UnaryFunction1D *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D* self) +{ + //delete self->uf1D; + self->ob_type->tp_free((PyObject*)self); +} + + +PyObject * UnaryFunction1D___repr__(BPy_UnaryFunction1D* self) +{ + return PyString_FromFormat("type: %s - address: %p", ((UnaryFunction1D *) self->uf1D)->getName().c_str(), self->uf1D ); +} + + +PyObject * UnaryFunction1D_getName( BPy_UnaryFunction1D *self, PyObject *args) +{ + return PyString_FromString( ((UnaryFunction1D *) self->uf1D)->getName().c_str() ); +} + +PyObject * UnaryFunction1D___call__( BPy_UnaryFunction1D *self, PyObject *args) +{ + PyObject *l; + + if( !PyArg_ParseTuple(args, "O", &l) ) { + cout << "ERROR: UnaryFunction1D___call__ " << endl; + return NULL; + } + + // pb: operator() is called on Interface0DIterator while we have a list + // solutions: + // 1)reconvert back to iterator ? + // 2) adapt interface0d to have t(), u() functions + + // b = self->bp0D->operator()( *(obj1->uf0D) ); + // return PyBool_from_bool( b ); + + Py_RETURN_NONE; +} + +// void setIntegrationType (IntegrationType integration) +// IntegrationType getIntegrationType () const + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D.h new file mode 100644 index 00000000000..2ad187ca81d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D.h @@ -0,0 +1,35 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1D_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1D_H + +#include "../view_map/Functions1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1D_Type; + +#define BPy_UnaryFunction1D_Check(v) \ + ((v)->ob_type == &UnaryFunction1D_Type) + +/*---------------------------Python BPy_UnaryFunction1D structure definition----------*/ +typedef struct { + PyObject_HEAD + void *uf1D; +} BPy_UnaryFunction1D; + +/*---------------------------Python BPy_UnaryFunction1D visible prototypes-----------*/ + +PyMODINIT_FUNC UnaryFunction1D_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp deleted file mode 100644 index 13c8a088dfb..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1DVoid.cpp +++ /dev/null @@ -1,20 +0,0 @@ - PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp index 7c67de86079..1d2fd6b284f 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp @@ -1,12 +1,170 @@ - PyObject *_wrap_UnaryPredicate0D_getName(PyObject *self , PyObject *args) { +#include "UnaryPredicate0D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryPredicate0D instance -----------*/ +static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds); +static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self); +static PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D *self); + +static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args); +static PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args); + +/*----------------------UnaryPredicate0D instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryPredicate0D_methods[] = { + {"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, ""}, + {"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "" }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryPredicate0D type definition ------------------------------*/ + +PyTypeObject UnaryPredicate0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryPredicate0D", /* tp_name */ + sizeof( BPy_UnaryPredicate0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryPredicate0D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryPredicate0D___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryPredicate0D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryPredicate0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryPredicate0D_Type ) < 0 ) + return; + Py_INCREF( &UnaryPredicate0D_Type ); + PyModule_AddObject(module, "UnaryPredicate0D", (PyObject *)&UnaryPredicate0D_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D* self) +{ + delete self->up0D; + self->ob_type->tp_free((PyObject*)self); } - PyObject *_wrap_UnaryPredicate0D___call__(PyObject *self , PyObject *args) { +PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->up0D->getName().c_str(), self->up0D ); } - PyObject *_wrap_disown_UnaryPredicate0D(PyObject *self , PyObject *args) { +PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args) +{ + return PyString_FromString( self->up0D->getName().c_str() ); +} + +PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args) +{ + PyObject *l; + + if( !PyArg_ParseTuple(args, "O", &l) ) { + cout << "ERROR: UnaryPredicate0D___call__ " << endl; + return NULL; + } + + //TBD + + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D.h new file mode 100644 index 00000000000..c8b9008380a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D.h @@ -0,0 +1,35 @@ +#ifndef FREESTYLE_PYTHON_UNARYPREDICATE0D_H +#define FREESTYLE_PYTHON_UNARYPREDICATE0D_H + +#include "../stroke/Predicates0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryPredicate0D_Type; + +#define BPy_UnaryPredicate0D_Check(v) \ + ((v)->ob_type == &UnaryPredicate0D_Type) + +/*---------------------------Python BPy_UnaryPredicate0D structure definition----------*/ +typedef struct { + PyObject_HEAD + UnaryPredicate0D *up0D; +} BPy_UnaryPredicate0D; + +/*---------------------------Python BPy_UnaryPredicate0D visible prototypes-----------*/ + +PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYPREDICATE0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp index 0f2b5c4ad3a..bbbc9bfcc43 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp @@ -1,12 +1,170 @@ - PyObject *_wrap_UnaryPredicate1D_getName(PyObject *self , PyObject *args) { +#include "UnaryPredicate1D.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryPredicate1D instance -----------*/ +static int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds); +static void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D *self); +static PyObject * UnaryPredicate1D___repr__(BPy_UnaryPredicate1D *self); + +static PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args); +static PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args); + +/*----------------------UnaryPredicate1D instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryPredicate1D_methods[] = { + {"getName", ( PyCFunction ) UnaryPredicate1D_getName, METH_NOARGS, ""}, + {"__call__", ( PyCFunction ) UnaryPredicate1D___call__, METH_VARARGS, "" }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryPredicate1D type definition ------------------------------*/ + +PyTypeObject UnaryPredicate1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryPredicate1D", /* tp_name */ + sizeof( BPy_UnaryPredicate1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryPredicate1D___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryPredicate1D___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryPredicate1D_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryPredicate1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryPredicate1D_Type ) < 0 ) + return; + Py_INCREF( &UnaryPredicate1D_Type ); + PyModule_AddObject(module, "UnaryPredicate1D", (PyObject *)&UnaryPredicate1D_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) +{ + return 0; +} + +void UnaryPredicate1D___dealloc__(BPy_UnaryPredicate1D* self) +{ + delete self->up1D; + self->ob_type->tp_free((PyObject*)self); } - PyObject *_wrap_UnaryPredicate1D___call__(PyObject *self , PyObject *args) { +PyObject * UnaryPredicate1D___repr__(BPy_UnaryPredicate1D* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->up1D->getName().c_str(), self->up1D ); } - PyObject *_wrap_disown_UnaryPredicate1D(PyObject *self , PyObject *args) { +PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args) +{ + return PyString_FromString( self->up1D->getName().c_str() ); +} + +PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args) +{ + PyObject *l; + + if( !PyArg_ParseTuple(args, "O", &l) ) { + cout << "ERROR: UnaryPredicate1D___call__ " << endl; + return NULL; + } + + //TBD + + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + + diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D.h new file mode 100644 index 00000000000..8bb33782133 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D.h @@ -0,0 +1,35 @@ +#ifndef FREESTYLE_PYTHON_UNARYPREDICATE1D_H +#define FREESTYLE_PYTHON_UNARYPREDICATE1D_H + +#include "../stroke/Predicates1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryPredicate1D_Type; + +#define BPy_UnaryPredicate1D_Check(v) \ + ((v)->ob_type == &UnaryPredicate1D_Type) + +/*---------------------------Python BPy_UnaryPredicate1D structure definition----------*/ +typedef struct { + PyObject_HEAD + UnaryPredicate1D *up1D; +} BPy_UnaryPredicate1D; + +/*---------------------------Python BPy_UnaryPredicate1D visible prototypes-----------*/ + +PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYPREDICATE1D_H */ From 16d7d12123d25a353043cefe2c9e4664476224d7 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 18 Jul 2008 20:31:40 +0000 Subject: [PATCH 394/430] soc-2008-mxcurioni: Added IntegrationType and Nature classes, used to store constants used throughout Freestyle --- source/blender/freestyle/SConscript | 8 +- .../freestyle/intern/python/Convert.cpp | 2 - .../blender/freestyle/intern/python/Convert.h | 1 + .../freestyle/intern/python/Freestyle.cpp | 4 + .../intern/python/IntegrationType.cpp | 153 +++++++++++++ .../freestyle/intern/python/IntegrationType.h | 34 +++ .../intern/python/Interface0D/ViewVertex.cpp | 215 ++++++++++++------ .../intern/python/Interface0D/ViewVertex.h | 33 +++ .../freestyle/intern/python/Nature.cpp | 149 ++++++++++++ .../blender/freestyle/intern/python/Nature.h | 34 +++ 10 files changed, 560 insertions(+), 73 deletions(-) create mode 100644 source/blender/freestyle/intern/python/IntegrationType.cpp create mode 100644 source/blender/freestyle/intern/python/IntegrationType.h create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex.h create mode 100644 source/blender/freestyle/intern/python/Nature.cpp create mode 100644 source/blender/freestyle/intern/python/Nature.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 5a7745292a4..8e50d0ba5da 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -65,11 +65,17 @@ python_sources = [ prefix + '/BinaryPredicate0D.cpp', prefix + '/BinaryPredicate1D.cpp', prefix + '/Id.cpp', + prefix + '/IntegrationType.cpp', prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', prefix + '/Interface0D/SVertex.cpp', prefix + '/Interface1D.cpp', - prefix + '/Interface1D/FEdge.cpp' + prefix + '/Interface1D/FEdge.cpp', + prefix + '/Nature.cpp', + prefix + '/UnaryFunction0D.cpp', + prefix + '/UnaryFunction1D.cpp', + prefix + '/UnaryPredicate0D.cpp', + prefix + '/UnaryPredicate1D.cpp' ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index 47ad6f3c0ad..42250fbe97b 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -64,8 +64,6 @@ PyObject *BPy_FEdge_from_FEdge( FEdge& fe ) { return py_fe; } - - /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index edd62b1f24a..ce38f8cbc22 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -5,6 +5,7 @@ using namespace Geometry; #include "Id.h" +#include "IntegrationType.h" #include "Interface0D.h" #include "Interface0D/SVertex.h" #include "Interface1D/FEdge.h" diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index 809568abe2c..5f98f0f2a89 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -3,9 +3,11 @@ #include "BinaryPredicate0D.h" #include "BinaryPredicate1D.h" #include "Id.h" +#include "IntegrationType.h" #include "Interface0D.h" #include "Interface0D/CurvePoint.h" #include "Interface1D.h" +#include "Nature.h" #include "UnaryFunction0D.h" #include "UnaryFunction1D.h" #include "UnaryPredicate0D.h" @@ -128,8 +130,10 @@ PyObject *Freestyle_Init( void ) BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); Id_Init( module ); + IntegrationType_Init( module ); Interface0D_Init( module ); Interface1D_Init( module ); + Nature_Init( module ); UnaryFunction0D_Init( module ); UnaryFunction1D_Init( module ); UnaryPredicate0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/IntegrationType.cpp b/source/blender/freestyle/intern/python/IntegrationType.cpp new file mode 100644 index 00000000000..ff6bd3d4794 --- /dev/null +++ b/source/blender/freestyle/intern/python/IntegrationType.cpp @@ -0,0 +1,153 @@ +#include "IntegrationType.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for IntegrationType instance -----------*/ +static int IntegrationType___init__(BPy_IntegrationType *self, PyObject *args, PyObject *kwds); + +/*----------------------IntegrationType instance definitions ----------------------------*/ +static PyMethodDef BPy_IntegrationType_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_IntegrationType type definition ------------------------------*/ + +PyTypeObject IntegrationType_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "IntegrationType", /* tp_name */ + sizeof( BPy_IntegrationType ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_IntegrationType_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &PyInt_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)IntegrationType___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC IntegrationType_Init( PyObject *module ) +{ + PyObject *tmp; + + if( module == NULL ) + return; + + if( PyType_Ready( &IntegrationType_Type ) < 0 ) + return; + Py_INCREF( &IntegrationType_Type ); + PyModule_AddObject(module, "IntegrationType", (PyObject *)&IntegrationType_Type); + + tmp = PyInt_FromLong( MEAN ); + PyDict_SetItemString( IntegrationType_Type.tp_dict, "MEAN", tmp); + Py_DECREF(tmp); + + tmp = PyInt_FromLong( MIN ); + PyDict_SetItemString( IntegrationType_Type.tp_dict, "MIN", tmp); + Py_DECREF(tmp); + + tmp = PyInt_FromLong( MAX ); + PyDict_SetItemString( IntegrationType_Type.tp_dict, "MAX", tmp); + Py_DECREF(tmp); + + tmp = PyInt_FromLong( FIRST ); + PyDict_SetItemString( IntegrationType_Type.tp_dict, "FIRST", tmp); + Py_DECREF(tmp); + + tmp = PyInt_FromLong( LAST ); + PyDict_SetItemString( IntegrationType_Type.tp_dict, "LAST", tmp); + Py_DECREF(tmp); + + +} + +int IntegrationType___init__(BPy_IntegrationType *self, PyObject *args, PyObject *kwds) +{ + if (PyInt_Type.tp_init((PyObject *)self, args, kwds) < 0) + return -1; + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + diff --git a/source/blender/freestyle/intern/python/IntegrationType.h b/source/blender/freestyle/intern/python/IntegrationType.h new file mode 100644 index 00000000000..2ac81fdddfb --- /dev/null +++ b/source/blender/freestyle/intern/python/IntegrationType.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_INTEGRATIONTYPE_H +#define FREESTYLE_PYTHON_INTEGRATIONTYPE_H + +#include "../view_map/Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject IntegrationType_Type; + +#define BPy_IntegrationType_Check(v) \ + ((v)->ob_type == &IntegrationType_Type) + +/*---------------------------Python BPy_IntegrationType structure definition----------*/ +typedef struct { + PyIntObject i; +} BPy_IntegrationType; + +/*---------------------------Python BPy_IntegrationType visible prototypes-----------*/ + +PyMODINIT_FUNC IntegrationType_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_INTEGRATIONTYPE_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp index 293f42949e3..66583d21605 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp @@ -1,76 +1,151 @@ - PyObject *_wrap_ViewVertex_getExactTypeName(PyObject *self , PyObject *args) { +#include "SVertex.h" + +#include "../Convert.h" +#include "../Id.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewVertex instance -----------*/ +static int ViewVertex___init__(BPy_ViewVertex *self); +//static PyObject * ViewVertex___copy__( BPy_ViewVertex *self ); + + +/*----------------------ViewVertex instance definitions ----------------------------*/ +static PyMethodDef BPy_ViewVertex_methods[] = { +// {"__copy__", ( PyCFunction ) ViewVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ViewVertex type definition ------------------------------*/ + +PyTypeObject ViewVertex_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewVertex", /* tp_name */ + sizeof( BPy_ViewVertex ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ViewVertex_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewVertex___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int ViewVertex___init__(BPy_ViewVertex *self ) +{ + PyObject *py_point = 0; + BPy_Id *py_id = 0; + + self->vv = new ViewVertex(); + self->py_if0D.if0D = self->vv; + + return 0; } +// PyObject * ViewVertex___copy__( BPy_ViewVertex *self ) { +// BPy_ViewVertex *py_vv; +// +// py_vv = (BPy_ViewVertex *) ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); +// +// py_vv->vv = self->vv->duplicate(); +// py_svertex->py_if0D.if0D = py_svertex->sv; +// +// return (PyObject *) py_svertex; +// } - PyObject *_wrap_ViewVertex_userdata_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_userdata_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_setNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_Replace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edgesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edgesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewVertex_edgesIterator(PyObject *self , PyObject *args) { + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } +#endif +// virtual string getExactTypeName () const +// ViewVertex () +// virtual ~ViewVertex () +// virtual Nature::VertexNature getNature () const +// void setNature (Nature::VertexNature iNature) +// virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin ()=0 +// virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd ()=0 +// virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator (ViewEdge *iEdge)=0 +// diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h new file mode 100644 index 00000000000..b869df377fc --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_VIEWVERTEX_H +#define FREESTYLE_PYTHON_VIEWVERTEX_H + +#include "../../view_map/ViewMap.h" +#include "../Interface0D.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewVertex_Type; + +#define BPy_ViewVertex_Check(v) \ + ((v)->ob_type == &ViewVertex_Type) + +/*---------------------------Python BPy_ViewVertex structure definition----------*/ +typedef struct { + BPy_Interface0D py_if0D; + ViewVertex *vv; +} BPy_ViewVertex; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWVERTEX_H */ diff --git a/source/blender/freestyle/intern/python/Nature.cpp b/source/blender/freestyle/intern/python/Nature.cpp new file mode 100644 index 00000000000..fb4ba6bae37 --- /dev/null +++ b/source/blender/freestyle/intern/python/Nature.cpp @@ -0,0 +1,149 @@ +#include "Nature.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Nature instance -----------*/ +static int Nature___init__(BPy_Nature *self, PyObject *args, PyObject *kwds); + +/*----------------------Nature instance definitions ----------------------------*/ +static PyMethodDef BPy_Nature_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Nature type definition ------------------------------*/ + +PyTypeObject Nature_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Nature", /* tp_name */ + sizeof( BPy_Nature ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Nature_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &PyInt_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Nature___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC Nature_Init( PyObject *module ) +{ + PyObject *tmp; + + if( module == NULL ) + return; + + if( PyType_Ready( &Nature_Type ) < 0 ) + return; + Py_INCREF( &Nature_Type ); + PyModule_AddObject(module, "Nature", (PyObject *)&Nature_Type); + + // VertexNature + tmp = PyInt_FromLong( Nature::POINT ); PyDict_SetItemString( Nature_Type.tp_dict, "POINT", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::S_VERTEX ); PyDict_SetItemString( Nature_Type.tp_dict, "S_VERTEX", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::VIEW_VERTEX ); PyDict_SetItemString( Nature_Type.tp_dict, "VIEW_VERTEX", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::NON_T_VERTEX ); PyDict_SetItemString( Nature_Type.tp_dict, "NON_T_VERTEX", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::T_VERTEX ); PyDict_SetItemString( Nature_Type.tp_dict, "T_VERTEX", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::CUSP ); PyDict_SetItemString( Nature_Type.tp_dict, "CUSP", tmp); Py_DECREF(tmp); + + // EdgeNature + tmp = PyInt_FromLong( Nature::NO_FEATURE ); PyDict_SetItemString( Nature_Type.tp_dict, "NO_FEATURE", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::SILHOUETTE ); PyDict_SetItemString( Nature_Type.tp_dict, "SILHOUETTE", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::BORDER ); PyDict_SetItemString( Nature_Type.tp_dict, "BORDER", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::CREASE ); PyDict_SetItemString( Nature_Type.tp_dict, "CREASE", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::RIDGE ); PyDict_SetItemString( Nature_Type.tp_dict, "RIDGE", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::VALLEY ); PyDict_SetItemString( Nature_Type.tp_dict, "VALLEY", tmp); Py_DECREF(tmp); + tmp = PyInt_FromLong( Nature::SUGGESTIVE_CONTOUR ); PyDict_SetItemString( Nature_Type.tp_dict, "SUGGESTIVE_CONTOUR", tmp); Py_DECREF(tmp); + +} + +int Nature___init__(BPy_Nature *self, PyObject *args, PyObject *kwds) +{ + if (PyInt_Type.tp_init((PyObject *)self, args, kwds) < 0) + return -1; + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + diff --git a/source/blender/freestyle/intern/python/Nature.h b/source/blender/freestyle/intern/python/Nature.h new file mode 100644 index 00000000000..d0bc4de6fc0 --- /dev/null +++ b/source/blender/freestyle/intern/python/Nature.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_NATURE_H +#define FREESTYLE_PYTHON_NATURE_H + +#include "../winged_edge/Nature.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Nature_Type; + +#define BPy_Nature_Check(v) \ + ((v)->ob_type == &Nature_Type) + +/*---------------------------Python BPy_Nature structure definition----------*/ +typedef struct { + PyIntObject i; +} BPy_Nature; + +/*---------------------------Python BPy_Nature visible prototypes-----------*/ + +PyMODINIT_FUNC Nature_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_NATURE_H */ From ab722884d3684808b17f76ae742ef59dccf4f8e2 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 20 Jul 2008 05:01:29 +0000 Subject: [PATCH 395/430] soc-2008-mxcurioni: updated support for Nature class. --- source/blender/freestyle/SConscript | 3 +- .../freestyle/intern/python/Convert.cpp | 26 +++++++++---- .../blender/freestyle/intern/python/Convert.h | 2 + .../freestyle/intern/python/Interface0D.cpp | 10 ++++- .../intern/python/Interface0D/ViewVertex.cpp | 37 +++++++++++-------- .../intern/python/Interface0D/ViewVertex.h | 1 - .../freestyle/intern/python/Interface1D.cpp | 3 +- .../intern/python/Interface1D/FEdge.cpp | 16 ++++++++ .../freestyle/intern/python/Nature.cpp | 14 +++---- .../freestyle/intern/view_map/ViewMap.h | 13 ++++--- 10 files changed, 84 insertions(+), 41 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 8e50d0ba5da..bcbd018c011 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -69,13 +69,14 @@ python_sources = [ prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', prefix + '/Interface0D/SVertex.cpp', + prefix + '/Interface0D/ViewVertex.cpp', prefix + '/Interface1D.cpp', prefix + '/Interface1D/FEdge.cpp', prefix + '/Nature.cpp', prefix + '/UnaryFunction0D.cpp', prefix + '/UnaryFunction1D.cpp', prefix + '/UnaryPredicate0D.cpp', - prefix + '/UnaryPredicate1D.cpp' + prefix + '/UnaryPredicate1D.cpp', ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index 42250fbe97b..9cd2a098253 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -8,47 +8,47 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -PyObject *PyBool_from_bool( bool b ){ +PyObject * PyBool_from_bool( bool b ){ return PyBool_FromLong( b ? 1 : 0); } -PyObject *Vector_from_Vec2f( Vec2f& vec ) { +PyObject * Vector_from_Vec2f( Vec2f& vec ) { float vec_data[2]; // because vec->_coord is protected vec_data[0] = vec.x(); vec_data[1] = vec.y(); return newVectorObject( vec_data, 2, Py_NEW); } -PyObject *Vector_from_Vec3f( Vec3f& vec ) { +PyObject * Vector_from_Vec3f( Vec3f& vec ) { float vec_data[3]; // because vec->_coord is protected vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); return newVectorObject( vec_data, 3, Py_NEW); } -PyObject *Vector_from_Vec3r( Vec3r& vec ) { +PyObject * Vector_from_Vec3r( Vec3r& vec ) { float vec_data[3]; // because vec->_coord is protected vec_data[0] = vec.x(); vec_data[1] = vec.y(); vec_data[2] = vec.z(); return newVectorObject( vec_data, 3, Py_NEW); } -PyObject *BPy_Id_from_Id( Id& id ) { +PyObject * BPy_Id_from_Id( Id& id ) { PyObject *py_id = Id_Type.tp_new( &Id_Type, 0, 0 ); ((BPy_Id *) py_id)->id = new Id( id.getFirst(), id.getSecond() ); return py_id; } -PyObject *BPy_Interface0D_from_Interface0D( Interface0D& if0D ) { +PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ) { PyObject *py_if0D = Interface0D_Type.tp_new( &Interface0D_Type, 0, 0 ); ((BPy_Interface0D *) py_if0D)->if0D = &if0D; return py_if0D; } -PyObject *BPy_SVertex_from_SVertex( SVertex& sv ) { +PyObject * BPy_SVertex_from_SVertex( SVertex& sv ) { PyObject *py_sv = SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); ((BPy_SVertex *) py_sv)->sv = new SVertex( sv ); ((BPy_SVertex *) py_sv)->py_if0D.if0D = ((BPy_SVertex *) py_sv)->sv; @@ -56,7 +56,7 @@ PyObject *BPy_SVertex_from_SVertex( SVertex& sv ) { return py_sv; } -PyObject *BPy_FEdge_from_FEdge( FEdge& fe ) { +PyObject * BPy_FEdge_from_FEdge( FEdge& fe ) { PyObject *py_fe = FEdge_Type.tp_new( &FEdge_Type, 0, 0 ); ((BPy_FEdge *) py_fe)->fe = new FEdge( fe ); ((BPy_FEdge *) py_fe)->py_if1D.if1D = ((BPy_FEdge *) py_fe)->fe; @@ -64,6 +64,16 @@ PyObject *BPy_FEdge_from_FEdge( FEdge& fe ) { return py_fe; } +PyObject * BPy_Nature_from_Nature( unsigned short n ) { + PyObject *py_n = Nature_Type.tp_new( &Nature_Type, 0, 0 ); + + PyObject *args = PyTuple_New(1); + PyTuple_SetItem( args, 0, PyInt_FromLong(n) ); + Nature_Type.tp_init( py_n, args, 0 ); + Py_DECREF(args); + + return py_n; +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index ce38f8cbc22..2346d420813 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -9,6 +9,7 @@ using namespace Geometry; #include "Interface0D.h" #include "Interface0D/SVertex.h" #include "Interface1D/FEdge.h" +#include "Nature.h" #ifdef __cplusplus extern "C" { @@ -30,6 +31,7 @@ PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); +PyObject * BPy_Nature_from_Nature( unsigned short n ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 39c2146e015..469e2bc4c79 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -3,7 +3,9 @@ #include "Convert.h" #include "Interface0D/CurvePoint.h" #include "Interface0D/SVertex.h" +#include "Interface0D/ViewVertex.h" #include "Interface1D/FEdge.h" +#include "Nature.h" #ifdef __cplusplus extern "C" { @@ -152,6 +154,11 @@ PyMODINIT_FUNC Interface0D_Init( PyObject *module ) Py_INCREF( &SVertex_Type ); PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type); + if( PyType_Ready( &ViewVertex_Type ) < 0 ) + return; + Py_INCREF( &ViewVertex_Type ); + PyModule_AddObject(module, "ViewVertex", (PyObject *)&ViewVertex_Type); + } //------------------------INSTANCE METHODS ---------------------------------- @@ -243,8 +250,7 @@ PyObject *Interface0D_getId( BPy_Interface0D *self ) { PyObject *Interface0D_getNature( BPy_Interface0D *self ) { - // VertexNature - Py_RETURN_NONE; + return BPy_Nature_from_Nature( self->if0D->getNature() ); } diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp index 66583d21605..6168d1fb711 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp @@ -1,7 +1,6 @@ -#include "SVertex.h" +#include "ViewVertex.h" #include "../Convert.h" -#include "../Id.h" #ifdef __cplusplus extern "C" { @@ -11,12 +10,12 @@ extern "C" { /*--------------- Python API function prototypes for ViewVertex instance -----------*/ static int ViewVertex___init__(BPy_ViewVertex *self); -//static PyObject * ViewVertex___copy__( BPy_ViewVertex *self ); +static PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ); /*----------------------ViewVertex instance definitions ----------------------------*/ static PyMethodDef BPy_ViewVertex_methods[] = { -// {"__copy__", ( PyCFunction ) ViewVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {"setNature", ( PyCFunction ) ViewVertex_setNature, METH_VARARGS, "(Nature n )Sets the nature of the vertex."}, {NULL, NULL, 0, NULL} }; @@ -111,13 +110,8 @@ PyTypeObject ViewVertex_Type = { //------------------------INSTANCE METHODS ---------------------------------- int ViewVertex___init__(BPy_ViewVertex *self ) -{ - PyObject *py_point = 0; - BPy_Id *py_id = 0; - - self->vv = new ViewVertex(); - self->py_if0D.if0D = self->vv; - +{ + self->py_if0D.if0D = new Interface0D(); return 0; } @@ -127,11 +121,26 @@ int ViewVertex___init__(BPy_ViewVertex *self ) // py_vv = (BPy_ViewVertex *) ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); // // py_vv->vv = self->vv->duplicate(); -// py_svertex->py_if0D.if0D = py_svertex->sv; +// py_svertex->py_if0D.if->sv; // // return (PyObject *) py_svertex; // } +PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { + PyObject *py_n; + + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { + cout << "ERROR: ViewVertex_setNature" << endl; + Py_RETURN_NONE; + } + + PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); + ((ViewVertex *) self->py_if0D.if0D)->setNature( PyInt_AsLong(i) ); + + Py_RETURN_NONE; +} + + /////////////////////////////////////////////////////////////////////////////////////////// @@ -141,9 +150,7 @@ int ViewVertex___init__(BPy_ViewVertex *self ) // virtual string getExactTypeName () const -// ViewVertex () -// virtual ~ViewVertex () -// virtual Nature::VertexNature getNature () const + // void setNature (Nature::VertexNature iNature) // virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin ()=0 // virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd ()=0 diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h index b869df377fc..98eeb504a3d 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h @@ -21,7 +21,6 @@ extern PyTypeObject ViewVertex_Type; /*---------------------------Python BPy_ViewVertex structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; - ViewVertex *vv; } BPy_ViewVertex; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 971403b3354..30dd5b349bd 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -180,8 +180,7 @@ PyObject *Interface1D_getId( BPy_Interface1D *self ) { } PyObject *Interface1D_getNature( BPy_Interface1D *self ) { - // EdgeNature - Py_RETURN_NONE; + return BPy_Nature_from_Nature( self->if1D->getNature() ); } PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ) { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp index e8e5c6787e3..6a00ad66123 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp @@ -26,6 +26,7 @@ static PyObject * FEdge_SetId( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_SetSmooth( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ); /*----------------------FEdge instance definitions ----------------------------*/ static PyMethodDef BPy_FEdge_methods[] = { @@ -44,6 +45,7 @@ static PyMethodDef BPy_FEdge_methods[] = { {"SetNextEdge", ( PyCFunction ) FEdge_SetNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "}, {"SetPreviousEdge", ( PyCFunction ) FEdge_SetPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "}, {"SetSmooth", ( PyCFunction ) FEdge_SetSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "}, + {"SetNature", ( PyCFunction ) FEdge_SetNature, METH_VARARGS, "(Nature n) Sets the nature of this FEdge. "}, {NULL, NULL, 0, NULL} }; @@ -298,6 +300,20 @@ PyObject *FEdge_SetSmooth( BPy_FEdge *self , PyObject *args) { Py_RETURN_NONE; } +PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ) { + PyObject *py_n; + + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { + cout << "ERROR: FEdge_setNature" << endl; + Py_RETURN_NONE; + } + + PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); + ((FEdge *) self->py_if1D.if1D)->SetNature( PyInt_AsLong(i) ); + + Py_RETURN_NONE; +} + PyObject *FEdge_getVertices( BPy_FEdge *self ) { PyObject *py_vertices = PyList_New(NULL); diff --git a/source/blender/freestyle/intern/python/Nature.cpp b/source/blender/freestyle/intern/python/Nature.cpp index fb4ba6bae37..14357949022 100644 --- a/source/blender/freestyle/intern/python/Nature.cpp +++ b/source/blender/freestyle/intern/python/Nature.cpp @@ -123,13 +123,13 @@ PyMODINIT_FUNC Nature_Init( PyObject *module ) tmp = PyInt_FromLong( Nature::CUSP ); PyDict_SetItemString( Nature_Type.tp_dict, "CUSP", tmp); Py_DECREF(tmp); // EdgeNature - tmp = PyInt_FromLong( Nature::NO_FEATURE ); PyDict_SetItemString( Nature_Type.tp_dict, "NO_FEATURE", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::SILHOUETTE ); PyDict_SetItemString( Nature_Type.tp_dict, "SILHOUETTE", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::BORDER ); PyDict_SetItemString( Nature_Type.tp_dict, "BORDER", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::CREASE ); PyDict_SetItemString( Nature_Type.tp_dict, "CREASE", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::RIDGE ); PyDict_SetItemString( Nature_Type.tp_dict, "RIDGE", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::VALLEY ); PyDict_SetItemString( Nature_Type.tp_dict, "VALLEY", tmp); Py_DECREF(tmp); - tmp = PyInt_FromLong( Nature::SUGGESTIVE_CONTOUR ); PyDict_SetItemString( Nature_Type.tp_dict, "SUGGESTIVE_CONTOUR", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::NO_FEATURE ); PyDict_SetItemString( Nature_Type.tp_dict, "NO_FEATURE", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::SILHOUETTE ); PyDict_SetItemString( Nature_Type.tp_dict, "SILHOUETTE", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::BORDER ); PyDict_SetItemString( Nature_Type.tp_dict, "BORDER", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::CREASE ); PyDict_SetItemString( Nature_Type.tp_dict, "CREASE", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::RIDGE ); PyDict_SetItemString( Nature_Type.tp_dict, "RIDGE", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::VALLEY ); PyDict_SetItemString( Nature_Type.tp_dict, "VALLEY", tmp); Py_DECREF(tmp); + tmp = BPy_Nature_from_Nature( Nature::SUGGESTIVE_CONTOUR ); PyDict_SetItemString( Nature_Type.tp_dict, "SUGGESTIVE_CONTOUR", tmp); Py_DECREF(tmp); } diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index 7528d27cac6..416b7e8f23f 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -280,10 +280,11 @@ public: // this vertex in CCW order (order defined in 2D in the image plan) virtual edge_iterator edges_begin() = 0; virtual const_edge_iterator edges_begin() const = 0; - virtual edge_iterator edges_end() = 0; - virtual const_edge_iterator edges_end() const = 0; + virtual edge_iterator edges_end() = 0; + virtual const_edge_iterator edges_end() const = 0; virtual edge_iterator edges_iterator(ViewEdge *iEdge) = 0; - virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0; + virtual const_edge_iterator edges_iterator(ViewEdge *iEdge) const = 0; + // Iterator access /*! Returns an iterator over the ViewEdges that goes to or comes from @@ -292,14 +293,16 @@ public: * and to get the orientation for each ViewEdge (incoming/outgoing). */ virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin() = 0; + /*! Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, * pointing after the last ViewEdge. */ - virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() = 0; + virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd() = 0; + /*! Returns an orientedViewEdgeIterator pointing to the ViewEdge * given as argument. */ - virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) = 0; + virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator(ViewEdge *iEdge) = 0; }; From 7426a3e35bb6ebc5c08eb307c0f9d30ef51ae570 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 21 Jul 2008 21:24:37 +0000 Subject: [PATCH 396/430] Added StrokeAttribute class. Beginning of StrokeVertex. IMPORTANT: The setters functions' names were normalized due to constant confusion regarding capitalization. All the function names start with set... instead of Set.... This convention was changed all throughout Freestyle. To use Freestyle as an external renderer, the SWIG library MUST be regenerated. --- source/blender/freestyle/SConscript | 2 + .../freestyle/intern/app/AppCanvas.cpp | 8 +- .../blender/freestyle/intern/app/AppCanvas.h | 2 +- .../intern/app/AppDensityCurvesWindow.cpp | 8 +- .../intern/app/AppDensityCurvesWindow.h | 4 +- .../intern/app/AppGL2DCurvesViewer.cpp | 12 +- .../intern/app/AppGL2DCurvesViewer.h | 4 +- .../freestyle/intern/app/AppGLWidget.cpp | 74 +- .../freestyle/intern/app/AppGLWidget.h | 2 +- .../freestyle/intern/app/AppMainWindow.cpp | 2 +- .../freestyle/intern/app/Controller.cpp | 78 +- source/blender/freestyle/intern/app/Main.cpp | 4 +- .../freestyle/intern/app/QGLBasicWidget.cpp | 8 +- .../intern/app_blender/AppCanvas.cpp | 8 +- .../freestyle/intern/app_blender/AppCanvas.h | 2 +- .../intern/app_blender/AppGLWidget.cpp | 50 +- .../intern/app_blender/AppGLWidget.h | 12 +- .../intern/app_blender/Controller.cpp | 56 +- .../freestyle/intern/app_blender/Controller.h | 2 +- .../freestyle/intern/app_blender/api.cpp | 2 +- .../freestyle/intern/geometry/GeomCleaner.h | 4 +- .../freestyle/intern/image/GaussianFilter.cpp | 2 +- .../freestyle/intern/image/GaussianFilter.h | 2 +- .../intern/python/BinaryPredicate0D.h | 3 +- .../intern/python/BinaryPredicate1D.h | 3 +- .../freestyle/intern/python/Freestyle.cpp | 2 + .../freestyle/intern/python/Freestyle.h | 3 +- source/blender/freestyle/intern/python/Id.h | 3 +- .../freestyle/intern/python/IntegrationType.h | 3 +- .../freestyle/intern/python/Interface0D.h | 3 +- .../intern/python/Interface0D/CurvePoint.cpp | 30 +- .../intern/python/Interface0D/CurvePoint.h | 3 +- .../Interface0D/CurvePoint/StrokeVertex.cpp | 344 +- .../Interface0D/CurvePoint/StrokeVertex.h | 31 + .../intern/python/Interface0D/SVertex.cpp | 30 +- .../intern/python/Interface0D/SVertex.h | 3 +- .../intern/python/Interface0D/ViewVertex.h | 3 +- .../freestyle/intern/python/Interface1D.h | 3 +- .../intern/python/Interface1D/FEdge.cpp | 68 +- .../intern/python/Interface1D/FEdge.h | 3 +- .../blender/freestyle/intern/python/Nature.h | 3 +- .../intern/python/StrokeAttribute.cpp | 526 +- .../freestyle/intern/python/StrokeAttribute.h | 34 + .../freestyle/intern/python/UnaryFunction0D.h | 3 +- .../freestyle/intern/python/UnaryFunction1D.h | 3 +- .../intern/python/UnaryPredicate0D.h | 3 +- .../intern/python/UnaryPredicate1D.h | 3 +- .../intern/rendering/GLDebugRenderer.h | 10 +- .../freestyle/intern/rendering/GLRenderer.cpp | 2 +- .../intern/scene_graph/DrawingStyle.h | 8 +- .../intern/scene_graph/IndexedFaceSet.cpp | 2 +- .../intern/scene_graph/IndexedFaceSet.h | 2 +- .../freestyle/intern/scene_graph/LineRep.cpp | 2 +- .../freestyle/intern/scene_graph/LineRep.h | 12 +- .../freestyle/intern/scene_graph/Material.h | 20 +- .../intern/scene_graph/MaxFileLoader.cpp | 16 +- .../intern/scene_graph/MaxFileLoader.h | 2 +- .../freestyle/intern/scene_graph/Node.h | 2 +- .../intern/scene_graph/NodeDrawingStyle.h | 10 +- .../freestyle/intern/scene_graph/NodeShape.h | 2 +- .../intern/scene_graph/NodeTransform.cpp | 2 +- .../intern/scene_graph/NodeTransform.h | 2 +- .../freestyle/intern/scene_graph/Rep.h | 6 +- .../intern/scene_graph/TriangleRep.cpp | 2 +- .../intern/scene_graph/TriangleRep.h | 10 +- .../intern/scene_graph/VertexRep.cpp | 2 +- .../freestyle/intern/scene_graph/VertexRep.h | 6 +- .../intern/stroke/AdvancedFunctions0D.h | 4 +- .../intern/stroke/AdvancedStrokeShaders.cpp | 4 +- .../intern/stroke/BasicStrokeShaders.cpp | 42 +- .../freestyle/intern/stroke/Canvas.cpp | 2 +- .../blender/freestyle/intern/stroke/Canvas.h | 8 +- .../blender/freestyle/intern/stroke/Curve.h | 6 +- .../freestyle/intern/stroke/Modifiers.h | 2 +- .../freestyle/intern/stroke/Operators.cpp | 8 +- .../freestyle/intern/stroke/QInformationMap.h | 2 +- .../freestyle/intern/stroke/Stroke.cpp | 14 +- .../blender/freestyle/intern/stroke/Stroke.h | 70 +- .../freestyle/intern/stroke/StrokeLayer.h | 2 +- .../freestyle/intern/stroke/StrokeRep.h | 2 +- .../intern/stroke/StrokeTesselator.cpp | 12 +- .../intern/stroke/StrokeTesselator.h | 4 +- .../freestyle/intern/swig/ModuleWrapper.cpp | 17983 ++++++++-------- .../freestyle/intern/swig/ModuleWrapper.h | 36 +- .../intern/view_map/FEdgeXDetector.cpp | 10 +- .../intern/view_map/FEdgeXDetector.h | 4 +- .../freestyle/intern/view_map/Silhouette.h | 130 +- .../intern/view_map/SilhouetteGeomEngine.cpp | 10 +- .../intern/view_map/SilhouetteGeomEngine.h | 6 +- .../intern/view_map/ViewEdgeXBuilder.cpp | 74 +- .../intern/view_map/ViewEdgeXBuilder.h | 6 +- .../freestyle/intern/view_map/ViewMap.cpp | 46 +- .../freestyle/intern/view_map/ViewMap.h | 106 +- .../intern/view_map/ViewMapBuilder.cpp | 42 +- .../intern/view_map/ViewMapBuilder.h | 16 +- .../freestyle/intern/view_map/ViewMapIO.cpp | 102 +- .../intern/view_map/ViewMapTesselator.h | 18 +- .../freestyle/intern/winged_edge/WEdge.cpp | 64 +- .../freestyle/intern/winged_edge/WEdge.h | 60 +- .../freestyle/intern/winged_edge/WXEdge.cpp | 26 +- .../freestyle/intern/winged_edge/WXEdge.h | 30 +- .../intern/winged_edge/WXEdgeBuilder.cpp | 6 +- .../intern/winged_edge/WingedEdgeBuilder.cpp | 14 +- source/blender/freestyle/python/Freestyle.py | 251 +- .../style_modules/anisotropic_diffusion.py | 2 +- .../freestyle/style_modules/shaders.py | 48 +- .../style_modules/sketchy_topology_broken.py | 4 +- 107 files changed, 11286 insertions(+), 9571 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h create mode 100644 source/blender/freestyle/intern/python/StrokeAttribute.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index bcbd018c011..81749b60b2a 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -68,11 +68,13 @@ python_sources = [ prefix + '/IntegrationType.cpp', prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', + # prefix + '/Interface0D/CurvePoint/StrokeVertex.cpp', prefix + '/Interface0D/SVertex.cpp', prefix + '/Interface0D/ViewVertex.cpp', prefix + '/Interface1D.cpp', prefix + '/Interface1D/FEdge.cpp', prefix + '/Nature.cpp', + prefix + '/StrokeAttribute.cpp', prefix + '/UnaryFunction0D.cpp', prefix + '/UnaryFunction1D.cpp', prefix + '/UnaryPredicate0D.cpp', diff --git a/source/blender/freestyle/intern/app/AppCanvas.cpp b/source/blender/freestyle/intern/app/AppCanvas.cpp index 60d36880c12..3ca06fddfe7 100755 --- a/source/blender/freestyle/intern/app/AppCanvas.cpp +++ b/source/blender/freestyle/intern/app/AppCanvas.cpp @@ -68,7 +68,7 @@ AppCanvas::~AppCanvas() _pViewer = 0; } -void AppCanvas::SetViewer(AppGLWidget *iViewer) +void AppCanvas::setViewer(AppGLWidget *iViewer) { _pViewer = iViewer; } @@ -181,7 +181,7 @@ void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) cons // qtmp.save("densityQuery"+QString::number(number)+".png", "PNG"); // // GaussianFilter filter; - // filter.SetSigma(4.0); + // filter.setSigma(4.0); // int bound = filter.getBound(); // QImage qtmp2(width(), height(), 32); // for(int py2=0;py2Set3DContext(); + _pViewer->set3DContext(); _pViewer->DrawScene(_pViewer->glRenderer()); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); @@ -347,7 +347,7 @@ void AppCanvas::RenderBasic(const StrokeRenderer *iRenderer) glEnable(GL_LIGHTING); glEnable(GL_DEPTH_TEST); - _pViewer->Set3DContext(); + _pViewer->set3DContext(); _pViewer->DrawScene(_pViewer->glRenderer()); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); diff --git a/source/blender/freestyle/intern/app/AppCanvas.h b/source/blender/freestyle/intern/app/AppCanvas.h index 703970c0fb1..be02c02eab7 100755 --- a/source/blender/freestyle/intern/app/AppCanvas.h +++ b/source/blender/freestyle/intern/app/AppCanvas.h @@ -77,7 +77,7 @@ public: inline const AppGLWidget * viewer() const {return _pViewer;} /*! modifiers */ - void SetViewer(AppGLWidget *iViewer) ; + void setViewer(AppGLWidget *iViewer) ; }; diff --git a/source/blender/freestyle/intern/app/AppDensityCurvesWindow.cpp b/source/blender/freestyle/intern/app/AppDensityCurvesWindow.cpp index fe2ae994f77..ec7ee004bf3 100755 --- a/source/blender/freestyle/intern/app/AppDensityCurvesWindow.cpp +++ b/source/blender/freestyle/intern/app/AppDensityCurvesWindow.cpp @@ -33,7 +33,7 @@ AppDensityCurvesWindow::AppDensityCurvesWindow(QWidget *parent, const char *name AppDensityCurvesWindow::~AppDensityCurvesWindow(){ } -void AppDensityCurvesWindow::SetOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ +void AppDensityCurvesWindow::setOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ AppGL2DCurvesViewer * viewer = 0; switch(i){ case 0:viewer = CurvesViewer0; break; @@ -44,10 +44,10 @@ void AppDensityCurvesWindow::SetOrientationCurve(int i, const Vec2d& vmin, const default:return; } - viewer->SetCurve(vmin, vmax, iCurve, xlabel, ylabel); + viewer->setCurve(vmin, vmax, iCurve, xlabel, ylabel); } -void AppDensityCurvesWindow::SetLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ +void AppDensityCurvesWindow::setLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel){ AppGL2DCurvesViewer * viewer = 0; switch(i){ case 1:viewer = LevelCurveViewer1; break; @@ -61,5 +61,5 @@ void AppDensityCurvesWindow::SetLevelCurve(int i, const Vec2d& vmin, const Vec2d default:return; } - viewer->SetCurve(vmin, vmax, iCurve, xlabel, ylabel); + viewer->setCurve(vmin, vmax, iCurve, xlabel, ylabel); } diff --git a/source/blender/freestyle/intern/app/AppDensityCurvesWindow.h b/source/blender/freestyle/intern/app/AppDensityCurvesWindow.h index d7091440e06..2fda4da49d9 100755 --- a/source/blender/freestyle/intern/app/AppDensityCurvesWindow.h +++ b/source/blender/freestyle/intern/app/AppDensityCurvesWindow.h @@ -60,7 +60,7 @@ public: * \param ylabel * The label of the y-axis */ - void SetOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); + void setOrientationCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); /*! Sets the node that contains the level curve i in * viewer i (i in [1,8]). @@ -77,7 +77,7 @@ public: * \param ylabel * The label of the y-axis */ - void SetLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); + void setLevelCurve(int i, const Vec2d& vmin, const Vec2d& vmax, const vector& iCurve, const char *xlabel, const char *ylabel); }; #endif // APPDENSITYCURVESWINDOW_H diff --git a/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.cpp b/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.cpp index 0915a4c3cbd..c5ff7ef6a71 100755 --- a/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.cpp +++ b/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.cpp @@ -28,8 +28,8 @@ AppGL2DCurvesViewer::AppGL2DCurvesViewer(QWidget *iParent, const char *iName) : QGLViewer(iParent) { - _RootNode.SetLightingEnabled(false); - _RootNode.SetLineWidth(1.0); + _RootNode.setLightingEnabled(false); + _RootNode.setLineWidth(1.0); _pGLRenderer = new GLRenderer; } AppGL2DCurvesViewer::~AppGL2DCurvesViewer(){ @@ -39,7 +39,7 @@ AppGL2DCurvesViewer::~AppGL2DCurvesViewer(){ delete _pGLRenderer; } -void AppGL2DCurvesViewer::SetRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel){ +void AppGL2DCurvesViewer::setRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel){ _vmin = vmin; _vmax = vmax; _xmargin = (vmax.x()-vmin.x())/20.0; @@ -53,8 +53,8 @@ void AppGL2DCurvesViewer::SetRange(const Vec2d& vmin, const Vec2d& vmax, const c if(ylabel) _ylabel = ylabel; } -void AppGL2DCurvesViewer::SetCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel){ - SetRange(vmin, vmax, xlabel, ylabel); +void AppGL2DCurvesViewer::setCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel){ + setRange(vmin, vmax, xlabel, ylabel); vector nodes; _RootNode.RetrieveChildren(nodes); _RootNode.DetachChildren(); @@ -67,7 +67,7 @@ void AppGL2DCurvesViewer::SetCurve(const Vec2d& vmin, const Vec2d& vmax, const v _curve = iPoints; NodeGroup * curveNode = new NodeGroup; NodeShape * shape = new NodeShape; - shape->material().SetDiffuse(0,0,0,1); + shape->material().setDiffuse(0,0,0,1); curveNode->AddChild(shape); shape->AddRep(new LineRep(iPoints)); for(vector::const_iterator v=iPoints.begin(), vend=iPoints.end(); diff --git a/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.h b/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.h index c0bb8b4109c..2bdefba2a90 100755 --- a/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.h +++ b/source/blender/freestyle/intern/app/AppGL2DCurvesViewer.h @@ -46,8 +46,8 @@ public: /*! Sets the ranges. */ - void SetRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel); - void SetCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel); + void setRange(const Vec2d& vmin, const Vec2d& vmax, const char * xlabel, const char *ylabel); + void setCurve(const Vec2d& vmin, const Vec2d& vmax, const vector& iPoints, const char *xlabel, const char *ylabel); void AddNode(Node* iNode); void DetachNode(Node* iNode); void RetrieveNodes(vector& oNodes); diff --git a/source/blender/freestyle/intern/app/AppGLWidget.cpp b/source/blender/freestyle/intern/app/AppGLWidget.cpp index d59ad716c18..46e1f409cb2 100755 --- a/source/blender/freestyle/intern/app/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app/AppGLWidget.cpp @@ -58,22 +58,22 @@ AppGLWidget::AppGLWidget(QWidget *iParent, const char *iName) _Fovy = 30.f; //_SceneDepth = 2.f; _RenderStyle = LINE; - //_ModelRootNode->SetBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); + //_ModelRootNode->setBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); _ModelRootNode = new NodeDrawingStyle; _SilhouetteRootNode = new NodeDrawingStyle; _DebugRootNode = new NodeDrawingStyle; _RootNode.AddChild(_ModelRootNode); - _SilhouetteRootNode->SetStyle(DrawingStyle::LINES); - _SilhouetteRootNode->SetLightingEnabled(false); - _SilhouetteRootNode->SetLineWidth(2.f); - _SilhouetteRootNode->SetPointSize(3.f); + _SilhouetteRootNode->setStyle(DrawingStyle::LINES); + _SilhouetteRootNode->setLightingEnabled(false); + _SilhouetteRootNode->setLineWidth(2.f); + _SilhouetteRootNode->setPointSize(3.f); _RootNode.AddChild(_SilhouetteRootNode); - _DebugRootNode->SetStyle(DrawingStyle::LINES); - _DebugRootNode->SetLightingEnabled(false); - _DebugRootNode->SetLineWidth(1.f); + _DebugRootNode->setStyle(DrawingStyle::LINES); + _DebugRootNode->setLightingEnabled(false); + _DebugRootNode->setLineWidth(1.f); _RootNode.AddChild(_DebugRootNode); @@ -91,23 +91,23 @@ AppGLWidget::AppGLWidget(QWidget *iParent, const char *iName) // 2D Scene // _pFENode = new NodeDrawingStyle; - // _pFENode->SetStyle(DrawingStyle::LINES); - // _pFENode->SetLightingEnabled(false); - // _pFENode->SetLineWidth(1.f); + // _pFENode->setStyle(DrawingStyle::LINES); + // _pFENode->setLightingEnabled(false); + // _pFENode->setLineWidth(1.f); // // _p2DNode.AddChild(_pFENode); // // _pVisibleSilhouetteNode = new NodeDrawingStyle; - // _pVisibleSilhouetteNode->SetStyle(DrawingStyle::LINES); - // _pVisibleSilhouetteNode->SetLightingEnabled(false); - // _pVisibleSilhouetteNode->SetLineWidth(3.f); + // _pVisibleSilhouetteNode->setStyle(DrawingStyle::LINES); + // _pVisibleSilhouetteNode->setLightingEnabled(false); + // _pVisibleSilhouetteNode->setLineWidth(3.f); // // _p2DNode.AddChild(_pVisibleSilhouetteNode); // _p2DSelectionNode = new NodeDrawingStyle; - _p2DSelectionNode->SetLightingEnabled(false); - _p2DSelectionNode->SetStyle(DrawingStyle::LINES); - _p2DSelectionNode->SetLineWidth(5.f); + _p2DSelectionNode->setLightingEnabled(false); + _p2DSelectionNode->setStyle(DrawingStyle::LINES); + _p2DSelectionNode->setLineWidth(5.f); _p2DNode.AddChild(_p2DSelectionNode); @@ -188,7 +188,7 @@ AppGLWidget::~AppGLWidget() //saveToFile(filename); } -void AppGLWidget::SetMainWindow(QMainWindow *iMainWindow) { +void AppGLWidget::setMainWindow(QMainWindow *iMainWindow) { _pMainWindow = iMainWindow; } void AppGLWidget::captureMovie() @@ -315,18 +315,18 @@ AppGLWidget::select(const QMouseEvent *e) { _p2DSelectionNode->AddChild(g_pController->BuildRep(vedges.begin(), vedges.end())); // FEdge LineRep * fedgeRep = new LineRep(fe->vertexA()->point2d(), fe->vertexB()->point2d()); - fedgeRep->SetWidth(3.f); + fedgeRep->setWidth(3.f); NodeShape * fedgeNode = new NodeShape; fedgeNode->AddRep(fedgeRep); - fedgeNode->material().SetDiffuse(0.2, 1, 0.2, 1.0); + fedgeNode->material().setDiffuse(0.2, 1, 0.2, 1.0); _p2DSelectionNode->AddChild(fedgeNode); //SVertex A Vec3r A(fe->vertexA()->point2d()); VertexRep * aVertexRep = new VertexRep(A.x(), A.y(), A.z()); - aVertexRep->SetPointSize(3.f); + aVertexRep->setPointSize(3.f); NodeShape * aVertexNode = new NodeShape; aVertexNode->AddRep(aVertexRep); - aVertexNode->material().SetDiffuse(1, 0, 0, 1.0); + aVertexNode->material().setDiffuse(1, 0, 0, 1.0); _p2DSelectionNode->AddChild(aVertexNode); // and its fedges const vector& afedges = fe->vertexA()->fedges(); @@ -336,16 +336,16 @@ AppGLWidget::select(const QMouseEvent *e) { ++f) { LineRep * lrep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d()); - lrep->SetWidth(1.f); + lrep->setWidth(1.f); aVertexNode->AddRep(lrep); } //SVertex B Vec3r B(fe->vertexB()->point2d()); VertexRep * bVertexRep = new VertexRep(B.x(), B.y(), B.z()); - bVertexRep->SetPointSize(3.f); + bVertexRep->setPointSize(3.f); NodeShape * bVertexNode = new NodeShape; bVertexNode->AddRep(bVertexRep); - bVertexNode->material().SetDiffuse(0, 0, 1, 1.0); + bVertexNode->material().setDiffuse(0, 0, 1, 1.0); _p2DSelectionNode->AddChild(bVertexNode); // and its fedges const vector& bfedges = fe->vertexB()->fedges(); @@ -356,7 +356,7 @@ AppGLWidget::select(const QMouseEvent *e) { ++f) { LineRep * lrep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d()); - lrep->SetWidth(1.f); + lrep->setWidth(1.f); bVertexNode->AddRep(lrep); } @@ -458,9 +458,9 @@ AppGLWidget::keyPressEvent(QKeyEvent* e) } updateGL(); break; - case Qt::Key_1: _ModelRootNode->SetStyle(DrawingStyle::FILLED); updateGL(); break; - case Qt::Key_2: _ModelRootNode->SetStyle(DrawingStyle::LINES); _ModelRootNode->SetLineWidth(1.0); updateGL(); break; - case Qt::Key_3: _ModelRootNode->SetStyle(DrawingStyle::INVISIBLE); updateGL(); break; + case Qt::Key_1: _ModelRootNode->setStyle(DrawingStyle::FILLED); updateGL(); break; + case Qt::Key_2: _ModelRootNode->setStyle(DrawingStyle::LINES); _ModelRootNode->setLineWidth(1.0); updateGL(); break; + case Qt::Key_3: _ModelRootNode->setStyle(DrawingStyle::INVISIBLE); updateGL(); break; case Qt::Key_B: { // if(e->state() == ShiftButton) @@ -737,7 +737,7 @@ void AppGLWidget::draw() if (true == _Draw2DScene) { Draw2DScene(_pGLRenderer); - Set3DContext(); + set3DContext(); } if(_record){ saveSnapshot(true); @@ -759,7 +759,7 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) if(_drawEnvMap) { - _ModelRootNode->SetLightingEnabled(false); + _ModelRootNode->setLightingEnabled(false); glEnable(GL_COLOR_MATERIAL); glEnable(GL_TEXTURE_2D); @@ -800,15 +800,15 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) } // FIXME - // //_ModelRootNode->SetLightingEnabled(true); + // //_ModelRootNode->setLightingEnabled(true); // if(_ModelRootNode->style() == DrawingStyle::LINES){ // glPushAttrib(GL_ALL_ATTRIB_BITS); // //glDisable(GL_COLOR_MATERIAL); - // _ModelRootNode->SetStyle(DrawingStyle::FILLED); - // _ModelRootNode->SetLightingEnabled(true); + // _ModelRootNode->setStyle(DrawingStyle::FILLED); + // _ModelRootNode->setLightingEnabled(true); // _ModelRootNode->accept(*iRenderer); - // _ModelRootNode->SetStyle(DrawingStyle::LINES); - // _ModelRootNode->SetLightingEnabled(false); + // _ModelRootNode->setStyle(DrawingStyle::LINES); + // _ModelRootNode->setLightingEnabled(false); // _ModelRootNode->accept(*iRenderer); // glPopAttrib(); // } @@ -819,7 +819,7 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) glDisable(GL_TEXTURE_GEN_T); glDisable(GL_TEXTURE_2D); glDisable(GL_COLOR_MATERIAL); - _ModelRootNode->SetLightingEnabled(true); + _ModelRootNode->setLightingEnabled(true); if(_fedges == true) _SilhouetteRootNode->accept(*iRenderer); diff --git a/source/blender/freestyle/intern/app/AppGLWidget.h b/source/blender/freestyle/intern/app/AppGLWidget.h index 24bb2c7229b..844af9f4037 100755 --- a/source/blender/freestyle/intern/app/AppGLWidget.h +++ b/source/blender/freestyle/intern/app/AppGLWidget.h @@ -297,7 +297,7 @@ public: // when a model is added to the scene. void ReInitRenderers(); - inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->setSelectedFEdge(iFEdge); } inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} diff --git a/source/blender/freestyle/intern/app/AppMainWindow.cpp b/source/blender/freestyle/intern/app/AppMainWindow.cpp index 03b4f3a28ea..f869eb8e637 100755 --- a/source/blender/freestyle/intern/app/AppMainWindow.cpp +++ b/source/blender/freestyle/intern/app/AppMainWindow.cpp @@ -40,7 +40,7 @@ AppMainWindow::AppMainWindow(QWidget *parent, const char *name, Qt::WindowFlags // setCaption(Config::APPLICATION_NAME + " " + Config::APPLICATION_VERSION); setGeometry(20,20,700,700); - pQGLWidget->SetMainWindow(this); + pQGLWidget->setMainWindow(this); _ProgressBar = new QProgressDialog(Config::APPLICATION_NAME + " Progress Dialog", "Cancel", 0, 100, this); diff --git a/source/blender/freestyle/intern/app/Controller.cpp b/source/blender/freestyle/intern/app/Controller.cpp index ac41b31ac78..fc4912af5e6 100755 --- a/source/blender/freestyle/intern/app/Controller.cpp +++ b/source/blender/freestyle/intern/app/Controller.cpp @@ -194,7 +194,7 @@ void Controller::SetView(AppGLWidget *iView) _pView = iView; //_pView2D->setGeometry(_pView->rect()); - _Canvas->SetViewer(_pView); + _Canvas->setViewer(_pView); } void Controller::SetMainWindow(AppMainWindow *iMainWindow) @@ -257,7 +257,7 @@ int Controller::Load3DSFile(const char *iFileName) _RootNode->AddChild(maxScene); _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox - _pView->SetModel(_RootNode); + _pView->setModel(_RootNode); _pView->FitBBox(); _pMainWindow->DisplayMessage("Building Winged Edge structure"); @@ -299,7 +299,7 @@ int Controller::Load3DSFile(const char *iFileName) _ProgressBar->setProgress(3); - _pView->SetDebug(_DebugNode); + _pView->setDebug(_DebugNode); //delete stuff // if(0 != ws_builder) @@ -571,8 +571,8 @@ void Controller::LoadViewMapFile(const char *iFileName, bool only_camera) _pMainWindow->DisplayMessage("Updating display"); ViewMapTesselator3D sTesselator3d; //ViewMapTesselator2D sTesselator2d; - //sTesselator2d.SetNature(_edgeTesselationNature); - sTesselator3d.SetNature(_edgeTesselationNature); + //sTesselator2d.setNature(_edgeTesselationNature); + sTesselator3d.setNature(_edgeTesselationNature); // Tesselate the 3D edges: _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); @@ -653,7 +653,7 @@ void Controller::ComputeViewMap() // Restore the context of view: // we need to perform all these operations while the // 3D context is on. - _pView->Set3DContext(); + _pView->set3DContext(); float src[3] = { 0, 0, 0 }; float vp_tmp[3]; _pView->camera()->getWorldCoordinatesOf(src, vp_tmp); @@ -673,9 +673,9 @@ void Controller::ComputeViewMap() _Chrono.start(); if (_SceneNumFaces > 2000) - edgeDetector.SetProgressBar(_ProgressBar); + edgeDetector.setProgressBar(_ProgressBar); - edgeDetector.SetViewpoint(Vec3r(vp)); + edgeDetector.setViewpoint(Vec3r(vp)); edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); edgeDetector.enableSuggestiveContours(_ComputeSuggestive); edgeDetector.setSphereRadius(_sphereRadius); @@ -758,7 +758,7 @@ void Controller::ComputeViewMap() // if((res == GeomUtils::DO_INTERSECT) && (t>=0.0) && (t<=1.0)){ // Vec3r inter(oppositeEdge->GetaVertex()->GetVertex() + t*v1v2); // VertexRep * irep = new VertexRep(inter.x(), inter.y(), inter.z()); - // irep->SetPointSize(5.0); + // irep->setPointSize(5.0); // silhouetteDebugShape->AddRep(irep); // } // } @@ -789,9 +789,9 @@ void Controller::ComputeViewMap() // silhouetteDebugShape->AddRep(line); // } // Material redmat; -// redmat.SetDiffuse(1,0,0,1); +// redmat.setDiffuse(1,0,0,1); // Material greenmat; -// greenmat.SetDiffuse(0,1,0,1); +// greenmat.setDiffuse(0,1,0,1); // real vecSize = _bboxDiag/70.0; // vector flayers; // wxf->retrieveSmoothLayers(Nature::RIDGE, flayers); @@ -831,17 +831,17 @@ void Controller::ComputeViewMap() // Curvature_info * ci = fci->vec_curvature_info[i]; // Vec3r v(wxf->GetVertex(i)->GetVertex()); // // VertexRep *vrep = new VertexRep(v[0], v[1], v[2]); - // // vrep->SetMaterial(redmat); - // // vrep->SetPointSize(5.0); + // // vrep->setMaterial(redmat); + // // vrep->setPointSize(5.0); // // silhouetteDebugShape->AddRep(vrep); // // LineRep * maxc = new LineRep(v-vecSize*ci->e1/2.0, v+vecSize*ci->e1/2.0); // // LineRep * maxc = new LineRep(v, v+vecSize*ci->e1); - // // maxc->SetMaterial(redmat); - // // maxc->SetWidth(2.0); + // // maxc->setMaterial(redmat); + // // maxc->setWidth(2.0); // // silhouetteDebugShape->AddRep(maxc); // LineRep * minc = new LineRep(v, v+vecSize*ci->e2); - // minc->SetMaterial(greenmat); - // minc->SetWidth(2.0); + // minc->setMaterial(greenmat); + // minc->setWidth(2.0); // silhouetteDebugShape->AddRep(minc); // } // } @@ -888,21 +888,21 @@ void Controller::ComputeViewMap() // Builds the view map structure from the flagged WSEdge structure: //---------------------------------------------------------- ViewMapBuilder vmBuilder; - vmBuilder.SetProgressBar(_ProgressBar); - vmBuilder.SetEnableQI(_EnableQI); - vmBuilder.SetViewpoint(Vec3r(vp)); + vmBuilder.setProgressBar(_ProgressBar); + vmBuilder.setEnableQI(_EnableQI); + vmBuilder.setViewpoint(Vec3r(vp)); - vmBuilder.SetTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); - vmBuilder.SetFrustum(_pView->znear(), _pView->zfar()); + vmBuilder.setTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.setFrustum(_pView->znear(), _pView->zfar()); - vmBuilder.SetGrid(&_Grid); + vmBuilder.setGrid(&_Grid); // Builds a tesselated form of the silhouette for display purpose: //--------------------------------------------------------------- ViewMapTesselator3D sTesselator3d; //ViewMapTesselator2D sTesselator2d; - //sTesselator2d.SetNature(_edgeTesselationNature); - sTesselator3d.SetNature(_edgeTesselationNature); + //sTesselator2d.setNature(_edgeTesselationNature); + sTesselator3d.setNature(_edgeTesselationNature); _Chrono.start(); // Build View Map @@ -1016,10 +1016,10 @@ void Controller::ComputeViewMap() // positive = true; // } // if(positive) - // mat.SetDiffuse(1,1,0,1); + // mat.setDiffuse(1,1,0,1); // else - // mat.SetDiffuse(1,0,0,1); - // lrep->SetMaterial(mat); + // mat.setDiffuse(1,0,0,1); + // lrep->setMaterial(mat); // fe = fe->nextEdge(); // }while((fe!=0) && (fe!=fefirst)); // } @@ -1060,7 +1060,7 @@ void Controller::ComputeSteerableViewMap(){ ng[i] = new NodeGroup; } NodeShape *completeNS = new NodeShape; - completeNS->material().SetDiffuse(c,c,c,1); + completeNS->material().setDiffuse(c,c,c,1); ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); SteerableViewMap * svm = _Canvas->getSteerableViewMap(); svm->Reset(); @@ -1082,7 +1082,7 @@ void Controller::ComputeSteerableViewMap(){ double wc = oweights[i]*c; if(oweights[i] == 0) continue; - ns->material().SetDiffuse(wc, wc, wc, 1); + ns->material().setDiffuse(wc, wc, wc, 1); ns->AddRep(fRep); ng[i]->AddChild(ns); } @@ -1318,7 +1318,7 @@ void Controller::SwapStyleModules(unsigned i1, unsigned i2) void Controller::toggleLayer(unsigned index, bool iDisplay) { - _Canvas->SetVisible(index, iDisplay); + _Canvas->setVisible(index, iDisplay); _pView->updateGL(); } @@ -1371,8 +1371,8 @@ FEdge* Controller::SelectFEdge(real x, real y) FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); ViewEdge *selection = fedge->viewedge(); - _pView->SetSelectedFEdge(fedge); - _Canvas->SetSelectedFEdge(fedge); + _pView->setSelectedFEdge(fedge); + _Canvas->setSelectedFEdge(fedge); return fedge; } @@ -1383,8 +1383,8 @@ ViewEdge* Controller::SelectViewEdge(real x, real y) FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); ViewEdge *selection = fedge->viewedge(); - _pView->SetSelectedFEdge(fedge); - _Canvas->SetSelectedFEdge(fedge); + _pView->setSelectedFEdge(fedge); + _Canvas->setSelectedFEdge(fedge); return selection; } @@ -1393,8 +1393,8 @@ NodeGroup * Controller::BuildRep(vector::iterator vedges_begin, { ViewMapTesselator2D tesselator2D; Material mat; - mat.SetDiffuse(1,1,0.3,1); - tesselator2D.SetMaterial(mat); + mat.setDiffuse(1,1,0.3,1); + tesselator2D.setMaterial(mat); return (tesselator2D.Tesselate(vedges_begin, vedges_end)); } @@ -1491,8 +1491,8 @@ void Controller::displayDensityCurves(int x, int y){ // display the curves for(i=0; iSetOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + _pDensityCurvesWindow->setOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); for(i=1; i<=8; ++i) - _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); + _pDensityCurvesWindow->setLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); _pDensityCurvesWindow->show(); } diff --git a/source/blender/freestyle/intern/app/Main.cpp b/source/blender/freestyle/intern/app/Main.cpp index ae4d28017c5..4f2556ed740 100755 --- a/source/blender/freestyle/intern/app/Main.cpp +++ b/source/blender/freestyle/intern/app/Main.cpp @@ -44,8 +44,8 @@ int main(int argc, char** argv) //app->setMainWidget(mainWindow); // QT3 g_pController = new Controller; - g_pController->SetMainWindow(&mainWindow); - g_pController->SetView(mainWindow.pQGLWidget); + g_pController->setMainWindow(&mainWindow); + g_pController->setView(mainWindow.pQGLWidget); mainWindow.show(); diff --git a/source/blender/freestyle/intern/app/QGLBasicWidget.cpp b/source/blender/freestyle/intern/app/QGLBasicWidget.cpp index 44b5e0de224..0f690b67431 100755 --- a/source/blender/freestyle/intern/app/QGLBasicWidget.cpp +++ b/source/blender/freestyle/intern/app/QGLBasicWidget.cpp @@ -37,8 +37,8 @@ QGLBasicWidget::QGLBasicWidget( QWidget* parent, const char* name, int w, int h, // _Pbuffer->create(false); // #endif resizeGL(w,h); - _RootNode.SetLightingEnabled(false); - _RootNode.SetLineWidth(1.0); + _RootNode.setLightingEnabled(false); + _RootNode.setLineWidth(1.0); } QGLBasicWidget::QGLBasicWidget( const QGLFormat& format, QWidget* parent, const char* name, @@ -54,8 +54,8 @@ QGLBasicWidget::QGLBasicWidget( const QGLFormat& format, QWidget* parent, const // _Pbuffer->create(false); // #endif resizeGL(w,h); - _RootNode.SetLightingEnabled(false); - _RootNode.SetLineWidth(1.0); + _RootNode.setLightingEnabled(false); + _RootNode.setLineWidth(1.0); } QGLBasicWidget::~QGLBasicWidget() diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp index f82d136b525..312a276f13d 100755 --- a/source/blender/freestyle/intern/app_blender/AppCanvas.cpp +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.cpp @@ -69,7 +69,7 @@ AppCanvas::~AppCanvas() _pViewer = 0; } -void AppCanvas::SetViewer(AppGLWidget *iViewer) +void AppCanvas::setViewer(AppGLWidget *iViewer) { _pViewer = iViewer; } @@ -182,7 +182,7 @@ void AppCanvas::readColorPixels(int x,int y,int w, int h, RGBImage& oImage) cons // qtmp.save("densityQuery"+QString::number(number)+".png", "PNG"); // // GaussianFilter filter; - // filter.SetSigma(4.0); + // filter.setSigma(4.0); // int bound = filter.getBound(); // QImage qtmp2(width(), height(), 32); // for(int py2=0;py2Set3DContext(); + _pViewer->set3DContext(); _pViewer->DrawScene(_pViewer->glRenderer()); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); @@ -349,7 +349,7 @@ void AppCanvas::RenderBasic(const StrokeRenderer *iRenderer) glEnable(GL_LIGHTING); glEnable(GL_DEPTH_TEST); - _pViewer->Set3DContext(); + _pViewer->set3DContext(); _pViewer->DrawScene(_pViewer->glRenderer()); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); diff --git a/source/blender/freestyle/intern/app_blender/AppCanvas.h b/source/blender/freestyle/intern/app_blender/AppCanvas.h index 773bfc7f539..0eb1faa2549 100755 --- a/source/blender/freestyle/intern/app_blender/AppCanvas.h +++ b/source/blender/freestyle/intern/app_blender/AppCanvas.h @@ -48,7 +48,7 @@ public: inline const AppGLWidget * viewer() const {return _pViewer;} /*! modifiers */ - void SetViewer(AppGLWidget *iViewer) ; + void setViewer(AppGLWidget *iViewer) ; }; diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp index 16fb5eae57e..fba019f8372 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp @@ -63,22 +63,22 @@ AppGLWidget::AppGLWidget(const char *iName) _Fovy = 30.f; //_SceneDepth = 2.f; _RenderStyle = LINE; - //_ModelRootNode->SetBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); + //_ModelRootNode->setBBox(BBox(Vec3f(-10.f, -10.f, -10.f), Vec3f(10.f, 10.f, 10.f))); _ModelRootNode = new NodeDrawingStyle; _SilhouetteRootNode = new NodeDrawingStyle; _DebugRootNode = new NodeDrawingStyle; _RootNode.AddChild(_ModelRootNode); - _SilhouetteRootNode->SetStyle(DrawingStyle::LINES); - _SilhouetteRootNode->SetLightingEnabled(false); - _SilhouetteRootNode->SetLineWidth(2.f); - _SilhouetteRootNode->SetPointSize(3.f); + _SilhouetteRootNode->setStyle(DrawingStyle::LINES); + _SilhouetteRootNode->setLightingEnabled(false); + _SilhouetteRootNode->setLineWidth(2.f); + _SilhouetteRootNode->setPointSize(3.f); _RootNode.AddChild(_SilhouetteRootNode); - _DebugRootNode->SetStyle(DrawingStyle::LINES); - _DebugRootNode->SetLightingEnabled(false); - _DebugRootNode->SetLineWidth(1.f); + _DebugRootNode->setStyle(DrawingStyle::LINES); + _DebugRootNode->setLightingEnabled(false); + _DebugRootNode->setLineWidth(1.f); _RootNode.AddChild(_DebugRootNode); @@ -96,23 +96,23 @@ AppGLWidget::AppGLWidget(const char *iName) // 2D Scene // _pFENode = new NodeDrawingStyle; - // _pFENode->SetStyle(DrawingStyle::LINES); - // _pFENode->SetLightingEnabled(false); - // _pFENode->SetLineWidth(1.f); + // _pFENode->setStyle(DrawingStyle::LINES); + // _pFENode->setLightingEnabled(false); + // _pFENode->setLineWidth(1.f); // // _p2DNode.AddChild(_pFENode); // // _pVisibleSilhouetteNode = new NodeDrawingStyle; - // _pVisibleSilhouetteNode->SetStyle(DrawingStyle::LINES); - // _pVisibleSilhouetteNode->SetLightingEnabled(false); - // _pVisibleSilhouetteNode->SetLineWidth(3.f); + // _pVisibleSilhouetteNode->setStyle(DrawingStyle::LINES); + // _pVisibleSilhouetteNode->setLightingEnabled(false); + // _pVisibleSilhouetteNode->setLineWidth(3.f); // // _p2DNode.AddChild(_pVisibleSilhouetteNode); // _p2DSelectionNode = new NodeDrawingStyle; - _p2DSelectionNode->SetLightingEnabled(false); - _p2DSelectionNode->SetStyle(DrawingStyle::LINES); - _p2DSelectionNode->SetLineWidth(5.f); + _p2DSelectionNode->setLightingEnabled(false); + _p2DSelectionNode->setStyle(DrawingStyle::LINES); + _p2DSelectionNode->setLineWidth(5.f); _p2DNode.AddChild(_p2DSelectionNode); @@ -315,7 +315,7 @@ void AppGLWidget::draw() if (true == _Draw2DScene) { Draw2DScene(_pGLRenderer); - Set3DContext(); + set3DContext(); } if(_record){ saveSnapshot(true); @@ -328,7 +328,7 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) if(_drawEnvMap) { - _ModelRootNode->SetLightingEnabled(false); + _ModelRootNode->setLightingEnabled(false); glEnable(GL_COLOR_MATERIAL); glEnable(GL_TEXTURE_2D); @@ -369,15 +369,15 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) } // FIXME - // //_ModelRootNode->SetLightingEnabled(true); + // //_ModelRootNode->setLightingEnabled(true); // if(_ModelRootNode->style() == DrawingStyle::LINES){ // glPushAttrib(GL_ALL_ATTRIB_BITS); // //glDisable(GL_COLOR_MATERIAL); - // _ModelRootNode->SetStyle(DrawingStyle::FILLED); - // _ModelRootNode->SetLightingEnabled(true); + // _ModelRootNode->setStyle(DrawingStyle::FILLED); + // _ModelRootNode->setLightingEnabled(true); // _ModelRootNode->accept(*iRenderer); - // _ModelRootNode->SetStyle(DrawingStyle::LINES); - // _ModelRootNode->SetLightingEnabled(false); + // _ModelRootNode->setStyle(DrawingStyle::LINES); + // _ModelRootNode->setLightingEnabled(false); // _ModelRootNode->accept(*iRenderer); // glPopAttrib(); // } @@ -388,7 +388,7 @@ void AppGLWidget::DrawScene(SceneVisitor *iRenderer) glDisable(GL_TEXTURE_GEN_T); glDisable(GL_TEXTURE_2D); glDisable(GL_COLOR_MATERIAL); - _ModelRootNode->SetLightingEnabled(true); + _ModelRootNode->setLightingEnabled(true); if(_fedges == true) _SilhouetteRootNode->accept(*iRenderer); diff --git a/source/blender/freestyle/intern/app_blender/AppGLWidget.h b/source/blender/freestyle/intern/app_blender/AppGLWidget.h index 447eece30c9..97e7cbcebbe 100755 --- a/source/blender/freestyle/intern/app_blender/AppGLWidget.h +++ b/source/blender/freestyle/intern/app_blender/AppGLWidget.h @@ -110,7 +110,7 @@ public: LINES : line rendering DEPTHBUFFER : grey-levels rendering of the depth buffer */ - inline void SetRenderStyle(RenderStyle iStyle) + inline void setRenderStyle(RenderStyle iStyle) { _RenderStyle = iStyle; } @@ -119,7 +119,7 @@ public: * iModel * The Root Node of the model */ - inline void SetModel(NodeGroup *iModel) + inline void setModel(NodeGroup *iModel) { if(0 != _ModelRootNode->numberOfChildren()) { @@ -173,7 +173,7 @@ public: updateGL(); } - inline void SetDebug(NodeGroup* iDebug) + inline void setDebug(NodeGroup* iDebug) { if(0 != _DebugRootNode->numberOfChildren()) { @@ -240,9 +240,9 @@ public: updateGL(); } - void SetMainWindow(QMainWindow *iMainWindow) ; + void setMainWindow(QMainWindow *iMainWindow) ; - inline void Set3DContext() + inline void set3DContext() { // GL_PROJECTION matrix _camera->loadProjectionMatrix(); @@ -323,7 +323,7 @@ public: // when a model is added to the scene. void ReInitRenderers(); - inline void SetSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->SetSelectedFEdge(iFEdge); } + inline void setSelectedFEdge(FEdge* iFEdge) { _pDebugRenderer->setSelectedFEdge(iFEdge); } inline GLDebugRenderer* debugRenderer() { return _pDebugRenderer; } inline void toggle3D() { _Draw3DScene == true ? _Draw3DScene = false : _Draw3DScene = true; updateGL();} diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index 9a820b835ca..e2cc25c4b10 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -159,13 +159,13 @@ Controller::~Controller() //delete _current_dirs; } -void Controller::SetView(AppGLWidget *iView) +void Controller::setView(AppGLWidget *iView) { if(NULL == iView) return; _pView = iView; - _Canvas->SetViewer(_pView); + _Canvas->setViewer(_pView); } @@ -208,7 +208,7 @@ int Controller::Load3DSFile(const char *iFileName) _RootNode->AddChild(maxScene); _RootNode->UpdateBBox(); // FIXME: Correct that by making a Renderer to compute the bbox - _pView->SetModel(_RootNode); + _pView->setModel(_RootNode); //_pView->FitBBox(); @@ -245,7 +245,7 @@ int Controller::Load3DSFile(const char *iFileName) // DEBUG // _Grid.displayDebug(); - _pView->SetDebug(_DebugNode); + _pView->setDebug(_DebugNode); //delete stuff // if(0 != ws_builder) @@ -273,7 +273,7 @@ int Controller::Load3DSFile(const char *iFileName) void Controller::CloseFile() { - WShape::SetCurrentId(0); + WShape::setCurrentId(0); _pView->DetachModel(); _ListOfModels.clear(); if(NULL != _RootNode) @@ -460,7 +460,7 @@ void Controller::SaveViewMapFile(const char *oFileName) // } // } // -// // Set the camera position +// // set the camera position // float position[3]; // float orientation[4]; // ifs.read((char*)position, 3 * sizeof(*position)); @@ -514,8 +514,8 @@ void Controller::SaveViewMapFile(const char *oFileName) // // Update display // ViewMapTesselator3D sTesselator3d; // //ViewMapTesselator2D sTesselator2d; -// //sTesselator2d.SetNature(_edgeTesselationNature); -// sTesselator3d.SetNature(_edgeTesselationNature); +// //sTesselator2d.setNature(_edgeTesselationNature); +// sTesselator3d.setNature(_edgeTesselationNature); // // // Tesselate the 3D edges: // _SilhouetteNode = sTesselator3d.Tesselate(_ViewMap); @@ -596,7 +596,7 @@ void Controller::ComputeViewMap() // Restore the context of view: // we need to perform all these operations while the // 3D context is on. - _pView->Set3DContext(); + _pView->set3DContext(); float src[3] = { 0, 0, 0 }; float vp_tmp[3] = { 0, 0, 0 }; _pView->_camera->getWorldCoordinatesOf(src, vp_tmp); @@ -616,7 +616,7 @@ void Controller::ComputeViewMap() _Chrono.start(); - edgeDetector.SetViewpoint(Vec3r(vp)); + edgeDetector.setViewpoint(Vec3r(vp)); edgeDetector.enableRidgesAndValleysFlag(_ComputeRidges); edgeDetector.enableSuggestiveContours(_ComputeSuggestive); edgeDetector.setSphereRadius(_sphereRadius); @@ -629,20 +629,20 @@ void Controller::ComputeViewMap() // Builds the view map structure from the flagged WSEdge structure: //---------------------------------------------------------- ViewMapBuilder vmBuilder; - vmBuilder.SetEnableQI(_EnableQI); - vmBuilder.SetViewpoint(Vec3r(vp)); + vmBuilder.setEnableQI(_EnableQI); + vmBuilder.setViewpoint(Vec3r(vp)); - vmBuilder.SetTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); - vmBuilder.SetFrustum(_pView->znear(), _pView->zfar()); + vmBuilder.setTransform(mv, proj, viewport, focalLength, _pView->GetAspect(), _pView->GetFovyRadian()); + vmBuilder.setFrustum(_pView->znear(), _pView->zfar()); - vmBuilder.SetGrid(&_Grid); + vmBuilder.setGrid(&_Grid); // Builds a tesselated form of the silhouette for display purpose: //--------------------------------------------------------------- ViewMapTesselator3D sTesselator3d; //ViewMapTesselator2D sTesselator2d; - //sTesselator2d.SetNature(_edgeTesselationNature); - sTesselator3d.SetNature(_edgeTesselationNature); + //sTesselator2d.setNature(_edgeTesselationNature); + sTesselator3d.setNature(_edgeTesselationNature); _Chrono.start(); // Build View Map @@ -689,7 +689,7 @@ void Controller::ComputeSteerableViewMap(){ // ng[i] = new NodeGroup; // } // NodeShape *completeNS = new NodeShape; - // completeNS->material().SetDiffuse(c,c,c,1); + // completeNS->material().setDiffuse(c,c,c,1); // ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS); // SteerableViewMap * svm = _Canvas->getSteerableViewMap(); // svm->Reset(); @@ -710,7 +710,7 @@ void Controller::ComputeSteerableViewMap(){ // double wc = oweights[i]*c; // if(oweights[i] == 0) // continue; - // ns->material().SetDiffuse(wc, wc, wc, 1); + // ns->material().setDiffuse(wc, wc, wc, 1); // ns->AddRep(fRep); // ng[i]->AddChild(ns); // } @@ -895,7 +895,7 @@ void Controller::SwapStyleModules(unsigned i1, unsigned i2) void Controller::toggleLayer(unsigned index, bool iDisplay) { - _Canvas->SetVisible(index, iDisplay); + _Canvas->setVisible(index, iDisplay); _pView->updateGL(); } @@ -932,8 +932,8 @@ FEdge* Controller::SelectFEdge(real x, real y) FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); //ViewEdge *selection = fedge->viewedge(); - _pView->SetSelectedFEdge(fedge); - _Canvas->SetSelectedFEdge(fedge); + _pView->setSelectedFEdge(fedge); + _Canvas->setSelectedFEdge(fedge); return fedge; } @@ -944,8 +944,8 @@ ViewEdge* Controller::SelectViewEdge(real x, real y) FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); ViewEdge *selection = fedge->viewedge(); - _pView->SetSelectedFEdge(fedge); - _Canvas->SetSelectedFEdge(fedge); + _pView->setSelectedFEdge(fedge); + _Canvas->setSelectedFEdge(fedge); return selection; } @@ -954,8 +954,8 @@ NodeGroup * Controller::BuildRep(vector::iterator vedges_begin, { ViewMapTesselator2D tesselator2D; Material mat; - mat.SetDiffuse(1,1,0.3,1); - tesselator2D.SetMaterial(mat); + mat.setDiffuse(1,1,0.3,1); + tesselator2D.setMaterial(mat); return (tesselator2D.Tesselate(vedges_begin, vedges_end)); } @@ -1049,9 +1049,9 @@ void Controller::displayDensityCurves(int x, int y){ // display the curves // for(i=0; iSetOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); + // _pDensityCurvesWindow->setOrientationCurve(i, Vec2d(0,0), Vec2d(nbPoints, 1), curves[i], "scale", "density"); // for(i=1; i<=8; ++i) - // _pDensityCurvesWindow->SetLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); + // _pDensityCurvesWindow->setLevelCurve(i, Vec2d(0,0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density"); // _pDensityCurvesWindow->show(); } diff --git a/source/blender/freestyle/intern/app_blender/Controller.h b/source/blender/freestyle/intern/app_blender/Controller.h index 77f28071791..032e21a1ce5 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.h +++ b/source/blender/freestyle/intern/app_blender/Controller.h @@ -57,7 +57,7 @@ public: Controller() ; ~Controller() ; - void SetView(AppGLWidget *iView); + void setView(AppGLWidget *iView); //soc void init_options(); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 2468839bdc7..27b8d578e2f 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -42,7 +42,7 @@ extern "C" { if( view == NULL ) view = new AppGLWidget; - controller->SetView(view); + controller->setView(view); } diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.h b/source/blender/freestyle/intern/geometry/GeomCleaner.h index d78d90ccb4a..5fdfda0162a 100755 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.h +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.h @@ -189,8 +189,8 @@ public: inline real z() {return _Vector[2];} /*! modifiers */ - inline void SetVector(const Vec3r& iVector) {_Vector = iVector;} - inline void SetIndex(unsigned iIndex) {_index = iIndex;} + inline void setVector(const Vec3r& iVector) {_Vector = iVector;} + inline void setIndex(unsigned iIndex) {_index = iIndex;} /*! operators */ IndexedVertex& operator=(const IndexedVertex& iv) diff --git a/source/blender/freestyle/intern/image/GaussianFilter.cpp b/source/blender/freestyle/intern/image/GaussianFilter.cpp index 97c2aedc62e..3a79f5f9949 100755 --- a/source/blender/freestyle/intern/image/GaussianFilter.cpp +++ b/source/blender/freestyle/intern/image/GaussianFilter.cpp @@ -69,7 +69,7 @@ int GaussianFilter::computeMaskSize(float sigma) return maskSize; } -void GaussianFilter::SetSigma(float sigma) +void GaussianFilter::setSigma(float sigma) { _sigma = sigma; computeMask(); diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index c9ad04d4b80..f31b500140f 100755 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -82,7 +82,7 @@ public: inline int getBound() {return _bound;} /*! modifiers */ - void SetSigma(float sigma) ; + void setSigma(float sigma) ; // void SetMaskSize(int size) {_maskSize = size;_storedMaskSize=(_maskSize+1)>>1;} diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BinaryPredicate0D.h index 6ad25ab2816..dd192877675 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate0D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject BinaryPredicate0D_Type; -#define BPy_BinaryPredicate0D_Check(v) \ - ((v)->ob_type == &BinaryPredicate0D_Type) +#define BPy_BinaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate0D_Type) /*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D.h index 2745ca6fc3f..035e2b6cb17 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject BinaryPredicate1D_Type; -#define BPy_BinaryPredicate1D_Check(v) \ - ((v)->ob_type == &BinaryPredicate1D_Type) +#define BPy_BinaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate1D_Type) /*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index 5f98f0f2a89..a5aada0c470 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -8,6 +8,7 @@ #include "Interface0D/CurvePoint.h" #include "Interface1D.h" #include "Nature.h" +#include "StrokeAttribute.h" #include "UnaryFunction0D.h" #include "UnaryFunction1D.h" #include "UnaryPredicate0D.h" @@ -134,6 +135,7 @@ PyObject *Freestyle_Init( void ) Interface0D_Init( module ); Interface1D_Init( module ); Nature_Init( module ); + StrokeAttribute_Init( module ); UnaryFunction0D_Init( module ); UnaryFunction1D_Init( module ); UnaryPredicate0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/Freestyle.h b/source/blender/freestyle/intern/python/Freestyle.h index 7e7ed56f5f2..9cdef4df2d2 100644 --- a/source/blender/freestyle/intern/python/Freestyle.h +++ b/source/blender/freestyle/intern/python/Freestyle.h @@ -11,8 +11,7 @@ extern "C" { extern PyTypeObject Freestyle_Type; -#define BPy_Freestyle_Check(v) \ - ((v)->ob_type == &Freestyle_Type) +#define BPy_Freestyle_Check(v) (( (PyObject *) v)->ob_type == &Freestyle_Type) /*---------------------------Python BPy_Freestyle structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Id.h b/source/blender/freestyle/intern/python/Id.h index 608ff3eef99..d5e90a0a3e5 100644 --- a/source/blender/freestyle/intern/python/Id.h +++ b/source/blender/freestyle/intern/python/Id.h @@ -16,8 +16,7 @@ extern "C" { extern PyTypeObject Id_Type; -#define BPy_Id_Check(v) \ - ((v)->ob_type == &Id_Type) +#define BPy_Id_Check(v) (( (PyObject *) v)->ob_type == &Id_Type) /*---------------------------Python BPy_Id structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/IntegrationType.h b/source/blender/freestyle/intern/python/IntegrationType.h index 2ac81fdddfb..ab212ac6560 100644 --- a/source/blender/freestyle/intern/python/IntegrationType.h +++ b/source/blender/freestyle/intern/python/IntegrationType.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject IntegrationType_Type; -#define BPy_IntegrationType_Check(v) \ - ((v)->ob_type == &IntegrationType_Type) +#define BPy_IntegrationType_Check(v) (( (PyObject *) v)->ob_type == &IntegrationType_Type) /*---------------------------Python BPy_IntegrationType structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D.h b/source/blender/freestyle/intern/python/Interface0D.h index 10df1463da8..aaecc6dad94 100644 --- a/source/blender/freestyle/intern/python/Interface0D.h +++ b/source/blender/freestyle/intern/python/Interface0D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject Interface0D_Type; -#define BPy_Interface0D_Check(v) \ - ((v)->ob_type == &Interface0D_Type) +#define BPy_Interface0D_Check(v) (( (PyObject *) v)->ob_type == &Interface0D_Type) /*---------------------------Python BPy_Interface0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp index f76fc9c9931..e1cf63727e5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp @@ -14,9 +14,9 @@ static PyObject * CurvePoint___copy__( BPy_CurvePoint *self ); static PyObject * CurvePoint_A( BPy_CurvePoint *self ); static PyObject * CurvePoint_B( BPy_CurvePoint *self ); static PyObject * CurvePoint_t2d( BPy_CurvePoint *self ); -static PyObject *CurvePoint_SetA( BPy_CurvePoint *self , PyObject *args); -static PyObject *CurvePoint_SetB( BPy_CurvePoint *self , PyObject *args); -static PyObject *CurvePoint_SetT2d( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_setA( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_setB( BPy_CurvePoint *self , PyObject *args); +static PyObject *CurvePoint_setT2d( BPy_CurvePoint *self , PyObject *args); static PyObject *CurvePoint_curvatureFredo( BPy_CurvePoint *self , PyObject *args); /*----------------------CurvePoint instance definitions ----------------------------*/ @@ -25,9 +25,9 @@ static PyMethodDef BPy_CurvePoint_methods[] = { {"A", ( PyCFunction ) CurvePoint_A, METH_NOARGS, "( )Returns the first SVertex upon which the CurvePoint is built."}, {"B", ( PyCFunction ) CurvePoint_B, METH_NOARGS, "( )Returns the second SVertex upon which the CurvePoint is built."}, {"t2d", ( PyCFunction ) CurvePoint_t2d, METH_NOARGS, "( )Returns the interpolation parameter."}, - {"SetA", ( PyCFunction ) CurvePoint_SetA, METH_VARARGS, "(SVertex sv )Sets the first SVertex upon which to build the CurvePoint."}, - {"SetB", ( PyCFunction ) CurvePoint_SetB, METH_VARARGS, "(SVertex sv )Sets the second SVertex upon which to build the CurvePoint."}, - {"SetT2d", ( PyCFunction ) CurvePoint_SetT2d, METH_VARARGS, "( )Sets the 2D interpolation parameter to use."}, + {"setA", ( PyCFunction ) CurvePoint_setA, METH_VARARGS, "(SVertex sv )Sets the first SVertex upon which to build the CurvePoint."}, + {"setB", ( PyCFunction ) CurvePoint_setB, METH_VARARGS, "(SVertex sv )Sets the second SVertex upon which to build the CurvePoint."}, + {"setT2d", ( PyCFunction ) CurvePoint_setT2d, METH_VARARGS, "( )Sets the 2D interpolation parameter to use."}, {"curvatureFredo", ( PyCFunction ) CurvePoint_curvatureFredo, METH_NOARGS, "( )angle in radians."}, {NULL, NULL, 0, NULL} }; @@ -182,41 +182,41 @@ PyObject * CurvePoint_t2d( BPy_CurvePoint *self ) { return PyFloat_FromDouble( self->cp->t2d() ); } -PyObject *CurvePoint_SetA( BPy_CurvePoint *self , PyObject *args) { +PyObject *CurvePoint_setA( BPy_CurvePoint *self , PyObject *args) { PyObject *py_sv; if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { - cout << "ERROR: CurvePoint_SetA" << endl; + cout << "ERROR: CurvePoint_setA" << endl; Py_RETURN_NONE; } - self->cp->SetA( ((BPy_SVertex *) py_sv)->sv ); + self->cp->setA( ((BPy_SVertex *) py_sv)->sv ); Py_RETURN_NONE; } -PyObject *CurvePoint_SetB( BPy_CurvePoint *self , PyObject *args) { +PyObject *CurvePoint_setB( BPy_CurvePoint *self , PyObject *args) { PyObject *py_sv; if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { - cout << "ERROR: CurvePoint_SetB" << endl; + cout << "ERROR: CurvePoint_setB" << endl; Py_RETURN_NONE; } - self->cp->SetB( ((BPy_SVertex *) py_sv)->sv ); + self->cp->setB( ((BPy_SVertex *) py_sv)->sv ); Py_RETURN_NONE; } -PyObject *CurvePoint_SetT2d( BPy_CurvePoint *self , PyObject *args) { +PyObject *CurvePoint_setT2d( BPy_CurvePoint *self , PyObject *args) { float t; if( !PyArg_ParseTuple(args, "f", &t) ) { - cout << "ERROR: CurvePoint_SetT2d" << endl; + cout << "ERROR: CurvePoint_setT2d" << endl; Py_RETURN_NONE; } - self->cp->SetT2d( t ); + self->cp->setT2d( t ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h index ac30f74c4dd..e40f261504f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h @@ -14,8 +14,7 @@ extern "C" { extern PyTypeObject CurvePoint_Type; -#define BPy_CurvePoint_Check(v) \ - ((v)->ob_type == &CurvePoint_Type) +#define BPy_CurvePoint_Check(v) (( (PyObject *) v)->ob_type == &CurvePoint_Type) /*---------------------------Python BPy_CurvePoint structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp index 7f2e364d0b4..69069a68f33 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp @@ -1,104 +1,254 @@ - PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *self , PyObject *args) { +#include "StrokeVertex.h" + +#include "../../Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for StrokeVertex instance -----------*/ +static int StrokeVertex___init__(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds); + + +/*----------------------StrokeVertex instance definitions ----------------------------*/ +static PyMethodDef BPy_StrokeVertex_methods[] = { +// {"__copy__", ( PyCFunction ) StrokeVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_StrokeVertex type definition ------------------------------*/ + +PyTypeObject StrokeVertex_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "StrokeVertex", /* tp_name */ + sizeof( BPy_StrokeVertex ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_StrokeVertex_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)StrokeVertex___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int StrokeVertex___init__(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0; + + if (! PyArg_ParseTuple(args, "|OOO", &obj1, &obj2, &obj3) ) + return -1; + + if( !obj1 && !obj2 && !obj3 ){ + self->cp = new CurvePoint(); + } else if( PyFloat_Check(obj3) ) { + if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + self->cp = new CurvePoint( ((BPy_SVertex *) obj1)->sv, + ((BPy_SVertex *) obj2)->sv, + PyFloat_AsDouble( obj3 ) ); + } else if( BPy_CurvePoint_Check(obj1) && BPy_CurvePoint_Check(obj2) ) { + self->cp = new CurvePoint( ((BPy_CurvePoint *) obj1)->cp, + ((BPy_CurvePoint *) obj2)->cp, + PyFloat_AsDouble( obj3 ) ); + } else { + return -1; + } + } else { + return -1; + } + + self->py_if0D.if0D = self->cp; + + return 0; } - PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *self , PyObject *args) { + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } +#endif - PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_StrokeVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_x(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_y(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_getPoint(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_strokeLength(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_u(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *self , PyObject *args) { -} - +// PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { +// } +// +// +// PyObject *_wrap_delete_StrokeVertex(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_x(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_y(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_getPoint(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_strokeLength(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_u(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetX(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetY(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { +// } +// +// +// PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *self , PyObject *args) { +// } +// diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h new file mode 100644 index 00000000000..dccecb093f5 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_STROKEVERTEX_H +#define FREESTYLE_PYTHON_STROKEVERTEX_H + +#include "../CurvePoint.h" +#include "../../stroke/Stroke.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject StrokeVertex_Type; + +#define BPy_StrokeVertex_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertex_Type) + +/*---------------------------Python BPy_StrokeVertex structure definition----------*/ +typedef struct { + BPy_CurvePoint py_cp; + StrokeVertex *sv; +} BPy_StrokeVertex; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_STROKEVERTEX_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp index eb91d7daf10..d0c622d1df2 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp @@ -14,10 +14,10 @@ static int SVertex___init__(BPy_SVertex *self, PyObject *args, PyObject *kwds); static PyObject * SVertex___copy__( BPy_SVertex *self ); static PyObject * SVertex_normals( BPy_SVertex *self ); static PyObject * SVertex_normalsSize( BPy_SVertex *self ); -static PyObject * SVertex_SetPoint3D( BPy_SVertex *self , PyObject *args); -static PyObject * SVertex_SetPoint2D( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_setPoint3D( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_setPoint2D( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_AddNormal( BPy_SVertex *self , PyObject *args); -static PyObject * SVertex_SetId( BPy_SVertex *self , PyObject *args); +static PyObject * SVertex_setId( BPy_SVertex *self , PyObject *args); static PyObject *SVertex_AddFEdge( BPy_SVertex *self , PyObject *args); /*----------------------SVertex instance definitions ----------------------------*/ @@ -25,10 +25,10 @@ static PyMethodDef BPy_SVertex_methods[] = { {"__copy__", ( PyCFunction ) SVertex___copy__, METH_NOARGS, "( )Cloning method."}, {"normals", ( PyCFunction ) SVertex_normals, METH_NOARGS, "Returns the normals for this Vertex as a list. In a smooth surface, a vertex has exactly one normal. In a sharp surface, a vertex can have any number of normals."}, {"normalsSize", ( PyCFunction ) SVertex_normalsSize, METH_NOARGS, "Returns the number of different normals for this vertex." }, - {"SetPoint3D", ( PyCFunction ) SVertex_SetPoint3D, METH_VARARGS, "Sets the 3D coordinates of the SVertex." }, - {"SetPoint2D", ( PyCFunction ) SVertex_SetPoint2D, METH_VARARGS, "Sets the 3D projected coordinates of the SVertex." }, + {"setPoint3D", ( PyCFunction ) SVertex_setPoint3D, METH_VARARGS, "Sets the 3D coordinates of the SVertex." }, + {"setPoint2D", ( PyCFunction ) SVertex_setPoint2D, METH_VARARGS, "Sets the 3D projected coordinates of the SVertex." }, {"AddNormal", ( PyCFunction ) SVertex_AddNormal, METH_VARARGS, "Adds a normal to the Svertex's set of normals. If the same normal is already in the set, nothing changes." }, - {"SetId", ( PyCFunction ) SVertex_SetId, METH_VARARGS, "Sets the Id." }, + {"setId", ( PyCFunction ) SVertex_setId, METH_VARARGS, "Sets the Id." }, {"AddFEdge", ( PyCFunction ) SVertex_AddFEdge, METH_VARARGS, "Add an FEdge to the list of edges emanating from this SVertex." }, {NULL, NULL, 0, NULL} }; @@ -177,36 +177,36 @@ PyObject * SVertex_normalsSize( BPy_SVertex *self ) { return PyInt_FromLong( self->sv->normalsSize() ); } -PyObject *SVertex_SetPoint3D( BPy_SVertex *self , PyObject *args) { +PyObject *SVertex_setPoint3D( BPy_SVertex *self , PyObject *args) { PyObject *py_point; if(!( PyArg_ParseTuple(args, "O", &py_point) && PyList_Check(py_point) && PyList_Size(py_point) == 3 )) { - cout << "ERROR: SVertex_SetPoint3D" << endl; + cout << "ERROR: SVertex_setPoint3D" << endl; Py_RETURN_NONE; } Vec3r v( PyFloat_AsDouble( PyList_GetItem(py_point, 0) ), PyFloat_AsDouble( PyList_GetItem(py_point, 1) ), PyFloat_AsDouble( PyList_GetItem(py_point, 2) ) ); - self->sv->SetPoint3D( v ); + self->sv->setPoint3D( v ); Py_RETURN_NONE; } -PyObject *SVertex_SetPoint2D( BPy_SVertex *self , PyObject *args) { +PyObject *SVertex_setPoint2D( BPy_SVertex *self , PyObject *args) { PyObject *py_point; if(!( PyArg_ParseTuple(args, "O", &py_point) && PyList_Check(py_point) && PyList_Size(py_point) == 3 )) { - cout << "ERROR: SVertex_SetPoint2D" << endl; + cout << "ERROR: SVertex_setPoint2D" << endl; Py_RETURN_NONE; } Vec3r v( PyFloat_AsDouble( PyList_GetItem(py_point, 0) ), PyFloat_AsDouble( PyList_GetItem(py_point, 1) ), PyFloat_AsDouble( PyList_GetItem(py_point, 2) ) ); - self->sv->SetPoint2D( v ); + self->sv->setPoint2D( v ); Py_RETURN_NONE; } @@ -228,15 +228,15 @@ PyObject *SVertex_AddNormal( BPy_SVertex *self , PyObject *args) { Py_RETURN_NONE; } -PyObject *SVertex_SetId( BPy_SVertex *self , PyObject *args) { +PyObject *SVertex_setId( BPy_SVertex *self , PyObject *args) { BPy_Id *py_id; if( !PyArg_ParseTuple(args, "O", &py_id) ) { - cout << "ERROR: SVertex_SetId" << endl; + cout << "ERROR: SVertex_setId" << endl; Py_RETURN_NONE; } - self->sv->SetId( *(py_id->id) ); + self->sv->setId( *(py_id->id) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.h b/source/blender/freestyle/intern/python/Interface0D/SVertex.h index ac89133ab55..099417b5139 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/SVertex.h @@ -15,8 +15,7 @@ extern "C" { extern PyTypeObject SVertex_Type; -#define BPy_SVertex_Check(v) \ - ((v)->ob_type == &SVertex_Type) +#define BPy_SVertex_Check(v) (( (PyObject *) v)->ob_type == &SVertex_Type) /*---------------------------Python BPy_SVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h index 98eeb504a3d..98bcb9bac90 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h @@ -15,8 +15,7 @@ extern "C" { extern PyTypeObject ViewVertex_Type; -#define BPy_ViewVertex_Check(v) \ - ((v)->ob_type == &ViewVertex_Type) +#define BPy_ViewVertex_Check(v) (( (PyObject *) v)->ob_type == &ViewVertex_Type) /*---------------------------Python BPy_ViewVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D.h b/source/blender/freestyle/intern/python/Interface1D.h index f39203744e4..c49a8c130b0 100644 --- a/source/blender/freestyle/intern/python/Interface1D.h +++ b/source/blender/freestyle/intern/python/Interface1D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject Interface1D_Type; -#define BPy_Interface1D_Check(v) \ - ((v)->ob_type == &Interface1D_Type) +#define BPy_Interface1D_Check(v) (( (PyObject *) v)->ob_type == &Interface1D_Type) /*---------------------------Python BPy_Interface1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp index 6a00ad66123..0cdfb9f1e0d 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp @@ -20,13 +20,13 @@ static PyObject * FEdge_previousEdge( BPy_FEdge *self ); static PyObject * FEdge_getVertices( BPy_FEdge *self ); static PyObject * FEdge_getPoints( BPy_FEdge *self ); static PyObject * FEdge_isSmooth( BPy_FEdge *self ); -static PyObject * FEdge_SetVertexA( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetVertexB( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetId( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetSmooth( BPy_FEdge *self , PyObject *args); -static PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ); +static PyObject * FEdge_setVertexA( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setVertexB( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setId( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setNextEdge( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setPreviousEdge( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setSmooth( BPy_FEdge *self , PyObject *args); +static PyObject * FEdge_setNature( BPy_FEdge *self, PyObject *args ); /*----------------------FEdge instance definitions ----------------------------*/ static PyMethodDef BPy_FEdge_methods[] = { @@ -39,13 +39,13 @@ static PyMethodDef BPy_FEdge_methods[] = { {"getVertices", ( PyCFunction ) FEdge_getVertices, METH_NOARGS, "Returns the vertices"}, {"getPoints", ( PyCFunction ) FEdge_getPoints, METH_NOARGS, "Returns the points. The difference with getVertices() is that here we can iterate over points of the 1D element at any given sampling. At each call, a virtual point is created."}, {"isSmooth", ( PyCFunction ) FEdge_isSmooth, METH_NOARGS, "() Returns true if this FEdge is a smooth FEdge."}, - {"SetVertexA", ( PyCFunction ) FEdge_SetVertexA, METH_VARARGS, "(SVertex v) Sets the first SVertex. ."}, - {"SetVertexB", ( PyCFunction ) FEdge_SetVertexB, METH_VARARGS, "(SVertex v) Sets the second SVertex. "}, - {"SetId", ( PyCFunction ) FEdge_SetId, METH_VARARGS, "(Id id) Sets the FEdge Id ."}, - {"SetNextEdge", ( PyCFunction ) FEdge_SetNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "}, - {"SetPreviousEdge", ( PyCFunction ) FEdge_SetPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "}, - {"SetSmooth", ( PyCFunction ) FEdge_SetSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "}, - {"SetNature", ( PyCFunction ) FEdge_SetNature, METH_VARARGS, "(Nature n) Sets the nature of this FEdge. "}, + {"setVertexA", ( PyCFunction ) FEdge_setVertexA, METH_VARARGS, "(SVertex v) Sets the first SVertex. ."}, + {"setVertexB", ( PyCFunction ) FEdge_setVertexB, METH_VARARGS, "(SVertex v) Sets the second SVertex. "}, + {"setId", ( PyCFunction ) FEdge_setId, METH_VARARGS, "(Id id) Sets the FEdge Id ."}, + {"setNextEdge", ( PyCFunction ) FEdge_setNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "}, + {"setPreviousEdge", ( PyCFunction ) FEdge_setPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "}, + {"setSmooth", ( PyCFunction ) FEdge_setSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "}, + {"setNature", ( PyCFunction ) FEdge_setNature, METH_VARARGS, "(Nature n) Sets the nature of this FEdge. "}, {NULL, NULL, 0, NULL} }; @@ -221,86 +221,86 @@ PyObject * FEdge_isSmooth( BPy_FEdge *self ) { return PyBool_from_bool( self->fe->isSmooth() ); } -PyObject *FEdge_SetVertexA( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setVertexA( BPy_FEdge *self , PyObject *args) { PyObject *py_sv; if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { - cout << "ERROR: FEdge_SetVertexA" << endl; + cout << "ERROR: FEdge_setVertexA" << endl; Py_RETURN_NONE; } - self->fe->SetVertexA( ((BPy_SVertex *) py_sv)->sv ); + self->fe->setVertexA( ((BPy_SVertex *) py_sv)->sv ); Py_RETURN_NONE; } -PyObject *FEdge_SetVertexB( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setVertexB( BPy_FEdge *self , PyObject *args) { PyObject *py_sv; if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { - cout << "ERROR: FEdge_SetVertexB" << endl; + cout << "ERROR: FEdge_setVertexB" << endl; Py_RETURN_NONE; } - self->fe->SetVertexB( ((BPy_SVertex *) py_sv)->sv ); + self->fe->setVertexB( ((BPy_SVertex *) py_sv)->sv ); Py_RETURN_NONE; } -PyObject *FEdge_SetId( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setId( BPy_FEdge *self , PyObject *args) { PyObject *py_id; if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { - cout << "ERROR: FEdge_SetId" << endl; + cout << "ERROR: FEdge_setId" << endl; Py_RETURN_NONE; } - self->fe->SetId(*( ((BPy_Id *) py_id)->id )); + self->fe->setId(*( ((BPy_Id *) py_id)->id )); Py_RETURN_NONE; } -PyObject *FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setNextEdge( BPy_FEdge *self , PyObject *args) { PyObject *py_fe; if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { - cout << "ERROR: FEdge_SetNextEdge" << endl; + cout << "ERROR: FEdge_setNextEdge" << endl; Py_RETURN_NONE; } - self->fe->SetNextEdge( ((BPy_FEdge *) py_fe)->fe ); + self->fe->setNextEdge( ((BPy_FEdge *) py_fe)->fe ); Py_RETURN_NONE; } -PyObject *FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setPreviousEdge( BPy_FEdge *self , PyObject *args) { PyObject *py_fe; if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { - cout << "ERROR: FEdge_SetPreviousEdge" << endl; + cout << "ERROR: FEdge_setPreviousEdge" << endl; Py_RETURN_NONE; } - self->fe->SetPreviousEdge( ((BPy_FEdge *) py_fe)->fe ); + self->fe->setPreviousEdge( ((BPy_FEdge *) py_fe)->fe ); Py_RETURN_NONE; } -PyObject *FEdge_SetSmooth( BPy_FEdge *self , PyObject *args) { +PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { int b; if(!( PyArg_ParseTuple(args, "i", &b) )) { - cout << "ERROR: FEdge_SetSmooth" << endl; + cout << "ERROR: FEdge_setSmooth" << endl; Py_RETURN_NONE; } - self->fe->SetSmooth( (bool) b ); + self->fe->setSmooth( (bool) b ); Py_RETURN_NONE; } -PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ) { +PyObject * FEdge_setNature( BPy_FEdge *self, PyObject *args ) { PyObject *py_n; if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { @@ -309,7 +309,7 @@ PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ) { } PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); - ((FEdge *) self->py_if1D.if1D)->SetNature( PyInt_AsLong(i) ); + ((FEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.h b/source/blender/freestyle/intern/python/Interface1D/FEdge.h index 39c9c56e391..230a5f36954 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.h @@ -14,8 +14,7 @@ extern "C" { extern PyTypeObject FEdge_Type; -#define BPy_FEdge_Check(v) \ - ((v)->ob_type == &FEdge_Type) +#define BPy_FEdge_Check(v) (( (PyObject *) v)->ob_type == &FEdge_Type) /*---------------------------Python BPy_FEdge structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Nature.h b/source/blender/freestyle/intern/python/Nature.h index d0bc4de6fc0..7473869158f 100644 --- a/source/blender/freestyle/intern/python/Nature.h +++ b/source/blender/freestyle/intern/python/Nature.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject Nature_Type; -#define BPy_Nature_Check(v) \ - ((v)->ob_type == &Nature_Type) +#define BPy_Nature_Check(v) (( (PyObject *) v)->ob_type == &Nature_Type) /*---------------------------Python BPy_Nature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/StrokeAttribute.cpp index c54eca16e11..5f7814ff4dd 100644 --- a/source/blender/freestyle/intern/python/StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/StrokeAttribute.cpp @@ -1,112 +1,484 @@ - PyObject *_wrap_StrokeAttribute_getColor(PyObject *self , PyObject *args) { +#include "StrokeAttribute.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for StrokeAttribute instance -----------*/ +static int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds); +static void StrokeAttribute___dealloc__(BPy_StrokeAttribute *self); +static PyObject * StrokeAttribute___repr__(BPy_StrokeAttribute *self); + +static PyObject * StrokeAttribute_getColorR( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getColorG( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getColorB( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getColorRGB( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getAlpha( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getThicknessR( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getThicknessL( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getThicknessRL( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_isVisible( BPy_StrokeAttribute *self ); +static PyObject * StrokeAttribute_getAttributeReal( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_getAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_getAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_isAttributeAvailableReal( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_isAttributeAvailableVec2f( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_isAttributeAvailableVec3f( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ); +static int StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ); + + +/*----------------------StrokeAttribute instance definitions ----------------------------*/ +static PyMethodDef BPy_StrokeAttribute_methods[] = { + {"getColorR", ( PyCFunction ) StrokeAttribute_getColorR, METH_NOARGS, "Returns the R color component. "}, + {"getColorG", ( PyCFunction ) StrokeAttribute_getColorG, METH_NOARGS, "Returns the G color component. "}, + {"getColorB", ( PyCFunction ) StrokeAttribute_getColorB, METH_NOARGS, "Returns the B color component. "}, + {"getColorRGB", ( PyCFunction ) StrokeAttribute_getColorRGB, METH_NOARGS, "Returns the RGB color components."}, + {"getAlpha", ( PyCFunction ) StrokeAttribute_getAlpha, METH_NOARGS, "Returns the alpha color component."}, + {"getThicknessR", ( PyCFunction ) StrokeAttribute_getThicknessR, METH_NOARGS, "Returns the thickness on the right of the vertex when following the stroke. "}, + {"getThicknessL", ( PyCFunction ) StrokeAttribute_getThicknessL, METH_NOARGS, "Returns the thickness on the left of the vertex when following the stroke."}, + {"getThicknessRL", ( PyCFunction ) StrokeAttribute_getThicknessRL, METH_NOARGS, "Returns the thickness on the right and on the left of the vertex when following the stroke. "}, + {"isVisible", ( PyCFunction ) StrokeAttribute_isVisible, METH_NOARGS, "Returns true if the strokevertex is visible, false otherwise"}, + {"getAttributeReal", ( PyCFunction ) StrokeAttribute_getAttributeReal, METH_VARARGS, "(name) Returns an attribute of type real specified by name."}, + {"getAttributeVec2f", ( PyCFunction ) StrokeAttribute_getAttributeVec2f, METH_VARARGS, "(name) Returns an attribute of type Vec2f specified by name."}, + {"getAttributeVec3f", ( PyCFunction ) StrokeAttribute_getAttributeVec3f, METH_VARARGS, "(name) Returns an attribute of type Vec3f specified by name."}, + {"isAttributeAvailableReal", ( PyCFunction ) StrokeAttribute_isAttributeAvailableReal, METH_VARARGS, "(name) Checks whether the real attribute specified by name is available"}, + {"isAttributeAvailableVec2f", ( PyCFunction ) StrokeAttribute_isAttributeAvailableVec2f, METH_VARARGS, "(name) Checks whether the Vec2f attribute specified by name is available"}, + {"isAttributeAvailableVec3f", ( PyCFunction ) StrokeAttribute_isAttributeAvailableVec3f, METH_VARARGS, "(name) Checks whether the Vec3f attribute specified by name is available"}, + {"setColor", ( PyCFunction ) StrokeAttribute_setColor, METH_VARARGS, "(float a)Sets the attribute's alpha value. "}, + {"setAlpha", ( PyCFunction ) StrokeAttribute_setAlpha, METH_VARARGS, "(float a) Sets the attribute's alpha value."}, + {"setThickness", ( PyCFunction ) StrokeAttribute_setThickness, METH_VARARGS, ""}, + {"setVisible", ( PyCFunction ) StrokeAttribute_setVisible, METH_VARARGS, ""}, + {"setAttributeReal", ( PyCFunction ) StrokeAttribute_setAttributeReal, METH_VARARGS, "(name, float att) Adds a user defined attribute of type real. If there is no attribute of specified by name, it is added. Otherwise, the new value replaces the old one."}, + {"setAttributeVec2f", ( PyCFunction ) StrokeAttribute_setAttributeVec2f, METH_VARARGS, "(name, float att) Adds a user defined attribute of type Vec2f. If there is no attribute of specified by name, it is added. Otherwise, the new value replaces the old one."}, + {"setAttributeVec3f", ( PyCFunction ) StrokeAttribute_setAttributeVec3f, METH_VARARGS, "(name, float att) Adds a user defined attribute of type Vec4f. If there is no attribute of specified by name, it is added. Otherwise, the new value replaces the old one."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_StrokeAttribute type definition ------------------------------*/ + +PyTypeObject StrokeAttribute_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "StrokeAttribute", /* tp_name */ + sizeof( BPy_StrokeAttribute ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)StrokeAttribute___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)StrokeAttribute___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_StrokeAttribute_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)StrokeAttribute___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC StrokeAttribute_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &StrokeAttribute_Type ) < 0 ) + return; + Py_INCREF( &StrokeAttribute_Type ); + PyModule_AddObject(module, "StrokeAttribute", (PyObject *)&StrokeAttribute_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0, *obj4 = 0, *obj5 = 0 , *obj6 = 0; + + if (! PyArg_ParseTuple(args, "|OOOOOO", &obj1, &obj2, &obj3, &obj4, &obj5, &obj6) ) + return -1; + + if( !obj1 || !obj2 || !obj3 ){ + + self->sa = new StrokeAttribute(); + + } else if( BPy_StrokeAttribute_Check(obj1) && + BPy_StrokeAttribute_Check(obj2) && + PyFloat_Check(obj3) ) { + + self->sa = new StrokeAttribute( *( ((BPy_StrokeAttribute *) obj1)->sa ), + *( ((BPy_StrokeAttribute *) obj2)->sa ), + PyFloat_AsDouble( obj3 ) ); + + } else if( obj4 && obj5 && obj6 && + PyFloat_Check(obj1) && PyFloat_Check(obj2) && PyFloat_Check(obj2) && + PyFloat_Check(obj4) && PyFloat_Check(obj5) && PyFloat_Check(obj6) ) { + + self->sa = new StrokeAttribute( PyFloat_AsDouble( obj1 ), + PyFloat_AsDouble( obj2 ), + PyFloat_AsDouble( obj3 ), + PyFloat_AsDouble( obj4 ), + PyFloat_AsDouble( obj5 ), + PyFloat_AsDouble( obj6 ) ); + + } else { + return -1; + } + + + return 0; + +} + +void StrokeAttribute___dealloc__(BPy_StrokeAttribute* self) +{ + delete self->sa; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * StrokeAttribute___repr__(BPy_StrokeAttribute* self) +{ + return PyString_FromFormat("StrokeAttribute: r:%f g:%f b:%f a:%f - R:%f L:%f", + self->sa->getColorR(), self->sa->getColorG(), self->sa->getColorB(), self->sa->getAlpha(), + self->sa->getThicknessR(), self->sa->getThicknessL() ); } - PyObject *_wrap_StrokeAttribute_getColorR(PyObject *self , PyObject *args) { +// PyObject *StrokeAttribute_getColor( BPy_StrokeAttribute *self ) { +// float *c = self->sa->getColor(); +// Vec3f v( c[0], c[1], c[2]); +// return Vector_from_Vec3f( v ); +// } + +PyObject *StrokeAttribute_getColorR( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getColorR() ); +} + +PyObject *StrokeAttribute_getColorG( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getColorG() ); +} + +PyObject *StrokeAttribute_getColorB( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getColorB() ); +} + +PyObject *StrokeAttribute_getColorRGB( BPy_StrokeAttribute *self ) { + Vec3f v( self->sa->getColorRGB() ); + return Vector_from_Vec3f( v ); +} + +PyObject *StrokeAttribute_getAlpha( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getAlpha() ); +} + +// PyObject *StrokeAttribute_getThickness( BPy_StrokeAttribute *self ) { +// // vector +// return PyString_FromString( self->sa->getExactTypeName() ); +// } + +PyObject *StrokeAttribute_getThicknessR( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getThicknessR() ); +} +PyObject *StrokeAttribute_getThicknessL( BPy_StrokeAttribute *self ) { + return PyFloat_FromDouble( self->sa->getThicknessL() ); +} +PyObject *StrokeAttribute_getThicknessRL( BPy_StrokeAttribute *self ) { + Vec2f v( self->sa->getThicknessRL() ); + return Vector_from_Vec2f( v ); +} + +PyObject *StrokeAttribute_isVisible( BPy_StrokeAttribute *self ) { + return PyBool_from_bool( self->sa->isVisible() ); } - PyObject *_wrap_StrokeAttribute_getColorG(PyObject *self , PyObject *args) { +PyObject *StrokeAttribute_getAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_getAttributeReal" << endl; + Py_RETURN_NONE; + } + + double a = self->sa->getAttributeReal( attr ); + return PyFloat_FromDouble( a ); +} + +PyObject *StrokeAttribute_getAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_getAttributeVec2f" << endl; + Py_RETURN_NONE; + } + + Vec2f a = self->sa->getAttributeVec2f( attr ); + return Vector_from_Vec2f( a ); } - PyObject *_wrap_StrokeAttribute_getColorB(PyObject *self , PyObject *args) { +PyObject *StrokeAttribute_getAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_getAttributeVec3f" << endl; + Py_RETURN_NONE; + } + + Vec3f a = self->sa->getAttributeVec3f( attr ); + return Vector_from_Vec3f( a ); +} + +PyObject *StrokeAttribute_isAttributeAvailableReal( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_isAttributeAvailableReal" << endl; + Py_RETURN_NONE; + } + + return PyBool_from_bool( self->sa->isAttributeAvailableReal( attr ) ); +} + +PyObject *StrokeAttribute_isAttributeAvailableVec2f( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_isAttributeAvailableVec2f" << endl; + Py_RETURN_NONE; + } + + return PyBool_from_bool( self->sa->isAttributeAvailableVec2f( attr ) ); +} + +PyObject *StrokeAttribute_isAttributeAvailableVec3f( BPy_StrokeAttribute *self, PyObject *args ) { + char *attr; + + if(!( PyArg_ParseTuple(args, "s", &attr) )) { + cout << "ERROR: StrokeAttribute_isAttributeAvailableVec3f" << endl; + Py_RETURN_NONE; + } + + return PyBool_from_bool( self->sa->isAttributeAvailableVec3f( attr ) ); } - PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *self , PyObject *args) { +int StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ) { + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0 ; + + if(!( PyArg_ParseTuple(args, "O|OO", &obj1, &obj2, &obj3) )) { + cout << "ERROR: StrokeAttribute_setColor" << endl; + return -1; + } + + if( PyList_Check(obj1) && !obj2 && !obj3 ){ + + Vec3f v( PyFloat_AsDouble( PyList_GetItem(obj1, 0) ), + PyFloat_AsDouble( PyList_GetItem(obj1, 1) ), + PyFloat_AsDouble( PyList_GetItem(obj1, 2) ) ); + + self->sa->setColor( v ); + return 0; + + } else if( obj1 && PyFloat_Check(obj1) && + obj2 && PyFloat_Check(obj2) && + obj3 && PyFloat_Check(obj3) ){ + + self->sa->setColor( PyFloat_AsDouble(obj1), + PyFloat_AsDouble(obj2), + PyFloat_AsDouble(obj3) ); + return 0; + } + + return -1; } +int StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ){ + float f = 0; - PyObject *_wrap_StrokeAttribute_getAlpha(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: StrokeAttribute_setAlpha" << endl; + return -1; + } + + self->sa->setAlpha( f ); + return 0; } +int StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ) { + PyObject *obj1 = 0, *obj2 = 0; - PyObject *_wrap_StrokeAttribute_getThickness(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) )) { + cout << "ERROR: StrokeAttribute_setThickness" << endl; + return -1; + } + + if( PyList_Check(obj1) && !obj2 ){ + + Vec2f v( PyFloat_AsDouble( PyList_GetItem(obj1, 0) ), + PyFloat_AsDouble( PyList_GetItem(obj1, 1) ) ); + + self->sa->setThickness( v ); + return 0; + + } else if( obj1 && PyFloat_Check(obj1) && + obj2 && PyFloat_Check(obj2) ){ + + self->sa->setThickness( PyFloat_AsDouble(obj1), + PyFloat_AsDouble(obj2) ); + return 0; + } + + return -1; } +int StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ) { + int i = 0; - PyObject *_wrap_StrokeAttribute_getThicknessR(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "i", &i) )) { + cout << "ERROR: StrokeAttribute_setVisible" << endl; + return -1; + } + + self->sa->setVisible( i ); + return 0; } +int StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { + char *s = 0; + double d = 0; - PyObject *_wrap_StrokeAttribute_getThicknessL(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "sd", &s, &d) )) { + cout << "ERROR: StrokeAttribute_setAttributeReal" << endl; + return -1; + } + + self->sa->setAttributeReal( s, d ); + return 0; } +int StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ) { + char *s; + PyObject *obj = 0; - PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "sO", &s, &obj) )) { + cout << "ERROR: StrokeAttribute_setAttributeVec2f" << endl; + return -1; + } + + if( PyList_Check(obj) && PyList_Size(obj) > 1) { + + Vec2f v( PyFloat_AsDouble( PyList_GetItem(obj, 0) ), + PyFloat_AsDouble( PyList_GetItem(obj, 1) ) ); + + self->sa->setAttributeVec2f( s, v ); + return 0; + + } + + return -1; } +int StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ) { + char *s; + PyObject *obj = 0; - PyObject *_wrap_StrokeAttribute_isVisible(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "sO", &s, &obj) )) { + cout << "ERROR: StrokeAttribute_setAttributeVec3f" << endl; + return -1; + } + + if( PyList_Check(obj) && PyList_Size(obj) > 2 ) { + + Vec3f v( PyFloat_AsDouble( PyList_GetItem(obj, 0) ), + PyFloat_AsDouble( PyList_GetItem(obj, 1) ), + PyFloat_AsDouble( PyList_GetItem(obj, 2) ) ); + + self->sa->setAttributeVec3f( s, v ); + return 0; + + } + + return -1; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_StrokeAttribute_getAttributeReal(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_isAttributeAvailableReal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec2f(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_isAttributeAvailableVec3f(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setColor__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setAlpha(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setThickness__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setAttributeReal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *self , PyObject *args) { -} - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.h b/source/blender/freestyle/intern/python/StrokeAttribute.h new file mode 100644 index 00000000000..a0828e4f668 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeAttribute.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_STROKEATTRIBUTE_H +#define FREESTYLE_PYTHON_STROKEATTRIBUTE_H + +#include "../stroke/Stroke.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject StrokeAttribute_Type; + +#define BPy_StrokeAttribute_Check(v) (( (PyObject *) v)->ob_type == &StrokeAttribute_Type) + +/*---------------------------Python BPy_StrokeAttribute structure definition----------*/ +typedef struct { + PyObject_HEAD + StrokeAttribute *sa; +} BPy_StrokeAttribute; + +/*---------------------------Python BPy_StrokeAttribute visible prototypes-----------*/ + +PyMODINIT_FUNC StrokeAttribute_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_STROKEATTRIBUTE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D.h index 365b340d96c..8f1935871ca 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction0D_Type; -#define BPy_UnaryFunction0D_Check(v) \ - ((v)->ob_type == &UnaryFunction0D_Type) +#define BPy_UnaryFunction0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0D_Type) /*---------------------------Python BPy_UnaryFunction0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D.h index 2ad187ca81d..4c509f50b85 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1D_Type; -#define BPy_UnaryFunction1D_Check(v) \ - ((v)->ob_type == &UnaryFunction1D_Type) +#define BPy_UnaryFunction1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1D_Type) /*---------------------------Python BPy_UnaryFunction1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D.h index c8b9008380a..1f72ba5e86b 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject UnaryPredicate0D_Type; -#define BPy_UnaryPredicate0D_Check(v) \ - ((v)->ob_type == &UnaryPredicate0D_Type) +#define BPy_UnaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate0D_Type) /*---------------------------Python BPy_UnaryPredicate0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D.h index 8bb33782133..509d81f6937 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject UnaryPredicate1D_Type; -#define BPy_UnaryPredicate1D_Check(v) \ - ((v)->ob_type == &UnaryPredicate1D_Type) +#define BPy_UnaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate1D_Type) /*---------------------------Python BPy_UnaryPredicate1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/rendering/GLDebugRenderer.h b/source/blender/freestyle/intern/rendering/GLDebugRenderer.h index abf76d079da..e0f97249645 100755 --- a/source/blender/freestyle/intern/rendering/GLDebugRenderer.h +++ b/source/blender/freestyle/intern/rendering/GLDebugRenderer.h @@ -46,7 +46,7 @@ public: inline GLDebugRenderer() : GLRenderer() { _bboxSize = 2.0; - SetMaxValue(&_minEdgeSize); + setMaxValue(&_minEdgeSize); _SelectedFEdge = 0; } @@ -84,9 +84,9 @@ public: * iBBoxSize * The size of the scene bounding box. */ - inline void ReInit(real iBBoxSize) {_bboxSize = iBBoxSize; SetMaxValue(&_minEdgeSize);} + inline void ReInit(real iBBoxSize) {_bboxSize = iBBoxSize; setMaxValue(&_minEdgeSize);} - inline void SetSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} + inline void setSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} inline FEdge * selectedFEdge() {return _SelectedFEdge;} protected: @@ -170,8 +170,8 @@ protected: private: - inline void SetMaxValue(float *oValue) {*oValue = FLT_MAX;} - inline void SetMaxValue(real *oValue) {*oValue = DBL_MAX;} + inline void setMaxValue(float *oValue) {*oValue = FLT_MAX;} + inline void setMaxValue(real *oValue) {*oValue = DBL_MAX;} mutable real _bboxSize; mutable real _minEdgeSize; diff --git a/source/blender/freestyle/intern/rendering/GLRenderer.cpp b/source/blender/freestyle/intern/rendering/GLRenderer.cpp index 016b159da5c..45693413ace 100755 --- a/source/blender/freestyle/intern/rendering/GLRenderer.cpp +++ b/source/blender/freestyle/intern/rendering/GLRenderer.cpp @@ -93,7 +93,7 @@ void GLRenderer::visitIndexedFaceSet(IndexedFaceSet& ifs) pti += numVertexPerFace[fIndex]; } //glEndList(); - //ifs.SetDisplayList(dl); + //ifs.setDisplayList(dl); } void GLRenderer::visitNodeTransform(NodeTransform& tn) { diff --git a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h index e2be6fa8264..58dcf4fede9 100755 --- a/source/blender/freestyle/intern/scene_graph/DrawingStyle.h +++ b/source/blender/freestyle/intern/scene_graph/DrawingStyle.h @@ -44,10 +44,10 @@ public: /*! operators */ inline DrawingStyle& operator=(const DrawingStyle& ds); - inline void SetStyle(const STYLE iStyle) {Style = iStyle;} - inline void SetLineWidth(const float iLineWidth) {LineWidth = iLineWidth;} - inline void SetPointSize(const float iPointSize) {PointSize = iPointSize;} - inline void SetLightingEnabled(const bool on) {LightingEnabled = on;} + inline void setStyle(const STYLE iStyle) {Style = iStyle;} + inline void setLineWidth(const float iLineWidth) {LineWidth = iLineWidth;} + inline void setPointSize(const float iPointSize) {PointSize = iPointSize;} + inline void setLightingEnabled(const bool on) {LightingEnabled = on;} inline STYLE style() const {return Style;} inline float lineWidth() const {return LineWidth;} diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp index ec3d3ad748c..2604484ecd7 100755 --- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp +++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp @@ -317,5 +317,5 @@ void IndexedFaceSet::ComputeBBox() v++; } - SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); + setBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); } diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h index c6951942dbb..ce0afcd2fd6 100755 --- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h +++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h @@ -166,7 +166,7 @@ public: virtual void ComputeBBox(); /*! modifiers */ - inline void SetDisplayList(unsigned int index) {_displayList = index;} + inline void setDisplayList(unsigned int index) {_displayList = index;} /*! Accessors */ virtual const real * vertices() const {return _Vertices;} diff --git a/source/blender/freestyle/intern/scene_graph/LineRep.cpp b/source/blender/freestyle/intern/scene_graph/LineRep.cpp index 9dec2ec803f..504db06acf4 100755 --- a/source/blender/freestyle/intern/scene_graph/LineRep.cpp +++ b/source/blender/freestyle/intern/scene_graph/LineRep.cpp @@ -54,5 +54,5 @@ void LineRep::ComputeBBox() ZMin = (*v)[2]; } - SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); + setBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); } diff --git a/source/blender/freestyle/intern/scene_graph/LineRep.h b/source/blender/freestyle/intern/scene_graph/LineRep.h index 1bbba130ba3..232557af857 100755 --- a/source/blender/freestyle/intern/scene_graph/LineRep.h +++ b/source/blender/freestyle/intern/scene_graph/LineRep.h @@ -55,7 +55,7 @@ public: inline LineRep(const Vec3r& v1, const Vec3r& v2) : Rep() { - SetStyle(LINES); + setStyle(LINES); AddVertex(v1); AddVertex(v2); _width = 0.f; @@ -66,7 +66,7 @@ public: : Rep() { _vertices = vertices; - SetStyle(LINE_STRIP); + setStyle(LINE_STRIP); _width = 0.f; } @@ -80,7 +80,7 @@ public: { _vertices.push_back(*v); } - SetStyle(LINE_STRIP); + setStyle(LINE_STRIP); _width = 0.f; } @@ -95,9 +95,9 @@ public: inline float width() const {return _width;} /*! modifiers */ - inline void SetStyle(const LINES_STYLE iStyle) {_Style = iStyle;} + inline void setStyle(const LINES_STYLE iStyle) {_Style = iStyle;} inline void AddVertex(const Vec3r& iVertex) {_vertices.push_back(iVertex);} - inline void SetVertices(const vector& iVertices) + inline void setVertices(const vector& iVertices) { if(0 != _vertices.size()) { @@ -110,7 +110,7 @@ public: _vertices.push_back(*v); } } - inline void SetWidth(float iWidth) {_width=iWidth;} + inline void setWidth(float iWidth) {_width=iWidth;} /*! Accept the corresponding visitor */ virtual void accept(SceneVisitor& v) { diff --git a/source/blender/freestyle/intern/scene_graph/Material.h b/source/blender/freestyle/intern/scene_graph/Material.h index 09557ad3473..64ae526ccb0 100755 --- a/source/blender/freestyle/intern/scene_graph/Material.h +++ b/source/blender/freestyle/intern/scene_graph/Material.h @@ -120,7 +120,7 @@ public: * \param a * Alpha component */ - inline void SetDiffuse(const float r, const float g, const float b, const float a); + inline void setDiffuse(const float r, const float g, const float b, const float a); /*! Sets the specular color. * \param r * Red component @@ -131,7 +131,7 @@ public: * \param a * Alpha component */ - inline void SetSpecular(const float r, const float g, const float b, const float a); + inline void setSpecular(const float r, const float g, const float b, const float a); /*! Sets the ambiant color. * \param r * Red component @@ -142,7 +142,7 @@ public: * \param a * Alpha component */ - inline void SetAmbient(const float r, const float g, const float b, const float a); + inline void setAmbient(const float r, const float g, const float b, const float a); /*! Sets the emissive color. * \param r @@ -154,13 +154,13 @@ public: * \param a * Alpha component */ - inline void SetEmission(const float r, const float g, const float b, const float a); + inline void setEmission(const float r, const float g, const float b, const float a); /*! Sets the shininess. * \param s * Shininess */ - inline void SetShininess(const float s); + inline void setShininess(const float s); /* operators */ inline Material& operator=(const Material& m); @@ -225,7 +225,7 @@ Material::Material(const Material& m) Shininess = m.shininess(); } -void Material::SetDiffuse(const float r, const float g, const float b, const float a) +void Material::setDiffuse(const float r, const float g, const float b, const float a) { Diffuse[0] = r; Diffuse[1] = g; @@ -233,7 +233,7 @@ void Material::SetDiffuse(const float r, const float g, const float b, const flo Diffuse[3] = a; } -void Material::SetSpecular(const float r, const float g, const float b, const float a) +void Material::setSpecular(const float r, const float g, const float b, const float a) { Specular[0] = r; Specular[1] = g; @@ -241,7 +241,7 @@ void Material::SetSpecular(const float r, const float g, const float b, const fl Specular[3] = a; } -void Material::SetAmbient(const float r, const float g, const float b, const float a) +void Material::setAmbient(const float r, const float g, const float b, const float a) { Ambient[0] = r; Ambient[1] = g; @@ -249,7 +249,7 @@ void Material::SetAmbient(const float r, const float g, const float b, const flo Ambient[3] = a; } -void Material::SetEmission(const float r, const float g, const float b, const float a) +void Material::setEmission(const float r, const float g, const float b, const float a) { Emission[0] = r; Emission[1] = g; @@ -257,7 +257,7 @@ void Material::SetEmission(const float r, const float g, const float b, const fl Emission[3] = a; } -void Material::SetShininess(const float s) +void Material::setShininess(const float s) { Shininess = s; } diff --git a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.cpp b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.cpp index 515874c4021..a6d3b8f8721 100755 --- a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.cpp +++ b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.cpp @@ -58,7 +58,7 @@ MaxFileLoader::~MaxFileLoader() _Scene = NULL; } -void MaxFileLoader::SetFileName(const char *iFileName) +void MaxFileLoader::setFileName(const char *iFileName) { if(NULL != _FileName) delete [] _FileName; @@ -224,17 +224,17 @@ void MaxFileLoader::RenderNode(Lib3dsNode *iNode) if (mat) { - tmpMat.SetDiffuse(mat->diffuse[0], mat->diffuse[1], mat->diffuse[2], mat->diffuse[3]); - tmpMat.SetSpecular(mat->specular[0], mat->specular[1], mat->specular[2], mat->specular[3]); + tmpMat.setDiffuse(mat->diffuse[0], mat->diffuse[1], mat->diffuse[2], mat->diffuse[3]); + tmpMat.setSpecular(mat->specular[0], mat->specular[1], mat->specular[2], mat->specular[3]); float s = (float)pow(2.0, 10.0*mat->shininess); if(s > 128.f) s = 128.f; - tmpMat.SetShininess(s); + tmpMat.setShininess(s); } if(meshMaterials.empty()){ meshMaterials.push_back(tmpMat); - shape->SetMaterial(tmpMat); + shape->setMaterial(tmpMat); }else{ // find if the material is aleady in the list unsigned i=0; @@ -357,12 +357,12 @@ void MaxFileLoader::RenderNode(Lib3dsNode *iNode) 0,0, 0); // sets the id of the rep - rep->SetId(Id(iNode->node_id, 0)); + rep->setId(Id(iNode->node_id, 0)); const BBox bbox = BBox(Vec3r(minBBox[0], minBBox[1], minBBox[2]), Vec3r(maxBBox[0], maxBBox[1], maxBBox[2])); - rep->SetBBox(bbox); + rep->setBBox(bbox); shape->AddRep(rep); } @@ -376,7 +376,7 @@ void MaxFileLoader::RenderNode(Lib3dsNode *iNode) for(unsigned j=0; j<4; j++) M44f(i,j) = iNode->matrix[j][i]; - currentMesh->SetMatrix(Matrix44r(M44f)); + currentMesh->setMatrix(Matrix44r(M44f)); currentMesh->Translate(-d->pivot[0], -d->pivot[1], -d->pivot[2]); } shape = (NodeShape*)iNode->user.d; diff --git a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h index 179f9a016df..ce71ab4be3b 100755 --- a/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h +++ b/source/blender/freestyle/intern/scene_graph/MaxFileLoader.h @@ -70,7 +70,7 @@ public: virtual ~MaxFileLoader(); /*! Sets the name of the 3dsMax file to load */ - void SetFileName(const char *iFileName); + void setFileName(const char *iFileName); /*! Loads the 3D scene and returns * a pointer to the scene root node diff --git a/source/blender/freestyle/intern/scene_graph/Node.h b/source/blender/freestyle/intern/scene_graph/Node.h index 1726dd3c853..41afaa353be 100755 --- a/source/blender/freestyle/intern/scene_graph/Node.h +++ b/source/blender/freestyle/intern/scene_graph/Node.h @@ -68,7 +68,7 @@ public: virtual const BBox& bbox() const {return _BBox;} /*! Sets the Node bounding box */ - virtual void SetBBox(const BBox& iBox) {_BBox = iBox;} + virtual void setBBox(const BBox& iBox) {_BBox = iBox;} /*! Makes the union of _BBox and iBox */ virtual void AddBBox(const BBox& iBox) diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h index 18442ae10f9..012f963ea8c 100755 --- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h +++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h @@ -43,16 +43,16 @@ public: virtual ~NodeDrawingStyle() {} inline const DrawingStyle& drawingStyle() const { return _DrawingStyle; } - inline void SetDrawingStyle(const DrawingStyle& iDrawingStyle) { _DrawingStyle = iDrawingStyle; } + inline void setDrawingStyle(const DrawingStyle& iDrawingStyle) { _DrawingStyle = iDrawingStyle; } /*! Sets the style. Must be one of FILLED, LINES, POINTS, INVISIBLE. */ - inline void SetStyle(const DrawingStyle::STYLE iStyle) { _DrawingStyle.SetStyle(iStyle); } + inline void setStyle(const DrawingStyle::STYLE iStyle) { _DrawingStyle.setStyle(iStyle); } /*! Sets the line width in the LINES style case */ - inline void SetLineWidth(const float iLineWidth) { _DrawingStyle.SetLineWidth(iLineWidth); } + inline void setLineWidth(const float iLineWidth) { _DrawingStyle.setLineWidth(iLineWidth); } /*! Sets the Point size in the POINTS style case */ - inline void SetPointSize(const float iPointSize) { _DrawingStyle.SetPointSize(iPointSize); } + inline void setPointSize(const float iPointSize) { _DrawingStyle.setPointSize(iPointSize); } /*! Enables or disables the lighting. TRUE = enable */ - inline void SetLightingEnabled(const bool iEnableLighting) { _DrawingStyle.SetLightingEnabled(iEnableLighting); } + inline void setLightingEnabled(const bool iEnableLighting) { _DrawingStyle.setLightingEnabled(iEnableLighting); } /*! Accept the corresponding visitor */ virtual void accept(SceneVisitor& v); diff --git a/source/blender/freestyle/intern/scene_graph/NodeShape.h b/source/blender/freestyle/intern/scene_graph/NodeShape.h index 3e963beec38..34b049bfeb5 100755 --- a/source/blender/freestyle/intern/scene_graph/NodeShape.h +++ b/source/blender/freestyle/intern/scene_graph/NodeShape.h @@ -71,7 +71,7 @@ public: virtual void accept(SceneVisitor& v); /*! Sets the shape material */ - inline void SetMaterial(const Material& iMaterial) { _Material = iMaterial; } + inline void setMaterial(const Material& iMaterial) { _Material = iMaterial; } /*! accessors */ /*! returns the shape's material */ diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp index 64e9b7a4dd6..8f706c78259 100755 --- a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp +++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp @@ -91,7 +91,7 @@ void NodeTransform::MultiplyMatrix(const Matrix44r &iMatrix) _Matrix = mat_tmp * iMatrix; } -void NodeTransform::SetMatrix(const Matrix44r &iMatrix) +void NodeTransform::setMatrix(const Matrix44r &iMatrix) { _Matrix = iMatrix; if(isScaled(iMatrix)) diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.h b/source/blender/freestyle/intern/scene_graph/NodeTransform.h index 3929c60996b..e75132466f0 100755 --- a/source/blender/freestyle/intern/scene_graph/NodeTransform.h +++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.h @@ -77,7 +77,7 @@ public: void MultiplyMatrix(const Matrix44r &iMatrix); /*! Sets the current matrix to iMatrix */ - void SetMatrix(const Matrix44r &iMatrix); + void setMatrix(const Matrix44r &iMatrix); /*! Accept the corresponding visitor */ virtual void accept(SceneVisitor& v); diff --git a/source/blender/freestyle/intern/scene_graph/Rep.h b/source/blender/freestyle/intern/scene_graph/Rep.h index 6ccc2152c48..ee5f2942abf 100755 --- a/source/blender/freestyle/intern/scene_graph/Rep.h +++ b/source/blender/freestyle/intern/scene_graph/Rep.h @@ -111,9 +111,9 @@ public: inline const Material * material() const {return _Material;} /*! Sets the Rep bounding box */ - virtual void SetBBox(const BBox& iBox) {_BBox = iBox;} - inline void SetId(const Id& id) {_Id = id;} - inline void SetMaterial(const Material& iMaterial) + virtual void setBBox(const BBox& iBox) {_BBox = iBox;} + inline void setId(const Id& id) {_Id = id;} + inline void setMaterial(const Material& iMaterial) { _Material = new Material(iMaterial); } diff --git a/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp b/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp index 215124b0676..f73a8498714 100755 --- a/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp +++ b/source/blender/freestyle/intern/scene_graph/TriangleRep.cpp @@ -55,5 +55,5 @@ void TriangleRep::ComputeBBox() } - SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); + setBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); } diff --git a/source/blender/freestyle/intern/scene_graph/TriangleRep.h b/source/blender/freestyle/intern/scene_graph/TriangleRep.h index 20df12cfd8f..9d986857060 100755 --- a/source/blender/freestyle/intern/scene_graph/TriangleRep.h +++ b/source/blender/freestyle/intern/scene_graph/TriangleRep.h @@ -85,11 +85,11 @@ public: inline const Vec3r& vertex(int index) const {return _vertices[index];} inline const Vec3r& color(int index) const {return _colors[index];} /*! modifiers */ - inline void SetStyle(const TRIANGLE_STYLE iStyle) {_Style = iStyle;} - inline void SetVertex(int index, const Vec3r& iVertex) {_vertices[index] = iVertex;} - inline void SetColor(int index, const Vec3r& iColor) {_colors[index] = iColor;} - inline void SetVertices(const Vec3r& v0, const Vec3r& v1, const Vec3r& v2) {_vertices[0] = v0; _vertices[1] = v1; _vertices[2] = v2;} - inline void SetColors(const Vec3r& c0, const Vec3r& c1, const Vec3r& c2) {_colors[0] = c0; _colors[1] = c1; _colors[2] = c2;} + inline void setStyle(const TRIANGLE_STYLE iStyle) {_Style = iStyle;} + inline void setVertex(int index, const Vec3r& iVertex) {_vertices[index] = iVertex;} + inline void setColor(int index, const Vec3r& iColor) {_colors[index] = iColor;} + inline void setVertices(const Vec3r& v0, const Vec3r& v1, const Vec3r& v2) {_vertices[0] = v0; _vertices[1] = v1; _vertices[2] = v2;} + inline void setColors(const Vec3r& c0, const Vec3r& c1, const Vec3r& c2) {_colors[0] = c0; _colors[1] = c1; _colors[2] = c2;} /*! Accept the corresponding visitor */ virtual void accept(SceneVisitor& v) { diff --git a/source/blender/freestyle/intern/scene_graph/VertexRep.cpp b/source/blender/freestyle/intern/scene_graph/VertexRep.cpp index 1ecb5f141e1..e4f774bfb84 100755 --- a/source/blender/freestyle/intern/scene_graph/VertexRep.cpp +++ b/source/blender/freestyle/intern/scene_graph/VertexRep.cpp @@ -24,6 +24,6 @@ void VertexRep::ComputeBBox() { - SetBBox(BBox(Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]), + setBBox(BBox(Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]), Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]))); } diff --git a/source/blender/freestyle/intern/scene_graph/VertexRep.h b/source/blender/freestyle/intern/scene_graph/VertexRep.h index 9dce7fbbe9c..9e31b4b8ef9 100755 --- a/source/blender/freestyle/intern/scene_graph/VertexRep.h +++ b/source/blender/freestyle/intern/scene_graph/VertexRep.h @@ -71,12 +71,12 @@ public: inline float pointSize() const {return _PointSize;} /*! modifiers */ - inline void SetVid(int id) {_vid = id;} + inline void setVid(int id) {_vid = id;} inline void setX(real x) {_coordinates[0] = x;} inline void setY(real y) {_coordinates[1] = y;} inline void setZ(real z) {_coordinates[2] = z;} - inline void SetCoordinates(real x, real y, real z) {_coordinates[0] = x;_coordinates[1] = y; _coordinates[2] = z;} - inline void SetPointSize(float iPointSize) {_PointSize = iPointSize;} + inline void setCoordinates(real x, real y, real z) {_coordinates[0] = x;_coordinates[1] = y; _coordinates[2] = z;} + inline void setPointSize(float iPointSize) {_PointSize = iPointSize;} private: int _vid; // vertex id diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h index d92575cf110..9eee6714b09 100755 --- a/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h +++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions0D.h @@ -59,7 +59,7 @@ namespace Functions0D { * value. (the larger, the smoother) */ DensityF0D(double sigma = 2) : UnaryFunction0D() { - _filter.SetSigma((float)sigma); + _filter.setSigma((float)sigma); } /*! Returns the string "DensityF0D"*/ string getName() const { @@ -87,7 +87,7 @@ namespace Functions0D { * will be used. */ LocalAverageDepthF0D(real maskSize=5.f) : UnaryFunction0D() { - _filter.SetSigma((float)maskSize/2.f); + _filter.setSigma((float)maskSize/2.f); } /*! Returns the string "LocalAverageDepthF0D"*/ string getName() const { diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp index b1c5317c5f1..653e0158538 100755 --- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp @@ -153,7 +153,7 @@ SpatialNoiseShader::shade(Stroke &ioStroke) const Vec2r noise(-ori2d[1]*_amount*bruit, ori2d[0]*_amount*bruit); - sv->SetPoint(p[0]+noise[0], p[1]+noise[1]); + sv->setPoint(p[0]+noise[0], p[1]+noise[1]); p0=p; ++v; @@ -351,7 +351,7 @@ Smoother::copyVertices () const Vec2r p1(_vertex[i]); Vec2r p(p0 + _carricatureFactor * (p1 - p0)); - (v)->SetPoint(p[0], p[1]); + (v)->setPoint(p[0], p[1]); i++; } diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index 0022a36aee2..05cc13fd96c 100755 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -520,9 +520,9 @@ namespace StrokeShaders { break; } unsigned int texId = instance->getBrushTextureIndex(pathname, mediumType); - stroke.SetMediumType(mediumType); - stroke.SetTips(hasTips); - stroke.SetTextureId(texId); + stroke.setMediumType(mediumType); + stroke.setTips(hasTips); + stroke.setTextureId(texId); } // FIXME @@ -533,9 +533,9 @@ namespace StrokeShaders { return; string pathname = TextureManager::Options::getBrushesPath() + "/" + _texturePath; unsigned int texId = instance->getBrushTextureIndex(pathname, _mediumType); - stroke.SetMediumType(_mediumType); - stroke.SetTips(_tips); - stroke.SetTextureId(texId); + stroke.setMediumType(_mediumType); + stroke.setTips(_tips); + stroke.setTextureId(texId); } // @@ -564,9 +564,9 @@ namespace StrokeShaders { dn.normalize(); Vec2d newFirst(first+_amount*d1); - (v0)->SetPoint(newFirst[0], newFirst[1]); + (v0)->setPoint(newFirst[0], newFirst[1]); Vec2d newLast(last+_amount*dn); - (vn)->SetPoint(newLast[0], newLast[1]); + (vn)->setPoint(newLast[0], newLast[1]); } void SamplingShader::shade(Stroke& stroke) const @@ -585,7 +585,7 @@ namespace StrokeShaders { Vec2f n(fun(it)); sv = dynamic_cast(&(*it)); Vec2d newPoint(sv->x()+_amount*n.x(), sv->y()+_amount*n.y()); - sv->SetPoint(newPoint[0], newPoint[1]); + sv->setPoint(newPoint[0], newPoint[1]); ++it; } } @@ -686,8 +686,8 @@ namespace StrokeShaders { ((it!=itend) && (p!=pend)); ++it) { - it->SetX(p->x()); - it->SetY(p->y()); + it->setX(p->x()); + it->setY(p->y()); last = p; ++p; ++n; @@ -695,8 +695,8 @@ namespace StrokeShaders { // nExtraVertex should stay unassigned for(int i=0; i< nExtraVertex; ++i) { - it->SetX(last->x()); - it->SetY(last->y()); + it->setX(last->x()); + it->setY(last->y()); if(it.isEnd()) cerr << "Warning: Problem encountered while creating B-spline" << endl; ++it; @@ -810,8 +810,8 @@ namespace StrokeShaders { ((it!=itend) && (p!=pend)); ++it) { - it->SetX(p->x()); - it->SetY(p->y()); + it->setX(p->x()); + it->setY(p->y()); // double x = p->x(); // double y = p->y(); // cout << "x = " << x << "-" << "y = " << y << endl; @@ -859,7 +859,7 @@ namespace StrokeShaders { (it!=itend) && (a!=aend); ++it) { - (it)->SetAttribute(*a); + (it)->setAttribute(*a); if((index <= index1)||(index>index2)) ++a; ++index; @@ -894,7 +894,7 @@ namespace StrokeShaders { float t = 4.f*(0.25f - (u-0.5)*(u-0.5)); float curvature_coeff = (M_PI-curv_fun(it))/M_PI; Vec2d newPoint(sv->x()+curvature_coeff*t*_amount*n.x(), sv->y()+curvature_coeff*t*_amount*n.y()); - sv->SetPoint(newPoint[0], newPoint[1]); + sv->setPoint(newPoint[0], newPoint[1]); ++it; } } @@ -998,10 +998,10 @@ namespace StrokeShaders { v!=b; ++v) { - v->SetPoint((*cp)->A.x()+v->u()*u.x()+n.x()*offset, (*cp)->A.y()+v->u()*u.y()+n.y()*offset); + v->setPoint((*cp)->A.x()+v->u()*u.x()+n.x()*offset, (*cp)->A.y()+v->u()*u.y()+n.y()*offset); } // u.normalize(); - // (*a)->SetPoint((*a)->x()-u.x()*10, (*a)->y()-u.y()*10); + // (*a)->setPoint((*a)->x()-u.x()*10, (*a)->y()-u.y()*10); } // delete stuff @@ -1036,7 +1036,7 @@ namespace StrokeShaders { v!=vend; ++v) { - v->SetPoint(piece.A.x()+v->u()*u.x()+n.x()*offset, piece.A.y()+v->u()*u.y()+n.y()*offset); + v->setPoint(piece.A.x()+v->u()*u.x()+n.x()*offset, piece.A.y()+v->u()*u.y()+n.y()*offset); } } @@ -1101,7 +1101,7 @@ namespace StrokeShaders { //cout << "-----------------------------------------------" << endl; for(;(v!=vend)&&(a!=aend);++v,++a) { - v->SetAttribute(*a); + v->setAttribute(*a); //cout << "thickness = " << (*a).getThickness()[0] << "-" << (*a).getThickness()[1] << endl; } // we're done! diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp index b185bba92a0..bdca8f968fe 100755 --- a/source/blender/freestyle/intern/stroke/Canvas.cpp +++ b/source/blender/freestyle/intern/stroke/Canvas.cpp @@ -258,7 +258,7 @@ void Canvas::ReplaceStyleModule(unsigned index, StyleModule *iStyleModule) } } -void Canvas::SetVisible(unsigned index, bool iVisible) { +void Canvas::setVisible(unsigned index, bool iVisible) { _StyleModules[index]->setDisplayed(iVisible); } diff --git a/source/blender/freestyle/intern/stroke/Canvas.h b/source/blender/freestyle/intern/stroke/Canvas.h index cae50162933..549c6a97d55 100755 --- a/source/blender/freestyle/intern/stroke/Canvas.h +++ b/source/blender/freestyle/intern/stroke/Canvas.h @@ -177,16 +177,16 @@ public: virtual bool getRecordFlag() const {return false;} /*! modifiers */ - inline void SetSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} + inline void setSelectedFEdge(FEdge *iFEdge) {_SelectedFEdge = iFEdge;} /*! inserts a shader at pos index+1 */ void InsertStyleModule(unsigned index, StyleModule *iStyleModule); void RemoveStyleModule(unsigned index); void SwapStyleModules(unsigned i1, unsigned i2); void ReplaceStyleModule(unsigned index, StyleModule *iStyleModule); - void SetVisible(unsigned index, bool iVisible) ; - //inline void SetDensityMap(InformationMap* iMap) {_DensityMap = iMap;} + void setVisible(unsigned index, bool iVisible) ; + //inline void setDensityMap(InformationMap* iMap) {_DensityMap = iMap;} inline void AddLayer(StrokeLayer *iLayer) {_Layers.push_back(iLayer);} - inline void SetCurrentPaperTextureIndex(int i) {_paperTextureIndex = i;} + inline void setCurrentPaperTextureIndex(int i) {_paperTextureIndex = i;} void changePaperTexture(bool increment=true) ; /*! enables/disables paper texture */ inline void togglePaperTexture() {_drawPaper = !_drawPaper;} diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h index 400f27e5d5a..7fbe7e701e9 100755 --- a/source/blender/freestyle/intern/stroke/Curve.h +++ b/source/blender/freestyle/intern/stroke/Curve.h @@ -218,14 +218,14 @@ public: /*! Sets the first SVertex upon which to build * the CurvePoint. */ - inline void SetA(SVertex *iA) {__A = iA;} + inline void setA(SVertex *iA) {__A = iA;} /*! Sets the second SVertex upon which to build * the CurvePoint. */ - inline void SetB(SVertex *iB) {__B = iB;} + inline void setB(SVertex *iB) {__B = iB;} /*! Sets the 2D interpolation parameter to use. */ - inline void SetT2d(float t) {_t2d = t;} + inline void setT2d(float t) {_t2d = t;} //inline void SetT3d(float t) {_t3d = t;} /* Information access interface */ diff --git a/source/blender/freestyle/intern/stroke/Modifiers.h b/source/blender/freestyle/intern/stroke/Modifiers.h index c3be65ffc89..21bebebc6f8 100755 --- a/source/blender/freestyle/intern/stroke/Modifiers.h +++ b/source/blender/freestyle/intern/stroke/Modifiers.h @@ -64,7 +64,7 @@ struct TimestampModifier : public EdgeModifier virtual void operator()(Edge& iEdge) { TimeStamp *timestamp = TimeStamp::instance(); - iEdge.SetTimeStamp(timestamp->getTimeStamp()); + iEdge.setTimeStamp(timestamp->getTimeStamp()); } }; diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index 8e34d9c5197..cfdd72ac839 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -756,7 +756,7 @@ void Operators::sort(BinaryPredicate1D& pred) { Stroke* createStroke(Interface1D& inter) { Stroke* stroke = new Stroke; - stroke->SetId(inter.getId()); + stroke->setId(inter.getId()); float currentCurvilignAbscissa = 0.f; @@ -784,7 +784,7 @@ Stroke* createStroke(Interface1D& inter) { current = stroke_vertex->point2d(); Vec3r vec_tmp(current - previous); currentCurvilignAbscissa += vec_tmp.norm(); - stroke_vertex->SetCurvilinearAbscissa(currentCurvilignAbscissa); + stroke_vertex->setCurvilinearAbscissa(currentCurvilignAbscissa); stroke->push_back(stroke_vertex); previous = current; ++it; @@ -805,10 +805,10 @@ Stroke* createStroke(Interface1D& inter) { current = stroke_vertex->point2d(); Vec3r vec_tmp(current - previous); currentCurvilignAbscissa += vec_tmp.norm(); - stroke_vertex->SetCurvilinearAbscissa(currentCurvilignAbscissa); + stroke_vertex->setCurvilinearAbscissa(currentCurvilignAbscissa); stroke->push_back(stroke_vertex); } - stroke->SetLength(currentCurvilignAbscissa); + stroke->setLength(currentCurvilignAbscissa); return stroke; } diff --git a/source/blender/freestyle/intern/stroke/QInformationMap.h b/source/blender/freestyle/intern/stroke/QInformationMap.h index 2542bdba147..ef068f15061 100755 --- a/source/blender/freestyle/intern/stroke/QInformationMap.h +++ b/source/blender/freestyle/intern/stroke/QInformationMap.h @@ -49,7 +49,7 @@ public: virtual void retrieveMeanAndVariance(int x, int y, float &oMean, float &oVariance) ; inline const QImage& map() const {return _map;} - inline void SetMap(const QImage& iMap, float iw, float ih) {_map = iMap.copy();_w=iw;_h=ih;} + inline void setMap(const QImage& iMap, float iw, float ih) {_map = iMap.copy();_w=iw;_h=ih;} protected: virtual float computeGaussian(int x, int y); diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 7e7eb5ff3f0..c6b52358264 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -450,14 +450,14 @@ Stroke& Stroke::operator=(const Stroke& iBrother) } -void Stroke::SetLength(float iLength) +void Stroke::setLength(float iLength) { _Length = iLength; for(vertex_container::iterator v=_Vertices.begin(), vend=_Vertices.end(); v!=vend; ++v) { - (*v)->SetStrokeLength(iLength); + (*v)->setStrokeLength(iLength); } } @@ -635,7 +635,7 @@ void Stroke::Resample(float iSampling) while(tSetCurvilinearAbscissa(curvilinearLength); + //newVertex->setCurvilinearAbscissa(curvilinearLength); newVertices.push_back(newVertex); t = t + _sampling/norm_var; } @@ -681,7 +681,7 @@ void Stroke::RemoveVertex(StrokeVertex *iVertex) { if(it != previous) curvabsc += ((*it)->point2d()-(*previous)->point2d()).norm(); - (*it)->SetCurvilinearAbscissa(curvabsc); + (*it)->setCurvilinearAbscissa(curvabsc); previous = it; } _Length = curvabsc; @@ -690,7 +690,7 @@ void Stroke::RemoveVertex(StrokeVertex *iVertex) (it!=itend); ++it) { - (*it)->SetStrokeLength(_Length); + (*it)->setStrokeLength(_Length); } } @@ -710,7 +710,7 @@ void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIte ++it) { curvabsc += ((*it)->point2d()-(*previous)->point2d()).norm(); - (*it)->SetCurvilinearAbscissa(curvabsc); + (*it)->setCurvilinearAbscissa(curvabsc); previous = it; } _Length = curvabsc; @@ -718,7 +718,7 @@ void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIte (it!=itend); ++it) { - (*it)->SetStrokeLength(_Length); + (*it)->setStrokeLength(_Length); } } diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h index a5cf51f8224..8e4e5e24a2c 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.h +++ b/source/blender/freestyle/intern/stroke/Stroke.h @@ -152,7 +152,7 @@ public: bool isAttributeAvailableVec3f(const char *iName) const ; /* modifiers */ - /*! Sets the attribute's color. + /*! sets the attribute's color. * \param r * The new R value. * \param g @@ -161,31 +161,31 @@ public: * The new B value. */ inline void setColor(float r, float g, float b) { _color[0]=r; _color[1]=g; _color[2]=b; } - /*! Sets the attribute's color. + /*! sets the attribute's color. * \param iRGB * The new RGB values. */ inline void setColor(const Vec3f& iRGB) { _color[0]=iRGB[0]; _color[1]=iRGB[1]; _color[2]=iRGB[2]; } - /*! Sets the attribute's alpha value. + /*! sets the attribute's alpha value. * \param alpha * The new alpha value. */ inline void setAlpha(float alpha) { _alpha = alpha; } - /*! Sets the attribute's thickness. + /*! sets the attribute's thickness. * \param tr * The thickness on the right of the vertex when following the stroke. * \param tl * The thickness on the left of the vertex when following the stroke. */ inline void setThickness(float tr, float tl) { _thickness[0]=tr; _thickness[1]=tl; } - /*! Sets the attribute's thickness. + /*! sets the attribute's thickness. * \param tRL * The thickness on the right and on the left of the vertex when following the stroke. */ inline void setThickness(const Vec2f& tRL) { _thickness[0]=tRL[0]; _thickness[1]=tRL[1]; } - /*! Sets the visible flag. True means visible. */ - inline void SetVisible(bool iVisible){ _visible = iVisible; } + /*! sets the visible flag. True means visible. */ + inline void setVisible(bool iVisible){ _visible = iVisible; } /*! Adds a user defined attribute of type real * If there is no attribute of name iName, it is added. @@ -295,24 +295,24 @@ public: inline float u() const {return _CurvilignAbscissa/_StrokeLength;} /* modifiers */ - /*! Sets the 2D x value */ - inline void SetX(real x) { _Point2d[0]=x; } - /*! Sets the 2D y value */ - inline void SetY(real y) { _Point2d[1]=y; } - /*! Sets the 2D x and y values */ - inline void SetPoint(real x, real y) { _Point2d[0]=x; _Point2d[1]=y;} - /*! Sets the 2D x and y values */ - inline void SetPoint(const Vec2f& p) { _Point2d[0] = p[0];_Point2d[1] = p[1];} + /*! sets the 2D x value */ + inline void setX(real x) { _Point2d[0]=x; } + /*! sets the 2D y value */ + inline void setY(real y) { _Point2d[1]=y; } + /*! sets the 2D x and y values */ + inline void setPoint(real x, real y) { _Point2d[0]=x; _Point2d[1]=y;} + /*! sets the 2D x and y values */ + inline void setPoint(const Vec2f& p) { _Point2d[0] = p[0];_Point2d[1] = p[1];} /*! Returns a reference to the ith 2D point coordinate (i=0 or 1) */ inline real& operator[](const int i) { return _Point2d[i]; } - /*! Sets the attribute. */ - inline void SetAttribute(const StrokeAttribute& iAttribute) { _Attribute = iAttribute; } - /*! Sets the curvilinear abscissa of this StrokeVertex in the Stroke */ - inline void SetCurvilinearAbscissa(float iAbscissa) {_CurvilignAbscissa = iAbscissa;} - /*! Sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't + /*! sets the attribute. */ + inline void setAttribute(const StrokeAttribute& iAttribute) { _Attribute = iAttribute; } + /*! sets the curvilinear abscissa of this StrokeVertex in the Stroke */ + inline void setCurvilinearAbscissa(float iAbscissa) {_CurvilignAbscissa = iAbscissa;} + /*! sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't * change the real Stroke's length.) */ - inline void SetStrokeLength(float iLength) {_StrokeLength = iLength;} + inline void setStrokeLength(float iLength) {_StrokeLength = iLength;} /* interface definition */ /* inherited */ @@ -502,26 +502,26 @@ public: /* modifiers */ - /*! Sets the Id of the Stroke. */ - inline void SetId(const Id& id) {_id = id;} - /*! Sets the 2D length of the Stroke. */ - void SetLength(float iLength); - /*! Sets the medium type that must be used for this Stroke. */ - inline void SetMediumType(MediumType iType) {_mediumType = iType;} - /*! Sets the texture id to be used to simulate the marks system for this Stroke. */ - inline void SetTextureId(unsigned int id) {_textureId = id;} - /*! Sets the flag telling whether this stroke is using a texture with + /*! sets the Id of the Stroke. */ + inline void setId(const Id& id) {_id = id;} + /*! sets the 2D length of the Stroke. */ + void setLength(float iLength); + /*! sets the medium type that must be used for this Stroke. */ + inline void setMediumType(MediumType iType) {_mediumType = iType;} + /*! sets the texture id to be used to simulate the marks system for this Stroke. */ + inline void setTextureId(unsigned int id) {_textureId = id;} + /*! sets the flag telling whether this stroke is using a texture with * tips or not. */ - inline void SetTips(bool iTips) {_tips = iTips;} + inline void setTips(bool iTips) {_tips = iTips;} inline void push_back(StrokeVertex* iVertex) { _Vertices.push_back(iVertex); } inline void push_front(StrokeVertex* iVertex) { _Vertices.push_front(iVertex); } inline void AddViewEdge(ViewEdge *iViewEdge) {_ViewEdges.push_back(iViewEdge);} - inline void SetBeginningOrientation(const Vec2r& iOrientation) {_extremityOrientations[0] = iOrientation;} - inline void SetBeginningOrientation(real x, real y) {_extremityOrientations[0] = Vec2r(x,y);} - inline void SetEndingOrientation(const Vec2r& iOrientation) {_extremityOrientations[1] = iOrientation;} - inline void SetEndingOrientation(real x, real y) {_extremityOrientations[1] = Vec2r(x,y);} + inline void setBeginningOrientation(const Vec2r& iOrientation) {_extremityOrientations[0] = iOrientation;} + inline void setBeginningOrientation(real x, real y) {_extremityOrientations[0] = Vec2r(x,y);} + inline void setEndingOrientation(const Vec2r& iOrientation) {_extremityOrientations[1] = iOrientation;} + inline void setEndingOrientation(real x, real y) {_extremityOrientations[1] = Vec2r(x,y);} /* Information access interface */ diff --git a/source/blender/freestyle/intern/stroke/StrokeLayer.h b/source/blender/freestyle/intern/stroke/StrokeLayer.h index b89b77a85a7..dbe9ea5a75c 100755 --- a/source/blender/freestyle/intern/stroke/StrokeLayer.h +++ b/source/blender/freestyle/intern/stroke/StrokeLayer.h @@ -67,7 +67,7 @@ public: inline bool empty() const {return _strokes.empty();} /*! modifiers */ - inline void SetStrokes(stroke_container& iStrokes) {_strokes = iStrokes;} + inline void setStrokes(stroke_container& iStrokes) {_strokes = iStrokes;} inline void AddStroke(Stroke *iStroke) {_strokes.push_back(iStroke);} }; diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.h b/source/blender/freestyle/intern/stroke/StrokeRep.h index 129769e5489..d8a8dc2d609 100755 --- a/source/blender/freestyle/intern/stroke/StrokeRep.h +++ b/source/blender/freestyle/intern/stroke/StrokeRep.h @@ -130,7 +130,7 @@ public: /*! modifiers */ inline void setMediumType(Stroke::MediumType itype) {_strokeType=itype;} - inline void SetTextureId(unsigned textureId) {_textureId = textureId;} + inline void setTextureId(unsigned textureId) {_textureId = textureId;} }; diff --git a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp index 6d0f5aa847c..279655c22b7 100755 --- a/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeTesselator.cpp @@ -36,7 +36,7 @@ LineRep* StrokeTesselator::Tesselate(Stroke *iStroke) Stroke::vertex_iterator v,vend; if(2 == iStroke->vertices_size()) { - line->SetStyle(LineRep::LINES); + line->setStyle(LineRep::LINES); v = iStroke->vertices_begin(); StrokeVertex *svA= (*v); v++; @@ -49,9 +49,9 @@ LineRep* StrokeTesselator::Tesselate(Stroke *iStroke) else { if(_overloadMaterial) - line->SetMaterial(_Material); + line->setMaterial(_Material); - line->SetStyle(LineRep::LINE_STRIP); + line->setStyle(LineRep::LINE_STRIP); for(v=iStroke->vertices_begin(), vend=iStroke->vertices_end(); v!=vend; @@ -62,7 +62,7 @@ LineRep* StrokeTesselator::Tesselate(Stroke *iStroke) line->AddVertex(V); } } - line->SetId(iStroke->getId()); + line->setId(iStroke->getId()); line->ComputeBBox(); return line; @@ -74,8 +74,8 @@ NodeGroup* StrokeTesselator::Tesselate(StrokeVertexIterator begin, StrokeVertexI NodeGroup *group = new NodeGroup; NodeShape *tshape = new NodeShape; group->AddChild(tshape); - //tshape->material().SetDiffuse(0.f, 0.f, 0.f, 1.f); - tshape->SetMaterial(_Material); + //tshape->material().setDiffuse(0.f, 0.f, 0.f, 1.f); + tshape->setMaterial(_Material); for(StrokeVertexIterator c=begin, cend=end; c!=cend; diff --git a/source/blender/freestyle/intern/stroke/StrokeTesselator.h b/source/blender/freestyle/intern/stroke/StrokeTesselator.h index 767d82d3d98..eaeb73504c9 100755 --- a/source/blender/freestyle/intern/stroke/StrokeTesselator.h +++ b/source/blender/freestyle/intern/stroke/StrokeTesselator.h @@ -38,7 +38,7 @@ class StrokeTesselator { public: - inline StrokeTesselator() {_Material.SetDiffuse(0,0,0,1);_overloadMaterial=false;} + inline StrokeTesselator() {_Material.setDiffuse(0,0,0,1);_overloadMaterial=false;} virtual ~StrokeTesselator() {} /*! Builds a line rep contained from a Stroke @@ -54,7 +54,7 @@ public: - inline void SetMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} + inline void setMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} inline const Material& material() const {return _Material;} private: diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index df94340e88a..792388b52cb 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 1.3.31 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -13,7 +13,7 @@ #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus -template class SwigValueWrapper { +template class SwigValueWrapper { T *tt; public: SwigValueWrapper() : tt(0) { } @@ -26,10 +26,6 @@ public: private: SwigValueWrapper& operator=(const SwigValueWrapper& rhs); }; - -template T SwigValueInit() { - return T(); -} #endif /* ----------------------------------------------------------------------------- @@ -39,14 +35,14 @@ template T SwigValueInit() { /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template +# if defined(__SUNPRO_CC) +# if (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -129,12 +125,6 @@ template T SwigValueInit() { # define _CRT_SECURE_NO_DEPRECATE #endif -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - - /* Python.h has to appear first */ #include @@ -148,7 +138,7 @@ template T SwigValueInit() { /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" +#define SWIG_RUNTIME_VERSION "3" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE @@ -183,7 +173,6 @@ template T SwigValueInit() { /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -324,10 +313,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { extern "C" { #endif -typedef void *(*swig_converter_func)(void *, int *); +typedef void *(*swig_converter_func)(void *); typedef struct swig_type_info *(*swig_dycast_func)(void **); -/* Structure to store information on one type */ +/* Structure to store inforomation on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ @@ -372,7 +361,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } - return (int)((l1 - f1) - (l2 - f2)); + return (l1 - f1) - (l2 - f2); } /* @@ -454,8 +443,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +SWIG_TypeCast(swig_cast_info *ty, void *ptr) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); } /* @@ -879,7 +868,7 @@ SWIG_Python_AddErrorMsg(const char* mesg) Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_SetString(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError, mesg); } } @@ -1119,14 +1108,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { /* Unpack the argument tuple */ SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); + name, (min == max ? "" : "at least "), min); return 0; } } @@ -1134,14 +1123,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); + register int l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); + name, (min == max ? "" : "at least "), min, l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); + name, (min == max ? "" : "at most "), max, l); return 0; } else { register int i; @@ -1439,7 +1428,7 @@ PySwigObject_dealloc(PyObject *v) { PySwigObject *sobj = (PySwigObject *) v; PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { + if (sobj->own) { swig_type_info *ty = sobj->ty; PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; @@ -1457,13 +1446,12 @@ PySwigObject_dealloc(PyObject *v) res = ((*meth)(mself, v)); } Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { + } else { const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } +#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); #endif + } } Py_XDECREF(next); PyObject_DEL(v); @@ -1621,11 +1609,9 @@ _PySwigObject_type(void) { (unaryfunc)0, /*nb_float*/ (unaryfunc)PySwigObject_oct, /*nb_oct*/ (unaryfunc)PySwigObject_hex, /*nb_hex*/ -#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ +#if PY_VERSION_HEX >= 0x02020000 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1968,7 +1954,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { + if (own) { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; @@ -1989,8 +1975,6 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int return SWIG_OK; } else { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { @@ -2004,15 +1988,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int if (!tc) { sobj = (PySwigObject *)sobj->next; } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } + if (ptr) *ptr = SWIG_TypeCast(tc,vptr); break; } } @@ -2022,8 +1998,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } if (sobj) { - if (own) - *own = *own | sobj->own; + if (own) *own = sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } @@ -2088,13 +2063,8 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { } if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } + if (!tc) return SWIG_ERROR; + *ptr = SWIG_TypeCast(tc,vptr); } else { *ptr = vptr; } @@ -2710,7 +2680,6 @@ namespace Swig { swig_msg += msg; } if (!PyErr_Occurred()) { - swig_msg.insert(0, ": "); PyErr_SetString(error, getMessage()); } else { SWIG_Python_AddErrorMsg(getMessage()); @@ -2805,7 +2774,7 @@ namespace Swig { class DirectorMethodException : public Swig::DirectorException { public: DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) + : DirectorException(PyExc_RuntimeError, "Swig director method error", msg) { } @@ -2838,21 +2807,33 @@ namespace Swig { # endif #endif +/* simple thread abstraction for pthreads on win32 */ #ifdef __THREAD__ -# include "pythread.h" - class Guard +# define __PTHREAD__ +# if defined(_WIN32) || defined(__WIN32__) +# define pthread_mutex_lock EnterCriticalSection +# define pthread_mutex_unlock LeaveCriticalSection +# define pthread_mutex_t CRITICAL_SECTION +# define SWIG_MUTEX_INIT(var) var +# else +# include +# define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER +# endif +#endif + +#ifdef __PTHREAD__ + struct Guard { - PyThread_type_lock & mutex_; + pthread_mutex_t *_mutex; - public: - Guard(PyThread_type_lock & mutex) : mutex_(mutex) + Guard(pthread_mutex_t &mutex) : _mutex(&mutex) { - PyThread_acquire_lock(mutex_, WAIT_LOCK); + pthread_mutex_lock(_mutex); } ~Guard() { - PyThread_release_lock(mutex_); + pthread_mutex_unlock(_mutex); } }; # define SWIG_GUARD(mutex) Guard _guard(mutex) @@ -2923,8 +2904,8 @@ namespace Swig { private: typedef std::map ownership_map; mutable ownership_map owner; -#ifdef __THREAD__ - static PyThread_type_lock swig_mutex_own; +#ifdef __PTHREAD__ + static pthread_mutex_t swig_mutex_own; #endif public: @@ -2969,8 +2950,8 @@ namespace Swig { } }; -#ifdef __THREAD__ - PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); +#ifdef __PTHREAD__ + pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_own); #endif } @@ -2982,7 +2963,7 @@ namespace Swig { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_AdjacencyIterator swig_types[0] -#define SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t swig_types[1] +#define SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t swig_types[1] #define SWIGTYPE_p_BinaryPredicate0D swig_types[2] #define SWIGTYPE_p_BinaryPredicate1D swig_types[3] #define SWIGTYPE_p_CalligraphicShader swig_types[4] @@ -3133,56 +3114,56 @@ namespace Swig { #define SWIGTYPE_p_StrokesContainer swig_types[149] #define SWIGTYPE_p_StyleModule swig_types[150] #define SWIGTYPE_p_TVertex swig_types[151] -#define SWIGTYPE_p_UnaryFunction0DT_Id_t swig_types[152] -#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t swig_types[153] -#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t swig_types[154] -#define SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t swig_types[155] -#define SWIGTYPE_p_UnaryFunction0DT_double_t swig_types[156] -#define SWIGTYPE_p_UnaryFunction0DT_float_t swig_types[157] -#define SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[158] -#define SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t swig_types[159] -#define SWIGTYPE_p_UnaryFunction0DT_void_t swig_types[160] -#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t swig_types[161] -#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t swig_types[162] -#define SWIGTYPE_p_UnaryFunction1DT_double_t swig_types[163] -#define SWIGTYPE_p_UnaryFunction1DT_float_t swig_types[164] -#define SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[165] -#define SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t swig_types[166] -#define SWIGTYPE_p_UnaryFunction1DT_void_t swig_types[167] +#define SWIGTYPE_p_UnaryFunction0DTId_t swig_types[152] +#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t swig_types[153] +#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t swig_types[154] +#define SWIGTYPE_p_UnaryFunction0DTViewShape_p_t swig_types[155] +#define SWIGTYPE_p_UnaryFunction0DTdouble_t swig_types[156] +#define SWIGTYPE_p_UnaryFunction0DTfloat_t swig_types[157] +#define SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[158] +#define SWIGTYPE_p_UnaryFunction0DTunsigned_int_t swig_types[159] +#define SWIGTYPE_p_UnaryFunction0DTvoid_t swig_types[160] +#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t swig_types[161] +#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t swig_types[162] +#define SWIGTYPE_p_UnaryFunction1DTdouble_t swig_types[163] +#define SWIGTYPE_p_UnaryFunction1DTfloat_t swig_types[164] +#define SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[165] +#define SWIGTYPE_p_UnaryFunction1DTunsigned_int_t swig_types[166] +#define SWIGTYPE_p_UnaryFunction1DTvoid_t swig_types[167] #define SWIGTYPE_p_UnaryPredicate0D swig_types[168] #define SWIGTYPE_p_UnaryPredicate1D swig_types[169] -#define SWIGTYPE_p_VecMat__HVec3T_double_t swig_types[170] -#define SWIGTYPE_p_VecMat__HVec3T_float_t swig_types[171] -#define SWIGTYPE_p_VecMat__HVec3T_int_t swig_types[172] -#define SWIGTYPE_p_VecMat__HVec3T_unsigned_int_t swig_types[173] -#define SWIGTYPE_p_VecMat__SquareMatrixT_double_2_t swig_types[174] -#define SWIGTYPE_p_VecMat__SquareMatrixT_double_3_t swig_types[175] -#define SWIGTYPE_p_VecMat__SquareMatrixT_double_4_t swig_types[176] -#define SWIGTYPE_p_VecMat__SquareMatrixT_float_2_t swig_types[177] -#define SWIGTYPE_p_VecMat__SquareMatrixT_float_3_t swig_types[178] -#define SWIGTYPE_p_VecMat__SquareMatrixT_float_4_t swig_types[179] -#define SWIGTYPE_p_VecMat__SquareMatrixT_int_2_t swig_types[180] -#define SWIGTYPE_p_VecMat__SquareMatrixT_int_3_t swig_types[181] -#define SWIGTYPE_p_VecMat__SquareMatrixT_int_4_t swig_types[182] -#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_2_t swig_types[183] -#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_3_t swig_types[184] -#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_4_t swig_types[185] -#define SWIGTYPE_p_VecMat__Vec2T_double_t swig_types[186] -#define SWIGTYPE_p_VecMat__Vec2T_float_t swig_types[187] -#define SWIGTYPE_p_VecMat__Vec2T_int_t swig_types[188] -#define SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t swig_types[189] -#define SWIGTYPE_p_VecMat__Vec3T_double_t swig_types[190] -#define SWIGTYPE_p_VecMat__Vec3T_float_t swig_types[191] -#define SWIGTYPE_p_VecMat__Vec3T_int_t swig_types[192] -#define SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t swig_types[193] -#define SWIGTYPE_p_VecMat__VecT_double_2_t swig_types[194] -#define SWIGTYPE_p_VecMat__VecT_double_3_t swig_types[195] -#define SWIGTYPE_p_VecMat__VecT_float_2_t swig_types[196] -#define SWIGTYPE_p_VecMat__VecT_float_3_t swig_types[197] -#define SWIGTYPE_p_VecMat__VecT_int_2_t swig_types[198] -#define SWIGTYPE_p_VecMat__VecT_int_3_t swig_types[199] -#define SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t swig_types[200] -#define SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t swig_types[201] +#define SWIGTYPE_p_VecMat__HVec3Tdouble_t swig_types[170] +#define SWIGTYPE_p_VecMat__HVec3Tfloat_t swig_types[171] +#define SWIGTYPE_p_VecMat__HVec3Tint_t swig_types[172] +#define SWIGTYPE_p_VecMat__HVec3Tunsigned_int_t swig_types[173] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_2_t swig_types[174] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_3_t swig_types[175] +#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_4_t swig_types[176] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_2_t swig_types[177] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_3_t swig_types[178] +#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_4_t swig_types[179] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_2_t swig_types[180] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_3_t swig_types[181] +#define SWIGTYPE_p_VecMat__SquareMatrixTint_4_t swig_types[182] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_2_t swig_types[183] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_3_t swig_types[184] +#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_4_t swig_types[185] +#define SWIGTYPE_p_VecMat__Vec2Tdouble_t swig_types[186] +#define SWIGTYPE_p_VecMat__Vec2Tfloat_t swig_types[187] +#define SWIGTYPE_p_VecMat__Vec2Tint_t swig_types[188] +#define SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t swig_types[189] +#define SWIGTYPE_p_VecMat__Vec3Tdouble_t swig_types[190] +#define SWIGTYPE_p_VecMat__Vec3Tfloat_t swig_types[191] +#define SWIGTYPE_p_VecMat__Vec3Tint_t swig_types[192] +#define SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t swig_types[193] +#define SWIGTYPE_p_VecMat__VecTdouble_2_t swig_types[194] +#define SWIGTYPE_p_VecMat__VecTdouble_3_t swig_types[195] +#define SWIGTYPE_p_VecMat__VecTfloat_2_t swig_types[196] +#define SWIGTYPE_p_VecMat__VecTfloat_3_t swig_types[197] +#define SWIGTYPE_p_VecMat__VecTint_2_t swig_types[198] +#define SWIGTYPE_p_VecMat__VecTint_3_t swig_types[199] +#define SWIGTYPE_p_VecMat__VecTunsigned_int_2_t swig_types[200] +#define SWIGTYPE_p_VecMat__VecTunsigned_int_3_t swig_types[201] #define SWIGTYPE_p_Vertex swig_types[202] #define SWIGTYPE_p_ViewEdge swig_types[203] #define SWIGTYPE_p_ViewEdgeInternal__SVertexIterator swig_types[204] @@ -3190,8 +3171,8 @@ namespace Swig { #define SWIGTYPE_p_ViewMap swig_types[206] #define SWIGTYPE_p_ViewShape swig_types[207] #define SWIGTYPE_p_ViewVertex swig_types[208] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t swig_types[209] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t swig_types[210] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t swig_types[209] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t swig_types[210] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator swig_types[211] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator swig_types[212] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator swig_types[213] @@ -3221,30 +3202,30 @@ namespace Swig { #define SWIGTYPE_p_point_iterator swig_types[237] #define SWIGTYPE_p_point_type swig_types[238] #define SWIGTYPE_p_reference swig_types[239] -#define SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t swig_types[240] +#define SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t swig_types[240] #define SWIGTYPE_p_size_type swig_types[241] #define SWIGTYPE_p_std__invalid_argument swig_types[242] -#define SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t swig_types[243] -#define SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t swig_types[244] -#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t swig_types[245] -#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type swig_types[246] -#define SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t swig_types[247] -#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t swig_types[248] -#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type swig_types[249] -#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t swig_types[250] -#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type swig_types[251] -#define SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t swig_types[252] -#define SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t swig_types[253] -#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t swig_types[254] -#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type swig_types[255] -#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t swig_types[256] -#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type swig_types[257] -#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t swig_types[258] -#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type swig_types[259] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[260] -#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type swig_types[261] -#define SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t swig_types[262] -#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[263] +#define SWIGTYPE_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t swig_types[243] +#define SWIGTYPE_p_std__pairTViewEdge_p_bool_t swig_types[244] +#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t swig_types[245] +#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type swig_types[246] +#define SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t swig_types[247] +#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t swig_types[248] +#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type swig_types[249] +#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t swig_types[250] +#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type swig_types[251] +#define SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t swig_types[252] +#define SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t swig_types[253] +#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t swig_types[254] +#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type swig_types[255] +#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t swig_types[256] +#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type swig_types[257] +#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t swig_types[258] +#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type swig_types[259] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[260] +#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[261] +#define SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t swig_types[262] +#define SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t swig_types[263] #define SWIGTYPE_p_svertices_container swig_types[264] #define SWIGTYPE_p_swig__PySwigIterator swig_types[265] #define SWIGTYPE_p_unsigned_int swig_types[266] @@ -3258,12 +3239,12 @@ namespace Swig { #define SWIGTYPE_p_viewshapes_container swig_types[274] #define SWIGTYPE_p_viewvertices_container swig_types[275] #define SWIGTYPE_p_void swig_types[276] -#define SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type swig_types[277] -#define SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type swig_types[278] -#define SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type swig_types[279] -#define SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type swig_types[280] -#define SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type swig_types[281] -#define SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type swig_types[282] +#define SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type swig_types[277] +#define SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type swig_types[278] +#define SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type swig_types[279] +#define SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type swig_types[280] +#define SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type swig_types[281] +#define SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type swig_types[282] static swig_type_info *swig_types[284]; static swig_module_info swig_module = {swig_types, 283, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) @@ -3284,7 +3265,7 @@ static swig_module_info swig_module = {swig_types, 283, 0, 0, 0, 0}; #define SWIG_name "_Freestyle" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x010331 #define SWIG_VERSION SWIGVERSION @@ -3312,9 +3293,7 @@ namespace swig { PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) { - if (initial_ref) { - Py_XINCREF(_obj); - } + if (initial_ref) Py_XINCREF(_obj); } PyObject_ptr & operator=(const PyObject_ptr& item) @@ -3462,22 +3441,17 @@ namespace swig { // C++ common/needed methods virtual PySwigIterator *copy() const = 0; - PyObject *next() + PyObject *next() { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); - incr(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; + incr(); + return obj; } PyObject *previous() { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); - PyObject *obj = value(); - SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads - return obj; + return value(); } PySwigIterator *advance(ptrdiff_t n) @@ -4560,12 +4534,12 @@ namespace swig ~PySequence_Cont() { - Py_XDECREF(_seq); + if (_seq) Py_DECREF(_seq); } size_type size() const { - return static_cast(PySequence_Size(_seq)); + return PySequence_Size(_seq); } bool empty() const @@ -4628,12 +4602,14 @@ namespace swig #include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif +#ifndef LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +#endif +#ifndef LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +#endif +#ifndef ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX #endif @@ -4701,14 +4677,7 @@ namespace swig { typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { - if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { - sequence *p; - if (SWIG_ConvertPtr(obj,(void**)&p, - swig::type_info(),0) == SWIG_OK) { - if (seq) *seq = p; - return SWIG_OLDOBJ; - } - } else if (PySequence_Check(obj)) { + if (PySequence_Check(obj)) { try { PySequence_Cont pyseq(obj); if (seq) { @@ -4727,6 +4696,13 @@ namespace swig { } return SWIG_ERROR; } + } else { + sequence *p; + if (SWIG_ConvertPtr(obj,(void**)&p, + swig::type_info(),0) == SWIG_OK) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } } return SWIG_ERROR; } @@ -4782,21 +4758,21 @@ namespace swig { namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef pointer_category category; static const char* type_name() { - return "std::vector<" "int" "," "std::allocator< int >" " >"; + return "std::vector<" "int" "," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_int_Sg____len__(std::vector const *self){ return self->size(); } @@ -4814,32 +4790,32 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } -SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_int_Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_int_Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector< int > *self,std::vector< int >::difference_type i){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector< int > const *self,std::vector< int >::difference_type i){ +SWIGINTERN std::vector::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector const *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type const &x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector *self,std::vector::value_type const &x){ self->push_back(x); } @@ -4959,11 +4935,18 @@ SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { - int r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) *val = r ? true : false; - return SWIG_OK; + if (obj == Py_True) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == Py_False) { + if (val) *val = false; + return SWIG_OK; + } else { + long v = 0; + int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0)); + if (SWIG_IsOK(res) && val) *val = v ? true : false; + return res; + } } @@ -4976,49 +4959,49 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewShape" " *," "std::allocator< ViewShape * >" " >"; + return "std::vector<" "ViewShape" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector< ViewShape * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector< ViewShape * > const *self){ +SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< ViewShape * >::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector< ViewShape * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector< ViewShape * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< ViewShape *,std::allocator< ViewShape * > > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j,std::vector< ViewShape *,std::allocator< ViewShape * > > const &v){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector< ViewShape * > *self,std::vector< ViewShape * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5031,49 +5014,49 @@ SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector< ViewShape * namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewEdge" " *," "std::allocator< ViewEdge * >" " >"; + return "std::vector<" "ViewEdge" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector< ViewEdge * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector< ViewEdge * > const *self){ +SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< ViewEdge * >::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector< ViewEdge * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector< ViewEdge * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< ViewEdge *,std::allocator< ViewEdge * > > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j,std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &v){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5086,49 +5069,49 @@ SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector< ViewEdge * > namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "FEdge" " *," "std::allocator< FEdge * >" " >"; + return "std::vector<" "FEdge" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector< FEdge * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector< FEdge * > const *self){ +SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< FEdge * >::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector< FEdge * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector< FEdge * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< FEdge *,std::allocator< FEdge * > > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j,std::vector< FEdge *,std::allocator< FEdge * > > const &v){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector< FEdge * > *self,std::vector< FEdge * >::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5141,49 +5124,49 @@ SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector< FEdge * > *self, namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewVertex" " *," "std::allocator< ViewVertex * >" " >"; + return "std::vector<" "ViewVertex" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector< ViewVertex * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector< ViewVertex * > const *self){ +SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< ViewVertex * >::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector< ViewVertex * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector< ViewVertex * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< ViewVertex *,std::allocator< ViewVertex * > > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j,std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &v){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5196,49 +5179,49 @@ SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector< ViewVertex namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "SVertex" " *," "std::allocator< SVertex * >" " >"; + return "std::vector<" "SVertex" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector< SVertex * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector< SVertex * > const *self){ +SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< SVertex * >::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector< SVertex * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector< SVertex * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< SVertex *,std::allocator< SVertex * > > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j,std::vector< SVertex *,std::allocator< SVertex * > > const &v){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector< SVertex * > *self,std::vector< SVertex * >::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5337,49 +5320,49 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "StrokeShader" " *," "std::allocator< StrokeShader * >" " >"; + return "std::vector<" "StrokeShader" " *," "std::allocator" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector< StrokeShader * > *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector< StrokeShader * > const *self){ +SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector const *self){ return !(self->empty()); } -SWIGINTERN std::vector< StrokeShader * >::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector< StrokeShader * > const *self){ +SWIGINTERN std::vector::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector const *self){ return self->size(); } -SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector< StrokeShader * > *self){ +SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector< StrokeShader *,std::allocator< StrokeShader * > > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ +SWIGINTERN std::vector > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j,std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &v){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ +SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector *self,std::vector::value_type x){ self->push_back(x); } @@ -5465,7 +5448,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -5498,7 +5481,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -5685,8 +5668,8 @@ bool SwigDirector_ViewEdgeViewEdgeIterator::operator !=(ViewEdgeInternal::ViewEd } -SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D< void >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< void > *)this, this); +SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -5748,8 +5731,8 @@ void SwigDirector_UnaryFunction0DVoid::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D< unsigned int >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< unsigned int > *)this, this); +SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -5819,8 +5802,8 @@ unsigned int SwigDirector_UnaryFunction0DUnsigned::operator ()(Interface0DIterat } -SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D< float >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< float > *)this, this); +SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -5890,8 +5873,8 @@ float SwigDirector_UnaryFunction0DFloat::operator ()(Interface0DIterator &iter) } -SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D< double >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< double > *)this, this); +SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -5961,8 +5944,8 @@ double SwigDirector_UnaryFunction0DDouble::operator ()(Interface0DIterator &iter } -SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D< Geometry::Vec2f >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec2f > *)this, this); +SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -6001,11 +5984,11 @@ std::string SwigDirector_UnaryFunction0DVec2f::getName() const { } -VecMat::Vec2< float > SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { +VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2< float > c_result; + VecMat::Vec2 c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6025,18 +6008,18 @@ VecMat::Vec2< float > SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); - return (VecMat::Vec2< float >) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); + return (VecMat::Vec2) c_result; } -SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D< Geometry::Vec3f >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec3f > *)this, this); +SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -6075,11 +6058,11 @@ std::string SwigDirector_UnaryFunction0DVec3f::getName() const { } -VecMat::Vec3< float > SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { +VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3< float > c_result; + VecMat::Vec3 c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6099,18 +6082,18 @@ VecMat::Vec3< float > SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); - return (VecMat::Vec3< float >) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); + return (VecMat::Vec3) c_result; } -SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D< Id >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D< Id > *)this, this); +SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); } @@ -6183,15 +6166,15 @@ Id SwigDirector_UnaryFunction0DId::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D< void >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D< void >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6253,15 +6236,15 @@ void SwigDirector_UnaryFunction1DVoid::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D< unsigned int >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D< unsigned int >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6331,15 +6314,15 @@ unsigned int SwigDirector_UnaryFunction1DUnsigned::operator ()(Interface1D &inte } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D< float >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D< float >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6409,15 +6392,15 @@ float SwigDirector_UnaryFunction1DFloat::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D< double >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D< double >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6487,15 +6470,15 @@ double SwigDirector_UnaryFunction1DDouble::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D< Geometry::Vec2f >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec2f >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6534,11 +6517,11 @@ std::string SwigDirector_UnaryFunction1DVec2f::getName() const { } -VecMat::Vec2< float > SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { +VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2< float > c_result; + VecMat::Vec2 c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6558,25 +6541,25 @@ VecMat::Vec2< float > SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); - return (VecMat::Vec2< float >) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); + return (VecMat::Vec2) c_result; } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D< Geometry::Vec3f >(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec3f >(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); } @@ -6615,11 +6598,11 @@ std::string SwigDirector_UnaryFunction1DVec3f::getName() const { } -VecMat::Vec3< float > SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { +VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3< float > c_result; + VecMat::Vec3 c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6639,13 +6622,13 @@ VecMat::Vec3< float > SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); - return (VecMat::Vec3< float >) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); + return (VecMat::Vec3) c_result; } @@ -6724,7 +6707,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -6757,7 +6740,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -6995,7 +6978,7 @@ ViewEdge *SwigDirector_ChainingIterator::traverse(AdjacencyIterator const &it) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7075,7 +7058,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7108,7 +7091,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7346,7 +7329,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7433,7 +7416,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7466,7 +7449,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -7704,7 +7687,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); return (ViewEdge *) c_result; } @@ -8123,7 +8106,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8153,10 +8136,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n" - " Possible C/C++ prototypes are:\n" - " incr(swig::PySwigIterator *,size_t)\n" - " incr(swig::PySwigIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n Possible C/C++ prototypes are:\n incr(size_t)\n incr()\n"); return NULL; } @@ -8240,7 +8220,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8270,10 +8250,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n" - " Possible C/C++ prototypes are:\n" - " decr(swig::PySwigIterator *,size_t)\n" - " decr(swig::PySwigIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n Possible C/C++ prototypes are:\n decr(size_t)\n decr()\n"); return NULL; } @@ -8763,7 +8740,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator___sub__(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8804,14 +8781,14 @@ fail: SWIGINTERN PyObject *PySwigIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__PySwigIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -8820,11 +8797,11 @@ SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), Py arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); result = (swig::PySwigIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -8835,19 +8812,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -8857,19 +8834,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -8879,20 +8856,20 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); try { - result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_int_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -8907,10 +8884,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; - std::vector< int >::difference_type arg3 ; - std::vector< int,std::allocator< int > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8922,29 +8899,29 @@ SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< int >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); try { - result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -8953,10 +8930,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; - std::vector< int >::difference_type arg3 ; - std::vector< int,std::allocator< int > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8970,34 +8947,34 @@ SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< int >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } try { - std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); + std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -9017,9 +8994,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; - std::vector< int >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9031,21 +9008,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< int >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); try { std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); } @@ -9062,8 +9039,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9072,16 +9049,16 @@ SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); try { std_vector_Sl_int_Sg____delitem__(arg1,arg2); } @@ -9098,9 +9075,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; - std::vector< int >::value_type *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9109,20 +9086,20 @@ SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); try { { - std::vector< int >::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector< int > const *)arg1,arg2); - result = (std::vector< int >::value_type *) &_result_ref; + std::vector::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector const *)arg1,arg2); + result = (std::vector::value_type *) &_result_ref; } } catch(std::out_of_range &_e) { @@ -9138,14 +9115,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::difference_type arg2 ; - std::vector< int >::value_type *arg3 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; - std::vector< int >::value_type temp3 ; + std::vector::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -9153,21 +9130,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< int >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - temp3 = static_cast< std::vector< int >::value_type >(val3); + temp3 = static_cast< std::vector::value_type >(val3); arg3 = &temp3; try { std_vector_Sl_int_Sg____setitem__(arg1,arg2,(int const &)*arg3); @@ -9185,27 +9162,27 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::value_type *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector< int >::value_type temp2 ; + std::vector::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - temp2 = static_cast< std::vector< int >::value_type >(val2); + temp2 = static_cast< std::vector::value_type >(val2); arg2 = &temp2; std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); resultobj = SWIG_Py_Void(); @@ -9217,11 +9194,11 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_vectorInt")) SWIG_fail; - result = (std::vector< int > *)new std::vector< int >(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector *)new std::vector(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9230,25 +9207,25 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = 0 ; - std::vector< int > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } - result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector *)new std::vector((std::vector const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -9259,19 +9236,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = (bool)((std::vector< int > const *)arg1)->empty(); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (bool)((std::vector const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -9281,19 +9258,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->size(); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -9303,17 +9280,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9324,8 +9301,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -9334,19 +9311,19 @@ SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< int > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9357,42 +9334,42 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - SwigValueWrapper< std::allocator< int > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9400,22 +9377,78 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9423,22 +9456,78 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9446,22 +9535,78 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector * >(argp1); + result = (arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9469,10 +9614,66 @@ fail: } +SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_vectorInt_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int >::size_type arg1 ; - std::vector< int > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -9480,11 +9681,11 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< int >::size_type >(val1); - result = (std::vector< int > *)new std::vector< int >(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + result = (std::vector *)new std::vector(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9493,17 +9694,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9514,8 +9715,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -9524,16 +9725,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< int >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9544,9 +9745,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::iterator arg2 ; - std::vector< int >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9555,24 +9756,24 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } result = (arg1)->erase(arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9582,10 +9783,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::iterator arg2 ; - std::vector< int >::iterator arg3 ; - std::vector< int >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9597,35 +9798,35 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } result = (arg1)->erase(arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9639,18 +9840,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_0(self, args); } @@ -9658,16 +9859,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_1(self, args); } @@ -9676,22 +9877,19 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< int > *,std::vector< int >::iterator)\n" - " erase(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int >::size_type arg1 ; - std::vector< int >::value_type *arg2 = 0 ; - std::vector< int > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type *arg2 = 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; - std::vector< int >::value_type temp2 ; + std::vector::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -9700,17 +9898,17 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"OO:new_vectorInt",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< int >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector::value_type""'"); } - temp2 = static_cast< std::vector< int >::value_type >(val2); + temp2 = static_cast< std::vector::value_type >(val2); arg2 = &temp2; - result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector *)new std::vector(arg1,(std::vector::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9723,7 +9921,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -9742,7 +9940,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_vectorInt__SWIG_1(self, args); @@ -9766,41 +9964,36 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< int >()\n" - " std::vector< int >(std::vector< int > const &)\n" - " std::vector< int >(std::vector< int >::size_type)\n" - " std::vector< int >(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n Possible C/C++ prototypes are:\n std::vector<(int)>()\n std::vector<(int)>(std::vector const &)\n std::vector<(int)>(std::vector::size_type)\n std::vector<(int)>(std::vector::size_type,std::vector::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::value_type *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector< int >::value_type temp2 ; + std::vector::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - temp2 = static_cast< std::vector< int >::value_type >(val2); + temp2 = static_cast< std::vector::value_type >(val2); arg2 = &temp2; - (arg1)->push_back((std::vector< int >::value_type const &)*arg2); + (arg1)->push_back((std::vector::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -9810,21 +10003,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::value_type *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { - std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->front(); - result = (std::vector< int >::value_type *) &_result_ref; + std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->front(); + result = (std::vector::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -9835,21 +10028,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::value_type *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { - std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->back(); - result = (std::vector< int >::value_type *) &_result_ref; + std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->back(); + result = (std::vector::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -9860,14 +10053,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type arg2 ; - std::vector< int >::value_type *arg3 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector< int >::value_type temp3 ; + std::vector::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -9875,23 +10068,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< int >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - temp3 = static_cast< std::vector< int >::value_type >(val3); + temp3 = static_cast< std::vector::value_type >(val3); arg3 = &temp3; - (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); + (arg1)->assign(arg2,(std::vector::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -9901,14 +10094,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type arg2 ; - std::vector< int >::value_type *arg3 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector< int >::value_type temp3 ; + std::vector::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -9916,23 +10109,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< int >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - temp3 = static_cast< std::vector< int >::value_type >(val3); + temp3 = static_cast< std::vector::value_type >(val3); arg3 = &temp3; - (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); + (arg1)->resize(arg2,(std::vector::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -9946,13 +10139,13 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -9966,7 +10159,7 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -9986,25 +10179,22 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< int > *,std::vector< int >::size_type)\n" - " resize(std::vector< int > *,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::iterator arg2 ; - std::vector< int >::value_type *arg3 = 0 ; - std::vector< int >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type *arg3 = 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; - std::vector< int >::value_type temp3 ; + std::vector::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10012,30 +10202,30 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - temp3 = static_cast< std::vector< int >::value_type >(val3); + temp3 = static_cast< std::vector::value_type >(val3); arg3 = &temp3; - result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), + result = (arg1)->insert(arg2,(std::vector::value_type const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -10045,17 +10235,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::iterator arg2 ; - std::vector< int >::size_type arg3 ; - std::vector< int >::value_type *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; - std::vector< int >::value_type temp4 ; + std::vector::value_type temp4 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; @@ -10064,34 +10254,34 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< int >::size_type >(val3); + arg3 = static_cast< std::vector::size_type >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - temp4 = static_cast< std::vector< int >::value_type >(val4); + temp4 = static_cast< std::vector::value_type >(val4); arg4 = &temp4; - (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4); + (arg1)->insert(arg2,arg3,(std::vector::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10105,18 +10295,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); @@ -10130,12 +10320,12 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -10155,18 +10345,15 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::value_type const &)\n" - " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type const &)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -10175,16 +10362,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< int >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -10195,19 +10382,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; - std::vector< int >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); - result = ((std::vector< int > const *)arg1)->capacity(); + arg1 = reinterpret_cast< std::vector * >(argp1); + result = ((std::vector const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -10217,17 +10404,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_vectorInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_vectorInt",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< int > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -10249,8 +10436,8 @@ fail: SWIGINTERN PyObject *vectorInt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -10391,7 +10578,7 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -10434,12 +10621,7 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n" - " Possible C/C++ prototypes are:\n" - " Id()\n" - " Id(Id::id_type)\n" - " Id(Id::id_type,Id::id_type)\n" - " Id(Id const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n Possible C/C++ prototypes are:\n Id()\n Id(Id::id_type)\n Id(Id::id_type,Id::id_type)\n Id(Id const &)\n"); return NULL; } @@ -10754,19 +10936,19 @@ fail: SWIGINTERN PyObject *Id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Id, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2u")) SWIG_fail; { try { - result = (VecMat::Vec< unsigned int,2 > *)new VecMat::Vec< unsigned int,2 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10775,7 +10957,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -10784,17 +10966,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -10821,7 +11003,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< unsigned int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10839,21 +11021,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10871,21 +11053,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10903,23 +11085,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -10929,7 +11111,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -10938,23 +11120,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -10964,7 +11146,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -10973,9 +11155,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; - VecMat::Vec< unsigned int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -10984,22 +11166,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator +((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11008,7 +11190,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11017,9 +11199,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; - VecMat::Vec< unsigned int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11028,22 +11210,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator -((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11052,7 +11234,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11061,9 +11243,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 >::value_type arg2 ; - VecMat::Vec< unsigned int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11072,19 +11254,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11093,7 +11275,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11102,9 +11284,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 >::value_type arg2 ; - VecMat::Vec< unsigned int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11113,19 +11295,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11134,7 +11316,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11143,9 +11325,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; - VecMat::Vec< unsigned int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11154,22 +11336,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11191,17 +11373,17 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2u___mul____SWIG_1(self, args); @@ -11211,7 +11393,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -11232,8 +11414,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11243,22 +11425,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11276,8 +11458,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11287,22 +11469,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11320,8 +11502,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11331,22 +11513,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator <((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11364,8 +11546,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; - VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11375,22 +11557,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator >((VecMat::Vec< unsigned int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11408,19 +11590,19 @@ fail: SWIGINTERN PyObject *Vec_2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2i")) SWIG_fail; { try { - result = (VecMat::Vec< int,2 > *)new VecMat::Vec< int,2 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11429,7 +11611,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -11438,17 +11620,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -11475,7 +11657,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11493,21 +11675,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11525,21 +11707,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11557,23 +11739,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< int,2 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< int,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11583,7 +11765,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11592,23 +11774,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< int,2 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< int,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11618,7 +11800,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11627,9 +11809,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; - VecMat::Vec< int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11638,22 +11820,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< int,2 > const *)arg1)->operator +((VecMat::Vec< int,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11662,7 +11844,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11671,9 +11853,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; - VecMat::Vec< int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11682,22 +11864,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< int,2 > const *)arg1)->operator -((VecMat::Vec< int,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11706,7 +11888,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11715,9 +11897,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 >::value_type arg2 ; - VecMat::Vec< int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11726,19 +11908,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< int,2 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11747,7 +11929,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11756,9 +11938,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 >::value_type arg2 ; - VecMat::Vec< int,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11767,19 +11949,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< int,2 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11788,7 +11970,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11797,9 +11979,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; - VecMat::Vec< int,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11808,22 +11990,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->operator *((VecMat::Vec< int,2 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11845,17 +12027,17 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2i___mul____SWIG_1(self, args); @@ -11865,7 +12047,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -11886,8 +12068,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11897,22 +12079,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator ==((VecMat::Vec< int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11930,8 +12112,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11941,22 +12123,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator !=((VecMat::Vec< int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11974,8 +12156,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11985,22 +12167,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator <((VecMat::Vec< int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12018,8 +12200,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; - VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12029,22 +12211,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator >((VecMat::Vec< int,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12062,19 +12244,19 @@ fail: SWIGINTERN PyObject *Vec_2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2d")) SWIG_fail; { try { - result = (VecMat::Vec< double,2 > *)new VecMat::Vec< double,2 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12083,7 +12265,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12092,17 +12274,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -12129,7 +12311,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< double,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12147,21 +12329,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12179,21 +12361,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12211,23 +12393,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< double,2 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< double,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12237,7 +12419,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12246,23 +12428,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< double,2 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< double,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12272,7 +12454,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12281,9 +12463,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; - VecMat::Vec< double,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12292,22 +12474,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< double,2 > const *)arg1)->operator +((VecMat::Vec< double,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12316,7 +12498,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12325,9 +12507,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; - VecMat::Vec< double,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12336,22 +12518,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< double,2 > const *)arg1)->operator -((VecMat::Vec< double,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12360,7 +12542,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12369,9 +12551,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 >::value_type arg2 ; - VecMat::Vec< double,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12380,19 +12562,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< double,2 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12401,7 +12583,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12410,9 +12592,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 >::value_type arg2 ; - VecMat::Vec< double,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12421,19 +12603,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< double,2 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12442,7 +12624,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12451,9 +12633,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; - VecMat::Vec< double,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12462,22 +12644,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->operator *((VecMat::Vec< double,2 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12499,17 +12681,17 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2d___mul____SWIG_1(self, args); @@ -12519,7 +12701,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -12540,8 +12722,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12551,22 +12733,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator ==((VecMat::Vec< double,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12584,8 +12766,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12595,22 +12777,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator !=((VecMat::Vec< double,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12628,8 +12810,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12639,22 +12821,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator <((VecMat::Vec< double,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12672,8 +12854,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; - VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12683,22 +12865,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator >((VecMat::Vec< double,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12716,19 +12898,19 @@ fail: SWIGINTERN PyObject *Vec_2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2f")) SWIG_fail; { try { - result = (VecMat::Vec< float,2 > *)new VecMat::Vec< float,2 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12737,7 +12919,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12746,17 +12928,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -12783,7 +12965,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< float,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12801,21 +12983,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12833,21 +13015,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12865,23 +13047,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< float,2 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< float,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12891,7 +13073,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12900,23 +13082,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< float,2 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< float,2 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12926,7 +13108,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12935,9 +13117,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; - VecMat::Vec< float,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12946,22 +13128,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< float,2 > const *)arg1)->operator +((VecMat::Vec< float,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12970,7 +13152,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12979,9 +13161,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; - VecMat::Vec< float,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12990,22 +13172,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< float,2 > const *)arg1)->operator -((VecMat::Vec< float,2 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13014,7 +13196,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13023,9 +13205,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 >::value_type arg2 ; - VecMat::Vec< float,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13034,19 +13216,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< float,2 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13055,7 +13237,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13064,9 +13246,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 >::value_type arg2 ; - VecMat::Vec< float,2 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13075,19 +13257,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< float,2 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13096,7 +13278,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13105,9 +13287,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; - VecMat::Vec< float,2 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13116,22 +13298,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->operator *((VecMat::Vec< float,2 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13153,17 +13335,17 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2f___mul____SWIG_1(self, args); @@ -13173,7 +13355,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -13194,8 +13376,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13205,22 +13387,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator ==((VecMat::Vec< float,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13238,8 +13420,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13249,22 +13431,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator !=((VecMat::Vec< float,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13282,8 +13464,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13293,22 +13475,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator <((VecMat::Vec< float,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13326,8 +13508,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; - VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13337,22 +13519,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator >((VecMat::Vec< float,2 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13370,19 +13552,19 @@ fail: SWIGINTERN PyObject *Vec_2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *result = 0 ; + VecMat::Vec2 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2u")) SWIG_fail; { try { - result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(); + result = (VecMat::Vec2 *)new VecMat::Vec2(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13391,7 +13573,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13400,9 +13582,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int >::value_type arg1 ; - VecMat::Vec2< unsigned int >::value_type arg2 ; - VecMat::Vec2< unsigned int > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -13413,17 +13595,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1,arg2); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13432,7 +13614,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13441,8 +13623,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int >::value_type arg1 ; - VecMat::Vec2< unsigned int > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -13450,12 +13632,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); { try { - result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13464,7 +13646,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13477,7 +13659,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -13512,32 +13694,28 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec2< unsigned int >()\n" - " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const,VecMat::Vec2< unsigned int >::value_type const)\n" - " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(unsigned int)>()\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->x(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13555,23 +13733,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13594,14 +13772,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_0(self, args); @@ -13610,7 +13788,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_1(self, args); @@ -13618,31 +13796,28 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec2< unsigned int > const *)\n" - " x(VecMat::Vec2< unsigned int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->y(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13660,23 +13835,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13699,14 +13874,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_0(self, args); @@ -13715,7 +13890,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_1(self, args); @@ -13723,18 +13898,15 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec2< unsigned int > const *)\n" - " y(VecMat::Vec2< unsigned int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13743,16 +13915,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setX(arg2); @@ -13773,8 +13945,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13783,16 +13955,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setY(arg2); @@ -13813,9 +13985,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int > *arg2 = 0 ; - VecMat::Vec2< unsigned int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13824,22 +13996,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator +((VecMat::Vec2< unsigned int > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13848,7 +14020,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13857,9 +14029,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int > *arg2 = 0 ; - VecMat::Vec2< unsigned int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13868,22 +14040,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator -((VecMat::Vec2< unsigned int > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13892,7 +14064,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13901,9 +14073,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type arg2 ; - VecMat::Vec2< unsigned int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13912,19 +14084,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13933,7 +14105,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13942,9 +14114,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int >::value_type arg2 ; - VecMat::Vec2< unsigned int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13953,19 +14125,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13974,7 +14146,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13983,9 +14155,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; - VecMat::Vec2< unsigned int > *arg2 = 0 ; - VecMat::Vec2< unsigned int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13994,22 +14166,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->operator *((VecMat::Vec2< unsigned int > const &)*arg2); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14031,17 +14203,17 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u___mul____SWIG_1(self, args); @@ -14051,7 +14223,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14072,17 +14244,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { delete arg1; @@ -14104,19 +14276,19 @@ fail: SWIGINTERN PyObject *Vec2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *result = 0 ; + VecMat::Vec2 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2i")) SWIG_fail; { try { - result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(); + result = (VecMat::Vec2 *)new VecMat::Vec2(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14125,7 +14297,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14134,9 +14306,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int >::value_type arg1 ; - VecMat::Vec2< int >::value_type arg2 ; - VecMat::Vec2< int > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -14147,17 +14319,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1,arg2); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14166,7 +14338,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14175,8 +14347,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int >::value_type arg1 ; - VecMat::Vec2< int > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -14184,12 +14356,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); { try { - result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14198,7 +14370,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14211,7 +14383,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -14246,32 +14418,28 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec2< int >()\n" - " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const,VecMat::Vec2< int >::value_type const)\n" - " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(int)>()\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->x(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14289,23 +14457,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< int >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2< int >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14328,14 +14496,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_0(self, args); @@ -14344,7 +14512,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_1(self, args); @@ -14352,31 +14520,28 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec2< int > const *)\n" - " x(VecMat::Vec2< int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->y(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14394,23 +14559,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< int >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2< int >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14433,14 +14598,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_0(self, args); @@ -14449,7 +14614,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_1(self, args); @@ -14457,18 +14622,15 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec2< int > const *)\n" - " y(VecMat::Vec2< int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14477,16 +14639,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setX(arg2); @@ -14507,8 +14669,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14517,16 +14679,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setY(arg2); @@ -14547,9 +14709,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int > *arg2 = 0 ; - VecMat::Vec2< int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14558,22 +14720,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< int > const *)arg1)->operator +((VecMat::Vec2< int > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14582,7 +14744,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14591,9 +14753,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int > *arg2 = 0 ; - VecMat::Vec2< int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14602,22 +14764,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< int > const *)arg1)->operator -((VecMat::Vec2< int > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14626,7 +14788,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14635,9 +14797,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type arg2 ; - VecMat::Vec2< int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14646,19 +14808,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< int > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14667,7 +14829,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14676,9 +14838,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int >::value_type arg2 ; - VecMat::Vec2< int > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14687,19 +14849,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< int > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14708,7 +14870,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14717,9 +14879,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; - VecMat::Vec2< int > *arg2 = 0 ; - VecMat::Vec2< int >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14728,22 +14890,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->operator *((VecMat::Vec2< int > const &)*arg2); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14765,17 +14927,17 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i___mul____SWIG_1(self, args); @@ -14785,7 +14947,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14806,17 +14968,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { delete arg1; @@ -14838,19 +15000,19 @@ fail: SWIGINTERN PyObject *Vec2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *result = 0 ; + VecMat::Vec2 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2f")) SWIG_fail; { try { - result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(); + result = (VecMat::Vec2 *)new VecMat::Vec2(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14859,7 +15021,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14868,9 +15030,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float >::value_type arg1 ; - VecMat::Vec2< float >::value_type arg2 ; - VecMat::Vec2< float > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -14881,17 +15043,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1,arg2); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14900,7 +15062,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14909,8 +15071,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float >::value_type arg1 ; - VecMat::Vec2< float > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -14918,12 +15080,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); { try { - result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14932,7 +15094,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14945,7 +15107,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -14980,32 +15142,28 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec2< float >()\n" - " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const,VecMat::Vec2< float >::value_type const)\n" - " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(float)>()\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->x(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15023,23 +15181,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< float >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2< float >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15062,14 +15220,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_0(self, args); @@ -15078,7 +15236,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_1(self, args); @@ -15086,31 +15244,28 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec2< float > const *)\n" - " x(VecMat::Vec2< float > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->y(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15128,23 +15283,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< float >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2< float >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15167,14 +15322,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_0(self, args); @@ -15183,7 +15338,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_1(self, args); @@ -15191,18 +15346,15 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec2< float > const *)\n" - " y(VecMat::Vec2< float > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15211,16 +15363,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setX(arg2); @@ -15241,8 +15393,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15251,16 +15403,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setY(arg2); @@ -15281,9 +15433,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float > *arg2 = 0 ; - VecMat::Vec2< float > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15292,22 +15444,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< float > const *)arg1)->operator +((VecMat::Vec2< float > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15316,7 +15468,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15325,9 +15477,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float > *arg2 = 0 ; - VecMat::Vec2< float > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15336,22 +15488,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< float > const *)arg1)->operator -((VecMat::Vec2< float > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15360,7 +15512,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15369,9 +15521,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type arg2 ; - VecMat::Vec2< float > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15380,19 +15532,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< float > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15401,7 +15553,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15410,9 +15562,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float >::value_type arg2 ; - VecMat::Vec2< float > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15421,19 +15573,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< float > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15442,7 +15594,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15451,9 +15603,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; - VecMat::Vec2< float > *arg2 = 0 ; - VecMat::Vec2< float >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15462,22 +15614,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->operator *((VecMat::Vec2< float > const &)*arg2); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15499,17 +15651,17 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f___mul____SWIG_1(self, args); @@ -15519,7 +15671,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -15540,17 +15692,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { delete arg1; @@ -15572,19 +15724,19 @@ fail: SWIGINTERN PyObject *Vec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *result = 0 ; + VecMat::Vec2 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2d")) SWIG_fail; { try { - result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(); + result = (VecMat::Vec2 *)new VecMat::Vec2(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15593,7 +15745,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15602,9 +15754,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double >::value_type arg1 ; - VecMat::Vec2< double >::value_type arg2 ; - VecMat::Vec2< double > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -15615,17 +15767,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1,arg2); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15634,7 +15786,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15643,8 +15795,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double >::value_type arg1 ; - VecMat::Vec2< double > *result = 0 ; + VecMat::Vec2::value_type arg1 ; + VecMat::Vec2 *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -15652,12 +15804,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); } - arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); + arg1 = static_cast< VecMat::Vec2::value_type >(val1); { try { - result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1); + result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15666,7 +15818,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15679,7 +15831,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -15714,32 +15866,28 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec2< double >()\n" - " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const,VecMat::Vec2< double >::value_type const)\n" - " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(double)>()\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->x(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15757,23 +15905,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< double >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2< double >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15796,14 +15944,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_0(self, args); @@ -15812,7 +15960,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_1(self, args); @@ -15820,31 +15968,28 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec2< double > const *)\n" - " x(VecMat::Vec2< double > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { - result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->y(); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15862,23 +16007,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type *result = 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { { - VecMat::Vec2< double >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2< double >::value_type *) &_result_ref; + VecMat::Vec2::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15901,14 +16046,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_0(self, args); @@ -15917,7 +16062,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_1(self, args); @@ -15925,18 +16070,15 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec2< double > const *)\n" - " y(VecMat::Vec2< double > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -15945,16 +16087,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setX(arg2); @@ -15975,8 +16117,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -15985,16 +16127,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { (arg1)->setY(arg2); @@ -16015,9 +16157,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double > *arg2 = 0 ; - VecMat::Vec2< double > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16026,22 +16168,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< double > const *)arg1)->operator +((VecMat::Vec2< double > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16050,7 +16192,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16059,9 +16201,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double > *arg2 = 0 ; - VecMat::Vec2< double > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16070,22 +16212,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = ((VecMat::Vec2< double > const *)arg1)->operator -((VecMat::Vec2< double > const &)*arg2); + result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16094,7 +16236,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16103,9 +16245,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type arg2 ; - VecMat::Vec2< double > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16114,19 +16256,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< double > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16135,7 +16277,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16144,9 +16286,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double >::value_type arg2 ; - VecMat::Vec2< double > result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2::value_type arg2 ; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16155,19 +16297,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); } - arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec2::value_type >(val2); { try { - result = ((VecMat::Vec2< double > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16176,7 +16318,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16185,9 +16327,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; - VecMat::Vec2< double > *arg2 = 0 ; - VecMat::Vec2< double >::value_type result; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2 *arg2 = 0 ; + VecMat::Vec2::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16196,22 +16338,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); { try { - result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->operator *((VecMat::Vec2< double > const &)*arg2); + result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16233,17 +16375,17 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d___mul____SWIG_1(self, args); @@ -16253,7 +16395,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16274,17 +16416,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); { try { delete arg1; @@ -16306,19 +16448,19 @@ fail: SWIGINTERN PyObject *Vec2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3u")) SWIG_fail; { try { - result = (VecMat::Vec< unsigned int,3 > *)new VecMat::Vec< unsigned int,3 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16327,7 +16469,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -16336,17 +16478,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -16373,7 +16515,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< unsigned int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16391,21 +16533,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16423,21 +16565,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16455,23 +16597,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16481,7 +16623,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16490,23 +16632,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16516,7 +16658,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16525,9 +16667,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; - VecMat::Vec< unsigned int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16536,22 +16678,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator +((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16560,7 +16702,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16569,9 +16711,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; - VecMat::Vec< unsigned int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16580,22 +16722,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator -((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16604,7 +16746,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16613,9 +16755,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 >::value_type arg2 ; - VecMat::Vec< unsigned int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16624,19 +16766,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16645,7 +16787,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16654,9 +16796,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 >::value_type arg2 ; - VecMat::Vec< unsigned int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16665,19 +16807,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16686,7 +16828,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16695,9 +16837,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; - VecMat::Vec< unsigned int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16706,22 +16848,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16743,17 +16885,17 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3u___mul____SWIG_1(self, args); @@ -16763,7 +16905,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16784,8 +16926,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16795,22 +16937,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16828,8 +16970,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16839,22 +16981,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16872,8 +17014,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16883,22 +17025,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator <((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16916,8 +17058,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; - VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16927,22 +17069,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator >((VecMat::Vec< unsigned int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16960,19 +17102,19 @@ fail: SWIGINTERN PyObject *Vec_3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3i")) SWIG_fail; { try { - result = (VecMat::Vec< int,3 > *)new VecMat::Vec< int,3 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16981,7 +17123,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -16990,17 +17132,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -17027,7 +17169,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17045,21 +17187,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17077,21 +17219,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17109,23 +17251,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< int,3 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< int,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17135,7 +17277,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17144,23 +17286,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< int,3 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< int,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17170,7 +17312,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17179,9 +17321,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; - VecMat::Vec< int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17190,22 +17332,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< int,3 > const *)arg1)->operator +((VecMat::Vec< int,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17214,7 +17356,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17223,9 +17365,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; - VecMat::Vec< int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17234,22 +17376,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< int,3 > const *)arg1)->operator -((VecMat::Vec< int,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17258,7 +17400,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17267,9 +17409,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 >::value_type arg2 ; - VecMat::Vec< int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17278,19 +17420,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< int,3 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17299,7 +17441,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17308,9 +17450,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 >::value_type arg2 ; - VecMat::Vec< int,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17319,19 +17461,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< int,3 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17340,7 +17482,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17349,9 +17491,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; - VecMat::Vec< int,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17360,22 +17502,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->operator *((VecMat::Vec< int,3 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17397,17 +17539,17 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3i___mul____SWIG_1(self, args); @@ -17417,7 +17559,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -17438,8 +17580,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17449,22 +17591,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator ==((VecMat::Vec< int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17482,8 +17624,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17493,22 +17635,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator !=((VecMat::Vec< int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17526,8 +17668,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17537,22 +17679,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator <((VecMat::Vec< int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17570,8 +17712,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; - VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17581,22 +17723,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator >((VecMat::Vec< int,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17614,19 +17756,19 @@ fail: SWIGINTERN PyObject *Vec_3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3d")) SWIG_fail; { try { - result = (VecMat::Vec< double,3 > *)new VecMat::Vec< double,3 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17635,7 +17777,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -17644,17 +17786,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -17681,7 +17823,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< double,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17699,21 +17841,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17731,21 +17873,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17763,23 +17905,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< double,3 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< double,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17789,7 +17931,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17798,23 +17940,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< double,3 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< double,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17824,7 +17966,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17833,9 +17975,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; - VecMat::Vec< double,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17844,22 +17986,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< double,3 > const *)arg1)->operator +((VecMat::Vec< double,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17868,7 +18010,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17877,9 +18019,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; - VecMat::Vec< double,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17888,22 +18030,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< double,3 > const *)arg1)->operator -((VecMat::Vec< double,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17912,7 +18054,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17921,9 +18063,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 >::value_type arg2 ; - VecMat::Vec< double,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -17932,19 +18074,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< double,3 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17953,7 +18095,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17962,9 +18104,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 >::value_type arg2 ; - VecMat::Vec< double,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -17973,19 +18115,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< double,3 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17994,7 +18136,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18003,9 +18145,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; - VecMat::Vec< double,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18014,22 +18156,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->operator *((VecMat::Vec< double,3 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18051,17 +18193,17 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3d___mul____SWIG_1(self, args); @@ -18071,7 +18213,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18092,8 +18234,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18103,22 +18245,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator ==((VecMat::Vec< double,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18136,8 +18278,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18147,22 +18289,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator !=((VecMat::Vec< double,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18180,8 +18322,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18191,22 +18333,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator <((VecMat::Vec< double,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18224,8 +18366,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; - VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18235,22 +18377,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator >((VecMat::Vec< double,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18268,19 +18410,19 @@ fail: SWIGINTERN PyObject *Vec_3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *result = 0 ; + VecMat::Vec *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3f")) SWIG_fail; { try { - result = (VecMat::Vec< float,3 > *)new VecMat::Vec< float,3 >(); + result = (VecMat::Vec *)new VecMat::Vec(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18289,7 +18431,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -18298,17 +18440,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { delete arg1; @@ -18335,7 +18477,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec< float,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18353,21 +18495,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->norm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18385,21 +18527,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { - result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->squareNorm(); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18417,23 +18559,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< float,3 > &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec< float,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18443,7 +18585,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18452,23 +18594,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *result = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); { try { { - VecMat::Vec< float,3 > &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec< float,3 > *) &_result_ref; + VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18478,7 +18620,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18487,9 +18629,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; - VecMat::Vec< float,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18498,22 +18640,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< float,3 > const *)arg1)->operator +((VecMat::Vec< float,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18522,7 +18664,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18531,9 +18673,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; - VecMat::Vec< float,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18542,22 +18684,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = ((VecMat::Vec< float,3 > const *)arg1)->operator -((VecMat::Vec< float,3 > const &)*arg2); + result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18566,7 +18708,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18575,9 +18717,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 >::value_type arg2 ; - VecMat::Vec< float,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18586,19 +18728,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< float,3 > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18607,7 +18749,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18616,9 +18758,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 >::value_type arg2 ; - VecMat::Vec< float,3 > result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec::value_type arg2 ; + VecMat::Vec result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18627,19 +18769,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); } - arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); + arg2 = static_cast< VecMat::Vec::value_type >(val2); { try { - result = ((VecMat::Vec< float,3 > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18648,7 +18790,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18657,9 +18799,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; - VecMat::Vec< float,3 >::value_type result; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; + VecMat::Vec::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18668,22 +18810,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->operator *((VecMat::Vec< float,3 > const &)*arg2); + result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18705,17 +18847,17 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3f___mul____SWIG_1(self, args); @@ -18725,7 +18867,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18746,8 +18888,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18757,22 +18899,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator ==((VecMat::Vec< float,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18790,8 +18932,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18801,22 +18943,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator !=((VecMat::Vec< float,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18834,8 +18976,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18845,22 +18987,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator <((VecMat::Vec< float,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18878,8 +19020,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; - VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18889,22 +19031,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec * >(argp2); { try { - result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator >((VecMat::Vec< float,3 > const &)*arg2); + result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18922,19 +19064,19 @@ fail: SWIGINTERN PyObject *Vec_3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *result = 0 ; + VecMat::Vec3 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3u")) SWIG_fail; { try { - result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(); + result = (VecMat::Vec3 *)new VecMat::Vec3(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18943,7 +19085,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -18952,10 +19094,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int >::value_type arg1 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; - VecMat::Vec3< unsigned int >::value_type arg3 ; - VecMat::Vec3< unsigned int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -18969,22 +19111,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3u",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); } - arg3 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val3); + arg3 = static_cast< VecMat::Vec3::value_type >(val3); { try { - result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2,arg3); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18993,7 +19135,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19002,9 +19144,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int >::value_type arg1 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; - VecMat::Vec3< unsigned int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -19015,17 +19157,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19034,7 +19176,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19043,8 +19185,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int >::value_type arg1 ; - VecMat::Vec3< unsigned int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -19052,12 +19194,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); { try { - result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19066,7 +19208,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19079,7 +19221,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -19136,33 +19278,28 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec3< unsigned int >()\n" - " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" - " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" - " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(unsigned int)>()\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->x(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19180,23 +19317,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19219,14 +19356,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_0(self, args); @@ -19235,7 +19372,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_1(self, args); @@ -19243,31 +19380,28 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec3< unsigned int > const *)\n" - " x(VecMat::Vec3< unsigned int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->y(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19285,23 +19419,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19324,14 +19458,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_0(self, args); @@ -19340,7 +19474,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_1(self, args); @@ -19348,31 +19482,28 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec3< unsigned int > const *)\n" - " y(VecMat::Vec3< unsigned int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->z(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19390,23 +19521,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19429,14 +19560,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_0(self, args); @@ -19445,7 +19576,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_1(self, args); @@ -19453,18 +19584,15 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n" - " Possible C/C++ prototypes are:\n" - " z(VecMat::Vec3< unsigned int > const *)\n" - " z(VecMat::Vec3< unsigned int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19473,16 +19601,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setX(arg2); @@ -19503,8 +19631,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19513,16 +19641,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setY(arg2); @@ -19543,8 +19671,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19553,16 +19681,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -19583,9 +19711,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int > *arg2 = 0 ; - VecMat::Vec3< unsigned int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19594,22 +19722,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator +((VecMat::Vec3< unsigned int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19618,7 +19746,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19627,9 +19755,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int > *arg2 = 0 ; - VecMat::Vec3< unsigned int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19638,22 +19766,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator -((VecMat::Vec3< unsigned int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19662,7 +19790,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19671,9 +19799,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; - VecMat::Vec3< unsigned int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19682,19 +19810,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19703,7 +19831,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19712,9 +19840,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int >::value_type arg2 ; - VecMat::Vec3< unsigned int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19723,19 +19851,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19744,7 +19872,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19753,9 +19881,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int > *arg2 = 0 ; - VecMat::Vec3< unsigned int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19764,22 +19892,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->operator *((VecMat::Vec3< unsigned int > const &)*arg2); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19801,17 +19929,17 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u___mul____SWIG_1(self, args); @@ -19821,7 +19949,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -19842,9 +19970,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; - VecMat::Vec3< unsigned int > *arg2 = 0 ; - VecMat::Vec3< unsigned int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19853,22 +19981,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator ^((VecMat::Vec3< unsigned int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19877,7 +20005,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19886,17 +20014,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { delete arg1; @@ -19918,19 +20046,19 @@ fail: SWIGINTERN PyObject *Vec3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *result = 0 ; + VecMat::Vec3 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3i")) SWIG_fail; { try { - result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(); + result = (VecMat::Vec3 *)new VecMat::Vec3(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19939,7 +20067,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19948,10 +20076,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int >::value_type arg1 ; - VecMat::Vec3< int >::value_type arg2 ; - VecMat::Vec3< int >::value_type arg3 ; - VecMat::Vec3< int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -19965,22 +20093,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3i",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); } - arg3 = static_cast< VecMat::Vec3< int >::value_type >(val3); + arg3 = static_cast< VecMat::Vec3::value_type >(val3); { try { - result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2,arg3); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19989,7 +20117,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19998,9 +20126,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int >::value_type arg1 ; - VecMat::Vec3< int >::value_type arg2 ; - VecMat::Vec3< int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -20011,17 +20139,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20030,7 +20158,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20039,8 +20167,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int >::value_type arg1 ; - VecMat::Vec3< int > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -20048,12 +20176,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); { try { - result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20062,7 +20190,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20075,7 +20203,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -20132,33 +20260,28 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec3< int >()\n" - " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" - " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" - " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(int)>()\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->x(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20176,23 +20299,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< int >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3< int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20215,14 +20338,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_0(self, args); @@ -20231,7 +20354,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_1(self, args); @@ -20239,31 +20362,28 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec3< int > const *)\n" - " x(VecMat::Vec3< int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->y(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20281,23 +20401,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< int >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3< int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20320,14 +20440,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_0(self, args); @@ -20336,7 +20456,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_1(self, args); @@ -20344,31 +20464,28 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec3< int > const *)\n" - " y(VecMat::Vec3< int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->z(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20386,23 +20503,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< int >::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3< int >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20425,14 +20542,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_0(self, args); @@ -20441,7 +20558,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_1(self, args); @@ -20449,18 +20566,15 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n" - " Possible C/C++ prototypes are:\n" - " z(VecMat::Vec3< int > const *)\n" - " z(VecMat::Vec3< int > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20469,16 +20583,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setX(arg2); @@ -20499,8 +20613,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20509,16 +20623,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setY(arg2); @@ -20539,8 +20653,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20549,16 +20663,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -20579,9 +20693,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int > *arg2 = 0 ; - VecMat::Vec3< int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20590,22 +20704,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< int > const *)arg1)->operator +((VecMat::Vec3< int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20614,7 +20728,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20623,9 +20737,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int > *arg2 = 0 ; - VecMat::Vec3< int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20634,22 +20748,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< int > const *)arg1)->operator -((VecMat::Vec3< int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20658,7 +20772,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20667,9 +20781,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type arg2 ; - VecMat::Vec3< int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20678,19 +20792,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< int > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20699,7 +20813,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20708,9 +20822,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int >::value_type arg2 ; - VecMat::Vec3< int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20719,19 +20833,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< int > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20740,7 +20854,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20749,9 +20863,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int > *arg2 = 0 ; - VecMat::Vec3< int >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20760,22 +20874,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->operator *((VecMat::Vec3< int > const &)*arg2); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20797,17 +20911,17 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i___mul____SWIG_1(self, args); @@ -20817,7 +20931,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -20838,9 +20952,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; - VecMat::Vec3< int > *arg2 = 0 ; - VecMat::Vec3< int > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20849,22 +20963,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< int > const *)arg1)->operator ^((VecMat::Vec3< int > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20873,7 +20987,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20882,17 +20996,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { delete arg1; @@ -20914,19 +21028,19 @@ fail: SWIGINTERN PyObject *Vec3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *result = 0 ; + VecMat::Vec3 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3f")) SWIG_fail; { try { - result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(); + result = (VecMat::Vec3 *)new VecMat::Vec3(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20935,7 +21049,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20944,10 +21058,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float >::value_type arg1 ; - VecMat::Vec3< float >::value_type arg2 ; - VecMat::Vec3< float >::value_type arg3 ; - VecMat::Vec3< float > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -20961,22 +21075,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3f",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); } - arg3 = static_cast< VecMat::Vec3< float >::value_type >(val3); + arg3 = static_cast< VecMat::Vec3::value_type >(val3); { try { - result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2,arg3); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20985,7 +21099,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20994,9 +21108,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float >::value_type arg1 ; - VecMat::Vec3< float >::value_type arg2 ; - VecMat::Vec3< float > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -21007,17 +21121,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21026,7 +21140,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21035,8 +21149,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float >::value_type arg1 ; - VecMat::Vec3< float > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -21044,12 +21158,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); { try { - result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21058,7 +21172,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21071,7 +21185,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -21128,33 +21242,28 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec3< float >()\n" - " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" - " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" - " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(float)>()\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->x(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21172,23 +21281,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< float >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3< float >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21211,14 +21320,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_0(self, args); @@ -21227,7 +21336,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_1(self, args); @@ -21235,31 +21344,28 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec3< float > const *)\n" - " x(VecMat::Vec3< float > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->y(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21277,23 +21383,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< float >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3< float >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21316,14 +21422,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_0(self, args); @@ -21332,7 +21438,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_1(self, args); @@ -21340,31 +21446,28 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec3< float > const *)\n" - " y(VecMat::Vec3< float > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->z(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21382,23 +21485,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< float >::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3< float >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21421,14 +21524,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_0(self, args); @@ -21437,7 +21540,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_1(self, args); @@ -21445,18 +21548,15 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n" - " Possible C/C++ prototypes are:\n" - " z(VecMat::Vec3< float > const *)\n" - " z(VecMat::Vec3< float > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21465,16 +21565,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setX(arg2); @@ -21495,8 +21595,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21505,16 +21605,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setY(arg2); @@ -21535,8 +21635,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21545,16 +21645,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -21575,9 +21675,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float > *arg2 = 0 ; - VecMat::Vec3< float > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21586,22 +21686,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< float > const *)arg1)->operator +((VecMat::Vec3< float > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21610,7 +21710,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21619,9 +21719,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float > *arg2 = 0 ; - VecMat::Vec3< float > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21630,22 +21730,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< float > const *)arg1)->operator -((VecMat::Vec3< float > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21654,7 +21754,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21663,9 +21763,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type arg2 ; - VecMat::Vec3< float > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21674,19 +21774,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< float > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21695,7 +21795,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21704,9 +21804,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float >::value_type arg2 ; - VecMat::Vec3< float > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21715,19 +21815,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< float > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21736,7 +21836,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21745,9 +21845,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float > *arg2 = 0 ; - VecMat::Vec3< float >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21756,22 +21856,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->operator *((VecMat::Vec3< float > const &)*arg2); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21793,17 +21893,17 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f___mul____SWIG_1(self, args); @@ -21813,7 +21913,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -21834,9 +21934,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; - VecMat::Vec3< float > *arg2 = 0 ; - VecMat::Vec3< float > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21845,22 +21945,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< float > const *)arg1)->operator ^((VecMat::Vec3< float > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21869,7 +21969,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21878,17 +21978,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { delete arg1; @@ -21910,19 +22010,19 @@ fail: SWIGINTERN PyObject *Vec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *result = 0 ; + VecMat::Vec3 *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3d")) SWIG_fail; { try { - result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(); + result = (VecMat::Vec3 *)new VecMat::Vec3(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21931,7 +22031,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21940,10 +22040,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double >::value_type arg1 ; - VecMat::Vec3< double >::value_type arg2 ; - VecMat::Vec3< double >::value_type arg3 ; - VecMat::Vec3< double > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3::value_type arg3 ; + VecMat::Vec3 *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -21957,22 +22057,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3d",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); } - arg3 = static_cast< VecMat::Vec3< double >::value_type >(val3); + arg3 = static_cast< VecMat::Vec3::value_type >(val3); { try { - result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2,arg3); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21981,7 +22081,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21990,9 +22090,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double >::value_type arg1 ; - VecMat::Vec3< double >::value_type arg2 ; - VecMat::Vec3< double > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -22003,17 +22103,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22022,7 +22122,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22031,8 +22131,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double >::value_type arg1 ; - VecMat::Vec3< double > *result = 0 ; + VecMat::Vec3::value_type arg1 ; + VecMat::Vec3 *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -22040,12 +22140,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); } - arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); + arg1 = static_cast< VecMat::Vec3::value_type >(val1); { try { - result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1); + result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22054,7 +22154,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22067,7 +22167,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -22124,33 +22224,28 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n" - " Possible C/C++ prototypes are:\n" - " VecMat::Vec3< double >()\n" - " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" - " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" - " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(double)>()\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->x(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22168,23 +22263,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< double >::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3< double >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22207,14 +22302,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_0(self, args); @@ -22223,7 +22318,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_1(self, args); @@ -22231,31 +22326,28 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n" - " Possible C/C++ prototypes are:\n" - " x(VecMat::Vec3< double > const *)\n" - " x(VecMat::Vec3< double > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->y(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22273,23 +22365,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< double >::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3< double >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22312,14 +22404,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_0(self, args); @@ -22328,7 +22420,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_1(self, args); @@ -22336,31 +22428,28 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n" - " Possible C/C++ prototypes are:\n" - " y(VecMat::Vec3< double > const *)\n" - " y(VecMat::Vec3< double > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { - result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->z(); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22378,23 +22467,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type *result = 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { { - VecMat::Vec3< double >::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3< double >::value_type *) &_result_ref; + VecMat::Vec3::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22417,14 +22506,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_0(self, args); @@ -22433,7 +22522,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_1(self, args); @@ -22441,18 +22530,15 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n" - " Possible C/C++ prototypes are:\n" - " z(VecMat::Vec3< double > const *)\n" - " z(VecMat::Vec3< double > *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22461,16 +22547,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setX(arg2); @@ -22491,8 +22577,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22501,16 +22587,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setY(arg2); @@ -22531,8 +22617,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22541,16 +22627,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -22571,9 +22657,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double > *arg2 = 0 ; - VecMat::Vec3< double > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22582,22 +22668,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< double > const *)arg1)->operator +((VecMat::Vec3< double > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22606,7 +22692,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22615,9 +22701,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double > *arg2 = 0 ; - VecMat::Vec3< double > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22626,22 +22712,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< double > const *)arg1)->operator -((VecMat::Vec3< double > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22650,7 +22736,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22659,9 +22745,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type arg2 ; - VecMat::Vec3< double > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22670,19 +22756,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< double > const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22691,7 +22777,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22700,9 +22786,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double >::value_type arg2 ; - VecMat::Vec3< double > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3::value_type arg2 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22711,19 +22797,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); } - arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); + arg2 = static_cast< VecMat::Vec3::value_type >(val2); { try { - result = ((VecMat::Vec3< double > const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22732,7 +22818,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22741,9 +22827,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double > *arg2 = 0 ; - VecMat::Vec3< double >::value_type result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22752,22 +22838,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->operator *((VecMat::Vec3< double > const &)*arg2); + result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22789,17 +22875,17 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d___mul____SWIG_1(self, args); @@ -22809,7 +22895,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -22830,9 +22916,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; - VecMat::Vec3< double > *arg2 = 0 ; - VecMat::Vec3< double > result; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3 *arg2 = 0 ; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22841,22 +22927,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); { try { - result = ((VecMat::Vec3< double > const *)arg1)->operator ^((VecMat::Vec3< double > const &)*arg2); + result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22865,7 +22951,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22874,17 +22960,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); { try { delete arg1; @@ -22906,8 +22992,8 @@ fail: SWIGINTERN PyObject *Vec3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23099,7 +23185,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23165,10 +23251,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n" - " Possible C/C++ prototypes are:\n" - " turbulence1(Noise *,float,float,float,unsigned int)\n" - " turbulence1(Noise *,float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n Possible C/C++ prototypes are:\n turbulence1(float,float,float,unsigned int)\n turbulence1(float,float,float)\n"); return NULL; } @@ -23203,7 +23286,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23270,7 +23353,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23312,7 +23395,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23323,7 +23406,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23349,7 +23432,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23376,10 +23459,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n" - " Possible C/C++ prototypes are:\n" - " turbulence2(Noise *,Geometry::Vec2f &,float,float,unsigned int)\n" - " turbulence2(Noise *,Geometry::Vec2f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n Possible C/C++ prototypes are:\n turbulence2(Geometry::Vec2f &,float,float,unsigned int)\n turbulence2(Geometry::Vec2f &,float,float)\n"); return NULL; } @@ -23414,7 +23494,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23481,7 +23561,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23523,7 +23603,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23534,7 +23614,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23560,7 +23640,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23587,10 +23667,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n" - " Possible C/C++ prototypes are:\n" - " turbulence3(Noise *,Geometry::Vec3f &,float,float,unsigned int)\n" - " turbulence3(Noise *,Geometry::Vec3f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n Possible C/C++ prototypes are:\n turbulence3(Geometry::Vec3f &,float,float,unsigned int)\n turbulence3(Geometry::Vec3f &,float,float)\n"); return NULL; } @@ -23654,7 +23731,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23698,7 +23775,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23726,7 +23803,7 @@ fail: SWIGINTERN PyObject *Noise_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Noise, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23863,7 +23940,7 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23910,11 +23987,7 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n" - " Possible C/C++ prototypes are:\n" - " Material()\n" - " Material(float const *,float const *,float const *,float const *,float const)\n" - " Material(Material const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n Possible C/C++ prototypes are:\n Material()\n Material(float const *,float const *,float const *,float const *,float const)\n Material(Material const &)\n"); return NULL; } @@ -24623,7 +24696,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Material_SetDiffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Material_setDiffuse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Material *arg1 = (Material *) 0 ; float arg2 ; @@ -24646,35 +24719,35 @@ SWIGINTERN PyObject *_wrap_Material_SetDiffuse(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetDiffuse",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_setDiffuse",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetDiffuse" "', argument " "1"" of type '" "Material *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_setDiffuse" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetDiffuse" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_setDiffuse" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetDiffuse" "', argument " "3"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_setDiffuse" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); ecode4 = SWIG_AsVal_float(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetDiffuse" "', argument " "4"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_setDiffuse" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); ecode5 = SWIG_AsVal_float(obj4, &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetDiffuse" "', argument " "5"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_setDiffuse" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); { try { - (arg1)->SetDiffuse(arg2,arg3,arg4,arg5); + (arg1)->setDiffuse(arg2,arg3,arg4,arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -24690,7 +24763,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Material_SetSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Material_setSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Material *arg1 = (Material *) 0 ; float arg2 ; @@ -24713,35 +24786,35 @@ SWIGINTERN PyObject *_wrap_Material_SetSpecular(PyObject *SWIGUNUSEDPARM(self), PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetSpecular",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_setSpecular",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetSpecular" "', argument " "1"" of type '" "Material *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_setSpecular" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetSpecular" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_setSpecular" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetSpecular" "', argument " "3"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_setSpecular" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); ecode4 = SWIG_AsVal_float(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetSpecular" "', argument " "4"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_setSpecular" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); ecode5 = SWIG_AsVal_float(obj4, &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetSpecular" "', argument " "5"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_setSpecular" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); { try { - (arg1)->SetSpecular(arg2,arg3,arg4,arg5); + (arg1)->setSpecular(arg2,arg3,arg4,arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -24757,7 +24830,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Material_SetAmbient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Material_setAmbient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Material *arg1 = (Material *) 0 ; float arg2 ; @@ -24780,35 +24853,35 @@ SWIGINTERN PyObject *_wrap_Material_SetAmbient(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetAmbient",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_setAmbient",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetAmbient" "', argument " "1"" of type '" "Material *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_setAmbient" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetAmbient" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_setAmbient" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetAmbient" "', argument " "3"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_setAmbient" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); ecode4 = SWIG_AsVal_float(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetAmbient" "', argument " "4"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_setAmbient" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); ecode5 = SWIG_AsVal_float(obj4, &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetAmbient" "', argument " "5"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_setAmbient" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); { try { - (arg1)->SetAmbient(arg2,arg3,arg4,arg5); + (arg1)->setAmbient(arg2,arg3,arg4,arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -24824,7 +24897,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Material_SetEmission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Material_setEmission(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Material *arg1 = (Material *) 0 ; float arg2 ; @@ -24847,35 +24920,35 @@ SWIGINTERN PyObject *_wrap_Material_SetEmission(PyObject *SWIGUNUSEDPARM(self), PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_SetEmission",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOOOO:Material_setEmission",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetEmission" "', argument " "1"" of type '" "Material *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_setEmission" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetEmission" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_setEmission" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_SetEmission" "', argument " "3"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Material_setEmission" "', argument " "3"" of type '" "float""'"); } arg3 = static_cast< float >(val3); ecode4 = SWIG_AsVal_float(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_SetEmission" "', argument " "4"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Material_setEmission" "', argument " "4"" of type '" "float""'"); } arg4 = static_cast< float >(val4); ecode5 = SWIG_AsVal_float(obj4, &val5); if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_SetEmission" "', argument " "5"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Material_setEmission" "', argument " "5"" of type '" "float""'"); } arg5 = static_cast< float >(val5); { try { - (arg1)->SetEmission(arg2,arg3,arg4,arg5); + (arg1)->setEmission(arg2,arg3,arg4,arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -24891,7 +24964,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Material_SetShininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Material_setShininess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Material *arg1 = (Material *) 0 ; float arg2 ; @@ -24902,20 +24975,20 @@ SWIGINTERN PyObject *_wrap_Material_SetShininess(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Material_SetShininess",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Material_setShininess",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Material, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_SetShininess" "', argument " "1"" of type '" "Material *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Material_setShininess" "', argument " "1"" of type '" "Material *""'"); } arg1 = reinterpret_cast< Material * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_SetShininess" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Material_setShininess" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetShininess(arg2); + (arg1)->setShininess(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -25021,18 +25094,18 @@ fail: SWIGINTERN PyObject *Material_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Material, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN int Swig_var_POINT_set(PyObject *) { +SWIGINTERN int POINT_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable POINT is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_POINT_get(void) { +SWIGINTERN PyObject *POINT_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::POINT)); @@ -25040,13 +25113,13 @@ SWIGINTERN PyObject *Swig_var_POINT_get(void) { } -SWIGINTERN int Swig_var_S_VERTEX_set(PyObject *) { +SWIGINTERN int S_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable S_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_S_VERTEX_get(void) { +SWIGINTERN PyObject *S_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::S_VERTEX)); @@ -25054,13 +25127,13 @@ SWIGINTERN PyObject *Swig_var_S_VERTEX_get(void) { } -SWIGINTERN int Swig_var_VIEW_VERTEX_set(PyObject *) { +SWIGINTERN int VIEW_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VIEW_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_VIEW_VERTEX_get(void) { +SWIGINTERN PyObject *VIEW_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VIEW_VERTEX)); @@ -25068,13 +25141,13 @@ SWIGINTERN PyObject *Swig_var_VIEW_VERTEX_get(void) { } -SWIGINTERN int Swig_var_NON_T_VERTEX_set(PyObject *) { +SWIGINTERN int NON_T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NON_T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_NON_T_VERTEX_get(void) { +SWIGINTERN PyObject *NON_T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NON_T_VERTEX)); @@ -25082,13 +25155,13 @@ SWIGINTERN PyObject *Swig_var_NON_T_VERTEX_get(void) { } -SWIGINTERN int Swig_var_T_VERTEX_set(PyObject *) { +SWIGINTERN int T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_T_VERTEX_get(void) { +SWIGINTERN PyObject *T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::T_VERTEX)); @@ -25096,13 +25169,13 @@ SWIGINTERN PyObject *Swig_var_T_VERTEX_get(void) { } -SWIGINTERN int Swig_var_CUSP_set(PyObject *) { +SWIGINTERN int CUSP_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CUSP is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_CUSP_get(void) { +SWIGINTERN PyObject *CUSP_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CUSP)); @@ -25110,13 +25183,13 @@ SWIGINTERN PyObject *Swig_var_CUSP_get(void) { } -SWIGINTERN int Swig_var_NO_FEATURE_set(PyObject *) { +SWIGINTERN int NO_FEATURE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NO_FEATURE is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_NO_FEATURE_get(void) { +SWIGINTERN PyObject *NO_FEATURE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NO_FEATURE)); @@ -25124,13 +25197,13 @@ SWIGINTERN PyObject *Swig_var_NO_FEATURE_get(void) { } -SWIGINTERN int Swig_var_SILHOUETTE_set(PyObject *) { +SWIGINTERN int SILHOUETTE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SILHOUETTE is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_SILHOUETTE_get(void) { +SWIGINTERN PyObject *SILHOUETTE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SILHOUETTE)); @@ -25138,13 +25211,13 @@ SWIGINTERN PyObject *Swig_var_SILHOUETTE_get(void) { } -SWIGINTERN int Swig_var_BORDER_set(PyObject *) { +SWIGINTERN int BORDER_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable BORDER is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_BORDER_get(void) { +SWIGINTERN PyObject *BORDER_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::BORDER)); @@ -25152,13 +25225,13 @@ SWIGINTERN PyObject *Swig_var_BORDER_get(void) { } -SWIGINTERN int Swig_var_CREASE_set(PyObject *) { +SWIGINTERN int CREASE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CREASE is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_CREASE_get(void) { +SWIGINTERN PyObject *CREASE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CREASE)); @@ -25166,13 +25239,13 @@ SWIGINTERN PyObject *Swig_var_CREASE_get(void) { } -SWIGINTERN int Swig_var_RIDGE_set(PyObject *) { +SWIGINTERN int RIDGE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable RIDGE is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_RIDGE_get(void) { +SWIGINTERN PyObject *RIDGE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::RIDGE)); @@ -25180,13 +25253,13 @@ SWIGINTERN PyObject *Swig_var_RIDGE_get(void) { } -SWIGINTERN int Swig_var_VALLEY_set(PyObject *) { +SWIGINTERN int VALLEY_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VALLEY is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_VALLEY_get(void) { +SWIGINTERN PyObject *VALLEY_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VALLEY)); @@ -25194,13 +25267,13 @@ SWIGINTERN PyObject *Swig_var_VALLEY_get(void) { } -SWIGINTERN int Swig_var_SUGGESTIVE_CONTOUR_set(PyObject *) { +SWIGINTERN int SUGGESTIVE_CONTOUR_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SUGGESTIVE_CONTOUR is read-only."); return 1; } -SWIGINTERN PyObject *Swig_var_SUGGESTIVE_CONTOUR_get(void) { +SWIGINTERN PyObject *SUGGESTIVE_CONTOUR_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SUGGESTIVE_CONTOUR)); @@ -25393,7 +25466,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25521,7 +25594,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25789,7 +25862,7 @@ fail: SWIGINTERN PyObject *Interface0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26356,7 +26429,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint3D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26484,7 +26557,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint2D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26729,7 +26802,7 @@ fail: SWIGINTERN PyObject *Interface0DIteratorNested_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIteratorNested, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26830,7 +26903,7 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -26856,11 +26929,7 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n" - " Possible C/C++ prototypes are:\n" - " Interface0DIterator(Interface0DIteratorNested *)\n" - " Interface0DIterator()\n" - " Interface0DIterator(Interface0DIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n Possible C/C++ prototypes are:\n Interface0DIterator(Interface0DIteratorNested *)\n Interface0DIterator()\n Interface0DIterator(Interface0DIterator const &)\n"); return NULL; } @@ -27395,7 +27464,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27523,7 +27592,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27768,11 +27837,34 @@ fail: SWIGINTERN PyObject *Interface0DIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } +SWIGINTERN PyObject *_wrap_new_Interface1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Interface1D *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Interface1D")) SWIG_fail; + { + try { + result = (Interface1D *)new Interface1D(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Interface1D, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_delete_Interface1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Interface1D *arg1 = (Interface1D *) 0 ; @@ -27980,7 +28072,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28010,10 +28102,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(Interface1D *,float)\n" - " pointsBegin(Interface1D *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -28097,7 +28186,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28127,10 +28216,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(Interface1D *,float)\n" - " pointsEnd(Interface1D *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } @@ -28305,14 +28391,14 @@ fail: SWIGINTERN PyObject *Interface1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28331,14 +28417,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateUnsigned",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28372,7 +28458,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se arg4 = static_cast< IntegrationType >(val4); { try { - result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3,arg4); + result = (unsigned int)integrate(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28390,7 +28476,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; unsigned int result; @@ -28405,14 +28491,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateUnsigned",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28441,7 +28527,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se } { try { - result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3); + result = (unsigned int)integrate(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28463,14 +28549,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28487,7 +28573,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28509,17 +28595,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n" - " Possible C/C++ prototypes are:\n" - " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" - " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n Possible C/C++ prototypes are:\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28538,14 +28621,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateFloat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28579,7 +28662,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) arg4 = static_cast< IntegrationType >(val4); { try { - result = (float)integrate< float >(*arg1,arg2,arg3,arg4); + result = (float)integrate(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28597,7 +28680,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; float result; @@ -28612,14 +28695,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateFloat",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28648,7 +28731,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) } { try { - result = (float)integrate< float >(*arg1,arg2,arg3); + result = (float)integrate(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28670,14 +28753,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28694,7 +28777,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28716,17 +28799,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n" - " Possible C/C++ prototypes are:\n" - " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" - " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n Possible C/C++ prototypes are:\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28745,14 +28825,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28786,7 +28866,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self arg4 = static_cast< IntegrationType >(val4); { try { - result = (double)integrate< double >(*arg1,arg2,arg3,arg4); + result = (double)integrate(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28804,7 +28884,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; double result; @@ -28819,14 +28899,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateDouble",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28855,7 +28935,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self } { try { - result = (double)integrate< double >(*arg1,arg2,arg3); + result = (double)integrate(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28877,14 +28957,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28901,7 +28981,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28923,10 +29003,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n" - " Possible C/C++ prototypes are:\n" - " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" - " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n Possible C/C++ prototypes are:\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } @@ -29084,7 +29161,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29212,7 +29289,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29542,7 +29619,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_SVertex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVertex" "', argument " "1"" of type '" "Geometry::Vec3r const &""'"); } @@ -29617,7 +29694,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -29635,7 +29712,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } if (argc == 2) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Id, 0); @@ -29647,11 +29724,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n" - " Possible C/C++ prototypes are:\n" - " SVertex()\n" - " SVertex(Geometry::Vec3r const &,Id const &)\n" - " SVertex(SVertex &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n Possible C/C++ prototypes are:\n SVertex()\n SVertex(Geometry::Vec3r const &,Id const &)\n SVertex(SVertex &)\n"); return NULL; } @@ -29792,7 +29865,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29827,7 +29900,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29837,7 +29910,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - SwigValueWrapper< set< VecMat::Vec3< double > > > result; + SwigValueWrapper > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29859,7 +29932,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29901,7 +29974,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29915,8 +29988,8 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje { try { { - std::vector< FEdge * > const &_result_ref = (arg1)->fedges(); - result = (std::vector< FEdge * > *) &_result_ref; + std::vector const &_result_ref = (arg1)->fedges(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -29926,7 +29999,7 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30093,7 +30166,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -30104,23 +30177,23 @@ SWIGINTERN PyObject *_wrap_SVertex_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetPoint3D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setPoint3D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint3D" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setPoint3D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + (arg1)->setPoint3D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30136,7 +30209,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -30147,23 +30220,23 @@ SWIGINTERN PyObject *_wrap_SVertex_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetPoint2D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setPoint2D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetPoint2D" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setPoint2D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + (arg1)->setPoint2D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30196,7 +30269,7 @@ SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_AddNormal" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30352,7 +30425,7 @@ SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(se } arg1 = reinterpret_cast< SVertex * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -30439,14 +30512,14 @@ SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_SVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; Id *arg2 = 0 ; @@ -30457,23 +30530,23 @@ SWIGINTERN PyObject *_wrap_SVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetId" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setId" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (arg1)->SetId((Id const &)*arg2); + (arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30489,10 +30562,10 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector< FEdge * > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -30500,23 +30573,23 @@ SWIGINTERN PyObject *_wrap_SVertex_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetFEdges",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setFEdges",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetFEdges" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setFEdges" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { - (arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); + (arg1)->setFEdges((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30532,7 +30605,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; SShape *arg2 = (SShape *) 0 ; @@ -30543,20 +30616,20 @@ SWIGINTERN PyObject *_wrap_SVertex_SetShape(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetShape" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setShape" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetShape" "', argument " "2"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setShape" "', argument " "2"" of type '" "SShape *""'"); } arg2 = reinterpret_cast< SShape * >(argp2); { try { - (arg1)->SetShape(arg2); + (arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30572,7 +30645,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SVertex_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVertex_setViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -30583,20 +30656,20 @@ SWIGINTERN PyObject *_wrap_SVertex_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_SetViewVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SVertex_setViewVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_SetViewVertex" "', argument " "1"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setViewVertex" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (arg1)->SetViewVertex(arg2); + (arg1)->setViewVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30761,7 +30834,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30796,7 +30869,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30828,7 +30901,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30905,7 +30978,7 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -30929,10 +31002,7 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n" - " Possible C/C++ prototypes are:\n" - " shape(SVertex *)\n" - " shape(SVertex const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); return NULL; } @@ -31262,7 +31332,7 @@ fail: SWIGINTERN PyObject *SVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -31519,7 +31589,7 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -31551,11 +31621,7 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n" - " Possible C/C++ prototypes are:\n" - " FEdge()\n" - " FEdge(SVertex *,SVertex *)\n" - " FEdge(FEdge &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n Possible C/C++ prototypes are:\n FEdge()\n FEdge(SVertex *,SVertex *)\n FEdge(FEdge &)\n"); return NULL; } @@ -31905,7 +31971,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -31937,7 +32003,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32007,7 +32073,7 @@ SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -32078,7 +32144,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetVertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setVertexA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -32089,20 +32155,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetVertexA(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetVertexA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setVertexA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetVertexA" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setVertexA" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetVertexA" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setVertexA" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetVertexA(arg2); + (arg1)->setVertexA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32118,7 +32184,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetVertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setVertexB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -32129,20 +32195,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetVertexB(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetVertexB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setVertexB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetVertexB" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setVertexB" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetVertexB" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setVertexB" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetVertexB(arg2); + (arg1)->setVertexB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32158,7 +32224,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; Id *arg2 = 0 ; @@ -32169,23 +32235,23 @@ SWIGINTERN PyObject *_wrap_FEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetId" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setId" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (arg1)->SetId((Id const &)*arg2); + (arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32201,7 +32267,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetNextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setNextEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -32212,20 +32278,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetNextEdge(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetNextEdge",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setNextEdge",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetNextEdge" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setNextEdge" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetNextEdge" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setNextEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (arg1)->SetNextEdge(arg2); + (arg1)->setNextEdge(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32241,7 +32307,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -32252,20 +32318,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetPreviousEdge(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetPreviousEdge",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setPreviousEdge",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetPreviousEdge" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setPreviousEdge" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetPreviousEdge" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setPreviousEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (arg1)->SetPreviousEdge(arg2); + (arg1)->setPreviousEdge(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32281,7 +32347,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; Nature::EdgeNature arg2 ; @@ -32292,20 +32358,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetNature",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setNature",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetNature" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setNature" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_setNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); } arg2 = static_cast< Nature::EdgeNature >(val2); { try { - (arg1)->SetNature(arg2); + (arg1)->setNature(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32321,7 +32387,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -32332,20 +32398,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetViewEdge(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetViewEdge",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setViewEdge",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetViewEdge" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setViewEdge" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setViewEdge" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); { try { - (arg1)->SetViewEdge(arg2); + (arg1)->setViewEdge(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32361,7 +32427,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetaFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setaFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; Polygon3r *arg2 = 0 ; @@ -32372,23 +32438,23 @@ SWIGINTERN PyObject *_wrap_FEdge_SetaFace(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetaFace",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setaFace",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetaFace" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setaFace" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Polygon3r, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetaFace" "', argument " "2"" of type '" "Polygon3r &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setaFace" "', argument " "2"" of type '" "Polygon3r &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetaFace" "', argument " "2"" of type '" "Polygon3r &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_setaFace" "', argument " "2"" of type '" "Polygon3r &""'"); } arg2 = reinterpret_cast< Polygon3r * >(argp2); { try { - (arg1)->SetaFace(*arg2); + (arg1)->setaFace(*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32404,7 +32470,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setOccludeeIntersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -32415,23 +32481,23 @@ SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeIntersection(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetOccludeeIntersection",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setOccludeeIntersection",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_SetOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_SetOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdge_setOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetOccludeeIntersection((Geometry::Vec3r const &)*arg2); + (arg1)->setOccludeeIntersection((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32447,7 +32513,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; bool arg2 ; @@ -32458,20 +32524,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetOccludeeEmpty(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetOccludeeEmpty",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setOccludeeEmpty",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetOccludeeEmpty" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setOccludeeEmpty" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetOccludeeEmpty" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_setOccludeeEmpty" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); { try { - (arg1)->SetOccludeeEmpty(arg2); + (arg1)->setOccludeeEmpty(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32487,7 +32553,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdge_SetSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdge_setSmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdge *arg1 = (FEdge *) 0 ; bool arg2 ; @@ -32498,20 +32564,20 @@ SWIGINTERN PyObject *_wrap_FEdge_SetSmooth(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_SetSmooth",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdge_setSmooth",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_SetSmooth" "', argument " "1"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setSmooth" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_SetSmooth" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdge_setSmooth" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); { try { - (arg1)->SetSmooth(arg2); + (arg1)->setSmooth(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -32702,7 +32768,7 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -32726,10 +32792,7 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n" - " Possible C/C++ prototypes are:\n" - " shape(FEdge *)\n" - " shape(FEdge const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); return NULL; } @@ -33114,7 +33177,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33146,7 +33209,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33296,7 +33359,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33326,10 +33389,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(FEdge *,float)\n" - " pointsBegin(FEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -33413,7 +33473,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33443,17 +33503,14 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(FEdge *,float)\n" - " pointsEnd(FEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } SWIGINTERN PyObject *FEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -33563,7 +33620,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33594,11 +33651,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n" - " Possible C/C++ prototypes are:\n" - " FEdgeInternal::SVertexIterator()\n" - " FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n" - " FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n FEdgeInternal::SVertexIterator()\n FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); return NULL; } @@ -34121,7 +34174,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34249,7 +34302,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34603,7 +34656,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34638,7 +34691,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34648,7 +34701,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper< set< VecMat::Vec3< double > > > result; + SwigValueWrapper > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34670,7 +34723,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34712,7 +34765,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34726,8 +34779,8 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( { try { { - std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); - result = (std::vector< FEdge * > *) &_result_ref; + std::vector const &_result_ref = (*arg1)->fedges(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -34737,7 +34790,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34878,7 +34931,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -34902,10 +34955,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n" - " Possible C/C++ prototypes are:\n" - " shape(FEdgeInternal::SVertexIterator *)\n" - " shape(FEdgeInternal::SVertexIterator const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); return NULL; } @@ -34974,7 +35024,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -34985,23 +35035,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDP PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetPoint3D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setPoint3D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (*arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + (*arg1)->setPoint3D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35017,7 +35067,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -35028,23 +35078,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDP PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetPoint2D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setPoint2D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (*arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + (*arg1)->setPoint2D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35077,7 +35127,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35233,7 +35283,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setDirectionFredo(PyObject *SWIG } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -35320,14 +35370,14 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; Id *arg2 = 0 ; @@ -35338,23 +35388,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPARM(s PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetId" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setId" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (*arg1)->SetId((Id const &)*arg2); + (*arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35370,10 +35420,10 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector< FEdge * > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -35381,23 +35431,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPA PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetFEdges",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setFEdges",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { - (*arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); + (*arg1)->setFEdges((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35413,7 +35463,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; SShape *arg2 = (SShape *) 0 ; @@ -35424,20 +35474,20 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetShape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setShape" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetShape" "', argument " "2"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setShape" "', argument " "2"" of type '" "SShape *""'"); } arg2 = reinterpret_cast< SShape * >(argp2); { try { - (*arg1)->SetShape(arg2); + (*arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35453,7 +35503,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -35464,20 +35514,20 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_SetViewVertex(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_SetViewVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSVertexIterator_setViewVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_SetViewVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setViewVertex" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetViewVertex(arg2); + (*arg1)->setViewVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35642,7 +35692,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35677,7 +35727,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35709,7 +35759,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -36073,7 +36123,7 @@ fail: SWIGINTERN PyObject *FEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36183,7 +36233,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36215,11 +36265,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n" - " Possible C/C++ prototypes are:\n" - " FEdgeSharp()\n" - " FEdgeSharp(SVertex *,SVertex *)\n" - " FEdgeSharp(FEdgeSharp &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n Possible C/C++ prototypes are:\n FEdgeSharp()\n FEdgeSharp(SVertex *,SVertex *)\n FEdgeSharp(FEdgeSharp &)\n"); return NULL; } @@ -36316,7 +36362,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36351,7 +36397,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36492,7 +36538,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSharp_setNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -36503,23 +36549,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetNormalA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_setNormalA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setNormalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_setNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_SetNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_setNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetNormalA((Geometry::Vec3r const &)*arg2); + (arg1)->setNormalA((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36535,7 +36581,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSharp_setNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -36546,23 +36592,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetNormalB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_setNormalB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetNormalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setNormalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_SetNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_setNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_SetNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSharp_setNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetNormalB((Geometry::Vec3r const &)*arg2); + (arg1)->setNormalB((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36578,7 +36624,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSharp_setaMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; unsigned int arg2 ; @@ -36589,20 +36635,20 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetaMaterialIndex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_setaMaterialIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetaMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setaMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_SetaMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_setaMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); { try { - (arg1)->SetaMaterialIndex(arg2); + (arg1)->setaMaterialIndex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36618,7 +36664,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSharp_setbMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSharp *arg1 = (FEdgeSharp *) 0 ; unsigned int arg2 ; @@ -36629,20 +36675,20 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_SetbMaterialIndex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSharp_setbMaterialIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSharp, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_SetbMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setbMaterialIndex" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_SetbMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSharp_setbMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); { try { - (arg1)->SetbMaterialIndex(arg2); + (arg1)->setbMaterialIndex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -36660,7 +36706,7 @@ fail: SWIGINTERN PyObject *FEdgeSharp_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSharp, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36770,7 +36816,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36802,11 +36848,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n" - " Possible C/C++ prototypes are:\n" - " FEdgeSmooth()\n" - " FEdgeSmooth(SVertex *,SVertex *)\n" - " FEdgeSmooth(FEdgeSmooth &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n Possible C/C++ prototypes are:\n FEdgeSmooth()\n FEdgeSmooth(SVertex *,SVertex *)\n FEdgeSmooth(FEdgeSmooth &)\n"); return NULL; } @@ -36935,7 +36977,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37009,7 +37051,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSmooth_setFace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; void *arg2 = (void *) 0 ; @@ -37019,19 +37061,19 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetFace",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_setFace",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetFace" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_setFace" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_SetFace" "', argument " "2"" of type '" "void *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_setFace" "', argument " "2"" of type '" "void *""'"); } { try { - (arg1)->SetFace(arg2); + (arg1)->setFace(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37047,7 +37089,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSmooth_setNormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -37058,23 +37100,23 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetNormal",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_setNormal",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetNormal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_setNormal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_SetNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_setNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSmooth_SetNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSmooth_setNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (arg1)->SetNormal((Geometry::Vec3r const &)*arg2); + (arg1)->setNormal((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37090,7 +37132,7 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgeSmooth_setMaterialIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeSmooth *arg1 = (FEdgeSmooth *) 0 ; unsigned int arg2 ; @@ -37101,20 +37143,20 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_SetMaterialIndex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:FEdgeSmooth_setMaterialIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FEdgeSmooth, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_SetMaterialIndex" "', argument " "1"" of type '" "FEdgeSmooth *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_setMaterialIndex" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSmooth_SetMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgeSmooth_setMaterialIndex" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); { try { - (arg1)->SetMaterialIndex(arg2); + (arg1)->setMaterialIndex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37132,7 +37174,7 @@ fail: SWIGINTERN PyObject *FEdgeSmooth_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSmooth, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -37252,7 +37294,7 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -37270,10 +37312,7 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n" - " Possible C/C++ prototypes are:\n" - " SShape()\n" - " SShape(SShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n Possible C/C++ prototypes are:\n SShape()\n SShape(SShape &)\n"); return NULL; } @@ -37488,7 +37527,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_CreateSVertex" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -37496,7 +37535,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_CreateSVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -37534,8 +37573,8 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector< Geometry::Vec2r > *arg3 = 0 ; - std::vector< FEdge * > *arg4 = 0 ; + std::vector *arg3 = 0 ; + std::vector *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37560,25 +37599,25 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); } - arg3 = reinterpret_cast< std::vector< Geometry::Vec2r > * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); } - arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); + arg4 = reinterpret_cast< std::vector * >(argp4); { try { - (arg1)->SplitEdge(arg2,(std::vector< Geometry::Vec2r > const &)*arg3,*arg4); + (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37644,10 +37683,10 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_setBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox< Geometry::Vec3r > *arg2 = 0 ; + BBox *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37655,23 +37694,23 @@ SWIGINTERN PyObject *_wrap_SShape_SetBBox(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetBBox",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_setBBox",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetBBox" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setBBox" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox const &""'"); } - arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); + arg2 = reinterpret_cast< BBox * >(argp2); { try { - (arg1)->SetBBox((BBox< Geometry::Vec3r > const &)*arg2); + (arg1)->setBBox((BBox const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37801,7 +37840,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector< SVertex * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37815,8 +37854,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), { try { { - std::vector< SVertex * > &_result_ref = (arg1)->GetVertexList(); - result = (std::vector< SVertex * > *) &_result_ref; + std::vector &_result_ref = (arg1)->GetVertexList(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37826,7 +37865,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37836,7 +37875,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37850,8 +37889,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector< FEdge * > &_result_ref = (arg1)->GetEdgeList(); - result = (std::vector< FEdge * > *) &_result_ref; + std::vector &_result_ref = (arg1)->GetEdgeList(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37861,7 +37900,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37871,7 +37910,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37885,8 +37924,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector< FEdge * > &_result_ref = (arg1)->GetChains(); - result = (std::vector< FEdge * > *) &_result_ref; + std::vector &_result_ref = (arg1)->GetChains(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37896,7 +37935,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37906,7 +37945,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox< Geometry::Vec3r > *result = 0 ; + BBox *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37920,8 +37959,8 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject { try { { - BBox< Geometry::Vec3r > const &_result_ref = (arg1)->bbox(); - result = (BBox< Geometry::Vec3r > *) &_result_ref; + BBox const &_result_ref = (arg1)->bbox(); + result = (BBox *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37931,7 +37970,7 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37985,7 +38024,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector< Material > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37999,8 +38038,8 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector< Material > const &_result_ref = ((SShape const *)arg1)->materials(); - result = (std::vector< Material > *) &_result_ref; + std::vector const &_result_ref = ((SShape const *)arg1)->materials(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -38010,7 +38049,7 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -38113,7 +38152,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; Id arg2 ; @@ -38124,19 +38163,19 @@ SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetId" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setId" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetId" "', argument " "2"" of type '" "Id""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setId" "', argument " "2"" of type '" "Id""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetId" "', argument " "2"" of type '" "Id""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setId" "', argument " "2"" of type '" "Id""'"); } else { Id * temp = reinterpret_cast< Id * >(argp2); arg2 = *temp; @@ -38145,7 +38184,7 @@ SWIGINTERN PyObject *_wrap_SShape_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject } { try { - (arg1)->SetId(arg2); + (arg1)->setId(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38161,10 +38200,10 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_setMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector< Material > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38172,23 +38211,23 @@ SWIGINTERN PyObject *_wrap_SShape_SetMaterials(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetMaterials",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_setMaterials",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetMaterials" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setMaterials" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SetMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector const &""'"); } - arg2 = reinterpret_cast< std::vector< Material > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { - (arg1)->SetMaterials((std::vector< Material > const &)*arg2); + (arg1)->setMaterials((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38204,7 +38243,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_SetViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_setViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -38215,20 +38254,20 @@ SWIGINTERN PyObject *_wrap_SShape_SetViewShape(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetViewShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_setViewShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetViewShape" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setViewShape" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SetViewShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setViewShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (arg1)->SetViewShape(arg2); + (arg1)->setViewShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38244,7 +38283,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_SetImportance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_setImportance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; float arg2 ; @@ -38255,20 +38294,20 @@ SWIGINTERN PyObject *_wrap_SShape_SetImportance(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:SShape_SetImportance",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:SShape_setImportance",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_SetImportance" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setImportance" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SShape_SetImportance" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SShape_setImportance" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetImportance(arg2); + (arg1)->setImportance(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38286,14 +38325,14 @@ fail: SWIGINTERN PyObject *SShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -38302,11 +38341,11 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewShape_Sm__Sg__iterator(arg1,arg2); @@ -38327,21 +38366,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector< ViewShape * > const *)arg1); + result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38359,21 +38398,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector< ViewShape * > const *)arg1); + result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38391,22 +38430,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38420,7 +38459,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38429,10 +38468,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; - std::vector< ViewShape * >::difference_type arg3 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38444,25 +38483,25 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< ViewShape *,std::allocator< ViewShape * > > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38476,7 +38515,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -38485,10 +38524,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; - std::vector< ViewShape * >::difference_type arg3 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38502,36 +38541,36 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewShape *,std::allocator< ViewShape * > > const &)*arg4); + std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38559,9 +38598,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; - std::vector< ViewShape * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38573,21 +38612,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -38614,8 +38653,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38624,16 +38663,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -38660,9 +38699,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; - std::vector< ViewShape * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38671,20 +38710,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38698,7 +38737,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38707,9 +38746,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::difference_type arg2 ; - std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38721,21 +38760,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -38762,8 +38801,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38772,16 +38811,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_ViewShape_Sm__Sg__append(arg1,arg2); @@ -38802,12 +38841,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewShapesContainer")) SWIG_fail; { try { - result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38816,7 +38855,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -38825,26 +38864,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = 0 ; - std::vector< ViewShape * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >((std::vector< ViewShape * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38853,7 +38892,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -38864,21 +38903,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< ViewShape * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38896,21 +38935,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38928,17 +38967,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -38959,8 +38998,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38969,19 +39008,19 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< ViewShape * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -39002,21 +39041,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - SwigValueWrapper< std::allocator< ViewShape * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39025,30 +39064,30 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< ViewShape * >::allocator_type(static_cast< const std::vector< ViewShape * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39057,7 +39096,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39065,23 +39104,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39090,7 +39195,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39098,23 +39203,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39123,7 +39294,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39131,23 +39302,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39156,7 +39327,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39164,10 +39335,142 @@ fail: } +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewShapesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * >::size_type arg1 ; - std::vector< ViewShape * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -39175,12 +39478,12 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39189,7 +39492,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39198,17 +39501,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -39229,8 +39532,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39239,16 +39542,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUS PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -39269,9 +39572,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::iterator arg2 ; - std::vector< ViewShape * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39280,20 +39583,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -39307,7 +39610,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39317,10 +39620,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::iterator arg2 ; - std::vector< ViewShape * >::iterator arg3 ; - std::vector< ViewShape * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39332,31 +39635,31 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -39370,7 +39673,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39384,18 +39687,18 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_0(self, args); } @@ -39403,16 +39706,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_1(self, args); } @@ -39421,19 +39724,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator)\n" - " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * >::size_type arg1 ; - std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; - std::vector< ViewShape * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -39444,17 +39744,17 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewShapesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39463,7 +39763,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39476,7 +39776,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -39495,7 +39795,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_1(self, args); @@ -39509,7 +39809,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_3(self, args); @@ -39518,20 +39818,15 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< ViewShape * >()\n" - " std::vector< ViewShape * >(std::vector< ViewShape * > const &)\n" - " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type)\n" - " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewShape)>()\n std::vector<(p.ViewShape)>(std::vector const &)\n std::vector<(p.ViewShape)>(std::vector::size_type)\n std::vector<(p.ViewShape)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -39540,16 +39835,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -39570,21 +39865,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39593,7 +39888,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39602,21 +39897,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39625,7 +39920,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39634,9 +39929,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type arg2 ; - std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39648,21 +39943,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(s PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -39683,9 +39978,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type arg2 ; - std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39697,21 +39992,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -39736,13 +40031,13 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -39756,7 +40051,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -39765,7 +40060,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_resize__SWIG_1(self, args); @@ -39775,20 +40070,17 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type)\n" - " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::iterator arg2 ; - std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; - std::vector< ViewShape * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39800,27 +40092,27 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -39832,7 +40124,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39842,10 +40134,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::iterator arg2 ; - std::vector< ViewShape * >::size_type arg3 ; - std::vector< ViewShape * >::value_type arg4 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39860,32 +40152,32 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< ViewShape * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewShape * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -39910,21 +40202,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_0(self, args); @@ -39934,12 +40226,12 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -39947,7 +40239,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_1(self, args); @@ -39958,18 +40250,15 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::value_type)\n" - " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39978,16 +40267,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -40008,21 +40297,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; - std::vector< ViewShape * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewShape * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40040,17 +40329,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewShapesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewShapesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -40072,14 +40361,14 @@ fail: SWIGINTERN PyObject *ViewShapesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -40088,11 +40377,11 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewEdge_Sm__Sg__iterator(arg1,arg2); @@ -40113,21 +40402,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector< ViewEdge * > const *)arg1); + result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40145,21 +40434,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector< ViewEdge * > const *)arg1); + result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40177,22 +40466,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40206,7 +40495,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40215,10 +40504,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; - std::vector< ViewEdge * >::difference_type arg3 ; - std::vector< ViewEdge *,std::allocator< ViewEdge * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40230,25 +40519,25 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< ViewEdge *,std::allocator< ViewEdge * > > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40262,7 +40551,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -40271,10 +40560,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; - std::vector< ViewEdge * >::difference_type arg3 ; - std::vector< ViewEdge *,std::allocator< ViewEdge * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40288,36 +40577,36 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &)*arg4); + std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40345,9 +40634,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; - std::vector< ViewEdge * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40359,21 +40648,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -40400,8 +40689,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40410,16 +40699,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -40446,9 +40735,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; - std::vector< ViewEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40457,20 +40746,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40484,7 +40773,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40493,9 +40782,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::difference_type arg2 ; - std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40507,21 +40796,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -40548,8 +40837,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -40558,16 +40847,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_ViewEdge_Sm__Sg__append(arg1,arg2); @@ -40588,12 +40877,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewEdgesContainer")) SWIG_fail; { try { - result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40602,7 +40891,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -40611,26 +40900,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = 0 ; - std::vector< ViewEdge * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >((std::vector< ViewEdge * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40639,7 +40928,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -40650,21 +40939,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< ViewEdge * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40682,21 +40971,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40714,17 +41003,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -40745,8 +41034,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -40755,19 +41044,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< ViewEdge * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -40788,21 +41077,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - SwigValueWrapper< std::allocator< ViewEdge * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40811,30 +41100,30 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< ViewEdge * >::allocator_type(static_cast< const std::vector< ViewEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40843,7 +41132,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40851,23 +41140,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40876,7 +41231,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40884,23 +41239,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40909,7 +41330,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40917,23 +41338,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40942,7 +41363,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40950,10 +41371,142 @@ fail: } +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewEdgesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * >::size_type arg1 ; - std::vector< ViewEdge * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -40961,12 +41514,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40975,7 +41528,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -40984,17 +41537,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -41015,8 +41568,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41025,16 +41578,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -41055,9 +41608,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::iterator arg2 ; - std::vector< ViewEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41066,20 +41619,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -41093,7 +41646,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41103,10 +41656,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::iterator arg2 ; - std::vector< ViewEdge * >::iterator arg3 ; - std::vector< ViewEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41118,31 +41671,31 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -41156,7 +41709,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41170,18 +41723,18 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_0(self, args); } @@ -41189,16 +41742,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_1(self, args); } @@ -41207,19 +41760,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator)\n" - " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * >::size_type arg1 ; - std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; - std::vector< ViewEdge * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -41230,17 +41780,17 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41249,7 +41799,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -41262,7 +41812,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -41281,7 +41831,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_1(self, args); @@ -41295,7 +41845,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_3(self, args); @@ -41304,20 +41854,15 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< ViewEdge * >()\n" - " std::vector< ViewEdge * >(std::vector< ViewEdge * > const &)\n" - " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type)\n" - " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewEdge)>()\n std::vector<(p.ViewEdge)>(std::vector const &)\n std::vector<(p.ViewEdge)>(std::vector::size_type)\n std::vector<(p.ViewEdge)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -41326,16 +41871,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -41356,21 +41901,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41379,7 +41924,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41388,21 +41933,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41411,7 +41956,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41420,9 +41965,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type arg2 ; - std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41434,21 +41979,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -41469,9 +42014,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type arg2 ; - std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41483,21 +42028,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -41522,13 +42067,13 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -41542,7 +42087,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -41551,7 +42096,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_resize__SWIG_1(self, args); @@ -41561,20 +42106,17 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type)\n" - " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::iterator arg2 ; - std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; - std::vector< ViewEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41586,27 +42128,27 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -41618,7 +42160,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41628,10 +42170,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::iterator arg2 ; - std::vector< ViewEdge * >::size_type arg3 ; - std::vector< ViewEdge * >::value_type arg4 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41646,32 +42188,32 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< ViewEdge * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -41696,21 +42238,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_0(self, args); @@ -41720,12 +42262,12 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -41733,7 +42275,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_1(self, args); @@ -41744,18 +42286,15 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::value_type)\n" - " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41764,16 +42303,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -41794,21 +42333,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; - std::vector< ViewEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewEdge * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41826,17 +42365,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -41858,14 +42397,14 @@ fail: SWIGINTERN PyObject *ViewEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -41874,11 +42413,11 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(sel arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_FEdge_Sm__Sg__iterator(arg1,arg2); @@ -41899,21 +42438,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector< FEdge * > const *)arg1); + result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41931,21 +42470,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector< FEdge * > const *)arg1); + result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41963,22 +42502,22 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -41992,7 +42531,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42001,10 +42540,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; - std::vector< FEdge * >::difference_type arg3 ; - std::vector< FEdge *,std::allocator< FEdge * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42016,25 +42555,25 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< FEdge *,std::allocator< FEdge * > > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42048,7 +42587,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -42057,10 +42596,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; - std::vector< FEdge * >::difference_type arg3 ; - std::vector< FEdge *,std::allocator< FEdge * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42074,36 +42613,36 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< FEdge *,std::allocator< FEdge * > > const &)*arg4); + std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42131,9 +42670,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; - std::vector< FEdge * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42145,21 +42684,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -42186,8 +42725,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42196,16 +42735,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -42232,9 +42771,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; - std::vector< FEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42243,20 +42782,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42270,7 +42809,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42279,9 +42818,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::difference_type arg2 ; - std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42293,21 +42832,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -42334,8 +42873,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -42344,16 +42883,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_FEdge_Sm__Sg__append(arg1,arg2); @@ -42374,12 +42913,12 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_FEdgesContainer")) SWIG_fail; { try { - result = (std::vector< FEdge * > *)new std::vector< FEdge * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42388,7 +42927,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -42397,26 +42936,26 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< FEdge * > *)new std::vector< FEdge * >((std::vector< FEdge * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42425,7 +42964,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -42436,21 +42975,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< FEdge * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42468,21 +43007,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42500,17 +43039,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -42531,8 +43070,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -42541,19 +43080,19 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -42574,21 +43113,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - SwigValueWrapper< std::allocator< FEdge * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42597,30 +43136,30 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< FEdge * >::allocator_type(static_cast< const std::vector< FEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42629,7 +43168,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42637,23 +43176,89 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42662,7 +43267,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42670,23 +43275,89 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42695,7 +43366,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42703,23 +43374,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42728,7 +43399,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42736,10 +43407,142 @@ fail: } +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_FEdgesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * >::size_type arg1 ; - std::vector< FEdge * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -42747,12 +43550,12 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42761,7 +43564,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -42770,17 +43573,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -42801,8 +43604,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -42811,16 +43614,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -42841,9 +43644,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::iterator arg2 ; - std::vector< FEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42852,20 +43655,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -42879,7 +43682,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42889,10 +43692,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::iterator arg2 ; - std::vector< FEdge * >::iterator arg3 ; - std::vector< FEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42904,31 +43707,31 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -42942,7 +43745,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42956,18 +43759,18 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_0(self, args); } @@ -42975,16 +43778,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_1(self, args); } @@ -42993,19 +43796,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator)\n" - " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * >::size_type arg1 ; - std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -43016,17 +43816,17 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43035,7 +43835,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -43048,7 +43848,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -43067,7 +43867,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_1(self, args); @@ -43081,7 +43881,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_3(self, args); @@ -43090,20 +43890,15 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< FEdge * >()\n" - " std::vector< FEdge * >(std::vector< FEdge * > const &)\n" - " std::vector< FEdge * >(std::vector< FEdge * >::size_type)\n" - " std::vector< FEdge * >(std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.FEdge)>()\n std::vector<(p.FEdge)>(std::vector const &)\n std::vector<(p.FEdge)>(std::vector::size_type)\n std::vector<(p.FEdge)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -43112,16 +43907,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -43142,21 +43937,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43165,7 +43960,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43174,21 +43969,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43197,7 +43992,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43206,9 +44001,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type arg2 ; - std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43220,21 +44015,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -43255,9 +44050,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type arg2 ; - std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43269,21 +44064,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -43308,13 +44103,13 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -43328,7 +44123,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -43337,7 +44132,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_resize__SWIG_1(self, args); @@ -43347,20 +44142,17 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type)\n" - " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::iterator arg2 ; - std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; - std::vector< FEdge * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43372,27 +44164,27 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -43404,7 +44196,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43414,10 +44206,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::iterator arg2 ; - std::vector< FEdge * >::size_type arg3 ; - std::vector< FEdge * >::value_type arg4 = (std::vector< FEdge * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43432,32 +44224,32 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< FEdge * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< FEdge * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -43482,21 +44274,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_0(self, args); @@ -43506,12 +44298,12 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -43519,7 +44311,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_1(self, args); @@ -43530,18 +44322,15 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::value_type)\n" - " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43550,16 +44339,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -43580,21 +44369,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; - std::vector< FEdge * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< FEdge * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43612,17 +44401,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_FEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -43644,14 +44433,14 @@ fail: SWIGINTERN PyObject *FEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -43660,11 +44449,11 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPA arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewVertex_Sm__Sg__iterator(arg1,arg2); @@ -43685,21 +44474,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector< ViewVertex * > const *)arg1); + result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43717,21 +44506,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector< ViewVertex * > const *)arg1); + result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43749,22 +44538,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -43778,7 +44567,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43787,10 +44576,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; - std::vector< ViewVertex * >::difference_type arg3 ; - std::vector< ViewVertex *,std::allocator< ViewVertex * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -43802,25 +44591,25 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< ViewVertex *,std::allocator< ViewVertex * > > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -43834,7 +44623,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -43843,10 +44632,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; - std::vector< ViewVertex * >::difference_type arg3 ; - std::vector< ViewVertex *,std::allocator< ViewVertex * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -43860,36 +44649,36 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &)*arg4); + std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -43917,9 +44706,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; - std::vector< ViewVertex * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -43931,21 +44720,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -43972,8 +44761,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -43982,16 +44771,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -44018,9 +44807,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; - std::vector< ViewVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44029,20 +44818,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44056,7 +44845,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44065,9 +44854,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::difference_type arg2 ; - std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44079,21 +44868,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -44120,8 +44909,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -44130,16 +44919,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_ViewVertex_Sm__Sg__append(arg1,arg2); @@ -44160,12 +44949,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewVerticesContainer")) SWIG_fail; { try { - result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44174,7 +44963,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -44183,26 +44972,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = 0 ; - std::vector< ViewVertex * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >((std::vector< ViewVertex * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44211,7 +45000,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -44222,21 +45011,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< ViewVertex * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44254,21 +45043,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44286,17 +45075,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -44317,8 +45106,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -44327,19 +45116,19 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< ViewVertex * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -44360,21 +45149,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - SwigValueWrapper< std::allocator< ViewVertex * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44383,30 +45172,30 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< ViewVertex * >::allocator_type(static_cast< const std::vector< ViewVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44415,7 +45204,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44423,23 +45212,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44448,7 +45303,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44456,23 +45311,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44481,7 +45402,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44489,23 +45410,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44514,7 +45435,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44522,10 +45443,142 @@ fail: } +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ViewVerticesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * >::size_type arg1 ; - std::vector< ViewVertex * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -44533,12 +45586,12 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44547,7 +45600,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -44556,17 +45609,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -44587,8 +45640,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44597,16 +45650,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUN PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -44627,9 +45680,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::iterator arg2 ; - std::vector< ViewVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44638,20 +45691,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -44665,7 +45718,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44675,10 +45728,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::iterator arg2 ; - std::vector< ViewVertex * >::iterator arg3 ; - std::vector< ViewVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44690,31 +45743,31 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -44728,7 +45781,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44742,18 +45795,18 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_0(self, args); } @@ -44761,16 +45814,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_1(self, args); } @@ -44779,19 +45832,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator)\n" - " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * >::size_type arg1 ; - std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; - std::vector< ViewVertex * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -44802,17 +45852,17 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44821,7 +45871,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -44834,7 +45884,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -44853,7 +45903,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_1(self, args); @@ -44867,7 +45917,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_3(self, args); @@ -44876,20 +45926,15 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< ViewVertex * >()\n" - " std::vector< ViewVertex * >(std::vector< ViewVertex * > const &)\n" - " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type)\n" - " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewVertex)>()\n std::vector<(p.ViewVertex)>(std::vector const &)\n std::vector<(p.ViewVertex)>(std::vector::size_type)\n std::vector<(p.ViewVertex)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -44898,16 +45943,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -44928,21 +45973,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44951,7 +45996,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44960,21 +46005,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44983,7 +46028,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44992,9 +46037,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type arg2 ; - std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -45006,21 +46051,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -45041,9 +46086,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type arg2 ; - std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -45055,21 +46100,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -45094,13 +46139,13 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -45114,7 +46159,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -45123,7 +46168,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_resize__SWIG_1(self, args); @@ -45133,20 +46178,17 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type)\n" - " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::iterator arg2 ; - std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; - std::vector< ViewVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45158,27 +46200,27 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -45190,7 +46232,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45200,10 +46242,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::iterator arg2 ; - std::vector< ViewVertex * >::size_type arg3 ; - std::vector< ViewVertex * >::value_type arg4 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45218,32 +46260,32 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUN PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< ViewVertex * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -45268,21 +46310,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_0(self, args); @@ -45292,12 +46334,12 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -45305,7 +46347,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_1(self, args); @@ -45316,18 +46358,15 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::value_type)\n" - " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -45336,16 +46375,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -45366,21 +46405,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; - std::vector< ViewVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< ViewVertex * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45398,17 +46437,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -45430,14 +46469,14 @@ fail: SWIGINTERN PyObject *ViewVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -45446,11 +46485,11 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_SVertex_Sm__Sg__iterator(arg1,arg2); @@ -45471,21 +46510,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector< SVertex * > const *)arg1); + result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45503,21 +46542,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector< SVertex * > const *)arg1); + result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45535,22 +46574,22 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -45564,7 +46603,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -45573,10 +46612,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; - std::vector< SVertex * >::difference_type arg3 ; - std::vector< SVertex *,std::allocator< SVertex * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45588,25 +46627,25 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< SVertex *,std::allocator< SVertex * > > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -45620,7 +46659,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -45629,10 +46668,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; - std::vector< SVertex * >::difference_type arg3 ; - std::vector< SVertex *,std::allocator< SVertex * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45646,36 +46685,36 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< SVertex *,std::allocator< SVertex * > > const &)*arg4); + std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -45703,9 +46742,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; - std::vector< SVertex * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45717,21 +46756,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -45758,8 +46797,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45768,16 +46807,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -45804,9 +46843,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; - std::vector< SVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45815,20 +46854,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -45842,7 +46881,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -45851,9 +46890,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::difference_type arg2 ; - std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -45865,21 +46904,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -45906,8 +46945,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -45916,16 +46955,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_SVertex_Sm__Sg__append(arg1,arg2); @@ -45946,12 +46985,12 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_SVerticesContainer")) SWIG_fail; { try { - result = (std::vector< SVertex * > *)new std::vector< SVertex * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45960,7 +46999,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -45969,26 +47008,26 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = 0 ; - std::vector< SVertex * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< SVertex * > *)new std::vector< SVertex * >((std::vector< SVertex * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45997,7 +47036,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -46008,21 +47047,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< SVertex * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46040,21 +47079,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46072,17 +47111,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -46103,8 +47142,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -46113,19 +47152,19 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< SVertex * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -46146,21 +47185,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - SwigValueWrapper< std::allocator< SVertex * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46169,30 +47208,30 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< SVertex * >::allocator_type(static_cast< const std::vector< SVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46201,7 +47240,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46209,23 +47248,89 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46234,7 +47339,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46242,23 +47347,89 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46267,7 +47438,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46275,23 +47446,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46300,7 +47471,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46308,10 +47479,142 @@ fail: } +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_SVerticesContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * >::size_type arg1 ; - std::vector< SVertex * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -46319,12 +47622,12 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46333,7 +47636,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -46342,17 +47645,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -46373,8 +47676,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46383,16 +47686,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -46413,9 +47716,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::iterator arg2 ; - std::vector< SVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46424,20 +47727,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -46451,7 +47754,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46461,10 +47764,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::iterator arg2 ; - std::vector< SVertex * >::iterator arg3 ; - std::vector< SVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46476,31 +47779,31 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -46514,7 +47817,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46528,18 +47831,18 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_0(self, args); } @@ -46547,16 +47850,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_1(self, args); } @@ -46565,19 +47868,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator)\n" - " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * >::size_type arg1 ; - std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; - std::vector< SVertex * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -46588,17 +47888,17 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_SVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46607,7 +47907,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -46620,7 +47920,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -46639,7 +47939,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_1(self, args); @@ -46653,7 +47953,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_3(self, args); @@ -46662,20 +47962,15 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< SVertex * >()\n" - " std::vector< SVertex * >(std::vector< SVertex * > const &)\n" - " std::vector< SVertex * >(std::vector< SVertex * >::size_type)\n" - " std::vector< SVertex * >(std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.SVertex)>()\n std::vector<(p.SVertex)>(std::vector const &)\n std::vector<(p.SVertex)>(std::vector::size_type)\n std::vector<(p.SVertex)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -46684,16 +47979,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -46714,21 +48009,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46737,7 +48032,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46746,21 +48041,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46769,7 +48064,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46778,9 +48073,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type arg2 ; - std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46792,21 +48087,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -46827,9 +48122,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type arg2 ; - std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46841,21 +48136,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -46880,13 +48175,13 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46900,7 +48195,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46909,7 +48204,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_resize__SWIG_1(self, args); @@ -46919,20 +48214,17 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type)\n" - " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::iterator arg2 ; - std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; - std::vector< SVertex * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46944,27 +48236,27 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -46976,7 +48268,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46986,10 +48278,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::iterator arg2 ; - std::vector< SVertex * >::size_type arg3 ; - std::vector< SVertex * >::value_type arg4 = (std::vector< SVertex * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -47004,32 +48296,32 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< SVertex * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< SVertex * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -47054,21 +48346,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_0(self, args); @@ -47078,12 +48370,12 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -47091,7 +48383,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_1(self, args); @@ -47102,18 +48394,15 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::value_type)\n" - " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -47122,16 +48411,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -47152,21 +48441,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; - std::vector< SVertex * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< SVertex * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47184,17 +48473,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_SVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_SVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -47216,8 +48505,8 @@ fail: SWIGINTERN PyObject *SVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -47478,7 +48767,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47513,7 +48802,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47548,7 +48837,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47583,7 +48872,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47618,7 +48907,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47792,7 +49081,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -47802,7 +49091,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; + SwigValueWrapper > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -47824,7 +49113,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48034,7 +49323,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - BBox< Geometry::Vec3r > *arg2 = 0 ; + BBox *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -48048,17 +49337,17 @@ SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_setScene3dBBox" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); } - arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); + arg2 = reinterpret_cast< BBox * >(argp2); { try { - (arg1)->setScene3dBBox((BBox< Geometry::Vec3r > const &)*arg2); + (arg1)->setScene3dBBox((BBox const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48116,7 +49405,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_CreateTVertex" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -48124,7 +49413,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_CreateTVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -48137,7 +49426,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewMap_CreateTVertex" "', argument " "4"" of type '" "FEdge *""'"); } arg4 = reinterpret_cast< FEdge * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } @@ -48145,7 +49434,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } arg5 = reinterpret_cast< Geometry::Vec3r * >(argp5); - res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ViewMap_CreateTVertex" "', argument " "6"" of type '" "Geometry::Vec3r const &""'"); } @@ -48188,7 +49477,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; SVertex *arg2 = (SVertex *) 0 ; - std::vector< ViewEdge * > *arg3 = 0 ; + std::vector *arg3 = 0 ; ViewVertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -48211,14 +49500,14 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_InsertViewVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); } - arg3 = reinterpret_cast< std::vector< ViewEdge * > * >(argp3); + arg3 = reinterpret_cast< std::vector * >(argp3); { try { result = (ViewVertex *)(arg1)->InsertViewVertex(arg2,*arg3); @@ -48239,7 +49528,7 @@ fail: SWIGINTERN PyObject *ViewMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewMap, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -48483,7 +49772,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -48505,7 +49794,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48515,7 +49804,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -48537,7 +49826,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48550,7 +49839,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -48574,10 +49863,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n" - " Possible C/C++ prototypes are:\n" - " edges_begin(ViewVertex *)\n" - " edges_begin(ViewVertex const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n Possible C/C++ prototypes are:\n edges_begin()\n edges_begin()\n"); return NULL; } @@ -48585,7 +49871,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -48607,7 +49893,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48617,7 +49903,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -48639,7 +49925,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48652,7 +49938,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -48676,10 +49962,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n" - " Possible C/C++ prototypes are:\n" - " edges_end(ViewVertex *)\n" - " edges_end(ViewVertex const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); return NULL; } @@ -48688,7 +49971,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -48718,7 +50001,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48729,7 +50012,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -48759,7 +50042,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -48772,7 +50055,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -48806,10 +50089,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n" - " Possible C/C++ prototypes are:\n" - " edges_iterator(ViewVertex *,ViewEdge *)\n" - " edges_iterator(ViewVertex const *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n Possible C/C++ prototypes are:\n edges_iterator(ViewEdge *)\n edges_iterator(ViewEdge *)\n"); return NULL; } @@ -48921,7 +50201,7 @@ fail: SWIGINTERN PyObject *ViewVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -49079,7 +50359,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49207,7 +50487,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49380,7 +50660,7 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49403,10 +50683,7 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n" - " Possible C/C++ prototypes are:\n" - " TVertex()\n" - " TVertex(SVertex *,SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n Possible C/C++ prototypes are:\n TVertex()\n TVertex(SVertex *,SVertex *)\n"); return NULL; } @@ -49503,7 +50780,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49538,7 +50815,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49573,7 +50850,7 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49608,14 +50885,14 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -49626,20 +50903,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontVertex(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setFrontVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontVertex" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontVertex" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontVertex" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetFrontVertex(arg2); + (arg1)->setFrontVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49655,7 +50932,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetBackSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -49666,20 +50943,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackSVertex(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackSVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setBackSVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackSVertex" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setBackSVertex" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackSVertex" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setBackSVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetBackSVertex(arg2); + (arg1)->setBackSVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49695,7 +50972,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -49710,25 +50987,25 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetFrontEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_setFrontEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetFrontEdgeA" "', argument " "3"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_setFrontEdgeA" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); { try { - (arg1)->SetFrontEdgeA(arg2,arg3); + (arg1)->setFrontEdgeA(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49744,7 +51021,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -49755,20 +51032,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontEdgeA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setFrontEdgeA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontEdgeA" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); { try { - (arg1)->SetFrontEdgeA(arg2); + (arg1)->setFrontEdgeA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49784,13 +51061,13 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeA(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49804,7 +51081,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_TVertex_SetFrontEdgeA__SWIG_1(self, args); + return _wrap_TVertex_setFrontEdgeA__SWIG_1(self, args); } } } @@ -49823,22 +51100,19 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_TVertex_SetFrontEdgeA__SWIG_0(self, args); + return _wrap_TVertex_setFrontEdgeA__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeA'.\n" - " Possible C/C++ prototypes are:\n" - " SetFrontEdgeA(TVertex *,ViewEdge *,bool)\n" - " SetFrontEdgeA(TVertex *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeA'.\n Possible C/C++ prototypes are:\n setFrontEdgeA(ViewEdge *,bool)\n setFrontEdgeA(ViewEdge *)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -49853,25 +51127,25 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetFrontEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_setFrontEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetFrontEdgeB" "', argument " "3"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_setFrontEdgeB" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); { try { - (arg1)->SetFrontEdgeB(arg2,arg3); + (arg1)->setFrontEdgeB(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49887,7 +51161,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -49898,20 +51172,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetFrontEdgeB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setFrontEdgeB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontEdgeB" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); { try { - (arg1)->SetFrontEdgeB(arg2); + (arg1)->setFrontEdgeB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49927,13 +51201,13 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeB(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49947,7 +51221,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_TVertex_SetFrontEdgeB__SWIG_1(self, args); + return _wrap_TVertex_setFrontEdgeB__SWIG_1(self, args); } } } @@ -49966,22 +51240,19 @@ SWIGINTERN PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_TVertex_SetFrontEdgeB__SWIG_0(self, args); + return _wrap_TVertex_setFrontEdgeB__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetFrontEdgeB'.\n" - " Possible C/C++ prototypes are:\n" - " SetFrontEdgeB(TVertex *,ViewEdge *,bool)\n" - " SetFrontEdgeB(TVertex *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeB'.\n Possible C/C++ prototypes are:\n setFrontEdgeB(ViewEdge *,bool)\n setFrontEdgeB(ViewEdge *)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -49996,25 +51267,25 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetBackEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_setBackEdgeA",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetBackEdgeA" "', argument " "3"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_setBackEdgeA" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); { try { - (arg1)->SetBackEdgeA(arg2,arg3); + (arg1)->setBackEdgeA(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50030,7 +51301,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -50041,20 +51312,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackEdgeA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setBackEdgeA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setBackEdgeA" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setBackEdgeA" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); { try { - (arg1)->SetBackEdgeA(arg2); + (arg1)->setBackEdgeA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50070,13 +51341,13 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeA(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50090,7 +51361,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_TVertex_SetBackEdgeA__SWIG_1(self, args); + return _wrap_TVertex_setBackEdgeA__SWIG_1(self, args); } } } @@ -50109,22 +51380,19 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_TVertex_SetBackEdgeA__SWIG_0(self, args); + return _wrap_TVertex_setBackEdgeA__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeA'.\n" - " Possible C/C++ prototypes are:\n" - " SetBackEdgeA(TVertex *,ViewEdge *,bool)\n" - " SetBackEdgeA(TVertex *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeA'.\n Possible C/C++ prototypes are:\n setBackEdgeA(ViewEdge *,bool)\n setBackEdgeA(ViewEdge *)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -50139,25 +51407,25 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_SetBackEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:TVertex_setBackEdgeB",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_SetBackEdgeB" "', argument " "3"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TVertex_setBackEdgeB" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); { try { - (arg1)->SetBackEdgeB(arg2,arg3); + (arg1)->setBackEdgeB(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50173,7 +51441,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; @@ -50184,20 +51452,20 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetBackEdgeB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setBackEdgeB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setBackEdgeB" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setBackEdgeB" "', argument " "2"" of type '" "ViewEdge *""'"); } arg2 = reinterpret_cast< ViewEdge * >(argp2); { try { - (arg1)->SetBackEdgeB(arg2); + (arg1)->setBackEdgeB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50213,13 +51481,13 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeB(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50233,7 +51501,7 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_ViewEdge, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_TVertex_SetBackEdgeB__SWIG_1(self, args); + return _wrap_TVertex_setBackEdgeB__SWIG_1(self, args); } } } @@ -50252,22 +51520,19 @@ SWIGINTERN PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_TVertex_SetBackEdgeB__SWIG_0(self, args); + return _wrap_TVertex_setBackEdgeB__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_SetBackEdgeB'.\n" - " Possible C/C++ prototypes are:\n" - " SetBackEdgeB(TVertex *,ViewEdge *,bool)\n" - " SetBackEdgeB(TVertex *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeB'.\n Possible C/C++ prototypes are:\n setBackEdgeB(ViewEdge *,bool)\n setBackEdgeB(ViewEdge *)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_TVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; Id *arg2 = 0 ; @@ -50278,23 +51543,23 @@ SWIGINTERN PyObject *_wrap_TVertex_SetId(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_SetId" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setId" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TVertex_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TVertex_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (arg1)->SetId((Id const &)*arg2); + (arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50444,7 +51709,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -50466,7 +51731,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50476,7 +51741,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -50498,7 +51763,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50511,7 +51776,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50535,10 +51800,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n" - " Possible C/C++ prototypes are:\n" - " edges_end(TVertex *)\n" - " edges_end(TVertex const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); return NULL; } @@ -50682,7 +51944,7 @@ fail: SWIGINTERN PyObject *TVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_TVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -50840,7 +52102,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50968,7 +52230,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51164,7 +52426,7 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51182,10 +52444,7 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n" - " Possible C/C++ prototypes are:\n" - " NonTVertex()\n" - " NonTVertex(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n Possible C/C++ prototypes are:\n NonTVertex()\n NonTVertex(SVertex *)\n"); return NULL; } @@ -51282,14 +52541,14 @@ SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_NonTVertex_SetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_NonTVertex_setSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -51300,20 +52559,20 @@ SWIGINTERN PyObject *_wrap_NonTVertex_SetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_SetSVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_setSVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_SetSVertex" "', argument " "1"" of type '" "NonTVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_setSVertex" "', argument " "1"" of type '" "NonTVertex *""'"); } arg1 = reinterpret_cast< NonTVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetSVertex" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_setSVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetSVertex(arg2); + (arg1)->setSVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -51329,10 +52588,10 @@ fail: } -SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_NonTVertex_setViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - std::vector< ViewVertex::directedViewEdge > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -51340,23 +52599,23 @@ SWIGINTERN PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_SetViewEdges",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:NonTVertex_setViewEdges",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_NonTVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_SetViewEdges" "', argument " "1"" of type '" "NonTVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_setViewEdges" "', argument " "1"" of type '" "NonTVertex *""'"); } arg1 = reinterpret_cast< NonTVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_SetViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); } - arg2 = reinterpret_cast< std::vector< ViewVertex::directedViewEdge > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { - (arg1)->SetViewEdges((std::vector< ViewVertex::directedViewEdge > const &)*arg2); + (arg1)->setViewEdges((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -51547,7 +52806,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51587,10 +52846,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n" - " Possible C/C++ prototypes are:\n" - " AddViewEdge(NonTVertex *,ViewEdge *,bool)\n" - " AddViewEdge(NonTVertex *,ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n Possible C/C++ prototypes are:\n AddViewEdge(ViewEdge *,bool)\n AddViewEdge(ViewEdge *)\n"); return NULL; } @@ -51647,7 +52903,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51669,7 +52925,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51679,7 +52935,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51701,7 +52957,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51714,7 +52970,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51738,10 +52994,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n" - " Possible C/C++ prototypes are:\n" - " edges_end(NonTVertex *)\n" - " edges_end(NonTVertex const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); return NULL; } @@ -51853,7 +53106,7 @@ fail: SWIGINTERN PyObject *NonTVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_NonTVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -52193,7 +53446,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52264,12 +53517,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n" - " Possible C/C++ prototypes are:\n" - " ViewEdge()\n" - " ViewEdge(ViewVertex *,ViewVertex *)\n" - " ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n" - " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n Possible C/C++ prototypes are:\n ViewEdge()\n ViewEdge(ViewVertex *,ViewVertex *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); return NULL; } @@ -52600,7 +53848,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52624,10 +53872,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n" - " Possible C/C++ prototypes are:\n" - " aShape(ViewEdge *)\n" - " aShape(ViewEdge const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); return NULL; } @@ -52667,7 +53912,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; - std::vector< ViewShape * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -52681,8 +53926,8 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector< ViewShape * > &_result_ref = (arg1)->occluders(); - result = (std::vector< ViewShape * > *) &_result_ref; + std::vector &_result_ref = (arg1)->occluders(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -52692,7 +53937,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -52731,7 +53976,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -52742,20 +53987,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetA(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetA" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setA" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setA" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (arg1)->SetA(arg2); + (arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52771,7 +54016,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -52782,20 +54027,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetB(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetB" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setB" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setB" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (arg1)->SetB(arg2); + (arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52811,7 +54056,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; Nature::EdgeNature arg2 ; @@ -52822,20 +54067,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetNature(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetNature",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setNature",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetNature" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setNature" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_setNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); } arg2 = static_cast< Nature::EdgeNature >(val2); { try { - (arg1)->SetNature(arg2); + (arg1)->setNature(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52851,7 +54096,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -52862,20 +54107,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setFEdgeA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetFEdgeA" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setFEdgeA" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (arg1)->SetFEdgeA(arg2); + (arg1)->setFEdgeA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52891,7 +54136,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -52902,20 +54147,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setFEdgeB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetFEdgeB" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setFEdgeB" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (arg1)->SetFEdgeB(arg2); + (arg1)->setFEdgeB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52931,7 +54176,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -52942,20 +54187,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetShape(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetShape" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setShape" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (arg1)->SetShape(arg2); + (arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52971,7 +54216,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; Id *arg2 = 0 ; @@ -52982,23 +54227,23 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetId(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetId" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setId" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (arg1)->SetId((Id const &)*arg2); + (arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -53045,7 +54290,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -53056,20 +54301,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetaShape(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetaShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setaShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetaShape" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setaShape" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_setaShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (arg1)->SetaShape(arg2); + (arg1)->setaShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -53085,7 +54330,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdge_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdge_setQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; int arg2 ; @@ -53096,20 +54341,20 @@ SWIGINTERN PyObject *_wrap_ViewEdge_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_SetQI",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdge_setQI",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_SetQI" "', argument " "1"" of type '" "ViewEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_setQI" "', argument " "1"" of type '" "ViewEdge *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_SetQI" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdge_setQI" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); { try { - (arg1)->SetQI(arg2); + (arg1)->setQI(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -53267,7 +54512,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_intersect_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -53275,7 +54520,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -53323,7 +54568,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_include_in_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -53331,7 +54576,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -53887,7 +55132,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -53917,10 +55162,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(ViewEdge *,float)\n" - " pointsBegin(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -54004,7 +55246,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -54034,17 +55276,14 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(ViewEdge *,float)\n" - " pointsEnd(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } SWIGINTERN PyObject *ViewEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -54196,7 +55435,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -54223,11 +55462,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n" - " Possible C/C++ prototypes are:\n" - " ViewShape()\n" - " ViewShape(SShape *)\n" - " ViewShape(ViewShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n Possible C/C++ prototypes are:\n ViewShape()\n ViewShape(SShape *)\n ViewShape(ViewShape &)\n"); return NULL; } @@ -54300,9 +55535,9 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector< TVertex * > *arg3 = 0 ; - std::vector< FEdge * > *arg4 = 0 ; - std::vector< ViewEdge * > *arg5 = 0 ; + std::vector *arg3 = 0 ; + std::vector *arg4 = 0 ; + std::vector *arg5 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -54330,33 +55565,33 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); } - arg3 = reinterpret_cast< std::vector< TVertex * > * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); } - arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); + arg4 = reinterpret_cast< std::vector * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); } if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); } - arg5 = reinterpret_cast< std::vector< ViewEdge * > * >(argp5); + arg5 = reinterpret_cast< std::vector * >(argp5); { try { - (arg1)->SplitEdge(arg2,(std::vector< TVertex * > const &)*arg3,*arg4,*arg5); + (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4,*arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -54442,7 +55677,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -54466,10 +55701,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n" - " Possible C/C++ prototypes are:\n" - " sshape(ViewShape *)\n" - " sshape(ViewShape const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n Possible C/C++ prototypes are:\n sshape()\n sshape()\n"); return NULL; } @@ -54477,7 +55709,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector< ViewVertex * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -54491,8 +55723,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector< ViewVertex * > &_result_ref = (arg1)->vertices(); - result = (std::vector< ViewVertex * > *) &_result_ref; + std::vector &_result_ref = (arg1)->vertices(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -54502,7 +55734,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -54512,7 +55744,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector< ViewEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -54526,8 +55758,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj { try { { - std::vector< ViewEdge * > &_result_ref = (arg1)->edges(); - result = (std::vector< ViewEdge * > *) &_result_ref; + std::vector &_result_ref = (arg1)->edges(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -54537,7 +55769,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -54576,7 +55808,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShape_SetSShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShape_setSShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; SShape *arg2 = (SShape *) 0 ; @@ -54587,20 +55819,20 @@ SWIGINTERN PyObject *_wrap_ViewShape_SetSShape(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetSShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_setSShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetSShape" "', argument " "1"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_setSShape" "', argument " "1"" of type '" "ViewShape *""'"); } arg1 = reinterpret_cast< ViewShape * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetSShape" "', argument " "2"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setSShape" "', argument " "2"" of type '" "SShape *""'"); } arg2 = reinterpret_cast< SShape * >(argp2); { try { - (arg1)->SetSShape(arg2); + (arg1)->setSShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -54616,36 +55848,36 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShape_SetVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShape_setVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector< ViewVertex * > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetVertices",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_setVertices",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetVertices" "', argument " "1"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_setVertices" "', argument " "1"" of type '" "ViewShape *""'"); } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector const &""'"); } arg2 = ptr; } { try { - (arg1)->SetVertices((std::vector< ViewVertex * > const &)*arg2); + (arg1)->setVertices((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -54663,36 +55895,36 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShape_SetEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShape_setEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector< ViewEdge * > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_SetEdges",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewShape_setEdges",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_SetEdges" "', argument " "1"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShape_setEdges" "', argument " "1"" of type '" "ViewShape *""'"); } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SetEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector const &""'"); } arg2 = ptr; } { try { - (arg1)->SetEdges((std::vector< ViewEdge * > const &)*arg2); + (arg1)->setEdges((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -54872,7 +56104,7 @@ fail: SWIGINTERN PyObject *ViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -55153,7 +56385,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55212,13 +56444,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ViewVertexInternal::orientedViewEdgeIterator()\n" - " ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n" - " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n" - " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n" - " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewVertexInternal::orientedViewEdgeIterator()\n ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); return NULL; } @@ -55403,7 +56629,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55435,7 +56661,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55475,7 +56701,7 @@ fail: SWIGINTERN PyObject *ViewVertexOrientedViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -55612,7 +56838,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55659,11 +56885,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ViewEdgeInternal::SVertexIterator()\n" - " ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n" - " ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::SVertexIterator()\n ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); return NULL; } @@ -56186,7 +57408,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -56314,7 +57536,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -56668,7 +57890,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56703,7 +57925,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56713,7 +57935,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper< set< VecMat::Vec3< double > > > result; + SwigValueWrapper > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -56735,7 +57957,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -56777,7 +57999,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector< FEdge * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -56791,8 +58013,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA { try { { - std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); - result = (std::vector< FEdge * > *) &_result_ref; + std::vector const &_result_ref = (*arg1)->fedges(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -56802,7 +58024,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(*result)); + resultobj = swig::from(static_cast< std::vector > >(*result)); return resultobj; fail: return NULL; @@ -56943,7 +58165,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -56967,10 +58189,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n" - " Possible C/C++ prototypes are:\n" - " shape(ViewEdgeInternal::SVertexIterator *)\n" - " shape(ViewEdgeInternal::SVertexIterator const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); return NULL; } @@ -57039,7 +58258,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setPoint3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -57050,23 +58269,23 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint3D(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetPoint3D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setPoint3D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (*arg1)->SetPoint3D((Geometry::Vec3r const &)*arg2); + (*arg1)->setPoint3D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57082,7 +58301,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setPoint2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; Geometry::Vec3r *arg2 = 0 ; @@ -57093,23 +58312,23 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetPoint2D(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetPoint2D",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setPoint2D",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); { try { - (*arg1)->SetPoint2D((Geometry::Vec3r const &)*arg2); + (*arg1)->setPoint2D((Geometry::Vec3r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57142,7 +58361,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -57298,7 +58517,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setDirectionFredo(PyObject *S } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -57385,14 +58604,14 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_directionFredo(PyObject *SWIG cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; Id *arg2 = 0 ; @@ -57403,23 +58622,23 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetId(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setId" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (*arg1)->SetId((Id const &)*arg2); + (*arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57435,36 +58654,36 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector< FEdge * > *arg2 = 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetFEdges",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setFEdges",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_SetFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); } arg2 = ptr; } { try { - (*arg1)->SetFEdges((std::vector< FEdge * > const &)*arg2); + (*arg1)->setFEdges((std::vector const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57482,7 +58701,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; SShape *arg2 = (SShape *) 0 ; @@ -57493,20 +58712,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetShape(PyObject *SWIGUNUSED PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetShape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setShape" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetShape" "', argument " "2"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setShape" "', argument " "2"" of type '" "SShape *""'"); } arg2 = reinterpret_cast< SShape * >(argp2); { try { - (*arg1)->SetShape(arg2); + (*arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57522,7 +58741,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setViewVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -57533,20 +58752,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_SetViewVertex(PyObject *SWIGU PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_SetViewVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeSVertexIterator_setViewVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_SetViewVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setViewVertex" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_SetViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setViewVertex" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetViewVertex(arg2); + (*arg1)->setViewVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -57711,7 +58930,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57746,7 +58965,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57778,7 +58997,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -58142,7 +59361,7 @@ fail: SWIGINTERN PyObject *ViewEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -58320,7 +59539,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -58374,12 +59593,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n" - " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n" - " ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n" - " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); return NULL; } @@ -59432,7 +60646,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -59456,10 +60670,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n" - " Possible C/C++ prototypes are:\n" - " aShape(ViewEdgeInternal::ViewEdgeIterator *)\n" - " aShape(ViewEdgeInternal::ViewEdgeIterator const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); return NULL; } @@ -59563,7 +60774,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; - std::vector< ViewShape * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -59577,8 +60788,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS { try { { - std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); - result = (std::vector< ViewShape * > *) &_result_ref; + std::vector &_result_ref = (*arg1)->occluders(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -59588,7 +60799,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -59627,7 +60838,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -59638,20 +60849,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetA(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setA" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetA(arg2); + (*arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59667,7 +60878,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -59678,20 +60889,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetB(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setB" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetB(arg2); + (*arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59707,7 +60918,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; Nature::EdgeNature arg2 ; @@ -59718,20 +60929,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetNature(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetNature",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setNature",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetNature" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setNature" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_setNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); } arg2 = static_cast< Nature::EdgeNature >(val2); { try { - (*arg1)->SetNature(arg2); + (*arg1)->setNature(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59747,7 +60958,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -59758,20 +60969,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeA(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setFEdgeA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setFEdgeA" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (*arg1)->SetFEdgeA(arg2); + (*arg1)->setFEdgeA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59787,7 +60998,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -59798,20 +61009,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetFEdgeB(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setFEdgeB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setFEdgeB" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (*arg1)->SetFEdgeB(arg2); + (*arg1)->setFEdgeB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59827,7 +61038,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -59838,20 +61049,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetShape(PyObject *SWIGUNUSE PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (*arg1)->SetShape(arg2); + (*arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59867,7 +61078,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; Id *arg2 = 0 ; @@ -59878,23 +61089,23 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetId(PyObject *SWIGUNUSEDPA PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setId" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (*arg1)->SetId((Id const &)*arg2); + (*arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59941,7 +61152,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -59952,20 +61163,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetaShape(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetaShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setaShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetaShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setaShape" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_setaShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (*arg1)->SetaShape(arg2); + (*arg1)->setaShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -59981,7 +61192,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_setQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; int arg2 ; @@ -59992,20 +61203,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_SetQI(PyObject *SWIGUNUSEDPA PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_SetQI",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgeViewEdgeIterator_setQI",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_SetQI" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_setQI" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_SetQI" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgeViewEdgeIterator_setQI" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); { try { - (*arg1)->SetQI(arg2); + (*arg1)->setQI(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -60163,7 +61374,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -60171,7 +61382,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -60219,7 +61430,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -60227,7 +61438,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -60783,7 +61994,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -60813,10 +62024,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *,float)\n" - " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -60900,7 +62108,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -60930,10 +62138,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *,float)\n" - " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } @@ -61037,7 +62242,7 @@ fail: SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -61045,7 +62250,7 @@ SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDP SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< void > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVoid",&obj0)) SWIG_fail; @@ -61054,9 +62259,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< void > *)new SwigDirector_UnaryFunction0DVoid(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVoid(arg1); } else { - result = (UnaryFunction0D< void > *)new UnaryFunction0D< void >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -61067,7 +62272,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -61076,17 +62281,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -61108,7 +62313,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -61117,20 +62322,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D< void > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< void > const *)arg1)->UnaryFunction0D< void >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); } else { - result = ((UnaryFunction0D< void > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -61152,7 +62357,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -61164,11 +62369,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVoid___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -61183,7 +62388,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction0D< void >::operator ()(*arg2); + (arg1)->UnaryFunction0D::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -61207,17 +62412,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -61232,15 +62437,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< unsigned int > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; @@ -61249,9 +62454,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< unsigned int > *)new SwigDirector_UnaryFunction0DUnsigned(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DUnsigned(arg1); } else { - result = (UnaryFunction0D< unsigned int > *)new UnaryFunction0D< unsigned int >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -61262,7 +62467,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -61271,17 +62476,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -61303,7 +62508,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -61312,20 +62517,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< unsigned int > const *)arg1)->UnaryFunction0D< unsigned int >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); } else { - result = ((UnaryFunction0D< unsigned int > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -61347,7 +62552,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -61360,11 +62565,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -61379,7 +62584,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction0D< unsigned int >::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction0D::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -61403,17 +62608,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -61428,15 +62633,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< float > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DFloat",&obj0)) SWIG_fail; @@ -61445,9 +62650,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< float > *)new SwigDirector_UnaryFunction0DFloat(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DFloat(arg1); } else { - result = (UnaryFunction0D< float > *)new UnaryFunction0D< float >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -61458,7 +62663,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -61467,17 +62672,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -61499,7 +62704,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -61508,20 +62713,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< float > const *)arg1)->UnaryFunction0D< float >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); } else { - result = ((UnaryFunction0D< float > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -61543,7 +62748,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -61556,11 +62761,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DFloat___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -61575,7 +62780,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction0D< float >::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction0D::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -61599,17 +62804,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -61624,15 +62829,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< double > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DDouble",&obj0)) SWIG_fail; @@ -61641,9 +62846,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< double > *)new SwigDirector_UnaryFunction0DDouble(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DDouble(arg1); } else { - result = (UnaryFunction0D< double > *)new UnaryFunction0D< double >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -61654,7 +62859,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -61663,17 +62868,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -61695,7 +62900,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -61704,20 +62909,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< double > const *)arg1)->UnaryFunction0D< double >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); } else { - result = ((UnaryFunction0D< double > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -61739,7 +62944,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -61752,11 +62957,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DDouble___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -61771,7 +62976,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction0D< double >::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction0D::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -61795,17 +63000,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -61820,15 +63025,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< Geometry::Vec2f > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec2f",&obj0)) SWIG_fail; @@ -61837,9 +63042,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction0DVec2f(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec2f(arg1); } else { - result = (UnaryFunction0D< Geometry::Vec2f > *)new UnaryFunction0D< Geometry::Vec2f >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -61850,7 +63055,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -61859,17 +63064,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -61891,7 +63096,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -61900,20 +63105,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->UnaryFunction0D< VecMat::Vec2< float > >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); } else { - result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -61935,9 +63140,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec2< float > result; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -61948,11 +63153,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -61967,7 +63172,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D< VecMat::Vec2< float > >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -61982,7 +63187,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -61991,17 +63196,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62016,15 +63221,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< Geometry::Vec3f > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec3f",&obj0)) SWIG_fail; @@ -62033,9 +63238,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction0DVec3f(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec3f(arg1); } else { - result = (UnaryFunction0D< Geometry::Vec3f > *)new UnaryFunction0D< Geometry::Vec3f >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -62046,7 +63251,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62055,17 +63260,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -62087,7 +63292,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62096,20 +63301,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->UnaryFunction0D< VecMat::Vec3< float > >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); } else { - result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62131,9 +63336,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec3< float > result; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -62144,11 +63349,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62163,7 +63368,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D< VecMat::Vec3< float > >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -62178,7 +63383,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -62187,17 +63392,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62212,15 +63417,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D< Id > *result = 0 ; + UnaryFunction0D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DId",&obj0)) SWIG_fail; @@ -62229,9 +63434,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D< Id > *)new SwigDirector_UnaryFunction0DId(arg1); + result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DId(arg1); } else { - result = (UnaryFunction0D< Id > *)new UnaryFunction0D< Id >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } } @@ -62242,7 +63447,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62251,17 +63456,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -62283,7 +63488,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62292,20 +63497,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(se bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DId_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D< Id > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D< Id > const *)arg1)->UnaryFunction0D< Id >::getName(); + result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); } else { - result = ((UnaryFunction0D< Id > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62327,7 +63532,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; Id result; void *argp1 = 0 ; @@ -62340,11 +63545,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DId___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DId___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62359,7 +63564,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s { try { if (upcall) { - result = (arg1)->UnaryFunction0D< Id >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -62383,17 +63588,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62408,19 +63613,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DId_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< ViewShape * > *result = 0 ; + UnaryFunction0D *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D< ViewShape * > *)new UnaryFunction0D< ViewShape * >(); + result = (UnaryFunction0D *)new UnaryFunction0D(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -62429,7 +63634,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62438,17 +63643,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { delete arg1; @@ -62470,21 +63675,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); { try { - result = ((UnaryFunction0D< ViewShape * > const *)arg1)->getName(); + result = ((UnaryFunction0D const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -62502,7 +63707,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; + UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; Interface0DIterator *arg2 = 0 ; ViewShape *result = 0 ; void *argp1 = 0 ; @@ -62513,11 +63718,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62546,19 +63751,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< std::vector< ViewShape * > > *result = 0 ; + UnaryFunction0D > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D< std::vector< ViewShape * > > *)new UnaryFunction0D< std::vector< ViewShape * > >(); + result = (UnaryFunction0D > *)new UnaryFunction0D >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -62567,7 +63772,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62576,17 +63781,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); { try { delete arg1; @@ -62608,21 +63813,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); { try { - result = ((UnaryFunction0D< std::vector< ViewShape * > > const *)arg1)->getName(); + result = ((UnaryFunction0D > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -62640,9 +63845,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -62651,11 +63856,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62675,7 +63880,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -62684,8 +63889,8 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -62822,7 +64027,7 @@ fail: SWIGINTERN PyObject *GetXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -62960,7 +64165,7 @@ fail: SWIGINTERN PyObject *GetYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63098,7 +64303,7 @@ fail: SWIGINTERN PyObject *GetZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63236,7 +64441,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63374,7 +64579,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63512,7 +64717,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63650,7 +64855,7 @@ fail: SWIGINTERN PyObject *GetCurvilinearAbscissaF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63788,7 +64993,7 @@ fail: SWIGINTERN PyObject *GetParameterF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -63862,7 +65067,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -63926,7 +65131,7 @@ fail: SWIGINTERN PyObject *VertexOrientation2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64000,7 +65205,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -64064,7 +65269,7 @@ fail: SWIGINTERN PyObject *VertexOrientation3DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64202,7 +65407,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64340,7 +65545,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64414,7 +65619,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -64478,7 +65683,7 @@ fail: SWIGINTERN PyObject *Normal2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64616,7 +65821,7 @@ fail: SWIGINTERN PyObject *MaterialF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64754,7 +65959,7 @@ fail: SWIGINTERN PyObject *ShapeIdF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64892,7 +66097,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65030,7 +66235,7 @@ fail: SWIGINTERN PyObject *CurveNatureF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65168,7 +66373,7 @@ fail: SWIGINTERN PyObject *GetShapeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65209,7 +66414,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -65242,7 +66447,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -65306,7 +66511,7 @@ fail: SWIGINTERN PyObject *GetOccludersF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65444,7 +66649,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65499,7 +66704,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< void > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVoid",&obj0)) SWIG_fail; @@ -65508,9 +66713,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1); } else { - result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -65521,7 +66726,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -65532,7 +66737,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< void > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -65549,9 +66754,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); } else { - result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -65562,7 +66767,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -65575,7 +66780,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -65601,27 +66806,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< void >(PyObject *)\n" - " UnaryFunction1D< void >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(void)>(PyObject *)\n UnaryFunction1D<(void)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -65643,7 +66845,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -65652,20 +66854,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< void > const *)arg1)->UnaryFunction1D< void >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); } else { - result = ((UnaryFunction1D< void > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -65687,7 +66889,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -65699,11 +66901,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVoid___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -65718,7 +66920,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction1D< void >::operator ()(*arg2); + (arg1)->UnaryFunction1D::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -65742,7 +66944,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -65752,11 +66954,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIG PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -65782,21 +66984,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< void > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -65814,17 +67016,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -65839,15 +67041,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< unsigned int > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; @@ -65856,9 +67058,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1); } else { - result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -65869,7 +67071,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -65880,7 +67082,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< unsigned int > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -65897,9 +67099,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); } else { - result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -65910,7 +67112,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -65923,7 +67125,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -65949,27 +67151,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< unsigned int >(PyObject *)\n" - " UnaryFunction1D< unsigned int >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(unsigned int)>(PyObject *)\n UnaryFunction1D<(unsigned int)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -65991,7 +67190,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -66000,20 +67199,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< unsigned int > const *)arg1)->UnaryFunction1D< unsigned int >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); } else { - result = ((UnaryFunction1D< unsigned int > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -66035,7 +67234,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -66048,11 +67247,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -66067,7 +67266,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction1D< unsigned int >::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction1D::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -66091,7 +67290,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66101,11 +67300,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -66131,21 +67330,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< unsigned int > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -66163,17 +67362,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -66188,15 +67387,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< float > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DFloat",&obj0)) SWIG_fail; @@ -66205,9 +67404,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1); } else { - result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -66218,7 +67417,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66229,7 +67428,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< float > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -66246,9 +67445,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); } else { - result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -66259,7 +67458,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66272,7 +67471,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -66298,27 +67497,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< float >(PyObject *)\n" - " UnaryFunction1D< float >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(float)>(PyObject *)\n UnaryFunction1D<(float)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -66340,7 +67536,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -66349,20 +67545,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< float > const *)arg1)->UnaryFunction1D< float >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); } else { - result = ((UnaryFunction1D< float > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -66384,7 +67580,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -66397,11 +67593,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DFloat___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -66416,7 +67612,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction1D< float >::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction1D::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -66440,7 +67636,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66450,11 +67646,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -66480,21 +67676,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< float > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -66512,17 +67708,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -66537,15 +67733,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< double > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DDouble",&obj0)) SWIG_fail; @@ -66554,9 +67750,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1); } else { - result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -66567,7 +67763,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66578,7 +67774,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< double > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -66595,9 +67791,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); } else { - result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -66608,7 +67804,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66621,7 +67817,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -66647,27 +67843,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< double >(PyObject *)\n" - " UnaryFunction1D< double >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(double)>(PyObject *)\n UnaryFunction1D<(double)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -66689,7 +67882,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -66698,20 +67891,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< double > const *)arg1)->UnaryFunction1D< double >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); } else { - result = ((UnaryFunction1D< double > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -66733,7 +67926,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -66746,11 +67939,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DDouble___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -66765,7 +67958,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction1D< double >::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction1D::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -66789,7 +67982,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66799,11 +67992,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SW PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -66829,21 +68022,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< double > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -66861,17 +68054,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -66886,15 +68079,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< Geometry::Vec2f > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec2f",&obj0)) SWIG_fail; @@ -66903,9 +68096,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1); } else { - result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -66916,7 +68109,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66927,7 +68120,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< Geometry::Vec2f > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -66944,9 +68137,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); } else { - result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -66957,7 +68150,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66970,7 +68163,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -66996,27 +68189,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< Geometry::Vec2f >(PyObject *)\n" - " UnaryFunction1D< Geometry::Vec2f >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -67038,7 +68228,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67047,20 +68237,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->UnaryFunction1D< VecMat::Vec2< float > >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); } else { - result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67082,9 +68272,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec2< float > result; + VecMat::Vec2 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -67095,11 +68285,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67114,7 +68304,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D< VecMat::Vec2< float > >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -67129,7 +68319,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -67138,7 +68328,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67148,11 +68338,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67178,21 +68368,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67210,17 +68400,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67235,15 +68425,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D< Geometry::Vec3f > *result = 0 ; + UnaryFunction1D *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec3f",&obj0)) SWIG_fail; @@ -67252,9 +68442,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1); } else { - result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(); + result = (UnaryFunction1D *)new UnaryFunction1D(); } } @@ -67265,7 +68455,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67276,7 +68466,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D< Geometry::Vec3f > *result = 0 ; + UnaryFunction1D *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67293,9 +68483,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); + result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); } else { - result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(arg2); + result = (UnaryFunction1D *)new UnaryFunction1D(arg2); } } @@ -67306,7 +68496,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67319,7 +68509,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67345,27 +68535,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< Geometry::Vec3f >(PyObject *)\n" - " UnaryFunction1D< Geometry::Vec3f >(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { delete arg1; @@ -67387,7 +68574,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67396,20 +68583,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->UnaryFunction1D< VecMat::Vec3< float > >::getName(); + result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); } else { - result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getName(); + result = ((UnaryFunction1D const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67431,9 +68618,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec3< float > result; + VecMat::Vec3 result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -67444,11 +68631,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67463,7 +68650,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D< VecMat::Vec3< float > >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -67478,7 +68665,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -67487,7 +68674,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67497,11 +68684,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67527,21 +68714,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67559,17 +68746,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; + UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67584,19 +68771,19 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; + UnaryFunction1D > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction1DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(); + result = (UnaryFunction1D > *)new UnaryFunction1D >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67605,7 +68792,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67615,7 +68802,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IntegrationType arg1 ; - UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; + UnaryFunction1D > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -67628,7 +68815,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * arg1 = static_cast< IntegrationType >(val1); { try { - result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(arg1); + result = (UnaryFunction1D > *)new UnaryFunction1D >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67637,7 +68824,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67650,7 +68837,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67669,27 +68856,24 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n" - " Possible C/C++ prototypes are:\n" - " UnaryFunction1D< std::vector< ViewShape * > >()\n" - " UnaryFunction1D< std::vector< ViewShape * > >(IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>()\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>(IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); { try { delete arg1; @@ -67711,21 +68895,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); { try { - result = ((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getName(); + result = ((UnaryFunction1D > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67743,9 +68927,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; Interface1D *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -67754,11 +68938,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67778,7 +68962,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -67787,7 +68971,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67797,11 +68981,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67827,21 +69011,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; + UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67859,8 +69043,8 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68006,7 +69190,7 @@ fail: SWIGINTERN PyObject *GetXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68072,7 +69256,7 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68091,10 +69275,7 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetYF1D(IntegrationType)\n" - " Functions1D::GetYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetYF1D(IntegrationType)\n Functions1D::GetYF1D()\n"); return NULL; } @@ -68209,7 +69390,7 @@ fail: SWIGINTERN PyObject *GetYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68275,7 +69456,7 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68294,10 +69475,7 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetZF1D(IntegrationType)\n" - " Functions1D::GetZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetZF1D(IntegrationType)\n Functions1D::GetZF1D()\n"); return NULL; } @@ -68412,7 +69590,7 @@ fail: SWIGINTERN PyObject *GetZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68478,7 +69656,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68497,10 +69675,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetProjectedXF1D(IntegrationType)\n" - " Functions1D::GetProjectedXF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedXF1D(IntegrationType)\n Functions1D::GetProjectedXF1D()\n"); return NULL; } @@ -68615,7 +69790,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68681,7 +69856,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68700,10 +69875,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetProjectedYF1D(IntegrationType)\n" - " Functions1D::GetProjectedYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedYF1D(IntegrationType)\n Functions1D::GetProjectedYF1D()\n"); return NULL; } @@ -68818,7 +69990,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -68884,7 +70056,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68903,10 +70075,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetProjectedZF1D(IntegrationType)\n" - " Functions1D::GetProjectedZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedZF1D(IntegrationType)\n Functions1D::GetProjectedZF1D()\n"); return NULL; } @@ -69021,7 +70190,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69087,7 +70256,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69106,10 +70275,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::Orientation2DF1D(IntegrationType)\n" - " Functions1D::Orientation2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation2DF1D(IntegrationType)\n Functions1D::Orientation2DF1D()\n"); return NULL; } @@ -69183,7 +70349,7 @@ SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -69224,7 +70390,7 @@ fail: SWIGINTERN PyObject *Orientation2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69290,7 +70456,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69309,10 +70475,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::Orientation3DF1D(IntegrationType)\n" - " Functions1D::Orientation3DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation3DF1D(IntegrationType)\n Functions1D::Orientation3DF1D()\n"); return NULL; } @@ -69386,7 +70549,7 @@ SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -69427,7 +70590,7 @@ fail: SWIGINTERN PyObject *Orientation3DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69493,7 +70656,7 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69512,10 +70675,7 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::ZDiscontinuityF1D(IntegrationType)\n" - " Functions1D::ZDiscontinuityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::ZDiscontinuityF1D(IntegrationType)\n Functions1D::ZDiscontinuityF1D()\n"); return NULL; } @@ -69630,7 +70790,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69696,7 +70856,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69715,10 +70875,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n" - " Functions1D::QuantitativeInvisibilityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n Functions1D::QuantitativeInvisibilityF1D()\n"); return NULL; } @@ -69833,7 +70990,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69899,7 +71056,7 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69918,10 +71075,7 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::CurveNatureF1D(IntegrationType)\n" - " Functions1D::CurveNatureF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n Possible C/C++ prototypes are:\n Functions1D::CurveNatureF1D(IntegrationType)\n Functions1D::CurveNatureF1D()\n"); return NULL; } @@ -70036,7 +71190,7 @@ fail: SWIGINTERN PyObject *CurveNatureF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70173,7 +71327,7 @@ fail: SWIGINTERN PyObject *TimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70310,7 +71464,7 @@ fail: SWIGINTERN PyObject *IncrementChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70447,7 +71601,7 @@ fail: SWIGINTERN PyObject *ChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70513,7 +71667,7 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70532,10 +71686,7 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::Curvature2DAngleF1D(IntegrationType)\n" - " Functions1D::Curvature2DAngleF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Curvature2DAngleF1D(IntegrationType)\n Functions1D::Curvature2DAngleF1D()\n"); return NULL; } @@ -70650,7 +71801,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70716,7 +71867,7 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70735,10 +71886,7 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::Normal2DF1D(IntegrationType)\n" - " Functions1D::Normal2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Normal2DF1D(IntegrationType)\n Functions1D::Normal2DF1D()\n"); return NULL; } @@ -70812,7 +71960,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -70853,7 +72001,7 @@ fail: SWIGINTERN PyObject *Normal2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70917,7 +72065,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -70950,7 +72098,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -70991,7 +72139,7 @@ fail: SWIGINTERN PyObject *GetShapeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71055,7 +72203,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -71088,7 +72236,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -71129,7 +72277,7 @@ fail: SWIGINTERN PyObject *GetOccludersF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71193,7 +72341,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector< ViewShape *,std::allocator< ViewShape * > > result; + std::vector > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -71226,7 +72374,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -71267,7 +72415,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71331,7 +72479,7 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71350,10 +72498,7 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n" - " Possible C/C++ prototypes are:\n" - " setAlwaysRefresh(bool)\n" - " Module::setAlwaysRefresh()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n Possible C/C++ prototypes are:\n setAlwaysRefresh(bool)\n Module::setAlwaysRefresh()\n"); return NULL; } @@ -71417,7 +72562,7 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71436,10 +72581,7 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n" - " Possible C/C++ prototypes are:\n" - " setCausal(bool)\n" - " Module::setCausal()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n Possible C/C++ prototypes are:\n setCausal(bool)\n Module::setCausal()\n"); return NULL; } @@ -71503,7 +72645,7 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71522,10 +72664,7 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n" - " Possible C/C++ prototypes are:\n" - " setDrawable(bool)\n" - " Module::setDrawable()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n Possible C/C++ prototypes are:\n setDrawable(bool)\n Module::setDrawable()\n"); return NULL; } @@ -71656,7 +72795,7 @@ fail: SWIGINTERN PyObject *Module_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Module, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71722,7 +72861,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71741,10 +72880,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions0D::DensityF0D(double)\n" - " Functions0D::DensityF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n Possible C/C++ prototypes are:\n Functions0D::DensityF0D(double)\n Functions0D::DensityF0D()\n"); return NULL; } @@ -71859,7 +72995,7 @@ fail: SWIGINTERN PyObject *DensityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__DensityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71925,7 +73061,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71944,10 +73080,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions0D::LocalAverageDepthF0D(real)\n" - " Functions0D::LocalAverageDepthF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n Possible C/C++ prototypes are:\n Functions0D::LocalAverageDepthF0D(real)\n Functions0D::LocalAverageDepthF0D()\n"); return NULL; } @@ -72062,7 +73195,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72221,7 +73354,7 @@ fail: SWIGINTERN PyObject *ReadMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72377,7 +73510,7 @@ fail: SWIGINTERN PyObject *ReadSteerableViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72524,7 +73657,7 @@ fail: SWIGINTERN PyObject *ReadCompleteViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72671,7 +73804,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72828,7 +73961,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72885,12 +74018,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::DensityF1D(double,IntegrationType,float)\n" - " Functions1D::DensityF1D(double,IntegrationType)\n" - " Functions1D::DensityF1D(double)\n" - " Functions1D::DensityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::DensityF1D(double,IntegrationType,float)\n Functions1D::DensityF1D(double,IntegrationType)\n Functions1D::DensityF1D(double)\n Functions1D::DensityF1D()\n"); return NULL; } @@ -73005,7 +74133,7 @@ fail: SWIGINTERN PyObject *DensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__DensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73089,7 +74217,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73121,10 +74249,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n" - " Functions1D::LocalAverageDepthF1D(real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n Possible C/C++ prototypes are:\n Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n Functions1D::LocalAverageDepthF1D(real)\n"); return NULL; } @@ -73239,7 +74364,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73373,7 +74498,7 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73427,11 +74552,7 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n" - " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n" - " Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); return NULL; } @@ -73546,7 +74667,7 @@ fail: SWIGINTERN PyObject *GetCompleteViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73707,7 +74828,7 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73779,11 +74900,7 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n" - " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n" - " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); return NULL; } @@ -73898,7 +75015,7 @@ fail: SWIGINTERN PyObject *GetDirectionalViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74032,7 +75149,7 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74086,11 +75203,7 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n" - " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n" - " Functions1D::GetSteerableViewMapDensityF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n Functions1D::GetSteerableViewMapDensityF1D(int)\n"); return NULL; } @@ -74205,7 +75318,7 @@ fail: SWIGINTERN PyObject *GetSteerableViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74339,7 +75452,7 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74393,11 +75506,7 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n" - " Possible C/C++ prototypes are:\n" - " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n" - " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n" - " Functions1D::GetViewMapGradientNormF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n Functions1D::GetViewMapGradientNormF1D(int)\n"); return NULL; } @@ -74512,7 +75621,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74757,7 +75866,7 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74817,11 +75926,7 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n" - " Possible C/C++ prototypes are:\n" - " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n" - " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n" - " ContextFunctions::LoadMapCF(char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n Possible C/C++ prototypes are:\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n ContextFunctions::LoadMapCF(char const *,char const *)\n"); return NULL; } @@ -75207,7 +76312,7 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75269,13 +76374,7 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n" - " Possible C/C++ prototypes are:\n" - " AdjacencyIterator()\n" - " AdjacencyIterator(ViewVertex *,bool,bool)\n" - " AdjacencyIterator(ViewVertex *,bool)\n" - " AdjacencyIterator(ViewVertex *)\n" - " AdjacencyIterator(AdjacencyIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n Possible C/C++ prototypes are:\n AdjacencyIterator()\n AdjacencyIterator(ViewVertex *,bool,bool)\n AdjacencyIterator(ViewVertex *,bool)\n AdjacencyIterator(ViewVertex *)\n AdjacencyIterator(AdjacencyIterator const &)\n"); return NULL; } @@ -75880,7 +76979,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75904,10 +77003,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n" - " Possible C/C++ prototypes are:\n" - " aShape(AdjacencyIterator *)\n" - " aShape(AdjacencyIterator const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); return NULL; } @@ -76011,7 +77107,7 @@ fail: SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; - std::vector< ViewShape * > *result = 0 ; + std::vector *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -76025,8 +77121,8 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( { try { { - std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); - result = (std::vector< ViewShape * > *) &_result_ref; + std::vector &_result_ref = (*arg1)->occluders(); + result = (std::vector *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -76036,7 +77132,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -76075,7 +77171,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -76086,20 +77182,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetA(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetA" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setA" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetA(arg2); + (*arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76115,7 +77211,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; ViewVertex *arg2 = (ViewVertex *) 0 ; @@ -76126,20 +77222,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetB(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetB" "', argument " "2"" of type '" "ViewVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setB" "', argument " "2"" of type '" "ViewVertex *""'"); } arg2 = reinterpret_cast< ViewVertex * >(argp2); { try { - (*arg1)->SetB(arg2); + (*arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76155,7 +77251,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setNature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; Nature::EdgeNature arg2 ; @@ -76166,20 +77262,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetNature(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetNature",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setNature",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetNature" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setNature" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_SetNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_setNature" "', argument " "2"" of type '" "Nature::EdgeNature""'"); } arg2 = static_cast< Nature::EdgeNature >(val2); { try { - (*arg1)->SetNature(arg2); + (*arg1)->setNature(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76195,7 +77291,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setFEdgeA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -76206,20 +77302,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeA(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetFEdgeA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setFEdgeA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetFEdgeA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setFEdgeA" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setFEdgeA" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (*arg1)->SetFEdgeA(arg2); + (*arg1)->setFEdgeA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76235,7 +77331,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setFEdgeB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -76246,20 +77342,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetFEdgeB(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetFEdgeB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setFEdgeB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetFEdgeB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setFEdgeB" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setFEdgeB" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (*arg1)->SetFEdgeB(arg2); + (*arg1)->setFEdgeB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76275,7 +77371,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -76286,20 +77382,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetShape(PyObject *SWIGUNUSEDPARM(s PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (*arg1)->SetShape(arg2); + (*arg1)->setShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76315,7 +77411,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; Id *arg2 = 0 ; @@ -76326,23 +77422,23 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetId(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetId" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setId" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (*arg1)->SetId((Id const &)*arg2); + (*arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76389,7 +77485,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setaShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; ViewShape *arg2 = (ViewShape *) 0 ; @@ -76400,20 +77496,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetaShape(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetaShape",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setaShape",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetaShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setaShape" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_ViewShape, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_SetaShape" "', argument " "2"" of type '" "ViewShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_setaShape" "', argument " "2"" of type '" "ViewShape *""'"); } arg2 = reinterpret_cast< ViewShape * >(argp2); { try { - (*arg1)->SetaShape(arg2); + (*arg1)->setaShape(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76429,7 +77525,7 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_setQI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; int arg2 ; @@ -76440,20 +77536,20 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_SetQI(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_SetQI",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:AdjacencyIterator_setQI",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_SetQI" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_setQI" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_SetQI" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AdjacencyIterator_setQI" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); { try { - (*arg1)->SetQI(arg2); + (*arg1)->setQI(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -76611,7 +77707,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -76619,7 +77715,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -76667,7 +77763,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -76675,7 +77771,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -77231,7 +78327,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -77261,10 +78357,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(AdjacencyIterator *,float)\n" - " pointsBegin(AdjacencyIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -77348,7 +78441,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -77378,10 +78471,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(AdjacencyIterator *,float)\n" - " pointsEnd(AdjacencyIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } @@ -77460,7 +78550,7 @@ fail: SWIGINTERN PyObject *AdjacencyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_AdjacencyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -77765,7 +78855,7 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -77875,14 +78965,7 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" - " ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n" - " ChainingIterator(PyObject *,bool,bool)\n" - " ChainingIterator(PyObject *,bool)\n" - " ChainingIterator(PyObject *)\n" - " ChainingIterator(PyObject *,ChainingIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n Possible C/C++ prototypes are:\n ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n ChainingIterator(PyObject *,bool,bool)\n ChainingIterator(PyObject *,bool)\n ChainingIterator(PyObject *)\n ChainingIterator(PyObject *,ChainingIterator const &)\n"); return NULL; } @@ -78242,7 +79325,7 @@ fail: SWIGINTERN PyObject *ChainingIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainingIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -78479,7 +79562,7 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78558,13 +79641,7 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n" - " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n" - " ChainSilhouetteIterator(PyObject *,bool)\n" - " ChainSilhouetteIterator(PyObject *)\n" - " ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n Possible C/C++ prototypes are:\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n ChainSilhouetteIterator(PyObject *,bool)\n ChainSilhouetteIterator(PyObject *)\n ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); return NULL; } @@ -78731,7 +79808,7 @@ fail: SWIGINTERN PyObject *ChainSilhouetteIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainSilhouetteIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -79406,7 +80483,7 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 7); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -79659,19 +80736,7 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n" - " Possible C/C++ prototypes are:\n" - " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" - " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n" - " ChainPredicateIterator(PyObject *,bool,bool)\n" - " ChainPredicateIterator(PyObject *,bool)\n" - " ChainPredicateIterator(PyObject *)\n" - " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n" - " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n" - " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n" - " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n" - " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n" - " ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n Possible C/C++ prototypes are:\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,bool,bool)\n ChainPredicateIterator(PyObject *,bool)\n ChainPredicateIterator(PyObject *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); return NULL; } @@ -79838,7 +80903,7 @@ fail: SWIGINTERN PyObject *ChainPredicateIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainPredicateIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80034,7 +81099,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80184,7 +81249,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80322,7 +81387,7 @@ fail: SWIGINTERN PyObject *TrueUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80460,7 +81525,7 @@ fail: SWIGINTERN PyObject *FalseUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80656,7 +81721,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80864,7 +81929,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81002,7 +82067,7 @@ fail: SWIGINTERN PyObject *TrueUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81140,7 +82205,7 @@ fail: SWIGINTERN PyObject *FalseUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81206,7 +82271,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -81225,10 +82290,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n" - " Possible C/C++ prototypes are:\n" - " Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n" - " Predicates1D::QuantitativeInvisibilityUP1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n Predicates1D::QuantitativeInvisibilityUP1D()\n"); return NULL; } @@ -81343,7 +82405,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81481,7 +82543,7 @@ fail: SWIGINTERN PyObject *ContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81619,7 +82681,7 @@ fail: SWIGINTERN PyObject *ExternalContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81766,7 +82828,7 @@ fail: SWIGINTERN PyObject *EqualToTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81913,7 +82975,7 @@ fail: SWIGINTERN PyObject *EqualToChainingTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81997,7 +83059,7 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -82029,10 +83091,7 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n" - " Possible C/C++ prototypes are:\n" - " Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n" - " Predicates1D::ShapeUP1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n Predicates1D::ShapeUP1D(unsigned int)\n"); return NULL; } @@ -82147,7 +83206,7 @@ fail: SWIGINTERN PyObject *ShapeUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82297,7 +83356,7 @@ fail: SWIGINTERN PyObject *TrueBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82447,7 +83506,7 @@ fail: SWIGINTERN PyObject *FalseBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82597,7 +83656,7 @@ fail: SWIGINTERN PyObject *Length2DBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82747,7 +83806,7 @@ fail: SWIGINTERN PyObject *SameShapeIdBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82881,7 +83940,7 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -82935,11 +83994,7 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n" - " Possible C/C++ prototypes are:\n" - " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n" - " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n" - " Predicates1D::ViewMapGradientNormBP1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n Predicates1D::ViewMapGradientNormBP1D(int)\n"); return NULL; } @@ -83066,7 +84121,7 @@ fail: SWIGINTERN PyObject *ViewMapGradientNormBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83150,7 +84205,7 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -83182,10 +84237,7 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n" - " Possible C/C++ prototypes are:\n" - " Predicates1D::DensityLowerThanUP1D(double,double)\n" - " Predicates1D::DensityLowerThanUP1D(double)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::DensityLowerThanUP1D(double,double)\n Predicates1D::DensityLowerThanUP1D(double)\n"); return NULL; } @@ -83300,7 +84352,7 @@ fail: SWIGINTERN PyObject *DensityLowerThanUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -84016,7 +85068,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -84043,11 +85095,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n" - " Possible C/C++ prototypes are:\n" - " CurveInternal::CurvePointIterator(float)\n" - " CurveInternal::CurvePointIterator()\n" - " CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n Possible C/C++ prototypes are:\n CurveInternal::CurvePointIterator(float)\n CurveInternal::CurvePointIterator()\n CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); return NULL; } @@ -84476,7 +85524,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -84604,7 +85652,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -84943,7 +85991,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePointIterator_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -84954,20 +86002,20 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_SetA(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetA" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_setA" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_SetA" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_setA" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (*arg1)->SetA(arg2); + (*arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -84983,7 +86031,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePointIterator_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -84994,20 +86042,20 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_SetB(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetB" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_setB" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_SetB" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePointIterator_setB" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (*arg1)->SetB(arg2); + (*arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -85023,7 +86071,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePointIterator_setT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; float arg2 ; @@ -85034,20 +86082,20 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_SetT2d",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePointIterator_setT2d",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_SetT2d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_setT2d" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator_SetT2d" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePointIterator_setT2d" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (*arg1)->SetT2d(arg2); + (*arg1)->setT2d(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -85123,7 +86171,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -85158,7 +86206,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -85190,7 +86238,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85545,7 +86593,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85554,7 +86602,7 @@ fail: SWIGINTERN PyObject *CurvePointIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -85712,7 +86760,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85840,7 +86888,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86247,7 +87295,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -86304,12 +87352,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n" - " Possible C/C++ prototypes are:\n" - " CurvePoint()\n" - " CurvePoint(SVertex *,SVertex *,float)\n" - " CurvePoint(CurvePoint *,CurvePoint *,float)\n" - " CurvePoint(CurvePoint const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n Possible C/C++ prototypes are:\n CurvePoint()\n CurvePoint(SVertex *,SVertex *,float)\n CurvePoint(CurvePoint *,CurvePoint *,float)\n CurvePoint(CurvePoint const &)\n"); return NULL; } @@ -86486,7 +87529,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePoint_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePoint_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurvePoint *arg1 = (CurvePoint *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -86497,20 +87540,20 @@ SWIGINTERN PyObject *_wrap_CurvePoint_SetA(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetA" "', argument " "1"" of type '" "CurvePoint *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_setA" "', argument " "1"" of type '" "CurvePoint *""'"); } arg1 = reinterpret_cast< CurvePoint * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_SetA" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_setA" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetA(arg2); + (arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -86526,7 +87569,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePoint_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePoint_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurvePoint *arg1 = (CurvePoint *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -86537,20 +87580,20 @@ SWIGINTERN PyObject *_wrap_CurvePoint_SetB(PyObject *SWIGUNUSEDPARM(self), PyObj PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetB" "', argument " "1"" of type '" "CurvePoint *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_setB" "', argument " "1"" of type '" "CurvePoint *""'"); } arg1 = reinterpret_cast< CurvePoint * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_SetB" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CurvePoint_setB" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->SetB(arg2); + (arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -86566,7 +87609,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePoint_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePoint_setT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurvePoint *arg1 = (CurvePoint *) 0 ; float arg2 ; @@ -86577,20 +87620,20 @@ SWIGINTERN PyObject *_wrap_CurvePoint_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_SetT2d",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:CurvePoint_setT2d",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurvePoint, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_SetT2d" "', argument " "1"" of type '" "CurvePoint *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePoint_setT2d" "', argument " "1"" of type '" "CurvePoint *""'"); } arg1 = reinterpret_cast< CurvePoint * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePoint_SetT2d" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CurvePoint_setT2d" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetT2d(arg2); + (arg1)->setT2d(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -86666,7 +87709,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86701,7 +87744,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86733,7 +87776,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -87088,7 +88131,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -87097,7 +88140,7 @@ fail: SWIGINTERN PyObject *CurvePoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurvePoint, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -87201,7 +88244,7 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87226,11 +88269,7 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n" - " Possible C/C++ prototypes are:\n" - " Curve()\n" - " Curve(Id const &)\n" - " Curve(Curve const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n Possible C/C++ prototypes are:\n Curve()\n Curve(Id const &)\n Curve(Curve const &)\n"); return NULL; } @@ -87384,7 +88423,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87418,10 +88457,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n" - " Possible C/C++ prototypes are:\n" - " push_vertex_back(Curve *,Curve::Vertex *)\n" - " push_vertex_back(Curve *,SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n Possible C/C++ prototypes are:\n push_vertex_back(Curve::Vertex *)\n push_vertex_back(SVertex *)\n"); return NULL; } @@ -87512,7 +88548,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87546,10 +88582,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n" - " Possible C/C++ prototypes are:\n" - " push_vertex_front(Curve *,Curve::Vertex *)\n" - " push_vertex_front(Curve *,SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n Possible C/C++ prototypes are:\n push_vertex_front(Curve::Vertex *)\n push_vertex_front(SVertex *)\n"); return NULL; } @@ -87804,7 +88837,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87834,10 +88867,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " curvePointsBegin(Curve *,float)\n" - " curvePointsBegin(Curve *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n Possible C/C++ prototypes are:\n curvePointsBegin(float)\n curvePointsBegin()\n"); return NULL; } @@ -87921,7 +88951,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87951,10 +88981,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " curvePointsEnd(Curve *,float)\n" - " curvePointsEnd(Curve *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n Possible C/C++ prototypes are:\n curvePointsEnd(float)\n curvePointsEnd()\n"); return NULL; } @@ -88166,7 +89193,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88196,10 +89223,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(Curve *,float)\n" - " pointsBegin(Curve *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -88283,7 +89307,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88313,17 +89337,14 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(Curve *,float)\n" - " pointsEnd(Curve *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } SWIGINTERN PyObject *Curve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Curve, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -88451,7 +89472,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88484,11 +89505,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeInternal::StrokeVertexIterator()\n" - " StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n" - " StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n Possible C/C++ prototypes are:\n StrokeInternal::StrokeVertexIterator()\n StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); return NULL; } @@ -89046,7 +90063,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -89129,7 +90146,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89153,10 +90170,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n" - " Possible C/C++ prototypes are:\n" - " attribute(StrokeInternal::StrokeVertexIterator const *)\n" - " attribute(StrokeInternal::StrokeVertexIterator *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); return NULL; } @@ -89225,7 +90239,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; real arg2 ; @@ -89236,20 +90250,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetX",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setX",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetX" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setX" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetX" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setX" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); { try { - (*arg1)->SetX(arg2); + (*arg1)->setX(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89265,7 +90279,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; real arg2 ; @@ -89276,20 +90290,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetY",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setY",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetY" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setY" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetY" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setY" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); { try { - (*arg1)->SetY(arg2); + (*arg1)->setY(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89305,7 +90319,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; real arg2 ; @@ -89320,25 +90334,25 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *SWIGU PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertexIterator_SetPoint",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertexIterator_setPoint",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setPoint" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertexIterator_setPoint" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - (*arg1)->SetPoint(arg2,arg3); + (*arg1)->setPoint(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89354,7 +90368,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; Geometry::Vec2f *arg2 = 0 ; @@ -89365,23 +90379,23 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *SWIGU PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetPoint",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setPoint",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); { try { - (*arg1)->SetPoint((Geometry::Vec2f const &)*arg2); + (*arg1)->setPoint((Geometry::Vec2f const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89397,13 +90411,13 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89413,10 +90427,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObjec int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_StrokeVertexIterator_SetPoint__SWIG_1(self, args); + return _wrap_StrokeVertexIterator_setPoint__SWIG_1(self, args); } } } @@ -89436,22 +90450,19 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObjec _v = SWIG_CheckState(res); } if (_v) { - return _wrap_StrokeVertexIterator_SetPoint__SWIG_0(self, args); + return _wrap_StrokeVertexIterator_setPoint__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_SetPoint'.\n" - " Possible C/C++ prototypes are:\n" - " SetPoint(StrokeInternal::StrokeVertexIterator *,real,real)\n" - " SetPoint(StrokeInternal::StrokeVertexIterator *,Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_setPoint'.\n Possible C/C++ prototypes are:\n setPoint(real,real)\n setPoint(Geometry::Vec2f const &)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; StrokeAttribute *arg2 = 0 ; @@ -89462,23 +90473,23 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *SWIGUNUSE PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetAttribute",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setAttribute",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setAttribute" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_setAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertexIterator_setAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); } arg2 = reinterpret_cast< StrokeAttribute * >(argp2); { try { - (*arg1)->SetAttribute((StrokeAttribute const &)*arg2); + (*arg1)->setAttribute((StrokeAttribute const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89494,7 +90505,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; float arg2 ; @@ -89505,20 +90516,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (*arg1)->SetCurvilinearAbscissa(arg2); + (*arg1)->setCurvilinearAbscissa(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89534,7 +90545,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; float arg2 ; @@ -89545,20 +90556,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *SWIGUN PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetStrokeLength",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setStrokeLength",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetStrokeLength" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setStrokeLength" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetStrokeLength" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setStrokeLength" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (*arg1)->SetStrokeLength(arg2); + (*arg1)->setStrokeLength(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -89695,7 +90706,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -89823,7 +90834,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90162,7 +91173,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -90173,20 +91184,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetA",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setA",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetA" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setA" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetA" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_setA" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (*arg1)->SetA(arg2); + (*arg1)->setA(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -90202,7 +91213,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setB(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -90213,20 +91224,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetB",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setB",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetB" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setB" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_SetB" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_setB" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (*arg1)->SetB(arg2); + (*arg1)->setB(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -90242,7 +91253,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setT2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeInternal::StrokeVertexIterator *arg1 = (StrokeInternal::StrokeVertexIterator *) 0 ; float arg2 ; @@ -90253,20 +91264,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_SetT2d",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertexIterator_setT2d",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_SetT2d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setT2d" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_SetT2d" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertexIterator_setT2d" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (*arg1)->SetT2d(arg2); + (*arg1)->setT2d(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -90342,7 +91353,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -90377,7 +91388,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -90409,7 +91420,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90764,7 +91775,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90773,7 +91784,7 @@ fail: SWIGINTERN PyObject *StrokeVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -90975,7 +91986,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 6); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -91050,12 +92061,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeAttribute()\n" - " StrokeAttribute(StrokeAttribute const &)\n" - " StrokeAttribute(float,float,float,float,float,float)\n" - " StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n Possible C/C++ prototypes are:\n StrokeAttribute()\n StrokeAttribute(StrokeAttribute const &)\n StrokeAttribute(float,float,float,float,float,float)\n StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); return NULL; } @@ -91245,7 +92251,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91405,7 +92411,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91523,7 +92529,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -91567,7 +92573,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -91783,7 +92789,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSED SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setColor" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "Geometry::Vec3f const &""'"); } @@ -91815,7 +92821,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -91825,7 +92831,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setColor__SWIG_1(self, args); @@ -91861,10 +92867,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n" - " Possible C/C++ prototypes are:\n" - " setColor(StrokeAttribute *,float,float,float)\n" - " setColor(StrokeAttribute *,Geometry::Vec3f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n Possible C/C++ prototypes are:\n setColor(float,float,float)\n setColor(Geometry::Vec3f const &)\n"); return NULL; } @@ -91975,7 +92978,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setThickness" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -92007,7 +93010,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92017,7 +93020,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setThickness__SWIG_1(self, args); @@ -92047,15 +93050,12 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n" - " Possible C/C++ prototypes are:\n" - " setThickness(StrokeAttribute *,float,float)\n" - " setThickness(StrokeAttribute *,Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n Possible C/C++ prototypes are:\n setThickness(float,float)\n setThickness(Geometry::Vec2f const &)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeAttribute_setVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeAttribute *arg1 = (StrokeAttribute *) 0 ; bool arg2 ; @@ -92066,20 +93066,20 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_SetVisible(PyObject *SWIGUNUSEDPARM(s PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_SetVisible",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeAttribute_setVisible",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeAttribute, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_SetVisible" "', argument " "1"" of type '" "StrokeAttribute *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setVisible" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_SetVisible" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeAttribute_setVisible" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); { try { - (arg1)->SetVisible(arg2); + (arg1)->setVisible(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -92174,7 +93174,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -92229,7 +93229,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "3"" of type '" "Geometry::Vec3f const &""'"); } @@ -92259,7 +93259,7 @@ fail: SWIGINTERN PyObject *StrokeAttribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeAttribute, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -92518,7 +93518,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92586,14 +93586,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeVertex()\n" - " StrokeVertex(StrokeVertex const &)\n" - " StrokeVertex(SVertex *)\n" - " StrokeVertex(CurvePoint *)\n" - " StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n" - " StrokeVertex(SVertex *,StrokeAttribute const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n Possible C/C++ prototypes are:\n StrokeVertex()\n StrokeVertex(StrokeVertex const &)\n StrokeVertex(SVertex *)\n StrokeVertex(CurvePoint *)\n StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n StrokeVertex(SVertex *,StrokeAttribute const &)\n"); return NULL; } @@ -92719,7 +93712,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -92802,7 +93795,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92826,10 +93819,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n" - " Possible C/C++ prototypes are:\n" - " attribute(StrokeVertex const *)\n" - " attribute(StrokeVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); return NULL; } @@ -92930,7 +93920,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; real arg2 ; @@ -92941,20 +93931,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetX(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetX",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setX",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetX" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setX" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetX" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_setX" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); { try { - (arg1)->SetX(arg2); + (arg1)->setX(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -92970,7 +93960,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; real arg2 ; @@ -92981,20 +93971,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetY(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetY",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setY",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetY" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setY" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetY" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_setY" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); { try { - (arg1)->SetY(arg2); + (arg1)->setY(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93010,7 +94000,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; real arg2 ; @@ -93025,25 +94015,25 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertex_SetPoint",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:StrokeVertex_setPoint",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_setPoint" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertex_SetPoint" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StrokeVertex_setPoint" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - (arg1)->SetPoint(arg2,arg3); + (arg1)->setPoint(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93059,7 +94049,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; Geometry::Vec2f *arg2 = 0 ; @@ -93070,23 +94060,23 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetPoint",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setPoint",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_SetPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2f * >(argp2); { try { - (arg1)->SetPoint((Geometry::Vec2f const &)*arg2); + (arg1)->setPoint((Geometry::Vec2f const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93102,13 +94092,13 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93118,10 +94108,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_StrokeVertex_SetPoint__SWIG_1(self, args); + return _wrap_StrokeVertex_setPoint__SWIG_1(self, args); } } } @@ -93141,22 +94131,19 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) _v = SWIG_CheckState(res); } if (_v) { - return _wrap_StrokeVertex_SetPoint__SWIG_0(self, args); + return _wrap_StrokeVertex_setPoint__SWIG_0(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_SetPoint'.\n" - " Possible C/C++ prototypes are:\n" - " SetPoint(StrokeVertex *,real,real)\n" - " SetPoint(StrokeVertex *,Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_setPoint'.\n Possible C/C++ prototypes are:\n setPoint(real,real)\n setPoint(Geometry::Vec2f const &)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; StrokeAttribute *arg2 = 0 ; @@ -93167,23 +94154,23 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetAttribute",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setAttribute",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetAttribute" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setAttribute" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_StrokeAttribute, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_setAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_SetAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StrokeVertex_setAttribute" "', argument " "2"" of type '" "StrokeAttribute const &""'"); } arg2 = reinterpret_cast< StrokeAttribute * >(argp2); { try { - (arg1)->SetAttribute((StrokeAttribute const &)*arg2); + (arg1)->setAttribute((StrokeAttribute const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93199,7 +94186,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setCurvilinearAbscissa(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; float arg2 ; @@ -93210,20 +94197,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *SWIGUNU PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setCurvilinearAbscissa",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setCurvilinearAbscissa" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_setCurvilinearAbscissa" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetCurvilinearAbscissa(arg2); + (arg1)->setCurvilinearAbscissa(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93239,7 +94226,7 @@ fail: } -SWIGINTERN PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_StrokeVertex_setStrokeLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; StrokeVertex *arg1 = (StrokeVertex *) 0 ; float arg2 ; @@ -93250,20 +94237,20 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *SWIGUNUSEDPARM PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_SetStrokeLength",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:StrokeVertex_setStrokeLength",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_StrokeVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_SetStrokeLength" "', argument " "1"" of type '" "StrokeVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setStrokeLength" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_SetStrokeLength" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrokeVertex_setStrokeLength" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetStrokeLength(arg2); + (arg1)->setStrokeLength(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -93281,7 +94268,7 @@ fail: SWIGINTERN PyObject *StrokeVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -93414,7 +94401,7 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93431,10 +94418,7 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n" - " Possible C/C++ prototypes are:\n" - " Stroke()\n" - " Stroke(Stroke const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n Possible C/C++ prototypes are:\n Stroke()\n Stroke(Stroke const &)\n"); return NULL; } @@ -93598,7 +94582,7 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93634,10 +94618,7 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n" - " Possible C/C++ prototypes are:\n" - " Resample(Stroke *,int)\n" - " Resample(Stroke *,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n Possible C/C++ prototypes are:\n Resample(int)\n Resample(float)\n"); return NULL; } @@ -94049,7 +95030,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94073,10 +95054,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n" - " Possible C/C++ prototypes are:\n" - " viewedges_begin(Stroke const *)\n" - " viewedges_begin(Stroke *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n Possible C/C++ prototypes are:\n viewedges_begin()\n viewedges_begin()\n"); return NULL; } @@ -94151,7 +95129,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94175,10 +95153,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n" - " Possible C/C++ prototypes are:\n" - " viewedges_end(Stroke const *)\n" - " viewedges_end(Stroke *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n Possible C/C++ prototypes are:\n viewedges_end()\n viewedges_end()\n"); return NULL; } @@ -94240,7 +95215,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -94336,7 +95311,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -94407,7 +95382,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; Id *arg2 = 0 ; @@ -94418,23 +95393,23 @@ SWIGINTERN PyObject *_wrap_Stroke_SetId(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetId" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setId" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Id, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_setId" "', argument " "2"" of type '" "Id const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetId" "', argument " "2"" of type '" "Id const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_setId" "', argument " "2"" of type '" "Id const &""'"); } arg2 = reinterpret_cast< Id * >(argp2); { try { - (arg1)->SetId((Id const &)*arg2); + (arg1)->setId((Id const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94450,7 +95425,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; float arg2 ; @@ -94461,20 +95436,20 @@ SWIGINTERN PyObject *_wrap_Stroke_SetLength(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetLength",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setLength",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetLength" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setLength" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetLength" "', argument " "2"" of type '" "float""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setLength" "', argument " "2"" of type '" "float""'"); } arg2 = static_cast< float >(val2); { try { - (arg1)->SetLength(arg2); + (arg1)->setLength(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94490,7 +95465,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; Stroke::MediumType arg2 ; @@ -94501,20 +95476,20 @@ SWIGINTERN PyObject *_wrap_Stroke_SetMediumType(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetMediumType",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setMediumType",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetMediumType" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setMediumType" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetMediumType" "', argument " "2"" of type '" "Stroke::MediumType""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setMediumType" "', argument " "2"" of type '" "Stroke::MediumType""'"); } arg2 = static_cast< Stroke::MediumType >(val2); { try { - (arg1)->SetMediumType(arg2); + (arg1)->setMediumType(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94530,7 +95505,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setTextureId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; unsigned int arg2 ; @@ -94541,20 +95516,20 @@ SWIGINTERN PyObject *_wrap_Stroke_SetTextureId(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetTextureId",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setTextureId",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetTextureId" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setTextureId" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetTextureId" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setTextureId" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); { try { - (arg1)->SetTextureId(arg2); + (arg1)->setTextureId(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94570,7 +95545,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setTips(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; bool arg2 ; @@ -94581,20 +95556,20 @@ SWIGINTERN PyObject *_wrap_Stroke_SetTips(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetTips",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setTips",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetTips" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setTips" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_bool(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetTips" "', argument " "2"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setTips" "', argument " "2"" of type '" "bool""'"); } arg2 = static_cast< bool >(val2); { try { - (arg1)->SetTips(arg2); + (arg1)->setTips(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94730,7 +95705,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; Geometry::Vec2r *arg2 = 0 ; @@ -94741,23 +95716,23 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_0(PyObject *SWIG PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetBeginningOrientation",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setBeginningOrientation",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_setBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_setBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); { try { - (arg1)->SetBeginningOrientation((Geometry::Vec2r const &)*arg2); + (arg1)->setBeginningOrientation((Geometry::Vec2r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94773,7 +95748,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; real arg2 ; @@ -94788,25 +95763,25 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation__SWIG_1(PyObject *SWIG PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_SetBeginningOrientation",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_setBeginningOrientation",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetBeginningOrientation" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setBeginningOrientation" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_SetBeginningOrientation" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_setBeginningOrientation" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - (arg1)->SetBeginningOrientation(arg2,arg3); + (arg1)->setBeginningOrientation(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94822,13 +95797,13 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94838,10 +95813,10 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObje int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_Stroke_SetBeginningOrientation__SWIG_0(self, args); + return _wrap_Stroke_setBeginningOrientation__SWIG_0(self, args); } } } @@ -94861,22 +95836,19 @@ SWIGINTERN PyObject *_wrap_Stroke_SetBeginningOrientation(PyObject *self, PyObje _v = SWIG_CheckState(res); } if (_v) { - return _wrap_Stroke_SetBeginningOrientation__SWIG_1(self, args); + return _wrap_Stroke_setBeginningOrientation__SWIG_1(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetBeginningOrientation'.\n" - " Possible C/C++ prototypes are:\n" - " SetBeginningOrientation(Stroke *,Geometry::Vec2r const &)\n" - " SetBeginningOrientation(Stroke *,real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setBeginningOrientation'.\n Possible C/C++ prototypes are:\n setBeginningOrientation(Geometry::Vec2r const &)\n setBeginningOrientation(real,real)\n"); return NULL; } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; Geometry::Vec2r *arg2 = 0 ; @@ -94887,23 +95859,23 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_0(PyObject *SWIGUNU PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_SetEndingOrientation",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Stroke_setEndingOrientation",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_setEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stroke_setEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); { try { - (arg1)->SetEndingOrientation((Geometry::Vec2r const &)*arg2); + (arg1)->setEndingOrientation((Geometry::Vec2r const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94919,7 +95891,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Stroke *arg1 = (Stroke *) 0 ; real arg2 ; @@ -94934,25 +95906,25 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation__SWIG_1(PyObject *SWIGUNU PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_SetEndingOrientation",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:Stroke_setEndingOrientation",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stroke, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_SetEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_SetEndingOrientation" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Stroke_setEndingOrientation" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_SetEndingOrientation" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Stroke_setEndingOrientation" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - (arg1)->SetEndingOrientation(arg2,arg3); + (arg1)->setEndingOrientation(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -94968,13 +95940,13 @@ fail: } -SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { +SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation(PyObject *self, PyObject *args) { int argc; PyObject *argv[4]; int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94984,10 +95956,10 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { - return _wrap_Stroke_SetEndingOrientation__SWIG_0(self, args); + return _wrap_Stroke_setEndingOrientation__SWIG_0(self, args); } } } @@ -95007,17 +95979,14 @@ SWIGINTERN PyObject *_wrap_Stroke_SetEndingOrientation(PyObject *self, PyObject _v = SWIG_CheckState(res); } if (_v) { - return _wrap_Stroke_SetEndingOrientation__SWIG_1(self, args); + return _wrap_Stroke_setEndingOrientation__SWIG_1(self, args); } } } } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_SetEndingOrientation'.\n" - " Possible C/C++ prototypes are:\n" - " SetEndingOrientation(Stroke *,Geometry::Vec2r const &)\n" - " SetEndingOrientation(Stroke *,real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setEndingOrientation'.\n Possible C/C++ prototypes are:\n setEndingOrientation(Geometry::Vec2r const &)\n setEndingOrientation(real,real)\n"); return NULL; } @@ -95101,7 +96070,7 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95131,10 +96100,7 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n" - " Possible C/C++ prototypes are:\n" - " strokeVerticesBegin(Stroke *,float)\n" - " strokeVerticesBegin(Stroke *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n Possible C/C++ prototypes are:\n strokeVerticesBegin(float)\n strokeVerticesBegin()\n"); return NULL; } @@ -95346,7 +96312,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95376,10 +96342,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n" - " Possible C/C++ prototypes are:\n" - " pointsBegin(Stroke *,float)\n" - " pointsBegin(Stroke *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); return NULL; } @@ -95463,7 +96426,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95493,24 +96456,21 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n" - " Possible C/C++ prototypes are:\n" - " pointsEnd(Stroke *,float)\n" - " pointsEnd(Stroke *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); return NULL; } SWIGINTERN PyObject *Stroke_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Stroke, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -95519,11 +96479,11 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(se arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_StrokeShader_Sm__Sg__iterator(arg1,arg2); @@ -95544,21 +96504,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector< StrokeShader * > const *)arg1); + result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -95576,21 +96536,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector< StrokeShader * > const *)arg1); + result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -95608,22 +96568,22 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { try { - result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); + result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -95637,7 +96597,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -95646,10 +96606,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; - std::vector< StrokeShader * >::difference_type arg3 ; - std::vector< StrokeShader *,std::allocator< StrokeShader * > > *result = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95661,25 +96621,25 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { - result = (std::vector< StrokeShader *,std::allocator< StrokeShader * > > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -95693,7 +96653,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -95702,10 +96662,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; - std::vector< StrokeShader * >::difference_type arg3 ; - std::vector< StrokeShader *,std::allocator< StrokeShader * > > *arg4 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; + std::vector > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95719,36 +96679,36 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPAR PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &)*arg4); + std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -95776,9 +96736,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; - std::vector< StrokeShader * >::difference_type arg3 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95790,21 +96750,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); } - arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); + arg3 = static_cast< std::vector::difference_type >(val3); { try { try { @@ -95831,8 +96791,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95841,16 +96801,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { @@ -95877,9 +96837,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; - std::vector< StrokeShader * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95888,20 +96848,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + arg2 = static_cast< std::vector::difference_type >(val2); { try { try { - result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -95915,7 +96875,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -95924,9 +96884,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::difference_type arg2 ; - std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::difference_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -95938,21 +96898,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { try { @@ -95979,8 +96939,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -95989,16 +96949,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { std_vector_Sl_StrokeShader_Sm__Sg__append(arg1,arg2); @@ -96019,12 +96979,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *result = 0 ; + std::vector *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ShadersContainer")) SWIG_fail; { try { - result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(); + result = (std::vector *)new std::vector(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96033,7 +96993,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -96042,26 +97002,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = 0 ; - std::vector< StrokeShader * > *result = 0 ; + std::vector *arg1 = 0 ; + std::vector *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); } arg1 = ptr; } { try { - result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >((std::vector< StrokeShader * > const &)*arg1); + result = (std::vector *)new std::vector((std::vector const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96070,7 +97030,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -96081,21 +97041,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (bool)((std::vector< StrokeShader * > const *)arg1)->empty(); + result = (bool)((std::vector const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96113,21 +97073,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->size(); + result = ((std::vector const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96145,17 +97105,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->clear(); @@ -96176,8 +97136,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * > *arg2 = 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -96186,19 +97146,19 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); } - arg2 = reinterpret_cast< std::vector< StrokeShader * > * >(argp2); + arg2 = reinterpret_cast< std::vector * >(argp2); { try { (arg1)->swap(*arg2); @@ -96219,21 +97179,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - SwigValueWrapper< std::allocator< StrokeShader * > > result; + std::vector *arg1 = (std::vector *) 0 ; + SwigValueWrapper > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->get_allocator(); + result = ((std::vector const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96242,30 +97202,30 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector< StrokeShader * >::allocator_type(static_cast< const std::vector< StrokeShader * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->begin(); + result = (arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96274,7 +97234,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96282,23 +97242,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::const_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->begin(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_begin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_begin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->end(); + result = (arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96307,7 +97333,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96315,23 +97341,89 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->end(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_end__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_end__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->rbegin(); + result = (arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96340,7 +97432,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96348,23 +97440,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::const_reverse_iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->rend(); + result = ((std::vector const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96373,7 +97465,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96381,10 +97473,142 @@ fail: } +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rbegin__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rbegin__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = (arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::const_reverse_iterator result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); + } + arg1 = reinterpret_cast< std::vector * >(argp1); + { + try { + result = ((std::vector const *)arg1)->rend(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), + swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rend__SWIG_0(self, args); + } + } + if (argc == 1) { + int _v; + int res = swig::asptr(argv[0], (std::vector >**)(0)); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_ShadersContainer_rend__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * >::size_type arg1 ; - std::vector< StrokeShader * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -96392,12 +97616,12 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); + arg1 = static_cast< std::vector::size_type >(val1); { try { - result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1); + result = (std::vector *)new std::vector(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96406,7 +97630,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -96415,17 +97639,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { (arg1)->pop_back(); @@ -96446,8 +97670,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -96456,16 +97680,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->resize(arg2); @@ -96486,9 +97710,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::iterator arg2 ; - std::vector< StrokeShader * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -96497,20 +97721,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } { @@ -96524,7 +97748,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96534,10 +97758,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::iterator arg2 ; - std::vector< StrokeShader * >::iterator arg3 ; - std::vector< StrokeShader * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::iterator arg3 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -96549,31 +97773,31 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); } } { @@ -96587,7 +97811,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -96601,18 +97825,18 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_0(self, args); } @@ -96620,16 +97844,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_1(self, args); } @@ -96638,19 +97862,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n" - " Possible C/C++ prototypes are:\n" - " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator)\n" - " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * >::size_type arg1 ; - std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; - std::vector< StrokeShader * > *result = 0 ; + std::vector::size_type arg1 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -96661,17 +97882,17 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"OO:new_ShadersContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); } - arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { - result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1,arg2); + result = (std::vector *)new std::vector(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96680,7 +97901,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -96693,7 +97914,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96712,7 +97933,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_1(self, args); @@ -96726,7 +97947,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_3(self, args); @@ -96735,20 +97956,15 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n" - " Possible C/C++ prototypes are:\n" - " std::vector< StrokeShader * >()\n" - " std::vector< StrokeShader * >(std::vector< StrokeShader * > const &)\n" - " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type)\n" - " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.StrokeShader)>()\n std::vector<(p.StrokeShader)>(std::vector const &)\n std::vector<(p.StrokeShader)>(std::vector::size_type)\n std::vector<(p.StrokeShader)>(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type arg2 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -96757,16 +97973,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); } - arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); + arg2 = reinterpret_cast< std::vector::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -96787,21 +98003,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->front(); + result = (std::vector::value_type)((std::vector const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96810,7 +98026,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96819,21 +98035,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::value_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->back(); + result = (std::vector::value_type)((std::vector const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96842,7 +98058,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96851,9 +98067,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type arg2 ; - std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -96865,21 +98081,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -96900,9 +98116,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type arg2 ; - std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -96914,21 +98130,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -96953,13 +98169,13 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -96973,7 +98189,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -96982,7 +98198,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_resize__SWIG_1(self, args); @@ -96992,20 +98208,17 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n" - " Possible C/C++ prototypes are:\n" - " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type)\n" - " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::iterator arg2 ; - std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; - std::vector< StrokeShader * >::iterator result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97017,27 +98230,27 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); } - arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); + arg3 = reinterpret_cast< std::vector::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -97049,7 +98262,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97059,10 +98272,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::iterator arg2 ; - std::vector< StrokeShader * >::size_type arg3 ; - std::vector< StrokeShader * >::value_type arg4 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::iterator arg2 ; + std::vector::size_type arg3 ; + std::vector::value_type arg4 = (std::vector::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97077,32 +98290,32 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); } - arg3 = static_cast< std::vector< StrokeShader * >::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector< StrokeShader * >::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); } - arg4 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp4); + arg4 = reinterpret_cast< std::vector::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -97127,21 +98340,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_0(self, args); @@ -97151,12 +98364,12 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -97164,7 +98377,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_1(self, args); @@ -97175,18 +98388,15 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n" - " Possible C/C++ prototypes are:\n" - " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::value_type)\n" - " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type arg2 ; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -97195,16 +98405,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); } - arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + arg2 = static_cast< std::vector::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -97225,21 +98435,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; - std::vector< StrokeShader * >::size_type result; + std::vector *arg1 = (std::vector *) 0 ; + std::vector::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { - result = ((std::vector< StrokeShader * > const *)arg1)->capacity(); + result = ((std::vector const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97257,17 +98467,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ShadersContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector *arg1 = (std::vector *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ShadersContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector *""'"); } - arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + arg1 = reinterpret_cast< std::vector * >(argp1); { try { delete arg1; @@ -97289,8 +98499,8 @@ fail: SWIGINTERN PyObject *ShadersContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -97484,7 +98694,7 @@ fail: SWIGINTERN PyObject *StrokeShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -97630,7 +98840,7 @@ fail: SWIGINTERN PyObject *ConstantThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -97776,7 +98986,7 @@ fail: SWIGINTERN PyObject *ConstantExternThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -97899,7 +99109,7 @@ fail: SWIGINTERN PyObject *IncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98031,7 +99241,7 @@ fail: SWIGINTERN PyObject *ConstrainedIncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98154,7 +99364,7 @@ fail: SWIGINTERN PyObject *LengthDependingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98355,7 +99565,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -98429,12 +99639,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n" - " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n" - " StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n" - " StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); return NULL; } @@ -98516,7 +99721,7 @@ fail: SWIGINTERN PyObject *ThicknessVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98591,7 +99796,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -98616,10 +99821,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ThicknessNoiseShader()\n" - " StrokeShaders::ThicknessNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessNoiseShader()\n StrokeShaders::ThicknessNoiseShader(float,float)\n"); return NULL; } @@ -98701,7 +99903,7 @@ fail: SWIGINTERN PyObject *ThicknessNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98821,7 +100023,7 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -98877,10 +100079,7 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ConstantColorShader(float,float,float,float)\n" - " StrokeShaders::ConstantColorShader(float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ConstantColorShader(float,float,float,float)\n StrokeShaders::ConstantColorShader(float,float,float)\n"); return NULL; } @@ -98994,7 +100193,7 @@ fail: SWIGINTERN PyObject *ConstantColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99171,7 +100370,7 @@ fail: SWIGINTERN PyObject *IncreasingColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99259,7 +100458,7 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99287,10 +100486,7 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n" - " StrokeShaders::ColorVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n StrokeShaders::ColorVariationPatternShader(std::string const)\n"); return NULL; } @@ -99372,7 +100568,7 @@ fail: SWIGINTERN PyObject *ColorVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99438,7 +100634,7 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99457,10 +100653,7 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::MaterialColorShader(float)\n" - " StrokeShaders::MaterialColorShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::MaterialColorShader(float)\n StrokeShaders::MaterialColorShader()\n"); return NULL; } @@ -99542,7 +100735,7 @@ fail: SWIGINTERN PyObject *MaterialColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99556,7 +100749,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicColorShader(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_CalligraphicColorShader",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CalligraphicColorShader" "', argument " "1"" of type '" "Geometry::Vec2d const &""'"); } @@ -99659,7 +100852,7 @@ fail: SWIGINTERN PyObject *CalligraphicColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99734,7 +100927,7 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99759,10 +100952,7 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ColorNoiseShader()\n" - " StrokeShaders::ColorNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorNoiseShader()\n StrokeShaders::ColorNoiseShader(float,float)\n"); return NULL; } @@ -99844,7 +101034,7 @@ fail: SWIGINTERN PyObject *ColorNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99958,7 +101148,7 @@ fail: SWIGINTERN PyObject *TextureAssignerShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100098,7 +101288,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100146,11 +101336,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n" - " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n" - " StrokeShaders::StrokeTextureShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n StrokeShaders::StrokeTextureShader(std::string const)\n"); return NULL; } @@ -100232,7 +101418,7 @@ fail: SWIGINTERN PyObject *StrokeTextureShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100298,7 +101484,7 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100317,10 +101503,7 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::BackboneStretcherShader(float)\n" - " StrokeShaders::BackboneStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BackboneStretcherShader(float)\n StrokeShaders::BackboneStretcherShader()\n"); return NULL; } @@ -100402,7 +101585,7 @@ fail: SWIGINTERN PyObject *BackboneStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100516,7 +101699,7 @@ fail: SWIGINTERN PyObject *SamplingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100582,7 +101765,7 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100601,10 +101784,7 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::ExternalContourStretcherShader(float)\n" - " StrokeShaders::ExternalContourStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ExternalContourStretcherShader(float)\n StrokeShaders::ExternalContourStretcherShader()\n"); return NULL; } @@ -100686,7 +101866,7 @@ fail: SWIGINTERN PyObject *ExternalContourStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100791,7 +101971,7 @@ fail: SWIGINTERN PyObject *BSplineShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100857,7 +102037,7 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100876,10 +102056,7 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n" - " Possible C/C++ prototypes are:\n" - " StrokeShaders::BezierCurveShader(float)\n" - " StrokeShaders::BezierCurveShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BezierCurveShader(float)\n StrokeShaders::BezierCurveShader()\n"); return NULL; } @@ -100961,7 +102138,7 @@ fail: SWIGINTERN PyObject *BezierCurveShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101084,7 +102261,7 @@ fail: SWIGINTERN PyObject *InflateShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101198,7 +102375,7 @@ fail: SWIGINTERN PyObject *PolygonalizationShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101312,7 +102489,7 @@ fail: SWIGINTERN PyObject *GuidingLinesShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101426,7 +102603,7 @@ fail: SWIGINTERN PyObject *TipRemoverShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101563,7 +102740,7 @@ fail: SWIGINTERN PyObject *streamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__streamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101712,7 +102889,7 @@ fail: SWIGINTERN PyObject *fstreamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101748,7 +102925,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicShader(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CalligraphicShader" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CalligraphicShader" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -101856,7 +103033,7 @@ fail: SWIGINTERN PyObject *CalligraphicShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CalligraphicShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102006,7 +103183,7 @@ fail: SWIGINTERN PyObject *SpatialNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SpatialNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102183,7 +103360,7 @@ fail: SWIGINTERN PyObject *SmoothingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SmoothingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102391,7 +103568,7 @@ fail: SWIGINTERN PyObject *Smoother_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Smoother, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102532,7 +103709,7 @@ fail: SWIGINTERN PyObject *Omitter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Omitter, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102673,7 +103850,7 @@ fail: SWIGINTERN PyObject *OmissionShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_OmissionShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102716,7 +103893,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; - UnaryFunction1D< void > *arg3 = 0 ; + UnaryFunction1D *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -102744,14 +103921,14 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); } arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DT_void_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); } - arg3 = reinterpret_cast< UnaryFunction1D< void > * >(argp3); + arg3 = reinterpret_cast< UnaryFunction1D * >(argp3); { try { Operators::chain(*arg1,*arg2,*arg3); @@ -102822,7 +103999,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -102851,7 +104028,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DT_void_t, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Operators_chain__SWIG_0(self, args); @@ -102861,10 +104038,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n" - " Possible C/C++ prototypes are:\n" - " chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D< void > &)\n" - " Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n Possible C/C++ prototypes are:\n chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D &)\n Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); return NULL; } @@ -102955,7 +104129,7 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -102984,10 +104158,7 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n" - " Possible C/C++ prototypes are:\n" - " bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n" - " Operators::bidirectionalChain(ChainingIterator &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n Possible C/C++ prototypes are:\n bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n Operators::bidirectionalChain(ChainingIterator &)\n"); return NULL; } @@ -103176,7 +104347,7 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -103240,19 +104411,14 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n" - " Possible C/C++ prototypes are:\n" - " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n" - " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n" - " sequentialSplit(UnaryPredicate0D &,float)\n" - " Operators::sequentialSplit(UnaryPredicate0D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n Possible C/C++ prototypes are:\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n sequentialSplit(UnaryPredicate0D &,float)\n Operators::sequentialSplit(UnaryPredicate0D &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; float arg3 ; void *argp1 = 0 ; @@ -103266,14 +104432,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -103307,7 +104473,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -103317,14 +104483,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Operators_recursiveSplit",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -103353,7 +104519,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; float arg4 ; @@ -103371,14 +104537,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:Operators_recursiveSplit",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -103420,7 +104586,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D< double > *arg1 = 0 ; + UnaryFunction0D *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; void *argp1 = 0 ; @@ -103434,14 +104600,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -103482,14 +104648,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -103503,7 +104669,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -103523,7 +104689,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -103542,7 +104708,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -103566,12 +104732,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n" - " Possible C/C++ prototypes are:\n" - " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &,float)\n" - " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &)\n" - " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n" - " Operators::recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n Possible C/C++ prototypes are:\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &,float)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n Operators::recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); return NULL; } @@ -103613,7 +104774,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; UnaryPredicate1D *arg1 = 0 ; - std::vector< StrokeShader * > arg2 ; + std::vector arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -103629,10 +104790,10 @@ SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyOb } arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector< StrokeShader * >""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -103854,7 +105015,7 @@ fail: SWIGINTERN PyObject *Operators_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Operators, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103972,7 +105133,7 @@ fail: SWIGINTERN PyObject *ltstr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ltstr, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -104757,7 +105918,7 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104832,11 +105993,7 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n" - " Possible C/C++ prototypes are:\n" - " loadMap(Canvas *,char const *,char const *,unsigned int,float)\n" - " loadMap(Canvas *,char const *,char const *,unsigned int)\n" - " loadMap(Canvas *,char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n Possible C/C++ prototypes are:\n loadMap(char const *,char const *,unsigned int,float)\n loadMap(char const *,char const *,unsigned int)\n loadMap(char const *,char const *)\n"); return NULL; } @@ -105054,7 +106211,7 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -105078,10 +106235,7 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n" - " Possible C/C++ prototypes are:\n" - " selectedFEdge(Canvas const *)\n" - " selectedFEdge(Canvas *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n Possible C/C++ prototypes are:\n selectedFEdge()\n selectedFEdge()\n"); return NULL; } @@ -105185,7 +106339,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; + SwigValueWrapper > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -105207,7 +106361,7 @@ SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -105310,7 +106464,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Canvas_SetSelectedFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Canvas_setSelectedFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -105321,20 +106475,20 @@ SWIGINTERN PyObject *_wrap_Canvas_SetSelectedFEdge(PyObject *SWIGUNUSEDPARM(self PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_SetSelectedFEdge",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_setSelectedFEdge",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetSelectedFEdge" "', argument " "1"" of type '" "Canvas *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_setSelectedFEdge" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_SetSelectedFEdge" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_setSelectedFEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - (arg1)->SetSelectedFEdge(arg2); + (arg1)->setSelectedFEdge(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -105537,7 +106691,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Canvas_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Canvas_setVisible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; unsigned int arg2 ; @@ -105552,25 +106706,25 @@ SWIGINTERN PyObject *_wrap_Canvas_SetVisible(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_SetVisible",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:Canvas_setVisible",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetVisible" "', argument " "1"" of type '" "Canvas *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_setVisible" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_SetVisible" "', argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_setVisible" "', argument " "2"" of type '" "unsigned int""'"); } arg2 = static_cast< unsigned int >(val2); ecode3 = SWIG_AsVal_bool(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_SetVisible" "', argument " "3"" of type '" "bool""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_setVisible" "', argument " "3"" of type '" "bool""'"); } arg3 = static_cast< bool >(val3); { try { - (arg1)->SetVisible(arg2,arg3); + (arg1)->setVisible(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -105626,7 +106780,7 @@ fail: } -SWIGINTERN PyObject *_wrap_Canvas_SetCurrentPaperTextureIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_Canvas_setCurrentPaperTextureIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; int arg2 ; @@ -105637,20 +106791,20 @@ SWIGINTERN PyObject *_wrap_Canvas_SetCurrentPaperTextureIndex(PyObject *SWIGUNUS PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_SetCurrentPaperTextureIndex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:Canvas_setCurrentPaperTextureIndex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Canvas, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_SetCurrentPaperTextureIndex" "', argument " "1"" of type '" "Canvas *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_setCurrentPaperTextureIndex" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_SetCurrentPaperTextureIndex" "', argument " "2"" of type '" "int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Canvas_setCurrentPaperTextureIndex" "', argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); { try { - (arg1)->SetCurrentPaperTextureIndex(arg2); + (arg1)->setCurrentPaperTextureIndex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -105743,7 +106897,7 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -105773,10 +106927,7 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n" - " Possible C/C++ prototypes are:\n" - " changePaperTexture(Canvas *,bool)\n" - " changePaperTexture(Canvas *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n Possible C/C++ prototypes are:\n changePaperTexture(bool)\n changePaperTexture()\n"); return NULL; } @@ -105889,7 +107040,7 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -105919,10 +107070,7 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n" - " Possible C/C++ prototypes are:\n" - " resetModified(Canvas *,bool)\n" - " resetModified(Canvas *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n Possible C/C++ prototypes are:\n resetModified(bool)\n resetModified()\n"); return NULL; } @@ -105930,7 +107078,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; + std::vector > *arg2 = 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; @@ -105948,14 +107096,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); } - arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); + arg2 = reinterpret_cast< std::vector > * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_causalStyleModules" "', argument " "3"" of type '" "unsigned int""'"); @@ -105982,7 +107130,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; + std::vector > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -105996,14 +107144,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); } - arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); + arg2 = reinterpret_cast< std::vector > * >(argp2); { try { (arg1)->causalStyleModules(*arg2); @@ -106028,7 +107176,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); + argc = PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -106039,7 +107187,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Canvas_causalStyleModules__SWIG_1(self, args); @@ -106053,7 +107201,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -106068,10 +107216,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n" - " Possible C/C++ prototypes are:\n" - " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &,unsigned int)\n" - " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n Possible C/C++ prototypes are:\n causalStyleModules(std::vector > &,unsigned int)\n causalStyleModules(std::vector > &)\n"); return NULL; } @@ -106127,7 +107272,7 @@ fail: SWIGINTERN PyObject *Canvas_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Canvas, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -106148,7 +107293,7 @@ SWIGINTERN PyObject *_wrap_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,SVertex >(arg1); + result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106180,7 +107325,7 @@ SWIGINTERN PyObject *_wrap_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,ViewVertex >(arg1); + result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106212,7 +107357,7 @@ SWIGINTERN PyObject *_wrap_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,TVertex >(arg1); + result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106244,7 +107389,7 @@ SWIGINTERN PyObject *_wrap_castToCurvePoint(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,CurvePoint >(arg1); + result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106276,7 +107421,7 @@ SWIGINTERN PyObject *_wrap_castToStrokeVertex(PyObject *SWIGUNUSEDPARM(self), Py arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,StrokeVertex >(arg1); + result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106308,7 +107453,7 @@ SWIGINTERN PyObject *_wrap_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,NonTVertex >(arg1); + result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106340,7 +107485,7 @@ SWIGINTERN PyObject *_wrap_castToFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,FEdge >(arg1); + result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106372,7 +107517,7 @@ SWIGINTERN PyObject *_wrap_castToViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObje arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,ViewEdge >(arg1); + result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106404,7 +107549,7 @@ SWIGINTERN PyObject *_wrap_castToStroke(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Stroke >(arg1); + result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106436,7 +107581,7 @@ SWIGINTERN PyObject *_wrap_castToChain(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Chain >(arg1); + result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -106773,11 +107918,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"Material_emissionB", _wrap_Material_emissionB, METH_VARARGS, NULL}, { (char *)"Material_emissionA", _wrap_Material_emissionA, METH_VARARGS, NULL}, { (char *)"Material_shininess", _wrap_Material_shininess, METH_VARARGS, NULL}, - { (char *)"Material_SetDiffuse", _wrap_Material_SetDiffuse, METH_VARARGS, NULL}, - { (char *)"Material_SetSpecular", _wrap_Material_SetSpecular, METH_VARARGS, NULL}, - { (char *)"Material_SetAmbient", _wrap_Material_SetAmbient, METH_VARARGS, NULL}, - { (char *)"Material_SetEmission", _wrap_Material_SetEmission, METH_VARARGS, NULL}, - { (char *)"Material_SetShininess", _wrap_Material_SetShininess, METH_VARARGS, NULL}, + { (char *)"Material_setDiffuse", _wrap_Material_setDiffuse, METH_VARARGS, NULL}, + { (char *)"Material_setSpecular", _wrap_Material_setSpecular, METH_VARARGS, NULL}, + { (char *)"Material_setAmbient", _wrap_Material_setAmbient, METH_VARARGS, NULL}, + { (char *)"Material_setEmission", _wrap_Material_setEmission, METH_VARARGS, NULL}, + { (char *)"Material_setShininess", _wrap_Material_setShininess, METH_VARARGS, NULL}, { (char *)"Material___ne__", _wrap_Material___ne__, METH_VARARGS, NULL}, { (char *)"Material___eq__", _wrap_Material___eq__, METH_VARARGS, NULL}, { (char *)"Material_swigregister", Material_swigregister, METH_VARARGS, NULL}, @@ -106858,6 +108003,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Interface0DIterator_castToNonTVertex", _wrap_Interface0DIterator_castToNonTVertex, METH_VARARGS, NULL}, { (char *)"Interface0DIterator_castToTVertex", _wrap_Interface0DIterator_castToTVertex, METH_VARARGS, NULL}, { (char *)"Interface0DIterator_swigregister", Interface0DIterator_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Interface1D", _wrap_new_Interface1D, METH_VARARGS, NULL}, { (char *)"delete_Interface1D", _wrap_delete_Interface1D, METH_VARARGS, NULL}, { (char *)"Interface1D_getExactTypeName", _wrap_Interface1D_getExactTypeName, METH_VARARGS, NULL}, { (char *)"Interface1D_verticesBegin", _wrap_Interface1D_verticesBegin, METH_VARARGS, NULL}, @@ -106904,8 +108050,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"SVertex_fedges_end", _wrap_SVertex_fedges_end, METH_VARARGS, NULL}, { (char *)"SVertex_z", _wrap_SVertex_z, METH_VARARGS, NULL}, { (char *)"SVertex_viewvertex", _wrap_SVertex_viewvertex, METH_VARARGS, NULL}, - { (char *)"SVertex_SetPoint3D", _wrap_SVertex_SetPoint3D, METH_VARARGS, NULL}, - { (char *)"SVertex_SetPoint2D", _wrap_SVertex_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"SVertex_setPoint3D", _wrap_SVertex_setPoint3D, METH_VARARGS, NULL}, + { (char *)"SVertex_setPoint2D", _wrap_SVertex_setPoint2D, METH_VARARGS, NULL}, { (char *)"SVertex_AddNormal", _wrap_SVertex_AddNormal, METH_VARARGS, NULL}, { (char *)"SVertex_setCurvatureInfo", _wrap_SVertex_setCurvatureInfo, METH_VARARGS, NULL}, { (char *)"SVertex_getCurvatureInfo", _wrap_SVertex_getCurvatureInfo, METH_VARARGS, NULL}, @@ -106913,10 +108059,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"SVertex_setDirectionFredo", _wrap_SVertex_setDirectionFredo, METH_VARARGS, NULL}, { (char *)"SVertex_curvatureFredo", _wrap_SVertex_curvatureFredo, METH_VARARGS, NULL}, { (char *)"SVertex_directionFredo", _wrap_SVertex_directionFredo, METH_VARARGS, NULL}, - { (char *)"SVertex_SetId", _wrap_SVertex_SetId, METH_VARARGS, NULL}, - { (char *)"SVertex_SetFEdges", _wrap_SVertex_SetFEdges, METH_VARARGS, NULL}, - { (char *)"SVertex_SetShape", _wrap_SVertex_SetShape, METH_VARARGS, NULL}, - { (char *)"SVertex_SetViewVertex", _wrap_SVertex_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"SVertex_setId", _wrap_SVertex_setId, METH_VARARGS, NULL}, + { (char *)"SVertex_setFEdges", _wrap_SVertex_setFEdges, METH_VARARGS, NULL}, + { (char *)"SVertex_setShape", _wrap_SVertex_setShape, METH_VARARGS, NULL}, + { (char *)"SVertex_setViewVertex", _wrap_SVertex_setViewVertex, METH_VARARGS, NULL}, { (char *)"SVertex_AddFEdge", _wrap_SVertex_AddFEdge, METH_VARARGS, NULL}, { (char *)"SVertex_Replace", _wrap_SVertex_Replace, METH_VARARGS, NULL}, { (char *)"SVertex_fedge", _wrap_SVertex_fedge, METH_VARARGS, NULL}, @@ -106957,17 +108103,17 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdge_getOccludeeIntersection", _wrap_FEdge_getOccludeeIntersection, METH_VARARGS, NULL}, { (char *)"FEdge_getOccludeeEmpty", _wrap_FEdge_getOccludeeEmpty, METH_VARARGS, NULL}, { (char *)"FEdge_isSmooth", _wrap_FEdge_isSmooth, METH_VARARGS, NULL}, - { (char *)"FEdge_SetVertexA", _wrap_FEdge_SetVertexA, METH_VARARGS, NULL}, - { (char *)"FEdge_SetVertexB", _wrap_FEdge_SetVertexB, METH_VARARGS, NULL}, - { (char *)"FEdge_SetId", _wrap_FEdge_SetId, METH_VARARGS, NULL}, - { (char *)"FEdge_SetNextEdge", _wrap_FEdge_SetNextEdge, METH_VARARGS, NULL}, - { (char *)"FEdge_SetPreviousEdge", _wrap_FEdge_SetPreviousEdge, METH_VARARGS, NULL}, - { (char *)"FEdge_SetNature", _wrap_FEdge_SetNature, METH_VARARGS, NULL}, - { (char *)"FEdge_SetViewEdge", _wrap_FEdge_SetViewEdge, METH_VARARGS, NULL}, - { (char *)"FEdge_SetaFace", _wrap_FEdge_SetaFace, METH_VARARGS, NULL}, - { (char *)"FEdge_SetOccludeeIntersection", _wrap_FEdge_SetOccludeeIntersection, METH_VARARGS, NULL}, - { (char *)"FEdge_SetOccludeeEmpty", _wrap_FEdge_SetOccludeeEmpty, METH_VARARGS, NULL}, - { (char *)"FEdge_SetSmooth", _wrap_FEdge_SetSmooth, METH_VARARGS, NULL}, + { (char *)"FEdge_setVertexA", _wrap_FEdge_setVertexA, METH_VARARGS, NULL}, + { (char *)"FEdge_setVertexB", _wrap_FEdge_setVertexB, METH_VARARGS, NULL}, + { (char *)"FEdge_setId", _wrap_FEdge_setId, METH_VARARGS, NULL}, + { (char *)"FEdge_setNextEdge", _wrap_FEdge_setNextEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_setPreviousEdge", _wrap_FEdge_setPreviousEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_setNature", _wrap_FEdge_setNature, METH_VARARGS, NULL}, + { (char *)"FEdge_setViewEdge", _wrap_FEdge_setViewEdge, METH_VARARGS, NULL}, + { (char *)"FEdge_setaFace", _wrap_FEdge_setaFace, METH_VARARGS, NULL}, + { (char *)"FEdge_setOccludeeIntersection", _wrap_FEdge_setOccludeeIntersection, METH_VARARGS, NULL}, + { (char *)"FEdge_setOccludeeEmpty", _wrap_FEdge_setOccludeeEmpty, METH_VARARGS, NULL}, + { (char *)"FEdge_setSmooth", _wrap_FEdge_setSmooth, METH_VARARGS, NULL}, { (char *)"FEdge_CommonVertex", _wrap_FEdge_CommonVertex, METH_VARARGS, NULL}, { (char *)"FEdge_min2d", _wrap_FEdge_min2d, METH_VARARGS, NULL}, { (char *)"FEdge_max2d", _wrap_FEdge_max2d, METH_VARARGS, NULL}, @@ -107032,8 +108178,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSVertexIterator_shape", _wrap_FEdgeSVertexIterator_shape, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_z", _wrap_FEdgeSVertexIterator_z, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_viewvertex", _wrap_FEdgeSVertexIterator_viewvertex, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetPoint3D", _wrap_FEdgeSVertexIterator_SetPoint3D, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetPoint2D", _wrap_FEdgeSVertexIterator_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setPoint3D", _wrap_FEdgeSVertexIterator_setPoint3D, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setPoint2D", _wrap_FEdgeSVertexIterator_setPoint2D, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_AddNormal", _wrap_FEdgeSVertexIterator_AddNormal, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_setCurvatureInfo", _wrap_FEdgeSVertexIterator_setCurvatureInfo, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_getCurvatureInfo", _wrap_FEdgeSVertexIterator_getCurvatureInfo, METH_VARARGS, NULL}, @@ -107041,10 +108187,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSVertexIterator_setDirectionFredo", _wrap_FEdgeSVertexIterator_setDirectionFredo, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_curvatureFredo", _wrap_FEdgeSVertexIterator_curvatureFredo, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_directionFredo", _wrap_FEdgeSVertexIterator_directionFredo, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetId", _wrap_FEdgeSVertexIterator_SetId, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetFEdges", _wrap_FEdgeSVertexIterator_SetFEdges, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetShape", _wrap_FEdgeSVertexIterator_SetShape, METH_VARARGS, NULL}, - { (char *)"FEdgeSVertexIterator_SetViewVertex", _wrap_FEdgeSVertexIterator_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setId", _wrap_FEdgeSVertexIterator_setId, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setFEdges", _wrap_FEdgeSVertexIterator_setFEdges, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setShape", _wrap_FEdgeSVertexIterator_setShape, METH_VARARGS, NULL}, + { (char *)"FEdgeSVertexIterator_setViewVertex", _wrap_FEdgeSVertexIterator_setViewVertex, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_AddFEdge", _wrap_FEdgeSVertexIterator_AddFEdge, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_Replace", _wrap_FEdgeSVertexIterator_Replace, METH_VARARGS, NULL}, { (char *)"FEdgeSVertexIterator_fedge", _wrap_FEdgeSVertexIterator_fedge, METH_VARARGS, NULL}, @@ -107072,10 +108218,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSharp_aMaterial", _wrap_FEdgeSharp_aMaterial, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_bMaterialIndex", _wrap_FEdgeSharp_bMaterialIndex, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_bMaterial", _wrap_FEdgeSharp_bMaterial, METH_VARARGS, NULL}, - { (char *)"FEdgeSharp_SetNormalA", _wrap_FEdgeSharp_SetNormalA, METH_VARARGS, NULL}, - { (char *)"FEdgeSharp_SetNormalB", _wrap_FEdgeSharp_SetNormalB, METH_VARARGS, NULL}, - { (char *)"FEdgeSharp_SetaMaterialIndex", _wrap_FEdgeSharp_SetaMaterialIndex, METH_VARARGS, NULL}, - { (char *)"FEdgeSharp_SetbMaterialIndex", _wrap_FEdgeSharp_SetbMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_setNormalA", _wrap_FEdgeSharp_setNormalA, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_setNormalB", _wrap_FEdgeSharp_setNormalB, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_setaMaterialIndex", _wrap_FEdgeSharp_setaMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSharp_setbMaterialIndex", _wrap_FEdgeSharp_setbMaterialIndex, METH_VARARGS, NULL}, { (char *)"FEdgeSharp_swigregister", FEdgeSharp_swigregister, METH_VARARGS, NULL}, { (char *)"new_FEdgeSmooth", _wrap_new_FEdgeSmooth, METH_VARARGS, NULL}, { (char *)"delete_FEdgeSmooth", _wrap_delete_FEdgeSmooth, METH_VARARGS, NULL}, @@ -107084,9 +108230,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"FEdgeSmooth_normal", _wrap_FEdgeSmooth_normal, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_materialIndex", _wrap_FEdgeSmooth_materialIndex, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_material", _wrap_FEdgeSmooth_material, METH_VARARGS, NULL}, - { (char *)"FEdgeSmooth_SetFace", _wrap_FEdgeSmooth_SetFace, METH_VARARGS, NULL}, - { (char *)"FEdgeSmooth_SetNormal", _wrap_FEdgeSmooth_SetNormal, METH_VARARGS, NULL}, - { (char *)"FEdgeSmooth_SetMaterialIndex", _wrap_FEdgeSmooth_SetMaterialIndex, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_setFace", _wrap_FEdgeSmooth_setFace, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_setNormal", _wrap_FEdgeSmooth_setNormal, METH_VARARGS, NULL}, + { (char *)"FEdgeSmooth_setMaterialIndex", _wrap_FEdgeSmooth_setMaterialIndex, METH_VARARGS, NULL}, { (char *)"FEdgeSmooth_swigregister", FEdgeSmooth_swigregister, METH_VARARGS, NULL}, { (char *)"SShape_userdata_set", _wrap_SShape_userdata_set, METH_VARARGS, NULL}, { (char *)"SShape_userdata_get", _wrap_SShape_userdata_get, METH_VARARGS, NULL}, @@ -107099,7 +108245,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SShape_CreateSVertex", _wrap_SShape_CreateSVertex, METH_VARARGS, NULL}, { (char *)"SShape_SplitEdge", _wrap_SShape_SplitEdge, METH_VARARGS, NULL}, { (char *)"SShape_SplitEdgeIn2", _wrap_SShape_SplitEdgeIn2, METH_VARARGS, NULL}, - { (char *)"SShape_SetBBox", _wrap_SShape_SetBBox, METH_VARARGS, NULL}, + { (char *)"SShape_setBBox", _wrap_SShape_setBBox, METH_VARARGS, NULL}, { (char *)"SShape_ComputeBBox", _wrap_SShape_ComputeBBox, METH_VARARGS, NULL}, { (char *)"SShape_RemoveEdgeFromChain", _wrap_SShape_RemoveEdgeFromChain, METH_VARARGS, NULL}, { (char *)"SShape_RemoveEdge", _wrap_SShape_RemoveEdge, METH_VARARGS, NULL}, @@ -107112,10 +108258,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"SShape_viewShape", _wrap_SShape_viewShape, METH_VARARGS, NULL}, { (char *)"SShape_importance", _wrap_SShape_importance, METH_VARARGS, NULL}, { (char *)"SShape_getId", _wrap_SShape_getId, METH_VARARGS, NULL}, - { (char *)"SShape_SetId", _wrap_SShape_SetId, METH_VARARGS, NULL}, - { (char *)"SShape_SetMaterials", _wrap_SShape_SetMaterials, METH_VARARGS, NULL}, - { (char *)"SShape_SetViewShape", _wrap_SShape_SetViewShape, METH_VARARGS, NULL}, - { (char *)"SShape_SetImportance", _wrap_SShape_SetImportance, METH_VARARGS, NULL}, + { (char *)"SShape_setId", _wrap_SShape_setId, METH_VARARGS, NULL}, + { (char *)"SShape_setMaterials", _wrap_SShape_setMaterials, METH_VARARGS, NULL}, + { (char *)"SShape_setViewShape", _wrap_SShape_setViewShape, METH_VARARGS, NULL}, + { (char *)"SShape_setImportance", _wrap_SShape_setImportance, METH_VARARGS, NULL}, { (char *)"SShape_swigregister", SShape_swigregister, METH_VARARGS, NULL}, { (char *)"ViewShapesContainer_iterator", _wrap_ViewShapesContainer_iterator, METH_VARARGS, NULL}, { (char *)"ViewShapesContainer___nonzero__", _wrap_ViewShapesContainer___nonzero__, METH_VARARGS, NULL}, @@ -107342,13 +108488,13 @@ static PyMethodDef SwigMethods[] = { { (char *)"TVertex_frontEdgeB", _wrap_TVertex_frontEdgeB, METH_VARARGS, NULL}, { (char *)"TVertex_backEdgeA", _wrap_TVertex_backEdgeA, METH_VARARGS, NULL}, { (char *)"TVertex_backEdgeB", _wrap_TVertex_backEdgeB, METH_VARARGS, NULL}, - { (char *)"TVertex_SetFrontVertex", _wrap_TVertex_SetFrontVertex, METH_VARARGS, NULL}, - { (char *)"TVertex_SetBackSVertex", _wrap_TVertex_SetBackSVertex, METH_VARARGS, NULL}, - { (char *)"TVertex_SetFrontEdgeA", _wrap_TVertex_SetFrontEdgeA, METH_VARARGS, NULL}, - { (char *)"TVertex_SetFrontEdgeB", _wrap_TVertex_SetFrontEdgeB, METH_VARARGS, NULL}, - { (char *)"TVertex_SetBackEdgeA", _wrap_TVertex_SetBackEdgeA, METH_VARARGS, NULL}, - { (char *)"TVertex_SetBackEdgeB", _wrap_TVertex_SetBackEdgeB, METH_VARARGS, NULL}, - { (char *)"TVertex_SetId", _wrap_TVertex_SetId, METH_VARARGS, NULL}, + { (char *)"TVertex_setFrontVertex", _wrap_TVertex_setFrontVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_setBackSVertex", _wrap_TVertex_setBackSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_setFrontEdgeA", _wrap_TVertex_setFrontEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_setFrontEdgeB", _wrap_TVertex_setFrontEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_setBackEdgeA", _wrap_TVertex_setBackEdgeA, METH_VARARGS, NULL}, + { (char *)"TVertex_setBackEdgeB", _wrap_TVertex_setBackEdgeB, METH_VARARGS, NULL}, + { (char *)"TVertex_setId", _wrap_TVertex_setId, METH_VARARGS, NULL}, { (char *)"TVertex_GetSVertex", _wrap_TVertex_GetSVertex, METH_VARARGS, NULL}, { (char *)"TVertex_Replace", _wrap_TVertex_Replace, METH_VARARGS, NULL}, { (char *)"TVertex_mate", _wrap_TVertex_mate, METH_VARARGS, NULL}, @@ -107375,8 +108521,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_NonTVertex", _wrap_delete_NonTVertex, METH_VARARGS, NULL}, { (char *)"NonTVertex_svertex", _wrap_NonTVertex_svertex, METH_VARARGS, NULL}, { (char *)"NonTVertex_viewedges", _wrap_NonTVertex_viewedges, METH_VARARGS, NULL}, - { (char *)"NonTVertex_SetSVertex", _wrap_NonTVertex_SetSVertex, METH_VARARGS, NULL}, - { (char *)"NonTVertex_SetViewEdges", _wrap_NonTVertex_SetViewEdges, METH_VARARGS, NULL}, + { (char *)"NonTVertex_setSVertex", _wrap_NonTVertex_setSVertex, METH_VARARGS, NULL}, + { (char *)"NonTVertex_setViewEdges", _wrap_NonTVertex_setViewEdges, METH_VARARGS, NULL}, { (char *)"NonTVertex_AddIncomingViewEdge", _wrap_NonTVertex_AddIncomingViewEdge, METH_VARARGS, NULL}, { (char *)"NonTVertex_AddOutgoingViewEdge", _wrap_NonTVertex_AddOutgoingViewEdge, METH_VARARGS, NULL}, { (char *)"NonTVertex_AddViewEdge", _wrap_NonTVertex_AddViewEdge, METH_VARARGS, NULL}, @@ -107404,16 +108550,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdge_bShape", _wrap_ViewEdge_bShape, METH_VARARGS, NULL}, { (char *)"ViewEdge_occluders", _wrap_ViewEdge_occluders, METH_VARARGS, NULL}, { (char *)"ViewEdge_splittingId", _wrap_ViewEdge_splittingId, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetA", _wrap_ViewEdge_SetA, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetB", _wrap_ViewEdge_SetB, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetNature", _wrap_ViewEdge_SetNature, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetFEdgeA", _wrap_ViewEdge_SetFEdgeA, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetFEdgeB", _wrap_ViewEdge_SetFEdgeB, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetShape", _wrap_ViewEdge_SetShape, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetId", _wrap_ViewEdge_SetId, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setA", _wrap_ViewEdge_setA, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setB", _wrap_ViewEdge_setB, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setNature", _wrap_ViewEdge_setNature, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setFEdgeA", _wrap_ViewEdge_setFEdgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setFEdgeB", _wrap_ViewEdge_setFEdgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setShape", _wrap_ViewEdge_setShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setId", _wrap_ViewEdge_setId, METH_VARARGS, NULL}, { (char *)"ViewEdge_UpdateFEdges", _wrap_ViewEdge_UpdateFEdges, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetaShape", _wrap_ViewEdge_SetaShape, METH_VARARGS, NULL}, - { (char *)"ViewEdge_SetQI", _wrap_ViewEdge_SetQI, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setaShape", _wrap_ViewEdge_setaShape, METH_VARARGS, NULL}, + { (char *)"ViewEdge_setQI", _wrap_ViewEdge_setQI, METH_VARARGS, NULL}, { (char *)"ViewEdge_setChainingTimeStamp", _wrap_ViewEdge_setChainingTimeStamp, METH_VARARGS, NULL}, { (char *)"ViewEdge_AddOccluder", _wrap_ViewEdge_AddOccluder, METH_VARARGS, NULL}, { (char *)"ViewEdge_setSplittingId", _wrap_ViewEdge_setSplittingId, METH_VARARGS, NULL}, @@ -107446,9 +108592,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewShape_vertices", _wrap_ViewShape_vertices, METH_VARARGS, NULL}, { (char *)"ViewShape_edges", _wrap_ViewShape_edges, METH_VARARGS, NULL}, { (char *)"ViewShape_getId", _wrap_ViewShape_getId, METH_VARARGS, NULL}, - { (char *)"ViewShape_SetSShape", _wrap_ViewShape_SetSShape, METH_VARARGS, NULL}, - { (char *)"ViewShape_SetVertices", _wrap_ViewShape_SetVertices, METH_VARARGS, NULL}, - { (char *)"ViewShape_SetEdges", _wrap_ViewShape_SetEdges, METH_VARARGS, NULL}, + { (char *)"ViewShape_setSShape", _wrap_ViewShape_setSShape, METH_VARARGS, NULL}, + { (char *)"ViewShape_setVertices", _wrap_ViewShape_setVertices, METH_VARARGS, NULL}, + { (char *)"ViewShape_setEdges", _wrap_ViewShape_setEdges, METH_VARARGS, NULL}, { (char *)"ViewShape_AddVertex", _wrap_ViewShape_AddVertex, METH_VARARGS, NULL}, { (char *)"ViewShape_AddEdge", _wrap_ViewShape_AddEdge, METH_VARARGS, NULL}, { (char *)"ViewShape_RemoveEdge", _wrap_ViewShape_RemoveEdge, METH_VARARGS, NULL}, @@ -107505,8 +108651,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdgeSVertexIterator_shape", _wrap_ViewEdgeSVertexIterator_shape, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_z", _wrap_ViewEdgeSVertexIterator_z, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_viewvertex", _wrap_ViewEdgeSVertexIterator_viewvertex, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetPoint3D", _wrap_ViewEdgeSVertexIterator_SetPoint3D, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetPoint2D", _wrap_ViewEdgeSVertexIterator_SetPoint2D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setPoint3D", _wrap_ViewEdgeSVertexIterator_setPoint3D, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setPoint2D", _wrap_ViewEdgeSVertexIterator_setPoint2D, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_AddNormal", _wrap_ViewEdgeSVertexIterator_AddNormal, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_setCurvatureInfo", _wrap_ViewEdgeSVertexIterator_setCurvatureInfo, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_getCurvatureInfo", _wrap_ViewEdgeSVertexIterator_getCurvatureInfo, METH_VARARGS, NULL}, @@ -107514,10 +108660,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdgeSVertexIterator_setDirectionFredo", _wrap_ViewEdgeSVertexIterator_setDirectionFredo, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_curvatureFredo", _wrap_ViewEdgeSVertexIterator_curvatureFredo, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_directionFredo", _wrap_ViewEdgeSVertexIterator_directionFredo, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetId", _wrap_ViewEdgeSVertexIterator_SetId, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetFEdges", _wrap_ViewEdgeSVertexIterator_SetFEdges, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetShape", _wrap_ViewEdgeSVertexIterator_SetShape, METH_VARARGS, NULL}, - { (char *)"ViewEdgeSVertexIterator_SetViewVertex", _wrap_ViewEdgeSVertexIterator_SetViewVertex, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setId", _wrap_ViewEdgeSVertexIterator_setId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setFEdges", _wrap_ViewEdgeSVertexIterator_setFEdges, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setShape", _wrap_ViewEdgeSVertexIterator_setShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeSVertexIterator_setViewVertex", _wrap_ViewEdgeSVertexIterator_setViewVertex, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_AddFEdge", _wrap_ViewEdgeSVertexIterator_AddFEdge, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_Replace", _wrap_ViewEdgeSVertexIterator_Replace, METH_VARARGS, NULL}, { (char *)"ViewEdgeSVertexIterator_fedge", _wrap_ViewEdgeSVertexIterator_fedge, METH_VARARGS, NULL}, @@ -107569,16 +108715,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdgeViewEdgeIterator_bShape", _wrap_ViewEdgeViewEdgeIterator_bShape, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_occluders", _wrap_ViewEdgeViewEdgeIterator_occluders, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_splittingId", _wrap_ViewEdgeViewEdgeIterator_splittingId, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetA", _wrap_ViewEdgeViewEdgeIterator_SetA, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetB", _wrap_ViewEdgeViewEdgeIterator_SetB, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetNature", _wrap_ViewEdgeViewEdgeIterator_SetNature, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetFEdgeA", _wrap_ViewEdgeViewEdgeIterator_SetFEdgeA, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetFEdgeB", _wrap_ViewEdgeViewEdgeIterator_SetFEdgeB, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetShape", _wrap_ViewEdgeViewEdgeIterator_SetShape, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetId", _wrap_ViewEdgeViewEdgeIterator_SetId, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setA", _wrap_ViewEdgeViewEdgeIterator_setA, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setB", _wrap_ViewEdgeViewEdgeIterator_setB, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setNature", _wrap_ViewEdgeViewEdgeIterator_setNature, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setFEdgeA", _wrap_ViewEdgeViewEdgeIterator_setFEdgeA, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setFEdgeB", _wrap_ViewEdgeViewEdgeIterator_setFEdgeB, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setShape", _wrap_ViewEdgeViewEdgeIterator_setShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setId", _wrap_ViewEdgeViewEdgeIterator_setId, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_UpdateFEdges", _wrap_ViewEdgeViewEdgeIterator_UpdateFEdges, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetaShape", _wrap_ViewEdgeViewEdgeIterator_SetaShape, METH_VARARGS, NULL}, - { (char *)"ViewEdgeViewEdgeIterator_SetQI", _wrap_ViewEdgeViewEdgeIterator_SetQI, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setaShape", _wrap_ViewEdgeViewEdgeIterator_setaShape, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_setQI", _wrap_ViewEdgeViewEdgeIterator_setQI, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_setChainingTimeStamp", _wrap_ViewEdgeViewEdgeIterator_setChainingTimeStamp, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_AddOccluder", _wrap_ViewEdgeViewEdgeIterator_AddOccluder, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_setSplittingId", _wrap_ViewEdgeViewEdgeIterator_setSplittingId, METH_VARARGS, NULL}, @@ -108008,16 +109154,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"AdjacencyIterator_bShape", _wrap_AdjacencyIterator_bShape, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_occluders", _wrap_AdjacencyIterator_occluders, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_splittingId", _wrap_AdjacencyIterator_splittingId, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetA", _wrap_AdjacencyIterator_SetA, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetB", _wrap_AdjacencyIterator_SetB, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetNature", _wrap_AdjacencyIterator_SetNature, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetFEdgeA", _wrap_AdjacencyIterator_SetFEdgeA, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetFEdgeB", _wrap_AdjacencyIterator_SetFEdgeB, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetShape", _wrap_AdjacencyIterator_SetShape, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetId", _wrap_AdjacencyIterator_SetId, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setA", _wrap_AdjacencyIterator_setA, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setB", _wrap_AdjacencyIterator_setB, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setNature", _wrap_AdjacencyIterator_setNature, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setFEdgeA", _wrap_AdjacencyIterator_setFEdgeA, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setFEdgeB", _wrap_AdjacencyIterator_setFEdgeB, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setShape", _wrap_AdjacencyIterator_setShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setId", _wrap_AdjacencyIterator_setId, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_UpdateFEdges", _wrap_AdjacencyIterator_UpdateFEdges, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetaShape", _wrap_AdjacencyIterator_SetaShape, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_SetQI", _wrap_AdjacencyIterator_SetQI, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setaShape", _wrap_AdjacencyIterator_setaShape, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_setQI", _wrap_AdjacencyIterator_setQI, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_setChainingTimeStamp", _wrap_AdjacencyIterator_setChainingTimeStamp, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_AddOccluder", _wrap_AdjacencyIterator_AddOccluder, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_setSplittingId", _wrap_AdjacencyIterator_setSplittingId, METH_VARARGS, NULL}, @@ -108218,9 +109364,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"CurvePointIterator_A", _wrap_CurvePointIterator_A, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_B", _wrap_CurvePointIterator_B, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_t2d", _wrap_CurvePointIterator_t2d, METH_VARARGS, NULL}, - { (char *)"CurvePointIterator_SetA", _wrap_CurvePointIterator_SetA, METH_VARARGS, NULL}, - { (char *)"CurvePointIterator_SetB", _wrap_CurvePointIterator_SetB, METH_VARARGS, NULL}, - { (char *)"CurvePointIterator_SetT2d", _wrap_CurvePointIterator_SetT2d, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_setA", _wrap_CurvePointIterator_setA, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_setB", _wrap_CurvePointIterator_setB, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_setT2d", _wrap_CurvePointIterator_setT2d, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_fedge", _wrap_CurvePointIterator_fedge, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_point2d", _wrap_CurvePointIterator_point2d, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_point3d", _wrap_CurvePointIterator_point3d, METH_VARARGS, NULL}, @@ -108259,9 +109405,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"CurvePoint_A", _wrap_CurvePoint_A, METH_VARARGS, NULL}, { (char *)"CurvePoint_B", _wrap_CurvePoint_B, METH_VARARGS, NULL}, { (char *)"CurvePoint_t2d", _wrap_CurvePoint_t2d, METH_VARARGS, NULL}, - { (char *)"CurvePoint_SetA", _wrap_CurvePoint_SetA, METH_VARARGS, NULL}, - { (char *)"CurvePoint_SetB", _wrap_CurvePoint_SetB, METH_VARARGS, NULL}, - { (char *)"CurvePoint_SetT2d", _wrap_CurvePoint_SetT2d, METH_VARARGS, NULL}, + { (char *)"CurvePoint_setA", _wrap_CurvePoint_setA, METH_VARARGS, NULL}, + { (char *)"CurvePoint_setB", _wrap_CurvePoint_setB, METH_VARARGS, NULL}, + { (char *)"CurvePoint_setT2d", _wrap_CurvePoint_setT2d, METH_VARARGS, NULL}, { (char *)"CurvePoint_fedge", _wrap_CurvePoint_fedge, METH_VARARGS, NULL}, { (char *)"CurvePoint_point2d", _wrap_CurvePoint_point2d, METH_VARARGS, NULL}, { (char *)"CurvePoint_point3d", _wrap_CurvePoint_point3d, METH_VARARGS, NULL}, @@ -108318,12 +109464,12 @@ static PyMethodDef SwigMethods[] = { { (char *)"StrokeVertexIterator_attribute", _wrap_StrokeVertexIterator_attribute, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_curvilinearAbscissa", _wrap_StrokeVertexIterator_curvilinearAbscissa, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_strokeLength", _wrap_StrokeVertexIterator_strokeLength, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetX", _wrap_StrokeVertexIterator_SetX, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetY", _wrap_StrokeVertexIterator_SetY, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetPoint", _wrap_StrokeVertexIterator_SetPoint, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetAttribute", _wrap_StrokeVertexIterator_SetAttribute, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetCurvilinearAbscissa", _wrap_StrokeVertexIterator_SetCurvilinearAbscissa, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetStrokeLength", _wrap_StrokeVertexIterator_SetStrokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setX", _wrap_StrokeVertexIterator_setX, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setY", _wrap_StrokeVertexIterator_setY, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setPoint", _wrap_StrokeVertexIterator_setPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setAttribute", _wrap_StrokeVertexIterator_setAttribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setCurvilinearAbscissa", _wrap_StrokeVertexIterator_setCurvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setStrokeLength", _wrap_StrokeVertexIterator_setStrokeLength, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_getX", _wrap_StrokeVertexIterator_getX, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_getY", _wrap_StrokeVertexIterator_getY, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_getZ", _wrap_StrokeVertexIterator_getZ, METH_VARARGS, NULL}, @@ -108342,9 +109488,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"StrokeVertexIterator_A", _wrap_StrokeVertexIterator_A, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_B", _wrap_StrokeVertexIterator_B, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_t2d", _wrap_StrokeVertexIterator_t2d, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetA", _wrap_StrokeVertexIterator_SetA, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetB", _wrap_StrokeVertexIterator_SetB, METH_VARARGS, NULL}, - { (char *)"StrokeVertexIterator_SetT2d", _wrap_StrokeVertexIterator_SetT2d, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setA", _wrap_StrokeVertexIterator_setA, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setB", _wrap_StrokeVertexIterator_setB, METH_VARARGS, NULL}, + { (char *)"StrokeVertexIterator_setT2d", _wrap_StrokeVertexIterator_setT2d, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_fedge", _wrap_StrokeVertexIterator_fedge, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_point2d", _wrap_StrokeVertexIterator_point2d, METH_VARARGS, NULL}, { (char *)"StrokeVertexIterator_point3d", _wrap_StrokeVertexIterator_point3d, METH_VARARGS, NULL}, @@ -108383,7 +109529,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"StrokeAttribute_setColor", _wrap_StrokeAttribute_setColor, METH_VARARGS, NULL}, { (char *)"StrokeAttribute_setAlpha", _wrap_StrokeAttribute_setAlpha, METH_VARARGS, NULL}, { (char *)"StrokeAttribute_setThickness", _wrap_StrokeAttribute_setThickness, METH_VARARGS, NULL}, - { (char *)"StrokeAttribute_SetVisible", _wrap_StrokeAttribute_SetVisible, METH_VARARGS, NULL}, + { (char *)"StrokeAttribute_setVisible", _wrap_StrokeAttribute_setVisible, METH_VARARGS, NULL}, { (char *)"StrokeAttribute_setAttributeReal", _wrap_StrokeAttribute_setAttributeReal, METH_VARARGS, NULL}, { (char *)"StrokeAttribute_setAttributeVec2f", _wrap_StrokeAttribute_setAttributeVec2f, METH_VARARGS, NULL}, { (char *)"StrokeAttribute_setAttributeVec3f", _wrap_StrokeAttribute_setAttributeVec3f, METH_VARARGS, NULL}, @@ -108398,12 +109544,12 @@ static PyMethodDef SwigMethods[] = { { (char *)"StrokeVertex_curvilinearAbscissa", _wrap_StrokeVertex_curvilinearAbscissa, METH_VARARGS, NULL}, { (char *)"StrokeVertex_strokeLength", _wrap_StrokeVertex_strokeLength, METH_VARARGS, NULL}, { (char *)"StrokeVertex_u", _wrap_StrokeVertex_u, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetX", _wrap_StrokeVertex_SetX, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetY", _wrap_StrokeVertex_SetY, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetPoint", _wrap_StrokeVertex_SetPoint, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetAttribute", _wrap_StrokeVertex_SetAttribute, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetCurvilinearAbscissa", _wrap_StrokeVertex_SetCurvilinearAbscissa, METH_VARARGS, NULL}, - { (char *)"StrokeVertex_SetStrokeLength", _wrap_StrokeVertex_SetStrokeLength, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setX", _wrap_StrokeVertex_setX, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setY", _wrap_StrokeVertex_setY, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setPoint", _wrap_StrokeVertex_setPoint, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setAttribute", _wrap_StrokeVertex_setAttribute, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setCurvilinearAbscissa", _wrap_StrokeVertex_setCurvilinearAbscissa, METH_VARARGS, NULL}, + { (char *)"StrokeVertex_setStrokeLength", _wrap_StrokeVertex_setStrokeLength, METH_VARARGS, NULL}, { (char *)"StrokeVertex_swigregister", StrokeVertex_swigregister, METH_VARARGS, NULL}, { (char *)"Stroke_getExactTypeName", _wrap_Stroke_getExactTypeName, METH_VARARGS, NULL}, { (char *)"Stroke_getId", _wrap_Stroke_getId, METH_VARARGS, NULL}, @@ -108429,16 +109575,16 @@ static PyMethodDef SwigMethods[] = { { (char *)"Stroke_getEndingOrientation", _wrap_Stroke_getEndingOrientation, METH_VARARGS, NULL}, { (char *)"Stroke_getEndingOrientationX", _wrap_Stroke_getEndingOrientationX, METH_VARARGS, NULL}, { (char *)"Stroke_getEndingOrientationY", _wrap_Stroke_getEndingOrientationY, METH_VARARGS, NULL}, - { (char *)"Stroke_SetId", _wrap_Stroke_SetId, METH_VARARGS, NULL}, - { (char *)"Stroke_SetLength", _wrap_Stroke_SetLength, METH_VARARGS, NULL}, - { (char *)"Stroke_SetMediumType", _wrap_Stroke_SetMediumType, METH_VARARGS, NULL}, - { (char *)"Stroke_SetTextureId", _wrap_Stroke_SetTextureId, METH_VARARGS, NULL}, - { (char *)"Stroke_SetTips", _wrap_Stroke_SetTips, METH_VARARGS, NULL}, + { (char *)"Stroke_setId", _wrap_Stroke_setId, METH_VARARGS, NULL}, + { (char *)"Stroke_setLength", _wrap_Stroke_setLength, METH_VARARGS, NULL}, + { (char *)"Stroke_setMediumType", _wrap_Stroke_setMediumType, METH_VARARGS, NULL}, + { (char *)"Stroke_setTextureId", _wrap_Stroke_setTextureId, METH_VARARGS, NULL}, + { (char *)"Stroke_setTips", _wrap_Stroke_setTips, METH_VARARGS, NULL}, { (char *)"Stroke_push_back", _wrap_Stroke_push_back, METH_VARARGS, NULL}, { (char *)"Stroke_push_front", _wrap_Stroke_push_front, METH_VARARGS, NULL}, { (char *)"Stroke_AddViewEdge", _wrap_Stroke_AddViewEdge, METH_VARARGS, NULL}, - { (char *)"Stroke_SetBeginningOrientation", _wrap_Stroke_SetBeginningOrientation, METH_VARARGS, NULL}, - { (char *)"Stroke_SetEndingOrientation", _wrap_Stroke_SetEndingOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_setBeginningOrientation", _wrap_Stroke_setBeginningOrientation, METH_VARARGS, NULL}, + { (char *)"Stroke_setEndingOrientation", _wrap_Stroke_setEndingOrientation, METH_VARARGS, NULL}, { (char *)"Stroke_strokeVerticesBegin", _wrap_Stroke_strokeVerticesBegin, METH_VARARGS, NULL}, { (char *)"Stroke_strokeVerticesEnd", _wrap_Stroke_strokeVerticesEnd, METH_VARARGS, NULL}, { (char *)"Stroke_strokeVerticesSize", _wrap_Stroke_strokeVerticesSize, METH_VARARGS, NULL}, @@ -108666,14 +109812,14 @@ static PyMethodDef SwigMethods[] = { { (char *)"Canvas_renderer", _wrap_Canvas_renderer, METH_VARARGS, NULL}, { (char *)"Canvas_getCurrentStyleModule", _wrap_Canvas_getCurrentStyleModule, METH_VARARGS, NULL}, { (char *)"Canvas_getRecordFlag", _wrap_Canvas_getRecordFlag, METH_VARARGS, NULL}, - { (char *)"Canvas_SetSelectedFEdge", _wrap_Canvas_SetSelectedFEdge, METH_VARARGS, NULL}, + { (char *)"Canvas_setSelectedFEdge", _wrap_Canvas_setSelectedFEdge, METH_VARARGS, NULL}, { (char *)"Canvas_InsertStyleModule", _wrap_Canvas_InsertStyleModule, METH_VARARGS, NULL}, { (char *)"Canvas_RemoveStyleModule", _wrap_Canvas_RemoveStyleModule, METH_VARARGS, NULL}, { (char *)"Canvas_SwapStyleModules", _wrap_Canvas_SwapStyleModules, METH_VARARGS, NULL}, { (char *)"Canvas_ReplaceStyleModule", _wrap_Canvas_ReplaceStyleModule, METH_VARARGS, NULL}, - { (char *)"Canvas_SetVisible", _wrap_Canvas_SetVisible, METH_VARARGS, NULL}, + { (char *)"Canvas_setVisible", _wrap_Canvas_setVisible, METH_VARARGS, NULL}, { (char *)"Canvas_AddLayer", _wrap_Canvas_AddLayer, METH_VARARGS, NULL}, - { (char *)"Canvas_SetCurrentPaperTextureIndex", _wrap_Canvas_SetCurrentPaperTextureIndex, METH_VARARGS, NULL}, + { (char *)"Canvas_setCurrentPaperTextureIndex", _wrap_Canvas_setCurrentPaperTextureIndex, METH_VARARGS, NULL}, { (char *)"Canvas_changePaperTexture", _wrap_Canvas_changePaperTexture, METH_VARARGS, NULL}, { (char *)"Canvas_togglePaperTexture", _wrap_Canvas_togglePaperTexture, METH_VARARGS, NULL}, { (char *)"Canvas_resetModified", _wrap_Canvas_resetModified, METH_VARARGS, NULL}, @@ -108696,395 +109842,395 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions0D::GetOccludersF0D *) x)); +static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction0D > > *) ((Functions0D::GetOccludersF0D *) x)); } -static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludeeF1D *) x)); +static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludeeF1D *) x)); } -static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetShapeF1D *) x)); +static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetShapeF1D *) x)); } -static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludersF1D *) x)); +static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { + return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludersF1D *) x)); } -static void *_p_TVertexTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_TVertexTo_p_Interface0D(void *x) { return (void *)((Interface0D *) (ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_NonTVertexTo_p_Interface0D(void *x) { return (void *)((Interface0D *) (ViewVertex *) ((NonTVertex *) x)); } -static void *_p_SVertexTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_SVertexTo_p_Interface0D(void *x) { return (void *)((Interface0D *) ((SVertex *) x)); } -static void *_p_ViewVertexTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_ViewVertexTo_p_Interface0D(void *x) { return (void *)((Interface0D *) ((ViewVertex *) x)); } -static void *_p_StrokeVertexTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_StrokeVertexTo_p_Interface0D(void *x) { return (void *)((Interface0D *) (CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_CurvePointTo_p_Interface0D(void *x, int *newmemory) { +static void *_p_CurvePointTo_p_Interface0D(void *x) { return (void *)((Interface0D *) ((CurvePoint *) x)); } -static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetShapeF0D *) x)); +static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetShapeF0D *) x)); } -static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetOccludeeF0D *) x)); +static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetOccludeeF0D *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x, int *newmemory) { +static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x) { return (void *)((ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x, int *newmemory) { +static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x) { return (void *)((ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { +static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) ((ChainingIterator *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { +static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { +static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ViewEdgeTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_ViewEdgeTo_p_Interface1D(void *x) { return (void *)((Interface1D *) ((ViewEdge *) x)); } -static void *_p_StrokeTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_StrokeTo_p_Interface1D(void *x) { return (void *)((Interface1D *) ((Stroke *) x)); } -static void *_p_CurveTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_CurveTo_p_Interface1D(void *x) { return (void *)((Interface1D *) ((Curve *) x)); } -static void *_p_FEdgeSharpTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_FEdgeSharpTo_p_Interface1D(void *x) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_FEdgeSmoothTo_p_Interface1D(void *x) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_FEdgeTo_p_Interface1D(void *x, int *newmemory) { +static void *_p_FEdgeTo_p_Interface1D(void *x) { return (void *)((Interface1D *) ((FEdge *) x)); } -static void *_p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< int,2 > *) ((VecMat::Vec2< int > *) x)); +static void *_p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); } -static void *_p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< unsigned int,2 > *) ((VecMat::Vec2< unsigned int > *) x)); +static void *_p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); } -static void *_p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< int,3 > *) ((VecMat::Vec3< int > *) x)); +static void *_p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); } -static void *_p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< unsigned int,3 > *) ((VecMat::Vec3< unsigned int > *) x)); +static void *_p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); } -static void *_p_StrokeVertexTo_p_CurvePoint(void *x, int *newmemory) { +static void *_p_StrokeVertexTo_p_CurvePoint(void *x) { return (void *)((CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { +static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x) { return (void *)((UnaryPredicate0D *) ((Predicates0D::TrueUP0D *) x)); } -static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { +static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x) { return (void *)((UnaryPredicate0D *) ((Predicates0D::FalseUP0D *) x)); } -static void *_p_FEdgeSharpTo_p_FEdge(void *x, int *newmemory) { +static void *_p_FEdgeSharpTo_p_FEdge(void *x) { return (void *)((FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_FEdge(void *x, int *newmemory) { +static void *_p_FEdgeSmoothTo_p_FEdge(void *x) { return (void *)((FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ConstrainedIncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ColorNoiseShader *) x)); } -static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessNoiseShader *) x)); } -static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::LengthDependingThicknessShader *) x)); } -static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantExternThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantThicknessShader *) x)); } -static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::StrokeTextureShader *) x)); } -static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::SamplingShader *) x)); } -static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::BSplineShader *) x)); } -static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::BezierCurveShader *) x)); } -static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::InflateShader *) x)); } -static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::GuidingLinesShader *) x)); } -static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::streamShader *) x)); } -static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::fstreamShader *) x)); } -static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((CalligraphicShader *) x)); } -static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((SpatialNoiseShader *) x)); } -static void *_p_SmoothingShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_SmoothingShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((SmoothingShader *) x)); } -static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::TextureAssignerShader *) x)); } -static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::CalligraphicColorShader *) x)); } -static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::MaterialColorShader *) x)); } -static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ColorVariationPatternShader *) x)); } -static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingColorShader *) x)); } -static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantColorShader *) x)); } -static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessVariationPatternShader *) x)); } -static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::BackboneStretcherShader *) x)); } -static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::ExternalContourStretcherShader *) x)); } -static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::PolygonalizationShader *) x)); } -static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((StrokeShaders::TipRemoverShader *) x)); } -static void *_p_OmissionShaderTo_p_StrokeShader(void *x, int *newmemory) { +static void *_p_OmissionShaderTo_p_StrokeShader(void *x) { return (void *)((StrokeShader *) ((OmissionShader *) x)); } -static void *_p_OmitterTo_p_Smoother(void *x, int *newmemory) { +static void *_p_OmitterTo_p_Smoother(void *x) { return (void *)((Smoother *) ((Omitter *) x)); } -static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x) { return (void *)((BinaryPredicate1D *) ((Predicates1D::Length2DBP1D *) x)); } -static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x) { return (void *)((BinaryPredicate1D *) ((Predicates1D::FalseBP1D *) x)); } -static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x) { return (void *)((BinaryPredicate1D *) ((Predicates1D::ViewMapGradientNormBP1D *) x)); } -static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x) { return (void *)((BinaryPredicate1D *) ((Predicates1D::TrueBP1D *) x)); } -static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x) { return (void *)((BinaryPredicate1D *) ((Predicates1D::SameShapeIdBP1D *) x)); } -static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::FalseUP1D *) x)); } -static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ShapeUP1D *) x)); } -static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::DensityLowerThanUP1D *) x)); } -static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToTimeStampUP1D *) x)); } -static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToChainingTimeStampUP1D *) x)); } -static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::TrueUP1D *) x)); } -static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::QuantitativeInvisibilityUP1D *) x)); } -static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ContourUP1D *) x)); } -static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { +static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ExternalContourUP1D *) x)); } -static void *_p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< float,2 > *) ((VecMat::Vec2< float > *) x)); +static void *_p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); } -static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< void > *) ((Functions1D::TimeStampF1D *) x)); +static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::TimeStampF1D *) x)); } -static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< void > *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); +static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); } -static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< void > *) ((Functions1D::ChainingTimeStampF1D *) x)); +static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::ChainingTimeStampF1D *) x)); } -static void *_p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< float,3 > *) ((VecMat::Vec3< float > *) x)); +static void *_p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); } -static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { +static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { return (void *)((Interface0DIteratorNested *) ((FEdgeInternal::SVertexIterator *) x)); } -static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { +static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { return (void *)((Interface0DIteratorNested *) ((ViewEdgeInternal::SVertexIterator *) x)); } -static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { +static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x) { return (void *)((Interface0DIteratorNested *) ((CurveInternal::CurvePointIterator *) x)); } -static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { +static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x) { return (void *)((Interface0DIteratorNested *) ((StrokeInternal::StrokeVertexIterator *) x)); } -static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::VertexOrientation2DF0D *) x)); +static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation2DF0D *) x)); } -static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::Normal2DF0D *) x)); +static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::Normal2DF0D *) x)); } -static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< VecMat::Vec3< float > > *) ((Functions0D::VertexOrientation3DF0D *) x)); +static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t(void *x) { + return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation3DF0D *) x)); } -static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Orientation2DF1D *) x)); +static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation2DF1D *) x)); } -static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Normal2DF1D *) x)); +static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Normal2DF1D *) x)); } -static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< VecMat::Vec3< float > > *) ((Functions1D::Orientation3DF1D *) x)); +static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t(void *x) { + return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation3DF1D *) x)); } -static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< unsigned int > *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); +static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); } -static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< unsigned int > *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); +static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); } -static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< Id > *) ((Functions0D::ShapeIdF0D *) x)); +static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ShapeIdF0D *) x)); } -static void *_p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< double,2 > *) ((VecMat::Vec2< double > *) x)); +static void *_p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); } -static void *_p_TVertexTo_p_ViewVertex(void *x, int *newmemory) { +static void *_p_TVertexTo_p_ViewVertex(void *x) { return (void *)((ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_ViewVertex(void *x, int *newmemory) { +static void *_p_NonTVertexTo_p_ViewVertex(void *x) { return (void *)((ViewVertex *) ((NonTVertex *) x)); } -static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::ZDiscontinuityF0D *) x)); +static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ZDiscontinuityF0D *) x)); } -static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::DensityF0D *) x)); +static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::DensityF0D *) x)); } -static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetXF0D *) x)); +static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetXF0D *) x)); } -static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedXF0D *) x)); +static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedXF0D *) x)); } -static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::Curvature2DAngleF0D *) x)); +static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::Curvature2DAngleF0D *) x)); } -static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetYF0D *) x)); +static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetYF0D *) x)); } -static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedYF0D *) x)); +static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedYF0D *) x)); } -static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetZF0D *) x)); +static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetZF0D *) x)); } -static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedZF0D *) x)); +static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedZF0D *) x)); } -static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< double > *) ((Functions0D::LocalAverageDepthF0D *) x)); +static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::LocalAverageDepthF0D *) x)); } -static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); } -static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::DensityF1D *) x)); +static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::DensityF1D *) x)); } -static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::ZDiscontinuityF1D *) x)); +static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::ZDiscontinuityF1D *) x)); } -static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetXF1D *) x)); +static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetXF1D *) x)); } -static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetZF1D *) x)); +static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetZF1D *) x)); } -static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetViewMapGradientNormF1D *) x)); +static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetViewMapGradientNormF1D *) x)); } -static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedYF1D *) x)); +static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedYF1D *) x)); } -static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::Curvature2DAngleF1D *) x)); +static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::Curvature2DAngleF1D *) x)); } -static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetYF1D *) x)); +static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetYF1D *) x)); } -static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedXF1D *) x)); +static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedXF1D *) x)); } -static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::LocalAverageDepthF1D *) x)); +static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::LocalAverageDepthF1D *) x)); } -static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { - return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedZF1D *) x)); +static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { + return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedZF1D *) x)); } -static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); +static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); } -static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadMapPixelF0D *) x)); +static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); } -static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetViewMapGradientNormF0D *) x)); +static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetViewMapGradientNormF0D *) x)); } -static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { - return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetParameterF0D *) x)); +static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t(void *x) { + return (void *)((UnaryFunction0D *) ((Functions0D::GetParameterF0D *) x)); } -static void *_p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t(void *x, int *newmemory) { - return (void *)((VecMat::Vec< double,3 > *) ((VecMat::Vec3< double > *) x)); +static void *_p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t(void *x) { + return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); } static swig_type_info _swigt__p_AdjacencyIterator = {"_p_AdjacencyIterator", "AdjacencyIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BBoxT_VecMat__Vec3T_double_t_t = {"_p_BBoxT_VecMat__Vec3T_double_t_t", "BBox< VecMat::Vec3< double > > *|BBox< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BBoxTVecMat__Vec3Tdouble_t_t = {"_p_BBoxTVecMat__Vec3Tdouble_t_t", "BBox > *|BBox *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate0D = {"_p_BinaryPredicate0D", "BinaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate1D = {"_p_BinaryPredicate1D", "BinaryPredicate1D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CalligraphicShader = {"_p_CalligraphicShader", "CalligraphicShader *", 0, 0, (void*)0, 0}; @@ -109096,7 +110242,7 @@ static swig_type_info _swigt__p_ChainingIterator = {"_p_ChainingIterator", "Chai static swig_type_info _swigt__p_CurvatureInfo = {"_p_CurvatureInfo", "CurvatureInfo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Curve = {"_p_Curve", "Curve *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CurveInternal__CurvePointIterator = {"_p_CurveInternal__CurvePointIterator", "CurveInternal::CurvePointIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "Curve::Vertex *|CurvePoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "CurvePoint *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Curve__vertex_container__iterator = {"_p_Curve__vertex_container__iterator", "::Curve::vertex_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdge = {"_p_FEdge", "FEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdgeInternal__SVertexIterator = {"_p_FEdgeInternal__SVertexIterator", "FEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; @@ -109235,56 +110381,56 @@ static swig_type_info _swigt__p_Stroke__viewedge_container__iterator = {"_p_Stro static swig_type_info _swigt__p_StrokesContainer = {"_p_StrokesContainer", "StrokesContainer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_StyleModule = {"_p_StyleModule", "StyleModule *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TVertex = {"_p_TVertex", "TVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_Id_t = {"_p_UnaryFunction0DT_Id_t", "UnaryFunction0D< Id > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t", "UnaryFunction0D< Geometry::Vec2f > *|UnaryFunction0D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t", "UnaryFunction0D< VecMat::Vec3< float > > *|UnaryFunction0D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_ViewShape_p_t = {"_p_UnaryFunction0DT_ViewShape_p_t", "UnaryFunction0D< ViewShape * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_double_t = {"_p_UnaryFunction0DT_double_t", "UnaryFunction0D< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_float_t = {"_p_UnaryFunction0DT_float_t", "UnaryFunction0D< float > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction0D< std::vector< ViewShape * > > *|UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_unsigned_int_t = {"_p_UnaryFunction0DT_unsigned_int_t", "UnaryFunction0D< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DT_void_t = {"_p_UnaryFunction0DT_void_t", "UnaryFunction0D< void > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t", "UnaryFunction1D< Geometry::Vec2f > *|UnaryFunction1D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t", "UnaryFunction1D< VecMat::Vec3< float > > *|UnaryFunction1D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_double_t = {"_p_UnaryFunction1DT_double_t", "UnaryFunction1D< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_float_t = {"_p_UnaryFunction1DT_float_t", "UnaryFunction1D< float > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction1D< std::vector< ViewShape * > > *|UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_unsigned_int_t = {"_p_UnaryFunction1DT_unsigned_int_t", "UnaryFunction1D< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DT_void_t = {"_p_UnaryFunction1DT_void_t", "UnaryFunction1D< void > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTId_t = {"_p_UnaryFunction0DTId_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTViewShape_p_t = {"_p_UnaryFunction0DTViewShape_p_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTdouble_t = {"_p_UnaryFunction0DTdouble_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTfloat_t = {"_p_UnaryFunction0DTfloat_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction0D > *|UnaryFunction0D > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTunsigned_int_t = {"_p_UnaryFunction0DTunsigned_int_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DTvoid_t = {"_p_UnaryFunction0DTvoid_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTdouble_t = {"_p_UnaryFunction1DTdouble_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTfloat_t = {"_p_UnaryFunction1DTfloat_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction1D > *|UnaryFunction1D > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTunsigned_int_t = {"_p_UnaryFunction1DTunsigned_int_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DTvoid_t = {"_p_UnaryFunction1DTvoid_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate0D = {"_p_UnaryPredicate0D", "UnaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate1D = {"_p_UnaryPredicate1D", "UnaryPredicate1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3T_double_t = {"_p_VecMat__HVec3T_double_t", "Geometry::HVec3d *|Geometry::HVec3r *|VecMat::HVec3< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3T_float_t = {"_p_VecMat__HVec3T_float_t", "VecMat::HVec3< float > *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3T_int_t = {"_p_VecMat__HVec3T_int_t", "Geometry::HVec3i *|VecMat::HVec3< int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3T_unsigned_int_t = {"_p_VecMat__HVec3T_unsigned_int_t", "Geometry::HVec3u *|VecMat::HVec3< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_2_t = {"_p_VecMat__SquareMatrixT_double_2_t", "Geometry::Matrix22d *|Geometry::Matrix22r *|VecMat::SquareMatrix< double,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_3_t = {"_p_VecMat__SquareMatrixT_double_3_t", "VecMat::SquareMatrix< double,3 > *|Geometry::Matrix33d *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_4_t = {"_p_VecMat__SquareMatrixT_double_4_t", "VecMat::SquareMatrix< double,4 > *|Geometry::Matrix44d *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_2_t = {"_p_VecMat__SquareMatrixT_float_2_t", "Geometry::Matrix22f *|VecMat::SquareMatrix< float,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_3_t = {"_p_VecMat__SquareMatrixT_float_3_t", "VecMat::SquareMatrix< float,3 > *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_4_t = {"_p_VecMat__SquareMatrixT_float_4_t", "Geometry::Matrix44f *|VecMat::SquareMatrix< float,4 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_2_t = {"_p_VecMat__SquareMatrixT_int_2_t", "VecMat::SquareMatrix< int,2 > *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_3_t = {"_p_VecMat__SquareMatrixT_int_3_t", "VecMat::SquareMatrix< int,3 > *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_4_t = {"_p_VecMat__SquareMatrixT_int_4_t", "Geometry::Matrix44i *|VecMat::SquareMatrix< int,4 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t = {"_p_VecMat__SquareMatrixT_unsigned_int_2_t", "Geometry::Matrix22u *|VecMat::SquareMatrix< unsigned int,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t = {"_p_VecMat__SquareMatrixT_unsigned_int_3_t", "Geometry::Matrix33u *|VecMat::SquareMatrix< unsigned int,3 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t = {"_p_VecMat__SquareMatrixT_unsigned_int_4_t", "Geometry::Matrix44u *|VecMat::SquareMatrix< unsigned int,4 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2T_double_t = {"_p_VecMat__Vec2T_double_t", "Geometry::Vec2d *|Geometry::Vec2r *|VecMat::Vec2< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2T_float_t = {"_p_VecMat__Vec2T_float_t", "VecMat::Vec2< float > *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2T_int_t = {"_p_VecMat__Vec2T_int_t", "Geometry::Vec2i *|VecMat::Vec2< int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2T_unsigned_int_t = {"_p_VecMat__Vec2T_unsigned_int_t", "Geometry::Vec2u *|VecMat::Vec2< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3T_double_t = {"_p_VecMat__Vec3T_double_t", "Geometry::Vec3d *|Geometry::Vec3r *|VecMat::Vec3< double > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3T_float_t = {"_p_VecMat__Vec3T_float_t", "VecMat::Vec3< float > *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3T_int_t = {"_p_VecMat__Vec3T_int_t", "Geometry::Vec3i *|VecMat::Vec3< int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3T_unsigned_int_t = {"_p_VecMat__Vec3T_unsigned_int_t", "Geometry::Vec3u *|VecMat::Vec3< unsigned int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_double_2_t = {"_p_VecMat__VecT_double_2_t", "VecMat::Vec< double,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_double_3_t = {"_p_VecMat__VecT_double_3_t", "VecMat::Vec< double,3 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_float_2_t = {"_p_VecMat__VecT_float_2_t", "VecMat::Vec< float,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_float_3_t = {"_p_VecMat__VecT_float_3_t", "VecMat::Vec< float,3 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_int_2_t = {"_p_VecMat__VecT_int_2_t", "VecMat::Vec< int,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_int_3_t = {"_p_VecMat__VecT_int_3_t", "VecMat::Vec< int,3 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_2_t = {"_p_VecMat__VecT_unsigned_int_2_t", "VecMat::Vec< unsigned int,2 > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_3_t = {"_p_VecMat__VecT_unsigned_int_3_t", "VecMat::Vec< unsigned int,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tdouble_t = {"_p_VecMat__HVec3Tdouble_t", "VecMat::HVec3 *|Geometry::HVec3r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tfloat_t = {"_p_VecMat__HVec3Tfloat_t", "VecMat::HVec3 *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tint_t = {"_p_VecMat__HVec3Tint_t", "VecMat::HVec3 *|Geometry::HVec3i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3Tunsigned_int_t = {"_p_VecMat__HVec3Tunsigned_int_t", "VecMat::HVec3 *|Geometry::HVec3u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_2_t = {"_p_VecMat__SquareMatrixTdouble_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_3_t = {"_p_VecMat__SquareMatrixTdouble_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_4_t = {"_p_VecMat__SquareMatrixTdouble_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_2_t = {"_p_VecMat__SquareMatrixTfloat_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_3_t = {"_p_VecMat__SquareMatrixTfloat_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_4_t = {"_p_VecMat__SquareMatrixTfloat_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_2_t = {"_p_VecMat__SquareMatrixTint_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_3_t = {"_p_VecMat__SquareMatrixTint_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTint_4_t = {"_p_VecMat__SquareMatrixTint_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_2_t = {"_p_VecMat__SquareMatrixTunsigned_int_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_3_t = {"_p_VecMat__SquareMatrixTunsigned_int_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_4_t = {"_p_VecMat__SquareMatrixTunsigned_int_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tdouble_t = {"_p_VecMat__Vec2Tdouble_t", "VecMat::Vec2 *|Geometry::Vec2d *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tfloat_t = {"_p_VecMat__Vec2Tfloat_t", "VecMat::Vec2 *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tint_t = {"_p_VecMat__Vec2Tint_t", "VecMat::Vec2 *|Geometry::Vec2i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2Tunsigned_int_t = {"_p_VecMat__Vec2Tunsigned_int_t", "VecMat::Vec2 *|Geometry::Vec2u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tdouble_t = {"_p_VecMat__Vec3Tdouble_t", "VecMat::Vec3 *|Geometry::Vec3r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tfloat_t = {"_p_VecMat__Vec3Tfloat_t", "VecMat::Vec3 *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tint_t = {"_p_VecMat__Vec3Tint_t", "VecMat::Vec3 *|Geometry::Vec3i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3Tunsigned_int_t = {"_p_VecMat__Vec3Tunsigned_int_t", "VecMat::Vec3 *|Geometry::Vec3u *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTdouble_2_t = {"_p_VecMat__VecTdouble_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTdouble_3_t = {"_p_VecMat__VecTdouble_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTfloat_2_t = {"_p_VecMat__VecTfloat_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTfloat_3_t = {"_p_VecMat__VecTfloat_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTint_2_t = {"_p_VecMat__VecTint_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTint_3_t = {"_p_VecMat__VecTint_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTunsigned_int_2_t = {"_p_VecMat__VecTunsigned_int_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecTunsigned_int_3_t = {"_p_VecMat__VecTunsigned_int_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Vertex = {"_p_Vertex", "Vertex *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdge = {"_p_ViewEdge", "ViewEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdgeInternal__SVertexIterator = {"_p_ViewEdgeInternal__SVertexIterator", "ViewEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; @@ -109292,8 +110438,8 @@ static swig_type_info _swigt__p_ViewEdgeInternal__ViewEdgeIterator = {"_p_ViewEd static swig_type_info _swigt__p_ViewMap = {"_p_ViewMap", "ViewMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewShape = {"_p_ViewShape", "ViewShape *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertex = {"_p_ViewVertex", "ViewVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator", "ViewVertexInternal::orientedViewEdgeIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator *", 0, 0, (void*)0, 0}; @@ -109306,16 +110452,16 @@ static swig_type_info _swigt__p_const_reference = {"_p_const_reference", "const_ static swig_type_info _swigt__p_const_vertex_iterator = {"_p_const_vertex_iterator", "const_vertex_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_directedViewEdge = {"_p_directedViewEdge", "directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "real *|VecMat::Vec2< double >::value_type *|VecMat::Vec3< double >::value_type *|double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "double *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_iterator = {"_p_edge_iterator", "edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_pointers_container = {"_p_edge_pointers_container", "edge_pointers_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edges_container = {"_p_edges_container", "edges_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedge_iterator = {"_p_fedge_iterator", "fedge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedges_container = {"_p_fedges_container", "fedges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_float = {"_p_float", "VecMat::Vec2< float >::value_type *|VecMat::Vec3< float >::value_type *|float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_id_to_index_map = {"_p_id_to_index_map", "id_to_index_map *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_id_type = {"_p_id_type", "id_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "VecMat::Vec2< int >::value_type *|VecMat::Vec3< int >::value_type *|int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ltstr = {"_p_ltstr", "ltstr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsMap = {"_p_mapsMap", "mapsMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_occluder_container__const_iterator = {"_p_occluder_container__const_iterator", "occluder_container::const_iterator *", 0, 0, (void*)0, 0}; @@ -109323,34 +110469,34 @@ static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, static swig_type_info _swigt__p_point_iterator = {"_p_point_iterator", "point_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_point_type = {"_p_point_type", "point_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_setT_VecMat__Vec3T_double_t_t = {"_p_setT_VecMat__Vec3T_double_t_t", "set< VecMat::Vec3< double > > *|set< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_setTVecMat__Vec3Tdouble_t_t = {"_p_setTVecMat__Vec3Tdouble_t_t", "set > *|set *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t = {"_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t", "ViewMap::id_to_index_map *|std::map< int,int,std::less< int >,std::allocator< std::pair< int const,int > > > *|std::map< int,int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairT_ViewEdge_p_bool_t = {"_p_std__pairT_ViewEdge_p_bool_t", "std::pair< ViewEdge *,bool > *|ViewVertex::directedViewEdge *|::ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t", "std::vector< FEdge *,std::allocator< FEdge * > > *|std::vector< FEdge * > *|ViewMap::fedges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type", "std::vector< FEdge * >::allocator_type *|std::allocator< FEdge * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t = {"_p_std__vectorT_Material_std__allocatorT_Material_t_t", "std::vector< Material,std::allocator< Material > > *|std::vector< Material > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t", "std::vector< SVertex * > *|ViewMap::svertices_container *|std::vector< SVertex *,std::allocator< SVertex * > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type", "std::vector< SVertex * >::allocator_type *|std::allocator< SVertex * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t", "std::vector< StrokeShader *,std::allocator< StrokeShader * > > *|std::vector< StrokeShader * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type", "std::vector< StrokeShader * >::allocator_type *|std::allocator< StrokeShader * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t = {"_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t", "std::vector< TVertex * > *|std::vector< TVertex *,std::allocator< TVertex * > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t = {"_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t", "std::vector< VecMat::Vec2< double > > *|std::vector< VecMat::Vec2< double >,std::allocator< VecMat::Vec2< double > > > *|std::vector< Geometry::Vec2r > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t", "std::vector< ViewEdge *,std::allocator< ViewEdge * > > *|std::vector< ViewEdge * > *|ViewMap::viewedges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type", "std::vector< ViewEdge * >::allocator_type *|std::allocator< ViewEdge * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t", "std::vector< ViewShape *,std::allocator< ViewShape * > > *|std::vector< ViewShape * > *|occluder_container *|ViewMap::viewshapes_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type", "std::vector< ViewShape * >::allocator_type *|std::allocator< ViewShape * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t", "std::vector< ViewVertex *,std::allocator< ViewVertex * > > *|std::vector< ViewVertex * > *|ViewMap::viewvertices_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type", "std::vector< ViewVertex * >::allocator_type *|std::allocator< ViewVertex * > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type = {"_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t = {"_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t", "std::vector< std::pair< ViewEdge *,bool > > *|std::vector< ViewVertex::directedViewEdge > *|std::vector< std::pair< ViewEdge *,bool >,std::allocator< std::pair< ViewEdge *,bool > > > *|NonTVertex::edges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t = {"_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t", "std::vector< unsigned int,std::allocator< unsigned int > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t = {"_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t", "std::map *|ViewMap::id_to_index_map *|std::map,std::allocator > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__pairTViewEdge_p_bool_t = {"_p_std__pairTViewEdge_p_bool_t", "std::pair *|::ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t = {"_p_std__vectorTMaterial_std__allocatorTMaterial_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t", "std::vector *|ViewMap::svertices_container *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t = {"_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t = {"_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t = {"_p_std__vectorTint_std__allocatorTint_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type = {"_p_std__vectorTint_std__allocatorTint_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t = {"_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t = {"_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t", "std::vector > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svertices_container = {"_p_svertices_container", "svertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__PySwigIterator = {"_p_swig__PySwigIterator", "swig::PySwigIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "VecMat::Vec2< unsigned int >::value_type *|VecMat::Vec3< unsigned int >::value_type *|unsigned int *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "Nature::VertexNature *|Nature::EdgeNature *|unsigned short *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|Nature::EdgeNature *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_container = {"_p_vertex_container", "vertex_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_iterator = {"_p_vertex_iterator", "vertex_iterator *", 0, 0, (void*)0, 0}; @@ -109360,16 +110506,16 @@ static swig_type_info _swigt__p_viewedges_container = {"_p_viewedges_container", static swig_type_info _swigt__p_viewshapes_container = {"_p_viewshapes_container", "viewshapes_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_viewvertices_container = {"_p_viewvertices_container", "viewvertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type = {"_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type", "std::vector< FEdge * >::value_type|FEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type = {"_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type", "std::vector< SVertex * >::value_type|SVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type = {"_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type", "std::vector< StrokeShader * >::value_type|StrokeShader *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type = {"_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type", "std::vector< ViewEdge * >::value_type|ViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type = {"_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type", "std::vector< ViewShape * >::value_type|ViewShape *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type = {"_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type", "std::vector< ViewVertex * >::value_type|ViewVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type = {"_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type", "FEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type = {"_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type", "SVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type = {"_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type", "StrokeShader *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type = {"_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type", "ViewEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type = {"_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type", "ViewShape *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type = {"_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type", "ViewVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_AdjacencyIterator, - &_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, + &_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, &_swigt__p_BinaryPredicate0D, &_swigt__p_BinaryPredicate1D, &_swigt__p_CalligraphicShader, @@ -109520,56 +110666,56 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_StrokesContainer, &_swigt__p_StyleModule, &_swigt__p_TVertex, - &_swigt__p_UnaryFunction0DT_Id_t, - &_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, - &_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, - &_swigt__p_UnaryFunction0DT_ViewShape_p_t, - &_swigt__p_UnaryFunction0DT_double_t, - &_swigt__p_UnaryFunction0DT_float_t, - &_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, - &_swigt__p_UnaryFunction0DT_unsigned_int_t, - &_swigt__p_UnaryFunction0DT_void_t, - &_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, - &_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, - &_swigt__p_UnaryFunction1DT_double_t, - &_swigt__p_UnaryFunction1DT_float_t, - &_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, - &_swigt__p_UnaryFunction1DT_unsigned_int_t, - &_swigt__p_UnaryFunction1DT_void_t, + &_swigt__p_UnaryFunction0DTId_t, + &_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, + &_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, + &_swigt__p_UnaryFunction0DTViewShape_p_t, + &_swigt__p_UnaryFunction0DTdouble_t, + &_swigt__p_UnaryFunction0DTfloat_t, + &_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + &_swigt__p_UnaryFunction0DTunsigned_int_t, + &_swigt__p_UnaryFunction0DTvoid_t, + &_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, + &_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, + &_swigt__p_UnaryFunction1DTdouble_t, + &_swigt__p_UnaryFunction1DTfloat_t, + &_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + &_swigt__p_UnaryFunction1DTunsigned_int_t, + &_swigt__p_UnaryFunction1DTvoid_t, &_swigt__p_UnaryPredicate0D, &_swigt__p_UnaryPredicate1D, - &_swigt__p_VecMat__HVec3T_double_t, - &_swigt__p_VecMat__HVec3T_float_t, - &_swigt__p_VecMat__HVec3T_int_t, - &_swigt__p_VecMat__HVec3T_unsigned_int_t, - &_swigt__p_VecMat__SquareMatrixT_double_2_t, - &_swigt__p_VecMat__SquareMatrixT_double_3_t, - &_swigt__p_VecMat__SquareMatrixT_double_4_t, - &_swigt__p_VecMat__SquareMatrixT_float_2_t, - &_swigt__p_VecMat__SquareMatrixT_float_3_t, - &_swigt__p_VecMat__SquareMatrixT_float_4_t, - &_swigt__p_VecMat__SquareMatrixT_int_2_t, - &_swigt__p_VecMat__SquareMatrixT_int_3_t, - &_swigt__p_VecMat__SquareMatrixT_int_4_t, - &_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, - &_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, - &_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, - &_swigt__p_VecMat__Vec2T_double_t, - &_swigt__p_VecMat__Vec2T_float_t, - &_swigt__p_VecMat__Vec2T_int_t, - &_swigt__p_VecMat__Vec2T_unsigned_int_t, - &_swigt__p_VecMat__Vec3T_double_t, - &_swigt__p_VecMat__Vec3T_float_t, - &_swigt__p_VecMat__Vec3T_int_t, - &_swigt__p_VecMat__Vec3T_unsigned_int_t, - &_swigt__p_VecMat__VecT_double_2_t, - &_swigt__p_VecMat__VecT_double_3_t, - &_swigt__p_VecMat__VecT_float_2_t, - &_swigt__p_VecMat__VecT_float_3_t, - &_swigt__p_VecMat__VecT_int_2_t, - &_swigt__p_VecMat__VecT_int_3_t, - &_swigt__p_VecMat__VecT_unsigned_int_2_t, - &_swigt__p_VecMat__VecT_unsigned_int_3_t, + &_swigt__p_VecMat__HVec3Tdouble_t, + &_swigt__p_VecMat__HVec3Tfloat_t, + &_swigt__p_VecMat__HVec3Tint_t, + &_swigt__p_VecMat__HVec3Tunsigned_int_t, + &_swigt__p_VecMat__SquareMatrixTdouble_2_t, + &_swigt__p_VecMat__SquareMatrixTdouble_3_t, + &_swigt__p_VecMat__SquareMatrixTdouble_4_t, + &_swigt__p_VecMat__SquareMatrixTfloat_2_t, + &_swigt__p_VecMat__SquareMatrixTfloat_3_t, + &_swigt__p_VecMat__SquareMatrixTfloat_4_t, + &_swigt__p_VecMat__SquareMatrixTint_2_t, + &_swigt__p_VecMat__SquareMatrixTint_3_t, + &_swigt__p_VecMat__SquareMatrixTint_4_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, + &_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, + &_swigt__p_VecMat__Vec2Tdouble_t, + &_swigt__p_VecMat__Vec2Tfloat_t, + &_swigt__p_VecMat__Vec2Tint_t, + &_swigt__p_VecMat__Vec2Tunsigned_int_t, + &_swigt__p_VecMat__Vec3Tdouble_t, + &_swigt__p_VecMat__Vec3Tfloat_t, + &_swigt__p_VecMat__Vec3Tint_t, + &_swigt__p_VecMat__Vec3Tunsigned_int_t, + &_swigt__p_VecMat__VecTdouble_2_t, + &_swigt__p_VecMat__VecTdouble_3_t, + &_swigt__p_VecMat__VecTfloat_2_t, + &_swigt__p_VecMat__VecTfloat_3_t, + &_swigt__p_VecMat__VecTint_2_t, + &_swigt__p_VecMat__VecTint_3_t, + &_swigt__p_VecMat__VecTunsigned_int_2_t, + &_swigt__p_VecMat__VecTunsigned_int_3_t, &_swigt__p_Vertex, &_swigt__p_ViewEdge, &_swigt__p_ViewEdgeInternal__SVertexIterator, @@ -109577,8 +110723,8 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_ViewMap, &_swigt__p_ViewShape, &_swigt__p_ViewVertex, - &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, - &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -109608,30 +110754,30 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_point_iterator, &_swigt__p_point_type, &_swigt__p_reference, - &_swigt__p_setT_VecMat__Vec3T_double_t_t, + &_swigt__p_setTVecMat__Vec3Tdouble_t_t, &_swigt__p_size_type, &_swigt__p_std__invalid_argument, - &_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, - &_swigt__p_std__pairT_ViewEdge_p_bool_t, - &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, - &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, - &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, - &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, - &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, - &_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, - &_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, - &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, - &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, - &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, - &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, - &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, - &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, - &_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, - &_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, + &_swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, + &_swigt__p_std__pairTViewEdge_p_bool_t, + &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, + &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, + &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, + &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, + &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, + &_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, + &_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, + &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, + &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, + &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, + &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, + &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorTint_std__allocatorTint_t_t, + &_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, + &_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, + &_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, &_swigt__p_svertices_container, &_swigt__p_swig__PySwigIterator, &_swigt__p_unsigned_int, @@ -109645,16 +110791,16 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_viewshapes_container, &_swigt__p_viewvertices_container, &_swigt__p_void, - &_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, - &_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, - &_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, - &_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, - &_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, - &_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, + &_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, + &_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, + &_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, + &_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, + &_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, + &_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, }; static swig_cast_info _swigc__p_AdjacencyIterator[] = { {&_swigt__p_AdjacencyIterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BBoxT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate0D[] = { {&_swigt__p_BinaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate1D[] = { {&_swigt__p_Predicates1D__Length2DBP1D, _p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__FalseBP1D, _p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_BinaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__ViewMapGradientNormBP1D, _p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueBP1D, _p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__SameShapeIdBP1D, _p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CalligraphicShader[] = { {&_swigt__p_CalligraphicShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -109668,7 +110814,7 @@ static swig_cast_info _swigc__p_Curve[] = { {&_swigt__p_Curve, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_CurveInternal__CurvePointIterator[] = { {&_swigt__p_CurveInternal__CurvePointIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CurvePoint[] = { {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_CurvePoint, 0, 0}, {&_swigt__p_CurvePoint, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Curve__vertex_container__iterator[] = { {&_swigt__p_Curve__vertex_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeInternal__SVertexIterator[] = { {&_swigt__p_FEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSharp[] = { {&_swigt__p_FEdgeSharp, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSmooth[] = { {&_swigt__p_FEdgeSmooth, 0, 0, 0},{0, 0, 0, 0}}; @@ -109727,10 +110873,10 @@ static swig_cast_info _swigc__p_GrayImage[] = { {&_swigt__p_GrayImage, 0, 0, 0} static swig_cast_info _swigc__p_I1DContainer[] = { {&_swigt__p_I1DContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Id[] = { {&_swigt__p_Id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntegrationType[] = { {&_swigt__p_IntegrationType, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIterator[] = { {&_swigt__p_Interface0DIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIteratorNested[] = { {&_swigt__p_Interface0DIteratorNested, 0, 0, 0}, {&_swigt__p_FEdgeInternal__SVertexIterator, _p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_ViewEdgeInternal__SVertexIterator, _p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_CurveInternal__CurvePointIterator, _p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_StrokeInternal__StrokeVertexIterator, _p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Material[] = { {&_swigt__p_Material, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MediumType[] = { {&_swigt__p_MediumType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Module[] = { {&_swigt__p_Module, 0, 0, 0},{0, 0, 0, 0}}; @@ -109760,7 +110906,7 @@ static swig_cast_info _swigc__p_Predicates1D__ViewMapGradientNormBP1D[] = { {&_ static swig_cast_info _swigc__p_RGBImage[] = { {&_swigt__p_RGBImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ReturnedValueType[] = { {&_swigt__p_ReturnedValueType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SShape[] = { {&_swigt__p_SShape, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__p_SVertex, 0, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SVertex__fedges_container__iterator[] = { {&_swigt__p_SVertex__fedges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Smoother[] = { {&_swigt__p_Smoother, 0, 0, 0}, {&_swigt__p_Omitter, _p_OmitterTo_p_Smoother, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SmoothingShader[] = { {&_swigt__p_SmoothingShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -109771,7 +110917,7 @@ static swig_cast_info _swigc__p_StrokeAttribute[] = { {&_swigt__p_StrokeAttribu static swig_cast_info _swigc__p_StrokeInternal__StrokeVertexIterator[] = { {&_swigt__p_StrokeInternal__StrokeVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeLayer[] = { {&_swigt__p_StrokeLayer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeRenderer[] = { {&_swigt__p_StrokeRenderer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BSplineShader[] = { {&_swigt__p_StrokeShaders__BSplineShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BackboneStretcherShader[] = { {&_swigt__p_StrokeShaders__BackboneStretcherShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BezierCurveShader[] = { {&_swigt__p_StrokeShaders__BezierCurveShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -109805,65 +110951,65 @@ static swig_cast_info _swigc__p_Stroke__viewedge_container__iterator[] = { {&_s static swig_cast_info _swigc__p_StrokesContainer[] = { {&_swigt__p_StrokesContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StyleModule[] = { {&_swigt__p_StyleModule, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TVertex[] = { {&_swigt__p_TVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_Id_t[] = { {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_Id_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_ViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_ViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_double_t[] = { {&_swigt__p_UnaryFunction0DT_double_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_float_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_float_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_unsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DT_void_t[] = { {&_swigt__p_UnaryFunction0DT_void_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_double_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_double_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_float_t[] = { {&_swigt__p_UnaryFunction1DT_float_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_unsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DT_void_t[] = { {&_swigt__p_UnaryFunction1DT_void_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTId_t[] = { {&_swigt__p_UnaryFunction0DTId_t, 0, 0, 0}, {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DTViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTdouble_t[] = { {&_swigt__p_UnaryFunction0DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTfloat_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_UnaryFunction0DTfloat_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTunsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DTvoid_t[] = { {&_swigt__p_UnaryFunction0DTvoid_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTdouble_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_UnaryFunction1DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTfloat_t[] = { {&_swigt__p_UnaryFunction1DTfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTunsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DTvoid_t[] = { {&_swigt__p_UnaryFunction1DTvoid_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate0D[] = { {&_swigt__p_Predicates0D__TrueUP0D, _p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_Predicates0D__FalseUP0D, _p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_UnaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate1D[] = { {&_swigt__p_Predicates1D__FalseUP1D, _p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ShapeUP1D, _p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__DensityLowerThanUP1D, _p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_UnaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__EqualToTimeStampUP1D, _p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, _p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueUP1D, _p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, _p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ContourUP1D, _p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ExternalContourUP1D, _p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3T_double_t[] = { {&_swigt__p_VecMat__HVec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3T_float_t[] = { {&_swigt__p_VecMat__HVec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3T_int_t[] = { {&_swigt__p_VecMat__HVec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__HVec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2T_double_t[] = { {&_swigt__p_VecMat__Vec2T_double_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2T_float_t[] = { {&_swigt__p_VecMat__Vec2T_float_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2T_int_t[] = { {&_swigt__p_VecMat__Vec2T_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec2T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3T_double_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3T_float_t[] = { {&_swigt__p_VecMat__Vec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3T_int_t[] = { {&_swigt__p_VecMat__Vec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_double_2_t[] = { {&_swigt__p_VecMat__VecT_double_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_double_t, _p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_double_3_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, _p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t, 0, 0}, {&_swigt__p_VecMat__VecT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_float_2_t[] = { {&_swigt__p_VecMat__VecT_float_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_float_t, _p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_float_3_t[] = { {&_swigt__p_VecMat__VecT_float_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_float_t, _p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_int_2_t[] = { {&_swigt__p_VecMat__VecT_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_int_t, _p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_int_3_t[] = { {&_swigt__p_VecMat__VecT_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_int_t, _p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_unsigned_int_t, _p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_unsigned_int_t, _p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tdouble_t[] = { {&_swigt__p_VecMat__HVec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tfloat_t[] = { {&_swigt__p_VecMat__HVec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tint_t[] = { {&_swigt__p_VecMat__HVec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__HVec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tdouble_t[] = { {&_swigt__p_VecMat__Vec2Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tfloat_t[] = { {&_swigt__p_VecMat__Vec2Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tint_t[] = { {&_swigt__p_VecMat__Vec2Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec2Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tdouble_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tfloat_t[] = { {&_swigt__p_VecMat__Vec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tint_t[] = { {&_swigt__p_VecMat__Vec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTdouble_2_t[] = { {&_swigt__p_VecMat__VecTdouble_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tdouble_t, _p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTdouble_3_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, _p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t, 0, 0}, {&_swigt__p_VecMat__VecTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTfloat_2_t[] = { {&_swigt__p_VecMat__VecTfloat_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tfloat_t, _p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTfloat_3_t[] = { {&_swigt__p_VecMat__VecTfloat_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tfloat_t, _p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTint_2_t[] = { {&_swigt__p_VecMat__VecTint_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tint_t, _p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTint_3_t[] = { {&_swigt__p_VecMat__VecTint_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tint_t, _p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_2_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tunsigned_int_t, _p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_3_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tunsigned_int_t, _p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Vertex[] = { {&_swigt__p_Vertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__p_ViewEdge, 0, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__SVertexIterator[] = { {&_swigt__p_ViewEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__ViewEdgeIterator[] = { {&_swigt__p_ViewEdgeInternal__ViewEdgeIterator, 0, 0, 0}, {&_swigt__p_ChainingIterator, _p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainSilhouetteIterator, _p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainPredicateIterator, _p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewMap[] = { {&_swigt__p_ViewMap, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; @@ -109893,30 +111039,30 @@ static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, static swig_cast_info _swigc__p_point_iterator[] = { {&_swigt__p_point_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_point_type[] = { {&_swigt__p_point_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_setT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_setT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_setTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_setTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t[] = { {&_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairT_ViewEdge_p_bool_t[] = { {&_swigt__p_std__pairT_ViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t[] = { {&_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t[] = { {&_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t[] = { {&_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t[] = { {&_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t[] = { {&_swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__pairTViewEdge_p_bool_t[] = { {&_swigt__p_std__pairTViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t[] = { {&_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t[] = { {&_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t[] = { {&_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t[] = { {&_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svertices_container[] = { {&_swigt__p_svertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__PySwigIterator[] = { {&_swigt__p_swig__PySwigIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; @@ -109930,16 +111076,16 @@ static swig_cast_info _swigc__p_viewedges_container[] = { {&_swigt__p_viewedges static swig_cast_info _swigc__p_viewshapes_container[] = { {&_swigt__p_viewshapes_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_viewvertices_container[] = { {&_swigt__p_viewvertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_AdjacencyIterator, - _swigc__p_BBoxT_VecMat__Vec3T_double_t_t, + _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t, _swigc__p_BinaryPredicate0D, _swigc__p_BinaryPredicate1D, _swigc__p_CalligraphicShader, @@ -110090,56 +111236,56 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_StrokesContainer, _swigc__p_StyleModule, _swigc__p_TVertex, - _swigc__p_UnaryFunction0DT_Id_t, - _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, - _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, - _swigc__p_UnaryFunction0DT_ViewShape_p_t, - _swigc__p_UnaryFunction0DT_double_t, - _swigc__p_UnaryFunction0DT_float_t, - _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, - _swigc__p_UnaryFunction0DT_unsigned_int_t, - _swigc__p_UnaryFunction0DT_void_t, - _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, - _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, - _swigc__p_UnaryFunction1DT_double_t, - _swigc__p_UnaryFunction1DT_float_t, - _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, - _swigc__p_UnaryFunction1DT_unsigned_int_t, - _swigc__p_UnaryFunction1DT_void_t, + _swigc__p_UnaryFunction0DTId_t, + _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, + _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, + _swigc__p_UnaryFunction0DTViewShape_p_t, + _swigc__p_UnaryFunction0DTdouble_t, + _swigc__p_UnaryFunction0DTfloat_t, + _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + _swigc__p_UnaryFunction0DTunsigned_int_t, + _swigc__p_UnaryFunction0DTvoid_t, + _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, + _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, + _swigc__p_UnaryFunction1DTdouble_t, + _swigc__p_UnaryFunction1DTfloat_t, + _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, + _swigc__p_UnaryFunction1DTunsigned_int_t, + _swigc__p_UnaryFunction1DTvoid_t, _swigc__p_UnaryPredicate0D, _swigc__p_UnaryPredicate1D, - _swigc__p_VecMat__HVec3T_double_t, - _swigc__p_VecMat__HVec3T_float_t, - _swigc__p_VecMat__HVec3T_int_t, - _swigc__p_VecMat__HVec3T_unsigned_int_t, - _swigc__p_VecMat__SquareMatrixT_double_2_t, - _swigc__p_VecMat__SquareMatrixT_double_3_t, - _swigc__p_VecMat__SquareMatrixT_double_4_t, - _swigc__p_VecMat__SquareMatrixT_float_2_t, - _swigc__p_VecMat__SquareMatrixT_float_3_t, - _swigc__p_VecMat__SquareMatrixT_float_4_t, - _swigc__p_VecMat__SquareMatrixT_int_2_t, - _swigc__p_VecMat__SquareMatrixT_int_3_t, - _swigc__p_VecMat__SquareMatrixT_int_4_t, - _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t, - _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t, - _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t, - _swigc__p_VecMat__Vec2T_double_t, - _swigc__p_VecMat__Vec2T_float_t, - _swigc__p_VecMat__Vec2T_int_t, - _swigc__p_VecMat__Vec2T_unsigned_int_t, - _swigc__p_VecMat__Vec3T_double_t, - _swigc__p_VecMat__Vec3T_float_t, - _swigc__p_VecMat__Vec3T_int_t, - _swigc__p_VecMat__Vec3T_unsigned_int_t, - _swigc__p_VecMat__VecT_double_2_t, - _swigc__p_VecMat__VecT_double_3_t, - _swigc__p_VecMat__VecT_float_2_t, - _swigc__p_VecMat__VecT_float_3_t, - _swigc__p_VecMat__VecT_int_2_t, - _swigc__p_VecMat__VecT_int_3_t, - _swigc__p_VecMat__VecT_unsigned_int_2_t, - _swigc__p_VecMat__VecT_unsigned_int_3_t, + _swigc__p_VecMat__HVec3Tdouble_t, + _swigc__p_VecMat__HVec3Tfloat_t, + _swigc__p_VecMat__HVec3Tint_t, + _swigc__p_VecMat__HVec3Tunsigned_int_t, + _swigc__p_VecMat__SquareMatrixTdouble_2_t, + _swigc__p_VecMat__SquareMatrixTdouble_3_t, + _swigc__p_VecMat__SquareMatrixTdouble_4_t, + _swigc__p_VecMat__SquareMatrixTfloat_2_t, + _swigc__p_VecMat__SquareMatrixTfloat_3_t, + _swigc__p_VecMat__SquareMatrixTfloat_4_t, + _swigc__p_VecMat__SquareMatrixTint_2_t, + _swigc__p_VecMat__SquareMatrixTint_3_t, + _swigc__p_VecMat__SquareMatrixTint_4_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t, + _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t, + _swigc__p_VecMat__Vec2Tdouble_t, + _swigc__p_VecMat__Vec2Tfloat_t, + _swigc__p_VecMat__Vec2Tint_t, + _swigc__p_VecMat__Vec2Tunsigned_int_t, + _swigc__p_VecMat__Vec3Tdouble_t, + _swigc__p_VecMat__Vec3Tfloat_t, + _swigc__p_VecMat__Vec3Tint_t, + _swigc__p_VecMat__Vec3Tunsigned_int_t, + _swigc__p_VecMat__VecTdouble_2_t, + _swigc__p_VecMat__VecTdouble_3_t, + _swigc__p_VecMat__VecTfloat_2_t, + _swigc__p_VecMat__VecTfloat_3_t, + _swigc__p_VecMat__VecTint_2_t, + _swigc__p_VecMat__VecTint_3_t, + _swigc__p_VecMat__VecTunsigned_int_2_t, + _swigc__p_VecMat__VecTunsigned_int_3_t, _swigc__p_Vertex, _swigc__p_ViewEdge, _swigc__p_ViewEdgeInternal__SVertexIterator, @@ -110147,8 +111293,8 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_ViewMap, _swigc__p_ViewShape, _swigc__p_ViewVertex, - _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, - _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -110178,30 +111324,30 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_point_iterator, _swigc__p_point_type, _swigc__p_reference, - _swigc__p_setT_VecMat__Vec3T_double_t_t, + _swigc__p_setTVecMat__Vec3Tdouble_t_t, _swigc__p_size_type, _swigc__p_std__invalid_argument, - _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, - _swigc__p_std__pairT_ViewEdge_p_bool_t, - _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, - _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, - _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t, - _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, - _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, - _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, - _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, - _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, - _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, - _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, - _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, - _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, - _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, - _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, - _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, - _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, - _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, - _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, - _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, + _swigc__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, + _swigc__p_std__pairTViewEdge_p_bool_t, + _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, + _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, + _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, + _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, + _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, + _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, + _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, + _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, + _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, + _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, + _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, + _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, + _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, + _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, + _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, + _swigc__p_std__vectorTint_std__allocatorTint_t_t, + _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, + _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, + _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, _swigc__p_svertices_container, _swigc__p_swig__PySwigIterator, _swigc__p_unsigned_int, @@ -110215,12 +111361,12 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_viewshapes_container, _swigc__p_viewvertices_container, _swigc__p_void, - _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, - _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, - _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, - _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, - _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, - _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, + _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, + _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, + _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, + _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, + _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, + _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, }; @@ -110289,7 +111435,7 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; - int found, init; + int found; clientdata = clientdata; @@ -110299,9 +111445,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; - init = 1; - } else { - init = 0; } /* Try and load any already created modules */ @@ -110330,12 +111473,6 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); @@ -110752,19 +111889,19 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "_Noise_B_",SWIG_From_int(static_cast< int >(0x100))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); - SWIG_addvarlink(SWIG_globals(),(char*)"POINT",Swig_var_POINT_get, Swig_var_POINT_set); - SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",Swig_var_S_VERTEX_get, Swig_var_S_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",Swig_var_VIEW_VERTEX_get, Swig_var_VIEW_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",Swig_var_NON_T_VERTEX_get, Swig_var_NON_T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",Swig_var_T_VERTEX_get, Swig_var_T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",Swig_var_CUSP_get, Swig_var_CUSP_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",Swig_var_NO_FEATURE_get, Swig_var_NO_FEATURE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",Swig_var_SILHOUETTE_get, Swig_var_SILHOUETTE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",Swig_var_BORDER_get, Swig_var_BORDER_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",Swig_var_CREASE_get, Swig_var_CREASE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",Swig_var_RIDGE_get, Swig_var_RIDGE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",Swig_var_VALLEY_get, Swig_var_VALLEY_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",Swig_var_SUGGESTIVE_CONTOUR_get, Swig_var_SUGGESTIVE_CONTOUR_set); + SWIG_addvarlink(SWIG_globals(),(char*)"POINT",POINT_get, POINT_set); + SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",S_VERTEX_get, S_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",VIEW_VERTEX_get, VIEW_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",NON_T_VERTEX_get, NON_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",T_VERTEX_get, T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",CUSP_get, CUSP_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",NO_FEATURE_get, NO_FEATURE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",SILHOUETTE_get, SILHOUETTE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",BORDER_get, BORDER_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",CREASE_get, CREASE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",RIDGE_get, RIDGE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",VALLEY_get, VALLEY_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",SUGGESTIVE_CONTOUR_get, SUGGESTIVE_CONTOUR_set); SWIG_Python_SetConstant(d, "MEAN",SWIG_From_int(static_cast< int >(MEAN))); SWIG_Python_SetConstant(d, "MIN",SWIG_From_int(static_cast< int >(MIN))); SWIG_Python_SetConstant(d, "MAX",SWIG_From_int(static_cast< int >(MAX))); diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.h b/source/blender/freestyle/intern/swig/ModuleWrapper.h index f24a77d53b2..06ca8c90f37 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.h +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 1.3.31 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -73,7 +73,7 @@ private: }; -class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D< void >, public Swig::Director { +class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DVoid(PyObject *self); @@ -119,7 +119,7 @@ private: }; -class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D< unsigned int >, public Swig::Director { +class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DUnsigned(PyObject *self); @@ -165,7 +165,7 @@ private: }; -class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D< float >, public Swig::Director { +class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DFloat(PyObject *self); @@ -211,7 +211,7 @@ private: }; -class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D< double >, public Swig::Director { +class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DDouble(PyObject *self); @@ -257,13 +257,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D< Geometry::Vec2f >, public Swig::Director { +class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DVec2f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2< float > operator ()(Interface0DIterator &iter); + virtual VecMat::Vec2 operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -303,13 +303,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D< Geometry::Vec3f >, public Swig::Director { +class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DVec3f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3< float > operator ()(Interface0DIterator &iter); + virtual VecMat::Vec3 operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -349,7 +349,7 @@ private: }; -class SwigDirector_UnaryFunction0DId : public UnaryFunction0D< Id >, public Swig::Director { +class SwigDirector_UnaryFunction0DId : public UnaryFunction0D, public Swig::Director { public: SwigDirector_UnaryFunction0DId(PyObject *self); @@ -395,7 +395,7 @@ private: }; -class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D< void >, public Swig::Director { +class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DVoid(PyObject *self); @@ -442,7 +442,7 @@ private: }; -class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D< unsigned int >, public Swig::Director { +class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DUnsigned(PyObject *self); @@ -489,7 +489,7 @@ private: }; -class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D< float >, public Swig::Director { +class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DFloat(PyObject *self); @@ -536,7 +536,7 @@ private: }; -class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D< double >, public Swig::Director { +class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DDouble(PyObject *self); @@ -583,14 +583,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D< Geometry::Vec2f >, public Swig::Director { +class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DVec2f(PyObject *self); SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2< float > operator ()(Interface1D &inter); + virtual VecMat::Vec2 operator ()(Interface1D &inter); /* Internal Director utilities */ @@ -630,14 +630,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D< Geometry::Vec3f >, public Swig::Director { +class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D, public Swig::Director { public: SwigDirector_UnaryFunction1DVec3f(PyObject *self); SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3< float > operator ()(Interface1D &inter); + virtual VecMat::Vec3 operator ()(Interface1D &inter); /* Internal Director utilities */ diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index d9caee85e18..54a982b8bd8 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -132,11 +132,11 @@ void FEdgeXDetector::preProcessFace(WXFace *iFace){ Vec3r V(_Viewpoint - firstPoint); N.normalize(); V.normalize(); - iFace->SetDotP(N * V); + iFace->setDotP(N * V); // compute the distance between the face center and the viewpoint: Vec3r dist_vec(iFace->center() - _Viewpoint); - iFace->SetZ(dist_vec.norm()); + iFace->setZ(dist_vec.norm()); } void FEdgeXDetector::computeCurvatures(WXVertex *vertex){ @@ -257,7 +257,7 @@ void FEdgeXDetector::ProcessSilhouetteFace(WXFace *iFace) } } // Set the closest point id: - faceLayer->SetClosestPointIndex(closestPointId); + faceLayer->setClosestPointIndex(closestPointId); // Add this layer to the face: iFace->AddSmoothLayer(faceLayer); } @@ -281,9 +281,9 @@ void FEdgeXDetector::ProcessSilhouetteEdge(WXEdge *iEdge) return; iEdge->AddNature(Nature::SILHOUETTE); if(fB->front()) - iEdge->SetOrder(1); + iEdge->setOrder(1); else - iEdge->SetOrder(-1); + iEdge->setOrder(-1); } } diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h index a6235dd53b5..5e6788c6ff8 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h @@ -106,7 +106,7 @@ public: virtual void buildSmoothEdges(WXShape* iShape); /*! Sets the current viewpoint */ - inline void SetViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} + inline void setViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} inline void enableRidgesAndValleysFlag(bool b) {_computeRidgesAndValleys = b;} inline void enableSuggestiveContours(bool b) {_computeSuggestiveContours = b;} /*! Sets the radius of the geodesic sphere around each vertex (for the curvature computation) @@ -120,7 +120,7 @@ public: } } - inline void SetProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} + inline void setProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} protected: diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index 15947fe3ba4..c88a3da8967 100755 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -240,9 +240,9 @@ public: /*! modifiers */ /*! Sets the 3D coordinates of the SVertex. */ - inline void SetPoint3D(const Vec3r &iPoint3D) {_Point3D = iPoint3D;} + inline void setPoint3D(const Vec3r &iPoint3D) {_Point3D = iPoint3D;} /*! Sets the 3D projected coordinates of the SVertex. */ - inline void SetPoint2D(const Vec3r &iPoint2D) {_Point2D = iPoint2D;} + inline void setPoint2D(const Vec3r &iPoint2D) {_Point2D = iPoint2D;} /*! Adds a normal to the Svertex's set of normals. If the same * normal is already in the set, nothing changes. */ @@ -266,10 +266,10 @@ public: const Vec2r directionFredo () {return _directionFredo;} /*! Sets the Id */ - inline void SetId(const Id& id) {_Id = id;} - inline void SetFEdges(const vector& iFEdges) {_FEdges = iFEdges;} - inline void SetShape(SShape *iShape) {_Shape = iShape;} - inline void SetViewVertex(ViewVertex *iViewVertex) {_pViewVertex = iViewVertex;} + inline void setId(const Id& id) {_Id = id;} + inline void setFEdges(const vector& iFEdges) {_FEdges = iFEdges;} + inline void setShape(SShape *iShape) {_Shape = iShape;} + inline void setViewVertex(ViewVertex *iViewVertex) {_pViewVertex = iViewVertex;} /*! Add an FEdge to the list of edges emanating from this SVertex. */ inline void AddFEdge(FEdge* iFEdge) {_FEdges.push_back(iFEdge);} /* replaces edge 1 by edge 2 in the list of edges */ @@ -501,30 +501,30 @@ public: /* modifiers */ /*! Sets the first SVertex. */ - inline void SetVertexA(SVertex *vA) {_VertexA = vA;} + inline void setVertexA(SVertex *vA) {_VertexA = vA;} /*! Sets the second SVertex. */ - inline void SetVertexB(SVertex *vB) {_VertexB = vB;} + inline void setVertexB(SVertex *vB) {_VertexB = vB;} /*! Sets the FEdge Id . */ - inline void SetId(const Id& id) {_Id = id;} + inline void setId(const Id& id) {_Id = id;} /*! Sets the pointer to the next FEdge. */ - inline void SetNextEdge(FEdge* iEdge) {_NextEdge = iEdge;} + inline void setNextEdge(FEdge* iEdge) {_NextEdge = iEdge;} /*! Sets the pointer to the previous FEdge. */ - inline void SetPreviousEdge(FEdge *iEdge) {_PreviousEdge = iEdge;} + inline void setPreviousEdge(FEdge *iEdge) {_PreviousEdge = iEdge;} /*! Sets the nature of this FEdge. */ - inline void SetNature(Nature::EdgeNature iNature) {_Nature = iNature;} + inline void setNature(Nature::EdgeNature iNature) {_Nature = iNature;} //inline void AddOccluder(Polygon3r& iPolygon) {_Occluders.push_back(iPolygon);} /*! Sets the ViewEdge to which this FEdge belongs to. */ - inline void SetViewEdge(ViewEdge *iViewEdge) {_ViewEdge = iViewEdge;} - // inline void SetHasVisibilityPoint(bool iBool) {_hasVisibilityPoint = iBool;} - // inline void SetVisibilityPointA(const Vec3r& iPoint) {_VisibilityPointA = iPoint;} - // inline void SetVisibilityPointB(const Vec3r& iPoint) {_VisibilityPointB = iPoint;} - inline void SetaFace(Polygon3r& iFace) {_aFace = iFace;} - inline void SetOccludeeIntersection(const Vec3r& iPoint) {_occludeeIntersection = iPoint;} - inline void SetOccludeeEmpty(bool iempty) {_occludeeEmpty = iempty;} + inline void setViewEdge(ViewEdge *iViewEdge) {_ViewEdge = iViewEdge;} + // inline void setHasVisibilityPoint(bool iBool) {_hasVisibilityPoint = iBool;} + // inline void setVisibilityPointA(const Vec3r& iPoint) {_VisibilityPointA = iPoint;} + // inline void setVisibilityPointB(const Vec3r& iPoint) {_VisibilityPointB = iPoint;} + inline void setaFace(Polygon3r& iFace) {_aFace = iFace;} + inline void setOccludeeIntersection(const Vec3r& iPoint) {_occludeeIntersection = iPoint;} + inline void setOccludeeEmpty(bool iempty) {_occludeeEmpty = iempty;} /*! Sets the flag telling whether this FEdge is smooth or sharp. * true for Smooth, false for Sharp. */ - inline void SetSmooth(bool iFlag) {_isSmooth = iFlag;} + inline void setSmooth(bool iFlag) {_isSmooth = iFlag;} /* checks whether two FEdge have a common vertex. * Returns a pointer on the common vertex if it exists, @@ -840,13 +840,13 @@ public: const Material& bMaterial() const ; /*! Sets the normal to the face lying on the right of the FEdge. */ - inline void SetNormalA(const Vec3r& iNormal) {_aNormal = iNormal;} + inline void setNormalA(const Vec3r& iNormal) {_aNormal = iNormal;} /*! Sets the normal to the face lying on the left of the FEdge. */ - inline void SetNormalB(const Vec3r& iNormal) {_bNormal = iNormal;} + inline void setNormalB(const Vec3r& iNormal) {_bNormal = iNormal;} /*! Sets the index of the material lying on the right of the FEdge.*/ - inline void SetaMaterialIndex(unsigned i) {_aMaterialIndex = i;} + inline void setaMaterialIndex(unsigned i) {_aMaterialIndex = i;} /*! Sets the index of the material lying on the left of the FEdge.*/ - inline void SetbMaterialIndex(unsigned i) {_bMaterialIndex = i;} + inline void setbMaterialIndex(unsigned i) {_bMaterialIndex = i;} }; @@ -901,11 +901,11 @@ public: /*! Returns the material of the face it is running accross. */ const Material& material() const ; - inline void SetFace(void * iFace) {_Face = iFace;} + inline void setFace(void * iFace) {_Face = iFace;} /*! Sets the normal to the Face it is running accross. */ - inline void SetNormal(const Vec3r& iNormal) {_Normal = iNormal;} + inline void setNormal(const Vec3r& iNormal) {_Normal = iNormal;} /*! Sets the index of the material of the face it is running accross. */ - inline void SetMaterialIndex(unsigned i) {_MaterialIndex = i;} + inline void setMaterialIndex(unsigned i) {_MaterialIndex = i;} }; /**********************************/ /* */ @@ -969,7 +969,7 @@ public: sv++) { SVertex *newv = new SVertex(*(*sv)); - newv->SetShape(this); + newv->setShape(this); _verticesList.push_back(newv); } @@ -1015,7 +1015,7 @@ public: FEdge *current = *fed; newfedgelist.push_back((FEdge*)current->userdata); } - (*sv)->SetFEdges(newfedgelist); + (*sv)->setFEdges(newfedgelist); } //------------------------------------- @@ -1025,10 +1025,10 @@ public: e!=eend; e++) { - (*e)->SetVertexA((SVertex*)((*e)->vertexA()->userdata)); - (*e)->SetVertexB((SVertex*)((*e)->vertexB()->userdata)); - (*e)->SetNextEdge((FEdge*)((*e)->nextEdge()->userdata)); - (*e)->SetPreviousEdge((FEdge*)((*e)->previousEdge()->userdata)); + (*e)->setVertexA((SVertex*)((*e)->vertexA()->userdata)); + (*e)->setVertexB((SVertex*)((*e)->vertexB()->userdata)); + (*e)->setNextEdge((FEdge*)((*e)->nextEdge()->userdata)); + (*e)->setPreviousEdge((FEdge*)((*e)->previousEdge()->userdata)); } @@ -1104,7 +1104,7 @@ public: /*! Adds a SVertex to the list of SVertex of this Shape. * The SShape attribute of the SVertex is also set to 'this'. */ - inline void AddNewVertex(SVertex* iv) {iv->SetShape(this);_verticesList.push_back(iv);} + inline void AddNewVertex(SVertex* iv) {iv->setShape(this);_verticesList.push_back(iv);} inline void AddChain(FEdge *iEdge){ _chains.push_back(iEdge); } @@ -1112,7 +1112,7 @@ public: inline SVertex * CreateSVertex(const Vec3r& P3D, const Vec3r& P2D, const Id& id) { SVertex *Ia = new SVertex(P3D, id); - Ia->SetPoint2D(P2D); + Ia->setPoint2D(P2D); AddNewVertex(Ia); return Ia; } @@ -1172,7 +1172,7 @@ public: // create new SVertex: // (we keep B's id) SVertex* newVertex = new SVertex(newpoint3d, ioB->getId()); - newVertex->SetPoint2D(newpoint2d); + newVertex->setPoint2D(newpoint2d); // Add this vertex to the intersections list: intersections.push_back(newVertex); @@ -1192,23 +1192,23 @@ public: // AB becomes (address speaking) AA'. B is updated. //-------------------------------------------------- // The edge AB becomes edge AA'. - (fe)->SetVertexB((*sv)); + (fe)->setVertexB((*sv)); // a new edge, A'B is created. FEdge *newEdge; if(fe->isSmooth()){ newEdge = new FEdgeSmooth((*sv), svB); FEdgeSmooth * se = dynamic_cast(newEdge); FEdgeSmooth * fes = dynamic_cast(fe); - se->SetMaterialIndex(fes->materialIndex()); + se->setMaterialIndex(fes->materialIndex()); }else{ newEdge = new FEdgeSharp((*sv), svB); FEdgeSharp * se = dynamic_cast(newEdge); FEdgeSharp * fes = dynamic_cast(fe); - se->SetaMaterialIndex(fes->aMaterialIndex()); - se->SetbMaterialIndex(fes->bMaterialIndex()); + se->setaMaterialIndex(fes->aMaterialIndex()); + se->setbMaterialIndex(fes->bMaterialIndex()); } - newEdge->SetNature((fe)->getNature()); + newEdge->setNature((fe)->getNature()); // to build a new chain: @@ -1219,15 +1219,15 @@ public: ioNewEdges.push_back(newEdge); // update edge A'B for the next pointing edge - newEdge->SetNextEdge((fe)->nextEdge()); - fe->nextEdge()->SetPreviousEdge(newEdge); + newEdge->setNextEdge((fe)->nextEdge()); + fe->nextEdge()->setPreviousEdge(newEdge); Id id(fe->getId().getFirst(), fe->getId().getSecond()+1); - newEdge->SetId(fe->getId()); - fe->SetId(id); + newEdge->setId(fe->getId()); + fe->setId(id); // update edge AA' for the next pointing edge - //ioEdge->SetNextEdge(newEdge); - (fe)->SetNextEdge(NULL); + //ioEdge->setNextEdge(newEdge); + (fe)->setNextEdge(NULL); // update vertex pointing edges list: // -- vertex B -- @@ -1264,30 +1264,30 @@ public: newEdge = new FEdgeSmooth(ioNewVertex, B); FEdgeSmooth * se = dynamic_cast(newEdge); FEdgeSmooth * fes = dynamic_cast(ioEdge); - se->SetMaterialIndex(fes->materialIndex()); + se->setMaterialIndex(fes->materialIndex()); }else{ newEdge = new FEdgeSharp(ioNewVertex, B); FEdgeSharp * se = dynamic_cast(newEdge); FEdgeSharp * fes = dynamic_cast(ioEdge); - se->SetaMaterialIndex(fes->aMaterialIndex()); - se->SetbMaterialIndex(fes->bMaterialIndex()); + se->setaMaterialIndex(fes->aMaterialIndex()); + se->setbMaterialIndex(fes->bMaterialIndex()); } - newEdge->SetNature(ioEdge->getNature()); + newEdge->setNature(ioEdge->getNature()); if(ioEdge->nextEdge() != 0) - ioEdge->nextEdge()->SetPreviousEdge(newEdge); + ioEdge->nextEdge()->setPreviousEdge(newEdge); // update edge A'B for the next pointing edge - newEdge->SetNextEdge(ioEdge->nextEdge()); + newEdge->setNextEdge(ioEdge->nextEdge()); // update edge A'B for the previous pointing edge - newEdge->SetPreviousEdge(0); // because it is now a TVertex + newEdge->setPreviousEdge(0); // because it is now a TVertex Id id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond()+1); - newEdge->SetId(ioEdge->getId()); - ioEdge->SetId(id); + newEdge->setId(ioEdge->getId()); + ioEdge->setId(id); // update edge AA' for the next pointing edge - ioEdge->SetNextEdge(0); // because it is now a TVertex + ioEdge->setNextEdge(0); // because it is now a TVertex // update vertex pointing edges list: // -- vertex B -- @@ -1301,17 +1301,17 @@ public: AddEdge(newEdge); // FIXME ?? // The edge AB becomes edge AA'. - ioEdge->SetVertexB(ioNewVertex); + ioEdge->setVertexB(ioNewVertex); if(ioEdge->isSmooth()){ - ((FEdgeSmooth*)newEdge)->SetFace(((FEdgeSmooth*)ioEdge)->face()); + ((FEdgeSmooth*)newEdge)->setFace(((FEdgeSmooth*)ioEdge)->face()); } return newEdge; } /*! Sets the Bounding Box of the Shape */ - inline void SetBBox(const BBox& iBBox) {_BBox = iBBox;} + inline void setBBox(const BBox& iBBox) {_BBox = iBBox;} /*! Compute the bbox of the sshape */ inline void ComputeBBox() @@ -1359,7 +1359,7 @@ public: } - SetBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); + setBBox(BBox(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax))); } inline void RemoveEdgeFromChain(FEdge *iEdge) @@ -1409,11 +1409,11 @@ public: /* Modififers */ /*! Sets the Id of the shape.*/ - inline void SetId(Id id) {_Id = id;} + inline void setId(Id id) {_Id = id;} /*! Sets the list of materials for the shape */ - inline void SetMaterials(const vector& iMaterials) {_Materials = iMaterials;} - inline void SetViewShape(ViewShape *iShape) {_ViewShape = iShape;} - inline void SetImportance(float importance){_importance = importance;} + inline void setMaterials(const vector& iMaterials) {_Materials = iMaterials;} + inline void setViewShape(ViewShape *iShape) {_ViewShape = iShape;} + inline void setImportance(float importance){_importance = importance;} }; #endif // SILHOUETTE_H diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp index 19b8a632ffe..33c1115e94f 100755 --- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp +++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp @@ -55,7 +55,7 @@ real SilhouetteGeomEngine::_zfar = 100.0; SilhouetteGeomEngine * SilhouetteGeomEngine::_pInstance = 0; -void SilhouetteGeomEngine::SetTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) +void SilhouetteGeomEngine::setTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) { unsigned int i,j; _translation[0] = iModelViewMatrix[3][0]; @@ -93,7 +93,7 @@ void SilhouetteGeomEngine::SetTransform(const real iModelViewMatrix[4][4], const _Focal = iFocal; } -void SilhouetteGeomEngine::SetFrustum(real iZNear, real iZFar) +void SilhouetteGeomEngine::setFrustum(real iZNear, real iZFar) { _znear = iZNear; _zfar = iZFar; @@ -117,7 +117,7 @@ void SilhouetteGeomEngine::ProjectSilhouette(vector& ioVertices) { GeomUtils::fromWorldToImage((*sv)->point3D(), newPoint, _modelViewMatrix, _projectionMatrix, _viewport); newPoint[2] = (-newPoint[2]-_znear)/(_zfar-_znear); // normalize Z between 0 and 1 - (*sv)->SetPoint2D(newPoint); + (*sv)->setPoint2D(newPoint); //cerr << (*sv)->point2d().z() << " "; // real d=(*sv)->point2d()[2]; // if (d>max) max =d; @@ -128,7 +128,7 @@ void SilhouetteGeomEngine::ProjectSilhouette(vector& ioVertices) // sv++) // { // Vec3r P((*sv)->point2d()); - // (*sv)->SetPoint2D(Vec3r(P[0], P[1], 1.0-(P[2]-min)/(max-min))); + // (*sv)->setPoint2D(Vec3r(P[0], P[1], 1.0-(P[2]-min)/(max-min))); // //cerr<<(*sv)->point2d()[2]<<" "; // } } @@ -141,7 +141,7 @@ void SilhouetteGeomEngine::ProjectSilhouette(SVertex* ioVertex) vector::iterator sv, svend; GeomUtils::fromWorldToImage(ioVertex->point3D(), newPoint, _modelViewMatrix, _projectionMatrix, _viewport); newPoint[2] = (-newPoint[2]-_znear)/(_zfar-_znear); // normalize Z between 0 and 1 - ioVertex->SetPoint2D(newPoint); + ioVertex->setPoint2D(newPoint); } real SilhouetteGeomEngine::ImageToWorldParameter(FEdge *fe, real t) diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h index 159dda1afc0..9638d26986f 100755 --- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h +++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h @@ -75,7 +75,7 @@ public: } /*! Sets the current viewpoint */ - static inline void SetViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} + static inline void setViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} /*! Sets the current transformation * iModelViewMatrix @@ -87,11 +87,11 @@ public: * iFocal * The focal length */ - static void SetTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) ; + static void setTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocal) ; /*! Sets the current znear and zfar */ - static void SetFrustum(real iZNear, real iZFar) ; + static void setFrustum(real iZNear, real iZFar) ; /* accessors */ static void retrieveViewport(int viewport[4]); diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index bf4369bcf41..3feeb6664df 100755 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -160,7 +160,7 @@ ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer) // Start a new chain edges ViewEdge * newVEdge = new ViewEdge; - newVEdge->SetId(_currentViewId); + newVEdge->setId(_currentViewId); ++_currentViewId; _pCurrentVShape->AddEdge(newVEdge); @@ -174,23 +174,23 @@ ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer) fl!=flend; ++fl){ fe = BuildSmoothFEdge(feprevious, (*fl)); - fe->SetViewEdge(newVEdge); + fe->setViewEdge(newVEdge); if(!fefirst) fefirst = fe; feprevious = fe; } // Store the chain starting edge: _pCurrentSShape->AddChain(fefirst); - newVEdge->SetNature(iFaceLayer.fl->nature()); - newVEdge->SetFEdgeA(fefirst); - newVEdge->SetFEdgeB(fe); + newVEdge->setNature(iFaceLayer.fl->nature()); + newVEdge->setFEdgeA(fefirst); + newVEdge->setFEdgeB(fe); // is it a closed loop ? if((first == end) && (size != 1)){ - fefirst->SetPreviousEdge(fe); - fe->SetNextEdge(fefirst); - newVEdge->SetA(0); - newVEdge->SetB(0); + fefirst->setPreviousEdge(fe); + fe->setNextEdge(fefirst); + newVEdge->setA(0); + newVEdge->setB(0); }else{ ViewVertex *vva = MakeViewVertex(fefirst->vertexA()); ViewVertex *vvb = MakeViewVertex(fe->vertexB()); @@ -198,8 +198,8 @@ ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer) ((NonTVertex*)vva)->AddOutgoingViewEdge(newVEdge); ((NonTVertex*)vvb)->AddIncomingViewEdge(newVEdge); - newVEdge->SetA(vva); - newVEdge->SetB(vvb); + newVEdge->setA(vva); + newVEdge->setB(vvb); } return newVEdge; @@ -208,7 +208,7 @@ ViewEdge * ViewEdgeXBuilder::BuildSmoothViewEdge(const OWXFaceLayer& iFaceLayer) ViewEdge * ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) { // Start a new sharp chain edges ViewEdge * newVEdge = new ViewEdge; - newVEdge->SetId(_currentViewId); + newVEdge->setId(_currentViewId); ++_currentViewId; unsigned size=0; @@ -248,23 +248,23 @@ ViewEdge * ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) { we!=weend; ++we){ fe = BuildSharpFEdge(feprevious, (*we)); - fe->SetViewEdge(newVEdge); + fe->setViewEdge(newVEdge); if(!fefirst) fefirst = fe; feprevious = fe; } // Store the chain starting edge: _pCurrentSShape->AddChain(fefirst); - newVEdge->SetNature(iWEdge.e->nature()); - newVEdge->SetFEdgeA(fefirst); - newVEdge->SetFEdgeB(fe); + newVEdge->setNature(iWEdge.e->nature()); + newVEdge->setFEdgeA(fefirst); + newVEdge->setFEdgeB(fe); // is it a closed loop ? if((firstWEdge == endWEdge) && (size!=1)){ - fefirst->SetPreviousEdge(fe); - fe->SetNextEdge(fefirst); - newVEdge->SetA(0); - newVEdge->SetB(0); + fefirst->setPreviousEdge(fe); + fe->setNextEdge(fefirst); + newVEdge->setA(0); + newVEdge->setB(0); }else{ ViewVertex *vva = MakeViewVertex(fefirst->vertexA()); ViewVertex *vvb = MakeViewVertex(fe->vertexB()); @@ -272,8 +272,8 @@ ViewEdge * ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge& iWEdge) { ((NonTVertex*)vva)->AddOutgoingViewEdge(newVEdge); ((NonTVertex*)vvb)->AddIncomingViewEdge(newVEdge); - newVEdge->SetA(vva); - newVEdge->SetB(vvb); + newVEdge->setA(vva); + newVEdge->setB(vvb); } return newVEdge; @@ -468,14 +468,14 @@ FEdge * ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer // Creates the corresponding feature edge fe = new FEdgeSmooth(va, vb); - fe->SetNature(ifl.fl->nature()); - fe->SetId(_currentFId); - fe->SetMaterialIndex(ifl.fl->getFace()->materialIndex()); - fe->SetFace(ifl.fl->getFace()); - fe->SetNormal(normal); - fe->SetPreviousEdge(feprevious); + fe->setNature(ifl.fl->nature()); + fe->setId(_currentFId); + fe->setMaterialIndex(ifl.fl->getFace()->materialIndex()); + fe->setFace(ifl.fl->getFace()); + fe->setNormal(normal); + fe->setPreviousEdge(feprevious); if(feprevious) - feprevious->SetNextEdge(fe); + feprevious->setNextEdge(fe); _pCurrentSShape->AddEdge(fe); va->AddFEdge(fe); vb->AddFEdge(fe); @@ -603,15 +603,15 @@ FEdge * ViewEdgeXBuilder::BuildSharpFEdge(FEdge *feprevious, const OWXEdge& iwe) // Creates the corresponding feature edge // Creates the corresponding feature edge fe = new FEdgeSharp(va, vb); - fe->SetNature(iwe.e->nature()); - fe->SetId(_currentFId); - fe->SetaMaterialIndex(matA); - fe->SetbMaterialIndex(matB); - fe->SetNormalA(normalA); - fe->SetNormalB(normalB); - fe->SetPreviousEdge(feprevious); + fe->setNature(iwe.e->nature()); + fe->setId(_currentFId); + fe->setaMaterialIndex(matA); + fe->setbMaterialIndex(matB); + fe->setNormalA(normalA); + fe->setNormalB(normalB); + fe->setPreviousEdge(feprevious); if(feprevious) - feprevious->SetNextEdge(fe); + feprevious->setNextEdge(fe); _pCurrentSShape->AddEdge(fe); va->AddFEdge(fe); vb->AddFEdge(fe); diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h index da63fa2f515..28a5d7d9dd4 100755 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h @@ -175,9 +175,9 @@ public: inline int currentFId() const { return _currentFId; } inline int currentSVertexId() const { return _currentSVertexId; } /*! modifiers */ - inline void SetCurrentViewId(int id) { _currentViewId = id; } - inline void SetCurrentFId(int id) { _currentFId = id; } - inline void SetCurrentSVertexId(int id) { _currentSVertexId = id; } + inline void setCurrentViewId(int id) { _currentViewId = id; } + inline void setCurrentFId(int id) { _currentFId = id; } + inline void setCurrentSVertexId(int id) { _currentSVertexId = id; } protected: /*! Init the view edges building */ diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp index 9a2d262b703..e0ae2ca373e 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp @@ -144,7 +144,7 @@ TVertex* ViewMap::CreateTVertex(const Vec3r& iA3D, const Vec3r& iA2D, FEdge *iFE else tvertex = new TVertex(Ib,Ia); - tvertex->SetId(id); + tvertex->setId(id); // add these vertices to the view map AddViewVertex(tvertex); @@ -191,18 +191,18 @@ ViewVertex * ViewMap::InsertViewVertex(SVertex *iVertex, // a new VEdge if(ioEdge->A() == 0){ // closed loop - ioEdge->SetA(vva); - ioEdge->SetB(vva); + ioEdge->setA(vva); + ioEdge->setB(vva); // update sshape vshape->sshape()->RemoveEdgeFromChain(ioEdge->fedgeA()); vshape->sshape()->RemoveEdgeFromChain(ioEdge->fedgeB()); - ioEdge->SetFEdgeA(fbegin); - ioEdge->SetFEdgeB(fend); + ioEdge->setFEdgeA(fbegin); + ioEdge->setFEdgeB(fend); // Update FEdges - fend->SetNextEdge(0); - fbegin->SetPreviousEdge(0); + fend->setNextEdge(0); + fbegin->setPreviousEdge(0); // update new View Vertex: vva->AddOutgoingViewEdge(ioEdge); @@ -213,16 +213,16 @@ ViewVertex * ViewMap::InsertViewVertex(SVertex *iVertex, }else{ // Create new ViewEdge ViewEdge * newVEdge = new ViewEdge(vva, ioEdge->B(), fbegin, ioEdge->fedgeB(), vshape); - newVEdge->SetId(Id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond()+1)); - newVEdge->SetNature(ioEdge->getNature()); + newVEdge->setId(Id(ioEdge->getId().getFirst(), ioEdge->getId().getSecond()+1)); + newVEdge->setNature(ioEdge->getNature()); //newVEdge->UpdateFEdges(); // done in the ViewEdge constructor // Update old ViewEdge - ioEdge->SetB(vva); - ioEdge->SetFEdgeB(fend); + ioEdge->setB(vva); + ioEdge->setFEdgeB(fend); // Update FEdges - fend->SetNextEdge(0); - fbegin->SetPreviousEdge(0); + fend->setNextEdge(0); + fbegin->setPreviousEdge(0); // update new View Vertex: vva->AddOutgoingViewEdge(newVEdge); @@ -291,9 +291,9 @@ bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEd } return false; } -void TVertex::SetFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming) { +void TVertex::setFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming) { if (!iFrontEdgeA) { - cerr << "Warning: null pointer passed as argument of TVertex::SetFrontEdgeA()" << endl; + cerr << "Warning: null pointer passed as argument of TVertex::setFrontEdgeA()" << endl; return; } _FrontEdgeA = directedViewEdge(iFrontEdgeA, incoming); @@ -307,9 +307,9 @@ void TVertex::SetFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming) { else _sortedEdges.push_back(&_FrontEdgeA); } -void TVertex::SetFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming) { +void TVertex::setFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming) { if (!iFrontEdgeB) { - cerr << "Warning: null pointer passed as argument of TVertex::SetFrontEdgeB()" << endl; + cerr << "Warning: null pointer passed as argument of TVertex::setFrontEdgeB()" << endl; return; } _FrontEdgeB = directedViewEdge(iFrontEdgeB, incoming); @@ -323,9 +323,9 @@ void TVertex::SetFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming) { else _sortedEdges.push_back(&_FrontEdgeB); } -void TVertex::SetBackEdgeA(ViewEdge *iBackEdgeA, bool incoming) { +void TVertex::setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming) { if (!iBackEdgeA) { - cerr << "Warning: null pointer passed as argument of TVertex::SetBackEdgeA()" << endl; + cerr << "Warning: null pointer passed as argument of TVertex::setBackEdgeA()" << endl; return; } _BackEdgeA = directedViewEdge(iBackEdgeA, incoming); @@ -339,9 +339,9 @@ void TVertex::SetBackEdgeA(ViewEdge *iBackEdgeA, bool incoming) { else _sortedEdges.push_back(&_BackEdgeA); } -void TVertex::SetBackEdgeB(ViewEdge *iBackEdgeB, bool incoming) { +void TVertex::setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming) { if (!iBackEdgeB) { - cerr << "Warning: null pointer passed as argument of TVertex::SetBackEdgeB()" << endl; + cerr << "Warning: null pointer passed as argument of TVertex::setBackEdgeB()" << endl; return; } _BackEdgeB = directedViewEdge(iBackEdgeB, incoming); @@ -694,10 +694,10 @@ void ViewEdge::UpdateFEdges() FEdge *currentEdge = _FEdgeA; do { - currentEdge->SetViewEdge(this); + currentEdge->setViewEdge(this); currentEdge = currentEdge->nextEdge(); }while((currentEdge != NULL) && (currentEdge!= _FEdgeB)); // last one - _FEdgeB->SetViewEdge(this); + _FEdgeB->setViewEdge(this); } diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index 416b7e8f23f..2691da20057 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -427,8 +427,8 @@ public: _FrontEdgeB.first = 0; _BackEdgeA.first = 0; _BackEdgeB.first = 0; - svFront->SetViewVertex(this); - svBack->SetViewVertex(this); + svFront->setViewVertex(this); + svBack->setViewVertex(this); } protected: @@ -465,15 +465,15 @@ public: /* modifiers */ /*! Sets the SVertex that is closer to the viewpoint. */ - inline void SetFrontVertex(SVertex *iFrontSVertex) {_FrontSVertex = iFrontSVertex;_FrontSVertex->SetViewVertex(this);} + inline void setFrontVertex(SVertex *iFrontSVertex) {_FrontSVertex = iFrontSVertex;_FrontSVertex->setViewVertex(this);} /*! Sets the SVertex that is further away from the viewpoint. */ - inline void SetBackSVertex(SVertex *iBackSVertex) {_BackSVertex = iBackSVertex;_BackSVertex->SetViewVertex(this);} - void SetFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming=true); - void SetFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming=true) ; - void SetBackEdgeA(ViewEdge *iBackEdgeA, bool incoming=true); - void SetBackEdgeB(ViewEdge *iBackEdgeB, bool incoming=true) ; + inline void setBackSVertex(SVertex *iBackSVertex) {_BackSVertex = iBackSVertex;_BackSVertex->setViewVertex(this);} + void setFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming=true); + void setFrontEdgeB(ViewEdge *iFrontEdgeB, bool incoming=true) ; + void setBackEdgeA(ViewEdge *iBackEdgeA, bool incoming=true); + void setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming=true) ; /*! Sets the Id. */ - inline void SetId(const Id& iId) {_Id = iId;} + inline void setId(const Id& iId) {_Id = iId;} /*! Returns the SVertex (among the 2) belonging to the FEdge iFEdge */ inline SVertex * GetSVertex(FEdge *iFEdge) @@ -641,7 +641,7 @@ public: inline NonTVertex(SVertex* iSVertex) : ViewVertex(Nature::NON_T_VERTEX) { _SVertex = iSVertex; - _SVertex->SetViewVertex(this); + _SVertex->setViewVertex(this); } protected: /*! Copy constructor. */ @@ -649,7 +649,7 @@ protected: : ViewVertex(iBrother) { _SVertex = iBrother._SVertex; - _SVertex->SetViewVertex(this); + _SVertex->setViewVertex(this); _ViewEdges = iBrother._ViewEdges; } /*! Cloning method. */ @@ -669,8 +669,8 @@ public: /* modifiers */ /*! Sets the SVertex on top of which this NonTVertex is built. */ - inline void SetSVertex(SVertex *iSVertex) {_SVertex = iSVertex;_SVertex->SetViewVertex(this);} - inline void SetViewEdges(const vector& iViewEdges) {_ViewEdges = iViewEdges;} + inline void setSVertex(SVertex *iSVertex) {_SVertex = iSVertex;_SVertex->setViewVertex(this);} + inline void setViewEdges(const vector& iViewEdges) {_ViewEdges = iViewEdges;} void AddIncomingViewEdge(ViewEdge * iVEdge) ; void AddOutgoingViewEdge(ViewEdge * iVEdge) ; inline void AddViewEdge(ViewEdge * iVEdge, bool incoming=true) { @@ -938,28 +938,28 @@ public: /* modifiers */ /*! Sets the first ViewVertex of the ViewEdge. */ - inline void SetA(ViewVertex* iA) { __A = iA; } + inline void setA(ViewVertex* iA) { __A = iA; } /*! Sets the last ViewVertex of the ViewEdge. */ - inline void SetB(ViewVertex* iB) { __B = iB; } + inline void setB(ViewVertex* iB) { __B = iB; } /*! Sets the nature of the ViewEdge. */ - inline void SetNature(Nature::EdgeNature iNature) { _Nature = iNature; } + inline void setNature(Nature::EdgeNature iNature) { _Nature = iNature; } /*! Sets the first FEdge of the ViewEdge. */ - inline void SetFEdgeA(FEdge* iFEdge) { _FEdgeA = iFEdge; } + inline void setFEdgeA(FEdge* iFEdge) { _FEdgeA = iFEdge; } /*! Sets the last FEdge of the ViewEdge. */ - inline void SetFEdgeB(FEdge* iFEdge) { _FEdgeB = iFEdge; } + inline void setFEdgeB(FEdge* iFEdge) { _FEdgeB = iFEdge; } /*! Sets the ViewShape to which this ViewEdge belongs to.*/ - inline void SetShape(ViewShape *iVShape) + inline void setShape(ViewShape *iVShape) { _Shape = iVShape; } /*! Sets the ViewEdge id. */ - inline void SetId(const Id& id) {_Id = id;} + inline void setId(const Id& id) {_Id = id;} /*! Sets Viewedge to this for all embedded fedges */ void UpdateFEdges(); /*! Sets the occluded ViewShape */ - inline void SetaShape(ViewShape * iShape) {_aShape = iShape;} + inline void setaShape(ViewShape * iShape) {_aShape = iShape;} /*! Sets the quantitative invisibility value. */ - inline void SetQI(int qi) {_qi = qi;} + inline void setQI(int qi) {_qi = qi;} /*! Sets the time stamp value. */ inline void setChainingTimeStamp(unsigned ts) {_ChainingTimeStamp = ts;} inline void AddOccluder(ViewShape *iShape) {_Occluders.push_back(iShape);} @@ -1099,7 +1099,7 @@ public: /*! Default constructor.*/ inline ViewShape() { userdata = 0; _SShape = 0;} /*! Builds a ViewShape from a SShape. */ - inline ViewShape(SShape *iSShape) {userdata = 0; _SShape = iSShape;}//_SShape->SetViewShape(this);} + inline ViewShape(SShape *iSShape) {userdata = 0; _SShape = iSShape;}//_SShape->setViewShape(this);} /*! Copy constructor. */ inline ViewShape(ViewShape& iBrother) { @@ -1146,10 +1146,10 @@ public: ViewEdge *veBackA = (ViewEdge*)(v)->backEdgeA().first->userdata; ViewEdge *veBackB = (ViewEdge*)(v)->backEdgeB().first->userdata; - v->SetFrontEdgeA(veFrontA, v->frontEdgeA().second); - v->SetFrontEdgeB(veFrontB, v->frontEdgeB().second); - v->SetBackEdgeA(veBackA, v->backEdgeA().second); - v->SetBackEdgeB(veBackB, v->backEdgeB().second); + v->setFrontEdgeA(veFrontA, v->frontEdgeA().second); + v->setFrontEdgeB(veFrontB, v->frontEdgeB().second); + v->setBackEdgeA(veBackA, v->backEdgeA().second); + v->setBackEdgeB(veBackB, v->backEdgeB().second); } break; case Nature::NON_T_VERTEX: @@ -1164,7 +1164,7 @@ public: ViewEdge *current = (ViewEdge*)((ve)->first)->userdata; newEdges.push_back(ViewVertex::directedViewEdge(current, ve->second)); } - (v)->SetViewEdges(newEdges); + (v)->setViewEdges(newEdges); } break; default: @@ -1179,8 +1179,8 @@ public: ve!=veend; ve++) { - (*ve)->SetA((ViewVertex*)((*ve)->A()->userdata)); - (*ve)->SetB((ViewVertex*)((*ve)->B()->userdata)); + (*ve)->setA((ViewVertex*)((*ve)->A()->userdata)); + (*ve)->setB((ViewVertex*)((*ve)->B()->userdata)); //--------------------------------------- // Update all embedded FEdges //--------------------------------------- @@ -1253,11 +1253,11 @@ public: /* modifiers */ /*! Sets the SShape on top of which the ViewShape is built. */ - inline void SetSShape(SShape* iSShape) {_SShape = iSShape;} + inline void setSShape(SShape* iSShape) {_SShape = iSShape;} /*! Sets the list of ViewVertex contained in this ViewShape. */ - inline void SetVertices(const vector& iVertices) {_Vertices = iVertices;} + inline void setVertices(const vector& iVertices) {_Vertices = iVertices;} /*! Sets the list of ViewEdge contained in this ViewShape. */ - inline void SetEdges(const vector& iEdges) {_Edges = iEdges;} + inline void setEdges(const vector& iEdges) {_Edges = iEdges;} /*! Adds a ViewVertex to the list. */ inline void AddVertex(ViewVertex *iVertex) { @@ -1268,7 +1268,7 @@ public: inline void AddEdge(ViewEdge *iEdge) { _Edges.push_back(iEdge); - iEdge->SetShape(this); + iEdge->setShape(this); //_SShape->AddNewEdge(iEdge->fedge()); } @@ -1358,13 +1358,13 @@ void ViewShape::SplitEdge(FEdge *fe, // remove the chain that was starting by the fedge A of vEdge (which is different from fe !!!!) shape->RemoveEdgeFromChain(vEdge->fedgeA()); // we set - vEdge->SetA(*vv); - vEdge->SetB(*vv); - vEdge->SetFEdgeA(newEdge); + vEdge->setA(*vv); + vEdge->setB(*vv); + vEdge->setFEdgeA(newEdge); //FEdge *previousEdge = newEdge->previousEdge(); - vEdge->SetFEdgeB(fe); + vEdge->setFEdgeB(fe); newVEdge = vEdge; - vEdge->fedgeA()->SetViewEdge(newVEdge); + vEdge->fedgeA()->setViewEdge(newVEdge); } else { @@ -1372,15 +1372,15 @@ void ViewShape::SplitEdge(FEdge *fe, // while we create the view edge, it updates the "ViewEdge" pointer // of every underlying FEdges to this. newVEdge = new ViewEdge((*vv),vvb);//, newEdge, vEdge->fedgeB()); - newVEdge->SetNature((fe)->getNature()); - newVEdge->SetFEdgeA(newEdge); - //newVEdge->SetFEdgeB(fe); + newVEdge->setNature((fe)->getNature()); + newVEdge->setFEdgeA(newEdge); + //newVEdge->setFEdgeB(fe); // If our original viewedge is made of one FEdge, // then if((vEdge->fedgeA() == vEdge->fedgeB()) || (fe == vEdge->fedgeB())) - newVEdge->SetFEdgeB(newEdge); + newVEdge->setFEdgeB(newEdge); else - newVEdge->SetFEdgeB(vEdge->fedgeB()); //MODIF + newVEdge->setFEdgeB(vEdge->fedgeB()); //MODIF Id * newId = vEdge->splittingId(); if(newId == 0){ @@ -1388,11 +1388,11 @@ void ViewShape::SplitEdge(FEdge *fe, vEdge->setSplittingId(newId); } newId->setSecond(newId->getSecond()+1); - newVEdge->SetId(*newId); + newVEdge->setId(*newId); newVEdge->setSplittingId(newId); // Id id(vEdge->getId().getFirst(), vEdge->getId().getSecond()+1); - // newVEdge->SetId(vEdge->getId()); - // vEdge->SetId(id); + // newVEdge->setId(vEdge->getId()); + // vEdge->setId(id); AddEdge(newVEdge); // here this shape is set as the edge's shape @@ -1405,8 +1405,8 @@ void ViewShape::SplitEdge(FEdge *fe, vvb->Replace((vEdge), newVEdge); // we split the view edge: - vEdge->SetB((*vv)); - vEdge->SetFEdgeB(fe); //MODIF + vEdge->setB((*vv)); + vEdge->setFEdgeB(fe); //MODIF // Update fedges so that they point to the new viewedge: newVEdge->UpdateFEdges(); @@ -1418,14 +1418,14 @@ void ViewShape::SplitEdge(FEdge *fe, if(sv == (*vv)->frontSVertex()) { // -- View Vertex A' -- - (*vv)->SetFrontEdgeA(vEdge, true); - (*vv)->SetFrontEdgeB(newVEdge, false); + (*vv)->setFrontEdgeA(vEdge, true); + (*vv)->setFrontEdgeB(newVEdge, false); } else { // -- View Vertex A' -- - (*vv)->SetBackEdgeA(vEdge, true); - (*vv)->SetBackEdgeB(newVEdge, false); + (*vv)->setBackEdgeA(vEdge, true); + (*vv)->setBackEdgeB(newVEdge, false); } } } diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index 32f5283a63c..89e91e4f2c8 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -55,17 +55,17 @@ void ViewMapBuilder::computeInitialViewEdges(WingedEdge& we) it++) { // create the embedding psShape = new SShape; - psShape->SetId((*it)->GetId()); - psShape->SetMaterials((*it)->materials()); // FIXME + psShape->setId((*it)->GetId()); + psShape->setMaterials((*it)->materials()); // FIXME // create the view shape ViewShape * vshape = new ViewShape(psShape); // add this view shape to the view map: _ViewMap->AddViewShape(vshape); - _pViewEdgeBuilder->SetCurrentViewId(_currentId); // we want to number the view edges in a unique way for the while scene. - _pViewEdgeBuilder->SetCurrentFId(_currentFId); // we want to number the feature edges in a unique way for the while scene. - _pViewEdgeBuilder->SetCurrentSVertexId(_currentFId); // we want to number the SVertex in a unique way for the while scene. + _pViewEdgeBuilder->setCurrentViewId(_currentId); // we want to number the view edges in a unique way for the while scene. + _pViewEdgeBuilder->setCurrentFId(_currentFId); // we want to number the feature edges in a unique way for the while scene. + _pViewEdgeBuilder->setCurrentSVertexId(_currentFId); // we want to number the SVertex in a unique way for the while scene. _pViewEdgeBuilder->BuildViewEdges(dynamic_cast(*it), vshape, _ViewMap->ViewEdges(), _ViewMap->ViewVertices(), @@ -239,12 +239,12 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid FindOccludee(fe, iGrid, epsilon, &aFace, timestamp++); if(aFace) { - fe->SetaFace(*aFace); + fe->setaFace(*aFace); aFaces.push_back(aFace); - fe->SetOccludeeEmpty(false); + fe->setOccludeeEmpty(false); } else - fe->SetOccludeeEmpty(true); + fe->setOccludeeEmpty(true); ++nSamples; fe = fe->nextEdge(); @@ -253,7 +253,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid // ViewEdge // qi -- - (*ve)->SetQI(maxIndex); + (*ve)->setQI(maxIndex); // occluders -- for(set::iterator o=occluders.begin(), oend=occluders.end(); o!=oend; @@ -264,7 +264,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid { if(aFaces.size() <= (float)nSamples/2.f) { - (*ve)->SetaShape(0); + (*ve)->setaShape(0); } else { @@ -272,7 +272,7 @@ void ViewMapBuilder::ComputeRayCastingVisibility(ViewMap *ioViewMap, Grid* iGrid WFace * wface = (WFace*)((*p)->userdata); ViewShape *vshape = ioViewMap->viewShape(wface->GetVertex(0)->shape()->GetId()); ++p; - (*ve)->SetaShape(vshape); + (*ve)->setaShape(vshape); } } @@ -360,7 +360,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, Grid* i if(aFace) { - fe->SetaFace(*aFace); + fe->setaFace(*aFace); aFaces.push_back(aFace); } ++nSamples; @@ -371,13 +371,13 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, Grid* i fe = fe->nextEdge(); } while ((maxCard < qiMajority) && (0!=fe) && (fe!=festart)); - (*ve)->SetQI(maxIndex); + (*ve)->setQI(maxIndex); if(!aFaces.empty()) { if(aFaces.size() < nSamples / 2) { - (*ve)->SetaShape(0); + (*ve)->setaShape(0); } else { @@ -398,11 +398,11 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, Grid* i // } // } // if(sameShape) - (*ve)->SetaShape(vshape); + (*ve)->setaShape(vshape); } } - //(*ve)->SetaFace(aFace); + //(*ve)->setaFace(aFace); if(progressBarDisplay) { counter--; @@ -448,17 +448,17 @@ void ViewMapBuilder::ComputeVeryFastRayCastingVisibility(ViewMap *ioViewMap, Gri qi = ComputeRayCastingVisibility(fe, iGrid, epsilon, occluders, &aFace, timestamp++); if(aFace) { - fe->SetaFace(*aFace); + fe->setaFace(*aFace); WFace * wface = (WFace*)(aFace->userdata); ViewShape *vshape = ioViewMap->viewShape(wface->GetVertex(0)->shape()->GetId()); - (*ve)->SetaShape(vshape); + (*ve)->setaShape(vshape); } else { - (*ve)->SetaShape(0); + (*ve)->setaShape(0); } - (*ve)->SetQI(qi); + (*ve)->setQI(qi); if(progressBarDisplay) { counter--; @@ -562,7 +562,7 @@ void ViewMapBuilder::FindOccludee(FEdge *fe, Grid* iGrid, real epsilon, Polygon3 *oaPolygon = (*p); mint = t; noIntersection = false; - fe->SetOccludeeIntersection(Vec3r(A+t*v)); + fe->setOccludeeIntersection(Vec3r(A+t*v)); } } } diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h index ec52d4fdd7e..5ac100bae15 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h @@ -113,7 +113,7 @@ public: /*! Sets the current viewpoint */ - inline void SetViewpoint(const Vec3r& ivp) {_viewpoint = ivp; SilhouetteGeomEngine::SetViewpoint(ivp);} + inline void setViewpoint(const Vec3r& ivp) {_viewpoint = ivp; SilhouetteGeomEngine::setViewpoint(ivp);} /*! Sets the current transformation * iModelViewMatrix @@ -123,17 +123,17 @@ public: * iViewport * The viewport. 4 real array: origin.x, origin.y, width, length */ - inline void SetTransform(const real iModelViewMatrix[4][4], + inline void setTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], const int iViewport[4], real iFocalLength, real iAspect, real iFovy) { - SilhouetteGeomEngine::SetTransform(iModelViewMatrix, iProjectionMatrix, iViewport, iFocalLength); + SilhouetteGeomEngine::setTransform(iModelViewMatrix, iProjectionMatrix, iViewport, iFocalLength); } - inline void SetFrustum(real iZnear, real iZfar) { - SilhouetteGeomEngine::SetFrustum(iZnear, iZfar); + inline void setFrustum(real iZnear, real iZfar) { + SilhouetteGeomEngine::setFrustum(iZnear, iZfar); } /*! Builds the scene view map @@ -164,13 +164,13 @@ public: */ void ComputeEdgesVisibility(ViewMap *ioViewMap, visibility_algo iAlgo= ray_casting, Grid* iGrid = 0, real epsilon=1e-6); - void SetGrid(Grid *iGrid) {_Grid = iGrid;} + void setGrid(Grid *iGrid) {_Grid = iGrid;} /*! accessors */ /*! Modifiers */ - inline void SetProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} - inline void SetEnableQI(bool iBool) {_EnableQI = iBool;} + inline void setProgressBar(ProgressBar *iProgressBar) {_pProgressBar = iProgressBar;} + inline void setEnableQI(bool iBool) {_EnableQI = iBool;} protected: diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index 4e2796113c8..370f44dffcf 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -99,26 +99,26 @@ namespace ViewMapIO { // Diffuse for (i = 0; i < 4; i++) READ(tmp_array[i]); - m.SetDiffuse(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + m.setDiffuse(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); // Specular for (i = 0; i < 4; i++) READ(tmp_array[i]); - m.SetSpecular(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + m.setSpecular(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); // Ambient for (i = 0; i < 4; i++) READ(tmp_array[i]); - m.SetAmbient(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + m.setAmbient(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); // Emission for (i = 0; i < 4; i++) READ(tmp_array[i]); - m.SetEmission(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); + m.setEmission(tmp_array[0], tmp_array[1], tmp_array[2], tmp_array[3]); // Shininess READ(tmp_array[0]); - m.SetShininess(tmp_array[0]); + m.setShininess(tmp_array[0]); return 0; } @@ -135,12 +135,12 @@ namespace ViewMapIO { Id::id_type id1, id2; READ(id1); READ(id2); - vs->sshape()->SetId(Id(id1, id2)); + vs->sshape()->setId(Id(id1, id2)); // -> Importance float importance; READ(importance); - vs->sshape()->SetImportance(importance); + vs->sshape()->setImportance(importance); // -> BBox // Not necessary (only used during view map computatiom) @@ -155,7 +155,7 @@ namespace ViewMapIO { load(in, m); materials.push_back(m); } - vs->sshape()->SetMaterials(materials); + vs->sshape()->setMaterials(materials); @@ -222,51 +222,51 @@ namespace ViewMapIO { Id::id_type id1, id2; READ(id1); READ(id2); - fe->SetId(Id(id1, id2)); + fe->setId(Id(id1, id2)); // Nature Nature::EdgeNature nature; READ(nature); - fe->SetNature(nature); + fe->setNature(nature); // hasVisibilityPoint // bool b; // READ(b); - // fe->SetHasVisibilityPoint(b); + // fe->setHasVisibilityPoint(b); Vec3r v; unsigned int matindex; // VisibilityPointA // load(in, v); - // fe->SetVisibilityPointA(v); + // fe->setVisibilityPointA(v); // VisibilityPointB // load(in, v); - // fe->SetVisibilityPointB(v); + // fe->setVisibilityPointB(v); if(fe->isSmooth()){ // Normal load(in, v); - fesmooth->SetNormal(v); + fesmooth->setNormal(v); // Material READ(matindex); - fesmooth->SetMaterialIndex(matindex); + fesmooth->setMaterialIndex(matindex); }else{ // aNormal load(in, v); - fesharp->SetNormalA(v); + fesharp->setNormalA(v); // bNormal load(in, v); - fesharp->SetNormalB(v); + fesharp->setNormalB(v); // Materials READ(matindex); - fesharp->SetaMaterialIndex(matindex); + fesharp->setaMaterialIndex(matindex); READ(matindex); - fesharp->SetbMaterialIndex(matindex); + fesharp->setbMaterialIndex(matindex); } unsigned tmp; @@ -274,27 +274,27 @@ namespace ViewMapIO { // VertexA SVertex* sva; READ_IF_NON_NULL(sva, g_vm->SVertices()); - fe->SetVertexA(sva); + fe->setVertexA(sva); // VertexB SVertex* svb; READ_IF_NON_NULL(svb, g_vm->SVertices()); - fe->SetVertexB(svb); + fe->setVertexB(svb); // NextEdge FEdge* nfe; READ_IF_NON_NULL(nfe, g_vm->FEdges()); - fe->SetNextEdge(nfe); + fe->setNextEdge(nfe); // PreviousEdge FEdge* pfe; READ_IF_NON_NULL(pfe, g_vm->FEdges()); - fe->SetPreviousEdge(pfe); + fe->setPreviousEdge(pfe); // ViewEdge ViewEdge* ve; READ_IF_NON_NULL(ve, g_vm->ViewEdges()); - fe->SetViewEdge(ve); + fe->setViewEdge(ve); // Face // Not necessary (only used during view map computatiom) @@ -303,15 +303,15 @@ namespace ViewMapIO { // aFace load(in, p); - fe->SetaFace(p); + fe->setaFace(p); // occludeeEmpty READ(b); - fe->SetOccludeeEmpty(b); + fe->setOccludeeEmpty(b); // occludeeIntersection load(in, v); - fe->SetOccludeeIntersection(v); + fe->setOccludeeIntersection(v); return 0; } @@ -326,29 +326,29 @@ namespace ViewMapIO { Id::id_type id1, id2; READ(id1); READ(id2); - sv->SetId(Id(id1, id2)); + sv->setId(Id(id1, id2)); Vec3r v; // Point3D load(in, v); - sv->SetPoint3D(v); + sv->setPoint3D(v); // Point2D load(in, v); - sv->SetPoint2D(v); + sv->setPoint2D(v); unsigned tmp; // Shape ViewShape* vs; READ_IF_NON_NULL(vs, g_vm->ViewShapes()); - sv->SetShape(vs->sshape()); + sv->setShape(vs->sshape()); // pViewVertex ViewVertex* vv; READ_IF_NON_NULL(vv, g_vm->ViewVertices()); - sv->SetViewVertex(vv); + sv->setViewVertex(vv); unsigned i, size; @@ -382,46 +382,46 @@ namespace ViewMapIO { Id::id_type id1, id2; READ(id1); READ(id2); - ve->SetId(Id(id1, id2)); + ve->setId(Id(id1, id2)); // Nature Nature::EdgeNature nature; READ(nature); - ve->SetNature(nature); + ve->setNature(nature); // QI READ(tmp); - ve->SetQI(tmp); + ve->setQI(tmp); // Shape ViewShape* vs; READ_IF_NON_NULL(vs, g_vm->ViewShapes()); - ve->SetShape(vs); + ve->setShape(vs); // aShape ViewShape* avs; READ_IF_NON_NULL(avs, g_vm->ViewShapes()); - ve->SetaShape(avs); + ve->setaShape(avs); // FEdgeA FEdge* fea; READ_IF_NON_NULL(fea, g_vm->FEdges()); - ve->SetFEdgeA(fea); + ve->setFEdgeA(fea); // FEdgeB FEdge* feb; READ_IF_NON_NULL(feb, g_vm->FEdges()); - ve->SetFEdgeB(feb); + ve->setFEdgeB(feb); // A ViewVertex* vva; READ_IF_NON_NULL(vva, g_vm->ViewVertices()); - ve->SetA(vva); + ve->setA(vva); // B ViewVertex* vvb; READ_IF_NON_NULL(vvb, g_vm->ViewVertices()); - ve->SetB(vvb); + ve->setB(vvb); // Occluders (List) if (!(Options::getFlags() & Options::NO_OCCLUDERS)) { @@ -458,41 +458,41 @@ namespace ViewMapIO { Id::id_type id1, id2; READ(id1); READ(id2); - tv->SetId(Id(id1, id2)); + tv->setId(Id(id1, id2)); // FrontSVertex SVertex* fsv; READ_IF_NON_NULL(fsv, g_vm->SVertices()); - tv->SetFrontVertex(fsv); + tv->setFrontVertex(fsv); // BackSVertex SVertex* bsv; READ_IF_NON_NULL(bsv, g_vm->SVertices()); - tv->SetBackSVertex(bsv); + tv->setBackSVertex(bsv); // FrontEdgeA ViewEdge* fea; READ_IF_NON_NULL(fea, g_vm->ViewEdges()); READ(b); - tv->SetFrontEdgeA(fea, b); + tv->setFrontEdgeA(fea, b); // FrontEdgeB ViewEdge* feb; READ_IF_NON_NULL(feb, g_vm->ViewEdges()); READ(b); - tv->SetFrontEdgeB(feb, b); + tv->setFrontEdgeB(feb, b); // BackEdgeA ViewEdge* bea; READ_IF_NON_NULL(bea, g_vm->ViewEdges()); READ(b); - tv->SetBackEdgeA(bea, b); + tv->setBackEdgeA(bea, b); // BackEdgeB ViewEdge* beb; READ_IF_NON_NULL(beb, g_vm->ViewEdges()); READ(b); - tv->SetBackEdgeB(beb, b); + tv->setBackEdgeB(beb, b); } else if (vv->getNature() & Nature::NON_T_VERTEX) { NonTVertex* ntv = dynamic_cast(vv); @@ -500,7 +500,7 @@ namespace ViewMapIO { // SVertex SVertex* sv; READ_IF_NON_NULL(sv, g_vm->SVertices()); - ntv->SetSVertex(sv); + ntv->setSVertex(sv); // ViewEdges (List) unsigned size; @@ -1015,8 +1015,8 @@ namespace ViewMapIO { for (unsigned i0 = 0; i0 < vs_s; i0++) { SShape* ss = new SShape(); ViewShape* vs = new ViewShape(); - vs->SetSShape(ss); - ss->SetViewShape(vs); + vs->setSShape(ss); + ss->setViewShape(vs); vm->AddViewShape(vs); } // for (unsigned i1 = 0; i1 < fe_s; i1++) { diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h index fc1ec8e373e..2d054d8a067 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h +++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h @@ -49,7 +49,7 @@ class LIB_VIEW_MAP_EXPORT ViewMapTesselator { public: - inline ViewMapTesselator() {_nature = Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE;_Material.SetDiffuse(0,0,0,1);_overloadMaterial=false;} + inline ViewMapTesselator() {_nature = Nature::SILHOUETTE | Nature::BORDER | Nature::CREASE;_Material.setDiffuse(0,0,0,1);_overloadMaterial=false;} virtual ~ViewMapTesselator() {} /*! Builds a set of lines rep contained under a @@ -70,8 +70,8 @@ public: NodeGroup* Tesselate(WShape* iWShape); - inline void SetNature(Nature::EdgeNature iNature) {_nature = iNature;} - inline void SetMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} + inline void setNature(Nature::EdgeNature iNature) {_nature = iNature;} + inline void setMaterial(const Material& iMaterial) {_Material=iMaterial;_overloadMaterial=true;} inline Nature::EdgeNature nature() {return _nature;} inline const Material& material() const {return _Material;} @@ -123,8 +123,8 @@ NodeGroup * ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesItera NodeGroup *group = new NodeGroup; NodeShape *tshape = new NodeShape; group->AddChild(tshape); - //tshape->material().SetDiffuse(0.f, 0.f, 0.f, 1.f); - tshape->SetMaterial(_Material); + //tshape->material().setDiffuse(0.f, 0.f, 0.f, 1.f); + tshape->setMaterial(_Material); LineRep* line; @@ -153,12 +153,12 @@ NodeGroup * ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesItera line = new OrientedLineRep(); if(_overloadMaterial) - line->SetMaterial(_Material); + line->setMaterial(_Material); // there might be chains containing a single element if(0 == (firstEdge)->nextEdge()) { - line->SetStyle(LineRep::LINES); + line->setStyle(LineRep::LINES); // line->AddVertex((*c)->vertexA()->point3D()); // line->AddVertex((*c)->vertexB()->point3D()); AddVertexToLine(line, firstEdge->vertexA()); @@ -166,7 +166,7 @@ NodeGroup * ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesItera } else { - line->SetStyle(LineRep::LINE_STRIP); + line->setStyle(LineRep::LINE_STRIP); //firstEdge = (*c); nextFEdge = firstEdge; @@ -184,7 +184,7 @@ NodeGroup * ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesItera } - line->SetId((*c)->getId().getFirst()); + line->setId((*c)->getId().getFirst()); line->ComputeBBox(); tshape->AddRep(line); id++; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp index 3f27bf6a8a0..0d02e0ca131 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp @@ -292,10 +292,10 @@ WOEdge * WFace::MakeEdge(WVertex *v1, WVertex *v2) // Adds the edge to the face //AddEdge((*it1)->GetaOEdge()); AddEdge(woea); - (*it1)->SetNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); + (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); //sets these vertices as border: - v1->SetBorder(true); - v2->SetBorder(true); + v1->setBorder(true); + v2->setBorder(true); //return (*it1)->GetaOEdge(); return woea; } @@ -311,10 +311,10 @@ WOEdge * WFace::MakeEdge(WVertex *v1, WVertex *v2) // Adds the edge to the face //AddEdge((*it1)->GetaOEdge()); AddEdge(woeb); - (*it1)->SetNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); + (*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges()+1); //sets these vertices as border: - v1->SetBorder(true); - v2->SetBorder(true); + v1->setBorder(true); + v2->setBorder(true); //return (*it1)->GetaOEdge(); return woeb; } @@ -352,10 +352,10 @@ WOEdge * WFace::MakeEdge(WVertex *v1, WVertex *v2) edge = pInvertEdge->GetOwner(); // Sets the a Face (retrieved from pInvertEdge - pOEdge->SetaFace(pInvertEdge->GetbFace()); + pOEdge->setaFace(pInvertEdge->GetbFace()); // Updates the invert edge: - pInvertEdge->SetaFace(this); + pInvertEdge->setaFace(this); } else // The invert edge does not exist yet { @@ -369,20 +369,20 @@ WOEdge * WFace::MakeEdge(WVertex *v1, WVertex *v2) } - pOEdge->SetOwner(edge); + pOEdge->setOwner(edge); // Add the vertices: - pOEdge->SetaVertex(v1); - pOEdge->SetbVertex(v2); + pOEdge->setaVertex(v1); + pOEdge->setbVertex(v2); // Debug: if(v1->GetId() == v2->GetId()) cerr << "Warning: edge " << this << " null with vertex " << v1->GetId() << endl; edge->AddOEdge(pOEdge); - //edge->SetNumberOfOEdges(edge->GetNumberOfOEdges()+1); + //edge->setNumberOfOEdges(edge->GetNumberOfOEdges()+1); // Add this face (the b face) - pOEdge->SetbFace(this); + pOEdge->setbFace(this); // Adds the edge to the face AddEdge(pOEdge); @@ -487,7 +487,7 @@ WShape::WShape(WShape& iBrother) //WVertex *newVertex = new WVertex(*(*v)); WVertex *newVertex = (*v)->duplicate(); - newVertex->SetShape(this); + newVertex->setShape(this); AddVertex(newVertex); } @@ -528,7 +528,7 @@ WShape::WShape(WShape& iBrother) edgedata * currentvedata = (edgedata*)current->userdata; newvedgelist.push_back(currentvedata->_copy); } - (*v)->SetEdges(newvedgelist); + (*v)->setEdges(newvedgelist); } eend = _EdgeList.end(); @@ -538,23 +538,23 @@ WShape::WShape(WShape& iBrother) { // update aOedge: WOEdge *aoEdge = (*e)->GetaOEdge(); - aoEdge->SetaVertex(((vertexdata*)(aoEdge->GetaVertex()->userdata))->_copy); - aoEdge->SetbVertex(((vertexdata*)(aoEdge->GetbVertex()->userdata))->_copy); + aoEdge->setaVertex(((vertexdata*)(aoEdge->GetaVertex()->userdata))->_copy); + aoEdge->setbVertex(((vertexdata*)(aoEdge->GetbVertex()->userdata))->_copy); if(NULL != aoEdge->GetaFace()) - aoEdge->SetaFace(((facedata*)(aoEdge->GetaFace()->userdata))->_copy); - aoEdge->SetbFace(((facedata*)(aoEdge->GetbFace()->userdata))->_copy); - aoEdge->SetOwner(((edgedata*)(aoEdge->GetOwner()->userdata))->_copy); + aoEdge->setaFace(((facedata*)(aoEdge->GetaFace()->userdata))->_copy); + aoEdge->setbFace(((facedata*)(aoEdge->GetbFace()->userdata))->_copy); + aoEdge->setOwner(((edgedata*)(aoEdge->GetOwner()->userdata))->_copy); // update bOedge: WOEdge *boEdge = (*e)->GetbOEdge(); if(boEdge != 0) { - boEdge->SetaVertex(((vertexdata*)(boEdge->GetaVertex()->userdata))->_copy); - boEdge->SetbVertex(((vertexdata*)(boEdge->GetbVertex()->userdata))->_copy); + boEdge->setaVertex(((vertexdata*)(boEdge->GetaVertex()->userdata))->_copy); + boEdge->setbVertex(((vertexdata*)(boEdge->GetbVertex()->userdata))->_copy); if(NULL != boEdge->GetaFace()) - boEdge->SetaFace(((facedata*)(boEdge->GetaFace()->userdata))->_copy); - boEdge->SetbFace(((facedata*)(boEdge->GetbFace()->userdata))->_copy); - boEdge->SetOwner(((edgedata*)(boEdge->GetOwner()->userdata))->_copy); + boEdge->setaFace(((facedata*)(boEdge->GetaFace()->userdata))->_copy); + boEdge->setbFace(((facedata*)(boEdge->GetbFace()->userdata))->_copy); + boEdge->setOwner(((edgedata*)(boEdge->GetOwner()->userdata))->_copy); } } @@ -576,7 +576,7 @@ WShape::WShape(WShape& iBrother) //oedgeList[i] = currentoedata->_copy; //oedgeList[i] = ((oedgedata*)(oedgeList[i]->userdata))->_copy; } - (*f)->SetEdgeList(newoedgelist); + (*f)->setEdgeList(newoedgelist); } // Free all memory (arghh!) @@ -638,9 +638,9 @@ WFace * WShape::MakeFace(vector& iVertexList, vector& iNormalsL return 0; // set the list of per-vertex normals - face->SetNormalList(iNormalsList); + face->setNormalList(iNormalsList); // set the list of per-vertex tex coords - face->SetTexCoordsList(iTexCoordsList); + face->setTexCoordsList(iTexCoordsList); return face; } @@ -650,7 +650,7 @@ WFace* WShape::MakeFace(vector& iVertexList, unsigned iMaterial, WFace int id = _FaceList.size(); - face->SetMaterialIndex(iMaterial); + face->setMaterialIndex(iMaterial); // Check whether we have a degenerated face: @@ -701,7 +701,7 @@ WFace* WShape::MakeFace(vector& iVertexList, unsigned iMaterial, WFace { // means that we just created a new edge and that we must add it to the // shape's edges list - edge->SetId(_EdgeList.size()); + edge->setId(_EdgeList.size()); AddEdge(edge); // compute the mean edge value: _meanEdgeSize += edge->GetaOEdge()->getVec3r().norm(); @@ -722,10 +722,10 @@ WFace* WShape::MakeFace(vector& iVertexList, unsigned iMaterial, WFace Vec3r normal(vector1 ^ vector2); normal.normalize(); - face->SetNormal(normal); + face->setNormal(normal); // Add the face to the shape's faces list: - face->SetId(id); + face->setId(id); AddFace(face); return face; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index b4c6a38f5bd..99dc83faf96 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -80,12 +80,12 @@ public: bool isBoundary(); /*! modifiers */ - inline void SetVertex(const Vec3r& v) {_Vertex = v;} - inline void SetEdges(const vector& iEdgeList) {_EdgeList = iEdgeList;} - inline void SetId(int id) {_Id = id;} - inline void SetShape(WShape *iShape) {_Shape = iShape;} - inline void SetSmooth(bool b) {_Smooth = b;} - inline void SetBorder(bool b) {if(b) _Border= 1; else _Border = 0;} + inline void setVertex(const Vec3r& v) {_Vertex = v;} + inline void setEdges(const vector& iEdgeList) {_EdgeList = iEdgeList;} + inline void setId(int id) {_Id = id;} + inline void setShape(WShape *iShape) {_Shape = iShape;} + inline void setSmooth(bool b) {_Smooth = b;} + inline void setBorder(bool b) {if(b) _Border= 1; else _Border = 0;} /*! Adds an edge to the edges list */ void AddEdge(WEdge *iEdge) ; @@ -333,11 +333,11 @@ public: // inline void SetbCWEdge(WOEdge *pe) {_pbCWEdge = pe;} // inline void SetaCCWEdge(WOEdge *pe) {_paCCWEdge = pe;} // inline void SetbCCCWEdge(WOEdge *pe) {_pbCCWEdge = pe;} - inline void SetaVertex(WVertex *pv) {_paVertex = pv;} - inline void SetbVertex(WVertex *pv) {_pbVertex = pv;} - inline void SetaFace(WFace *pf) {_paFace = pf;} - inline void SetbFace(WFace *pf) {_pbFace = pf;} - inline void SetOwner(WEdge *pe) {_pOwner = pe;} + inline void setaVertex(WVertex *pv) {_paVertex = pv;} + inline void setbVertex(WVertex *pv) {_pbVertex = pv;} + inline void setaFace(WFace *pf) {_paFace = pf;} + inline void setbFace(WFace *pf) {_pbFace = pf;} + inline void setOwner(WEdge *pe) {_pOwner = pe;} /*! Retrieves the list of edges in CW order */ inline void RetrieveCWOrderedEdges(vector& oEdges); @@ -453,8 +453,8 @@ public: } /*! modifiers */ - inline void SetaOEdge(WOEdge *iEdge) {_paOEdge = iEdge;} - inline void SetbOEdge(WOEdge *iEdge) {_pbOEdge = iEdge;} + inline void setaOEdge(WOEdge *iEdge) {_paOEdge = iEdge;} + inline void setbOEdge(WOEdge *iEdge) {_pbOEdge = iEdge;} inline void AddOEdge(WOEdge *iEdge) { if(NULL == _paOEdge) @@ -470,8 +470,8 @@ public: return; } } - inline void SetNumberOfOEdges(int n) {_nOEdges = n;} - inline void SetId(int id) {_Id = id;} + inline void setNumberOfOEdges(int n) {_nOEdges = n;} + inline void setId(int id) {_Id = id;} virtual void ResetUserData() {userdata = 0;} }; @@ -648,12 +648,12 @@ public: return false; } /*! modifiers */ - inline void SetEdgeList(const vector& iEdgeList) {_OEdgeList = iEdgeList;} - inline void SetNormal(const Vec3r& iNormal) {_Normal = iNormal;} - inline void SetNormalList(const vector& iNormalsList) {_VerticesNormals = iNormalsList;} - inline void SetTexCoordsList(const vector& iTexCoordsList) {_VerticesTexCoords = iTexCoordsList;} - inline void SetId(int id) {_Id = id;} - inline void SetMaterialIndex(unsigned iMaterialIndex) {_MaterialIndex = iMaterialIndex;} + inline void setEdgeList(const vector& iEdgeList) {_OEdgeList = iEdgeList;} + inline void setNormal(const Vec3r& iNormal) {_Normal = iNormal;} + inline void setNormalList(const vector& iNormalsList) {_VerticesNormals = iNormalsList;} + inline void setTexCoordsList(const vector& iTexCoordsList) {_VerticesTexCoords = iTexCoordsList;} + inline void setId(int id) {_Id = id;} + inline void setMaterialIndex(unsigned iMaterialIndex) {_MaterialIndex = iMaterialIndex;} /*! designed to build a specialized WEdge * for use in MakeEdge @@ -753,14 +753,14 @@ public: inline const vector& materials() const {return _Materials;} inline const real getMeanEdgeSize() const {return _meanEdgeSize;} /*! modifiers */ - static inline void SetCurrentId(const unsigned id) { _SceneCurrentId = id; } - inline void SetEdgeList(const vector& iEdgeList) {_EdgeList = iEdgeList;} - inline void SetVertexList(const vector& iVertexList) {_VertexList = iVertexList;} - inline void SetFaceList(const vector& iFaceList) {_FaceList = iFaceList;} - inline void SetId(int id) {_Id = id;} - inline void SetBBox(const Vec3r& min, const Vec3r& max) {_min = min; _max=max;} - inline void SetMaterial(const Material& material, unsigned i) {_Materials[i]=material;} - inline void SetMaterials(const vector& iMaterials) {_Materials = iMaterials;} + static inline void setCurrentId(const unsigned id) { _SceneCurrentId = id; } + inline void setEdgeList(const vector& iEdgeList) {_EdgeList = iEdgeList;} + inline void setVertexList(const vector& iVertexList) {_VertexList = iVertexList;} + inline void setFaceList(const vector& iFaceList) {_FaceList = iFaceList;} + inline void setId(int id) {_Id = id;} + inline void setBBox(const Vec3r& min, const Vec3r& max) {_min = min; _max=max;} + inline void setMaterial(const Material& material, unsigned i) {_Materials[i]=material;} + inline void setMaterials(const vector& iMaterials) {_Materials = iMaterials;} /*! designed to build a specialized WFace * for use in MakeFace @@ -806,7 +806,7 @@ public: inline void AddEdge(WEdge *iEdge) {_EdgeList.push_back(iEdge);} inline void AddFace(WFace* iFace) {_FaceList.push_back(iFace);} - inline void AddVertex(WVertex *iVertex) {iVertex->SetShape(this); _VertexList.push_back(iVertex);} + inline void AddVertex(WVertex *iVertex) {iVertex->setShape(this); _VertexList.push_back(iVertex);} inline void ResetUserData() { diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp index 115a4f61789..ff567aee06a 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp @@ -162,16 +162,16 @@ WXSmoothEdge* WXFaceLayer::BuildSmoothEdge(){ } if(ok){ _pSmoothEdge = new WXSmoothEdge; - _pSmoothEdge->SetWOeA(woea); - _pSmoothEdge->SetWOeB(woeb); - _pSmoothEdge->SetTa(ta); - _pSmoothEdge->SetTb(tb); + _pSmoothEdge->setWOeA(woea); + _pSmoothEdge->setWOeB(woeb); + _pSmoothEdge->setTa(ta); + _pSmoothEdge->setTb(tb); if(_Nature & Nature::SILHOUETTE){ if(_nNullDotP != 2){ if(_DotP[_ClosestPointIndex] + 0.01 > 0) - _pSmoothEdge->SetFront(true); + _pSmoothEdge->setFront(true); else - _pSmoothEdge->SetFront(false); + _pSmoothEdge->setFront(false); } } } @@ -221,10 +221,10 @@ WXSmoothEdge* WXFaceLayer::BuildSmoothEdge(){ // } // // _pSmoothEdge = new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX); - // _pSmoothEdge->SetWOeA(woea); - // _pSmoothEdge->SetWOeA(woeb); - // _pSmoothEdge->SetTa(ta); - // _pSmoothEdge->SetTb(tb); + // _pSmoothEdge->setWOeA(woea); + // _pSmoothEdge->setWOeA(woeb); + // _pSmoothEdge->setTa(ta); + // _pSmoothEdge->setTb(tb); // // return _pSmoothEdge; // } @@ -246,7 +246,7 @@ void WXFace::ComputeCenter() center += (*wv)->GetVertex(); } center /= (real)iVertexList.size(); - SetCenter(center); + setCenter(center); } /**********************************/ @@ -272,7 +272,7 @@ WFace* WXShape::MakeFace(vector& iVertexList, unsigned iMaterialIndex) center += (*wv)->GetVertex(); } center /= (real)iVertexList.size(); - ((WXFace*)face)->SetCenter(center); + ((WXFace*)face)->setCenter(center); return face; } @@ -289,7 +289,7 @@ WFace * WXShape::MakeFace(vector& iVertexList, vector& iNormals // center += (*wv)->GetVertex(); // } // center /= (real)iVertexList.size(); - // ((WSFace*)face)->SetCenter(center); + // ((WSFace*)face)->setCenter(center); return face; } diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index 8c53bb8390e..0518e70d90b 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -129,10 +129,10 @@ public: inline int order() const {return _order;} /*! modifiers */ - inline void SetFront(bool iFront) {_front = iFront;} - inline void SetNature(WXNature iNature) {_nature = iNature;} + inline void setFront(bool iFront) {_front = iFront;} + inline void setNature(WXNature iNature) {_nature = iNature;} inline void AddNature(WXNature iNature) {_nature = _nature|iNature;} - inline void SetOrder(int i) {_order = i;} + inline void setOrder(int i) {_order = i;} }; @@ -186,12 +186,12 @@ public: inline Configuration configuration() const {return _config;} /*! modifiers */ - inline void SetWOeA(WOEdge *iwoea) {_woea = iwoea;} - inline void SetWOeB(WOEdge *iwoeb) {_woeb = iwoeb;} - inline void SetTa(real ta) {_ta = ta;} - inline void SetTb(real tb) {_tb = tb;} - inline void SetFront(bool iFront) {_front = iFront;} - inline void SetConfiguration(Configuration iConf) {_config = iConf;} + inline void setWOeA(WOEdge *iwoea) {_woea = iwoea;} + inline void setWOeB(WOEdge *iwoeb) {_woeb = iwoeb;} + inline void setTa(real ta) {_ta = ta;} + inline void setTb(real tb) {_tb = tb;} + inline void setFront(bool iFront) {_front = iFront;} + inline void setConfiguration(Configuration iConf) {_config = iConf;} }; /* Class to store a value per vertex and a smooth edge. @@ -256,7 +256,7 @@ public: inline WXFace * getFace() {return _pWXFace;} inline WXSmoothEdge * getSmoothEdge() {return _pSmoothEdge;} inline bool isViewDependant() const {return _viewDependant;} - inline void SetClosestPointIndex(int iIndex) {_ClosestPointIndex = iIndex;} + inline void setClosestPointIndex(int iIndex) {_ClosestPointIndex = iIndex;} inline void removeSmoothEdge() { if(!_DotP.empty()) @@ -283,7 +283,7 @@ public: */ void RetrieveCuspEdgesIndices(vector& oCuspEdges); WXSmoothEdge * BuildSmoothEdge(); - inline void SetDotP(const vector& iDotP) {_DotP = iDotP;} + inline void setDotP(const vector& iDotP) {_DotP = iDotP;} inline void PushDotP(real iDotP) { _DotP.push_back(iDotP); if(iDotP > 0) @@ -401,11 +401,11 @@ public: } } /*! modifiers */ - inline void SetCenter(const Vec3r& iCenter) {_center = iCenter;} + inline void setCenter(const Vec3r& iCenter) {_center = iCenter;} void ComputeCenter(); - inline void SetZ(real z) {_Z = z;} - inline void SetFront(bool iFront) {_front = iFront;} - inline void SetDotP(real iDotP) + inline void setZ(real z) {_Z = z;} + inline void setFront(bool iFront) {_front = iFront;} + inline void setDotP(real iDotP) { _dotp = iDotP; if(_dotp > 0) diff --git a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp index 534c6e323a9..9d22b4f8db5 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp +++ b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp @@ -25,8 +25,8 @@ void WXEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs) { WXShape *shape = new WXShape; buildWShape(*shape, ifs); - shape->SetId(ifs.getId().getFirst()); - //ifs.SetId(shape->GetId()); + shape->setId(ifs.getId().getFirst()); + //ifs.setId(shape->GetId()); } void WXEdgeBuilder::buildWVertices(WShape& shape, @@ -37,7 +37,7 @@ void WXEdgeBuilder::buildWVertices(WShape& shape, vertex = new WXVertex(Vec3r(vertices[i], vertices[i + 1], vertices[i + 2])); - vertex->SetId(i / 3); + vertex->setId(i / 3); shape.AddVertex(vertex); } } diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp index e611c1106f2..c95231a72dc 100755 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp @@ -28,8 +28,8 @@ using namespace std; void WingedEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs) { WShape *shape = new WShape; buildWShape(*shape, ifs); - shape->SetId(ifs.getId().getFirst()); - //ifs.SetId(shape->GetId()); + shape->setId(ifs.getId().getFirst()); + //ifs.setId(shape->GetId()); } void WingedEdgeBuilder::visitNodeShape(NodeShape& ns) { @@ -93,14 +93,14 @@ void WingedEdgeBuilder::buildWShape(WShape& shape, IndexedFaceSet& ifs) { const Material*const* mats = ifs.materials(); for(unsigned i=0; iSetSmooth(false); + (*wv)->setSmooth(false); } } // Adds the new WShape to the WingedEdge structure @@ -208,7 +208,7 @@ void WingedEdgeBuilder::buildWVertices(WShape& shape, vertex = new WVertex(Vec3r(vertices[i], vertices[i + 1], vertices[i + 2])); - vertex->SetId(i / 3); + vertex->setId(i / 3); shape.AddVertex(vertex); } } diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index 40e879654bc..e4b81a7d071 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 +# Version 1.3.31 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. @@ -60,7 +60,7 @@ class PySwigIterator(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_PySwigIterator __del__ = lambda self : None; @@ -658,11 +658,11 @@ class Material(_object): def emissionB(*args): return _Freestyle.Material_emissionB(*args) def emissionA(*args): return _Freestyle.Material_emissionA(*args) def shininess(*args): return _Freestyle.Material_shininess(*args) - def SetDiffuse(*args): return _Freestyle.Material_SetDiffuse(*args) - def SetSpecular(*args): return _Freestyle.Material_SetSpecular(*args) - def SetAmbient(*args): return _Freestyle.Material_SetAmbient(*args) - def SetEmission(*args): return _Freestyle.Material_SetEmission(*args) - def SetShininess(*args): return _Freestyle.Material_SetShininess(*args) + def setDiffuse(*args): return _Freestyle.Material_setDiffuse(*args) + def setSpecular(*args): return _Freestyle.Material_setSpecular(*args) + def setAmbient(*args): return _Freestyle.Material_setAmbient(*args) + def setEmission(*args): return _Freestyle.Material_setEmission(*args) + def setShininess(*args): return _Freestyle.Material_setShininess(*args) def __ne__(*args): return _Freestyle.Material___ne__(*args) def __eq__(*args): return _Freestyle.Material___eq__(*args) Material_swigregister = _Freestyle.Material_swigregister @@ -718,7 +718,7 @@ class Interface0DIteratorNested(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIteratorNested, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIteratorNested, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_Interface0DIteratorNested __del__ = lambda self : None; @@ -803,8 +803,11 @@ class Interface1D(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Interface1D, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface1D, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr + def __init__(self, *args): + this = _Freestyle.new_Interface1D(*args) + try: self.this.append(this) + except: self.this = this __swig_destroy__ = _Freestyle.delete_Interface1D __del__ = lambda self : None; def getExactTypeName(*args): return _Freestyle.Interface1D_getExactTypeName(*args) @@ -864,8 +867,8 @@ class SVertex(Interface0D): def fedges_end(*args): return _Freestyle.SVertex_fedges_end(*args) def z(*args): return _Freestyle.SVertex_z(*args) def viewvertex(*args): return _Freestyle.SVertex_viewvertex(*args) - def SetPoint3D(*args): return _Freestyle.SVertex_SetPoint3D(*args) - def SetPoint2D(*args): return _Freestyle.SVertex_SetPoint2D(*args) + def setPoint3D(*args): return _Freestyle.SVertex_setPoint3D(*args) + def setPoint2D(*args): return _Freestyle.SVertex_setPoint2D(*args) def AddNormal(*args): return _Freestyle.SVertex_AddNormal(*args) def setCurvatureInfo(*args): return _Freestyle.SVertex_setCurvatureInfo(*args) def getCurvatureInfo(*args): return _Freestyle.SVertex_getCurvatureInfo(*args) @@ -873,10 +876,10 @@ class SVertex(Interface0D): def setDirectionFredo(*args): return _Freestyle.SVertex_setDirectionFredo(*args) def curvatureFredo(*args): return _Freestyle.SVertex_curvatureFredo(*args) def directionFredo(*args): return _Freestyle.SVertex_directionFredo(*args) - def SetId(*args): return _Freestyle.SVertex_SetId(*args) - def SetFEdges(*args): return _Freestyle.SVertex_SetFEdges(*args) - def SetShape(*args): return _Freestyle.SVertex_SetShape(*args) - def SetViewVertex(*args): return _Freestyle.SVertex_SetViewVertex(*args) + def setId(*args): return _Freestyle.SVertex_setId(*args) + def setFEdges(*args): return _Freestyle.SVertex_setFEdges(*args) + def setShape(*args): return _Freestyle.SVertex_setShape(*args) + def setViewVertex(*args): return _Freestyle.SVertex_setViewVertex(*args) def AddFEdge(*args): return _Freestyle.SVertex_AddFEdge(*args) def Replace(*args): return _Freestyle.SVertex_Replace(*args) def fedge(*args): return _Freestyle.SVertex_fedge(*args) @@ -935,17 +938,17 @@ class FEdge(Interface1D): def getOccludeeIntersection(*args): return _Freestyle.FEdge_getOccludeeIntersection(*args) def getOccludeeEmpty(*args): return _Freestyle.FEdge_getOccludeeEmpty(*args) def isSmooth(*args): return _Freestyle.FEdge_isSmooth(*args) - def SetVertexA(*args): return _Freestyle.FEdge_SetVertexA(*args) - def SetVertexB(*args): return _Freestyle.FEdge_SetVertexB(*args) - def SetId(*args): return _Freestyle.FEdge_SetId(*args) - def SetNextEdge(*args): return _Freestyle.FEdge_SetNextEdge(*args) - def SetPreviousEdge(*args): return _Freestyle.FEdge_SetPreviousEdge(*args) - def SetNature(*args): return _Freestyle.FEdge_SetNature(*args) - def SetViewEdge(*args): return _Freestyle.FEdge_SetViewEdge(*args) - def SetaFace(*args): return _Freestyle.FEdge_SetaFace(*args) - def SetOccludeeIntersection(*args): return _Freestyle.FEdge_SetOccludeeIntersection(*args) - def SetOccludeeEmpty(*args): return _Freestyle.FEdge_SetOccludeeEmpty(*args) - def SetSmooth(*args): return _Freestyle.FEdge_SetSmooth(*args) + def setVertexA(*args): return _Freestyle.FEdge_setVertexA(*args) + def setVertexB(*args): return _Freestyle.FEdge_setVertexB(*args) + def setId(*args): return _Freestyle.FEdge_setId(*args) + def setNextEdge(*args): return _Freestyle.FEdge_setNextEdge(*args) + def setPreviousEdge(*args): return _Freestyle.FEdge_setPreviousEdge(*args) + def setNature(*args): return _Freestyle.FEdge_setNature(*args) + def setViewEdge(*args): return _Freestyle.FEdge_setViewEdge(*args) + def setaFace(*args): return _Freestyle.FEdge_setaFace(*args) + def setOccludeeIntersection(*args): return _Freestyle.FEdge_setOccludeeIntersection(*args) + def setOccludeeEmpty(*args): return _Freestyle.FEdge_setOccludeeEmpty(*args) + def setSmooth(*args): return _Freestyle.FEdge_setSmooth(*args) __swig_getmethods__["CommonVertex"] = lambda x: _Freestyle.FEdge_CommonVertex if _newclass:CommonVertex = staticmethod(_Freestyle.FEdge_CommonVertex) def min2d(*args): return _Freestyle.FEdge_min2d(*args) @@ -1027,8 +1030,8 @@ class FEdgeSVertexIterator(Interface0DIteratorNested): def shape(*args): return _Freestyle.FEdgeSVertexIterator_shape(*args) def z(*args): return _Freestyle.FEdgeSVertexIterator_z(*args) def viewvertex(*args): return _Freestyle.FEdgeSVertexIterator_viewvertex(*args) - def SetPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_SetPoint3D(*args) - def SetPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_SetPoint2D(*args) + def setPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_setPoint3D(*args) + def setPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_setPoint2D(*args) def AddNormal(*args): return _Freestyle.FEdgeSVertexIterator_AddNormal(*args) def setCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_setCurvatureInfo(*args) def getCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_getCurvatureInfo(*args) @@ -1036,10 +1039,10 @@ class FEdgeSVertexIterator(Interface0DIteratorNested): def setDirectionFredo(*args): return _Freestyle.FEdgeSVertexIterator_setDirectionFredo(*args) def curvatureFredo(*args): return _Freestyle.FEdgeSVertexIterator_curvatureFredo(*args) def directionFredo(*args): return _Freestyle.FEdgeSVertexIterator_directionFredo(*args) - def SetId(*args): return _Freestyle.FEdgeSVertexIterator_SetId(*args) - def SetFEdges(*args): return _Freestyle.FEdgeSVertexIterator_SetFEdges(*args) - def SetShape(*args): return _Freestyle.FEdgeSVertexIterator_SetShape(*args) - def SetViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_SetViewVertex(*args) + def setId(*args): return _Freestyle.FEdgeSVertexIterator_setId(*args) + def setFEdges(*args): return _Freestyle.FEdgeSVertexIterator_setFEdges(*args) + def setShape(*args): return _Freestyle.FEdgeSVertexIterator_setShape(*args) + def setViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_setViewVertex(*args) def AddFEdge(*args): return _Freestyle.FEdgeSVertexIterator_AddFEdge(*args) def Replace(*args): return _Freestyle.FEdgeSVertexIterator_Replace(*args) def fedge(*args): return _Freestyle.FEdgeSVertexIterator_fedge(*args) @@ -1081,10 +1084,10 @@ class FEdgeSharp(FEdge): def aMaterial(*args): return _Freestyle.FEdgeSharp_aMaterial(*args) def bMaterialIndex(*args): return _Freestyle.FEdgeSharp_bMaterialIndex(*args) def bMaterial(*args): return _Freestyle.FEdgeSharp_bMaterial(*args) - def SetNormalA(*args): return _Freestyle.FEdgeSharp_SetNormalA(*args) - def SetNormalB(*args): return _Freestyle.FEdgeSharp_SetNormalB(*args) - def SetaMaterialIndex(*args): return _Freestyle.FEdgeSharp_SetaMaterialIndex(*args) - def SetbMaterialIndex(*args): return _Freestyle.FEdgeSharp_SetbMaterialIndex(*args) + def setNormalA(*args): return _Freestyle.FEdgeSharp_setNormalA(*args) + def setNormalB(*args): return _Freestyle.FEdgeSharp_setNormalB(*args) + def setaMaterialIndex(*args): return _Freestyle.FEdgeSharp_setaMaterialIndex(*args) + def setbMaterialIndex(*args): return _Freestyle.FEdgeSharp_setbMaterialIndex(*args) FEdgeSharp_swigregister = _Freestyle.FEdgeSharp_swigregister FEdgeSharp_swigregister(FEdgeSharp) @@ -1107,9 +1110,9 @@ class FEdgeSmooth(FEdge): def normal(*args): return _Freestyle.FEdgeSmooth_normal(*args) def materialIndex(*args): return _Freestyle.FEdgeSmooth_materialIndex(*args) def material(*args): return _Freestyle.FEdgeSmooth_material(*args) - def SetFace(*args): return _Freestyle.FEdgeSmooth_SetFace(*args) - def SetNormal(*args): return _Freestyle.FEdgeSmooth_SetNormal(*args) - def SetMaterialIndex(*args): return _Freestyle.FEdgeSmooth_SetMaterialIndex(*args) + def setFace(*args): return _Freestyle.FEdgeSmooth_setFace(*args) + def setNormal(*args): return _Freestyle.FEdgeSmooth_setNormal(*args) + def setMaterialIndex(*args): return _Freestyle.FEdgeSmooth_setMaterialIndex(*args) FEdgeSmooth_swigregister = _Freestyle.FEdgeSmooth_swigregister FEdgeSmooth_swigregister(FEdgeSmooth) @@ -1135,7 +1138,7 @@ class SShape(_object): def CreateSVertex(*args): return _Freestyle.SShape_CreateSVertex(*args) def SplitEdge(*args): return _Freestyle.SShape_SplitEdge(*args) def SplitEdgeIn2(*args): return _Freestyle.SShape_SplitEdgeIn2(*args) - def SetBBox(*args): return _Freestyle.SShape_SetBBox(*args) + def setBBox(*args): return _Freestyle.SShape_setBBox(*args) def ComputeBBox(*args): return _Freestyle.SShape_ComputeBBox(*args) def RemoveEdgeFromChain(*args): return _Freestyle.SShape_RemoveEdgeFromChain(*args) def RemoveEdge(*args): return _Freestyle.SShape_RemoveEdge(*args) @@ -1148,10 +1151,10 @@ class SShape(_object): def viewShape(*args): return _Freestyle.SShape_viewShape(*args) def importance(*args): return _Freestyle.SShape_importance(*args) def getId(*args): return _Freestyle.SShape_getId(*args) - def SetId(*args): return _Freestyle.SShape_SetId(*args) - def SetMaterials(*args): return _Freestyle.SShape_SetMaterials(*args) - def SetViewShape(*args): return _Freestyle.SShape_SetViewShape(*args) - def SetImportance(*args): return _Freestyle.SShape_SetImportance(*args) + def setId(*args): return _Freestyle.SShape_setId(*args) + def setMaterials(*args): return _Freestyle.SShape_setMaterials(*args) + def setViewShape(*args): return _Freestyle.SShape_setViewShape(*args) + def setImportance(*args): return _Freestyle.SShape_setImportance(*args) SShape_swigregister = _Freestyle.SShape_swigregister SShape_swigregister(SShape) @@ -1434,7 +1437,7 @@ class ViewVertex(Interface0D): __swig_getmethods__ = {} for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, ViewVertex, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def getExactTypeName(*args): return _Freestyle.ViewVertex_getExactTypeName(*args) __swig_setmethods__["userdata"] = _Freestyle.ViewVertex_userdata_set @@ -1484,13 +1487,13 @@ class TVertex(ViewVertex): def frontEdgeB(*args): return _Freestyle.TVertex_frontEdgeB(*args) def backEdgeA(*args): return _Freestyle.TVertex_backEdgeA(*args) def backEdgeB(*args): return _Freestyle.TVertex_backEdgeB(*args) - def SetFrontVertex(*args): return _Freestyle.TVertex_SetFrontVertex(*args) - def SetBackSVertex(*args): return _Freestyle.TVertex_SetBackSVertex(*args) - def SetFrontEdgeA(*args): return _Freestyle.TVertex_SetFrontEdgeA(*args) - def SetFrontEdgeB(*args): return _Freestyle.TVertex_SetFrontEdgeB(*args) - def SetBackEdgeA(*args): return _Freestyle.TVertex_SetBackEdgeA(*args) - def SetBackEdgeB(*args): return _Freestyle.TVertex_SetBackEdgeB(*args) - def SetId(*args): return _Freestyle.TVertex_SetId(*args) + def setFrontVertex(*args): return _Freestyle.TVertex_setFrontVertex(*args) + def setBackSVertex(*args): return _Freestyle.TVertex_setBackSVertex(*args) + def setFrontEdgeA(*args): return _Freestyle.TVertex_setFrontEdgeA(*args) + def setFrontEdgeB(*args): return _Freestyle.TVertex_setFrontEdgeB(*args) + def setBackEdgeA(*args): return _Freestyle.TVertex_setBackEdgeA(*args) + def setBackEdgeB(*args): return _Freestyle.TVertex_setBackEdgeB(*args) + def setId(*args): return _Freestyle.TVertex_setId(*args) def GetSVertex(*args): return _Freestyle.TVertex_GetSVertex(*args) def Replace(*args): return _Freestyle.TVertex_Replace(*args) def mate(*args): return _Freestyle.TVertex_mate(*args) @@ -1532,8 +1535,8 @@ class NonTVertex(ViewVertex): __del__ = lambda self : None; def svertex(*args): return _Freestyle.NonTVertex_svertex(*args) def viewedges(*args): return _Freestyle.NonTVertex_viewedges(*args) - def SetSVertex(*args): return _Freestyle.NonTVertex_SetSVertex(*args) - def SetViewEdges(*args): return _Freestyle.NonTVertex_SetViewEdges(*args) + def setSVertex(*args): return _Freestyle.NonTVertex_setSVertex(*args) + def setViewEdges(*args): return _Freestyle.NonTVertex_setViewEdges(*args) def AddIncomingViewEdge(*args): return _Freestyle.NonTVertex_AddIncomingViewEdge(*args) def AddOutgoingViewEdge(*args): return _Freestyle.NonTVertex_AddOutgoingViewEdge(*args) def AddViewEdge(*args): return _Freestyle.NonTVertex_AddViewEdge(*args) @@ -1576,16 +1579,16 @@ class ViewEdge(Interface1D): def bShape(*args): return _Freestyle.ViewEdge_bShape(*args) def occluders(*args): return _Freestyle.ViewEdge_occluders(*args) def splittingId(*args): return _Freestyle.ViewEdge_splittingId(*args) - def SetA(*args): return _Freestyle.ViewEdge_SetA(*args) - def SetB(*args): return _Freestyle.ViewEdge_SetB(*args) - def SetNature(*args): return _Freestyle.ViewEdge_SetNature(*args) - def SetFEdgeA(*args): return _Freestyle.ViewEdge_SetFEdgeA(*args) - def SetFEdgeB(*args): return _Freestyle.ViewEdge_SetFEdgeB(*args) - def SetShape(*args): return _Freestyle.ViewEdge_SetShape(*args) - def SetId(*args): return _Freestyle.ViewEdge_SetId(*args) + def setA(*args): return _Freestyle.ViewEdge_setA(*args) + def setB(*args): return _Freestyle.ViewEdge_setB(*args) + def setNature(*args): return _Freestyle.ViewEdge_setNature(*args) + def setFEdgeA(*args): return _Freestyle.ViewEdge_setFEdgeA(*args) + def setFEdgeB(*args): return _Freestyle.ViewEdge_setFEdgeB(*args) + def setShape(*args): return _Freestyle.ViewEdge_setShape(*args) + def setId(*args): return _Freestyle.ViewEdge_setId(*args) def UpdateFEdges(*args): return _Freestyle.ViewEdge_UpdateFEdges(*args) - def SetaShape(*args): return _Freestyle.ViewEdge_SetaShape(*args) - def SetQI(*args): return _Freestyle.ViewEdge_SetQI(*args) + def setaShape(*args): return _Freestyle.ViewEdge_setaShape(*args) + def setQI(*args): return _Freestyle.ViewEdge_setQI(*args) def setChainingTimeStamp(*args): return _Freestyle.ViewEdge_setChainingTimeStamp(*args) def AddOccluder(*args): return _Freestyle.ViewEdge_AddOccluder(*args) def setSplittingId(*args): return _Freestyle.ViewEdge_setSplittingId(*args) @@ -1631,9 +1634,9 @@ class ViewShape(_object): def vertices(*args): return _Freestyle.ViewShape_vertices(*args) def edges(*args): return _Freestyle.ViewShape_edges(*args) def getId(*args): return _Freestyle.ViewShape_getId(*args) - def SetSShape(*args): return _Freestyle.ViewShape_SetSShape(*args) - def SetVertices(*args): return _Freestyle.ViewShape_SetVertices(*args) - def SetEdges(*args): return _Freestyle.ViewShape_SetEdges(*args) + def setSShape(*args): return _Freestyle.ViewShape_setSShape(*args) + def setVertices(*args): return _Freestyle.ViewShape_setVertices(*args) + def setEdges(*args): return _Freestyle.ViewShape_setEdges(*args) def AddVertex(*args): return _Freestyle.ViewShape_AddVertex(*args) def AddEdge(*args): return _Freestyle.ViewShape_AddEdge(*args) def RemoveEdge(*args): return _Freestyle.ViewShape_RemoveEdge(*args) @@ -1717,8 +1720,8 @@ class ViewEdgeSVertexIterator(Interface0DIteratorNested): def shape(*args): return _Freestyle.ViewEdgeSVertexIterator_shape(*args) def z(*args): return _Freestyle.ViewEdgeSVertexIterator_z(*args) def viewvertex(*args): return _Freestyle.ViewEdgeSVertexIterator_viewvertex(*args) - def SetPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_SetPoint3D(*args) - def SetPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_SetPoint2D(*args) + def setPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_setPoint3D(*args) + def setPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_setPoint2D(*args) def AddNormal(*args): return _Freestyle.ViewEdgeSVertexIterator_AddNormal(*args) def setCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_setCurvatureInfo(*args) def getCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_getCurvatureInfo(*args) @@ -1726,10 +1729,10 @@ class ViewEdgeSVertexIterator(Interface0DIteratorNested): def setDirectionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_setDirectionFredo(*args) def curvatureFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_curvatureFredo(*args) def directionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_directionFredo(*args) - def SetId(*args): return _Freestyle.ViewEdgeSVertexIterator_SetId(*args) - def SetFEdges(*args): return _Freestyle.ViewEdgeSVertexIterator_SetFEdges(*args) - def SetShape(*args): return _Freestyle.ViewEdgeSVertexIterator_SetShape(*args) - def SetViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_SetViewVertex(*args) + def setId(*args): return _Freestyle.ViewEdgeSVertexIterator_setId(*args) + def setFEdges(*args): return _Freestyle.ViewEdgeSVertexIterator_setFEdges(*args) + def setShape(*args): return _Freestyle.ViewEdgeSVertexIterator_setShape(*args) + def setViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_setViewVertex(*args) def AddFEdge(*args): return _Freestyle.ViewEdgeSVertexIterator_AddFEdge(*args) def Replace(*args): return _Freestyle.ViewEdgeSVertexIterator_Replace(*args) def fedge(*args): return _Freestyle.ViewEdgeSVertexIterator_fedge(*args) @@ -1798,16 +1801,16 @@ class ViewEdgeViewEdgeIterator(_object): def bShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_bShape(*args) def occluders(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders(*args) def splittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_splittingId(*args) - def SetA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetA(*args) - def SetB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetB(*args) - def SetNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetNature(*args) - def SetFEdgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetFEdgeA(*args) - def SetFEdgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetFEdgeB(*args) - def SetShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetShape(*args) - def SetId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetId(*args) + def setA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setA(*args) + def setB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setB(*args) + def setNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setNature(*args) + def setFEdgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setFEdgeA(*args) + def setFEdgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setFEdgeB(*args) + def setShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setShape(*args) + def setId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setId(*args) def UpdateFEdges(*args): return _Freestyle.ViewEdgeViewEdgeIterator_UpdateFEdges(*args) - def SetaShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetaShape(*args) - def SetQI(*args): return _Freestyle.ViewEdgeViewEdgeIterator_SetQI(*args) + def setaShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setaShape(*args) + def setQI(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setQI(*args) def setChainingTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setChainingTimeStamp(*args) def AddOccluder(*args): return _Freestyle.ViewEdgeViewEdgeIterator_AddOccluder(*args) def setSplittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setSplittingId(*args) @@ -3267,16 +3270,16 @@ class AdjacencyIterator(_object): def bShape(*args): return _Freestyle.AdjacencyIterator_bShape(*args) def occluders(*args): return _Freestyle.AdjacencyIterator_occluders(*args) def splittingId(*args): return _Freestyle.AdjacencyIterator_splittingId(*args) - def SetA(*args): return _Freestyle.AdjacencyIterator_SetA(*args) - def SetB(*args): return _Freestyle.AdjacencyIterator_SetB(*args) - def SetNature(*args): return _Freestyle.AdjacencyIterator_SetNature(*args) - def SetFEdgeA(*args): return _Freestyle.AdjacencyIterator_SetFEdgeA(*args) - def SetFEdgeB(*args): return _Freestyle.AdjacencyIterator_SetFEdgeB(*args) - def SetShape(*args): return _Freestyle.AdjacencyIterator_SetShape(*args) - def SetId(*args): return _Freestyle.AdjacencyIterator_SetId(*args) + def setA(*args): return _Freestyle.AdjacencyIterator_setA(*args) + def setB(*args): return _Freestyle.AdjacencyIterator_setB(*args) + def setNature(*args): return _Freestyle.AdjacencyIterator_setNature(*args) + def setFEdgeA(*args): return _Freestyle.AdjacencyIterator_setFEdgeA(*args) + def setFEdgeB(*args): return _Freestyle.AdjacencyIterator_setFEdgeB(*args) + def setShape(*args): return _Freestyle.AdjacencyIterator_setShape(*args) + def setId(*args): return _Freestyle.AdjacencyIterator_setId(*args) def UpdateFEdges(*args): return _Freestyle.AdjacencyIterator_UpdateFEdges(*args) - def SetaShape(*args): return _Freestyle.AdjacencyIterator_SetaShape(*args) - def SetQI(*args): return _Freestyle.AdjacencyIterator_SetQI(*args) + def setaShape(*args): return _Freestyle.AdjacencyIterator_setaShape(*args) + def setQI(*args): return _Freestyle.AdjacencyIterator_setQI(*args) def setChainingTimeStamp(*args): return _Freestyle.AdjacencyIterator_setChainingTimeStamp(*args) def AddOccluder(*args): return _Freestyle.AdjacencyIterator_AddOccluder(*args) def setSplittingId(*args): return _Freestyle.AdjacencyIterator_setSplittingId(*args) @@ -3859,9 +3862,9 @@ class CurvePointIterator(Interface0DIteratorNested): def A(*args): return _Freestyle.CurvePointIterator_A(*args) def B(*args): return _Freestyle.CurvePointIterator_B(*args) def t2d(*args): return _Freestyle.CurvePointIterator_t2d(*args) - def SetA(*args): return _Freestyle.CurvePointIterator_SetA(*args) - def SetB(*args): return _Freestyle.CurvePointIterator_SetB(*args) - def SetT2d(*args): return _Freestyle.CurvePointIterator_SetT2d(*args) + def setA(*args): return _Freestyle.CurvePointIterator_setA(*args) + def setB(*args): return _Freestyle.CurvePointIterator_setB(*args) + def setT2d(*args): return _Freestyle.CurvePointIterator_setT2d(*args) def fedge(*args): return _Freestyle.CurvePointIterator_fedge(*args) def point2d(*args): return _Freestyle.CurvePointIterator_point2d(*args) def point3d(*args): return _Freestyle.CurvePointIterator_point3d(*args) @@ -3914,9 +3917,9 @@ class CurvePoint(Interface0D): def A(*args): return _Freestyle.CurvePoint_A(*args) def B(*args): return _Freestyle.CurvePoint_B(*args) def t2d(*args): return _Freestyle.CurvePoint_t2d(*args) - def SetA(*args): return _Freestyle.CurvePoint_SetA(*args) - def SetB(*args): return _Freestyle.CurvePoint_SetB(*args) - def SetT2d(*args): return _Freestyle.CurvePoint_SetT2d(*args) + def setA(*args): return _Freestyle.CurvePoint_setA(*args) + def setB(*args): return _Freestyle.CurvePoint_setB(*args) + def setT2d(*args): return _Freestyle.CurvePoint_setT2d(*args) def fedge(*args): return _Freestyle.CurvePoint_fedge(*args) def point2d(*args): return _Freestyle.CurvePoint_point2d(*args) def point3d(*args): return _Freestyle.CurvePoint_point3d(*args) @@ -4001,12 +4004,12 @@ class StrokeVertexIterator(Interface0DIteratorNested): def attribute(*args): return _Freestyle.StrokeVertexIterator_attribute(*args) def curvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_curvilinearAbscissa(*args) def strokeLength(*args): return _Freestyle.StrokeVertexIterator_strokeLength(*args) - def SetX(*args): return _Freestyle.StrokeVertexIterator_SetX(*args) - def SetY(*args): return _Freestyle.StrokeVertexIterator_SetY(*args) - def SetPoint(*args): return _Freestyle.StrokeVertexIterator_SetPoint(*args) - def SetAttribute(*args): return _Freestyle.StrokeVertexIterator_SetAttribute(*args) - def SetCurvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_SetCurvilinearAbscissa(*args) - def SetStrokeLength(*args): return _Freestyle.StrokeVertexIterator_SetStrokeLength(*args) + def setX(*args): return _Freestyle.StrokeVertexIterator_setX(*args) + def setY(*args): return _Freestyle.StrokeVertexIterator_setY(*args) + def setPoint(*args): return _Freestyle.StrokeVertexIterator_setPoint(*args) + def setAttribute(*args): return _Freestyle.StrokeVertexIterator_setAttribute(*args) + def setCurvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_setCurvilinearAbscissa(*args) + def setStrokeLength(*args): return _Freestyle.StrokeVertexIterator_setStrokeLength(*args) def getX(*args): return _Freestyle.StrokeVertexIterator_getX(*args) def getY(*args): return _Freestyle.StrokeVertexIterator_getY(*args) def getZ(*args): return _Freestyle.StrokeVertexIterator_getZ(*args) @@ -4025,9 +4028,9 @@ class StrokeVertexIterator(Interface0DIteratorNested): def A(*args): return _Freestyle.StrokeVertexIterator_A(*args) def B(*args): return _Freestyle.StrokeVertexIterator_B(*args) def t2d(*args): return _Freestyle.StrokeVertexIterator_t2d(*args) - def SetA(*args): return _Freestyle.StrokeVertexIterator_SetA(*args) - def SetB(*args): return _Freestyle.StrokeVertexIterator_SetB(*args) - def SetT2d(*args): return _Freestyle.StrokeVertexIterator_SetT2d(*args) + def setA(*args): return _Freestyle.StrokeVertexIterator_setA(*args) + def setB(*args): return _Freestyle.StrokeVertexIterator_setB(*args) + def setT2d(*args): return _Freestyle.StrokeVertexIterator_setT2d(*args) def fedge(*args): return _Freestyle.StrokeVertexIterator_fedge(*args) def point2d(*args): return _Freestyle.StrokeVertexIterator_point2d(*args) def point3d(*args): return _Freestyle.StrokeVertexIterator_point3d(*args) @@ -4078,7 +4081,7 @@ class StrokeAttribute(_object): def setColor(*args): return _Freestyle.StrokeAttribute_setColor(*args) def setAlpha(*args): return _Freestyle.StrokeAttribute_setAlpha(*args) def setThickness(*args): return _Freestyle.StrokeAttribute_setThickness(*args) - def SetVisible(*args): return _Freestyle.StrokeAttribute_SetVisible(*args) + def setVisible(*args): return _Freestyle.StrokeAttribute_setVisible(*args) def setAttributeReal(*args): return _Freestyle.StrokeAttribute_setAttributeReal(*args) def setAttributeVec2f(*args): return _Freestyle.StrokeAttribute_setAttributeVec2f(*args) def setAttributeVec3f(*args): return _Freestyle.StrokeAttribute_setAttributeVec3f(*args) @@ -4107,12 +4110,12 @@ class StrokeVertex(CurvePoint): def curvilinearAbscissa(*args): return _Freestyle.StrokeVertex_curvilinearAbscissa(*args) def strokeLength(*args): return _Freestyle.StrokeVertex_strokeLength(*args) def u(*args): return _Freestyle.StrokeVertex_u(*args) - def SetX(*args): return _Freestyle.StrokeVertex_SetX(*args) - def SetY(*args): return _Freestyle.StrokeVertex_SetY(*args) - def SetPoint(*args): return _Freestyle.StrokeVertex_SetPoint(*args) - def SetAttribute(*args): return _Freestyle.StrokeVertex_SetAttribute(*args) - def SetCurvilinearAbscissa(*args): return _Freestyle.StrokeVertex_SetCurvilinearAbscissa(*args) - def SetStrokeLength(*args): return _Freestyle.StrokeVertex_SetStrokeLength(*args) + def setX(*args): return _Freestyle.StrokeVertex_setX(*args) + def setY(*args): return _Freestyle.StrokeVertex_setY(*args) + def setPoint(*args): return _Freestyle.StrokeVertex_setPoint(*args) + def setAttribute(*args): return _Freestyle.StrokeVertex_setAttribute(*args) + def setCurvilinearAbscissa(*args): return _Freestyle.StrokeVertex_setCurvilinearAbscissa(*args) + def setStrokeLength(*args): return _Freestyle.StrokeVertex_setStrokeLength(*args) StrokeVertex_swigregister = _Freestyle.StrokeVertex_swigregister StrokeVertex_swigregister(StrokeVertex) @@ -4155,16 +4158,16 @@ class Stroke(Interface1D): def getEndingOrientation(*args): return _Freestyle.Stroke_getEndingOrientation(*args) def getEndingOrientationX(*args): return _Freestyle.Stroke_getEndingOrientationX(*args) def getEndingOrientationY(*args): return _Freestyle.Stroke_getEndingOrientationY(*args) - def SetId(*args): return _Freestyle.Stroke_SetId(*args) - def SetLength(*args): return _Freestyle.Stroke_SetLength(*args) - def SetMediumType(*args): return _Freestyle.Stroke_SetMediumType(*args) - def SetTextureId(*args): return _Freestyle.Stroke_SetTextureId(*args) - def SetTips(*args): return _Freestyle.Stroke_SetTips(*args) + def setId(*args): return _Freestyle.Stroke_setId(*args) + def setLength(*args): return _Freestyle.Stroke_setLength(*args) + def setMediumType(*args): return _Freestyle.Stroke_setMediumType(*args) + def setTextureId(*args): return _Freestyle.Stroke_setTextureId(*args) + def setTips(*args): return _Freestyle.Stroke_setTips(*args) def push_back(*args): return _Freestyle.Stroke_push_back(*args) def push_front(*args): return _Freestyle.Stroke_push_front(*args) def AddViewEdge(*args): return _Freestyle.Stroke_AddViewEdge(*args) - def SetBeginningOrientation(*args): return _Freestyle.Stroke_SetBeginningOrientation(*args) - def SetEndingOrientation(*args): return _Freestyle.Stroke_SetEndingOrientation(*args) + def setBeginningOrientation(*args): return _Freestyle.Stroke_setBeginningOrientation(*args) + def setEndingOrientation(*args): return _Freestyle.Stroke_setEndingOrientation(*args) def strokeVerticesBegin(*args): return _Freestyle.Stroke_strokeVerticesBegin(*args) def strokeVerticesEnd(*args): return _Freestyle.Stroke_strokeVerticesEnd(*args) def strokeVerticesSize(*args): return _Freestyle.Stroke_strokeVerticesSize(*args) @@ -4831,7 +4834,7 @@ class Operators(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Operators, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Operators, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["select"] = lambda x: _Freestyle.Operators_select if _newclass:select = staticmethod(_Freestyle.Operators_select) @@ -4898,7 +4901,7 @@ class Canvas(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Canvas, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Canvas, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" + def __init__(self): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["getInstance"] = lambda x: _Freestyle.Canvas_getInstance if _newclass:getInstance = staticmethod(_Freestyle.Canvas_getInstance) @@ -4930,14 +4933,14 @@ class Canvas(_object): def renderer(*args): return _Freestyle.Canvas_renderer(*args) def getCurrentStyleModule(*args): return _Freestyle.Canvas_getCurrentStyleModule(*args) def getRecordFlag(*args): return _Freestyle.Canvas_getRecordFlag(*args) - def SetSelectedFEdge(*args): return _Freestyle.Canvas_SetSelectedFEdge(*args) + def setSelectedFEdge(*args): return _Freestyle.Canvas_setSelectedFEdge(*args) def InsertStyleModule(*args): return _Freestyle.Canvas_InsertStyleModule(*args) def RemoveStyleModule(*args): return _Freestyle.Canvas_RemoveStyleModule(*args) def SwapStyleModules(*args): return _Freestyle.Canvas_SwapStyleModules(*args) def ReplaceStyleModule(*args): return _Freestyle.Canvas_ReplaceStyleModule(*args) - def SetVisible(*args): return _Freestyle.Canvas_SetVisible(*args) + def setVisible(*args): return _Freestyle.Canvas_setVisible(*args) def AddLayer(*args): return _Freestyle.Canvas_AddLayer(*args) - def SetCurrentPaperTextureIndex(*args): return _Freestyle.Canvas_SetCurrentPaperTextureIndex(*args) + def setCurrentPaperTextureIndex(*args): return _Freestyle.Canvas_setCurrentPaperTextureIndex(*args) def changePaperTexture(*args): return _Freestyle.Canvas_changePaperTexture(*args) def togglePaperTexture(*args): return _Freestyle.Canvas_togglePaperTexture(*args) def resetModified(*args): return _Freestyle.Canvas_resetModified(*args) diff --git a/source/blender/freestyle/style_modules/anisotropic_diffusion.py b/source/blender/freestyle/style_modules/anisotropic_diffusion.py index f8b68ee51a6..688554dc92e 100755 --- a/source/blender/freestyle/style_modules/anisotropic_diffusion.py +++ b/source/blender/freestyle/style_modules/anisotropic_diffusion.py @@ -55,7 +55,7 @@ class pyDiffusion2Shader(StrokeShader): v=it.getObject() p1 = v.getPoint() p2 = normalInfo(it.castToInterface0DIterator())*self._lambda*curvatureInfo(it.castToInterface0DIterator()) - v.SetPoint(p1+p2) + v.setPoint(p1+p2) it.increment() upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) diff --git a/source/blender/freestyle/style_modules/shaders.py b/source/blender/freestyle/style_modules/shaders.py index 17ad31961d5..208dfe91bb6 100755 --- a/source/blender/freestyle/style_modules/shaders.py +++ b/source/blender/freestyle/style_modules/shaders.py @@ -603,8 +603,8 @@ class pyBackboneStretcherShader(StrokeShader): dn = dn/dn.norm() newFirst = p0+d1*float(self._l) newLast = pn+dn*float(self._l) - v0.SetPoint(newFirst) - vn.SetPoint(newLast) + v0.setPoint(newFirst) + vn.setPoint(newLast) class pyLengthDependingBackboneStretcherShader(StrokeShader): def __init__(self, l): @@ -636,8 +636,8 @@ class pyLengthDependingBackboneStretcherShader(StrokeShader): dn = dn/dn.norm() newFirst = p0+d1*float(stretch) newLast = pn+dn*float(stretch) - v0.SetPoint(newFirst) - vn.SetPoint(newLast) + v0.setPoint(newFirst) + vn.setPoint(newLast) ## Shader to replace a stroke by its corresponding tangent @@ -656,16 +656,16 @@ class pyGuidingLineShader(StrokeShader): it = StrokeVertexIterator(itmiddle) it.increment() while(it.isEnd() == 0): ## position all the vertices along the tangent for the right part - it.getObject().SetPoint(itmiddle.getObject().getPoint() \ + it.getObject().setPoint(itmiddle.getObject().getPoint() \ +t*(it.getObject().u()-itmiddle.getObject().u())) it.increment() it = StrokeVertexIterator(itmiddle) it.decrement() while(it.isBegin() == 0): ## position all the vertices along the tangent for the left part - it.getObject().SetPoint(itmiddle.getObject().getPoint() \ + it.getObject().setPoint(itmiddle.getObject().getPoint() \ -t*(itmiddle.getObject().u()-it.getObject().u())) it.decrement() - it.getObject().SetPoint(itmiddle.getObject().getPoint()-t*(itmiddle.getObject().u())) ## first vertex + it.getObject().setPoint(itmiddle.getObject().getPoint()-t*(itmiddle.getObject().u())) ## first vertex class pyBackboneStretcherNoCuspShader(StrokeShader): @@ -690,7 +690,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): d1 = p0-p1 d1 = d1/d1.norm() newFirst = p0+d1*float(self._l) - v0.SetPoint(newFirst) + v0.setPoint(newFirst) vn_1 = itn_1.getObject() vn = itn.getObject() if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): @@ -699,7 +699,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): dn = pn-pn_1 dn = dn/dn.norm() newLast = pn+dn*float(self._l) - vn.SetPoint(newLast) + vn.setPoint(newLast) normalInfo=Normal2DF0D() curvatureInfo=Curvature2DAngleF0D() @@ -723,7 +723,7 @@ class pyDiffusion2Shader(StrokeShader): v=it.getObject() p1 = v.getPoint() p2 = self._normalInfo(it.castToInterface0DIterator())*self._lambda*self._curvatureInfo(it.castToInterface0DIterator()) - v.SetPoint(p1+p2) + v.setPoint(p1+p2) it.increment() class pyTipRemoverShader(StrokeShader): @@ -757,7 +757,7 @@ class pyTipRemoverShader(StrokeShader): if(it.isEnd() == 1): break v = it.getObject() - v.SetAttribute(a) + v.setAttribute(a) it.increment() class pyTVertexRemoverShader(StrokeShader): @@ -784,8 +784,8 @@ class pyExtremitiesOrientationShader(StrokeShader): return "pyExtremitiesOrientationShader" def shade(self, stroke): print self._v1.x(),self._v1.y() - stroke.SetBeginningOrientation(self._v1.x(),self._v1.y()) - stroke.SetEndingOrientation(self._v2.x(),self._v2.y()) + stroke.setBeginningOrientation(self._v1.x(),self._v1.y()) + stroke.setEndingOrientation(self._v2.x(),self._v2.y()) class pyHLRShader(StrokeShader): def getName(self): @@ -813,7 +813,7 @@ class pyHLRShader(StrokeShader): else: invisible = 0 if(invisible == 1): - v.attribute().SetVisible(0) + v.attribute().setVisible(0) it.increment() it2.increment() @@ -902,8 +902,8 @@ class pySinusDisplacementShader(StrokeShader): a = self._a*(1-2*(fabs(u-0.5))) n = n*a*cos(self._f*u*6.28) #print n.x(), n.y() - v.SetPoint(p+n) - #v.SetPoint(v.getPoint()+n*a*cos(f*v.u())) + v.setPoint(p+n) + #v.setPoint(v.getPoint()+n*a*cos(f*v.u())) it.increment() class pyPerlinNoise1DShader(StrokeShader): @@ -921,7 +921,7 @@ class pyPerlinNoise1DShader(StrokeShader): while it.isEnd() == 0: v = it.getObject() nres = self.__noise.turbulence1(i, self.__freq, self.__amp, self.__oct) - v.SetPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + v.setPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) i = i+1 it.increment() @@ -940,7 +940,7 @@ class pyPerlinNoise2DShader(StrokeShader): v = it.getObject() vec = Vec2f(v.getProjectedX(), v.getProjectedY()) nres = self.__noise.turbulence2(vec, self.__freq, self.__amp, self.__oct) - v.SetPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + v.setPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) it.increment() class pyBluePrintCirclesShader(StrokeShader): @@ -987,7 +987,7 @@ class pyBluePrintCirclesShader(StrokeShader): while i < sv_nb: p_new.setX(center.x() + radius * cos(2 * pi * float(i) / float(sv_nb - 1))) p_new.setY(center.y() + radius * sin(2 * pi * float(i) / float(sv_nb - 1))) - it.getObject().SetPoint(p_new.x(), p_new.y()) + it.getObject().setPoint(p_new.x(), p_new.y()) i = i + 1 it.increment() while it.isEnd() == 0: @@ -1041,7 +1041,7 @@ class pyBluePrintEllipsesShader(StrokeShader): while i < sv_nb: p_new.setX(center.x() + radius_x * cos(2 * pi * float(i) / float(sv_nb - 1))) p_new.setY(center.y() + radius_y * sin(2 * pi * float(i) / float(sv_nb - 1))) - it.getObject().SetPoint(p_new.x(), p_new.y()) + it.getObject().setPoint(p_new.x(), p_new.y()) i = i + 1 it.increment() while it.isEnd() == 0: @@ -1109,8 +1109,8 @@ class pyBluePrintSquaresShader(StrokeShader): p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) if i == fourth - 1: visible = 0 - it.getObject().SetPoint(p_new.x(), p_new.y()) - it.getObject().attribute().SetVisible(visible) + it.getObject().setPoint(p_new.x(), p_new.y()) + it.getObject().attribute().setVisible(visible) if visible == 0: visible = 1 i = i + 1 @@ -1214,8 +1214,8 @@ class pyBluePrintDirectedSquaresShader(StrokeShader): p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) if i == fourth - 1: visible = 0 - it.getObject().SetPoint(p_new.x(), p_new.y()) - it.getObject().attribute().SetVisible(visible) + it.getObject().setPoint(p_new.x(), p_new.y()) + it.getObject().attribute().setVisible(visible) if visible == 0: visible = 1 i = i + 1 diff --git a/source/blender/freestyle/style_modules/sketchy_topology_broken.py b/source/blender/freestyle/style_modules/sketchy_topology_broken.py index c1cefedfad2..7383347a0fb 100755 --- a/source/blender/freestyle/style_modules/sketchy_topology_broken.py +++ b/source/blender/freestyle/style_modules/sketchy_topology_broken.py @@ -55,7 +55,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): d1 = p0-p1 d1 = d1/d1.norm() newFirst = p0+d1*float(self._l) - v0.SetPoint(newFirst) + v0.setPoint(newFirst) else: print "got a v0 cusp" vn_1 = itn_1.getObject() @@ -66,7 +66,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): dn = pn-pn_1 dn = dn/dn.norm() newLast = pn+dn*float(self._l) - vn.SetPoint(newLast) + vn.setPoint(newLast) else: print "got a vn cusp" From 2c29af6a29725d9905ecfd90f0ea08b4c440a848 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 22 Jul 2008 00:27:40 +0000 Subject: [PATCH 397/430] soc-2008-mxcurioni: corrected StrokeAttribute, verified with test case. I realized today that it will not be possible to implement getter/setter functionality easily for our Freestyle API. The reason is that Python does not support function overloading as-is. It is possible to 'fake' overloading by taking a general argument object and count the number of arguments in the object (rgbTuple_setCol in Blender's API is a good example of how to go about it). For the time being, we'll get around that problem. The tangible effect of that constraint is that all API setter functions return a 'None' PyObject, instead of returning an integer status code. It is important to note that this problem is due to Freestyle's API being C++ in nature. Fortunately, this shouldn't really impact the usage of the API. If the Blender Python group wants me to correct that, I'll be able to do it. It is just going to take me quite some time correcting it, writing support functions for methods having different types of arguments. --- .../intern/python/StrokeAttribute.cpp | 106 ++++++++---------- 1 file changed, 45 insertions(+), 61 deletions(-) diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/StrokeAttribute.cpp index 5f7814ff4dd..b9f37dfa165 100644 --- a/source/blender/freestyle/intern/python/StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/StrokeAttribute.cpp @@ -28,13 +28,13 @@ static PyObject * StrokeAttribute_getAttributeVec3f( BPy_StrokeAttribute *self, static PyObject * StrokeAttribute_isAttributeAvailableReal( BPy_StrokeAttribute *self, PyObject *args ); static PyObject * StrokeAttribute_isAttributeAvailableVec2f( BPy_StrokeAttribute *self, PyObject *args ); static PyObject * StrokeAttribute_isAttributeAvailableVec3f( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ); -static int StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ); +static PyObject * StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ); /*----------------------StrokeAttribute instance definitions ----------------------------*/ @@ -64,6 +64,8 @@ static PyMethodDef BPy_StrokeAttribute_methods[] = { {NULL, NULL, 0, NULL} }; + + /*-----------------------BPy_StrokeAttribute type definition ------------------------------*/ PyTypeObject StrokeAttribute_Type = { @@ -124,7 +126,7 @@ PyTypeObject StrokeAttribute_Type = { /*** Attribute descriptor and subclassing stuff ***/ BPy_StrokeAttribute_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ @@ -184,9 +186,7 @@ int StrokeAttribute___init__(BPy_StrokeAttribute *self, PyObject *args, PyObject *( ((BPy_StrokeAttribute *) obj2)->sa ), PyFloat_AsDouble( obj3 ) ); - } else if( obj4 && obj5 && obj6 && - PyFloat_Check(obj1) && PyFloat_Check(obj2) && PyFloat_Check(obj2) && - PyFloat_Check(obj4) && PyFloat_Check(obj5) && PyFloat_Check(obj6) ) { + } else if( obj4 && obj5 && obj6 ) { self->sa = new StrokeAttribute( PyFloat_AsDouble( obj1 ), PyFloat_AsDouble( obj2 ), @@ -212,18 +212,18 @@ void StrokeAttribute___dealloc__(BPy_StrokeAttribute* self) PyObject * StrokeAttribute___repr__(BPy_StrokeAttribute* self) { - return PyString_FromFormat("StrokeAttribute: r:%f g:%f b:%f a:%f - R:%f L:%f", - self->sa->getColorR(), self->sa->getColorG(), self->sa->getColorB(), self->sa->getAlpha(), - self->sa->getThicknessR(), self->sa->getThicknessL() ); + stringstream repr("StrokeAttribute:"); + repr << " r: " << self->sa->getColorR() + << " g: " << self->sa->getColorG() + << " b: " << self->sa->getColorB() + << " a: " << self->sa->getAlpha() + << " - R: " << self->sa->getThicknessR() + << " L: " << self->sa->getThicknessL(); + + return PyString_FromFormat( repr.str().c_str() ); } -// PyObject *StrokeAttribute_getColor( BPy_StrokeAttribute *self ) { -// float *c = self->sa->getColor(); -// Vec3f v( c[0], c[1], c[2]); -// return Vector_from_Vec3f( v ); -// } - PyObject *StrokeAttribute_getColorR( BPy_StrokeAttribute *self ) { return PyFloat_FromDouble( self->sa->getColorR() ); } @@ -245,11 +245,6 @@ PyObject *StrokeAttribute_getAlpha( BPy_StrokeAttribute *self ) { return PyFloat_FromDouble( self->sa->getAlpha() ); } -// PyObject *StrokeAttribute_getThickness( BPy_StrokeAttribute *self ) { -// // vector -// return PyString_FromString( self->sa->getExactTypeName() ); -// } - PyObject *StrokeAttribute_getThicknessR( BPy_StrokeAttribute *self ) { return PyFloat_FromDouble( self->sa->getThicknessR() ); } @@ -337,14 +332,14 @@ PyObject *StrokeAttribute_isAttributeAvailableVec3f( BPy_StrokeAttribute *self, } -int StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ) { PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0 ; if(!( PyArg_ParseTuple(args, "O|OO", &obj1, &obj2, &obj3) )) { cout << "ERROR: StrokeAttribute_setColor" << endl; - return -1; + Py_RETURN_NONE; } - + if( PyList_Check(obj1) && !obj2 && !obj3 ){ Vec3f v( PyFloat_AsDouble( PyList_GetItem(obj1, 0) ), @@ -352,39 +347,35 @@ int StrokeAttribute_setColor( BPy_StrokeAttribute *self, PyObject *args ) { PyFloat_AsDouble( PyList_GetItem(obj1, 2) ) ); self->sa->setColor( v ); - return 0; - } else if( obj1 && PyFloat_Check(obj1) && - obj2 && PyFloat_Check(obj2) && - obj3 && PyFloat_Check(obj3) ){ - + } else if( obj1 && obj2 && obj3 ){ + self->sa->setColor( PyFloat_AsDouble(obj1), PyFloat_AsDouble(obj2), PyFloat_AsDouble(obj3) ); - return 0; } - return -1; + Py_RETURN_NONE; } -int StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ){ +PyObject * StrokeAttribute_setAlpha( BPy_StrokeAttribute *self, PyObject *args ){ float f = 0; if(!( PyArg_ParseTuple(args, "f", &f) )) { cout << "ERROR: StrokeAttribute_setAlpha" << endl; - return -1; + Py_RETURN_NONE; } self->sa->setAlpha( f ); - return 0; + Py_RETURN_NONE; } -int StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ) { PyObject *obj1 = 0, *obj2 = 0; if(!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) )) { cout << "ERROR: StrokeAttribute_setThickness" << endl; - return -1; + Py_RETURN_NONE; } if( PyList_Check(obj1) && !obj2 ){ @@ -393,51 +384,48 @@ int StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *args ) { PyFloat_AsDouble( PyList_GetItem(obj1, 1) ) ); self->sa->setThickness( v ); - return 0; - } else if( obj1 && PyFloat_Check(obj1) && - obj2 && PyFloat_Check(obj2) ){ + } else if( obj1 && obj2 ){ self->sa->setThickness( PyFloat_AsDouble(obj1), PyFloat_AsDouble(obj2) ); - return 0; } - return -1; + Py_RETURN_NONE; } -int StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ) { int i = 0; if(!( PyArg_ParseTuple(args, "i", &i) )) { cout << "ERROR: StrokeAttribute_setVisible" << endl; - return -1; + Py_RETURN_NONE; } self->sa->setVisible( i ); - return 0; + Py_RETURN_NONE; } -int StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { char *s = 0; double d = 0; if(!( PyArg_ParseTuple(args, "sd", &s, &d) )) { cout << "ERROR: StrokeAttribute_setAttributeReal" << endl; - return -1; + Py_RETURN_NONE; } self->sa->setAttributeReal( s, d ); - return 0; + Py_RETURN_NONE; } -int StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args ) { char *s; PyObject *obj = 0; if(!( PyArg_ParseTuple(args, "sO", &s, &obj) )) { cout << "ERROR: StrokeAttribute_setAttributeVec2f" << endl; - return -1; + Py_RETURN_NONE; } if( PyList_Check(obj) && PyList_Size(obj) > 1) { @@ -446,20 +434,18 @@ int StrokeAttribute_setAttributeVec2f( BPy_StrokeAttribute *self, PyObject *args PyFloat_AsDouble( PyList_GetItem(obj, 1) ) ); self->sa->setAttributeVec2f( s, v ); - return 0; - } - return -1; + Py_RETURN_NONE; } -int StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ) { +PyObject * StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args ) { char *s; PyObject *obj = 0; if(!( PyArg_ParseTuple(args, "sO", &s, &obj) )) { cout << "ERROR: StrokeAttribute_setAttributeVec3f" << endl; - return -1; + Py_RETURN_NONE; } if( PyList_Check(obj) && PyList_Size(obj) > 2 ) { @@ -469,11 +455,9 @@ int StrokeAttribute_setAttributeVec3f( BPy_StrokeAttribute *self, PyObject *args PyFloat_AsDouble( PyList_GetItem(obj, 2) ) ); self->sa->setAttributeVec3f( s, v ); - return 0; - } - return -1; + Py_RETURN_NONE; } /////////////////////////////////////////////////////////////////////////////////////////// From 48732bf2ab5284316f01babb71aa3e2289f2c0dd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 22 Jul 2008 08:15:21 +0000 Subject: [PATCH 398/430] soc-2008-mxcurioni: filled and tested StrokeVertex class --- source/blender/freestyle/SConscript | 2 +- .../freestyle/intern/python/Convert.cpp | 7 + .../blender/freestyle/intern/python/Convert.h | 6 +- .../freestyle/intern/python/Interface0D.cpp | 5 + .../Interface0D/CurvePoint/StrokeVertex.cpp | 281 ++++++++++-------- .../Interface0D/CurvePoint/StrokeVertex.h | 2 +- 6 files changed, 179 insertions(+), 124 deletions(-) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 81749b60b2a..65cafb306e5 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -68,7 +68,7 @@ python_sources = [ prefix + '/IntegrationType.cpp', prefix + '/Interface0D.cpp', prefix + '/Interface0D/CurvePoint.cpp', - # prefix + '/Interface0D/CurvePoint/StrokeVertex.cpp', + prefix + '/Interface0D/CurvePoint/StrokeVertex.cpp', prefix + '/Interface0D/SVertex.cpp', prefix + '/Interface0D/ViewVertex.cpp', prefix + '/Interface1D.cpp', diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index 9cd2a098253..5183457a669 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -75,6 +75,13 @@ PyObject * BPy_Nature_from_Nature( unsigned short n ) { return py_n; } +PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ) { + PyObject *py_sa = StrokeAttribute_Type.tp_new( &StrokeAttribute_Type, 0, 0 ); + ((BPy_StrokeAttribute *) py_sa)->sa = new StrokeAttribute( sa ); + + return py_sa; +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index 2346d420813..43deae224e3 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -10,6 +10,7 @@ using namespace Geometry; #include "Interface0D/SVertex.h" #include "Interface1D/FEdge.h" #include "Nature.h" +#include "StrokeAttribute.h" #ifdef __cplusplus extern "C" { @@ -27,11 +28,12 @@ PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); -PyObject * BPy_Id_from_Id( Id& id ); -PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); +PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); +PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); +PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/Interface0D.cpp index 469e2bc4c79..4c3e0af0edb 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/Interface0D.cpp @@ -2,6 +2,7 @@ #include "Convert.h" #include "Interface0D/CurvePoint.h" +#include "Interface0D/CurvePoint/StrokeVertex.h" #include "Interface0D/SVertex.h" #include "Interface0D/ViewVertex.h" #include "Interface1D/FEdge.h" @@ -159,6 +160,10 @@ PyMODINIT_FUNC Interface0D_Init( PyObject *module ) Py_INCREF( &ViewVertex_Type ); PyModule_AddObject(module, "ViewVertex", (PyObject *)&ViewVertex_Type); + if( PyType_Ready( &StrokeVertex_Type ) < 0 ) + return; + Py_INCREF( &StrokeVertex_Type ); + PyModule_AddObject(module, "StrokeVertex", (PyObject *)&StrokeVertex_Type); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp index 69069a68f33..9d07125476e 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp @@ -1,6 +1,7 @@ #include "StrokeVertex.h" #include "../../Convert.h" +#include "../../StrokeAttribute.h" #ifdef __cplusplus extern "C" { @@ -11,10 +12,36 @@ extern "C" { /*--------------- Python API function prototypes for StrokeVertex instance -----------*/ static int StrokeVertex___init__(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds); +static PyObject * StrokeVertex_x( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_y( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_getPoint( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_attribute( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_curvilinearAbscissa( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_strokeLength( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_u( BPy_StrokeVertex *self ); +static PyObject * StrokeVertex_setX( BPy_StrokeVertex *self , PyObject *args); +static PyObject * StrokeVertex_setY( BPy_StrokeVertex *self , PyObject *args); +static PyObject * StrokeVertex_setPoint( BPy_StrokeVertex *self , PyObject *args); +static PyObject * StrokeVertex_setAttribute( BPy_StrokeVertex *self , PyObject *args); +static PyObject * StrokeVertex_setCurvilinearAbscissa( BPy_StrokeVertex *self , PyObject *args); +static PyObject * StrokeVertex_setStrokeLength( BPy_StrokeVertex *self , PyObject *args); /*----------------------StrokeVertex instance definitions ----------------------------*/ static PyMethodDef BPy_StrokeVertex_methods[] = { // {"__copy__", ( PyCFunction ) StrokeVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {"x", ( PyCFunction ) StrokeVertex_x, METH_NOARGS, "( )Returns the 2D point x coordinate"}, + {"y", ( PyCFunction ) StrokeVertex_y, METH_NOARGS, "( )Returns the 2D point y coordinate"}, + {"getPoint", ( PyCFunction ) StrokeVertex_getPoint, METH_NOARGS, "( )Returns the 2D point coordinates as a Vec2d"}, + {"attribute", ( PyCFunction ) StrokeVertex_attribute, METH_NOARGS, "( )Returns the StrokeAttribute of this StrokeVertex"}, + {"curvilinearAbscissa", ( PyCFunction ) StrokeVertex_curvilinearAbscissa, METH_NOARGS, "( )Returns the curvilinear abscissa "}, + {"strokeLength", ( PyCFunction ) StrokeVertex_strokeLength, METH_NOARGS, "( )Returns the length of the Stroke to which this StrokeVertex belongs"}, + {"u", ( PyCFunction ) StrokeVertex_u, METH_NOARGS, "( )Returns the curvilinear abscissa of this StrokeVertex in the Stroke"}, + {"setX", ( PyCFunction ) StrokeVertex_setX, METH_VARARGS, "(double r )Sets the 2D x value "}, + {"setY", ( PyCFunction ) StrokeVertex_setY, METH_VARARGS, "(double r )Sets the 2D y value "}, + {"setPoint", ( PyCFunction ) StrokeVertex_setPoint, METH_VARARGS, "(double x, double y) / ( [x,y] ) Sets the 2D x and y values"}, + {"setAttribute", ( PyCFunction ) StrokeVertex_setAttribute, METH_VARARGS, "(StrokeAttribute sa )Sets the attribute."}, + {"setCurvilinearAbscissa", ( PyCFunction ) StrokeVertex_setCurvilinearAbscissa, METH_VARARGS, "(double r )Sets the curvilinear abscissa of this StrokeVertex in the Stroke"}, + {"setStrokeLength", ( PyCFunction ) StrokeVertex_setStrokeLength, METH_VARARGS, "(double r )Sets the Stroke's length (it's only a value stored by the Stroke Vertex, it won't change the real Stroke's length.) "}, {NULL, NULL, 0, NULL} }; @@ -79,7 +106,7 @@ PyTypeObject StrokeVertex_Type = { BPy_StrokeVertex_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ - &Interface0D_Type, /* struct _typeobject *tp_base; */ + &CurvePoint_Type, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ @@ -117,138 +144,152 @@ int StrokeVertex___init__(BPy_StrokeVertex *self, PyObject *args, PyObject *kwds return -1; if( !obj1 && !obj2 && !obj3 ){ - self->cp = new CurvePoint(); - } else if( PyFloat_Check(obj3) ) { - if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { - self->cp = new CurvePoint( ((BPy_SVertex *) obj1)->sv, - ((BPy_SVertex *) obj2)->sv, + self->sv = new StrokeVertex(); + + } else if( BPy_CurvePoint_Check(obj1) && ((BPy_CurvePoint *) obj1)->cp ) { + self->sv = new StrokeVertex( ((BPy_CurvePoint *) obj1)->cp ); + + } else if( BPy_SVertex_Check(obj1) && ((BPy_SVertex *) obj1)->sv ) { + self->sv = new StrokeVertex( ((BPy_SVertex *) obj1)->sv ); + + } else if( BPy_StrokeVertex_Check(obj1) && BPy_StrokeVertex_Check(obj2) + && ((BPy_StrokeVertex *) obj1)->sv && ((BPy_StrokeVertex *) obj2)->sv) { + + self->sv = new StrokeVertex( ((BPy_StrokeVertex *) obj1)->sv, + ((BPy_StrokeVertex *) obj2)->sv, PyFloat_AsDouble( obj3 ) ); - } else if( BPy_CurvePoint_Check(obj1) && BPy_CurvePoint_Check(obj2) ) { - self->cp = new CurvePoint( ((BPy_CurvePoint *) obj1)->cp, - ((BPy_CurvePoint *) obj2)->cp, - PyFloat_AsDouble( obj3 ) ); - } else { - return -1; - } } else { return -1; } - self->py_if0D.if0D = self->cp; + self->py_cp.cp = self->sv; + self->py_cp.py_if0D.if0D = self->sv; return 0; } +PyObject * StrokeVertex_x( BPy_StrokeVertex *self ) { + return PyFloat_FromDouble( self->sv->x() ); +} +PyObject * StrokeVertex_y( BPy_StrokeVertex *self ) { + return PyFloat_FromDouble( self->sv->y() ); +} + +PyObject * StrokeVertex_getPoint( BPy_StrokeVertex *self ) { + Vec2f v( self->sv->getPoint() ); + return Vector_from_Vec2f( v ); +} + +PyObject * StrokeVertex_attribute( BPy_StrokeVertex *self ) { + StrokeAttribute sa( self->sv->attribute() ); + return BPy_StrokeAttribute_from_StrokeAttribute( sa ); +} + +PyObject * StrokeVertex_curvilinearAbscissa( BPy_StrokeVertex *self ) { + return PyFloat_FromDouble( self->sv->curvilinearAbscissa() ); +} + +PyObject * StrokeVertex_strokeLength( BPy_StrokeVertex *self ) { + return PyFloat_FromDouble( self->sv->strokeLength() ); +} + +PyObject * StrokeVertex_u( BPy_StrokeVertex *self ) { + return PyFloat_FromDouble( self->sv->u() ); +} + + +PyObject *StrokeVertex_setX( BPy_StrokeVertex *self , PyObject *args) { + double r; + + if(!( PyArg_ParseTuple(args, "d", &r) )) { + cout << "ERROR: StrokeVertex_setX" << endl; + Py_RETURN_NONE; + } + + self->sv->setX( r ); + + Py_RETURN_NONE; +} + +PyObject *StrokeVertex_setY( BPy_StrokeVertex *self , PyObject *args) { + double r; + + if(!( PyArg_ParseTuple(args, "d", &r) )) { + cout << "ERROR: StrokeVertex_setY" << endl; + Py_RETURN_NONE; + } + + self->sv->setY( r ); + + Py_RETURN_NONE; +} + + +PyObject *StrokeVertex_setPoint( BPy_StrokeVertex *self , PyObject *args) { + PyObject *obj1 = 0, *obj2 = 0; + + if(!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) )) { + cout << "ERROR: StrokeVertex_setPoint" << endl; + Py_RETURN_NONE; + } + + if( PyList_Check(obj1) && !obj2 ){ + Vec2f v( PyFloat_AsDouble( PyList_GetItem(obj1, 0) ), + PyFloat_AsDouble( PyList_GetItem(obj1, 1) ) ); + self->sv->setPoint( v ); + } else if( obj1 && obj2 ){ + self->sv->setPoint( PyFloat_AsDouble(obj1), PyFloat_AsDouble(obj2) ); + } + + Py_RETURN_NONE; +} + +PyObject *StrokeVertex_setAttribute( BPy_StrokeVertex *self , PyObject *args) { + PyObject *py_sa; + + if(!( PyArg_ParseTuple(args, "O", &py_sa) && BPy_StrokeAttribute_Check(py_sa) )) { + cout << "ERROR: StrokeVertex_setAttribute" << endl; + Py_RETURN_NONE; + } + + self->sv->setAttribute(*( ((BPy_StrokeAttribute *) py_sa)->sa )); + + Py_RETURN_NONE; +} + +PyObject *StrokeVertex_setCurvilinearAbscissa( BPy_StrokeVertex *self , PyObject *args) { + double r; + + if(!( PyArg_ParseTuple(args, "d", &r) )) { + cout << "ERROR: StrokeVertex_setCurvilinearAbscissa" << endl; + Py_RETURN_NONE; + } + + self->sv->setCurvilinearAbscissa( r ); + + Py_RETURN_NONE; +} + + +PyObject *StrokeVertex_setStrokeLength( BPy_StrokeVertex *self , PyObject *args) { + double r; + + if(!( PyArg_ParseTuple(args, "d", &r) )) { + cout << "ERROR: StrokeVertex_setStrokeLength" << endl; + Py_RETURN_NONE; + } + + self->sv->setStrokeLength( r ); + + Py_RETURN_NONE; +} + +// real operator[] (const int i) const +// real & operator[] (const int i) /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus } #endif - - -// PyObject *_wrap_StrokeVertex_getExactTypeName(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_0(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_1(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_2(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_3(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_4(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex__SWIG_5(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { -// } -// -// -// PyObject *_wrap_delete_StrokeVertex(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_x(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_y(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_getPoint(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_attribute__SWIG_0(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_attribute__SWIG_1(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_curvilinearAbscissa(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_strokeLength(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_u(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetX(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetY(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetPoint__SWIG_0(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetPoint__SWIG_1(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetPoint(PyObject *self, PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetAttribute(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { -// } -// -// -// PyObject *_wrap_StrokeVertex_SetStrokeLength(PyObject *self , PyObject *args) { -// } -// - diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h index dccecb093f5..4bc33ea4058 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h @@ -2,7 +2,7 @@ #define FREESTYLE_PYTHON_STROKEVERTEX_H #include "../CurvePoint.h" -#include "../../stroke/Stroke.h" +#include "../../../stroke/Stroke.h" #ifdef __cplusplus extern "C" { From 0c3f7c2b7e0c9d8ad5945029170fc8ed1f0c1eda Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 23 Jul 2008 05:54:34 +0000 Subject: [PATCH 399/430] soc-2008-mxcurioni: implemented (without testing) StrokeShader, Stroke and MediumType (used by Stroke to define medium types) classes. The Stroke class is missing the InsertVertex method. Before porting other classes, I'll resolve the List (Python) <=> Iterator (C++) correspondence problem by implementing a general class appropriately suited for the task. --- source/blender/freestyle/SConscript | 3 + .../freestyle/intern/python/Convert.cpp | 20 + .../blender/freestyle/intern/python/Convert.h | 4 + .../freestyle/intern/python/Freestyle.cpp | 2 + .../freestyle/intern/python/Interface1D.cpp | 14 + .../intern/python/Interface1D/Stroke.cpp | 518 ++++++++++-------- .../intern/python/Interface1D/Stroke.h | 31 ++ .../freestyle/intern/python/MediumType.cpp | 119 ++++ .../freestyle/intern/python/MediumType.h | 33 ++ .../freestyle/intern/python/StrokeShader.cpp | 164 +++++- .../freestyle/intern/python/StrokeShader.h | 41 ++ 11 files changed, 726 insertions(+), 223 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface1D/Stroke.h create mode 100644 source/blender/freestyle/intern/python/MediumType.cpp create mode 100644 source/blender/freestyle/intern/python/MediumType.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 65cafb306e5..12b649c362d 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -73,8 +73,11 @@ python_sources = [ prefix + '/Interface0D/ViewVertex.cpp', prefix + '/Interface1D.cpp', prefix + '/Interface1D/FEdge.cpp', + prefix + '/Interface1D/Stroke.cpp', prefix + '/Nature.cpp', + prefix + '/MediumType.cpp', prefix + '/StrokeAttribute.cpp', + prefix + '/StrokeShader.cpp', prefix + '/UnaryFunction0D.cpp', prefix + '/UnaryFunction1D.cpp', prefix + '/UnaryPredicate0D.cpp', diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/Convert.cpp index 5183457a669..410afe99d63 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/Convert.cpp @@ -82,6 +82,26 @@ PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ) { return py_sa; } +PyObject * BPy_MediumType_from_MediumType( unsigned short n ) { + PyObject *py_mt = MediumType_Type.tp_new( &MediumType_Type, 0, 0 ); + + PyObject *args = PyTuple_New(1); + PyTuple_SetItem( args, 0, PyInt_FromLong(n) ); + MediumType_Type.tp_init( py_mt, args, 0 ); + Py_DECREF(args); + + return py_mt; +} + +PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ) { + PyObject *py_sv = StrokeVertex_Type.tp_new( &StrokeVertex_Type, 0, 0 ); + ((BPy_StrokeVertex *) py_sv)->sv = new StrokeVertex( sv ); + ((BPy_StrokeVertex *) py_sv)->py_cp.cp = ((BPy_StrokeVertex *) py_sv)->sv; + ((BPy_StrokeVertex *) py_sv)->py_cp.py_if0D.if0D = ((BPy_StrokeVertex *) py_sv)->sv; + + return py_sv; +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/Convert.h index 43deae224e3..3caf8bf67f9 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/Convert.h @@ -7,9 +7,11 @@ using namespace Geometry; #include "Id.h" #include "IntegrationType.h" #include "Interface0D.h" +#include "Interface0D/CurvePoint/StrokeVertex.h" #include "Interface0D/SVertex.h" #include "Interface1D/FEdge.h" #include "Nature.h" +#include "MediumType.h" #include "StrokeAttribute.h" #ifdef __cplusplus @@ -32,7 +34,9 @@ PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); +PyObject * BPy_MediumType_from_MediumType( unsigned short n ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); +PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/Freestyle.cpp index a5aada0c470..2f93f1f8a74 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/Freestyle.cpp @@ -9,6 +9,7 @@ #include "Interface1D.h" #include "Nature.h" #include "StrokeAttribute.h" +#include "StrokeShader.h" #include "UnaryFunction0D.h" #include "UnaryFunction1D.h" #include "UnaryPredicate0D.h" @@ -136,6 +137,7 @@ PyObject *Freestyle_Init( void ) Interface1D_Init( module ); Nature_Init( module ); StrokeAttribute_Init( module ); + StrokeShader_Init( module ); UnaryFunction0D_Init( module ); UnaryFunction1D_Init( module ); UnaryPredicate0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/Interface1D.cpp index 30dd5b349bd..f1a14b5d62f 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/Interface1D.cpp @@ -2,6 +2,8 @@ #include "Convert.h" #include "Interface1D/FEdge.h" +#include "Interface1D/Stroke.h" +#include "MediumType.h" #ifdef __cplusplus extern "C" { @@ -124,6 +126,8 @@ PyTypeObject Interface1D_Type = { //-------------------MODULE INITIALIZATION-------------------------------- PyMODINIT_FUNC Interface1D_Init( PyObject *module ) { + PyObject *tmp; + if( module == NULL ) return; @@ -136,6 +140,16 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) return; Py_INCREF( &FEdge_Type ); PyModule_AddObject(module, "FEdge", (PyObject *)&FEdge_Type); + + if( PyType_Ready( &Stroke_Type ) < 0 ) + return; + Py_INCREF( &Stroke_Type ); + PyModule_AddObject(module, "Stroke", (PyObject *)&Stroke_Type); + + tmp = BPy_MediumType_from_MediumType( Stroke::DRY_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "DRY_MEDIUM", tmp); Py_DECREF(tmp); + tmp = BPy_MediumType_from_MediumType( Stroke::HUMID_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "HUMID_MEDIUM", tmp); Py_DECREF(tmp); + tmp = BPy_MediumType_from_MediumType( Stroke::OPAQUE_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "OPAQUE_MEDIUM", tmp); Py_DECREF(tmp); + } diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp index fe5feb7068b..9951f21a0e1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp @@ -1,236 +1,314 @@ -PyObject *Stroke_getExactTypeName(PyObject *self , PyObject *args) { +#include "Stroke.h" + +#include "../Convert.h" +#include "../Interface0D/SVertex.h" +#include "../../stroke/StrokeIterators.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Stroke instance -----------*/ +static int Stroke___init__(BPy_Stroke *self, PyObject *args, PyObject *kwds); + +static PyObject * Stroke_ComputeSampling( BPy_Stroke *self, PyObject *args ); +static PyObject * Stroke_Resample( BPy_Stroke *self, PyObject *args ); +//static PyObject * Stroke_InsertVertex( BPy_Stroke *self, PyObject *args ); +static PyObject * Stroke_RemoveVertex( BPy_Stroke *self, PyObject *args ); +static PyObject * Stroke_getMediumType( BPy_Stroke *self ); +static PyObject * Stroke_getTextureId( BPy_Stroke *self ); +static PyObject * Stroke_hasTips( BPy_Stroke *self ); +static PyObject * Stroke_setId( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_setLength( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_setMediumType( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_setTextureId( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_setTips( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ); +static PyObject * Stroke_getStrokeVertices( BPy_Stroke *self ); + +/*----------------------Stroke instance definitions ----------------------------*/ +static PyMethodDef BPy_Stroke_methods[] = { + {"ComputeSampling", ( PyCFunction ) Stroke_ComputeSampling, METH_VARARGS, "(int nVertices) Compute the sampling needed to get nVertices vertices. If the specified number of vertices is less than the actual number of vertices, the actual sampling value is returned."}, + {"Resample", ( PyCFunction ) Stroke_Resample, METH_VARARGS, "(float f | int n) Resampling method. If the argument is a float, Resamples the curve with a given sampling; if this sampling is < to the actual sampling value, no resampling is done. If the argument is an integer, Resamples the curve so that it eventually has n. That means it is going to add n-vertices_size, if vertices_size is the number of points we already have. Is vertices_size >= n, no resampling is done."}, + {"RemoveVertex", ( PyCFunction ) Stroke_RemoveVertex, METH_VARARGS, "(StrokeVertex sv) Removes the stroke vertex sv from the stroke. The length and curvilinear abscissa are updated consequently."}, + {"getMediumType", ( PyCFunction ) Stroke_getMediumType, METH_NOARGS, "() Returns the MediumType used for this Stroke."}, + {"getTextureId", ( PyCFunction ) Stroke_getTextureId, METH_NOARGS, "() Returns the id of the texture used to simulate th marks system for this Stroke."}, + {"hasTips", ( PyCFunction ) Stroke_hasTips, METH_NOARGS, "() Returns true if this Stroke uses a texture with tips, false otherwise."}, + {"setId", ( PyCFunction ) Stroke_setId, METH_VARARGS, "(Id id) Sets the Id of the Stroke."}, + {"setLength", ( PyCFunction ) Stroke_setLength, METH_VARARGS, "(float l) Sets the 2D length of the Stroke."}, + {"setMediumType", ( PyCFunction ) Stroke_setMediumType, METH_VARARGS, "(MediumType mt) Sets the medium type that must be used for this Stroke."}, + {"setTextureId", ( PyCFunction ) Stroke_setTextureId, METH_VARARGS, "(unsigned int id) Sets the texture id to be used to simulate the marks system for this Stroke."}, + {"setTips", ( PyCFunction ) Stroke_setTips, METH_VARARGS, "(bool b) Sets the flag telling whether this stroke is using a texture with tips or not."}, + {"strokeVerticesSize", ( PyCFunction ) Stroke_strokeVerticesSize, METH_NOARGS, "() Returns the number of StrokeVertex constituing the Stroke."}, + {"getStrokeVertices", ( PyCFunction ) Stroke_getStrokeVertices, METH_NOARGS, "() Returns the stroke vertices. The difference with vertices() is that here we can iterate over points of the 1D element at a any given sampling. Indeed, for each iteration, a virtual point is created."}, + //{"InsertVertex", ( PyCFunction ) Stroke_InsertVertex, METH_NOARGS, "(StrokeVertex sv, int i) Inserts the stroke vertex iVertex in the stroke before i. The length, curvilinear abscissa are updated consequently."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Stroke type definition ------------------------------*/ + +PyTypeObject Stroke_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Stroke", /* tp_name */ + sizeof( BPy_Stroke ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Stroke_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Stroke___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +// Stroke () +// template Stroke (InputVertexIterator iBegin, InputVertexIterator iEnd) + +int Stroke___init__(BPy_Stroke *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj1 = 0, *obj2 = 0; + + if (! PyArg_ParseTuple(args, "|OO", &obj1) ) + return -1; + + if( !obj1 && !obj2 ){ + self->s = new Stroke(); + + // template Stroke (InputVertexIterator iBegin, InputVertexIterator iEnd) + // + // pb: - need to be able to switch representation: InputVertexIterator <=> position + // - is it even used ? not even in SWIG version + } else { + return -1; + } + + self->py_if1D.if1D = self->s; + + return 0; +} + +PyObject * Stroke_ComputeSampling( BPy_Stroke *self, PyObject *args ) { + int i; + + if(!( PyArg_ParseTuple(args, "i", &i) )) { + cout << "ERROR: Stroke_ComputeSampling" << endl; + Py_RETURN_NONE; + } + + return PyFloat_FromDouble( self->s->ComputeSampling( i ) ); +} + +PyObject * Stroke_Resample( BPy_Stroke *self, PyObject *args ) { + PyObject *obj; + + if(!( PyArg_ParseTuple(args, "O", &obj) )) { + cout << "ERROR: Stroke_Resample" << endl; + Py_RETURN_NONE; + } + + if( PyInt_Check(obj) ) + self->s->Resample( (int) PyInt_AsLong(obj) ); + else if( PyFloat_Check(obj) ) + self->s->Resample( (float) PyFloat_AsDouble(obj) ); + + Py_RETURN_NONE; } -PyObject *Stroke_getId(PyObject *self , PyObject *args) { +PyObject * Stroke_RemoveVertex( BPy_Stroke *self, PyObject *args ) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) )) { + cout << "ERROR: Stroke_RemoveVertex" << endl; + Py_RETURN_NONE; + } + + if( BPy_StrokeVertex_Check(py_sv) && ((BPy_StrokeVertex *) py_sv)->sv ) + self->s->RemoveVertex( ((BPy_StrokeVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +// pb: 'iterator <=> list' correspondence +// void InsertVertex (StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next) + +PyObject * Stroke_getMediumType( BPy_Stroke *self ) { + return BPy_MediumType_from_MediumType( self->s->getMediumType() ); +} + +PyObject * Stroke_getTextureId( BPy_Stroke *self ) { + return PyInt_FromLong( self->s->getTextureId() ); +} + +PyObject * Stroke_hasTips( BPy_Stroke *self ) { + return PyBool_from_bool( self->s->hasTips() ); } - PyObject *_wrap_new_Stroke__SWIG_0(PyObject *self , PyObject *args) { +PyObject *Stroke_setId( BPy_Stroke *self , PyObject *args) { + PyObject *py_id; + + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: Stroke_setId" << endl; + Py_RETURN_NONE; + } + + if( ((BPy_Id *) py_id)->id ) + self->s->setId(*( ((BPy_Id *) py_id)->id )); + + Py_RETURN_NONE; +} + +PyObject *Stroke_setLength( BPy_Stroke *self , PyObject *args) { + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: Stroke_setLength" << endl; + Py_RETURN_NONE; + } + + self->s->setLength( f ); + + Py_RETURN_NONE; +} + +PyObject *Stroke_setMediumType( BPy_Stroke *self , PyObject *args) { + PyObject *py_mt; + + if(!( PyArg_ParseTuple(args, "O", &py_mt) && BPy_MediumType_Check(py_mt) )) { + cout << "ERROR: Stroke_setMediumType" << endl; + Py_RETURN_NONE; + } + + self->s->setMediumType( static_cast(PyInt_AsLong(py_mt)) ); + + Py_RETURN_NONE; +} + +PyObject *Stroke_setTextureId( BPy_Stroke *self , PyObject *args) { + unsigned int i; + + if(!( PyArg_ParseTuple(args, "I", &i) )) { + cout << "ERROR: Stroke_setTextureId" << endl; + Py_RETURN_NONE; + } + + self->s->setTextureId( i ); + + Py_RETURN_NONE; +} + +PyObject *Stroke_setTips( BPy_Stroke *self , PyObject *args) { + PyObject *py_b; + + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { + cout << "ERROR: Stroke_setTips" << endl; + Py_RETURN_NONE; + } + + self->s->setTips( py_b == Py_True ); + + Py_RETURN_NONE; } - PyObject *_wrap_new_Stroke__SWIG_1(PyObject *self , PyObject *args) { +PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ) { + return PyInt_FromLong( self->s->strokeVerticesSize() ); } - PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { +PyObject *Stroke_getStrokeVertices( BPy_Stroke *self ) { + PyObject *py_stroke_vertices = PyList_New(NULL); + + for( StrokeInternal::StrokeVertexIterator it = self->s->strokeVerticesBegin(); + it != self->s->strokeVerticesEnd(); + it++ ) { + PyList_Append( py_stroke_vertices, BPy_StrokeVertex_from_StrokeVertex( *it ) ); + } + + return py_stroke_vertices; } - PyObject *_wrap_delete_Stroke(PyObject *self , PyObject *args) { + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - -PyObject *Stroke_ComputeSampling(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_Resample__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_Resample__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_Resample(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_RemoveVertex(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_InsertVertex(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_Render(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_RenderBasic(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getLength2D(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getMediumType(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getTextureId(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_hasTips(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_vertices_size(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_viewedges_begin__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_viewedges_begin__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_viewedges_begin(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_viewedges_end__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_viewedges_end__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_viewedges_end(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_viewedges_size(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getBeginningOrientation(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getBeginningOrientationX(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getBeginningOrientationY(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getEndingOrientation(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getEndingOrientationX(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_getEndingOrientationY(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetId(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetLength(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetMediumType(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetTextureId(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetTips(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_push_back(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_push_front(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_AddViewEdge(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetBeginningOrientation__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetBeginningOrientation__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetBeginningOrientation(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_SetEndingOrientation__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetEndingOrientation__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_SetEndingOrientation(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_strokeVerticesBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_strokeVerticesBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_strokeVerticesBegin(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_strokeVerticesEnd(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_strokeVerticesSize(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_verticesBegin(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_verticesEnd(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_pointsBegin(PyObject *self, PyObject *args) { -} - - -PyObject *Stroke_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { -} - - -PyObject *Stroke_pointsEnd(PyObject *self, PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.h b/source/blender/freestyle/intern/python/Interface1D/Stroke.h new file mode 100644 index 00000000000..fc4b426fd53 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/Stroke.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_STROKE_H +#define FREESTYLE_PYTHON_STROKE_H + +#include "../Interface1D.h" +#include "../../stroke/Stroke.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Stroke_Type; + +#define BPy_Stroke_Check(v) (( (PyObject *) v)->ob_type == &Stroke_Type) + +/*---------------------------Python BPy_Stroke structure definition----------*/ +typedef struct { + BPy_Interface1D py_if1D; + Stroke *s; +} BPy_Stroke; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_STROKE_H */ diff --git a/source/blender/freestyle/intern/python/MediumType.cpp b/source/blender/freestyle/intern/python/MediumType.cpp new file mode 100644 index 00000000000..f0c5fcc58a4 --- /dev/null +++ b/source/blender/freestyle/intern/python/MediumType.cpp @@ -0,0 +1,119 @@ +#include "MediumType.h" + +#include "Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for MediumType instance -----------*/ +static int MediumType___init__(BPy_MediumType *self, PyObject *args, PyObject *kwds); + +/*----------------------MediumType instance definitions ----------------------------*/ +static PyMethodDef BPy_MediumType_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_MediumType type definition ------------------------------*/ + +PyTypeObject MediumType_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "MediumType", /* tp_name */ + sizeof( BPy_MediumType ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_MediumType_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &PyInt_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)MediumType___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +int MediumType___init__(BPy_MediumType *self, PyObject *args, PyObject *kwds) +{ + if (PyInt_Type.tp_init((PyObject *)self, args, kwds) < 0) + return -1; + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + diff --git a/source/blender/freestyle/intern/python/MediumType.h b/source/blender/freestyle/intern/python/MediumType.h new file mode 100644 index 00000000000..d56594e0f68 --- /dev/null +++ b/source/blender/freestyle/intern/python/MediumType.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_MEDIUMTYPE_H +#define FREESTYLE_PYTHON_MEDIUMTYPE_H + +#include "../stroke/Stroke.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject MediumType_Type; + +#define BPy_MediumType_Check(v) (( (PyObject *) v)->ob_type == &MediumType_Type) + +/*---------------------------Python BPy_MediumType structure definition----------*/ +typedef struct { + PyIntObject i; +} BPy_MediumType; + +/*---------------------------Python BPy_MediumType visible prototypes-----------*/ + +PyMODINIT_FUNC MediumType_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_MEDIUMTYPE_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader.cpp b/source/blender/freestyle/intern/python/StrokeShader.cpp index 268d1fabe36..029f8776c73 100644 --- a/source/blender/freestyle/intern/python/StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader.cpp @@ -1,12 +1,170 @@ - PyObject *_wrap_StrokeShader_getName(PyObject *self , PyObject *args) { +#include "StrokeShader.h" + +#include "Convert.h" +#include "Interface1D/Stroke.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for StrokeShader instance -----------*/ +static int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds); +static void StrokeShader___dealloc__(BPy_StrokeShader *self); +static PyObject * StrokeShader___repr__(BPy_StrokeShader *self); + +static PyObject * StrokeShader_getName( BPy_StrokeShader *self, PyObject *args); +static PyObject * StrokeShader_shade( BPy_StrokeShader *self , PyObject *args); + +/*----------------------StrokeShader instance definitions ----------------------------*/ +static PyMethodDef BPy_StrokeShader_methods[] = { + {"getName", ( PyCFunction ) StrokeShader_getName, METH_NOARGS, "( )Returns the string of the name of the binary predicate."}, + {"shade", ( PyCFunction ) StrokeShader_shade, METH_VARARGS, "(Stroke s )The shading method. This method must be overloaded by inherited classes. The shading method is designed to modify any Stroke's attribute such as Thickness, Color, Geometry, Texture, Blending mode... The basic way to achieve this operation consists in iterating over the StrokeVertices of the Stroke and to modify each one's StrokeAttribute."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_StrokeShader type definition ------------------------------*/ + +PyTypeObject StrokeShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "StrokeShader", /* tp_name */ + sizeof( BPy_StrokeShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)StrokeShader___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)StrokeShader___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_StrokeShader_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)StrokeShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC StrokeShader_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &StrokeShader_Type ) < 0 ) + return; + + Py_INCREF( &StrokeShader_Type ); + PyModule_AddObject(module, "StrokeShader", (PyObject *)&StrokeShader_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds) +{ + self->ss = new StrokeShader(); + return 0; +} + +void StrokeShader___dealloc__(BPy_StrokeShader* self) +{ + delete self->ss; + self->ob_type->tp_free((PyObject*)self); } - PyObject *_wrap_StrokeShader_shade(PyObject *self , PyObject *args) { +PyObject * StrokeShader___repr__(BPy_StrokeShader* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->ss->getName().c_str(), self->ss ); } - PyObject *_wrap_disown_StrokeShader(PyObject *self , PyObject *args) { +PyObject * StrokeShader_getName( BPy_StrokeShader *self, PyObject *args) +{ + return PyString_FromString( self->ss->getName().c_str() ); +} + +PyObject *StrokeShader_shade( BPy_StrokeShader *self , PyObject *args) { + PyObject *py_s = 0; + + if(!( PyArg_ParseTuple(args, "O", &py_s) && BPy_Stroke_Check(py_s) )) { + cout << "ERROR: StrokeShader_shade" << endl; + Py_RETURN_NONE; + } + + self->ss->shade(*( ((BPy_Stroke *) py_s)->s )); + + Py_RETURN_NONE; } + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader.h b/source/blender/freestyle/intern/python/StrokeShader.h new file mode 100644 index 00000000000..091eaa50383 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader.h @@ -0,0 +1,41 @@ +#ifndef FREESTYLE_PYTHON_STROKESHADER_H +#define FREESTYLE_PYTHON_STROKESHADER_H + + +#include "../system/FreestyleConfig.h" + +using namespace std; + +#include "../stroke/StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject StrokeShader_Type; + +#define BPy_StrokeShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeShader_Type) + +/*---------------------------Python BPy_StrokeShader structure definition----------*/ +typedef struct { + PyObject_HEAD + StrokeShader *ss; +} BPy_StrokeShader; + +/*---------------------------Python BPy_StrokeShader visible prototypes-----------*/ + +PyMODINIT_FUNC StrokeShader_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_STROKESHADER_H */ From a9789d90ae7c4408684490844ee9edf37ae84f65 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 23 Jul 2008 07:56:08 +0000 Subject: [PATCH 400/430] soc-2008-mxcurioni: renamed all Freestyle API related files with 'BPy_' prefix to avoid library name collision. Included MediumType's initialization at proper time to avoid Blender's crash. --- source/blender/freestyle/SConscript | 44 +++++++++---------- ...dicate0D.cpp => BPy_BinaryPredicate0D.cpp} | 6 +-- ...yPredicate0D.h => BPy_BinaryPredicate0D.h} | 0 ...dicate1D.cpp => BPy_BinaryPredicate1D.cpp} | 6 +-- ...yPredicate1D.h => BPy_BinaryPredicate1D.h} | 0 .../python/{Convert.cpp => BPy_Convert.cpp} | 4 +- .../python/{Convert.h => BPy_Convert.h} | 20 ++++----- ...terator.cpp => BPy_CurvePointIterator.cpp} | 0 ...{EdgeModifier.cpp => BPy_EdgeModifier.cpp} | 0 .../{Freestyle.cpp => BPy_Freestyle.cpp} | 38 +++++++++------- .../python/{Freestyle.h => BPy_Freestyle.h} | 0 .../intern/python/{Id.cpp => BPy_Id.cpp} | 4 +- .../intern/python/{Id.h => BPy_Id.h} | 0 ...rationType.cpp => BPy_IntegrationType.cpp} | 4 +- ...ntegrationType.h => BPy_IntegrationType.h} | 0 .../{Interface0D.cpp => BPy_Interface0D.cpp} | 16 +++---- .../{Interface0D.h => BPy_Interface0D.h} | 0 ...erator.cpp => BPy_Interface0DIterator.cpp} | 0 .../{Interface1D.cpp => BPy_Interface1D.cpp} | 10 ++--- .../{Interface1D.h => BPy_Interface1D.h} | 0 .../python/{Material.cpp => BPy_Material.cpp} | 0 .../{MediumType.cpp => BPy_MediumType.cpp} | 16 ++++++- .../python/{MediumType.h => BPy_MediumType.h} | 0 .../python/{Nature.cpp => BPy_Nature.cpp} | 4 +- .../intern/python/{Nature.h => BPy_Nature.h} | 0 .../python/{Noise.cpp => BPy_Noise.cpp} | 0 .../{Operators.cpp => BPy_Operators.cpp} | 0 .../python/{SShape.cpp => BPy_SShape.cpp} | 0 ...eAttribute.cpp => BPy_StrokeAttribute.cpp} | 4 +- ...trokeAttribute.h => BPy_StrokeAttribute.h} | 0 ...{StrokeShader.cpp => BPy_StrokeShader.cpp} | 6 +-- .../{StrokeShader.h => BPy_StrokeShader.h} | 0 ...rator.cpp => BPy_StrokeVertexIterator.cpp} | 0 ...Function0D.cpp => BPy_UnaryFunction0D.cpp} | 4 +- ...naryFunction0D.h => BPy_UnaryFunction0D.h} | 0 ...Function1D.cpp => BPy_UnaryFunction1D.cpp} | 4 +- ...naryFunction1D.h => BPy_UnaryFunction1D.h} | 0 ...edicate0D.cpp => BPy_UnaryPredicate0D.cpp} | 4 +- ...ryPredicate0D.h => BPy_UnaryPredicate0D.h} | 0 ...edicate1D.cpp => BPy_UnaryPredicate1D.cpp} | 4 +- ...ryPredicate1D.h => BPy_UnaryPredicate1D.h} | 0 ...pModifier.cpp => BPy_ViewEdgeIterator.cpp} | 0 .../python/{ViewMap.cpp => BPy_ViewMap.cpp} | 0 .../{ViewShape.cpp => BPy_ViewShape.cpp} | 0 ...n.cpp => BPy_orientedViewEdgeIterator.cpp} | 0 .../{FalseBP1D.cpp => BPy_FalseBP1D.cpp} | 0 ...{Length2DBP1D.cpp => BPy_Length2DBP1D.cpp} | 0 ...hapeIdBP1D.cpp => BPy_SameShapeIdBP1D.cpp} | 0 .../{TrueBP1D.cpp => BPy_TrueBP1D.cpp} | 0 ...1D.cpp => BPy_ViewMapGradientNormBP1D.cpp} | 0 .../BPy_TimestampModifier.cpp} | 0 .../{CurvePoint.cpp => BPy_CurvePoint.cpp} | 4 +- .../{CurvePoint.h => BPy_CurvePoint.h} | 2 +- .../{SVertex.cpp => BPy_SVertex.cpp} | 6 +-- .../Interface0D/{SVertex.h => BPy_SVertex.h} | 2 +- .../{ViewVertex.cpp => BPy_ViewVertex.cpp} | 4 +- .../{ViewVertex.h => BPy_ViewVertex.h} | 2 +- ...{StrokeVertex.cpp => BPy_StrokeVertex.cpp} | 6 +-- .../{StrokeVertex.h => BPy_StrokeVertex.h} | 2 +- .../{NonTVertex.cpp => BPy_NonTVertex.cpp} | 0 .../{TVertex.cpp => BPy_TVertex.cpp} | 0 .../Interface1D/{Curve.cpp => BPy_Curve.cpp} | 0 .../Interface1D/{FEdge.cpp => BPy_FEdge.cpp} | 6 +-- .../Interface1D/{FEdge.h => BPy_FEdge.h} | 2 +- .../{Stroke.cpp => BPy_Stroke.cpp} | 6 +-- .../Interface1D/{Stroke.h => BPy_Stroke.h} | 2 +- .../{ViewEdge.cpp => BPy_ViewEdge.cpp} | 0 .../Curve/BPy_Chain.cpp} | 0 .../{FEdgeSharp.cpp => BPy_FEdgeSharp.cpp} | 0 .../{FEdgeSmooth.cpp => BPy_FEdgeSmooth.cpp} | 0 ...er.cpp => BPy_BackboneStretcherShader.cpp} | 0 ...veShader.cpp => BPy_BezierCurveShader.cpp} | 0 ...cShader.cpp => BPy_CalligraphicShader.cpp} | 0 ...iseShader.cpp => BPy_ColorNoiseShader.cpp} | 0 ...pp => BPy_ColorVariationPatternShader.cpp} | 0 ...Shader.cpp => BPy_ConstantColorShader.cpp} | 0 ...er.cpp => BPy_ConstantThicknessShader.cpp} | 0 ..._ConstrainedIncreasingThicknessShader.cpp} | 0 ...sShader.cpp => BPy_GuidingLinesShader.cpp} | 0 ...ader.cpp => BPy_IncreasingColorShader.cpp} | 0 ....cpp => BPy_IncreasingThicknessShader.cpp} | 0 ...der.cpp => BPy_PolygonalizationShader.cpp} | 0 ...plingShader.cpp => BPy_SamplingShader.cpp} | 0 ...eShader.cpp => BPy_SpatialNoiseShader.cpp} | 0 ...Shader.cpp => BPy_StrokeTextureShader.cpp} | 0 ...ader.cpp => BPy_TextureAssignerShader.cpp} | 0 ...hader.cpp => BPy_ThicknessNoiseShader.cpp} | 0 ...> BPy_ThicknessVariationPatternShader.cpp} | 0 ...verShader.cpp => BPy_TipRemoverShader.cpp} | 0 ...streamShader.cpp => BPy_fstreamShader.cpp} | 0 ...{streamShader.cpp => BPy_streamShader.cpp} | 0 ...uble.cpp => BPy_UnaryFunction0DDouble.cpp} | 0 ...Float.cpp => BPy_UnaryFunction0DFloat.cpp} | 0 ...tion0DId.cpp => BPy_UnaryFunction0DId.cpp} | 0 ...ed.cpp => BPy_UnaryFunction0DUnsigned.cpp} | 0 ...Vec2f.cpp => BPy_UnaryFunction0DVec2f.cpp} | 0 ...Vec3f.cpp => BPy_UnaryFunction0DVec3f.cpp} | 0 ...=> BPy_UnaryFunction0DVectorViewShape.cpp} | 0 ...e.cpp => BPy_UnaryFunction0DViewShape.cpp} | 0 .../{ShapeIdF0D.cpp => BPy_ShapeIdF0D.cpp} | 0 .../{MaterialF0D.cpp => BPy_MaterialF0D.cpp} | 0 ...veNatureF0D.cpp => BPy_CurveNatureF0D.cpp} | 0 .../{Normal2DF0D.cpp => BPy_Normal2DF0D.cpp} | 0 ...F0D.cpp => BPy_VertexOrientation2DF0D.cpp} | 0 ...F0D.cpp => BPy_VertexOrientation3DF0D.cpp} | 0 ...OccludeeF0D.cpp => BPy_GetOccludeeF0D.cpp} | 0 .../{GetShapeF0D.cpp => BPy_GetShapeF0D.cpp} | 0 .../{DensityF0D.cpp => BPy_DensityF0D.cpp} | 0 ...thF0D.cpp => BPy_LocalAverageDepthF0D.cpp} | 0 ....cpp => BPy_GetCurvilinearAbscissaF0D.cpp} | 0 ...rameterF0D.cpp => BPy_GetParameterF0D.cpp} | 0 ....cpp => BPy_GetViewMapGradientNormF0D.cpp} | 0 ...pp => BPy_ReadCompleteViewMapPixelF0D.cpp} | 0 ...apPixelF0D.cpp => BPy_ReadMapPixelF0D.cpp} | 0 ...p => BPy_ReadSteerableViewMapPixelF0D.cpp} | 0 ...gleF0D.cpp => BPy_Curvature2DAngleF0D.cpp} | 0 ...ectedXF0D.cpp => BPy_GetProjectedXF0D.cpp} | 0 ...ectedYF0D.cpp => BPy_GetProjectedYF0D.cpp} | 0 ...ectedZF0D.cpp => BPy_GetProjectedZF0D.cpp} | 0 .../{GetXF0D.cpp => BPy_GetXF0D.cpp} | 0 .../{GetYF0D.cpp => BPy_GetYF0D.cpp} | 0 .../{GetZF0D.cpp => BPy_GetZF0D.cpp} | 0 ...nuityF0D.cpp => BPy_ZDiscontinuityF0D.cpp} | 0 ...pp => BPy_QuantitativeInvisibilityF0D.cpp} | 0 ...cludersF0D.cpp => BPy_GetOccludersF0D.cpp} | 0 ...uble.cpp => BPy_UnaryFunction1DDouble.cpp} | 0 ...Float.cpp => BPy_UnaryFunction1DFloat.cpp} | 0 ...ed.cpp => BPy_UnaryFunction1DUnsigned.cpp} | 0 ...Vec2f.cpp => BPy_UnaryFunction1DVec2f.cpp} | 0 ...Vec3f.cpp => BPy_UnaryFunction1DVec3f.cpp} | 0 ...=> BPy_UnaryFunction1DVectorViewShape.cpp} | 0 ...veNatureF1D.cpp => BPy_CurveNatureF1D.cpp} | 0 .../{Normal2DF1D.cpp => BPy_Normal2DF1D.cpp} | 0 ...tion2DF1D.cpp => BPy_Orientation2DF1D.cpp} | 0 ...tion3DF1D.cpp => BPy_Orientation3DF1D.cpp} | 0 .../{DensityF1D.cpp => BPy_DensityF1D.cpp} | 0 ...p => BPy_GetCompleteViewMapDensityF1D.cpp} | 0 ...> BPy_GetDirectionalViewMapDensityF1D.cpp} | 0 ...thF1D.cpp => BPy_LocalAverageDepthF1D.cpp} | 0 ...gleF1D.cpp => BPy_Curvature2DAngleF1D.cpp} | 0 ...ectedXF1D.cpp => BPy_GetProjectedXF1D.cpp} | 0 ...ectedYF1D.cpp => BPy_GetProjectedYF1D.cpp} | 0 ...ectedZF1D.cpp => BPy_GetProjectedZF1D.cpp} | 0 ... => BPy_GetSteerableViewMapDensityF1D.cpp} | 0 ....cpp => BPy_GetViewMapGradientNormF1D.cpp} | 0 .../{GetXF1D.cpp => BPy_GetXF1D.cpp} | 0 .../{GetYF1D.cpp => BPy_GetYF1D.cpp} | 0 .../{GetZF1D.cpp => BPy_GetZF1D.cpp} | 0 ...nuityF1D.cpp => BPy_ZDiscontinuityF1D.cpp} | 0 ...pp => BPy_QuantitativeInvisibilityF1D.cpp} | 0 ...OccludeeF1D.cpp => BPy_GetOccludeeF1D.cpp} | 0 ...cludersF1D.cpp => BPy_GetOccludersF1D.cpp} | 0 .../{GetShapeF1D.cpp => BPy_GetShapeF1D.cpp} | 0 ...mpF1D.cpp => BPy_ChainingTimeStampF1D.cpp} | 0 ... => BPy_IncrementChainingTimeStampF1D.cpp} | 0 ...{TimeStampF1D.cpp => BPy_TimeStampF1D.cpp} | 0 .../{FalseUP0D.cpp => BPy_FalseUP0D.cpp} | 0 .../{TrueUP0D.cpp => BPy_TrueUP0D.cpp} | 0 .../{ContourUP1D.cpp => BPy_ContourUP1D.cpp} | 0 ...nUP1D.cpp => BPy_DensityLowerThanUP1D.cpp} | 0 ...p => BPy_EqualToChainingTimeStampUP1D.cpp} | 0 ...pUP1D.cpp => BPy_EqualToTimeStampUP1D.cpp} | 0 ...urUP1D.cpp => BPy_ExternalContourUP1D.cpp} | 0 .../{FalseUP1D.cpp => BPy_FalseUP1D.cpp} | 0 ...p => BPy_QuantitativeInvisibilityUP1D.cpp} | 0 .../{ShapeUP1D.cpp => BPy_ShapeUP1D.cpp} | 0 .../{TrueUP1D.cpp => BPy_TrueUP1D.cpp} | 0 ...gIterator.cpp => BPy_ChainingIterator.cpp} | 0 ...tor.cpp => BPy_ChainPredicateIterator.cpp} | 0 ...or.cpp => BPy_ChainSilhouetteIterator.cpp} | 0 source/blender/python/api2_2x/Blender.c | 3 +- 171 files changed, 132 insertions(+), 113 deletions(-) rename source/blender/freestyle/intern/python/{BinaryPredicate0D.cpp => BPy_BinaryPredicate0D.cpp} (98%) rename source/blender/freestyle/intern/python/{BinaryPredicate0D.h => BPy_BinaryPredicate0D.h} (100%) rename source/blender/freestyle/intern/python/{BinaryPredicate1D.cpp => BPy_BinaryPredicate1D.cpp} (98%) rename source/blender/freestyle/intern/python/{BinaryPredicate1D.h => BPy_BinaryPredicate1D.h} (100%) rename source/blender/freestyle/intern/python/{Convert.cpp => BPy_Convert.cpp} (97%) rename source/blender/freestyle/intern/python/{Convert.h => BPy_Convert.h} (75%) rename source/blender/freestyle/intern/python/{CurvePointIterator.cpp => BPy_CurvePointIterator.cpp} (100%) rename source/blender/freestyle/intern/python/{EdgeModifier.cpp => BPy_EdgeModifier.cpp} (100%) rename source/blender/freestyle/intern/python/{Freestyle.cpp => BPy_Freestyle.cpp} (89%) rename source/blender/freestyle/intern/python/{Freestyle.h => BPy_Freestyle.h} (100%) rename source/blender/freestyle/intern/python/{Id.cpp => BPy_Id.cpp} (99%) rename source/blender/freestyle/intern/python/{Id.h => BPy_Id.h} (100%) rename source/blender/freestyle/intern/python/{IntegrationType.cpp => BPy_IntegrationType.cpp} (98%) rename source/blender/freestyle/intern/python/{IntegrationType.h => BPy_IntegrationType.h} (100%) rename source/blender/freestyle/intern/python/{Interface0D.cpp => BPy_Interface0D.cpp} (97%) rename source/blender/freestyle/intern/python/{Interface0D.h => BPy_Interface0D.h} (100%) rename source/blender/freestyle/intern/python/{Interface0DIterator.cpp => BPy_Interface0DIterator.cpp} (100%) rename source/blender/freestyle/intern/python/{Interface1D.cpp => BPy_Interface1D.cpp} (98%) rename source/blender/freestyle/intern/python/{Interface1D.h => BPy_Interface1D.h} (100%) rename source/blender/freestyle/intern/python/{Material.cpp => BPy_Material.cpp} (100%) rename source/blender/freestyle/intern/python/{MediumType.cpp => BPy_MediumType.cpp} (93%) rename source/blender/freestyle/intern/python/{MediumType.h => BPy_MediumType.h} (100%) rename source/blender/freestyle/intern/python/{Nature.cpp => BPy_Nature.cpp} (99%) rename source/blender/freestyle/intern/python/{Nature.h => BPy_Nature.h} (100%) rename source/blender/freestyle/intern/python/{Noise.cpp => BPy_Noise.cpp} (100%) rename source/blender/freestyle/intern/python/{Operators.cpp => BPy_Operators.cpp} (100%) rename source/blender/freestyle/intern/python/{SShape.cpp => BPy_SShape.cpp} (100%) rename source/blender/freestyle/intern/python/{StrokeAttribute.cpp => BPy_StrokeAttribute.cpp} (99%) rename source/blender/freestyle/intern/python/{StrokeAttribute.h => BPy_StrokeAttribute.h} (100%) rename source/blender/freestyle/intern/python/{StrokeShader.cpp => BPy_StrokeShader.cpp} (98%) rename source/blender/freestyle/intern/python/{StrokeShader.h => BPy_StrokeShader.h} (100%) rename source/blender/freestyle/intern/python/{StrokeVertexIterator.cpp => BPy_StrokeVertexIterator.cpp} (100%) rename source/blender/freestyle/intern/python/{UnaryFunction0D.cpp => BPy_UnaryFunction0D.cpp} (99%) rename source/blender/freestyle/intern/python/{UnaryFunction0D.h => BPy_UnaryFunction0D.h} (100%) rename source/blender/freestyle/intern/python/{UnaryFunction1D.cpp => BPy_UnaryFunction1D.cpp} (99%) rename source/blender/freestyle/intern/python/{UnaryFunction1D.h => BPy_UnaryFunction1D.h} (100%) rename source/blender/freestyle/intern/python/{UnaryPredicate0D.cpp => BPy_UnaryPredicate0D.cpp} (98%) rename source/blender/freestyle/intern/python/{UnaryPredicate0D.h => BPy_UnaryPredicate0D.h} (100%) rename source/blender/freestyle/intern/python/{UnaryPredicate1D.cpp => BPy_UnaryPredicate1D.cpp} (98%) rename source/blender/freestyle/intern/python/{UnaryPredicate1D.h => BPy_UnaryPredicate1D.h} (100%) rename source/blender/freestyle/intern/python/{EdgeModifier/TimestampModifier.cpp => BPy_ViewEdgeIterator.cpp} (100%) rename source/blender/freestyle/intern/python/{ViewMap.cpp => BPy_ViewMap.cpp} (100%) rename source/blender/freestyle/intern/python/{ViewShape.cpp => BPy_ViewShape.cpp} (100%) rename source/blender/freestyle/intern/python/{Interface1D/Curve/Chain.cpp => BPy_orientedViewEdgeIterator.cpp} (100%) rename source/blender/freestyle/intern/python/BinaryPredicate1D/{FalseBP1D.cpp => BPy_FalseBP1D.cpp} (100%) rename source/blender/freestyle/intern/python/BinaryPredicate1D/{Length2DBP1D.cpp => BPy_Length2DBP1D.cpp} (100%) rename source/blender/freestyle/intern/python/BinaryPredicate1D/{SameShapeIdBP1D.cpp => BPy_SameShapeIdBP1D.cpp} (100%) rename source/blender/freestyle/intern/python/BinaryPredicate1D/{TrueBP1D.cpp => BPy_TrueBP1D.cpp} (100%) rename source/blender/freestyle/intern/python/BinaryPredicate1D/{ViewMapGradientNormBP1D.cpp => BPy_ViewMapGradientNormBP1D.cpp} (100%) rename source/blender/freestyle/intern/python/{ViewEdgeIterator.cpp => EdgeModifier/BPy_TimestampModifier.cpp} (100%) rename source/blender/freestyle/intern/python/Interface0D/{CurvePoint.cpp => BPy_CurvePoint.cpp} (99%) rename source/blender/freestyle/intern/python/Interface0D/{CurvePoint.h => BPy_CurvePoint.h} (95%) rename source/blender/freestyle/intern/python/Interface0D/{SVertex.cpp => BPy_SVertex.cpp} (99%) rename source/blender/freestyle/intern/python/Interface0D/{SVertex.h => BPy_SVertex.h} (95%) rename source/blender/freestyle/intern/python/Interface0D/{ViewVertex.cpp => BPy_ViewVertex.cpp} (98%) rename source/blender/freestyle/intern/python/Interface0D/{ViewVertex.h => BPy_ViewVertex.h} (95%) rename source/blender/freestyle/intern/python/Interface0D/CurvePoint/{StrokeVertex.cpp => BPy_StrokeVertex.cpp} (99%) rename source/blender/freestyle/intern/python/Interface0D/CurvePoint/{StrokeVertex.h => BPy_StrokeVertex.h} (95%) rename source/blender/freestyle/intern/python/Interface0D/ViewVertex/{NonTVertex.cpp => BPy_NonTVertex.cpp} (100%) rename source/blender/freestyle/intern/python/Interface0D/ViewVertex/{TVertex.cpp => BPy_TVertex.cpp} (100%) rename source/blender/freestyle/intern/python/Interface1D/{Curve.cpp => BPy_Curve.cpp} (100%) rename source/blender/freestyle/intern/python/Interface1D/{FEdge.cpp => BPy_FEdge.cpp} (99%) rename source/blender/freestyle/intern/python/Interface1D/{FEdge.h => BPy_FEdge.h} (95%) rename source/blender/freestyle/intern/python/Interface1D/{Stroke.cpp => BPy_Stroke.cpp} (99%) rename source/blender/freestyle/intern/python/Interface1D/{Stroke.h => BPy_Stroke.h} (95%) rename source/blender/freestyle/intern/python/Interface1D/{ViewEdge.cpp => BPy_ViewEdge.cpp} (100%) rename source/blender/freestyle/intern/python/{orientedViewEdgeIterator.cpp => Interface1D/Curve/BPy_Chain.cpp} (100%) rename source/blender/freestyle/intern/python/Interface1D/FEdge/{FEdgeSharp.cpp => BPy_FEdgeSharp.cpp} (100%) rename source/blender/freestyle/intern/python/Interface1D/FEdge/{FEdgeSmooth.cpp => BPy_FEdgeSmooth.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{BackboneStretcherShader.cpp => BPy_BackboneStretcherShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{BezierCurveShader.cpp => BPy_BezierCurveShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{CalligraphicShader.cpp => BPy_CalligraphicShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ColorNoiseShader.cpp => BPy_ColorNoiseShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ColorVariationPatternShader.cpp => BPy_ColorVariationPatternShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ConstantColorShader.cpp => BPy_ConstantColorShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ConstantThicknessShader.cpp => BPy_ConstantThicknessShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ConstrainedIncreasingThicknessShader.cpp => BPy_ConstrainedIncreasingThicknessShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{GuidingLinesShader.cpp => BPy_GuidingLinesShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{IncreasingColorShader.cpp => BPy_IncreasingColorShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{IncreasingThicknessShader.cpp => BPy_IncreasingThicknessShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{PolygonalizationShader.cpp => BPy_PolygonalizationShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{SamplingShader.cpp => BPy_SamplingShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{SpatialNoiseShader.cpp => BPy_SpatialNoiseShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{StrokeTextureShader.cpp => BPy_StrokeTextureShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{TextureAssignerShader.cpp => BPy_TextureAssignerShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ThicknessNoiseShader.cpp => BPy_ThicknessNoiseShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{ThicknessVariationPatternShader.cpp => BPy_ThicknessVariationPatternShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{TipRemoverShader.cpp => BPy_TipRemoverShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{fstreamShader.cpp => BPy_fstreamShader.cpp} (100%) rename source/blender/freestyle/intern/python/StrokeShader/{streamShader.cpp => BPy_streamShader.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DDouble.cpp => BPy_UnaryFunction0DDouble.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DFloat.cpp => BPy_UnaryFunction0DFloat.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DId.cpp => BPy_UnaryFunction0DId.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DUnsigned.cpp => BPy_UnaryFunction0DUnsigned.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DVec2f.cpp => BPy_UnaryFunction0DVec2f.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DVec3f.cpp => BPy_UnaryFunction0DVec3f.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DVectorViewShape.cpp => BPy_UnaryFunction0DVectorViewShape.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/{UnaryFunction0DViewShape.cpp => BPy_UnaryFunction0DViewShape.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/{ShapeIdF0D.cpp => BPy_ShapeIdF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/{MaterialF0D.cpp => BPy_MaterialF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/{CurveNatureF0D.cpp => BPy_CurveNatureF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/{Normal2DF0D.cpp => BPy_Normal2DF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/{VertexOrientation2DF0D.cpp => BPy_VertexOrientation2DF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/{VertexOrientation3DF0D.cpp => BPy_VertexOrientation3DF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/{GetOccludeeF0D.cpp => BPy_GetOccludeeF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/{GetShapeF0D.cpp => BPy_GetShapeF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/{DensityF0D.cpp => BPy_DensityF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/{LocalAverageDepthF0D.cpp => BPy_LocalAverageDepthF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{GetCurvilinearAbscissaF0D.cpp => BPy_GetCurvilinearAbscissaF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{GetParameterF0D.cpp => BPy_GetParameterF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{GetViewMapGradientNormF0D.cpp => BPy_GetViewMapGradientNormF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{ReadCompleteViewMapPixelF0D.cpp => BPy_ReadCompleteViewMapPixelF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{ReadMapPixelF0D.cpp => BPy_ReadMapPixelF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/{ReadSteerableViewMapPixelF0D.cpp => BPy_ReadSteerableViewMapPixelF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{Curvature2DAngleF0D.cpp => BPy_Curvature2DAngleF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetProjectedXF0D.cpp => BPy_GetProjectedXF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetProjectedYF0D.cpp => BPy_GetProjectedYF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetProjectedZF0D.cpp => BPy_GetProjectedZF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetXF0D.cpp => BPy_GetXF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetYF0D.cpp => BPy_GetYF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{GetZF0D.cpp => BPy_GetZF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/{ZDiscontinuityF0D.cpp => BPy_ZDiscontinuityF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/{QuantitativeInvisibilityF0D.cpp => BPy_QuantitativeInvisibilityF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/{GetOccludersF0D.cpp => BPy_GetOccludersF0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DDouble.cpp => BPy_UnaryFunction1DDouble.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DFloat.cpp => BPy_UnaryFunction1DFloat.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DUnsigned.cpp => BPy_UnaryFunction1DUnsigned.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DVec2f.cpp => BPy_UnaryFunction1DVec2f.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DVec3f.cpp => BPy_UnaryFunction1DVec3f.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/{UnaryFunction1DVectorViewShape.cpp => BPy_UnaryFunction1DVectorViewShape.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/{CurveNatureF1D.cpp => BPy_CurveNatureF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/{Normal2DF1D.cpp => BPy_Normal2DF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/{Orientation2DF1D.cpp => BPy_Orientation2DF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/{Orientation3DF1D.cpp => BPy_Orientation3DF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/{DensityF1D.cpp => BPy_DensityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/{GetCompleteViewMapDensityF1D.cpp => BPy_GetCompleteViewMapDensityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/{GetDirectionalViewMapDensityF1D.cpp => BPy_GetDirectionalViewMapDensityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/{LocalAverageDepthF1D.cpp => BPy_LocalAverageDepthF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{Curvature2DAngleF1D.cpp => BPy_Curvature2DAngleF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetProjectedXF1D.cpp => BPy_GetProjectedXF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetProjectedYF1D.cpp => BPy_GetProjectedYF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetProjectedZF1D.cpp => BPy_GetProjectedZF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetSteerableViewMapDensityF1D.cpp => BPy_GetSteerableViewMapDensityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetViewMapGradientNormF1D.cpp => BPy_GetViewMapGradientNormF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetXF1D.cpp => BPy_GetXF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetYF1D.cpp => BPy_GetYF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{GetZF1D.cpp => BPy_GetZF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/{ZDiscontinuityF1D.cpp => BPy_ZDiscontinuityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/{QuantitativeInvisibilityF1D.cpp => BPy_QuantitativeInvisibilityF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/{GetOccludeeF1D.cpp => BPy_GetOccludeeF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/{GetOccludersF1D.cpp => BPy_GetOccludersF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/{GetShapeF1D.cpp => BPy_GetShapeF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/{ChainingTimeStampF1D.cpp => BPy_ChainingTimeStampF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/{IncrementChainingTimeStampF1D.cpp => BPy_IncrementChainingTimeStampF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/{TimeStampF1D.cpp => BPy_TimeStampF1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate0D/{FalseUP0D.cpp => BPy_FalseUP0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate0D/{TrueUP0D.cpp => BPy_TrueUP0D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{ContourUP1D.cpp => BPy_ContourUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{DensityLowerThanUP1D.cpp => BPy_DensityLowerThanUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{EqualToChainingTimeStampUP1D.cpp => BPy_EqualToChainingTimeStampUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{EqualToTimeStampUP1D.cpp => BPy_EqualToTimeStampUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{ExternalContourUP1D.cpp => BPy_ExternalContourUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{FalseUP1D.cpp => BPy_FalseUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{QuantitativeInvisibilityUP1D.cpp => BPy_QuantitativeInvisibilityUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{ShapeUP1D.cpp => BPy_ShapeUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/UnaryPredicate1D/{TrueUP1D.cpp => BPy_TrueUP1D.cpp} (100%) rename source/blender/freestyle/intern/python/ViewEdgeIterator/{ChainingIterator.cpp => BPy_ChainingIterator.cpp} (100%) rename source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/{ChainPredicateIterator.cpp => BPy_ChainPredicateIterator.cpp} (100%) rename source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/{ChainSilhouetteIterator.cpp => BPy_ChainSilhouetteIterator.cpp} (100%) diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 12b649c362d..94e8b7163fb 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -60,28 +60,28 @@ app_sources = env.Glob(prefix + '/*.cpp') prefix = 'intern/python' # python_sources = env.Glob(prefix + '/*.cpp') python_sources = [ - prefix + '/Freestyle.cpp', - prefix + '/Convert.cpp', - prefix + '/BinaryPredicate0D.cpp', - prefix + '/BinaryPredicate1D.cpp', - prefix + '/Id.cpp', - prefix + '/IntegrationType.cpp', - prefix + '/Interface0D.cpp', - prefix + '/Interface0D/CurvePoint.cpp', - prefix + '/Interface0D/CurvePoint/StrokeVertex.cpp', - prefix + '/Interface0D/SVertex.cpp', - prefix + '/Interface0D/ViewVertex.cpp', - prefix + '/Interface1D.cpp', - prefix + '/Interface1D/FEdge.cpp', - prefix + '/Interface1D/Stroke.cpp', - prefix + '/Nature.cpp', - prefix + '/MediumType.cpp', - prefix + '/StrokeAttribute.cpp', - prefix + '/StrokeShader.cpp', - prefix + '/UnaryFunction0D.cpp', - prefix + '/UnaryFunction1D.cpp', - prefix + '/UnaryPredicate0D.cpp', - prefix + '/UnaryPredicate1D.cpp', + prefix + '/BPy_Freestyle.cpp', + prefix + '/BPy_Convert.cpp', + prefix + '/BPy_BinaryPredicate0D.cpp', + prefix + '/BPy_BinaryPredicate1D.cpp', + prefix + '/BPy_Id.cpp', + prefix + '/BPy_IntegrationType.cpp', + prefix + '/BPy_Interface0D.cpp', + prefix + '/Interface0D/BPy_CurvePoint.cpp', + prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp', + prefix + '/Interface0D/BPy_SVertex.cpp', + prefix + '/Interface0D/BPy_ViewVertex.cpp', + prefix + '/BPy_Interface1D.cpp', + prefix + '/Interface1D/BPy_FEdge.cpp', + prefix + '/Interface1D/BPy_Stroke.cpp', + prefix + '/BPy_MediumType.cpp', + prefix + '/BPy_Nature.cpp', + prefix + '/BPy_StrokeAttribute.cpp', + prefix + '/BPy_StrokeShader.cpp', + prefix + '/BPy_UnaryFunction0D.cpp', + prefix + '/BPy_UnaryFunction1D.cpp', + prefix + '/BPy_UnaryPredicate0D.cpp', + prefix + '/BPy_UnaryPredicate1D.cpp', ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp similarity index 98% rename from source/blender/freestyle/intern/python/BinaryPredicate0D.cpp rename to source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 67358c65bbf..9c3247b30b8 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -1,7 +1,7 @@ -#include "BinaryPredicate0D.h" +#include "BPy_BinaryPredicate0D.h" -#include "Convert.h" -#include "Interface0D.h" +#include "BPy_Convert.h" +#include "BPy_Interface0D.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate0D.h rename to source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp similarity index 98% rename from source/blender/freestyle/intern/python/BinaryPredicate1D.cpp rename to source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index bf2772ecdcc..9dd2bd19204 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -1,7 +1,7 @@ -#include "BinaryPredicate1D.h" +#include "BPy_BinaryPredicate1D.h" -#include "Convert.h" -#include "Interface1D.h" +#include "BPy_Convert.h" +#include "BPy_Interface1D.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D.h rename to source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h diff --git a/source/blender/freestyle/intern/python/Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp similarity index 97% rename from source/blender/freestyle/intern/python/Convert.cpp rename to source/blender/freestyle/intern/python/BPy_Convert.cpp index 410afe99d63..843bdc7c7d1 100644 --- a/source/blender/freestyle/intern/python/Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -1,4 +1,4 @@ -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { @@ -82,7 +82,7 @@ PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ) { return py_sa; } -PyObject * BPy_MediumType_from_MediumType( unsigned short n ) { +PyObject * BPy_MediumType_from_MediumType( int n ) { PyObject *py_mt = MediumType_Type.tp_new( &MediumType_Type, 0, 0 ); PyObject *args = PyTuple_New(1); diff --git a/source/blender/freestyle/intern/python/Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h similarity index 75% rename from source/blender/freestyle/intern/python/Convert.h rename to source/blender/freestyle/intern/python/BPy_Convert.h index 3caf8bf67f9..8e935f6e229 100644 --- a/source/blender/freestyle/intern/python/Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -4,15 +4,15 @@ #include "../geometry/Geom.h" using namespace Geometry; -#include "Id.h" -#include "IntegrationType.h" -#include "Interface0D.h" -#include "Interface0D/CurvePoint/StrokeVertex.h" -#include "Interface0D/SVertex.h" -#include "Interface1D/FEdge.h" -#include "Nature.h" -#include "MediumType.h" -#include "StrokeAttribute.h" +#include "BPy_Id.h" +#include "BPy_IntegrationType.h" +#include "BPy_Interface0D.h" +#include "Interface0D/CurvePoint/BPy_StrokeVertex.h" +#include "Interface0D/BPy_SVertex.h" +#include "Interface1D/BPy_FEdge.h" +#include "BPy_Nature.h" +#include "BPy_MediumType.h" +#include "BPy_StrokeAttribute.h" #ifdef __cplusplus extern "C" { @@ -34,7 +34,7 @@ PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); -PyObject * BPy_MediumType_from_MediumType( unsigned short n ); +PyObject * BPy_MediumType_from_MediumType( int n ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); diff --git a/source/blender/freestyle/intern/python/CurvePointIterator.cpp b/source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/CurvePointIterator.cpp rename to source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp diff --git a/source/blender/freestyle/intern/python/EdgeModifier.cpp b/source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp similarity index 100% rename from source/blender/freestyle/intern/python/EdgeModifier.cpp rename to source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp diff --git a/source/blender/freestyle/intern/python/Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp similarity index 89% rename from source/blender/freestyle/intern/python/Freestyle.cpp rename to source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 2f93f1f8a74..bbb4acf4f85 100644 --- a/source/blender/freestyle/intern/python/Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -1,19 +1,20 @@ -#include "Freestyle.h" +#include "BPy_Freestyle.h" -#include "BinaryPredicate0D.h" -#include "BinaryPredicate1D.h" -#include "Id.h" -#include "IntegrationType.h" -#include "Interface0D.h" -#include "Interface0D/CurvePoint.h" -#include "Interface1D.h" -#include "Nature.h" -#include "StrokeAttribute.h" -#include "StrokeShader.h" -#include "UnaryFunction0D.h" -#include "UnaryFunction1D.h" -#include "UnaryPredicate0D.h" -#include "UnaryPredicate1D.h" +#include "BPy_BinaryPredicate0D.h" +#include "BPy_BinaryPredicate1D.h" +#include "BPy_Id.h" +#include "BPy_IntegrationType.h" +#include "BPy_Interface0D.h" +#include "Interface0D/BPy_CurvePoint.h" +#include "BPy_Interface1D.h" +#include "BPy_MediumType.h" +#include "BPy_Nature.h" +#include "BPy_StrokeAttribute.h" +#include "BPy_StrokeShader.h" +#include "BPy_UnaryFunction0D.h" +#include "BPy_UnaryFunction1D.h" +#include "BPy_UnaryPredicate0D.h" +#include "BPy_UnaryPredicate1D.h" #ifdef __cplusplus extern "C" { @@ -128,14 +129,19 @@ PyObject *Freestyle_Init( void ) // initialize modules module = Py_InitModule3( "Blender.Freestyle", M_Freestyle_methods, M_Freestyle_doc ); + // attach its classes (adding the object types to the module) + + // those classes have to be initialized before the others + MediumType_Init( module ); + Nature_Init( module ); + BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); Id_Init( module ); IntegrationType_Init( module ); Interface0D_Init( module ); Interface1D_Init( module ); - Nature_Init( module ); StrokeAttribute_Init( module ); StrokeShader_Init( module ); UnaryFunction0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/Freestyle.h b/source/blender/freestyle/intern/python/BPy_Freestyle.h similarity index 100% rename from source/blender/freestyle/intern/python/Freestyle.h rename to source/blender/freestyle/intern/python/BPy_Freestyle.h diff --git a/source/blender/freestyle/intern/python/Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Id.cpp rename to source/blender/freestyle/intern/python/BPy_Id.cpp index 4f2964d8060..7d8ea07d563 100644 --- a/source/blender/freestyle/intern/python/Id.cpp +++ b/source/blender/freestyle/intern/python/BPy_Id.cpp @@ -1,6 +1,6 @@ -#include "Id.h" +#include "BPy_Id.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Id.h b/source/blender/freestyle/intern/python/BPy_Id.h similarity index 100% rename from source/blender/freestyle/intern/python/Id.h rename to source/blender/freestyle/intern/python/BPy_Id.h diff --git a/source/blender/freestyle/intern/python/IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp similarity index 98% rename from source/blender/freestyle/intern/python/IntegrationType.cpp rename to source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index ff6bd3d4794..9c21557da3d 100644 --- a/source/blender/freestyle/intern/python/IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -1,6 +1,6 @@ -#include "IntegrationType.h" +#include "BPy_IntegrationType.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/IntegrationType.h b/source/blender/freestyle/intern/python/BPy_IntegrationType.h similarity index 100% rename from source/blender/freestyle/intern/python/IntegrationType.h rename to source/blender/freestyle/intern/python/BPy_IntegrationType.h diff --git a/source/blender/freestyle/intern/python/Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp similarity index 97% rename from source/blender/freestyle/intern/python/Interface0D.cpp rename to source/blender/freestyle/intern/python/BPy_Interface0D.cpp index 4c3e0af0edb..defe76464eb 100644 --- a/source/blender/freestyle/intern/python/Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -1,12 +1,12 @@ -#include "Interface0D.h" +#include "BPy_Interface0D.h" -#include "Convert.h" -#include "Interface0D/CurvePoint.h" -#include "Interface0D/CurvePoint/StrokeVertex.h" -#include "Interface0D/SVertex.h" -#include "Interface0D/ViewVertex.h" -#include "Interface1D/FEdge.h" -#include "Nature.h" +#include "BPy_Convert.h" +#include "Interface0D/BPy_CurvePoint.h" +#include "Interface0D/CurvePoint/BPy_StrokeVertex.h" +#include "Interface0D/BPy_SVertex.h" +#include "Interface0D/BPy_ViewVertex.h" +#include "Interface1D/BPy_FEdge.h" +#include "BPy_Nature.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D.h b/source/blender/freestyle/intern/python/BPy_Interface0D.h similarity index 100% rename from source/blender/freestyle/intern/python/Interface0D.h rename to source/blender/freestyle/intern/python/BPy_Interface0D.h diff --git a/source/blender/freestyle/intern/python/Interface0DIterator.cpp b/source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface0DIterator.cpp rename to source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp similarity index 98% rename from source/blender/freestyle/intern/python/Interface1D.cpp rename to source/blender/freestyle/intern/python/BPy_Interface1D.cpp index f1a14b5d62f..113fc3f1cf7 100644 --- a/source/blender/freestyle/intern/python/Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -1,9 +1,9 @@ -#include "Interface1D.h" +#include "BPy_Interface1D.h" -#include "Convert.h" -#include "Interface1D/FEdge.h" -#include "Interface1D/Stroke.h" -#include "MediumType.h" +#include "BPy_Convert.h" +#include "Interface1D/BPy_FEdge.h" +#include "Interface1D/BPy_Stroke.h" +#include "BPy_MediumType.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface1D.h b/source/blender/freestyle/intern/python/BPy_Interface1D.h similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D.h rename to source/blender/freestyle/intern/python/BPy_Interface1D.h diff --git a/source/blender/freestyle/intern/python/Material.cpp b/source/blender/freestyle/intern/python/BPy_Material.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Material.cpp rename to source/blender/freestyle/intern/python/BPy_Material.cpp diff --git a/source/blender/freestyle/intern/python/MediumType.cpp b/source/blender/freestyle/intern/python/BPy_MediumType.cpp similarity index 93% rename from source/blender/freestyle/intern/python/MediumType.cpp rename to source/blender/freestyle/intern/python/BPy_MediumType.cpp index f0c5fcc58a4..b889d2b5c2f 100644 --- a/source/blender/freestyle/intern/python/MediumType.cpp +++ b/source/blender/freestyle/intern/python/BPy_MediumType.cpp @@ -1,6 +1,6 @@ -#include "MediumType.h" +#include "BPy_MediumType.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { @@ -103,6 +103,18 @@ PyTypeObject MediumType_Type = { //-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC MediumType_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &MediumType_Type ) < 0 ) + return; + Py_INCREF( &MediumType_Type ); + PyModule_AddObject(module, "MediumType", (PyObject *)&MediumType_Type); + +} + int MediumType___init__(BPy_MediumType *self, PyObject *args, PyObject *kwds) { if (PyInt_Type.tp_init((PyObject *)self, args, kwds) < 0) diff --git a/source/blender/freestyle/intern/python/MediumType.h b/source/blender/freestyle/intern/python/BPy_MediumType.h similarity index 100% rename from source/blender/freestyle/intern/python/MediumType.h rename to source/blender/freestyle/intern/python/BPy_MediumType.h diff --git a/source/blender/freestyle/intern/python/Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Nature.cpp rename to source/blender/freestyle/intern/python/BPy_Nature.cpp index 14357949022..8a29bdb5bdf 100644 --- a/source/blender/freestyle/intern/python/Nature.cpp +++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp @@ -1,6 +1,6 @@ -#include "Nature.h" +#include "BPy_Nature.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Nature.h b/source/blender/freestyle/intern/python/BPy_Nature.h similarity index 100% rename from source/blender/freestyle/intern/python/Nature.h rename to source/blender/freestyle/intern/python/BPy_Nature.h diff --git a/source/blender/freestyle/intern/python/Noise.cpp b/source/blender/freestyle/intern/python/BPy_Noise.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Noise.cpp rename to source/blender/freestyle/intern/python/BPy_Noise.cpp diff --git a/source/blender/freestyle/intern/python/Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Operators.cpp rename to source/blender/freestyle/intern/python/BPy_Operators.cpp diff --git a/source/blender/freestyle/intern/python/SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp similarity index 100% rename from source/blender/freestyle/intern/python/SShape.cpp rename to source/blender/freestyle/intern/python/BPy_SShape.cpp diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp similarity index 99% rename from source/blender/freestyle/intern/python/StrokeAttribute.cpp rename to source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index b9f37dfa165..24c0263bc5f 100644 --- a/source/blender/freestyle/intern/python/StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -1,6 +1,6 @@ -#include "StrokeAttribute.h" +#include "BPy_StrokeAttribute.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/StrokeAttribute.h b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h similarity index 100% rename from source/blender/freestyle/intern/python/StrokeAttribute.h rename to source/blender/freestyle/intern/python/BPy_StrokeAttribute.h diff --git a/source/blender/freestyle/intern/python/StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp similarity index 98% rename from source/blender/freestyle/intern/python/StrokeShader.cpp rename to source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index 029f8776c73..cdca779dafb 100644 --- a/source/blender/freestyle/intern/python/StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -1,7 +1,7 @@ -#include "StrokeShader.h" +#include "BPy_StrokeShader.h" -#include "Convert.h" -#include "Interface1D/Stroke.h" +#include "BPy_Convert.h" +#include "Interface1D/BPy_Stroke.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/StrokeShader.h b/source/blender/freestyle/intern/python/BPy_StrokeShader.h similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader.h rename to source/blender/freestyle/intern/python/BPy_StrokeShader.h diff --git a/source/blender/freestyle/intern/python/StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeVertexIterator.cpp rename to source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp similarity index 99% rename from source/blender/freestyle/intern/python/UnaryFunction0D.cpp rename to source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index b9da3dfc20d..dda236a0989 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -1,6 +1,6 @@ -#include "UnaryFunction0D.h" +#include "BPy_UnaryFunction0D.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D.h rename to source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp similarity index 99% rename from source/blender/freestyle/intern/python/UnaryFunction1D.cpp rename to source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index db026ced338..70f6feb02d3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -1,6 +1,6 @@ -#include "UnaryFunction1D.h" +#include "BPy_UnaryFunction1D.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D.h rename to source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp similarity index 98% rename from source/blender/freestyle/intern/python/UnaryPredicate0D.cpp rename to source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 1d2fd6b284f..29ea68c01ca 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -1,6 +1,6 @@ -#include "UnaryPredicate0D.h" +#include "BPy_UnaryPredicate0D.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate0D.h rename to source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp similarity index 98% rename from source/blender/freestyle/intern/python/UnaryPredicate1D.cpp rename to source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index bbbc9bfcc43..b00422a0aab 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -1,6 +1,6 @@ -#include "UnaryPredicate1D.h" +#include "BPy_UnaryPredicate1D.h" -#include "Convert.h" +#include "BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D.h rename to source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h diff --git a/source/blender/freestyle/intern/python/EdgeModifier/TimestampModifier.cpp b/source/blender/freestyle/intern/python/BPy_ViewEdgeIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/EdgeModifier/TimestampModifier.cpp rename to source/blender/freestyle/intern/python/BPy_ViewEdgeIterator.cpp diff --git a/source/blender/freestyle/intern/python/ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewMap.cpp rename to source/blender/freestyle/intern/python/BPy_ViewMap.cpp diff --git a/source/blender/freestyle/intern/python/ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewShape.cpp rename to source/blender/freestyle/intern/python/BPy_ViewShape.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/Chain.cpp b/source/blender/freestyle/intern/python/BPy_orientedViewEdgeIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D/Curve/Chain.cpp rename to source/blender/freestyle/intern/python/BPy_orientedViewEdgeIterator.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D/FalseBP1D.cpp rename to source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D/Length2DBP1D.cpp rename to source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D/SameShapeIdBP1D.cpp rename to source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D/TrueBP1D.cpp rename to source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BinaryPredicate1D/ViewMapGradientNormBP1D.cpp rename to source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewEdgeIterator.cpp rename to source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp rename to source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index e1cf63727e5..6765bc84baa 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -1,6 +1,6 @@ -#include "CurvePoint.h" +#include "BPy_CurvePoint.h" -#include "../Convert.h" +#include "../BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface0D/CurvePoint.h rename to source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h index e40f261504f..c2a8023b745 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h @@ -1,7 +1,7 @@ #ifndef FREESTYLE_PYTHON_CURVEPOINT_H #define FREESTYLE_PYTHON_CURVEPOINT_H -#include "../Interface0D.h" +#include "../BPy_Interface0D.h" #include "../../stroke/Curve.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Interface0D/SVertex.cpp rename to source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index d0c622d1df2..bbfff34cb20 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -1,7 +1,7 @@ -#include "SVertex.h" +#include "BPy_SVertex.h" -#include "../Convert.h" -#include "../Id.h" +#include "../BPy_Convert.h" +#include "../BPy_Id.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/SVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface0D/SVertex.h rename to source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h index 099417b5139..95b7d833d65 100644 --- a/source/blender/freestyle/intern/python/Interface0D/SVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h @@ -2,7 +2,7 @@ #define FREESTYLE_PYTHON_SVERTEX_H #include "../../view_map/Silhouette.h" -#include "../Interface0D.h" +#include "../BPy_Interface0D.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp similarity index 98% rename from source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp rename to source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 6168d1fb711..7e6ef8590fd 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -1,6 +1,6 @@ -#include "ViewVertex.h" +#include "BPy_ViewVertex.h" -#include "../Convert.h" +#include "../BPy_Convert.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface0D/ViewVertex.h rename to source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index 98bcb9bac90..b70a69c95e7 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -2,7 +2,7 @@ #define FREESTYLE_PYTHON_VIEWVERTEX_H #include "../../view_map/ViewMap.h" -#include "../Interface0D.h" +#include "../BPy_Interface0D.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp rename to source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 9d07125476e..2039b165457 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -1,7 +1,7 @@ -#include "StrokeVertex.h" +#include "BPy_StrokeVertex.h" -#include "../../Convert.h" -#include "../../StrokeAttribute.h" +#include "../../BPy_Convert.h" +#include "../../BPy_StrokeAttribute.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h rename to source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h index 4bc33ea4058..f1c54ed0041 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/StrokeVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h @@ -1,7 +1,7 @@ #ifndef FREESTYLE_PYTHON_STROKEVERTEX_H #define FREESTYLE_PYTHON_STROKEVERTEX_H -#include "../CurvePoint.h" +#include "../BPy_CurvePoint.h" #include "../../../stroke/Stroke.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface0D/ViewVertex/NonTVertex.cpp rename to source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface0D/ViewVertex/TVertex.cpp rename to source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D/Curve.cpp rename to source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Interface1D/FEdge.cpp rename to source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 0cdfb9f1e0d..56dc76f0acd 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -1,7 +1,7 @@ -#include "FEdge.h" +#include "BPy_FEdge.h" -#include "../Convert.h" -#include "../Interface0D/SVertex.h" +#include "../BPy_Convert.h" +#include "../Interface0D/BPy_SVertex.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface1D/FEdge.h rename to source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h index 230a5f36954..c54dbee98b7 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h @@ -1,7 +1,7 @@ #ifndef FREESTYLE_PYTHON_FEDGE_H #define FREESTYLE_PYTHON_FEDGE_H -#include "../Interface1D.h" +#include "../BPy_Interface1D.h" #include "../../view_map/Silhouette.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp similarity index 99% rename from source/blender/freestyle/intern/python/Interface1D/Stroke.cpp rename to source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 9951f21a0e1..8027f625cc5 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -1,7 +1,7 @@ -#include "Stroke.h" +#include "BPy_Stroke.h" -#include "../Convert.h" -#include "../Interface0D/SVertex.h" +#include "../BPy_Convert.h" +#include "../Interface0D/BPy_SVertex.h" #include "../../stroke/StrokeIterators.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface1D/Stroke.h b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h similarity index 95% rename from source/blender/freestyle/intern/python/Interface1D/Stroke.h rename to source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h index fc4b426fd53..52c6d214b85 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Stroke.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h @@ -1,7 +1,7 @@ #ifndef FREESTYLE_PYTHON_STROKE_H #define FREESTYLE_PYTHON_STROKE_H -#include "../Interface1D.h" +#include "../BPy_Interface1D.h" #include "../../stroke/Stroke.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D/ViewEdge.cpp rename to source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp diff --git a/source/blender/freestyle/intern/python/orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp similarity index 100% rename from source/blender/freestyle/intern/python/orientedViewEdgeIterator.cpp rename to source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSharp.cpp rename to source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Interface1D/FEdge/FEdgeSmooth.cpp rename to source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/BackboneStretcherShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/BezierCurveShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/CalligraphicShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ColorNoiseShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ColorVariationPatternShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ConstantColorShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ConstantThicknessShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ConstrainedIncreasingThicknessShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/GuidingLinesShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/IncreasingColorShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/IncreasingThicknessShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/PolygonalizationShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/SamplingShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/SpatialNoiseShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/StrokeTextureShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/TextureAssignerShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ThicknessNoiseShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/ThicknessVariationPatternShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/TipRemoverShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/fstreamShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp diff --git a/source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp similarity index 100% rename from source/blender/freestyle/intern/python/StrokeShader/streamShader.cpp rename to source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DDouble.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DFloat.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DId.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DUnsigned.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec2f.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVec3f.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DVectorViewShape.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0DViewShape.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/ShapeIdF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/MaterialF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/CurveNatureF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/Normal2DF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/VertexOrientation2DF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/VertexOrientation3DF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetOccludeeF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/GetShapeF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/DensityF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/LocalAverageDepthF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetCurvilinearAbscissaF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetParameterF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/GetViewMapGradientNormF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadCompleteViewMapPixelF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadMapPixelF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/ReadSteerableViewMapPixelF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/Curvature2DAngleF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedXF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedYF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetProjectedZF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetXF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetYF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/GetZF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/ZDiscontinuityF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/QuantitativeInvisibilityF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/GetOccludersF0D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DDouble.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DFloat.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DUnsigned.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec2f.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVec3f.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1DVectorViewShape.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/CurveNatureF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Normal2DF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/Orientation2DF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/Orientation3DF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/DensityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetCompleteViewMapDensityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/GetDirectionalViewMapDensityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/LocalAverageDepthF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/Curvature2DAngleF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedXF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedYF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetProjectedZF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetSteerableViewMapDensityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetViewMapGradientNormF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetXF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetYF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/GetZF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/ZDiscontinuityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/QuantitativeInvisibilityF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludeeF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetOccludersF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/GetShapeF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/ChainingTimeStampF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/IncrementChainingTimeStampF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/TimeStampF1D.cpp rename to source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate0D/FalseUP0D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate0D/TrueUP0D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/ContourUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/DensityLowerThanUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToChainingTimeStampUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/EqualToTimeStampUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/ExternalContourUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/FalseUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/QuantitativeInvisibilityUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/ShapeUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp similarity index 100% rename from source/blender/freestyle/intern/python/UnaryPredicate1D/TrueUP1D.cpp rename to source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator.cpp rename to source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainPredicateIterator.cpp rename to source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/ChainSilhouetteIterator.cpp rename to source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index 71675ade605..9d3d89a660b 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -97,7 +97,8 @@ struct ID; /*keep me up here */ #include "World.h" #include "Types.h" #include "Particle.h" -#include "Freestyle.h" + +#include "BPy_Freestyle.h" /**********************************************************/ /* Python API function prototypes for the Blender module. */ From d1b82d1f15a04a7c2383f0689ceede94971f4b81 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 23 Jul 2008 10:19:08 +0000 Subject: [PATCH 401/430] soc-2008-mxcurioni: added Iterator class, base class for all iterators in Freestyle (on the C++ side). Created the equivalent in Python BPy_Iterator with the simple interface: - getExactTypeName() - increment() - decrement() - isBegin() - isEnd() Contrary to previously stated, I am reverting back to implementing iterators in the (Python) API, for different reasons: - it will make testing quicker to achieve, as I won't have to recode a big chunk of the original Python files - it will be a base for API refactoring - it won't prevent the use a list-based approach later (it is simple to get it from the Iterator) --- source/blender/freestyle/SConscript | 1 + .../freestyle/intern/python/BPy_Freestyle.cpp | 2 + .../freestyle/intern/python/BPy_Iterator.cpp | 176 + .../freestyle/intern/python/BPy_Iterator.h | 35 + .../intern/stroke/ChainingIterators.h | 12 +- .../freestyle/intern/swig/ModuleWrapper.cpp | 16351 +++++++--------- .../freestyle/intern/swig/ModuleWrapper.h | 36 +- .../freestyle/intern/system/Iterator.cpp | 1 + .../freestyle/intern/system/Iterator.h | 38 + .../freestyle/intern/view_map/Interface0D.h | 5 +- .../view_map/ViewMapAdvancedIterators.h | 2 +- .../intern/view_map/ViewMapIterators.h | 12 +- source/blender/freestyle/python/Freestyle.py | 12 +- 13 files changed, 7915 insertions(+), 8768 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BPy_Iterator.cpp create mode 100644 source/blender/freestyle/intern/python/BPy_Iterator.h create mode 100644 source/blender/freestyle/intern/system/Iterator.cpp create mode 100644 source/blender/freestyle/intern/system/Iterator.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 94e8b7163fb..3c9f2abebe3 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -74,6 +74,7 @@ python_sources = [ prefix + '/BPy_Interface1D.cpp', prefix + '/Interface1D/BPy_FEdge.cpp', prefix + '/Interface1D/BPy_Stroke.cpp', + prefix + '/BPy_Iterator.cpp', prefix + '/BPy_MediumType.cpp', prefix + '/BPy_Nature.cpp', prefix + '/BPy_StrokeAttribute.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index bbb4acf4f85..a6ef92d8f51 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -5,6 +5,7 @@ #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" +#include "BPy_Iterator.h" #include "Interface0D/BPy_CurvePoint.h" #include "BPy_Interface1D.h" #include "BPy_MediumType.h" @@ -142,6 +143,7 @@ PyObject *Freestyle_Init( void ) IntegrationType_Init( module ); Interface0D_Init( module ); Interface1D_Init( module ); + Iterator_Init( module ); StrokeAttribute_Init( module ); StrokeShader_Init( module ); UnaryFunction0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp new file mode 100644 index 00000000000..aebf5e45630 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -0,0 +1,176 @@ +#include "BPy_Iterator.h" + +#include "BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Iterator instance -----------*/ +static void Iterator___dealloc__(BPy_Iterator *self); +static PyObject * Iterator___repr__(BPy_Iterator* self); + +static PyObject * Iterator_getExactTypeName(BPy_Iterator* self); +static PyObject * Iterator_increment(BPy_Iterator* self); +static PyObject * Iterator_decrement(BPy_Iterator* self); +static PyObject * Iterator_isBegin(BPy_Iterator* self); +static PyObject * Iterator_isEnd(BPy_Iterator* self); + +/*----------------------Iterator instance definitions ----------------------------*/ +static PyMethodDef BPy_Iterator_methods[] = { + {"getExactTypeName", ( PyCFunction ) Iterator_getExactTypeName, METH_NOARGS, "( )Returns the string of the name of the iterator."}, + {"increment", ( PyCFunction ) Iterator_increment, METH_NOARGS, "( )Increments iterator."}, + {"decrement", ( PyCFunction ) Iterator_decrement, METH_NOARGS, "( )Decrements iterator."}, + {"isBegin", ( PyCFunction ) Iterator_isBegin, METH_NOARGS, "( )Tests if iterator points to beginning."}, + {"isEnd", ( PyCFunction ) Iterator_isEnd, METH_NOARGS, "( )Tests if iterator points to end."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Iterator type definition ------------------------------*/ + +PyTypeObject Iterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Iterator", /* tp_name */ + sizeof( BPy_Iterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)Iterator___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)Iterator___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Iterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC Iterator_Init( PyObject *module ) +{ + + if( module == NULL ) + return; + + if( PyType_Ready( &Iterator_Type ) < 0 ) + return; + Py_INCREF( &Iterator_Type ); + PyModule_AddObject(module, "Iterator", (PyObject *)&Iterator_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +void Iterator___dealloc__(BPy_Iterator* self) +{ + delete self->it; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * Iterator___repr__(BPy_Iterator* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->it->getExactTypeName().c_str(), self->it ); +} + +PyObject * Iterator_getExactTypeName(BPy_Iterator* self) { + return PyString_FromString( self->it->getExactTypeName().c_str() ); +} + + +PyObject * Iterator_increment(BPy_Iterator* self) { + self->it->increment(); + + Py_RETURN_NONE; +} + +PyObject * Iterator_decrement(BPy_Iterator* self) { + self->it->decrement(); + + Py_RETURN_NONE; +} + +PyObject * Iterator_isBegin(BPy_Iterator* self) { + return PyBool_from_bool( self->it->isBegin() ); +} + +PyObject * Iterator_isEnd(BPy_Iterator* self) { + return PyBool_from_bool( self->it->isEnd() ); +} + + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.h b/source/blender/freestyle/intern/python/BPy_Iterator.h new file mode 100644 index 00000000000..0f92c3b7f28 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_Iterator.h @@ -0,0 +1,35 @@ +#ifndef FREESTYLE_PYTHON_ITERATOR_H +#define FREESTYLE_PYTHON_ITERATOR_H + +#include "../system/Iterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Iterator_Type; + +#define BPy_Iterator_Check(v) (( (PyObject *) v)->ob_type == &Iterator_Type) + +/*---------------------------Python BPy_Iterator structure definition----------*/ +typedef struct { + PyObject_HEAD + Iterator *it; +} BPy_Iterator; + +/*---------------------------Python BPy_Iterator visible prototypes-----------*/ + +PyMODINIT_FUNC Iterator_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ITERATOR_H */ diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index 1e946855dce..121f1c8ba54 100755 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -34,13 +34,15 @@ # include "../view_map/ViewMapAdvancedIterators.h" # include "Predicates1D.h" +#include "../system/Iterator.h" //soc + //using namespace ViewEdgeInternal; // // Adjacency iterator used in the chaining process // /////////////////////////////////////////////////////////// -class LIB_STROKE_EXPORT AdjacencyIterator{ +class LIB_STROKE_EXPORT AdjacencyIterator : Iterator { protected: ViewVertexInternal::orientedViewEdgeIterator _internalIterator; bool _restrictToSelection; @@ -71,10 +73,10 @@ public: virtual ~AdjacencyIterator(){ } - inline bool isEnd(){ + virtual inline bool isEnd(){ return _internalIterator.isEnd(); } - inline bool isBegin(){ + virtual inline bool isBegin(){ return _internalIterator.isBegin(); } /*! Returns true if the current ViewEdge is is coming @@ -94,8 +96,8 @@ public: increment(); return tmp; } - void increment(); - + virtual void increment(); + protected: bool isValid(ViewEdge* edge); }; diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index 792388b52cb..14c3dbb57be 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.31 + * Version 1.3.35 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -13,7 +13,7 @@ #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus -template class SwigValueWrapper { +template class SwigValueWrapper { T *tt; public: SwigValueWrapper() : tt(0) { } @@ -26,6 +26,10 @@ public: private: SwigValueWrapper& operator=(const SwigValueWrapper& rhs); }; + +template T SwigValueInit() { + return T(); +} #endif /* ----------------------------------------------------------------------------- @@ -35,14 +39,14 @@ private: /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) -# if (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -125,6 +129,12 @@ private: # define _CRT_SECURE_NO_DEPRECATE #endif +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + /* Python.h has to appear first */ #include @@ -138,7 +148,7 @@ private: /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "3" +#define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE @@ -173,6 +183,7 @@ private: /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -313,10 +324,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { extern "C" { #endif -typedef void *(*swig_converter_func)(void *); +typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); -/* Structure to store inforomation on one type */ +/* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ @@ -361,7 +372,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } - return (l1 - f1) - (l2 - f2); + return (int)((l1 - f1) - (l2 - f2)); } /* @@ -443,8 +454,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* @@ -868,7 +879,7 @@ SWIG_Python_AddErrorMsg(const char* mesg) Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_SetString(PyExc_RuntimeError, mesg); } } @@ -1108,14 +1119,14 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { /* Unpack the argument tuple */ SWIGINTERN int -SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs) +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { if (!args) { if (!min && !max) { return 1; } else { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), min); + name, (min == max ? "" : "at least "), (int)min); return 0; } } @@ -1123,14 +1134,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyOb PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { - register int l = PyTuple_GET_SIZE(args); + register Py_ssize_t l = PyTuple_GET_SIZE(args); if (l < min) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), min, l); + name, (min == max ? "" : "at least "), (int)min, (int)l); return 0; } else if (l > max) { PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), max, l); + name, (min == max ? "" : "at most "), (int)max, (int)l); return 0; } else { register int i; @@ -1428,7 +1439,7 @@ PySwigObject_dealloc(PyObject *v) { PySwigObject *sobj = (PySwigObject *) v; PyObject *next = sobj->next; - if (sobj->own) { + if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; @@ -1446,12 +1457,13 @@ PySwigObject_dealloc(PyObject *v) res = ((*meth)(mself, v)); } Py_XDECREF(res); - } else { - const char *name = SWIG_TypePrettyName(ty); + } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name); -#endif + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); } +#endif } Py_XDECREF(next); PyObject_DEL(v); @@ -1609,9 +1621,11 @@ _PySwigObject_type(void) { (unaryfunc)0, /*nb_float*/ (unaryfunc)PySwigObject_oct, /*nb_oct*/ (unaryfunc)PySwigObject_hex, /*nb_hex*/ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 +#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif }; @@ -1954,7 +1968,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own) { + if (own == SWIG_POINTER_OWN) { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; @@ -1975,6 +1989,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int return SWIG_OK; } else { PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; while (sobj) { void *vptr = sobj->ptr; if (ty) { @@ -1988,7 +2004,15 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int if (!tc) { sobj = (PySwigObject *)sobj->next; } else { - if (ptr) *ptr = SWIG_TypeCast(tc,vptr); + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } break; } } @@ -1998,7 +2022,8 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int } } if (sobj) { - if (own) *own = sobj->own; + if (own) + *own = *own | sobj->own; if (flags & SWIG_POINTER_DISOWN) { sobj->own = 0; } @@ -2063,8 +2088,13 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { } if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (!tc) return SWIG_ERROR; - *ptr = SWIG_TypeCast(tc,vptr); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } } else { *ptr = vptr; } @@ -2680,6 +2710,7 @@ namespace Swig { swig_msg += msg; } if (!PyErr_Occurred()) { + swig_msg.insert(0, ": "); PyErr_SetString(error, getMessage()); } else { SWIG_Python_AddErrorMsg(getMessage()); @@ -2774,7 +2805,7 @@ namespace Swig { class DirectorMethodException : public Swig::DirectorException { public: DirectorMethodException(const char* msg = "") - : DirectorException(PyExc_RuntimeError, "Swig director method error", msg) + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) { } @@ -2807,33 +2838,21 @@ namespace Swig { # endif #endif -/* simple thread abstraction for pthreads on win32 */ #ifdef __THREAD__ -# define __PTHREAD__ -# if defined(_WIN32) || defined(__WIN32__) -# define pthread_mutex_lock EnterCriticalSection -# define pthread_mutex_unlock LeaveCriticalSection -# define pthread_mutex_t CRITICAL_SECTION -# define SWIG_MUTEX_INIT(var) var -# else -# include -# define SWIG_MUTEX_INIT(var) var = PTHREAD_MUTEX_INITIALIZER -# endif -#endif - -#ifdef __PTHREAD__ - struct Guard +# include "pythread.h" + class Guard { - pthread_mutex_t *_mutex; + PyThread_type_lock & mutex_; - Guard(pthread_mutex_t &mutex) : _mutex(&mutex) + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) { - pthread_mutex_lock(_mutex); + PyThread_acquire_lock(mutex_, WAIT_LOCK); } ~Guard() { - pthread_mutex_unlock(_mutex); + PyThread_release_lock(mutex_); } }; # define SWIG_GUARD(mutex) Guard _guard(mutex) @@ -2904,8 +2923,8 @@ namespace Swig { private: typedef std::map ownership_map; mutable ownership_map owner; -#ifdef __PTHREAD__ - static pthread_mutex_t swig_mutex_own; +#ifdef __THREAD__ + static PyThread_type_lock swig_mutex_own; #endif public: @@ -2950,8 +2969,8 @@ namespace Swig { } }; -#ifdef __PTHREAD__ - pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_own); +#ifdef __THREAD__ + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); #endif } @@ -2963,7 +2982,7 @@ namespace Swig { /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_AdjacencyIterator swig_types[0] -#define SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t swig_types[1] +#define SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t swig_types[1] #define SWIGTYPE_p_BinaryPredicate0D swig_types[2] #define SWIGTYPE_p_BinaryPredicate1D swig_types[3] #define SWIGTYPE_p_CalligraphicShader swig_types[4] @@ -3114,56 +3133,56 @@ namespace Swig { #define SWIGTYPE_p_StrokesContainer swig_types[149] #define SWIGTYPE_p_StyleModule swig_types[150] #define SWIGTYPE_p_TVertex swig_types[151] -#define SWIGTYPE_p_UnaryFunction0DTId_t swig_types[152] -#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t swig_types[153] -#define SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t swig_types[154] -#define SWIGTYPE_p_UnaryFunction0DTViewShape_p_t swig_types[155] -#define SWIGTYPE_p_UnaryFunction0DTdouble_t swig_types[156] -#define SWIGTYPE_p_UnaryFunction0DTfloat_t swig_types[157] -#define SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[158] -#define SWIGTYPE_p_UnaryFunction0DTunsigned_int_t swig_types[159] -#define SWIGTYPE_p_UnaryFunction0DTvoid_t swig_types[160] -#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t swig_types[161] -#define SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t swig_types[162] -#define SWIGTYPE_p_UnaryFunction1DTdouble_t swig_types[163] -#define SWIGTYPE_p_UnaryFunction1DTfloat_t swig_types[164] -#define SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t swig_types[165] -#define SWIGTYPE_p_UnaryFunction1DTunsigned_int_t swig_types[166] -#define SWIGTYPE_p_UnaryFunction1DTvoid_t swig_types[167] +#define SWIGTYPE_p_UnaryFunction0DT_Id_t swig_types[152] +#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t swig_types[153] +#define SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t swig_types[154] +#define SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t swig_types[155] +#define SWIGTYPE_p_UnaryFunction0DT_double_t swig_types[156] +#define SWIGTYPE_p_UnaryFunction0DT_float_t swig_types[157] +#define SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[158] +#define SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t swig_types[159] +#define SWIGTYPE_p_UnaryFunction0DT_void_t swig_types[160] +#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t swig_types[161] +#define SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t swig_types[162] +#define SWIGTYPE_p_UnaryFunction1DT_double_t swig_types[163] +#define SWIGTYPE_p_UnaryFunction1DT_float_t swig_types[164] +#define SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t swig_types[165] +#define SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t swig_types[166] +#define SWIGTYPE_p_UnaryFunction1DT_void_t swig_types[167] #define SWIGTYPE_p_UnaryPredicate0D swig_types[168] #define SWIGTYPE_p_UnaryPredicate1D swig_types[169] -#define SWIGTYPE_p_VecMat__HVec3Tdouble_t swig_types[170] -#define SWIGTYPE_p_VecMat__HVec3Tfloat_t swig_types[171] -#define SWIGTYPE_p_VecMat__HVec3Tint_t swig_types[172] -#define SWIGTYPE_p_VecMat__HVec3Tunsigned_int_t swig_types[173] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_2_t swig_types[174] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_3_t swig_types[175] -#define SWIGTYPE_p_VecMat__SquareMatrixTdouble_4_t swig_types[176] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_2_t swig_types[177] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_3_t swig_types[178] -#define SWIGTYPE_p_VecMat__SquareMatrixTfloat_4_t swig_types[179] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_2_t swig_types[180] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_3_t swig_types[181] -#define SWIGTYPE_p_VecMat__SquareMatrixTint_4_t swig_types[182] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_2_t swig_types[183] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_3_t swig_types[184] -#define SWIGTYPE_p_VecMat__SquareMatrixTunsigned_int_4_t swig_types[185] -#define SWIGTYPE_p_VecMat__Vec2Tdouble_t swig_types[186] -#define SWIGTYPE_p_VecMat__Vec2Tfloat_t swig_types[187] -#define SWIGTYPE_p_VecMat__Vec2Tint_t swig_types[188] -#define SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t swig_types[189] -#define SWIGTYPE_p_VecMat__Vec3Tdouble_t swig_types[190] -#define SWIGTYPE_p_VecMat__Vec3Tfloat_t swig_types[191] -#define SWIGTYPE_p_VecMat__Vec3Tint_t swig_types[192] -#define SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t swig_types[193] -#define SWIGTYPE_p_VecMat__VecTdouble_2_t swig_types[194] -#define SWIGTYPE_p_VecMat__VecTdouble_3_t swig_types[195] -#define SWIGTYPE_p_VecMat__VecTfloat_2_t swig_types[196] -#define SWIGTYPE_p_VecMat__VecTfloat_3_t swig_types[197] -#define SWIGTYPE_p_VecMat__VecTint_2_t swig_types[198] -#define SWIGTYPE_p_VecMat__VecTint_3_t swig_types[199] -#define SWIGTYPE_p_VecMat__VecTunsigned_int_2_t swig_types[200] -#define SWIGTYPE_p_VecMat__VecTunsigned_int_3_t swig_types[201] +#define SWIGTYPE_p_VecMat__HVec3T_double_t swig_types[170] +#define SWIGTYPE_p_VecMat__HVec3T_float_t swig_types[171] +#define SWIGTYPE_p_VecMat__HVec3T_int_t swig_types[172] +#define SWIGTYPE_p_VecMat__HVec3T_unsigned_int_t swig_types[173] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_2_t swig_types[174] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_3_t swig_types[175] +#define SWIGTYPE_p_VecMat__SquareMatrixT_double_4_t swig_types[176] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_2_t swig_types[177] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_3_t swig_types[178] +#define SWIGTYPE_p_VecMat__SquareMatrixT_float_4_t swig_types[179] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_2_t swig_types[180] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_3_t swig_types[181] +#define SWIGTYPE_p_VecMat__SquareMatrixT_int_4_t swig_types[182] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_2_t swig_types[183] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_3_t swig_types[184] +#define SWIGTYPE_p_VecMat__SquareMatrixT_unsigned_int_4_t swig_types[185] +#define SWIGTYPE_p_VecMat__Vec2T_double_t swig_types[186] +#define SWIGTYPE_p_VecMat__Vec2T_float_t swig_types[187] +#define SWIGTYPE_p_VecMat__Vec2T_int_t swig_types[188] +#define SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t swig_types[189] +#define SWIGTYPE_p_VecMat__Vec3T_double_t swig_types[190] +#define SWIGTYPE_p_VecMat__Vec3T_float_t swig_types[191] +#define SWIGTYPE_p_VecMat__Vec3T_int_t swig_types[192] +#define SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t swig_types[193] +#define SWIGTYPE_p_VecMat__VecT_double_2_t swig_types[194] +#define SWIGTYPE_p_VecMat__VecT_double_3_t swig_types[195] +#define SWIGTYPE_p_VecMat__VecT_float_2_t swig_types[196] +#define SWIGTYPE_p_VecMat__VecT_float_3_t swig_types[197] +#define SWIGTYPE_p_VecMat__VecT_int_2_t swig_types[198] +#define SWIGTYPE_p_VecMat__VecT_int_3_t swig_types[199] +#define SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t swig_types[200] +#define SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t swig_types[201] #define SWIGTYPE_p_Vertex swig_types[202] #define SWIGTYPE_p_ViewEdge swig_types[203] #define SWIGTYPE_p_ViewEdgeInternal__SVertexIterator swig_types[204] @@ -3171,8 +3190,8 @@ namespace Swig { #define SWIGTYPE_p_ViewMap swig_types[206] #define SWIGTYPE_p_ViewShape swig_types[207] #define SWIGTYPE_p_ViewVertex swig_types[208] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t swig_types[209] -#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t swig_types[210] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t swig_types[209] +#define SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t swig_types[210] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator swig_types[211] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator swig_types[212] #define SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator swig_types[213] @@ -3202,30 +3221,30 @@ namespace Swig { #define SWIGTYPE_p_point_iterator swig_types[237] #define SWIGTYPE_p_point_type swig_types[238] #define SWIGTYPE_p_reference swig_types[239] -#define SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t swig_types[240] +#define SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t swig_types[240] #define SWIGTYPE_p_size_type swig_types[241] #define SWIGTYPE_p_std__invalid_argument swig_types[242] -#define SWIGTYPE_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t swig_types[243] -#define SWIGTYPE_p_std__pairTViewEdge_p_bool_t swig_types[244] -#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t swig_types[245] -#define SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type swig_types[246] -#define SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t swig_types[247] -#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t swig_types[248] -#define SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type swig_types[249] -#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t swig_types[250] -#define SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type swig_types[251] -#define SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t swig_types[252] -#define SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t swig_types[253] -#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t swig_types[254] -#define SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type swig_types[255] -#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t swig_types[256] -#define SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type swig_types[257] -#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t swig_types[258] -#define SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type swig_types[259] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t swig_types[260] -#define SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type swig_types[261] -#define SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t swig_types[262] -#define SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t swig_types[263] +#define SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t swig_types[243] +#define SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t swig_types[244] +#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t swig_types[245] +#define SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type swig_types[246] +#define SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t swig_types[247] +#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t swig_types[248] +#define SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type swig_types[249] +#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t swig_types[250] +#define SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type swig_types[251] +#define SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t swig_types[252] +#define SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t swig_types[253] +#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t swig_types[254] +#define SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type swig_types[255] +#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t swig_types[256] +#define SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type swig_types[257] +#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t swig_types[258] +#define SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type swig_types[259] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[260] +#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type swig_types[261] +#define SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t swig_types[262] +#define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[263] #define SWIGTYPE_p_svertices_container swig_types[264] #define SWIGTYPE_p_swig__PySwigIterator swig_types[265] #define SWIGTYPE_p_unsigned_int swig_types[266] @@ -3239,12 +3258,12 @@ namespace Swig { #define SWIGTYPE_p_viewshapes_container swig_types[274] #define SWIGTYPE_p_viewvertices_container swig_types[275] #define SWIGTYPE_p_void swig_types[276] -#define SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type swig_types[277] -#define SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type swig_types[278] -#define SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type swig_types[279] -#define SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type swig_types[280] -#define SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type swig_types[281] -#define SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type swig_types[282] +#define SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type swig_types[277] +#define SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type swig_types[278] +#define SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type swig_types[279] +#define SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type swig_types[280] +#define SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type swig_types[281] +#define SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type swig_types[282] static swig_type_info *swig_types[284]; static swig_module_info swig_module = {swig_types, 283, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) @@ -3265,7 +3284,7 @@ static swig_module_info swig_module = {swig_types, 283, 0, 0, 0, 0}; #define SWIG_name "_Freestyle" -#define SWIGVERSION 0x010331 +#define SWIGVERSION 0x010335 #define SWIG_VERSION SWIGVERSION @@ -3293,7 +3312,9 @@ namespace swig { PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) { - if (initial_ref) Py_XINCREF(_obj); + if (initial_ref) { + Py_XINCREF(_obj); + } } PyObject_ptr & operator=(const PyObject_ptr& item) @@ -3441,17 +3462,22 @@ namespace swig { // C++ common/needed methods virtual PySwigIterator *copy() const = 0; - PyObject *next() + PyObject *next() { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads PyObject *obj = value(); - incr(); - return obj; + incr(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; } PyObject *previous() { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads decr(); - return value(); + PyObject *obj = value(); + SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads + return obj; } PySwigIterator *advance(ptrdiff_t n) @@ -4534,12 +4560,12 @@ namespace swig ~PySequence_Cont() { - if (_seq) Py_DECREF(_seq); + Py_XDECREF(_seq); } size_type size() const { - return PySequence_Size(_seq); + return static_cast(PySequence_Size(_seq)); } bool empty() const @@ -4602,14 +4628,12 @@ namespace swig #include -#ifndef LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -#endif -#ifndef LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif #endif @@ -4677,7 +4701,14 @@ namespace swig { typedef T value_type; static int asptr(PyObject *obj, sequence **seq) { - if (PySequence_Check(obj)) { + if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) { + sequence *p; + if (SWIG_ConvertPtr(obj,(void**)&p, + swig::type_info(),0) == SWIG_OK) { + if (seq) *seq = p; + return SWIG_OLDOBJ; + } + } else if (PySequence_Check(obj)) { try { PySequence_Cont pyseq(obj); if (seq) { @@ -4696,13 +4727,6 @@ namespace swig { } return SWIG_ERROR; } - } else { - sequence *p; - if (SWIG_ConvertPtr(obj,(void**)&p, - swig::type_info(),0) == SWIG_OK) { - if (seq) *seq = p; - return SWIG_OLDOBJ; - } } return SWIG_ERROR; } @@ -4758,21 +4782,21 @@ namespace swig { namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef pointer_category category; static const char* type_name() { - return "std::vector<" "int" "," "std::allocator" " >"; + return "std::vector<" "int" "," "std::allocator< int >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_int_Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){ return self->size(); } @@ -4790,32 +4814,32 @@ SWIG_From_size_t (size_t value) return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); } -SWIGINTERN std::vector::value_type std_vector_Sl_int_Sg__pop(std::vector *self){ +SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_int_Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_int_Sg____setslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_int_Sg____delitem__(std::vector< int > *self,std::vector< int >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector const *self,std::vector::difference_type i){ +SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem__(std::vector< int > const *self,std::vector< int >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg____setitem__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector *self,std::vector::value_type const &x){ +SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){ self->push_back(x); } @@ -4935,18 +4959,11 @@ SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) SWIGINTERN int SWIG_AsVal_bool (PyObject *obj, bool *val) { - if (obj == Py_True) { - if (val) *val = true; - return SWIG_OK; - } else if (obj == Py_False) { - if (val) *val = false; - return SWIG_OK; - } else { - long v = 0; - int res = SWIG_AddCast(SWIG_AsVal_long (obj, val ? &v : 0)); - if (SWIG_IsOK(res) && val) *val = v ? true : false; - return res; - } + int r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; } @@ -4959,49 +4976,49 @@ SWIG_AsVal_bool (PyObject *obj, bool *val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewShape" " *," "std::allocator" " >"; + return "std::vector<" "ViewShape" " *," "std::allocator< ViewShape * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewShape_Sm__Sg__iterator(std::vector< ViewShape * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewShape_Sm__Sg____nonzero__(std::vector< ViewShape * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewShape * >::size_type std_vector_Sl_ViewShape_Sm__Sg____len__(std::vector< ViewShape * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg__pop(std::vector< ViewShape * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewShape *,std::allocator< ViewShape * > > *std_vector_Sl_ViewShape_Sm__Sg____getslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j,std::vector< ViewShape *,std::allocator< ViewShape * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delslice__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____delitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewShape * >::value_type std_vector_Sl_ViewShape_Sm__Sg____getitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg____setitem__(std::vector< ViewShape * > *self,std::vector< ViewShape * >::difference_type i,std::vector< ViewShape * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector< ViewShape * > *self,std::vector< ViewShape * >::value_type x){ self->push_back(x); } @@ -5014,49 +5031,49 @@ SWIGINTERN void std_vector_Sl_ViewShape_Sm__Sg__append(std::vector namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewEdge" " *," "std::allocator" " >"; + return "std::vector<" "ViewEdge" " *," "std::allocator< ViewEdge * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewEdge_Sm__Sg__iterator(std::vector< ViewEdge * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewEdge_Sm__Sg____nonzero__(std::vector< ViewEdge * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewEdge * >::size_type std_vector_Sl_ViewEdge_Sm__Sg____len__(std::vector< ViewEdge * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg__pop(std::vector< ViewEdge * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewEdge *,std::allocator< ViewEdge * > > *std_vector_Sl_ViewEdge_Sm__Sg____getslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j,std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delslice__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____delitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewEdge * >::value_type std_vector_Sl_ViewEdge_Sm__Sg____getitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg____setitem__(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::difference_type i,std::vector< ViewEdge * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector< ViewEdge * > *self,std::vector< ViewEdge * >::value_type x){ self->push_back(x); } @@ -5069,49 +5086,49 @@ SWIGINTERN void std_vector_Sl_ViewEdge_Sm__Sg__append(std::vector * namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "FEdge" " *," "std::allocator" " >"; + return "std::vector<" "FEdge" " *," "std::allocator< FEdge * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_FEdge_Sm__Sg__iterator(std::vector< FEdge * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_FEdge_Sm__Sg____nonzero__(std::vector< FEdge * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< FEdge * >::size_type std_vector_Sl_FEdge_Sm__Sg____len__(std::vector< FEdge * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg__pop(std::vector< FEdge * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< FEdge *,std::allocator< FEdge * > > *std_vector_Sl_FEdge_Sm__Sg____getslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j,std::vector< FEdge *,std::allocator< FEdge * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delslice__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____delitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< FEdge * >::value_type std_vector_Sl_FEdge_Sm__Sg____getitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg____setitem__(std::vector< FEdge * > *self,std::vector< FEdge * >::difference_type i,std::vector< FEdge * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector< FEdge * > *self,std::vector< FEdge * >::value_type x){ self->push_back(x); } @@ -5124,49 +5141,49 @@ SWIGINTERN void std_vector_Sl_FEdge_Sm__Sg__append(std::vector *self,s namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "ViewVertex" " *," "std::allocator" " >"; + return "std::vector<" "ViewVertex" " *," "std::allocator< ViewVertex * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_ViewVertex_Sm__Sg__iterator(std::vector< ViewVertex * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_ViewVertex_Sm__Sg____nonzero__(std::vector< ViewVertex * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< ViewVertex * >::size_type std_vector_Sl_ViewVertex_Sm__Sg____len__(std::vector< ViewVertex * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg__pop(std::vector< ViewVertex * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< ViewVertex *,std::allocator< ViewVertex * > > *std_vector_Sl_ViewVertex_Sm__Sg____getslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j,std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delslice__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____delitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< ViewVertex * >::value_type std_vector_Sl_ViewVertex_Sm__Sg____getitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg____setitem__(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::difference_type i,std::vector< ViewVertex * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector< ViewVertex * > *self,std::vector< ViewVertex * >::value_type x){ self->push_back(x); } @@ -5179,49 +5196,49 @@ SWIGINTERN void std_vector_Sl_ViewVertex_Sm__Sg__append(std::vector struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "SVertex" " *," "std::allocator" " >"; + return "std::vector<" "SVertex" " *," "std::allocator< SVertex * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_SVertex_Sm__Sg__iterator(std::vector< SVertex * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_SVertex_Sm__Sg____nonzero__(std::vector< SVertex * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< SVertex * >::size_type std_vector_Sl_SVertex_Sm__Sg____len__(std::vector< SVertex * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg__pop(std::vector< SVertex * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< SVertex *,std::allocator< SVertex * > > *std_vector_Sl_SVertex_Sm__Sg____getslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j,std::vector< SVertex *,std::allocator< SVertex * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delslice__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____delitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< SVertex * >::value_type std_vector_Sl_SVertex_Sm__Sg____getitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg____setitem__(std::vector< SVertex * > *self,std::vector< SVertex * >::difference_type i,std::vector< SVertex * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_SVertex_Sm__Sg__append(std::vector< SVertex * > *self,std::vector< SVertex * >::value_type x){ self->push_back(x); } @@ -5320,49 +5337,49 @@ SWIG_AsPtr_std_string (PyObject * obj, std::string **val) namespace swig { - template <> struct traits > > { + template <> struct traits > > { typedef value_category category; static const char* type_name() { - return "std::vector<" "StrokeShader" " *," "std::allocator" " >"; + return "std::vector<" "StrokeShader" " *," "std::allocator< StrokeShader * >" " >"; } }; } -SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector *self,PyObject **PYTHON_SELF){ +SWIGINTERN swig::PySwigIterator *std_vector_Sl_StrokeShader_Sm__Sg__iterator(std::vector< StrokeShader * > *self,PyObject **PYTHON_SELF){ return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF); } -SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector const *self){ +SWIGINTERN bool std_vector_Sl_StrokeShader_Sm__Sg____nonzero__(std::vector< StrokeShader * > const *self){ return !(self->empty()); } -SWIGINTERN std::vector::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector const *self){ +SWIGINTERN std::vector< StrokeShader * >::size_type std_vector_Sl_StrokeShader_Sm__Sg____len__(std::vector< StrokeShader * > const *self){ return self->size(); } -SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector *self){ +SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg__pop(std::vector< StrokeShader * > *self){ if (self->size() == 0) throw std::out_of_range("pop from empty container"); - std::vector >::value_type x = self->back(); + std::vector >::value_type x = self->back(); self->pop_back(); return x; } -SWIGINTERN std::vector > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN std::vector< StrokeShader *,std::allocator< StrokeShader * > > *std_vector_Sl_StrokeShader_Sm__Sg____getslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ return swig::getslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j,std::vector > const &v){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j,std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &v){ swig::setslice(self, i, j, v); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector *self,std::vector::difference_type i,std::vector::difference_type j){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delslice__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::difference_type j){ swig::delslice(self, i, j); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____delitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ self->erase(swig::getpos(self,i)); } -SWIGINTERN std::vector::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector *self,std::vector::difference_type i){ +SWIGINTERN std::vector< StrokeShader * >::value_type std_vector_Sl_StrokeShader_Sm__Sg____getitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i){ return *(swig::cgetpos(self, i)); } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector *self,std::vector::difference_type i,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg____setitem__(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::difference_type i,std::vector< StrokeShader * >::value_type x){ *(swig::getpos(self,i)) = x; } -SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector *self,std::vector::value_type x){ +SWIGINTERN void std_vector_Sl_StrokeShader_Sm__Sg__append(std::vector< StrokeShader * > *self,std::vector< StrokeShader * >::value_type x){ self->push_back(x); } @@ -5448,7 +5465,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -5481,7 +5498,7 @@ ViewEdge *SwigDirector_ViewEdgeViewEdgeIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -5668,8 +5685,8 @@ bool SwigDirector_ViewEdgeViewEdgeIterator::operator !=(ViewEdgeInternal::ViewEd } -SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVoid::SwigDirector_UnaryFunction0DVoid(PyObject *self): UnaryFunction0D< void >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< void > *)this, this); } @@ -5731,8 +5748,8 @@ void SwigDirector_UnaryFunction0DVoid::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DUnsigned::SwigDirector_UnaryFunction0DUnsigned(PyObject *self): UnaryFunction0D< unsigned int >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< unsigned int > *)this, this); } @@ -5802,8 +5819,8 @@ unsigned int SwigDirector_UnaryFunction0DUnsigned::operator ()(Interface0DIterat } -SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DFloat::SwigDirector_UnaryFunction0DFloat(PyObject *self): UnaryFunction0D< float >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< float > *)this, this); } @@ -5873,8 +5890,8 @@ float SwigDirector_UnaryFunction0DFloat::operator ()(Interface0DIterator &iter) } -SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DDouble::SwigDirector_UnaryFunction0DDouble(PyObject *self): UnaryFunction0D< double >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< double > *)this, this); } @@ -5944,8 +5961,8 @@ double SwigDirector_UnaryFunction0DDouble::operator ()(Interface0DIterator &iter } -SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVec2f::SwigDirector_UnaryFunction0DVec2f(PyObject *self): UnaryFunction0D< Geometry::Vec2f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec2f > *)this, this); } @@ -5984,11 +6001,11 @@ std::string SwigDirector_UnaryFunction0DVec2f::getName() const { } -VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { +VecMat::Vec2< float > SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2 c_result; + VecMat::Vec2< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6008,18 +6025,18 @@ VecMat::Vec2 SwigDirector_UnaryFunction0DVec2f::operator ()(Interface0DI Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); - return (VecMat::Vec2) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); + return (VecMat::Vec2< float >) c_result; } -SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DVec3f::SwigDirector_UnaryFunction0DVec3f(PyObject *self): UnaryFunction0D< Geometry::Vec3f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Geometry::Vec3f > *)this, this); } @@ -6058,11 +6075,11 @@ std::string SwigDirector_UnaryFunction0DVec3f::getName() const { } -VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { +VecMat::Vec3< float > SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DIterator &iter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3 c_result; + VecMat::Vec3< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&iter), SWIGTYPE_p_Interface0DIterator, 0 ); if (!swig_get_self()) { @@ -6082,18 +6099,18 @@ VecMat::Vec3 SwigDirector_UnaryFunction0DVec3f::operator ()(Interface0DI Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction0DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); - return (VecMat::Vec3) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); + return (VecMat::Vec3< float >) c_result; } -SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction0D *)this, this); +SwigDirector_UnaryFunction0DId::SwigDirector_UnaryFunction0DId(PyObject *self): UnaryFunction0D< Id >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction0D< Id > *)this, this); } @@ -6166,15 +6183,15 @@ Id SwigDirector_UnaryFunction0DId::operator ()(Interface0DIterator &iter) { } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self): UnaryFunction1D< void >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); } -SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVoid::SwigDirector_UnaryFunction1DVoid(PyObject *self, IntegrationType iType): UnaryFunction1D< void >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< void > *)this, this); } @@ -6236,15 +6253,15 @@ void SwigDirector_UnaryFunction1DVoid::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self): UnaryFunction1D< unsigned int >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); } -SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DUnsigned::SwigDirector_UnaryFunction1DUnsigned(PyObject *self, IntegrationType iType): UnaryFunction1D< unsigned int >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< unsigned int > *)this, this); } @@ -6314,15 +6331,15 @@ unsigned int SwigDirector_UnaryFunction1DUnsigned::operator ()(Interface1D &inte } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self): UnaryFunction1D< float >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); } -SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DFloat::SwigDirector_UnaryFunction1DFloat(PyObject *self, IntegrationType iType): UnaryFunction1D< float >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< float > *)this, this); } @@ -6392,15 +6409,15 @@ float SwigDirector_UnaryFunction1DFloat::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self): UnaryFunction1D< double >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); } -SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DDouble::SwigDirector_UnaryFunction1DDouble(PyObject *self, IntegrationType iType): UnaryFunction1D< double >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< double > *)this, this); } @@ -6470,15 +6487,15 @@ double SwigDirector_UnaryFunction1DDouble::operator ()(Interface1D &inter) { } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self): UnaryFunction1D< Geometry::Vec2f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); } -SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec2f::SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec2f >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec2f > *)this, this); } @@ -6517,11 +6534,11 @@ std::string SwigDirector_UnaryFunction1DVec2f::getName() const { } -VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { +VecMat::Vec2< float > SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec2 c_result; + VecMat::Vec2< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6541,25 +6558,25 @@ VecMat::Vec2 SwigDirector_UnaryFunction1DVec2f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec2f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec2< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec2 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2 * >(swig_argp); - return (VecMat::Vec2) c_result; + c_result = *(reinterpret_cast< VecMat::Vec2< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec2< float > * >(swig_argp); + return (VecMat::Vec2< float >) c_result; } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D(), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self): UnaryFunction1D< Geometry::Vec3f >(), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); } -SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D(iType), Swig::Director(self) { - SWIG_DIRECTOR_RGTR((UnaryFunction1D *)this, this); +SwigDirector_UnaryFunction1DVec3f::SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType): UnaryFunction1D< Geometry::Vec3f >(iType), Swig::Director(self) { + SWIG_DIRECTOR_RGTR((UnaryFunction1D< Geometry::Vec3f > *)this, this); } @@ -6598,11 +6615,11 @@ std::string SwigDirector_UnaryFunction1DVec3f::getName() const { } -VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { +VecMat::Vec3< float > SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D &inter) { void *swig_argp ; int swig_res = 0 ; - VecMat::Vec3 c_result; + VecMat::Vec3< float > c_result; swig::PyObject_var obj0; obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&inter), SWIGTYPE_p_Interface1D, 0 ); if (!swig_get_self()) { @@ -6622,13 +6639,13 @@ VecMat::Vec3 SwigDirector_UnaryFunction1DVec3f::operator ()(Interface1D Swig::DirectorMethodException::raise("Error detected when calling 'UnaryFunction1DVec3f.__call__'"); } } - swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + swig_res = SWIG_ConvertPtr(result,&swig_argp,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(swig_res)) { - Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3""'"); + Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""VecMat::Vec3< float >""'"); } - c_result = *(reinterpret_cast< VecMat::Vec3 * >(swig_argp)); - if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3 * >(swig_argp); - return (VecMat::Vec3) c_result; + c_result = *(reinterpret_cast< VecMat::Vec3< float > * >(swig_argp)); + if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< VecMat::Vec3< float > * >(swig_argp); + return (VecMat::Vec3< float >) c_result; } @@ -6707,7 +6724,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -6740,7 +6757,7 @@ ViewEdge *SwigDirector_ChainingIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -6978,7 +6995,7 @@ ViewEdge *SwigDirector_ChainingIterator::traverse(AdjacencyIterator const &it) { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7058,7 +7075,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7091,7 +7108,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7329,7 +7346,7 @@ ViewEdge *SwigDirector_ChainSilhouetteIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7416,7 +7433,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator *() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7449,7 +7466,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::operator ->() { Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -7687,7 +7704,7 @@ ViewEdge *SwigDirector_ChainPredicateIterator::traverse(AdjacencyIterator const Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""ViewEdge *""'"); } c_result = reinterpret_cast< ViewEdge * >(swig_argp); - swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own); + swig_acquire_ownership_obj(SWIG_as_voidptr(c_result), own /* & TODO: SWIG_POINTER_OWN */); return (ViewEdge *) c_result; } @@ -8106,7 +8123,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8136,7 +8153,10 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_incr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n Possible C/C++ prototypes are:\n incr(size_t)\n incr()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_incr'.\n" + " Possible C/C++ prototypes are:\n" + " incr(swig::PySwigIterator *,size_t)\n" + " incr(swig::PySwigIterator *)\n"); return NULL; } @@ -8220,7 +8240,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8250,7 +8270,10 @@ SWIGINTERN PyObject *_wrap_PySwigIterator_decr(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n Possible C/C++ prototypes are:\n decr(size_t)\n decr()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'PySwigIterator_decr'.\n" + " Possible C/C++ prototypes are:\n" + " decr(swig::PySwigIterator *,size_t)\n" + " decr(swig::PySwigIterator *)\n"); return NULL; } @@ -8740,7 +8763,7 @@ SWIGINTERN PyObject *_wrap_PySwigIterator___sub__(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -8781,14 +8804,14 @@ fail: SWIGINTERN PyObject *PySwigIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_swig__PySwigIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -8797,11 +8820,11 @@ SWIGINTERN PyObject *_wrap_vectorInt_iterator(PyObject *SWIGUNUSEDPARM(self), Py arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); result = (swig::PySwigIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__PySwigIterator, SWIG_POINTER_OWN | 0 ); return resultobj; @@ -8812,19 +8835,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector const *)arg1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -8834,19 +8857,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = std_vector_Sl_int_Sg____len__((std::vector const *)arg1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -8856,20 +8879,20 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); try { - result = (std::vector::value_type)std_vector_Sl_int_Sg__pop(arg1); + result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -8884,10 +8907,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8899,29 +8922,29 @@ SWIGINTERN PyObject *_wrap_vectorInt___getslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); try { - result = (std::vector > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -8930,10 +8953,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; + std::vector< int,std::allocator< int > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -8947,34 +8970,34 @@ SWIGINTERN PyObject *_wrap_vectorInt___setslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); } arg4 = ptr; } try { - std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_int_Sg____setslice__(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -8994,9 +9017,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9008,21 +9031,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___delslice__(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< int >::difference_type >(val3); try { std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3); } @@ -9039,8 +9062,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9049,16 +9072,16 @@ SWIGINTERN PyObject *_wrap_vectorInt___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); try { std_vector_Sl_int_Sg____delitem__(arg1,arg2); } @@ -9075,9 +9098,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -9086,20 +9109,20 @@ SWIGINTERN PyObject *_wrap_vectorInt___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); try { { - std::vector::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector const *)arg1,arg2); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = std_vector_Sl_int_Sg____getitem__((std::vector< int > const *)arg1,arg2); + result = (std::vector< int >::value_type *) &_result_ref; } } catch(std::out_of_range &_e) { @@ -9115,14 +9138,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::difference_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -9130,21 +9153,21 @@ SWIGINTERN PyObject *_wrap_vectorInt___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< int >::difference_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; try { std_vector_Sl_int_Sg____setitem__(arg1,arg2,(int const &)*arg3); @@ -9162,27 +9185,27 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_append" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2); resultobj = SWIG_Py_Void(); @@ -9194,11 +9217,11 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_vectorInt")) SWIG_fail; - result = (std::vector *)new std::vector(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9207,25 +9230,25 @@ fail: SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< int > *arg1 = 0 ; + std::vector< int > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int > const &""'"); } arg1 = ptr; } - result = (std::vector *)new std::vector((std::vector const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -9236,19 +9259,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (bool)((std::vector const *)arg1)->empty(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = (bool)((std::vector< int > const *)arg1)->empty(); resultobj = SWIG_From_bool(static_cast< bool >(result)); return resultobj; fail: @@ -9258,19 +9281,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->size(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->size(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -9280,17 +9303,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->clear(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9301,8 +9324,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -9311,19 +9334,19 @@ SWIGINTERN PyObject *_wrap_vectorInt_swap(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vectorInt_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< int > * >(argp2); (arg1)->swap(*arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9334,42 +9357,42 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + SwigValueWrapper< std::allocator< int > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->get_allocator(); - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->get_allocator(); + resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->begin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9377,78 +9400,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->begin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->end(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9456,78 +9423,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->end(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->rbegin(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9535,78 +9446,22 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->rbegin(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = (arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->rend(); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9614,66 +9469,10 @@ fail: } -SWIGINTERN PyObject *_wrap_vectorInt_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->rend(); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_vectorInt_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_vectorInt_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< int >::size_type arg1 ; + std::vector< int > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -9681,11 +9480,11 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_2(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"O:new_vectorInt",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - result = (std::vector *)new std::vector(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + arg1 = static_cast< std::vector< int >::size_type >(val1); + result = (std::vector< int > *)new std::vector< int >(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9694,17 +9493,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); (arg1)->pop_back(); resultobj = SWIG_Py_Void(); return resultobj; @@ -9715,8 +9514,8 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -9725,16 +9524,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->resize(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -9745,9 +9544,9 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9756,24 +9555,24 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9783,10 +9582,10 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::iterator arg3 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -9798,35 +9597,35 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'"); } } result = (arg1)->erase(arg2,arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -9840,18 +9639,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_0(self, args); } @@ -9859,16 +9658,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_vectorInt_erase__SWIG_1(self, args); } @@ -9877,19 +9676,22 @@ SWIGINTERN PyObject *_wrap_vectorInt_erase(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< int > *,std::vector< int >::iterator)\n" + " erase(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type *arg2 = 0 ; - std::vector *result = 0 ; + std::vector< int >::size_type arg1 ; + std::vector< int >::value_type *arg2 = 0 ; + std::vector< int > *result = 0 ; size_t val1 ; int ecode1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -9898,17 +9700,17 @@ SWIGINTERN PyObject *_wrap_new_vectorInt__SWIG_3(PyObject *SWIGUNUSEDPARM(self), if (!PyArg_ParseTuple(args,(char *)"OO:new_vectorInt",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vectorInt" "', argument " "1"" of type '" "std::vector< int >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< int >::size_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vectorInt" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; - result = (std::vector *)new std::vector(arg1,(std::vector::value_type const &)*arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_NEW | 0 ); + result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -9921,7 +9723,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -9940,7 +9742,7 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_vectorInt__SWIG_1(self, args); @@ -9964,36 +9766,41 @@ SWIGINTERN PyObject *_wrap_new_vectorInt(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n Possible C/C++ prototypes are:\n std::vector<(int)>()\n std::vector<(int)>(std::vector const &)\n std::vector<(int)>(std::vector::size_type)\n std::vector<(int)>(std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_vectorInt'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< int >()\n" + " std::vector< int >(std::vector< int > const &)\n" + " std::vector< int >(std::vector< int >::size_type)\n" + " std::vector< int >(std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *arg2 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; - std::vector::value_type temp2 ; + std::vector< int >::value_type temp2 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'"); } - temp2 = static_cast< std::vector::value_type >(val2); + temp2 = static_cast< std::vector< int >::value_type >(val2); arg2 = &temp2; - (arg1)->push_back((std::vector::value_type const &)*arg2); + (arg1)->push_back((std::vector< int >::value_type const &)*arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10003,21 +9810,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { - std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->front(); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->front(); + result = (std::vector< int >::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -10028,21 +9835,21 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type *result = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { - std::vector::value_type const &_result_ref = ((std::vector const *)arg1)->back(); - result = (std::vector::value_type *) &_result_ref; + std::vector< int >::value_type const &_result_ref = ((std::vector< int > const *)arg1)->back(); + result = (std::vector< int >::value_type *) &_result_ref; } resultobj = SWIG_From_int(static_cast< int >(*result)); return resultobj; @@ -10053,14 +9860,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10068,23 +9875,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_assign(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - (arg1)->assign(arg2,(std::vector::value_type const &)*arg3); + (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10094,14 +9901,14 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type *arg3 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; + std::vector< int >::value_type *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; int ecode2 = 0 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10109,23 +9916,23 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - (arg1)->resize(arg2,(std::vector::value_type const &)*arg3); + (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10139,13 +9946,13 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -10159,7 +9966,7 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -10179,22 +9986,25 @@ SWIGINTERN PyObject *_wrap_vectorInt_resize(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< int > *,std::vector< int >::size_type)\n" + " resize(std::vector< int > *,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type *arg3 = 0 ; - std::vector::iterator result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::value_type *arg3 = 0 ; + std::vector< int >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; - std::vector::value_type temp3 ; + std::vector< int >::value_type temp3 ; int val3 ; int ecode3 = 0 ; PyObject * obj0 = 0 ; @@ -10202,30 +10012,30 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(sel PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:vectorInt_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'"); } - temp3 = static_cast< std::vector::value_type >(val3); + temp3 = static_cast< std::vector< int >::value_type >(val3); arg3 = &temp3; - result = (arg1)->insert(arg2,(std::vector::value_type const &)*arg3); - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + result = (arg1)->insert(arg2,(std::vector< int >::value_type const &)*arg3); + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -10235,17 +10045,17 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type *arg4 = 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::iterator arg2 ; + std::vector< int >::size_type arg3 ; + std::vector< int >::value_type *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; int res2 ; size_t val3 ; int ecode3 = 0 ; - std::vector::value_type temp4 ; + std::vector< int >::value_type temp4 ; int val4 ; int ecode4 = 0 ; PyObject * obj0 = 0 ; @@ -10254,34 +10064,34 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(sel PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:vectorInt_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "vectorInt_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vectorInt_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); + arg3 = static_cast< std::vector< int >::size_type >(val3); ecode4 = SWIG_AsVal_int(obj3, &val4); if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vectorInt_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'"); } - temp4 = static_cast< std::vector::value_type >(val4); + temp4 = static_cast< std::vector< int >::value_type >(val4); arg4 = &temp4; - (arg1)->insert(arg2,arg3,(std::vector::value_type const &)*arg4); + (arg1)->insert(arg2,arg3,(std::vector< int >::value_type const &)*arg4); resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -10295,18 +10105,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_int(argv[2], NULL); @@ -10320,12 +10130,12 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -10345,15 +10155,18 @@ SWIGINTERN PyObject *_wrap_vectorInt_insert(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type const &)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'vectorInt_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::value_type const &)\n" + " insert(std::vector< int > *,std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -10362,16 +10175,16 @@ SWIGINTERN PyObject *_wrap_vectorInt_reserve(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:vectorInt_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vectorInt_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< int >::size_type >(val2); (arg1)->reserve(arg2); resultobj = SWIG_Py_Void(); return resultobj; @@ -10382,19 +10195,19 @@ fail: SWIGINTERN PyObject *_wrap_vectorInt_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; + std::vector< int >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:vectorInt_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vectorInt_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - result = ((std::vector const *)arg1)->capacity(); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); + result = ((std::vector< int > const *)arg1)->capacity(); resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: @@ -10404,17 +10217,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_vectorInt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< int > *arg1 = (std::vector< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_vectorInt",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vectorInt" "', argument " "1"" of type '" "std::vector< int > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< int > * >(argp1); { try { delete arg1; @@ -10436,8 +10249,8 @@ fail: SWIGINTERN PyObject *vectorInt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTint_std__allocatorTint_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -10578,7 +10391,7 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -10621,7 +10434,12 @@ SWIGINTERN PyObject *_wrap_new_Id(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n Possible C/C++ prototypes are:\n Id()\n Id(Id::id_type)\n Id(Id::id_type,Id::id_type)\n Id(Id const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Id'.\n" + " Possible C/C++ prototypes are:\n" + " Id()\n" + " Id(Id::id_type)\n" + " Id(Id::id_type,Id::id_type)\n" + " Id(Id const &)\n"); return NULL; } @@ -10936,19 +10754,19 @@ fail: SWIGINTERN PyObject *Id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Id, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2u")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< unsigned int,2 > *)new VecMat::Vec< unsigned int,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -10957,7 +10775,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -10966,17 +10784,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { delete arg1; @@ -11003,7 +10821,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< unsigned int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11021,21 +10839,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11053,21 +10871,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11085,23 +10903,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11111,7 +10929,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11120,23 +10938,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< unsigned int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11146,7 +10964,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11155,9 +10973,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11166,22 +10984,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator +((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11190,7 +11008,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11199,9 +11017,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11210,22 +11028,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator -((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11234,7 +11052,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11243,9 +11061,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type arg2 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11254,19 +11072,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11275,7 +11093,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11284,9 +11102,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 >::value_type arg2 ; + VecMat::Vec< unsigned int,2 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -11295,19 +11113,19 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< unsigned int,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11316,7 +11134,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,2 >(static_cast< const VecMat::Vec< unsigned int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11325,9 +11143,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; + VecMat::Vec< unsigned int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11336,22 +11154,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< unsigned int,2 >::value_type)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator *((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11373,17 +11191,17 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2u___mul____SWIG_1(self, args); @@ -11393,7 +11211,7 @@ SWIGINTERN PyObject *_wrap_Vec_2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -11414,8 +11232,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11425,22 +11243,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11458,8 +11276,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11469,22 +11287,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11502,8 +11320,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11513,22 +11331,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator <((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11546,8 +11364,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,2 > *arg1 = (VecMat::Vec< unsigned int,2 > *) 0 ; + VecMat::Vec< unsigned int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -11557,22 +11375,22 @@ SWIGINTERN PyObject *_wrap_Vec_2u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,2 > const *)arg1)->operator >((VecMat::Vec< unsigned int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11590,19 +11408,19 @@ fail: SWIGINTERN PyObject *Vec_2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2i")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< int,2 > *)new VecMat::Vec< int,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11611,7 +11429,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -11620,17 +11438,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2i" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { delete arg1; @@ -11657,7 +11475,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< int,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11675,21 +11493,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11707,21 +11525,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11739,23 +11557,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11765,7 +11583,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11774,23 +11592,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< int,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -11800,7 +11618,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -11809,9 +11627,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11820,22 +11638,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator +((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11844,7 +11662,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11853,9 +11671,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11864,22 +11682,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator -((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11888,7 +11706,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11897,9 +11715,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type arg2 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11908,19 +11726,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11929,7 +11747,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11938,9 +11756,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 >::value_type arg2 ; + VecMat::Vec< int,2 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -11949,19 +11767,19 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< int,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -11970,7 +11788,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,2 >(static_cast< const VecMat::Vec< int,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -11979,9 +11797,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; + VecMat::Vec< int,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -11990,22 +11808,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< int,2 >::value_type)((VecMat::Vec< int,2 > const *)arg1)->operator *((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12027,17 +11845,17 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2i___mul____SWIG_1(self, args); @@ -12047,7 +11865,7 @@ SWIGINTERN PyObject *_wrap_Vec_2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -12068,8 +11886,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12079,22 +11897,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator ==((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12112,8 +11930,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12123,22 +11941,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator !=((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12156,8 +11974,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12167,22 +11985,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator <((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12200,8 +12018,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,2 > *arg1 = (VecMat::Vec< int,2 > *) 0 ; + VecMat::Vec< int,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12211,22 +12029,22 @@ SWIGINTERN PyObject *_wrap_Vec_2i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,2 > const *)arg1)->operator >((VecMat::Vec< int,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12244,19 +12062,19 @@ fail: SWIGINTERN PyObject *Vec_2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2d")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< double,2 > *)new VecMat::Vec< double,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12265,7 +12083,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12274,17 +12092,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2d" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { delete arg1; @@ -12311,7 +12129,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< double,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12329,21 +12147,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12361,21 +12179,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12393,23 +12211,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< double,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12419,7 +12237,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12428,23 +12246,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< double,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -12454,7 +12272,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -12463,9 +12281,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12474,22 +12292,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator +((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12498,7 +12316,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12507,9 +12325,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12518,22 +12336,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator -((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12542,7 +12360,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12551,9 +12369,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type arg2 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12562,19 +12380,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12583,7 +12401,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12592,9 +12410,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 >::value_type arg2 ; + VecMat::Vec< double,2 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -12603,19 +12421,19 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< double,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12624,7 +12442,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,2 >(static_cast< const VecMat::Vec< double,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -12633,9 +12451,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; + VecMat::Vec< double,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -12644,22 +12462,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< double,2 >::value_type)((VecMat::Vec< double,2 > const *)arg1)->operator *((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12681,17 +12499,17 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2d___mul____SWIG_1(self, args); @@ -12701,7 +12519,7 @@ SWIGINTERN PyObject *_wrap_Vec_2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -12722,8 +12540,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12733,22 +12551,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator ==((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12766,8 +12584,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12777,22 +12595,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator !=((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12810,8 +12628,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12821,22 +12639,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator <((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12854,8 +12672,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,2 > *arg1 = (VecMat::Vec< double,2 > *) 0 ; + VecMat::Vec< double,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -12865,22 +12683,22 @@ SWIGINTERN PyObject *_wrap_Vec_2d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,2 > const *)arg1)->operator >((VecMat::Vec< double,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12898,19 +12716,19 @@ fail: SWIGINTERN PyObject *Vec_2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_2f")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< float,2 > *)new VecMat::Vec< float,2 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12919,7 +12737,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -12928,17 +12746,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_2f" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { delete arg1; @@ -12965,7 +12783,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_2f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< float,2 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -12983,21 +12801,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13015,21 +12833,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13047,23 +12865,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,2 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< float,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13073,7 +12891,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -13082,23 +12900,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_2f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,2 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,2 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< float,2 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13108,7 +12926,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -13117,9 +12935,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13128,22 +12946,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator +((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13152,7 +12970,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13161,9 +12979,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13172,22 +12990,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator -((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13196,7 +13014,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13205,9 +13023,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type arg2 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13216,19 +13034,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13237,7 +13055,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13246,9 +13064,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 >::value_type arg2 ; + VecMat::Vec< float,2 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -13257,19 +13075,19 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_2f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,2 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,2 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< float,2 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13278,7 +13096,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,2 >(static_cast< const VecMat::Vec< float,2 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -13287,9 +13105,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; + VecMat::Vec< float,2 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13298,22 +13116,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< float,2 >::value_type)((VecMat::Vec< float,2 > const *)arg1)->operator *((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13335,17 +13153,17 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_2f___mul____SWIG_1(self, args); @@ -13355,7 +13173,7 @@ SWIGINTERN PyObject *_wrap_Vec_2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_2_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -13376,8 +13194,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13387,22 +13205,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator ==((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13420,8 +13238,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13431,22 +13249,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator !=((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13464,8 +13282,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13475,22 +13293,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator <((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13508,8 +13326,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,2 > *arg1 = (VecMat::Vec< float,2 > *) 0 ; + VecMat::Vec< float,2 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -13519,22 +13337,22 @@ SWIGINTERN PyObject *_wrap_Vec_2f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_2f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_2f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,2 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_2_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_2_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_2f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,2 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,2 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,2 > const *)arg1)->operator >((VecMat::Vec< float,2 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13552,19 +13370,19 @@ fail: SWIGINTERN PyObject *Vec_2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_2_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_2_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2u")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13573,7 +13391,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13582,9 +13400,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int >::value_type arg1 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -13595,17 +13413,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2u" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13614,7 +13432,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13623,8 +13441,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< unsigned int >::value_type arg1 ; + VecMat::Vec2< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -13632,12 +13450,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< unsigned int > *)new VecMat::Vec2< unsigned int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13646,7 +13464,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -13659,7 +13477,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -13694,28 +13512,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(unsigned int)>()\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(unsigned int)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2u'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< unsigned int >()\n" + " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const,VecMat::Vec2< unsigned int >::value_type const)\n" + " VecMat::Vec2< unsigned int >(VecMat::Vec2< unsigned int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13733,23 +13555,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_x" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13772,14 +13594,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_0(self, args); @@ -13788,7 +13610,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_x__SWIG_1(self, args); @@ -13796,28 +13618,31 @@ SWIGINTERN PyObject *_wrap_Vec2u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< unsigned int > const *)\n" + " x(VecMat::Vec2< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -13835,23 +13660,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_y" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< unsigned int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -13874,14 +13699,14 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_0(self, args); @@ -13890,7 +13715,7 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u_y__SWIG_1(self, args); @@ -13898,15 +13723,18 @@ SWIGINTERN PyObject *_wrap_Vec2u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2u_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< unsigned int > const *)\n" + " y(VecMat::Vec2< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13915,16 +13743,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setX" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setX" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -13945,8 +13773,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -13955,16 +13783,16 @@ SWIGINTERN PyObject *_wrap_Vec2u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u_setY" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u_setY" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -13985,9 +13813,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -13996,22 +13824,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___add__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___add__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator +((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14020,7 +13848,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14029,9 +13857,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14040,22 +13868,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___sub__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___sub__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator -((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14064,7 +13892,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14073,9 +13901,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -14084,19 +13912,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14105,7 +13933,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14114,9 +13942,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int >::value_type arg2 ; + VecMat::Vec2< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -14125,19 +13953,19 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___div__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2u___div__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< unsigned int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14146,7 +13974,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< unsigned int >(static_cast< const VecMat::Vec2< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14155,9 +13983,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; + VecMat::Vec2< unsigned int > *arg2 = 0 ; + VecMat::Vec2< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14166,22 +13994,22 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2u___mul__" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2u___mul__" "', argument " "2"" of type '" "VecMat::Vec2< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< unsigned int >::value_type)((VecMat::Vec2< unsigned int > const *)arg1)->operator *((VecMat::Vec2< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14203,17 +14031,17 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2u___mul____SWIG_1(self, args); @@ -14223,7 +14051,7 @@ SWIGINTERN PyObject *_wrap_Vec2u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14244,17 +14072,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< unsigned int > *arg1 = (VecMat::Vec2< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2u" "', argument " "1"" of type '" "VecMat::Vec2< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< unsigned int > * >(argp1); { try { delete arg1; @@ -14276,19 +14104,19 @@ fail: SWIGINTERN PyObject *Vec2u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2i")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14297,7 +14125,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14306,9 +14134,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int >::value_type arg1 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -14319,17 +14147,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2i" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14338,7 +14166,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14347,8 +14175,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< int >::value_type arg1 ; + VecMat::Vec2< int > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -14356,12 +14184,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< int >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< int > *)new VecMat::Vec2< int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14370,7 +14198,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -14383,7 +14211,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -14418,28 +14246,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(int)>()\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(int)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2i'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< int >()\n" + " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const,VecMat::Vec2< int >::value_type const)\n" + " VecMat::Vec2< int >(VecMat::Vec2< int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14457,23 +14289,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_x" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14496,14 +14328,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_0(self, args); @@ -14512,7 +14344,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_x__SWIG_1(self, args); @@ -14520,28 +14352,31 @@ SWIGINTERN PyObject *_wrap_Vec2i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< int > const *)\n" + " x(VecMat::Vec2< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14559,23 +14394,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_y" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -14598,14 +14433,14 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_0(self, args); @@ -14614,7 +14449,7 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i_y__SWIG_1(self, args); @@ -14622,15 +14457,18 @@ SWIGINTERN PyObject *_wrap_Vec2i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2i_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< int > const *)\n" + " y(VecMat::Vec2< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14639,16 +14477,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setX" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setX" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -14669,8 +14507,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14679,16 +14517,16 @@ SWIGINTERN PyObject *_wrap_Vec2i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i_setY" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i_setY" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -14709,9 +14547,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14720,22 +14558,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___add__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___add__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator +((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14744,7 +14582,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14753,9 +14591,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14764,22 +14602,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___sub__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___sub__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator -((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14788,7 +14626,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14797,9 +14635,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14808,19 +14646,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14829,7 +14667,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14838,9 +14676,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int >::value_type arg2 ; + VecMat::Vec2< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -14849,19 +14687,19 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___div__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2i___div__" "', argument " "2"" of type '" "VecMat::Vec2< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< int >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14870,7 +14708,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< int >(static_cast< const VecMat::Vec2< int >& >(result))), SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -14879,9 +14717,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; + VecMat::Vec2< int > *arg2 = 0 ; + VecMat::Vec2< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -14890,22 +14728,22 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2i___mul__" "', argument " "1"" of type '" "VecMat::Vec2< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2i___mul__" "', argument " "2"" of type '" "VecMat::Vec2< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< int > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< int >::value_type)((VecMat::Vec2< int > const *)arg1)->operator *((VecMat::Vec2< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -14927,17 +14765,17 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2i___mul____SWIG_1(self, args); @@ -14947,7 +14785,7 @@ SWIGINTERN PyObject *_wrap_Vec2i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -14968,17 +14806,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< int > *arg1 = (VecMat::Vec2< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2i" "', argument " "1"" of type '" "VecMat::Vec2< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< int > * >(argp1); { try { delete arg1; @@ -15000,19 +14838,19 @@ fail: SWIGINTERN PyObject *Vec2i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tint_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2f")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15021,7 +14859,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15030,9 +14868,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float >::value_type arg1 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -15043,17 +14881,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2f" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15062,7 +14900,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15071,8 +14909,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< float >::value_type arg1 ; + VecMat::Vec2< float > *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -15080,12 +14918,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< float >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< float > *)new VecMat::Vec2< float >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15094,7 +14932,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15107,7 +14945,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -15142,28 +14980,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(float)>()\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(float)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2f'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< float >()\n" + " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const,VecMat::Vec2< float >::value_type const)\n" + " VecMat::Vec2< float >(VecMat::Vec2< float >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15181,23 +15023,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_x" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< float >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15220,14 +15062,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_0(self, args); @@ -15236,7 +15078,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_x__SWIG_1(self, args); @@ -15244,28 +15086,31 @@ SWIGINTERN PyObject *_wrap_Vec2f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< float > const *)\n" + " x(VecMat::Vec2< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15283,23 +15128,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_y" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< float >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15322,14 +15167,14 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_0(self, args); @@ -15338,7 +15183,7 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f_y__SWIG_1(self, args); @@ -15346,15 +15191,18 @@ SWIGINTERN PyObject *_wrap_Vec2f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2f_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< float > const *)\n" + " y(VecMat::Vec2< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15363,16 +15211,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setX" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setX" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -15393,8 +15241,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15403,16 +15251,16 @@ SWIGINTERN PyObject *_wrap_Vec2f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f_setY" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f_setY" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -15433,9 +15281,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15444,22 +15292,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___add__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___add__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator +((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15468,7 +15316,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15477,9 +15325,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15488,22 +15336,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___sub__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___sub__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator -((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15512,7 +15360,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15521,9 +15369,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15532,19 +15380,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15553,7 +15401,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15562,9 +15410,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float >::value_type arg2 ; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -15573,19 +15421,19 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___div__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2f___div__" "', argument " "2"" of type '" "VecMat::Vec2< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< float >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< float > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15594,7 +15442,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -15603,9 +15451,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; + VecMat::Vec2< float > *arg2 = 0 ; + VecMat::Vec2< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -15614,22 +15462,22 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2f___mul__" "', argument " "1"" of type '" "VecMat::Vec2< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2f___mul__" "', argument " "2"" of type '" "VecMat::Vec2< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< float > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< float >::value_type)((VecMat::Vec2< float > const *)arg1)->operator *((VecMat::Vec2< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15651,17 +15499,17 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2f___mul____SWIG_1(self, args); @@ -15671,7 +15519,7 @@ SWIGINTERN PyObject *_wrap_Vec2f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -15692,17 +15540,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< float > *arg1 = (VecMat::Vec2< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2f" "', argument " "1"" of type '" "VecMat::Vec2< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< float > * >(argp1); { try { delete arg1; @@ -15724,19 +15572,19 @@ fail: SWIGINTERN PyObject *Vec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec2d")) SWIG_fail; { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15745,7 +15593,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15754,9 +15602,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double >::value_type arg1 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -15767,17 +15615,17 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec2d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec2d" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1,arg2); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15786,7 +15634,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15795,8 +15643,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2::value_type arg1 ; - VecMat::Vec2 *result = 0 ; + VecMat::Vec2< double >::value_type arg1 ; + VecMat::Vec2< double > *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -15804,12 +15652,12 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec2d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec2::value_type >(val1); + arg1 = static_cast< VecMat::Vec2< double >::value_type >(val1); { try { - result = (VecMat::Vec2 *)new VecMat::Vec2(arg1); + result = (VecMat::Vec2< double > *)new VecMat::Vec2< double >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15818,7 +15666,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -15831,7 +15679,7 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -15866,28 +15714,32 @@ SWIGINTERN PyObject *_wrap_new_Vec2d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n Possible C/C++ prototypes are:\n VecMat::Vec2<(double)>()\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const,VecMat::Vec2::value_type const)\n VecMat::Vec2<(double)>(VecMat::Vec2::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec2d'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec2< double >()\n" + " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const,VecMat::Vec2< double >::value_type const)\n" + " VecMat::Vec2< double >(VecMat::Vec2< double >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->x(); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -15905,23 +15757,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_x" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< double >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec2< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -15944,14 +15796,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_0(self, args); @@ -15960,7 +15812,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_x__SWIG_1(self, args); @@ -15968,28 +15820,31 @@ SWIGINTERN PyObject *_wrap_Vec2d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec2< double > const *)\n" + " x(VecMat::Vec2< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->y(); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16007,23 +15862,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type *result = 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec2d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_y" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { { - VecMat::Vec2::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec2::value_type *) &_result_ref; + VecMat::Vec2< double >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec2< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16046,14 +15901,14 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_0(self, args); @@ -16062,7 +15917,7 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d_y__SWIG_1(self, args); @@ -16070,15 +15925,18 @@ SWIGINTERN PyObject *_wrap_Vec2d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec2d_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec2< double > const *)\n" + " y(VecMat::Vec2< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16087,16 +15945,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setX" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setX" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -16117,8 +15975,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16127,16 +15985,16 @@ SWIGINTERN PyObject *_wrap_Vec2d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d_setY" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d_setY" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -16157,9 +16015,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16168,22 +16026,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___add__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___add__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator +((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator +((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16192,7 +16050,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16201,9 +16059,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16212,22 +16070,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___sub__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___sub__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator -((VecMat::Vec2 const &)*arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator -((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16236,7 +16094,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16245,9 +16103,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16256,19 +16114,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16277,7 +16135,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16286,9 +16144,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2::value_type arg2 ; - VecMat::Vec2 result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double >::value_type arg2 ; + VecMat::Vec2< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -16297,19 +16155,19 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___div__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec2d___div__" "', argument " "2"" of type '" "VecMat::Vec2< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec2::value_type >(val2); + arg2 = static_cast< VecMat::Vec2< double >::value_type >(val2); { try { - result = ((VecMat::Vec2 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec2< double > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16318,7 +16176,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< double >(static_cast< const VecMat::Vec2< double >& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16327,9 +16185,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; - VecMat::Vec2 *arg2 = 0 ; - VecMat::Vec2::value_type result; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; + VecMat::Vec2< double > *arg2 = 0 ; + VecMat::Vec2< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16338,22 +16196,22 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec2d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec2d___mul__" "', argument " "1"" of type '" "VecMat::Vec2< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec2d___mul__" "', argument " "2"" of type '" "VecMat::Vec2< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec2 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec2< double > * >(argp2); { try { - result = (VecMat::Vec2::value_type)((VecMat::Vec2 const *)arg1)->operator *((VecMat::Vec2 const &)*arg2); + result = (VecMat::Vec2< double >::value_type)((VecMat::Vec2< double > const *)arg1)->operator *((VecMat::Vec2< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16375,17 +16233,17 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec2d___mul____SWIG_1(self, args); @@ -16395,7 +16253,7 @@ SWIGINTERN PyObject *_wrap_Vec2d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16416,17 +16274,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec2 *arg1 = (VecMat::Vec2 *) 0 ; + VecMat::Vec2< double > *arg1 = (VecMat::Vec2< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec2d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec2d" "', argument " "1"" of type '" "VecMat::Vec2< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec2 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec2< double > * >(argp1); { try { delete arg1; @@ -16448,19 +16306,19 @@ fail: SWIGINTERN PyObject *Vec2d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3u")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< unsigned int,3 > *)new VecMat::Vec< unsigned int,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16469,7 +16327,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -16478,17 +16336,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3u" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { delete arg1; @@ -16515,7 +16373,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3u_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< unsigned int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16533,21 +16391,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_norm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16565,21 +16423,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16597,23 +16455,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalize" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16623,7 +16481,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16632,23 +16490,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3u_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< unsigned int,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< unsigned int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -16658,7 +16516,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -16667,9 +16525,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16678,22 +16536,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___add__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___add__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator +((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16702,7 +16560,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16711,9 +16569,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16722,22 +16580,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___sub__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___sub__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator -((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16746,7 +16604,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16755,9 +16613,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type arg2 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16766,19 +16624,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16787,7 +16645,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16796,9 +16654,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 >::value_type arg2 ; + VecMat::Vec< unsigned int,3 > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -16807,19 +16665,19 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___div__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3u___div__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< unsigned int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< unsigned int,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16828,7 +16686,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< unsigned int,3 >(static_cast< const VecMat::Vec< unsigned int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -16837,9 +16695,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; + VecMat::Vec< unsigned int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -16848,22 +16706,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___mul__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___mul__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< unsigned int,3 >::value_type)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator *((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16885,17 +16743,17 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3u___mul____SWIG_1(self, args); @@ -16905,7 +16763,7 @@ SWIGINTERN PyObject *_wrap_Vec_3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -16926,8 +16784,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16937,22 +16795,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___eq__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___eq__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator ==((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -16970,8 +16828,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -16981,22 +16839,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___ne__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___ne__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator !=((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17014,8 +16872,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17025,22 +16883,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___lt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___lt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator <((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17058,8 +16916,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< unsigned int,3 > *arg1 = (VecMat::Vec< unsigned int,3 > *) 0 ; + VecMat::Vec< unsigned int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17069,22 +16927,22 @@ SWIGINTERN PyObject *_wrap_Vec_3u___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3u___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3u___gt__" "', argument " "1"" of type '" "VecMat::Vec< unsigned int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3u___gt__" "', argument " "2"" of type '" "VecMat::Vec< unsigned int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< unsigned int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< unsigned int,3 > const *)arg1)->operator >((VecMat::Vec< unsigned int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17102,19 +16960,19 @@ fail: SWIGINTERN PyObject *Vec_3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTunsigned_int_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_unsigned_int_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3i")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< int,3 > *)new VecMat::Vec< int,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17123,7 +16981,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -17132,17 +16990,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3i" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { delete arg1; @@ -17169,7 +17027,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3i_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< int,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17187,21 +17045,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_norm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17219,21 +17077,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17251,23 +17109,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalize" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17277,7 +17135,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17286,23 +17144,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3i_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< int,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< int,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< int,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17312,7 +17170,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17321,9 +17179,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17332,22 +17190,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___add__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___add__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator +((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17356,7 +17214,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17365,9 +17223,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17376,22 +17234,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___sub__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___sub__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator -((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17400,7 +17258,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17409,9 +17267,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type arg2 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17420,19 +17278,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17441,7 +17299,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17450,9 +17308,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 >::value_type arg2 ; + VecMat::Vec< int,3 > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -17461,19 +17319,19 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___div__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3i___div__" "', argument " "2"" of type '" "VecMat::Vec< int,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< int,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< int,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17482,7 +17340,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< int,3 >(static_cast< const VecMat::Vec< int,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -17491,9 +17349,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; + VecMat::Vec< int,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17502,22 +17360,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___mul__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___mul__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< int,3 >::value_type)((VecMat::Vec< int,3 > const *)arg1)->operator *((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17539,17 +17397,17 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3i___mul____SWIG_1(self, args); @@ -17559,7 +17417,7 @@ SWIGINTERN PyObject *_wrap_Vec_3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTint_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_int_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -17580,8 +17438,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17591,22 +17449,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___eq__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___eq__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator ==((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17624,8 +17482,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17635,22 +17493,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___ne__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___ne__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator !=((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17668,8 +17526,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17679,22 +17537,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___lt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___lt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator <((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17712,8 +17570,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< int,3 > *arg1 = (VecMat::Vec< int,3 > *) 0 ; + VecMat::Vec< int,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -17723,22 +17581,22 @@ SWIGINTERN PyObject *_wrap_Vec_3i___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3i___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3i___gt__" "', argument " "1"" of type '" "VecMat::Vec< int,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTint_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_int_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3i___gt__" "', argument " "2"" of type '" "VecMat::Vec< int,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< int,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< int,3 > const *)arg1)->operator >((VecMat::Vec< int,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17756,19 +17614,19 @@ fail: SWIGINTERN PyObject *Vec_3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTint_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_int_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3d")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< double,3 > *)new VecMat::Vec< double,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17777,7 +17635,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -17786,17 +17644,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3d" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { delete arg1; @@ -17823,7 +17681,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3d_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< double,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17841,21 +17699,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_norm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17873,21 +17731,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -17905,23 +17763,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalize" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< double,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17931,7 +17789,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17940,23 +17798,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3d_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< double,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< double,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< double,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -17966,7 +17824,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -17975,9 +17833,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -17986,22 +17844,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___add__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___add__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator +((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18010,7 +17868,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18019,9 +17877,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18030,22 +17888,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___sub__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___sub__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator -((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18054,7 +17912,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18063,9 +17921,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type arg2 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -18074,19 +17932,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18095,7 +17953,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18104,9 +17962,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 >::value_type arg2 ; + VecMat::Vec< double,3 > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -18115,19 +17973,19 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___div__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3d___div__" "', argument " "2"" of type '" "VecMat::Vec< double,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< double,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< double,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18136,7 +17994,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< double,3 >(static_cast< const VecMat::Vec< double,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18145,9 +18003,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; + VecMat::Vec< double,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18156,22 +18014,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___mul__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___mul__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< double,3 >::value_type)((VecMat::Vec< double,3 > const *)arg1)->operator *((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18193,17 +18051,17 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3d___mul____SWIG_1(self, args); @@ -18213,7 +18071,7 @@ SWIGINTERN PyObject *_wrap_Vec_3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_double_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18234,8 +18092,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18245,22 +18103,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___eq__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___eq__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator ==((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18278,8 +18136,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18289,22 +18147,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___ne__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___ne__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator !=((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18322,8 +18180,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18333,22 +18191,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___lt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___lt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator <((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18366,8 +18224,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< double,3 > *arg1 = (VecMat::Vec< double,3 > *) 0 ; + VecMat::Vec< double,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18377,22 +18235,22 @@ SWIGINTERN PyObject *_wrap_Vec_3d___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3d___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3d___gt__" "', argument " "1"" of type '" "VecMat::Vec< double,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTdouble_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_double_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3d___gt__" "', argument " "2"" of type '" "VecMat::Vec< double,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< double,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< double,3 > const *)arg1)->operator >((VecMat::Vec< double,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18410,19 +18268,19 @@ fail: SWIGINTERN PyObject *Vec_3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTdouble_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_double_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec_3f")) SWIG_fail; { try { - result = (VecMat::Vec *)new VecMat::Vec(); + result = (VecMat::Vec< float,3 > *)new VecMat::Vec< float,3 >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18431,7 +18289,7 @@ SWIGINTERN PyObject *_wrap_new_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -18440,17 +18298,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec_3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec_3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec_3f" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { delete arg1; @@ -18477,7 +18335,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_dim(PyObject *SWIGUNUSEDPARM(self), PyObject * if (!PyArg_ParseTuple(args,(char *)":Vec_3f_dim")) SWIG_fail; { try { - result = (unsigned int)VecMat::Vec::SWIGTEMPLATEDISAMBIGUATOR dim(); + result = (unsigned int)VecMat::Vec< float,3 >::SWIGTEMPLATEDISAMBIGUATOR dim(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18495,21 +18353,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_norm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_norm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->norm(); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->norm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18527,21 +18385,21 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_squareNorm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_squareNorm",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_squareNorm" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->squareNorm(); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->squareNorm(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18559,23 +18417,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalize" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalize(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,3 > &_result_ref = (arg1)->normalize(); + result = (VecMat::Vec< float,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18585,7 +18443,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalize(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18594,23 +18452,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *result = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec_3f_normalizeSafe",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f_normalizeSafe" "', argument " "1"" of type '" "VecMat::Vec< float,3 > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); { try { { - VecMat::Vec &_result_ref = (arg1)->normalizeSafe(); - result = (VecMat::Vec *) &_result_ref; + VecMat::Vec< float,3 > &_result_ref = (arg1)->normalizeSafe(); + result = (VecMat::Vec< float,3 > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -18620,7 +18478,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f_normalizeSafe(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -18629,9 +18487,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18640,22 +18498,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___add__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___add__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator +((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator +((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18664,7 +18522,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18673,9 +18531,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18684,22 +18542,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___sub__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___sub__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = ((VecMat::Vec const *)arg1)->operator -((VecMat::Vec const &)*arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator -((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18708,7 +18566,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18717,9 +18575,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type arg2 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18728,19 +18586,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator *(arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18749,7 +18607,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18758,9 +18616,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec::value_type arg2 ; - VecMat::Vec result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 >::value_type arg2 ; + VecMat::Vec< float,3 > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -18769,19 +18627,19 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___div__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec_3f___div__" "', argument " "2"" of type '" "VecMat::Vec< float,3 >::value_type""'"); } - arg2 = static_cast< VecMat::Vec::value_type >(val2); + arg2 = static_cast< VecMat::Vec< float,3 >::value_type >(val2); { try { - result = ((VecMat::Vec const *)arg1)->operator /(arg2); + result = ((VecMat::Vec< float,3 > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18790,7 +18648,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec(static_cast< const VecMat::Vec& >(result))), SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec< float,3 >(static_cast< const VecMat::Vec< float,3 >& >(result))), SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -18799,9 +18657,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; - VecMat::Vec::value_type result; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; + VecMat::Vec< float,3 >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -18810,22 +18668,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___mul__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___mul__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (VecMat::Vec::value_type)((VecMat::Vec const *)arg1)->operator *((VecMat::Vec const &)*arg2); + result = (VecMat::Vec< float,3 >::value_type)((VecMat::Vec< float,3 > const *)arg1)->operator *((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18847,17 +18705,17 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec_3f___mul____SWIG_1(self, args); @@ -18867,7 +18725,7 @@ SWIGINTERN PyObject *_wrap_Vec_3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__VecT_float_3_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -18888,8 +18746,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18899,22 +18757,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___eq__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___eq__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___eq__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___eq__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator ==((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator ==((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18932,8 +18790,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18943,22 +18801,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___ne__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___ne__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___ne__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___ne__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator !=((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator !=((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -18976,8 +18834,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -18987,22 +18845,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___lt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___lt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___lt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___lt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator <((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator <((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19020,8 +18878,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec *arg1 = (VecMat::Vec *) 0 ; - VecMat::Vec *arg2 = 0 ; + VecMat::Vec< float,3 > *arg1 = (VecMat::Vec< float,3 > *) 0 ; + VecMat::Vec< float,3 > *arg2 = 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; @@ -19031,22 +18889,22 @@ SWIGINTERN PyObject *_wrap_Vec_3f___gt__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec_3f___gt__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec_3f___gt__" "', argument " "1"" of type '" "VecMat::Vec< float,3 > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecTfloat_3_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__VecT_float_3_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec_3f___gt__" "', argument " "2"" of type '" "VecMat::Vec< float,3 > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec< float,3 > * >(argp2); { try { - result = (bool)((VecMat::Vec const *)arg1)->operator >((VecMat::Vec const &)*arg2); + result = (bool)((VecMat::Vec< float,3 > const *)arg1)->operator >((VecMat::Vec< float,3 > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19064,19 +18922,19 @@ fail: SWIGINTERN PyObject *Vec_3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecTfloat_3_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__VecT_float_3_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3u")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19085,7 +18943,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19094,10 +18952,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int >::value_type arg3 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -19111,22 +18969,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3u",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3u" "', argument " "3"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19135,7 +18993,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19144,9 +19002,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; unsigned int val2 ; @@ -19157,17 +19015,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3u",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3u" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19176,7 +19034,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19185,8 +19043,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< unsigned int >::value_type arg1 ; + VecMat::Vec3< unsigned int > *result = 0 ; unsigned int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -19194,12 +19052,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3u",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< unsigned int > *)new VecMat::Vec3< unsigned int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19208,7 +19066,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -19221,7 +19079,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -19278,28 +19136,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3u(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(unsigned int)>()\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(unsigned int)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3u'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< unsigned int >()\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const,VecMat::Vec3< unsigned int >::value_type const)\n" + " VecMat::Vec3< unsigned int >(VecMat::Vec3< unsigned int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19317,23 +19180,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_x" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19356,14 +19219,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_0(self, args); @@ -19372,7 +19235,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_x__SWIG_1(self, args); @@ -19380,28 +19243,31 @@ SWIGINTERN PyObject *_wrap_Vec3u_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< unsigned int > const *)\n" + " x(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19419,23 +19285,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_y" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19458,14 +19324,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_0(self, args); @@ -19474,7 +19340,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_y__SWIG_1(self, args); @@ -19482,28 +19348,31 @@ SWIGINTERN PyObject *_wrap_Vec3u_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< unsigned int > const *)\n" + " y(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19521,23 +19390,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3u_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_z" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< unsigned int >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< unsigned int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -19560,14 +19429,14 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_0(self, args); @@ -19576,7 +19445,7 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u_z__SWIG_1(self, args); @@ -19584,15 +19453,18 @@ SWIGINTERN PyObject *_wrap_Vec3u_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3u_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< unsigned int > const *)\n" + " z(VecMat::Vec3< unsigned int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19601,16 +19473,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setX" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setX" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -19631,8 +19503,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19641,16 +19513,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setY" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setY" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -19671,8 +19543,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19681,16 +19553,16 @@ SWIGINTERN PyObject *_wrap_Vec3u_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u_setZ" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u_setZ" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -19711,9 +19583,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19722,22 +19594,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___add__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___add__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator +((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19746,7 +19618,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19755,9 +19627,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19766,22 +19638,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___sub__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___sub__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator -((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19790,7 +19662,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19799,9 +19671,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19810,19 +19682,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19831,7 +19703,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19840,9 +19712,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int >::value_type arg2 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; unsigned int val2 ; @@ -19851,19 +19723,19 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___div__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3u___div__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< unsigned int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19872,7 +19744,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -19881,9 +19753,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19892,22 +19764,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___mul__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___mul__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< unsigned int >::value_type)((VecMat::Vec3< unsigned int > const *)arg1)->operator *((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -19929,17 +19801,17 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3u___mul____SWIG_1(self, args); @@ -19949,7 +19821,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -19970,9 +19842,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; + VecMat::Vec3< unsigned int > *arg2 = 0 ; + VecMat::Vec3< unsigned int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -19981,22 +19853,22 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3u___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3u___xor__" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3u___xor__" "', argument " "2"" of type '" "VecMat::Vec3< unsigned int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< unsigned int > const *)arg1)->operator ^((VecMat::Vec3< unsigned int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20005,7 +19877,7 @@ SWIGINTERN PyObject *_wrap_Vec3u___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< unsigned int >(static_cast< const VecMat::Vec3< unsigned int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20014,17 +19886,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< unsigned int > *arg1 = (VecMat::Vec3< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3u",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3u" "', argument " "1"" of type '" "VecMat::Vec3< unsigned int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< unsigned int > * >(argp1); { try { delete arg1; @@ -20046,19 +19918,19 @@ fail: SWIGINTERN PyObject *Vec3u_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3i")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20067,7 +19939,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20076,10 +19948,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int >::value_type arg3 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -20093,22 +19965,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3i",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); ecode3 = SWIG_AsVal_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3i" "', argument " "3"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< int >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20117,7 +19989,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20126,9 +19998,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; int val2 ; @@ -20139,17 +20011,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3i",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3i" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20158,7 +20030,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20167,8 +20039,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< int >::value_type arg1 ; + VecMat::Vec3< int > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -20176,12 +20048,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3i",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< int >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< int > *)new VecMat::Vec3< int >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20190,7 +20062,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -20203,7 +20075,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -20260,28 +20132,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3i(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(int)>()\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(int)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3i'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< int >()\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const,VecMat::Vec3< int >::value_type const)\n" + " VecMat::Vec3< int >(VecMat::Vec3< int >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20299,23 +20176,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_x" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20338,14 +20215,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_0(self, args); @@ -20354,7 +20231,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_x__SWIG_1(self, args); @@ -20362,28 +20239,31 @@ SWIGINTERN PyObject *_wrap_Vec3i_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< int > const *)\n" + " x(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20401,23 +20281,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_y" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20440,14 +20320,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_0(self, args); @@ -20456,7 +20336,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_y__SWIG_1(self, args); @@ -20464,28 +20344,31 @@ SWIGINTERN PyObject *_wrap_Vec3i_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< int > const *)\n" + " y(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20503,23 +20386,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3i_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_z" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< int >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< int >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -20542,14 +20425,14 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_0(self, args); @@ -20558,7 +20441,7 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i_z__SWIG_1(self, args); @@ -20566,15 +20449,18 @@ SWIGINTERN PyObject *_wrap_Vec3i_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3i_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< int > const *)\n" + " z(VecMat::Vec3< int > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20583,16 +20469,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setX" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setX" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -20613,8 +20499,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20623,16 +20509,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setY" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setY" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -20653,8 +20539,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20663,16 +20549,16 @@ SWIGINTERN PyObject *_wrap_Vec3i_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i_setZ" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i_setZ" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -20693,9 +20579,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20704,22 +20590,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___add__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___add__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator +((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20728,7 +20614,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20737,9 +20623,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20748,22 +20634,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___sub__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___sub__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator -((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20772,7 +20658,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20781,9 +20667,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20792,19 +20678,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20813,7 +20699,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20822,9 +20708,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int >::value_type arg2 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; @@ -20833,19 +20719,19 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___div__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3i___div__" "', argument " "2"" of type '" "VecMat::Vec3< int >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< int >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20854,7 +20740,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20863,9 +20749,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20874,22 +20760,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___mul__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___mul__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< int >::value_type)((VecMat::Vec3< int > const *)arg1)->operator *((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20911,17 +20797,17 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3i___mul____SWIG_1(self, args); @@ -20931,7 +20817,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tint_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_int_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -20952,9 +20838,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; + VecMat::Vec3< int > *arg2 = 0 ; + VecMat::Vec3< int > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -20963,22 +20849,22 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3i___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3i___xor__" "', argument " "1"" of type '" "VecMat::Vec3< int > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tint_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_int_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3i___xor__" "', argument " "2"" of type '" "VecMat::Vec3< int > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< int > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< int > const *)arg1)->operator ^((VecMat::Vec3< int > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -20987,7 +20873,7 @@ SWIGINTERN PyObject *_wrap_Vec3i___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< int >(static_cast< const VecMat::Vec3< int >& >(result))), SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -20996,17 +20882,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< int > *arg1 = (VecMat::Vec3< int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3i",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3i" "', argument " "1"" of type '" "VecMat::Vec3< int > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< int > * >(argp1); { try { delete arg1; @@ -21028,19 +20914,19 @@ fail: SWIGINTERN PyObject *Vec3i_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tint_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3f")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21049,7 +20935,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21058,10 +20944,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float >::value_type arg3 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -21075,22 +20961,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3f",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); ecode3 = SWIG_AsVal_float(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3f" "', argument " "3"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< float >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21099,7 +20985,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21108,9 +20994,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; float val2 ; @@ -21121,17 +21007,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3f",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3f" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21140,7 +21026,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21149,8 +21035,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< float >::value_type arg1 ; + VecMat::Vec3< float > *result = 0 ; float val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -21158,12 +21044,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3f",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_float(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< float >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< float > *)new VecMat::Vec3< float >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21172,7 +21058,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -21185,7 +21071,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -21242,28 +21128,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3f(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(float)>()\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(float)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3f'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< float >()\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const,VecMat::Vec3< float >::value_type const)\n" + " VecMat::Vec3< float >(VecMat::Vec3< float >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21281,23 +21172,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_x" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21320,14 +21211,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_0(self, args); @@ -21336,7 +21227,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_x__SWIG_1(self, args); @@ -21344,28 +21235,31 @@ SWIGINTERN PyObject *_wrap_Vec3f_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< float > const *)\n" + " x(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21383,23 +21277,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_y" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21422,14 +21316,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_0(self, args); @@ -21438,7 +21332,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_y__SWIG_1(self, args); @@ -21446,28 +21340,31 @@ SWIGINTERN PyObject *_wrap_Vec3f_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< float > const *)\n" + " y(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21485,23 +21382,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3f_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_z" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< float >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< float >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -21524,14 +21421,14 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_0(self, args); @@ -21540,7 +21437,7 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f_z__SWIG_1(self, args); @@ -21548,15 +21445,18 @@ SWIGINTERN PyObject *_wrap_Vec3f_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3f_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< float > const *)\n" + " z(VecMat::Vec3< float > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21565,16 +21465,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setX" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setX" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -21595,8 +21495,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21605,16 +21505,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setY" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setY" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -21635,8 +21535,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21645,16 +21545,16 @@ SWIGINTERN PyObject *_wrap_Vec3f_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f_setZ" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f_setZ" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -21675,9 +21575,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21686,22 +21586,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___add__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___add__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator +((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21710,7 +21610,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21719,9 +21619,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21730,22 +21630,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___sub__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___sub__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator -((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21754,7 +21654,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21763,9 +21663,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21774,19 +21674,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21795,7 +21695,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21804,9 +21704,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float >::value_type arg2 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; float val2 ; @@ -21815,19 +21715,19 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___div__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); ecode2 = SWIG_AsVal_float(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3f___div__" "', argument " "2"" of type '" "VecMat::Vec3< float >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< float >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21836,7 +21736,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21845,9 +21745,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21856,22 +21756,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___mul__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___mul__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< float >::value_type)((VecMat::Vec3< float > const *)arg1)->operator *((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21893,17 +21793,17 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3f___mul____SWIG_1(self, args); @@ -21913,7 +21813,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -21934,9 +21834,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; + VecMat::Vec3< float > *arg2 = 0 ; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -21945,22 +21845,22 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3f___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3f___xor__" "', argument " "1"" of type '" "VecMat::Vec3< float > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3f___xor__" "', argument " "2"" of type '" "VecMat::Vec3< float > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< float > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< float > const *)arg1)->operator ^((VecMat::Vec3< float > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -21969,7 +21869,7 @@ SWIGINTERN PyObject *_wrap_Vec3f___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -21978,17 +21878,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< float > *arg1 = (VecMat::Vec3< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3f" "', argument " "1"" of type '" "VecMat::Vec3< float > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< float > * >(argp1); { try { delete arg1; @@ -22010,19 +21910,19 @@ fail: SWIGINTERN PyObject *Vec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_Vec3d")) SWIG_fail; { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22031,7 +21931,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22040,10 +21940,10 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3::value_type arg3 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double >::value_type arg3 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -22057,22 +21957,22 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OOO:new_Vec3d",&obj0,&obj1,&obj2)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vec3d" "', argument " "3"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg3 = static_cast< VecMat::Vec3::value_type >(val3); + arg3 = static_cast< VecMat::Vec3< double >::value_type >(val3); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2,arg3); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22081,7 +21981,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22090,9 +21990,9 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; double val2 ; @@ -22103,17 +22003,17 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"OO:new_Vec3d",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vec3d" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1,arg2); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22122,7 +22022,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22131,8 +22031,8 @@ fail: SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3::value_type arg1 ; - VecMat::Vec3 *result = 0 ; + VecMat::Vec3< double >::value_type arg1 ; + VecMat::Vec3< double > *result = 0 ; double val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -22140,12 +22040,12 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO if (!PyArg_ParseTuple(args,(char *)"O:new_Vec3d",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_double(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg1 = static_cast< VecMat::Vec3::value_type >(val1); + arg1 = static_cast< VecMat::Vec3< double >::value_type >(val1); { try { - result = (VecMat::Vec3 *)new VecMat::Vec3(arg1); + result = (VecMat::Vec3< double > *)new VecMat::Vec3< double >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22154,7 +22054,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -22167,7 +22067,7 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -22224,28 +22124,33 @@ SWIGINTERN PyObject *_wrap_new_Vec3d(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n Possible C/C++ prototypes are:\n VecMat::Vec3<(double)>()\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const,VecMat::Vec3::value_type const)\n VecMat::Vec3<(double)>(VecMat::Vec3::value_type const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Vec3d'.\n" + " Possible C/C++ prototypes are:\n" + " VecMat::Vec3< double >()\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const,VecMat::Vec3< double >::value_type const)\n" + " VecMat::Vec3< double >(VecMat::Vec3< double >::value_type const)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->x(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->x(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22263,23 +22168,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_x__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_x",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_x" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->x(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->x(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22302,14 +22207,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_0(self, args); @@ -22318,7 +22223,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_x__SWIG_1(self, args); @@ -22326,28 +22231,31 @@ SWIGINTERN PyObject *_wrap_Vec3d_x(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n Possible C/C++ prototypes are:\n x()\n x()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_x'.\n" + " Possible C/C++ prototypes are:\n" + " x(VecMat::Vec3< double > const *)\n" + " x(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->y(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->y(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22365,23 +22273,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_y__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_y",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_y" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->y(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->y(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22404,14 +22312,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_0(self, args); @@ -22420,7 +22328,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_y__SWIG_1(self, args); @@ -22428,28 +22336,31 @@ SWIGINTERN PyObject *_wrap_Vec3d_y(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n Possible C/C++ prototypes are:\n y()\n y()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_y'.\n" + " Possible C/C++ prototypes are:\n" + " y(VecMat::Vec3< double > const *)\n" + " y(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->z(); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->z(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22467,23 +22378,23 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_z__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type *result = 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:Vec3d_z",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_z" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { { - VecMat::Vec3::value_type &_result_ref = (arg1)->z(); - result = (VecMat::Vec3::value_type *) &_result_ref; + VecMat::Vec3< double >::value_type &_result_ref = (arg1)->z(); + result = (VecMat::Vec3< double >::value_type *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -22506,14 +22417,14 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_0(self, args); @@ -22522,7 +22433,7 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { if (argc == 1) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d_z__SWIG_1(self, args); @@ -22530,15 +22441,18 @@ SWIGINTERN PyObject *_wrap_Vec3d_z(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n Possible C/C++ prototypes are:\n z()\n z()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Vec3d_z'.\n" + " Possible C/C++ prototypes are:\n" + " z(VecMat::Vec3< double > const *)\n" + " z(VecMat::Vec3< double > *)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22547,16 +22461,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setX(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setX",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setX" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setX" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setX(arg2); @@ -22577,8 +22491,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22587,16 +22501,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setY(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setY",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setY" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setY" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setY(arg2); @@ -22617,8 +22531,8 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22627,16 +22541,16 @@ SWIGINTERN PyObject *_wrap_Vec3d_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d_setZ",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d_setZ" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d_setZ" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { (arg1)->setZ(arg2); @@ -22657,9 +22571,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22668,22 +22582,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___add__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___add__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___add__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator +((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator +((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22692,7 +22606,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___add__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22701,9 +22615,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22712,22 +22626,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___sub__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___sub__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___sub__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator -((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator -((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22736,7 +22650,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___sub__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22745,9 +22659,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22756,19 +22670,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator *(arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator *(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22777,7 +22691,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22786,9 +22700,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3::value_type arg2 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double >::value_type arg2 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; double val2 ; @@ -22797,19 +22711,19 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___div__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___div__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vec3d___div__" "', argument " "2"" of type '" "VecMat::Vec3< double >::value_type""'"); } - arg2 = static_cast< VecMat::Vec3::value_type >(val2); + arg2 = static_cast< VecMat::Vec3< double >::value_type >(val2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator /(arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator /(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22818,7 +22732,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___div__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22827,9 +22741,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3::value_type result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double >::value_type result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22838,22 +22752,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___mul__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___mul__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___mul__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = (VecMat::Vec3::value_type)((VecMat::Vec3 const *)arg1)->operator *((VecMat::Vec3 const &)*arg2); + result = (VecMat::Vec3< double >::value_type)((VecMat::Vec3< double > const *)arg1)->operator *((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22875,17 +22789,17 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Vec3d___mul____SWIG_1(self, args); @@ -22895,7 +22809,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___mul__(PyObject *self, PyObject *args) { if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -22916,9 +22830,9 @@ fail: SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; - VecMat::Vec3 *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; + VecMat::Vec3< double > *arg2 = 0 ; + VecMat::Vec3< double > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -22927,22 +22841,22 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Vec3d___xor__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3 const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vec3d___xor__" "', argument " "1"" of type '" "VecMat::Vec3< double > const *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3 const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Vec3d___xor__" "', argument " "2"" of type '" "VecMat::Vec3< double > const &""'"); } - arg2 = reinterpret_cast< VecMat::Vec3 * >(argp2); + arg2 = reinterpret_cast< VecMat::Vec3< double > * >(argp2); { try { - result = ((VecMat::Vec3 const *)arg1)->operator ^((VecMat::Vec3 const &)*arg2); + result = ((VecMat::Vec3< double > const *)arg1)->operator ^((VecMat::Vec3< double > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -22951,7 +22865,7 @@ SWIGINTERN PyObject *_wrap_Vec3d___xor__(PyObject *SWIGUNUSEDPARM(self), PyObjec cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< double >(static_cast< const VecMat::Vec3< double >& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -22960,17 +22874,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_Vec3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - VecMat::Vec3 *arg1 = (VecMat::Vec3 *) 0 ; + VecMat::Vec3< double > *arg1 = (VecMat::Vec3< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_Vec3d",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3 *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vec3d" "', argument " "1"" of type '" "VecMat::Vec3< double > *""'"); } - arg1 = reinterpret_cast< VecMat::Vec3 * >(argp1); + arg1 = reinterpret_cast< VecMat::Vec3< double > * >(argp1); { try { delete arg1; @@ -22992,8 +22906,8 @@ fail: SWIGINTERN PyObject *Vec3d_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23185,7 +23099,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23251,7 +23165,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n Possible C/C++ prototypes are:\n turbulence1(float,float,float,unsigned int)\n turbulence1(float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence1'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence1(Noise *,float,float,float,unsigned int)\n" + " turbulence1(Noise *,float,float,float)\n"); return NULL; } @@ -23286,7 +23203,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23353,7 +23270,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23395,7 +23312,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23406,7 +23323,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23432,7 +23349,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23459,7 +23376,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n Possible C/C++ prototypes are:\n turbulence2(Geometry::Vec2f &,float,float,unsigned int)\n turbulence2(Geometry::Vec2f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence2'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence2(Noise *,Geometry::Vec2f &,float,float,unsigned int)\n" + " turbulence2(Noise *,Geometry::Vec2f &,float,float)\n"); return NULL; } @@ -23494,7 +23414,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23561,7 +23481,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *SWIGUNUSEDPARM(se SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_turbulence3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_turbulence3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23603,7 +23523,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23614,7 +23534,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23640,7 +23560,7 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -23667,7 +23587,10 @@ SWIGINTERN PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n Possible C/C++ prototypes are:\n turbulence3(Geometry::Vec3f &,float,float,unsigned int)\n turbulence3(Geometry::Vec3f &,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Noise_turbulence3'.\n" + " Possible C/C++ prototypes are:\n" + " turbulence3(Noise *,Geometry::Vec3f &,float,float,unsigned int)\n" + " turbulence3(Noise *,Geometry::Vec3f &,float,float)\n"); return NULL; } @@ -23731,7 +23654,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise2(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise2" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise2" "', argument " "2"" of type '" "Geometry::Vec2f &""'"); } @@ -23775,7 +23698,7 @@ SWIGINTERN PyObject *_wrap_Noise_smoothNoise3(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Noise_smoothNoise3" "', argument " "1"" of type '" "Noise *""'"); } arg1 = reinterpret_cast< Noise * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Noise_smoothNoise3" "', argument " "2"" of type '" "Geometry::Vec3f &""'"); } @@ -23803,7 +23726,7 @@ fail: SWIGINTERN PyObject *Noise_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Noise, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -23940,7 +23863,7 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -23987,7 +23910,11 @@ SWIGINTERN PyObject *_wrap_new_Material(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n Possible C/C++ prototypes are:\n Material()\n Material(float const *,float const *,float const *,float const *,float const)\n Material(Material const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Material'.\n" + " Possible C/C++ prototypes are:\n" + " Material()\n" + " Material(float const *,float const *,float const *,float const *,float const)\n" + " Material(Material const &)\n"); return NULL; } @@ -25094,18 +25021,18 @@ fail: SWIGINTERN PyObject *Material_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Material, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } -SWIGINTERN int POINT_set(PyObject *) { +SWIGINTERN int Swig_var_POINT_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable POINT is read-only."); return 1; } -SWIGINTERN PyObject *POINT_get(void) { +SWIGINTERN PyObject *Swig_var_POINT_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::POINT)); @@ -25113,13 +25040,13 @@ SWIGINTERN PyObject *POINT_get(void) { } -SWIGINTERN int S_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_S_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable S_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *S_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_S_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::S_VERTEX)); @@ -25127,13 +25054,13 @@ SWIGINTERN PyObject *S_VERTEX_get(void) { } -SWIGINTERN int VIEW_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_VIEW_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VIEW_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *VIEW_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_VIEW_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VIEW_VERTEX)); @@ -25141,13 +25068,13 @@ SWIGINTERN PyObject *VIEW_VERTEX_get(void) { } -SWIGINTERN int NON_T_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_NON_T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NON_T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *NON_T_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_NON_T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NON_T_VERTEX)); @@ -25155,13 +25082,13 @@ SWIGINTERN PyObject *NON_T_VERTEX_get(void) { } -SWIGINTERN int T_VERTEX_set(PyObject *) { +SWIGINTERN int Swig_var_T_VERTEX_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable T_VERTEX is read-only."); return 1; } -SWIGINTERN PyObject *T_VERTEX_get(void) { +SWIGINTERN PyObject *Swig_var_T_VERTEX_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::T_VERTEX)); @@ -25169,13 +25096,13 @@ SWIGINTERN PyObject *T_VERTEX_get(void) { } -SWIGINTERN int CUSP_set(PyObject *) { +SWIGINTERN int Swig_var_CUSP_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CUSP is read-only."); return 1; } -SWIGINTERN PyObject *CUSP_get(void) { +SWIGINTERN PyObject *Swig_var_CUSP_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CUSP)); @@ -25183,13 +25110,13 @@ SWIGINTERN PyObject *CUSP_get(void) { } -SWIGINTERN int NO_FEATURE_set(PyObject *) { +SWIGINTERN int Swig_var_NO_FEATURE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable NO_FEATURE is read-only."); return 1; } -SWIGINTERN PyObject *NO_FEATURE_get(void) { +SWIGINTERN PyObject *Swig_var_NO_FEATURE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::NO_FEATURE)); @@ -25197,13 +25124,13 @@ SWIGINTERN PyObject *NO_FEATURE_get(void) { } -SWIGINTERN int SILHOUETTE_set(PyObject *) { +SWIGINTERN int Swig_var_SILHOUETTE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SILHOUETTE is read-only."); return 1; } -SWIGINTERN PyObject *SILHOUETTE_get(void) { +SWIGINTERN PyObject *Swig_var_SILHOUETTE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SILHOUETTE)); @@ -25211,13 +25138,13 @@ SWIGINTERN PyObject *SILHOUETTE_get(void) { } -SWIGINTERN int BORDER_set(PyObject *) { +SWIGINTERN int Swig_var_BORDER_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable BORDER is read-only."); return 1; } -SWIGINTERN PyObject *BORDER_get(void) { +SWIGINTERN PyObject *Swig_var_BORDER_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::BORDER)); @@ -25225,13 +25152,13 @@ SWIGINTERN PyObject *BORDER_get(void) { } -SWIGINTERN int CREASE_set(PyObject *) { +SWIGINTERN int Swig_var_CREASE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable CREASE is read-only."); return 1; } -SWIGINTERN PyObject *CREASE_get(void) { +SWIGINTERN PyObject *Swig_var_CREASE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::CREASE)); @@ -25239,13 +25166,13 @@ SWIGINTERN PyObject *CREASE_get(void) { } -SWIGINTERN int RIDGE_set(PyObject *) { +SWIGINTERN int Swig_var_RIDGE_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable RIDGE is read-only."); return 1; } -SWIGINTERN PyObject *RIDGE_get(void) { +SWIGINTERN PyObject *Swig_var_RIDGE_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::RIDGE)); @@ -25253,13 +25180,13 @@ SWIGINTERN PyObject *RIDGE_get(void) { } -SWIGINTERN int VALLEY_set(PyObject *) { +SWIGINTERN int Swig_var_VALLEY_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable VALLEY is read-only."); return 1; } -SWIGINTERN PyObject *VALLEY_get(void) { +SWIGINTERN PyObject *Swig_var_VALLEY_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::VALLEY)); @@ -25267,13 +25194,13 @@ SWIGINTERN PyObject *VALLEY_get(void) { } -SWIGINTERN int SUGGESTIVE_CONTOUR_set(PyObject *) { +SWIGINTERN int Swig_var_SUGGESTIVE_CONTOUR_set(PyObject *) { SWIG_Error(SWIG_AttributeError,"Variable SUGGESTIVE_CONTOUR is read-only."); return 1; } -SWIGINTERN PyObject *SUGGESTIVE_CONTOUR_get(void) { +SWIGINTERN PyObject *Swig_var_SUGGESTIVE_CONTOUR_get(void) { PyObject *pyobj = 0; pyobj = SWIG_From_unsigned_SS_short(static_cast< unsigned short >(Nature::SUGGESTIVE_CONTOUR)); @@ -25466,7 +25393,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint3D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25594,7 +25521,7 @@ SWIGINTERN PyObject *_wrap_Interface0D_getPoint2D(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -25862,7 +25789,7 @@ fail: SWIGINTERN PyObject *Interface0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26429,7 +26356,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint3D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26557,7 +26484,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIteratorNested_getPoint2D(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -26802,7 +26729,7 @@ fail: SWIGINTERN PyObject *Interface0DIteratorNested_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIteratorNested, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -26903,7 +26830,7 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -26929,7 +26856,11 @@ SWIGINTERN PyObject *_wrap_new_Interface0DIterator(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n Possible C/C++ prototypes are:\n Interface0DIterator(Interface0DIteratorNested *)\n Interface0DIterator()\n Interface0DIterator(Interface0DIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Interface0DIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Interface0DIterator(Interface0DIteratorNested *)\n" + " Interface0DIterator()\n" + " Interface0DIterator(Interface0DIterator const &)\n"); return NULL; } @@ -27464,7 +27395,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27592,7 +27523,7 @@ SWIGINTERN PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -27837,7 +27768,7 @@ fail: SWIGINTERN PyObject *Interface0DIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface0DIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -28072,7 +28003,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28102,7 +28033,10 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsBegin(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Interface1D *,float)\n" + " pointsBegin(Interface1D *)\n"); return NULL; } @@ -28186,7 +28120,7 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -28216,7 +28150,10 @@ SWIGINTERN PyObject *_wrap_Interface1D_pointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Interface1D_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Interface1D *,float)\n" + " pointsEnd(Interface1D *)\n"); return NULL; } @@ -28391,14 +28328,14 @@ fail: SWIGINTERN PyObject *Interface1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Interface1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< unsigned int > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28417,14 +28354,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateUnsigned",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28458,7 +28395,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(se arg4 = static_cast< IntegrationType >(val4); { try { - result = (unsigned int)integrate(*arg1,arg2,arg3,arg4); + result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28476,7 +28413,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< unsigned int > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; unsigned int result; @@ -28491,14 +28428,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateUnsigned",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28527,7 +28464,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned__SWIG_1(PyObject *SWIGUNUSEDPARM(se } { try { - result = (unsigned int)integrate(*arg1,arg2,arg3); + result = (unsigned int)integrate< unsigned int >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28549,14 +28486,14 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28573,7 +28510,7 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28595,14 +28532,17 @@ SWIGINTERN PyObject *_wrap_integrateUnsigned(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n Possible C/C++ prototypes are:\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(unsigned int)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateUnsigned'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< unsigned int >(UnaryFunction0D< unsigned int > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< float > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28621,14 +28561,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateFloat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28662,7 +28602,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self) arg4 = static_cast< IntegrationType >(val4); { try { - result = (float)integrate(*arg1,arg2,arg3,arg4); + result = (float)integrate< float >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28680,7 +28620,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< float > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; float result; @@ -28695,14 +28635,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateFloat",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_float_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28731,7 +28671,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self) } { try { - result = (float)integrate(*arg1,arg2,arg3); + result = (float)integrate< float >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28753,14 +28693,14 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28777,7 +28717,7 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTfloat_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_float_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28799,14 +28739,17 @@ SWIGINTERN PyObject *_wrap_integrateFloat(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n Possible C/C++ prototypes are:\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(float)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateFloat'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< float >(UnaryFunction0D< float > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; IntegrationType arg4 ; @@ -28825,14 +28768,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:integrateDouble",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28866,7 +28809,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self arg4 = static_cast< IntegrationType >(val4); { try { - result = (double)integrate(*arg1,arg2,arg3,arg4); + result = (double)integrate< double >(*arg1,arg2,arg3,arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28884,7 +28827,7 @@ fail: SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; Interface0DIterator arg2 ; Interface0DIterator arg3 ; double result; @@ -28899,14 +28842,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:integrateDouble",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "integrateDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 | 0); if (!SWIG_IsOK(res2)) { @@ -28935,7 +28878,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self } { try { - result = (double)integrate(*arg1,arg2,arg3); + result = (double)integrate< double >(*arg1,arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -28957,14 +28900,14 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -28981,7 +28924,7 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Interface0DIterator, 0); @@ -29003,7 +28946,10 @@ SWIGINTERN PyObject *_wrap_integrateDouble(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n Possible C/C++ prototypes are:\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator,IntegrationType)\n integrate<(double)>(UnaryFunction0D &,Interface0DIterator,Interface0DIterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'integrateDouble'.\n" + " Possible C/C++ prototypes are:\n" + " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator,IntegrationType)\n" + " integrate< double >(UnaryFunction0D< double > &,Interface0DIterator,Interface0DIterator)\n"); return NULL; } @@ -29161,7 +29107,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29289,7 +29235,7 @@ SWIGINTERN PyObject *_wrap_SVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29619,7 +29565,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex__SWIG_1(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:new_SVertex",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVertex" "', argument " "1"" of type '" "Geometry::Vec3r const &""'"); } @@ -29694,7 +29640,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -29712,7 +29658,7 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } if (argc == 2) { int _v; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_VecMat__Vec3T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Id, 0); @@ -29724,7 +29670,11 @@ SWIGINTERN PyObject *_wrap_new_SVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n Possible C/C++ prototypes are:\n SVertex()\n SVertex(Geometry::Vec3r const &,Id const &)\n SVertex(SVertex &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVertex'.\n" + " Possible C/C++ prototypes are:\n" + " SVertex()\n" + " SVertex(Geometry::Vec3r const &,Id const &)\n" + " SVertex(SVertex &)\n"); return NULL; } @@ -29865,7 +29815,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29900,7 +29850,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2D(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -29910,7 +29860,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29932,7 +29882,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normals(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -29974,7 +29924,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -29988,8 +29938,8 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje { try { { - std::vector const &_result_ref = (arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -29999,7 +29949,7 @@ SWIGINTERN PyObject *_wrap_SVertex_fedges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30183,7 +30133,7 @@ SWIGINTERN PyObject *_wrap_SVertex_setPoint3D(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setPoint3D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30226,7 +30176,7 @@ SWIGINTERN PyObject *_wrap_SVertex_setPoint2D(PyObject *SWIGUNUSEDPARM(self), Py SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setPoint2D" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30269,7 +30219,7 @@ SWIGINTERN PyObject *_wrap_SVertex_AddNormal(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_AddNormal" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -30425,7 +30375,7 @@ SWIGINTERN PyObject *_wrap_SVertex_setDirectionFredo(PyObject *SWIGUNUSEDPARM(se } arg1 = reinterpret_cast< SVertex * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -30512,7 +30462,7 @@ SWIGINTERN PyObject *_wrap_SVertex_directionFredo(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30565,7 +30515,7 @@ fail: SWIGINTERN PyObject *_wrap_SVertex_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SVertex *arg1 = (SVertex *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -30579,17 +30529,17 @@ SWIGINTERN PyObject *_wrap_SVertex_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVertex_setFEdges" "', argument " "1"" of type '" "SVertex *""'"); } arg1 = reinterpret_cast< SVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVertex_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { - (arg1)->setFEdges((std::vector const &)*arg2); + (arg1)->setFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -30834,7 +30784,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point2d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30869,7 +30819,7 @@ SWIGINTERN PyObject *_wrap_SVertex_point3d(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -30901,7 +30851,7 @@ SWIGINTERN PyObject *_wrap_SVertex_normal(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -30978,7 +30928,7 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -31002,7 +30952,10 @@ SWIGINTERN PyObject *_wrap_SVertex_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVertex_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(SVertex *)\n" + " shape(SVertex const *)\n"); return NULL; } @@ -31332,7 +31285,7 @@ fail: SWIGINTERN PyObject *SVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -31589,7 +31542,7 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -31621,7 +31574,11 @@ SWIGINTERN PyObject *_wrap_new_FEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n Possible C/C++ prototypes are:\n FEdge()\n FEdge(SVertex *,SVertex *)\n FEdge(FEdge &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdge'.\n" + " Possible C/C++ prototypes are:\n" + " FEdge()\n" + " FEdge(SVertex *,SVertex *)\n" + " FEdge(FEdge &)\n"); return NULL; } @@ -31971,7 +31928,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center3d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32003,7 +31960,7 @@ SWIGINTERN PyObject *_wrap_FEdge_center2d(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -32073,7 +32030,7 @@ SWIGINTERN PyObject *_wrap_FEdge_getOccludeeIntersection(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -32487,7 +32444,7 @@ SWIGINTERN PyObject *_wrap_FEdge_setOccludeeIntersection(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdge_setOccludeeIntersection" "', argument " "1"" of type '" "FEdge *""'"); } arg1 = reinterpret_cast< FEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdge_setOccludeeIntersection" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -32768,7 +32725,7 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -32792,7 +32749,10 @@ SWIGINTERN PyObject *_wrap_FEdge_shape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(FEdge *)\n" + " shape(FEdge const *)\n"); return NULL; } @@ -33177,7 +33137,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation2d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33209,7 +33169,7 @@ SWIGINTERN PyObject *_wrap_FEdge_orientation3d(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -33359,7 +33319,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33389,7 +33349,10 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(FEdge *,float)\n" + " pointsBegin(FEdge *)\n"); return NULL; } @@ -33473,7 +33436,7 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33503,14 +33466,17 @@ SWIGINTERN PyObject *_wrap_FEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdge_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(FEdge *,float)\n" + " pointsEnd(FEdge *)\n"); return NULL; } SWIGINTERN PyObject *FEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -33620,7 +33586,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -33651,7 +33617,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n FEdgeInternal::SVertexIterator()\n FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeInternal::SVertexIterator()\n" + " FEdgeInternal::SVertexIterator(FEdgeInternal::SVertexIterator const &)\n" + " FEdgeInternal::SVertexIterator(SVertex *,FEdge *)\n"); return NULL; } @@ -34174,7 +34144,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34302,7 +34272,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34656,7 +34626,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34691,7 +34661,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34701,7 +34671,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34723,7 +34693,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -34765,7 +34735,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -34779,8 +34749,8 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( { try { { - std::vector const &_result_ref = (*arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -34790,7 +34760,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -34931,7 +34901,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -34955,7 +34925,10 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_shape(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgeSVertexIterator_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(FEdgeInternal::SVertexIterator *)\n" + " shape(FEdgeInternal::SVertexIterator const *)\n"); return NULL; } @@ -35041,7 +35014,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setPoint3D(PyObject *SWIGUNUSEDP SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setPoint3D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35084,7 +35057,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setPoint2D(PyObject *SWIGUNUSEDP SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setPoint2D" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35127,7 +35100,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -35283,7 +35256,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setDirectionFredo(PyObject *SWIG } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -35370,7 +35343,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -35423,7 +35396,7 @@ fail: SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; FEdgeInternal::SVertexIterator *arg1 = (FEdgeInternal::SVertexIterator *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -35437,17 +35410,17 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "1"" of type '" "FEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< FEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { - (*arg1)->setFEdges((std::vector const &)*arg2); + (*arg1)->setFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -35692,7 +35665,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35727,7 +35700,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -35759,7 +35732,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -36123,7 +36096,7 @@ fail: SWIGINTERN PyObject *FEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36233,7 +36206,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36265,7 +36238,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSharp(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n Possible C/C++ prototypes are:\n FEdgeSharp()\n FEdgeSharp(SVertex *,SVertex *)\n FEdgeSharp(FEdgeSharp &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSharp'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeSharp()\n" + " FEdgeSharp(SVertex *,SVertex *)\n" + " FEdgeSharp(FEdgeSharp &)\n"); return NULL; } @@ -36362,7 +36339,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36397,7 +36374,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_normalB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -36555,7 +36532,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_setNormalA(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setNormalA" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_setNormalA" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -36598,7 +36575,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSharp_setNormalB(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSharp_setNormalB" "', argument " "1"" of type '" "FEdgeSharp *""'"); } arg1 = reinterpret_cast< FEdgeSharp * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSharp_setNormalB" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -36706,7 +36683,7 @@ fail: SWIGINTERN PyObject *FEdgeSharp_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSharp, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -36816,7 +36793,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -36848,7 +36825,11 @@ SWIGINTERN PyObject *_wrap_new_FEdgeSmooth(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n Possible C/C++ prototypes are:\n FEdgeSmooth()\n FEdgeSmooth(SVertex *,SVertex *)\n FEdgeSmooth(FEdgeSmooth &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgeSmooth'.\n" + " Possible C/C++ prototypes are:\n" + " FEdgeSmooth()\n" + " FEdgeSmooth(SVertex *,SVertex *)\n" + " FEdgeSmooth(FEdgeSmooth &)\n"); return NULL; } @@ -36977,7 +36958,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_normal(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37106,7 +37087,7 @@ SWIGINTERN PyObject *_wrap_FEdgeSmooth_setNormal(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgeSmooth_setNormal" "', argument " "1"" of type '" "FEdgeSmooth *""'"); } arg1 = reinterpret_cast< FEdgeSmooth * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgeSmooth_setNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -37174,7 +37155,7 @@ fail: SWIGINTERN PyObject *FEdgeSmooth_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_FEdgeSmooth, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -37294,7 +37275,7 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -37312,7 +37293,10 @@ SWIGINTERN PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n Possible C/C++ prototypes are:\n SShape()\n SShape(SShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SShape'.\n" + " Possible C/C++ prototypes are:\n" + " SShape()\n" + " SShape(SShape &)\n"); return NULL; } @@ -37527,7 +37511,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_CreateSVertex" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -37535,7 +37519,7 @@ SWIGINTERN PyObject *_wrap_SShape_CreateSVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_CreateSVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_CreateSVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -37573,8 +37557,8 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector *arg3 = 0 ; - std::vector *arg4 = 0 ; + std::vector< Geometry::Vec2r > *arg3 = 0 ; + std::vector< FEdge * > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37599,25 +37583,25 @@ SWIGINTERN PyObject *_wrap_SShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), PyOb SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "3"" of type '" "std::vector< Geometry::Vec2r > const &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector< Geometry::Vec2r > * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } - arg4 = reinterpret_cast< std::vector * >(argp4); + arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); { try { - (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4); + (arg1)->SplitEdge(arg2,(std::vector< Geometry::Vec2r > const &)*arg3,*arg4); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37686,7 +37670,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_setBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox *arg2 = 0 ; + BBox< Geometry::Vec3r > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -37700,17 +37684,17 @@ SWIGINTERN PyObject *_wrap_SShape_setBBox(PyObject *SWIGUNUSEDPARM(self), PyObje SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setBBox" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } - arg2 = reinterpret_cast< BBox * >(argp2); + arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); { try { - (arg1)->setBBox((BBox const &)*arg2); + (arg1)->setBBox((BBox< Geometry::Vec3r > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -37840,7 +37824,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< SVertex * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37854,8 +37838,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), { try { { - std::vector &_result_ref = (arg1)->GetVertexList(); - result = (std::vector *) &_result_ref; + std::vector< SVertex * > &_result_ref = (arg1)->GetVertexList(); + result = (std::vector< SVertex * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37865,7 +37849,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37875,7 +37859,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37889,8 +37873,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->GetEdgeList(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > &_result_ref = (arg1)->GetEdgeList(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37900,7 +37884,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37910,7 +37894,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37924,8 +37908,8 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector &_result_ref = (arg1)->GetChains(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > &_result_ref = (arg1)->GetChains(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37935,7 +37919,7 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -37945,7 +37929,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - BBox *result = 0 ; + BBox< Geometry::Vec3r > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -37959,8 +37943,8 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject { try { { - BBox const &_result_ref = (arg1)->bbox(); - result = (BBox *) &_result_ref; + BBox< Geometry::Vec3r > const &_result_ref = (arg1)->bbox(); + result = (BBox< Geometry::Vec3r > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -37970,7 +37954,7 @@ SWIGINTERN PyObject *_wrap_SShape_bbox(PyObject *SWIGUNUSEDPARM(self), PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -38024,7 +38008,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *result = 0 ; + std::vector< Material > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -38038,8 +38022,8 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb { try { { - std::vector const &_result_ref = ((SShape const *)arg1)->materials(); - result = (std::vector *) &_result_ref; + std::vector< Material > const &_result_ref = ((SShape const *)arg1)->materials(); + result = (std::vector< Material > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -38049,7 +38033,7 @@ SWIGINTERN PyObject *_wrap_SShape_materials(PyObject *SWIGUNUSEDPARM(self), PyOb cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -38203,7 +38187,7 @@ fail: SWIGINTERN PyObject *_wrap_SShape_setMaterials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< Material > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38217,17 +38201,17 @@ SWIGINTERN PyObject *_wrap_SShape_setMaterials(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_setMaterials" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_Material_std__allocatorT_Material_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SShape_setMaterials" "', argument " "2"" of type '" "std::vector< Material > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< Material > * >(argp2); { try { - (arg1)->setMaterials((std::vector const &)*arg2); + (arg1)->setMaterials((std::vector< Material > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38325,14 +38309,14 @@ fail: SWIGINTERN PyObject *SShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -38341,11 +38325,11 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_iterator(PyObject *SWIGUNUSEDPARM arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewShape_Sm__Sg__iterator(arg1,arg2); @@ -38366,21 +38350,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewShape_Sm__Sg____nonzero__((std::vector< ViewShape * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38398,21 +38382,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewShape_Sm__Sg____len__((std::vector< ViewShape * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38430,22 +38414,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); + result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38459,7 +38443,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38468,10 +38452,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; + std::vector< ViewShape *,std::allocator< ViewShape * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38483,25 +38467,25 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewShape *,std::allocator< ViewShape * > > *)std_vector_Sl_ViewShape_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38515,7 +38499,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getslice__(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -38524,10 +38508,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; + std::vector< ViewShape *,std::allocator< ViewShape * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38541,36 +38525,36 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setslice__(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewShape *,std::allocator< ViewShape * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewShape_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewShape *,std::allocator< ViewShape * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38598,9 +38582,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38612,21 +38596,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delslice__(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewShape * >::difference_type >(val3); { try { try { @@ -38653,8 +38637,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38663,16 +38647,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___delitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); { try { try { @@ -38699,9 +38683,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38710,20 +38694,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewShape * >::value_type)std_vector_Sl_ViewShape_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -38737,7 +38721,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___getitem__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -38746,9 +38730,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::difference_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -38760,21 +38744,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer___setitem__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewShape * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { try { @@ -38801,8 +38785,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -38811,16 +38795,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_append(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_append" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_append" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { std_vector_Sl_ViewShape_Sm__Sg__append(arg1,arg2); @@ -38841,12 +38825,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewShapesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38855,7 +38839,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -38864,26 +38848,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *arg1 = 0 ; + std::vector< ViewShape * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >((std::vector< ViewShape * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38892,7 +38876,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -38903,21 +38887,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewShape * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38935,21 +38919,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_size" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewShape * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -38967,17 +38951,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { (arg1)->clear(); @@ -38998,8 +38982,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -39008,19 +38992,19 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_swap(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShapesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewShape * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -39041,21 +39025,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + SwigValueWrapper< std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewShape * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39064,30 +39048,30 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_get_allocator(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewShape * >::allocator_type(static_cast< const std::vector< ViewShape * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewShape * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39096,7 +39080,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39104,89 +39088,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewShape * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39195,7 +39113,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39203,89 +39121,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewShape * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39294,7 +39146,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39302,89 +39154,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewShape * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39393,7 +39179,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39401,76 +39187,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewShapesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewShapesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewShape * >::size_type arg1 ; + std::vector< ViewShape * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -39478,12 +39198,12 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"O:new_ViewShapesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39492,7 +39212,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_2(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39501,17 +39221,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { (arg1)->pop_back(); @@ -39532,8 +39252,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39542,16 +39262,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_0(PyObject *SWIGUNUS PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -39572,9 +39292,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39583,20 +39303,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } { @@ -39610,7 +39330,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39620,10 +39340,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::iterator arg3 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -39635,31 +39355,31 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewShape * >::iterator""'"); } } { @@ -39673,7 +39393,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -39687,18 +39407,18 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_0(self, args); } @@ -39706,16 +39426,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewShapesContainer_erase__SWIG_1(self, args); } @@ -39724,16 +39444,19 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_erase(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator)\n" + " erase(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * >::size_type arg1 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector< ViewShape * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -39744,17 +39467,17 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewShapesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewShape * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewShapesContainer" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewShape * > *)new std::vector< ViewShape * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39763,7 +39486,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer__SWIG_3(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -39776,7 +39499,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -39795,7 +39518,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_1(self, args); @@ -39809,7 +39532,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewShapesContainer__SWIG_3(self, args); @@ -39818,15 +39541,20 @@ SWIGINTERN PyObject *_wrap_new_ViewShapesContainer(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewShape)>()\n std::vector<(p.ViewShape)>(std::vector const &)\n std::vector<(p.ViewShape)>(std::vector::size_type)\n std::vector<(p.ViewShape)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShapesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewShape * >()\n" + " std::vector< ViewShape * >(std::vector< ViewShape * > const &)\n" + " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type)\n" + " std::vector< ViewShape * >(std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type arg2 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -39835,16 +39563,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_push_back(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShapesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -39865,21 +39593,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_front" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39888,7 +39616,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_front(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39897,21 +39625,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_back" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewShape * >::value_type)((std::vector< ViewShape * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -39920,7 +39648,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_back(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -39929,9 +39657,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39943,21 +39671,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_assign(PyObject *SWIGUNUSEDPARM(s PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -39978,9 +39706,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -39992,21 +39720,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize__SWIG_1(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -40031,13 +39759,13 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -40051,7 +39779,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -40060,7 +39788,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_resize__SWIG_1(self, args); @@ -40070,17 +39798,20 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_resize(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type)\n" + " resize(std::vector< ViewShape * > *,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::value_type arg3 = (std::vector< ViewShape * >::value_type) 0 ; + std::vector< ViewShape * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -40092,27 +39823,27 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -40124,7 +39855,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewShape * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -40134,10 +39865,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::iterator arg2 ; + std::vector< ViewShape * >::size_type arg3 ; + std::vector< ViewShape * >::value_type arg4 = (std::vector< ViewShape * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -40152,32 +39883,32 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert__SWIG_1(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewShapesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewShapesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewShape * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewShapesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewShape * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShapesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewShape * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewShape * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -40202,21 +39933,21 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_0(self, args); @@ -40226,12 +39957,12 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -40239,7 +39970,7 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewShapesContainer_insert__SWIG_1(self, args); @@ -40250,15 +39981,18 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_insert(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShapesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::value_type)\n" + " insert(std::vector< ViewShape * > *,std::vector< ViewShape * >::iterator,std::vector< ViewShape * >::size_type,std::vector< ViewShape * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -40267,16 +40001,16 @@ SWIGINTERN PyObject *_wrap_ViewShapesContainer_reserve(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewShapesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewShapesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewShape * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewShape * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -40297,21 +40031,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewShapesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; + std::vector< ViewShape * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewShapesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewShapesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewShape * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40329,17 +40063,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewShapesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewShape * > *arg1 = (std::vector< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewShapesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewShapesContainer" "', argument " "1"" of type '" "std::vector< ViewShape * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewShape * > * >(argp1); { try { delete arg1; @@ -40361,14 +40095,14 @@ fail: SWIGINTERN PyObject *ViewShapesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -40377,11 +40111,11 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewEdge_Sm__Sg__iterator(arg1,arg2); @@ -40402,21 +40136,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewEdge_Sm__Sg____nonzero__((std::vector< ViewEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40434,21 +40168,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewEdge_Sm__Sg____len__((std::vector< ViewEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40466,22 +40200,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); + result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40495,7 +40229,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40504,10 +40238,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; + std::vector< ViewEdge *,std::allocator< ViewEdge * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40519,25 +40253,25 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewEdge *,std::allocator< ViewEdge * > > *)std_vector_Sl_ViewEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40551,7 +40285,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -40560,10 +40294,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; + std::vector< ViewEdge *,std::allocator< ViewEdge * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40577,36 +40311,36 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewEdge *,std::allocator< ViewEdge * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40634,9 +40368,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40648,21 +40382,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewEdge * >::difference_type >(val3); { try { try { @@ -40689,8 +40423,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40699,16 +40433,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); { try { try { @@ -40735,9 +40469,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40746,20 +40480,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewEdge * >::value_type)std_vector_Sl_ViewEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -40773,7 +40507,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -40782,9 +40516,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::difference_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -40796,21 +40530,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { try { @@ -40837,8 +40571,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -40847,16 +40581,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_append" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_append" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { std_vector_Sl_ViewEdge_Sm__Sg__append(arg1,arg2); @@ -40877,12 +40611,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewEdge * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewEdgesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40891,7 +40625,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -40900,26 +40634,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * > *arg1 = 0 ; + std::vector< ViewEdge * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >((std::vector< ViewEdge * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40928,7 +40662,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -40939,21 +40673,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewEdge * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -40971,21 +40705,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_size" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewEdge * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41003,17 +40737,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { (arg1)->clear(); @@ -41034,8 +40768,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -41044,19 +40778,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewEdge * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -41077,21 +40811,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + SwigValueWrapper< std::allocator< ViewEdge * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewEdge * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41100,30 +40834,30 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewEdge * >::allocator_type(static_cast< const std::vector< ViewEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewEdge * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41132,7 +40866,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41140,89 +40874,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewEdge * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41231,7 +40899,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41239,89 +40907,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewEdge * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41330,7 +40932,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41338,89 +40940,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewEdge * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41429,7 +40965,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41437,76 +40973,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewEdgesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewEdgesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewEdge * >::size_type arg1 ; + std::vector< ViewEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -41514,12 +40984,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41528,7 +40998,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -41537,17 +41007,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { (arg1)->pop_back(); @@ -41568,8 +41038,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41578,16 +41048,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -41608,9 +41078,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41619,20 +41089,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } { @@ -41646,7 +41116,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41656,10 +41126,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::iterator arg3 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -41671,31 +41141,31 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } { @@ -41709,7 +41179,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -41723,18 +41193,18 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_0(self, args); } @@ -41742,16 +41212,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewEdgesContainer_erase__SWIG_1(self, args); } @@ -41760,16 +41230,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator)\n" + " erase(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * >::size_type arg1 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector< ViewEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -41780,17 +41253,17 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewEdge * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewEdgesContainer" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewEdge * > *)new std::vector< ViewEdge * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41799,7 +41272,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -41812,7 +41285,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -41831,7 +41304,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_1(self, args); @@ -41845,7 +41318,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewEdgesContainer__SWIG_3(self, args); @@ -41854,15 +41327,20 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewEdge)>()\n std::vector<(p.ViewEdge)>(std::vector const &)\n std::vector<(p.ViewEdge)>(std::vector::size_type)\n std::vector<(p.ViewEdge)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewEdge * >()\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * > const &)\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type)\n" + " std::vector< ViewEdge * >(std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type arg2 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -41871,16 +41349,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -41901,21 +41379,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_front" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41924,7 +41402,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41933,21 +41411,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_back" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewEdge * >::value_type)((std::vector< ViewEdge * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -41956,7 +41434,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -41965,9 +41443,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -41979,21 +41457,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -42014,9 +41492,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -42028,21 +41506,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -42067,13 +41545,13 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -42087,7 +41565,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -42096,7 +41574,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_resize__SWIG_1(self, args); @@ -42106,17 +41584,20 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type)\n" + " resize(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::value_type arg3 = (std::vector< ViewEdge * >::value_type) 0 ; + std::vector< ViewEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42128,27 +41609,27 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -42160,7 +41641,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -42170,10 +41651,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::iterator arg2 ; + std::vector< ViewEdge * >::size_type arg3 ; + std::vector< ViewEdge * >::value_type arg4 = (std::vector< ViewEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -42188,32 +41669,32 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewEdge * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewEdge * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewEdge * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewEdge * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -42238,21 +41719,21 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_0(self, args); @@ -42262,12 +41743,12 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -42275,7 +41756,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewEdgesContainer_insert__SWIG_1(self, args); @@ -42286,15 +41767,18 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::value_type)\n" + " insert(std::vector< ViewEdge * > *,std::vector< ViewEdge * >::iterator,std::vector< ViewEdge * >::size_type,std::vector< ViewEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -42303,16 +41787,16 @@ SWIGINTERN PyObject *_wrap_ViewEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewEdge * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -42333,21 +41817,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; + std::vector< ViewEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewEdge * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42365,17 +41849,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewEdge * > *arg1 = (std::vector< ViewEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewEdgesContainer" "', argument " "1"" of type '" "std::vector< ViewEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewEdge * > * >(argp1); { try { delete arg1; @@ -42397,14 +41881,14 @@ fail: SWIGINTERN PyObject *ViewEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -42413,11 +41897,11 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_iterator(PyObject *SWIGUNUSEDPARM(sel arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_iterator" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_FEdge_Sm__Sg__iterator(arg1,arg2); @@ -42438,21 +41922,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_FEdge_Sm__Sg____nonzero__((std::vector< FEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42470,21 +41954,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___len__" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_FEdge_Sm__Sg____len__((std::vector< FEdge * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42502,22 +41986,22 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); + result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42531,7 +42015,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_pop(PyObject *SWIGUNUSEDPARM(self), P cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42540,10 +42024,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; + std::vector< FEdge *,std::allocator< FEdge * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42555,25 +42039,25 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___getslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< FEdge *,std::allocator< FEdge * > > *)std_vector_Sl_FEdge_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42587,7 +42071,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getslice__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -42596,10 +42080,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; + std::vector< FEdge *,std::allocator< FEdge * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42613,36 +42097,36 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setslice__(PyObject *SWIGUNUSEDPARM PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___setslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer___setslice__" "', argument " "4"" of type '" "std::vector< FEdge *,std::allocator< FEdge * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_FEdge_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< FEdge *,std::allocator< FEdge * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42670,9 +42154,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42684,21 +42168,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delslice__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delslice__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delslice__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer___delslice__" "', argument " "3"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< FEdge * >::difference_type >(val3); { try { try { @@ -42725,8 +42209,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42735,16 +42219,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___delitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___delitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___delitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); { try { try { @@ -42771,9 +42255,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42782,20 +42266,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___getitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___getitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< FEdge * >::value_type)std_vector_Sl_FEdge_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -42809,7 +42293,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___getitem__(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -42818,9 +42302,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::difference_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -42832,21 +42316,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer___setitem__(PyObject *SWIGUNUSEDPARM( PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer___setitem__" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer___setitem__" "', argument " "2"" of type '" "std::vector< FEdge * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer___setitem__" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { try { @@ -42873,8 +42357,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -42883,16 +42367,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_append(PyObject *SWIGUNUSEDPARM(self) PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_append" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_append" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { std_vector_Sl_FEdge_Sm__Sg__append(arg1,arg2); @@ -42913,12 +42397,12 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_FEdgesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42927,7 +42411,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -42936,26 +42420,26 @@ fail: SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *arg1 = 0 ; + std::vector< FEdge * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >((std::vector< FEdge * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -42964,7 +42448,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -42975,21 +42459,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_empty" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< FEdge * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43007,21 +42491,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_size" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< FEdge * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43039,17 +42523,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_clear" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { (arg1)->clear(); @@ -43070,8 +42554,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -43080,19 +42564,19 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_swap" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FEdgesContainer_swap" "', argument " "2"" of type '" "std::vector< FEdge * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -43113,21 +42597,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + SwigValueWrapper< std::allocator< FEdge * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< FEdge * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43136,30 +42620,30 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_get_allocator(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< FEdge * >::allocator_type(static_cast< const std::vector< FEdge * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< FEdge * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43168,7 +42652,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43176,89 +42660,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< FEdge * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43267,7 +42685,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43275,89 +42693,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< FEdge * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43366,7 +42718,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43374,89 +42726,23 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< FEdge * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43465,7 +42751,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43473,76 +42759,10 @@ fail: } -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_FEdgesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_FEdgesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< FEdge * >::size_type arg1 ; + std::vector< FEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -43550,12 +42770,12 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"O:new_FEdgesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43564,7 +42784,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -43573,17 +42793,17 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_pop_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { (arg1)->pop_back(); @@ -43604,8 +42824,8 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -43614,16 +42834,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -43644,9 +42864,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43655,20 +42875,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } { @@ -43682,7 +42902,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43692,10 +42912,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::iterator arg3 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -43707,31 +42927,31 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_erase" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_erase" "', argument " "3"" of type '" "std::vector< FEdge * >::iterator""'"); } } { @@ -43745,7 +42965,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -43759,18 +42979,18 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_0(self, args); } @@ -43778,16 +42998,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_FEdgesContainer_erase__SWIG_1(self, args); } @@ -43796,16 +43016,19 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_erase(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator)\n" + " erase(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * >::size_type arg1 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; + std::vector< FEdge * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -43816,17 +43039,17 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( if (!PyArg_ParseTuple(args,(char *)"OO:new_FEdgesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< FEdge * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FEdgesContainer" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< FEdge * > *)new std::vector< FEdge * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43835,7 +43058,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -43848,7 +43071,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -43867,7 +43090,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_1(self, args); @@ -43881,7 +43104,7 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_FEdgesContainer__SWIG_3(self, args); @@ -43890,15 +43113,20 @@ SWIGINTERN PyObject *_wrap_new_FEdgesContainer(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.FEdge)>()\n std::vector<(p.FEdge)>(std::vector const &)\n std::vector<(p.FEdge)>(std::vector::size_type)\n std::vector<(p.FEdge)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FEdgesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< FEdge * >()\n" + " std::vector< FEdge * >(std::vector< FEdge * > const &)\n" + " std::vector< FEdge * >(std::vector< FEdge * >::size_type)\n" + " std::vector< FEdge * >(std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type arg2 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -43907,16 +43135,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_push_back(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_push_back" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FEdgesContainer_push_back" "', argument " "2"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -43937,21 +43165,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_front" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43960,7 +43188,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_front(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -43969,21 +43197,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_back" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< FEdge * >::value_type)((std::vector< FEdge * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -43992,7 +43220,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44001,9 +43229,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44015,21 +43243,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_assign(PyObject *SWIGUNUSEDPARM(self) PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_assign" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_assign" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_assign" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -44050,9 +43278,9 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44064,21 +43292,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_resize" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_resize" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_resize" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -44103,13 +43331,13 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -44123,7 +43351,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -44132,7 +43360,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_resize__SWIG_1(self, args); @@ -44142,17 +43370,20 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_resize(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type)\n" + " resize(std::vector< FEdge * > *,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::value_type arg3 = (std::vector< FEdge * >::value_type) 0 ; + std::vector< FEdge * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44164,27 +43395,27 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:FEdgesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -44196,7 +43427,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< FEdge * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -44206,10 +43437,10 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::iterator arg2 ; + std::vector< FEdge * >::size_type arg3 ; + std::vector< FEdge * >::value_type arg4 = (std::vector< FEdge * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -44224,32 +43455,32 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:FEdgesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_insert" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FEdgesContainer_insert" "', argument " "2"" of type '" "std::vector< FEdge * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FEdgesContainer_insert" "', argument " "3"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< FEdge * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FEdgesContainer_insert" "', argument " "4"" of type '" "std::vector< FEdge * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< FEdge * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -44274,21 +43505,21 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_0(self, args); @@ -44298,12 +43529,12 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -44311,7 +43542,7 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_FEdgesContainer_insert__SWIG_1(self, args); @@ -44322,15 +43553,18 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_insert(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'FEdgesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::value_type)\n" + " insert(std::vector< FEdge * > *,std::vector< FEdge * >::iterator,std::vector< FEdge * >::size_type,std::vector< FEdge * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -44339,16 +43573,16 @@ SWIGINTERN PyObject *_wrap_FEdgesContainer_reserve(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:FEdgesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_reserve" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FEdgesContainer_reserve" "', argument " "2"" of type '" "std::vector< FEdge * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< FEdge * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -44369,21 +43603,21 @@ fail: SWIGINTERN PyObject *_wrap_FEdgesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; + std::vector< FEdge * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:FEdgesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FEdgesContainer_capacity" "', argument " "1"" of type '" "std::vector< FEdge * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< FEdge * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44401,17 +43635,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_FEdgesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< FEdge * > *arg1 = (std::vector< FEdge * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_FEdgesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FEdgesContainer" "', argument " "1"" of type '" "std::vector< FEdge * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< FEdge * > * >(argp1); { try { delete arg1; @@ -44433,14 +43667,14 @@ fail: SWIGINTERN PyObject *FEdgesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -44449,11 +43683,11 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_iterator(PyObject *SWIGUNUSEDPA arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_ViewVertex_Sm__Sg__iterator(arg1,arg2); @@ -44474,21 +43708,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_ViewVertex_Sm__Sg____nonzero__((std::vector< ViewVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44506,21 +43740,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_ViewVertex_Sm__Sg____len__((std::vector< ViewVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44538,22 +43772,22 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); + result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44567,7 +43801,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44576,10 +43810,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; + std::vector< ViewVertex *,std::allocator< ViewVertex * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44591,25 +43825,25 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< ViewVertex *,std::allocator< ViewVertex * > > *)std_vector_Sl_ViewVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44623,7 +43857,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getslice__(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -44632,10 +43866,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; + std::vector< ViewVertex *,std::allocator< ViewVertex * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44649,36 +43883,36 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setslice__(PyObject *SWIGUNUS PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_ViewVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< ViewVertex *,std::allocator< ViewVertex * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44706,9 +43940,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44720,21 +43954,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delslice__(PyObject *SWIGUNUS PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< ViewVertex * >::difference_type >(val3); { try { try { @@ -44761,8 +43995,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44771,16 +44005,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___delitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); { try { try { @@ -44807,9 +44041,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44818,20 +44052,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< ViewVertex * >::value_type)std_vector_Sl_ViewVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -44845,7 +44079,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___getitem__(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -44854,9 +44088,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::difference_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -44868,21 +44102,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer___setitem__(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< ViewVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { try { @@ -44909,8 +44143,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -44919,16 +44153,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_append(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_append" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_append" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { std_vector_Sl_ViewVertex_Sm__Sg__append(arg1,arg2); @@ -44949,12 +44183,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< ViewVertex * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ViewVerticesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -44963,7 +44197,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -44972,26 +44206,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * > *arg1 = 0 ; + std::vector< ViewVertex * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >((std::vector< ViewVertex * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45000,7 +44234,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -45011,21 +44245,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< ViewVertex * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45043,21 +44277,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_size" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< ViewVertex * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45075,17 +44309,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { (arg1)->clear(); @@ -45106,8 +44340,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -45116,19 +44350,19 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< ViewVertex * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -45149,21 +44383,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + SwigValueWrapper< std::allocator< ViewVertex * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< ViewVertex * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45172,30 +44406,30 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_get_allocator(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< ViewVertex * >::allocator_type(static_cast< const std::vector< ViewVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< ViewVertex * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45204,7 +44438,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45212,89 +44446,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< ViewVertex * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45303,7 +44471,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45311,89 +44479,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< ViewVertex * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45402,7 +44504,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45410,89 +44512,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< ViewVertex * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45501,7 +44537,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45509,76 +44545,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ViewVerticesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ViewVerticesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< ViewVertex * >::size_type arg1 ; + std::vector< ViewVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -45586,12 +44556,12 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"O:new_ViewVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45600,7 +44570,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_2(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -45609,17 +44579,17 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { (arg1)->pop_back(); @@ -45640,8 +44610,8 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -45650,16 +44620,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_0(PyObject *SWIGUN PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -45680,9 +44650,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45691,20 +44661,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } { @@ -45718,7 +44688,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45728,10 +44698,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::iterator arg3 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -45743,31 +44713,31 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } { @@ -45781,7 +44751,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -45795,18 +44765,18 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_0(self, args); } @@ -45814,16 +44784,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ViewVerticesContainer_erase__SWIG_1(self, args); } @@ -45832,16 +44802,19 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_erase(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator)\n" + " erase(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * >::size_type arg1 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector< ViewVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -45852,17 +44825,17 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE if (!PyArg_ParseTuple(args,(char *)"OO:new_ViewVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< ViewVertex * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ViewVerticesContainer" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< ViewVertex * > *)new std::vector< ViewVertex * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45871,7 +44844,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer__SWIG_3(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -45884,7 +44857,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -45903,7 +44876,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_1(self, args); @@ -45917,7 +44890,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ViewVerticesContainer__SWIG_3(self, args); @@ -45926,15 +44899,20 @@ SWIGINTERN PyObject *_wrap_new_ViewVerticesContainer(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.ViewVertex)>()\n std::vector<(p.ViewVertex)>(std::vector const &)\n std::vector<(p.ViewVertex)>(std::vector::size_type)\n std::vector<(p.ViewVertex)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVerticesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< ViewVertex * >()\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * > const &)\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type)\n" + " std::vector< ViewVertex * >(std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type arg2 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -45943,16 +44921,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_push_back(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -45973,21 +44951,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_front" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -45996,7 +44974,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_front(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46005,21 +44983,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_back" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< ViewVertex * >::value_type)((std::vector< ViewVertex * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46028,7 +45006,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_back(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46037,9 +45015,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46051,21 +45029,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_assign(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -46086,9 +45064,9 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46100,21 +45078,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize__SWIG_1(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -46139,13 +45117,13 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46159,7 +45137,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -46168,7 +45146,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_resize__SWIG_1(self, args); @@ -46178,17 +45156,20 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_resize(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type)\n" + " resize(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::value_type arg3 = (std::vector< ViewVertex * >::value_type) 0 ; + std::vector< ViewVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46200,27 +45181,27 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -46232,7 +45213,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_0(PyObject *SWIGUN cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< ViewVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -46242,10 +45223,10 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::iterator arg2 ; + std::vector< ViewVertex * >::size_type arg3 ; + std::vector< ViewVertex * >::value_type arg4 = (std::vector< ViewVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -46260,32 +45241,32 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert__SWIG_1(PyObject *SWIGUN PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ViewVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ViewVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< ViewVertex * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< ViewVertex * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< ViewVertex * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< ViewVertex * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -46310,21 +45291,21 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_0(self, args); @@ -46334,12 +45315,12 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -46347,7 +45328,7 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ViewVerticesContainer_insert__SWIG_1(self, args); @@ -46358,15 +45339,18 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_insert(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVerticesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::value_type)\n" + " insert(std::vector< ViewVertex * > *,std::vector< ViewVertex * >::iterator,std::vector< ViewVertex * >::size_type,std::vector< ViewVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -46375,16 +45359,16 @@ SWIGINTERN PyObject *_wrap_ViewVerticesContainer_reserve(PyObject *SWIGUNUSEDPAR PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ViewVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< ViewVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< ViewVertex * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -46405,21 +45389,21 @@ fail: SWIGINTERN PyObject *_wrap_ViewVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; + std::vector< ViewVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ViewVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< ViewVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< ViewVertex * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46437,17 +45421,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ViewVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< ViewVertex * > *arg1 = (std::vector< ViewVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ViewVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ViewVerticesContainer" "', argument " "1"" of type '" "std::vector< ViewVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< ViewVertex * > * >(argp1); { try { delete arg1; @@ -46469,14 +45453,14 @@ fail: SWIGINTERN PyObject *ViewVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -46485,11 +45469,11 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_iterator(PyObject *SWIGUNUSEDPARM( arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_iterator" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_SVertex_Sm__Sg__iterator(arg1,arg2); @@ -46510,21 +45494,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___nonzero__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_SVertex_Sm__Sg____nonzero__((std::vector< SVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46542,21 +45526,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___len__" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_SVertex_Sm__Sg____len__((std::vector< SVertex * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46574,22 +45558,22 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); + result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46603,7 +45587,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_pop(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46612,10 +45596,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; + std::vector< SVertex *,std::allocator< SVertex * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46627,25 +45611,25 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___getslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< SVertex *,std::allocator< SVertex * > > *)std_vector_Sl_SVertex_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46659,7 +45643,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getslice__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -46668,10 +45652,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; + std::vector< SVertex *,std::allocator< SVertex * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46685,36 +45669,36 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setslice__(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___setslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer___setslice__" "', argument " "4"" of type '" "std::vector< SVertex *,std::allocator< SVertex * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_SVertex_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< SVertex *,std::allocator< SVertex * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46742,9 +45726,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46756,21 +45740,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delslice__(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delslice__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delslice__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer___delslice__" "', argument " "3"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< SVertex * >::difference_type >(val3); { try { try { @@ -46797,8 +45781,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46807,16 +45791,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___delitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___delitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___delitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); { try { try { @@ -46843,9 +45827,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46854,20 +45838,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___getitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___getitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< SVertex * >::value_type)std_vector_Sl_SVertex_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -46881,7 +45865,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___getitem__(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -46890,9 +45874,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::difference_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -46904,21 +45888,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer___setitem__(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer___setitem__" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer___setitem__" "', argument " "2"" of type '" "std::vector< SVertex * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer___setitem__" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { try { @@ -46945,8 +45929,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -46955,16 +45939,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_append(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_append" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_append" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { std_vector_Sl_SVertex_Sm__Sg__append(arg1,arg2); @@ -46985,12 +45969,12 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< SVertex * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_SVerticesContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -46999,7 +45983,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -47008,26 +45992,26 @@ fail: SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< SVertex * > *arg1 = 0 ; + std::vector< SVertex * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >((std::vector< SVertex * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47036,7 +46020,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -47047,21 +46031,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_empty" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< SVertex * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47079,21 +46063,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_size" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< SVertex * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47111,17 +46095,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_clear" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { (arg1)->clear(); @@ -47142,8 +46126,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -47152,19 +46136,19 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_swap(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_swap" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SVerticesContainer_swap" "', argument " "2"" of type '" "std::vector< SVertex * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -47185,21 +46169,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + SwigValueWrapper< std::allocator< SVertex * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_get_allocator" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< SVertex * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47208,30 +46192,30 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_get_allocator(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< SVertex * >::allocator_type(static_cast< const std::vector< SVertex * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< SVertex * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47240,7 +46224,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47248,89 +46232,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< SVertex * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47339,7 +46257,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47347,89 +46265,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< SVertex * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47438,7 +46290,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47446,89 +46298,23 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< SVertex * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47537,7 +46323,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47545,76 +46331,10 @@ fail: } -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_SVerticesContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_SVerticesContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< SVertex * >::size_type arg1 ; + std::vector< SVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -47622,12 +46342,12 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"O:new_SVerticesContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47636,7 +46356,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_2(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -47645,17 +46365,17 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_pop_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { (arg1)->pop_back(); @@ -47676,8 +46396,8 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -47686,16 +46406,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_0(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -47716,9 +46436,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -47727,20 +46447,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } { @@ -47754,7 +46474,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47764,10 +46484,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::iterator arg3 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -47779,31 +46499,31 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_erase" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_erase" "', argument " "3"" of type '" "std::vector< SVertex * >::iterator""'"); } } { @@ -47817,7 +46537,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -47831,18 +46551,18 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_0(self, args); } @@ -47850,16 +46570,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_SVerticesContainer_erase__SWIG_1(self, args); } @@ -47868,16 +46588,19 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_erase(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator)\n" + " erase(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< SVertex * >::size_type arg1 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; + std::vector< SVertex * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -47888,17 +46611,17 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA if (!PyArg_ParseTuple(args,(char *)"OO:new_SVerticesContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< SVertex * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SVerticesContainer" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< SVertex * > *)new std::vector< SVertex * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47907,7 +46630,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer__SWIG_3(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -47920,7 +46643,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -47939,7 +46662,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_1(self, args); @@ -47953,7 +46676,7 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_SVerticesContainer__SWIG_3(self, args); @@ -47962,15 +46685,20 @@ SWIGINTERN PyObject *_wrap_new_SVerticesContainer(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.SVertex)>()\n std::vector<(p.SVertex)>(std::vector const &)\n std::vector<(p.SVertex)>(std::vector::size_type)\n std::vector<(p.SVertex)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SVerticesContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< SVertex * >()\n" + " std::vector< SVertex * >(std::vector< SVertex * > const &)\n" + " std::vector< SVertex * >(std::vector< SVertex * >::size_type)\n" + " std::vector< SVertex * >(std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type arg2 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -47979,16 +46707,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_push_back(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_push_back" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SVerticesContainer_push_back" "', argument " "2"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -48009,21 +46737,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_front" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48032,7 +46760,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_front(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -48041,21 +46769,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_back" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< SVertex * >::value_type)((std::vector< SVertex * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48064,7 +46792,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_back(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -48073,9 +46801,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48087,21 +46815,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_assign(PyObject *SWIGUNUSEDPARM(se PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_assign" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_assign" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_assign" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -48122,9 +46850,9 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48136,21 +46864,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize__SWIG_1(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_resize" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_resize" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_resize" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -48175,13 +46903,13 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -48195,7 +46923,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -48204,7 +46932,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_resize__SWIG_1(self, args); @@ -48214,17 +46942,20 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_resize(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type)\n" + " resize(std::vector< SVertex * > *,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::value_type arg3 = (std::vector< SVertex * >::value_type) 0 ; + std::vector< SVertex * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -48236,27 +46967,27 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:SVerticesContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -48268,7 +46999,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< SVertex * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -48278,10 +47009,10 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::iterator arg2 ; + std::vector< SVertex * >::size_type arg3 ; + std::vector< SVertex * >::value_type arg4 = (std::vector< SVertex * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -48296,32 +47027,32 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert__SWIG_1(PyObject *SWIGUNUSE PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:SVerticesContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_insert" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "SVerticesContainer_insert" "', argument " "2"" of type '" "std::vector< SVertex * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SVerticesContainer_insert" "', argument " "3"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< SVertex * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SVerticesContainer_insert" "', argument " "4"" of type '" "std::vector< SVertex * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< SVertex * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -48346,21 +47077,21 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_0(self, args); @@ -48370,12 +47101,12 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -48383,7 +47114,7 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_SVerticesContainer_insert__SWIG_1(self, args); @@ -48394,15 +47125,18 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_insert(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SVerticesContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::value_type)\n" + " insert(std::vector< SVertex * > *,std::vector< SVertex * >::iterator,std::vector< SVertex * >::size_type,std::vector< SVertex * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -48411,16 +47145,16 @@ SWIGINTERN PyObject *_wrap_SVerticesContainer_reserve(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:SVerticesContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_reserve" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SVerticesContainer_reserve" "', argument " "2"" of type '" "std::vector< SVertex * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< SVertex * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -48441,21 +47175,21 @@ fail: SWIGINTERN PyObject *_wrap_SVerticesContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; + std::vector< SVertex * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:SVerticesContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVerticesContainer_capacity" "', argument " "1"" of type '" "std::vector< SVertex * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< SVertex * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -48473,17 +47207,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_SVerticesContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< SVertex * > *arg1 = (std::vector< SVertex * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_SVerticesContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVerticesContainer" "', argument " "1"" of type '" "std::vector< SVertex * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< SVertex * > * >(argp1); { try { delete arg1; @@ -48505,8 +47239,8 @@ fail: SWIGINTERN PyObject *SVerticesContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -48767,7 +47501,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewShapes(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48802,7 +47536,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewEdges(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48837,7 +47571,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_ViewVertices(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48872,7 +47606,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_FEdges(PyObject *SWIGUNUSEDPARM(self), PyObje cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -48907,7 +47641,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_SVertices(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49081,7 +47815,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -49091,7 +47825,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49113,7 +47847,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49323,7 +48057,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; - BBox *arg2 = 0 ; + BBox< Geometry::Vec3r > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -49337,17 +48071,17 @@ SWIGINTERN PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_setScene3dBBox" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_setScene3dBBox" "', argument " "2"" of type '" "BBox< Geometry::Vec3r > const &""'"); } - arg2 = reinterpret_cast< BBox * >(argp2); + arg2 = reinterpret_cast< BBox< Geometry::Vec3r > * >(argp2); { try { - (arg1)->setScene3dBBox((BBox const &)*arg2); + (arg1)->setScene3dBBox((BBox< Geometry::Vec3r > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49405,7 +48139,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_CreateTVertex" "', argument " "1"" of type '" "ViewMap *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -49413,7 +48147,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec3r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_CreateTVertex" "', argument " "3"" of type '" "Geometry::Vec3r const &""'"); } @@ -49426,7 +48160,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewMap_CreateTVertex" "', argument " "4"" of type '" "FEdge *""'"); } arg4 = reinterpret_cast< FEdge * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res5)) { SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } @@ -49434,7 +48168,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_CreateTVertex(PyObject *SWIGUNUSEDPARM(self), SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_CreateTVertex" "', argument " "5"" of type '" "Geometry::Vec3r const &""'"); } arg5 = reinterpret_cast< Geometry::Vec3r * >(argp5); - res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ViewMap_CreateTVertex" "', argument " "6"" of type '" "Geometry::Vec3r const &""'"); } @@ -49477,7 +48211,7 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; SVertex *arg2 = (SVertex *) 0 ; - std::vector *arg3 = 0 ; + std::vector< ViewEdge * > *arg3 = 0 ; ViewVertex *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -49500,14 +48234,14 @@ SWIGINTERN PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *SWIGUNUSEDPARM(sel SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewMap_InsertViewVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewMap_InsertViewVertex" "', argument " "3"" of type '" "std::vector< ViewEdge * > &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); + arg3 = reinterpret_cast< std::vector< ViewEdge * > * >(argp3); { try { result = (ViewVertex *)(arg1)->InsertViewVertex(arg2,*arg3); @@ -49528,7 +48262,7 @@ fail: SWIGINTERN PyObject *ViewMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewMap, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -49772,7 +48506,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49794,7 +48528,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49804,7 +48538,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49826,7 +48560,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49839,7 +48573,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49863,7 +48597,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n Possible C/C++ prototypes are:\n edges_begin()\n edges_begin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_begin'.\n" + " Possible C/C++ prototypes are:\n" + " edges_begin(ViewVertex *)\n" + " edges_begin(ViewVertex const *)\n"); return NULL; } @@ -49871,7 +48608,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49893,7 +48630,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49903,7 +48640,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -49925,7 +48662,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -49938,7 +48675,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -49962,7 +48699,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(ViewVertex *)\n" + " edges_end(ViewVertex const *)\n"); return NULL; } @@ -49971,7 +48711,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -50001,7 +48741,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50012,7 +48752,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; ViewVertex *arg1 = (ViewVertex *) 0 ; ViewEdge *arg2 = (ViewEdge *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -50042,7 +48782,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50055,7 +48795,7 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50089,7 +48829,10 @@ SWIGINTERN PyObject *_wrap_ViewVertex_edges_iterator(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n Possible C/C++ prototypes are:\n edges_iterator(ViewEdge *)\n edges_iterator(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewVertex_edges_iterator'.\n" + " Possible C/C++ prototypes are:\n" + " edges_iterator(ViewVertex *,ViewEdge *)\n" + " edges_iterator(ViewVertex const *,ViewEdge *)\n"); return NULL; } @@ -50201,7 +48944,7 @@ fail: SWIGINTERN PyObject *ViewVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -50359,7 +49102,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50487,7 +49230,7 @@ SWIGINTERN PyObject *_wrap_TVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -50660,7 +49403,7 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -50683,7 +49426,10 @@ SWIGINTERN PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n Possible C/C++ prototypes are:\n TVertex()\n TVertex(SVertex *,SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TVertex'.\n" + " Possible C/C++ prototypes are:\n" + " TVertex()\n" + " TVertex(SVertex *,SVertex *)\n"); return NULL; } @@ -50780,7 +49526,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeA(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50815,7 +49561,7 @@ SWIGINTERN PyObject *_wrap_TVertex_frontEdgeB(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50850,7 +49596,7 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeA(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -50885,7 +49631,7 @@ SWIGINTERN PyObject *_wrap_TVertex_backEdgeB(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -51067,7 +49813,7 @@ SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeA(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51107,7 +49853,10 @@ SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeA(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeA'.\n Possible C/C++ prototypes are:\n setFrontEdgeA(ViewEdge *,bool)\n setFrontEdgeA(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeA'.\n" + " Possible C/C++ prototypes are:\n" + " setFrontEdgeA(TVertex *,ViewEdge *,bool)\n" + " setFrontEdgeA(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51207,7 +49956,7 @@ SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeB(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51247,7 +49996,10 @@ SWIGINTERN PyObject *_wrap_TVertex_setFrontEdgeB(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeB'.\n Possible C/C++ prototypes are:\n setFrontEdgeB(ViewEdge *,bool)\n setFrontEdgeB(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setFrontEdgeB'.\n" + " Possible C/C++ prototypes are:\n" + " setFrontEdgeB(TVertex *,ViewEdge *,bool)\n" + " setFrontEdgeB(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51347,7 +50099,7 @@ SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeA(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51387,7 +50139,10 @@ SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeA(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeA'.\n Possible C/C++ prototypes are:\n setBackEdgeA(ViewEdge *,bool)\n setBackEdgeA(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeA'.\n" + " Possible C/C++ prototypes are:\n" + " setBackEdgeA(TVertex *,ViewEdge *,bool)\n" + " setBackEdgeA(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51487,7 +50242,7 @@ SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeB(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51527,7 +50282,10 @@ SWIGINTERN PyObject *_wrap_TVertex_setBackEdgeB(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeB'.\n Possible C/C++ prototypes are:\n setBackEdgeB(ViewEdge *,bool)\n setBackEdgeB(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_setBackEdgeB'.\n" + " Possible C/C++ prototypes are:\n" + " setBackEdgeB(TVertex *,ViewEdge *,bool)\n" + " setBackEdgeB(TVertex *,ViewEdge *)\n"); return NULL; } @@ -51709,7 +50467,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51731,7 +50489,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51741,7 +50499,7 @@ fail: SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -51763,7 +50521,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -51776,7 +50534,7 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -51800,7 +50558,10 @@ SWIGINTERN PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(TVertex *)\n" + " edges_end(TVertex const *)\n"); return NULL; } @@ -51944,7 +50705,7 @@ fail: SWIGINTERN PyObject *TVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_TVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -52102,7 +50863,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52230,7 +50991,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52426,7 +51187,7 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52444,7 +51205,10 @@ SWIGINTERN PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n Possible C/C++ prototypes are:\n NonTVertex()\n NonTVertex(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NonTVertex'.\n" + " Possible C/C++ prototypes are:\n" + " NonTVertex()\n" + " NonTVertex(SVertex *)\n"); return NULL; } @@ -52541,7 +51305,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_viewedges(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -52591,7 +51355,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_setViewEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex::directedViewEdge > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -52605,17 +51369,17 @@ SWIGINTERN PyObject *_wrap_NonTVertex_setViewEdges(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonTVertex_setViewEdges" "', argument " "1"" of type '" "NonTVertex *""'"); } arg1 = reinterpret_cast< NonTVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0 | 0); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonTVertex_setViewEdges" "', argument " "2"" of type '" "std::vector< ViewVertex::directedViewEdge > const &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< ViewVertex::directedViewEdge > * >(argp2); { try { - (arg1)->setViewEdges((std::vector const &)*arg2); + (arg1)->setViewEdges((std::vector< ViewVertex::directedViewEdge > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -52806,7 +51570,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52846,7 +51610,10 @@ SWIGINTERN PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n Possible C/C++ prototypes are:\n AddViewEdge(ViewEdge *,bool)\n AddViewEdge(ViewEdge *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_AddViewEdge'.\n" + " Possible C/C++ prototypes are:\n" + " AddViewEdge(NonTVertex *,ViewEdge *,bool)\n" + " AddViewEdge(NonTVertex *,ViewEdge *)\n"); return NULL; } @@ -52903,7 +51670,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -52925,7 +51692,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::edge_iterator(static_cast< const ViewVertex::edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52935,7 +51702,7 @@ fail: SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; NonTVertex *arg1 = (NonTVertex *) 0 ; - SwigValueWrapper > result; + SwigValueWrapper< ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -52957,7 +51724,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new ViewVertex::const_edge_iterator(static_cast< const ViewVertex::const_edge_iterator& >(result))), SWIGTYPE_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -52970,7 +51737,7 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -52994,7 +51761,10 @@ SWIGINTERN PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n Possible C/C++ prototypes are:\n edges_end()\n edges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'NonTVertex_edges_end'.\n" + " Possible C/C++ prototypes are:\n" + " edges_end(NonTVertex *)\n" + " edges_end(NonTVertex const *)\n"); return NULL; } @@ -53106,7 +51876,7 @@ fail: SWIGINTERN PyObject *NonTVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_NonTVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -53446,7 +52216,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -53517,7 +52287,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n Possible C/C++ prototypes are:\n ViewEdge()\n ViewEdge(ViewVertex *,ViewVertex *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdge'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdge()\n" + " ViewEdge(ViewVertex *,ViewVertex *)\n" + " ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n" + " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); return NULL; } @@ -53848,7 +52623,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -53872,7 +52647,10 @@ SWIGINTERN PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(ViewEdge *)\n" + " aShape(ViewEdge const *)\n"); return NULL; } @@ -53912,7 +52690,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdge *arg1 = (ViewEdge *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -53926,8 +52704,8 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -53937,7 +52715,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_occluders(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -54512,7 +53290,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_intersect_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -54520,7 +53298,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *SWIGUNUSEDPARM(s SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -54568,7 +53346,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_include_in_2d_area" "', argument " "1"" of type '" "ViewEdge const *""'"); } arg1 = reinterpret_cast< ViewEdge * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -54576,7 +53354,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *SWIGUNUSEDPARM( SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdge_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdge_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -55132,7 +53910,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55162,7 +53940,10 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(ViewEdge *,float)\n" + " pointsBegin(ViewEdge *)\n"); return NULL; } @@ -55246,7 +54027,7 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55276,14 +54057,17 @@ SWIGINTERN PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdge_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(ViewEdge *,float)\n" + " pointsEnd(ViewEdge *)\n"); return NULL; } SWIGINTERN PyObject *ViewEdge_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdge, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -55435,7 +54219,7 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55462,7 +54246,11 @@ SWIGINTERN PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n Possible C/C++ prototypes are:\n ViewShape()\n ViewShape(SShape *)\n ViewShape(ViewShape &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewShape'.\n" + " Possible C/C++ prototypes are:\n" + " ViewShape()\n" + " ViewShape(SShape *)\n" + " ViewShape(ViewShape &)\n"); return NULL; } @@ -55535,9 +54323,9 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; FEdge *arg2 = (FEdge *) 0 ; - std::vector *arg3 = 0 ; - std::vector *arg4 = 0 ; - std::vector *arg5 = 0 ; + std::vector< TVertex * > *arg3 = 0 ; + std::vector< FEdge * > *arg4 = 0 ; + std::vector< ViewEdge * > *arg5 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -55565,33 +54353,33 @@ SWIGINTERN PyObject *_wrap_ViewShape_SplitEdge(PyObject *SWIGUNUSEDPARM(self), P SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_SplitEdge" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0 | 0); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "3"" of type '" "std::vector< TVertex * > const &""'"); } - arg3 = reinterpret_cast< std::vector * >(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0 ); + arg3 = reinterpret_cast< std::vector< TVertex * > * >(argp3); + res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } if (!argp4) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "4"" of type '" "std::vector< FEdge * > &""'"); } - arg4 = reinterpret_cast< std::vector * >(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 ); + arg4 = reinterpret_cast< std::vector< FEdge * > * >(argp4); + res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 ); if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); } if (!argp5) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_SplitEdge" "', argument " "5"" of type '" "std::vector< ViewEdge * > &""'"); } - arg5 = reinterpret_cast< std::vector * >(argp5); + arg5 = reinterpret_cast< std::vector< ViewEdge * > * >(argp5); { try { - (arg1)->SplitEdge(arg2,(std::vector const &)*arg3,*arg4,*arg5); + (arg1)->SplitEdge(arg2,(std::vector< TVertex * > const &)*arg3,*arg4,*arg5); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -55677,7 +54465,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -55701,7 +54489,10 @@ SWIGINTERN PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n Possible C/C++ prototypes are:\n sshape()\n sshape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewShape_sshape'.\n" + " Possible C/C++ prototypes are:\n" + " sshape(ViewShape *)\n" + " sshape(ViewShape const *)\n"); return NULL; } @@ -55709,7 +54500,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *result = 0 ; + std::vector< ViewVertex * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -55723,8 +54514,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py { try { { - std::vector &_result_ref = (arg1)->vertices(); - result = (std::vector *) &_result_ref; + std::vector< ViewVertex * > &_result_ref = (arg1)->vertices(); + result = (std::vector< ViewVertex * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -55734,7 +54525,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_vertices(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55744,7 +54535,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *result = 0 ; + std::vector< ViewEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -55758,8 +54549,8 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj { try { { - std::vector &_result_ref = (arg1)->edges(); - result = (std::vector *) &_result_ref; + std::vector< ViewEdge * > &_result_ref = (arg1)->edges(); + result = (std::vector< ViewEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -55769,7 +54560,7 @@ SWIGINTERN PyObject *_wrap_ViewShape_edges(PyObject *SWIGUNUSEDPARM(self), PyObj cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -55851,7 +54642,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_setVertices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewVertex * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -55865,19 +54656,19 @@ SWIGINTERN PyObject *_wrap_ViewShape_setVertices(PyObject *SWIGUNUSEDPARM(self), } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setVertices" "', argument " "2"" of type '" "std::vector< ViewVertex * > const &""'"); } arg2 = ptr; } { try { - (arg1)->setVertices((std::vector const &)*arg2); + (arg1)->setVertices((std::vector< ViewVertex * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -55898,7 +54689,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewShape_setEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewShape *arg1 = (ViewShape *) 0 ; - std::vector *arg2 = 0 ; + std::vector< ViewEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -55912,19 +54703,19 @@ SWIGINTERN PyObject *_wrap_ViewShape_setEdges(PyObject *SWIGUNUSEDPARM(self), Py } arg1 = reinterpret_cast< ViewShape * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewShape_setEdges" "', argument " "2"" of type '" "std::vector< ViewEdge * > const &""'"); } arg2 = ptr; } { try { - (arg1)->setEdges((std::vector const &)*arg2); + (arg1)->setEdges((std::vector< ViewEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -56104,7 +54895,7 @@ fail: SWIGINTERN PyObject *ViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewShape, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -56385,7 +55176,7 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -56444,7 +55235,13 @@ SWIGINTERN PyObject *_wrap_new_ViewVertexOrientedViewEdgeIterator(PyObject *self } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewVertexInternal::orientedViewEdgeIterator()\n ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewVertexOrientedViewEdgeIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewVertexInternal::orientedViewEdgeIterator()\n" + " ViewVertexInternal::orientedViewEdgeIterator(Nature::VertexNature)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator const &)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator)\n" + " ViewVertexInternal::orientedViewEdgeIterator(ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator,ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator)\n"); return NULL; } @@ -56629,7 +55426,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator_getObject(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56661,7 +55458,7 @@ SWIGINTERN PyObject *_wrap_ViewVertexOrientedViewEdgeIterator___deref__(PyObject cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairTViewEdge_p_bool_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_ViewEdge_p_bool_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -56701,7 +55498,7 @@ fail: SWIGINTERN PyObject *ViewVertexOrientedViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewVertexInternal__orientedViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -56838,7 +55635,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -56885,7 +55682,11 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeSVertexIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::SVertexIterator()\n ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeSVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdgeInternal::SVertexIterator()\n" + " ViewEdgeInternal::SVertexIterator(ViewEdgeInternal::SVertexIterator const &)\n" + " ViewEdgeInternal::SVertexIterator(SVertex *,SVertex *,FEdge *,FEdge *,float)\n"); return NULL; } @@ -57408,7 +56209,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint3D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57536,7 +56337,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_getPoint2D(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57890,7 +56691,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57925,7 +56726,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -57935,7 +56736,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< set< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -57957,7 +56758,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normals(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new set(static_cast< const set& >(result))), SWIGTYPE_p_setTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new set< Geometry::Vec3r >(static_cast< const set< Geometry::Vec3r >& >(result))), SWIGTYPE_p_setT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -57999,7 +56800,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector *result = 0 ; + std::vector< FEdge * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -58013,8 +56814,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA { try { { - std::vector const &_result_ref = (*arg1)->fedges(); - result = (std::vector *) &_result_ref; + std::vector< FEdge * > const &_result_ref = (*arg1)->fedges(); + result = (std::vector< FEdge * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -58024,7 +56825,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_fedges(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(*result)); + resultobj = swig::from(static_cast< std::vector > >(*result)); return resultobj; fail: return NULL; @@ -58165,7 +56966,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -58189,7 +56990,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_shape(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n Possible C/C++ prototypes are:\n shape()\n shape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeSVertexIterator_shape'.\n" + " Possible C/C++ prototypes are:\n" + " shape(ViewEdgeInternal::SVertexIterator *)\n" + " shape(ViewEdgeInternal::SVertexIterator const *)\n"); return NULL; } @@ -58275,7 +57079,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setPoint3D(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setPoint3D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setPoint3D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58318,7 +57122,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setPoint2D(PyObject *SWIGUNUS SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_setPoint2D" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setPoint2D" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58361,7 +57165,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_AddNormal(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "1"" of type '" "ViewEdgeInternal::SVertexIterator *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_AddNormal" "', argument " "2"" of type '" "Geometry::Vec3r const &""'"); } @@ -58517,7 +57321,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setDirectionFredo(PyObject *S } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setDirectionFredo" "', argument " "2"" of type '" "Geometry::Vec2r""'"); } @@ -58604,7 +57408,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_directionFredo(PyObject *SWIG cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -58657,7 +57461,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::SVertexIterator *arg1 = (ViewEdgeInternal::SVertexIterator *) 0 ; - std::vector *arg2 = 0 ; + std::vector< FEdge * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 = SWIG_OLDOBJ ; @@ -58671,19 +57475,19 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_setFEdges(PyObject *SWIGUNUSE } arg1 = reinterpret_cast< ViewEdgeInternal::SVertexIterator * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res2 = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeSVertexIterator_setFEdges" "', argument " "2"" of type '" "std::vector< FEdge * > const &""'"); } arg2 = ptr; } { try { - (*arg1)->setFEdges((std::vector const &)*arg2); + (*arg1)->setFEdges((std::vector< FEdge * > const &)*arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -58930,7 +57734,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point2d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -58965,7 +57769,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_point3d(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -58997,7 +57801,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeSVertexIterator_normal(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -59361,7 +58165,7 @@ fail: SWIGINTERN PyObject *ViewEdgeSVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__SVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -59539,7 +58343,7 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -59593,7 +58397,12 @@ SWIGINTERN PyObject *_wrap_new_ViewEdgeViewEdgeIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n Possible C/C++ prototypes are:\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewEdgeViewEdgeIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *,bool)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdge *)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *)\n" + " ViewEdgeInternal::ViewEdgeIterator(PyObject *,ViewEdgeInternal::ViewEdgeIterator const &)\n"); return NULL; } @@ -60646,7 +59455,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -60670,7 +59479,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_aShape(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(ViewEdgeInternal::ViewEdgeIterator *)\n" + " aShape(ViewEdgeInternal::ViewEdgeIterator const *)\n"); return NULL; } @@ -60774,7 +59586,7 @@ fail: SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -60788,8 +59600,8 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS { try { { - std::vector &_result_ref = (*arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -60799,7 +59611,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_occluders(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -61374,7 +60186,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -61382,7 +60194,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_intersect_2d_area(PyObject * SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -61430,7 +60242,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator const *""'"); } arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -61438,7 +60250,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_include_in_2d_area(PyObject SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ViewEdgeViewEdgeIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -61994,7 +60806,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -62024,7 +60836,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsBegin(PyObject *self, } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *,float)\n" + " pointsBegin(ViewEdgeInternal::ViewEdgeIterator *)\n"); return NULL; } @@ -62108,7 +60923,7 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -62138,7 +60953,10 @@ SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_pointsEnd(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ViewEdgeViewEdgeIterator_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *,float)\n" + " pointsEnd(ViewEdgeInternal::ViewEdgeIterator *)\n"); return NULL; } @@ -62242,7 +61060,7 @@ fail: SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -62250,7 +61068,7 @@ SWIGINTERN PyObject *ViewEdgeViewEdgeIterator_swigregister(PyObject *SWIGUNUSEDP SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< void > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVoid",&obj0)) SWIG_fail; @@ -62259,9 +61077,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVoid(arg1); + result = (UnaryFunction0D< void > *)new SwigDirector_UnaryFunction0DVoid(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< void > *)new UnaryFunction0D< void >(); } } @@ -62272,7 +61090,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62281,17 +61099,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); { try { delete arg1; @@ -62313,7 +61131,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62322,20 +61140,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid_getName" "', argument " "1"" of type '" "UnaryFunction0D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< void > const *)arg1)->UnaryFunction0D< void >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< void > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62357,7 +61175,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; Interface0DIterator *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -62369,11 +61187,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVoid___call__" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVoid___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62388,7 +61206,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction0D::operator ()(*arg2); + (arg1)->UnaryFunction0D< void >::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -62412,17 +61230,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< void > *arg1 = (UnaryFunction0D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVoid" "', argument " "1"" of type '" "UnaryFunction0D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< void > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62437,15 +61255,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTvoid_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_void_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< unsigned int > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; @@ -62454,9 +61272,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DUnsigned(arg1); + result = (UnaryFunction0D< unsigned int > *)new SwigDirector_UnaryFunction0DUnsigned(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< unsigned int > *)new UnaryFunction0D< unsigned int >(); } } @@ -62467,7 +61285,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62476,17 +61294,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { try { delete arg1; @@ -62508,7 +61326,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62517,20 +61335,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< unsigned int > const *)arg1)->UnaryFunction0D< unsigned int >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< unsigned int > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62552,7 +61370,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; Interface0DIterator *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -62565,11 +61383,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DUnsigned___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62584,7 +61402,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction0D< unsigned int >::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -62608,17 +61426,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< unsigned int > *arg1 = (UnaryFunction0D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DUnsigned" "', argument " "1"" of type '" "UnaryFunction0D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< unsigned int > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62633,15 +61451,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< float > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DFloat",&obj0)) SWIG_fail; @@ -62650,9 +61468,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DFloat(arg1); + result = (UnaryFunction0D< float > *)new SwigDirector_UnaryFunction0DFloat(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< float > *)new UnaryFunction0D< float >(); } } @@ -62663,7 +61481,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62672,17 +61490,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { try { delete arg1; @@ -62704,7 +61522,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62713,20 +61531,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat_getName" "', argument " "1"" of type '" "UnaryFunction0D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< float > const *)arg1)->UnaryFunction0D< float >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< float > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62748,7 +61566,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; Interface0DIterator *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -62761,11 +61579,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DFloat___call__" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DFloat___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62780,7 +61598,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction0D< float >::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -62804,17 +61622,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< float > *arg1 = (UnaryFunction0D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DFloat" "', argument " "1"" of type '" "UnaryFunction0D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< float > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -62829,15 +61647,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< double > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DDouble",&obj0)) SWIG_fail; @@ -62846,9 +61664,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DDouble(arg1); + result = (UnaryFunction0D< double > *)new SwigDirector_UnaryFunction0DDouble(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< double > *)new UnaryFunction0D< double >(); } } @@ -62859,7 +61677,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -62868,17 +61686,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { try { delete arg1; @@ -62900,7 +61718,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -62909,20 +61727,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble_getName" "', argument " "1"" of type '" "UnaryFunction0D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< double > const *)arg1)->UnaryFunction0D< double >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< double > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -62944,7 +61762,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; Interface0DIterator *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -62957,11 +61775,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DDouble___call__" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DDouble___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -62976,7 +61794,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction0D::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction0D< double >::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -63000,17 +61818,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< double > *arg1 = (UnaryFunction0D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DDouble" "', argument " "1"" of type '" "UnaryFunction0D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63025,15 +61843,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Geometry::Vec2f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec2f",&obj0)) SWIG_fail; @@ -63042,9 +61860,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec2f(arg1); + result = (UnaryFunction0D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction0DVec2f(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Geometry::Vec2f > *)new UnaryFunction0D< Geometry::Vec2f >(); } } @@ -63055,7 +61873,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63064,17 +61882,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); { try { delete arg1; @@ -63096,7 +61914,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63105,20 +61923,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->UnaryFunction0D< VecMat::Vec2< float > >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Geometry::Vec2f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63140,9 +61958,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63153,11 +61971,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec2f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63172,7 +61990,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< VecMat::Vec2< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63187,7 +62005,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -63196,17 +62014,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec2f > *arg1 = (UnaryFunction0D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec2f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec2f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63221,15 +62039,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Geometry::Vec3f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DVec3f",&obj0)) SWIG_fail; @@ -63238,9 +62056,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DVec3f(arg1); + result = (UnaryFunction0D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction0DVec3f(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Geometry::Vec3f > *)new UnaryFunction0D< Geometry::Vec3f >(); } } @@ -63251,7 +62069,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63260,17 +62078,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); { try { delete arg1; @@ -63292,7 +62110,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63301,20 +62119,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D >::getName(); + result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->UnaryFunction0D< VecMat::Vec3< float > >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Geometry::Vec3f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63336,9 +62154,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; Interface0DIterator *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63349,11 +62167,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVec3f___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63368,7 +62186,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction0D >::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< VecMat::Vec3< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63383,7 +62201,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -63392,17 +62210,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Geometry::Vec3f > *arg1 = (UnaryFunction0D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DVec3f" "', argument " "1"" of type '" "UnaryFunction0D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Geometry::Vec3f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63417,15 +62235,15 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< Id > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction0DId",&obj0)) SWIG_fail; @@ -63434,9 +62252,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction0D *)new SwigDirector_UnaryFunction0DId(arg1); + result = (UnaryFunction0D< Id > *)new SwigDirector_UnaryFunction0DId(arg1); } else { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< Id > *)new UnaryFunction0D< Id >(); } } @@ -63447,7 +62265,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63456,17 +62274,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); { try { delete arg1; @@ -63488,7 +62306,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -63497,20 +62315,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId_getName(PyObject *SWIGUNUSEDPARM(se bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DId_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId_getName" "', argument " "1"" of type '" "UnaryFunction0D< Id > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction0D const *)arg1)->UnaryFunction0D::getName(); + result = ((UnaryFunction0D< Id > const *)arg1)->UnaryFunction0D< Id >::getName(); } else { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< Id > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -63532,7 +62350,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; Interface0DIterator *arg2 = 0 ; Id result; void *argp1 = 0 ; @@ -63545,11 +62363,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DId___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DId___call__" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DId___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63564,7 +62382,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DId___call__(PyObject *SWIGUNUSEDPARM(s { try { if (upcall) { - result = (arg1)->UnaryFunction0D::operator ()(*arg2); + result = (arg1)->UnaryFunction0D< Id >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -63588,17 +62406,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction0DId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< Id > *arg1 = (UnaryFunction0D< Id > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction0DId",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTId_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_Id_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction0DId" "', argument " "1"" of type '" "UnaryFunction0D< Id > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< Id > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -63613,19 +62431,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DId_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTId_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_Id_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *result = 0 ; + UnaryFunction0D< ViewShape * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D *)new UnaryFunction0D(); + result = (UnaryFunction0D< ViewShape * > *)new UnaryFunction0D< ViewShape * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63634,7 +62452,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63643,17 +62461,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DViewShape" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); { try { delete arg1; @@ -63675,21 +62493,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); { try { - result = ((UnaryFunction0D const *)arg1)->getName(); + result = ((UnaryFunction0D< ViewShape * > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63707,7 +62525,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = (UnaryFunction0D *) 0 ; + UnaryFunction0D< ViewShape * > *arg1 = (UnaryFunction0D< ViewShape * > *) 0 ; Interface0DIterator *arg2 = 0 ; ViewShape *result = 0 ; void *argp1 = 0 ; @@ -63718,11 +62536,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *SWIGUNUSE PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< ViewShape * > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< ViewShape * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63751,19 +62569,19 @@ fail: SWIGINTERN PyObject *UnaryFunction0DViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTViewShape_p_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_ViewShape_p_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *result = 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction0DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction0D > *)new UnaryFunction0D >(); + result = (UnaryFunction0D< std::vector< ViewShape * > > *)new UnaryFunction0D< std::vector< ViewShape * > >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63772,7 +62590,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -63781,17 +62599,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_UnaryFunction0DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction0DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction0DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); { try { delete arg1; @@ -63813,21 +62631,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction0DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); { try { - result = ((UnaryFunction0D > const *)arg1)->getName(); + result = ((UnaryFunction0D< std::vector< ViewShape * > > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -63845,9 +62663,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D > *arg1 = (UnaryFunction0D > *) 0 ; + UnaryFunction0D< std::vector< ViewShape * > > *arg1 = (UnaryFunction0D< std::vector< ViewShape * > > *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -63856,11 +62674,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction0DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction0D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction0D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< std::vector< ViewShape * > > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface0DIterator, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction0DVectorViewShape___call__" "', argument " "2"" of type '" "Interface0DIterator &""'"); @@ -63880,7 +62698,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -63889,8 +62707,8 @@ fail: SWIGINTERN PyObject *UnaryFunction0DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64027,7 +62845,7 @@ fail: SWIGINTERN PyObject *GetXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64165,7 +62983,7 @@ fail: SWIGINTERN PyObject *GetYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64303,7 +63121,7 @@ fail: SWIGINTERN PyObject *GetZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64441,7 +63259,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedXF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64579,7 +63397,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedYF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64717,7 +63535,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetProjectedZF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64855,7 +63673,7 @@ fail: SWIGINTERN PyObject *GetCurvilinearAbscissaF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetCurvilinearAbscissaF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -64993,7 +63811,7 @@ fail: SWIGINTERN PyObject *GetParameterF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetParameterF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65067,7 +63885,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65131,7 +63949,7 @@ fail: SWIGINTERN PyObject *VertexOrientation2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65205,7 +64023,7 @@ SWIGINTERN PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65269,7 +64087,7 @@ fail: SWIGINTERN PyObject *VertexOrientation3DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__VertexOrientation3DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65407,7 +64225,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Curvature2DAngleF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65545,7 +64363,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ZDiscontinuityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65619,7 +64437,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF0D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -65683,7 +64501,7 @@ fail: SWIGINTERN PyObject *Normal2DF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__Normal2DF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65821,7 +64639,7 @@ fail: SWIGINTERN PyObject *MaterialF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__MaterialF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -65959,7 +64777,7 @@ fail: SWIGINTERN PyObject *ShapeIdF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ShapeIdF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66097,7 +64915,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__QuantitativeInvisibilityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66235,7 +65053,7 @@ fail: SWIGINTERN PyObject *CurveNatureF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__CurveNatureF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66373,7 +65191,7 @@ fail: SWIGINTERN PyObject *GetShapeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetShapeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66414,7 +65232,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions0D::GetOccludersF0D *arg1 = (Functions0D::GetOccludersF0D *) 0 ; Interface0DIterator *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -66447,7 +65265,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF0D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -66511,7 +65329,7 @@ fail: SWIGINTERN PyObject *GetOccludersF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludersF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66649,7 +65467,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetOccludeeF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -66704,7 +65522,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< void > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVoid",&obj0)) SWIG_fail; @@ -66713,9 +65531,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1); + result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(); } } @@ -66726,7 +65544,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66737,7 +65555,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< void > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -66754,9 +65572,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); + result = (UnaryFunction1D< void > *)new SwigDirector_UnaryFunction1DVoid(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< void > *)new UnaryFunction1D< void >(arg2); } } @@ -66767,7 +65585,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid__SWIG_1(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -66780,7 +65598,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -66806,24 +65624,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVoid(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(void)>(PyObject *)\n UnaryFunction1D<(void)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVoid'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< void >(PyObject *)\n" + " UnaryFunction1D< void >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { try { delete arg1; @@ -66845,7 +65666,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -66854,20 +65675,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getName(PyObject *SWIGUNUSEDPARM( bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getName" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< void > const *)arg1)->UnaryFunction1D< void >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< void > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -66889,7 +65710,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; Interface1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66901,11 +65722,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid___call__" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVoid___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -66920,7 +65741,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid___call__(PyObject *SWIGUNUSEDPARM { try { if (upcall) { - (arg1)->UnaryFunction1D::operator ()(*arg2); + (arg1)->UnaryFunction1D< void >::operator ()(*arg2); } else { (arg1)->operator ()(*arg2); } @@ -66944,7 +65765,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -66954,11 +65775,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_setIntegrationType(PyObject *SWIG PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVoid_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVoid_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -66984,21 +65805,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVoid_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVoid_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVoid_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< void > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< void > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67016,17 +65837,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVoid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< void > *arg1 = (UnaryFunction1D< void > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVoid",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_void_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVoid" "', argument " "1"" of type '" "UnaryFunction1D< void > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< void > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67041,15 +65862,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVoid_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTvoid_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_void_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< unsigned int > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; @@ -67058,9 +65879,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1); + result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(); } } @@ -67071,7 +65892,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_0(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67082,7 +65903,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< unsigned int > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67099,9 +65920,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); + result = (UnaryFunction1D< unsigned int > *)new SwigDirector_UnaryFunction1DUnsigned(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< unsigned int > *)new UnaryFunction1D< unsigned int >(arg2); } } @@ -67112,7 +65933,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned__SWIG_1(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67125,7 +65946,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67151,24 +65972,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DUnsigned(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(unsigned int)>(PyObject *)\n UnaryFunction1D<(unsigned int)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DUnsigned'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< unsigned int >(PyObject *)\n" + " UnaryFunction1D< unsigned int >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { try { delete arg1; @@ -67190,7 +66014,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67199,20 +66023,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *SWIGUNUSEDP bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getName" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< unsigned int > const *)arg1)->UnaryFunction1D< unsigned int >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< unsigned int > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67234,7 +66058,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; Interface1D *arg2 = 0 ; unsigned int result; void *argp1 = 0 ; @@ -67247,11 +66071,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DUnsigned___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67266,7 +66090,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *SWIGUNUSED { try { if (upcall) { - result = (unsigned int)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (unsigned int)(arg1)->UnaryFunction1D< unsigned int >::operator ()(*arg2); } else { result = (unsigned int)(arg1)->operator ()(*arg2); } @@ -67290,7 +66114,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67300,11 +66124,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject * PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DUnsigned_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DUnsigned_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67330,21 +66154,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DUnsigned_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DUnsigned_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< unsigned int > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67362,17 +66186,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< unsigned int > *arg1 = (UnaryFunction1D< unsigned int > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DUnsigned",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DUnsigned" "', argument " "1"" of type '" "UnaryFunction1D< unsigned int > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< unsigned int > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67387,15 +66211,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DUnsigned_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTunsigned_int_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_unsigned_int_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< float > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DFloat",&obj0)) SWIG_fail; @@ -67404,9 +66228,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1); + result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(); } } @@ -67417,7 +66241,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67428,7 +66252,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< float > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67445,9 +66269,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); + result = (UnaryFunction1D< float > *)new SwigDirector_UnaryFunction1DFloat(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< float > *)new UnaryFunction1D< float >(arg2); } } @@ -67458,7 +66282,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67471,7 +66295,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67497,24 +66321,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DFloat(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(float)>(PyObject *)\n UnaryFunction1D<(float)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DFloat'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< float >(PyObject *)\n" + " UnaryFunction1D< float >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { try { delete arg1; @@ -67536,7 +66363,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67545,20 +66372,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getName" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< float > const *)arg1)->UnaryFunction1D< float >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< float > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67580,7 +66407,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; Interface1D *arg2 = 0 ; float result; void *argp1 = 0 ; @@ -67593,11 +66420,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat___call__" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DFloat___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67612,7 +66439,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (float)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (float)(arg1)->UnaryFunction1D< float >::operator ()(*arg2); } else { result = (float)(arg1)->operator ()(*arg2); } @@ -67636,7 +66463,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67646,11 +66473,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DFloat_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DFloat_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -67676,21 +66503,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DFloat_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DFloat_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< float > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< float > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -67708,17 +66535,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< float > *arg1 = (UnaryFunction1D< float > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DFloat",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTfloat_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_float_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DFloat" "', argument " "1"" of type '" "UnaryFunction1D< float > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< float > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -67733,15 +66560,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTfloat_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_float_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< double > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DDouble",&obj0)) SWIG_fail; @@ -67750,9 +66577,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1); + result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(); } } @@ -67763,7 +66590,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_0(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67774,7 +66601,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< double > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -67791,9 +66618,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); + result = (UnaryFunction1D< double > *)new SwigDirector_UnaryFunction1DDouble(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< double > *)new UnaryFunction1D< double >(arg2); } } @@ -67804,7 +66631,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble__SWIG_1(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -67817,7 +66644,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -67843,24 +66670,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DDouble(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(double)>(PyObject *)\n UnaryFunction1D<(double)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DDouble'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< double >(PyObject *)\n" + " UnaryFunction1D< double >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { try { delete arg1; @@ -67882,7 +66712,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -67891,20 +66721,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getName" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D::getName(); + result = ((UnaryFunction1D< double > const *)arg1)->UnaryFunction1D< double >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< double > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -67926,7 +66756,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; Interface1D *arg2 = 0 ; double result; void *argp1 = 0 ; @@ -67939,11 +66769,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble___call__" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DDouble___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -67958,7 +66788,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *SWIGUNUSEDPA { try { if (upcall) { - result = (double)(arg1)->UnaryFunction1D::operator ()(*arg2); + result = (double)(arg1)->UnaryFunction1D< double >::operator ()(*arg2); } else { result = (double)(arg1)->operator ()(*arg2); } @@ -67982,7 +66812,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -67992,11 +66822,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *SW PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DDouble_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DDouble_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68022,21 +66852,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DDouble_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DDouble_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< double > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< double > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68054,17 +66884,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< double > *arg1 = (UnaryFunction1D< double > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DDouble",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTdouble_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_double_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DDouble" "', argument " "1"" of type '" "UnaryFunction1D< double > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< double > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68079,15 +66909,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DDouble_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTdouble_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_double_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec2f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec2f",&obj0)) SWIG_fail; @@ -68096,9 +66926,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1); + result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(); } } @@ -68109,7 +66939,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68120,7 +66950,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec2f > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -68137,9 +66967,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); + result = (UnaryFunction1D< Geometry::Vec2f > *)new SwigDirector_UnaryFunction1DVec2f(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< Geometry::Vec2f > *)new UnaryFunction1D< Geometry::Vec2f >(arg2); } } @@ -68150,7 +66980,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68163,7 +66993,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68189,24 +67019,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec2f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec2f)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec2f'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< Geometry::Vec2f >(PyObject *)\n" + " UnaryFunction1D< Geometry::Vec2f >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { try { delete arg1; @@ -68228,7 +67061,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -68237,20 +67070,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->UnaryFunction1D< VecMat::Vec2< float > >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -68272,9 +67105,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec2 result; + VecMat::Vec2< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68285,11 +67118,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec2f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68304,7 +67137,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D< VecMat::Vec2< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -68319,7 +67152,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec2(static_cast< const VecMat::Vec2& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec2< float >(static_cast< const VecMat::Vec2< float >& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -68328,7 +67161,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68338,11 +67171,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec2f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec2f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68368,21 +67201,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec2f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec2f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< Geometry::Vec2f > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68400,17 +67233,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec2f > *arg1 = (UnaryFunction1D< Geometry::Vec2f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec2f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec2f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec2f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec2f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68425,15 +67258,15 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec2f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec3f > *result = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_UnaryFunction1DVec3f",&obj0)) SWIG_fail; @@ -68442,9 +67275,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1); + result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(); + result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(); } } @@ -68455,7 +67288,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_0(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68466,7 +67299,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED PyObject *resultobj = 0; PyObject *arg1 = (PyObject *) 0 ; IntegrationType arg2 ; - UnaryFunction1D *result = 0 ; + UnaryFunction1D< Geometry::Vec3f > *result = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; @@ -68483,9 +67316,9 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED try { if ( arg1 != Py_None ) { /* subclassed */ - result = (UnaryFunction1D *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); + result = (UnaryFunction1D< Geometry::Vec3f > *)new SwigDirector_UnaryFunction1DVec3f(arg1,arg2); } else { - result = (UnaryFunction1D *)new UnaryFunction1D(arg2); + result = (UnaryFunction1D< Geometry::Vec3f > *)new UnaryFunction1D< Geometry::Vec3f >(arg2); } } @@ -68496,7 +67329,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f__SWIG_1(PyObject *SWIGUNUSED cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68509,7 +67342,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68535,24 +67368,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVec3f(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *)\n UnaryFunction1D<(Geometry::Vec3f)>(PyObject *,IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVec3f'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< Geometry::Vec3f >(PyObject *)\n" + " UnaryFunction1D< Geometry::Vec3f >(PyObject *,IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { try { delete arg1; @@ -68574,7 +67410,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; @@ -68583,20 +67419,20 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *SWIGUNUSEDPARM bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getName" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); director = SWIG_DIRECTOR_CAST(arg1); upcall = (director && (director->swig_get_self()==obj0)); try { { try { if (upcall) { - result = ((UnaryFunction1D const *)arg1)->UnaryFunction1D >::getName(); + result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->UnaryFunction1D< VecMat::Vec3< float > >::getName(); } else { - result = ((UnaryFunction1D const *)arg1)->getName(); + result = ((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getName(); } } // catch (Swig::DirectorTypeMismatch&) { @@ -68618,9 +67454,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; Interface1D *arg2 = 0 ; - VecMat::Vec3 result; + VecMat::Vec3< float > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68631,11 +67467,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR bool upcall = false; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVec3f___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68650,7 +67486,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR { try { if (upcall) { - result = (arg1)->UnaryFunction1D >::operator ()(*arg2); + result = (arg1)->UnaryFunction1D< VecMat::Vec3< float > >::operator ()(*arg2); } else { result = (arg1)->operator ()(*arg2); } @@ -68665,7 +67501,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *SWIGUNUSEDPAR } catch (Swig::DirectorException&) { SWIG_fail; } - resultobj = SWIG_NewPointerObj((new VecMat::Vec3(static_cast< const VecMat::Vec3& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new VecMat::Vec3< float >(static_cast< const VecMat::Vec3< float >& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -68674,7 +67510,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68684,11 +67520,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVec3f_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVec3f_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -68714,21 +67550,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVec3f_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVec3f_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< Geometry::Vec3f > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68746,17 +67582,17 @@ fail: SWIGINTERN PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D *arg1 = (UnaryFunction1D *) 0 ; + UnaryFunction1D< Geometry::Vec3f > *arg1 = (UnaryFunction1D< Geometry::Vec3f > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:disown_UnaryFunction1DVec3f",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_UnaryFunction1DVec3f" "', argument " "1"" of type '" "UnaryFunction1D< Geometry::Vec3f > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< Geometry::Vec3f > * >(argp1); { Swig::Director *director = dynamic_cast(arg1); if (director) director->swig_disown(); @@ -68771,19 +67607,19 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVec3f_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *result = 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_UnaryFunction1DVectorViewShape")) SWIG_fail; { try { - result = (UnaryFunction1D > *)new UnaryFunction1D >(); + result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68792,7 +67628,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_0(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68802,7 +67638,7 @@ fail: SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; IntegrationType arg1 ; - UnaryFunction1D > *result = 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -68815,7 +67651,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * arg1 = static_cast< IntegrationType >(val1); { try { - result = (UnaryFunction1D > *)new UnaryFunction1D >(arg1); + result = (UnaryFunction1D< std::vector< ViewShape * > > *)new UnaryFunction1D< std::vector< ViewShape * > >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68824,7 +67660,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape__SWIG_1(PyObject * cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -68837,7 +67673,7 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -68856,24 +67692,27 @@ SWIGINTERN PyObject *_wrap_new_UnaryFunction1DVectorViewShape(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n Possible C/C++ prototypes are:\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>()\n UnaryFunction1D<(std::vector<(p.ViewShape)>)>(IntegrationType)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnaryFunction1DVectorViewShape'.\n" + " Possible C/C++ prototypes are:\n" + " UnaryFunction1D< std::vector< ViewShape * > >()\n" + " UnaryFunction1D< std::vector< ViewShape * > >(IntegrationType)\n"); return NULL; } SWIGINTERN PyObject *_wrap_delete_UnaryFunction1DVectorViewShape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_UnaryFunction1DVectorViewShape",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnaryFunction1DVectorViewShape" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { delete arg1; @@ -68895,21 +67734,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getName",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getName" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { - result = ((UnaryFunction1D > const *)arg1)->getName(); + result = ((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getName(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -68927,9 +67766,9 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -68938,11 +67777,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape___call__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Interface1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "UnaryFunction1DVectorViewShape___call__" "', argument " "2"" of type '" "Interface1D &""'"); @@ -68962,7 +67801,7 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *SWI cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -68971,7 +67810,7 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; IntegrationType arg2 ; void *argp1 = 0 ; int res1 = 0 ; @@ -68981,11 +67820,11 @@ SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyO PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:UnaryFunction1DVectorViewShape_setIntegrationType",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); ecode2 = SWIG_AsVal_int(obj1, &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnaryFunction1DVectorViewShape_setIntegrationType" "', argument " "2"" of type '" "IntegrationType""'"); @@ -69011,21 +67850,21 @@ fail: SWIGINTERN PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction1D > *arg1 = (UnaryFunction1D > *) 0 ; + UnaryFunction1D< std::vector< ViewShape * > > *arg1 = (UnaryFunction1D< std::vector< ViewShape * > > *) 0 ; IntegrationType result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:UnaryFunction1DVectorViewShape_getIntegrationType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D > const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnaryFunction1DVectorViewShape_getIntegrationType" "', argument " "1"" of type '" "UnaryFunction1D< std::vector< ViewShape * > > const *""'"); } - arg1 = reinterpret_cast< UnaryFunction1D > * >(argp1); + arg1 = reinterpret_cast< UnaryFunction1D< std::vector< ViewShape * > > * >(argp1); { try { - result = (IntegrationType)((UnaryFunction1D > const *)arg1)->getIntegrationType(); + result = (IntegrationType)((UnaryFunction1D< std::vector< ViewShape * > > const *)arg1)->getIntegrationType(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -69043,8 +67882,8 @@ fail: SWIGINTERN PyObject *UnaryFunction1DVectorViewShape_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69190,7 +68029,7 @@ fail: SWIGINTERN PyObject *GetXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69256,7 +68095,7 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69275,7 +68114,10 @@ SWIGINTERN PyObject *_wrap_new_GetYF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetYF1D(IntegrationType)\n Functions1D::GetYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetYF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetYF1D(IntegrationType)\n" + " Functions1D::GetYF1D()\n"); return NULL; } @@ -69390,7 +68232,7 @@ fail: SWIGINTERN PyObject *GetYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69456,7 +68298,7 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69475,7 +68317,10 @@ SWIGINTERN PyObject *_wrap_new_GetZF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetZF1D(IntegrationType)\n Functions1D::GetZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetZF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetZF1D(IntegrationType)\n" + " Functions1D::GetZF1D()\n"); return NULL; } @@ -69590,7 +68435,7 @@ fail: SWIGINTERN PyObject *GetZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69656,7 +68501,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69675,7 +68520,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedXF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedXF1D(IntegrationType)\n Functions1D::GetProjectedXF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedXF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedXF1D(IntegrationType)\n" + " Functions1D::GetProjectedXF1D()\n"); return NULL; } @@ -69790,7 +68638,7 @@ fail: SWIGINTERN PyObject *GetProjectedXF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedXF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -69856,7 +68704,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -69875,7 +68723,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedYF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedYF1D(IntegrationType)\n Functions1D::GetProjectedYF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedYF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedYF1D(IntegrationType)\n" + " Functions1D::GetProjectedYF1D()\n"); return NULL; } @@ -69990,7 +68841,7 @@ fail: SWIGINTERN PyObject *GetProjectedYF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedYF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70056,7 +68907,7 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70075,7 +68926,10 @@ SWIGINTERN PyObject *_wrap_new_GetProjectedZF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetProjectedZF1D(IntegrationType)\n Functions1D::GetProjectedZF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetProjectedZF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetProjectedZF1D(IntegrationType)\n" + " Functions1D::GetProjectedZF1D()\n"); return NULL; } @@ -70190,7 +69044,7 @@ fail: SWIGINTERN PyObject *GetProjectedZF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetProjectedZF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70256,7 +69110,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70275,7 +69129,10 @@ SWIGINTERN PyObject *_wrap_new_Orientation2DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation2DF1D(IntegrationType)\n Functions1D::Orientation2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation2DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Orientation2DF1D(IntegrationType)\n" + " Functions1D::Orientation2DF1D()\n"); return NULL; } @@ -70349,7 +69206,7 @@ SWIGINTERN PyObject *_wrap_Orientation2DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -70390,7 +69247,7 @@ fail: SWIGINTERN PyObject *Orientation2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70456,7 +69313,7 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70475,7 +69332,10 @@ SWIGINTERN PyObject *_wrap_new_Orientation3DF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Orientation3DF1D(IntegrationType)\n Functions1D::Orientation3DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Orientation3DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Orientation3DF1D(IntegrationType)\n" + " Functions1D::Orientation3DF1D()\n"); return NULL; } @@ -70549,7 +69409,7 @@ SWIGINTERN PyObject *_wrap_Orientation3DF1D___call__(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -70590,7 +69450,7 @@ fail: SWIGINTERN PyObject *Orientation3DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Orientation3DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70656,7 +69516,7 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70675,7 +69535,10 @@ SWIGINTERN PyObject *_wrap_new_ZDiscontinuityF1D(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::ZDiscontinuityF1D(IntegrationType)\n Functions1D::ZDiscontinuityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ZDiscontinuityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::ZDiscontinuityF1D(IntegrationType)\n" + " Functions1D::ZDiscontinuityF1D()\n"); return NULL; } @@ -70790,7 +69653,7 @@ fail: SWIGINTERN PyObject *ZDiscontinuityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ZDiscontinuityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -70856,7 +69719,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -70875,7 +69738,10 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityF1D(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n Functions1D::QuantitativeInvisibilityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::QuantitativeInvisibilityF1D(IntegrationType)\n" + " Functions1D::QuantitativeInvisibilityF1D()\n"); return NULL; } @@ -70990,7 +69856,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__QuantitativeInvisibilityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71056,7 +69922,7 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71075,7 +69941,10 @@ SWIGINTERN PyObject *_wrap_new_CurveNatureF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n Possible C/C++ prototypes are:\n Functions1D::CurveNatureF1D(IntegrationType)\n Functions1D::CurveNatureF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurveNatureF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::CurveNatureF1D(IntegrationType)\n" + " Functions1D::CurveNatureF1D()\n"); return NULL; } @@ -71190,7 +70059,7 @@ fail: SWIGINTERN PyObject *CurveNatureF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__CurveNatureF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71327,7 +70196,7 @@ fail: SWIGINTERN PyObject *TimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__TimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71464,7 +70333,7 @@ fail: SWIGINTERN PyObject *IncrementChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__IncrementChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71601,7 +70470,7 @@ fail: SWIGINTERN PyObject *ChainingTimeStampF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__ChainingTimeStampF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71667,7 +70536,7 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71686,7 +70555,10 @@ SWIGINTERN PyObject *_wrap_new_Curvature2DAngleF1D(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Curvature2DAngleF1D(IntegrationType)\n Functions1D::Curvature2DAngleF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curvature2DAngleF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Curvature2DAngleF1D(IntegrationType)\n" + " Functions1D::Curvature2DAngleF1D()\n"); return NULL; } @@ -71801,7 +70673,7 @@ fail: SWIGINTERN PyObject *Curvature2DAngleF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Curvature2DAngleF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -71867,7 +70739,7 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -71886,7 +70758,10 @@ SWIGINTERN PyObject *_wrap_new_Normal2DF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n Possible C/C++ prototypes are:\n Functions1D::Normal2DF1D(IntegrationType)\n Functions1D::Normal2DF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Normal2DF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::Normal2DF1D(IntegrationType)\n" + " Functions1D::Normal2DF1D()\n"); return NULL; } @@ -71960,7 +70835,7 @@ SWIGINTERN PyObject *_wrap_Normal2DF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -72001,7 +70876,7 @@ fail: SWIGINTERN PyObject *Normal2DF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__Normal2DF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72065,7 +70940,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; Functions1D::GetShapeF1D *arg1 = (Functions1D::GetShapeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72098,7 +70973,7 @@ SWIGINTERN PyObject *_wrap_GetShapeF1D___call__(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72139,7 +71014,7 @@ fail: SWIGINTERN PyObject *GetShapeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetShapeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72203,7 +71078,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel PyObject *resultobj = 0; Functions1D::GetOccludersF1D *arg1 = (Functions1D::GetOccludersF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72236,7 +71111,7 @@ SWIGINTERN PyObject *_wrap_GetOccludersF1D___call__(PyObject *SWIGUNUSEDPARM(sel cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72277,7 +71152,7 @@ fail: SWIGINTERN PyObject *GetOccludersF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludersF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72341,7 +71216,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; Functions1D::GetOccludeeF1D *arg1 = (Functions1D::GetOccludeeF1D *) 0 ; Interface1D *arg2 = 0 ; - std::vector > result; + std::vector< ViewShape *,std::allocator< ViewShape * > > result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -72374,7 +71249,7 @@ SWIGINTERN PyObject *_wrap_GetOccludeeF1D___call__(PyObject *SWIGUNUSEDPARM(self cout << "Warning: director exception catched" << endl; } } - resultobj = swig::from(static_cast< std::vector > >(result)); + resultobj = swig::from(static_cast< std::vector > >(result)); return resultobj; fail: return NULL; @@ -72415,7 +71290,7 @@ fail: SWIGINTERN PyObject *GetOccludeeF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetOccludeeF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72479,7 +71354,7 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72498,7 +71373,10 @@ SWIGINTERN PyObject *_wrap_Module_setAlwaysRefresh(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n Possible C/C++ prototypes are:\n setAlwaysRefresh(bool)\n Module::setAlwaysRefresh()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setAlwaysRefresh'.\n" + " Possible C/C++ prototypes are:\n" + " setAlwaysRefresh(bool)\n" + " Module::setAlwaysRefresh()\n"); return NULL; } @@ -72562,7 +71440,7 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72581,7 +71459,10 @@ SWIGINTERN PyObject *_wrap_Module_setCausal(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n Possible C/C++ prototypes are:\n setCausal(bool)\n Module::setCausal()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setCausal'.\n" + " Possible C/C++ prototypes are:\n" + " setCausal(bool)\n" + " Module::setCausal()\n"); return NULL; } @@ -72645,7 +71526,7 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72664,7 +71545,10 @@ SWIGINTERN PyObject *_wrap_Module_setDrawable(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n Possible C/C++ prototypes are:\n setDrawable(bool)\n Module::setDrawable()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Module_setDrawable'.\n" + " Possible C/C++ prototypes are:\n" + " setDrawable(bool)\n" + " Module::setDrawable()\n"); return NULL; } @@ -72795,7 +71679,7 @@ fail: SWIGINTERN PyObject *Module_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Module, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -72861,7 +71745,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -72880,7 +71764,10 @@ SWIGINTERN PyObject *_wrap_new_DensityF0D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n Possible C/C++ prototypes are:\n Functions0D::DensityF0D(double)\n Functions0D::DensityF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF0D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions0D::DensityF0D(double)\n" + " Functions0D::DensityF0D()\n"); return NULL; } @@ -72995,7 +71882,7 @@ fail: SWIGINTERN PyObject *DensityF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__DensityF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73061,7 +71948,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -73080,7 +71967,10 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF0D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n Possible C/C++ prototypes are:\n Functions0D::LocalAverageDepthF0D(real)\n Functions0D::LocalAverageDepthF0D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF0D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions0D::LocalAverageDepthF0D(real)\n" + " Functions0D::LocalAverageDepthF0D()\n"); return NULL; } @@ -73195,7 +72085,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__LocalAverageDepthF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73354,7 +72244,7 @@ fail: SWIGINTERN PyObject *ReadMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73510,7 +72400,7 @@ fail: SWIGINTERN PyObject *ReadSteerableViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadSteerableViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73657,7 +72547,7 @@ fail: SWIGINTERN PyObject *ReadCompleteViewMapPixelF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__ReadCompleteViewMapPixelF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73804,7 +72694,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions0D__GetViewMapGradientNormF0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -73961,7 +72851,7 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74018,7 +72908,12 @@ SWIGINTERN PyObject *_wrap_new_DensityF1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::DensityF1D(double,IntegrationType,float)\n Functions1D::DensityF1D(double,IntegrationType)\n Functions1D::DensityF1D(double)\n Functions1D::DensityF1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::DensityF1D(double,IntegrationType,float)\n" + " Functions1D::DensityF1D(double,IntegrationType)\n" + " Functions1D::DensityF1D(double)\n" + " Functions1D::DensityF1D()\n"); return NULL; } @@ -74133,7 +73028,7 @@ fail: SWIGINTERN PyObject *DensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__DensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74217,7 +73112,7 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74249,7 +73144,10 @@ SWIGINTERN PyObject *_wrap_new_LocalAverageDepthF1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n Possible C/C++ prototypes are:\n Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n Functions1D::LocalAverageDepthF1D(real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_LocalAverageDepthF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::LocalAverageDepthF1D(real,IntegrationType)\n" + " Functions1D::LocalAverageDepthF1D(real)\n"); return NULL; } @@ -74364,7 +73262,7 @@ fail: SWIGINTERN PyObject *LocalAverageDepthF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__LocalAverageDepthF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74498,7 +73396,7 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74552,7 +73450,11 @@ SWIGINTERN PyObject *_wrap_new_GetCompleteViewMapDensityF1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetCompleteViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType,float)\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int,IntegrationType)\n" + " Functions1D::GetCompleteViewMapDensityF1D(unsigned int)\n"); return NULL; } @@ -74667,7 +73569,7 @@ fail: SWIGINTERN PyObject *GetCompleteViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetCompleteViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -74828,7 +73730,7 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -74900,7 +73802,11 @@ SWIGINTERN PyObject *_wrap_new_GetDirectionalViewMapDensityF1D(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetDirectionalViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType,float)\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int,IntegrationType)\n" + " Functions1D::GetDirectionalViewMapDensityF1D(unsigned int,unsigned int)\n"); return NULL; } @@ -75015,7 +73921,7 @@ fail: SWIGINTERN PyObject *GetDirectionalViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetDirectionalViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75149,7 +74055,7 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75203,7 +74109,11 @@ SWIGINTERN PyObject *_wrap_new_GetSteerableViewMapDensityF1D(PyObject *self, PyO } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n Functions1D::GetSteerableViewMapDensityF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetSteerableViewMapDensityF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType,float)\n" + " Functions1D::GetSteerableViewMapDensityF1D(int,IntegrationType)\n" + " Functions1D::GetSteerableViewMapDensityF1D(int)\n"); return NULL; } @@ -75318,7 +74228,7 @@ fail: SWIGINTERN PyObject *GetSteerableViewMapDensityF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetSteerableViewMapDensityF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75452,7 +74362,7 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75506,7 +74416,11 @@ SWIGINTERN PyObject *_wrap_new_GetViewMapGradientNormF1D(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n Possible C/C++ prototypes are:\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n Functions1D::GetViewMapGradientNormF1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_GetViewMapGradientNormF1D'.\n" + " Possible C/C++ prototypes are:\n" + " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType,float)\n" + " Functions1D::GetViewMapGradientNormF1D(int,IntegrationType)\n" + " Functions1D::GetViewMapGradientNormF1D(int)\n"); return NULL; } @@ -75621,7 +74535,7 @@ fail: SWIGINTERN PyObject *GetViewMapGradientNormF1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Functions1D__GetViewMapGradientNormF1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -75866,7 +74780,7 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -75926,7 +74840,11 @@ SWIGINTERN PyObject *_wrap_LoadMapCF(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n Possible C/C++ prototypes are:\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n ContextFunctions::LoadMapCF(char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'LoadMapCF'.\n" + " Possible C/C++ prototypes are:\n" + " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int,float)\n" + " ContextFunctions::LoadMapCF(char const *,char const *,unsigned int)\n" + " ContextFunctions::LoadMapCF(char const *,char const *)\n"); return NULL; } @@ -76312,7 +75230,7 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -76374,7 +75292,13 @@ SWIGINTERN PyObject *_wrap_new_AdjacencyIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n Possible C/C++ prototypes are:\n AdjacencyIterator()\n AdjacencyIterator(ViewVertex *,bool,bool)\n AdjacencyIterator(ViewVertex *,bool)\n AdjacencyIterator(ViewVertex *)\n AdjacencyIterator(AdjacencyIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AdjacencyIterator'.\n" + " Possible C/C++ prototypes are:\n" + " AdjacencyIterator()\n" + " AdjacencyIterator(ViewVertex *,bool,bool)\n" + " AdjacencyIterator(ViewVertex *,bool)\n" + " AdjacencyIterator(ViewVertex *)\n" + " AdjacencyIterator(AdjacencyIterator const &)\n"); return NULL; } @@ -76979,7 +75903,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -77003,7 +75927,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_aShape(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n Possible C/C++ prototypes are:\n aShape()\n aShape()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_aShape'.\n" + " Possible C/C++ prototypes are:\n" + " aShape(AdjacencyIterator *)\n" + " aShape(AdjacencyIterator const *)\n"); return NULL; } @@ -77107,7 +76034,7 @@ fail: SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; - std::vector *result = 0 ; + std::vector< ViewShape * > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -77121,8 +76048,8 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( { try { { - std::vector &_result_ref = (*arg1)->occluders(); - result = (std::vector *) &_result_ref; + std::vector< ViewShape * > &_result_ref = (*arg1)->occluders(); + result = (std::vector< ViewShape * > *) &_result_ref; } } // catch (Swig::DirectorTypeMismatch&) { @@ -77132,7 +76059,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_occluders(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -77707,7 +76634,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -77715,7 +76642,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_intersect_2d_area(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_intersect_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -77763,7 +76690,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -77771,7 +76698,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_include_in_2d_area(PyObject *SWIGUN SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } arg2 = reinterpret_cast< Geometry::Vec2r * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AdjacencyIterator_include_in_2d_area" "', argument " "3"" of type '" "Geometry::Vec2r const &""'"); } @@ -78327,7 +77254,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78357,7 +77284,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsBegin(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(AdjacencyIterator *,float)\n" + " pointsBegin(AdjacencyIterator *)\n"); return NULL; } @@ -78441,7 +77371,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78471,7 +77401,10 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_pointsEnd(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'AdjacencyIterator_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(AdjacencyIterator *,float)\n" + " pointsEnd(AdjacencyIterator *)\n"); return NULL; } @@ -78550,7 +77483,7 @@ fail: SWIGINTERN PyObject *AdjacencyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_AdjacencyIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -78855,7 +77788,7 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -78965,7 +77898,14 @@ SWIGINTERN PyObject *_wrap_new_ChainingIterator(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n Possible C/C++ prototypes are:\n ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n ChainingIterator(PyObject *,bool,bool)\n ChainingIterator(PyObject *,bool)\n ChainingIterator(PyObject *)\n ChainingIterator(PyObject *,ChainingIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainingIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainingIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" + " ChainingIterator(PyObject *,bool,bool,ViewEdge *)\n" + " ChainingIterator(PyObject *,bool,bool)\n" + " ChainingIterator(PyObject *,bool)\n" + " ChainingIterator(PyObject *)\n" + " ChainingIterator(PyObject *,ChainingIterator const &)\n"); return NULL; } @@ -79325,7 +78265,7 @@ fail: SWIGINTERN PyObject *ChainingIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainingIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -79562,7 +78502,7 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -79641,7 +78581,13 @@ SWIGINTERN PyObject *_wrap_new_ChainSilhouetteIterator(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n Possible C/C++ prototypes are:\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n ChainSilhouetteIterator(PyObject *,bool)\n ChainSilhouetteIterator(PyObject *)\n ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainSilhouetteIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *,bool)\n" + " ChainSilhouetteIterator(PyObject *,bool,ViewEdge *)\n" + " ChainSilhouetteIterator(PyObject *,bool)\n" + " ChainSilhouetteIterator(PyObject *)\n" + " ChainSilhouetteIterator(PyObject *,ChainSilhouetteIterator const &)\n"); return NULL; } @@ -79808,7 +78754,7 @@ fail: SWIGINTERN PyObject *ChainSilhouetteIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainSilhouetteIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -80483,7 +79429,7 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 7); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -80736,7 +79682,19 @@ SWIGINTERN PyObject *_wrap_new_ChainPredicateIterator(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n Possible C/C++ prototypes are:\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,bool,bool)\n ChainPredicateIterator(PyObject *,bool)\n ChainPredicateIterator(PyObject *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ChainPredicateIterator'.\n" + " Possible C/C++ prototypes are:\n" + " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *,bool)\n" + " ChainPredicateIterator(PyObject *,bool,bool,ViewEdge *)\n" + " ChainPredicateIterator(PyObject *,bool,bool)\n" + " ChainPredicateIterator(PyObject *,bool)\n" + " ChainPredicateIterator(PyObject *)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool,ViewEdge *)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &,bool)\n" + " ChainPredicateIterator(PyObject *,UnaryPredicate1D &,BinaryPredicate1D &)\n" + " ChainPredicateIterator(PyObject *,ChainPredicateIterator const &)\n"); return NULL; } @@ -80903,7 +79861,7 @@ fail: SWIGINTERN PyObject *ChainPredicateIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ChainPredicateIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81099,7 +80057,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81249,7 +80207,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81387,7 +80345,7 @@ fail: SWIGINTERN PyObject *TrueUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__TrueUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81525,7 +80483,7 @@ fail: SWIGINTERN PyObject *FalseUP0D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates0D__FalseUP0D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81721,7 +80679,7 @@ fail: SWIGINTERN PyObject *UnaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_UnaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -81929,7 +80887,7 @@ fail: SWIGINTERN PyObject *BinaryPredicate1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_BinaryPredicate1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82067,7 +81025,7 @@ fail: SWIGINTERN PyObject *TrueUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82205,7 +81163,7 @@ fail: SWIGINTERN PyObject *FalseUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82271,7 +81229,7 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -82290,7 +81248,10 @@ SWIGINTERN PyObject *_wrap_new_QuantitativeInvisibilityUP1D(PyObject *self, PyOb } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n Predicates1D::QuantitativeInvisibilityUP1D()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QuantitativeInvisibilityUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::QuantitativeInvisibilityUP1D(unsigned int)\n" + " Predicates1D::QuantitativeInvisibilityUP1D()\n"); return NULL; } @@ -82405,7 +81366,7 @@ fail: SWIGINTERN PyObject *QuantitativeInvisibilityUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__QuantitativeInvisibilityUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82543,7 +81504,7 @@ fail: SWIGINTERN PyObject *ContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82681,7 +81642,7 @@ fail: SWIGINTERN PyObject *ExternalContourUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ExternalContourUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82828,7 +81789,7 @@ fail: SWIGINTERN PyObject *EqualToTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -82975,7 +81936,7 @@ fail: SWIGINTERN PyObject *EqualToChainingTimeStampUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__EqualToChainingTimeStampUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83059,7 +82020,7 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -83091,7 +82052,10 @@ SWIGINTERN PyObject *_wrap_new_ShapeUP1D(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n Predicates1D::ShapeUP1D(unsigned int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShapeUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::ShapeUP1D(unsigned int,unsigned int)\n" + " Predicates1D::ShapeUP1D(unsigned int)\n"); return NULL; } @@ -83206,7 +82170,7 @@ fail: SWIGINTERN PyObject *ShapeUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ShapeUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83356,7 +82320,7 @@ fail: SWIGINTERN PyObject *TrueBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__TrueBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83506,7 +82470,7 @@ fail: SWIGINTERN PyObject *FalseBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__FalseBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83656,7 +82620,7 @@ fail: SWIGINTERN PyObject *Length2DBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__Length2DBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83806,7 +82770,7 @@ fail: SWIGINTERN PyObject *SameShapeIdBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__SameShapeIdBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -83940,7 +82904,7 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -83994,7 +82958,11 @@ SWIGINTERN PyObject *_wrap_new_ViewMapGradientNormBP1D(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n Predicates1D::ViewMapGradientNormBP1D(int)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ViewMapGradientNormBP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType,float)\n" + " Predicates1D::ViewMapGradientNormBP1D(int,IntegrationType)\n" + " Predicates1D::ViewMapGradientNormBP1D(int)\n"); return NULL; } @@ -84121,7 +83089,7 @@ fail: SWIGINTERN PyObject *ViewMapGradientNormBP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__ViewMapGradientNormBP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -84205,7 +83173,7 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -84237,7 +83205,10 @@ SWIGINTERN PyObject *_wrap_new_DensityLowerThanUP1D(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n Possible C/C++ prototypes are:\n Predicates1D::DensityLowerThanUP1D(double,double)\n Predicates1D::DensityLowerThanUP1D(double)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DensityLowerThanUP1D'.\n" + " Possible C/C++ prototypes are:\n" + " Predicates1D::DensityLowerThanUP1D(double,double)\n" + " Predicates1D::DensityLowerThanUP1D(double)\n"); return NULL; } @@ -84352,7 +83323,7 @@ fail: SWIGINTERN PyObject *DensityLowerThanUP1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Predicates1D__DensityLowerThanUP1D, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -85068,7 +84039,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -85095,7 +84066,11 @@ SWIGINTERN PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n Possible C/C++ prototypes are:\n CurveInternal::CurvePointIterator(float)\n CurveInternal::CurvePointIterator()\n CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePointIterator'.\n" + " Possible C/C++ prototypes are:\n" + " CurveInternal::CurvePointIterator(float)\n" + " CurveInternal::CurvePointIterator()\n" + " CurveInternal::CurvePointIterator(CurveInternal::CurvePointIterator const &)\n"); return NULL; } @@ -85524,7 +84499,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -85652,7 +84627,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86171,7 +85146,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point2d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86206,7 +85181,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_point3d(PyObject *SWIGUNUSEDPARM(s cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -86238,7 +85213,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_normal(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86593,7 +85568,7 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86602,7 +85577,7 @@ fail: SWIGINTERN PyObject *CurvePointIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurveInternal__CurvePointIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -86760,7 +85735,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint3D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -86888,7 +85863,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_getPoint2D(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -87295,7 +86270,7 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -87352,7 +86327,12 @@ SWIGINTERN PyObject *_wrap_new_CurvePoint(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n Possible C/C++ prototypes are:\n CurvePoint()\n CurvePoint(SVertex *,SVertex *,float)\n CurvePoint(CurvePoint *,CurvePoint *,float)\n CurvePoint(CurvePoint const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_CurvePoint'.\n" + " Possible C/C++ prototypes are:\n" + " CurvePoint()\n" + " CurvePoint(SVertex *,SVertex *,float)\n" + " CurvePoint(CurvePoint *,CurvePoint *,float)\n" + " CurvePoint(CurvePoint const &)\n"); return NULL; } @@ -87709,7 +86689,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point2d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -87744,7 +86724,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_point3d(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -87776,7 +86756,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_normal(PyObject *SWIGUNUSEDPARM(self), PyO cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -88131,7 +87111,7 @@ SWIGINTERN PyObject *_wrap_CurvePoint_directionFredo(PyObject *SWIGUNUSEDPARM(se cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -88140,7 +87120,7 @@ fail: SWIGINTERN PyObject *CurvePoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CurvePoint, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -88244,7 +87224,7 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88269,7 +87249,11 @@ SWIGINTERN PyObject *_wrap_new_Curve(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n Possible C/C++ prototypes are:\n Curve()\n Curve(Id const &)\n Curve(Curve const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Curve'.\n" + " Possible C/C++ prototypes are:\n" + " Curve()\n" + " Curve(Id const &)\n" + " Curve(Curve const &)\n"); return NULL; } @@ -88423,7 +87407,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88457,7 +87441,10 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n Possible C/C++ prototypes are:\n push_vertex_back(Curve::Vertex *)\n push_vertex_back(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_back'.\n" + " Possible C/C++ prototypes are:\n" + " push_vertex_back(Curve *,Curve::Vertex *)\n" + " push_vertex_back(Curve *,SVertex *)\n"); return NULL; } @@ -88548,7 +87535,7 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88582,7 +87569,10 @@ SWIGINTERN PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n Possible C/C++ prototypes are:\n push_vertex_front(Curve::Vertex *)\n push_vertex_front(SVertex *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_push_vertex_front'.\n" + " Possible C/C++ prototypes are:\n" + " push_vertex_front(Curve *,Curve::Vertex *)\n" + " push_vertex_front(Curve *,SVertex *)\n"); return NULL; } @@ -88837,7 +87827,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88867,7 +87857,10 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n Possible C/C++ prototypes are:\n curvePointsBegin(float)\n curvePointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " curvePointsBegin(Curve *,float)\n" + " curvePointsBegin(Curve *)\n"); return NULL; } @@ -88951,7 +87944,7 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -88981,7 +87974,10 @@ SWIGINTERN PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n Possible C/C++ prototypes are:\n curvePointsEnd(float)\n curvePointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_curvePointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " curvePointsEnd(Curve *,float)\n" + " curvePointsEnd(Curve *)\n"); return NULL; } @@ -89193,7 +88189,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89223,7 +88219,10 @@ SWIGINTERN PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Curve *,float)\n" + " pointsBegin(Curve *)\n"); return NULL; } @@ -89307,7 +88306,7 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89337,14 +88336,17 @@ SWIGINTERN PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Curve_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Curve *,float)\n" + " pointsEnd(Curve *)\n"); return NULL; } SWIGINTERN PyObject *Curve_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Curve, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -89472,7 +88474,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -89505,7 +88507,11 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertexIterator(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n Possible C/C++ prototypes are:\n StrokeInternal::StrokeVertexIterator()\n StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertexIterator'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeInternal::StrokeVertexIterator()\n" + " StrokeInternal::StrokeVertexIterator(StrokeInternal::StrokeVertexIterator const &)\n" + " StrokeInternal::StrokeVertexIterator(Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &,Stroke::vertex_container::iterator const &)\n"); return NULL; } @@ -90063,7 +89069,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90146,7 +89152,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -90170,7 +89176,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_attribute'.\n" + " Possible C/C++ prototypes are:\n" + " attribute(StrokeInternal::StrokeVertexIterator const *)\n" + " attribute(StrokeInternal::StrokeVertexIterator *)\n"); return NULL; } @@ -90385,7 +89394,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint__SWIG_1(PyObject *SWIGU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertexIterator_setPoint" "', argument " "1"" of type '" "StrokeInternal::StrokeVertexIterator *""'"); } arg1 = reinterpret_cast< StrokeInternal::StrokeVertexIterator * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertexIterator_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -90417,7 +89426,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint(PyObject *self, PyObjec int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -90427,7 +89436,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint(PyObject *self, PyObjec int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeVertexIterator_setPoint__SWIG_1(self, args); @@ -90457,7 +89466,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_setPoint(PyObject *self, PyObjec } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_setPoint'.\n Possible C/C++ prototypes are:\n setPoint(real,real)\n setPoint(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertexIterator_setPoint'.\n" + " Possible C/C++ prototypes are:\n" + " setPoint(StrokeInternal::StrokeVertexIterator *,real,real)\n" + " setPoint(StrokeInternal::StrokeVertexIterator *,Geometry::Vec2f const &)\n"); return NULL; } @@ -90706,7 +89718,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -90834,7 +89846,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91353,7 +90365,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -91388,7 +90400,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3Tdouble_t, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VecMat__Vec3T_double_t, 0 | 0 ); return resultobj; fail: return NULL; @@ -91420,7 +90432,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_normal(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3r(static_cast< const Geometry::Vec3r& >(result))), SWIGTYPE_p_VecMat__Vec3T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91775,7 +90787,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *SWIGUNU cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2d(static_cast< const Geometry::Vec2d& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -91784,7 +90796,7 @@ fail: SWIGINTERN PyObject *StrokeVertexIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeInternal__StrokeVertexIterator, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -91986,7 +90998,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 6); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92061,7 +91073,12 @@ SWIGINTERN PyObject *_wrap_new_StrokeAttribute(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n Possible C/C++ prototypes are:\n StrokeAttribute()\n StrokeAttribute(StrokeAttribute const &)\n StrokeAttribute(float,float,float,float,float,float)\n StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeAttribute'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeAttribute()\n" + " StrokeAttribute(StrokeAttribute const &)\n" + " StrokeAttribute(float,float,float,float,float,float)\n" + " StrokeAttribute(StrokeAttribute const &,StrokeAttribute const &,float)\n"); return NULL; } @@ -92251,7 +91268,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getColorRGB(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -92411,7 +91428,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getThicknessRL(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -92529,7 +91546,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec2f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -92573,7 +91590,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_getAttributeVec3f(PyObject *SWIGUNUSE cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec3f(static_cast< const Geometry::Vec3f& >(result))), SWIGTYPE_p_VecMat__Vec3T_float_t, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; return resultobj; fail: @@ -92789,7 +91806,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor__SWIG_1(PyObject *SWIGUNUSED SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setColor" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setColor" "', argument " "2"" of type '" "Geometry::Vec3f const &""'"); } @@ -92821,7 +91838,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -92831,7 +91848,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec3T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setColor__SWIG_1(self, args); @@ -92867,7 +91884,10 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setColor(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n Possible C/C++ prototypes are:\n setColor(float,float,float)\n setColor(Geometry::Vec3f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setColor'.\n" + " Possible C/C++ prototypes are:\n" + " setColor(StrokeAttribute *,float,float,float)\n" + " setColor(StrokeAttribute *,Geometry::Vec3f const &)\n"); return NULL; } @@ -92978,7 +91998,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness__SWIG_1(PyObject *SWIGUN SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeAttribute_setThickness" "', argument " "1"" of type '" "StrokeAttribute *""'"); } arg1 = reinterpret_cast< StrokeAttribute * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setThickness" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -93010,7 +92030,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93020,7 +92040,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeAttribute, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeAttribute_setThickness__SWIG_1(self, args); @@ -93050,7 +92070,10 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setThickness(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n Possible C/C++ prototypes are:\n setThickness(float,float)\n setThickness(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeAttribute_setThickness'.\n" + " Possible C/C++ prototypes are:\n" + " setThickness(StrokeAttribute *,float,float)\n" + " setThickness(StrokeAttribute *,Geometry::Vec2f const &)\n"); return NULL; } @@ -93174,7 +92197,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec2f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec2f" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -93229,7 +92252,7 @@ SWIGINTERN PyObject *_wrap_StrokeAttribute_setAttributeVec3f(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "2"" of type '" "char const *""'"); } arg2 = reinterpret_cast< char * >(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec3T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StrokeAttribute_setAttributeVec3f" "', argument " "3"" of type '" "Geometry::Vec3f const &""'"); } @@ -93259,7 +92282,7 @@ fail: SWIGINTERN PyObject *StrokeAttribute_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeAttribute, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -93518,7 +92541,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93586,7 +92609,14 @@ SWIGINTERN PyObject *_wrap_new_StrokeVertex(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n Possible C/C++ prototypes are:\n StrokeVertex()\n StrokeVertex(StrokeVertex const &)\n StrokeVertex(SVertex *)\n StrokeVertex(CurvePoint *)\n StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n StrokeVertex(SVertex *,StrokeAttribute const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeVertex'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeVertex()\n" + " StrokeVertex(StrokeVertex const &)\n" + " StrokeVertex(SVertex *)\n" + " StrokeVertex(CurvePoint *)\n" + " StrokeVertex(StrokeVertex *,StrokeVertex *,float)\n" + " StrokeVertex(SVertex *,StrokeAttribute const &)\n"); return NULL; } @@ -93712,7 +92742,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_getPoint(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2Tfloat_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2f(static_cast< const Geometry::Vec2f& >(result))), SWIGTYPE_p_VecMat__Vec2T_float_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -93795,7 +92825,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -93819,7 +92849,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_attribute(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n Possible C/C++ prototypes are:\n attribute()\n attribute()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_attribute'.\n" + " Possible C/C++ prototypes are:\n" + " attribute(StrokeVertex const *)\n" + " attribute(StrokeVertex *)\n"); return NULL; } @@ -94066,7 +93099,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint__SWIG_1(PyObject *SWIGUNUSEDPAR SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrokeVertex_setPoint" "', argument " "1"" of type '" "StrokeVertex *""'"); } arg1 = reinterpret_cast< StrokeVertex * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StrokeVertex_setPoint" "', argument " "2"" of type '" "Geometry::Vec2f const &""'"); } @@ -94098,7 +93131,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94108,7 +93141,7 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint(PyObject *self, PyObject *args) int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_StrokeVertex, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_float_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_StrokeVertex_setPoint__SWIG_1(self, args); @@ -94138,7 +93171,10 @@ SWIGINTERN PyObject *_wrap_StrokeVertex_setPoint(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_setPoint'.\n Possible C/C++ prototypes are:\n setPoint(real,real)\n setPoint(Geometry::Vec2f const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'StrokeVertex_setPoint'.\n" + " Possible C/C++ prototypes are:\n" + " setPoint(StrokeVertex *,real,real)\n" + " setPoint(StrokeVertex *,Geometry::Vec2f const &)\n"); return NULL; } @@ -94268,7 +93304,7 @@ fail: SWIGINTERN PyObject *StrokeVertex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeVertex, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -94401,7 +93437,7 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94418,7 +93454,10 @@ SWIGINTERN PyObject *_wrap_new_Stroke(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n Possible C/C++ prototypes are:\n Stroke()\n Stroke(Stroke const &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stroke'.\n" + " Possible C/C++ prototypes are:\n" + " Stroke()\n" + " Stroke(Stroke const &)\n"); return NULL; } @@ -94582,7 +93621,7 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -94618,7 +93657,10 @@ SWIGINTERN PyObject *_wrap_Stroke_Resample(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n Possible C/C++ prototypes are:\n Resample(int)\n Resample(float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_Resample'.\n" + " Possible C/C++ prototypes are:\n" + " Resample(Stroke *,int)\n" + " Resample(Stroke *,float)\n"); return NULL; } @@ -95030,7 +94072,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95054,7 +94096,10 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_begin(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n Possible C/C++ prototypes are:\n viewedges_begin()\n viewedges_begin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_begin'.\n" + " Possible C/C++ prototypes are:\n" + " viewedges_begin(Stroke const *)\n" + " viewedges_begin(Stroke *)\n"); return NULL; } @@ -95129,7 +94174,7 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95153,7 +94198,10 @@ SWIGINTERN PyObject *_wrap_Stroke_viewedges_end(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n Possible C/C++ prototypes are:\n viewedges_end()\n viewedges_end()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_viewedges_end'.\n" + " Possible C/C++ prototypes are:\n" + " viewedges_end(Stroke const *)\n" + " viewedges_end(Stroke *)\n"); return NULL; } @@ -95215,7 +94263,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getBeginningOrientation(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -95311,7 +94359,7 @@ SWIGINTERN PyObject *_wrap_Stroke_getEndingOrientation(PyObject *SWIGUNUSEDPARM( cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2Tdouble_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new Geometry::Vec2r(static_cast< const Geometry::Vec2r& >(result))), SWIGTYPE_p_VecMat__Vec2T_double_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -95722,7 +94770,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation__SWIG_0(PyObject *SWIG SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setBeginningOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_setBeginningOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -95803,7 +94851,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation(PyObject *self, PyObje int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95813,7 +94861,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation(PyObject *self, PyObje int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Stroke_setBeginningOrientation__SWIG_0(self, args); @@ -95843,7 +94891,10 @@ SWIGINTERN PyObject *_wrap_Stroke_setBeginningOrientation(PyObject *self, PyObje } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setBeginningOrientation'.\n Possible C/C++ prototypes are:\n setBeginningOrientation(Geometry::Vec2r const &)\n setBeginningOrientation(real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setBeginningOrientation'.\n" + " Possible C/C++ prototypes are:\n" + " setBeginningOrientation(Stroke *,Geometry::Vec2r const &)\n" + " setBeginningOrientation(Stroke *,real,real)\n"); return NULL; } @@ -95865,7 +94916,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation__SWIG_0(PyObject *SWIGUNU SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stroke_setEndingOrientation" "', argument " "1"" of type '" "Stroke *""'"); } arg1 = reinterpret_cast< Stroke * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stroke_setEndingOrientation" "', argument " "2"" of type '" "Geometry::Vec2r const &""'"); } @@ -95946,7 +94997,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -95956,7 +95007,7 @@ SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation(PyObject *self, PyObject int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Stroke, 0); _v = SWIG_CheckState(res); if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0); + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_VecMat__Vec2T_double_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Stroke_setEndingOrientation__SWIG_0(self, args); @@ -95986,7 +95037,10 @@ SWIGINTERN PyObject *_wrap_Stroke_setEndingOrientation(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setEndingOrientation'.\n Possible C/C++ prototypes are:\n setEndingOrientation(Geometry::Vec2r const &)\n setEndingOrientation(real,real)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_setEndingOrientation'.\n" + " Possible C/C++ prototypes are:\n" + " setEndingOrientation(Stroke *,Geometry::Vec2r const &)\n" + " setEndingOrientation(Stroke *,real,real)\n"); return NULL; } @@ -96070,7 +95124,7 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96100,7 +95154,10 @@ SWIGINTERN PyObject *_wrap_Stroke_strokeVerticesBegin(PyObject *self, PyObject * } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n Possible C/C++ prototypes are:\n strokeVerticesBegin(float)\n strokeVerticesBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_strokeVerticesBegin'.\n" + " Possible C/C++ prototypes are:\n" + " strokeVerticesBegin(Stroke *,float)\n" + " strokeVerticesBegin(Stroke *)\n"); return NULL; } @@ -96312,7 +95369,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96342,7 +95399,10 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsBegin(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n Possible C/C++ prototypes are:\n pointsBegin(float)\n pointsBegin()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsBegin'.\n" + " Possible C/C++ prototypes are:\n" + " pointsBegin(Stroke *,float)\n" + " pointsBegin(Stroke *)\n"); return NULL; } @@ -96426,7 +95486,7 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -96456,21 +95516,24 @@ SWIGINTERN PyObject *_wrap_Stroke_pointsEnd(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n Possible C/C++ prototypes are:\n pointsEnd(float)\n pointsEnd()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Stroke_pointsEnd'.\n" + " Possible C/C++ prototypes are:\n" + " pointsEnd(Stroke *,float)\n" + " pointsEnd(Stroke *)\n"); return NULL; } SWIGINTERN PyObject *Stroke_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Stroke, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; PyObject **arg2 = (PyObject **) 0 ; swig::PySwigIterator *result = 0 ; void *argp1 = 0 ; @@ -96479,11 +95542,11 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_iterator(PyObject *SWIGUNUSEDPARM(se arg2 = &obj0; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_iterator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_iterator" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { result = (swig::PySwigIterator *)std_vector_Sl_StrokeShader_Sm__Sg__iterator(arg1,arg2); @@ -96504,21 +95567,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___nonzero__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___nonzero__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector const *)arg1); + result = (bool)std_vector_Sl_StrokeShader_Sm__Sg____nonzero__((std::vector< StrokeShader * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96536,21 +95599,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer___len__",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___len__" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector const *)arg1); + result = std_vector_Sl_StrokeShader_Sm__Sg____len__((std::vector< StrokeShader * > const *)arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96568,22 +95631,22 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { try { - result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); + result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg__pop(arg1); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96597,7 +95660,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_pop(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96606,10 +95669,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *result = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; + std::vector< StrokeShader *,std::allocator< StrokeShader * > > *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96621,25 +95684,25 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___getslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___getslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { try { try { - result = (std::vector > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); + result = (std::vector< StrokeShader *,std::allocator< StrokeShader * > > *)std_vector_Sl_StrokeShader_Sm__Sg____getslice__(arg1,arg2,arg3); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96653,7 +95716,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getslice__(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -96662,10 +95725,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; - std::vector > *arg4 = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; + std::vector< StrokeShader *,std::allocator< StrokeShader * > > *arg4 = 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96679,36 +95742,36 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setslice__(PyObject *SWIGUNUSEDPAR PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer___setslice__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___setslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res4 = swig::asptr(obj3, &ptr); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector > const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer___setslice__" "', argument " "4"" of type '" "std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &""'"); } arg4 = ptr; } { try { try { - std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector > const &)*arg4); + std_vector_Sl_StrokeShader_Sm__Sg____setslice__(arg1,arg2,arg3,(std::vector< StrokeShader *,std::allocator< StrokeShader * > > const &)*arg4); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96736,9 +95799,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::difference_type arg3 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::difference_type arg3 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96750,21 +95813,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delslice__(PyObject *SWIGUNUSEDPAR PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___delslice__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delslice__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delslice__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer___delslice__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg3 = static_cast< std::vector::difference_type >(val3); + arg3 = static_cast< std::vector< StrokeShader * >::difference_type >(val3); { try { try { @@ -96791,8 +95854,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96801,16 +95864,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___delitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___delitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___delitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___delitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); { try { try { @@ -96837,9 +95900,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96848,20 +95911,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___getitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___getitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); { try { try { - result = (std::vector::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); + result = (std::vector< StrokeShader * >::value_type)std_vector_Sl_StrokeShader_Sm__Sg____getitem__(arg1,arg2); } catch(std::out_of_range &_e) { SWIG_exception_fail(SWIG_IndexError, (&_e)->what()); @@ -96875,7 +95938,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___getitem__(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -96884,9 +95947,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::difference_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::difference_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; ptrdiff_t val2 ; @@ -96898,21 +95961,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer___setitem__(PyObject *SWIGUNUSEDPARM PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer___setitem__" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector::difference_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer___setitem__" "', argument " "2"" of type '" "std::vector< StrokeShader * >::difference_type""'"); } - arg2 = static_cast< std::vector::difference_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::difference_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer___setitem__" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { try { @@ -96939,8 +96002,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -96949,16 +96012,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_append(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_append",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_append" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_append" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { std_vector_Sl_StrokeShader_Sm__Sg__append(arg1,arg2); @@ -96979,12 +96042,12 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *result = 0 ; + std::vector< StrokeShader * > *result = 0 ; if (!PyArg_ParseTuple(args,(char *)":new_ShadersContainer")) SWIG_fail; { try { - result = (std::vector *)new std::vector(); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -96993,7 +96056,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -97002,26 +96065,26 @@ fail: SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = 0 ; - std::vector *result = 0 ; + std::vector< StrokeShader * > *arg1 = 0 ; + std::vector< StrokeShader * > *result = 0 ; int res1 = SWIG_OLDOBJ ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; res1 = swig::asptr(obj0, &ptr); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); } if (!ptr) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector const &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > const &""'"); } arg1 = ptr; } { try { - result = (std::vector *)new std::vector((std::vector const &)*arg1); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >((std::vector< StrokeShader * > const &)*arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97030,7 +96093,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_1(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); if (SWIG_IsNewObj(res1)) delete arg1; return resultobj; fail: @@ -97041,21 +96104,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; bool result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_empty",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_empty" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (bool)((std::vector const *)arg1)->empty(); + result = (bool)((std::vector< StrokeShader * > const *)arg1)->empty(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97073,21 +96136,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_size",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_size" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->size(); + result = ((std::vector< StrokeShader * > const *)arg1)->size(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97105,17 +96168,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_clear",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_clear" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { (arg1)->clear(); @@ -97136,8 +96199,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector *arg2 = 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -97146,19 +96209,19 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_swap(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_swap",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_swap" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShadersContainer_swap" "', argument " "2"" of type '" "std::vector< StrokeShader * > &""'"); } - arg2 = reinterpret_cast< std::vector * >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * > * >(argp2); { try { (arg1)->swap(*arg2); @@ -97179,21 +96242,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - SwigValueWrapper > result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + SwigValueWrapper< std::allocator< StrokeShader * > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_get_allocator",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_get_allocator" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->get_allocator(); + result = ((std::vector< StrokeShader * > const *)arg1)->get_allocator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97202,30 +96265,30 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_get_allocator(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new std::vector::allocator_type(static_cast< const std::vector::allocator_type& >(result))), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new std::vector< StrokeShader * >::allocator_type(static_cast< const std::vector< StrokeShader * >::allocator_type& >(result))), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } -SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->begin(); + result = ((std::vector< StrokeShader * > const *)arg1)->begin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97234,7 +96297,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97242,89 +96305,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_begin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_begin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->begin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_begin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_begin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_begin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_begin'.\n Possible C/C++ prototypes are:\n begin()\n begin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->end(); + result = ((std::vector< StrokeShader * > const *)arg1)->end(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97333,7 +96330,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_0(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97341,89 +96338,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_end",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_end" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->end(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_end(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_end__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_end__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_end'.\n Possible C/C++ prototypes are:\n end()\n end()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->rbegin(); + result = ((std::vector< StrokeShader * > const *)arg1)->rbegin(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97432,7 +96363,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97440,89 +96371,23 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rbegin",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rbegin" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rbegin(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rbegin(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rbegin__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rbegin__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rbegin'.\n Possible C/C++ prototypes are:\n rbegin()\n rbegin()\n"); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::reverse_iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::const_reverse_iterator result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (arg1)->rend(); + result = ((std::vector< StrokeShader * > const *)arg1)->rend(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97531,7 +96396,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_0(PyObject *SWIGUNUSEDPAR cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::reverse_iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::const_reverse_iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97539,76 +96404,10 @@ fail: } -SWIGINTERN PyObject *_wrap_ShadersContainer_rend__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::const_reverse_iterator result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_rend",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_rend" "', argument " "1"" of type '" "std::vector const *""'"); - } - arg1 = reinterpret_cast< std::vector * >(argp1); - { - try { - result = ((std::vector const *)arg1)->rend(); - } - // catch (Swig::DirectorTypeMismatch&) { - // cout << "Warning: return type mismatch" << endl; - // } - catch (Swig::DirectorException&) { - cout << "Warning: director exception catched" << endl; - } - } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::const_reverse_iterator & >(result)), - swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_ShadersContainer_rend(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rend__SWIG_0(self, args); - } - } - if (argc == 1) { - int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_ShadersContainer_rend__SWIG_1(self, args); - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_rend'.\n Possible C/C++ prototypes are:\n rend()\n rend()\n"); - return NULL; -} - - SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector *result = 0 ; + std::vector< StrokeShader * >::size_type arg1 ; + std::vector< StrokeShader * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; @@ -97616,12 +96415,12 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"O:new_ShadersContainer",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); + arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); { try { - result = (std::vector *)new std::vector(arg1); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97630,7 +96429,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_2(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -97639,17 +96438,17 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_pop_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_pop_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { (arg1)->pop_back(); @@ -97670,8 +96469,8 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -97680,16 +96479,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_resize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); { try { (arg1)->resize(arg2); @@ -97710,9 +96509,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97721,20 +96520,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_erase",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } { @@ -97748,7 +96547,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_0(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97758,10 +96557,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::iterator arg3 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::iterator arg3 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -97773,31 +96572,31 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_erase",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_erase" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res3) || !iter3) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter3); if (iter_t) { arg3 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_erase" "', argument " "3"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } { @@ -97811,7 +96610,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase__SWIG_1(PyObject *SWIGUNUSEDPA cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -97825,18 +96624,18 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_0(self, args); } @@ -97844,16 +96643,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { return _wrap_ShadersContainer_erase__SWIG_1(self, args); } @@ -97862,16 +96661,19 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_erase(PyObject *self, PyObject *args } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n Possible C/C++ prototypes are:\n erase(std::vector::iterator)\n erase(std::vector::iterator,std::vector::iterator)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_erase'.\n" + " Possible C/C++ prototypes are:\n" + " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator)\n" + " erase(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::iterator)\n"); return NULL; } SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector::size_type arg1 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; - std::vector *result = 0 ; + std::vector< StrokeShader * >::size_type arg1 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector< StrokeShader * > *result = 0 ; size_t val1 ; int ecode1 = 0 ; void *argp2 = 0 ; @@ -97882,17 +96684,17 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM if (!PyArg_ParseTuple(args,(char *)"OO:new_ShadersContainer",&obj0,&obj1)) SWIG_fail; ecode1 = SWIG_AsVal_size_t(obj0, &val1); if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg1 = static_cast< std::vector::size_type >(val1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = static_cast< std::vector< StrokeShader * >::size_type >(val1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ShadersContainer" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { - result = (std::vector *)new std::vector(arg1,arg2); + result = (std::vector< StrokeShader * > *)new std::vector< StrokeShader * >(arg1,arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -97901,7 +96703,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer__SWIG_3(PyObject *SWIGUNUSEDPARM cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; @@ -97914,7 +96716,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -97933,7 +96735,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (argc == 1) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_1(self, args); @@ -97947,7 +96749,7 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_new_ShadersContainer__SWIG_3(self, args); @@ -97956,15 +96758,20 @@ SWIGINTERN PyObject *_wrap_new_ShadersContainer(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n Possible C/C++ prototypes are:\n std::vector<(p.StrokeShader)>()\n std::vector<(p.StrokeShader)>(std::vector const &)\n std::vector<(p.StrokeShader)>(std::vector::size_type)\n std::vector<(p.StrokeShader)>(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ShadersContainer'.\n" + " Possible C/C++ prototypes are:\n" + " std::vector< StrokeShader * >()\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * > const &)\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type)\n" + " std::vector< StrokeShader * >(std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type arg2 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type arg2 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -97973,16 +96780,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_push_back(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_push_back",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_push_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShadersContainer_push_back" "', argument " "2"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg2 = reinterpret_cast< std::vector::value_type >(argp2); + arg2 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp2); { try { (arg1)->push_back(arg2); @@ -98003,21 +96810,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_front",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_front" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->front(); + result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->front(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -98026,7 +96833,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_front(PyObject *SWIGUNUSEDPARM(self) cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -98035,21 +96842,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::value_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::value_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_back",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_back" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = (std::vector::value_type)((std::vector const *)arg1)->back(); + result = (std::vector< StrokeShader * >::value_type)((std::vector< StrokeShader * > const *)arg1)->back(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -98058,7 +96865,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_back(PyObject *SWIGUNUSEDPARM(self), cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); return resultobj; fail: return NULL; @@ -98067,9 +96874,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98081,21 +96888,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_assign(PyObject *SWIGUNUSEDPARM(self PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_assign",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_assign" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_assign" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_assign" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { (arg1)->assign(arg2,arg3); @@ -98116,9 +96923,9 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98130,21 +96937,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_resize",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_resize" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_resize" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_resize" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { (arg1)->resize(arg2,arg3); @@ -98169,13 +96976,13 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -98189,7 +96996,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { { @@ -98198,7 +97005,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_resize__SWIG_1(self, args); @@ -98208,17 +97015,20 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_resize(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n Possible C/C++ prototypes are:\n resize(std::vector::size_type)\n resize(std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_resize'.\n" + " Possible C/C++ prototypes are:\n" + " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type)\n" + " resize(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::value_type arg3 = (std::vector::value_type) 0 ; - std::vector::iterator result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::value_type arg3 = (std::vector< StrokeShader * >::value_type) 0 ; + std::vector< StrokeShader * >::iterator result; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -98230,27 +97040,27 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:ShadersContainer_insert",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg3 = reinterpret_cast< std::vector::value_type >(argp3); + arg3 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp3); { try { result = (arg1)->insert(arg2,arg3); @@ -98262,7 +97072,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_0(PyObject *SWIGUNUSEDP cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector::iterator & >(result)), + resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< StrokeShader * >::iterator & >(result)), swig::PySwigIterator::descriptor(),SWIG_POINTER_OWN); return resultobj; fail: @@ -98272,10 +97082,10 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::iterator arg2 ; - std::vector::size_type arg3 ; - std::vector::value_type arg4 = (std::vector::value_type) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::iterator arg2 ; + std::vector< StrokeShader * >::size_type arg3 ; + std::vector< StrokeShader * >::value_type arg4 = (std::vector< StrokeShader * >::value_type) 0 ; void *argp1 = 0 ; int res1 = 0 ; swig::PySwigIterator *iter2 = 0 ; @@ -98290,32 +97100,32 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert__SWIG_1(PyObject *SWIGUNUSEDP PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:ShadersContainer_insert",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_insert" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::PySwigIterator::descriptor(), 0); if (!SWIG_IsOK(res2) || !iter2) { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } else { - swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); + swig::PySwigIterator_T::iterator > *iter_t = dynamic_cast::iterator > *>(iter2); if (iter_t) { arg2 = iter_t->get_current(); } else { - SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector::iterator""'"); + SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ShadersContainer_insert" "', argument " "2"" of type '" "std::vector< StrokeShader * >::iterator""'"); } } ecode3 = SWIG_AsVal_size_t(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ShadersContainer_insert" "', argument " "3"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg3 = static_cast< std::vector::size_type >(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0 | 0 ); + arg3 = static_cast< std::vector< StrokeShader * >::size_type >(val3); + res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0 | 0 ); if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector::value_type""'"); + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShadersContainer_insert" "', argument " "4"" of type '" "std::vector< StrokeShader * >::value_type""'"); } - arg4 = reinterpret_cast< std::vector::value_type >(argp4); + arg4 = reinterpret_cast< std::vector< StrokeShader * >::value_type >(argp4); { try { (arg1)->insert(arg2,arg3,arg4); @@ -98340,21 +97150,21 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 3) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_0(self, args); @@ -98364,12 +97174,12 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (argc == 4) { int _v; - int res = swig::asptr(argv[0], (std::vector >**)(0)); + int res = swig::asptr(argv[0], (std::vector >**)(0)); _v = SWIG_CheckState(res); if (_v) { swig::PySwigIterator *iter = 0; int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::PySwigIterator::descriptor(), 0); - _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); + _v = (SWIG_IsOK(res) && iter && (dynamic_cast::iterator > *>(iter) != 0)); if (_v) { { int res = SWIG_AsVal_size_t(argv[2], NULL); @@ -98377,7 +97187,7 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0); + int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_ShadersContainer_insert__SWIG_1(self, args); @@ -98388,15 +97198,18 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_insert(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n Possible C/C++ prototypes are:\n insert(std::vector::iterator,std::vector::value_type)\n insert(std::vector::iterator,std::vector::size_type,std::vector::value_type)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'ShadersContainer_insert'.\n" + " Possible C/C++ prototypes are:\n" + " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::value_type)\n" + " insert(std::vector< StrokeShader * > *,std::vector< StrokeShader * >::iterator,std::vector< StrokeShader * >::size_type,std::vector< StrokeShader * >::value_type)\n"); return NULL; } SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type arg2 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type arg2 ; void *argp1 = 0 ; int res1 = 0 ; size_t val2 ; @@ -98405,16 +97218,16 @@ SWIGINTERN PyObject *_wrap_ShadersContainer_reserve(PyObject *SWIGUNUSEDPARM(sel PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:ShadersContainer_reserve",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_reserve" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector::size_type""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ShadersContainer_reserve" "', argument " "2"" of type '" "std::vector< StrokeShader * >::size_type""'"); } - arg2 = static_cast< std::vector::size_type >(val2); + arg2 = static_cast< std::vector< StrokeShader * >::size_type >(val2); { try { (arg1)->reserve(arg2); @@ -98435,21 +97248,21 @@ fail: SWIGINTERN PyObject *_wrap_ShadersContainer_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; - std::vector::size_type result; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; + std::vector< StrokeShader * >::size_type result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:ShadersContainer_capacity",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0 | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShadersContainer_capacity" "', argument " "1"" of type '" "std::vector< StrokeShader * > const *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { - result = ((std::vector const *)arg1)->capacity(); + result = ((std::vector< StrokeShader * > const *)arg1)->capacity(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -98467,17 +97280,17 @@ fail: SWIGINTERN PyObject *_wrap_delete_ShadersContainer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - std::vector *arg1 = (std::vector *) 0 ; + std::vector< StrokeShader * > *arg1 = (std::vector< StrokeShader * > *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:delete_ShadersContainer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShadersContainer" "', argument " "1"" of type '" "std::vector< StrokeShader * > *""'"); } - arg1 = reinterpret_cast< std::vector * >(argp1); + arg1 = reinterpret_cast< std::vector< StrokeShader * > * >(argp1); { try { delete arg1; @@ -98499,8 +97312,8 @@ fail: SWIGINTERN PyObject *ShadersContainer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, SWIG_NewClientData(obj)); + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98694,7 +97507,7 @@ fail: SWIGINTERN PyObject *StrokeShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98840,7 +97653,7 @@ fail: SWIGINTERN PyObject *ConstantThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -98986,7 +97799,7 @@ fail: SWIGINTERN PyObject *ConstantExternThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantExternThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99109,7 +97922,7 @@ fail: SWIGINTERN PyObject *IncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99241,7 +98054,7 @@ fail: SWIGINTERN PyObject *ConstrainedIncreasingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstrainedIncreasingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99364,7 +98177,7 @@ fail: SWIGINTERN PyObject *LengthDependingThicknessShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__LengthDependingThicknessShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99565,7 +98378,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99639,7 +98452,12 @@ SWIGINTERN PyObject *_wrap_new_ThicknessVariationPatternShader(PyObject *self, P } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessVariationPatternShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float,bool)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float,float)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const,float)\n" + " StrokeShaders::ThicknessVariationPatternShader(std::string const)\n"); return NULL; } @@ -99721,7 +98539,7 @@ fail: SWIGINTERN PyObject *ThicknessVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -99796,7 +98614,7 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -99821,7 +98639,10 @@ SWIGINTERN PyObject *_wrap_new_ThicknessNoiseShader(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ThicknessNoiseShader()\n StrokeShaders::ThicknessNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ThicknessNoiseShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ThicknessNoiseShader()\n" + " StrokeShaders::ThicknessNoiseShader(float,float)\n"); return NULL; } @@ -99903,7 +98724,7 @@ fail: SWIGINTERN PyObject *ThicknessNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ThicknessNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100023,7 +98844,7 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100079,7 +98900,10 @@ SWIGINTERN PyObject *_wrap_new_ConstantColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ConstantColorShader(float,float,float,float)\n StrokeShaders::ConstantColorShader(float,float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ConstantColorShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ConstantColorShader(float,float,float,float)\n" + " StrokeShaders::ConstantColorShader(float,float,float)\n"); return NULL; } @@ -100193,7 +99017,7 @@ fail: SWIGINTERN PyObject *ConstantColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ConstantColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100370,7 +99194,7 @@ fail: SWIGINTERN PyObject *IncreasingColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__IncreasingColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100458,7 +99282,7 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100486,7 +99310,10 @@ SWIGINTERN PyObject *_wrap_new_ColorVariationPatternShader(PyObject *self, PyObj } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n StrokeShaders::ColorVariationPatternShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorVariationPatternShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ColorVariationPatternShader(std::string const,bool)\n" + " StrokeShaders::ColorVariationPatternShader(std::string const)\n"); return NULL; } @@ -100568,7 +99395,7 @@ fail: SWIGINTERN PyObject *ColorVariationPatternShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorVariationPatternShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100634,7 +99461,7 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100653,7 +99480,10 @@ SWIGINTERN PyObject *_wrap_new_MaterialColorShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::MaterialColorShader(float)\n StrokeShaders::MaterialColorShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MaterialColorShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::MaterialColorShader(float)\n" + " StrokeShaders::MaterialColorShader()\n"); return NULL; } @@ -100735,7 +99565,7 @@ fail: SWIGINTERN PyObject *MaterialColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__MaterialColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100749,7 +99579,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicColorShader(PyObject *SWIGUNUSEDPARM( PyObject * obj0 = 0 ; if (!PyArg_ParseTuple(args,(char *)"O:new_CalligraphicColorShader",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2Tdouble_t, 0 | 0); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_VecMat__Vec2T_double_t, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CalligraphicColorShader" "', argument " "1"" of type '" "Geometry::Vec2d const &""'"); } @@ -100852,7 +99682,7 @@ fail: SWIGINTERN PyObject *CalligraphicColorShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__CalligraphicColorShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -100927,7 +99757,7 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -100952,7 +99782,10 @@ SWIGINTERN PyObject *_wrap_new_ColorNoiseShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ColorNoiseShader()\n StrokeShaders::ColorNoiseShader(float,float)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ColorNoiseShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ColorNoiseShader()\n" + " StrokeShaders::ColorNoiseShader(float,float)\n"); return NULL; } @@ -101034,7 +99867,7 @@ fail: SWIGINTERN PyObject *ColorNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ColorNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101148,7 +99981,7 @@ fail: SWIGINTERN PyObject *TextureAssignerShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TextureAssignerShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101288,7 +100121,7 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101336,7 +100169,11 @@ SWIGINTERN PyObject *_wrap_new_StrokeTextureShader(PyObject *self, PyObject *arg } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n StrokeShaders::StrokeTextureShader(std::string const)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StrokeTextureShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType,bool)\n" + " StrokeShaders::StrokeTextureShader(std::string const,Stroke::MediumType)\n" + " StrokeShaders::StrokeTextureShader(std::string const)\n"); return NULL; } @@ -101418,7 +100255,7 @@ fail: SWIGINTERN PyObject *StrokeTextureShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__StrokeTextureShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101484,7 +100321,7 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101503,7 +100340,10 @@ SWIGINTERN PyObject *_wrap_new_BackboneStretcherShader(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BackboneStretcherShader(float)\n StrokeShaders::BackboneStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BackboneStretcherShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::BackboneStretcherShader(float)\n" + " StrokeShaders::BackboneStretcherShader()\n"); return NULL; } @@ -101585,7 +100425,7 @@ fail: SWIGINTERN PyObject *BackboneStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BackboneStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101699,7 +100539,7 @@ fail: SWIGINTERN PyObject *SamplingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__SamplingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101765,7 +100605,7 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -101784,7 +100624,10 @@ SWIGINTERN PyObject *_wrap_new_ExternalContourStretcherShader(PyObject *self, Py } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::ExternalContourStretcherShader(float)\n StrokeShaders::ExternalContourStretcherShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ExternalContourStretcherShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::ExternalContourStretcherShader(float)\n" + " StrokeShaders::ExternalContourStretcherShader()\n"); return NULL; } @@ -101866,7 +100709,7 @@ fail: SWIGINTERN PyObject *ExternalContourStretcherShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__ExternalContourStretcherShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -101971,7 +100814,7 @@ fail: SWIGINTERN PyObject *BSplineShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BSplineShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102037,7 +100880,7 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -102056,7 +100899,10 @@ SWIGINTERN PyObject *_wrap_new_BezierCurveShader(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n Possible C/C++ prototypes are:\n StrokeShaders::BezierCurveShader(float)\n StrokeShaders::BezierCurveShader()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BezierCurveShader'.\n" + " Possible C/C++ prototypes are:\n" + " StrokeShaders::BezierCurveShader(float)\n" + " StrokeShaders::BezierCurveShader()\n"); return NULL; } @@ -102138,7 +100984,7 @@ fail: SWIGINTERN PyObject *BezierCurveShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__BezierCurveShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102261,7 +101107,7 @@ fail: SWIGINTERN PyObject *InflateShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__InflateShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102375,7 +101221,7 @@ fail: SWIGINTERN PyObject *PolygonalizationShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__PolygonalizationShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102489,7 +101335,7 @@ fail: SWIGINTERN PyObject *GuidingLinesShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__GuidingLinesShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102603,7 +101449,7 @@ fail: SWIGINTERN PyObject *TipRemoverShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__TipRemoverShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102740,7 +101586,7 @@ fail: SWIGINTERN PyObject *streamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__streamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102889,7 +101735,7 @@ fail: SWIGINTERN PyObject *fstreamShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_StrokeShaders__fstreamShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -102925,7 +101771,7 @@ SWIGINTERN PyObject *_wrap_new_CalligraphicShader(PyObject *SWIGUNUSEDPARM(self) SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CalligraphicShader" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2Tfloat_t, 0 | 0); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_VecMat__Vec2T_float_t, 0 | 0); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CalligraphicShader" "', argument " "3"" of type '" "Geometry::Vec2f const &""'"); } @@ -103033,7 +101879,7 @@ fail: SWIGINTERN PyObject *CalligraphicShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_CalligraphicShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103183,7 +102029,7 @@ fail: SWIGINTERN PyObject *SpatialNoiseShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SpatialNoiseShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103360,7 +102206,7 @@ fail: SWIGINTERN PyObject *SmoothingShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_SmoothingShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103568,7 +102414,7 @@ fail: SWIGINTERN PyObject *Smoother_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Smoother, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103709,7 +102555,7 @@ fail: SWIGINTERN PyObject *Omitter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Omitter, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103850,7 +102696,7 @@ fail: SWIGINTERN PyObject *OmissionShader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_OmissionShader, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -103893,7 +102739,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; - UnaryFunction1D *arg3 = 0 ; + UnaryFunction1D< void > *arg3 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -103921,14 +102767,14 @@ SWIGINTERN PyObject *_wrap_Operators_chain__SWIG_0(PyObject *SWIGUNUSEDPARM(self SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); } arg2 = reinterpret_cast< UnaryPredicate1D * >(argp2); - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0 ); + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_UnaryFunction1DT_void_t, 0 ); if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); } if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_chain" "', argument " "3"" of type '" "UnaryFunction1D< void > &""'"); } - arg3 = reinterpret_cast< UnaryFunction1D * >(argp3); + arg3 = reinterpret_cast< UnaryFunction1D< void > * >(argp3); { try { Operators::chain(*arg1,*arg2,*arg3); @@ -103999,7 +102845,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104028,7 +102874,7 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DTvoid_t, 0); + int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_UnaryFunction1DT_void_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Operators_chain__SWIG_0(self, args); @@ -104038,7 +102884,10 @@ SWIGINTERN PyObject *_wrap_Operators_chain(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n Possible C/C++ prototypes are:\n chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D &)\n Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_chain'.\n" + " Possible C/C++ prototypes are:\n" + " chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &,UnaryFunction1D< void > &)\n" + " Operators::chain(ViewEdgeInternal::ViewEdgeIterator &,UnaryPredicate1D &)\n"); return NULL; } @@ -104129,7 +102978,7 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104158,7 +103007,10 @@ SWIGINTERN PyObject *_wrap_Operators_bidirectionalChain(PyObject *self, PyObject } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n Possible C/C++ prototypes are:\n bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n Operators::bidirectionalChain(ChainingIterator &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_bidirectionalChain'.\n" + " Possible C/C++ prototypes are:\n" + " bidirectionalChain(ChainingIterator &,UnaryPredicate1D &)\n" + " Operators::bidirectionalChain(ChainingIterator &)\n"); return NULL; } @@ -104347,7 +103199,7 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -104411,14 +103263,19 @@ SWIGINTERN PyObject *_wrap_Operators_sequentialSplit(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n Possible C/C++ prototypes are:\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n sequentialSplit(UnaryPredicate0D &,float)\n Operators::sequentialSplit(UnaryPredicate0D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_sequentialSplit'.\n" + " Possible C/C++ prototypes are:\n" + " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &,float)\n" + " sequentialSplit(UnaryPredicate0D &,UnaryPredicate0D &)\n" + " sequentialSplit(UnaryPredicate0D &,float)\n" + " Operators::sequentialSplit(UnaryPredicate0D &)\n"); return NULL; } SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; float arg3 ; void *argp1 = 0 ; @@ -104432,14 +103289,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_0(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -104473,7 +103330,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate1D *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; @@ -104483,14 +103340,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_1(PyObject *SWIGUNUSED PyObject * obj1 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OO:Operators_recursiveSplit",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate1D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate1D &""'"); @@ -104519,7 +103376,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; float arg4 ; @@ -104537,14 +103394,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_2(PyObject *SWIGUNUSED PyObject * obj3 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOOO:Operators_recursiveSplit",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -104586,7 +103443,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - UnaryFunction0D *arg1 = 0 ; + UnaryFunction0D< double > *arg1 = 0 ; UnaryPredicate0D *arg2 = 0 ; UnaryPredicate1D *arg3 = 0 ; void *argp1 = 0 ; @@ -104600,14 +103457,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit__SWIG_3(PyObject *SWIGUNUSED PyObject * obj2 = 0 ; if (!PyArg_ParseTuple(args,(char *)"OOO:Operators_recursiveSplit",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0 ); + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_UnaryFunction0DT_double_t, 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Operators_recursiveSplit" "', argument " "1"" of type '" "UnaryFunction0D< double > &""'"); } - arg1 = reinterpret_cast< UnaryFunction0D * >(argp1); + arg1 = reinterpret_cast< UnaryFunction0D< double > * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_UnaryPredicate0D, 0 ); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Operators_recursiveSplit" "', argument " "2"" of type '" "UnaryPredicate0D &""'"); @@ -104648,14 +103505,14 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 4); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 2) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104669,7 +103526,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104689,7 +103546,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 3) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104708,7 +103565,7 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar if (argc == 4) { int _v; void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DTdouble_t, 0); + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_UnaryFunction0DT_double_t, 0); _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; @@ -104732,7 +103589,12 @@ SWIGINTERN PyObject *_wrap_Operators_recursiveSplit(PyObject *self, PyObject *ar } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n Possible C/C++ prototypes are:\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &,float)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate1D &)\n recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n Operators::recursiveSplit(UnaryFunction0D &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Operators_recursiveSplit'.\n" + " Possible C/C++ prototypes are:\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &,float)\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate1D &)\n" + " recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &,float)\n" + " Operators::recursiveSplit(UnaryFunction0D< double > &,UnaryPredicate0D &,UnaryPredicate1D &)\n"); return NULL; } @@ -104774,7 +103636,7 @@ fail: SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; UnaryPredicate1D *arg1 = 0 ; - std::vector arg2 ; + std::vector< StrokeShader * > arg2 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -104790,10 +103652,10 @@ SWIGINTERN PyObject *_wrap_Operators_create(PyObject *SWIGUNUSEDPARM(self), PyOb } arg1 = reinterpret_cast< UnaryPredicate1D * >(argp1); { - std::vector > *ptr = (std::vector > *)0; + std::vector > *ptr = (std::vector > *)0; int res = swig::asptr(obj1, &ptr); if (!SWIG_IsOK(res) || !ptr) { - SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector""'"); + SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Operators_create" "', argument " "2"" of type '" "std::vector< StrokeShader * >""'"); } arg2 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; @@ -105015,7 +103877,7 @@ fail: SWIGINTERN PyObject *Operators_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Operators, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -105133,7 +103995,7 @@ fail: SWIGINTERN PyObject *ltstr_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_ltstr, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -105918,7 +104780,7 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 5); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -105993,7 +104855,11 @@ SWIGINTERN PyObject *_wrap_Canvas_loadMap(PyObject *self, PyObject *args) { } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n Possible C/C++ prototypes are:\n loadMap(char const *,char const *,unsigned int,float)\n loadMap(char const *,char const *,unsigned int)\n loadMap(char const *,char const *)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_loadMap'.\n" + " Possible C/C++ prototypes are:\n" + " loadMap(Canvas *,char const *,char const *,unsigned int,float)\n" + " loadMap(Canvas *,char const *,char const *,unsigned int)\n" + " loadMap(Canvas *,char const *,char const *)\n"); return NULL; } @@ -106211,7 +105077,7 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 1); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -106235,7 +105101,10 @@ SWIGINTERN PyObject *_wrap_Canvas_selectedFEdge(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n Possible C/C++ prototypes are:\n selectedFEdge()\n selectedFEdge()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_selectedFEdge'.\n" + " Possible C/C++ prototypes are:\n" + " selectedFEdge(Canvas const *)\n" + " selectedFEdge(Canvas *)\n"); return NULL; } @@ -106339,7 +105208,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - SwigValueWrapper > > result; + SwigValueWrapper< BBox< VecMat::Vec3< double > > > result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -106361,7 +105230,7 @@ SWIGINTERN PyObject *_wrap_Canvas_scene3DBBox(PyObject *SWIGUNUSEDPARM(self), Py cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_NewPointerObj((new BBox(static_cast< const BBox& >(result))), SWIGTYPE_p_BBoxTVecMat__Vec3Tdouble_t_t, SWIG_POINTER_OWN | 0 ); + resultobj = SWIG_NewPointerObj((new BBox< Geometry::Vec3r >(static_cast< const BBox< Geometry::Vec3r >& >(result))), SWIGTYPE_p_BBoxT_VecMat__Vec3T_double_t_t, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; @@ -106897,7 +105766,7 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -106927,7 +105796,10 @@ SWIGINTERN PyObject *_wrap_Canvas_changePaperTexture(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n Possible C/C++ prototypes are:\n changePaperTexture(bool)\n changePaperTexture()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_changePaperTexture'.\n" + " Possible C/C++ prototypes are:\n" + " changePaperTexture(Canvas *,bool)\n" + " changePaperTexture(Canvas *)\n"); return NULL; } @@ -107040,7 +105912,7 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 2); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -107070,7 +105942,10 @@ SWIGINTERN PyObject *_wrap_Canvas_resetModified(PyObject *self, PyObject *args) } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n Possible C/C++ prototypes are:\n resetModified(bool)\n resetModified()\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_resetModified'.\n" + " Possible C/C++ prototypes are:\n" + " resetModified(Canvas *,bool)\n" + " resetModified(Canvas *)\n"); return NULL; } @@ -107078,7 +105953,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector > *arg2 = 0 ; + std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; unsigned int arg3 ; void *argp1 = 0 ; int res1 = 0 ; @@ -107096,14 +105971,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_0(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } - arg2 = reinterpret_cast< std::vector > * >(argp2); + arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Canvas_causalStyleModules" "', argument " "3"" of type '" "unsigned int""'"); @@ -107130,7 +106005,7 @@ fail: SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; Canvas *arg1 = (Canvas *) 0 ; - std::vector > *arg2 = 0 ; + std::vector< unsigned int,std::allocator< unsigned int > > *arg2 = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -107144,14 +106019,14 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules__SWIG_1(PyObject *SWIGUNUSE SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Canvas_causalStyleModules" "', argument " "1"" of type '" "Canvas *""'"); } arg1 = reinterpret_cast< Canvas * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0 ); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector > &""'"); + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Canvas_causalStyleModules" "', argument " "2"" of type '" "std::vector< unsigned int,std::allocator< unsigned int > > &""'"); } - arg2 = reinterpret_cast< std::vector > * >(argp2); + arg2 = reinterpret_cast< std::vector< unsigned int,std::allocator< unsigned int > > * >(argp2); { try { (arg1)->causalStyleModules(*arg2); @@ -107176,7 +106051,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a int ii; if (!PyTuple_Check(args)) SWIG_fail; - argc = PyObject_Length(args); + argc = (int)PyObject_Length(args); for (ii = 0; (ii < argc) && (ii < 3); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } @@ -107187,7 +106062,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { return _wrap_Canvas_causalStyleModules__SWIG_1(self, args); @@ -107201,7 +106076,7 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a _v = SWIG_CheckState(res); if (_v) { void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0); + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0); _v = SWIG_CheckState(res); if (_v) { { @@ -107216,7 +106091,10 @@ SWIGINTERN PyObject *_wrap_Canvas_causalStyleModules(PyObject *self, PyObject *a } fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n Possible C/C++ prototypes are:\n causalStyleModules(std::vector > &,unsigned int)\n causalStyleModules(std::vector > &)\n"); + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Canvas_causalStyleModules'.\n" + " Possible C/C++ prototypes are:\n" + " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &,unsigned int)\n" + " causalStyleModules(Canvas *,std::vector< unsigned int,std::allocator< unsigned int > > &)\n"); return NULL; } @@ -107272,7 +106150,7 @@ fail: SWIGINTERN PyObject *Canvas_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; SWIG_TypeNewClientData(SWIGTYPE_p_Canvas, SWIG_NewClientData(obj)); return SWIG_Py_Void(); } @@ -107293,7 +106171,7 @@ SWIGINTERN PyObject *_wrap_castToSVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (SVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,SVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107325,7 +106203,7 @@ SWIGINTERN PyObject *_wrap_castToViewVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (ViewVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,ViewVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107357,7 +106235,7 @@ SWIGINTERN PyObject *_wrap_castToTVertex(PyObject *SWIGUNUSEDPARM(self), PyObjec arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (TVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,TVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107389,7 +106267,7 @@ SWIGINTERN PyObject *_wrap_castToCurvePoint(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (CurvePoint *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,CurvePoint >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107421,7 +106299,7 @@ SWIGINTERN PyObject *_wrap_castToStrokeVertex(PyObject *SWIGUNUSEDPARM(self), Py arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (StrokeVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,StrokeVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107453,7 +106331,7 @@ SWIGINTERN PyObject *_wrap_castToNonTVertex(PyObject *SWIGUNUSEDPARM(self), PyOb arg1 = reinterpret_cast< Interface0D * >(argp1); { try { - result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (NonTVertex *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface0D,NonTVertex >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107485,7 +106363,7 @@ SWIGINTERN PyObject *_wrap_castToFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (FEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,FEdge >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107517,7 +106395,7 @@ SWIGINTERN PyObject *_wrap_castToViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObje arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (ViewEdge *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,ViewEdge >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107549,7 +106427,7 @@ SWIGINTERN PyObject *_wrap_castToStroke(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (Stroke *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Stroke >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107581,7 +106459,7 @@ SWIGINTERN PyObject *_wrap_castToChain(PyObject *SWIGUNUSEDPARM(self), PyObject arg1 = reinterpret_cast< Interface1D * >(argp1); { try { - result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast(arg1); + result = (Chain *)Cast::SWIGTEMPLATEDISAMBIGUATOR cast< Interface1D,Chain >(arg1); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -109842,395 +108720,395 @@ static PyMethodDef SwigMethods[] = { /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction0D > > *) ((Functions0D::GetOccludersF0D *) x)); +static void *_p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions0D::GetOccludersF0D *) x)); } -static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludeeF1D *) x)); +static void *_p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludeeF1D *) x)); } -static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetShapeF1D *) x)); +static void *_p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetShapeF1D *) x)); } -static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t(void *x) { - return (void *)((UnaryFunction1D > > *) ((Functions1D::GetOccludersF1D *) x)); +static void *_p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *) ((Functions1D::GetOccludersF1D *) x)); } -static void *_p_TVertexTo_p_Interface0D(void *x) { +static void *_p_TVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_Interface0D(void *x) { +static void *_p_NonTVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (ViewVertex *) ((NonTVertex *) x)); } -static void *_p_SVertexTo_p_Interface0D(void *x) { +static void *_p_SVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((SVertex *) x)); } -static void *_p_ViewVertexTo_p_Interface0D(void *x) { +static void *_p_ViewVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((ViewVertex *) x)); } -static void *_p_StrokeVertexTo_p_Interface0D(void *x) { +static void *_p_StrokeVertexTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) (CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_CurvePointTo_p_Interface0D(void *x) { +static void *_p_CurvePointTo_p_Interface0D(void *x, int *newmemory) { return (void *)((Interface0D *) ((CurvePoint *) x)); } -static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetShapeF0D *) x)); +static void *_p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetShapeF0D *) x)); } -static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetOccludeeF0D *) x)); +static void *_p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< ViewShape * > *) ((Functions0D::GetOccludeeF0D *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x) { +static void *_p_ChainSilhouetteIteratorTo_p_ChainingIterator(void *x, int *newmemory) { return (void *)((ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x) { +static void *_p_ChainPredicateIteratorTo_p_ChainingIterator(void *x, int *newmemory) { return (void *)((ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) ((ChainingIterator *) x)); } -static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainSilhouetteIterator *) x)); } -static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x) { +static void *_p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator(void *x, int *newmemory) { return (void *)((ViewEdgeInternal::ViewEdgeIterator *) (ChainingIterator *) ((ChainPredicateIterator *) x)); } -static void *_p_ViewEdgeTo_p_Interface1D(void *x) { +static void *_p_ViewEdgeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((ViewEdge *) x)); } -static void *_p_StrokeTo_p_Interface1D(void *x) { +static void *_p_StrokeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((Stroke *) x)); } -static void *_p_CurveTo_p_Interface1D(void *x) { +static void *_p_CurveTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((Curve *) x)); } -static void *_p_FEdgeSharpTo_p_Interface1D(void *x) { +static void *_p_FEdgeSharpTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_Interface1D(void *x) { +static void *_p_FEdgeSmoothTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) (FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_FEdgeTo_p_Interface1D(void *x) { +static void *_p_FEdgeTo_p_Interface1D(void *x, int *newmemory) { return (void *)((Interface1D *) ((FEdge *) x)); } -static void *_p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< int,2 > *) ((VecMat::Vec2< int > *) x)); } -static void *_p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< unsigned int,2 > *) ((VecMat::Vec2< unsigned int > *) x)); } -static void *_p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< int,3 > *) ((VecMat::Vec3< int > *) x)); } -static void *_p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< unsigned int,3 > *) ((VecMat::Vec3< unsigned int > *) x)); } -static void *_p_StrokeVertexTo_p_CurvePoint(void *x) { +static void *_p_StrokeVertexTo_p_CurvePoint(void *x, int *newmemory) { return (void *)((CurvePoint *) ((StrokeVertex *) x)); } -static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x) { +static void *_p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { return (void *)((UnaryPredicate0D *) ((Predicates0D::TrueUP0D *) x)); } -static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x) { +static void *_p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D(void *x, int *newmemory) { return (void *)((UnaryPredicate0D *) ((Predicates0D::FalseUP0D *) x)); } -static void *_p_FEdgeSharpTo_p_FEdge(void *x) { +static void *_p_FEdgeSharpTo_p_FEdge(void *x, int *newmemory) { return (void *)((FEdge *) ((FEdgeSharp *) x)); } -static void *_p_FEdgeSmoothTo_p_FEdge(void *x) { +static void *_p_FEdgeSmoothTo_p_FEdge(void *x, int *newmemory) { return (void *)((FEdge *) ((FEdgeSmooth *) x)); } -static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstrainedIncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ColorNoiseShader *) x)); } -static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessNoiseShader *) x)); } -static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::LengthDependingThicknessShader *) x)); } -static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantExternThicknessShader *) x)); } -static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantThicknessShader *) x)); } -static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::StrokeTextureShader *) x)); } -static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__SamplingShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::SamplingShader *) x)); } -static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BSplineShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BSplineShader *) x)); } -static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BezierCurveShader *) x)); } -static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__InflateShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::InflateShader *) x)); } -static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::GuidingLinesShader *) x)); } -static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__streamShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::streamShader *) x)); } -static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__fstreamShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::fstreamShader *) x)); } -static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x) { +static void *_p_CalligraphicShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((CalligraphicShader *) x)); } -static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x) { +static void *_p_SpatialNoiseShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((SpatialNoiseShader *) x)); } -static void *_p_SmoothingShaderTo_p_StrokeShader(void *x) { +static void *_p_SmoothingShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((SmoothingShader *) x)); } -static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::TextureAssignerShader *) x)); } -static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::CalligraphicColorShader *) x)); } -static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::MaterialColorShader *) x)); } -static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ColorVariationPatternShader *) x)); } -static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::IncreasingColorShader *) x)); } -static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ConstantColorShader *) x)); } -static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ThicknessVariationPatternShader *) x)); } -static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::BackboneStretcherShader *) x)); } -static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::ExternalContourStretcherShader *) x)); } -static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::PolygonalizationShader *) x)); } -static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x) { +static void *_p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((StrokeShaders::TipRemoverShader *) x)); } -static void *_p_OmissionShaderTo_p_StrokeShader(void *x) { +static void *_p_OmissionShaderTo_p_StrokeShader(void *x, int *newmemory) { return (void *)((StrokeShader *) ((OmissionShader *) x)); } -static void *_p_OmitterTo_p_Smoother(void *x) { +static void *_p_OmitterTo_p_Smoother(void *x, int *newmemory) { return (void *)((Smoother *) ((Omitter *) x)); } -static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::Length2DBP1D *) x)); } -static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::FalseBP1D *) x)); } -static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::ViewMapGradientNormBP1D *) x)); } -static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::TrueBP1D *) x)); } -static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x) { +static void *_p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D(void *x, int *newmemory) { return (void *)((BinaryPredicate1D *) ((Predicates1D::SameShapeIdBP1D *) x)); } -static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::FalseUP1D *) x)); } -static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ShapeUP1D *) x)); } -static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::DensityLowerThanUP1D *) x)); } -static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToTimeStampUP1D *) x)); } -static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::EqualToChainingTimeStampUP1D *) x)); } -static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::TrueUP1D *) x)); } -static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::QuantitativeInvisibilityUP1D *) x)); } -static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ContourUP1D *) x)); } -static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x) { +static void *_p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D(void *x, int *newmemory) { return (void *)((UnaryPredicate1D *) ((Predicates1D::ExternalContourUP1D *) x)); } -static void *_p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< float,2 > *) ((VecMat::Vec2< float > *) x)); } -static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::TimeStampF1D *) x)); +static void *_p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::TimeStampF1D *) x)); } -static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); +static void *_p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::IncrementChainingTimeStampF1D *) x)); } -static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::ChainingTimeStampF1D *) x)); +static void *_p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< void > *) ((Functions1D::ChainingTimeStampF1D *) x)); } -static void *_p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< float,3 > *) ((VecMat::Vec3< float > *) x)); } -static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((FEdgeInternal::SVertexIterator *) x)); } -static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((ViewEdgeInternal::SVertexIterator *) x)); } -static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((CurveInternal::CurvePointIterator *) x)); } -static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x) { +static void *_p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested(void *x, int *newmemory) { return (void *)((Interface0DIteratorNested *) ((StrokeInternal::StrokeVertexIterator *) x)); } -static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation2DF0D *) x)); +static void *_p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::VertexOrientation2DF0D *) x)); } -static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::Normal2DF0D *) x)); +static void *_p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec2< float > > *) ((Functions0D::Normal2DF0D *) x)); } -static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t(void *x) { - return (void *)((UnaryFunction0D > *) ((Functions0D::VertexOrientation3DF0D *) x)); +static void *_p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< VecMat::Vec3< float > > *) ((Functions0D::VertexOrientation3DF0D *) x)); } -static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation2DF1D *) x)); +static void *_p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Orientation2DF1D *) x)); } -static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Normal2DF1D *) x)); +static void *_p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec2< float > > *) ((Functions1D::Normal2DF1D *) x)); } -static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t(void *x) { - return (void *)((UnaryFunction1D > *) ((Functions1D::Orientation3DF1D *) x)); +static void *_p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< VecMat::Vec3< float > > *) ((Functions1D::Orientation3DF1D *) x)); } -static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); +static void *_p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< unsigned int > *) ((Functions0D::QuantitativeInvisibilityF0D *) x)); } -static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); +static void *_p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< unsigned int > *) ((Functions1D::QuantitativeInvisibilityF1D *) x)); } -static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ShapeIdF0D *) x)); +static void *_p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< Id > *) ((Functions0D::ShapeIdF0D *) x)); } -static void *_p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec2 *) x)); +static void *_p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< double,2 > *) ((VecMat::Vec2< double > *) x)); } -static void *_p_TVertexTo_p_ViewVertex(void *x) { +static void *_p_TVertexTo_p_ViewVertex(void *x, int *newmemory) { return (void *)((ViewVertex *) ((TVertex *) x)); } -static void *_p_NonTVertexTo_p_ViewVertex(void *x) { +static void *_p_NonTVertexTo_p_ViewVertex(void *x, int *newmemory) { return (void *)((ViewVertex *) ((NonTVertex *) x)); } -static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ZDiscontinuityF0D *) x)); +static void *_p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::ZDiscontinuityF0D *) x)); } -static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::DensityF0D *) x)); +static void *_p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::DensityF0D *) x)); } -static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetXF0D *) x)); +static void *_p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetXF0D *) x)); } -static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedXF0D *) x)); +static void *_p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedXF0D *) x)); } -static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::Curvature2DAngleF0D *) x)); +static void *_p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::Curvature2DAngleF0D *) x)); } -static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetYF0D *) x)); +static void *_p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetYF0D *) x)); } -static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedYF0D *) x)); +static void *_p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedYF0D *) x)); } -static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetZF0D *) x)); +static void *_p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetZF0D *) x)); } -static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetProjectedZF0D *) x)); +static void *_p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::GetProjectedZF0D *) x)); } -static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::LocalAverageDepthF0D *) x)); +static void *_p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< double > *) ((Functions0D::LocalAverageDepthF0D *) x)); } -static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetSteerableViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetDirectionalViewMapDensityF1D *) x)); } -static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); +static void *_p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetCompleteViewMapDensityF1D *) x)); } -static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::DensityF1D *) x)); +static void *_p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::DensityF1D *) x)); } -static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::ZDiscontinuityF1D *) x)); +static void *_p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::ZDiscontinuityF1D *) x)); } -static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetXF1D *) x)); +static void *_p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetXF1D *) x)); } -static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetZF1D *) x)); +static void *_p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetZF1D *) x)); } -static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetViewMapGradientNormF1D *) x)); +static void *_p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetViewMapGradientNormF1D *) x)); } -static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedYF1D *) x)); +static void *_p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedYF1D *) x)); } -static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::Curvature2DAngleF1D *) x)); +static void *_p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::Curvature2DAngleF1D *) x)); } -static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetYF1D *) x)); +static void *_p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetYF1D *) x)); } -static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedXF1D *) x)); +static void *_p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedXF1D *) x)); } -static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::LocalAverageDepthF1D *) x)); +static void *_p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::LocalAverageDepthF1D *) x)); } -static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t(void *x) { - return (void *)((UnaryFunction1D *) ((Functions1D::GetProjectedZF1D *) x)); +static void *_p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t(void *x, int *newmemory) { + return (void *)((UnaryFunction1D< double > *) ((Functions1D::GetProjectedZF1D *) x)); } -static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); +static void *_p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetCurvilinearAbscissaF0D *) x)); } -static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadMapPixelF0D *) x)); +static void *_p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadSteerableViewMapPixelF0D *) x)); } -static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); +static void *_p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::ReadCompleteViewMapPixelF0D *) x)); } -static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetViewMapGradientNormF0D *) x)); +static void *_p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetViewMapGradientNormF0D *) x)); } -static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t(void *x) { - return (void *)((UnaryFunction0D *) ((Functions0D::GetParameterF0D *) x)); +static void *_p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t(void *x, int *newmemory) { + return (void *)((UnaryFunction0D< float > *) ((Functions0D::GetParameterF0D *) x)); } -static void *_p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t(void *x) { - return (void *)((VecMat::Vec *) ((VecMat::Vec3 *) x)); +static void *_p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t(void *x, int *newmemory) { + return (void *)((VecMat::Vec< double,3 > *) ((VecMat::Vec3< double > *) x)); } static swig_type_info _swigt__p_AdjacencyIterator = {"_p_AdjacencyIterator", "AdjacencyIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_BBoxTVecMat__Vec3Tdouble_t_t = {"_p_BBoxTVecMat__Vec3Tdouble_t_t", "BBox > *|BBox *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_BBoxT_VecMat__Vec3T_double_t_t = {"_p_BBoxT_VecMat__Vec3T_double_t_t", "BBox< VecMat::Vec3< double > > *|BBox< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate0D = {"_p_BinaryPredicate0D", "BinaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_BinaryPredicate1D = {"_p_BinaryPredicate1D", "BinaryPredicate1D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CalligraphicShader = {"_p_CalligraphicShader", "CalligraphicShader *", 0, 0, (void*)0, 0}; @@ -110242,7 +109120,7 @@ static swig_type_info _swigt__p_ChainingIterator = {"_p_ChainingIterator", "Chai static swig_type_info _swigt__p_CurvatureInfo = {"_p_CurvatureInfo", "CurvatureInfo *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Curve = {"_p_Curve", "Curve *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_CurveInternal__CurvePointIterator = {"_p_CurveInternal__CurvePointIterator", "CurveInternal::CurvePointIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "CurvePoint *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CurvePoint = {"_p_CurvePoint", "Curve::Vertex *|CurvePoint *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Curve__vertex_container__iterator = {"_p_Curve__vertex_container__iterator", "::Curve::vertex_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdge = {"_p_FEdge", "FEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_FEdgeInternal__SVertexIterator = {"_p_FEdgeInternal__SVertexIterator", "FEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; @@ -110381,56 +109259,56 @@ static swig_type_info _swigt__p_Stroke__viewedge_container__iterator = {"_p_Stro static swig_type_info _swigt__p_StrokesContainer = {"_p_StrokesContainer", "StrokesContainer *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_StyleModule = {"_p_StyleModule", "StyleModule *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_TVertex = {"_p_TVertex", "TVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTId_t = {"_p_UnaryFunction0DTId_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t", "UnaryFunction0D > *|UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTViewShape_p_t = {"_p_UnaryFunction0DTViewShape_p_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTdouble_t = {"_p_UnaryFunction0DTdouble_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTfloat_t = {"_p_UnaryFunction0DTfloat_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction0D > *|UnaryFunction0D > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTunsigned_int_t = {"_p_UnaryFunction0DTunsigned_int_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction0DTvoid_t = {"_p_UnaryFunction0DTvoid_t", "UnaryFunction0D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t = {"_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t", "UnaryFunction1D > *|UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTdouble_t = {"_p_UnaryFunction1DTdouble_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTfloat_t = {"_p_UnaryFunction1DTfloat_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t = {"_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t", "UnaryFunction1D > *|UnaryFunction1D > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTunsigned_int_t = {"_p_UnaryFunction1DTunsigned_int_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_UnaryFunction1DTvoid_t = {"_p_UnaryFunction1DTvoid_t", "UnaryFunction1D *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_Id_t = {"_p_UnaryFunction0DT_Id_t", "UnaryFunction0D< Id > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t", "UnaryFunction0D< Geometry::Vec2f > *|UnaryFunction0D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t", "UnaryFunction0D< VecMat::Vec3< float > > *|UnaryFunction0D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_ViewShape_p_t = {"_p_UnaryFunction0DT_ViewShape_p_t", "UnaryFunction0D< ViewShape * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_double_t = {"_p_UnaryFunction0DT_double_t", "UnaryFunction0D< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_float_t = {"_p_UnaryFunction0DT_float_t", "UnaryFunction0D< float > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction0D< std::vector< ViewShape * > > *|UnaryFunction0D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_unsigned_int_t = {"_p_UnaryFunction0DT_unsigned_int_t", "UnaryFunction0D< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction0DT_void_t = {"_p_UnaryFunction0DT_void_t", "UnaryFunction0D< void > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t", "UnaryFunction1D< Geometry::Vec2f > *|UnaryFunction1D< VecMat::Vec2< float > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t = {"_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t", "UnaryFunction1D< VecMat::Vec3< float > > *|UnaryFunction1D< Geometry::Vec3f > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_double_t = {"_p_UnaryFunction1DT_double_t", "UnaryFunction1D< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_float_t = {"_p_UnaryFunction1DT_float_t", "UnaryFunction1D< float > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t = {"_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t", "UnaryFunction1D< std::vector< ViewShape * > > *|UnaryFunction1D< std::vector< ViewShape *,std::allocator< ViewShape * > > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_unsigned_int_t = {"_p_UnaryFunction1DT_unsigned_int_t", "UnaryFunction1D< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_UnaryFunction1DT_void_t = {"_p_UnaryFunction1DT_void_t", "UnaryFunction1D< void > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate0D = {"_p_UnaryPredicate0D", "UnaryPredicate0D *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_UnaryPredicate1D = {"_p_UnaryPredicate1D", "UnaryPredicate1D *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tdouble_t = {"_p_VecMat__HVec3Tdouble_t", "VecMat::HVec3 *|Geometry::HVec3r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tfloat_t = {"_p_VecMat__HVec3Tfloat_t", "VecMat::HVec3 *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tint_t = {"_p_VecMat__HVec3Tint_t", "VecMat::HVec3 *|Geometry::HVec3i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__HVec3Tunsigned_int_t = {"_p_VecMat__HVec3Tunsigned_int_t", "VecMat::HVec3 *|Geometry::HVec3u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_2_t = {"_p_VecMat__SquareMatrixTdouble_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_3_t = {"_p_VecMat__SquareMatrixTdouble_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTdouble_4_t = {"_p_VecMat__SquareMatrixTdouble_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_2_t = {"_p_VecMat__SquareMatrixTfloat_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_3_t = {"_p_VecMat__SquareMatrixTfloat_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTfloat_4_t = {"_p_VecMat__SquareMatrixTfloat_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_2_t = {"_p_VecMat__SquareMatrixTint_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_3_t = {"_p_VecMat__SquareMatrixTint_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTint_4_t = {"_p_VecMat__SquareMatrixTint_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_2_t = {"_p_VecMat__SquareMatrixTunsigned_int_2_t", "VecMat::SquareMatrix *|Geometry::Matrix22u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_3_t = {"_p_VecMat__SquareMatrixTunsigned_int_3_t", "VecMat::SquareMatrix *|Geometry::Matrix33u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__SquareMatrixTunsigned_int_4_t = {"_p_VecMat__SquareMatrixTunsigned_int_4_t", "VecMat::SquareMatrix *|Geometry::Matrix44u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tdouble_t = {"_p_VecMat__Vec2Tdouble_t", "VecMat::Vec2 *|Geometry::Vec2d *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tfloat_t = {"_p_VecMat__Vec2Tfloat_t", "VecMat::Vec2 *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tint_t = {"_p_VecMat__Vec2Tint_t", "VecMat::Vec2 *|Geometry::Vec2i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec2Tunsigned_int_t = {"_p_VecMat__Vec2Tunsigned_int_t", "VecMat::Vec2 *|Geometry::Vec2u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tdouble_t = {"_p_VecMat__Vec3Tdouble_t", "VecMat::Vec3 *|Geometry::Vec3r *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tfloat_t = {"_p_VecMat__Vec3Tfloat_t", "VecMat::Vec3 *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tint_t = {"_p_VecMat__Vec3Tint_t", "VecMat::Vec3 *|Geometry::Vec3i *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__Vec3Tunsigned_int_t = {"_p_VecMat__Vec3Tunsigned_int_t", "VecMat::Vec3 *|Geometry::Vec3u *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTdouble_2_t = {"_p_VecMat__VecTdouble_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTdouble_3_t = {"_p_VecMat__VecTdouble_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTfloat_2_t = {"_p_VecMat__VecTfloat_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTfloat_3_t = {"_p_VecMat__VecTfloat_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTint_2_t = {"_p_VecMat__VecTint_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTint_3_t = {"_p_VecMat__VecTint_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTunsigned_int_2_t = {"_p_VecMat__VecTunsigned_int_2_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_VecMat__VecTunsigned_int_3_t = {"_p_VecMat__VecTunsigned_int_3_t", "VecMat::Vec *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_double_t = {"_p_VecMat__HVec3T_double_t", "Geometry::HVec3d *|Geometry::HVec3r *|VecMat::HVec3< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_float_t = {"_p_VecMat__HVec3T_float_t", "VecMat::HVec3< float > *|Geometry::HVec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_int_t = {"_p_VecMat__HVec3T_int_t", "Geometry::HVec3i *|VecMat::HVec3< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__HVec3T_unsigned_int_t = {"_p_VecMat__HVec3T_unsigned_int_t", "Geometry::HVec3u *|VecMat::HVec3< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_2_t = {"_p_VecMat__SquareMatrixT_double_2_t", "Geometry::Matrix22d *|Geometry::Matrix22r *|VecMat::SquareMatrix< double,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_3_t = {"_p_VecMat__SquareMatrixT_double_3_t", "VecMat::SquareMatrix< double,3 > *|Geometry::Matrix33d *|Geometry::Matrix33r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_double_4_t = {"_p_VecMat__SquareMatrixT_double_4_t", "VecMat::SquareMatrix< double,4 > *|Geometry::Matrix44d *|Geometry::Matrix44r *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_2_t = {"_p_VecMat__SquareMatrixT_float_2_t", "Geometry::Matrix22f *|VecMat::SquareMatrix< float,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_3_t = {"_p_VecMat__SquareMatrixT_float_3_t", "VecMat::SquareMatrix< float,3 > *|Geometry::Matrix33f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_float_4_t = {"_p_VecMat__SquareMatrixT_float_4_t", "Geometry::Matrix44f *|VecMat::SquareMatrix< float,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_2_t = {"_p_VecMat__SquareMatrixT_int_2_t", "VecMat::SquareMatrix< int,2 > *|Geometry::Matrix22i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_3_t = {"_p_VecMat__SquareMatrixT_int_3_t", "VecMat::SquareMatrix< int,3 > *|Geometry::Matrix33i *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_int_4_t = {"_p_VecMat__SquareMatrixT_int_4_t", "Geometry::Matrix44i *|VecMat::SquareMatrix< int,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t = {"_p_VecMat__SquareMatrixT_unsigned_int_2_t", "Geometry::Matrix22u *|VecMat::SquareMatrix< unsigned int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t = {"_p_VecMat__SquareMatrixT_unsigned_int_3_t", "Geometry::Matrix33u *|VecMat::SquareMatrix< unsigned int,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t = {"_p_VecMat__SquareMatrixT_unsigned_int_4_t", "Geometry::Matrix44u *|VecMat::SquareMatrix< unsigned int,4 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_double_t = {"_p_VecMat__Vec2T_double_t", "Geometry::Vec2d *|Geometry::Vec2r *|VecMat::Vec2< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_float_t = {"_p_VecMat__Vec2T_float_t", "VecMat::Vec2< float > *|Geometry::Vec2f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_int_t = {"_p_VecMat__Vec2T_int_t", "Geometry::Vec2i *|VecMat::Vec2< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec2T_unsigned_int_t = {"_p_VecMat__Vec2T_unsigned_int_t", "Geometry::Vec2u *|VecMat::Vec2< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_double_t = {"_p_VecMat__Vec3T_double_t", "Geometry::Vec3d *|Geometry::Vec3r *|VecMat::Vec3< double > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_float_t = {"_p_VecMat__Vec3T_float_t", "VecMat::Vec3< float > *|Geometry::Vec3f *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_int_t = {"_p_VecMat__Vec3T_int_t", "Geometry::Vec3i *|VecMat::Vec3< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__Vec3T_unsigned_int_t = {"_p_VecMat__Vec3T_unsigned_int_t", "Geometry::Vec3u *|VecMat::Vec3< unsigned int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_double_2_t = {"_p_VecMat__VecT_double_2_t", "VecMat::Vec< double,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_double_3_t = {"_p_VecMat__VecT_double_3_t", "VecMat::Vec< double,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_float_2_t = {"_p_VecMat__VecT_float_2_t", "VecMat::Vec< float,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_float_3_t = {"_p_VecMat__VecT_float_3_t", "VecMat::Vec< float,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_int_2_t = {"_p_VecMat__VecT_int_2_t", "VecMat::Vec< int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_int_3_t = {"_p_VecMat__VecT_int_3_t", "VecMat::Vec< int,3 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_2_t = {"_p_VecMat__VecT_unsigned_int_2_t", "VecMat::Vec< unsigned int,2 > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_VecMat__VecT_unsigned_int_3_t = {"_p_VecMat__VecT_unsigned_int_3_t", "VecMat::Vec< unsigned int,3 > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_Vertex = {"_p_Vertex", "Vertex *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdge = {"_p_ViewEdge", "ViewEdge *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewEdgeInternal__SVertexIterator = {"_p_ViewEdgeInternal__SVertexIterator", "ViewEdgeInternal::SVertexIterator *", 0, 0, (void*)0, 0}; @@ -110438,8 +109316,8 @@ static swig_type_info _swigt__p_ViewEdgeInternal__ViewEdgeIterator = {"_p_ViewEd static swig_type_info _swigt__p_ViewMap = {"_p_ViewMap", "ViewMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewShape = {"_p_ViewShape", "ViewShape *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertex = {"_p_ViewVertex", "ViewVertex *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_const_traits > *|ViewVertex::const_edge_iterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t = {"_p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t", "ViewVertexInternal::edge_iterator_base< ViewVertexInternal::edge_nonconst_traits > *|ViewVertex::edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator", "ViewVertexInternal::orientedViewEdgeIterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edge_pointers_container::iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator = {"_p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator", "ViewVertexInternal::orientedViewEdgeIterator::edges_container::iterator *", 0, 0, (void*)0, 0}; @@ -110452,16 +109330,16 @@ static swig_type_info _swigt__p_const_reference = {"_p_const_reference", "const_ static swig_type_info _swigt__p_const_vertex_iterator = {"_p_const_vertex_iterator", "const_vertex_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_directedViewEdge = {"_p_directedViewEdge", "directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "real *|VecMat::Vec2< double >::value_type *|VecMat::Vec3< double >::value_type *|double *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_iterator = {"_p_edge_iterator", "edge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edge_pointers_container = {"_p_edge_pointers_container", "edge_pointers_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_edges_container = {"_p_edges_container", "edges_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedge_iterator = {"_p_fedge_iterator", "fedge_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_fedges_container = {"_p_fedges_container", "fedges_container *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_float = {"_p_float", "VecMat::Vec2< float >::value_type *|VecMat::Vec3< float >::value_type *|float *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_id_to_index_map = {"_p_id_to_index_map", "id_to_index_map *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_id_type = {"_p_id_type", "id_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "VecMat::Vec2< int >::value_type *|VecMat::Vec3< int >::value_type *|int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ltstr = {"_p_ltstr", "ltstr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_mapsMap = {"_p_mapsMap", "mapsMap *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_occluder_container__const_iterator = {"_p_occluder_container__const_iterator", "occluder_container::const_iterator *", 0, 0, (void*)0, 0}; @@ -110469,34 +109347,34 @@ static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, static swig_type_info _swigt__p_point_iterator = {"_p_point_iterator", "point_iterator *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_point_type = {"_p_point_type", "point_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_setTVecMat__Vec3Tdouble_t_t = {"_p_setTVecMat__Vec3Tdouble_t_t", "set > *|set *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_setT_VecMat__Vec3T_double_t_t = {"_p_setT_VecMat__Vec3T_double_t_t", "set< VecMat::Vec3< double > > *|set< Geometry::Vec3r > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t = {"_p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t", "std::map *|ViewMap::id_to_index_map *|std::map,std::allocator > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__pairTViewEdge_p_bool_t = {"_p_std__pairTViewEdge_p_bool_t", "std::pair *|::ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type = {"_p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t = {"_p_std__vectorTMaterial_std__allocatorTMaterial_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t", "std::vector *|ViewMap::svertices_container *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type = {"_p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type = {"_p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t = {"_p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t = {"_p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type = {"_p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type = {"_p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type = {"_p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t = {"_p_std__vectorTint_std__allocatorTint_t_t", "std::vector *|std::vector > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type = {"_p_std__vectorTint_std__allocatorTint_t_t__allocator_type", "std::allocator *|std::vector::allocator_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t = {"_p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t", "std::vector > *|std::vector *|std::vector,std::allocator > > *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t = {"_p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t", "std::vector > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t = {"_p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t", "ViewMap::id_to_index_map *|std::map< int,int,std::less< int >,std::allocator< std::pair< int const,int > > > *|std::map< int,int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__pairT_ViewEdge_p_bool_t = {"_p_std__pairT_ViewEdge_p_bool_t", "std::pair< ViewEdge *,bool > *|ViewVertex::directedViewEdge *|::ViewVertex::directedViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t", "std::vector< FEdge *,std::allocator< FEdge * > > *|std::vector< FEdge * > *|ViewMap::fedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type = {"_p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type", "std::vector< FEdge * >::allocator_type *|std::allocator< FEdge * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t = {"_p_std__vectorT_Material_std__allocatorT_Material_t_t", "std::vector< Material,std::allocator< Material > > *|std::vector< Material > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t", "std::vector< SVertex * > *|ViewMap::svertices_container *|std::vector< SVertex *,std::allocator< SVertex * > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type = {"_p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type", "std::vector< SVertex * >::allocator_type *|std::allocator< SVertex * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t", "std::vector< StrokeShader *,std::allocator< StrokeShader * > > *|std::vector< StrokeShader * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type = {"_p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type", "std::vector< StrokeShader * >::allocator_type *|std::allocator< StrokeShader * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t = {"_p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t", "std::vector< TVertex * > *|std::vector< TVertex *,std::allocator< TVertex * > > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t = {"_p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t", "std::vector< VecMat::Vec2< double > > *|std::vector< VecMat::Vec2< double >,std::allocator< VecMat::Vec2< double > > > *|std::vector< Geometry::Vec2r > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t", "std::vector< ViewEdge *,std::allocator< ViewEdge * > > *|std::vector< ViewEdge * > *|ViewMap::viewedges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type = {"_p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type", "std::vector< ViewEdge * >::allocator_type *|std::allocator< ViewEdge * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t", "std::vector< ViewShape *,std::allocator< ViewShape * > > *|std::vector< ViewShape * > *|occluder_container *|ViewMap::viewshapes_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type = {"_p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type", "std::vector< ViewShape * >::allocator_type *|std::allocator< ViewShape * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t", "std::vector< ViewVertex *,std::allocator< ViewVertex * > > *|std::vector< ViewVertex * > *|ViewMap::viewvertices_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type = {"_p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type", "std::vector< ViewVertex * >::allocator_type *|std::allocator< ViewVertex * > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type = {"_p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t = {"_p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t", "std::vector< std::pair< ViewEdge *,bool > > *|std::vector< ViewVertex::directedViewEdge > *|std::vector< std::pair< ViewEdge *,bool >,std::allocator< std::pair< ViewEdge *,bool > > > *|NonTVertex::edges_container *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t = {"_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t", "std::vector< unsigned int,std::allocator< unsigned int > > *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_svertices_container = {"_p_svertices_container", "svertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_swig__PySwigIterator = {"_p_swig__PySwigIterator", "swig::PySwigIterator *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|VecMat::Vec3::value_type *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|Nature::EdgeNature *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "VecMat::Vec2< unsigned int >::value_type *|VecMat::Vec3< unsigned int >::value_type *|unsigned int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "Nature::VertexNature *|Nature::EdgeNature *|unsigned short *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_container = {"_p_vertex_container", "vertex_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_vertex_iterator = {"_p_vertex_iterator", "vertex_iterator *", 0, 0, (void*)0, 0}; @@ -110506,16 +109384,16 @@ static swig_type_info _swigt__p_viewedges_container = {"_p_viewedges_container", static swig_type_info _swigt__p_viewshapes_container = {"_p_viewshapes_container", "viewshapes_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_viewvertices_container = {"_p_viewvertices_container", "viewvertices_container *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type = {"_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type", "FEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type = {"_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type", "SVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type = {"_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type", "StrokeShader *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type = {"_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type", "ViewEdge *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type = {"_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type", "ViewShape *|std::vector::value_type", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type = {"_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type", "ViewVertex *|std::vector::value_type", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type = {"_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type", "std::vector< FEdge * >::value_type|FEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type = {"_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type", "std::vector< SVertex * >::value_type|SVertex *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type = {"_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type", "std::vector< StrokeShader * >::value_type|StrokeShader *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type = {"_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type", "std::vector< ViewEdge * >::value_type|ViewEdge *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type = {"_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type", "std::vector< ViewShape * >::value_type|ViewShape *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type = {"_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type", "std::vector< ViewVertex * >::value_type|ViewVertex *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_AdjacencyIterator, - &_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, + &_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, &_swigt__p_BinaryPredicate0D, &_swigt__p_BinaryPredicate1D, &_swigt__p_CalligraphicShader, @@ -110666,56 +109544,56 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_StrokesContainer, &_swigt__p_StyleModule, &_swigt__p_TVertex, - &_swigt__p_UnaryFunction0DTId_t, - &_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, - &_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, - &_swigt__p_UnaryFunction0DTViewShape_p_t, - &_swigt__p_UnaryFunction0DTdouble_t, - &_swigt__p_UnaryFunction0DTfloat_t, - &_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - &_swigt__p_UnaryFunction0DTunsigned_int_t, - &_swigt__p_UnaryFunction0DTvoid_t, - &_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, - &_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, - &_swigt__p_UnaryFunction1DTdouble_t, - &_swigt__p_UnaryFunction1DTfloat_t, - &_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - &_swigt__p_UnaryFunction1DTunsigned_int_t, - &_swigt__p_UnaryFunction1DTvoid_t, + &_swigt__p_UnaryFunction0DT_Id_t, + &_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, + &_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, + &_swigt__p_UnaryFunction0DT_ViewShape_p_t, + &_swigt__p_UnaryFunction0DT_double_t, + &_swigt__p_UnaryFunction0DT_float_t, + &_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + &_swigt__p_UnaryFunction0DT_unsigned_int_t, + &_swigt__p_UnaryFunction0DT_void_t, + &_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, + &_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, + &_swigt__p_UnaryFunction1DT_double_t, + &_swigt__p_UnaryFunction1DT_float_t, + &_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + &_swigt__p_UnaryFunction1DT_unsigned_int_t, + &_swigt__p_UnaryFunction1DT_void_t, &_swigt__p_UnaryPredicate0D, &_swigt__p_UnaryPredicate1D, - &_swigt__p_VecMat__HVec3Tdouble_t, - &_swigt__p_VecMat__HVec3Tfloat_t, - &_swigt__p_VecMat__HVec3Tint_t, - &_swigt__p_VecMat__HVec3Tunsigned_int_t, - &_swigt__p_VecMat__SquareMatrixTdouble_2_t, - &_swigt__p_VecMat__SquareMatrixTdouble_3_t, - &_swigt__p_VecMat__SquareMatrixTdouble_4_t, - &_swigt__p_VecMat__SquareMatrixTfloat_2_t, - &_swigt__p_VecMat__SquareMatrixTfloat_3_t, - &_swigt__p_VecMat__SquareMatrixTfloat_4_t, - &_swigt__p_VecMat__SquareMatrixTint_2_t, - &_swigt__p_VecMat__SquareMatrixTint_3_t, - &_swigt__p_VecMat__SquareMatrixTint_4_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, - &_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, - &_swigt__p_VecMat__Vec2Tdouble_t, - &_swigt__p_VecMat__Vec2Tfloat_t, - &_swigt__p_VecMat__Vec2Tint_t, - &_swigt__p_VecMat__Vec2Tunsigned_int_t, - &_swigt__p_VecMat__Vec3Tdouble_t, - &_swigt__p_VecMat__Vec3Tfloat_t, - &_swigt__p_VecMat__Vec3Tint_t, - &_swigt__p_VecMat__Vec3Tunsigned_int_t, - &_swigt__p_VecMat__VecTdouble_2_t, - &_swigt__p_VecMat__VecTdouble_3_t, - &_swigt__p_VecMat__VecTfloat_2_t, - &_swigt__p_VecMat__VecTfloat_3_t, - &_swigt__p_VecMat__VecTint_2_t, - &_swigt__p_VecMat__VecTint_3_t, - &_swigt__p_VecMat__VecTunsigned_int_2_t, - &_swigt__p_VecMat__VecTunsigned_int_3_t, + &_swigt__p_VecMat__HVec3T_double_t, + &_swigt__p_VecMat__HVec3T_float_t, + &_swigt__p_VecMat__HVec3T_int_t, + &_swigt__p_VecMat__HVec3T_unsigned_int_t, + &_swigt__p_VecMat__SquareMatrixT_double_2_t, + &_swigt__p_VecMat__SquareMatrixT_double_3_t, + &_swigt__p_VecMat__SquareMatrixT_double_4_t, + &_swigt__p_VecMat__SquareMatrixT_float_2_t, + &_swigt__p_VecMat__SquareMatrixT_float_3_t, + &_swigt__p_VecMat__SquareMatrixT_float_4_t, + &_swigt__p_VecMat__SquareMatrixT_int_2_t, + &_swigt__p_VecMat__SquareMatrixT_int_3_t, + &_swigt__p_VecMat__SquareMatrixT_int_4_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, + &_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, + &_swigt__p_VecMat__Vec2T_double_t, + &_swigt__p_VecMat__Vec2T_float_t, + &_swigt__p_VecMat__Vec2T_int_t, + &_swigt__p_VecMat__Vec2T_unsigned_int_t, + &_swigt__p_VecMat__Vec3T_double_t, + &_swigt__p_VecMat__Vec3T_float_t, + &_swigt__p_VecMat__Vec3T_int_t, + &_swigt__p_VecMat__Vec3T_unsigned_int_t, + &_swigt__p_VecMat__VecT_double_2_t, + &_swigt__p_VecMat__VecT_double_3_t, + &_swigt__p_VecMat__VecT_float_2_t, + &_swigt__p_VecMat__VecT_float_3_t, + &_swigt__p_VecMat__VecT_int_2_t, + &_swigt__p_VecMat__VecT_int_3_t, + &_swigt__p_VecMat__VecT_unsigned_int_2_t, + &_swigt__p_VecMat__VecT_unsigned_int_3_t, &_swigt__p_Vertex, &_swigt__p_ViewEdge, &_swigt__p_ViewEdgeInternal__SVertexIterator, @@ -110723,8 +109601,8 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_ViewMap, &_swigt__p_ViewShape, &_swigt__p_ViewVertex, - &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, - &_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, + &_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, &_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -110754,30 +109632,30 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_point_iterator, &_swigt__p_point_type, &_swigt__p_reference, - &_swigt__p_setTVecMat__Vec3Tdouble_t_t, + &_swigt__p_setT_VecMat__Vec3T_double_t_t, &_swigt__p_size_type, &_swigt__p_std__invalid_argument, - &_swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, - &_swigt__p_std__pairTViewEdge_p_bool_t, - &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, - &_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, - &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, - &_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, - &_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, - &_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, - &_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, - &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, - &_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, - &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, - &_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, - &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, - &_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, - &_swigt__p_std__vectorTint_std__allocatorTint_t_t, - &_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, - &_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, - &_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + &_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, + &_swigt__p_std__pairT_ViewEdge_p_bool_t, + &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, + &_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, + &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, + &_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, + &_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, + &_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, + &_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, + &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, + &_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, + &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, + &_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, + &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, + &_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, + &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, + &_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, + &_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, &_swigt__p_svertices_container, &_swigt__p_swig__PySwigIterator, &_swigt__p_unsigned_int, @@ -110791,16 +109669,16 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_viewshapes_container, &_swigt__p_viewvertices_container, &_swigt__p_void, - &_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, - &_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, - &_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, - &_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, - &_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, - &_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, + &_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, + &_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, + &_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, + &_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, + &_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, + &_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, }; static swig_cast_info _swigc__p_AdjacencyIterator[] = { {&_swigt__p_AdjacencyIterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_BBoxTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_BBoxT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_BBoxT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate0D[] = { {&_swigt__p_BinaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_BinaryPredicate1D[] = { {&_swigt__p_Predicates1D__Length2DBP1D, _p_Predicates1D__Length2DBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__FalseBP1D, _p_Predicates1D__FalseBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_BinaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__ViewMapGradientNormBP1D, _p_Predicates1D__ViewMapGradientNormBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueBP1D, _p_Predicates1D__TrueBP1DTo_p_BinaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__SameShapeIdBP1D, _p_Predicates1D__SameShapeIdBP1DTo_p_BinaryPredicate1D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CalligraphicShader[] = { {&_swigt__p_CalligraphicShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110814,7 +109692,7 @@ static swig_cast_info _swigc__p_Curve[] = { {&_swigt__p_Curve, 0, 0, 0},{0, 0, static swig_cast_info _swigc__p_CurveInternal__CurvePointIterator[] = { {&_swigt__p_CurveInternal__CurvePointIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_CurvePoint[] = { {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_CurvePoint, 0, 0}, {&_swigt__p_CurvePoint, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Curve__vertex_container__iterator[] = { {&_swigt__p_Curve__vertex_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_FEdge[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeInternal__SVertexIterator[] = { {&_swigt__p_FEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSharp[] = { {&_swigt__p_FEdgeSharp, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_FEdgeSmooth[] = { {&_swigt__p_FEdgeSmooth, 0, 0, 0},{0, 0, 0, 0}}; @@ -110873,10 +109751,10 @@ static swig_cast_info _swigc__p_GrayImage[] = { {&_swigt__p_GrayImage, 0, 0, 0} static swig_cast_info _swigc__p_I1DContainer[] = { {&_swigt__p_I1DContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Id[] = { {&_swigt__p_Id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_IntegrationType[] = { {&_swigt__p_IntegrationType, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface0D[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_Interface0D, 0, 0, 0}, {&_swigt__p_ViewVertex, _p_ViewVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_SVertex, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, _p_SVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_StrokeVertex, _p_StrokeVertexTo_p_Interface0D, 0, 0}, {&_swigt__p_CurvePoint, _p_CurvePointTo_p_Interface0D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIterator[] = { {&_swigt__p_Interface0DIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Interface0DIteratorNested[] = { {&_swigt__p_Interface0DIteratorNested, 0, 0, 0}, {&_swigt__p_FEdgeInternal__SVertexIterator, _p_FEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_ViewEdgeInternal__SVertexIterator, _p_ViewEdgeInternal__SVertexIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_CurveInternal__CurvePointIterator, _p_CurveInternal__CurvePointIteratorTo_p_Interface0DIteratorNested, 0, 0}, {&_swigt__p_StrokeInternal__StrokeVertexIterator, _p_StrokeInternal__StrokeVertexIteratorTo_p_Interface0DIteratorNested, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Interface1D[] = { {&_swigt__p_Interface1D, 0, 0, 0}, {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, _p_ViewEdgeTo_p_Interface1D, 0, 0}, {&_swigt__p_Curve, _p_CurveTo_p_Interface1D, 0, 0}, {&_swigt__p_Stroke, _p_StrokeTo_p_Interface1D, 0, 0}, {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_Interface1D, 0, 0}, {&_swigt__p_FEdge, _p_FEdgeTo_p_Interface1D, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Material[] = { {&_swigt__p_Material, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_MediumType[] = { {&_swigt__p_MediumType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Module[] = { {&_swigt__p_Module, 0, 0, 0},{0, 0, 0, 0}}; @@ -110906,7 +109784,7 @@ static swig_cast_info _swigc__p_Predicates1D__ViewMapGradientNormBP1D[] = { {&_ static swig_cast_info _swigc__p_RGBImage[] = { {&_swigt__p_RGBImage, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ReturnedValueType[] = { {&_swigt__p_ReturnedValueType, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SShape[] = { {&_swigt__p_SShape, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_SVertex[] = { {&_swigt__p_SVertex, 0, 0, 0}, {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SVertex__fedges_container__iterator[] = { {&_swigt__p_SVertex__fedges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Smoother[] = { {&_swigt__p_Smoother, 0, 0, 0}, {&_swigt__p_Omitter, _p_OmitterTo_p_Smoother, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_SmoothingShader[] = { {&_swigt__p_SmoothingShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110917,7 +109795,7 @@ static swig_cast_info _swigc__p_StrokeAttribute[] = { {&_swigt__p_StrokeAttribu static swig_cast_info _swigc__p_StrokeInternal__StrokeVertexIterator[] = { {&_swigt__p_StrokeInternal__StrokeVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeLayer[] = { {&_swigt__p_StrokeLayer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeRenderer[] = { {&_swigt__p_StrokeRenderer, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_StrokeShader[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BSplineShader[] = { {&_swigt__p_StrokeShaders__BSplineShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BackboneStretcherShader[] = { {&_swigt__p_StrokeShaders__BackboneStretcherShader, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StrokeShaders__BezierCurveShader[] = { {&_swigt__p_StrokeShaders__BezierCurveShader, 0, 0, 0},{0, 0, 0, 0}}; @@ -110951,65 +109829,65 @@ static swig_cast_info _swigc__p_Stroke__viewedge_container__iterator[] = { {&_s static swig_cast_info _swigc__p_StrokesContainer[] = { {&_swigt__p_StrokesContainer, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_StyleModule[] = { {&_swigt__p_StyleModule, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_TVertex[] = { {&_swigt__p_TVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTId_t[] = { {&_swigt__p_UnaryFunction0DTId_t, 0, 0, 0}, {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DTId_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DTViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DTViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTdouble_t[] = { {&_swigt__p_UnaryFunction0DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DTdouble_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DTdouble_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTfloat_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DTfloat_t, 0, 0}, {&_swigt__p_UnaryFunction0DTfloat_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DTfloat_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTunsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction0DTvoid_t[] = { {&_swigt__p_UnaryFunction0DTvoid_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t[] = { {&_swigt__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTdouble_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_UnaryFunction1DTdouble_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DTdouble_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DTdouble_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTfloat_t[] = { {&_swigt__p_UnaryFunction1DTfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTunsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DTunsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DTunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_UnaryFunction1DTvoid_t[] = { {&_swigt__p_UnaryFunction1DTvoid_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DTvoid_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_Id_t[] = { {&_swigt__p_Functions0D__ShapeIdF0D, _p_Functions0D__ShapeIdF0DTo_p_UnaryFunction0DT_Id_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_Id_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions0D__VertexOrientation2DF0D, _p_Functions0D__VertexOrientation2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_Functions0D__Normal2DF0D, _p_Functions0D__Normal2DF0DTo_p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_Functions0D__VertexOrientation3DF0D, _p_Functions0D__VertexOrientation3DF0DTo_p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_ViewShape_p_t[] = { {&_swigt__p_Functions0D__GetShapeF0D, _p_Functions0D__GetShapeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_Functions0D__GetOccludeeF0D, _p_Functions0D__GetOccludeeF0DTo_p_UnaryFunction0DT_ViewShape_p_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_ViewShape_p_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_double_t[] = { {&_swigt__p_UnaryFunction0DT_double_t, 0, 0, 0}, {&_swigt__p_Functions0D__ZDiscontinuityF0D, _p_Functions0D__ZDiscontinuityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__DensityF0D, _p_Functions0D__DensityF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetXF0D, _p_Functions0D__GetXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedXF0D, _p_Functions0D__GetProjectedXF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__Curvature2DAngleF0D, _p_Functions0D__Curvature2DAngleF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetYF0D, _p_Functions0D__GetYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedYF0D, _p_Functions0D__GetProjectedYF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetZF0D, _p_Functions0D__GetZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__GetProjectedZF0D, _p_Functions0D__GetProjectedZF0DTo_p_UnaryFunction0DT_double_t, 0, 0}, {&_swigt__p_Functions0D__LocalAverageDepthF0D, _p_Functions0D__LocalAverageDepthF0DTo_p_UnaryFunction0DT_double_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_float_t[] = { {&_swigt__p_Functions0D__GetCurvilinearAbscissaF0D, _p_Functions0D__GetCurvilinearAbscissaF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadMapPixelF0D, _p_Functions0D__ReadMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadSteerableViewMapPixelF0D, _p_Functions0D__ReadSteerableViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__ReadCompleteViewMapPixelF0D, _p_Functions0D__ReadCompleteViewMapPixelF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_Functions0D__GetViewMapGradientNormF0D, _p_Functions0D__GetViewMapGradientNormF0DTo_p_UnaryFunction0DT_float_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_float_t, 0, 0, 0}, {&_swigt__p_Functions0D__GetParameterF0D, _p_Functions0D__GetParameterF0DTo_p_UnaryFunction0DT_float_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions0D__GetOccludersF0D, _p_Functions0D__GetOccludersF0DTo_p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_unsigned_int_t[] = { {&_swigt__p_Functions0D__QuantitativeInvisibilityF0D, _p_Functions0D__QuantitativeInvisibilityF0DTo_p_UnaryFunction0DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction0DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction0DT_void_t[] = { {&_swigt__p_UnaryFunction0DT_void_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t[] = { {&_swigt__p_Functions1D__Orientation2DF1D, _p_Functions1D__Orientation2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Normal2DF1D, _p_Functions1D__Normal2DF1DTo_p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t[] = { {&_swigt__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__Orientation3DF1D, _p_Functions1D__Orientation3DF1DTo_p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_double_t[] = { {&_swigt__p_Functions1D__GetSteerableViewMapDensityF1D, _p_Functions1D__GetSteerableViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetDirectionalViewMapDensityF1D, _p_Functions1D__GetDirectionalViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetCompleteViewMapDensityF1D, _p_Functions1D__GetCompleteViewMapDensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__DensityF1D, _p_Functions1D__DensityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__ZDiscontinuityF1D, _p_Functions1D__ZDiscontinuityF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetXF1D, _p_Functions1D__GetXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetZF1D, _p_Functions1D__GetZF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetViewMapGradientNormF1D, _p_Functions1D__GetViewMapGradientNormF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedYF1D, _p_Functions1D__GetProjectedYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_double_t, 0, 0, 0}, {&_swigt__p_Functions1D__Curvature2DAngleF1D, _p_Functions1D__Curvature2DAngleF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetYF1D, _p_Functions1D__GetYF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedXF1D, _p_Functions1D__GetProjectedXF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__LocalAverageDepthF1D, _p_Functions1D__LocalAverageDepthF1DTo_p_UnaryFunction1DT_double_t, 0, 0}, {&_swigt__p_Functions1D__GetProjectedZF1D, _p_Functions1D__GetProjectedZF1DTo_p_UnaryFunction1DT_double_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_float_t[] = { {&_swigt__p_UnaryFunction1DT_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t[] = { {&_swigt__p_Functions1D__GetOccludeeF1D, _p_Functions1D__GetOccludeeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0, 0}, {&_swigt__p_Functions1D__GetShapeF1D, _p_Functions1D__GetShapeF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0}, {&_swigt__p_Functions1D__GetOccludersF1D, _p_Functions1D__GetOccludersF1DTo_p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_unsigned_int_t[] = { {&_swigt__p_Functions1D__QuantitativeInvisibilityF1D, _p_Functions1D__QuantitativeInvisibilityF1DTo_p_UnaryFunction1DT_unsigned_int_t, 0, 0}, {&_swigt__p_UnaryFunction1DT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_UnaryFunction1DT_void_t[] = { {&_swigt__p_UnaryFunction1DT_void_t, 0, 0, 0}, {&_swigt__p_Functions1D__TimeStampF1D, _p_Functions1D__TimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__IncrementChainingTimeStampF1D, _p_Functions1D__IncrementChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0}, {&_swigt__p_Functions1D__ChainingTimeStampF1D, _p_Functions1D__ChainingTimeStampF1DTo_p_UnaryFunction1DT_void_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate0D[] = { {&_swigt__p_Predicates0D__TrueUP0D, _p_Predicates0D__TrueUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_Predicates0D__FalseUP0D, _p_Predicates0D__FalseUP0DTo_p_UnaryPredicate0D, 0, 0}, {&_swigt__p_UnaryPredicate0D, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_UnaryPredicate1D[] = { {&_swigt__p_Predicates1D__FalseUP1D, _p_Predicates1D__FalseUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ShapeUP1D, _p_Predicates1D__ShapeUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__DensityLowerThanUP1D, _p_Predicates1D__DensityLowerThanUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_UnaryPredicate1D, 0, 0, 0}, {&_swigt__p_Predicates1D__EqualToTimeStampUP1D, _p_Predicates1D__EqualToTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__EqualToChainingTimeStampUP1D, _p_Predicates1D__EqualToChainingTimeStampUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__TrueUP1D, _p_Predicates1D__TrueUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__QuantitativeInvisibilityUP1D, _p_Predicates1D__QuantitativeInvisibilityUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ContourUP1D, _p_Predicates1D__ContourUP1DTo_p_UnaryPredicate1D, 0, 0}, {&_swigt__p_Predicates1D__ExternalContourUP1D, _p_Predicates1D__ExternalContourUP1DTo_p_UnaryPredicate1D, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tdouble_t[] = { {&_swigt__p_VecMat__HVec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tfloat_t[] = { {&_swigt__p_VecMat__HVec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tint_t[] = { {&_swigt__p_VecMat__HVec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__HVec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__HVec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTdouble_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTdouble_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTfloat_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTfloat_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTint_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTint_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixTunsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tdouble_t[] = { {&_swigt__p_VecMat__Vec2Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tfloat_t[] = { {&_swigt__p_VecMat__Vec2Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tint_t[] = { {&_swigt__p_VecMat__Vec2Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec2Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec2Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tdouble_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tfloat_t[] = { {&_swigt__p_VecMat__Vec3Tfloat_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tint_t[] = { {&_swigt__p_VecMat__Vec3Tint_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__Vec3Tunsigned_int_t[] = { {&_swigt__p_VecMat__Vec3Tunsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTdouble_2_t[] = { {&_swigt__p_VecMat__VecTdouble_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tdouble_t, _p_VecMat__Vec2Tdouble_tTo_p_VecMat__VecTdouble_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTdouble_3_t[] = { {&_swigt__p_VecMat__Vec3Tdouble_t, _p_VecMat__Vec3Tdouble_tTo_p_VecMat__VecTdouble_3_t, 0, 0}, {&_swigt__p_VecMat__VecTdouble_3_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTfloat_2_t[] = { {&_swigt__p_VecMat__VecTfloat_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tfloat_t, _p_VecMat__Vec2Tfloat_tTo_p_VecMat__VecTfloat_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTfloat_3_t[] = { {&_swigt__p_VecMat__VecTfloat_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tfloat_t, _p_VecMat__Vec3Tfloat_tTo_p_VecMat__VecTfloat_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTint_2_t[] = { {&_swigt__p_VecMat__VecTint_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tint_t, _p_VecMat__Vec2Tint_tTo_p_VecMat__VecTint_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTint_3_t[] = { {&_swigt__p_VecMat__VecTint_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tint_t, _p_VecMat__Vec3Tint_tTo_p_VecMat__VecTint_3_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_2_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2Tunsigned_int_t, _p_VecMat__Vec2Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_VecMat__VecTunsigned_int_3_t[] = { {&_swigt__p_VecMat__VecTunsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3Tunsigned_int_t, _p_VecMat__Vec3Tunsigned_int_tTo_p_VecMat__VecTunsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_double_t[] = { {&_swigt__p_VecMat__HVec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_float_t[] = { {&_swigt__p_VecMat__HVec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_int_t[] = { {&_swigt__p_VecMat__HVec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__HVec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__HVec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_double_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_double_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_float_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_float_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_2_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t[] = { {&_swigt__p_VecMat__SquareMatrixT_unsigned_int_4_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_double_t[] = { {&_swigt__p_VecMat__Vec2T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_float_t[] = { {&_swigt__p_VecMat__Vec2T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_int_t[] = { {&_swigt__p_VecMat__Vec2T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec2T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec2T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_double_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_float_t[] = { {&_swigt__p_VecMat__Vec3T_float_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_int_t[] = { {&_swigt__p_VecMat__Vec3T_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__Vec3T_unsigned_int_t[] = { {&_swigt__p_VecMat__Vec3T_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_double_2_t[] = { {&_swigt__p_VecMat__VecT_double_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_double_t, _p_VecMat__Vec2T_double_tTo_p_VecMat__VecT_double_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_double_3_t[] = { {&_swigt__p_VecMat__Vec3T_double_t, _p_VecMat__Vec3T_double_tTo_p_VecMat__VecT_double_3_t, 0, 0}, {&_swigt__p_VecMat__VecT_double_3_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_float_2_t[] = { {&_swigt__p_VecMat__VecT_float_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_float_t, _p_VecMat__Vec2T_float_tTo_p_VecMat__VecT_float_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_float_3_t[] = { {&_swigt__p_VecMat__VecT_float_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_float_t, _p_VecMat__Vec3T_float_tTo_p_VecMat__VecT_float_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_int_2_t[] = { {&_swigt__p_VecMat__VecT_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_int_t, _p_VecMat__Vec2T_int_tTo_p_VecMat__VecT_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_int_3_t[] = { {&_swigt__p_VecMat__VecT_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_int_t, _p_VecMat__Vec3T_int_tTo_p_VecMat__VecT_int_3_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_2_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_2_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec2T_unsigned_int_t, _p_VecMat__Vec2T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_2_t, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_VecMat__VecT_unsigned_int_3_t[] = { {&_swigt__p_VecMat__VecT_unsigned_int_3_t, 0, 0, 0}, {&_swigt__p_VecMat__Vec3T_unsigned_int_t, _p_VecMat__Vec3T_unsigned_int_tTo_p_VecMat__VecT_unsigned_int_3_t, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_Vertex[] = { {&_swigt__p_Vertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__p_ViewEdge, 0, 0, 0}, {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewEdge[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__SVertexIterator[] = { {&_swigt__p_ViewEdgeInternal__SVertexIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewEdgeInternal__ViewEdgeIterator[] = { {&_swigt__p_ViewEdgeInternal__ViewEdgeIterator, 0, 0, 0}, {&_swigt__p_ChainingIterator, _p_ChainingIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainSilhouetteIterator, _p_ChainSilhouetteIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0}, {&_swigt__p_ChainPredicateIterator, _p_ChainPredicateIteratorTo_p_ViewEdgeInternal__ViewEdgeIterator, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewMap[] = { {&_swigt__p_ViewMap, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewShape[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertex[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t[] = { {&_swigt__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator[] = { {&_swigt__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, 0, 0, 0},{0, 0, 0, 0}}; @@ -111039,30 +109917,30 @@ static swig_cast_info _swigc__p_p_PyObject[] = { {&_swigt__p_p_PyObject, 0, 0, static swig_cast_info _swigc__p_point_iterator[] = { {&_swigt__p_point_iterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_point_type[] = { {&_swigt__p_point_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_reference[] = { {&_swigt__p_reference, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_setTVecMat__Vec3Tdouble_t_t[] = { {&_swigt__p_setTVecMat__Vec3Tdouble_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_setT_VecMat__Vec3T_double_t_t[] = { {&_swigt__p_setT_VecMat__Vec3T_double_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_size_type[] = { {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t[] = { {&_swigt__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__pairTViewEdge_p_bool_t[] = { {&_swigt__p_std__pairTViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t[] = { {&_swigt__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t[] = { {&_swigt__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t[] = { {&_swigt__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type[] = { {&_swigt__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t[] = { {&_swigt__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t[] = { {&_swigt__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__pairT_ViewEdge_p_bool_t[] = { {&_swigt__p_std__pairT_ViewEdge_p_bool_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t[] = { {&_swigt__p_std__vectorT_Material_std__allocatorT_Material_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t[] = { {&_swigt__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t[] = { {&_swigt__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type[] = { {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t[] = { {&_swigt__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t[] = { {&_swigt__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_svertices_container[] = { {&_swigt__p_svertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_swig__PySwigIterator[] = { {&_swigt__p_swig__PySwigIterator, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; @@ -111076,16 +109954,16 @@ static swig_cast_info _swigc__p_viewedges_container[] = { {&_swigt__p_viewedges static swig_cast_info _swigc__p_viewshapes_container[] = { {&_swigt__p_viewshapes_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_viewvertices_container[] = { {&_swigt__p_viewvertices_container, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type[] = { {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0}, {&_swigt__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type[] = { {&_swigt__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type[] = { {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_FEdge, 0, 0, 0}, {&_swigt__p_FEdgeSharp, _p_FEdgeSharpTo_p_FEdge, 0, 0}, {&_swigt__p_FEdgeSmooth, _p_FEdgeSmoothTo_p_FEdge, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_SVertex, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type[] = { {&_swigt__p_StrokeShaders__ConstrainedIncreasingThicknessShader, _p_StrokeShaders__ConstrainedIncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_StrokeShader, 0, 0, 0}, {&_swigt__p_StrokeShaders__ColorNoiseShader, _p_StrokeShaders__ColorNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessNoiseShader, _p_StrokeShaders__ThicknessNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__LengthDependingThicknessShader, _p_StrokeShaders__LengthDependingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingThicknessShader, _p_StrokeShaders__IncreasingThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantExternThicknessShader, _p_StrokeShaders__ConstantExternThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantThicknessShader, _p_StrokeShaders__ConstantThicknessShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__StrokeTextureShader, _p_StrokeShaders__StrokeTextureShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__SamplingShader, _p_StrokeShaders__SamplingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BSplineShader, _p_StrokeShaders__BSplineShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BezierCurveShader, _p_StrokeShaders__BezierCurveShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__InflateShader, _p_StrokeShaders__InflateShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__GuidingLinesShader, _p_StrokeShaders__GuidingLinesShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__streamShader, _p_StrokeShaders__streamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__fstreamShader, _p_StrokeShaders__fstreamShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_CalligraphicShader, _p_CalligraphicShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SpatialNoiseShader, _p_SpatialNoiseShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_SmoothingShader, _p_SmoothingShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TextureAssignerShader, _p_StrokeShaders__TextureAssignerShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__CalligraphicColorShader, _p_StrokeShaders__CalligraphicColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__MaterialColorShader, _p_StrokeShaders__MaterialColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ColorVariationPatternShader, _p_StrokeShaders__ColorVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__IncreasingColorShader, _p_StrokeShaders__IncreasingColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ConstantColorShader, _p_StrokeShaders__ConstantColorShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ThicknessVariationPatternShader, _p_StrokeShaders__ThicknessVariationPatternShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__BackboneStretcherShader, _p_StrokeShaders__BackboneStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__ExternalContourStretcherShader, _p_StrokeShaders__ExternalContourStretcherShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__PolygonalizationShader, _p_StrokeShaders__PolygonalizationShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_StrokeShaders__TipRemoverShader, _p_StrokeShaders__TipRemoverShaderTo_p_StrokeShader, 0, 0}, {&_swigt__p_OmissionShader, _p_OmissionShaderTo_p_StrokeShader, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_ViewEdge, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type[] = { {&_swigt__p_ViewShape, 0, 0, 0}, {&_swigt__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type[] = { {&_swigt__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, 0, 0, 0}, {&_swigt__p_TVertex, _p_TVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_NonTVertex, _p_NonTVertexTo_p_ViewVertex, 0, 0}, {&_swigt__p_ViewVertex, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_AdjacencyIterator, - _swigc__p_BBoxTVecMat__Vec3Tdouble_t_t, + _swigc__p_BBoxT_VecMat__Vec3T_double_t_t, _swigc__p_BinaryPredicate0D, _swigc__p_BinaryPredicate1D, _swigc__p_CalligraphicShader, @@ -111236,56 +110114,56 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_StrokesContainer, _swigc__p_StyleModule, _swigc__p_TVertex, - _swigc__p_UnaryFunction0DTId_t, - _swigc__p_UnaryFunction0DTVecMat__Vec2Tfloat_t_t, - _swigc__p_UnaryFunction0DTVecMat__Vec3Tfloat_t_t, - _swigc__p_UnaryFunction0DTViewShape_p_t, - _swigc__p_UnaryFunction0DTdouble_t, - _swigc__p_UnaryFunction0DTfloat_t, - _swigc__p_UnaryFunction0DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - _swigc__p_UnaryFunction0DTunsigned_int_t, - _swigc__p_UnaryFunction0DTvoid_t, - _swigc__p_UnaryFunction1DTVecMat__Vec2Tfloat_t_t, - _swigc__p_UnaryFunction1DTVecMat__Vec3Tfloat_t_t, - _swigc__p_UnaryFunction1DTdouble_t, - _swigc__p_UnaryFunction1DTfloat_t, - _swigc__p_UnaryFunction1DTstd__vectorTViewShape_p_std__allocatorTViewShape_p_t_t_t, - _swigc__p_UnaryFunction1DTunsigned_int_t, - _swigc__p_UnaryFunction1DTvoid_t, + _swigc__p_UnaryFunction0DT_Id_t, + _swigc__p_UnaryFunction0DT_VecMat__Vec2T_float_t_t, + _swigc__p_UnaryFunction0DT_VecMat__Vec3T_float_t_t, + _swigc__p_UnaryFunction0DT_ViewShape_p_t, + _swigc__p_UnaryFunction0DT_double_t, + _swigc__p_UnaryFunction0DT_float_t, + _swigc__p_UnaryFunction0DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + _swigc__p_UnaryFunction0DT_unsigned_int_t, + _swigc__p_UnaryFunction0DT_void_t, + _swigc__p_UnaryFunction1DT_VecMat__Vec2T_float_t_t, + _swigc__p_UnaryFunction1DT_VecMat__Vec3T_float_t_t, + _swigc__p_UnaryFunction1DT_double_t, + _swigc__p_UnaryFunction1DT_float_t, + _swigc__p_UnaryFunction1DT_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t_t, + _swigc__p_UnaryFunction1DT_unsigned_int_t, + _swigc__p_UnaryFunction1DT_void_t, _swigc__p_UnaryPredicate0D, _swigc__p_UnaryPredicate1D, - _swigc__p_VecMat__HVec3Tdouble_t, - _swigc__p_VecMat__HVec3Tfloat_t, - _swigc__p_VecMat__HVec3Tint_t, - _swigc__p_VecMat__HVec3Tunsigned_int_t, - _swigc__p_VecMat__SquareMatrixTdouble_2_t, - _swigc__p_VecMat__SquareMatrixTdouble_3_t, - _swigc__p_VecMat__SquareMatrixTdouble_4_t, - _swigc__p_VecMat__SquareMatrixTfloat_2_t, - _swigc__p_VecMat__SquareMatrixTfloat_3_t, - _swigc__p_VecMat__SquareMatrixTfloat_4_t, - _swigc__p_VecMat__SquareMatrixTint_2_t, - _swigc__p_VecMat__SquareMatrixTint_3_t, - _swigc__p_VecMat__SquareMatrixTint_4_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_2_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_3_t, - _swigc__p_VecMat__SquareMatrixTunsigned_int_4_t, - _swigc__p_VecMat__Vec2Tdouble_t, - _swigc__p_VecMat__Vec2Tfloat_t, - _swigc__p_VecMat__Vec2Tint_t, - _swigc__p_VecMat__Vec2Tunsigned_int_t, - _swigc__p_VecMat__Vec3Tdouble_t, - _swigc__p_VecMat__Vec3Tfloat_t, - _swigc__p_VecMat__Vec3Tint_t, - _swigc__p_VecMat__Vec3Tunsigned_int_t, - _swigc__p_VecMat__VecTdouble_2_t, - _swigc__p_VecMat__VecTdouble_3_t, - _swigc__p_VecMat__VecTfloat_2_t, - _swigc__p_VecMat__VecTfloat_3_t, - _swigc__p_VecMat__VecTint_2_t, - _swigc__p_VecMat__VecTint_3_t, - _swigc__p_VecMat__VecTunsigned_int_2_t, - _swigc__p_VecMat__VecTunsigned_int_3_t, + _swigc__p_VecMat__HVec3T_double_t, + _swigc__p_VecMat__HVec3T_float_t, + _swigc__p_VecMat__HVec3T_int_t, + _swigc__p_VecMat__HVec3T_unsigned_int_t, + _swigc__p_VecMat__SquareMatrixT_double_2_t, + _swigc__p_VecMat__SquareMatrixT_double_3_t, + _swigc__p_VecMat__SquareMatrixT_double_4_t, + _swigc__p_VecMat__SquareMatrixT_float_2_t, + _swigc__p_VecMat__SquareMatrixT_float_3_t, + _swigc__p_VecMat__SquareMatrixT_float_4_t, + _swigc__p_VecMat__SquareMatrixT_int_2_t, + _swigc__p_VecMat__SquareMatrixT_int_3_t, + _swigc__p_VecMat__SquareMatrixT_int_4_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_2_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_3_t, + _swigc__p_VecMat__SquareMatrixT_unsigned_int_4_t, + _swigc__p_VecMat__Vec2T_double_t, + _swigc__p_VecMat__Vec2T_float_t, + _swigc__p_VecMat__Vec2T_int_t, + _swigc__p_VecMat__Vec2T_unsigned_int_t, + _swigc__p_VecMat__Vec3T_double_t, + _swigc__p_VecMat__Vec3T_float_t, + _swigc__p_VecMat__Vec3T_int_t, + _swigc__p_VecMat__Vec3T_unsigned_int_t, + _swigc__p_VecMat__VecT_double_2_t, + _swigc__p_VecMat__VecT_double_3_t, + _swigc__p_VecMat__VecT_float_2_t, + _swigc__p_VecMat__VecT_float_3_t, + _swigc__p_VecMat__VecT_int_2_t, + _swigc__p_VecMat__VecT_int_3_t, + _swigc__p_VecMat__VecT_unsigned_int_2_t, + _swigc__p_VecMat__VecT_unsigned_int_3_t, _swigc__p_Vertex, _swigc__p_ViewEdge, _swigc__p_ViewEdgeInternal__SVertexIterator, @@ -111293,8 +110171,8 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_ViewMap, _swigc__p_ViewShape, _swigc__p_ViewVertex, - _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_const_traits_t, - _swigc__p_ViewVertexInternal__edge_iterator_baseTViewVertexInternal__edge_nonconst_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_const_traits_t, + _swigc__p_ViewVertexInternal__edge_iterator_baseT_ViewVertexInternal__edge_nonconst_traits_t, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edge_pointers_container__iterator, _swigc__p_ViewVertexInternal__orientedViewEdgeIterator__edges_container__iterator, @@ -111324,30 +110202,30 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_point_iterator, _swigc__p_point_type, _swigc__p_reference, - _swigc__p_setTVecMat__Vec3Tdouble_t_t, + _swigc__p_setT_VecMat__Vec3T_double_t_t, _swigc__p_size_type, _swigc__p_std__invalid_argument, - _swigc__p_std__mapTint_int_std__lessTint_t_std__allocatorTstd__pairTint_const_int_t_t_t, - _swigc__p_std__pairTViewEdge_p_bool_t, - _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t, - _swigc__p_std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__allocator_type, - _swigc__p_std__vectorTMaterial_std__allocatorTMaterial_t_t, - _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t, - _swigc__p_std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__allocator_type, - _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t, - _swigc__p_std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__allocator_type, - _swigc__p_std__vectorTTVertex_p_std__allocatorTTVertex_p_t_t, - _swigc__p_std__vectorTVecMat__Vec2Tdouble_t_std__allocatorTVecMat__Vec2Tdouble_t_t_t, - _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t, - _swigc__p_std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__allocator_type, - _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t, - _swigc__p_std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__allocator_type, - _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t, - _swigc__p_std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__allocator_type, - _swigc__p_std__vectorTint_std__allocatorTint_t_t, - _swigc__p_std__vectorTint_std__allocatorTint_t_t__allocator_type, - _swigc__p_std__vectorTstd__pairTViewEdge_p_bool_t_std__allocatorTstd__pairTViewEdge_p_bool_t_t_t, - _swigc__p_std__vectorTunsigned_int_std__allocatorTunsigned_int_t_t, + _swigc__p_std__mapT_int_int_std__lessT_int_t_std__allocatorT_std__pairT_int_const_int_t_t_t, + _swigc__p_std__pairT_ViewEdge_p_bool_t, + _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t, + _swigc__p_std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__allocator_type, + _swigc__p_std__vectorT_Material_std__allocatorT_Material_t_t, + _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t, + _swigc__p_std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__allocator_type, + _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t, + _swigc__p_std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__allocator_type, + _swigc__p_std__vectorT_TVertex_p_std__allocatorT_TVertex_p_t_t, + _swigc__p_std__vectorT_VecMat__Vec2T_double_t_std__allocatorT_VecMat__Vec2T_double_t_t_t, + _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t, + _swigc__p_std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__allocator_type, + _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t, + _swigc__p_std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__allocator_type, + _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t, + _swigc__p_std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__allocator_type, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t, + _swigc__p_std__vectorT_int_std__allocatorT_int_t_t__allocator_type, + _swigc__p_std__vectorT_std__pairT_ViewEdge_p_bool_t_std__allocatorT_std__pairT_ViewEdge_p_bool_t_t_t, + _swigc__p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t, _swigc__p_svertices_container, _swigc__p_swig__PySwigIterator, _swigc__p_unsigned_int, @@ -111361,12 +110239,12 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_viewshapes_container, _swigc__p_viewvertices_container, _swigc__p_void, - _swigc__std__vectorTFEdge_p_std__allocatorTFEdge_p_t_t__value_type, - _swigc__std__vectorTSVertex_p_std__allocatorTSVertex_p_t_t__value_type, - _swigc__std__vectorTStrokeShader_p_std__allocatorTStrokeShader_p_t_t__value_type, - _swigc__std__vectorTViewEdge_p_std__allocatorTViewEdge_p_t_t__value_type, - _swigc__std__vectorTViewShape_p_std__allocatorTViewShape_p_t_t__value_type, - _swigc__std__vectorTViewVertex_p_std__allocatorTViewVertex_p_t_t__value_type, + _swigc__std__vectorT_FEdge_p_std__allocatorT_FEdge_p_t_t__value_type, + _swigc__std__vectorT_SVertex_p_std__allocatorT_SVertex_p_t_t__value_type, + _swigc__std__vectorT_StrokeShader_p_std__allocatorT_StrokeShader_p_t_t__value_type, + _swigc__std__vectorT_ViewEdge_p_std__allocatorT_ViewEdge_p_t_t__value_type, + _swigc__std__vectorT_ViewShape_p_std__allocatorT_ViewShape_p_t_t__value_type, + _swigc__std__vectorT_ViewVertex_p_std__allocatorT_ViewVertex_p_t_t__value_type, }; @@ -111435,7 +110313,7 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; - int found; + int found, init; clientdata = clientdata; @@ -111445,6 +110323,9 @@ SWIG_InitializeModule(void *clientdata) { swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; swig_module.next = &swig_module; + init = 1; + } else { + init = 0; } /* Try and load any already created modules */ @@ -111473,6 +110354,12 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); @@ -111889,19 +110776,19 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "_Noise_B_",SWIG_From_int(static_cast< int >(0x100))); PyDict_SetItemString(d,(char*)"cvar", SWIG_globals()); - SWIG_addvarlink(SWIG_globals(),(char*)"POINT",POINT_get, POINT_set); - SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",S_VERTEX_get, S_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",VIEW_VERTEX_get, VIEW_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",NON_T_VERTEX_get, NON_T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",T_VERTEX_get, T_VERTEX_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",CUSP_get, CUSP_set); - SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",NO_FEATURE_get, NO_FEATURE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",SILHOUETTE_get, SILHOUETTE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",BORDER_get, BORDER_set); - SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",CREASE_get, CREASE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",RIDGE_get, RIDGE_set); - SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",VALLEY_get, VALLEY_set); - SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",SUGGESTIVE_CONTOUR_get, SUGGESTIVE_CONTOUR_set); + SWIG_addvarlink(SWIG_globals(),(char*)"POINT",Swig_var_POINT_get, Swig_var_POINT_set); + SWIG_addvarlink(SWIG_globals(),(char*)"S_VERTEX",Swig_var_S_VERTEX_get, Swig_var_S_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VIEW_VERTEX",Swig_var_VIEW_VERTEX_get, Swig_var_VIEW_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NON_T_VERTEX",Swig_var_NON_T_VERTEX_get, Swig_var_NON_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"T_VERTEX",Swig_var_T_VERTEX_get, Swig_var_T_VERTEX_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CUSP",Swig_var_CUSP_get, Swig_var_CUSP_set); + SWIG_addvarlink(SWIG_globals(),(char*)"NO_FEATURE",Swig_var_NO_FEATURE_get, Swig_var_NO_FEATURE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SILHOUETTE",Swig_var_SILHOUETTE_get, Swig_var_SILHOUETTE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"BORDER",Swig_var_BORDER_get, Swig_var_BORDER_set); + SWIG_addvarlink(SWIG_globals(),(char*)"CREASE",Swig_var_CREASE_get, Swig_var_CREASE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"RIDGE",Swig_var_RIDGE_get, Swig_var_RIDGE_set); + SWIG_addvarlink(SWIG_globals(),(char*)"VALLEY",Swig_var_VALLEY_get, Swig_var_VALLEY_set); + SWIG_addvarlink(SWIG_globals(),(char*)"SUGGESTIVE_CONTOUR",Swig_var_SUGGESTIVE_CONTOUR_get, Swig_var_SUGGESTIVE_CONTOUR_set); SWIG_Python_SetConstant(d, "MEAN",SWIG_From_int(static_cast< int >(MEAN))); SWIG_Python_SetConstant(d, "MIN",SWIG_From_int(static_cast< int >(MIN))); SWIG_Python_SetConstant(d, "MAX",SWIG_From_int(static_cast< int >(MAX))); diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.h b/source/blender/freestyle/intern/swig/ModuleWrapper.h index 06ca8c90f37..f24a77d53b2 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.h +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.31 + * Version 1.3.35 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -73,7 +73,7 @@ private: }; -class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVoid : public UnaryFunction0D< void >, public Swig::Director { public: SwigDirector_UnaryFunction0DVoid(PyObject *self); @@ -119,7 +119,7 @@ private: }; -class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DUnsigned : public UnaryFunction0D< unsigned int >, public Swig::Director { public: SwigDirector_UnaryFunction0DUnsigned(PyObject *self); @@ -165,7 +165,7 @@ private: }; -class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DFloat : public UnaryFunction0D< float >, public Swig::Director { public: SwigDirector_UnaryFunction0DFloat(PyObject *self); @@ -211,7 +211,7 @@ private: }; -class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DDouble : public UnaryFunction0D< double >, public Swig::Director { public: SwigDirector_UnaryFunction0DDouble(PyObject *self); @@ -257,13 +257,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVec2f : public UnaryFunction0D< Geometry::Vec2f >, public Swig::Director { public: SwigDirector_UnaryFunction0DVec2f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2 operator ()(Interface0DIterator &iter); + virtual VecMat::Vec2< float > operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -303,13 +303,13 @@ private: }; -class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DVec3f : public UnaryFunction0D< Geometry::Vec3f >, public Swig::Director { public: SwigDirector_UnaryFunction0DVec3f(PyObject *self); virtual ~SwigDirector_UnaryFunction0DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3 operator ()(Interface0DIterator &iter); + virtual VecMat::Vec3< float > operator ()(Interface0DIterator &iter); /* Internal Director utilities */ @@ -349,7 +349,7 @@ private: }; -class SwigDirector_UnaryFunction0DId : public UnaryFunction0D, public Swig::Director { +class SwigDirector_UnaryFunction0DId : public UnaryFunction0D< Id >, public Swig::Director { public: SwigDirector_UnaryFunction0DId(PyObject *self); @@ -395,7 +395,7 @@ private: }; -class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVoid : public UnaryFunction1D< void >, public Swig::Director { public: SwigDirector_UnaryFunction1DVoid(PyObject *self); @@ -442,7 +442,7 @@ private: }; -class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DUnsigned : public UnaryFunction1D< unsigned int >, public Swig::Director { public: SwigDirector_UnaryFunction1DUnsigned(PyObject *self); @@ -489,7 +489,7 @@ private: }; -class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DFloat : public UnaryFunction1D< float >, public Swig::Director { public: SwigDirector_UnaryFunction1DFloat(PyObject *self); @@ -536,7 +536,7 @@ private: }; -class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DDouble : public UnaryFunction1D< double >, public Swig::Director { public: SwigDirector_UnaryFunction1DDouble(PyObject *self); @@ -583,14 +583,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVec2f : public UnaryFunction1D< Geometry::Vec2f >, public Swig::Director { public: SwigDirector_UnaryFunction1DVec2f(PyObject *self); SwigDirector_UnaryFunction1DVec2f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec2f(); virtual std::string getName() const; - virtual VecMat::Vec2 operator ()(Interface1D &inter); + virtual VecMat::Vec2< float > operator ()(Interface1D &inter); /* Internal Director utilities */ @@ -630,14 +630,14 @@ private: }; -class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D, public Swig::Director { +class SwigDirector_UnaryFunction1DVec3f : public UnaryFunction1D< Geometry::Vec3f >, public Swig::Director { public: SwigDirector_UnaryFunction1DVec3f(PyObject *self); SwigDirector_UnaryFunction1DVec3f(PyObject *self, IntegrationType iType); virtual ~SwigDirector_UnaryFunction1DVec3f(); virtual std::string getName() const; - virtual VecMat::Vec3 operator ()(Interface1D &inter); + virtual VecMat::Vec3< float > operator ()(Interface1D &inter); /* Internal Director utilities */ diff --git a/source/blender/freestyle/intern/system/Iterator.cpp b/source/blender/freestyle/intern/system/Iterator.cpp new file mode 100644 index 00000000000..b3b0de9563d --- /dev/null +++ b/source/blender/freestyle/intern/system/Iterator.cpp @@ -0,0 +1 @@ +#include "Iterator.h" \ No newline at end of file diff --git a/source/blender/freestyle/intern/system/Iterator.h b/source/blender/freestyle/intern/system/Iterator.h new file mode 100644 index 00000000000..10862d7c8da --- /dev/null +++ b/source/blender/freestyle/intern/system/Iterator.h @@ -0,0 +1,38 @@ +#ifndef ITERATOR_H +#define ITERATOR_H + +#include +#include +using namespace std; + +class Iterator +{ +public: + + virtual ~Iterator() {} + + virtual string getExactTypeName() const { + return "Iterator"; + } + + virtual void increment() { + cerr << "Warning: method increment() not implemented" << endl; + } + + virtual void decrement() { + cerr << "Warning: method decrement() not implemented" << endl; + } + + virtual bool isBegin() const { + cerr << "Warning: method isBegin() not implemented" << endl; + return false; + } + + virtual bool isEnd() const { + cerr << "Warning: method isEnd() not implemented" << endl; + return false; + } + +}; + +#endif // ITERATOR_H \ No newline at end of file diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h index fd2e882e9b6..40027e13d80 100755 --- a/source/blender/freestyle/intern/view_map/Interface0D.h +++ b/source/blender/freestyle/intern/view_map/Interface0D.h @@ -38,6 +38,9 @@ # include "../geometry/Geom.h" using namespace std; +#include "../system/Iterator.h" //soc + + // // Interface0D // @@ -160,7 +163,7 @@ public: // ////////////////////////////////////////////////// -class Interface0DIteratorNested +class Interface0DIteratorNested : Iterator { public: diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h index bb2d916f2df..31abefbfb97 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h +++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h @@ -32,7 +32,7 @@ # define VIEWMAPADVANCEDITERATORS_H #include "ViewMap.h" - +#include "../system/Iterator.h" //soc /**********************************/ /* */ diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h index 004674ba758..25da503af66 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h +++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h @@ -32,6 +32,8 @@ # define VIEWMAPITERATORS_H #include "ViewMap.h" +#include "../system/Iterator.h" //soc + /**********************************/ /* */ @@ -57,7 +59,7 @@ namespace ViewVertexInternal{ * An instance of an orientedViewEdgeIterator can only * be obtained from a ViewVertex by calling edgesBegin() or edgesEnd(). */ - class orientedViewEdgeIterator + class orientedViewEdgeIterator : Iterator { public: friend class ViewVertex; @@ -204,7 +206,7 @@ namespace ViewVertexInternal{ public: /*! increments.*/ - inline void increment() + virtual inline void increment() { if(_Nature & Nature::T_VERTEX) { @@ -336,11 +338,11 @@ namespace ViewEdgeInternal { _previous_edge = _previous_edge->previousEdge(); } - bool isBegin() const { + virtual bool isBegin() const { return _vertex == _begin; } - bool isEnd() const { + virtual bool isEnd() const { return (!_vertex) || (_vertex == _begin && _previous_edge); } @@ -385,7 +387,7 @@ namespace ViewEdgeInternal { * ::Caution::: the dereferencing operator returns a *pointer* to * the pointed ViewEdge. */ -class ViewEdgeIterator +class ViewEdgeIterator : Iterator { public: diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index e4b81a7d071..156eac8d26e 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.31 +# Version 1.3.35 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. @@ -60,7 +60,7 @@ class PySwigIterator(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_PySwigIterator __del__ = lambda self : None; @@ -718,7 +718,7 @@ class Interface0DIteratorNested(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIteratorNested, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIteratorNested, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_destroy__ = _Freestyle.delete_Interface0DIteratorNested __del__ = lambda self : None; @@ -1437,7 +1437,7 @@ class ViewVertex(Interface0D): __swig_getmethods__ = {} for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, ViewVertex, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr def getExactTypeName(*args): return _Freestyle.ViewVertex_getExactTypeName(*args) __swig_setmethods__["userdata"] = _Freestyle.ViewVertex_userdata_set @@ -4834,7 +4834,7 @@ class Operators(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Operators, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Operators, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["select"] = lambda x: _Freestyle.Operators_select if _newclass:select = staticmethod(_Freestyle.Operators_select) @@ -4901,7 +4901,7 @@ class Canvas(_object): __setattr__ = lambda self, name, value: _swig_setattr(self, Canvas, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Canvas, name) - def __init__(self): raise AttributeError, "No constructor defined" + def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" __repr__ = _swig_repr __swig_getmethods__["getInstance"] = lambda x: _Freestyle.Canvas_getInstance if _newclass:getInstance = staticmethod(_Freestyle.Canvas_getInstance) From dd899939dabae68564f7a1d1994b50ee2f2cf8be Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 04:48:34 +0000 Subject: [PATCH 402/430] soc-2008-mxcurioni: Added first batch of Iterators: AdjacencyIterator, Interface0DIterator, CurvePointIterator, StrokeVertexIterator, SVertexIterator, orientedViewEdgeIterator. --- .../freestyle/intern/python/BPy_Convert.cpp | 3 + .../freestyle/intern/python/BPy_Convert.h | 1 + .../intern/python/BPy_CurvePointIterator.cpp | 284 ------------------ .../intern/python/BPy_Interface0DIterator.cpp | 104 ------- .../freestyle/intern/python/BPy_Iterator.cpp | 47 ++- .../python/BPy_StrokeVertexIterator.cpp | 260 ---------------- .../python/Interface0D/BPy_ViewVertex.h | 1 + .../intern/python/Interface1D/BPy_Stroke.cpp | 2 +- .../python/Iterator/BPy_AdjacencyIterator.cpp | 142 +++++++++ .../python/Iterator/BPy_AdjacencyIterator.h | 32 ++ .../BPy_ChainingIterator.cpp} | 0 .../BPy_ChainingPredicateIterator.cpp} | 0 .../BPy_ChainingSilhouetteIterator.cpp | 0 .../Iterator/BPy_CurvePointIterator.cpp | 162 ++++++++++ .../python/Iterator/BPy_CurvePointIterator.h | 33 ++ .../Iterator/BPy_Interface0DIterator.cpp | 139 +++++++++ .../python/Iterator/BPy_Interface0DIterator.h | 32 ++ .../python/Iterator/BPy_SVertexIterator.cpp | 162 ++++++++++ .../python/Iterator/BPy_SVertexIterator.h | 34 +++ .../Iterator/BPy_StrokeVertexIterator.cpp | 158 ++++++++++ .../Iterator/BPy_StrokeVertexIterator.h | 33 ++ .../python/Iterator/BPy_ViewEdgeIterator.cpp | 150 +++++++++ .../python/Iterator/BPy_ViewEdgeIterator.h | 34 +++ .../Iterator/BPy_orientedViewEdgeIterator.cpp | 130 ++++++++ .../Iterator/BPy_orientedViewEdgeIterator.h | 34 +++ .../ViewEdgeIterator/BPy_ChainingIterator.cpp | 36 --- .../BPy_ChainPredicateIterator.cpp | 12 - .../BPy_ChainSilhouetteIterator.cpp | 16 - 28 files changed, 1326 insertions(+), 715 deletions(-) delete mode 100644 source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp delete mode 100644 source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp delete mode 100644 source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h rename source/blender/freestyle/intern/python/{BPy_ViewEdgeIterator.cpp => Iterator/BPy_ChainingIterator.cpp} (100%) rename source/blender/freestyle/intern/python/{BPy_orientedViewEdgeIterator.cpp => Iterator/BPy_ChainingPredicateIterator.cpp} (100%) create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h delete mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp delete mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp delete mode 100644 source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 843bdc7c7d1..89fa677aac0 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -12,6 +12,9 @@ PyObject * PyBool_from_bool( bool b ){ return PyBool_FromLong( b ? 1 : 0); } +bool bool_from_PyBool( PyObject *b ) { + return b == Py_True; +} PyObject * Vector_from_Vec2f( Vec2f& vec ) { float vec_data[2]; // because vec->_coord is protected diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 8e935f6e229..16f991e0e51 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -25,6 +25,7 @@ extern "C" { #include "api2_2x/gen_utils.h" PyObject * PyBool_from_bool( bool b ); +bool bool_from_PyBool( PyObject *b ); PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); diff --git a/source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp deleted file mode 100644 index 57dc86ea5e4..00000000000 --- a/source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp +++ /dev/null @@ -1,284 +0,0 @@ - PyObject *_wrap_CurvePointIterator__CurvilinearLength_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__CurvilinearLength_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__step_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__step_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___A_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___A_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___B_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___B_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__begin_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__begin_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__end_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__end_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__n_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__n_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__currentn_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__currentn_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__t_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__t_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__Point_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__Point_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__CurveLength_set(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator__CurveLength_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePointIterator__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePointIterator__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePointIterator__SWIG_2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_CurvePointIterator(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_CurvePointIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_copy(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___eq__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getObject(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator___deref__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_isBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_isEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getPoint3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getProjectedX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getProjectedY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getProjectedZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getPoint2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_castToSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_castToViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_castToNonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_castToTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_A(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_B(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_t2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_SetA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_SetB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_SetT2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_fedge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_point2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_point3d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_normal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occluders_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occluders_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occluders_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occluders_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occludee(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occluded_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_occludee_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_z_discontinuity(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_curvatureFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_CurvePointIterator_directionFredo(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp deleted file mode 100644 index 48b7560acea..00000000000 --- a/source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp +++ /dev/null @@ -1,104 +0,0 @@ - PyObject *_wrap_Interface0DIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getObject(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator___deref__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_increment(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_decrement(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_isBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_isEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator___eq__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator___ne__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_t(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_u(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getPoint3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getProjectedX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getProjectedY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getProjectedZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getPoint2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_castToSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_castToViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_castToNonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Interface0DIterator_castToTVertex(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index aebf5e45630..6a613c5f5ab 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -1,7 +1,15 @@ #include "BPy_Iterator.h" #include "BPy_Convert.h" +#include "Iterator/BPy_AdjacencyIterator.h" +#include "Iterator/BPy_Interface0DIterator.h" +#include "Iterator/BPy_CurvePointIterator.h" +#include "Iterator/BPy_StrokeVertexIterator.h" +#include "Iterator/BPy_SVertexIterator.h" +#include "Iterator/BPy_orientedViewEdgeIterator.h" +#include "Iterator/BPy_ViewEdgeIterator.h" + #ifdef __cplusplus extern "C" { #endif @@ -115,8 +123,7 @@ PyTypeObject Iterator_Type = { //-------------------MODULE INITIALIZATION-------------------------------- PyMODINIT_FUNC Iterator_Init( PyObject *module ) -{ - +{ if( module == NULL ) return; @@ -124,6 +131,42 @@ PyMODINIT_FUNC Iterator_Init( PyObject *module ) return; Py_INCREF( &Iterator_Type ); PyModule_AddObject(module, "Iterator", (PyObject *)&Iterator_Type); + + if( PyType_Ready( &AdjacencyIterator_Type ) < 0 ) + return; + Py_INCREF( &AdjacencyIterator_Type ); + PyModule_AddObject(module, "AdjacencyIterator", (PyObject *)&AdjacencyIterator_Type); + + if( PyType_Ready( &Interface0DIterator_Type ) < 0 ) + return; + Py_INCREF( &Interface0DIterator_Type ); + PyModule_AddObject(module, "Interface0DIterator", (PyObject *)&Interface0DIterator_Type); + + if( PyType_Ready( &CurvePointIterator_Type ) < 0 ) + return; + Py_INCREF( &CurvePointIterator_Type ); + PyModule_AddObject(module, "CurvePointIterator", (PyObject *)&CurvePointIterator_Type); + + if( PyType_Ready( &StrokeVertexIterator_Type ) < 0 ) + return; + Py_INCREF( &StrokeVertexIterator_Type ); + PyModule_AddObject(module, "StrokeVertexIterator", (PyObject *)&StrokeVertexIterator_Type); + + if( PyType_Ready( &SVertexIterator_Type ) < 0 ) + return; + Py_INCREF( &SVertexIterator_Type ); + PyModule_AddObject(module, "SVertexIterator", (PyObject *)&SVertexIterator_Type); + + if( PyType_Ready( &orientedViewEdgeIterator_Type ) < 0 ) + return; + Py_INCREF( &orientedViewEdgeIterator_Type ); + PyModule_AddObject(module, "orientedViewEdgeIterator", (PyObject *)&orientedViewEdgeIterator_Type); + + if( PyType_Ready( &ViewEdgeIterator_Type ) < 0 ) + return; + Py_INCREF( &ViewEdgeIterator_Type ); + PyModule_AddObject(module, "ViewEdgeIterator", (PyObject *)&ViewEdgeIterator_Type); + } diff --git a/source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp deleted file mode 100644 index 3fae5a34060..00000000000 --- a/source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp +++ /dev/null @@ -1,260 +0,0 @@ - PyObject *_wrap_StrokeVertexIterator_castToInterface0DIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getObject(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator___deref__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_increment(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_decrement(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_isBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_isEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator___eq__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_t(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_u(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_copy(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getIt(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_x(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_y(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getPoint(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_attribute__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_attribute(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_curvilinearAbscissa(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_strokeLength(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetPoint__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetPoint(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetAttribute(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetCurvilinearAbscissa(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetStrokeLength(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getPoint3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getProjectedX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getProjectedY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getProjectedZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getPoint2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_getNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_castToSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_castToViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_castToNonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_castToTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_A(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_B(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_t2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_SetT2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_fedge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_point2d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_point3d(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_normal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occluders_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occluders_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occluders_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occluders_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occludee(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occluded_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_occludee_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_z_discontinuity(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_curvatureFredo(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_StrokeVertexIterator_directionFredo(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index b70a69c95e7..841040af180 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -20,6 +20,7 @@ extern PyTypeObject ViewVertex_Type; /*---------------------------Python BPy_ViewVertex structure definition----------*/ typedef struct { BPy_Interface0D py_if0D; + ViewVertex *vv; } BPy_ViewVertex; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 8027f625cc5..7574c8d7fc1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -282,7 +282,7 @@ PyObject *Stroke_setTips( BPy_Stroke *self , PyObject *args) { Py_RETURN_NONE; } - self->s->setTips( py_b == Py_True ); + self->s->setTips( bool_from_PyBool(py_b) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp new file mode 100644 index 00000000000..cc7ce17f4cf --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -0,0 +1,142 @@ +#include "BPy_AdjacencyIterator.h" + +#include "../BPy_Convert.h" +#include "../Interface0D/BPy_ViewVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for AdjacencyIterator instance -----------*/ +static int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args); + +/*----------------------AdjacencyIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_AdjacencyIterator_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_AdjacencyIterator type definition ------------------------------*/ + +PyTypeObject AdjacencyIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "AdjacencyIterator", /* tp_name */ + sizeof( BPy_AdjacencyIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_AdjacencyIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)AdjacencyIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0; + + if (! PyArg_ParseTuple(args, "|OOO", &obj1, &obj2, &obj3) ) + return -1; + + if( !obj1 && !obj2 && !obj3 ){ + self->ai = new AdjacencyIterator(); + + } else if( BPy_AdjacencyIterator_Check(obj1) ) { + self->ai = new AdjacencyIterator(*( ((BPy_AdjacencyIterator *) obj1)->ai )); + + } else if( BPy_ViewVertex_Check(obj1) ) { + bool restrictToSelection = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; + bool restrictToUnvisited = ( obj3 && PyBool_Check(obj3) ) ? bool_from_PyBool(obj3) : true; + + self->ai = new AdjacencyIterator( ((BPy_ViewVertex *) obj1)->vv, restrictToSelection, restrictToUnvisited ); + + } else { + return -1; + } + + self->py_it.it = self->ai; + return 0; + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h new file mode 100644 index 00000000000..91319ff9c92 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_ADJACENCYITERATOR_H +#define FREESTYLE_PYTHON_ADJACENCYITERATOR_H + +#include "../../stroke/ChainingIterators.h" +#include "../BPy_Iterator.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject AdjacencyIterator_Type; + +#define BPy_AdjacencyIterator_Check(v) (( (PyObject *) v)->ob_type == &AdjacencyIterator_Type) + +/*---------------------------Python BPy_AdjacencyIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + AdjacencyIterator *ai; +} BPy_AdjacencyIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ADJACENCYITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BPy_ViewEdgeIterator.cpp rename to source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp diff --git a/source/blender/freestyle/intern/python/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BPy_orientedViewEdgeIterator.cpp rename to source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp new file mode 100644 index 00000000000..b1b33b347bc --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -0,0 +1,162 @@ +#include "BPy_CurvePointIterator.h" + +#include "../BPy_Convert.h" +#include "BPy_Interface0DIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for CurvePointIterator instance -----------*/ +static int CurvePointIterator___init__(BPy_CurvePointIterator *self, PyObject *args); +static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ); +static PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ); +static PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ); + + +/*----------------------CurvePointIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_CurvePointIterator_methods[] = { + {"t", ( PyCFunction ) CurvePointIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, + {"u", ( PyCFunction ) CurvePointIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {"castToInterface0DIterator", ( PyCFunction ) CurvePointIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this CurvePointIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_CurvePointIterator type definition ------------------------------*/ + +PyTypeObject CurvePointIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "CurvePointIterator", /* tp_name */ + sizeof( BPy_CurvePointIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_CurvePointIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)CurvePointIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int CurvePointIterator___init__(BPy_CurvePointIterator *self, PyObject *args ) +{ + PyObject *obj = 0; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ){ + self->cp_it = new CurvePointIterator(); + + } else if( BPy_CurvePointIterator_Check(obj) ) { + self->cp_it = new CurvePointIterator(*( ((BPy_CurvePointIterator *) obj)->cp_it )); + + } else if( PyFloat_Check(obj) ) { + self->cp_it = new CurvePointIterator( PyFloat_AsDouble(obj) ); + + } else { + return -1; + } + + self->py_it.it = self->cp_it; + + return 0; +} + +PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) { + return PyFloat_FromDouble( self->cp_it->t() ); +} + +PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ) { + return PyFloat_FromDouble( self->cp_it->u() ); +} + +PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ) { + PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); + ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->cp_it->castToInterface0DIterator() ); + + return py_if0D_it; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h new file mode 100644 index 00000000000..652f6fffb97 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_CURVEPOINTITERATOR_H +#define FREESTYLE_PYTHON_CURVEPOINTITERATOR_H + +#include "../../stroke/CurveIterators.h" +using namespace CurveInternal; + +#include "../BPy_Iterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject CurvePointIterator_Type; + +#define BPy_CurvePointIterator_Check(v) (( (PyObject *) v)->ob_type == &CurvePointIterator_Type) + +/*---------------------------Python BPy_CurvePointIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + CurvePointIterator *cp_it; +} BPy_CurvePointIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVEPOINTITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp new file mode 100644 index 00000000000..b2b6d67aa0f --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -0,0 +1,139 @@ +#include "BPy_Interface0DIterator.h" + +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Interface0DIterator instance -----------*/ +static int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args); + +static PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self ); +static PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ); + +/*----------------------Interface0DIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_Interface0DIterator_methods[] = { + {"t", ( PyCFunction ) Interface0DIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, + {"u", ( PyCFunction ) Interface0DIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Interface0DIterator type definition ------------------------------*/ + +PyTypeObject Interface0DIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Interface0DIterator", /* tp_name */ + sizeof( BPy_Interface0DIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Interface0DIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Interface0DIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args ) +{ + PyObject *obj = 0; + + if (!( PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) )) + return -1; + + self->if0D_it = new Interface0DIterator(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + self->py_it.it = self->if0D_it; + return 0; + +} + +PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self ) { + return PyFloat_FromDouble( self->if0D_it->t() ); +} + +PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ) { + return PyFloat_FromDouble( self->if0D_it->u() ); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h new file mode 100644 index 00000000000..16edb2c3d68 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_INTERFACE0DITERATOR_H +#define FREESTYLE_PYTHON_INTERFACE0DITERATOR_H + +#include "../../view_map/Interface0D.h" +#include "../BPy_Iterator.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Interface0DIterator_Type; + +#define BPy_Interface0DIterator_Check(v) (( (PyObject *) v)->ob_type == &Interface0DIterator_Type) + +/*---------------------------Python BPy_Interface0DIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + Interface0DIterator *if0D_it; +} BPy_Interface0DIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_INTERFACE0DITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp new file mode 100644 index 00000000000..da8b1453102 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -0,0 +1,162 @@ +#include "BPy_SVertexIterator.h" + +#include "../BPy_Convert.h" +#include "../Interface0D/BPy_SVertex.h" +#include "../Interface1D/BPy_FEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SVertexIterator instance -----------*/ +static int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args); + +static PyObject * SVertexIterator_t( BPy_SVertexIterator *self ); +static PyObject * SVertexIterator_u( BPy_SVertexIterator *self ); + +/*----------------------SVertexIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_SVertexIterator_methods[] = { + {"t", ( PyCFunction ) SVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, + {"u", ( PyCFunction ) SVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_SVertexIterator type definition ------------------------------*/ + +PyTypeObject SVertexIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SVertexIterator", /* tp_name */ + sizeof( BPy_SVertexIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_SVertexIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SVertexIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0; + float f; + + if (! PyArg_ParseTuple(args, "|OOOOf", &obj1, &obj2, &obj3, &obj4, f) ) + return -1; + + if( !obj1 ){ + self->sv_it = new SVertexIterator(); + + } else if( BPy_SVertexIterator_Check(obj1) ) { + self->sv_it = new SVertexIterator(*( ((BPy_SVertexIterator *) obj1)->sv_it )); + + } else if( obj1 && BPy_SVertex_Check(obj1) && + obj2 && BPy_SVertex_Check(obj2) && + obj3 && BPy_FEdge_Check(obj3) && + obj4 && BPy_FEdge_Check(obj4) ) { + + self->sv_it = new SVertexIterator( ((BPy_SVertex *) obj1)->sv, + ((BPy_SVertex *) obj2)->sv, + ((BPy_FEdge *) obj3)->fe, + ((BPy_FEdge *) obj4)->fe, + f ); + + } else { + return -1; + } + + self->py_it.it = self->sv_it; + + return 0; +} + +PyObject * SVertexIterator_t( BPy_SVertexIterator *self ) { + return PyFloat_FromDouble( self->sv_it->t() ); +} + +PyObject * SVertexIterator_u( BPy_SVertexIterator *self ) { + return PyFloat_FromDouble( self->sv_it->u() ); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h new file mode 100644 index 00000000000..662685571eb --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_SVERTEXITERATOR_H +#define FREESTYLE_PYTHON_SVERTEXITERATOR_H + +#include "../../view_map/ViewMapIterators.h" +using namespace ViewEdgeInternal; + +#include "../BPy_Iterator.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SVertexIterator_Type; + +#define BPy_SVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &SVertexIterator_Type) + +/*---------------------------Python BPy_SVertexIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + SVertexIterator *sv_it; +} BPy_SVertexIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SVERTEXITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp new file mode 100644 index 00000000000..895aaee2323 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -0,0 +1,158 @@ +#include "BPy_StrokeVertexIterator.h" + +#include "../BPy_Convert.h" +#include "BPy_Interface0DIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for StrokeVertexIterator instance -----------*/ +static int StrokeVertexIterator___init__(BPy_StrokeVertexIterator *self, PyObject *args); +static PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self ); +static PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self ); +static PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self ); + +/*----------------------StrokeVertexIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_StrokeVertexIterator_methods[] = { + {"t", ( PyCFunction ) StrokeVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, + {"u", ( PyCFunction ) StrokeVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {"castToInterface0DIterator", ( PyCFunction ) StrokeVertexIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this StrokeVertexIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_StrokeVertexIterator type definition ------------------------------*/ + +PyTypeObject StrokeVertexIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "StrokeVertexIterator", /* tp_name */ + sizeof( BPy_StrokeVertexIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_StrokeVertexIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)StrokeVertexIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int StrokeVertexIterator___init__(BPy_StrokeVertexIterator *self, PyObject *args ) +{ + PyObject *obj = 0; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ){ + self->sv_it = new StrokeVertexIterator(); + + } else if( BPy_StrokeVertexIterator_Check(obj) ) { + self->sv_it = new StrokeVertexIterator(*( ((BPy_StrokeVertexIterator *) obj)->sv_it )); + + } else { + return -1; + } + + self->py_it.it = self->sv_it; + + return 0; +} + +PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self ) { + return PyFloat_FromDouble( self->sv_it->t() ); +} + +PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self ) { + return PyFloat_FromDouble( self->sv_it->u() ); +} + +PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self ) { + PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); + ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( self->sv_it->castToInterface0DIterator() ); + + return py_if0D_it; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h new file mode 100644 index 00000000000..8d9ffc56018 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H +#define FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H + +#include "../../stroke/StrokeIterators.h" +using namespace StrokeInternal; + +#include "../BPy_Iterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject StrokeVertexIterator_Type; + +#define BPy_StrokeVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertexIterator_Type) + +/*---------------------------Python BPy_StrokeVertexIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + StrokeVertexIterator *sv_it; +} BPy_StrokeVertexIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp new file mode 100644 index 00000000000..25ae25d52a9 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -0,0 +1,150 @@ +#include "BPy_ViewEdgeIterator.h" + +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewEdgeIterator instance -----------*/ +static int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args); + +/*----------------------ViewEdgeIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_ViewEdgeIterator_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ViewEdgeIterator type definition ------------------------------*/ + +PyTypeObject ViewEdgeIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewEdgeIterator", /* tp_name */ + sizeof( BPy_ViewEdgeIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ViewEdgeIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewEdgeIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0; + + if (!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) )) + return -1; + + if( obj1 && BPy_ViewEdgeIterator_Check(obj1) ) { + self->ve_it = new ViewEdgeIterator(*( ((BPy_ViewEdgeIterator *) obj1)->ve_it )); + + } else { + ViewEdge *begin = ( obj1 && BPy_ViewEdge_Check(obj1) ) ? ((BPy_ViewEdge *) obj1)->ve : 0; + bool orientation = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; + + self->ve_it = new ViewEdgeIterator( begin, orientation); + + } + + self->py_it.it = self->ve_it; + + return 0; +} + + + +// ViewEdge * getCurrentEdge () +// void setCurrentEdge (ViewEdge *edge) +// ViewEdge * getBegin () +// bool getOrientation () const + + + +// void setCurrentEdge (ViewEdge *edge) +// void setBegin (ViewEdge *begin) +// void setOrientation (bool orientation) +// void changeOrientation () + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h new file mode 100644 index 00000000000..35d2f3f255b --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_VIEWEDGEITERATOR_H +#define FREESTYLE_PYTHON_VIEWEDGEITERATOR_H + + +#include "../../view_map/ViewMapIterators.h" +using namespace ViewEdgeInternal; + +#include "../BPy_Iterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewEdgeIterator_Type; + +#define BPy_ViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &ViewEdgeIterator_Type) + +/*---------------------------Python BPy_ViewEdgeIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + ViewEdgeIterator *ve_it; +} BPy_ViewEdgeIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWEDGEITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp new file mode 100644 index 00000000000..9a32f384be9 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -0,0 +1,130 @@ +#include "BPy_orientedViewEdgeIterator.h" + +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for orientedViewEdgeIterator instance -----------*/ +static int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args); + +/*----------------------orientedViewEdgeIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_orientedViewEdgeIterator_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_orientedViewEdgeIterator type definition ------------------------------*/ + +PyTypeObject orientedViewEdgeIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "orientedViewEdgeIterator", /* tp_name */ + sizeof( BPy_orientedViewEdgeIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_orientedViewEdgeIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Iterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)orientedViewEdgeIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args ) +{ + PyObject *obj = 0; + + if (!( PyArg_ParseTuple(args, "|O", &obj) )) + return -1; + + if( !obj ) + self->ove_it = new orientedViewEdgeIterator(); + else if( BPy_orientedViewEdgeIterator_Check(obj) ) + self->ove_it = new orientedViewEdgeIterator(*( ((BPy_orientedViewEdgeIterator *) obj)->ove_it )); + + self->py_it.it = self->ove_it; + + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h new file mode 100644 index 00000000000..60754939220 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H +#define FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H + +#include "../../stroke/Stroke.h" +#include "../../view_map/ViewMapIterators.h" +using namespace ViewVertexInternal; + +#include "../BPy_Iterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject orientedViewEdgeIterator_Type; + +#define BPy_orientedViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &orientedViewEdgeIterator_Type) + +/*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/ +typedef struct { + BPy_Iterator py_it; + orientedViewEdgeIterator *ove_it; +} BPy_orientedViewEdgeIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ORIENTEDVIEWEDGEITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp deleted file mode 100644 index 18ab37aeecd..00000000000 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp +++ /dev/null @@ -1,36 +0,0 @@ - PyObject *_wrap_ChainingIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_init(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_traverse(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_getVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_isIncrementing(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_increment(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainingIterator_decrement(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ChainingIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_ChainingIterator(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp deleted file mode 100644 index 3b3b4433e59..00000000000 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_ChainPredicateIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainPredicateIterator_traverse(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_ChainPredicateIterator(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp deleted file mode 100644 index 53d37c1578c..00000000000 --- a/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_ChainSilhouetteIterator_getExactTypeName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ChainSilhouetteIterator_traverse(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ChainSilhouetteIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_ChainSilhouetteIterator(PyObject *self , PyObject *args) { -} - - From a0359c37506d05589bae86e4818fa653c8f281ab Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 08:29:48 +0000 Subject: [PATCH 403/430] soc-2008-mxcurioni: added (without testing) the following classes: BBox, SShape, ViewShape. Also corrected a few typos (Get#->get#). --- source/blender/freestyle/SConscript | 23 +- .../freestyle/intern/python/BPy_BBox.cpp | 142 +++++ .../freestyle/intern/python/BPy_BBox.h | 38 ++ .../freestyle/intern/python/BPy_Convert.cpp | 31 + .../freestyle/intern/python/BPy_Convert.h | 9 + .../freestyle/intern/python/BPy_Freestyle.cpp | 7 + .../intern/python/BPy_Interface1D.cpp | 6 + .../freestyle/intern/python/BPy_Material.h | 0 .../freestyle/intern/python/BPy_SShape.cpp | 377 ++++++++---- .../freestyle/intern/python/BPy_SShape.h | 34 ++ .../freestyle/intern/python/BPy_ViewShape.cpp | 325 +++++++++-- .../freestyle/intern/python/BPy_ViewShape.h | 34 ++ .../python/Interface0D/BPy_ViewVertex.h | 1 - .../python/Interface1D/BPy_ViewEdge.cpp | 535 ++++++++++-------- .../intern/python/Interface1D/BPy_ViewEdge.h | 32 ++ .../Iterator/BPy_CurvePointIterator.cpp | 1 - .../Iterator/BPy_Interface0DIterator.cpp | 2 - .../python/Iterator/BPy_SVertexIterator.cpp | 1 - .../Iterator/BPy_StrokeVertexIterator.cpp | 1 - .../python/Iterator/BPy_ViewEdgeIterator.cpp | 1 + .../Iterator/BPy_orientedViewEdgeIterator.cpp | 2 - .../intern/stroke/ChainingIterators.h | 10 +- .../freestyle/intern/stroke/CurveIterators.h | 6 +- .../freestyle/intern/stroke/Operators.cpp | 8 +- .../freestyle/intern/swig/ModuleWrapper.cpp | 362 +++++++++++- .../intern/view_map/FEdgeXDetector.cpp | 8 +- .../freestyle/intern/view_map/Interface0D.h | 14 +- .../freestyle/intern/view_map/Silhouette.h | 12 +- .../intern/view_map/ViewEdgeXBuilder.cpp | 6 +- .../freestyle/intern/view_map/ViewMap.h | 4 +- .../freestyle/intern/view_map/ViewMapIO.cpp | 18 +- .../intern/view_map/ViewMapIterators.h | 4 +- .../intern/winged_edge/Curvature.cpp | 2 +- .../freestyle/intern/winged_edge/WEdge.cpp | 16 +- .../freestyle/intern/winged_edge/WEdge.h | 6 +- .../freestyle/intern/winged_edge/WXEdge.h | 2 +- .../intern/winged_edge/WingedEdgeBuilder.cpp | 20 +- source/blender/freestyle/python/Freestyle.py | 18 +- 38 files changed, 1611 insertions(+), 507 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BPy_BBox.cpp create mode 100644 source/blender/freestyle/intern/python/BPy_BBox.h create mode 100644 source/blender/freestyle/intern/python/BPy_Material.h create mode 100644 source/blender/freestyle/intern/python/BPy_SShape.h create mode 100644 source/blender/freestyle/intern/python/BPy_ViewShape.h create mode 100644 source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 3c9f2abebe3..ed6beefd337 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -62,27 +62,38 @@ prefix = 'intern/python' python_sources = [ prefix + '/BPy_Freestyle.cpp', prefix + '/BPy_Convert.cpp', + prefix + '/BPy_BBox.cpp', prefix + '/BPy_BinaryPredicate0D.cpp', prefix + '/BPy_BinaryPredicate1D.cpp', prefix + '/BPy_Id.cpp', prefix + '/BPy_IntegrationType.cpp', prefix + '/BPy_Interface0D.cpp', - prefix + '/Interface0D/BPy_CurvePoint.cpp', - prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp', - prefix + '/Interface0D/BPy_SVertex.cpp', - prefix + '/Interface0D/BPy_ViewVertex.cpp', + prefix + '/Interface0D/BPy_CurvePoint.cpp', + prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp', + prefix + '/Interface0D/BPy_SVertex.cpp', + prefix + '/Interface0D/BPy_ViewVertex.cpp', prefix + '/BPy_Interface1D.cpp', - prefix + '/Interface1D/BPy_FEdge.cpp', - prefix + '/Interface1D/BPy_Stroke.cpp', + prefix + '/Interface1D/BPy_FEdge.cpp', + prefix + '/Interface1D/BPy_Stroke.cpp', + prefix + '/Interface1D/BPy_ViewEdge.cpp', prefix + '/BPy_Iterator.cpp', + prefix + '/Iterator/BPy_AdjacencyIterator.cpp', + prefix + '/Iterator/BPy_Interface0DIterator.cpp', + prefix + '/Iterator/BPy_CurvePointIterator.cpp', + prefix + '/Iterator/BPy_StrokeVertexIterator.cpp', + prefix + '/Iterator/BPy_SVertexIterator.cpp', + prefix + '/Iterator/BPy_orientedViewEdgeIterator.cpp', + prefix + '/Iterator/BPy_ViewEdgeIterator.cpp', prefix + '/BPy_MediumType.cpp', prefix + '/BPy_Nature.cpp', + prefix + '/BPy_SShape.cpp', prefix + '/BPy_StrokeAttribute.cpp', prefix + '/BPy_StrokeShader.cpp', prefix + '/BPy_UnaryFunction0D.cpp', prefix + '/BPy_UnaryFunction1D.cpp', prefix + '/BPy_UnaryPredicate0D.cpp', prefix + '/BPy_UnaryPredicate1D.cpp', + prefix + '/BPy_ViewShape.cpp' ] sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ diff --git a/source/blender/freestyle/intern/python/BPy_BBox.cpp b/source/blender/freestyle/intern/python/BPy_BBox.cpp new file mode 100644 index 00000000000..ac15672580d --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_BBox.cpp @@ -0,0 +1,142 @@ +#include "BPy_BBox.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for BBox instance -----------*/ +static int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds); +static void BBox___dealloc__(BPy_BBox *self); +static PyObject * BBox___repr__(BPy_BBox *self); + +/*----------------------BBox instance definitions ----------------------------*/ +static PyMethodDef BPy_BBox_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_BBox type definition ------------------------------*/ + +PyTypeObject BBox_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "BBox", /* tp_name */ + sizeof( BPy_BBox ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)BBox___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)BBox___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_BBox_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)BBox___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC BBox_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &BBox_Type ) < 0 ) + return; + + Py_INCREF( &BBox_Type ); + PyModule_AddObject(module, "BBox", (PyObject *)&BBox_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int BBox___init__(BPy_BBox *self, PyObject *args, PyObject *kwds) +{ + self->bb = new BBox< Vec3r>(); + return 0; +} + +void BBox___dealloc__(BPy_BBox* self) +{ + delete self->bb; + self->ob_type->tp_free((PyObject*)self); +} + + +PyObject * BBox___repr__(BPy_BBox* self) +{ + return PyString_FromFormat("BBox - address: %p", self->bb ); +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BPy_BBox.h b/source/blender/freestyle/intern/python/BPy_BBox.h new file mode 100644 index 00000000000..88bba3301bb --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_BBox.h @@ -0,0 +1,38 @@ +#ifndef FREESTYLE_PYTHON_BBOX_H +#define FREESTYLE_PYTHON_BBOX_H + +#include "../geometry/BBox.h" +#include "../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject BBox_Type; + +#define BPy_BBox_Check(v) (( (PyObject *) v)->ob_type == &BBox_Type) + +/*---------------------------Python BPy_BBox structure definition----------*/ +typedef struct { + PyObject_HEAD + BBox *bb; +} BPy_BBox; + +/*---------------------------Python BPy_BBox visible prototypes-----------*/ + +PyMODINIT_FUNC BBox_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_BBOX_H */ diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 89fa677aac0..c052acb446f 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -105,6 +105,37 @@ PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ) { return py_sv; } +PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ) { + PyObject *py_vv = ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); + ((BPy_ViewVertex *) py_vv)->vv = vv; + ((BPy_ViewVertex *) py_vv)->py_if0D.if0D = ((BPy_ViewVertex *) py_vv)->vv; + + return py_vv; +} + +PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ) { + PyObject *py_bb = BBox_Type.tp_new( &BBox_Type, 0, 0 ); + ((BPy_BBox *) py_bb)->bb = new BBox< Vec3r >( bb ); + + return py_bb; +} + +PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ) { + PyObject *py_ve = ViewEdge_Type.tp_new( &ViewEdge_Type, 0, 0 ); + ((BPy_ViewEdge *) py_ve)->ve = new ViewEdge( ve ); + ((BPy_ViewEdge *) py_ve)->py_if1D.if1D = ((BPy_ViewEdge *) py_ve)->ve; + + return py_ve; +} + +PyObject * BPy_SShape_from_SShape( SShape& ss ) { + PyObject *py_ss = SShape_Type.tp_new( &SShape_Type, 0, 0 ); + ((BPy_SShape *) py_ss)->ss = new SShape( ss ); + + return py_ss; +} + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 16f991e0e51..6bf05dc8047 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -4,12 +4,17 @@ #include "../geometry/Geom.h" using namespace Geometry; + +#include "BPy_BBox.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" #include "Interface0D/CurvePoint/BPy_StrokeVertex.h" #include "Interface0D/BPy_SVertex.h" +#include "Interface0D/BPy_ViewVertex.h" #include "Interface1D/BPy_FEdge.h" +#include "Interface1D/BPy_ViewEdge.h" +#include "BPy_SShape.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" #include "BPy_StrokeAttribute.h" @@ -31,14 +36,18 @@ PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); +PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); +PyObject * BPy_SShape_from_SShape( SShape& ss ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); +PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ); +PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index a6ef92d8f51..0496060d0f3 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -1,5 +1,6 @@ #include "BPy_Freestyle.h" +#include "BPy_BBox.h" #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" #include "BPy_Id.h" @@ -10,12 +11,15 @@ #include "BPy_Interface1D.h" #include "BPy_MediumType.h" #include "BPy_Nature.h" +#include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" #include "BPy_StrokeShader.h" #include "BPy_UnaryFunction0D.h" #include "BPy_UnaryFunction1D.h" #include "BPy_UnaryPredicate0D.h" #include "BPy_UnaryPredicate1D.h" +#include "BPy_ViewShape.h" + #ifdef __cplusplus extern "C" { @@ -137,6 +141,7 @@ PyObject *Freestyle_Init( void ) MediumType_Init( module ); Nature_Init( module ); + BBox_Init( module ); BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); Id_Init( module ); @@ -144,12 +149,14 @@ PyObject *Freestyle_Init( void ) Interface0D_Init( module ); Interface1D_Init( module ); Iterator_Init( module ); + SShape_Init( module ); StrokeAttribute_Init( module ); StrokeShader_Init( module ); UnaryFunction0D_Init( module ); UnaryFunction1D_Init( module ); UnaryPredicate0D_Init( module ); UnaryPredicate1D_Init( module ); + ViewShape_Init( module ); return module; } diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 113fc3f1cf7..ec881b010ee 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -3,6 +3,7 @@ #include "BPy_Convert.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_Stroke.h" +#include "Interface1D/BPy_ViewEdge.h" #include "BPy_MediumType.h" #ifdef __cplusplus @@ -150,6 +151,11 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) tmp = BPy_MediumType_from_MediumType( Stroke::HUMID_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "HUMID_MEDIUM", tmp); Py_DECREF(tmp); tmp = BPy_MediumType_from_MediumType( Stroke::OPAQUE_MEDIUM ); PyDict_SetItemString( Stroke_Type.tp_dict, "OPAQUE_MEDIUM", tmp); Py_DECREF(tmp); + if( PyType_Ready( &ViewEdge_Type ) < 0 ) + return; + Py_INCREF( &ViewEdge_Type ); + PyModule_AddObject(module, "ViewEdge", (PyObject *)&ViewEdge_Type); + } diff --git a/source/blender/freestyle/intern/python/BPy_Material.h b/source/blender/freestyle/intern/python/BPy_Material.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index a5b1cf3f27a..62c554aab51 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -1,120 +1,277 @@ - PyObject *_wrap_SShape_userdata_set(PyObject *self , PyObject *args) { +#include "BPy_SShape.h" + +#include "BPy_Convert.h" +#include "Interface0D/BPy_SVertex.h" +#include "Interface1D/BPy_FEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SShape instance -----------*/ +static int SShape___init__(BPy_SShape *self, PyObject *args, PyObject *kwds); +static void SShape___dealloc__(BPy_SShape *self); +static PyObject * SShape___repr__(BPy_SShape* self); + +static PyObject * SShape_AddEdge( BPy_SShape *self , PyObject *args); +static PyObject * SShape_AddNewVertex( BPy_SShape *self , PyObject *args); +static PyObject * SShape_setBBox( BPy_SShape *self , PyObject *args); +static PyObject * SShape_ComputeBBox( BPy_SShape *self ); +static PyObject * SShape_bbox( BPy_SShape *self ); +static PyObject * SShape_getVertexList( BPy_SShape *self ); +static PyObject * SShape_getEdgeList( BPy_SShape *self ); +static PyObject * SShape_getId( BPy_SShape *self ); +static PyObject * SShape_setId( BPy_SShape *self , PyObject *args); + +/*----------------------SShape instance definitions ----------------------------*/ +static PyMethodDef BPy_SShape_methods[] = { + {"AddEdge", ( PyCFunction ) SShape_AddEdge, METH_VARARGS, "(FEdge fe )Adds a FEdge to the list of FEdges. "}, + {"AddNewVertex", ( PyCFunction ) SShape_AddNewVertex, METH_VARARGS, "(SVertex sv )Adds a SVertex to the list of SVertex of this Shape. The SShape attribute of the SVertex is also set to 'this'."}, + {"setBBox", ( PyCFunction ) SShape_setBBox, METH_VARARGS, "(BBox bb )Sets the Bounding Box of the Shape"}, + {"ComputeBBox", ( PyCFunction ) SShape_ComputeBBox, METH_NOARGS, "( )Compute the bbox of the SShape"}, + {"bbox", ( PyCFunction ) SShape_bbox, METH_NOARGS, "( )Returns the bounding box of the shape."}, + {"getVertexList", ( PyCFunction ) SShape_getVertexList, METH_NOARGS, "( )Returns the list of SVertex of the Shape"}, + {"getEdgeList", ( PyCFunction ) SShape_getEdgeList, METH_NOARGS, "( )Returns the list of FEdges of the Shape."}, + {"getId", ( PyCFunction ) SShape_getId, METH_NOARGS, "( )Returns the Id of the Shape. "}, + {"setId", ( PyCFunction ) SShape_setId, METH_VARARGS, "(Id id )Sets the Id of the shape. "}, + + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_SShape type definition ------------------------------*/ + +PyTypeObject SShape_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SShape", /* tp_name */ + sizeof( BPy_SShape ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)SShape___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)SShape___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_SShape_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SShape___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC SShape_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &SShape_Type ) < 0 ) + return; + + Py_INCREF( &SShape_Type ); + PyModule_AddObject(module, "SShape", (PyObject *)&SShape_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int SShape___init__(BPy_SShape *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ) { + self->ss = new SShape(); + + } else if( BPy_SShape_Check(obj) ) { + self->ss = new SShape(*( ((BPy_SShape *) obj)->ss )); + } + + return 0; +} + +void SShape___dealloc__(BPy_SShape *self) +{ + delete self->ss; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * SShape___repr__(BPy_SShape *self) +{ + return PyString_FromFormat("SShape - address: %p", self->ss ); +} + +PyObject * SShape_AddEdge( BPy_SShape *self , PyObject *args) { + PyObject *py_fe = 0; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: SShape_AddEdge" << endl; + Py_RETURN_NONE; + } + + self->ss->AddEdge( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + +PyObject * SShape_AddNewVertex( BPy_SShape *self , PyObject *args) { + PyObject *py_sv = 0; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: SShape_AddNewVertex" << endl; + Py_RETURN_NONE; + } + + self->ss->AddNewVertex( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; +} + +PyObject * SShape_setBBox( BPy_SShape *self , PyObject *args) { + PyObject *py_bb = 0; + + if(!( PyArg_ParseTuple(args, "O", &py_bb) && BPy_BBox_Check(py_bb) )) { + cout << "ERROR: SShape_SetBBox" << endl; + Py_RETURN_NONE; + } + + self->ss->setBBox(*( ((BPy_BBox*) py_bb)->bb )); + + Py_RETURN_NONE; +} + +PyObject * SShape_ComputeBBox( BPy_SShape *self ) { + self->ss->ComputeBBox(); + + Py_RETURN_NONE; +} + +PyObject * SShape_bbox( BPy_SShape *self ) { + BBox bb( self->ss->bbox() ); + return BPy_BBox_from_BBox( bb ); } - PyObject *_wrap_SShape_userdata_get(PyObject *self , PyObject *args) { +PyObject * SShape_getVertexList( BPy_SShape *self ) { + PyObject *py_vertices = PyList_New(NULL); + + vector< SVertex * > vertices = self->ss->getVertexList(); + vector< SVertex * >::iterator it; + + for( it = vertices.begin(); it != vertices.end(); it++ ) { + PyList_Append( py_vertices, BPy_SVertex_from_SVertex(*( *it )) ); + } + + return py_vertices; } - PyObject *_wrap_new_SShape__SWIG_0(PyObject *self , PyObject *args) { +PyObject * SShape_getEdgeList( BPy_SShape *self ) { + PyObject *py_edges = PyList_New(NULL); + + vector< FEdge * > edges = self->ss->getEdgeList(); + vector< FEdge * >::iterator it; + + for( it = edges.begin(); it != edges.end(); it++ ) { + PyList_Append( py_edges, BPy_FEdge_from_FEdge(*( *it )) ); + } + + return py_edges; +} + +PyObject * SShape_getId( BPy_SShape *self ) { + Id id( self->ss->getId() ); + return BPy_Id_from_Id( id ); +} + +PyObject * SShape_setId( BPy_SShape *self , PyObject *args) { + PyObject *py_id; + + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: SShape_setId" << endl; + Py_RETURN_NONE; + } + + self->ss->setId(*( ((BPy_Id *) py_id)->id )); + + Py_RETURN_NONE; } - PyObject *_wrap_new_SShape__SWIG_1(PyObject *self , PyObject *args) { +// const Material & material (unsigned i) const +// const vector< Material > & materials () const +// void SetMaterials (const vector< Material > &iMaterials) + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_new_SShape(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_SShape_dupplicate(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_SShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_AddEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_AddNewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_AddChain(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_CreateSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SplitEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SplitEdgeIn2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SetBBox(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_ComputeBBox(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_RemoveEdgeFromChain(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_RemoveEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_GetVertexList(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_GetEdgeList(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_GetChains(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_bbox(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_material(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_materials(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_viewShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_importance(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SetId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SetMaterials(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SetViewShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_SShape_SetImportance(PyObject *self , PyObject *args) { -} - - +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/BPy_SShape.h b/source/blender/freestyle/intern/python/BPy_SShape.h new file mode 100644 index 00000000000..2064b6c4b64 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_SShape.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_SSHAPE_H +#define FREESTYLE_PYTHON_SSHAPE_H + +#include "../view_map/Silhouette.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SShape_Type; + +#define BPy_SShape_Check(v) (( (PyObject *) v)->ob_type == &SShape_Type) + +/*---------------------------Python BPy_SShape structure definition----------*/ +typedef struct { + PyObject_HEAD + SShape *ss; +} BPy_SShape; + +/*---------------------------Python BPy_SShape visible prototypes-----------*/ + +PyMODINIT_FUNC SShape_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SSHAPE_H */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 023ce06f44f..3ac2c02a274 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -1,88 +1,291 @@ - PyObject *_wrap_ViewShape_userdata_set(PyObject *self , PyObject *args) { +#include "BPy_ViewShape.h" + +#include "BPy_Convert.h" +#include "Interface0D/BPy_ViewVertex.h" +#include "Interface1D/BPy_ViewEdge.h" +#include "BPy_SShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewShape instance -----------*/ +static int ViewShape___init__(BPy_ViewShape *self, PyObject *args, PyObject *kwds); +static void ViewShape___dealloc__(BPy_ViewShape *self); +static PyObject * ViewShape___repr__(BPy_ViewShape* self); + + +/*---------------------- BPy_ViewShape instance definitions ----------------------------*/ +static PyMethodDef BPy_ViewShape_methods[] = { + //{"AddEdge", ( PyCFunction ) ViewShape_AddEdge, METH_VARARGS, "(FEdge fe )Adds a FEdge to the list of FEdges. "}, + + + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ViewShape type definition ------------------------------*/ + +PyTypeObject ViewShape_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewShape", /* tp_name */ + sizeof( BPy_ViewShape ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)ViewShape___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)ViewShape___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ViewShape_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewShape___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC ViewShape_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &ViewShape_Type ) < 0 ) + return; + + Py_INCREF( &ViewShape_Type ); + PyModule_AddObject(module, "ViewShape", (PyObject *)&ViewShape_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int ViewShape___init__(BPy_ViewShape *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ) { + self->vs = new ViewShape(); + + } else if( BPy_ViewShape_Check(obj) ) { + self->vs = new ViewShape( ((BPy_SShape *) obj)->ss ); + + } else if( BPy_ViewShape_Check(obj) ) { + self->vs = new ViewShape(*( ((BPy_ViewShape *) obj)->vs )); + } + + return 0; +} + +void ViewShape___dealloc__(BPy_ViewShape *self) +{ + delete self->vs; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * ViewShape___repr__(BPy_ViewShape *self) +{ + return PyString_FromFormat("ViewShape - address: %p", self->vs ); +} + +PyObject * ViewShape_sshape( BPy_ViewShape *self ) { + SShape ss(*( self->vs->sshape() )); + return BPy_SShape_from_SShape( ss ); } - PyObject *_wrap_ViewShape_userdata_get(PyObject *self , PyObject *args) { +PyObject * ViewShape_vertices( BPy_ViewShape *self ) { + PyObject *py_vertices = PyList_New(NULL); + + vector< ViewVertex * > vertices = self->vs->vertices(); + vector< ViewVertex * >::iterator it; + + for( it = vertices.begin(); it != vertices.end(); it++ ) { + PyList_Append( py_vertices, BPy_ViewVertex_from_ViewVertex_ptr( *it ) ); + } + + return py_vertices; } - PyObject *_wrap_new_ViewShape__SWIG_0(PyObject *self , PyObject *args) { +PyObject * ViewShape_edges( BPy_ViewShape *self ) { + PyObject *py_edges = PyList_New(NULL); + + vector< ViewEdge * > edges = self->vs->edges(); + vector< ViewEdge * >::iterator it; + + for( it = edges.begin(); it != edges.end(); it++ ) { + PyList_Append( py_edges, BPy_ViewEdge_from_ViewEdge(*( *it )) ); + } + + return py_edges; } - - PyObject *_wrap_new_ViewShape__SWIG_1(PyObject *self , PyObject *args) { +PyObject * ViewShape_getId( BPy_ViewShape *self ) { + Id id( self->vs->getId() ); + return BPy_Id_from_Id( id ); } +PyObject * ViewShape_setSShape( BPy_ViewShape *self , PyObject *args) { + PyObject *py_ss = 0; - PyObject *_wrap_new_ViewShape__SWIG_2(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_ss) && BPy_SShape_Check(py_ss) )) { + cout << "ERROR: ViewShape_SetSShape" << endl; + Py_RETURN_NONE; + } + + self->vs->setSShape( ((BPy_SShape *) py_ss)->ss ); + + Py_RETURN_NONE; } +PyObject * ViewShape_setVertices( BPy_ViewShape *self , PyObject *args) { + PyObject *list = 0; + PyObject *tmp; + + if(!( PyArg_ParseTuple(args, "O", &list) && PyList_Check(list) )) { + cout << "ERROR: ViewShape_SetVertices" << endl; + Py_RETURN_NONE; + } + + vector< ViewVertex *> v; + + for( int i=0; i < PyList_Size(list); i++ ) { + tmp = PyList_GetItem(list, i); + if( BPy_ViewVertex_Check(tmp) ) + v.push_back( ((BPy_ViewVertex *) tmp)->vv ); + else + Py_RETURN_NONE; + } + + self->vs->setVertices( v ); - PyObject *_wrap_new_ViewShape(PyObject *self, PyObject *args) { + Py_RETURN_NONE; } +//void SetEdges (const vector< ViewEdge * > &iEdges) +PyObject * ViewShape_setEdges( BPy_ViewShape *self , PyObject *args) { + PyObject *list = 0; + PyObject *tmp; - PyObject *_wrap_ViewShape_dupplicate(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &list) && PyList_Check(list) )) { + cout << "ERROR: ViewShape_SetVertices" << endl; + Py_RETURN_NONE; + } + + vector v; + + for( int i=0; i < PyList_Size(list); i++ ) { + tmp = PyList_GetItem(list, i); + if( BPy_ViewEdge_Check(tmp) ) + v.push_back( ((BPy_ViewEdge *) tmp)->ve ); + else + Py_RETURN_NONE; + } + + self->vs->setEdges( v ); + + Py_RETURN_NONE; } +PyObject * ViewShape_AddEdge( BPy_ViewShape *self , PyObject *args) { + PyObject *py_ve = 0; - PyObject *_wrap_delete_ViewShape(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: ViewShape_AddEdge" << endl; + Py_RETURN_NONE; + } + + self->vs->AddEdge( ((BPy_ViewEdge *) py_ve)->ve ); + + Py_RETURN_NONE; } +PyObject * ViewShape_AddVertex( BPy_ViewShape *self , PyObject *args) { + PyObject *py_vv = 0; - PyObject *_wrap_ViewShape_SplitEdge(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) { + cout << "ERROR: ViewShape_AddNewVertex" << endl; + Py_RETURN_NONE; + } + + self->vs->AddVertex( ((BPy_ViewVertex *) py_vv)->vv ); + + Py_RETURN_NONE; } +// virtual ViewShape * dupplicate () - PyObject *_wrap_ViewShape_sshape__SWIG_0(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_ViewShape_sshape__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_sshape(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewShape_vertices(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_edges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_SetSShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_SetVertices(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_SetEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_AddVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_AddEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_RemoveEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewShape_RemoveVertex(PyObject *self , PyObject *args) { -} - - +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.h b/source/blender/freestyle/intern/python/BPy_ViewShape.h new file mode 100644 index 00000000000..20490cd71aa --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_VIEWSHAPE_H +#define FREESTYLE_PYTHON_VIEWSHAPE_H + +#include "../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewShape_Type; + +#define BPy_ViewShape_Check(v) (( (PyObject *) v)->ob_type == &ViewShape_Type) + +/*---------------------------Python BPy_ViewShape structure definition----------*/ +typedef struct { + PyObject_HEAD + ViewShape *vs; +} BPy_ViewShape; + +/*---------------------------Python BPy_ViewShape visible prototypes-----------*/ + +PyMODINIT_FUNC ViewShape_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWSHAPE_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index 841040af180..592a46186c2 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -4,7 +4,6 @@ #include "../../view_map/ViewMap.h" #include "../BPy_Interface0D.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index 1b55b601c89..02d06757fcb 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -1,236 +1,317 @@ - PyObject *_wrap_ViewEdge_getExactTypeName(PyObject *self , PyObject *args) { +#include "BPy_ViewEdge.h" + +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewEdge instance -----------*/ +static int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds); + +static PyObject * ViewEdge_A( BPy_ViewEdge *self ); +static PyObject * ViewEdge_B( BPy_ViewEdge *self ); + + +/*----------------------ViewEdge instance definitions ----------------------------*/ +static PyMethodDef BPy_ViewEdge_methods[] = { + + {"A", ( PyCFunction ) ViewEdge_A, METH_NOARGS, "() Returns the first ViewVertex."}, + {"B", ( PyCFunction ) ViewEdge_B, METH_NOARGS, "() Returns the second ViewVertex."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ViewEdge type definition ------------------------------*/ + +PyTypeObject ViewEdge_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewEdge", /* tp_name */ + sizeof( BPy_ViewEdge ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ViewEdge_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewEdge___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) +{ + self->ve = new ViewEdge(); + self->py_if1D.if1D = self->ve; + + return 0; } - PyObject *_wrap_ViewEdge_getId(PyObject *self , PyObject *args) { +PyObject * ViewEdge_A( BPy_ViewEdge *self ) { + // if( self->ve->A() ){ + // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() ); + // } + // + Py_RETURN_NONE; } - - PyObject *_wrap_ViewEdge_getNature(PyObject *self , PyObject *args) { +PyObject * ViewEdge_B( BPy_ViewEdge *self ) { + // if( self->ve->B() ){ + // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() ); + // } + + Py_RETURN_NONE; } +// +// PyObject * ViewEdge___getitem__( BPy_ViewEdge *self, PyObject *args ) { +// int i; +// +// if(!( PyArg_ParseTuple(args, "i", &i) && (i == 0 || i == 1) )) { +// cout << "ERROR: ViewEdge___getitem__" << endl; +// Py_RETURN_NONE; +// } +// +// if( SVertex *v = self->ve->operator[](i) ) +// return BPy_SVertex_from_SVertex( *v ); +// +// Py_RETURN_NONE; +// } +// +// PyObject * ViewEdge_nextEdge( BPy_ViewEdge *self ) { +// if( ViewEdge *fe = self->ve->nextEdge() ) +// return BPy_ViewEdge_from_ViewEdge( *fe ); +// +// Py_RETURN_NONE; +// } +// +// PyObject * ViewEdge_previousEdge( BPy_ViewEdge *self ) { +// if( ViewEdge *fe = self->ve->previousEdge() ) +// return BPy_ViewEdge_from_ViewEdge( *fe ); +// +// Py_RETURN_NONE; +// } +// +// PyObject * ViewEdge_isSmooth( BPy_ViewEdge *self ) { +// return PyBool_from_bool( self->ve->isSmooth() ); +// } +// +// PyObject *ViewEdge_setVertexA( BPy_ViewEdge *self , PyObject *args) { +// PyObject *py_sv; +// +// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { +// cout << "ERROR: ViewEdge_setVertexA" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setVertexA( ((BPy_SVertex *) py_sv)->sv ); +// +// Py_RETURN_NONE; +// } +// +// PyObject *ViewEdge_setVertexB( BPy_ViewEdge *self , PyObject *args) { +// PyObject *py_sv; +// +// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { +// cout << "ERROR: ViewEdge_setVertexB" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setVertexB( ((BPy_SVertex *) py_sv)->sv ); +// +// Py_RETURN_NONE; +// } +// +// PyObject *ViewEdge_setId( BPy_ViewEdge *self , PyObject *args) { +// PyObject *py_id; +// +// if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { +// cout << "ERROR: ViewEdge_setId" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setId(*( ((BPy_Id *) py_id)->id )); +// +// Py_RETURN_NONE; +// } +// +// +// PyObject *ViewEdge_setNextEdge( BPy_ViewEdge *self , PyObject *args) { +// PyObject *py_fe; +// +// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { +// cout << "ERROR: ViewEdge_setNextEdge" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setNextEdge( ((BPy_ViewEdge *) py_fe)->ve ); +// +// Py_RETURN_NONE; +// } +// +// PyObject *ViewEdge_setPreviousEdge( BPy_ViewEdge *self , PyObject *args) { +// PyObject *py_fe; +// +// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { +// cout << "ERROR: ViewEdge_setPreviousEdge" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setPreviousEdge( ((BPy_ViewEdge *) py_fe)->ve ); +// +// Py_RETURN_NONE; +// } +// +// PyObject *ViewEdge_setSmooth( BPy_ViewEdge *self , PyObject *args) { +// int b; +// +// if(!( PyArg_ParseTuple(args, "i", &b) )) { +// cout << "ERROR: ViewEdge_setSmooth" << endl; +// Py_RETURN_NONE; +// } +// +// self->ve->setSmooth( (bool) b ); +// +// Py_RETURN_NONE; +// } +// +// PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) { +// PyObject *py_n; +// +// if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { +// cout << "ERROR: ViewEdge_setNature" << endl; +// Py_RETURN_NONE; +// } +// +// PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); +// ((ViewEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) ); +// +// Py_RETURN_NONE; +// } +// +// PyObject *ViewEdge_getVertices( BPy_ViewEdge *self ) { +// PyObject *py_vertices = PyList_New(NULL); +// +// for( Interface0DIterator it = self->ve->verticesBegin(); it != self->ve->verticesEnd(); it++ ) { +// PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) ); +// } +// +// return py_vertices; +// } +// +// PyObject *ViewEdge_getPoints( BPy_ViewEdge *self ) { +// PyObject *py_points = PyList_New(NULL); +// +// for( Interface0DIterator it = self->ve->pointsBegin(); it != self->ve->pointsEnd(); it++ ) { +// PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) ); +// } +// +// return py_points; +// } +// +// +// +// +// +// FEdge * fedgeA () +// FEdge * fedgeB () +// ViewShape * viewShape () +// ViewShape * aShape () +// bool isClosed () +// unsigned getChainingTimeStamp () +// void SetA (ViewVertex *iA) +// void SetB (ViewVertex *iB) +// void SetNature (Nature::EdgeNature iNature) +// void SetFEdgeA (FEdge *iFEdge) +// void SetFEdgeB (FEdge *iFEdge) +// void SetShape (ViewShape *iVShape) +// void SetId (const Id &id) +// void UpdateFEdges () +// void SetaShape (ViewShape *iShape) +// void SetQI (int qi) +// void setChainingTimeStamp (unsigned ts) +// real getLength2D () const +// virtual Interface0DIterator verticesBegin () +// virtual Interface0DIterator verticesEnd () +// virtual Interface0DIterator pointsBegin (float t=0.f) +// virtual Interface0DIterator pointsEnd (float t=0.f) - PyObject *_wrap_ViewEdge_userdata_set(PyObject *self , PyObject *args) { + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_ViewEdge_userdata_get(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ViewEdge__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ViewEdge__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ViewEdge__SWIG_2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ViewEdge__SWIG_3(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_ViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_A(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_B(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_fedgeA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_fedgeB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_viewShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_aShape__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_isClosed(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_getChainingTimeStamp(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_aShape__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_aShape(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_bShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluders(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_splittingId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetNature(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetFEdgeA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetFEdgeB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_UpdateFEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetaShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_SetQI(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_setChainingTimeStamp(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_AddOccluder(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_setSplittingId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_intersect_2d_area(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_include_in_2d_area(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_getLength2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_qi(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluders_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluders_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluders_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluders_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occludee(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occluded_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_occludee_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_shape_id(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_shape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_shape_importance(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_verticesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_verticesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsBegin(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewEdge_pointsEnd(PyObject *self, PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h new file mode 100644 index 00000000000..a7e7455b764 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h @@ -0,0 +1,32 @@ +#ifndef FREESTYLE_PYTHON_VIEWEDGE_H +#define FREESTYLE_PYTHON_VIEWEDGE_H + +#include "../../view_map/ViewMap.h" + +#include "../BPy_Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewEdge_Type; + +#define BPy_ViewEdge_Check(v) (( (PyObject *) v)->ob_type == &ViewEdge_Type) + +/*---------------------------Python BPy_ViewEdge structure definition----------*/ +typedef struct { + BPy_Interface1D py_if1D; + ViewEdge *ve; +} BPy_ViewEdge; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWEDGE_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index b1b33b347bc..72273e73a65 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -1,6 +1,5 @@ #include "BPy_CurvePointIterator.h" -#include "../BPy_Convert.h" #include "BPy_Interface0DIterator.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index b2b6d67aa0f..c88ba7773ab 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -1,7 +1,5 @@ #include "BPy_Interface0DIterator.h" -#include "../BPy_Convert.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index da8b1453102..be1f946302f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -1,6 +1,5 @@ #include "BPy_SVertexIterator.h" -#include "../BPy_Convert.h" #include "../Interface0D/BPy_SVertex.h" #include "../Interface1D/BPy_FEdge.h" diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 895aaee2323..72e41a37301 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -1,6 +1,5 @@ #include "BPy_StrokeVertexIterator.h" -#include "../BPy_Convert.h" #include "BPy_Interface0DIterator.h" #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 25ae25d52a9..e5de7769fbb 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -1,6 +1,7 @@ #include "BPy_ViewEdgeIterator.h" #include "../BPy_Convert.h" +#include "../Interface1D/BPy_ViewEdge.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 9a32f384be9..0622481f412 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -1,7 +1,5 @@ #include "BPy_orientedViewEdgeIterator.h" -#include "../BPy_Convert.h" - #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index 121f1c8ba54..b01c895d89a 100755 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -42,7 +42,7 @@ // Adjacency iterator used in the chaining process // /////////////////////////////////////////////////////////// -class LIB_STROKE_EXPORT AdjacencyIterator : Iterator { +class LIB_STROKE_EXPORT AdjacencyIterator : public Iterator { protected: ViewVertexInternal::orientedViewEdgeIterator _internalIterator; bool _restrictToSelection; @@ -73,6 +73,10 @@ public: virtual ~AdjacencyIterator(){ } + virtual string getExactTypeName() const { + return "AdjacencyIterator"; + } + virtual inline bool isEnd(){ return _internalIterator.isEnd(); } @@ -98,6 +102,10 @@ public: } virtual void increment(); + virtual void decrement(){ + cerr << "Warning: method decrement() not implemented" << endl; + } + protected: bool isValid(ViewEdge* edge); }; diff --git a/source/blender/freestyle/intern/stroke/CurveIterators.h b/source/blender/freestyle/intern/stroke/CurveIterators.h index 92f8bf065f4..2ba77a3c478 100755 --- a/source/blender/freestyle/intern/stroke/CurveIterators.h +++ b/source/blender/freestyle/intern/stroke/CurveIterators.h @@ -134,7 +134,7 @@ namespace CurveInternal { return new CurvePointIterator(*this); } - inline Interface0DIterator CastToInterface0DIterator() const{ + inline Interface0DIterator castToInterface0DIterator() const{ Interface0DIterator ret(new CurveInternal::CurvePointIterator(*this)); return ret; } @@ -183,7 +183,9 @@ namespace CurveInternal { return true; return false; } - protected: + +// protected: + virtual void increment() { if((_currentn == _n-1) && (_t == 1.f)) diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index cfdd72ac839..fe1ac27b04e 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -464,14 +464,14 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); CurveInternal::CurvePointIterator it = second; CurveInternal::CurvePointIterator split = second; - Interface0DIterator it0d = it.CastToInterface0DIterator(); + Interface0DIterator it0d = it.castToInterface0DIterator(); real _min = FLT_MAX;++it;//func(it0d);++it; CurveInternal::CurvePointIterator next = it;++next; real tmp; bool bsplit = false; for(; ((it != end) && (next != end)); ++it,++next){ - it0d = it.CastToInterface0DIterator(); + it0d = it.castToInterface0DIterator(); tmp = func(it0d); if(tmp < _min){ _min = tmp; @@ -600,7 +600,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); CurveInternal::CurvePointIterator it = second; CurveInternal::CurvePointIterator split = second; - Interface0DIterator it0d = it.CastToInterface0DIterator(); + Interface0DIterator it0d = it.castToInterface0DIterator(); //real _min = func(it0d);++it; real _min = FLT_MAX;++it; real mean = 0.f; @@ -612,7 +612,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica bool bsplit = false; for(; ((it != end) && (next != end)); ++it,++next){ ++count; - it0d = it.CastToInterface0DIterator(); + it0d = it.castToInterface0DIterator(); if(!pred0d(it0d)) continue; tmp = func(it0d); diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index 14c3dbb57be..67672d3a2ac 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -37821,7 +37821,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_getVertexList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; std::vector< SVertex * > *result = 0 ; @@ -37829,16 +37829,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetVertexList(PyObject *SWIGUNUSEDPARM(self), int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetVertexList",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:SShape_getVertexList",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetVertexList" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getVertexList" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); { try { { - std::vector< SVertex * > &_result_ref = (arg1)->GetVertexList(); + std::vector< SVertex * > &_result_ref = (arg1)->getVertexList(); result = (std::vector< SVertex * > *) &_result_ref; } } @@ -37856,7 +37856,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_getEdgeList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; std::vector< FEdge * > *result = 0 ; @@ -37864,16 +37864,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetEdgeList(PyObject *SWIGUNUSEDPARM(self), Py int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetEdgeList",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:SShape_getEdgeList",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetEdgeList" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getEdgeList" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); { try { { - std::vector< FEdge * > &_result_ref = (arg1)->GetEdgeList(); + std::vector< FEdge * > &_result_ref = (arg1)->getEdgeList(); result = (std::vector< FEdge * > *) &_result_ref; } } @@ -37891,7 +37891,7 @@ fail: } -SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_SShape_getChains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; SShape *arg1 = (SShape *) 0 ; std::vector< FEdge * > *result = 0 ; @@ -37899,16 +37899,16 @@ SWIGINTERN PyObject *_wrap_SShape_GetChains(PyObject *SWIGUNUSEDPARM(self), PyOb int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:SShape_GetChains",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:SShape_getChains",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SShape, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_GetChains" "', argument " "1"" of type '" "SShape *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SShape_getChains" "', argument " "1"" of type '" "SShape *""'"); } arg1 = reinterpret_cast< SShape * >(argp1); { try { { - std::vector< FEdge * > &_result_ref = (arg1)->GetChains(); + std::vector< FEdge * > &_result_ref = (arg1)->getChains(); result = (std::vector< FEdge * > *) &_result_ref; } } @@ -52210,6 +52210,41 @@ fail: } +SWIGINTERN PyObject *_wrap_new_ViewEdge__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_ViewEdge",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ViewEdge, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewEdge &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ViewEdge" "', argument " "1"" of type '" "ViewEdge &""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewEdge *)new ViewEdge(*arg1); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { int argc; PyObject *argv[6]; @@ -52223,6 +52258,15 @@ SWIGINTERN PyObject *_wrap_new_ViewEdge(PyObject *self, PyObject *args) { if (argc == 0) { return _wrap_new_ViewEdge__SWIG_0(self, args); } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ViewEdge, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_ViewEdge__SWIG_4(self, args); + } + } if (argc == 2) { int _v; void *vptr = 0; @@ -52292,7 +52336,40 @@ fail: " ViewEdge()\n" " ViewEdge(ViewVertex *,ViewVertex *)\n" " ViewEdge(ViewVertex *,ViewVertex *,FEdge *)\n" - " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n"); + " ViewEdge(ViewVertex *,ViewVertex *,FEdge *,FEdge *,ViewShape *)\n" + " ViewEdge(ViewEdge &)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_ViewEdge_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdge *arg1 = (ViewEdge *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdge_duplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdge, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdge_duplicate" "', argument " "1"" of type '" "ViewEdge *""'"); + } + arg1 = reinterpret_cast< ViewEdge * >(argp1); + { + try { + result = (ViewEdge *)(arg1)->duplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: return NULL; } @@ -59225,6 +59302,38 @@ fail: } +SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:ViewEdgeViewEdgeIterator_duplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewEdgeInternal__ViewEdgeIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewEdgeViewEdgeIterator_duplicate" "', argument " "1"" of type '" "ViewEdgeInternal::ViewEdgeIterator *""'"); + } + arg1 = reinterpret_cast< ViewEdgeInternal::ViewEdgeIterator * >(argp1); + { + try { + result = (ViewEdge *)(*arg1)->duplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_ViewEdgeViewEdgeIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewEdgeInternal::ViewEdgeIterator *arg1 = (ViewEdgeInternal::ViewEdgeIterator *) 0 ; @@ -75335,6 +75444,38 @@ fail: } +SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + std::string result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getExactTypeName",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getExactTypeName" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = ((AdjacencyIterator const *)arg1)->getExactTypeName(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_AdjacencyIterator_isEnd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; @@ -75526,23 +75667,22 @@ fail: } -SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_AdjacencyIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; - std::string result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_getExactTypeName",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_decrement",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_getExactTypeName" "', argument " "1"" of type '" "AdjacencyIterator const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_decrement" "', argument " "1"" of type '" "AdjacencyIterator *""'"); } arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); { try { - result = (*arg1)->getExactTypeName(); + (arg1)->decrement(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -75551,7 +75691,7 @@ SWIGINTERN PyObject *_wrap_AdjacencyIterator_getExactTypeName(PyObject *SWIGUNUS cout << "Warning: director exception catched" << endl; } } - resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + resultobj = SWIG_Py_Void(); return resultobj; fail: return NULL; @@ -75673,6 +75813,38 @@ fail: } +SWIGINTERN PyObject *_wrap_AdjacencyIterator_duplicate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; + ViewEdge *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:AdjacencyIterator_duplicate",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_AdjacencyIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AdjacencyIterator_duplicate" "', argument " "1"" of type '" "AdjacencyIterator *""'"); + } + arg1 = reinterpret_cast< AdjacencyIterator * >(argp1); + { + try { + result = (ViewEdge *)(*arg1)->duplicate(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ViewEdge, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_AdjacencyIterator_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; AdjacencyIterator *arg1 = (AdjacencyIterator *) 0 ; @@ -84139,7 +84311,7 @@ fail: } -SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_CurvePointIterator_castToInterface0DIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; Interface0DIterator result; @@ -84147,15 +84319,15 @@ SWIGINTERN PyObject *_wrap_CurvePointIterator_CastToInterface0DIterator(PyObject int res1 = 0 ; PyObject * obj0 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_CastToInterface0DIterator",&obj0)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_castToInterface0DIterator",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_CastToInterface0DIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_castToInterface0DIterator" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); } arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); { try { - result = ((CurveInternal::CurvePointIterator const *)arg1)->CastToInterface0DIterator(); + result = ((CurveInternal::CurvePointIterator const *)arg1)->castToInterface0DIterator(); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -84378,6 +84550,132 @@ fail: } +SWIGINTERN PyObject *_wrap_CurvePointIterator_increment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_increment",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_increment" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + (arg1)->increment(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_decrement(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_decrement",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_decrement" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + (arg1)->decrement(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_t" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (float)((CurveInternal::CurvePointIterator const *)arg1)->t(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CurvePointIterator_u(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; + float result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CurvePointIterator_u",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CurveInternal__CurvePointIterator, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CurvePointIterator_u" "', argument " "1"" of type '" "CurveInternal::CurvePointIterator const *""'"); + } + arg1 = reinterpret_cast< CurveInternal::CurvePointIterator * >(argp1); + { + try { + result = (float)((CurveInternal::CurvePointIterator const *)arg1)->u(); + } + // catch (Swig::DirectorTypeMismatch&) { + // cout << "Warning: return type mismatch" << endl; + // } + catch (Swig::DirectorException&) { + cout << "Warning: director exception catched" << endl; + } + } + resultobj = SWIG_From_float(static_cast< float >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_CurvePointIterator_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; CurveInternal::CurvePointIterator *arg1 = (CurveInternal::CurvePointIterator *) 0 ; @@ -107127,9 +107425,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"SShape_ComputeBBox", _wrap_SShape_ComputeBBox, METH_VARARGS, NULL}, { (char *)"SShape_RemoveEdgeFromChain", _wrap_SShape_RemoveEdgeFromChain, METH_VARARGS, NULL}, { (char *)"SShape_RemoveEdge", _wrap_SShape_RemoveEdge, METH_VARARGS, NULL}, - { (char *)"SShape_GetVertexList", _wrap_SShape_GetVertexList, METH_VARARGS, NULL}, - { (char *)"SShape_GetEdgeList", _wrap_SShape_GetEdgeList, METH_VARARGS, NULL}, - { (char *)"SShape_GetChains", _wrap_SShape_GetChains, METH_VARARGS, NULL}, + { (char *)"SShape_getVertexList", _wrap_SShape_getVertexList, METH_VARARGS, NULL}, + { (char *)"SShape_getEdgeList", _wrap_SShape_getEdgeList, METH_VARARGS, NULL}, + { (char *)"SShape_getChains", _wrap_SShape_getChains, METH_VARARGS, NULL}, { (char *)"SShape_bbox", _wrap_SShape_bbox, METH_VARARGS, NULL}, { (char *)"SShape_material", _wrap_SShape_material, METH_VARARGS, NULL}, { (char *)"SShape_materials", _wrap_SShape_materials, METH_VARARGS, NULL}, @@ -107416,6 +107714,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdge_userdata_set", _wrap_ViewEdge_userdata_set, METH_VARARGS, NULL}, { (char *)"ViewEdge_userdata_get", _wrap_ViewEdge_userdata_get, METH_VARARGS, NULL}, { (char *)"new_ViewEdge", _wrap_new_ViewEdge, METH_VARARGS, NULL}, + { (char *)"ViewEdge_duplicate", _wrap_ViewEdge_duplicate, METH_VARARGS, NULL}, { (char *)"delete_ViewEdge", _wrap_delete_ViewEdge, METH_VARARGS, NULL}, { (char *)"ViewEdge_A", _wrap_ViewEdge_A, METH_VARARGS, NULL}, { (char *)"ViewEdge_B", _wrap_ViewEdge_B, METH_VARARGS, NULL}, @@ -107582,6 +107881,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewEdgeViewEdgeIterator_getNature", _wrap_ViewEdgeViewEdgeIterator_getNature, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_userdata_set", _wrap_ViewEdgeViewEdgeIterator_userdata_set, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_userdata_get", _wrap_ViewEdgeViewEdgeIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"ViewEdgeViewEdgeIterator_duplicate", _wrap_ViewEdgeViewEdgeIterator_duplicate, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_A", _wrap_ViewEdgeViewEdgeIterator_A, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_B", _wrap_ViewEdgeViewEdgeIterator_B, METH_VARARGS, NULL}, { (char *)"ViewEdgeViewEdgeIterator_fedgeA", _wrap_ViewEdgeViewEdgeIterator_fedgeA, METH_VARARGS, NULL}, @@ -108010,17 +108310,19 @@ static PyMethodDef SwigMethods[] = { { (char *)"GetSelectedFEdgeCF", _wrap_GetSelectedFEdgeCF, METH_VARARGS, NULL}, { (char *)"new_AdjacencyIterator", _wrap_new_AdjacencyIterator, METH_VARARGS, NULL}, { (char *)"delete_AdjacencyIterator", _wrap_delete_AdjacencyIterator, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_getExactTypeName", _wrap_AdjacencyIterator_getExactTypeName, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_isEnd", _wrap_AdjacencyIterator_isEnd, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_isBegin", _wrap_AdjacencyIterator_isBegin, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_isIncoming", _wrap_AdjacencyIterator_isIncoming, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_getObject", _wrap_AdjacencyIterator_getObject, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator___deref__", _wrap_AdjacencyIterator___deref__, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_increment", _wrap_AdjacencyIterator_increment, METH_VARARGS, NULL}, - { (char *)"AdjacencyIterator_getExactTypeName", _wrap_AdjacencyIterator_getExactTypeName, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_decrement", _wrap_AdjacencyIterator_decrement, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_getId", _wrap_AdjacencyIterator_getId, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_getNature", _wrap_AdjacencyIterator_getNature, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_userdata_set", _wrap_AdjacencyIterator_userdata_set, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_userdata_get", _wrap_AdjacencyIterator_userdata_get, METH_VARARGS, NULL}, + { (char *)"AdjacencyIterator_duplicate", _wrap_AdjacencyIterator_duplicate, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_A", _wrap_AdjacencyIterator_A, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_B", _wrap_AdjacencyIterator_B, METH_VARARGS, NULL}, { (char *)"AdjacencyIterator_fedgeA", _wrap_AdjacencyIterator_fedgeA, METH_VARARGS, NULL}, @@ -108217,13 +108519,17 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_CurvePointIterator", _wrap_new_CurvePointIterator, METH_VARARGS, NULL}, { (char *)"delete_CurvePointIterator", _wrap_delete_CurvePointIterator, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_copy", _wrap_CurvePointIterator_copy, METH_VARARGS, NULL}, - { (char *)"CurvePointIterator_CastToInterface0DIterator", _wrap_CurvePointIterator_CastToInterface0DIterator, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_castToInterface0DIterator", _wrap_CurvePointIterator_castToInterface0DIterator, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_getExactTypeName", _wrap_CurvePointIterator_getExactTypeName, METH_VARARGS, NULL}, { (char *)"CurvePointIterator___eq__", _wrap_CurvePointIterator___eq__, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_getObject", _wrap_CurvePointIterator_getObject, METH_VARARGS, NULL}, { (char *)"CurvePointIterator___deref__", _wrap_CurvePointIterator___deref__, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_isBegin", _wrap_CurvePointIterator_isBegin, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_isEnd", _wrap_CurvePointIterator_isEnd, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_increment", _wrap_CurvePointIterator_increment, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_decrement", _wrap_CurvePointIterator_decrement, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_t", _wrap_CurvePointIterator_t, METH_VARARGS, NULL}, + { (char *)"CurvePointIterator_u", _wrap_CurvePointIterator_u, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_getX", _wrap_CurvePointIterator_getX, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_getY", _wrap_CurvePointIterator_getY, METH_VARARGS, NULL}, { (char *)"CurvePointIterator_getZ", _wrap_CurvePointIterator_getZ, METH_VARARGS, NULL}, diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index 54a982b8bd8..d7086e4baff 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -112,7 +112,7 @@ void FEdgeXDetector::preProcessShape(WXShape* iWShape) { preProcessFace((WXFace*)(*f)); } - vector& wvertices = iWShape->GetVertexList(); + vector& wvertices = iWShape->getVertexList(); for(vector::iterator wv=wvertices.begin(), wvend=wvertices.end(); wv!=wvend; ++wv){ @@ -219,7 +219,7 @@ void FEdgeXDetector::processSilhouetteShape(WXShape* iWShape) { // the silhouette edges that are not smooth // -------------------- vector::iterator we, weend; - vector &wedges = iWShape->GetEdgeList(); + vector &wedges = iWShape->getEdgeList(); for(we=wedges.begin(), weend=wedges.end(); we!=weend; ++we) @@ -298,7 +298,7 @@ void FEdgeXDetector::processBorderShape(WXShape* iWShape) { // the BORDER // -------------------- vector::iterator we, weend; - vector &wedges = iWShape->GetEdgeList(); + vector &wedges = iWShape->getEdgeList(); for(we=wedges.begin(), weend=wedges.end(); we!=weend; ++we){ @@ -328,7 +328,7 @@ void FEdgeXDetector::processCreaseShape(WXShape* iWShape) { // the CREASE // -------------------- vector::iterator we, weend; - vector &wedges = iWShape->GetEdgeList(); + vector &wedges = iWShape->getEdgeList(); for(we=wedges.begin(), weend=wedges.end(); we!=weend; ++we){ diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h index 40027e13d80..eaa6d31829b 100755 --- a/source/blender/freestyle/intern/view_map/Interface0D.h +++ b/source/blender/freestyle/intern/view_map/Interface0D.h @@ -163,7 +163,7 @@ public: // ////////////////////////////////////////////////// -class Interface0DIteratorNested : Iterator +class Interface0DIteratorNested : public Iterator { public: @@ -215,7 +215,7 @@ public: * where \a it1 and \a it2 are 2 Interface0DIterator. * Otherwise, incrementing \a it1 will also increment \a it2. */ -class Interface0DIterator +class Interface0DIterator : public Iterator { public: @@ -248,7 +248,7 @@ public: } /*! Returns the string "Interface0DIterator". */ - string getExactTypeName() const { + virtual string getExactTypeName() const { if (!_iterator) return "Interface0DIterator"; return _iterator->getExactTypeName() + "Proxy"; @@ -306,12 +306,12 @@ public: } /*! Increments. */ - void increment() { + virtual void increment() { _iterator->increment(); } /*! Decrements. */ - void decrement() { + virtual void decrement() { _iterator->decrement(); } @@ -319,14 +319,14 @@ public: * first of the 1D element containing the points over * which we're iterating. */ - bool isBegin() const { + virtual bool isBegin() const { return _iterator->isBegin(); } /*! Returns true if the pointed Interface0D is after the * after the last point of the 1D element we're iterating from. */ - bool isEnd() const { + virtual bool isEnd() const { return _iterator->isEnd(); } diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index c88a3da8967..14d934c6791 100755 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -963,7 +963,7 @@ public: // vertices //--------- vector::iterator sv,svend; - vector& verticesList = iBrother.GetVertexList(); + vector& verticesList = iBrother.getVertexList(); for(sv=verticesList.begin(), svend=verticesList.end(); sv!=svend; sv++) @@ -977,7 +977,7 @@ public: // edges //------ vector::iterator e,eend; - vector& edgesList = iBrother.GetEdgeList(); + vector& edgesList = iBrother.getEdgeList(); for(e=edgesList.begin(),eend=edgesList.end(); e!=eend; e++) @@ -990,7 +990,7 @@ public: // starting chain edges //------------------------- vector::iterator fe,fend; - vector& fedges = iBrother.GetChains(); + vector& fedges = iBrother.getChains(); for(fe=fedges.begin(),fend=fedges.end(); fe!=fend; fe++) @@ -1392,10 +1392,10 @@ public: /* accessors */ /*! Returns the list of SVertex of the Shape. */ - inline vector& GetVertexList() {return _verticesList;} // Get vertices list + inline vector& getVertexList() {return _verticesList;} // Get vertices list /*! Returns the list of FEdges of the Shape. */ - inline vector& GetEdgeList() {return _edgesList;} // Get edges list - inline vector& GetChains() {return _chains;} + inline vector& getEdgeList() {return _edgesList;} // Get edges list + inline vector& getChains() {return _chains;} /*! Returns the bounding box of the shape. */ inline const BBox& bbox() {return _BBox;} /*! Returns the ith material of the shape. */ diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index 3feeb6664df..42c39d5795e 100755 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -87,7 +87,7 @@ void ViewEdgeXBuilder::BuildViewEdges( WXShape *iWShape, ViewShape *oVShape, //iWShape->ResetUserData(); WXEdge * wxe; - vector& wedges = iWShape->GetEdgeList(); + vector& wedges = iWShape->getEdgeList(); // //------------------------------ for(vector::iterator we=wedges.begin(),weend=wedges.end(); @@ -111,8 +111,8 @@ void ViewEdgeXBuilder::BuildViewEdges( WXShape *iWShape, ViewShape *oVShape, // Add all these new edges to the scene's feature edges list: //----------------------------------------------------------- - vector& newedges = _pCurrentSShape->GetEdgeList(); - vector& newVertices = _pCurrentSShape->GetVertexList(); + vector& newedges = _pCurrentSShape->getEdgeList(); + vector& newVertices = _pCurrentSShape->getVertexList(); vector& newVVertices = _pCurrentVShape->vertices(); vector& newVEdges = _pCurrentVShape->edges(); diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index 2691da20057..2ddeb198fff 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -862,7 +862,9 @@ public: _splittingId = 0; UpdateFEdges(); // tells every FEdge between iFEdgeA and iFEdgeB that this is theit ViewEdge } -protected: + +//soc protected: + /*! Copy constructor. */ inline ViewEdge(ViewEdge& iBrother) { diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index 370f44dffcf..3591c67ce1f 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -628,24 +628,24 @@ namespace ViewMapIO { save(out, vs->sshape()->material(i)); // -> VerticesList (List) - tmp = vs->sshape()->GetVertexList().size(); + tmp = vs->sshape()->getVertexList().size(); WRITE(tmp); - for (vector::const_iterator i1 = vs->sshape()->GetVertexList().begin(); - i1 != vs->sshape()->GetVertexList().end(); i1++) + for (vector::const_iterator i1 = vs->sshape()->getVertexList().begin(); + i1 != vs->sshape()->getVertexList().end(); i1++) WRITE_IF_NON_NULL(*i1); // -> Chains (List) - tmp = vs->sshape()->GetChains().size(); + tmp = vs->sshape()->getChains().size(); WRITE(tmp); - for (vector::const_iterator i2 = vs->sshape()->GetChains().begin(); - i2 != vs->sshape()->GetChains().end(); i2++) + for (vector::const_iterator i2 = vs->sshape()->getChains().begin(); + i2 != vs->sshape()->getChains().end(); i2++) WRITE_IF_NON_NULL(*i2); // -> EdgesList (List) - tmp = vs->sshape()->GetEdgeList().size(); + tmp = vs->sshape()->getEdgeList().size(); WRITE(tmp); - for (vector::const_iterator i3 = vs->sshape()->GetEdgeList().begin(); - i3 != vs->sshape()->GetEdgeList().end(); i3++) + for (vector::const_iterator i3 = vs->sshape()->getEdgeList().begin(); + i3 != vs->sshape()->getEdgeList().end(); i3++) WRITE_IF_NON_NULL(*i3); // ViewEdges (List) diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h index 25da503af66..fa6fb8e1641 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h +++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h @@ -59,7 +59,7 @@ namespace ViewVertexInternal{ * An instance of an orientedViewEdgeIterator can only * be obtained from a ViewVertex by calling edgesBegin() or edgesEnd(). */ - class orientedViewEdgeIterator : Iterator + class orientedViewEdgeIterator : public Iterator { public: friend class ViewVertex; @@ -387,7 +387,7 @@ namespace ViewEdgeInternal { * ::Caution::: the dereferencing operator returns a *pointer* to * the pointed ViewEdge. */ -class ViewEdgeIterator : Iterator +class ViewEdgeIterator : public Iterator { public: diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp index a890fb92c04..42edef0cb6c 100755 --- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp +++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp @@ -42,7 +42,7 @@ static bool triangle_obtuse (WVertex*, WFace * f) bool b=false; for (int i=0; i<3; i++) b = b || - ((f->GetEdgeList()[i]->getVec3r() * f->GetEdgeList()[(i+1)%3]->getVec3r()) < 0); + ((f->getEdgeList()[i]->getVec3r() * f->getEdgeList()[(i+1)%3]->getVec3r()) < 0); return b; } diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp index 0d02e0ca131..b480b67b3d8 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp @@ -249,7 +249,7 @@ WEdge * WEdge::duplicate() WFace::WFace(WFace& iBrother) { - _OEdgeList = iBrother.GetEdgeList(); + _OEdgeList = iBrother.getEdgeList(); _Normal = iBrother.GetNormal(); _VerticesNormals = iBrother._VerticesNormals; _VerticesTexCoords = iBrother._VerticesTexCoords; @@ -478,7 +478,7 @@ WShape::WShape(WShape& iBrother) _Materials = iBrother._Materials; _meanEdgeSize = iBrother._meanEdgeSize; iBrother.bbox(_min, _max); - vector& vertexList = iBrother.GetVertexList(); + vector& vertexList = iBrother.getVertexList(); vector::iterator v=vertexList.begin(), vend=vertexList.end(); for(; v!=vend; @@ -491,7 +491,7 @@ WShape::WShape(WShape& iBrother) AddVertex(newVertex); } - vector& edgeList = iBrother.GetEdgeList(); + vector& edgeList = iBrother.getEdgeList(); vector::iterator e=edgeList.begin(), eend=edgeList.end(); for(; e!=eend; @@ -564,7 +564,7 @@ WShape::WShape(WShape& iBrother) f++) { unsigned i; - const vector& oedgeList = (*f)->GetEdgeList(); + const vector& oedgeList = (*f)->getEdgeList(); vector newoedgelist; unsigned n = oedgeList.size(); @@ -581,8 +581,8 @@ WShape::WShape(WShape& iBrother) // Free all memory (arghh!) // Vertex - vend = iBrother.GetVertexList().end(); - for(v=iBrother.GetVertexList().begin(); + vend = iBrother.getVertexList().end(); + for(v=iBrother.getVertexList().begin(); v!=vend; v++) { @@ -591,8 +591,8 @@ WShape::WShape(WShape& iBrother) } // Edges and OEdges: - eend = iBrother.GetEdgeList().end(); - for(e=iBrother.GetEdgeList().begin(); + eend = iBrother.getEdgeList().end(); + for(e=iBrother.getEdgeList().begin(); e!=eend; e++) { diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 99dc83faf96..ea6c793bdfe 100755 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -506,7 +506,7 @@ public: virtual ~WFace() {} /*! accessors */ - inline const vector& GetEdgeList() {return _OEdgeList;} + inline const vector& getEdgeList() {return _OEdgeList;} inline WOEdge * GetOEdge(int i) {return _OEdgeList[i];} inline Vec3r& GetNormal() {return _Normal;} inline int GetId() {return _Id;} @@ -744,8 +744,8 @@ public: } /*! accessors */ - inline vector& GetEdgeList() {return _EdgeList;} - inline vector& GetVertexList() {return _VertexList;} + inline vector& getEdgeList() {return _EdgeList;} + inline vector& getVertexList() {return _VertexList;} inline vector& GetFaceList() {return _FaceList;} inline unsigned GetId() {return _Id;} inline void bbox(Vec3r& min, Vec3r& max) {min=_min; max=_max;} diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index 0518e70d90b..9ec8fd4bddb 100755 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -527,7 +527,7 @@ public: */ virtual void Reset(){ // Reset Edges - vector& wedges = GetEdgeList(); + vector& wedges = getEdgeList(); for(vector::iterator we=wedges.begin(),weend=wedges.end(); we!=weend; we++){ diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp index c95231a72dc..cccf876db8b 100755 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp @@ -175,7 +175,7 @@ void WingedEdgeBuilder::buildWShape(WShape& shape, IndexedFaceSet& ifs) { // Parse the built winged-edge shape to update post-flags set normalsSet; - vector& wvertices = shape.GetVertexList(); + vector& wvertices = shape.getVertexList(); for(vector::iterator wv=wvertices.begin(), wvend=wvertices.end(); wv!=wvend; ++wv){ @@ -238,9 +238,9 @@ void WingedEdgeBuilder::buildTriangleStrip( const real *vertices, //Then rebuild it: if(0 == nTriangle%2) // if nTriangle is even { - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+1]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+2]/3]); triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2])); triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+1]],normals[nindices[nTriangle+1]+1],normals[nindices[nTriangle+1]+2])); @@ -254,9 +254,9 @@ void WingedEdgeBuilder::buildTriangleStrip( const real *vertices, } else // if nTriangle is odd { - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+2]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[nTriangle+1]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+2]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle+1]/3]); triangleNormals.push_back(Vec3r(normals[nindices[nTriangle]],normals[nindices[nTriangle]+1], normals[nindices[nTriangle]+2])); triangleNormals.push_back(Vec3r(normals[nindices[nTriangle+2]],normals[nindices[nTriangle+2]+1],normals[nindices[nTriangle+2]+2])); @@ -306,9 +306,9 @@ void WingedEdgeBuilder::buildTriangles(const real *vertices, // Each triplet of vertices is considered as an independent triangle for(unsigned i = 0; i < nvertices / 3; i++) { - triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+1]/3]); - triangleVertices.push_back(currentShape->GetVertexList()[vindices[3*i+2]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i+1]/3]); + triangleVertices.push_back(currentShape->getVertexList()[vindices[3*i+2]/3]); triangleNormals.push_back(Vec3r(normals[nindices[3*i]],normals[nindices[3*i]+1], normals[nindices[3*i]+2])); triangleNormals.push_back(Vec3r(normals[nindices[3*i+1]],normals[nindices[3*i+1]+1],normals[nindices[3*i+1]+2])); diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index 156eac8d26e..079eb01eb31 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -1142,9 +1142,9 @@ class SShape(_object): def ComputeBBox(*args): return _Freestyle.SShape_ComputeBBox(*args) def RemoveEdgeFromChain(*args): return _Freestyle.SShape_RemoveEdgeFromChain(*args) def RemoveEdge(*args): return _Freestyle.SShape_RemoveEdge(*args) - def GetVertexList(*args): return _Freestyle.SShape_GetVertexList(*args) - def GetEdgeList(*args): return _Freestyle.SShape_GetEdgeList(*args) - def GetChains(*args): return _Freestyle.SShape_GetChains(*args) + def getVertexList(*args): return _Freestyle.SShape_getVertexList(*args) + def getEdgeList(*args): return _Freestyle.SShape_getEdgeList(*args) + def getChains(*args): return _Freestyle.SShape_getChains(*args) def bbox(*args): return _Freestyle.SShape_bbox(*args) def material(*args): return _Freestyle.SShape_material(*args) def materials(*args): return _Freestyle.SShape_materials(*args) @@ -1566,6 +1566,7 @@ class ViewEdge(Interface1D): this = _Freestyle.new_ViewEdge(*args) try: self.this.append(this) except: self.this = this + def duplicate(*args): return _Freestyle.ViewEdge_duplicate(*args) __swig_destroy__ = _Freestyle.delete_ViewEdge __del__ = lambda self : None; def A(*args): return _Freestyle.ViewEdge_A(*args) @@ -1790,6 +1791,7 @@ class ViewEdgeViewEdgeIterator(_object): __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_set __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_get if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeViewEdgeIterator_userdata_get, _Freestyle.ViewEdgeViewEdgeIterator_userdata_set) + def duplicate(*args): return _Freestyle.ViewEdgeViewEdgeIterator_duplicate(*args) def A(*args): return _Freestyle.ViewEdgeViewEdgeIterator_A(*args) def B(*args): return _Freestyle.ViewEdgeViewEdgeIterator_B(*args) def fedgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeA(*args) @@ -3247,18 +3249,20 @@ class AdjacencyIterator(_object): except: self.this = this __swig_destroy__ = _Freestyle.delete_AdjacencyIterator __del__ = lambda self : None; + def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args) def isEnd(*args): return _Freestyle.AdjacencyIterator_isEnd(*args) def isBegin(*args): return _Freestyle.AdjacencyIterator_isBegin(*args) def isIncoming(*args): return _Freestyle.AdjacencyIterator_isIncoming(*args) def getObject(*args): return _Freestyle.AdjacencyIterator_getObject(*args) def __deref__(*args): return _Freestyle.AdjacencyIterator___deref__(*args) def increment(*args): return _Freestyle.AdjacencyIterator_increment(*args) - def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args) + def decrement(*args): return _Freestyle.AdjacencyIterator_decrement(*args) def getId(*args): return _Freestyle.AdjacencyIterator_getId(*args) def getNature(*args): return _Freestyle.AdjacencyIterator_getNature(*args) __swig_setmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_set __swig_getmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_get if _newclass:userdata = _swig_property(_Freestyle.AdjacencyIterator_userdata_get, _Freestyle.AdjacencyIterator_userdata_set) + def duplicate(*args): return _Freestyle.AdjacencyIterator_duplicate(*args) def A(*args): return _Freestyle.AdjacencyIterator_A(*args) def B(*args): return _Freestyle.AdjacencyIterator_B(*args) def fedgeA(*args): return _Freestyle.AdjacencyIterator_fedgeA(*args) @@ -3837,13 +3841,17 @@ class CurvePointIterator(Interface0DIteratorNested): __swig_destroy__ = _Freestyle.delete_CurvePointIterator __del__ = lambda self : None; def copy(*args): return _Freestyle.CurvePointIterator_copy(*args) - def CastToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_CastToInterface0DIterator(*args) + def castToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_castToInterface0DIterator(*args) def getExactTypeName(*args): return _Freestyle.CurvePointIterator_getExactTypeName(*args) def __eq__(*args): return _Freestyle.CurvePointIterator___eq__(*args) def getObject(*args): return _Freestyle.CurvePointIterator_getObject(*args) def __deref__(*args): return _Freestyle.CurvePointIterator___deref__(*args) def isBegin(*args): return _Freestyle.CurvePointIterator_isBegin(*args) def isEnd(*args): return _Freestyle.CurvePointIterator_isEnd(*args) + def increment(*args): return _Freestyle.CurvePointIterator_increment(*args) + def decrement(*args): return _Freestyle.CurvePointIterator_decrement(*args) + def t(*args): return _Freestyle.CurvePointIterator_t(*args) + def u(*args): return _Freestyle.CurvePointIterator_u(*args) def getX(*args): return _Freestyle.CurvePointIterator_getX(*args) def getY(*args): return _Freestyle.CurvePointIterator_getY(*args) def getZ(*args): return _Freestyle.CurvePointIterator_getZ(*args) From 2860bc5d5b1b2495c52a64eb7b30490e24ca4a41 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 20:39:13 +0000 Subject: [PATCH 404/430] soc-2008-mxcurioni: cleaned up the Convert header file to prevent cyclic or header positioning problems and adapted classes accordingly --- .../freestyle/intern/python/BPy_Convert.cpp | 14 +++++++++ .../freestyle/intern/python/BPy_Convert.h | 29 ++++++++++--------- .../freestyle/intern/python/BPy_SShape.cpp | 2 ++ .../python/Interface0D/BPy_CurvePoint.cpp | 1 + .../intern/python/Interface0D/BPy_SVertex.cpp | 1 + .../python/Interface0D/BPy_ViewVertex.cpp | 20 +++++-------- .../CurvePoint/BPy_StrokeVertex.cpp | 1 + .../intern/python/Interface1D/BPy_FEdge.cpp | 2 ++ .../intern/python/Interface1D/BPy_Stroke.cpp | 4 +++ 9 files changed, 48 insertions(+), 26 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index c052acb446f..9bc937b15d9 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -1,5 +1,19 @@ #include "BPy_Convert.h" +#include "BPy_BBox.h" +#include "BPy_Id.h" +#include "BPy_IntegrationType.h" +#include "BPy_Interface0D.h" +#include "Interface0D/CurvePoint/BPy_StrokeVertex.h" +#include "Interface0D/BPy_SVertex.h" +#include "Interface0D/BPy_ViewVertex.h" +#include "Interface1D/BPy_FEdge.h" +#include "Interface1D/BPy_ViewEdge.h" +#include "BPy_SShape.h" +#include "BPy_Nature.h" +#include "BPy_MediumType.h" +#include "BPy_StrokeAttribute.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 6bf05dc8047..db0b5e589d2 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -4,20 +4,23 @@ #include "../geometry/Geom.h" using namespace Geometry; +// BBox +#include "../geometry/BBox.h" -#include "BPy_BBox.h" -#include "BPy_Id.h" -#include "BPy_IntegrationType.h" -#include "BPy_Interface0D.h" -#include "Interface0D/CurvePoint/BPy_StrokeVertex.h" -#include "Interface0D/BPy_SVertex.h" -#include "Interface0D/BPy_ViewVertex.h" -#include "Interface1D/BPy_FEdge.h" -#include "Interface1D/BPy_ViewEdge.h" -#include "BPy_SShape.h" -#include "BPy_Nature.h" -#include "BPy_MediumType.h" -#include "BPy_StrokeAttribute.h" +// FEdge, FEdgeSharp, FEdgeSmooth, SShape, SVertex, FEdgeInternal::SVertexIterator +#include "../view_map/Silhouette.h" + +// Id +#include "../system/Id.h" + +// Interface0D, Interface0DIteratorNested, Interface0DIterator +#include "../view_map/Interface0D.h" + +// Stroke, StrokeAttribute, StrokeVertex +#include "../stroke/Stroke.h" + +// NonTVertex, TVertex, ViewEdge, ViewMap, ViewShape, ViewVertex +#include "../view_map/ViewMap.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/BPy_SShape.cpp b/source/blender/freestyle/intern/python/BPy_SShape.cpp index 62c554aab51..ab8a39d6193 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_SShape.cpp @@ -1,6 +1,8 @@ #include "BPy_SShape.h" #include "BPy_Convert.h" +#include "BPy_BBox.h" +#include "BPy_Id.h" #include "Interface0D/BPy_SVertex.h" #include "Interface1D/BPy_FEdge.h" diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp index 6765bc84baa..7fce126d309 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp @@ -1,6 +1,7 @@ #include "BPy_CurvePoint.h" #include "../BPy_Convert.h" +#include "../Interface0D/BPy_SVertex.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index bbfff34cb20..233ee3f10b5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -2,6 +2,7 @@ #include "../BPy_Convert.h" #include "../BPy_Id.h" +#include "../Interface1D/BPy_FEdge.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 7e6ef8590fd..2c68dc0e2e3 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -1,6 +1,7 @@ #include "BPy_ViewVertex.h" #include "../BPy_Convert.h" +#include "../BPy_Nature.h" #ifdef __cplusplus extern "C" { @@ -115,16 +116,7 @@ int ViewVertex___init__(BPy_ViewVertex *self ) return 0; } -// PyObject * ViewVertex___copy__( BPy_ViewVertex *self ) { -// BPy_ViewVertex *py_vv; -// -// py_vv = (BPy_ViewVertex *) ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); -// -// py_vv->vv = self->vv->duplicate(); -// py_svertex->py_if0D.if->sv; -// -// return (PyObject *) py_svertex; -// } + PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { PyObject *py_n; @@ -140,7 +132,10 @@ PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { Py_RETURN_NONE; } - +//PyObject * ViewVertex_edgesBegin( BPy_ViewVertex *self ) { + // orientedViewEdgeIterator ove( self->vv->edgesBegin() ) + // return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove ); +//} /////////////////////////////////////////////////////////////////////////////////////////// @@ -149,9 +144,8 @@ PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { #endif -// virtual string getExactTypeName () const -// void setNature (Nature::VertexNature iNature) + // virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin ()=0 // virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd ()=0 // virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator (ViewEdge *iEdge)=0 diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 2039b165457..3616e69447f 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -2,6 +2,7 @@ #include "../../BPy_Convert.h" #include "../../BPy_StrokeAttribute.h" +#include "../../Interface0D/BPy_SVertex.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 56dc76f0acd..bee852a96cb 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -1,7 +1,9 @@ #include "BPy_FEdge.h" #include "../BPy_Convert.h" +#include "../BPy_Id.h" #include "../Interface0D/BPy_SVertex.h" +#include "../BPy_Nature.h" #ifdef __cplusplus extern "C" { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 7574c8d7fc1..6e5be90bc82 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -1,7 +1,11 @@ #include "BPy_Stroke.h" #include "../BPy_Convert.h" +#include "../BPy_Id.h" #include "../Interface0D/BPy_SVertex.h" +#include "../Interface0D/CurvePoint/BPy_StrokeVertex.h" +#include "../BPy_MediumType.h" + #include "../../stroke/StrokeIterators.h" #ifdef __cplusplus From fc97e91a3efd7dec5f21ec0a8ba6b81a1db7b72d Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 21:32:50 +0000 Subject: [PATCH 405/430] soc-2008-mxcurioni: found and fixed all potential issues iterating over internal view-map data. The internal namespaces (ViewEdgeInternal, ViewVertexInternal, CurveInternal, StrokeInternal...) should NOT be included to prevent redefintion errors. --- .../freestyle/intern/python/BPy_Convert.cpp | 7 +++++++ .../blender/freestyle/intern/python/BPy_Convert.h | 13 +++++++++++++ .../python/Iterator/BPy_CurvePointIterator.cpp | 6 +++--- .../python/Iterator/BPy_CurvePointIterator.h | 3 +-- .../python/Iterator/BPy_SVertexIterator.cpp | 15 ++++++++------- .../intern/python/Iterator/BPy_SVertexIterator.h | 3 +-- .../python/Iterator/BPy_StrokeVertexIterator.cpp | 4 ++-- .../python/Iterator/BPy_StrokeVertexIterator.h | 3 +-- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 4 ++-- .../intern/python/Iterator/BPy_ViewEdgeIterator.h | 3 +-- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 4 ++-- .../Iterator/BPy_orientedViewEdgeIterator.h | 3 +-- 12 files changed, 42 insertions(+), 26 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 9bc937b15d9..bab9da8332e 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -9,6 +9,7 @@ #include "Interface0D/BPy_ViewVertex.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_ViewEdge.h" +#include "Iterator/BPy_orientedViewEdgeIterator.h" #include "BPy_SShape.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" @@ -149,6 +150,12 @@ PyObject * BPy_SShape_from_SShape( SShape& ss ) { return py_ss; } +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { + PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); + ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); + + return py_ove_it; +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index db0b5e589d2..87d902f28a8 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -1,6 +1,7 @@ #ifndef FREESTYLE_PYTHON_CONVERT_H #define FREESTYLE_PYTHON_CONVERT_H + #include "../geometry/Geom.h" using namespace Geometry; @@ -22,6 +23,17 @@ using namespace Geometry; // NonTVertex, TVertex, ViewEdge, ViewMap, ViewShape, ViewVertex #include "../view_map/ViewMap.h" +// ViewVertexInternal::orientedViewEdgeIterator +// ViewEdgeInternal::SVertexIterator +// ViewEdgeInternal::ViewEdgeIterator +#include "../view_map/ViewMapIterators.h" +//##################### IMPORTANT ##################### +// Do not use the following namespaces within this file : +// - ViewVertexInternal +// - ViewEdgeInternal +//########################################################## + + #ifdef __cplusplus extern "C" { #endif @@ -45,6 +57,7 @@ PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); PyObject * BPy_SShape_from_SShape( SShape& ss ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 72273e73a65..1f830261739 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -121,13 +121,13 @@ int CurvePointIterator___init__(BPy_CurvePointIterator *self, PyObject *args ) return -1; if( !obj ){ - self->cp_it = new CurvePointIterator(); + self->cp_it = new CurveInternal::CurvePointIterator(); } else if( BPy_CurvePointIterator_Check(obj) ) { - self->cp_it = new CurvePointIterator(*( ((BPy_CurvePointIterator *) obj)->cp_it )); + self->cp_it = new CurveInternal::CurvePointIterator(*( ((BPy_CurvePointIterator *) obj)->cp_it )); } else if( PyFloat_Check(obj) ) { - self->cp_it = new CurvePointIterator( PyFloat_AsDouble(obj) ); + self->cp_it = new CurveInternal::CurvePointIterator( PyFloat_AsDouble(obj) ); } else { return -1; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h index 652f6fffb97..e8f082216de 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h @@ -2,7 +2,6 @@ #define FREESTYLE_PYTHON_CURVEPOINTITERATOR_H #include "../../stroke/CurveIterators.h" -using namespace CurveInternal; #include "../BPy_Iterator.h" @@ -21,7 +20,7 @@ extern PyTypeObject CurvePointIterator_Type; /*---------------------------Python BPy_CurvePointIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - CurvePointIterator *cp_it; + CurveInternal::CurvePointIterator *cp_it; } BPy_CurvePointIterator; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index be1f946302f..649447f1db6 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -121,21 +121,22 @@ int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args ) return -1; if( !obj1 ){ - self->sv_it = new SVertexIterator(); + self->sv_it = new ViewEdgeInternal::SVertexIterator(); } else if( BPy_SVertexIterator_Check(obj1) ) { - self->sv_it = new SVertexIterator(*( ((BPy_SVertexIterator *) obj1)->sv_it )); + self->sv_it = new ViewEdgeInternal::SVertexIterator(*( ((BPy_SVertexIterator *) obj1)->sv_it )); } else if( obj1 && BPy_SVertex_Check(obj1) && obj2 && BPy_SVertex_Check(obj2) && obj3 && BPy_FEdge_Check(obj3) && obj4 && BPy_FEdge_Check(obj4) ) { - self->sv_it = new SVertexIterator( ((BPy_SVertex *) obj1)->sv, - ((BPy_SVertex *) obj2)->sv, - ((BPy_FEdge *) obj3)->fe, - ((BPy_FEdge *) obj4)->fe, - f ); + self->sv_it = new ViewEdgeInternal::SVertexIterator( + ((BPy_SVertex *) obj1)->sv, + ((BPy_SVertex *) obj2)->sv, + ((BPy_FEdge *) obj3)->fe, + ((BPy_FEdge *) obj4)->fe, + f ); } else { return -1; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h index 662685571eb..ba6fbf020d0 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h @@ -2,7 +2,6 @@ #define FREESTYLE_PYTHON_SVERTEXITERATOR_H #include "../../view_map/ViewMapIterators.h" -using namespace ViewEdgeInternal; #include "../BPy_Iterator.h" @@ -22,7 +21,7 @@ extern PyTypeObject SVertexIterator_Type; /*---------------------------Python BPy_SVertexIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - SVertexIterator *sv_it; + ViewEdgeInternal::SVertexIterator *sv_it; } BPy_SVertexIterator; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 72e41a37301..1f04be635c5 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -120,10 +120,10 @@ int StrokeVertexIterator___init__(BPy_StrokeVertexIterator *self, PyObject *args return -1; if( !obj ){ - self->sv_it = new StrokeVertexIterator(); + self->sv_it = new StrokeInternal::StrokeVertexIterator(); } else if( BPy_StrokeVertexIterator_Check(obj) ) { - self->sv_it = new StrokeVertexIterator(*( ((BPy_StrokeVertexIterator *) obj)->sv_it )); + self->sv_it = new StrokeInternal::StrokeVertexIterator(*( ((BPy_StrokeVertexIterator *) obj)->sv_it )); } else { return -1; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h index 8d9ffc56018..488a1efea3d 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h @@ -2,7 +2,6 @@ #define FREESTYLE_PYTHON_STROKEVERTEXITERATOR_H #include "../../stroke/StrokeIterators.h" -using namespace StrokeInternal; #include "../BPy_Iterator.h" @@ -21,7 +20,7 @@ extern PyTypeObject StrokeVertexIterator_Type; /*---------------------------Python BPy_StrokeVertexIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - StrokeVertexIterator *sv_it; + StrokeInternal::StrokeVertexIterator *sv_it; } BPy_StrokeVertexIterator; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index e5de7769fbb..2256d374c0c 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -115,13 +115,13 @@ int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args ) return -1; if( obj1 && BPy_ViewEdgeIterator_Check(obj1) ) { - self->ve_it = new ViewEdgeIterator(*( ((BPy_ViewEdgeIterator *) obj1)->ve_it )); + self->ve_it = new ViewEdgeInternal::ViewEdgeIterator(*( ((BPy_ViewEdgeIterator *) obj1)->ve_it )); } else { ViewEdge *begin = ( obj1 && BPy_ViewEdge_Check(obj1) ) ? ((BPy_ViewEdge *) obj1)->ve : 0; bool orientation = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; - self->ve_it = new ViewEdgeIterator( begin, orientation); + self->ve_it = new ViewEdgeInternal::ViewEdgeIterator( begin, orientation); } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h index 35d2f3f255b..a86547c5937 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h @@ -3,7 +3,6 @@ #include "../../view_map/ViewMapIterators.h" -using namespace ViewEdgeInternal; #include "../BPy_Iterator.h" @@ -22,7 +21,7 @@ extern PyTypeObject ViewEdgeIterator_Type; /*---------------------------Python BPy_ViewEdgeIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - ViewEdgeIterator *ve_it; + ViewEdgeInternal::ViewEdgeIterator *ve_it; } BPy_ViewEdgeIterator; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index 0622481f412..ec6850c3b96 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -112,9 +112,9 @@ int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObje return -1; if( !obj ) - self->ove_it = new orientedViewEdgeIterator(); + self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator(); else if( BPy_orientedViewEdgeIterator_Check(obj) ) - self->ove_it = new orientedViewEdgeIterator(*( ((BPy_orientedViewEdgeIterator *) obj)->ove_it )); + self->ove_it = new ViewVertexInternal::orientedViewEdgeIterator(*( ((BPy_orientedViewEdgeIterator *) obj)->ove_it )); self->py_it.it = self->ove_it; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h index 60754939220..1c8a25258b7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h @@ -3,7 +3,6 @@ #include "../../stroke/Stroke.h" #include "../../view_map/ViewMapIterators.h" -using namespace ViewVertexInternal; #include "../BPy_Iterator.h" @@ -22,7 +21,7 @@ extern PyTypeObject orientedViewEdgeIterator_Type; /*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - orientedViewEdgeIterator *ove_it; + ViewVertexInternal::orientedViewEdgeIterator *ove_it; } BPy_orientedViewEdgeIterator; /////////////////////////////////////////////////////////////////////////////////////////// From d8d9839ab31f774d6e8bcdda00cac31db0995d41 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 25 Jul 2008 00:18:10 +0000 Subject: [PATCH 406/430] soc-2008-mxcurioni: Added iterator capability to FEdge and Stroke. Recoded parts of ViewVertex, SVertex and Convert to support these changes. --- .../freestyle/intern/python/BPy_Convert.cpp | 16 +++ .../freestyle/intern/python/BPy_Convert.h | 7 +- .../intern/python/Interface0D/BPy_SVertex.cpp | 6 + .../python/Interface0D/BPy_ViewVertex.cpp | 56 +++++++-- .../intern/python/Interface1D/BPy_FEdge.cpp | 106 +++++++++++++----- .../intern/python/Interface1D/BPy_Stroke.cpp | 92 +++++++++++---- 6 files changed, 220 insertions(+), 63 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index bab9da8332e..6ab2dc9ebfb 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -9,7 +9,9 @@ #include "Interface0D/BPy_ViewVertex.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_ViewEdge.h" +#include "Iterator/BPy_Interface0DIterator.h" #include "Iterator/BPy_orientedViewEdgeIterator.h" +#include "Iterator/BPy_StrokeVertexIterator.h" #include "BPy_SShape.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" @@ -157,6 +159,20 @@ PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVerte return py_ove_it; } +PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) { + PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); + ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( if0D_it ); + + return py_if0D_it; +} + +PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) { + PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 ); + ((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it ); + + return py_sv_it; +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 87d902f28a8..05f002656c7 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -33,6 +33,8 @@ using namespace Geometry; // - ViewEdgeInternal //########################################################## +// StrokeInternal::StrokeVertexIterator +#include "../stroke/StrokeIterators.h" #ifdef __cplusplus extern "C" { @@ -57,7 +59,6 @@ PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); -PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); PyObject * BPy_SShape_from_SShape( SShape& ss ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); @@ -65,6 +66,10 @@ PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ); PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); +PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ); +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); +PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it); + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp index 233ee3f10b5..748cbc8f1db 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp @@ -15,6 +15,7 @@ static int SVertex___init__(BPy_SVertex *self, PyObject *args, PyObject *kwds); static PyObject * SVertex___copy__( BPy_SVertex *self ); static PyObject * SVertex_normals( BPy_SVertex *self ); static PyObject * SVertex_normalsSize( BPy_SVertex *self ); +static PyObject * SVertex_viewvertex( BPy_SVertex *self ); static PyObject * SVertex_setPoint3D( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_setPoint2D( BPy_SVertex *self , PyObject *args); static PyObject * SVertex_AddNormal( BPy_SVertex *self , PyObject *args); @@ -26,6 +27,7 @@ static PyMethodDef BPy_SVertex_methods[] = { {"__copy__", ( PyCFunction ) SVertex___copy__, METH_NOARGS, "( )Cloning method."}, {"normals", ( PyCFunction ) SVertex_normals, METH_NOARGS, "Returns the normals for this Vertex as a list. In a smooth surface, a vertex has exactly one normal. In a sharp surface, a vertex can have any number of normals."}, {"normalsSize", ( PyCFunction ) SVertex_normalsSize, METH_NOARGS, "Returns the number of different normals for this vertex." }, + {"viewvertex", ( PyCFunction ) SVertex_viewvertex, METH_NOARGS, "If this SVertex is also a ViewVertex, this method returns a pointer onto this ViewVertex. 0 is returned otherwise." }, {"setPoint3D", ( PyCFunction ) SVertex_setPoint3D, METH_VARARGS, "Sets the 3D coordinates of the SVertex." }, {"setPoint2D", ( PyCFunction ) SVertex_setPoint2D, METH_VARARGS, "Sets the 3D projected coordinates of the SVertex." }, {"AddNormal", ( PyCFunction ) SVertex_AddNormal, METH_VARARGS, "Adds a normal to the Svertex's set of normals. If the same normal is already in the set, nothing changes." }, @@ -178,6 +180,10 @@ PyObject * SVertex_normalsSize( BPy_SVertex *self ) { return PyInt_FromLong( self->sv->normalsSize() ); } +PyObject * SVertex_viewvertex( BPy_SVertex *self ) { + return BPy_ViewVertex_from_ViewVertex_ptr( self->sv->viewvertex() ); +} + PyObject *SVertex_setPoint3D( BPy_SVertex *self , PyObject *args) { PyObject *py_point; diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 2c68dc0e2e3..ba06d071977 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -1,6 +1,7 @@ #include "BPy_ViewVertex.h" #include "../BPy_Convert.h" +#include "../Interface1D/BPy_ViewEdge.h" #include "../BPy_Nature.h" #ifdef __cplusplus @@ -12,11 +13,16 @@ extern "C" { /*--------------- Python API function prototypes for ViewVertex instance -----------*/ static int ViewVertex___init__(BPy_ViewVertex *self); static PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ); - +static PyObject * ViewVertex_edgesBegin( BPy_ViewVertex *self ); +static PyObject * ViewVertex_edgesEnd( BPy_ViewVertex *self ); +static PyObject * ViewVertex_edgesIterator( BPy_ViewVertex *self, PyObject *args ); /*----------------------ViewVertex instance definitions ----------------------------*/ static PyMethodDef BPy_ViewVertex_methods[] = { {"setNature", ( PyCFunction ) ViewVertex_setNature, METH_VARARGS, "(Nature n )Sets the nature of the vertex."}, + {"edgesBegin", ( PyCFunction ) ViewVertex_edgesBegin, METH_NOARGS, "() Returns an iterator over the ViewEdges that goes to or comes from this ViewVertex pointing to the first ViewEdge of the list. The orientedViewEdgeIterator allows to iterate in CCW order over these ViewEdges and to get the orientation for each ViewEdge (incoming/outgoing). "}, + {"edgesEnd", ( PyCFunction ) ViewVertex_edgesEnd, METH_NOARGS, "() Returns an orientedViewEdgeIterator over the ViewEdges around this ViewVertex, pointing after the last ViewEdge."}, + {"edgesIterator", ( PyCFunction ) ViewVertex_edgesIterator, METH_VARARGS, "(ViewEdge ve) Returns an orientedViewEdgeIterator pointing to the ViewEdge given as argument. "}, {NULL, NULL, 0, NULL} }; @@ -112,6 +118,7 @@ PyTypeObject ViewVertex_Type = { int ViewVertex___init__(BPy_ViewVertex *self ) { + self->vv = 0; // ViewVertex is abstract self->py_if0D.if0D = new Interface0D(); return 0; } @@ -121,6 +128,9 @@ int ViewVertex___init__(BPy_ViewVertex *self ) PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { PyObject *py_n; + if( !self->vv ) + Py_RETURN_NONE; + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { cout << "ERROR: ViewVertex_setNature" << endl; Py_RETURN_NONE; @@ -132,10 +142,39 @@ PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { Py_RETURN_NONE; } -//PyObject * ViewVertex_edgesBegin( BPy_ViewVertex *self ) { - // orientedViewEdgeIterator ove( self->vv->edgesBegin() ) - // return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove ); -//} +PyObject * ViewVertex_edgesBegin( BPy_ViewVertex *self ) { + if( !self->vv ) + Py_RETURN_NONE; + + ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesBegin() ); + return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it ); +} + +PyObject * ViewVertex_edgesEnd( BPy_ViewVertex *self ) { + if( !self->vv ) + Py_RETURN_NONE; + + ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesEnd() ); + return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it ); +} + + +PyObject * ViewVertex_edgesIterator( BPy_ViewVertex *self, PyObject *args ) { + PyObject *py_ve; + + if( !self->vv ) + Py_RETURN_NONE; + + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: ViewVertex_setNature" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = ((BPy_ViewEdge *) py_ve)->ve; + ViewVertexInternal::orientedViewEdgeIterator ove_it( self->vv->edgesIterator( ve ) ); + return BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ove_it ); +} + /////////////////////////////////////////////////////////////////////////////////////////// @@ -143,10 +182,3 @@ PyObject * ViewVertex_setNature( BPy_ViewVertex *self, PyObject *args ) { } #endif - - - -// virtual ViewVertexInternal::orientedViewEdgeIterator edgesBegin ()=0 -// virtual ViewVertexInternal::orientedViewEdgeIterator edgesEnd ()=0 -// virtual ViewVertexInternal::orientedViewEdgeIterator edgesIterator (ViewEdge *iEdge)=0 -// diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index bee852a96cb..3eaad2bd8c4 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -3,6 +3,7 @@ #include "../BPy_Convert.h" #include "../BPy_Id.h" #include "../Interface0D/BPy_SVertex.h" +#include "../Interface1D/BPy_ViewEdge.h" #include "../BPy_Nature.h" #ifdef __cplusplus @@ -19,8 +20,7 @@ static PyObject * FEdge_vertexB( BPy_FEdge *self ); static PyObject * FEdge___getitem__( BPy_FEdge *self, PyObject *args ); static PyObject * FEdge_nextEdge( BPy_FEdge *self ); static PyObject * FEdge_previousEdge( BPy_FEdge *self ); -static PyObject * FEdge_getVertices( BPy_FEdge *self ); -static PyObject * FEdge_getPoints( BPy_FEdge *self ); +static PyObject * FEdge_viewedge( BPy_FEdge *self ); static PyObject * FEdge_isSmooth( BPy_FEdge *self ); static PyObject * FEdge_setVertexA( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_setVertexB( BPy_FEdge *self , PyObject *args); @@ -29,6 +29,11 @@ static PyObject * FEdge_setNextEdge( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_setPreviousEdge( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_setSmooth( BPy_FEdge *self , PyObject *args); static PyObject * FEdge_setNature( BPy_FEdge *self, PyObject *args ); +static PyObject * FEdge_setViewEdge( BPy_FEdge *self, PyObject *args ); +static PyObject * FEdge_verticesBegin( BPy_FEdge *self ); +static PyObject * FEdge_verticesEnd( BPy_FEdge *self ); +static PyObject * FEdge_pointsBegin( BPy_FEdge *self, PyObject *args ); +static PyObject * FEdge_pointsEnd( BPy_FEdge *self, PyObject *args ); /*----------------------FEdge instance definitions ----------------------------*/ static PyMethodDef BPy_FEdge_methods[] = { @@ -38,8 +43,7 @@ static PyMethodDef BPy_FEdge_methods[] = { {"__getitem__", ( PyCFunction ) FEdge___getitem__, METH_VARARGS, "(int i) Returns the first SVertex if i=0, the seccond SVertex if i=1."}, {"nextEdge", ( PyCFunction ) FEdge_nextEdge, METH_NOARGS, "() Returns the FEdge following this one in the ViewEdge. If this FEdge is the last of the ViewEdge, 0 is returned."}, {"previousEdge", ( PyCFunction ) FEdge_previousEdge, METH_NOARGS, "Returns the Edge preceding this one in the ViewEdge. If this FEdge is the first one of the ViewEdge, 0 is returned."}, - {"getVertices", ( PyCFunction ) FEdge_getVertices, METH_NOARGS, "Returns the vertices"}, - {"getPoints", ( PyCFunction ) FEdge_getPoints, METH_NOARGS, "Returns the points. The difference with getVertices() is that here we can iterate over points of the 1D element at any given sampling. At each call, a virtual point is created."}, + {"viewedge", ( PyCFunction ) FEdge_viewedge, METH_NOARGS, "Returns a pointer to the ViewEdge to which this FEdge belongs to."}, {"isSmooth", ( PyCFunction ) FEdge_isSmooth, METH_NOARGS, "() Returns true if this FEdge is a smooth FEdge."}, {"setVertexA", ( PyCFunction ) FEdge_setVertexA, METH_VARARGS, "(SVertex v) Sets the first SVertex. ."}, {"setVertexB", ( PyCFunction ) FEdge_setVertexB, METH_VARARGS, "(SVertex v) Sets the second SVertex. "}, @@ -47,7 +51,12 @@ static PyMethodDef BPy_FEdge_methods[] = { {"setNextEdge", ( PyCFunction ) FEdge_setNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "}, {"setPreviousEdge", ( PyCFunction ) FEdge_setPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "}, {"setSmooth", ( PyCFunction ) FEdge_setSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "}, + {"setViewEdge", ( PyCFunction ) FEdge_setViewEdge, METH_VARARGS, "(ViewEdge ve) Sets the ViewEdge to which this FEdge belongs to."}, {"setNature", ( PyCFunction ) FEdge_setNature, METH_VARARGS, "(Nature n) Sets the nature of this FEdge. "}, + {"verticesBegin", ( PyCFunction ) FEdge_verticesBegin, METH_NOARGS, "() Returns an iterator over the 2 (!) SVertex pointing to the first SVertex."}, + {"verticesEnd", ( PyCFunction ) FEdge_verticesEnd, METH_NOARGS, "() Returns an iterator over the 2 (!) SVertex pointing after the last SVertex. "}, + {"pointsBegin", ( PyCFunction ) FEdge_pointsBegin, METH_VARARGS, "(float t=0) Returns an iterator over the FEdge points, pointing to the first point. The difference with verticesBegin() is that here we can iterate over points of the FEdge at a any given sampling t. Indeed, for each iteration, a virtual point is created."}, + {"pointsEnd", ( PyCFunction ) FEdge_pointsEnd, METH_VARARGS, "(float t=0) Returns an iterator over the FEdge points, pointing after the last point. The difference with verticesEnd() is that here we can iterate over points of the FEdge at a any given sampling t. Indeed, for each iteration, a virtual point is created."}, {NULL, NULL, 0, NULL} }; @@ -219,6 +228,13 @@ PyObject * FEdge_previousEdge( BPy_FEdge *self ) { Py_RETURN_NONE; } +PyObject * FEdge_viewedge( BPy_FEdge *self ) { + if( ViewEdge *ve = self->fe->viewedge() ) + return BPy_ViewEdge_from_ViewEdge( *ve ); + + Py_RETURN_NONE; +} + PyObject * FEdge_isSmooth( BPy_FEdge *self ) { return PyBool_from_bool( self->fe->isSmooth() ); } @@ -289,6 +305,37 @@ PyObject *FEdge_setPreviousEdge( BPy_FEdge *self , PyObject *args) { Py_RETURN_NONE; } +PyObject * FEdge_setNature( BPy_FEdge *self, PyObject *args ) { + PyObject *py_n; + + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { + cout << "ERROR: FEdge_setNature" << endl; + Py_RETURN_NONE; + } + + PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); + self->fe->setNature( PyInt_AsLong(i) ); + + Py_RETURN_NONE; +} + + +PyObject * FEdge_setViewEdge( BPy_FEdge *self, PyObject *args ) { + PyObject *py_ve; + + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: FEdge_setViewEdge" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = ((BPy_ViewEdge *) py_ve)->ve; + self->fe->setViewEdge( ve ); + + Py_RETURN_NONE; +} + + + PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { int b; @@ -302,40 +349,41 @@ PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { Py_RETURN_NONE; } -PyObject * FEdge_setNature( BPy_FEdge *self, PyObject *args ) { - PyObject *py_n; - if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { - cout << "ERROR: FEdge_setNature" << endl; +PyObject * FEdge_verticesBegin( BPy_FEdge *self ) { + Interface0DIterator if0D_it( self->fe->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * FEdge_verticesEnd( BPy_FEdge *self ) { + Interface0DIterator if0D_it( self->fe->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + + +PyObject * FEdge_pointsBegin( BPy_FEdge *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: FEdge_pointsBegin" << endl; Py_RETURN_NONE; } - PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); - ((FEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) ); - - Py_RETURN_NONE; + Interface0DIterator if0D_it( self->fe->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } -PyObject *FEdge_getVertices( BPy_FEdge *self ) { - PyObject *py_vertices = PyList_New(NULL); - - for( Interface0DIterator it = self->fe->verticesBegin(); it != self->fe->verticesEnd(); it++ ) { - PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) ); +PyObject * FEdge_pointsEnd( BPy_FEdge *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: FEdge_pointsEnd" << endl; + Py_RETURN_NONE; } - return py_vertices; + Interface0DIterator if0D_it( self->fe->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } - -PyObject *FEdge_getPoints( BPy_FEdge *self ) { - PyObject *py_points = PyList_New(NULL); - - for( Interface0DIterator it = self->fe->pointsBegin(); it != self->fe->pointsEnd(); it++ ) { - PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) ); - } - - return py_points; -} - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp index 6e5be90bc82..af4e882a672 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp @@ -4,10 +4,9 @@ #include "../BPy_Id.h" #include "../Interface0D/BPy_SVertex.h" #include "../Interface0D/CurvePoint/BPy_StrokeVertex.h" +#include "../Iterator/BPy_StrokeVertexIterator.h" #include "../BPy_MediumType.h" -#include "../../stroke/StrokeIterators.h" - #ifdef __cplusplus extern "C" { #endif @@ -19,7 +18,7 @@ static int Stroke___init__(BPy_Stroke *self, PyObject *args, PyObject *kwds); static PyObject * Stroke_ComputeSampling( BPy_Stroke *self, PyObject *args ); static PyObject * Stroke_Resample( BPy_Stroke *self, PyObject *args ); -//static PyObject * Stroke_InsertVertex( BPy_Stroke *self, PyObject *args ); +static PyObject * Stroke_InsertVertex( BPy_Stroke *self, PyObject *args ); static PyObject * Stroke_RemoveVertex( BPy_Stroke *self, PyObject *args ); static PyObject * Stroke_getMediumType( BPy_Stroke *self ); static PyObject * Stroke_getTextureId( BPy_Stroke *self ); @@ -29,14 +28,20 @@ static PyObject * Stroke_setLength( BPy_Stroke *self , PyObject *args); static PyObject * Stroke_setMediumType( BPy_Stroke *self , PyObject *args); static PyObject * Stroke_setTextureId( BPy_Stroke *self , PyObject *args); static PyObject * Stroke_setTips( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_strokeVerticesBegin( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_strokeVerticesEnd( BPy_Stroke *self ); static PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ); -static PyObject * Stroke_getStrokeVertices( BPy_Stroke *self ); +static PyObject * Stroke_verticesBegin( BPy_Stroke *self ); +static PyObject * Stroke_verticesEnd( BPy_Stroke *self ); +static PyObject * Stroke_pointsBegin( BPy_Stroke *self , PyObject *args); +static PyObject * Stroke_pointsEnd( BPy_Stroke *self , PyObject *args); /*----------------------Stroke instance definitions ----------------------------*/ static PyMethodDef BPy_Stroke_methods[] = { {"ComputeSampling", ( PyCFunction ) Stroke_ComputeSampling, METH_VARARGS, "(int nVertices) Compute the sampling needed to get nVertices vertices. If the specified number of vertices is less than the actual number of vertices, the actual sampling value is returned."}, {"Resample", ( PyCFunction ) Stroke_Resample, METH_VARARGS, "(float f | int n) Resampling method. If the argument is a float, Resamples the curve with a given sampling; if this sampling is < to the actual sampling value, no resampling is done. If the argument is an integer, Resamples the curve so that it eventually has n. That means it is going to add n-vertices_size, if vertices_size is the number of points we already have. Is vertices_size >= n, no resampling is done."}, {"RemoveVertex", ( PyCFunction ) Stroke_RemoveVertex, METH_VARARGS, "(StrokeVertex sv) Removes the stroke vertex sv from the stroke. The length and curvilinear abscissa are updated consequently."}, + {"InsertVertex", ( PyCFunction ) Stroke_InsertVertex, METH_VARARGS, "(StrokeVertex sv, StrokeVertexIterator next) Inserts the stroke vertex iVertex in the stroke before next. The length, curvilinear abscissa are updated consequently."}, {"getMediumType", ( PyCFunction ) Stroke_getMediumType, METH_NOARGS, "() Returns the MediumType used for this Stroke."}, {"getTextureId", ( PyCFunction ) Stroke_getTextureId, METH_NOARGS, "() Returns the id of the texture used to simulate th marks system for this Stroke."}, {"hasTips", ( PyCFunction ) Stroke_hasTips, METH_NOARGS, "() Returns true if this Stroke uses a texture with tips, false otherwise."}, @@ -45,9 +50,14 @@ static PyMethodDef BPy_Stroke_methods[] = { {"setMediumType", ( PyCFunction ) Stroke_setMediumType, METH_VARARGS, "(MediumType mt) Sets the medium type that must be used for this Stroke."}, {"setTextureId", ( PyCFunction ) Stroke_setTextureId, METH_VARARGS, "(unsigned int id) Sets the texture id to be used to simulate the marks system for this Stroke."}, {"setTips", ( PyCFunction ) Stroke_setTips, METH_VARARGS, "(bool b) Sets the flag telling whether this stroke is using a texture with tips or not."}, + {"strokeVerticesBegin", ( PyCFunction ) Stroke_strokeVerticesBegin, METH_VARARGS, "(float t=0.f) Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can specifly a sampling value t to resample the Stroke on the fly if needed. "}, + {"strokeVerticesEnd", ( PyCFunction ) Stroke_strokeVerticesEnd, METH_NOARGS, "() Returns a StrokeVertexIterator pointing after the last StrokeVertex of the Stroke."}, {"strokeVerticesSize", ( PyCFunction ) Stroke_strokeVerticesSize, METH_NOARGS, "() Returns the number of StrokeVertex constituing the Stroke."}, - {"getStrokeVertices", ( PyCFunction ) Stroke_getStrokeVertices, METH_NOARGS, "() Returns the stroke vertices. The difference with vertices() is that here we can iterate over points of the 1D element at a any given sampling. Indeed, for each iteration, a virtual point is created."}, - //{"InsertVertex", ( PyCFunction ) Stroke_InsertVertex, METH_NOARGS, "(StrokeVertex sv, int i) Inserts the stroke vertex iVertex in the stroke before i. The length, curvilinear abscissa are updated consequently."}, + {"verticesBegin", ( PyCFunction ) Stroke_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing on the first StrokeVertex of the Stroke. "}, + {"verticesEnd", ( PyCFunction ) Stroke_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last StrokeVertex of the Stroke. "}, + {"pointsBegin", ( PyCFunction ) Stroke_pointsBegin, METH_VARARGS, "(float t=0.f) Returns an iterator over the Interface1D points, pointing to the first point. The difference with verticesBegin() is that here we can iterate over points of the 1D element at a any given sampling t. Indeed, for each iteration, a virtual point is created. "}, + {"pointsEnd", ( PyCFunction ) Stroke_pointsEnd, METH_VARARGS, "(float t=0.f) Returns an iterator over the Interface1D points, pointing after the last point. The difference with verticesEnd() is that here we can iterate over points of the 1D element at a any given sampling t. Indeed, for each iteration, a virtual point is created. "}, + {NULL, NULL, 0, NULL} }; @@ -194,6 +204,21 @@ PyObject * Stroke_Resample( BPy_Stroke *self, PyObject *args ) { Py_RETURN_NONE; } +PyObject * Stroke_InsertVertex( BPy_Stroke *self, PyObject *args ) { + PyObject *py_sv = 0, *py_sv_it = 0; + + if(!( PyArg_ParseTuple(args, "OO", &py_sv, &py_sv_it) && + BPy_StrokeVertex_Check(py_sv) && BPy_StrokeVertexIterator_Check(py_sv_it) )) { + cout << "ERROR: Stroke_InsertVertex" << endl; + Py_RETURN_NONE; + } + + StrokeVertex *sv = ((BPy_StrokeVertex *) py_sv)->sv; + StrokeInternal::StrokeVertexIterator sv_it(*( ((BPy_StrokeVertexIterator *) py_sv_it)->sv_it )); + self->s->InsertVertex( sv, sv_it ); + + Py_RETURN_NONE; +} PyObject * Stroke_RemoveVertex( BPy_Stroke *self, PyObject *args ) { PyObject *py_sv; @@ -209,9 +234,6 @@ PyObject * Stroke_RemoveVertex( BPy_Stroke *self, PyObject *args ) { Py_RETURN_NONE; } -// pb: 'iterator <=> list' correspondence -// void InsertVertex (StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next) - PyObject * Stroke_getMediumType( BPy_Stroke *self ) { return BPy_MediumType_from_MediumType( self->s->getMediumType() ); } @@ -291,26 +313,54 @@ PyObject *Stroke_setTips( BPy_Stroke *self , PyObject *args) { Py_RETURN_NONE; } +PyObject * Stroke_strokeVerticesBegin( BPy_Stroke *self , PyObject *args) { + StrokeInternal::StrokeVertexIterator sv_it( self->s->strokeVerticesBegin() ); + return BPy_StrokeVertexIterator_from_StrokeVertexIterator( sv_it ); +} -PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ) { +PyObject * Stroke_strokeVerticesEnd( BPy_Stroke *self ) { + StrokeInternal::StrokeVertexIterator sv_it( self->s->strokeVerticesEnd() ); + return BPy_StrokeVertexIterator_from_StrokeVertexIterator( sv_it ); +} + +PyObject * Stroke_strokeVerticesSize( BPy_Stroke *self ) { return PyInt_FromLong( self->s->strokeVerticesSize() ); } - -PyObject *Stroke_getStrokeVertices( BPy_Stroke *self ) { - PyObject *py_stroke_vertices = PyList_New(NULL); - - for( StrokeInternal::StrokeVertexIterator it = self->s->strokeVerticesBegin(); - it != self->s->strokeVerticesEnd(); - it++ ) { - PyList_Append( py_stroke_vertices, BPy_StrokeVertex_from_StrokeVertex( *it ) ); - } - - return py_stroke_vertices; +PyObject * Stroke_verticesBegin( BPy_Stroke *self ) { + Interface0DIterator if0D_it( self->s->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } +PyObject * Stroke_verticesEnd( BPy_Stroke *self ) { + Interface0DIterator if0D_it( self->s->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} +PyObject * Stroke_pointsBegin( BPy_Stroke *self , PyObject *args) { + float f = 0; + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: Stroke_pointsBegin" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->s->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * Stroke_pointsEnd( BPy_Stroke *self , PyObject *args) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: Stroke_pointsEnd" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->s->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus From c0f567e757cab55c1ed77d44a204c21023422859 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 25 Jul 2008 01:38:19 +0000 Subject: [PATCH 407/430] soc-2008-mxcurioni: fully implemented (but did not test) ViewEdge class. Modified functions accross API taking input boolean values. --- .../freestyle/intern/python/BPy_Convert.cpp | 12 +- .../freestyle/intern/python/BPy_Convert.h | 1 + .../intern/python/BPy_StrokeAttribute.cpp | 8 +- .../intern/python/Interface1D/BPy_FEdge.cpp | 6 +- .../python/Interface1D/BPy_ViewEdge.cpp | 454 +++++++++++------- 5 files changed, 290 insertions(+), 191 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 6ab2dc9ebfb..1edc4cf1e16 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -12,10 +12,11 @@ #include "Iterator/BPy_Interface0DIterator.h" #include "Iterator/BPy_orientedViewEdgeIterator.h" #include "Iterator/BPy_StrokeVertexIterator.h" -#include "BPy_SShape.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" +#include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" +#include "BPy_ViewShape.h" #ifdef __cplusplus extern "C" { @@ -152,6 +153,13 @@ PyObject * BPy_SShape_from_SShape( SShape& ss ) { return py_ss; } +PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) { + PyObject *py_vs = ViewShape_Type.tp_new( &ViewShape_Type, 0, 0 ); + ((BPy_ViewShape *) py_vs)->vs = new ViewShape( vs ); + + return py_vs; +} + PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); @@ -173,6 +181,8 @@ PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::S return py_sv_it; } + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 05f002656c7..ab80908cf8f 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -65,6 +65,7 @@ PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ); PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); +PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ); PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ); PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp index 24c0263bc5f..541ef4f4516 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp @@ -395,17 +395,19 @@ PyObject * StrokeAttribute_setThickness( BPy_StrokeAttribute *self, PyObject *ar } PyObject * StrokeAttribute_setVisible( BPy_StrokeAttribute *self, PyObject *args ) { - int i = 0; + PyObject *py_b; - if(!( PyArg_ParseTuple(args, "i", &i) )) { + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { cout << "ERROR: StrokeAttribute_setVisible" << endl; Py_RETURN_NONE; } - self->sa->setVisible( i ); + self->sa->setVisible( bool_from_PyBool(py_b) ); + Py_RETURN_NONE; } + PyObject * StrokeAttribute_setAttributeReal( BPy_StrokeAttribute *self, PyObject *args ) { char *s = 0; double d = 0; diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 3eaad2bd8c4..369dd7c61a5 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -337,14 +337,14 @@ PyObject * FEdge_setViewEdge( BPy_FEdge *self, PyObject *args ) { PyObject *FEdge_setSmooth( BPy_FEdge *self , PyObject *args) { - int b; + PyObject *py_b; - if(!( PyArg_ParseTuple(args, "i", &b) )) { + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { cout << "ERROR: FEdge_setSmooth" << endl; Py_RETURN_NONE; } - self->fe->setSmooth( (bool) b ); + self->fe->setSmooth( bool_from_PyBool(py_b) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp index 02d06757fcb..e32b90a2382 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp @@ -1,6 +1,12 @@ #include "BPy_ViewEdge.h" #include "../BPy_Convert.h" +#include "../BPy_Id.h" +#include "../Interface0D/BPy_ViewVertex.h" +#include "../Interface1D/BPy_FEdge.h" +#include "../Interface1D/BPy_ViewEdge.h" +#include "../BPy_Nature.h" +#include "../BPy_ViewShape.h" #ifdef __cplusplus extern "C" { @@ -13,13 +19,54 @@ static int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) static PyObject * ViewEdge_A( BPy_ViewEdge *self ); static PyObject * ViewEdge_B( BPy_ViewEdge *self ); +static PyObject * ViewEdge_fedgeA( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_fedgeB( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_viewShape( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_aShape( BPy_ViewEdge *self ) ; +static PyObject * ViewEdge_isClosed( BPy_ViewEdge *self ); +static PyObject * ViewEdge_getChainingTimeStamp( BPy_ViewEdge *self ); +static PyObject * ViewEdge_setChainingTimeStamp( BPy_ViewEdge *self, PyObject *args) ; +static PyObject * ViewEdge_setA( BPy_ViewEdge *self , PyObject *args) ; +static PyObject * ViewEdge_setB( BPy_ViewEdge *self , PyObject *args); +static PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_setFEdgeA( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setFEdgeB( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setShape( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_setId( BPy_ViewEdge *self, PyObject *args ) ; +static PyObject * ViewEdge_UpdateFEdges( BPy_ViewEdge *self ); +static PyObject * ViewEdge_setaShape( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_setQI( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_verticesBegin( BPy_ViewEdge *self ); +static PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self ); +static PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args ); +static PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ); /*----------------------ViewEdge instance definitions ----------------------------*/ static PyMethodDef BPy_ViewEdge_methods[] = { - {"A", ( PyCFunction ) ViewEdge_A, METH_NOARGS, "() Returns the first ViewVertex."}, {"B", ( PyCFunction ) ViewEdge_B, METH_NOARGS, "() Returns the second ViewVertex."}, + {"fedgeA", ( PyCFunction ) ViewEdge_fedgeA, METH_NOARGS, "() Returns the first FEdge that constitues this ViewEdge."}, + {"fedgeB", ( PyCFunction ) ViewEdge_fedgeB, METH_NOARGS, "() Returns the last FEdge that constitues this ViewEdge."}, + {"viewShape", ( PyCFunction ) ViewEdge_viewShape, METH_NOARGS, "() Returns the ViewShape to which this ViewEdge belongs to . "}, + {"aShape", ( PyCFunction ) ViewEdge_aShape, METH_NOARGS, "() Returns the shape that is occluded by the ViewShape to which this ViewEdge belongs to. If no object is occluded, 0 is returned."}, + {"isClosed", ( PyCFunction ) ViewEdge_isClosed, METH_NOARGS, "() Tells whether this ViewEdge forms a closed loop or not."}, + {"getChainingTimeStamp", ( PyCFunction ) ViewEdge_getChainingTimeStamp, METH_NOARGS, "() Returns the time stamp of this ViewEdge."}, + {"setChainingTimeStamp", ( PyCFunction ) ViewEdge_setChainingTimeStamp, METH_VARARGS, "(int ts) Sets the time stamp value."}, + {"setA", ( PyCFunction ) ViewEdge_setA, METH_VARARGS, "(ViewVertex sv) Sets the first ViewVertex of the ViewEdge."}, + {"setB", ( PyCFunction ) ViewEdge_setB, METH_VARARGS, "(ViewVertex sv) Sets the last ViewVertex of the ViewEdge."}, + {"setNature", ( PyCFunction ) ViewEdge_setNature, METH_VARARGS, "(Nature n) Sets the nature of the ViewEdge."}, + {"setFEdgeA", ( PyCFunction ) ViewEdge_setFEdgeA, METH_VARARGS, "(FEdge fe) Sets the first FEdge of the ViewEdge."}, + {"setFEdgeB", ( PyCFunction ) ViewEdge_setFEdgeB, METH_VARARGS, "(FEdge fe) Sets the last FEdge of the ViewEdge."}, + {"setShape", ( PyCFunction ) ViewEdge_setShape, METH_VARARGS, "(ViewShape vs) Sets the ViewShape to which this ViewEdge belongs to."}, + {"setId", ( PyCFunction ) ViewEdge_setId, METH_VARARGS, "(Id id) Sets the ViewEdge id."}, + {"UpdateFEdges", ( PyCFunction ) ViewEdge_UpdateFEdges, METH_NOARGS, "() Sets ViewEdge to this for all embedded fedges"}, + {"setaShape", ( PyCFunction ) ViewEdge_setaShape, METH_VARARGS, "(ViewShape vs) Sets the occluded ViewShape"}, + {"setQI", ( PyCFunction ) ViewEdge_setQI, METH_VARARGS, "(int qi) Sets the quantitative invisibility value."}, + {"verticesBegin", ( PyCFunction ) ViewEdge_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator to iterate over the SVertex constituing the embedding of this ViewEdge. The returned Interface0DIterator points to the first SVertex of the ViewEdge."}, + {"verticesEnd", ( PyCFunction ) ViewEdge_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator to iterate over the SVertex constituing the embedding of this ViewEdge. The returned Interface0DIterator points after the last SVertex of the ViewEdge."}, + {"pointsBegin", ( PyCFunction ) ViewEdge_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points on the first Point of the ViewEdge."}, + {"pointsEnd", ( PyCFunction ) ViewEdge_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator to iterate over the points of this ViewEdge at a given resolution t. The returned Interface0DIterator points after the last Point of the ViewEdge."}, {NULL, NULL, 0, NULL} }; @@ -120,195 +167,234 @@ int ViewEdge___init__(BPy_ViewEdge *self, PyObject *args, PyObject *kwds) PyObject * ViewEdge_A( BPy_ViewEdge *self ) { - // if( self->ve->A() ){ - // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() ); - // } - // - Py_RETURN_NONE; -} - -PyObject * ViewEdge_B( BPy_ViewEdge *self ) { - // if( self->ve->B() ){ - // return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() ); - // } + if( self->ve->A() ){ + return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->A() ); + } Py_RETURN_NONE; } -// -// PyObject * ViewEdge___getitem__( BPy_ViewEdge *self, PyObject *args ) { -// int i; -// -// if(!( PyArg_ParseTuple(args, "i", &i) && (i == 0 || i == 1) )) { -// cout << "ERROR: ViewEdge___getitem__" << endl; -// Py_RETURN_NONE; -// } -// -// if( SVertex *v = self->ve->operator[](i) ) -// return BPy_SVertex_from_SVertex( *v ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_nextEdge( BPy_ViewEdge *self ) { -// if( ViewEdge *fe = self->ve->nextEdge() ) -// return BPy_ViewEdge_from_ViewEdge( *fe ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_previousEdge( BPy_ViewEdge *self ) { -// if( ViewEdge *fe = self->ve->previousEdge() ) -// return BPy_ViewEdge_from_ViewEdge( *fe ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_isSmooth( BPy_ViewEdge *self ) { -// return PyBool_from_bool( self->ve->isSmooth() ); -// } -// -// PyObject *ViewEdge_setVertexA( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_sv; -// -// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { -// cout << "ERROR: ViewEdge_setVertexA" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setVertexA( ((BPy_SVertex *) py_sv)->sv ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setVertexB( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_sv; -// -// if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { -// cout << "ERROR: ViewEdge_setVertexB" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setVertexB( ((BPy_SVertex *) py_sv)->sv ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setId( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_id; -// -// if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { -// cout << "ERROR: ViewEdge_setId" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setId(*( ((BPy_Id *) py_id)->id )); -// -// Py_RETURN_NONE; -// } -// -// -// PyObject *ViewEdge_setNextEdge( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_fe; -// -// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { -// cout << "ERROR: ViewEdge_setNextEdge" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setNextEdge( ((BPy_ViewEdge *) py_fe)->ve ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setPreviousEdge( BPy_ViewEdge *self , PyObject *args) { -// PyObject *py_fe; -// -// if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_ViewEdge_Check(py_fe) )) { -// cout << "ERROR: ViewEdge_setPreviousEdge" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setPreviousEdge( ((BPy_ViewEdge *) py_fe)->ve ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_setSmooth( BPy_ViewEdge *self , PyObject *args) { -// int b; -// -// if(!( PyArg_ParseTuple(args, "i", &b) )) { -// cout << "ERROR: ViewEdge_setSmooth" << endl; -// Py_RETURN_NONE; -// } -// -// self->ve->setSmooth( (bool) b ); -// -// Py_RETURN_NONE; -// } -// -// PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) { -// PyObject *py_n; -// -// if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { -// cout << "ERROR: ViewEdge_setNature" << endl; -// Py_RETURN_NONE; -// } -// -// PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); -// ((ViewEdge *) self->py_if1D.if1D)->setNature( PyInt_AsLong(i) ); -// -// Py_RETURN_NONE; -// } -// -// PyObject *ViewEdge_getVertices( BPy_ViewEdge *self ) { -// PyObject *py_vertices = PyList_New(NULL); -// -// for( Interface0DIterator it = self->ve->verticesBegin(); it != self->ve->verticesEnd(); it++ ) { -// PyList_Append( py_vertices, BPy_Interface0D_from_Interface0D( *it ) ); -// } -// -// return py_vertices; -// } -// -// PyObject *ViewEdge_getPoints( BPy_ViewEdge *self ) { -// PyObject *py_points = PyList_New(NULL); -// -// for( Interface0DIterator it = self->ve->pointsBegin(); it != self->ve->pointsEnd(); it++ ) { -// PyList_Append( py_points, BPy_Interface0D_from_Interface0D( *it ) ); -// } -// -// return py_points; -// } -// -// -// -// -// -// FEdge * fedgeA () -// FEdge * fedgeB () -// ViewShape * viewShape () -// ViewShape * aShape () -// bool isClosed () -// unsigned getChainingTimeStamp () -// void SetA (ViewVertex *iA) -// void SetB (ViewVertex *iB) -// void SetNature (Nature::EdgeNature iNature) -// void SetFEdgeA (FEdge *iFEdge) -// void SetFEdgeB (FEdge *iFEdge) -// void SetShape (ViewShape *iVShape) -// void SetId (const Id &id) -// void UpdateFEdges () -// void SetaShape (ViewShape *iShape) -// void SetQI (int qi) -// void setChainingTimeStamp (unsigned ts) -// real getLength2D () const -// virtual Interface0DIterator verticesBegin () -// virtual Interface0DIterator verticesEnd () -// virtual Interface0DIterator pointsBegin (float t=0.f) -// virtual Interface0DIterator pointsEnd (float t=0.f) +PyObject * ViewEdge_B( BPy_ViewEdge *self ) { + if( self->ve->B() ){ + return BPy_ViewVertex_from_ViewVertex_ptr( self->ve->B() ); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_fedgeA( BPy_ViewEdge *self ) { + if( self->ve->fedgeA() ){ + return BPy_FEdge_from_FEdge(*( self->ve->fedgeA() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_fedgeB( BPy_ViewEdge *self ) { + if( self->ve->fedgeB() ){ + return BPy_FEdge_from_FEdge(*( self->ve->fedgeB() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_viewShape( BPy_ViewEdge *self ) { + if( self->ve->viewShape() ){ + return BPy_ViewShape_from_ViewShape(*( self->ve->viewShape() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_aShape( BPy_ViewEdge *self ) { + if( self->ve->aShape() ){ + return BPy_ViewShape_from_ViewShape(*( self->ve->aShape() )); + } + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_isClosed( BPy_ViewEdge *self ) { + return PyBool_from_bool( self->ve->isClosed() ); +} + +PyObject * ViewEdge_getChainingTimeStamp( BPy_ViewEdge *self ) { + return PyInt_FromLong( self->ve->getChainingTimeStamp() ); +} + +PyObject * ViewEdge_setChainingTimeStamp( BPy_ViewEdge *self, PyObject *args) { + int timestamp = 0 ; + + if( !PyArg_ParseTuple(args, "i", ×tamp) ) { + cout << "ERROR: ViewEdge_setChainingTimeStamp" << endl; + Py_RETURN_NONE; + } + + self->ve->setChainingTimeStamp( timestamp ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdge_setA( BPy_ViewEdge *self , PyObject *args) { + PyObject *py_vv; + + if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) { + cout << "ERROR: ViewEdge_setA" << endl; + Py_RETURN_NONE; + } + + self->ve->setA( ((BPy_ViewVertex *) py_vv)->vv ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdge_setB( BPy_ViewEdge *self , PyObject *args) { + PyObject *py_vv; + + if(!( PyArg_ParseTuple(args, "O", &py_vv) && BPy_ViewVertex_Check(py_vv) )) { + cout << "ERROR: ViewEdge_setB" << endl; + Py_RETURN_NONE; + } + + self->ve->setB( ((BPy_ViewVertex *) py_vv)->vv ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setNature( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_n; + + if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) { + cout << "ERROR: ViewEdge_setNature" << endl; + Py_RETURN_NONE; + } + + PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i ); + self->ve->setNature( PyInt_AsLong(i) ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setFEdgeA( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: ViewEdge_setFEdgeA" << endl; + Py_RETURN_NONE; + } + + self->ve->setFEdgeA( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setFEdgeB( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_fe; + + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: ViewEdge_setFEdgeB" << endl; + Py_RETURN_NONE; + } + + self->ve->setFEdgeB( ((BPy_FEdge *) py_fe)->fe ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setShape( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_vs; + + if(!( PyArg_ParseTuple(args, "O", &py_vs) && BPy_ViewShape_Check(py_vs) )) { + cout << "ERROR: ViewEdge_setShape" << endl; + Py_RETURN_NONE; + } + + self->ve->setShape( ((BPy_ViewShape *) py_vs)->vs ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setId( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_id; + + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: ViewEdge_setId" << endl; + Py_RETURN_NONE; + } + + Id id(*( ((BPy_Id *) py_id)->id )); + self->ve->setId( id ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_UpdateFEdges( BPy_ViewEdge *self ) { + self->ve->UpdateFEdges(); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setaShape( BPy_ViewEdge *self, PyObject *args ) { + PyObject *py_vs; + + if(!( PyArg_ParseTuple(args, "O", &py_vs) && BPy_ViewShape_Check(py_vs) )) { + cout << "ERROR: ViewEdge_setaShape" << endl; + Py_RETURN_NONE; + } + + ViewShape *vs = ((BPy_ViewShape *) py_vs)->vs; + self->ve->setaShape( vs ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_setQI( BPy_ViewEdge *self, PyObject *args ) { + int qi; + + if(!( PyArg_ParseTuple(args, "i", &qi) )) { + cout << "ERROR: ViewEdge_setQI" << endl; + Py_RETURN_NONE; + } + + self->ve->setQI( qi ); + + Py_RETURN_NONE; +} + +PyObject * ViewEdge_verticesBegin( BPy_ViewEdge *self ) { + Interface0DIterator if0D_it( self->ve->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * ViewEdge_verticesEnd( BPy_ViewEdge *self ) { + Interface0DIterator if0D_it( self->ve->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} +PyObject * ViewEdge_pointsBegin( BPy_ViewEdge *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: ViewEdge_pointsBegin" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->ve->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * ViewEdge_pointsEnd( BPy_ViewEdge *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: ViewEdge_pointsEnd" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->ve->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} /////////////////////////////////////////////////////////////////////////////////////////// From dc385c59ea12ceb32e18baf4da46905327ea1103 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 25 Jul 2008 02:18:02 +0000 Subject: [PATCH 408/430] soc-2008-mxcurioni: fully implemented (but did not test) Curve class. --- source/blender/freestyle/SConscript | 1 + .../intern/python/BPy_Interface1D.cpp | 6 + .../intern/python/Interface1D/BPy_Curve.cpp | 341 ++++++++++++------ .../intern/python/Interface1D/BPy_Curve.h | 31 ++ 4 files changed, 277 insertions(+), 102 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index ed6beefd337..3b7d503ed43 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -73,6 +73,7 @@ python_sources = [ prefix + '/Interface0D/BPy_SVertex.cpp', prefix + '/Interface0D/BPy_ViewVertex.cpp', prefix + '/BPy_Interface1D.cpp', + prefix + '/Interface1D/BPy_Curve.cpp', prefix + '/Interface1D/BPy_FEdge.cpp', prefix + '/Interface1D/BPy_Stroke.cpp', prefix + '/Interface1D/BPy_ViewEdge.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index ec881b010ee..5166fca4aef 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -1,6 +1,7 @@ #include "BPy_Interface1D.h" #include "BPy_Convert.h" +#include "Interface1D/BPy_Curve.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_Stroke.h" #include "Interface1D/BPy_ViewEdge.h" @@ -137,6 +138,11 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) Py_INCREF( &Interface1D_Type ); PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type); + if( PyType_Ready( &Curve_Type ) < 0 ) + return; + Py_INCREF( &Curve_Type ); + PyModule_AddObject(module, "Curve", (PyObject *)&Curve_Type); + if( PyType_Ready( &FEdge_Type ) < 0 ) return; Py_INCREF( &FEdge_Type ); diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp index 4fac75b3f0d..b0f043a6525 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp @@ -1,112 +1,249 @@ - PyObject *_wrap_Curve_computeCurvatureAndOrientation(PyObject *self , PyObject *args) { +#include "BPy_Curve.h" + +#include "../BPy_Convert.h" +#include "../BPy_Id.h" +#include "../Interface0D/BPy_CurvePoint.h" +#include "../Interface0D/BPy_SVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Curve instance -----------*/ +static int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds); +static PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ); +static PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ); +static PyObject * Curve_empty( BPy_Curve *self ); +static PyObject * Curve_nSegments( BPy_Curve *self ); +// point_iterator points_begin (float step=0) +static PyObject * Curve_verticesBegin( BPy_Curve *self ); +static PyObject * Curve_verticesEnd( BPy_Curve *self ); +static PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ); +static PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args ); + +/*----------------------Curve instance definitions ----------------------------*/ +static PyMethodDef BPy_Curve_methods[] = { + {"push_vertex_back", ( PyCFunction ) Curve_push_vertex_back, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the front of the Curve."}, + {"push_vertex_front", ( PyCFunction ) Curve_push_vertex_front, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the end of the Curve."}, + {"empty", ( PyCFunction ) Curve_empty, METH_NOARGS, "() Returns true is the Curve doesn't have any Vertex yet."}, + {"nSegments", ( PyCFunction ) Curve_nSegments, METH_NOARGS, "() Returns the number of segments in the oplyline constituing the Curve."}, + {"verticesBegin", ( PyCFunction ) Curve_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve."}, + {"verticesEnd", ( PyCFunction ) Curve_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve."}, + {"pointsBegin", ( PyCFunction ) Curve_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, + {"pointsEnd", ( PyCFunction ) Curve_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Curve type definition ------------------------------*/ + +PyTypeObject Curve_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Curve", /* tp_name */ + sizeof( BPy_Curve ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Curve_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Interface1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Curve___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj = 0; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ){ + self->c = new Curve(); + + } else if( BPy_Curve_Check(obj) ) { + if( ((BPy_Curve *) obj)->c ) + self->c = new Curve(*( ((BPy_Curve *) obj)->c )); + else + return -1; + + } else if( BPy_Id_Check(obj) ) { + if( ((BPy_Id *) obj)->id ) + self->c = new Curve(*( ((BPy_Id *) obj)->id )); + else + return -1; + + } else { + return -1; + } + + self->py_if1D.if1D = self->c; + + return 0; } - PyObject *_wrap_Curve_push_vertex_back__SWIG_0(PyObject *self , PyObject *args) { +PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ) { + PyObject *obj; + + if(!( PyArg_ParseTuple(args, "O", &obj) )) { + cout << "ERROR: Curve_push_vertex_back" << endl; + Py_RETURN_NONE; + } + + if( BPy_CurvePoint_Check(obj) ) { + self->c->push_vertex_back( ((BPy_CurvePoint *) obj)->cp ); + } else if( BPy_SVertex_Check(obj) ) { + self->c->push_vertex_back( ((BPy_SVertex *) obj)->sv ); + } + + Py_RETURN_NONE; +} + +PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ) { + PyObject *obj; + + if(!( PyArg_ParseTuple(args, "O", &obj) )) { + cout << "ERROR: Curve_push_vertex_front" << endl; + Py_RETURN_NONE; + } + + if( BPy_CurvePoint_Check(obj) ) { + self->c->push_vertex_front( ((BPy_CurvePoint *) obj)->cp ); + } else if( BPy_SVertex_Check(obj) ) { + self->c->push_vertex_front( ((BPy_SVertex *) obj)->sv ); + } + + Py_RETURN_NONE; + } + +PyObject * Curve_empty( BPy_Curve *self ) { + return PyBool_from_bool( self->c->empty() ); +} + +PyObject * Curve_nSegments( BPy_Curve *self ) { + return PyInt_FromLong( self->c->nSegments() ); +} + +// point_iterator points_begin (float step=0) +// not implemented + + +PyObject * Curve_verticesBegin( BPy_Curve *self ) { + Interface0DIterator if0D_it( self->c->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * Curve_verticesEnd( BPy_Curve *self ) { + Interface0DIterator if0D_it( self->c->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } - PyObject *_wrap_Curve_push_vertex_back__SWIG_1(PyObject *self , PyObject *args) { +PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: FEdge_pointsBegin" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->c->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: FEdge_pointsEnd" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->c->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } - PyObject *_wrap_Curve_push_vertex_back(PyObject *self, PyObject *args) { + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_Curve_push_vertex_front__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_push_vertex_front__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_push_vertex_front(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Curve_empty(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_getLength2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_nSegments(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_setId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsBegin(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsEnd__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsEnd__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curvePointsEnd(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Curve_curveVerticesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_curveVerticesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_verticesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_verticesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsBegin__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsBegin__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsBegin(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsEnd__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsEnd__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curve_pointsEnd(PyObject *self, PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h new file mode 100644 index 00000000000..fd19612261a --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CURVE_H +#define FREESTYLE_PYTHON_CURVE_H + +#include "../BPy_Interface1D.h" +#include "../../stroke/Curve.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Curve_Type; + +#define BPy_Curve_Check(v) (( (PyObject *) v)->ob_type == &Curve_Type) + +/*---------------------------Python BPy_Curve structure definition----------*/ +typedef struct { + BPy_Interface1D py_if1D; + Curve *c; +} BPy_Curve; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVE_H */ From 51f9082c964fda6ba90aa5b503a06f22c5a9ee60 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 25 Jul 2008 21:56:06 +0000 Subject: [PATCH 409/430] soc-2008-mxcurioni: added (but did not test) NonTVertex and TVertex classes. All Interface0D structures have been implemented --- source/blender/freestyle/SConscript | 2 + .../intern/python/BPy_Interface0D.cpp | 12 + .../Interface0D/ViewVertex/BPy_NonTVertex.cpp | 316 +++++++++------ .../Interface0D/ViewVertex/BPy_NonTVertex.h | 31 ++ .../Interface0D/ViewVertex/BPy_TVertex.cpp | 371 ++++++++++-------- .../Interface0D/ViewVertex/BPy_TVertex.h | 31 ++ .../freestyle/intern/view_map/ViewMap.h | 4 +- .../freestyle/intern/view_map/ViewMapIO.cpp | 2 +- 8 files changed, 485 insertions(+), 284 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h create mode 100644 source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 3b7d503ed43..6bbf5c9ca4b 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -72,6 +72,8 @@ python_sources = [ prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp', prefix + '/Interface0D/BPy_SVertex.cpp', prefix + '/Interface0D/BPy_ViewVertex.cpp', + prefix + '/Interface0D/ViewVertex/BPy_NonTVertex.cpp', + prefix + '/Interface0D/ViewVertex/BPy_TVertex.cpp', prefix + '/BPy_Interface1D.cpp', prefix + '/Interface1D/BPy_Curve.cpp', prefix + '/Interface1D/BPy_FEdge.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp index defe76464eb..506fc3b4e9d 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp @@ -5,6 +5,8 @@ #include "Interface0D/CurvePoint/BPy_StrokeVertex.h" #include "Interface0D/BPy_SVertex.h" #include "Interface0D/BPy_ViewVertex.h" +#include "Interface0D/ViewVertex/BPy_NonTVertex.h" +#include "Interface0D/ViewVertex/BPy_TVertex.h" #include "Interface1D/BPy_FEdge.h" #include "BPy_Nature.h" @@ -164,6 +166,16 @@ PyMODINIT_FUNC Interface0D_Init( PyObject *module ) return; Py_INCREF( &StrokeVertex_Type ); PyModule_AddObject(module, "StrokeVertex", (PyObject *)&StrokeVertex_Type); + + if( PyType_Ready( &NonTVertex_Type ) < 0 ) + return; + Py_INCREF( &NonTVertex_Type ); + PyModule_AddObject(module, "NonTVertex", (PyObject *)&NonTVertex_Type); + + if( PyType_Ready( &TVertex_Type ) < 0 ) + return; + Py_INCREF( &TVertex_Type ); + PyModule_AddObject(module, "TVertex", (PyObject *)&TVertex_Type); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp index 772a385139e..206674a20a5 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp @@ -1,132 +1,192 @@ - PyObject *_wrap_NonTVertex_getExactTypeName(PyObject *self , PyObject *args) { +#include "BPy_NonTVertex.h" + +#include "../../BPy_Convert.h" +#include "../BPy_SVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for NonTVertex___init__ instance -----------*/ +static int NonTVertex___init__(BPy_NonTVertex *self, PyObject *args, PyObject *kwds); + +static PyObject * NonTVertex_castToSVertex( BPy_NonTVertex *self ); +static PyObject * NonTVertex_castToViewVertex( BPy_NonTVertex *self ); +static PyObject * NonTVertex_castToNonTVertex( BPy_NonTVertex *self ); +static PyObject * NonTVertex_svertex( BPy_NonTVertex *self ); +static PyObject * NonTVertex_setSVertex( BPy_NonTVertex *self, PyObject *args); + +/*----------------------NonTVertex instance definitions ----------------------------*/ +static PyMethodDef BPy_NonTVertex_methods[] = { +// {"__copy__", ( PyCFunction ) NonTVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {"castToSVertex", ( PyCFunction ) NonTVertex_castToSVertex, METH_NOARGS, "( )Cast the Interface0D in SVertex if it can be. "}, + {"castToViewVertex", ( PyCFunction ) NonTVertex_castToViewVertex, METH_NOARGS, "( )Cast the Interface0D in ViewVertex if it can be. "}, + {"castToNonTVertex", ( PyCFunction ) NonTVertex_castToNonTVertex, METH_NOARGS, "( )Cast the Interface0D in NonTVertex if it can be. "}, + {"svertex", ( PyCFunction ) NonTVertex_svertex, METH_NOARGS, "( )Returns the SVertex on top of which this NonTVertex is built. "}, + {"setSVertex", ( PyCFunction ) NonTVertex_setSVertex, METH_VARARGS, "(SVertex sv )Sets the SVertex on top of which this NonTVertex is built. "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_NonTVertex type definition ------------------------------*/ + +PyTypeObject NonTVertex_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "NonTVertex", /* tp_name */ + sizeof( BPy_NonTVertex ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_NonTVertex_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &ViewVertex_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)NonTVertex___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + + + +//------------------------INSTANCE METHODS ---------------------------------- + +int NonTVertex___init__(BPy_NonTVertex *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj = 0; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ){ + self->ntv = new NonTVertex(); + + } else if( BPy_SVertex_Check(obj) && ((BPy_SVertex *) obj)->sv ) { + self->ntv = new NonTVertex( ((BPy_SVertex *) obj)->sv ); + + } else { + return -1; + } + + self->py_vv.vv = self->ntv; + self->py_vv.py_if0D.if0D = self->ntv; + + return 0; +} + +PyObject * NonTVertex_castToSVertex( BPy_NonTVertex *self ) { + PyObject *py_sv = SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); + ((BPy_SVertex *) py_sv)->sv = self->ntv->castToSVertex(); + + return py_sv; +} + +PyObject * NonTVertex_castToViewVertex( BPy_NonTVertex *self ) { + PyObject *py_vv = ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); + ((BPy_ViewVertex *) py_vv)->vv = self->ntv->castToViewVertex(); + + return py_vv; +} + +PyObject * NonTVertex_castToNonTVertex( BPy_NonTVertex *self ) { + PyObject *py_ntv = NonTVertex_Type.tp_new( &NonTVertex_Type, 0, 0 ); + ((BPy_NonTVertex *) py_ntv)->ntv = self->ntv->castToNonTVertex(); + + return py_ntv; +} + +PyObject * NonTVertex_svertex( BPy_NonTVertex *self ) { + if( self->ntv->svertex() ){ + return BPy_SVertex_from_SVertex(*( self->ntv->svertex() )); + } + + Py_RETURN_NONE; +} + +PyObject * NonTVertex_setSVertex( BPy_NonTVertex *self, PyObject *args) { + PyObject *py_sv; + + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: NonTVertex_setSVertex" << endl; + Py_RETURN_NONE; + } + + self->ntv->setSVertex( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; } - PyObject *_wrap_NonTVertex_getX(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_NonTVertex_getY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getPoint3D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getProjectedX(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getProjectedY(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getProjectedZ(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getPoint2D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_getId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_castToSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_castToViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_castToNonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_NonTVertex__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_NonTVertex__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_NonTVertex(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_delete_NonTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_svertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_viewedges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_SetSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_SetViewEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_AddIncomingViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_AddOutgoingViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_AddViewEdge__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_AddViewEdge(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_Replace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edges_end(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edgesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edgesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_NonTVertex_edgesIterator(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h new file mode 100644 index 00000000000..13b520d81db --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_NONTVERTEX_H +#define FREESTYLE_PYTHON_NONTVERTEX_H + +#include "../BPy_ViewVertex.h" +#include "../../../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject NonTVertex_Type; + +#define BPy_NonTVertex_Check(v) (( (PyObject *) v)->ob_type == &NonTVertex_Type) + +/*---------------------------Python BPy_NonTVertex structure definition----------*/ +typedef struct { + BPy_ViewVertex py_vv; + NonTVertex *ntv; +} BPy_NonTVertex; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_NONTVERTEX_H */ diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp index 715170c1422..ab8bb72604c 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp @@ -1,184 +1,249 @@ - PyObject *_wrap_TVertex_getExactTypeName(PyObject *self , PyObject *args) { +#include "BPy_TVertex.h" + +#include "../../BPy_Convert.h" +#include "../BPy_SVertex.h" +#include "../../BPy_Id.h" +#include "../../Interface1D/BPy_FEdge.h" +#include "../../Interface1D/BPy_ViewEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TVertex___init__ instance -----------*/ +static int TVertex___init__(BPy_TVertex *self, PyObject *args, PyObject *kwds); + +static PyObject * TVertex_castToViewVertex( BPy_TVertex *self ); +static PyObject * TVertex_castToTVertex( BPy_TVertex *self ); +static PyObject * TVertex_frontSVertex( BPy_TVertex *self ); +static PyObject * TVertex_backSVertex( BPy_TVertex *self ); +static PyObject * TVertex_setFrontSVertex( BPy_TVertex *self, PyObject *args); +static PyObject * TVertex_setBackSVertex( BPy_TVertex *self, PyObject *args); +static PyObject * TVertex_setId( BPy_TVertex *self, PyObject *args); +static PyObject * TVertex_getSVertex( BPy_TVertex *self, PyObject *args); +static PyObject * TVertex_mate( BPy_TVertex *self, PyObject *args); + +/*----------------------TVertex instance definitions ----------------------------*/ +static PyMethodDef BPy_TVertex_methods[] = { +// {"__copy__", ( PyCFunction ) TVertex___copy__, METH_NOARGS, "( )Cloning method."}, + {"castToViewVertex", ( PyCFunction ) TVertex_castToViewVertex, METH_NOARGS, "( )Cast the Interface0D in ViewVertex if it can be. "}, + {"castToTVertex", ( PyCFunction ) TVertex_castToTVertex, METH_NOARGS, "( )Cast the Interface0D in TVertex if it can be. "}, + {"frontSVertex", ( PyCFunction ) TVertex_frontSVertex, METH_NOARGS, "( )Returns the SVertex that is closer to the viewpoint. "}, + {"backSVertex", ( PyCFunction ) TVertex_backSVertex, METH_NOARGS, "( )Returns the SVertex that is further away from the viewpoint. "}, + {"setFrontSVertex", ( PyCFunction ) TVertex_setFrontSVertex, METH_VARARGS, "(SVertex sv )Sets the SVertex that is closer to the viewpoint. "}, + {"setBackSVertex", ( PyCFunction ) TVertex_setBackSVertex, METH_VARARGS, "(SVertex sv )Sets the SVertex that is further away from the viewpoint. "}, + {"setId", ( PyCFunction ) TVertex_setId, METH_VARARGS, "(Id id )Sets the Id."}, + {"getSVertex", ( PyCFunction ) TVertex_getSVertex, METH_VARARGS, "(FEdge fe )Returns the SVertex (among the 2) belonging to the FEdge iFEdge "}, + {"mate", ( PyCFunction ) TVertex_mate, METH_VARARGS, "(ViewEdge ve )Returns the mate edge of iEdgeA. For example, if iEdgeA is frontEdgeA, then frontEdgeB is returned. If iEdgeA is frontEdgeB then frontEdgeA is returned. Same for back edges"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_TVertex type definition ------------------------------*/ + +PyTypeObject TVertex_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TVertex", /* tp_name */ + sizeof( BPy_TVertex ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_TVertex_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &ViewVertex_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TVertex___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + + + +//------------------------INSTANCE METHODS ---------------------------------- + +int TVertex___init__(BPy_TVertex *self, PyObject *args, PyObject *kwds) +{ + self->tv = new TVertex(); + self->py_vv.vv = self->tv; + self->py_vv.py_if0D.if0D = self->tv; + + return 0; } - PyObject *_wrap_TVertex_getX(PyObject *self , PyObject *args) { +PyObject * TVertex_castToViewVertex( BPy_TVertex *self ) { + PyObject *py_vv = ViewVertex_Type.tp_new( &ViewVertex_Type, 0, 0 ); + ((BPy_ViewVertex *) py_vv)->vv = self->tv->castToViewVertex(); + + return py_vv; } +PyObject * TVertex_castToTVertex( BPy_TVertex *self ) { + PyObject *py_tv = TVertex_Type.tp_new( &TVertex_Type, 0, 0 ); + ((BPy_TVertex *) py_tv)->tv = self->tv->castToTVertex(); - PyObject *_wrap_TVertex_getY(PyObject *self , PyObject *args) { + return py_tv; } +PyObject * TVertex_frontSVertex( BPy_TVertex *self ) { + if( self->tv->frontSVertex() ){ + return BPy_SVertex_from_SVertex(*( self->tv->frontSVertex() )); + } - PyObject *_wrap_TVertex_getZ(PyObject *self , PyObject *args) { + Py_RETURN_NONE; } +PyObject * TVertex_backSVertex( BPy_TVertex *self ) { + if( self->tv->backSVertex() ){ + return BPy_SVertex_from_SVertex(*( self->tv->backSVertex() )); + } - PyObject *_wrap_TVertex_getPoint3D(PyObject *self , PyObject *args) { + Py_RETURN_NONE; } +PyObject * TVertex_setFrontSVertex( BPy_TVertex *self, PyObject *args) { + PyObject *py_sv; - PyObject *_wrap_TVertex_getProjectedX(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: TVertex_setFrontSVertex" << endl; + Py_RETURN_NONE; + } + + self->tv->setFrontSVertex( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; } +PyObject * TVertex_setBackSVertex( BPy_TVertex *self, PyObject *args) { + PyObject *py_sv; - PyObject *_wrap_TVertex_getProjectedY(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_sv) && BPy_SVertex_Check(py_sv) )) { + cout << "ERROR: TVertex_setBackSVertex" << endl; + Py_RETURN_NONE; + } + + self->tv->setBackSVertex( ((BPy_SVertex *) py_sv)->sv ); + + Py_RETURN_NONE; } +PyObject * TVertex_setId( BPy_TVertex *self, PyObject *args) { + PyObject *py_id; - PyObject *_wrap_TVertex_getProjectedZ(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_id) && BPy_Id_Check(py_id) )) { + cout << "ERROR: TVertex_setId" << endl; + Py_RETURN_NONE; + } + + if( ((BPy_Id *) py_id)->id ) + self->tv->setId(*( ((BPy_Id *) py_id)->id )); + + Py_RETURN_NONE; } +PyObject * TVertex_getSVertex( BPy_TVertex *self, PyObject *args) { + PyObject *py_fe; - PyObject *_wrap_TVertex_getPoint2D(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_fe) && BPy_FEdge_Check(py_fe) )) { + cout << "ERROR: TVertex_getSVertex" << endl; + Py_RETURN_NONE; + } + + SVertex *sv = self->tv->getSVertex( ((BPy_FEdge *) py_fe)->fe ); + if( sv ){ + return BPy_SVertex_from_SVertex(*( sv )); + } + + Py_RETURN_NONE; } +PyObject * TVertex_mate( BPy_TVertex *self, PyObject *args) { + PyObject *py_ve; - PyObject *_wrap_TVertex_getId(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: TVertex_mate" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = self->tv->mate( ((BPy_ViewEdge *) py_ve)->ve ); + if( ve ){ + return BPy_ViewEdge_from_ViewEdge(*( ve )); + } + + Py_RETURN_NONE; } + +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_TVertex_castToViewVertex(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_TVertex_castToTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_TVertex__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_TVertex__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_TVertex(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_frontSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_backSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_frontEdgeA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_frontEdgeB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_backEdgeA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_backEdgeB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeA__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeA(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeB__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetFrontEdgeB(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeA__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeA(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeB__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetBackEdgeB(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_SetId(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_GetSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_Replace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_mate(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_edges_end__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_edges_end__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_edges_end(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_TVertex_edgesBegin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_edgesEnd(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_TVertex_edgesIterator(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_TVertex(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h new file mode 100644 index 00000000000..a4f564446ef --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_TVERTEX_H +#define FREESTYLE_PYTHON_TVERTEX_H + +#include "../BPy_ViewVertex.h" +#include "../../../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TVertex_Type; + +#define BPy_TVertex_Check(v) (( (PyObject *) v)->ob_type == &TVertex_Type) + +/*---------------------------Python BPy_TVertex structure definition----------*/ +typedef struct { + BPy_ViewVertex py_vv; + TVertex *tv; +} BPy_TVertex; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TVERTEX_H */ diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index 2ddeb198fff..e4b0d915ada 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -465,7 +465,7 @@ public: /* modifiers */ /*! Sets the SVertex that is closer to the viewpoint. */ - inline void setFrontVertex(SVertex *iFrontSVertex) {_FrontSVertex = iFrontSVertex;_FrontSVertex->setViewVertex(this);} + inline void setFrontSVertex(SVertex *iFrontSVertex) {_FrontSVertex = iFrontSVertex;_FrontSVertex->setViewVertex(this);} /*! Sets the SVertex that is further away from the viewpoint. */ inline void setBackSVertex(SVertex *iBackSVertex) {_BackSVertex = iBackSVertex;_BackSVertex->setViewVertex(this);} void setFrontEdgeA(ViewEdge *iFrontEdgeA, bool incoming=true); @@ -476,7 +476,7 @@ public: inline void setId(const Id& iId) {_Id = iId;} /*! Returns the SVertex (among the 2) belonging to the FEdge iFEdge */ - inline SVertex * GetSVertex(FEdge *iFEdge) + inline SVertex * getSVertex(FEdge *iFEdge) { const vector& vfEdges = _FrontSVertex->fedges(); vector::const_iterator fe,fend; diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp index 3591c67ce1f..e42a0df0422 100755 --- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp @@ -463,7 +463,7 @@ namespace ViewMapIO { // FrontSVertex SVertex* fsv; READ_IF_NON_NULL(fsv, g_vm->SVertices()); - tv->setFrontVertex(fsv); + tv->setFrontSVertex(fsv); // BackSVertex SVertex* bsv; From b216e4d12d8e4e416724d33a9a4c017d2809e5d0 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 26 Jul 2008 02:33:21 +0000 Subject: [PATCH 410/430] soc-2008-mxcurioni: implemented (but did not test) the following classes: Material, Chain, FEdgeSharp, FEdgeSmooth. All Interface1D classes have now been fully implemented. --- .../freestyle/intern/python/BPy_Convert.cpp | 7 + .../freestyle/intern/python/BPy_Convert.h | 6 + .../freestyle/intern/python/BPy_Freestyle.cpp | 2 + .../intern/python/BPy_FrsMaterial.cpp | 407 ++++++++++++++++++ .../freestyle/intern/python/BPy_FrsMaterial.h | 36 ++ .../intern/python/BPy_Interface1D.cpp | 19 + .../freestyle/intern/python/BPy_Material.cpp | 112 ----- .../freestyle/intern/python/BPy_Material.h | 0 .../python/Interface1D/Curve/BPy_Chain.cpp | 188 ++++++++ .../python/Interface1D/Curve/BPy_Chain.h | 31 ++ .../Interface1D/FEdge/BPy_FEdgeSharp.cpp | 238 +++++++++- .../python/Interface1D/FEdge/BPy_FEdgeSharp.h | 31 ++ .../Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 204 ++++++++- .../Interface1D/FEdge/BPy_FEdgeSmooth.h | 31 ++ 14 files changed, 1165 insertions(+), 147 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp create mode 100644 source/blender/freestyle/intern/python/BPy_FrsMaterial.h delete mode 100644 source/blender/freestyle/intern/python/BPy_Material.cpp delete mode 100644 source/blender/freestyle/intern/python/BPy_Material.h create mode 100644 source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h create mode 100644 source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 1edc4cf1e16..4d66b46420a 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -1,6 +1,7 @@ #include "BPy_Convert.h" #include "BPy_BBox.h" +#include "BPy_FrsMaterial.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -181,6 +182,12 @@ PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::S return py_sv_it; } +PyObject * BPy_FrsMaterial_from_Material( Material& m ){ + PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 ); + ((BPy_FrsMaterial*) py_m)->m = new Material( m ); + + return py_m; +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index ab80908cf8f..9bf535ead6a 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -17,6 +17,9 @@ using namespace Geometry; // Interface0D, Interface0DIteratorNested, Interface0DIterator #include "../view_map/Interface0D.h" +// Material +#include "../scene_graph/Material.h" + // Stroke, StrokeAttribute, StrokeVertex #include "../stroke/Stroke.h" @@ -36,6 +39,8 @@ using namespace Geometry; // StrokeInternal::StrokeVertexIterator #include "../stroke/StrokeIterators.h" + + #ifdef __cplusplus extern "C" { #endif @@ -57,6 +62,7 @@ PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); +PyObject * BPy_FrsMaterial_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); PyObject * BPy_SShape_from_SShape( SShape& ss ); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 0496060d0f3..13164d0a153 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -3,6 +3,7 @@ #include "BPy_BBox.h" #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" +#include "BPy_FrsMaterial.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -144,6 +145,7 @@ PyObject *Freestyle_Init( void ) BBox_Init( module ); BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); + FrsMaterial_Init( module ); Id_Init( module ); IntegrationType_Init( module ); Interface0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp new file mode 100644 index 00000000000..052583e4621 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -0,0 +1,407 @@ +#include "BPy_FrsMaterial.h" + +#include "BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FrsMaterial instance -----------*/ +static int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds); +static void FrsMaterial___dealloc__(BPy_FrsMaterial *self); +static PyObject * FrsMaterial___repr__(BPy_FrsMaterial *self); + +static PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specular( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emission( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ); + +/*----------------------FrsMaterial instance definitions ----------------------------*/ +static PyMethodDef BPy_FrsMaterial_methods[] = { + {"diffuse", ( PyCFunction ) FrsMaterial_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"}, + {"diffuseR", ( PyCFunction ) FrsMaterial_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "}, + {"diffuseG", ( PyCFunction ) FrsMaterial_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "}, + {"diffuseB", ( PyCFunction ) FrsMaterial_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "}, + {"diffuseA", ( PyCFunction ) FrsMaterial_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "}, + {"specular", ( PyCFunction ) FrsMaterial_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"}, + {"specularR", ( PyCFunction ) FrsMaterial_specularR, METH_NOARGS, "() Returns the red component of the specular color "}, + {"specularG", ( PyCFunction ) FrsMaterial_specularG, METH_NOARGS, "() Returns the green component of the specular color "}, + {"specularB", ( PyCFunction ) FrsMaterial_specularB, METH_NOARGS, "() Returns the blue component of the specular color "}, + {"specularA", ( PyCFunction ) FrsMaterial_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "}, + {"ambient", ( PyCFunction ) FrsMaterial_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"}, + {"ambientR", ( PyCFunction ) FrsMaterial_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "}, + {"ambientG", ( PyCFunction ) FrsMaterial_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "}, + {"ambientB", ( PyCFunction ) FrsMaterial_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "}, + {"ambientA", ( PyCFunction ) FrsMaterial_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "}, + {"emission", ( PyCFunction ) FrsMaterial_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"}, + {"emissionR", ( PyCFunction ) FrsMaterial_emissionR, METH_NOARGS, "() Returns the red component of the emission color "}, + {"emissionG", ( PyCFunction ) FrsMaterial_emissionG, METH_NOARGS, "() Returns the green component of the emission color "}, + {"emissionB", ( PyCFunction ) FrsMaterial_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "}, + {"emissionA", ( PyCFunction ) FrsMaterial_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "}, + {"shininess", ( PyCFunction ) FrsMaterial_shininess, METH_NOARGS, "() Returns the shininess coefficient "}, + {"setDiffuse", ( PyCFunction ) FrsMaterial_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"}, + {"setSpecular", ( PyCFunction ) FrsMaterial_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"}, + {"setAmbient", ( PyCFunction ) FrsMaterial_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"}, + {"setEmission", ( PyCFunction ) FrsMaterial_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"}, + {"setShininess", ( PyCFunction ) FrsMaterial_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_FrsMaterial type definition ------------------------------*/ + +PyTypeObject FrsMaterial_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FrsMaterial", /* tp_name */ + sizeof( BPy_FrsMaterial ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)FrsMaterial___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)FrsMaterial___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_FrsMaterial_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FrsMaterial___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &FrsMaterial_Type ) < 0 ) + return; + + Py_INCREF( &FrsMaterial_Type ); + PyModule_AddObject(module, "FrsMaterial", (PyObject *)&FrsMaterial_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj1 = 0; + float f1 = 0, f2 = 0., f3 = 0., f4 = 0., f5 = 0.; + + if (! PyArg_ParseTuple(args, "|Offff", &obj1, &f2, &f3, &f4, &f5) ) + return -1; + + if( !obj1 ){ + self->m = new Material(); + + } else if( BPy_FrsMaterial_Check(obj1) ) { + if( ((BPy_FrsMaterial *) obj1)->m ) + self->m = new Material(*( ((BPy_FrsMaterial *) obj1)->m )); + else + return -1; + + } else if( PyFloat_Check(obj1) ) { + f1 = PyFloat_AsDouble(obj1); + self->m = new Material(&f1, &f2, &f3, &f4, f5); + + } else { + return -1; + } + + return 0; +} + +void FrsMaterial___dealloc__( BPy_FrsMaterial* self) +{ + delete self->m; + self->ob_type->tp_free((PyObject*)self); +} + + +PyObject * FrsMaterial___repr__( BPy_FrsMaterial* self) +{ + return PyString_FromFormat("FrsMaterial - address: %p", self->m ); +} + +PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self) { + PyObject *tmp; + + const float *diffuse = self->m->diffuse(); + PyObject *py_diffuse = PyList_New(4); + + tmp = PyFloat_FromDouble( diffuse[0] ); PyList_SetItem( py_diffuse, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[1] ); PyList_SetItem( py_diffuse, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[2] ); PyList_SetItem( py_diffuse, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[3] ); PyList_SetItem( py_diffuse, 3, tmp); Py_DECREF(tmp); + + return py_diffuse; +} + +PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->diffuseR() ); +} + +PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->diffuseG() ); +} + +PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->diffuseB() ); +} + +PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->diffuseA() ); +} + +PyObject * FrsMaterial_specular( BPy_FrsMaterial* self) { + PyObject *tmp; + + const float *specular = self->m->specular(); + PyObject *py_specular = PyList_New(4); + + tmp = PyFloat_FromDouble( specular[0] ); PyList_SetItem( py_specular, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[1] ); PyList_SetItem( py_specular, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[2] ); PyList_SetItem( py_specular, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[3] ); PyList_SetItem( py_specular, 3, tmp); Py_DECREF(tmp); + + return py_specular; +} + +PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->specularR() ); +} + +PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->specularG() ); +} + +PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->specularB() ); +} + +PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->specularA() ); +} + +PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) { + PyObject *tmp; + + const float *ambient = self->m->ambient(); + PyObject *py_ambient = PyList_New(4); + + tmp = PyFloat_FromDouble( ambient[0] ); PyList_SetItem( py_ambient, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[1] ); PyList_SetItem( py_ambient, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[2] ); PyList_SetItem( py_ambient, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[3] ); PyList_SetItem( py_ambient, 3, tmp); Py_DECREF(tmp); + + return py_ambient; +} + +PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->ambientR() ); +} + +PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->ambientG() ); +} + +PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->ambientB() ); +} + +PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->ambientA() ); +} + +PyObject * FrsMaterial_emission( BPy_FrsMaterial* self) { + PyObject *tmp; + + const float *emission = self->m->emission(); + PyObject *py_emission = PyList_New(4); + + tmp = PyFloat_FromDouble( emission[0] ); PyList_SetItem( py_emission, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[1] ); PyList_SetItem( py_emission, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[2] ); PyList_SetItem( py_emission, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[3] ); PyList_SetItem( py_emission, 3, tmp); Py_DECREF(tmp); + + return py_emission; +} + +PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->emissionR() ); +} + +PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->emissionG() ); +} + +PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->emissionB() ); +} + +PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->emissionA() ); +} + +PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self) { + return PyFloat_FromDouble( self->m->shininess() ); +} + +PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: FrsMaterial_setDiffuse" << endl; + Py_RETURN_NONE; + } + + self->m->setDiffuse(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: FrsMaterial_setSpecular" << endl; + Py_RETURN_NONE; + } + + self->m->setSpecular(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: FrsMaterial_setAmbient" << endl; + Py_RETURN_NONE; + } + + self->m->setAmbient(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: FrsMaterial_setEmission" << endl; + Py_RETURN_NONE; + } + + self->m->setEmission(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ) { + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: FrsMaterial_setShininess" << endl; + Py_RETURN_NONE; + } + + self->m->setShininess(f); + + Py_RETURN_NONE; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h new file mode 100644 index 00000000000..90ed6805974 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_MATERIAL_H +#define FREESTYLE_PYTHON_MATERIAL_H + +#include "../scene_graph/Material.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FrsMaterial_Type; + +#define BPy_FrsMaterial_Check(v) (( (PyObject *) v)->ob_type == &FrsMaterial_Type) + +/*---------------------------Python BPy_FrsMaterial structure definition----------*/ +typedef struct { + PyObject_HEAD + Material *m; +} BPy_FrsMaterial; + +/*---------------------------Python BPy_FrsMaterial visible prototypes-----------*/ + +PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_MATERIAL_H */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 5166fca4aef..509dfb23894 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -2,9 +2,13 @@ #include "BPy_Convert.h" #include "Interface1D/BPy_Curve.h" +#include "Interface1D/Curve/BPy_Chain.h" #include "Interface1D/BPy_FEdge.h" +#include "Interface1D/FEdge/BPy_FEdgeSharp.h" +#include "Interface1D/FEdge/BPy_FEdgeSmooth.h" #include "Interface1D/BPy_Stroke.h" #include "Interface1D/BPy_ViewEdge.h" + #include "BPy_MediumType.h" #ifdef __cplusplus @@ -142,12 +146,27 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) return; Py_INCREF( &Curve_Type ); PyModule_AddObject(module, "Curve", (PyObject *)&Curve_Type); + + if( PyType_Ready( &Chain_Type ) < 0 ) + return; + Py_INCREF( &Chain_Type ); + PyModule_AddObject(module, "Chain", (PyObject *)&Chain_Type); if( PyType_Ready( &FEdge_Type ) < 0 ) return; Py_INCREF( &FEdge_Type ); PyModule_AddObject(module, "FEdge", (PyObject *)&FEdge_Type); + if( PyType_Ready( &FEdgeSharp_Type ) < 0 ) + return; + Py_INCREF( &FEdgeSharp_Type ); + PyModule_AddObject(module, "FEdgeSharp", (PyObject *)&FEdgeSharp_Type); + + if( PyType_Ready( &FEdgeSmooth_Type ) < 0 ) + return; + Py_INCREF( &FEdgeSmooth_Type ); + PyModule_AddObject(module, "FEdgeSmooth", (PyObject *)&FEdgeSmooth_Type); + if( PyType_Ready( &Stroke_Type ) < 0 ) return; Py_INCREF( &Stroke_Type ); diff --git a/source/blender/freestyle/intern/python/BPy_Material.cpp b/source/blender/freestyle/intern/python/BPy_Material.cpp deleted file mode 100644 index 459de449336..00000000000 --- a/source/blender/freestyle/intern/python/BPy_Material.cpp +++ /dev/null @@ -1,112 +0,0 @@ - PyObject *_wrap_Material_diffuse(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_diffuseR(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_diffuseG(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_diffuseB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_diffuseA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_specular(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_specularR(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_specularG(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_specularB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_specularA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_ambient(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_ambientR(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_ambientG(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_ambientB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_ambientA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_emission(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_emissionR(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_emissionG(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_emissionB(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_emissionA(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_shininess(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_SetDiffuse(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_SetSpecular(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_SetAmbient(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_SetEmission(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material_SetShininess(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material___ne__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Material___eq__(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/BPy_Material.h b/source/blender/freestyle/intern/python/BPy_Material.h deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp index e69de29bb2d..8b6240986b9 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -0,0 +1,188 @@ +#include "BPy_Chain.h" + +#include "../../BPy_Convert.h" +#include "../../BPy_Id.h" +#include "../BPy_ViewEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Chain instance -----------*/ +static int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds); +static PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ); +static PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ); + + +/*----------------------Chain instance definitions ----------------------------*/ +static PyMethodDef BPy_Chain_methods[] = { + {"push_viewedge_back", ( PyCFunction ) Chain_push_viewedge_back, METH_VARARGS, "(ViewEdge ve, bool orientation) Adds a ViewEdge at the end of the chain."}, + {"push_viewedge_front", ( PyCFunction ) Chain_push_viewedge_front, METH_VARARGS, "(ViewEdge ve, bool orientation) Adds a ViewEdge at the beginning of the chain."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Chain type definition ------------------------------*/ + +PyTypeObject Chain_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Chain", /* tp_name */ + sizeof( BPy_Chain ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Chain_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &Curve_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Chain___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + + +//------------------------INSTANCE METHODS ---------------------------------- + +int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds) +{ + + PyObject *obj = 0; + + if (! PyArg_ParseTuple(args, "|O", &obj) ) + return -1; + + if( !obj ){ + self->c = new Chain(); + + } else if( BPy_Chain_Check(obj) ) { + if( ((BPy_Chain *) obj)->c ) + self->c = new Chain(*( ((BPy_Chain *) obj)->c )); + else + return -1; + + } else if( BPy_Id_Check(obj) ) { + if( ((BPy_Id *) obj)->id ) + self->c = new Chain(*( ((BPy_Id *) obj)->id )); + else + return -1; + + } else { + return -1; + } + + self->py_c.c = self->c; + self->py_c.py_if1D.if1D = self->c; + + return 0; +} + + +PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) { + PyObject *obj1 = 0, *obj2 = 0; + + if(!( PyArg_ParseTuple(args, "OO", &obj1, &obj2) && BPy_ViewEdge_Check(obj1) && PyBool_Check(obj2) )) { + cout << "ERROR: Chain_push_viewedge_back" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = ((BPy_ViewEdge *) obj1)->ve; + bool orientation = bool_from_PyBool( obj2 ); + self->c->push_viewedge_back( ve, orientation); + + Py_RETURN_NONE; +} + +PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) { + PyObject *obj1 = 0, *obj2 = 0; + + if(!( PyArg_ParseTuple(args, "OO", &obj1, &obj2) && BPy_ViewEdge_Check(obj1) && PyBool_Check(obj2) )) { + cout << "ERROR: Chain_push_viewedge_front" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = ((BPy_ViewEdge *) obj1)->ve; + bool orientation = bool_from_PyBool( obj2 ); + self->c->push_viewedge_front(ve, orientation); + + Py_RETURN_NONE; +} + + + + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h new file mode 100644 index 00000000000..eaf80033098 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CHAIN_H +#define FREESTYLE_PYTHON_CHAIN_H + +#include "../BPy_Curve.h" +#include "../../../stroke/Chain.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Chain_Type; + +#define BPy_Chain_Check(v) (( (PyObject *) v)->ob_type == &Chain_Type) + +/*---------------------------Python BPy_Chain structure definition----------*/ +typedef struct { + BPy_Curve py_c; + Chain *c; +} BPy_Chain; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAIN_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index da409ffe209..22a4dbc378e 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -1,44 +1,250 @@ - PyObject *_wrap_FEdgeSharp_duplicate(PyObject *self , PyObject *args) { +#include "BPy_FEdgeSharp.h" + +#include "../../BPy_Convert.h" +#include "../../Interface0D/BPy_SVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FEdgeSharp instance -----------*/ +static int FEdgeSharp___init__(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds); + +static PyObject * FEdgeSharp_normalA( BPy_FEdgeSharp *self ) ; +static PyObject * FEdgeSharp_normalB( BPy_FEdgeSharp *self ); +static PyObject * FEdgeSharp_aMaterialIndex( BPy_FEdgeSharp *self ) ; +static PyObject * FEdgeSharp_bMaterialIndex( BPy_FEdgeSharp *self ); +static PyObject * FEdgeSharp_aMaterial( BPy_FEdgeSharp *self ); +static PyObject * FEdgeSharp_bMaterial( BPy_FEdgeSharp *self ); +static PyObject * FEdgeSharp_setNormalA( BPy_FEdgeSharp *self, PyObject *args ); +static PyObject * FEdgeSharp_setNormalB( BPy_FEdgeSharp *self, PyObject *args ); +static PyObject * FEdgeSharp_setaMaterialIndex( BPy_FEdgeSharp *self, PyObject *args ); +static PyObject * FEdgeSharp_setbMaterialIndex( BPy_FEdgeSharp *self, PyObject *args ); + +/*----------------------FEdgeSharp instance definitions ----------------------------*/ +static PyMethodDef BPy_FEdgeSharp_methods[] = { + {"normalA", ( PyCFunction ) FEdgeSharp_normalA, METH_NOARGS, "() Returns the normal to the face lying on the right of the FEdge. If this FEdge is a border, it has no Face on its right and therefore, no normal."}, + {"normalB", ( PyCFunction ) FEdgeSharp_normalB, METH_NOARGS, "() Returns the normal to the face lying on the left of the FEdge."}, + {"aMaterialIndex", ( PyCFunction ) FEdgeSharp_aMaterialIndex, METH_NOARGS, "() Returns the index of the material of the face lying on the right of the FEdge. If this FEdge is a border, it has no Face on its right and therefore, no material. "}, + {"bMaterialIndex", ( PyCFunction ) FEdgeSharp_bMaterialIndex, METH_NOARGS, "() Returns the material of the face lying on the left of the FEdge. "}, + {"aMaterial", ( PyCFunction ) FEdgeSharp_aMaterial, METH_NOARGS, "() Returns the material of the face lying on the right of the FEdge. If this FEdge is a border, it has no Face on its right and therefore, no material."}, + {"bMaterial", ( PyCFunction ) FEdgeSharp_bMaterial, METH_NOARGS, "() Returns the material of the face lying on the left of the FEdge."}, + {"setNormalA", ( PyCFunction ) FEdgeSharp_setNormalA, METH_VARARGS, "([x,y,z]) Sets the normal to the face lying on the right of the FEdge."}, + {"setNormalB", ( PyCFunction ) FEdgeSharp_setNormalB, METH_VARARGS, "([x,y,z]) Sets the normal to the face lying on the left of the FEdge. "}, + {"setaMaterialIndex", ( PyCFunction ) FEdgeSharp_setaMaterialIndex, METH_VARARGS, "(unsigned int i) Sets the index of the material lying on the right of the FEdge. "}, + {"setbMaterialIndex", ( PyCFunction ) FEdgeSharp_setbMaterialIndex, METH_VARARGS, "(unsigned int i) Sets the index of the material lying on the left of the FEdge. "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_FEdgeSharp type definition ------------------------------*/ + +PyTypeObject FEdgeSharp_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FEdgeSharp", /* tp_name */ + sizeof( BPy_FEdgeSharp ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_FEdgeSharp_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &FEdge_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FEdgeSharp___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FEdgeSharp___init__(BPy_FEdgeSharp *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj1 = 0, *obj2 = 0; + + if (! PyArg_ParseTuple(args, "|OO", &obj1, &obj2) ) + return -1; + + if( !obj1 ){ + self->fes = new FEdgeSharp(); + + } else if( BPy_FEdgeSharp_Check(obj1) ) { + if( ((BPy_FEdgeSharp *) obj1)->fes ) + self->fes = new FEdgeSharp(*( ((BPy_FEdgeSharp *) obj1)->fes )); + else + return -1; + + } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + self->fes = new FEdgeSharp( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); + + } else { + return -1; + } + + self->py_fe.fe = self->fes; + self->py_fe.py_if1D.if1D = self->fes; + + return 0; } - PyObject *_wrap_FEdgeSharp_normalA(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_normalA( BPy_FEdgeSharp *self ) { + Vec3r v( self->fes->normalA() ); + return Vector_from_Vec3r( v ); } - - PyObject *_wrap_FEdgeSharp_normalB(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_normalB( BPy_FEdgeSharp *self ) { + Vec3r v( self->fes->normalB() ); + return Vector_from_Vec3r( v ); } - - PyObject *_wrap_FEdgeSharp_aMaterialIndex(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_aMaterialIndex( BPy_FEdgeSharp *self ) { + return PyInt_FromLong( self->fes->aMaterialIndex() ); } - - PyObject *_wrap_FEdgeSharp_aMaterial(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_bMaterialIndex( BPy_FEdgeSharp *self ) { + return PyInt_FromLong( self->fes->bMaterialIndex() ); } - - PyObject *_wrap_FEdgeSharp_bMaterialIndex(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_aMaterial( BPy_FEdgeSharp *self ) { + Material m( self->fes->aMaterial() ); + return BPy_FrsMaterial_from_Material(m); } - - PyObject *_wrap_FEdgeSharp_bMaterial(PyObject *self , PyObject *args) { +PyObject * FEdgeSharp_bMaterial( BPy_FEdgeSharp *self ) { + Material m( self->fes->aMaterial() ); + return BPy_FrsMaterial_from_Material(m); } +PyObject * FEdgeSharp_setNormalA( BPy_FEdgeSharp *self, PyObject *args ) { + PyObject *obj = 0; - PyObject *_wrap_FEdgeSharp_SetNormalA(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) { + cout << "ERROR: FEdgeSharp_setNormalA" << endl; + Py_RETURN_NONE; + } + + Vec3r v( PyFloat_AsDouble( PyList_GetItem(obj,0) ), + PyFloat_AsDouble( PyList_GetItem(obj,1) ), + PyFloat_AsDouble( PyList_GetItem(obj,2) ) ); + + self->fes->setNormalA( v ); + + Py_RETURN_NONE; } +PyObject * FEdgeSharp_setNormalB( BPy_FEdgeSharp *self, PyObject *args ) { + PyObject *obj = 0; - PyObject *_wrap_FEdgeSharp_SetNormalB(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) { + cout << "ERROR: FEdgeSharp_setNormalB" << endl; + Py_RETURN_NONE; + } + + Vec3r v( PyFloat_AsDouble( PyList_GetItem(obj,0) ), + PyFloat_AsDouble( PyList_GetItem(obj,1) ), + PyFloat_AsDouble( PyList_GetItem(obj,2) ) ); + + self->fes->setNormalB( v ); + + Py_RETURN_NONE; } +PyObject * FEdgeSharp_setaMaterialIndex( BPy_FEdgeSharp *self, PyObject *args ) { + unsigned int i; - PyObject *_wrap_FEdgeSharp_SetaMaterialIndex(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "I", &i) )) { + cout << "ERROR: FEdgeSharp_setaMaterialIndex" << endl; + Py_RETURN_NONE; + } + + self->fes->setaMaterialIndex( i ); + + Py_RETURN_NONE; } +PyObject * FEdgeSharp_setbMaterialIndex( BPy_FEdgeSharp *self, PyObject *args ) { + unsigned int i; - PyObject *_wrap_FEdgeSharp_SetbMaterialIndex(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "I", &i) )) { + cout << "ERROR: FEdgeSharp_setbMaterialIndex" << endl; + Py_RETURN_NONE; + } + + self->fes->setbMaterialIndex( i ); + + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h new file mode 100644 index 00000000000..d08ef006941 --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_FEDGESHARP_H +#define FREESTYLE_PYTHON_FEDGESHARP_H + +#include "../BPy_FEdge.h" +#include "../../../view_map/Silhouette.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FEdgeSharp_Type; + +#define BPy_FEdgeSharp_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSharp_Type) + +/*---------------------------Python BPy_FEdgeSharp structure definition----------*/ +typedef struct { + BPy_FEdge py_fe; + FEdgeSharp *fes; +} BPy_FEdgeSharp; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FEDGESHARP_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index e453bbdc863..6a11b6c1e98 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -1,32 +1,198 @@ - PyObject *_wrap_FEdgeSmooth_dupplicate(PyObject *self , PyObject *args) { +#include "BPy_FEdgeSmooth.h" + +#include "../../BPy_Convert.h" +#include "../../Interface0D/BPy_SVertex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FEdgeSmooth instance -----------*/ +static int FEdgeSmooth___init__(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds); + +static PyObject * FEdgeSmooth_normal( BPy_FEdgeSmooth *self ) ; +static PyObject * FEdgeSmooth_materialIndex( BPy_FEdgeSmooth *self ) ; +static PyObject * FEdgeSmooth_material( BPy_FEdgeSmooth *self ); +static PyObject * FEdgeSmooth_setNormal( BPy_FEdgeSmooth *self, PyObject *args ); +static PyObject * FEdgeSmooth_setMaterialIndex( BPy_FEdgeSmooth *self, PyObject *args ); + + +/*----------------------FEdgeSmooth instance definitions ----------------------------*/ +static PyMethodDef BPy_FEdgeSmooth_methods[] = { + {"normal", ( PyCFunction ) FEdgeSmooth_normal, METH_NOARGS, "() Returns the normal to the Face it is running accross."}, + {"materialIndex", ( PyCFunction ) FEdgeSmooth_materialIndex, METH_NOARGS, "() Returns the index of the material of the face it is running accross. "}, + {"aMaterial", ( PyCFunction ) FEdgeSmooth_material, METH_NOARGS, "() Returns the material of the face it is running accross. "}, + {"setNormalA", ( PyCFunction ) FEdgeSmooth_setNormal, METH_VARARGS, "([x,y,z]) Sets the normal to the Face it is running accross."}, + {"setaMaterialIndex", ( PyCFunction ) FEdgeSmooth_setMaterialIndex, METH_VARARGS, "(unsigned int i) Sets the index of the material of the face it is running accross. "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_FEdgeSmooth type definition ------------------------------*/ + +PyTypeObject FEdgeSmooth_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FEdgeSmooth", /* tp_name */ + sizeof( BPy_FEdgeSmooth ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_FEdgeSmooth_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &FEdge_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FEdgeSmooth___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + + +int FEdgeSmooth___init__(BPy_FEdgeSmooth *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj1 = 0, *obj2 = 0; + + if (! PyArg_ParseTuple(args, "|OO", &obj1, &obj2) ) + return -1; + + if( !obj1 ){ + self->fes = new FEdgeSmooth(); + + } else if( BPy_FEdgeSmooth_Check(obj1) ) { + if( ((BPy_FEdgeSmooth *) obj1)->fes ) + self->fes = new FEdgeSmooth(*( ((BPy_FEdgeSmooth *) obj1)->fes )); + else + return -1; + + } else if( BPy_SVertex_Check(obj1) && BPy_SVertex_Check(obj2) ) { + self->fes = new FEdgeSmooth( ((BPy_SVertex *) obj1)->sv, ((BPy_SVertex *) obj2)->sv ); + + } else { + return -1; + } + + self->py_fe.fe = self->fes; + self->py_fe.py_if1D.if1D = self->fes; + + return 0; +} + +PyObject * FEdgeSmooth_normal( BPy_FEdgeSmooth *self ) { + Vec3r v( self->fes->normal() ); + return Vector_from_Vec3r( v ); +} + +PyObject * FEdgeSmooth_materialIndex( BPy_FEdgeSmooth *self ) { + return PyInt_FromLong( self->fes->materialIndex() ); } - PyObject *_wrap_FEdgeSmooth_face(PyObject *self , PyObject *args) { +PyObject * FEdgeSmooth_material( BPy_FEdgeSmooth *self ) { + Material m( self->fes->material() ); + return BPy_FrsMaterial_from_Material(m); } +PyObject * FEdgeSmooth_setNormal( BPy_FEdgeSmooth *self, PyObject *args ) { + PyObject *obj = 0; - PyObject *_wrap_FEdgeSmooth_normal(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) { + cout << "ERROR: FEdgeSmooth_setNormal" << endl; + Py_RETURN_NONE; + } + + Vec3r v( PyFloat_AsDouble( PyList_GetItem(obj,0) ), + PyFloat_AsDouble( PyList_GetItem(obj,1) ), + PyFloat_AsDouble( PyList_GetItem(obj,2) ) ); + + self->fes->setNormal( v ); + + Py_RETURN_NONE; } +PyObject * FEdgeSmooth_setMaterialIndex( BPy_FEdgeSmooth *self, PyObject *args ) { + unsigned int i; - PyObject *_wrap_FEdgeSmooth_materialIndex(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "I", &i) )) { + cout << "ERROR: FEdgeSmooth_setMaterialIndex" << endl; + Py_RETURN_NONE; + } + + self->fes->setMaterialIndex( i ); + + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_FEdgeSmooth_material(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_FEdgeSmooth_SetFace(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdgeSmooth_SetNormal(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_FEdgeSmooth_SetMaterialIndex(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h new file mode 100644 index 00000000000..6b26f65d81c --- /dev/null +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_FEDGESMOOTH_H +#define FREESTYLE_PYTHON_FEDGESMOOTH_H + +#include "../BPy_FEdge.h" +#include "../../../view_map/Silhouette.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FEdgeSmooth_Type; + +#define BPy_FEdgeSmooth_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSmooth_Type) + +/*---------------------------Python BPy_FEdgeSmooth structure definition----------*/ +typedef struct { + BPy_FEdge py_fe; + FEdgeSmooth *fes; +} BPy_FEdgeSmooth; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FEDGESMOOTH_H */ From 13364bf2085097a8183c65242b3aba8f7d5c163b Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 26 Jul 2008 19:32:47 +0000 Subject: [PATCH 411/430] soc-2008-mxcurioni: completed implementing ViewEdgeIterator and ChainingIterator. Updated UnaryPredicate{0D,1D} --- .../freestyle/intern/python/BPy_Iterator.cpp | 19 ++ .../intern/python/BPy_UnaryPredicate0D.cpp | 15 +- .../intern/python/BPy_UnaryPredicate1D.cpp | 11 +- .../python/Iterator/BPy_AdjacencyIterator.cpp | 8 +- .../python/Iterator/BPy_AdjacencyIterator.h | 2 +- .../Iterator/BPy_ChainPredicateIterator.cpp | 165 ++++++++++++++++ .../Iterator/BPy_ChainPredicateIterator.h | 33 ++++ ...or.cpp => BPy_ChainSilhouetteIterator.cpp} | 0 .../python/Iterator/BPy_ChainingIterator.cpp | 182 ++++++++++++++++++ .../python/Iterator/BPy_ChainingIterator.h | 33 ++++ .../BPy_ChainingSilhouetteIterator.cpp | 0 .../python/Iterator/BPy_ViewEdgeIterator.cpp | 88 +++++++-- 12 files changed, 532 insertions(+), 24 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h rename source/blender/freestyle/intern/python/Iterator/{BPy_ChainingPredicateIterator.cpp => BPy_ChainSilhouetteIterator.cpp} (100%) create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h delete mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index 6a613c5f5ab..f3612b1bd52 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -8,6 +8,10 @@ #include "Iterator/BPy_SVertexIterator.h" #include "Iterator/BPy_orientedViewEdgeIterator.h" #include "Iterator/BPy_ViewEdgeIterator.h" +#include "Iterator/BPy_ChainingIterator.h" +// #include "Iterator/BPy_ChainPredicateIterator.h" +// #include "Iterator/BPy_ChainSilhouetteIterator.h" + #ifdef __cplusplus @@ -167,6 +171,21 @@ PyMODINIT_FUNC Iterator_Init( PyObject *module ) Py_INCREF( &ViewEdgeIterator_Type ); PyModule_AddObject(module, "ViewEdgeIterator", (PyObject *)&ViewEdgeIterator_Type); + if( PyType_Ready( &ChainingIterator_Type ) < 0 ) + return; + Py_INCREF( &ChainingIterator_Type ); + PyModule_AddObject(module, "ChainingIterator", (PyObject *)&ChainingIterator_Type); + + // if( PyType_Ready( &ChainPredicateIterator_Type ) < 0 ) + // return; + // Py_INCREF( &ChainPredicateIterator_Type ); + // PyModule_AddObject(module, "ChainPredicateIterator", (PyObject *)&ChainPredicateIterator_Type); + // + // if( PyType_Ready( &ChainSilhouetteIterator_Type ) < 0 ) + // return; + // Py_INCREF( &ChainSilhouetteIterator_Type ); + // PyModule_AddObject(module, "ChainSilhouetteIterator", (PyObject *)&ChainSilhouetteIterator_Type); + } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 29ea68c01ca..3e5168e7da1 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -1,6 +1,7 @@ #include "BPy_UnaryPredicate0D.h" #include "BPy_Convert.h" +#include "Iterator/BPy_Interface0DIterator.h" #ifdef __cplusplus extern "C" { @@ -124,6 +125,7 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) { + self->up0D = new UnaryPredicate0D(); return 0; } @@ -147,15 +149,18 @@ PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args) PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args) { - PyObject *l; + PyObject *py_if0D_it; - if( !PyArg_ParseTuple(args, "O", &l) ) { + if(!( PyArg_ParseTuple(args, "O", &py_if0D_it) && BPy_Interface0DIterator_Check(py_if0D_it) )) { cout << "ERROR: UnaryPredicate0D___call__ " << endl; return NULL; } - - //TBD - + + Interface0DIterator *if0D_it = ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it; + + if( if0D_it ) + return PyBool_from_bool( self->up0D->operator()(*if0D_it) ); + Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index b00422a0aab..54731d75d7b 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -1,6 +1,7 @@ #include "BPy_UnaryPredicate1D.h" #include "BPy_Convert.h" +#include "BPy_Interface1D.h" #ifdef __cplusplus extern "C" { @@ -124,6 +125,7 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { + self->up1D = new UnaryPredicate1D(); return 0; } @@ -147,14 +149,17 @@ PyObject * UnaryPredicate1D_getName( BPy_UnaryPredicate1D *self, PyObject *args) PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args) { - PyObject *l; + PyObject *py_if1D; - if( !PyArg_ParseTuple(args, "O", &l) ) { + if(!( PyArg_ParseTuple(args, "O", &py_if1D) && BPy_Interface1D_Check(py_if1D) )) { cout << "ERROR: UnaryPredicate1D___call__ " << endl; return NULL; } - //TBD + Interface1D *if1D = ((BPy_Interface1D *) py_if1D)->if1D; + + if( if1D ) + return PyBool_from_bool( self->up1D->operator()(*if1D) ); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index cc7ce17f4cf..e40f129d3d8 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -115,22 +115,22 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args ) return -1; if( !obj1 && !obj2 && !obj3 ){ - self->ai = new AdjacencyIterator(); + self->a_it = new AdjacencyIterator(); } else if( BPy_AdjacencyIterator_Check(obj1) ) { - self->ai = new AdjacencyIterator(*( ((BPy_AdjacencyIterator *) obj1)->ai )); + self->a_it = new AdjacencyIterator(*( ((BPy_AdjacencyIterator *) obj1)->a_it )); } else if( BPy_ViewVertex_Check(obj1) ) { bool restrictToSelection = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; bool restrictToUnvisited = ( obj3 && PyBool_Check(obj3) ) ? bool_from_PyBool(obj3) : true; - self->ai = new AdjacencyIterator( ((BPy_ViewVertex *) obj1)->vv, restrictToSelection, restrictToUnvisited ); + self->a_it = new AdjacencyIterator( ((BPy_ViewVertex *) obj1)->vv, restrictToSelection, restrictToUnvisited ); } else { return -1; } - self->py_it.it = self->ai; + self->py_it.it = self->a_it; return 0; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h index 91319ff9c92..de0178f7725 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h @@ -20,7 +20,7 @@ extern PyTypeObject AdjacencyIterator_Type; /*---------------------------Python BPy_AdjacencyIterator structure definition----------*/ typedef struct { BPy_Iterator py_it; - AdjacencyIterator *ai; + AdjacencyIterator *a_it; } BPy_AdjacencyIterator; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp new file mode 100644 index 00000000000..00c77148396 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -0,0 +1,165 @@ +#include "BPy_ChainPredicateIterator.h" + +#include "../BPy_Convert.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ChainPredicateIterator instance -----------*/ +static int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject *args); + +static PyObject * ChainPredicateIterator_traverse( BPy_ViewEdgeIterator *self, PyObject *args ); + + +/*----------------------ChainPredicateIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_ChainPredicateIterator_methods[] = { + + {"traverse", ( PyCFunction ) ChainPredicateIterator_traverse, METH_VARARGS, "(AdjacencyIterator ai) This method iterates over the potential next ViewEdges and returns the one that will be followed next. Returns the next ViewEdge to follow or 0 when the end of the chain is reached. "}, + + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ChainPredicateIterator type definition ------------------------------*/ + +PyTypeObject ChainPredicateIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ChainPredicateIterator", /* tp_name */ + sizeof( BPy_ChainPredicateIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ChainPredicateIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &ChainingIterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ChainPredicateIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +// ChainPredicateIterator (bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true) +// ChainPredicateIterator (UnaryPredicate1D &upred, BinaryPredicate1D &bpred, bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true) +// ChainPredicateIterator (const ChainPredicateIterator &brother) + +int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0; + + if (!( PyArg_ParseTuple(args, "O|OOOOO", &obj1, &obj2, &obj3, &obj4) )) + return -1; + + if( obj1 && BPy_ChainPredicateIterator_Check(obj1) ) { + self->c_it = new ChainPredicateIterator(*( ((BPy_ChainPredicateIterator *) obj1)->c_it )); + + } else if( obj1 && BPy_ChainPredicateIterator_Check(obj1) ) { + self->c_it = new ChainPredicateIterator(*( ((BPy_ChainPredicateIterator *) obj1)->c_it )); + + } else { + bool restrictToSelection = ( obj1 && PyBool_Check(obj1) ) ? bool_from_PyBool(obj1) : true; + bool restrictToUnvisited = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; + ViewEdge *begin = ( obj3 && BPy_ViewEdge_Check(obj3) ) ? ((BPy_ViewEdge *) obj3)->ve : 0; + bool orientation = ( obj4 && PyBool_Check(obj4) ) ? bool_from_PyBool(obj4) : true; + + self->c_it = new ChainPredicateIterator( restrictToSelection, restrictToUnvisited, begin, orientation); + } + + self->py_ve_it.ve_it = self->c_it; + self->py_ve_it.py_it.it = self->c_it; + + return 0; +} + +//virtual ViewEdge * traverse (const AdjacencyIterator &it) +PyObject *ChainPredicateIterator_traverse( BPy_ViewEdgeIterator *self, PyObject *args ) { + PyObject *py_a_it; + + if(!( PyArg_ParseTuple(args, "O", &py_a_it) && BPy_AdjacencyIterator_Check(py_a_it) )) { + cout << "ERROR: ChainPredicateIterator_traverse" << endl; + Py_RETURN_NONE; + } + + if( ((BPy_AdjacencyIterator *) py_a_it)->a_it ) + self->ve_it->traverse(*( ((BPy_AdjacencyIterator *) py_a_it)->a_it )); + + Py_RETURN_NONE; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h new file mode 100644 index 00000000000..7fa0a3e2703 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_CHAINPREDICATEITERATOR_H +#define FREESTYLE_PYTHON_CHAINPREDICATEITERATOR_H + + +#include "../../view_map/ChainingIterators.h" + +#include "BPy_ChainPredicateIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ChainPredicateIterator_Type; + +#define BPy_ChainPredicateIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainPredicateIterator_Type) + +/*---------------------------Python BPy_ChainPredicateIterator structure definition----------*/ +typedef struct { + ChainingIterator py_c_it; + ChainPredicateIterator *cp_it; +} BPy_ChainPredicateIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAINPREDICATEITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp similarity index 100% rename from source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp rename to source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index e69de29bb2d..c695e92ec70 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -0,0 +1,182 @@ +#include "BPy_ChainingIterator.h" + +#include "../BPy_Convert.h" +#include "../Interface0D/BPy_ViewVertex.h" +#include "../Interface1D/BPy_ViewEdge.h" +#include "BPy_AdjacencyIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ChainingIterator instance -----------*/ +static int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args); +static PyObject * ChainingIterator_init( BPy_ChainingIterator *self ); +static PyObject * ChainingIterator_traverse( BPy_ChainingIterator *self, PyObject *args ); +static PyObject * ChainingIterator_getVertex( BPy_ChainingIterator *self ); +static PyObject * ChainingIterator_isIncrementing( BPy_ChainingIterator *self ); + +/*----------------------ChainingIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_ChainingIterator_methods[] = { + {"init", ( PyCFunction ) ChainingIterator_init, METH_NOARGS, "() Inits the iterator context. This method is called each time a new chain is started. It can be used to reset some history information that you might want to keep."}, + {"traverse", ( PyCFunction ) ChainingIterator_traverse, METH_VARARGS, "(AdjacencyIterator ai) This method iterates over the potential next ViewEdges and returns the one that will be followed next. Returns the next ViewEdge to follow or 0 when the end of the chain is reached. "}, + {"getVertex", ( PyCFunction ) ChainingIterator_getVertex, METH_NOARGS, "() Returns the vertex which is the next crossing "}, + {"isIncrementing", ( PyCFunction ) ChainingIterator_isIncrementing, METH_NOARGS, "() Returns true if the current iteration is an incrementation."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ChainingIterator type definition ------------------------------*/ + +PyTypeObject ChainingIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ChainingIterator", /* tp_name */ + sizeof( BPy_ChainingIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ChainingIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &ViewEdgeIterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ChainingIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0; + + if (!( PyArg_ParseTuple(args, "O|OOO", &obj1, &obj2, &obj3, &obj4) )) + return -1; + + if( obj1 && BPy_ChainingIterator_Check(obj1) ) { + self->c_it = new ChainingIterator(*( ((BPy_ChainingIterator *) obj1)->c_it )); + + } else { + bool restrictToSelection = ( obj1 && PyBool_Check(obj1) ) ? bool_from_PyBool(obj1) : true; + bool restrictToUnvisited = ( obj2 && PyBool_Check(obj2) ) ? bool_from_PyBool(obj2) : true; + ViewEdge *begin = ( obj3 && BPy_ViewEdge_Check(obj3) ) ? ((BPy_ViewEdge *) obj3)->ve : 0; + bool orientation = ( obj4 && PyBool_Check(obj4) ) ? bool_from_PyBool(obj4) : true; + + self->c_it = new ChainingIterator( restrictToSelection, restrictToUnvisited, begin, orientation); + } + + self->py_ve_it.ve_it = self->c_it; + self->py_ve_it.py_it.it = self->c_it; + + return 0; +} + +PyObject *ChainingIterator_init( BPy_ChainingIterator *self ) { + self->c_it->init(); + + Py_RETURN_NONE; +} + +PyObject *ChainingIterator_traverse( BPy_ChainingIterator *self, PyObject *args ) { + PyObject *py_a_it; + + if(!( PyArg_ParseTuple(args, "O", &py_a_it) && BPy_AdjacencyIterator_Check(py_a_it) )) { + cout << "ERROR: ChainingIterator_traverse" << endl; + Py_RETURN_NONE; + } + + if( ((BPy_AdjacencyIterator *) py_a_it)->a_it ) + self->c_it->traverse(*( ((BPy_AdjacencyIterator *) py_a_it)->a_it )); + + Py_RETURN_NONE; +} + + +PyObject *ChainingIterator_getVertex( BPy_ChainingIterator *self ) { + if( self->c_it->getVertex() ) + return BPy_ViewVertex_from_ViewVertex_ptr( self->c_it->getVertex() ); + + Py_RETURN_NONE; +} + +PyObject *ChainingIterator_isIncrementing( BPy_ChainingIterator *self ) { + return PyBool_from_bool( self->c_it->isIncrementing() ); +} + + + + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h new file mode 100644 index 00000000000..2994f381c1d --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_CHAININGITERATOR_H +#define FREESTYLE_PYTHON_CHAININGITERATOR_H + + +#include "../../stroke/ChainingIterators.h" + +#include "BPy_ViewEdgeIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ChainingIterator_Type; + +#define BPy_ChainingIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainingIterator_Type) + +/*---------------------------Python BPy_ChainingIterator structure definition----------*/ +typedef struct { + BPy_ViewEdgeIterator py_ve_it; + ChainingIterator *c_it; +} BPy_ChainingIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAININGITERATOR_H */ diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 2256d374c0c..add10cd1522 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -3,6 +3,7 @@ #include "../BPy_Convert.h" #include "../Interface1D/BPy_ViewEdge.h" + #ifdef __cplusplus extern "C" { #endif @@ -12,8 +13,23 @@ extern "C" { /*--------------- Python API function prototypes for ViewEdgeIterator instance -----------*/ static int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args); +static PyObject * ViewEdgeIterator_getCurrentEdge( BPy_ViewEdgeIterator *self ); +static PyObject * ViewEdgeIterator_setCurrentEdge( BPy_ViewEdgeIterator *self, PyObject *args ); +static PyObject * ViewEdgeIterator_getBegin( BPy_ViewEdgeIterator *self ); +static PyObject * ViewEdgeIterator_setBegin( BPy_ViewEdgeIterator *self, PyObject *args ); +static PyObject * ViewEdgeIterator_getOrientation( BPy_ViewEdgeIterator *self ); +static PyObject * ViewEdgeIterator_setOrientation( BPy_ViewEdgeIterator *self, PyObject *args ); +static PyObject * ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self ); + /*----------------------ViewEdgeIterator instance definitions ----------------------------*/ static PyMethodDef BPy_ViewEdgeIterator_methods[] = { + {"getCurrentEdge", ( PyCFunction ) ViewEdgeIterator_getCurrentEdge, METH_NOARGS, "() Returns the current pointed ViewEdge."}, + {"setCurrentEdge", ( PyCFunction ) ViewEdgeIterator_setCurrentEdge, METH_VARARGS, "(ViewEdge ve) Sets the current pointed ViewEdge. "}, + {"getBegin", ( PyCFunction ) ViewEdgeIterator_getBegin, METH_NOARGS, "() Returns the first ViewEdge used for the iteration."}, + {"setBegin", ( PyCFunction ) ViewEdgeIterator_setBegin, METH_VARARGS, "(ViewEdge ve) Sets the first ViewEdge used for the iteration."}, + {"getOrientation", ( PyCFunction ) ViewEdgeIterator_getOrientation, METH_NOARGS, "() Gets the orientation of the pointed ViewEdge in the iteration. "}, + {"setOrientation", ( PyCFunction ) ViewEdgeIterator_setOrientation, METH_VARARGS, "(bool b) Sets the orientation of the pointed ViewEdge in the iteration. "}, + {"changeOrientation", ( PyCFunction ) ViewEdgeIterator_changeOrientation, METH_NOARGS, "() Changes the current orientation."}, {NULL, NULL, 0, NULL} }; @@ -102,9 +118,6 @@ PyTypeObject ViewEdgeIterator_Type = { NULL }; -//-------------------MODULE INITIALIZATION-------------------------------- - - //------------------------INSTANCE METHODS ---------------------------------- int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args ) @@ -131,18 +144,71 @@ int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args ) } +PyObject *ViewEdgeIterator_getCurrentEdge( BPy_ViewEdgeIterator *self ) { + if( self->ve_it->getCurrentEdge() ) + return BPy_ViewEdge_from_ViewEdge(*( self->ve_it->getCurrentEdge() )); + + Py_RETURN_NONE; +} -// ViewEdge * getCurrentEdge () -// void setCurrentEdge (ViewEdge *edge) -// ViewEdge * getBegin () -// bool getOrientation () const +PyObject *ViewEdgeIterator_setCurrentEdge( BPy_ViewEdgeIterator *self, PyObject *args ) { + PyObject *py_ve; + + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: ViewEdgeIterator_setCurrentEdge" << endl; + Py_RETURN_NONE; + } + + self->ve_it->setCurrentEdge( ((BPy_ViewEdge *) py_ve)->ve ); + + Py_RETURN_NONE; +} +PyObject *ViewEdgeIterator_getBegin( BPy_ViewEdgeIterator *self ) { + if( self->ve_it->getBegin() ) + return BPy_ViewEdge_from_ViewEdge(*( self->ve_it->getBegin() )); + + Py_RETURN_NONE; +} + +PyObject *ViewEdgeIterator_setBegin( BPy_ViewEdgeIterator *self, PyObject *args ) { + PyObject *py_ve; + + if(!( PyArg_ParseTuple(args, "O", &py_ve) && BPy_ViewEdge_Check(py_ve) )) { + cout << "ERROR: ViewEdgeIterator_setBegin" << endl; + Py_RETURN_NONE; + } + + self->ve_it->setBegin( ((BPy_ViewEdge *) py_ve)->ve ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdgeIterator_getOrientation( BPy_ViewEdgeIterator *self ) { + return PyBool_from_bool( self->ve_it->getOrientation() ); +} + +PyObject *ViewEdgeIterator_setOrientation( BPy_ViewEdgeIterator *self, PyObject *args ) { + PyObject *py_b; + + if(!( PyArg_ParseTuple(args, "O", &py_b) && PyBool_Check(py_b) )) { + cout << "ERROR: ViewEdgeIterator_setOrientation" << endl; + Py_RETURN_NONE; + } + + self->ve_it->setOrientation( bool_from_PyBool(py_b) ); + + Py_RETURN_NONE; +} + +PyObject *ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self ) { + self->ve_it->changeOrientation(); + + Py_RETURN_NONE; +} + -// void setCurrentEdge (ViewEdge *edge) -// void setBegin (ViewEdge *begin) -// void setOrientation (bool orientation) -// void changeOrientation () /////////////////////////////////////////////////////////////////////////////////////////// From 5718639a79b51241f348eb241d2379ade06cd787 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 26 Jul 2008 20:05:55 +0000 Subject: [PATCH 412/430] soc-2008-mxcurioni: implemented (but did not test) ChainPredicateIterator and ChainSilhouetteIterator --- source/blender/freestyle/SConscript | 7 + .../freestyle/intern/python/BPy_Iterator.cpp | 22 +-- .../Iterator/BPy_ChainPredicateIterator.cpp | 55 +++---- .../Iterator/BPy_ChainPredicateIterator.h | 6 +- .../Iterator/BPy_ChainSilhouetteIterator.cpp | 141 ++++++++++++++++++ .../Iterator/BPy_ChainSilhouetteIterator.h | 33 ++++ 6 files changed, 217 insertions(+), 47 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 6bbf5c9ca4b..684c398c8bc 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -65,6 +65,7 @@ python_sources = [ prefix + '/BPy_BBox.cpp', prefix + '/BPy_BinaryPredicate0D.cpp', prefix + '/BPy_BinaryPredicate1D.cpp', + prefix + '/BPy_FrsMaterial.cpp', prefix + '/BPy_Id.cpp', prefix + '/BPy_IntegrationType.cpp', prefix + '/BPy_Interface0D.cpp', @@ -76,7 +77,10 @@ python_sources = [ prefix + '/Interface0D/ViewVertex/BPy_TVertex.cpp', prefix + '/BPy_Interface1D.cpp', prefix + '/Interface1D/BPy_Curve.cpp', + prefix + '/Interface1D/Curve/BPy_Chain.cpp', prefix + '/Interface1D/BPy_FEdge.cpp', + prefix + '/Interface1D/FEdge/BPy_FEdgeSharp.cpp', + prefix + '/Interface1D/FEdge/BPy_FEdgeSmooth.cpp', prefix + '/Interface1D/BPy_Stroke.cpp', prefix + '/Interface1D/BPy_ViewEdge.cpp', prefix + '/BPy_Iterator.cpp', @@ -87,6 +91,9 @@ python_sources = [ prefix + '/Iterator/BPy_SVertexIterator.cpp', prefix + '/Iterator/BPy_orientedViewEdgeIterator.cpp', prefix + '/Iterator/BPy_ViewEdgeIterator.cpp', + prefix + '/Iterator/BPy_ChainingIterator.cpp', + prefix + '/Iterator/BPy_ChainPredicateIterator.cpp', + prefix + '/Iterator/BPy_ChainSilhouetteIterator.cpp', prefix + '/BPy_MediumType.cpp', prefix + '/BPy_Nature.cpp', prefix + '/BPy_SShape.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index f3612b1bd52..b946e0a9a9a 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -9,8 +9,8 @@ #include "Iterator/BPy_orientedViewEdgeIterator.h" #include "Iterator/BPy_ViewEdgeIterator.h" #include "Iterator/BPy_ChainingIterator.h" -// #include "Iterator/BPy_ChainPredicateIterator.h" -// #include "Iterator/BPy_ChainSilhouetteIterator.h" +#include "Iterator/BPy_ChainPredicateIterator.h" +#include "Iterator/BPy_ChainSilhouetteIterator.h" @@ -176,15 +176,15 @@ PyMODINIT_FUNC Iterator_Init( PyObject *module ) Py_INCREF( &ChainingIterator_Type ); PyModule_AddObject(module, "ChainingIterator", (PyObject *)&ChainingIterator_Type); - // if( PyType_Ready( &ChainPredicateIterator_Type ) < 0 ) - // return; - // Py_INCREF( &ChainPredicateIterator_Type ); - // PyModule_AddObject(module, "ChainPredicateIterator", (PyObject *)&ChainPredicateIterator_Type); - // - // if( PyType_Ready( &ChainSilhouetteIterator_Type ) < 0 ) - // return; - // Py_INCREF( &ChainSilhouetteIterator_Type ); - // PyModule_AddObject(module, "ChainSilhouetteIterator", (PyObject *)&ChainSilhouetteIterator_Type); + if( PyType_Ready( &ChainPredicateIterator_Type ) < 0 ) + return; + Py_INCREF( &ChainPredicateIterator_Type ); + PyModule_AddObject(module, "ChainPredicateIterator", (PyObject *)&ChainPredicateIterator_Type); + + if( PyType_Ready( &ChainSilhouetteIterator_Type ) < 0 ) + return; + Py_INCREF( &ChainSilhouetteIterator_Type ); + PyModule_AddObject(module, "ChainSilhouetteIterator", (PyObject *)&ChainSilhouetteIterator_Type); } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index 00c77148396..c5ff61e239f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -1,7 +1,9 @@ #include "BPy_ChainPredicateIterator.h" #include "../BPy_Convert.h" - +#include "../BPy_BinaryPredicate1D.h" +#include "../Interface1D/BPy_ViewEdge.h" +#include "../BPy_UnaryPredicate1D.h" #ifdef __cplusplus extern "C" { @@ -12,14 +14,9 @@ extern "C" { /*--------------- Python API function prototypes for ChainPredicateIterator instance -----------*/ static int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject *args); -static PyObject * ChainPredicateIterator_traverse( BPy_ViewEdgeIterator *self, PyObject *args ); - - /*----------------------ChainPredicateIterator instance definitions ----------------------------*/ static PyMethodDef BPy_ChainPredicateIterator_methods[] = { - {"traverse", ( PyCFunction ) ChainPredicateIterator_traverse, METH_VARARGS, "(AdjacencyIterator ai) This method iterates over the potential next ViewEdges and returns the one that will be followed next. Returns the next ViewEdge to follow or 0 when the end of the chain is reached. "}, - {NULL, NULL, 0, NULL} }; @@ -110,22 +107,27 @@ PyTypeObject ChainPredicateIterator_Type = { //------------------------INSTANCE METHODS ---------------------------------- -// ChainPredicateIterator (bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true) -// ChainPredicateIterator (UnaryPredicate1D &upred, BinaryPredicate1D &bpred, bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true) -// ChainPredicateIterator (const ChainPredicateIterator &brother) - int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject *args ) { - PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0; + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0, *obj5 = 0, *obj6 = 0; - if (!( PyArg_ParseTuple(args, "O|OOOOO", &obj1, &obj2, &obj3, &obj4) )) + if (!( PyArg_ParseTuple(args, "O|OOOOO", &obj1, &obj2, &obj3, &obj4, &obj5, &obj6) )) return -1; - if( obj1 && BPy_ChainPredicateIterator_Check(obj1) ) { - self->c_it = new ChainPredicateIterator(*( ((BPy_ChainPredicateIterator *) obj1)->c_it )); + if( obj1 && BPy_ChainPredicateIterator_Check(obj1) ) { + self->cp_it = new ChainPredicateIterator(*( ((BPy_ChainPredicateIterator *) obj1)->cp_it )); - } else if( obj1 && BPy_ChainPredicateIterator_Check(obj1) ) { - self->c_it = new ChainPredicateIterator(*( ((BPy_ChainPredicateIterator *) obj1)->c_it )); + } else if( obj1 && BPy_UnaryPredicate1D_Check(obj1) && ((BPy_UnaryPredicate1D *) obj1)->up1D && + obj2 && BPy_BinaryPredicate1D_Check(obj2) && ((BPy_BinaryPredicate1D *) obj2)->bp1D ) { + + UnaryPredicate1D *up1D = ((BPy_UnaryPredicate1D *) obj1)->up1D; + BinaryPredicate1D *bp1D = ((BPy_BinaryPredicate1D *) obj2)->bp1D; + bool restrictToSelection = ( obj3 && PyBool_Check(obj3) ) ? bool_from_PyBool(obj3) : true; + bool restrictToUnvisited = ( obj4 && PyBool_Check(obj4) ) ? bool_from_PyBool(obj4) : true; + ViewEdge *begin = ( obj5 && BPy_ViewEdge_Check(obj5) ) ? ((BPy_ViewEdge *) obj5)->ve : 0; + bool orientation = ( obj6 && PyBool_Check(obj6) ) ? bool_from_PyBool(obj6) : true; + + self->cp_it = new ChainPredicateIterator( *up1D, *bp1D, restrictToSelection, restrictToUnvisited, begin, orientation); } else { bool restrictToSelection = ( obj1 && PyBool_Check(obj1) ) ? bool_from_PyBool(obj1) : true; @@ -133,28 +135,15 @@ int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject * ViewEdge *begin = ( obj3 && BPy_ViewEdge_Check(obj3) ) ? ((BPy_ViewEdge *) obj3)->ve : 0; bool orientation = ( obj4 && PyBool_Check(obj4) ) ? bool_from_PyBool(obj4) : true; - self->c_it = new ChainPredicateIterator( restrictToSelection, restrictToUnvisited, begin, orientation); + self->cp_it = new ChainPredicateIterator( restrictToSelection, restrictToUnvisited, begin, orientation); } - self->py_ve_it.ve_it = self->c_it; - self->py_ve_it.py_it.it = self->c_it; + self->py_c_it.c_it = self->cp_it; + self->py_c_it.py_ve_it.ve_it = self->cp_it; + self->py_c_it.py_ve_it.py_it.it = self->cp_it; return 0; -} - -//virtual ViewEdge * traverse (const AdjacencyIterator &it) -PyObject *ChainPredicateIterator_traverse( BPy_ViewEdgeIterator *self, PyObject *args ) { - PyObject *py_a_it; - - if(!( PyArg_ParseTuple(args, "O", &py_a_it) && BPy_AdjacencyIterator_Check(py_a_it) )) { - cout << "ERROR: ChainPredicateIterator_traverse" << endl; - Py_RETURN_NONE; - } - if( ((BPy_AdjacencyIterator *) py_a_it)->a_it ) - self->ve_it->traverse(*( ((BPy_AdjacencyIterator *) py_a_it)->a_it )); - - Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h index 7fa0a3e2703..c5d32fb01f3 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h @@ -2,9 +2,9 @@ #define FREESTYLE_PYTHON_CHAINPREDICATEITERATOR_H -#include "../../view_map/ChainingIterators.h" +#include "../../stroke/ChainingIterators.h" -#include "BPy_ChainPredicateIterator.h" +#include "BPy_ChainingIterator.h" #ifdef __cplusplus extern "C" { @@ -20,7 +20,7 @@ extern PyTypeObject ChainPredicateIterator_Type; /*---------------------------Python BPy_ChainPredicateIterator structure definition----------*/ typedef struct { - ChainingIterator py_c_it; + BPy_ChainingIterator py_c_it; ChainPredicateIterator *cp_it; } BPy_ChainPredicateIterator; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index e69de29bb2d..75526507493 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -0,0 +1,141 @@ +#include "BPy_ChainSilhouetteIterator.h" + +#include "../BPy_Convert.h" +#include "../Interface1D/BPy_ViewEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ChainSilhouetteIterator instance -----------*/ +static int ChainSilhouetteIterator___init__(BPy_ChainSilhouetteIterator *self, PyObject *args); + +/*----------------------ChainSilhouetteIterator instance definitions ----------------------------*/ +static PyMethodDef BPy_ChainSilhouetteIterator_methods[] = { + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ChainSilhouetteIterator type definition ------------------------------*/ + +PyTypeObject ChainSilhouetteIterator_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ChainSilhouetteIterator", /* tp_name */ + sizeof( BPy_ChainSilhouetteIterator ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ChainSilhouetteIterator_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &ChainingIterator_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ChainSilhouetteIterator___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +// ChainSilhouetteIterator (bool iRestrictToSelection=true, ViewEdge *begin=NULL, bool orientation=true) +// ChainSilhouetteIterator (const ChainSilhouetteIterator &brother) + +int ChainSilhouetteIterator___init__(BPy_ChainSilhouetteIterator *self, PyObject *args ) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; + + if (!( PyArg_ParseTuple(args, "O|OO", &obj1, &obj2, &obj3) )) + return -1; + + if( obj1 && BPy_ChainSilhouetteIterator_Check(obj1) ) { + self->cs_it = new ChainSilhouetteIterator(*( ((BPy_ChainSilhouetteIterator *) obj1)->cs_it )); + + } else { + bool restrictToSelection = ( obj1 && PyBool_Check(obj1) ) ? bool_from_PyBool(obj1) : true; + ViewEdge *begin = ( obj2 && BPy_ViewEdge_Check(obj2) ) ? ((BPy_ViewEdge *) obj2)->ve : 0; + bool orientation = ( obj3 && PyBool_Check(obj3) ) ? bool_from_PyBool(obj3) : true; + + self->cs_it = new ChainSilhouetteIterator( restrictToSelection, begin, orientation); + } + + self->py_c_it.c_it = self->cs_it; + self->py_c_it.py_ve_it.ve_it = self->cs_it; + self->py_c_it.py_ve_it.py_it.it = self->cs_it; + + return 0; + +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h new file mode 100644 index 00000000000..7e6feb00910 --- /dev/null +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h @@ -0,0 +1,33 @@ +#ifndef FREESTYLE_PYTHON_CHAINSILHOUETTEITERATOR_H +#define FREESTYLE_PYTHON_CHAINSILHOUETTEITERATOR_H + + +#include "../../stroke/ChainingIterators.h" + +#include "BPy_ChainingIterator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ChainSilhouetteIterator_Type; + +#define BPy_ChainSilhouetteIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainSilhouetteIterator_Type) + +/*---------------------------Python BPy_ChainSilhouetteIterator structure definition----------*/ +typedef struct { + BPy_ChainingIterator py_c_it; + ChainSilhouetteIterator *cs_it; +} BPy_ChainSilhouetteIterator; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAINSILHOUETTEITERATOR_H */ From 0c64c49d2f930aed4ef310c2331bc3df0932cbe2 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sat, 26 Jul 2008 21:47:39 +0000 Subject: [PATCH 413/430] soc-2008-mxcurioni: added (but did not test) ViewMap and Noise classes. Updated ViewShape class accordingly --- source/blender/freestyle/SConscript | 2 + .../intern/app_blender/Controller.cpp | 4 +- .../freestyle/intern/python/BPy_Freestyle.cpp | 9 +- .../freestyle/intern/python/BPy_Noise.cpp | 267 +++++++++++++--- .../freestyle/intern/python/BPy_Noise.h | 36 +++ .../freestyle/intern/python/BPy_ViewMap.cpp | 299 ++++++++++++------ .../freestyle/intern/python/BPy_ViewMap.h | 34 ++ .../freestyle/intern/python/BPy_ViewShape.cpp | 22 +- .../freestyle/intern/view_map/ViewMap.cpp | 4 +- .../freestyle/intern/view_map/ViewMap.h | 4 +- 10 files changed, 530 insertions(+), 151 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BPy_Noise.h create mode 100644 source/blender/freestyle/intern/python/BPy_ViewMap.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 684c398c8bc..88d4763affa 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -96,6 +96,7 @@ python_sources = [ prefix + '/Iterator/BPy_ChainSilhouetteIterator.cpp', prefix + '/BPy_MediumType.cpp', prefix + '/BPy_Nature.cpp', + prefix + '/BPy_Noise.cpp', prefix + '/BPy_SShape.cpp', prefix + '/BPy_StrokeAttribute.cpp', prefix + '/BPy_StrokeShader.cpp', @@ -103,6 +104,7 @@ python_sources = [ prefix + '/BPy_UnaryFunction1D.cpp', prefix + '/BPy_UnaryPredicate0D.cpp', prefix + '/BPy_UnaryPredicate1D.cpp', + prefix + '/BPy_ViewMap.cpp', prefix + '/BPy_ViewShape.cpp' ] diff --git a/source/blender/freestyle/intern/app_blender/Controller.cpp b/source/blender/freestyle/intern/app_blender/Controller.cpp index e2cc25c4b10..ff6ca96e657 100755 --- a/source/blender/freestyle/intern/app_blender/Controller.cpp +++ b/source/blender/freestyle/intern/app_blender/Controller.cpp @@ -930,7 +930,7 @@ FEdge* Controller::SelectFEdge(real x, real y) if (!_ViewMap) return NULL; - FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + FEdge *fedge = (FEdge*)_ViewMap->getClosestFEdge(x,y); //ViewEdge *selection = fedge->viewedge(); _pView->setSelectedFEdge(fedge); _Canvas->setSelectedFEdge(fedge); @@ -942,7 +942,7 @@ ViewEdge* Controller::SelectViewEdge(real x, real y) if (!_ViewMap) return NULL; - FEdge *fedge = (FEdge*)_ViewMap->GetClosestFEdge(x,y); + FEdge *fedge = (FEdge*)_ViewMap->getClosestFEdge(x,y); ViewEdge *selection = fedge->viewedge(); _pView->setSelectedFEdge(fedge); _Canvas->setSelectedFEdge(fedge); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 13164d0a153..ed35a85068b 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -7,11 +7,11 @@ #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" -#include "BPy_Iterator.h" -#include "Interface0D/BPy_CurvePoint.h" #include "BPy_Interface1D.h" +#include "BPy_Iterator.h" #include "BPy_MediumType.h" #include "BPy_Nature.h" +#include "BPy_Noise.h" #include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" #include "BPy_StrokeShader.h" @@ -19,6 +19,7 @@ #include "BPy_UnaryFunction1D.h" #include "BPy_UnaryPredicate0D.h" #include "BPy_UnaryPredicate1D.h" +#include "BPy_ViewMap.h" #include "BPy_ViewShape.h" @@ -151,6 +152,7 @@ PyObject *Freestyle_Init( void ) Interface0D_Init( module ); Interface1D_Init( module ); Iterator_Init( module ); + Noise_Init( module ); SShape_Init( module ); StrokeAttribute_Init( module ); StrokeShader_Init( module ); @@ -158,8 +160,9 @@ PyObject *Freestyle_Init( void ) UnaryFunction1D_Init( module ); UnaryPredicate0D_Init( module ); UnaryPredicate1D_Init( module ); + ViewMap_Init( module ); ViewShape_Init( module ); - + return module; } diff --git a/source/blender/freestyle/intern/python/BPy_Noise.cpp b/source/blender/freestyle/intern/python/BPy_Noise.cpp index 8e6b7aa5022..f8d5d6b066d 100644 --- a/source/blender/freestyle/intern/python/BPy_Noise.cpp +++ b/source/blender/freestyle/intern/python/BPy_Noise.cpp @@ -1,48 +1,239 @@ - PyObject *_wrap_Noise_turbulence1__SWIG_0(PyObject *self , PyObject *args) { +#include "BPy_Noise.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Noise instance -----------*/ +static int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds); +static void Noise___dealloc__(BPy_Noise *self); +static PyObject * Noise___repr__(BPy_Noise *self); + +static PyObject * Noise_turbulence1( BPy_Noise *self, PyObject *args); +static PyObject * Noise_turbulence2( BPy_Noise *self, PyObject *args); +static PyObject * Noise_turbulence3( BPy_Noise *self, PyObject *args); +static PyObject * Noise_smoothNoise1( BPy_Noise *self, PyObject *args); +static PyObject * Noise_smoothNoise2( BPy_Noise *self, PyObject *args); +static PyObject * Noise_smoothNoise3( BPy_Noise *self, PyObject *args); + +/*----------------------Noise instance definitions ----------------------------*/ +static PyMethodDef BPy_Noise_methods[] = { + {"turbulence1", ( PyCFunction ) Noise_turbulence1, METH_VARARGS, "(float arg, float freq, float amp, unsigned oct=4))Returns a noise value for a 1D element"}, + {"turbulence2", ( PyCFunction ) Noise_turbulence2, METH_VARARGS, "([x, y], float freq, float amp, unsigned oct=4)))Returns a noise value for a 2D element"}, + {"turbulence3", ( PyCFunction ) Noise_turbulence3, METH_VARARGS, "([x, y, z], float freq, float amp, unsigned oct=4)))Returns a noise value for a 3D element"}, + {"smoothNoise1", ( PyCFunction ) Noise_smoothNoise1, METH_VARARGS, "(float arg))Returns a smooth noise value for a 1D element "}, + {"smoothNoise2", ( PyCFunction ) Noise_smoothNoise2, METH_VARARGS, "([x, y]))Returns a smooth noise value for a 2D element "}, + {"smoothNoise3", ( PyCFunction ) Noise_smoothNoise3, METH_VARARGS, "([x, y, z))Returns a smooth noise value for a 3D element "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Noise type definition ------------------------------*/ + +PyTypeObject Noise_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Noise", /* tp_name */ + sizeof( BPy_Noise ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)Noise___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)Noise___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Noise_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Noise___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC Noise_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &Noise_Type ) < 0 ) + return; + + Py_INCREF( &Noise_Type ); + PyModule_AddObject(module, "Noise", (PyObject *)&Noise_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds) +{ + self->n = new Noise(); + return 0; +} + +void Noise___dealloc__(BPy_Noise* self) +{ + delete self->n; + self->ob_type->tp_free((PyObject*)self); } - PyObject *_wrap_Noise_turbulence1__SWIG_1(PyObject *self , PyObject *args) { +PyObject * Noise___repr__(BPy_Noise* self) +{ + return PyString_FromFormat("Noise - address: %p", self->n ); } - PyObject *_wrap_Noise_turbulence1(PyObject *self, PyObject *args) { +PyObject * Noise_turbulence1( BPy_Noise *self , PyObject *args) { + float f1, f2, f3; + unsigned int i; + + if(!( PyArg_ParseTuple(args, "fff|I", &f1, &f2, &f3, &i) )) { + cout << "ERROR: Noise_turbulence1" << endl; + Py_RETURN_NONE; + } + + return PyFloat_FromDouble( self->n->turbulence1(f1, f2, f3, i) ); +} + +PyObject * Noise_turbulence2( BPy_Noise *self , PyObject *args) { + PyObject *obj1; + float f2, f3; + unsigned int i; + + if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 1 )) { + cout << "ERROR: Noise_turbulence2" << endl; + Py_RETURN_NONE; + } + + Vec2f v( PyFloat_AsDouble(PyList_GetItem(obj1, 0)), PyFloat_AsDouble(PyList_GetItem(obj1, 1)) ); + + return PyFloat_FromDouble( self->n->turbulence2(v, f2, f3, i) ); +} + +PyObject * Noise_turbulence3( BPy_Noise *self , PyObject *args) { + PyObject *obj1; + float f2, f3; + unsigned int i; + + if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 2 )) { + cout << "ERROR: Noise_turbulence3" << endl; + Py_RETURN_NONE; + } + + Vec3f v( PyFloat_AsDouble(PyList_GetItem(obj1, 0)), + PyFloat_AsDouble(PyList_GetItem(obj1, 1)), + PyFloat_AsDouble(PyList_GetItem(obj1, 2)) ); + + return PyFloat_FromDouble( self->n->turbulence3(v, f2, f3, i) ); +} + +PyObject * Noise_smoothNoise1( BPy_Noise *self , PyObject *args) { + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: Noise_smoothNoise1" << endl; + Py_RETURN_NONE; + } + + return PyFloat_FromDouble( self->n->smoothNoise1(f) ); +} + +PyObject * Noise_smoothNoise2( BPy_Noise *self , PyObject *args) { + PyObject *obj; + + if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 1 )) { + cout << "ERROR: Noise_smoothNoise2" << endl; + Py_RETURN_NONE; + } + + Vec2f v( PyFloat_AsDouble(PyList_GetItem(obj, 0)), PyFloat_AsDouble(PyList_GetItem(obj, 1)) ); + + return PyFloat_FromDouble( self->n->smoothNoise2(v) ); +} + +PyObject * Noise_smoothNoise3( BPy_Noise *self , PyObject *args) { + PyObject *obj; + + if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) { + cout << "ERROR: Noise_smoothNoise3" << endl; + Py_RETURN_NONE; + } + + Vec3f v( PyFloat_AsDouble(PyList_GetItem(obj, 0)), + PyFloat_AsDouble(PyList_GetItem(obj, 1)), + PyFloat_AsDouble(PyList_GetItem(obj, 2)) ); + + return PyFloat_FromDouble( self->n->smoothNoise3(v) ); } - PyObject *_wrap_Noise_turbulence2__SWIG_0(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_Noise_turbulence2__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Noise_turbulence2(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Noise_turbulence3__SWIG_0(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Noise_turbulence3__SWIG_1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Noise_turbulence3(PyObject *self, PyObject *args) { -} - - - PyObject *_wrap_Noise_smoothNoise1(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Noise_smoothNoise2(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Noise_smoothNoise3(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BPy_Noise.h b/source/blender/freestyle/intern/python/BPy_Noise.h new file mode 100644 index 00000000000..b9b66d34e94 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_Noise.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_NOISE_H +#define FREESTYLE_PYTHON_NOISE_H + +#include "../geometry/Noise.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Noise_Type; + +#define BPy_Noise_Check(v) (( (PyObject *) v)->ob_type == &Noise_Type) + +/*---------------------------Python BPy_Noise structure definition----------*/ +typedef struct { + PyObject_HEAD + Noise *n; +} BPy_Noise; + +/*---------------------------Python BPy_Noise visible prototypes-----------*/ + +PyMODINIT_FUNC Noise_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_NOISE_H */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp index 24a986b3885..e8633770c8c 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.cpp @@ -1,104 +1,203 @@ - PyObject *_wrap_ViewMap_userdata_set(PyObject *self , PyObject *args) { +#include "BPy_ViewMap.h" + +#include "BPy_Convert.h" +#include "BPy_BBox.h" +#include "Interface1D/BPy_FEdge.h" +#include "Interface1D/BPy_ViewEdge.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewMap instance -----------*/ +static int ViewMap___init__(BPy_ViewMap *self, PyObject *args, PyObject *kwds); +static void ViewMap___dealloc__(BPy_ViewMap *self); +static PyObject * ViewMap___repr__(BPy_ViewMap* self); + +static PyObject * ViewMap_getClosestViewEdge( BPy_ViewMap *self , PyObject *args); +static PyObject * ViewMap_getClosestFEdge( BPy_ViewMap *self , PyObject *args); +static PyObject * ViewMap_getScene3dBBox( BPy_ViewMap *self , PyObject *args); +static PyObject * ViewMap_setScene3dBBox( BPy_ViewMap *self , PyObject *args); + +/*---------------------- BPy_ViewShape instance definitions ----------------------------*/ +static PyMethodDef BPy_ViewMap_methods[] = { + {"getClosestViewEdge", ( PyCFunction ) ViewMap_getClosestViewEdge, METH_VARARGS, "(double x, double y) Gets the viewedge the nearest to the 2D position specified as argument "}, + {"getClosestFEdge", ( PyCFunction ) ViewMap_getClosestFEdge, METH_VARARGS, "(double x, double y) Gets the Fedge the nearest to the 2D position specified as argument "}, + {"getScene3dBBox", ( PyCFunction ) ViewMap_getScene3dBBox, METH_NOARGS, "() Returns the scene 3D bounding box. "}, + {"setScene3dBBox", ( PyCFunction ) ViewMap_setScene3dBBox, METH_VARARGS, "(BBox bb) Sets the scene 3D bounding box."}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_ViewMap type definition ------------------------------*/ + +PyTypeObject ViewMap_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewMap", /* tp_name */ + sizeof( BPy_ViewMap ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)ViewMap___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)ViewMap___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_ViewMap_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewMap___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC ViewMap_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &ViewMap_Type ) < 0 ) + return; + + Py_INCREF( &ViewMap_Type ); + PyModule_AddObject(module, "ViewMap", (PyObject *)&ViewMap_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int ViewMap___init__(BPy_ViewMap *self, PyObject *args, PyObject *kwds) +{ + self->vm = new ViewMap(); + return 0; +} + +void ViewMap___dealloc__(BPy_ViewMap *self) +{ + delete self->vm; + self->ob_type->tp_free((PyObject*)self); +} + +PyObject * ViewMap___repr__(BPy_ViewMap *self) +{ + return PyString_FromFormat("ViewMap - address: %p", self->vm ); +} + +PyObject * ViewMap_getClosestViewEdge( BPy_ViewMap *self , PyObject *args) { + double x, y; + + if(!( PyArg_ParseTuple(args, "dd", &x, &y) )) { + cout << "ERROR: ViewMap_getClosestFEdge" << endl; + Py_RETURN_NONE; + } + + ViewEdge *ve = const_cast( self->vm->getClosestViewEdge(x,y) ); + if( ve ) + return BPy_ViewEdge_from_ViewEdge(*ve); + + Py_RETURN_NONE; +} + +PyObject * ViewMap_getClosestFEdge( BPy_ViewMap *self , PyObject *args) { + double x, y; + + if(!( PyArg_ParseTuple(args, "dd", &x, &y) )) { + cout << "ERROR: ViewMap_getClosestFEdge" << endl; + Py_RETURN_NONE; + } + + FEdge *fe = const_cast( self->vm->getClosestFEdge(x,y) ); + if( fe ) + return BPy_FEdge_from_FEdge(*fe); + + Py_RETURN_NONE; +} + +PyObject * ViewMap_getScene3dBBox( BPy_ViewMap *self , PyObject *args) { + BBox bb( self->vm->getScene3dBBox() ); + return BPy_BBox_from_BBox( bb ); +} + +PyObject * ViewMap_setScene3dBBox( BPy_ViewMap *self , PyObject *args) { + PyObject *py_bb = 0; + + if(!( PyArg_ParseTuple(args, "O", &py_bb) && BPy_BBox_Check(py_bb) )) { + cout << "ERROR: ViewMap_setScene3dBBox" << endl; + Py_RETURN_NONE; + } + + self->vm->setScene3dBBox(*( ((BPy_BBox *) py_bb)->bb )); + + Py_RETURN_NONE; } - PyObject *_wrap_ViewMap_userdata_get(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_new_ViewMap(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ViewMap(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_getInstance(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_ViewShapes(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_ViewEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_ViewVertices(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_FEdges(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_SVertices(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_viewedges_begin(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_viewedges_end(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_viewedges_size(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_viewShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_shapeIdToIndexMap(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_getScene3dBBox(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_AddViewShape(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_AddViewEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_AddViewVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_AddFEdge(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_AddSVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_setScene3dBBox(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_CreateTVertex(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ViewMap_InsertViewVertex(PyObject *self , PyObject *args) { -} - - +#endif \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.h b/source/blender/freestyle/intern/python/BPy_ViewMap.h new file mode 100644 index 00000000000..841b5d46f07 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_VIEWMAP_H +#define FREESTYLE_PYTHON_VIEWMAP_H + +#include "../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewMap_Type; + +#define BPy_ViewMap_Check(v) (( (PyObject *) v)->ob_type == &ViewMap_Type) + +/*---------------------------Python BPy_ViewMap structure definition----------*/ +typedef struct { + PyObject_HEAD + ViewMap *vm; +} BPy_ViewMap; + +/*---------------------------Python BPy_ViewMap visible prototypes-----------*/ + +PyMODINIT_FUNC ViewMap_Init( PyObject *module ); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWMAP_H */ diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp index 3ac2c02a274..a87859491b4 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.cpp +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.cpp @@ -16,12 +16,27 @@ static int ViewShape___init__(BPy_ViewShape *self, PyObject *args, PyObject *kwd static void ViewShape___dealloc__(BPy_ViewShape *self); static PyObject * ViewShape___repr__(BPy_ViewShape* self); +static PyObject * ViewShape_sshape( BPy_ViewShape *self ); +static PyObject * ViewShape_vertices( BPy_ViewShape *self ); +static PyObject * ViewShape_edges( BPy_ViewShape *self ); +static PyObject * ViewShape_getId( BPy_ViewShape *self ); +static PyObject * ViewShape_setSShape( BPy_ViewShape *self , PyObject *args); +static PyObject * ViewShape_setVertices( BPy_ViewShape *self , PyObject *args); +static PyObject * ViewShape_setEdges( BPy_ViewShape *self , PyObject *args); +static PyObject * ViewShape_AddEdge( BPy_ViewShape *self , PyObject *args); +static PyObject * ViewShape_AddVertex( BPy_ViewShape *self , PyObject *args); /*---------------------- BPy_ViewShape instance definitions ----------------------------*/ static PyMethodDef BPy_ViewShape_methods[] = { - //{"AddEdge", ( PyCFunction ) ViewShape_AddEdge, METH_VARARGS, "(FEdge fe )Adds a FEdge to the list of FEdges. "}, - - + {"sshape", ( PyCFunction ) ViewShape_sshape, METH_NOARGS, "() Returns the SShape on top of which this ViewShape is built. "}, + {"vertices", ( PyCFunction ) ViewShape_vertices, METH_NOARGS, "() Returns the list of ViewVertex contained in this ViewShape."}, + {"edges", ( PyCFunction ) ViewShape_edges, METH_NOARGS, "() Returns the list of ViewEdge contained in this ViewShape. "}, + {"getId", ( PyCFunction ) ViewShape_getId, METH_NOARGS, "() Returns the ViewShape id. "}, + {"setSShape", ( PyCFunction ) ViewShape_setSShape, METH_VARARGS, "(SShape ss) Sets the SShape on top of which the ViewShape is built. "}, + {"setVertices", ( PyCFunction ) ViewShape_setVertices, METH_VARARGS, "([]) Sets the list of ViewVertex contained in this ViewShape."}, + {"setEdges", ( PyCFunction ) ViewShape_setEdges, METH_VARARGS, "([]) Sets the list of ViewEdge contained in this ViewShape."}, + {"AddEdge", ( PyCFunction ) ViewShape_AddEdge, METH_VARARGS, "(ViewEdge ve) Adds a ViewEdge to the list "}, + {"AddVertex", ( PyCFunction ) ViewShape_AddVertex, METH_VARARGS, "(ViewVertex ve) Adds a ViewVertex to the list. "}, {NULL, NULL, 0, NULL} }; @@ -231,7 +246,6 @@ PyObject * ViewShape_setVertices( BPy_ViewShape *self , PyObject *args) { Py_RETURN_NONE; } -//void SetEdges (const vector< ViewEdge * > &iEdges) PyObject * ViewShape_setEdges( BPy_ViewShape *self , PyObject *args) { PyObject *list = 0; PyObject *tmp; diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp index e0ae2ca373e..87624669204 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp @@ -69,7 +69,7 @@ void ViewMap::AddViewShape(ViewShape *iVShape) { _shapeIdToIndex[iVShape->getId().getFirst()] = _VShapes.size(); _VShapes.push_back(iVShape); } -const FEdge * ViewMap::GetClosestFEdge(real x, real y) const +const FEdge * ViewMap::getClosestFEdge(real x, real y) const { // find the closest of this candidates: real minDist = DBL_MAX; @@ -94,7 +94,7 @@ const FEdge * ViewMap::GetClosestFEdge(real x, real y) const return winner; } -const ViewEdge * ViewMap::GetClosestViewEdge(real x, real y) const +const ViewEdge * ViewMap::getClosestViewEdge(real x, real y) const { // find the closest of this candidates: real minDist = DBL_MAX; diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index e4b0d915ada..3f6be25312a 100755 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -99,12 +99,12 @@ public: /*! Gets the viewedge the nearest to the * 2D position specified as argument */ - const ViewEdge * GetClosestViewEdge(real x, real y) const ; + const ViewEdge * getClosestViewEdge(real x, real y) const ; /*! Gets the Fedge the nearest to the * 2D position specified as argument */ - const FEdge * GetClosestFEdge(real x, real y) const ; + const FEdge * getClosestFEdge(real x, real y) const ; /* accessors */ /*! The ViewMap is a singleton class. This static method From 995fdd9fcd382869cb5c87517c5aef5aeb08dd7a Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 27 Jul 2008 03:40:37 +0000 Subject: [PATCH 414/430] soc-2008-mxcurioni: implemented and tested unary predicates. The good news is that My approach seems to works (even though it is not fully testable as it needs Freestyle to be running). I will now port the 80 predicate subclasses left. In this commit, UnaryPredicate0DDouble and its subclasses DensityF0D and LocalAverageDepthF0D are implemented and integrated in the API. --- .../intern/python/BPy_UnaryFunction0D.cpp | 47 +---- .../intern/python/BPy_UnaryFunction0D.h | 1 - .../BPy_UnaryFunction0DDouble.cpp | 178 +++++++++++++++++- .../BPy_UnaryFunction0DDouble.h | 34 ++++ .../UnaryFunction0D_double/BPy_DensityF0D.cpp | 122 +++++++++++- .../UnaryFunction0D_double/BPy_DensityF0D.h | 30 +++ .../BPy_LocalAverageDepthF0D.cpp | 122 +++++++++++- .../BPy_LocalAverageDepthF0D.h | 30 +++ 8 files changed, 501 insertions(+), 63 deletions(-) create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index dda236a0989..01783bf0f7f 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -1,6 +1,6 @@ #include "BPy_UnaryFunction0D.h" -#include "BPy_Convert.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DDouble.h" #ifdef __cplusplus extern "C" { @@ -9,17 +9,11 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction0D instance -----------*/ -static int UnaryFunction0D___init__(BPy_UnaryFunction0D *self, PyObject *args, PyObject *kwds); static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self); static PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D *self); -static PyObject * UnaryFunction0D_getName( BPy_UnaryFunction0D *self, PyObject *args); -static PyObject * UnaryFunction0D___call__( BPy_UnaryFunction0D *self, PyObject *args); - /*----------------------UnaryFunction0D instance definitions ----------------------------*/ static PyMethodDef BPy_UnaryFunction0D_methods[] = { - {"getName", ( PyCFunction ) UnaryFunction0D_getName, METH_NOARGS, ""}, - {"__call__", ( PyCFunction ) UnaryFunction0D___call__, METH_VARARGS, "" }, {NULL, NULL, 0, NULL} }; @@ -89,7 +83,7 @@ PyTypeObject UnaryFunction0D_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - (initproc)UnaryFunction0D___init__, /* initproc tp_init; */ + NULL, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ PyType_GenericNew, /* newfunc tp_new; */ @@ -118,54 +112,23 @@ PyMODINIT_FUNC UnaryFunction0D_Init( PyObject *module ) return; Py_INCREF( &UnaryFunction0D_Type ); PyModule_AddObject(module, "UnaryFunction0D", (PyObject *)&UnaryFunction0D_Type); + + UnaryFunction0DDouble_Init( module ); } //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction0D___init__(BPy_UnaryFunction0D *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D* self) { - //delete self->uf0D; self->ob_type->tp_free((PyObject*)self); } PyObject * UnaryFunction0D___repr__(BPy_UnaryFunction0D* self) { - return PyString_FromFormat("type: %s - address: %p", ((UnaryFunction0D *) self->uf0D)->getName().c_str(), self->uf0D ); + return PyString_FromString("UnaryFunction0D"); } - -PyObject * UnaryFunction0D_getName( BPy_UnaryFunction0D *self, PyObject *args) -{ - return PyString_FromString( ((UnaryFunction0D *) self->uf0D)->getName().c_str() ); -} - -PyObject * UnaryFunction0D___call__( BPy_UnaryFunction0D *self, PyObject *args) -{ - PyObject *l; - - if( !PyArg_ParseTuple(args, "O", &l) ) { - cout << "ERROR: UnaryFunction0D___call__ " << endl; - return NULL; - } - - // pb: operator() is called on Interface0DIterator while we have a list - // solutions: - // 1)reconvert back to iterator ? - // 2) adapt interface0d to have t(), u() functions - - // b = self->bp0D->operator()( *(obj1->uf0D) ); - // return PyBool_from_bool( b ); - - Py_RETURN_NONE; -} - - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h index 8f1935871ca..e4854c58b45 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h @@ -18,7 +18,6 @@ extern PyTypeObject UnaryFunction0D_Type; /*---------------------------Python BPy_UnaryFunction0D structure definition----------*/ typedef struct { PyObject_HEAD - void *uf0D; } BPy_UnaryFunction0D; /*---------------------------Python BPy_UnaryFunction0D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index df286794dd3..770efb49073 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -1,12 +1,182 @@ - PyObject *_wrap_UnaryFunction0DDouble_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DDouble.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_double/BPy_DensityF0D.h" +#include "UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DDouble instance -----------*/ +static int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self); +static void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self); +static PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self); + +static PyObject * UnaryFunction0DDouble_getName( BPy_UnaryFunction0DDouble *self); +static PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args); + +/*----------------------UnaryFunction0DDouble instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DDouble_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DDouble_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DDouble___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DDouble type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DDouble_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DDouble", /* tp_name */ + sizeof( BPy_UnaryFunction0DDouble ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DDouble___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DDouble___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DDouble_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DDouble___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DDouble_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DDouble_Type ); + PyModule_AddObject(module, "UnaryFunction0DDouble", (PyObject *)&UnaryFunction0DDouble_Type); + + if( PyType_Ready( &DensityF0D_Type ) < 0 ) + return; + Py_INCREF( &DensityF0D_Type ); + PyModule_AddObject(module, "DensityF0D", (PyObject *)&DensityF0D_Type); + + if( PyType_Ready( &LocalAverageDepthF0D_Type ) < 0 ) + return; + Py_INCREF( &LocalAverageDepthF0D_Type ); + PyModule_AddObject(module, "LocalAverageDepthF0D", (PyObject *)&LocalAverageDepthF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self) +{ + self->uf0D_double = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DDouble___dealloc__(BPy_UnaryFunction0DDouble* self) +{ + delete self->uf0D_double; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DDouble___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DDouble___repr__(BPy_UnaryFunction0DDouble* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_double->getName().c_str(), self->uf0D_double ); } - - PyObject *_wrap_disown_UnaryFunction0DDouble(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DDouble_getName( BPy_UnaryFunction0DDouble *self ) +{ + return PyString_FromString( self->uf0D_double->getName().c_str() ); } +PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DDouble___call__ " << endl; + return NULL; + } + + double d = self->uf0D_double->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + return PyFloat_FromDouble( d ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h new file mode 100644 index 00000000000..2f0cb828419 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DDOUBLE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DDOUBLE_H + +#include "../BPy_UnaryFunction0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DDouble_Type; + +#define BPy_UnaryFunction0DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DDouble_Type) + +/*---------------------------Python BPy_UnaryFunction0DDouble structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_double; +} BPy_UnaryFunction0DDouble; + +/*---------------------------Python BPy_UnaryFunction0DDouble visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DDOUBLE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp index 50986360f2c..dd335d03fa8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_DensityF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_DensityF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for DensityF0D instance -----------*/ + static int DensityF0D___init__(BPy_DensityF0D* self, PyObject *args); + +/*-----------------------BPy_DensityF0D type definition ------------------------------*/ + +PyTypeObject DensityF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "DensityF0D", /* tp_name */ + sizeof( BPy_DensityF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)DensityF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int DensityF0D___init__( BPy_DensityF0D* self, PyObject *args) +{ + double d = 2; + + if( !PyArg_ParseTuple(args, "|d", &d) ) { + cout << "ERROR: DensityF0D___init__" << endl; + return -1; + } + + self->py_uf0D_double.uf0D_double = new Functions0D::DensityF0D(d); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_DensityF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_DensityF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h new file mode 100644 index 00000000000..3b113a0e636 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_DENSITYF0D_H +#define FREESTYLE_PYTHON_DENSITYF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject DensityF0D_Type; + +#define BPy_DensityF0D_Check(v) (( (PyObject *) v)->ob_type == &DensityF0D_Type) + +/*---------------------------Python BPy_DensityF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_DensityF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_DENSITYF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp index 0738f2cf6dc..3a9c516cd17 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_LocalAverageDepthF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_LocalAverageDepthF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for LocalAverageDepthF0D instance -----------*/ + static int LocalAverageDepthF0D___init__(BPy_LocalAverageDepthF0D* self, PyObject *args); + +/*-----------------------BPy_LocalAverageDepthF0D type definition ------------------------------*/ + +PyTypeObject LocalAverageDepthF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "LocalAverageDepthF0D", /* tp_name */ + sizeof( BPy_LocalAverageDepthF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)LocalAverageDepthF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int LocalAverageDepthF0D___init__( BPy_LocalAverageDepthF0D* self, PyObject *args) +{ + double d = 5.0; + + if( !PyArg_ParseTuple(args, "|d", &d) ) { + cout << "ERROR: LocalAverageDepthF0D___init__" << endl; + return -1; + } + + self->py_uf0D_double.uf0D_double = new Functions0D::LocalAverageDepthF0D(d); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_LocalAverageDepthF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_LocalAverageDepthF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h new file mode 100644 index 00000000000..6f84891fc1d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF0D_H +#define FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject LocalAverageDepthF0D_Type; + +#define BPy_LocalAverageDepthF0D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF0D_Type) + +/*---------------------------Python BPy_LocalAverageDepthF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_LocalAverageDepthF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF0D_H */ From 0cc6f9db3d70e443fa0162ab5bfddc55865ea70c Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 27 Jul 2008 06:57:46 +0000 Subject: [PATCH 415/430] soc-2008-mxcurioni: ported ALL 0D unary functions, representing 34 new classes. I will do the same for the 1D unary functions. --- source/blender/freestyle/SConscript | 36 ++++ .../intern/python/BPy_UnaryFunction0D.cpp | 19 ++ .../BPy_UnaryFunction0DDouble.cpp | 49 +++++ .../BPy_UnaryFunction0DEdgeNature.cpp | 176 +++++++++++++++ .../BPy_UnaryFunction0DEdgeNature.h | 36 ++++ .../BPy_UnaryFunction0DFloat.cpp | 201 +++++++++++++++++- .../BPy_UnaryFunction0DFloat.h | 34 +++ .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 171 ++++++++++++++- .../UnaryFunction0D/BPy_UnaryFunction0DId.h | 36 ++++ .../BPy_UnaryFunction0DMaterial.cpp | 176 +++++++++++++++ .../BPy_UnaryFunction0DMaterial.h | 36 ++++ .../BPy_UnaryFunction0DUnsigned.cpp | 172 ++++++++++++++- .../BPy_UnaryFunction0DUnsigned.h | 34 +++ .../BPy_UnaryFunction0DVec2f.cpp | 178 +++++++++++++++- .../BPy_UnaryFunction0DVec2f.h | 37 ++++ .../BPy_UnaryFunction0DVec3f.cpp | 172 ++++++++++++++- .../BPy_UnaryFunction0DVec3f.h | 37 ++++ .../BPy_UnaryFunction0DVectorViewShape.cpp | 177 ++++++++++++++- .../BPy_UnaryFunction0DVectorViewShape.h | 37 ++++ .../BPy_UnaryFunction0DViewShape.cpp | 178 +++++++++++++++- .../BPy_UnaryFunction0DViewShape.h | 36 ++++ .../UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp | 119 +++++++++-- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.h | 30 +++ .../BPy_MaterialF0D.cpp | 119 +++++++++-- .../BPy_MaterialF0D.h | 30 +++ .../BPy_CurveNatureF0D.cpp | 119 +++++++++-- .../BPy_CurveNatureF0D.h | 30 +++ .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp | 119 +++++++++-- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h | 30 +++ .../BPy_VertexOrientation2DF0D.cpp | 119 +++++++++-- .../BPy_VertexOrientation2DF0D.h | 30 +++ .../BPy_VertexOrientation3DF0D.cpp | 119 +++++++++-- .../BPy_VertexOrientation3DF0D.h | 30 +++ .../BPy_GetOccludeeF0D.cpp | 119 +++++++++-- .../BPy_GetOccludeeF0D.h | 30 +++ .../BPy_GetShapeF0D.cpp | 119 +++++++++-- .../BPy_GetShapeF0D.h | 30 +++ .../BPy_Curvature2DAngleF0D.cpp | 111 ++++++++++ .../BPy_Curvature2DAngleF0D.h | 30 +++ .../BPy_GetProjectedXF0D.cpp | 111 ++++++++++ .../BPy_GetProjectedXF0D.h | 30 +++ .../BPy_GetProjectedYF0D.cpp | 111 ++++++++++ .../BPy_GetProjectedYF0D.h | 30 +++ .../BPy_GetProjectedZF0D.cpp | 111 ++++++++++ .../BPy_GetProjectedZF0D.h | 30 +++ .../UnaryFunction0D_double/BPy_GetXF0D.cpp | 111 ++++++++++ .../UnaryFunction0D_double/BPy_GetXF0D.h | 30 +++ .../UnaryFunction0D_double/BPy_GetYF0D.cpp | 111 ++++++++++ .../UnaryFunction0D_double/BPy_GetYF0D.h | 30 +++ .../UnaryFunction0D_double/BPy_GetZF0D.cpp | 111 ++++++++++ .../UnaryFunction0D_double/BPy_GetZF0D.h | 30 +++ .../BPy_ZDiscontinuityF0D.cpp | 111 ++++++++++ .../BPy_ZDiscontinuityF0D.h | 30 +++ .../BPy_GetCurvilinearAbscissaF0D.cpp | 119 +++++++++-- .../BPy_GetCurvilinearAbscissaF0D.h | 30 +++ .../BPy_GetParameterF0D.cpp | 119 +++++++++-- .../BPy_GetParameterF0D.h | 30 +++ .../BPy_GetViewMapGradientNormF0D.cpp | 122 ++++++++++- .../BPy_GetViewMapGradientNormF0D.h | 30 +++ .../BPy_ReadCompleteViewMapPixelF0D.cpp | 122 ++++++++++- .../BPy_ReadCompleteViewMapPixelF0D.h | 30 +++ .../BPy_ReadMapPixelF0D.cpp | 123 ++++++++++- .../BPy_ReadMapPixelF0D.h | 30 +++ .../BPy_ReadSteerableViewMapPixelF0D.cpp | 123 ++++++++++- .../BPy_ReadSteerableViewMapPixelF0D.h | 30 +++ .../BPy_Curvature2DAngleF0D.cpp | 16 -- .../BPy_GetProjectedXF0D.cpp | 16 -- .../BPy_GetProjectedYF0D.cpp | 16 -- .../BPy_GetProjectedZF0D.cpp | 16 -- .../UnaryFunction0D_real/BPy_GetXF0D.cpp | 16 -- .../UnaryFunction0D_real/BPy_GetYF0D.cpp | 16 -- .../UnaryFunction0D_real/BPy_GetZF0D.cpp | 16 -- .../BPy_ZDiscontinuityF0D.cpp | 16 -- .../BPy_QuantitativeInvisibilityF0D.cpp | 119 +++++++++-- .../BPy_QuantitativeInvisibilityF0D.h | 30 +++ .../BPy_GetOccludersF0D.cpp | 119 +++++++++-- .../BPy_GetOccludersF0D.h | 30 +++ 77 files changed, 5354 insertions(+), 328 deletions(-) create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 88d4763affa..3ee1a79ce0c 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -101,6 +101,42 @@ python_sources = [ prefix + '/BPy_StrokeAttribute.cpp', prefix + '/BPy_StrokeShader.cpp', prefix + '/BPy_UnaryFunction0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DId.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp', + prefix + '/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp', + prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp', prefix + '/BPy_UnaryFunction1D.cpp', prefix + '/BPy_UnaryPredicate0D.cpp', prefix + '/BPy_UnaryPredicate1D.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index 01783bf0f7f..122c6cc678c 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -1,6 +1,16 @@ #include "BPy_UnaryFunction0D.h" #include "UnaryFunction0D/BPy_UnaryFunction0DDouble.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DFloat.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DId.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DMaterial.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVec2f.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVec3f.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DViewShape.h" + #ifdef __cplusplus extern "C" { @@ -114,6 +124,15 @@ PyMODINIT_FUNC UnaryFunction0D_Init( PyObject *module ) PyModule_AddObject(module, "UnaryFunction0D", (PyObject *)&UnaryFunction0D_Type); UnaryFunction0DDouble_Init( module ); + UnaryFunction0DEdgeNature_Init( module ); + UnaryFunction0DFloat_Init( module ); + UnaryFunction0DId_Init( module ); + UnaryFunction0DMaterial_Init( module ); + UnaryFunction0DUnsigned_Init( module ); + UnaryFunction0DVec2f_Init( module ); + UnaryFunction0DVec3f_Init( module ); + UnaryFunction0DVectorViewShape_Init( module ); + UnaryFunction0DViewShape_Init( module ); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index 770efb49073..e7ac46122b6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -3,8 +3,16 @@ #include "../BPy_Convert.h" #include "../Iterator/BPy_Interface0DIterator.h" +#include "UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h" #include "UnaryFunction0D_double/BPy_DensityF0D.h" +#include "UnaryFunction0D_double/BPy_GetProjectedXF0D.h" +#include "UnaryFunction0D_double/BPy_GetProjectedYF0D.h" +#include "UnaryFunction0D_double/BPy_GetProjectedZF0D.h" +#include "UnaryFunction0D_double/BPy_GetXF0D.h" +#include "UnaryFunction0D_double/BPy_GetYF0D.h" +#include "UnaryFunction0D_double/BPy_GetZF0D.h" #include "UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h" +#include "UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h" #ifdef __cplusplus extern "C" { @@ -133,6 +141,47 @@ PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ) { return; Py_INCREF( &LocalAverageDepthF0D_Type ); PyModule_AddObject(module, "LocalAverageDepthF0D", (PyObject *)&LocalAverageDepthF0D_Type); + + if( PyType_Ready( &Curvature2DAngleF0D_Type ) < 0 ) + return; + Py_INCREF( &Curvature2DAngleF0D_Type ); + PyModule_AddObject(module, "Curvature2DAngleF0D", (PyObject *)&Curvature2DAngleF0D_Type); + + if( PyType_Ready( &GetProjectedXF0D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedXF0D_Type ); + PyModule_AddObject(module, "GetProjectedXF0D", (PyObject *)&GetProjectedXF0D_Type); + + if( PyType_Ready( &GetProjectedYF0D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedYF0D_Type ); + PyModule_AddObject(module, "GetProjectedYF0D", (PyObject *)&GetProjectedYF0D_Type); + + if( PyType_Ready( &GetProjectedZF0D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedZF0D_Type ); + PyModule_AddObject(module, "GetProjectedZF0D", (PyObject *)&GetProjectedZF0D_Type); + + if( PyType_Ready( &GetXF0D_Type ) < 0 ) + return; + Py_INCREF( &GetXF0D_Type ); + PyModule_AddObject(module, "GetXF0D", (PyObject *)&GetXF0D_Type); + + if( PyType_Ready( &GetYF0D_Type ) < 0 ) + return; + Py_INCREF( &GetYF0D_Type ); + PyModule_AddObject(module, "GetYF0D", (PyObject *)&GetYF0D_Type); + + if( PyType_Ready( &GetZF0D_Type ) < 0 ) + return; + Py_INCREF( &GetZF0D_Type ); + PyModule_AddObject(module, "GetZF0D", (PyObject *)&GetZF0D_Type); + + if( PyType_Ready( &ZDiscontinuityF0D_Type ) < 0 ) + return; + Py_INCREF( &ZDiscontinuityF0D_Type ); + PyModule_AddObject(module, "ZDiscontinuityF0D", (PyObject *)&ZDiscontinuityF0D_Type); + } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp new file mode 100644 index 00000000000..3dfcb74cddd --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -0,0 +1,176 @@ +#include "BPy_UnaryFunction0DEdgeNature.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DEdgeNature instance -----------*/ +static int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self); +static void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* self); +static PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self); + +static PyObject * UnaryFunction0DEdgeNature_getName( BPy_UnaryFunction0DEdgeNature *self); +static PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args); + +/*----------------------UnaryFunction0DEdgeNature instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DEdgeNature_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DEdgeNature_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DEdgeNature___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DEdgeNature type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DEdgeNature_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DEdgeNature", /* tp_name */ + sizeof( BPy_UnaryFunction0DEdgeNature ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DEdgeNature___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DEdgeNature___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DEdgeNature_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DEdgeNature___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DEdgeNature_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DEdgeNature_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DEdgeNature_Type ); + PyModule_AddObject(module, "UnaryFunction0DEdgeNature", (PyObject *)&UnaryFunction0DEdgeNature_Type); + + if( PyType_Ready( &CurveNatureF0D_Type ) < 0 ) + return; + Py_INCREF( &CurveNatureF0D_Type ); + PyModule_AddObject(module, "CurveNatureF0D", (PyObject *)&CurveNatureF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self) +{ + self->uf0D_edgenature = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DEdgeNature___dealloc__(BPy_UnaryFunction0DEdgeNature* self) +{ + delete self->uf0D_edgenature; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); +} + + +PyObject * UnaryFunction0DEdgeNature___repr__(BPy_UnaryFunction0DEdgeNature* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_edgenature->getName().c_str(), self->uf0D_edgenature ); +} + +PyObject * UnaryFunction0DEdgeNature_getName( BPy_UnaryFunction0DEdgeNature *self ) +{ + return PyString_FromString( self->uf0D_edgenature->getName().c_str() ); +} + +PyObject * UnaryFunction0DEdgeNature___call__( BPy_UnaryFunction0DEdgeNature *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DEdgeNature___call__ " << endl; + return NULL; + } + + Nature::EdgeNature n = self->uf0D_edgenature->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + return BPy_Nature_from_Nature( n ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h new file mode 100644 index 00000000000..2aacd343ab1 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DEDGENATURE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DEDGENATURE_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../winged_edge/Nature.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DEdgeNature_Type; + +#define BPy_UnaryFunction0DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DEdgeNature_Type) + +/*---------------------------Python BPy_UnaryFunction0DEdgeNature structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_edgenature; +} BPy_UnaryFunction0DEdgeNature; + +/*---------------------------Python BPy_UnaryFunction0DEdgeNature visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DEdgeNature_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DEDGENATURE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index ccb89d91ecf..2c11eb92ed5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -1,12 +1,205 @@ - PyObject *_wrap_UnaryFunction0DFloat_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DFloat.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h" +#include "UnaryFunction0D_float/BPy_GetParameterF0D.h" +#include "UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h" +#include "UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h" +#include "UnaryFunction0D_float/BPy_ReadMapPixelF0D.h" +#include "UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DFloat instance -----------*/ +static int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self); +static void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self); +static PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self); + +static PyObject * UnaryFunction0DFloat_getName( BPy_UnaryFunction0DFloat *self); +static PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args); + +/*----------------------UnaryFunction0DFloat instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DFloat_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DFloat_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DFloat___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DFloat type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DFloat_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DFloat", /* tp_name */ + sizeof( BPy_UnaryFunction0DFloat ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DFloat___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DFloat___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DFloat_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DFloat___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DFloat_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DFloat_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DFloat_Type ); + PyModule_AddObject(module, "UnaryFunction0DFloat", (PyObject *)&UnaryFunction0DFloat_Type); + + if( PyType_Ready( &GetCurvilinearAbscissaF0D_Type ) < 0 ) + return; + Py_INCREF( &GetCurvilinearAbscissaF0D_Type ); + PyModule_AddObject(module, "GetCurvilinearAbscissaF0D", (PyObject *)&GetCurvilinearAbscissaF0D_Type); + + if( PyType_Ready( &GetParameterF0D_Type ) < 0 ) + return; + Py_INCREF( &GetParameterF0D_Type ); + PyModule_AddObject(module, "GetParameterF0D", (PyObject *)&GetParameterF0D_Type); + + if( PyType_Ready( &GetViewMapGradientNormF0D_Type ) < 0 ) + return; + Py_INCREF( &GetViewMapGradientNormF0D_Type ); + PyModule_AddObject(module, "GetViewMapGradientNormF0D", (PyObject *)&GetViewMapGradientNormF0D_Type); + + if( PyType_Ready( &ReadCompleteViewMapPixelF0D_Type ) < 0 ) + return; + Py_INCREF( &ReadCompleteViewMapPixelF0D_Type ); + PyModule_AddObject(module, "ReadCompleteViewMapPixelF0D", (PyObject *)&ReadCompleteViewMapPixelF0D_Type); + + if( PyType_Ready( &ReadMapPixelF0D_Type ) < 0 ) + return; + Py_INCREF( &ReadMapPixelF0D_Type ); + PyModule_AddObject(module, "ReadMapPixelF0D", (PyObject *)&ReadMapPixelF0D_Type); + + if( PyType_Ready( &ReadSteerableViewMapPixelF0D_Type ) < 0 ) + return; + Py_INCREF( &ReadSteerableViewMapPixelF0D_Type ); + PyModule_AddObject(module, "ReadSteerableViewMapPixelF0D", (PyObject *)&ReadSteerableViewMapPixelF0D_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self) +{ + self->uf0D_float = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DFloat___dealloc__(BPy_UnaryFunction0DFloat* self) +{ + delete self->uf0D_float; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DFloat___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DFloat___repr__(BPy_UnaryFunction0DFloat* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_float->getName().c_str(), self->uf0D_float ); } - - PyObject *_wrap_disown_UnaryFunction0DFloat(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DFloat_getName( BPy_UnaryFunction0DFloat *self ) +{ + return PyString_FromString( self->uf0D_float->getName().c_str() ); } +PyObject * UnaryFunction0DFloat___call__( BPy_UnaryFunction0DFloat *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DFloat___call__ " << endl; + return NULL; + } + + float f = self->uf0D_float->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + return PyFloat_FromDouble( f ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h new file mode 100644 index 00000000000..46183228af6 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DFLOAT_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DFLOAT_H + +#include "../BPy_UnaryFunction0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DFloat_Type; + +#define BPy_UnaryFunction0DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DFloat_Type) + +/*---------------------------Python BPy_UnaryFunction0DFloat structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_float; +} BPy_UnaryFunction0DFloat; + +/*---------------------------Python BPy_UnaryFunction0DFloat visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DFloat_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DFLOAT_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index b854b3ccaa4..2d6cbf09be1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -1,12 +1,175 @@ - PyObject *_wrap_UnaryFunction0DId_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DId.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_Id/BPy_ShapeIdF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DId instance -----------*/ +static int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self); +static void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self); +static PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self); + +static PyObject * UnaryFunction0DId_getName( BPy_UnaryFunction0DId *self); +static PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args); + +/*----------------------UnaryFunction0DId instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DId_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DId_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DId___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DId type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DId_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DId", /* tp_name */ + sizeof( BPy_UnaryFunction0DId ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DId___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DId___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DId_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DId___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DId_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DId_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DId_Type ); + PyModule_AddObject(module, "UnaryFunction0DId", (PyObject *)&UnaryFunction0DId_Type); + + if( PyType_Ready( &ShapeIdF0D_Type ) < 0 ) + return; + Py_INCREF( &ShapeIdF0D_Type ); + PyModule_AddObject(module, "ShapeIdF0D", (PyObject *)&ShapeIdF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self) +{ + self->uf0D_id = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DId___dealloc__(BPy_UnaryFunction0DId* self) +{ + delete self->uf0D_id; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DId___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DId___repr__(BPy_UnaryFunction0DId* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_id->getName().c_str(), self->uf0D_id ); } - - PyObject *_wrap_disown_UnaryFunction0DId(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DId_getName( BPy_UnaryFunction0DId *self ) +{ + return PyString_FromString( self->uf0D_id->getName().c_str() ); } +PyObject * UnaryFunction0DId___call__( BPy_UnaryFunction0DId *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DId___call__ " << endl; + return NULL; + } + + Id id( self->uf0D_id->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); + return BPy_Id_from_Id( id ); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h new file mode 100644 index 00000000000..b1b87058bc8 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DID_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DID_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../system/Id.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DId_Type; + +#define BPy_UnaryFunction0DId_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DId_Type) + +/*---------------------------Python BPy_UnaryFunction0DId structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_id; +} BPy_UnaryFunction0DId; + +/*---------------------------Python BPy_UnaryFunction0DId visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DId_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DID_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp new file mode 100644 index 00000000000..733acce6ab8 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -0,0 +1,176 @@ +#include "BPy_UnaryFunction0DMaterial.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_Material/BPy_MaterialF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DMaterial instance -----------*/ +static int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self); +static void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* self); +static PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self); + +static PyObject * UnaryFunction0DMaterial_getName( BPy_UnaryFunction0DMaterial *self); +static PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args); + +/*----------------------UnaryFunction0DMaterial instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DMaterial_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DMaterial_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DMaterial___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DMaterial type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DMaterial_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DMaterial", /* tp_name */ + sizeof( BPy_UnaryFunction0DMaterial ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DMaterial___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DMaterial___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DMaterial_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DMaterial___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DMaterial_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DMaterial_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DMaterial_Type ); + PyModule_AddObject(module, "UnaryFunction0DMaterial", (PyObject *)&UnaryFunction0DMaterial_Type); + + if( PyType_Ready( &MaterialF0D_Type ) < 0 ) + return; + Py_INCREF( &MaterialF0D_Type ); + PyModule_AddObject(module, "MaterialF0D", (PyObject *)&MaterialF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self) +{ + self->uf0D_material = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DMaterial___dealloc__(BPy_UnaryFunction0DMaterial* self) +{ + delete self->uf0D_material; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); +} + + +PyObject * UnaryFunction0DMaterial___repr__(BPy_UnaryFunction0DMaterial* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_material->getName().c_str(), self->uf0D_material ); +} + +PyObject * UnaryFunction0DMaterial_getName( BPy_UnaryFunction0DMaterial *self ) +{ + return PyString_FromString( self->uf0D_material->getName().c_str() ); +} + +PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DMaterial___call__ " << endl; + return NULL; + } + + Material m( self->uf0D_material->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); + return BPy_FrsMaterial_from_Material( m ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h new file mode 100644 index 00000000000..d8baa3d98f4 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DMATERIAL_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DMATERIAL_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../scene_graph/Material.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DMaterial_Type; + +#define BPy_UnaryFunction0DMaterial_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DMaterial_Type) + +/*---------------------------Python BPy_UnaryFunction0DMaterial structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_material; +} BPy_UnaryFunction0DMaterial; + +/*---------------------------Python BPy_UnaryFunction0DMaterial visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DMaterial_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DMATERIAL_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index 425d1cdabf5..a7d8e9f42a7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -1,12 +1,176 @@ - PyObject *_wrap_UnaryFunction0DUnsigned_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DUnsigned.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DUnsigned instance -----------*/ +static int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self); +static void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* self); +static PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self); + +static PyObject * UnaryFunction0DUnsigned_getName( BPy_UnaryFunction0DUnsigned *self); +static PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args); + +/*----------------------UnaryFunction0DUnsigned instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DUnsigned_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DUnsigned_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DUnsigned___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DUnsigned type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DUnsigned_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DUnsigned", /* tp_name */ + sizeof( BPy_UnaryFunction0DUnsigned ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DUnsigned___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DUnsigned___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DUnsigned_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DUnsigned___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DUnsigned_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DUnsigned_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DUnsigned_Type ); + PyModule_AddObject(module, "UnaryFunction0DUnsigned", (PyObject *)&UnaryFunction0DUnsigned_Type); + + if( PyType_Ready( &QuantitativeInvisibilityF0D_Type ) < 0 ) + return; + Py_INCREF( &QuantitativeInvisibilityF0D_Type ); + PyModule_AddObject(module, "QuantitativeInvisibilityF0D", (PyObject *)&QuantitativeInvisibilityF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self) +{ + self->uf0D_unsigned = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DUnsigned___dealloc__(BPy_UnaryFunction0DUnsigned* self) +{ + delete self->uf0D_unsigned; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DUnsigned___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DUnsigned___repr__(BPy_UnaryFunction0DUnsigned* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_unsigned->getName().c_str(), self->uf0D_unsigned ); } - - PyObject *_wrap_disown_UnaryFunction0DUnsigned(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DUnsigned_getName( BPy_UnaryFunction0DUnsigned *self ) +{ + return PyString_FromString( self->uf0D_unsigned->getName().c_str() ); } +PyObject * UnaryFunction0DUnsigned___call__( BPy_UnaryFunction0DUnsigned *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DUnsigned___call__ " << endl; + return NULL; + } + + unsigned int i = self->uf0D_unsigned->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + return PyInt_FromLong( i ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h new file mode 100644 index 00000000000..f79739b7a34 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DUNSIGNED_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DUNSIGNED_H + +#include "../BPy_UnaryFunction0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DUnsigned_Type; + +#define BPy_UnaryFunction0DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DUnsigned_Type) + +/*---------------------------Python BPy_UnaryFunction0DUnsigned structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_unsigned; +} BPy_UnaryFunction0DUnsigned; + +/*---------------------------Python BPy_UnaryFunction0DUnsigned visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DUnsigned_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DUNSIGNED_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index 828d39b6de7..fb7fc4f19fe 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -1,12 +1,182 @@ - PyObject *_wrap_UnaryFunction0DVec2f_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DVec2f.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h" +#include "UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DVec2f instance -----------*/ +static int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self); +static void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self); +static PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self); + +static PyObject * UnaryFunction0DVec2f_getName( BPy_UnaryFunction0DVec2f *self); +static PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args); + +/*----------------------UnaryFunction0DVec2f instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DVec2f_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DVec2f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DVec2f___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DVec2f type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DVec2f_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DVec2f", /* tp_name */ + sizeof( BPy_UnaryFunction0DVec2f ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DVec2f___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DVec2f___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DVec2f_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DVec2f___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DVec2f_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DVec2f_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DVec2f_Type ); + PyModule_AddObject(module, "UnaryFunction0DVec2f", (PyObject *)&UnaryFunction0DVec2f_Type); + + if( PyType_Ready( &Normal2DF0D_Type ) < 0 ) + return; + Py_INCREF( &Normal2DF0D_Type ); + PyModule_AddObject(module, "Normal2DF0D", (PyObject *)&Normal2DF0D_Type); + + if( PyType_Ready( &VertexOrientation2DF0D_Type ) < 0 ) + return; + Py_INCREF( &VertexOrientation2DF0D_Type ); + PyModule_AddObject(module, "VertexOrientation2DF0D", (PyObject *)&VertexOrientation2DF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self) +{ + self->uf0D_vec2f = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DVec2f___dealloc__(BPy_UnaryFunction0DVec2f* self) +{ + delete self->uf0D_vec2f; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DVec2f___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DVec2f___repr__(BPy_UnaryFunction0DVec2f* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_vec2f->getName().c_str(), self->uf0D_vec2f ); } - - PyObject *_wrap_disown_UnaryFunction0DVec2f(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DVec2f_getName( BPy_UnaryFunction0DVec2f *self ) +{ + return PyString_FromString( self->uf0D_vec2f->getName().c_str() ); } +PyObject * UnaryFunction0DVec2f___call__( BPy_UnaryFunction0DVec2f *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DVec2f___call__ " << endl; + return NULL; + } + + Vec2f v( self->uf0D_vec2f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); + return Vector_from_Vec2f( v ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h new file mode 100644 index 00000000000..a52edd1461a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DVEC2F_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DVEC2F_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DVec2f_Type; + +#define BPy_UnaryFunction0DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec2f_Type) + +/*---------------------------Python BPy_UnaryFunction0DVec2f structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_vec2f; +} BPy_UnaryFunction0DVec2f; + +/*---------------------------Python BPy_UnaryFunction0DVec2f visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DVec2f_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DVEC2F_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index b6a6d0264bc..d0412d7c7d0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -1,12 +1,176 @@ - PyObject *_wrap_UnaryFunction0DVec3f_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DVec3f.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DVec3f instance -----------*/ +static int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self); +static void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self); +static PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self); + +static PyObject * UnaryFunction0DVec3f_getName( BPy_UnaryFunction0DVec3f *self); +static PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args); + +/*----------------------UnaryFunction0DVec3f instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DVec3f_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DVec3f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DVec3f___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DVec3f type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DVec3f_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DVec3f", /* tp_name */ + sizeof( BPy_UnaryFunction0DVec3f ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DVec3f___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DVec3f___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DVec3f_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DVec3f___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DVec3f_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DVec3f_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DVec3f_Type ); + PyModule_AddObject(module, "UnaryFunction0DVec3f", (PyObject *)&UnaryFunction0DVec3f_Type); + + if( PyType_Ready( &VertexOrientation3DF0D_Type ) < 0 ) + return; + Py_INCREF( &VertexOrientation3DF0D_Type ); + PyModule_AddObject(module, "VertexOrientation3DF0D", (PyObject *)&VertexOrientation3DF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self) +{ + self->uf0D_vec3f = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DVec3f___dealloc__(BPy_UnaryFunction0DVec3f* self) +{ + delete self->uf0D_vec3f; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DVec3f___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DVec3f___repr__(BPy_UnaryFunction0DVec3f* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_vec3f->getName().c_str(), self->uf0D_vec3f ); } - - PyObject *_wrap_disown_UnaryFunction0DVec3f(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DVec3f_getName( BPy_UnaryFunction0DVec3f *self ) +{ + return PyString_FromString( self->uf0D_vec3f->getName().c_str() ); } +PyObject * UnaryFunction0DVec3f___call__( BPy_UnaryFunction0DVec3f *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DVec3f___call__ " << endl; + return NULL; + } + + Vec3f v( self->uf0D_vec3f->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); + return Vector_from_Vec3f( v ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h new file mode 100644 index 00000000000..b0e598c05cd --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DVEC3F_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DVEC3F_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DVec3f_Type; + +#define BPy_UnaryFunction0DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec3f_Type) + +/*---------------------------Python BPy_UnaryFunction0DVec3f structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_vec3f; +} BPy_UnaryFunction0DVec3f; + +/*---------------------------Python BPy_UnaryFunction0DVec3f visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DVec3f_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DVEC3F_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index f9736680ab8..f7c520b1492 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -1,8 +1,181 @@ - PyObject *_wrap_UnaryFunction0DVectorViewShape_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DVectorViewShape.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DVectorViewShape instance -----------*/ +static int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self); +static void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape* self); +static PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self); + +static PyObject * UnaryFunction0DVectorViewShape_getName( BPy_UnaryFunction0DVectorViewShape *self); +static PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args); + +/*----------------------UnaryFunction0DVectorViewShape instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DVectorViewShape_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DVectorViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DVectorViewShape___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DVectorViewShape type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DVectorViewShape_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DVectorViewShape", /* tp_name */ + sizeof( BPy_UnaryFunction0DVectorViewShape ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DVectorViewShape_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DVectorViewShape___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DVectorViewShape_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DVectorViewShape_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DVectorViewShape_Type ); + PyModule_AddObject(module, "UnaryFunction0DVectorViewShape", (PyObject *)&UnaryFunction0DVectorViewShape_Type); + + if( PyType_Ready( &GetOccludersF0D_Type ) < 0 ) + return; + Py_INCREF( &GetOccludersF0D_Type ); + PyModule_AddObject(module, "GetOccludersF0D", (PyObject *)&GetOccludersF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self) +{ + self->uf0D_vectorviewshape = new UnaryFunction0D< std::vector >(); + return 0; +} + +void UnaryFunction0DVectorViewShape___dealloc__(BPy_UnaryFunction0DVectorViewShape* self) +{ + delete self->uf0D_vectorviewshape; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DVectorViewShape___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DVectorViewShape___repr__(BPy_UnaryFunction0DVectorViewShape* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_vectorviewshape->getName().c_str(), self->uf0D_vectorviewshape ); } +PyObject * UnaryFunction0DVectorViewShape_getName( BPy_UnaryFunction0DVectorViewShape *self ) +{ + return PyString_FromString( self->uf0D_vectorviewshape->getName().c_str() ); +} +PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorViewShape *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DVectorViewShape___call__ " << endl; + return NULL; + } + + + std::vector vs( self->uf0D_vectorviewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); + PyObject *list = PyList_New(NULL); + + for( int i = 0; i < vs.size(); i++) + PyList_Append(list, BPy_ViewShape_from_ViewShape(*( vs[i] )) ); + + return list; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h new file mode 100644 index 00000000000..88daae11b68 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DVECTORVIEWSHAPE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DVECTORVIEWSHAPE_H + +#include "../BPy_UnaryFunction0D.h" + +#include +#include "../../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DVectorViewShape_Type; + +#define BPy_UnaryFunction0DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVectorViewShape_Type) + +/*---------------------------Python BPy_UnaryFunction0DVectorViewShape structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D< std::vector > *uf0D_vectorviewshape; +} BPy_UnaryFunction0DVectorViewShape; + +/*---------------------------Python BPy_UnaryFunction0DVectorViewShape visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DVectorViewShape_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DVECTORVIEWSHAPE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index 3dddb333a55..eb2fceb3f06 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -1,8 +1,182 @@ - PyObject *_wrap_UnaryFunction0DViewShape_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction0DViewShape.h" + +#include "../BPy_Convert.h" +#include "../Iterator/BPy_Interface0DIterator.h" + +#include "UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h" +#include "UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction0DViewShape instance -----------*/ +static int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self); +static void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* self); +static PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self); + +static PyObject * UnaryFunction0DViewShape_getName( BPy_UnaryFunction0DViewShape *self); +static PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args); + +/*----------------------UnaryFunction0DViewShape instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction0DViewShape_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction0DViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 0D function."}, + {"__call__", ( PyCFunction ) UnaryFunction0DViewShape___call__, METH_VARARGS, "(Interface0DIterator it )Executes the operator () on the iterator it pointing onto the point at which we wish to evaluate the function." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction0DViewShape type definition ------------------------------*/ + +PyTypeObject UnaryFunction0DViewShape_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction0DViewShape", /* tp_name */ + sizeof( BPy_UnaryFunction0DViewShape ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction0DViewShape___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction0DViewShape___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction0DViewShape_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction0DViewShape___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction0DViewShape_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction0DViewShape_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction0DViewShape_Type ); + PyModule_AddObject(module, "UnaryFunction0DViewShape", (PyObject *)&UnaryFunction0DViewShape_Type); + + if( PyType_Ready( &GetOccludeeF0D_Type ) < 0 ) + return; + Py_INCREF( &GetOccludeeF0D_Type ); + PyModule_AddObject(module, "GetOccludeeF0D", (PyObject *)&GetOccludeeF0D_Type); + + if( PyType_Ready( &GetShapeF0D_Type ) < 0 ) + return; + Py_INCREF( &GetShapeF0D_Type ); + PyModule_AddObject(module, "GetShapeF0D", (PyObject *)&GetShapeF0D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self) +{ + self->uf0D_viewshape = new UnaryFunction0D(); + return 0; +} + +void UnaryFunction0DViewShape___dealloc__(BPy_UnaryFunction0DViewShape* self) +{ + delete self->uf0D_viewshape; + UnaryFunction0D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction0DViewShape___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction0DViewShape___repr__(BPy_UnaryFunction0DViewShape* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf0D_viewshape->getName().c_str(), self->uf0D_viewshape ); } +PyObject * UnaryFunction0DViewShape_getName( BPy_UnaryFunction0DViewShape *self ) +{ + return PyString_FromString( self->uf0D_viewshape->getName().c_str() ); +} +PyObject * UnaryFunction0DViewShape___call__( BPy_UnaryFunction0DViewShape *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface0DIterator_Check(obj) ) { + cout << "ERROR: UnaryFunction0DViewShape___call__ " << endl; + return NULL; + } + + ViewShape *vs = self->uf0D_viewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + return BPy_ViewShape_from_ViewShape( *vs ); + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h new file mode 100644 index 00000000000..01057333a3e --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION0DVIEWSHAPE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION0DVIEWSHAPE_H + +#include "../BPy_UnaryFunction0D.h" + +#include "../../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction0DViewShape_Type; + +#define BPy_UnaryFunction0DViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DViewShape_Type) + +/*---------------------------Python BPy_UnaryFunction0DViewShape structure definition----------*/ +typedef struct { + BPy_UnaryFunction0D py_uf0D; + UnaryFunction0D *uf0D_viewshape; +} BPy_UnaryFunction0DViewShape; + +/*---------------------------Python BPy_UnaryFunction0DViewShape visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction0DViewShape_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION0DVIEWSHAPE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp index 58fa20b8e95..2ca5f7899f9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_ShapeIdF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_ShapeIdF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ShapeIdF0D instance -----------*/ + static int ShapeIdF0D___init__(BPy_ShapeIdF0D* self); + +/*-----------------------BPy_ShapeIdF0D type definition ------------------------------*/ + +PyTypeObject ShapeIdF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ShapeIdF0D", /* tp_name */ + sizeof( BPy_ShapeIdF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DId_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ShapeIdF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ShapeIdF0D___init__( BPy_ShapeIdF0D* self ) +{ + self->py_uf0D_id.uf0D_id = new Functions0D::ShapeIdF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ShapeIdF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_ShapeIdF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ShapeIdF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h new file mode 100644 index 00000000000..25d4bd76a1b --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_SHAPEIDF0D_H +#define FREESTYLE_PYTHON_SHAPEIDF0D_H + +#include "../BPy_UnaryFunction0DId.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ShapeIdF0D_Type; + +#define BPy_ShapeIdF0D_Check(v) (( (PyObject *) v)->ob_type == &ShapeIdF0D_Type) + +/*---------------------------Python BPy_ShapeIdF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DId py_uf0D_id; +} BPy_ShapeIdF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SHAPEIDF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp index 167a68b8977..d28fc2f4363 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_MaterialF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_MaterialF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for MaterialF0D instance -----------*/ + static int MaterialF0D___init__(BPy_MaterialF0D* self); + +/*-----------------------BPy_MaterialF0D type definition ------------------------------*/ + +PyTypeObject MaterialF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "MaterialF0D", /* tp_name */ + sizeof( BPy_MaterialF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DMaterial_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)MaterialF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int MaterialF0D___init__( BPy_MaterialF0D* self ) +{ + self->py_uf0D_material.uf0D_material = new Functions0D::MaterialF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_MaterialF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_MaterialF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_MaterialF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h new file mode 100644 index 00000000000..4a3af1b9ff6 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_MATERIALF0D_H +#define FREESTYLE_PYTHON_MATERIALF0D_H + +#include "../BPy_UnaryFunction0DMaterial.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject MaterialF0D_Type; + +#define BPy_MaterialF0D_Check(v) (( (PyObject *) v)->ob_type == &MaterialF0D_Type) + +/*---------------------------Python BPy_MaterialF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DMaterial py_uf0D_material; +} BPy_MaterialF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_MATERIALF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp index 1b155757589..449a4234548 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_CurveNatureF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_CurveNatureF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for CurveNatureF0D instance -----------*/ + static int CurveNatureF0D___init__(BPy_CurveNatureF0D* self); + +/*-----------------------BPy_CurveNatureF0D type definition ------------------------------*/ + +PyTypeObject CurveNatureF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "CurveNatureF0D", /* tp_name */ + sizeof( BPy_CurveNatureF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DEdgeNature_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)CurveNatureF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int CurveNatureF0D___init__( BPy_CurveNatureF0D* self ) +{ + self->py_uf0D_edgenature.uf0D_edgenature = new Functions0D::CurveNatureF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_CurveNatureF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_CurveNatureF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_CurveNatureF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h new file mode 100644 index 00000000000..62494f3dbaa --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_CURVENATUREF0D_H +#define FREESTYLE_PYTHON_CURVENATUREF0D_H + +#include "../BPy_UnaryFunction0DEdgeNature.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject CurveNatureF0D_Type; + +#define BPy_CurveNatureF0D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF0D_Type) + +/*---------------------------Python BPy_CurveNatureF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DEdgeNature py_uf0D_edgenature; +} BPy_CurveNatureF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVENATUREF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp index 99f892529ab..141dd3274a4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_Normal2DF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_Normal2DF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Normal2DF0D instance -----------*/ + static int Normal2DF0D___init__(BPy_Normal2DF0D* self); + +/*-----------------------BPy_Normal2DF0D type definition ------------------------------*/ + +PyTypeObject Normal2DF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Normal2DF0D", /* tp_name */ + sizeof( BPy_Normal2DF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DVec2f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Normal2DF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Normal2DF0D___init__( BPy_Normal2DF0D* self ) +{ + self->py_uf0D_vec2f.uf0D_vec2f = new Functions0D::Normal2DF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_Normal2DF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_Normal2DF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_Normal2DF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h new file mode 100644 index 00000000000..1482ffae5f2 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_NORMAL2DF0D_H +#define FREESTYLE_PYTHON_NORMAL2DF0D_H + +#include "../BPy_UnaryFunction0DVec2f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Normal2DF0D_Type; + +#define BPy_Normal2DF0D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF0D_Type) + +/*---------------------------Python BPy_Normal2DF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DVec2f py_uf0D_vec2f; +} BPy_Normal2DF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_NORMAL2DF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp index bf7fbfe2550..2637ae17f2b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_VertexOrientation2DF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_VertexOrientation2DF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for VertexOrientation2DF0D instance -----------*/ + static int VertexOrientation2DF0D___init__(BPy_VertexOrientation2DF0D* self); + +/*-----------------------BPy_VertexOrientation2DF0D type definition ------------------------------*/ + +PyTypeObject VertexOrientation2DF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "VertexOrientation2DF0D", /* tp_name */ + sizeof( BPy_VertexOrientation2DF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DVec2f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)VertexOrientation2DF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int VertexOrientation2DF0D___init__( BPy_VertexOrientation2DF0D* self ) +{ + self->py_uf0D_vec2f.uf0D_vec2f = new Functions0D::VertexOrientation2DF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_VertexOrientation2DF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_VertexOrientation2DF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_VertexOrientation2DF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h new file mode 100644 index 00000000000..c6ace665481 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_VERTEXORIENTATION2DF0D_H +#define FREESTYLE_PYTHON_VERTEXORIENTATION2DF0D_H + +#include "../BPy_UnaryFunction0DVec2f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject VertexOrientation2DF0D_Type; + +#define BPy_VertexOrientation2DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation2DF0D_Type) + +/*---------------------------Python BPy_VertexOrientation2DF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DVec2f py_uf0D_vec2f; +} BPy_VertexOrientation2DF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VERTEXORIENTATION2DF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp index 32d5ac529fa..2c7eba1900a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_VertexOrientation3DF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_VertexOrientation3DF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for VertexOrientation3DF0D instance -----------*/ + static int VertexOrientation3DF0D___init__(BPy_VertexOrientation3DF0D* self); + +/*-----------------------BPy_VertexOrientation3DF0D type definition ------------------------------*/ + +PyTypeObject VertexOrientation3DF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "VertexOrientation3DF0D", /* tp_name */ + sizeof( BPy_VertexOrientation3DF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DVec3f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)VertexOrientation3DF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int VertexOrientation3DF0D___init__( BPy_VertexOrientation3DF0D* self ) +{ + self->py_uf0D_vec3f.uf0D_vec3f = new Functions0D::VertexOrientation3DF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_VertexOrientation3DF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_VertexOrientation3DF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_VertexOrientation3DF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h new file mode 100644 index 00000000000..6a916362bb7 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_VERTEXORIENTATION3DF0D_H +#define FREESTYLE_PYTHON_VERTEXORIENTATION3DF0D_H + +#include "../BPy_UnaryFunction0DVec3f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject VertexOrientation3DF0D_Type; + +#define BPy_VertexOrientation3DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation3DF0D_Type) + +/*---------------------------Python BPy_VertexOrientation3DF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DVec3f py_uf0D_vec3f; +} BPy_VertexOrientation3DF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VERTEXORIENTATION3DF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp index 2dc779a3fdb..cc36d377768 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_GetOccludeeF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetOccludeeF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetOccludeeF0D instance -----------*/ + static int GetOccludeeF0D___init__(BPy_GetOccludeeF0D* self); + +/*-----------------------BPy_GetOccludeeF0D type definition ------------------------------*/ + +PyTypeObject GetOccludeeF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetOccludeeF0D", /* tp_name */ + sizeof( BPy_GetOccludeeF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetOccludeeF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetOccludeeF0D___init__( BPy_GetOccludeeF0D* self ) +{ + self->py_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetOccludeeF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetOccludeeF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_GetOccludeeF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetOccludeeF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h new file mode 100644 index 00000000000..2ba71a6637e --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETOCCLUDEEF0D_H +#define FREESTYLE_PYTHON_GETOCCLUDEEF0D_H + +#include "../BPy_UnaryFunction0DViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetOccludeeF0D_Type; + +#define BPy_GetOccludeeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF0D_Type) + +/*---------------------------Python BPy_GetOccludeeF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DViewShape py_uf0D_viewshape; +} BPy_GetOccludeeF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETOCCLUDEEF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp index 92ec79efec5..2bd4bbae039 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_GetShapeF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetShapeF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetShapeF0D instance -----------*/ + static int GetShapeF0D___init__(BPy_GetShapeF0D* self); + +/*-----------------------BPy_GetShapeF0D type definition ------------------------------*/ + +PyTypeObject GetShapeF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetShapeF0D", /* tp_name */ + sizeof( BPy_GetShapeF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetShapeF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetShapeF0D___init__( BPy_GetShapeF0D* self ) +{ + self->py_uf0D_viewshape.uf0D_viewshape = new Functions0D::GetShapeF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetShapeF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_GetShapeF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetShapeF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h new file mode 100644 index 00000000000..6e97bd9a690 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETSHAPEF0D_H +#define FREESTYLE_PYTHON_GETSHAPEF0D_H + +#include "../BPy_UnaryFunction0DViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetShapeF0D_Type; + +#define BPy_GetShapeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF0D_Type) + +/*---------------------------Python BPy_GetShapeF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DViewShape py_uf0D_viewshape; +} BPy_GetShapeF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETSHAPEF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp new file mode 100644 index 00000000000..70bf4d677e6 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_Curvature2DAngleF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Curvature2DAngleF0D instance -----------*/ + static int Curvature2DAngleF0D___init__(BPy_Curvature2DAngleF0D* self); + +/*-----------------------BPy_Curvature2DAngleF0D type definition ------------------------------*/ + +PyTypeObject Curvature2DAngleF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Curvature2DAngleF0D", /* tp_name */ + sizeof( BPy_Curvature2DAngleF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Curvature2DAngleF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Curvature2DAngleF0D___init__( BPy_Curvature2DAngleF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::Curvature2DAngleF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h new file mode 100644 index 00000000000..1146369320a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_CURVATURE2DANGLEF0D_H +#define FREESTYLE_PYTHON_CURVATURE2DANGLEF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Curvature2DAngleF0D_Type; + +#define BPy_Curvature2DAngleF0D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF0D_Type) + +/*---------------------------Python BPy_Curvature2DAngleF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_Curvature2DAngleF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVATURE2DANGLEF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp new file mode 100644 index 00000000000..7bc2e368fb5 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetProjectedXF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedXF0D instance -----------*/ + static int GetProjectedXF0D___init__(BPy_GetProjectedXF0D* self); + +/*-----------------------BPy_GetProjectedXF0D type definition ------------------------------*/ + +PyTypeObject GetProjectedXF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedXF0D", /* tp_name */ + sizeof( BPy_GetProjectedXF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedXF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedXF0D___init__( BPy_GetProjectedXF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedXF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h new file mode 100644 index 00000000000..dcf6648cd6d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDXF0D_H +#define FREESTYLE_PYTHON_GETPROJECTEDXF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedXF0D_Type; + +#define BPy_GetProjectedXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF0D_Type) + +/*---------------------------Python BPy_GetProjectedXF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetProjectedXF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDXF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp new file mode 100644 index 00000000000..b0a4f1d82db --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetProjectedYF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedYF0D instance -----------*/ + static int GetProjectedYF0D___init__(BPy_GetProjectedYF0D* self); + +/*-----------------------BPy_GetProjectedYF0D type definition ------------------------------*/ + +PyTypeObject GetProjectedYF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedYF0D", /* tp_name */ + sizeof( BPy_GetProjectedYF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedYF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedYF0D___init__( BPy_GetProjectedYF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedYF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h new file mode 100644 index 00000000000..ea7d5a5ab76 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDYF0D_H +#define FREESTYLE_PYTHON_GETPROJECTEDYF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedYF0D_Type; + +#define BPy_GetProjectedYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF0D_Type) + +/*---------------------------Python BPy_GetProjectedYF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetProjectedYF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDYF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp new file mode 100644 index 00000000000..b452a32e987 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetProjectedZF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedZF0D instance -----------*/ + static int GetProjectedZF0D___init__(BPy_GetProjectedZF0D* self); + +/*-----------------------BPy_GetProjectedZF0D type definition ------------------------------*/ + +PyTypeObject GetProjectedZF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedZF0D", /* tp_name */ + sizeof( BPy_GetProjectedZF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedZF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedZF0D___init__( BPy_GetProjectedZF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetProjectedZF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h new file mode 100644 index 00000000000..c3cd9cb8c19 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDZF0D_H +#define FREESTYLE_PYTHON_GETPROJECTEDZF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedZF0D_Type; + +#define BPy_GetProjectedZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF0D_Type) + +/*---------------------------Python BPy_GetProjectedZF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetProjectedZF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDZF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp new file mode 100644 index 00000000000..b5ac0a0b08c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetXF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetXF0D instance -----------*/ + static int GetXF0D___init__(BPy_GetXF0D* self); + +/*-----------------------BPy_GetXF0D type definition ------------------------------*/ + +PyTypeObject GetXF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetXF0D", /* tp_name */ + sizeof( BPy_GetXF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetXF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetXF0D___init__( BPy_GetXF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetXF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h new file mode 100644 index 00000000000..6164a46f252 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETXF0D_H +#define FREESTYLE_PYTHON_GETXF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetXF0D_Type; + +#define BPy_GetXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetXF0D_Type) + +/*---------------------------Python BPy_GetXF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetXF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETXF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp new file mode 100644 index 00000000000..45bb5450fbd --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetYF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetYF0D instance -----------*/ + static int GetYF0D___init__(BPy_GetYF0D* self); + +/*-----------------------BPy_GetYF0D type definition ------------------------------*/ + +PyTypeObject GetYF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetYF0D", /* tp_name */ + sizeof( BPy_GetYF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetYF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetYF0D___init__( BPy_GetYF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetYF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h new file mode 100644 index 00000000000..f85e2c5976a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETYF0D_H +#define FREESTYLE_PYTHON_GETYF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetYF0D_Type; + +#define BPy_GetYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetYF0D_Type) + +/*---------------------------Python BPy_GetYF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetYF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETYF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp new file mode 100644 index 00000000000..83605b1b356 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_GetZF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetZF0D instance -----------*/ + static int GetZF0D___init__(BPy_GetZF0D* self); + +/*-----------------------BPy_GetZF0D type definition ------------------------------*/ + +PyTypeObject GetZF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetZF0D", /* tp_name */ + sizeof( BPy_GetZF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetZF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetZF0D___init__( BPy_GetZF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::GetZF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h new file mode 100644 index 00000000000..c7bed2ebda8 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETZF0D_H +#define FREESTYLE_PYTHON_GETZF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetZF0D_Type; + +#define BPy_GetZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetZF0D_Type) + +/*---------------------------Python BPy_GetZF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_GetZF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETZF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp new file mode 100644 index 00000000000..0d6222c8a9a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp @@ -0,0 +1,111 @@ +#include "BPy_ZDiscontinuityF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ZDiscontinuityF0D instance -----------*/ + static int ZDiscontinuityF0D___init__(BPy_ZDiscontinuityF0D* self); + +/*-----------------------BPy_ZDiscontinuityF0D type definition ------------------------------*/ + +PyTypeObject ZDiscontinuityF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ZDiscontinuityF0D", /* tp_name */ + sizeof( BPy_ZDiscontinuityF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ZDiscontinuityF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ZDiscontinuityF0D___init__( BPy_ZDiscontinuityF0D* self ) +{ + self->py_uf0D_double.uf0D_double = new Functions0D::ZDiscontinuityF0D(); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h new file mode 100644 index 00000000000..21f854d96c9 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_ZDISCONTINUITYF0D_H +#define FREESTYLE_PYTHON_ZDISCONTINUITYF0D_H + +#include "../BPy_UnaryFunction0DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ZDiscontinuityF0D_Type; + +#define BPy_ZDiscontinuityF0D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF0D_Type) + +/*---------------------------Python BPy_ZDiscontinuityF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DDouble py_uf0D_double; +} BPy_ZDiscontinuityF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ZDISCONTINUITYF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp index 359e3186905..0a0702cf1b8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_GetCurvilinearAbscissaF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetCurvilinearAbscissaF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetCurvilinearAbscissaF0D instance -----------*/ + static int GetCurvilinearAbscissaF0D___init__(BPy_GetCurvilinearAbscissaF0D* self); + +/*-----------------------BPy_GetCurvilinearAbscissaF0D type definition ------------------------------*/ + +PyTypeObject GetCurvilinearAbscissaF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetCurvilinearAbscissaF0D", /* tp_name */ + sizeof( BPy_GetCurvilinearAbscissaF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetCurvilinearAbscissaF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetCurvilinearAbscissaF0D___init__( BPy_GetCurvilinearAbscissaF0D* self ) +{ + self->py_uf0D_float.uf0D_float = new Functions0D::GetCurvilinearAbscissaF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetCurvilinearAbscissaF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_GetCurvilinearAbscissaF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetCurvilinearAbscissaF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h new file mode 100644 index 00000000000..f36371dfee5 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETCURVILINEARABSCISSAF0D_H +#define FREESTYLE_PYTHON_GETCURVILINEARABSCISSAF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetCurvilinearAbscissaF0D_Type; + +#define BPy_GetCurvilinearAbscissaF0D_Check(v) (( (PyObject *) v)->ob_type == &GetCurvilinearAbscissaF0D_Type) + +/*---------------------------Python BPy_GetCurvilinearAbscissaF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_GetCurvilinearAbscissaF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETCURVILINEARABSCISSAF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp index 71b7ac85a7f..eab08495810 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_GetParameterF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetParameterF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetParameterF0D instance -----------*/ + static int GetParameterF0D___init__(BPy_GetParameterF0D* self); + +/*-----------------------BPy_GetParameterF0D type definition ------------------------------*/ + +PyTypeObject GetParameterF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetParameterF0D", /* tp_name */ + sizeof( BPy_GetParameterF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetParameterF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetParameterF0D___init__( BPy_GetParameterF0D* self ) +{ + self->py_uf0D_float.uf0D_float = new Functions0D::GetParameterF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetParameterF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_GetParameterF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetParameterF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h new file mode 100644 index 00000000000..77a08de4b07 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPARAMETERF0D_H +#define FREESTYLE_PYTHON_GETPARAMETERF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetParameterF0D_Type; + +#define BPy_GetParameterF0D_Check(v) (( (PyObject *) v)->ob_type == &GetParameterF0D_Type) + +/*---------------------------Python BPy_GetParameterF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_GetParameterF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPARAMETERF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp index 8def0ea948f..796abed5298 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_GetViewMapGradientNormF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetViewMapGradientNormF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetViewMapGradientNormF0D instance -----------*/ + static int GetViewMapGradientNormF0D___init__(BPy_GetViewMapGradientNormF0D* self, PyObject *args); + +/*-----------------------BPy_GetViewMapGradientNormF0D type definition ------------------------------*/ + +PyTypeObject GetViewMapGradientNormF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetViewMapGradientNormF0D", /* tp_name */ + sizeof( BPy_GetViewMapGradientNormF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetViewMapGradientNormF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetViewMapGradientNormF0D___init__( BPy_GetViewMapGradientNormF0D* self, PyObject *args) +{ + int i; + + if( !PyArg_ParseTuple(args, "i", &i) ) { + cout << "ERROR: GetViewMapGradientNormF0D___init__" << endl; + return -1; + } + + self->py_uf0D_float.uf0D_float = new Functions0D::GetViewMapGradientNormF0D(i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetViewMapGradientNormF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetViewMapGradientNormF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h new file mode 100644 index 00000000000..aa626703aff --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF0D_H +#define FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetViewMapGradientNormF0D_Type; + +#define BPy_GetViewMapGradientNormF0D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF0D_Type) + +/*---------------------------Python BPy_GetViewMapGradientNormF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_GetViewMapGradientNormF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp index 74fdf60dffc..0ca3cdffb78 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_ReadCompleteViewMapPixelF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_ReadCompleteViewMapPixelF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ReadCompleteViewMapPixelF0D instance -----------*/ + static int ReadCompleteViewMapPixelF0D___init__(BPy_ReadCompleteViewMapPixelF0D* self, PyObject *args); + +/*-----------------------BPy_ReadCompleteViewMapPixelF0D type definition ------------------------------*/ + +PyTypeObject ReadCompleteViewMapPixelF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ReadCompleteViewMapPixelF0D", /* tp_name */ + sizeof( BPy_ReadCompleteViewMapPixelF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ReadCompleteViewMapPixelF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ReadCompleteViewMapPixelF0D___init__( BPy_ReadCompleteViewMapPixelF0D* self, PyObject *args) +{ + int i; + + if( !PyArg_ParseTuple(args, "i", &i) ) { + cout << "ERROR: ReadCompleteViewMapPixelF0D___init__" << endl; + return -1; + } + + self->py_uf0D_float.uf0D_float = new Functions0D::ReadCompleteViewMapPixelF0D(i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ReadCompleteViewMapPixelF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ReadCompleteViewMapPixelF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h new file mode 100644 index 00000000000..5a4d90e821d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_READCOMPLETEVIEWMAPPIXELF0D_H +#define FREESTYLE_PYTHON_READCOMPLETEVIEWMAPPIXELF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ReadCompleteViewMapPixelF0D_Type; + +#define BPy_ReadCompleteViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadCompleteViewMapPixelF0D_Type) + +/*---------------------------Python BPy_ReadCompleteViewMapPixelF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_ReadCompleteViewMapPixelF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_READCOMPLETEVIEWMAPPIXELF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp index cb2bdd4c60a..216ac3da8da 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp @@ -1,12 +1,119 @@ - PyObject *_wrap_ReadMapPixelF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_ReadMapPixelF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ReadMapPixelF0D instance -----------*/ + static int ReadMapPixelF0D___init__(BPy_ReadMapPixelF0D* self, PyObject *args); + +/*-----------------------BPy_ReadMapPixelF0D type definition ------------------------------*/ + +PyTypeObject ReadMapPixelF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ReadMapPixelF0D", /* tp_name */ + sizeof( BPy_ReadMapPixelF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ReadMapPixelF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ReadMapPixelF0D___init__( BPy_ReadMapPixelF0D* self, PyObject *args) +{ + const char *s; + int i; + + if( !PyArg_ParseTuple(args, "si", &s, &i) ) { + cout << "ERROR: ReadMapPixelF0D___init__" << endl; + return -1; + } + + self->py_uf0D_float.uf0D_float = new Functions0D::ReadMapPixelF0D(s,i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ReadMapPixelF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ReadMapPixelF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h new file mode 100644 index 00000000000..e010bd3495a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_READMAPPIXELF0D_H +#define FREESTYLE_PYTHON_READMAPPIXELF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ReadMapPixelF0D_Type; + +#define BPy_ReadMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadMapPixelF0D_Type) + +/*---------------------------Python BPy_ReadMapPixelF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_ReadMapPixelF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_READMAPPIXELF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp index dc32cf290a0..114ffa6aab0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp @@ -1,12 +1,119 @@ - PyObject *_wrap_ReadSteerableViewMapPixelF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_ReadSteerableViewMapPixelF0D.h" + +#include "../../../stroke/AdvancedFunctions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ReadSteerableViewMapPixelF0D instance -----------*/ + static int ReadSteerableViewMapPixelF0D___init__(BPy_ReadSteerableViewMapPixelF0D* self, PyObject *args); + +/*-----------------------BPy_ReadSteerableViewMapPixelF0D type definition ------------------------------*/ + +PyTypeObject ReadSteerableViewMapPixelF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ReadSteerableViewMapPixelF0D", /* tp_name */ + sizeof( BPy_ReadSteerableViewMapPixelF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DFloat_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ReadSteerableViewMapPixelF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ReadSteerableViewMapPixelF0D___init__( BPy_ReadSteerableViewMapPixelF0D* self, PyObject *args) +{ + unsigned int u; + int i; + + if( !PyArg_ParseTuple(args, "Ii", &u, &i) ) { + cout << "ERROR: ReadSteerableViewMapPixelF0D___init__" << endl; + return -1; + } + + self->py_uf0D_float.uf0D_float = new Functions0D::ReadSteerableViewMapPixelF0D(u,i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ReadSteerableViewMapPixelF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ReadSteerableViewMapPixelF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h new file mode 100644 index 00000000000..cc0c3a93f0e --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_READSTEERABLEVIEWMAPPIXELF0D_H +#define FREESTYLE_PYTHON_READSTEERABLEVIEWMAPPIXELF0D_H + +#include "../BPy_UnaryFunction0DFloat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ReadSteerableViewMapPixelF0D_Type; + +#define BPy_ReadSteerableViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadSteerableViewMapPixelF0D_Type) + +/*---------------------------Python BPy_ReadSteerableViewMapPixelF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DFloat py_uf0D_float; +} BPy_ReadSteerableViewMapPixelF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_READSTEERABLEVIEWMAPPIXELF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp deleted file mode 100644 index f91642ad7c1..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_Curvature2DAngleF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_Curvature2DAngleF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curvature2DAngleF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_Curvature2DAngleF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_Curvature2DAngleF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp deleted file mode 100644 index f99666cdd65..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedXF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetProjectedXF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedXF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetProjectedXF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedXF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp deleted file mode 100644 index 44eb1d44bf2..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedYF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetProjectedYF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedYF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetProjectedYF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedYF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp deleted file mode 100644 index 0257328973b..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetProjectedZF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetProjectedZF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedZF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetProjectedZF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedZF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp deleted file mode 100644 index 6bc16ad36d1..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetXF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetXF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetXF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetXF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetXF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp deleted file mode 100644 index c2651fc59be..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetYF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetYF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetYF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetYF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetYF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp deleted file mode 100644 index e3f1f56a932..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_GetZF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_GetZF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetZF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_GetZF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetZF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp deleted file mode 100644 index c72e020066a..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_real/BPy_ZDiscontinuityF0D.cpp +++ /dev/null @@ -1,16 +0,0 @@ - PyObject *_wrap_ZDiscontinuityF0D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ZDiscontinuityF0D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_new_ZDiscontinuityF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ZDiscontinuityF0D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp index 15e3114b81a..a81822f08ac 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_QuantitativeInvisibilityF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_QuantitativeInvisibilityF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for QuantitativeInvisibilityF0D instance -----------*/ + static int QuantitativeInvisibilityF0D___init__(BPy_QuantitativeInvisibilityF0D* self); + +/*-----------------------BPy_QuantitativeInvisibilityF0D type definition ------------------------------*/ + +PyTypeObject QuantitativeInvisibilityF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "QuantitativeInvisibilityF0D", /* tp_name */ + sizeof( BPy_QuantitativeInvisibilityF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DUnsigned_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)QuantitativeInvisibilityF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int QuantitativeInvisibilityF0D___init__( BPy_QuantitativeInvisibilityF0D* self ) +{ + self->py_uf0D_unsigned.uf0D_unsigned = new Functions0D::QuantitativeInvisibilityF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_QuantitativeInvisibilityF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_QuantitativeInvisibilityF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_QuantitativeInvisibilityF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h new file mode 100644 index 00000000000..02706b48bd5 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF0D_H +#define FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF0D_H + +#include "../BPy_UnaryFunction0DUnsigned.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject QuantitativeInvisibilityF0D_Type; + +#define BPy_QuantitativeInvisibilityF0D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF0D_Type) + +/*---------------------------Python BPy_QuantitativeInvisibilityF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DUnsigned py_uf0D_unsigned; +} BPy_QuantitativeInvisibilityF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp index 95de61007c1..6d7b903a37f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp @@ -1,16 +1,111 @@ - PyObject *_wrap_GetOccludersF0D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetOccludersF0D.h" + +#include "../../../view_map/Functions0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetOccludersF0D instance -----------*/ + static int GetOccludersF0D___init__(BPy_GetOccludersF0D* self); + +/*-----------------------BPy_GetOccludersF0D type definition ------------------------------*/ + +PyTypeObject GetOccludersF0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetOccludersF0D", /* tp_name */ + sizeof( BPy_GetOccludersF0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction0DVectorViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetOccludersF0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetOccludersF0D___init__( BPy_GetOccludersF0D* self ) +{ + self->py_uf0D_vectorviewshape.uf0D_vectorviewshape = new Functions0D::GetOccludersF0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetOccludersF0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_GetOccludersF0D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetOccludersF0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h new file mode 100644 index 00000000000..3d4108124f0 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETOCCLUDERSF0D_H +#define FREESTYLE_PYTHON_GETOCCLUDERSF0D_H + +#include "../BPy_UnaryFunction0DVectorViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetOccludersF0D_Type; + +#define BPy_GetOccludersF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF0D_Type) + +/*---------------------------Python BPy_GetOccludersF0D structure definition----------*/ +typedef struct { + BPy_UnaryFunction0DVectorViewShape py_uf0D_vectorviewshape; +} BPy_GetOccludersF0D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETOCCLUDERSF0D_H */ From 2b2df54aefa61e249d21b09c2f6ca0b82be7bed4 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 27 Jul 2008 11:27:59 +0000 Subject: [PATCH 416/430] soc-2008-mxcurioni: ported ALL 1D unary functions, representing 32 new classes. --- source/blender/freestyle/SConscript | 33 ++ .../freestyle/intern/python/BPy_Convert.cpp | 16 + .../freestyle/intern/python/BPy_Convert.h | 3 + .../intern/python/BPy_UnaryFunction1D.cpp | 66 ++-- .../intern/python/BPy_UnaryFunction1D.h | 1 - .../BPy_UnaryFunction0DVectorViewShape.cpp | 2 +- .../BPy_UnaryFunction1DDouble.cpp | 291 +++++++++++++++++- .../BPy_UnaryFunction1DDouble.h | 34 ++ .../BPy_UnaryFunction1DEdgeNature.cpp | 209 +++++++++++++ .../BPy_UnaryFunction1DEdgeNature.h | 36 +++ .../BPy_UnaryFunction1DFloat.cpp | 194 +++++++++++- .../BPy_UnaryFunction1DFloat.h | 34 ++ .../BPy_UnaryFunction1DUnsigned.cpp | 201 +++++++++++- .../BPy_UnaryFunction1DUnsigned.h | 34 ++ .../BPy_UnaryFunction1DVec2f.cpp | 207 ++++++++++++- .../BPy_UnaryFunction1DVec2f.h | 37 +++ .../BPy_UnaryFunction1DVec3f.cpp | 201 +++++++++++- .../BPy_UnaryFunction1DVec3f.h | 37 +++ .../BPy_UnaryFunction1DVectorViewShape.cpp | 222 ++++++++++++- .../BPy_UnaryFunction1DVectorViewShape.h | 37 +++ .../BPy_UnaryFunction1DVoid.cpp | 224 ++++++++++++++ .../UnaryFunction1D/BPy_UnaryFunction1DVoid.h | 34 ++ .../BPy_CurveNatureF1D.cpp | 127 +++++++- .../BPy_CurveNatureF1D.h | 30 ++ .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 126 +++++++- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h | 30 ++ .../BPy_Orientation2DF1D.cpp | 127 +++++++- .../BPy_Orientation2DF1D.h | 30 ++ .../BPy_Orientation3DF1D.cpp | 128 +++++++- .../BPy_Orientation3DF1D.h | 30 ++ .../BPy_Curvature2DAngleF1D.cpp | 121 ++++++++ .../BPy_Curvature2DAngleF1D.h | 30 ++ .../UnaryFunction1D_double/BPy_DensityF1D.cpp | 124 +++++++- .../UnaryFunction1D_double/BPy_DensityF1D.h | 30 ++ .../BPy_GetCompleteViewMapDensityF1D.cpp | 128 +++++++- .../BPy_GetCompleteViewMapDensityF1D.h | 30 ++ .../BPy_GetDirectionalViewMapDensityF1D.cpp | 128 +++++++- .../BPy_GetDirectionalViewMapDensityF1D.h | 30 ++ .../BPy_GetProjectedXF1D.cpp | 122 ++++++++ .../BPy_GetProjectedXF1D.h | 30 ++ .../BPy_GetProjectedYF1D.cpp | 121 ++++++++ .../BPy_GetProjectedYF1D.h | 30 ++ .../BPy_GetProjectedZF1D.cpp | 121 ++++++++ .../BPy_GetProjectedZF1D.h | 30 ++ .../BPy_GetSteerableViewMapDensityF1D.cpp | 124 ++++++++ .../BPy_GetSteerableViewMapDensityF1D.h | 30 ++ .../BPy_GetViewMapGradientNormF1D.cpp | 124 ++++++++ .../BPy_GetViewMapGradientNormF1D.h | 30 ++ .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 122 ++++++++ .../UnaryFunction1D_double/BPy_GetXF1D.h | 30 ++ .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 120 ++++++++ .../UnaryFunction1D_double/BPy_GetYF1D.h | 30 ++ .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 121 ++++++++ .../UnaryFunction1D_double/BPy_GetZF1D.h | 30 ++ .../BPy_LocalAverageDepthF1D.cpp | 127 +++++++- .../BPy_LocalAverageDepthF1D.h | 30 ++ .../BPy_ZDiscontinuityF1D.cpp | 122 ++++++++ .../BPy_ZDiscontinuityF1D.h | 30 ++ .../BPy_Curvature2DAngleF1D.cpp | 12 - .../BPy_GetProjectedXF1D.cpp | 12 - .../BPy_GetProjectedYF1D.cpp | 12 - .../BPy_GetProjectedZF1D.cpp | 12 - .../BPy_GetSteerableViewMapDensityF1D.cpp | 8 - .../BPy_GetViewMapGradientNormF1D.cpp | 12 - .../UnaryFunction1D_real/BPy_GetXF1D.cpp | 12 - .../UnaryFunction1D_real/BPy_GetYF1D.cpp | 12 - .../UnaryFunction1D_real/BPy_GetZF1D.cpp | 12 - .../BPy_ZDiscontinuityF1D.cpp | 12 - .../BPy_QuantitativeInvisibilityF1D.cpp | 12 - .../BPy_QuantitativeInvisibilityF1D.cpp | 122 ++++++++ .../BPy_QuantitativeInvisibilityF1D.h | 30 ++ .../BPy_GetOccludeeF1D.cpp | 117 ++++++- .../BPy_GetOccludeeF1D.h | 30 ++ .../BPy_GetOccludersF1D.cpp | 117 ++++++- .../BPy_GetOccludersF1D.h | 30 ++ .../BPy_GetShapeF1D.cpp | 117 ++++++- .../BPy_GetShapeF1D.h | 30 ++ .../BPy_ChainingTimeStampF1D.cpp | 121 +++++++- .../BPy_ChainingTimeStampF1D.h | 30 ++ .../BPy_IncrementChainingTimeStampF1D.cpp | 121 +++++++- .../BPy_IncrementChainingTimeStampF1D.h | 30 ++ .../UnaryFunction1D_void/BPy_TimeStampF1D.cpp | 121 +++++++- .../UnaryFunction1D_void/BPy_TimeStampF1D.h | 30 ++ 83 files changed, 5761 insertions(+), 339 deletions(-) create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp delete mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 3ee1a79ce0c..3abce0d3ec1 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -138,6 +138,39 @@ python_sources = [ prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp', prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp', prefix + '/BPy_UnaryFunction1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp', + prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp', + prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp', prefix + '/BPy_UnaryPredicate0D.cpp', prefix + '/BPy_UnaryPredicate1D.cpp', prefix + '/BPy_ViewMap.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 4d66b46420a..d7b8bfa6cce 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -189,6 +189,22 @@ PyObject * BPy_FrsMaterial_from_Material( Material& m ){ return py_m; } +PyObject * BPy_IntegrationType_from_IntegrationType( int i ) { + PyObject *py_it = IntegrationType_Type.tp_new( &IntegrationType_Type, 0, 0 ); + + PyObject *args = PyTuple_New(1); + PyTuple_SetItem( args, 0, PyInt_FromLong(i) ); + IntegrationType_Type.tp_init( py_it, args, 0 ); + Py_DECREF(args); + + return py_it; +} + +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { + return static_cast( PyInt_AsLong(obj) ); +} + + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 9bf535ead6a..4d318fcbc1d 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -58,10 +58,13 @@ PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); + PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); +PyObject * BPy_IntegrationType_from_IntegrationType( int i ); PyObject * BPy_FrsMaterial_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 70f6feb02d3..9ab0ce41fb3 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -1,6 +1,13 @@ #include "BPy_UnaryFunction1D.h" -#include "BPy_Convert.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DDouble.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DFloat.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DVec2f.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DVec3f.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h" + #ifdef __cplusplus extern "C" { @@ -9,17 +16,11 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// /*--------------- Python API function prototypes for UnaryFunction1D instance -----------*/ -static int UnaryFunction1D___init__(BPy_UnaryFunction1D *self, PyObject *args, PyObject *kwds); static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self); static PyObject * UnaryFunction1D___repr__(BPy_UnaryFunction1D *self); -static PyObject * UnaryFunction1D_getName( BPy_UnaryFunction1D *self, PyObject *args); -static PyObject * UnaryFunction1D___call__( BPy_UnaryFunction1D *self, PyObject *args); - /*----------------------UnaryFunction1D instance definitions ----------------------------*/ static PyMethodDef BPy_UnaryFunction1D_methods[] = { - {"getName", ( PyCFunction ) UnaryFunction1D_getName, METH_NOARGS, ""}, - {"__call__", ( PyCFunction ) UnaryFunction1D___call__, METH_VARARGS, "" }, {NULL, NULL, 0, NULL} }; @@ -73,7 +74,7 @@ PyTypeObject UnaryFunction1D_Type = { NULL, /* richcmpfunc tp_richcompare; */ /*** weak reference enabler ***/ - NULL, /* long tp_weaklistoffset; */ + 0, /* long tp_weaklistoffset; */ /*** Added in release 2.2 ***/ /* Iterators */ @@ -88,8 +89,8 @@ PyTypeObject UnaryFunction1D_Type = { NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ - NULL, /* long tp_dictoffset; */ - (initproc)UnaryFunction1D___init__, /* initproc tp_init; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ PyType_GenericNew, /* newfunc tp_new; */ @@ -118,56 +119,29 @@ PyMODINIT_FUNC UnaryFunction1D_Init( PyObject *module ) return; Py_INCREF( &UnaryFunction1D_Type ); PyModule_AddObject(module, "UnaryFunction1D", (PyObject *)&UnaryFunction1D_Type); + + UnaryFunction1DDouble_Init( module ); + UnaryFunction1DEdgeNature_Init( module ); + UnaryFunction1DFloat_Init( module ); + UnaryFunction1DUnsigned_Init( module ); + UnaryFunction1DVec2f_Init( module ); + UnaryFunction1DVec3f_Init( module ); + UnaryFunction1DVectorViewShape_Init( module ); } //------------------------INSTANCE METHODS ---------------------------------- -int UnaryFunction1D___init__(BPy_UnaryFunction1D *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D* self) { - //delete self->uf1D; self->ob_type->tp_free((PyObject*)self); } PyObject * UnaryFunction1D___repr__(BPy_UnaryFunction1D* self) { - return PyString_FromFormat("type: %s - address: %p", ((UnaryFunction1D *) self->uf1D)->getName().c_str(), self->uf1D ); + return PyString_FromString("UnaryFunction1D"); } - -PyObject * UnaryFunction1D_getName( BPy_UnaryFunction1D *self, PyObject *args) -{ - return PyString_FromString( ((UnaryFunction1D *) self->uf1D)->getName().c_str() ); -} - -PyObject * UnaryFunction1D___call__( BPy_UnaryFunction1D *self, PyObject *args) -{ - PyObject *l; - - if( !PyArg_ParseTuple(args, "O", &l) ) { - cout << "ERROR: UnaryFunction1D___call__ " << endl; - return NULL; - } - - // pb: operator() is called on Interface0DIterator while we have a list - // solutions: - // 1)reconvert back to iterator ? - // 2) adapt interface0d to have t(), u() functions - - // b = self->bp0D->operator()( *(obj1->uf0D) ); - // return PyBool_from_bool( b ); - - Py_RETURN_NONE; -} - -// void setIntegrationType (IntegrationType integration) -// IntegrationType getIntegrationType () const - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h index 4c509f50b85..21cece45fa4 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h @@ -18,7 +18,6 @@ extern PyTypeObject UnaryFunction1D_Type; /*---------------------------Python BPy_UnaryFunction1D structure definition----------*/ typedef struct { PyObject_HEAD - void *uf1D; } BPy_UnaryFunction1D; /*---------------------------Python BPy_UnaryFunction1D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index f7c520b1492..02aef4e28cf 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -168,7 +168,7 @@ PyObject * UnaryFunction0DVectorViewShape___call__( BPy_UnaryFunction0DVectorVie std::vector vs( self->uf0D_vectorviewshape->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); PyObject *list = PyList_New(NULL); - for( int i = 0; i < vs.size(); i++) + for( unsigned int i = 0; i < vs.size(); i++) PyList_Append(list, BPy_ViewShape_from_ViewShape(*( vs[i] )) ); return list; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index ad7c6627799..5b6aed936b9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -1,20 +1,285 @@ - PyObject *_wrap_UnaryFunction1DDouble_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DDouble.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h" +#include "UnaryFunction1D_double/BPy_DensityF1D.h" +#include "UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h" +#include "UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h" +#include "UnaryFunction1D_double/BPy_GetProjectedXF1D.h" +#include "UnaryFunction1D_double/BPy_GetProjectedYF1D.h" +#include "UnaryFunction1D_double/BPy_GetProjectedZF1D.h" +#include "UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h" +#include "UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h" +#include "UnaryFunction1D_double/BPy_GetXF1D.h" +#include "UnaryFunction1D_double/BPy_GetYF1D.h" +#include "UnaryFunction1D_double/BPy_GetZF1D.h" +#include "UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h" +#include "UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DDouble instance -----------*/ +static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *args); +static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble* self); +static PyObject * UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble* self); + +static PyObject * UnaryFunction1DDouble_getName( BPy_UnaryFunction1DDouble *self); +static PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args); +static PyObject * UnaryFunction1DDouble_setIntegrationType(BPy_UnaryFunction1DDouble* self, PyObject *args); +static PyObject * UnaryFunction1DDouble_getIntegrationType(BPy_UnaryFunction1DDouble* self); + +/*----------------------UnaryFunction1DDouble instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DDouble_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DDouble_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DDouble___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DDouble_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DDouble_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DDouble type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DDouble_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DDouble", /* tp_name */ + sizeof( BPy_UnaryFunction1DDouble ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DDouble___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DDouble___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DDouble_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DDouble___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DDouble_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DDouble_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DDouble_Type ); + PyModule_AddObject(module, "UnaryFunction1DDouble", (PyObject *)&UnaryFunction1DDouble_Type); + + if( PyType_Ready( &DensityF1D_Type ) < 0 ) + return; + Py_INCREF( &DensityF1D_Type ); + PyModule_AddObject(module, "DensityF1D", (PyObject *)&DensityF1D_Type); + + if( PyType_Ready( &GetCompleteViewMapDensityF1D_Type ) < 0 ) + return; + Py_INCREF( &GetCompleteViewMapDensityF1D_Type ); + PyModule_AddObject(module, "GetCompleteViewMapDensityF1D", (PyObject *)&GetCompleteViewMapDensityF1D_Type); + + if( PyType_Ready( &GetDirectionalViewMapDensityF1D_Type ) < 0 ) + return; + Py_INCREF( &GetDirectionalViewMapDensityF1D_Type ); + PyModule_AddObject(module, "GetDirectionalViewMapDensityF1D", (PyObject *)&GetDirectionalViewMapDensityF1D_Type); + + if( PyType_Ready( &GetProjectedXF1D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedXF1D_Type ); + PyModule_AddObject(module, "GetProjectedXF1D", (PyObject *)&GetProjectedXF1D_Type); + + if( PyType_Ready( &GetProjectedYF1D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedYF1D_Type ); + PyModule_AddObject(module, "GetProjectedYF1D", (PyObject *)&GetProjectedYF1D_Type); + + if( PyType_Ready( &GetProjectedZF1D_Type ) < 0 ) + return; + Py_INCREF( &GetProjectedZF1D_Type ); + PyModule_AddObject(module, "GetProjectedZF1D", (PyObject *)&GetProjectedZF1D_Type); + + if( PyType_Ready( &GetSteerableViewMapDensityF1D_Type ) < 0 ) + return; + Py_INCREF( &GetSteerableViewMapDensityF1D_Type ); + PyModule_AddObject(module, "GetSteerableViewMapDensityF1D", (PyObject *)&GetSteerableViewMapDensityF1D_Type); + + if( PyType_Ready( &GetViewMapGradientNormF1D_Type ) < 0 ) + return; + Py_INCREF( &GetViewMapGradientNormF1D_Type ); + PyModule_AddObject(module, "GetViewMapGradientNormF1D", (PyObject *)&GetViewMapGradientNormF1D_Type); + + if( PyType_Ready( &GetXF1D_Type ) < 0 ) + return; + Py_INCREF( &GetXF1D_Type ); + PyModule_AddObject(module, "GetXF1D", (PyObject *)&GetXF1D_Type); + + if( PyType_Ready( &GetYF1D_Type ) < 0 ) + return; + Py_INCREF( &GetYF1D_Type ); + PyModule_AddObject(module, "GetYF1D", (PyObject *)&GetYF1D_Type); + + if( PyType_Ready( &GetZF1D_Type ) < 0 ) + return; + Py_INCREF( &GetZF1D_Type ); + PyModule_AddObject(module, "GetZF1D", (PyObject *)&GetZF1D_Type); + + if( PyType_Ready( &LocalAverageDepthF1D_Type ) < 0 ) + return; + Py_INCREF( &LocalAverageDepthF1D_Type ); + PyModule_AddObject(module, "LocalAverageDepthF1D", (PyObject *)&LocalAverageDepthF1D_Type); + + if( PyType_Ready( &ZDiscontinuityF1D_Type ) < 0 ) + return; + Py_INCREF( &ZDiscontinuityF1D_Type ); + PyModule_AddObject(module, "ZDiscontinuityF1D", (PyObject *)&ZDiscontinuityF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DDouble___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_double = new UnaryFunction1D(); + else { + self->uf1D_double = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} + +void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble* self) +{ + delete self->uf1D_double; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DDouble___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_double->getName().c_str(), self->uf1D_double ); +} + +PyObject * UnaryFunction1DDouble_getName( BPy_UnaryFunction1DDouble *self ) +{ + return PyString_FromString( self->uf1D_double->getName().c_str() ); +} + +PyObject * UnaryFunction1DDouble___call__( BPy_UnaryFunction1DDouble *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DDouble___call__ " << endl; + return NULL; + } + + double d = self->uf1D_double->operator()(*( ((BPy_Interface1D *) obj)->if1D )); + return PyFloat_FromDouble( d ); + +} + +PyObject * UnaryFunction1DDouble_setIntegrationType(BPy_UnaryFunction1DDouble* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DDouble_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_double->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; +} + +PyObject * UnaryFunction1DDouble_getIntegrationType(BPy_UnaryFunction1DDouble* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_double->getIntegrationType() ); } - PyObject *_wrap_UnaryFunction1DDouble_setIntegrationType(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_UnaryFunction1DDouble_getIntegrationType(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_disown_UnaryFunction1DDouble(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h new file mode 100644 index 00000000000..7b6e9430498 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DDOUBLE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DDOUBLE_H + +#include "../BPy_UnaryFunction1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DDouble_Type; + +#define BPy_UnaryFunction1DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DDouble_Type) + +/*---------------------------Python BPy_UnaryFunction1DDouble structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_double; +} BPy_UnaryFunction1DDouble; + +/*---------------------------Python BPy_UnaryFunction1DDouble visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DDouble_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DDOUBLE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp new file mode 100644 index 00000000000..d4d7f642494 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -0,0 +1,209 @@ +#include "BPy_UnaryFunction1DEdgeNature.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DEdgeNature instance -----------*/ +static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyObject *args); +static void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature* self); +static PyObject * UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature* self); + +static PyObject * UnaryFunction1DEdgeNature_getName( BPy_UnaryFunction1DEdgeNature *self); +static PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args); +static PyObject * UnaryFunction1DEdgeNature_setIntegrationType(BPy_UnaryFunction1DEdgeNature* self, PyObject *args); +static PyObject * UnaryFunction1DEdgeNature_getIntegrationType(BPy_UnaryFunction1DEdgeNature* self); + +/*----------------------UnaryFunction1DEdgeNature instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DEdgeNature_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DEdgeNature_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DEdgeNature___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DEdgeNature_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DEdgeNature_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DEdgeNature type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DEdgeNature_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DEdgeNature", /* tp_name */ + sizeof( BPy_UnaryFunction1DEdgeNature ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DEdgeNature___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DEdgeNature___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DEdgeNature_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DEdgeNature___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DEdgeNature_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DEdgeNature_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DEdgeNature_Type ); + PyModule_AddObject(module, "UnaryFunction1DEdgeNature", (PyObject *)&UnaryFunction1DEdgeNature_Type); + + if( PyType_Ready( &CurveNatureF1D_Type ) < 0 ) + return; + Py_INCREF( &CurveNatureF1D_Type ); + PyModule_AddObject(module, "CurveNatureF1D", (PyObject *)&CurveNatureF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DEdgeNature___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_edgenature = new UnaryFunction1D(); + else { + self->uf1D_edgenature = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} +void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature* self) +{ + delete self->uf1D_edgenature; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); +} + + +PyObject * UnaryFunction1DEdgeNature___repr__(BPy_UnaryFunction1DEdgeNature* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_edgenature->getName().c_str(), self->uf1D_edgenature ); +} + +PyObject * UnaryFunction1DEdgeNature_getName( BPy_UnaryFunction1DEdgeNature *self ) +{ + return PyString_FromString( self->uf1D_edgenature->getName().c_str() ); +} + +PyObject * UnaryFunction1DEdgeNature___call__( BPy_UnaryFunction1DEdgeNature *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DEdgeNature___call__ " << endl; + return NULL; + } + + Nature::EdgeNature n = self->uf1D_edgenature->operator()(*( ((BPy_Interface1D *) obj)->if1D )); + return BPy_Nature_from_Nature( n ); + +} + +PyObject * UnaryFunction1DEdgeNature_setIntegrationType(BPy_UnaryFunction1DEdgeNature* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DEdgeNature_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_edgenature->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; +} + +PyObject * UnaryFunction1DEdgeNature_getIntegrationType(BPy_UnaryFunction1DEdgeNature* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_edgenature->getIntegrationType() ); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h new file mode 100644 index 00000000000..9e899916a95 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DEDGENATURE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DEDGENATURE_H + +#include "../BPy_UnaryFunction1D.h" + +#include "../../winged_edge/Nature.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DEdgeNature_Type; + +#define BPy_UnaryFunction1DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DEdgeNature_Type) + +/*---------------------------Python BPy_UnaryFunction1DEdgeNature structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_edgenature; +} BPy_UnaryFunction1DEdgeNature; + +/*---------------------------Python BPy_UnaryFunction1DEdgeNature visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DEdgeNature_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DEDGENATURE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index cb572980f8f..f4c8a9e53ce 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -1,20 +1,202 @@ - PyObject *_wrap_UnaryFunction1DFloat_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DFloat.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DFloat instance -----------*/ +static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args); +static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat* self); +static PyObject * UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat* self); + +static PyObject * UnaryFunction1DFloat_getName( BPy_UnaryFunction1DFloat *self); +static PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args); +static PyObject * UnaryFunction1DFloat_setIntegrationType(BPy_UnaryFunction1DFloat* self, PyObject *args); +static PyObject * UnaryFunction1DFloat_getIntegrationType(BPy_UnaryFunction1DFloat* self); + +/*----------------------UnaryFunction1DFloat instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DFloat_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DFloat_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DFloat___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DFloat_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DFloat_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DFloat type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DFloat_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DFloat", /* tp_name */ + sizeof( BPy_UnaryFunction1DFloat ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DFloat___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DFloat___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DFloat_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DFloat___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DFloat_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DFloat_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DFloat_Type ); + PyModule_AddObject(module, "UnaryFunction1DFloat", (PyObject *)&UnaryFunction1DFloat_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DFloat___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_float = new UnaryFunction1D(); + else { + self->uf1D_float = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} +void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat* self) +{ + delete self->uf1D_float; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DFloat___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_float->getName().c_str(), self->uf1D_float ); } - - PyObject *_wrap_UnaryFunction1DFloat_setIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DFloat_getName( BPy_UnaryFunction1DFloat *self ) +{ + return PyString_FromString( self->uf1D_float->getName().c_str() ); } +PyObject * UnaryFunction1DFloat___call__( BPy_UnaryFunction1DFloat *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DFloat___call__ " << endl; + return NULL; + } + + float f = self->uf1D_float->operator()(*( ((BPy_Interface1D *) obj)->if1D )); + return PyFloat_FromDouble( f ); - PyObject *_wrap_UnaryFunction1DFloat_getIntegrationType(PyObject *self , PyObject *args) { } +PyObject * UnaryFunction1DFloat_setIntegrationType(BPy_UnaryFunction1DFloat* self, PyObject *args) +{ + PyObject *obj; - PyObject *_wrap_disown_UnaryFunction1DFloat(PyObject *self , PyObject *args) { + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DFloat_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_float->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; } +PyObject * UnaryFunction1DFloat_getIntegrationType(BPy_UnaryFunction1DFloat* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_float->getIntegrationType() ); +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h new file mode 100644 index 00000000000..f454ab664ed --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DFLOAT_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DFLOAT_H + +#include "../BPy_UnaryFunction1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DFloat_Type; + +#define BPy_UnaryFunction1DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DFloat_Type) + +/*---------------------------Python BPy_UnaryFunction1DFloat structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_float; +} BPy_UnaryFunction1DFloat; + +/*---------------------------Python BPy_UnaryFunction1DFloat visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DFloat_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DFLOAT_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index eb230a2d49f..ef75f3bad5b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -1,20 +1,209 @@ - PyObject *_wrap_UnaryFunction1DUnsigned_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DUnsigned.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DUnsigned instance -----------*/ +static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject *args); +static void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned* self); +static PyObject * UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned* self); + +static PyObject * UnaryFunction1DUnsigned_getName( BPy_UnaryFunction1DUnsigned *self); +static PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args); +static PyObject * UnaryFunction1DUnsigned_setIntegrationType(BPy_UnaryFunction1DUnsigned* self, PyObject *args); +static PyObject * UnaryFunction1DUnsigned_getIntegrationType(BPy_UnaryFunction1DUnsigned* self); + +/*----------------------UnaryFunction1DUnsigned instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DUnsigned_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DUnsigned_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DUnsigned___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DUnsigned_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DUnsigned_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DUnsigned type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DUnsigned_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DUnsigned", /* tp_name */ + sizeof( BPy_UnaryFunction1DUnsigned ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DUnsigned___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DUnsigned___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DUnsigned_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DUnsigned___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DUnsigned_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DUnsigned_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DUnsigned_Type ); + PyModule_AddObject(module, "UnaryFunction1DUnsigned", (PyObject *)&UnaryFunction1DUnsigned_Type); + + if( PyType_Ready( &QuantitativeInvisibilityF1D_Type ) < 0 ) + return; + Py_INCREF( &QuantitativeInvisibilityF1D_Type ); + PyModule_AddObject(module, "QuantitativeInvisibilityF1D", (PyObject *)&QuantitativeInvisibilityF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DUnsigned___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_unsigned = new UnaryFunction1D(); + else { + self->uf1D_unsigned = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} +void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned* self) +{ + delete self->uf1D_unsigned; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DUnsigned___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DUnsigned___repr__(BPy_UnaryFunction1DUnsigned* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_unsigned->getName().c_str(), self->uf1D_unsigned ); } - - PyObject *_wrap_UnaryFunction1DUnsigned_setIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DUnsigned_getName( BPy_UnaryFunction1DUnsigned *self ) +{ + return PyString_FromString( self->uf1D_unsigned->getName().c_str() ); } +PyObject * UnaryFunction1DUnsigned___call__( BPy_UnaryFunction1DUnsigned *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DUnsigned___call__ " << endl; + return NULL; + } + + unsigned int i = self->uf1D_unsigned->operator()(*( ((BPy_Interface1D *) obj)->if1D )); + return PyInt_FromLong( i ); - PyObject *_wrap_UnaryFunction1DUnsigned_getIntegrationType(PyObject *self , PyObject *args) { } +PyObject * UnaryFunction1DUnsigned_setIntegrationType(BPy_UnaryFunction1DUnsigned* self, PyObject *args) +{ + PyObject *obj; - PyObject *_wrap_disown_UnaryFunction1DUnsigned(PyObject *self , PyObject *args) { + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DUnsigned_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_unsigned->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; } +PyObject * UnaryFunction1DUnsigned_getIntegrationType(BPy_UnaryFunction1DUnsigned* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_unsigned->getIntegrationType() ); +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h new file mode 100644 index 00000000000..0df50d9a999 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H + +#include "../BPy_UnaryFunction1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DUnsigned_Type; + +#define BPy_UnaryFunction1DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DUnsigned_Type) + +/*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_unsigned; +} BPy_UnaryFunction1DUnsigned; + +/*---------------------------Python BPy_UnaryFunction1DUnsigned visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DUnsigned_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DUNSIGNED_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index 64fb6ef6ed7..e0fa12c66e6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -1,20 +1,215 @@ - PyObject *_wrap_UnaryFunction1DVec2f_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DVec2f.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h" +#include "UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DVec2f instance -----------*/ +static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args); +static void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f* self); +static PyObject * UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f* self); + +static PyObject * UnaryFunction1DVec2f_getName( BPy_UnaryFunction1DVec2f *self); +static PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args); +static PyObject * UnaryFunction1DVec2f_setIntegrationType(BPy_UnaryFunction1DVec2f* self, PyObject *args); +static PyObject * UnaryFunction1DVec2f_getIntegrationType(BPy_UnaryFunction1DVec2f* self); + +/*----------------------UnaryFunction1DVec2f instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DVec2f_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DVec2f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DVec2f___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DVec2f_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DVec2f_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DVec2f type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DVec2f_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DVec2f", /* tp_name */ + sizeof( BPy_UnaryFunction1DVec2f ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DVec2f___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DVec2f___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DVec2f_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DVec2f___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DVec2f_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DVec2f_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DVec2f_Type ); + PyModule_AddObject(module, "UnaryFunction1DVec2f", (PyObject *)&UnaryFunction1DVec2f_Type); + + if( PyType_Ready( &Normal2DF1D_Type ) < 0 ) + return; + Py_INCREF( &Normal2DF1D_Type ); + PyModule_AddObject(module, "Normal2DF1D", (PyObject *)&Normal2DF1D_Type); + + if( PyType_Ready( &Orientation2DF1D_Type ) < 0 ) + return; + Py_INCREF( &Orientation2DF1D_Type ); + PyModule_AddObject(module, "Orientation2DF1D", (PyObject *)&Orientation2DF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec2f___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_vec2f = new UnaryFunction1D(); + else { + self->uf1D_vec2f = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} +void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f* self) +{ + delete self->uf1D_vec2f; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DVec2f___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVec2f___repr__(BPy_UnaryFunction1DVec2f* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_vec2f->getName().c_str(), self->uf1D_vec2f ); } - - PyObject *_wrap_UnaryFunction1DVec2f_setIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVec2f_getName( BPy_UnaryFunction1DVec2f *self ) +{ + return PyString_FromString( self->uf1D_vec2f->getName().c_str() ); } +PyObject * UnaryFunction1DVec2f___call__( BPy_UnaryFunction1DVec2f *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec2f___call__ " << endl; + return NULL; + } + + Vec2f v( self->uf1D_vec2f->operator()(*( ((BPy_Interface1D *) obj)->if1D )) ); + return Vector_from_Vec2f( v ); - PyObject *_wrap_UnaryFunction1DVec2f_getIntegrationType(PyObject *self , PyObject *args) { } +PyObject * UnaryFunction1DVec2f_setIntegrationType(BPy_UnaryFunction1DVec2f* self, PyObject *args) +{ + PyObject *obj; - PyObject *_wrap_disown_UnaryFunction1DVec2f(PyObject *self , PyObject *args) { + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec2f_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_vec2f->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; } +PyObject * UnaryFunction1DVec2f_getIntegrationType(BPy_UnaryFunction1DVec2f* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_vec2f->getIntegrationType() ); +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h new file mode 100644 index 00000000000..098992e6631 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DVEC2F_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DVEC2F_H + +#include "../BPy_UnaryFunction1D.h" + +#include "../../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DVec2f_Type; + +#define BPy_UnaryFunction1DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec2f_Type) + +/*---------------------------Python BPy_UnaryFunction1DVec2f structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_vec2f; +} BPy_UnaryFunction1DVec2f; + +/*---------------------------Python BPy_UnaryFunction1DVec2f visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DVec2f_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DVEC2F_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index d7b360eb10e..3a3c7d4e835 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -1,20 +1,209 @@ - PyObject *_wrap_UnaryFunction1DVec3f_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DVec3f.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DVec3f instance -----------*/ +static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args); +static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self); +static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self); + +static PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self); +static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args); +static PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args); +static PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self); + +/*----------------------UnaryFunction1DVec3f instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DVec3f_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DVec3f_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DVec3f___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DVec3f_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DVec3f_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DVec3f type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DVec3f_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DVec3f", /* tp_name */ + sizeof( BPy_UnaryFunction1DVec3f ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DVec3f___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DVec3f___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DVec3f_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DVec3f___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DVec3f_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DVec3f_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DVec3f_Type ); + PyModule_AddObject(module, "UnaryFunction1DVec3f", (PyObject *)&UnaryFunction1DVec3f_Type); + + if( PyType_Ready( &Orientation3DF1D_Type ) < 0 ) + return; + Py_INCREF( &Orientation3DF1D_Type ); + PyModule_AddObject(module, "Orientation3DF1D", (PyObject *)&Orientation3DF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec3f___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_vec3f = new UnaryFunction1D(); + else { + self->uf1D_vec3f = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} +void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self) +{ + delete self->uf1D_vec3f; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DVec3f___call__(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_vec3f->getName().c_str(), self->uf1D_vec3f ); } - - PyObject *_wrap_UnaryFunction1DVec3f_setIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self ) +{ + return PyString_FromString( self->uf1D_vec3f->getName().c_str() ); } +PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec3f___call__ " << endl; + return NULL; + } + + Vec3f v( self->uf1D_vec3f->operator()(*( ((BPy_Interface1D *) obj)->if1D )) ); + return Vector_from_Vec3f( v ); - PyObject *_wrap_UnaryFunction1DVec3f_getIntegrationType(PyObject *self , PyObject *args) { } +PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args) +{ + PyObject *obj; - PyObject *_wrap_disown_UnaryFunction1DVec3f(PyObject *self , PyObject *args) { + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVec3f_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_vec3f->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; } +PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_vec3f->getIntegrationType() ); +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h new file mode 100644 index 00000000000..3829fa12b62 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DVEC3F_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DVEC3F_H + +#include "../BPy_UnaryFunction1D.h" + +#include "../../geometry/Geom.h" +using namespace Geometry; + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DVec3f_Type; + +#define BPy_UnaryFunction1DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec3f_Type) + +/*---------------------------Python BPy_UnaryFunction1DVec3f structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_vec3f; +} BPy_UnaryFunction1DVec3f; + +/*---------------------------Python BPy_UnaryFunction1DVec3f visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DVec3f_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DVEC3F_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index 1fe16797593..c0b25403706 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -1,16 +1,228 @@ - PyObject *_wrap_UnaryFunction1DVectorViewShape_getName(PyObject *self , PyObject *args) { +#include "BPy_UnaryFunction1DVectorViewShape.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h" +#include "UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h" +#include "UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DVectorViewShape instance -----------*/ +static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args); +static void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape* self); +static PyObject * UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape* self); + +static PyObject * UnaryFunction1DVectorViewShape_getName( BPy_UnaryFunction1DVectorViewShape *self); +static PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args); +static PyObject * UnaryFunction1DVectorViewShape_setIntegrationType(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args); +static PyObject * UnaryFunction1DVectorViewShape_getIntegrationType(BPy_UnaryFunction1DVectorViewShape* self); + +/*----------------------UnaryFunction1DVectorViewShape instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DVectorViewShape_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DVectorViewShape_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DVectorViewShape___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DVectorViewShape_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DVectorViewShape_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DVectorViewShape type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DVectorViewShape_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DVectorViewShape", /* tp_name */ + sizeof( BPy_UnaryFunction1DVectorViewShape ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DVectorViewShape___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DVectorViewShape___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DVectorViewShape_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DVectorViewShape___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DVectorViewShape_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DVectorViewShape_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DVectorViewShape_Type ); + PyModule_AddObject(module, "UnaryFunction1DVectorViewShape", (PyObject *)&UnaryFunction1DVectorViewShape_Type); + + if( PyType_Ready( &GetOccludeeF1D_Type ) < 0 ) + return; + Py_INCREF( &GetOccludeeF1D_Type ); + PyModule_AddObject(module, "GetOccludeeF1D", (PyObject *)&GetOccludeeF1D_Type); + + if( PyType_Ready( &GetOccludersF1D_Type ) < 0 ) + return; + Py_INCREF( &GetOccludersF1D_Type ); + PyModule_AddObject(module, "GetOccludersF1D", (PyObject *)&GetOccludersF1D_Type); + + if( PyType_Ready( &GetShapeF1D_Type ) < 0 ) + return; + Py_INCREF( &GetShapeF1D_Type ); + PyModule_AddObject(module, "GetShapeF1D", (PyObject *)&GetShapeF1D_Type); + } - PyObject *_wrap_UnaryFunction1DVectorViewShape___call__(PyObject *self , PyObject *args) { +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVectorViewShape___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector >(); + else { + self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector >( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} + +void UnaryFunction1DVectorViewShape___dealloc__(BPy_UnaryFunction1DVectorViewShape* self) +{ + delete self->uf1D_vectorviewshape; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); } - PyObject *_wrap_UnaryFunction1DVectorViewShape_setIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVectorViewShape___repr__(BPy_UnaryFunction1DVectorViewShape* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_vectorviewshape->getName().c_str(), self->uf1D_vectorviewshape ); } - - PyObject *_wrap_UnaryFunction1DVectorViewShape_getIntegrationType(PyObject *self , PyObject *args) { +PyObject * UnaryFunction1DVectorViewShape_getName( BPy_UnaryFunction1DVectorViewShape *self ) +{ + return PyString_FromString( self->uf1D_vectorviewshape->getName().c_str() ); } +PyObject * UnaryFunction1DVectorViewShape___call__( BPy_UnaryFunction1DVectorViewShape *self, PyObject *args) +{ + PyObject *obj; + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVectorViewShape___call__ " << endl; + return NULL; + } + + + std::vector vs( self->uf1D_vectorviewshape->operator()(*( ((BPy_Interface1D *) obj)->if1D )) ); + PyObject *list = PyList_New(NULL); + + for( unsigned int i = 0; i < vs.size(); i++) + PyList_Append(list, BPy_ViewShape_from_ViewShape(*( vs[i] )) ); + + return list; +} + +PyObject * UnaryFunction1DVectorViewShape_setIntegrationType(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVectorViewShape_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_vectorviewshape->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; +} + +PyObject * UnaryFunction1DVectorViewShape_getIntegrationType(BPy_UnaryFunction1DVectorViewShape* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_vectorviewshape->getIntegrationType() ); +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h new file mode 100644 index 00000000000..cdde1926c86 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h @@ -0,0 +1,37 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DVECTORVIEWSHAPE_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DVECTORVIEWSHAPE_H + +#include "../BPy_UnaryFunction1D.h" + +#include +#include "../../view_map/ViewMap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DVectorViewShape_Type; + +#define BPy_UnaryFunction1DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVectorViewShape_Type) + +/*---------------------------Python BPy_UnaryFunction1DVectorViewShape structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D< std::vector > *uf1D_vectorviewshape; +} BPy_UnaryFunction1DVectorViewShape; + +/*---------------------------Python BPy_UnaryFunction1DVectorViewShape visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DVectorViewShape_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DVECTORVIEWSHAPE_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp new file mode 100644 index 00000000000..99cc6838997 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -0,0 +1,224 @@ +#include "BPy_UnaryFunction1DVoid.h" + +#include "../BPy_Convert.h" +#include "../BPy_Interface1D.h" +#include "../BPy_IntegrationType.h" + +#include "UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h" +#include "UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h" +#include "UnaryFunction1D_void/BPy_TimeStampF1D.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for UnaryFunction1DVoid instance -----------*/ +static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args); +static void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid* self); +static PyObject * UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid* self); + +static PyObject * UnaryFunction1DVoid_getName( BPy_UnaryFunction1DVoid *self); +static PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args); + +static PyObject * UnaryFunction1DVoid_setIntegrationType(BPy_UnaryFunction1DVoid* self, PyObject *args); +static PyObject * UnaryFunction1DVoid_getIntegrationType(BPy_UnaryFunction1DVoid* self); + +/*----------------------UnaryFunction1DVoid instance definitions ----------------------------*/ +static PyMethodDef BPy_UnaryFunction1DVoid_methods[] = { + {"getName", ( PyCFunction ) UnaryFunction1DVoid_getName, METH_NOARGS, "( )Returns the string of the name of the unary 1D function."}, + {"__call__", ( PyCFunction ) UnaryFunction1DVoid___call__, METH_VARARGS, "(Interface1D if1D )Builds a UnaryFunction1D from an integration type. " }, + {"setIntegrationType", ( PyCFunction ) UnaryFunction1DVoid_setIntegrationType, METH_VARARGS, "(IntegrationType i )Sets the integration method" }, + {"getIntegrationType", ( PyCFunction ) UnaryFunction1DVoid_getIntegrationType, METH_NOARGS, "() Returns the integration method." }, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_UnaryFunction1DVoid type definition ------------------------------*/ + +PyTypeObject UnaryFunction1DVoid_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "UnaryFunction1DVoid", /* tp_name */ + sizeof( BPy_UnaryFunction1DVoid ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)UnaryFunction1DVoid___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)UnaryFunction1DVoid___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_UnaryFunction1DVoid_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)UnaryFunction1DVoid___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- + +PyMODINIT_FUNC UnaryFunction1DVoid_Init( PyObject *module ) { + + if( module == NULL ) + return; + + if( PyType_Ready( &UnaryFunction1DVoid_Type ) < 0 ) + return; + Py_INCREF( &UnaryFunction1DVoid_Type ); + PyModule_AddObject(module, "UnaryFunction1DVoid", (PyObject *)&UnaryFunction1DVoid_Type); + + if( PyType_Ready( &ChainingTimeStampF1D_Type ) < 0 ) + return; + Py_INCREF( &ChainingTimeStampF1D_Type ); + PyModule_AddObject(module, "ChainingTimeStampF1D", (PyObject *)&ChainingTimeStampF1D_Type); + + if( PyType_Ready( &IncrementChainingTimeStampF1D_Type ) < 0 ) + return; + Py_INCREF( &IncrementChainingTimeStampF1D_Type ); + PyModule_AddObject(module, "IncrementChainingTimeStampF1D", (PyObject *)&IncrementChainingTimeStampF1D_Type); + + if( PyType_Ready( &TimeStampF1D_Type ) < 0 ) + return; + Py_INCREF( &TimeStampF1D_Type ); + PyModule_AddObject(module, "TimeStampF1D", (PyObject *)&TimeStampF1D_Type); + +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "|O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVoid___init__ " << endl; + return -1; + } + + if( !obj ) + self->uf1D_void = new UnaryFunction1D(); + else { + self->uf1D_void = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + } + + return 0; +} + +void UnaryFunction1DVoid___dealloc__(BPy_UnaryFunction1DVoid* self) +{ + delete self->uf1D_void; + UnaryFunction1D_Type.tp_dealloc((PyObject*)self); +} + + +PyObject * UnaryFunction1DVoid___repr__(BPy_UnaryFunction1DVoid* self) +{ + return PyString_FromFormat("type: %s - address: %p", self->uf1D_void->getName().c_str(), self->uf1D_void ); +} + +PyObject * UnaryFunction1DVoid_getName( BPy_UnaryFunction1DVoid *self ) +{ + return PyString_FromString( self->uf1D_void->getName().c_str() ); +} + +PyObject * UnaryFunction1DVoid___call__( BPy_UnaryFunction1DVoid *self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_Interface1D_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVoid___call__ " << endl; + return NULL; + } + + self->uf1D_void->operator()(*( ((BPy_Interface1D *) obj)->if1D )); + Py_RETURN_NONE; +} + +PyObject * UnaryFunction1DVoid_setIntegrationType(BPy_UnaryFunction1DVoid* self, PyObject *args) +{ + PyObject *obj; + + if( !PyArg_ParseTuple(args, "O", &obj) && BPy_IntegrationType_Check(obj) ) { + cout << "ERROR: UnaryFunction1DVoid_setIntegrationType " << endl; + Py_RETURN_NONE; + } + + self->uf1D_void->setIntegrationType( IntegrationType_from_BPy_IntegrationType(obj) ); + Py_RETURN_NONE; +} + +PyObject * UnaryFunction1DVoid_getIntegrationType(BPy_UnaryFunction1DVoid* self) { + return BPy_IntegrationType_from_IntegrationType( self->uf1D_void->getIntegrationType() ); +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h new file mode 100644 index 00000000000..68d9c61569c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_UNARYFUNCTION1DVOID_H +#define FREESTYLE_PYTHON_UNARYFUNCTION1DVOID_H + +#include "../BPy_UnaryFunction1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject UnaryFunction1DVoid_Type; + +#define BPy_UnaryFunction1DVoid_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVoid_Type) + +/*---------------------------Python BPy_UnaryFunction1DVoid structure definition----------*/ +typedef struct { + BPy_UnaryFunction1D py_uf1D; + UnaryFunction1D *uf1D_void; +} BPy_UnaryFunction1DVoid; + +/*---------------------------Python BPy_UnaryFunction1DVoid visible prototypes-----------*/ +PyMODINIT_FUNC UnaryFunction1DVoid_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_UNARYFUNCTION1DVOID_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp index 94d180e6cc8..a6a6d69de30 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp @@ -1,12 +1,123 @@ - PyObject *_wrap_CurveNatureF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_CurveNatureF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for CurveNatureF1D instance -----------*/ + static int CurveNatureF1D___init__( BPy_CurveNatureF1D* self, PyObject *args); + +/*-----------------------BPy_CurveNatureF1D type definition ------------------------------*/ + +PyTypeObject CurveNatureF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "CurveNatureF1D", /* tp_name */ + sizeof( BPy_CurveNatureF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DEdgeNature_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)CurveNatureF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int CurveNatureF1D___init__( BPy_CurveNatureF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: CurveNatureF1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t); + return 0; + } - PyObject *_wrap_CurveNatureF1D___call__(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_delete_CurveNatureF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h new file mode 100644 index 00000000000..7e9344dddda --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_CURVENATUREF1D_H +#define FREESTYLE_PYTHON_CURVENATUREF1D_H + +#include "../BPy_UnaryFunction1DEdgeNature.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject CurveNatureF1D_Type; + +#define BPy_CurveNatureF1D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF1D_Type) + +/*---------------------------Python BPy_CurveNatureF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DEdgeNature py_uf1D_edgenature; +} BPy_CurveNatureF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVENATUREF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp index 81e5a18cb2c..e8421277bf2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp @@ -1,12 +1,122 @@ - PyObject *_wrap_Normal2DF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_Normal2DF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Normal2DF1D instance -----------*/ + static int Normal2DF1D___init__( BPy_Normal2DF1D* self, PyObject *args); + +/*-----------------------BPy_Normal2DF1D type definition ------------------------------*/ + +PyTypeObject Normal2DF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Normal2DF1D", /* tp_name */ + sizeof( BPy_Normal2DF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVec2f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Normal2DF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Normal2DF1D___init__( BPy_Normal2DF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: Normal2DF1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_Normal2DF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_Normal2DF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h new file mode 100644 index 00000000000..70bfb0adb12 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_NORMAL2DF1D_H +#define FREESTYLE_PYTHON_NORMAL2DF1D_H + +#include "../BPy_UnaryFunction1DVec2f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Normal2DF1D_Type; + +#define BPy_Normal2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF1D_Type) + +/*---------------------------Python BPy_Normal2DF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVec2f py_uf1D_vec2f; +} BPy_Normal2DF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_NORMAL2DF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp index 2d6cfed8575..b6e69b80bce 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp @@ -1,12 +1,123 @@ - PyObject *_wrap_Orientation2DF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_Orientation2DF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Orientation2DF1D instance -----------*/ + static int Orientation2DF1D___init__( BPy_Orientation2DF1D* self, PyObject *args); + +/*-----------------------BPy_Orientation2DF1D type definition ------------------------------*/ + +PyTypeObject Orientation2DF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Orientation2DF1D", /* tp_name */ + sizeof( BPy_Orientation2DF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVec2f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Orientation2DF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Orientation2DF1D___init__( BPy_Orientation2DF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: Orientation2DF1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t); + return 0; + } - PyObject *_wrap_Orientation2DF1D___call__(PyObject *self , PyObject *args) { +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_delete_Orientation2DF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h new file mode 100644 index 00000000000..bcae5fc220f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_ORIENTATION2DF1D_H +#define FREESTYLE_PYTHON_ORIENTATION2DF1D_H + +#include "../BPy_UnaryFunction1DVec2f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Orientation2DF1D_Type; + +#define BPy_Orientation2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation2DF1D_Type) + +/*---------------------------Python BPy_Orientation2DF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVec2f py_uf1D_vec2f; +} BPy_Orientation2DF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ORIENTATION2DF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp index f416f2ace03..5501a875683 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp @@ -1,12 +1,124 @@ - PyObject *_wrap_Orientation3DF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_Orientation3DF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Orientation3DF1D instance -----------*/ + static int Orientation3DF1D___init__( BPy_Orientation3DF1D* self, PyObject *args); + +/*-----------------------BPy_Orientation3DF1D type definition ------------------------------*/ + +PyTypeObject Orientation3DF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Orientation3DF1D", /* tp_name */ + sizeof( BPy_Orientation3DF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVec3f_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Orientation3DF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Orientation3DF1D___init__( BPy_Orientation3DF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: Orientation3DF1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t); + return 0; + } - PyObject *_wrap_Orientation3DF1D___call__(PyObject *self , PyObject *args) { + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus } - - - PyObject *_wrap_delete_Orientation3DF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h new file mode 100644 index 00000000000..a868c04ce15 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_ORIENTATION3DF1D_H +#define FREESTYLE_PYTHON_ORIENTATION3DF1D_H + +#include "../BPy_UnaryFunction1DVec3f.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Orientation3DF1D_Type; + +#define BPy_Orientation3DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation3DF1D_Type) + +/*---------------------------Python BPy_Orientation3DF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVec3f py_uf1D_vec3f; +} BPy_Orientation3DF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ORIENTATION3DF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp new file mode 100644 index 00000000000..ae4a6c7f33d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -0,0 +1,121 @@ +#include "BPy_Curvature2DAngleF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Curvature2DAngleF1D instance -----------*/ +static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D* self, PyObject *args); + +/*-----------------------BPy_Curvature2DAngleF1D type definition ------------------------------*/ + +PyTypeObject Curvature2DAngleF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Curvature2DAngleF1D", /* tp_name */ + sizeof( BPy_Curvature2DAngleF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Curvature2DAngleF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Curvature2DAngleF1D___init__( BPy_Curvature2DAngleF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: Curvature2DAngleF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t); + return 0; + +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h new file mode 100644 index 00000000000..838bb229844 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_CURVATURE2DANGLEF1D_H +#define FREESTYLE_PYTHON_CURVATURE2DANGLEF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Curvature2DAngleF1D_Type; + +#define BPy_Curvature2DAngleF1D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF1D_Type) + +/*---------------------------Python BPy_Curvature2DAngleF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_Curvature2DAngleF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CURVATURE2DANGLEF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index 861a94b7cd3..b6b3262d1cc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp @@ -1,8 +1,124 @@ - PyObject *_wrap_DensityF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_DensityF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for DensityF1D instance -----------*/ + static int DensityF1D___init__(BPy_DensityF1D* self, PyObject *args); + +/*-----------------------BPy_DensityF1D type definition ------------------------------*/ + +PyTypeObject DensityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "DensityF1D", /* tp_name */ + sizeof( BPy_DensityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)DensityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int DensityF1D___init__( BPy_DensityF1D* self, PyObject *args) +{ + PyObject *obj = 0; + double d = 2.0; + float f = 2.0; + + if( !PyArg_ParseTuple(args, "|dOf", &d, &obj, &f) ) { + cout << "ERROR: DensityF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d,t,f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_DensityF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h new file mode 100644 index 00000000000..c7839b86d4d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_DENSITYF1D_H +#define FREESTYLE_PYTHON_DENSITYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject DensityF1D_Type; + +#define BPy_DensityF1D_Check(v) (( (PyObject *) v)->ob_type == &DensityF1D_Type) + +/*---------------------------Python BPy_DensityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_DensityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_DENSITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index c8220604cb8..e9d47e1d945 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp @@ -1,12 +1,124 @@ - PyObject *_wrap_GetCompleteViewMapDensityF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetCompleteViewMapDensityF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetCompleteViewMapDensityF1D instance -----------*/ + static int GetCompleteViewMapDensityF1D___init__(BPy_GetCompleteViewMapDensityF1D* self, PyObject *args); + +/*-----------------------BPy_GetCompleteViewMapDensityF1D type definition ------------------------------*/ + +PyTypeObject GetCompleteViewMapDensityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetCompleteViewMapDensityF1D", /* tp_name */ + sizeof( BPy_GetCompleteViewMapDensityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetCompleteViewMapDensityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetCompleteViewMapDensityF1D___init__( BPy_GetCompleteViewMapDensityF1D* self, PyObject *args) +{ + PyObject *obj = 0; + unsigned i; + float f = 2.0; + + if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + cout << "ERROR: GetCompleteViewMapDensityF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i,t,f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetCompleteViewMapDensityF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetCompleteViewMapDensityF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h new file mode 100644 index 00000000000..5106930be75 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETCOMPLETEVIEWMAPDENSITYF1D_H +#define FREESTYLE_PYTHON_GETCOMPLETEVIEWMAPDENSITYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetCompleteViewMapDensityF1D_Type; + +#define BPy_GetCompleteViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetCompleteViewMapDensityF1D_Type) + +/*---------------------------Python BPy_GetCompleteViewMapDensityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetCompleteViewMapDensityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETCOMPLETEVIEWMAPDENSITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index b7c4e40fd82..7691cda9a30 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -1,12 +1,124 @@ - PyObject *_wrap_GetDirectionalViewMapDensityF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetDirectionalViewMapDensityF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetDirectionalViewMapDensityF1D instance -----------*/ + static int GetDirectionalViewMapDensityF1D___init__(BPy_GetDirectionalViewMapDensityF1D* self, PyObject *args); + +/*-----------------------BPy_GetDirectionalViewMapDensityF1D type definition ------------------------------*/ + +PyTypeObject GetDirectionalViewMapDensityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetDirectionalViewMapDensityF1D", /* tp_name */ + sizeof( BPy_GetDirectionalViewMapDensityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetDirectionalViewMapDensityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetDirectionalViewMapDensityF1D___init__( BPy_GetDirectionalViewMapDensityF1D* self, PyObject *args) +{ + PyObject *obj = 0; + unsigned int u1, u2; + float f = 2.0; + + if( !PyArg_ParseTuple(args, "II|Of", &u1, &u2, &obj, &f) ) { + cout << "ERROR: GetDirectionalViewMapDensityF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(u1, u2, t, f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetDirectionalViewMapDensityF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetDirectionalViewMapDensityF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h new file mode 100644 index 00000000000..a2c3572694f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETDIRECTIONALVIEWMAPDENSITYF1D_H +#define FREESTYLE_PYTHON_GETDIRECTIONALVIEWMAPDENSITYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetDirectionalViewMapDensityF1D_Type; + +#define BPy_GetDirectionalViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetDirectionalViewMapDensityF1D_Type) + +/*---------------------------Python BPy_GetDirectionalViewMapDensityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetDirectionalViewMapDensityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETDIRECTIONALVIEWMAPDENSITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp new file mode 100644 index 00000000000..9832053f11b --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -0,0 +1,122 @@ +#include "BPy_GetProjectedXF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedXF1D instance -----------*/ + static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D* self, PyObject *args ); + +/*-----------------------BPy_GetProjectedXF1D type definition ------------------------------*/ + +PyTypeObject GetProjectedXF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedXF1D", /* tp_name */ + sizeof( BPy_GetProjectedXF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedXF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedXF1D___init__( BPy_GetProjectedXF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetProjectedXF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t); + return 0; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h new file mode 100644 index 00000000000..26350df2013 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDXF1D_H +#define FREESTYLE_PYTHON_GETPROJECTEDXF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedXF1D_Type; + +#define BPy_GetProjectedXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF1D_Type) + +/*---------------------------Python BPy_GetProjectedXF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetProjectedXF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDXF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp new file mode 100644 index 00000000000..83b7c82691d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -0,0 +1,121 @@ +#include "BPy_GetProjectedYF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedYF1D instance -----------*/ + static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D* self, PyObject *args ); + +/*-----------------------BPy_GetProjectedYF1D type definition ------------------------------*/ + +PyTypeObject GetProjectedYF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedYF1D", /* tp_name */ + sizeof( BPy_GetProjectedYF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedYF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedYF1D___init__( BPy_GetProjectedYF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetProjectedYF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h new file mode 100644 index 00000000000..86602d9619c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDYF1D_H +#define FREESTYLE_PYTHON_GETPROJECTEDYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedYF1D_Type; + +#define BPy_GetProjectedYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF1D_Type) + +/*---------------------------Python BPy_GetProjectedYF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetProjectedYF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp new file mode 100644 index 00000000000..78f8dccc4c7 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -0,0 +1,121 @@ +#include "BPy_GetProjectedZF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetProjectedZF1D instance -----------*/ + static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D* self, PyObject *args ); + +/*-----------------------BPy_GetProjectedZF1D type definition ------------------------------*/ + +PyTypeObject GetProjectedZF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetProjectedZF1D", /* tp_name */ + sizeof( BPy_GetProjectedZF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetProjectedZF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetProjectedZF1D___init__( BPy_GetProjectedZF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetProjectedZF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h new file mode 100644 index 00000000000..9f2a4bc1a3e --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETPROJECTEDZF1D_H +#define FREESTYLE_PYTHON_GETPROJECTEDZF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetProjectedZF1D_Type; + +#define BPy_GetProjectedZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF1D_Type) + +/*---------------------------Python BPy_GetProjectedZF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetProjectedZF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETPROJECTEDZF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp new file mode 100644 index 00000000000..3960cc91456 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp @@ -0,0 +1,124 @@ +#include "BPy_GetSteerableViewMapDensityF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetSteerableViewMapDensityF1D instance -----------*/ + static int GetSteerableViewMapDensityF1D___init__(BPy_GetSteerableViewMapDensityF1D* self, PyObject *args); + +/*-----------------------BPy_GetSteerableViewMapDensityF1D type definition ------------------------------*/ + +PyTypeObject GetSteerableViewMapDensityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetSteerableViewMapDensityF1D", /* tp_name */ + sizeof( BPy_GetSteerableViewMapDensityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetSteerableViewMapDensityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetSteerableViewMapDensityF1D___init__( BPy_GetSteerableViewMapDensityF1D* self, PyObject *args) +{ + PyObject *obj = 0; + int i; + float f = 2.0; + + if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + cout << "ERROR: GetSteerableViewMapDensityF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i,t,f); + return 0; + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h new file mode 100644 index 00000000000..fa9942a55a1 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETSTEERABLEVIEWMAPDENSITYF1D_H +#define FREESTYLE_PYTHON_GETSTEERABLEVIEWMAPDENSITYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetSteerableViewMapDensityF1D_Type; + +#define BPy_GetSteerableViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetSteerableViewMapDensityF1D_Type) + +/*---------------------------Python BPy_GetSteerableViewMapDensityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetSteerableViewMapDensityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETSTEERABLEVIEWMAPDENSITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp new file mode 100644 index 00000000000..6549e0bf2ce --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp @@ -0,0 +1,124 @@ +#include "BPy_GetViewMapGradientNormF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetViewMapGradientNormF1D instance -----------*/ + static int GetViewMapGradientNormF1D___init__(BPy_GetViewMapGradientNormF1D* self, PyObject *args); + +/*-----------------------BPy_GetViewMapGradientNormF1D type definition ------------------------------*/ + +PyTypeObject GetViewMapGradientNormF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetViewMapGradientNormF1D", /* tp_name */ + sizeof( BPy_GetViewMapGradientNormF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetViewMapGradientNormF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetViewMapGradientNormF1D___init__( BPy_GetViewMapGradientNormF1D* self, PyObject *args) +{ + PyObject *obj = 0; + int i; + float f = 2.0; + + if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + cout << "ERROR: GetViewMapGradientNormF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i,t,f); + return 0; + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h new file mode 100644 index 00000000000..5fcb88d5a29 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF1D_H +#define FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetViewMapGradientNormF1D_Type; + +#define BPy_GetViewMapGradientNormF1D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF1D_Type) + +/*---------------------------Python BPy_GetViewMapGradientNormF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetViewMapGradientNormF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETVIEWMAPGRADIENTNORMF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp new file mode 100644 index 00000000000..d7c4c82639d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -0,0 +1,122 @@ +#include "BPy_GetXF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetXF1D instance -----------*/ + static int GetXF1D___init__(BPy_GetXF1D* self, PyObject *args ); + +/*-----------------------BPy_GetXF1D type definition ------------------------------*/ + +PyTypeObject GetXF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetXF1D", /* tp_name */ + sizeof( BPy_GetXF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetXF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetXF1D___init__( BPy_GetXF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetXF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t); + return 0; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h new file mode 100644 index 00000000000..ad39a5a9b10 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETXF1D_H +#define FREESTYLE_PYTHON_GETXF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetXF1D_Type; + +#define BPy_GetXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetXF1D_Type) + +/*---------------------------Python BPy_GetXF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetXF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETXF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp new file mode 100644 index 00000000000..cb4cf1c01b1 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -0,0 +1,120 @@ +#include "BPy_GetYF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetYF1D instance -----------*/ + static int GetYF1D___init__(BPy_GetYF1D* self, PyObject *args ); + +/*-----------------------BPy_GetYF1D type definition ------------------------------*/ + +PyTypeObject GetYF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetYF1D", /* tp_name */ + sizeof( BPy_GetYF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetYF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetYF1D___init__( BPy_GetYF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetYF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t); + return 0; +} +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h new file mode 100644 index 00000000000..6fc7da72752 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETYF1D_H +#define FREESTYLE_PYTHON_GETYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetYF1D_Type; + +#define BPy_GetYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetYF1D_Type) + +/*---------------------------Python BPy_GetYF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetYF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp new file mode 100644 index 00000000000..02a6a9aaa5d --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -0,0 +1,121 @@ +#include "BPy_GetZF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetZF1D instance -----------*/ + static int GetZF1D___init__(BPy_GetZF1D* self, PyObject *args ); + +/*-----------------------BPy_GetZF1D type definition ------------------------------*/ + +PyTypeObject GetZF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetZF1D", /* tp_name */ + sizeof( BPy_GetZF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetZF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetZF1D___init__( BPy_GetZF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: GetZF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h new file mode 100644 index 00000000000..71e57faa7ef --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETZF1D_H +#define FREESTYLE_PYTHON_GETZF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetZF1D_Type; + +#define BPy_GetZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetZF1D_Type) + +/*---------------------------Python BPy_GetZF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_GetZF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETZF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp index 6b9c687e9e0..9623b9d6fc6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp @@ -1,12 +1,121 @@ - PyObject *_wrap_LocalAverageDepthF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_LocalAverageDepthF1D.h" + +#include "../../../stroke/AdvancedFunctions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for LocalAverageDepthF1D instance -----------*/ + static int LocalAverageDepthF1D___init__(BPy_LocalAverageDepthF1D* self, PyObject *args); + +/*-----------------------BPy_LocalAverageDepthF1D type definition ------------------------------*/ + +PyTypeObject LocalAverageDepthF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "LocalAverageDepthF1D", /* tp_name */ + sizeof( BPy_LocalAverageDepthF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)LocalAverageDepthF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int LocalAverageDepthF1D___init__( BPy_LocalAverageDepthF1D* self, PyObject *args) +{ + PyObject *obj = 0; + double d; + + if( !PyArg_ParseTuple(args, "d|O", &d, &obj) ) { + cout << "ERROR: LocalAverageDepthF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d,t); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - - PyObject *_wrap_LocalAverageDepthF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_LocalAverageDepthF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h new file mode 100644 index 00000000000..cb9902cc38f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF1D_H +#define FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject LocalAverageDepthF1D_Type; + +#define BPy_LocalAverageDepthF1D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF1D_Type) + +/*---------------------------Python BPy_LocalAverageDepthF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_LocalAverageDepthF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_LOCALAVERAGEDEPTHF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp new file mode 100644 index 00000000000..17ddcda299a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -0,0 +1,122 @@ +#include "BPy_ZDiscontinuityF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ZDiscontinuityF1D instance -----------*/ + static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D* self, PyObject *args ); + +/*-----------------------BPy_ZDiscontinuityF1D type definition ------------------------------*/ + +PyTypeObject ZDiscontinuityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ZDiscontinuityF1D", /* tp_name */ + sizeof( BPy_ZDiscontinuityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DDouble_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ZDiscontinuityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ZDiscontinuityF1D___init__( BPy_ZDiscontinuityF1D* self, PyObject *args ) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: ZDiscontinuityF1D___init__ " << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t); + return 0; +} + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h new file mode 100644 index 00000000000..66524e5c16a --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_ZDISCONTINUITYF1D_H +#define FREESTYLE_PYTHON_ZDISCONTINUITYF1D_H + +#include "../BPy_UnaryFunction1DDouble.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ZDiscontinuityF1D_Type; + +#define BPy_ZDiscontinuityF1D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF1D_Type) + +/*---------------------------Python BPy_ZDiscontinuityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DDouble py_uf1D_double; +} BPy_ZDiscontinuityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_ZDISCONTINUITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp deleted file mode 100644 index d2057990944..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_Curvature2DAngleF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_Curvature2DAngleF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_Curvature2DAngleF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_Curvature2DAngleF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp deleted file mode 100644 index d7c8ace1bb2..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedXF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetProjectedXF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedXF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedXF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp deleted file mode 100644 index e567e07ba5a..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedYF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetProjectedYF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedYF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedYF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp deleted file mode 100644 index b20ee1443e7..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetProjectedZF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetProjectedZF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetProjectedZF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetProjectedZF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp deleted file mode 100644 index 21df4596b5e..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetSteerableViewMapDensityF1D.cpp +++ /dev/null @@ -1,8 +0,0 @@ - PyObject *_wrap_GetSteerableViewMapDensityF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetSteerableViewMapDensityF1D___call__(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp deleted file mode 100644 index bd5425450e8..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetViewMapGradientNormF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetViewMapGradientNormF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetViewMapGradientNormF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetViewMapGradientNormF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp deleted file mode 100644 index 73b4df64df6..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetXF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetXF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetXF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetXF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp deleted file mode 100644 index 36a1ffed9c6..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetYF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetYF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetYF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetYF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp deleted file mode 100644 index ad0fc844a1c..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_GetZF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_GetZF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_GetZF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_GetZF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp deleted file mode 100644 index 886607f7ca9..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_real/BPy_ZDiscontinuityF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_ZDiscontinuityF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_ZDiscontinuityF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ZDiscontinuityF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp deleted file mode 100644 index 436b617886b..00000000000 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned/BPy_QuantitativeInvisibilityF1D.cpp +++ /dev/null @@ -1,12 +0,0 @@ - PyObject *_wrap_QuantitativeInvisibilityF1D_getName(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_QuantitativeInvisibilityF1D___call__(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_QuantitativeInvisibilityF1D(PyObject *self , PyObject *args) { -} - - diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp new file mode 100644 index 00000000000..f6d466b61fa --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp @@ -0,0 +1,122 @@ +#include "BPy_QuantitativeInvisibilityF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for QuantitativeInvisibilityF1D instance -----------*/ + static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D* self, PyObject *args); + +/*-----------------------BPy_QuantitativeInvisibilityF1D type definition ------------------------------*/ + +PyTypeObject QuantitativeInvisibilityF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "QuantitativeInvisibilityF1D", /* tp_name */ + sizeof( BPy_QuantitativeInvisibilityF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DUnsigned_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)QuantitativeInvisibilityF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int QuantitativeInvisibilityF1D___init__( BPy_QuantitativeInvisibilityF1D* self, PyObject *args) +{ + PyObject *obj = 0; + + if( !PyArg_ParseTuple(args, "|O", &obj) ) { + cout << "ERROR: QuantitativeInvisibilityF1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t); + return 0; + +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h new file mode 100644 index 00000000000..8b8e793582f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF1D_H +#define FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF1D_H + +#include "../BPy_UnaryFunction1DUnsigned.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject QuantitativeInvisibilityF1D_Type; + +#define BPy_QuantitativeInvisibilityF1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF1D_Type) + +/*---------------------------Python BPy_QuantitativeInvisibilityF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DUnsigned py_uf1D_unsigned; +} BPy_QuantitativeInvisibilityF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp index 7df4ea835ca..b4a5c7180b6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp @@ -1,12 +1,113 @@ - PyObject *_wrap_GetOccludeeF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetOccludeeF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetOccludeeF1D instance -----------*/ + static int GetOccludeeF1D___init__(BPy_GetOccludeeF1D* self); + +/*-----------------------BPy_GetOccludeeF1D type definition ------------------------------*/ + +PyTypeObject GetOccludeeF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetOccludeeF1D", /* tp_name */ + sizeof( BPy_GetOccludeeF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVectorViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetOccludeeF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetOccludeeF1D___init__( BPy_GetOccludeeF1D* self ) +{ + self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludeeF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetOccludeeF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetOccludeeF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h new file mode 100644 index 00000000000..0377214cb70 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETOCCLUDEEF1D_H +#define FREESTYLE_PYTHON_GETOCCLUDEEF1D_H + +#include "../BPy_UnaryFunction1DVectorViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetOccludeeF1D_Type; + +#define BPy_GetOccludeeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF1D_Type) + +/*---------------------------Python BPy_GetOccludeeF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape; +} BPy_GetOccludeeF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETOCCLUDEEF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp index 26c14fc4a81..d5e057117f5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp @@ -1,12 +1,113 @@ - PyObject *_wrap_GetOccludersF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetOccludersF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetOccludersF1D instance -----------*/ + static int GetOccludersF1D___init__(BPy_GetOccludersF1D* self); + +/*-----------------------BPy_GetOccludersF1D type definition ------------------------------*/ + +PyTypeObject GetOccludersF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetOccludersF1D", /* tp_name */ + sizeof( BPy_GetOccludersF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVectorViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetOccludersF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetOccludersF1D___init__( BPy_GetOccludersF1D* self ) +{ + self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetOccludersF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetOccludersF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetOccludersF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h new file mode 100644 index 00000000000..76031c5a811 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETOCCLUDERSF1D_H +#define FREESTYLE_PYTHON_GETOCCLUDERSF1D_H + +#include "../BPy_UnaryFunction1DVectorViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetOccludersF1D_Type; + +#define BPy_GetOccludersF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF1D_Type) + +/*---------------------------Python BPy_GetOccludersF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape; +} BPy_GetOccludersF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETOCCLUDERSF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp index e1fd19d5d3b..2349b36fa3d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp @@ -1,12 +1,113 @@ - PyObject *_wrap_GetShapeF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_GetShapeF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GetShapeF1D instance -----------*/ + static int GetShapeF1D___init__(BPy_GetShapeF1D* self); + +/*-----------------------BPy_GetShapeF1D type definition ------------------------------*/ + +PyTypeObject GetShapeF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GetShapeF1D", /* tp_name */ + sizeof( BPy_GetShapeF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVectorViewShape_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GetShapeF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GetShapeF1D___init__( BPy_GetShapeF1D* self ) +{ + self->py_uf1D_vectorviewshape.uf1D_vectorviewshape = new Functions1D::GetShapeF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_GetShapeF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_GetShapeF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h new file mode 100644 index 00000000000..3505e6688b0 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_GETSHAPEF1D_H +#define FREESTYLE_PYTHON_GETSHAPEF1D_H + +#include "../BPy_UnaryFunction1DVectorViewShape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GetShapeF1D_Type; + +#define BPy_GetShapeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF1D_Type) + +/*---------------------------Python BPy_GetShapeF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVectorViewShape py_uf1D_vectorviewshape; +} BPy_GetShapeF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_GETSHAPEF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp index daf3c773267..4ea90ad9f0d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp @@ -1,16 +1,113 @@ - PyObject *_wrap_ChainingTimeStampF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_ChainingTimeStampF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ChainingTimeStampF1D instance -----------*/ + static int ChainingTimeStampF1D___init__(BPy_ChainingTimeStampF1D* self); + +/*-----------------------BPy_ChainingTimeStampF1D type definition ------------------------------*/ + +PyTypeObject ChainingTimeStampF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ChainingTimeStampF1D", /* tp_name */ + sizeof( BPy_ChainingTimeStampF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVoid_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ChainingTimeStampF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ChainingTimeStampF1D___init__( BPy_ChainingTimeStampF1D* self ) +{ + self->py_uf1D_void.uf1D_void = new Functions1D::ChainingTimeStampF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ChainingTimeStampF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_ChainingTimeStampF1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ChainingTimeStampF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h new file mode 100644 index 00000000000..e52e037e986 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_CHAININGTIMESTAMPF1D_H +#define FREESTYLE_PYTHON_CHAININGTIMESTAMPF1D_H + +#include "../BPy_UnaryFunction1DVoid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ChainingTimeStampF1D_Type; + +#define BPy_ChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &ChainingTimeStampF1D_Type) + +/*---------------------------Python BPy_ChainingTimeStampF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVoid py_uf1D_void; +} BPy_ChainingTimeStampF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAININGTIMESTAMPF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp index 291d180a3fe..509a1e34195 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp @@ -1,16 +1,113 @@ - PyObject *_wrap_IncrementChainingTimeStampF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_IncrementChainingTimeStampF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for IncrementChainingTimeStampF1D instance -----------*/ + static int IncrementChainingTimeStampF1D___init__(BPy_IncrementChainingTimeStampF1D* self); + +/*-----------------------BPy_IncrementChainingTimeStampF1D type definition ------------------------------*/ + +PyTypeObject IncrementChainingTimeStampF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "IncrementChainingTimeStampF1D", /* tp_name */ + sizeof( BPy_IncrementChainingTimeStampF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVoid_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)IncrementChainingTimeStampF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int IncrementChainingTimeStampF1D___init__( BPy_IncrementChainingTimeStampF1D* self ) +{ + self->py_uf1D_void.uf1D_void = new Functions1D::IncrementChainingTimeStampF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_IncrementChainingTimeStampF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_IncrementChainingTimeStampF1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_IncrementChainingTimeStampF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h new file mode 100644 index 00000000000..82236dd0b79 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_INCREMENTCHAININGTIMESTAMPF1D_H +#define FREESTYLE_PYTHON_INCREMENTCHAININGTIMESTAMPF1D_H + +#include "../BPy_UnaryFunction1DVoid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject IncrementChainingTimeStampF1D_Type; + +#define BPy_IncrementChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &IncrementChainingTimeStampF1D_Type) + +/*---------------------------Python BPy_IncrementChainingTimeStampF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVoid py_uf1D_void; +} BPy_IncrementChainingTimeStampF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_INCREMENTCHAININGTIMESTAMPF1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp index 8df3b712a30..516f6cada60 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp @@ -1,16 +1,113 @@ - PyObject *_wrap_TimeStampF1D_getName(PyObject *self , PyObject *args) { +#include "BPy_TimeStampF1D.h" + +#include "../../../view_map/Functions1D.h" +#include "../../BPy_Convert.h" +#include "../../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TimeStampF1D instance -----------*/ + static int TimeStampF1D___init__(BPy_TimeStampF1D* self); + +/*-----------------------BPy_TimeStampF1D type definition ------------------------------*/ + +PyTypeObject TimeStampF1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TimeStampF1D", /* tp_name */ + sizeof( BPy_TimeStampF1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryFunction1DVoid_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TimeStampF1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TimeStampF1D___init__( BPy_TimeStampF1D* self ) +{ + self->py_uf1D_void.uf1D_void = new Functions1D::TimeStampF1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_TimeStampF1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_TimeStampF1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_TimeStampF1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h new file mode 100644 index 00000000000..f1f91d2cd6e --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h @@ -0,0 +1,30 @@ +#ifndef FREESTYLE_PYTHON_TIMESTAMPF1D_H +#define FREESTYLE_PYTHON_TIMESTAMPF1D_H + +#include "../BPy_UnaryFunction1DVoid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TimeStampF1D_Type; + +#define BPy_TimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &TimeStampF1D_Type) + +/*---------------------------Python BPy_TimeStampF1D structure definition----------*/ +typedef struct { + BPy_UnaryFunction1DVoid py_uf1D_void; +} BPy_TimeStampF1D; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CHAININGTIMESTAMPF1D_H */ From 362e4f763f7c4c6d61ee75fec0db567f5bbe2a22 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Sun, 27 Jul 2008 13:40:33 +0000 Subject: [PATCH 417/430] soc-2008-mxcurioni: implemented and integrated all 21 original stroke shaders. --- source/blender/freestyle/SConscript | 21 +++ .../freestyle/intern/python/BPy_Convert.cpp | 3 + .../freestyle/intern/python/BPy_Convert.h | 1 + .../intern/python/BPy_StrokeShader.cpp | 129 +++++++++++++++++- .../BPy_BackboneStretcherShader.cpp | 119 +++++++++++++++- .../BPy_BackboneStretcherShader.h | 31 +++++ .../StrokeShader/BPy_BezierCurveShader.cpp | 120 +++++++++++++++- .../StrokeShader/BPy_BezierCurveShader.h | 31 +++++ .../StrokeShader/BPy_CalligraphicShader.cpp | 122 ++++++++++++++++- .../StrokeShader/BPy_CalligraphicShader.h | 31 +++++ .../StrokeShader/BPy_ColorNoiseShader.cpp | 119 +++++++++++++++- .../StrokeShader/BPy_ColorNoiseShader.h | 31 +++++ .../BPy_ColorVariationPatternShader.cpp | 121 +++++++++++++++- .../BPy_ColorVariationPatternShader.h | 31 +++++ .../StrokeShader/BPy_ConstantColorShader.cpp | 124 +++++++++++++++-- .../StrokeShader/BPy_ConstantColorShader.h | 31 +++++ .../BPy_ConstantThicknessShader.cpp | 119 +++++++++++++++- .../BPy_ConstantThicknessShader.h | 31 +++++ ...y_ConstrainedIncreasingThicknessShader.cpp | 118 +++++++++++++++- ...BPy_ConstrainedIncreasingThicknessShader.h | 31 +++++ .../StrokeShader/BPy_GuidingLinesShader.cpp | 120 +++++++++++++++- .../StrokeShader/BPy_GuidingLinesShader.h | 31 +++++ .../BPy_IncreasingColorShader.cpp | 119 +++++++++++++++- .../StrokeShader/BPy_IncreasingColorShader.h | 31 +++++ .../BPy_IncreasingThicknessShader.cpp | 117 +++++++++++++++- .../BPy_IncreasingThicknessShader.h | 31 +++++ .../BPy_PolygonalizationShader.cpp | 119 +++++++++++++++- .../StrokeShader/BPy_PolygonalizationShader.h | 31 +++++ .../StrokeShader/BPy_SamplingShader.cpp | 119 +++++++++++++++- .../python/StrokeShader/BPy_SamplingShader.h | 31 +++++ .../StrokeShader/BPy_SpatialNoiseShader.cpp | 122 ++++++++++++++++- .../StrokeShader/BPy_SpatialNoiseShader.h | 31 +++++ .../StrokeShader/BPy_StrokeTextureShader.cpp | 125 ++++++++++++++++- .../StrokeShader/BPy_StrokeTextureShader.h | 31 +++++ .../BPy_TextureAssignerShader.cpp | 119 +++++++++++++++- .../StrokeShader/BPy_TextureAssignerShader.h | 31 +++++ .../StrokeShader/BPy_ThicknessNoiseShader.cpp | 119 +++++++++++++++- .../StrokeShader/BPy_ThicknessNoiseShader.h | 31 +++++ .../BPy_ThicknessVariationPatternShader.cpp | 121 +++++++++++++++- .../BPy_ThicknessVariationPatternShader.h | 31 +++++ .../StrokeShader/BPy_TipRemoverShader.cpp | 117 +++++++++++++++- .../StrokeShader/BPy_TipRemoverShader.h | 31 +++++ .../python/StrokeShader/BPy_fstreamShader.cpp | 118 +++++++++++++++- .../python/StrokeShader/BPy_fstreamShader.h | 31 +++++ .../python/StrokeShader/BPy_streamShader.cpp | 116 ++++++++++++++-- .../python/StrokeShader/BPy_streamShader.h | 31 +++++ .../freestyle/intern/swig/ModuleWrapper.cpp | 52 +++---- source/blender/freestyle/python/Freestyle.py | 8 +- 48 files changed, 3275 insertions(+), 103 deletions(-) create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h create mode 100644 source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 3abce0d3ec1..6423cce6593 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -100,6 +100,27 @@ python_sources = [ prefix + '/BPy_SShape.cpp', prefix + '/BPy_StrokeAttribute.cpp', prefix + '/BPy_StrokeShader.cpp', + prefix + '/StrokeShader/BPy_BackboneStretcherShader.cpp', + prefix + '/StrokeShader/BPy_BezierCurveShader.cpp', + prefix + '/StrokeShader/BPy_CalligraphicShader.cpp', + prefix + '/StrokeShader/BPy_ColorNoiseShader.cpp', + prefix + '/StrokeShader/BPy_ColorVariationPatternShader.cpp', + prefix + '/StrokeShader/BPy_ConstantColorShader.cpp', + prefix + '/StrokeShader/BPy_ConstantThicknessShader.cpp', + prefix + '/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp', + prefix + '/StrokeShader/BPy_fstreamShader.cpp', + prefix + '/StrokeShader/BPy_GuidingLinesShader.cpp', + prefix + '/StrokeShader/BPy_IncreasingColorShader.cpp', + prefix + '/StrokeShader/BPy_IncreasingThicknessShader.cpp', + prefix + '/StrokeShader/BPy_PolygonalizationShader.cpp', + prefix + '/StrokeShader/BPy_SamplingShader.cpp', + prefix + '/StrokeShader/BPy_SpatialNoiseShader.cpp', + prefix + '/StrokeShader/BPy_streamShader.cpp', + prefix + '/StrokeShader/BPy_StrokeTextureShader.cpp', + prefix + '/StrokeShader/BPy_TextureAssignerShader.cpp', + prefix + '/StrokeShader/BPy_ThicknessNoiseShader.cpp', + prefix + '/StrokeShader/BPy_ThicknessVariationPatternShader.cpp', + prefix + '/StrokeShader/BPy_TipRemoverShader.cpp', prefix + '/BPy_UnaryFunction0D.cpp', prefix + '/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp', prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp', diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index d7b8bfa6cce..042d4b7bef0 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -204,6 +204,9 @@ IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { return static_cast( PyInt_AsLong(obj) ); } +Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) { + return static_cast( PyInt_AsLong(obj) ); +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 4d318fcbc1d..b43f7bab291 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -59,6 +59,7 @@ PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); +Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index cdca779dafb..a6d2ae1e512 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -3,6 +3,28 @@ #include "BPy_Convert.h" #include "Interface1D/BPy_Stroke.h" +#include "StrokeShader/BPy_BackboneStretcherShader.h" +#include "StrokeShader/BPy_BezierCurveShader.h" +#include "StrokeShader/BPy_CalligraphicShader.h" +#include "StrokeShader/BPy_ColorNoiseShader.h" +#include "StrokeShader/BPy_ColorVariationPatternShader.h" +#include "StrokeShader/BPy_ConstantColorShader.h" +#include "StrokeShader/BPy_ConstantThicknessShader.h" +#include "StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h" +#include "StrokeShader/BPy_fstreamShader.h" +#include "StrokeShader/BPy_GuidingLinesShader.h" +#include "StrokeShader/BPy_IncreasingColorShader.h" +#include "StrokeShader/BPy_IncreasingThicknessShader.h" +#include "StrokeShader/BPy_PolygonalizationShader.h" +#include "StrokeShader/BPy_SamplingShader.h" +#include "StrokeShader/BPy_SpatialNoiseShader.h" +#include "StrokeShader/BPy_streamShader.h" +#include "StrokeShader/BPy_StrokeTextureShader.h" +#include "StrokeShader/BPy_TextureAssignerShader.h" +#include "StrokeShader/BPy_ThicknessNoiseShader.h" +#include "StrokeShader/BPy_ThicknessVariationPatternShader.h" +#include "StrokeShader/BPy_TipRemoverShader.h" + #ifdef __cplusplus extern "C" { #endif @@ -117,9 +139,114 @@ PyMODINIT_FUNC StrokeShader_Init( PyObject *module ) if( PyType_Ready( &StrokeShader_Type ) < 0 ) return; - Py_INCREF( &StrokeShader_Type ); PyModule_AddObject(module, "StrokeShader", (PyObject *)&StrokeShader_Type); + + if( PyType_Ready( &BackboneStretcherShader_Type ) < 0 ) + return; + Py_INCREF( &BackboneStretcherShader_Type ); + PyModule_AddObject(module, "BackboneStretcherShader", (PyObject *)&BackboneStretcherShader_Type); + + if( PyType_Ready( &BezierCurveShader_Type ) < 0 ) + return; + Py_INCREF( &BezierCurveShader_Type ); + PyModule_AddObject(module, "BezierCurveShader", (PyObject *)&BezierCurveShader_Type); + + if( PyType_Ready( &CalligraphicShader_Type ) < 0 ) + return; + Py_INCREF( &CalligraphicShader_Type ); + PyModule_AddObject(module, "CalligraphicShader", (PyObject *)&CalligraphicShader_Type); + + if( PyType_Ready( &ColorNoiseShader_Type ) < 0 ) + return; + Py_INCREF( &ColorNoiseShader_Type ); + PyModule_AddObject(module, "ColorNoiseShader", (PyObject *)&ColorNoiseShader_Type); + + if( PyType_Ready( &ColorVariationPatternShader_Type ) < 0 ) + return; + Py_INCREF( &ColorVariationPatternShader_Type ); + PyModule_AddObject(module, "ColorVariationPatternShader", (PyObject *)&ColorVariationPatternShader_Type); + + if( PyType_Ready( &ConstantColorShader_Type ) < 0 ) + return; + Py_INCREF( &ConstantColorShader_Type ); + PyModule_AddObject(module, "ConstantColorShader", (PyObject *)&ConstantColorShader_Type); + + if( PyType_Ready( &ConstantThicknessShader_Type ) < 0 ) + return; + Py_INCREF( &ConstantThicknessShader_Type ); + PyModule_AddObject(module, "ConstantThicknessShader", (PyObject *)&ConstantThicknessShader_Type); + + if( PyType_Ready( &ConstrainedIncreasingThicknessShader_Type ) < 0 ) + return; + Py_INCREF( &ConstrainedIncreasingThicknessShader_Type ); + PyModule_AddObject(module, "ConstrainedIncreasingThicknessShader", (PyObject *)&ConstrainedIncreasingThicknessShader_Type); + + if( PyType_Ready( &fstreamShader_Type ) < 0 ) + return; + Py_INCREF( &fstreamShader_Type ); + PyModule_AddObject(module, "fstreamShader", (PyObject *)&fstreamShader_Type); + + if( PyType_Ready( &GuidingLinesShader_Type ) < 0 ) + return; + Py_INCREF( &GuidingLinesShader_Type ); + PyModule_AddObject(module, "GuidingLinesShader", (PyObject *)&GuidingLinesShader_Type); + + if( PyType_Ready( &IncreasingColorShader_Type ) < 0 ) + return; + Py_INCREF( &IncreasingColorShader_Type ); + PyModule_AddObject(module, "IncreasingColorShader", (PyObject *)&IncreasingColorShader_Type); + + if( PyType_Ready( &IncreasingThicknessShader_Type ) < 0 ) + return; + Py_INCREF( &IncreasingThicknessShader_Type ); + PyModule_AddObject(module, "IncreasingThicknessShader", (PyObject *)&IncreasingThicknessShader_Type); + + if( PyType_Ready( &PolygonalizationShader_Type ) < 0 ) + return; + Py_INCREF( &PolygonalizationShader_Type ); + PyModule_AddObject(module, "PolygonalizationShader", (PyObject *)&PolygonalizationShader_Type); + + if( PyType_Ready( &SamplingShader_Type ) < 0 ) + return; + Py_INCREF( &SamplingShader_Type ); + PyModule_AddObject(module, "SamplingShader", (PyObject *)&SamplingShader_Type); + + if( PyType_Ready( &SpatialNoiseShader_Type ) < 0 ) + return; + Py_INCREF( &SpatialNoiseShader_Type ); + PyModule_AddObject(module, "SpatialNoiseShader", (PyObject *)&SpatialNoiseShader_Type); + + if( PyType_Ready( &streamShader_Type ) < 0 ) + return; + Py_INCREF( &streamShader_Type ); + PyModule_AddObject(module, "streamShader", (PyObject *)&streamShader_Type); + + if( PyType_Ready( &StrokeTextureShader_Type ) < 0 ) + return; + Py_INCREF( &StrokeTextureShader_Type ); + PyModule_AddObject(module, "StrokeTextureShader", (PyObject *)&StrokeTextureShader_Type); + + if( PyType_Ready( &TextureAssignerShader_Type ) < 0 ) + return; + Py_INCREF( &TextureAssignerShader_Type ); + PyModule_AddObject(module, "TextureAssignerShader", (PyObject *)&TextureAssignerShader_Type); + + if( PyType_Ready( &ThicknessNoiseShader_Type ) < 0 ) + return; + Py_INCREF( &ThicknessNoiseShader_Type ); + PyModule_AddObject(module, "ThicknessNoiseShader", (PyObject *)&ThicknessNoiseShader_Type); + + if( PyType_Ready( &ThicknessVariationPatternShader_Type ) < 0 ) + return; + Py_INCREF( &ThicknessVariationPatternShader_Type ); + PyModule_AddObject(module, "ThicknessVariationPatternShader", (PyObject *)&ThicknessVariationPatternShader_Type); + + if( PyType_Ready( &TipRemoverShader_Type ) < 0 ) + return; + Py_INCREF( &TipRemoverShader_Type ); + PyModule_AddObject(module, "TipRemoverShader", (PyObject *)&TipRemoverShader_Type); + } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp index 96fd31e982e..6b5fe67f345 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_BackboneStretcherShader_shade(PyObject *self , PyObject *args) { +#include "BPy_BackboneStretcherShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for BackboneStretcherShader instance -----------*/ + static int BackboneStretcherShader___init__( BPy_BackboneStretcherShader* self, PyObject *args); + +/*-----------------------BPy_BackboneStretcherShader type definition ------------------------------*/ + +PyTypeObject BackboneStretcherShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "BackboneStretcherShader", /* tp_name */ + sizeof( BPy_BackboneStretcherShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)BackboneStretcherShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int BackboneStretcherShader___init__( BPy_BackboneStretcherShader* self, PyObject *args) +{ + float f = 2.0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: BackboneStretcherShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::BackboneStretcherShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_BackboneStretcherShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h new file mode 100644 index 00000000000..161bdb5db40 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_BACKBONESTRETCHERSHADER_H +#define FREESTYLE_PYTHON_BACKBONESTRETCHERSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject BackboneStretcherShader_Type; + +#define BPy_BackboneStretcherShader_Check(v) (( (PyObject *) v)->ob_type == &BackboneStretcherShader_Type) + +/*---------------------------Python BPy_BackboneStretcherShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_BackboneStretcherShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_BACKBONESTRETCHERSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp index a4d476bb2d6..3ddda4256be 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.cpp @@ -1,8 +1,118 @@ - PyObject *_wrap_BezierCurveShader_shade(PyObject *self , PyObject *args) { +#include "BPy_BezierCurveShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for BezierCurveShader instance -----------*/ + static int BezierCurveShader___init__( BPy_BezierCurveShader* self, PyObject *args); + +/*-----------------------BPy_BezierCurveShader type definition ------------------------------*/ + +PyTypeObject BezierCurveShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "BezierCurveShader", /* tp_name */ + sizeof( BPy_BezierCurveShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)BezierCurveShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int BezierCurveShader___init__( BPy_BezierCurveShader* self, PyObject *args) +{ + float f = 4.0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: BezierCurveShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::BezierCurveShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - - PyObject *_wrap_delete_BezierCurveShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h new file mode 100644 index 00000000000..56443ca26ad --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_BEZIERCURVESHADER_H +#define FREESTYLE_PYTHON_BEZIERCURVESHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject BezierCurveShader_Type; + +#define BPy_BezierCurveShader_Check(v) (( (PyObject *) v)->ob_type == &BezierCurveShader_Type) + +/*---------------------------Python BPy_BezierCurveShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_BezierCurveShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_BEZIERCURVESHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp index 2f7a422d311..d20fbeab1ec 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp @@ -1,4 +1,124 @@ - PyObject *_wrap_CalligraphicShader_shade(PyObject *self , PyObject *args) { +#include "BPy_CalligraphicShader.h" + +#include "../../stroke/AdvancedStrokeShaders.h" +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for CalligraphicShader instance -----------*/ + static int CalligraphicShader___init__( BPy_CalligraphicShader* self, PyObject *args); + +/*-----------------------BPy_CalligraphicShader type definition ------------------------------*/ + +PyTypeObject CalligraphicShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "CalligraphicShader", /* tp_name */ + sizeof( BPy_CalligraphicShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)CalligraphicShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int CalligraphicShader___init__( BPy_CalligraphicShader* self, PyObject *args) +{ + double d1, d2; + PyObject *obj3 = 0, *obj4 = 0; + + + if(!( PyArg_ParseTuple(args, "ddOO", &d1, &d2, &obj3, &obj4) + && PyList_Check(obj3) && PyList_Size(obj3) > 1 && PyBool_Check(obj4) )) { + cout << "ERROR: CalligraphicShader___init__" << endl; + return -1; + } + + Vec2f v( PyFloat_AsDouble(PyList_GetItem(obj3,0)), PyFloat_AsDouble(PyList_GetItem(obj3,1)) ); + self->py_ss.ss = new CalligraphicShader(d1, d2, v, bool_from_PyBool(obj4) ); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h new file mode 100644 index 00000000000..d3a4782c794 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CALLIGRAPHICSHADER_H +#define FREESTYLE_PYTHON_CALLIGRAPHICSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject CalligraphicShader_Type; + +#define BPy_CalligraphicShader_Check(v) (( (PyObject *) v)->ob_type == &CalligraphicShader_Type) + +/*---------------------------Python BPy_CalligraphicShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_CalligraphicShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_CALLIGRAPHICSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp index 1b52e33fd8f..df0389a5226 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_ColorNoiseShader_shade(PyObject *self , PyObject *args) { +#include "BPy_ColorNoiseShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ColorNoiseShader instance -----------*/ + static int ColorNoiseShader___init__( BPy_ColorNoiseShader* self, PyObject *args); + +/*-----------------------BPy_ColorNoiseShader type definition ------------------------------*/ + +PyTypeObject ColorNoiseShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ColorNoiseShader", /* tp_name */ + sizeof( BPy_ColorNoiseShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ColorNoiseShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ColorNoiseShader___init__( BPy_ColorNoiseShader* self, PyObject *args) +{ + float f1, f2; + + if(!( PyArg_ParseTuple(args, "ff", &f1, &f2) )) { + cout << "ERROR: ColorNoiseShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::ColorNoiseShader(f1, f2); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_ColorNoiseShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h new file mode 100644 index 00000000000..e4ad2c0e1af --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_COLORNOISESHADER_H +#define FREESTYLE_PYTHON_COLORNOISESHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ColorNoiseShader_Type; + +#define BPy_ColorNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ColorNoiseShader_Type) + +/*---------------------------Python BPy_ColorNoiseShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ColorNoiseShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_COLORNOISESHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp index 7529c869939..380c760d0c0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.cpp @@ -1,4 +1,123 @@ - PyObject *_wrap_ColorVariationPatternShader_shade(PyObject *self , PyObject *args) { +#include "BPy_ColorVariationPatternShader.h" + +#include "../../stroke/BasicStrokeShaders.h" +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ColorVariationPatternShader instance -----------*/ + static int ColorVariationPatternShader___init__( BPy_ColorVariationPatternShader* self, PyObject *args); + +/*-----------------------BPy_ColorVariationPatternShader type definition ------------------------------*/ + +PyTypeObject ColorVariationPatternShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ColorVariationPatternShader", /* tp_name */ + sizeof( BPy_ColorVariationPatternShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ColorVariationPatternShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ColorVariationPatternShader___init__( BPy_ColorVariationPatternShader* self, PyObject *args) +{ + const char *s; + PyObject *obj = 0; + + + if(!( PyArg_ParseTuple(args, "s|O", &s, &obj) )) { + cout << "ERROR: ColorVariationPatternShader___init__" << endl; + return -1; + } + + bool b = (obj && PyBool_Check(obj)) ? bool_from_PyBool(obj) : true; + self->py_ss.ss = new StrokeShaders::ColorVariationPatternShader(s,b); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h new file mode 100644 index 00000000000..12f7bbca151 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_COLORVARIATIONPATTERNSHADER_H +#define FREESTYLE_PYTHON_COLORVARIATIONPATTERNSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ColorVariationPatternShader_Type; + +#define BPy_ColorVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ColorVariationPatternShader_Type) + +/*---------------------------Python BPy_ColorVariationPatternShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ColorVariationPatternShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_COLORVARIATIONPATTERNSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp index e636331c57c..a9430fa8000 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.cpp @@ -1,12 +1,120 @@ - PyObject *_wrap_ConstantColorShader_getName(PyObject *self , PyObject *args) { +#include "BPy_ConstantColorShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ConstantColorShader instance -----------*/ + static int ConstantColorShader___init__( BPy_ConstantColorShader* self, PyObject *args); + +/*-----------------------BPy_ConstantColorShader type definition ------------------------------*/ + +PyTypeObject ConstantColorShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ConstantColorShader", /* tp_name */ + sizeof( BPy_ConstantColorShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ConstantColorShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ConstantColorShader___init__( BPy_ConstantColorShader* self, PyObject *args) +{ + float f1, f2, f3, f4 = 1.0; + + + if(!( PyArg_ParseTuple(args, "fff|f", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: ConstantColorShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::ConstantColorShader(f1, f2, f3, f4); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ConstantColorShader_shade(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ConstantColorShader(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h new file mode 100644 index 00000000000..0f3ae177d15 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CONSTANTCOLORSHADER_H +#define FREESTYLE_PYTHON_CONSTANTCOLORSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ConstantColorShader_Type; + +#define BPy_ConstantColorShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantColorShader_Type) + +/*---------------------------Python BPy_ConstantColorShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ConstantColorShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_CONSTANTCOLORSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp index 1840ef71f6d..a3440295767 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_ConstantThicknessShader_getName(PyObject *self , PyObject *args) { +#include "BPy_ConstantThicknessShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ConstantThicknessShader instance -----------*/ + static int ConstantThicknessShader___init__( BPy_ConstantThicknessShader* self, PyObject *args); + +/*-----------------------BPy_ConstantThicknessShader type definition ------------------------------*/ + +PyTypeObject ConstantThicknessShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ConstantThicknessShader", /* tp_name */ + sizeof( BPy_ConstantThicknessShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ConstantThicknessShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ConstantThicknessShader___init__( BPy_ConstantThicknessShader* self, PyObject *args) +{ + float f; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: ConstantThicknessShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::ConstantThicknessShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ConstantThicknessShader_shade(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h new file mode 100644 index 00000000000..d8cb7239fd9 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CONSTANTTHICKNESSSHADER_H +#define FREESTYLE_PYTHON_CONSTANTTHICKNESSSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ConstantThicknessShader_Type; + +#define BPy_ConstantThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantThicknessShader_Type) + +/*---------------------------Python BPy_ConstantThicknessShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ConstantThicknessShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_CONSTANTTHICKNESSSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp index 41eb1c94d17..aed3911648d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp @@ -1,4 +1,120 @@ - PyObject *_wrap_ConstrainedIncreasingThicknessShader_shade(PyObject *self , PyObject *args) { +#include "BPy_ConstrainedIncreasingThicknessShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ConstrainedIncreasingThicknessShader instance -----------*/ + static int ConstrainedIncreasingThicknessShader___init__( BPy_ConstrainedIncreasingThicknessShader* self, PyObject *args); + +/*-----------------------BPy_ConstrainedIncreasingThicknessShader type definition ------------------------------*/ + +PyTypeObject ConstrainedIncreasingThicknessShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ConstrainedIncreasingThicknessShader", /* tp_name */ + sizeof( BPy_ConstrainedIncreasingThicknessShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ConstrainedIncreasingThicknessShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ConstrainedIncreasingThicknessShader___init__( BPy_ConstrainedIncreasingThicknessShader* self, PyObject *args) +{ + float f1, f2, f3; + + + if(!( PyArg_ParseTuple(args, "fff", &f1, &f2, &f3) )) { + cout << "ERROR: ConstrainedIncreasingThicknessShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::ConstrainedIncreasingThicknessShader(f1, f2, f3); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h new file mode 100644 index 00000000000..f712706d2ee --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_CONSTRAINEDINCREASINGTHICKNESSSHADER_H +#define FREESTYLE_PYTHON_CONSTRAINEDINCREASINGTHICKNESSSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ConstrainedIncreasingThicknessShader_Type; + +#define BPy_ConstrainedIncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstrainedIncreasingThicknessShader_Type) + +/*---------------------------Python BPy_ConstrainedIncreasingThicknessShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ConstrainedIncreasingThicknessShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_CONSTRAINEDINCREASINGTHICKNESSSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp index 633523af330..585c03e988a 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.cpp @@ -1,8 +1,120 @@ - PyObject *_wrap_GuidingLinesShader_shade(PyObject *self , PyObject *args) { +#include "BPy_GuidingLinesShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for GuidingLinesShader instance -----------*/ + static int GuidingLinesShader___init__( BPy_GuidingLinesShader* self, PyObject *args); + +/*-----------------------BPy_GuidingLinesShader type definition ------------------------------*/ + +PyTypeObject GuidingLinesShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "GuidingLinesShader", /* tp_name */ + sizeof( BPy_GuidingLinesShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)GuidingLinesShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int GuidingLinesShader___init__( BPy_GuidingLinesShader* self, PyObject *args) +{ + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: GuidingLinesShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::GuidingLinesShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_GuidingLinesShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif + \ No newline at end of file diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h new file mode 100644 index 00000000000..2cf032e24ae --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_GUIDINGLINESSHADER_H +#define FREESTYLE_PYTHON_GUIDINGLINESSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject GuidingLinesShader_Type; + +#define BPy_GuidingLinesShader_Check(v) (( (PyObject *) v)->ob_type == &GuidingLinesShader_Type) + +/*---------------------------Python BPy_GuidingLinesShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_GuidingLinesShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_GUIDINGLINESSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp index 2fbb74f3768..b6cb615368e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_IncreasingColorShader_shade(PyObject *self , PyObject *args) { +#include "BPy_IncreasingColorShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for IncreasingColorShader instance -----------*/ + static int IncreasingColorShader___init__( BPy_IncreasingColorShader* self, PyObject *args); + +/*-----------------------BPy_IncreasingColorShader type definition ------------------------------*/ + +PyTypeObject IncreasingColorShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "IncreasingColorShader", /* tp_name */ + sizeof( BPy_IncreasingColorShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)IncreasingColorShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int IncreasingColorShader___init__( BPy_IncreasingColorShader* self, PyObject *args) +{ + float f1, f2, f3, f4, f5, f6, f7, f8; + + if(!( PyArg_ParseTuple(args, "ffffffff", &f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8) )) { + cout << "ERROR: IncreasingColorShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::IncreasingColorShader(f1, f2, f3, f4, f5, f6, f7, f8); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_IncreasingColorShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h new file mode 100644 index 00000000000..4ef7f3f239d --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_INCREASINGCOLORSHADER_H +#define FREESTYLE_PYTHON_INCREASINGCOLORSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject IncreasingColorShader_Type; + +#define BPy_IncreasingColorShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingColorShader_Type) + +/*---------------------------Python BPy_IncreasingColorShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_IncreasingColorShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_INCREASINGCOLORSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp index 4d97f43841d..0dc3fedde11 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.cpp @@ -1,4 +1,119 @@ - PyObject *_wrap_IncreasingThicknessShader_shade(PyObject *self , PyObject *args) { +#include "BPy_IncreasingThicknessShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for IncreasingThicknessShader instance -----------*/ + static int IncreasingThicknessShader___init__( BPy_IncreasingThicknessShader* self, PyObject *args); + +/*-----------------------BPy_IncreasingThicknessShader type definition ------------------------------*/ + +PyTypeObject IncreasingThicknessShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "IncreasingThicknessShader", /* tp_name */ + sizeof( BPy_IncreasingThicknessShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)IncreasingThicknessShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int IncreasingThicknessShader___init__( BPy_IncreasingThicknessShader* self, PyObject *args) +{ + float f1, f2; + + if(!( PyArg_ParseTuple(args, "ff", &f1, &f2) )) { + cout << "ERROR: IncreasingThicknessShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::IncreasingThicknessShader(f1, f2); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h new file mode 100644 index 00000000000..ae4f37835cc --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_INCREASINGTHICKNESSSHADER_H +#define FREESTYLE_PYTHON_INCREASINGTHICKNESSSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject IncreasingThicknessShader_Type; + +#define BPy_IncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingThicknessShader_Type) + +/*---------------------------Python BPy_IncreasingThicknessShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_IncreasingThicknessShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_INCREASINGTHICKNESSSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp index 098330d37bd..5f4ff5f8d04 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_PolygonalizationShader_shade(PyObject *self , PyObject *args) { +#include "BPy_PolygonalizationShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for PolygonalizationShader instance -----------*/ + static int PolygonalizationShader___init__( BPy_PolygonalizationShader* self, PyObject *args); + +/*-----------------------BPy_PolygonalizationShader type definition ------------------------------*/ + +PyTypeObject PolygonalizationShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "PolygonalizationShader", /* tp_name */ + sizeof( BPy_PolygonalizationShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)PolygonalizationShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int PolygonalizationShader___init__( BPy_PolygonalizationShader* self, PyObject *args) +{ + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: PolygonalizationShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::PolygonalizationShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_PolygonalizationShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h new file mode 100644 index 00000000000..7cc2e94e2cc --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_POLYGONALIZATIONSHADER_H +#define FREESTYLE_PYTHON_POLYGONALIZATIONSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject PolygonalizationShader_Type; + +#define BPy_PolygonalizationShader_Check(v) (( (PyObject *) v)->ob_type == &PolygonalizationShader_Type) + +/*---------------------------Python BPy_PolygonalizationShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_PolygonalizationShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_POLYGONALIZATIONSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp index 3a42bda3b08..a87de11f095 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_SamplingShader_shade(PyObject *self , PyObject *args) { +#include "BPy_SamplingShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SamplingShader instance -----------*/ + static int SamplingShader___init__( BPy_SamplingShader* self, PyObject *args); + +/*-----------------------BPy_SamplingShader type definition ------------------------------*/ + +PyTypeObject SamplingShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SamplingShader", /* tp_name */ + sizeof( BPy_SamplingShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SamplingShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int SamplingShader___init__( BPy_SamplingShader* self, PyObject *args) +{ + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: SamplingShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::SamplingShader(f); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_SamplingShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h new file mode 100644 index 00000000000..763bee23168 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_SAMPLINGSHADER_H +#define FREESTYLE_PYTHON_SAMPLINGSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SamplingShader_Type; + +#define BPy_SamplingShader_Check(v) (( (PyObject *) v)->ob_type == &SamplingShader_Type) + +/*---------------------------Python BPy_SamplingShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_SamplingShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_SAMPLINGSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp index ff90e7f973c..272884e1645 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.cpp @@ -1,4 +1,124 @@ - PyObject *_wrap_SpatialNoiseShader_shade(PyObject *self , PyObject *args) { +#include "BPy_SpatialNoiseShader.h" + +#include "../../stroke/AdvancedStrokeShaders.h" +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SpatialNoiseShader instance -----------*/ + static int SpatialNoiseShader___init__( BPy_SpatialNoiseShader* self, PyObject *args); + +/*-----------------------BPy_SpatialNoiseShader type definition ------------------------------*/ + +PyTypeObject SpatialNoiseShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SpatialNoiseShader", /* tp_name */ + sizeof( BPy_SpatialNoiseShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SpatialNoiseShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int SpatialNoiseShader___init__( BPy_SpatialNoiseShader* self, PyObject *args) +{ + float f1, f2; + int i3; + PyObject *obj4 = 0, *obj5 = 0; + + + if(!( PyArg_ParseTuple(args, "ffiOO", &f1, &f2, &i3, &obj4, &obj5) + && PyList_Check(obj4) && PyBool_Check(obj5) )) { + cout << "ERROR: SpatialNoiseShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new SpatialNoiseShader(f1, f2, i3, bool_from_PyBool(obj4), bool_from_PyBool(obj5) ); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h new file mode 100644 index 00000000000..ac232502881 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_SPATIALNOISESHADER_H +#define FREESTYLE_PYTHON_SPATIALNOISESHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SpatialNoiseShader_Type; + +#define BPy_SpatialNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &SpatialNoiseShader_Type) + +/*---------------------------Python BPy_SpatialNoiseShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_SpatialNoiseShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_SPATIALNOISESHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp index 90636eb5aee..4d5a56db24b 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.cpp @@ -1,8 +1,125 @@ - PyObject *_wrap_StrokeTextureShader_shade(PyObject *self , PyObject *args) { +#include "BPy_StrokeTextureShader.h" + +#include "../../stroke/BasicStrokeShaders.h" +#include "../BPy_Convert.h" +#include "../BPy_MediumType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for StrokeTextureShader instance -----------*/ + static int StrokeTextureShader___init__( BPy_StrokeTextureShader* self, PyObject *args); + +/*-----------------------BPy_StrokeTextureShader type definition ------------------------------*/ + +PyTypeObject StrokeTextureShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "StrokeTextureShader", /* tp_name */ + sizeof( BPy_StrokeTextureShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)StrokeTextureShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int StrokeTextureShader___init__( BPy_StrokeTextureShader* self, PyObject *args) +{ + const char *s1; + PyObject *obj2 = 0, *obj3 = 0; + + if(!( PyArg_ParseTuple(args, "s|00", &s1, &obj2, &obj3) )) { + cout << "ERROR: StrokeTextureShader___init__" << endl; + return -1; + } + + Stroke::MediumType mt = (obj2 && BPy_MediumType_Check(obj2)) ? MediumType_from_BPy_MediumType(obj2) : Stroke::OPAQUE_MEDIUM; + bool b = (obj3 && PyBool_Check(obj3)) ? bool_from_PyBool(obj3) : true; + + self->py_ss.ss = new StrokeShaders::StrokeTextureShader(s1,mt,b); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_StrokeTextureShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h new file mode 100644 index 00000000000..d60ba3080ab --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_STROKETEXTURESHADER_H +#define FREESTYLE_PYTHON_STROKETEXTURESHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject StrokeTextureShader_Type; + +#define BPy_StrokeTextureShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeTextureShader_Type) + +/*---------------------------Python BPy_StrokeTextureShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_StrokeTextureShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_STROKETEXTURESHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp index 9a308d60ac3..1d19be78d03 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_TextureAssignerShader_shade(PyObject *self , PyObject *args) { +#include "BPy_TextureAssignerShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TextureAssignerShader instance -----------*/ + static int TextureAssignerShader___init__( BPy_TextureAssignerShader* self, PyObject *args); + +/*-----------------------BPy_TextureAssignerShader type definition ------------------------------*/ + +PyTypeObject TextureAssignerShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TextureAssignerShader", /* tp_name */ + sizeof( BPy_TextureAssignerShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TextureAssignerShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TextureAssignerShader___init__( BPy_TextureAssignerShader* self, PyObject *args) +{ + int i; + + if(!( PyArg_ParseTuple(args, "i", &i) )) { + cout << "ERROR: TextureAssignerShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::TextureAssignerShader(i); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_TextureAssignerShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h new file mode 100644 index 00000000000..658f3f4ec8d --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_TEXTUREASSIGNERSHADER_H +#define FREESTYLE_PYTHON_TEXTUREASSIGNERSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TextureAssignerShader_Type; + +#define BPy_TextureAssignerShader_Check(v) (( (PyObject *) v)->ob_type == &TextureAssignerShader_Type) + +/*---------------------------Python BPy_TextureAssignerShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_TextureAssignerShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_TEXTUREASSIGNERSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp index 0c69aa5cfc1..57810bb9cac 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.cpp @@ -1,8 +1,119 @@ - PyObject *_wrap_ThicknessNoiseShader_shade(PyObject *self , PyObject *args) { +#include "BPy_ThicknessNoiseShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ThicknessNoiseShader instance -----------*/ + static int ThicknessNoiseShader___init__( BPy_ThicknessNoiseShader* self, PyObject *args); + +/*-----------------------BPy_ThicknessNoiseShader type definition ------------------------------*/ + +PyTypeObject ThicknessNoiseShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ThicknessNoiseShader", /* tp_name */ + sizeof( BPy_ThicknessNoiseShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ThicknessNoiseShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ThicknessNoiseShader___init__( BPy_ThicknessNoiseShader* self, PyObject *args) +{ + float f1, f2; + + if(!( PyArg_ParseTuple(args, "ff", &f1, &f2) )) { + cout << "ERROR: ThicknessNoiseShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::ThicknessNoiseShader(f1, f2); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_delete_ThicknessNoiseShader(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h new file mode 100644 index 00000000000..8a0437715f4 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_THICKNESSNOISESHADER_H +#define FREESTYLE_PYTHON_THICKNESSNOISESHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ThicknessNoiseShader_Type; + +#define BPy_ThicknessNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessNoiseShader_Type) + +/*---------------------------Python BPy_ThicknessNoiseShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ThicknessNoiseShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_THICKNESSNOISESHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp index 02326259be8..d7f49b60fa5 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.cpp @@ -1,4 +1,123 @@ - PyObject *_wrap_ThicknessVariationPatternShader_shade(PyObject *self , PyObject *args) { +#include "BPy_ThicknessVariationPatternShader.h" + +#include "../../stroke/BasicStrokeShaders.h" +#include "../BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ThicknessVariationPatternShader instance -----------*/ + static int ThicknessVariationPatternShader___init__( BPy_ThicknessVariationPatternShader* self, PyObject *args); + +/*-----------------------BPy_ThicknessVariationPatternShader type definition ------------------------------*/ + +PyTypeObject ThicknessVariationPatternShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ThicknessVariationPatternShader", /* tp_name */ + sizeof( BPy_ThicknessVariationPatternShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ThicknessVariationPatternShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ThicknessVariationPatternShader___init__( BPy_ThicknessVariationPatternShader* self, PyObject *args) +{ + const char *s1; + float f2 = 1.0, f3 = 5.0; + PyObject *obj4 = 0; + + if(!( PyArg_ParseTuple(args, "s|ffO", &s1, &f2, &f3, &obj4) )) { + cout << "ERROR: ThicknessVariationPatternShader___init__" << endl; + return -1; + } + + bool b = (obj4 && PyBool_Check(obj4)) ? bool_from_PyBool(obj4) : true; + self->py_ss.ss = new StrokeShaders::ThicknessVariationPatternShader(s1, f2, f3, b); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h new file mode 100644 index 00000000000..4c850bdb50f --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_THICKNESSVARIATIONPATTERNSHADER_H +#define FREESTYLE_PYTHON_THICKNESSVARIATIONPATTERNSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ThicknessVariationPatternShader_Type; + +#define BPy_ThicknessVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessVariationPatternShader_Type) + +/*---------------------------Python BPy_ThicknessVariationPatternShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_ThicknessVariationPatternShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_THICKNESSVARIATIONPATTERNSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp index 4a202ddd6ee..1151b33789d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.cpp @@ -1,4 +1,119 @@ - PyObject *_wrap_TipRemoverShader_shade(PyObject *self , PyObject *args) { +#include "BPy_TipRemoverShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TipRemoverShader instance -----------*/ + static int TipRemoverShader___init__( BPy_TipRemoverShader* self, PyObject *args); + +/*-----------------------BPy_TipRemoverShader type definition ------------------------------*/ + +PyTypeObject TipRemoverShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TipRemoverShader", /* tp_name */ + sizeof( BPy_TipRemoverShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TipRemoverShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TipRemoverShader___init__( BPy_TipRemoverShader* self, PyObject *args) +{ + double d; + + if(!( PyArg_ParseTuple(args, "d", &d) )) { + cout << "ERROR: TipRemoverShader___init__" << endl; + return -1; + } + + self->py_ss.ss = new StrokeShaders::TipRemoverShader(d); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h new file mode 100644 index 00000000000..1ca4594d8d5 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_TIPREMOVERSHADER_H +#define FREESTYLE_PYTHON_TIPREMOVERSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TipRemoverShader_Type; + +#define BPy_TipRemoverShader_Check(v) (( (PyObject *) v)->ob_type == &TipRemoverShader_Type) + +/*---------------------------Python BPy_TipRemoverShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_TipRemoverShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_TIPREMOVERSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp index dc19cde3871..71d3df5c3d8 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.cpp @@ -1,8 +1,118 @@ - PyObject *_wrap_fstreamShader_getName(PyObject *self , PyObject *args) { +#include "BPy_fstreamShader.h" + +#include "../../stroke/AdvancedStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for fstreamShader instance -----------*/ + static int fstreamShader___init__( BPy_fstreamShader* self, PyObject *args); + +/*-----------------------BPy_fstreamShader type definition ------------------------------*/ + +PyTypeObject fstreamShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "fstreamShader", /* tp_name */ + sizeof( BPy_fstreamShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)fstreamShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int fstreamShader___init__( BPy_fstreamShader* self, PyObject *args) +{ + const char *s; + + if(!( PyArg_ParseTuple(args, "s", &s) )) { + cout << "ERROR: fstreamShader___init__" << endl; + return -1; + } + self->py_ss.ss = new StrokeShaders::fstreamShader(s); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_fstreamShader_shade(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h new file mode 100644 index 00000000000..02cf0daff18 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_FSTREAMSHADER_H +#define FREESTYLE_PYTHON_FSTREAMSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject fstreamShader_Type; + +#define BPy_fstreamShader_Check(v) (( (PyObject *) v)->ob_type == &fstreamShader_Type) + +/*---------------------------Python BPy_fstreamShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_fstreamShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_FSTREAMSHADER_H */ diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp index aa3250f858c..f756654aceb 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.cpp @@ -1,12 +1,112 @@ - PyObject *_wrap_streamShader_getName(PyObject *self , PyObject *args) { +#include "BPy_streamShader.h" + +#include "../../stroke/BasicStrokeShaders.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for streamShader instance -----------*/ + static int streamShader___init__( BPy_streamShader* self); + +/*-----------------------BPy_streamShader type definition ------------------------------*/ + +PyTypeObject streamShader_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "streamShader", /* tp_name */ + sizeof( BPy_streamShader ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &StrokeShader_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)streamShader___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int streamShader___init__( BPy_streamShader* self) +{ + self->py_ss.ss = new StrokeShaders::streamShader(); + return 0; + } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_streamShader_shade(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_streamShader(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h new file mode 100644 index 00000000000..ae34cb44798 --- /dev/null +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h @@ -0,0 +1,31 @@ +#ifndef FREESTYLE_PYTHON_STREAMSHADER_H +#define FREESTYLE_PYTHON_STREAMSHADER_H + +#include "../BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject streamShader_Type; + +#define BPy_streamShader_Check(v) (( (PyObject *) v)->ob_type == &streamShader_Type) + +/*---------------------------Python BPy_streamShader structure definition----------*/ +typedef struct { + BPy_StrokeShader py_ss; +} BPy_streamShader; + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_STREAMSHADER_H */ diff --git a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp index 67672d3a2ac..829705350a7 100755 --- a/source/blender/freestyle/intern/swig/ModuleWrapper.cpp +++ b/source/blender/freestyle/intern/swig/ModuleWrapper.cpp @@ -47350,7 +47350,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewMap_getClosestViewEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; real arg2 ; @@ -47366,25 +47366,25 @@ SWIGINTERN PyObject *_wrap_ViewMap_GetClosestViewEdge(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_GetClosestViewEdge",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_getClosestViewEdge",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "1"" of type '" "ViewMap const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_getClosestViewEdge" "', argument " "1"" of type '" "ViewMap const *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_getClosestViewEdge" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_GetClosestViewEdge" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_getClosestViewEdge" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - result = (ViewEdge *)((ViewMap const *)arg1)->GetClosestViewEdge(arg2,arg3); + result = (ViewEdge *)((ViewMap const *)arg1)->getClosestViewEdge(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -47400,7 +47400,7 @@ fail: } -SWIGINTERN PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_ViewMap_getClosestFEdge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ViewMap *arg1 = (ViewMap *) 0 ; real arg2 ; @@ -47416,25 +47416,25 @@ SWIGINTERN PyObject *_wrap_ViewMap_GetClosestFEdge(PyObject *SWIGUNUSEDPARM(self PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_GetClosestFEdge",&obj0,&obj1,&obj2)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OOO:ViewMap_getClosestFEdge",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ViewMap, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_GetClosestFEdge" "', argument " "1"" of type '" "ViewMap const *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ViewMap_getClosestFEdge" "', argument " "1"" of type '" "ViewMap const *""'"); } arg1 = reinterpret_cast< ViewMap * >(argp1); ecode2 = SWIG_AsVal_double(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_GetClosestFEdge" "', argument " "2"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ViewMap_getClosestFEdge" "', argument " "2"" of type '" "real""'"); } arg2 = static_cast< real >(val2); ecode3 = SWIG_AsVal_double(obj2, &val3); if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_GetClosestFEdge" "', argument " "3"" of type '" "real""'"); + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ViewMap_getClosestFEdge" "', argument " "3"" of type '" "real""'"); } arg3 = static_cast< real >(val3); { try { - result = (FEdge *)((ViewMap const *)arg1)->GetClosestFEdge(arg2,arg3); + result = (FEdge *)((ViewMap const *)arg1)->getClosestFEdge(arg2,arg3); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -49638,7 +49638,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_setFrontVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_setFrontSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; SVertex *arg2 = (SVertex *) 0 ; @@ -49649,20 +49649,20 @@ SWIGINTERN PyObject *_wrap_TVertex_setFrontVertex(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setFrontVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_setFrontSVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontVertex" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_setFrontSVertex" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SVertex, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontVertex" "', argument " "2"" of type '" "SVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_setFrontSVertex" "', argument " "2"" of type '" "SVertex *""'"); } arg2 = reinterpret_cast< SVertex * >(argp2); { try { - (arg1)->setFrontVertex(arg2); + (arg1)->setFrontSVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -50333,7 +50333,7 @@ fail: } -SWIGINTERN PyObject *_wrap_TVertex_GetSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +SWIGINTERN PyObject *_wrap_TVertex_getSVertex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; TVertex *arg1 = (TVertex *) 0 ; FEdge *arg2 = (FEdge *) 0 ; @@ -50345,20 +50345,20 @@ SWIGINTERN PyObject *_wrap_TVertex_GetSVertex(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_GetSVertex",&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTuple(args,(char *)"OO:TVertex_getSVertex",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_TVertex, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_GetSVertex" "', argument " "1"" of type '" "TVertex *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TVertex_getSVertex" "', argument " "1"" of type '" "TVertex *""'"); } arg1 = reinterpret_cast< TVertex * >(argp1); res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FEdge, 0 | 0 ); if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_GetSVertex" "', argument " "2"" of type '" "FEdge *""'"); + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TVertex_getSVertex" "', argument " "2"" of type '" "FEdge *""'"); } arg2 = reinterpret_cast< FEdge * >(argp2); { try { - result = (SVertex *)(arg1)->GetSVertex(arg2); + result = (SVertex *)(arg1)->getSVertex(arg2); } // catch (Swig::DirectorTypeMismatch&) { // cout << "Warning: return type mismatch" << endl; @@ -107608,8 +107608,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"ViewMap_userdata_get", _wrap_ViewMap_userdata_get, METH_VARARGS, NULL}, { (char *)"new_ViewMap", _wrap_new_ViewMap, METH_VARARGS, NULL}, { (char *)"delete_ViewMap", _wrap_delete_ViewMap, METH_VARARGS, NULL}, - { (char *)"ViewMap_GetClosestViewEdge", _wrap_ViewMap_GetClosestViewEdge, METH_VARARGS, NULL}, - { (char *)"ViewMap_GetClosestFEdge", _wrap_ViewMap_GetClosestFEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_getClosestViewEdge", _wrap_ViewMap_getClosestViewEdge, METH_VARARGS, NULL}, + { (char *)"ViewMap_getClosestFEdge", _wrap_ViewMap_getClosestFEdge, METH_VARARGS, NULL}, { (char *)"ViewMap_getInstance", _wrap_ViewMap_getInstance, METH_VARARGS, NULL}, { (char *)"ViewMap_ViewShapes", _wrap_ViewMap_ViewShapes, METH_VARARGS, NULL}, { (char *)"ViewMap_ViewEdges", _wrap_ViewMap_ViewEdges, METH_VARARGS, NULL}, @@ -107664,14 +107664,14 @@ static PyMethodDef SwigMethods[] = { { (char *)"TVertex_frontEdgeB", _wrap_TVertex_frontEdgeB, METH_VARARGS, NULL}, { (char *)"TVertex_backEdgeA", _wrap_TVertex_backEdgeA, METH_VARARGS, NULL}, { (char *)"TVertex_backEdgeB", _wrap_TVertex_backEdgeB, METH_VARARGS, NULL}, - { (char *)"TVertex_setFrontVertex", _wrap_TVertex_setFrontVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_setFrontSVertex", _wrap_TVertex_setFrontSVertex, METH_VARARGS, NULL}, { (char *)"TVertex_setBackSVertex", _wrap_TVertex_setBackSVertex, METH_VARARGS, NULL}, { (char *)"TVertex_setFrontEdgeA", _wrap_TVertex_setFrontEdgeA, METH_VARARGS, NULL}, { (char *)"TVertex_setFrontEdgeB", _wrap_TVertex_setFrontEdgeB, METH_VARARGS, NULL}, { (char *)"TVertex_setBackEdgeA", _wrap_TVertex_setBackEdgeA, METH_VARARGS, NULL}, { (char *)"TVertex_setBackEdgeB", _wrap_TVertex_setBackEdgeB, METH_VARARGS, NULL}, { (char *)"TVertex_setId", _wrap_TVertex_setId, METH_VARARGS, NULL}, - { (char *)"TVertex_GetSVertex", _wrap_TVertex_GetSVertex, METH_VARARGS, NULL}, + { (char *)"TVertex_getSVertex", _wrap_TVertex_getSVertex, METH_VARARGS, NULL}, { (char *)"TVertex_Replace", _wrap_TVertex_Replace, METH_VARARGS, NULL}, { (char *)"TVertex_mate", _wrap_TVertex_mate, METH_VARARGS, NULL}, { (char *)"TVertex_edges_end", _wrap_TVertex_edges_end, METH_VARARGS, NULL}, diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py index 079eb01eb31..9db78a050e0 100755 --- a/source/blender/freestyle/python/Freestyle.py +++ b/source/blender/freestyle/python/Freestyle.py @@ -1403,8 +1403,8 @@ class ViewMap(_object): except: self.this = this __swig_destroy__ = _Freestyle.delete_ViewMap __del__ = lambda self : None; - def GetClosestViewEdge(*args): return _Freestyle.ViewMap_GetClosestViewEdge(*args) - def GetClosestFEdge(*args): return _Freestyle.ViewMap_GetClosestFEdge(*args) + def getClosestViewEdge(*args): return _Freestyle.ViewMap_getClosestViewEdge(*args) + def getClosestFEdge(*args): return _Freestyle.ViewMap_getClosestFEdge(*args) __swig_getmethods__["getInstance"] = lambda x: _Freestyle.ViewMap_getInstance if _newclass:getInstance = staticmethod(_Freestyle.ViewMap_getInstance) def ViewShapes(*args): return _Freestyle.ViewMap_ViewShapes(*args) @@ -1487,14 +1487,14 @@ class TVertex(ViewVertex): def frontEdgeB(*args): return _Freestyle.TVertex_frontEdgeB(*args) def backEdgeA(*args): return _Freestyle.TVertex_backEdgeA(*args) def backEdgeB(*args): return _Freestyle.TVertex_backEdgeB(*args) - def setFrontVertex(*args): return _Freestyle.TVertex_setFrontVertex(*args) + def setFrontSVertex(*args): return _Freestyle.TVertex_setFrontSVertex(*args) def setBackSVertex(*args): return _Freestyle.TVertex_setBackSVertex(*args) def setFrontEdgeA(*args): return _Freestyle.TVertex_setFrontEdgeA(*args) def setFrontEdgeB(*args): return _Freestyle.TVertex_setFrontEdgeB(*args) def setBackEdgeA(*args): return _Freestyle.TVertex_setBackEdgeA(*args) def setBackEdgeB(*args): return _Freestyle.TVertex_setBackEdgeB(*args) def setId(*args): return _Freestyle.TVertex_setId(*args) - def GetSVertex(*args): return _Freestyle.TVertex_GetSVertex(*args) + def getSVertex(*args): return _Freestyle.TVertex_getSVertex(*args) def Replace(*args): return _Freestyle.TVertex_Replace(*args) def mate(*args): return _Freestyle.TVertex_mate(*args) def edges_end(*args): return _Freestyle.TVertex_edges_end(*args) From e4677c409dcad94e96b2ae765422f91e0b0dd9fd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Mon, 28 Jul 2008 22:53:42 +0000 Subject: [PATCH 418/430] soc-2008-mxcurioni: add all predicate subclasses( BinaryPredicate1D, UnaryPredicate{0D,1D} ). There is just one more class remaining to port (and probably the most important): Operators. After that, I'll be able to test whether Freestyle functions well without SWIG. --- .../intern/python/BPy_BinaryPredicate1D.cpp | 34 ++++- .../intern/python/BPy_EdgeModifier.cpp | 0 .../intern/python/BPy_UnaryPredicate0D.cpp | 21 ++- .../intern/python/BPy_UnaryPredicate1D.cpp | 55 ++++++++ .../BinaryPredicate1D/BPy_FalseBP1D.cpp | 117 ++++++++++++++-- .../python/BinaryPredicate1D/BPy_FalseBP1D.h | 29 ++++ .../BinaryPredicate1D/BPy_Length2DBP1D.cpp | 117 ++++++++++++++-- .../BinaryPredicate1D/BPy_Length2DBP1D.h | 29 ++++ .../BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp | 117 ++++++++++++++-- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.h | 29 ++++ .../python/BinaryPredicate1D/BPy_TrueBP1D.cpp | 117 ++++++++++++++-- .../python/BinaryPredicate1D/BPy_TrueBP1D.h | 29 ++++ .../BPy_ViewMapGradientNormBP1D.cpp | 129 ++++++++++++++++-- .../BPy_ViewMapGradientNormBP1D.h | 29 ++++ .../EdgeModifier/BPy_TimestampModifier.cpp | 0 .../python/UnaryPredicate0D/BPy_FalseUP0D.cpp | 113 +++++++++++++-- .../python/UnaryPredicate0D/BPy_FalseUP0D.h | 29 ++++ .../python/UnaryPredicate0D/BPy_TrueUP0D.cpp | 113 +++++++++++++-- .../python/UnaryPredicate0D/BPy_TrueUP0D.h | 29 ++++ .../UnaryPredicate1D/BPy_ContourUP1D.cpp | 117 ++++++++++++++-- .../python/UnaryPredicate1D/BPy_ContourUP1D.h | 29 ++++ .../BPy_DensityLowerThanUP1D.cpp | 122 +++++++++++++++-- .../BPy_DensityLowerThanUP1D.h | 29 ++++ .../BPy_EqualToChainingTimeStampUP1D.cpp | 120 ++++++++++++++-- .../BPy_EqualToChainingTimeStampUP1D.h | 29 ++++ .../BPy_EqualToTimeStampUP1D.cpp | 120 ++++++++++++++-- .../BPy_EqualToTimeStampUP1D.h | 29 ++++ .../BPy_ExternalContourUP1D.cpp | 117 ++++++++++++++-- .../BPy_ExternalContourUP1D.h | 29 ++++ .../python/UnaryPredicate1D/BPy_FalseUP1D.cpp | 113 +++++++++++++-- .../python/UnaryPredicate1D/BPy_FalseUP1D.h | 29 ++++ .../BPy_QuantitativeInvisibilityUP1D.cpp | 120 ++++++++++++++-- .../BPy_QuantitativeInvisibilityUP1D.h | 29 ++++ .../python/UnaryPredicate1D/BPy_ShapeUP1D.cpp | 120 ++++++++++++++-- .../python/UnaryPredicate1D/BPy_ShapeUP1D.h | 29 ++++ .../python/UnaryPredicate1D/BPy_TrueUP1D.cpp | 113 +++++++++++++-- .../python/UnaryPredicate1D/BPy_TrueUP1D.h | 29 ++++ 37 files changed, 2302 insertions(+), 157 deletions(-) delete mode 100644 source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h create mode 100644 source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h delete mode 100644 source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h create mode 100644 source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 9dd2bd19204..545807fc277 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -3,6 +3,12 @@ #include "BPy_Convert.h" #include "BPy_Interface1D.h" +#include "BinaryPredicate1D/BPy_FalseBP1D.h" +#include "BinaryPredicate1D/BPy_Length2DBP1D.h" +#include "BinaryPredicate1D/BPy_SameShapeIdBP1D.h" +#include "BinaryPredicate1D/BPy_TrueBP1D.h" +#include "BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h" + #ifdef __cplusplus extern "C" { #endif @@ -116,9 +122,35 @@ PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) if( PyType_Ready( &BinaryPredicate1D_Type ) < 0 ) return; - Py_INCREF( &BinaryPredicate1D_Type ); PyModule_AddObject(module, "BinaryPredicate1D", (PyObject *)&BinaryPredicate1D_Type); + + if( PyType_Ready( &FalseBP1D_Type ) < 0 ) + return; + Py_INCREF( &FalseBP1D_Type ); + PyModule_AddObject(module, "FalseBP1D", (PyObject *)&FalseBP1D_Type); + + if( PyType_Ready( &Length2DBP1D_Type ) < 0 ) + return; + Py_INCREF( &Length2DBP1D_Type ); + PyModule_AddObject(module, "Length2DBP1D", (PyObject *)&Length2DBP1D_Type); + + if( PyType_Ready( &SameShapeIdBP1D_Type ) < 0 ) + return; + Py_INCREF( &SameShapeIdBP1D_Type ); + PyModule_AddObject(module, "SameShapeIdBP1D", (PyObject *)&SameShapeIdBP1D_Type); + + if( PyType_Ready( &TrueBP1D_Type ) < 0 ) + return; + Py_INCREF( &TrueBP1D_Type ); + PyModule_AddObject(module, "TrueBP1D", (PyObject *)&TrueBP1D_Type); + + if( PyType_Ready( &ViewMapGradientNormBP1D_Type ) < 0 ) + return; + Py_INCREF( &ViewMapGradientNormBP1D_Type ); + PyModule_AddObject(module, "ViewMapGradientNormBP1D", (PyObject *)&ViewMapGradientNormBP1D_Type); + + } diff --git a/source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp b/source/blender/freestyle/intern/python/BPy_EdgeModifier.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 3e5168e7da1..4fef63eae9b 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -2,6 +2,8 @@ #include "BPy_Convert.h" #include "Iterator/BPy_Interface0DIterator.h" +#include "UnaryPredicate0D/BPy_FalseUP0D.h" +#include "UnaryPredicate0D/BPy_TrueUP0D.h" #ifdef __cplusplus extern "C" { @@ -14,13 +16,13 @@ static int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, static void UnaryPredicate0D___dealloc__(BPy_UnaryPredicate0D *self); static PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D *self); -static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args); +static PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self ); static PyObject * UnaryPredicate0D___call__( BPy_UnaryPredicate0D *self, PyObject *args); /*----------------------UnaryPredicate0D instance definitions ----------------------------*/ static PyMethodDef BPy_UnaryPredicate0D_methods[] = { - {"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, ""}, - {"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "" }, + {"getName", ( PyCFunction ) UnaryPredicate0D_getName, METH_NOARGS, "Returns the string of the name of the UnaryPredicate0D."}, + {"__call__", ( PyCFunction ) UnaryPredicate0D___call__, METH_VARARGS, "The () operator. Must be overload by inherited classes." }, {NULL, NULL, 0, NULL} }; @@ -119,6 +121,17 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) return; Py_INCREF( &UnaryPredicate0D_Type ); PyModule_AddObject(module, "UnaryPredicate0D", (PyObject *)&UnaryPredicate0D_Type); + + if( PyType_Ready( &FalseUP0D_Type ) < 0 ) + return; + Py_INCREF( &FalseUP0D_Type ); + PyModule_AddObject(module, "FalseUP0D", (PyObject *)&FalseUP0D_Type); + + if( PyType_Ready( &TrueUP0D_Type ) < 0 ) + return; + Py_INCREF( &TrueUP0D_Type ); + PyModule_AddObject(module, "TrueUP0D", (PyObject *)&TrueUP0D_Type); + } //------------------------INSTANCE METHODS ---------------------------------- @@ -142,7 +155,7 @@ PyObject * UnaryPredicate0D___repr__(BPy_UnaryPredicate0D* self) } -PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self, PyObject *args) +PyObject * UnaryPredicate0D_getName( BPy_UnaryPredicate0D *self ) { return PyString_FromString( self->up0D->getName().c_str() ); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 54731d75d7b..a13de77bbe9 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -3,6 +3,16 @@ #include "BPy_Convert.h" #include "BPy_Interface1D.h" +#include "UnaryPredicate1D/BPy_ContourUP1D.h" +#include "UnaryPredicate1D/BPy_DensityLowerThanUP1D.h" +#include "UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h" +#include "UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h" +#include "UnaryPredicate1D/BPy_ExternalContourUP1D.h" +#include "UnaryPredicate1D/BPy_FalseUP1D.h" +#include "UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h" +#include "UnaryPredicate1D/BPy_ShapeUP1D.h" +#include "UnaryPredicate1D/BPy_TrueUP1D.h" + #ifdef __cplusplus extern "C" { #endif @@ -119,6 +129,51 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) return; Py_INCREF( &UnaryPredicate1D_Type ); PyModule_AddObject(module, "UnaryPredicate1D", (PyObject *)&UnaryPredicate1D_Type); + + if( PyType_Ready( &ContourUP1D_Type ) < 0 ) + return; + Py_INCREF( &ContourUP1D_Type ); + PyModule_AddObject(module, "ContourUP1D", (PyObject *)&ContourUP1D_Type); + + if( PyType_Ready( &DensityLowerThanUP1D_Type ) < 0 ) + return; + Py_INCREF( &DensityLowerThanUP1D_Type ); + PyModule_AddObject(module, "DensityLowerThanUP1D", (PyObject *)&DensityLowerThanUP1D_Type); + + if( PyType_Ready( &EqualToChainingTimeStampUP1D_Type ) < 0 ) + return; + Py_INCREF( &EqualToChainingTimeStampUP1D_Type ); + PyModule_AddObject(module, "EqualToChainingTimeStampUP1D", (PyObject *)&EqualToChainingTimeStampUP1D_Type); + + if( PyType_Ready( &EqualToTimeStampUP1D_Type ) < 0 ) + return; + Py_INCREF( &EqualToTimeStampUP1D_Type ); + PyModule_AddObject(module, "EqualToTimeStampUP1D", (PyObject *)&EqualToTimeStampUP1D_Type); + + if( PyType_Ready( &ExternalContourUP1D_Type ) < 0 ) + return; + Py_INCREF( &ExternalContourUP1D_Type ); + PyModule_AddObject(module, "ExternalContourUP1D", (PyObject *)&ExternalContourUP1D_Type); + + if( PyType_Ready( &FalseUP1D_Type ) < 0 ) + return; + Py_INCREF( &FalseUP1D_Type ); + PyModule_AddObject(module, "FalseUP1D", (PyObject *)&FalseUP1D_Type); + + if( PyType_Ready( &QuantitativeInvisibilityUP1D_Type ) < 0 ) + return; + Py_INCREF( &QuantitativeInvisibilityUP1D_Type ); + PyModule_AddObject(module, "QuantitativeInvisibilityUP1D", (PyObject *)&QuantitativeInvisibilityUP1D_Type); + + if( PyType_Ready( &ShapeUP1D_Type ) < 0 ) + return; + Py_INCREF( &ShapeUP1D_Type ); + PyModule_AddObject(module, "ShapeUP1D", (PyObject *)&ShapeUP1D_Type); + + if( PyType_Ready( &TrueUP1D_Type ) < 0 ) + return; + Py_INCREF( &TrueUP1D_Type ); + PyModule_AddObject(module, "TrueUP1D", (PyObject *)&TrueUP1D_Type); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp index 1f1a1ec840b..dc127051da7 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_FalseBP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_FalseBP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FalseBP1D instance -----------*/ + static int FalseBP1D___init__(BPy_FalseBP1D* self); + +/*-----------------------BPy_FalseBP1D type definition ------------------------------*/ + +PyTypeObject FalseBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseBP1D", /* tp_name */ + sizeof( BPy_FalseBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseBP1D___init__( BPy_FalseBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::FalseBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_FalseBP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_FalseBP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_FalseBP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h new file mode 100644 index 00000000000..7e090fc92d3 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEBP1D_H +#define FREESTYLE_PYTHON_FALSEBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseBP1D_Type; + +#define BPy_FalseBP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseBP1D_Type) + +/*---------------------------Python BPy_FalseBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_FalseBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp index 402e59c3f29..4c1e62dc4c1 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_Length2DBP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_Length2DBP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Length2DBP1D instance -----------*/ + static int Length2DBP1D___init__(BPy_Length2DBP1D* self); + +/*-----------------------BPy_Length2DBP1D type definition ------------------------------*/ + +PyTypeObject Length2DBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Length2DBP1D", /* tp_name */ + sizeof( BPy_Length2DBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Length2DBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int Length2DBP1D___init__( BPy_Length2DBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::Length2DBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_Length2DBP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_Length2DBP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_Length2DBP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h new file mode 100644 index 00000000000..e499067d05e --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_LENGTH2DBP1D_H +#define FREESTYLE_PYTHON_LENGTH2DBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Length2DBP1D_Type; + +#define BPy_Length2DBP1D_Check(v) (( (PyObject *) v)->ob_type == &Length2DBP1D_Type) + +/*---------------------------Python BPy_Length2DBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_Length2DBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_LENGTH2DBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp index d980750bb33..82d047eba22 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_SameShapeIdBP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_SameShapeIdBP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for SameShapeIdBP1D instance -----------*/ + static int SameShapeIdBP1D___init__(BPy_SameShapeIdBP1D* self); + +/*-----------------------BPy_SameShapeIdBP1D type definition ------------------------------*/ + +PyTypeObject SameShapeIdBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "SameShapeIdBP1D", /* tp_name */ + sizeof( BPy_SameShapeIdBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)SameShapeIdBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int SameShapeIdBP1D___init__( BPy_SameShapeIdBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::SameShapeIdBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_SameShapeIdBP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_SameShapeIdBP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_SameShapeIdBP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h new file mode 100644 index 00000000000..31e47040bcb --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H +#define FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject SameShapeIdBP1D_Type; + +#define BPy_SameShapeIdBP1D_Check(v) (( (PyObject *) v)->ob_type == &SameShapeIdBP1D_Type) + +/*---------------------------Python BPy_SameShapeIdBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_SameShapeIdBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SAMESHAPEIDBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp index 2afd2e163ea..02bbc20e66c 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_TrueBP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_TrueBP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TrueBP1D instance -----------*/ + static int TrueBP1D___init__(BPy_TrueBP1D* self); + +/*-----------------------BPy_TrueBP1D type definition ------------------------------*/ + +PyTypeObject TrueBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueBP1D", /* tp_name */ + sizeof( BPy_TrueBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueBP1D___init__( BPy_TrueBP1D* self ) +{ + self->py_bp1D.bp1D = new Predicates1D::TrueBP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_TrueBP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_TrueBP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_TrueBP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h new file mode 100644 index 00000000000..a975fe0b662 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEBP1D_H +#define FREESTYLE_PYTHON_TRUEBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueBP1D_Type; + +#define BPy_TrueBP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueBP1D_Type) + +/*---------------------------Python BPy_TrueBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_TrueBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEBP1D_H */ diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp index 873acd93149..c565daed2e2 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.cpp @@ -1,12 +1,125 @@ - PyObject *_wrap_ViewMapGradientNormBP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_ViewMapGradientNormBP1D.h" + +#include "../BPy_Convert.h" +#include "../BPy_IntegrationType.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ViewMapGradientNormBP1D instance -----------*/ + static int ViewMapGradientNormBP1D___init__(BPy_ViewMapGradientNormBP1D* self, PyObject *args ); + +/*-----------------------BPy_ViewMapGradientNormBP1D type definition ------------------------------*/ + +PyTypeObject ViewMapGradientNormBP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ViewMapGradientNormBP1D", /* tp_name */ + sizeof( BPy_ViewMapGradientNormBP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &BinaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ViewMapGradientNormBP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +//ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0) + + +int ViewMapGradientNormBP1D___init__( BPy_ViewMapGradientNormBP1D* self, PyObject *args ) +{ + int i; + PyObject *obj; + float f = 2.0; + + if(!( PyArg_ParseTuple(args, "i|Of", &i, &obj) )) { + cout << "ERROR: ViewMapGradientNormBP1D___init__" << endl; + return -1; + } + + IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + self->py_bp1D.bp1D = new Predicates1D::ViewMapGradientNormBP1D(i,t,f); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ViewMapGradientNormBP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ViewMapGradientNormBP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h new file mode 100644 index 00000000000..16fe71dee07 --- /dev/null +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H +#define FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H + +#include "../BPy_BinaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ViewMapGradientNormBP1D_Type; + +#define BPy_ViewMapGradientNormBP1D_Check(v) (( (PyObject *) v)->ob_type == &ViewMapGradientNormBP1D_Type) + +/*---------------------------Python BPy_ViewMapGradientNormBP1D structure definition----------*/ +typedef struct { + BPy_BinaryPredicate1D py_bp1D; +} BPy_ViewMapGradientNormBP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_VIEWMAPGRADIENTNORMBP1D_H */ diff --git a/source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp b/source/blender/freestyle/intern/python/EdgeModifier/BPy_TimestampModifier.cpp deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp index 53930660f3f..f4d48d4d36d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_FalseUP0D_getName(PyObject *self , PyObject *args) { +#include "BPy_FalseUP0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FalseUP0D instance -----------*/ + static int FalseUP0D___init__(BPy_FalseUP0D* self); + +/*-----------------------BPy_FalseUP0D type definition ------------------------------*/ + +PyTypeObject FalseUP0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseUP0D", /* tp_name */ + sizeof( BPy_FalseUP0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseUP0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseUP0D___init__( BPy_FalseUP0D* self ) +{ + self->py_up0D.up0D = new Predicates0D::FalseUP0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_FalseUP0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_FalseUP0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h new file mode 100644 index 00000000000..1cc043791c3 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEUP0D_H +#define FREESTYLE_PYTHON_FALSEUP0D_H + +#include "../BPy_UnaryPredicate0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseUP0D_Type; + +#define BPy_FalseUP0D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP0D_Type) + +/*---------------------------Python BPy_FalseUP0D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate0D py_up0D; +} BPy_FalseUP0D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEUP0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp index 776e49b5d77..d0946157987 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_TrueUP0D_getName(PyObject *self , PyObject *args) { +#include "BPy_TrueUP0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TrueUP0D instance -----------*/ + static int TrueUP0D___init__(BPy_TrueUP0D* self); + +/*-----------------------BPy_TrueUP0D type definition ------------------------------*/ + +PyTypeObject TrueUP0D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueUP0D", /* tp_name */ + sizeof( BPy_TrueUP0D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate0D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueUP0D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueUP0D___init__( BPy_TrueUP0D* self ) +{ + self->py_up0D.up0D = new Predicates0D::TrueUP0D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_TrueUP0D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_TrueUP0D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h new file mode 100644 index 00000000000..a05bff86a90 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEUP0D_H +#define FREESTYLE_PYTHON_TRUEUP0D_H + +#include "../BPy_UnaryPredicate0D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueUP0D_Type; + +#define BPy_TrueUP0D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP0D_Type) + +/*---------------------------Python BPy_TrueUP0D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate0D py_up0D; +} BPy_TrueUP0D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEUP0D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp index 89ba9f3f683..347cf2f56ee 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_ContourUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_ContourUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ContourUP1D instance -----------*/ + static int ContourUP1D___init__(BPy_ContourUP1D* self); + +/*-----------------------BPy_ContourUP1D type definition ------------------------------*/ + +PyTypeObject ContourUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ContourUP1D", /* tp_name */ + sizeof( BPy_ContourUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ContourUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ContourUP1D___init__( BPy_ContourUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::ContourUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ContourUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_ContourUP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ContourUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h new file mode 100644 index 00000000000..30d71a0cd2c --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_CONTOURUP1D_H +#define FREESTYLE_PYTHON_CONTOURUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ContourUP1D_Type; + +#define BPy_ContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ContourUP1D_Type) + +/*---------------------------Python BPy_ContourUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ContourUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_CONTOURUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp index 664d73d59c1..04ee0903acd 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.cpp @@ -1,12 +1,118 @@ - PyObject *_wrap_DensityLowerThanUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_DensityLowerThanUP1D.h" + +#include "../../stroke/AdvancedPredicates1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for DensityLowerThanUP1D instance -----------*/ + static int DensityLowerThanUP1D___init__(BPy_DensityLowerThanUP1D* self, PyObject *args); + +/*-----------------------BPy_DensityLowerThanUP1D type definition ------------------------------*/ + +PyTypeObject DensityLowerThanUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "DensityLowerThanUP1D", /* tp_name */ + sizeof( BPy_DensityLowerThanUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)DensityLowerThanUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int DensityLowerThanUP1D___init__( BPy_DensityLowerThanUP1D* self, PyObject *args ) +{ + double d1, d2 = 2.0; + + if( !PyArg_ParseTuple(args, "d|d", &d1, &d2) ) { + cout << "ERROR: DensityLowerThanUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::DensityLowerThanUP1D(d1,d2); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_DensityLowerThanUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_DensityLowerThanUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h new file mode 100644 index 00000000000..a6e6fdcd81f --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H +#define FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject DensityLowerThanUP1D_Type; + +#define BPy_DensityLowerThanUP1D_Check(v) (( (PyObject *) v)->ob_type == &DensityLowerThanUP1D_Type) + +/*---------------------------Python BPy_DensityLowerThanUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_DensityLowerThanUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_DENSITYLOWERTHANUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp index 7cd9c17a99b..84ce5d39fab 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_EqualToChainingTimeStampUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_EqualToChainingTimeStampUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for EqualToChainingTimeStampUP1D instance -----------*/ + static int EqualToChainingTimeStampUP1D___init__(BPy_EqualToChainingTimeStampUP1D* self, PyObject *args ); + +/*-----------------------BPy_EqualToChainingTimeStampUP1D type definition ------------------------------*/ + +PyTypeObject EqualToChainingTimeStampUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "EqualToChainingTimeStampUP1D", /* tp_name */ + sizeof( BPy_EqualToChainingTimeStampUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)EqualToChainingTimeStampUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int EqualToChainingTimeStampUP1D___init__( BPy_EqualToChainingTimeStampUP1D* self, PyObject *args ) +{ + unsigned u; + + if( !PyArg_ParseTuple(args, "I", &u) ) { + cout << "ERROR: EqualToChainingTimeStampUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::EqualToChainingTimeStampUP1D(u); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_EqualToChainingTimeStampUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_EqualToChainingTimeStampUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h new file mode 100644 index 00000000000..fa8d67d0ec6 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H +#define FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject EqualToChainingTimeStampUP1D_Type; + +#define BPy_EqualToChainingTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToChainingTimeStampUP1D_Type) + +/*---------------------------Python BPy_EqualToChainingTimeStampUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_EqualToChainingTimeStampUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EQUALTOCHAININGTIMESTAMPUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp index d6925dd2b44..2d248257893 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_EqualToTimeStampUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_EqualToTimeStampUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for EqualToTimeStampUP1D instance -----------*/ + static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D* self, PyObject *args ); + +/*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/ + +PyTypeObject EqualToTimeStampUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "EqualToTimeStampUP1D", /* tp_name */ + sizeof( BPy_EqualToTimeStampUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)EqualToTimeStampUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int EqualToTimeStampUP1D___init__( BPy_EqualToTimeStampUP1D* self, PyObject *args ) +{ + unsigned u; + + if( !PyArg_ParseTuple(args, "I", &u) ) { + cout << "ERROR: EqualToTimeStampUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::EqualToTimeStampUP1D(u); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_EqualToTimeStampUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_EqualToTimeStampUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h new file mode 100644 index 00000000000..6de9927d7ad --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H +#define FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject EqualToTimeStampUP1D_Type; + +#define BPy_EqualToTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToTimeStampUP1D_Type) + +/*---------------------------Python BPy_EqualToTimeStampUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_EqualToTimeStampUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EQUALTOTIMESTAMPUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp index 9107f0fe326..e3708d43a2c 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.cpp @@ -1,16 +1,109 @@ - PyObject *_wrap_ExternalContourUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_ExternalContourUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ExternalContourUP1D instance -----------*/ + static int ExternalContourUP1D___init__(BPy_ExternalContourUP1D* self); + +/*-----------------------BPy_ExternalContourUP1D type definition ------------------------------*/ + +PyTypeObject ExternalContourUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ExternalContourUP1D", /* tp_name */ + sizeof( BPy_ExternalContourUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ExternalContourUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ExternalContourUP1D___init__( BPy_ExternalContourUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::ExternalContourUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ExternalContourUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_new_ExternalContourUP1D(PyObject *self , PyObject *args) { -} - - - PyObject *_wrap_delete_ExternalContourUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h new file mode 100644 index 00000000000..0d35f05bc7b --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H +#define FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ExternalContourUP1D_Type; + +#define BPy_ExternalContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ExternalContourUP1D_Type) + +/*---------------------------Python BPy_ExternalContourUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ExternalContourUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_EXTERNALCONTOURUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp index 6164463a3af..4ad54138002 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_FalseUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_FalseUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for FalseUP1D instance -----------*/ + static int FalseUP1D___init__(BPy_FalseUP1D* self); + +/*-----------------------BPy_FalseUP1D type definition ------------------------------*/ + +PyTypeObject FalseUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "FalseUP1D", /* tp_name */ + sizeof( BPy_FalseUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)FalseUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int FalseUP1D___init__( BPy_FalseUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::FalseUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_FalseUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_FalseUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h new file mode 100644 index 00000000000..c406a926526 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_FALSEUP1D_H +#define FREESTYLE_PYTHON_FALSEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FalseUP1D_Type; + +#define BPy_FalseUP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP1D_Type) + +/*---------------------------Python BPy_FalseUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_FalseUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_FALSEUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp index fc538008446..000760b5b00 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_QuantitativeInvisibilityUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_QuantitativeInvisibilityUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for QuantitativeInvisibilityUP1D instance -----------*/ + static int QuantitativeInvisibilityUP1D___init__(BPy_QuantitativeInvisibilityUP1D* self, PyObject *args ); + +/*-----------------------BPy_QuantitativeInvisibilityUP1D type definition ------------------------------*/ + +PyTypeObject QuantitativeInvisibilityUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "QuantitativeInvisibilityUP1D", /* tp_name */ + sizeof( BPy_QuantitativeInvisibilityUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)QuantitativeInvisibilityUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int QuantitativeInvisibilityUP1D___init__( BPy_QuantitativeInvisibilityUP1D* self, PyObject *args ) +{ + int i = 0; + + if( !PyArg_ParseTuple(args, "|i", &i) ) { + cout << "ERROR: QuantitativeInvisibilityUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::QuantitativeInvisibilityUP1D(i); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_QuantitativeInvisibilityUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_QuantitativeInvisibilityUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h new file mode 100644 index 00000000000..676bfc00715 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H +#define FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject QuantitativeInvisibilityUP1D_Type; + +#define BPy_QuantitativeInvisibilityUP1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityUP1D_Type) + +/*---------------------------Python BPy_QuantitativeInvisibilityUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_QuantitativeInvisibilityUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_QUANTITATIVEINVISIBILITYUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp index 4ec5cc13b3a..9e5312275bf 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp @@ -1,12 +1,116 @@ - PyObject *_wrap_ShapeUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_ShapeUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for ShapeUP1D instance -----------*/ + static int ShapeUP1D___init__(BPy_ShapeUP1D* self, PyObject *args ); + +/*-----------------------BPy_ShapeUP1D type definition ------------------------------*/ + +PyTypeObject ShapeUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "ShapeUP1D", /* tp_name */ + sizeof( BPy_ShapeUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)ShapeUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int ShapeUP1D___init__( BPy_ShapeUP1D* self, PyObject *args ) +{ + unsigned u1, u2 = 0; + + if( !PyArg_ParseTuple(args, "II", &u1, &u2) ) { + cout << "ERROR: ShapeUP1D___init__" << endl; + return -1; + } + + self->py_up1D.up1D = new Predicates1D::ShapeUP1D(u1,u2); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_ShapeUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_ShapeUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h new file mode 100644 index 00000000000..0da88d959bc --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_SHAPEUP1D_H +#define FREESTYLE_PYTHON_SHAPEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject ShapeUP1D_Type; + +#define BPy_ShapeUP1D_Check(v) (( (PyObject *) v)->ob_type == &ShapeUP1D_Type) + +/*---------------------------Python BPy_ShapeUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_ShapeUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_SHAPEUP1D_H */ diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp index 7c8e0a6239d..a496a85f756 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.cpp @@ -1,12 +1,109 @@ - PyObject *_wrap_TrueUP1D_getName(PyObject *self , PyObject *args) { +#include "BPy_TrueUP1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for TrueUP1D instance -----------*/ + static int TrueUP1D___init__(BPy_TrueUP1D* self); + +/*-----------------------BPy_TrueUP1D type definition ------------------------------*/ + +PyTypeObject TrueUP1D_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "TrueUP1D", /* tp_name */ + sizeof( BPy_TrueUP1D ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + NULL, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + NULL, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + &UnaryPredicate1D_Type, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)TrueUP1D___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + NULL, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//------------------------INSTANCE METHODS ---------------------------------- + +int TrueUP1D___init__( BPy_TrueUP1D* self ) +{ + self->py_up1D.up1D = new Predicates1D::TrueUP1D(); + return 0; } +/////////////////////////////////////////////////////////////////////////////////////////// - PyObject *_wrap_TrueUP1D___call__(PyObject *self , PyObject *args) { +#ifdef __cplusplus } - - - PyObject *_wrap_delete_TrueUP1D(PyObject *self , PyObject *args) { -} - - +#endif diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h new file mode 100644 index 00000000000..b30b7232076 --- /dev/null +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h @@ -0,0 +1,29 @@ +#ifndef FREESTYLE_PYTHON_TRUEUP1D_H +#define FREESTYLE_PYTHON_TRUEUP1D_H + +#include "../BPy_UnaryPredicate1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject TrueUP1D_Type; + +#define BPy_TrueUP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP1D_Type) + +/*---------------------------Python BPy_TrueUP1D structure definition----------*/ +typedef struct { + BPy_UnaryPredicate1D py_up1D; +} BPy_TrueUP1D; + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_TRUEUP1D_H */ From db6388e0f2b1e03ff280615fb96b93c565c9b22a Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 29 Jul 2008 05:45:16 +0000 Subject: [PATCH 419/430] soc-2008-mxcurioni: finished porting the Freestyle API. All of the original classes, except EdgeModifier and TimestampModifier (which aren't even ported via SWIG), are available under the Blender.Freestyle module. Testing of the porting will now begin to make sure the SWIG-less system works as the original. Quite a few modifications were made to finish the API: - Freestyle's SConscript was modified to catch all files within the intern/python directory, allowing integration of future shaders implemented in C++. - the Operators class was ported, with a special care of making its methods static (using the METH_STATIC flag in the tp_methods method definitions) - all of the type-checking functions [ BPy_[class name]_Check(obj) ] were changed to allow subclasses to be seen as that type too: instead on looking at the ob_type value, the PyObject_IsInstance function is used. - all of the iterators can now retrieve the object pointed to by the operator, using the getObject() method. A directedViewEdge pair is returned as a list of the two elements in the pair. - all of the style modules were copied to a style_modules_blender/ folder and were modified to use Freestyle as a Blender's submodule. IntegrationType and MediumType was also integrated (for example, changing MEAN to IntegrationType.MEAN). Testing now begins. If everything works correctly, I'll move on to lib3ds removal right away. --- source/blender/freestyle/SConscript | 145 +- .../freestyle/intern/python/BPy_BBox.h | 2 +- .../intern/python/BPy_BinaryPredicate0D.h | 2 +- .../intern/python/BPy_BinaryPredicate1D.h | 2 +- .../freestyle/intern/python/BPy_Convert.cpp | 134 +- .../freestyle/intern/python/BPy_Convert.h | 30 +- .../freestyle/intern/python/BPy_Freestyle.cpp | 2 + .../freestyle/intern/python/BPy_Freestyle.h | 2 +- .../freestyle/intern/python/BPy_FrsMaterial.h | 2 +- .../blender/freestyle/intern/python/BPy_Id.h | 2 +- .../intern/python/BPy_IntegrationType.h | 2 +- .../freestyle/intern/python/BPy_Interface0D.h | 2 +- .../freestyle/intern/python/BPy_Interface1D.h | 2 +- .../freestyle/intern/python/BPy_Iterator.cpp | 6 + .../freestyle/intern/python/BPy_Iterator.h | 2 +- .../freestyle/intern/python/BPy_MediumType.h | 2 +- .../freestyle/intern/python/BPy_Nature.h | 2 +- .../freestyle/intern/python/BPy_Noise.h | 2 +- .../freestyle/intern/python/BPy_Operators.cpp | 299 +++- .../freestyle/intern/python/BPy_Operators.h | 34 + .../freestyle/intern/python/BPy_SShape.h | 2 +- .../intern/python/BPy_StrokeAttribute.h | 2 +- .../intern/python/BPy_StrokeShader.h | 2 +- .../intern/python/BPy_UnaryFunction0D.h | 2 +- .../intern/python/BPy_UnaryFunction1D.h | 2 +- .../intern/python/BPy_UnaryPredicate0D.h | 2 +- .../intern/python/BPy_UnaryPredicate1D.h | 2 +- .../freestyle/intern/python/BPy_ViewMap.h | 2 +- .../freestyle/intern/python/BPy_ViewShape.h | 2 +- .../python/BinaryPredicate1D/BPy_FalseBP1D.h | 2 +- .../BinaryPredicate1D/BPy_Length2DBP1D.h | 2 +- .../BinaryPredicate1D/BPy_SameShapeIdBP1D.h | 2 +- .../python/BinaryPredicate1D/BPy_TrueBP1D.h | 2 +- .../BPy_ViewMapGradientNormBP1D.h | 2 +- .../python/Interface0D/BPy_CurvePoint.h | 2 +- .../intern/python/Interface0D/BPy_SVertex.h | 2 +- .../python/Interface0D/BPy_ViewVertex.h | 2 +- .../Interface0D/CurvePoint/BPy_StrokeVertex.h | 2 +- .../Interface0D/ViewVertex/BPy_NonTVertex.h | 2 +- .../Interface0D/ViewVertex/BPy_TVertex.h | 2 +- .../intern/python/Interface1D/BPy_Curve.h | 2 +- .../intern/python/Interface1D/BPy_FEdge.h | 2 +- .../intern/python/Interface1D/BPy_ViewEdge.h | 2 +- .../python/Interface1D/Curve/BPy_Chain.h | 2 +- .../python/Interface1D/FEdge/BPy_FEdgeSharp.h | 2 +- .../Interface1D/FEdge/BPy_FEdgeSmooth.h | 2 +- .../python/Iterator/BPy_AdjacencyIterator.cpp | 13 + .../python/Iterator/BPy_AdjacencyIterator.h | 2 +- .../Iterator/BPy_ChainPredicateIterator.h | 2 +- .../Iterator/BPy_ChainSilhouetteIterator.h | 2 +- .../python/Iterator/BPy_ChainingIterator.cpp | 10 + .../python/Iterator/BPy_ChainingIterator.h | 2 +- .../Iterator/BPy_CurvePointIterator.cpp | 7 + .../python/Iterator/BPy_CurvePointIterator.h | 2 +- .../Iterator/BPy_Interface0DIterator.cpp | 10 + .../python/Iterator/BPy_Interface0DIterator.h | 2 +- .../python/Iterator/BPy_SVertexIterator.cpp | 9 + .../python/Iterator/BPy_SVertexIterator.h | 2 +- .../Iterator/BPy_StrokeVertexIterator.cpp | 9 + .../Iterator/BPy_StrokeVertexIterator.h | 2 +- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 12 + .../python/Iterator/BPy_ViewEdgeIterator.h | 2 +- .../Iterator/BPy_orientedViewEdgeIterator.cpp | 13 +- .../Iterator/BPy_orientedViewEdgeIterator.h | 2 +- .../BPy_BackboneStretcherShader.h | 2 +- .../StrokeShader/BPy_BezierCurveShader.h | 2 +- .../StrokeShader/BPy_CalligraphicShader.h | 2 +- .../StrokeShader/BPy_ColorNoiseShader.h | 2 +- .../BPy_ColorVariationPatternShader.h | 2 +- .../StrokeShader/BPy_ConstantColorShader.h | 2 +- .../BPy_ConstantThicknessShader.h | 2 +- ...BPy_ConstrainedIncreasingThicknessShader.h | 2 +- .../StrokeShader/BPy_GuidingLinesShader.h | 2 +- .../StrokeShader/BPy_IncreasingColorShader.h | 2 +- .../BPy_IncreasingThicknessShader.h | 2 +- .../StrokeShader/BPy_PolygonalizationShader.h | 2 +- .../python/StrokeShader/BPy_SamplingShader.h | 2 +- .../StrokeShader/BPy_SpatialNoiseShader.h | 2 +- .../StrokeShader/BPy_StrokeTextureShader.h | 2 +- .../StrokeShader/BPy_TextureAssignerShader.h | 2 +- .../StrokeShader/BPy_ThicknessNoiseShader.h | 2 +- .../BPy_ThicknessVariationPatternShader.h | 2 +- .../StrokeShader/BPy_TipRemoverShader.h | 2 +- .../python/StrokeShader/BPy_fstreamShader.h | 2 +- .../python/StrokeShader/BPy_streamShader.h | 2 +- .../BPy_UnaryFunction0DDouble.h | 2 +- .../BPy_UnaryFunction0DEdgeNature.h | 2 +- .../BPy_UnaryFunction0DFloat.h | 2 +- .../UnaryFunction0D/BPy_UnaryFunction0DId.h | 2 +- .../BPy_UnaryFunction0DMaterial.h | 2 +- .../BPy_UnaryFunction0DUnsigned.h | 2 +- .../BPy_UnaryFunction0DVec2f.h | 2 +- .../BPy_UnaryFunction0DVec3f.h | 2 +- .../BPy_UnaryFunction0DVectorViewShape.h | 2 +- .../BPy_UnaryFunction0DViewShape.h | 2 +- .../UnaryFunction0D_Id/BPy_ShapeIdF0D.h | 2 +- .../BPy_MaterialF0D.h | 2 +- .../BPy_CurveNatureF0D.h | 2 +- .../UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h | 2 +- .../BPy_VertexOrientation2DF0D.h | 2 +- .../BPy_VertexOrientation3DF0D.h | 2 +- .../BPy_GetOccludeeF0D.h | 2 +- .../BPy_GetShapeF0D.h | 2 +- .../BPy_Curvature2DAngleF0D.h | 2 +- .../UnaryFunction0D_double/BPy_DensityF0D.h | 2 +- .../BPy_GetProjectedXF0D.h | 2 +- .../BPy_GetProjectedYF0D.h | 2 +- .../BPy_GetProjectedZF0D.h | 2 +- .../UnaryFunction0D_double/BPy_GetXF0D.h | 2 +- .../UnaryFunction0D_double/BPy_GetYF0D.h | 2 +- .../UnaryFunction0D_double/BPy_GetZF0D.h | 2 +- .../BPy_LocalAverageDepthF0D.h | 2 +- .../BPy_ZDiscontinuityF0D.h | 2 +- .../BPy_GetCurvilinearAbscissaF0D.h | 2 +- .../BPy_GetParameterF0D.h | 2 +- .../BPy_GetViewMapGradientNormF0D.h | 2 +- .../BPy_ReadCompleteViewMapPixelF0D.h | 2 +- .../BPy_ReadMapPixelF0D.h | 2 +- .../BPy_ReadSteerableViewMapPixelF0D.h | 2 +- .../BPy_QuantitativeInvisibilityF0D.h | 2 +- .../BPy_GetOccludersF0D.h | 2 +- .../BPy_UnaryFunction1DDouble.h | 2 +- .../BPy_UnaryFunction1DEdgeNature.h | 2 +- .../BPy_UnaryFunction1DFloat.h | 2 +- .../BPy_UnaryFunction1DUnsigned.h | 2 +- .../BPy_UnaryFunction1DVec2f.h | 2 +- .../BPy_UnaryFunction1DVec3f.h | 2 +- .../BPy_UnaryFunction1DVectorViewShape.h | 2 +- .../UnaryFunction1D/BPy_UnaryFunction1DVoid.h | 2 +- .../BPy_CurveNatureF1D.h | 2 +- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h | 2 +- .../BPy_Orientation2DF1D.h | 2 +- .../BPy_Orientation3DF1D.h | 2 +- .../BPy_Curvature2DAngleF1D.h | 2 +- .../UnaryFunction1D_double/BPy_DensityF1D.h | 2 +- .../BPy_GetCompleteViewMapDensityF1D.h | 2 +- .../BPy_GetDirectionalViewMapDensityF1D.h | 2 +- .../BPy_GetProjectedXF1D.h | 2 +- .../BPy_GetProjectedYF1D.h | 2 +- .../BPy_GetProjectedZF1D.h | 2 +- .../BPy_GetSteerableViewMapDensityF1D.h | 3 +- .../BPy_GetViewMapGradientNormF1D.h | 2 +- .../UnaryFunction1D_double/BPy_GetXF1D.h | 2 +- .../UnaryFunction1D_double/BPy_GetYF1D.h | 2 +- .../UnaryFunction1D_double/BPy_GetZF1D.h | 2 +- .../BPy_LocalAverageDepthF1D.h | 2 +- .../BPy_ZDiscontinuityF1D.h | 2 +- .../BPy_QuantitativeInvisibilityF1D.h | 2 +- .../BPy_GetOccludeeF1D.h | 2 +- .../BPy_GetOccludersF1D.h | 2 +- .../BPy_GetShapeF1D.h | 2 +- .../BPy_ChainingTimeStampF1D.h | 2 +- .../BPy_IncrementChainingTimeStampF1D.h | 2 +- .../UnaryFunction1D_void/BPy_TimeStampF1D.h | 2 +- .../python/UnaryPredicate0D/BPy_FalseUP0D.h | 2 +- .../python/UnaryPredicate0D/BPy_TrueUP0D.h | 2 +- .../python/UnaryPredicate1D/BPy_ContourUP1D.h | 2 +- .../BPy_DensityLowerThanUP1D.h | 2 +- .../BPy_EqualToChainingTimeStampUP1D.h | 2 +- .../BPy_EqualToTimeStampUP1D.h | 2 +- .../BPy_ExternalContourUP1D.h | 2 +- .../python/UnaryPredicate1D/BPy_FalseUP1D.h | 2 +- .../BPy_QuantitativeInvisibilityUP1D.h | 2 +- .../python/UnaryPredicate1D/BPy_ShapeUP1D.h | 2 +- .../python/UnaryPredicate1D/BPy_TrueUP1D.h | 2 +- .../ChainingIterators.py | 731 ++++++++++ .../style_modules_blender/Functions0D.py | 81 ++ .../style_modules_blender/Functions1D.py | 45 + .../style_modules_blender/PredicatesB1D.py | 70 + .../style_modules_blender/PredicatesU0D.py | 103 ++ .../style_modules_blender/PredicatesU1D.py | 381 +++++ .../anisotropic_diffusion.py | 75 + .../apriori_and_causal_density.py | 45 + .../style_modules_blender/apriori_density.py | 43 + .../backbone_stretcher.py | 36 + .../blueprint_circles.py | 46 + .../blueprint_ellipses.py | 46 + .../blueprint_squares.py | 45 + .../style_modules_blender/cartoon.py | 42 + .../style_modules_blender/contour.py | 42 + .../style_modules_blender/curvature2d.py | 60 + .../style_modules_blender/external_contour.py | 43 + .../external_contour_sketchy.py | 48 + .../external_contour_smooth.py | 44 + .../style_modules_blender/extra-lines.sml | 3 + .../style_modules_blender/haloing.py | 50 + .../ignore_small_occlusions.py | 41 + .../style_modules_blender/invisible_lines.py | 42 + .../japanese_bigbrush.py | 59 + .../logical_operators.py | 36 + .../long_anisotropically_dense.py | 81 ++ .../multiple_parameterization.py | 51 + .../freestyle/style_modules_blender/nature.py | 43 + .../style_modules_blender/near_lines.py | 44 + .../occluded_by_specific_object.py | 45 + .../style_modules_blender/polygonalize.py | 40 + .../freestyle/style_modules_blender/qi0.py | 41 + .../qi0_not_external_contour.py | 43 + .../freestyle/style_modules_blender/qi1.py | 42 + .../freestyle/style_modules_blender/qi2.py | 42 + .../sequentialsplit_sketchy.py | 68 + .../style_modules_blender/shaders.py | 1288 +++++++++++++++++ .../sketchy_multiple_parameterization.py | 48 + .../sketchy_topology_broken.py | 89 ++ .../sketchy_topology_preserved.py | 49 + .../split_at_highest_2d_curvatures.py | 40 + .../split_at_tvertices.py | 42 + .../style_modules_blender/stroke_texture.py | 43 + .../style_modules_blender/suggestive.py | 43 + .../thickness_fof_depth_discontinuity.py | 62 + .../style_modules_blender/tipremover.py | 42 + .../style_modules_blender/tvertex_remover.py | 42 + .../uniformpruning_zsort.py | 40 + .../freestyle/style_modules_blender/vector.py | 241 +++ 214 files changed, 5549 insertions(+), 351 deletions(-) create mode 100644 source/blender/freestyle/intern/python/BPy_Operators.h create mode 100755 source/blender/freestyle/style_modules_blender/ChainingIterators.py create mode 100755 source/blender/freestyle/style_modules_blender/Functions0D.py create mode 100755 source/blender/freestyle/style_modules_blender/Functions1D.py create mode 100755 source/blender/freestyle/style_modules_blender/PredicatesB1D.py create mode 100755 source/blender/freestyle/style_modules_blender/PredicatesU0D.py create mode 100755 source/blender/freestyle/style_modules_blender/PredicatesU1D.py create mode 100755 source/blender/freestyle/style_modules_blender/anisotropic_diffusion.py create mode 100755 source/blender/freestyle/style_modules_blender/apriori_and_causal_density.py create mode 100755 source/blender/freestyle/style_modules_blender/apriori_density.py create mode 100755 source/blender/freestyle/style_modules_blender/backbone_stretcher.py create mode 100755 source/blender/freestyle/style_modules_blender/blueprint_circles.py create mode 100755 source/blender/freestyle/style_modules_blender/blueprint_ellipses.py create mode 100755 source/blender/freestyle/style_modules_blender/blueprint_squares.py create mode 100755 source/blender/freestyle/style_modules_blender/cartoon.py create mode 100755 source/blender/freestyle/style_modules_blender/contour.py create mode 100755 source/blender/freestyle/style_modules_blender/curvature2d.py create mode 100755 source/blender/freestyle/style_modules_blender/external_contour.py create mode 100755 source/blender/freestyle/style_modules_blender/external_contour_sketchy.py create mode 100755 source/blender/freestyle/style_modules_blender/external_contour_smooth.py create mode 100755 source/blender/freestyle/style_modules_blender/extra-lines.sml create mode 100755 source/blender/freestyle/style_modules_blender/haloing.py create mode 100755 source/blender/freestyle/style_modules_blender/ignore_small_occlusions.py create mode 100755 source/blender/freestyle/style_modules_blender/invisible_lines.py create mode 100755 source/blender/freestyle/style_modules_blender/japanese_bigbrush.py create mode 100755 source/blender/freestyle/style_modules_blender/logical_operators.py create mode 100755 source/blender/freestyle/style_modules_blender/long_anisotropically_dense.py create mode 100755 source/blender/freestyle/style_modules_blender/multiple_parameterization.py create mode 100755 source/blender/freestyle/style_modules_blender/nature.py create mode 100755 source/blender/freestyle/style_modules_blender/near_lines.py create mode 100755 source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py create mode 100755 source/blender/freestyle/style_modules_blender/polygonalize.py create mode 100755 source/blender/freestyle/style_modules_blender/qi0.py create mode 100755 source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py create mode 100755 source/blender/freestyle/style_modules_blender/qi1.py create mode 100755 source/blender/freestyle/style_modules_blender/qi2.py create mode 100755 source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py create mode 100755 source/blender/freestyle/style_modules_blender/shaders.py create mode 100755 source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py create mode 100755 source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py create mode 100755 source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py create mode 100755 source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py create mode 100755 source/blender/freestyle/style_modules_blender/split_at_tvertices.py create mode 100755 source/blender/freestyle/style_modules_blender/stroke_texture.py create mode 100755 source/blender/freestyle/style_modules_blender/suggestive.py create mode 100755 source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py create mode 100755 source/blender/freestyle/style_modules_blender/tipremover.py create mode 100755 source/blender/freestyle/style_modules_blender/tvertex_remover.py create mode 100755 source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py create mode 100755 source/blender/freestyle/style_modules_blender/vector.py diff --git a/source/blender/freestyle/SConscript b/source/blender/freestyle/SConscript index 6423cce6593..f74479a8309 100644 --- a/source/blender/freestyle/SConscript +++ b/source/blender/freestyle/SConscript @@ -9,7 +9,7 @@ incs = '' incs += '../blenkernel ../blenlib ../imbuf ../makesdna ../python ' incs += '../render/extern/include ../render/intern/include ../include ../src' incs += ' #/extern/freestyle/lib3ds' -incs += ' ' + env['BF_PYTHON_INC'] +incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_LIB3DS_INC'] incs += ' ' + env['BF_PNG_INC'] @@ -58,145 +58,10 @@ app_sources = env.Glob(prefix + '/*.cpp') # Python prefix = 'intern/python' -# python_sources = env.Glob(prefix + '/*.cpp') -python_sources = [ - prefix + '/BPy_Freestyle.cpp', - prefix + '/BPy_Convert.cpp', - prefix + '/BPy_BBox.cpp', - prefix + '/BPy_BinaryPredicate0D.cpp', - prefix + '/BPy_BinaryPredicate1D.cpp', - prefix + '/BPy_FrsMaterial.cpp', - prefix + '/BPy_Id.cpp', - prefix + '/BPy_IntegrationType.cpp', - prefix + '/BPy_Interface0D.cpp', - prefix + '/Interface0D/BPy_CurvePoint.cpp', - prefix + '/Interface0D/CurvePoint/BPy_StrokeVertex.cpp', - prefix + '/Interface0D/BPy_SVertex.cpp', - prefix + '/Interface0D/BPy_ViewVertex.cpp', - prefix + '/Interface0D/ViewVertex/BPy_NonTVertex.cpp', - prefix + '/Interface0D/ViewVertex/BPy_TVertex.cpp', - prefix + '/BPy_Interface1D.cpp', - prefix + '/Interface1D/BPy_Curve.cpp', - prefix + '/Interface1D/Curve/BPy_Chain.cpp', - prefix + '/Interface1D/BPy_FEdge.cpp', - prefix + '/Interface1D/FEdge/BPy_FEdgeSharp.cpp', - prefix + '/Interface1D/FEdge/BPy_FEdgeSmooth.cpp', - prefix + '/Interface1D/BPy_Stroke.cpp', - prefix + '/Interface1D/BPy_ViewEdge.cpp', - prefix + '/BPy_Iterator.cpp', - prefix + '/Iterator/BPy_AdjacencyIterator.cpp', - prefix + '/Iterator/BPy_Interface0DIterator.cpp', - prefix + '/Iterator/BPy_CurvePointIterator.cpp', - prefix + '/Iterator/BPy_StrokeVertexIterator.cpp', - prefix + '/Iterator/BPy_SVertexIterator.cpp', - prefix + '/Iterator/BPy_orientedViewEdgeIterator.cpp', - prefix + '/Iterator/BPy_ViewEdgeIterator.cpp', - prefix + '/Iterator/BPy_ChainingIterator.cpp', - prefix + '/Iterator/BPy_ChainPredicateIterator.cpp', - prefix + '/Iterator/BPy_ChainSilhouetteIterator.cpp', - prefix + '/BPy_MediumType.cpp', - prefix + '/BPy_Nature.cpp', - prefix + '/BPy_Noise.cpp', - prefix + '/BPy_SShape.cpp', - prefix + '/BPy_StrokeAttribute.cpp', - prefix + '/BPy_StrokeShader.cpp', - prefix + '/StrokeShader/BPy_BackboneStretcherShader.cpp', - prefix + '/StrokeShader/BPy_BezierCurveShader.cpp', - prefix + '/StrokeShader/BPy_CalligraphicShader.cpp', - prefix + '/StrokeShader/BPy_ColorNoiseShader.cpp', - prefix + '/StrokeShader/BPy_ColorVariationPatternShader.cpp', - prefix + '/StrokeShader/BPy_ConstantColorShader.cpp', - prefix + '/StrokeShader/BPy_ConstantThicknessShader.cpp', - prefix + '/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.cpp', - prefix + '/StrokeShader/BPy_fstreamShader.cpp', - prefix + '/StrokeShader/BPy_GuidingLinesShader.cpp', - prefix + '/StrokeShader/BPy_IncreasingColorShader.cpp', - prefix + '/StrokeShader/BPy_IncreasingThicknessShader.cpp', - prefix + '/StrokeShader/BPy_PolygonalizationShader.cpp', - prefix + '/StrokeShader/BPy_SamplingShader.cpp', - prefix + '/StrokeShader/BPy_SpatialNoiseShader.cpp', - prefix + '/StrokeShader/BPy_streamShader.cpp', - prefix + '/StrokeShader/BPy_StrokeTextureShader.cpp', - prefix + '/StrokeShader/BPy_TextureAssignerShader.cpp', - prefix + '/StrokeShader/BPy_ThicknessNoiseShader.cpp', - prefix + '/StrokeShader/BPy_ThicknessVariationPatternShader.cpp', - prefix + '/StrokeShader/BPy_TipRemoverShader.cpp', - prefix + '/BPy_UnaryFunction0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DId.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.cpp', - prefix + '/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.cpp', - prefix + '/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.cpp', - prefix + '/BPy_UnaryFunction1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.cpp', - prefix + '/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.cpp', - prefix + '/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.cpp', - prefix + '/BPy_UnaryPredicate0D.cpp', - prefix + '/BPy_UnaryPredicate1D.cpp', - prefix + '/BPy_ViewMap.cpp', - prefix + '/BPy_ViewShape.cpp' - ] +python_sources = env.Glob(prefix + '/*.cpp') \ + + env.Glob(prefix + '/*/*.cpp') \ + + env.Glob(prefix + '/*/*/*.cpp') \ + + env.Glob(prefix + '/*/*/*/*.cpp') sources = system_sources + image_sources + geometry_sources + scene_graph_sources \ + winged_edge_sources + view_map_sources + stroke_sources + rendering_sources \ diff --git a/source/blender/freestyle/intern/python/BPy_BBox.h b/source/blender/freestyle/intern/python/BPy_BBox.h index 88bba3301bb..90fbc565b33 100644 --- a/source/blender/freestyle/intern/python/BPy_BBox.h +++ b/source/blender/freestyle/intern/python/BPy_BBox.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject BBox_Type; -#define BPy_BBox_Check(v) (( (PyObject *) v)->ob_type == &BBox_Type) +#define BPy_BBox_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BBox_Type) ) /*---------------------------Python BPy_BBox structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h index dd192877675..8b92fbe4e35 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject BinaryPredicate0D_Type; -#define BPy_BinaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate0D_Type) +#define BPy_BinaryPredicate0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BinaryPredicate0D_Type) ) /*---------------------------Python BPy_BinaryPredicate0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h index 035e2b6cb17..66f5e2fd4df 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject BinaryPredicate1D_Type; -#define BPy_BinaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &BinaryPredicate1D_Type) +#define BPy_BinaryPredicate1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BinaryPredicate1D_Type) ) /*---------------------------Python BPy_BinaryPredicate1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 042d4b7bef0..b541babd752 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -5,20 +5,29 @@ #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" +#include "Interface0D/BPy_CurvePoint.cpp" #include "Interface0D/CurvePoint/BPy_StrokeVertex.h" #include "Interface0D/BPy_SVertex.h" #include "Interface0D/BPy_ViewVertex.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_ViewEdge.h" -#include "Iterator/BPy_Interface0DIterator.h" -#include "Iterator/BPy_orientedViewEdgeIterator.h" -#include "Iterator/BPy_StrokeVertexIterator.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" #include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" #include "BPy_ViewShape.h" +#include "Iterator/BPy_AdjacencyIterator.h" +#include "Iterator/BPy_ChainPredicateIterator.h" +#include "Iterator/BPy_ChainSilhouetteIterator.h" +#include "Iterator/BPy_ChainingIterator.h" +#include "Iterator/BPy_CurvePointIterator.h" +#include "Iterator/BPy_Interface0DIterator.h" +#include "Iterator/BPy_SVertexIterator.h" +#include "Iterator/BPy_StrokeVertexIterator.h" +#include "Iterator/BPy_ViewEdgeIterator.h" +#include "Iterator/BPy_orientedViewEdgeIterator.h" + #ifdef __cplusplus extern "C" { #endif @@ -161,27 +170,6 @@ PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) { return py_vs; } -PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { - PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); - ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); - - return py_ove_it; -} - -PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) { - PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); - ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( if0D_it ); - - return py_if0D_it; -} - -PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) { - PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 ); - ((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it ); - - return py_sv_it; -} - PyObject * BPy_FrsMaterial_from_Material( Material& m ){ PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 ); ((BPy_FrsMaterial*) py_m)->m = new Material( m ); @@ -200,6 +188,27 @@ PyObject * BPy_IntegrationType_from_IntegrationType( int i ) { return py_it; } +PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ) { + PyObject *py_cp = CurvePoint_Type.tp_new( &CurvePoint_Type, 0, 0 ); + ((BPy_CurvePoint*) py_cp)->cp = new CurvePoint( cp ); + + return py_cp; +} + +PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ) { + PyObject *py_dve = PyList_New(2); + + PyList_SetItem( py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first)) ); + PyList_SetItem( py_dve, 1, PyBool_from_bool(dve.second) ); + + return py_dve; +} + + +//============================== +// Constants +//============================== + IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { return static_cast( PyInt_AsLong(obj) ); } @@ -208,6 +217,83 @@ Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) { return static_cast( PyInt_AsLong(obj) ); } +//============================== +// Iterators +//============================== + +PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ) { + PyObject *py_a_it = AdjacencyIterator_Type.tp_new( &AdjacencyIterator_Type, 0, 0 ); + ((BPy_AdjacencyIterator *) py_a_it)->a_it = new AdjacencyIterator( a_it ); + + return py_a_it; +} + +PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) { + PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); + ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( if0D_it ); + + return py_if0D_it; +} + +PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it ) { + PyObject *py_cp_it = CurvePointIterator_Type.tp_new( &CurvePointIterator_Type, 0, 0 ); + ((BPy_CurvePointIterator*) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it ); + + return py_cp_it; +} + +PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) { + PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 ); + ((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it ); + + return py_sv_it; +} + +PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it ) { + PyObject *py_sv_it = SVertexIterator_Type.tp_new( &SVertexIterator_Type, 0, 0 ); + ((BPy_SVertexIterator*) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it ); + + return py_sv_it; +} + +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { + PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); + ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); + + return py_ove_it; +} + +PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it ) { + PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new( &ViewEdgeIterator_Type, 0, 0 ); + ((BPy_ViewEdgeIterator*) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it ); + + return py_ve_it; +} + +PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ) { + PyObject *py_c_it = ChainingIterator_Type.tp_new( &ChainingIterator_Type, 0, 0 ); + ((BPy_ChainingIterator*) py_c_it)->c_it = new ChainingIterator( c_it ); + + return py_c_it; +} + +PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ) { + PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new( &ChainPredicateIterator_Type, 0, 0 ); + ((BPy_ChainPredicateIterator*) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it ); + + return py_cp_it; +} + +PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ) { + PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new( &ChainSilhouetteIterator_Type, 0, 0 ); + ((BPy_ChainSilhouetteIterator*) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it ); + + return py_cs_it; +} + + + + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index b43f7bab291..5b613b3c4c3 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -26,20 +26,24 @@ using namespace Geometry; // NonTVertex, TVertex, ViewEdge, ViewMap, ViewShape, ViewVertex #include "../view_map/ViewMap.h" +// CurvePoint, Curve +#include "../stroke/Curve.h" + +//====== ITERATORS + +// AdjacencyIterator, ChainingIterator, ChainSilhouetteIterator, ChainPredicateIterator +#include "../stroke/ChainingIterators.h" + // ViewVertexInternal::orientedViewEdgeIterator // ViewEdgeInternal::SVertexIterator // ViewEdgeInternal::ViewEdgeIterator #include "../view_map/ViewMapIterators.h" -//##################### IMPORTANT ##################### -// Do not use the following namespaces within this file : -// - ViewVertexInternal -// - ViewEdgeInternal -//########################################################## // StrokeInternal::StrokeVertexIterator #include "../stroke/StrokeIterators.h" - +// CurveInternal::CurvePointIterator +#include "../stroke/CurveIterators.h" #ifdef __cplusplus extern "C" { @@ -62,6 +66,8 @@ IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); +PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ); +PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ); PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); @@ -77,9 +83,19 @@ PyObject * BPy_ViewVertex_from_ViewVertex_ptr( ViewVertex *vv ); PyObject * BPy_ViewEdge_from_ViewEdge( ViewEdge& ve ); PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ); +PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ); PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ); -PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); +PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it ); PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it); +PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it ); +PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ); +PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it ); +PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ); +PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ); +PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ); + + + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index ed35a85068b..85a2783102e 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -11,6 +11,7 @@ #include "BPy_Iterator.h" #include "BPy_MediumType.h" #include "BPy_Nature.h" +#include "BPy_Operators.h" #include "BPy_Noise.h" #include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" @@ -152,6 +153,7 @@ PyObject *Freestyle_Init( void ) Interface0D_Init( module ); Interface1D_Init( module ); Iterator_Init( module ); + Operators_Init( module ); Noise_Init( module ); SShape_Init( module ); StrokeAttribute_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.h b/source/blender/freestyle/intern/python/BPy_Freestyle.h index 9cdef4df2d2..4990a2e685d 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.h +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.h @@ -11,7 +11,7 @@ extern "C" { extern PyTypeObject Freestyle_Type; -#define BPy_Freestyle_Check(v) (( (PyObject *) v)->ob_type == &Freestyle_Type) +#define BPy_Freestyle_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Freestyle_Type) ) /*---------------------------Python BPy_Freestyle structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h index 90ed6805974..cb1aa20bb21 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject FrsMaterial_Type; -#define BPy_FrsMaterial_Check(v) (( (PyObject *) v)->ob_type == &FrsMaterial_Type) +#define BPy_FrsMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsMaterial_Type) ) /*---------------------------Python BPy_FrsMaterial structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Id.h b/source/blender/freestyle/intern/python/BPy_Id.h index d5e90a0a3e5..fd9446618b8 100644 --- a/source/blender/freestyle/intern/python/BPy_Id.h +++ b/source/blender/freestyle/intern/python/BPy_Id.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject Id_Type; -#define BPy_Id_Check(v) (( (PyObject *) v)->ob_type == &Id_Type) +#define BPy_Id_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Id_Type) ) /*---------------------------Python BPy_Id structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.h b/source/blender/freestyle/intern/python/BPy_IntegrationType.h index ab212ac6560..a31fe959996 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.h +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject IntegrationType_Type; -#define BPy_IntegrationType_Check(v) (( (PyObject *) v)->ob_type == &IntegrationType_Type) +#define BPy_IntegrationType_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IntegrationType_Type) ) /*---------------------------Python BPy_IntegrationType structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.h b/source/blender/freestyle/intern/python/BPy_Interface0D.h index aaecc6dad94..a55deb80a6f 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface0D.h +++ b/source/blender/freestyle/intern/python/BPy_Interface0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Interface0D_Type; -#define BPy_Interface0D_Check(v) (( (PyObject *) v)->ob_type == &Interface0D_Type) +#define BPy_Interface0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface0D_Type) ) /*---------------------------Python BPy_Interface0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.h b/source/blender/freestyle/intern/python/BPy_Interface1D.h index c49a8c130b0..14971bf88f5 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.h +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Interface1D_Type; -#define BPy_Interface1D_Check(v) (( (PyObject *) v)->ob_type == &Interface1D_Type) +#define BPy_Interface1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface1D_Type) ) /*---------------------------Python BPy_Interface1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index b946e0a9a9a..cf6d8ed4877 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -227,6 +227,12 @@ PyObject * Iterator_isEnd(BPy_Iterator* self) { return PyBool_from_bool( self->it->isEnd() ); } +//%rename(getObject) Interface0DIterator::operator* +PyObject * Iterator_getObject(BPy_Iterator* self) { + return PyBool_from_bool( self->it->isEnd() ); +} + + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.h b/source/blender/freestyle/intern/python/BPy_Iterator.h index 0f92c3b7f28..bad39806163 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.h +++ b/source/blender/freestyle/intern/python/BPy_Iterator.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Iterator_Type; -#define BPy_Iterator_Check(v) (( (PyObject *) v)->ob_type == &Iterator_Type) +#define BPy_Iterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Iterator_Type) ) /*---------------------------Python BPy_Iterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_MediumType.h b/source/blender/freestyle/intern/python/BPy_MediumType.h index d56594e0f68..9b4ff5a2fd9 100644 --- a/source/blender/freestyle/intern/python/BPy_MediumType.h +++ b/source/blender/freestyle/intern/python/BPy_MediumType.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject MediumType_Type; -#define BPy_MediumType_Check(v) (( (PyObject *) v)->ob_type == &MediumType_Type) +#define BPy_MediumType_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &MediumType_Type) ) /*---------------------------Python BPy_MediumType structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Nature.h b/source/blender/freestyle/intern/python/BPy_Nature.h index 7473869158f..493a4f78599 100644 --- a/source/blender/freestyle/intern/python/BPy_Nature.h +++ b/source/blender/freestyle/intern/python/BPy_Nature.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Nature_Type; -#define BPy_Nature_Check(v) (( (PyObject *) v)->ob_type == &Nature_Type) +#define BPy_Nature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Nature_Type) ) /*---------------------------Python BPy_Nature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Noise.h b/source/blender/freestyle/intern/python/BPy_Noise.h index b9b66d34e94..5dc8a1a4bd1 100644 --- a/source/blender/freestyle/intern/python/BPy_Noise.h +++ b/source/blender/freestyle/intern/python/BPy_Noise.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Noise_Type; -#define BPy_Noise_Check(v) (( (PyObject *) v)->ob_type == &Noise_Type) +#define BPy_Noise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Noise_Type) ) /*---------------------------Python BPy_Noise structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index efae258d5ee..2d883363998 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -1,57 +1,304 @@ -PyObject *Operators_select(PyObject *self , PyObject *args) { +#include "BPy_Operators.h" + +#include "BPy_BinaryPredicate1D.h" +#include "BPy_UnaryPredicate0D.h" +#include "BPy_UnaryPredicate1D.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DDouble.h" +#include "UnaryFunction1D/BPy_UnaryFunction1DVoid.h" +#include "Iterator/BPy_ViewEdgeIterator.h" +#include "Iterator/BPy_ChainingIterator.h" +#include "BPy_StrokeShader.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Operators instance -----------*/ +static void Operators___dealloc__(BPy_Operators *self); + +static PyObject * Operators_select(BPy_Operators* self, PyObject *args); + +/*----------------------Operators instance definitions ----------------------------*/ +static PyMethodDef BPy_Operators_methods[] = { + {"select", ( PyCFunction ) Operators_select, METH_VARARGS | METH_STATIC, "(UnaryPredicate1D up1D )Selects the ViewEdges of the ViewMap verifying a specified condition. "}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Operators type definition ------------------------------*/ + +PyTypeObject Operators_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Operators", /* tp_name */ + sizeof( BPy_Operators ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)Operators___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + NULL, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Operatorss */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Operators_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + NULL, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC Operators_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &Operators_Type ) < 0 ) + return; + Py_INCREF( &Operators_Type ); + PyModule_AddObject(module, "Operators", (PyObject *)&Operators_Type); + } +//------------------------INSTANCE METHODS ---------------------------------- -PyObject *Operators_chain(PyObject *self, PyObject *args) { +void Operators___dealloc__(BPy_Operators* self) +{ + self->ob_type->tp_free((PyObject*)self); } +PyObject * Operators_select(BPy_Operators* self, PyObject *args) +{ + PyObject *obj = 0; -PyObject *Operators_bidirectionalChain(PyObject *self, PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &obj) && + BPy_UnaryPredicate1D_Check(obj) && ((BPy_UnaryPredicate1D *) obj)->up1D )) { + cout << "ERROR: Operators_select" << endl; + Py_RETURN_NONE; + } + + Operators::select(*( ((BPy_UnaryPredicate1D *) obj)->up1D )); + + Py_RETURN_NONE; } +PyObject * Operators_chain(BPy_Operators* self, PyObject *args) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; -PyObject *Operators_sequentialSplit(PyObject *self, PyObject *args) { + if(!( PyArg_ParseTuple(args, "OO|O", &obj1, &obj2, &obj3) && + BPy_ViewEdgeIterator_Check(obj1) && ((BPy_ViewEdgeIterator *) obj1)->ve_it && + BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D )) { + cout << "ERROR: Operators_chain" << endl; + Py_RETURN_NONE; + } + + if( !obj3 ) { + + Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ), + *( ((BPy_UnaryPredicate1D *) obj2)->up1D ) ); + + } else if( BPy_UnaryFunction1DVoid_Check(obj3) && ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) { + + Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ), + *( ((BPy_UnaryPredicate1D *) obj2)->up1D ), + *( ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) ); + + } + + Py_RETURN_NONE; } +PyObject * Operators_bidirectionalChain(BPy_Operators* self, PyObject *args) +{ + PyObject *obj1 = 0, *obj2 = 0; -PyObject *Operators_recursiveSplit(PyObject *self, PyObject *args) { + if(!( PyArg_ParseTuple(args, "O|O", &obj1, &obj2) && + BPy_ChainingIterator_Check(obj1) && ((BPy_ChainingIterator *) obj1)->c_it )) { + cout << "ERROR: Operators_bidirectionalChain" << endl; + Py_RETURN_NONE; + } + + if( !obj2 ) { + + Operators::bidirectionalChain( *( ((BPy_ChainingIterator *) obj1)->c_it ) ); + + } else if( BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D ) { + + Operators::bidirectionalChain( *( ((BPy_ChainingIterator *) obj1)->c_it ), + *( ((BPy_UnaryPredicate1D *) obj2)->up1D ) ); + + } + + Py_RETURN_NONE; } +PyObject * Operators_sequentialSplit(BPy_Operators* self, PyObject *args) +{ + PyObject *obj1 = 0, *obj2 = 0; + float f3 = 0.0; -PyObject *Operators_sort(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O|Of", &obj1, &obj2, &f3) && + BPy_UnaryPredicate0D_Check(obj1) && ((BPy_UnaryPredicate0D *) obj1)->up0D )) { + cout << "ERROR: Operators_sequentialSplit" << endl; + Py_RETURN_NONE; + } + + if( obj2 && BPy_UnaryPredicate0D_Check(obj2) ) { + + Operators::sequentialSplit( *( ((BPy_UnaryPredicate0D *) obj1)->up0D ), + *( ((BPy_UnaryPredicate0D *) obj2)->up0D ), + f3 ); + + } else { + + float f = ( obj2 && PyFloat_Check(obj2) ) ? PyFloat_AsDouble(obj2) : 0.0; + + Operators::sequentialSplit( *( ((BPy_UnaryPredicate0D *) obj1)->up0D ), f ); + + } + + Py_RETURN_NONE; } +PyObject * Operators_recursiveSplit(BPy_Operators* self, PyObject *args) +{ + PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; + float f4 = 0.0; -PyObject *Operators_create(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "OO|Of", &obj1, &obj2, &obj3, &f4) && + BPy_UnaryFunction0DDouble_Check(obj1) && ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double )) { + cout << "ERROR: Operators_recursiveSplit" << endl; + Py_RETURN_NONE; + } + + if( BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D ) { + + float f = ( obj3 && PyFloat_Check(obj3) ) ? PyFloat_AsDouble(obj3) : 0.0; + + Operators::recursiveSplit( *( ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double ), + *( ((BPy_UnaryPredicate1D *) obj2)->up1D ), + f ); + + } else if( BPy_UnaryPredicate0D_Check(obj2) && ((BPy_UnaryPredicate0D *) obj2)->up0D && + BPy_UnaryPredicate1D_Check(obj3) && ((BPy_UnaryPredicate1D *) obj3)->up1D ) { + + Operators::recursiveSplit( *( ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double ), + *( ((BPy_UnaryPredicate0D *) obj2)->up0D ), + *( ((BPy_UnaryPredicate1D *) obj3)->up1D ), + f4 ); + + } + + Py_RETURN_NONE; } +PyObject * Operators_sort(BPy_Operators* self, PyObject *args) +{ + PyObject *obj = 0; -PyObject *Operators_getViewEdgeFromIndex(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "O", &obj) && + BPy_BinaryPredicate1D_Check(obj) && ((BPy_BinaryPredicate1D *) obj)->bp1D )) { + cout << "ERROR: Operators_sort" << endl; + Py_RETURN_NONE; + } + Operators::sort(*( ((BPy_BinaryPredicate1D *) obj)->bp1D )); + + Py_RETURN_NONE; } +PyObject * Operators_create(BPy_Operators* self, PyObject *args) +{ + PyObject *obj1 = 0, *obj2 = 0; -PyObject *Operators_getChainFromIndex(PyObject *self , PyObject *args) { + if(!( PyArg_ParseTuple(args, "OO", &obj1, &obj2) && + BPy_UnaryPredicate1D_Check(obj1) && ((BPy_UnaryPredicate1D *) obj1)->up1D && + PyList_Check(obj2) && PyList_Size(obj2) > 0 )) { + cout << "ERROR: Operators_create" << endl; + Py_RETURN_NONE; + } + + vector shaders; + for( int i = 0; i < PyList_Size(obj2); i++) { + PyObject *py_ss = PyList_GetItem(obj2,i); + if( BPy_StrokeShader_Check(py_ss) ) + shaders.push_back( ((BPy_StrokeShader *) py_ss)->ss ); + } + + Operators::create( *( ((BPy_UnaryPredicate1D *) obj1)->up1D ), shaders); + + Py_RETURN_NONE; } +/////////////////////////////////////////////////////////////////////////////////////////// -PyObject *Operators_getStrokeFromIndex(PyObject *self , PyObject *args) { -} - - -PyObject *Operators_getViewEdgesSize(PyObject *self , PyObject *args) { -} - - -PyObject *Operators_getChainsSize(PyObject *self , PyObject *args) { -} - - -PyObject *Operators_getStrokesSize(PyObject *self , PyObject *args) { -} - - - PyObject *delete_Operators(PyObject *self , PyObject *args) { +#ifdef __cplusplus } +#endif diff --git a/source/blender/freestyle/intern/python/BPy_Operators.h b/source/blender/freestyle/intern/python/BPy_Operators.h new file mode 100644 index 00000000000..0af40551cf8 --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_Operators.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_OPERATORS_H +#define FREESTYLE_PYTHON_OPERATORS_H + +#include "../stroke/Operators.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject Operators_Type; + +#define BPy_Operators_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Operators_Type) ) + +/*---------------------------Python BPy_Operators structure definition----------*/ +typedef struct { + PyObject_HEAD +} BPy_Operators; + +/*---------------------------Python BPy_Operators visible prototypes-----------*/ + +PyMODINIT_FUNC Operators_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif /* FREESTYLE_PYTHON_OPERATORS_H */ diff --git a/source/blender/freestyle/intern/python/BPy_SShape.h b/source/blender/freestyle/intern/python/BPy_SShape.h index 2064b6c4b64..5ca4d9abefe 100644 --- a/source/blender/freestyle/intern/python/BPy_SShape.h +++ b/source/blender/freestyle/intern/python/BPy_SShape.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject SShape_Type; -#define BPy_SShape_Check(v) (( (PyObject *) v)->ob_type == &SShape_Type) +#define BPy_SShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SShape_Type) ) /*---------------------------Python BPy_SShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h index a0828e4f668..a2100c3b0f6 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h +++ b/source/blender/freestyle/intern/python/BPy_StrokeAttribute.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject StrokeAttribute_Type; -#define BPy_StrokeAttribute_Check(v) (( (PyObject *) v)->ob_type == &StrokeAttribute_Type) +#define BPy_StrokeAttribute_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeAttribute_Type) ) /*---------------------------Python BPy_StrokeAttribute structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.h b/source/blender/freestyle/intern/python/BPy_StrokeShader.h index 091eaa50383..5ee89a35875 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.h +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.h @@ -18,7 +18,7 @@ extern "C" { extern PyTypeObject StrokeShader_Type; -#define BPy_StrokeShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeShader_Type) +#define BPy_StrokeShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeShader_Type) ) /*---------------------------Python BPy_StrokeShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h index e4854c58b45..0ab0bfbdc2e 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction0D_Type; -#define BPy_UnaryFunction0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0D_Type) +#define BPy_UnaryFunction0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0D_Type) ) /*---------------------------Python BPy_UnaryFunction0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h index 21cece45fa4..f33fcf48da4 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1D_Type; -#define BPy_UnaryFunction1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1D_Type) +#define BPy_UnaryFunction1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1D_Type) ) /*---------------------------Python BPy_UnaryFunction1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h index 1f72ba5e86b..c242a71d1a3 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryPredicate0D_Type; -#define BPy_UnaryPredicate0D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate0D_Type) +#define BPy_UnaryPredicate0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryPredicate0D_Type) ) /*---------------------------Python BPy_UnaryPredicate0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h index 509d81f6937..ac5451d3b0e 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryPredicate1D_Type; -#define BPy_UnaryPredicate1D_Check(v) (( (PyObject *) v)->ob_type == &UnaryPredicate1D_Type) +#define BPy_UnaryPredicate1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryPredicate1D_Type) ) /*---------------------------Python BPy_UnaryPredicate1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_ViewMap.h b/source/blender/freestyle/intern/python/BPy_ViewMap.h index 841b5d46f07..f76f09a4c75 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewMap.h +++ b/source/blender/freestyle/intern/python/BPy_ViewMap.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ViewMap_Type; -#define BPy_ViewMap_Check(v) (( (PyObject *) v)->ob_type == &ViewMap_Type) +#define BPy_ViewMap_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewMap_Type) ) /*---------------------------Python BPy_ViewMap structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BPy_ViewShape.h b/source/blender/freestyle/intern/python/BPy_ViewShape.h index 20490cd71aa..a7d01c098d2 100644 --- a/source/blender/freestyle/intern/python/BPy_ViewShape.h +++ b/source/blender/freestyle/intern/python/BPy_ViewShape.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ViewShape_Type; -#define BPy_ViewShape_Check(v) (( (PyObject *) v)->ob_type == &ViewShape_Type) +#define BPy_ViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewShape_Type) ) /*---------------------------Python BPy_ViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h index 7e090fc92d3..a8d4aad88aa 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_FalseBP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject FalseBP1D_Type; -#define BPy_FalseBP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseBP1D_Type) +#define BPy_FalseBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseBP1D_Type) ) /*---------------------------Python BPy_FalseBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h index e499067d05e..d5bce5b150d 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_Length2DBP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Length2DBP1D_Type; -#define BPy_Length2DBP1D_Check(v) (( (PyObject *) v)->ob_type == &Length2DBP1D_Type) +#define BPy_Length2DBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Length2DBP1D_Type) ) /*---------------------------Python BPy_Length2DBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h index 31e47040bcb..71065d4ceeb 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_SameShapeIdBP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject SameShapeIdBP1D_Type; -#define BPy_SameShapeIdBP1D_Check(v) (( (PyObject *) v)->ob_type == &SameShapeIdBP1D_Type) +#define BPy_SameShapeIdBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SameShapeIdBP1D_Type) ) /*---------------------------Python BPy_SameShapeIdBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h index a975fe0b662..7d809e1fe65 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_TrueBP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TrueBP1D_Type; -#define BPy_TrueBP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueBP1D_Type) +#define BPy_TrueBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueBP1D_Type) ) /*---------------------------Python BPy_TrueBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h index 16fe71dee07..23d27e118a9 100644 --- a/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h +++ b/source/blender/freestyle/intern/python/BinaryPredicate1D/BPy_ViewMapGradientNormBP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ViewMapGradientNormBP1D_Type; -#define BPy_ViewMapGradientNormBP1D_Check(v) (( (PyObject *) v)->ob_type == &ViewMapGradientNormBP1D_Type) +#define BPy_ViewMapGradientNormBP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewMapGradientNormBP1D_Type) ) /*---------------------------Python BPy_ViewMapGradientNormBP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h index c2a8023b745..b4c22645503 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject CurvePoint_Type; -#define BPy_CurvePoint_Check(v) (( (PyObject *) v)->ob_type == &CurvePoint_Type) +#define BPy_CurvePoint_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurvePoint_Type) ) /*---------------------------Python BPy_CurvePoint structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h index 95b7d833d65..7d310f2b7dc 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject SVertex_Type; -#define BPy_SVertex_Check(v) (( (PyObject *) v)->ob_type == &SVertex_Type) +#define BPy_SVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SVertex_Type) ) /*---------------------------Python BPy_SVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index 592a46186c2..26c06b50d71 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject ViewVertex_Type; -#define BPy_ViewVertex_Check(v) (( (PyObject *) v)->ob_type == &ViewVertex_Type) +#define BPy_ViewVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewVertex_Type) ) /*---------------------------Python BPy_ViewVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h index f1c54ed0041..2a84e2480f0 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject StrokeVertex_Type; -#define BPy_StrokeVertex_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertex_Type) +#define BPy_StrokeVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeVertex_Type) ) /*---------------------------Python BPy_StrokeVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h index 13b520d81db..071194d2d42 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject NonTVertex_Type; -#define BPy_NonTVertex_Check(v) (( (PyObject *) v)->ob_type == &NonTVertex_Type) +#define BPy_NonTVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &NonTVertex_Type) ) /*---------------------------Python BPy_NonTVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h index a4f564446ef..12fe5c0cb43 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject TVertex_Type; -#define BPy_TVertex_Check(v) (( (PyObject *) v)->ob_type == &TVertex_Type) +#define BPy_TVertex_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TVertex_Type) ) /*---------------------------Python BPy_TVertex structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h index fd19612261a..fd29a7bf4f1 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject Curve_Type; -#define BPy_Curve_Check(v) (( (PyObject *) v)->ob_type == &Curve_Type) +#define BPy_Curve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curve_Type) ) /*---------------------------Python BPy_Curve structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h index c54dbee98b7..9d13145aaf2 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject FEdge_Type; -#define BPy_FEdge_Check(v) (( (PyObject *) v)->ob_type == &FEdge_Type) +#define BPy_FEdge_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdge_Type) ) /*---------------------------Python BPy_FEdge structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h index a7e7455b764..ead377377e8 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject ViewEdge_Type; -#define BPy_ViewEdge_Check(v) (( (PyObject *) v)->ob_type == &ViewEdge_Type) +#define BPy_ViewEdge_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewEdge_Type) ) /*---------------------------Python BPy_ViewEdge structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h index eaf80033098..ade70c47f25 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject Chain_Type; -#define BPy_Chain_Check(v) (( (PyObject *) v)->ob_type == &Chain_Type) +#define BPy_Chain_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Chain_Type) ) /*---------------------------Python BPy_Chain structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h index d08ef006941..84b01e27c21 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject FEdgeSharp_Type; -#define BPy_FEdgeSharp_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSharp_Type) +#define BPy_FEdgeSharp_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdgeSharp_Type) ) /*---------------------------Python BPy_FEdgeSharp structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h index 6b26f65d81c..d7b44bb1da7 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h @@ -14,7 +14,7 @@ extern "C" { extern PyTypeObject FEdgeSmooth_Type; -#define BPy_FEdgeSmooth_Check(v) (( (PyObject *) v)->ob_type == &FEdgeSmooth_Type) +#define BPy_FEdgeSmooth_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FEdgeSmooth_Type) ) /*---------------------------Python BPy_FEdgeSmooth structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index e40f129d3d8..13c8382c3a2 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -12,8 +12,11 @@ extern "C" { /*--------------- Python API function prototypes for AdjacencyIterator instance -----------*/ static int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args); +static PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self); + /*----------------------AdjacencyIterator instance definitions ----------------------------*/ static PyMethodDef BPy_AdjacencyIterator_methods[] = { + {"getObject", ( PyCFunction ) AdjacencyIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -135,6 +138,16 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args ) } +PyObject * AdjacencyIterator_getObject(BPy_AdjacencyIterator *self) { + + ViewEdge *ve = self->a_it->operator*(); + if( ve ) + return BPy_ViewEdge_from_ViewEdge( *ve ); + + Py_RETURN_NONE; +} + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h index de0178f7725..733a9f2fcab 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject AdjacencyIterator_Type; -#define BPy_AdjacencyIterator_Check(v) (( (PyObject *) v)->ob_type == &AdjacencyIterator_Type) +#define BPy_AdjacencyIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &AdjacencyIterator_Type) ) /*---------------------------Python BPy_AdjacencyIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h index c5d32fb01f3..39a794b27f7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject ChainPredicateIterator_Type; -#define BPy_ChainPredicateIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainPredicateIterator_Type) +#define BPy_ChainPredicateIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainPredicateIterator_Type) ) /*---------------------------Python BPy_ChainPredicateIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h index 7e6feb00910..912d397d279 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject ChainSilhouetteIterator_Type; -#define BPy_ChainSilhouetteIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainSilhouetteIterator_Type) +#define BPy_ChainSilhouetteIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainSilhouetteIterator_Type) ) /*---------------------------Python BPy_ChainSilhouetteIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index c695e92ec70..525b0697fa7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -18,12 +18,15 @@ static PyObject * ChainingIterator_traverse( BPy_ChainingIterator *self, PyObjec static PyObject * ChainingIterator_getVertex( BPy_ChainingIterator *self ); static PyObject * ChainingIterator_isIncrementing( BPy_ChainingIterator *self ); +static PyObject * ChainingIterator_getObject( BPy_ChainingIterator *self); + /*----------------------ChainingIterator instance definitions ----------------------------*/ static PyMethodDef BPy_ChainingIterator_methods[] = { {"init", ( PyCFunction ) ChainingIterator_init, METH_NOARGS, "() Inits the iterator context. This method is called each time a new chain is started. It can be used to reset some history information that you might want to keep."}, {"traverse", ( PyCFunction ) ChainingIterator_traverse, METH_VARARGS, "(AdjacencyIterator ai) This method iterates over the potential next ViewEdges and returns the one that will be followed next. Returns the next ViewEdge to follow or 0 when the end of the chain is reached. "}, {"getVertex", ( PyCFunction ) ChainingIterator_getVertex, METH_NOARGS, "() Returns the vertex which is the next crossing "}, {"isIncrementing", ( PyCFunction ) ChainingIterator_isIncrementing, METH_NOARGS, "() Returns true if the current iteration is an incrementation."}, + {"getObject", ( PyCFunction ) ChainingIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -171,7 +174,14 @@ PyObject *ChainingIterator_isIncrementing( BPy_ChainingIterator *self ) { return PyBool_from_bool( self->c_it->isIncrementing() ); } +PyObject * ChainingIterator_getObject( BPy_ChainingIterator *self) { + + ViewEdge *ve = self->c_it->operator*(); + if( ve ) + return BPy_ViewEdge_from_ViewEdge( *ve ); + Py_RETURN_NONE; +} diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h index 2994f381c1d..2a00aa8072f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject ChainingIterator_Type; -#define BPy_ChainingIterator_Check(v) (( (PyObject *) v)->ob_type == &ChainingIterator_Type) +#define BPy_ChainingIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainingIterator_Type) ) /*---------------------------Python BPy_ChainingIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp index 1f830261739..c02bd0a00fc 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp @@ -1,5 +1,6 @@ #include "BPy_CurvePointIterator.h" +#include "../BPy_Convert.h" #include "BPy_Interface0DIterator.h" #ifdef __cplusplus @@ -14,12 +15,14 @@ static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ); static PyObject * CurvePointIterator_u( BPy_CurvePointIterator *self ); static PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator *self ); +static PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self); /*----------------------CurvePointIterator instance definitions ----------------------------*/ static PyMethodDef BPy_CurvePointIterator_methods[] = { {"t", ( PyCFunction ) CurvePointIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, {"u", ( PyCFunction ) CurvePointIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, {"castToInterface0DIterator", ( PyCFunction ) CurvePointIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this CurvePointIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."}, + {"getObject", ( PyCFunction ) CurvePointIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -153,6 +156,10 @@ PyObject * CurvePointIterator_castToInterface0DIterator( BPy_CurvePointIterator return py_if0D_it; } +PyObject * CurvePointIterator_getObject(BPy_CurvePointIterator *self) { + return BPy_CurvePoint_from_CurvePoint( self->cp_it->operator*() ); +} + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h index e8f082216de..ad04c7208bb 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject CurvePointIterator_Type; -#define BPy_CurvePointIterator_Check(v) (( (PyObject *) v)->ob_type == &CurvePointIterator_Type) +#define BPy_CurvePointIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurvePointIterator_Type) ) /*---------------------------Python BPy_CurvePointIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index c88ba7773ab..92c3a7dfc38 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -1,5 +1,7 @@ #include "BPy_Interface0DIterator.h" +#include "../BPy_Convert.h" + #ifdef __cplusplus extern "C" { #endif @@ -12,10 +14,13 @@ static int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject static PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self ); static PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ); +static PyObject * Interface0DIterator_getObject(BPy_Interface0DIterator *self); + /*----------------------Interface0DIterator instance definitions ----------------------------*/ static PyMethodDef BPy_Interface0DIterator_methods[] = { {"t", ( PyCFunction ) Interface0DIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, {"u", ( PyCFunction ) Interface0DIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {"getObject", ( PyCFunction ) Interface0DIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -130,6 +135,11 @@ PyObject * Interface0DIterator_u( BPy_Interface0DIterator *self ) { return PyFloat_FromDouble( self->if0D_it->u() ); } +PyObject * Interface0DIterator_getObject(BPy_Interface0DIterator *self) { + return BPy_Interface0D_from_Interface0D( self->if0D_it->operator*() ); +} + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h index 16edb2c3d68..c829d3d9d31 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject Interface0DIterator_Type; -#define BPy_Interface0DIterator_Check(v) (( (PyObject *) v)->ob_type == &Interface0DIterator_Type) +#define BPy_Interface0DIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Interface0DIterator_Type) ) /*---------------------------Python BPy_Interface0DIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp index 649447f1db6..383480b8a9d 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp @@ -1,5 +1,6 @@ #include "BPy_SVertexIterator.h" +#include "../BPy_Convert.h" #include "../Interface0D/BPy_SVertex.h" #include "../Interface1D/BPy_FEdge.h" @@ -15,10 +16,13 @@ static int SVertexIterator___init__(BPy_SVertexIterator *self, PyObject *args); static PyObject * SVertexIterator_t( BPy_SVertexIterator *self ); static PyObject * SVertexIterator_u( BPy_SVertexIterator *self ); +static PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self); + /*----------------------SVertexIterator instance definitions ----------------------------*/ static PyMethodDef BPy_SVertexIterator_methods[] = { {"t", ( PyCFunction ) SVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, {"u", ( PyCFunction ) SVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, + {"getObject", ( PyCFunction ) SVertexIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -155,6 +159,11 @@ PyObject * SVertexIterator_u( BPy_SVertexIterator *self ) { return PyFloat_FromDouble( self->sv_it->u() ); } +PyObject * SVertexIterator_getObject( BPy_SVertexIterator *self) { + return BPy_SVertex_from_SVertex( self->sv_it->operator*() ); +} + + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h index ba6fbf020d0..b40f4d36420 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject SVertexIterator_Type; -#define BPy_SVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &SVertexIterator_Type) +#define BPy_SVertexIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SVertexIterator_Type) ) /*---------------------------Python BPy_SVertexIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp index 1f04be635c5..0b1554a1cb7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp @@ -1,5 +1,6 @@ #include "BPy_StrokeVertexIterator.h" +#include "../BPy_Convert.h" #include "BPy_Interface0DIterator.h" #ifdef __cplusplus @@ -14,11 +15,15 @@ static PyObject * StrokeVertexIterator_t( BPy_StrokeVertexIterator *self ); static PyObject * StrokeVertexIterator_u( BPy_StrokeVertexIterator *self ); static PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexIterator *self ); +static PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self); + + /*----------------------StrokeVertexIterator instance definitions ----------------------------*/ static PyMethodDef BPy_StrokeVertexIterator_methods[] = { {"t", ( PyCFunction ) StrokeVertexIterator_t, METH_NOARGS, "( )Returns the curvilinear abscissa."}, {"u", ( PyCFunction ) StrokeVertexIterator_u, METH_NOARGS, "( )Returns the point parameter in the curve 0<=u<=1."}, {"castToInterface0DIterator", ( PyCFunction ) StrokeVertexIterator_castToInterface0DIterator, METH_NOARGS, "() Casts this StrokeVertexIterator into an Interface0DIterator. Useful for any call to a function of the type UnaryFunction0D."}, + {"getObject", ( PyCFunction ) StrokeVertexIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -149,6 +154,10 @@ PyObject * StrokeVertexIterator_castToInterface0DIterator( BPy_StrokeVertexItera return py_if0D_it; } +PyObject * StrokeVertexIterator_getObject( BPy_StrokeVertexIterator *self) { + return BPy_StrokeVertex_from_StrokeVertex( self->sv_it->operator*() ); +} + /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h index 488a1efea3d..9e95fc0a401 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject StrokeVertexIterator_Type; -#define BPy_StrokeVertexIterator_Check(v) (( (PyObject *) v)->ob_type == &StrokeVertexIterator_Type) +#define BPy_StrokeVertexIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeVertexIterator_Type) ) /*---------------------------Python BPy_StrokeVertexIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index add10cd1522..1f3e3c05d91 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -21,6 +21,9 @@ static PyObject * ViewEdgeIterator_getOrientation( BPy_ViewEdgeIterator *self ); static PyObject * ViewEdgeIterator_setOrientation( BPy_ViewEdgeIterator *self, PyObject *args ); static PyObject * ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self ); +static PyObject * ViewEdgeIterator_getObject(BPy_ViewEdgeIterator *self); + + /*----------------------ViewEdgeIterator instance definitions ----------------------------*/ static PyMethodDef BPy_ViewEdgeIterator_methods[] = { {"getCurrentEdge", ( PyCFunction ) ViewEdgeIterator_getCurrentEdge, METH_NOARGS, "() Returns the current pointed ViewEdge."}, @@ -30,6 +33,7 @@ static PyMethodDef BPy_ViewEdgeIterator_methods[] = { {"getOrientation", ( PyCFunction ) ViewEdgeIterator_getOrientation, METH_NOARGS, "() Gets the orientation of the pointed ViewEdge in the iteration. "}, {"setOrientation", ( PyCFunction ) ViewEdgeIterator_setOrientation, METH_VARARGS, "(bool b) Sets the orientation of the pointed ViewEdge in the iteration. "}, {"changeOrientation", ( PyCFunction ) ViewEdgeIterator_changeOrientation, METH_NOARGS, "() Changes the current orientation."}, + {"getObject", ( PyCFunction ) ViewEdgeIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -208,6 +212,14 @@ PyObject *ViewEdgeIterator_changeOrientation( BPy_ViewEdgeIterator *self ) { Py_RETURN_NONE; } +PyObject * ViewEdgeIterator_getObject( BPy_ViewEdgeIterator *self) { + + ViewEdge *ve = self->ve_it->operator*(); + if( ve ) + return BPy_ViewEdge_from_ViewEdge( *ve ); + + Py_RETURN_NONE; +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h index a86547c5937..dce90efc8cf 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject ViewEdgeIterator_Type; -#define BPy_ViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &ViewEdgeIterator_Type) +#define BPy_ViewEdgeIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ViewEdgeIterator_Type) ) /*---------------------------Python BPy_ViewEdgeIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp index ec6850c3b96..0937e04e3a7 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp @@ -1,5 +1,7 @@ #include "BPy_orientedViewEdgeIterator.h" +#include "../BPy_Convert.h" + #ifdef __cplusplus extern "C" { #endif @@ -9,8 +11,12 @@ extern "C" { /*--------------- Python API function prototypes for orientedViewEdgeIterator instance -----------*/ static int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args); +static PyObject * orientedViewEdgeIterator_getObject(BPy_orientedViewEdgeIterator *self); + + /*----------------------orientedViewEdgeIterator instance definitions ----------------------------*/ static PyMethodDef BPy_orientedViewEdgeIterator_methods[] = { + {"getObject", ( PyCFunction ) orientedViewEdgeIterator_getObject, METH_NOARGS, "() Get object referenced by the iterator"}, {NULL, NULL, 0, NULL} }; @@ -99,9 +105,6 @@ PyTypeObject orientedViewEdgeIterator_Type = { NULL }; -//-------------------MODULE INITIALIZATION-------------------------------- - - //------------------------INSTANCE METHODS ---------------------------------- int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObject *args ) @@ -121,6 +124,10 @@ int orientedViewEdgeIterator___init__(BPy_orientedViewEdgeIterator *self, PyObje return 0; } +PyObject * orientedViewEdgeIterator_getObject( BPy_orientedViewEdgeIterator *self) { + return BPy_directedViewEdge_from_directedViewEdge( self->ove_it->operator*() ); +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h index 1c8a25258b7..973d0f2b728 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h +++ b/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject orientedViewEdgeIterator_Type; -#define BPy_orientedViewEdgeIterator_Check(v) (( (PyObject *) v)->ob_type == &orientedViewEdgeIterator_Type) +#define BPy_orientedViewEdgeIterator_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &orientedViewEdgeIterator_Type) ) /*---------------------------Python BPy_orientedViewEdgeIterator structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h index 161bdb5db40..35a74c0bda2 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BackboneStretcherShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject BackboneStretcherShader_Type; -#define BPy_BackboneStretcherShader_Check(v) (( (PyObject *) v)->ob_type == &BackboneStretcherShader_Type) +#define BPy_BackboneStretcherShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BackboneStretcherShader_Type) ) /*---------------------------Python BPy_BackboneStretcherShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h index 56443ca26ad..b94ef88acea 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BezierCurveShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject BezierCurveShader_Type; -#define BPy_BezierCurveShader_Check(v) (( (PyObject *) v)->ob_type == &BezierCurveShader_Type) +#define BPy_BezierCurveShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &BezierCurveShader_Type) ) /*---------------------------Python BPy_BezierCurveShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h index d3a4782c794..c573b0184ad 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject CalligraphicShader_Type; -#define BPy_CalligraphicShader_Check(v) (( (PyObject *) v)->ob_type == &CalligraphicShader_Type) +#define BPy_CalligraphicShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CalligraphicShader_Type) /*---------------------------Python BPy_CalligraphicShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h index e4ad2c0e1af..694b847565e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorNoiseShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ColorNoiseShader_Type; -#define BPy_ColorNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ColorNoiseShader_Type) +#define BPy_ColorNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ColorNoiseShader_Type) ) /*---------------------------Python BPy_ColorNoiseShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h index 12f7bbca151..b1898ebfecf 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ColorVariationPatternShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ColorVariationPatternShader_Type; -#define BPy_ColorVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ColorVariationPatternShader_Type) +#define BPy_ColorVariationPatternShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ColorVariationPatternShader_Type) ) /*---------------------------Python BPy_ColorVariationPatternShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h index 0f3ae177d15..30a09d852fd 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantColorShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ConstantColorShader_Type; -#define BPy_ConstantColorShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantColorShader_Type) +#define BPy_ConstantColorShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstantColorShader_Type) ) /*---------------------------Python BPy_ConstantColorShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h index d8cb7239fd9..bb7f3c0f622 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstantThicknessShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ConstantThicknessShader_Type; -#define BPy_ConstantThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstantThicknessShader_Type) +#define BPy_ConstantThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstantThicknessShader_Type) ) /*---------------------------Python BPy_ConstantThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h index f712706d2ee..38a8aa2bfe0 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ConstrainedIncreasingThicknessShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ConstrainedIncreasingThicknessShader_Type; -#define BPy_ConstrainedIncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &ConstrainedIncreasingThicknessShader_Type) +#define BPy_ConstrainedIncreasingThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ConstrainedIncreasingThicknessShader_Type) ) /*---------------------------Python BPy_ConstrainedIncreasingThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h index 2cf032e24ae..e25704c33ba 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_GuidingLinesShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GuidingLinesShader_Type; -#define BPy_GuidingLinesShader_Check(v) (( (PyObject *) v)->ob_type == &GuidingLinesShader_Type) +#define BPy_GuidingLinesShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GuidingLinesShader_Type) ) /*---------------------------Python BPy_GuidingLinesShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h index 4ef7f3f239d..9bc82e98098 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingColorShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject IncreasingColorShader_Type; -#define BPy_IncreasingColorShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingColorShader_Type) +#define BPy_IncreasingColorShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncreasingColorShader_Type) ) /*---------------------------Python BPy_IncreasingColorShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h index ae4f37835cc..33d883b1860 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_IncreasingThicknessShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject IncreasingThicknessShader_Type; -#define BPy_IncreasingThicknessShader_Check(v) (( (PyObject *) v)->ob_type == &IncreasingThicknessShader_Type) +#define BPy_IncreasingThicknessShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncreasingThicknessShader_Type) ) /*---------------------------Python BPy_IncreasingThicknessShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h index 7cc2e94e2cc..85bcc00e869 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_PolygonalizationShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject PolygonalizationShader_Type; -#define BPy_PolygonalizationShader_Check(v) (( (PyObject *) v)->ob_type == &PolygonalizationShader_Type) +#define BPy_PolygonalizationShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &PolygonalizationShader_Type) ) /*---------------------------Python BPy_PolygonalizationShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h index 763bee23168..dfc6efb3319 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SamplingShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject SamplingShader_Type; -#define BPy_SamplingShader_Check(v) (( (PyObject *) v)->ob_type == &SamplingShader_Type) +#define BPy_SamplingShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SamplingShader_Type) ) /*---------------------------Python BPy_SamplingShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h index ac232502881..46e1c12385d 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_SpatialNoiseShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject SpatialNoiseShader_Type; -#define BPy_SpatialNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &SpatialNoiseShader_Type) +#define BPy_SpatialNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &SpatialNoiseShader_Type) ) /*---------------------------Python BPy_SpatialNoiseShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h index d60ba3080ab..c65506f2f14 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_StrokeTextureShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject StrokeTextureShader_Type; -#define BPy_StrokeTextureShader_Check(v) (( (PyObject *) v)->ob_type == &StrokeTextureShader_Type) +#define BPy_StrokeTextureShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &StrokeTextureShader_Type) ) /*---------------------------Python BPy_StrokeTextureShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h index 658f3f4ec8d..9cffc1c1662 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TextureAssignerShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TextureAssignerShader_Type; -#define BPy_TextureAssignerShader_Check(v) (( (PyObject *) v)->ob_type == &TextureAssignerShader_Type) +#define BPy_TextureAssignerShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TextureAssignerShader_Type) ) /*---------------------------Python BPy_TextureAssignerShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h index 8a0437715f4..c3ef101683e 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessNoiseShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ThicknessNoiseShader_Type; -#define BPy_ThicknessNoiseShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessNoiseShader_Type) +#define BPy_ThicknessNoiseShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ThicknessNoiseShader_Type) ) /*---------------------------Python BPy_ThicknessNoiseShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h index 4c850bdb50f..302c9e005ae 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_ThicknessVariationPatternShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ThicknessVariationPatternShader_Type; -#define BPy_ThicknessVariationPatternShader_Check(v) (( (PyObject *) v)->ob_type == &ThicknessVariationPatternShader_Type) +#define BPy_ThicknessVariationPatternShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ThicknessVariationPatternShader_Type) ) /*---------------------------Python BPy_ThicknessVariationPatternShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h index 1ca4594d8d5..a1b2e3988bc 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_TipRemoverShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TipRemoverShader_Type; -#define BPy_TipRemoverShader_Check(v) (( (PyObject *) v)->ob_type == &TipRemoverShader_Type) +#define BPy_TipRemoverShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TipRemoverShader_Type) ) /*---------------------------Python BPy_TipRemoverShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h index 02cf0daff18..843d50505db 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_fstreamShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject fstreamShader_Type; -#define BPy_fstreamShader_Check(v) (( (PyObject *) v)->ob_type == &fstreamShader_Type) +#define BPy_fstreamShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &fstreamShader_Type) ) /*---------------------------Python BPy_fstreamShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h index ae34cb44798..38056d5fa59 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_streamShader.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject streamShader_Type; -#define BPy_streamShader_Check(v) (( (PyObject *) v)->ob_type == &streamShader_Type) +#define BPy_streamShader_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &streamShader_Type) ) /*---------------------------Python BPy_streamShader structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h index 2f0cb828419..6aadc3be4ac 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DDouble_Type; -#define BPy_UnaryFunction0DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DDouble_Type) +#define BPy_UnaryFunction0DDouble_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DDouble_Type) ) /*---------------------------Python BPy_UnaryFunction0DDouble structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h index 2aacd343ab1..30e16835482 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DEdgeNature_Type; -#define BPy_UnaryFunction0DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DEdgeNature_Type) +#define BPy_UnaryFunction0DEdgeNature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DEdgeNature_Type) ) /*---------------------------Python BPy_UnaryFunction0DEdgeNature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h index 46183228af6..7662a118a09 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DFloat_Type; -#define BPy_UnaryFunction0DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DFloat_Type) +#define BPy_UnaryFunction0DFloat_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DFloat_Type) ) /*---------------------------Python BPy_UnaryFunction0DFloat structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h index b1b87058bc8..ee15c63d8f0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DId_Type; -#define BPy_UnaryFunction0DId_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DId_Type) +#define BPy_UnaryFunction0DId_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DId_Type) ) /*---------------------------Python BPy_UnaryFunction0DId structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h index d8baa3d98f4..5e932213128 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DMaterial_Type; -#define BPy_UnaryFunction0DMaterial_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DMaterial_Type) +#define BPy_UnaryFunction0DMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DMaterial_Type) ) /*---------------------------Python BPy_UnaryFunction0DMaterial structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h index f79739b7a34..e6b7351ae07 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DUnsigned_Type; -#define BPy_UnaryFunction0DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DUnsigned_Type) +#define BPy_UnaryFunction0DUnsigned_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DUnsigned_Type) ) /*---------------------------Python BPy_UnaryFunction0DUnsigned structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h index a52edd1461a..82c9845e08b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DVec2f_Type; -#define BPy_UnaryFunction0DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec2f_Type) +#define BPy_UnaryFunction0DVec2f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVec2f_Type) ) /*---------------------------Python BPy_UnaryFunction0DVec2f structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h index b0e598c05cd..7bd2b81dad6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DVec3f_Type; -#define BPy_UnaryFunction0DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVec3f_Type) +#define BPy_UnaryFunction0DVec3f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVec3f_Type) ) /*---------------------------Python BPy_UnaryFunction0DVec3f structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h index 88daae11b68..9d9f7b9deda 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DVectorViewShape_Type; -#define BPy_UnaryFunction0DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DVectorViewShape_Type) +#define BPy_UnaryFunction0DVectorViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DVectorViewShape_Type) ) /*---------------------------Python BPy_UnaryFunction0DVectorViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h index 01057333a3e..e0bb3989506 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject UnaryFunction0DViewShape_Type; -#define BPy_UnaryFunction0DViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction0DViewShape_Type) +#define BPy_UnaryFunction0DViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction0DViewShape_Type) ) /*---------------------------Python BPy_UnaryFunction0DViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h index 25d4bd76a1b..11995bb4e88 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Id/BPy_ShapeIdF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ShapeIdF0D_Type; -#define BPy_ShapeIdF0D_Check(v) (( (PyObject *) v)->ob_type == &ShapeIdF0D_Type) +#define BPy_ShapeIdF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ShapeIdF0D_Type) ) /*---------------------------Python BPy_ShapeIdF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h index 4a3af1b9ff6..1ae30484ba5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Material/BPy_MaterialF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject MaterialF0D_Type; -#define BPy_MaterialF0D_Check(v) (( (PyObject *) v)->ob_type == &MaterialF0D_Type) +#define BPy_MaterialF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &MaterialF0D_Type) ) /*---------------------------Python BPy_MaterialF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h index 62494f3dbaa..63b3050c474 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Nature_EdgeNature/BPy_CurveNatureF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject CurveNatureF0D_Type; -#define BPy_CurveNatureF0D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF0D_Type) +#define BPy_CurveNatureF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurveNatureF0D_Type) ) /*---------------------------Python BPy_CurveNatureF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h index 1482ffae5f2..0b3be2df428 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_Normal2DF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Normal2DF0D_Type; -#define BPy_Normal2DF0D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF0D_Type) +#define BPy_Normal2DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Normal2DF0D_Type) ) /*---------------------------Python BPy_Normal2DF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h index c6ace665481..1cce9b592ba 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec2f/BPy_VertexOrientation2DF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject VertexOrientation2DF0D_Type; -#define BPy_VertexOrientation2DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation2DF0D_Type) +#define BPy_VertexOrientation2DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &VertexOrientation2DF0D_Type) ) /*---------------------------Python BPy_VertexOrientation2DF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h index 6a916362bb7..80cac529f0b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_Vec3f/BPy_VertexOrientation3DF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject VertexOrientation3DF0D_Type; -#define BPy_VertexOrientation3DF0D_Check(v) (( (PyObject *) v)->ob_type == &VertexOrientation3DF0D_Type) +#define BPy_VertexOrientation3DF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &VertexOrientation3DF0D_Type) ) /*---------------------------Python BPy_VertexOrientation3DF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h index 2ba71a6637e..fd4f7d92bbb 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetOccludeeF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetOccludeeF0D_Type; -#define BPy_GetOccludeeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF0D_Type) +#define BPy_GetOccludeeF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludeeF0D_Type) ) /*---------------------------Python BPy_GetOccludeeF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h index 6e97bd9a690..040c753968d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_ViewShape/BPy_GetShapeF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetShapeF0D_Type; -#define BPy_GetShapeF0D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF0D_Type) +#define BPy_GetShapeF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetShapeF0D_Type) ) /*---------------------------Python BPy_GetShapeF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h index 1146369320a..810ba04db8a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_Curvature2DAngleF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Curvature2DAngleF0D_Type; -#define BPy_Curvature2DAngleF0D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF0D_Type) +#define BPy_Curvature2DAngleF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curvature2DAngleF0D_Type) ) /*---------------------------Python BPy_Curvature2DAngleF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h index 3b113a0e636..17ea95a771c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_DensityF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject DensityF0D_Type; -#define BPy_DensityF0D_Check(v) (( (PyObject *) v)->ob_type == &DensityF0D_Type) +#define BPy_DensityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityF0D_Type) ) /*---------------------------Python BPy_DensityF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h index dcf6648cd6d..da73623cbf0 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedXF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedXF0D_Type; -#define BPy_GetProjectedXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF0D_Type) +#define BPy_GetProjectedXF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedXF0D_Type) ) /*---------------------------Python BPy_GetProjectedXF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h index ea7d5a5ab76..3a26e093747 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedYF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedYF0D_Type; -#define BPy_GetProjectedYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF0D_Type) +#define BPy_GetProjectedYF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedYF0D_Type) ) /*---------------------------Python BPy_GetProjectedYF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h index c3cd9cb8c19..aa41b70c660 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetProjectedZF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedZF0D_Type; -#define BPy_GetProjectedZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF0D_Type) +#define BPy_GetProjectedZF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedZF0D_Type) ) /*---------------------------Python BPy_GetProjectedZF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h index 6164a46f252..69e9a892f4a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetXF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetXF0D_Type; -#define BPy_GetXF0D_Check(v) (( (PyObject *) v)->ob_type == &GetXF0D_Type) +#define BPy_GetXF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetXF0D_Type) ) /*---------------------------Python BPy_GetXF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h index f85e2c5976a..0601f38585f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetYF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetYF0D_Type; -#define BPy_GetYF0D_Check(v) (( (PyObject *) v)->ob_type == &GetYF0D_Type) +#define BPy_GetYF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetYF0D_Type) ) /*---------------------------Python BPy_GetYF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h index c7bed2ebda8..eac52426600 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_GetZF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetZF0D_Type; -#define BPy_GetZF0D_Check(v) (( (PyObject *) v)->ob_type == &GetZF0D_Type) +#define BPy_GetZF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetZF0D_Type) ) /*---------------------------Python BPy_GetZF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h index 6f84891fc1d..7385e1d24c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject LocalAverageDepthF0D_Type; -#define BPy_LocalAverageDepthF0D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF0D_Type) +#define BPy_LocalAverageDepthF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &LocalAverageDepthF0D_Type) ) /*---------------------------Python BPy_LocalAverageDepthF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h index 21f854d96c9..a26ba4fdbd6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ZDiscontinuityF0D_Type; -#define BPy_ZDiscontinuityF0D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF0D_Type) +#define BPy_ZDiscontinuityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ZDiscontinuityF0D_Type) ) /*---------------------------Python BPy_ZDiscontinuityF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h index f36371dfee5..0cb56fcec70 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetCurvilinearAbscissaF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetCurvilinearAbscissaF0D_Type; -#define BPy_GetCurvilinearAbscissaF0D_Check(v) (( (PyObject *) v)->ob_type == &GetCurvilinearAbscissaF0D_Type) +#define BPy_GetCurvilinearAbscissaF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetCurvilinearAbscissaF0D_Type) ) /*---------------------------Python BPy_GetCurvilinearAbscissaF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h index 77a08de4b07..4817e5cec86 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetParameterF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetParameterF0D_Type; -#define BPy_GetParameterF0D_Check(v) (( (PyObject *) v)->ob_type == &GetParameterF0D_Type) +#define BPy_GetParameterF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetParameterF0D_Type) ) /*---------------------------Python BPy_GetParameterF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h index aa626703aff..c072ba7f408 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_GetViewMapGradientNormF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetViewMapGradientNormF0D_Type; -#define BPy_GetViewMapGradientNormF0D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF0D_Type) +#define BPy_GetViewMapGradientNormF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetViewMapGradientNormF0D_Type) ) /*---------------------------Python BPy_GetViewMapGradientNormF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h index 5a4d90e821d..6a10e6c06a4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadCompleteViewMapPixelF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ReadCompleteViewMapPixelF0D_Type; -#define BPy_ReadCompleteViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadCompleteViewMapPixelF0D_Type) +#define BPy_ReadCompleteViewMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadCompleteViewMapPixelF0D_Type) ) /*---------------------------Python BPy_ReadCompleteViewMapPixelF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h index e010bd3495a..9aed0cd82bf 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadMapPixelF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ReadMapPixelF0D_Type; -#define BPy_ReadMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadMapPixelF0D_Type) +#define BPy_ReadMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadMapPixelF0D_Type) ) /*---------------------------Python BPy_ReadMapPixelF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h index cc0c3a93f0e..a881a10f72d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_float/BPy_ReadSteerableViewMapPixelF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ReadSteerableViewMapPixelF0D_Type; -#define BPy_ReadSteerableViewMapPixelF0D_Check(v) (( (PyObject *) v)->ob_type == &ReadSteerableViewMapPixelF0D_Type) +#define BPy_ReadSteerableViewMapPixelF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ReadSteerableViewMapPixelF0D_Type) ) /*---------------------------Python BPy_ReadSteerableViewMapPixelF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h index 02706b48bd5..39b73343608 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_unsigned_int/BPy_QuantitativeInvisibilityF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityF0D_Type; -#define BPy_QuantitativeInvisibilityF0D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF0D_Type) +#define BPy_QuantitativeInvisibilityF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityF0D_Type) ) /*---------------------------Python BPy_QuantitativeInvisibilityF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h index 3d4108124f0..0e92158a2e7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/UnaryFunction0D_vector_ViewShape/BPy_GetOccludersF0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetOccludersF0D_Type; -#define BPy_GetOccludersF0D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF0D_Type) +#define BPy_GetOccludersF0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludersF0D_Type) ) /*---------------------------Python BPy_GetOccludersF0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h index 7b6e9430498..81533dc21aa 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DDouble_Type; -#define BPy_UnaryFunction1DDouble_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DDouble_Type) +#define BPy_UnaryFunction1DDouble_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DDouble_Type) ) /*---------------------------Python BPy_UnaryFunction1DDouble structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h index 9e899916a95..afa65511560 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.h @@ -15,7 +15,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DEdgeNature_Type; -#define BPy_UnaryFunction1DEdgeNature_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DEdgeNature_Type) +#define BPy_UnaryFunction1DEdgeNature_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DEdgeNature_Type) ) /*---------------------------Python BPy_UnaryFunction1DEdgeNature structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h index f454ab664ed..b144a95afe3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DFloat_Type; -#define BPy_UnaryFunction1DFloat_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DFloat_Type) +#define BPy_UnaryFunction1DFloat_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DFloat_Type) ) /*---------------------------Python BPy_UnaryFunction1DFloat structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h index 0df50d9a999..5904f0ad267 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DUnsigned_Type; -#define BPy_UnaryFunction1DUnsigned_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DUnsigned_Type) +#define BPy_UnaryFunction1DUnsigned_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DUnsigned_Type) ) /*---------------------------Python BPy_UnaryFunction1DUnsigned structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h index 098992e6631..9d369a646a1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DVec2f_Type; -#define BPy_UnaryFunction1DVec2f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec2f_Type) +#define BPy_UnaryFunction1DVec2f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVec2f_Type) ) /*---------------------------Python BPy_UnaryFunction1DVec2f structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h index 3829fa12b62..a79b173f0a9 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DVec3f_Type; -#define BPy_UnaryFunction1DVec3f_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVec3f_Type) +#define BPy_UnaryFunction1DVec3f_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVec3f_Type) ) /*---------------------------Python BPy_UnaryFunction1DVec3f structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h index cdde1926c86..492129c2b9a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h @@ -16,7 +16,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DVectorViewShape_Type; -#define BPy_UnaryFunction1DVectorViewShape_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVectorViewShape_Type) +#define BPy_UnaryFunction1DVectorViewShape_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVectorViewShape_Type) ) /*---------------------------Python BPy_UnaryFunction1DVectorViewShape structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h index 68d9c61569c..3e8ad431ec4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject UnaryFunction1DVoid_Type; -#define BPy_UnaryFunction1DVoid_Check(v) (( (PyObject *) v)->ob_type == &UnaryFunction1DVoid_Type) +#define BPy_UnaryFunction1DVoid_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &UnaryFunction1DVoid_Type) ) /*---------------------------Python BPy_UnaryFunction1DVoid structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h index 7e9344dddda..852f8937954 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject CurveNatureF1D_Type; -#define BPy_CurveNatureF1D_Check(v) (( (PyObject *) v)->ob_type == &CurveNatureF1D_Type) +#define BPy_CurveNatureF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &CurveNatureF1D_Type) ) /*---------------------------Python BPy_CurveNatureF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h index 70bfb0adb12..32078558d0c 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Normal2DF1D_Type; -#define BPy_Normal2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Normal2DF1D_Type) +#define BPy_Normal2DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Normal2DF1D_Type) ) /*---------------------------Python BPy_Normal2DF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h index bcae5fc220f..189ab04db4f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Orientation2DF1D_Type; -#define BPy_Orientation2DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation2DF1D_Type) +#define BPy_Orientation2DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Orientation2DF1D_Type) ) /*---------------------------Python BPy_Orientation2DF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h index a868c04ce15..b69baf106f4 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Orientation3DF1D_Type; -#define BPy_Orientation3DF1D_Check(v) (( (PyObject *) v)->ob_type == &Orientation3DF1D_Type) +#define BPy_Orientation3DF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Orientation3DF1D_Type) ) /*---------------------------Python BPy_Orientation3DF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h index 838bb229844..1603a7dc4ea 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject Curvature2DAngleF1D_Type; -#define BPy_Curvature2DAngleF1D_Check(v) (( (PyObject *) v)->ob_type == &Curvature2DAngleF1D_Type) +#define BPy_Curvature2DAngleF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curvature2DAngleF1D_Type) ) /*---------------------------Python BPy_Curvature2DAngleF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h index c7839b86d4d..36426536b36 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject DensityF1D_Type; -#define BPy_DensityF1D_Check(v) (( (PyObject *) v)->ob_type == &DensityF1D_Type) +#define BPy_DensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityF1D_Type) ) /*---------------------------Python BPy_DensityF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h index 5106930be75..5963b820348 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetCompleteViewMapDensityF1D_Type; -#define BPy_GetCompleteViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetCompleteViewMapDensityF1D_Type) +#define BPy_GetCompleteViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetCompleteViewMapDensityF1D_Type) ) /*---------------------------Python BPy_GetCompleteViewMapDensityF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h index a2c3572694f..0e2d7ec2718 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetDirectionalViewMapDensityF1D_Type; -#define BPy_GetDirectionalViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetDirectionalViewMapDensityF1D_Type) +#define BPy_GetDirectionalViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetDirectionalViewMapDensityF1D_Type) ) /*---------------------------Python BPy_GetDirectionalViewMapDensityF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h index 26350df2013..d799fb7b334 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedXF1D_Type; -#define BPy_GetProjectedXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedXF1D_Type) +#define BPy_GetProjectedXF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedXF1D_Type) ) /*---------------------------Python BPy_GetProjectedXF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h index 86602d9619c..1b7fe6c6b5f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedYF1D_Type; -#define BPy_GetProjectedYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedYF1D_Type) +#define BPy_GetProjectedYF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedYF1D_Type) ) /*---------------------------Python BPy_GetProjectedYF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h index 9f2a4bc1a3e..a87ac6f8c5e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetProjectedZF1D_Type; -#define BPy_GetProjectedZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetProjectedZF1D_Type) +#define BPy_GetProjectedZF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetProjectedZF1D_Type) ) /*---------------------------Python BPy_GetProjectedZF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h index fa9942a55a1..29880c7e9a7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.h @@ -13,8 +13,7 @@ extern "C" { extern PyTypeObject GetSteerableViewMapDensityF1D_Type; -#define BPy_GetSteerableViewMapDensityF1D_Check(v) (( (PyObject *) v)->ob_type == &GetSteerableViewMapDensityF1D_Type) - +#define BPy_GetSteerableViewMapDensityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetSteerableViewMapDensityF1D_Type) ) /*---------------------------Python BPy_GetSteerableViewMapDensityF1D structure definition----------*/ typedef struct { BPy_UnaryFunction1DDouble py_uf1D_double; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h index 5fcb88d5a29..4f07629870f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetViewMapGradientNormF1D_Type; -#define BPy_GetViewMapGradientNormF1D_Check(v) (( (PyObject *) v)->ob_type == &GetViewMapGradientNormF1D_Type) +#define BPy_GetViewMapGradientNormF1D_Check(v) ( ((PyObject *) v)->ob_type == PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetViewMapGradientNormF1D_Type) ) /*---------------------------Python BPy_GetViewMapGradientNormF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h index ad39a5a9b10..5eae107daae 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetXF1D_Type; -#define BPy_GetXF1D_Check(v) (( (PyObject *) v)->ob_type == &GetXF1D_Type) +#define BPy_GetXF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetXF1D_Type) ) /*---------------------------Python BPy_GetXF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h index 6fc7da72752..5864c245776 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetYF1D_Type; -#define BPy_GetYF1D_Check(v) (( (PyObject *) v)->ob_type == &GetYF1D_Type) +#define BPy_GetYF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetYF1D_Type) ) /*---------------------------Python BPy_GetYF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h index 71e57faa7ef..4b91a567eef 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetZF1D_Type; -#define BPy_GetZF1D_Check(v) (( (PyObject *) v)->ob_type == &GetZF1D_Type) +#define BPy_GetZF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetZF1D_Type) ) /*---------------------------Python BPy_GetZF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h index cb9902cc38f..627d10b6414 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject LocalAverageDepthF1D_Type; -#define BPy_LocalAverageDepthF1D_Check(v) (( (PyObject *) v)->ob_type == &LocalAverageDepthF1D_Type) +#define BPy_LocalAverageDepthF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &LocalAverageDepthF1D_Type) ) /*---------------------------Python BPy_LocalAverageDepthF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h index 66524e5c16a..e6b4be556d7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ZDiscontinuityF1D_Type; -#define BPy_ZDiscontinuityF1D_Check(v) (( (PyObject *) v)->ob_type == &ZDiscontinuityF1D_Type) +#define BPy_ZDiscontinuityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ZDiscontinuityF1D_Type) ) /*---------------------------Python BPy_ZDiscontinuityF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h index 8b8e793582f..5bcf5fcc0a2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityF1D_Type; -#define BPy_QuantitativeInvisibilityF1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityF1D_Type) +#define BPy_QuantitativeInvisibilityF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityF1D_Type) ) /*---------------------------Python BPy_QuantitativeInvisibilityF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h index 0377214cb70..c8d5e99a6a7 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludeeF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetOccludeeF1D_Type; -#define BPy_GetOccludeeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludeeF1D_Type) +#define BPy_GetOccludeeF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludeeF1D_Type) ) /*---------------------------Python BPy_GetOccludeeF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h index 76031c5a811..ad39ad25c3d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetOccludersF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetOccludersF1D_Type; -#define BPy_GetOccludersF1D_Check(v) (( (PyObject *) v)->ob_type == &GetOccludersF1D_Type) +#define BPy_GetOccludersF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetOccludersF1D_Type) ) /*---------------------------Python BPy_GetOccludersF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h index 3505e6688b0..39d1268c03f 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_vector_ViewShape/BPy_GetShapeF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject GetShapeF1D_Type; -#define BPy_GetShapeF1D_Check(v) (( (PyObject *) v)->ob_type == &GetShapeF1D_Type) +#define BPy_GetShapeF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &GetShapeF1D_Type) ) /*---------------------------Python BPy_GetShapeF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h index e52e037e986..6855ddaf14b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_ChainingTimeStampF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ChainingTimeStampF1D_Type; -#define BPy_ChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &ChainingTimeStampF1D_Type) +#define BPy_ChainingTimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ChainingTimeStampF1D_Type) ) /*---------------------------Python BPy_ChainingTimeStampF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h index 82236dd0b79..a1d5714ab63 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_IncrementChainingTimeStampF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject IncrementChainingTimeStampF1D_Type; -#define BPy_IncrementChainingTimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &IncrementChainingTimeStampF1D_Type) +#define BPy_IncrementChainingTimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &IncrementChainingTimeStampF1D_Type) ) /*---------------------------Python BPy_IncrementChainingTimeStampF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h index f1f91d2cd6e..d9bee247c09 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_void/BPy_TimeStampF1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TimeStampF1D_Type; -#define BPy_TimeStampF1D_Check(v) (( (PyObject *) v)->ob_type == &TimeStampF1D_Type) +#define BPy_TimeStampF1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TimeStampF1D_Type) ) /*---------------------------Python BPy_TimeStampF1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h index 1cc043791c3..399941d442d 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_FalseUP0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject FalseUP0D_Type; -#define BPy_FalseUP0D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP0D_Type) +#define BPy_FalseUP0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseUP0D_Type) ) /*---------------------------Python BPy_FalseUP0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h index a05bff86a90..24976aaa5c9 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate0D/BPy_TrueUP0D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TrueUP0D_Type; -#define BPy_TrueUP0D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP0D_Type) +#define BPy_TrueUP0D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueUP0D_Type) ) /*---------------------------Python BPy_TrueUP0D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h index 30d71a0cd2c..a24261a60de 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ContourUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ContourUP1D_Type; -#define BPy_ContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ContourUP1D_Type) +#define BPy_ContourUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ContourUP1D_Type) ) /*---------------------------Python BPy_ContourUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h index a6e6fdcd81f..2862b060a0a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_DensityLowerThanUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject DensityLowerThanUP1D_Type; -#define BPy_DensityLowerThanUP1D_Check(v) (( (PyObject *) v)->ob_type == &DensityLowerThanUP1D_Type) +#define BPy_DensityLowerThanUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &DensityLowerThanUP1D_Type) ) /*---------------------------Python BPy_DensityLowerThanUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h index fa8d67d0ec6..39423423b8e 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToChainingTimeStampUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject EqualToChainingTimeStampUP1D_Type; -#define BPy_EqualToChainingTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToChainingTimeStampUP1D_Type) +#define BPy_EqualToChainingTimeStampUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &EqualToChainingTimeStampUP1D_Type) ) /*---------------------------Python BPy_EqualToChainingTimeStampUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h index 6de9927d7ad..538dc400dc2 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_EqualToTimeStampUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject EqualToTimeStampUP1D_Type; -#define BPy_EqualToTimeStampUP1D_Check(v) (( (PyObject *) v)->ob_type == &EqualToTimeStampUP1D_Type) +#define BPy_EqualToTimeStampUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &EqualToTimeStampUP1D_Type) ) /*---------------------------Python BPy_EqualToTimeStampUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h index 0d35f05bc7b..31300f04dfe 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ExternalContourUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ExternalContourUP1D_Type; -#define BPy_ExternalContourUP1D_Check(v) (( (PyObject *) v)->ob_type == &ExternalContourUP1D_Type) +#define BPy_ExternalContourUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ExternalContourUP1D_Type) ) /*---------------------------Python BPy_ExternalContourUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h index c406a926526..273e4962db9 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_FalseUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject FalseUP1D_Type; -#define BPy_FalseUP1D_Check(v) (( (PyObject *) v)->ob_type == &FalseUP1D_Type) +#define BPy_FalseUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FalseUP1D_Type) ) /*---------------------------Python BPy_FalseUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h index 676bfc00715..f120ecb9778 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_QuantitativeInvisibilityUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject QuantitativeInvisibilityUP1D_Type; -#define BPy_QuantitativeInvisibilityUP1D_Check(v) (( (PyObject *) v)->ob_type == &QuantitativeInvisibilityUP1D_Type) +#define BPy_QuantitativeInvisibilityUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &QuantitativeInvisibilityUP1D_Type) ) /*---------------------------Python BPy_QuantitativeInvisibilityUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h index 0da88d959bc..ce6d0276edd 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject ShapeUP1D_Type; -#define BPy_ShapeUP1D_Check(v) (( (PyObject *) v)->ob_type == &ShapeUP1D_Type) +#define BPy_ShapeUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &ShapeUP1D_Type) ) /*---------------------------Python BPy_ShapeUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h index b30b7232076..5a01ad42d2a 100644 --- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h +++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_TrueUP1D.h @@ -13,7 +13,7 @@ extern "C" { extern PyTypeObject TrueUP1D_Type; -#define BPy_TrueUP1D_Check(v) (( (PyObject *) v)->ob_type == &TrueUP1D_Type) +#define BPy_TrueUP1D_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &TrueUP1D_Type) ) /*---------------------------Python BPy_TrueUP1D structure definition----------*/ typedef struct { diff --git a/source/blender/freestyle/style_modules_blender/ChainingIterators.py b/source/blender/freestyle/style_modules_blender/ChainingIterators.py new file mode 100755 index 00000000000..3fe57797113 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/ChainingIterators.py @@ -0,0 +1,731 @@ +# +# Filename : ChainingIterators.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Chaining Iterators to be used with chaining operators +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * + +## the natural chaining iterator +## It follows the edges of same nature following the topology of +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +class pyChainSilhouetteIterator(ChainingIterator): + def __init__(self, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 1,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = it.getObject() + it.increment() + if(count != 1): + winner = None + break + return winner + +## the natural chaining iterator +## It follows the edges of same nature on the same +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +## You can specify whether to chain iterate over edges that were +## already visited or not. +class pyChainSilhouetteGenericIterator(ChainingIterator): + def __init__(self, stayInSelection=1, stayInUnvisited=1): + ChainingIterator.__init__(self, stayInSelection, stayInUnvisited,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteGenericIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = ve + it.increment() + if(count != 1): + winner = None + break + return winner + +class pyExternalContourChainingIterator(ChainingIterator): + def __init__(self): + ChainingIterator.__init__(self, 0, 1,None,1) + self._isExternalContour = ExternalContourUP1D() + + def getExactTypeName(self): + return "pyExternalContourIterator" + + def init(self): + self._nEdges = 0 + self._isInSelection = 1 + + def checkViewEdge(self, ve, orientation): + if(orientation != 0): + vertex = ve.B() + else: + vertex = ve.A() + it = AdjacencyIterator(vertex,1,1) + while(it.isEnd() == 0): + ave = it.getObject() + if(self._isExternalContour(ave)): + return 1 + it.increment() + print "pyExternlContourChainingIterator : didn't find next edge" + return 0 + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(self._isExternalContour(ve)): + if (ve.getTimeStamp() == GetTimeStampCF()): + winner = ve + it.increment() + + self._nEdges = self._nEdges+1 + if(winner == None): + orient = 1 + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(it.isIncoming() != 0): + orient = 0 + good = self.checkViewEdge(ve,orient) + if(good != 0): + winner = ve + it.increment() + return winner + +## the natural chaining iterator +## with a sketchy multiple touch +class pySketchyChainSilhouetteIterator(ChainingIterator): + def __init__(self, nRounds=3,stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 0,None,1) + self._timeStamp = GetTimeStampCF()+nRounds + self._nRounds = nRounds + def getExactTypeName(self): + return "pySketchyChainSilhouetteIterator" + def init(self): + self._timeStamp = GetTimeStampCF()+self._nRounds + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = ve + it.increment() + if(count != 1): + winner = None + break + if(winner == None): + winner = self.getCurrentEdge() + if(winner.getChainingTimeStamp() == self._timeStamp): + winner = None + return winner + + +# Chaining iterator designed for sketchy style. +# can chain several times the same ViewEdge +# in order to produce multiple strokes per ViewEdge. +class pySketchyChainingIterator(ChainingIterator): + def __init__(self, nRounds=3, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 0,None,1) + self._timeStamp = GetTimeStampCF()+nRounds + self._nRounds = nRounds + def getExactTypeName(self): + return "pySketchyChainingIterator" + + def init(self): + self._timeStamp = GetTimeStampCF()+self._nRounds + + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == self.getCurrentEdge().getId()): + it.increment() + continue + winner = ve + it.increment() + if(winner == None): + winner = self.getCurrentEdge() + if(winner.getChainingTimeStamp() == self._timeStamp): + return None + return winner + + +## Chaining iterator that fills small occlusions +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillOcclusionsRelativeChainingIterator(ChainingIterator): + def __init__(self, percent): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if(connexl > self._percent * self._length): + winner = None + return winner + +## Chaining iterator that fills small occlusions +## size +## The max length of the occluded part +## expressed in pixels +class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator): + def __init__(self, length): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = float(length) + def getExactTypeName(self): + return "pySmallFillOcclusionsChainingIterator" + def traverse(self, iter): + winner = None + winnerOrientation = 0 + #print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if(connexl > self._length): + winner = None + return winner + + +## Chaining iterator that fills small occlusions +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator): + def __init__(self, percent, l): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._absLength = l + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.getTimeStamp() != GetTimeStampCF()): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().getTimeStamp() != GetTimeStampCF())): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if((connexl > self._percent * self._length) or (connexl > self._absLength)): + winner = None + return winner + +## Chaining iterator that fills small occlusions without caring about the +## actual selection +## percent +## The max length of the occluded part +## expressed in % of the total chain length +class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator): + def __init__(self, percent, l): + ChainingIterator.__init__(self, 0, 1,None,1) + self._length = 0 + self._absLength = l + self._percent = float(percent) + def getExactTypeName(self): + return "pyFillOcclusionsChainingIterator" + def init(self): + # each time we're evaluating a chain length + # we try to do it once. Thus we reinit + # the chain length here: + self._length = 0 + def traverse(self, iter): + winner = None + winnerOrientation = 0 + print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getId() == mateVE.getId() ): + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for nat in natures: + if(self.getCurrentEdge().getNature() & nat != 0): + count=0 + while(it.isEnd() == 0): + ve = it.getObject() + if(ve.getNature() & nat != 0): + count = count+1 + winner = ve + if(it.isIncoming() == 0): + winnerOrientation = 1 + else: + winnerOrientation = 0 + it.increment() + if(count != 1): + winner = None + break + if(winner != None): + # check whether this edge was part of the selection + if(winner.qi() != 0): + #print "---", winner.getId().getFirst(), winner.getId().getSecond() + # if not, let's check whether it's short enough with + # respect to the chain made without staying in the selection + #------------------------------------------------------------ + # Did we compute the prospective chain length already ? + if(self._length == 0): + #if not, let's do it + _it = pyChainSilhouetteGenericIterator(0,0) + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + _it.init() + while(_it.isEnd() == 0): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.increment() + if(_it.isBegin() != 0): + break; + _it.setBegin(winner) + _it.setCurrentEdge(winner) + _it.setOrientation(winnerOrientation) + if(_it.isBegin() == 0): + _it.decrement() + while ((_it.isEnd() == 0) and (_it.isBegin() == 0)): + ve = _it.getObject() + #print "--------", ve.getId().getFirst(), ve.getId().getSecond() + self._length = self._length + ve.getLength2D() + _it.decrement() + + # let's do the comparison: + # nw let's compute the length of this connex non selected part: + connexl = 0 + _cit = pyChainSilhouetteGenericIterator(0,0) + _cit.setBegin(winner) + _cit.setCurrentEdge(winner) + _cit.setOrientation(winnerOrientation) + _cit.init() + while((_cit.isEnd() == 0) and (_cit.getObject().qi() != 0)): + ve = _cit.getObject() + #print "-------- --------", ve.getId().getFirst(), ve.getId().getSecond() + connexl = connexl + ve.getLength2D() + _cit.increment() + if((connexl > self._percent * self._length) or (connexl > self._absLength)): + winner = None + return winner + + +## the natural chaining iterator +## It follows the edges of same nature on the same +## objects with preseance on silhouettes, then borders, +## then suggestive contours, then everything else. It doesn't chain the same ViewEdge twice +## You can specify whether to stay in the selection or not. +class pyNoIdChainSilhouetteIterator(ChainingIterator): + def __init__(self, stayInSelection=1): + ChainingIterator.__init__(self, stayInSelection, 1,None,1) + def getExactTypeName(self): + return "pyChainSilhouetteIterator" + def traverse(self, iter): + winner = None + it = AdjacencyIterator(iter) + nextVertex = self.getVertex() + if(nextVertex.getNature() & T_VERTEX != 0): + tvertex = nextVertex.castToTVertex() + mateVE = tvertex.mate(self.getCurrentEdge()) + while(it.isEnd() == 0): + ve = it.getObject() + feB = self.getCurrentEdge().fedgeB() + feA = ve.fedgeA() + vB = feB.vertexB() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeA() + feB = ve.fedgeB() + vB = feB.vertexB() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeB() + feB = ve.fedgeB() + vB = feB.vertexB() + vA = feA.vertexB() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + feA = self.getCurrentEdge().fedgeA() + feB = ve.fedgeA() + vB = feB.vertexA() + vA = feA.vertexA() + if vA.getId().getFirst() == vB.getId().getFirst(): + winner = ve + break + it.increment() + else: + ## case of NonTVertex + natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + for i in range(len(natures)): + currentNature = self.getCurrentEdge().getNature() + if(natures[i] & currentNature): + count=0 + while(it.isEnd() == 0): + visitNext = 0 + oNature = it.getObject().getNature() + if(oNature & natures[i] != 0): + if(natures[i] != oNature): + for j in range(i): + if(natures[j] & oNature != 0): + visitNext = 1 + break + if(visitNext != 0): + break + count = count+1 + winner = it.getObject() + it.increment() + if(count != 1): + winner = None + break + return winner + diff --git a/source/blender/freestyle/style_modules_blender/Functions0D.py b/source/blender/freestyle/style_modules_blender/Functions0D.py new file mode 100755 index 00000000000..62855648d1f --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/Functions0D.py @@ -0,0 +1,81 @@ +from Blender.Freestyle import * + + +class pyInverseCurvature2DAngleF0D(UnaryFunction0DDouble): + def getName(self): + return "InverseCurvature2DAngleF0D" + + def __call__(self, inter): + func = Curvature2DAngleF0D() + c = func(inter) + return (3.1415 - c) + +class pyCurvilinearLengthF0D(UnaryFunction0DDouble): + def getName(self): + return "CurvilinearLengthF0D" + + def __call__(self, inter): + i0d = inter.getObject() + s = i0d.getExactTypeName() + if (string.find(s, "CurvePoint") == -1): + print "CurvilinearLengthF0D: not implemented yet for %s" % (s) + return -1 + cp = castToCurvePoint(i0d) + return cp.t2d() + +## estimate anisotropy of density +class pyDensityAnisotropyF0D(UnaryFunction0DDouble): + def __init__(self,level): + UnaryFunction0DDouble.__init__(self) + self.IsoDensity = ReadCompleteViewMapPixelF0D(level) + self.d0Density = ReadSteerableViewMapPixelF0D(0, level) + self.d1Density = ReadSteerableViewMapPixelF0D(1, level) + self.d2Density = ReadSteerableViewMapPixelF0D(2, level) + self.d3Density = ReadSteerableViewMapPixelF0D(3, level) + def getName(self): + return "pyDensityAnisotropyF0D" + def __call__(self, inter): + c_iso = self.IsoDensity(inter) + c_0 = self.d0Density(inter) + c_1 = self.d1Density(inter) + c_2 = self.d2Density(inter) + c_3 = self.d3Density(inter) + cMax = max( max(c_0,c_1), max(c_2,c_3)) + cMin = min( min(c_0,c_1), min(c_2,c_3)) + if ( c_iso == 0 ): + v = 0 + else: + v = (cMax-cMin)/c_iso + return (v) + +## Returns the gradient vector for a pixel +## l +## the level at which one wants to compute the gradient +class pyViewMapGradientVectorF0D(UnaryFunction0DVec2f): + def __init__(self, l): + UnaryFunction0DVec2f.__init__(self) + self._l = l + self._step = pow(2,self._l) + def getName(self): + return "pyViewMapGradientVectorF0D" + def __call__(self, iter): + p = iter.getObject().getPoint2D() + gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + return Vec2f(gx, gy) + +class pyViewMapGradientNormF0D(UnaryFunction0DDouble): + def __init__(self, l): + UnaryFunction0DDouble.__init__(self) + self._l = l + self._step = pow(2,self._l) + def getName(self): + return "pyViewMapGradientNormF0D" + def __call__(self, iter): + p = iter.getObject().getPoint2D() + gx = ReadCompleteViewMapPixelCF(self._l, int(p.x()+self._step), int(p.y()))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + gy = ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y()+self._step))- ReadCompleteViewMapPixelCF(self._l, int(p.x()), int(p.y())) + grad = Vec2f(gx, gy) + return grad.norm() + + diff --git a/source/blender/freestyle/style_modules_blender/Functions1D.py b/source/blender/freestyle/style_modules_blender/Functions1D.py new file mode 100755 index 00000000000..d3474ffc9eb --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/Functions1D.py @@ -0,0 +1,45 @@ +from Blender.Freestyle import * +from Functions0D import * +import string + +class pyGetInverseProjectedZF1D(UnaryFunction1DDouble): + def getName(self): + return "pyGetInverseProjectedZF1D" + + def __call__(self, inter): + func = GetProjectedZF1D() + z = func(inter) + return (1.0 - z) + +class pyGetSquareInverseProjectedZF1D(UnaryFunction1DDouble): + def getName(self): + return "pyGetInverseProjectedZF1D" + + def __call__(self, inter): + func = GetProjectedZF1D() + z = func(inter) + return (1.0 - z*z) + +class pyDensityAnisotropyF1D(UnaryFunction1DDouble): + def __init__(self,level, integrationType=IntegrationType.MEAN, sampling=2.0): + UnaryFunction1DDouble.__init__(self, integrationType) + self._func = pyDensityAnisotropyF0D(level) + self._integration = integrationType + self._sampling = sampling + def getName(self): + return "pyDensityAnisotropyF1D" + def __call__(self, inter): + v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration) + return v + +class pyViewMapGradientNormF1D(UnaryFunction1DDouble): + def __init__(self,l, integrationType, sampling=2.0): + UnaryFunction1DDouble.__init__(self, integrationType) + self._func = pyViewMapGradientNormF0D(l) + self._integration = integrationType + self._sampling = sampling + def getName(self): + return "pyViewMapGradientNormF1D" + def __call__(self, inter): + v = integrateDouble(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration) + return v diff --git a/source/blender/freestyle/style_modules_blender/PredicatesB1D.py b/source/blender/freestyle/style_modules_blender/PredicatesB1D.py new file mode 100755 index 00000000000..21d90f96644 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/PredicatesB1D.py @@ -0,0 +1,70 @@ +from Blender.Freestyle import * +from Functions1D import * +from random import * + +class pyZBP1D(BinaryPredicate1D): + def getName(self): + return "pyZBP1D" + + def __call__(self, i1, i2): + func = GetZF1D() + return (func(i1) > func(i2)) + +class pyZDiscontinuityBP1D(BinaryPredicate1D): + def __init__(self, iType = IntegrationType.MEAN): + BinaryPredicate1D.__init__(self) + self._GetZDiscontinuity = ZDiscontinuityF1D(iType) + + def getName(self): + return "pyZDiscontinuityBP1D" + + def __call__(self, i1, i2): + return (self._GetZDiscontinuity(i1) > self._GetZDiscontinuity(i2)) + +class pyLengthBP1D(BinaryPredicate1D): + def getName(self): + return "LengthBP1D" + + def __call__(self, i1, i2): + return (i1.getLength2D() > i2.getLength2D()) + +class pySilhouetteFirstBP1D(BinaryPredicate1D): + def getName(self): + return "SilhouetteFirstBP1D" + + def __call__(self, inter1, inter2): + bpred = SameShapeIdBP1D() + if (bpred(inter1, inter2) != 1): + return 0 + if (inter1.getNature() & SILHOUETTE): + return (inter2.getNature() & SILHOUETTE) + return (inter1.getNature() == inter2.getNature()) + +class pyNatureBP1D(BinaryPredicate1D): + def getName(self): + return "NatureBP1D" + + def __call__(self, inter1, inter2): + return (inter1.getNature() & inter2.getNature()) + +class pyViewMapGradientNormBP1D(BinaryPredicate1D): + def __init__(self,l, sampling=2.0): + BinaryPredicate1D.__init__(self) + self._GetGradient = pyViewMapGradientNormF1D(l, IntegrationType.MEAN) + def getName(self): + return "pyViewMapGradientNormBP1D" + def __call__(self, i1,i2): + print "compare gradient" + return (self._GetGradient(i1) > self._GetGradient(i2)) + +class pyShuffleBP1D(BinaryPredicate1D): + def __init__(self): + BinaryPredicate1D.__init__(self) + seed(1) + def getName(self): + return "pyNearAndContourFirstBP1D" + + def __call__(self, inter1, inter2): + r1 = uniform(0,1) + r2 = uniform(0,1) + return (r1 self._a) + +class pyUEqualsUP0D(UnaryPredicate0D): + def __init__(self,u, w): + UnaryPredicate0D.__init__(self) + self._u = u + self._w = w + + def getName(self): + return "UEqualsUP0D" + + def __call__(self, inter): + func = pyCurvilinearLengthF0D() + u = func(inter) + return ( ( u > (self._u-self._w) ) and ( u < (self._u+self._w) ) ) + +class pyVertexNatureUP0D(UnaryPredicate0D): + def __init__(self,nature): + UnaryPredicate0D.__init__(self) + self._nature = nature + + def getName(self): + return "pyVertexNatureUP0D" + + def __call__(self, inter): + v = inter.getObject() + nat = v.getNature() + if(nat & self._nature): + return 1; + return 0 + +## check whether an Interface0DIterator +## is a TVertex and is the one that is +## hidden (inferred from the context) +class pyBackTVertexUP0D(UnaryPredicate0D): + def __init__(self): + UnaryPredicate0D.__init__(self) + self._getQI = QuantitativeInvisibilityF0D() + def getName(self): + return "pyBackTVertexUP0D" + def __call__(self, iter): + v = iter.getObject() + nat = v.getNature() + if(nat & T_VERTEX == 0): + return 0 + next = iter + if(next.isEnd()): + return 0 + if(self._getQI(next) != 0): + return 1 + return 0 + +class pyParameterUP0DGoodOne(UnaryPredicate0D): + def __init__(self,pmin,pmax): + UnaryPredicate0D.__init__(self) + self._m = pmin + self._M = pmax + #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D() + + def getName(self): + return "pyCurvilinearAbscissaHigherThanUP0D" + + def __call__(self, inter): + #s = self.getCurvilinearAbscissa(inter) + u = inter.u() + #print u + return ((u>=self._m) and (u<=self._M)) + +class pyParameterUP0D(UnaryPredicate0D): + def __init__(self,pmin,pmax): + UnaryPredicate0D.__init__(self) + self._m = pmin + self._M = pmax + #self.getCurvilinearAbscissa = GetCurvilinearAbscissaF0D() + + def getName(self): + return "pyCurvilinearAbscissaHigherThanUP0D" + + def __call__(self, inter): + func = Curvature2DAngleF0D() + c = func(inter) + b1 = (c>0.1) + #s = self.getCurvilinearAbscissa(inter) + u = inter.u() + #print u + b = ((u>=self._m) and (u<=self._M)) + return b and b1 + + diff --git a/source/blender/freestyle/style_modules_blender/PredicatesU1D.py b/source/blender/freestyle/style_modules_blender/PredicatesU1D.py new file mode 100755 index 00000000000..3dad3519300 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/PredicatesU1D.py @@ -0,0 +1,381 @@ +from Blender.Freestyle import * +from Functions1D import * + +count = 0 +class pyNFirstUP1D(UnaryPredicate1D): + def __init__(self, n): + UnaryPredicate1D.__init__(self) + self.__n = n + def __call__(self, inter): + global count + count = count + 1 + if count <= self.__n: + return 1 + return 0 + +class pyHigherLengthUP1D(UnaryPredicate1D): + def __init__(self,l): + UnaryPredicate1D.__init__(self) + self._l = l + + def getName(self): + return "HigherLengthUP1D" + + def __call__(self, inter): + return (inter.getLength2D() > self._l) + +class pyNatureUP1D(UnaryPredicate1D): + def __init__(self,nature): + UnaryPredicate1D.__init__(self) + self._nature = nature + self._getNature = CurveNatureF1D() + + def getName(self): + return "pyNatureUP1D" + + def __call__(self, inter): + if(self._getNature(inter) & self._nature): + return 1 + return 0 + +class pyHigherNumberOfTurnsUP1D(UnaryPredicate1D): + def __init__(self,n,a): + UnaryPredicate1D.__init__(self) + self._n = n + self._a = a + + def getName(self): + return "HigherNumberOfTurnsUP1D" + + def __call__(self, inter): + count = 0 + func = Curvature2DAngleF0D() + it = inter.verticesBegin() + while(it.isEnd() == 0): + if(func(it) > self._a): + count = count+1 + if(count > self._n): + return 1 + it.increment() + return 0 + +class pyDensityUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, integration = IntegrationType.MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = threshold + self._integration = integration + self._func = DensityF1D(self._wsize, self._integration, sampling) + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + if(self._func(inter) < self._threshold): + return 1 + return 0 + +class pyLowSteerableViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = IntegrationType.MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + + def getName(self): + return "pyLowSteerableViewMapDensityUP1D" + + def __call__(self, inter): + func = GetSteerableViewMapDensityF1D(self._level, self._integration) + v = func(inter) + print v + if(v < self._threshold): + return 1 + return 0 + +class pyLowDirectionalViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, orientation, level,integration = IntegrationType.MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._orientation = orientation + self._level = level + self._integration = integration + + def getName(self): + return "pyLowDirectionalViewMapDensityUP1D" + + def __call__(self, inter): + func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration) + v = func(inter) + #print v + if(v < self._threshold): + return 1 + return 0 + +class pyHighSteerableViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = IntegrationType.MEAN): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + self._func = GetSteerableViewMapDensityF1D(self._level, self._integration) + def getName(self): + return "pyHighSteerableViewMapDensityUP1D" + + def __call__(self, inter): + + v = self._func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyHighDirectionalViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, orientation, level,integration = IntegrationType.MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._orientation = orientation + self._level = level + self._integration = integration + self._sampling = sampling + def getName(self): + return "pyLowDirectionalViewMapDensityUP1D" + + def __call__(self, inter): + func = GetDirectionalViewMapDensityF1D(self._orientation, self._level, self._integration, self._sampling) + v = func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyHighViewMapDensityUP1D(UnaryPredicate1D): + def __init__(self,threshold, level,integration = IntegrationType.MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._level = level + self._integration = integration + self._sampling = sampling + self._func = GetCompleteViewMapDensityF1D(self._level, self._integration, self._sampling) # 2.0 is the smpling + + def getName(self): + return "pyHighViewMapDensityUP1D" + + def __call__(self, inter): + #print "toto" + #print func.getName() + #print inter.getExactTypeName() + v= self._func(inter) + if(v > self._threshold): + return 1 + return 0 + +class pyDensityFunctorUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, functor, funcmin=0.0, funcmax=1.0, integration = IntegrationType.MEAN): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = float(threshold) + self._functor = functor + self._funcmin = float(funcmin) + self._funcmax = float(funcmax) + self._integration = integration + + def getName(self): + return "pyDensityFunctorUP1D" + + def __call__(self, inter): + func = DensityF1D(self._wsize, self._integration) + res = self._functor(inter) + k = (res-self._funcmin)/(self._funcmax-self._funcmin) + if(func(inter) < self._threshold*k): + return 1 + return 0 + +class pyZSmallerUP1D(UnaryPredicate1D): + def __init__(self,z, integration=IntegrationType.MEAN): + UnaryPredicate1D.__init__(self) + self._z = z + self._integration = integration + def getName(self): + return "pyZSmallerUP1D" + + def __call__(self, inter): + func = GetProjectedZF1D(self._integration) + if(func(inter) < self._z): + return 1 + return 0 + +class pyIsOccludedByUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyIsOccludedByUP1D" + def __call__(self, inter): + func = GetShapeF1D() + shapes = func(inter) + for s in shapes: + if(s.getId() == self._id): + return 0 + it = inter.verticesBegin() + itlast = inter.verticesEnd() + itlast.decrement() + v = it.getObject() + vlast = itlast.getObject() + tvertex = v.castToTVertex() + if(tvertex != None): + #print "TVertex: [ ", tvertex.getId().getFirst(), ",", tvertex.getId().getSecond()," ]" + eit = tvertex.edgesBegin() + while(eit.isEnd() == 0): + ve = eit.getObject().first + if(ve.shape_id() == self._id): + return 1 + #print "-------", ve.getId().getFirst(), "-", ve.getId().getSecond() + eit.increment() + tvertex = vlast.castToTVertex() + if(tvertex != None): + #print "TVertex: [ ", tvertex.getId().getFirst(), ",", tvertex.getId().getSecond()," ]" + eit = tvertex.edgesBegin() + while(eit.isEnd() == 0): + ve = eit.getObject().first + if(ve.shape_id() == self._id): + return 1 + #print "-------", ve.getId().getFirst(), "-", ve.getId().getSecond() + eit.increment() + return 0 + +class pyIsInOccludersListUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyIsInOccludersListUP1D" + def __call__(self, inter): + func = GetOccludersF1D() + occluders = func(inter) + for a in occluders: + if(a.getId() == self._id): + return 1 + return 0 + +class pyIsOccludedByItselfUP1D(UnaryPredicate1D): + def __init__(self): + UnaryPredicate1D.__init__(self) + self.__func1 = GetOccludersF1D() + self.__func2 = GetShapeF1D() + def getName(self): + return "pyIsOccludedByItselfUP1D" + def __call__(self, inter): + lst1 = self.__func1(inter) + lst2 = self.__func2(inter) + for vs1 in lst1: + for vs2 in lst2: + if vs1.getId() == vs2.getId(): + return 1 + return 0 + +class pyIsOccludedByIdListUP1D(UnaryPredicate1D): + def __init__(self, idlist): + UnaryPredicate1D.__init__(self) + self._idlist = idlist + self.__func1 = GetOccludersF1D() + def getName(self): + return "pyIsOccludedByIdListUP1D" + def __call__(self, inter): + lst1 = self.__func1(inter) + for vs1 in lst1: + for id in self._idlist: + if vs1.getId() == id: + return 1 + return 0 + +class pyShapeIdListUP1D(UnaryPredicate1D): + def __init__(self,idlist): + UnaryPredicate1D.__init__(self) + self._idlist = idlist + self._funcs = [] + for id in idlist : + self._funcs.append(ShapeUP1D(id.getFirst(), id.getSecond())) + + def getName(self): + return "pyShapeIdUP1D" + def __call__(self, inter): + for func in self._funcs : + if(func(inter) == 1) : + return 1 + return 0 + +## deprecated +class pyShapeIdUP1D(UnaryPredicate1D): + def __init__(self,id): + UnaryPredicate1D.__init__(self) + self._id = id + def getName(self): + return "pyShapeIdUP1D" + def __call__(self, inter): + func = GetShapeF1D() + shapes = func(inter) + for a in shapes: + if(a.getId() == self._id): + return 1 + return 0 + +class pyHighDensityAnisotropyUP1D(UnaryPredicate1D): + def __init__(self,threshold, level, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._l = threshold + self.func = pyDensityAnisotropyF1D(level, IntegrationType.MEAN, sampling) + def getName(self): + return "pyHighDensityAnisotropyUP1D" + def __call__(self, inter): + return (self.func(inter) > self._l) + +class pyHighViewMapGradientNormUP1D(UnaryPredicate1D): + def __init__(self,threshold, l, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._threshold = threshold + self._GetGradient = pyViewMapGradientNormF1D(l, IntegrationType.MEAN) + def getName(self): + return "pyHighViewMapGradientNormUP1D" + def __call__(self, inter): + gn = self._GetGradient(inter) + #print gn + return (gn > self._threshold) + +class pyDensityVariableSigmaUP1D(UnaryPredicate1D): + def __init__(self,functor, sigmaMin,sigmaMax, lmin, lmax, tmin, tmax, integration = IntegrationType.MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._functor = functor + self._sigmaMin = float(sigmaMin) + self._sigmaMax = float(sigmaMax) + self._lmin = float(lmin) + self._lmax = float(lmax) + self._tmin = tmin + self._tmax = tmax + self._integration = integration + self._sampling = sampling + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + sigma = (self._sigmaMax-self._sigmaMin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._sigmaMin + t = (self._tmax-self._tmin)/(self._lmax-self._lmin)*(self._functor(inter)-self._lmin) + self._tmin + if(sigma 4* c ): + if ( c < 1.5*self._threshold ): + return 1 + return 0 + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0))) +Operators.select(pyHigherLengthUP1D(40)) +## selects lines having a high anisotropic a priori density +Operators.select(pyHighDensityAnisotropyUP1D(0.3,4)) +Operators.sort(pyLengthBP1D()) +shaders_list = [ + SamplingShader(2.0), + ConstantThicknessShader(2), + ConstantColorShader(0.2,0.2,0.25,1), + ] +## uniform culling +Operators.create(pyDensityUP1D(3.0,2.0e-2, IntegrationType.MEAN, 0.1), shaders_list) + + diff --git a/source/blender/freestyle/style_modules_blender/multiple_parameterization.py b/source/blender/freestyle/style_modules_blender/multiple_parameterization.py new file mode 100755 index 00000000000..76565424080 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/multiple_parameterization.py @@ -0,0 +1,51 @@ +# +# Filename : multiple_parameterization.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The thickness and the color of the strokes vary continuously +# independently from occlusions although only +# visible lines are actually drawn. This is equivalent +# to assigning the thickness using a parameterization covering +# the complete silhouette (visible+invisible) and drawing +# the strokes using a second parameterization that only +# covers the visible portions. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## Chain following the same nature, but without the restriction +## of staying inside the selection (0). +Operators.bidirectionalChain(ChainSilhouetteIterator(0)) +shaders_list = [ + SamplingShader(20), + IncreasingThicknessShader(1.5, 30), + ConstantColorShader(0.0,0.0,0.0), + IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(-1), + pyHLRShader() ## this shader draws only visible portions + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/nature.py b/source/blender/freestyle/style_modules_blender/nature.py new file mode 100755 index 00000000000..b3441ea2b23 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/nature.py @@ -0,0 +1,43 @@ +# +# Filename : nature.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Uses the NatureUP1D predicate to select the lines +# of a given type (among SILHOUETTE, CREASE, SUGGESTIVE_CONTOURS, +# BORDERS). +# The suggestive contours must have been enabled in the +# options dialog to appear in the View Map. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(pyNatureUP1D(SILHOUETTE)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D( pyNatureUP1D( SILHOUETTE) ) ) +shaders_list = [ + IncreasingThicknessShader(3, 10), + IncreasingColorShader(0.0,0.0,0.0, 1, 0.8,0,0,1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/near_lines.py b/source/blender/freestyle/style_modules_blender/near_lines.py new file mode 100755 index 00000000000..1e9e278643a --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/near_lines.py @@ -0,0 +1,44 @@ +# +# Filename : near_lines.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the lines that are "closer" than a threshold +# (between 0 and 1) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from PredicatesU1D import * +from shaders import * + +upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, IntegrationType.MEAN)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + TextureAssignerShader(-1), + ConstantThicknessShader(5), + ConstantColorShader(0.0, 0.0, 0.0) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py b/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py new file mode 100755 index 00000000000..21e778aee79 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py @@ -0,0 +1,45 @@ +# +# Filename : occluded_by_specific_object.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws only the lines that are occluded by a given object +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from shaders import * + +## the id of the occluder (use SHIFT+click on the ViewMap to +## retrieve ids) +id = Id(3,0) +upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)), +pyIsInOccludersListUP1D(id)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + SamplingShader(5), + ConstantThicknessShader(3), + ConstantColorShader(0.3,0.3,0.3,1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/polygonalize.py b/source/blender/freestyle/style_modules_blender/polygonalize.py new file mode 100755 index 00000000000..beb48f812f7 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/polygonalize.py @@ -0,0 +1,40 @@ +# +# Filename : polygonalize.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Make the strokes more "polygonal" +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(2.0), + ConstantThicknessShader(3), + ConstantColorShader(0.0,0.0,0.0), + PolygonalizationShader(8) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/source/blender/freestyle/style_modules_blender/qi0.py b/source/blender/freestyle/style_modules_blender/qi0.py new file mode 100755 index 00000000000..246cda79607 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/qi0.py @@ -0,0 +1,41 @@ +# +# Filename : qi0.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# (most basic style module) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(5.0), + ConstantThicknessShader(4.0), + ConstantColorShader(0.0,0.0,0.0) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py b/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py new file mode 100755 index 00000000000..8cc5bf4c63d --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py @@ -0,0 +1,43 @@ +# +# Filename : qi0_not_external_contour.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# that do not belong to the external contour of the scene +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * + +upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(4, 150, 2, 1, 1), + IncreasingThicknessShader(2, 5), + BackboneStretcherShader(20), + IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/qi1.py b/source/blender/freestyle/style_modules_blender/qi1.py new file mode 100755 index 00000000000..0125fd71ea8 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/qi1.py @@ -0,0 +1,42 @@ +# +# Filename : qi1.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws lines hidden by one surface. +# *** Quantitative Invisibility must have been +# enabled in the options dialog to use this style module **** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(1)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(1))) +shaders_list = [ + SamplingShader(5.0), + ConstantThicknessShader(3), + ConstantColorShader(0.5,0.5,0.5, 1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/qi2.py b/source/blender/freestyle/style_modules_blender/qi2.py new file mode 100755 index 00000000000..9bb356c0810 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/qi2.py @@ -0,0 +1,42 @@ +# +# Filename : qi2.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws lines hidden by two surfaces. +# *** Quantitative Invisibility must have been +# enabled in the options dialog to use this style module **** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(2)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(2))) +shaders_list = [ + SamplingShader(10), + ConstantThicknessShader(1.5), + ConstantColorShader(0.7,0.7,0.7, 1) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py b/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py new file mode 100755 index 00000000000..c9d73a57c46 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py @@ -0,0 +1,68 @@ +# +# Filename : sequentialsplit_sketchy.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Use the sequential split with two different +# predicates to specify respectively the starting and +# the stopping extremities for strokes +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from Functions0D import * + +## Predicate to tell whether a TVertex +## corresponds to a change from 0 to 1 or not. +class pyBackTVertexUP0D(UnaryPredicate0D): + def __init__(self): + UnaryPredicate0D.__init__(self) + self._getQI = QuantitativeInvisibilityF0D() + def getName(self): + return "pyBackTVertexUP0D" + def __call__(self, iter): + v = iter.getObject() + nat = v.getNature() + if(nat & T_VERTEX == 0): + return 0 + if(self._getQI(iter) != 0): + return 1 + return 0 + + +upred = QuantitativeInvisibilityUP1D(0) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +## starting and stopping predicates: +start = pyVertexNatureUP0D(NON_T_VERTEX) +stop = pyBackTVertexUP0D() +Operators.sequentialSplit(start, stop, 10) +shaders_list = [ + SpatialNoiseShader(7, 120, 2, 1, 1), + IncreasingThicknessShader(5, 8), + ConstantColorShader(0.2, 0.2, 0.2, 1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/source/blender/freestyle/style_modules_blender/shaders.py b/source/blender/freestyle/style_modules_blender/shaders.py new file mode 100755 index 00000000000..ee45324e186 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/shaders.py @@ -0,0 +1,1288 @@ +from Blender.Freestyle import * +from PredicatesU0D import * +from PredicatesB1D import * +from PredicatesU1D import * +from logical_operators import * +from ChainingIterators import * +from random import * +from math import * +from vector import * + +## thickness modifiers +###################### + +class pyDepthDiscontinuityThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = float(min) + self.__max = float(max) + self.__func = ZDiscontinuityF0D() + def getName(self): + return "pyDepthDiscontinuityThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min=0.0 + z_max=1.0 + a = (self.__max - self.__min)/(z_max-z_min) + b = (self.__min*z_max-self.__max*z_min)/(z_max-z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + thickness = a*z+b + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + +class pyConstantThicknessShader(StrokeShader): + def __init__(self, thickness): + StrokeShader.__init__(self) + self._thickness = thickness + + def getName(self): + return "pyConstantThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + t = self._thickness/2.0 + att.setThickness(t, t) + it.increment() + +class pyFXSThicknessShader(StrokeShader): + def __init__(self, thickness): + StrokeShader.__init__(self) + self._thickness = thickness + + def getName(self): + return "pyFXSThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + t = self._thickness/2.0 + att.setThickness(t, t) + it.increment() + +class pyFXSVaryingThicknessWithDensityShader(StrokeShader): + def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax): + StrokeShader.__init__(self) + self.wsize= wsize + self.threshold_min= threshold_min + self.threshold_max= threshold_max + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyVaryingThicknessWithDensityShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = DensityF0D(self.wsize) + while it.isEnd() == 0: + att = it.getObject().attribute() + toto = it.castToInterface0DIterator() + c= func(toto) + if (c < self.threshold_min ): + c = self.threshold_min + if (c > self.threshold_max ): + c = self.threshold_max +## t = (c - self.threshold_min)/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin + t = (self.threshold_max - c )/(self.threshold_max - self.threshold_min)*(self._thicknessMax-self._thicknessMin) + self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() +class pyIncreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyIncreasingThicknessShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = (1.0 - c)*self._thicknessMin + c * self._thicknessMax + else: + t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +class pyConstrainedIncreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax, ratio): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + self._ratio = ratio + + def getName(self): + return "pyConstrainedIncreasingThicknessShader" + def shade(self, stroke): + slength = stroke.getLength2D() + tmp = self._ratio*slength + maxT = 0.0 + if(tmp < self._thicknessMax): + maxT = tmp + else: + maxT = self._thicknessMax + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = (1.0 - c)*self._thicknessMin + c * maxT + else: + t = (1.0 - c)*maxT + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + if(i == n-1): + att.setThickness(self._thicknessMin/2.0, self._thicknessMin/2.0) + i = i+1 + it.increment() + +class pyDecreasingThicknessShader(StrokeShader): + def __init__(self, thicknessMax, thicknessMin): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + + def getName(self): + return "pyDecreasingThicknessShader" + def shade(self, stroke): + l = stroke.getLength2D() + tMax = self._thicknessMax + if(self._thicknessMax > 0.33*l): + tMax = 0.33*l + tMin = self._thicknessMin + if(self._thicknessMin > 0.1*l): + tMin = 0.1*l + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + t = (1.0 - c)*tMax +c*tMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +def smoothC( a, exp ): + c = pow(float(a),exp)*pow(2.0,exp) + return c + +class pyNonLinearVaryingThicknessShader(StrokeShader): + def __init__(self, thicknessExtremity, thicknessMiddle, exponent): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMiddle + self._thicknessMax = thicknessExtremity + self._exponent = exponent + + def getName(self): + return "pyNonLinearVaryingThicknessShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + if(i < float(n)/2.0): + c = float(i)/float(n) + else: + c = float(n-i)/float(n) + c = smoothC(c, self._exponent) + t = (1.0 - c)*self._thicknessMax + c * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +## Spherical linear interpolation (cos) +class pySLERPThicknessShader(StrokeShader): + def __init__(self, thicknessMin, thicknessMax, omega=1.2): + StrokeShader.__init__(self) + self._thicknessMin = thicknessMin + self._thicknessMax = thicknessMax + self._omega = omega + + def getName(self): + return "pySLERPThicknessShader" + def shade(self, stroke): + slength = stroke.getLength2D() + tmp = 0.33*slength + maxT = self._thicknessMax + if(tmp < self._thicknessMax): + maxT = tmp + + n = stroke.strokeVerticesSize() + i = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(i)/float(n) + if(i < float(n)/2.0): + t = sin((1-c)*self._omega)/sinh(self._omega)*self._thicknessMin + sin(c*self._omega)/sinh(self._omega) * maxT + else: + t = sin((1-c)*self._omega)/sinh(self._omega)*maxT + sin(c*self._omega)/sinh(self._omega) * self._thicknessMin + att.setThickness(t/2.0, t/2.0) + i = i+1 + it.increment() + +class pyTVertexThickenerShader(StrokeShader): ## FIXME + def __init__(self, a=1.5, n=3): + StrokeShader.__init__(self) + self._a = a + self._n = n + + def getName(self): + return "pyTVertexThickenerShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + predTVertex = pyVertexNatureUP0D(T_VERTEX) + while it.isEnd() == 0: + if(predTVertex(it) == 1): + it2 = StrokeVertexIterator(it) + it2.increment() + if not(it.isBegin() or it2.isEnd()): + it.increment() + continue + n = self._n + a = self._a + if(it.isBegin()): + it3 = StrokeVertexIterator(it) + count = 0 + while (it3.isEnd() == 0 and count < n): + att = it3.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it3.increment() + count = count + 1 + if(it2.isEnd()): + it4 = StrokeVertexIterator(it) + count = 0 + while (it4.isBegin() == 0 and count < n): + att = it4.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it4.decrement() + count = count + 1 + if ((it4.isBegin() == 1)): + att = it4.getObject().attribute() + tr = att.getThicknessR(); + tl = att.getThicknessL(); + r = (a-1.0)/float(n-1)*(float(n)/float(count+1) - 1) + 1 + #r = (1.0-a)/float(n-1)*count + a + att.setThickness(r*tr, r*tl) + it.increment() + +class pyImportance2DThicknessShader(StrokeShader): + def __init__(self, x, y, w, kmin, kmax): + StrokeShader.__init__(self) + self._x = x + self._y = y + self._w = float(w) + self._kmin = float(kmin) + self._kmax = float(kmax) + + def getName(self): + return "pyImportanceThicknessShader" + def shade(self, stroke): + origin = Vec2(self._x, self._y) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + p = Vec2(v.getProjectedX(), v.getProjectedY()) + d = (p-origin).length() + if(d>self._w): + k = self._kmin + else: + k = (self._kmax*(self._w-d) + self._kmin*d)/self._w + att = v.attribute() + tr = att.getThicknessR() + tl = att.getThicknessL() + att.setThickness(k*tr/2.0, k*tl/2.0) + it.increment() + +class pyImportance3DThicknessShader(StrokeShader): + def __init__(self, x, y, z, w, kmin, kmax): + StrokeShader.__init__(self) + self._x = x + self._y = y + self._z = z + self._w = float(w) + self._kmin = float(kmin) + self._kmax = float(kmax) + + def getName(self): + return "pyImportance3DThicknessShader" + def shade(self, stroke): + origin = Vec3(self._x, self._y, self._z) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + p = Vec3(v.getX(), v.getY(), v.getZ()) + d = (p-origin).length() + if(d>self._w): + k = self._kmin + else: + k = (self._kmax*(self._w-d) + self._kmin*d)/self._w + att = v.attribute() + tr = att.getThicknessR() + tl = att.getThicknessL() + att.setThickness(k*tr/2.0, k*tl/2.0) + it.increment() + +class pyZDependingThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = min + self.__max = max + self.__func = GetProjectedZF0D() + def getName(self): + return "pyZDependingThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min = 1 + z_max = 0 + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + if z < z_min: + z_min = z + elif z > z_max: + z_max = z + it.increment() + z_diff = 1 / (z_max - z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = (self.__func(it.castToInterface0DIterator()) - z_min) * z_diff + thickness = (1 - z) * self.__max + z * self.__min + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + + +## color modifiers +################## + +class pyConstantColorShader(StrokeShader): + def __init__(self,r,g,b, a = 1): + StrokeShader.__init__(self) + self._r = r + self._g = g + self._b = b + self._a = a + def getName(self): + return "pyConstantColorShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + att.setColor(self._r, self._g, self._b) + att.setAlpha(self._a) + it.increment() + +#c1->c2 +class pyIncreasingColorShader(StrokeShader): + def __init__(self,r1,g1,b1,a1, r2,g2,b2,a2): + StrokeShader.__init__(self) + self._c1 = [r1,g1,b1,a1] + self._c2 = [r2,g2,b2,a2] + def getName(self): + return "pyIncreasingColorShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() - 1 + inc = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + c = float(inc)/float(n) + + att.setColor( (1-c)*self._c1[0] + c*self._c2[0], + (1-c)*self._c1[1] + c*self._c2[1], + (1-c)*self._c1[2] + c*self._c2[2],) + att.setAlpha((1-c)*self._c1[3] + c*self._c2[3],) + inc = inc+1 + it.increment() + +# c1->c2->c1 +class pyInterpolateColorShader(StrokeShader): + def __init__(self,r1,g1,b1,a1, r2,g2,b2,a2): + StrokeShader.__init__(self) + self._c1 = [r1,g1,b1,a1] + self._c2 = [r2,g2,b2,a2] + def getName(self): + return "pyInterpolateColorShader" + def shade(self, stroke): + n = stroke.strokeVerticesSize() - 1 + inc = 0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + u = float(inc)/float(n) + c = 1-2*(fabs(u-0.5)) + att.setColor( (1-c)*self._c1[0] + c*self._c2[0], + (1-c)*self._c1[1] + c*self._c2[1], + (1-c)*self._c1[2] + c*self._c2[2],) + att.setAlpha((1-c)*self._c1[3] + c*self._c2[3],) + inc = inc+1 + it.increment() + +class pyMaterialColorShader(StrokeShader): + def __init__(self, threshold=50): + StrokeShader.__init__(self) + self._threshold = threshold + + def getName(self): + return "pyMaterialColorShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = MaterialF0D() + xn = 0.312713 + yn = 0.329016 + Yn = 1.0 + un = 4.* xn/ ( -2.*xn + 12.*yn + 3. ) + vn= 9.* yn/ ( -2.*xn + 12.*yn +3. ) + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + mat = func(toto) + + r = mat.diffuseR() + g = mat.diffuseG() + b = mat.diffuseB() + + X = 0.412453*r + 0.35758 *g + 0.180423*b + Y = 0.212671*r + 0.71516 *g + 0.072169*b + Z = 0.019334*r + 0.119193*g + 0.950227*b + + if((X == 0) and (Y == 0) and (Z == 0)): + X = 0.01 + Y = 0.01 + Z = 0.01 + u = 4.*X / (X + 15.*Y + 3.*Z) + v = 9.*Y / (X + 15.*Y + 3.*Z) + + L= 116. * math.pow((Y/Yn),(1./3.)) -16 + U = 13. * L * (u - un) + V = 13. * L * (v - vn) + + if (L > self._threshold): + L = L/1.3 + U = U+10 + else: + L = L +2.5*(100-L)/5. + U = U/3.0 + V = V/3.0 + u = U / (13. * L) + un + v = V / (13. * L) + vn + + Y = Yn * math.pow( ((L+16.)/116.), 3.) + X = -9. * Y * u / ((u - 4.)* v - u * v) + Z = (9. * Y - 15*v*Y - v*X) /( 3. * v) + + r = 3.240479 * X - 1.53715 * Y - 0.498535 * Z + g = -0.969256 * X + 1.875991 * Y + 0.041556 * Z + b = 0.055648 * X - 0.204043 * Y + 1.057311 * Z + + att = it.getObject().attribute() + att.setColor(r, g, b) + it.increment() + +class pyRandomColorShader(StrokeShader): + def getName(self): + return "pyRandomColorShader" + def __init__(self, s=1): + StrokeShader.__init__(self) + seed(s) + def shade(self, stroke): + ## pick a random color + c0 = float(uniform(15,75))/100.0 + c1 = float(uniform(15,75))/100.0 + c2 = float(uniform(15,75))/100.0 + print c0, c1, c2 + it = stroke.strokeVerticesBegin() + while(it.isEnd() == 0): + it.getObject().attribute().setColor(c0,c1,c2) + it.increment() + +class py2DCurvatureColorShader(StrokeShader): + def getName(self): + return "py2DCurvatureColorShader" + + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + func = Curvature2DAngleF0D() + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + sv = it.getObject() + att = sv.attribute() + c = func(toto) + if (c<0): + print "negative 2D curvature" + color = 10.0 * c/3.1415 + print color + att.setColor(color,color,color); + it.increment() + +class pyTimeColorShader(StrokeShader): + def __init__(self, step=0.01): + StrokeShader.__init__(self) + self._t = 0 + self._step = step + def shade(self, stroke): + c = self._t*1.0 + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + att = it.getObject().attribute() + att.setColor(c,c,c) + it.increment() + self._t = self._t+self._step + +## geometry modifiers + +class pySamplingShader(StrokeShader): + def __init__(self, sampling): + StrokeShader.__init__(self) + self._sampling = sampling + def getName(self): + return "pySamplingShader" + def shade(self, stroke): + stroke.Resample(float(self._sampling)) + +class pyBackboneStretcherShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + vn_1 = itn_1.getObject() + vn = itn.getObject() + p0 = Vec2f(v0.getProjectedX(), v0.getProjectedY()) + pn = Vec2f(vn.getProjectedX(), vn.getProjectedY()) + p1 = Vec2f(v1.getProjectedX(), v1.getProjectedY()) + pn_1 = Vec2f(vn_1.getProjectedX(), vn_1.getProjectedY()) + d1 = p0-p1 + d1 = d1/d1.norm() + dn = pn-pn_1 + dn = dn/dn.norm() + newFirst = p0+d1*float(self._l) + newLast = pn+dn*float(self._l) + v0.setPoint(newFirst) + vn.setPoint(newLast) + +class pyLengthDependingBackboneStretcherShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherShader" + def shade(self, stroke): + l = stroke.getLength2D() + stretch = self._l*l + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + vn_1 = itn_1.getObject() + vn = itn.getObject() + p0 = Vec2f(v0.getProjectedX(), v0.getProjectedY()) + pn = Vec2f(vn.getProjectedX(), vn.getProjectedY()) + p1 = Vec2f(v1.getProjectedX(), v1.getProjectedY()) + pn_1 = Vec2f(vn_1.getProjectedX(), vn_1.getProjectedY()) + d1 = p0-p1 + d1 = d1/d1.norm() + dn = pn-pn_1 + dn = dn/dn.norm() + newFirst = p0+d1*float(stretch) + newLast = pn+dn*float(stretch) + v0.setPoint(newFirst) + vn.setPoint(newLast) + + +## Shader to replace a stroke by its corresponding tangent +class pyGuidingLineShader(StrokeShader): + def getName(self): + return "pyGuidingLineShader" + ## shading method + def shade(self, stroke): + it = stroke.strokeVerticesBegin() ## get the first vertex + itlast = stroke.strokeVerticesEnd() ## + itlast.decrement() ## get the last one + t = itlast.getObject().getPoint() - it.getObject().getPoint() ## tangent direction + itmiddle = StrokeVertexIterator(it) ## + while(itmiddle.getObject().u()<0.5): ## look for the stroke middle vertex + itmiddle.increment() ## + it = StrokeVertexIterator(itmiddle) + it.increment() + while(it.isEnd() == 0): ## position all the vertices along the tangent for the right part + it.getObject().setPoint(itmiddle.getObject().getPoint() \ + +t*(it.getObject().u()-itmiddle.getObject().u())) + it.increment() + it = StrokeVertexIterator(itmiddle) + it.decrement() + while(it.isBegin() == 0): ## position all the vertices along the tangent for the left part + it.getObject().setPoint(itmiddle.getObject().getPoint() \ + -t*(itmiddle.getObject().u()-it.getObject().u())) + it.decrement() + it.getObject().setPoint(itmiddle.getObject().getPoint()-t*(itmiddle.getObject().u())) ## first vertex + + +class pyBackboneStretcherNoCuspShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherNoCuspShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + p0 = v0.getPoint() + p1 = v1.getPoint() + d1 = p0-p1 + d1 = d1/d1.norm() + newFirst = p0+d1*float(self._l) + v0.setPoint(newFirst) + vn_1 = itn_1.getObject() + vn = itn.getObject() + if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + pn = vn.getPoint() + pn_1 = vn_1.getPoint() + dn = pn-pn_1 + dn = dn/dn.norm() + newLast = pn+dn*float(self._l) + vn.setPoint(newLast) + +normalInfo=Normal2DF0D() +curvatureInfo=Curvature2DAngleF0D() + +def edgestopping(x, sigma): + return exp(- x*x/(2*sigma*sigma)) + +class pyDiffusion2Shader(StrokeShader): + def __init__(self, lambda1, nbIter): + StrokeShader.__init__(self) + self._lambda = lambda1 + self._nbIter = nbIter + self._normalInfo = Normal2DF0D() + self._curvatureInfo = Curvature2DAngleF0D() + def getName(self): + return "pyDiffusionShader" + def shade(self, stroke): + for i in range (1, self._nbIter): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v=it.getObject() + p1 = v.getPoint() + p2 = self._normalInfo(it.castToInterface0DIterator())*self._lambda*self._curvatureInfo(it.castToInterface0DIterator()) + v.setPoint(p1+p2) + it.increment() + +class pyTipRemoverShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyTipRemoverShader" + def shade(self, stroke): + originalSize = stroke.strokeVerticesSize() + if(originalSize<4): + return + verticesToRemove = [] + oldAttributes = [] + it = stroke.strokeVerticesBegin() + while(it.isEnd() == 0): + v = it.getObject() + if((v.curvilinearAbscissa() < self._l) or (v.strokeLength()-v.curvilinearAbscissa() < self._l)): + verticesToRemove.append(v) + oldAttributes.append(StrokeAttribute(v.attribute())) + it.increment() + if(originalSize-len(verticesToRemove) < 2): + return + for sv in verticesToRemove: + stroke.RemoveVertex(sv) + stroke.Resample(originalSize) + if(stroke.strokeVerticesSize() != originalSize): + print "pyTipRemover: Warning: resampling problem" + it = stroke.strokeVerticesBegin() + for a in oldAttributes: + if(it.isEnd() == 1): + break + v = it.getObject() + v.setAttribute(a) + it.increment() + +class pyTVertexRemoverShader(StrokeShader): + def getName(self): + return "pyTVertexRemoverShader" + def shade(self, stroke): + if(stroke.strokeVerticesSize() <= 3 ): + return + predTVertex = pyVertexNatureUP0D(T_VERTEX) + it = stroke.strokeVerticesBegin() + itlast = stroke.strokeVerticesEnd() + itlast.decrement() + if(predTVertex(it) == 1): + stroke.RemoveVertex(it.getObject()) + if(predTVertex(itlast) == 1): + stroke.RemoveVertex(itlast.getObject()) + +class pyExtremitiesOrientationShader(StrokeShader): + def __init__(self, x1,y1,x2=0,y2=0): + StrokeShader.__init__(self) + self._v1 = Vec2(x1,y1) + self._v2 = Vec2(x2,y2) + def getName(self): + return "pyExtremitiesOrientationShader" + def shade(self, stroke): + print self._v1.x(),self._v1.y() + stroke.setBeginningOrientation(self._v1.x(),self._v1.y()) + stroke.setEndingOrientation(self._v2.x(),self._v2.y()) + +class pyHLRShader(StrokeShader): + def getName(self): + return "pyHLRShader" + def shade(self, stroke): + originalSize = stroke.strokeVerticesSize() + if(originalSize<4): + return + it = stroke.strokeVerticesBegin() + invisible = 0 + it2 = StrokeVertexIterator(it) + it2.increment() + fe = getFEdge(it.getObject(), it2.getObject()) + if(fe.qi() != 0): + invisible = 1 + while(it2.isEnd() == 0): + v = it.getObject() + vnext = it2.getObject() + if(v.getNature() & VIEW_VERTEX): + #if(v.getNature() & T_VERTEX): + fe = getFEdge(v,vnext) + qi = fe.qi() + if(qi != 0): + invisible = 1 + else: + invisible = 0 + if(invisible == 1): + v.attribute().setVisible(0) + it.increment() + it2.increment() + +class pyTVertexOrientationShader(StrokeShader): + def __init__(self): + StrokeShader.__init__(self) + self._Get2dDirection = Orientation2DF1D() + def getName(self): + return "pyTVertexOrientationShader" + ## finds the TVertex orientation from the TVertex and + ## the previous or next edge + def findOrientation(self, tv, ve): + mateVE = tv.mate(ve) + if((ve.qi() != 0) or (mateVE.qi() != 0)): + ait = AdjacencyIterator(tv,1,0) + winner = None + incoming = 1 + while(ait.isEnd() == 0): + ave = ait.getObject() + if((ave.getId() != ve.getId()) and (ave.getId() != mateVE.getId())): + winner = ait.getObject() + if(ait.isIncoming() == 0): + incoming = 0 + break + ait.increment() + if(winner != None): + if(incoming != 0): + direction = self._Get2dDirection(winner.fedgeB()) + else: + direction = self._Get2dDirection(winner.fedgeA()) + return direction + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it2 = StrokeVertexIterator(it) + it2.increment() + ## case where the first vertex is a TVertex + v = it.getObject() + if(v.getNature() & T_VERTEX): + tv = v.castToTVertex() + ve = getFEdge(v, it2.getObject()).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + while(it2.isEnd() == 0): + vprevious = it.getObject() + v = it2.getObject() + if(v.getNature() & T_VERTEX): + tv = v.castToTVertex() + ve = getFEdge(vprevious, v).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + it.increment() + it2.increment() + ## case where the last vertex is a TVertex + v = it.getObject() + if(v.getNature() & T_VERTEX): + itPrevious = StrokeVertexIterator(it) + itPrevious.decrement() + tv = v.castToTVertex() + ve = getFEdge(itPrevious.getObject(), v).viewedge() + if(tv != None): + dir = self.findOrientation(tv, ve) + #print dir.x(), dir.y() + v.attribute().setAttributeVec2f("orientation", dir) + +class pySinusDisplacementShader(StrokeShader): + def __init__(self, f, a): + StrokeShader.__init__(self) + self._f = f + self._a = a + self._getNormal = Normal2DF0D() + + def getName(self): + return "pySinusDisplacementShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + #print self._getNormal.getName() + n = self._getNormal(it.castToInterface0DIterator()) + p = v.getPoint() + u = v.u() + a = self._a*(1-2*(fabs(u-0.5))) + n = n*a*cos(self._f*u*6.28) + #print n.x(), n.y() + v.setPoint(p+n) + #v.setPoint(v.getPoint()+n*a*cos(f*v.u())) + it.increment() + +class pyPerlinNoise1DShader(StrokeShader): + def __init__(self, freq = 10, amp = 10, oct = 4): + StrokeShader.__init__(self) + self.__noise = Noise() + self.__freq = freq + self.__amp = amp + self.__oct = oct + def getName(self): + return "pyPerlinNoise1DShader" + def shade(self, stroke): + i = randint(0, 50) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + nres = self.__noise.turbulence1(i, self.__freq, self.__amp, self.__oct) + v.setPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + i = i+1 + it.increment() + +class pyPerlinNoise2DShader(StrokeShader): + def __init__(self, freq = 10, amp = 10, oct = 4): + StrokeShader.__init__(self) + self.__noise = Noise() + self.__freq = freq + self.__amp = amp + self.__oct = oct + def getName(self): + return "pyPerlinNoise2DShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + v = it.getObject() + vec = Vec2f(v.getProjectedX(), v.getProjectedY()) + nres = self.__noise.turbulence2(vec, self.__freq, self.__amp, self.__oct) + v.setPoint(v.getProjectedX() + nres, v.getProjectedY() + nres) + it.increment() + +class pyBluePrintCirclesShader(StrokeShader): + def __init__(self, turns = 1): + StrokeShader.__init__(self) + self.__turns = turns + def getName(self): + return "pyBluePrintCirclesShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +# print "min :", p_min.x(), p_min.y() # DEBUG +# print "mean :", p_sum.x(), p_sum.y() # DEBUG +# print "max :", p_max.x(), p_max.y() # DEBUG +# print "----------------------" # DEBUG +####################################################### + sv_nb = sv_nb / self.__turns + center = (p_min + p_max) / 2 + radius = (center.x() - p_min.x() + center.y() - p_min.y()) / 2 + p_new = Vec2f() +####################################################### + it = stroke.strokeVerticesBegin() + for j in range(self.__turns): + radius = radius + randint(-3, 3) + center_x = center.x() + randint(-5, 5) + center_y = center.y() + randint(-5, 5) + center.setX(center_x) + center.setY(center_y) + i = 0 + while i < sv_nb: + p_new.setX(center.x() + radius * cos(2 * pi * float(i) / float(sv_nb - 1))) + p_new.setY(center.y() + radius * sin(2 * pi * float(i) / float(sv_nb - 1))) + it.getObject().setPoint(p_new.x(), p_new.y()) + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintEllipsesShader(StrokeShader): + def __init__(self, turns = 1): + StrokeShader.__init__(self) + self.__turns = turns + def getName(self): + return "pyBluePrintEllipsesShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +# print "min :", p_min.x(), p_min.y() # DEBUG +# print "mean :", p_sum.x(), p_sum.y() # DEBUG +# print "max :", p_max.x(), p_max.y() # DEBUG +# print "----------------------" # DEBUG +####################################################### + sv_nb = sv_nb / self.__turns + center = (p_min + p_max) / 2 + radius_x = center.x() - p_min.x() + radius_y = center.y() - p_min.y() + p_new = Vec2f() +####################################################### + it = stroke.strokeVerticesBegin() + for j in range(self.__turns): + radius_x = radius_x + randint(-3, 3) + radius_y = radius_y + randint(-3, 3) + center_x = center.x() + randint(-5, 5) + center_y = center.y() + randint(-5, 5) + center.setX(center_x) + center.setY(center_y) + i = 0 + while i < sv_nb: + p_new.setX(center.x() + radius_x * cos(2 * pi * float(i) / float(sv_nb - 1))) + p_new.setY(center.y() + radius_y * sin(2 * pi * float(i) / float(sv_nb - 1))) + it.getObject().setPoint(p_new.x(), p_new.y()) + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintSquaresShader(StrokeShader): + def __init__(self, turns = 1, bb_len = 10): + StrokeShader.__init__(self) + self.__turns = turns + self.__bb_len = bb_len + def getName(self): + return "pyBluePrintSquaresShader" + def shade(self, stroke): + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + if (p.x() < p_min.x()): + p_min.setX(p.x()) + if (p.x() > p_max.x()): + p_max.setX(p.x()) + if (p.y() < p_min.y()): + p_min.setY(p.y()) + if (p.y() > p_max.y()): + p_max.setY(p.y()) + it.increment() + stroke.Resample(32 * self.__turns) + sv_nb = stroke.strokeVerticesSize() +####################################################### + sv_nb = sv_nb / self.__turns + first = sv_nb / 4 + second = 2 * first + third = 3 * first + fourth = sv_nb + vec_first = Vec2f(p_max.x() - p_min.x() + 2 * self.__bb_len, 0) + vec_second = Vec2f(0, p_max.y() - p_min.y() + 2 * self.__bb_len) + vec_third = vec_first * -1 + vec_fourth = vec_second * -1 + p_first = Vec2f(p_min.x() - self.__bb_len, p_min.y()) + p_second = Vec2f(p_max.x(), p_min.y() - self.__bb_len) + p_third = Vec2f(p_max.x() + self.__bb_len, p_max.y()) + p_fourth = Vec2f(p_min.x(), p_max.y() + self.__bb_len) +####################################################### + it = stroke.strokeVerticesBegin() + visible = 1 + for j in range(self.__turns): + i = 0 + while i < sv_nb: + if i < first: + p_new = p_first + vec_first * float(i)/float(first - 1) + if i == first - 1: + visible = 0 + elif i < second: + p_new = p_second + vec_second * float(i - first)/float(second - first - 1) + if i == second - 1: + visible = 0 + elif i < third: + p_new = p_third + vec_third * float(i - second)/float(third - second - 1) + if i == third - 1: + visible = 0 + else: + p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) + if i == fourth - 1: + visible = 0 + it.getObject().setPoint(p_new.x(), p_new.y()) + it.getObject().attribute().setVisible(visible) + if visible == 0: + visible = 1 + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + + +class pyBluePrintDirectedSquaresShader(StrokeShader): + def __init__(self, turns = 1, bb_len = 10, mult = 1): + StrokeShader.__init__(self) + self.__mult = mult + self.__turns = turns + self.__bb_len = 1 + float(bb_len) / 100 + def getName(self): + return "pyBluePrintDirectedSquaresShader" + def shade(self, stroke): + stroke.Resample(32 * self.__turns) + p_mean = Vec2f(0, 0) + p_min = Vec2f(10000, 10000) + p_max = Vec2f(0, 0) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + p_mean = p_mean + p +## if (p.x() < p_min.x()): +## p_min.setX(p.x()) +## if (p.x() > p_max.x()): +## p_max.setX(p.x()) +## if (p.y() < p_min.y()): +## p_min.setY(p.y()) +## if (p.y() > p_max.y()): +## p_max.setY(p.y()) + it.increment() + sv_nb = stroke.strokeVerticesSize() + p_mean = p_mean / sv_nb + p_var_xx = 0 + p_var_yy = 0 + p_var_xy = 0 + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + p = it.getObject().getPoint() + p_var_xx = p_var_xx + pow(p.x() - p_mean.x(), 2) + p_var_yy = p_var_yy + pow(p.y() - p_mean.y(), 2) + p_var_xy = p_var_xy + (p.x() - p_mean.x()) * (p.y() - p_mean.y()) + it.increment() + p_var_xx = p_var_xx / sv_nb + p_var_yy = p_var_yy / sv_nb + p_var_xy = p_var_xy / sv_nb +## print p_var_xx, p_var_yy, p_var_xy + trace = p_var_xx + p_var_yy + det = p_var_xx * p_var_yy - p_var_xy * p_var_xy + sqrt_coeff = sqrt(trace * trace - 4 * det) + lambda1 = (trace + sqrt_coeff) / 2 + lambda2 = (trace - sqrt_coeff) / 2 +## print lambda1, lambda2 + theta = atan(2 * p_var_xy / (p_var_xx - p_var_yy)) / 2 +## print theta + if p_var_yy > p_var_xx: + e1 = Vec2f(cos(theta + pi / 2), sin(theta + pi / 2)) * sqrt(lambda1) * self.__mult + e2 = Vec2f(cos(theta + pi), sin(theta + pi)) * sqrt(lambda2) * self.__mult + else: + e1 = Vec2f(cos(theta), sin(theta)) * sqrt(lambda1) * self.__mult + e2 = Vec2f(cos(theta + pi / 2), sin(theta + pi / 2)) * sqrt(lambda2) * self.__mult +####################################################### + sv_nb = sv_nb / self.__turns + first = sv_nb / 4 + second = 2 * first + third = 3 * first + fourth = sv_nb + bb_len1 = self.__bb_len + bb_len2 = 1 + (bb_len1 - 1) * sqrt(lambda1 / lambda2) + p_first = p_mean - e1 - e2 * bb_len2 + p_second = p_mean - e1 * bb_len1 + e2 + p_third = p_mean + e1 + e2 * bb_len2 + p_fourth = p_mean + e1 * bb_len1 - e2 + vec_first = e2 * bb_len2 * 2 + vec_second = e1 * bb_len1 * 2 + vec_third = vec_first * -1 + vec_fourth = vec_second * -1 +####################################################### + it = stroke.strokeVerticesBegin() + visible = 1 + for j in range(self.__turns): + i = 0 + while i < sv_nb: + if i < first: + p_new = p_first + vec_first * float(i)/float(first - 1) + if i == first - 1: + visible = 0 + elif i < second: + p_new = p_second + vec_second * float(i - first)/float(second - first - 1) + if i == second - 1: + visible = 0 + elif i < third: + p_new = p_third + vec_third * float(i - second)/float(third - second - 1) + if i == third - 1: + visible = 0 + else: + p_new = p_fourth + vec_fourth * float(i - third)/float(fourth - third - 1) + if i == fourth - 1: + visible = 0 + it.getObject().setPoint(p_new.x(), p_new.y()) + it.getObject().attribute().setVisible(visible) + if visible == 0: + visible = 1 + i = i + 1 + it.increment() + while it.isEnd() == 0: + stroke.RemoveVertex(it.getObject()) + it.increment() + +class pyModulateAlphaShader(StrokeShader): + def __init__(self, min = 0, max = 1): + StrokeShader.__init__(self) + self.__min = min + self.__max = max + def getName(self): + return "pyModulateAlphaShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + alpha = it.getObject().attribute().getAlpha() + p = it.getObject().getPoint() + alpha = alpha * p.y() / 400 + if alpha < self.__min: + alpha = self.__min + elif alpha > self.__max: + alpha = self.__max + it.getObject().attribute().setAlpha(alpha) + it.increment() + + +## various +class pyDummyShader(StrokeShader): + def getName(self): + return "pyDummyShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + it_end = stroke.strokeVerticesEnd() + while it.isEnd() == 0: + toto = it.castToInterface0DIterator() + att = it.getObject().attribute() + att.setColor(0.3, 0.4, 0.4) + att.setThickness(0, 5) + it.increment() + +class pyDebugShader(StrokeShader): + def getName(self): + return "pyDebugShader" + + def shade(self, stroke): + fe = GetSelectedFEdgeCF() + id1=fe.vertexA().getId() + id2=fe.vertexB().getId() + #print id1.getFirst(), id1.getSecond() + #print id2.getFirst(), id2.getSecond() + it = stroke.strokeVerticesBegin() + found = 0 + foundfirst = 0 + foundsecond = 0 + while it.isEnd() == 0: + cp = it.getObject() + if((cp.A().getId() == id1) or (cp.B().getId() == id1)): + foundfirst = 1 + if((cp.A().getId() == id2) or (cp.B().getId() == id2)): + foundsecond = 1 + if((foundfirst != 0) and (foundsecond != 0)): + found = 1 + break + it.increment() + if(found != 0): + print "The selected Stroke id is: ", stroke.getId().getFirst(), stroke.getId().getSecond() + diff --git a/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py b/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py new file mode 100755 index 00000000000..1df58a75999 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py @@ -0,0 +1,48 @@ +# +# Filename : sketchy_multiple_parameterization.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Builds sketchy strokes whose topology relies on a +# parameterization that covers the complete lines (visible+invisible) +# whereas only the visible portions are actually drawn +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## 0: don't restrict to selection +Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(3,0)) +shaders_list = [ + SamplingShader(2), + SpatialNoiseShader(15, 120, 2, 1, 1), + IncreasingThicknessShader(5, 30), + SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1), + IncreasingColorShader(0,0.2,0,1,0.2,0.7,0.2,1), + TextureAssignerShader(6), + pyHLRShader() + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py b/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py new file mode 100755 index 00000000000..ebad839a3ab --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py @@ -0,0 +1,89 @@ +# +# Filename : sketchy_topology_broken.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The topology of the strokes is, first, built +# independantly from the 3D topology of objects, +# and, second, so as to chain several times the same ViewEdge. +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +## Backbone stretcher that leaves cusps intact to avoid cracks +class pyBackboneStretcherNoCuspShader(StrokeShader): + def __init__(self, l): + StrokeShader.__init__(self) + self._l = l + def getName(self): + return "pyBackboneStretcherNoCuspShader" + def shade(self, stroke): + it0 = stroke.strokeVerticesBegin() + it1 = StrokeVertexIterator(it0) + it1.increment() + itn = stroke.strokeVerticesEnd() + itn.decrement() + itn_1 = StrokeVertexIterator(itn) + itn_1.decrement() + v0 = it0.getObject() + v1 = it1.getObject() + if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + p0 = v0.getPoint() + p1 = v1.getPoint() + d1 = p0-p1 + d1 = d1/d1.norm() + newFirst = p0+d1*float(self._l) + v0.setPoint(newFirst) + else: + print "got a v0 cusp" + vn_1 = itn_1.getObject() + vn = itn.getObject() + if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + pn = vn.getPoint() + pn_1 = vn_1.getPoint() + dn = pn-pn_1 + dn = dn/dn.norm() + newLast = pn+dn*float(self._l) + vn.setPoint(newLast) + else: + print "got a vn cusp" + + +Operators.select(QuantitativeInvisibilityUP1D(0)) +## Chain 3 times each ViewEdge indpendantly from the +## initial objects topology +Operators.bidirectionalChain(pySketchyChainingIterator(3)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(6, 120, 2, 1, 1), + IncreasingThicknessShader(4, 10), + SmoothingShader(100, 0.1, 0, 0.2, 0, 0, 0, 1), + pyBackboneStretcherNoCuspShader(20), + #ConstantColorShader(0.0,0.0,0.0) + IncreasingColorShader(0.2,0.2,0.2,1,0.5,0.5,0.5,1), + #IncreasingColorShader(1,0,0,1,0,1,0,1), + TextureAssignerShader(4) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py b/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py new file mode 100755 index 00000000000..3085a5f2f7f --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py @@ -0,0 +1,49 @@ +# +# Filename : sketchy_topology_preserved.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : The topology of the strokes is built +# so as to chain several times the same ViewEdge. +# The topology of the objects is preserved +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from PredicatesU1D import * +from shaders import * + +upred = QuantitativeInvisibilityUP1D(0) +Operators.select(upred) +Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(3,1)) +shaders_list = [ + SamplingShader(4), + SpatialNoiseShader(20, 220, 2, 1, 1), + IncreasingThicknessShader(4, 8), + SmoothingShader(300, 0.05, 0, 0.2, 0, 0, 0, 0.5), + ConstantColorShader(0.6,0.2,0.0), + TextureAssignerShader(4), + ] + +Operators.create(TrueUP1D(), shaders_list) + diff --git a/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py b/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py new file mode 100755 index 00000000000..e7da0fa2690 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py @@ -0,0 +1,40 @@ +# +# Filename : split_at_highest_2d_curvature.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the visible lines (chaining follows same nature lines) +# (most basic style module) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from Functions0D import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +func = pyInverseCurvature2DAngleF0D() +Operators.recursiveSplit(func, pyParameterUP0D(0.4,0.6), NotUP1D(pyHigherLengthUP1D(100)), 2) +shaders_list = [ConstantThicknessShader(10), IncreasingColorShader(1,0,0,1,0,1,0,1), TextureAssignerShader(3)] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/source/blender/freestyle/style_modules_blender/split_at_tvertices.py b/source/blender/freestyle/style_modules_blender/split_at_tvertices.py new file mode 100755 index 00000000000..acda7e3c0ea --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/split_at_tvertices.py @@ -0,0 +1,42 @@ +# +# Filename : split_at_tvertices.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws strokes that starts and stops at Tvertices (visible or not) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from Functions0D import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +start = pyVertexNatureUP0D(T_VERTEX) +## use the same predicate to decide where to start and where to stop +## the strokes: +Operators.sequentialSplit(start, start, 10) +shaders_list = [ConstantThicknessShader(5), IncreasingColorShader(1,0,0,1,0,1,0,1), TextureAssignerShader(3)] +Operators.create(TrueUP1D(), shaders_list) + diff --git a/source/blender/freestyle/style_modules_blender/stroke_texture.py b/source/blender/freestyle/style_modules_blender/stroke_texture.py new file mode 100755 index 00000000000..41b5371fbfb --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/stroke_texture.py @@ -0,0 +1,43 @@ +# +# Filename : stroke_texture.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader) +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * +from ChainingIterators import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(3), + BezierCurveShader(4), + StrokeTextureShader("washbrushAlpha.bmp", Stroke.DRY_MEDIUM, 1), + ConstantThicknessShader(40), + ConstantColorShader(0,0,0,1), + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/suggestive.py b/source/blender/freestyle/style_modules_blender/suggestive.py new file mode 100755 index 00000000000..3bc06e62fa7 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/suggestive.py @@ -0,0 +1,43 @@ +# +# Filename : suggestive.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Draws the suggestive contours. +# ***** The suggestive contours must be enabled +# in the options dialog ***** +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from PredicatesU1D import * +from shaders import * + +upred = AndUP1D(pyNatureUP1D(SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0)) +Operators.select(upred) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) +shaders_list = [ + IncreasingThicknessShader(1, 3), + ConstantColorShader(0.2,0.2,0.2, 1) + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py b/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py new file mode 100755 index 00000000000..7814f2cac6c --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py @@ -0,0 +1,62 @@ +# +# Filename : thickness_fof_depth_discontinuity.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +class pyDepthDiscontinuityThicknessShader(StrokeShader): + def __init__(self, min, max): + StrokeShader.__init__(self) + self.__min = float(min) + self.__max = float(max) + self.__func = ZDiscontinuityF0D() + def getName(self): + return "pyDepthDiscontinuityThicknessShader" + def shade(self, stroke): + it = stroke.strokeVerticesBegin() + z_min=0.0 + z_max=1.0 + a = (self.__max - self.__min)/(z_max-z_min) + b = (self.__min*z_max-self.__max*z_min)/(z_max-z_min) + it = stroke.strokeVerticesBegin() + while it.isEnd() == 0: + z = self.__func(it.castToInterface0DIterator()) + thickness = a*z+b + it.getObject().attribute().setThickness(thickness, thickness) + it.increment() + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(1), + ConstantThicknessShader(3), + ConstantColorShader(0.0,0.0,0.0), + pyDepthDiscontinuityThicknessShader(0.8, 6) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/source/blender/freestyle/style_modules_blender/tipremover.py b/source/blender/freestyle/style_modules_blender/tipremover.py new file mode 100755 index 00000000000..1d044e369c4 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/tipremover.py @@ -0,0 +1,42 @@ +# +# Filename : tipremover.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Removes strokes extremities +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Blender.Freestyle import * +from logical_operators import * +from ChainingIterators import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + SamplingShader(5), + ConstantThicknessShader(3), + ConstantColorShader(0,0,0), + TipRemoverShader(20) + ] +Operators.create(TrueUP1D(), shaders_list) \ No newline at end of file diff --git a/source/blender/freestyle/style_modules_blender/tvertex_remover.py b/source/blender/freestyle/style_modules_blender/tvertex_remover.py new file mode 100755 index 00000000000..d474ca087f8 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/tvertex_remover.py @@ -0,0 +1,42 @@ +# +# Filename : tvertex_remover.py +# Author : Stephane Grabli +# Date : 04/08/2005 +# Purpose : Removes TVertices +# +############################################################################# +# +# Copyright (C) : Please refer to the COPYRIGHT file distributed +# with this source distribution. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +############################################################################# + + +from Blender.Freestyle import * +from logical_operators import * +from PredicatesB1D import * +from shaders import * + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) +shaders_list = [ + IncreasingThicknessShader(3, 5), + ConstantColorShader(0.2,0.2,0.2, 1), + SamplingShader(10.0), + pyTVertexRemoverShader() + ] +Operators.create(TrueUP1D(), shaders_list) diff --git a/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py b/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py new file mode 100755 index 00000000000..044ec0cbb80 --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py @@ -0,0 +1,40 @@ +from Blender.Freestyle import * +from logical_operators import * +from PredicatesU1D import * +from PredicatesU0D import * +from PredicatesB1D import * +from Functions0D import * +from Functions1D import * +from shaders import * + +class pyDensityUP1D(UnaryPredicate1D): + def __init__(self,wsize,threshold, integration = IntegrationType.MEAN, sampling=2.0): + UnaryPredicate1D.__init__(self) + self._wsize = wsize + self._threshold = threshold + self._integration = integration + self._func = DensityF1D(self._wsize, self._integration, sampling) + + def getName(self): + return "pyDensityUP1D" + + def __call__(self, inter): + d = self._func(inter) + print "For Chain ", inter.getId().getFirst(), inter.getId().getSecond(), "density is ", d + if(d < self._threshold): + return 1 + return 0 + +Operators.select(QuantitativeInvisibilityUP1D(0)) +Operators.bidirectionalChain(ChainSilhouetteIterator()) +#Operators.sequentialSplit(pyVertexNatureUP0D(VIEW_VERTEX), 2) +Operators.sort(pyZBP1D()) +shaders_list = [ + StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, 0), + ConstantThicknessShader(3), + SamplingShader(5.0), + ConstantColorShader(0,0,0,1) + ] +Operators.create(pyDensityUP1D(2,0.05, IntegrationType.MEAN,4), shaders_list) +#Operators.create(pyDensityFunctorUP1D(8,0.03, pyGetInverseProjectedZF1D(), 0,1, IntegrationType.MEAN), shaders_list) + diff --git a/source/blender/freestyle/style_modules_blender/vector.py b/source/blender/freestyle/style_modules_blender/vector.py new file mode 100755 index 00000000000..039f262546b --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/vector.py @@ -0,0 +1,241 @@ +# This module defines 3d geometrical vectors with the standard +# operations on them. +# +# Written by: Konrad Hinsen +# Last revision: 1996-1-26 +# + +"""This module defines three-dimensional geometrical vectors. Vectors support +the usual mathematical operations (v1, v2: vectors, s: scalar): + v1+v2 addition + v1-v2 subtraction + v1*v2 scalar product + s*v1 multiplication with a scalar + v1/s division by a scalar + v1.cross(v2) cross product + v1.length() length + v1.normal() normal vector in direction of v1 + v1.angle(v2) angle between two vectors + v1.x(), v1[0] first element + v1.y(), v1[1] second element + v1.z(), v1[2] third element + +The module offers the following items for export: + Vec3D(x,y,z) the constructor for vectors + isVector(x) a type check function + ex, ey, ez unit vectors along the x-, y-, and z-axes (predefined constants) + +Note: vector elements can be any kind of numbers on which the operations +addition, subtraction, multiplication, division, comparison, sqrt, and acos +are defined. Integer elements are treated as floating point elements. +""" + +import math, types + +class Vec3: + + isVec3 = 1 + + def __init__(self, x=0., y=0., z=0.): + self.data = [x,y,z] + + def __repr__(self): + return 'Vec3(%s,%s,%s)' % (`self.data[0]`,\ + `self.data[1]`,`self.data[2]`) + + def __str__(self): + return `self.data` + + def __add__(self, other): + return Vec3(self.data[0]+other.data[0],\ + self.data[1]+other.data[1],self.data[2]+other.data[2]) + __radd__ = __add__ + + def __neg__(self): + return Vec3(-self.data[0], -self.data[1], -self.data[2]) + + def __sub__(self, other): + return Vec3(self.data[0]-other.data[0],\ + self.data[1]-other.data[1],self.data[2]-other.data[2]) + + def __rsub__(self, other): + return Vec3(other.data[0]-self.data[0],\ + other.data[1]-self.data[1],other.data[2]-self.data[2]) + + def __mul__(self, other): + if isVec3(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec3(self.data[0]*other, self.data[1]*other, + self.data[2]*other) + + def __rmul__(self, other): + if isVec3(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec3(other*self.data[0], other*self.data[1], + other*self.data[2]) + + def __div__(self, other): + if isVec3(other): + raise TypeError, "Can't divide by a vector" + else: + return Vec3(_div(self.data[0],other), _div(self.data[1],other), + _div(self.data[2],other)) + + def __rdiv__(self, other): + raise TypeError, "Can't divide by a vector" + + def __cmp__(self, other): + return cmp(self.data[0],other.data[0]) \ + or cmp(self.data[1],other.data[1]) \ + or cmp(self.data[2],other.data[2]) + + def __getitem__(self, index): + return self.data[index] + + def x(self): + return self.data[0] + def y(self): + return self.data[1] + def z(self): + return self.data[2] + + def length(self): + return math.sqrt(self*self) + + def normal(self): + len = self.length() + if len == 0: + raise ZeroDivisionError, "Can't normalize a zero-length vector" + return self/len + + def cross(self, other): + if not isVec3(other): + raise TypeError, "Cross product with non-vector" + return Vec3(self.data[1]*other.data[2]-self.data[2]*other.data[1], + self.data[2]*other.data[0]-self.data[0]*other.data[2], + self.data[0]*other.data[1]-self.data[1]*other.data[0]) + + def angle(self, other): + if not isVec3(other): + raise TypeError, "Angle between vector and non-vector" + cosa = (self*other)/(self.length()*other.length()) + cosa = max(-1.,min(1.,cosa)) + return math.acos(cosa) + + +class Vec2: + + isVec2 = 1 + + def __init__(self, x=0., y=0.): + self.data = [x,y] + + def __repr__(self): + return 'Vec2(%s,%s,%s)' % (`self.data[0]`,\ + `self.data[1]`) + + def __str__(self): + return `self.data` + + def __add__(self, other): + return Vec2(self.data[0]+other.data[0],\ + self.data[1]+other.data[1]) + __radd__ = __add__ + + def __neg__(self): + return Vec2(-self.data[0], -self.data[1]) + + def __sub__(self, other): + return Vec2(self.data[0]-other.data[0],\ + self.data[1]-other.data[1]) + + def __rsub__(self, other): + return Vec2(other.data[0]-self.data[0],\ + other.data[1]-self.data[1]) + + def __mul__(self, other): + if isVec2(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec2(self.data[0]*other, self.data[1]*other) + + def __rmul__(self, other): + if isVec2(other): + return reduce(lambda a,b: a+b, + map(lambda a,b: a*b, self.data, other.data)) + else: + return Vec2(other*self.data[0], other*self.data[1]) + + def __div__(self, other): + if isVec2(other): + raise TypeError, "Can't divide by a vector" + else: + return Vec2(_div(self.data[0],other), _div(self.data[1],other)) + + def __rdiv__(self, other): + raise TypeError, "Can't divide by a vector" + + def __cmp__(self, other): + return cmp(self.data[0],other.data[0]) \ + or cmp(self.data[1],other.data[1]) + + def __getitem__(self, index): + return self.data[index] + + def x(self): + return self.data[0] + def y(self): + return self.data[1] + + def length(self): + return math.sqrt(self*self) + + def normal(self): + len = self.length() + if len == 0: + raise ZeroDivisionError, "Can't normalize a zero-length vector" + return self/len + + #def cross(self, other): +# if not isVec2(other): +# raise TypeError, "Cross product with non-vector" +# return Vec2(self.data[1]*other.data[2]-self.data[2]*other.data[1], +# self.data[2]*other.data[0]-self.data[0]*other.data[2], +# self.data[0]*other.data[1]-self.data[1]*other.data[0]) + + def angle(self, other): + if not isVec2(other): + raise TypeError, "Angle between vector and non-vector" + cosa = (self*other)/(self.length()*other.length()) + cosa = max(-1.,min(1.,cosa)) + return math.acos(cosa) + + + +# Type check + +def isVec3(x): + return hasattr(x,'isVec3') + +def isVec2(x): + return hasattr(x,'isVec2') + +# "Correct" division for arbitrary number types + +def _div(a,b): + if type(a) == types.IntType and type(b) == types.IntType: + return float(a)/float(b) + else: + return a/b + + +# Some useful constants + +ex = Vec3(1.,0.,0.) +ey = Vec3(0.,1.,0.) +ez = Vec3(0.,0.,1.) From 725915615a0044962f1f3b3971d942e70bf2eb6f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 29 Jul 2008 10:42:10 +0000 Subject: [PATCH 420/430] soc-2008-mxcurioni: SWIG replacement is effective and the native Freestyle API renders a correct result for the test style module 'contour.py'. More testing needs to be done to make sure my work was correct. To make it work, I had to: - update Operators to include all of its methods in the Python API - redefine the Freestyle modules as local classes, allowing predicates to support the __call__ method (I found out that Python does not allow modules to be callable). The API is defined in the new freestyle_init.py file. - remove all references to former Python Freestyle API (located in source/blender/freestyle/python/, under the Freestyle.py file) and replace it with the new API file. - normalize all constants related to the Nature class - redefine the logical_operators.py file so that AndUP1D, OrUP1D and NotUP1D would be subclasses of a UnaryPredicate1D subclass having a operator() implementation. Using UnaryPredicate1D as a superclass would somehow prevent calls to the operator(). For the time being, I chose ContourUP1D (even though it does not really matter which subclass it is, since the __call__ method is redefined in all of these classes). I will implement this classes in C++ to get rid of the problem altogether. - turn off a few classes that somehow are not well recognized (Noise, Curve...). I will reenable them later once I understand what's going on. --- .../freestyle/intern/python/BPy_Operators.cpp | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 2d883363998..b0a8e7e3bd2 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -19,10 +19,33 @@ extern "C" { static void Operators___dealloc__(BPy_Operators *self); static PyObject * Operators_select(BPy_Operators* self, PyObject *args); +static PyObject * Operators_bidirectionalChain(BPy_Operators* self, PyObject *args); +static PyObject * Operators_sequentialSplit(BPy_Operators* self, PyObject *args); +static PyObject * Operators_recursiveSplit(BPy_Operators* self, PyObject *args); +static PyObject * Operators_sort(BPy_Operators* self, PyObject *args); +static PyObject * Operators_create(BPy_Operators* self, PyObject *args); /*----------------------Operators instance definitions ----------------------------*/ static PyMethodDef BPy_Operators_methods[] = { - {"select", ( PyCFunction ) Operators_select, METH_VARARGS | METH_STATIC, "(UnaryPredicate1D up1D )Selects the ViewEdges of the ViewMap verifying a specified condition. "}, + {"select", ( PyCFunction ) Operators_select, METH_VARARGS | METH_STATIC, + "select operator"}, + + {"bidirectionalChain", ( PyCFunction ) Operators_bidirectionalChain, METH_VARARGS | METH_STATIC, + "select operator"}, + + {"sequentialSplit", ( PyCFunction ) Operators_sequentialSplit, METH_VARARGS | METH_STATIC, + "select operator"}, + + {"recursiveSplit", ( PyCFunction ) Operators_recursiveSplit, METH_VARARGS | METH_STATIC, + "select operator"}, + + {"sort", ( PyCFunction ) Operators_sort, METH_VARARGS | METH_STATIC, + "select operator"}, + + {"create", ( PyCFunction ) Operators_create, METH_VARARGS | METH_STATIC, + "select operator"}, + + {NULL, NULL, 0, NULL} }; From 4fa17fc69c2680351caf6eda758a6169a143e08d Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 29 Jul 2008 10:45:06 +0000 Subject: [PATCH 421/430] soc-2008-mxcurioni: SWIG replacement is effective and the native Freestyle API renders a correct result for the test style module 'contour.py'. More testing needs to be done to make sure my work was correct. To make it work, I had to: - update Operators to include all of its methods in the Python API - redefine the Freestyle modules as local classes, allowing predicates to support the __call__ method (I found out that Python does not allow modules to be callable). The API is defined in the new freestyle_init.py file. - remove all references to former Python Freestyle API (located in source/blender/freestyle/python/, under the Freestyle.py file) and replace it with the new API file. - normalize all constants related to the Nature class - redefine the logical_operators.py file so that AndUP1D, OrUP1D and NotUP1D would be subclasses of a UnaryPredicate1D subclass having a operator() implementation. Using UnaryPredicate1D as a superclass would somehow prevent calls to the operator(). For the time being, I chose ContourUP1D (even though it does not really matter which subclass it is, since the __call__ method is redefined in all of these classes). I will implement this classes in C++ to get rid of the problem altogether. - turn off a few classes that somehow are not well recognized (Noise, Curve...). I will reenable them later once I understand what's going on. --- .../intern/app_blender/AppConfig.cpp | 2 +- .../freestyle/intern/app_blender/api.cpp | 2 +- source/blender/freestyle/python/Freestyle.py | 4972 ----------------- .../ChainingIterators.py | 34 +- .../style_modules_blender/Functions0D.py | 2 +- .../style_modules_blender/Functions1D.py | 2 +- .../style_modules_blender/PredicatesB1D.py | 6 +- .../style_modules_blender/PredicatesU0D.py | 4 +- .../style_modules_blender/PredicatesU1D.py | 2 +- .../anisotropic_diffusion.py | 2 +- .../apriori_and_causal_density.py | 2 +- .../style_modules_blender/apriori_density.py | 2 +- .../backbone_stretcher.py | 2 +- .../blueprint_circles.py | 2 +- .../blueprint_ellipses.py | 2 +- .../blueprint_squares.py | 2 +- .../style_modules_blender/cartoon.py | 2 +- .../style_modules_blender/contour.py | 2 +- .../style_modules_blender/curvature2d.py | 2 +- .../style_modules_blender/external_contour.py | 2 +- .../external_contour_sketchy.py | 2 +- .../external_contour_smooth.py | 2 +- .../style_modules_blender/freestyle_init.py | 455 ++ .../style_modules_blender/haloing.py | 2 +- .../ignore_small_occlusions.py | 2 +- .../style_modules_blender/invisible_lines.py | 2 +- .../japanese_bigbrush.py | 2 +- .../logical_operators.py | 14 +- .../long_anisotropically_dense.py | 2 +- .../multiple_parameterization.py | 2 +- .../freestyle/style_modules_blender/nature.py | 10 +- .../style_modules_blender/near_lines.py | 2 +- .../occluded_by_specific_object.py | 2 +- .../style_modules_blender/polygonalize.py | 2 +- .../freestyle/style_modules_blender/qi0.py | 2 +- .../qi0_not_external_contour.py | 2 +- .../freestyle/style_modules_blender/qi1.py | 2 +- .../freestyle/style_modules_blender/qi2.py | 2 +- .../sequentialsplit_sketchy.py | 6 +- .../style_modules_blender/shaders.py | 20 +- .../sketchy_multiple_parameterization.py | 2 +- .../sketchy_topology_broken.py | 6 +- .../sketchy_topology_preserved.py | 2 +- .../split_at_highest_2d_curvatures.py | 2 +- .../split_at_tvertices.py | 4 +- .../style_modules_blender/stroke_texture.py | 2 +- .../style_modules_blender/suggestive.py | 4 +- .../thickness_fof_depth_discontinuity.py | 2 +- .../style_modules_blender/tipremover.py | 2 +- .../style_modules_blender/tvertex_remover.py | 2 +- .../uniformpruning_zsort.py | 4 +- 51 files changed, 549 insertions(+), 5066 deletions(-) delete mode 100755 source/blender/freestyle/python/Freestyle.py create mode 100644 source/blender/freestyle/style_modules_blender/freestyle_init.py diff --git a/source/blender/freestyle/intern/app_blender/AppConfig.cpp b/source/blender/freestyle/intern/app_blender/AppConfig.cpp index 37d139f54e3..0919259bb74 100755 --- a/source/blender/freestyle/intern/app_blender/AppConfig.cpp +++ b/source/blender/freestyle/intern/app_blender/AppConfig.cpp @@ -61,7 +61,7 @@ namespace Config{ string(PATH_SEP.c_str()) + _ProjectDir + string(DIR_SEP.c_str()) + - "style_modules" + + "style_modules_blender" + string(DIR_SEP.c_str()) ; if (getenv("PYTHONPATH")) { _PythonPath += string(PATH_SEP.c_str()) + string(getenv("PYTHONPATH")); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 27b8d578e2f..890c5097a63 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -114,7 +114,7 @@ extern "C" { // add style module string style_module = pathconfig->getProjectDir() + - Config::DIR_SEP + "style_modules" + + Config::DIR_SEP + "style_modules_blender" + Config::DIR_SEP + "contour.py"; controller->InsertStyleModule( 0, const_cast(style_module.c_str()) ); controller->toggleLayer(0, true); diff --git a/source/blender/freestyle/python/Freestyle.py b/source/blender/freestyle/python/Freestyle.py deleted file mode 100755 index 9db78a050e0..00000000000 --- a/source/blender/freestyle/python/Freestyle.py +++ /dev/null @@ -1,4972 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 -# -# Don't modify this file, modify the SWIG interface instead. -# This file is compatible with both classic and new-style classes. - -import _Freestyle -import new -new_instancemethod = new.instancemethod -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. -def _swig_setattr_nondynamic(self,class_type,name,value,static=1): - if (name == "thisown"): return self.this.own(value) - if (name == "this"): - if type(value).__name__ == 'PySwigObject': - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name,None) - if method: return method(self,value) - if (not static) or hasattr(self,name): - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - -def _swig_setattr(self,class_type,name,value): - return _swig_setattr_nondynamic(self,class_type,name,value,0) - -def _swig_getattr(self,class_type,name): - if (name == "thisown"): return self.this.own() - method = class_type.__swig_getmethods__.get(name,None) - if method: return method(self) - raise AttributeError,name - -def _swig_repr(self): - try: strthis = "proxy of " + self.this.__repr__() - except: strthis = "" - return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) - -import types -try: - _object = types.ObjectType - _newclass = 1 -except AttributeError: - class _object : pass - _newclass = 0 -del types - - -try: - import weakref - weakref_proxy = weakref.proxy -except: - weakref_proxy = lambda x: x - - -class PySwigIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, PySwigIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, PySwigIterator, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" - __repr__ = _swig_repr - __swig_destroy__ = _Freestyle.delete_PySwigIterator - __del__ = lambda self : None; - def value(*args): return _Freestyle.PySwigIterator_value(*args) - def incr(*args): return _Freestyle.PySwigIterator_incr(*args) - def decr(*args): return _Freestyle.PySwigIterator_decr(*args) - def distance(*args): return _Freestyle.PySwigIterator_distance(*args) - def equal(*args): return _Freestyle.PySwigIterator_equal(*args) - def copy(*args): return _Freestyle.PySwigIterator_copy(*args) - def next(*args): return _Freestyle.PySwigIterator_next(*args) - def previous(*args): return _Freestyle.PySwigIterator_previous(*args) - def advance(*args): return _Freestyle.PySwigIterator_advance(*args) - def __eq__(*args): return _Freestyle.PySwigIterator___eq__(*args) - def __ne__(*args): return _Freestyle.PySwigIterator___ne__(*args) - def __iadd__(*args): return _Freestyle.PySwigIterator___iadd__(*args) - def __isub__(*args): return _Freestyle.PySwigIterator___isub__(*args) - def __add__(*args): return _Freestyle.PySwigIterator___add__(*args) - def __sub__(*args): return _Freestyle.PySwigIterator___sub__(*args) - def __iter__(self): return self -PySwigIterator_swigregister = _Freestyle.PySwigIterator_swigregister -PySwigIterator_swigregister(PySwigIterator) - -class vectorInt(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, vectorInt, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, vectorInt, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.vectorInt_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.vectorInt___nonzero__(*args) - def __len__(*args): return _Freestyle.vectorInt___len__(*args) - def pop(*args): return _Freestyle.vectorInt_pop(*args) - def __getslice__(*args): return _Freestyle.vectorInt___getslice__(*args) - def __setslice__(*args): return _Freestyle.vectorInt___setslice__(*args) - def __delslice__(*args): return _Freestyle.vectorInt___delslice__(*args) - def __delitem__(*args): return _Freestyle.vectorInt___delitem__(*args) - def __getitem__(*args): return _Freestyle.vectorInt___getitem__(*args) - def __setitem__(*args): return _Freestyle.vectorInt___setitem__(*args) - def append(*args): return _Freestyle.vectorInt_append(*args) - def empty(*args): return _Freestyle.vectorInt_empty(*args) - def size(*args): return _Freestyle.vectorInt_size(*args) - def clear(*args): return _Freestyle.vectorInt_clear(*args) - def swap(*args): return _Freestyle.vectorInt_swap(*args) - def get_allocator(*args): return _Freestyle.vectorInt_get_allocator(*args) - def begin(*args): return _Freestyle.vectorInt_begin(*args) - def end(*args): return _Freestyle.vectorInt_end(*args) - def rbegin(*args): return _Freestyle.vectorInt_rbegin(*args) - def rend(*args): return _Freestyle.vectorInt_rend(*args) - def pop_back(*args): return _Freestyle.vectorInt_pop_back(*args) - def erase(*args): return _Freestyle.vectorInt_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_vectorInt(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.vectorInt_push_back(*args) - def front(*args): return _Freestyle.vectorInt_front(*args) - def back(*args): return _Freestyle.vectorInt_back(*args) - def assign(*args): return _Freestyle.vectorInt_assign(*args) - def resize(*args): return _Freestyle.vectorInt_resize(*args) - def insert(*args): return _Freestyle.vectorInt_insert(*args) - def reserve(*args): return _Freestyle.vectorInt_reserve(*args) - def capacity(*args): return _Freestyle.vectorInt_capacity(*args) - __swig_destroy__ = _Freestyle.delete_vectorInt - __del__ = lambda self : None; -vectorInt_swigregister = _Freestyle.vectorInt_swigregister -vectorInt_swigregister(vectorInt) - -class Id(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Id, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Id, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Id(*args) - try: self.this.append(this) - except: self.this = this - def getFirst(*args): return _Freestyle.Id_getFirst(*args) - def getSecond(*args): return _Freestyle.Id_getSecond(*args) - def setFirst(*args): return _Freestyle.Id_setFirst(*args) - def setSecond(*args): return _Freestyle.Id_setSecond(*args) - def __eq__(*args): return _Freestyle.Id___eq__(*args) - def __ne__(*args): return _Freestyle.Id___ne__(*args) - def __lt__(*args): return _Freestyle.Id___lt__(*args) - __swig_destroy__ = _Freestyle.delete_Id - __del__ = lambda self : None; -Id_swigregister = _Freestyle.Id_swigregister -Id_swigregister(Id) - -class Vec_2u(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2u, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_2u, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_2u(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_2u - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2u_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_2u_dim) - def norm(*args): return _Freestyle.Vec_2u_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_2u_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_2u_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_2u_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_2u___add__(*args) - def __sub__(*args): return _Freestyle.Vec_2u___sub__(*args) - def __div__(*args): return _Freestyle.Vec_2u___div__(*args) - def __mul__(*args): return _Freestyle.Vec_2u___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_2u___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_2u___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_2u___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_2u___gt__(*args) -Vec_2u_swigregister = _Freestyle.Vec_2u_swigregister -Vec_2u_swigregister(Vec_2u) -Vec_2u_dim = _Freestyle.Vec_2u_dim - -class Vec_2i(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2i, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_2i, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_2i(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_2i - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2i_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_2i_dim) - def norm(*args): return _Freestyle.Vec_2i_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_2i_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_2i_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_2i_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_2i___add__(*args) - def __sub__(*args): return _Freestyle.Vec_2i___sub__(*args) - def __div__(*args): return _Freestyle.Vec_2i___div__(*args) - def __mul__(*args): return _Freestyle.Vec_2i___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_2i___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_2i___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_2i___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_2i___gt__(*args) -Vec_2i_swigregister = _Freestyle.Vec_2i_swigregister -Vec_2i_swigregister(Vec_2i) -Vec_2i_dim = _Freestyle.Vec_2i_dim - -class Vec_2d(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2d, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_2d, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_2d(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_2d - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2d_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_2d_dim) - def norm(*args): return _Freestyle.Vec_2d_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_2d_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_2d_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_2d_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_2d___add__(*args) - def __sub__(*args): return _Freestyle.Vec_2d___sub__(*args) - def __div__(*args): return _Freestyle.Vec_2d___div__(*args) - def __mul__(*args): return _Freestyle.Vec_2d___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_2d___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_2d___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_2d___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_2d___gt__(*args) -Vec_2d_swigregister = _Freestyle.Vec_2d_swigregister -Vec_2d_swigregister(Vec_2d) -Vec_2d_dim = _Freestyle.Vec_2d_dim - -class Vec_2f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_2f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_2f, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_2f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_2f - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_2f_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_2f_dim) - def norm(*args): return _Freestyle.Vec_2f_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_2f_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_2f_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_2f_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_2f___add__(*args) - def __sub__(*args): return _Freestyle.Vec_2f___sub__(*args) - def __div__(*args): return _Freestyle.Vec_2f___div__(*args) - def __mul__(*args): return _Freestyle.Vec_2f___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_2f___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_2f___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_2f___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_2f___gt__(*args) -Vec_2f_swigregister = _Freestyle.Vec_2f_swigregister -Vec_2f_swigregister(Vec_2f) -Vec_2f_dim = _Freestyle.Vec_2f_dim - -class Vec2u(Vec_2u): - __swig_setmethods__ = {} - for _s in [Vec_2u]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2u, name, value) - __swig_getmethods__ = {} - for _s in [Vec_2u]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec2u, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec2u(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec2u_x(*args) - def y(*args): return _Freestyle.Vec2u_y(*args) - def setX(*args): return _Freestyle.Vec2u_setX(*args) - def setY(*args): return _Freestyle.Vec2u_setY(*args) - def __add__(*args): return _Freestyle.Vec2u___add__(*args) - def __sub__(*args): return _Freestyle.Vec2u___sub__(*args) - def __div__(*args): return _Freestyle.Vec2u___div__(*args) - def __mul__(*args): return _Freestyle.Vec2u___mul__(*args) - __swig_destroy__ = _Freestyle.delete_Vec2u - __del__ = lambda self : None; -Vec2u_swigregister = _Freestyle.Vec2u_swigregister -Vec2u_swigregister(Vec2u) - -class Vec2i(Vec_2i): - __swig_setmethods__ = {} - for _s in [Vec_2i]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2i, name, value) - __swig_getmethods__ = {} - for _s in [Vec_2i]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec2i, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec2i(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec2i_x(*args) - def y(*args): return _Freestyle.Vec2i_y(*args) - def setX(*args): return _Freestyle.Vec2i_setX(*args) - def setY(*args): return _Freestyle.Vec2i_setY(*args) - def __add__(*args): return _Freestyle.Vec2i___add__(*args) - def __sub__(*args): return _Freestyle.Vec2i___sub__(*args) - def __div__(*args): return _Freestyle.Vec2i___div__(*args) - def __mul__(*args): return _Freestyle.Vec2i___mul__(*args) - __swig_destroy__ = _Freestyle.delete_Vec2i - __del__ = lambda self : None; -Vec2i_swigregister = _Freestyle.Vec2i_swigregister -Vec2i_swigregister(Vec2i) - -class Vec2f(Vec_2f): - __swig_setmethods__ = {} - for _s in [Vec_2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2f, name, value) - __swig_getmethods__ = {} - for _s in [Vec_2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec2f, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec2f(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec2f_x(*args) - def y(*args): return _Freestyle.Vec2f_y(*args) - def setX(*args): return _Freestyle.Vec2f_setX(*args) - def setY(*args): return _Freestyle.Vec2f_setY(*args) - def __add__(*args): return _Freestyle.Vec2f___add__(*args) - def __sub__(*args): return _Freestyle.Vec2f___sub__(*args) - def __div__(*args): return _Freestyle.Vec2f___div__(*args) - def __mul__(*args): return _Freestyle.Vec2f___mul__(*args) - __swig_destroy__ = _Freestyle.delete_Vec2f - __del__ = lambda self : None; -Vec2f_swigregister = _Freestyle.Vec2f_swigregister -Vec2f_swigregister(Vec2f) - -class Vec2d(Vec_2d): - __swig_setmethods__ = {} - for _s in [Vec_2d]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec2d, name, value) - __swig_getmethods__ = {} - for _s in [Vec_2d]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec2d, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec2d(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec2d_x(*args) - def y(*args): return _Freestyle.Vec2d_y(*args) - def setX(*args): return _Freestyle.Vec2d_setX(*args) - def setY(*args): return _Freestyle.Vec2d_setY(*args) - def __add__(*args): return _Freestyle.Vec2d___add__(*args) - def __sub__(*args): return _Freestyle.Vec2d___sub__(*args) - def __div__(*args): return _Freestyle.Vec2d___div__(*args) - def __mul__(*args): return _Freestyle.Vec2d___mul__(*args) - __swig_destroy__ = _Freestyle.delete_Vec2d - __del__ = lambda self : None; -Vec2d_swigregister = _Freestyle.Vec2d_swigregister -Vec2d_swigregister(Vec2d) - -class Vec_3u(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3u, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_3u, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_3u(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_3u - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3u_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_3u_dim) - def norm(*args): return _Freestyle.Vec_3u_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_3u_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_3u_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_3u_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_3u___add__(*args) - def __sub__(*args): return _Freestyle.Vec_3u___sub__(*args) - def __div__(*args): return _Freestyle.Vec_3u___div__(*args) - def __mul__(*args): return _Freestyle.Vec_3u___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_3u___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_3u___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_3u___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_3u___gt__(*args) -Vec_3u_swigregister = _Freestyle.Vec_3u_swigregister -Vec_3u_swigregister(Vec_3u) -Vec_3u_dim = _Freestyle.Vec_3u_dim - -class Vec_3i(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3i, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_3i, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_3i(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_3i - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3i_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_3i_dim) - def norm(*args): return _Freestyle.Vec_3i_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_3i_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_3i_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_3i_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_3i___add__(*args) - def __sub__(*args): return _Freestyle.Vec_3i___sub__(*args) - def __div__(*args): return _Freestyle.Vec_3i___div__(*args) - def __mul__(*args): return _Freestyle.Vec_3i___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_3i___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_3i___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_3i___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_3i___gt__(*args) -Vec_3i_swigregister = _Freestyle.Vec_3i_swigregister -Vec_3i_swigregister(Vec_3i) -Vec_3i_dim = _Freestyle.Vec_3i_dim - -class Vec_3d(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3d, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_3d, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_3d(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_3d - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3d_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_3d_dim) - def norm(*args): return _Freestyle.Vec_3d_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_3d_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_3d_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_3d_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_3d___add__(*args) - def __sub__(*args): return _Freestyle.Vec_3d___sub__(*args) - def __div__(*args): return _Freestyle.Vec_3d___div__(*args) - def __mul__(*args): return _Freestyle.Vec_3d___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_3d___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_3d___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_3d___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_3d___gt__(*args) -Vec_3d_swigregister = _Freestyle.Vec_3d_swigregister -Vec_3d_swigregister(Vec_3d) -Vec_3d_dim = _Freestyle.Vec_3d_dim - -class Vec_3f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec_3f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Vec_3f, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec_3f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Vec_3f - __del__ = lambda self : None; - __swig_getmethods__["dim"] = lambda x: _Freestyle.Vec_3f_dim - if _newclass:dim = staticmethod(_Freestyle.Vec_3f_dim) - def norm(*args): return _Freestyle.Vec_3f_norm(*args) - def squareNorm(*args): return _Freestyle.Vec_3f_squareNorm(*args) - def normalize(*args): return _Freestyle.Vec_3f_normalize(*args) - def normalizeSafe(*args): return _Freestyle.Vec_3f_normalizeSafe(*args) - def __add__(*args): return _Freestyle.Vec_3f___add__(*args) - def __sub__(*args): return _Freestyle.Vec_3f___sub__(*args) - def __div__(*args): return _Freestyle.Vec_3f___div__(*args) - def __mul__(*args): return _Freestyle.Vec_3f___mul__(*args) - def __eq__(*args): return _Freestyle.Vec_3f___eq__(*args) - def __ne__(*args): return _Freestyle.Vec_3f___ne__(*args) - def __lt__(*args): return _Freestyle.Vec_3f___lt__(*args) - def __gt__(*args): return _Freestyle.Vec_3f___gt__(*args) -Vec_3f_swigregister = _Freestyle.Vec_3f_swigregister -Vec_3f_swigregister(Vec_3f) -Vec_3f_dim = _Freestyle.Vec_3f_dim - -class Vec3u(Vec_3u): - __swig_setmethods__ = {} - for _s in [Vec_3u]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3u, name, value) - __swig_getmethods__ = {} - for _s in [Vec_3u]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec3u, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec3u(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec3u_x(*args) - def y(*args): return _Freestyle.Vec3u_y(*args) - def z(*args): return _Freestyle.Vec3u_z(*args) - def setX(*args): return _Freestyle.Vec3u_setX(*args) - def setY(*args): return _Freestyle.Vec3u_setY(*args) - def setZ(*args): return _Freestyle.Vec3u_setZ(*args) - def __add__(*args): return _Freestyle.Vec3u___add__(*args) - def __sub__(*args): return _Freestyle.Vec3u___sub__(*args) - def __div__(*args): return _Freestyle.Vec3u___div__(*args) - def __mul__(*args): return _Freestyle.Vec3u___mul__(*args) - def __xor__(*args): return _Freestyle.Vec3u___xor__(*args) - __swig_destroy__ = _Freestyle.delete_Vec3u - __del__ = lambda self : None; -Vec3u_swigregister = _Freestyle.Vec3u_swigregister -Vec3u_swigregister(Vec3u) - -class Vec3i(Vec_3i): - __swig_setmethods__ = {} - for _s in [Vec_3i]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3i, name, value) - __swig_getmethods__ = {} - for _s in [Vec_3i]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec3i, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec3i(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec3i_x(*args) - def y(*args): return _Freestyle.Vec3i_y(*args) - def z(*args): return _Freestyle.Vec3i_z(*args) - def setX(*args): return _Freestyle.Vec3i_setX(*args) - def setY(*args): return _Freestyle.Vec3i_setY(*args) - def setZ(*args): return _Freestyle.Vec3i_setZ(*args) - def __add__(*args): return _Freestyle.Vec3i___add__(*args) - def __sub__(*args): return _Freestyle.Vec3i___sub__(*args) - def __div__(*args): return _Freestyle.Vec3i___div__(*args) - def __mul__(*args): return _Freestyle.Vec3i___mul__(*args) - def __xor__(*args): return _Freestyle.Vec3i___xor__(*args) - __swig_destroy__ = _Freestyle.delete_Vec3i - __del__ = lambda self : None; -Vec3i_swigregister = _Freestyle.Vec3i_swigregister -Vec3i_swigregister(Vec3i) - -class Vec3f(Vec_3f): - __swig_setmethods__ = {} - for _s in [Vec_3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3f, name, value) - __swig_getmethods__ = {} - for _s in [Vec_3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec3f, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec3f(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec3f_x(*args) - def y(*args): return _Freestyle.Vec3f_y(*args) - def z(*args): return _Freestyle.Vec3f_z(*args) - def setX(*args): return _Freestyle.Vec3f_setX(*args) - def setY(*args): return _Freestyle.Vec3f_setY(*args) - def setZ(*args): return _Freestyle.Vec3f_setZ(*args) - def __add__(*args): return _Freestyle.Vec3f___add__(*args) - def __sub__(*args): return _Freestyle.Vec3f___sub__(*args) - def __div__(*args): return _Freestyle.Vec3f___div__(*args) - def __mul__(*args): return _Freestyle.Vec3f___mul__(*args) - def __xor__(*args): return _Freestyle.Vec3f___xor__(*args) - __swig_destroy__ = _Freestyle.delete_Vec3f - __del__ = lambda self : None; -Vec3f_swigregister = _Freestyle.Vec3f_swigregister -Vec3f_swigregister(Vec3f) - -class Vec3d(Vec_3d): - __swig_setmethods__ = {} - for _s in [Vec_3d]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Vec3d, name, value) - __swig_getmethods__ = {} - for _s in [Vec_3d]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Vec3d, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Vec3d(*args) - try: self.this.append(this) - except: self.this = this - def x(*args): return _Freestyle.Vec3d_x(*args) - def y(*args): return _Freestyle.Vec3d_y(*args) - def z(*args): return _Freestyle.Vec3d_z(*args) - def setX(*args): return _Freestyle.Vec3d_setX(*args) - def setY(*args): return _Freestyle.Vec3d_setY(*args) - def setZ(*args): return _Freestyle.Vec3d_setZ(*args) - def __add__(*args): return _Freestyle.Vec3d___add__(*args) - def __sub__(*args): return _Freestyle.Vec3d___sub__(*args) - def __div__(*args): return _Freestyle.Vec3d___div__(*args) - def __mul__(*args): return _Freestyle.Vec3d___mul__(*args) - def __xor__(*args): return _Freestyle.Vec3d___xor__(*args) - __swig_destroy__ = _Freestyle.delete_Vec3d - __del__ = lambda self : None; -Vec3d_swigregister = _Freestyle.Vec3d_swigregister -Vec3d_swigregister(Vec3d) - -_Noise_B_ = _Freestyle._Noise_B_ -class Noise(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Noise, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Noise, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Noise(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Noise - __del__ = lambda self : None; - def turbulence1(*args): return _Freestyle.Noise_turbulence1(*args) - def turbulence2(*args): return _Freestyle.Noise_turbulence2(*args) - def turbulence3(*args): return _Freestyle.Noise_turbulence3(*args) - def smoothNoise1(*args): return _Freestyle.Noise_smoothNoise1(*args) - def smoothNoise2(*args): return _Freestyle.Noise_smoothNoise2(*args) - def smoothNoise3(*args): return _Freestyle.Noise_smoothNoise3(*args) -Noise_swigregister = _Freestyle.Noise_swigregister -Noise_swigregister(Noise) - -class Material(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Material, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Material, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Material(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Material - __del__ = lambda self : None; - def diffuse(*args): return _Freestyle.Material_diffuse(*args) - def diffuseR(*args): return _Freestyle.Material_diffuseR(*args) - def diffuseG(*args): return _Freestyle.Material_diffuseG(*args) - def diffuseB(*args): return _Freestyle.Material_diffuseB(*args) - def diffuseA(*args): return _Freestyle.Material_diffuseA(*args) - def specular(*args): return _Freestyle.Material_specular(*args) - def specularR(*args): return _Freestyle.Material_specularR(*args) - def specularG(*args): return _Freestyle.Material_specularG(*args) - def specularB(*args): return _Freestyle.Material_specularB(*args) - def specularA(*args): return _Freestyle.Material_specularA(*args) - def ambient(*args): return _Freestyle.Material_ambient(*args) - def ambientR(*args): return _Freestyle.Material_ambientR(*args) - def ambientG(*args): return _Freestyle.Material_ambientG(*args) - def ambientB(*args): return _Freestyle.Material_ambientB(*args) - def ambientA(*args): return _Freestyle.Material_ambientA(*args) - def emission(*args): return _Freestyle.Material_emission(*args) - def emissionR(*args): return _Freestyle.Material_emissionR(*args) - def emissionG(*args): return _Freestyle.Material_emissionG(*args) - def emissionB(*args): return _Freestyle.Material_emissionB(*args) - def emissionA(*args): return _Freestyle.Material_emissionA(*args) - def shininess(*args): return _Freestyle.Material_shininess(*args) - def setDiffuse(*args): return _Freestyle.Material_setDiffuse(*args) - def setSpecular(*args): return _Freestyle.Material_setSpecular(*args) - def setAmbient(*args): return _Freestyle.Material_setAmbient(*args) - def setEmission(*args): return _Freestyle.Material_setEmission(*args) - def setShininess(*args): return _Freestyle.Material_setShininess(*args) - def __ne__(*args): return _Freestyle.Material___ne__(*args) - def __eq__(*args): return _Freestyle.Material___eq__(*args) -Material_swigregister = _Freestyle.Material_swigregister -Material_swigregister(Material) - -class Interface0D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Interface0D, name) - __repr__ = _swig_repr - __swig_destroy__ = _Freestyle.delete_Interface0D - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.Interface0D_getExactTypeName(*args) - def getX(*args): return _Freestyle.Interface0D_getX(*args) - def getY(*args): return _Freestyle.Interface0D_getY(*args) - def getZ(*args): return _Freestyle.Interface0D_getZ(*args) - def getPoint3D(*args): return _Freestyle.Interface0D_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.Interface0D_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.Interface0D_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.Interface0D_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.Interface0D_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.Interface0D_getFEdge(*args) - def getId(*args): return _Freestyle.Interface0D_getId(*args) - def getNature(*args): return _Freestyle.Interface0D_getNature(*args) - def castToSVertex(*args): return _Freestyle.Interface0D_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.Interface0D_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.Interface0D_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.Interface0D_castToTVertex(*args) - def __init__(self, *args): - this = _Freestyle.new_Interface0D(*args) - try: self.this.append(this) - except: self.this = this -Interface0D_swigregister = _Freestyle.Interface0D_swigregister -Interface0D_swigregister(Interface0D) -cvar = _Freestyle.cvar -POINT = cvar.POINT -S_VERTEX = cvar.S_VERTEX -VIEW_VERTEX = cvar.VIEW_VERTEX -NON_T_VERTEX = cvar.NON_T_VERTEX -T_VERTEX = cvar.T_VERTEX -CUSP = cvar.CUSP -NO_FEATURE = cvar.NO_FEATURE -SILHOUETTE = cvar.SILHOUETTE -BORDER = cvar.BORDER -CREASE = cvar.CREASE -RIDGE = cvar.RIDGE -VALLEY = cvar.VALLEY -SUGGESTIVE_CONTOUR = cvar.SUGGESTIVE_CONTOUR - -class Interface0DIteratorNested(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIteratorNested, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIteratorNested, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" - __repr__ = _swig_repr - __swig_destroy__ = _Freestyle.delete_Interface0DIteratorNested - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.Interface0DIteratorNested_getExactTypeName(*args) - def getObject(*args): return _Freestyle.Interface0DIteratorNested_getObject(*args) - def __deref__(*args): return _Freestyle.Interface0DIteratorNested___deref__(*args) - def increment(*args): return _Freestyle.Interface0DIteratorNested_increment(*args) - def decrement(*args): return _Freestyle.Interface0DIteratorNested_decrement(*args) - def isBegin(*args): return _Freestyle.Interface0DIteratorNested_isBegin(*args) - def isEnd(*args): return _Freestyle.Interface0DIteratorNested_isEnd(*args) - def __eq__(*args): return _Freestyle.Interface0DIteratorNested___eq__(*args) - def __ne__(*args): return _Freestyle.Interface0DIteratorNested___ne__(*args) - def t(*args): return _Freestyle.Interface0DIteratorNested_t(*args) - def u(*args): return _Freestyle.Interface0DIteratorNested_u(*args) - def copy(*args): return _Freestyle.Interface0DIteratorNested_copy(*args) - def getX(*args): return _Freestyle.Interface0DIteratorNested_getX(*args) - def getY(*args): return _Freestyle.Interface0DIteratorNested_getY(*args) - def getZ(*args): return _Freestyle.Interface0DIteratorNested_getZ(*args) - def getPoint3D(*args): return _Freestyle.Interface0DIteratorNested_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.Interface0DIteratorNested_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.Interface0DIteratorNested_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.Interface0DIteratorNested_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.Interface0DIteratorNested_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.Interface0DIteratorNested_getFEdge(*args) - def getId(*args): return _Freestyle.Interface0DIteratorNested_getId(*args) - def getNature(*args): return _Freestyle.Interface0DIteratorNested_getNature(*args) - def castToSVertex(*args): return _Freestyle.Interface0DIteratorNested_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.Interface0DIteratorNested_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.Interface0DIteratorNested_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.Interface0DIteratorNested_castToTVertex(*args) -Interface0DIteratorNested_swigregister = _Freestyle.Interface0DIteratorNested_swigregister -Interface0DIteratorNested_swigregister(Interface0DIteratorNested) - -class Interface0DIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Interface0DIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Interface0DIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Interface0DIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Interface0DIterator - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.Interface0DIterator_getExactTypeName(*args) - def getObject(*args): return _Freestyle.Interface0DIterator_getObject(*args) - def __deref__(*args): return _Freestyle.Interface0DIterator___deref__(*args) - def increment(*args): return _Freestyle.Interface0DIterator_increment(*args) - def decrement(*args): return _Freestyle.Interface0DIterator_decrement(*args) - def isBegin(*args): return _Freestyle.Interface0DIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.Interface0DIterator_isEnd(*args) - def __eq__(*args): return _Freestyle.Interface0DIterator___eq__(*args) - def __ne__(*args): return _Freestyle.Interface0DIterator___ne__(*args) - def t(*args): return _Freestyle.Interface0DIterator_t(*args) - def u(*args): return _Freestyle.Interface0DIterator_u(*args) - def getX(*args): return _Freestyle.Interface0DIterator_getX(*args) - def getY(*args): return _Freestyle.Interface0DIterator_getY(*args) - def getZ(*args): return _Freestyle.Interface0DIterator_getZ(*args) - def getPoint3D(*args): return _Freestyle.Interface0DIterator_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.Interface0DIterator_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.Interface0DIterator_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.Interface0DIterator_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.Interface0DIterator_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.Interface0DIterator_getFEdge(*args) - def getId(*args): return _Freestyle.Interface0DIterator_getId(*args) - def getNature(*args): return _Freestyle.Interface0DIterator_getNature(*args) - def castToSVertex(*args): return _Freestyle.Interface0DIterator_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.Interface0DIterator_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.Interface0DIterator_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.Interface0DIterator_castToTVertex(*args) -Interface0DIterator_swigregister = _Freestyle.Interface0DIterator_swigregister -Interface0DIterator_swigregister(Interface0DIterator) - -MEAN = _Freestyle.MEAN -MIN = _Freestyle.MIN -MAX = _Freestyle.MAX -FIRST = _Freestyle.FIRST -LAST = _Freestyle.LAST -class Interface1D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Interface1D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Interface1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Interface1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Interface1D - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.Interface1D_getExactTypeName(*args) - def verticesBegin(*args): return _Freestyle.Interface1D_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.Interface1D_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.Interface1D_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.Interface1D_pointsEnd(*args) - def getLength2D(*args): return _Freestyle.Interface1D_getLength2D(*args) - def getId(*args): return _Freestyle.Interface1D_getId(*args) - def getNature(*args): return _Freestyle.Interface1D_getNature(*args) - def getTimeStamp(*args): return _Freestyle.Interface1D_getTimeStamp(*args) - def setTimeStamp(*args): return _Freestyle.Interface1D_setTimeStamp(*args) -Interface1D_swigregister = _Freestyle.Interface1D_swigregister -Interface1D_swigregister(Interface1D) - -class SVertex(Interface0D): - __swig_setmethods__ = {} - for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, SVertex, name, value) - __swig_getmethods__ = {} - for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, SVertex, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.SVertex_getExactTypeName(*args) - def getX(*args): return _Freestyle.SVertex_getX(*args) - def getY(*args): return _Freestyle.SVertex_getY(*args) - def getZ(*args): return _Freestyle.SVertex_getZ(*args) - def getPoint3D(*args): return _Freestyle.SVertex_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.SVertex_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.SVertex_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.SVertex_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.SVertex_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.SVertex_getFEdge(*args) - def getId(*args): return _Freestyle.SVertex_getId(*args) - def getNature(*args): return _Freestyle.SVertex_getNature(*args) - def castToSVertex(*args): return _Freestyle.SVertex_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.SVertex_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.SVertex_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.SVertex_castToTVertex(*args) - __swig_setmethods__["userdata"] = _Freestyle.SVertex_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.SVertex_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.SVertex_userdata_get, _Freestyle.SVertex_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_SVertex(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_SVertex - __del__ = lambda self : None; - def duplicate(*args): return _Freestyle.SVertex_duplicate(*args) - def __eq__(*args): return _Freestyle.SVertex___eq__(*args) - def point3D(*args): return _Freestyle.SVertex_point3D(*args) - def point2D(*args): return _Freestyle.SVertex_point2D(*args) - def normals(*args): return _Freestyle.SVertex_normals(*args) - def normalsSize(*args): return _Freestyle.SVertex_normalsSize(*args) - def fedges(*args): return _Freestyle.SVertex_fedges(*args) - def fedges_begin(*args): return _Freestyle.SVertex_fedges_begin(*args) - def fedges_end(*args): return _Freestyle.SVertex_fedges_end(*args) - def z(*args): return _Freestyle.SVertex_z(*args) - def viewvertex(*args): return _Freestyle.SVertex_viewvertex(*args) - def setPoint3D(*args): return _Freestyle.SVertex_setPoint3D(*args) - def setPoint2D(*args): return _Freestyle.SVertex_setPoint2D(*args) - def AddNormal(*args): return _Freestyle.SVertex_AddNormal(*args) - def setCurvatureInfo(*args): return _Freestyle.SVertex_setCurvatureInfo(*args) - def getCurvatureInfo(*args): return _Freestyle.SVertex_getCurvatureInfo(*args) - def setCurvatureFredo(*args): return _Freestyle.SVertex_setCurvatureFredo(*args) - def setDirectionFredo(*args): return _Freestyle.SVertex_setDirectionFredo(*args) - def curvatureFredo(*args): return _Freestyle.SVertex_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.SVertex_directionFredo(*args) - def setId(*args): return _Freestyle.SVertex_setId(*args) - def setFEdges(*args): return _Freestyle.SVertex_setFEdges(*args) - def setShape(*args): return _Freestyle.SVertex_setShape(*args) - def setViewVertex(*args): return _Freestyle.SVertex_setViewVertex(*args) - def AddFEdge(*args): return _Freestyle.SVertex_AddFEdge(*args) - def Replace(*args): return _Freestyle.SVertex_Replace(*args) - def fedge(*args): return _Freestyle.SVertex_fedge(*args) - def point2d(*args): return _Freestyle.SVertex_point2d(*args) - def point3d(*args): return _Freestyle.SVertex_point3d(*args) - def normal(*args): return _Freestyle.SVertex_normal(*args) - def shape_id(*args): return _Freestyle.SVertex_shape_id(*args) - def shape(*args): return _Freestyle.SVertex_shape(*args) - def shape_importance(*args): return _Freestyle.SVertex_shape_importance(*args) - def qi(*args): return _Freestyle.SVertex_qi(*args) - def occluders_begin(*args): return _Freestyle.SVertex_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.SVertex_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.SVertex_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.SVertex_occluders_size(*args) - def occludee(*args): return _Freestyle.SVertex_occludee(*args) - def occluded_shape(*args): return _Freestyle.SVertex_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.SVertex_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.SVertex_z_discontinuity(*args) -SVertex_swigregister = _Freestyle.SVertex_swigregister -SVertex_swigregister(SVertex) -integrateUnsigned = _Freestyle.integrateUnsigned -integrateFloat = _Freestyle.integrateFloat -integrateDouble = _Freestyle.integrateDouble - -class FEdge(Interface1D): - __swig_setmethods__ = {} - for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FEdge, name, value) - __swig_getmethods__ = {} - for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FEdge, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.FEdge_getExactTypeName(*args) - def getLength2D(*args): return _Freestyle.FEdge_getLength2D(*args) - def getId(*args): return _Freestyle.FEdge_getId(*args) - __swig_setmethods__["userdata"] = _Freestyle.FEdge_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.FEdge_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.FEdge_userdata_get, _Freestyle.FEdge_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_FEdge(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_FEdge - __del__ = lambda self : None; - def duplicate(*args): return _Freestyle.FEdge_duplicate(*args) - def vertexA(*args): return _Freestyle.FEdge_vertexA(*args) - def vertexB(*args): return _Freestyle.FEdge_vertexB(*args) - def getNature(*args): return _Freestyle.FEdge_getNature(*args) - def nextEdge(*args): return _Freestyle.FEdge_nextEdge(*args) - def previousEdge(*args): return _Freestyle.FEdge_previousEdge(*args) - def invisibility(*args): return _Freestyle.FEdge_invisibility(*args) - def viewedge(*args): return _Freestyle.FEdge_viewedge(*args) - def center3d(*args): return _Freestyle.FEdge_center3d(*args) - def center2d(*args): return _Freestyle.FEdge_center2d(*args) - def aFace(*args): return _Freestyle.FEdge_aFace(*args) - def getOccludeeIntersection(*args): return _Freestyle.FEdge_getOccludeeIntersection(*args) - def getOccludeeEmpty(*args): return _Freestyle.FEdge_getOccludeeEmpty(*args) - def isSmooth(*args): return _Freestyle.FEdge_isSmooth(*args) - def setVertexA(*args): return _Freestyle.FEdge_setVertexA(*args) - def setVertexB(*args): return _Freestyle.FEdge_setVertexB(*args) - def setId(*args): return _Freestyle.FEdge_setId(*args) - def setNextEdge(*args): return _Freestyle.FEdge_setNextEdge(*args) - def setPreviousEdge(*args): return _Freestyle.FEdge_setPreviousEdge(*args) - def setNature(*args): return _Freestyle.FEdge_setNature(*args) - def setViewEdge(*args): return _Freestyle.FEdge_setViewEdge(*args) - def setaFace(*args): return _Freestyle.FEdge_setaFace(*args) - def setOccludeeIntersection(*args): return _Freestyle.FEdge_setOccludeeIntersection(*args) - def setOccludeeEmpty(*args): return _Freestyle.FEdge_setOccludeeEmpty(*args) - def setSmooth(*args): return _Freestyle.FEdge_setSmooth(*args) - __swig_getmethods__["CommonVertex"] = lambda x: _Freestyle.FEdge_CommonVertex - if _newclass:CommonVertex = staticmethod(_Freestyle.FEdge_CommonVertex) - def min2d(*args): return _Freestyle.FEdge_min2d(*args) - def max2d(*args): return _Freestyle.FEdge_max2d(*args) - def shape_id(*args): return _Freestyle.FEdge_shape_id(*args) - def shape(*args): return _Freestyle.FEdge_shape(*args) - def shape_importance(*args): return _Freestyle.FEdge_shape_importance(*args) - def qi(*args): return _Freestyle.FEdge_qi(*args) - def occluders_begin(*args): return _Freestyle.FEdge_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.FEdge_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.FEdge_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.FEdge_occluders_size(*args) - def occludee(*args): return _Freestyle.FEdge_occludee(*args) - def occluded_shape(*args): return _Freestyle.FEdge_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.FEdge_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.FEdge_z_discontinuity(*args) - def viewedge_nature(*args): return _Freestyle.FEdge_viewedge_nature(*args) - def orientation2d(*args): return _Freestyle.FEdge_orientation2d(*args) - def orientation3d(*args): return _Freestyle.FEdge_orientation3d(*args) - def verticesBegin(*args): return _Freestyle.FEdge_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.FEdge_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.FEdge_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.FEdge_pointsEnd(*args) -FEdge_swigregister = _Freestyle.FEdge_swigregister -FEdge_swigregister(FEdge) -FEdge_CommonVertex = _Freestyle.FEdge_CommonVertex - -class FEdgeSVertexIterator(Interface0DIteratorNested): - __swig_setmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSVertexIterator, name, value) - __swig_getmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSVertexIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_FEdgeSVertexIterator(*args) - try: self.this.append(this) - except: self.this = this - def getExactTypeName(*args): return _Freestyle.FEdgeSVertexIterator_getExactTypeName(*args) - def getObject(*args): return _Freestyle.FEdgeSVertexIterator_getObject(*args) - def __deref__(*args): return _Freestyle.FEdgeSVertexIterator___deref__(*args) - def increment(*args): return _Freestyle.FEdgeSVertexIterator_increment(*args) - def decrement(*args): return _Freestyle.FEdgeSVertexIterator_decrement(*args) - def isBegin(*args): return _Freestyle.FEdgeSVertexIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.FEdgeSVertexIterator_isEnd(*args) - def __eq__(*args): return _Freestyle.FEdgeSVertexIterator___eq__(*args) - def t(*args): return _Freestyle.FEdgeSVertexIterator_t(*args) - def u(*args): return _Freestyle.FEdgeSVertexIterator_u(*args) - def copy(*args): return _Freestyle.FEdgeSVertexIterator_copy(*args) - __swig_destroy__ = _Freestyle.delete_FEdgeSVertexIterator - __del__ = lambda self : None; - def getX(*args): return _Freestyle.FEdgeSVertexIterator_getX(*args) - def getY(*args): return _Freestyle.FEdgeSVertexIterator_getY(*args) - def getZ(*args): return _Freestyle.FEdgeSVertexIterator_getZ(*args) - def getPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.FEdgeSVertexIterator_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.FEdgeSVertexIterator_getFEdge(*args) - def getId(*args): return _Freestyle.FEdgeSVertexIterator_getId(*args) - def getNature(*args): return _Freestyle.FEdgeSVertexIterator_getNature(*args) - def castToSVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.FEdgeSVertexIterator_castToTVertex(*args) - __swig_setmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.FEdgeSVertexIterator_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.FEdgeSVertexIterator_userdata_get, _Freestyle.FEdgeSVertexIterator_userdata_set) - def duplicate(*args): return _Freestyle.FEdgeSVertexIterator_duplicate(*args) - def point3D(*args): return _Freestyle.FEdgeSVertexIterator_point3D(*args) - def point2D(*args): return _Freestyle.FEdgeSVertexIterator_point2D(*args) - def normals(*args): return _Freestyle.FEdgeSVertexIterator_normals(*args) - def normalsSize(*args): return _Freestyle.FEdgeSVertexIterator_normalsSize(*args) - def fedges(*args): return _Freestyle.FEdgeSVertexIterator_fedges(*args) - def fedges_begin(*args): return _Freestyle.FEdgeSVertexIterator_fedges_begin(*args) - def fedges_end(*args): return _Freestyle.FEdgeSVertexIterator_fedges_end(*args) - def shape(*args): return _Freestyle.FEdgeSVertexIterator_shape(*args) - def z(*args): return _Freestyle.FEdgeSVertexIterator_z(*args) - def viewvertex(*args): return _Freestyle.FEdgeSVertexIterator_viewvertex(*args) - def setPoint3D(*args): return _Freestyle.FEdgeSVertexIterator_setPoint3D(*args) - def setPoint2D(*args): return _Freestyle.FEdgeSVertexIterator_setPoint2D(*args) - def AddNormal(*args): return _Freestyle.FEdgeSVertexIterator_AddNormal(*args) - def setCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_setCurvatureInfo(*args) - def getCurvatureInfo(*args): return _Freestyle.FEdgeSVertexIterator_getCurvatureInfo(*args) - def setCurvatureFredo(*args): return _Freestyle.FEdgeSVertexIterator_setCurvatureFredo(*args) - def setDirectionFredo(*args): return _Freestyle.FEdgeSVertexIterator_setDirectionFredo(*args) - def curvatureFredo(*args): return _Freestyle.FEdgeSVertexIterator_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.FEdgeSVertexIterator_directionFredo(*args) - def setId(*args): return _Freestyle.FEdgeSVertexIterator_setId(*args) - def setFEdges(*args): return _Freestyle.FEdgeSVertexIterator_setFEdges(*args) - def setShape(*args): return _Freestyle.FEdgeSVertexIterator_setShape(*args) - def setViewVertex(*args): return _Freestyle.FEdgeSVertexIterator_setViewVertex(*args) - def AddFEdge(*args): return _Freestyle.FEdgeSVertexIterator_AddFEdge(*args) - def Replace(*args): return _Freestyle.FEdgeSVertexIterator_Replace(*args) - def fedge(*args): return _Freestyle.FEdgeSVertexIterator_fedge(*args) - def point2d(*args): return _Freestyle.FEdgeSVertexIterator_point2d(*args) - def point3d(*args): return _Freestyle.FEdgeSVertexIterator_point3d(*args) - def normal(*args): return _Freestyle.FEdgeSVertexIterator_normal(*args) - def shape_id(*args): return _Freestyle.FEdgeSVertexIterator_shape_id(*args) - def shape_importance(*args): return _Freestyle.FEdgeSVertexIterator_shape_importance(*args) - def qi(*args): return _Freestyle.FEdgeSVertexIterator_qi(*args) - def occluders_begin(*args): return _Freestyle.FEdgeSVertexIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.FEdgeSVertexIterator_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.FEdgeSVertexIterator_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.FEdgeSVertexIterator_occluders_size(*args) - def occludee(*args): return _Freestyle.FEdgeSVertexIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.FEdgeSVertexIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.FEdgeSVertexIterator_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.FEdgeSVertexIterator_z_discontinuity(*args) -FEdgeSVertexIterator_swigregister = _Freestyle.FEdgeSVertexIterator_swigregister -FEdgeSVertexIterator_swigregister(FEdgeSVertexIterator) - -class FEdgeSharp(FEdge): - __swig_setmethods__ = {} - for _s in [FEdge]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSharp, name, value) - __swig_getmethods__ = {} - for _s in [FEdge]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSharp, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_FEdgeSharp(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_FEdgeSharp - __del__ = lambda self : None; - def duplicate(*args): return _Freestyle.FEdgeSharp_duplicate(*args) - def normalA(*args): return _Freestyle.FEdgeSharp_normalA(*args) - def normalB(*args): return _Freestyle.FEdgeSharp_normalB(*args) - def aMaterialIndex(*args): return _Freestyle.FEdgeSharp_aMaterialIndex(*args) - def aMaterial(*args): return _Freestyle.FEdgeSharp_aMaterial(*args) - def bMaterialIndex(*args): return _Freestyle.FEdgeSharp_bMaterialIndex(*args) - def bMaterial(*args): return _Freestyle.FEdgeSharp_bMaterial(*args) - def setNormalA(*args): return _Freestyle.FEdgeSharp_setNormalA(*args) - def setNormalB(*args): return _Freestyle.FEdgeSharp_setNormalB(*args) - def setaMaterialIndex(*args): return _Freestyle.FEdgeSharp_setaMaterialIndex(*args) - def setbMaterialIndex(*args): return _Freestyle.FEdgeSharp_setbMaterialIndex(*args) -FEdgeSharp_swigregister = _Freestyle.FEdgeSharp_swigregister -FEdgeSharp_swigregister(FEdgeSharp) - -class FEdgeSmooth(FEdge): - __swig_setmethods__ = {} - for _s in [FEdge]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgeSmooth, name, value) - __swig_getmethods__ = {} - for _s in [FEdge]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FEdgeSmooth, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_FEdgeSmooth(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_FEdgeSmooth - __del__ = lambda self : None; - def duplicate(*args): return _Freestyle.FEdgeSmooth_duplicate(*args) - def face(*args): return _Freestyle.FEdgeSmooth_face(*args) - def normal(*args): return _Freestyle.FEdgeSmooth_normal(*args) - def materialIndex(*args): return _Freestyle.FEdgeSmooth_materialIndex(*args) - def material(*args): return _Freestyle.FEdgeSmooth_material(*args) - def setFace(*args): return _Freestyle.FEdgeSmooth_setFace(*args) - def setNormal(*args): return _Freestyle.FEdgeSmooth_setNormal(*args) - def setMaterialIndex(*args): return _Freestyle.FEdgeSmooth_setMaterialIndex(*args) -FEdgeSmooth_swigregister = _Freestyle.FEdgeSmooth_swigregister -FEdgeSmooth_swigregister(FEdgeSmooth) - -class SShape(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SShape, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SShape, name) - __repr__ = _swig_repr - __swig_setmethods__["userdata"] = _Freestyle.SShape_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.SShape_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.SShape_userdata_get, _Freestyle.SShape_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_SShape(*args) - try: self.this.append(this) - except: self.this = this - def duplicate(*args): return _Freestyle.SShape_duplicate(*args) - __swig_destroy__ = _Freestyle.delete_SShape - __del__ = lambda self : None; - def AddEdge(*args): return _Freestyle.SShape_AddEdge(*args) - def AddNewVertex(*args): return _Freestyle.SShape_AddNewVertex(*args) - def AddChain(*args): return _Freestyle.SShape_AddChain(*args) - def CreateSVertex(*args): return _Freestyle.SShape_CreateSVertex(*args) - def SplitEdge(*args): return _Freestyle.SShape_SplitEdge(*args) - def SplitEdgeIn2(*args): return _Freestyle.SShape_SplitEdgeIn2(*args) - def setBBox(*args): return _Freestyle.SShape_setBBox(*args) - def ComputeBBox(*args): return _Freestyle.SShape_ComputeBBox(*args) - def RemoveEdgeFromChain(*args): return _Freestyle.SShape_RemoveEdgeFromChain(*args) - def RemoveEdge(*args): return _Freestyle.SShape_RemoveEdge(*args) - def getVertexList(*args): return _Freestyle.SShape_getVertexList(*args) - def getEdgeList(*args): return _Freestyle.SShape_getEdgeList(*args) - def getChains(*args): return _Freestyle.SShape_getChains(*args) - def bbox(*args): return _Freestyle.SShape_bbox(*args) - def material(*args): return _Freestyle.SShape_material(*args) - def materials(*args): return _Freestyle.SShape_materials(*args) - def viewShape(*args): return _Freestyle.SShape_viewShape(*args) - def importance(*args): return _Freestyle.SShape_importance(*args) - def getId(*args): return _Freestyle.SShape_getId(*args) - def setId(*args): return _Freestyle.SShape_setId(*args) - def setMaterials(*args): return _Freestyle.SShape_setMaterials(*args) - def setViewShape(*args): return _Freestyle.SShape_setViewShape(*args) - def setImportance(*args): return _Freestyle.SShape_setImportance(*args) -SShape_swigregister = _Freestyle.SShape_swigregister -SShape_swigregister(SShape) - -class ViewShapesContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewShapesContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewShapesContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.ViewShapesContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.ViewShapesContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.ViewShapesContainer___len__(*args) - def pop(*args): return _Freestyle.ViewShapesContainer_pop(*args) - def __getslice__(*args): return _Freestyle.ViewShapesContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.ViewShapesContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.ViewShapesContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.ViewShapesContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.ViewShapesContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.ViewShapesContainer___setitem__(*args) - def append(*args): return _Freestyle.ViewShapesContainer_append(*args) - def empty(*args): return _Freestyle.ViewShapesContainer_empty(*args) - def size(*args): return _Freestyle.ViewShapesContainer_size(*args) - def clear(*args): return _Freestyle.ViewShapesContainer_clear(*args) - def swap(*args): return _Freestyle.ViewShapesContainer_swap(*args) - def get_allocator(*args): return _Freestyle.ViewShapesContainer_get_allocator(*args) - def begin(*args): return _Freestyle.ViewShapesContainer_begin(*args) - def end(*args): return _Freestyle.ViewShapesContainer_end(*args) - def rbegin(*args): return _Freestyle.ViewShapesContainer_rbegin(*args) - def rend(*args): return _Freestyle.ViewShapesContainer_rend(*args) - def pop_back(*args): return _Freestyle.ViewShapesContainer_pop_back(*args) - def erase(*args): return _Freestyle.ViewShapesContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_ViewShapesContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.ViewShapesContainer_push_back(*args) - def front(*args): return _Freestyle.ViewShapesContainer_front(*args) - def back(*args): return _Freestyle.ViewShapesContainer_back(*args) - def assign(*args): return _Freestyle.ViewShapesContainer_assign(*args) - def resize(*args): return _Freestyle.ViewShapesContainer_resize(*args) - def insert(*args): return _Freestyle.ViewShapesContainer_insert(*args) - def reserve(*args): return _Freestyle.ViewShapesContainer_reserve(*args) - def capacity(*args): return _Freestyle.ViewShapesContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_ViewShapesContainer - __del__ = lambda self : None; -ViewShapesContainer_swigregister = _Freestyle.ViewShapesContainer_swigregister -ViewShapesContainer_swigregister(ViewShapesContainer) - -class ViewEdgesContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgesContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgesContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.ViewEdgesContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.ViewEdgesContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.ViewEdgesContainer___len__(*args) - def pop(*args): return _Freestyle.ViewEdgesContainer_pop(*args) - def __getslice__(*args): return _Freestyle.ViewEdgesContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.ViewEdgesContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.ViewEdgesContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.ViewEdgesContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.ViewEdgesContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.ViewEdgesContainer___setitem__(*args) - def append(*args): return _Freestyle.ViewEdgesContainer_append(*args) - def empty(*args): return _Freestyle.ViewEdgesContainer_empty(*args) - def size(*args): return _Freestyle.ViewEdgesContainer_size(*args) - def clear(*args): return _Freestyle.ViewEdgesContainer_clear(*args) - def swap(*args): return _Freestyle.ViewEdgesContainer_swap(*args) - def get_allocator(*args): return _Freestyle.ViewEdgesContainer_get_allocator(*args) - def begin(*args): return _Freestyle.ViewEdgesContainer_begin(*args) - def end(*args): return _Freestyle.ViewEdgesContainer_end(*args) - def rbegin(*args): return _Freestyle.ViewEdgesContainer_rbegin(*args) - def rend(*args): return _Freestyle.ViewEdgesContainer_rend(*args) - def pop_back(*args): return _Freestyle.ViewEdgesContainer_pop_back(*args) - def erase(*args): return _Freestyle.ViewEdgesContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_ViewEdgesContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.ViewEdgesContainer_push_back(*args) - def front(*args): return _Freestyle.ViewEdgesContainer_front(*args) - def back(*args): return _Freestyle.ViewEdgesContainer_back(*args) - def assign(*args): return _Freestyle.ViewEdgesContainer_assign(*args) - def resize(*args): return _Freestyle.ViewEdgesContainer_resize(*args) - def insert(*args): return _Freestyle.ViewEdgesContainer_insert(*args) - def reserve(*args): return _Freestyle.ViewEdgesContainer_reserve(*args) - def capacity(*args): return _Freestyle.ViewEdgesContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_ViewEdgesContainer - __del__ = lambda self : None; -ViewEdgesContainer_swigregister = _Freestyle.ViewEdgesContainer_swigregister -ViewEdgesContainer_swigregister(ViewEdgesContainer) - -class FEdgesContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, FEdgesContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, FEdgesContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.FEdgesContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.FEdgesContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.FEdgesContainer___len__(*args) - def pop(*args): return _Freestyle.FEdgesContainer_pop(*args) - def __getslice__(*args): return _Freestyle.FEdgesContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.FEdgesContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.FEdgesContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.FEdgesContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.FEdgesContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.FEdgesContainer___setitem__(*args) - def append(*args): return _Freestyle.FEdgesContainer_append(*args) - def empty(*args): return _Freestyle.FEdgesContainer_empty(*args) - def size(*args): return _Freestyle.FEdgesContainer_size(*args) - def clear(*args): return _Freestyle.FEdgesContainer_clear(*args) - def swap(*args): return _Freestyle.FEdgesContainer_swap(*args) - def get_allocator(*args): return _Freestyle.FEdgesContainer_get_allocator(*args) - def begin(*args): return _Freestyle.FEdgesContainer_begin(*args) - def end(*args): return _Freestyle.FEdgesContainer_end(*args) - def rbegin(*args): return _Freestyle.FEdgesContainer_rbegin(*args) - def rend(*args): return _Freestyle.FEdgesContainer_rend(*args) - def pop_back(*args): return _Freestyle.FEdgesContainer_pop_back(*args) - def erase(*args): return _Freestyle.FEdgesContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_FEdgesContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.FEdgesContainer_push_back(*args) - def front(*args): return _Freestyle.FEdgesContainer_front(*args) - def back(*args): return _Freestyle.FEdgesContainer_back(*args) - def assign(*args): return _Freestyle.FEdgesContainer_assign(*args) - def resize(*args): return _Freestyle.FEdgesContainer_resize(*args) - def insert(*args): return _Freestyle.FEdgesContainer_insert(*args) - def reserve(*args): return _Freestyle.FEdgesContainer_reserve(*args) - def capacity(*args): return _Freestyle.FEdgesContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_FEdgesContainer - __del__ = lambda self : None; -FEdgesContainer_swigregister = _Freestyle.FEdgesContainer_swigregister -FEdgesContainer_swigregister(FEdgesContainer) - -class ViewVerticesContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVerticesContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewVerticesContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.ViewVerticesContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.ViewVerticesContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.ViewVerticesContainer___len__(*args) - def pop(*args): return _Freestyle.ViewVerticesContainer_pop(*args) - def __getslice__(*args): return _Freestyle.ViewVerticesContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.ViewVerticesContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.ViewVerticesContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.ViewVerticesContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.ViewVerticesContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.ViewVerticesContainer___setitem__(*args) - def append(*args): return _Freestyle.ViewVerticesContainer_append(*args) - def empty(*args): return _Freestyle.ViewVerticesContainer_empty(*args) - def size(*args): return _Freestyle.ViewVerticesContainer_size(*args) - def clear(*args): return _Freestyle.ViewVerticesContainer_clear(*args) - def swap(*args): return _Freestyle.ViewVerticesContainer_swap(*args) - def get_allocator(*args): return _Freestyle.ViewVerticesContainer_get_allocator(*args) - def begin(*args): return _Freestyle.ViewVerticesContainer_begin(*args) - def end(*args): return _Freestyle.ViewVerticesContainer_end(*args) - def rbegin(*args): return _Freestyle.ViewVerticesContainer_rbegin(*args) - def rend(*args): return _Freestyle.ViewVerticesContainer_rend(*args) - def pop_back(*args): return _Freestyle.ViewVerticesContainer_pop_back(*args) - def erase(*args): return _Freestyle.ViewVerticesContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_ViewVerticesContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.ViewVerticesContainer_push_back(*args) - def front(*args): return _Freestyle.ViewVerticesContainer_front(*args) - def back(*args): return _Freestyle.ViewVerticesContainer_back(*args) - def assign(*args): return _Freestyle.ViewVerticesContainer_assign(*args) - def resize(*args): return _Freestyle.ViewVerticesContainer_resize(*args) - def insert(*args): return _Freestyle.ViewVerticesContainer_insert(*args) - def reserve(*args): return _Freestyle.ViewVerticesContainer_reserve(*args) - def capacity(*args): return _Freestyle.ViewVerticesContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_ViewVerticesContainer - __del__ = lambda self : None; -ViewVerticesContainer_swigregister = _Freestyle.ViewVerticesContainer_swigregister -ViewVerticesContainer_swigregister(ViewVerticesContainer) - -class SVerticesContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, SVerticesContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, SVerticesContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.SVerticesContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.SVerticesContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.SVerticesContainer___len__(*args) - def pop(*args): return _Freestyle.SVerticesContainer_pop(*args) - def __getslice__(*args): return _Freestyle.SVerticesContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.SVerticesContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.SVerticesContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.SVerticesContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.SVerticesContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.SVerticesContainer___setitem__(*args) - def append(*args): return _Freestyle.SVerticesContainer_append(*args) - def empty(*args): return _Freestyle.SVerticesContainer_empty(*args) - def size(*args): return _Freestyle.SVerticesContainer_size(*args) - def clear(*args): return _Freestyle.SVerticesContainer_clear(*args) - def swap(*args): return _Freestyle.SVerticesContainer_swap(*args) - def get_allocator(*args): return _Freestyle.SVerticesContainer_get_allocator(*args) - def begin(*args): return _Freestyle.SVerticesContainer_begin(*args) - def end(*args): return _Freestyle.SVerticesContainer_end(*args) - def rbegin(*args): return _Freestyle.SVerticesContainer_rbegin(*args) - def rend(*args): return _Freestyle.SVerticesContainer_rend(*args) - def pop_back(*args): return _Freestyle.SVerticesContainer_pop_back(*args) - def erase(*args): return _Freestyle.SVerticesContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_SVerticesContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.SVerticesContainer_push_back(*args) - def front(*args): return _Freestyle.SVerticesContainer_front(*args) - def back(*args): return _Freestyle.SVerticesContainer_back(*args) - def assign(*args): return _Freestyle.SVerticesContainer_assign(*args) - def resize(*args): return _Freestyle.SVerticesContainer_resize(*args) - def insert(*args): return _Freestyle.SVerticesContainer_insert(*args) - def reserve(*args): return _Freestyle.SVerticesContainer_reserve(*args) - def capacity(*args): return _Freestyle.SVerticesContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_SVerticesContainer - __del__ = lambda self : None; -SVerticesContainer_swigregister = _Freestyle.SVerticesContainer_swigregister -SVerticesContainer_swigregister(SVerticesContainer) - -class ViewMap(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewMap, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewMap, name) - __repr__ = _swig_repr - __swig_setmethods__["userdata"] = _Freestyle.ViewMap_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewMap_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewMap_userdata_get, _Freestyle.ViewMap_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_ViewMap(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ViewMap - __del__ = lambda self : None; - def getClosestViewEdge(*args): return _Freestyle.ViewMap_getClosestViewEdge(*args) - def getClosestFEdge(*args): return _Freestyle.ViewMap_getClosestFEdge(*args) - __swig_getmethods__["getInstance"] = lambda x: _Freestyle.ViewMap_getInstance - if _newclass:getInstance = staticmethod(_Freestyle.ViewMap_getInstance) - def ViewShapes(*args): return _Freestyle.ViewMap_ViewShapes(*args) - def ViewEdges(*args): return _Freestyle.ViewMap_ViewEdges(*args) - def ViewVertices(*args): return _Freestyle.ViewMap_ViewVertices(*args) - def FEdges(*args): return _Freestyle.ViewMap_FEdges(*args) - def SVertices(*args): return _Freestyle.ViewMap_SVertices(*args) - def viewedges_begin(*args): return _Freestyle.ViewMap_viewedges_begin(*args) - def viewedges_end(*args): return _Freestyle.ViewMap_viewedges_end(*args) - def viewedges_size(*args): return _Freestyle.ViewMap_viewedges_size(*args) - def viewShape(*args): return _Freestyle.ViewMap_viewShape(*args) - def shapeIdToIndexMap(*args): return _Freestyle.ViewMap_shapeIdToIndexMap(*args) - def getScene3dBBox(*args): return _Freestyle.ViewMap_getScene3dBBox(*args) - def AddViewShape(*args): return _Freestyle.ViewMap_AddViewShape(*args) - def AddViewEdge(*args): return _Freestyle.ViewMap_AddViewEdge(*args) - def AddViewVertex(*args): return _Freestyle.ViewMap_AddViewVertex(*args) - def AddFEdge(*args): return _Freestyle.ViewMap_AddFEdge(*args) - def AddSVertex(*args): return _Freestyle.ViewMap_AddSVertex(*args) - def setScene3dBBox(*args): return _Freestyle.ViewMap_setScene3dBBox(*args) - def CreateTVertex(*args): return _Freestyle.ViewMap_CreateTVertex(*args) - def InsertViewVertex(*args): return _Freestyle.ViewMap_InsertViewVertex(*args) -ViewMap_swigregister = _Freestyle.ViewMap_swigregister -ViewMap_swigregister(ViewMap) -ViewMap_getInstance = _Freestyle.ViewMap_getInstance - -class ViewVertex(Interface0D): - __swig_setmethods__ = {} - for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVertex, name, value) - __swig_getmethods__ = {} - for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ViewVertex, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.ViewVertex_getExactTypeName(*args) - __swig_setmethods__["userdata"] = _Freestyle.ViewVertex_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewVertex_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewVertex_userdata_get, _Freestyle.ViewVertex_userdata_set) - __swig_destroy__ = _Freestyle.delete_ViewVertex - __del__ = lambda self : None; - def getNature(*args): return _Freestyle.ViewVertex_getNature(*args) - def setNature(*args): return _Freestyle.ViewVertex_setNature(*args) - def Replace(*args): return _Freestyle.ViewVertex_Replace(*args) - def edges_begin(*args): return _Freestyle.ViewVertex_edges_begin(*args) - def edges_end(*args): return _Freestyle.ViewVertex_edges_end(*args) - def edges_iterator(*args): return _Freestyle.ViewVertex_edges_iterator(*args) - def edgesBegin(*args): return _Freestyle.ViewVertex_edgesBegin(*args) - def edgesEnd(*args): return _Freestyle.ViewVertex_edgesEnd(*args) - def edgesIterator(*args): return _Freestyle.ViewVertex_edgesIterator(*args) -ViewVertex_swigregister = _Freestyle.ViewVertex_swigregister -ViewVertex_swigregister(ViewVertex) - -class TVertex(ViewVertex): - __swig_setmethods__ = {} - for _s in [ViewVertex]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TVertex, name, value) - __swig_getmethods__ = {} - for _s in [ViewVertex]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TVertex, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.TVertex_getExactTypeName(*args) - def getX(*args): return _Freestyle.TVertex_getX(*args) - def getY(*args): return _Freestyle.TVertex_getY(*args) - def getZ(*args): return _Freestyle.TVertex_getZ(*args) - def getPoint3D(*args): return _Freestyle.TVertex_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.TVertex_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.TVertex_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.TVertex_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.TVertex_getPoint2D(*args) - def getId(*args): return _Freestyle.TVertex_getId(*args) - def castToViewVertex(*args): return _Freestyle.TVertex_castToViewVertex(*args) - def castToTVertex(*args): return _Freestyle.TVertex_castToTVertex(*args) - def __init__(self, *args): - this = _Freestyle.new_TVertex(*args) - try: self.this.append(this) - except: self.this = this - def frontSVertex(*args): return _Freestyle.TVertex_frontSVertex(*args) - def backSVertex(*args): return _Freestyle.TVertex_backSVertex(*args) - def frontEdgeA(*args): return _Freestyle.TVertex_frontEdgeA(*args) - def frontEdgeB(*args): return _Freestyle.TVertex_frontEdgeB(*args) - def backEdgeA(*args): return _Freestyle.TVertex_backEdgeA(*args) - def backEdgeB(*args): return _Freestyle.TVertex_backEdgeB(*args) - def setFrontSVertex(*args): return _Freestyle.TVertex_setFrontSVertex(*args) - def setBackSVertex(*args): return _Freestyle.TVertex_setBackSVertex(*args) - def setFrontEdgeA(*args): return _Freestyle.TVertex_setFrontEdgeA(*args) - def setFrontEdgeB(*args): return _Freestyle.TVertex_setFrontEdgeB(*args) - def setBackEdgeA(*args): return _Freestyle.TVertex_setBackEdgeA(*args) - def setBackEdgeB(*args): return _Freestyle.TVertex_setBackEdgeB(*args) - def setId(*args): return _Freestyle.TVertex_setId(*args) - def getSVertex(*args): return _Freestyle.TVertex_getSVertex(*args) - def Replace(*args): return _Freestyle.TVertex_Replace(*args) - def mate(*args): return _Freestyle.TVertex_mate(*args) - def edges_end(*args): return _Freestyle.TVertex_edges_end(*args) - def edgesBegin(*args): return _Freestyle.TVertex_edgesBegin(*args) - def edgesEnd(*args): return _Freestyle.TVertex_edgesEnd(*args) - def edgesIterator(*args): return _Freestyle.TVertex_edgesIterator(*args) - __swig_destroy__ = _Freestyle.delete_TVertex - __del__ = lambda self : None; -TVertex_swigregister = _Freestyle.TVertex_swigregister -TVertex_swigregister(TVertex) - -class NonTVertex(ViewVertex): - __swig_setmethods__ = {} - for _s in [ViewVertex]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, NonTVertex, name, value) - __swig_getmethods__ = {} - for _s in [ViewVertex]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, NonTVertex, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.NonTVertex_getExactTypeName(*args) - def getX(*args): return _Freestyle.NonTVertex_getX(*args) - def getY(*args): return _Freestyle.NonTVertex_getY(*args) - def getZ(*args): return _Freestyle.NonTVertex_getZ(*args) - def getPoint3D(*args): return _Freestyle.NonTVertex_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.NonTVertex_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.NonTVertex_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.NonTVertex_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.NonTVertex_getPoint2D(*args) - def getId(*args): return _Freestyle.NonTVertex_getId(*args) - def castToSVertex(*args): return _Freestyle.NonTVertex_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.NonTVertex_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.NonTVertex_castToNonTVertex(*args) - def __init__(self, *args): - this = _Freestyle.new_NonTVertex(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_NonTVertex - __del__ = lambda self : None; - def svertex(*args): return _Freestyle.NonTVertex_svertex(*args) - def viewedges(*args): return _Freestyle.NonTVertex_viewedges(*args) - def setSVertex(*args): return _Freestyle.NonTVertex_setSVertex(*args) - def setViewEdges(*args): return _Freestyle.NonTVertex_setViewEdges(*args) - def AddIncomingViewEdge(*args): return _Freestyle.NonTVertex_AddIncomingViewEdge(*args) - def AddOutgoingViewEdge(*args): return _Freestyle.NonTVertex_AddOutgoingViewEdge(*args) - def AddViewEdge(*args): return _Freestyle.NonTVertex_AddViewEdge(*args) - def Replace(*args): return _Freestyle.NonTVertex_Replace(*args) - def edges_end(*args): return _Freestyle.NonTVertex_edges_end(*args) - def edgesBegin(*args): return _Freestyle.NonTVertex_edgesBegin(*args) - def edgesEnd(*args): return _Freestyle.NonTVertex_edgesEnd(*args) - def edgesIterator(*args): return _Freestyle.NonTVertex_edgesIterator(*args) -NonTVertex_swigregister = _Freestyle.NonTVertex_swigregister -NonTVertex_swigregister(NonTVertex) - -class ViewEdge(Interface1D): - __swig_setmethods__ = {} - for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdge, name, value) - __swig_getmethods__ = {} - for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ViewEdge, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.ViewEdge_getExactTypeName(*args) - def getId(*args): return _Freestyle.ViewEdge_getId(*args) - def getNature(*args): return _Freestyle.ViewEdge_getNature(*args) - __swig_setmethods__["userdata"] = _Freestyle.ViewEdge_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewEdge_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewEdge_userdata_get, _Freestyle.ViewEdge_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_ViewEdge(*args) - try: self.this.append(this) - except: self.this = this - def duplicate(*args): return _Freestyle.ViewEdge_duplicate(*args) - __swig_destroy__ = _Freestyle.delete_ViewEdge - __del__ = lambda self : None; - def A(*args): return _Freestyle.ViewEdge_A(*args) - def B(*args): return _Freestyle.ViewEdge_B(*args) - def fedgeA(*args): return _Freestyle.ViewEdge_fedgeA(*args) - def fedgeB(*args): return _Freestyle.ViewEdge_fedgeB(*args) - def viewShape(*args): return _Freestyle.ViewEdge_viewShape(*args) - def isClosed(*args): return _Freestyle.ViewEdge_isClosed(*args) - def getChainingTimeStamp(*args): return _Freestyle.ViewEdge_getChainingTimeStamp(*args) - def aShape(*args): return _Freestyle.ViewEdge_aShape(*args) - def bShape(*args): return _Freestyle.ViewEdge_bShape(*args) - def occluders(*args): return _Freestyle.ViewEdge_occluders(*args) - def splittingId(*args): return _Freestyle.ViewEdge_splittingId(*args) - def setA(*args): return _Freestyle.ViewEdge_setA(*args) - def setB(*args): return _Freestyle.ViewEdge_setB(*args) - def setNature(*args): return _Freestyle.ViewEdge_setNature(*args) - def setFEdgeA(*args): return _Freestyle.ViewEdge_setFEdgeA(*args) - def setFEdgeB(*args): return _Freestyle.ViewEdge_setFEdgeB(*args) - def setShape(*args): return _Freestyle.ViewEdge_setShape(*args) - def setId(*args): return _Freestyle.ViewEdge_setId(*args) - def UpdateFEdges(*args): return _Freestyle.ViewEdge_UpdateFEdges(*args) - def setaShape(*args): return _Freestyle.ViewEdge_setaShape(*args) - def setQI(*args): return _Freestyle.ViewEdge_setQI(*args) - def setChainingTimeStamp(*args): return _Freestyle.ViewEdge_setChainingTimeStamp(*args) - def AddOccluder(*args): return _Freestyle.ViewEdge_AddOccluder(*args) - def setSplittingId(*args): return _Freestyle.ViewEdge_setSplittingId(*args) - def intersect_2d_area(*args): return _Freestyle.ViewEdge_intersect_2d_area(*args) - def include_in_2d_area(*args): return _Freestyle.ViewEdge_include_in_2d_area(*args) - def getLength2D(*args): return _Freestyle.ViewEdge_getLength2D(*args) - def qi(*args): return _Freestyle.ViewEdge_qi(*args) - def occluders_begin(*args): return _Freestyle.ViewEdge_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.ViewEdge_occluders_end(*args) - def occluders_size(*args): return _Freestyle.ViewEdge_occluders_size(*args) - def occluders_empty(*args): return _Freestyle.ViewEdge_occluders_empty(*args) - def occludee(*args): return _Freestyle.ViewEdge_occludee(*args) - def occluded_shape(*args): return _Freestyle.ViewEdge_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.ViewEdge_occludee_empty(*args) - def shape_id(*args): return _Freestyle.ViewEdge_shape_id(*args) - def shape(*args): return _Freestyle.ViewEdge_shape(*args) - def shape_importance(*args): return _Freestyle.ViewEdge_shape_importance(*args) - def verticesBegin(*args): return _Freestyle.ViewEdge_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.ViewEdge_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.ViewEdge_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.ViewEdge_pointsEnd(*args) -ViewEdge_swigregister = _Freestyle.ViewEdge_swigregister -ViewEdge_swigregister(ViewEdge) - -class ViewShape(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewShape, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewShape, name) - __repr__ = _swig_repr - __swig_setmethods__["userdata"] = _Freestyle.ViewShape_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewShape_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewShape_userdata_get, _Freestyle.ViewShape_userdata_set) - def __init__(self, *args): - this = _Freestyle.new_ViewShape(*args) - try: self.this.append(this) - except: self.this = this - def duplicate(*args): return _Freestyle.ViewShape_duplicate(*args) - __swig_destroy__ = _Freestyle.delete_ViewShape - __del__ = lambda self : None; - def SplitEdge(*args): return _Freestyle.ViewShape_SplitEdge(*args) - def sshape(*args): return _Freestyle.ViewShape_sshape(*args) - def vertices(*args): return _Freestyle.ViewShape_vertices(*args) - def edges(*args): return _Freestyle.ViewShape_edges(*args) - def getId(*args): return _Freestyle.ViewShape_getId(*args) - def setSShape(*args): return _Freestyle.ViewShape_setSShape(*args) - def setVertices(*args): return _Freestyle.ViewShape_setVertices(*args) - def setEdges(*args): return _Freestyle.ViewShape_setEdges(*args) - def AddVertex(*args): return _Freestyle.ViewShape_AddVertex(*args) - def AddEdge(*args): return _Freestyle.ViewShape_AddEdge(*args) - def RemoveEdge(*args): return _Freestyle.ViewShape_RemoveEdge(*args) - def RemoveVertex(*args): return _Freestyle.ViewShape_RemoveVertex(*args) -ViewShape_swigregister = _Freestyle.ViewShape_swigregister -ViewShape_swigregister(ViewShape) - -class ViewVertexOrientedViewEdgeIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewVertexOrientedViewEdgeIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewVertexOrientedViewEdgeIterator, name) - __repr__ = _swig_repr - __swig_destroy__ = _Freestyle.delete_ViewVertexOrientedViewEdgeIterator - __del__ = lambda self : None; - def __init__(self, *args): - this = _Freestyle.new_ViewVertexOrientedViewEdgeIterator(*args) - try: self.this.append(this) - except: self.this = this - def isBegin(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_isEnd(*args) - def __ne__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___ne__(*args) - def __eq__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___eq__(*args) - def getObject(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_getObject(*args) - def __deref__(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator___deref__(*args) - def increment(*args): return _Freestyle.ViewVertexOrientedViewEdgeIterator_increment(*args) -ViewVertexOrientedViewEdgeIterator_swigregister = _Freestyle.ViewVertexOrientedViewEdgeIterator_swigregister -ViewVertexOrientedViewEdgeIterator_swigregister(ViewVertexOrientedViewEdgeIterator) - -class ViewEdgeSVertexIterator(Interface0DIteratorNested): - __swig_setmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgeSVertexIterator, name, value) - __swig_getmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgeSVertexIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ViewEdgeSVertexIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ViewEdgeSVertexIterator - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.ViewEdgeSVertexIterator_getExactTypeName(*args) - def getObject(*args): return _Freestyle.ViewEdgeSVertexIterator_getObject(*args) - def __deref__(*args): return _Freestyle.ViewEdgeSVertexIterator___deref__(*args) - def increment(*args): return _Freestyle.ViewEdgeSVertexIterator_increment(*args) - def decrement(*args): return _Freestyle.ViewEdgeSVertexIterator_decrement(*args) - def isBegin(*args): return _Freestyle.ViewEdgeSVertexIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.ViewEdgeSVertexIterator_isEnd(*args) - def t(*args): return _Freestyle.ViewEdgeSVertexIterator_t(*args) - def u(*args): return _Freestyle.ViewEdgeSVertexIterator_u(*args) - def __eq__(*args): return _Freestyle.ViewEdgeSVertexIterator___eq__(*args) - def copy(*args): return _Freestyle.ViewEdgeSVertexIterator_copy(*args) - def getX(*args): return _Freestyle.ViewEdgeSVertexIterator_getX(*args) - def getY(*args): return _Freestyle.ViewEdgeSVertexIterator_getY(*args) - def getZ(*args): return _Freestyle.ViewEdgeSVertexIterator_getZ(*args) - def getPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.ViewEdgeSVertexIterator_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.ViewEdgeSVertexIterator_getFEdge(*args) - def getId(*args): return _Freestyle.ViewEdgeSVertexIterator_getId(*args) - def getNature(*args): return _Freestyle.ViewEdgeSVertexIterator_getNature(*args) - def castToSVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_castToTVertex(*args) - __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeSVertexIterator_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeSVertexIterator_userdata_get, _Freestyle.ViewEdgeSVertexIterator_userdata_set) - def duplicate(*args): return _Freestyle.ViewEdgeSVertexIterator_duplicate(*args) - def point3D(*args): return _Freestyle.ViewEdgeSVertexIterator_point3D(*args) - def point2D(*args): return _Freestyle.ViewEdgeSVertexIterator_point2D(*args) - def normals(*args): return _Freestyle.ViewEdgeSVertexIterator_normals(*args) - def normalsSize(*args): return _Freestyle.ViewEdgeSVertexIterator_normalsSize(*args) - def fedges(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges(*args) - def fedges_begin(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges_begin(*args) - def fedges_end(*args): return _Freestyle.ViewEdgeSVertexIterator_fedges_end(*args) - def shape(*args): return _Freestyle.ViewEdgeSVertexIterator_shape(*args) - def z(*args): return _Freestyle.ViewEdgeSVertexIterator_z(*args) - def viewvertex(*args): return _Freestyle.ViewEdgeSVertexIterator_viewvertex(*args) - def setPoint3D(*args): return _Freestyle.ViewEdgeSVertexIterator_setPoint3D(*args) - def setPoint2D(*args): return _Freestyle.ViewEdgeSVertexIterator_setPoint2D(*args) - def AddNormal(*args): return _Freestyle.ViewEdgeSVertexIterator_AddNormal(*args) - def setCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_setCurvatureInfo(*args) - def getCurvatureInfo(*args): return _Freestyle.ViewEdgeSVertexIterator_getCurvatureInfo(*args) - def setCurvatureFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_setCurvatureFredo(*args) - def setDirectionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_setDirectionFredo(*args) - def curvatureFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.ViewEdgeSVertexIterator_directionFredo(*args) - def setId(*args): return _Freestyle.ViewEdgeSVertexIterator_setId(*args) - def setFEdges(*args): return _Freestyle.ViewEdgeSVertexIterator_setFEdges(*args) - def setShape(*args): return _Freestyle.ViewEdgeSVertexIterator_setShape(*args) - def setViewVertex(*args): return _Freestyle.ViewEdgeSVertexIterator_setViewVertex(*args) - def AddFEdge(*args): return _Freestyle.ViewEdgeSVertexIterator_AddFEdge(*args) - def Replace(*args): return _Freestyle.ViewEdgeSVertexIterator_Replace(*args) - def fedge(*args): return _Freestyle.ViewEdgeSVertexIterator_fedge(*args) - def point2d(*args): return _Freestyle.ViewEdgeSVertexIterator_point2d(*args) - def point3d(*args): return _Freestyle.ViewEdgeSVertexIterator_point3d(*args) - def normal(*args): return _Freestyle.ViewEdgeSVertexIterator_normal(*args) - def shape_id(*args): return _Freestyle.ViewEdgeSVertexIterator_shape_id(*args) - def shape_importance(*args): return _Freestyle.ViewEdgeSVertexIterator_shape_importance(*args) - def qi(*args): return _Freestyle.ViewEdgeSVertexIterator_qi(*args) - def occluders_begin(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.ViewEdgeSVertexIterator_occluders_size(*args) - def occludee(*args): return _Freestyle.ViewEdgeSVertexIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.ViewEdgeSVertexIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.ViewEdgeSVertexIterator_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.ViewEdgeSVertexIterator_z_discontinuity(*args) -ViewEdgeSVertexIterator_swigregister = _Freestyle.ViewEdgeSVertexIterator_swigregister -ViewEdgeSVertexIterator_swigregister(ViewEdgeSVertexIterator) - -class ViewEdgeViewEdgeIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewEdgeViewEdgeIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ViewEdgeViewEdgeIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == ViewEdgeViewEdgeIterator: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_ViewEdgeViewEdgeIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ViewEdgeViewEdgeIterator - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getExactTypeName(*args) - def getCurrentEdge(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getCurrentEdge(*args) - def setCurrentEdge(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setCurrentEdge(*args) - def getBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getBegin(*args) - def setBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setBegin(*args) - def getOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getOrientation(*args) - def setOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setOrientation(*args) - def changeOrientation(*args): return _Freestyle.ViewEdgeViewEdgeIterator_changeOrientation(*args) - def getObject(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getObject(*args) - def __deref__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___deref__(*args) - def increment(*args): return _Freestyle.ViewEdgeViewEdgeIterator_increment(*args) - def decrement(*args): return _Freestyle.ViewEdgeViewEdgeIterator_decrement(*args) - def isBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isEnd(*args) - def __eq__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___eq__(*args) - def __ne__(*args): return _Freestyle.ViewEdgeViewEdgeIterator___ne__(*args) - def getId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getId(*args) - def getNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getNature(*args) - __swig_setmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.ViewEdgeViewEdgeIterator_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.ViewEdgeViewEdgeIterator_userdata_get, _Freestyle.ViewEdgeViewEdgeIterator_userdata_set) - def duplicate(*args): return _Freestyle.ViewEdgeViewEdgeIterator_duplicate(*args) - def A(*args): return _Freestyle.ViewEdgeViewEdgeIterator_A(*args) - def B(*args): return _Freestyle.ViewEdgeViewEdgeIterator_B(*args) - def fedgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeA(*args) - def fedgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_fedgeB(*args) - def viewShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_viewShape(*args) - def aShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_aShape(*args) - def isClosed(*args): return _Freestyle.ViewEdgeViewEdgeIterator_isClosed(*args) - def getChainingTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getChainingTimeStamp(*args) - def bShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_bShape(*args) - def occluders(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders(*args) - def splittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_splittingId(*args) - def setA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setA(*args) - def setB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setB(*args) - def setNature(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setNature(*args) - def setFEdgeA(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setFEdgeA(*args) - def setFEdgeB(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setFEdgeB(*args) - def setShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setShape(*args) - def setId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setId(*args) - def UpdateFEdges(*args): return _Freestyle.ViewEdgeViewEdgeIterator_UpdateFEdges(*args) - def setaShape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setaShape(*args) - def setQI(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setQI(*args) - def setChainingTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setChainingTimeStamp(*args) - def AddOccluder(*args): return _Freestyle.ViewEdgeViewEdgeIterator_AddOccluder(*args) - def setSplittingId(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setSplittingId(*args) - def intersect_2d_area(*args): return _Freestyle.ViewEdgeViewEdgeIterator_intersect_2d_area(*args) - def include_in_2d_area(*args): return _Freestyle.ViewEdgeViewEdgeIterator_include_in_2d_area(*args) - def getLength2D(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getLength2D(*args) - def qi(*args): return _Freestyle.ViewEdgeViewEdgeIterator_qi(*args) - def occluders_begin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_end(*args) - def occluders_size(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_size(*args) - def occluders_empty(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluders_empty(*args) - def occludee(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.ViewEdgeViewEdgeIterator_occludee_empty(*args) - def shape_id(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape_id(*args) - def shape(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape(*args) - def shape_importance(*args): return _Freestyle.ViewEdgeViewEdgeIterator_shape_importance(*args) - def verticesBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.ViewEdgeViewEdgeIterator_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.ViewEdgeViewEdgeIterator_pointsEnd(*args) - def getTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_getTimeStamp(*args) - def setTimeStamp(*args): return _Freestyle.ViewEdgeViewEdgeIterator_setTimeStamp(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_ViewEdgeViewEdgeIterator(self) - return weakref_proxy(self) -ViewEdgeViewEdgeIterator_swigregister = _Freestyle.ViewEdgeViewEdgeIterator_swigregister -ViewEdgeViewEdgeIterator_swigregister(ViewEdgeViewEdgeIterator) - -class UnaryFunction0DVoid(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVoid, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVoid, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DVoid: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DVoid(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVoid - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DVoid_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DVoid___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DVoid(self) - return weakref_proxy(self) -UnaryFunction0DVoid_swigregister = _Freestyle.UnaryFunction0DVoid_swigregister -UnaryFunction0DVoid_swigregister(UnaryFunction0DVoid) - -class UnaryFunction0DUnsigned(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DUnsigned, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DUnsigned, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DUnsigned: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DUnsigned(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DUnsigned - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DUnsigned_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DUnsigned___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DUnsigned(self) - return weakref_proxy(self) -UnaryFunction0DUnsigned_swigregister = _Freestyle.UnaryFunction0DUnsigned_swigregister -UnaryFunction0DUnsigned_swigregister(UnaryFunction0DUnsigned) - -class UnaryFunction0DFloat(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DFloat, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DFloat, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DFloat: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DFloat(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DFloat - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DFloat_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DFloat___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DFloat(self) - return weakref_proxy(self) -UnaryFunction0DFloat_swigregister = _Freestyle.UnaryFunction0DFloat_swigregister -UnaryFunction0DFloat_swigregister(UnaryFunction0DFloat) - -class UnaryFunction0DDouble(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DDouble, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DDouble, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DDouble: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DDouble(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DDouble - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DDouble_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DDouble___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DDouble(self) - return weakref_proxy(self) -UnaryFunction0DDouble_swigregister = _Freestyle.UnaryFunction0DDouble_swigregister -UnaryFunction0DDouble_swigregister(UnaryFunction0DDouble) - -class UnaryFunction0DVec2f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVec2f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVec2f, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DVec2f: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DVec2f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVec2f - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DVec2f_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DVec2f___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DVec2f(self) - return weakref_proxy(self) -UnaryFunction0DVec2f_swigregister = _Freestyle.UnaryFunction0DVec2f_swigregister -UnaryFunction0DVec2f_swigregister(UnaryFunction0DVec2f) - -class UnaryFunction0DVec3f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVec3f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVec3f, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DVec3f: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DVec3f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVec3f - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DVec3f_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DVec3f___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DVec3f(self) - return weakref_proxy(self) -UnaryFunction0DVec3f_swigregister = _Freestyle.UnaryFunction0DVec3f_swigregister -UnaryFunction0DVec3f_swigregister(UnaryFunction0DVec3f) - -class UnaryFunction0DId(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DId, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DId, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction0DId: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction0DId(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DId - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DId_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DId___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction0DId(self) - return weakref_proxy(self) -UnaryFunction0DId_swigregister = _Freestyle.UnaryFunction0DId_swigregister -UnaryFunction0DId_swigregister(UnaryFunction0DId) - -class UnaryFunction0DViewShape(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DViewShape, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DViewShape, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_UnaryFunction0DViewShape(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DViewShape - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DViewShape_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DViewShape___call__(*args) -UnaryFunction0DViewShape_swigregister = _Freestyle.UnaryFunction0DViewShape_swigregister -UnaryFunction0DViewShape_swigregister(UnaryFunction0DViewShape) - -class UnaryFunction0DVectorViewShape(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction0DVectorViewShape, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction0DVectorViewShape, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_UnaryFunction0DVectorViewShape(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction0DVectorViewShape - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction0DVectorViewShape_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction0DVectorViewShape___call__(*args) -UnaryFunction0DVectorViewShape_swigregister = _Freestyle.UnaryFunction0DVectorViewShape_swigregister -UnaryFunction0DVectorViewShape_swigregister(UnaryFunction0DVectorViewShape) - -class GetXF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetXF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetXF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetXF0D_getName(*args) - def __call__(*args): return _Freestyle.GetXF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetXF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetXF0D - __del__ = lambda self : None; -GetXF0D_swigregister = _Freestyle.GetXF0D_swigregister -GetXF0D_swigregister(GetXF0D) - -class GetYF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetYF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetYF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetYF0D_getName(*args) - def __call__(*args): return _Freestyle.GetYF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetYF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetYF0D - __del__ = lambda self : None; -GetYF0D_swigregister = _Freestyle.GetYF0D_swigregister -GetYF0D_swigregister(GetYF0D) - -class GetZF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetZF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetZF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetZF0D_getName(*args) - def __call__(*args): return _Freestyle.GetZF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetZF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetZF0D - __del__ = lambda self : None; -GetZF0D_swigregister = _Freestyle.GetZF0D_swigregister -GetZF0D_swigregister(GetZF0D) - -class GetProjectedXF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedXF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedXF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetProjectedXF0D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedXF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetProjectedXF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetProjectedXF0D - __del__ = lambda self : None; -GetProjectedXF0D_swigregister = _Freestyle.GetProjectedXF0D_swigregister -GetProjectedXF0D_swigregister(GetProjectedXF0D) - -class GetProjectedYF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedYF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedYF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetProjectedYF0D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedYF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetProjectedYF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetProjectedYF0D - __del__ = lambda self : None; -GetProjectedYF0D_swigregister = _Freestyle.GetProjectedYF0D_swigregister -GetProjectedYF0D_swigregister(GetProjectedYF0D) - -class GetProjectedZF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedZF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedZF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetProjectedZF0D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedZF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetProjectedZF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetProjectedZF0D - __del__ = lambda self : None; -GetProjectedZF0D_swigregister = _Freestyle.GetProjectedZF0D_swigregister -GetProjectedZF0D_swigregister(GetProjectedZF0D) - -class GetCurvilinearAbscissaF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetCurvilinearAbscissaF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetCurvilinearAbscissaF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetCurvilinearAbscissaF0D_getName(*args) - def __call__(*args): return _Freestyle.GetCurvilinearAbscissaF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetCurvilinearAbscissaF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetCurvilinearAbscissaF0D - __del__ = lambda self : None; -GetCurvilinearAbscissaF0D_swigregister = _Freestyle.GetCurvilinearAbscissaF0D_swigregister -GetCurvilinearAbscissaF0D_swigregister(GetCurvilinearAbscissaF0D) - -class GetParameterF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetParameterF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetParameterF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetParameterF0D_getName(*args) - def __call__(*args): return _Freestyle.GetParameterF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetParameterF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetParameterF0D - __del__ = lambda self : None; -GetParameterF0D_swigregister = _Freestyle.GetParameterF0D_swigregister -GetParameterF0D_swigregister(GetParameterF0D) - -class VertexOrientation2DF0D(UnaryFunction0DVec2f): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, VertexOrientation2DF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, VertexOrientation2DF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.VertexOrientation2DF0D_getName(*args) - def __call__(*args): return _Freestyle.VertexOrientation2DF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_VertexOrientation2DF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_VertexOrientation2DF0D - __del__ = lambda self : None; -VertexOrientation2DF0D_swigregister = _Freestyle.VertexOrientation2DF0D_swigregister -VertexOrientation2DF0D_swigregister(VertexOrientation2DF0D) - -class VertexOrientation3DF0D(UnaryFunction0DVec3f): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DVec3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, VertexOrientation3DF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DVec3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, VertexOrientation3DF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.VertexOrientation3DF0D_getName(*args) - def __call__(*args): return _Freestyle.VertexOrientation3DF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_VertexOrientation3DF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_VertexOrientation3DF0D - __del__ = lambda self : None; -VertexOrientation3DF0D_swigregister = _Freestyle.VertexOrientation3DF0D_swigregister -VertexOrientation3DF0D_swigregister(VertexOrientation3DF0D) - -class Curvature2DAngleF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Curvature2DAngleF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Curvature2DAngleF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.Curvature2DAngleF0D_getName(*args) - def __call__(*args): return _Freestyle.Curvature2DAngleF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_Curvature2DAngleF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Curvature2DAngleF0D - __del__ = lambda self : None; -Curvature2DAngleF0D_swigregister = _Freestyle.Curvature2DAngleF0D_swigregister -Curvature2DAngleF0D_swigregister(Curvature2DAngleF0D) - -class ZDiscontinuityF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ZDiscontinuityF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ZDiscontinuityF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.ZDiscontinuityF0D_getName(*args) - def __call__(*args): return _Freestyle.ZDiscontinuityF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ZDiscontinuityF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ZDiscontinuityF0D - __del__ = lambda self : None; -ZDiscontinuityF0D_swigregister = _Freestyle.ZDiscontinuityF0D_swigregister -ZDiscontinuityF0D_swigregister(ZDiscontinuityF0D) - -class Normal2DF0D(UnaryFunction0DVec2f): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Normal2DF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Normal2DF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.Normal2DF0D_getName(*args) - def __call__(*args): return _Freestyle.Normal2DF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_Normal2DF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Normal2DF0D - __del__ = lambda self : None; -Normal2DF0D_swigregister = _Freestyle.Normal2DF0D_swigregister -Normal2DF0D_swigregister(Normal2DF0D) - -class MaterialF0D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, MaterialF0D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, MaterialF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.MaterialF0D_getName(*args) - def __call__(*args): return _Freestyle.MaterialF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_MaterialF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_MaterialF0D - __del__ = lambda self : None; -MaterialF0D_swigregister = _Freestyle.MaterialF0D_swigregister -MaterialF0D_swigregister(MaterialF0D) - -class ShapeIdF0D(UnaryFunction0DId): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DId]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ShapeIdF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DId]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ShapeIdF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.ShapeIdF0D_getName(*args) - def __call__(*args): return _Freestyle.ShapeIdF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ShapeIdF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ShapeIdF0D - __del__ = lambda self : None; -ShapeIdF0D_swigregister = _Freestyle.ShapeIdF0D_swigregister -ShapeIdF0D_swigregister(ShapeIdF0D) - -class QuantitativeInvisibilityF0D(UnaryFunction0DUnsigned): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DUnsigned]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DUnsigned]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.QuantitativeInvisibilityF0D_getName(*args) - def __call__(*args): return _Freestyle.QuantitativeInvisibilityF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_QuantitativeInvisibilityF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityF0D - __del__ = lambda self : None; -QuantitativeInvisibilityF0D_swigregister = _Freestyle.QuantitativeInvisibilityF0D_swigregister -QuantitativeInvisibilityF0D_swigregister(QuantitativeInvisibilityF0D) - -class CurveNatureF0D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, CurveNatureF0D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, CurveNatureF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.CurveNatureF0D_getName(*args) - def __call__(*args): return _Freestyle.CurveNatureF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_CurveNatureF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_CurveNatureF0D - __del__ = lambda self : None; -CurveNatureF0D_swigregister = _Freestyle.CurveNatureF0D_swigregister -CurveNatureF0D_swigregister(CurveNatureF0D) - -class GetShapeF0D(UnaryFunction0DViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetShapeF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetShapeF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetShapeF0D_getName(*args) - def __call__(*args): return _Freestyle.GetShapeF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetShapeF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetShapeF0D - __del__ = lambda self : None; -GetShapeF0D_swigregister = _Freestyle.GetShapeF0D_swigregister -GetShapeF0D_swigregister(GetShapeF0D) - -class GetOccludersF0D(UnaryFunction0DVectorViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludersF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetOccludersF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetOccludersF0D_getName(*args) - def __call__(*args): return _Freestyle.GetOccludersF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetOccludersF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetOccludersF0D - __del__ = lambda self : None; -GetOccludersF0D_swigregister = _Freestyle.GetOccludersF0D_swigregister -GetOccludersF0D_swigregister(GetOccludersF0D) - -class GetOccludeeF0D(UnaryFunction0DViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludeeF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetOccludeeF0D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.GetOccludeeF0D_getName(*args) - def __call__(*args): return _Freestyle.GetOccludeeF0D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_GetOccludeeF0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetOccludeeF0D - __del__ = lambda self : None; -GetOccludeeF0D_swigregister = _Freestyle.GetOccludeeF0D_swigregister -GetOccludeeF0D_swigregister(GetOccludeeF0D) - -getFEdge = _Freestyle.getFEdge -class UnaryFunction1DVoid(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVoid, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVoid, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DVoid: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DVoid(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVoid - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DVoid_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DVoid___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVoid_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVoid_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DVoid(self) - return weakref_proxy(self) -UnaryFunction1DVoid_swigregister = _Freestyle.UnaryFunction1DVoid_swigregister -UnaryFunction1DVoid_swigregister(UnaryFunction1DVoid) - -class UnaryFunction1DUnsigned(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DUnsigned, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DUnsigned, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DUnsigned: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DUnsigned(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DUnsigned - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DUnsigned_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DUnsigned___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DUnsigned_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DUnsigned_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DUnsigned(self) - return weakref_proxy(self) -UnaryFunction1DUnsigned_swigregister = _Freestyle.UnaryFunction1DUnsigned_swigregister -UnaryFunction1DUnsigned_swigregister(UnaryFunction1DUnsigned) - -class UnaryFunction1DFloat(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DFloat, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DFloat, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DFloat: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DFloat(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DFloat - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DFloat_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DFloat___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DFloat_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DFloat_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DFloat(self) - return weakref_proxy(self) -UnaryFunction1DFloat_swigregister = _Freestyle.UnaryFunction1DFloat_swigregister -UnaryFunction1DFloat_swigregister(UnaryFunction1DFloat) - -class UnaryFunction1DDouble(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DDouble, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DDouble, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DDouble: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DDouble(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DDouble - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DDouble_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DDouble___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DDouble_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DDouble_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DDouble(self) - return weakref_proxy(self) -UnaryFunction1DDouble_swigregister = _Freestyle.UnaryFunction1DDouble_swigregister -UnaryFunction1DDouble_swigregister(UnaryFunction1DDouble) - -class UnaryFunction1DVec2f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVec2f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVec2f, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DVec2f: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DVec2f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVec2f - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DVec2f_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DVec2f___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVec2f_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVec2f_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DVec2f(self) - return weakref_proxy(self) -UnaryFunction1DVec2f_swigregister = _Freestyle.UnaryFunction1DVec2f_swigregister -UnaryFunction1DVec2f_swigregister(UnaryFunction1DVec2f) - -class UnaryFunction1DVec3f(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVec3f, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVec3f, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryFunction1DVec3f: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryFunction1DVec3f(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVec3f - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DVec3f_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DVec3f___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVec3f_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVec3f_getIntegrationType(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryFunction1DVec3f(self) - return weakref_proxy(self) -UnaryFunction1DVec3f_swigregister = _Freestyle.UnaryFunction1DVec3f_swigregister -UnaryFunction1DVec3f_swigregister(UnaryFunction1DVec3f) - -class UnaryFunction1DVectorViewShape(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryFunction1DVectorViewShape, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryFunction1DVectorViewShape, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_UnaryFunction1DVectorViewShape(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryFunction1DVectorViewShape - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryFunction1DVectorViewShape_getName(*args) - def __call__(*args): return _Freestyle.UnaryFunction1DVectorViewShape___call__(*args) - def setIntegrationType(*args): return _Freestyle.UnaryFunction1DVectorViewShape_setIntegrationType(*args) - def getIntegrationType(*args): return _Freestyle.UnaryFunction1DVectorViewShape_getIntegrationType(*args) -UnaryFunction1DVectorViewShape_swigregister = _Freestyle.UnaryFunction1DVectorViewShape_swigregister -UnaryFunction1DVectorViewShape_swigregister(UnaryFunction1DVectorViewShape) - -class GetXF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetXF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetXF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetXF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetXF1D_getName(*args) - def __call__(*args): return _Freestyle.GetXF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetXF1D - __del__ = lambda self : None; -GetXF1D_swigregister = _Freestyle.GetXF1D_swigregister -GetXF1D_swigregister(GetXF1D) - -class GetYF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetYF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetYF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetYF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetYF1D_getName(*args) - def __call__(*args): return _Freestyle.GetYF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetYF1D - __del__ = lambda self : None; -GetYF1D_swigregister = _Freestyle.GetYF1D_swigregister -GetYF1D_swigregister(GetYF1D) - -class GetZF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetZF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetZF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetZF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetZF1D_getName(*args) - def __call__(*args): return _Freestyle.GetZF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetZF1D - __del__ = lambda self : None; -GetZF1D_swigregister = _Freestyle.GetZF1D_swigregister -GetZF1D_swigregister(GetZF1D) - -class GetProjectedXF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedXF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedXF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetProjectedXF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetProjectedXF1D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedXF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetProjectedXF1D - __del__ = lambda self : None; -GetProjectedXF1D_swigregister = _Freestyle.GetProjectedXF1D_swigregister -GetProjectedXF1D_swigregister(GetProjectedXF1D) - -class GetProjectedYF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedYF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedYF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetProjectedYF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetProjectedYF1D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedYF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetProjectedYF1D - __del__ = lambda self : None; -GetProjectedYF1D_swigregister = _Freestyle.GetProjectedYF1D_swigregister -GetProjectedYF1D_swigregister(GetProjectedYF1D) - -class GetProjectedZF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetProjectedZF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetProjectedZF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetProjectedZF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetProjectedZF1D_getName(*args) - def __call__(*args): return _Freestyle.GetProjectedZF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetProjectedZF1D - __del__ = lambda self : None; -GetProjectedZF1D_swigregister = _Freestyle.GetProjectedZF1D_swigregister -GetProjectedZF1D_swigregister(GetProjectedZF1D) - -class Orientation2DF1D(UnaryFunction1DVec2f): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Orientation2DF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Orientation2DF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Orientation2DF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.Orientation2DF1D_getName(*args) - def __call__(*args): return _Freestyle.Orientation2DF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_Orientation2DF1D - __del__ = lambda self : None; -Orientation2DF1D_swigregister = _Freestyle.Orientation2DF1D_swigregister -Orientation2DF1D_swigregister(Orientation2DF1D) - -class Orientation3DF1D(UnaryFunction1DVec3f): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVec3f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Orientation3DF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVec3f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Orientation3DF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Orientation3DF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.Orientation3DF1D_getName(*args) - def __call__(*args): return _Freestyle.Orientation3DF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_Orientation3DF1D - __del__ = lambda self : None; -Orientation3DF1D_swigregister = _Freestyle.Orientation3DF1D_swigregister -Orientation3DF1D_swigregister(Orientation3DF1D) - -class ZDiscontinuityF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ZDiscontinuityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ZDiscontinuityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ZDiscontinuityF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ZDiscontinuityF1D_getName(*args) - def __call__(*args): return _Freestyle.ZDiscontinuityF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ZDiscontinuityF1D - __del__ = lambda self : None; -ZDiscontinuityF1D_swigregister = _Freestyle.ZDiscontinuityF1D_swigregister -ZDiscontinuityF1D_swigregister(ZDiscontinuityF1D) - -class QuantitativeInvisibilityF1D(UnaryFunction1DUnsigned): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DUnsigned]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DUnsigned]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_QuantitativeInvisibilityF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.QuantitativeInvisibilityF1D_getName(*args) - def __call__(*args): return _Freestyle.QuantitativeInvisibilityF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityF1D - __del__ = lambda self : None; -QuantitativeInvisibilityF1D_swigregister = _Freestyle.QuantitativeInvisibilityF1D_swigregister -QuantitativeInvisibilityF1D_swigregister(QuantitativeInvisibilityF1D) - -class CurveNatureF1D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, CurveNatureF1D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, CurveNatureF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_CurveNatureF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.CurveNatureF1D_getName(*args) - def __call__(*args): return _Freestyle.CurveNatureF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_CurveNatureF1D - __del__ = lambda self : None; -CurveNatureF1D_swigregister = _Freestyle.CurveNatureF1D_swigregister -CurveNatureF1D_swigregister(CurveNatureF1D) - -class TimeStampF1D(UnaryFunction1DVoid): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TimeStampF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TimeStampF1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.TimeStampF1D_getName(*args) - def __call__(*args): return _Freestyle.TimeStampF1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_TimeStampF1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_TimeStampF1D - __del__ = lambda self : None; -TimeStampF1D_swigregister = _Freestyle.TimeStampF1D_swigregister -TimeStampF1D_swigregister(TimeStampF1D) - -class IncrementChainingTimeStampF1D(UnaryFunction1DVoid): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, IncrementChainingTimeStampF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, IncrementChainingTimeStampF1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.IncrementChainingTimeStampF1D_getName(*args) - def __call__(*args): return _Freestyle.IncrementChainingTimeStampF1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_IncrementChainingTimeStampF1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_IncrementChainingTimeStampF1D - __del__ = lambda self : None; -IncrementChainingTimeStampF1D_swigregister = _Freestyle.IncrementChainingTimeStampF1D_swigregister -IncrementChainingTimeStampF1D_swigregister(IncrementChainingTimeStampF1D) - -class ChainingTimeStampF1D(UnaryFunction1DVoid): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ChainingTimeStampF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVoid]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ChainingTimeStampF1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.ChainingTimeStampF1D_getName(*args) - def __call__(*args): return _Freestyle.ChainingTimeStampF1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ChainingTimeStampF1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ChainingTimeStampF1D - __del__ = lambda self : None; -ChainingTimeStampF1D_swigregister = _Freestyle.ChainingTimeStampF1D_swigregister -ChainingTimeStampF1D_swigregister(ChainingTimeStampF1D) - -class Curvature2DAngleF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Curvature2DAngleF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Curvature2DAngleF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Curvature2DAngleF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.Curvature2DAngleF1D_getName(*args) - def __call__(*args): return _Freestyle.Curvature2DAngleF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_Curvature2DAngleF1D - __del__ = lambda self : None; -Curvature2DAngleF1D_swigregister = _Freestyle.Curvature2DAngleF1D_swigregister -Curvature2DAngleF1D_swigregister(Curvature2DAngleF1D) - -class Normal2DF1D(UnaryFunction1DVec2f): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVec2f]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Normal2DF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVec2f]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Normal2DF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Normal2DF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.Normal2DF1D_getName(*args) - def __call__(*args): return _Freestyle.Normal2DF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_Normal2DF1D - __del__ = lambda self : None; -Normal2DF1D_swigregister = _Freestyle.Normal2DF1D_swigregister -Normal2DF1D_swigregister(Normal2DF1D) - -class GetShapeF1D(UnaryFunction1DVectorViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetShapeF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetShapeF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetShapeF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetShapeF1D_getName(*args) - def __call__(*args): return _Freestyle.GetShapeF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetShapeF1D - __del__ = lambda self : None; -GetShapeF1D_swigregister = _Freestyle.GetShapeF1D_swigregister -GetShapeF1D_swigregister(GetShapeF1D) - -class GetOccludersF1D(UnaryFunction1DVectorViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludersF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetOccludersF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetOccludersF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetOccludersF1D_getName(*args) - def __call__(*args): return _Freestyle.GetOccludersF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetOccludersF1D - __del__ = lambda self : None; -GetOccludersF1D_swigregister = _Freestyle.GetOccludersF1D_swigregister -GetOccludersF1D_swigregister(GetOccludersF1D) - -class GetOccludeeF1D(UnaryFunction1DVectorViewShape): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetOccludeeF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DVectorViewShape]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetOccludeeF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetOccludeeF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetOccludeeF1D_getName(*args) - def __call__(*args): return _Freestyle.GetOccludeeF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetOccludeeF1D - __del__ = lambda self : None; -GetOccludeeF1D_swigregister = _Freestyle.GetOccludeeF1D_swigregister -GetOccludeeF1D_swigregister(GetOccludeeF1D) - -class Module(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Module, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Module, name) - __repr__ = _swig_repr - __swig_getmethods__["setAlwaysRefresh"] = lambda x: _Freestyle.Module_setAlwaysRefresh - if _newclass:setAlwaysRefresh = staticmethod(_Freestyle.Module_setAlwaysRefresh) - __swig_getmethods__["setCausal"] = lambda x: _Freestyle.Module_setCausal - if _newclass:setCausal = staticmethod(_Freestyle.Module_setCausal) - __swig_getmethods__["setDrawable"] = lambda x: _Freestyle.Module_setDrawable - if _newclass:setDrawable = staticmethod(_Freestyle.Module_setDrawable) - __swig_getmethods__["getAlwaysRefresh"] = lambda x: _Freestyle.Module_getAlwaysRefresh - if _newclass:getAlwaysRefresh = staticmethod(_Freestyle.Module_getAlwaysRefresh) - __swig_getmethods__["getCausal"] = lambda x: _Freestyle.Module_getCausal - if _newclass:getCausal = staticmethod(_Freestyle.Module_getCausal) - __swig_getmethods__["getDrawable"] = lambda x: _Freestyle.Module_getDrawable - if _newclass:getDrawable = staticmethod(_Freestyle.Module_getDrawable) - def __init__(self, *args): - this = _Freestyle.new_Module(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Module - __del__ = lambda self : None; -Module_swigregister = _Freestyle.Module_swigregister -Module_swigregister(Module) -Module_setAlwaysRefresh = _Freestyle.Module_setAlwaysRefresh -Module_setCausal = _Freestyle.Module_setCausal -Module_setDrawable = _Freestyle.Module_setDrawable -Module_getAlwaysRefresh = _Freestyle.Module_getAlwaysRefresh -Module_getCausal = _Freestyle.Module_getCausal -Module_getDrawable = _Freestyle.Module_getDrawable - -class DensityF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, DensityF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, DensityF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_DensityF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.DensityF0D_getName(*args) - def __call__(*args): return _Freestyle.DensityF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_DensityF0D - __del__ = lambda self : None; -DensityF0D_swigregister = _Freestyle.DensityF0D_swigregister -DensityF0D_swigregister(DensityF0D) - -class LocalAverageDepthF0D(UnaryFunction0DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, LocalAverageDepthF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, LocalAverageDepthF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_LocalAverageDepthF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.LocalAverageDepthF0D_getName(*args) - def __call__(*args): return _Freestyle.LocalAverageDepthF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_LocalAverageDepthF0D - __del__ = lambda self : None; -LocalAverageDepthF0D_swigregister = _Freestyle.LocalAverageDepthF0D_swigregister -LocalAverageDepthF0D_swigregister(LocalAverageDepthF0D) - -class ReadMapPixelF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ReadMapPixelF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ReadMapPixelF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ReadMapPixelF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ReadMapPixelF0D_getName(*args) - def __call__(*args): return _Freestyle.ReadMapPixelF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ReadMapPixelF0D - __del__ = lambda self : None; -ReadMapPixelF0D_swigregister = _Freestyle.ReadMapPixelF0D_swigregister -ReadMapPixelF0D_swigregister(ReadMapPixelF0D) - -class ReadSteerableViewMapPixelF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ReadSteerableViewMapPixelF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ReadSteerableViewMapPixelF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ReadSteerableViewMapPixelF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ReadSteerableViewMapPixelF0D_getName(*args) - def __call__(*args): return _Freestyle.ReadSteerableViewMapPixelF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ReadSteerableViewMapPixelF0D - __del__ = lambda self : None; -ReadSteerableViewMapPixelF0D_swigregister = _Freestyle.ReadSteerableViewMapPixelF0D_swigregister -ReadSteerableViewMapPixelF0D_swigregister(ReadSteerableViewMapPixelF0D) - -class ReadCompleteViewMapPixelF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ReadCompleteViewMapPixelF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ReadCompleteViewMapPixelF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ReadCompleteViewMapPixelF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ReadCompleteViewMapPixelF0D_getName(*args) - def __call__(*args): return _Freestyle.ReadCompleteViewMapPixelF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ReadCompleteViewMapPixelF0D - __del__ = lambda self : None; -ReadCompleteViewMapPixelF0D_swigregister = _Freestyle.ReadCompleteViewMapPixelF0D_swigregister -ReadCompleteViewMapPixelF0D_swigregister(ReadCompleteViewMapPixelF0D) - -class GetViewMapGradientNormF0D(UnaryFunction0DFloat): - __swig_setmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetViewMapGradientNormF0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction0DFloat]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetViewMapGradientNormF0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetViewMapGradientNormF0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetViewMapGradientNormF0D_getName(*args) - def __call__(*args): return _Freestyle.GetViewMapGradientNormF0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetViewMapGradientNormF0D - __del__ = lambda self : None; -GetViewMapGradientNormF0D_swigregister = _Freestyle.GetViewMapGradientNormF0D_swigregister -GetViewMapGradientNormF0D_swigregister(GetViewMapGradientNormF0D) - -class DensityF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, DensityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, DensityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_DensityF1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_DensityF1D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.DensityF1D_getName(*args) - def __call__(*args): return _Freestyle.DensityF1D___call__(*args) -DensityF1D_swigregister = _Freestyle.DensityF1D_swigregister -DensityF1D_swigregister(DensityF1D) - -class LocalAverageDepthF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, LocalAverageDepthF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, LocalAverageDepthF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_LocalAverageDepthF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.LocalAverageDepthF1D_getName(*args) - def __call__(*args): return _Freestyle.LocalAverageDepthF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_LocalAverageDepthF1D - __del__ = lambda self : None; -LocalAverageDepthF1D_swigregister = _Freestyle.LocalAverageDepthF1D_swigregister -LocalAverageDepthF1D_swigregister(LocalAverageDepthF1D) - -class GetCompleteViewMapDensityF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetCompleteViewMapDensityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetCompleteViewMapDensityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetCompleteViewMapDensityF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetCompleteViewMapDensityF1D_getName(*args) - def __call__(*args): return _Freestyle.GetCompleteViewMapDensityF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetCompleteViewMapDensityF1D - __del__ = lambda self : None; -GetCompleteViewMapDensityF1D_swigregister = _Freestyle.GetCompleteViewMapDensityF1D_swigregister -GetCompleteViewMapDensityF1D_swigregister(GetCompleteViewMapDensityF1D) - -class GetDirectionalViewMapDensityF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetDirectionalViewMapDensityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetDirectionalViewMapDensityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetDirectionalViewMapDensityF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetDirectionalViewMapDensityF1D_getName(*args) - def __call__(*args): return _Freestyle.GetDirectionalViewMapDensityF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetDirectionalViewMapDensityF1D - __del__ = lambda self : None; -GetDirectionalViewMapDensityF1D_swigregister = _Freestyle.GetDirectionalViewMapDensityF1D_swigregister -GetDirectionalViewMapDensityF1D_swigregister(GetDirectionalViewMapDensityF1D) - -class GetSteerableViewMapDensityF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetSteerableViewMapDensityF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetSteerableViewMapDensityF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetSteerableViewMapDensityF1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_GetSteerableViewMapDensityF1D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.GetSteerableViewMapDensityF1D_getName(*args) - def __call__(*args): return _Freestyle.GetSteerableViewMapDensityF1D___call__(*args) -GetSteerableViewMapDensityF1D_swigregister = _Freestyle.GetSteerableViewMapDensityF1D_swigregister -GetSteerableViewMapDensityF1D_swigregister(GetSteerableViewMapDensityF1D) - -class GetViewMapGradientNormF1D(UnaryFunction1DDouble): - __swig_setmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GetViewMapGradientNormF1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryFunction1DDouble]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GetViewMapGradientNormF1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GetViewMapGradientNormF1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.GetViewMapGradientNormF1D_getName(*args) - def __call__(*args): return _Freestyle.GetViewMapGradientNormF1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_GetViewMapGradientNormF1D - __del__ = lambda self : None; -GetViewMapGradientNormF1D_swigregister = _Freestyle.GetViewMapGradientNormF1D_swigregister -GetViewMapGradientNormF1D_swigregister(GetViewMapGradientNormF1D) - -GetTimeStampCF = _Freestyle.GetTimeStampCF -GetCanvasWidthCF = _Freestyle.GetCanvasWidthCF -GetCanvasHeightCF = _Freestyle.GetCanvasHeightCF -ReadMapPixelCF = _Freestyle.ReadMapPixelCF -ReadCompleteViewMapPixelCF = _Freestyle.ReadCompleteViewMapPixelCF -ReadDirectionalViewMapPixelCF = _Freestyle.ReadDirectionalViewMapPixelCF -GetSelectedFEdgeCF = _Freestyle.GetSelectedFEdgeCF -class AdjacencyIterator(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, AdjacencyIterator, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, AdjacencyIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_AdjacencyIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_AdjacencyIterator - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.AdjacencyIterator_getExactTypeName(*args) - def isEnd(*args): return _Freestyle.AdjacencyIterator_isEnd(*args) - def isBegin(*args): return _Freestyle.AdjacencyIterator_isBegin(*args) - def isIncoming(*args): return _Freestyle.AdjacencyIterator_isIncoming(*args) - def getObject(*args): return _Freestyle.AdjacencyIterator_getObject(*args) - def __deref__(*args): return _Freestyle.AdjacencyIterator___deref__(*args) - def increment(*args): return _Freestyle.AdjacencyIterator_increment(*args) - def decrement(*args): return _Freestyle.AdjacencyIterator_decrement(*args) - def getId(*args): return _Freestyle.AdjacencyIterator_getId(*args) - def getNature(*args): return _Freestyle.AdjacencyIterator_getNature(*args) - __swig_setmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_set - __swig_getmethods__["userdata"] = _Freestyle.AdjacencyIterator_userdata_get - if _newclass:userdata = _swig_property(_Freestyle.AdjacencyIterator_userdata_get, _Freestyle.AdjacencyIterator_userdata_set) - def duplicate(*args): return _Freestyle.AdjacencyIterator_duplicate(*args) - def A(*args): return _Freestyle.AdjacencyIterator_A(*args) - def B(*args): return _Freestyle.AdjacencyIterator_B(*args) - def fedgeA(*args): return _Freestyle.AdjacencyIterator_fedgeA(*args) - def fedgeB(*args): return _Freestyle.AdjacencyIterator_fedgeB(*args) - def viewShape(*args): return _Freestyle.AdjacencyIterator_viewShape(*args) - def aShape(*args): return _Freestyle.AdjacencyIterator_aShape(*args) - def isClosed(*args): return _Freestyle.AdjacencyIterator_isClosed(*args) - def getChainingTimeStamp(*args): return _Freestyle.AdjacencyIterator_getChainingTimeStamp(*args) - def bShape(*args): return _Freestyle.AdjacencyIterator_bShape(*args) - def occluders(*args): return _Freestyle.AdjacencyIterator_occluders(*args) - def splittingId(*args): return _Freestyle.AdjacencyIterator_splittingId(*args) - def setA(*args): return _Freestyle.AdjacencyIterator_setA(*args) - def setB(*args): return _Freestyle.AdjacencyIterator_setB(*args) - def setNature(*args): return _Freestyle.AdjacencyIterator_setNature(*args) - def setFEdgeA(*args): return _Freestyle.AdjacencyIterator_setFEdgeA(*args) - def setFEdgeB(*args): return _Freestyle.AdjacencyIterator_setFEdgeB(*args) - def setShape(*args): return _Freestyle.AdjacencyIterator_setShape(*args) - def setId(*args): return _Freestyle.AdjacencyIterator_setId(*args) - def UpdateFEdges(*args): return _Freestyle.AdjacencyIterator_UpdateFEdges(*args) - def setaShape(*args): return _Freestyle.AdjacencyIterator_setaShape(*args) - def setQI(*args): return _Freestyle.AdjacencyIterator_setQI(*args) - def setChainingTimeStamp(*args): return _Freestyle.AdjacencyIterator_setChainingTimeStamp(*args) - def AddOccluder(*args): return _Freestyle.AdjacencyIterator_AddOccluder(*args) - def setSplittingId(*args): return _Freestyle.AdjacencyIterator_setSplittingId(*args) - def intersect_2d_area(*args): return _Freestyle.AdjacencyIterator_intersect_2d_area(*args) - def include_in_2d_area(*args): return _Freestyle.AdjacencyIterator_include_in_2d_area(*args) - def getLength2D(*args): return _Freestyle.AdjacencyIterator_getLength2D(*args) - def qi(*args): return _Freestyle.AdjacencyIterator_qi(*args) - def occluders_begin(*args): return _Freestyle.AdjacencyIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.AdjacencyIterator_occluders_end(*args) - def occluders_size(*args): return _Freestyle.AdjacencyIterator_occluders_size(*args) - def occluders_empty(*args): return _Freestyle.AdjacencyIterator_occluders_empty(*args) - def occludee(*args): return _Freestyle.AdjacencyIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.AdjacencyIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.AdjacencyIterator_occludee_empty(*args) - def shape_id(*args): return _Freestyle.AdjacencyIterator_shape_id(*args) - def shape(*args): return _Freestyle.AdjacencyIterator_shape(*args) - def shape_importance(*args): return _Freestyle.AdjacencyIterator_shape_importance(*args) - def verticesBegin(*args): return _Freestyle.AdjacencyIterator_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.AdjacencyIterator_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.AdjacencyIterator_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.AdjacencyIterator_pointsEnd(*args) - def getTimeStamp(*args): return _Freestyle.AdjacencyIterator_getTimeStamp(*args) - def setTimeStamp(*args): return _Freestyle.AdjacencyIterator_setTimeStamp(*args) -AdjacencyIterator_swigregister = _Freestyle.AdjacencyIterator_swigregister -AdjacencyIterator_swigregister(AdjacencyIterator) -LoadMapCF = _Freestyle.LoadMapCF - -class ChainingIterator(ViewEdgeViewEdgeIterator): - __swig_setmethods__ = {} - for _s in [ViewEdgeViewEdgeIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ChainingIterator, name, value) - __swig_getmethods__ = {} - for _s in [ViewEdgeViewEdgeIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ChainingIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == ChainingIterator: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_ChainingIterator(*args) - try: self.this.append(this) - except: self.this = this - def getExactTypeName(*args): return _Freestyle.ChainingIterator_getExactTypeName(*args) - def init(*args): return _Freestyle.ChainingIterator_init(*args) - def traverse(*args): return _Freestyle.ChainingIterator_traverse(*args) - def getVertex(*args): return _Freestyle.ChainingIterator_getVertex(*args) - def isIncrementing(*args): return _Freestyle.ChainingIterator_isIncrementing(*args) - def increment(*args): return _Freestyle.ChainingIterator_increment(*args) - def decrement(*args): return _Freestyle.ChainingIterator_decrement(*args) - __swig_destroy__ = _Freestyle.delete_ChainingIterator - __del__ = lambda self : None; - def __disown__(self): - self.this.disown() - _Freestyle.disown_ChainingIterator(self) - return weakref_proxy(self) -ChainingIterator_swigregister = _Freestyle.ChainingIterator_swigregister -ChainingIterator_swigregister(ChainingIterator) - -class ChainSilhouetteIterator(ChainingIterator): - __swig_setmethods__ = {} - for _s in [ChainingIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ChainSilhouetteIterator, name, value) - __swig_getmethods__ = {} - for _s in [ChainingIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ChainSilhouetteIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == ChainSilhouetteIterator: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_ChainSilhouetteIterator(*args) - try: self.this.append(this) - except: self.this = this - def getExactTypeName(*args): return _Freestyle.ChainSilhouetteIterator_getExactTypeName(*args) - def traverse(*args): return _Freestyle.ChainSilhouetteIterator_traverse(*args) - __swig_destroy__ = _Freestyle.delete_ChainSilhouetteIterator - __del__ = lambda self : None; - def __disown__(self): - self.this.disown() - _Freestyle.disown_ChainSilhouetteIterator(self) - return weakref_proxy(self) -ChainSilhouetteIterator_swigregister = _Freestyle.ChainSilhouetteIterator_swigregister -ChainSilhouetteIterator_swigregister(ChainSilhouetteIterator) - -class ChainPredicateIterator(ChainingIterator): - __swig_setmethods__ = {} - for _s in [ChainingIterator]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ChainPredicateIterator, name, value) - __swig_getmethods__ = {} - for _s in [ChainingIterator]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ChainPredicateIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == ChainPredicateIterator: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_ChainPredicateIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ChainPredicateIterator - __del__ = lambda self : None; - def getExactTypeName(*args): return _Freestyle.ChainPredicateIterator_getExactTypeName(*args) - def traverse(*args): return _Freestyle.ChainPredicateIterator_traverse(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_ChainPredicateIterator(self) - return weakref_proxy(self) -ChainPredicateIterator_swigregister = _Freestyle.ChainPredicateIterator_swigregister -ChainPredicateIterator_swigregister(ChainPredicateIterator) - -class UnaryPredicate0D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryPredicate0D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryPredicate0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryPredicate0D: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryPredicate0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryPredicate0D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryPredicate0D_getName(*args) - def __call__(*args): return _Freestyle.UnaryPredicate0D___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryPredicate0D(self) - return weakref_proxy(self) -UnaryPredicate0D_swigregister = _Freestyle.UnaryPredicate0D_swigregister -UnaryPredicate0D_swigregister(UnaryPredicate0D) - -class BinaryPredicate0D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, BinaryPredicate0D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, BinaryPredicate0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_BinaryPredicate0D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_BinaryPredicate0D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.BinaryPredicate0D_getName(*args) - def __call__(*args): return _Freestyle.BinaryPredicate0D___call__(*args) -BinaryPredicate0D_swigregister = _Freestyle.BinaryPredicate0D_swigregister -BinaryPredicate0D_swigregister(BinaryPredicate0D) - -class TrueUP0D(UnaryPredicate0D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TrueUP0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TrueUP0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_TrueUP0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.TrueUP0D_getName(*args) - def __call__(*args): return _Freestyle.TrueUP0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_TrueUP0D - __del__ = lambda self : None; -TrueUP0D_swigregister = _Freestyle.TrueUP0D_swigregister -TrueUP0D_swigregister(TrueUP0D) - -class FalseUP0D(UnaryPredicate0D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FalseUP0D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FalseUP0D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_FalseUP0D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.FalseUP0D_getName(*args) - def __call__(*args): return _Freestyle.FalseUP0D___call__(*args) - __swig_destroy__ = _Freestyle.delete_FalseUP0D - __del__ = lambda self : None; -FalseUP0D_swigregister = _Freestyle.FalseUP0D_swigregister -FalseUP0D_swigregister(FalseUP0D) - -class UnaryPredicate1D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, UnaryPredicate1D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, UnaryPredicate1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == UnaryPredicate1D: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_UnaryPredicate1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_UnaryPredicate1D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.UnaryPredicate1D_getName(*args) - def __call__(*args): return _Freestyle.UnaryPredicate1D___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_UnaryPredicate1D(self) - return weakref_proxy(self) -UnaryPredicate1D_swigregister = _Freestyle.UnaryPredicate1D_swigregister -UnaryPredicate1D_swigregister(UnaryPredicate1D) - -class BinaryPredicate1D(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, BinaryPredicate1D, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, BinaryPredicate1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == BinaryPredicate1D: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_BinaryPredicate1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_BinaryPredicate1D - __del__ = lambda self : None; - def getName(*args): return _Freestyle.BinaryPredicate1D_getName(*args) - def __call__(*args): return _Freestyle.BinaryPredicate1D___call__(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_BinaryPredicate1D(self) - return weakref_proxy(self) -BinaryPredicate1D_swigregister = _Freestyle.BinaryPredicate1D_swigregister -BinaryPredicate1D_swigregister(BinaryPredicate1D) - -class TrueUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TrueUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TrueUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_TrueUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.TrueUP1D_getName(*args) - def __call__(*args): return _Freestyle.TrueUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_TrueUP1D - __del__ = lambda self : None; -TrueUP1D_swigregister = _Freestyle.TrueUP1D_swigregister -TrueUP1D_swigregister(TrueUP1D) - -class FalseUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FalseUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FalseUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_FalseUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.FalseUP1D_getName(*args) - def __call__(*args): return _Freestyle.FalseUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_FalseUP1D - __del__ = lambda self : None; -FalseUP1D_swigregister = _Freestyle.FalseUP1D_swigregister -FalseUP1D_swigregister(FalseUP1D) - -class QuantitativeInvisibilityUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, QuantitativeInvisibilityUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, QuantitativeInvisibilityUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_QuantitativeInvisibilityUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.QuantitativeInvisibilityUP1D_getName(*args) - def __call__(*args): return _Freestyle.QuantitativeInvisibilityUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_QuantitativeInvisibilityUP1D - __del__ = lambda self : None; -QuantitativeInvisibilityUP1D_swigregister = _Freestyle.QuantitativeInvisibilityUP1D_swigregister -QuantitativeInvisibilityUP1D_swigregister(QuantitativeInvisibilityUP1D) - -class ContourUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ContourUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ContourUP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.ContourUP1D_getName(*args) - def __call__(*args): return _Freestyle.ContourUP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ContourUP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ContourUP1D - __del__ = lambda self : None; -ContourUP1D_swigregister = _Freestyle.ContourUP1D_swigregister -ContourUP1D_swigregister(ContourUP1D) - -class ExternalContourUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ExternalContourUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ExternalContourUP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.ExternalContourUP1D_getName(*args) - def __call__(*args): return _Freestyle.ExternalContourUP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ExternalContourUP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ExternalContourUP1D - __del__ = lambda self : None; -ExternalContourUP1D_swigregister = _Freestyle.ExternalContourUP1D_swigregister -ExternalContourUP1D_swigregister(ExternalContourUP1D) - -class EqualToTimeStampUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, EqualToTimeStampUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, EqualToTimeStampUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_EqualToTimeStampUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.EqualToTimeStampUP1D_getName(*args) - def __call__(*args): return _Freestyle.EqualToTimeStampUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_EqualToTimeStampUP1D - __del__ = lambda self : None; -EqualToTimeStampUP1D_swigregister = _Freestyle.EqualToTimeStampUP1D_swigregister -EqualToTimeStampUP1D_swigregister(EqualToTimeStampUP1D) - -class EqualToChainingTimeStampUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, EqualToChainingTimeStampUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, EqualToChainingTimeStampUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_EqualToChainingTimeStampUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.EqualToChainingTimeStampUP1D_getName(*args) - def __call__(*args): return _Freestyle.EqualToChainingTimeStampUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_EqualToChainingTimeStampUP1D - __del__ = lambda self : None; -EqualToChainingTimeStampUP1D_swigregister = _Freestyle.EqualToChainingTimeStampUP1D_swigregister -EqualToChainingTimeStampUP1D_swigregister(EqualToChainingTimeStampUP1D) - -class ShapeUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ShapeUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ShapeUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ShapeUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ShapeUP1D_getName(*args) - def __call__(*args): return _Freestyle.ShapeUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ShapeUP1D - __del__ = lambda self : None; -ShapeUP1D_swigregister = _Freestyle.ShapeUP1D_swigregister -ShapeUP1D_swigregister(ShapeUP1D) - -class TrueBP1D(BinaryPredicate1D): - __swig_setmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TrueBP1D, name, value) - __swig_getmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TrueBP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.TrueBP1D_getName(*args) - def __call__(*args): return _Freestyle.TrueBP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_TrueBP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_TrueBP1D - __del__ = lambda self : None; -TrueBP1D_swigregister = _Freestyle.TrueBP1D_swigregister -TrueBP1D_swigregister(TrueBP1D) - -class FalseBP1D(BinaryPredicate1D): - __swig_setmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, FalseBP1D, name, value) - __swig_getmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, FalseBP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.FalseBP1D_getName(*args) - def __call__(*args): return _Freestyle.FalseBP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_FalseBP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_FalseBP1D - __del__ = lambda self : None; -FalseBP1D_swigregister = _Freestyle.FalseBP1D_swigregister -FalseBP1D_swigregister(FalseBP1D) - -class Length2DBP1D(BinaryPredicate1D): - __swig_setmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Length2DBP1D, name, value) - __swig_getmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Length2DBP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.Length2DBP1D_getName(*args) - def __call__(*args): return _Freestyle.Length2DBP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_Length2DBP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Length2DBP1D - __del__ = lambda self : None; -Length2DBP1D_swigregister = _Freestyle.Length2DBP1D_swigregister -Length2DBP1D_swigregister(Length2DBP1D) - -class SameShapeIdBP1D(BinaryPredicate1D): - __swig_setmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, SameShapeIdBP1D, name, value) - __swig_getmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, SameShapeIdBP1D, name) - __repr__ = _swig_repr - def getName(*args): return _Freestyle.SameShapeIdBP1D_getName(*args) - def __call__(*args): return _Freestyle.SameShapeIdBP1D___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_SameShapeIdBP1D(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_SameShapeIdBP1D - __del__ = lambda self : None; -SameShapeIdBP1D_swigregister = _Freestyle.SameShapeIdBP1D_swigregister -SameShapeIdBP1D_swigregister(SameShapeIdBP1D) - -class ViewMapGradientNormBP1D(BinaryPredicate1D): - __swig_setmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ViewMapGradientNormBP1D, name, value) - __swig_getmethods__ = {} - for _s in [BinaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ViewMapGradientNormBP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ViewMapGradientNormBP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ViewMapGradientNormBP1D_getName(*args) - def __call__(*args): return _Freestyle.ViewMapGradientNormBP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_ViewMapGradientNormBP1D - __del__ = lambda self : None; -ViewMapGradientNormBP1D_swigregister = _Freestyle.ViewMapGradientNormBP1D_swigregister -ViewMapGradientNormBP1D_swigregister(ViewMapGradientNormBP1D) - -class DensityLowerThanUP1D(UnaryPredicate1D): - __swig_setmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, DensityLowerThanUP1D, name, value) - __swig_getmethods__ = {} - for _s in [UnaryPredicate1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, DensityLowerThanUP1D, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_DensityLowerThanUP1D(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.DensityLowerThanUP1D_getName(*args) - def __call__(*args): return _Freestyle.DensityLowerThanUP1D___call__(*args) - __swig_destroy__ = _Freestyle.delete_DensityLowerThanUP1D - __del__ = lambda self : None; -DensityLowerThanUP1D_swigregister = _Freestyle.DensityLowerThanUP1D_swigregister -DensityLowerThanUP1D_swigregister(DensityLowerThanUP1D) - -class CurvePointIterator(Interface0DIteratorNested): - __swig_setmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, CurvePointIterator, name, value) - __swig_getmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, CurvePointIterator, name) - __repr__ = _swig_repr - __swig_setmethods__["_CurvilinearLength"] = _Freestyle.CurvePointIterator__CurvilinearLength_set - __swig_getmethods__["_CurvilinearLength"] = _Freestyle.CurvePointIterator__CurvilinearLength_get - if _newclass:_CurvilinearLength = _swig_property(_Freestyle.CurvePointIterator__CurvilinearLength_get, _Freestyle.CurvePointIterator__CurvilinearLength_set) - __swig_setmethods__["_step"] = _Freestyle.CurvePointIterator__step_set - __swig_getmethods__["_step"] = _Freestyle.CurvePointIterator__step_get - if _newclass:_step = _swig_property(_Freestyle.CurvePointIterator__step_get, _Freestyle.CurvePointIterator__step_set) - __swig_setmethods__["__A"] = _Freestyle.CurvePointIterator___A_set - __swig_getmethods__["__A"] = _Freestyle.CurvePointIterator___A_get - if _newclass:__A = _swig_property(_Freestyle.CurvePointIterator___A_get, _Freestyle.CurvePointIterator___A_set) - __swig_setmethods__["__B"] = _Freestyle.CurvePointIterator___B_set - __swig_getmethods__["__B"] = _Freestyle.CurvePointIterator___B_get - if _newclass:__B = _swig_property(_Freestyle.CurvePointIterator___B_get, _Freestyle.CurvePointIterator___B_set) - __swig_setmethods__["_begin"] = _Freestyle.CurvePointIterator__begin_set - __swig_getmethods__["_begin"] = _Freestyle.CurvePointIterator__begin_get - if _newclass:_begin = _swig_property(_Freestyle.CurvePointIterator__begin_get, _Freestyle.CurvePointIterator__begin_set) - __swig_setmethods__["_end"] = _Freestyle.CurvePointIterator__end_set - __swig_getmethods__["_end"] = _Freestyle.CurvePointIterator__end_get - if _newclass:_end = _swig_property(_Freestyle.CurvePointIterator__end_get, _Freestyle.CurvePointIterator__end_set) - __swig_setmethods__["_n"] = _Freestyle.CurvePointIterator__n_set - __swig_getmethods__["_n"] = _Freestyle.CurvePointIterator__n_get - if _newclass:_n = _swig_property(_Freestyle.CurvePointIterator__n_get, _Freestyle.CurvePointIterator__n_set) - __swig_setmethods__["_currentn"] = _Freestyle.CurvePointIterator__currentn_set - __swig_getmethods__["_currentn"] = _Freestyle.CurvePointIterator__currentn_get - if _newclass:_currentn = _swig_property(_Freestyle.CurvePointIterator__currentn_get, _Freestyle.CurvePointIterator__currentn_set) - __swig_setmethods__["_t"] = _Freestyle.CurvePointIterator__t_set - __swig_getmethods__["_t"] = _Freestyle.CurvePointIterator__t_get - if _newclass:_t = _swig_property(_Freestyle.CurvePointIterator__t_get, _Freestyle.CurvePointIterator__t_set) - __swig_setmethods__["_Point"] = _Freestyle.CurvePointIterator__Point_set - __swig_getmethods__["_Point"] = _Freestyle.CurvePointIterator__Point_get - if _newclass:_Point = _swig_property(_Freestyle.CurvePointIterator__Point_get, _Freestyle.CurvePointIterator__Point_set) - __swig_setmethods__["_CurveLength"] = _Freestyle.CurvePointIterator__CurveLength_set - __swig_getmethods__["_CurveLength"] = _Freestyle.CurvePointIterator__CurveLength_get - if _newclass:_CurveLength = _swig_property(_Freestyle.CurvePointIterator__CurveLength_get, _Freestyle.CurvePointIterator__CurveLength_set) - def __init__(self, *args): - this = _Freestyle.new_CurvePointIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_CurvePointIterator - __del__ = lambda self : None; - def copy(*args): return _Freestyle.CurvePointIterator_copy(*args) - def castToInterface0DIterator(*args): return _Freestyle.CurvePointIterator_castToInterface0DIterator(*args) - def getExactTypeName(*args): return _Freestyle.CurvePointIterator_getExactTypeName(*args) - def __eq__(*args): return _Freestyle.CurvePointIterator___eq__(*args) - def getObject(*args): return _Freestyle.CurvePointIterator_getObject(*args) - def __deref__(*args): return _Freestyle.CurvePointIterator___deref__(*args) - def isBegin(*args): return _Freestyle.CurvePointIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.CurvePointIterator_isEnd(*args) - def increment(*args): return _Freestyle.CurvePointIterator_increment(*args) - def decrement(*args): return _Freestyle.CurvePointIterator_decrement(*args) - def t(*args): return _Freestyle.CurvePointIterator_t(*args) - def u(*args): return _Freestyle.CurvePointIterator_u(*args) - def getX(*args): return _Freestyle.CurvePointIterator_getX(*args) - def getY(*args): return _Freestyle.CurvePointIterator_getY(*args) - def getZ(*args): return _Freestyle.CurvePointIterator_getZ(*args) - def getPoint3D(*args): return _Freestyle.CurvePointIterator_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.CurvePointIterator_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.CurvePointIterator_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.CurvePointIterator_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.CurvePointIterator_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.CurvePointIterator_getFEdge(*args) - def getId(*args): return _Freestyle.CurvePointIterator_getId(*args) - def getNature(*args): return _Freestyle.CurvePointIterator_getNature(*args) - def castToSVertex(*args): return _Freestyle.CurvePointIterator_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.CurvePointIterator_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.CurvePointIterator_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.CurvePointIterator_castToTVertex(*args) - def A(*args): return _Freestyle.CurvePointIterator_A(*args) - def B(*args): return _Freestyle.CurvePointIterator_B(*args) - def t2d(*args): return _Freestyle.CurvePointIterator_t2d(*args) - def setA(*args): return _Freestyle.CurvePointIterator_setA(*args) - def setB(*args): return _Freestyle.CurvePointIterator_setB(*args) - def setT2d(*args): return _Freestyle.CurvePointIterator_setT2d(*args) - def fedge(*args): return _Freestyle.CurvePointIterator_fedge(*args) - def point2d(*args): return _Freestyle.CurvePointIterator_point2d(*args) - def point3d(*args): return _Freestyle.CurvePointIterator_point3d(*args) - def normal(*args): return _Freestyle.CurvePointIterator_normal(*args) - def shape(*args): return _Freestyle.CurvePointIterator_shape(*args) - def occluders_begin(*args): return _Freestyle.CurvePointIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.CurvePointIterator_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.CurvePointIterator_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.CurvePointIterator_occluders_size(*args) - def occludee(*args): return _Freestyle.CurvePointIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.CurvePointIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.CurvePointIterator_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.CurvePointIterator_z_discontinuity(*args) - def curvatureFredo(*args): return _Freestyle.CurvePointIterator_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.CurvePointIterator_directionFredo(*args) -CurvePointIterator_swigregister = _Freestyle.CurvePointIterator_swigregister -CurvePointIterator_swigregister(CurvePointIterator) - -class CurvePoint(Interface0D): - __swig_setmethods__ = {} - for _s in [Interface0D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, CurvePoint, name, value) - __swig_getmethods__ = {} - for _s in [Interface0D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, CurvePoint, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.CurvePoint_getExactTypeName(*args) - def getX(*args): return _Freestyle.CurvePoint_getX(*args) - def getY(*args): return _Freestyle.CurvePoint_getY(*args) - def getZ(*args): return _Freestyle.CurvePoint_getZ(*args) - def getPoint3D(*args): return _Freestyle.CurvePoint_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.CurvePoint_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.CurvePoint_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.CurvePoint_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.CurvePoint_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.CurvePoint_getFEdge(*args) - def getId(*args): return _Freestyle.CurvePoint_getId(*args) - def getNature(*args): return _Freestyle.CurvePoint_getNature(*args) - def castToSVertex(*args): return _Freestyle.CurvePoint_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.CurvePoint_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.CurvePoint_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.CurvePoint_castToTVertex(*args) - def __init__(self, *args): - this = _Freestyle.new_CurvePoint(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_CurvePoint - __del__ = lambda self : None; - def __eq__(*args): return _Freestyle.CurvePoint___eq__(*args) - def A(*args): return _Freestyle.CurvePoint_A(*args) - def B(*args): return _Freestyle.CurvePoint_B(*args) - def t2d(*args): return _Freestyle.CurvePoint_t2d(*args) - def setA(*args): return _Freestyle.CurvePoint_setA(*args) - def setB(*args): return _Freestyle.CurvePoint_setB(*args) - def setT2d(*args): return _Freestyle.CurvePoint_setT2d(*args) - def fedge(*args): return _Freestyle.CurvePoint_fedge(*args) - def point2d(*args): return _Freestyle.CurvePoint_point2d(*args) - def point3d(*args): return _Freestyle.CurvePoint_point3d(*args) - def normal(*args): return _Freestyle.CurvePoint_normal(*args) - def shape(*args): return _Freestyle.CurvePoint_shape(*args) - def occluders_begin(*args): return _Freestyle.CurvePoint_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.CurvePoint_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.CurvePoint_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.CurvePoint_occluders_size(*args) - def occludee(*args): return _Freestyle.CurvePoint_occludee(*args) - def occluded_shape(*args): return _Freestyle.CurvePoint_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.CurvePoint_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.CurvePoint_z_discontinuity(*args) - def curvatureFredo(*args): return _Freestyle.CurvePoint_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.CurvePoint_directionFredo(*args) -CurvePoint_swigregister = _Freestyle.CurvePoint_swigregister -CurvePoint_swigregister(CurvePoint) - -class Curve(Interface1D): - __swig_setmethods__ = {} - for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Curve, name, value) - __swig_getmethods__ = {} - for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Curve, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Curve(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Curve - __del__ = lambda self : None; - def computeCurvatureAndOrientation(*args): return _Freestyle.Curve_computeCurvatureAndOrientation(*args) - def push_vertex_back(*args): return _Freestyle.Curve_push_vertex_back(*args) - def push_vertex_front(*args): return _Freestyle.Curve_push_vertex_front(*args) - def empty(*args): return _Freestyle.Curve_empty(*args) - def getLength2D(*args): return _Freestyle.Curve_getLength2D(*args) - def getId(*args): return _Freestyle.Curve_getId(*args) - def nSegments(*args): return _Freestyle.Curve_nSegments(*args) - def setId(*args): return _Freestyle.Curve_setId(*args) - def curvePointsBegin(*args): return _Freestyle.Curve_curvePointsBegin(*args) - def curvePointsEnd(*args): return _Freestyle.Curve_curvePointsEnd(*args) - def curveVerticesBegin(*args): return _Freestyle.Curve_curveVerticesBegin(*args) - def curveVerticesEnd(*args): return _Freestyle.Curve_curveVerticesEnd(*args) - def verticesBegin(*args): return _Freestyle.Curve_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.Curve_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.Curve_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.Curve_pointsEnd(*args) -Curve_swigregister = _Freestyle.Curve_swigregister -Curve_swigregister(Curve) - -class StrokeVertexIterator(Interface0DIteratorNested): - __swig_setmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeVertexIterator, name, value) - __swig_getmethods__ = {} - for _s in [Interface0DIteratorNested]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, StrokeVertexIterator, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_StrokeVertexIterator(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_StrokeVertexIterator - __del__ = lambda self : None; - def castToInterface0DIterator(*args): return _Freestyle.StrokeVertexIterator_castToInterface0DIterator(*args) - def getExactTypeName(*args): return _Freestyle.StrokeVertexIterator_getExactTypeName(*args) - def getObject(*args): return _Freestyle.StrokeVertexIterator_getObject(*args) - def __deref__(*args): return _Freestyle.StrokeVertexIterator___deref__(*args) - def increment(*args): return _Freestyle.StrokeVertexIterator_increment(*args) - def decrement(*args): return _Freestyle.StrokeVertexIterator_decrement(*args) - def isBegin(*args): return _Freestyle.StrokeVertexIterator_isBegin(*args) - def isEnd(*args): return _Freestyle.StrokeVertexIterator_isEnd(*args) - def __eq__(*args): return _Freestyle.StrokeVertexIterator___eq__(*args) - def t(*args): return _Freestyle.StrokeVertexIterator_t(*args) - def u(*args): return _Freestyle.StrokeVertexIterator_u(*args) - def copy(*args): return _Freestyle.StrokeVertexIterator_copy(*args) - def getIt(*args): return _Freestyle.StrokeVertexIterator_getIt(*args) - def x(*args): return _Freestyle.StrokeVertexIterator_x(*args) - def y(*args): return _Freestyle.StrokeVertexIterator_y(*args) - def getPoint(*args): return _Freestyle.StrokeVertexIterator_getPoint(*args) - def attribute(*args): return _Freestyle.StrokeVertexIterator_attribute(*args) - def curvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_curvilinearAbscissa(*args) - def strokeLength(*args): return _Freestyle.StrokeVertexIterator_strokeLength(*args) - def setX(*args): return _Freestyle.StrokeVertexIterator_setX(*args) - def setY(*args): return _Freestyle.StrokeVertexIterator_setY(*args) - def setPoint(*args): return _Freestyle.StrokeVertexIterator_setPoint(*args) - def setAttribute(*args): return _Freestyle.StrokeVertexIterator_setAttribute(*args) - def setCurvilinearAbscissa(*args): return _Freestyle.StrokeVertexIterator_setCurvilinearAbscissa(*args) - def setStrokeLength(*args): return _Freestyle.StrokeVertexIterator_setStrokeLength(*args) - def getX(*args): return _Freestyle.StrokeVertexIterator_getX(*args) - def getY(*args): return _Freestyle.StrokeVertexIterator_getY(*args) - def getZ(*args): return _Freestyle.StrokeVertexIterator_getZ(*args) - def getPoint3D(*args): return _Freestyle.StrokeVertexIterator_getPoint3D(*args) - def getProjectedX(*args): return _Freestyle.StrokeVertexIterator_getProjectedX(*args) - def getProjectedY(*args): return _Freestyle.StrokeVertexIterator_getProjectedY(*args) - def getProjectedZ(*args): return _Freestyle.StrokeVertexIterator_getProjectedZ(*args) - def getPoint2D(*args): return _Freestyle.StrokeVertexIterator_getPoint2D(*args) - def getFEdge(*args): return _Freestyle.StrokeVertexIterator_getFEdge(*args) - def getId(*args): return _Freestyle.StrokeVertexIterator_getId(*args) - def getNature(*args): return _Freestyle.StrokeVertexIterator_getNature(*args) - def castToSVertex(*args): return _Freestyle.StrokeVertexIterator_castToSVertex(*args) - def castToViewVertex(*args): return _Freestyle.StrokeVertexIterator_castToViewVertex(*args) - def castToNonTVertex(*args): return _Freestyle.StrokeVertexIterator_castToNonTVertex(*args) - def castToTVertex(*args): return _Freestyle.StrokeVertexIterator_castToTVertex(*args) - def A(*args): return _Freestyle.StrokeVertexIterator_A(*args) - def B(*args): return _Freestyle.StrokeVertexIterator_B(*args) - def t2d(*args): return _Freestyle.StrokeVertexIterator_t2d(*args) - def setA(*args): return _Freestyle.StrokeVertexIterator_setA(*args) - def setB(*args): return _Freestyle.StrokeVertexIterator_setB(*args) - def setT2d(*args): return _Freestyle.StrokeVertexIterator_setT2d(*args) - def fedge(*args): return _Freestyle.StrokeVertexIterator_fedge(*args) - def point2d(*args): return _Freestyle.StrokeVertexIterator_point2d(*args) - def point3d(*args): return _Freestyle.StrokeVertexIterator_point3d(*args) - def normal(*args): return _Freestyle.StrokeVertexIterator_normal(*args) - def shape(*args): return _Freestyle.StrokeVertexIterator_shape(*args) - def occluders_begin(*args): return _Freestyle.StrokeVertexIterator_occluders_begin(*args) - def occluders_end(*args): return _Freestyle.StrokeVertexIterator_occluders_end(*args) - def occluders_empty(*args): return _Freestyle.StrokeVertexIterator_occluders_empty(*args) - def occluders_size(*args): return _Freestyle.StrokeVertexIterator_occluders_size(*args) - def occludee(*args): return _Freestyle.StrokeVertexIterator_occludee(*args) - def occluded_shape(*args): return _Freestyle.StrokeVertexIterator_occluded_shape(*args) - def occludee_empty(*args): return _Freestyle.StrokeVertexIterator_occludee_empty(*args) - def z_discontinuity(*args): return _Freestyle.StrokeVertexIterator_z_discontinuity(*args) - def curvatureFredo(*args): return _Freestyle.StrokeVertexIterator_curvatureFredo(*args) - def directionFredo(*args): return _Freestyle.StrokeVertexIterator_directionFredo(*args) -StrokeVertexIterator_swigregister = _Freestyle.StrokeVertexIterator_swigregister -StrokeVertexIterator_swigregister(StrokeVertexIterator) - -class StrokeAttribute(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeAttribute, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, StrokeAttribute, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_StrokeAttribute(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_StrokeAttribute - __del__ = lambda self : None; - def getColor(*args): return _Freestyle.StrokeAttribute_getColor(*args) - def getColorR(*args): return _Freestyle.StrokeAttribute_getColorR(*args) - def getColorG(*args): return _Freestyle.StrokeAttribute_getColorG(*args) - def getColorB(*args): return _Freestyle.StrokeAttribute_getColorB(*args) - def getColorRGB(*args): return _Freestyle.StrokeAttribute_getColorRGB(*args) - def getAlpha(*args): return _Freestyle.StrokeAttribute_getAlpha(*args) - def getThickness(*args): return _Freestyle.StrokeAttribute_getThickness(*args) - def getThicknessR(*args): return _Freestyle.StrokeAttribute_getThicknessR(*args) - def getThicknessL(*args): return _Freestyle.StrokeAttribute_getThicknessL(*args) - def getThicknessRL(*args): return _Freestyle.StrokeAttribute_getThicknessRL(*args) - def isVisible(*args): return _Freestyle.StrokeAttribute_isVisible(*args) - def getAttributeReal(*args): return _Freestyle.StrokeAttribute_getAttributeReal(*args) - def getAttributeVec2f(*args): return _Freestyle.StrokeAttribute_getAttributeVec2f(*args) - def getAttributeVec3f(*args): return _Freestyle.StrokeAttribute_getAttributeVec3f(*args) - def isAttributeAvailableReal(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableReal(*args) - def isAttributeAvailableVec2f(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableVec2f(*args) - def isAttributeAvailableVec3f(*args): return _Freestyle.StrokeAttribute_isAttributeAvailableVec3f(*args) - def setColor(*args): return _Freestyle.StrokeAttribute_setColor(*args) - def setAlpha(*args): return _Freestyle.StrokeAttribute_setAlpha(*args) - def setThickness(*args): return _Freestyle.StrokeAttribute_setThickness(*args) - def setVisible(*args): return _Freestyle.StrokeAttribute_setVisible(*args) - def setAttributeReal(*args): return _Freestyle.StrokeAttribute_setAttributeReal(*args) - def setAttributeVec2f(*args): return _Freestyle.StrokeAttribute_setAttributeVec2f(*args) - def setAttributeVec3f(*args): return _Freestyle.StrokeAttribute_setAttributeVec3f(*args) -StrokeAttribute_swigregister = _Freestyle.StrokeAttribute_swigregister -StrokeAttribute_swigregister(StrokeAttribute) - -class StrokeVertex(CurvePoint): - __swig_setmethods__ = {} - for _s in [CurvePoint]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeVertex, name, value) - __swig_getmethods__ = {} - for _s in [CurvePoint]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, StrokeVertex, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.StrokeVertex_getExactTypeName(*args) - def __init__(self, *args): - this = _Freestyle.new_StrokeVertex(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_StrokeVertex - __del__ = lambda self : None; - def x(*args): return _Freestyle.StrokeVertex_x(*args) - def y(*args): return _Freestyle.StrokeVertex_y(*args) - def getPoint(*args): return _Freestyle.StrokeVertex_getPoint(*args) - def attribute(*args): return _Freestyle.StrokeVertex_attribute(*args) - def curvilinearAbscissa(*args): return _Freestyle.StrokeVertex_curvilinearAbscissa(*args) - def strokeLength(*args): return _Freestyle.StrokeVertex_strokeLength(*args) - def u(*args): return _Freestyle.StrokeVertex_u(*args) - def setX(*args): return _Freestyle.StrokeVertex_setX(*args) - def setY(*args): return _Freestyle.StrokeVertex_setY(*args) - def setPoint(*args): return _Freestyle.StrokeVertex_setPoint(*args) - def setAttribute(*args): return _Freestyle.StrokeVertex_setAttribute(*args) - def setCurvilinearAbscissa(*args): return _Freestyle.StrokeVertex_setCurvilinearAbscissa(*args) - def setStrokeLength(*args): return _Freestyle.StrokeVertex_setStrokeLength(*args) -StrokeVertex_swigregister = _Freestyle.StrokeVertex_swigregister -StrokeVertex_swigregister(StrokeVertex) - -class Stroke(Interface1D): - __swig_setmethods__ = {} - for _s in [Interface1D]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Stroke, name, value) - __swig_getmethods__ = {} - for _s in [Interface1D]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Stroke, name) - __repr__ = _swig_repr - def getExactTypeName(*args): return _Freestyle.Stroke_getExactTypeName(*args) - def getId(*args): return _Freestyle.Stroke_getId(*args) - DRY_MEDIUM = _Freestyle.Stroke_DRY_MEDIUM - HUMID_MEDIUM = _Freestyle.Stroke_HUMID_MEDIUM - OPAQUE_MEDIUM = _Freestyle.Stroke_OPAQUE_MEDIUM - def __init__(self, *args): - this = _Freestyle.new_Stroke(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Stroke - __del__ = lambda self : None; - def ComputeSampling(*args): return _Freestyle.Stroke_ComputeSampling(*args) - def Resample(*args): return _Freestyle.Stroke_Resample(*args) - def RemoveVertex(*args): return _Freestyle.Stroke_RemoveVertex(*args) - def InsertVertex(*args): return _Freestyle.Stroke_InsertVertex(*args) - def Render(*args): return _Freestyle.Stroke_Render(*args) - def RenderBasic(*args): return _Freestyle.Stroke_RenderBasic(*args) - def getLength2D(*args): return _Freestyle.Stroke_getLength2D(*args) - def getMediumType(*args): return _Freestyle.Stroke_getMediumType(*args) - def getTextureId(*args): return _Freestyle.Stroke_getTextureId(*args) - def hasTips(*args): return _Freestyle.Stroke_hasTips(*args) - def vertices_size(*args): return _Freestyle.Stroke_vertices_size(*args) - def viewedges_begin(*args): return _Freestyle.Stroke_viewedges_begin(*args) - def viewedges_end(*args): return _Freestyle.Stroke_viewedges_end(*args) - def viewedges_size(*args): return _Freestyle.Stroke_viewedges_size(*args) - def getBeginningOrientation(*args): return _Freestyle.Stroke_getBeginningOrientation(*args) - def getBeginningOrientationX(*args): return _Freestyle.Stroke_getBeginningOrientationX(*args) - def getBeginningOrientationY(*args): return _Freestyle.Stroke_getBeginningOrientationY(*args) - def getEndingOrientation(*args): return _Freestyle.Stroke_getEndingOrientation(*args) - def getEndingOrientationX(*args): return _Freestyle.Stroke_getEndingOrientationX(*args) - def getEndingOrientationY(*args): return _Freestyle.Stroke_getEndingOrientationY(*args) - def setId(*args): return _Freestyle.Stroke_setId(*args) - def setLength(*args): return _Freestyle.Stroke_setLength(*args) - def setMediumType(*args): return _Freestyle.Stroke_setMediumType(*args) - def setTextureId(*args): return _Freestyle.Stroke_setTextureId(*args) - def setTips(*args): return _Freestyle.Stroke_setTips(*args) - def push_back(*args): return _Freestyle.Stroke_push_back(*args) - def push_front(*args): return _Freestyle.Stroke_push_front(*args) - def AddViewEdge(*args): return _Freestyle.Stroke_AddViewEdge(*args) - def setBeginningOrientation(*args): return _Freestyle.Stroke_setBeginningOrientation(*args) - def setEndingOrientation(*args): return _Freestyle.Stroke_setEndingOrientation(*args) - def strokeVerticesBegin(*args): return _Freestyle.Stroke_strokeVerticesBegin(*args) - def strokeVerticesEnd(*args): return _Freestyle.Stroke_strokeVerticesEnd(*args) - def strokeVerticesSize(*args): return _Freestyle.Stroke_strokeVerticesSize(*args) - def verticesBegin(*args): return _Freestyle.Stroke_verticesBegin(*args) - def verticesEnd(*args): return _Freestyle.Stroke_verticesEnd(*args) - def pointsBegin(*args): return _Freestyle.Stroke_pointsBegin(*args) - def pointsEnd(*args): return _Freestyle.Stroke_pointsEnd(*args) -Stroke_swigregister = _Freestyle.Stroke_swigregister -Stroke_swigregister(Stroke) - -class ShadersContainer(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ShadersContainer, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ShadersContainer, name) - __repr__ = _swig_repr - def iterator(*args): return _Freestyle.ShadersContainer_iterator(*args) - def __iter__(self): return self.iterator() - def __nonzero__(*args): return _Freestyle.ShadersContainer___nonzero__(*args) - def __len__(*args): return _Freestyle.ShadersContainer___len__(*args) - def pop(*args): return _Freestyle.ShadersContainer_pop(*args) - def __getslice__(*args): return _Freestyle.ShadersContainer___getslice__(*args) - def __setslice__(*args): return _Freestyle.ShadersContainer___setslice__(*args) - def __delslice__(*args): return _Freestyle.ShadersContainer___delslice__(*args) - def __delitem__(*args): return _Freestyle.ShadersContainer___delitem__(*args) - def __getitem__(*args): return _Freestyle.ShadersContainer___getitem__(*args) - def __setitem__(*args): return _Freestyle.ShadersContainer___setitem__(*args) - def append(*args): return _Freestyle.ShadersContainer_append(*args) - def empty(*args): return _Freestyle.ShadersContainer_empty(*args) - def size(*args): return _Freestyle.ShadersContainer_size(*args) - def clear(*args): return _Freestyle.ShadersContainer_clear(*args) - def swap(*args): return _Freestyle.ShadersContainer_swap(*args) - def get_allocator(*args): return _Freestyle.ShadersContainer_get_allocator(*args) - def begin(*args): return _Freestyle.ShadersContainer_begin(*args) - def end(*args): return _Freestyle.ShadersContainer_end(*args) - def rbegin(*args): return _Freestyle.ShadersContainer_rbegin(*args) - def rend(*args): return _Freestyle.ShadersContainer_rend(*args) - def pop_back(*args): return _Freestyle.ShadersContainer_pop_back(*args) - def erase(*args): return _Freestyle.ShadersContainer_erase(*args) - def __init__(self, *args): - this = _Freestyle.new_ShadersContainer(*args) - try: self.this.append(this) - except: self.this = this - def push_back(*args): return _Freestyle.ShadersContainer_push_back(*args) - def front(*args): return _Freestyle.ShadersContainer_front(*args) - def back(*args): return _Freestyle.ShadersContainer_back(*args) - def assign(*args): return _Freestyle.ShadersContainer_assign(*args) - def resize(*args): return _Freestyle.ShadersContainer_resize(*args) - def insert(*args): return _Freestyle.ShadersContainer_insert(*args) - def reserve(*args): return _Freestyle.ShadersContainer_reserve(*args) - def capacity(*args): return _Freestyle.ShadersContainer_capacity(*args) - __swig_destroy__ = _Freestyle.delete_ShadersContainer - __del__ = lambda self : None; -ShadersContainer_swigregister = _Freestyle.ShadersContainer_swigregister -ShadersContainer_swigregister(ShadersContainer) - -class StrokeShader(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeShader, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, StrokeShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - if self.__class__ == StrokeShader: - args = (None,) + args - else: - args = (self,) + args - this = _Freestyle.new_StrokeShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_StrokeShader - __del__ = lambda self : None; - def getName(*args): return _Freestyle.StrokeShader_getName(*args) - def shade(*args): return _Freestyle.StrokeShader_shade(*args) - def __disown__(self): - self.this.disown() - _Freestyle.disown_StrokeShader(self) - return weakref_proxy(self) -StrokeShader_swigregister = _Freestyle.StrokeShader_swigregister -StrokeShader_swigregister(StrokeShader) - -class ConstantThicknessShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantThicknessShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ConstantThicknessShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ConstantThicknessShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ConstantThicknessShader - __del__ = lambda self : None; - def getName(*args): return _Freestyle.ConstantThicknessShader_getName(*args) - def shade(*args): return _Freestyle.ConstantThicknessShader_shade(*args) -ConstantThicknessShader_swigregister = _Freestyle.ConstantThicknessShader_swigregister -ConstantThicknessShader_swigregister(ConstantThicknessShader) - -class ConstantExternThicknessShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantExternThicknessShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ConstantExternThicknessShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ConstantExternThicknessShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ConstantExternThicknessShader - __del__ = lambda self : None; - def getName(*args): return _Freestyle.ConstantExternThicknessShader_getName(*args) - def shade(*args): return _Freestyle.ConstantExternThicknessShader_shade(*args) -ConstantExternThicknessShader_swigregister = _Freestyle.ConstantExternThicknessShader_swigregister -ConstantExternThicknessShader_swigregister(ConstantExternThicknessShader) - -class IncreasingThicknessShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, IncreasingThicknessShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, IncreasingThicknessShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_IncreasingThicknessShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_IncreasingThicknessShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.IncreasingThicknessShader_shade(*args) -IncreasingThicknessShader_swigregister = _Freestyle.IncreasingThicknessShader_swigregister -IncreasingThicknessShader_swigregister(IncreasingThicknessShader) - -class ConstrainedIncreasingThicknessShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ConstrainedIncreasingThicknessShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ConstrainedIncreasingThicknessShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ConstrainedIncreasingThicknessShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ConstrainedIncreasingThicknessShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.ConstrainedIncreasingThicknessShader_shade(*args) -ConstrainedIncreasingThicknessShader_swigregister = _Freestyle.ConstrainedIncreasingThicknessShader_swigregister -ConstrainedIncreasingThicknessShader_swigregister(ConstrainedIncreasingThicknessShader) - -class LengthDependingThicknessShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, LengthDependingThicknessShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, LengthDependingThicknessShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_LengthDependingThicknessShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_LengthDependingThicknessShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.LengthDependingThicknessShader_shade(*args) -LengthDependingThicknessShader_swigregister = _Freestyle.LengthDependingThicknessShader_swigregister -LengthDependingThicknessShader_swigregister(LengthDependingThicknessShader) - -class ThicknessVariationPatternShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ThicknessVariationPatternShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ThicknessVariationPatternShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ThicknessVariationPatternShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ThicknessVariationPatternShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.ThicknessVariationPatternShader_shade(*args) -ThicknessVariationPatternShader_swigregister = _Freestyle.ThicknessVariationPatternShader_swigregister -ThicknessVariationPatternShader_swigregister(ThicknessVariationPatternShader) - -class ThicknessNoiseShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ThicknessNoiseShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ThicknessNoiseShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ThicknessNoiseShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.ThicknessNoiseShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_ThicknessNoiseShader - __del__ = lambda self : None; -ThicknessNoiseShader_swigregister = _Freestyle.ThicknessNoiseShader_swigregister -ThicknessNoiseShader_swigregister(ThicknessNoiseShader) - -class ConstantColorShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ConstantColorShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ConstantColorShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ConstantColorShader(*args) - try: self.this.append(this) - except: self.this = this - def getName(*args): return _Freestyle.ConstantColorShader_getName(*args) - def shade(*args): return _Freestyle.ConstantColorShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_ConstantColorShader - __del__ = lambda self : None; -ConstantColorShader_swigregister = _Freestyle.ConstantColorShader_swigregister -ConstantColorShader_swigregister(ConstantColorShader) - -class IncreasingColorShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, IncreasingColorShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, IncreasingColorShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_IncreasingColorShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.IncreasingColorShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_IncreasingColorShader - __del__ = lambda self : None; -IncreasingColorShader_swigregister = _Freestyle.IncreasingColorShader_swigregister -IncreasingColorShader_swigregister(IncreasingColorShader) - -class ColorVariationPatternShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ColorVariationPatternShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ColorVariationPatternShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ColorVariationPatternShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ColorVariationPatternShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.ColorVariationPatternShader_shade(*args) -ColorVariationPatternShader_swigregister = _Freestyle.ColorVariationPatternShader_swigregister -ColorVariationPatternShader_swigregister(ColorVariationPatternShader) - -class MaterialColorShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, MaterialColorShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, MaterialColorShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_MaterialColorShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.MaterialColorShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_MaterialColorShader - __del__ = lambda self : None; -MaterialColorShader_swigregister = _Freestyle.MaterialColorShader_swigregister -MaterialColorShader_swigregister(MaterialColorShader) - -class CalligraphicColorShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, CalligraphicColorShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, CalligraphicColorShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_CalligraphicColorShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.CalligraphicColorShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_CalligraphicColorShader - __del__ = lambda self : None; -CalligraphicColorShader_swigregister = _Freestyle.CalligraphicColorShader_swigregister -CalligraphicColorShader_swigregister(CalligraphicColorShader) - -class ColorNoiseShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ColorNoiseShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ColorNoiseShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ColorNoiseShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.ColorNoiseShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_ColorNoiseShader - __del__ = lambda self : None; -ColorNoiseShader_swigregister = _Freestyle.ColorNoiseShader_swigregister -ColorNoiseShader_swigregister(ColorNoiseShader) - -class TextureAssignerShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TextureAssignerShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TextureAssignerShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_TextureAssignerShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.TextureAssignerShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_TextureAssignerShader - __del__ = lambda self : None; -TextureAssignerShader_swigregister = _Freestyle.TextureAssignerShader_swigregister -TextureAssignerShader_swigregister(TextureAssignerShader) - -class StrokeTextureShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, StrokeTextureShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, StrokeTextureShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_StrokeTextureShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.StrokeTextureShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_StrokeTextureShader - __del__ = lambda self : None; -StrokeTextureShader_swigregister = _Freestyle.StrokeTextureShader_swigregister -StrokeTextureShader_swigregister(StrokeTextureShader) - -class BackboneStretcherShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, BackboneStretcherShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, BackboneStretcherShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_BackboneStretcherShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.BackboneStretcherShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_BackboneStretcherShader - __del__ = lambda self : None; -BackboneStretcherShader_swigregister = _Freestyle.BackboneStretcherShader_swigregister -BackboneStretcherShader_swigregister(BackboneStretcherShader) - -class SamplingShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, SamplingShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, SamplingShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_SamplingShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.SamplingShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_SamplingShader - __del__ = lambda self : None; -SamplingShader_swigregister = _Freestyle.SamplingShader_swigregister -SamplingShader_swigregister(SamplingShader) - -class ExternalContourStretcherShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, ExternalContourStretcherShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, ExternalContourStretcherShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_ExternalContourStretcherShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.ExternalContourStretcherShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_ExternalContourStretcherShader - __del__ = lambda self : None; -ExternalContourStretcherShader_swigregister = _Freestyle.ExternalContourStretcherShader_swigregister -ExternalContourStretcherShader_swigregister(ExternalContourStretcherShader) - -class BSplineShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, BSplineShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, BSplineShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_BSplineShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.BSplineShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_BSplineShader - __del__ = lambda self : None; -BSplineShader_swigregister = _Freestyle.BSplineShader_swigregister -BSplineShader_swigregister(BSplineShader) - -class BezierCurveShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, BezierCurveShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, BezierCurveShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_BezierCurveShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.BezierCurveShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_BezierCurveShader - __del__ = lambda self : None; -BezierCurveShader_swigregister = _Freestyle.BezierCurveShader_swigregister -BezierCurveShader_swigregister(BezierCurveShader) - -class InflateShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, InflateShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, InflateShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_InflateShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.InflateShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_InflateShader - __del__ = lambda self : None; -InflateShader_swigregister = _Freestyle.InflateShader_swigregister -InflateShader_swigregister(InflateShader) - -class PolygonalizationShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, PolygonalizationShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, PolygonalizationShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_PolygonalizationShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.PolygonalizationShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_PolygonalizationShader - __del__ = lambda self : None; -PolygonalizationShader_swigregister = _Freestyle.PolygonalizationShader_swigregister -PolygonalizationShader_swigregister(PolygonalizationShader) - -class GuidingLinesShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, GuidingLinesShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, GuidingLinesShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_GuidingLinesShader(*args) - try: self.this.append(this) - except: self.this = this - def shade(*args): return _Freestyle.GuidingLinesShader_shade(*args) - __swig_destroy__ = _Freestyle.delete_GuidingLinesShader - __del__ = lambda self : None; -GuidingLinesShader_swigregister = _Freestyle.GuidingLinesShader_swigregister -GuidingLinesShader_swigregister(GuidingLinesShader) - -class TipRemoverShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, TipRemoverShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, TipRemoverShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_TipRemoverShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_TipRemoverShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.TipRemoverShader_shade(*args) -TipRemoverShader_swigregister = _Freestyle.TipRemoverShader_swigregister -TipRemoverShader_swigregister(TipRemoverShader) - -class streamShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, streamShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, streamShader, name) - __repr__ = _swig_repr - __swig_destroy__ = _Freestyle.delete_streamShader - __del__ = lambda self : None; - def getName(*args): return _Freestyle.streamShader_getName(*args) - def shade(*args): return _Freestyle.streamShader_shade(*args) - def __init__(self, *args): - this = _Freestyle.new_streamShader(*args) - try: self.this.append(this) - except: self.this = this -streamShader_swigregister = _Freestyle.streamShader_swigregister -streamShader_swigregister(streamShader) - -class fstreamShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, fstreamShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, fstreamShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_fstreamShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_fstreamShader - __del__ = lambda self : None; - def getName(*args): return _Freestyle.fstreamShader_getName(*args) - def shade(*args): return _Freestyle.fstreamShader_shade(*args) -fstreamShader_swigregister = _Freestyle.fstreamShader_swigregister -fstreamShader_swigregister(fstreamShader) - -class CalligraphicShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, CalligraphicShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, CalligraphicShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_CalligraphicShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_CalligraphicShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.CalligraphicShader_shade(*args) -CalligraphicShader_swigregister = _Freestyle.CalligraphicShader_swigregister -CalligraphicShader_swigregister(CalligraphicShader) - -class SpatialNoiseShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, SpatialNoiseShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, SpatialNoiseShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_SpatialNoiseShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_SpatialNoiseShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.SpatialNoiseShader_shade(*args) -SpatialNoiseShader_swigregister = _Freestyle.SpatialNoiseShader_swigregister -SpatialNoiseShader_swigregister(SpatialNoiseShader) - -class SmoothingShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, SmoothingShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, SmoothingShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_SmoothingShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_SmoothingShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.SmoothingShader_shade(*args) -SmoothingShader_swigregister = _Freestyle.SmoothingShader_swigregister -SmoothingShader_swigregister(SmoothingShader) - -class Smoother(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Smoother, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Smoother, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Smoother(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Smoother - __del__ = lambda self : None; - def smooth(*args): return _Freestyle.Smoother_smooth(*args) - def computeCurvature(*args): return _Freestyle.Smoother_computeCurvature(*args) -Smoother_swigregister = _Freestyle.Smoother_swigregister -Smoother_swigregister(Smoother) - -class Omitter(Smoother): - __swig_setmethods__ = {} - for _s in [Smoother]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, Omitter, name, value) - __swig_getmethods__ = {} - for _s in [Smoother]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, Omitter, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_Omitter(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_Omitter - __del__ = lambda self : None; - def omit(*args): return _Freestyle.Omitter_omit(*args) -Omitter_swigregister = _Freestyle.Omitter_swigregister -Omitter_swigregister(Omitter) - -class OmissionShader(StrokeShader): - __swig_setmethods__ = {} - for _s in [StrokeShader]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) - __setattr__ = lambda self, name, value: _swig_setattr(self, OmissionShader, name, value) - __swig_getmethods__ = {} - for _s in [StrokeShader]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) - __getattr__ = lambda self, name: _swig_getattr(self, OmissionShader, name) - __repr__ = _swig_repr - def __init__(self, *args): - this = _Freestyle.new_OmissionShader(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_OmissionShader - __del__ = lambda self : None; - def shade(*args): return _Freestyle.OmissionShader_shade(*args) -OmissionShader_swigregister = _Freestyle.OmissionShader_swigregister -OmissionShader_swigregister(OmissionShader) - -class Operators(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Operators, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Operators, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" - __repr__ = _swig_repr - __swig_getmethods__["select"] = lambda x: _Freestyle.Operators_select - if _newclass:select = staticmethod(_Freestyle.Operators_select) - __swig_getmethods__["chain"] = lambda x: _Freestyle.Operators_chain - if _newclass:chain = staticmethod(_Freestyle.Operators_chain) - __swig_getmethods__["bidirectionalChain"] = lambda x: _Freestyle.Operators_bidirectionalChain - if _newclass:bidirectionalChain = staticmethod(_Freestyle.Operators_bidirectionalChain) - __swig_getmethods__["sequentialSplit"] = lambda x: _Freestyle.Operators_sequentialSplit - if _newclass:sequentialSplit = staticmethod(_Freestyle.Operators_sequentialSplit) - __swig_getmethods__["recursiveSplit"] = lambda x: _Freestyle.Operators_recursiveSplit - if _newclass:recursiveSplit = staticmethod(_Freestyle.Operators_recursiveSplit) - __swig_getmethods__["sort"] = lambda x: _Freestyle.Operators_sort - if _newclass:sort = staticmethod(_Freestyle.Operators_sort) - __swig_getmethods__["create"] = lambda x: _Freestyle.Operators_create - if _newclass:create = staticmethod(_Freestyle.Operators_create) - __swig_getmethods__["getViewEdgeFromIndex"] = lambda x: _Freestyle.Operators_getViewEdgeFromIndex - if _newclass:getViewEdgeFromIndex = staticmethod(_Freestyle.Operators_getViewEdgeFromIndex) - __swig_getmethods__["getChainFromIndex"] = lambda x: _Freestyle.Operators_getChainFromIndex - if _newclass:getChainFromIndex = staticmethod(_Freestyle.Operators_getChainFromIndex) - __swig_getmethods__["getStrokeFromIndex"] = lambda x: _Freestyle.Operators_getStrokeFromIndex - if _newclass:getStrokeFromIndex = staticmethod(_Freestyle.Operators_getStrokeFromIndex) - __swig_getmethods__["getViewEdgesSize"] = lambda x: _Freestyle.Operators_getViewEdgesSize - if _newclass:getViewEdgesSize = staticmethod(_Freestyle.Operators_getViewEdgesSize) - __swig_getmethods__["getChainsSize"] = lambda x: _Freestyle.Operators_getChainsSize - if _newclass:getChainsSize = staticmethod(_Freestyle.Operators_getChainsSize) - __swig_getmethods__["getStrokesSize"] = lambda x: _Freestyle.Operators_getStrokesSize - if _newclass:getStrokesSize = staticmethod(_Freestyle.Operators_getStrokesSize) - __swig_destroy__ = _Freestyle.delete_Operators - __del__ = lambda self : None; -Operators_swigregister = _Freestyle.Operators_swigregister -Operators_swigregister(Operators) -Operators_select = _Freestyle.Operators_select -Operators_chain = _Freestyle.Operators_chain -Operators_bidirectionalChain = _Freestyle.Operators_bidirectionalChain -Operators_sequentialSplit = _Freestyle.Operators_sequentialSplit -Operators_recursiveSplit = _Freestyle.Operators_recursiveSplit -Operators_sort = _Freestyle.Operators_sort -Operators_create = _Freestyle.Operators_create -Operators_getViewEdgeFromIndex = _Freestyle.Operators_getViewEdgeFromIndex -Operators_getChainFromIndex = _Freestyle.Operators_getChainFromIndex -Operators_getStrokeFromIndex = _Freestyle.Operators_getStrokeFromIndex -Operators_getViewEdgesSize = _Freestyle.Operators_getViewEdgesSize -Operators_getChainsSize = _Freestyle.Operators_getChainsSize -Operators_getStrokesSize = _Freestyle.Operators_getStrokesSize - -class ltstr(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, ltstr, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, ltstr, name) - __repr__ = _swig_repr - def __call__(*args): return _Freestyle.ltstr___call__(*args) - def __init__(self, *args): - this = _Freestyle.new_ltstr(*args) - try: self.this.append(this) - except: self.this = this - __swig_destroy__ = _Freestyle.delete_ltstr - __del__ = lambda self : None; -ltstr_swigregister = _Freestyle.ltstr_swigregister -ltstr_swigregister(ltstr) - -class Canvas(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, Canvas, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, Canvas, name) - def __init__(self, *args, **kwargs): raise AttributeError, "No constructor defined" - __repr__ = _swig_repr - __swig_getmethods__["getInstance"] = lambda x: _Freestyle.Canvas_getInstance - if _newclass:getInstance = staticmethod(_Freestyle.Canvas_getInstance) - NB_STEERABLE_VIEWMAP = _Freestyle.Canvas_NB_STEERABLE_VIEWMAP - __swig_destroy__ = _Freestyle.delete_Canvas - __del__ = lambda self : None; - def preDraw(*args): return _Freestyle.Canvas_preDraw(*args) - def Draw(*args): return _Freestyle.Canvas_Draw(*args) - def postDraw(*args): return _Freestyle.Canvas_postDraw(*args) - def Render(*args): return _Freestyle.Canvas_Render(*args) - def RenderBasic(*args): return _Freestyle.Canvas_RenderBasic(*args) - def RenderStroke(*args): return _Freestyle.Canvas_RenderStroke(*args) - def init(*args): return _Freestyle.Canvas_init(*args) - def Clear(*args): return _Freestyle.Canvas_Clear(*args) - def Erase(*args): return _Freestyle.Canvas_Erase(*args) - def readColorPixels(*args): return _Freestyle.Canvas_readColorPixels(*args) - def readDepthPixels(*args): return _Freestyle.Canvas_readDepthPixels(*args) - def update(*args): return _Freestyle.Canvas_update(*args) - def isEmpty(*args): return _Freestyle.Canvas_isEmpty(*args) - def loadMap(*args): return _Freestyle.Canvas_loadMap(*args) - def readMapPixel(*args): return _Freestyle.Canvas_readMapPixel(*args) - def loadSteerableViewMap(*args): return _Freestyle.Canvas_loadSteerableViewMap(*args) - def getSteerableViewMap(*args): return _Freestyle.Canvas_getSteerableViewMap(*args) - def selectedFEdge(*args): return _Freestyle.Canvas_selectedFEdge(*args) - def width(*args): return _Freestyle.Canvas_width(*args) - def height(*args): return _Freestyle.Canvas_height(*args) - def currentPaperTextureIndex(*args): return _Freestyle.Canvas_currentPaperTextureIndex(*args) - def scene3DBBox(*args): return _Freestyle.Canvas_scene3DBBox(*args) - def renderer(*args): return _Freestyle.Canvas_renderer(*args) - def getCurrentStyleModule(*args): return _Freestyle.Canvas_getCurrentStyleModule(*args) - def getRecordFlag(*args): return _Freestyle.Canvas_getRecordFlag(*args) - def setSelectedFEdge(*args): return _Freestyle.Canvas_setSelectedFEdge(*args) - def InsertStyleModule(*args): return _Freestyle.Canvas_InsertStyleModule(*args) - def RemoveStyleModule(*args): return _Freestyle.Canvas_RemoveStyleModule(*args) - def SwapStyleModules(*args): return _Freestyle.Canvas_SwapStyleModules(*args) - def ReplaceStyleModule(*args): return _Freestyle.Canvas_ReplaceStyleModule(*args) - def setVisible(*args): return _Freestyle.Canvas_setVisible(*args) - def AddLayer(*args): return _Freestyle.Canvas_AddLayer(*args) - def setCurrentPaperTextureIndex(*args): return _Freestyle.Canvas_setCurrentPaperTextureIndex(*args) - def changePaperTexture(*args): return _Freestyle.Canvas_changePaperTexture(*args) - def togglePaperTexture(*args): return _Freestyle.Canvas_togglePaperTexture(*args) - def resetModified(*args): return _Freestyle.Canvas_resetModified(*args) - def causalStyleModules(*args): return _Freestyle.Canvas_causalStyleModules(*args) - def setModified(*args): return _Freestyle.Canvas_setModified(*args) -Canvas_swigregister = _Freestyle.Canvas_swigregister -Canvas_swigregister(Canvas) -Canvas_getInstance = _Freestyle.Canvas_getInstance - -castToSVertex = _Freestyle.castToSVertex -castToViewVertex = _Freestyle.castToViewVertex -castToTVertex = _Freestyle.castToTVertex -castToCurvePoint = _Freestyle.castToCurvePoint -castToStrokeVertex = _Freestyle.castToStrokeVertex -castToNonTVertex = _Freestyle.castToNonTVertex -castToFEdge = _Freestyle.castToFEdge -castToViewEdge = _Freestyle.castToViewEdge -castToStroke = _Freestyle.castToStroke -castToChain = _Freestyle.castToChain - - diff --git a/source/blender/freestyle/style_modules_blender/ChainingIterators.py b/source/blender/freestyle/style_modules_blender/ChainingIterators.py index 3fe57797113..9e4d467d1db 100755 --- a/source/blender/freestyle/style_modules_blender/ChainingIterators.py +++ b/source/blender/freestyle/style_modules_blender/ChainingIterators.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * ## the natural chaining iterator ## It follows the edges of same nature following the topology of @@ -41,7 +41,7 @@ class pyChainSilhouetteIterator(ChainingIterator): winner = None it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -52,7 +52,7 @@ class pyChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.getCurrentEdge().getNature() if(natures[i] & currentNature): @@ -92,7 +92,7 @@ class pyChainSilhouetteGenericIterator(ChainingIterator): winner = None it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -103,7 +103,7 @@ class pyChainSilhouetteGenericIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.getCurrentEdge().getNature() if(natures[i] & currentNature): @@ -195,7 +195,7 @@ class pySketchyChainSilhouetteIterator(ChainingIterator): winner = None it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -206,7 +206,7 @@ class pySketchyChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.getCurrentEdge().getNature() if(natures[i] & currentNature): @@ -292,7 +292,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator): print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -307,7 +307,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if(self.getCurrentEdge().getNature() & nat != 0): count=0 @@ -390,7 +390,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator): #print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -405,7 +405,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if(self.getCurrentEdge().getNature() & nat != 0): count=0 @@ -466,7 +466,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator): print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -481,7 +481,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if(self.getCurrentEdge().getNature() & nat != 0): count=0 @@ -572,7 +572,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator): print self.getCurrentEdge().getId().getFirst(), self.getCurrentEdge().getId().getSecond() it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -587,7 +587,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if(self.getCurrentEdge().getNature() & nat != 0): count=0 @@ -669,7 +669,7 @@ class pyNoIdChainSilhouetteIterator(ChainingIterator): winner = None it = AdjacencyIterator(iter) nextVertex = self.getVertex() - if(nextVertex.getNature() & T_VERTEX != 0): + if(nextVertex.getNature() & Nature.T_VERTEX != 0): tvertex = nextVertex.castToTVertex() mateVE = tvertex.mate(self.getCurrentEdge()) while(it.isEnd() == 0): @@ -705,7 +705,7 @@ class pyNoIdChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [SILHOUETTE,BORDER,CREASE,SUGGESTIVE_CONTOUR,VALLEY,RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.getCurrentEdge().getNature() if(natures[i] & currentNature): diff --git a/source/blender/freestyle/style_modules_blender/Functions0D.py b/source/blender/freestyle/style_modules_blender/Functions0D.py index 62855648d1f..f5ff106c340 100755 --- a/source/blender/freestyle/style_modules_blender/Functions0D.py +++ b/source/blender/freestyle/style_modules_blender/Functions0D.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * class pyInverseCurvature2DAngleF0D(UnaryFunction0DDouble): diff --git a/source/blender/freestyle/style_modules_blender/Functions1D.py b/source/blender/freestyle/style_modules_blender/Functions1D.py index d3474ffc9eb..308486bc6a7 100755 --- a/source/blender/freestyle/style_modules_blender/Functions1D.py +++ b/source/blender/freestyle/style_modules_blender/Functions1D.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from Functions0D import * import string diff --git a/source/blender/freestyle/style_modules_blender/PredicatesB1D.py b/source/blender/freestyle/style_modules_blender/PredicatesB1D.py index 21d90f96644..d4c1cace3fe 100755 --- a/source/blender/freestyle/style_modules_blender/PredicatesB1D.py +++ b/source/blender/freestyle/style_modules_blender/PredicatesB1D.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from Functions1D import * from random import * @@ -36,8 +36,8 @@ class pySilhouetteFirstBP1D(BinaryPredicate1D): bpred = SameShapeIdBP1D() if (bpred(inter1, inter2) != 1): return 0 - if (inter1.getNature() & SILHOUETTE): - return (inter2.getNature() & SILHOUETTE) + if (inter1.getNature() & Nature.SILHOUETTE): + return (inter2.getNature() & Nature.SILHOUETTE) return (inter1.getNature() == inter2.getNature()) class pyNatureBP1D(BinaryPredicate1D): diff --git a/source/blender/freestyle/style_modules_blender/PredicatesU0D.py b/source/blender/freestyle/style_modules_blender/PredicatesU0D.py index 8432dea3274..42cde5c222f 100755 --- a/source/blender/freestyle/style_modules_blender/PredicatesU0D.py +++ b/source/blender/freestyle/style_modules_blender/PredicatesU0D.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from Functions0D import * class pyHigherCurvature2DAngleUP0D(UnaryPredicate0D): @@ -55,7 +55,7 @@ class pyBackTVertexUP0D(UnaryPredicate0D): def __call__(self, iter): v = iter.getObject() nat = v.getNature() - if(nat & T_VERTEX == 0): + if(nat & Nature.T_VERTEX == 0): return 0 next = iter if(next.isEnd()): diff --git a/source/blender/freestyle/style_modules_blender/PredicatesU1D.py b/source/blender/freestyle/style_modules_blender/PredicatesU1D.py index 3dad3519300..5d1b594a109 100755 --- a/source/blender/freestyle/style_modules_blender/PredicatesU1D.py +++ b/source/blender/freestyle/style_modules_blender/PredicatesU1D.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from Functions1D import * count = 0 diff --git a/source/blender/freestyle/style_modules_blender/anisotropic_diffusion.py b/source/blender/freestyle/style_modules_blender/anisotropic_diffusion.py index 31e5579719d..2f8739329b9 100755 --- a/source/blender/freestyle/style_modules_blender/anisotropic_diffusion.py +++ b/source/blender/freestyle/style_modules_blender/anisotropic_diffusion.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/apriori_and_causal_density.py b/source/blender/freestyle/style_modules_blender/apriori_and_causal_density.py index 6e16ee52ec5..9f866a37581 100755 --- a/source/blender/freestyle/style_modules_blender/apriori_and_causal_density.py +++ b/source/blender/freestyle/style_modules_blender/apriori_and_causal_density.py @@ -28,7 +28,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/apriori_density.py b/source/blender/freestyle/style_modules_blender/apriori_density.py index fe033f7c23d..5ff6c58e77f 100755 --- a/source/blender/freestyle/style_modules_blender/apriori_density.py +++ b/source/blender/freestyle/style_modules_blender/apriori_density.py @@ -26,7 +26,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/backbone_stretcher.py b/source/blender/freestyle/style_modules_blender/backbone_stretcher.py index fc659bd4c56..8a6b9d71a66 100755 --- a/source/blender/freestyle/style_modules_blender/backbone_stretcher.py +++ b/source/blender/freestyle/style_modules_blender/backbone_stretcher.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/blueprint_circles.py b/source/blender/freestyle/style_modules_blender/blueprint_circles.py index 3f5efe643ba..7f3a7564cfe 100755 --- a/source/blender/freestyle/style_modules_blender/blueprint_circles.py +++ b/source/blender/freestyle/style_modules_blender/blueprint_circles.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/blueprint_ellipses.py b/source/blender/freestyle/style_modules_blender/blueprint_ellipses.py index df996ec6e26..a5cfe4ec30b 100755 --- a/source/blender/freestyle/style_modules_blender/blueprint_ellipses.py +++ b/source/blender/freestyle/style_modules_blender/blueprint_ellipses.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/blueprint_squares.py b/source/blender/freestyle/style_modules_blender/blueprint_squares.py index 315aca8858d..7798acc7d47 100755 --- a/source/blender/freestyle/style_modules_blender/blueprint_squares.py +++ b/source/blender/freestyle/style_modules_blender/blueprint_squares.py @@ -23,7 +23,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/cartoon.py b/source/blender/freestyle/style_modules_blender/cartoon.py index 0c77f30fc9c..6ace7e0585a 100755 --- a/source/blender/freestyle/style_modules_blender/cartoon.py +++ b/source/blender/freestyle/style_modules_blender/cartoon.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/contour.py b/source/blender/freestyle/style_modules_blender/contour.py index 1ee89693033..ddf186d27ce 100755 --- a/source/blender/freestyle/style_modules_blender/contour.py +++ b/source/blender/freestyle/style_modules_blender/contour.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +import freestyle_init from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/curvature2d.py b/source/blender/freestyle/style_modules_blender/curvature2d.py index 377ac97f5a1..f699e2186ef 100755 --- a/source/blender/freestyle/style_modules_blender/curvature2d.py +++ b/source/blender/freestyle/style_modules_blender/curvature2d.py @@ -26,7 +26,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/external_contour.py b/source/blender/freestyle/style_modules_blender/external_contour.py index 80e54dd8f70..2a39b79a410 100755 --- a/source/blender/freestyle/style_modules_blender/external_contour.py +++ b/source/blender/freestyle/style_modules_blender/external_contour.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/external_contour_sketchy.py b/source/blender/freestyle/style_modules_blender/external_contour_sketchy.py index 64d9b1bd90f..8a4c570b279 100755 --- a/source/blender/freestyle/style_modules_blender/external_contour_sketchy.py +++ b/source/blender/freestyle/style_modules_blender/external_contour_sketchy.py @@ -28,7 +28,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/external_contour_smooth.py b/source/blender/freestyle/style_modules_blender/external_contour_smooth.py index 405d17f564c..201dc271388 100755 --- a/source/blender/freestyle/style_modules_blender/external_contour_smooth.py +++ b/source/blender/freestyle/style_modules_blender/external_contour_smooth.py @@ -24,7 +24,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/freestyle_init.py b/source/blender/freestyle/style_modules_blender/freestyle_init.py new file mode 100644 index 00000000000..5cc3448ca4d --- /dev/null +++ b/source/blender/freestyle/style_modules_blender/freestyle_init.py @@ -0,0 +1,455 @@ +import Blender.Freestyle + +class BBox(Blender.Freestyle.BBox): + pass + +class BinaryPredicate0D(Blender.Freestyle.BinaryPredicate0D): + pass + +class BinaryPredicate1D(Blender.Freestyle.BinaryPredicate1D): + pass + +class FrsMaterial(Blender.Freestyle.FrsMaterial): + pass + +class Id(Blender.Freestyle.Id): + pass + +class IntegrationType(Blender.Freestyle.IntegrationType): + pass + +class Interface0D(Blender.Freestyle.Interface0D): + pass + +class Interface1D(Blender.Freestyle.Interface1D): + pass + +class Iterator(Blender.Freestyle.Iterator): + pass + +class MediumType(Blender.Freestyle.MediumType): + pass + +class Nature(Blender.Freestyle.Nature): + pass + +# class Noise(Blender.Freestyle.Noise): +# pass + +class Operators(Blender.Freestyle.Operators): + pass + +class SShape(Blender.Freestyle.SShape): + pass + +class StrokeAttribute(Blender.Freestyle.StrokeAttribute): + pass + +class StrokeShader(Blender.Freestyle.StrokeShader): + pass + +class UnaryFunction0D(Blender.Freestyle.UnaryFunction0D): + pass + +class UnaryFunction1D(Blender.Freestyle.UnaryFunction1D): + pass + +class UnaryPredicate0D(Blender.Freestyle.UnaryPredicate0D): + pass + +class UnaryPredicate1D(Blender.Freestyle.UnaryPredicate1D): + def __call__(*args): return Blender.Freestyle.UnaryPredicate1D.__call__(*args) + +class ViewMap(Blender.Freestyle.ViewMap): + pass + +class ViewShape(Blender.Freestyle.ViewShape): + pass + +class FalseBP1D(Blender.Freestyle.FalseBP1D): + def __call__(*args): return Blender.Freestyle.FalseBP1D.__call__(*args) + +class Length2DBP1D(Blender.Freestyle.Length2DBP1D): + def __call__(*args): return Blender.Freestyle.Length2DBP1D.__call__(*args) + +class SameShapeIdBP1D(Blender.Freestyle.SameShapeIdBP1D): + def __call__(*args): return Blender.Freestyle.SameShapeIdBP1D.__call__(*args) + +class TrueBP1D(Blender.Freestyle.TrueBP1D): + def __call__(*args): return Blender.Freestyle.TrueBP1D.__call__(*args) + +class ViewMapGradientNormBP1D(Blender.Freestyle.ViewMapGradientNormBP1D): + def __call__(*args): return Blender.Freestyle.ViewMapGradientNormBP1D.__call__(*args) + +class CurvePoint(Blender.Freestyle.CurvePoint): + pass + +class SVertex(Blender.Freestyle.SVertex): + pass + +class ViewVertex(Blender.Freestyle.ViewVertex): + pass + +# class Curve(Blender.Freestyle.Curve): +# pass + +class FEdge(Blender.Freestyle.FEdge): + pass + +class Stroke(Blender.Freestyle.Stroke): + pass + +class ViewEdge(Blender.Freestyle.ViewEdge): + pass + +class AdjacencyIterator(Blender.Freestyle.AdjacencyIterator): + pass + +class ChainingIterator(Blender.Freestyle.ChainingIterator): + pass + +class ChainPredicateIterator(Blender.Freestyle.ChainPredicateIterator): + pass + +class ChainSilhouetteIterator(Blender.Freestyle.ChainSilhouetteIterator): + pass + +class CurvePointIterator(Blender.Freestyle.CurvePointIterator): + pass + +class Interface0DIterator(Blender.Freestyle.Interface0DIterator): + pass + +class orientedViewEdgeIterator(Blender.Freestyle.orientedViewEdgeIterator): + pass + +class StrokeVertexIterator(Blender.Freestyle.StrokeVertexIterator): + pass + +class SVertexIterator(Blender.Freestyle.SVertexIterator): + pass + +class ViewEdgeIterator(Blender.Freestyle.ViewEdgeIterator): + pass + +class BackboneStretcherShader(Blender.Freestyle.BackboneStretcherShader): + pass + +class BezierCurveShader(Blender.Freestyle.BezierCurveShader): + pass + +class CalligraphicShader(Blender.Freestyle.CalligraphicShader): + pass + +class ColorNoiseShader(Blender.Freestyle.ColorNoiseShader): + pass + +class ColorVariationPatternShader(Blender.Freestyle.ColorVariationPatternShader): + pass + +class ConstantColorShader(Blender.Freestyle.ConstantColorShader): + pass + +class ConstantThicknessShader(Blender.Freestyle.ConstantThicknessShader): + pass + +class ConstrainedIncreasingThicknessShader(Blender.Freestyle.ConstrainedIncreasingThicknessShader): + pass + +class fstreamShader(Blender.Freestyle.fstreamShader): + pass + +class GuidingLinesShader(Blender.Freestyle.GuidingLinesShader): + pass + +class IncreasingColorShader(Blender.Freestyle.IncreasingColorShader): + pass + +class IncreasingThicknessShader(Blender.Freestyle.IncreasingThicknessShader): + pass + +class PolygonalizationShader(Blender.Freestyle.PolygonalizationShader): + pass + +class SamplingShader(Blender.Freestyle.SamplingShader): + pass + +class SpatialNoiseShader(Blender.Freestyle.SpatialNoiseShader): + pass + +class streamShader(Blender.Freestyle.streamShader): + pass + +class StrokeTextureShader(Blender.Freestyle.StrokeTextureShader): + pass + +class TextureAssignerShader(Blender.Freestyle.TextureAssignerShader): + pass + +class ThicknessNoiseShader(Blender.Freestyle.ThicknessNoiseShader): + pass + +class ThicknessVariationPatternShader(Blender.Freestyle.ThicknessVariationPatternShader): + pass + +class TipRemoverShader(Blender.Freestyle.TipRemoverShader): + pass + +class UnaryFunction0DDouble(Blender.Freestyle.UnaryFunction0DDouble): + pass + +class UnaryFunction0DEdgeNature(Blender.Freestyle.UnaryFunction0DEdgeNature): + pass + +class UnaryFunction0DFloat(Blender.Freestyle.UnaryFunction0DFloat): + pass + +class UnaryFunction0DId(Blender.Freestyle.UnaryFunction0DId): + pass + +class UnaryFunction0DMaterial(Blender.Freestyle.UnaryFunction0DMaterial): + pass + +class UnaryFunction0DUnsigned(Blender.Freestyle.UnaryFunction0DUnsigned): + pass + +class UnaryFunction0DVec2f(Blender.Freestyle.UnaryFunction0DVec2f): + pass + +class UnaryFunction0DVec3f(Blender.Freestyle.UnaryFunction0DVec3f): + pass + +class UnaryFunction0DVectorViewShape(Blender.Freestyle.UnaryFunction0DVectorViewShape): + pass + +class UnaryFunction0DViewShape(Blender.Freestyle.UnaryFunction0DViewShape): + pass + +class UnaryFunction1DDouble(Blender.Freestyle.UnaryFunction1DDouble): + pass + +class UnaryFunction1DEdgeNature(Blender.Freestyle.UnaryFunction1DEdgeNature): + pass + +class UnaryFunction1DFloat(Blender.Freestyle.UnaryFunction1DFloat): + pass + +class UnaryFunction1DUnsigned(Blender.Freestyle.UnaryFunction1DUnsigned): + pass + +class UnaryFunction1DVec2f(Blender.Freestyle.UnaryFunction1DVec2f): + pass + +class UnaryFunction1DVec3f(Blender.Freestyle.UnaryFunction1DVec3f): + pass + +class UnaryFunction1DVectorViewShape(Blender.Freestyle.UnaryFunction1DVectorViewShape): + pass + +# class UnaryFunction1DVoid(Blender.Freestyle.UnaryFunction1DVoid): +# pass + +class FalseUP0D(Blender.Freestyle.FalseUP0D): + def __call__(*args): return Blender.Freestyle.FalseUP0D.__call__(*args) + +class TrueUP0D(Blender.Freestyle.TrueUP0D): + def __call__(*args): return Blender.Freestyle.TrueUP0D.__call__(*args) + +class ContourUP1D(Blender.Freestyle.ContourUP1D): + def __call__(*args): return Blender.Freestyle.ContourUP1D.__call__(*args) + +class DensityLowerThanUP1D(Blender.Freestyle.DensityLowerThanUP1D): + def __call__(*args): return Blender.Freestyle.DensityLowerThanUP1D.__call__(*args) + +class EqualToChainingTimeStampUP1D(Blender.Freestyle.EqualToChainingTimeStampUP1D): + def __call__(*args): return Blender.Freestyle.EqualToChainingTimeStampUP1D.__call__(*args) + +class EqualToTimeStampUP1D(Blender.Freestyle.EqualToTimeStampUP1D): + def __call__(*args): return Blender.Freestyle.EqualToTimeStampUP1D.__call__(*args) + +class ExternalContourUP1D(Blender.Freestyle.ExternalContourUP1D): + def __call__(*args): return Blender.Freestyle.ExternalContourUP1D.__call__(*args) + +class FalseUP1D(Blender.Freestyle.FalseUP1D): + def __call__(*args): return Blender.Freestyle.FalseUP1D.__call__(*args) + +class QuantitativeInvisibilityUP1D(Blender.Freestyle.QuantitativeInvisibilityUP1D): + def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityUP1D.__call__(*args) + +class ShapeUP1D(Blender.Freestyle.ShapeUP1D): + def __call__(*args): return Blender.Freestyle.ShapeUP1D.__call__(*args) + +class TrueUP1D(Blender.Freestyle.TrueUP1D): + def __call__(*args): return Blender.Freestyle.TrueUP1D.__call__(*args) + +class StrokeVertex(Blender.Freestyle.StrokeVertex): + pass + +class NonTVertex(Blender.Freestyle.NonTVertex): + pass + +class TVertex(Blender.Freestyle.TVertex): + pass + +class Chain(Blender.Freestyle.Chain): + pass + +class FEdgeSharp(Blender.Freestyle.FEdgeSharp): + pass + +class FEdgeSmooth(Blender.Freestyle.FEdgeSmooth): + pass + +class Curvature2DAngleF0D(Blender.Freestyle.Curvature2DAngleF0D): + def __call__(*args): return Blender.Freestyle.Curvature2DAngleF0D.__call__(*args) + +class DensityF0D(Blender.Freestyle.DensityF0D): + def __call__(*args): return Blender.Freestyle.DensityF0D.__call__(*args) + +class GetProjectedXF0D(Blender.Freestyle.GetProjectedXF0D): + def __call__(*args): return Blender.Freestyle.GetProjectedXF0D.__call__(*args) + +class GetProjectedYF0D(Blender.Freestyle.GetProjectedYF0D): + def __call__(*args): return Blender.Freestyle.GetProjectedYF0D.__call__(*args) + +class GetProjectedZF0D(Blender.Freestyle.GetProjectedZF0D): + def __call__(*args): return Blender.Freestyle.GetProjectedZF0D.__call__(*args) + +class GetXF0D(Blender.Freestyle.GetXF0D): + def __call__(*args): return Blender.Freestyle.GetXF0D.__call__(*args) + +class GetYF0D(Blender.Freestyle.GetYF0D): + def __call__(*args): return Blender.Freestyle.GetYF0D.__call__(*args) + +class GetZF0D(Blender.Freestyle.GetZF0D): + def __call__(*args): return Blender.Freestyle.GetZF0D.__call__(*args) + +class LocalAverageDepthF0D(Blender.Freestyle.LocalAverageDepthF0D): + def __call__(*args): return Blender.Freestyle.LocalAverageDepthF0D.__call__(*args) + +class ZDiscontinuityF0D(Blender.Freestyle.ZDiscontinuityF0D): + def __call__(*args): return Blender.Freestyle.ZDiscontinuityF0D.__call__(*args) + +class GetCurvilinearAbscissaF0D(Blender.Freestyle.GetCurvilinearAbscissaF0D): + def __call__(*args): return Blender.Freestyle.GetCurvilinearAbscissaF0D.__call__(*args) + +class GetParameterF0D(Blender.Freestyle.GetParameterF0D): + def __call__(*args): return Blender.Freestyle.GetParameterF0D.__call__(*args) + +class GetViewMapGradientNormF0D(Blender.Freestyle.GetViewMapGradientNormF0D): + def __call__(*args): return Blender.Freestyle.GetViewMapGradientNormF0D.__call__(*args) + +class ReadCompleteViewMapPixelF0D(Blender.Freestyle.ReadCompleteViewMapPixelF0D): + def __call__(*args): return Blender.Freestyle.ReadCompleteViewMapPixelF0D.__call__(*args) + +class ReadMapPixelF0D(Blender.Freestyle.ReadMapPixelF0D): + def __call__(*args): return Blender.Freestyle.ReadMapPixelF0D.__call__(*args) + +class ReadSteerableViewMapPixelF0D(Blender.Freestyle.ReadSteerableViewMapPixelF0D): + def __call__(*args): return Blender.Freestyle.ReadSteerableViewMapPixelF0D.__call__(*args) + +class ShapeIdF0D(Blender.Freestyle.ShapeIdF0D): + def __call__(*args): return Blender.Freestyle.ShapeIdF0D.__call__(*args) + +class MaterialF0D(Blender.Freestyle.MaterialF0D): + def __call__(*args): return Blender.Freestyle.MaterialF0D.__call__(*args) + +class CurveNatureF0D(Blender.Freestyle.CurveNatureF0D): + def __call__(*args): return Blender.Freestyle.CurveNatureF0D.__call__(*args) + +class QuantitativeInvisibilityF0D(Blender.Freestyle.QuantitativeInvisibilityF0D): + def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityF0D.__call__(*args) + +class Normal2DF0D(Blender.Freestyle.Normal2DF0D): + def __call__(*args): return Blender.Freestyle.Normal2DF0D.__call__(*args) + +class VertexOrientation2DF0D(Blender.Freestyle.VertexOrientation2DF0D): + def __call__(*args): return Blender.Freestyle.VertexOrientation2DF0D.__call__(*args) + +class VertexOrientation3DF0D(Blender.Freestyle.VertexOrientation3DF0D): + def __call__(*args): return Blender.Freestyle.VertexOrientation3DF0D.__call__(*args) + +class GetOccludersF0D(Blender.Freestyle.GetOccludersF0D): + def __call__(*args): return Blender.Freestyle.GetOccludersF0D.__call__(*args) + +class GetOccludeeF0D(Blender.Freestyle.GetOccludeeF0D): + def __call__(*args): return Blender.Freestyle.GetOccludeeF0D.__call__(*args) + +class GetShapeF0D(Blender.Freestyle.GetShapeF0D): + def __call__(*args): return Blender.Freestyle.GetShapeF0D.__call__(*args) + +# class Curvature2DAngleF1D(Blender.Freestyle.Curvature2DAngleF1D): +# def __call__(*args): return Blender.Freestyle.Curvature2DAngleF1D.__call__(*args) + +class DensityF1D(Blender.Freestyle.DensityF1D): + def __call__(*args): return Blender.Freestyle.DensityF1D.__call__(*args) + +class GetCompleteViewMapDensityF1D(Blender.Freestyle.GetCompleteViewMapDensityF1D): + def __call__(*args): return Blender.Freestyle.GetCompleteViewMapDensityF1D.__call__(*args) + +class GetDirectionalViewMapDensityF1D(Blender.Freestyle.GetDirectionalViewMapDensityF1D): + def __call__(*args): return Blender.Freestyle.GetDirectionalViewMapDensityF1D.__call__(*args) + +class GetProjectedXF1D(Blender.Freestyle.GetProjectedXF1D): + def __call__(*args): return Blender.Freestyle.GetProjectedXF1D.__call__(*args) + +class GetProjectedYF1D(Blender.Freestyle.GetProjectedYF1D): + def __call__(*args): return Blender.Freestyle.GetProjectedYF1D.__call__(*args) + +class GetProjectedZF1D(Blender.Freestyle.GetProjectedZF1D): + def __call__(*args): return Blender.Freestyle.GetProjectedZF1D.__call__(*args) + +class GetSteerableViewMapDensityF1D(Blender.Freestyle.GetSteerableViewMapDensityF1D): + def __call__(*args): return Blender.Freestyle.GetSteerableViewMapDensityF1D.__call__(*args) + +class GetViewMapGradientNormF1D(Blender.Freestyle.GetViewMapGradientNormF1D): + def __call__(*args): return Blender.Freestyle.GetViewMapGradientNormF1D.__call__(*args) + +class GetXF1D(Blender.Freestyle.GetXF1D): + def __call__(*args): return Blender.Freestyle.GetXF1D.__call__(*args) + +class GetYF1D(Blender.Freestyle.GetYF1D): + def __call__(*args): return Blender.Freestyle.GetYF1D.__call__(*args) + +class GetZF1D(Blender.Freestyle.GetZF1D): + def __call__(*args): return Blender.Freestyle.GetZF1D.__call__(*args) + +class LocalAverageDepthF1D(Blender.Freestyle.LocalAverageDepthF1D): + def __call__(*args): return Blender.Freestyle.LocalAverageDepthF1D.__call__(*args) + +class ZDiscontinuityF1D(Blender.Freestyle.ZDiscontinuityF1D): + def __call__(*args): return Blender.Freestyle.ZDiscontinuityF1D.__call__(*args) + +class CurveNatureF1D(Blender.Freestyle.CurveNatureF1D): + def __call__(*args): return Blender.Freestyle.CurveNatureF1D.__call__(*args) + +class QuantitativeInvisibilityF1D(Blender.Freestyle.QuantitativeInvisibilityF1D): + def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityF1D.__call__(*args) + +class Normal2DF1D(Blender.Freestyle.Normal2DF1D): + def __call__(*args): return Blender.Freestyle.Normal2DF1D.__call__(*args) + +class Orientation2DF1D(Blender.Freestyle.Orientation2DF1D): + def __call__(*args): return Blender.Freestyle.Orientation2DF1D.__call__(*args) + +class Orientation3DF1D(Blender.Freestyle.Orientation3DF1D): + def __call__(*args): return Blender.Freestyle.Orientation3DF1D.__call__(*args) + +class GetOccludeeF1D(Blender.Freestyle.GetOccludeeF1D): + def __call__(*args): return Blender.Freestyle.GetOccludeeF1D.__call__(*args) + +class GetOccludersF1D(Blender.Freestyle.GetOccludersF1D): + def __call__(*args): return Blender.Freestyle.GetOccludersF1D.__call__(*args) + +class GetShapeF1D(Blender.Freestyle.GetShapeF1D): + def __call__(*args): return Blender.Freestyle.GetShapeF1D.__call__(*args) + +# class ChainingTimeStampF1D(Blender.Freestyle.ChainingTimeStampF1D): +# def __call__(*args): return Blender.Freestyle.ChainingTimeStampF1D.__call__(*args) + +# class IncrementChainingTimeStampF1D(Blender.Freestyle.IncrementChainingTimeStampF1D): +# def __call__(*args): return Blender.Freestyle.IncrementChainingTimeStampF1D.__call__(*args) + +# class TimeStampF1D(Blender.Freestyle.TimeStampF1D): +# def __call__(*args): return Blender.Freestyle.TimeStampF1D.__call__(*args) + diff --git a/source/blender/freestyle/style_modules_blender/haloing.py b/source/blender/freestyle/style_modules_blender/haloing.py index b7713ca2b88..afa46173d54 100755 --- a/source/blender/freestyle/style_modules_blender/haloing.py +++ b/source/blender/freestyle/style_modules_blender/haloing.py @@ -28,7 +28,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesB1D import * diff --git a/source/blender/freestyle/style_modules_blender/ignore_small_occlusions.py b/source/blender/freestyle/style_modules_blender/ignore_small_occlusions.py index 6fa7d2413f0..ff6efa89ade 100755 --- a/source/blender/freestyle/style_modules_blender/ignore_small_occlusions.py +++ b/source/blender/freestyle/style_modules_blender/ignore_small_occlusions.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/invisible_lines.py b/source/blender/freestyle/style_modules_blender/invisible_lines.py index ddaf3e4de9d..ea509463bfd 100755 --- a/source/blender/freestyle/style_modules_blender/invisible_lines.py +++ b/source/blender/freestyle/style_modules_blender/invisible_lines.py @@ -26,7 +26,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/japanese_bigbrush.py b/source/blender/freestyle/style_modules_blender/japanese_bigbrush.py index 74885b50562..b41c6d7df17 100755 --- a/source/blender/freestyle/style_modules_blender/japanese_bigbrush.py +++ b/source/blender/freestyle/style_modules_blender/japanese_bigbrush.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesB1D import * diff --git a/source/blender/freestyle/style_modules_blender/logical_operators.py b/source/blender/freestyle/style_modules_blender/logical_operators.py index 33466ed5a33..75b486ef470 100755 --- a/source/blender/freestyle/style_modules_blender/logical_operators.py +++ b/source/blender/freestyle/style_modules_blender/logical_operators.py @@ -1,8 +1,8 @@ -from Blender.Freestyle import * +from freestyle_init import * -class AndUP1D(UnaryPredicate1D): +class AndUP1D(ContourUP1D): def __init__(self, pred1, pred2): - UnaryPredicate1D.__init__(self) + ContourUP1D.__init__(self) self.__pred1 = pred1 self.__pred2 = pred2 @@ -12,9 +12,9 @@ class AndUP1D(UnaryPredicate1D): def __call__(self, inter): return self.__pred1(inter) and self.__pred2(inter) -class OrUP1D(UnaryPredicate1D): +class OrUP1D(ContourUP1D): def __init__(self, pred1, pred2): - UnaryPredicate1D.__init__(self) + ContourUP1D.__init__(self) self.__pred1 = pred1 self.__pred2 = pred2 @@ -24,9 +24,9 @@ class OrUP1D(UnaryPredicate1D): def __call__(self, inter): return self.__pred1(inter) or self.__pred2(inter) -class NotUP1D(UnaryPredicate1D): +class NotUP1D(ContourUP1D): def __init__(self, pred): - UnaryPredicate1D.__init__(self) + ContourUP1D.__init__(self) self.__pred = pred def getName(self): diff --git a/source/blender/freestyle/style_modules_blender/long_anisotropically_dense.py b/source/blender/freestyle/style_modules_blender/long_anisotropically_dense.py index 64b77092c4f..52bb2dd1170 100755 --- a/source/blender/freestyle/style_modules_blender/long_anisotropically_dense.py +++ b/source/blender/freestyle/style_modules_blender/long_anisotropically_dense.py @@ -32,7 +32,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesU0D import * diff --git a/source/blender/freestyle/style_modules_blender/multiple_parameterization.py b/source/blender/freestyle/style_modules_blender/multiple_parameterization.py index 76565424080..3f0409db5fa 100755 --- a/source/blender/freestyle/style_modules_blender/multiple_parameterization.py +++ b/source/blender/freestyle/style_modules_blender/multiple_parameterization.py @@ -31,7 +31,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/nature.py b/source/blender/freestyle/style_modules_blender/nature.py index b3441ea2b23..b5481a8e519 100755 --- a/source/blender/freestyle/style_modules_blender/nature.py +++ b/source/blender/freestyle/style_modules_blender/nature.py @@ -3,8 +3,8 @@ # Author : Stephane Grabli # Date : 04/08/2005 # Purpose : Uses the NatureUP1D predicate to select the lines -# of a given type (among SILHOUETTE, CREASE, SUGGESTIVE_CONTOURS, -# BORDERS). +# of a given type (among Nature.SILHOUETTE, Nature.CREASE, Nature.SUGGESTIVE_CONTOURS, +# Nature.BORDERS). # The suggestive contours must have been enabled in the # options dialog to appear in the View Map. # @@ -29,13 +29,13 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * -Operators.select(pyNatureUP1D(SILHOUETTE)) -Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D( pyNatureUP1D( SILHOUETTE) ) ) +Operators.select(pyNatureUP1D(Nature.SILHOUETTE)) +Operators.bidirectionalChain(ChainSilhouetteIterator(),NotUP1D( pyNatureUP1D( Nature.SILHOUETTE) ) ) shaders_list = [ IncreasingThicknessShader(3, 10), IncreasingColorShader(0.0,0.0,0.0, 1, 0.8,0,0,1) diff --git a/source/blender/freestyle/style_modules_blender/near_lines.py b/source/blender/freestyle/style_modules_blender/near_lines.py index 1e9e278643a..565bca1fe1f 100755 --- a/source/blender/freestyle/style_modules_blender/near_lines.py +++ b/source/blender/freestyle/style_modules_blender/near_lines.py @@ -27,7 +27,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py b/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py index 21e778aee79..09ce39d5dd6 100755 --- a/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py +++ b/source/blender/freestyle/style_modules_blender/occluded_by_specific_object.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/polygonalize.py b/source/blender/freestyle/style_modules_blender/polygonalize.py index beb48f812f7..4446c4c1dcc 100755 --- a/source/blender/freestyle/style_modules_blender/polygonalize.py +++ b/source/blender/freestyle/style_modules_blender/polygonalize.py @@ -24,7 +24,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/qi0.py b/source/blender/freestyle/style_modules_blender/qi0.py index 246cda79607..d35d23cb7c3 100755 --- a/source/blender/freestyle/style_modules_blender/qi0.py +++ b/source/blender/freestyle/style_modules_blender/qi0.py @@ -26,7 +26,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py b/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py index 8cc5bf4c63d..c1151f2c231 100755 --- a/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py +++ b/source/blender/freestyle/style_modules_blender/qi0_not_external_contour.py @@ -26,7 +26,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D()) diff --git a/source/blender/freestyle/style_modules_blender/qi1.py b/source/blender/freestyle/style_modules_blender/qi1.py index 0125fd71ea8..8d248376138 100755 --- a/source/blender/freestyle/style_modules_blender/qi1.py +++ b/source/blender/freestyle/style_modules_blender/qi1.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/qi2.py b/source/blender/freestyle/style_modules_blender/qi2.py index 9bb356c0810..ba5e97b6982 100755 --- a/source/blender/freestyle/style_modules_blender/qi2.py +++ b/source/blender/freestyle/style_modules_blender/qi2.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py b/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py index c9d73a57c46..c371ed48d64 100755 --- a/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py +++ b/source/blender/freestyle/style_modules_blender/sequentialsplit_sketchy.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesU0D import * @@ -44,7 +44,7 @@ class pyBackTVertexUP0D(UnaryPredicate0D): def __call__(self, iter): v = iter.getObject() nat = v.getNature() - if(nat & T_VERTEX == 0): + if(nat & Nature.T_VERTEX == 0): return 0 if(self._getQI(iter) != 0): return 1 @@ -55,7 +55,7 @@ upred = QuantitativeInvisibilityUP1D(0) Operators.select(upred) Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) ## starting and stopping predicates: -start = pyVertexNatureUP0D(NON_T_VERTEX) +start = pyVertexNatureUP0D(Nature.NON_Nature.T_VERTEX) stop = pyBackTVertexUP0D() Operators.sequentialSplit(start, stop, 10) shaders_list = [ diff --git a/source/blender/freestyle/style_modules_blender/shaders.py b/source/blender/freestyle/style_modules_blender/shaders.py index ee45324e186..bed23adff5f 100755 --- a/source/blender/freestyle/style_modules_blender/shaders.py +++ b/source/blender/freestyle/style_modules_blender/shaders.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from PredicatesU0D import * from PredicatesB1D import * from PredicatesU1D import * @@ -253,7 +253,7 @@ class pyTVertexThickenerShader(StrokeShader): ## FIXME def shade(self, stroke): it = stroke.strokeVerticesBegin() - predTVertex = pyVertexNatureUP0D(T_VERTEX) + predTVertex = pyVertexNatureUP0D(Nature.T_VERTEX) while it.isEnd() == 0: if(predTVertex(it) == 1): it2 = StrokeVertexIterator(it) @@ -684,7 +684,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): itn_1.decrement() v0 = it0.getObject() v1 = it1.getObject() - if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + if((v0.getNature() & Nature.CUSP == 0) and (v1.getNature() & Nature.CUSP == 0)): p0 = v0.getPoint() p1 = v1.getPoint() d1 = p0-p1 @@ -693,7 +693,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): v0.setPoint(newFirst) vn_1 = itn_1.getObject() vn = itn.getObject() - if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + if((vn.getNature() & Nature.CUSP == 0) and (vn_1.getNature() & Nature.CUSP == 0)): pn = vn.getPoint() pn_1 = vn_1.getPoint() dn = pn-pn_1 @@ -766,7 +766,7 @@ class pyTVertexRemoverShader(StrokeShader): def shade(self, stroke): if(stroke.strokeVerticesSize() <= 3 ): return - predTVertex = pyVertexNatureUP0D(T_VERTEX) + predTVertex = pyVertexNatureUP0D(Nature.T_VERTEX) it = stroke.strokeVerticesBegin() itlast = stroke.strokeVerticesEnd() itlast.decrement() @@ -804,8 +804,8 @@ class pyHLRShader(StrokeShader): while(it2.isEnd() == 0): v = it.getObject() vnext = it2.getObject() - if(v.getNature() & VIEW_VERTEX): - #if(v.getNature() & T_VERTEX): + if(v.getNature() & Nature.VIEW_VERTEX): + #if(v.getNature() & Nature.T_VERTEX): fe = getFEdge(v,vnext) qi = fe.qi() if(qi != 0): @@ -851,7 +851,7 @@ class pyTVertexOrientationShader(StrokeShader): it2.increment() ## case where the first vertex is a TVertex v = it.getObject() - if(v.getNature() & T_VERTEX): + if(v.getNature() & Nature.T_VERTEX): tv = v.castToTVertex() ve = getFEdge(v, it2.getObject()).viewedge() if(tv != None): @@ -861,7 +861,7 @@ class pyTVertexOrientationShader(StrokeShader): while(it2.isEnd() == 0): vprevious = it.getObject() v = it2.getObject() - if(v.getNature() & T_VERTEX): + if(v.getNature() & Nature.T_VERTEX): tv = v.castToTVertex() ve = getFEdge(vprevious, v).viewedge() if(tv != None): @@ -872,7 +872,7 @@ class pyTVertexOrientationShader(StrokeShader): it2.increment() ## case where the last vertex is a TVertex v = it.getObject() - if(v.getNature() & T_VERTEX): + if(v.getNature() & Nature.T_VERTEX): itPrevious = StrokeVertexIterator(it) itPrevious.decrement() tv = v.castToTVertex() diff --git a/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py b/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py index 1df58a75999..163c891fa90 100755 --- a/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py +++ b/source/blender/freestyle/style_modules_blender/sketchy_multiple_parameterization.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py b/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py index ebad839a3ab..5c151cfe837 100755 --- a/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py +++ b/source/blender/freestyle/style_modules_blender/sketchy_topology_broken.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * @@ -49,7 +49,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): itn_1.decrement() v0 = it0.getObject() v1 = it1.getObject() - if((v0.getNature() & CUSP == 0) and (v1.getNature() & CUSP == 0)): + if((v0.getNature() & Nature.CUSP == 0) and (v1.getNature() & Nature.CUSP == 0)): p0 = v0.getPoint() p1 = v1.getPoint() d1 = p0-p1 @@ -60,7 +60,7 @@ class pyBackboneStretcherNoCuspShader(StrokeShader): print "got a v0 cusp" vn_1 = itn_1.getObject() vn = itn.getObject() - if((vn.getNature() & CUSP == 0) and (vn_1.getNature() & CUSP == 0)): + if((vn.getNature() & Nature.CUSP == 0) and (vn_1.getNature() & Nature.CUSP == 0)): pn = vn.getPoint() pn_1 = vn_1.getPoint() dn = pn-pn_1 diff --git a/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py b/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py index 3085a5f2f7f..85e11af38b9 100755 --- a/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py +++ b/source/blender/freestyle/style_modules_blender/sketchy_topology_preserved.py @@ -27,7 +27,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from PredicatesU1D import * diff --git a/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py b/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py index e7da0fa2690..f780137ef05 100755 --- a/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py +++ b/source/blender/freestyle/style_modules_blender/split_at_highest_2d_curvatures.py @@ -26,7 +26,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from Functions0D import * diff --git a/source/blender/freestyle/style_modules_blender/split_at_tvertices.py b/source/blender/freestyle/style_modules_blender/split_at_tvertices.py index acda7e3c0ea..78f781dd290 100755 --- a/source/blender/freestyle/style_modules_blender/split_at_tvertices.py +++ b/source/blender/freestyle/style_modules_blender/split_at_tvertices.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesU0D import * @@ -33,7 +33,7 @@ from Functions0D import * Operators.select(QuantitativeInvisibilityUP1D(0)) Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) -start = pyVertexNatureUP0D(T_VERTEX) +start = pyVertexNatureUP0D(Nature.T_VERTEX) ## use the same predicate to decide where to start and where to stop ## the strokes: Operators.sequentialSplit(start, start, 10) diff --git a/source/blender/freestyle/style_modules_blender/stroke_texture.py b/source/blender/freestyle/style_modules_blender/stroke_texture.py index 41b5371fbfb..afebbe30a90 100755 --- a/source/blender/freestyle/style_modules_blender/stroke_texture.py +++ b/source/blender/freestyle/style_modules_blender/stroke_texture.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/suggestive.py b/source/blender/freestyle/style_modules_blender/suggestive.py index 3bc06e62fa7..39d8515ed6c 100755 --- a/source/blender/freestyle/style_modules_blender/suggestive.py +++ b/source/blender/freestyle/style_modules_blender/suggestive.py @@ -27,13 +27,13 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from PredicatesU1D import * from shaders import * -upred = AndUP1D(pyNatureUP1D(SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0)) +upred = AndUP1D(pyNatureUP1D(Nature.SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0)) Operators.select(upred) Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D(upred)) shaders_list = [ diff --git a/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py b/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py index 7814f2cac6c..21f6c7bdf35 100755 --- a/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py +++ b/source/blender/freestyle/style_modules_blender/thickness_fof_depth_discontinuity.py @@ -25,7 +25,7 @@ # ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/tipremover.py b/source/blender/freestyle/style_modules_blender/tipremover.py index 1d044e369c4..3e495b7d332 100755 --- a/source/blender/freestyle/style_modules_blender/tipremover.py +++ b/source/blender/freestyle/style_modules_blender/tipremover.py @@ -26,7 +26,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from ChainingIterators import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/tvertex_remover.py b/source/blender/freestyle/style_modules_blender/tvertex_remover.py index d474ca087f8..c328f4c98ec 100755 --- a/source/blender/freestyle/style_modules_blender/tvertex_remover.py +++ b/source/blender/freestyle/style_modules_blender/tvertex_remover.py @@ -26,7 +26,7 @@ ############################################################################# -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesB1D import * from shaders import * diff --git a/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py b/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py index 044ec0cbb80..4b1a8bef9df 100755 --- a/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py +++ b/source/blender/freestyle/style_modules_blender/uniformpruning_zsort.py @@ -1,4 +1,4 @@ -from Blender.Freestyle import * +from freestyle_init import * from logical_operators import * from PredicatesU1D import * from PredicatesU0D import * @@ -27,7 +27,7 @@ class pyDensityUP1D(UnaryPredicate1D): Operators.select(QuantitativeInvisibilityUP1D(0)) Operators.bidirectionalChain(ChainSilhouetteIterator()) -#Operators.sequentialSplit(pyVertexNatureUP0D(VIEW_VERTEX), 2) +#Operators.sequentialSplit(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2) Operators.sort(pyZBP1D()) shaders_list = [ StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, 0), From 7d5eaa674b70b13af3c67b2209fdfe32b6168e45 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Tue, 29 Jul 2008 11:19:30 +0000 Subject: [PATCH 422/430] soc-2008-mxcurioni: corrected problems in API with UnaryFunction1DVoid subclasses and Curvature2DAngleF1D. Understood that Curve and Noise classes cannot be defined in Freestyle's API because they are already given by Blender's API. Will rename to FrsCurve and FrsNoise and change the corresponding style modules. --- .../intern/python/BPy_UnaryFunction1D.cpp | 3 ++- .../BPy_UnaryFunction1DDouble.cpp | 5 +++++ .../style_modules_blender/freestyle_init.py | 20 +++++++++---------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index 9ab0ce41fb3..10db0d93140 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -7,7 +7,7 @@ #include "UnaryFunction1D/BPy_UnaryFunction1DVec2f.h" #include "UnaryFunction1D/BPy_UnaryFunction1DVec3f.h" #include "UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.h" - +#include "UnaryFunction1D/BPy_UnaryFunction1DVoid.h" #ifdef __cplusplus extern "C" { @@ -127,6 +127,7 @@ PyMODINIT_FUNC UnaryFunction1D_Init( PyObject *module ) UnaryFunction1DVec2f_Init( module ); UnaryFunction1DVec3f_Init( module ); UnaryFunction1DVectorViewShape_Init( module ); + UnaryFunction1DVoid_Init( module ); } //------------------------INSTANCE METHODS ---------------------------------- diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 5b6aed936b9..887d1273e60 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -147,6 +147,11 @@ PyMODINIT_FUNC UnaryFunction1DDouble_Init( PyObject *module ) { Py_INCREF( &DensityF1D_Type ); PyModule_AddObject(module, "DensityF1D", (PyObject *)&DensityF1D_Type); + if( PyType_Ready( &Curvature2DAngleF1D_Type ) < 0 ) + return; + Py_INCREF( &Curvature2DAngleF1D_Type ); + PyModule_AddObject(module, "Curvature2DAngleF1D", (PyObject *)&Curvature2DAngleF1D_Type); + if( PyType_Ready( &GetCompleteViewMapDensityF1D_Type ) < 0 ) return; Py_INCREF( &GetCompleteViewMapDensityF1D_Type ); diff --git a/source/blender/freestyle/style_modules_blender/freestyle_init.py b/source/blender/freestyle/style_modules_blender/freestyle_init.py index 5cc3448ca4d..8c45629bade 100644 --- a/source/blender/freestyle/style_modules_blender/freestyle_init.py +++ b/source/blender/freestyle/style_modules_blender/freestyle_init.py @@ -246,8 +246,8 @@ class UnaryFunction1DVec3f(Blender.Freestyle.UnaryFunction1DVec3f): class UnaryFunction1DVectorViewShape(Blender.Freestyle.UnaryFunction1DVectorViewShape): pass -# class UnaryFunction1DVoid(Blender.Freestyle.UnaryFunction1DVoid): -# pass +class UnaryFunction1DVoid(Blender.Freestyle.UnaryFunction1DVoid): + pass class FalseUP0D(Blender.Freestyle.FalseUP0D): def __call__(*args): return Blender.Freestyle.FalseUP0D.__call__(*args) @@ -378,8 +378,8 @@ class GetOccludeeF0D(Blender.Freestyle.GetOccludeeF0D): class GetShapeF0D(Blender.Freestyle.GetShapeF0D): def __call__(*args): return Blender.Freestyle.GetShapeF0D.__call__(*args) -# class Curvature2DAngleF1D(Blender.Freestyle.Curvature2DAngleF1D): -# def __call__(*args): return Blender.Freestyle.Curvature2DAngleF1D.__call__(*args) +class Curvature2DAngleF1D(Blender.Freestyle.Curvature2DAngleF1D): + def __call__(*args): return Blender.Freestyle.Curvature2DAngleF1D.__call__(*args) class DensityF1D(Blender.Freestyle.DensityF1D): def __call__(*args): return Blender.Freestyle.DensityF1D.__call__(*args) @@ -444,12 +444,12 @@ class GetOccludersF1D(Blender.Freestyle.GetOccludersF1D): class GetShapeF1D(Blender.Freestyle.GetShapeF1D): def __call__(*args): return Blender.Freestyle.GetShapeF1D.__call__(*args) -# class ChainingTimeStampF1D(Blender.Freestyle.ChainingTimeStampF1D): -# def __call__(*args): return Blender.Freestyle.ChainingTimeStampF1D.__call__(*args) +class ChainingTimeStampF1D(Blender.Freestyle.ChainingTimeStampF1D): + def __call__(*args): return Blender.Freestyle.ChainingTimeStampF1D.__call__(*args) -# class IncrementChainingTimeStampF1D(Blender.Freestyle.IncrementChainingTimeStampF1D): -# def __call__(*args): return Blender.Freestyle.IncrementChainingTimeStampF1D.__call__(*args) +class IncrementChainingTimeStampF1D(Blender.Freestyle.IncrementChainingTimeStampF1D): + def __call__(*args): return Blender.Freestyle.IncrementChainingTimeStampF1D.__call__(*args) -# class TimeStampF1D(Blender.Freestyle.TimeStampF1D): -# def __call__(*args): return Blender.Freestyle.TimeStampF1D.__call__(*args) +class TimeStampF1D(Blender.Freestyle.TimeStampF1D): + def __call__(*args): return Blender.Freestyle.TimeStampF1D.__call__(*args) From a482f644242456ad6ddf0306e1b37d8855342103 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Wed, 30 Jul 2008 01:51:40 +0000 Subject: [PATCH 423/430] =?UTF-8?q?soc-2008-mxcurioni:=20Tested=20SWIG-les?= =?UTF-8?q?s=20environment=20more=20and=20understood=20why=20the=20former?= =?UTF-8?q?=20predicate=20methods=20were=20not=20working.=20As=20St=C3=A9p?= =?UTF-8?q?hane=20had=20mentioned=20a=20few=20months=20ago,=20Freestyle=20?= =?UTF-8?q?uses=20SWIG=20directors=20to=20provide=20cross-language=20polym?= =?UTF-8?q?orphism.=20The=20API=20and=20the=20system=20I=20had=20provided?= =?UTF-8?q?=20did=20not=20support=20that=20feature=20and=20only=20implemen?= =?UTF-8?q?tations=20in=20C++=20were=20supported.=20To=20correct=20the=20p?= =?UTF-8?q?roblem,=20after=20researching=20how=20directors=20are=20impleme?= =?UTF-8?q?nted=20in=20SWIG,=20I=20provided=20the=20same=20functionality.?= =?UTF-8?q?=20So=20far,=20I=20only=20provided=20the=20code=20for=20the=20U?= =?UTF-8?q?naryPredicate1D=20class=20and=20it=20works.=20The=20implementat?= =?UTF-8?q?ion=20is=20in=20intern/python/Director.cpp=20and=20Operators.cp?= =?UTF-8?q?p.=20I=20will=20port=20the=20remaining=20directors=20tonight=20?= =?UTF-8?q?and=20continue=20to=20test=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To prevent strokes from piling up after each render, I clear the canvas at each render now (as it should have been all along) --- .../freestyle/intern/app_blender/api.cpp | 1 + .../freestyle/intern/python/BPy_Convert.cpp | 9 +++++ .../freestyle/intern/python/BPy_Convert.h | 4 +++ .../freestyle/intern/python/BPy_Operators.cpp | 6 +++- .../intern/python/BPy_UnaryPredicate1D.cpp | 2 +- .../freestyle/intern/python/Director.cpp | 12 +++++++ .../freestyle/intern/python/Director.h | 34 +++++++++++++++++++ .../Iterator/BPy_ChainSilhouetteIterator.cpp | 2 +- .../freestyle/intern/stroke/Predicates1D.h | 21 ++++++++++-- .../style_modules_blender/freestyle_init.py | 6 ++-- .../logical_operators.py | 12 +++---- 11 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 source/blender/freestyle/intern/python/Director.cpp create mode 100644 source/blender/freestyle/intern/python/Director.h diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 890c5097a63..7f5135a2655 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -42,6 +42,7 @@ extern "C" { if( view == NULL ) view = new AppGLWidget; + controller->Clear(); controller->setView(view); } diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index b541babd752..d7b6fa8bd33 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -9,6 +9,7 @@ #include "Interface0D/CurvePoint/BPy_StrokeVertex.h" #include "Interface0D/BPy_SVertex.h" #include "Interface0D/BPy_ViewVertex.h" +#include "BPy_Interface1D.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/BPy_ViewEdge.h" #include "BPy_Nature.h" @@ -79,6 +80,14 @@ PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ) { return py_if0D; } +PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ) { + PyObject *py_if1D = Interface1D_Type.tp_new( &Interface1D_Type, 0, 0 ); + ((BPy_Interface1D *) py_if1D)->if1D = &if1D; + + return py_if1D; +} + + PyObject * BPy_SVertex_from_SVertex( SVertex& sv ) { PyObject *py_sv = SVertex_Type.tp_new( &SVertex_Type, 0, 0 ); ((BPy_SVertex *) py_sv)->sv = new SVertex( sv ); diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 5b613b3c4c3..9e743f4b233 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -17,6 +17,9 @@ using namespace Geometry; // Interface0D, Interface0DIteratorNested, Interface0DIterator #include "../view_map/Interface0D.h" +// Interface1D +#include "../view_map/Interface1D.h" + // Material #include "../scene_graph/Material.h" @@ -71,6 +74,7 @@ PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewE PyObject * BPy_FEdge_from_FEdge( FEdge& fe ); PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); +PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ); PyObject * BPy_IntegrationType_from_IntegrationType( int i ); PyObject * BPy_FrsMaterial_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index b0a8e7e3bd2..850b4cb5bad 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -164,7 +164,11 @@ PyObject * Operators_select(BPy_Operators* self, PyObject *args) Py_RETURN_NONE; } - Operators::select(*( ((BPy_UnaryPredicate1D *) obj)->up1D )); + UnaryPredicate1D *up1D = ((BPy_UnaryPredicate1D *) obj)->up1D; + if( PyObject_HasAttrString( obj, "__call__") ) + up1D->setPythonObject( obj ); + + Operators::select(*up1D); Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index a13de77bbe9..14eb041c480 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -215,7 +215,7 @@ PyObject * UnaryPredicate1D___call__( BPy_UnaryPredicate1D *self, PyObject *args if( if1D ) return PyBool_from_bool( self->up1D->operator()(*if1D) ); - + Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp new file mode 100644 index 00000000000..6acdc665a0c --- /dev/null +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -0,0 +1,12 @@ +#include "Director.h" + +#include "BPy_Convert.h" + +bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D) { + cout << "Polymorphism works" << endl; + + PyObject *method = PyObject_GetAttrString( py_up1D, "__call__"); + PyObject *result = PyObject_CallFunction(method, "O", BPy_Interface1D_from_Interface1D(if1D) ); + + return bool_from_PyBool(result); +} diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h new file mode 100644 index 00000000000..7114b124ffb --- /dev/null +++ b/source/blender/freestyle/intern/python/Director.h @@ -0,0 +1,34 @@ +#ifndef FREESTYLE_PYTHON_DIRECTOR +# define FREESTYLE_PYTHON_DIRECTOR + +#include "../view_map/Interface1D.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +// SWIG directors +// ---------------------------- +// ViewEdgeInternal::ViewEdgeIterator; +// ChainingIterator; +// ChainSilhouetteIterator; +// ChainPredicateIterator; +// UnaryPredicate0D; +// UnaryPredicate1D; +// BinaryPredicate1D; +// StrokeShader; + +bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D); + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif // FREESTYLE_PYTHON_DIRECTOR diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp index 75526507493..4bfaab92a8e 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainSilhouetteIterator.cpp @@ -111,7 +111,7 @@ int ChainSilhouetteIterator___init__(BPy_ChainSilhouetteIterator *self, PyObject { PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; - if (!( PyArg_ParseTuple(args, "O|OO", &obj1, &obj2, &obj3) )) + if (!( PyArg_ParseTuple(args, "|OOO", &obj1, &obj2, &obj3) )) return -1; if( obj1 && BPy_ChainSilhouetteIterator_Check(obj1) ) { diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index cf9a3283ae4..98148361bb7 100755 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -36,6 +36,8 @@ # include "../view_map/Functions1D.h" # include "AdvancedFunctions1D.h" +# include "../python/Director.h" + // // UnaryPredicate1D (base class for predicates in 1D) // @@ -52,8 +54,13 @@ class UnaryPredicate1D { public: + + PyObject *py_up1D; + /*! Default constructor. */ - UnaryPredicate1D() {} + UnaryPredicate1D() { + py_up1D = 0; + } /*! Destructor. */ virtual ~UnaryPredicate1D() {} /*! Returns the string of the name @@ -71,9 +78,17 @@ public: * false otherwise. */ virtual bool operator()(Interface1D& inter) { - cerr << "Warning: operator() not implemented" << endl; - return false; + + if( py_up1D ) { + return director_BPy_UnaryPredicate1D___call__(py_up1D, inter); + } else { + cerr << "Warning: operator() not implemented" << endl; + return false; + } } + + inline void setPythonObject(PyObject *_py_up1D) { py_up1D = _py_up1D; } + }; diff --git a/source/blender/freestyle/style_modules_blender/freestyle_init.py b/source/blender/freestyle/style_modules_blender/freestyle_init.py index 8c45629bade..06b8f933114 100644 --- a/source/blender/freestyle/style_modules_blender/freestyle_init.py +++ b/source/blender/freestyle/style_modules_blender/freestyle_init.py @@ -49,16 +49,16 @@ class StrokeShader(Blender.Freestyle.StrokeShader): pass class UnaryFunction0D(Blender.Freestyle.UnaryFunction0D): - pass + def __call__(*args): return Blender.Freestyle.UnaryFunction0D.__call__(*args) class UnaryFunction1D(Blender.Freestyle.UnaryFunction1D): - pass + def __call__(*args): return Blender.Freestyle.UnaryFunction1D.__call__(*args) class UnaryPredicate0D(Blender.Freestyle.UnaryPredicate0D): pass class UnaryPredicate1D(Blender.Freestyle.UnaryPredicate1D): - def __call__(*args): return Blender.Freestyle.UnaryPredicate1D.__call__(*args) + pass class ViewMap(Blender.Freestyle.ViewMap): pass diff --git a/source/blender/freestyle/style_modules_blender/logical_operators.py b/source/blender/freestyle/style_modules_blender/logical_operators.py index 75b486ef470..0ecf6623697 100755 --- a/source/blender/freestyle/style_modules_blender/logical_operators.py +++ b/source/blender/freestyle/style_modules_blender/logical_operators.py @@ -1,8 +1,8 @@ from freestyle_init import * -class AndUP1D(ContourUP1D): +class AndUP1D(UnaryPredicate1D): def __init__(self, pred1, pred2): - ContourUP1D.__init__(self) + UnaryPredicate1D.__init__(self) self.__pred1 = pred1 self.__pred2 = pred2 @@ -12,9 +12,9 @@ class AndUP1D(ContourUP1D): def __call__(self, inter): return self.__pred1(inter) and self.__pred2(inter) -class OrUP1D(ContourUP1D): +class OrUP1D(UnaryPredicate1D): def __init__(self, pred1, pred2): - ContourUP1D.__init__(self) + UnaryPredicate1D.__init__(self) self.__pred1 = pred1 self.__pred2 = pred2 @@ -24,9 +24,9 @@ class OrUP1D(ContourUP1D): def __call__(self, inter): return self.__pred1(inter) or self.__pred2(inter) -class NotUP1D(ContourUP1D): +class NotUP1D(UnaryPredicate1D): def __init__(self, pred): - ContourUP1D.__init__(self) + UnaryPredicate1D.__init__(self) self.__pred = pred def getName(self): From 3010f2b753f2397256861816504b8e7d697632db Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 31 Jul 2008 08:50:12 +0000 Subject: [PATCH 424/430] soc-2008-mxcurioni: the native Python system now supports cross-language polymorphism for the following classes: BinaryPredicate0D (__call__), BinaryPredicate1D (__call__), UnaryPredicate0D (__call__), UnaryPredicate1D (__call__), StrokeShader (shade), ChainingIterator (init, traverse). Other methods could easily be supported in the future. The method now works as planned for the contour style. For style modules with Python shaders, there still is a problem that I will fix right away. --- .../intern/python/BPy_BinaryPredicate0D.cpp | 2 + .../intern/python/BPy_BinaryPredicate1D.cpp | 1 + .../freestyle/intern/python/BPy_Convert.cpp | 9 ++ .../freestyle/intern/python/BPy_Convert.h | 1 + .../freestyle/intern/python/BPy_Operators.cpp | 26 ++-- .../intern/python/BPy_StrokeShader.cpp | 1 + .../intern/python/BPy_UnaryFunction0D.h | 1 + .../intern/python/BPy_UnaryFunction1D.h | 1 + .../intern/python/BPy_UnaryPredicate0D.cpp | 1 + .../intern/python/BPy_UnaryPredicate1D.cpp | 1 + .../freestyle/intern/python/Director.cpp | 82 ++++++++++- .../freestyle/intern/python/Director.h | 67 ++++++--- .../python/Iterator/BPy_ChainingIterator.cpp | 2 + .../intern/stroke/ChainingIterators.h | 38 ++++- .../freestyle/intern/stroke/Predicates0D.h | 34 ++++- .../freestyle/intern/stroke/Predicates1D.h | 31 ++-- .../blender/freestyle/intern/stroke/Stroke.h | 1 + .../freestyle/intern/stroke/StrokeShader.h | 15 +- .../freestyle/intern/view_map/Functions0D.h | 2 +- .../freestyle/intern/view_map/Functions1D.h | 2 +- .../style_modules_blender/freestyle_init.py | 138 +++++++++--------- 21 files changed, 325 insertions(+), 131 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp index 9c3247b30b8..bcd98a42189 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate0D.cpp @@ -127,6 +127,8 @@ PyMODINIT_FUNC BinaryPredicate0D_Init( PyObject *module ) int BinaryPredicate0D___init__(BPy_BinaryPredicate0D *self, PyObject *args, PyObject *kwds) { self->bp0D = new BinaryPredicate0D(); + self->bp0D->py_bp0D = (PyObject *) self; + return 0; } diff --git a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp index 545807fc277..9f7e0359ec8 100644 --- a/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_BinaryPredicate1D.cpp @@ -159,6 +159,7 @@ PyMODINIT_FUNC BinaryPredicate1D_Init( PyObject *module ) int BinaryPredicate1D___init__(BPy_BinaryPredicate1D *self, PyObject *args, PyObject *kwds) { self->bp1D = new BinaryPredicate1D(); + self->bp1D->py_bp1D = (PyObject *) self; return 0; } diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index d7b6fa8bd33..0b136b7702f 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -11,6 +11,7 @@ #include "Interface0D/BPy_ViewVertex.h" #include "BPy_Interface1D.h" #include "Interface1D/BPy_FEdge.h" +#include "Interface1D/BPy_Stroke.h" #include "Interface1D/BPy_ViewEdge.h" #include "BPy_Nature.h" #include "BPy_MediumType.h" @@ -115,6 +116,14 @@ PyObject * BPy_Nature_from_Nature( unsigned short n ) { return py_n; } +PyObject * BPy_Stroke_from_Stroke( Stroke& s ) { + PyObject *py_s = Stroke_Type.tp_new( &Stroke_Type, 0, 0 ); + ((BPy_Stroke *) py_s)->s = new Stroke( s ); + ((BPy_Stroke *) py_s)->py_if1D.if1D = ((BPy_Stroke *) py_s)->s; + + return py_s; +} + PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ) { PyObject *py_sa = StrokeAttribute_Type.tp_new( &StrokeAttribute_Type, 0, 0 ); ((BPy_StrokeAttribute *) py_sa)->sa = new StrokeAttribute( sa ); diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 9e743f4b233..4bfaf4c1e17 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -80,6 +80,7 @@ PyObject * BPy_FrsMaterial_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); PyObject * BPy_SShape_from_SShape( SShape& ss ); +PyObject * BPy_Stroke_from_Stroke( Stroke& s ); PyObject * BPy_StrokeAttribute_from_StrokeAttribute( StrokeAttribute& sa ); PyObject * BPy_StrokeVertex_from_StrokeVertex( StrokeVertex& sv ); PyObject * BPy_SVertex_from_SVertex( SVertex& sv ); diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 850b4cb5bad..ab64f5bc6eb 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -164,21 +164,19 @@ PyObject * Operators_select(BPy_Operators* self, PyObject *args) Py_RETURN_NONE; } - UnaryPredicate1D *up1D = ((BPy_UnaryPredicate1D *) obj)->up1D; - if( PyObject_HasAttrString( obj, "__call__") ) - up1D->setPythonObject( obj ); - - Operators::select(*up1D); + Operators::select(*( ((BPy_UnaryPredicate1D *) obj)->up1D )); Py_RETURN_NONE; } +// CHANGE: first parameter is a chaining iterator, not just a view + PyObject * Operators_chain(BPy_Operators* self, PyObject *args) { PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; if(!( PyArg_ParseTuple(args, "OO|O", &obj1, &obj2, &obj3) && - BPy_ViewEdgeIterator_Check(obj1) && ((BPy_ViewEdgeIterator *) obj1)->ve_it && + BPy_ChainingIterator_Check(obj1) && ((BPy_ChainingIterator *) obj1)->c_it && BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D )) { cout << "ERROR: Operators_chain" << endl; Py_RETURN_NONE; @@ -186,12 +184,13 @@ PyObject * Operators_chain(BPy_Operators* self, PyObject *args) if( !obj3 ) { - Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ), + Operators::chain( *( ((BPy_ChainingIterator *) obj1)->c_it ), *( ((BPy_UnaryPredicate1D *) obj2)->up1D ) ); } else if( BPy_UnaryFunction1DVoid_Check(obj3) && ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) { - Operators::chain( *( ((BPy_ViewEdgeIterator *) obj1)->ve_it ), + + Operators::chain( *( ((BPy_ChainingIterator *) obj1)->c_it ), *( ((BPy_UnaryPredicate1D *) obj2)->up1D ), *( ((BPy_UnaryFunction1DVoid *) obj3)->uf1D_void ) ); @@ -209,7 +208,7 @@ PyObject * Operators_bidirectionalChain(BPy_Operators* self, PyObject *args) cout << "ERROR: Operators_bidirectionalChain" << endl; Py_RETURN_NONE; } - + if( !obj2 ) { Operators::bidirectionalChain( *( ((BPy_ChainingIterator *) obj1)->c_it ) ); @@ -234,7 +233,7 @@ PyObject * Operators_sequentialSplit(BPy_Operators* self, PyObject *args) cout << "ERROR: Operators_sequentialSplit" << endl; Py_RETURN_NONE; } - + if( obj2 && BPy_UnaryPredicate0D_Check(obj2) ) { Operators::sequentialSplit( *( ((BPy_UnaryPredicate0D *) obj1)->up0D ), @@ -266,7 +265,7 @@ PyObject * Operators_recursiveSplit(BPy_Operators* self, PyObject *args) if( BPy_UnaryPredicate1D_Check(obj2) && ((BPy_UnaryPredicate1D *) obj2)->up1D ) { float f = ( obj3 && PyFloat_Check(obj3) ) ? PyFloat_AsDouble(obj3) : 0.0; - + Operators::recursiveSplit( *( ((BPy_UnaryFunction0DDouble *) obj1)->uf0D_double ), *( ((BPy_UnaryPredicate1D *) obj2)->up1D ), f ); @@ -313,8 +312,9 @@ PyObject * Operators_create(BPy_Operators* self, PyObject *args) vector shaders; for( int i = 0; i < PyList_Size(obj2); i++) { PyObject *py_ss = PyList_GetItem(obj2,i); - if( BPy_StrokeShader_Check(py_ss) ) - shaders.push_back( ((BPy_StrokeShader *) py_ss)->ss ); + + if( BPy_StrokeShader_Check(py_ss) ) + shaders.push_back( ((BPy_StrokeShader *) py_ss)->ss ); } Operators::create( *( ((BPy_UnaryPredicate1D *) obj1)->up1D ), shaders); diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp index a6d2ae1e512..3b756b40d9b 100644 --- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp +++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp @@ -254,6 +254,7 @@ PyMODINIT_FUNC StrokeShader_Init( PyObject *module ) int StrokeShader___init__(BPy_StrokeShader *self, PyObject *args, PyObject *kwds) { self->ss = new StrokeShader(); + self->ss->py_ss = (PyObject *) self; return 0; } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h index 0ab0bfbdc2e..d95230ecccd 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.h @@ -18,6 +18,7 @@ extern PyTypeObject UnaryFunction0D_Type; /*---------------------------Python BPy_UnaryFunction0D structure definition----------*/ typedef struct { PyObject_HEAD + PyObject *py_uf0D; } BPy_UnaryFunction0D; /*---------------------------Python BPy_UnaryFunction0D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h index f33fcf48da4..571ef8a5d25 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.h @@ -18,6 +18,7 @@ extern PyTypeObject UnaryFunction1D_Type; /*---------------------------Python BPy_UnaryFunction1D structure definition----------*/ typedef struct { PyObject_HEAD + PyObject *py_uf1D; } BPy_UnaryFunction1D; /*---------------------------Python BPy_UnaryFunction1D visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp index 4fef63eae9b..db708c7830b 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate0D.cpp @@ -139,6 +139,7 @@ PyMODINIT_FUNC UnaryPredicate0D_Init( PyObject *module ) int UnaryPredicate0D___init__(BPy_UnaryPredicate0D *self, PyObject *args, PyObject *kwds) { self->up0D = new UnaryPredicate0D(); + self->up0D->py_up0D = (PyObject *) self; return 0; } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp index 14eb041c480..f2b2c7b9b53 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryPredicate1D.cpp @@ -181,6 +181,7 @@ PyMODINIT_FUNC UnaryPredicate1D_Init( PyObject *module ) int UnaryPredicate1D___init__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { self->up1D = new UnaryPredicate1D(); + self->up1D->py_up1D = (PyObject *) self; return 0; } diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index 6acdc665a0c..d3aff4a65f2 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -2,11 +2,85 @@ #include "BPy_Convert.h" -bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D) { - cout << "Polymorphism works" << endl; +#include "BPy_BinaryPredicate0D.h" +#include "BPy_BinaryPredicate1D.h" +#include "BPy_UnaryFunction0D.h" +#include "BPy_UnaryFunction1D.h" +#include "BPy_UnaryPredicate0D.h" +#include "BPy_UnaryPredicate1D.h" +#include "BPy_StrokeShader.h" +#include "Iterator/BPy_ChainingIterator.h" +#include "Interface1D/BPy_Stroke.h" +#include "Interface1D/BPy_ViewEdge.h" - PyObject *method = PyObject_GetAttrString( py_up1D, "__call__"); - PyObject *result = PyObject_CallFunction(method, "O", BPy_Interface1D_from_Interface1D(if1D) ); +// BinaryPredicate0D: __call__ +bool Director_BPy_BinaryPredicate0D___call__( PyObject *obj, Interface0D& i1, Interface0D& i2) { + PyObject *result = PyObject_CallMethod( obj, "__call__", "OO", BPy_Interface0D_from_Interface0D(i1), BPy_Interface0D_from_Interface0D(i2) ); + + return bool_from_PyBool(result); +} + + +// BinaryPredicate1D: __call__ +bool Director_BPy_BinaryPredicate1D___call__( PyObject *obj, Interface1D& i1, Interface1D& i2) { + PyObject *result = PyObject_CallMethod( obj, "__call__", "OO", BPy_Interface1D_from_Interface1D(i1), BPy_Interface1D_from_Interface1D(i2) ); + + return bool_from_PyBool(result); +} + + +// UnaryPredicate0D: __call__ +bool Director_BPy_UnaryPredicate0D___call__( PyObject *obj, Interface0DIterator& if0D_it) { + PyObject *result = PyObject_CallMethod( obj, "__call__", "O", BPy_Interface0DIterator_from_Interface0DIterator(if0D_it) ); return bool_from_PyBool(result); } + + +// UnaryPredicate1D: __call__ +bool Director_BPy_UnaryPredicate1D___call__( PyObject *obj, Interface1D& if1D) { + PyObject *result = PyObject_CallMethod( obj, "__call__", "O", BPy_Interface1D_from_Interface1D(if1D) ); + + return bool_from_PyBool(result); +} + + +// StrokeShader: shade +void Director_BPy_StrokeShader_shade( PyObject *obj, Stroke& s) { + PyObject_CallMethod( obj, "shade", "O", BPy_Stroke_from_Stroke(s) ); +} + +// ChainingIterator: init, traverse +void Director_BPy_ChainingIterator_init( PyObject *obj ) { + PyObject_CallMethod( obj, "init", "", 0 ); +} + +ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyIterator& a_it ) { + PyObject *result = PyObject_CallMethod( obj, "traverse", "O", BPy_AdjacencyIterator_from_AdjacencyIterator(a_it) ); + + return ((BPy_ViewEdge *) result)->ve; +} + + +// BPy_UnaryFunction{0D,1D}: __call__ +// BPy_UnaryFunction0DDouble +// BPy_UnaryFunction0DEdgeNature +// BPy_UnaryFunction0DFloat +// BPy_UnaryFunction0DId +// BPy_UnaryFunction0DMaterial +// BPy_UnaryFunction0DUnsigned +// BPy_UnaryFunction0DVec2f +// BPy_UnaryFunction0DVec3f +// BPy_UnaryFunction0DVectorViewShape +// BPy_UnaryFunction0DViewShape + +// BPy_UnaryFunction1DDouble +// BPy_UnaryFunction1DEdgeNature +// BPy_UnaryFunction1DFloat +// BPy_UnaryFunction1DUnsigned +// BPy_UnaryFunction1DVec2f +// BPy_UnaryFunction1DVec3f +// BPy_UnaryFunction1DVectorViewShape +// BPy_UnaryFunction1DVoid + + diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h index 7114b124ffb..95ab16047a8 100644 --- a/source/blender/freestyle/intern/python/Director.h +++ b/source/blender/freestyle/intern/python/Director.h @@ -1,34 +1,65 @@ #ifndef FREESTYLE_PYTHON_DIRECTOR # define FREESTYLE_PYTHON_DIRECTOR -#include "../view_map/Interface1D.h" +class Interface0D; +class Interface1D; +class Interface0DIterator; +class Stroke; +class AdjacencyIterator; +class ViewEdge; #ifdef __cplusplus extern "C" { #endif -/////////////////////////////////////////////////////////////////////////////////////////// - #include -// SWIG directors -// ---------------------------- -// ViewEdgeInternal::ViewEdgeIterator; -// ChainingIterator; -// ChainSilhouetteIterator; -// ChainPredicateIterator; -// UnaryPredicate0D; -// UnaryPredicate1D; -// BinaryPredicate1D; -// StrokeShader; - -bool director_BPy_UnaryPredicate1D___call__( PyObject *py_up1D, Interface1D& if1D); - -/////////////////////////////////////////////////////////////////////////////////////////// - #ifdef __cplusplus } #endif +// BinaryPredicate0D: __call__ +bool Director_BPy_BinaryPredicate0D___call__( PyObject *obj, Interface0D& i1, Interface0D& i2); + +// BinaryPredicate1D: __call__ +bool Director_BPy_BinaryPredicate1D___call__( PyObject *obj, Interface1D& i1, Interface1D& i2); + +// UnaryPredicate0D: __call__ +bool Director_BPy_UnaryPredicate0D___call__( PyObject *obj, Interface0DIterator& if0D_it); + +// UnaryPredicate1D: __call__ +bool Director_BPy_UnaryPredicate1D___call__( PyObject *obj, Interface1D& if1D); + +// StrokeShader: shade +void Director_BPy_StrokeShader_shade( PyObject *obj, Stroke& s); + +// ChainingIterator: init, traverse +void Director_BPy_ChainingIterator_init( PyObject *obj ); +ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyIterator& a_it ); + +// BPy_UnaryFunction0DDouble +double Director_BPy_UnaryFunction0DDouble___call__( PyObject *obj, Interface0DIterator& if0D_it); +// BPy_UnaryFunction0DEdgeNature +// BPy_UnaryFunction0DFloat +// BPy_UnaryFunction0DId +// BPy_UnaryFunction0DMaterial +// BPy_UnaryFunction0DUnsigned +// BPy_UnaryFunction0DVec2f +// BPy_UnaryFunction0DVec3f +// BPy_UnaryFunction0DVectorViewShape +// BPy_UnaryFunction0DViewShape + +// BPy_UnaryFunction1DDouble +// BPy_UnaryFunction1DEdgeNature +// BPy_UnaryFunction1DFloat +// BPy_UnaryFunction1DUnsigned +// BPy_UnaryFunction1DVec2f +// BPy_UnaryFunction1DVec3f +// BPy_UnaryFunction1DVectorViewShape +// BPy_UnaryFunction1DVoid +void Director_BPy_UnaryFunction1DVoid___call__( PyObject *obj, Interface1D& if1D); + + + #endif // FREESTYLE_PYTHON_DIRECTOR diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp index 525b0697fa7..f33fe0e17bc 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp @@ -139,6 +139,8 @@ int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args ) self->py_ve_it.ve_it = self->c_it; self->py_ve_it.py_it.it = self->c_it; + self->c_it->py_c_it = (PyObject *) self; + return 0; } diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index b01c895d89a..1f33f99db67 100755 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -36,6 +36,8 @@ #include "../system/Iterator.h" //soc +# include "../python/Director.h" + //using namespace ViewEdgeInternal; // @@ -135,6 +137,9 @@ protected: bool _increment; //true if we're currently incrementing, false when decrementing public: + + PyObject *py_c_it; + /*! Builds a Chaining Iterator from the first ViewEdge used for iteration * and its orientation. * \param iRestrictToSelection @@ -154,6 +159,7 @@ public: _restrictToSelection = iRestrictToSelection; _restrictToUnvisited = iRestrictToUnvisited; _increment = true; + py_c_it = 0; } /*! Copy constructor */ @@ -162,6 +168,7 @@ public: _restrictToSelection = brother._restrictToSelection; _restrictToUnvisited = brother._restrictToUnvisited; _increment = brother._increment; + py_c_it = brother.py_c_it; } /*! Returns the string "ChainingIterator" */ @@ -176,7 +183,16 @@ public: * history information that you * might want to keep. */ - virtual void init(){} + virtual void init() { + string name( py_c_it ? PyString_AsString(PyObject_CallMethod(py_c_it, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_c_it && PyObject_HasAttrString(py_c_it, "init") ) { + Director_BPy_ChainingIterator_init( py_c_it ); + } else { + cerr << "Warning: " << name << " method init() not implemented" << endl; + } + + } /*! This method iterates over the potential next * ViewEdges and returns the one that will be @@ -190,10 +206,16 @@ public: * rules by only iterating over the valid ViewEdges. */ virtual ViewEdge * traverse(const AdjacencyIterator &it){ - cerr << "Warning: the traverse method was not defined" << endl; - return 0; + string name( py_c_it ? PyString_AsString(PyObject_CallMethod(py_c_it, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_c_it && PyObject_HasAttrString(py_c_it, "traverse") ) { + return Director_BPy_ChainingIterator_traverse(py_c_it, const_cast(it) ); + } else { + cerr << "Warning: the " << name << " traverse method was not defined" << endl; + return 0; + } } - + /* accessors */ /*! Returns true if the orientation of the current ViewEdge * corresponds to its natural orientation @@ -274,6 +296,8 @@ public: */ virtual ViewEdge * traverse(const AdjacencyIterator& it); + /*! Inits the iterator context */ + virtual void init() {} }; // @@ -368,7 +392,11 @@ public: * followed next. * When reaching the end of a chain, 0 is returned. */ - virtual ViewEdge * traverse(const AdjacencyIterator &it); + virtual ViewEdge * traverse(const AdjacencyIterator &it); + + /*! Inits the iterator context */ + virtual void init() {} + }; #endif // CHAININGITERATORS_H diff --git a/source/blender/freestyle/intern/stroke/Predicates0D.h b/source/blender/freestyle/intern/stroke/Predicates0D.h index 4c2dfacdf98..0318c1742ec 100755 --- a/source/blender/freestyle/intern/stroke/Predicates0D.h +++ b/source/blender/freestyle/intern/stroke/Predicates0D.h @@ -32,6 +32,8 @@ # include "../view_map/Functions0D.h" +# include "../python/Director.h" + // // UnaryPredicate0D (base class for predicates in 0D) // @@ -48,8 +50,11 @@ class UnaryPredicate0D { public: + + PyObject *py_up0D; + /*! Default constructor. */ - UnaryPredicate0D() {} + UnaryPredicate0D() { py_up0D = 0; } /*! Destructor. */ virtual ~UnaryPredicate0D() {} /*! Returns the string of the name @@ -68,9 +73,16 @@ public: * false otherwise. */ virtual bool operator()(Interface0DIterator& it) { - cerr << "Warning: operator() not implemented" << endl; - return false; + string name( py_up0D ? PyString_AsString(PyObject_CallMethod(py_up0D, "getName", "")) : getName() ); + + if( py_up0D && PyObject_HasAttrString(py_up0D, "__call__") ) { + return Director_BPy_UnaryPredicate0D___call__(py_up0D, it); + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + return false; + } } + }; @@ -88,8 +100,11 @@ public: class BinaryPredicate0D { public: + + PyObject *py_bp0D; + /*! Default constructor. */ - BinaryPredicate0D() {} + BinaryPredicate0D() { py_bp0D = 0; } /*! Destructor. */ virtual ~BinaryPredicate0D() {} /*! Returns the string of the name of the @@ -108,9 +123,16 @@ public: * \return true or false. */ virtual bool operator()(Interface0D& inter1, Interface0D& inter2) { - cerr << "Warning: operator() not implemented" << endl; - return false; + string name( py_bp0D ? PyString_AsString(PyObject_CallMethod(py_bp0D, "getName", "")) : getName() ); + + if( py_bp0D && PyObject_HasAttrString(py_bp0D, "__call__") ) { + return Director_BPy_BinaryPredicate0D___call__(py_bp0D, inter1, inter2); + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + return false; + } } + }; diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index 98148361bb7..8c6f5a9bfa4 100755 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -58,9 +58,7 @@ public: PyObject *py_up1D; /*! Default constructor. */ - UnaryPredicate1D() { - py_up1D = 0; - } + UnaryPredicate1D() { py_up1D = 0; } /*! Destructor. */ virtual ~UnaryPredicate1D() {} /*! Returns the string of the name @@ -78,17 +76,16 @@ public: * false otherwise. */ virtual bool operator()(Interface1D& inter) { + string name( py_up1D ? PyString_AsString(PyObject_CallMethod(py_up1D, "getName", "")) : getName() ); - if( py_up1D ) { - return director_BPy_UnaryPredicate1D___call__(py_up1D, inter); + if( py_up1D && PyObject_HasAttrString(py_up1D, "__call__")) { + return Director_BPy_UnaryPredicate1D___call__(py_up1D, inter); } else { - cerr << "Warning: operator() not implemented" << endl; - return false; + cerr << "Warning: " << name << " operator() not implemented" << endl; + return false; } } - inline void setPythonObject(PyObject *_py_up1D) { py_up1D = _py_up1D; } - }; @@ -106,8 +103,11 @@ public: class BinaryPredicate1D { public: + + PyObject *py_bp1D; + /*! Default constructor. */ - BinaryPredicate1D() {} + BinaryPredicate1D() { py_bp1D = 0; } /*! Destructor. */ virtual ~BinaryPredicate1D() {} /*! Returns the string of the name of the @@ -125,9 +125,16 @@ public: * \return true or false. */ virtual bool operator()(Interface1D& inter1, Interface1D& inter2) { - cerr << "Warning: operator() not implemented" << endl; - return false; + string name( py_bp1D ? PyString_AsString(PyObject_CallMethod(py_bp1D, "getName", "")) : getName() ); + + if( py_bp1D && py_bp1D && PyObject_HasAttrString(py_bp1D, "__call__") ) { + return Director_BPy_BinaryPredicate1D___call__(py_bp1D, inter1, inter2); + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + return false; + } } + }; diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h index 8e4e5e24a2c..3df57341e5f 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.h +++ b/source/blender/freestyle/intern/stroke/Stroke.h @@ -38,6 +38,7 @@ # include "../view_map/Interface1D.h" # include "../system/StringUtils.h" + // // StrokeAttribute // diff --git a/source/blender/freestyle/intern/stroke/StrokeShader.h b/source/blender/freestyle/intern/stroke/StrokeShader.h index fa1289f6e0f..f92895564d8 100755 --- a/source/blender/freestyle/intern/stroke/StrokeShader.h +++ b/source/blender/freestyle/intern/stroke/StrokeShader.h @@ -33,6 +33,8 @@ # include # include +# include "../python/Director.h" + // // StrokeShader base class // @@ -69,8 +71,11 @@ class Stroke; class LIB_STROKE_EXPORT StrokeShader { public: + + PyObject *py_ss; + /*! Default constructor. */ - StrokeShader() {} + StrokeShader() { py_ss = 0; } /*! Destructor. */ virtual ~StrokeShader() {} /*! Returns the string corresponding to the @@ -111,7 +116,13 @@ public: * as Color, Thickness, Geometry...) */ virtual void shade(Stroke& ioStroke) const { - cerr << "Warning: method shade() not implemented" << endl; + string name( py_ss ? PyString_AsString(PyObject_CallMethod(py_ss, "getName", "")) : getName() ); + + if( py_ss && PyObject_HasAttrString(py_ss, "shade") ) { + return Director_BPy_StrokeShader_shade(py_ss, ioStroke); + } else { + cerr << "Warning: " << name << " method shade() not implemented" << endl; + } } }; diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h index 3160546da2f..1ad35da8d91 100755 --- a/source/blender/freestyle/intern/view_map/Functions0D.h +++ b/source/blender/freestyle/intern/view_map/Functions0D.h @@ -90,7 +90,7 @@ public: * \return the result of the function of type T. */ virtual T operator()(Interface0DIterator& iter) { - cerr << "Warning: operator() not implemented" << endl; + cerr << "Warning: UnaryFunction0D operator() not implemented" << endl; return T(); } }; diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h index c92d12ff330..072733b985d 100755 --- a/source/blender/freestyle/intern/view_map/Functions1D.h +++ b/source/blender/freestyle/intern/view_map/Functions1D.h @@ -92,7 +92,7 @@ public: * \return the result of the function of type T. */ virtual T operator()(Interface1D& inter) { - cerr << "Warning: operator() not implemented" << endl; + cerr << "Warning: UnaryFunction1D operator() not implemented" << endl; return T(0); } /*! Sets the integration method */ diff --git a/source/blender/freestyle/style_modules_blender/freestyle_init.py b/source/blender/freestyle/style_modules_blender/freestyle_init.py index 06b8f933114..e4ad8a9f769 100644 --- a/source/blender/freestyle/style_modules_blender/freestyle_init.py +++ b/source/blender/freestyle/style_modules_blender/freestyle_init.py @@ -49,10 +49,10 @@ class StrokeShader(Blender.Freestyle.StrokeShader): pass class UnaryFunction0D(Blender.Freestyle.UnaryFunction0D): - def __call__(*args): return Blender.Freestyle.UnaryFunction0D.__call__(*args) + pass class UnaryFunction1D(Blender.Freestyle.UnaryFunction1D): - def __call__(*args): return Blender.Freestyle.UnaryFunction1D.__call__(*args) + pass class UnaryPredicate0D(Blender.Freestyle.UnaryPredicate0D): pass @@ -67,19 +67,19 @@ class ViewShape(Blender.Freestyle.ViewShape): pass class FalseBP1D(Blender.Freestyle.FalseBP1D): - def __call__(*args): return Blender.Freestyle.FalseBP1D.__call__(*args) + pass class Length2DBP1D(Blender.Freestyle.Length2DBP1D): - def __call__(*args): return Blender.Freestyle.Length2DBP1D.__call__(*args) + pass class SameShapeIdBP1D(Blender.Freestyle.SameShapeIdBP1D): - def __call__(*args): return Blender.Freestyle.SameShapeIdBP1D.__call__(*args) + pass class TrueBP1D(Blender.Freestyle.TrueBP1D): - def __call__(*args): return Blender.Freestyle.TrueBP1D.__call__(*args) + pass class ViewMapGradientNormBP1D(Blender.Freestyle.ViewMapGradientNormBP1D): - def __call__(*args): return Blender.Freestyle.ViewMapGradientNormBP1D.__call__(*args) + pass class CurvePoint(Blender.Freestyle.CurvePoint): pass @@ -250,37 +250,37 @@ class UnaryFunction1DVoid(Blender.Freestyle.UnaryFunction1DVoid): pass class FalseUP0D(Blender.Freestyle.FalseUP0D): - def __call__(*args): return Blender.Freestyle.FalseUP0D.__call__(*args) + pass class TrueUP0D(Blender.Freestyle.TrueUP0D): - def __call__(*args): return Blender.Freestyle.TrueUP0D.__call__(*args) + pass class ContourUP1D(Blender.Freestyle.ContourUP1D): - def __call__(*args): return Blender.Freestyle.ContourUP1D.__call__(*args) + pass class DensityLowerThanUP1D(Blender.Freestyle.DensityLowerThanUP1D): - def __call__(*args): return Blender.Freestyle.DensityLowerThanUP1D.__call__(*args) + pass class EqualToChainingTimeStampUP1D(Blender.Freestyle.EqualToChainingTimeStampUP1D): - def __call__(*args): return Blender.Freestyle.EqualToChainingTimeStampUP1D.__call__(*args) + pass class EqualToTimeStampUP1D(Blender.Freestyle.EqualToTimeStampUP1D): - def __call__(*args): return Blender.Freestyle.EqualToTimeStampUP1D.__call__(*args) + pass class ExternalContourUP1D(Blender.Freestyle.ExternalContourUP1D): - def __call__(*args): return Blender.Freestyle.ExternalContourUP1D.__call__(*args) + pass class FalseUP1D(Blender.Freestyle.FalseUP1D): - def __call__(*args): return Blender.Freestyle.FalseUP1D.__call__(*args) + pass class QuantitativeInvisibilityUP1D(Blender.Freestyle.QuantitativeInvisibilityUP1D): - def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityUP1D.__call__(*args) + pass class ShapeUP1D(Blender.Freestyle.ShapeUP1D): - def __call__(*args): return Blender.Freestyle.ShapeUP1D.__call__(*args) + pass class TrueUP1D(Blender.Freestyle.TrueUP1D): - def __call__(*args): return Blender.Freestyle.TrueUP1D.__call__(*args) + pass class StrokeVertex(Blender.Freestyle.StrokeVertex): pass @@ -301,155 +301,155 @@ class FEdgeSmooth(Blender.Freestyle.FEdgeSmooth): pass class Curvature2DAngleF0D(Blender.Freestyle.Curvature2DAngleF0D): - def __call__(*args): return Blender.Freestyle.Curvature2DAngleF0D.__call__(*args) + pass class DensityF0D(Blender.Freestyle.DensityF0D): - def __call__(*args): return Blender.Freestyle.DensityF0D.__call__(*args) + pass class GetProjectedXF0D(Blender.Freestyle.GetProjectedXF0D): - def __call__(*args): return Blender.Freestyle.GetProjectedXF0D.__call__(*args) + pass class GetProjectedYF0D(Blender.Freestyle.GetProjectedYF0D): - def __call__(*args): return Blender.Freestyle.GetProjectedYF0D.__call__(*args) + pass class GetProjectedZF0D(Blender.Freestyle.GetProjectedZF0D): - def __call__(*args): return Blender.Freestyle.GetProjectedZF0D.__call__(*args) + pass class GetXF0D(Blender.Freestyle.GetXF0D): - def __call__(*args): return Blender.Freestyle.GetXF0D.__call__(*args) + pass class GetYF0D(Blender.Freestyle.GetYF0D): - def __call__(*args): return Blender.Freestyle.GetYF0D.__call__(*args) + pass class GetZF0D(Blender.Freestyle.GetZF0D): - def __call__(*args): return Blender.Freestyle.GetZF0D.__call__(*args) + pass class LocalAverageDepthF0D(Blender.Freestyle.LocalAverageDepthF0D): - def __call__(*args): return Blender.Freestyle.LocalAverageDepthF0D.__call__(*args) + pass class ZDiscontinuityF0D(Blender.Freestyle.ZDiscontinuityF0D): - def __call__(*args): return Blender.Freestyle.ZDiscontinuityF0D.__call__(*args) + pass class GetCurvilinearAbscissaF0D(Blender.Freestyle.GetCurvilinearAbscissaF0D): - def __call__(*args): return Blender.Freestyle.GetCurvilinearAbscissaF0D.__call__(*args) + pass class GetParameterF0D(Blender.Freestyle.GetParameterF0D): - def __call__(*args): return Blender.Freestyle.GetParameterF0D.__call__(*args) + pass class GetViewMapGradientNormF0D(Blender.Freestyle.GetViewMapGradientNormF0D): - def __call__(*args): return Blender.Freestyle.GetViewMapGradientNormF0D.__call__(*args) + pass class ReadCompleteViewMapPixelF0D(Blender.Freestyle.ReadCompleteViewMapPixelF0D): - def __call__(*args): return Blender.Freestyle.ReadCompleteViewMapPixelF0D.__call__(*args) + pass class ReadMapPixelF0D(Blender.Freestyle.ReadMapPixelF0D): - def __call__(*args): return Blender.Freestyle.ReadMapPixelF0D.__call__(*args) + pass class ReadSteerableViewMapPixelF0D(Blender.Freestyle.ReadSteerableViewMapPixelF0D): - def __call__(*args): return Blender.Freestyle.ReadSteerableViewMapPixelF0D.__call__(*args) + pass class ShapeIdF0D(Blender.Freestyle.ShapeIdF0D): - def __call__(*args): return Blender.Freestyle.ShapeIdF0D.__call__(*args) + pass class MaterialF0D(Blender.Freestyle.MaterialF0D): - def __call__(*args): return Blender.Freestyle.MaterialF0D.__call__(*args) + pass class CurveNatureF0D(Blender.Freestyle.CurveNatureF0D): - def __call__(*args): return Blender.Freestyle.CurveNatureF0D.__call__(*args) + pass class QuantitativeInvisibilityF0D(Blender.Freestyle.QuantitativeInvisibilityF0D): - def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityF0D.__call__(*args) + pass class Normal2DF0D(Blender.Freestyle.Normal2DF0D): - def __call__(*args): return Blender.Freestyle.Normal2DF0D.__call__(*args) + pass class VertexOrientation2DF0D(Blender.Freestyle.VertexOrientation2DF0D): - def __call__(*args): return Blender.Freestyle.VertexOrientation2DF0D.__call__(*args) + pass class VertexOrientation3DF0D(Blender.Freestyle.VertexOrientation3DF0D): - def __call__(*args): return Blender.Freestyle.VertexOrientation3DF0D.__call__(*args) + pass class GetOccludersF0D(Blender.Freestyle.GetOccludersF0D): - def __call__(*args): return Blender.Freestyle.GetOccludersF0D.__call__(*args) + pass class GetOccludeeF0D(Blender.Freestyle.GetOccludeeF0D): - def __call__(*args): return Blender.Freestyle.GetOccludeeF0D.__call__(*args) + pass class GetShapeF0D(Blender.Freestyle.GetShapeF0D): - def __call__(*args): return Blender.Freestyle.GetShapeF0D.__call__(*args) + pass class Curvature2DAngleF1D(Blender.Freestyle.Curvature2DAngleF1D): - def __call__(*args): return Blender.Freestyle.Curvature2DAngleF1D.__call__(*args) + pass class DensityF1D(Blender.Freestyle.DensityF1D): - def __call__(*args): return Blender.Freestyle.DensityF1D.__call__(*args) + pass class GetCompleteViewMapDensityF1D(Blender.Freestyle.GetCompleteViewMapDensityF1D): - def __call__(*args): return Blender.Freestyle.GetCompleteViewMapDensityF1D.__call__(*args) + pass class GetDirectionalViewMapDensityF1D(Blender.Freestyle.GetDirectionalViewMapDensityF1D): - def __call__(*args): return Blender.Freestyle.GetDirectionalViewMapDensityF1D.__call__(*args) + pass class GetProjectedXF1D(Blender.Freestyle.GetProjectedXF1D): - def __call__(*args): return Blender.Freestyle.GetProjectedXF1D.__call__(*args) + pass class GetProjectedYF1D(Blender.Freestyle.GetProjectedYF1D): - def __call__(*args): return Blender.Freestyle.GetProjectedYF1D.__call__(*args) + pass class GetProjectedZF1D(Blender.Freestyle.GetProjectedZF1D): - def __call__(*args): return Blender.Freestyle.GetProjectedZF1D.__call__(*args) + pass class GetSteerableViewMapDensityF1D(Blender.Freestyle.GetSteerableViewMapDensityF1D): - def __call__(*args): return Blender.Freestyle.GetSteerableViewMapDensityF1D.__call__(*args) + pass class GetViewMapGradientNormF1D(Blender.Freestyle.GetViewMapGradientNormF1D): - def __call__(*args): return Blender.Freestyle.GetViewMapGradientNormF1D.__call__(*args) + pass class GetXF1D(Blender.Freestyle.GetXF1D): - def __call__(*args): return Blender.Freestyle.GetXF1D.__call__(*args) + pass class GetYF1D(Blender.Freestyle.GetYF1D): - def __call__(*args): return Blender.Freestyle.GetYF1D.__call__(*args) + pass class GetZF1D(Blender.Freestyle.GetZF1D): - def __call__(*args): return Blender.Freestyle.GetZF1D.__call__(*args) + pass class LocalAverageDepthF1D(Blender.Freestyle.LocalAverageDepthF1D): - def __call__(*args): return Blender.Freestyle.LocalAverageDepthF1D.__call__(*args) + pass class ZDiscontinuityF1D(Blender.Freestyle.ZDiscontinuityF1D): - def __call__(*args): return Blender.Freestyle.ZDiscontinuityF1D.__call__(*args) + pass class CurveNatureF1D(Blender.Freestyle.CurveNatureF1D): - def __call__(*args): return Blender.Freestyle.CurveNatureF1D.__call__(*args) + pass class QuantitativeInvisibilityF1D(Blender.Freestyle.QuantitativeInvisibilityF1D): - def __call__(*args): return Blender.Freestyle.QuantitativeInvisibilityF1D.__call__(*args) + pass class Normal2DF1D(Blender.Freestyle.Normal2DF1D): - def __call__(*args): return Blender.Freestyle.Normal2DF1D.__call__(*args) + pass class Orientation2DF1D(Blender.Freestyle.Orientation2DF1D): - def __call__(*args): return Blender.Freestyle.Orientation2DF1D.__call__(*args) + pass class Orientation3DF1D(Blender.Freestyle.Orientation3DF1D): - def __call__(*args): return Blender.Freestyle.Orientation3DF1D.__call__(*args) + pass class GetOccludeeF1D(Blender.Freestyle.GetOccludeeF1D): - def __call__(*args): return Blender.Freestyle.GetOccludeeF1D.__call__(*args) + pass class GetOccludersF1D(Blender.Freestyle.GetOccludersF1D): - def __call__(*args): return Blender.Freestyle.GetOccludersF1D.__call__(*args) + pass class GetShapeF1D(Blender.Freestyle.GetShapeF1D): - def __call__(*args): return Blender.Freestyle.GetShapeF1D.__call__(*args) + pass class ChainingTimeStampF1D(Blender.Freestyle.ChainingTimeStampF1D): - def __call__(*args): return Blender.Freestyle.ChainingTimeStampF1D.__call__(*args) + pass class IncrementChainingTimeStampF1D(Blender.Freestyle.IncrementChainingTimeStampF1D): - def __call__(*args): return Blender.Freestyle.IncrementChainingTimeStampF1D.__call__(*args) + pass class TimeStampF1D(Blender.Freestyle.TimeStampF1D): - def __call__(*args): return Blender.Freestyle.TimeStampF1D.__call__(*args) + pass From f09f89d5dcbc5532eeda9f54f0e1163373491083 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 31 Jul 2008 11:20:30 +0000 Subject: [PATCH 425/430] soc-2008-mxcurioni: added a Freestyle panel to select a style at run-time, by specifying its pathname. By default, it is loaded with the contour.py path. --- source/blender/blenkernel/intern/scene.c | 1 + source/blender/freestyle/FRS_freestyle.h | 3 ++ .../freestyle/intern/app_blender/api.cpp | 17 +++++--- source/blender/include/butspace.h | 3 ++ source/blender/src/SConscript | 2 +- source/blender/src/buttons_scene.c | 43 +++++++++++++++++++ 6 files changed, 62 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 2898dca767c..089a80a9fea 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -271,6 +271,7 @@ Scene *add_scene(char *name) strcpy(sce->r.backbuf, "//backbuf"); strcpy(sce->r.pic, U.renderdir); + BLI_init_rctf(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f); sce->r.osa= 8; diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h index 060ccf6961a..20ff6b72231 100644 --- a/source/blender/freestyle/FRS_freestyle.h +++ b/source/blender/freestyle/FRS_freestyle.h @@ -5,6 +5,9 @@ extern "C" { #endif + extern char style_module[255]; + + void FRS_initialize(); void FRS_prepare(Render* re); void FRS_execute(Render* re, int render_in_layer); diff --git a/source/blender/freestyle/intern/app_blender/api.cpp b/source/blender/freestyle/intern/app_blender/api.cpp index 7f5135a2655..a6490324fbf 100644 --- a/source/blender/freestyle/intern/app_blender/api.cpp +++ b/source/blender/freestyle/intern/app_blender/api.cpp @@ -30,7 +30,8 @@ extern "C" { static Controller *controller = NULL; static AppGLWidget *view = NULL; - + char style_module[255] = ""; + void FRS_initialize(){ if( pathconfig == NULL ) @@ -42,8 +43,14 @@ extern "C" { if( view == NULL ) view = new AppGLWidget; - controller->Clear(); controller->setView(view); + controller->Clear(); + + if( strlen(style_module) == 0 ){ + string path( pathconfig->getProjectDir() + Config::DIR_SEP + "style_modules_blender" + Config::DIR_SEP + "contour.py" ); + strcpy( style_module, path.c_str() ); + } + } @@ -114,10 +121,8 @@ extern "C" { } // add style module - string style_module = pathconfig->getProjectDir() + - Config::DIR_SEP + "style_modules_blender" + - Config::DIR_SEP + "contour.py"; - controller->InsertStyleModule( 0, const_cast(style_module.c_str()) ); + cout << "Module: " << style_module << endl; + controller->InsertStyleModule( 0, style_module ); controller->toggleLayer(0, true); // compute view map diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index c0542e3f34c..68bc1fff774 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -318,6 +318,8 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_FS_PIC 1601 #define B_FS_BACKBUF 1602 +#define B_FS_FRS 1603 + #define B_FS_FTYPE 1604 /* FTYPE is no more */ #define B_DORENDER 1605 #define B_DOANIM 1606 @@ -372,6 +374,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_SEQ_BUT_RELOAD_FILE 1696 #define B_SEQ_BUT_REBUILD_PROXY 1697 #define B_SEQ_SEL_PROXY_DIR 1698 + /* *********************** */ #define B_ARMATUREBUTS 1800 #define B_POSE 1701 diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript index 229cc87ef37..a7a960beac9 100644 --- a/source/blender/src/SConscript +++ b/source/blender/src/SConscript @@ -27,7 +27,7 @@ incs += ' #/intern/decimation/extern ../blenloader ../python' incs += ' ../../kernel/gen_system #/intern/SoundSystem ../readstreamglue ../nodes' incs += ' ../quicktime #/intern/elbeem/extern' incs += ' #/intern/ghost #/intern/opennl/extern #/extern/glew/include' - +incs += ' ../freestyle' incs += ' ' + env['BF_PYTHON_INC'] incs += ' ' + env['BF_SDL_INC'] diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 8b35f90ea9d..6edf3ebf168 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -120,6 +120,8 @@ extern void makeffmpegstring(char* string); #endif +#include "FRS_freestyle.h" + /* here the calls for scene buttons - render - world @@ -1362,6 +1364,15 @@ static void backbuf_pic(char *name) BIF_undo_push("Change background picture"); } +static void freestyle_module(char *name) +{ + strcpy(style_module, name); + allqueue(REDRAWBUTSSCENE, 0); + BIF_undo_push("Change style module"); +} + + + static void run_playanim(char *file) { extern char bprogname[]; /* usiblender.c */ @@ -1463,6 +1474,13 @@ void do_render_panels(unsigned short event) activate_fileselect(FILE_SPECIAL, "SELECT BACKBUF PICTURE", G.scene->r.backbuf, backbuf_pic); break; + case B_FS_FRS: + sa= closest_bigger_area(); + areawinset(sa->win); + activate_fileselect(FILE_SPECIAL, "SELECT STYLE MODULE", style_module, freestyle_module); + break; + + case B_PR_PAL: G.scene->r.xsch= 720; G.scene->r.ysch= 576; @@ -3235,6 +3253,26 @@ static void render_panel_yafrayGlobal() } #endif /* disable yafray stuff */ +static void render_panel_freestyle() +{ + uiBlock *block; + + if( strlen(style_module) == 0 ) + FRS_initialize(); + + block= uiNewBlock(&curarea->uiblocks, "render_panel_freestyle", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed("Render", "Render"); + if(uiNewPanel(curarea, block, "Freestyle", "Render", 320, 0, 318, 204)==0) return; + + // label to force a boundbox for buttons not to be centered + uiBlockBeginAlign(block); + uiDefIconBut(block, BUT, B_FS_FRS, ICON_FILESEL, 10, 190, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get style module"); + uiDefBut(block, TEX,0,"", 31, 190, 279, 20, style_module, 0.0,79.0, 0, 0, "Style module path name"); + uiBlockEndAlign(block); + + +} + static void layer_copy_func(void *lay_v, void *lay_p) { unsigned int *lay= lay_p; @@ -3453,6 +3491,11 @@ void render_panels() } #endif + if (G.scene->r.renderer==R_FREESTYLE) { + render_panel_freestyle(); + } + + } /* --------------------------------------------- */ From 6a6c23ecd8af6b1216975ad87b1602f618a7a5fd Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 31 Jul 2008 11:59:06 +0000 Subject: [PATCH 426/430] soc-2008-mxcurioni: moved namespace collision resolution to the freestyle_init.py (for Curve, Material and Noise) --- .../freestyle/intern/python/BPy_Convert.cpp | 8 +- .../freestyle/intern/python/BPy_Convert.h | 2 +- .../freestyle/intern/python/BPy_Freestyle.cpp | 4 +- .../intern/python/BPy_FrsMaterial.cpp | 407 ------------------ .../freestyle/intern/python/BPy_Material.cpp | 407 ++++++++++++++++++ .../{BPy_FrsMaterial.h => BPy_Material.h} | 12 +- .../Interface1D/FEdge/BPy_FEdgeSharp.cpp | 4 +- .../Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 2 +- .../BPy_UnaryFunction0DMaterial.cpp | 2 +- 9 files changed, 424 insertions(+), 424 deletions(-) delete mode 100644 source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp create mode 100644 source/blender/freestyle/intern/python/BPy_Material.cpp rename source/blender/freestyle/intern/python/{BPy_FrsMaterial.h => BPy_Material.h} (55%) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 0b136b7702f..13e4f332c32 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -1,7 +1,7 @@ #include "BPy_Convert.h" #include "BPy_BBox.h" -#include "BPy_FrsMaterial.h" +#include "BPy_Material.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -188,9 +188,9 @@ PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) { return py_vs; } -PyObject * BPy_FrsMaterial_from_Material( Material& m ){ - PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 ); - ((BPy_FrsMaterial*) py_m)->m = new Material( m ); +PyObject * BPy_Material_from_Material( Material& m ){ + PyObject *py_m = Material_Type.tp_new( &Material_Type, 0, 0 ); + ((BPy_Material*) py_m)->m = new Material( m ); return py_m; } diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 4bfaf4c1e17..54999b44f67 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -76,7 +76,7 @@ PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ); PyObject * BPy_IntegrationType_from_IntegrationType( int i ); -PyObject * BPy_FrsMaterial_from_Material( Material& m ); +PyObject * BPy_Material_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); PyObject * BPy_SShape_from_SShape( SShape& ss ); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 85a2783102e..6348d30577c 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -3,7 +3,7 @@ #include "BPy_BBox.h" #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" -#include "BPy_FrsMaterial.h" +#include "BPy_Material.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -147,7 +147,7 @@ PyObject *Freestyle_Init( void ) BBox_Init( module ); BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); - FrsMaterial_Init( module ); + Material_Init( module ); Id_Init( module ); IntegrationType_Init( module ); Interface0D_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp deleted file mode 100644 index 052583e4621..00000000000 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ /dev/null @@ -1,407 +0,0 @@ -#include "BPy_FrsMaterial.h" - -#include "BPy_Convert.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/////////////////////////////////////////////////////////////////////////////////////////// - -/*--------------- Python API function prototypes for FrsMaterial instance -----------*/ -static int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds); -static void FrsMaterial___dealloc__(BPy_FrsMaterial *self); -static PyObject * FrsMaterial___repr__(BPy_FrsMaterial *self); - -static PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_specular( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_emission( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) ; -static PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self); -static PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ); -static PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ); -static PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ); -static PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ); -static PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ); - -/*----------------------FrsMaterial instance definitions ----------------------------*/ -static PyMethodDef BPy_FrsMaterial_methods[] = { - {"diffuse", ( PyCFunction ) FrsMaterial_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"}, - {"diffuseR", ( PyCFunction ) FrsMaterial_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "}, - {"diffuseG", ( PyCFunction ) FrsMaterial_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "}, - {"diffuseB", ( PyCFunction ) FrsMaterial_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "}, - {"diffuseA", ( PyCFunction ) FrsMaterial_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "}, - {"specular", ( PyCFunction ) FrsMaterial_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"}, - {"specularR", ( PyCFunction ) FrsMaterial_specularR, METH_NOARGS, "() Returns the red component of the specular color "}, - {"specularG", ( PyCFunction ) FrsMaterial_specularG, METH_NOARGS, "() Returns the green component of the specular color "}, - {"specularB", ( PyCFunction ) FrsMaterial_specularB, METH_NOARGS, "() Returns the blue component of the specular color "}, - {"specularA", ( PyCFunction ) FrsMaterial_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "}, - {"ambient", ( PyCFunction ) FrsMaterial_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"}, - {"ambientR", ( PyCFunction ) FrsMaterial_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "}, - {"ambientG", ( PyCFunction ) FrsMaterial_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "}, - {"ambientB", ( PyCFunction ) FrsMaterial_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "}, - {"ambientA", ( PyCFunction ) FrsMaterial_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "}, - {"emission", ( PyCFunction ) FrsMaterial_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"}, - {"emissionR", ( PyCFunction ) FrsMaterial_emissionR, METH_NOARGS, "() Returns the red component of the emission color "}, - {"emissionG", ( PyCFunction ) FrsMaterial_emissionG, METH_NOARGS, "() Returns the green component of the emission color "}, - {"emissionB", ( PyCFunction ) FrsMaterial_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "}, - {"emissionA", ( PyCFunction ) FrsMaterial_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "}, - {"shininess", ( PyCFunction ) FrsMaterial_shininess, METH_NOARGS, "() Returns the shininess coefficient "}, - {"setDiffuse", ( PyCFunction ) FrsMaterial_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"}, - {"setSpecular", ( PyCFunction ) FrsMaterial_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"}, - {"setAmbient", ( PyCFunction ) FrsMaterial_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"}, - {"setEmission", ( PyCFunction ) FrsMaterial_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"}, - {"setShininess", ( PyCFunction ) FrsMaterial_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"}, - {NULL, NULL, 0, NULL} -}; - -/*-----------------------BPy_FrsMaterial type definition ------------------------------*/ - -PyTypeObject FrsMaterial_Type = { - PyObject_HEAD_INIT( NULL ) - 0, /* ob_size */ - "FrsMaterial", /* tp_name */ - sizeof( BPy_FrsMaterial ), /* tp_basicsize */ - 0, /* tp_itemsize */ - - /* methods */ - (destructor)FrsMaterial___dealloc__, /* tp_dealloc */ - NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ - (reprfunc)FrsMaterial___repr__, /* tp_repr */ - - /* Method suites for standard classes */ - - NULL, /* PyNumberMethods *tp_as_number; */ - NULL, /* PySequenceMethods *tp_as_sequence; */ - NULL, /* PyMappingMethods *tp_as_mapping; */ - - /* More standard operations (here for binary compatibility) */ - - NULL, /* hashfunc tp_hash; */ - NULL, /* ternaryfunc tp_call; */ - NULL, /* reprfunc tp_str; */ - NULL, /* getattrofunc tp_getattro; */ - NULL, /* setattrofunc tp_setattro; */ - - /* Functions to access object as input/output buffer */ - NULL, /* PyBufferProcs *tp_as_buffer; */ - - /*** Flags to define presence of optional/expanded features ***/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ - - NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ - /* call function for all accessible objects */ - NULL, /* traverseproc tp_traverse; */ - - /* delete references to contained objects */ - NULL, /* inquiry tp_clear; */ - - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ - NULL, /* richcmpfunc tp_richcompare; */ - - /*** weak reference enabler ***/ - 0, /* long tp_weaklistoffset; */ - - /*** Added in release 2.2 ***/ - /* Iterators */ - NULL, /* getiterfunc tp_iter; */ - NULL, /* iternextfunc tp_iternext; */ - - /*** Attribute descriptor and subclassing stuff ***/ - BPy_FrsMaterial_methods, /* struct PyMethodDef *tp_methods; */ - NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ - NULL, /* struct _typeobject *tp_base; */ - NULL, /* PyObject *tp_dict; */ - NULL, /* descrgetfunc tp_descr_get; */ - NULL, /* descrsetfunc tp_descr_set; */ - 0, /* long tp_dictoffset; */ - (initproc)FrsMaterial___init__, /* initproc tp_init; */ - NULL, /* allocfunc tp_alloc; */ - PyType_GenericNew, /* newfunc tp_new; */ - - /* Low-level free-memory routine */ - NULL, /* freefunc tp_free; */ - - /* For PyObject_IS_GC */ - NULL, /* inquiry tp_is_gc; */ - NULL, /* PyObject *tp_bases; */ - - /* method resolution order */ - NULL, /* PyObject *tp_mro; */ - NULL, /* PyObject *tp_cache; */ - NULL, /* PyObject *tp_subclasses; */ - NULL, /* PyObject *tp_weaklist; */ - NULL -}; - -//-------------------MODULE INITIALIZATION-------------------------------- -PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ) -{ - if( module == NULL ) - return; - - if( PyType_Ready( &FrsMaterial_Type ) < 0 ) - return; - - Py_INCREF( &FrsMaterial_Type ); - PyModule_AddObject(module, "FrsMaterial", (PyObject *)&FrsMaterial_Type); -} - -//------------------------INSTANCE METHODS ---------------------------------- - -int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds) -{ - PyObject *obj1 = 0; - float f1 = 0, f2 = 0., f3 = 0., f4 = 0., f5 = 0.; - - if (! PyArg_ParseTuple(args, "|Offff", &obj1, &f2, &f3, &f4, &f5) ) - return -1; - - if( !obj1 ){ - self->m = new Material(); - - } else if( BPy_FrsMaterial_Check(obj1) ) { - if( ((BPy_FrsMaterial *) obj1)->m ) - self->m = new Material(*( ((BPy_FrsMaterial *) obj1)->m )); - else - return -1; - - } else if( PyFloat_Check(obj1) ) { - f1 = PyFloat_AsDouble(obj1); - self->m = new Material(&f1, &f2, &f3, &f4, f5); - - } else { - return -1; - } - - return 0; -} - -void FrsMaterial___dealloc__( BPy_FrsMaterial* self) -{ - delete self->m; - self->ob_type->tp_free((PyObject*)self); -} - - -PyObject * FrsMaterial___repr__( BPy_FrsMaterial* self) -{ - return PyString_FromFormat("FrsMaterial - address: %p", self->m ); -} - -PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self) { - PyObject *tmp; - - const float *diffuse = self->m->diffuse(); - PyObject *py_diffuse = PyList_New(4); - - tmp = PyFloat_FromDouble( diffuse[0] ); PyList_SetItem( py_diffuse, 0, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( diffuse[1] ); PyList_SetItem( py_diffuse, 1, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( diffuse[2] ); PyList_SetItem( py_diffuse, 2, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( diffuse[3] ); PyList_SetItem( py_diffuse, 3, tmp); Py_DECREF(tmp); - - return py_diffuse; -} - -PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->diffuseR() ); -} - -PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->diffuseG() ); -} - -PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->diffuseB() ); -} - -PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->diffuseA() ); -} - -PyObject * FrsMaterial_specular( BPy_FrsMaterial* self) { - PyObject *tmp; - - const float *specular = self->m->specular(); - PyObject *py_specular = PyList_New(4); - - tmp = PyFloat_FromDouble( specular[0] ); PyList_SetItem( py_specular, 0, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( specular[1] ); PyList_SetItem( py_specular, 1, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( specular[2] ); PyList_SetItem( py_specular, 2, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( specular[3] ); PyList_SetItem( py_specular, 3, tmp); Py_DECREF(tmp); - - return py_specular; -} - -PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->specularR() ); -} - -PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->specularG() ); -} - -PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->specularB() ); -} - -PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->specularA() ); -} - -PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) { - PyObject *tmp; - - const float *ambient = self->m->ambient(); - PyObject *py_ambient = PyList_New(4); - - tmp = PyFloat_FromDouble( ambient[0] ); PyList_SetItem( py_ambient, 0, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( ambient[1] ); PyList_SetItem( py_ambient, 1, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( ambient[2] ); PyList_SetItem( py_ambient, 2, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( ambient[3] ); PyList_SetItem( py_ambient, 3, tmp); Py_DECREF(tmp); - - return py_ambient; -} - -PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->ambientR() ); -} - -PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->ambientG() ); -} - -PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->ambientB() ); -} - -PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->ambientA() ); -} - -PyObject * FrsMaterial_emission( BPy_FrsMaterial* self) { - PyObject *tmp; - - const float *emission = self->m->emission(); - PyObject *py_emission = PyList_New(4); - - tmp = PyFloat_FromDouble( emission[0] ); PyList_SetItem( py_emission, 0, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( emission[1] ); PyList_SetItem( py_emission, 1, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( emission[2] ); PyList_SetItem( py_emission, 2, tmp); Py_DECREF(tmp); - tmp = PyFloat_FromDouble( emission[3] ); PyList_SetItem( py_emission, 3, tmp); Py_DECREF(tmp); - - return py_emission; -} - -PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->emissionR() ); -} - -PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->emissionG() ); -} - -PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->emissionB() ); -} - -PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->emissionA() ); -} - -PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self) { - return PyFloat_FromDouble( self->m->shininess() ); -} - -PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ) { - float f1, f2, f3, f4; - - if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: FrsMaterial_setDiffuse" << endl; - Py_RETURN_NONE; - } - - self->m->setDiffuse(f1, f2, f3, f4); - - Py_RETURN_NONE; -} - -PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ) { - float f1, f2, f3, f4; - - if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: FrsMaterial_setSpecular" << endl; - Py_RETURN_NONE; - } - - self->m->setSpecular(f1, f2, f3, f4); - - Py_RETURN_NONE; -} - -PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ) { - float f1, f2, f3, f4; - - if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: FrsMaterial_setAmbient" << endl; - Py_RETURN_NONE; - } - - self->m->setAmbient(f1, f2, f3, f4); - - Py_RETURN_NONE; -} - -PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ) { - float f1, f2, f3, f4; - - if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: FrsMaterial_setEmission" << endl; - Py_RETURN_NONE; - } - - self->m->setEmission(f1, f2, f3, f4); - - Py_RETURN_NONE; -} - -PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ) { - float f; - - if(!( PyArg_ParseTuple(args, "f", &f) )) { - cout << "ERROR: FrsMaterial_setShininess" << endl; - Py_RETURN_NONE; - } - - self->m->setShininess(f); - - Py_RETURN_NONE; -} - -/////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/freestyle/intern/python/BPy_Material.cpp b/source/blender/freestyle/intern/python/BPy_Material.cpp new file mode 100644 index 00000000000..7f871c34c3c --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_Material.cpp @@ -0,0 +1,407 @@ +#include "BPy_Material.h" + +#include "BPy_Convert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +/*--------------- Python API function prototypes for Material instance -----------*/ +static int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds); +static void Material___dealloc__(BPy_Material *self); +static PyObject * Material___repr__(BPy_Material *self); + +static PyObject * Material_diffuse( BPy_Material* self); +static PyObject * Material_diffuseR( BPy_Material* self); +static PyObject * Material_diffuseG( BPy_Material* self) ; +static PyObject * Material_diffuseB( BPy_Material* self) ; +static PyObject * Material_diffuseA( BPy_Material* self); +static PyObject * Material_specular( BPy_Material* self); +static PyObject * Material_specularR( BPy_Material* self); +static PyObject * Material_specularG( BPy_Material* self); +static PyObject * Material_specularB( BPy_Material* self) ; +static PyObject * Material_specularA( BPy_Material* self) ; +static PyObject * Material_ambient( BPy_Material* self) ; +static PyObject * Material_ambientR( BPy_Material* self); +static PyObject * Material_ambientG( BPy_Material* self); +static PyObject * Material_ambientB( BPy_Material* self); +static PyObject * Material_ambientA( BPy_Material* self); +static PyObject * Material_emission( BPy_Material* self); +static PyObject * Material_emissionR( BPy_Material* self); +static PyObject * Material_emissionG( BPy_Material* self) ; +static PyObject * Material_emissionB( BPy_Material* self); +static PyObject * Material_emissionA( BPy_Material* self); +static PyObject * Material_shininess( BPy_Material* self); +static PyObject * Material_setDiffuse( BPy_Material *self, PyObject *args ); +static PyObject * Material_setSpecular( BPy_Material *self, PyObject *args ); +static PyObject * Material_setAmbient( BPy_Material *self, PyObject *args ); +static PyObject * Material_setEmission( BPy_Material *self, PyObject *args ); +static PyObject * Material_setShininess( BPy_Material *self, PyObject *args ); + +/*----------------------Material instance definitions ----------------------------*/ +static PyMethodDef BPy_Material_methods[] = { + {"diffuse", ( PyCFunction ) Material_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"}, + {"diffuseR", ( PyCFunction ) Material_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "}, + {"diffuseG", ( PyCFunction ) Material_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "}, + {"diffuseB", ( PyCFunction ) Material_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "}, + {"diffuseA", ( PyCFunction ) Material_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "}, + {"specular", ( PyCFunction ) Material_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"}, + {"specularR", ( PyCFunction ) Material_specularR, METH_NOARGS, "() Returns the red component of the specular color "}, + {"specularG", ( PyCFunction ) Material_specularG, METH_NOARGS, "() Returns the green component of the specular color "}, + {"specularB", ( PyCFunction ) Material_specularB, METH_NOARGS, "() Returns the blue component of the specular color "}, + {"specularA", ( PyCFunction ) Material_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "}, + {"ambient", ( PyCFunction ) Material_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"}, + {"ambientR", ( PyCFunction ) Material_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "}, + {"ambientG", ( PyCFunction ) Material_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "}, + {"ambientB", ( PyCFunction ) Material_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "}, + {"ambientA", ( PyCFunction ) Material_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "}, + {"emission", ( PyCFunction ) Material_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"}, + {"emissionR", ( PyCFunction ) Material_emissionR, METH_NOARGS, "() Returns the red component of the emission color "}, + {"emissionG", ( PyCFunction ) Material_emissionG, METH_NOARGS, "() Returns the green component of the emission color "}, + {"emissionB", ( PyCFunction ) Material_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "}, + {"emissionA", ( PyCFunction ) Material_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "}, + {"shininess", ( PyCFunction ) Material_shininess, METH_NOARGS, "() Returns the shininess coefficient "}, + {"setDiffuse", ( PyCFunction ) Material_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"}, + {"setSpecular", ( PyCFunction ) Material_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"}, + {"setAmbient", ( PyCFunction ) Material_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"}, + {"setEmission", ( PyCFunction ) Material_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"}, + {"setShininess", ( PyCFunction ) Material_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"}, + {NULL, NULL, 0, NULL} +}; + +/*-----------------------BPy_Material type definition ------------------------------*/ + +PyTypeObject Material_Type = { + PyObject_HEAD_INIT( NULL ) + 0, /* ob_size */ + "Material", /* tp_name */ + sizeof( BPy_Material ), /* tp_basicsize */ + 0, /* tp_itemsize */ + + /* methods */ + (destructor)Material___dealloc__, /* tp_dealloc */ + NULL, /* printfunc tp_print; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ + NULL, /* tp_compare */ + (reprfunc)Material___repr__, /* tp_repr */ + + /* Method suites for standard classes */ + + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ + + /* More standard operations (here for binary compatibility) */ + + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ + + /* Functions to access object as input/output buffer */ + NULL, /* PyBufferProcs *tp_as_buffer; */ + + /*** Flags to define presence of optional/expanded features ***/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ + + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ + /* call function for all accessible objects */ + NULL, /* traverseproc tp_traverse; */ + + /* delete references to contained objects */ + NULL, /* inquiry tp_clear; */ + + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + NULL, /* richcmpfunc tp_richcompare; */ + + /*** weak reference enabler ***/ + 0, /* long tp_weaklistoffset; */ + + /*** Added in release 2.2 ***/ + /* Iterators */ + NULL, /* getiterfunc tp_iter; */ + NULL, /* iternextfunc tp_iternext; */ + + /*** Attribute descriptor and subclassing stuff ***/ + BPy_Material_methods, /* struct PyMethodDef *tp_methods; */ + NULL, /* struct PyMemberDef *tp_members; */ + NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct _typeobject *tp_base; */ + NULL, /* PyObject *tp_dict; */ + NULL, /* descrgetfunc tp_descr_get; */ + NULL, /* descrsetfunc tp_descr_set; */ + 0, /* long tp_dictoffset; */ + (initproc)Material___init__, /* initproc tp_init; */ + NULL, /* allocfunc tp_alloc; */ + PyType_GenericNew, /* newfunc tp_new; */ + + /* Low-level free-memory routine */ + NULL, /* freefunc tp_free; */ + + /* For PyObject_IS_GC */ + NULL, /* inquiry tp_is_gc; */ + NULL, /* PyObject *tp_bases; */ + + /* method resolution order */ + NULL, /* PyObject *tp_mro; */ + NULL, /* PyObject *tp_cache; */ + NULL, /* PyObject *tp_subclasses; */ + NULL, /* PyObject *tp_weaklist; */ + NULL +}; + +//-------------------MODULE INITIALIZATION-------------------------------- +PyMODINIT_FUNC Material_Init( PyObject *module ) +{ + if( module == NULL ) + return; + + if( PyType_Ready( &Material_Type ) < 0 ) + return; + + Py_INCREF( &Material_Type ); + PyModule_AddObject(module, "Material", (PyObject *)&Material_Type); +} + +//------------------------INSTANCE METHODS ---------------------------------- + +int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds) +{ + PyObject *obj1 = 0; + float f1 = 0, f2 = 0., f3 = 0., f4 = 0., f5 = 0.; + + if (! PyArg_ParseTuple(args, "|Offff", &obj1, &f2, &f3, &f4, &f5) ) + return -1; + + if( !obj1 ){ + self->m = new Material(); + + } else if( BPy_Material_Check(obj1) ) { + if( ((BPy_Material *) obj1)->m ) + self->m = new Material(*( ((BPy_Material *) obj1)->m )); + else + return -1; + + } else if( PyFloat_Check(obj1) ) { + f1 = PyFloat_AsDouble(obj1); + self->m = new Material(&f1, &f2, &f3, &f4, f5); + + } else { + return -1; + } + + return 0; +} + +void Material___dealloc__( BPy_Material* self) +{ + delete self->m; + self->ob_type->tp_free((PyObject*)self); +} + + +PyObject * Material___repr__( BPy_Material* self) +{ + return PyString_FromFormat("Material - address: %p", self->m ); +} + +PyObject * Material_diffuse( BPy_Material* self) { + PyObject *tmp; + + const float *diffuse = self->m->diffuse(); + PyObject *py_diffuse = PyList_New(4); + + tmp = PyFloat_FromDouble( diffuse[0] ); PyList_SetItem( py_diffuse, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[1] ); PyList_SetItem( py_diffuse, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[2] ); PyList_SetItem( py_diffuse, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( diffuse[3] ); PyList_SetItem( py_diffuse, 3, tmp); Py_DECREF(tmp); + + return py_diffuse; +} + +PyObject * Material_diffuseR( BPy_Material* self) { + return PyFloat_FromDouble( self->m->diffuseR() ); +} + +PyObject * Material_diffuseG( BPy_Material* self) { + return PyFloat_FromDouble( self->m->diffuseG() ); +} + +PyObject * Material_diffuseB( BPy_Material* self) { + return PyFloat_FromDouble( self->m->diffuseB() ); +} + +PyObject * Material_diffuseA( BPy_Material* self) { + return PyFloat_FromDouble( self->m->diffuseA() ); +} + +PyObject * Material_specular( BPy_Material* self) { + PyObject *tmp; + + const float *specular = self->m->specular(); + PyObject *py_specular = PyList_New(4); + + tmp = PyFloat_FromDouble( specular[0] ); PyList_SetItem( py_specular, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[1] ); PyList_SetItem( py_specular, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[2] ); PyList_SetItem( py_specular, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( specular[3] ); PyList_SetItem( py_specular, 3, tmp); Py_DECREF(tmp); + + return py_specular; +} + +PyObject * Material_specularR( BPy_Material* self) { + return PyFloat_FromDouble( self->m->specularR() ); +} + +PyObject * Material_specularG( BPy_Material* self) { + return PyFloat_FromDouble( self->m->specularG() ); +} + +PyObject * Material_specularB( BPy_Material* self) { + return PyFloat_FromDouble( self->m->specularB() ); +} + +PyObject * Material_specularA( BPy_Material* self) { + return PyFloat_FromDouble( self->m->specularA() ); +} + +PyObject * Material_ambient( BPy_Material* self) { + PyObject *tmp; + + const float *ambient = self->m->ambient(); + PyObject *py_ambient = PyList_New(4); + + tmp = PyFloat_FromDouble( ambient[0] ); PyList_SetItem( py_ambient, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[1] ); PyList_SetItem( py_ambient, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[2] ); PyList_SetItem( py_ambient, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( ambient[3] ); PyList_SetItem( py_ambient, 3, tmp); Py_DECREF(tmp); + + return py_ambient; +} + +PyObject * Material_ambientR( BPy_Material* self) { + return PyFloat_FromDouble( self->m->ambientR() ); +} + +PyObject * Material_ambientG( BPy_Material* self) { + return PyFloat_FromDouble( self->m->ambientG() ); +} + +PyObject * Material_ambientB( BPy_Material* self) { + return PyFloat_FromDouble( self->m->ambientB() ); +} + +PyObject * Material_ambientA( BPy_Material* self) { + return PyFloat_FromDouble( self->m->ambientA() ); +} + +PyObject * Material_emission( BPy_Material* self) { + PyObject *tmp; + + const float *emission = self->m->emission(); + PyObject *py_emission = PyList_New(4); + + tmp = PyFloat_FromDouble( emission[0] ); PyList_SetItem( py_emission, 0, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[1] ); PyList_SetItem( py_emission, 1, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[2] ); PyList_SetItem( py_emission, 2, tmp); Py_DECREF(tmp); + tmp = PyFloat_FromDouble( emission[3] ); PyList_SetItem( py_emission, 3, tmp); Py_DECREF(tmp); + + return py_emission; +} + +PyObject * Material_emissionR( BPy_Material* self) { + return PyFloat_FromDouble( self->m->emissionR() ); +} + +PyObject * Material_emissionG( BPy_Material* self) { + return PyFloat_FromDouble( self->m->emissionG() ); +} + +PyObject * Material_emissionB( BPy_Material* self) { + return PyFloat_FromDouble( self->m->emissionB() ); +} + +PyObject * Material_emissionA( BPy_Material* self) { + return PyFloat_FromDouble( self->m->emissionA() ); +} + +PyObject * Material_shininess( BPy_Material* self) { + return PyFloat_FromDouble( self->m->shininess() ); +} + +PyObject * Material_setDiffuse( BPy_Material *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: Material_setDiffuse" << endl; + Py_RETURN_NONE; + } + + self->m->setDiffuse(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * Material_setSpecular( BPy_Material *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: Material_setSpecular" << endl; + Py_RETURN_NONE; + } + + self->m->setSpecular(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * Material_setAmbient( BPy_Material *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: Material_setAmbient" << endl; + Py_RETURN_NONE; + } + + self->m->setAmbient(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * Material_setEmission( BPy_Material *self, PyObject *args ) { + float f1, f2, f3, f4; + + if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { + cout << "ERROR: Material_setEmission" << endl; + Py_RETURN_NONE; + } + + self->m->setEmission(f1, f2, f3, f4); + + Py_RETURN_NONE; +} + +PyObject * Material_setShininess( BPy_Material *self, PyObject *args ) { + float f; + + if(!( PyArg_ParseTuple(args, "f", &f) )) { + cout << "ERROR: Material_setShininess" << endl; + Py_RETURN_NONE; + } + + self->m->setShininess(f); + + Py_RETURN_NONE; +} + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h b/source/blender/freestyle/intern/python/BPy_Material.h similarity index 55% rename from source/blender/freestyle/intern/python/BPy_FrsMaterial.h rename to source/blender/freestyle/intern/python/BPy_Material.h index cb1aa20bb21..e1c31864b63 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h +++ b/source/blender/freestyle/intern/python/BPy_Material.h @@ -11,19 +11,19 @@ extern "C" { #include -extern PyTypeObject FrsMaterial_Type; +extern PyTypeObject Material_Type; -#define BPy_FrsMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsMaterial_Type) ) +#define BPy_Material_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Material_Type) ) -/*---------------------------Python BPy_FrsMaterial structure definition----------*/ +/*---------------------------Python BPy_Material structure definition----------*/ typedef struct { PyObject_HEAD Material *m; -} BPy_FrsMaterial; +} BPy_Material; -/*---------------------------Python BPy_FrsMaterial visible prototypes-----------*/ +/*---------------------------Python BPy_Material visible prototypes-----------*/ -PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ); +PyMODINIT_FUNC Material_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index 22a4dbc378e..8911cc7f290 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -175,12 +175,12 @@ PyObject * FEdgeSharp_bMaterialIndex( BPy_FEdgeSharp *self ) { PyObject * FEdgeSharp_aMaterial( BPy_FEdgeSharp *self ) { Material m( self->fes->aMaterial() ); - return BPy_FrsMaterial_from_Material(m); + return BPy_Material_from_Material(m); } PyObject * FEdgeSharp_bMaterial( BPy_FEdgeSharp *self ) { Material m( self->fes->aMaterial() ); - return BPy_FrsMaterial_from_Material(m); + return BPy_Material_from_Material(m); } PyObject * FEdgeSharp_setNormalA( BPy_FEdgeSharp *self, PyObject *args ) { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index 6a11b6c1e98..52b501e0746 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -158,7 +158,7 @@ PyObject * FEdgeSmooth_materialIndex( BPy_FEdgeSmooth *self ) { PyObject * FEdgeSmooth_material( BPy_FEdgeSmooth *self ) { Material m( self->fes->material() ); - return BPy_FrsMaterial_from_Material(m); + return BPy_Material_from_Material(m); } PyObject * FEdgeSmooth_setNormal( BPy_FEdgeSmooth *self, PyObject *args ) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index 733acce6ab8..f524eb25352 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -165,7 +165,7 @@ PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, } Material m( self->uf0D_material->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); - return BPy_FrsMaterial_from_Material( m ); + return BPy_Material_from_Material( m ); } From 149f3688a4663dbaf890f6f5e5a41c35ce6d5e56 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 1 Aug 2008 02:15:25 +0000 Subject: [PATCH 427/430] soc-2008-mxcurioni: moved Curve to FrsCurve, fixed bugs with some style modules having with strokes without a representation and iterators not being correctly routed. For example, the cartoon style module should work now. --- .../freestyle/intern/python/BPy_Convert.cpp | 35 ++++--- .../freestyle/intern/python/BPy_Freestyle.cpp | 4 +- .../{BPy_Noise.cpp => BPy_FrsNoise.cpp} | 94 +++++++++---------- .../freestyle/intern/python/BPy_FrsNoise.h | 36 +++++++ .../intern/python/BPy_Interface1D.cpp | 8 +- .../freestyle/intern/python/BPy_Iterator.cpp | 3 - .../freestyle/intern/python/BPy_Noise.h | 36 ------- .../freestyle/intern/python/Director.cpp | 23 ++++- .../freestyle/intern/python/Director.h | 7 +- .../{BPy_Curve.cpp => BPy_FrsCurve.cpp} | 82 ++++++++-------- .../{BPy_Curve.h => BPy_FrsCurve.h} | 14 +-- .../python/Interface1D/Curve/BPy_Chain.cpp | 2 +- .../python/Interface1D/Curve/BPy_Chain.h | 4 +- .../python/Iterator/BPy_AdjacencyIterator.cpp | 1 + .../Iterator/BPy_ChainPredicateIterator.cpp | 1 + .../Iterator/BPy_Interface0DIterator.cpp | 2 +- .../python/Iterator/BPy_ViewEdgeIterator.cpp | 2 +- 17 files changed, 195 insertions(+), 159 deletions(-) rename source/blender/freestyle/intern/python/{BPy_Noise.cpp => BPy_FrsNoise.cpp} (60%) create mode 100644 source/blender/freestyle/intern/python/BPy_FrsNoise.h delete mode 100644 source/blender/freestyle/intern/python/BPy_Noise.h rename source/blender/freestyle/intern/python/Interface1D/{BPy_Curve.cpp => BPy_FrsCurve.cpp} (60%) rename source/blender/freestyle/intern/python/Interface1D/{BPy_Curve.h => BPy_FrsCurve.h} (53%) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 13e4f332c32..53a4e171e74 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -30,6 +30,8 @@ #include "Iterator/BPy_ViewEdgeIterator.h" #include "Iterator/BPy_orientedViewEdgeIterator.h" +#include "../stroke/StrokeRep.h" + #ifdef __cplusplus extern "C" { #endif @@ -242,6 +244,7 @@ Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) { PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it ) { PyObject *py_a_it = AdjacencyIterator_Type.tp_new( &AdjacencyIterator_Type, 0, 0 ); ((BPy_AdjacencyIterator *) py_a_it)->a_it = new AdjacencyIterator( a_it ); + ((BPy_AdjacencyIterator *) py_a_it)->py_it.it = ((BPy_AdjacencyIterator *) py_a_it)->a_it; return py_a_it; } @@ -249,62 +252,72 @@ PyObject * BPy_AdjacencyIterator_from_AdjacencyIterator( AdjacencyIterator& a_it PyObject * BPy_Interface0DIterator_from_Interface0DIterator( Interface0DIterator& if0D_it ) { PyObject *py_if0D_it = Interface0DIterator_Type.tp_new( &Interface0DIterator_Type, 0, 0 ); ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it = new Interface0DIterator( if0D_it ); + ((BPy_Interface0DIterator *) py_if0D_it)->py_it.it = ((BPy_Interface0DIterator *) py_if0D_it)->if0D_it; return py_if0D_it; } PyObject * BPy_CurvePointIterator_from_CurvePointIterator( CurveInternal::CurvePointIterator& cp_it ) { PyObject *py_cp_it = CurvePointIterator_Type.tp_new( &CurvePointIterator_Type, 0, 0 ); - ((BPy_CurvePointIterator*) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it ); + ((BPy_CurvePointIterator *) py_cp_it)->cp_it = new CurveInternal::CurvePointIterator( cp_it ); + ((BPy_CurvePointIterator *) py_cp_it)->py_it.it = ((BPy_CurvePointIterator *) py_cp_it)->cp_it; return py_cp_it; } PyObject * BPy_StrokeVertexIterator_from_StrokeVertexIterator( StrokeInternal::StrokeVertexIterator& sv_it) { PyObject *py_sv_it = StrokeVertexIterator_Type.tp_new( &StrokeVertexIterator_Type, 0, 0 ); - ((BPy_StrokeVertexIterator*) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it ); + ((BPy_StrokeVertexIterator *) py_sv_it)->sv_it = new StrokeInternal::StrokeVertexIterator( sv_it ); + ((BPy_StrokeVertexIterator *) py_sv_it)->py_it.it = ((BPy_StrokeVertexIterator *) py_sv_it)->sv_it; return py_sv_it; } PyObject * BPy_SVertexIterator_from_SVertexIterator( ViewEdgeInternal::SVertexIterator& sv_it ) { PyObject *py_sv_it = SVertexIterator_Type.tp_new( &SVertexIterator_Type, 0, 0 ); - ((BPy_SVertexIterator*) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it ); - + ((BPy_SVertexIterator *) py_sv_it)->sv_it = new ViewEdgeInternal::SVertexIterator( sv_it ); + ((BPy_SVertexIterator *) py_sv_it)->py_it.it = ((BPy_SVertexIterator *) py_sv_it)->sv_it; + return py_sv_it; } + PyObject * BPy_orientedViewEdgeIterator_from_orientedViewEdgeIterator( ViewVertexInternal::orientedViewEdgeIterator& ove_it ) { PyObject *py_ove_it = orientedViewEdgeIterator_Type.tp_new( &orientedViewEdgeIterator_Type, 0, 0 ); ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it = new ViewVertexInternal::orientedViewEdgeIterator( ove_it ); - + ((BPy_orientedViewEdgeIterator *) py_ove_it)->py_it.it = ((BPy_orientedViewEdgeIterator *) py_ove_it)->ove_it; + return py_ove_it; } PyObject * BPy_ViewEdgeIterator_from_ViewEdgeIterator( ViewEdgeInternal::ViewEdgeIterator& ve_it ) { PyObject *py_ve_it = ViewEdgeIterator_Type.tp_new( &ViewEdgeIterator_Type, 0, 0 ); - ((BPy_ViewEdgeIterator*) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it ); - + ((BPy_ViewEdgeIterator *) py_ve_it)->ve_it = new ViewEdgeInternal::ViewEdgeIterator( ve_it ); + ((BPy_ViewEdgeIterator *) py_ve_it)->py_it.it = ((BPy_ViewEdgeIterator *) py_ve_it)->ve_it; + return py_ve_it; } PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ) { PyObject *py_c_it = ChainingIterator_Type.tp_new( &ChainingIterator_Type, 0, 0 ); - ((BPy_ChainingIterator*) py_c_it)->c_it = new ChainingIterator( c_it ); - + ((BPy_ChainingIterator *) py_c_it)->c_it = new ChainingIterator( c_it ); + ((BPy_ChainingIterator *) py_c_it)->py_ve_it.py_it.it = ((BPy_ChainingIterator *) py_c_it)->c_it; + return py_c_it; } PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ) { PyObject *py_cp_it = ChainPredicateIterator_Type.tp_new( &ChainPredicateIterator_Type, 0, 0 ); - ((BPy_ChainPredicateIterator*) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it ); + ((BPy_ChainPredicateIterator *) py_cp_it)->cp_it = new ChainPredicateIterator( cp_it ); + ((BPy_ChainPredicateIterator *) py_cp_it)->py_c_it.py_ve_it.py_it.it = ((BPy_ChainPredicateIterator *) py_cp_it)->cp_it; return py_cp_it; } PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ) { PyObject *py_cs_it = ChainSilhouetteIterator_Type.tp_new( &ChainSilhouetteIterator_Type, 0, 0 ); - ((BPy_ChainSilhouetteIterator*) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it ); + ((BPy_ChainSilhouetteIterator *) py_cs_it)->cs_it = new ChainSilhouetteIterator( cs_it ); + ((BPy_ChainSilhouetteIterator *) py_cs_it)->py_c_it.py_ve_it.py_it.it = ((BPy_ChainSilhouetteIterator *) py_cs_it)->cs_it; return py_cs_it; } diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 6348d30577c..b4170dc4f92 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -4,6 +4,7 @@ #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" #include "BPy_Material.h" +#include "BPy_FrsNoise.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -12,7 +13,6 @@ #include "BPy_MediumType.h" #include "BPy_Nature.h" #include "BPy_Operators.h" -#include "BPy_Noise.h" #include "BPy_SShape.h" #include "BPy_StrokeAttribute.h" #include "BPy_StrokeShader.h" @@ -148,13 +148,13 @@ PyObject *Freestyle_Init( void ) BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); Material_Init( module ); + FrsNoise_Init( module ); Id_Init( module ); IntegrationType_Init( module ); Interface0D_Init( module ); Interface1D_Init( module ); Iterator_Init( module ); Operators_Init( module ); - Noise_Init( module ); SShape_Init( module ); StrokeAttribute_Init( module ); StrokeShader_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_Noise.cpp b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp similarity index 60% rename from source/blender/freestyle/intern/python/BPy_Noise.cpp rename to source/blender/freestyle/intern/python/BPy_FrsNoise.cpp index f8d5d6b066d..a9989b13c6d 100644 --- a/source/blender/freestyle/intern/python/BPy_Noise.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.cpp @@ -1,4 +1,4 @@ -#include "BPy_Noise.h" +#include "BPy_FrsNoise.h" #ifdef __cplusplus extern "C" { @@ -6,45 +6,45 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for Noise instance -----------*/ -static int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds); -static void Noise___dealloc__(BPy_Noise *self); -static PyObject * Noise___repr__(BPy_Noise *self); +/*--------------- Python API function prototypes for FrsNoise instance -----------*/ +static int FrsNoise___init__(BPy_FrsNoise *self, PyObject *args, PyObject *kwds); +static void FrsNoise___dealloc__(BPy_FrsNoise *self); +static PyObject * FrsNoise___repr__(BPy_FrsNoise *self); -static PyObject * Noise_turbulence1( BPy_Noise *self, PyObject *args); -static PyObject * Noise_turbulence2( BPy_Noise *self, PyObject *args); -static PyObject * Noise_turbulence3( BPy_Noise *self, PyObject *args); -static PyObject * Noise_smoothNoise1( BPy_Noise *self, PyObject *args); -static PyObject * Noise_smoothNoise2( BPy_Noise *self, PyObject *args); -static PyObject * Noise_smoothNoise3( BPy_Noise *self, PyObject *args); +static PyObject * FrsNoise_turbulence1( BPy_FrsNoise *self, PyObject *args); +static PyObject * FrsNoise_turbulence2( BPy_FrsNoise *self, PyObject *args); +static PyObject * FrsNoise_turbulence3( BPy_FrsNoise *self, PyObject *args); +static PyObject * FrsNoise_smoothNoise1( BPy_FrsNoise *self, PyObject *args); +static PyObject * FrsNoise_smoothNoise2( BPy_FrsNoise *self, PyObject *args); +static PyObject * FrsNoise_smoothNoise3( BPy_FrsNoise *self, PyObject *args); -/*----------------------Noise instance definitions ----------------------------*/ -static PyMethodDef BPy_Noise_methods[] = { - {"turbulence1", ( PyCFunction ) Noise_turbulence1, METH_VARARGS, "(float arg, float freq, float amp, unsigned oct=4))Returns a noise value for a 1D element"}, - {"turbulence2", ( PyCFunction ) Noise_turbulence2, METH_VARARGS, "([x, y], float freq, float amp, unsigned oct=4)))Returns a noise value for a 2D element"}, - {"turbulence3", ( PyCFunction ) Noise_turbulence3, METH_VARARGS, "([x, y, z], float freq, float amp, unsigned oct=4)))Returns a noise value for a 3D element"}, - {"smoothNoise1", ( PyCFunction ) Noise_smoothNoise1, METH_VARARGS, "(float arg))Returns a smooth noise value for a 1D element "}, - {"smoothNoise2", ( PyCFunction ) Noise_smoothNoise2, METH_VARARGS, "([x, y]))Returns a smooth noise value for a 2D element "}, - {"smoothNoise3", ( PyCFunction ) Noise_smoothNoise3, METH_VARARGS, "([x, y, z))Returns a smooth noise value for a 3D element "}, +/*----------------------FrsNoise instance definitions ----------------------------*/ +static PyMethodDef BPy_FrsNoise_methods[] = { + {"turbulence1", ( PyCFunction ) FrsNoise_turbulence1, METH_VARARGS, "(float arg, float freq, float amp, unsigned oct=4))Returns a noise value for a 1D element"}, + {"turbulence2", ( PyCFunction ) FrsNoise_turbulence2, METH_VARARGS, "([x, y], float freq, float amp, unsigned oct=4)))Returns a noise value for a 2D element"}, + {"turbulence3", ( PyCFunction ) FrsNoise_turbulence3, METH_VARARGS, "([x, y, z], float freq, float amp, unsigned oct=4)))Returns a noise value for a 3D element"}, + {"smoothNoise1", ( PyCFunction ) FrsNoise_smoothNoise1, METH_VARARGS, "(float arg))Returns a smooth noise value for a 1D element "}, + {"smoothNoise2", ( PyCFunction ) FrsNoise_smoothNoise2, METH_VARARGS, "([x, y]))Returns a smooth noise value for a 2D element "}, + {"smoothNoise3", ( PyCFunction ) FrsNoise_smoothNoise3, METH_VARARGS, "([x, y, z))Returns a smooth noise value for a 3D element "}, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Noise type definition ------------------------------*/ +/*-----------------------BPy_FrsNoise type definition ------------------------------*/ -PyTypeObject Noise_Type = { +PyTypeObject FrsNoise_Type = { PyObject_HEAD_INIT( NULL ) 0, /* ob_size */ - "Noise", /* tp_name */ - sizeof( BPy_Noise ), /* tp_basicsize */ + "FrsNoise", /* tp_name */ + sizeof( BPy_FrsNoise ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - (destructor)Noise___dealloc__, /* tp_dealloc */ + (destructor)FrsNoise___dealloc__, /* tp_dealloc */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ - (reprfunc)Noise___repr__, /* tp_repr */ + (reprfunc)FrsNoise___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -87,7 +87,7 @@ PyTypeObject Noise_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - BPy_Noise_methods, /* struct PyMethodDef *tp_methods; */ + BPy_FrsNoise_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ @@ -95,7 +95,7 @@ PyTypeObject Noise_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - (initproc)Noise___init__, /* initproc tp_init; */ + (initproc)FrsNoise___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ PyType_GenericNew, /* newfunc tp_new; */ @@ -115,58 +115,58 @@ PyTypeObject Noise_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyMODINIT_FUNC Noise_Init( PyObject *module ) +PyMODINIT_FUNC FrsNoise_Init( PyObject *module ) { if( module == NULL ) return; - if( PyType_Ready( &Noise_Type ) < 0 ) + if( PyType_Ready( &FrsNoise_Type ) < 0 ) return; - Py_INCREF( &Noise_Type ); - PyModule_AddObject(module, "Noise", (PyObject *)&Noise_Type); + Py_INCREF( &FrsNoise_Type ); + PyModule_AddObject(module, "FrsNoise", (PyObject *)&FrsNoise_Type); } //------------------------INSTANCE METHODS ---------------------------------- -int Noise___init__(BPy_Noise *self, PyObject *args, PyObject *kwds) +int FrsNoise___init__(BPy_FrsNoise *self, PyObject *args, PyObject *kwds) { self->n = new Noise(); return 0; } -void Noise___dealloc__(BPy_Noise* self) +void FrsNoise___dealloc__(BPy_FrsNoise* self) { delete self->n; self->ob_type->tp_free((PyObject*)self); } -PyObject * Noise___repr__(BPy_Noise* self) +PyObject * FrsNoise___repr__(BPy_FrsNoise* self) { - return PyString_FromFormat("Noise - address: %p", self->n ); + return PyString_FromFormat("FrsNoise - address: %p", self->n ); } -PyObject * Noise_turbulence1( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_turbulence1( BPy_FrsNoise *self , PyObject *args) { float f1, f2, f3; unsigned int i; if(!( PyArg_ParseTuple(args, "fff|I", &f1, &f2, &f3, &i) )) { - cout << "ERROR: Noise_turbulence1" << endl; + cout << "ERROR: FrsNoise_turbulence1" << endl; Py_RETURN_NONE; } return PyFloat_FromDouble( self->n->turbulence1(f1, f2, f3, i) ); } -PyObject * Noise_turbulence2( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_turbulence2( BPy_FrsNoise *self , PyObject *args) { PyObject *obj1; float f2, f3; unsigned int i; if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 1 )) { - cout << "ERROR: Noise_turbulence2" << endl; + cout << "ERROR: FrsNoise_turbulence2" << endl; Py_RETURN_NONE; } @@ -175,13 +175,13 @@ PyObject * Noise_turbulence2( BPy_Noise *self , PyObject *args) { return PyFloat_FromDouble( self->n->turbulence2(v, f2, f3, i) ); } -PyObject * Noise_turbulence3( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_turbulence3( BPy_FrsNoise *self , PyObject *args) { PyObject *obj1; float f2, f3; unsigned int i; if(!( PyArg_ParseTuple(args, "Off|I", &obj1, &f2, &f3, &i) && PyList_Check(obj1) && PyList_Size(obj1) > 2 )) { - cout << "ERROR: Noise_turbulence3" << endl; + cout << "ERROR: FrsNoise_turbulence3" << endl; Py_RETURN_NONE; } @@ -192,22 +192,22 @@ PyObject * Noise_turbulence3( BPy_Noise *self , PyObject *args) { return PyFloat_FromDouble( self->n->turbulence3(v, f2, f3, i) ); } -PyObject * Noise_smoothNoise1( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_smoothNoise1( BPy_FrsNoise *self , PyObject *args) { float f; if(!( PyArg_ParseTuple(args, "f", &f) )) { - cout << "ERROR: Noise_smoothNoise1" << endl; + cout << "ERROR: FrsNoise_smoothNoise1" << endl; Py_RETURN_NONE; } return PyFloat_FromDouble( self->n->smoothNoise1(f) ); } -PyObject * Noise_smoothNoise2( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_smoothNoise2( BPy_FrsNoise *self , PyObject *args) { PyObject *obj; if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 1 )) { - cout << "ERROR: Noise_smoothNoise2" << endl; + cout << "ERROR: FrsNoise_smoothNoise2" << endl; Py_RETURN_NONE; } @@ -216,11 +216,11 @@ PyObject * Noise_smoothNoise2( BPy_Noise *self , PyObject *args) { return PyFloat_FromDouble( self->n->smoothNoise2(v) ); } -PyObject * Noise_smoothNoise3( BPy_Noise *self , PyObject *args) { +PyObject * FrsNoise_smoothNoise3( BPy_FrsNoise *self , PyObject *args) { PyObject *obj; if(!( PyArg_ParseTuple(args, "O", &obj) && PyList_Check(obj) && PyList_Size(obj) > 2 )) { - cout << "ERROR: Noise_smoothNoise3" << endl; + cout << "ERROR: FrsNoise_smoothNoise3" << endl; Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/BPy_FrsNoise.h b/source/blender/freestyle/intern/python/BPy_FrsNoise.h new file mode 100644 index 00000000000..d0215fda9af --- /dev/null +++ b/source/blender/freestyle/intern/python/BPy_FrsNoise.h @@ -0,0 +1,36 @@ +#ifndef FREESTYLE_PYTHON_FRSNOISE_H +#define FREESTYLE_PYTHON_FRSNOISE_H + +#include "../geometry/Noise.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/////////////////////////////////////////////////////////////////////////////////////////// + +#include + +extern PyTypeObject FrsNoise_Type; + +#define BPy_FrsNoise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsNoise_Type) ) + +/*---------------------------Python BPy_FrsNoise structure definition----------*/ +typedef struct { + PyObject_HEAD + Noise *n; +} BPy_FrsNoise; + +/*---------------------------Python BPy_FrsNoise visible prototypes-----------*/ + +PyMODINIT_FUNC FrsNoise_Init( PyObject *module ); + + +/////////////////////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +} +#endif + + +#endif /* FREESTYLE_PYTHON_FRSNOISE_H */ diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 509dfb23894..3db9531da4b 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -1,7 +1,7 @@ #include "BPy_Interface1D.h" #include "BPy_Convert.h" -#include "Interface1D/BPy_Curve.h" +#include "Interface1D/BPy_FrsCurve.h" #include "Interface1D/Curve/BPy_Chain.h" #include "Interface1D/BPy_FEdge.h" #include "Interface1D/FEdge/BPy_FEdgeSharp.h" @@ -142,10 +142,10 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) Py_INCREF( &Interface1D_Type ); PyModule_AddObject(module, "Interface1D", (PyObject *)&Interface1D_Type); - if( PyType_Ready( &Curve_Type ) < 0 ) + if( PyType_Ready( &FrsCurve_Type ) < 0 ) return; - Py_INCREF( &Curve_Type ); - PyModule_AddObject(module, "Curve", (PyObject *)&Curve_Type); + Py_INCREF( &FrsCurve_Type ); + PyModule_AddObject(module, "FrsCurve", (PyObject *)&FrsCurve_Type); if( PyType_Ready( &Chain_Type ) < 0 ) return; diff --git a/source/blender/freestyle/intern/python/BPy_Iterator.cpp b/source/blender/freestyle/intern/python/BPy_Iterator.cpp index cf6d8ed4877..23dd68e0aa8 100644 --- a/source/blender/freestyle/intern/python/BPy_Iterator.cpp +++ b/source/blender/freestyle/intern/python/BPy_Iterator.cpp @@ -227,14 +227,11 @@ PyObject * Iterator_isEnd(BPy_Iterator* self) { return PyBool_from_bool( self->it->isEnd() ); } -//%rename(getObject) Interface0DIterator::operator* PyObject * Iterator_getObject(BPy_Iterator* self) { return PyBool_from_bool( self->it->isEnd() ); } - - /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/BPy_Noise.h b/source/blender/freestyle/intern/python/BPy_Noise.h deleted file mode 100644 index 5dc8a1a4bd1..00000000000 --- a/source/blender/freestyle/intern/python/BPy_Noise.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef FREESTYLE_PYTHON_NOISE_H -#define FREESTYLE_PYTHON_NOISE_H - -#include "../geometry/Noise.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/////////////////////////////////////////////////////////////////////////////////////////// - -#include - -extern PyTypeObject Noise_Type; - -#define BPy_Noise_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Noise_Type) ) - -/*---------------------------Python BPy_Noise structure definition----------*/ -typedef struct { - PyObject_HEAD - Noise *n; -} BPy_Noise; - -/*---------------------------Python BPy_Noise visible prototypes-----------*/ - -PyMODINIT_FUNC Noise_Init( PyObject *module ); - - -/////////////////////////////////////////////////////////////////////////////////////////// - -#ifdef __cplusplus -} -#endif - - -#endif /* FREESTYLE_PYTHON_NOISE_H */ diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index d3aff4a65f2..42677919ca5 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -61,7 +61,6 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera return ((BPy_ViewEdge *) result)->ve; } - // BPy_UnaryFunction{0D,1D}: __call__ // BPy_UnaryFunction0DDouble // BPy_UnaryFunction0DEdgeNature @@ -83,4 +82,26 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera // BPy_UnaryFunction1DVectorViewShape // BPy_UnaryFunction1DVoid +// BPy_Iterator: increment, decrement, isBegin, isEnd +void Director_BPy_Iterator_increment( PyObject *obj ) { + PyObject_CallMethod( obj, "increment", "", 0 ); +} + +void Director_BPy_Iterator_decrement( PyObject *obj ) { + PyObject_CallMethod( obj, "decrement", "", 0 ); +} + +bool Director_BPy_Iterator_isBegin( PyObject *obj ) { + PyObject *result = PyObject_CallMethod( obj, "isBegin", "", 0 ); + + return bool_from_PyBool(result); +} + +bool Director_BPy_Iterator_isEnd( PyObject *obj ) { + PyObject *result = PyObject_CallMethod( obj, "isEnd", "", 0 ); + + return bool_from_PyBool(result); +} + + diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h index 95ab16047a8..2a67be237f5 100644 --- a/source/blender/freestyle/intern/python/Director.h +++ b/source/blender/freestyle/intern/python/Director.h @@ -59,7 +59,10 @@ double Director_BPy_UnaryFunction0DDouble___call__( PyObject *obj, Interface0DIt // BPy_UnaryFunction1DVoid void Director_BPy_UnaryFunction1DVoid___call__( PyObject *obj, Interface1D& if1D); - - +// BPy_Iterator: increment, decrement, isBegin, isEnd +void Director_BPy_Iterator_increment( PyObject *obj ); +void Director_BPy_Iterator_decrement( PyObject *obj ); +bool Director_BPy_Iterator_isBegin( PyObject *obj ); +bool Director_BPy_Iterator_isEnd( PyObject *obj ); #endif // FREESTYLE_PYTHON_DIRECTOR diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp similarity index 60% rename from source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp rename to source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp index b0f043a6525..1506092511a 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp @@ -1,4 +1,4 @@ -#include "BPy_Curve.h" +#include "BPy_FrsCurve.h" #include "../BPy_Convert.h" #include "../BPy_Id.h" @@ -11,38 +11,38 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for Curve instance -----------*/ -static int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds); -static PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ); -static PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ); -static PyObject * Curve_empty( BPy_Curve *self ); -static PyObject * Curve_nSegments( BPy_Curve *self ); +/*--------------- Python API function prototypes for FrsCurve instance -----------*/ +static int FrsCurve___init__(BPy_FrsCurve *self, PyObject *args, PyObject *kwds); +static PyObject * FrsCurve_push_vertex_back( BPy_FrsCurve *self, PyObject *args ); +static PyObject * FrsCurve_push_vertex_front( BPy_FrsCurve *self, PyObject *args ); +static PyObject * FrsCurve_empty( BPy_FrsCurve *self ); +static PyObject * FrsCurve_nSegments( BPy_FrsCurve *self ); // point_iterator points_begin (float step=0) -static PyObject * Curve_verticesBegin( BPy_Curve *self ); -static PyObject * Curve_verticesEnd( BPy_Curve *self ); -static PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ); -static PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args ); +static PyObject * FrsCurve_verticesBegin( BPy_FrsCurve *self ); +static PyObject * FrsCurve_verticesEnd( BPy_FrsCurve *self ); +static PyObject * FrsCurve_pointsBegin( BPy_FrsCurve *self, PyObject *args ); +static PyObject * FrsCurve_pointsEnd( BPy_FrsCurve *self, PyObject *args ); -/*----------------------Curve instance definitions ----------------------------*/ -static PyMethodDef BPy_Curve_methods[] = { - {"push_vertex_back", ( PyCFunction ) Curve_push_vertex_back, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the front of the Curve."}, - {"push_vertex_front", ( PyCFunction ) Curve_push_vertex_front, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the end of the Curve."}, - {"empty", ( PyCFunction ) Curve_empty, METH_NOARGS, "() Returns true is the Curve doesn't have any Vertex yet."}, - {"nSegments", ( PyCFunction ) Curve_nSegments, METH_NOARGS, "() Returns the number of segments in the oplyline constituing the Curve."}, - {"verticesBegin", ( PyCFunction ) Curve_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve."}, - {"verticesEnd", ( PyCFunction ) Curve_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve."}, - {"pointsBegin", ( PyCFunction ) Curve_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, - {"pointsEnd", ( PyCFunction ) Curve_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, +/*----------------------FrsCurve instance definitions ----------------------------*/ +static PyMethodDef BPy_FrsCurve_methods[] = { + {"push_vertex_back", ( PyCFunction ) FrsCurve_push_vertex_back, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the front of the Curve."}, + {"push_vertex_front", ( PyCFunction ) FrsCurve_push_vertex_front, METH_VARARGS, "(CurvePoint cp | SVertex sv) Adds a single vertex at the end of the Curve."}, + {"empty", ( PyCFunction ) FrsCurve_empty, METH_NOARGS, "() Returns true is the Curve doesn't have any Vertex yet."}, + {"nSegments", ( PyCFunction ) FrsCurve_nSegments, METH_NOARGS, "() Returns the number of segments in the oplyline constituing the Curve."}, + {"verticesBegin", ( PyCFunction ) FrsCurve_verticesBegin, METH_NOARGS, "() Returns an Interface0DIterator pointing onto the first vertex of the Curve and that can iterate over the vertices of the Curve."}, + {"verticesEnd", ( PyCFunction ) FrsCurve_verticesEnd, METH_NOARGS, "() Returns an Interface0DIterator pointing after the last vertex of the Curve and that can iterate over the vertices of the Curve."}, + {"pointsBegin", ( PyCFunction ) FrsCurve_pointsBegin, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing onto the first point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, + {"pointsEnd", ( PyCFunction ) FrsCurve_pointsEnd, METH_VARARGS, "(float t=0) Returns an Interface0DIterator pointing after the last point of the Curve and that can iterate over the points of the Curve at any resolution t. At each iteration a virtual temporary CurvePoint is created."}, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Curve type definition ------------------------------*/ +/*-----------------------BPy_FrsCurve type definition ------------------------------*/ -PyTypeObject Curve_Type = { +PyTypeObject FrsCurve_Type = { PyObject_HEAD_INIT( NULL ) 0, /* ob_size */ - "Curve", /* tp_name */ - sizeof( BPy_Curve ), /* tp_basicsize */ + "FrsCurve", /* tp_name */ + sizeof( BPy_FrsCurve ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ @@ -94,7 +94,7 @@ PyTypeObject Curve_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - BPy_Curve_methods, /* struct PyMethodDef *tp_methods; */ + BPy_FrsCurve_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ &Interface1D_Type, /* struct _typeobject *tp_base; */ @@ -102,7 +102,7 @@ PyTypeObject Curve_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - (initproc)Curve___init__, /* initproc tp_init; */ + (initproc)FrsCurve___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ NULL, /* newfunc tp_new; */ @@ -126,7 +126,7 @@ PyTypeObject Curve_Type = { //------------------------INSTANCE METHODS ---------------------------------- -int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds) +int FrsCurve___init__(BPy_FrsCurve *self, PyObject *args, PyObject *kwds) { PyObject *obj = 0; @@ -137,9 +137,9 @@ int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds) if( !obj ){ self->c = new Curve(); - } else if( BPy_Curve_Check(obj) ) { - if( ((BPy_Curve *) obj)->c ) - self->c = new Curve(*( ((BPy_Curve *) obj)->c )); + } else if( BPy_FrsCurve_Check(obj) ) { + if( ((BPy_FrsCurve *) obj)->c ) + self->c = new Curve(*( ((BPy_FrsCurve *) obj)->c )); else return -1; @@ -159,11 +159,11 @@ int Curve___init__(BPy_Curve *self, PyObject *args, PyObject *kwds) } -PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ) { +PyObject * FrsCurve_push_vertex_back( BPy_FrsCurve *self, PyObject *args ) { PyObject *obj; if(!( PyArg_ParseTuple(args, "O", &obj) )) { - cout << "ERROR: Curve_push_vertex_back" << endl; + cout << "ERROR: FrsCurve_push_vertex_back" << endl; Py_RETURN_NONE; } @@ -176,11 +176,11 @@ PyObject * Curve_push_vertex_back( BPy_Curve *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ) { +PyObject * FrsCurve_push_vertex_front( BPy_FrsCurve *self, PyObject *args ) { PyObject *obj; if(!( PyArg_ParseTuple(args, "O", &obj) )) { - cout << "ERROR: Curve_push_vertex_front" << endl; + cout << "ERROR: FrsCurve_push_vertex_front" << endl; Py_RETURN_NONE; } @@ -193,11 +193,11 @@ PyObject * Curve_push_vertex_front( BPy_Curve *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Curve_empty( BPy_Curve *self ) { +PyObject * FrsCurve_empty( BPy_FrsCurve *self ) { return PyBool_from_bool( self->c->empty() ); } -PyObject * Curve_nSegments( BPy_Curve *self ) { +PyObject * FrsCurve_nSegments( BPy_FrsCurve *self ) { return PyInt_FromLong( self->c->nSegments() ); } @@ -205,18 +205,18 @@ PyObject * Curve_nSegments( BPy_Curve *self ) { // not implemented -PyObject * Curve_verticesBegin( BPy_Curve *self ) { +PyObject * FrsCurve_verticesBegin( BPy_FrsCurve *self ) { Interface0DIterator if0D_it( self->c->verticesBegin() ); return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } -PyObject * Curve_verticesEnd( BPy_Curve *self ) { +PyObject * FrsCurve_verticesEnd( BPy_FrsCurve *self ) { Interface0DIterator if0D_it( self->c->verticesEnd() ); return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } -PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ) { +PyObject * FrsCurve_pointsBegin( BPy_FrsCurve *self, PyObject *args ) { float f = 0; if(!( PyArg_ParseTuple(args, "|f", &f) )) { @@ -228,7 +228,7 @@ PyObject * Curve_pointsBegin( BPy_Curve *self, PyObject *args ) { return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); } -PyObject * Curve_pointsEnd( BPy_Curve *self, PyObject *args ) { +PyObject * FrsCurve_pointsEnd( BPy_FrsCurve *self, PyObject *args ) { float f = 0; if(!( PyArg_ParseTuple(args, "|f", &f) )) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h similarity index 53% rename from source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h rename to source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h index fd29a7bf4f1..0829cf0ebf5 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Curve.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h @@ -1,5 +1,5 @@ -#ifndef FREESTYLE_PYTHON_CURVE_H -#define FREESTYLE_PYTHON_CURVE_H +#ifndef FREESTYLE_PYTHON_FRSCURVE_H +#define FREESTYLE_PYTHON_FRSCURVE_H #include "../BPy_Interface1D.h" #include "../../stroke/Curve.h" @@ -12,15 +12,15 @@ extern "C" { #include -extern PyTypeObject Curve_Type; +extern PyTypeObject FrsCurve_Type; -#define BPy_Curve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Curve_Type) ) +#define BPy_FrsCurve_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsCurve_Type) ) -/*---------------------------Python BPy_Curve structure definition----------*/ +/*---------------------------Python BPy_FrsCurve structure definition----------*/ typedef struct { BPy_Interface1D py_if1D; Curve *c; -} BPy_Curve; +} BPy_FrsCurve; /////////////////////////////////////////////////////////////////////////////////////////// @@ -28,4 +28,4 @@ typedef struct { } #endif -#endif /* FREESTYLE_PYTHON_CURVE_H */ +#endif /* FREESTYLE_PYTHON_FRSCURVE_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp index 8b6240986b9..7116c574c76 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp @@ -84,7 +84,7 @@ PyTypeObject Chain_Type = { BPy_Chain_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ - &Curve_Type, /* struct _typeobject *tp_base; */ + &FrsCurve_Type, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h index ade70c47f25..19f325ef513 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h @@ -1,7 +1,7 @@ #ifndef FREESTYLE_PYTHON_CHAIN_H #define FREESTYLE_PYTHON_CHAIN_H -#include "../BPy_Curve.h" +#include "../BPy_FrsCurve.h" #include "../../../stroke/Chain.h" #ifdef __cplusplus @@ -18,7 +18,7 @@ extern PyTypeObject Chain_Type; /*---------------------------Python BPy_Chain structure definition----------*/ typedef struct { - BPy_Curve py_c; + BPy_FrsCurve py_c; Chain *c; } BPy_Chain; diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp index 13c8382c3a2..139db9dd73f 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp @@ -134,6 +134,7 @@ int AdjacencyIterator___init__(BPy_AdjacencyIterator *self, PyObject *args ) } self->py_it.it = self->a_it; + return 0; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp index c5ff61e239f..3d41e4b66c1 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ChainPredicateIterator.cpp @@ -142,6 +142,7 @@ int ChainPredicateIterator___init__(BPy_ChainPredicateIterator *self, PyObject * self->py_c_it.py_ve_it.ve_it = self->cp_it; self->py_c_it.py_ve_it.py_it.it = self->cp_it; + return 0; } diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp index 92c3a7dfc38..1b3a37b5518 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp @@ -123,8 +123,8 @@ int Interface0DIterator___init__(BPy_Interface0DIterator *self, PyObject *args ) self->if0D_it = new Interface0DIterator(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); self->py_it.it = self->if0D_it; + return 0; - } PyObject * Interface0DIterator_t( BPy_Interface0DIterator *self ) { diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp index 1f3e3c05d91..0547c173249 100644 --- a/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp +++ b/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp @@ -143,7 +143,7 @@ int ViewEdgeIterator___init__(BPy_ViewEdgeIterator *self, PyObject *args ) } self->py_it.it = self->ve_it; - + return 0; } From 4580fd1415d92ed882744e2617f5ac05e895452f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 1 Aug 2008 02:16:36 +0000 Subject: [PATCH 428/430] soc-2008-mxcurioni: clean-up #1 --- .../intern/python/{BPy_Material.cpp => BPy_FrsMaterial.cpp} | 0 .../freestyle/intern/python/{BPy_Material.h => BPy_FrsMaterial.h} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename source/blender/freestyle/intern/python/{BPy_Material.cpp => BPy_FrsMaterial.cpp} (100%) rename source/blender/freestyle/intern/python/{BPy_Material.h => BPy_FrsMaterial.h} (100%) diff --git a/source/blender/freestyle/intern/python/BPy_Material.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp similarity index 100% rename from source/blender/freestyle/intern/python/BPy_Material.cpp rename to source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp diff --git a/source/blender/freestyle/intern/python/BPy_Material.h b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h similarity index 100% rename from source/blender/freestyle/intern/python/BPy_Material.h rename to source/blender/freestyle/intern/python/BPy_FrsMaterial.h From c324f0cbc72b47182ba3d7fd1bbd280fcebe3283 Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 1 Aug 2008 02:25:21 +0000 Subject: [PATCH 429/430] soc-2008-mxcurioni: clean-up #2 --- .../freestyle/intern/python/BPy_Convert.cpp | 8 +- .../freestyle/intern/python/BPy_Convert.h | 2 +- .../freestyle/intern/python/BPy_Freestyle.cpp | 4 +- .../intern/python/BPy_FrsMaterial.cpp | 218 +++++++++--------- .../freestyle/intern/python/BPy_FrsMaterial.h | 18 +- .../Interface1D/FEdge/BPy_FEdgeSharp.cpp | 4 +- .../Interface1D/FEdge/BPy_FEdgeSmooth.cpp | 2 +- .../BPy_UnaryFunction0DMaterial.cpp | 2 +- .../freestyle/intern/stroke/Stroke.cpp | 4 +- .../freestyle/intern/system/Iterator.h | 11 +- .../style_modules_blender/freestyle_init.py | 8 +- .../style_modules_blender/shaders.py | 4 +- 12 files changed, 144 insertions(+), 141 deletions(-) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index 53a4e171e74..e7d98440683 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -1,7 +1,7 @@ #include "BPy_Convert.h" #include "BPy_BBox.h" -#include "BPy_Material.h" +#include "BPy_FrsMaterial.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" #include "BPy_Interface0D.h" @@ -190,9 +190,9 @@ PyObject * BPy_ViewShape_from_ViewShape( ViewShape& vs ) { return py_vs; } -PyObject * BPy_Material_from_Material( Material& m ){ - PyObject *py_m = Material_Type.tp_new( &Material_Type, 0, 0 ); - ((BPy_Material*) py_m)->m = new Material( m ); +PyObject * BPy_FrsMaterial_from_Material( Material& m ){ + PyObject *py_m = FrsMaterial_Type.tp_new( &FrsMaterial_Type, 0, 0 ); + ((BPy_FrsMaterial*) py_m)->m = new Material( m ); return py_m; } diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 54999b44f67..4bfaf4c1e17 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -76,7 +76,7 @@ PyObject * BPy_Id_from_Id( Id& id ); PyObject * BPy_Interface0D_from_Interface0D( Interface0D& if0D ); PyObject * BPy_Interface1D_from_Interface1D( Interface1D& if1D ); PyObject * BPy_IntegrationType_from_IntegrationType( int i ); -PyObject * BPy_Material_from_Material( Material& m ); +PyObject * BPy_FrsMaterial_from_Material( Material& m ); PyObject * BPy_Nature_from_Nature( unsigned short n ); PyObject * BPy_MediumType_from_MediumType( int n ); PyObject * BPy_SShape_from_SShape( SShape& ss ); diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index b4170dc4f92..8c55fdc3fd0 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -3,7 +3,7 @@ #include "BPy_BBox.h" #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" -#include "BPy_Material.h" +#include "BPy_FrsMaterial.h" #include "BPy_FrsNoise.h" #include "BPy_Id.h" #include "BPy_IntegrationType.h" @@ -147,7 +147,7 @@ PyObject *Freestyle_Init( void ) BBox_Init( module ); BinaryPredicate0D_Init( module ); BinaryPredicate1D_Init( module ); - Material_Init( module ); + FrsMaterial_Init( module ); FrsNoise_Init( module ); Id_Init( module ); IntegrationType_Init( module ); diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp index 7f871c34c3c..052583e4621 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp @@ -1,4 +1,4 @@ -#include "BPy_Material.h" +#include "BPy_FrsMaterial.h" #include "BPy_Convert.h" @@ -8,85 +8,85 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -/*--------------- Python API function prototypes for Material instance -----------*/ -static int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds); -static void Material___dealloc__(BPy_Material *self); -static PyObject * Material___repr__(BPy_Material *self); +/*--------------- Python API function prototypes for FrsMaterial instance -----------*/ +static int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds); +static void FrsMaterial___dealloc__(BPy_FrsMaterial *self); +static PyObject * FrsMaterial___repr__(BPy_FrsMaterial *self); -static PyObject * Material_diffuse( BPy_Material* self); -static PyObject * Material_diffuseR( BPy_Material* self); -static PyObject * Material_diffuseG( BPy_Material* self) ; -static PyObject * Material_diffuseB( BPy_Material* self) ; -static PyObject * Material_diffuseA( BPy_Material* self); -static PyObject * Material_specular( BPy_Material* self); -static PyObject * Material_specularR( BPy_Material* self); -static PyObject * Material_specularG( BPy_Material* self); -static PyObject * Material_specularB( BPy_Material* self) ; -static PyObject * Material_specularA( BPy_Material* self) ; -static PyObject * Material_ambient( BPy_Material* self) ; -static PyObject * Material_ambientR( BPy_Material* self); -static PyObject * Material_ambientG( BPy_Material* self); -static PyObject * Material_ambientB( BPy_Material* self); -static PyObject * Material_ambientA( BPy_Material* self); -static PyObject * Material_emission( BPy_Material* self); -static PyObject * Material_emissionR( BPy_Material* self); -static PyObject * Material_emissionG( BPy_Material* self) ; -static PyObject * Material_emissionB( BPy_Material* self); -static PyObject * Material_emissionA( BPy_Material* self); -static PyObject * Material_shininess( BPy_Material* self); -static PyObject * Material_setDiffuse( BPy_Material *self, PyObject *args ); -static PyObject * Material_setSpecular( BPy_Material *self, PyObject *args ); -static PyObject * Material_setAmbient( BPy_Material *self, PyObject *args ); -static PyObject * Material_setEmission( BPy_Material *self, PyObject *args ); -static PyObject * Material_setShininess( BPy_Material *self, PyObject *args ); +static PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specular( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emission( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) ; +static PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self); +static PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ); +static PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ); -/*----------------------Material instance definitions ----------------------------*/ -static PyMethodDef BPy_Material_methods[] = { - {"diffuse", ( PyCFunction ) Material_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"}, - {"diffuseR", ( PyCFunction ) Material_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "}, - {"diffuseG", ( PyCFunction ) Material_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "}, - {"diffuseB", ( PyCFunction ) Material_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "}, - {"diffuseA", ( PyCFunction ) Material_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "}, - {"specular", ( PyCFunction ) Material_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"}, - {"specularR", ( PyCFunction ) Material_specularR, METH_NOARGS, "() Returns the red component of the specular color "}, - {"specularG", ( PyCFunction ) Material_specularG, METH_NOARGS, "() Returns the green component of the specular color "}, - {"specularB", ( PyCFunction ) Material_specularB, METH_NOARGS, "() Returns the blue component of the specular color "}, - {"specularA", ( PyCFunction ) Material_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "}, - {"ambient", ( PyCFunction ) Material_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"}, - {"ambientR", ( PyCFunction ) Material_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "}, - {"ambientG", ( PyCFunction ) Material_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "}, - {"ambientB", ( PyCFunction ) Material_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "}, - {"ambientA", ( PyCFunction ) Material_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "}, - {"emission", ( PyCFunction ) Material_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"}, - {"emissionR", ( PyCFunction ) Material_emissionR, METH_NOARGS, "() Returns the red component of the emission color "}, - {"emissionG", ( PyCFunction ) Material_emissionG, METH_NOARGS, "() Returns the green component of the emission color "}, - {"emissionB", ( PyCFunction ) Material_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "}, - {"emissionA", ( PyCFunction ) Material_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "}, - {"shininess", ( PyCFunction ) Material_shininess, METH_NOARGS, "() Returns the shininess coefficient "}, - {"setDiffuse", ( PyCFunction ) Material_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"}, - {"setSpecular", ( PyCFunction ) Material_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"}, - {"setAmbient", ( PyCFunction ) Material_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"}, - {"setEmission", ( PyCFunction ) Material_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"}, - {"setShininess", ( PyCFunction ) Material_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"}, +/*----------------------FrsMaterial instance definitions ----------------------------*/ +static PyMethodDef BPy_FrsMaterial_methods[] = { + {"diffuse", ( PyCFunction ) FrsMaterial_diffuse, METH_NOARGS, "() Returns the diffuse color as a 4 float array"}, + {"diffuseR", ( PyCFunction ) FrsMaterial_diffuseR, METH_NOARGS, "() Returns the red component of the diffuse color "}, + {"diffuseG", ( PyCFunction ) FrsMaterial_diffuseG, METH_NOARGS, "() Returns the green component of the diffuse color "}, + {"diffuseB", ( PyCFunction ) FrsMaterial_diffuseB, METH_NOARGS, "() Returns the blue component of the diffuse color "}, + {"diffuseA", ( PyCFunction ) FrsMaterial_diffuseA, METH_NOARGS, "() Returns the alpha component of the diffuse color "}, + {"specular", ( PyCFunction ) FrsMaterial_specular, METH_NOARGS, "() Returns the specular color as a 4 float array"}, + {"specularR", ( PyCFunction ) FrsMaterial_specularR, METH_NOARGS, "() Returns the red component of the specular color "}, + {"specularG", ( PyCFunction ) FrsMaterial_specularG, METH_NOARGS, "() Returns the green component of the specular color "}, + {"specularB", ( PyCFunction ) FrsMaterial_specularB, METH_NOARGS, "() Returns the blue component of the specular color "}, + {"specularA", ( PyCFunction ) FrsMaterial_specularA, METH_NOARGS, "() Returns the alpha component of the specular color "}, + {"ambient", ( PyCFunction ) FrsMaterial_ambient, METH_NOARGS, "() Returns the ambient color as a 4 float array"}, + {"ambientR", ( PyCFunction ) FrsMaterial_ambientR, METH_NOARGS, "() Returns the red component of the ambient color "}, + {"ambientG", ( PyCFunction ) FrsMaterial_ambientG, METH_NOARGS, "() Returns the green component of the ambient color "}, + {"ambientB", ( PyCFunction ) FrsMaterial_ambientB, METH_NOARGS, "() Returns the blue component of the ambient color "}, + {"ambientA", ( PyCFunction ) FrsMaterial_ambientA, METH_NOARGS, "() Returns the alpha component of the ambient color "}, + {"emission", ( PyCFunction ) FrsMaterial_emission, METH_NOARGS, "() Returns the emission color as a 4 float array"}, + {"emissionR", ( PyCFunction ) FrsMaterial_emissionR, METH_NOARGS, "() Returns the red component of the emission color "}, + {"emissionG", ( PyCFunction ) FrsMaterial_emissionG, METH_NOARGS, "() Returns the green component of the emission color "}, + {"emissionB", ( PyCFunction ) FrsMaterial_emissionB, METH_NOARGS, "() Returns the blue component of the emission color "}, + {"emissionA", ( PyCFunction ) FrsMaterial_emissionA, METH_NOARGS, "() Returns the alpha component of the emission color "}, + {"shininess", ( PyCFunction ) FrsMaterial_shininess, METH_NOARGS, "() Returns the shininess coefficient "}, + {"setDiffuse", ( PyCFunction ) FrsMaterial_setDiffuse, METH_NOARGS, "(float r, float g, float b, float a) Sets the diffuse color"}, + {"setSpecular", ( PyCFunction ) FrsMaterial_setSpecular, METH_NOARGS, "(float r, float g, float b, float a) Sets the specular color"}, + {"setAmbient", ( PyCFunction ) FrsMaterial_setAmbient, METH_NOARGS, "(float r, float g, float b, float a) Sets the ambient color"}, + {"setEmission", ( PyCFunction ) FrsMaterial_setEmission, METH_NOARGS, "(float r, float g, float b, float a) Sets the emission color"}, + {"setShininess", ( PyCFunction ) FrsMaterial_setShininess, METH_NOARGS, "(float r, float g, float b, float a) Sets the shininess color"}, {NULL, NULL, 0, NULL} }; -/*-----------------------BPy_Material type definition ------------------------------*/ +/*-----------------------BPy_FrsMaterial type definition ------------------------------*/ -PyTypeObject Material_Type = { +PyTypeObject FrsMaterial_Type = { PyObject_HEAD_INIT( NULL ) 0, /* ob_size */ - "Material", /* tp_name */ - sizeof( BPy_Material ), /* tp_basicsize */ + "FrsMaterial", /* tp_name */ + sizeof( BPy_FrsMaterial ), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - (destructor)Material___dealloc__, /* tp_dealloc */ + (destructor)FrsMaterial___dealloc__, /* tp_dealloc */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ - (reprfunc)Material___repr__, /* tp_repr */ + (reprfunc)FrsMaterial___repr__, /* tp_repr */ /* Method suites for standard classes */ @@ -129,7 +129,7 @@ PyTypeObject Material_Type = { NULL, /* iternextfunc tp_iternext; */ /*** Attribute descriptor and subclassing stuff ***/ - BPy_Material_methods, /* struct PyMethodDef *tp_methods; */ + BPy_FrsMaterial_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ @@ -137,7 +137,7 @@ PyTypeObject Material_Type = { NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ 0, /* long tp_dictoffset; */ - (initproc)Material___init__, /* initproc tp_init; */ + (initproc)FrsMaterial___init__, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ PyType_GenericNew, /* newfunc tp_new; */ @@ -157,21 +157,21 @@ PyTypeObject Material_Type = { }; //-------------------MODULE INITIALIZATION-------------------------------- -PyMODINIT_FUNC Material_Init( PyObject *module ) +PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ) { if( module == NULL ) return; - if( PyType_Ready( &Material_Type ) < 0 ) + if( PyType_Ready( &FrsMaterial_Type ) < 0 ) return; - Py_INCREF( &Material_Type ); - PyModule_AddObject(module, "Material", (PyObject *)&Material_Type); + Py_INCREF( &FrsMaterial_Type ); + PyModule_AddObject(module, "FrsMaterial", (PyObject *)&FrsMaterial_Type); } //------------------------INSTANCE METHODS ---------------------------------- -int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds) +int FrsMaterial___init__(BPy_FrsMaterial *self, PyObject *args, PyObject *kwds) { PyObject *obj1 = 0; float f1 = 0, f2 = 0., f3 = 0., f4 = 0., f5 = 0.; @@ -182,9 +182,9 @@ int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds) if( !obj1 ){ self->m = new Material(); - } else if( BPy_Material_Check(obj1) ) { - if( ((BPy_Material *) obj1)->m ) - self->m = new Material(*( ((BPy_Material *) obj1)->m )); + } else if( BPy_FrsMaterial_Check(obj1) ) { + if( ((BPy_FrsMaterial *) obj1)->m ) + self->m = new Material(*( ((BPy_FrsMaterial *) obj1)->m )); else return -1; @@ -199,19 +199,19 @@ int Material___init__(BPy_Material *self, PyObject *args, PyObject *kwds) return 0; } -void Material___dealloc__( BPy_Material* self) +void FrsMaterial___dealloc__( BPy_FrsMaterial* self) { delete self->m; self->ob_type->tp_free((PyObject*)self); } -PyObject * Material___repr__( BPy_Material* self) +PyObject * FrsMaterial___repr__( BPy_FrsMaterial* self) { - return PyString_FromFormat("Material - address: %p", self->m ); + return PyString_FromFormat("FrsMaterial - address: %p", self->m ); } -PyObject * Material_diffuse( BPy_Material* self) { +PyObject * FrsMaterial_diffuse( BPy_FrsMaterial* self) { PyObject *tmp; const float *diffuse = self->m->diffuse(); @@ -225,23 +225,23 @@ PyObject * Material_diffuse( BPy_Material* self) { return py_diffuse; } -PyObject * Material_diffuseR( BPy_Material* self) { +PyObject * FrsMaterial_diffuseR( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->diffuseR() ); } -PyObject * Material_diffuseG( BPy_Material* self) { +PyObject * FrsMaterial_diffuseG( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->diffuseG() ); } -PyObject * Material_diffuseB( BPy_Material* self) { +PyObject * FrsMaterial_diffuseB( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->diffuseB() ); } -PyObject * Material_diffuseA( BPy_Material* self) { +PyObject * FrsMaterial_diffuseA( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->diffuseA() ); } -PyObject * Material_specular( BPy_Material* self) { +PyObject * FrsMaterial_specular( BPy_FrsMaterial* self) { PyObject *tmp; const float *specular = self->m->specular(); @@ -255,23 +255,23 @@ PyObject * Material_specular( BPy_Material* self) { return py_specular; } -PyObject * Material_specularR( BPy_Material* self) { +PyObject * FrsMaterial_specularR( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->specularR() ); } -PyObject * Material_specularG( BPy_Material* self) { +PyObject * FrsMaterial_specularG( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->specularG() ); } -PyObject * Material_specularB( BPy_Material* self) { +PyObject * FrsMaterial_specularB( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->specularB() ); } -PyObject * Material_specularA( BPy_Material* self) { +PyObject * FrsMaterial_specularA( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->specularA() ); } -PyObject * Material_ambient( BPy_Material* self) { +PyObject * FrsMaterial_ambient( BPy_FrsMaterial* self) { PyObject *tmp; const float *ambient = self->m->ambient(); @@ -285,23 +285,23 @@ PyObject * Material_ambient( BPy_Material* self) { return py_ambient; } -PyObject * Material_ambientR( BPy_Material* self) { +PyObject * FrsMaterial_ambientR( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->ambientR() ); } -PyObject * Material_ambientG( BPy_Material* self) { +PyObject * FrsMaterial_ambientG( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->ambientG() ); } -PyObject * Material_ambientB( BPy_Material* self) { +PyObject * FrsMaterial_ambientB( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->ambientB() ); } -PyObject * Material_ambientA( BPy_Material* self) { +PyObject * FrsMaterial_ambientA( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->ambientA() ); } -PyObject * Material_emission( BPy_Material* self) { +PyObject * FrsMaterial_emission( BPy_FrsMaterial* self) { PyObject *tmp; const float *emission = self->m->emission(); @@ -315,31 +315,31 @@ PyObject * Material_emission( BPy_Material* self) { return py_emission; } -PyObject * Material_emissionR( BPy_Material* self) { +PyObject * FrsMaterial_emissionR( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->emissionR() ); } -PyObject * Material_emissionG( BPy_Material* self) { +PyObject * FrsMaterial_emissionG( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->emissionG() ); } -PyObject * Material_emissionB( BPy_Material* self) { +PyObject * FrsMaterial_emissionB( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->emissionB() ); } -PyObject * Material_emissionA( BPy_Material* self) { +PyObject * FrsMaterial_emissionA( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->emissionA() ); } -PyObject * Material_shininess( BPy_Material* self) { +PyObject * FrsMaterial_shininess( BPy_FrsMaterial* self) { return PyFloat_FromDouble( self->m->shininess() ); } -PyObject * Material_setDiffuse( BPy_Material *self, PyObject *args ) { +PyObject * FrsMaterial_setDiffuse( BPy_FrsMaterial *self, PyObject *args ) { float f1, f2, f3, f4; if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: Material_setDiffuse" << endl; + cout << "ERROR: FrsMaterial_setDiffuse" << endl; Py_RETURN_NONE; } @@ -348,11 +348,11 @@ PyObject * Material_setDiffuse( BPy_Material *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Material_setSpecular( BPy_Material *self, PyObject *args ) { +PyObject * FrsMaterial_setSpecular( BPy_FrsMaterial *self, PyObject *args ) { float f1, f2, f3, f4; if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: Material_setSpecular" << endl; + cout << "ERROR: FrsMaterial_setSpecular" << endl; Py_RETURN_NONE; } @@ -361,11 +361,11 @@ PyObject * Material_setSpecular( BPy_Material *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Material_setAmbient( BPy_Material *self, PyObject *args ) { +PyObject * FrsMaterial_setAmbient( BPy_FrsMaterial *self, PyObject *args ) { float f1, f2, f3, f4; if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: Material_setAmbient" << endl; + cout << "ERROR: FrsMaterial_setAmbient" << endl; Py_RETURN_NONE; } @@ -374,11 +374,11 @@ PyObject * Material_setAmbient( BPy_Material *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Material_setEmission( BPy_Material *self, PyObject *args ) { +PyObject * FrsMaterial_setEmission( BPy_FrsMaterial *self, PyObject *args ) { float f1, f2, f3, f4; if(!( PyArg_ParseTuple(args, "ffff", &f1, &f2, &f3, &f4) )) { - cout << "ERROR: Material_setEmission" << endl; + cout << "ERROR: FrsMaterial_setEmission" << endl; Py_RETURN_NONE; } @@ -387,11 +387,11 @@ PyObject * Material_setEmission( BPy_Material *self, PyObject *args ) { Py_RETURN_NONE; } -PyObject * Material_setShininess( BPy_Material *self, PyObject *args ) { +PyObject * FrsMaterial_setShininess( BPy_FrsMaterial *self, PyObject *args ) { float f; if(!( PyArg_ParseTuple(args, "f", &f) )) { - cout << "ERROR: Material_setShininess" << endl; + cout << "ERROR: FrsMaterial_setShininess" << endl; Py_RETURN_NONE; } diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h index e1c31864b63..b25ddfc77bc 100644 --- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.h +++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.h @@ -1,5 +1,5 @@ -#ifndef FREESTYLE_PYTHON_MATERIAL_H -#define FREESTYLE_PYTHON_MATERIAL_H +#ifndef FREESTYLE_PYTHON_FRSMATERIAL_H +#define FREESTYLE_PYTHON_FRSMATERIAL_H #include "../scene_graph/Material.h" @@ -11,19 +11,19 @@ extern "C" { #include -extern PyTypeObject Material_Type; +extern PyTypeObject FrsMaterial_Type; -#define BPy_Material_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &Material_Type) ) +#define BPy_FrsMaterial_Check(v) ( PyObject_IsInstance( (PyObject *) v, (PyObject *) &FrsMaterial_Type) ) -/*---------------------------Python BPy_Material structure definition----------*/ +/*---------------------------Python BPy_FrsMaterial structure definition----------*/ typedef struct { PyObject_HEAD Material *m; -} BPy_Material; +} BPy_FrsMaterial; -/*---------------------------Python BPy_Material visible prototypes-----------*/ +/*---------------------------Python BPy_FrsMaterial visible prototypes-----------*/ -PyMODINIT_FUNC Material_Init( PyObject *module ); +PyMODINIT_FUNC FrsMaterial_Init( PyObject *module ); /////////////////////////////////////////////////////////////////////////////////////////// @@ -33,4 +33,4 @@ PyMODINIT_FUNC Material_Init( PyObject *module ); #endif -#endif /* FREESTYLE_PYTHON_MATERIAL_H */ +#endif /* FREESTYLE_PYTHON_FRSMATERIAL_H */ diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp index 8911cc7f290..22a4dbc378e 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp @@ -175,12 +175,12 @@ PyObject * FEdgeSharp_bMaterialIndex( BPy_FEdgeSharp *self ) { PyObject * FEdgeSharp_aMaterial( BPy_FEdgeSharp *self ) { Material m( self->fes->aMaterial() ); - return BPy_Material_from_Material(m); + return BPy_FrsMaterial_from_Material(m); } PyObject * FEdgeSharp_bMaterial( BPy_FEdgeSharp *self ) { Material m( self->fes->aMaterial() ); - return BPy_Material_from_Material(m); + return BPy_FrsMaterial_from_Material(m); } PyObject * FEdgeSharp_setNormalA( BPy_FEdgeSharp *self, PyObject *args ) { diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index 52b501e0746..6a11b6c1e98 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -158,7 +158,7 @@ PyObject * FEdgeSmooth_materialIndex( BPy_FEdgeSmooth *self ) { PyObject * FEdgeSmooth_material( BPy_FEdgeSmooth *self ) { Material m( self->fes->material() ); - return BPy_Material_from_Material(m); + return BPy_FrsMaterial_from_Material(m); } PyObject * FEdgeSmooth_setNormal( BPy_FEdgeSmooth *self, PyObject *args ) { diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index f524eb25352..733acce6ab8 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -165,7 +165,7 @@ PyObject * UnaryFunction0DMaterial___call__( BPy_UnaryFunction0DMaterial *self, } Material m( self->uf0D_material->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )) ); - return BPy_Material_from_Material( m ); + return BPy_FrsMaterial_from_Material( m ); } diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index c6b52358264..b1d6e466215 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -404,7 +404,9 @@ Stroke::Stroke(const Stroke& iBrother) _mediumType = iBrother._mediumType; _textureId = iBrother._textureId; _tips = iBrother._tips; - _rep = new StrokeRep(*(iBrother._rep)); + + if(iBrother._rep) + _rep = new StrokeRep(*(iBrother._rep)); } Stroke::~Stroke() diff --git a/source/blender/freestyle/intern/system/Iterator.h b/source/blender/freestyle/intern/system/Iterator.h index 10862d7c8da..d4d9d0aa02c 100644 --- a/source/blender/freestyle/intern/system/Iterator.h +++ b/source/blender/freestyle/intern/system/Iterator.h @@ -5,6 +5,7 @@ #include using namespace std; + class Iterator { public: @@ -16,20 +17,20 @@ public: } virtual void increment() { - cerr << "Warning: method increment() not implemented" << endl; + cerr << "Warning: increment() not implemented" << endl; } virtual void decrement() { - cerr << "Warning: method decrement() not implemented" << endl; + cerr << "Warning: decrement() not implemented" << endl; } virtual bool isBegin() const { - cerr << "Warning: method isBegin() not implemented" << endl; + cerr << "Warning: isBegin() not implemented" << endl; return false; - } + } virtual bool isEnd() const { - cerr << "Warning: method isEnd() not implemented" << endl; + cerr << "Warning: isEnd() not implemented" << endl; return false; } diff --git a/source/blender/freestyle/style_modules_blender/freestyle_init.py b/source/blender/freestyle/style_modules_blender/freestyle_init.py index e4ad8a9f769..ba641bd0e3b 100644 --- a/source/blender/freestyle/style_modules_blender/freestyle_init.py +++ b/source/blender/freestyle/style_modules_blender/freestyle_init.py @@ -33,8 +33,8 @@ class MediumType(Blender.Freestyle.MediumType): class Nature(Blender.Freestyle.Nature): pass -# class Noise(Blender.Freestyle.Noise): -# pass +class FrsNoise(Blender.Freestyle.FrsNoise): + pass class Operators(Blender.Freestyle.Operators): pass @@ -90,8 +90,8 @@ class SVertex(Blender.Freestyle.SVertex): class ViewVertex(Blender.Freestyle.ViewVertex): pass -# class Curve(Blender.Freestyle.Curve): -# pass +class FrsCurve(Blender.Freestyle.FrsCurve): + pass class FEdge(Blender.Freestyle.FEdge): pass diff --git a/source/blender/freestyle/style_modules_blender/shaders.py b/source/blender/freestyle/style_modules_blender/shaders.py index bed23adff5f..610e1d2a943 100755 --- a/source/blender/freestyle/style_modules_blender/shaders.py +++ b/source/blender/freestyle/style_modules_blender/shaders.py @@ -909,7 +909,7 @@ class pySinusDisplacementShader(StrokeShader): class pyPerlinNoise1DShader(StrokeShader): def __init__(self, freq = 10, amp = 10, oct = 4): StrokeShader.__init__(self) - self.__noise = Noise() + self.__noise = FrsNoise() self.__freq = freq self.__amp = amp self.__oct = oct @@ -928,7 +928,7 @@ class pyPerlinNoise1DShader(StrokeShader): class pyPerlinNoise2DShader(StrokeShader): def __init__(self, freq = 10, amp = 10, oct = 4): StrokeShader.__init__(self) - self.__noise = Noise() + self.__noise = FrsNoise() self.__freq = freq self.__amp = amp self.__oct = oct From 7565990db264dbb7771744cea0a1c87b3e11fc3f Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Fri, 1 Aug 2008 21:55:58 +0000 Subject: [PATCH 430/430] soc-2008-mxcurioni: made considerable changes to support cross-language polymorphism for UnaryFunction0D, Interface0D, Interface1D. Add to change UnaryFunction1D to static UnaryFunction1D_void. Resolved namespace collision on the Image class (changed to FrsImage). There is greater support for style modules but somehow, some do not show anything yet (japanese_bigbrush being an example). --- source/blender/freestyle/intern/image/Image.h | 44 ++++---- .../freestyle/intern/python/BPy_Convert.cpp | 61 ++++++++--- .../freestyle/intern/python/BPy_Convert.h | 25 ++++- .../intern/python/BPy_Interface1D.cpp | 45 ++++++++ .../freestyle/intern/python/Director.cpp | 103 ++++++++++++++++-- .../freestyle/intern/python/Director.h | 32 ++---- .../BPy_UnaryFunction0DDouble.cpp | 6 +- .../BPy_UnaryFunction0DEdgeNature.cpp | 1 + .../BPy_UnaryFunction0DFloat.cpp | 1 + .../UnaryFunction0D/BPy_UnaryFunction0DId.cpp | 1 + .../BPy_UnaryFunction0DMaterial.cpp | 1 + .../BPy_UnaryFunction0DUnsigned.cpp | 1 + .../BPy_UnaryFunction0DVec2f.cpp | 1 + .../BPy_UnaryFunction0DVec3f.cpp | 1 + .../BPy_UnaryFunction0DVectorViewShape.cpp | 1 + .../BPy_UnaryFunction0DViewShape.cpp | 1 + .../BPy_UnaryFunction1DDouble.cpp | 2 + .../BPy_UnaryFunction1DEdgeNature.cpp | 2 + .../BPy_UnaryFunction1DFloat.cpp | 2 + .../BPy_UnaryFunction1DUnsigned.cpp | 2 + .../BPy_UnaryFunction1DVec2f.cpp | 2 + .../BPy_UnaryFunction1DVec3f.cpp | 2 + .../BPy_UnaryFunction1DVectorViewShape.cpp | 2 + .../BPy_UnaryFunction1DVoid.cpp | 6 +- .../UnaryFunction1D/BPy_UnaryFunction1DVoid.h | 2 +- .../freestyle/intern/stroke/Operators.cpp | 4 +- .../freestyle/intern/stroke/Operators.h | 2 +- .../freestyle/intern/stroke/Predicates1D.h | 2 +- .../freestyle/intern/stroke/Stroke.cpp | 6 +- .../freestyle/intern/view_map/Functions0D.h | 19 +++- .../freestyle/intern/view_map/Functions1D.h | 70 ++++++++---- .../freestyle/intern/view_map/Interface1D.h | 46 ++++++-- 32 files changed, 379 insertions(+), 117 deletions(-) diff --git a/source/blender/freestyle/intern/image/Image.h b/source/blender/freestyle/intern/image/Image.h index 83d6785e32f..e1e47c0ec43 100755 --- a/source/blender/freestyle/intern/image/Image.h +++ b/source/blender/freestyle/intern/image/Image.h @@ -44,12 +44,12 @@ * size w*h, and access these pixels using x,y coordinates * specified in the whole image coordinate system. */ -class Image +class FrsImage { public: /*! Default constructor */ - Image() { + FrsImage() { _storedWidth = 0; _storedHeight = 0; _width = 0; @@ -59,7 +59,7 @@ class Image } /*! Copy constructor */ - Image(const Image& brother) { + FrsImage(const FrsImage& brother) { _storedWidth = brother._storedWidth; _storedHeight = brother._storedHeight; _width = brother._width; @@ -68,10 +68,10 @@ class Image _Oy = brother._Oy; } - /*! Builds an image from its width and height. + /*! Builds an FrsImage from its width and height. * The memory is allocated consequently. */ - Image(unsigned w, unsigned h) { + FrsImage(unsigned w, unsigned h) { _width = w; _height = h; _storedWidth = w; @@ -98,7 +98,7 @@ class Image * The x-abscissa of the origin of the rectangle that will actually * be stored. */ - Image(unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) { + FrsImage(unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) { _width = w; _height = h; _storedWidth = sw; @@ -108,7 +108,7 @@ class Image } /*! Operator= */ - Image& operator=(const Image& brother) { + FrsImage& operator=(const FrsImage& brother) { _width = brother._width; _height = brother._height; _storedWidth = brother._storedWidth; @@ -119,7 +119,7 @@ class Image } /*! Destructor */ - virtual ~Image() {} + virtual ~FrsImage() {} /*! Returns the width of the complete image */ inline unsigned width() const { @@ -181,24 +181,24 @@ class Image // /////////////////////////////////////////////////////////////////////////////// -class RGBImage : public Image +class RGBImage : public FrsImage { public: - RGBImage() : Image() { + RGBImage() : FrsImage() { _rgb = 0; } - RGBImage(const RGBImage& brother) : Image(brother) { + RGBImage(const RGBImage& brother) : FrsImage(brother) { _rgb = new float[3 * _storedWidth * _storedHeight]; memcpy(_rgb, brother._rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); } - RGBImage(unsigned w, unsigned h) : Image(w, h) { + RGBImage(unsigned w, unsigned h) : FrsImage(w, h) { _rgb = new float[3 * _width * _height]; } - RGBImage(float* rgb, unsigned w, unsigned h) : Image(w, h) { + RGBImage(float* rgb, unsigned w, unsigned h) : FrsImage(w, h) { _rgb = new float[3 * _width * _height]; memcpy(_rgb, rgb, 3 * _width * _height * sizeof(float)); } @@ -218,13 +218,13 @@ class RGBImage : public Image * \param sh * The height of the part of the image we want to store and work on */ - RGBImage(float* rgb, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : Image(w, h, sw, sh, ox, oy) { + RGBImage(float* rgb, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : FrsImage(w, h, sw, sh, ox, oy) { _rgb = new float[3 * _storedWidth * _storedHeight]; memcpy(_rgb, rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); } RGBImage& operator=(const RGBImage& brother) { - dynamic_cast(*this) = brother; + dynamic_cast(*this) = brother; _rgb = new float[3 * _storedWidth * _storedHeight]; memcpy(_rgb, brother._rgb, 3 * _storedWidth * _storedHeight * sizeof(float)); return* this; @@ -296,25 +296,25 @@ class RGBImage : public Image // /////////////////////////////////////////////////////////////////////////////// -class GrayImage : public Image +class GrayImage : public FrsImage { public: - GrayImage() : Image() { + GrayImage() : FrsImage() { _lvl = 0; } - GrayImage(const GrayImage& brother) : Image(brother) { + GrayImage(const GrayImage& brother) : FrsImage(brother) { _lvl = new float[_storedWidth*_storedHeight]; memcpy(_lvl, brother._lvl, _storedWidth*_storedHeight*sizeof(*_lvl)); } /*! Builds an empty gray image */ - GrayImage(unsigned w, unsigned h) : Image(w, h) { + GrayImage(unsigned w, unsigned h) : FrsImage(w, h) { _lvl = new float[_width*_height]; } - GrayImage(float* lvl, unsigned w, unsigned h) : Image(w, h) { + GrayImage(float* lvl, unsigned w, unsigned h) : FrsImage(w, h) { _lvl = new float[_width*_height]; memcpy(_lvl, lvl, _width*_height*sizeof(*_lvl)); } @@ -334,13 +334,13 @@ class GrayImage : public Image * \param sh * The height of the part of the image we want to store and work on */ - GrayImage(float* lvl, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : Image(w, h, sw, sh, ox, oy) { + GrayImage(float* lvl, unsigned w, unsigned h, unsigned sw, unsigned sh, unsigned ox, unsigned oy) : FrsImage(w, h, sw, sh, ox, oy) { _lvl = new float[_storedWidth*_storedHeight]; memcpy(_lvl, lvl, _storedWidth*_storedHeight*sizeof(float)); } GrayImage& operator=(const GrayImage& brother) { - dynamic_cast(*this) = brother; + dynamic_cast(*this) = brother; _lvl = new float[_storedWidth * _storedHeight]; memcpy(_lvl, brother._lvl, _storedWidth * _storedHeight * sizeof(float)); return *this; diff --git a/source/blender/freestyle/intern/python/BPy_Convert.cpp b/source/blender/freestyle/intern/python/BPy_Convert.cpp index e7d98440683..a1c26aaf622 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.cpp +++ b/source/blender/freestyle/intern/python/BPy_Convert.cpp @@ -39,14 +39,15 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// +//============================== +// C++ => Python +//============================== + PyObject * PyBool_from_bool( bool b ){ return PyBool_FromLong( b ? 1 : 0); } -bool bool_from_PyBool( PyObject *b ) { - return b == Py_True; -} PyObject * Vector_from_Vec2f( Vec2f& vec ) { float vec_data[2]; // because vec->_coord is protected @@ -224,19 +225,6 @@ PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewE return py_dve; } - -//============================== -// Constants -//============================== - -IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { - return static_cast( PyInt_AsLong(obj) ); -} - -Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) { - return static_cast( PyInt_AsLong(obj) ); -} - //============================== // Iterators //============================== @@ -323,7 +311,48 @@ PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhou } +//============================== +// Python => C++ +//============================== +bool bool_from_PyBool( PyObject *b ) { + return b == Py_True; +} + +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ) { + return static_cast( PyInt_AsLong(obj) ); +} + +Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ) { + return static_cast( PyInt_AsLong(obj) ); +} + +Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj ) { + return static_cast( PyInt_AsLong(obj) ); +} + +Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ) { + float x = PyFloat_AsDouble( PyObject_GetAttrString(obj,"x") ); + float y = PyFloat_AsDouble( PyObject_GetAttrString(obj,"y") ); + + return new Vec2f(x,y); +} + +Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ) { + float x = PyFloat_AsDouble( PyObject_GetAttrString(obj,"x") ); + float y = PyFloat_AsDouble( PyObject_GetAttrString(obj,"y") ); + float z = PyFloat_AsDouble( PyObject_GetAttrString(obj,"z") ); + + return new Vec3f(x,y,z); +} + +Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ) { + double x = PyFloat_AsDouble( PyObject_GetAttrString(obj,"x") ); + double y = PyFloat_AsDouble( PyObject_GetAttrString(obj,"y") ); + double z = PyFloat_AsDouble( PyObject_GetAttrString(obj,"z") ); + + return new Vec3r(x,y,z); +} /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 4bfaf4c1e17..5bfdef56278 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -23,6 +23,9 @@ using namespace Geometry; // Material #include "../scene_graph/Material.h" +// Nature::VertexNature, Nature::EdgeNature +#include "../winged_edge/Nature.h" + // Stroke, StrokeAttribute, StrokeVertex #include "../stroke/Stroke.h" @@ -58,16 +61,15 @@ extern "C" { #include "api2_2x/vector.h" #include "api2_2x/gen_utils.h" -PyObject * PyBool_from_bool( bool b ); -bool bool_from_PyBool( PyObject *b ); +//============================== +// C++ => Python +//============================== +PyObject * PyBool_from_bool( bool b ); PyObject * Vector_from_Vec2f( Vec2f& v ); PyObject * Vector_from_Vec3f( Vec3f& v ); PyObject * Vector_from_Vec3r( Vec3r& v ); -IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); -Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); - PyObject * BPy_BBox_from_BBox( BBox< Vec3r > &bb ); PyObject * BPy_CurvePoint_from_CurvePoint( CurvePoint& cp ); PyObject * BPy_directedViewEdge_from_directedViewEdge( ViewVertex::directedViewEdge& dve ); @@ -99,8 +101,19 @@ PyObject * BPy_ChainingIterator_from_ChainingIterator( ChainingIterator& c_it ); PyObject * BPy_ChainPredicateIterator_from_ChainPredicateIterator( ChainPredicateIterator& cp_it ); PyObject * BPy_ChainSilhouetteIterator_from_ChainSilhouetteIterator( ChainSilhouetteIterator& cs_it ); +//============================== +// Python => C++ +//============================== + +bool bool_from_PyBool( PyObject *b ); +IntegrationType IntegrationType_from_BPy_IntegrationType( PyObject* obj ); +Stroke::MediumType MediumType_from_BPy_MediumType( PyObject* obj ); +Nature::EdgeNature EdgeNature_from_BPy_Nature( PyObject* obj ); +Vec2f * Vec2f_ptr_from_Vector( PyObject* obj ); +Vec3f * Vec3f_ptr_from_Vector( PyObject* obj ); +Vec3r * Vec3r_ptr_from_Vector( PyObject* obj ); + - /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp index 3db9531da4b..8d2549ebf2c 100644 --- a/source/blender/freestyle/intern/python/BPy_Interface1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_Interface1D.cpp @@ -30,6 +30,10 @@ static PyObject *Interface1D_getId( BPy_Interface1D *self ); static PyObject *Interface1D_getNature( BPy_Interface1D *self ); static PyObject *Interface1D_getTimeStamp( BPy_Interface1D *self ); static PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args); +static PyObject * Interface1D_verticesBegin( BPy_Interface1D *self ); +static PyObject * Interface1D_verticesEnd( BPy_Interface1D *self ); +static PyObject * Interface1D_pointsBegin( BPy_Interface1D *self, PyObject *args ); +static PyObject * Interface1D_pointsEnd( BPy_Interface1D *self, PyObject *args ); /*----------------------Interface1D instance definitions ----------------------------*/ static PyMethodDef BPy_Interface1D_methods[] = { @@ -41,6 +45,11 @@ static PyMethodDef BPy_Interface1D_methods[] = { {"getNature", ( PyCFunction ) Interface1D_getNature, METH_NOARGS, "Returns the nature of the 1D element"}, {"getTimeStamp", ( PyCFunction ) Interface1D_getTimeStamp, METH_NOARGS, "Returns the time stamp of the 1D element. Mainly used for selection"}, {"setTimeStamp", ( PyCFunction ) Interface1D_setTimeStamp, METH_VARARGS, "Sets the time stamp for the 1D element"}, + {"verticesBegin", ( PyCFunction ) Interface1D_verticesBegin, METH_NOARGS, ""}, + {"verticesEnd", ( PyCFunction ) Interface1D_verticesEnd, METH_NOARGS, ""}, + {"pointsBegin", ( PyCFunction ) Interface1D_pointsBegin, METH_VARARGS, ""}, + {"pointsEnd", ( PyCFunction ) Interface1D_pointsEnd, METH_VARARGS, ""}, + {NULL, NULL, 0, NULL} }; @@ -189,6 +198,7 @@ PyMODINIT_FUNC Interface1D_Init( PyObject *module ) int Interface1D___init__(BPy_Interface1D *self, PyObject *args, PyObject *kwds) { self->if1D = new Interface1D(); + self->if1D->py_if1D = (PyObject *) self; return 0; } @@ -245,6 +255,41 @@ PyObject *Interface1D_setTimeStamp( BPy_Interface1D *self, PyObject *args) { Py_RETURN_NONE; } +PyObject * Interface1D_verticesBegin( BPy_Interface1D *self ) { + Interface0DIterator if0D_it( self->if1D->verticesBegin() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * Interface1D_verticesEnd( BPy_Interface1D *self ) { + Interface0DIterator if0D_it( self->if1D->verticesEnd() ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + + +PyObject * Interface1D_pointsBegin( BPy_Interface1D *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: Interface1D_pointsBegin" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->if1D->pointsBegin(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + +PyObject * Interface1D_pointsEnd( BPy_Interface1D *self, PyObject *args ) { + float f = 0; + + if(!( PyArg_ParseTuple(args, "|f", &f) )) { + cout << "ERROR: Interface1D_pointsEnd" << endl; + Py_RETURN_NONE; + } + + Interface0DIterator if0D_it( self->if1D->pointsEnd(f) ); + return BPy_Interface0DIterator_from_Interface0DIterator( if0D_it ); +} + /////////////////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp index 42677919ca5..b3188554c09 100644 --- a/source/blender/freestyle/intern/python/Director.cpp +++ b/source/blender/freestyle/intern/python/Director.cpp @@ -4,14 +4,29 @@ #include "BPy_BinaryPredicate0D.h" #include "BPy_BinaryPredicate1D.h" +#include "BPy_FrsMaterial.h" +#include "BPy_Id.h" #include "BPy_UnaryFunction0D.h" #include "BPy_UnaryFunction1D.h" #include "BPy_UnaryPredicate0D.h" #include "BPy_UnaryPredicate1D.h" #include "BPy_StrokeShader.h" #include "Iterator/BPy_ChainingIterator.h" +#include "Iterator/BPy_Interface0DIterator.h" #include "Interface1D/BPy_Stroke.h" #include "Interface1D/BPy_ViewEdge.h" +#include "BPy_ViewShape.h" + +#include "UnaryFunction0D/BPy_UnaryFunction0DDouble.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DFloat.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DId.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DMaterial.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DUnsigned.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVec2f.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVec3f.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.h" +#include "UnaryFunction0D/BPy_UnaryFunction0DViewShape.h" // BinaryPredicate0D: __call__ bool Director_BPy_BinaryPredicate0D___call__( PyObject *obj, Interface0D& i1, Interface0D& i2) { @@ -61,17 +76,58 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera return ((BPy_ViewEdge *) result)->ve; } + // BPy_UnaryFunction{0D,1D}: __call__ -// BPy_UnaryFunction0DDouble -// BPy_UnaryFunction0DEdgeNature -// BPy_UnaryFunction0DFloat -// BPy_UnaryFunction0DId -// BPy_UnaryFunction0DMaterial -// BPy_UnaryFunction0DUnsigned -// BPy_UnaryFunction0DVec2f -// BPy_UnaryFunction0DVec3f -// BPy_UnaryFunction0DVectorViewShape -// BPy_UnaryFunction0DViewShape +void Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0DIterator& if0D_it) { + + PyObject *result = PyObject_CallMethod( obj, "__call__", "O", BPy_Interface0DIterator_from_Interface0DIterator(if0D_it) ); + + if( BPy_UnaryFunction0DDouble_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = PyFloat_AsDouble(result); + + } else if ( BPy_UnaryFunction0DEdgeNature_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = EdgeNature_from_BPy_Nature(result); + + } else if ( BPy_UnaryFunction0DFloat_Check(obj) ) { + + ((UnaryFunction0D *) uf0D)->result = PyFloat_AsDouble(result); + + } else if ( BPy_UnaryFunction0DId_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = *( ((BPy_Id *) result)->id ); + + } else if ( BPy_UnaryFunction0DMaterial_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = *( ((BPy_FrsMaterial *) result)->m ); + + } else if ( BPy_UnaryFunction0DUnsigned_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = PyInt_AsLong(result); + + } else if ( BPy_UnaryFunction0DVec2f_Check(obj) ) { + Vec2f *v = Vec2f_ptr_from_Vector( result ); + ((UnaryFunction0D *) uf0D)->result = *v; + delete v; + + } else if ( BPy_UnaryFunction0DVec3f_Check(obj) ) { + Vec3f *v = Vec3f_ptr_from_Vector( result ); + ((UnaryFunction0D *) uf0D)->result = *v; + delete v; + + } else if ( BPy_UnaryFunction0DVectorViewShape_Check(obj) ) { + vector vec; + for( int i = 0; i < PyList_Size(result); i++) { + ViewShape *b = ( (BPy_ViewShape *) PyList_GetItem(result, i) )->vs; + vec.push_back( b ); + } + + ((UnaryFunction0D< vector > *) uf0D)->result = vec; + + } else if ( BPy_UnaryFunction0DViewShape_Check(obj) ) { + ((UnaryFunction0D *) uf0D)->result = ((BPy_ViewShape *) result)->vs; + + } + +} + +void Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1D& if1D) { // BPy_UnaryFunction1DDouble // BPy_UnaryFunction1DEdgeNature @@ -82,6 +138,10 @@ ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyItera // BPy_UnaryFunction1DVectorViewShape // BPy_UnaryFunction1DVoid + +} + + // BPy_Iterator: increment, decrement, isBegin, isEnd void Director_BPy_Iterator_increment( PyObject *obj ) { PyObject_CallMethod( obj, "increment", "", 0 ); @@ -103,5 +163,28 @@ bool Director_BPy_Iterator_isEnd( PyObject *obj ) { return bool_from_PyBool(result); } +// BPy_Interface1D: verticesBegin, verticesEnd, pointsBegin, pointsEnd +Interface0DIterator Director_BPy_Interface1D_verticesBegin( PyObject *obj ){ + PyObject *result = PyObject_CallMethod( obj, "verticesBegin", "", 0 ); + return *( ((BPy_Interface0DIterator *) result)->if0D_it ); +} + +Interface0DIterator Director_BPy_Interface1D_verticesEnd( PyObject *obj ){ + PyObject *result = PyObject_CallMethod( obj, "verticesEnd", "", 0 ); + + return *( ((BPy_Interface0DIterator *) result)->if0D_it ); +} + +Interface0DIterator Director_BPy_Interface1D_pointsBegin( PyObject *obj ){ + PyObject *result = PyObject_CallMethod( obj, "pointsBegin", "", 0 ); + + return *( ((BPy_Interface0DIterator *) result)->if0D_it ); +} + +Interface0DIterator Director_BPy_Interface1D_pointsEnd( PyObject *obj ){ + PyObject *result = PyObject_CallMethod( obj, "pointsEnd", "", 0 ); + + return *( ((BPy_Interface0DIterator *) result)->if0D_it ); +} diff --git a/source/blender/freestyle/intern/python/Director.h b/source/blender/freestyle/intern/python/Director.h index 2a67be237f5..27afa3bbe3e 100644 --- a/source/blender/freestyle/intern/python/Director.h +++ b/source/blender/freestyle/intern/python/Director.h @@ -37,27 +37,9 @@ void Director_BPy_StrokeShader_shade( PyObject *obj, Stroke& s); void Director_BPy_ChainingIterator_init( PyObject *obj ); ViewEdge * Director_BPy_ChainingIterator_traverse( PyObject *obj, AdjacencyIterator& a_it ); -// BPy_UnaryFunction0DDouble -double Director_BPy_UnaryFunction0DDouble___call__( PyObject *obj, Interface0DIterator& if0D_it); -// BPy_UnaryFunction0DEdgeNature -// BPy_UnaryFunction0DFloat -// BPy_UnaryFunction0DId -// BPy_UnaryFunction0DMaterial -// BPy_UnaryFunction0DUnsigned -// BPy_UnaryFunction0DVec2f -// BPy_UnaryFunction0DVec3f -// BPy_UnaryFunction0DVectorViewShape -// BPy_UnaryFunction0DViewShape - -// BPy_UnaryFunction1DDouble -// BPy_UnaryFunction1DEdgeNature -// BPy_UnaryFunction1DFloat -// BPy_UnaryFunction1DUnsigned -// BPy_UnaryFunction1DVec2f -// BPy_UnaryFunction1DVec3f -// BPy_UnaryFunction1DVectorViewShape -// BPy_UnaryFunction1DVoid -void Director_BPy_UnaryFunction1DVoid___call__( PyObject *obj, Interface1D& if1D); +// BPy_UnaryFunction{0D,1D}: __call__ +void Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0DIterator& if0D_it); +void Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1D& if1D); // BPy_Iterator: increment, decrement, isBegin, isEnd void Director_BPy_Iterator_increment( PyObject *obj ); @@ -65,4 +47,12 @@ void Director_BPy_Iterator_decrement( PyObject *obj ); bool Director_BPy_Iterator_isBegin( PyObject *obj ); bool Director_BPy_Iterator_isEnd( PyObject *obj ); +// BPy_Interface1D: verticesBegin, verticesEnd, pointsBegin, pointsEnd +Interface0DIterator Director_BPy_Interface1D_verticesBegin( PyObject *obj ); +Interface0DIterator Director_BPy_Interface1D_verticesEnd( PyObject *obj ); +Interface0DIterator Director_BPy_Interface1D_pointsBegin( PyObject *obj ); +Interface0DIterator Director_BPy_Interface1D_pointsEnd( PyObject *obj ); + + + #endif // FREESTYLE_PYTHON_DIRECTOR diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp index e7ac46122b6..45f5c297b8a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DDouble.cpp @@ -14,6 +14,8 @@ #include "UnaryFunction0D_double/BPy_LocalAverageDepthF0D.h" #include "UnaryFunction0D_double/BPy_ZDiscontinuityF0D.h" +#include "../Director.h" + #ifdef __cplusplus extern "C" { #endif @@ -190,6 +192,7 @@ PyMODINIT_FUNC UnaryFunction0DDouble_Init( PyObject *module ) { int UnaryFunction0DDouble___init__(BPy_UnaryFunction0DDouble* self) { self->uf0D_double = new UnaryFunction0D(); + self->uf0D_double->py_uf0D = (PyObject *)self; return 0; } @@ -219,7 +222,8 @@ PyObject * UnaryFunction0DDouble___call__( BPy_UnaryFunction0DDouble *self, PyOb return NULL; } - double d = self->uf0D_double->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it )); + double d = self->uf0D_double->operator()(*( ((BPy_Interface0DIterator *) obj)->if0D_it)); + return PyFloat_FromDouble( d ); } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp index 3dfcb74cddd..79f8ff1f648 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DEdgeNature.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DEdgeNature_Init( PyObject *module ) { int UnaryFunction0DEdgeNature___init__(BPy_UnaryFunction0DEdgeNature* self) { self->uf0D_edgenature = new UnaryFunction0D(); + self->uf0D_edgenature->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp index 2c11eb92ed5..bff5fa962c1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DFloat.cpp @@ -164,6 +164,7 @@ PyMODINIT_FUNC UnaryFunction0DFloat_Init( PyObject *module ) { int UnaryFunction0DFloat___init__(BPy_UnaryFunction0DFloat* self) { self->uf0D_float = new UnaryFunction0D(); + self->uf0D_float->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp index 2d6cbf09be1..6e21f5f687e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DId.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DId_Init( PyObject *module ) { int UnaryFunction0DId___init__(BPy_UnaryFunction0DId* self) { self->uf0D_id = new UnaryFunction0D(); + self->uf0D_id->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp index 733acce6ab8..2aef794617a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DMaterial.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DMaterial_Init( PyObject *module ) { int UnaryFunction0DMaterial___init__(BPy_UnaryFunction0DMaterial* self) { self->uf0D_material = new UnaryFunction0D(); + self->uf0D_material->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp index a7d8e9f42a7..2d33419032b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DUnsigned.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DUnsigned_Init( PyObject *module ) { int UnaryFunction0DUnsigned___init__(BPy_UnaryFunction0DUnsigned* self) { self->uf0D_unsigned = new UnaryFunction0D(); + self->uf0D_unsigned->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp index fb7fc4f19fe..3eedf16c575 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec2f.cpp @@ -141,6 +141,7 @@ PyMODINIT_FUNC UnaryFunction0DVec2f_Init( PyObject *module ) { int UnaryFunction0DVec2f___init__(BPy_UnaryFunction0DVec2f* self) { self->uf0D_vec2f = new UnaryFunction0D(); + self->uf0D_vec2f->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp index d0412d7c7d0..aa77d17b18b 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVec3f.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DVec3f_Init( PyObject *module ) { int UnaryFunction0DVec3f___init__(BPy_UnaryFunction0DVec3f* self) { self->uf0D_vec3f = new UnaryFunction0D(); + self->uf0D_vec3f->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 02aef4e28cf..93bea5c114e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -135,6 +135,7 @@ PyMODINIT_FUNC UnaryFunction0DVectorViewShape_Init( PyObject *module ) { int UnaryFunction0DVectorViewShape___init__(BPy_UnaryFunction0DVectorViewShape* self) { self->uf0D_vectorviewshape = new UnaryFunction0D< std::vector >(); + self->uf0D_vectorviewshape->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp index eb2fceb3f06..a9714e0b2c6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DViewShape.cpp @@ -141,6 +141,7 @@ PyMODINIT_FUNC UnaryFunction0DViewShape_Init( PyObject *module ) { int UnaryFunction0DViewShape___init__(BPy_UnaryFunction0DViewShape* self) { self->uf0D_viewshape = new UnaryFunction0D(); + self->uf0D_viewshape->py_uf0D = (PyObject *)self; return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp index 887d1273e60..c3fc04c8b1e 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp @@ -231,6 +231,8 @@ int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *ar self->uf1D_double = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_double->py_uf1D = (PyObject *)self; + return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp index d4d7f642494..78d63020062 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp @@ -152,6 +152,8 @@ int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyOb self->uf1D_edgenature = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_edgenature->py_uf1D = (PyObject *)self; + return 0; } void UnaryFunction1DEdgeNature___dealloc__(BPy_UnaryFunction1DEdgeNature* self) diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp index f4c8a9e53ce..a424d7862a6 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp @@ -145,6 +145,8 @@ int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args self->uf1D_float = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_float->py_uf1D = (PyObject *)self; + return 0; } void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat* self) diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp index ef75f3bad5b..297116d2112 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp @@ -152,6 +152,8 @@ int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject self->uf1D_unsigned = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_unsigned->py_uf1D = (PyObject *)self; + return 0; } void UnaryFunction1DUnsigned___dealloc__(BPy_UnaryFunction1DUnsigned* self) diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp index e0fa12c66e6..1d3f1c708b5 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp @@ -158,6 +158,8 @@ int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args self->uf1D_vec2f = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_vec2f->py_uf1D = (PyObject *)self; + return 0; } void UnaryFunction1DVec2f___dealloc__(BPy_UnaryFunction1DVec2f* self) diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp index 3a3c7d4e835..1b4c7b281d3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp @@ -152,6 +152,8 @@ int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args self->uf1D_vec3f = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_vec3f->py_uf1D = (PyObject *)self; + return 0; } void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self) diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp index c0b25403706..36f5fc442bf 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp @@ -165,6 +165,8 @@ int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector >( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_vectorviewshape->py_uf1D = (PyObject *)self; + return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp index 99cc6838997..9d5178a299d 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp @@ -161,11 +161,13 @@ int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args) } if( !obj ) - self->uf1D_void = new UnaryFunction1D(); + self->uf1D_void = new UnaryFunction1D_void(); else { - self->uf1D_void = new UnaryFunction1D( IntegrationType_from_BPy_IntegrationType(obj) ); + self->uf1D_void = new UnaryFunction1D_void( IntegrationType_from_BPy_IntegrationType(obj) ); } + self->uf1D_void->py_uf1D = (PyObject *)self; + return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h index 3e8ad431ec4..34615bb4b27 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.h @@ -18,7 +18,7 @@ extern PyTypeObject UnaryFunction1DVoid_Type; /*---------------------------Python BPy_UnaryFunction1DVoid structure definition----------*/ typedef struct { BPy_UnaryFunction1D py_uf1D; - UnaryFunction1D *uf1D_void; + UnaryFunction1D_void *uf1D_void; } BPy_UnaryFunction1DVoid; /*---------------------------Python BPy_UnaryFunction1DVoid visible prototypes-----------*/ diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index fe1ac27b04e..39914cbef1a 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -65,7 +65,7 @@ void Operators::select(UnaryPredicate1D& pred) { void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred, - UnaryFunction1D& modifier) { + UnaryFunction1D_void& modifier) { if (_current_view_edges_set.empty()) return; @@ -137,7 +137,7 @@ void Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, //void Operators::bidirectionalChain(ViewEdgeIterator& it, // UnaryPredicate1D& pred, -// UnaryFunction1D& modifier) { +// UnaryFunction1D_void& modifier) { // if (_current_view_edges_set.empty()) // return; // diff --git a/source/blender/freestyle/intern/stroke/Operators.h b/source/blender/freestyle/intern/stroke/Operators.h index 96ecd0aa75b..804ee4d7056 100755 --- a/source/blender/freestyle/intern/stroke/Operators.h +++ b/source/blender/freestyle/intern/stroke/Operators.h @@ -85,7 +85,7 @@ public: */ static void chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred, - UnaryFunction1D& modifier); + UnaryFunction1D_void& modifier); /*! Builds a set of chains from the current set of ViewEdges. * Each ViewEdge of the current list starts a new chain. The chaining diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index 8c6f5a9bfa4..014d5a1130e 100755 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -127,7 +127,7 @@ public: virtual bool operator()(Interface1D& inter1, Interface1D& inter2) { string name( py_bp1D ? PyString_AsString(PyObject_CallMethod(py_bp1D, "getName", "")) : getName() ); - if( py_bp1D && py_bp1D && PyObject_HasAttrString(py_bp1D, "__call__") ) { + if( py_bp1D && PyObject_HasAttrString(py_bp1D, "__call__") ) { return Director_BPy_BinaryPredicate1D___call__(py_bp1D, inter1, inter2); } else { cerr << "Warning: " << name << " operator() not implemented" << endl; diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index b1d6e466215..a1277611a90 100755 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -404,9 +404,11 @@ Stroke::Stroke(const Stroke& iBrother) _mediumType = iBrother._mediumType; _textureId = iBrother._textureId; _tips = iBrother._tips; - - if(iBrother._rep) + + if( iBrother._rep ) _rep = new StrokeRep(*(iBrother._rep)); + else + _rep = new StrokeRep(this); } Stroke::~Stroke() diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h index 1ad35da8d91..9543e8c34a6 100755 --- a/source/blender/freestyle/intern/view_map/Functions0D.h +++ b/source/blender/freestyle/intern/view_map/Functions0D.h @@ -43,6 +43,8 @@ class SShape; using namespace Geometry; +#include "../python/Director.h" + // // UnaryFunction0D (base class for functions in 0D) // @@ -70,12 +72,15 @@ class /*LIB_VIEW_MAP_EXPORT*/ UnaryFunction0D { public: + T result; + PyObject *py_uf0D; + /*! The type of the value * returned by the functor. */ typedef T ReturnedValueType; /*! Default constructor. */ - UnaryFunction0D() {} +UnaryFunction0D() { py_uf0D = 0;} /*! Destructor; */ virtual ~UnaryFunction0D() {} /*! Returns the string "UnaryFunction0D" */ @@ -90,9 +95,17 @@ public: * \return the result of the function of type T. */ virtual T operator()(Interface0DIterator& iter) { - cerr << "Warning: UnaryFunction0D operator() not implemented" << endl; - return T(); + string name( py_uf0D ? PyString_AsString(PyObject_CallMethod(py_uf0D, "getName", "")) : getName() ); + + if( py_uf0D && PyObject_HasAttrString(py_uf0D, "__call__") ) { + Director_BPy_UnaryFunction0D___call__( this, py_uf0D, iter); + return result; + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + return T(); + } } + }; # ifdef SWIG diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h index 072733b985d..c4f8b9f7607 100755 --- a/source/blender/freestyle/intern/view_map/Functions1D.h +++ b/source/blender/freestyle/intern/view_map/Functions1D.h @@ -36,6 +36,9 @@ # include "Functions0D.h" # include "Interface1D.h" # include "../system/FreestyleConfig.h" + +#include "../python/Director.h" + // // UnaryFunction1D (base class for functions in 1D) // @@ -62,6 +65,10 @@ template class /*LIB_VIEW_MAP_EXPORT*/ UnaryFunction1D { public: + + T result; + PyObject *py_uf1D; + /*! The type of the value * returned by the functor. */ @@ -92,9 +99,17 @@ public: * \return the result of the function of type T. */ virtual T operator()(Interface1D& inter) { - cerr << "Warning: UnaryFunction1D operator() not implemented" << endl; - return T(0); + string name( py_uf1D ? PyString_AsString(PyObject_CallMethod(py_uf1D, "getName", "")) : getName() ); + + if( py_uf1D && PyObject_HasAttrString(py_uf1D, "__call__") ) { + Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter); + return result; + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + return T(0); + } } + /*! Sets the integration method */ void setIntegrationType(IntegrationType integration) { _integration = integration; @@ -109,22 +124,37 @@ protected: IntegrationType _integration; }; -# ifdef SWIG -%feature("director") UnaryFunction1D; -%feature("director") UnaryFunction1D; -%feature("director") UnaryFunction1D; -%feature("director") UnaryFunction1D; -%feature("director") UnaryFunction1D; -%feature("director") UnaryFunction1D; -%template(UnaryFunction1DVoid) UnaryFunction1D; -%template(UnaryFunction1DUnsigned) UnaryFunction1D; -%template(UnaryFunction1DFloat) UnaryFunction1D; -%template(UnaryFunction1DDouble) UnaryFunction1D; -%template(UnaryFunction1DVec2f) UnaryFunction1D; -%template(UnaryFunction1DVec3f) UnaryFunction1D; -%template(UnaryFunction1DVectorViewShape) UnaryFunction1D >; -# endif // SWIG +class UnaryFunction1D_void +{ +public: + + PyObject *py_uf1D; + + UnaryFunction1D_void(){_integration = MEAN;} + UnaryFunction1D_void(IntegrationType iType){_integration = iType;} + virtual ~UnaryFunction1D_void() {} + + virtual string getName() const { + return "UnaryFunction1D_void"; + } + + void operator()(Interface1D& inter) { + string name( py_uf1D ? PyString_AsString(PyObject_CallMethod(py_uf1D, "getName", "")) : getName() ); + + if( py_uf1D && PyObject_HasAttrString(py_uf1D, "__call__") ) { + Director_BPy_UnaryFunction1D___call__( this, py_uf1D, inter); + } else { + cerr << "Warning: " << name << " operator() not implemented" << endl; + } + } + + void setIntegrationType(IntegrationType integration) { _integration = integration; } + IntegrationType getIntegrationType() const { return _integration; } + + protected: + IntegrationType _integration; +}; // @@ -385,7 +415,7 @@ namespace Functions1D { // TimeStampF1D /*! Returns the time stamp of the Interface1D. */ - class LIB_VIEW_MAP_EXPORT TimeStampF1D : public UnaryFunction1D + class LIB_VIEW_MAP_EXPORT TimeStampF1D : public UnaryFunction1D_void { public: /*! Returns the string "TimeStampF1D"*/ @@ -398,7 +428,7 @@ namespace Functions1D { // IncrementChainingTimeStampF1D /*! Increments the chaining time stamp of the Interface1D. */ - class LIB_VIEW_MAP_EXPORT IncrementChainingTimeStampF1D : public UnaryFunction1D + class LIB_VIEW_MAP_EXPORT IncrementChainingTimeStampF1D : public UnaryFunction1D_void { public: /*! Returns the string "IncrementChainingTimeStampF1D"*/ @@ -411,7 +441,7 @@ namespace Functions1D { // ChainingTimeStampF1D /*! Sets the chaining time stamp of the Interface1D. */ - class LIB_VIEW_MAP_EXPORT ChainingTimeStampF1D : public UnaryFunction1D + class LIB_VIEW_MAP_EXPORT ChainingTimeStampF1D : public UnaryFunction1D_void { public: /*! Returns the string "ChainingTimeStampF1D"*/ diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 8c75afc73df..55a2aece91c 100755 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -38,6 +38,8 @@ # include "../winged_edge/Nature.h" # include "Functions0D.h" +#include "../python/Director.h" + using namespace std; /*! \file Interface1D.h * Interface1D and related tools definitions @@ -125,8 +127,10 @@ class Interface1D { public: + PyObject *py_if1D; + /*! Default constructor */ - Interface1D() {_timeStamp=0;} + Interface1D() {_timeStamp=0; py_if1D = 0; } virtual ~Interface1D() {}; //soc /*! Returns the string "Interface1D" .*/ @@ -140,16 +144,28 @@ public: * pointing to the first vertex. */ virtual Interface0DIterator verticesBegin() { - cerr << "Warning: method verticesBegin() not implemented" << endl; - return Interface0DIterator(); + string name( py_if1D ? PyString_AsString(PyObject_CallMethod(py_if1D, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_if1D && PyObject_HasAttrString(py_if1D, "verticesBegin") ) { + return Director_BPy_Interface1D_verticesBegin(py_if1D); + } else { + cerr << "Warning: " << name << " verticesBegin() not implemented" << endl; + return Interface0DIterator(); + } } /*! Returns an iterator over the Interface1D vertices, * pointing after the last vertex. */ virtual Interface0DIterator verticesEnd(){ - cerr << "Warning: method verticesEnd() not implemented" << endl; - return Interface0DIterator(); + string name( py_if1D ? PyString_AsString(PyObject_CallMethod(py_if1D, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_if1D && PyObject_HasAttrString(py_if1D, "verticesEnd") ) { + return Director_BPy_Interface1D_verticesEnd(py_if1D); + } else { + cerr << "Warning: " << name << " verticesEnd() not implemented" << endl; + return Interface0DIterator(); + } } /*! Returns an iterator over the Interface1D points, @@ -162,8 +178,14 @@ public: * this 1D element. */ virtual Interface0DIterator pointsBegin(float t=0.f) { - cerr << "Warning: method pointsBegin() not implemented" << endl; - return Interface0DIterator(); + string name( py_if1D ? PyString_AsString(PyObject_CallMethod(py_if1D, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_if1D && PyObject_HasAttrString(py_if1D, "pointsBegin") ) { + return Director_BPy_Interface1D_pointsBegin(py_if1D); + } else { + cerr << "Warning: " << name << " pointsBegin() not implemented" << endl; + return Interface0DIterator(); + } } /*! Returns an iterator over the Interface1D points, @@ -176,8 +198,14 @@ public: * this 1D element. */ virtual Interface0DIterator pointsEnd(float t=0.f) { - cerr << "Warning: method pointsEnd() not implemented" << endl; - return Interface0DIterator(); + string name( py_if1D ? PyString_AsString(PyObject_CallMethod(py_if1D, "getExactTypeName", "")) : getExactTypeName() ); + + if( py_if1D && PyObject_HasAttrString(py_if1D, "pointsEnd") ) { + return Director_BPy_Interface1D_pointsEnd(py_if1D); + } else { + cerr << "Warning: " << name << " pointsEnd() not implemented" << endl; + return Interface0DIterator(); + } } // Data access methods